commit eb49dae954db4bdc0c84c3bc8c46783a2a2d5d41 Author: nickf Date: Thu Jun 20 19:28:30 2024 +0200 test diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/instant-quote.iml b/.idea/instant-quote.iml new file mode 100644 index 0000000..74d515a --- /dev/null +++ b/.idea/instant-quote.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..025602f --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..21439bf --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..5886492 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..5596b44 --- /dev/null +++ b/main.py @@ -0,0 +1,16 @@ +# This is a sample Python script. + +# Press Shift+F10 to execute it or replace it with your code. +# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings. + + +def print_hi(name): + # Use a breakpoint in the code line below to debug your script. + print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint. + + +# Press the green button in the gutter to run the script. +if __name__ == '__main__': + print_hi('PyCharm') + +# See PyCharm help at https://www.jetbrains.com/help/pycharm/ diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..0ebfa3b --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "instant-quote", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/three": { + "version": "0.164.1", + "resolved": "https://registry.npmjs.org/three/-/three-0.164.1.tgz", + "integrity": "sha512-iC/hUBbl1vzFny7f5GtqzVXYjMJKaTPxiCxXfrvVdBi1Sf+jhd1CAkitiFwC7mIBFCo3MrDLJG97yisoaWig0w==", + "license": "MIT" + } + } +} diff --git a/node_modules/three/LICENSE b/node_modules/three/LICENSE new file mode 100644 index 0000000..d33709f --- /dev/null +++ b/node_modules/three/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright © 2010-2024 three.js authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/three/README.md b/node_modules/three/README.md new file mode 100644 index 0000000..1f5a1f8 --- /dev/null +++ b/node_modules/three/README.md @@ -0,0 +1,86 @@ +# three.js + +[![NPM Package][npm]][npm-url] +[![Build Size][build-size]][build-size-url] +[![NPM Downloads][npm-downloads]][npmtrends-url] +[![DeepScan][deepscan]][deepscan-url] +[![Discord][discord]][discord-url] + +#### JavaScript 3D library + +The aim of the project is to create an easy-to-use, lightweight, cross-browser, general-purpose 3D library. The current builds only include a WebGL renderer but WebGPU (experimental), SVG and CSS3D renderers are also available as addons. + +[Examples](https://threejs.org/examples/) — +[Docs](https://threejs.org/docs/) — +[Manual](https://threejs.org/manual/) — +[Wiki](https://github.com/mrdoob/three.js/wiki) — +[Migrating](https://github.com/mrdoob/three.js/wiki/Migration-Guide) — +[Questions](https://stackoverflow.com/questions/tagged/three.js) — +[Forum](https://discourse.threejs.org/) — +[Discord](https://discord.gg/56GBJwAnUS) + +### Usage + +This code creates a scene, a camera, and a geometric cube, and it adds the cube to the scene. It then creates a `WebGL` renderer for the scene and camera, and it adds that viewport to the `document.body` element. Finally, it animates the cube within the scene for the camera. + +```javascript +import * as THREE from 'three'; + +const width = window.innerWidth, height = window.innerHeight; + +// init + +const camera = new THREE.PerspectiveCamera( 70, width / height, 0.01, 10 ); +camera.position.z = 1; + +const scene = new THREE.Scene(); + +const geometry = new THREE.BoxGeometry( 0.2, 0.2, 0.2 ); +const material = new THREE.MeshNormalMaterial(); + +const mesh = new THREE.Mesh( geometry, material ); +scene.add( mesh ); + +const renderer = new THREE.WebGLRenderer( { antialias: true } ); +renderer.setSize( width, height ); +renderer.setAnimationLoop( animation ); +document.body.appendChild( renderer.domElement ); + +// animation + +function animation( time ) { + + mesh.rotation.x = time / 2000; + mesh.rotation.y = time / 1000; + + renderer.render( scene, camera ); + +} +``` + +If everything goes well, you should see [this](https://jsfiddle.net/2nyxkmco/). + +### Cloning this repository + +Cloning the repo with all its history results in a ~2 GB download. If you don't need the whole history you can use the `depth` parameter to significantly reduce download size. + +```sh +git clone --depth=1 https://github.com/mrdoob/three.js.git +``` + +### Change log + +[Releases](https://github.com/mrdoob/three.js/releases) + + +[npm]: https://img.shields.io/npm/v/three +[npm-url]: https://www.npmjs.com/package/three +[build-size]: https://badgen.net/bundlephobia/minzip/three +[build-size-url]: https://bundlephobia.com/result?p=three +[npm-downloads]: https://img.shields.io/npm/dw/three +[npmtrends-url]: https://www.npmtrends.com/three +[deepscan]: https://deepscan.io/api/teams/16600/projects/19901/branches/525701/badge/grade.svg +[deepscan-url]: https://deepscan.io/dashboard#view=project&tid=16600&pid=19901&bid=525701 +[discord]: https://img.shields.io/discord/685241246557667386 +[discord-url]: https://discord.gg/56GBJwAnUS + diff --git a/node_modules/three/build/three.cjs b/node_modules/three/build/three.cjs new file mode 100644 index 0000000..f322eac --- /dev/null +++ b/node_modules/three/build/three.cjs @@ -0,0 +1,53446 @@ +/** + * @license + * Copyright 2010-2024 Three.js Authors + * SPDX-License-Identifier: MIT + */ +'use strict'; + +const REVISION = '164'; + +const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }; +const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }; +const CullFaceNone = 0; +const CullFaceBack = 1; +const CullFaceFront = 2; +const CullFaceFrontBack = 3; +const BasicShadowMap = 0; +const PCFShadowMap = 1; +const PCFSoftShadowMap = 2; +const VSMShadowMap = 3; +const FrontSide = 0; +const BackSide = 1; +const DoubleSide = 2; +const NoBlending = 0; +const NormalBlending = 1; +const AdditiveBlending = 2; +const SubtractiveBlending = 3; +const MultiplyBlending = 4; +const CustomBlending = 5; +const AddEquation = 100; +const SubtractEquation = 101; +const ReverseSubtractEquation = 102; +const MinEquation = 103; +const MaxEquation = 104; +const ZeroFactor = 200; +const OneFactor = 201; +const SrcColorFactor = 202; +const OneMinusSrcColorFactor = 203; +const SrcAlphaFactor = 204; +const OneMinusSrcAlphaFactor = 205; +const DstAlphaFactor = 206; +const OneMinusDstAlphaFactor = 207; +const DstColorFactor = 208; +const OneMinusDstColorFactor = 209; +const SrcAlphaSaturateFactor = 210; +const ConstantColorFactor = 211; +const OneMinusConstantColorFactor = 212; +const ConstantAlphaFactor = 213; +const OneMinusConstantAlphaFactor = 214; +const NeverDepth = 0; +const AlwaysDepth = 1; +const LessDepth = 2; +const LessEqualDepth = 3; +const EqualDepth = 4; +const GreaterEqualDepth = 5; +const GreaterDepth = 6; +const NotEqualDepth = 7; +const MultiplyOperation = 0; +const MixOperation = 1; +const AddOperation = 2; +const NoToneMapping = 0; +const LinearToneMapping = 1; +const ReinhardToneMapping = 2; +const CineonToneMapping = 3; +const ACESFilmicToneMapping = 4; +const CustomToneMapping = 5; +const AgXToneMapping = 6; +const NeutralToneMapping = 7; +const AttachedBindMode = 'attached'; +const DetachedBindMode = 'detached'; + +const UVMapping = 300; +const CubeReflectionMapping = 301; +const CubeRefractionMapping = 302; +const EquirectangularReflectionMapping = 303; +const EquirectangularRefractionMapping = 304; +const CubeUVReflectionMapping = 306; +const RepeatWrapping = 1000; +const ClampToEdgeWrapping = 1001; +const MirroredRepeatWrapping = 1002; +const NearestFilter = 1003; +const NearestMipmapNearestFilter = 1004; +const NearestMipMapNearestFilter = 1004; +const NearestMipmapLinearFilter = 1005; +const NearestMipMapLinearFilter = 1005; +const LinearFilter = 1006; +const LinearMipmapNearestFilter = 1007; +const LinearMipMapNearestFilter = 1007; +const LinearMipmapLinearFilter = 1008; +const LinearMipMapLinearFilter = 1008; +const UnsignedByteType = 1009; +const ByteType = 1010; +const ShortType = 1011; +const UnsignedShortType = 1012; +const IntType = 1013; +const UnsignedIntType = 1014; +const FloatType = 1015; +const HalfFloatType = 1016; +const UnsignedShort4444Type = 1017; +const UnsignedShort5551Type = 1018; +const UnsignedInt248Type = 1020; +const UnsignedInt5999Type = 35902; +const AlphaFormat = 1021; +const RGBFormat = 1022; +const RGBAFormat = 1023; +const LuminanceFormat = 1024; +const LuminanceAlphaFormat = 1025; +const DepthFormat = 1026; +const DepthStencilFormat = 1027; +const RedFormat = 1028; +const RedIntegerFormat = 1029; +const RGFormat = 1030; +const RGIntegerFormat = 1031; +const RGBAIntegerFormat = 1033; + +const RGB_S3TC_DXT1_Format = 33776; +const RGBA_S3TC_DXT1_Format = 33777; +const RGBA_S3TC_DXT3_Format = 33778; +const RGBA_S3TC_DXT5_Format = 33779; +const RGB_PVRTC_4BPPV1_Format = 35840; +const RGB_PVRTC_2BPPV1_Format = 35841; +const RGBA_PVRTC_4BPPV1_Format = 35842; +const RGBA_PVRTC_2BPPV1_Format = 35843; +const RGB_ETC1_Format = 36196; +const RGB_ETC2_Format = 37492; +const RGBA_ETC2_EAC_Format = 37496; +const RGBA_ASTC_4x4_Format = 37808; +const RGBA_ASTC_5x4_Format = 37809; +const RGBA_ASTC_5x5_Format = 37810; +const RGBA_ASTC_6x5_Format = 37811; +const RGBA_ASTC_6x6_Format = 37812; +const RGBA_ASTC_8x5_Format = 37813; +const RGBA_ASTC_8x6_Format = 37814; +const RGBA_ASTC_8x8_Format = 37815; +const RGBA_ASTC_10x5_Format = 37816; +const RGBA_ASTC_10x6_Format = 37817; +const RGBA_ASTC_10x8_Format = 37818; +const RGBA_ASTC_10x10_Format = 37819; +const RGBA_ASTC_12x10_Format = 37820; +const RGBA_ASTC_12x12_Format = 37821; +const RGBA_BPTC_Format = 36492; +const RGB_BPTC_SIGNED_Format = 36494; +const RGB_BPTC_UNSIGNED_Format = 36495; +const RED_RGTC1_Format = 36283; +const SIGNED_RED_RGTC1_Format = 36284; +const RED_GREEN_RGTC2_Format = 36285; +const SIGNED_RED_GREEN_RGTC2_Format = 36286; +const LoopOnce = 2200; +const LoopRepeat = 2201; +const LoopPingPong = 2202; +const InterpolateDiscrete = 2300; +const InterpolateLinear = 2301; +const InterpolateSmooth = 2302; +const ZeroCurvatureEnding = 2400; +const ZeroSlopeEnding = 2401; +const WrapAroundEnding = 2402; +const NormalAnimationBlendMode = 2500; +const AdditiveAnimationBlendMode = 2501; +const TrianglesDrawMode = 0; +const TriangleStripDrawMode = 1; +const TriangleFanDrawMode = 2; +const BasicDepthPacking = 3200; +const RGBADepthPacking = 3201; +const TangentSpaceNormalMap = 0; +const ObjectSpaceNormalMap = 1; + +// Color space string identifiers, matching CSS Color Module Level 4 and WebGPU names where available. +const NoColorSpace = ''; +const SRGBColorSpace = 'srgb'; +const LinearSRGBColorSpace = 'srgb-linear'; +const DisplayP3ColorSpace = 'display-p3'; +const LinearDisplayP3ColorSpace = 'display-p3-linear'; + +const LinearTransfer = 'linear'; +const SRGBTransfer = 'srgb'; + +const Rec709Primaries = 'rec709'; +const P3Primaries = 'p3'; + +const ZeroStencilOp = 0; +const KeepStencilOp = 7680; +const ReplaceStencilOp = 7681; +const IncrementStencilOp = 7682; +const DecrementStencilOp = 7683; +const IncrementWrapStencilOp = 34055; +const DecrementWrapStencilOp = 34056; +const InvertStencilOp = 5386; + +const NeverStencilFunc = 512; +const LessStencilFunc = 513; +const EqualStencilFunc = 514; +const LessEqualStencilFunc = 515; +const GreaterStencilFunc = 516; +const NotEqualStencilFunc = 517; +const GreaterEqualStencilFunc = 518; +const AlwaysStencilFunc = 519; + +const NeverCompare = 512; +const LessCompare = 513; +const EqualCompare = 514; +const LessEqualCompare = 515; +const GreaterCompare = 516; +const NotEqualCompare = 517; +const GreaterEqualCompare = 518; +const AlwaysCompare = 519; + +const StaticDrawUsage = 35044; +const DynamicDrawUsage = 35048; +const StreamDrawUsage = 35040; +const StaticReadUsage = 35045; +const DynamicReadUsage = 35049; +const StreamReadUsage = 35041; +const StaticCopyUsage = 35046; +const DynamicCopyUsage = 35050; +const StreamCopyUsage = 35042; + +const GLSL1 = '100'; +const GLSL3 = '300 es'; + +const WebGLCoordinateSystem = 2000; +const WebGPUCoordinateSystem = 2001; + +/** + * https://github.com/mrdoob/eventdispatcher.js/ + */ + +class EventDispatcher { + + addEventListener( type, listener ) { + + if ( this._listeners === undefined ) this._listeners = {}; + + const listeners = this._listeners; + + if ( listeners[ type ] === undefined ) { + + listeners[ type ] = []; + + } + + if ( listeners[ type ].indexOf( listener ) === - 1 ) { + + listeners[ type ].push( listener ); + + } + + } + + hasEventListener( type, listener ) { + + if ( this._listeners === undefined ) return false; + + const listeners = this._listeners; + + return listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== - 1; + + } + + removeEventListener( type, listener ) { + + if ( this._listeners === undefined ) return; + + const listeners = this._listeners; + const listenerArray = listeners[ type ]; + + if ( listenerArray !== undefined ) { + + const index = listenerArray.indexOf( listener ); + + if ( index !== - 1 ) { + + listenerArray.splice( index, 1 ); + + } + + } + + } + + dispatchEvent( event ) { + + if ( this._listeners === undefined ) return; + + const listeners = this._listeners; + const listenerArray = listeners[ event.type ]; + + if ( listenerArray !== undefined ) { + + event.target = this; + + // Make a copy, in case listeners are removed while iterating. + const array = listenerArray.slice( 0 ); + + for ( let i = 0, l = array.length; i < l; i ++ ) { + + array[ i ].call( this, event ); + + } + + event.target = null; + + } + + } + +} + +const _lut = [ '00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '0a', '0b', '0c', '0d', '0e', '0f', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '1a', '1b', '1c', '1d', '1e', '1f', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '2a', '2b', '2c', '2d', '2e', '2f', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '3a', '3b', '3c', '3d', '3e', '3f', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '4a', '4b', '4c', '4d', '4e', '4f', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '5a', '5b', '5c', '5d', '5e', '5f', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '6a', '6b', '6c', '6d', '6e', '6f', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '7a', '7b', '7c', '7d', '7e', '7f', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '8a', '8b', '8c', '8d', '8e', '8f', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '9a', '9b', '9c', '9d', '9e', '9f', 'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8', 'a9', 'aa', 'ab', 'ac', 'ad', 'ae', 'af', 'b0', 'b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'b7', 'b8', 'b9', 'ba', 'bb', 'bc', 'bd', 'be', 'bf', 'c0', 'c1', 'c2', 'c3', 'c4', 'c5', 'c6', 'c7', 'c8', 'c9', 'ca', 'cb', 'cc', 'cd', 'ce', 'cf', 'd0', 'd1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'd9', 'da', 'db', 'dc', 'dd', 'de', 'df', 'e0', 'e1', 'e2', 'e3', 'e4', 'e5', 'e6', 'e7', 'e8', 'e9', 'ea', 'eb', 'ec', 'ed', 'ee', 'ef', 'f0', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'fa', 'fb', 'fc', 'fd', 'fe', 'ff' ]; + +let _seed = 1234567; + + +const DEG2RAD = Math.PI / 180; +const RAD2DEG = 180 / Math.PI; + +// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136 +function generateUUID() { + + const d0 = Math.random() * 0xffffffff | 0; + const d1 = Math.random() * 0xffffffff | 0; + const d2 = Math.random() * 0xffffffff | 0; + const d3 = Math.random() * 0xffffffff | 0; + const uuid = _lut[ d0 & 0xff ] + _lut[ d0 >> 8 & 0xff ] + _lut[ d0 >> 16 & 0xff ] + _lut[ d0 >> 24 & 0xff ] + '-' + + _lut[ d1 & 0xff ] + _lut[ d1 >> 8 & 0xff ] + '-' + _lut[ d1 >> 16 & 0x0f | 0x40 ] + _lut[ d1 >> 24 & 0xff ] + '-' + + _lut[ d2 & 0x3f | 0x80 ] + _lut[ d2 >> 8 & 0xff ] + '-' + _lut[ d2 >> 16 & 0xff ] + _lut[ d2 >> 24 & 0xff ] + + _lut[ d3 & 0xff ] + _lut[ d3 >> 8 & 0xff ] + _lut[ d3 >> 16 & 0xff ] + _lut[ d3 >> 24 & 0xff ]; + + // .toLowerCase() here flattens concatenated strings to save heap memory space. + return uuid.toLowerCase(); + +} + +function clamp( value, min, max ) { + + return Math.max( min, Math.min( max, value ) ); + +} + +// compute euclidean modulo of m % n +// https://en.wikipedia.org/wiki/Modulo_operation +function euclideanModulo( n, m ) { + + return ( ( n % m ) + m ) % m; + +} + +// Linear mapping from range to range +function mapLinear( x, a1, a2, b1, b2 ) { + + return b1 + ( x - a1 ) * ( b2 - b1 ) / ( a2 - a1 ); + +} + +// https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/inverse-lerp-a-super-useful-yet-often-overlooked-function-r5230/ +function inverseLerp( x, y, value ) { + + if ( x !== y ) { + + return ( value - x ) / ( y - x ); + + } else { + + return 0; + + } + +} + +// https://en.wikipedia.org/wiki/Linear_interpolation +function lerp( x, y, t ) { + + return ( 1 - t ) * x + t * y; + +} + +// http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/ +function damp( x, y, lambda, dt ) { + + return lerp( x, y, 1 - Math.exp( - lambda * dt ) ); + +} + +// https://www.desmos.com/calculator/vcsjnyz7x4 +function pingpong( x, length = 1 ) { + + return length - Math.abs( euclideanModulo( x, length * 2 ) - length ); + +} + +// http://en.wikipedia.org/wiki/Smoothstep +function smoothstep( x, min, max ) { + + if ( x <= min ) return 0; + if ( x >= max ) return 1; + + x = ( x - min ) / ( max - min ); + + return x * x * ( 3 - 2 * x ); + +} + +function smootherstep( x, min, max ) { + + if ( x <= min ) return 0; + if ( x >= max ) return 1; + + x = ( x - min ) / ( max - min ); + + return x * x * x * ( x * ( x * 6 - 15 ) + 10 ); + +} + +// Random integer from interval +function randInt( low, high ) { + + return low + Math.floor( Math.random() * ( high - low + 1 ) ); + +} + +// Random float from interval +function randFloat( low, high ) { + + return low + Math.random() * ( high - low ); + +} + +// Random float from <-range/2, range/2> interval +function randFloatSpread( range ) { + + return range * ( 0.5 - Math.random() ); + +} + +// Deterministic pseudo-random float in the interval [ 0, 1 ] +function seededRandom( s ) { + + if ( s !== undefined ) _seed = s; + + // Mulberry32 generator + + let t = _seed += 0x6D2B79F5; + + t = Math.imul( t ^ t >>> 15, t | 1 ); + + t ^= t + Math.imul( t ^ t >>> 7, t | 61 ); + + return ( ( t ^ t >>> 14 ) >>> 0 ) / 4294967296; + +} + +function degToRad( degrees ) { + + return degrees * DEG2RAD; + +} + +function radToDeg( radians ) { + + return radians * RAD2DEG; + +} + +function isPowerOfTwo( value ) { + + return ( value & ( value - 1 ) ) === 0 && value !== 0; + +} + +function ceilPowerOfTwo( value ) { + + return Math.pow( 2, Math.ceil( Math.log( value ) / Math.LN2 ) ); + +} + +function floorPowerOfTwo( value ) { + + return Math.pow( 2, Math.floor( Math.log( value ) / Math.LN2 ) ); + +} + +function setQuaternionFromProperEuler( q, a, b, c, order ) { + + // Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles + + // rotations are applied to the axes in the order specified by 'order' + // rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c' + // angles are in radians + + const cos = Math.cos; + const sin = Math.sin; + + const c2 = cos( b / 2 ); + const s2 = sin( b / 2 ); + + const c13 = cos( ( a + c ) / 2 ); + const s13 = sin( ( a + c ) / 2 ); + + const c1_3 = cos( ( a - c ) / 2 ); + const s1_3 = sin( ( a - c ) / 2 ); + + const c3_1 = cos( ( c - a ) / 2 ); + const s3_1 = sin( ( c - a ) / 2 ); + + switch ( order ) { + + case 'XYX': + q.set( c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13 ); + break; + + case 'YZY': + q.set( s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13 ); + break; + + case 'ZXZ': + q.set( s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13 ); + break; + + case 'XZX': + q.set( c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13 ); + break; + + case 'YXY': + q.set( s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13 ); + break; + + case 'ZYZ': + q.set( s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13 ); + break; + + default: + console.warn( 'THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + order ); + + } + +} + +function denormalize( value, array ) { + + switch ( array.constructor ) { + + case Float32Array: + + return value; + + case Uint32Array: + + return value / 4294967295.0; + + case Uint16Array: + + return value / 65535.0; + + case Uint8Array: + + return value / 255.0; + + case Int32Array: + + return Math.max( value / 2147483647.0, - 1.0 ); + + case Int16Array: + + return Math.max( value / 32767.0, - 1.0 ); + + case Int8Array: + + return Math.max( value / 127.0, - 1.0 ); + + default: + + throw new Error( 'Invalid component type.' ); + + } + +} + +function normalize( value, array ) { + + switch ( array.constructor ) { + + case Float32Array: + + return value; + + case Uint32Array: + + return Math.round( value * 4294967295.0 ); + + case Uint16Array: + + return Math.round( value * 65535.0 ); + + case Uint8Array: + + return Math.round( value * 255.0 ); + + case Int32Array: + + return Math.round( value * 2147483647.0 ); + + case Int16Array: + + return Math.round( value * 32767.0 ); + + case Int8Array: + + return Math.round( value * 127.0 ); + + default: + + throw new Error( 'Invalid component type.' ); + + } + +} + +const MathUtils = { + DEG2RAD: DEG2RAD, + RAD2DEG: RAD2DEG, + generateUUID: generateUUID, + clamp: clamp, + euclideanModulo: euclideanModulo, + mapLinear: mapLinear, + inverseLerp: inverseLerp, + lerp: lerp, + damp: damp, + pingpong: pingpong, + smoothstep: smoothstep, + smootherstep: smootherstep, + randInt: randInt, + randFloat: randFloat, + randFloatSpread: randFloatSpread, + seededRandom: seededRandom, + degToRad: degToRad, + radToDeg: radToDeg, + isPowerOfTwo: isPowerOfTwo, + ceilPowerOfTwo: ceilPowerOfTwo, + floorPowerOfTwo: floorPowerOfTwo, + setQuaternionFromProperEuler: setQuaternionFromProperEuler, + normalize: normalize, + denormalize: denormalize +}; + +class Vector2 { + + constructor( x = 0, y = 0 ) { + + Vector2.prototype.isVector2 = true; + + this.x = x; + this.y = y; + + } + + get width() { + + return this.x; + + } + + set width( value ) { + + this.x = value; + + } + + get height() { + + return this.y; + + } + + set height( value ) { + + this.y = value; + + } + + set( x, y ) { + + this.x = x; + this.y = y; + + return this; + + } + + setScalar( scalar ) { + + this.x = scalar; + this.y = scalar; + + return this; + + } + + setX( x ) { + + this.x = x; + + return this; + + } + + setY( y ) { + + this.y = y; + + return this; + + } + + setComponent( index, value ) { + + switch ( index ) { + + case 0: this.x = value; break; + case 1: this.y = value; break; + default: throw new Error( 'index is out of range: ' + index ); + + } + + return this; + + } + + getComponent( index ) { + + switch ( index ) { + + case 0: return this.x; + case 1: return this.y; + default: throw new Error( 'index is out of range: ' + index ); + + } + + } + + clone() { + + return new this.constructor( this.x, this.y ); + + } + + copy( v ) { + + this.x = v.x; + this.y = v.y; + + return this; + + } + + add( v ) { + + this.x += v.x; + this.y += v.y; + + return this; + + } + + addScalar( s ) { + + this.x += s; + this.y += s; + + return this; + + } + + addVectors( a, b ) { + + this.x = a.x + b.x; + this.y = a.y + b.y; + + return this; + + } + + addScaledVector( v, s ) { + + this.x += v.x * s; + this.y += v.y * s; + + return this; + + } + + sub( v ) { + + this.x -= v.x; + this.y -= v.y; + + return this; + + } + + subScalar( s ) { + + this.x -= s; + this.y -= s; + + return this; + + } + + subVectors( a, b ) { + + this.x = a.x - b.x; + this.y = a.y - b.y; + + return this; + + } + + multiply( v ) { + + this.x *= v.x; + this.y *= v.y; + + return this; + + } + + multiplyScalar( scalar ) { + + this.x *= scalar; + this.y *= scalar; + + return this; + + } + + divide( v ) { + + this.x /= v.x; + this.y /= v.y; + + return this; + + } + + divideScalar( scalar ) { + + return this.multiplyScalar( 1 / scalar ); + + } + + applyMatrix3( m ) { + + const x = this.x, y = this.y; + const e = m.elements; + + this.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ]; + this.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ]; + + return this; + + } + + min( v ) { + + this.x = Math.min( this.x, v.x ); + this.y = Math.min( this.y, v.y ); + + return this; + + } + + max( v ) { + + this.x = Math.max( this.x, v.x ); + this.y = Math.max( this.y, v.y ); + + return this; + + } + + clamp( min, max ) { + + // assumes min < max, componentwise + + this.x = Math.max( min.x, Math.min( max.x, this.x ) ); + this.y = Math.max( min.y, Math.min( max.y, this.y ) ); + + return this; + + } + + clampScalar( minVal, maxVal ) { + + this.x = Math.max( minVal, Math.min( maxVal, this.x ) ); + this.y = Math.max( minVal, Math.min( maxVal, this.y ) ); + + return this; + + } + + clampLength( min, max ) { + + const length = this.length(); + + return this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) ); + + } + + floor() { + + this.x = Math.floor( this.x ); + this.y = Math.floor( this.y ); + + return this; + + } + + ceil() { + + this.x = Math.ceil( this.x ); + this.y = Math.ceil( this.y ); + + return this; + + } + + round() { + + this.x = Math.round( this.x ); + this.y = Math.round( this.y ); + + return this; + + } + + roundToZero() { + + this.x = Math.trunc( this.x ); + this.y = Math.trunc( this.y ); + + return this; + + } + + negate() { + + this.x = - this.x; + this.y = - this.y; + + return this; + + } + + dot( v ) { + + return this.x * v.x + this.y * v.y; + + } + + cross( v ) { + + return this.x * v.y - this.y * v.x; + + } + + lengthSq() { + + return this.x * this.x + this.y * this.y; + + } + + length() { + + return Math.sqrt( this.x * this.x + this.y * this.y ); + + } + + manhattanLength() { + + return Math.abs( this.x ) + Math.abs( this.y ); + + } + + normalize() { + + return this.divideScalar( this.length() || 1 ); + + } + + angle() { + + // computes the angle in radians with respect to the positive x-axis + + const angle = Math.atan2( - this.y, - this.x ) + Math.PI; + + return angle; + + } + + angleTo( v ) { + + const denominator = Math.sqrt( this.lengthSq() * v.lengthSq() ); + + if ( denominator === 0 ) return Math.PI / 2; + + const theta = this.dot( v ) / denominator; + + // clamp, to handle numerical problems + + return Math.acos( clamp( theta, - 1, 1 ) ); + + } + + distanceTo( v ) { + + return Math.sqrt( this.distanceToSquared( v ) ); + + } + + distanceToSquared( v ) { + + const dx = this.x - v.x, dy = this.y - v.y; + return dx * dx + dy * dy; + + } + + manhattanDistanceTo( v ) { + + return Math.abs( this.x - v.x ) + Math.abs( this.y - v.y ); + + } + + setLength( length ) { + + return this.normalize().multiplyScalar( length ); + + } + + lerp( v, alpha ) { + + this.x += ( v.x - this.x ) * alpha; + this.y += ( v.y - this.y ) * alpha; + + return this; + + } + + lerpVectors( v1, v2, alpha ) { + + this.x = v1.x + ( v2.x - v1.x ) * alpha; + this.y = v1.y + ( v2.y - v1.y ) * alpha; + + return this; + + } + + equals( v ) { + + return ( ( v.x === this.x ) && ( v.y === this.y ) ); + + } + + fromArray( array, offset = 0 ) { + + this.x = array[ offset ]; + this.y = array[ offset + 1 ]; + + return this; + + } + + toArray( array = [], offset = 0 ) { + + array[ offset ] = this.x; + array[ offset + 1 ] = this.y; + + return array; + + } + + fromBufferAttribute( attribute, index ) { + + this.x = attribute.getX( index ); + this.y = attribute.getY( index ); + + return this; + + } + + rotateAround( center, angle ) { + + const c = Math.cos( angle ), s = Math.sin( angle ); + + const x = this.x - center.x; + const y = this.y - center.y; + + this.x = x * c - y * s + center.x; + this.y = x * s + y * c + center.y; + + return this; + + } + + random() { + + this.x = Math.random(); + this.y = Math.random(); + + return this; + + } + + *[ Symbol.iterator ]() { + + yield this.x; + yield this.y; + + } + +} + +class Matrix3 { + + constructor( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) { + + Matrix3.prototype.isMatrix3 = true; + + this.elements = [ + + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 + + ]; + + if ( n11 !== undefined ) { + + this.set( n11, n12, n13, n21, n22, n23, n31, n32, n33 ); + + } + + } + + set( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) { + + const te = this.elements; + + te[ 0 ] = n11; te[ 1 ] = n21; te[ 2 ] = n31; + te[ 3 ] = n12; te[ 4 ] = n22; te[ 5 ] = n32; + te[ 6 ] = n13; te[ 7 ] = n23; te[ 8 ] = n33; + + return this; + + } + + identity() { + + this.set( + + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 + + ); + + return this; + + } + + copy( m ) { + + const te = this.elements; + const me = m.elements; + + te[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ]; + te[ 3 ] = me[ 3 ]; te[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ]; + te[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ]; te[ 8 ] = me[ 8 ]; + + return this; + + } + + extractBasis( xAxis, yAxis, zAxis ) { + + xAxis.setFromMatrix3Column( this, 0 ); + yAxis.setFromMatrix3Column( this, 1 ); + zAxis.setFromMatrix3Column( this, 2 ); + + return this; + + } + + setFromMatrix4( m ) { + + const me = m.elements; + + this.set( + + me[ 0 ], me[ 4 ], me[ 8 ], + me[ 1 ], me[ 5 ], me[ 9 ], + me[ 2 ], me[ 6 ], me[ 10 ] + + ); + + return this; + + } + + multiply( m ) { + + return this.multiplyMatrices( this, m ); + + } + + premultiply( m ) { + + return this.multiplyMatrices( m, this ); + + } + + multiplyMatrices( a, b ) { + + const ae = a.elements; + const be = b.elements; + const te = this.elements; + + const a11 = ae[ 0 ], a12 = ae[ 3 ], a13 = ae[ 6 ]; + const a21 = ae[ 1 ], a22 = ae[ 4 ], a23 = ae[ 7 ]; + const a31 = ae[ 2 ], a32 = ae[ 5 ], a33 = ae[ 8 ]; + + const b11 = be[ 0 ], b12 = be[ 3 ], b13 = be[ 6 ]; + const b21 = be[ 1 ], b22 = be[ 4 ], b23 = be[ 7 ]; + const b31 = be[ 2 ], b32 = be[ 5 ], b33 = be[ 8 ]; + + te[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31; + te[ 3 ] = a11 * b12 + a12 * b22 + a13 * b32; + te[ 6 ] = a11 * b13 + a12 * b23 + a13 * b33; + + te[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31; + te[ 4 ] = a21 * b12 + a22 * b22 + a23 * b32; + te[ 7 ] = a21 * b13 + a22 * b23 + a23 * b33; + + te[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31; + te[ 5 ] = a31 * b12 + a32 * b22 + a33 * b32; + te[ 8 ] = a31 * b13 + a32 * b23 + a33 * b33; + + return this; + + } + + multiplyScalar( s ) { + + const te = this.elements; + + te[ 0 ] *= s; te[ 3 ] *= s; te[ 6 ] *= s; + te[ 1 ] *= s; te[ 4 ] *= s; te[ 7 ] *= s; + te[ 2 ] *= s; te[ 5 ] *= s; te[ 8 ] *= s; + + return this; + + } + + determinant() { + + const te = this.elements; + + const a = te[ 0 ], b = te[ 1 ], c = te[ 2 ], + d = te[ 3 ], e = te[ 4 ], f = te[ 5 ], + g = te[ 6 ], h = te[ 7 ], i = te[ 8 ]; + + return a * e * i - a * f * h - b * d * i + b * f * g + c * d * h - c * e * g; + + } + + invert() { + + const te = this.elements, + + n11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ], + n12 = te[ 3 ], n22 = te[ 4 ], n32 = te[ 5 ], + n13 = te[ 6 ], n23 = te[ 7 ], n33 = te[ 8 ], + + t11 = n33 * n22 - n32 * n23, + t12 = n32 * n13 - n33 * n12, + t13 = n23 * n12 - n22 * n13, + + det = n11 * t11 + n21 * t12 + n31 * t13; + + if ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0 ); + + const detInv = 1 / det; + + te[ 0 ] = t11 * detInv; + te[ 1 ] = ( n31 * n23 - n33 * n21 ) * detInv; + te[ 2 ] = ( n32 * n21 - n31 * n22 ) * detInv; + + te[ 3 ] = t12 * detInv; + te[ 4 ] = ( n33 * n11 - n31 * n13 ) * detInv; + te[ 5 ] = ( n31 * n12 - n32 * n11 ) * detInv; + + te[ 6 ] = t13 * detInv; + te[ 7 ] = ( n21 * n13 - n23 * n11 ) * detInv; + te[ 8 ] = ( n22 * n11 - n21 * n12 ) * detInv; + + return this; + + } + + transpose() { + + let tmp; + const m = this.elements; + + tmp = m[ 1 ]; m[ 1 ] = m[ 3 ]; m[ 3 ] = tmp; + tmp = m[ 2 ]; m[ 2 ] = m[ 6 ]; m[ 6 ] = tmp; + tmp = m[ 5 ]; m[ 5 ] = m[ 7 ]; m[ 7 ] = tmp; + + return this; + + } + + getNormalMatrix( matrix4 ) { + + return this.setFromMatrix4( matrix4 ).invert().transpose(); + + } + + transposeIntoArray( r ) { + + const m = this.elements; + + r[ 0 ] = m[ 0 ]; + r[ 1 ] = m[ 3 ]; + r[ 2 ] = m[ 6 ]; + r[ 3 ] = m[ 1 ]; + r[ 4 ] = m[ 4 ]; + r[ 5 ] = m[ 7 ]; + r[ 6 ] = m[ 2 ]; + r[ 7 ] = m[ 5 ]; + r[ 8 ] = m[ 8 ]; + + return this; + + } + + setUvTransform( tx, ty, sx, sy, rotation, cx, cy ) { + + const c = Math.cos( rotation ); + const s = Math.sin( rotation ); + + this.set( + sx * c, sx * s, - sx * ( c * cx + s * cy ) + cx + tx, + - sy * s, sy * c, - sy * ( - s * cx + c * cy ) + cy + ty, + 0, 0, 1 + ); + + return this; + + } + + // + + scale( sx, sy ) { + + this.premultiply( _m3.makeScale( sx, sy ) ); + + return this; + + } + + rotate( theta ) { + + this.premultiply( _m3.makeRotation( - theta ) ); + + return this; + + } + + translate( tx, ty ) { + + this.premultiply( _m3.makeTranslation( tx, ty ) ); + + return this; + + } + + // for 2D Transforms + + makeTranslation( x, y ) { + + if ( x.isVector2 ) { + + this.set( + + 1, 0, x.x, + 0, 1, x.y, + 0, 0, 1 + + ); + + } else { + + this.set( + + 1, 0, x, + 0, 1, y, + 0, 0, 1 + + ); + + } + + return this; + + } + + makeRotation( theta ) { + + // counterclockwise + + const c = Math.cos( theta ); + const s = Math.sin( theta ); + + this.set( + + c, - s, 0, + s, c, 0, + 0, 0, 1 + + ); + + return this; + + } + + makeScale( x, y ) { + + this.set( + + x, 0, 0, + 0, y, 0, + 0, 0, 1 + + ); + + return this; + + } + + // + + equals( matrix ) { + + const te = this.elements; + const me = matrix.elements; + + for ( let i = 0; i < 9; i ++ ) { + + if ( te[ i ] !== me[ i ] ) return false; + + } + + return true; + + } + + fromArray( array, offset = 0 ) { + + for ( let i = 0; i < 9; i ++ ) { + + this.elements[ i ] = array[ i + offset ]; + + } + + return this; + + } + + toArray( array = [], offset = 0 ) { + + const te = this.elements; + + array[ offset ] = te[ 0 ]; + array[ offset + 1 ] = te[ 1 ]; + array[ offset + 2 ] = te[ 2 ]; + + array[ offset + 3 ] = te[ 3 ]; + array[ offset + 4 ] = te[ 4 ]; + array[ offset + 5 ] = te[ 5 ]; + + array[ offset + 6 ] = te[ 6 ]; + array[ offset + 7 ] = te[ 7 ]; + array[ offset + 8 ] = te[ 8 ]; + + return array; + + } + + clone() { + + return new this.constructor().fromArray( this.elements ); + + } + +} + +const _m3 = /*@__PURE__*/ new Matrix3(); + +function arrayNeedsUint32( array ) { + + // assumes larger values usually on last + + for ( let i = array.length - 1; i >= 0; -- i ) { + + if ( array[ i ] >= 65535 ) return true; // account for PRIMITIVE_RESTART_FIXED_INDEX, #24565 + + } + + return false; + +} + +const TYPED_ARRAYS = { + Int8Array: Int8Array, + Uint8Array: Uint8Array, + Uint8ClampedArray: Uint8ClampedArray, + Int16Array: Int16Array, + Uint16Array: Uint16Array, + Int32Array: Int32Array, + Uint32Array: Uint32Array, + Float32Array: Float32Array, + Float64Array: Float64Array +}; + +function getTypedArray( type, buffer ) { + + return new TYPED_ARRAYS[ type ]( buffer ); + +} + +function createElementNS( name ) { + + return document.createElementNS( 'http://www.w3.org/1999/xhtml', name ); + +} + +function createCanvasElement() { + + const canvas = createElementNS( 'canvas' ); + canvas.style.display = 'block'; + return canvas; + +} + +const _cache = {}; + +function warnOnce( message ) { + + if ( message in _cache ) return; + + _cache[ message ] = true; + + console.warn( message ); + +} + +/** + * Matrices converting P3 <-> Rec. 709 primaries, without gamut mapping + * or clipping. Based on W3C specifications for sRGB and Display P3, + * and ICC specifications for the D50 connection space. Values in/out + * are _linear_ sRGB and _linear_ Display P3. + * + * Note that both sRGB and Display P3 use the sRGB transfer functions. + * + * Reference: + * - http://www.russellcottrell.com/photo/matrixCalculator.htm + */ + +const LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = /*@__PURE__*/ new Matrix3().set( + 0.8224621, 0.177538, 0.0, + 0.0331941, 0.9668058, 0.0, + 0.0170827, 0.0723974, 0.9105199, +); + +const LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = /*@__PURE__*/ new Matrix3().set( + 1.2249401, - 0.2249404, 0.0, + - 0.0420569, 1.0420571, 0.0, + - 0.0196376, - 0.0786361, 1.0982735 +); + +/** + * Defines supported color spaces by transfer function and primaries, + * and provides conversions to/from the Linear-sRGB reference space. + */ +const COLOR_SPACES = { + [ LinearSRGBColorSpace ]: { + transfer: LinearTransfer, + primaries: Rec709Primaries, + toReference: ( color ) => color, + fromReference: ( color ) => color, + }, + [ SRGBColorSpace ]: { + transfer: SRGBTransfer, + primaries: Rec709Primaries, + toReference: ( color ) => color.convertSRGBToLinear(), + fromReference: ( color ) => color.convertLinearToSRGB(), + }, + [ LinearDisplayP3ColorSpace ]: { + transfer: LinearTransfer, + primaries: P3Primaries, + toReference: ( color ) => color.applyMatrix3( LINEAR_DISPLAY_P3_TO_LINEAR_SRGB ), + fromReference: ( color ) => color.applyMatrix3( LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 ), + }, + [ DisplayP3ColorSpace ]: { + transfer: SRGBTransfer, + primaries: P3Primaries, + toReference: ( color ) => color.convertSRGBToLinear().applyMatrix3( LINEAR_DISPLAY_P3_TO_LINEAR_SRGB ), + fromReference: ( color ) => color.applyMatrix3( LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 ).convertLinearToSRGB(), + }, +}; + +const SUPPORTED_WORKING_COLOR_SPACES = new Set( [ LinearSRGBColorSpace, LinearDisplayP3ColorSpace ] ); + +const ColorManagement = { + + enabled: true, + + _workingColorSpace: LinearSRGBColorSpace, + + get workingColorSpace() { + + return this._workingColorSpace; + + }, + + set workingColorSpace( colorSpace ) { + + if ( ! SUPPORTED_WORKING_COLOR_SPACES.has( colorSpace ) ) { + + throw new Error( `Unsupported working color space, "${ colorSpace }".` ); + + } + + this._workingColorSpace = colorSpace; + + }, + + convert: function ( color, sourceColorSpace, targetColorSpace ) { + + if ( this.enabled === false || sourceColorSpace === targetColorSpace || ! sourceColorSpace || ! targetColorSpace ) { + + return color; + + } + + const sourceToReference = COLOR_SPACES[ sourceColorSpace ].toReference; + const targetFromReference = COLOR_SPACES[ targetColorSpace ].fromReference; + + return targetFromReference( sourceToReference( color ) ); + + }, + + fromWorkingColorSpace: function ( color, targetColorSpace ) { + + return this.convert( color, this._workingColorSpace, targetColorSpace ); + + }, + + toWorkingColorSpace: function ( color, sourceColorSpace ) { + + return this.convert( color, sourceColorSpace, this._workingColorSpace ); + + }, + + getPrimaries: function ( colorSpace ) { + + return COLOR_SPACES[ colorSpace ].primaries; + + }, + + getTransfer: function ( colorSpace ) { + + if ( colorSpace === NoColorSpace ) return LinearTransfer; + + return COLOR_SPACES[ colorSpace ].transfer; + + }, + +}; + + +function SRGBToLinear( c ) { + + return ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 ); + +} + +function LinearToSRGB( c ) { + + return ( c < 0.0031308 ) ? c * 12.92 : 1.055 * ( Math.pow( c, 0.41666 ) ) - 0.055; + +} + +let _canvas; + +class ImageUtils { + + static getDataURL( image ) { + + if ( /^data:/i.test( image.src ) ) { + + return image.src; + + } + + if ( typeof HTMLCanvasElement === 'undefined' ) { + + return image.src; + + } + + let canvas; + + if ( image instanceof HTMLCanvasElement ) { + + canvas = image; + + } else { + + if ( _canvas === undefined ) _canvas = createElementNS( 'canvas' ); + + _canvas.width = image.width; + _canvas.height = image.height; + + const context = _canvas.getContext( '2d' ); + + if ( image instanceof ImageData ) { + + context.putImageData( image, 0, 0 ); + + } else { + + context.drawImage( image, 0, 0, image.width, image.height ); + + } + + canvas = _canvas; + + } + + if ( canvas.width > 2048 || canvas.height > 2048 ) { + + console.warn( 'THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons', image ); + + return canvas.toDataURL( 'image/jpeg', 0.6 ); + + } else { + + return canvas.toDataURL( 'image/png' ); + + } + + } + + static sRGBToLinear( image ) { + + if ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) || + ( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) || + ( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) { + + const canvas = createElementNS( 'canvas' ); + + canvas.width = image.width; + canvas.height = image.height; + + const context = canvas.getContext( '2d' ); + context.drawImage( image, 0, 0, image.width, image.height ); + + const imageData = context.getImageData( 0, 0, image.width, image.height ); + const data = imageData.data; + + for ( let i = 0; i < data.length; i ++ ) { + + data[ i ] = SRGBToLinear( data[ i ] / 255 ) * 255; + + } + + context.putImageData( imageData, 0, 0 ); + + return canvas; + + } else if ( image.data ) { + + const data = image.data.slice( 0 ); + + for ( let i = 0; i < data.length; i ++ ) { + + if ( data instanceof Uint8Array || data instanceof Uint8ClampedArray ) { + + data[ i ] = Math.floor( SRGBToLinear( data[ i ] / 255 ) * 255 ); + + } else { + + // assuming float + + data[ i ] = SRGBToLinear( data[ i ] ); + + } + + } + + return { + data: data, + width: image.width, + height: image.height + }; + + } else { + + console.warn( 'THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.' ); + return image; + + } + + } + +} + +let _sourceId = 0; + +class Source { + + constructor( data = null ) { + + this.isSource = true; + + Object.defineProperty( this, 'id', { value: _sourceId ++ } ); + + this.uuid = generateUUID(); + + this.data = data; + this.dataReady = true; + + this.version = 0; + + } + + set needsUpdate( value ) { + + if ( value === true ) this.version ++; + + } + + toJSON( meta ) { + + const isRootObject = ( meta === undefined || typeof meta === 'string' ); + + if ( ! isRootObject && meta.images[ this.uuid ] !== undefined ) { + + return meta.images[ this.uuid ]; + + } + + const output = { + uuid: this.uuid, + url: '' + }; + + const data = this.data; + + if ( data !== null ) { + + let url; + + if ( Array.isArray( data ) ) { + + // cube texture + + url = []; + + for ( let i = 0, l = data.length; i < l; i ++ ) { + + if ( data[ i ].isDataTexture ) { + + url.push( serializeImage( data[ i ].image ) ); + + } else { + + url.push( serializeImage( data[ i ] ) ); + + } + + } + + } else { + + // texture + + url = serializeImage( data ); + + } + + output.url = url; + + } + + if ( ! isRootObject ) { + + meta.images[ this.uuid ] = output; + + } + + return output; + + } + +} + +function serializeImage( image ) { + + if ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) || + ( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) || + ( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) { + + // default images + + return ImageUtils.getDataURL( image ); + + } else { + + if ( image.data ) { + + // images of DataTexture + + return { + data: Array.from( image.data ), + width: image.width, + height: image.height, + type: image.data.constructor.name + }; + + } else { + + console.warn( 'THREE.Texture: Unable to serialize Texture.' ); + return {}; + + } + + } + +} + +let _textureId = 0; + +class Texture extends EventDispatcher { + + constructor( image = Texture.DEFAULT_IMAGE, mapping = Texture.DEFAULT_MAPPING, wrapS = ClampToEdgeWrapping, wrapT = ClampToEdgeWrapping, magFilter = LinearFilter, minFilter = LinearMipmapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = Texture.DEFAULT_ANISOTROPY, colorSpace = NoColorSpace ) { + + super(); + + this.isTexture = true; + + Object.defineProperty( this, 'id', { value: _textureId ++ } ); + + this.uuid = generateUUID(); + + this.name = ''; + + this.source = new Source( image ); + this.mipmaps = []; + + this.mapping = mapping; + this.channel = 0; + + this.wrapS = wrapS; + this.wrapT = wrapT; + + this.magFilter = magFilter; + this.minFilter = minFilter; + + this.anisotropy = anisotropy; + + this.format = format; + this.internalFormat = null; + this.type = type; + + this.offset = new Vector2( 0, 0 ); + this.repeat = new Vector2( 1, 1 ); + this.center = new Vector2( 0, 0 ); + this.rotation = 0; + + this.matrixAutoUpdate = true; + this.matrix = new Matrix3(); + + this.generateMipmaps = true; + this.premultiplyAlpha = false; + this.flipY = true; + this.unpackAlignment = 4; // valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml) + + this.colorSpace = colorSpace; + + this.userData = {}; + + this.version = 0; + this.onUpdate = null; + + this.isRenderTargetTexture = false; // indicates whether a texture belongs to a render target or not + this.pmremVersion = 0; // indicates whether this texture should be processed by PMREMGenerator or not (only relevant for render target textures) + + } + + get image() { + + return this.source.data; + + } + + set image( value = null ) { + + this.source.data = value; + + } + + updateMatrix() { + + this.matrix.setUvTransform( this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( source ) { + + this.name = source.name; + + this.source = source.source; + this.mipmaps = source.mipmaps.slice( 0 ); + + this.mapping = source.mapping; + this.channel = source.channel; + + this.wrapS = source.wrapS; + this.wrapT = source.wrapT; + + this.magFilter = source.magFilter; + this.minFilter = source.minFilter; + + this.anisotropy = source.anisotropy; + + this.format = source.format; + this.internalFormat = source.internalFormat; + this.type = source.type; + + this.offset.copy( source.offset ); + this.repeat.copy( source.repeat ); + this.center.copy( source.center ); + this.rotation = source.rotation; + + this.matrixAutoUpdate = source.matrixAutoUpdate; + this.matrix.copy( source.matrix ); + + this.generateMipmaps = source.generateMipmaps; + this.premultiplyAlpha = source.premultiplyAlpha; + this.flipY = source.flipY; + this.unpackAlignment = source.unpackAlignment; + this.colorSpace = source.colorSpace; + + this.userData = JSON.parse( JSON.stringify( source.userData ) ); + + this.needsUpdate = true; + + return this; + + } + + toJSON( meta ) { + + const isRootObject = ( meta === undefined || typeof meta === 'string' ); + + if ( ! isRootObject && meta.textures[ this.uuid ] !== undefined ) { + + return meta.textures[ this.uuid ]; + + } + + const output = { + + metadata: { + version: 4.6, + type: 'Texture', + generator: 'Texture.toJSON' + }, + + uuid: this.uuid, + name: this.name, + + image: this.source.toJSON( meta ).uuid, + + mapping: this.mapping, + channel: this.channel, + + repeat: [ this.repeat.x, this.repeat.y ], + offset: [ this.offset.x, this.offset.y ], + center: [ this.center.x, this.center.y ], + rotation: this.rotation, + + wrap: [ this.wrapS, this.wrapT ], + + format: this.format, + internalFormat: this.internalFormat, + type: this.type, + colorSpace: this.colorSpace, + + minFilter: this.minFilter, + magFilter: this.magFilter, + anisotropy: this.anisotropy, + + flipY: this.flipY, + + generateMipmaps: this.generateMipmaps, + premultiplyAlpha: this.premultiplyAlpha, + unpackAlignment: this.unpackAlignment + + }; + + if ( Object.keys( this.userData ).length > 0 ) output.userData = this.userData; + + if ( ! isRootObject ) { + + meta.textures[ this.uuid ] = output; + + } + + return output; + + } + + dispose() { + + this.dispatchEvent( { type: 'dispose' } ); + + } + + transformUv( uv ) { + + if ( this.mapping !== UVMapping ) return uv; + + uv.applyMatrix3( this.matrix ); + + if ( uv.x < 0 || uv.x > 1 ) { + + switch ( this.wrapS ) { + + case RepeatWrapping: + + uv.x = uv.x - Math.floor( uv.x ); + break; + + case ClampToEdgeWrapping: + + uv.x = uv.x < 0 ? 0 : 1; + break; + + case MirroredRepeatWrapping: + + if ( Math.abs( Math.floor( uv.x ) % 2 ) === 1 ) { + + uv.x = Math.ceil( uv.x ) - uv.x; + + } else { + + uv.x = uv.x - Math.floor( uv.x ); + + } + + break; + + } + + } + + if ( uv.y < 0 || uv.y > 1 ) { + + switch ( this.wrapT ) { + + case RepeatWrapping: + + uv.y = uv.y - Math.floor( uv.y ); + break; + + case ClampToEdgeWrapping: + + uv.y = uv.y < 0 ? 0 : 1; + break; + + case MirroredRepeatWrapping: + + if ( Math.abs( Math.floor( uv.y ) % 2 ) === 1 ) { + + uv.y = Math.ceil( uv.y ) - uv.y; + + } else { + + uv.y = uv.y - Math.floor( uv.y ); + + } + + break; + + } + + } + + if ( this.flipY ) { + + uv.y = 1 - uv.y; + + } + + return uv; + + } + + set needsUpdate( value ) { + + if ( value === true ) { + + this.version ++; + this.source.needsUpdate = true; + + } + + } + + set needsPMREMUpdate( value ) { + + if ( value === true ) { + + this.pmremVersion ++; + + } + + } + +} + +Texture.DEFAULT_IMAGE = null; +Texture.DEFAULT_MAPPING = UVMapping; +Texture.DEFAULT_ANISOTROPY = 1; + +class Vector4 { + + constructor( x = 0, y = 0, z = 0, w = 1 ) { + + Vector4.prototype.isVector4 = true; + + this.x = x; + this.y = y; + this.z = z; + this.w = w; + + } + + get width() { + + return this.z; + + } + + set width( value ) { + + this.z = value; + + } + + get height() { + + return this.w; + + } + + set height( value ) { + + this.w = value; + + } + + set( x, y, z, w ) { + + this.x = x; + this.y = y; + this.z = z; + this.w = w; + + return this; + + } + + setScalar( scalar ) { + + this.x = scalar; + this.y = scalar; + this.z = scalar; + this.w = scalar; + + return this; + + } + + setX( x ) { + + this.x = x; + + return this; + + } + + setY( y ) { + + this.y = y; + + return this; + + } + + setZ( z ) { + + this.z = z; + + return this; + + } + + setW( w ) { + + this.w = w; + + return this; + + } + + setComponent( index, value ) { + + switch ( index ) { + + case 0: this.x = value; break; + case 1: this.y = value; break; + case 2: this.z = value; break; + case 3: this.w = value; break; + default: throw new Error( 'index is out of range: ' + index ); + + } + + return this; + + } + + getComponent( index ) { + + switch ( index ) { + + case 0: return this.x; + case 1: return this.y; + case 2: return this.z; + case 3: return this.w; + default: throw new Error( 'index is out of range: ' + index ); + + } + + } + + clone() { + + return new this.constructor( this.x, this.y, this.z, this.w ); + + } + + copy( v ) { + + this.x = v.x; + this.y = v.y; + this.z = v.z; + this.w = ( v.w !== undefined ) ? v.w : 1; + + return this; + + } + + add( v ) { + + this.x += v.x; + this.y += v.y; + this.z += v.z; + this.w += v.w; + + return this; + + } + + addScalar( s ) { + + this.x += s; + this.y += s; + this.z += s; + this.w += s; + + return this; + + } + + addVectors( a, b ) { + + this.x = a.x + b.x; + this.y = a.y + b.y; + this.z = a.z + b.z; + this.w = a.w + b.w; + + return this; + + } + + addScaledVector( v, s ) { + + this.x += v.x * s; + this.y += v.y * s; + this.z += v.z * s; + this.w += v.w * s; + + return this; + + } + + sub( v ) { + + this.x -= v.x; + this.y -= v.y; + this.z -= v.z; + this.w -= v.w; + + return this; + + } + + subScalar( s ) { + + this.x -= s; + this.y -= s; + this.z -= s; + this.w -= s; + + return this; + + } + + subVectors( a, b ) { + + this.x = a.x - b.x; + this.y = a.y - b.y; + this.z = a.z - b.z; + this.w = a.w - b.w; + + return this; + + } + + multiply( v ) { + + this.x *= v.x; + this.y *= v.y; + this.z *= v.z; + this.w *= v.w; + + return this; + + } + + multiplyScalar( scalar ) { + + this.x *= scalar; + this.y *= scalar; + this.z *= scalar; + this.w *= scalar; + + return this; + + } + + applyMatrix4( m ) { + + const x = this.x, y = this.y, z = this.z, w = this.w; + const e = m.elements; + + this.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] * w; + this.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] * w; + this.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] * w; + this.w = e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] * w; + + return this; + + } + + divideScalar( scalar ) { + + return this.multiplyScalar( 1 / scalar ); + + } + + setAxisAngleFromQuaternion( q ) { + + // http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm + + // q is assumed to be normalized + + this.w = 2 * Math.acos( q.w ); + + const s = Math.sqrt( 1 - q.w * q.w ); + + if ( s < 0.0001 ) { + + this.x = 1; + this.y = 0; + this.z = 0; + + } else { + + this.x = q.x / s; + this.y = q.y / s; + this.z = q.z / s; + + } + + return this; + + } + + setAxisAngleFromRotationMatrix( m ) { + + // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/index.htm + + // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) + + let angle, x, y, z; // variables for result + const epsilon = 0.01, // margin to allow for rounding errors + epsilon2 = 0.1, // margin to distinguish between 0 and 180 degrees + + te = m.elements, + + m11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ], + m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ], + m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ]; + + if ( ( Math.abs( m12 - m21 ) < epsilon ) && + ( Math.abs( m13 - m31 ) < epsilon ) && + ( Math.abs( m23 - m32 ) < epsilon ) ) { + + // singularity found + // first check for identity matrix which must have +1 for all terms + // in leading diagonal and zero in other terms + + if ( ( Math.abs( m12 + m21 ) < epsilon2 ) && + ( Math.abs( m13 + m31 ) < epsilon2 ) && + ( Math.abs( m23 + m32 ) < epsilon2 ) && + ( Math.abs( m11 + m22 + m33 - 3 ) < epsilon2 ) ) { + + // this singularity is identity matrix so angle = 0 + + this.set( 1, 0, 0, 0 ); + + return this; // zero angle, arbitrary axis + + } + + // otherwise this singularity is angle = 180 + + angle = Math.PI; + + const xx = ( m11 + 1 ) / 2; + const yy = ( m22 + 1 ) / 2; + const zz = ( m33 + 1 ) / 2; + const xy = ( m12 + m21 ) / 4; + const xz = ( m13 + m31 ) / 4; + const yz = ( m23 + m32 ) / 4; + + if ( ( xx > yy ) && ( xx > zz ) ) { + + // m11 is the largest diagonal term + + if ( xx < epsilon ) { + + x = 0; + y = 0.707106781; + z = 0.707106781; + + } else { + + x = Math.sqrt( xx ); + y = xy / x; + z = xz / x; + + } + + } else if ( yy > zz ) { + + // m22 is the largest diagonal term + + if ( yy < epsilon ) { + + x = 0.707106781; + y = 0; + z = 0.707106781; + + } else { + + y = Math.sqrt( yy ); + x = xy / y; + z = yz / y; + + } + + } else { + + // m33 is the largest diagonal term so base result on this + + if ( zz < epsilon ) { + + x = 0.707106781; + y = 0.707106781; + z = 0; + + } else { + + z = Math.sqrt( zz ); + x = xz / z; + y = yz / z; + + } + + } + + this.set( x, y, z, angle ); + + return this; // return 180 deg rotation + + } + + // as we have reached here there are no singularities so we can handle normally + + let s = Math.sqrt( ( m32 - m23 ) * ( m32 - m23 ) + + ( m13 - m31 ) * ( m13 - m31 ) + + ( m21 - m12 ) * ( m21 - m12 ) ); // used to normalize + + if ( Math.abs( s ) < 0.001 ) s = 1; + + // prevent divide by zero, should not happen if matrix is orthogonal and should be + // caught by singularity test above, but I've left it in just in case + + this.x = ( m32 - m23 ) / s; + this.y = ( m13 - m31 ) / s; + this.z = ( m21 - m12 ) / s; + this.w = Math.acos( ( m11 + m22 + m33 - 1 ) / 2 ); + + return this; + + } + + min( v ) { + + this.x = Math.min( this.x, v.x ); + this.y = Math.min( this.y, v.y ); + this.z = Math.min( this.z, v.z ); + this.w = Math.min( this.w, v.w ); + + return this; + + } + + max( v ) { + + this.x = Math.max( this.x, v.x ); + this.y = Math.max( this.y, v.y ); + this.z = Math.max( this.z, v.z ); + this.w = Math.max( this.w, v.w ); + + return this; + + } + + clamp( min, max ) { + + // assumes min < max, componentwise + + this.x = Math.max( min.x, Math.min( max.x, this.x ) ); + this.y = Math.max( min.y, Math.min( max.y, this.y ) ); + this.z = Math.max( min.z, Math.min( max.z, this.z ) ); + this.w = Math.max( min.w, Math.min( max.w, this.w ) ); + + return this; + + } + + clampScalar( minVal, maxVal ) { + + this.x = Math.max( minVal, Math.min( maxVal, this.x ) ); + this.y = Math.max( minVal, Math.min( maxVal, this.y ) ); + this.z = Math.max( minVal, Math.min( maxVal, this.z ) ); + this.w = Math.max( minVal, Math.min( maxVal, this.w ) ); + + return this; + + } + + clampLength( min, max ) { + + const length = this.length(); + + return this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) ); + + } + + floor() { + + this.x = Math.floor( this.x ); + this.y = Math.floor( this.y ); + this.z = Math.floor( this.z ); + this.w = Math.floor( this.w ); + + return this; + + } + + ceil() { + + this.x = Math.ceil( this.x ); + this.y = Math.ceil( this.y ); + this.z = Math.ceil( this.z ); + this.w = Math.ceil( this.w ); + + return this; + + } + + round() { + + this.x = Math.round( this.x ); + this.y = Math.round( this.y ); + this.z = Math.round( this.z ); + this.w = Math.round( this.w ); + + return this; + + } + + roundToZero() { + + this.x = Math.trunc( this.x ); + this.y = Math.trunc( this.y ); + this.z = Math.trunc( this.z ); + this.w = Math.trunc( this.w ); + + return this; + + } + + negate() { + + this.x = - this.x; + this.y = - this.y; + this.z = - this.z; + this.w = - this.w; + + return this; + + } + + dot( v ) { + + return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w; + + } + + lengthSq() { + + return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w; + + } + + length() { + + return Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w ); + + } + + manhattanLength() { + + return Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z ) + Math.abs( this.w ); + + } + + normalize() { + + return this.divideScalar( this.length() || 1 ); + + } + + setLength( length ) { + + return this.normalize().multiplyScalar( length ); + + } + + lerp( v, alpha ) { + + this.x += ( v.x - this.x ) * alpha; + this.y += ( v.y - this.y ) * alpha; + this.z += ( v.z - this.z ) * alpha; + this.w += ( v.w - this.w ) * alpha; + + return this; + + } + + lerpVectors( v1, v2, alpha ) { + + this.x = v1.x + ( v2.x - v1.x ) * alpha; + this.y = v1.y + ( v2.y - v1.y ) * alpha; + this.z = v1.z + ( v2.z - v1.z ) * alpha; + this.w = v1.w + ( v2.w - v1.w ) * alpha; + + return this; + + } + + equals( v ) { + + return ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) && ( v.w === this.w ) ); + + } + + fromArray( array, offset = 0 ) { + + this.x = array[ offset ]; + this.y = array[ offset + 1 ]; + this.z = array[ offset + 2 ]; + this.w = array[ offset + 3 ]; + + return this; + + } + + toArray( array = [], offset = 0 ) { + + array[ offset ] = this.x; + array[ offset + 1 ] = this.y; + array[ offset + 2 ] = this.z; + array[ offset + 3 ] = this.w; + + return array; + + } + + fromBufferAttribute( attribute, index ) { + + this.x = attribute.getX( index ); + this.y = attribute.getY( index ); + this.z = attribute.getZ( index ); + this.w = attribute.getW( index ); + + return this; + + } + + random() { + + this.x = Math.random(); + this.y = Math.random(); + this.z = Math.random(); + this.w = Math.random(); + + return this; + + } + + *[ Symbol.iterator ]() { + + yield this.x; + yield this.y; + yield this.z; + yield this.w; + + } + +} + +/* + In options, we can specify: + * Texture parameters for an auto-generated target texture + * depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers +*/ +class RenderTarget extends EventDispatcher { + + constructor( width = 1, height = 1, options = {} ) { + + super(); + + this.isRenderTarget = true; + + this.width = width; + this.height = height; + this.depth = 1; + + this.scissor = new Vector4( 0, 0, width, height ); + this.scissorTest = false; + + this.viewport = new Vector4( 0, 0, width, height ); + + const image = { width: width, height: height, depth: 1 }; + + options = Object.assign( { + generateMipmaps: false, + internalFormat: null, + minFilter: LinearFilter, + depthBuffer: true, + stencilBuffer: false, + resolveDepthBuffer: true, + resolveStencilBuffer: true, + depthTexture: null, + samples: 0, + count: 1 + }, options ); + + const texture = new Texture( image, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace ); + + texture.flipY = false; + texture.generateMipmaps = options.generateMipmaps; + texture.internalFormat = options.internalFormat; + + this.textures = []; + + const count = options.count; + for ( let i = 0; i < count; i ++ ) { + + this.textures[ i ] = texture.clone(); + this.textures[ i ].isRenderTargetTexture = true; + + } + + this.depthBuffer = options.depthBuffer; + this.stencilBuffer = options.stencilBuffer; + + this.resolveDepthBuffer = options.resolveDepthBuffer; + this.resolveStencilBuffer = options.resolveStencilBuffer; + + this.depthTexture = options.depthTexture; + + this.samples = options.samples; + + } + + get texture() { + + return this.textures[ 0 ]; + + } + + set texture( value ) { + + this.textures[ 0 ] = value; + + } + + setSize( width, height, depth = 1 ) { + + if ( this.width !== width || this.height !== height || this.depth !== depth ) { + + this.width = width; + this.height = height; + this.depth = depth; + + for ( let i = 0, il = this.textures.length; i < il; i ++ ) { + + this.textures[ i ].image.width = width; + this.textures[ i ].image.height = height; + this.textures[ i ].image.depth = depth; + + } + + this.dispose(); + + } + + this.viewport.set( 0, 0, width, height ); + this.scissor.set( 0, 0, width, height ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( source ) { + + this.width = source.width; + this.height = source.height; + this.depth = source.depth; + + this.scissor.copy( source.scissor ); + this.scissorTest = source.scissorTest; + + this.viewport.copy( source.viewport ); + + this.textures.length = 0; + + for ( let i = 0, il = source.textures.length; i < il; i ++ ) { + + this.textures[ i ] = source.textures[ i ].clone(); + this.textures[ i ].isRenderTargetTexture = true; + + } + + // ensure image object is not shared, see #20328 + + const image = Object.assign( {}, source.texture.image ); + this.texture.source = new Source( image ); + + this.depthBuffer = source.depthBuffer; + this.stencilBuffer = source.stencilBuffer; + + this.resolveDepthBuffer = source.resolveDepthBuffer; + this.resolveStencilBuffer = source.resolveStencilBuffer; + + if ( source.depthTexture !== null ) this.depthTexture = source.depthTexture.clone(); + + this.samples = source.samples; + + return this; + + } + + dispose() { + + this.dispatchEvent( { type: 'dispose' } ); + + } + +} + +class WebGLRenderTarget extends RenderTarget { + + constructor( width = 1, height = 1, options = {} ) { + + super( width, height, options ); + + this.isWebGLRenderTarget = true; + + } + +} + +class DataArrayTexture extends Texture { + + constructor( data = null, width = 1, height = 1, depth = 1 ) { + + super( null ); + + this.isDataArrayTexture = true; + + this.image = { data, width, height, depth }; + + this.magFilter = NearestFilter; + this.minFilter = NearestFilter; + + this.wrapR = ClampToEdgeWrapping; + + this.generateMipmaps = false; + this.flipY = false; + this.unpackAlignment = 1; + + } + +} + +class WebGLArrayRenderTarget extends WebGLRenderTarget { + + constructor( width = 1, height = 1, depth = 1, options = {} ) { + + super( width, height, options ); + + this.isWebGLArrayRenderTarget = true; + + this.depth = depth; + + this.texture = new DataArrayTexture( null, width, height, depth ); + + this.texture.isRenderTargetTexture = true; + + } + +} + +class Data3DTexture extends Texture { + + constructor( data = null, width = 1, height = 1, depth = 1 ) { + + // We're going to add .setXXX() methods for setting properties later. + // Users can still set in DataTexture3D directly. + // + // const texture = new THREE.DataTexture3D( data, width, height, depth ); + // texture.anisotropy = 16; + // + // See #14839 + + super( null ); + + this.isData3DTexture = true; + + this.image = { data, width, height, depth }; + + this.magFilter = NearestFilter; + this.minFilter = NearestFilter; + + this.wrapR = ClampToEdgeWrapping; + + this.generateMipmaps = false; + this.flipY = false; + this.unpackAlignment = 1; + + } + +} + +class WebGL3DRenderTarget extends WebGLRenderTarget { + + constructor( width = 1, height = 1, depth = 1, options = {} ) { + + super( width, height, options ); + + this.isWebGL3DRenderTarget = true; + + this.depth = depth; + + this.texture = new Data3DTexture( null, width, height, depth ); + + this.texture.isRenderTargetTexture = true; + + } + +} + +class Quaternion { + + constructor( x = 0, y = 0, z = 0, w = 1 ) { + + this.isQuaternion = true; + + this._x = x; + this._y = y; + this._z = z; + this._w = w; + + } + + static slerpFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t ) { + + // fuzz-free, array-based Quaternion SLERP operation + + let x0 = src0[ srcOffset0 + 0 ], + y0 = src0[ srcOffset0 + 1 ], + z0 = src0[ srcOffset0 + 2 ], + w0 = src0[ srcOffset0 + 3 ]; + + const x1 = src1[ srcOffset1 + 0 ], + y1 = src1[ srcOffset1 + 1 ], + z1 = src1[ srcOffset1 + 2 ], + w1 = src1[ srcOffset1 + 3 ]; + + if ( t === 0 ) { + + dst[ dstOffset + 0 ] = x0; + dst[ dstOffset + 1 ] = y0; + dst[ dstOffset + 2 ] = z0; + dst[ dstOffset + 3 ] = w0; + return; + + } + + if ( t === 1 ) { + + dst[ dstOffset + 0 ] = x1; + dst[ dstOffset + 1 ] = y1; + dst[ dstOffset + 2 ] = z1; + dst[ dstOffset + 3 ] = w1; + return; + + } + + if ( w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1 ) { + + let s = 1 - t; + const cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1, + dir = ( cos >= 0 ? 1 : - 1 ), + sqrSin = 1 - cos * cos; + + // Skip the Slerp for tiny steps to avoid numeric problems: + if ( sqrSin > Number.EPSILON ) { + + const sin = Math.sqrt( sqrSin ), + len = Math.atan2( sin, cos * dir ); + + s = Math.sin( s * len ) / sin; + t = Math.sin( t * len ) / sin; + + } + + const tDir = t * dir; + + x0 = x0 * s + x1 * tDir; + y0 = y0 * s + y1 * tDir; + z0 = z0 * s + z1 * tDir; + w0 = w0 * s + w1 * tDir; + + // Normalize in case we just did a lerp: + if ( s === 1 - t ) { + + const f = 1 / Math.sqrt( x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0 ); + + x0 *= f; + y0 *= f; + z0 *= f; + w0 *= f; + + } + + } + + dst[ dstOffset ] = x0; + dst[ dstOffset + 1 ] = y0; + dst[ dstOffset + 2 ] = z0; + dst[ dstOffset + 3 ] = w0; + + } + + static multiplyQuaternionsFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1 ) { + + const x0 = src0[ srcOffset0 ]; + const y0 = src0[ srcOffset0 + 1 ]; + const z0 = src0[ srcOffset0 + 2 ]; + const w0 = src0[ srcOffset0 + 3 ]; + + const x1 = src1[ srcOffset1 ]; + const y1 = src1[ srcOffset1 + 1 ]; + const z1 = src1[ srcOffset1 + 2 ]; + const w1 = src1[ srcOffset1 + 3 ]; + + dst[ dstOffset ] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1; + dst[ dstOffset + 1 ] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1; + dst[ dstOffset + 2 ] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1; + dst[ dstOffset + 3 ] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1; + + return dst; + + } + + get x() { + + return this._x; + + } + + set x( value ) { + + this._x = value; + this._onChangeCallback(); + + } + + get y() { + + return this._y; + + } + + set y( value ) { + + this._y = value; + this._onChangeCallback(); + + } + + get z() { + + return this._z; + + } + + set z( value ) { + + this._z = value; + this._onChangeCallback(); + + } + + get w() { + + return this._w; + + } + + set w( value ) { + + this._w = value; + this._onChangeCallback(); + + } + + set( x, y, z, w ) { + + this._x = x; + this._y = y; + this._z = z; + this._w = w; + + this._onChangeCallback(); + + return this; + + } + + clone() { + + return new this.constructor( this._x, this._y, this._z, this._w ); + + } + + copy( quaternion ) { + + this._x = quaternion.x; + this._y = quaternion.y; + this._z = quaternion.z; + this._w = quaternion.w; + + this._onChangeCallback(); + + return this; + + } + + setFromEuler( euler, update = true ) { + + const x = euler._x, y = euler._y, z = euler._z, order = euler._order; + + // http://www.mathworks.com/matlabcentral/fileexchange/ + // 20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/ + // content/SpinCalc.m + + const cos = Math.cos; + const sin = Math.sin; + + const c1 = cos( x / 2 ); + const c2 = cos( y / 2 ); + const c3 = cos( z / 2 ); + + const s1 = sin( x / 2 ); + const s2 = sin( y / 2 ); + const s3 = sin( z / 2 ); + + switch ( order ) { + + case 'XYZ': + this._x = s1 * c2 * c3 + c1 * s2 * s3; + this._y = c1 * s2 * c3 - s1 * c2 * s3; + this._z = c1 * c2 * s3 + s1 * s2 * c3; + this._w = c1 * c2 * c3 - s1 * s2 * s3; + break; + + case 'YXZ': + this._x = s1 * c2 * c3 + c1 * s2 * s3; + this._y = c1 * s2 * c3 - s1 * c2 * s3; + this._z = c1 * c2 * s3 - s1 * s2 * c3; + this._w = c1 * c2 * c3 + s1 * s2 * s3; + break; + + case 'ZXY': + this._x = s1 * c2 * c3 - c1 * s2 * s3; + this._y = c1 * s2 * c3 + s1 * c2 * s3; + this._z = c1 * c2 * s3 + s1 * s2 * c3; + this._w = c1 * c2 * c3 - s1 * s2 * s3; + break; + + case 'ZYX': + this._x = s1 * c2 * c3 - c1 * s2 * s3; + this._y = c1 * s2 * c3 + s1 * c2 * s3; + this._z = c1 * c2 * s3 - s1 * s2 * c3; + this._w = c1 * c2 * c3 + s1 * s2 * s3; + break; + + case 'YZX': + this._x = s1 * c2 * c3 + c1 * s2 * s3; + this._y = c1 * s2 * c3 + s1 * c2 * s3; + this._z = c1 * c2 * s3 - s1 * s2 * c3; + this._w = c1 * c2 * c3 - s1 * s2 * s3; + break; + + case 'XZY': + this._x = s1 * c2 * c3 - c1 * s2 * s3; + this._y = c1 * s2 * c3 - s1 * c2 * s3; + this._z = c1 * c2 * s3 + s1 * s2 * c3; + this._w = c1 * c2 * c3 + s1 * s2 * s3; + break; + + default: + console.warn( 'THREE.Quaternion: .setFromEuler() encountered an unknown order: ' + order ); + + } + + if ( update === true ) this._onChangeCallback(); + + return this; + + } + + setFromAxisAngle( axis, angle ) { + + // http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm + + // assumes axis is normalized + + const halfAngle = angle / 2, s = Math.sin( halfAngle ); + + this._x = axis.x * s; + this._y = axis.y * s; + this._z = axis.z * s; + this._w = Math.cos( halfAngle ); + + this._onChangeCallback(); + + return this; + + } + + setFromRotationMatrix( m ) { + + // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm + + // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) + + const te = m.elements, + + m11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ], + m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ], + m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ], + + trace = m11 + m22 + m33; + + if ( trace > 0 ) { + + const s = 0.5 / Math.sqrt( trace + 1.0 ); + + this._w = 0.25 / s; + this._x = ( m32 - m23 ) * s; + this._y = ( m13 - m31 ) * s; + this._z = ( m21 - m12 ) * s; + + } else if ( m11 > m22 && m11 > m33 ) { + + const s = 2.0 * Math.sqrt( 1.0 + m11 - m22 - m33 ); + + this._w = ( m32 - m23 ) / s; + this._x = 0.25 * s; + this._y = ( m12 + m21 ) / s; + this._z = ( m13 + m31 ) / s; + + } else if ( m22 > m33 ) { + + const s = 2.0 * Math.sqrt( 1.0 + m22 - m11 - m33 ); + + this._w = ( m13 - m31 ) / s; + this._x = ( m12 + m21 ) / s; + this._y = 0.25 * s; + this._z = ( m23 + m32 ) / s; + + } else { + + const s = 2.0 * Math.sqrt( 1.0 + m33 - m11 - m22 ); + + this._w = ( m21 - m12 ) / s; + this._x = ( m13 + m31 ) / s; + this._y = ( m23 + m32 ) / s; + this._z = 0.25 * s; + + } + + this._onChangeCallback(); + + return this; + + } + + setFromUnitVectors( vFrom, vTo ) { + + // assumes direction vectors vFrom and vTo are normalized + + let r = vFrom.dot( vTo ) + 1; + + if ( r < Number.EPSILON ) { + + // vFrom and vTo point in opposite directions + + r = 0; + + if ( Math.abs( vFrom.x ) > Math.abs( vFrom.z ) ) { + + this._x = - vFrom.y; + this._y = vFrom.x; + this._z = 0; + this._w = r; + + } else { + + this._x = 0; + this._y = - vFrom.z; + this._z = vFrom.y; + this._w = r; + + } + + } else { + + // crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3 + + this._x = vFrom.y * vTo.z - vFrom.z * vTo.y; + this._y = vFrom.z * vTo.x - vFrom.x * vTo.z; + this._z = vFrom.x * vTo.y - vFrom.y * vTo.x; + this._w = r; + + } + + return this.normalize(); + + } + + angleTo( q ) { + + return 2 * Math.acos( Math.abs( clamp( this.dot( q ), - 1, 1 ) ) ); + + } + + rotateTowards( q, step ) { + + const angle = this.angleTo( q ); + + if ( angle === 0 ) return this; + + const t = Math.min( 1, step / angle ); + + this.slerp( q, t ); + + return this; + + } + + identity() { + + return this.set( 0, 0, 0, 1 ); + + } + + invert() { + + // quaternion is assumed to have unit length + + return this.conjugate(); + + } + + conjugate() { + + this._x *= - 1; + this._y *= - 1; + this._z *= - 1; + + this._onChangeCallback(); + + return this; + + } + + dot( v ) { + + return this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w; + + } + + lengthSq() { + + return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w; + + } + + length() { + + return Math.sqrt( this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w ); + + } + + normalize() { + + let l = this.length(); + + if ( l === 0 ) { + + this._x = 0; + this._y = 0; + this._z = 0; + this._w = 1; + + } else { + + l = 1 / l; + + this._x = this._x * l; + this._y = this._y * l; + this._z = this._z * l; + this._w = this._w * l; + + } + + this._onChangeCallback(); + + return this; + + } + + multiply( q ) { + + return this.multiplyQuaternions( this, q ); + + } + + premultiply( q ) { + + return this.multiplyQuaternions( q, this ); + + } + + multiplyQuaternions( a, b ) { + + // from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm + + const qax = a._x, qay = a._y, qaz = a._z, qaw = a._w; + const qbx = b._x, qby = b._y, qbz = b._z, qbw = b._w; + + this._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby; + this._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz; + this._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx; + this._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz; + + this._onChangeCallback(); + + return this; + + } + + slerp( qb, t ) { + + if ( t === 0 ) return this; + if ( t === 1 ) return this.copy( qb ); + + const x = this._x, y = this._y, z = this._z, w = this._w; + + // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/ + + let cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z; + + if ( cosHalfTheta < 0 ) { + + this._w = - qb._w; + this._x = - qb._x; + this._y = - qb._y; + this._z = - qb._z; + + cosHalfTheta = - cosHalfTheta; + + } else { + + this.copy( qb ); + + } + + if ( cosHalfTheta >= 1.0 ) { + + this._w = w; + this._x = x; + this._y = y; + this._z = z; + + return this; + + } + + const sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta; + + if ( sqrSinHalfTheta <= Number.EPSILON ) { + + const s = 1 - t; + this._w = s * w + t * this._w; + this._x = s * x + t * this._x; + this._y = s * y + t * this._y; + this._z = s * z + t * this._z; + + this.normalize(); // normalize calls _onChangeCallback() + + return this; + + } + + const sinHalfTheta = Math.sqrt( sqrSinHalfTheta ); + const halfTheta = Math.atan2( sinHalfTheta, cosHalfTheta ); + const ratioA = Math.sin( ( 1 - t ) * halfTheta ) / sinHalfTheta, + ratioB = Math.sin( t * halfTheta ) / sinHalfTheta; + + this._w = ( w * ratioA + this._w * ratioB ); + this._x = ( x * ratioA + this._x * ratioB ); + this._y = ( y * ratioA + this._y * ratioB ); + this._z = ( z * ratioA + this._z * ratioB ); + + this._onChangeCallback(); + + return this; + + } + + slerpQuaternions( qa, qb, t ) { + + return this.copy( qa ).slerp( qb, t ); + + } + + random() { + + // sets this quaternion to a uniform random unit quaternnion + + // Ken Shoemake + // Uniform random rotations + // D. Kirk, editor, Graphics Gems III, pages 124-132. Academic Press, New York, 1992. + + const theta1 = 2 * Math.PI * Math.random(); + const theta2 = 2 * Math.PI * Math.random(); + + const x0 = Math.random(); + const r1 = Math.sqrt( 1 - x0 ); + const r2 = Math.sqrt( x0 ); + + return this.set( + r1 * Math.sin( theta1 ), + r1 * Math.cos( theta1 ), + r2 * Math.sin( theta2 ), + r2 * Math.cos( theta2 ), + ); + + } + + equals( quaternion ) { + + return ( quaternion._x === this._x ) && ( quaternion._y === this._y ) && ( quaternion._z === this._z ) && ( quaternion._w === this._w ); + + } + + fromArray( array, offset = 0 ) { + + this._x = array[ offset ]; + this._y = array[ offset + 1 ]; + this._z = array[ offset + 2 ]; + this._w = array[ offset + 3 ]; + + this._onChangeCallback(); + + return this; + + } + + toArray( array = [], offset = 0 ) { + + array[ offset ] = this._x; + array[ offset + 1 ] = this._y; + array[ offset + 2 ] = this._z; + array[ offset + 3 ] = this._w; + + return array; + + } + + fromBufferAttribute( attribute, index ) { + + this._x = attribute.getX( index ); + this._y = attribute.getY( index ); + this._z = attribute.getZ( index ); + this._w = attribute.getW( index ); + + this._onChangeCallback(); + + return this; + + } + + toJSON() { + + return this.toArray(); + + } + + _onChange( callback ) { + + this._onChangeCallback = callback; + + return this; + + } + + _onChangeCallback() {} + + *[ Symbol.iterator ]() { + + yield this._x; + yield this._y; + yield this._z; + yield this._w; + + } + +} + +class Vector3 { + + constructor( x = 0, y = 0, z = 0 ) { + + Vector3.prototype.isVector3 = true; + + this.x = x; + this.y = y; + this.z = z; + + } + + set( x, y, z ) { + + if ( z === undefined ) z = this.z; // sprite.scale.set(x,y) + + this.x = x; + this.y = y; + this.z = z; + + return this; + + } + + setScalar( scalar ) { + + this.x = scalar; + this.y = scalar; + this.z = scalar; + + return this; + + } + + setX( x ) { + + this.x = x; + + return this; + + } + + setY( y ) { + + this.y = y; + + return this; + + } + + setZ( z ) { + + this.z = z; + + return this; + + } + + setComponent( index, value ) { + + switch ( index ) { + + case 0: this.x = value; break; + case 1: this.y = value; break; + case 2: this.z = value; break; + default: throw new Error( 'index is out of range: ' + index ); + + } + + return this; + + } + + getComponent( index ) { + + switch ( index ) { + + case 0: return this.x; + case 1: return this.y; + case 2: return this.z; + default: throw new Error( 'index is out of range: ' + index ); + + } + + } + + clone() { + + return new this.constructor( this.x, this.y, this.z ); + + } + + copy( v ) { + + this.x = v.x; + this.y = v.y; + this.z = v.z; + + return this; + + } + + add( v ) { + + this.x += v.x; + this.y += v.y; + this.z += v.z; + + return this; + + } + + addScalar( s ) { + + this.x += s; + this.y += s; + this.z += s; + + return this; + + } + + addVectors( a, b ) { + + this.x = a.x + b.x; + this.y = a.y + b.y; + this.z = a.z + b.z; + + return this; + + } + + addScaledVector( v, s ) { + + this.x += v.x * s; + this.y += v.y * s; + this.z += v.z * s; + + return this; + + } + + sub( v ) { + + this.x -= v.x; + this.y -= v.y; + this.z -= v.z; + + return this; + + } + + subScalar( s ) { + + this.x -= s; + this.y -= s; + this.z -= s; + + return this; + + } + + subVectors( a, b ) { + + this.x = a.x - b.x; + this.y = a.y - b.y; + this.z = a.z - b.z; + + return this; + + } + + multiply( v ) { + + this.x *= v.x; + this.y *= v.y; + this.z *= v.z; + + return this; + + } + + multiplyScalar( scalar ) { + + this.x *= scalar; + this.y *= scalar; + this.z *= scalar; + + return this; + + } + + multiplyVectors( a, b ) { + + this.x = a.x * b.x; + this.y = a.y * b.y; + this.z = a.z * b.z; + + return this; + + } + + applyEuler( euler ) { + + return this.applyQuaternion( _quaternion$4.setFromEuler( euler ) ); + + } + + applyAxisAngle( axis, angle ) { + + return this.applyQuaternion( _quaternion$4.setFromAxisAngle( axis, angle ) ); + + } + + applyMatrix3( m ) { + + const x = this.x, y = this.y, z = this.z; + const e = m.elements; + + this.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ] * z; + this.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ] * z; + this.z = e[ 2 ] * x + e[ 5 ] * y + e[ 8 ] * z; + + return this; + + } + + applyNormalMatrix( m ) { + + return this.applyMatrix3( m ).normalize(); + + } + + applyMatrix4( m ) { + + const x = this.x, y = this.y, z = this.z; + const e = m.elements; + + const w = 1 / ( e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] ); + + this.x = ( e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] ) * w; + this.y = ( e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] ) * w; + this.z = ( e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] ) * w; + + return this; + + } + + applyQuaternion( q ) { + + // quaternion q is assumed to have unit length + + const vx = this.x, vy = this.y, vz = this.z; + const qx = q.x, qy = q.y, qz = q.z, qw = q.w; + + // t = 2 * cross( q.xyz, v ); + const tx = 2 * ( qy * vz - qz * vy ); + const ty = 2 * ( qz * vx - qx * vz ); + const tz = 2 * ( qx * vy - qy * vx ); + + // v + q.w * t + cross( q.xyz, t ); + this.x = vx + qw * tx + qy * tz - qz * ty; + this.y = vy + qw * ty + qz * tx - qx * tz; + this.z = vz + qw * tz + qx * ty - qy * tx; + + return this; + + } + + project( camera ) { + + return this.applyMatrix4( camera.matrixWorldInverse ).applyMatrix4( camera.projectionMatrix ); + + } + + unproject( camera ) { + + return this.applyMatrix4( camera.projectionMatrixInverse ).applyMatrix4( camera.matrixWorld ); + + } + + transformDirection( m ) { + + // input: THREE.Matrix4 affine matrix + // vector interpreted as a direction + + const x = this.x, y = this.y, z = this.z; + const e = m.elements; + + this.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z; + this.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z; + this.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z; + + return this.normalize(); + + } + + divide( v ) { + + this.x /= v.x; + this.y /= v.y; + this.z /= v.z; + + return this; + + } + + divideScalar( scalar ) { + + return this.multiplyScalar( 1 / scalar ); + + } + + min( v ) { + + this.x = Math.min( this.x, v.x ); + this.y = Math.min( this.y, v.y ); + this.z = Math.min( this.z, v.z ); + + return this; + + } + + max( v ) { + + this.x = Math.max( this.x, v.x ); + this.y = Math.max( this.y, v.y ); + this.z = Math.max( this.z, v.z ); + + return this; + + } + + clamp( min, max ) { + + // assumes min < max, componentwise + + this.x = Math.max( min.x, Math.min( max.x, this.x ) ); + this.y = Math.max( min.y, Math.min( max.y, this.y ) ); + this.z = Math.max( min.z, Math.min( max.z, this.z ) ); + + return this; + + } + + clampScalar( minVal, maxVal ) { + + this.x = Math.max( minVal, Math.min( maxVal, this.x ) ); + this.y = Math.max( minVal, Math.min( maxVal, this.y ) ); + this.z = Math.max( minVal, Math.min( maxVal, this.z ) ); + + return this; + + } + + clampLength( min, max ) { + + const length = this.length(); + + return this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) ); + + } + + floor() { + + this.x = Math.floor( this.x ); + this.y = Math.floor( this.y ); + this.z = Math.floor( this.z ); + + return this; + + } + + ceil() { + + this.x = Math.ceil( this.x ); + this.y = Math.ceil( this.y ); + this.z = Math.ceil( this.z ); + + return this; + + } + + round() { + + this.x = Math.round( this.x ); + this.y = Math.round( this.y ); + this.z = Math.round( this.z ); + + return this; + + } + + roundToZero() { + + this.x = Math.trunc( this.x ); + this.y = Math.trunc( this.y ); + this.z = Math.trunc( this.z ); + + return this; + + } + + negate() { + + this.x = - this.x; + this.y = - this.y; + this.z = - this.z; + + return this; + + } + + dot( v ) { + + return this.x * v.x + this.y * v.y + this.z * v.z; + + } + + // TODO lengthSquared? + + lengthSq() { + + return this.x * this.x + this.y * this.y + this.z * this.z; + + } + + length() { + + return Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z ); + + } + + manhattanLength() { + + return Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z ); + + } + + normalize() { + + return this.divideScalar( this.length() || 1 ); + + } + + setLength( length ) { + + return this.normalize().multiplyScalar( length ); + + } + + lerp( v, alpha ) { + + this.x += ( v.x - this.x ) * alpha; + this.y += ( v.y - this.y ) * alpha; + this.z += ( v.z - this.z ) * alpha; + + return this; + + } + + lerpVectors( v1, v2, alpha ) { + + this.x = v1.x + ( v2.x - v1.x ) * alpha; + this.y = v1.y + ( v2.y - v1.y ) * alpha; + this.z = v1.z + ( v2.z - v1.z ) * alpha; + + return this; + + } + + cross( v ) { + + return this.crossVectors( this, v ); + + } + + crossVectors( a, b ) { + + const ax = a.x, ay = a.y, az = a.z; + const bx = b.x, by = b.y, bz = b.z; + + this.x = ay * bz - az * by; + this.y = az * bx - ax * bz; + this.z = ax * by - ay * bx; + + return this; + + } + + projectOnVector( v ) { + + const denominator = v.lengthSq(); + + if ( denominator === 0 ) return this.set( 0, 0, 0 ); + + const scalar = v.dot( this ) / denominator; + + return this.copy( v ).multiplyScalar( scalar ); + + } + + projectOnPlane( planeNormal ) { + + _vector$c.copy( this ).projectOnVector( planeNormal ); + + return this.sub( _vector$c ); + + } + + reflect( normal ) { + + // reflect incident vector off plane orthogonal to normal + // normal is assumed to have unit length + + return this.sub( _vector$c.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) ); + + } + + angleTo( v ) { + + const denominator = Math.sqrt( this.lengthSq() * v.lengthSq() ); + + if ( denominator === 0 ) return Math.PI / 2; + + const theta = this.dot( v ) / denominator; + + // clamp, to handle numerical problems + + return Math.acos( clamp( theta, - 1, 1 ) ); + + } + + distanceTo( v ) { + + return Math.sqrt( this.distanceToSquared( v ) ); + + } + + distanceToSquared( v ) { + + const dx = this.x - v.x, dy = this.y - v.y, dz = this.z - v.z; + + return dx * dx + dy * dy + dz * dz; + + } + + manhattanDistanceTo( v ) { + + return Math.abs( this.x - v.x ) + Math.abs( this.y - v.y ) + Math.abs( this.z - v.z ); + + } + + setFromSpherical( s ) { + + return this.setFromSphericalCoords( s.radius, s.phi, s.theta ); + + } + + setFromSphericalCoords( radius, phi, theta ) { + + const sinPhiRadius = Math.sin( phi ) * radius; + + this.x = sinPhiRadius * Math.sin( theta ); + this.y = Math.cos( phi ) * radius; + this.z = sinPhiRadius * Math.cos( theta ); + + return this; + + } + + setFromCylindrical( c ) { + + return this.setFromCylindricalCoords( c.radius, c.theta, c.y ); + + } + + setFromCylindricalCoords( radius, theta, y ) { + + this.x = radius * Math.sin( theta ); + this.y = y; + this.z = radius * Math.cos( theta ); + + return this; + + } + + setFromMatrixPosition( m ) { + + const e = m.elements; + + this.x = e[ 12 ]; + this.y = e[ 13 ]; + this.z = e[ 14 ]; + + return this; + + } + + setFromMatrixScale( m ) { + + const sx = this.setFromMatrixColumn( m, 0 ).length(); + const sy = this.setFromMatrixColumn( m, 1 ).length(); + const sz = this.setFromMatrixColumn( m, 2 ).length(); + + this.x = sx; + this.y = sy; + this.z = sz; + + return this; + + } + + setFromMatrixColumn( m, index ) { + + return this.fromArray( m.elements, index * 4 ); + + } + + setFromMatrix3Column( m, index ) { + + return this.fromArray( m.elements, index * 3 ); + + } + + setFromEuler( e ) { + + this.x = e._x; + this.y = e._y; + this.z = e._z; + + return this; + + } + + setFromColor( c ) { + + this.x = c.r; + this.y = c.g; + this.z = c.b; + + return this; + + } + + equals( v ) { + + return ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) ); + + } + + fromArray( array, offset = 0 ) { + + this.x = array[ offset ]; + this.y = array[ offset + 1 ]; + this.z = array[ offset + 2 ]; + + return this; + + } + + toArray( array = [], offset = 0 ) { + + array[ offset ] = this.x; + array[ offset + 1 ] = this.y; + array[ offset + 2 ] = this.z; + + return array; + + } + + fromBufferAttribute( attribute, index ) { + + this.x = attribute.getX( index ); + this.y = attribute.getY( index ); + this.z = attribute.getZ( index ); + + return this; + + } + + random() { + + this.x = Math.random(); + this.y = Math.random(); + this.z = Math.random(); + + return this; + + } + + randomDirection() { + + // https://mathworld.wolfram.com/SpherePointPicking.html + + const theta = Math.random() * Math.PI * 2; + const u = Math.random() * 2 - 1; + const c = Math.sqrt( 1 - u * u ); + + this.x = c * Math.cos( theta ); + this.y = u; + this.z = c * Math.sin( theta ); + + return this; + + } + + *[ Symbol.iterator ]() { + + yield this.x; + yield this.y; + yield this.z; + + } + +} + +const _vector$c = /*@__PURE__*/ new Vector3(); +const _quaternion$4 = /*@__PURE__*/ new Quaternion(); + +class Box3 { + + constructor( min = new Vector3( + Infinity, + Infinity, + Infinity ), max = new Vector3( - Infinity, - Infinity, - Infinity ) ) { + + this.isBox3 = true; + + this.min = min; + this.max = max; + + } + + set( min, max ) { + + this.min.copy( min ); + this.max.copy( max ); + + return this; + + } + + setFromArray( array ) { + + this.makeEmpty(); + + for ( let i = 0, il = array.length; i < il; i += 3 ) { + + this.expandByPoint( _vector$b.fromArray( array, i ) ); + + } + + return this; + + } + + setFromBufferAttribute( attribute ) { + + this.makeEmpty(); + + for ( let i = 0, il = attribute.count; i < il; i ++ ) { + + this.expandByPoint( _vector$b.fromBufferAttribute( attribute, i ) ); + + } + + return this; + + } + + setFromPoints( points ) { + + this.makeEmpty(); + + for ( let i = 0, il = points.length; i < il; i ++ ) { + + this.expandByPoint( points[ i ] ); + + } + + return this; + + } + + setFromCenterAndSize( center, size ) { + + const halfSize = _vector$b.copy( size ).multiplyScalar( 0.5 ); + + this.min.copy( center ).sub( halfSize ); + this.max.copy( center ).add( halfSize ); + + return this; + + } + + setFromObject( object, precise = false ) { + + this.makeEmpty(); + + return this.expandByObject( object, precise ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( box ) { + + this.min.copy( box.min ); + this.max.copy( box.max ); + + return this; + + } + + makeEmpty() { + + this.min.x = this.min.y = this.min.z = + Infinity; + this.max.x = this.max.y = this.max.z = - Infinity; + + return this; + + } + + isEmpty() { + + // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes + + return ( this.max.x < this.min.x ) || ( this.max.y < this.min.y ) || ( this.max.z < this.min.z ); + + } + + getCenter( target ) { + + return this.isEmpty() ? target.set( 0, 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 ); + + } + + getSize( target ) { + + return this.isEmpty() ? target.set( 0, 0, 0 ) : target.subVectors( this.max, this.min ); + + } + + expandByPoint( point ) { + + this.min.min( point ); + this.max.max( point ); + + return this; + + } + + expandByVector( vector ) { + + this.min.sub( vector ); + this.max.add( vector ); + + return this; + + } + + expandByScalar( scalar ) { + + this.min.addScalar( - scalar ); + this.max.addScalar( scalar ); + + return this; + + } + + expandByObject( object, precise = false ) { + + // Computes the world-axis-aligned bounding box of an object (including its children), + // accounting for both the object's, and children's, world transforms + + object.updateWorldMatrix( false, false ); + + const geometry = object.geometry; + + if ( geometry !== undefined ) { + + const positionAttribute = geometry.getAttribute( 'position' ); + + // precise AABB computation based on vertex data requires at least a position attribute. + // instancing isn't supported so far and uses the normal (conservative) code path. + + if ( precise === true && positionAttribute !== undefined && object.isInstancedMesh !== true ) { + + for ( let i = 0, l = positionAttribute.count; i < l; i ++ ) { + + if ( object.isMesh === true ) { + + object.getVertexPosition( i, _vector$b ); + + } else { + + _vector$b.fromBufferAttribute( positionAttribute, i ); + + } + + _vector$b.applyMatrix4( object.matrixWorld ); + this.expandByPoint( _vector$b ); + + } + + } else { + + if ( object.boundingBox !== undefined ) { + + // object-level bounding box + + if ( object.boundingBox === null ) { + + object.computeBoundingBox(); + + } + + _box$4.copy( object.boundingBox ); + + + } else { + + // geometry-level bounding box + + if ( geometry.boundingBox === null ) { + + geometry.computeBoundingBox(); + + } + + _box$4.copy( geometry.boundingBox ); + + } + + _box$4.applyMatrix4( object.matrixWorld ); + + this.union( _box$4 ); + + } + + } + + const children = object.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + this.expandByObject( children[ i ], precise ); + + } + + return this; + + } + + containsPoint( point ) { + + return point.x < this.min.x || point.x > this.max.x || + point.y < this.min.y || point.y > this.max.y || + point.z < this.min.z || point.z > this.max.z ? false : true; + + } + + containsBox( box ) { + + return this.min.x <= box.min.x && box.max.x <= this.max.x && + this.min.y <= box.min.y && box.max.y <= this.max.y && + this.min.z <= box.min.z && box.max.z <= this.max.z; + + } + + getParameter( point, target ) { + + // This can potentially have a divide by zero if the box + // has a size dimension of 0. + + return target.set( + ( point.x - this.min.x ) / ( this.max.x - this.min.x ), + ( point.y - this.min.y ) / ( this.max.y - this.min.y ), + ( point.z - this.min.z ) / ( this.max.z - this.min.z ) + ); + + } + + intersectsBox( box ) { + + // using 6 splitting planes to rule out intersections. + return box.max.x < this.min.x || box.min.x > this.max.x || + box.max.y < this.min.y || box.min.y > this.max.y || + box.max.z < this.min.z || box.min.z > this.max.z ? false : true; + + } + + intersectsSphere( sphere ) { + + // Find the point on the AABB closest to the sphere center. + this.clampPoint( sphere.center, _vector$b ); + + // If that point is inside the sphere, the AABB and sphere intersect. + return _vector$b.distanceToSquared( sphere.center ) <= ( sphere.radius * sphere.radius ); + + } + + intersectsPlane( plane ) { + + // We compute the minimum and maximum dot product values. If those values + // are on the same side (back or front) of the plane, then there is no intersection. + + let min, max; + + if ( plane.normal.x > 0 ) { + + min = plane.normal.x * this.min.x; + max = plane.normal.x * this.max.x; + + } else { + + min = plane.normal.x * this.max.x; + max = plane.normal.x * this.min.x; + + } + + if ( plane.normal.y > 0 ) { + + min += plane.normal.y * this.min.y; + max += plane.normal.y * this.max.y; + + } else { + + min += plane.normal.y * this.max.y; + max += plane.normal.y * this.min.y; + + } + + if ( plane.normal.z > 0 ) { + + min += plane.normal.z * this.min.z; + max += plane.normal.z * this.max.z; + + } else { + + min += plane.normal.z * this.max.z; + max += plane.normal.z * this.min.z; + + } + + return ( min <= - plane.constant && max >= - plane.constant ); + + } + + intersectsTriangle( triangle ) { + + if ( this.isEmpty() ) { + + return false; + + } + + // compute box center and extents + this.getCenter( _center ); + _extents.subVectors( this.max, _center ); + + // translate triangle to aabb origin + _v0$2.subVectors( triangle.a, _center ); + _v1$7.subVectors( triangle.b, _center ); + _v2$4.subVectors( triangle.c, _center ); + + // compute edge vectors for triangle + _f0.subVectors( _v1$7, _v0$2 ); + _f1.subVectors( _v2$4, _v1$7 ); + _f2.subVectors( _v0$2, _v2$4 ); + + // test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb + // make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation + // axis_ij = u_i x f_j (u0, u1, u2 = face normals of aabb = x,y,z axes vectors since aabb is axis aligned) + let axes = [ + 0, - _f0.z, _f0.y, 0, - _f1.z, _f1.y, 0, - _f2.z, _f2.y, + _f0.z, 0, - _f0.x, _f1.z, 0, - _f1.x, _f2.z, 0, - _f2.x, + - _f0.y, _f0.x, 0, - _f1.y, _f1.x, 0, - _f2.y, _f2.x, 0 + ]; + if ( ! satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents ) ) { + + return false; + + } + + // test 3 face normals from the aabb + axes = [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ]; + if ( ! satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents ) ) { + + return false; + + } + + // finally testing the face normal of the triangle + // use already existing triangle edge vectors here + _triangleNormal.crossVectors( _f0, _f1 ); + axes = [ _triangleNormal.x, _triangleNormal.y, _triangleNormal.z ]; + + return satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents ); + + } + + clampPoint( point, target ) { + + return target.copy( point ).clamp( this.min, this.max ); + + } + + distanceToPoint( point ) { + + return this.clampPoint( point, _vector$b ).distanceTo( point ); + + } + + getBoundingSphere( target ) { + + if ( this.isEmpty() ) { + + target.makeEmpty(); + + } else { + + this.getCenter( target.center ); + + target.radius = this.getSize( _vector$b ).length() * 0.5; + + } + + return target; + + } + + intersect( box ) { + + this.min.max( box.min ); + this.max.min( box.max ); + + // ensure that if there is no overlap, the result is fully empty, not slightly empty with non-inf/+inf values that will cause subsequence intersects to erroneously return valid values. + if ( this.isEmpty() ) this.makeEmpty(); + + return this; + + } + + union( box ) { + + this.min.min( box.min ); + this.max.max( box.max ); + + return this; + + } + + applyMatrix4( matrix ) { + + // transform of empty box is an empty box. + if ( this.isEmpty() ) return this; + + // NOTE: I am using a binary pattern to specify all 2^3 combinations below + _points[ 0 ].set( this.min.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 000 + _points[ 1 ].set( this.min.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 001 + _points[ 2 ].set( this.min.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 010 + _points[ 3 ].set( this.min.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 011 + _points[ 4 ].set( this.max.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 100 + _points[ 5 ].set( this.max.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 101 + _points[ 6 ].set( this.max.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 110 + _points[ 7 ].set( this.max.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 111 + + this.setFromPoints( _points ); + + return this; + + } + + translate( offset ) { + + this.min.add( offset ); + this.max.add( offset ); + + return this; + + } + + equals( box ) { + + return box.min.equals( this.min ) && box.max.equals( this.max ); + + } + +} + +const _points = [ + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3() +]; + +const _vector$b = /*@__PURE__*/ new Vector3(); + +const _box$4 = /*@__PURE__*/ new Box3(); + +// triangle centered vertices + +const _v0$2 = /*@__PURE__*/ new Vector3(); +const _v1$7 = /*@__PURE__*/ new Vector3(); +const _v2$4 = /*@__PURE__*/ new Vector3(); + +// triangle edge vectors + +const _f0 = /*@__PURE__*/ new Vector3(); +const _f1 = /*@__PURE__*/ new Vector3(); +const _f2 = /*@__PURE__*/ new Vector3(); + +const _center = /*@__PURE__*/ new Vector3(); +const _extents = /*@__PURE__*/ new Vector3(); +const _triangleNormal = /*@__PURE__*/ new Vector3(); +const _testAxis = /*@__PURE__*/ new Vector3(); + +function satForAxes( axes, v0, v1, v2, extents ) { + + for ( let i = 0, j = axes.length - 3; i <= j; i += 3 ) { + + _testAxis.fromArray( axes, i ); + // project the aabb onto the separating axis + const r = extents.x * Math.abs( _testAxis.x ) + extents.y * Math.abs( _testAxis.y ) + extents.z * Math.abs( _testAxis.z ); + // project all 3 vertices of the triangle onto the separating axis + const p0 = v0.dot( _testAxis ); + const p1 = v1.dot( _testAxis ); + const p2 = v2.dot( _testAxis ); + // actual test, basically see if either of the most extreme of the triangle points intersects r + if ( Math.max( - Math.max( p0, p1, p2 ), Math.min( p0, p1, p2 ) ) > r ) { + + // points of the projected triangle are outside the projected half-length of the aabb + // the axis is separating and we can exit + return false; + + } + + } + + return true; + +} + +const _box$3 = /*@__PURE__*/ new Box3(); +const _v1$6 = /*@__PURE__*/ new Vector3(); +const _v2$3 = /*@__PURE__*/ new Vector3(); + +class Sphere { + + constructor( center = new Vector3(), radius = - 1 ) { + + this.isSphere = true; + + this.center = center; + this.radius = radius; + + } + + set( center, radius ) { + + this.center.copy( center ); + this.radius = radius; + + return this; + + } + + setFromPoints( points, optionalCenter ) { + + const center = this.center; + + if ( optionalCenter !== undefined ) { + + center.copy( optionalCenter ); + + } else { + + _box$3.setFromPoints( points ).getCenter( center ); + + } + + let maxRadiusSq = 0; + + for ( let i = 0, il = points.length; i < il; i ++ ) { + + maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( points[ i ] ) ); + + } + + this.radius = Math.sqrt( maxRadiusSq ); + + return this; + + } + + copy( sphere ) { + + this.center.copy( sphere.center ); + this.radius = sphere.radius; + + return this; + + } + + isEmpty() { + + return ( this.radius < 0 ); + + } + + makeEmpty() { + + this.center.set( 0, 0, 0 ); + this.radius = - 1; + + return this; + + } + + containsPoint( point ) { + + return ( point.distanceToSquared( this.center ) <= ( this.radius * this.radius ) ); + + } + + distanceToPoint( point ) { + + return ( point.distanceTo( this.center ) - this.radius ); + + } + + intersectsSphere( sphere ) { + + const radiusSum = this.radius + sphere.radius; + + return sphere.center.distanceToSquared( this.center ) <= ( radiusSum * radiusSum ); + + } + + intersectsBox( box ) { + + return box.intersectsSphere( this ); + + } + + intersectsPlane( plane ) { + + return Math.abs( plane.distanceToPoint( this.center ) ) <= this.radius; + + } + + clampPoint( point, target ) { + + const deltaLengthSq = this.center.distanceToSquared( point ); + + target.copy( point ); + + if ( deltaLengthSq > ( this.radius * this.radius ) ) { + + target.sub( this.center ).normalize(); + target.multiplyScalar( this.radius ).add( this.center ); + + } + + return target; + + } + + getBoundingBox( target ) { + + if ( this.isEmpty() ) { + + // Empty sphere produces empty bounding box + target.makeEmpty(); + return target; + + } + + target.set( this.center, this.center ); + target.expandByScalar( this.radius ); + + return target; + + } + + applyMatrix4( matrix ) { + + this.center.applyMatrix4( matrix ); + this.radius = this.radius * matrix.getMaxScaleOnAxis(); + + return this; + + } + + translate( offset ) { + + this.center.add( offset ); + + return this; + + } + + expandByPoint( point ) { + + if ( this.isEmpty() ) { + + this.center.copy( point ); + + this.radius = 0; + + return this; + + } + + _v1$6.subVectors( point, this.center ); + + const lengthSq = _v1$6.lengthSq(); + + if ( lengthSq > ( this.radius * this.radius ) ) { + + // calculate the minimal sphere + + const length = Math.sqrt( lengthSq ); + + const delta = ( length - this.radius ) * 0.5; + + this.center.addScaledVector( _v1$6, delta / length ); + + this.radius += delta; + + } + + return this; + + } + + union( sphere ) { + + if ( sphere.isEmpty() ) { + + return this; + + } + + if ( this.isEmpty() ) { + + this.copy( sphere ); + + return this; + + } + + if ( this.center.equals( sphere.center ) === true ) { + + this.radius = Math.max( this.radius, sphere.radius ); + + } else { + + _v2$3.subVectors( sphere.center, this.center ).setLength( sphere.radius ); + + this.expandByPoint( _v1$6.copy( sphere.center ).add( _v2$3 ) ); + + this.expandByPoint( _v1$6.copy( sphere.center ).sub( _v2$3 ) ); + + } + + return this; + + } + + equals( sphere ) { + + return sphere.center.equals( this.center ) && ( sphere.radius === this.radius ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +const _vector$a = /*@__PURE__*/ new Vector3(); +const _segCenter = /*@__PURE__*/ new Vector3(); +const _segDir = /*@__PURE__*/ new Vector3(); +const _diff = /*@__PURE__*/ new Vector3(); + +const _edge1 = /*@__PURE__*/ new Vector3(); +const _edge2 = /*@__PURE__*/ new Vector3(); +const _normal$1 = /*@__PURE__*/ new Vector3(); + +class Ray { + + constructor( origin = new Vector3(), direction = new Vector3( 0, 0, - 1 ) ) { + + this.origin = origin; + this.direction = direction; + + } + + set( origin, direction ) { + + this.origin.copy( origin ); + this.direction.copy( direction ); + + return this; + + } + + copy( ray ) { + + this.origin.copy( ray.origin ); + this.direction.copy( ray.direction ); + + return this; + + } + + at( t, target ) { + + return target.copy( this.origin ).addScaledVector( this.direction, t ); + + } + + lookAt( v ) { + + this.direction.copy( v ).sub( this.origin ).normalize(); + + return this; + + } + + recast( t ) { + + this.origin.copy( this.at( t, _vector$a ) ); + + return this; + + } + + closestPointToPoint( point, target ) { + + target.subVectors( point, this.origin ); + + const directionDistance = target.dot( this.direction ); + + if ( directionDistance < 0 ) { + + return target.copy( this.origin ); + + } + + return target.copy( this.origin ).addScaledVector( this.direction, directionDistance ); + + } + + distanceToPoint( point ) { + + return Math.sqrt( this.distanceSqToPoint( point ) ); + + } + + distanceSqToPoint( point ) { + + const directionDistance = _vector$a.subVectors( point, this.origin ).dot( this.direction ); + + // point behind the ray + + if ( directionDistance < 0 ) { + + return this.origin.distanceToSquared( point ); + + } + + _vector$a.copy( this.origin ).addScaledVector( this.direction, directionDistance ); + + return _vector$a.distanceToSquared( point ); + + } + + distanceSqToSegment( v0, v1, optionalPointOnRay, optionalPointOnSegment ) { + + // from https://github.com/pmjoniak/GeometricTools/blob/master/GTEngine/Include/Mathematics/GteDistRaySegment.h + // It returns the min distance between the ray and the segment + // defined by v0 and v1 + // It can also set two optional targets : + // - The closest point on the ray + // - The closest point on the segment + + _segCenter.copy( v0 ).add( v1 ).multiplyScalar( 0.5 ); + _segDir.copy( v1 ).sub( v0 ).normalize(); + _diff.copy( this.origin ).sub( _segCenter ); + + const segExtent = v0.distanceTo( v1 ) * 0.5; + const a01 = - this.direction.dot( _segDir ); + const b0 = _diff.dot( this.direction ); + const b1 = - _diff.dot( _segDir ); + const c = _diff.lengthSq(); + const det = Math.abs( 1 - a01 * a01 ); + let s0, s1, sqrDist, extDet; + + if ( det > 0 ) { + + // The ray and segment are not parallel. + + s0 = a01 * b1 - b0; + s1 = a01 * b0 - b1; + extDet = segExtent * det; + + if ( s0 >= 0 ) { + + if ( s1 >= - extDet ) { + + if ( s1 <= extDet ) { + + // region 0 + // Minimum at interior points of ray and segment. + + const invDet = 1 / det; + s0 *= invDet; + s1 *= invDet; + sqrDist = s0 * ( s0 + a01 * s1 + 2 * b0 ) + s1 * ( a01 * s0 + s1 + 2 * b1 ) + c; + + } else { + + // region 1 + + s1 = segExtent; + s0 = Math.max( 0, - ( a01 * s1 + b0 ) ); + sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; + + } + + } else { + + // region 5 + + s1 = - segExtent; + s0 = Math.max( 0, - ( a01 * s1 + b0 ) ); + sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; + + } + + } else { + + if ( s1 <= - extDet ) { + + // region 4 + + s0 = Math.max( 0, - ( - a01 * segExtent + b0 ) ); + s1 = ( s0 > 0 ) ? - segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent ); + sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; + + } else if ( s1 <= extDet ) { + + // region 3 + + s0 = 0; + s1 = Math.min( Math.max( - segExtent, - b1 ), segExtent ); + sqrDist = s1 * ( s1 + 2 * b1 ) + c; + + } else { + + // region 2 + + s0 = Math.max( 0, - ( a01 * segExtent + b0 ) ); + s1 = ( s0 > 0 ) ? segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent ); + sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; + + } + + } + + } else { + + // Ray and segment are parallel. + + s1 = ( a01 > 0 ) ? - segExtent : segExtent; + s0 = Math.max( 0, - ( a01 * s1 + b0 ) ); + sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; + + } + + if ( optionalPointOnRay ) { + + optionalPointOnRay.copy( this.origin ).addScaledVector( this.direction, s0 ); + + } + + if ( optionalPointOnSegment ) { + + optionalPointOnSegment.copy( _segCenter ).addScaledVector( _segDir, s1 ); + + } + + return sqrDist; + + } + + intersectSphere( sphere, target ) { + + _vector$a.subVectors( sphere.center, this.origin ); + const tca = _vector$a.dot( this.direction ); + const d2 = _vector$a.dot( _vector$a ) - tca * tca; + const radius2 = sphere.radius * sphere.radius; + + if ( d2 > radius2 ) return null; + + const thc = Math.sqrt( radius2 - d2 ); + + // t0 = first intersect point - entrance on front of sphere + const t0 = tca - thc; + + // t1 = second intersect point - exit point on back of sphere + const t1 = tca + thc; + + // test to see if t1 is behind the ray - if so, return null + if ( t1 < 0 ) return null; + + // test to see if t0 is behind the ray: + // if it is, the ray is inside the sphere, so return the second exit point scaled by t1, + // in order to always return an intersect point that is in front of the ray. + if ( t0 < 0 ) return this.at( t1, target ); + + // else t0 is in front of the ray, so return the first collision point scaled by t0 + return this.at( t0, target ); + + } + + intersectsSphere( sphere ) { + + return this.distanceSqToPoint( sphere.center ) <= ( sphere.radius * sphere.radius ); + + } + + distanceToPlane( plane ) { + + const denominator = plane.normal.dot( this.direction ); + + if ( denominator === 0 ) { + + // line is coplanar, return origin + if ( plane.distanceToPoint( this.origin ) === 0 ) { + + return 0; + + } + + // Null is preferable to undefined since undefined means.... it is undefined + + return null; + + } + + const t = - ( this.origin.dot( plane.normal ) + plane.constant ) / denominator; + + // Return if the ray never intersects the plane + + return t >= 0 ? t : null; + + } + + intersectPlane( plane, target ) { + + const t = this.distanceToPlane( plane ); + + if ( t === null ) { + + return null; + + } + + return this.at( t, target ); + + } + + intersectsPlane( plane ) { + + // check if the ray lies on the plane first + + const distToPoint = plane.distanceToPoint( this.origin ); + + if ( distToPoint === 0 ) { + + return true; + + } + + const denominator = plane.normal.dot( this.direction ); + + if ( denominator * distToPoint < 0 ) { + + return true; + + } + + // ray origin is behind the plane (and is pointing behind it) + + return false; + + } + + intersectBox( box, target ) { + + let tmin, tmax, tymin, tymax, tzmin, tzmax; + + const invdirx = 1 / this.direction.x, + invdiry = 1 / this.direction.y, + invdirz = 1 / this.direction.z; + + const origin = this.origin; + + if ( invdirx >= 0 ) { + + tmin = ( box.min.x - origin.x ) * invdirx; + tmax = ( box.max.x - origin.x ) * invdirx; + + } else { + + tmin = ( box.max.x - origin.x ) * invdirx; + tmax = ( box.min.x - origin.x ) * invdirx; + + } + + if ( invdiry >= 0 ) { + + tymin = ( box.min.y - origin.y ) * invdiry; + tymax = ( box.max.y - origin.y ) * invdiry; + + } else { + + tymin = ( box.max.y - origin.y ) * invdiry; + tymax = ( box.min.y - origin.y ) * invdiry; + + } + + if ( ( tmin > tymax ) || ( tymin > tmax ) ) return null; + + if ( tymin > tmin || isNaN( tmin ) ) tmin = tymin; + + if ( tymax < tmax || isNaN( tmax ) ) tmax = tymax; + + if ( invdirz >= 0 ) { + + tzmin = ( box.min.z - origin.z ) * invdirz; + tzmax = ( box.max.z - origin.z ) * invdirz; + + } else { + + tzmin = ( box.max.z - origin.z ) * invdirz; + tzmax = ( box.min.z - origin.z ) * invdirz; + + } + + if ( ( tmin > tzmax ) || ( tzmin > tmax ) ) return null; + + if ( tzmin > tmin || tmin !== tmin ) tmin = tzmin; + + if ( tzmax < tmax || tmax !== tmax ) tmax = tzmax; + + //return point closest to the ray (positive side) + + if ( tmax < 0 ) return null; + + return this.at( tmin >= 0 ? tmin : tmax, target ); + + } + + intersectsBox( box ) { + + return this.intersectBox( box, _vector$a ) !== null; + + } + + intersectTriangle( a, b, c, backfaceCulling, target ) { + + // Compute the offset origin, edges, and normal. + + // from https://github.com/pmjoniak/GeometricTools/blob/master/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h + + _edge1.subVectors( b, a ); + _edge2.subVectors( c, a ); + _normal$1.crossVectors( _edge1, _edge2 ); + + // Solve Q + t*D = b1*E1 + b2*E2 (Q = kDiff, D = ray direction, + // E1 = kEdge1, E2 = kEdge2, N = Cross(E1,E2)) by + // |Dot(D,N)|*b1 = sign(Dot(D,N))*Dot(D,Cross(Q,E2)) + // |Dot(D,N)|*b2 = sign(Dot(D,N))*Dot(D,Cross(E1,Q)) + // |Dot(D,N)|*t = -sign(Dot(D,N))*Dot(Q,N) + let DdN = this.direction.dot( _normal$1 ); + let sign; + + if ( DdN > 0 ) { + + if ( backfaceCulling ) return null; + sign = 1; + + } else if ( DdN < 0 ) { + + sign = - 1; + DdN = - DdN; + + } else { + + return null; + + } + + _diff.subVectors( this.origin, a ); + const DdQxE2 = sign * this.direction.dot( _edge2.crossVectors( _diff, _edge2 ) ); + + // b1 < 0, no intersection + if ( DdQxE2 < 0 ) { + + return null; + + } + + const DdE1xQ = sign * this.direction.dot( _edge1.cross( _diff ) ); + + // b2 < 0, no intersection + if ( DdE1xQ < 0 ) { + + return null; + + } + + // b1+b2 > 1, no intersection + if ( DdQxE2 + DdE1xQ > DdN ) { + + return null; + + } + + // Line intersects triangle, check if ray does. + const QdN = - sign * _diff.dot( _normal$1 ); + + // t < 0, no intersection + if ( QdN < 0 ) { + + return null; + + } + + // Ray intersects triangle. + return this.at( QdN / DdN, target ); + + } + + applyMatrix4( matrix4 ) { + + this.origin.applyMatrix4( matrix4 ); + this.direction.transformDirection( matrix4 ); + + return this; + + } + + equals( ray ) { + + return ray.origin.equals( this.origin ) && ray.direction.equals( this.direction ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +class Matrix4 { + + constructor( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) { + + Matrix4.prototype.isMatrix4 = true; + + this.elements = [ + + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + + ]; + + if ( n11 !== undefined ) { + + this.set( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ); + + } + + } + + set( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) { + + const te = this.elements; + + te[ 0 ] = n11; te[ 4 ] = n12; te[ 8 ] = n13; te[ 12 ] = n14; + te[ 1 ] = n21; te[ 5 ] = n22; te[ 9 ] = n23; te[ 13 ] = n24; + te[ 2 ] = n31; te[ 6 ] = n32; te[ 10 ] = n33; te[ 14 ] = n34; + te[ 3 ] = n41; te[ 7 ] = n42; te[ 11 ] = n43; te[ 15 ] = n44; + + return this; + + } + + identity() { + + this.set( + + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + clone() { + + return new Matrix4().fromArray( this.elements ); + + } + + copy( m ) { + + const te = this.elements; + const me = m.elements; + + te[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ]; te[ 3 ] = me[ 3 ]; + te[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ]; te[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ]; + te[ 8 ] = me[ 8 ]; te[ 9 ] = me[ 9 ]; te[ 10 ] = me[ 10 ]; te[ 11 ] = me[ 11 ]; + te[ 12 ] = me[ 12 ]; te[ 13 ] = me[ 13 ]; te[ 14 ] = me[ 14 ]; te[ 15 ] = me[ 15 ]; + + return this; + + } + + copyPosition( m ) { + + const te = this.elements, me = m.elements; + + te[ 12 ] = me[ 12 ]; + te[ 13 ] = me[ 13 ]; + te[ 14 ] = me[ 14 ]; + + return this; + + } + + setFromMatrix3( m ) { + + const me = m.elements; + + this.set( + + me[ 0 ], me[ 3 ], me[ 6 ], 0, + me[ 1 ], me[ 4 ], me[ 7 ], 0, + me[ 2 ], me[ 5 ], me[ 8 ], 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + extractBasis( xAxis, yAxis, zAxis ) { + + xAxis.setFromMatrixColumn( this, 0 ); + yAxis.setFromMatrixColumn( this, 1 ); + zAxis.setFromMatrixColumn( this, 2 ); + + return this; + + } + + makeBasis( xAxis, yAxis, zAxis ) { + + this.set( + xAxis.x, yAxis.x, zAxis.x, 0, + xAxis.y, yAxis.y, zAxis.y, 0, + xAxis.z, yAxis.z, zAxis.z, 0, + 0, 0, 0, 1 + ); + + return this; + + } + + extractRotation( m ) { + + // this method does not support reflection matrices + + const te = this.elements; + const me = m.elements; + + const scaleX = 1 / _v1$5.setFromMatrixColumn( m, 0 ).length(); + const scaleY = 1 / _v1$5.setFromMatrixColumn( m, 1 ).length(); + const scaleZ = 1 / _v1$5.setFromMatrixColumn( m, 2 ).length(); + + te[ 0 ] = me[ 0 ] * scaleX; + te[ 1 ] = me[ 1 ] * scaleX; + te[ 2 ] = me[ 2 ] * scaleX; + te[ 3 ] = 0; + + te[ 4 ] = me[ 4 ] * scaleY; + te[ 5 ] = me[ 5 ] * scaleY; + te[ 6 ] = me[ 6 ] * scaleY; + te[ 7 ] = 0; + + te[ 8 ] = me[ 8 ] * scaleZ; + te[ 9 ] = me[ 9 ] * scaleZ; + te[ 10 ] = me[ 10 ] * scaleZ; + te[ 11 ] = 0; + + te[ 12 ] = 0; + te[ 13 ] = 0; + te[ 14 ] = 0; + te[ 15 ] = 1; + + return this; + + } + + makeRotationFromEuler( euler ) { + + const te = this.elements; + + const x = euler.x, y = euler.y, z = euler.z; + const a = Math.cos( x ), b = Math.sin( x ); + const c = Math.cos( y ), d = Math.sin( y ); + const e = Math.cos( z ), f = Math.sin( z ); + + if ( euler.order === 'XYZ' ) { + + const ae = a * e, af = a * f, be = b * e, bf = b * f; + + te[ 0 ] = c * e; + te[ 4 ] = - c * f; + te[ 8 ] = d; + + te[ 1 ] = af + be * d; + te[ 5 ] = ae - bf * d; + te[ 9 ] = - b * c; + + te[ 2 ] = bf - ae * d; + te[ 6 ] = be + af * d; + te[ 10 ] = a * c; + + } else if ( euler.order === 'YXZ' ) { + + const ce = c * e, cf = c * f, de = d * e, df = d * f; + + te[ 0 ] = ce + df * b; + te[ 4 ] = de * b - cf; + te[ 8 ] = a * d; + + te[ 1 ] = a * f; + te[ 5 ] = a * e; + te[ 9 ] = - b; + + te[ 2 ] = cf * b - de; + te[ 6 ] = df + ce * b; + te[ 10 ] = a * c; + + } else if ( euler.order === 'ZXY' ) { + + const ce = c * e, cf = c * f, de = d * e, df = d * f; + + te[ 0 ] = ce - df * b; + te[ 4 ] = - a * f; + te[ 8 ] = de + cf * b; + + te[ 1 ] = cf + de * b; + te[ 5 ] = a * e; + te[ 9 ] = df - ce * b; + + te[ 2 ] = - a * d; + te[ 6 ] = b; + te[ 10 ] = a * c; + + } else if ( euler.order === 'ZYX' ) { + + const ae = a * e, af = a * f, be = b * e, bf = b * f; + + te[ 0 ] = c * e; + te[ 4 ] = be * d - af; + te[ 8 ] = ae * d + bf; + + te[ 1 ] = c * f; + te[ 5 ] = bf * d + ae; + te[ 9 ] = af * d - be; + + te[ 2 ] = - d; + te[ 6 ] = b * c; + te[ 10 ] = a * c; + + } else if ( euler.order === 'YZX' ) { + + const ac = a * c, ad = a * d, bc = b * c, bd = b * d; + + te[ 0 ] = c * e; + te[ 4 ] = bd - ac * f; + te[ 8 ] = bc * f + ad; + + te[ 1 ] = f; + te[ 5 ] = a * e; + te[ 9 ] = - b * e; + + te[ 2 ] = - d * e; + te[ 6 ] = ad * f + bc; + te[ 10 ] = ac - bd * f; + + } else if ( euler.order === 'XZY' ) { + + const ac = a * c, ad = a * d, bc = b * c, bd = b * d; + + te[ 0 ] = c * e; + te[ 4 ] = - f; + te[ 8 ] = d * e; + + te[ 1 ] = ac * f + bd; + te[ 5 ] = a * e; + te[ 9 ] = ad * f - bc; + + te[ 2 ] = bc * f - ad; + te[ 6 ] = b * e; + te[ 10 ] = bd * f + ac; + + } + + // bottom row + te[ 3 ] = 0; + te[ 7 ] = 0; + te[ 11 ] = 0; + + // last column + te[ 12 ] = 0; + te[ 13 ] = 0; + te[ 14 ] = 0; + te[ 15 ] = 1; + + return this; + + } + + makeRotationFromQuaternion( q ) { + + return this.compose( _zero, q, _one ); + + } + + lookAt( eye, target, up ) { + + const te = this.elements; + + _z.subVectors( eye, target ); + + if ( _z.lengthSq() === 0 ) { + + // eye and target are in the same position + + _z.z = 1; + + } + + _z.normalize(); + _x.crossVectors( up, _z ); + + if ( _x.lengthSq() === 0 ) { + + // up and z are parallel + + if ( Math.abs( up.z ) === 1 ) { + + _z.x += 0.0001; + + } else { + + _z.z += 0.0001; + + } + + _z.normalize(); + _x.crossVectors( up, _z ); + + } + + _x.normalize(); + _y.crossVectors( _z, _x ); + + te[ 0 ] = _x.x; te[ 4 ] = _y.x; te[ 8 ] = _z.x; + te[ 1 ] = _x.y; te[ 5 ] = _y.y; te[ 9 ] = _z.y; + te[ 2 ] = _x.z; te[ 6 ] = _y.z; te[ 10 ] = _z.z; + + return this; + + } + + multiply( m ) { + + return this.multiplyMatrices( this, m ); + + } + + premultiply( m ) { + + return this.multiplyMatrices( m, this ); + + } + + multiplyMatrices( a, b ) { + + const ae = a.elements; + const be = b.elements; + const te = this.elements; + + const a11 = ae[ 0 ], a12 = ae[ 4 ], a13 = ae[ 8 ], a14 = ae[ 12 ]; + const a21 = ae[ 1 ], a22 = ae[ 5 ], a23 = ae[ 9 ], a24 = ae[ 13 ]; + const a31 = ae[ 2 ], a32 = ae[ 6 ], a33 = ae[ 10 ], a34 = ae[ 14 ]; + const a41 = ae[ 3 ], a42 = ae[ 7 ], a43 = ae[ 11 ], a44 = ae[ 15 ]; + + const b11 = be[ 0 ], b12 = be[ 4 ], b13 = be[ 8 ], b14 = be[ 12 ]; + const b21 = be[ 1 ], b22 = be[ 5 ], b23 = be[ 9 ], b24 = be[ 13 ]; + const b31 = be[ 2 ], b32 = be[ 6 ], b33 = be[ 10 ], b34 = be[ 14 ]; + const b41 = be[ 3 ], b42 = be[ 7 ], b43 = be[ 11 ], b44 = be[ 15 ]; + + te[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41; + te[ 4 ] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42; + te[ 8 ] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43; + te[ 12 ] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44; + + te[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41; + te[ 5 ] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42; + te[ 9 ] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43; + te[ 13 ] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44; + + te[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41; + te[ 6 ] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42; + te[ 10 ] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43; + te[ 14 ] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44; + + te[ 3 ] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41; + te[ 7 ] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42; + te[ 11 ] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43; + te[ 15 ] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44; + + return this; + + } + + multiplyScalar( s ) { + + const te = this.elements; + + te[ 0 ] *= s; te[ 4 ] *= s; te[ 8 ] *= s; te[ 12 ] *= s; + te[ 1 ] *= s; te[ 5 ] *= s; te[ 9 ] *= s; te[ 13 ] *= s; + te[ 2 ] *= s; te[ 6 ] *= s; te[ 10 ] *= s; te[ 14 ] *= s; + te[ 3 ] *= s; te[ 7 ] *= s; te[ 11 ] *= s; te[ 15 ] *= s; + + return this; + + } + + determinant() { + + const te = this.elements; + + const n11 = te[ 0 ], n12 = te[ 4 ], n13 = te[ 8 ], n14 = te[ 12 ]; + const n21 = te[ 1 ], n22 = te[ 5 ], n23 = te[ 9 ], n24 = te[ 13 ]; + const n31 = te[ 2 ], n32 = te[ 6 ], n33 = te[ 10 ], n34 = te[ 14 ]; + const n41 = te[ 3 ], n42 = te[ 7 ], n43 = te[ 11 ], n44 = te[ 15 ]; + + //TODO: make this more efficient + //( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm ) + + return ( + n41 * ( + + n14 * n23 * n32 + - n13 * n24 * n32 + - n14 * n22 * n33 + + n12 * n24 * n33 + + n13 * n22 * n34 + - n12 * n23 * n34 + ) + + n42 * ( + + n11 * n23 * n34 + - n11 * n24 * n33 + + n14 * n21 * n33 + - n13 * n21 * n34 + + n13 * n24 * n31 + - n14 * n23 * n31 + ) + + n43 * ( + + n11 * n24 * n32 + - n11 * n22 * n34 + - n14 * n21 * n32 + + n12 * n21 * n34 + + n14 * n22 * n31 + - n12 * n24 * n31 + ) + + n44 * ( + - n13 * n22 * n31 + - n11 * n23 * n32 + + n11 * n22 * n33 + + n13 * n21 * n32 + - n12 * n21 * n33 + + n12 * n23 * n31 + ) + + ); + + } + + transpose() { + + const te = this.elements; + let tmp; + + tmp = te[ 1 ]; te[ 1 ] = te[ 4 ]; te[ 4 ] = tmp; + tmp = te[ 2 ]; te[ 2 ] = te[ 8 ]; te[ 8 ] = tmp; + tmp = te[ 6 ]; te[ 6 ] = te[ 9 ]; te[ 9 ] = tmp; + + tmp = te[ 3 ]; te[ 3 ] = te[ 12 ]; te[ 12 ] = tmp; + tmp = te[ 7 ]; te[ 7 ] = te[ 13 ]; te[ 13 ] = tmp; + tmp = te[ 11 ]; te[ 11 ] = te[ 14 ]; te[ 14 ] = tmp; + + return this; + + } + + setPosition( x, y, z ) { + + const te = this.elements; + + if ( x.isVector3 ) { + + te[ 12 ] = x.x; + te[ 13 ] = x.y; + te[ 14 ] = x.z; + + } else { + + te[ 12 ] = x; + te[ 13 ] = y; + te[ 14 ] = z; + + } + + return this; + + } + + invert() { + + // based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm + const te = this.elements, + + n11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ], n41 = te[ 3 ], + n12 = te[ 4 ], n22 = te[ 5 ], n32 = te[ 6 ], n42 = te[ 7 ], + n13 = te[ 8 ], n23 = te[ 9 ], n33 = te[ 10 ], n43 = te[ 11 ], + n14 = te[ 12 ], n24 = te[ 13 ], n34 = te[ 14 ], n44 = te[ 15 ], + + t11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44, + t12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44, + t13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44, + t14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34; + + const det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14; + + if ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); + + const detInv = 1 / det; + + te[ 0 ] = t11 * detInv; + te[ 1 ] = ( n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44 ) * detInv; + te[ 2 ] = ( n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44 ) * detInv; + te[ 3 ] = ( n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43 ) * detInv; + + te[ 4 ] = t12 * detInv; + te[ 5 ] = ( n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44 ) * detInv; + te[ 6 ] = ( n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44 ) * detInv; + te[ 7 ] = ( n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43 ) * detInv; + + te[ 8 ] = t13 * detInv; + te[ 9 ] = ( n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44 ) * detInv; + te[ 10 ] = ( n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44 ) * detInv; + te[ 11 ] = ( n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43 ) * detInv; + + te[ 12 ] = t14 * detInv; + te[ 13 ] = ( n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34 ) * detInv; + te[ 14 ] = ( n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34 ) * detInv; + te[ 15 ] = ( n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33 ) * detInv; + + return this; + + } + + scale( v ) { + + const te = this.elements; + const x = v.x, y = v.y, z = v.z; + + te[ 0 ] *= x; te[ 4 ] *= y; te[ 8 ] *= z; + te[ 1 ] *= x; te[ 5 ] *= y; te[ 9 ] *= z; + te[ 2 ] *= x; te[ 6 ] *= y; te[ 10 ] *= z; + te[ 3 ] *= x; te[ 7 ] *= y; te[ 11 ] *= z; + + return this; + + } + + getMaxScaleOnAxis() { + + const te = this.elements; + + const scaleXSq = te[ 0 ] * te[ 0 ] + te[ 1 ] * te[ 1 ] + te[ 2 ] * te[ 2 ]; + const scaleYSq = te[ 4 ] * te[ 4 ] + te[ 5 ] * te[ 5 ] + te[ 6 ] * te[ 6 ]; + const scaleZSq = te[ 8 ] * te[ 8 ] + te[ 9 ] * te[ 9 ] + te[ 10 ] * te[ 10 ]; + + return Math.sqrt( Math.max( scaleXSq, scaleYSq, scaleZSq ) ); + + } + + makeTranslation( x, y, z ) { + + if ( x.isVector3 ) { + + this.set( + + 1, 0, 0, x.x, + 0, 1, 0, x.y, + 0, 0, 1, x.z, + 0, 0, 0, 1 + + ); + + } else { + + this.set( + + 1, 0, 0, x, + 0, 1, 0, y, + 0, 0, 1, z, + 0, 0, 0, 1 + + ); + + } + + return this; + + } + + makeRotationX( theta ) { + + const c = Math.cos( theta ), s = Math.sin( theta ); + + this.set( + + 1, 0, 0, 0, + 0, c, - s, 0, + 0, s, c, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + makeRotationY( theta ) { + + const c = Math.cos( theta ), s = Math.sin( theta ); + + this.set( + + c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + makeRotationZ( theta ) { + + const c = Math.cos( theta ), s = Math.sin( theta ); + + this.set( + + c, - s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + makeRotationAxis( axis, angle ) { + + // Based on http://www.gamedev.net/reference/articles/article1199.asp + + const c = Math.cos( angle ); + const s = Math.sin( angle ); + const t = 1 - c; + const x = axis.x, y = axis.y, z = axis.z; + const tx = t * x, ty = t * y; + + this.set( + + tx * x + c, tx * y - s * z, tx * z + s * y, 0, + tx * y + s * z, ty * y + c, ty * z - s * x, 0, + tx * z - s * y, ty * z + s * x, t * z * z + c, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + makeScale( x, y, z ) { + + this.set( + + x, 0, 0, 0, + 0, y, 0, 0, + 0, 0, z, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + makeShear( xy, xz, yx, yz, zx, zy ) { + + this.set( + + 1, yx, zx, 0, + xy, 1, zy, 0, + xz, yz, 1, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + compose( position, quaternion, scale ) { + + const te = this.elements; + + const x = quaternion._x, y = quaternion._y, z = quaternion._z, w = quaternion._w; + const x2 = x + x, y2 = y + y, z2 = z + z; + const xx = x * x2, xy = x * y2, xz = x * z2; + const yy = y * y2, yz = y * z2, zz = z * z2; + const wx = w * x2, wy = w * y2, wz = w * z2; + + const sx = scale.x, sy = scale.y, sz = scale.z; + + te[ 0 ] = ( 1 - ( yy + zz ) ) * sx; + te[ 1 ] = ( xy + wz ) * sx; + te[ 2 ] = ( xz - wy ) * sx; + te[ 3 ] = 0; + + te[ 4 ] = ( xy - wz ) * sy; + te[ 5 ] = ( 1 - ( xx + zz ) ) * sy; + te[ 6 ] = ( yz + wx ) * sy; + te[ 7 ] = 0; + + te[ 8 ] = ( xz + wy ) * sz; + te[ 9 ] = ( yz - wx ) * sz; + te[ 10 ] = ( 1 - ( xx + yy ) ) * sz; + te[ 11 ] = 0; + + te[ 12 ] = position.x; + te[ 13 ] = position.y; + te[ 14 ] = position.z; + te[ 15 ] = 1; + + return this; + + } + + decompose( position, quaternion, scale ) { + + const te = this.elements; + + let sx = _v1$5.set( te[ 0 ], te[ 1 ], te[ 2 ] ).length(); + const sy = _v1$5.set( te[ 4 ], te[ 5 ], te[ 6 ] ).length(); + const sz = _v1$5.set( te[ 8 ], te[ 9 ], te[ 10 ] ).length(); + + // if determine is negative, we need to invert one scale + const det = this.determinant(); + if ( det < 0 ) sx = - sx; + + position.x = te[ 12 ]; + position.y = te[ 13 ]; + position.z = te[ 14 ]; + + // scale the rotation part + _m1$4.copy( this ); + + const invSX = 1 / sx; + const invSY = 1 / sy; + const invSZ = 1 / sz; + + _m1$4.elements[ 0 ] *= invSX; + _m1$4.elements[ 1 ] *= invSX; + _m1$4.elements[ 2 ] *= invSX; + + _m1$4.elements[ 4 ] *= invSY; + _m1$4.elements[ 5 ] *= invSY; + _m1$4.elements[ 6 ] *= invSY; + + _m1$4.elements[ 8 ] *= invSZ; + _m1$4.elements[ 9 ] *= invSZ; + _m1$4.elements[ 10 ] *= invSZ; + + quaternion.setFromRotationMatrix( _m1$4 ); + + scale.x = sx; + scale.y = sy; + scale.z = sz; + + return this; + + } + + makePerspective( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem ) { + + const te = this.elements; + const x = 2 * near / ( right - left ); + const y = 2 * near / ( top - bottom ); + + const a = ( right + left ) / ( right - left ); + const b = ( top + bottom ) / ( top - bottom ); + + let c, d; + + if ( coordinateSystem === WebGLCoordinateSystem ) { + + c = - ( far + near ) / ( far - near ); + d = ( - 2 * far * near ) / ( far - near ); + + } else if ( coordinateSystem === WebGPUCoordinateSystem ) { + + c = - far / ( far - near ); + d = ( - far * near ) / ( far - near ); + + } else { + + throw new Error( 'THREE.Matrix4.makePerspective(): Invalid coordinate system: ' + coordinateSystem ); + + } + + te[ 0 ] = x; te[ 4 ] = 0; te[ 8 ] = a; te[ 12 ] = 0; + te[ 1 ] = 0; te[ 5 ] = y; te[ 9 ] = b; te[ 13 ] = 0; + te[ 2 ] = 0; te[ 6 ] = 0; te[ 10 ] = c; te[ 14 ] = d; + te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = - 1; te[ 15 ] = 0; + + return this; + + } + + makeOrthographic( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem ) { + + const te = this.elements; + const w = 1.0 / ( right - left ); + const h = 1.0 / ( top - bottom ); + const p = 1.0 / ( far - near ); + + const x = ( right + left ) * w; + const y = ( top + bottom ) * h; + + let z, zInv; + + if ( coordinateSystem === WebGLCoordinateSystem ) { + + z = ( far + near ) * p; + zInv = - 2 * p; + + } else if ( coordinateSystem === WebGPUCoordinateSystem ) { + + z = near * p; + zInv = - 1 * p; + + } else { + + throw new Error( 'THREE.Matrix4.makeOrthographic(): Invalid coordinate system: ' + coordinateSystem ); + + } + + te[ 0 ] = 2 * w; te[ 4 ] = 0; te[ 8 ] = 0; te[ 12 ] = - x; + te[ 1 ] = 0; te[ 5 ] = 2 * h; te[ 9 ] = 0; te[ 13 ] = - y; + te[ 2 ] = 0; te[ 6 ] = 0; te[ 10 ] = zInv; te[ 14 ] = - z; + te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = 0; te[ 15 ] = 1; + + return this; + + } + + equals( matrix ) { + + const te = this.elements; + const me = matrix.elements; + + for ( let i = 0; i < 16; i ++ ) { + + if ( te[ i ] !== me[ i ] ) return false; + + } + + return true; + + } + + fromArray( array, offset = 0 ) { + + for ( let i = 0; i < 16; i ++ ) { + + this.elements[ i ] = array[ i + offset ]; + + } + + return this; + + } + + toArray( array = [], offset = 0 ) { + + const te = this.elements; + + array[ offset ] = te[ 0 ]; + array[ offset + 1 ] = te[ 1 ]; + array[ offset + 2 ] = te[ 2 ]; + array[ offset + 3 ] = te[ 3 ]; + + array[ offset + 4 ] = te[ 4 ]; + array[ offset + 5 ] = te[ 5 ]; + array[ offset + 6 ] = te[ 6 ]; + array[ offset + 7 ] = te[ 7 ]; + + array[ offset + 8 ] = te[ 8 ]; + array[ offset + 9 ] = te[ 9 ]; + array[ offset + 10 ] = te[ 10 ]; + array[ offset + 11 ] = te[ 11 ]; + + array[ offset + 12 ] = te[ 12 ]; + array[ offset + 13 ] = te[ 13 ]; + array[ offset + 14 ] = te[ 14 ]; + array[ offset + 15 ] = te[ 15 ]; + + return array; + + } + +} + +const _v1$5 = /*@__PURE__*/ new Vector3(); +const _m1$4 = /*@__PURE__*/ new Matrix4(); +const _zero = /*@__PURE__*/ new Vector3( 0, 0, 0 ); +const _one = /*@__PURE__*/ new Vector3( 1, 1, 1 ); +const _x = /*@__PURE__*/ new Vector3(); +const _y = /*@__PURE__*/ new Vector3(); +const _z = /*@__PURE__*/ new Vector3(); + +const _matrix$2 = /*@__PURE__*/ new Matrix4(); +const _quaternion$3 = /*@__PURE__*/ new Quaternion(); + +class Euler { + + constructor( x = 0, y = 0, z = 0, order = Euler.DEFAULT_ORDER ) { + + this.isEuler = true; + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + } + + get x() { + + return this._x; + + } + + set x( value ) { + + this._x = value; + this._onChangeCallback(); + + } + + get y() { + + return this._y; + + } + + set y( value ) { + + this._y = value; + this._onChangeCallback(); + + } + + get z() { + + return this._z; + + } + + set z( value ) { + + this._z = value; + this._onChangeCallback(); + + } + + get order() { + + return this._order; + + } + + set order( value ) { + + this._order = value; + this._onChangeCallback(); + + } + + set( x, y, z, order = this._order ) { + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + this._onChangeCallback(); + + return this; + + } + + clone() { + + return new this.constructor( this._x, this._y, this._z, this._order ); + + } + + copy( euler ) { + + this._x = euler._x; + this._y = euler._y; + this._z = euler._z; + this._order = euler._order; + + this._onChangeCallback(); + + return this; + + } + + setFromRotationMatrix( m, order = this._order, update = true ) { + + // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) + + const te = m.elements; + const m11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ]; + const m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ]; + const m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ]; + + switch ( order ) { + + case 'XYZ': + + this._y = Math.asin( clamp( m13, - 1, 1 ) ); + + if ( Math.abs( m13 ) < 0.9999999 ) { + + this._x = Math.atan2( - m23, m33 ); + this._z = Math.atan2( - m12, m11 ); + + } else { + + this._x = Math.atan2( m32, m22 ); + this._z = 0; + + } + + break; + + case 'YXZ': + + this._x = Math.asin( - clamp( m23, - 1, 1 ) ); + + if ( Math.abs( m23 ) < 0.9999999 ) { + + this._y = Math.atan2( m13, m33 ); + this._z = Math.atan2( m21, m22 ); + + } else { + + this._y = Math.atan2( - m31, m11 ); + this._z = 0; + + } + + break; + + case 'ZXY': + + this._x = Math.asin( clamp( m32, - 1, 1 ) ); + + if ( Math.abs( m32 ) < 0.9999999 ) { + + this._y = Math.atan2( - m31, m33 ); + this._z = Math.atan2( - m12, m22 ); + + } else { + + this._y = 0; + this._z = Math.atan2( m21, m11 ); + + } + + break; + + case 'ZYX': + + this._y = Math.asin( - clamp( m31, - 1, 1 ) ); + + if ( Math.abs( m31 ) < 0.9999999 ) { + + this._x = Math.atan2( m32, m33 ); + this._z = Math.atan2( m21, m11 ); + + } else { + + this._x = 0; + this._z = Math.atan2( - m12, m22 ); + + } + + break; + + case 'YZX': + + this._z = Math.asin( clamp( m21, - 1, 1 ) ); + + if ( Math.abs( m21 ) < 0.9999999 ) { + + this._x = Math.atan2( - m23, m22 ); + this._y = Math.atan2( - m31, m11 ); + + } else { + + this._x = 0; + this._y = Math.atan2( m13, m33 ); + + } + + break; + + case 'XZY': + + this._z = Math.asin( - clamp( m12, - 1, 1 ) ); + + if ( Math.abs( m12 ) < 0.9999999 ) { + + this._x = Math.atan2( m32, m22 ); + this._y = Math.atan2( m13, m11 ); + + } else { + + this._x = Math.atan2( - m23, m33 ); + this._y = 0; + + } + + break; + + default: + + console.warn( 'THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ' + order ); + + } + + this._order = order; + + if ( update === true ) this._onChangeCallback(); + + return this; + + } + + setFromQuaternion( q, order, update ) { + + _matrix$2.makeRotationFromQuaternion( q ); + + return this.setFromRotationMatrix( _matrix$2, order, update ); + + } + + setFromVector3( v, order = this._order ) { + + return this.set( v.x, v.y, v.z, order ); + + } + + reorder( newOrder ) { + + // WARNING: this discards revolution information -bhouston + + _quaternion$3.setFromEuler( this ); + + return this.setFromQuaternion( _quaternion$3, newOrder ); + + } + + equals( euler ) { + + return ( euler._x === this._x ) && ( euler._y === this._y ) && ( euler._z === this._z ) && ( euler._order === this._order ); + + } + + fromArray( array ) { + + this._x = array[ 0 ]; + this._y = array[ 1 ]; + this._z = array[ 2 ]; + if ( array[ 3 ] !== undefined ) this._order = array[ 3 ]; + + this._onChangeCallback(); + + return this; + + } + + toArray( array = [], offset = 0 ) { + + array[ offset ] = this._x; + array[ offset + 1 ] = this._y; + array[ offset + 2 ] = this._z; + array[ offset + 3 ] = this._order; + + return array; + + } + + _onChange( callback ) { + + this._onChangeCallback = callback; + + return this; + + } + + _onChangeCallback() {} + + *[ Symbol.iterator ]() { + + yield this._x; + yield this._y; + yield this._z; + yield this._order; + + } + +} + +Euler.DEFAULT_ORDER = 'XYZ'; + +class Layers { + + constructor() { + + this.mask = 1 | 0; + + } + + set( channel ) { + + this.mask = ( 1 << channel | 0 ) >>> 0; + + } + + enable( channel ) { + + this.mask |= 1 << channel | 0; + + } + + enableAll() { + + this.mask = 0xffffffff | 0; + + } + + toggle( channel ) { + + this.mask ^= 1 << channel | 0; + + } + + disable( channel ) { + + this.mask &= ~ ( 1 << channel | 0 ); + + } + + disableAll() { + + this.mask = 0; + + } + + test( layers ) { + + return ( this.mask & layers.mask ) !== 0; + + } + + isEnabled( channel ) { + + return ( this.mask & ( 1 << channel | 0 ) ) !== 0; + + } + +} + +let _object3DId = 0; + +const _v1$4 = /*@__PURE__*/ new Vector3(); +const _q1 = /*@__PURE__*/ new Quaternion(); +const _m1$3 = /*@__PURE__*/ new Matrix4(); +const _target = /*@__PURE__*/ new Vector3(); + +const _position$3 = /*@__PURE__*/ new Vector3(); +const _scale$2 = /*@__PURE__*/ new Vector3(); +const _quaternion$2 = /*@__PURE__*/ new Quaternion(); + +const _xAxis = /*@__PURE__*/ new Vector3( 1, 0, 0 ); +const _yAxis = /*@__PURE__*/ new Vector3( 0, 1, 0 ); +const _zAxis = /*@__PURE__*/ new Vector3( 0, 0, 1 ); + +const _addedEvent = { type: 'added' }; +const _removedEvent = { type: 'removed' }; + +const _childaddedEvent = { type: 'childadded', child: null }; +const _childremovedEvent = { type: 'childremoved', child: null }; + +class Object3D extends EventDispatcher { + + constructor() { + + super(); + + this.isObject3D = true; + + Object.defineProperty( this, 'id', { value: _object3DId ++ } ); + + this.uuid = generateUUID(); + + this.name = ''; + this.type = 'Object3D'; + + this.parent = null; + this.children = []; + + this.up = Object3D.DEFAULT_UP.clone(); + + const position = new Vector3(); + const rotation = new Euler(); + const quaternion = new Quaternion(); + const scale = new Vector3( 1, 1, 1 ); + + function onRotationChange() { + + quaternion.setFromEuler( rotation, false ); + + } + + function onQuaternionChange() { + + rotation.setFromQuaternion( quaternion, undefined, false ); + + } + + rotation._onChange( onRotationChange ); + quaternion._onChange( onQuaternionChange ); + + Object.defineProperties( this, { + position: { + configurable: true, + enumerable: true, + value: position + }, + rotation: { + configurable: true, + enumerable: true, + value: rotation + }, + quaternion: { + configurable: true, + enumerable: true, + value: quaternion + }, + scale: { + configurable: true, + enumerable: true, + value: scale + }, + modelViewMatrix: { + value: new Matrix4() + }, + normalMatrix: { + value: new Matrix3() + } + } ); + + this.matrix = new Matrix4(); + this.matrixWorld = new Matrix4(); + + this.matrixAutoUpdate = Object3D.DEFAULT_MATRIX_AUTO_UPDATE; + + this.matrixWorldAutoUpdate = Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE; // checked by the renderer + this.matrixWorldNeedsUpdate = false; + + this.layers = new Layers(); + this.visible = true; + + this.castShadow = false; + this.receiveShadow = false; + + this.frustumCulled = true; + this.renderOrder = 0; + + this.animations = []; + + this.userData = {}; + + } + + onBeforeShadow( /* renderer, object, camera, shadowCamera, geometry, depthMaterial, group */ ) {} + + onAfterShadow( /* renderer, object, camera, shadowCamera, geometry, depthMaterial, group */ ) {} + + onBeforeRender( /* renderer, scene, camera, geometry, material, group */ ) {} + + onAfterRender( /* renderer, scene, camera, geometry, material, group */ ) {} + + applyMatrix4( matrix ) { + + if ( this.matrixAutoUpdate ) this.updateMatrix(); + + this.matrix.premultiply( matrix ); + + this.matrix.decompose( this.position, this.quaternion, this.scale ); + + } + + applyQuaternion( q ) { + + this.quaternion.premultiply( q ); + + return this; + + } + + setRotationFromAxisAngle( axis, angle ) { + + // assumes axis is normalized + + this.quaternion.setFromAxisAngle( axis, angle ); + + } + + setRotationFromEuler( euler ) { + + this.quaternion.setFromEuler( euler, true ); + + } + + setRotationFromMatrix( m ) { + + // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) + + this.quaternion.setFromRotationMatrix( m ); + + } + + setRotationFromQuaternion( q ) { + + // assumes q is normalized + + this.quaternion.copy( q ); + + } + + rotateOnAxis( axis, angle ) { + + // rotate object on axis in object space + // axis is assumed to be normalized + + _q1.setFromAxisAngle( axis, angle ); + + this.quaternion.multiply( _q1 ); + + return this; + + } + + rotateOnWorldAxis( axis, angle ) { + + // rotate object on axis in world space + // axis is assumed to be normalized + // method assumes no rotated parent + + _q1.setFromAxisAngle( axis, angle ); + + this.quaternion.premultiply( _q1 ); + + return this; + + } + + rotateX( angle ) { + + return this.rotateOnAxis( _xAxis, angle ); + + } + + rotateY( angle ) { + + return this.rotateOnAxis( _yAxis, angle ); + + } + + rotateZ( angle ) { + + return this.rotateOnAxis( _zAxis, angle ); + + } + + translateOnAxis( axis, distance ) { + + // translate object by distance along axis in object space + // axis is assumed to be normalized + + _v1$4.copy( axis ).applyQuaternion( this.quaternion ); + + this.position.add( _v1$4.multiplyScalar( distance ) ); + + return this; + + } + + translateX( distance ) { + + return this.translateOnAxis( _xAxis, distance ); + + } + + translateY( distance ) { + + return this.translateOnAxis( _yAxis, distance ); + + } + + translateZ( distance ) { + + return this.translateOnAxis( _zAxis, distance ); + + } + + localToWorld( vector ) { + + this.updateWorldMatrix( true, false ); + + return vector.applyMatrix4( this.matrixWorld ); + + } + + worldToLocal( vector ) { + + this.updateWorldMatrix( true, false ); + + return vector.applyMatrix4( _m1$3.copy( this.matrixWorld ).invert() ); + + } + + lookAt( x, y, z ) { + + // This method does not support objects having non-uniformly-scaled parent(s) + + if ( x.isVector3 ) { + + _target.copy( x ); + + } else { + + _target.set( x, y, z ); + + } + + const parent = this.parent; + + this.updateWorldMatrix( true, false ); + + _position$3.setFromMatrixPosition( this.matrixWorld ); + + if ( this.isCamera || this.isLight ) { + + _m1$3.lookAt( _position$3, _target, this.up ); + + } else { + + _m1$3.lookAt( _target, _position$3, this.up ); + + } + + this.quaternion.setFromRotationMatrix( _m1$3 ); + + if ( parent ) { + + _m1$3.extractRotation( parent.matrixWorld ); + _q1.setFromRotationMatrix( _m1$3 ); + this.quaternion.premultiply( _q1.invert() ); + + } + + } + + add( object ) { + + if ( arguments.length > 1 ) { + + for ( let i = 0; i < arguments.length; i ++ ) { + + this.add( arguments[ i ] ); + + } + + return this; + + } + + if ( object === this ) { + + console.error( 'THREE.Object3D.add: object can\'t be added as a child of itself.', object ); + return this; + + } + + if ( object && object.isObject3D ) { + + object.removeFromParent(); + object.parent = this; + this.children.push( object ); + + object.dispatchEvent( _addedEvent ); + + _childaddedEvent.child = object; + this.dispatchEvent( _childaddedEvent ); + _childaddedEvent.child = null; + + } else { + + console.error( 'THREE.Object3D.add: object not an instance of THREE.Object3D.', object ); + + } + + return this; + + } + + remove( object ) { + + if ( arguments.length > 1 ) { + + for ( let i = 0; i < arguments.length; i ++ ) { + + this.remove( arguments[ i ] ); + + } + + return this; + + } + + const index = this.children.indexOf( object ); + + if ( index !== - 1 ) { + + object.parent = null; + this.children.splice( index, 1 ); + + object.dispatchEvent( _removedEvent ); + + _childremovedEvent.child = object; + this.dispatchEvent( _childremovedEvent ); + _childremovedEvent.child = null; + + } + + return this; + + } + + removeFromParent() { + + const parent = this.parent; + + if ( parent !== null ) { + + parent.remove( this ); + + } + + return this; + + } + + clear() { + + return this.remove( ... this.children ); + + } + + attach( object ) { + + // adds object as a child of this, while maintaining the object's world transform + + // Note: This method does not support scene graphs having non-uniformly-scaled nodes(s) + + this.updateWorldMatrix( true, false ); + + _m1$3.copy( this.matrixWorld ).invert(); + + if ( object.parent !== null ) { + + object.parent.updateWorldMatrix( true, false ); + + _m1$3.multiply( object.parent.matrixWorld ); + + } + + object.applyMatrix4( _m1$3 ); + + object.removeFromParent(); + object.parent = this; + this.children.push( object ); + + object.updateWorldMatrix( false, true ); + + object.dispatchEvent( _addedEvent ); + + _childaddedEvent.child = object; + this.dispatchEvent( _childaddedEvent ); + _childaddedEvent.child = null; + + return this; + + } + + getObjectById( id ) { + + return this.getObjectByProperty( 'id', id ); + + } + + getObjectByName( name ) { + + return this.getObjectByProperty( 'name', name ); + + } + + getObjectByProperty( name, value ) { + + if ( this[ name ] === value ) return this; + + for ( let i = 0, l = this.children.length; i < l; i ++ ) { + + const child = this.children[ i ]; + const object = child.getObjectByProperty( name, value ); + + if ( object !== undefined ) { + + return object; + + } + + } + + return undefined; + + } + + getObjectsByProperty( name, value, result = [] ) { + + if ( this[ name ] === value ) result.push( this ); + + const children = this.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + children[ i ].getObjectsByProperty( name, value, result ); + + } + + return result; + + } + + getWorldPosition( target ) { + + this.updateWorldMatrix( true, false ); + + return target.setFromMatrixPosition( this.matrixWorld ); + + } + + getWorldQuaternion( target ) { + + this.updateWorldMatrix( true, false ); + + this.matrixWorld.decompose( _position$3, target, _scale$2 ); + + return target; + + } + + getWorldScale( target ) { + + this.updateWorldMatrix( true, false ); + + this.matrixWorld.decompose( _position$3, _quaternion$2, target ); + + return target; + + } + + getWorldDirection( target ) { + + this.updateWorldMatrix( true, false ); + + const e = this.matrixWorld.elements; + + return target.set( e[ 8 ], e[ 9 ], e[ 10 ] ).normalize(); + + } + + raycast( /* raycaster, intersects */ ) {} + + traverse( callback ) { + + callback( this ); + + const children = this.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + children[ i ].traverse( callback ); + + } + + } + + traverseVisible( callback ) { + + if ( this.visible === false ) return; + + callback( this ); + + const children = this.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + children[ i ].traverseVisible( callback ); + + } + + } + + traverseAncestors( callback ) { + + const parent = this.parent; + + if ( parent !== null ) { + + callback( parent ); + + parent.traverseAncestors( callback ); + + } + + } + + updateMatrix() { + + this.matrix.compose( this.position, this.quaternion, this.scale ); + + this.matrixWorldNeedsUpdate = true; + + } + + updateMatrixWorld( force ) { + + if ( this.matrixAutoUpdate ) this.updateMatrix(); + + if ( this.matrixWorldNeedsUpdate || force ) { + + if ( this.parent === null ) { + + this.matrixWorld.copy( this.matrix ); + + } else { + + this.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix ); + + } + + this.matrixWorldNeedsUpdate = false; + + force = true; + + } + + // update children + + const children = this.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + const child = children[ i ]; + + if ( child.matrixWorldAutoUpdate === true || force === true ) { + + child.updateMatrixWorld( force ); + + } + + } + + } + + updateWorldMatrix( updateParents, updateChildren ) { + + const parent = this.parent; + + if ( updateParents === true && parent !== null && parent.matrixWorldAutoUpdate === true ) { + + parent.updateWorldMatrix( true, false ); + + } + + if ( this.matrixAutoUpdate ) this.updateMatrix(); + + if ( this.parent === null ) { + + this.matrixWorld.copy( this.matrix ); + + } else { + + this.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix ); + + } + + // update children + + if ( updateChildren === true ) { + + const children = this.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + const child = children[ i ]; + + if ( child.matrixWorldAutoUpdate === true ) { + + child.updateWorldMatrix( false, true ); + + } + + } + + } + + } + + toJSON( meta ) { + + // meta is a string when called from JSON.stringify + const isRootObject = ( meta === undefined || typeof meta === 'string' ); + + const output = {}; + + // meta is a hash used to collect geometries, materials. + // not providing it implies that this is the root object + // being serialized. + if ( isRootObject ) { + + // initialize meta obj + meta = { + geometries: {}, + materials: {}, + textures: {}, + images: {}, + shapes: {}, + skeletons: {}, + animations: {}, + nodes: {} + }; + + output.metadata = { + version: 4.6, + type: 'Object', + generator: 'Object3D.toJSON' + }; + + } + + // standard Object3D serialization + + const object = {}; + + object.uuid = this.uuid; + object.type = this.type; + + if ( this.name !== '' ) object.name = this.name; + if ( this.castShadow === true ) object.castShadow = true; + if ( this.receiveShadow === true ) object.receiveShadow = true; + if ( this.visible === false ) object.visible = false; + if ( this.frustumCulled === false ) object.frustumCulled = false; + if ( this.renderOrder !== 0 ) object.renderOrder = this.renderOrder; + if ( Object.keys( this.userData ).length > 0 ) object.userData = this.userData; + + object.layers = this.layers.mask; + object.matrix = this.matrix.toArray(); + object.up = this.up.toArray(); + + if ( this.matrixAutoUpdate === false ) object.matrixAutoUpdate = false; + + // object specific properties + + if ( this.isInstancedMesh ) { + + object.type = 'InstancedMesh'; + object.count = this.count; + object.instanceMatrix = this.instanceMatrix.toJSON(); + if ( this.instanceColor !== null ) object.instanceColor = this.instanceColor.toJSON(); + + } + + if ( this.isBatchedMesh ) { + + object.type = 'BatchedMesh'; + object.perObjectFrustumCulled = this.perObjectFrustumCulled; + object.sortObjects = this.sortObjects; + + object.drawRanges = this._drawRanges; + object.reservedRanges = this._reservedRanges; + + object.visibility = this._visibility; + object.active = this._active; + object.bounds = this._bounds.map( bound => ( { + boxInitialized: bound.boxInitialized, + boxMin: bound.box.min.toArray(), + boxMax: bound.box.max.toArray(), + + sphereInitialized: bound.sphereInitialized, + sphereRadius: bound.sphere.radius, + sphereCenter: bound.sphere.center.toArray() + } ) ); + + object.maxGeometryCount = this._maxGeometryCount; + object.maxVertexCount = this._maxVertexCount; + object.maxIndexCount = this._maxIndexCount; + + object.geometryInitialized = this._geometryInitialized; + object.geometryCount = this._geometryCount; + + object.matricesTexture = this._matricesTexture.toJSON( meta ); + + if ( this.boundingSphere !== null ) { + + object.boundingSphere = { + center: object.boundingSphere.center.toArray(), + radius: object.boundingSphere.radius + }; + + } + + if ( this.boundingBox !== null ) { + + object.boundingBox = { + min: object.boundingBox.min.toArray(), + max: object.boundingBox.max.toArray() + }; + + } + + } + + // + + function serialize( library, element ) { + + if ( library[ element.uuid ] === undefined ) { + + library[ element.uuid ] = element.toJSON( meta ); + + } + + return element.uuid; + + } + + if ( this.isScene ) { + + if ( this.background ) { + + if ( this.background.isColor ) { + + object.background = this.background.toJSON(); + + } else if ( this.background.isTexture ) { + + object.background = this.background.toJSON( meta ).uuid; + + } + + } + + if ( this.environment && this.environment.isTexture && this.environment.isRenderTargetTexture !== true ) { + + object.environment = this.environment.toJSON( meta ).uuid; + + } + + } else if ( this.isMesh || this.isLine || this.isPoints ) { + + object.geometry = serialize( meta.geometries, this.geometry ); + + const parameters = this.geometry.parameters; + + if ( parameters !== undefined && parameters.shapes !== undefined ) { + + const shapes = parameters.shapes; + + if ( Array.isArray( shapes ) ) { + + for ( let i = 0, l = shapes.length; i < l; i ++ ) { + + const shape = shapes[ i ]; + + serialize( meta.shapes, shape ); + + } + + } else { + + serialize( meta.shapes, shapes ); + + } + + } + + } + + if ( this.isSkinnedMesh ) { + + object.bindMode = this.bindMode; + object.bindMatrix = this.bindMatrix.toArray(); + + if ( this.skeleton !== undefined ) { + + serialize( meta.skeletons, this.skeleton ); + + object.skeleton = this.skeleton.uuid; + + } + + } + + if ( this.material !== undefined ) { + + if ( Array.isArray( this.material ) ) { + + const uuids = []; + + for ( let i = 0, l = this.material.length; i < l; i ++ ) { + + uuids.push( serialize( meta.materials, this.material[ i ] ) ); + + } + + object.material = uuids; + + } else { + + object.material = serialize( meta.materials, this.material ); + + } + + } + + // + + if ( this.children.length > 0 ) { + + object.children = []; + + for ( let i = 0; i < this.children.length; i ++ ) { + + object.children.push( this.children[ i ].toJSON( meta ).object ); + + } + + } + + // + + if ( this.animations.length > 0 ) { + + object.animations = []; + + for ( let i = 0; i < this.animations.length; i ++ ) { + + const animation = this.animations[ i ]; + + object.animations.push( serialize( meta.animations, animation ) ); + + } + + } + + if ( isRootObject ) { + + const geometries = extractFromCache( meta.geometries ); + const materials = extractFromCache( meta.materials ); + const textures = extractFromCache( meta.textures ); + const images = extractFromCache( meta.images ); + const shapes = extractFromCache( meta.shapes ); + const skeletons = extractFromCache( meta.skeletons ); + const animations = extractFromCache( meta.animations ); + const nodes = extractFromCache( meta.nodes ); + + if ( geometries.length > 0 ) output.geometries = geometries; + if ( materials.length > 0 ) output.materials = materials; + if ( textures.length > 0 ) output.textures = textures; + if ( images.length > 0 ) output.images = images; + if ( shapes.length > 0 ) output.shapes = shapes; + if ( skeletons.length > 0 ) output.skeletons = skeletons; + if ( animations.length > 0 ) output.animations = animations; + if ( nodes.length > 0 ) output.nodes = nodes; + + } + + output.object = object; + + return output; + + // extract data from the cache hash + // remove metadata on each item + // and return as array + function extractFromCache( cache ) { + + const values = []; + for ( const key in cache ) { + + const data = cache[ key ]; + delete data.metadata; + values.push( data ); + + } + + return values; + + } + + } + + clone( recursive ) { + + return new this.constructor().copy( this, recursive ); + + } + + copy( source, recursive = true ) { + + this.name = source.name; + + this.up.copy( source.up ); + + this.position.copy( source.position ); + this.rotation.order = source.rotation.order; + this.quaternion.copy( source.quaternion ); + this.scale.copy( source.scale ); + + this.matrix.copy( source.matrix ); + this.matrixWorld.copy( source.matrixWorld ); + + this.matrixAutoUpdate = source.matrixAutoUpdate; + + this.matrixWorldAutoUpdate = source.matrixWorldAutoUpdate; + this.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate; + + this.layers.mask = source.layers.mask; + this.visible = source.visible; + + this.castShadow = source.castShadow; + this.receiveShadow = source.receiveShadow; + + this.frustumCulled = source.frustumCulled; + this.renderOrder = source.renderOrder; + + this.animations = source.animations.slice(); + + this.userData = JSON.parse( JSON.stringify( source.userData ) ); + + if ( recursive === true ) { + + for ( let i = 0; i < source.children.length; i ++ ) { + + const child = source.children[ i ]; + this.add( child.clone() ); + + } + + } + + return this; + + } + +} + +Object3D.DEFAULT_UP = /*@__PURE__*/ new Vector3( 0, 1, 0 ); +Object3D.DEFAULT_MATRIX_AUTO_UPDATE = true; +Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = true; + +const _v0$1 = /*@__PURE__*/ new Vector3(); +const _v1$3 = /*@__PURE__*/ new Vector3(); +const _v2$2 = /*@__PURE__*/ new Vector3(); +const _v3$2 = /*@__PURE__*/ new Vector3(); + +const _vab = /*@__PURE__*/ new Vector3(); +const _vac = /*@__PURE__*/ new Vector3(); +const _vbc = /*@__PURE__*/ new Vector3(); +const _vap = /*@__PURE__*/ new Vector3(); +const _vbp = /*@__PURE__*/ new Vector3(); +const _vcp = /*@__PURE__*/ new Vector3(); + +class Triangle { + + constructor( a = new Vector3(), b = new Vector3(), c = new Vector3() ) { + + this.a = a; + this.b = b; + this.c = c; + + } + + static getNormal( a, b, c, target ) { + + target.subVectors( c, b ); + _v0$1.subVectors( a, b ); + target.cross( _v0$1 ); + + const targetLengthSq = target.lengthSq(); + if ( targetLengthSq > 0 ) { + + return target.multiplyScalar( 1 / Math.sqrt( targetLengthSq ) ); + + } + + return target.set( 0, 0, 0 ); + + } + + // static/instance method to calculate barycentric coordinates + // based on: http://www.blackpawn.com/texts/pointinpoly/default.html + static getBarycoord( point, a, b, c, target ) { + + _v0$1.subVectors( c, a ); + _v1$3.subVectors( b, a ); + _v2$2.subVectors( point, a ); + + const dot00 = _v0$1.dot( _v0$1 ); + const dot01 = _v0$1.dot( _v1$3 ); + const dot02 = _v0$1.dot( _v2$2 ); + const dot11 = _v1$3.dot( _v1$3 ); + const dot12 = _v1$3.dot( _v2$2 ); + + const denom = ( dot00 * dot11 - dot01 * dot01 ); + + // collinear or singular triangle + if ( denom === 0 ) { + + target.set( 0, 0, 0 ); + return null; + + } + + const invDenom = 1 / denom; + const u = ( dot11 * dot02 - dot01 * dot12 ) * invDenom; + const v = ( dot00 * dot12 - dot01 * dot02 ) * invDenom; + + // barycentric coordinates must always sum to 1 + return target.set( 1 - u - v, v, u ); + + } + + static containsPoint( point, a, b, c ) { + + // if the triangle is degenerate then we can't contain a point + if ( this.getBarycoord( point, a, b, c, _v3$2 ) === null ) { + + return false; + + } + + return ( _v3$2.x >= 0 ) && ( _v3$2.y >= 0 ) && ( ( _v3$2.x + _v3$2.y ) <= 1 ); + + } + + static getInterpolation( point, p1, p2, p3, v1, v2, v3, target ) { + + if ( this.getBarycoord( point, p1, p2, p3, _v3$2 ) === null ) { + + target.x = 0; + target.y = 0; + if ( 'z' in target ) target.z = 0; + if ( 'w' in target ) target.w = 0; + return null; + + } + + target.setScalar( 0 ); + target.addScaledVector( v1, _v3$2.x ); + target.addScaledVector( v2, _v3$2.y ); + target.addScaledVector( v3, _v3$2.z ); + + return target; + + } + + static isFrontFacing( a, b, c, direction ) { + + _v0$1.subVectors( c, b ); + _v1$3.subVectors( a, b ); + + // strictly front facing + return ( _v0$1.cross( _v1$3 ).dot( direction ) < 0 ) ? true : false; + + } + + set( a, b, c ) { + + this.a.copy( a ); + this.b.copy( b ); + this.c.copy( c ); + + return this; + + } + + setFromPointsAndIndices( points, i0, i1, i2 ) { + + this.a.copy( points[ i0 ] ); + this.b.copy( points[ i1 ] ); + this.c.copy( points[ i2 ] ); + + return this; + + } + + setFromAttributeAndIndices( attribute, i0, i1, i2 ) { + + this.a.fromBufferAttribute( attribute, i0 ); + this.b.fromBufferAttribute( attribute, i1 ); + this.c.fromBufferAttribute( attribute, i2 ); + + return this; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( triangle ) { + + this.a.copy( triangle.a ); + this.b.copy( triangle.b ); + this.c.copy( triangle.c ); + + return this; + + } + + getArea() { + + _v0$1.subVectors( this.c, this.b ); + _v1$3.subVectors( this.a, this.b ); + + return _v0$1.cross( _v1$3 ).length() * 0.5; + + } + + getMidpoint( target ) { + + return target.addVectors( this.a, this.b ).add( this.c ).multiplyScalar( 1 / 3 ); + + } + + getNormal( target ) { + + return Triangle.getNormal( this.a, this.b, this.c, target ); + + } + + getPlane( target ) { + + return target.setFromCoplanarPoints( this.a, this.b, this.c ); + + } + + getBarycoord( point, target ) { + + return Triangle.getBarycoord( point, this.a, this.b, this.c, target ); + + } + + getInterpolation( point, v1, v2, v3, target ) { + + return Triangle.getInterpolation( point, this.a, this.b, this.c, v1, v2, v3, target ); + + } + + containsPoint( point ) { + + return Triangle.containsPoint( point, this.a, this.b, this.c ); + + } + + isFrontFacing( direction ) { + + return Triangle.isFrontFacing( this.a, this.b, this.c, direction ); + + } + + intersectsBox( box ) { + + return box.intersectsTriangle( this ); + + } + + closestPointToPoint( p, target ) { + + const a = this.a, b = this.b, c = this.c; + let v, w; + + // algorithm thanks to Real-Time Collision Detection by Christer Ericson, + // published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc., + // under the accompanying license; see chapter 5.1.5 for detailed explanation. + // basically, we're distinguishing which of the voronoi regions of the triangle + // the point lies in with the minimum amount of redundant computation. + + _vab.subVectors( b, a ); + _vac.subVectors( c, a ); + _vap.subVectors( p, a ); + const d1 = _vab.dot( _vap ); + const d2 = _vac.dot( _vap ); + if ( d1 <= 0 && d2 <= 0 ) { + + // vertex region of A; barycentric coords (1, 0, 0) + return target.copy( a ); + + } + + _vbp.subVectors( p, b ); + const d3 = _vab.dot( _vbp ); + const d4 = _vac.dot( _vbp ); + if ( d3 >= 0 && d4 <= d3 ) { + + // vertex region of B; barycentric coords (0, 1, 0) + return target.copy( b ); + + } + + const vc = d1 * d4 - d3 * d2; + if ( vc <= 0 && d1 >= 0 && d3 <= 0 ) { + + v = d1 / ( d1 - d3 ); + // edge region of AB; barycentric coords (1-v, v, 0) + return target.copy( a ).addScaledVector( _vab, v ); + + } + + _vcp.subVectors( p, c ); + const d5 = _vab.dot( _vcp ); + const d6 = _vac.dot( _vcp ); + if ( d6 >= 0 && d5 <= d6 ) { + + // vertex region of C; barycentric coords (0, 0, 1) + return target.copy( c ); + + } + + const vb = d5 * d2 - d1 * d6; + if ( vb <= 0 && d2 >= 0 && d6 <= 0 ) { + + w = d2 / ( d2 - d6 ); + // edge region of AC; barycentric coords (1-w, 0, w) + return target.copy( a ).addScaledVector( _vac, w ); + + } + + const va = d3 * d6 - d5 * d4; + if ( va <= 0 && ( d4 - d3 ) >= 0 && ( d5 - d6 ) >= 0 ) { + + _vbc.subVectors( c, b ); + w = ( d4 - d3 ) / ( ( d4 - d3 ) + ( d5 - d6 ) ); + // edge region of BC; barycentric coords (0, 1-w, w) + return target.copy( b ).addScaledVector( _vbc, w ); // edge region of BC + + } + + // face region + const denom = 1 / ( va + vb + vc ); + // u = va * denom + v = vb * denom; + w = vc * denom; + + return target.copy( a ).addScaledVector( _vab, v ).addScaledVector( _vac, w ); + + } + + equals( triangle ) { + + return triangle.a.equals( this.a ) && triangle.b.equals( this.b ) && triangle.c.equals( this.c ); + + } + +} + +const _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF, + 'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2, + 'brown': 0xA52A2A, 'burlywood': 0xDEB887, 'cadetblue': 0x5F9EA0, 'chartreuse': 0x7FFF00, 'chocolate': 0xD2691E, 'coral': 0xFF7F50, + 'cornflowerblue': 0x6495ED, 'cornsilk': 0xFFF8DC, 'crimson': 0xDC143C, 'cyan': 0x00FFFF, 'darkblue': 0x00008B, 'darkcyan': 0x008B8B, + 'darkgoldenrod': 0xB8860B, 'darkgray': 0xA9A9A9, 'darkgreen': 0x006400, 'darkgrey': 0xA9A9A9, 'darkkhaki': 0xBDB76B, 'darkmagenta': 0x8B008B, + 'darkolivegreen': 0x556B2F, 'darkorange': 0xFF8C00, 'darkorchid': 0x9932CC, 'darkred': 0x8B0000, 'darksalmon': 0xE9967A, 'darkseagreen': 0x8FBC8F, + 'darkslateblue': 0x483D8B, 'darkslategray': 0x2F4F4F, 'darkslategrey': 0x2F4F4F, 'darkturquoise': 0x00CED1, 'darkviolet': 0x9400D3, + 'deeppink': 0xFF1493, 'deepskyblue': 0x00BFFF, 'dimgray': 0x696969, 'dimgrey': 0x696969, 'dodgerblue': 0x1E90FF, 'firebrick': 0xB22222, + 'floralwhite': 0xFFFAF0, 'forestgreen': 0x228B22, 'fuchsia': 0xFF00FF, 'gainsboro': 0xDCDCDC, 'ghostwhite': 0xF8F8FF, 'gold': 0xFFD700, + 'goldenrod': 0xDAA520, 'gray': 0x808080, 'green': 0x008000, 'greenyellow': 0xADFF2F, 'grey': 0x808080, 'honeydew': 0xF0FFF0, 'hotpink': 0xFF69B4, + 'indianred': 0xCD5C5C, 'indigo': 0x4B0082, 'ivory': 0xFFFFF0, 'khaki': 0xF0E68C, 'lavender': 0xE6E6FA, 'lavenderblush': 0xFFF0F5, 'lawngreen': 0x7CFC00, + 'lemonchiffon': 0xFFFACD, 'lightblue': 0xADD8E6, 'lightcoral': 0xF08080, 'lightcyan': 0xE0FFFF, 'lightgoldenrodyellow': 0xFAFAD2, 'lightgray': 0xD3D3D3, + 'lightgreen': 0x90EE90, 'lightgrey': 0xD3D3D3, 'lightpink': 0xFFB6C1, 'lightsalmon': 0xFFA07A, 'lightseagreen': 0x20B2AA, 'lightskyblue': 0x87CEFA, + 'lightslategray': 0x778899, 'lightslategrey': 0x778899, 'lightsteelblue': 0xB0C4DE, 'lightyellow': 0xFFFFE0, 'lime': 0x00FF00, 'limegreen': 0x32CD32, + 'linen': 0xFAF0E6, 'magenta': 0xFF00FF, 'maroon': 0x800000, 'mediumaquamarine': 0x66CDAA, 'mediumblue': 0x0000CD, 'mediumorchid': 0xBA55D3, + 'mediumpurple': 0x9370DB, 'mediumseagreen': 0x3CB371, 'mediumslateblue': 0x7B68EE, 'mediumspringgreen': 0x00FA9A, 'mediumturquoise': 0x48D1CC, + 'mediumvioletred': 0xC71585, 'midnightblue': 0x191970, 'mintcream': 0xF5FFFA, 'mistyrose': 0xFFE4E1, 'moccasin': 0xFFE4B5, 'navajowhite': 0xFFDEAD, + 'navy': 0x000080, 'oldlace': 0xFDF5E6, 'olive': 0x808000, 'olivedrab': 0x6B8E23, 'orange': 0xFFA500, 'orangered': 0xFF4500, 'orchid': 0xDA70D6, + 'palegoldenrod': 0xEEE8AA, 'palegreen': 0x98FB98, 'paleturquoise': 0xAFEEEE, 'palevioletred': 0xDB7093, 'papayawhip': 0xFFEFD5, 'peachpuff': 0xFFDAB9, + 'peru': 0xCD853F, 'pink': 0xFFC0CB, 'plum': 0xDDA0DD, 'powderblue': 0xB0E0E6, 'purple': 0x800080, 'rebeccapurple': 0x663399, 'red': 0xFF0000, 'rosybrown': 0xBC8F8F, + 'royalblue': 0x4169E1, 'saddlebrown': 0x8B4513, 'salmon': 0xFA8072, 'sandybrown': 0xF4A460, 'seagreen': 0x2E8B57, 'seashell': 0xFFF5EE, + 'sienna': 0xA0522D, 'silver': 0xC0C0C0, 'skyblue': 0x87CEEB, 'slateblue': 0x6A5ACD, 'slategray': 0x708090, 'slategrey': 0x708090, 'snow': 0xFFFAFA, + 'springgreen': 0x00FF7F, 'steelblue': 0x4682B4, 'tan': 0xD2B48C, 'teal': 0x008080, 'thistle': 0xD8BFD8, 'tomato': 0xFF6347, 'turquoise': 0x40E0D0, + 'violet': 0xEE82EE, 'wheat': 0xF5DEB3, 'white': 0xFFFFFF, 'whitesmoke': 0xF5F5F5, 'yellow': 0xFFFF00, 'yellowgreen': 0x9ACD32 }; + +const _hslA = { h: 0, s: 0, l: 0 }; +const _hslB = { h: 0, s: 0, l: 0 }; + +function hue2rgb( p, q, t ) { + + if ( t < 0 ) t += 1; + if ( t > 1 ) t -= 1; + if ( t < 1 / 6 ) return p + ( q - p ) * 6 * t; + if ( t < 1 / 2 ) return q; + if ( t < 2 / 3 ) return p + ( q - p ) * 6 * ( 2 / 3 - t ); + return p; + +} + +class Color { + + constructor( r, g, b ) { + + this.isColor = true; + + this.r = 1; + this.g = 1; + this.b = 1; + + return this.set( r, g, b ); + + } + + set( r, g, b ) { + + if ( g === undefined && b === undefined ) { + + // r is THREE.Color, hex or string + + const value = r; + + if ( value && value.isColor ) { + + this.copy( value ); + + } else if ( typeof value === 'number' ) { + + this.setHex( value ); + + } else if ( typeof value === 'string' ) { + + this.setStyle( value ); + + } + + } else { + + this.setRGB( r, g, b ); + + } + + return this; + + } + + setScalar( scalar ) { + + this.r = scalar; + this.g = scalar; + this.b = scalar; + + return this; + + } + + setHex( hex, colorSpace = SRGBColorSpace ) { + + hex = Math.floor( hex ); + + this.r = ( hex >> 16 & 255 ) / 255; + this.g = ( hex >> 8 & 255 ) / 255; + this.b = ( hex & 255 ) / 255; + + ColorManagement.toWorkingColorSpace( this, colorSpace ); + + return this; + + } + + setRGB( r, g, b, colorSpace = ColorManagement.workingColorSpace ) { + + this.r = r; + this.g = g; + this.b = b; + + ColorManagement.toWorkingColorSpace( this, colorSpace ); + + return this; + + } + + setHSL( h, s, l, colorSpace = ColorManagement.workingColorSpace ) { + + // h,s,l ranges are in 0.0 - 1.0 + h = euclideanModulo( h, 1 ); + s = clamp( s, 0, 1 ); + l = clamp( l, 0, 1 ); + + if ( s === 0 ) { + + this.r = this.g = this.b = l; + + } else { + + const p = l <= 0.5 ? l * ( 1 + s ) : l + s - ( l * s ); + const q = ( 2 * l ) - p; + + this.r = hue2rgb( q, p, h + 1 / 3 ); + this.g = hue2rgb( q, p, h ); + this.b = hue2rgb( q, p, h - 1 / 3 ); + + } + + ColorManagement.toWorkingColorSpace( this, colorSpace ); + + return this; + + } + + setStyle( style, colorSpace = SRGBColorSpace ) { + + function handleAlpha( string ) { + + if ( string === undefined ) return; + + if ( parseFloat( string ) < 1 ) { + + console.warn( 'THREE.Color: Alpha component of ' + style + ' will be ignored.' ); + + } + + } + + + let m; + + if ( m = /^(\w+)\(([^\)]*)\)/.exec( style ) ) { + + // rgb / hsl + + let color; + const name = m[ 1 ]; + const components = m[ 2 ]; + + switch ( name ) { + + case 'rgb': + case 'rgba': + + if ( color = /^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( components ) ) { + + // rgb(255,0,0) rgba(255,0,0,0.5) + + handleAlpha( color[ 4 ] ); + + return this.setRGB( + Math.min( 255, parseInt( color[ 1 ], 10 ) ) / 255, + Math.min( 255, parseInt( color[ 2 ], 10 ) ) / 255, + Math.min( 255, parseInt( color[ 3 ], 10 ) ) / 255, + colorSpace + ); + + } + + if ( color = /^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( components ) ) { + + // rgb(100%,0%,0%) rgba(100%,0%,0%,0.5) + + handleAlpha( color[ 4 ] ); + + return this.setRGB( + Math.min( 100, parseInt( color[ 1 ], 10 ) ) / 100, + Math.min( 100, parseInt( color[ 2 ], 10 ) ) / 100, + Math.min( 100, parseInt( color[ 3 ], 10 ) ) / 100, + colorSpace + ); + + } + + break; + + case 'hsl': + case 'hsla': + + if ( color = /^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( components ) ) { + + // hsl(120,50%,50%) hsla(120,50%,50%,0.5) + + handleAlpha( color[ 4 ] ); + + return this.setHSL( + parseFloat( color[ 1 ] ) / 360, + parseFloat( color[ 2 ] ) / 100, + parseFloat( color[ 3 ] ) / 100, + colorSpace + ); + + } + + break; + + default: + + console.warn( 'THREE.Color: Unknown color model ' + style ); + + } + + } else if ( m = /^\#([A-Fa-f\d]+)$/.exec( style ) ) { + + // hex color + + const hex = m[ 1 ]; + const size = hex.length; + + if ( size === 3 ) { + + // #ff0 + return this.setRGB( + parseInt( hex.charAt( 0 ), 16 ) / 15, + parseInt( hex.charAt( 1 ), 16 ) / 15, + parseInt( hex.charAt( 2 ), 16 ) / 15, + colorSpace + ); + + } else if ( size === 6 ) { + + // #ff0000 + return this.setHex( parseInt( hex, 16 ), colorSpace ); + + } else { + + console.warn( 'THREE.Color: Invalid hex color ' + style ); + + } + + } else if ( style && style.length > 0 ) { + + return this.setColorName( style, colorSpace ); + + } + + return this; + + } + + setColorName( style, colorSpace = SRGBColorSpace ) { + + // color keywords + const hex = _colorKeywords[ style.toLowerCase() ]; + + if ( hex !== undefined ) { + + // red + this.setHex( hex, colorSpace ); + + } else { + + // unknown color + console.warn( 'THREE.Color: Unknown color ' + style ); + + } + + return this; + + } + + clone() { + + return new this.constructor( this.r, this.g, this.b ); + + } + + copy( color ) { + + this.r = color.r; + this.g = color.g; + this.b = color.b; + + return this; + + } + + copySRGBToLinear( color ) { + + this.r = SRGBToLinear( color.r ); + this.g = SRGBToLinear( color.g ); + this.b = SRGBToLinear( color.b ); + + return this; + + } + + copyLinearToSRGB( color ) { + + this.r = LinearToSRGB( color.r ); + this.g = LinearToSRGB( color.g ); + this.b = LinearToSRGB( color.b ); + + return this; + + } + + convertSRGBToLinear() { + + this.copySRGBToLinear( this ); + + return this; + + } + + convertLinearToSRGB() { + + this.copyLinearToSRGB( this ); + + return this; + + } + + getHex( colorSpace = SRGBColorSpace ) { + + ColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace ); + + return Math.round( clamp( _color.r * 255, 0, 255 ) ) * 65536 + Math.round( clamp( _color.g * 255, 0, 255 ) ) * 256 + Math.round( clamp( _color.b * 255, 0, 255 ) ); + + } + + getHexString( colorSpace = SRGBColorSpace ) { + + return ( '000000' + this.getHex( colorSpace ).toString( 16 ) ).slice( - 6 ); + + } + + getHSL( target, colorSpace = ColorManagement.workingColorSpace ) { + + // h,s,l ranges are in 0.0 - 1.0 + + ColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace ); + + const r = _color.r, g = _color.g, b = _color.b; + + const max = Math.max( r, g, b ); + const min = Math.min( r, g, b ); + + let hue, saturation; + const lightness = ( min + max ) / 2.0; + + if ( min === max ) { + + hue = 0; + saturation = 0; + + } else { + + const delta = max - min; + + saturation = lightness <= 0.5 ? delta / ( max + min ) : delta / ( 2 - max - min ); + + switch ( max ) { + + case r: hue = ( g - b ) / delta + ( g < b ? 6 : 0 ); break; + case g: hue = ( b - r ) / delta + 2; break; + case b: hue = ( r - g ) / delta + 4; break; + + } + + hue /= 6; + + } + + target.h = hue; + target.s = saturation; + target.l = lightness; + + return target; + + } + + getRGB( target, colorSpace = ColorManagement.workingColorSpace ) { + + ColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace ); + + target.r = _color.r; + target.g = _color.g; + target.b = _color.b; + + return target; + + } + + getStyle( colorSpace = SRGBColorSpace ) { + + ColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace ); + + const r = _color.r, g = _color.g, b = _color.b; + + if ( colorSpace !== SRGBColorSpace ) { + + // Requires CSS Color Module Level 4 (https://www.w3.org/TR/css-color-4/). + return `color(${ colorSpace } ${ r.toFixed( 3 ) } ${ g.toFixed( 3 ) } ${ b.toFixed( 3 ) })`; + + } + + return `rgb(${ Math.round( r * 255 ) },${ Math.round( g * 255 ) },${ Math.round( b * 255 ) })`; + + } + + offsetHSL( h, s, l ) { + + this.getHSL( _hslA ); + + return this.setHSL( _hslA.h + h, _hslA.s + s, _hslA.l + l ); + + } + + add( color ) { + + this.r += color.r; + this.g += color.g; + this.b += color.b; + + return this; + + } + + addColors( color1, color2 ) { + + this.r = color1.r + color2.r; + this.g = color1.g + color2.g; + this.b = color1.b + color2.b; + + return this; + + } + + addScalar( s ) { + + this.r += s; + this.g += s; + this.b += s; + + return this; + + } + + sub( color ) { + + this.r = Math.max( 0, this.r - color.r ); + this.g = Math.max( 0, this.g - color.g ); + this.b = Math.max( 0, this.b - color.b ); + + return this; + + } + + multiply( color ) { + + this.r *= color.r; + this.g *= color.g; + this.b *= color.b; + + return this; + + } + + multiplyScalar( s ) { + + this.r *= s; + this.g *= s; + this.b *= s; + + return this; + + } + + lerp( color, alpha ) { + + this.r += ( color.r - this.r ) * alpha; + this.g += ( color.g - this.g ) * alpha; + this.b += ( color.b - this.b ) * alpha; + + return this; + + } + + lerpColors( color1, color2, alpha ) { + + this.r = color1.r + ( color2.r - color1.r ) * alpha; + this.g = color1.g + ( color2.g - color1.g ) * alpha; + this.b = color1.b + ( color2.b - color1.b ) * alpha; + + return this; + + } + + lerpHSL( color, alpha ) { + + this.getHSL( _hslA ); + color.getHSL( _hslB ); + + const h = lerp( _hslA.h, _hslB.h, alpha ); + const s = lerp( _hslA.s, _hslB.s, alpha ); + const l = lerp( _hslA.l, _hslB.l, alpha ); + + this.setHSL( h, s, l ); + + return this; + + } + + setFromVector3( v ) { + + this.r = v.x; + this.g = v.y; + this.b = v.z; + + return this; + + } + + applyMatrix3( m ) { + + const r = this.r, g = this.g, b = this.b; + const e = m.elements; + + this.r = e[ 0 ] * r + e[ 3 ] * g + e[ 6 ] * b; + this.g = e[ 1 ] * r + e[ 4 ] * g + e[ 7 ] * b; + this.b = e[ 2 ] * r + e[ 5 ] * g + e[ 8 ] * b; + + return this; + + } + + equals( c ) { + + return ( c.r === this.r ) && ( c.g === this.g ) && ( c.b === this.b ); + + } + + fromArray( array, offset = 0 ) { + + this.r = array[ offset ]; + this.g = array[ offset + 1 ]; + this.b = array[ offset + 2 ]; + + return this; + + } + + toArray( array = [], offset = 0 ) { + + array[ offset ] = this.r; + array[ offset + 1 ] = this.g; + array[ offset + 2 ] = this.b; + + return array; + + } + + fromBufferAttribute( attribute, index ) { + + this.r = attribute.getX( index ); + this.g = attribute.getY( index ); + this.b = attribute.getZ( index ); + + return this; + + } + + toJSON() { + + return this.getHex(); + + } + + *[ Symbol.iterator ]() { + + yield this.r; + yield this.g; + yield this.b; + + } + +} + +const _color = /*@__PURE__*/ new Color(); + +Color.NAMES = _colorKeywords; + +let _materialId = 0; + +class Material extends EventDispatcher { + + constructor() { + + super(); + + this.isMaterial = true; + + Object.defineProperty( this, 'id', { value: _materialId ++ } ); + + this.uuid = generateUUID(); + + this.name = ''; + this.type = 'Material'; + + this.blending = NormalBlending; + this.side = FrontSide; + this.vertexColors = false; + + this.opacity = 1; + this.transparent = false; + this.alphaHash = false; + + this.blendSrc = SrcAlphaFactor; + this.blendDst = OneMinusSrcAlphaFactor; + this.blendEquation = AddEquation; + this.blendSrcAlpha = null; + this.blendDstAlpha = null; + this.blendEquationAlpha = null; + this.blendColor = new Color( 0, 0, 0 ); + this.blendAlpha = 0; + + this.depthFunc = LessEqualDepth; + this.depthTest = true; + this.depthWrite = true; + + this.stencilWriteMask = 0xff; + this.stencilFunc = AlwaysStencilFunc; + this.stencilRef = 0; + this.stencilFuncMask = 0xff; + this.stencilFail = KeepStencilOp; + this.stencilZFail = KeepStencilOp; + this.stencilZPass = KeepStencilOp; + this.stencilWrite = false; + + this.clippingPlanes = null; + this.clipIntersection = false; + this.clipShadows = false; + + this.shadowSide = null; + + this.colorWrite = true; + + this.precision = null; // override the renderer's default precision for this material + + this.polygonOffset = false; + this.polygonOffsetFactor = 0; + this.polygonOffsetUnits = 0; + + this.dithering = false; + + this.alphaToCoverage = false; + this.premultipliedAlpha = false; + this.forceSinglePass = false; + + this.visible = true; + + this.toneMapped = true; + + this.userData = {}; + + this.version = 0; + + this._alphaTest = 0; + + } + + get alphaTest() { + + return this._alphaTest; + + } + + set alphaTest( value ) { + + if ( this._alphaTest > 0 !== value > 0 ) { + + this.version ++; + + } + + this._alphaTest = value; + + } + + onBuild( /* shaderobject, renderer */ ) {} + + onBeforeRender( /* renderer, scene, camera, geometry, object, group */ ) {} + + onBeforeCompile( /* shaderobject, renderer */ ) {} + + customProgramCacheKey() { + + return this.onBeforeCompile.toString(); + + } + + setValues( values ) { + + if ( values === undefined ) return; + + for ( const key in values ) { + + const newValue = values[ key ]; + + if ( newValue === undefined ) { + + console.warn( `THREE.Material: parameter '${ key }' has value of undefined.` ); + continue; + + } + + const currentValue = this[ key ]; + + if ( currentValue === undefined ) { + + console.warn( `THREE.Material: '${ key }' is not a property of THREE.${ this.type }.` ); + continue; + + } + + if ( currentValue && currentValue.isColor ) { + + currentValue.set( newValue ); + + } else if ( ( currentValue && currentValue.isVector3 ) && ( newValue && newValue.isVector3 ) ) { + + currentValue.copy( newValue ); + + } else { + + this[ key ] = newValue; + + } + + } + + } + + toJSON( meta ) { + + const isRootObject = ( meta === undefined || typeof meta === 'string' ); + + if ( isRootObject ) { + + meta = { + textures: {}, + images: {} + }; + + } + + const data = { + metadata: { + version: 4.6, + type: 'Material', + generator: 'Material.toJSON' + } + }; + + // standard Material serialization + data.uuid = this.uuid; + data.type = this.type; + + if ( this.name !== '' ) data.name = this.name; + + if ( this.color && this.color.isColor ) data.color = this.color.getHex(); + + if ( this.roughness !== undefined ) data.roughness = this.roughness; + if ( this.metalness !== undefined ) data.metalness = this.metalness; + + if ( this.sheen !== undefined ) data.sheen = this.sheen; + if ( this.sheenColor && this.sheenColor.isColor ) data.sheenColor = this.sheenColor.getHex(); + if ( this.sheenRoughness !== undefined ) data.sheenRoughness = this.sheenRoughness; + if ( this.emissive && this.emissive.isColor ) data.emissive = this.emissive.getHex(); + if ( this.emissiveIntensity !== undefined && this.emissiveIntensity !== 1 ) data.emissiveIntensity = this.emissiveIntensity; + + if ( this.specular && this.specular.isColor ) data.specular = this.specular.getHex(); + if ( this.specularIntensity !== undefined ) data.specularIntensity = this.specularIntensity; + if ( this.specularColor && this.specularColor.isColor ) data.specularColor = this.specularColor.getHex(); + if ( this.shininess !== undefined ) data.shininess = this.shininess; + if ( this.clearcoat !== undefined ) data.clearcoat = this.clearcoat; + if ( this.clearcoatRoughness !== undefined ) data.clearcoatRoughness = this.clearcoatRoughness; + + if ( this.clearcoatMap && this.clearcoatMap.isTexture ) { + + data.clearcoatMap = this.clearcoatMap.toJSON( meta ).uuid; + + } + + if ( this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture ) { + + data.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON( meta ).uuid; + + } + + if ( this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture ) { + + data.clearcoatNormalMap = this.clearcoatNormalMap.toJSON( meta ).uuid; + data.clearcoatNormalScale = this.clearcoatNormalScale.toArray(); + + } + + if ( this.dispersion !== undefined ) data.dispersion = this.dispersion; + + if ( this.iridescence !== undefined ) data.iridescence = this.iridescence; + if ( this.iridescenceIOR !== undefined ) data.iridescenceIOR = this.iridescenceIOR; + if ( this.iridescenceThicknessRange !== undefined ) data.iridescenceThicknessRange = this.iridescenceThicknessRange; + + if ( this.iridescenceMap && this.iridescenceMap.isTexture ) { + + data.iridescenceMap = this.iridescenceMap.toJSON( meta ).uuid; + + } + + if ( this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture ) { + + data.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON( meta ).uuid; + + } + + if ( this.anisotropy !== undefined ) data.anisotropy = this.anisotropy; + if ( this.anisotropyRotation !== undefined ) data.anisotropyRotation = this.anisotropyRotation; + + if ( this.anisotropyMap && this.anisotropyMap.isTexture ) { + + data.anisotropyMap = this.anisotropyMap.toJSON( meta ).uuid; + + } + + if ( this.map && this.map.isTexture ) data.map = this.map.toJSON( meta ).uuid; + if ( this.matcap && this.matcap.isTexture ) data.matcap = this.matcap.toJSON( meta ).uuid; + if ( this.alphaMap && this.alphaMap.isTexture ) data.alphaMap = this.alphaMap.toJSON( meta ).uuid; + + if ( this.lightMap && this.lightMap.isTexture ) { + + data.lightMap = this.lightMap.toJSON( meta ).uuid; + data.lightMapIntensity = this.lightMapIntensity; + + } + + if ( this.aoMap && this.aoMap.isTexture ) { + + data.aoMap = this.aoMap.toJSON( meta ).uuid; + data.aoMapIntensity = this.aoMapIntensity; + + } + + if ( this.bumpMap && this.bumpMap.isTexture ) { + + data.bumpMap = this.bumpMap.toJSON( meta ).uuid; + data.bumpScale = this.bumpScale; + + } + + if ( this.normalMap && this.normalMap.isTexture ) { + + data.normalMap = this.normalMap.toJSON( meta ).uuid; + data.normalMapType = this.normalMapType; + data.normalScale = this.normalScale.toArray(); + + } + + if ( this.displacementMap && this.displacementMap.isTexture ) { + + data.displacementMap = this.displacementMap.toJSON( meta ).uuid; + data.displacementScale = this.displacementScale; + data.displacementBias = this.displacementBias; + + } + + if ( this.roughnessMap && this.roughnessMap.isTexture ) data.roughnessMap = this.roughnessMap.toJSON( meta ).uuid; + if ( this.metalnessMap && this.metalnessMap.isTexture ) data.metalnessMap = this.metalnessMap.toJSON( meta ).uuid; + + if ( this.emissiveMap && this.emissiveMap.isTexture ) data.emissiveMap = this.emissiveMap.toJSON( meta ).uuid; + if ( this.specularMap && this.specularMap.isTexture ) data.specularMap = this.specularMap.toJSON( meta ).uuid; + if ( this.specularIntensityMap && this.specularIntensityMap.isTexture ) data.specularIntensityMap = this.specularIntensityMap.toJSON( meta ).uuid; + if ( this.specularColorMap && this.specularColorMap.isTexture ) data.specularColorMap = this.specularColorMap.toJSON( meta ).uuid; + + if ( this.envMap && this.envMap.isTexture ) { + + data.envMap = this.envMap.toJSON( meta ).uuid; + + if ( this.combine !== undefined ) data.combine = this.combine; + + } + + if ( this.envMapRotation !== undefined ) data.envMapRotation = this.envMapRotation.toArray(); + if ( this.envMapIntensity !== undefined ) data.envMapIntensity = this.envMapIntensity; + if ( this.reflectivity !== undefined ) data.reflectivity = this.reflectivity; + if ( this.refractionRatio !== undefined ) data.refractionRatio = this.refractionRatio; + + if ( this.gradientMap && this.gradientMap.isTexture ) { + + data.gradientMap = this.gradientMap.toJSON( meta ).uuid; + + } + + if ( this.transmission !== undefined ) data.transmission = this.transmission; + if ( this.transmissionMap && this.transmissionMap.isTexture ) data.transmissionMap = this.transmissionMap.toJSON( meta ).uuid; + if ( this.thickness !== undefined ) data.thickness = this.thickness; + if ( this.thicknessMap && this.thicknessMap.isTexture ) data.thicknessMap = this.thicknessMap.toJSON( meta ).uuid; + if ( this.attenuationDistance !== undefined && this.attenuationDistance !== Infinity ) data.attenuationDistance = this.attenuationDistance; + if ( this.attenuationColor !== undefined ) data.attenuationColor = this.attenuationColor.getHex(); + + if ( this.size !== undefined ) data.size = this.size; + if ( this.shadowSide !== null ) data.shadowSide = this.shadowSide; + if ( this.sizeAttenuation !== undefined ) data.sizeAttenuation = this.sizeAttenuation; + + if ( this.blending !== NormalBlending ) data.blending = this.blending; + if ( this.side !== FrontSide ) data.side = this.side; + if ( this.vertexColors === true ) data.vertexColors = true; + + if ( this.opacity < 1 ) data.opacity = this.opacity; + if ( this.transparent === true ) data.transparent = true; + + if ( this.blendSrc !== SrcAlphaFactor ) data.blendSrc = this.blendSrc; + if ( this.blendDst !== OneMinusSrcAlphaFactor ) data.blendDst = this.blendDst; + if ( this.blendEquation !== AddEquation ) data.blendEquation = this.blendEquation; + if ( this.blendSrcAlpha !== null ) data.blendSrcAlpha = this.blendSrcAlpha; + if ( this.blendDstAlpha !== null ) data.blendDstAlpha = this.blendDstAlpha; + if ( this.blendEquationAlpha !== null ) data.blendEquationAlpha = this.blendEquationAlpha; + if ( this.blendColor && this.blendColor.isColor ) data.blendColor = this.blendColor.getHex(); + if ( this.blendAlpha !== 0 ) data.blendAlpha = this.blendAlpha; + + if ( this.depthFunc !== LessEqualDepth ) data.depthFunc = this.depthFunc; + if ( this.depthTest === false ) data.depthTest = this.depthTest; + if ( this.depthWrite === false ) data.depthWrite = this.depthWrite; + if ( this.colorWrite === false ) data.colorWrite = this.colorWrite; + + if ( this.stencilWriteMask !== 0xff ) data.stencilWriteMask = this.stencilWriteMask; + if ( this.stencilFunc !== AlwaysStencilFunc ) data.stencilFunc = this.stencilFunc; + if ( this.stencilRef !== 0 ) data.stencilRef = this.stencilRef; + if ( this.stencilFuncMask !== 0xff ) data.stencilFuncMask = this.stencilFuncMask; + if ( this.stencilFail !== KeepStencilOp ) data.stencilFail = this.stencilFail; + if ( this.stencilZFail !== KeepStencilOp ) data.stencilZFail = this.stencilZFail; + if ( this.stencilZPass !== KeepStencilOp ) data.stencilZPass = this.stencilZPass; + if ( this.stencilWrite === true ) data.stencilWrite = this.stencilWrite; + + // rotation (SpriteMaterial) + if ( this.rotation !== undefined && this.rotation !== 0 ) data.rotation = this.rotation; + + if ( this.polygonOffset === true ) data.polygonOffset = true; + if ( this.polygonOffsetFactor !== 0 ) data.polygonOffsetFactor = this.polygonOffsetFactor; + if ( this.polygonOffsetUnits !== 0 ) data.polygonOffsetUnits = this.polygonOffsetUnits; + + if ( this.linewidth !== undefined && this.linewidth !== 1 ) data.linewidth = this.linewidth; + if ( this.dashSize !== undefined ) data.dashSize = this.dashSize; + if ( this.gapSize !== undefined ) data.gapSize = this.gapSize; + if ( this.scale !== undefined ) data.scale = this.scale; + + if ( this.dithering === true ) data.dithering = true; + + if ( this.alphaTest > 0 ) data.alphaTest = this.alphaTest; + if ( this.alphaHash === true ) data.alphaHash = true; + if ( this.alphaToCoverage === true ) data.alphaToCoverage = true; + if ( this.premultipliedAlpha === true ) data.premultipliedAlpha = true; + if ( this.forceSinglePass === true ) data.forceSinglePass = true; + + if ( this.wireframe === true ) data.wireframe = true; + if ( this.wireframeLinewidth > 1 ) data.wireframeLinewidth = this.wireframeLinewidth; + if ( this.wireframeLinecap !== 'round' ) data.wireframeLinecap = this.wireframeLinecap; + if ( this.wireframeLinejoin !== 'round' ) data.wireframeLinejoin = this.wireframeLinejoin; + + if ( this.flatShading === true ) data.flatShading = true; + + if ( this.visible === false ) data.visible = false; + + if ( this.toneMapped === false ) data.toneMapped = false; + + if ( this.fog === false ) data.fog = false; + + if ( Object.keys( this.userData ).length > 0 ) data.userData = this.userData; + + // TODO: Copied from Object3D.toJSON + + function extractFromCache( cache ) { + + const values = []; + + for ( const key in cache ) { + + const data = cache[ key ]; + delete data.metadata; + values.push( data ); + + } + + return values; + + } + + if ( isRootObject ) { + + const textures = extractFromCache( meta.textures ); + const images = extractFromCache( meta.images ); + + if ( textures.length > 0 ) data.textures = textures; + if ( images.length > 0 ) data.images = images; + + } + + return data; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( source ) { + + this.name = source.name; + + this.blending = source.blending; + this.side = source.side; + this.vertexColors = source.vertexColors; + + this.opacity = source.opacity; + this.transparent = source.transparent; + + this.blendSrc = source.blendSrc; + this.blendDst = source.blendDst; + this.blendEquation = source.blendEquation; + this.blendSrcAlpha = source.blendSrcAlpha; + this.blendDstAlpha = source.blendDstAlpha; + this.blendEquationAlpha = source.blendEquationAlpha; + this.blendColor.copy( source.blendColor ); + this.blendAlpha = source.blendAlpha; + + this.depthFunc = source.depthFunc; + this.depthTest = source.depthTest; + this.depthWrite = source.depthWrite; + + this.stencilWriteMask = source.stencilWriteMask; + this.stencilFunc = source.stencilFunc; + this.stencilRef = source.stencilRef; + this.stencilFuncMask = source.stencilFuncMask; + this.stencilFail = source.stencilFail; + this.stencilZFail = source.stencilZFail; + this.stencilZPass = source.stencilZPass; + this.stencilWrite = source.stencilWrite; + + const srcPlanes = source.clippingPlanes; + let dstPlanes = null; + + if ( srcPlanes !== null ) { + + const n = srcPlanes.length; + dstPlanes = new Array( n ); + + for ( let i = 0; i !== n; ++ i ) { + + dstPlanes[ i ] = srcPlanes[ i ].clone(); + + } + + } + + this.clippingPlanes = dstPlanes; + this.clipIntersection = source.clipIntersection; + this.clipShadows = source.clipShadows; + + this.shadowSide = source.shadowSide; + + this.colorWrite = source.colorWrite; + + this.precision = source.precision; + + this.polygonOffset = source.polygonOffset; + this.polygonOffsetFactor = source.polygonOffsetFactor; + this.polygonOffsetUnits = source.polygonOffsetUnits; + + this.dithering = source.dithering; + + this.alphaTest = source.alphaTest; + this.alphaHash = source.alphaHash; + this.alphaToCoverage = source.alphaToCoverage; + this.premultipliedAlpha = source.premultipliedAlpha; + this.forceSinglePass = source.forceSinglePass; + + this.visible = source.visible; + + this.toneMapped = source.toneMapped; + + this.userData = JSON.parse( JSON.stringify( source.userData ) ); + + return this; + + } + + dispose() { + + this.dispatchEvent( { type: 'dispose' } ); + + } + + set needsUpdate( value ) { + + if ( value === true ) this.version ++; + + } + +} + +class MeshBasicMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshBasicMaterial = true; + + this.type = 'MeshBasicMaterial'; + + this.color = new Color( 0xffffff ); // emissive + + this.map = null; + + this.lightMap = null; + this.lightMapIntensity = 1.0; + + this.aoMap = null; + this.aoMapIntensity = 1.0; + + this.specularMap = null; + + this.alphaMap = null; + + this.envMap = null; + this.envMapRotation = new Euler(); + this.combine = MultiplyOperation; + this.reflectivity = 1; + this.refractionRatio = 0.98; + + this.wireframe = false; + this.wireframeLinewidth = 1; + this.wireframeLinecap = 'round'; + this.wireframeLinejoin = 'round'; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.map = source.map; + + this.lightMap = source.lightMap; + this.lightMapIntensity = source.lightMapIntensity; + + this.aoMap = source.aoMap; + this.aoMapIntensity = source.aoMapIntensity; + + this.specularMap = source.specularMap; + + this.alphaMap = source.alphaMap; + + this.envMap = source.envMap; + this.envMapRotation.copy( source.envMapRotation ); + this.combine = source.combine; + this.reflectivity = source.reflectivity; + this.refractionRatio = source.refractionRatio; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + this.wireframeLinecap = source.wireframeLinecap; + this.wireframeLinejoin = source.wireframeLinejoin; + + this.fog = source.fog; + + return this; + + } + +} + +// Fast Half Float Conversions, http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf + +const _tables = /*@__PURE__*/ _generateTables(); + +function _generateTables() { + + // float32 to float16 helpers + + const buffer = new ArrayBuffer( 4 ); + const floatView = new Float32Array( buffer ); + const uint32View = new Uint32Array( buffer ); + + const baseTable = new Uint32Array( 512 ); + const shiftTable = new Uint32Array( 512 ); + + for ( let i = 0; i < 256; ++ i ) { + + const e = i - 127; + + // very small number (0, -0) + + if ( e < - 27 ) { + + baseTable[ i ] = 0x0000; + baseTable[ i | 0x100 ] = 0x8000; + shiftTable[ i ] = 24; + shiftTable[ i | 0x100 ] = 24; + + // small number (denorm) + + } else if ( e < - 14 ) { + + baseTable[ i ] = 0x0400 >> ( - e - 14 ); + baseTable[ i | 0x100 ] = ( 0x0400 >> ( - e - 14 ) ) | 0x8000; + shiftTable[ i ] = - e - 1; + shiftTable[ i | 0x100 ] = - e - 1; + + // normal number + + } else if ( e <= 15 ) { + + baseTable[ i ] = ( e + 15 ) << 10; + baseTable[ i | 0x100 ] = ( ( e + 15 ) << 10 ) | 0x8000; + shiftTable[ i ] = 13; + shiftTable[ i | 0x100 ] = 13; + + // large number (Infinity, -Infinity) + + } else if ( e < 128 ) { + + baseTable[ i ] = 0x7c00; + baseTable[ i | 0x100 ] = 0xfc00; + shiftTable[ i ] = 24; + shiftTable[ i | 0x100 ] = 24; + + // stay (NaN, Infinity, -Infinity) + + } else { + + baseTable[ i ] = 0x7c00; + baseTable[ i | 0x100 ] = 0xfc00; + shiftTable[ i ] = 13; + shiftTable[ i | 0x100 ] = 13; + + } + + } + + // float16 to float32 helpers + + const mantissaTable = new Uint32Array( 2048 ); + const exponentTable = new Uint32Array( 64 ); + const offsetTable = new Uint32Array( 64 ); + + for ( let i = 1; i < 1024; ++ i ) { + + let m = i << 13; // zero pad mantissa bits + let e = 0; // zero exponent + + // normalized + while ( ( m & 0x00800000 ) === 0 ) { + + m <<= 1; + e -= 0x00800000; // decrement exponent + + } + + m &= ~ 0x00800000; // clear leading 1 bit + e += 0x38800000; // adjust bias + + mantissaTable[ i ] = m | e; + + } + + for ( let i = 1024; i < 2048; ++ i ) { + + mantissaTable[ i ] = 0x38000000 + ( ( i - 1024 ) << 13 ); + + } + + for ( let i = 1; i < 31; ++ i ) { + + exponentTable[ i ] = i << 23; + + } + + exponentTable[ 31 ] = 0x47800000; + exponentTable[ 32 ] = 0x80000000; + + for ( let i = 33; i < 63; ++ i ) { + + exponentTable[ i ] = 0x80000000 + ( ( i - 32 ) << 23 ); + + } + + exponentTable[ 63 ] = 0xc7800000; + + for ( let i = 1; i < 64; ++ i ) { + + if ( i !== 32 ) { + + offsetTable[ i ] = 1024; + + } + + } + + return { + floatView: floatView, + uint32View: uint32View, + baseTable: baseTable, + shiftTable: shiftTable, + mantissaTable: mantissaTable, + exponentTable: exponentTable, + offsetTable: offsetTable + }; + +} + +// float32 to float16 + +function toHalfFloat( val ) { + + if ( Math.abs( val ) > 65504 ) console.warn( 'THREE.DataUtils.toHalfFloat(): Value out of range.' ); + + val = clamp( val, - 65504, 65504 ); + + _tables.floatView[ 0 ] = val; + const f = _tables.uint32View[ 0 ]; + const e = ( f >> 23 ) & 0x1ff; + return _tables.baseTable[ e ] + ( ( f & 0x007fffff ) >> _tables.shiftTable[ e ] ); + +} + +// float16 to float32 + +function fromHalfFloat( val ) { + + const m = val >> 10; + _tables.uint32View[ 0 ] = _tables.mantissaTable[ _tables.offsetTable[ m ] + ( val & 0x3ff ) ] + _tables.exponentTable[ m ]; + return _tables.floatView[ 0 ]; + +} + +const DataUtils = { + toHalfFloat: toHalfFloat, + fromHalfFloat: fromHalfFloat, +}; + +const _vector$9 = /*@__PURE__*/ new Vector3(); +const _vector2$1 = /*@__PURE__*/ new Vector2(); + +class BufferAttribute { + + constructor( array, itemSize, normalized = false ) { + + if ( Array.isArray( array ) ) { + + throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' ); + + } + + this.isBufferAttribute = true; + + this.name = ''; + + this.array = array; + this.itemSize = itemSize; + this.count = array !== undefined ? array.length / itemSize : 0; + this.normalized = normalized; + + this.usage = StaticDrawUsage; + this._updateRange = { offset: 0, count: - 1 }; + this.updateRanges = []; + this.gpuType = FloatType; + + this.version = 0; + + } + + onUploadCallback() {} + + set needsUpdate( value ) { + + if ( value === true ) this.version ++; + + } + + get updateRange() { + + warnOnce( 'THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.' ); // @deprecated, r159 + return this._updateRange; + + } + + setUsage( value ) { + + this.usage = value; + + return this; + + } + + addUpdateRange( start, count ) { + + this.updateRanges.push( { start, count } ); + + } + + clearUpdateRanges() { + + this.updateRanges.length = 0; + + } + + copy( source ) { + + this.name = source.name; + this.array = new source.array.constructor( source.array ); + this.itemSize = source.itemSize; + this.count = source.count; + this.normalized = source.normalized; + + this.usage = source.usage; + this.gpuType = source.gpuType; + + return this; + + } + + copyAt( index1, attribute, index2 ) { + + index1 *= this.itemSize; + index2 *= attribute.itemSize; + + for ( let i = 0, l = this.itemSize; i < l; i ++ ) { + + this.array[ index1 + i ] = attribute.array[ index2 + i ]; + + } + + return this; + + } + + copyArray( array ) { + + this.array.set( array ); + + return this; + + } + + applyMatrix3( m ) { + + if ( this.itemSize === 2 ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector2$1.fromBufferAttribute( this, i ); + _vector2$1.applyMatrix3( m ); + + this.setXY( i, _vector2$1.x, _vector2$1.y ); + + } + + } else if ( this.itemSize === 3 ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector$9.fromBufferAttribute( this, i ); + _vector$9.applyMatrix3( m ); + + this.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z ); + + } + + } + + return this; + + } + + applyMatrix4( m ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector$9.fromBufferAttribute( this, i ); + + _vector$9.applyMatrix4( m ); + + this.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z ); + + } + + return this; + + } + + applyNormalMatrix( m ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector$9.fromBufferAttribute( this, i ); + + _vector$9.applyNormalMatrix( m ); + + this.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z ); + + } + + return this; + + } + + transformDirection( m ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector$9.fromBufferAttribute( this, i ); + + _vector$9.transformDirection( m ); + + this.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z ); + + } + + return this; + + } + + set( value, offset = 0 ) { + + // Matching BufferAttribute constructor, do not normalize the array. + this.array.set( value, offset ); + + return this; + + } + + getComponent( index, component ) { + + let value = this.array[ index * this.itemSize + component ]; + + if ( this.normalized ) value = denormalize( value, this.array ); + + return value; + + } + + setComponent( index, component, value ) { + + if ( this.normalized ) value = normalize( value, this.array ); + + this.array[ index * this.itemSize + component ] = value; + + return this; + + } + + getX( index ) { + + let x = this.array[ index * this.itemSize ]; + + if ( this.normalized ) x = denormalize( x, this.array ); + + return x; + + } + + setX( index, x ) { + + if ( this.normalized ) x = normalize( x, this.array ); + + this.array[ index * this.itemSize ] = x; + + return this; + + } + + getY( index ) { + + let y = this.array[ index * this.itemSize + 1 ]; + + if ( this.normalized ) y = denormalize( y, this.array ); + + return y; + + } + + setY( index, y ) { + + if ( this.normalized ) y = normalize( y, this.array ); + + this.array[ index * this.itemSize + 1 ] = y; + + return this; + + } + + getZ( index ) { + + let z = this.array[ index * this.itemSize + 2 ]; + + if ( this.normalized ) z = denormalize( z, this.array ); + + return z; + + } + + setZ( index, z ) { + + if ( this.normalized ) z = normalize( z, this.array ); + + this.array[ index * this.itemSize + 2 ] = z; + + return this; + + } + + getW( index ) { + + let w = this.array[ index * this.itemSize + 3 ]; + + if ( this.normalized ) w = denormalize( w, this.array ); + + return w; + + } + + setW( index, w ) { + + if ( this.normalized ) w = normalize( w, this.array ); + + this.array[ index * this.itemSize + 3 ] = w; + + return this; + + } + + setXY( index, x, y ) { + + index *= this.itemSize; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + + } + + this.array[ index + 0 ] = x; + this.array[ index + 1 ] = y; + + return this; + + } + + setXYZ( index, x, y, z ) { + + index *= this.itemSize; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + z = normalize( z, this.array ); + + } + + this.array[ index + 0 ] = x; + this.array[ index + 1 ] = y; + this.array[ index + 2 ] = z; + + return this; + + } + + setXYZW( index, x, y, z, w ) { + + index *= this.itemSize; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + z = normalize( z, this.array ); + w = normalize( w, this.array ); + + } + + this.array[ index + 0 ] = x; + this.array[ index + 1 ] = y; + this.array[ index + 2 ] = z; + this.array[ index + 3 ] = w; + + return this; + + } + + onUpload( callback ) { + + this.onUploadCallback = callback; + + return this; + + } + + clone() { + + return new this.constructor( this.array, this.itemSize ).copy( this ); + + } + + toJSON() { + + const data = { + itemSize: this.itemSize, + type: this.array.constructor.name, + array: Array.from( this.array ), + normalized: this.normalized + }; + + if ( this.name !== '' ) data.name = this.name; + if ( this.usage !== StaticDrawUsage ) data.usage = this.usage; + + return data; + + } + +} + +// + +class Int8BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Int8Array( array ), itemSize, normalized ); + + } + +} + +class Uint8BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Uint8Array( array ), itemSize, normalized ); + + } + +} + +class Uint8ClampedBufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Uint8ClampedArray( array ), itemSize, normalized ); + + } + +} + +class Int16BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Int16Array( array ), itemSize, normalized ); + + } + +} + +class Uint16BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Uint16Array( array ), itemSize, normalized ); + + } + +} + +class Int32BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Int32Array( array ), itemSize, normalized ); + + } + +} + +class Uint32BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Uint32Array( array ), itemSize, normalized ); + + } + +} + +class Float16BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Uint16Array( array ), itemSize, normalized ); + + this.isFloat16BufferAttribute = true; + + } + + getX( index ) { + + let x = fromHalfFloat( this.array[ index * this.itemSize ] ); + + if ( this.normalized ) x = denormalize( x, this.array ); + + return x; + + } + + setX( index, x ) { + + if ( this.normalized ) x = normalize( x, this.array ); + + this.array[ index * this.itemSize ] = toHalfFloat( x ); + + return this; + + } + + getY( index ) { + + let y = fromHalfFloat( this.array[ index * this.itemSize + 1 ] ); + + if ( this.normalized ) y = denormalize( y, this.array ); + + return y; + + } + + setY( index, y ) { + + if ( this.normalized ) y = normalize( y, this.array ); + + this.array[ index * this.itemSize + 1 ] = toHalfFloat( y ); + + return this; + + } + + getZ( index ) { + + let z = fromHalfFloat( this.array[ index * this.itemSize + 2 ] ); + + if ( this.normalized ) z = denormalize( z, this.array ); + + return z; + + } + + setZ( index, z ) { + + if ( this.normalized ) z = normalize( z, this.array ); + + this.array[ index * this.itemSize + 2 ] = toHalfFloat( z ); + + return this; + + } + + getW( index ) { + + let w = fromHalfFloat( this.array[ index * this.itemSize + 3 ] ); + + if ( this.normalized ) w = denormalize( w, this.array ); + + return w; + + } + + setW( index, w ) { + + if ( this.normalized ) w = normalize( w, this.array ); + + this.array[ index * this.itemSize + 3 ] = toHalfFloat( w ); + + return this; + + } + + setXY( index, x, y ) { + + index *= this.itemSize; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + + } + + this.array[ index + 0 ] = toHalfFloat( x ); + this.array[ index + 1 ] = toHalfFloat( y ); + + return this; + + } + + setXYZ( index, x, y, z ) { + + index *= this.itemSize; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + z = normalize( z, this.array ); + + } + + this.array[ index + 0 ] = toHalfFloat( x ); + this.array[ index + 1 ] = toHalfFloat( y ); + this.array[ index + 2 ] = toHalfFloat( z ); + + return this; + + } + + setXYZW( index, x, y, z, w ) { + + index *= this.itemSize; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + z = normalize( z, this.array ); + w = normalize( w, this.array ); + + } + + this.array[ index + 0 ] = toHalfFloat( x ); + this.array[ index + 1 ] = toHalfFloat( y ); + this.array[ index + 2 ] = toHalfFloat( z ); + this.array[ index + 3 ] = toHalfFloat( w ); + + return this; + + } + +} + + +class Float32BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Float32Array( array ), itemSize, normalized ); + + } + +} + +let _id$2 = 0; + +const _m1$2 = /*@__PURE__*/ new Matrix4(); +const _obj = /*@__PURE__*/ new Object3D(); +const _offset = /*@__PURE__*/ new Vector3(); +const _box$2 = /*@__PURE__*/ new Box3(); +const _boxMorphTargets = /*@__PURE__*/ new Box3(); +const _vector$8 = /*@__PURE__*/ new Vector3(); + +class BufferGeometry extends EventDispatcher { + + constructor() { + + super(); + + this.isBufferGeometry = true; + + Object.defineProperty( this, 'id', { value: _id$2 ++ } ); + + this.uuid = generateUUID(); + + this.name = ''; + this.type = 'BufferGeometry'; + + this.index = null; + this.attributes = {}; + + this.morphAttributes = {}; + this.morphTargetsRelative = false; + + this.groups = []; + + this.boundingBox = null; + this.boundingSphere = null; + + this.drawRange = { start: 0, count: Infinity }; + + this.userData = {}; + + } + + getIndex() { + + return this.index; + + } + + setIndex( index ) { + + if ( Array.isArray( index ) ) { + + this.index = new ( arrayNeedsUint32( index ) ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 ); + + } else { + + this.index = index; + + } + + return this; + + } + + getAttribute( name ) { + + return this.attributes[ name ]; + + } + + setAttribute( name, attribute ) { + + this.attributes[ name ] = attribute; + + return this; + + } + + deleteAttribute( name ) { + + delete this.attributes[ name ]; + + return this; + + } + + hasAttribute( name ) { + + return this.attributes[ name ] !== undefined; + + } + + addGroup( start, count, materialIndex = 0 ) { + + this.groups.push( { + + start: start, + count: count, + materialIndex: materialIndex + + } ); + + } + + clearGroups() { + + this.groups = []; + + } + + setDrawRange( start, count ) { + + this.drawRange.start = start; + this.drawRange.count = count; + + } + + applyMatrix4( matrix ) { + + const position = this.attributes.position; + + if ( position !== undefined ) { + + position.applyMatrix4( matrix ); + + position.needsUpdate = true; + + } + + const normal = this.attributes.normal; + + if ( normal !== undefined ) { + + const normalMatrix = new Matrix3().getNormalMatrix( matrix ); + + normal.applyNormalMatrix( normalMatrix ); + + normal.needsUpdate = true; + + } + + const tangent = this.attributes.tangent; + + if ( tangent !== undefined ) { + + tangent.transformDirection( matrix ); + + tangent.needsUpdate = true; + + } + + if ( this.boundingBox !== null ) { + + this.computeBoundingBox(); + + } + + if ( this.boundingSphere !== null ) { + + this.computeBoundingSphere(); + + } + + return this; + + } + + applyQuaternion( q ) { + + _m1$2.makeRotationFromQuaternion( q ); + + this.applyMatrix4( _m1$2 ); + + return this; + + } + + rotateX( angle ) { + + // rotate geometry around world x-axis + + _m1$2.makeRotationX( angle ); + + this.applyMatrix4( _m1$2 ); + + return this; + + } + + rotateY( angle ) { + + // rotate geometry around world y-axis + + _m1$2.makeRotationY( angle ); + + this.applyMatrix4( _m1$2 ); + + return this; + + } + + rotateZ( angle ) { + + // rotate geometry around world z-axis + + _m1$2.makeRotationZ( angle ); + + this.applyMatrix4( _m1$2 ); + + return this; + + } + + translate( x, y, z ) { + + // translate geometry + + _m1$2.makeTranslation( x, y, z ); + + this.applyMatrix4( _m1$2 ); + + return this; + + } + + scale( x, y, z ) { + + // scale geometry + + _m1$2.makeScale( x, y, z ); + + this.applyMatrix4( _m1$2 ); + + return this; + + } + + lookAt( vector ) { + + _obj.lookAt( vector ); + + _obj.updateMatrix(); + + this.applyMatrix4( _obj.matrix ); + + return this; + + } + + center() { + + this.computeBoundingBox(); + + this.boundingBox.getCenter( _offset ).negate(); + + this.translate( _offset.x, _offset.y, _offset.z ); + + return this; + + } + + setFromPoints( points ) { + + const position = []; + + for ( let i = 0, l = points.length; i < l; i ++ ) { + + const point = points[ i ]; + position.push( point.x, point.y, point.z || 0 ); + + } + + this.setAttribute( 'position', new Float32BufferAttribute( position, 3 ) ); + + return this; + + } + + computeBoundingBox() { + + if ( this.boundingBox === null ) { + + this.boundingBox = new Box3(); + + } + + const position = this.attributes.position; + const morphAttributesPosition = this.morphAttributes.position; + + if ( position && position.isGLBufferAttribute ) { + + console.error( 'THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.', this ); + + this.boundingBox.set( + new Vector3( - Infinity, - Infinity, - Infinity ), + new Vector3( + Infinity, + Infinity, + Infinity ) + ); + + return; + + } + + if ( position !== undefined ) { + + this.boundingBox.setFromBufferAttribute( position ); + + // process morph attributes if present + + if ( morphAttributesPosition ) { + + for ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) { + + const morphAttribute = morphAttributesPosition[ i ]; + _box$2.setFromBufferAttribute( morphAttribute ); + + if ( this.morphTargetsRelative ) { + + _vector$8.addVectors( this.boundingBox.min, _box$2.min ); + this.boundingBox.expandByPoint( _vector$8 ); + + _vector$8.addVectors( this.boundingBox.max, _box$2.max ); + this.boundingBox.expandByPoint( _vector$8 ); + + } else { + + this.boundingBox.expandByPoint( _box$2.min ); + this.boundingBox.expandByPoint( _box$2.max ); + + } + + } + + } + + } else { + + this.boundingBox.makeEmpty(); + + } + + if ( isNaN( this.boundingBox.min.x ) || isNaN( this.boundingBox.min.y ) || isNaN( this.boundingBox.min.z ) ) { + + console.error( 'THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this ); + + } + + } + + computeBoundingSphere() { + + if ( this.boundingSphere === null ) { + + this.boundingSphere = new Sphere(); + + } + + const position = this.attributes.position; + const morphAttributesPosition = this.morphAttributes.position; + + if ( position && position.isGLBufferAttribute ) { + + console.error( 'THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.', this ); + + this.boundingSphere.set( new Vector3(), Infinity ); + + return; + + } + + if ( position ) { + + // first, find the center of the bounding sphere + + const center = this.boundingSphere.center; + + _box$2.setFromBufferAttribute( position ); + + // process morph attributes if present + + if ( morphAttributesPosition ) { + + for ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) { + + const morphAttribute = morphAttributesPosition[ i ]; + _boxMorphTargets.setFromBufferAttribute( morphAttribute ); + + if ( this.morphTargetsRelative ) { + + _vector$8.addVectors( _box$2.min, _boxMorphTargets.min ); + _box$2.expandByPoint( _vector$8 ); + + _vector$8.addVectors( _box$2.max, _boxMorphTargets.max ); + _box$2.expandByPoint( _vector$8 ); + + } else { + + _box$2.expandByPoint( _boxMorphTargets.min ); + _box$2.expandByPoint( _boxMorphTargets.max ); + + } + + } + + } + + _box$2.getCenter( center ); + + // second, try to find a boundingSphere with a radius smaller than the + // boundingSphere of the boundingBox: sqrt(3) smaller in the best case + + let maxRadiusSq = 0; + + for ( let i = 0, il = position.count; i < il; i ++ ) { + + _vector$8.fromBufferAttribute( position, i ); + + maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$8 ) ); + + } + + // process morph attributes if present + + if ( morphAttributesPosition ) { + + for ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) { + + const morphAttribute = morphAttributesPosition[ i ]; + const morphTargetsRelative = this.morphTargetsRelative; + + for ( let j = 0, jl = morphAttribute.count; j < jl; j ++ ) { + + _vector$8.fromBufferAttribute( morphAttribute, j ); + + if ( morphTargetsRelative ) { + + _offset.fromBufferAttribute( position, j ); + _vector$8.add( _offset ); + + } + + maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$8 ) ); + + } + + } + + } + + this.boundingSphere.radius = Math.sqrt( maxRadiusSq ); + + if ( isNaN( this.boundingSphere.radius ) ) { + + console.error( 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this ); + + } + + } + + } + + computeTangents() { + + const index = this.index; + const attributes = this.attributes; + + // based on http://www.terathon.com/code/tangent.html + // (per vertex tangents) + + if ( index === null || + attributes.position === undefined || + attributes.normal === undefined || + attributes.uv === undefined ) { + + console.error( 'THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)' ); + return; + + } + + const positionAttribute = attributes.position; + const normalAttribute = attributes.normal; + const uvAttribute = attributes.uv; + + if ( this.hasAttribute( 'tangent' ) === false ) { + + this.setAttribute( 'tangent', new BufferAttribute( new Float32Array( 4 * positionAttribute.count ), 4 ) ); + + } + + const tangentAttribute = this.getAttribute( 'tangent' ); + + const tan1 = [], tan2 = []; + + for ( let i = 0; i < positionAttribute.count; i ++ ) { + + tan1[ i ] = new Vector3(); + tan2[ i ] = new Vector3(); + + } + + const vA = new Vector3(), + vB = new Vector3(), + vC = new Vector3(), + + uvA = new Vector2(), + uvB = new Vector2(), + uvC = new Vector2(), + + sdir = new Vector3(), + tdir = new Vector3(); + + function handleTriangle( a, b, c ) { + + vA.fromBufferAttribute( positionAttribute, a ); + vB.fromBufferAttribute( positionAttribute, b ); + vC.fromBufferAttribute( positionAttribute, c ); + + uvA.fromBufferAttribute( uvAttribute, a ); + uvB.fromBufferAttribute( uvAttribute, b ); + uvC.fromBufferAttribute( uvAttribute, c ); + + vB.sub( vA ); + vC.sub( vA ); + + uvB.sub( uvA ); + uvC.sub( uvA ); + + const r = 1.0 / ( uvB.x * uvC.y - uvC.x * uvB.y ); + + // silently ignore degenerate uv triangles having coincident or colinear vertices + + if ( ! isFinite( r ) ) return; + + sdir.copy( vB ).multiplyScalar( uvC.y ).addScaledVector( vC, - uvB.y ).multiplyScalar( r ); + tdir.copy( vC ).multiplyScalar( uvB.x ).addScaledVector( vB, - uvC.x ).multiplyScalar( r ); + + tan1[ a ].add( sdir ); + tan1[ b ].add( sdir ); + tan1[ c ].add( sdir ); + + tan2[ a ].add( tdir ); + tan2[ b ].add( tdir ); + tan2[ c ].add( tdir ); + + } + + let groups = this.groups; + + if ( groups.length === 0 ) { + + groups = [ { + start: 0, + count: index.count + } ]; + + } + + for ( let i = 0, il = groups.length; i < il; ++ i ) { + + const group = groups[ i ]; + + const start = group.start; + const count = group.count; + + for ( let j = start, jl = start + count; j < jl; j += 3 ) { + + handleTriangle( + index.getX( j + 0 ), + index.getX( j + 1 ), + index.getX( j + 2 ) + ); + + } + + } + + const tmp = new Vector3(), tmp2 = new Vector3(); + const n = new Vector3(), n2 = new Vector3(); + + function handleVertex( v ) { + + n.fromBufferAttribute( normalAttribute, v ); + n2.copy( n ); + + const t = tan1[ v ]; + + // Gram-Schmidt orthogonalize + + tmp.copy( t ); + tmp.sub( n.multiplyScalar( n.dot( t ) ) ).normalize(); + + // Calculate handedness + + tmp2.crossVectors( n2, t ); + const test = tmp2.dot( tan2[ v ] ); + const w = ( test < 0.0 ) ? - 1.0 : 1.0; + + tangentAttribute.setXYZW( v, tmp.x, tmp.y, tmp.z, w ); + + } + + for ( let i = 0, il = groups.length; i < il; ++ i ) { + + const group = groups[ i ]; + + const start = group.start; + const count = group.count; + + for ( let j = start, jl = start + count; j < jl; j += 3 ) { + + handleVertex( index.getX( j + 0 ) ); + handleVertex( index.getX( j + 1 ) ); + handleVertex( index.getX( j + 2 ) ); + + } + + } + + } + + computeVertexNormals() { + + const index = this.index; + const positionAttribute = this.getAttribute( 'position' ); + + if ( positionAttribute !== undefined ) { + + let normalAttribute = this.getAttribute( 'normal' ); + + if ( normalAttribute === undefined ) { + + normalAttribute = new BufferAttribute( new Float32Array( positionAttribute.count * 3 ), 3 ); + this.setAttribute( 'normal', normalAttribute ); + + } else { + + // reset existing normals to zero + + for ( let i = 0, il = normalAttribute.count; i < il; i ++ ) { + + normalAttribute.setXYZ( i, 0, 0, 0 ); + + } + + } + + const pA = new Vector3(), pB = new Vector3(), pC = new Vector3(); + const nA = new Vector3(), nB = new Vector3(), nC = new Vector3(); + const cb = new Vector3(), ab = new Vector3(); + + // indexed elements + + if ( index ) { + + for ( let i = 0, il = index.count; i < il; i += 3 ) { + + const vA = index.getX( i + 0 ); + const vB = index.getX( i + 1 ); + const vC = index.getX( i + 2 ); + + pA.fromBufferAttribute( positionAttribute, vA ); + pB.fromBufferAttribute( positionAttribute, vB ); + pC.fromBufferAttribute( positionAttribute, vC ); + + cb.subVectors( pC, pB ); + ab.subVectors( pA, pB ); + cb.cross( ab ); + + nA.fromBufferAttribute( normalAttribute, vA ); + nB.fromBufferAttribute( normalAttribute, vB ); + nC.fromBufferAttribute( normalAttribute, vC ); + + nA.add( cb ); + nB.add( cb ); + nC.add( cb ); + + normalAttribute.setXYZ( vA, nA.x, nA.y, nA.z ); + normalAttribute.setXYZ( vB, nB.x, nB.y, nB.z ); + normalAttribute.setXYZ( vC, nC.x, nC.y, nC.z ); + + } + + } else { + + // non-indexed elements (unconnected triangle soup) + + for ( let i = 0, il = positionAttribute.count; i < il; i += 3 ) { + + pA.fromBufferAttribute( positionAttribute, i + 0 ); + pB.fromBufferAttribute( positionAttribute, i + 1 ); + pC.fromBufferAttribute( positionAttribute, i + 2 ); + + cb.subVectors( pC, pB ); + ab.subVectors( pA, pB ); + cb.cross( ab ); + + normalAttribute.setXYZ( i + 0, cb.x, cb.y, cb.z ); + normalAttribute.setXYZ( i + 1, cb.x, cb.y, cb.z ); + normalAttribute.setXYZ( i + 2, cb.x, cb.y, cb.z ); + + } + + } + + this.normalizeNormals(); + + normalAttribute.needsUpdate = true; + + } + + } + + normalizeNormals() { + + const normals = this.attributes.normal; + + for ( let i = 0, il = normals.count; i < il; i ++ ) { + + _vector$8.fromBufferAttribute( normals, i ); + + _vector$8.normalize(); + + normals.setXYZ( i, _vector$8.x, _vector$8.y, _vector$8.z ); + + } + + } + + toNonIndexed() { + + function convertBufferAttribute( attribute, indices ) { + + const array = attribute.array; + const itemSize = attribute.itemSize; + const normalized = attribute.normalized; + + const array2 = new array.constructor( indices.length * itemSize ); + + let index = 0, index2 = 0; + + for ( let i = 0, l = indices.length; i < l; i ++ ) { + + if ( attribute.isInterleavedBufferAttribute ) { + + index = indices[ i ] * attribute.data.stride + attribute.offset; + + } else { + + index = indices[ i ] * itemSize; + + } + + for ( let j = 0; j < itemSize; j ++ ) { + + array2[ index2 ++ ] = array[ index ++ ]; + + } + + } + + return new BufferAttribute( array2, itemSize, normalized ); + + } + + // + + if ( this.index === null ) { + + console.warn( 'THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.' ); + return this; + + } + + const geometry2 = new BufferGeometry(); + + const indices = this.index.array; + const attributes = this.attributes; + + // attributes + + for ( const name in attributes ) { + + const attribute = attributes[ name ]; + + const newAttribute = convertBufferAttribute( attribute, indices ); + + geometry2.setAttribute( name, newAttribute ); + + } + + // morph attributes + + const morphAttributes = this.morphAttributes; + + for ( const name in morphAttributes ) { + + const morphArray = []; + const morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes + + for ( let i = 0, il = morphAttribute.length; i < il; i ++ ) { + + const attribute = morphAttribute[ i ]; + + const newAttribute = convertBufferAttribute( attribute, indices ); + + morphArray.push( newAttribute ); + + } + + geometry2.morphAttributes[ name ] = morphArray; + + } + + geometry2.morphTargetsRelative = this.morphTargetsRelative; + + // groups + + const groups = this.groups; + + for ( let i = 0, l = groups.length; i < l; i ++ ) { + + const group = groups[ i ]; + geometry2.addGroup( group.start, group.count, group.materialIndex ); + + } + + return geometry2; + + } + + toJSON() { + + const data = { + metadata: { + version: 4.6, + type: 'BufferGeometry', + generator: 'BufferGeometry.toJSON' + } + }; + + // standard BufferGeometry serialization + + data.uuid = this.uuid; + data.type = this.type; + if ( this.name !== '' ) data.name = this.name; + if ( Object.keys( this.userData ).length > 0 ) data.userData = this.userData; + + if ( this.parameters !== undefined ) { + + const parameters = this.parameters; + + for ( const key in parameters ) { + + if ( parameters[ key ] !== undefined ) data[ key ] = parameters[ key ]; + + } + + return data; + + } + + // for simplicity the code assumes attributes are not shared across geometries, see #15811 + + data.data = { attributes: {} }; + + const index = this.index; + + if ( index !== null ) { + + data.data.index = { + type: index.array.constructor.name, + array: Array.prototype.slice.call( index.array ) + }; + + } + + const attributes = this.attributes; + + for ( const key in attributes ) { + + const attribute = attributes[ key ]; + + data.data.attributes[ key ] = attribute.toJSON( data.data ); + + } + + const morphAttributes = {}; + let hasMorphAttributes = false; + + for ( const key in this.morphAttributes ) { + + const attributeArray = this.morphAttributes[ key ]; + + const array = []; + + for ( let i = 0, il = attributeArray.length; i < il; i ++ ) { + + const attribute = attributeArray[ i ]; + + array.push( attribute.toJSON( data.data ) ); + + } + + if ( array.length > 0 ) { + + morphAttributes[ key ] = array; + + hasMorphAttributes = true; + + } + + } + + if ( hasMorphAttributes ) { + + data.data.morphAttributes = morphAttributes; + data.data.morphTargetsRelative = this.morphTargetsRelative; + + } + + const groups = this.groups; + + if ( groups.length > 0 ) { + + data.data.groups = JSON.parse( JSON.stringify( groups ) ); + + } + + const boundingSphere = this.boundingSphere; + + if ( boundingSphere !== null ) { + + data.data.boundingSphere = { + center: boundingSphere.center.toArray(), + radius: boundingSphere.radius + }; + + } + + return data; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( source ) { + + // reset + + this.index = null; + this.attributes = {}; + this.morphAttributes = {}; + this.groups = []; + this.boundingBox = null; + this.boundingSphere = null; + + // used for storing cloned, shared data + + const data = {}; + + // name + + this.name = source.name; + + // index + + const index = source.index; + + if ( index !== null ) { + + this.setIndex( index.clone( data ) ); + + } + + // attributes + + const attributes = source.attributes; + + for ( const name in attributes ) { + + const attribute = attributes[ name ]; + this.setAttribute( name, attribute.clone( data ) ); + + } + + // morph attributes + + const morphAttributes = source.morphAttributes; + + for ( const name in morphAttributes ) { + + const array = []; + const morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes + + for ( let i = 0, l = morphAttribute.length; i < l; i ++ ) { + + array.push( morphAttribute[ i ].clone( data ) ); + + } + + this.morphAttributes[ name ] = array; + + } + + this.morphTargetsRelative = source.morphTargetsRelative; + + // groups + + const groups = source.groups; + + for ( let i = 0, l = groups.length; i < l; i ++ ) { + + const group = groups[ i ]; + this.addGroup( group.start, group.count, group.materialIndex ); + + } + + // bounding box + + const boundingBox = source.boundingBox; + + if ( boundingBox !== null ) { + + this.boundingBox = boundingBox.clone(); + + } + + // bounding sphere + + const boundingSphere = source.boundingSphere; + + if ( boundingSphere !== null ) { + + this.boundingSphere = boundingSphere.clone(); + + } + + // draw range + + this.drawRange.start = source.drawRange.start; + this.drawRange.count = source.drawRange.count; + + // user data + + this.userData = source.userData; + + return this; + + } + + dispose() { + + this.dispatchEvent( { type: 'dispose' } ); + + } + +} + +const _inverseMatrix$3 = /*@__PURE__*/ new Matrix4(); +const _ray$3 = /*@__PURE__*/ new Ray(); +const _sphere$6 = /*@__PURE__*/ new Sphere(); +const _sphereHitAt = /*@__PURE__*/ new Vector3(); + +const _vA$1 = /*@__PURE__*/ new Vector3(); +const _vB$1 = /*@__PURE__*/ new Vector3(); +const _vC$1 = /*@__PURE__*/ new Vector3(); + +const _tempA = /*@__PURE__*/ new Vector3(); +const _morphA = /*@__PURE__*/ new Vector3(); + +const _uvA$1 = /*@__PURE__*/ new Vector2(); +const _uvB$1 = /*@__PURE__*/ new Vector2(); +const _uvC$1 = /*@__PURE__*/ new Vector2(); + +const _normalA = /*@__PURE__*/ new Vector3(); +const _normalB = /*@__PURE__*/ new Vector3(); +const _normalC = /*@__PURE__*/ new Vector3(); + +const _intersectionPoint = /*@__PURE__*/ new Vector3(); +const _intersectionPointWorld = /*@__PURE__*/ new Vector3(); + +class Mesh extends Object3D { + + constructor( geometry = new BufferGeometry(), material = new MeshBasicMaterial() ) { + + super(); + + this.isMesh = true; + + this.type = 'Mesh'; + + this.geometry = geometry; + this.material = material; + + this.updateMorphTargets(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + if ( source.morphTargetInfluences !== undefined ) { + + this.morphTargetInfluences = source.morphTargetInfluences.slice(); + + } + + if ( source.morphTargetDictionary !== undefined ) { + + this.morphTargetDictionary = Object.assign( {}, source.morphTargetDictionary ); + + } + + this.material = Array.isArray( source.material ) ? source.material.slice() : source.material; + this.geometry = source.geometry; + + return this; + + } + + updateMorphTargets() { + + const geometry = this.geometry; + + const morphAttributes = geometry.morphAttributes; + const keys = Object.keys( morphAttributes ); + + if ( keys.length > 0 ) { + + const morphAttribute = morphAttributes[ keys[ 0 ] ]; + + if ( morphAttribute !== undefined ) { + + this.morphTargetInfluences = []; + this.morphTargetDictionary = {}; + + for ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) { + + const name = morphAttribute[ m ].name || String( m ); + + this.morphTargetInfluences.push( 0 ); + this.morphTargetDictionary[ name ] = m; + + } + + } + + } + + } + + getVertexPosition( index, target ) { + + const geometry = this.geometry; + const position = geometry.attributes.position; + const morphPosition = geometry.morphAttributes.position; + const morphTargetsRelative = geometry.morphTargetsRelative; + + target.fromBufferAttribute( position, index ); + + const morphInfluences = this.morphTargetInfluences; + + if ( morphPosition && morphInfluences ) { + + _morphA.set( 0, 0, 0 ); + + for ( let i = 0, il = morphPosition.length; i < il; i ++ ) { + + const influence = morphInfluences[ i ]; + const morphAttribute = morphPosition[ i ]; + + if ( influence === 0 ) continue; + + _tempA.fromBufferAttribute( morphAttribute, index ); + + if ( morphTargetsRelative ) { + + _morphA.addScaledVector( _tempA, influence ); + + } else { + + _morphA.addScaledVector( _tempA.sub( target ), influence ); + + } + + } + + target.add( _morphA ); + + } + + return target; + + } + + raycast( raycaster, intersects ) { + + const geometry = this.geometry; + const material = this.material; + const matrixWorld = this.matrixWorld; + + if ( material === undefined ) return; + + // test with bounding sphere in world space + + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + + _sphere$6.copy( geometry.boundingSphere ); + _sphere$6.applyMatrix4( matrixWorld ); + + // check distance from ray origin to bounding sphere + + _ray$3.copy( raycaster.ray ).recast( raycaster.near ); + + if ( _sphere$6.containsPoint( _ray$3.origin ) === false ) { + + if ( _ray$3.intersectSphere( _sphere$6, _sphereHitAt ) === null ) return; + + if ( _ray$3.origin.distanceToSquared( _sphereHitAt ) > ( raycaster.far - raycaster.near ) ** 2 ) return; + + } + + // convert ray to local space of mesh + + _inverseMatrix$3.copy( matrixWorld ).invert(); + _ray$3.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$3 ); + + // test with bounding box in local space + + if ( geometry.boundingBox !== null ) { + + if ( _ray$3.intersectsBox( geometry.boundingBox ) === false ) return; + + } + + // test for intersections with geometry + + this._computeIntersections( raycaster, intersects, _ray$3 ); + + } + + _computeIntersections( raycaster, intersects, rayLocalSpace ) { + + let intersection; + + const geometry = this.geometry; + const material = this.material; + + const index = geometry.index; + const position = geometry.attributes.position; + const uv = geometry.attributes.uv; + const uv1 = geometry.attributes.uv1; + const normal = geometry.attributes.normal; + const groups = geometry.groups; + const drawRange = geometry.drawRange; + + if ( index !== null ) { + + // indexed buffer geometry + + if ( Array.isArray( material ) ) { + + for ( let i = 0, il = groups.length; i < il; i ++ ) { + + const group = groups[ i ]; + const groupMaterial = material[ group.materialIndex ]; + + const start = Math.max( group.start, drawRange.start ); + const end = Math.min( index.count, Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ) ); + + for ( let j = start, jl = end; j < jl; j += 3 ) { + + const a = index.getX( j ); + const b = index.getX( j + 1 ); + const c = index.getX( j + 2 ); + + intersection = checkGeometryIntersection( this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c ); + + if ( intersection ) { + + intersection.faceIndex = Math.floor( j / 3 ); // triangle number in indexed buffer semantics + intersection.face.materialIndex = group.materialIndex; + intersects.push( intersection ); + + } + + } + + } + + } else { + + const start = Math.max( 0, drawRange.start ); + const end = Math.min( index.count, ( drawRange.start + drawRange.count ) ); + + for ( let i = start, il = end; i < il; i += 3 ) { + + const a = index.getX( i ); + const b = index.getX( i + 1 ); + const c = index.getX( i + 2 ); + + intersection = checkGeometryIntersection( this, material, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c ); + + if ( intersection ) { + + intersection.faceIndex = Math.floor( i / 3 ); // triangle number in indexed buffer semantics + intersects.push( intersection ); + + } + + } + + } + + } else if ( position !== undefined ) { + + // non-indexed buffer geometry + + if ( Array.isArray( material ) ) { + + for ( let i = 0, il = groups.length; i < il; i ++ ) { + + const group = groups[ i ]; + const groupMaterial = material[ group.materialIndex ]; + + const start = Math.max( group.start, drawRange.start ); + const end = Math.min( position.count, Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ) ); + + for ( let j = start, jl = end; j < jl; j += 3 ) { + + const a = j; + const b = j + 1; + const c = j + 2; + + intersection = checkGeometryIntersection( this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c ); + + if ( intersection ) { + + intersection.faceIndex = Math.floor( j / 3 ); // triangle number in non-indexed buffer semantics + intersection.face.materialIndex = group.materialIndex; + intersects.push( intersection ); + + } + + } + + } + + } else { + + const start = Math.max( 0, drawRange.start ); + const end = Math.min( position.count, ( drawRange.start + drawRange.count ) ); + + for ( let i = start, il = end; i < il; i += 3 ) { + + const a = i; + const b = i + 1; + const c = i + 2; + + intersection = checkGeometryIntersection( this, material, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c ); + + if ( intersection ) { + + intersection.faceIndex = Math.floor( i / 3 ); // triangle number in non-indexed buffer semantics + intersects.push( intersection ); + + } + + } + + } + + } + + } + +} + +function checkIntersection$1( object, material, raycaster, ray, pA, pB, pC, point ) { + + let intersect; + + if ( material.side === BackSide ) { + + intersect = ray.intersectTriangle( pC, pB, pA, true, point ); + + } else { + + intersect = ray.intersectTriangle( pA, pB, pC, ( material.side === FrontSide ), point ); + + } + + if ( intersect === null ) return null; + + _intersectionPointWorld.copy( point ); + _intersectionPointWorld.applyMatrix4( object.matrixWorld ); + + const distance = raycaster.ray.origin.distanceTo( _intersectionPointWorld ); + + if ( distance < raycaster.near || distance > raycaster.far ) return null; + + return { + distance: distance, + point: _intersectionPointWorld.clone(), + object: object + }; + +} + +function checkGeometryIntersection( object, material, raycaster, ray, uv, uv1, normal, a, b, c ) { + + object.getVertexPosition( a, _vA$1 ); + object.getVertexPosition( b, _vB$1 ); + object.getVertexPosition( c, _vC$1 ); + + const intersection = checkIntersection$1( object, material, raycaster, ray, _vA$1, _vB$1, _vC$1, _intersectionPoint ); + + if ( intersection ) { + + if ( uv ) { + + _uvA$1.fromBufferAttribute( uv, a ); + _uvB$1.fromBufferAttribute( uv, b ); + _uvC$1.fromBufferAttribute( uv, c ); + + intersection.uv = Triangle.getInterpolation( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() ); + + } + + if ( uv1 ) { + + _uvA$1.fromBufferAttribute( uv1, a ); + _uvB$1.fromBufferAttribute( uv1, b ); + _uvC$1.fromBufferAttribute( uv1, c ); + + intersection.uv1 = Triangle.getInterpolation( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() ); + + } + + if ( normal ) { + + _normalA.fromBufferAttribute( normal, a ); + _normalB.fromBufferAttribute( normal, b ); + _normalC.fromBufferAttribute( normal, c ); + + intersection.normal = Triangle.getInterpolation( _intersectionPoint, _vA$1, _vB$1, _vC$1, _normalA, _normalB, _normalC, new Vector3() ); + + if ( intersection.normal.dot( ray.direction ) > 0 ) { + + intersection.normal.multiplyScalar( - 1 ); + + } + + } + + const face = { + a: a, + b: b, + c: c, + normal: new Vector3(), + materialIndex: 0 + }; + + Triangle.getNormal( _vA$1, _vB$1, _vC$1, face.normal ); + + intersection.face = face; + + } + + return intersection; + +} + +class BoxGeometry extends BufferGeometry { + + constructor( width = 1, height = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1 ) { + + super(); + + this.type = 'BoxGeometry'; + + this.parameters = { + width: width, + height: height, + depth: depth, + widthSegments: widthSegments, + heightSegments: heightSegments, + depthSegments: depthSegments + }; + + const scope = this; + + // segments + + widthSegments = Math.floor( widthSegments ); + heightSegments = Math.floor( heightSegments ); + depthSegments = Math.floor( depthSegments ); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // helper variables + + let numberOfVertices = 0; + let groupStart = 0; + + // build each side of the box geometry + + buildPlane( 'z', 'y', 'x', - 1, - 1, depth, height, width, depthSegments, heightSegments, 0 ); // px + buildPlane( 'z', 'y', 'x', 1, - 1, depth, height, - width, depthSegments, heightSegments, 1 ); // nx + buildPlane( 'x', 'z', 'y', 1, 1, width, depth, height, widthSegments, depthSegments, 2 ); // py + buildPlane( 'x', 'z', 'y', 1, - 1, width, depth, - height, widthSegments, depthSegments, 3 ); // ny + buildPlane( 'x', 'y', 'z', 1, - 1, width, height, depth, widthSegments, heightSegments, 4 ); // pz + buildPlane( 'x', 'y', 'z', - 1, - 1, width, height, - depth, widthSegments, heightSegments, 5 ); // nz + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + function buildPlane( u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex ) { + + const segmentWidth = width / gridX; + const segmentHeight = height / gridY; + + const widthHalf = width / 2; + const heightHalf = height / 2; + const depthHalf = depth / 2; + + const gridX1 = gridX + 1; + const gridY1 = gridY + 1; + + let vertexCounter = 0; + let groupCount = 0; + + const vector = new Vector3(); + + // generate vertices, normals and uvs + + for ( let iy = 0; iy < gridY1; iy ++ ) { + + const y = iy * segmentHeight - heightHalf; + + for ( let ix = 0; ix < gridX1; ix ++ ) { + + const x = ix * segmentWidth - widthHalf; + + // set values to correct vector component + + vector[ u ] = x * udir; + vector[ v ] = y * vdir; + vector[ w ] = depthHalf; + + // now apply vector to vertex buffer + + vertices.push( vector.x, vector.y, vector.z ); + + // set values to correct vector component + + vector[ u ] = 0; + vector[ v ] = 0; + vector[ w ] = depth > 0 ? 1 : - 1; + + // now apply vector to normal buffer + + normals.push( vector.x, vector.y, vector.z ); + + // uvs + + uvs.push( ix / gridX ); + uvs.push( 1 - ( iy / gridY ) ); + + // counters + + vertexCounter += 1; + + } + + } + + // indices + + // 1. you need three indices to draw a single face + // 2. a single segment consists of two faces + // 3. so we need to generate six (2*3) indices per segment + + for ( let iy = 0; iy < gridY; iy ++ ) { + + for ( let ix = 0; ix < gridX; ix ++ ) { + + const a = numberOfVertices + ix + gridX1 * iy; + const b = numberOfVertices + ix + gridX1 * ( iy + 1 ); + const c = numberOfVertices + ( ix + 1 ) + gridX1 * ( iy + 1 ); + const d = numberOfVertices + ( ix + 1 ) + gridX1 * iy; + + // faces + + indices.push( a, b, d ); + indices.push( b, c, d ); + + // increase counter + + groupCount += 6; + + } + + } + + // add a group to the geometry. this will ensure multi material support + + scope.addGroup( groupStart, groupCount, materialIndex ); + + // calculate new start value for groups + + groupStart += groupCount; + + // update total number of vertices + + numberOfVertices += vertexCounter; + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new BoxGeometry( data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments ); + + } + +} + +/** + * Uniform Utilities + */ + +function cloneUniforms( src ) { + + const dst = {}; + + for ( const u in src ) { + + dst[ u ] = {}; + + for ( const p in src[ u ] ) { + + const property = src[ u ][ p ]; + + if ( property && ( property.isColor || + property.isMatrix3 || property.isMatrix4 || + property.isVector2 || property.isVector3 || property.isVector4 || + property.isTexture || property.isQuaternion ) ) { + + if ( property.isRenderTargetTexture ) { + + console.warn( 'UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().' ); + dst[ u ][ p ] = null; + + } else { + + dst[ u ][ p ] = property.clone(); + + } + + } else if ( Array.isArray( property ) ) { + + dst[ u ][ p ] = property.slice(); + + } else { + + dst[ u ][ p ] = property; + + } + + } + + } + + return dst; + +} + +function mergeUniforms( uniforms ) { + + const merged = {}; + + for ( let u = 0; u < uniforms.length; u ++ ) { + + const tmp = cloneUniforms( uniforms[ u ] ); + + for ( const p in tmp ) { + + merged[ p ] = tmp[ p ]; + + } + + } + + return merged; + +} + +function cloneUniformsGroups( src ) { + + const dst = []; + + for ( let u = 0; u < src.length; u ++ ) { + + dst.push( src[ u ].clone() ); + + } + + return dst; + +} + +function getUnlitUniformColorSpace( renderer ) { + + const currentRenderTarget = renderer.getRenderTarget(); + + if ( currentRenderTarget === null ) { + + // https://github.com/mrdoob/three.js/pull/23937#issuecomment-1111067398 + return renderer.outputColorSpace; + + } + + // https://github.com/mrdoob/three.js/issues/27868 + if ( currentRenderTarget.isXRRenderTarget === true ) { + + return currentRenderTarget.texture.colorSpace; + + } + + return ColorManagement.workingColorSpace; + +} + +// Legacy + +const UniformsUtils = { clone: cloneUniforms, merge: mergeUniforms }; + +var default_vertex = "void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"; + +var default_fragment = "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}"; + +class ShaderMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isShaderMaterial = true; + + this.type = 'ShaderMaterial'; + + this.defines = {}; + this.uniforms = {}; + this.uniformsGroups = []; + + this.vertexShader = default_vertex; + this.fragmentShader = default_fragment; + + this.linewidth = 1; + + this.wireframe = false; + this.wireframeLinewidth = 1; + + this.fog = false; // set to use scene fog + this.lights = false; // set to use scene lights + this.clipping = false; // set to use user-defined clipping planes + + this.forceSinglePass = true; + + this.extensions = { + clipCullDistance: false, // set to use vertex shader clipping + multiDraw: false // set to use vertex shader multi_draw / enable gl_DrawID + }; + + // When rendered geometry doesn't include these attributes but the material does, + // use these default values in WebGL. This avoids errors when buffer data is missing. + this.defaultAttributeValues = { + 'color': [ 1, 1, 1 ], + 'uv': [ 0, 0 ], + 'uv1': [ 0, 0 ] + }; + + this.index0AttributeName = undefined; + this.uniformsNeedUpdate = false; + + this.glslVersion = null; + + if ( parameters !== undefined ) { + + this.setValues( parameters ); + + } + + } + + copy( source ) { + + super.copy( source ); + + this.fragmentShader = source.fragmentShader; + this.vertexShader = source.vertexShader; + + this.uniforms = cloneUniforms( source.uniforms ); + this.uniformsGroups = cloneUniformsGroups( source.uniformsGroups ); + + this.defines = Object.assign( {}, source.defines ); + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + + this.fog = source.fog; + this.lights = source.lights; + this.clipping = source.clipping; + + this.extensions = Object.assign( {}, source.extensions ); + + this.glslVersion = source.glslVersion; + + return this; + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + data.glslVersion = this.glslVersion; + data.uniforms = {}; + + for ( const name in this.uniforms ) { + + const uniform = this.uniforms[ name ]; + const value = uniform.value; + + if ( value && value.isTexture ) { + + data.uniforms[ name ] = { + type: 't', + value: value.toJSON( meta ).uuid + }; + + } else if ( value && value.isColor ) { + + data.uniforms[ name ] = { + type: 'c', + value: value.getHex() + }; + + } else if ( value && value.isVector2 ) { + + data.uniforms[ name ] = { + type: 'v2', + value: value.toArray() + }; + + } else if ( value && value.isVector3 ) { + + data.uniforms[ name ] = { + type: 'v3', + value: value.toArray() + }; + + } else if ( value && value.isVector4 ) { + + data.uniforms[ name ] = { + type: 'v4', + value: value.toArray() + }; + + } else if ( value && value.isMatrix3 ) { + + data.uniforms[ name ] = { + type: 'm3', + value: value.toArray() + }; + + } else if ( value && value.isMatrix4 ) { + + data.uniforms[ name ] = { + type: 'm4', + value: value.toArray() + }; + + } else { + + data.uniforms[ name ] = { + value: value + }; + + // note: the array variants v2v, v3v, v4v, m4v and tv are not supported so far + + } + + } + + if ( Object.keys( this.defines ).length > 0 ) data.defines = this.defines; + + data.vertexShader = this.vertexShader; + data.fragmentShader = this.fragmentShader; + + data.lights = this.lights; + data.clipping = this.clipping; + + const extensions = {}; + + for ( const key in this.extensions ) { + + if ( this.extensions[ key ] === true ) extensions[ key ] = true; + + } + + if ( Object.keys( extensions ).length > 0 ) data.extensions = extensions; + + return data; + + } + +} + +class Camera extends Object3D { + + constructor() { + + super(); + + this.isCamera = true; + + this.type = 'Camera'; + + this.matrixWorldInverse = new Matrix4(); + + this.projectionMatrix = new Matrix4(); + this.projectionMatrixInverse = new Matrix4(); + + this.coordinateSystem = WebGLCoordinateSystem; + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.matrixWorldInverse.copy( source.matrixWorldInverse ); + + this.projectionMatrix.copy( source.projectionMatrix ); + this.projectionMatrixInverse.copy( source.projectionMatrixInverse ); + + this.coordinateSystem = source.coordinateSystem; + + return this; + + } + + getWorldDirection( target ) { + + return super.getWorldDirection( target ).negate(); + + } + + updateMatrixWorld( force ) { + + super.updateMatrixWorld( force ); + + this.matrixWorldInverse.copy( this.matrixWorld ).invert(); + + } + + updateWorldMatrix( updateParents, updateChildren ) { + + super.updateWorldMatrix( updateParents, updateChildren ); + + this.matrixWorldInverse.copy( this.matrixWorld ).invert(); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +const _v3$1 = /*@__PURE__*/ new Vector3(); +const _minTarget = /*@__PURE__*/ new Vector2(); +const _maxTarget = /*@__PURE__*/ new Vector2(); + + +class PerspectiveCamera extends Camera { + + constructor( fov = 50, aspect = 1, near = 0.1, far = 2000 ) { + + super(); + + this.isPerspectiveCamera = true; + + this.type = 'PerspectiveCamera'; + + this.fov = fov; + this.zoom = 1; + + this.near = near; + this.far = far; + this.focus = 10; + + this.aspect = aspect; + this.view = null; + + this.filmGauge = 35; // width of the film (default in millimeters) + this.filmOffset = 0; // horizontal film offset (same unit as gauge) + + this.updateProjectionMatrix(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.fov = source.fov; + this.zoom = source.zoom; + + this.near = source.near; + this.far = source.far; + this.focus = source.focus; + + this.aspect = source.aspect; + this.view = source.view === null ? null : Object.assign( {}, source.view ); + + this.filmGauge = source.filmGauge; + this.filmOffset = source.filmOffset; + + return this; + + } + + /** + * Sets the FOV by focal length in respect to the current .filmGauge. + * + * The default film gauge is 35, so that the focal length can be specified for + * a 35mm (full frame) camera. + * + * Values for focal length and film gauge must have the same unit. + */ + setFocalLength( focalLength ) { + + /** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */ + const vExtentSlope = 0.5 * this.getFilmHeight() / focalLength; + + this.fov = RAD2DEG * 2 * Math.atan( vExtentSlope ); + this.updateProjectionMatrix(); + + } + + /** + * Calculates the focal length from the current .fov and .filmGauge. + */ + getFocalLength() { + + const vExtentSlope = Math.tan( DEG2RAD * 0.5 * this.fov ); + + return 0.5 * this.getFilmHeight() / vExtentSlope; + + } + + getEffectiveFOV() { + + return RAD2DEG * 2 * Math.atan( + Math.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom ); + + } + + getFilmWidth() { + + // film not completely covered in portrait format (aspect < 1) + return this.filmGauge * Math.min( this.aspect, 1 ); + + } + + getFilmHeight() { + + // film not completely covered in landscape format (aspect > 1) + return this.filmGauge / Math.max( this.aspect, 1 ); + + } + + /** + * Computes the 2D bounds of the camera's viewable rectangle at a given distance along the viewing direction. + * Sets minTarget and maxTarget to the coordinates of the lower-left and upper-right corners of the view rectangle. + */ + getViewBounds( distance, minTarget, maxTarget ) { + + _v3$1.set( - 1, - 1, 0.5 ).applyMatrix4( this.projectionMatrixInverse ); + + minTarget.set( _v3$1.x, _v3$1.y ).multiplyScalar( - distance / _v3$1.z ); + + _v3$1.set( 1, 1, 0.5 ).applyMatrix4( this.projectionMatrixInverse ); + + maxTarget.set( _v3$1.x, _v3$1.y ).multiplyScalar( - distance / _v3$1.z ); + + } + + /** + * Computes the width and height of the camera's viewable rectangle at a given distance along the viewing direction. + * Copies the result into the target Vector2, where x is width and y is height. + */ + getViewSize( distance, target ) { + + this.getViewBounds( distance, _minTarget, _maxTarget ); + + return target.subVectors( _maxTarget, _minTarget ); + + } + + /** + * Sets an offset in a larger frustum. This is useful for multi-window or + * multi-monitor/multi-machine setups. + * + * For example, if you have 3x2 monitors and each monitor is 1920x1080 and + * the monitors are in grid like this + * + * +---+---+---+ + * | A | B | C | + * +---+---+---+ + * | D | E | F | + * +---+---+---+ + * + * then for each monitor you would call it like this + * + * const w = 1920; + * const h = 1080; + * const fullWidth = w * 3; + * const fullHeight = h * 2; + * + * --A-- + * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h ); + * --B-- + * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h ); + * --C-- + * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h ); + * --D-- + * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h ); + * --E-- + * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h ); + * --F-- + * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h ); + * + * Note there is no reason monitors have to be the same size or in a grid. + */ + setViewOffset( fullWidth, fullHeight, x, y, width, height ) { + + this.aspect = fullWidth / fullHeight; + + if ( this.view === null ) { + + this.view = { + enabled: true, + fullWidth: 1, + fullHeight: 1, + offsetX: 0, + offsetY: 0, + width: 1, + height: 1 + }; + + } + + this.view.enabled = true; + this.view.fullWidth = fullWidth; + this.view.fullHeight = fullHeight; + this.view.offsetX = x; + this.view.offsetY = y; + this.view.width = width; + this.view.height = height; + + this.updateProjectionMatrix(); + + } + + clearViewOffset() { + + if ( this.view !== null ) { + + this.view.enabled = false; + + } + + this.updateProjectionMatrix(); + + } + + updateProjectionMatrix() { + + const near = this.near; + let top = near * Math.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom; + let height = 2 * top; + let width = this.aspect * height; + let left = - 0.5 * width; + const view = this.view; + + if ( this.view !== null && this.view.enabled ) { + + const fullWidth = view.fullWidth, + fullHeight = view.fullHeight; + + left += view.offsetX * width / fullWidth; + top -= view.offsetY * height / fullHeight; + width *= view.width / fullWidth; + height *= view.height / fullHeight; + + } + + const skew = this.filmOffset; + if ( skew !== 0 ) left += near * skew / this.getFilmWidth(); + + this.projectionMatrix.makePerspective( left, left + width, top, top - height, near, this.far, this.coordinateSystem ); + + this.projectionMatrixInverse.copy( this.projectionMatrix ).invert(); + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + data.object.fov = this.fov; + data.object.zoom = this.zoom; + + data.object.near = this.near; + data.object.far = this.far; + data.object.focus = this.focus; + + data.object.aspect = this.aspect; + + if ( this.view !== null ) data.object.view = Object.assign( {}, this.view ); + + data.object.filmGauge = this.filmGauge; + data.object.filmOffset = this.filmOffset; + + return data; + + } + +} + +const fov = - 90; // negative fov is not an error +const aspect = 1; + +class CubeCamera extends Object3D { + + constructor( near, far, renderTarget ) { + + super(); + + this.type = 'CubeCamera'; + + this.renderTarget = renderTarget; + this.coordinateSystem = null; + this.activeMipmapLevel = 0; + + const cameraPX = new PerspectiveCamera( fov, aspect, near, far ); + cameraPX.layers = this.layers; + this.add( cameraPX ); + + const cameraNX = new PerspectiveCamera( fov, aspect, near, far ); + cameraNX.layers = this.layers; + this.add( cameraNX ); + + const cameraPY = new PerspectiveCamera( fov, aspect, near, far ); + cameraPY.layers = this.layers; + this.add( cameraPY ); + + const cameraNY = new PerspectiveCamera( fov, aspect, near, far ); + cameraNY.layers = this.layers; + this.add( cameraNY ); + + const cameraPZ = new PerspectiveCamera( fov, aspect, near, far ); + cameraPZ.layers = this.layers; + this.add( cameraPZ ); + + const cameraNZ = new PerspectiveCamera( fov, aspect, near, far ); + cameraNZ.layers = this.layers; + this.add( cameraNZ ); + + } + + updateCoordinateSystem() { + + const coordinateSystem = this.coordinateSystem; + + const cameras = this.children.concat(); + + const [ cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ ] = cameras; + + for ( const camera of cameras ) this.remove( camera ); + + if ( coordinateSystem === WebGLCoordinateSystem ) { + + cameraPX.up.set( 0, 1, 0 ); + cameraPX.lookAt( 1, 0, 0 ); + + cameraNX.up.set( 0, 1, 0 ); + cameraNX.lookAt( - 1, 0, 0 ); + + cameraPY.up.set( 0, 0, - 1 ); + cameraPY.lookAt( 0, 1, 0 ); + + cameraNY.up.set( 0, 0, 1 ); + cameraNY.lookAt( 0, - 1, 0 ); + + cameraPZ.up.set( 0, 1, 0 ); + cameraPZ.lookAt( 0, 0, 1 ); + + cameraNZ.up.set( 0, 1, 0 ); + cameraNZ.lookAt( 0, 0, - 1 ); + + } else if ( coordinateSystem === WebGPUCoordinateSystem ) { + + cameraPX.up.set( 0, - 1, 0 ); + cameraPX.lookAt( - 1, 0, 0 ); + + cameraNX.up.set( 0, - 1, 0 ); + cameraNX.lookAt( 1, 0, 0 ); + + cameraPY.up.set( 0, 0, 1 ); + cameraPY.lookAt( 0, 1, 0 ); + + cameraNY.up.set( 0, 0, - 1 ); + cameraNY.lookAt( 0, - 1, 0 ); + + cameraPZ.up.set( 0, - 1, 0 ); + cameraPZ.lookAt( 0, 0, 1 ); + + cameraNZ.up.set( 0, - 1, 0 ); + cameraNZ.lookAt( 0, 0, - 1 ); + + } else { + + throw new Error( 'THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: ' + coordinateSystem ); + + } + + for ( const camera of cameras ) { + + this.add( camera ); + + camera.updateMatrixWorld(); + + } + + } + + update( renderer, scene ) { + + if ( this.parent === null ) this.updateMatrixWorld(); + + const { renderTarget, activeMipmapLevel } = this; + + if ( this.coordinateSystem !== renderer.coordinateSystem ) { + + this.coordinateSystem = renderer.coordinateSystem; + + this.updateCoordinateSystem(); + + } + + const [ cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ ] = this.children; + + const currentRenderTarget = renderer.getRenderTarget(); + const currentActiveCubeFace = renderer.getActiveCubeFace(); + const currentActiveMipmapLevel = renderer.getActiveMipmapLevel(); + + const currentXrEnabled = renderer.xr.enabled; + + renderer.xr.enabled = false; + + const generateMipmaps = renderTarget.texture.generateMipmaps; + + renderTarget.texture.generateMipmaps = false; + + renderer.setRenderTarget( renderTarget, 0, activeMipmapLevel ); + renderer.render( scene, cameraPX ); + + renderer.setRenderTarget( renderTarget, 1, activeMipmapLevel ); + renderer.render( scene, cameraNX ); + + renderer.setRenderTarget( renderTarget, 2, activeMipmapLevel ); + renderer.render( scene, cameraPY ); + + renderer.setRenderTarget( renderTarget, 3, activeMipmapLevel ); + renderer.render( scene, cameraNY ); + + renderer.setRenderTarget( renderTarget, 4, activeMipmapLevel ); + renderer.render( scene, cameraPZ ); + + // mipmaps are generated during the last call of render() + // at this point, all sides of the cube render target are defined + + renderTarget.texture.generateMipmaps = generateMipmaps; + + renderer.setRenderTarget( renderTarget, 5, activeMipmapLevel ); + renderer.render( scene, cameraNZ ); + + renderer.setRenderTarget( currentRenderTarget, currentActiveCubeFace, currentActiveMipmapLevel ); + + renderer.xr.enabled = currentXrEnabled; + + renderTarget.texture.needsPMREMUpdate = true; + + } + +} + +class CubeTexture extends Texture { + + constructor( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace ) { + + images = images !== undefined ? images : []; + mapping = mapping !== undefined ? mapping : CubeReflectionMapping; + + super( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace ); + + this.isCubeTexture = true; + + this.flipY = false; + + } + + get images() { + + return this.image; + + } + + set images( value ) { + + this.image = value; + + } + +} + +class WebGLCubeRenderTarget extends WebGLRenderTarget { + + constructor( size = 1, options = {} ) { + + super( size, size, options ); + + this.isWebGLCubeRenderTarget = true; + + const image = { width: size, height: size, depth: 1 }; + const images = [ image, image, image, image, image, image ]; + + this.texture = new CubeTexture( images, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace ); + + // By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js) + // in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words, + // in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly. + + // three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped + // and the flag isRenderTargetTexture controls this conversion. The flip is not required when using WebGLCubeRenderTarget.texture + // as a cube texture (this is detected when isRenderTargetTexture is set to true for cube textures). + + this.texture.isRenderTargetTexture = true; + + this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false; + this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter; + + } + + fromEquirectangularTexture( renderer, texture ) { + + this.texture.type = texture.type; + this.texture.colorSpace = texture.colorSpace; + + this.texture.generateMipmaps = texture.generateMipmaps; + this.texture.minFilter = texture.minFilter; + this.texture.magFilter = texture.magFilter; + + const shader = { + + uniforms: { + tEquirect: { value: null }, + }, + + vertexShader: /* glsl */` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `, + + fragmentShader: /* glsl */` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + ` + }; + + const geometry = new BoxGeometry( 5, 5, 5 ); + + const material = new ShaderMaterial( { + + name: 'CubemapFromEquirect', + + uniforms: cloneUniforms( shader.uniforms ), + vertexShader: shader.vertexShader, + fragmentShader: shader.fragmentShader, + side: BackSide, + blending: NoBlending + + } ); + + material.uniforms.tEquirect.value = texture; + + const mesh = new Mesh( geometry, material ); + + const currentMinFilter = texture.minFilter; + + // Avoid blurred poles + if ( texture.minFilter === LinearMipmapLinearFilter ) texture.minFilter = LinearFilter; + + const camera = new CubeCamera( 1, 10, this ); + camera.update( renderer, mesh ); + + texture.minFilter = currentMinFilter; + + mesh.geometry.dispose(); + mesh.material.dispose(); + + return this; + + } + + clear( renderer, color, depth, stencil ) { + + const currentRenderTarget = renderer.getRenderTarget(); + + for ( let i = 0; i < 6; i ++ ) { + + renderer.setRenderTarget( this, i ); + + renderer.clear( color, depth, stencil ); + + } + + renderer.setRenderTarget( currentRenderTarget ); + + } + +} + +const _vector1 = /*@__PURE__*/ new Vector3(); +const _vector2 = /*@__PURE__*/ new Vector3(); +const _normalMatrix = /*@__PURE__*/ new Matrix3(); + +class Plane { + + constructor( normal = new Vector3( 1, 0, 0 ), constant = 0 ) { + + this.isPlane = true; + + // normal is assumed to be normalized + + this.normal = normal; + this.constant = constant; + + } + + set( normal, constant ) { + + this.normal.copy( normal ); + this.constant = constant; + + return this; + + } + + setComponents( x, y, z, w ) { + + this.normal.set( x, y, z ); + this.constant = w; + + return this; + + } + + setFromNormalAndCoplanarPoint( normal, point ) { + + this.normal.copy( normal ); + this.constant = - point.dot( this.normal ); + + return this; + + } + + setFromCoplanarPoints( a, b, c ) { + + const normal = _vector1.subVectors( c, b ).cross( _vector2.subVectors( a, b ) ).normalize(); + + // Q: should an error be thrown if normal is zero (e.g. degenerate plane)? + + this.setFromNormalAndCoplanarPoint( normal, a ); + + return this; + + } + + copy( plane ) { + + this.normal.copy( plane.normal ); + this.constant = plane.constant; + + return this; + + } + + normalize() { + + // Note: will lead to a divide by zero if the plane is invalid. + + const inverseNormalLength = 1.0 / this.normal.length(); + this.normal.multiplyScalar( inverseNormalLength ); + this.constant *= inverseNormalLength; + + return this; + + } + + negate() { + + this.constant *= - 1; + this.normal.negate(); + + return this; + + } + + distanceToPoint( point ) { + + return this.normal.dot( point ) + this.constant; + + } + + distanceToSphere( sphere ) { + + return this.distanceToPoint( sphere.center ) - sphere.radius; + + } + + projectPoint( point, target ) { + + return target.copy( point ).addScaledVector( this.normal, - this.distanceToPoint( point ) ); + + } + + intersectLine( line, target ) { + + const direction = line.delta( _vector1 ); + + const denominator = this.normal.dot( direction ); + + if ( denominator === 0 ) { + + // line is coplanar, return origin + if ( this.distanceToPoint( line.start ) === 0 ) { + + return target.copy( line.start ); + + } + + // Unsure if this is the correct method to handle this case. + return null; + + } + + const t = - ( line.start.dot( this.normal ) + this.constant ) / denominator; + + if ( t < 0 || t > 1 ) { + + return null; + + } + + return target.copy( line.start ).addScaledVector( direction, t ); + + } + + intersectsLine( line ) { + + // Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it. + + const startSign = this.distanceToPoint( line.start ); + const endSign = this.distanceToPoint( line.end ); + + return ( startSign < 0 && endSign > 0 ) || ( endSign < 0 && startSign > 0 ); + + } + + intersectsBox( box ) { + + return box.intersectsPlane( this ); + + } + + intersectsSphere( sphere ) { + + return sphere.intersectsPlane( this ); + + } + + coplanarPoint( target ) { + + return target.copy( this.normal ).multiplyScalar( - this.constant ); + + } + + applyMatrix4( matrix, optionalNormalMatrix ) { + + const normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix( matrix ); + + const referencePoint = this.coplanarPoint( _vector1 ).applyMatrix4( matrix ); + + const normal = this.normal.applyMatrix3( normalMatrix ).normalize(); + + this.constant = - referencePoint.dot( normal ); + + return this; + + } + + translate( offset ) { + + this.constant -= offset.dot( this.normal ); + + return this; + + } + + equals( plane ) { + + return plane.normal.equals( this.normal ) && ( plane.constant === this.constant ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +const _sphere$5 = /*@__PURE__*/ new Sphere(); +const _vector$7 = /*@__PURE__*/ new Vector3(); + +class Frustum { + + constructor( p0 = new Plane(), p1 = new Plane(), p2 = new Plane(), p3 = new Plane(), p4 = new Plane(), p5 = new Plane() ) { + + this.planes = [ p0, p1, p2, p3, p4, p5 ]; + + } + + set( p0, p1, p2, p3, p4, p5 ) { + + const planes = this.planes; + + planes[ 0 ].copy( p0 ); + planes[ 1 ].copy( p1 ); + planes[ 2 ].copy( p2 ); + planes[ 3 ].copy( p3 ); + planes[ 4 ].copy( p4 ); + planes[ 5 ].copy( p5 ); + + return this; + + } + + copy( frustum ) { + + const planes = this.planes; + + for ( let i = 0; i < 6; i ++ ) { + + planes[ i ].copy( frustum.planes[ i ] ); + + } + + return this; + + } + + setFromProjectionMatrix( m, coordinateSystem = WebGLCoordinateSystem ) { + + const planes = this.planes; + const me = m.elements; + const me0 = me[ 0 ], me1 = me[ 1 ], me2 = me[ 2 ], me3 = me[ 3 ]; + const me4 = me[ 4 ], me5 = me[ 5 ], me6 = me[ 6 ], me7 = me[ 7 ]; + const me8 = me[ 8 ], me9 = me[ 9 ], me10 = me[ 10 ], me11 = me[ 11 ]; + const me12 = me[ 12 ], me13 = me[ 13 ], me14 = me[ 14 ], me15 = me[ 15 ]; + + planes[ 0 ].setComponents( me3 - me0, me7 - me4, me11 - me8, me15 - me12 ).normalize(); + planes[ 1 ].setComponents( me3 + me0, me7 + me4, me11 + me8, me15 + me12 ).normalize(); + planes[ 2 ].setComponents( me3 + me1, me7 + me5, me11 + me9, me15 + me13 ).normalize(); + planes[ 3 ].setComponents( me3 - me1, me7 - me5, me11 - me9, me15 - me13 ).normalize(); + planes[ 4 ].setComponents( me3 - me2, me7 - me6, me11 - me10, me15 - me14 ).normalize(); + + if ( coordinateSystem === WebGLCoordinateSystem ) { + + planes[ 5 ].setComponents( me3 + me2, me7 + me6, me11 + me10, me15 + me14 ).normalize(); + + } else if ( coordinateSystem === WebGPUCoordinateSystem ) { + + planes[ 5 ].setComponents( me2, me6, me10, me14 ).normalize(); + + } else { + + throw new Error( 'THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: ' + coordinateSystem ); + + } + + return this; + + } + + intersectsObject( object ) { + + if ( object.boundingSphere !== undefined ) { + + if ( object.boundingSphere === null ) object.computeBoundingSphere(); + + _sphere$5.copy( object.boundingSphere ).applyMatrix4( object.matrixWorld ); + + } else { + + const geometry = object.geometry; + + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + + _sphere$5.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld ); + + } + + return this.intersectsSphere( _sphere$5 ); + + } + + intersectsSprite( sprite ) { + + _sphere$5.center.set( 0, 0, 0 ); + _sphere$5.radius = 0.7071067811865476; + _sphere$5.applyMatrix4( sprite.matrixWorld ); + + return this.intersectsSphere( _sphere$5 ); + + } + + intersectsSphere( sphere ) { + + const planes = this.planes; + const center = sphere.center; + const negRadius = - sphere.radius; + + for ( let i = 0; i < 6; i ++ ) { + + const distance = planes[ i ].distanceToPoint( center ); + + if ( distance < negRadius ) { + + return false; + + } + + } + + return true; + + } + + intersectsBox( box ) { + + const planes = this.planes; + + for ( let i = 0; i < 6; i ++ ) { + + const plane = planes[ i ]; + + // corner at max distance + + _vector$7.x = plane.normal.x > 0 ? box.max.x : box.min.x; + _vector$7.y = plane.normal.y > 0 ? box.max.y : box.min.y; + _vector$7.z = plane.normal.z > 0 ? box.max.z : box.min.z; + + if ( plane.distanceToPoint( _vector$7 ) < 0 ) { + + return false; + + } + + } + + return true; + + } + + containsPoint( point ) { + + const planes = this.planes; + + for ( let i = 0; i < 6; i ++ ) { + + if ( planes[ i ].distanceToPoint( point ) < 0 ) { + + return false; + + } + + } + + return true; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +function WebGLAnimation() { + + let context = null; + let isAnimating = false; + let animationLoop = null; + let requestId = null; + + function onAnimationFrame( time, frame ) { + + animationLoop( time, frame ); + + requestId = context.requestAnimationFrame( onAnimationFrame ); + + } + + return { + + start: function () { + + if ( isAnimating === true ) return; + if ( animationLoop === null ) return; + + requestId = context.requestAnimationFrame( onAnimationFrame ); + + isAnimating = true; + + }, + + stop: function () { + + context.cancelAnimationFrame( requestId ); + + isAnimating = false; + + }, + + setAnimationLoop: function ( callback ) { + + animationLoop = callback; + + }, + + setContext: function ( value ) { + + context = value; + + } + + }; + +} + +function WebGLAttributes( gl ) { + + const buffers = new WeakMap(); + + function createBuffer( attribute, bufferType ) { + + const array = attribute.array; + const usage = attribute.usage; + const size = array.byteLength; + + const buffer = gl.createBuffer(); + + gl.bindBuffer( bufferType, buffer ); + gl.bufferData( bufferType, array, usage ); + + attribute.onUploadCallback(); + + let type; + + if ( array instanceof Float32Array ) { + + type = gl.FLOAT; + + } else if ( array instanceof Uint16Array ) { + + if ( attribute.isFloat16BufferAttribute ) { + + type = gl.HALF_FLOAT; + + } else { + + type = gl.UNSIGNED_SHORT; + + } + + } else if ( array instanceof Int16Array ) { + + type = gl.SHORT; + + } else if ( array instanceof Uint32Array ) { + + type = gl.UNSIGNED_INT; + + } else if ( array instanceof Int32Array ) { + + type = gl.INT; + + } else if ( array instanceof Int8Array ) { + + type = gl.BYTE; + + } else if ( array instanceof Uint8Array ) { + + type = gl.UNSIGNED_BYTE; + + } else if ( array instanceof Uint8ClampedArray ) { + + type = gl.UNSIGNED_BYTE; + + } else { + + throw new Error( 'THREE.WebGLAttributes: Unsupported buffer data format: ' + array ); + + } + + return { + buffer: buffer, + type: type, + bytesPerElement: array.BYTES_PER_ELEMENT, + version: attribute.version, + size: size + }; + + } + + function updateBuffer( buffer, attribute, bufferType ) { + + const array = attribute.array; + const updateRange = attribute._updateRange; // @deprecated, r159 + const updateRanges = attribute.updateRanges; + + gl.bindBuffer( bufferType, buffer ); + + if ( updateRange.count === - 1 && updateRanges.length === 0 ) { + + // Not using update ranges + gl.bufferSubData( bufferType, 0, array ); + + } + + if ( updateRanges.length !== 0 ) { + + for ( let i = 0, l = updateRanges.length; i < l; i ++ ) { + + const range = updateRanges[ i ]; + + gl.bufferSubData( bufferType, range.start * array.BYTES_PER_ELEMENT, + array, range.start, range.count ); + + } + + attribute.clearUpdateRanges(); + + } + + // @deprecated, r159 + if ( updateRange.count !== - 1 ) { + + gl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, + array, updateRange.offset, updateRange.count ); + + updateRange.count = - 1; // reset range + + } + + attribute.onUploadCallback(); + + } + + // + + function get( attribute ) { + + if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data; + + return buffers.get( attribute ); + + } + + function remove( attribute ) { + + if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data; + + const data = buffers.get( attribute ); + + if ( data ) { + + gl.deleteBuffer( data.buffer ); + + buffers.delete( attribute ); + + } + + } + + function update( attribute, bufferType ) { + + if ( attribute.isGLBufferAttribute ) { + + const cached = buffers.get( attribute ); + + if ( ! cached || cached.version < attribute.version ) { + + buffers.set( attribute, { + buffer: attribute.buffer, + type: attribute.type, + bytesPerElement: attribute.elementSize, + version: attribute.version + } ); + + } + + return; + + } + + if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data; + + const data = buffers.get( attribute ); + + if ( data === undefined ) { + + buffers.set( attribute, createBuffer( attribute, bufferType ) ); + + } else if ( data.version < attribute.version ) { + + if ( data.size !== attribute.array.byteLength ) { + + throw new Error( 'THREE.WebGLAttributes: The size of the buffer attribute\'s array buffer does not match the original size. Resizing buffer attributes is not supported.' ); + + } + + updateBuffer( data.buffer, attribute, bufferType ); + + data.version = attribute.version; + + } + + } + + return { + + get: get, + remove: remove, + update: update + + }; + +} + +class PlaneGeometry extends BufferGeometry { + + constructor( width = 1, height = 1, widthSegments = 1, heightSegments = 1 ) { + + super(); + + this.type = 'PlaneGeometry'; + + this.parameters = { + width: width, + height: height, + widthSegments: widthSegments, + heightSegments: heightSegments + }; + + const width_half = width / 2; + const height_half = height / 2; + + const gridX = Math.floor( widthSegments ); + const gridY = Math.floor( heightSegments ); + + const gridX1 = gridX + 1; + const gridY1 = gridY + 1; + + const segment_width = width / gridX; + const segment_height = height / gridY; + + // + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + for ( let iy = 0; iy < gridY1; iy ++ ) { + + const y = iy * segment_height - height_half; + + for ( let ix = 0; ix < gridX1; ix ++ ) { + + const x = ix * segment_width - width_half; + + vertices.push( x, - y, 0 ); + + normals.push( 0, 0, 1 ); + + uvs.push( ix / gridX ); + uvs.push( 1 - ( iy / gridY ) ); + + } + + } + + for ( let iy = 0; iy < gridY; iy ++ ) { + + for ( let ix = 0; ix < gridX; ix ++ ) { + + const a = ix + gridX1 * iy; + const b = ix + gridX1 * ( iy + 1 ); + const c = ( ix + 1 ) + gridX1 * ( iy + 1 ); + const d = ( ix + 1 ) + gridX1 * iy; + + indices.push( a, b, d ); + indices.push( b, c, d ); + + } + + } + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new PlaneGeometry( data.width, data.height, data.widthSegments, data.heightSegments ); + + } + +} + +var alphahash_fragment = "#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif"; + +var alphahash_pars_fragment = "#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif"; + +var alphamap_fragment = "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif"; + +var alphamap_pars_fragment = "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif"; + +var alphatest_fragment = "#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif"; + +var alphatest_pars_fragment = "#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif"; + +var aomap_fragment = "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif"; + +var aomap_pars_fragment = "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif"; + +var batching_pars_vertex = "#ifdef USE_BATCHING\n\tattribute float batchId;\n\tuniform highp sampler2D batchingTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif"; + +var batching_vertex = "#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( batchId );\n#endif"; + +var begin_vertex = "vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif"; + +var beginnormal_vertex = "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif"; + +var bsdfs = "float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated"; + +var iridescence_fragment = "#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif"; + +var bumpmap_pars_fragment = "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif"; + +var clipping_planes_fragment = "#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif"; + +var clipping_planes_pars_fragment = "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif"; + +var clipping_planes_pars_vertex = "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif"; + +var clipping_planes_vertex = "#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif"; + +var color_fragment = "#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif"; + +var color_pars_fragment = "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif"; + +var color_pars_vertex = "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif"; + +var color_vertex = "#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif"; + +var common = "#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated"; + +var cube_uv_reflection_fragment = "#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif"; + +var defaultnormal_vertex = "vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif"; + +var displacementmap_pars_vertex = "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif"; + +var displacementmap_vertex = "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif"; + +var emissivemap_fragment = "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif"; + +var emissivemap_pars_fragment = "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif"; + +var colorspace_fragment = "gl_FragColor = linearToOutputTexel( gl_FragColor );"; + +var colorspace_pars_fragment = "\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}"; + +var envmap_fragment = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif"; + +var envmap_common_pars_fragment = "#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif"; + +var envmap_pars_fragment = "#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif"; + +var envmap_pars_vertex = "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif"; + +var envmap_vertex = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif"; + +var fog_vertex = "#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif"; + +var fog_pars_vertex = "#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif"; + +var fog_fragment = "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif"; + +var fog_pars_fragment = "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif"; + +var gradientmap_pars_fragment = "#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}"; + +var lightmap_pars_fragment = "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif"; + +var lights_lambert_fragment = "LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;"; + +var lights_lambert_pars_fragment = "varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert"; + +var lights_pars_begin = "uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif"; + +var envmap_physical_pars_fragment = "#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif"; + +var lights_toon_fragment = "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;"; + +var lights_toon_pars_fragment = "varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon"; + +var lights_phong_fragment = "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;"; + +var lights_phong_pars_fragment = "varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong"; + +var lights_physical_fragment = "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif"; + +var lights_physical_pars_fragment = "struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}"; + +var lights_fragment_begin = "\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif"; + +var lights_fragment_maps = "#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif"; + +var lights_fragment_end = "#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif"; + +var logdepthbuf_fragment = "#if defined( USE_LOGDEPTHBUF )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif"; + +var logdepthbuf_pars_fragment = "#if defined( USE_LOGDEPTHBUF )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif"; + +var logdepthbuf_pars_vertex = "#ifdef USE_LOGDEPTHBUF\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif"; + +var logdepthbuf_vertex = "#ifdef USE_LOGDEPTHBUF\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif"; + +var map_fragment = "#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif"; + +var map_pars_fragment = "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif"; + +var map_particle_fragment = "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif"; + +var map_particle_pars_fragment = "#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif"; + +var metalnessmap_fragment = "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif"; + +var metalnessmap_pars_fragment = "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif"; + +var morphinstance_vertex = "#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[MORPHTARGETS_COUNT];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif"; + +var morphcolor_vertex = "#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif"; + +var morphnormal_vertex = "#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif"; + +var morphtarget_pars_vertex = "#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t#endif\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\t#ifndef USE_INSTANCING_MORPH\n\t\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\t#endif\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif"; + +var morphtarget_vertex = "#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif"; + +var normal_fragment_begin = "float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;"; + +var normal_fragment_maps = "#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif"; + +var normal_pars_fragment = "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif"; + +var normal_pars_vertex = "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif"; + +var normal_vertex = "#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif"; + +var normalmap_pars_fragment = "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif"; + +var clearcoat_normal_fragment_begin = "#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif"; + +var clearcoat_normal_fragment_maps = "#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif"; + +var clearcoat_pars_fragment = "#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif"; + +var iridescence_pars_fragment = "#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif"; + +var opaque_fragment = "#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );"; + +var packing = "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}"; + +var premultiplied_alpha_fragment = "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif"; + +var project_vertex = "vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;"; + +var dithering_fragment = "#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif"; + +var dithering_pars_fragment = "#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif"; + +var roughnessmap_fragment = "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif"; + +var roughnessmap_pars_fragment = "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif"; + +var shadowmap_pars_fragment = "#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\t\n\t\tfloat lightToPositionLength = length( lightToPosition );\n\t\tif ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\t\tdp += shadowBias;\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t\t) * ( 1.0 / 9.0 );\n\t\t\t#else\n\t\t\t\tshadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n#endif"; + +var shadowmap_pars_vertex = "#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif"; + +var shadowmap_vertex = "#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif"; + +var shadowmask_pars_fragment = "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}"; + +var skinbase_vertex = "#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif"; + +var skinning_pars_vertex = "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif"; + +var skinning_vertex = "#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif"; + +var skinnormal_vertex = "#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif"; + +var specularmap_fragment = "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif"; + +var specularmap_pars_fragment = "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif"; + +var tonemapping_fragment = "#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif"; + +var tonemapping_pars_fragment = "#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak < StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }"; + +var transmission_fragment = "#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif"; + +var transmission_pars_fragment = "#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif"; + +var uv_pars_fragment = "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif"; + +var uv_pars_vertex = "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif"; + +var uv_vertex = "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif"; + +var worldpos_vertex = "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif"; + +const vertex$h = "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}"; + +const fragment$h = "uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}"; + +const vertex$g = "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}"; + +const fragment$g = "#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}"; + +const vertex$f = "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}"; + +const fragment$f = "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}"; + +const vertex$e = "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}"; + +const fragment$e = "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}"; + +const vertex$d = "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}"; + +const fragment$d = "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}"; + +const vertex$c = "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}"; + +const fragment$c = "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}"; + +const vertex$b = "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const fragment$b = "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$a = "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const fragment$a = "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$9 = "#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const fragment$9 = "#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$8 = "#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}"; + +const fragment$8 = "#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$7 = "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}"; + +const fragment$7 = "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}"; + +const vertex$6 = "#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const fragment$6 = "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$5 = "#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}"; + +const fragment$5 = "#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$4 = "#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}"; + +const fragment$4 = "#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$3 = "uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const fragment$3 = "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$2 = "#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const fragment$2 = "uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}"; + +const vertex$1 = "uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}"; + +const fragment$1 = "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const ShaderChunk = { + alphahash_fragment: alphahash_fragment, + alphahash_pars_fragment: alphahash_pars_fragment, + alphamap_fragment: alphamap_fragment, + alphamap_pars_fragment: alphamap_pars_fragment, + alphatest_fragment: alphatest_fragment, + alphatest_pars_fragment: alphatest_pars_fragment, + aomap_fragment: aomap_fragment, + aomap_pars_fragment: aomap_pars_fragment, + batching_pars_vertex: batching_pars_vertex, + batching_vertex: batching_vertex, + begin_vertex: begin_vertex, + beginnormal_vertex: beginnormal_vertex, + bsdfs: bsdfs, + iridescence_fragment: iridescence_fragment, + bumpmap_pars_fragment: bumpmap_pars_fragment, + clipping_planes_fragment: clipping_planes_fragment, + clipping_planes_pars_fragment: clipping_planes_pars_fragment, + clipping_planes_pars_vertex: clipping_planes_pars_vertex, + clipping_planes_vertex: clipping_planes_vertex, + color_fragment: color_fragment, + color_pars_fragment: color_pars_fragment, + color_pars_vertex: color_pars_vertex, + color_vertex: color_vertex, + common: common, + cube_uv_reflection_fragment: cube_uv_reflection_fragment, + defaultnormal_vertex: defaultnormal_vertex, + displacementmap_pars_vertex: displacementmap_pars_vertex, + displacementmap_vertex: displacementmap_vertex, + emissivemap_fragment: emissivemap_fragment, + emissivemap_pars_fragment: emissivemap_pars_fragment, + colorspace_fragment: colorspace_fragment, + colorspace_pars_fragment: colorspace_pars_fragment, + envmap_fragment: envmap_fragment, + envmap_common_pars_fragment: envmap_common_pars_fragment, + envmap_pars_fragment: envmap_pars_fragment, + envmap_pars_vertex: envmap_pars_vertex, + envmap_physical_pars_fragment: envmap_physical_pars_fragment, + envmap_vertex: envmap_vertex, + fog_vertex: fog_vertex, + fog_pars_vertex: fog_pars_vertex, + fog_fragment: fog_fragment, + fog_pars_fragment: fog_pars_fragment, + gradientmap_pars_fragment: gradientmap_pars_fragment, + lightmap_pars_fragment: lightmap_pars_fragment, + lights_lambert_fragment: lights_lambert_fragment, + lights_lambert_pars_fragment: lights_lambert_pars_fragment, + lights_pars_begin: lights_pars_begin, + lights_toon_fragment: lights_toon_fragment, + lights_toon_pars_fragment: lights_toon_pars_fragment, + lights_phong_fragment: lights_phong_fragment, + lights_phong_pars_fragment: lights_phong_pars_fragment, + lights_physical_fragment: lights_physical_fragment, + lights_physical_pars_fragment: lights_physical_pars_fragment, + lights_fragment_begin: lights_fragment_begin, + lights_fragment_maps: lights_fragment_maps, + lights_fragment_end: lights_fragment_end, + logdepthbuf_fragment: logdepthbuf_fragment, + logdepthbuf_pars_fragment: logdepthbuf_pars_fragment, + logdepthbuf_pars_vertex: logdepthbuf_pars_vertex, + logdepthbuf_vertex: logdepthbuf_vertex, + map_fragment: map_fragment, + map_pars_fragment: map_pars_fragment, + map_particle_fragment: map_particle_fragment, + map_particle_pars_fragment: map_particle_pars_fragment, + metalnessmap_fragment: metalnessmap_fragment, + metalnessmap_pars_fragment: metalnessmap_pars_fragment, + morphinstance_vertex: morphinstance_vertex, + morphcolor_vertex: morphcolor_vertex, + morphnormal_vertex: morphnormal_vertex, + morphtarget_pars_vertex: morphtarget_pars_vertex, + morphtarget_vertex: morphtarget_vertex, + normal_fragment_begin: normal_fragment_begin, + normal_fragment_maps: normal_fragment_maps, + normal_pars_fragment: normal_pars_fragment, + normal_pars_vertex: normal_pars_vertex, + normal_vertex: normal_vertex, + normalmap_pars_fragment: normalmap_pars_fragment, + clearcoat_normal_fragment_begin: clearcoat_normal_fragment_begin, + clearcoat_normal_fragment_maps: clearcoat_normal_fragment_maps, + clearcoat_pars_fragment: clearcoat_pars_fragment, + iridescence_pars_fragment: iridescence_pars_fragment, + opaque_fragment: opaque_fragment, + packing: packing, + premultiplied_alpha_fragment: premultiplied_alpha_fragment, + project_vertex: project_vertex, + dithering_fragment: dithering_fragment, + dithering_pars_fragment: dithering_pars_fragment, + roughnessmap_fragment: roughnessmap_fragment, + roughnessmap_pars_fragment: roughnessmap_pars_fragment, + shadowmap_pars_fragment: shadowmap_pars_fragment, + shadowmap_pars_vertex: shadowmap_pars_vertex, + shadowmap_vertex: shadowmap_vertex, + shadowmask_pars_fragment: shadowmask_pars_fragment, + skinbase_vertex: skinbase_vertex, + skinning_pars_vertex: skinning_pars_vertex, + skinning_vertex: skinning_vertex, + skinnormal_vertex: skinnormal_vertex, + specularmap_fragment: specularmap_fragment, + specularmap_pars_fragment: specularmap_pars_fragment, + tonemapping_fragment: tonemapping_fragment, + tonemapping_pars_fragment: tonemapping_pars_fragment, + transmission_fragment: transmission_fragment, + transmission_pars_fragment: transmission_pars_fragment, + uv_pars_fragment: uv_pars_fragment, + uv_pars_vertex: uv_pars_vertex, + uv_vertex: uv_vertex, + worldpos_vertex: worldpos_vertex, + + background_vert: vertex$h, + background_frag: fragment$h, + backgroundCube_vert: vertex$g, + backgroundCube_frag: fragment$g, + cube_vert: vertex$f, + cube_frag: fragment$f, + depth_vert: vertex$e, + depth_frag: fragment$e, + distanceRGBA_vert: vertex$d, + distanceRGBA_frag: fragment$d, + equirect_vert: vertex$c, + equirect_frag: fragment$c, + linedashed_vert: vertex$b, + linedashed_frag: fragment$b, + meshbasic_vert: vertex$a, + meshbasic_frag: fragment$a, + meshlambert_vert: vertex$9, + meshlambert_frag: fragment$9, + meshmatcap_vert: vertex$8, + meshmatcap_frag: fragment$8, + meshnormal_vert: vertex$7, + meshnormal_frag: fragment$7, + meshphong_vert: vertex$6, + meshphong_frag: fragment$6, + meshphysical_vert: vertex$5, + meshphysical_frag: fragment$5, + meshtoon_vert: vertex$4, + meshtoon_frag: fragment$4, + points_vert: vertex$3, + points_frag: fragment$3, + shadow_vert: vertex$2, + shadow_frag: fragment$2, + sprite_vert: vertex$1, + sprite_frag: fragment$1 +}; + +/** + * Uniforms library for shared webgl shaders + */ + +const UniformsLib = { + + common: { + + diffuse: { value: /*@__PURE__*/ new Color( 0xffffff ) }, + opacity: { value: 1.0 }, + + map: { value: null }, + mapTransform: { value: /*@__PURE__*/ new Matrix3() }, + + alphaMap: { value: null }, + alphaMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + + alphaTest: { value: 0 } + + }, + + specularmap: { + + specularMap: { value: null }, + specularMapTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + envmap: { + + envMap: { value: null }, + envMapRotation: { value: /*@__PURE__*/ new Matrix3() }, + flipEnvMap: { value: - 1 }, + reflectivity: { value: 1.0 }, // basic, lambert, phong + ior: { value: 1.5 }, // physical + refractionRatio: { value: 0.98 }, // basic, lambert, phong + + }, + + aomap: { + + aoMap: { value: null }, + aoMapIntensity: { value: 1 }, + aoMapTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + lightmap: { + + lightMap: { value: null }, + lightMapIntensity: { value: 1 }, + lightMapTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + bumpmap: { + + bumpMap: { value: null }, + bumpMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + bumpScale: { value: 1 } + + }, + + normalmap: { + + normalMap: { value: null }, + normalMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + normalScale: { value: /*@__PURE__*/ new Vector2( 1, 1 ) } + + }, + + displacementmap: { + + displacementMap: { value: null }, + displacementMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + displacementScale: { value: 1 }, + displacementBias: { value: 0 } + + }, + + emissivemap: { + + emissiveMap: { value: null }, + emissiveMapTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + metalnessmap: { + + metalnessMap: { value: null }, + metalnessMapTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + roughnessmap: { + + roughnessMap: { value: null }, + roughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + gradientmap: { + + gradientMap: { value: null } + + }, + + fog: { + + fogDensity: { value: 0.00025 }, + fogNear: { value: 1 }, + fogFar: { value: 2000 }, + fogColor: { value: /*@__PURE__*/ new Color( 0xffffff ) } + + }, + + lights: { + + ambientLightColor: { value: [] }, + + lightProbe: { value: [] }, + + directionalLights: { value: [], properties: { + direction: {}, + color: {} + } }, + + directionalLightShadows: { value: [], properties: { + shadowBias: {}, + shadowNormalBias: {}, + shadowRadius: {}, + shadowMapSize: {} + } }, + + directionalShadowMap: { value: [] }, + directionalShadowMatrix: { value: [] }, + + spotLights: { value: [], properties: { + color: {}, + position: {}, + direction: {}, + distance: {}, + coneCos: {}, + penumbraCos: {}, + decay: {} + } }, + + spotLightShadows: { value: [], properties: { + shadowBias: {}, + shadowNormalBias: {}, + shadowRadius: {}, + shadowMapSize: {} + } }, + + spotLightMap: { value: [] }, + spotShadowMap: { value: [] }, + spotLightMatrix: { value: [] }, + + pointLights: { value: [], properties: { + color: {}, + position: {}, + decay: {}, + distance: {} + } }, + + pointLightShadows: { value: [], properties: { + shadowBias: {}, + shadowNormalBias: {}, + shadowRadius: {}, + shadowMapSize: {}, + shadowCameraNear: {}, + shadowCameraFar: {} + } }, + + pointShadowMap: { value: [] }, + pointShadowMatrix: { value: [] }, + + hemisphereLights: { value: [], properties: { + direction: {}, + skyColor: {}, + groundColor: {} + } }, + + // TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src + rectAreaLights: { value: [], properties: { + color: {}, + position: {}, + width: {}, + height: {} + } }, + + ltc_1: { value: null }, + ltc_2: { value: null } + + }, + + points: { + + diffuse: { value: /*@__PURE__*/ new Color( 0xffffff ) }, + opacity: { value: 1.0 }, + size: { value: 1.0 }, + scale: { value: 1.0 }, + map: { value: null }, + alphaMap: { value: null }, + alphaMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + alphaTest: { value: 0 }, + uvTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + sprite: { + + diffuse: { value: /*@__PURE__*/ new Color( 0xffffff ) }, + opacity: { value: 1.0 }, + center: { value: /*@__PURE__*/ new Vector2( 0.5, 0.5 ) }, + rotation: { value: 0.0 }, + map: { value: null }, + mapTransform: { value: /*@__PURE__*/ new Matrix3() }, + alphaMap: { value: null }, + alphaMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + alphaTest: { value: 0 } + + } + +}; + +const ShaderLib = { + + basic: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.specularmap, + UniformsLib.envmap, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.fog + ] ), + + vertexShader: ShaderChunk.meshbasic_vert, + fragmentShader: ShaderChunk.meshbasic_frag + + }, + + lambert: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.specularmap, + UniformsLib.envmap, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.emissivemap, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.fog, + UniformsLib.lights, + { + emissive: { value: /*@__PURE__*/ new Color( 0x000000 ) } + } + ] ), + + vertexShader: ShaderChunk.meshlambert_vert, + fragmentShader: ShaderChunk.meshlambert_frag + + }, + + phong: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.specularmap, + UniformsLib.envmap, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.emissivemap, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.fog, + UniformsLib.lights, + { + emissive: { value: /*@__PURE__*/ new Color( 0x000000 ) }, + specular: { value: /*@__PURE__*/ new Color( 0x111111 ) }, + shininess: { value: 30 } + } + ] ), + + vertexShader: ShaderChunk.meshphong_vert, + fragmentShader: ShaderChunk.meshphong_frag + + }, + + standard: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.envmap, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.emissivemap, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.roughnessmap, + UniformsLib.metalnessmap, + UniformsLib.fog, + UniformsLib.lights, + { + emissive: { value: /*@__PURE__*/ new Color( 0x000000 ) }, + roughness: { value: 1.0 }, + metalness: { value: 0.0 }, + envMapIntensity: { value: 1 } + } + ] ), + + vertexShader: ShaderChunk.meshphysical_vert, + fragmentShader: ShaderChunk.meshphysical_frag + + }, + + toon: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.emissivemap, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.gradientmap, + UniformsLib.fog, + UniformsLib.lights, + { + emissive: { value: /*@__PURE__*/ new Color( 0x000000 ) } + } + ] ), + + vertexShader: ShaderChunk.meshtoon_vert, + fragmentShader: ShaderChunk.meshtoon_frag + + }, + + matcap: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.fog, + { + matcap: { value: null } + } + ] ), + + vertexShader: ShaderChunk.meshmatcap_vert, + fragmentShader: ShaderChunk.meshmatcap_frag + + }, + + points: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.points, + UniformsLib.fog + ] ), + + vertexShader: ShaderChunk.points_vert, + fragmentShader: ShaderChunk.points_frag + + }, + + dashed: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.fog, + { + scale: { value: 1 }, + dashSize: { value: 1 }, + totalSize: { value: 2 } + } + ] ), + + vertexShader: ShaderChunk.linedashed_vert, + fragmentShader: ShaderChunk.linedashed_frag + + }, + + depth: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.displacementmap + ] ), + + vertexShader: ShaderChunk.depth_vert, + fragmentShader: ShaderChunk.depth_frag + + }, + + normal: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + { + opacity: { value: 1.0 } + } + ] ), + + vertexShader: ShaderChunk.meshnormal_vert, + fragmentShader: ShaderChunk.meshnormal_frag + + }, + + sprite: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.sprite, + UniformsLib.fog + ] ), + + vertexShader: ShaderChunk.sprite_vert, + fragmentShader: ShaderChunk.sprite_frag + + }, + + background: { + + uniforms: { + uvTransform: { value: /*@__PURE__*/ new Matrix3() }, + t2D: { value: null }, + backgroundIntensity: { value: 1 } + }, + + vertexShader: ShaderChunk.background_vert, + fragmentShader: ShaderChunk.background_frag + + }, + + backgroundCube: { + + uniforms: { + envMap: { value: null }, + flipEnvMap: { value: - 1 }, + backgroundBlurriness: { value: 0 }, + backgroundIntensity: { value: 1 }, + backgroundRotation: { value: /*@__PURE__*/ new Matrix3() } + }, + + vertexShader: ShaderChunk.backgroundCube_vert, + fragmentShader: ShaderChunk.backgroundCube_frag + + }, + + cube: { + + uniforms: { + tCube: { value: null }, + tFlip: { value: - 1 }, + opacity: { value: 1.0 } + }, + + vertexShader: ShaderChunk.cube_vert, + fragmentShader: ShaderChunk.cube_frag + + }, + + equirect: { + + uniforms: { + tEquirect: { value: null }, + }, + + vertexShader: ShaderChunk.equirect_vert, + fragmentShader: ShaderChunk.equirect_frag + + }, + + distanceRGBA: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.displacementmap, + { + referencePosition: { value: /*@__PURE__*/ new Vector3() }, + nearDistance: { value: 1 }, + farDistance: { value: 1000 } + } + ] ), + + vertexShader: ShaderChunk.distanceRGBA_vert, + fragmentShader: ShaderChunk.distanceRGBA_frag + + }, + + shadow: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.lights, + UniformsLib.fog, + { + color: { value: /*@__PURE__*/ new Color( 0x00000 ) }, + opacity: { value: 1.0 } + }, + ] ), + + vertexShader: ShaderChunk.shadow_vert, + fragmentShader: ShaderChunk.shadow_frag + + } + +}; + +ShaderLib.physical = { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + ShaderLib.standard.uniforms, + { + clearcoat: { value: 0 }, + clearcoatMap: { value: null }, + clearcoatMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + clearcoatNormalMap: { value: null }, + clearcoatNormalMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + clearcoatNormalScale: { value: /*@__PURE__*/ new Vector2( 1, 1 ) }, + clearcoatRoughness: { value: 0 }, + clearcoatRoughnessMap: { value: null }, + clearcoatRoughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + dispersion: { value: 0 }, + iridescence: { value: 0 }, + iridescenceMap: { value: null }, + iridescenceMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + iridescenceIOR: { value: 1.3 }, + iridescenceThicknessMinimum: { value: 100 }, + iridescenceThicknessMaximum: { value: 400 }, + iridescenceThicknessMap: { value: null }, + iridescenceThicknessMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + sheen: { value: 0 }, + sheenColor: { value: /*@__PURE__*/ new Color( 0x000000 ) }, + sheenColorMap: { value: null }, + sheenColorMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + sheenRoughness: { value: 1 }, + sheenRoughnessMap: { value: null }, + sheenRoughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + transmission: { value: 0 }, + transmissionMap: { value: null }, + transmissionMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + transmissionSamplerSize: { value: /*@__PURE__*/ new Vector2() }, + transmissionSamplerMap: { value: null }, + thickness: { value: 0 }, + thicknessMap: { value: null }, + thicknessMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + attenuationDistance: { value: 0 }, + attenuationColor: { value: /*@__PURE__*/ new Color( 0x000000 ) }, + specularColor: { value: /*@__PURE__*/ new Color( 1, 1, 1 ) }, + specularColorMap: { value: null }, + specularColorMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + specularIntensity: { value: 1 }, + specularIntensityMap: { value: null }, + specularIntensityMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + anisotropyVector: { value: /*@__PURE__*/ new Vector2() }, + anisotropyMap: { value: null }, + anisotropyMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + } + ] ), + + vertexShader: ShaderChunk.meshphysical_vert, + fragmentShader: ShaderChunk.meshphysical_frag + +}; + +const _rgb = { r: 0, b: 0, g: 0 }; +const _e1$1 = /*@__PURE__*/ new Euler(); +const _m1$1 = /*@__PURE__*/ new Matrix4(); + +function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha, premultipliedAlpha ) { + + const clearColor = new Color( 0x000000 ); + let clearAlpha = alpha === true ? 0 : 1; + + let planeMesh; + let boxMesh; + + let currentBackground = null; + let currentBackgroundVersion = 0; + let currentTonemapping = null; + + function getBackground( scene ) { + + let background = scene.isScene === true ? scene.background : null; + + if ( background && background.isTexture ) { + + const usePMREM = scene.backgroundBlurriness > 0; // use PMREM if the user wants to blur the background + background = ( usePMREM ? cubeuvmaps : cubemaps ).get( background ); + + } + + return background; + + } + + function render( scene ) { + + let forceClear = false; + const background = getBackground( scene ); + + if ( background === null ) { + + setClear( clearColor, clearAlpha ); + + } else if ( background && background.isColor ) { + + setClear( background, 1 ); + forceClear = true; + + } + + const environmentBlendMode = renderer.xr.getEnvironmentBlendMode(); + + if ( environmentBlendMode === 'additive' ) { + + state.buffers.color.setClear( 0, 0, 0, 1, premultipliedAlpha ); + + } else if ( environmentBlendMode === 'alpha-blend' ) { + + state.buffers.color.setClear( 0, 0, 0, 0, premultipliedAlpha ); + + } + + if ( renderer.autoClear || forceClear ) { + + renderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil ); + + } + + } + + function addToRenderList( renderList, scene ) { + + const background = getBackground( scene ); + + if ( background && ( background.isCubeTexture || background.mapping === CubeUVReflectionMapping ) ) { + + if ( boxMesh === undefined ) { + + boxMesh = new Mesh( + new BoxGeometry( 1, 1, 1 ), + new ShaderMaterial( { + name: 'BackgroundCubeMaterial', + uniforms: cloneUniforms( ShaderLib.backgroundCube.uniforms ), + vertexShader: ShaderLib.backgroundCube.vertexShader, + fragmentShader: ShaderLib.backgroundCube.fragmentShader, + side: BackSide, + depthTest: false, + depthWrite: false, + fog: false + } ) + ); + + boxMesh.geometry.deleteAttribute( 'normal' ); + boxMesh.geometry.deleteAttribute( 'uv' ); + + boxMesh.onBeforeRender = function ( renderer, scene, camera ) { + + this.matrixWorld.copyPosition( camera.matrixWorld ); + + }; + + // add "envMap" material property so the renderer can evaluate it like for built-in materials + Object.defineProperty( boxMesh.material, 'envMap', { + + get: function () { + + return this.uniforms.envMap.value; + + } + + } ); + + objects.update( boxMesh ); + + } + + _e1$1.copy( scene.backgroundRotation ); + + // accommodate left-handed frame + _e1$1.x *= - 1; _e1$1.y *= - 1; _e1$1.z *= - 1; + + if ( background.isCubeTexture && background.isRenderTargetTexture === false ) { + + // environment maps which are not cube render targets or PMREMs follow a different convention + _e1$1.y *= - 1; + _e1$1.z *= - 1; + + } + + boxMesh.material.uniforms.envMap.value = background; + boxMesh.material.uniforms.flipEnvMap.value = ( background.isCubeTexture && background.isRenderTargetTexture === false ) ? - 1 : 1; + boxMesh.material.uniforms.backgroundBlurriness.value = scene.backgroundBlurriness; + boxMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity; + boxMesh.material.uniforms.backgroundRotation.value.setFromMatrix4( _m1$1.makeRotationFromEuler( _e1$1 ) ); + boxMesh.material.toneMapped = ColorManagement.getTransfer( background.colorSpace ) !== SRGBTransfer; + + if ( currentBackground !== background || + currentBackgroundVersion !== background.version || + currentTonemapping !== renderer.toneMapping ) { + + boxMesh.material.needsUpdate = true; + + currentBackground = background; + currentBackgroundVersion = background.version; + currentTonemapping = renderer.toneMapping; + + } + + boxMesh.layers.enableAll(); + + // push to the pre-sorted opaque render list + renderList.unshift( boxMesh, boxMesh.geometry, boxMesh.material, 0, 0, null ); + + } else if ( background && background.isTexture ) { + + if ( planeMesh === undefined ) { + + planeMesh = new Mesh( + new PlaneGeometry( 2, 2 ), + new ShaderMaterial( { + name: 'BackgroundMaterial', + uniforms: cloneUniforms( ShaderLib.background.uniforms ), + vertexShader: ShaderLib.background.vertexShader, + fragmentShader: ShaderLib.background.fragmentShader, + side: FrontSide, + depthTest: false, + depthWrite: false, + fog: false + } ) + ); + + planeMesh.geometry.deleteAttribute( 'normal' ); + + // add "map" material property so the renderer can evaluate it like for built-in materials + Object.defineProperty( planeMesh.material, 'map', { + + get: function () { + + return this.uniforms.t2D.value; + + } + + } ); + + objects.update( planeMesh ); + + } + + planeMesh.material.uniforms.t2D.value = background; + planeMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity; + planeMesh.material.toneMapped = ColorManagement.getTransfer( background.colorSpace ) !== SRGBTransfer; + + if ( background.matrixAutoUpdate === true ) { + + background.updateMatrix(); + + } + + planeMesh.material.uniforms.uvTransform.value.copy( background.matrix ); + + if ( currentBackground !== background || + currentBackgroundVersion !== background.version || + currentTonemapping !== renderer.toneMapping ) { + + planeMesh.material.needsUpdate = true; + + currentBackground = background; + currentBackgroundVersion = background.version; + currentTonemapping = renderer.toneMapping; + + } + + planeMesh.layers.enableAll(); + + // push to the pre-sorted opaque render list + renderList.unshift( planeMesh, planeMesh.geometry, planeMesh.material, 0, 0, null ); + + } + + } + + function setClear( color, alpha ) { + + color.getRGB( _rgb, getUnlitUniformColorSpace( renderer ) ); + + state.buffers.color.setClear( _rgb.r, _rgb.g, _rgb.b, alpha, premultipliedAlpha ); + + } + + return { + + getClearColor: function () { + + return clearColor; + + }, + setClearColor: function ( color, alpha = 1 ) { + + clearColor.set( color ); + clearAlpha = alpha; + setClear( clearColor, clearAlpha ); + + }, + getClearAlpha: function () { + + return clearAlpha; + + }, + setClearAlpha: function ( alpha ) { + + clearAlpha = alpha; + setClear( clearColor, clearAlpha ); + + }, + render: render, + addToRenderList: addToRenderList + + }; + +} + +function WebGLBindingStates( gl, attributes ) { + + const maxVertexAttributes = gl.getParameter( gl.MAX_VERTEX_ATTRIBS ); + + const bindingStates = {}; + + const defaultState = createBindingState( null ); + let currentState = defaultState; + let forceUpdate = false; + + function setup( object, material, program, geometry, index ) { + + let updateBuffers = false; + + const state = getBindingState( geometry, program, material ); + + if ( currentState !== state ) { + + currentState = state; + bindVertexArrayObject( currentState.object ); + + } + + updateBuffers = needsUpdate( object, geometry, program, index ); + + if ( updateBuffers ) saveCache( object, geometry, program, index ); + + if ( index !== null ) { + + attributes.update( index, gl.ELEMENT_ARRAY_BUFFER ); + + } + + if ( updateBuffers || forceUpdate ) { + + forceUpdate = false; + + setupVertexAttributes( object, material, program, geometry ); + + if ( index !== null ) { + + gl.bindBuffer( gl.ELEMENT_ARRAY_BUFFER, attributes.get( index ).buffer ); + + } + + } + + } + + function createVertexArrayObject() { + + return gl.createVertexArray(); + + } + + function bindVertexArrayObject( vao ) { + + return gl.bindVertexArray( vao ); + + } + + function deleteVertexArrayObject( vao ) { + + return gl.deleteVertexArray( vao ); + + } + + function getBindingState( geometry, program, material ) { + + const wireframe = ( material.wireframe === true ); + + let programMap = bindingStates[ geometry.id ]; + + if ( programMap === undefined ) { + + programMap = {}; + bindingStates[ geometry.id ] = programMap; + + } + + let stateMap = programMap[ program.id ]; + + if ( stateMap === undefined ) { + + stateMap = {}; + programMap[ program.id ] = stateMap; + + } + + let state = stateMap[ wireframe ]; + + if ( state === undefined ) { + + state = createBindingState( createVertexArrayObject() ); + stateMap[ wireframe ] = state; + + } + + return state; + + } + + function createBindingState( vao ) { + + const newAttributes = []; + const enabledAttributes = []; + const attributeDivisors = []; + + for ( let i = 0; i < maxVertexAttributes; i ++ ) { + + newAttributes[ i ] = 0; + enabledAttributes[ i ] = 0; + attributeDivisors[ i ] = 0; + + } + + return { + + // for backward compatibility on non-VAO support browser + geometry: null, + program: null, + wireframe: false, + + newAttributes: newAttributes, + enabledAttributes: enabledAttributes, + attributeDivisors: attributeDivisors, + object: vao, + attributes: {}, + index: null + + }; + + } + + function needsUpdate( object, geometry, program, index ) { + + const cachedAttributes = currentState.attributes; + const geometryAttributes = geometry.attributes; + + let attributesNum = 0; + + const programAttributes = program.getAttributes(); + + for ( const name in programAttributes ) { + + const programAttribute = programAttributes[ name ]; + + if ( programAttribute.location >= 0 ) { + + const cachedAttribute = cachedAttributes[ name ]; + let geometryAttribute = geometryAttributes[ name ]; + + if ( geometryAttribute === undefined ) { + + if ( name === 'instanceMatrix' && object.instanceMatrix ) geometryAttribute = object.instanceMatrix; + if ( name === 'instanceColor' && object.instanceColor ) geometryAttribute = object.instanceColor; + + } + + if ( cachedAttribute === undefined ) return true; + + if ( cachedAttribute.attribute !== geometryAttribute ) return true; + + if ( geometryAttribute && cachedAttribute.data !== geometryAttribute.data ) return true; + + attributesNum ++; + + } + + } + + if ( currentState.attributesNum !== attributesNum ) return true; + + if ( currentState.index !== index ) return true; + + return false; + + } + + function saveCache( object, geometry, program, index ) { + + const cache = {}; + const attributes = geometry.attributes; + let attributesNum = 0; + + const programAttributes = program.getAttributes(); + + for ( const name in programAttributes ) { + + const programAttribute = programAttributes[ name ]; + + if ( programAttribute.location >= 0 ) { + + let attribute = attributes[ name ]; + + if ( attribute === undefined ) { + + if ( name === 'instanceMatrix' && object.instanceMatrix ) attribute = object.instanceMatrix; + if ( name === 'instanceColor' && object.instanceColor ) attribute = object.instanceColor; + + } + + const data = {}; + data.attribute = attribute; + + if ( attribute && attribute.data ) { + + data.data = attribute.data; + + } + + cache[ name ] = data; + + attributesNum ++; + + } + + } + + currentState.attributes = cache; + currentState.attributesNum = attributesNum; + + currentState.index = index; + + } + + function initAttributes() { + + const newAttributes = currentState.newAttributes; + + for ( let i = 0, il = newAttributes.length; i < il; i ++ ) { + + newAttributes[ i ] = 0; + + } + + } + + function enableAttribute( attribute ) { + + enableAttributeAndDivisor( attribute, 0 ); + + } + + function enableAttributeAndDivisor( attribute, meshPerAttribute ) { + + const newAttributes = currentState.newAttributes; + const enabledAttributes = currentState.enabledAttributes; + const attributeDivisors = currentState.attributeDivisors; + + newAttributes[ attribute ] = 1; + + if ( enabledAttributes[ attribute ] === 0 ) { + + gl.enableVertexAttribArray( attribute ); + enabledAttributes[ attribute ] = 1; + + } + + if ( attributeDivisors[ attribute ] !== meshPerAttribute ) { + + gl.vertexAttribDivisor( attribute, meshPerAttribute ); + attributeDivisors[ attribute ] = meshPerAttribute; + + } + + } + + function disableUnusedAttributes() { + + const newAttributes = currentState.newAttributes; + const enabledAttributes = currentState.enabledAttributes; + + for ( let i = 0, il = enabledAttributes.length; i < il; i ++ ) { + + if ( enabledAttributes[ i ] !== newAttributes[ i ] ) { + + gl.disableVertexAttribArray( i ); + enabledAttributes[ i ] = 0; + + } + + } + + } + + function vertexAttribPointer( index, size, type, normalized, stride, offset, integer ) { + + if ( integer === true ) { + + gl.vertexAttribIPointer( index, size, type, stride, offset ); + + } else { + + gl.vertexAttribPointer( index, size, type, normalized, stride, offset ); + + } + + } + + function setupVertexAttributes( object, material, program, geometry ) { + + initAttributes(); + + const geometryAttributes = geometry.attributes; + + const programAttributes = program.getAttributes(); + + const materialDefaultAttributeValues = material.defaultAttributeValues; + + for ( const name in programAttributes ) { + + const programAttribute = programAttributes[ name ]; + + if ( programAttribute.location >= 0 ) { + + let geometryAttribute = geometryAttributes[ name ]; + + if ( geometryAttribute === undefined ) { + + if ( name === 'instanceMatrix' && object.instanceMatrix ) geometryAttribute = object.instanceMatrix; + if ( name === 'instanceColor' && object.instanceColor ) geometryAttribute = object.instanceColor; + + } + + if ( geometryAttribute !== undefined ) { + + const normalized = geometryAttribute.normalized; + const size = geometryAttribute.itemSize; + + const attribute = attributes.get( geometryAttribute ); + + // TODO Attribute may not be available on context restore + + if ( attribute === undefined ) continue; + + const buffer = attribute.buffer; + const type = attribute.type; + const bytesPerElement = attribute.bytesPerElement; + + // check for integer attributes + + const integer = ( type === gl.INT || type === gl.UNSIGNED_INT || geometryAttribute.gpuType === IntType ); + + if ( geometryAttribute.isInterleavedBufferAttribute ) { + + const data = geometryAttribute.data; + const stride = data.stride; + const offset = geometryAttribute.offset; + + if ( data.isInstancedInterleavedBuffer ) { + + for ( let i = 0; i < programAttribute.locationSize; i ++ ) { + + enableAttributeAndDivisor( programAttribute.location + i, data.meshPerAttribute ); + + } + + if ( object.isInstancedMesh !== true && geometry._maxInstanceCount === undefined ) { + + geometry._maxInstanceCount = data.meshPerAttribute * data.count; + + } + + } else { + + for ( let i = 0; i < programAttribute.locationSize; i ++ ) { + + enableAttribute( programAttribute.location + i ); + + } + + } + + gl.bindBuffer( gl.ARRAY_BUFFER, buffer ); + + for ( let i = 0; i < programAttribute.locationSize; i ++ ) { + + vertexAttribPointer( + programAttribute.location + i, + size / programAttribute.locationSize, + type, + normalized, + stride * bytesPerElement, + ( offset + ( size / programAttribute.locationSize ) * i ) * bytesPerElement, + integer + ); + + } + + } else { + + if ( geometryAttribute.isInstancedBufferAttribute ) { + + for ( let i = 0; i < programAttribute.locationSize; i ++ ) { + + enableAttributeAndDivisor( programAttribute.location + i, geometryAttribute.meshPerAttribute ); + + } + + if ( object.isInstancedMesh !== true && geometry._maxInstanceCount === undefined ) { + + geometry._maxInstanceCount = geometryAttribute.meshPerAttribute * geometryAttribute.count; + + } + + } else { + + for ( let i = 0; i < programAttribute.locationSize; i ++ ) { + + enableAttribute( programAttribute.location + i ); + + } + + } + + gl.bindBuffer( gl.ARRAY_BUFFER, buffer ); + + for ( let i = 0; i < programAttribute.locationSize; i ++ ) { + + vertexAttribPointer( + programAttribute.location + i, + size / programAttribute.locationSize, + type, + normalized, + size * bytesPerElement, + ( size / programAttribute.locationSize ) * i * bytesPerElement, + integer + ); + + } + + } + + } else if ( materialDefaultAttributeValues !== undefined ) { + + const value = materialDefaultAttributeValues[ name ]; + + if ( value !== undefined ) { + + switch ( value.length ) { + + case 2: + gl.vertexAttrib2fv( programAttribute.location, value ); + break; + + case 3: + gl.vertexAttrib3fv( programAttribute.location, value ); + break; + + case 4: + gl.vertexAttrib4fv( programAttribute.location, value ); + break; + + default: + gl.vertexAttrib1fv( programAttribute.location, value ); + + } + + } + + } + + } + + } + + disableUnusedAttributes(); + + } + + function dispose() { + + reset(); + + for ( const geometryId in bindingStates ) { + + const programMap = bindingStates[ geometryId ]; + + for ( const programId in programMap ) { + + const stateMap = programMap[ programId ]; + + for ( const wireframe in stateMap ) { + + deleteVertexArrayObject( stateMap[ wireframe ].object ); + + delete stateMap[ wireframe ]; + + } + + delete programMap[ programId ]; + + } + + delete bindingStates[ geometryId ]; + + } + + } + + function releaseStatesOfGeometry( geometry ) { + + if ( bindingStates[ geometry.id ] === undefined ) return; + + const programMap = bindingStates[ geometry.id ]; + + for ( const programId in programMap ) { + + const stateMap = programMap[ programId ]; + + for ( const wireframe in stateMap ) { + + deleteVertexArrayObject( stateMap[ wireframe ].object ); + + delete stateMap[ wireframe ]; + + } + + delete programMap[ programId ]; + + } + + delete bindingStates[ geometry.id ]; + + } + + function releaseStatesOfProgram( program ) { + + for ( const geometryId in bindingStates ) { + + const programMap = bindingStates[ geometryId ]; + + if ( programMap[ program.id ] === undefined ) continue; + + const stateMap = programMap[ program.id ]; + + for ( const wireframe in stateMap ) { + + deleteVertexArrayObject( stateMap[ wireframe ].object ); + + delete stateMap[ wireframe ]; + + } + + delete programMap[ program.id ]; + + } + + } + + function reset() { + + resetDefaultState(); + forceUpdate = true; + + if ( currentState === defaultState ) return; + + currentState = defaultState; + bindVertexArrayObject( currentState.object ); + + } + + // for backward-compatibility + + function resetDefaultState() { + + defaultState.geometry = null; + defaultState.program = null; + defaultState.wireframe = false; + + } + + return { + + setup: setup, + reset: reset, + resetDefaultState: resetDefaultState, + dispose: dispose, + releaseStatesOfGeometry: releaseStatesOfGeometry, + releaseStatesOfProgram: releaseStatesOfProgram, + + initAttributes: initAttributes, + enableAttribute: enableAttribute, + disableUnusedAttributes: disableUnusedAttributes + + }; + +} + +function WebGLBufferRenderer( gl, extensions, info ) { + + let mode; + + function setMode( value ) { + + mode = value; + + } + + function render( start, count ) { + + gl.drawArrays( mode, start, count ); + + info.update( count, mode, 1 ); + + } + + function renderInstances( start, count, primcount ) { + + if ( primcount === 0 ) return; + + gl.drawArraysInstanced( mode, start, count, primcount ); + + info.update( count, mode, primcount ); + + } + + function renderMultiDraw( starts, counts, drawCount ) { + + if ( drawCount === 0 ) return; + + const extension = extensions.get( 'WEBGL_multi_draw' ); + + if ( extension === null ) { + + for ( let i = 0; i < drawCount; i ++ ) { + + this.render( starts[ i ], counts[ i ] ); + + } + + } else { + + extension.multiDrawArraysWEBGL( mode, starts, 0, counts, 0, drawCount ); + + let elementCount = 0; + for ( let i = 0; i < drawCount; i ++ ) { + + elementCount += counts[ i ]; + + } + + info.update( elementCount, mode, 1 ); + + } + + } + + function renderMultiDrawInstances( starts, counts, drawCount, primcount ) { + + if ( drawCount === 0 ) return; + + const extension = extensions.get( 'WEBGL_multi_draw' ); + + if ( extension === null ) { + + for ( let i = 0; i < starts.length; i ++ ) { + + renderInstances( starts[ i ], counts[ i ], primcount[ i ] ); + + } + + } else { + + extension.multiDrawArraysInstancedWEBGL( mode, starts, 0, counts, 0, primcount, 0, drawCount ); + + let elementCount = 0; + for ( let i = 0; i < drawCount; i ++ ) { + + elementCount += counts[ i ]; + + } + + for ( let i = 0; i < primcount.length; i ++ ) { + + info.update( elementCount, mode, primcount[ i ] ); + + } + + } + + } + + // + + this.setMode = setMode; + this.render = render; + this.renderInstances = renderInstances; + this.renderMultiDraw = renderMultiDraw; + this.renderMultiDrawInstances = renderMultiDrawInstances; + +} + +function WebGLCapabilities( gl, extensions, parameters, utils ) { + + let maxAnisotropy; + + function getMaxAnisotropy() { + + if ( maxAnisotropy !== undefined ) return maxAnisotropy; + + if ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) { + + const extension = extensions.get( 'EXT_texture_filter_anisotropic' ); + + maxAnisotropy = gl.getParameter( extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT ); + + } else { + + maxAnisotropy = 0; + + } + + return maxAnisotropy; + + } + + function textureFormatReadable( textureFormat ) { + + if ( textureFormat !== RGBAFormat && utils.convert( textureFormat ) !== gl.getParameter( gl.IMPLEMENTATION_COLOR_READ_FORMAT ) ) { + + return false; + + } + + return true; + + } + + function textureTypeReadable( textureType ) { + + const halfFloatSupportedByExt = ( textureType === HalfFloatType ) && ( extensions.has( 'EXT_color_buffer_half_float' ) || extensions.has( 'EXT_color_buffer_float' ) ); + + if ( textureType !== UnsignedByteType && utils.convert( textureType ) !== gl.getParameter( gl.IMPLEMENTATION_COLOR_READ_TYPE ) && // Edge and Chrome Mac < 52 (#9513) + textureType !== FloatType && ! halfFloatSupportedByExt ) { + + return false; + + } + + return true; + + } + + function getMaxPrecision( precision ) { + + if ( precision === 'highp' ) { + + if ( gl.getShaderPrecisionFormat( gl.VERTEX_SHADER, gl.HIGH_FLOAT ).precision > 0 && + gl.getShaderPrecisionFormat( gl.FRAGMENT_SHADER, gl.HIGH_FLOAT ).precision > 0 ) { + + return 'highp'; + + } + + precision = 'mediump'; + + } + + if ( precision === 'mediump' ) { + + if ( gl.getShaderPrecisionFormat( gl.VERTEX_SHADER, gl.MEDIUM_FLOAT ).precision > 0 && + gl.getShaderPrecisionFormat( gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT ).precision > 0 ) { + + return 'mediump'; + + } + + } + + return 'lowp'; + + } + + let precision = parameters.precision !== undefined ? parameters.precision : 'highp'; + const maxPrecision = getMaxPrecision( precision ); + + if ( maxPrecision !== precision ) { + + console.warn( 'THREE.WebGLRenderer:', precision, 'not supported, using', maxPrecision, 'instead.' ); + precision = maxPrecision; + + } + + const logarithmicDepthBuffer = parameters.logarithmicDepthBuffer === true; + + const maxTextures = gl.getParameter( gl.MAX_TEXTURE_IMAGE_UNITS ); + const maxVertexTextures = gl.getParameter( gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS ); + const maxTextureSize = gl.getParameter( gl.MAX_TEXTURE_SIZE ); + const maxCubemapSize = gl.getParameter( gl.MAX_CUBE_MAP_TEXTURE_SIZE ); + + const maxAttributes = gl.getParameter( gl.MAX_VERTEX_ATTRIBS ); + const maxVertexUniforms = gl.getParameter( gl.MAX_VERTEX_UNIFORM_VECTORS ); + const maxVaryings = gl.getParameter( gl.MAX_VARYING_VECTORS ); + const maxFragmentUniforms = gl.getParameter( gl.MAX_FRAGMENT_UNIFORM_VECTORS ); + + const vertexTextures = maxVertexTextures > 0; + + const maxSamples = gl.getParameter( gl.MAX_SAMPLES ); + + return { + + isWebGL2: true, // keeping this for backwards compatibility + + getMaxAnisotropy: getMaxAnisotropy, + getMaxPrecision: getMaxPrecision, + + textureFormatReadable: textureFormatReadable, + textureTypeReadable: textureTypeReadable, + + precision: precision, + logarithmicDepthBuffer: logarithmicDepthBuffer, + + maxTextures: maxTextures, + maxVertexTextures: maxVertexTextures, + maxTextureSize: maxTextureSize, + maxCubemapSize: maxCubemapSize, + + maxAttributes: maxAttributes, + maxVertexUniforms: maxVertexUniforms, + maxVaryings: maxVaryings, + maxFragmentUniforms: maxFragmentUniforms, + + vertexTextures: vertexTextures, + + maxSamples: maxSamples + + }; + +} + +function WebGLClipping( properties ) { + + const scope = this; + + let globalState = null, + numGlobalPlanes = 0, + localClippingEnabled = false, + renderingShadows = false; + + const plane = new Plane(), + viewNormalMatrix = new Matrix3(), + + uniform = { value: null, needsUpdate: false }; + + this.uniform = uniform; + this.numPlanes = 0; + this.numIntersection = 0; + + this.init = function ( planes, enableLocalClipping ) { + + const enabled = + planes.length !== 0 || + enableLocalClipping || + // enable state of previous frame - the clipping code has to + // run another frame in order to reset the state: + numGlobalPlanes !== 0 || + localClippingEnabled; + + localClippingEnabled = enableLocalClipping; + + numGlobalPlanes = planes.length; + + return enabled; + + }; + + this.beginShadows = function () { + + renderingShadows = true; + projectPlanes( null ); + + }; + + this.endShadows = function () { + + renderingShadows = false; + + }; + + this.setGlobalState = function ( planes, camera ) { + + globalState = projectPlanes( planes, camera, 0 ); + + }; + + this.setState = function ( material, camera, useCache ) { + + const planes = material.clippingPlanes, + clipIntersection = material.clipIntersection, + clipShadows = material.clipShadows; + + const materialProperties = properties.get( material ); + + if ( ! localClippingEnabled || planes === null || planes.length === 0 || renderingShadows && ! clipShadows ) { + + // there's no local clipping + + if ( renderingShadows ) { + + // there's no global clipping + + projectPlanes( null ); + + } else { + + resetGlobalState(); + + } + + } else { + + const nGlobal = renderingShadows ? 0 : numGlobalPlanes, + lGlobal = nGlobal * 4; + + let dstArray = materialProperties.clippingState || null; + + uniform.value = dstArray; // ensure unique state + + dstArray = projectPlanes( planes, camera, lGlobal, useCache ); + + for ( let i = 0; i !== lGlobal; ++ i ) { + + dstArray[ i ] = globalState[ i ]; + + } + + materialProperties.clippingState = dstArray; + this.numIntersection = clipIntersection ? this.numPlanes : 0; + this.numPlanes += nGlobal; + + } + + + }; + + function resetGlobalState() { + + if ( uniform.value !== globalState ) { + + uniform.value = globalState; + uniform.needsUpdate = numGlobalPlanes > 0; + + } + + scope.numPlanes = numGlobalPlanes; + scope.numIntersection = 0; + + } + + function projectPlanes( planes, camera, dstOffset, skipTransform ) { + + const nPlanes = planes !== null ? planes.length : 0; + let dstArray = null; + + if ( nPlanes !== 0 ) { + + dstArray = uniform.value; + + if ( skipTransform !== true || dstArray === null ) { + + const flatSize = dstOffset + nPlanes * 4, + viewMatrix = camera.matrixWorldInverse; + + viewNormalMatrix.getNormalMatrix( viewMatrix ); + + if ( dstArray === null || dstArray.length < flatSize ) { + + dstArray = new Float32Array( flatSize ); + + } + + for ( let i = 0, i4 = dstOffset; i !== nPlanes; ++ i, i4 += 4 ) { + + plane.copy( planes[ i ] ).applyMatrix4( viewMatrix, viewNormalMatrix ); + + plane.normal.toArray( dstArray, i4 ); + dstArray[ i4 + 3 ] = plane.constant; + + } + + } + + uniform.value = dstArray; + uniform.needsUpdate = true; + + } + + scope.numPlanes = nPlanes; + scope.numIntersection = 0; + + return dstArray; + + } + +} + +function WebGLCubeMaps( renderer ) { + + let cubemaps = new WeakMap(); + + function mapTextureMapping( texture, mapping ) { + + if ( mapping === EquirectangularReflectionMapping ) { + + texture.mapping = CubeReflectionMapping; + + } else if ( mapping === EquirectangularRefractionMapping ) { + + texture.mapping = CubeRefractionMapping; + + } + + return texture; + + } + + function get( texture ) { + + if ( texture && texture.isTexture ) { + + const mapping = texture.mapping; + + if ( mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping ) { + + if ( cubemaps.has( texture ) ) { + + const cubemap = cubemaps.get( texture ).texture; + return mapTextureMapping( cubemap, texture.mapping ); + + } else { + + const image = texture.image; + + if ( image && image.height > 0 ) { + + const renderTarget = new WebGLCubeRenderTarget( image.height ); + renderTarget.fromEquirectangularTexture( renderer, texture ); + cubemaps.set( texture, renderTarget ); + + texture.addEventListener( 'dispose', onTextureDispose ); + + return mapTextureMapping( renderTarget.texture, texture.mapping ); + + } else { + + // image not yet ready. try the conversion next frame + + return null; + + } + + } + + } + + } + + return texture; + + } + + function onTextureDispose( event ) { + + const texture = event.target; + + texture.removeEventListener( 'dispose', onTextureDispose ); + + const cubemap = cubemaps.get( texture ); + + if ( cubemap !== undefined ) { + + cubemaps.delete( texture ); + cubemap.dispose(); + + } + + } + + function dispose() { + + cubemaps = new WeakMap(); + + } + + return { + get: get, + dispose: dispose + }; + +} + +class OrthographicCamera extends Camera { + + constructor( left = - 1, right = 1, top = 1, bottom = - 1, near = 0.1, far = 2000 ) { + + super(); + + this.isOrthographicCamera = true; + + this.type = 'OrthographicCamera'; + + this.zoom = 1; + this.view = null; + + this.left = left; + this.right = right; + this.top = top; + this.bottom = bottom; + + this.near = near; + this.far = far; + + this.updateProjectionMatrix(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.left = source.left; + this.right = source.right; + this.top = source.top; + this.bottom = source.bottom; + this.near = source.near; + this.far = source.far; + + this.zoom = source.zoom; + this.view = source.view === null ? null : Object.assign( {}, source.view ); + + return this; + + } + + setViewOffset( fullWidth, fullHeight, x, y, width, height ) { + + if ( this.view === null ) { + + this.view = { + enabled: true, + fullWidth: 1, + fullHeight: 1, + offsetX: 0, + offsetY: 0, + width: 1, + height: 1 + }; + + } + + this.view.enabled = true; + this.view.fullWidth = fullWidth; + this.view.fullHeight = fullHeight; + this.view.offsetX = x; + this.view.offsetY = y; + this.view.width = width; + this.view.height = height; + + this.updateProjectionMatrix(); + + } + + clearViewOffset() { + + if ( this.view !== null ) { + + this.view.enabled = false; + + } + + this.updateProjectionMatrix(); + + } + + updateProjectionMatrix() { + + const dx = ( this.right - this.left ) / ( 2 * this.zoom ); + const dy = ( this.top - this.bottom ) / ( 2 * this.zoom ); + const cx = ( this.right + this.left ) / 2; + const cy = ( this.top + this.bottom ) / 2; + + let left = cx - dx; + let right = cx + dx; + let top = cy + dy; + let bottom = cy - dy; + + if ( this.view !== null && this.view.enabled ) { + + const scaleW = ( this.right - this.left ) / this.view.fullWidth / this.zoom; + const scaleH = ( this.top - this.bottom ) / this.view.fullHeight / this.zoom; + + left += scaleW * this.view.offsetX; + right = left + scaleW * this.view.width; + top -= scaleH * this.view.offsetY; + bottom = top - scaleH * this.view.height; + + } + + this.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far, this.coordinateSystem ); + + this.projectionMatrixInverse.copy( this.projectionMatrix ).invert(); + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + data.object.zoom = this.zoom; + data.object.left = this.left; + data.object.right = this.right; + data.object.top = this.top; + data.object.bottom = this.bottom; + data.object.near = this.near; + data.object.far = this.far; + + if ( this.view !== null ) data.object.view = Object.assign( {}, this.view ); + + return data; + + } + +} + +const LOD_MIN = 4; + +// The standard deviations (radians) associated with the extra mips. These are +// chosen to approximate a Trowbridge-Reitz distribution function times the +// geometric shadowing function. These sigma values squared must match the +// variance #defines in cube_uv_reflection_fragment.glsl.js. +const EXTRA_LOD_SIGMA = [ 0.125, 0.215, 0.35, 0.446, 0.526, 0.582 ]; + +// The maximum length of the blur for loop. Smaller sigmas will use fewer +// samples and exit early, but not recompile the shader. +const MAX_SAMPLES = 20; + +const _flatCamera = /*@__PURE__*/ new OrthographicCamera(); +const _clearColor = /*@__PURE__*/ new Color(); +let _oldTarget = null; +let _oldActiveCubeFace = 0; +let _oldActiveMipmapLevel = 0; +let _oldXrEnabled = false; + +// Golden Ratio +const PHI = ( 1 + Math.sqrt( 5 ) ) / 2; +const INV_PHI = 1 / PHI; + +// Vertices of a dodecahedron (except the opposites, which represent the +// same axis), used as axis directions evenly spread on a sphere. +const _axisDirections = [ + /*@__PURE__*/ new Vector3( - PHI, INV_PHI, 0 ), + /*@__PURE__*/ new Vector3( PHI, INV_PHI, 0 ), + /*@__PURE__*/ new Vector3( - INV_PHI, 0, PHI ), + /*@__PURE__*/ new Vector3( INV_PHI, 0, PHI ), + /*@__PURE__*/ new Vector3( 0, PHI, - INV_PHI ), + /*@__PURE__*/ new Vector3( 0, PHI, INV_PHI ), + /*@__PURE__*/ new Vector3( - 1, 1, - 1 ), + /*@__PURE__*/ new Vector3( 1, 1, - 1 ), + /*@__PURE__*/ new Vector3( - 1, 1, 1 ), + /*@__PURE__*/ new Vector3( 1, 1, 1 ) ]; + +/** + * This class generates a Prefiltered, Mipmapped Radiance Environment Map + * (PMREM) from a cubeMap environment texture. This allows different levels of + * blur to be quickly accessed based on material roughness. It is packed into a + * special CubeUV format that allows us to perform custom interpolation so that + * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap + * chain, it only goes down to the LOD_MIN level (above), and then creates extra + * even more filtered 'mips' at the same LOD_MIN resolution, associated with + * higher roughness levels. In this way we maintain resolution to smoothly + * interpolate diffuse lighting while limiting sampling computation. + * + * Paper: Fast, Accurate Image-Based Lighting + * https://drive.google.com/file/d/15y8r_UpKlU9SvV4ILb0C3qCPecS8pvLz/view +*/ + +class PMREMGenerator { + + constructor( renderer ) { + + this._renderer = renderer; + this._pingPongRenderTarget = null; + + this._lodMax = 0; + this._cubeSize = 0; + this._lodPlanes = []; + this._sizeLods = []; + this._sigmas = []; + + this._blurMaterial = null; + this._cubemapMaterial = null; + this._equirectMaterial = null; + + this._compileMaterial( this._blurMaterial ); + + } + + /** + * Generates a PMREM from a supplied Scene, which can be faster than using an + * image if networking bandwidth is low. Optional sigma specifies a blur radius + * in radians to be applied to the scene before PMREM generation. Optional near + * and far planes ensure the scene is rendered in its entirety (the cubeCamera + * is placed at the origin). + */ + fromScene( scene, sigma = 0, near = 0.1, far = 100 ) { + + _oldTarget = this._renderer.getRenderTarget(); + _oldActiveCubeFace = this._renderer.getActiveCubeFace(); + _oldActiveMipmapLevel = this._renderer.getActiveMipmapLevel(); + _oldXrEnabled = this._renderer.xr.enabled; + + this._renderer.xr.enabled = false; + + this._setSize( 256 ); + + const cubeUVRenderTarget = this._allocateTargets(); + cubeUVRenderTarget.depthBuffer = true; + + this._sceneToCubeUV( scene, near, far, cubeUVRenderTarget ); + + if ( sigma > 0 ) { + + this._blur( cubeUVRenderTarget, 0, 0, sigma ); + + } + + this._applyPMREM( cubeUVRenderTarget ); + this._cleanup( cubeUVRenderTarget ); + + return cubeUVRenderTarget; + + } + + /** + * Generates a PMREM from an equirectangular texture, which can be either LDR + * or HDR. The ideal input image size is 1k (1024 x 512), + * as this matches best with the 256 x 256 cubemap output. + * The smallest supported equirectangular image size is 64 x 32. + */ + fromEquirectangular( equirectangular, renderTarget = null ) { + + return this._fromTexture( equirectangular, renderTarget ); + + } + + /** + * Generates a PMREM from an cubemap texture, which can be either LDR + * or HDR. The ideal input cube size is 256 x 256, + * as this matches best with the 256 x 256 cubemap output. + * The smallest supported cube size is 16 x 16. + */ + fromCubemap( cubemap, renderTarget = null ) { + + return this._fromTexture( cubemap, renderTarget ); + + } + + /** + * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + */ + compileCubemapShader() { + + if ( this._cubemapMaterial === null ) { + + this._cubemapMaterial = _getCubemapMaterial(); + this._compileMaterial( this._cubemapMaterial ); + + } + + } + + /** + * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + */ + compileEquirectangularShader() { + + if ( this._equirectMaterial === null ) { + + this._equirectMaterial = _getEquirectMaterial(); + this._compileMaterial( this._equirectMaterial ); + + } + + } + + /** + * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, + * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on + * one of them will cause any others to also become unusable. + */ + dispose() { + + this._dispose(); + + if ( this._cubemapMaterial !== null ) this._cubemapMaterial.dispose(); + if ( this._equirectMaterial !== null ) this._equirectMaterial.dispose(); + + } + + // private interface + + _setSize( cubeSize ) { + + this._lodMax = Math.floor( Math.log2( cubeSize ) ); + this._cubeSize = Math.pow( 2, this._lodMax ); + + } + + _dispose() { + + if ( this._blurMaterial !== null ) this._blurMaterial.dispose(); + + if ( this._pingPongRenderTarget !== null ) this._pingPongRenderTarget.dispose(); + + for ( let i = 0; i < this._lodPlanes.length; i ++ ) { + + this._lodPlanes[ i ].dispose(); + + } + + } + + _cleanup( outputTarget ) { + + this._renderer.setRenderTarget( _oldTarget, _oldActiveCubeFace, _oldActiveMipmapLevel ); + this._renderer.xr.enabled = _oldXrEnabled; + + outputTarget.scissorTest = false; + _setViewport( outputTarget, 0, 0, outputTarget.width, outputTarget.height ); + + } + + _fromTexture( texture, renderTarget ) { + + if ( texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping ) { + + this._setSize( texture.image.length === 0 ? 16 : ( texture.image[ 0 ].width || texture.image[ 0 ].image.width ) ); + + } else { // Equirectangular + + this._setSize( texture.image.width / 4 ); + + } + + _oldTarget = this._renderer.getRenderTarget(); + _oldActiveCubeFace = this._renderer.getActiveCubeFace(); + _oldActiveMipmapLevel = this._renderer.getActiveMipmapLevel(); + _oldXrEnabled = this._renderer.xr.enabled; + + this._renderer.xr.enabled = false; + + const cubeUVRenderTarget = renderTarget || this._allocateTargets(); + this._textureToCubeUV( texture, cubeUVRenderTarget ); + this._applyPMREM( cubeUVRenderTarget ); + this._cleanup( cubeUVRenderTarget ); + + return cubeUVRenderTarget; + + } + + _allocateTargets() { + + const width = 3 * Math.max( this._cubeSize, 16 * 7 ); + const height = 4 * this._cubeSize; + + const params = { + magFilter: LinearFilter, + minFilter: LinearFilter, + generateMipmaps: false, + type: HalfFloatType, + format: RGBAFormat, + colorSpace: LinearSRGBColorSpace, + depthBuffer: false + }; + + const cubeUVRenderTarget = _createRenderTarget( width, height, params ); + + if ( this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== width || this._pingPongRenderTarget.height !== height ) { + + if ( this._pingPongRenderTarget !== null ) { + + this._dispose(); + + } + + this._pingPongRenderTarget = _createRenderTarget( width, height, params ); + + const { _lodMax } = this; + ( { sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = _createPlanes( _lodMax ) ); + + this._blurMaterial = _getBlurShader( _lodMax, width, height ); + + } + + return cubeUVRenderTarget; + + } + + _compileMaterial( material ) { + + const tmpMesh = new Mesh( this._lodPlanes[ 0 ], material ); + this._renderer.compile( tmpMesh, _flatCamera ); + + } + + _sceneToCubeUV( scene, near, far, cubeUVRenderTarget ) { + + const fov = 90; + const aspect = 1; + const cubeCamera = new PerspectiveCamera( fov, aspect, near, far ); + const upSign = [ 1, - 1, 1, 1, 1, 1 ]; + const forwardSign = [ 1, 1, 1, - 1, - 1, - 1 ]; + const renderer = this._renderer; + + const originalAutoClear = renderer.autoClear; + const toneMapping = renderer.toneMapping; + renderer.getClearColor( _clearColor ); + + renderer.toneMapping = NoToneMapping; + renderer.autoClear = false; + + const backgroundMaterial = new MeshBasicMaterial( { + name: 'PMREM.Background', + side: BackSide, + depthWrite: false, + depthTest: false, + } ); + + const backgroundBox = new Mesh( new BoxGeometry(), backgroundMaterial ); + + let useSolidColor = false; + const background = scene.background; + + if ( background ) { + + if ( background.isColor ) { + + backgroundMaterial.color.copy( background ); + scene.background = null; + useSolidColor = true; + + } + + } else { + + backgroundMaterial.color.copy( _clearColor ); + useSolidColor = true; + + } + + for ( let i = 0; i < 6; i ++ ) { + + const col = i % 3; + + if ( col === 0 ) { + + cubeCamera.up.set( 0, upSign[ i ], 0 ); + cubeCamera.lookAt( forwardSign[ i ], 0, 0 ); + + } else if ( col === 1 ) { + + cubeCamera.up.set( 0, 0, upSign[ i ] ); + cubeCamera.lookAt( 0, forwardSign[ i ], 0 ); + + } else { + + cubeCamera.up.set( 0, upSign[ i ], 0 ); + cubeCamera.lookAt( 0, 0, forwardSign[ i ] ); + + } + + const size = this._cubeSize; + + _setViewport( cubeUVRenderTarget, col * size, i > 2 ? size : 0, size, size ); + + renderer.setRenderTarget( cubeUVRenderTarget ); + + if ( useSolidColor ) { + + renderer.render( backgroundBox, cubeCamera ); + + } + + renderer.render( scene, cubeCamera ); + + } + + backgroundBox.geometry.dispose(); + backgroundBox.material.dispose(); + + renderer.toneMapping = toneMapping; + renderer.autoClear = originalAutoClear; + scene.background = background; + + } + + _textureToCubeUV( texture, cubeUVRenderTarget ) { + + const renderer = this._renderer; + + const isCubeTexture = ( texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping ); + + if ( isCubeTexture ) { + + if ( this._cubemapMaterial === null ) { + + this._cubemapMaterial = _getCubemapMaterial(); + + } + + this._cubemapMaterial.uniforms.flipEnvMap.value = ( texture.isRenderTargetTexture === false ) ? - 1 : 1; + + } else { + + if ( this._equirectMaterial === null ) { + + this._equirectMaterial = _getEquirectMaterial(); + + } + + } + + const material = isCubeTexture ? this._cubemapMaterial : this._equirectMaterial; + const mesh = new Mesh( this._lodPlanes[ 0 ], material ); + + const uniforms = material.uniforms; + + uniforms[ 'envMap' ].value = texture; + + const size = this._cubeSize; + + _setViewport( cubeUVRenderTarget, 0, 0, 3 * size, 2 * size ); + + renderer.setRenderTarget( cubeUVRenderTarget ); + renderer.render( mesh, _flatCamera ); + + } + + _applyPMREM( cubeUVRenderTarget ) { + + const renderer = this._renderer; + const autoClear = renderer.autoClear; + renderer.autoClear = false; + const n = this._lodPlanes.length; + + for ( let i = 1; i < n; i ++ ) { + + const sigma = Math.sqrt( this._sigmas[ i ] * this._sigmas[ i ] - this._sigmas[ i - 1 ] * this._sigmas[ i - 1 ] ); + + const poleAxis = _axisDirections[ ( n - i - 1 ) % _axisDirections.length ]; + + this._blur( cubeUVRenderTarget, i - 1, i, sigma, poleAxis ); + + } + + renderer.autoClear = autoClear; + + } + + /** + * This is a two-pass Gaussian blur for a cubemap. Normally this is done + * vertically and horizontally, but this breaks down on a cube. Here we apply + * the blur latitudinally (around the poles), and then longitudinally (towards + * the poles) to approximate the orthogonally-separable blur. It is least + * accurate at the poles, but still does a decent job. + */ + _blur( cubeUVRenderTarget, lodIn, lodOut, sigma, poleAxis ) { + + const pingPongRenderTarget = this._pingPongRenderTarget; + + this._halfBlur( + cubeUVRenderTarget, + pingPongRenderTarget, + lodIn, + lodOut, + sigma, + 'latitudinal', + poleAxis ); + + this._halfBlur( + pingPongRenderTarget, + cubeUVRenderTarget, + lodOut, + lodOut, + sigma, + 'longitudinal', + poleAxis ); + + } + + _halfBlur( targetIn, targetOut, lodIn, lodOut, sigmaRadians, direction, poleAxis ) { + + const renderer = this._renderer; + const blurMaterial = this._blurMaterial; + + if ( direction !== 'latitudinal' && direction !== 'longitudinal' ) { + + console.error( + 'blur direction must be either latitudinal or longitudinal!' ); + + } + + // Number of standard deviations at which to cut off the discrete approximation. + const STANDARD_DEVIATIONS = 3; + + const blurMesh = new Mesh( this._lodPlanes[ lodOut ], blurMaterial ); + const blurUniforms = blurMaterial.uniforms; + + const pixels = this._sizeLods[ lodIn ] - 1; + const radiansPerPixel = isFinite( sigmaRadians ) ? Math.PI / ( 2 * pixels ) : 2 * Math.PI / ( 2 * MAX_SAMPLES - 1 ); + const sigmaPixels = sigmaRadians / radiansPerPixel; + const samples = isFinite( sigmaRadians ) ? 1 + Math.floor( STANDARD_DEVIATIONS * sigmaPixels ) : MAX_SAMPLES; + + if ( samples > MAX_SAMPLES ) { + + console.warn( `sigmaRadians, ${ + sigmaRadians}, is too large and will clip, as it requested ${ + samples} samples when the maximum is set to ${MAX_SAMPLES}` ); + + } + + const weights = []; + let sum = 0; + + for ( let i = 0; i < MAX_SAMPLES; ++ i ) { + + const x = i / sigmaPixels; + const weight = Math.exp( - x * x / 2 ); + weights.push( weight ); + + if ( i === 0 ) { + + sum += weight; + + } else if ( i < samples ) { + + sum += 2 * weight; + + } + + } + + for ( let i = 0; i < weights.length; i ++ ) { + + weights[ i ] = weights[ i ] / sum; + + } + + blurUniforms[ 'envMap' ].value = targetIn.texture; + blurUniforms[ 'samples' ].value = samples; + blurUniforms[ 'weights' ].value = weights; + blurUniforms[ 'latitudinal' ].value = direction === 'latitudinal'; + + if ( poleAxis ) { + + blurUniforms[ 'poleAxis' ].value = poleAxis; + + } + + const { _lodMax } = this; + blurUniforms[ 'dTheta' ].value = radiansPerPixel; + blurUniforms[ 'mipInt' ].value = _lodMax - lodIn; + + const outputSize = this._sizeLods[ lodOut ]; + const x = 3 * outputSize * ( lodOut > _lodMax - LOD_MIN ? lodOut - _lodMax + LOD_MIN : 0 ); + const y = 4 * ( this._cubeSize - outputSize ); + + _setViewport( targetOut, x, y, 3 * outputSize, 2 * outputSize ); + renderer.setRenderTarget( targetOut ); + renderer.render( blurMesh, _flatCamera ); + + } + +} + + + +function _createPlanes( lodMax ) { + + const lodPlanes = []; + const sizeLods = []; + const sigmas = []; + + let lod = lodMax; + + const totalLods = lodMax - LOD_MIN + 1 + EXTRA_LOD_SIGMA.length; + + for ( let i = 0; i < totalLods; i ++ ) { + + const sizeLod = Math.pow( 2, lod ); + sizeLods.push( sizeLod ); + let sigma = 1.0 / sizeLod; + + if ( i > lodMax - LOD_MIN ) { + + sigma = EXTRA_LOD_SIGMA[ i - lodMax + LOD_MIN - 1 ]; + + } else if ( i === 0 ) { + + sigma = 0; + + } + + sigmas.push( sigma ); + + const texelSize = 1.0 / ( sizeLod - 2 ); + const min = - texelSize; + const max = 1 + texelSize; + const uv1 = [ min, min, max, min, max, max, min, min, max, max, min, max ]; + + const cubeFaces = 6; + const vertices = 6; + const positionSize = 3; + const uvSize = 2; + const faceIndexSize = 1; + + const position = new Float32Array( positionSize * vertices * cubeFaces ); + const uv = new Float32Array( uvSize * vertices * cubeFaces ); + const faceIndex = new Float32Array( faceIndexSize * vertices * cubeFaces ); + + for ( let face = 0; face < cubeFaces; face ++ ) { + + const x = ( face % 3 ) * 2 / 3 - 1; + const y = face > 2 ? 0 : - 1; + const coordinates = [ + x, y, 0, + x + 2 / 3, y, 0, + x + 2 / 3, y + 1, 0, + x, y, 0, + x + 2 / 3, y + 1, 0, + x, y + 1, 0 + ]; + position.set( coordinates, positionSize * vertices * face ); + uv.set( uv1, uvSize * vertices * face ); + const fill = [ face, face, face, face, face, face ]; + faceIndex.set( fill, faceIndexSize * vertices * face ); + + } + + const planes = new BufferGeometry(); + planes.setAttribute( 'position', new BufferAttribute( position, positionSize ) ); + planes.setAttribute( 'uv', new BufferAttribute( uv, uvSize ) ); + planes.setAttribute( 'faceIndex', new BufferAttribute( faceIndex, faceIndexSize ) ); + lodPlanes.push( planes ); + + if ( lod > LOD_MIN ) { + + lod --; + + } + + } + + return { lodPlanes, sizeLods, sigmas }; + +} + +function _createRenderTarget( width, height, params ) { + + const cubeUVRenderTarget = new WebGLRenderTarget( width, height, params ); + cubeUVRenderTarget.texture.mapping = CubeUVReflectionMapping; + cubeUVRenderTarget.texture.name = 'PMREM.cubeUv'; + cubeUVRenderTarget.scissorTest = true; + return cubeUVRenderTarget; + +} + +function _setViewport( target, x, y, width, height ) { + + target.viewport.set( x, y, width, height ); + target.scissor.set( x, y, width, height ); + +} + +function _getBlurShader( lodMax, width, height ) { + + const weights = new Float32Array( MAX_SAMPLES ); + const poleAxis = new Vector3( 0, 1, 0 ); + const shaderMaterial = new ShaderMaterial( { + + name: 'SphericalGaussianBlur', + + defines: { + 'n': MAX_SAMPLES, + 'CUBEUV_TEXEL_WIDTH': 1.0 / width, + 'CUBEUV_TEXEL_HEIGHT': 1.0 / height, + 'CUBEUV_MAX_MIP': `${lodMax}.0`, + }, + + uniforms: { + 'envMap': { value: null }, + 'samples': { value: 1 }, + 'weights': { value: weights }, + 'latitudinal': { value: false }, + 'dTheta': { value: 0 }, + 'mipInt': { value: 0 }, + 'poleAxis': { value: poleAxis } + }, + + vertexShader: _getCommonVertexShader(), + + fragmentShader: /* glsl */` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `, + + blending: NoBlending, + depthTest: false, + depthWrite: false + + } ); + + return shaderMaterial; + +} + +function _getEquirectMaterial() { + + return new ShaderMaterial( { + + name: 'EquirectangularToCubeUV', + + uniforms: { + 'envMap': { value: null } + }, + + vertexShader: _getCommonVertexShader(), + + fragmentShader: /* glsl */` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `, + + blending: NoBlending, + depthTest: false, + depthWrite: false + + } ); + +} + +function _getCubemapMaterial() { + + return new ShaderMaterial( { + + name: 'CubemapToCubeUV', + + uniforms: { + 'envMap': { value: null }, + 'flipEnvMap': { value: - 1 } + }, + + vertexShader: _getCommonVertexShader(), + + fragmentShader: /* glsl */` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `, + + blending: NoBlending, + depthTest: false, + depthWrite: false + + } ); + +} + +function _getCommonVertexShader() { + + return /* glsl */` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `; + +} + +function WebGLCubeUVMaps( renderer ) { + + let cubeUVmaps = new WeakMap(); + + let pmremGenerator = null; + + function get( texture ) { + + if ( texture && texture.isTexture ) { + + const mapping = texture.mapping; + + const isEquirectMap = ( mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping ); + const isCubeMap = ( mapping === CubeReflectionMapping || mapping === CubeRefractionMapping ); + + // equirect/cube map to cubeUV conversion + + if ( isEquirectMap || isCubeMap ) { + + let renderTarget = cubeUVmaps.get( texture ); + + const currentPMREMVersion = renderTarget !== undefined ? renderTarget.texture.pmremVersion : 0; + + if ( texture.isRenderTargetTexture && texture.pmremVersion !== currentPMREMVersion ) { + + if ( pmremGenerator === null ) pmremGenerator = new PMREMGenerator( renderer ); + + renderTarget = isEquirectMap ? pmremGenerator.fromEquirectangular( texture, renderTarget ) : pmremGenerator.fromCubemap( texture, renderTarget ); + renderTarget.texture.pmremVersion = texture.pmremVersion; + + cubeUVmaps.set( texture, renderTarget ); + + return renderTarget.texture; + + } else { + + if ( renderTarget !== undefined ) { + + return renderTarget.texture; + + } else { + + const image = texture.image; + + if ( ( isEquirectMap && image && image.height > 0 ) || ( isCubeMap && image && isCubeTextureComplete( image ) ) ) { + + if ( pmremGenerator === null ) pmremGenerator = new PMREMGenerator( renderer ); + + renderTarget = isEquirectMap ? pmremGenerator.fromEquirectangular( texture ) : pmremGenerator.fromCubemap( texture ); + renderTarget.texture.pmremVersion = texture.pmremVersion; + + cubeUVmaps.set( texture, renderTarget ); + + texture.addEventListener( 'dispose', onTextureDispose ); + + return renderTarget.texture; + + } else { + + // image not yet ready. try the conversion next frame + + return null; + + } + + } + + } + + } + + } + + return texture; + + } + + function isCubeTextureComplete( image ) { + + let count = 0; + const length = 6; + + for ( let i = 0; i < length; i ++ ) { + + if ( image[ i ] !== undefined ) count ++; + + } + + return count === length; + + + } + + function onTextureDispose( event ) { + + const texture = event.target; + + texture.removeEventListener( 'dispose', onTextureDispose ); + + const cubemapUV = cubeUVmaps.get( texture ); + + if ( cubemapUV !== undefined ) { + + cubeUVmaps.delete( texture ); + cubemapUV.dispose(); + + } + + } + + function dispose() { + + cubeUVmaps = new WeakMap(); + + if ( pmremGenerator !== null ) { + + pmremGenerator.dispose(); + pmremGenerator = null; + + } + + } + + return { + get: get, + dispose: dispose + }; + +} + +function WebGLExtensions( gl ) { + + const extensions = {}; + + function getExtension( name ) { + + if ( extensions[ name ] !== undefined ) { + + return extensions[ name ]; + + } + + let extension; + + switch ( name ) { + + case 'WEBGL_depth_texture': + extension = gl.getExtension( 'WEBGL_depth_texture' ) || gl.getExtension( 'MOZ_WEBGL_depth_texture' ) || gl.getExtension( 'WEBKIT_WEBGL_depth_texture' ); + break; + + case 'EXT_texture_filter_anisotropic': + extension = gl.getExtension( 'EXT_texture_filter_anisotropic' ) || gl.getExtension( 'MOZ_EXT_texture_filter_anisotropic' ) || gl.getExtension( 'WEBKIT_EXT_texture_filter_anisotropic' ); + break; + + case 'WEBGL_compressed_texture_s3tc': + extension = gl.getExtension( 'WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'MOZ_WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_s3tc' ); + break; + + case 'WEBGL_compressed_texture_pvrtc': + extension = gl.getExtension( 'WEBGL_compressed_texture_pvrtc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_pvrtc' ); + break; + + default: + extension = gl.getExtension( name ); + + } + + extensions[ name ] = extension; + + return extension; + + } + + return { + + has: function ( name ) { + + return getExtension( name ) !== null; + + }, + + init: function () { + + getExtension( 'EXT_color_buffer_float' ); + getExtension( 'WEBGL_clip_cull_distance' ); + getExtension( 'OES_texture_float_linear' ); + getExtension( 'EXT_color_buffer_half_float' ); + getExtension( 'WEBGL_multisampled_render_to_texture' ); + getExtension( 'WEBGL_render_shared_exponent' ); + + }, + + get: function ( name ) { + + const extension = getExtension( name ); + + if ( extension === null ) { + + console.warn( 'THREE.WebGLRenderer: ' + name + ' extension not supported.' ); + + } + + return extension; + + } + + }; + +} + +function WebGLGeometries( gl, attributes, info, bindingStates ) { + + const geometries = {}; + const wireframeAttributes = new WeakMap(); + + function onGeometryDispose( event ) { + + const geometry = event.target; + + if ( geometry.index !== null ) { + + attributes.remove( geometry.index ); + + } + + for ( const name in geometry.attributes ) { + + attributes.remove( geometry.attributes[ name ] ); + + } + + for ( const name in geometry.morphAttributes ) { + + const array = geometry.morphAttributes[ name ]; + + for ( let i = 0, l = array.length; i < l; i ++ ) { + + attributes.remove( array[ i ] ); + + } + + } + + geometry.removeEventListener( 'dispose', onGeometryDispose ); + + delete geometries[ geometry.id ]; + + const attribute = wireframeAttributes.get( geometry ); + + if ( attribute ) { + + attributes.remove( attribute ); + wireframeAttributes.delete( geometry ); + + } + + bindingStates.releaseStatesOfGeometry( geometry ); + + if ( geometry.isInstancedBufferGeometry === true ) { + + delete geometry._maxInstanceCount; + + } + + // + + info.memory.geometries --; + + } + + function get( object, geometry ) { + + if ( geometries[ geometry.id ] === true ) return geometry; + + geometry.addEventListener( 'dispose', onGeometryDispose ); + + geometries[ geometry.id ] = true; + + info.memory.geometries ++; + + return geometry; + + } + + function update( geometry ) { + + const geometryAttributes = geometry.attributes; + + // Updating index buffer in VAO now. See WebGLBindingStates. + + for ( const name in geometryAttributes ) { + + attributes.update( geometryAttributes[ name ], gl.ARRAY_BUFFER ); + + } + + // morph targets + + const morphAttributes = geometry.morphAttributes; + + for ( const name in morphAttributes ) { + + const array = morphAttributes[ name ]; + + for ( let i = 0, l = array.length; i < l; i ++ ) { + + attributes.update( array[ i ], gl.ARRAY_BUFFER ); + + } + + } + + } + + function updateWireframeAttribute( geometry ) { + + const indices = []; + + const geometryIndex = geometry.index; + const geometryPosition = geometry.attributes.position; + let version = 0; + + if ( geometryIndex !== null ) { + + const array = geometryIndex.array; + version = geometryIndex.version; + + for ( let i = 0, l = array.length; i < l; i += 3 ) { + + const a = array[ i + 0 ]; + const b = array[ i + 1 ]; + const c = array[ i + 2 ]; + + indices.push( a, b, b, c, c, a ); + + } + + } else if ( geometryPosition !== undefined ) { + + const array = geometryPosition.array; + version = geometryPosition.version; + + for ( let i = 0, l = ( array.length / 3 ) - 1; i < l; i += 3 ) { + + const a = i + 0; + const b = i + 1; + const c = i + 2; + + indices.push( a, b, b, c, c, a ); + + } + + } else { + + return; + + } + + const attribute = new ( arrayNeedsUint32( indices ) ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ); + attribute.version = version; + + // Updating index buffer in VAO now. See WebGLBindingStates + + // + + const previousAttribute = wireframeAttributes.get( geometry ); + + if ( previousAttribute ) attributes.remove( previousAttribute ); + + // + + wireframeAttributes.set( geometry, attribute ); + + } + + function getWireframeAttribute( geometry ) { + + const currentAttribute = wireframeAttributes.get( geometry ); + + if ( currentAttribute ) { + + const geometryIndex = geometry.index; + + if ( geometryIndex !== null ) { + + // if the attribute is obsolete, create a new one + + if ( currentAttribute.version < geometryIndex.version ) { + + updateWireframeAttribute( geometry ); + + } + + } + + } else { + + updateWireframeAttribute( geometry ); + + } + + return wireframeAttributes.get( geometry ); + + } + + return { + + get: get, + update: update, + + getWireframeAttribute: getWireframeAttribute + + }; + +} + +function WebGLIndexedBufferRenderer( gl, extensions, info ) { + + let mode; + + function setMode( value ) { + + mode = value; + + } + + let type, bytesPerElement; + + function setIndex( value ) { + + type = value.type; + bytesPerElement = value.bytesPerElement; + + } + + function render( start, count ) { + + gl.drawElements( mode, count, type, start * bytesPerElement ); + + info.update( count, mode, 1 ); + + } + + function renderInstances( start, count, primcount ) { + + if ( primcount === 0 ) return; + + gl.drawElementsInstanced( mode, count, type, start * bytesPerElement, primcount ); + + info.update( count, mode, primcount ); + + } + + function renderMultiDraw( starts, counts, drawCount ) { + + if ( drawCount === 0 ) return; + + const extension = extensions.get( 'WEBGL_multi_draw' ); + + if ( extension === null ) { + + for ( let i = 0; i < drawCount; i ++ ) { + + this.render( starts[ i ] / bytesPerElement, counts[ i ] ); + + } + + } else { + + extension.multiDrawElementsWEBGL( mode, counts, 0, type, starts, 0, drawCount ); + + let elementCount = 0; + for ( let i = 0; i < drawCount; i ++ ) { + + elementCount += counts[ i ]; + + } + + info.update( elementCount, mode, 1 ); + + } + + } + + function renderMultiDrawInstances( starts, counts, drawCount, primcount ) { + + if ( drawCount === 0 ) return; + + const extension = extensions.get( 'WEBGL_multi_draw' ); + + if ( extension === null ) { + + for ( let i = 0; i < starts.length; i ++ ) { + + renderInstances( starts[ i ] / bytesPerElement, counts[ i ], primcount[ i ] ); + + } + + } else { + + extension.multiDrawElementsInstancedWEBGL( mode, counts, 0, type, starts, 0, primcount, 0, drawCount ); + + let elementCount = 0; + for ( let i = 0; i < drawCount; i ++ ) { + + elementCount += counts[ i ]; + + } + + for ( let i = 0; i < primcount.length; i ++ ) { + + info.update( elementCount, mode, primcount[ i ] ); + + } + + } + + } + + // + + this.setMode = setMode; + this.setIndex = setIndex; + this.render = render; + this.renderInstances = renderInstances; + this.renderMultiDraw = renderMultiDraw; + this.renderMultiDrawInstances = renderMultiDrawInstances; + +} + +function WebGLInfo( gl ) { + + const memory = { + geometries: 0, + textures: 0 + }; + + const render = { + frame: 0, + calls: 0, + triangles: 0, + points: 0, + lines: 0 + }; + + function update( count, mode, instanceCount ) { + + render.calls ++; + + switch ( mode ) { + + case gl.TRIANGLES: + render.triangles += instanceCount * ( count / 3 ); + break; + + case gl.LINES: + render.lines += instanceCount * ( count / 2 ); + break; + + case gl.LINE_STRIP: + render.lines += instanceCount * ( count - 1 ); + break; + + case gl.LINE_LOOP: + render.lines += instanceCount * count; + break; + + case gl.POINTS: + render.points += instanceCount * count; + break; + + default: + console.error( 'THREE.WebGLInfo: Unknown draw mode:', mode ); + break; + + } + + } + + function reset() { + + render.calls = 0; + render.triangles = 0; + render.points = 0; + render.lines = 0; + + } + + return { + memory: memory, + render: render, + programs: null, + autoReset: true, + reset: reset, + update: update + }; + +} + +function WebGLMorphtargets( gl, capabilities, textures ) { + + const morphTextures = new WeakMap(); + const morph = new Vector4(); + + function update( object, geometry, program ) { + + const objectInfluences = object.morphTargetInfluences; + + // instead of using attributes, the WebGL 2 code path encodes morph targets + // into an array of data textures. Each layer represents a single morph target. + + const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color; + const morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0; + + let entry = morphTextures.get( geometry ); + + if ( entry === undefined || entry.count !== morphTargetsCount ) { + + if ( entry !== undefined ) entry.texture.dispose(); + + const hasMorphPosition = geometry.morphAttributes.position !== undefined; + const hasMorphNormals = geometry.morphAttributes.normal !== undefined; + const hasMorphColors = geometry.morphAttributes.color !== undefined; + + const morphTargets = geometry.morphAttributes.position || []; + const morphNormals = geometry.morphAttributes.normal || []; + const morphColors = geometry.morphAttributes.color || []; + + let vertexDataCount = 0; + + if ( hasMorphPosition === true ) vertexDataCount = 1; + if ( hasMorphNormals === true ) vertexDataCount = 2; + if ( hasMorphColors === true ) vertexDataCount = 3; + + let width = geometry.attributes.position.count * vertexDataCount; + let height = 1; + + if ( width > capabilities.maxTextureSize ) { + + height = Math.ceil( width / capabilities.maxTextureSize ); + width = capabilities.maxTextureSize; + + } + + const buffer = new Float32Array( width * height * 4 * morphTargetsCount ); + + const texture = new DataArrayTexture( buffer, width, height, morphTargetsCount ); + texture.type = FloatType; + texture.needsUpdate = true; + + // fill buffer + + const vertexDataStride = vertexDataCount * 4; + + for ( let i = 0; i < morphTargetsCount; i ++ ) { + + const morphTarget = morphTargets[ i ]; + const morphNormal = morphNormals[ i ]; + const morphColor = morphColors[ i ]; + + const offset = width * height * 4 * i; + + for ( let j = 0; j < morphTarget.count; j ++ ) { + + const stride = j * vertexDataStride; + + if ( hasMorphPosition === true ) { + + morph.fromBufferAttribute( morphTarget, j ); + + buffer[ offset + stride + 0 ] = morph.x; + buffer[ offset + stride + 1 ] = morph.y; + buffer[ offset + stride + 2 ] = morph.z; + buffer[ offset + stride + 3 ] = 0; + + } + + if ( hasMorphNormals === true ) { + + morph.fromBufferAttribute( morphNormal, j ); + + buffer[ offset + stride + 4 ] = morph.x; + buffer[ offset + stride + 5 ] = morph.y; + buffer[ offset + stride + 6 ] = morph.z; + buffer[ offset + stride + 7 ] = 0; + + } + + if ( hasMorphColors === true ) { + + morph.fromBufferAttribute( morphColor, j ); + + buffer[ offset + stride + 8 ] = morph.x; + buffer[ offset + stride + 9 ] = morph.y; + buffer[ offset + stride + 10 ] = morph.z; + buffer[ offset + stride + 11 ] = ( morphColor.itemSize === 4 ) ? morph.w : 1; + + } + + } + + } + + entry = { + count: morphTargetsCount, + texture: texture, + size: new Vector2( width, height ) + }; + + morphTextures.set( geometry, entry ); + + function disposeTexture() { + + texture.dispose(); + + morphTextures.delete( geometry ); + + geometry.removeEventListener( 'dispose', disposeTexture ); + + } + + geometry.addEventListener( 'dispose', disposeTexture ); + + } + + // + if ( object.isInstancedMesh === true && object.morphTexture !== null ) { + + program.getUniforms().setValue( gl, 'morphTexture', object.morphTexture, textures ); + + } else { + + let morphInfluencesSum = 0; + + for ( let i = 0; i < objectInfluences.length; i ++ ) { + + morphInfluencesSum += objectInfluences[ i ]; + + } + + const morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum; + + + program.getUniforms().setValue( gl, 'morphTargetBaseInfluence', morphBaseInfluence ); + program.getUniforms().setValue( gl, 'morphTargetInfluences', objectInfluences ); + + } + + program.getUniforms().setValue( gl, 'morphTargetsTexture', entry.texture, textures ); + program.getUniforms().setValue( gl, 'morphTargetsTextureSize', entry.size ); + + } + + return { + + update: update + + }; + +} + +function WebGLObjects( gl, geometries, attributes, info ) { + + let updateMap = new WeakMap(); + + function update( object ) { + + const frame = info.render.frame; + + const geometry = object.geometry; + const buffergeometry = geometries.get( object, geometry ); + + // Update once per frame + + if ( updateMap.get( buffergeometry ) !== frame ) { + + geometries.update( buffergeometry ); + + updateMap.set( buffergeometry, frame ); + + } + + if ( object.isInstancedMesh ) { + + if ( object.hasEventListener( 'dispose', onInstancedMeshDispose ) === false ) { + + object.addEventListener( 'dispose', onInstancedMeshDispose ); + + } + + if ( updateMap.get( object ) !== frame ) { + + attributes.update( object.instanceMatrix, gl.ARRAY_BUFFER ); + + if ( object.instanceColor !== null ) { + + attributes.update( object.instanceColor, gl.ARRAY_BUFFER ); + + } + + updateMap.set( object, frame ); + + } + + } + + if ( object.isSkinnedMesh ) { + + const skeleton = object.skeleton; + + if ( updateMap.get( skeleton ) !== frame ) { + + skeleton.update(); + + updateMap.set( skeleton, frame ); + + } + + } + + return buffergeometry; + + } + + function dispose() { + + updateMap = new WeakMap(); + + } + + function onInstancedMeshDispose( event ) { + + const instancedMesh = event.target; + + instancedMesh.removeEventListener( 'dispose', onInstancedMeshDispose ); + + attributes.remove( instancedMesh.instanceMatrix ); + + if ( instancedMesh.instanceColor !== null ) attributes.remove( instancedMesh.instanceColor ); + + } + + return { + + update: update, + dispose: dispose + + }; + +} + +class DepthTexture extends Texture { + + constructor( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format ) { + + format = format !== undefined ? format : DepthFormat; + + if ( format !== DepthFormat && format !== DepthStencilFormat ) { + + throw new Error( 'DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat' ); + + } + + if ( type === undefined && format === DepthFormat ) type = UnsignedIntType; + if ( type === undefined && format === DepthStencilFormat ) type = UnsignedInt248Type; + + super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ); + + this.isDepthTexture = true; + + this.image = { width: width, height: height }; + + this.magFilter = magFilter !== undefined ? magFilter : NearestFilter; + this.minFilter = minFilter !== undefined ? minFilter : NearestFilter; + + this.flipY = false; + this.generateMipmaps = false; + + this.compareFunction = null; + + } + + + copy( source ) { + + super.copy( source ); + + this.compareFunction = source.compareFunction; + + return this; + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + if ( this.compareFunction !== null ) data.compareFunction = this.compareFunction; + + return data; + + } + +} + +/** + * Uniforms of a program. + * Those form a tree structure with a special top-level container for the root, + * which you get by calling 'new WebGLUniforms( gl, program )'. + * + * + * Properties of inner nodes including the top-level container: + * + * .seq - array of nested uniforms + * .map - nested uniforms by name + * + * + * Methods of all nodes except the top-level container: + * + * .setValue( gl, value, [textures] ) + * + * uploads a uniform value(s) + * the 'textures' parameter is needed for sampler uniforms + * + * + * Static methods of the top-level container (textures factorizations): + * + * .upload( gl, seq, values, textures ) + * + * sets uniforms in 'seq' to 'values[id].value' + * + * .seqWithValue( seq, values ) : filteredSeq + * + * filters 'seq' entries with corresponding entry in values + * + * + * Methods of the top-level container (textures factorizations): + * + * .setValue( gl, name, value, textures ) + * + * sets uniform with name 'name' to 'value' + * + * .setOptional( gl, obj, prop ) + * + * like .set for an optional property of the object + * + */ + + +const emptyTexture = /*@__PURE__*/ new Texture(); + +const emptyShadowTexture = /*@__PURE__*/ new DepthTexture( 1, 1 ); +emptyShadowTexture.compareFunction = LessEqualCompare; + +const emptyArrayTexture = /*@__PURE__*/ new DataArrayTexture(); +const empty3dTexture = /*@__PURE__*/ new Data3DTexture(); +const emptyCubeTexture = /*@__PURE__*/ new CubeTexture(); + +// --- Utilities --- + +// Array Caches (provide typed arrays for temporary by size) + +const arrayCacheF32 = []; +const arrayCacheI32 = []; + +// Float32Array caches used for uploading Matrix uniforms + +const mat4array = new Float32Array( 16 ); +const mat3array = new Float32Array( 9 ); +const mat2array = new Float32Array( 4 ); + +// Flattening for arrays of vectors and matrices + +function flatten( array, nBlocks, blockSize ) { + + const firstElem = array[ 0 ]; + + if ( firstElem <= 0 || firstElem > 0 ) return array; + // unoptimized: ! isNaN( firstElem ) + // see http://jacksondunstan.com/articles/983 + + const n = nBlocks * blockSize; + let r = arrayCacheF32[ n ]; + + if ( r === undefined ) { + + r = new Float32Array( n ); + arrayCacheF32[ n ] = r; + + } + + if ( nBlocks !== 0 ) { + + firstElem.toArray( r, 0 ); + + for ( let i = 1, offset = 0; i !== nBlocks; ++ i ) { + + offset += blockSize; + array[ i ].toArray( r, offset ); + + } + + } + + return r; + +} + +function arraysEqual( a, b ) { + + if ( a.length !== b.length ) return false; + + for ( let i = 0, l = a.length; i < l; i ++ ) { + + if ( a[ i ] !== b[ i ] ) return false; + + } + + return true; + +} + +function copyArray( a, b ) { + + for ( let i = 0, l = b.length; i < l; i ++ ) { + + a[ i ] = b[ i ]; + + } + +} + +// Texture unit allocation + +function allocTexUnits( textures, n ) { + + let r = arrayCacheI32[ n ]; + + if ( r === undefined ) { + + r = new Int32Array( n ); + arrayCacheI32[ n ] = r; + + } + + for ( let i = 0; i !== n; ++ i ) { + + r[ i ] = textures.allocateTextureUnit(); + + } + + return r; + +} + +// --- Setters --- + +// Note: Defining these methods externally, because they come in a bunch +// and this way their names minify. + +// Single scalar + +function setValueV1f( gl, v ) { + + const cache = this.cache; + + if ( cache[ 0 ] === v ) return; + + gl.uniform1f( this.addr, v ); + + cache[ 0 ] = v; + +} + +// Single float vector (from flat array or THREE.VectorN) + +function setValueV2f( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) { + + gl.uniform2f( this.addr, v.x, v.y ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform2fv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +function setValueV3f( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) { + + gl.uniform3f( this.addr, v.x, v.y, v.z ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + cache[ 2 ] = v.z; + + } + + } else if ( v.r !== undefined ) { + + if ( cache[ 0 ] !== v.r || cache[ 1 ] !== v.g || cache[ 2 ] !== v.b ) { + + gl.uniform3f( this.addr, v.r, v.g, v.b ); + + cache[ 0 ] = v.r; + cache[ 1 ] = v.g; + cache[ 2 ] = v.b; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform3fv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +function setValueV4f( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) { + + gl.uniform4f( this.addr, v.x, v.y, v.z, v.w ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + cache[ 2 ] = v.z; + cache[ 3 ] = v.w; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform4fv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +// Single matrix (from flat array or THREE.MatrixN) + +function setValueM2( gl, v ) { + + const cache = this.cache; + const elements = v.elements; + + if ( elements === undefined ) { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniformMatrix2fv( this.addr, false, v ); + + copyArray( cache, v ); + + } else { + + if ( arraysEqual( cache, elements ) ) return; + + mat2array.set( elements ); + + gl.uniformMatrix2fv( this.addr, false, mat2array ); + + copyArray( cache, elements ); + + } + +} + +function setValueM3( gl, v ) { + + const cache = this.cache; + const elements = v.elements; + + if ( elements === undefined ) { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniformMatrix3fv( this.addr, false, v ); + + copyArray( cache, v ); + + } else { + + if ( arraysEqual( cache, elements ) ) return; + + mat3array.set( elements ); + + gl.uniformMatrix3fv( this.addr, false, mat3array ); + + copyArray( cache, elements ); + + } + +} + +function setValueM4( gl, v ) { + + const cache = this.cache; + const elements = v.elements; + + if ( elements === undefined ) { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniformMatrix4fv( this.addr, false, v ); + + copyArray( cache, v ); + + } else { + + if ( arraysEqual( cache, elements ) ) return; + + mat4array.set( elements ); + + gl.uniformMatrix4fv( this.addr, false, mat4array ); + + copyArray( cache, elements ); + + } + +} + +// Single integer / boolean + +function setValueV1i( gl, v ) { + + const cache = this.cache; + + if ( cache[ 0 ] === v ) return; + + gl.uniform1i( this.addr, v ); + + cache[ 0 ] = v; + +} + +// Single integer / boolean vector (from flat array or THREE.VectorN) + +function setValueV2i( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) { + + gl.uniform2i( this.addr, v.x, v.y ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform2iv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +function setValueV3i( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) { + + gl.uniform3i( this.addr, v.x, v.y, v.z ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + cache[ 2 ] = v.z; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform3iv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +function setValueV4i( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) { + + gl.uniform4i( this.addr, v.x, v.y, v.z, v.w ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + cache[ 2 ] = v.z; + cache[ 3 ] = v.w; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform4iv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +// Single unsigned integer + +function setValueV1ui( gl, v ) { + + const cache = this.cache; + + if ( cache[ 0 ] === v ) return; + + gl.uniform1ui( this.addr, v ); + + cache[ 0 ] = v; + +} + +// Single unsigned integer vector (from flat array or THREE.VectorN) + +function setValueV2ui( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) { + + gl.uniform2ui( this.addr, v.x, v.y ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform2uiv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +function setValueV3ui( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) { + + gl.uniform3ui( this.addr, v.x, v.y, v.z ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + cache[ 2 ] = v.z; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform3uiv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +function setValueV4ui( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) { + + gl.uniform4ui( this.addr, v.x, v.y, v.z, v.w ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + cache[ 2 ] = v.z; + cache[ 3 ] = v.w; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform4uiv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + + +// Single texture (2D / Cube) + +function setValueT1( gl, v, textures ) { + + const cache = this.cache; + const unit = textures.allocateTextureUnit(); + + if ( cache[ 0 ] !== unit ) { + + gl.uniform1i( this.addr, unit ); + cache[ 0 ] = unit; + + } + + const emptyTexture2D = ( this.type === gl.SAMPLER_2D_SHADOW ) ? emptyShadowTexture : emptyTexture; + + textures.setTexture2D( v || emptyTexture2D, unit ); + +} + +function setValueT3D1( gl, v, textures ) { + + const cache = this.cache; + const unit = textures.allocateTextureUnit(); + + if ( cache[ 0 ] !== unit ) { + + gl.uniform1i( this.addr, unit ); + cache[ 0 ] = unit; + + } + + textures.setTexture3D( v || empty3dTexture, unit ); + +} + +function setValueT6( gl, v, textures ) { + + const cache = this.cache; + const unit = textures.allocateTextureUnit(); + + if ( cache[ 0 ] !== unit ) { + + gl.uniform1i( this.addr, unit ); + cache[ 0 ] = unit; + + } + + textures.setTextureCube( v || emptyCubeTexture, unit ); + +} + +function setValueT2DArray1( gl, v, textures ) { + + const cache = this.cache; + const unit = textures.allocateTextureUnit(); + + if ( cache[ 0 ] !== unit ) { + + gl.uniform1i( this.addr, unit ); + cache[ 0 ] = unit; + + } + + textures.setTexture2DArray( v || emptyArrayTexture, unit ); + +} + +// Helper to pick the right setter for the singular case + +function getSingularSetter( type ) { + + switch ( type ) { + + case 0x1406: return setValueV1f; // FLOAT + case 0x8b50: return setValueV2f; // _VEC2 + case 0x8b51: return setValueV3f; // _VEC3 + case 0x8b52: return setValueV4f; // _VEC4 + + case 0x8b5a: return setValueM2; // _MAT2 + case 0x8b5b: return setValueM3; // _MAT3 + case 0x8b5c: return setValueM4; // _MAT4 + + case 0x1404: case 0x8b56: return setValueV1i; // INT, BOOL + case 0x8b53: case 0x8b57: return setValueV2i; // _VEC2 + case 0x8b54: case 0x8b58: return setValueV3i; // _VEC3 + case 0x8b55: case 0x8b59: return setValueV4i; // _VEC4 + + case 0x1405: return setValueV1ui; // UINT + case 0x8dc6: return setValueV2ui; // _VEC2 + case 0x8dc7: return setValueV3ui; // _VEC3 + case 0x8dc8: return setValueV4ui; // _VEC4 + + case 0x8b5e: // SAMPLER_2D + case 0x8d66: // SAMPLER_EXTERNAL_OES + case 0x8dca: // INT_SAMPLER_2D + case 0x8dd2: // UNSIGNED_INT_SAMPLER_2D + case 0x8b62: // SAMPLER_2D_SHADOW + return setValueT1; + + case 0x8b5f: // SAMPLER_3D + case 0x8dcb: // INT_SAMPLER_3D + case 0x8dd3: // UNSIGNED_INT_SAMPLER_3D + return setValueT3D1; + + case 0x8b60: // SAMPLER_CUBE + case 0x8dcc: // INT_SAMPLER_CUBE + case 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE + case 0x8dc5: // SAMPLER_CUBE_SHADOW + return setValueT6; + + case 0x8dc1: // SAMPLER_2D_ARRAY + case 0x8dcf: // INT_SAMPLER_2D_ARRAY + case 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY + case 0x8dc4: // SAMPLER_2D_ARRAY_SHADOW + return setValueT2DArray1; + + } + +} + + +// Array of scalars + +function setValueV1fArray( gl, v ) { + + gl.uniform1fv( this.addr, v ); + +} + +// Array of vectors (from flat array or array of THREE.VectorN) + +function setValueV2fArray( gl, v ) { + + const data = flatten( v, this.size, 2 ); + + gl.uniform2fv( this.addr, data ); + +} + +function setValueV3fArray( gl, v ) { + + const data = flatten( v, this.size, 3 ); + + gl.uniform3fv( this.addr, data ); + +} + +function setValueV4fArray( gl, v ) { + + const data = flatten( v, this.size, 4 ); + + gl.uniform4fv( this.addr, data ); + +} + +// Array of matrices (from flat array or array of THREE.MatrixN) + +function setValueM2Array( gl, v ) { + + const data = flatten( v, this.size, 4 ); + + gl.uniformMatrix2fv( this.addr, false, data ); + +} + +function setValueM3Array( gl, v ) { + + const data = flatten( v, this.size, 9 ); + + gl.uniformMatrix3fv( this.addr, false, data ); + +} + +function setValueM4Array( gl, v ) { + + const data = flatten( v, this.size, 16 ); + + gl.uniformMatrix4fv( this.addr, false, data ); + +} + +// Array of integer / boolean + +function setValueV1iArray( gl, v ) { + + gl.uniform1iv( this.addr, v ); + +} + +// Array of integer / boolean vectors (from flat array) + +function setValueV2iArray( gl, v ) { + + gl.uniform2iv( this.addr, v ); + +} + +function setValueV3iArray( gl, v ) { + + gl.uniform3iv( this.addr, v ); + +} + +function setValueV4iArray( gl, v ) { + + gl.uniform4iv( this.addr, v ); + +} + +// Array of unsigned integer + +function setValueV1uiArray( gl, v ) { + + gl.uniform1uiv( this.addr, v ); + +} + +// Array of unsigned integer vectors (from flat array) + +function setValueV2uiArray( gl, v ) { + + gl.uniform2uiv( this.addr, v ); + +} + +function setValueV3uiArray( gl, v ) { + + gl.uniform3uiv( this.addr, v ); + +} + +function setValueV4uiArray( gl, v ) { + + gl.uniform4uiv( this.addr, v ); + +} + + +// Array of textures (2D / 3D / Cube / 2DArray) + +function setValueT1Array( gl, v, textures ) { + + const cache = this.cache; + + const n = v.length; + + const units = allocTexUnits( textures, n ); + + if ( ! arraysEqual( cache, units ) ) { + + gl.uniform1iv( this.addr, units ); + + copyArray( cache, units ); + + } + + for ( let i = 0; i !== n; ++ i ) { + + textures.setTexture2D( v[ i ] || emptyTexture, units[ i ] ); + + } + +} + +function setValueT3DArray( gl, v, textures ) { + + const cache = this.cache; + + const n = v.length; + + const units = allocTexUnits( textures, n ); + + if ( ! arraysEqual( cache, units ) ) { + + gl.uniform1iv( this.addr, units ); + + copyArray( cache, units ); + + } + + for ( let i = 0; i !== n; ++ i ) { + + textures.setTexture3D( v[ i ] || empty3dTexture, units[ i ] ); + + } + +} + +function setValueT6Array( gl, v, textures ) { + + const cache = this.cache; + + const n = v.length; + + const units = allocTexUnits( textures, n ); + + if ( ! arraysEqual( cache, units ) ) { + + gl.uniform1iv( this.addr, units ); + + copyArray( cache, units ); + + } + + for ( let i = 0; i !== n; ++ i ) { + + textures.setTextureCube( v[ i ] || emptyCubeTexture, units[ i ] ); + + } + +} + +function setValueT2DArrayArray( gl, v, textures ) { + + const cache = this.cache; + + const n = v.length; + + const units = allocTexUnits( textures, n ); + + if ( ! arraysEqual( cache, units ) ) { + + gl.uniform1iv( this.addr, units ); + + copyArray( cache, units ); + + } + + for ( let i = 0; i !== n; ++ i ) { + + textures.setTexture2DArray( v[ i ] || emptyArrayTexture, units[ i ] ); + + } + +} + + +// Helper to pick the right setter for a pure (bottom-level) array + +function getPureArraySetter( type ) { + + switch ( type ) { + + case 0x1406: return setValueV1fArray; // FLOAT + case 0x8b50: return setValueV2fArray; // _VEC2 + case 0x8b51: return setValueV3fArray; // _VEC3 + case 0x8b52: return setValueV4fArray; // _VEC4 + + case 0x8b5a: return setValueM2Array; // _MAT2 + case 0x8b5b: return setValueM3Array; // _MAT3 + case 0x8b5c: return setValueM4Array; // _MAT4 + + case 0x1404: case 0x8b56: return setValueV1iArray; // INT, BOOL + case 0x8b53: case 0x8b57: return setValueV2iArray; // _VEC2 + case 0x8b54: case 0x8b58: return setValueV3iArray; // _VEC3 + case 0x8b55: case 0x8b59: return setValueV4iArray; // _VEC4 + + case 0x1405: return setValueV1uiArray; // UINT + case 0x8dc6: return setValueV2uiArray; // _VEC2 + case 0x8dc7: return setValueV3uiArray; // _VEC3 + case 0x8dc8: return setValueV4uiArray; // _VEC4 + + case 0x8b5e: // SAMPLER_2D + case 0x8d66: // SAMPLER_EXTERNAL_OES + case 0x8dca: // INT_SAMPLER_2D + case 0x8dd2: // UNSIGNED_INT_SAMPLER_2D + case 0x8b62: // SAMPLER_2D_SHADOW + return setValueT1Array; + + case 0x8b5f: // SAMPLER_3D + case 0x8dcb: // INT_SAMPLER_3D + case 0x8dd3: // UNSIGNED_INT_SAMPLER_3D + return setValueT3DArray; + + case 0x8b60: // SAMPLER_CUBE + case 0x8dcc: // INT_SAMPLER_CUBE + case 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE + case 0x8dc5: // SAMPLER_CUBE_SHADOW + return setValueT6Array; + + case 0x8dc1: // SAMPLER_2D_ARRAY + case 0x8dcf: // INT_SAMPLER_2D_ARRAY + case 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY + case 0x8dc4: // SAMPLER_2D_ARRAY_SHADOW + return setValueT2DArrayArray; + + } + +} + +// --- Uniform Classes --- + +class SingleUniform { + + constructor( id, activeInfo, addr ) { + + this.id = id; + this.addr = addr; + this.cache = []; + this.type = activeInfo.type; + this.setValue = getSingularSetter( activeInfo.type ); + + // this.path = activeInfo.name; // DEBUG + + } + +} + +class PureArrayUniform { + + constructor( id, activeInfo, addr ) { + + this.id = id; + this.addr = addr; + this.cache = []; + this.type = activeInfo.type; + this.size = activeInfo.size; + this.setValue = getPureArraySetter( activeInfo.type ); + + // this.path = activeInfo.name; // DEBUG + + } + +} + +class StructuredUniform { + + constructor( id ) { + + this.id = id; + + this.seq = []; + this.map = {}; + + } + + setValue( gl, value, textures ) { + + const seq = this.seq; + + for ( let i = 0, n = seq.length; i !== n; ++ i ) { + + const u = seq[ i ]; + u.setValue( gl, value[ u.id ], textures ); + + } + + } + +} + +// --- Top-level --- + +// Parser - builds up the property tree from the path strings + +const RePathPart = /(\w+)(\])?(\[|\.)?/g; + +// extracts +// - the identifier (member name or array index) +// - followed by an optional right bracket (found when array index) +// - followed by an optional left bracket or dot (type of subscript) +// +// Note: These portions can be read in a non-overlapping fashion and +// allow straightforward parsing of the hierarchy that WebGL encodes +// in the uniform names. + +function addUniform( container, uniformObject ) { + + container.seq.push( uniformObject ); + container.map[ uniformObject.id ] = uniformObject; + +} + +function parseUniform( activeInfo, addr, container ) { + + const path = activeInfo.name, + pathLength = path.length; + + // reset RegExp object, because of the early exit of a previous run + RePathPart.lastIndex = 0; + + while ( true ) { + + const match = RePathPart.exec( path ), + matchEnd = RePathPart.lastIndex; + + let id = match[ 1 ]; + const idIsIndex = match[ 2 ] === ']', + subscript = match[ 3 ]; + + if ( idIsIndex ) id = id | 0; // convert to integer + + if ( subscript === undefined || subscript === '[' && matchEnd + 2 === pathLength ) { + + // bare name or "pure" bottom-level array "[0]" suffix + + addUniform( container, subscript === undefined ? + new SingleUniform( id, activeInfo, addr ) : + new PureArrayUniform( id, activeInfo, addr ) ); + + break; + + } else { + + // step into inner node / create it in case it doesn't exist + + const map = container.map; + let next = map[ id ]; + + if ( next === undefined ) { + + next = new StructuredUniform( id ); + addUniform( container, next ); + + } + + container = next; + + } + + } + +} + +// Root Container + +class WebGLUniforms { + + constructor( gl, program ) { + + this.seq = []; + this.map = {}; + + const n = gl.getProgramParameter( program, gl.ACTIVE_UNIFORMS ); + + for ( let i = 0; i < n; ++ i ) { + + const info = gl.getActiveUniform( program, i ), + addr = gl.getUniformLocation( program, info.name ); + + parseUniform( info, addr, this ); + + } + + } + + setValue( gl, name, value, textures ) { + + const u = this.map[ name ]; + + if ( u !== undefined ) u.setValue( gl, value, textures ); + + } + + setOptional( gl, object, name ) { + + const v = object[ name ]; + + if ( v !== undefined ) this.setValue( gl, name, v ); + + } + + static upload( gl, seq, values, textures ) { + + for ( let i = 0, n = seq.length; i !== n; ++ i ) { + + const u = seq[ i ], + v = values[ u.id ]; + + if ( v.needsUpdate !== false ) { + + // note: always updating when .needsUpdate is undefined + u.setValue( gl, v.value, textures ); + + } + + } + + } + + static seqWithValue( seq, values ) { + + const r = []; + + for ( let i = 0, n = seq.length; i !== n; ++ i ) { + + const u = seq[ i ]; + if ( u.id in values ) r.push( u ); + + } + + return r; + + } + +} + +function WebGLShader( gl, type, string ) { + + const shader = gl.createShader( type ); + + gl.shaderSource( shader, string ); + gl.compileShader( shader ); + + return shader; + +} + +// From https://www.khronos.org/registry/webgl/extensions/KHR_parallel_shader_compile/ +const COMPLETION_STATUS_KHR = 0x91B1; + +let programIdCount = 0; + +function handleSource( string, errorLine ) { + + const lines = string.split( '\n' ); + const lines2 = []; + + const from = Math.max( errorLine - 6, 0 ); + const to = Math.min( errorLine + 6, lines.length ); + + for ( let i = from; i < to; i ++ ) { + + const line = i + 1; + lines2.push( `${line === errorLine ? '>' : ' '} ${line}: ${lines[ i ]}` ); + + } + + return lines2.join( '\n' ); + +} + +function getEncodingComponents( colorSpace ) { + + const workingPrimaries = ColorManagement.getPrimaries( ColorManagement.workingColorSpace ); + const encodingPrimaries = ColorManagement.getPrimaries( colorSpace ); + + let gamutMapping; + + if ( workingPrimaries === encodingPrimaries ) { + + gamutMapping = ''; + + } else if ( workingPrimaries === P3Primaries && encodingPrimaries === Rec709Primaries ) { + + gamutMapping = 'LinearDisplayP3ToLinearSRGB'; + + } else if ( workingPrimaries === Rec709Primaries && encodingPrimaries === P3Primaries ) { + + gamutMapping = 'LinearSRGBToLinearDisplayP3'; + + } + + switch ( colorSpace ) { + + case LinearSRGBColorSpace: + case LinearDisplayP3ColorSpace: + return [ gamutMapping, 'LinearTransferOETF' ]; + + case SRGBColorSpace: + case DisplayP3ColorSpace: + return [ gamutMapping, 'sRGBTransferOETF' ]; + + default: + console.warn( 'THREE.WebGLProgram: Unsupported color space:', colorSpace ); + return [ gamutMapping, 'LinearTransferOETF' ]; + + } + +} + +function getShaderErrors( gl, shader, type ) { + + const status = gl.getShaderParameter( shader, gl.COMPILE_STATUS ); + const errors = gl.getShaderInfoLog( shader ).trim(); + + if ( status && errors === '' ) return ''; + + const errorMatches = /ERROR: 0:(\d+)/.exec( errors ); + if ( errorMatches ) { + + // --enable-privileged-webgl-extension + // console.log( '**' + type + '**', gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) ); + + const errorLine = parseInt( errorMatches[ 1 ] ); + return type.toUpperCase() + '\n\n' + errors + '\n\n' + handleSource( gl.getShaderSource( shader ), errorLine ); + + } else { + + return errors; + + } + +} + +function getTexelEncodingFunction( functionName, colorSpace ) { + + const components = getEncodingComponents( colorSpace ); + return `vec4 ${functionName}( vec4 value ) { return ${components[ 0 ]}( ${components[ 1 ]}( value ) ); }`; + +} + +function getToneMappingFunction( functionName, toneMapping ) { + + let toneMappingName; + + switch ( toneMapping ) { + + case LinearToneMapping: + toneMappingName = 'Linear'; + break; + + case ReinhardToneMapping: + toneMappingName = 'Reinhard'; + break; + + case CineonToneMapping: + toneMappingName = 'OptimizedCineon'; + break; + + case ACESFilmicToneMapping: + toneMappingName = 'ACESFilmic'; + break; + + case AgXToneMapping: + toneMappingName = 'AgX'; + break; + + case NeutralToneMapping: + toneMappingName = 'Neutral'; + break; + + case CustomToneMapping: + toneMappingName = 'Custom'; + break; + + default: + console.warn( 'THREE.WebGLProgram: Unsupported toneMapping:', toneMapping ); + toneMappingName = 'Linear'; + + } + + return 'vec3 ' + functionName + '( vec3 color ) { return ' + toneMappingName + 'ToneMapping( color ); }'; + +} + +function generateVertexExtensions( parameters ) { + + const chunks = [ + parameters.extensionClipCullDistance ? '#extension GL_ANGLE_clip_cull_distance : require' : '', + parameters.extensionMultiDraw ? '#extension GL_ANGLE_multi_draw : require' : '', + ]; + + return chunks.filter( filterEmptyLine ).join( '\n' ); + +} + +function generateDefines( defines ) { + + const chunks = []; + + for ( const name in defines ) { + + const value = defines[ name ]; + + if ( value === false ) continue; + + chunks.push( '#define ' + name + ' ' + value ); + + } + + return chunks.join( '\n' ); + +} + +function fetchAttributeLocations( gl, program ) { + + const attributes = {}; + + const n = gl.getProgramParameter( program, gl.ACTIVE_ATTRIBUTES ); + + for ( let i = 0; i < n; i ++ ) { + + const info = gl.getActiveAttrib( program, i ); + const name = info.name; + + let locationSize = 1; + if ( info.type === gl.FLOAT_MAT2 ) locationSize = 2; + if ( info.type === gl.FLOAT_MAT3 ) locationSize = 3; + if ( info.type === gl.FLOAT_MAT4 ) locationSize = 4; + + // console.log( 'THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:', name, i ); + + attributes[ name ] = { + type: info.type, + location: gl.getAttribLocation( program, name ), + locationSize: locationSize + }; + + } + + return attributes; + +} + +function filterEmptyLine( string ) { + + return string !== ''; + +} + +function replaceLightNums( string, parameters ) { + + const numSpotLightCoords = parameters.numSpotLightShadows + parameters.numSpotLightMaps - parameters.numSpotLightShadowsWithMaps; + + return string + .replace( /NUM_DIR_LIGHTS/g, parameters.numDirLights ) + .replace( /NUM_SPOT_LIGHTS/g, parameters.numSpotLights ) + .replace( /NUM_SPOT_LIGHT_MAPS/g, parameters.numSpotLightMaps ) + .replace( /NUM_SPOT_LIGHT_COORDS/g, numSpotLightCoords ) + .replace( /NUM_RECT_AREA_LIGHTS/g, parameters.numRectAreaLights ) + .replace( /NUM_POINT_LIGHTS/g, parameters.numPointLights ) + .replace( /NUM_HEMI_LIGHTS/g, parameters.numHemiLights ) + .replace( /NUM_DIR_LIGHT_SHADOWS/g, parameters.numDirLightShadows ) + .replace( /NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g, parameters.numSpotLightShadowsWithMaps ) + .replace( /NUM_SPOT_LIGHT_SHADOWS/g, parameters.numSpotLightShadows ) + .replace( /NUM_POINT_LIGHT_SHADOWS/g, parameters.numPointLightShadows ); + +} + +function replaceClippingPlaneNums( string, parameters ) { + + return string + .replace( /NUM_CLIPPING_PLANES/g, parameters.numClippingPlanes ) + .replace( /UNION_CLIPPING_PLANES/g, ( parameters.numClippingPlanes - parameters.numClipIntersection ) ); + +} + +// Resolve Includes + +const includePattern = /^[ \t]*#include +<([\w\d./]+)>/gm; + +function resolveIncludes( string ) { + + return string.replace( includePattern, includeReplacer ); + +} + +const shaderChunkMap = new Map(); + +function includeReplacer( match, include ) { + + let string = ShaderChunk[ include ]; + + if ( string === undefined ) { + + const newInclude = shaderChunkMap.get( include ); + + if ( newInclude !== undefined ) { + + string = ShaderChunk[ newInclude ]; + console.warn( 'THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.', include, newInclude ); + + } else { + + throw new Error( 'Can not resolve #include <' + include + '>' ); + + } + + } + + return resolveIncludes( string ); + +} + +// Unroll Loops + +const unrollLoopPattern = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g; + +function unrollLoops( string ) { + + return string.replace( unrollLoopPattern, loopReplacer ); + +} + +function loopReplacer( match, start, end, snippet ) { + + let string = ''; + + for ( let i = parseInt( start ); i < parseInt( end ); i ++ ) { + + string += snippet + .replace( /\[\s*i\s*\]/g, '[ ' + i + ' ]' ) + .replace( /UNROLLED_LOOP_INDEX/g, i ); + + } + + return string; + +} + +// + +function generatePrecision( parameters ) { + + let precisionstring = `precision ${parameters.precision} float; + precision ${parameters.precision} int; + precision ${parameters.precision} sampler2D; + precision ${parameters.precision} samplerCube; + precision ${parameters.precision} sampler3D; + precision ${parameters.precision} sampler2DArray; + precision ${parameters.precision} sampler2DShadow; + precision ${parameters.precision} samplerCubeShadow; + precision ${parameters.precision} sampler2DArrayShadow; + precision ${parameters.precision} isampler2D; + precision ${parameters.precision} isampler3D; + precision ${parameters.precision} isamplerCube; + precision ${parameters.precision} isampler2DArray; + precision ${parameters.precision} usampler2D; + precision ${parameters.precision} usampler3D; + precision ${parameters.precision} usamplerCube; + precision ${parameters.precision} usampler2DArray; + `; + + if ( parameters.precision === 'highp' ) { + + precisionstring += '\n#define HIGH_PRECISION'; + + } else if ( parameters.precision === 'mediump' ) { + + precisionstring += '\n#define MEDIUM_PRECISION'; + + } else if ( parameters.precision === 'lowp' ) { + + precisionstring += '\n#define LOW_PRECISION'; + + } + + return precisionstring; + +} + +function generateShadowMapTypeDefine( parameters ) { + + let shadowMapTypeDefine = 'SHADOWMAP_TYPE_BASIC'; + + if ( parameters.shadowMapType === PCFShadowMap ) { + + shadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF'; + + } else if ( parameters.shadowMapType === PCFSoftShadowMap ) { + + shadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF_SOFT'; + + } else if ( parameters.shadowMapType === VSMShadowMap ) { + + shadowMapTypeDefine = 'SHADOWMAP_TYPE_VSM'; + + } + + return shadowMapTypeDefine; + +} + +function generateEnvMapTypeDefine( parameters ) { + + let envMapTypeDefine = 'ENVMAP_TYPE_CUBE'; + + if ( parameters.envMap ) { + + switch ( parameters.envMapMode ) { + + case CubeReflectionMapping: + case CubeRefractionMapping: + envMapTypeDefine = 'ENVMAP_TYPE_CUBE'; + break; + + case CubeUVReflectionMapping: + envMapTypeDefine = 'ENVMAP_TYPE_CUBE_UV'; + break; + + } + + } + + return envMapTypeDefine; + +} + +function generateEnvMapModeDefine( parameters ) { + + let envMapModeDefine = 'ENVMAP_MODE_REFLECTION'; + + if ( parameters.envMap ) { + + switch ( parameters.envMapMode ) { + + case CubeRefractionMapping: + + envMapModeDefine = 'ENVMAP_MODE_REFRACTION'; + break; + + } + + } + + return envMapModeDefine; + +} + +function generateEnvMapBlendingDefine( parameters ) { + + let envMapBlendingDefine = 'ENVMAP_BLENDING_NONE'; + + if ( parameters.envMap ) { + + switch ( parameters.combine ) { + + case MultiplyOperation: + envMapBlendingDefine = 'ENVMAP_BLENDING_MULTIPLY'; + break; + + case MixOperation: + envMapBlendingDefine = 'ENVMAP_BLENDING_MIX'; + break; + + case AddOperation: + envMapBlendingDefine = 'ENVMAP_BLENDING_ADD'; + break; + + } + + } + + return envMapBlendingDefine; + +} + +function generateCubeUVSize( parameters ) { + + const imageHeight = parameters.envMapCubeUVHeight; + + if ( imageHeight === null ) return null; + + const maxMip = Math.log2( imageHeight ) - 2; + + const texelHeight = 1.0 / imageHeight; + + const texelWidth = 1.0 / ( 3 * Math.max( Math.pow( 2, maxMip ), 7 * 16 ) ); + + return { texelWidth, texelHeight, maxMip }; + +} + +function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) { + + // TODO Send this event to Three.js DevTools + // console.log( 'WebGLProgram', cacheKey ); + + const gl = renderer.getContext(); + + const defines = parameters.defines; + + let vertexShader = parameters.vertexShader; + let fragmentShader = parameters.fragmentShader; + + const shadowMapTypeDefine = generateShadowMapTypeDefine( parameters ); + const envMapTypeDefine = generateEnvMapTypeDefine( parameters ); + const envMapModeDefine = generateEnvMapModeDefine( parameters ); + const envMapBlendingDefine = generateEnvMapBlendingDefine( parameters ); + const envMapCubeUVSize = generateCubeUVSize( parameters ); + + const customVertexExtensions = generateVertexExtensions( parameters ); + + const customDefines = generateDefines( defines ); + + const program = gl.createProgram(); + + let prefixVertex, prefixFragment; + let versionString = parameters.glslVersion ? '#version ' + parameters.glslVersion + '\n' : ''; + + if ( parameters.isRawShaderMaterial ) { + + prefixVertex = [ + + '#define SHADER_TYPE ' + parameters.shaderType, + '#define SHADER_NAME ' + parameters.shaderName, + + customDefines + + ].filter( filterEmptyLine ).join( '\n' ); + + if ( prefixVertex.length > 0 ) { + + prefixVertex += '\n'; + + } + + prefixFragment = [ + + '#define SHADER_TYPE ' + parameters.shaderType, + '#define SHADER_NAME ' + parameters.shaderName, + + customDefines + + ].filter( filterEmptyLine ).join( '\n' ); + + if ( prefixFragment.length > 0 ) { + + prefixFragment += '\n'; + + } + + } else { + + prefixVertex = [ + + generatePrecision( parameters ), + + '#define SHADER_TYPE ' + parameters.shaderType, + '#define SHADER_NAME ' + parameters.shaderName, + + customDefines, + + parameters.extensionClipCullDistance ? '#define USE_CLIP_DISTANCE' : '', + parameters.batching ? '#define USE_BATCHING' : '', + parameters.instancing ? '#define USE_INSTANCING' : '', + parameters.instancingColor ? '#define USE_INSTANCING_COLOR' : '', + parameters.instancingMorph ? '#define USE_INSTANCING_MORPH' : '', + + parameters.useFog && parameters.fog ? '#define USE_FOG' : '', + parameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '', + + parameters.map ? '#define USE_MAP' : '', + parameters.envMap ? '#define USE_ENVMAP' : '', + parameters.envMap ? '#define ' + envMapModeDefine : '', + parameters.lightMap ? '#define USE_LIGHTMAP' : '', + parameters.aoMap ? '#define USE_AOMAP' : '', + parameters.bumpMap ? '#define USE_BUMPMAP' : '', + parameters.normalMap ? '#define USE_NORMALMAP' : '', + parameters.normalMapObjectSpace ? '#define USE_NORMALMAP_OBJECTSPACE' : '', + parameters.normalMapTangentSpace ? '#define USE_NORMALMAP_TANGENTSPACE' : '', + parameters.displacementMap ? '#define USE_DISPLACEMENTMAP' : '', + parameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '', + + parameters.anisotropy ? '#define USE_ANISOTROPY' : '', + parameters.anisotropyMap ? '#define USE_ANISOTROPYMAP' : '', + + parameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', + parameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', + parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', + + parameters.iridescenceMap ? '#define USE_IRIDESCENCEMAP' : '', + parameters.iridescenceThicknessMap ? '#define USE_IRIDESCENCE_THICKNESSMAP' : '', + + parameters.specularMap ? '#define USE_SPECULARMAP' : '', + parameters.specularColorMap ? '#define USE_SPECULAR_COLORMAP' : '', + parameters.specularIntensityMap ? '#define USE_SPECULAR_INTENSITYMAP' : '', + + parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', + parameters.metalnessMap ? '#define USE_METALNESSMAP' : '', + parameters.alphaMap ? '#define USE_ALPHAMAP' : '', + parameters.alphaHash ? '#define USE_ALPHAHASH' : '', + + parameters.transmission ? '#define USE_TRANSMISSION' : '', + parameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', + parameters.thicknessMap ? '#define USE_THICKNESSMAP' : '', + + parameters.sheenColorMap ? '#define USE_SHEEN_COLORMAP' : '', + parameters.sheenRoughnessMap ? '#define USE_SHEEN_ROUGHNESSMAP' : '', + + // + + parameters.mapUv ? '#define MAP_UV ' + parameters.mapUv : '', + parameters.alphaMapUv ? '#define ALPHAMAP_UV ' + parameters.alphaMapUv : '', + parameters.lightMapUv ? '#define LIGHTMAP_UV ' + parameters.lightMapUv : '', + parameters.aoMapUv ? '#define AOMAP_UV ' + parameters.aoMapUv : '', + parameters.emissiveMapUv ? '#define EMISSIVEMAP_UV ' + parameters.emissiveMapUv : '', + parameters.bumpMapUv ? '#define BUMPMAP_UV ' + parameters.bumpMapUv : '', + parameters.normalMapUv ? '#define NORMALMAP_UV ' + parameters.normalMapUv : '', + parameters.displacementMapUv ? '#define DISPLACEMENTMAP_UV ' + parameters.displacementMapUv : '', + + parameters.metalnessMapUv ? '#define METALNESSMAP_UV ' + parameters.metalnessMapUv : '', + parameters.roughnessMapUv ? '#define ROUGHNESSMAP_UV ' + parameters.roughnessMapUv : '', + + parameters.anisotropyMapUv ? '#define ANISOTROPYMAP_UV ' + parameters.anisotropyMapUv : '', + + parameters.clearcoatMapUv ? '#define CLEARCOATMAP_UV ' + parameters.clearcoatMapUv : '', + parameters.clearcoatNormalMapUv ? '#define CLEARCOAT_NORMALMAP_UV ' + parameters.clearcoatNormalMapUv : '', + parameters.clearcoatRoughnessMapUv ? '#define CLEARCOAT_ROUGHNESSMAP_UV ' + parameters.clearcoatRoughnessMapUv : '', + + parameters.iridescenceMapUv ? '#define IRIDESCENCEMAP_UV ' + parameters.iridescenceMapUv : '', + parameters.iridescenceThicknessMapUv ? '#define IRIDESCENCE_THICKNESSMAP_UV ' + parameters.iridescenceThicknessMapUv : '', + + parameters.sheenColorMapUv ? '#define SHEEN_COLORMAP_UV ' + parameters.sheenColorMapUv : '', + parameters.sheenRoughnessMapUv ? '#define SHEEN_ROUGHNESSMAP_UV ' + parameters.sheenRoughnessMapUv : '', + + parameters.specularMapUv ? '#define SPECULARMAP_UV ' + parameters.specularMapUv : '', + parameters.specularColorMapUv ? '#define SPECULAR_COLORMAP_UV ' + parameters.specularColorMapUv : '', + parameters.specularIntensityMapUv ? '#define SPECULAR_INTENSITYMAP_UV ' + parameters.specularIntensityMapUv : '', + + parameters.transmissionMapUv ? '#define TRANSMISSIONMAP_UV ' + parameters.transmissionMapUv : '', + parameters.thicknessMapUv ? '#define THICKNESSMAP_UV ' + parameters.thicknessMapUv : '', + + // + + parameters.vertexTangents && parameters.flatShading === false ? '#define USE_TANGENT' : '', + parameters.vertexColors ? '#define USE_COLOR' : '', + parameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '', + parameters.vertexUv1s ? '#define USE_UV1' : '', + parameters.vertexUv2s ? '#define USE_UV2' : '', + parameters.vertexUv3s ? '#define USE_UV3' : '', + + parameters.pointsUvs ? '#define USE_POINTS_UV' : '', + + parameters.flatShading ? '#define FLAT_SHADED' : '', + + parameters.skinning ? '#define USE_SKINNING' : '', + + parameters.morphTargets ? '#define USE_MORPHTARGETS' : '', + parameters.morphNormals && parameters.flatShading === false ? '#define USE_MORPHNORMALS' : '', + ( parameters.morphColors ) ? '#define USE_MORPHCOLORS' : '', + ( parameters.morphTargetsCount > 0 ) ? '#define MORPHTARGETS_TEXTURE' : '', + ( parameters.morphTargetsCount > 0 ) ? '#define MORPHTARGETS_TEXTURE_STRIDE ' + parameters.morphTextureStride : '', + ( parameters.morphTargetsCount > 0 ) ? '#define MORPHTARGETS_COUNT ' + parameters.morphTargetsCount : '', + parameters.doubleSided ? '#define DOUBLE_SIDED' : '', + parameters.flipSided ? '#define FLIP_SIDED' : '', + + parameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', + parameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '', + + parameters.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '', + + parameters.numLightProbes > 0 ? '#define USE_LIGHT_PROBES' : '', + + parameters.useLegacyLights ? '#define LEGACY_LIGHTS' : '', + + parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', + + 'uniform mat4 modelMatrix;', + 'uniform mat4 modelViewMatrix;', + 'uniform mat4 projectionMatrix;', + 'uniform mat4 viewMatrix;', + 'uniform mat3 normalMatrix;', + 'uniform vec3 cameraPosition;', + 'uniform bool isOrthographic;', + + '#ifdef USE_INSTANCING', + + ' attribute mat4 instanceMatrix;', + + '#endif', + + '#ifdef USE_INSTANCING_COLOR', + + ' attribute vec3 instanceColor;', + + '#endif', + + '#ifdef USE_INSTANCING_MORPH', + + ' uniform sampler2D morphTexture;', + + '#endif', + + 'attribute vec3 position;', + 'attribute vec3 normal;', + 'attribute vec2 uv;', + + '#ifdef USE_UV1', + + ' attribute vec2 uv1;', + + '#endif', + + '#ifdef USE_UV2', + + ' attribute vec2 uv2;', + + '#endif', + + '#ifdef USE_UV3', + + ' attribute vec2 uv3;', + + '#endif', + + '#ifdef USE_TANGENT', + + ' attribute vec4 tangent;', + + '#endif', + + '#if defined( USE_COLOR_ALPHA )', + + ' attribute vec4 color;', + + '#elif defined( USE_COLOR )', + + ' attribute vec3 color;', + + '#endif', + + '#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )', + + ' attribute vec3 morphTarget0;', + ' attribute vec3 morphTarget1;', + ' attribute vec3 morphTarget2;', + ' attribute vec3 morphTarget3;', + + ' #ifdef USE_MORPHNORMALS', + + ' attribute vec3 morphNormal0;', + ' attribute vec3 morphNormal1;', + ' attribute vec3 morphNormal2;', + ' attribute vec3 morphNormal3;', + + ' #else', + + ' attribute vec3 morphTarget4;', + ' attribute vec3 morphTarget5;', + ' attribute vec3 morphTarget6;', + ' attribute vec3 morphTarget7;', + + ' #endif', + + '#endif', + + '#ifdef USE_SKINNING', + + ' attribute vec4 skinIndex;', + ' attribute vec4 skinWeight;', + + '#endif', + + '\n' + + ].filter( filterEmptyLine ).join( '\n' ); + + prefixFragment = [ + + generatePrecision( parameters ), + + '#define SHADER_TYPE ' + parameters.shaderType, + '#define SHADER_NAME ' + parameters.shaderName, + + customDefines, + + parameters.useFog && parameters.fog ? '#define USE_FOG' : '', + parameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '', + + parameters.alphaToCoverage ? '#define ALPHA_TO_COVERAGE' : '', + parameters.map ? '#define USE_MAP' : '', + parameters.matcap ? '#define USE_MATCAP' : '', + parameters.envMap ? '#define USE_ENVMAP' : '', + parameters.envMap ? '#define ' + envMapTypeDefine : '', + parameters.envMap ? '#define ' + envMapModeDefine : '', + parameters.envMap ? '#define ' + envMapBlendingDefine : '', + envMapCubeUVSize ? '#define CUBEUV_TEXEL_WIDTH ' + envMapCubeUVSize.texelWidth : '', + envMapCubeUVSize ? '#define CUBEUV_TEXEL_HEIGHT ' + envMapCubeUVSize.texelHeight : '', + envMapCubeUVSize ? '#define CUBEUV_MAX_MIP ' + envMapCubeUVSize.maxMip + '.0' : '', + parameters.lightMap ? '#define USE_LIGHTMAP' : '', + parameters.aoMap ? '#define USE_AOMAP' : '', + parameters.bumpMap ? '#define USE_BUMPMAP' : '', + parameters.normalMap ? '#define USE_NORMALMAP' : '', + parameters.normalMapObjectSpace ? '#define USE_NORMALMAP_OBJECTSPACE' : '', + parameters.normalMapTangentSpace ? '#define USE_NORMALMAP_TANGENTSPACE' : '', + parameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '', + + parameters.anisotropy ? '#define USE_ANISOTROPY' : '', + parameters.anisotropyMap ? '#define USE_ANISOTROPYMAP' : '', + + parameters.clearcoat ? '#define USE_CLEARCOAT' : '', + parameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', + parameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', + parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', + + parameters.dispersion ? '#define USE_DISPERSION' : '', + + parameters.iridescence ? '#define USE_IRIDESCENCE' : '', + parameters.iridescenceMap ? '#define USE_IRIDESCENCEMAP' : '', + parameters.iridescenceThicknessMap ? '#define USE_IRIDESCENCE_THICKNESSMAP' : '', + + parameters.specularMap ? '#define USE_SPECULARMAP' : '', + parameters.specularColorMap ? '#define USE_SPECULAR_COLORMAP' : '', + parameters.specularIntensityMap ? '#define USE_SPECULAR_INTENSITYMAP' : '', + + parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', + parameters.metalnessMap ? '#define USE_METALNESSMAP' : '', + + parameters.alphaMap ? '#define USE_ALPHAMAP' : '', + parameters.alphaTest ? '#define USE_ALPHATEST' : '', + parameters.alphaHash ? '#define USE_ALPHAHASH' : '', + + parameters.sheen ? '#define USE_SHEEN' : '', + parameters.sheenColorMap ? '#define USE_SHEEN_COLORMAP' : '', + parameters.sheenRoughnessMap ? '#define USE_SHEEN_ROUGHNESSMAP' : '', + + parameters.transmission ? '#define USE_TRANSMISSION' : '', + parameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', + parameters.thicknessMap ? '#define USE_THICKNESSMAP' : '', + + parameters.vertexTangents && parameters.flatShading === false ? '#define USE_TANGENT' : '', + parameters.vertexColors || parameters.instancingColor ? '#define USE_COLOR' : '', + parameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '', + parameters.vertexUv1s ? '#define USE_UV1' : '', + parameters.vertexUv2s ? '#define USE_UV2' : '', + parameters.vertexUv3s ? '#define USE_UV3' : '', + + parameters.pointsUvs ? '#define USE_POINTS_UV' : '', + + parameters.gradientMap ? '#define USE_GRADIENTMAP' : '', + + parameters.flatShading ? '#define FLAT_SHADED' : '', + + parameters.doubleSided ? '#define DOUBLE_SIDED' : '', + parameters.flipSided ? '#define FLIP_SIDED' : '', + + parameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', + parameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '', + + parameters.premultipliedAlpha ? '#define PREMULTIPLIED_ALPHA' : '', + + parameters.numLightProbes > 0 ? '#define USE_LIGHT_PROBES' : '', + + parameters.useLegacyLights ? '#define LEGACY_LIGHTS' : '', + + parameters.decodeVideoTexture ? '#define DECODE_VIDEO_TEXTURE' : '', + + parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', + + 'uniform mat4 viewMatrix;', + 'uniform vec3 cameraPosition;', + 'uniform bool isOrthographic;', + + ( parameters.toneMapping !== NoToneMapping ) ? '#define TONE_MAPPING' : '', + ( parameters.toneMapping !== NoToneMapping ) ? ShaderChunk[ 'tonemapping_pars_fragment' ] : '', // this code is required here because it is used by the toneMapping() function defined below + ( parameters.toneMapping !== NoToneMapping ) ? getToneMappingFunction( 'toneMapping', parameters.toneMapping ) : '', + + parameters.dithering ? '#define DITHERING' : '', + parameters.opaque ? '#define OPAQUE' : '', + + ShaderChunk[ 'colorspace_pars_fragment' ], // this code is required here because it is used by the various encoding/decoding function defined below + getTexelEncodingFunction( 'linearToOutputTexel', parameters.outputColorSpace ), + + parameters.useDepthPacking ? '#define DEPTH_PACKING ' + parameters.depthPacking : '', + + '\n' + + ].filter( filterEmptyLine ).join( '\n' ); + + } + + vertexShader = resolveIncludes( vertexShader ); + vertexShader = replaceLightNums( vertexShader, parameters ); + vertexShader = replaceClippingPlaneNums( vertexShader, parameters ); + + fragmentShader = resolveIncludes( fragmentShader ); + fragmentShader = replaceLightNums( fragmentShader, parameters ); + fragmentShader = replaceClippingPlaneNums( fragmentShader, parameters ); + + vertexShader = unrollLoops( vertexShader ); + fragmentShader = unrollLoops( fragmentShader ); + + if ( parameters.isRawShaderMaterial !== true ) { + + // GLSL 3.0 conversion for built-in materials and ShaderMaterial + + versionString = '#version 300 es\n'; + + prefixVertex = [ + customVertexExtensions, + '#define attribute in', + '#define varying out', + '#define texture2D texture' + ].join( '\n' ) + '\n' + prefixVertex; + + prefixFragment = [ + '#define varying in', + ( parameters.glslVersion === GLSL3 ) ? '' : 'layout(location = 0) out highp vec4 pc_fragColor;', + ( parameters.glslVersion === GLSL3 ) ? '' : '#define gl_FragColor pc_fragColor', + '#define gl_FragDepthEXT gl_FragDepth', + '#define texture2D texture', + '#define textureCube texture', + '#define texture2DProj textureProj', + '#define texture2DLodEXT textureLod', + '#define texture2DProjLodEXT textureProjLod', + '#define textureCubeLodEXT textureLod', + '#define texture2DGradEXT textureGrad', + '#define texture2DProjGradEXT textureProjGrad', + '#define textureCubeGradEXT textureGrad' + ].join( '\n' ) + '\n' + prefixFragment; + + } + + const vertexGlsl = versionString + prefixVertex + vertexShader; + const fragmentGlsl = versionString + prefixFragment + fragmentShader; + + // console.log( '*VERTEX*', vertexGlsl ); + // console.log( '*FRAGMENT*', fragmentGlsl ); + + const glVertexShader = WebGLShader( gl, gl.VERTEX_SHADER, vertexGlsl ); + const glFragmentShader = WebGLShader( gl, gl.FRAGMENT_SHADER, fragmentGlsl ); + + gl.attachShader( program, glVertexShader ); + gl.attachShader( program, glFragmentShader ); + + // Force a particular attribute to index 0. + + if ( parameters.index0AttributeName !== undefined ) { + + gl.bindAttribLocation( program, 0, parameters.index0AttributeName ); + + } else if ( parameters.morphTargets === true ) { + + // programs with morphTargets displace position out of attribute 0 + gl.bindAttribLocation( program, 0, 'position' ); + + } + + gl.linkProgram( program ); + + function onFirstUse( self ) { + + // check for link errors + if ( renderer.debug.checkShaderErrors ) { + + const programLog = gl.getProgramInfoLog( program ).trim(); + const vertexLog = gl.getShaderInfoLog( glVertexShader ).trim(); + const fragmentLog = gl.getShaderInfoLog( glFragmentShader ).trim(); + + let runnable = true; + let haveDiagnostics = true; + + if ( gl.getProgramParameter( program, gl.LINK_STATUS ) === false ) { + + runnable = false; + + if ( typeof renderer.debug.onShaderError === 'function' ) { + + renderer.debug.onShaderError( gl, program, glVertexShader, glFragmentShader ); + + } else { + + // default error reporting + + const vertexErrors = getShaderErrors( gl, glVertexShader, 'vertex' ); + const fragmentErrors = getShaderErrors( gl, glFragmentShader, 'fragment' ); + + console.error( + 'THREE.WebGLProgram: Shader Error ' + gl.getError() + ' - ' + + 'VALIDATE_STATUS ' + gl.getProgramParameter( program, gl.VALIDATE_STATUS ) + '\n\n' + + 'Material Name: ' + self.name + '\n' + + 'Material Type: ' + self.type + '\n\n' + + 'Program Info Log: ' + programLog + '\n' + + vertexErrors + '\n' + + fragmentErrors + ); + + } + + } else if ( programLog !== '' ) { + + console.warn( 'THREE.WebGLProgram: Program Info Log:', programLog ); + + } else if ( vertexLog === '' || fragmentLog === '' ) { + + haveDiagnostics = false; + + } + + if ( haveDiagnostics ) { + + self.diagnostics = { + + runnable: runnable, + + programLog: programLog, + + vertexShader: { + + log: vertexLog, + prefix: prefixVertex + + }, + + fragmentShader: { + + log: fragmentLog, + prefix: prefixFragment + + } + + }; + + } + + } + + // Clean up + + // Crashes in iOS9 and iOS10. #18402 + // gl.detachShader( program, glVertexShader ); + // gl.detachShader( program, glFragmentShader ); + + gl.deleteShader( glVertexShader ); + gl.deleteShader( glFragmentShader ); + + cachedUniforms = new WebGLUniforms( gl, program ); + cachedAttributes = fetchAttributeLocations( gl, program ); + + } + + // set up caching for uniform locations + + let cachedUniforms; + + this.getUniforms = function () { + + if ( cachedUniforms === undefined ) { + + // Populates cachedUniforms and cachedAttributes + onFirstUse( this ); + + } + + return cachedUniforms; + + }; + + // set up caching for attribute locations + + let cachedAttributes; + + this.getAttributes = function () { + + if ( cachedAttributes === undefined ) { + + // Populates cachedAttributes and cachedUniforms + onFirstUse( this ); + + } + + return cachedAttributes; + + }; + + // indicate when the program is ready to be used. if the KHR_parallel_shader_compile extension isn't supported, + // flag the program as ready immediately. It may cause a stall when it's first used. + + let programReady = ( parameters.rendererExtensionParallelShaderCompile === false ); + + this.isReady = function () { + + if ( programReady === false ) { + + programReady = gl.getProgramParameter( program, COMPLETION_STATUS_KHR ); + + } + + return programReady; + + }; + + // free resource + + this.destroy = function () { + + bindingStates.releaseStatesOfProgram( this ); + + gl.deleteProgram( program ); + this.program = undefined; + + }; + + // + + this.type = parameters.shaderType; + this.name = parameters.shaderName; + this.id = programIdCount ++; + this.cacheKey = cacheKey; + this.usedTimes = 1; + this.program = program; + this.vertexShader = glVertexShader; + this.fragmentShader = glFragmentShader; + + return this; + +} + +let _id$1 = 0; + +class WebGLShaderCache { + + constructor() { + + this.shaderCache = new Map(); + this.materialCache = new Map(); + + } + + update( material ) { + + const vertexShader = material.vertexShader; + const fragmentShader = material.fragmentShader; + + const vertexShaderStage = this._getShaderStage( vertexShader ); + const fragmentShaderStage = this._getShaderStage( fragmentShader ); + + const materialShaders = this._getShaderCacheForMaterial( material ); + + if ( materialShaders.has( vertexShaderStage ) === false ) { + + materialShaders.add( vertexShaderStage ); + vertexShaderStage.usedTimes ++; + + } + + if ( materialShaders.has( fragmentShaderStage ) === false ) { + + materialShaders.add( fragmentShaderStage ); + fragmentShaderStage.usedTimes ++; + + } + + return this; + + } + + remove( material ) { + + const materialShaders = this.materialCache.get( material ); + + for ( const shaderStage of materialShaders ) { + + shaderStage.usedTimes --; + + if ( shaderStage.usedTimes === 0 ) this.shaderCache.delete( shaderStage.code ); + + } + + this.materialCache.delete( material ); + + return this; + + } + + getVertexShaderID( material ) { + + return this._getShaderStage( material.vertexShader ).id; + + } + + getFragmentShaderID( material ) { + + return this._getShaderStage( material.fragmentShader ).id; + + } + + dispose() { + + this.shaderCache.clear(); + this.materialCache.clear(); + + } + + _getShaderCacheForMaterial( material ) { + + const cache = this.materialCache; + let set = cache.get( material ); + + if ( set === undefined ) { + + set = new Set(); + cache.set( material, set ); + + } + + return set; + + } + + _getShaderStage( code ) { + + const cache = this.shaderCache; + let stage = cache.get( code ); + + if ( stage === undefined ) { + + stage = new WebGLShaderStage( code ); + cache.set( code, stage ); + + } + + return stage; + + } + +} + +class WebGLShaderStage { + + constructor( code ) { + + this.id = _id$1 ++; + + this.code = code; + this.usedTimes = 0; + + } + +} + +function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping ) { + + const _programLayers = new Layers(); + const _customShaders = new WebGLShaderCache(); + const _activeChannels = new Set(); + const programs = []; + + const logarithmicDepthBuffer = capabilities.logarithmicDepthBuffer; + const SUPPORTS_VERTEX_TEXTURES = capabilities.vertexTextures; + + let precision = capabilities.precision; + + const shaderIDs = { + MeshDepthMaterial: 'depth', + MeshDistanceMaterial: 'distanceRGBA', + MeshNormalMaterial: 'normal', + MeshBasicMaterial: 'basic', + MeshLambertMaterial: 'lambert', + MeshPhongMaterial: 'phong', + MeshToonMaterial: 'toon', + MeshStandardMaterial: 'physical', + MeshPhysicalMaterial: 'physical', + MeshMatcapMaterial: 'matcap', + LineBasicMaterial: 'basic', + LineDashedMaterial: 'dashed', + PointsMaterial: 'points', + ShadowMaterial: 'shadow', + SpriteMaterial: 'sprite' + }; + + function getChannel( value ) { + + _activeChannels.add( value ); + + if ( value === 0 ) return 'uv'; + + return `uv${ value }`; + + } + + function getParameters( material, lights, shadows, scene, object ) { + + const fog = scene.fog; + const geometry = object.geometry; + const environment = material.isMeshStandardMaterial ? scene.environment : null; + + const envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || environment ); + const envMapCubeUVHeight = ( !! envMap ) && ( envMap.mapping === CubeUVReflectionMapping ) ? envMap.image.height : null; + + const shaderID = shaderIDs[ material.type ]; + + // heuristics to create shader parameters according to lights in the scene + // (not to blow over maxLights budget) + + if ( material.precision !== null ) { + + precision = capabilities.getMaxPrecision( material.precision ); + + if ( precision !== material.precision ) { + + console.warn( 'THREE.WebGLProgram.getParameters:', material.precision, 'not supported, using', precision, 'instead.' ); + + } + + } + + // + + const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color; + const morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0; + + let morphTextureStride = 0; + + if ( geometry.morphAttributes.position !== undefined ) morphTextureStride = 1; + if ( geometry.morphAttributes.normal !== undefined ) morphTextureStride = 2; + if ( geometry.morphAttributes.color !== undefined ) morphTextureStride = 3; + + // + + let vertexShader, fragmentShader; + let customVertexShaderID, customFragmentShaderID; + + if ( shaderID ) { + + const shader = ShaderLib[ shaderID ]; + + vertexShader = shader.vertexShader; + fragmentShader = shader.fragmentShader; + + } else { + + vertexShader = material.vertexShader; + fragmentShader = material.fragmentShader; + + _customShaders.update( material ); + + customVertexShaderID = _customShaders.getVertexShaderID( material ); + customFragmentShaderID = _customShaders.getFragmentShaderID( material ); + + } + + const currentRenderTarget = renderer.getRenderTarget(); + + const IS_INSTANCEDMESH = object.isInstancedMesh === true; + const IS_BATCHEDMESH = object.isBatchedMesh === true; + + const HAS_MAP = !! material.map; + const HAS_MATCAP = !! material.matcap; + const HAS_ENVMAP = !! envMap; + const HAS_AOMAP = !! material.aoMap; + const HAS_LIGHTMAP = !! material.lightMap; + const HAS_BUMPMAP = !! material.bumpMap; + const HAS_NORMALMAP = !! material.normalMap; + const HAS_DISPLACEMENTMAP = !! material.displacementMap; + const HAS_EMISSIVEMAP = !! material.emissiveMap; + + const HAS_METALNESSMAP = !! material.metalnessMap; + const HAS_ROUGHNESSMAP = !! material.roughnessMap; + + const HAS_ANISOTROPY = material.anisotropy > 0; + const HAS_CLEARCOAT = material.clearcoat > 0; + const HAS_DISPERSION = material.dispersion > 0; + const HAS_IRIDESCENCE = material.iridescence > 0; + const HAS_SHEEN = material.sheen > 0; + const HAS_TRANSMISSION = material.transmission > 0; + + const HAS_ANISOTROPYMAP = HAS_ANISOTROPY && !! material.anisotropyMap; + + const HAS_CLEARCOATMAP = HAS_CLEARCOAT && !! material.clearcoatMap; + const HAS_CLEARCOAT_NORMALMAP = HAS_CLEARCOAT && !! material.clearcoatNormalMap; + const HAS_CLEARCOAT_ROUGHNESSMAP = HAS_CLEARCOAT && !! material.clearcoatRoughnessMap; + + const HAS_IRIDESCENCEMAP = HAS_IRIDESCENCE && !! material.iridescenceMap; + const HAS_IRIDESCENCE_THICKNESSMAP = HAS_IRIDESCENCE && !! material.iridescenceThicknessMap; + + const HAS_SHEEN_COLORMAP = HAS_SHEEN && !! material.sheenColorMap; + const HAS_SHEEN_ROUGHNESSMAP = HAS_SHEEN && !! material.sheenRoughnessMap; + + const HAS_SPECULARMAP = !! material.specularMap; + const HAS_SPECULAR_COLORMAP = !! material.specularColorMap; + const HAS_SPECULAR_INTENSITYMAP = !! material.specularIntensityMap; + + const HAS_TRANSMISSIONMAP = HAS_TRANSMISSION && !! material.transmissionMap; + const HAS_THICKNESSMAP = HAS_TRANSMISSION && !! material.thicknessMap; + + const HAS_GRADIENTMAP = !! material.gradientMap; + + const HAS_ALPHAMAP = !! material.alphaMap; + + const HAS_ALPHATEST = material.alphaTest > 0; + + const HAS_ALPHAHASH = !! material.alphaHash; + + const HAS_EXTENSIONS = !! material.extensions; + + let toneMapping = NoToneMapping; + + if ( material.toneMapped ) { + + if ( currentRenderTarget === null || currentRenderTarget.isXRRenderTarget === true ) { + + toneMapping = renderer.toneMapping; + + } + + } + + const parameters = { + + shaderID: shaderID, + shaderType: material.type, + shaderName: material.name, + + vertexShader: vertexShader, + fragmentShader: fragmentShader, + defines: material.defines, + + customVertexShaderID: customVertexShaderID, + customFragmentShaderID: customFragmentShaderID, + + isRawShaderMaterial: material.isRawShaderMaterial === true, + glslVersion: material.glslVersion, + + precision: precision, + + batching: IS_BATCHEDMESH, + instancing: IS_INSTANCEDMESH, + instancingColor: IS_INSTANCEDMESH && object.instanceColor !== null, + instancingMorph: IS_INSTANCEDMESH && object.morphTexture !== null, + + supportsVertexTextures: SUPPORTS_VERTEX_TEXTURES, + outputColorSpace: ( currentRenderTarget === null ) ? renderer.outputColorSpace : ( currentRenderTarget.isXRRenderTarget === true ? currentRenderTarget.texture.colorSpace : LinearSRGBColorSpace ), + alphaToCoverage: !! material.alphaToCoverage, + + map: HAS_MAP, + matcap: HAS_MATCAP, + envMap: HAS_ENVMAP, + envMapMode: HAS_ENVMAP && envMap.mapping, + envMapCubeUVHeight: envMapCubeUVHeight, + aoMap: HAS_AOMAP, + lightMap: HAS_LIGHTMAP, + bumpMap: HAS_BUMPMAP, + normalMap: HAS_NORMALMAP, + displacementMap: SUPPORTS_VERTEX_TEXTURES && HAS_DISPLACEMENTMAP, + emissiveMap: HAS_EMISSIVEMAP, + + normalMapObjectSpace: HAS_NORMALMAP && material.normalMapType === ObjectSpaceNormalMap, + normalMapTangentSpace: HAS_NORMALMAP && material.normalMapType === TangentSpaceNormalMap, + + metalnessMap: HAS_METALNESSMAP, + roughnessMap: HAS_ROUGHNESSMAP, + + anisotropy: HAS_ANISOTROPY, + anisotropyMap: HAS_ANISOTROPYMAP, + + clearcoat: HAS_CLEARCOAT, + clearcoatMap: HAS_CLEARCOATMAP, + clearcoatNormalMap: HAS_CLEARCOAT_NORMALMAP, + clearcoatRoughnessMap: HAS_CLEARCOAT_ROUGHNESSMAP, + + dispersion: HAS_DISPERSION, + + iridescence: HAS_IRIDESCENCE, + iridescenceMap: HAS_IRIDESCENCEMAP, + iridescenceThicknessMap: HAS_IRIDESCENCE_THICKNESSMAP, + + sheen: HAS_SHEEN, + sheenColorMap: HAS_SHEEN_COLORMAP, + sheenRoughnessMap: HAS_SHEEN_ROUGHNESSMAP, + + specularMap: HAS_SPECULARMAP, + specularColorMap: HAS_SPECULAR_COLORMAP, + specularIntensityMap: HAS_SPECULAR_INTENSITYMAP, + + transmission: HAS_TRANSMISSION, + transmissionMap: HAS_TRANSMISSIONMAP, + thicknessMap: HAS_THICKNESSMAP, + + gradientMap: HAS_GRADIENTMAP, + + opaque: material.transparent === false && material.blending === NormalBlending && material.alphaToCoverage === false, + + alphaMap: HAS_ALPHAMAP, + alphaTest: HAS_ALPHATEST, + alphaHash: HAS_ALPHAHASH, + + combine: material.combine, + + // + + mapUv: HAS_MAP && getChannel( material.map.channel ), + aoMapUv: HAS_AOMAP && getChannel( material.aoMap.channel ), + lightMapUv: HAS_LIGHTMAP && getChannel( material.lightMap.channel ), + bumpMapUv: HAS_BUMPMAP && getChannel( material.bumpMap.channel ), + normalMapUv: HAS_NORMALMAP && getChannel( material.normalMap.channel ), + displacementMapUv: HAS_DISPLACEMENTMAP && getChannel( material.displacementMap.channel ), + emissiveMapUv: HAS_EMISSIVEMAP && getChannel( material.emissiveMap.channel ), + + metalnessMapUv: HAS_METALNESSMAP && getChannel( material.metalnessMap.channel ), + roughnessMapUv: HAS_ROUGHNESSMAP && getChannel( material.roughnessMap.channel ), + + anisotropyMapUv: HAS_ANISOTROPYMAP && getChannel( material.anisotropyMap.channel ), + + clearcoatMapUv: HAS_CLEARCOATMAP && getChannel( material.clearcoatMap.channel ), + clearcoatNormalMapUv: HAS_CLEARCOAT_NORMALMAP && getChannel( material.clearcoatNormalMap.channel ), + clearcoatRoughnessMapUv: HAS_CLEARCOAT_ROUGHNESSMAP && getChannel( material.clearcoatRoughnessMap.channel ), + + iridescenceMapUv: HAS_IRIDESCENCEMAP && getChannel( material.iridescenceMap.channel ), + iridescenceThicknessMapUv: HAS_IRIDESCENCE_THICKNESSMAP && getChannel( material.iridescenceThicknessMap.channel ), + + sheenColorMapUv: HAS_SHEEN_COLORMAP && getChannel( material.sheenColorMap.channel ), + sheenRoughnessMapUv: HAS_SHEEN_ROUGHNESSMAP && getChannel( material.sheenRoughnessMap.channel ), + + specularMapUv: HAS_SPECULARMAP && getChannel( material.specularMap.channel ), + specularColorMapUv: HAS_SPECULAR_COLORMAP && getChannel( material.specularColorMap.channel ), + specularIntensityMapUv: HAS_SPECULAR_INTENSITYMAP && getChannel( material.specularIntensityMap.channel ), + + transmissionMapUv: HAS_TRANSMISSIONMAP && getChannel( material.transmissionMap.channel ), + thicknessMapUv: HAS_THICKNESSMAP && getChannel( material.thicknessMap.channel ), + + alphaMapUv: HAS_ALPHAMAP && getChannel( material.alphaMap.channel ), + + // + + vertexTangents: !! geometry.attributes.tangent && ( HAS_NORMALMAP || HAS_ANISOTROPY ), + vertexColors: material.vertexColors, + vertexAlphas: material.vertexColors === true && !! geometry.attributes.color && geometry.attributes.color.itemSize === 4, + + pointsUvs: object.isPoints === true && !! geometry.attributes.uv && ( HAS_MAP || HAS_ALPHAMAP ), + + fog: !! fog, + useFog: material.fog === true, + fogExp2: ( !! fog && fog.isFogExp2 ), + + flatShading: material.flatShading === true, + + sizeAttenuation: material.sizeAttenuation === true, + logarithmicDepthBuffer: logarithmicDepthBuffer, + + skinning: object.isSkinnedMesh === true, + + morphTargets: geometry.morphAttributes.position !== undefined, + morphNormals: geometry.morphAttributes.normal !== undefined, + morphColors: geometry.morphAttributes.color !== undefined, + morphTargetsCount: morphTargetsCount, + morphTextureStride: morphTextureStride, + + numDirLights: lights.directional.length, + numPointLights: lights.point.length, + numSpotLights: lights.spot.length, + numSpotLightMaps: lights.spotLightMap.length, + numRectAreaLights: lights.rectArea.length, + numHemiLights: lights.hemi.length, + + numDirLightShadows: lights.directionalShadowMap.length, + numPointLightShadows: lights.pointShadowMap.length, + numSpotLightShadows: lights.spotShadowMap.length, + numSpotLightShadowsWithMaps: lights.numSpotLightShadowsWithMaps, + + numLightProbes: lights.numLightProbes, + + numClippingPlanes: clipping.numPlanes, + numClipIntersection: clipping.numIntersection, + + dithering: material.dithering, + + shadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0, + shadowMapType: renderer.shadowMap.type, + + toneMapping: toneMapping, + useLegacyLights: renderer._useLegacyLights, + + decodeVideoTexture: HAS_MAP && ( material.map.isVideoTexture === true ) && ( ColorManagement.getTransfer( material.map.colorSpace ) === SRGBTransfer ), + + premultipliedAlpha: material.premultipliedAlpha, + + doubleSided: material.side === DoubleSide, + flipSided: material.side === BackSide, + + useDepthPacking: material.depthPacking >= 0, + depthPacking: material.depthPacking || 0, + + index0AttributeName: material.index0AttributeName, + + extensionClipCullDistance: HAS_EXTENSIONS && material.extensions.clipCullDistance === true && extensions.has( 'WEBGL_clip_cull_distance' ), + extensionMultiDraw: HAS_EXTENSIONS && material.extensions.multiDraw === true && extensions.has( 'WEBGL_multi_draw' ), + + rendererExtensionParallelShaderCompile: extensions.has( 'KHR_parallel_shader_compile' ), + + customProgramCacheKey: material.customProgramCacheKey() + + }; + + // the usage of getChannel() determines the active texture channels for this shader + + parameters.vertexUv1s = _activeChannels.has( 1 ); + parameters.vertexUv2s = _activeChannels.has( 2 ); + parameters.vertexUv3s = _activeChannels.has( 3 ); + + _activeChannels.clear(); + + return parameters; + + } + + function getProgramCacheKey( parameters ) { + + const array = []; + + if ( parameters.shaderID ) { + + array.push( parameters.shaderID ); + + } else { + + array.push( parameters.customVertexShaderID ); + array.push( parameters.customFragmentShaderID ); + + } + + if ( parameters.defines !== undefined ) { + + for ( const name in parameters.defines ) { + + array.push( name ); + array.push( parameters.defines[ name ] ); + + } + + } + + if ( parameters.isRawShaderMaterial === false ) { + + getProgramCacheKeyParameters( array, parameters ); + getProgramCacheKeyBooleans( array, parameters ); + array.push( renderer.outputColorSpace ); + + } + + array.push( parameters.customProgramCacheKey ); + + return array.join(); + + } + + function getProgramCacheKeyParameters( array, parameters ) { + + array.push( parameters.precision ); + array.push( parameters.outputColorSpace ); + array.push( parameters.envMapMode ); + array.push( parameters.envMapCubeUVHeight ); + array.push( parameters.mapUv ); + array.push( parameters.alphaMapUv ); + array.push( parameters.lightMapUv ); + array.push( parameters.aoMapUv ); + array.push( parameters.bumpMapUv ); + array.push( parameters.normalMapUv ); + array.push( parameters.displacementMapUv ); + array.push( parameters.emissiveMapUv ); + array.push( parameters.metalnessMapUv ); + array.push( parameters.roughnessMapUv ); + array.push( parameters.anisotropyMapUv ); + array.push( parameters.clearcoatMapUv ); + array.push( parameters.clearcoatNormalMapUv ); + array.push( parameters.clearcoatRoughnessMapUv ); + array.push( parameters.iridescenceMapUv ); + array.push( parameters.iridescenceThicknessMapUv ); + array.push( parameters.sheenColorMapUv ); + array.push( parameters.sheenRoughnessMapUv ); + array.push( parameters.specularMapUv ); + array.push( parameters.specularColorMapUv ); + array.push( parameters.specularIntensityMapUv ); + array.push( parameters.transmissionMapUv ); + array.push( parameters.thicknessMapUv ); + array.push( parameters.combine ); + array.push( parameters.fogExp2 ); + array.push( parameters.sizeAttenuation ); + array.push( parameters.morphTargetsCount ); + array.push( parameters.morphAttributeCount ); + array.push( parameters.numDirLights ); + array.push( parameters.numPointLights ); + array.push( parameters.numSpotLights ); + array.push( parameters.numSpotLightMaps ); + array.push( parameters.numHemiLights ); + array.push( parameters.numRectAreaLights ); + array.push( parameters.numDirLightShadows ); + array.push( parameters.numPointLightShadows ); + array.push( parameters.numSpotLightShadows ); + array.push( parameters.numSpotLightShadowsWithMaps ); + array.push( parameters.numLightProbes ); + array.push( parameters.shadowMapType ); + array.push( parameters.toneMapping ); + array.push( parameters.numClippingPlanes ); + array.push( parameters.numClipIntersection ); + array.push( parameters.depthPacking ); + + } + + function getProgramCacheKeyBooleans( array, parameters ) { + + _programLayers.disableAll(); + + if ( parameters.supportsVertexTextures ) + _programLayers.enable( 0 ); + if ( parameters.instancing ) + _programLayers.enable( 1 ); + if ( parameters.instancingColor ) + _programLayers.enable( 2 ); + if ( parameters.instancingMorph ) + _programLayers.enable( 3 ); + if ( parameters.matcap ) + _programLayers.enable( 4 ); + if ( parameters.envMap ) + _programLayers.enable( 5 ); + if ( parameters.normalMapObjectSpace ) + _programLayers.enable( 6 ); + if ( parameters.normalMapTangentSpace ) + _programLayers.enable( 7 ); + if ( parameters.clearcoat ) + _programLayers.enable( 8 ); + if ( parameters.iridescence ) + _programLayers.enable( 9 ); + if ( parameters.alphaTest ) + _programLayers.enable( 10 ); + if ( parameters.vertexColors ) + _programLayers.enable( 11 ); + if ( parameters.vertexAlphas ) + _programLayers.enable( 12 ); + if ( parameters.vertexUv1s ) + _programLayers.enable( 13 ); + if ( parameters.vertexUv2s ) + _programLayers.enable( 14 ); + if ( parameters.vertexUv3s ) + _programLayers.enable( 15 ); + if ( parameters.vertexTangents ) + _programLayers.enable( 16 ); + if ( parameters.anisotropy ) + _programLayers.enable( 17 ); + if ( parameters.alphaHash ) + _programLayers.enable( 18 ); + if ( parameters.batching ) + _programLayers.enable( 19 ); + if ( parameters.dispersion ) + _programLayers.enable( 20 ); + + array.push( _programLayers.mask ); + _programLayers.disableAll(); + + if ( parameters.fog ) + _programLayers.enable( 0 ); + if ( parameters.useFog ) + _programLayers.enable( 1 ); + if ( parameters.flatShading ) + _programLayers.enable( 2 ); + if ( parameters.logarithmicDepthBuffer ) + _programLayers.enable( 3 ); + if ( parameters.skinning ) + _programLayers.enable( 4 ); + if ( parameters.morphTargets ) + _programLayers.enable( 5 ); + if ( parameters.morphNormals ) + _programLayers.enable( 6 ); + if ( parameters.morphColors ) + _programLayers.enable( 7 ); + if ( parameters.premultipliedAlpha ) + _programLayers.enable( 8 ); + if ( parameters.shadowMapEnabled ) + _programLayers.enable( 9 ); + if ( parameters.useLegacyLights ) + _programLayers.enable( 10 ); + if ( parameters.doubleSided ) + _programLayers.enable( 11 ); + if ( parameters.flipSided ) + _programLayers.enable( 12 ); + if ( parameters.useDepthPacking ) + _programLayers.enable( 13 ); + if ( parameters.dithering ) + _programLayers.enable( 14 ); + if ( parameters.transmission ) + _programLayers.enable( 15 ); + if ( parameters.sheen ) + _programLayers.enable( 16 ); + if ( parameters.opaque ) + _programLayers.enable( 17 ); + if ( parameters.pointsUvs ) + _programLayers.enable( 18 ); + if ( parameters.decodeVideoTexture ) + _programLayers.enable( 19 ); + if ( parameters.alphaToCoverage ) + _programLayers.enable( 20 ); + + array.push( _programLayers.mask ); + + } + + function getUniforms( material ) { + + const shaderID = shaderIDs[ material.type ]; + let uniforms; + + if ( shaderID ) { + + const shader = ShaderLib[ shaderID ]; + uniforms = UniformsUtils.clone( shader.uniforms ); + + } else { + + uniforms = material.uniforms; + + } + + return uniforms; + + } + + function acquireProgram( parameters, cacheKey ) { + + let program; + + // Check if code has been already compiled + for ( let p = 0, pl = programs.length; p < pl; p ++ ) { + + const preexistingProgram = programs[ p ]; + + if ( preexistingProgram.cacheKey === cacheKey ) { + + program = preexistingProgram; + ++ program.usedTimes; + + break; + + } + + } + + if ( program === undefined ) { + + program = new WebGLProgram( renderer, cacheKey, parameters, bindingStates ); + programs.push( program ); + + } + + return program; + + } + + function releaseProgram( program ) { + + if ( -- program.usedTimes === 0 ) { + + // Remove from unordered set + const i = programs.indexOf( program ); + programs[ i ] = programs[ programs.length - 1 ]; + programs.pop(); + + // Free WebGL resources + program.destroy(); + + } + + } + + function releaseShaderCache( material ) { + + _customShaders.remove( material ); + + } + + function dispose() { + + _customShaders.dispose(); + + } + + return { + getParameters: getParameters, + getProgramCacheKey: getProgramCacheKey, + getUniforms: getUniforms, + acquireProgram: acquireProgram, + releaseProgram: releaseProgram, + releaseShaderCache: releaseShaderCache, + // Exposed for resource monitoring & error feedback via renderer.info: + programs: programs, + dispose: dispose + }; + +} + +function WebGLProperties() { + + let properties = new WeakMap(); + + function get( object ) { + + let map = properties.get( object ); + + if ( map === undefined ) { + + map = {}; + properties.set( object, map ); + + } + + return map; + + } + + function remove( object ) { + + properties.delete( object ); + + } + + function update( object, key, value ) { + + properties.get( object )[ key ] = value; + + } + + function dispose() { + + properties = new WeakMap(); + + } + + return { + get: get, + remove: remove, + update: update, + dispose: dispose + }; + +} + +function painterSortStable( a, b ) { + + if ( a.groupOrder !== b.groupOrder ) { + + return a.groupOrder - b.groupOrder; + + } else if ( a.renderOrder !== b.renderOrder ) { + + return a.renderOrder - b.renderOrder; + + } else if ( a.material.id !== b.material.id ) { + + return a.material.id - b.material.id; + + } else if ( a.z !== b.z ) { + + return a.z - b.z; + + } else { + + return a.id - b.id; + + } + +} + +function reversePainterSortStable( a, b ) { + + if ( a.groupOrder !== b.groupOrder ) { + + return a.groupOrder - b.groupOrder; + + } else if ( a.renderOrder !== b.renderOrder ) { + + return a.renderOrder - b.renderOrder; + + } else if ( a.z !== b.z ) { + + return b.z - a.z; + + } else { + + return a.id - b.id; + + } + +} + + +function WebGLRenderList() { + + const renderItems = []; + let renderItemsIndex = 0; + + const opaque = []; + const transmissive = []; + const transparent = []; + + function init() { + + renderItemsIndex = 0; + + opaque.length = 0; + transmissive.length = 0; + transparent.length = 0; + + } + + function getNextRenderItem( object, geometry, material, groupOrder, z, group ) { + + let renderItem = renderItems[ renderItemsIndex ]; + + if ( renderItem === undefined ) { + + renderItem = { + id: object.id, + object: object, + geometry: geometry, + material: material, + groupOrder: groupOrder, + renderOrder: object.renderOrder, + z: z, + group: group + }; + + renderItems[ renderItemsIndex ] = renderItem; + + } else { + + renderItem.id = object.id; + renderItem.object = object; + renderItem.geometry = geometry; + renderItem.material = material; + renderItem.groupOrder = groupOrder; + renderItem.renderOrder = object.renderOrder; + renderItem.z = z; + renderItem.group = group; + + } + + renderItemsIndex ++; + + return renderItem; + + } + + function push( object, geometry, material, groupOrder, z, group ) { + + const renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group ); + + if ( material.transmission > 0.0 ) { + + transmissive.push( renderItem ); + + } else if ( material.transparent === true ) { + + transparent.push( renderItem ); + + } else { + + opaque.push( renderItem ); + + } + + } + + function unshift( object, geometry, material, groupOrder, z, group ) { + + const renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group ); + + if ( material.transmission > 0.0 ) { + + transmissive.unshift( renderItem ); + + } else if ( material.transparent === true ) { + + transparent.unshift( renderItem ); + + } else { + + opaque.unshift( renderItem ); + + } + + } + + function sort( customOpaqueSort, customTransparentSort ) { + + if ( opaque.length > 1 ) opaque.sort( customOpaqueSort || painterSortStable ); + if ( transmissive.length > 1 ) transmissive.sort( customTransparentSort || reversePainterSortStable ); + if ( transparent.length > 1 ) transparent.sort( customTransparentSort || reversePainterSortStable ); + + } + + function finish() { + + // Clear references from inactive renderItems in the list + + for ( let i = renderItemsIndex, il = renderItems.length; i < il; i ++ ) { + + const renderItem = renderItems[ i ]; + + if ( renderItem.id === null ) break; + + renderItem.id = null; + renderItem.object = null; + renderItem.geometry = null; + renderItem.material = null; + renderItem.group = null; + + } + + } + + return { + + opaque: opaque, + transmissive: transmissive, + transparent: transparent, + + init: init, + push: push, + unshift: unshift, + finish: finish, + + sort: sort + }; + +} + +function WebGLRenderLists() { + + let lists = new WeakMap(); + + function get( scene, renderCallDepth ) { + + const listArray = lists.get( scene ); + let list; + + if ( listArray === undefined ) { + + list = new WebGLRenderList(); + lists.set( scene, [ list ] ); + + } else { + + if ( renderCallDepth >= listArray.length ) { + + list = new WebGLRenderList(); + listArray.push( list ); + + } else { + + list = listArray[ renderCallDepth ]; + + } + + } + + return list; + + } + + function dispose() { + + lists = new WeakMap(); + + } + + return { + get: get, + dispose: dispose + }; + +} + +function UniformsCache() { + + const lights = {}; + + return { + + get: function ( light ) { + + if ( lights[ light.id ] !== undefined ) { + + return lights[ light.id ]; + + } + + let uniforms; + + switch ( light.type ) { + + case 'DirectionalLight': + uniforms = { + direction: new Vector3(), + color: new Color() + }; + break; + + case 'SpotLight': + uniforms = { + position: new Vector3(), + direction: new Vector3(), + color: new Color(), + distance: 0, + coneCos: 0, + penumbraCos: 0, + decay: 0 + }; + break; + + case 'PointLight': + uniforms = { + position: new Vector3(), + color: new Color(), + distance: 0, + decay: 0 + }; + break; + + case 'HemisphereLight': + uniforms = { + direction: new Vector3(), + skyColor: new Color(), + groundColor: new Color() + }; + break; + + case 'RectAreaLight': + uniforms = { + color: new Color(), + position: new Vector3(), + halfWidth: new Vector3(), + halfHeight: new Vector3() + }; + break; + + } + + lights[ light.id ] = uniforms; + + return uniforms; + + } + + }; + +} + +function ShadowUniformsCache() { + + const lights = {}; + + return { + + get: function ( light ) { + + if ( lights[ light.id ] !== undefined ) { + + return lights[ light.id ]; + + } + + let uniforms; + + switch ( light.type ) { + + case 'DirectionalLight': + uniforms = { + shadowBias: 0, + shadowNormalBias: 0, + shadowRadius: 1, + shadowMapSize: new Vector2() + }; + break; + + case 'SpotLight': + uniforms = { + shadowBias: 0, + shadowNormalBias: 0, + shadowRadius: 1, + shadowMapSize: new Vector2() + }; + break; + + case 'PointLight': + uniforms = { + shadowBias: 0, + shadowNormalBias: 0, + shadowRadius: 1, + shadowMapSize: new Vector2(), + shadowCameraNear: 1, + shadowCameraFar: 1000 + }; + break; + + // TODO (abelnation): set RectAreaLight shadow uniforms + + } + + lights[ light.id ] = uniforms; + + return uniforms; + + } + + }; + +} + + + +let nextVersion = 0; + +function shadowCastingAndTexturingLightsFirst( lightA, lightB ) { + + return ( lightB.castShadow ? 2 : 0 ) - ( lightA.castShadow ? 2 : 0 ) + ( lightB.map ? 1 : 0 ) - ( lightA.map ? 1 : 0 ); + +} + +function WebGLLights( extensions ) { + + const cache = new UniformsCache(); + + const shadowCache = ShadowUniformsCache(); + + const state = { + + version: 0, + + hash: { + directionalLength: - 1, + pointLength: - 1, + spotLength: - 1, + rectAreaLength: - 1, + hemiLength: - 1, + + numDirectionalShadows: - 1, + numPointShadows: - 1, + numSpotShadows: - 1, + numSpotMaps: - 1, + + numLightProbes: - 1 + }, + + ambient: [ 0, 0, 0 ], + probe: [], + directional: [], + directionalShadow: [], + directionalShadowMap: [], + directionalShadowMatrix: [], + spot: [], + spotLightMap: [], + spotShadow: [], + spotShadowMap: [], + spotLightMatrix: [], + rectArea: [], + rectAreaLTC1: null, + rectAreaLTC2: null, + point: [], + pointShadow: [], + pointShadowMap: [], + pointShadowMatrix: [], + hemi: [], + numSpotLightShadowsWithMaps: 0, + numLightProbes: 0 + + }; + + for ( let i = 0; i < 9; i ++ ) state.probe.push( new Vector3() ); + + const vector3 = new Vector3(); + const matrix4 = new Matrix4(); + const matrix42 = new Matrix4(); + + function setup( lights, useLegacyLights ) { + + let r = 0, g = 0, b = 0; + + for ( let i = 0; i < 9; i ++ ) state.probe[ i ].set( 0, 0, 0 ); + + let directionalLength = 0; + let pointLength = 0; + let spotLength = 0; + let rectAreaLength = 0; + let hemiLength = 0; + + let numDirectionalShadows = 0; + let numPointShadows = 0; + let numSpotShadows = 0; + let numSpotMaps = 0; + let numSpotShadowsWithMaps = 0; + + let numLightProbes = 0; + + // ordering : [shadow casting + map texturing, map texturing, shadow casting, none ] + lights.sort( shadowCastingAndTexturingLightsFirst ); + + // artist-friendly light intensity scaling factor + const scaleFactor = ( useLegacyLights === true ) ? Math.PI : 1; + + for ( let i = 0, l = lights.length; i < l; i ++ ) { + + const light = lights[ i ]; + + const color = light.color; + const intensity = light.intensity; + const distance = light.distance; + + const shadowMap = ( light.shadow && light.shadow.map ) ? light.shadow.map.texture : null; + + if ( light.isAmbientLight ) { + + r += color.r * intensity * scaleFactor; + g += color.g * intensity * scaleFactor; + b += color.b * intensity * scaleFactor; + + } else if ( light.isLightProbe ) { + + for ( let j = 0; j < 9; j ++ ) { + + state.probe[ j ].addScaledVector( light.sh.coefficients[ j ], intensity ); + + } + + numLightProbes ++; + + } else if ( light.isDirectionalLight ) { + + const uniforms = cache.get( light ); + + uniforms.color.copy( light.color ).multiplyScalar( light.intensity * scaleFactor ); + + if ( light.castShadow ) { + + const shadow = light.shadow; + + const shadowUniforms = shadowCache.get( light ); + + shadowUniforms.shadowBias = shadow.bias; + shadowUniforms.shadowNormalBias = shadow.normalBias; + shadowUniforms.shadowRadius = shadow.radius; + shadowUniforms.shadowMapSize = shadow.mapSize; + + state.directionalShadow[ directionalLength ] = shadowUniforms; + state.directionalShadowMap[ directionalLength ] = shadowMap; + state.directionalShadowMatrix[ directionalLength ] = light.shadow.matrix; + + numDirectionalShadows ++; + + } + + state.directional[ directionalLength ] = uniforms; + + directionalLength ++; + + } else if ( light.isSpotLight ) { + + const uniforms = cache.get( light ); + + uniforms.position.setFromMatrixPosition( light.matrixWorld ); + + uniforms.color.copy( color ).multiplyScalar( intensity * scaleFactor ); + uniforms.distance = distance; + + uniforms.coneCos = Math.cos( light.angle ); + uniforms.penumbraCos = Math.cos( light.angle * ( 1 - light.penumbra ) ); + uniforms.decay = light.decay; + + state.spot[ spotLength ] = uniforms; + + const shadow = light.shadow; + + if ( light.map ) { + + state.spotLightMap[ numSpotMaps ] = light.map; + numSpotMaps ++; + + // make sure the lightMatrix is up to date + // TODO : do it if required only + shadow.updateMatrices( light ); + + if ( light.castShadow ) numSpotShadowsWithMaps ++; + + } + + state.spotLightMatrix[ spotLength ] = shadow.matrix; + + if ( light.castShadow ) { + + const shadowUniforms = shadowCache.get( light ); + + shadowUniforms.shadowBias = shadow.bias; + shadowUniforms.shadowNormalBias = shadow.normalBias; + shadowUniforms.shadowRadius = shadow.radius; + shadowUniforms.shadowMapSize = shadow.mapSize; + + state.spotShadow[ spotLength ] = shadowUniforms; + state.spotShadowMap[ spotLength ] = shadowMap; + + numSpotShadows ++; + + } + + spotLength ++; + + } else if ( light.isRectAreaLight ) { + + const uniforms = cache.get( light ); + + uniforms.color.copy( color ).multiplyScalar( intensity ); + + uniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 ); + uniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 ); + + state.rectArea[ rectAreaLength ] = uniforms; + + rectAreaLength ++; + + } else if ( light.isPointLight ) { + + const uniforms = cache.get( light ); + + uniforms.color.copy( light.color ).multiplyScalar( light.intensity * scaleFactor ); + uniforms.distance = light.distance; + uniforms.decay = light.decay; + + if ( light.castShadow ) { + + const shadow = light.shadow; + + const shadowUniforms = shadowCache.get( light ); + + shadowUniforms.shadowBias = shadow.bias; + shadowUniforms.shadowNormalBias = shadow.normalBias; + shadowUniforms.shadowRadius = shadow.radius; + shadowUniforms.shadowMapSize = shadow.mapSize; + shadowUniforms.shadowCameraNear = shadow.camera.near; + shadowUniforms.shadowCameraFar = shadow.camera.far; + + state.pointShadow[ pointLength ] = shadowUniforms; + state.pointShadowMap[ pointLength ] = shadowMap; + state.pointShadowMatrix[ pointLength ] = light.shadow.matrix; + + numPointShadows ++; + + } + + state.point[ pointLength ] = uniforms; + + pointLength ++; + + } else if ( light.isHemisphereLight ) { + + const uniforms = cache.get( light ); + + uniforms.skyColor.copy( light.color ).multiplyScalar( intensity * scaleFactor ); + uniforms.groundColor.copy( light.groundColor ).multiplyScalar( intensity * scaleFactor ); + + state.hemi[ hemiLength ] = uniforms; + + hemiLength ++; + + } + + } + + if ( rectAreaLength > 0 ) { + + if ( extensions.has( 'OES_texture_float_linear' ) === true ) { + + state.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1; + state.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2; + + } else { + + state.rectAreaLTC1 = UniformsLib.LTC_HALF_1; + state.rectAreaLTC2 = UniformsLib.LTC_HALF_2; + + } + + } + + state.ambient[ 0 ] = r; + state.ambient[ 1 ] = g; + state.ambient[ 2 ] = b; + + const hash = state.hash; + + if ( hash.directionalLength !== directionalLength || + hash.pointLength !== pointLength || + hash.spotLength !== spotLength || + hash.rectAreaLength !== rectAreaLength || + hash.hemiLength !== hemiLength || + hash.numDirectionalShadows !== numDirectionalShadows || + hash.numPointShadows !== numPointShadows || + hash.numSpotShadows !== numSpotShadows || + hash.numSpotMaps !== numSpotMaps || + hash.numLightProbes !== numLightProbes ) { + + state.directional.length = directionalLength; + state.spot.length = spotLength; + state.rectArea.length = rectAreaLength; + state.point.length = pointLength; + state.hemi.length = hemiLength; + + state.directionalShadow.length = numDirectionalShadows; + state.directionalShadowMap.length = numDirectionalShadows; + state.pointShadow.length = numPointShadows; + state.pointShadowMap.length = numPointShadows; + state.spotShadow.length = numSpotShadows; + state.spotShadowMap.length = numSpotShadows; + state.directionalShadowMatrix.length = numDirectionalShadows; + state.pointShadowMatrix.length = numPointShadows; + state.spotLightMatrix.length = numSpotShadows + numSpotMaps - numSpotShadowsWithMaps; + state.spotLightMap.length = numSpotMaps; + state.numSpotLightShadowsWithMaps = numSpotShadowsWithMaps; + state.numLightProbes = numLightProbes; + + hash.directionalLength = directionalLength; + hash.pointLength = pointLength; + hash.spotLength = spotLength; + hash.rectAreaLength = rectAreaLength; + hash.hemiLength = hemiLength; + + hash.numDirectionalShadows = numDirectionalShadows; + hash.numPointShadows = numPointShadows; + hash.numSpotShadows = numSpotShadows; + hash.numSpotMaps = numSpotMaps; + + hash.numLightProbes = numLightProbes; + + state.version = nextVersion ++; + + } + + } + + function setupView( lights, camera ) { + + let directionalLength = 0; + let pointLength = 0; + let spotLength = 0; + let rectAreaLength = 0; + let hemiLength = 0; + + const viewMatrix = camera.matrixWorldInverse; + + for ( let i = 0, l = lights.length; i < l; i ++ ) { + + const light = lights[ i ]; + + if ( light.isDirectionalLight ) { + + const uniforms = state.directional[ directionalLength ]; + + uniforms.direction.setFromMatrixPosition( light.matrixWorld ); + vector3.setFromMatrixPosition( light.target.matrixWorld ); + uniforms.direction.sub( vector3 ); + uniforms.direction.transformDirection( viewMatrix ); + + directionalLength ++; + + } else if ( light.isSpotLight ) { + + const uniforms = state.spot[ spotLength ]; + + uniforms.position.setFromMatrixPosition( light.matrixWorld ); + uniforms.position.applyMatrix4( viewMatrix ); + + uniforms.direction.setFromMatrixPosition( light.matrixWorld ); + vector3.setFromMatrixPosition( light.target.matrixWorld ); + uniforms.direction.sub( vector3 ); + uniforms.direction.transformDirection( viewMatrix ); + + spotLength ++; + + } else if ( light.isRectAreaLight ) { + + const uniforms = state.rectArea[ rectAreaLength ]; + + uniforms.position.setFromMatrixPosition( light.matrixWorld ); + uniforms.position.applyMatrix4( viewMatrix ); + + // extract local rotation of light to derive width/height half vectors + matrix42.identity(); + matrix4.copy( light.matrixWorld ); + matrix4.premultiply( viewMatrix ); + matrix42.extractRotation( matrix4 ); + + uniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 ); + uniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 ); + + uniforms.halfWidth.applyMatrix4( matrix42 ); + uniforms.halfHeight.applyMatrix4( matrix42 ); + + rectAreaLength ++; + + } else if ( light.isPointLight ) { + + const uniforms = state.point[ pointLength ]; + + uniforms.position.setFromMatrixPosition( light.matrixWorld ); + uniforms.position.applyMatrix4( viewMatrix ); + + pointLength ++; + + } else if ( light.isHemisphereLight ) { + + const uniforms = state.hemi[ hemiLength ]; + + uniforms.direction.setFromMatrixPosition( light.matrixWorld ); + uniforms.direction.transformDirection( viewMatrix ); + + hemiLength ++; + + } + + } + + } + + return { + setup: setup, + setupView: setupView, + state: state + }; + +} + +function WebGLRenderState( extensions ) { + + const lights = new WebGLLights( extensions ); + + const lightsArray = []; + const shadowsArray = []; + + function init( camera ) { + + state.camera = camera; + + lightsArray.length = 0; + shadowsArray.length = 0; + + } + + function pushLight( light ) { + + lightsArray.push( light ); + + } + + function pushShadow( shadowLight ) { + + shadowsArray.push( shadowLight ); + + } + + function setupLights( useLegacyLights ) { + + lights.setup( lightsArray, useLegacyLights ); + + } + + function setupLightsView( camera ) { + + lights.setupView( lightsArray, camera ); + + } + + const state = { + lightsArray: lightsArray, + shadowsArray: shadowsArray, + + camera: null, + + lights: lights, + + transmissionRenderTarget: {} + }; + + return { + init: init, + state: state, + setupLights: setupLights, + setupLightsView: setupLightsView, + + pushLight: pushLight, + pushShadow: pushShadow + }; + +} + +function WebGLRenderStates( extensions ) { + + let renderStates = new WeakMap(); + + function get( scene, renderCallDepth = 0 ) { + + const renderStateArray = renderStates.get( scene ); + let renderState; + + if ( renderStateArray === undefined ) { + + renderState = new WebGLRenderState( extensions ); + renderStates.set( scene, [ renderState ] ); + + } else { + + if ( renderCallDepth >= renderStateArray.length ) { + + renderState = new WebGLRenderState( extensions ); + renderStateArray.push( renderState ); + + } else { + + renderState = renderStateArray[ renderCallDepth ]; + + } + + } + + return renderState; + + } + + function dispose() { + + renderStates = new WeakMap(); + + } + + return { + get: get, + dispose: dispose + }; + +} + +class MeshDepthMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshDepthMaterial = true; + + this.type = 'MeshDepthMaterial'; + + this.depthPacking = BasicDepthPacking; + + this.map = null; + + this.alphaMap = null; + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.wireframe = false; + this.wireframeLinewidth = 1; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.depthPacking = source.depthPacking; + + this.map = source.map; + + this.alphaMap = source.alphaMap; + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + + return this; + + } + +} + +class MeshDistanceMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshDistanceMaterial = true; + + this.type = 'MeshDistanceMaterial'; + + this.map = null; + + this.alphaMap = null; + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.map = source.map; + + this.alphaMap = source.alphaMap; + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + return this; + + } + +} + +const vertex = "void main() {\n\tgl_Position = vec4( position, 1.0 );\n}"; + +const fragment = "uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"; + +function WebGLShadowMap( renderer, objects, capabilities ) { + + let _frustum = new Frustum(); + + const _shadowMapSize = new Vector2(), + _viewportSize = new Vector2(), + + _viewport = new Vector4(), + + _depthMaterial = new MeshDepthMaterial( { depthPacking: RGBADepthPacking } ), + _distanceMaterial = new MeshDistanceMaterial(), + + _materialCache = {}, + + _maxTextureSize = capabilities.maxTextureSize; + + const shadowSide = { [ FrontSide ]: BackSide, [ BackSide ]: FrontSide, [ DoubleSide ]: DoubleSide }; + + const shadowMaterialVertical = new ShaderMaterial( { + defines: { + VSM_SAMPLES: 8 + }, + uniforms: { + shadow_pass: { value: null }, + resolution: { value: new Vector2() }, + radius: { value: 4.0 } + }, + + vertexShader: vertex, + fragmentShader: fragment + + } ); + + const shadowMaterialHorizontal = shadowMaterialVertical.clone(); + shadowMaterialHorizontal.defines.HORIZONTAL_PASS = 1; + + const fullScreenTri = new BufferGeometry(); + fullScreenTri.setAttribute( + 'position', + new BufferAttribute( + new Float32Array( [ - 1, - 1, 0.5, 3, - 1, 0.5, - 1, 3, 0.5 ] ), + 3 + ) + ); + + const fullScreenMesh = new Mesh( fullScreenTri, shadowMaterialVertical ); + + const scope = this; + + this.enabled = false; + + this.autoUpdate = true; + this.needsUpdate = false; + + this.type = PCFShadowMap; + let _previousType = this.type; + + this.render = function ( lights, scene, camera ) { + + if ( scope.enabled === false ) return; + if ( scope.autoUpdate === false && scope.needsUpdate === false ) return; + + if ( lights.length === 0 ) return; + + const currentRenderTarget = renderer.getRenderTarget(); + const activeCubeFace = renderer.getActiveCubeFace(); + const activeMipmapLevel = renderer.getActiveMipmapLevel(); + + const _state = renderer.state; + + // Set GL state for depth map. + _state.setBlending( NoBlending ); + _state.buffers.color.setClear( 1, 1, 1, 1 ); + _state.buffers.depth.setTest( true ); + _state.setScissorTest( false ); + + // check for shadow map type changes + + const toVSM = ( _previousType !== VSMShadowMap && this.type === VSMShadowMap ); + const fromVSM = ( _previousType === VSMShadowMap && this.type !== VSMShadowMap ); + + // render depth map + + for ( let i = 0, il = lights.length; i < il; i ++ ) { + + const light = lights[ i ]; + const shadow = light.shadow; + + if ( shadow === undefined ) { + + console.warn( 'THREE.WebGLShadowMap:', light, 'has no shadow.' ); + continue; + + } + + if ( shadow.autoUpdate === false && shadow.needsUpdate === false ) continue; + + _shadowMapSize.copy( shadow.mapSize ); + + const shadowFrameExtents = shadow.getFrameExtents(); + + _shadowMapSize.multiply( shadowFrameExtents ); + + _viewportSize.copy( shadow.mapSize ); + + if ( _shadowMapSize.x > _maxTextureSize || _shadowMapSize.y > _maxTextureSize ) { + + if ( _shadowMapSize.x > _maxTextureSize ) { + + _viewportSize.x = Math.floor( _maxTextureSize / shadowFrameExtents.x ); + _shadowMapSize.x = _viewportSize.x * shadowFrameExtents.x; + shadow.mapSize.x = _viewportSize.x; + + } + + if ( _shadowMapSize.y > _maxTextureSize ) { + + _viewportSize.y = Math.floor( _maxTextureSize / shadowFrameExtents.y ); + _shadowMapSize.y = _viewportSize.y * shadowFrameExtents.y; + shadow.mapSize.y = _viewportSize.y; + + } + + } + + if ( shadow.map === null || toVSM === true || fromVSM === true ) { + + const pars = ( this.type !== VSMShadowMap ) ? { minFilter: NearestFilter, magFilter: NearestFilter } : {}; + + if ( shadow.map !== null ) { + + shadow.map.dispose(); + + } + + shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars ); + shadow.map.texture.name = light.name + '.shadowMap'; + + shadow.camera.updateProjectionMatrix(); + + } + + renderer.setRenderTarget( shadow.map ); + renderer.clear(); + + const viewportCount = shadow.getViewportCount(); + + for ( let vp = 0; vp < viewportCount; vp ++ ) { + + const viewport = shadow.getViewport( vp ); + + _viewport.set( + _viewportSize.x * viewport.x, + _viewportSize.y * viewport.y, + _viewportSize.x * viewport.z, + _viewportSize.y * viewport.w + ); + + _state.viewport( _viewport ); + + shadow.updateMatrices( light, vp ); + + _frustum = shadow.getFrustum(); + + renderObject( scene, camera, shadow.camera, light, this.type ); + + } + + // do blur pass for VSM + + if ( shadow.isPointLightShadow !== true && this.type === VSMShadowMap ) { + + VSMPass( shadow, camera ); + + } + + shadow.needsUpdate = false; + + } + + _previousType = this.type; + + scope.needsUpdate = false; + + renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipmapLevel ); + + }; + + function VSMPass( shadow, camera ) { + + const geometry = objects.update( fullScreenMesh ); + + if ( shadowMaterialVertical.defines.VSM_SAMPLES !== shadow.blurSamples ) { + + shadowMaterialVertical.defines.VSM_SAMPLES = shadow.blurSamples; + shadowMaterialHorizontal.defines.VSM_SAMPLES = shadow.blurSamples; + + shadowMaterialVertical.needsUpdate = true; + shadowMaterialHorizontal.needsUpdate = true; + + } + + if ( shadow.mapPass === null ) { + + shadow.mapPass = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y ); + + } + + // vertical pass + + shadowMaterialVertical.uniforms.shadow_pass.value = shadow.map.texture; + shadowMaterialVertical.uniforms.resolution.value = shadow.mapSize; + shadowMaterialVertical.uniforms.radius.value = shadow.radius; + renderer.setRenderTarget( shadow.mapPass ); + renderer.clear(); + renderer.renderBufferDirect( camera, null, geometry, shadowMaterialVertical, fullScreenMesh, null ); + + // horizontal pass + + shadowMaterialHorizontal.uniforms.shadow_pass.value = shadow.mapPass.texture; + shadowMaterialHorizontal.uniforms.resolution.value = shadow.mapSize; + shadowMaterialHorizontal.uniforms.radius.value = shadow.radius; + renderer.setRenderTarget( shadow.map ); + renderer.clear(); + renderer.renderBufferDirect( camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null ); + + } + + function getDepthMaterial( object, material, light, type ) { + + let result = null; + + const customMaterial = ( light.isPointLight === true ) ? object.customDistanceMaterial : object.customDepthMaterial; + + if ( customMaterial !== undefined ) { + + result = customMaterial; + + } else { + + result = ( light.isPointLight === true ) ? _distanceMaterial : _depthMaterial; + + if ( ( renderer.localClippingEnabled && material.clipShadows === true && Array.isArray( material.clippingPlanes ) && material.clippingPlanes.length !== 0 ) || + ( material.displacementMap && material.displacementScale !== 0 ) || + ( material.alphaMap && material.alphaTest > 0 ) || + ( material.map && material.alphaTest > 0 ) ) { + + // in this case we need a unique material instance reflecting the + // appropriate state + + const keyA = result.uuid, keyB = material.uuid; + + let materialsForVariant = _materialCache[ keyA ]; + + if ( materialsForVariant === undefined ) { + + materialsForVariant = {}; + _materialCache[ keyA ] = materialsForVariant; + + } + + let cachedMaterial = materialsForVariant[ keyB ]; + + if ( cachedMaterial === undefined ) { + + cachedMaterial = result.clone(); + materialsForVariant[ keyB ] = cachedMaterial; + material.addEventListener( 'dispose', onMaterialDispose ); + + } + + result = cachedMaterial; + + } + + } + + result.visible = material.visible; + result.wireframe = material.wireframe; + + if ( type === VSMShadowMap ) { + + result.side = ( material.shadowSide !== null ) ? material.shadowSide : material.side; + + } else { + + result.side = ( material.shadowSide !== null ) ? material.shadowSide : shadowSide[ material.side ]; + + } + + result.alphaMap = material.alphaMap; + result.alphaTest = material.alphaTest; + result.map = material.map; + + result.clipShadows = material.clipShadows; + result.clippingPlanes = material.clippingPlanes; + result.clipIntersection = material.clipIntersection; + + result.displacementMap = material.displacementMap; + result.displacementScale = material.displacementScale; + result.displacementBias = material.displacementBias; + + result.wireframeLinewidth = material.wireframeLinewidth; + result.linewidth = material.linewidth; + + if ( light.isPointLight === true && result.isMeshDistanceMaterial === true ) { + + const materialProperties = renderer.properties.get( result ); + materialProperties.light = light; + + } + + return result; + + } + + function renderObject( object, camera, shadowCamera, light, type ) { + + if ( object.visible === false ) return; + + const visible = object.layers.test( camera.layers ); + + if ( visible && ( object.isMesh || object.isLine || object.isPoints ) ) { + + if ( ( object.castShadow || ( object.receiveShadow && type === VSMShadowMap ) ) && ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) ) { + + object.modelViewMatrix.multiplyMatrices( shadowCamera.matrixWorldInverse, object.matrixWorld ); + + const geometry = objects.update( object ); + const material = object.material; + + if ( Array.isArray( material ) ) { + + const groups = geometry.groups; + + for ( let k = 0, kl = groups.length; k < kl; k ++ ) { + + const group = groups[ k ]; + const groupMaterial = material[ group.materialIndex ]; + + if ( groupMaterial && groupMaterial.visible ) { + + const depthMaterial = getDepthMaterial( object, groupMaterial, light, type ); + + object.onBeforeShadow( renderer, object, camera, shadowCamera, geometry, depthMaterial, group ); + + renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, group ); + + object.onAfterShadow( renderer, object, camera, shadowCamera, geometry, depthMaterial, group ); + + } + + } + + } else if ( material.visible ) { + + const depthMaterial = getDepthMaterial( object, material, light, type ); + + object.onBeforeShadow( renderer, object, camera, shadowCamera, geometry, depthMaterial, null ); + + renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, null ); + + object.onAfterShadow( renderer, object, camera, shadowCamera, geometry, depthMaterial, null ); + + } + + } + + } + + const children = object.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + renderObject( children[ i ], camera, shadowCamera, light, type ); + + } + + } + + function onMaterialDispose( event ) { + + const material = event.target; + + material.removeEventListener( 'dispose', onMaterialDispose ); + + // make sure to remove the unique distance/depth materials used for shadow map rendering + + for ( const id in _materialCache ) { + + const cache = _materialCache[ id ]; + + const uuid = event.target.uuid; + + if ( uuid in cache ) { + + const shadowMaterial = cache[ uuid ]; + shadowMaterial.dispose(); + delete cache[ uuid ]; + + } + + } + + } + +} + +function WebGLState( gl ) { + + function ColorBuffer() { + + let locked = false; + + const color = new Vector4(); + let currentColorMask = null; + const currentColorClear = new Vector4( 0, 0, 0, 0 ); + + return { + + setMask: function ( colorMask ) { + + if ( currentColorMask !== colorMask && ! locked ) { + + gl.colorMask( colorMask, colorMask, colorMask, colorMask ); + currentColorMask = colorMask; + + } + + }, + + setLocked: function ( lock ) { + + locked = lock; + + }, + + setClear: function ( r, g, b, a, premultipliedAlpha ) { + + if ( premultipliedAlpha === true ) { + + r *= a; g *= a; b *= a; + + } + + color.set( r, g, b, a ); + + if ( currentColorClear.equals( color ) === false ) { + + gl.clearColor( r, g, b, a ); + currentColorClear.copy( color ); + + } + + }, + + reset: function () { + + locked = false; + + currentColorMask = null; + currentColorClear.set( - 1, 0, 0, 0 ); // set to invalid state + + } + + }; + + } + + function DepthBuffer() { + + let locked = false; + + let currentDepthMask = null; + let currentDepthFunc = null; + let currentDepthClear = null; + + return { + + setTest: function ( depthTest ) { + + if ( depthTest ) { + + enable( gl.DEPTH_TEST ); + + } else { + + disable( gl.DEPTH_TEST ); + + } + + }, + + setMask: function ( depthMask ) { + + if ( currentDepthMask !== depthMask && ! locked ) { + + gl.depthMask( depthMask ); + currentDepthMask = depthMask; + + } + + }, + + setFunc: function ( depthFunc ) { + + if ( currentDepthFunc !== depthFunc ) { + + switch ( depthFunc ) { + + case NeverDepth: + + gl.depthFunc( gl.NEVER ); + break; + + case AlwaysDepth: + + gl.depthFunc( gl.ALWAYS ); + break; + + case LessDepth: + + gl.depthFunc( gl.LESS ); + break; + + case LessEqualDepth: + + gl.depthFunc( gl.LEQUAL ); + break; + + case EqualDepth: + + gl.depthFunc( gl.EQUAL ); + break; + + case GreaterEqualDepth: + + gl.depthFunc( gl.GEQUAL ); + break; + + case GreaterDepth: + + gl.depthFunc( gl.GREATER ); + break; + + case NotEqualDepth: + + gl.depthFunc( gl.NOTEQUAL ); + break; + + default: + + gl.depthFunc( gl.LEQUAL ); + + } + + currentDepthFunc = depthFunc; + + } + + }, + + setLocked: function ( lock ) { + + locked = lock; + + }, + + setClear: function ( depth ) { + + if ( currentDepthClear !== depth ) { + + gl.clearDepth( depth ); + currentDepthClear = depth; + + } + + }, + + reset: function () { + + locked = false; + + currentDepthMask = null; + currentDepthFunc = null; + currentDepthClear = null; + + } + + }; + + } + + function StencilBuffer() { + + let locked = false; + + let currentStencilMask = null; + let currentStencilFunc = null; + let currentStencilRef = null; + let currentStencilFuncMask = null; + let currentStencilFail = null; + let currentStencilZFail = null; + let currentStencilZPass = null; + let currentStencilClear = null; + + return { + + setTest: function ( stencilTest ) { + + if ( ! locked ) { + + if ( stencilTest ) { + + enable( gl.STENCIL_TEST ); + + } else { + + disable( gl.STENCIL_TEST ); + + } + + } + + }, + + setMask: function ( stencilMask ) { + + if ( currentStencilMask !== stencilMask && ! locked ) { + + gl.stencilMask( stencilMask ); + currentStencilMask = stencilMask; + + } + + }, + + setFunc: function ( stencilFunc, stencilRef, stencilMask ) { + + if ( currentStencilFunc !== stencilFunc || + currentStencilRef !== stencilRef || + currentStencilFuncMask !== stencilMask ) { + + gl.stencilFunc( stencilFunc, stencilRef, stencilMask ); + + currentStencilFunc = stencilFunc; + currentStencilRef = stencilRef; + currentStencilFuncMask = stencilMask; + + } + + }, + + setOp: function ( stencilFail, stencilZFail, stencilZPass ) { + + if ( currentStencilFail !== stencilFail || + currentStencilZFail !== stencilZFail || + currentStencilZPass !== stencilZPass ) { + + gl.stencilOp( stencilFail, stencilZFail, stencilZPass ); + + currentStencilFail = stencilFail; + currentStencilZFail = stencilZFail; + currentStencilZPass = stencilZPass; + + } + + }, + + setLocked: function ( lock ) { + + locked = lock; + + }, + + setClear: function ( stencil ) { + + if ( currentStencilClear !== stencil ) { + + gl.clearStencil( stencil ); + currentStencilClear = stencil; + + } + + }, + + reset: function () { + + locked = false; + + currentStencilMask = null; + currentStencilFunc = null; + currentStencilRef = null; + currentStencilFuncMask = null; + currentStencilFail = null; + currentStencilZFail = null; + currentStencilZPass = null; + currentStencilClear = null; + + } + + }; + + } + + // + + const colorBuffer = new ColorBuffer(); + const depthBuffer = new DepthBuffer(); + const stencilBuffer = new StencilBuffer(); + + const uboBindings = new WeakMap(); + const uboProgramMap = new WeakMap(); + + let enabledCapabilities = {}; + + let currentBoundFramebuffers = {}; + let currentDrawbuffers = new WeakMap(); + let defaultDrawbuffers = []; + + let currentProgram = null; + + let currentBlendingEnabled = false; + let currentBlending = null; + let currentBlendEquation = null; + let currentBlendSrc = null; + let currentBlendDst = null; + let currentBlendEquationAlpha = null; + let currentBlendSrcAlpha = null; + let currentBlendDstAlpha = null; + let currentBlendColor = new Color( 0, 0, 0 ); + let currentBlendAlpha = 0; + let currentPremultipledAlpha = false; + + let currentFlipSided = null; + let currentCullFace = null; + + let currentLineWidth = null; + + let currentPolygonOffsetFactor = null; + let currentPolygonOffsetUnits = null; + + const maxTextures = gl.getParameter( gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS ); + + let lineWidthAvailable = false; + let version = 0; + const glVersion = gl.getParameter( gl.VERSION ); + + if ( glVersion.indexOf( 'WebGL' ) !== - 1 ) { + + version = parseFloat( /^WebGL (\d)/.exec( glVersion )[ 1 ] ); + lineWidthAvailable = ( version >= 1.0 ); + + } else if ( glVersion.indexOf( 'OpenGL ES' ) !== - 1 ) { + + version = parseFloat( /^OpenGL ES (\d)/.exec( glVersion )[ 1 ] ); + lineWidthAvailable = ( version >= 2.0 ); + + } + + let currentTextureSlot = null; + let currentBoundTextures = {}; + + const scissorParam = gl.getParameter( gl.SCISSOR_BOX ); + const viewportParam = gl.getParameter( gl.VIEWPORT ); + + const currentScissor = new Vector4().fromArray( scissorParam ); + const currentViewport = new Vector4().fromArray( viewportParam ); + + function createTexture( type, target, count, dimensions ) { + + const data = new Uint8Array( 4 ); // 4 is required to match default unpack alignment of 4. + const texture = gl.createTexture(); + + gl.bindTexture( type, texture ); + gl.texParameteri( type, gl.TEXTURE_MIN_FILTER, gl.NEAREST ); + gl.texParameteri( type, gl.TEXTURE_MAG_FILTER, gl.NEAREST ); + + for ( let i = 0; i < count; i ++ ) { + + if ( type === gl.TEXTURE_3D || type === gl.TEXTURE_2D_ARRAY ) { + + gl.texImage3D( target, 0, gl.RGBA, 1, 1, dimensions, 0, gl.RGBA, gl.UNSIGNED_BYTE, data ); + + } else { + + gl.texImage2D( target + i, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, data ); + + } + + } + + return texture; + + } + + const emptyTextures = {}; + emptyTextures[ gl.TEXTURE_2D ] = createTexture( gl.TEXTURE_2D, gl.TEXTURE_2D, 1 ); + emptyTextures[ gl.TEXTURE_CUBE_MAP ] = createTexture( gl.TEXTURE_CUBE_MAP, gl.TEXTURE_CUBE_MAP_POSITIVE_X, 6 ); + emptyTextures[ gl.TEXTURE_2D_ARRAY ] = createTexture( gl.TEXTURE_2D_ARRAY, gl.TEXTURE_2D_ARRAY, 1, 1 ); + emptyTextures[ gl.TEXTURE_3D ] = createTexture( gl.TEXTURE_3D, gl.TEXTURE_3D, 1, 1 ); + + // init + + colorBuffer.setClear( 0, 0, 0, 1 ); + depthBuffer.setClear( 1 ); + stencilBuffer.setClear( 0 ); + + enable( gl.DEPTH_TEST ); + depthBuffer.setFunc( LessEqualDepth ); + + setFlipSided( false ); + setCullFace( CullFaceBack ); + enable( gl.CULL_FACE ); + + setBlending( NoBlending ); + + // + + function enable( id ) { + + if ( enabledCapabilities[ id ] !== true ) { + + gl.enable( id ); + enabledCapabilities[ id ] = true; + + } + + } + + function disable( id ) { + + if ( enabledCapabilities[ id ] !== false ) { + + gl.disable( id ); + enabledCapabilities[ id ] = false; + + } + + } + + function bindFramebuffer( target, framebuffer ) { + + if ( currentBoundFramebuffers[ target ] !== framebuffer ) { + + gl.bindFramebuffer( target, framebuffer ); + + currentBoundFramebuffers[ target ] = framebuffer; + + // gl.DRAW_FRAMEBUFFER is equivalent to gl.FRAMEBUFFER + + if ( target === gl.DRAW_FRAMEBUFFER ) { + + currentBoundFramebuffers[ gl.FRAMEBUFFER ] = framebuffer; + + } + + if ( target === gl.FRAMEBUFFER ) { + + currentBoundFramebuffers[ gl.DRAW_FRAMEBUFFER ] = framebuffer; + + } + + return true; + + } + + return false; + + } + + function drawBuffers( renderTarget, framebuffer ) { + + let drawBuffers = defaultDrawbuffers; + + let needsUpdate = false; + + if ( renderTarget ) { + + drawBuffers = currentDrawbuffers.get( framebuffer ); + + if ( drawBuffers === undefined ) { + + drawBuffers = []; + currentDrawbuffers.set( framebuffer, drawBuffers ); + + } + + const textures = renderTarget.textures; + + if ( drawBuffers.length !== textures.length || drawBuffers[ 0 ] !== gl.COLOR_ATTACHMENT0 ) { + + for ( let i = 0, il = textures.length; i < il; i ++ ) { + + drawBuffers[ i ] = gl.COLOR_ATTACHMENT0 + i; + + } + + drawBuffers.length = textures.length; + + needsUpdate = true; + + } + + } else { + + if ( drawBuffers[ 0 ] !== gl.BACK ) { + + drawBuffers[ 0 ] = gl.BACK; + + needsUpdate = true; + + } + + } + + if ( needsUpdate ) { + + gl.drawBuffers( drawBuffers ); + + } + + } + + function useProgram( program ) { + + if ( currentProgram !== program ) { + + gl.useProgram( program ); + + currentProgram = program; + + return true; + + } + + return false; + + } + + const equationToGL = { + [ AddEquation ]: gl.FUNC_ADD, + [ SubtractEquation ]: gl.FUNC_SUBTRACT, + [ ReverseSubtractEquation ]: gl.FUNC_REVERSE_SUBTRACT + }; + + equationToGL[ MinEquation ] = gl.MIN; + equationToGL[ MaxEquation ] = gl.MAX; + + const factorToGL = { + [ ZeroFactor ]: gl.ZERO, + [ OneFactor ]: gl.ONE, + [ SrcColorFactor ]: gl.SRC_COLOR, + [ SrcAlphaFactor ]: gl.SRC_ALPHA, + [ SrcAlphaSaturateFactor ]: gl.SRC_ALPHA_SATURATE, + [ DstColorFactor ]: gl.DST_COLOR, + [ DstAlphaFactor ]: gl.DST_ALPHA, + [ OneMinusSrcColorFactor ]: gl.ONE_MINUS_SRC_COLOR, + [ OneMinusSrcAlphaFactor ]: gl.ONE_MINUS_SRC_ALPHA, + [ OneMinusDstColorFactor ]: gl.ONE_MINUS_DST_COLOR, + [ OneMinusDstAlphaFactor ]: gl.ONE_MINUS_DST_ALPHA, + [ ConstantColorFactor ]: gl.CONSTANT_COLOR, + [ OneMinusConstantColorFactor ]: gl.ONE_MINUS_CONSTANT_COLOR, + [ ConstantAlphaFactor ]: gl.CONSTANT_ALPHA, + [ OneMinusConstantAlphaFactor ]: gl.ONE_MINUS_CONSTANT_ALPHA + }; + + function setBlending( blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, blendColor, blendAlpha, premultipliedAlpha ) { + + if ( blending === NoBlending ) { + + if ( currentBlendingEnabled === true ) { + + disable( gl.BLEND ); + currentBlendingEnabled = false; + + } + + return; + + } + + if ( currentBlendingEnabled === false ) { + + enable( gl.BLEND ); + currentBlendingEnabled = true; + + } + + if ( blending !== CustomBlending ) { + + if ( blending !== currentBlending || premultipliedAlpha !== currentPremultipledAlpha ) { + + if ( currentBlendEquation !== AddEquation || currentBlendEquationAlpha !== AddEquation ) { + + gl.blendEquation( gl.FUNC_ADD ); + + currentBlendEquation = AddEquation; + currentBlendEquationAlpha = AddEquation; + + } + + if ( premultipliedAlpha ) { + + switch ( blending ) { + + case NormalBlending: + gl.blendFuncSeparate( gl.ONE, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA ); + break; + + case AdditiveBlending: + gl.blendFunc( gl.ONE, gl.ONE ); + break; + + case SubtractiveBlending: + gl.blendFuncSeparate( gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE ); + break; + + case MultiplyBlending: + gl.blendFuncSeparate( gl.ZERO, gl.SRC_COLOR, gl.ZERO, gl.SRC_ALPHA ); + break; + + default: + console.error( 'THREE.WebGLState: Invalid blending: ', blending ); + break; + + } + + } else { + + switch ( blending ) { + + case NormalBlending: + gl.blendFuncSeparate( gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA ); + break; + + case AdditiveBlending: + gl.blendFunc( gl.SRC_ALPHA, gl.ONE ); + break; + + case SubtractiveBlending: + gl.blendFuncSeparate( gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE ); + break; + + case MultiplyBlending: + gl.blendFunc( gl.ZERO, gl.SRC_COLOR ); + break; + + default: + console.error( 'THREE.WebGLState: Invalid blending: ', blending ); + break; + + } + + } + + currentBlendSrc = null; + currentBlendDst = null; + currentBlendSrcAlpha = null; + currentBlendDstAlpha = null; + currentBlendColor.set( 0, 0, 0 ); + currentBlendAlpha = 0; + + currentBlending = blending; + currentPremultipledAlpha = premultipliedAlpha; + + } + + return; + + } + + // custom blending + + blendEquationAlpha = blendEquationAlpha || blendEquation; + blendSrcAlpha = blendSrcAlpha || blendSrc; + blendDstAlpha = blendDstAlpha || blendDst; + + if ( blendEquation !== currentBlendEquation || blendEquationAlpha !== currentBlendEquationAlpha ) { + + gl.blendEquationSeparate( equationToGL[ blendEquation ], equationToGL[ blendEquationAlpha ] ); + + currentBlendEquation = blendEquation; + currentBlendEquationAlpha = blendEquationAlpha; + + } + + if ( blendSrc !== currentBlendSrc || blendDst !== currentBlendDst || blendSrcAlpha !== currentBlendSrcAlpha || blendDstAlpha !== currentBlendDstAlpha ) { + + gl.blendFuncSeparate( factorToGL[ blendSrc ], factorToGL[ blendDst ], factorToGL[ blendSrcAlpha ], factorToGL[ blendDstAlpha ] ); + + currentBlendSrc = blendSrc; + currentBlendDst = blendDst; + currentBlendSrcAlpha = blendSrcAlpha; + currentBlendDstAlpha = blendDstAlpha; + + } + + if ( blendColor.equals( currentBlendColor ) === false || blendAlpha !== currentBlendAlpha ) { + + gl.blendColor( blendColor.r, blendColor.g, blendColor.b, blendAlpha ); + + currentBlendColor.copy( blendColor ); + currentBlendAlpha = blendAlpha; + + } + + currentBlending = blending; + currentPremultipledAlpha = false; + + } + + function setMaterial( material, frontFaceCW ) { + + material.side === DoubleSide + ? disable( gl.CULL_FACE ) + : enable( gl.CULL_FACE ); + + let flipSided = ( material.side === BackSide ); + if ( frontFaceCW ) flipSided = ! flipSided; + + setFlipSided( flipSided ); + + ( material.blending === NormalBlending && material.transparent === false ) + ? setBlending( NoBlending ) + : setBlending( material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.blendColor, material.blendAlpha, material.premultipliedAlpha ); + + depthBuffer.setFunc( material.depthFunc ); + depthBuffer.setTest( material.depthTest ); + depthBuffer.setMask( material.depthWrite ); + colorBuffer.setMask( material.colorWrite ); + + const stencilWrite = material.stencilWrite; + stencilBuffer.setTest( stencilWrite ); + if ( stencilWrite ) { + + stencilBuffer.setMask( material.stencilWriteMask ); + stencilBuffer.setFunc( material.stencilFunc, material.stencilRef, material.stencilFuncMask ); + stencilBuffer.setOp( material.stencilFail, material.stencilZFail, material.stencilZPass ); + + } + + setPolygonOffset( material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits ); + + material.alphaToCoverage === true + ? enable( gl.SAMPLE_ALPHA_TO_COVERAGE ) + : disable( gl.SAMPLE_ALPHA_TO_COVERAGE ); + + } + + // + + function setFlipSided( flipSided ) { + + if ( currentFlipSided !== flipSided ) { + + if ( flipSided ) { + + gl.frontFace( gl.CW ); + + } else { + + gl.frontFace( gl.CCW ); + + } + + currentFlipSided = flipSided; + + } + + } + + function setCullFace( cullFace ) { + + if ( cullFace !== CullFaceNone ) { + + enable( gl.CULL_FACE ); + + if ( cullFace !== currentCullFace ) { + + if ( cullFace === CullFaceBack ) { + + gl.cullFace( gl.BACK ); + + } else if ( cullFace === CullFaceFront ) { + + gl.cullFace( gl.FRONT ); + + } else { + + gl.cullFace( gl.FRONT_AND_BACK ); + + } + + } + + } else { + + disable( gl.CULL_FACE ); + + } + + currentCullFace = cullFace; + + } + + function setLineWidth( width ) { + + if ( width !== currentLineWidth ) { + + if ( lineWidthAvailable ) gl.lineWidth( width ); + + currentLineWidth = width; + + } + + } + + function setPolygonOffset( polygonOffset, factor, units ) { + + if ( polygonOffset ) { + + enable( gl.POLYGON_OFFSET_FILL ); + + if ( currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units ) { + + gl.polygonOffset( factor, units ); + + currentPolygonOffsetFactor = factor; + currentPolygonOffsetUnits = units; + + } + + } else { + + disable( gl.POLYGON_OFFSET_FILL ); + + } + + } + + function setScissorTest( scissorTest ) { + + if ( scissorTest ) { + + enable( gl.SCISSOR_TEST ); + + } else { + + disable( gl.SCISSOR_TEST ); + + } + + } + + // texture + + function activeTexture( webglSlot ) { + + if ( webglSlot === undefined ) webglSlot = gl.TEXTURE0 + maxTextures - 1; + + if ( currentTextureSlot !== webglSlot ) { + + gl.activeTexture( webglSlot ); + currentTextureSlot = webglSlot; + + } + + } + + function bindTexture( webglType, webglTexture, webglSlot ) { + + if ( webglSlot === undefined ) { + + if ( currentTextureSlot === null ) { + + webglSlot = gl.TEXTURE0 + maxTextures - 1; + + } else { + + webglSlot = currentTextureSlot; + + } + + } + + let boundTexture = currentBoundTextures[ webglSlot ]; + + if ( boundTexture === undefined ) { + + boundTexture = { type: undefined, texture: undefined }; + currentBoundTextures[ webglSlot ] = boundTexture; + + } + + if ( boundTexture.type !== webglType || boundTexture.texture !== webglTexture ) { + + if ( currentTextureSlot !== webglSlot ) { + + gl.activeTexture( webglSlot ); + currentTextureSlot = webglSlot; + + } + + gl.bindTexture( webglType, webglTexture || emptyTextures[ webglType ] ); + + boundTexture.type = webglType; + boundTexture.texture = webglTexture; + + } + + } + + function unbindTexture() { + + const boundTexture = currentBoundTextures[ currentTextureSlot ]; + + if ( boundTexture !== undefined && boundTexture.type !== undefined ) { + + gl.bindTexture( boundTexture.type, null ); + + boundTexture.type = undefined; + boundTexture.texture = undefined; + + } + + } + + function compressedTexImage2D() { + + try { + + gl.compressedTexImage2D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function compressedTexImage3D() { + + try { + + gl.compressedTexImage3D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function texSubImage2D() { + + try { + + gl.texSubImage2D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function texSubImage3D() { + + try { + + gl.texSubImage3D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function compressedTexSubImage2D() { + + try { + + gl.compressedTexSubImage2D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function compressedTexSubImage3D() { + + try { + + gl.compressedTexSubImage3D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function texStorage2D() { + + try { + + gl.texStorage2D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function texStorage3D() { + + try { + + gl.texStorage3D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function texImage2D() { + + try { + + gl.texImage2D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function texImage3D() { + + try { + + gl.texImage3D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + // + + function scissor( scissor ) { + + if ( currentScissor.equals( scissor ) === false ) { + + gl.scissor( scissor.x, scissor.y, scissor.z, scissor.w ); + currentScissor.copy( scissor ); + + } + + } + + function viewport( viewport ) { + + if ( currentViewport.equals( viewport ) === false ) { + + gl.viewport( viewport.x, viewport.y, viewport.z, viewport.w ); + currentViewport.copy( viewport ); + + } + + } + + function updateUBOMapping( uniformsGroup, program ) { + + let mapping = uboProgramMap.get( program ); + + if ( mapping === undefined ) { + + mapping = new WeakMap(); + + uboProgramMap.set( program, mapping ); + + } + + let blockIndex = mapping.get( uniformsGroup ); + + if ( blockIndex === undefined ) { + + blockIndex = gl.getUniformBlockIndex( program, uniformsGroup.name ); + + mapping.set( uniformsGroup, blockIndex ); + + } + + } + + function uniformBlockBinding( uniformsGroup, program ) { + + const mapping = uboProgramMap.get( program ); + const blockIndex = mapping.get( uniformsGroup ); + + if ( uboBindings.get( program ) !== blockIndex ) { + + // bind shader specific block index to global block point + gl.uniformBlockBinding( program, blockIndex, uniformsGroup.__bindingPointIndex ); + + uboBindings.set( program, blockIndex ); + + } + + } + + // + + function reset() { + + // reset state + + gl.disable( gl.BLEND ); + gl.disable( gl.CULL_FACE ); + gl.disable( gl.DEPTH_TEST ); + gl.disable( gl.POLYGON_OFFSET_FILL ); + gl.disable( gl.SCISSOR_TEST ); + gl.disable( gl.STENCIL_TEST ); + gl.disable( gl.SAMPLE_ALPHA_TO_COVERAGE ); + + gl.blendEquation( gl.FUNC_ADD ); + gl.blendFunc( gl.ONE, gl.ZERO ); + gl.blendFuncSeparate( gl.ONE, gl.ZERO, gl.ONE, gl.ZERO ); + gl.blendColor( 0, 0, 0, 0 ); + + gl.colorMask( true, true, true, true ); + gl.clearColor( 0, 0, 0, 0 ); + + gl.depthMask( true ); + gl.depthFunc( gl.LESS ); + gl.clearDepth( 1 ); + + gl.stencilMask( 0xffffffff ); + gl.stencilFunc( gl.ALWAYS, 0, 0xffffffff ); + gl.stencilOp( gl.KEEP, gl.KEEP, gl.KEEP ); + gl.clearStencil( 0 ); + + gl.cullFace( gl.BACK ); + gl.frontFace( gl.CCW ); + + gl.polygonOffset( 0, 0 ); + + gl.activeTexture( gl.TEXTURE0 ); + + gl.bindFramebuffer( gl.FRAMEBUFFER, null ); + gl.bindFramebuffer( gl.DRAW_FRAMEBUFFER, null ); + gl.bindFramebuffer( gl.READ_FRAMEBUFFER, null ); + + gl.useProgram( null ); + + gl.lineWidth( 1 ); + + gl.scissor( 0, 0, gl.canvas.width, gl.canvas.height ); + gl.viewport( 0, 0, gl.canvas.width, gl.canvas.height ); + + // reset internals + + enabledCapabilities = {}; + + currentTextureSlot = null; + currentBoundTextures = {}; + + currentBoundFramebuffers = {}; + currentDrawbuffers = new WeakMap(); + defaultDrawbuffers = []; + + currentProgram = null; + + currentBlendingEnabled = false; + currentBlending = null; + currentBlendEquation = null; + currentBlendSrc = null; + currentBlendDst = null; + currentBlendEquationAlpha = null; + currentBlendSrcAlpha = null; + currentBlendDstAlpha = null; + currentBlendColor = new Color( 0, 0, 0 ); + currentBlendAlpha = 0; + currentPremultipledAlpha = false; + + currentFlipSided = null; + currentCullFace = null; + + currentLineWidth = null; + + currentPolygonOffsetFactor = null; + currentPolygonOffsetUnits = null; + + currentScissor.set( 0, 0, gl.canvas.width, gl.canvas.height ); + currentViewport.set( 0, 0, gl.canvas.width, gl.canvas.height ); + + colorBuffer.reset(); + depthBuffer.reset(); + stencilBuffer.reset(); + + } + + return { + + buffers: { + color: colorBuffer, + depth: depthBuffer, + stencil: stencilBuffer + }, + + enable: enable, + disable: disable, + + bindFramebuffer: bindFramebuffer, + drawBuffers: drawBuffers, + + useProgram: useProgram, + + setBlending: setBlending, + setMaterial: setMaterial, + + setFlipSided: setFlipSided, + setCullFace: setCullFace, + + setLineWidth: setLineWidth, + setPolygonOffset: setPolygonOffset, + + setScissorTest: setScissorTest, + + activeTexture: activeTexture, + bindTexture: bindTexture, + unbindTexture: unbindTexture, + compressedTexImage2D: compressedTexImage2D, + compressedTexImage3D: compressedTexImage3D, + texImage2D: texImage2D, + texImage3D: texImage3D, + + updateUBOMapping: updateUBOMapping, + uniformBlockBinding: uniformBlockBinding, + + texStorage2D: texStorage2D, + texStorage3D: texStorage3D, + texSubImage2D: texSubImage2D, + texSubImage3D: texSubImage3D, + compressedTexSubImage2D: compressedTexSubImage2D, + compressedTexSubImage3D: compressedTexSubImage3D, + + scissor: scissor, + viewport: viewport, + + reset: reset + + }; + +} + +function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info ) { + + const multisampledRTTExt = extensions.has( 'WEBGL_multisampled_render_to_texture' ) ? extensions.get( 'WEBGL_multisampled_render_to_texture' ) : null; + const supportsInvalidateFramebuffer = typeof navigator === 'undefined' ? false : /OculusBrowser/g.test( navigator.userAgent ); + + const _imageDimensions = new Vector2(); + const _videoTextures = new WeakMap(); + let _canvas; + + const _sources = new WeakMap(); // maps WebglTexture objects to instances of Source + + // cordova iOS (as of 5.0) still uses UIWebView, which provides OffscreenCanvas, + // also OffscreenCanvas.getContext("webgl"), but not OffscreenCanvas.getContext("2d")! + // Some implementations may only implement OffscreenCanvas partially (e.g. lacking 2d). + + let useOffscreenCanvas = false; + + try { + + useOffscreenCanvas = typeof OffscreenCanvas !== 'undefined' + // eslint-disable-next-line compat/compat + && ( new OffscreenCanvas( 1, 1 ).getContext( '2d' ) ) !== null; + + } catch ( err ) { + + // Ignore any errors + + } + + function createCanvas( width, height ) { + + // Use OffscreenCanvas when available. Specially needed in web workers + + return useOffscreenCanvas ? + // eslint-disable-next-line compat/compat + new OffscreenCanvas( width, height ) : createElementNS( 'canvas' ); + + } + + function resizeImage( image, needsNewCanvas, maxSize ) { + + let scale = 1; + + const dimensions = getDimensions( image ); + + // handle case if texture exceeds max size + + if ( dimensions.width > maxSize || dimensions.height > maxSize ) { + + scale = maxSize / Math.max( dimensions.width, dimensions.height ); + + } + + // only perform resize if necessary + + if ( scale < 1 ) { + + // only perform resize for certain image types + + if ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) || + ( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) || + ( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) || + ( typeof VideoFrame !== 'undefined' && image instanceof VideoFrame ) ) { + + const width = Math.floor( scale * dimensions.width ); + const height = Math.floor( scale * dimensions.height ); + + if ( _canvas === undefined ) _canvas = createCanvas( width, height ); + + // cube textures can't reuse the same canvas + + const canvas = needsNewCanvas ? createCanvas( width, height ) : _canvas; + + canvas.width = width; + canvas.height = height; + + const context = canvas.getContext( '2d' ); + context.drawImage( image, 0, 0, width, height ); + + console.warn( 'THREE.WebGLRenderer: Texture has been resized from (' + dimensions.width + 'x' + dimensions.height + ') to (' + width + 'x' + height + ').' ); + + return canvas; + + } else { + + if ( 'data' in image ) { + + console.warn( 'THREE.WebGLRenderer: Image in DataTexture is too big (' + dimensions.width + 'x' + dimensions.height + ').' ); + + } + + return image; + + } + + } + + return image; + + } + + function textureNeedsGenerateMipmaps( texture ) { + + return texture.generateMipmaps && texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter; + + } + + function generateMipmap( target ) { + + _gl.generateMipmap( target ); + + } + + function getInternalFormat( internalFormatName, glFormat, glType, colorSpace, forceLinearTransfer = false ) { + + if ( internalFormatName !== null ) { + + if ( _gl[ internalFormatName ] !== undefined ) return _gl[ internalFormatName ]; + + console.warn( 'THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \'' + internalFormatName + '\'' ); + + } + + let internalFormat = glFormat; + + if ( glFormat === _gl.RED ) { + + if ( glType === _gl.FLOAT ) internalFormat = _gl.R32F; + if ( glType === _gl.HALF_FLOAT ) internalFormat = _gl.R16F; + if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.R8; + + } + + if ( glFormat === _gl.RED_INTEGER ) { + + if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.R8UI; + if ( glType === _gl.UNSIGNED_SHORT ) internalFormat = _gl.R16UI; + if ( glType === _gl.UNSIGNED_INT ) internalFormat = _gl.R32UI; + if ( glType === _gl.BYTE ) internalFormat = _gl.R8I; + if ( glType === _gl.SHORT ) internalFormat = _gl.R16I; + if ( glType === _gl.INT ) internalFormat = _gl.R32I; + + } + + if ( glFormat === _gl.RG ) { + + if ( glType === _gl.FLOAT ) internalFormat = _gl.RG32F; + if ( glType === _gl.HALF_FLOAT ) internalFormat = _gl.RG16F; + if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.RG8; + + } + + if ( glFormat === _gl.RG_INTEGER ) { + + if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.RG8UI; + if ( glType === _gl.UNSIGNED_SHORT ) internalFormat = _gl.RG16UI; + if ( glType === _gl.UNSIGNED_INT ) internalFormat = _gl.RG32UI; + if ( glType === _gl.BYTE ) internalFormat = _gl.RG8I; + if ( glType === _gl.SHORT ) internalFormat = _gl.RG16I; + if ( glType === _gl.INT ) internalFormat = _gl.RG32I; + + } + + if ( glFormat === _gl.RGB ) { + + if ( glType === _gl.UNSIGNED_INT_5_9_9_9_REV ) internalFormat = _gl.RGB9_E5; + + } + + if ( glFormat === _gl.RGBA ) { + + const transfer = forceLinearTransfer ? LinearTransfer : ColorManagement.getTransfer( colorSpace ); + + if ( glType === _gl.FLOAT ) internalFormat = _gl.RGBA32F; + if ( glType === _gl.HALF_FLOAT ) internalFormat = _gl.RGBA16F; + if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = ( transfer === SRGBTransfer ) ? _gl.SRGB8_ALPHA8 : _gl.RGBA8; + if ( glType === _gl.UNSIGNED_SHORT_4_4_4_4 ) internalFormat = _gl.RGBA4; + if ( glType === _gl.UNSIGNED_SHORT_5_5_5_1 ) internalFormat = _gl.RGB5_A1; + + } + + if ( internalFormat === _gl.R16F || internalFormat === _gl.R32F || + internalFormat === _gl.RG16F || internalFormat === _gl.RG32F || + internalFormat === _gl.RGBA16F || internalFormat === _gl.RGBA32F ) { + + extensions.get( 'EXT_color_buffer_float' ); + + } + + return internalFormat; + + } + + function getMipLevels( texture, image ) { + + if ( textureNeedsGenerateMipmaps( texture ) === true || ( texture.isFramebufferTexture && texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter ) ) { + + return Math.log2( Math.max( image.width, image.height ) ) + 1; + + } else if ( texture.mipmaps !== undefined && texture.mipmaps.length > 0 ) { + + // user-defined mipmaps + + return texture.mipmaps.length; + + } else if ( texture.isCompressedTexture && Array.isArray( texture.image ) ) { + + return image.mipmaps.length; + + } else { + + // texture without mipmaps (only base level) + + return 1; + + } + + } + + // + + function onTextureDispose( event ) { + + const texture = event.target; + + texture.removeEventListener( 'dispose', onTextureDispose ); + + deallocateTexture( texture ); + + if ( texture.isVideoTexture ) { + + _videoTextures.delete( texture ); + + } + + } + + function onRenderTargetDispose( event ) { + + const renderTarget = event.target; + + renderTarget.removeEventListener( 'dispose', onRenderTargetDispose ); + + deallocateRenderTarget( renderTarget ); + + } + + // + + function deallocateTexture( texture ) { + + const textureProperties = properties.get( texture ); + + if ( textureProperties.__webglInit === undefined ) return; + + // check if it's necessary to remove the WebGLTexture object + + const source = texture.source; + const webglTextures = _sources.get( source ); + + if ( webglTextures ) { + + const webglTexture = webglTextures[ textureProperties.__cacheKey ]; + webglTexture.usedTimes --; + + // the WebGLTexture object is not used anymore, remove it + + if ( webglTexture.usedTimes === 0 ) { + + deleteTexture( texture ); + + } + + // remove the weak map entry if no WebGLTexture uses the source anymore + + if ( Object.keys( webglTextures ).length === 0 ) { + + _sources.delete( source ); + + } + + } + + properties.remove( texture ); + + } + + function deleteTexture( texture ) { + + const textureProperties = properties.get( texture ); + _gl.deleteTexture( textureProperties.__webglTexture ); + + const source = texture.source; + const webglTextures = _sources.get( source ); + delete webglTextures[ textureProperties.__cacheKey ]; + + info.memory.textures --; + + } + + function deallocateRenderTarget( renderTarget ) { + + const renderTargetProperties = properties.get( renderTarget ); + + if ( renderTarget.depthTexture ) { + + renderTarget.depthTexture.dispose(); + + } + + if ( renderTarget.isWebGLCubeRenderTarget ) { + + for ( let i = 0; i < 6; i ++ ) { + + if ( Array.isArray( renderTargetProperties.__webglFramebuffer[ i ] ) ) { + + for ( let level = 0; level < renderTargetProperties.__webglFramebuffer[ i ].length; level ++ ) _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ][ level ] ); + + } else { + + _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ] ); + + } + + if ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer[ i ] ); + + } + + } else { + + if ( Array.isArray( renderTargetProperties.__webglFramebuffer ) ) { + + for ( let level = 0; level < renderTargetProperties.__webglFramebuffer.length; level ++ ) _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ level ] ); + + } else { + + _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer ); + + } + + if ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer ); + if ( renderTargetProperties.__webglMultisampledFramebuffer ) _gl.deleteFramebuffer( renderTargetProperties.__webglMultisampledFramebuffer ); + + if ( renderTargetProperties.__webglColorRenderbuffer ) { + + for ( let i = 0; i < renderTargetProperties.__webglColorRenderbuffer.length; i ++ ) { + + if ( renderTargetProperties.__webglColorRenderbuffer[ i ] ) _gl.deleteRenderbuffer( renderTargetProperties.__webglColorRenderbuffer[ i ] ); + + } + + } + + if ( renderTargetProperties.__webglDepthRenderbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthRenderbuffer ); + + } + + const textures = renderTarget.textures; + + for ( let i = 0, il = textures.length; i < il; i ++ ) { + + const attachmentProperties = properties.get( textures[ i ] ); + + if ( attachmentProperties.__webglTexture ) { + + _gl.deleteTexture( attachmentProperties.__webglTexture ); + + info.memory.textures --; + + } + + properties.remove( textures[ i ] ); + + } + + properties.remove( renderTarget ); + + } + + // + + let textureUnits = 0; + + function resetTextureUnits() { + + textureUnits = 0; + + } + + function allocateTextureUnit() { + + const textureUnit = textureUnits; + + if ( textureUnit >= capabilities.maxTextures ) { + + console.warn( 'THREE.WebGLTextures: Trying to use ' + textureUnit + ' texture units while this GPU supports only ' + capabilities.maxTextures ); + + } + + textureUnits += 1; + + return textureUnit; + + } + + function getTextureCacheKey( texture ) { + + const array = []; + + array.push( texture.wrapS ); + array.push( texture.wrapT ); + array.push( texture.wrapR || 0 ); + array.push( texture.magFilter ); + array.push( texture.minFilter ); + array.push( texture.anisotropy ); + array.push( texture.internalFormat ); + array.push( texture.format ); + array.push( texture.type ); + array.push( texture.generateMipmaps ); + array.push( texture.premultiplyAlpha ); + array.push( texture.flipY ); + array.push( texture.unpackAlignment ); + array.push( texture.colorSpace ); + + return array.join(); + + } + + // + + function setTexture2D( texture, slot ) { + + const textureProperties = properties.get( texture ); + + if ( texture.isVideoTexture ) updateVideoTexture( texture ); + + if ( texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version ) { + + const image = texture.image; + + if ( image === null ) { + + console.warn( 'THREE.WebGLRenderer: Texture marked for update but no image data found.' ); + + } else if ( image.complete === false ) { + + console.warn( 'THREE.WebGLRenderer: Texture marked for update but image is incomplete' ); + + } else { + + uploadTexture( textureProperties, texture, slot ); + return; + + } + + } + + state.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot ); + + } + + function setTexture2DArray( texture, slot ) { + + const textureProperties = properties.get( texture ); + + if ( texture.version > 0 && textureProperties.__version !== texture.version ) { + + uploadTexture( textureProperties, texture, slot ); + return; + + } + + state.bindTexture( _gl.TEXTURE_2D_ARRAY, textureProperties.__webglTexture, _gl.TEXTURE0 + slot ); + + } + + function setTexture3D( texture, slot ) { + + const textureProperties = properties.get( texture ); + + if ( texture.version > 0 && textureProperties.__version !== texture.version ) { + + uploadTexture( textureProperties, texture, slot ); + return; + + } + + state.bindTexture( _gl.TEXTURE_3D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot ); + + } + + function setTextureCube( texture, slot ) { + + const textureProperties = properties.get( texture ); + + if ( texture.version > 0 && textureProperties.__version !== texture.version ) { + + uploadCubeTexture( textureProperties, texture, slot ); + return; + + } + + state.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot ); + + } + + const wrappingToGL = { + [ RepeatWrapping ]: _gl.REPEAT, + [ ClampToEdgeWrapping ]: _gl.CLAMP_TO_EDGE, + [ MirroredRepeatWrapping ]: _gl.MIRRORED_REPEAT + }; + + const filterToGL = { + [ NearestFilter ]: _gl.NEAREST, + [ NearestMipmapNearestFilter ]: _gl.NEAREST_MIPMAP_NEAREST, + [ NearestMipmapLinearFilter ]: _gl.NEAREST_MIPMAP_LINEAR, + + [ LinearFilter ]: _gl.LINEAR, + [ LinearMipmapNearestFilter ]: _gl.LINEAR_MIPMAP_NEAREST, + [ LinearMipmapLinearFilter ]: _gl.LINEAR_MIPMAP_LINEAR + }; + + const compareToGL = { + [ NeverCompare ]: _gl.NEVER, + [ AlwaysCompare ]: _gl.ALWAYS, + [ LessCompare ]: _gl.LESS, + [ LessEqualCompare ]: _gl.LEQUAL, + [ EqualCompare ]: _gl.EQUAL, + [ GreaterEqualCompare ]: _gl.GEQUAL, + [ GreaterCompare ]: _gl.GREATER, + [ NotEqualCompare ]: _gl.NOTEQUAL + }; + + function setTextureParameters( textureType, texture ) { + + if ( texture.type === FloatType && extensions.has( 'OES_texture_float_linear' ) === false && + ( texture.magFilter === LinearFilter || texture.magFilter === LinearMipmapNearestFilter || texture.magFilter === NearestMipmapLinearFilter || texture.magFilter === LinearMipmapLinearFilter || + texture.minFilter === LinearFilter || texture.minFilter === LinearMipmapNearestFilter || texture.minFilter === NearestMipmapLinearFilter || texture.minFilter === LinearMipmapLinearFilter ) ) { + + console.warn( 'THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.' ); + + } + + _gl.texParameteri( textureType, _gl.TEXTURE_WRAP_S, wrappingToGL[ texture.wrapS ] ); + _gl.texParameteri( textureType, _gl.TEXTURE_WRAP_T, wrappingToGL[ texture.wrapT ] ); + + if ( textureType === _gl.TEXTURE_3D || textureType === _gl.TEXTURE_2D_ARRAY ) { + + _gl.texParameteri( textureType, _gl.TEXTURE_WRAP_R, wrappingToGL[ texture.wrapR ] ); + + } + + _gl.texParameteri( textureType, _gl.TEXTURE_MAG_FILTER, filterToGL[ texture.magFilter ] ); + _gl.texParameteri( textureType, _gl.TEXTURE_MIN_FILTER, filterToGL[ texture.minFilter ] ); + + if ( texture.compareFunction ) { + + _gl.texParameteri( textureType, _gl.TEXTURE_COMPARE_MODE, _gl.COMPARE_REF_TO_TEXTURE ); + _gl.texParameteri( textureType, _gl.TEXTURE_COMPARE_FUNC, compareToGL[ texture.compareFunction ] ); + + } + + if ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) { + + if ( texture.magFilter === NearestFilter ) return; + if ( texture.minFilter !== NearestMipmapLinearFilter && texture.minFilter !== LinearMipmapLinearFilter ) return; + if ( texture.type === FloatType && extensions.has( 'OES_texture_float_linear' ) === false ) return; // verify extension + + if ( texture.anisotropy > 1 || properties.get( texture ).__currentAnisotropy ) { + + const extension = extensions.get( 'EXT_texture_filter_anisotropic' ); + _gl.texParameterf( textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min( texture.anisotropy, capabilities.getMaxAnisotropy() ) ); + properties.get( texture ).__currentAnisotropy = texture.anisotropy; + + } + + } + + } + + function initTexture( textureProperties, texture ) { + + let forceUpload = false; + + if ( textureProperties.__webglInit === undefined ) { + + textureProperties.__webglInit = true; + + texture.addEventListener( 'dispose', onTextureDispose ); + + } + + // create Source <-> WebGLTextures mapping if necessary + + const source = texture.source; + let webglTextures = _sources.get( source ); + + if ( webglTextures === undefined ) { + + webglTextures = {}; + _sources.set( source, webglTextures ); + + } + + // check if there is already a WebGLTexture object for the given texture parameters + + const textureCacheKey = getTextureCacheKey( texture ); + + if ( textureCacheKey !== textureProperties.__cacheKey ) { + + // if not, create a new instance of WebGLTexture + + if ( webglTextures[ textureCacheKey ] === undefined ) { + + // create new entry + + webglTextures[ textureCacheKey ] = { + texture: _gl.createTexture(), + usedTimes: 0 + }; + + info.memory.textures ++; + + // when a new instance of WebGLTexture was created, a texture upload is required + // even if the image contents are identical + + forceUpload = true; + + } + + webglTextures[ textureCacheKey ].usedTimes ++; + + // every time the texture cache key changes, it's necessary to check if an instance of + // WebGLTexture can be deleted in order to avoid a memory leak. + + const webglTexture = webglTextures[ textureProperties.__cacheKey ]; + + if ( webglTexture !== undefined ) { + + webglTextures[ textureProperties.__cacheKey ].usedTimes --; + + if ( webglTexture.usedTimes === 0 ) { + + deleteTexture( texture ); + + } + + } + + // store references to cache key and WebGLTexture object + + textureProperties.__cacheKey = textureCacheKey; + textureProperties.__webglTexture = webglTextures[ textureCacheKey ].texture; + + } + + return forceUpload; + + } + + function uploadTexture( textureProperties, texture, slot ) { + + let textureType = _gl.TEXTURE_2D; + + if ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) textureType = _gl.TEXTURE_2D_ARRAY; + if ( texture.isData3DTexture ) textureType = _gl.TEXTURE_3D; + + const forceUpload = initTexture( textureProperties, texture ); + const source = texture.source; + + state.bindTexture( textureType, textureProperties.__webglTexture, _gl.TEXTURE0 + slot ); + + const sourceProperties = properties.get( source ); + + if ( source.version !== sourceProperties.__version || forceUpload === true ) { + + state.activeTexture( _gl.TEXTURE0 + slot ); + + const workingPrimaries = ColorManagement.getPrimaries( ColorManagement.workingColorSpace ); + const texturePrimaries = texture.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries( texture.colorSpace ); + const unpackConversion = texture.colorSpace === NoColorSpace || workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL; + + _gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY ); + _gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha ); + _gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment ); + _gl.pixelStorei( _gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, unpackConversion ); + + let image = resizeImage( texture.image, false, capabilities.maxTextureSize ); + image = verifyColorSpace( texture, image ); + + const glFormat = utils.convert( texture.format, texture.colorSpace ); + + const glType = utils.convert( texture.type ); + let glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace, texture.isVideoTexture ); + + setTextureParameters( textureType, texture ); + + let mipmap; + const mipmaps = texture.mipmaps; + + const useTexStorage = ( texture.isVideoTexture !== true ); + const allocateMemory = ( sourceProperties.__version === undefined ) || ( forceUpload === true ); + const dataReady = source.dataReady; + const levels = getMipLevels( texture, image ); + + if ( texture.isDepthTexture ) { + + // populate depth texture with dummy data + + glInternalFormat = _gl.DEPTH_COMPONENT16; + + if ( texture.type === FloatType ) { + + glInternalFormat = _gl.DEPTH_COMPONENT32F; + + } else if ( texture.type === UnsignedIntType ) { + + glInternalFormat = _gl.DEPTH_COMPONENT24; + + } else if ( texture.type === UnsignedInt248Type ) { + + glInternalFormat = _gl.DEPTH24_STENCIL8; + + } + + // + + if ( allocateMemory ) { + + if ( useTexStorage ) { + + state.texStorage2D( _gl.TEXTURE_2D, 1, glInternalFormat, image.width, image.height ); + + } else { + + state.texImage2D( _gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, null ); + + } + + } + + } else if ( texture.isDataTexture ) { + + // use manually created mipmaps if available + // if there are no manual mipmaps + // set 0 level mipmap and then use GL to generate other mipmap levels + + if ( mipmaps.length > 0 ) { + + if ( useTexStorage && allocateMemory ) { + + state.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height ); + + } + + for ( let i = 0, il = mipmaps.length; i < il; i ++ ) { + + mipmap = mipmaps[ i ]; + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data ); + + } + + } + + texture.generateMipmaps = false; + + } else { + + if ( useTexStorage ) { + + if ( allocateMemory ) { + + state.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height ); + + } + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_2D, 0, 0, 0, image.width, image.height, glFormat, glType, image.data ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, image.data ); + + } + + } + + } else if ( texture.isCompressedTexture ) { + + if ( texture.isCompressedArrayTexture ) { + + if ( useTexStorage && allocateMemory ) { + + state.texStorage3D( _gl.TEXTURE_2D_ARRAY, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height, image.depth ); + + } + + for ( let i = 0, il = mipmaps.length; i < il; i ++ ) { + + mipmap = mipmaps[ i ]; + + if ( texture.format !== RGBAFormat ) { + + if ( glFormat !== null ) { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.compressedTexSubImage3D( _gl.TEXTURE_2D_ARRAY, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, mipmap.data, 0, 0 ); + + } + + } else { + + state.compressedTexImage3D( _gl.TEXTURE_2D_ARRAY, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, mipmap.data, 0, 0 ); + + } + + } else { + + console.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()' ); + + } + + } else { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage3D( _gl.TEXTURE_2D_ARRAY, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, glType, mipmap.data ); + + } + + } else { + + state.texImage3D( _gl.TEXTURE_2D_ARRAY, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, glFormat, glType, mipmap.data ); + + } + + } + + } + + } else { + + if ( useTexStorage && allocateMemory ) { + + state.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height ); + + } + + for ( let i = 0, il = mipmaps.length; i < il; i ++ ) { + + mipmap = mipmaps[ i ]; + + if ( texture.format !== RGBAFormat ) { + + if ( glFormat !== null ) { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.compressedTexSubImage2D( _gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data ); + + } + + } else { + + state.compressedTexImage2D( _gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data ); + + } + + } else { + + console.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()' ); + + } + + } else { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data ); + + } + + } + + } + + } + + } else if ( texture.isDataArrayTexture ) { + + if ( useTexStorage ) { + + if ( allocateMemory ) { + + state.texStorage3D( _gl.TEXTURE_2D_ARRAY, levels, glInternalFormat, image.width, image.height, image.depth ); + + } + + if ( dataReady ) { + + state.texSubImage3D( _gl.TEXTURE_2D_ARRAY, 0, 0, 0, 0, image.width, image.height, image.depth, glFormat, glType, image.data ); + + } + + } else { + + state.texImage3D( _gl.TEXTURE_2D_ARRAY, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data ); + + } + + } else if ( texture.isData3DTexture ) { + + if ( useTexStorage ) { + + if ( allocateMemory ) { + + state.texStorage3D( _gl.TEXTURE_3D, levels, glInternalFormat, image.width, image.height, image.depth ); + + } + + if ( dataReady ) { + + state.texSubImage3D( _gl.TEXTURE_3D, 0, 0, 0, 0, image.width, image.height, image.depth, glFormat, glType, image.data ); + + } + + } else { + + state.texImage3D( _gl.TEXTURE_3D, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data ); + + } + + } else if ( texture.isFramebufferTexture ) { + + if ( allocateMemory ) { + + if ( useTexStorage ) { + + state.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height ); + + } else { + + let width = image.width, height = image.height; + + for ( let i = 0; i < levels; i ++ ) { + + state.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, width, height, 0, glFormat, glType, null ); + + width >>= 1; + height >>= 1; + + } + + } + + } + + } else { + + // regular Texture (image, video, canvas) + + // use manually created mipmaps if available + // if there are no manual mipmaps + // set 0 level mipmap and then use GL to generate other mipmap levels + + if ( mipmaps.length > 0 ) { + + if ( useTexStorage && allocateMemory ) { + + const dimensions = getDimensions( mipmaps[ 0 ] ); + + state.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, dimensions.width, dimensions.height ); + + } + + for ( let i = 0, il = mipmaps.length; i < il; i ++ ) { + + mipmap = mipmaps[ i ]; + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_2D, i, 0, 0, glFormat, glType, mipmap ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, glFormat, glType, mipmap ); + + } + + } + + texture.generateMipmaps = false; + + } else { + + if ( useTexStorage ) { + + if ( allocateMemory ) { + + const dimensions = getDimensions( image ); + + state.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, dimensions.width, dimensions.height ); + + } + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_2D, 0, 0, 0, glFormat, glType, image ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_2D, 0, glInternalFormat, glFormat, glType, image ); + + } + + } + + } + + if ( textureNeedsGenerateMipmaps( texture ) ) { + + generateMipmap( textureType ); + + } + + sourceProperties.__version = source.version; + + if ( texture.onUpdate ) texture.onUpdate( texture ); + + } + + textureProperties.__version = texture.version; + + } + + function uploadCubeTexture( textureProperties, texture, slot ) { + + if ( texture.image.length !== 6 ) return; + + const forceUpload = initTexture( textureProperties, texture ); + const source = texture.source; + + state.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot ); + + const sourceProperties = properties.get( source ); + + if ( source.version !== sourceProperties.__version || forceUpload === true ) { + + state.activeTexture( _gl.TEXTURE0 + slot ); + + const workingPrimaries = ColorManagement.getPrimaries( ColorManagement.workingColorSpace ); + const texturePrimaries = texture.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries( texture.colorSpace ); + const unpackConversion = texture.colorSpace === NoColorSpace || workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL; + + _gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY ); + _gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha ); + _gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment ); + _gl.pixelStorei( _gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, unpackConversion ); + + const isCompressed = ( texture.isCompressedTexture || texture.image[ 0 ].isCompressedTexture ); + const isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture ); + + const cubeImage = []; + + for ( let i = 0; i < 6; i ++ ) { + + if ( ! isCompressed && ! isDataTexture ) { + + cubeImage[ i ] = resizeImage( texture.image[ i ], true, capabilities.maxCubemapSize ); + + } else { + + cubeImage[ i ] = isDataTexture ? texture.image[ i ].image : texture.image[ i ]; + + } + + cubeImage[ i ] = verifyColorSpace( texture, cubeImage[ i ] ); + + } + + const image = cubeImage[ 0 ], + glFormat = utils.convert( texture.format, texture.colorSpace ), + glType = utils.convert( texture.type ), + glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace ); + + const useTexStorage = ( texture.isVideoTexture !== true ); + const allocateMemory = ( sourceProperties.__version === undefined ) || ( forceUpload === true ); + const dataReady = source.dataReady; + let levels = getMipLevels( texture, image ); + + setTextureParameters( _gl.TEXTURE_CUBE_MAP, texture ); + + let mipmaps; + + if ( isCompressed ) { + + if ( useTexStorage && allocateMemory ) { + + state.texStorage2D( _gl.TEXTURE_CUBE_MAP, levels, glInternalFormat, image.width, image.height ); + + } + + for ( let i = 0; i < 6; i ++ ) { + + mipmaps = cubeImage[ i ].mipmaps; + + for ( let j = 0; j < mipmaps.length; j ++ ) { + + const mipmap = mipmaps[ j ]; + + if ( texture.format !== RGBAFormat ) { + + if ( glFormat !== null ) { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.compressedTexSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data ); + + } + + } else { + + state.compressedTexImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data ); + + } + + } else { + + console.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()' ); + + } + + } else { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data ); + + } + + } + + } + + } + + } else { + + mipmaps = texture.mipmaps; + + if ( useTexStorage && allocateMemory ) { + + // TODO: Uniformly handle mipmap definitions + // Normal textures and compressed cube textures define base level + mips with their mipmap array + // Uncompressed cube textures use their mipmap array only for mips (no base level) + + if ( mipmaps.length > 0 ) levels ++; + + const dimensions = getDimensions( cubeImage[ 0 ] ); + + state.texStorage2D( _gl.TEXTURE_CUBE_MAP, levels, glInternalFormat, dimensions.width, dimensions.height ); + + } + + for ( let i = 0; i < 6; i ++ ) { + + if ( isDataTexture ) { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, 0, 0, cubeImage[ i ].width, cubeImage[ i ].height, glFormat, glType, cubeImage[ i ].data ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, cubeImage[ i ].width, cubeImage[ i ].height, 0, glFormat, glType, cubeImage[ i ].data ); + + } + + for ( let j = 0; j < mipmaps.length; j ++ ) { + + const mipmap = mipmaps[ j ]; + const mipmapImage = mipmap.image[ i ].image; + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, 0, 0, mipmapImage.width, mipmapImage.height, glFormat, glType, mipmapImage.data ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, mipmapImage.width, mipmapImage.height, 0, glFormat, glType, mipmapImage.data ); + + } + + } + + } else { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, 0, 0, glFormat, glType, cubeImage[ i ] ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, glFormat, glType, cubeImage[ i ] ); + + } + + for ( let j = 0; j < mipmaps.length; j ++ ) { + + const mipmap = mipmaps[ j ]; + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, 0, 0, glFormat, glType, mipmap.image[ i ] ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, glFormat, glType, mipmap.image[ i ] ); + + } + + } + + } + + } + + } + + if ( textureNeedsGenerateMipmaps( texture ) ) { + + // We assume images for cube map have the same size. + generateMipmap( _gl.TEXTURE_CUBE_MAP ); + + } + + sourceProperties.__version = source.version; + + if ( texture.onUpdate ) texture.onUpdate( texture ); + + } + + textureProperties.__version = texture.version; + + } + + // Render targets + + // Setup storage for target texture and bind it to correct framebuffer + function setupFrameBufferTexture( framebuffer, renderTarget, texture, attachment, textureTarget, level ) { + + const glFormat = utils.convert( texture.format, texture.colorSpace ); + const glType = utils.convert( texture.type ); + const glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace ); + const renderTargetProperties = properties.get( renderTarget ); + + if ( ! renderTargetProperties.__hasExternalTextures ) { + + const width = Math.max( 1, renderTarget.width >> level ); + const height = Math.max( 1, renderTarget.height >> level ); + + if ( textureTarget === _gl.TEXTURE_3D || textureTarget === _gl.TEXTURE_2D_ARRAY ) { + + state.texImage3D( textureTarget, level, glInternalFormat, width, height, renderTarget.depth, 0, glFormat, glType, null ); + + } else { + + state.texImage2D( textureTarget, level, glInternalFormat, width, height, 0, glFormat, glType, null ); + + } + + } + + state.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer ); + + if ( useMultisampledRTT( renderTarget ) ) { + + multisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, 0, getRenderTargetSamples( renderTarget ) ); + + } else if ( textureTarget === _gl.TEXTURE_2D || ( textureTarget >= _gl.TEXTURE_CUBE_MAP_POSITIVE_X && textureTarget <= _gl.TEXTURE_CUBE_MAP_NEGATIVE_Z ) ) { // see #24753 + + _gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, level ); + + } + + state.bindFramebuffer( _gl.FRAMEBUFFER, null ); + + } + + + // Setup storage for internal depth/stencil buffers and bind to correct framebuffer + function setupRenderBufferStorage( renderbuffer, renderTarget, isMultisample ) { + + _gl.bindRenderbuffer( _gl.RENDERBUFFER, renderbuffer ); + + if ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) { + + let glInternalFormat = _gl.DEPTH_COMPONENT24; + + if ( isMultisample || useMultisampledRTT( renderTarget ) ) { + + const depthTexture = renderTarget.depthTexture; + + if ( depthTexture && depthTexture.isDepthTexture ) { + + if ( depthTexture.type === FloatType ) { + + glInternalFormat = _gl.DEPTH_COMPONENT32F; + + } else if ( depthTexture.type === UnsignedIntType ) { + + glInternalFormat = _gl.DEPTH_COMPONENT24; + + } + + } + + const samples = getRenderTargetSamples( renderTarget ); + + if ( useMultisampledRTT( renderTarget ) ) { + + multisampledRTTExt.renderbufferStorageMultisampleEXT( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height ); + + } else { + + _gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height ); + + } + + } else { + + _gl.renderbufferStorage( _gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height ); + + } + + _gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer ); + + } else if ( renderTarget.depthBuffer && renderTarget.stencilBuffer ) { + + const samples = getRenderTargetSamples( renderTarget ); + + if ( isMultisample && useMultisampledRTT( renderTarget ) === false ) { + + _gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, _gl.DEPTH24_STENCIL8, renderTarget.width, renderTarget.height ); + + } else if ( useMultisampledRTT( renderTarget ) ) { + + multisampledRTTExt.renderbufferStorageMultisampleEXT( _gl.RENDERBUFFER, samples, _gl.DEPTH24_STENCIL8, renderTarget.width, renderTarget.height ); + + } else { + + _gl.renderbufferStorage( _gl.RENDERBUFFER, _gl.DEPTH_STENCIL, renderTarget.width, renderTarget.height ); + + } + + + _gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer ); + + } else { + + const textures = renderTarget.textures; + + for ( let i = 0; i < textures.length; i ++ ) { + + const texture = textures[ i ]; + + const glFormat = utils.convert( texture.format, texture.colorSpace ); + const glType = utils.convert( texture.type ); + const glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace ); + const samples = getRenderTargetSamples( renderTarget ); + + if ( isMultisample && useMultisampledRTT( renderTarget ) === false ) { + + _gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height ); + + } else if ( useMultisampledRTT( renderTarget ) ) { + + multisampledRTTExt.renderbufferStorageMultisampleEXT( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height ); + + } else { + + _gl.renderbufferStorage( _gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height ); + + } + + } + + } + + _gl.bindRenderbuffer( _gl.RENDERBUFFER, null ); + + } + + // Setup resources for a Depth Texture for a FBO (needs an extension) + function setupDepthTexture( framebuffer, renderTarget ) { + + const isCube = ( renderTarget && renderTarget.isWebGLCubeRenderTarget ); + if ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' ); + + state.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer ); + + if ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) { + + throw new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' ); + + } + + // upload an empty depth texture with framebuffer size + if ( ! properties.get( renderTarget.depthTexture ).__webglTexture || + renderTarget.depthTexture.image.width !== renderTarget.width || + renderTarget.depthTexture.image.height !== renderTarget.height ) { + + renderTarget.depthTexture.image.width = renderTarget.width; + renderTarget.depthTexture.image.height = renderTarget.height; + renderTarget.depthTexture.needsUpdate = true; + + } + + setTexture2D( renderTarget.depthTexture, 0 ); + + const webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture; + const samples = getRenderTargetSamples( renderTarget ); + + if ( renderTarget.depthTexture.format === DepthFormat ) { + + if ( useMultisampledRTT( renderTarget ) ) { + + multisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples ); + + } else { + + _gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 ); + + } + + } else if ( renderTarget.depthTexture.format === DepthStencilFormat ) { + + if ( useMultisampledRTT( renderTarget ) ) { + + multisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples ); + + } else { + + _gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 ); + + } + + } else { + + throw new Error( 'Unknown depthTexture format' ); + + } + + } + + // Setup GL resources for a non-texture depth buffer + function setupDepthRenderbuffer( renderTarget ) { + + const renderTargetProperties = properties.get( renderTarget ); + const isCube = ( renderTarget.isWebGLCubeRenderTarget === true ); + + if ( renderTarget.depthTexture && ! renderTargetProperties.__autoAllocateDepthBuffer ) { + + if ( isCube ) throw new Error( 'target.depthTexture not supported in Cube render targets' ); + + setupDepthTexture( renderTargetProperties.__webglFramebuffer, renderTarget ); + + } else { + + if ( isCube ) { + + renderTargetProperties.__webglDepthbuffer = []; + + for ( let i = 0; i < 6; i ++ ) { + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer[ i ] ); + renderTargetProperties.__webglDepthbuffer[ i ] = _gl.createRenderbuffer(); + setupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer[ i ], renderTarget, false ); + + } + + } else { + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer ); + renderTargetProperties.__webglDepthbuffer = _gl.createRenderbuffer(); + setupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer, renderTarget, false ); + + } + + } + + state.bindFramebuffer( _gl.FRAMEBUFFER, null ); + + } + + // rebind framebuffer with external textures + function rebindTextures( renderTarget, colorTexture, depthTexture ) { + + const renderTargetProperties = properties.get( renderTarget ); + + if ( colorTexture !== undefined ) { + + setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, renderTarget.texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, 0 ); + + } + + if ( depthTexture !== undefined ) { + + setupDepthRenderbuffer( renderTarget ); + + } + + } + + // Set up GL resources for the render target + function setupRenderTarget( renderTarget ) { + + const texture = renderTarget.texture; + + const renderTargetProperties = properties.get( renderTarget ); + const textureProperties = properties.get( texture ); + + renderTarget.addEventListener( 'dispose', onRenderTargetDispose ); + + const textures = renderTarget.textures; + + const isCube = ( renderTarget.isWebGLCubeRenderTarget === true ); + const isMultipleRenderTargets = ( textures.length > 1 ); + + if ( ! isMultipleRenderTargets ) { + + if ( textureProperties.__webglTexture === undefined ) { + + textureProperties.__webglTexture = _gl.createTexture(); + + } + + textureProperties.__version = texture.version; + info.memory.textures ++; + + } + + // Setup framebuffer + + if ( isCube ) { + + renderTargetProperties.__webglFramebuffer = []; + + for ( let i = 0; i < 6; i ++ ) { + + if ( texture.mipmaps && texture.mipmaps.length > 0 ) { + + renderTargetProperties.__webglFramebuffer[ i ] = []; + + for ( let level = 0; level < texture.mipmaps.length; level ++ ) { + + renderTargetProperties.__webglFramebuffer[ i ][ level ] = _gl.createFramebuffer(); + + } + + } else { + + renderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer(); + + } + + } + + } else { + + if ( texture.mipmaps && texture.mipmaps.length > 0 ) { + + renderTargetProperties.__webglFramebuffer = []; + + for ( let level = 0; level < texture.mipmaps.length; level ++ ) { + + renderTargetProperties.__webglFramebuffer[ level ] = _gl.createFramebuffer(); + + } + + } else { + + renderTargetProperties.__webglFramebuffer = _gl.createFramebuffer(); + + } + + if ( isMultipleRenderTargets ) { + + for ( let i = 0, il = textures.length; i < il; i ++ ) { + + const attachmentProperties = properties.get( textures[ i ] ); + + if ( attachmentProperties.__webglTexture === undefined ) { + + attachmentProperties.__webglTexture = _gl.createTexture(); + + info.memory.textures ++; + + } + + } + + } + + if ( ( renderTarget.samples > 0 ) && useMultisampledRTT( renderTarget ) === false ) { + + renderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer(); + renderTargetProperties.__webglColorRenderbuffer = []; + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer ); + + for ( let i = 0; i < textures.length; i ++ ) { + + const texture = textures[ i ]; + renderTargetProperties.__webglColorRenderbuffer[ i ] = _gl.createRenderbuffer(); + + _gl.bindRenderbuffer( _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] ); + + const glFormat = utils.convert( texture.format, texture.colorSpace ); + const glType = utils.convert( texture.type ); + const glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace, renderTarget.isXRRenderTarget === true ); + const samples = getRenderTargetSamples( renderTarget ); + _gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height ); + + _gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] ); + + } + + _gl.bindRenderbuffer( _gl.RENDERBUFFER, null ); + + if ( renderTarget.depthBuffer ) { + + renderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer(); + setupRenderBufferStorage( renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true ); + + } + + state.bindFramebuffer( _gl.FRAMEBUFFER, null ); + + } + + } + + // Setup color buffer + + if ( isCube ) { + + state.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture ); + setTextureParameters( _gl.TEXTURE_CUBE_MAP, texture ); + + for ( let i = 0; i < 6; i ++ ) { + + if ( texture.mipmaps && texture.mipmaps.length > 0 ) { + + for ( let level = 0; level < texture.mipmaps.length; level ++ ) { + + setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ][ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, level ); + + } + + } else { + + setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0 ); + + } + + } + + if ( textureNeedsGenerateMipmaps( texture ) ) { + + generateMipmap( _gl.TEXTURE_CUBE_MAP ); + + } + + state.unbindTexture(); + + } else if ( isMultipleRenderTargets ) { + + for ( let i = 0, il = textures.length; i < il; i ++ ) { + + const attachment = textures[ i ]; + const attachmentProperties = properties.get( attachment ); + + state.bindTexture( _gl.TEXTURE_2D, attachmentProperties.__webglTexture ); + setTextureParameters( _gl.TEXTURE_2D, attachment ); + setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, attachment, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, 0 ); + + if ( textureNeedsGenerateMipmaps( attachment ) ) { + + generateMipmap( _gl.TEXTURE_2D ); + + } + + } + + state.unbindTexture(); + + } else { + + let glTextureType = _gl.TEXTURE_2D; + + if ( renderTarget.isWebGL3DRenderTarget || renderTarget.isWebGLArrayRenderTarget ) { + + glTextureType = renderTarget.isWebGL3DRenderTarget ? _gl.TEXTURE_3D : _gl.TEXTURE_2D_ARRAY; + + } + + state.bindTexture( glTextureType, textureProperties.__webglTexture ); + setTextureParameters( glTextureType, texture ); + + if ( texture.mipmaps && texture.mipmaps.length > 0 ) { + + for ( let level = 0; level < texture.mipmaps.length; level ++ ) { + + setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, level ); + + } + + } else { + + setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, 0 ); + + } + + if ( textureNeedsGenerateMipmaps( texture ) ) { + + generateMipmap( glTextureType ); + + } + + state.unbindTexture(); + + } + + // Setup depth and stencil buffers + + if ( renderTarget.depthBuffer ) { + + setupDepthRenderbuffer( renderTarget ); + + } + + } + + function updateRenderTargetMipmap( renderTarget ) { + + const textures = renderTarget.textures; + + for ( let i = 0, il = textures.length; i < il; i ++ ) { + + const texture = textures[ i ]; + + if ( textureNeedsGenerateMipmaps( texture ) ) { + + const target = renderTarget.isWebGLCubeRenderTarget ? _gl.TEXTURE_CUBE_MAP : _gl.TEXTURE_2D; + const webglTexture = properties.get( texture ).__webglTexture; + + state.bindTexture( target, webglTexture ); + generateMipmap( target ); + state.unbindTexture(); + + } + + } + + } + + const invalidationArrayRead = []; + const invalidationArrayDraw = []; + + function updateMultisampleRenderTarget( renderTarget ) { + + if ( renderTarget.samples > 0 ) { + + if ( useMultisampledRTT( renderTarget ) === false ) { + + const textures = renderTarget.textures; + const width = renderTarget.width; + const height = renderTarget.height; + let mask = _gl.COLOR_BUFFER_BIT; + const depthStyle = renderTarget.stencilBuffer ? _gl.DEPTH_STENCIL_ATTACHMENT : _gl.DEPTH_ATTACHMENT; + const renderTargetProperties = properties.get( renderTarget ); + const isMultipleRenderTargets = ( textures.length > 1 ); + + // If MRT we need to remove FBO attachments + if ( isMultipleRenderTargets ) { + + for ( let i = 0; i < textures.length; i ++ ) { + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer ); + _gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, null ); + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer ); + _gl.framebufferTexture2D( _gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, null, 0 ); + + } + + } + + state.bindFramebuffer( _gl.READ_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer ); + state.bindFramebuffer( _gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglFramebuffer ); + + for ( let i = 0; i < textures.length; i ++ ) { + + if ( renderTarget.resolveDepthBuffer ) { + + if ( renderTarget.depthBuffer ) mask |= _gl.DEPTH_BUFFER_BIT; + + // resolving stencil is slow with a D3D backend. disable it for all transmission render targets (see #27799) + + if ( renderTarget.stencilBuffer && renderTarget.resolveStencilBuffer ) mask |= _gl.STENCIL_BUFFER_BIT; + + } + + if ( isMultipleRenderTargets ) { + + _gl.framebufferRenderbuffer( _gl.READ_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] ); + + const webglTexture = properties.get( textures[ i ] ).__webglTexture; + _gl.framebufferTexture2D( _gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, webglTexture, 0 ); + + } + + _gl.blitFramebuffer( 0, 0, width, height, 0, 0, width, height, mask, _gl.NEAREST ); + + if ( supportsInvalidateFramebuffer === true ) { + + invalidationArrayRead.length = 0; + invalidationArrayDraw.length = 0; + + invalidationArrayRead.push( _gl.COLOR_ATTACHMENT0 + i ); + + if ( renderTarget.depthBuffer && renderTarget.resolveDepthBuffer === false ) { + + invalidationArrayRead.push( depthStyle ); + invalidationArrayDraw.push( depthStyle ); + + _gl.invalidateFramebuffer( _gl.DRAW_FRAMEBUFFER, invalidationArrayDraw ); + + } + + _gl.invalidateFramebuffer( _gl.READ_FRAMEBUFFER, invalidationArrayRead ); + + } + + } + + state.bindFramebuffer( _gl.READ_FRAMEBUFFER, null ); + state.bindFramebuffer( _gl.DRAW_FRAMEBUFFER, null ); + + // If MRT since pre-blit we removed the FBO we need to reconstruct the attachments + if ( isMultipleRenderTargets ) { + + for ( let i = 0; i < textures.length; i ++ ) { + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer ); + _gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] ); + + const webglTexture = properties.get( textures[ i ] ).__webglTexture; + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer ); + _gl.framebufferTexture2D( _gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, webglTexture, 0 ); + + } + + } + + state.bindFramebuffer( _gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer ); + + } else { + + if ( renderTarget.depthBuffer && renderTarget.resolveDepthBuffer === false && supportsInvalidateFramebuffer ) { + + const depthStyle = renderTarget.stencilBuffer ? _gl.DEPTH_STENCIL_ATTACHMENT : _gl.DEPTH_ATTACHMENT; + + _gl.invalidateFramebuffer( _gl.DRAW_FRAMEBUFFER, [ depthStyle ] ); + + } + + } + + } + + } + + function getRenderTargetSamples( renderTarget ) { + + return Math.min( capabilities.maxSamples, renderTarget.samples ); + + } + + function useMultisampledRTT( renderTarget ) { + + const renderTargetProperties = properties.get( renderTarget ); + + return renderTarget.samples > 0 && extensions.has( 'WEBGL_multisampled_render_to_texture' ) === true && renderTargetProperties.__useRenderToTexture !== false; + + } + + function updateVideoTexture( texture ) { + + const frame = info.render.frame; + + // Check the last frame we updated the VideoTexture + + if ( _videoTextures.get( texture ) !== frame ) { + + _videoTextures.set( texture, frame ); + texture.update(); + + } + + } + + function verifyColorSpace( texture, image ) { + + const colorSpace = texture.colorSpace; + const format = texture.format; + const type = texture.type; + + if ( texture.isCompressedTexture === true || texture.isVideoTexture === true ) return image; + + if ( colorSpace !== LinearSRGBColorSpace && colorSpace !== NoColorSpace ) { + + // sRGB + + if ( ColorManagement.getTransfer( colorSpace ) === SRGBTransfer ) { + + // in WebGL 2 uncompressed textures can only be sRGB encoded if they have the RGBA8 format + + if ( format !== RGBAFormat || type !== UnsignedByteType ) { + + console.warn( 'THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.' ); + + } + + } else { + + console.error( 'THREE.WebGLTextures: Unsupported texture color space:', colorSpace ); + + } + + } + + return image; + + } + + function getDimensions( image ) { + + if ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) { + + // if intrinsic data are not available, fallback to width/height + + _imageDimensions.width = image.naturalWidth || image.width; + _imageDimensions.height = image.naturalHeight || image.height; + + } else if ( typeof VideoFrame !== 'undefined' && image instanceof VideoFrame ) { + + _imageDimensions.width = image.displayWidth; + _imageDimensions.height = image.displayHeight; + + } else { + + _imageDimensions.width = image.width; + _imageDimensions.height = image.height; + + } + + return _imageDimensions; + + } + + // + + this.allocateTextureUnit = allocateTextureUnit; + this.resetTextureUnits = resetTextureUnits; + + this.setTexture2D = setTexture2D; + this.setTexture2DArray = setTexture2DArray; + this.setTexture3D = setTexture3D; + this.setTextureCube = setTextureCube; + this.rebindTextures = rebindTextures; + this.setupRenderTarget = setupRenderTarget; + this.updateRenderTargetMipmap = updateRenderTargetMipmap; + this.updateMultisampleRenderTarget = updateMultisampleRenderTarget; + this.setupDepthRenderbuffer = setupDepthRenderbuffer; + this.setupFrameBufferTexture = setupFrameBufferTexture; + this.useMultisampledRTT = useMultisampledRTT; + +} + +function WebGLUtils( gl, extensions ) { + + function convert( p, colorSpace = NoColorSpace ) { + + let extension; + + const transfer = ColorManagement.getTransfer( colorSpace ); + + if ( p === UnsignedByteType ) return gl.UNSIGNED_BYTE; + if ( p === UnsignedShort4444Type ) return gl.UNSIGNED_SHORT_4_4_4_4; + if ( p === UnsignedShort5551Type ) return gl.UNSIGNED_SHORT_5_5_5_1; + if ( p === UnsignedInt5999Type ) return gl.UNSIGNED_INT_5_9_9_9_REV; + + if ( p === ByteType ) return gl.BYTE; + if ( p === ShortType ) return gl.SHORT; + if ( p === UnsignedShortType ) return gl.UNSIGNED_SHORT; + if ( p === IntType ) return gl.INT; + if ( p === UnsignedIntType ) return gl.UNSIGNED_INT; + if ( p === FloatType ) return gl.FLOAT; + if ( p === HalfFloatType ) return gl.HALF_FLOAT; + + if ( p === AlphaFormat ) return gl.ALPHA; + if ( p === RGBFormat ) return gl.RGB; + if ( p === RGBAFormat ) return gl.RGBA; + if ( p === LuminanceFormat ) return gl.LUMINANCE; + if ( p === LuminanceAlphaFormat ) return gl.LUMINANCE_ALPHA; + if ( p === DepthFormat ) return gl.DEPTH_COMPONENT; + if ( p === DepthStencilFormat ) return gl.DEPTH_STENCIL; + + // WebGL2 formats. + + if ( p === RedFormat ) return gl.RED; + if ( p === RedIntegerFormat ) return gl.RED_INTEGER; + if ( p === RGFormat ) return gl.RG; + if ( p === RGIntegerFormat ) return gl.RG_INTEGER; + if ( p === RGBAIntegerFormat ) return gl.RGBA_INTEGER; + + // S3TC + + if ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format || p === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) { + + if ( transfer === SRGBTransfer ) { + + extension = extensions.get( 'WEBGL_compressed_texture_s3tc_srgb' ); + + if ( extension !== null ) { + + if ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_SRGB_S3TC_DXT1_EXT; + if ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT; + if ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT; + if ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT; + + } else { + + return null; + + } + + } else { + + extension = extensions.get( 'WEBGL_compressed_texture_s3tc' ); + + if ( extension !== null ) { + + if ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT; + if ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT; + if ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT; + if ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT; + + } else { + + return null; + + } + + } + + } + + // PVRTC + + if ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format || p === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) { + + extension = extensions.get( 'WEBGL_compressed_texture_pvrtc' ); + + if ( extension !== null ) { + + if ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG; + if ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG; + if ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; + if ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; + + } else { + + return null; + + } + + } + + // ETC + + if ( p === RGB_ETC1_Format || p === RGB_ETC2_Format || p === RGBA_ETC2_EAC_Format ) { + + extension = extensions.get( 'WEBGL_compressed_texture_etc' ); + + if ( extension !== null ) { + + if ( p === RGB_ETC1_Format || p === RGB_ETC2_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ETC2 : extension.COMPRESSED_RGB8_ETC2; + if ( p === RGBA_ETC2_EAC_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : extension.COMPRESSED_RGBA8_ETC2_EAC; + + } else { + + return null; + + } + + } + + // ASTC + + if ( p === RGBA_ASTC_4x4_Format || p === RGBA_ASTC_5x4_Format || p === RGBA_ASTC_5x5_Format || + p === RGBA_ASTC_6x5_Format || p === RGBA_ASTC_6x6_Format || p === RGBA_ASTC_8x5_Format || + p === RGBA_ASTC_8x6_Format || p === RGBA_ASTC_8x8_Format || p === RGBA_ASTC_10x5_Format || + p === RGBA_ASTC_10x6_Format || p === RGBA_ASTC_10x8_Format || p === RGBA_ASTC_10x10_Format || + p === RGBA_ASTC_12x10_Format || p === RGBA_ASTC_12x12_Format ) { + + extension = extensions.get( 'WEBGL_compressed_texture_astc' ); + + if ( extension !== null ) { + + if ( p === RGBA_ASTC_4x4_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : extension.COMPRESSED_RGBA_ASTC_4x4_KHR; + if ( p === RGBA_ASTC_5x4_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : extension.COMPRESSED_RGBA_ASTC_5x4_KHR; + if ( p === RGBA_ASTC_5x5_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : extension.COMPRESSED_RGBA_ASTC_5x5_KHR; + if ( p === RGBA_ASTC_6x5_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : extension.COMPRESSED_RGBA_ASTC_6x5_KHR; + if ( p === RGBA_ASTC_6x6_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : extension.COMPRESSED_RGBA_ASTC_6x6_KHR; + if ( p === RGBA_ASTC_8x5_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : extension.COMPRESSED_RGBA_ASTC_8x5_KHR; + if ( p === RGBA_ASTC_8x6_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : extension.COMPRESSED_RGBA_ASTC_8x6_KHR; + if ( p === RGBA_ASTC_8x8_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : extension.COMPRESSED_RGBA_ASTC_8x8_KHR; + if ( p === RGBA_ASTC_10x5_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : extension.COMPRESSED_RGBA_ASTC_10x5_KHR; + if ( p === RGBA_ASTC_10x6_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : extension.COMPRESSED_RGBA_ASTC_10x6_KHR; + if ( p === RGBA_ASTC_10x8_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : extension.COMPRESSED_RGBA_ASTC_10x8_KHR; + if ( p === RGBA_ASTC_10x10_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : extension.COMPRESSED_RGBA_ASTC_10x10_KHR; + if ( p === RGBA_ASTC_12x10_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : extension.COMPRESSED_RGBA_ASTC_12x10_KHR; + if ( p === RGBA_ASTC_12x12_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : extension.COMPRESSED_RGBA_ASTC_12x12_KHR; + + } else { + + return null; + + } + + } + + // BPTC + + if ( p === RGBA_BPTC_Format || p === RGB_BPTC_SIGNED_Format || p === RGB_BPTC_UNSIGNED_Format ) { + + extension = extensions.get( 'EXT_texture_compression_bptc' ); + + if ( extension !== null ) { + + if ( p === RGBA_BPTC_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : extension.COMPRESSED_RGBA_BPTC_UNORM_EXT; + if ( p === RGB_BPTC_SIGNED_Format ) return extension.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT; + if ( p === RGB_BPTC_UNSIGNED_Format ) return extension.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT; + + } else { + + return null; + + } + + } + + // RGTC + + if ( p === RED_RGTC1_Format || p === SIGNED_RED_RGTC1_Format || p === RED_GREEN_RGTC2_Format || p === SIGNED_RED_GREEN_RGTC2_Format ) { + + extension = extensions.get( 'EXT_texture_compression_rgtc' ); + + if ( extension !== null ) { + + if ( p === RGBA_BPTC_Format ) return extension.COMPRESSED_RED_RGTC1_EXT; + if ( p === SIGNED_RED_RGTC1_Format ) return extension.COMPRESSED_SIGNED_RED_RGTC1_EXT; + if ( p === RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_RED_GREEN_RGTC2_EXT; + if ( p === SIGNED_RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT; + + } else { + + return null; + + } + + } + + // + + if ( p === UnsignedInt248Type ) return gl.UNSIGNED_INT_24_8; + + // if "p" can't be resolved, assume the user defines a WebGL constant as a string (fallback/workaround for packed RGB formats) + + return ( gl[ p ] !== undefined ) ? gl[ p ] : null; + + } + + return { convert: convert }; + +} + +class ArrayCamera extends PerspectiveCamera { + + constructor( array = [] ) { + + super(); + + this.isArrayCamera = true; + + this.cameras = array; + + } + +} + +class Group extends Object3D { + + constructor() { + + super(); + + this.isGroup = true; + + this.type = 'Group'; + + } + +} + +const _moveEvent = { type: 'move' }; + +class WebXRController { + + constructor() { + + this._targetRay = null; + this._grip = null; + this._hand = null; + + } + + getHandSpace() { + + if ( this._hand === null ) { + + this._hand = new Group(); + this._hand.matrixAutoUpdate = false; + this._hand.visible = false; + + this._hand.joints = {}; + this._hand.inputState = { pinching: false }; + + } + + return this._hand; + + } + + getTargetRaySpace() { + + if ( this._targetRay === null ) { + + this._targetRay = new Group(); + this._targetRay.matrixAutoUpdate = false; + this._targetRay.visible = false; + this._targetRay.hasLinearVelocity = false; + this._targetRay.linearVelocity = new Vector3(); + this._targetRay.hasAngularVelocity = false; + this._targetRay.angularVelocity = new Vector3(); + + } + + return this._targetRay; + + } + + getGripSpace() { + + if ( this._grip === null ) { + + this._grip = new Group(); + this._grip.matrixAutoUpdate = false; + this._grip.visible = false; + this._grip.hasLinearVelocity = false; + this._grip.linearVelocity = new Vector3(); + this._grip.hasAngularVelocity = false; + this._grip.angularVelocity = new Vector3(); + + } + + return this._grip; + + } + + dispatchEvent( event ) { + + if ( this._targetRay !== null ) { + + this._targetRay.dispatchEvent( event ); + + } + + if ( this._grip !== null ) { + + this._grip.dispatchEvent( event ); + + } + + if ( this._hand !== null ) { + + this._hand.dispatchEvent( event ); + + } + + return this; + + } + + connect( inputSource ) { + + if ( inputSource && inputSource.hand ) { + + const hand = this._hand; + + if ( hand ) { + + for ( const inputjoint of inputSource.hand.values() ) { + + // Initialize hand with joints when connected + this._getHandJoint( hand, inputjoint ); + + } + + } + + } + + this.dispatchEvent( { type: 'connected', data: inputSource } ); + + return this; + + } + + disconnect( inputSource ) { + + this.dispatchEvent( { type: 'disconnected', data: inputSource } ); + + if ( this._targetRay !== null ) { + + this._targetRay.visible = false; + + } + + if ( this._grip !== null ) { + + this._grip.visible = false; + + } + + if ( this._hand !== null ) { + + this._hand.visible = false; + + } + + return this; + + } + + update( inputSource, frame, referenceSpace ) { + + let inputPose = null; + let gripPose = null; + let handPose = null; + + const targetRay = this._targetRay; + const grip = this._grip; + const hand = this._hand; + + if ( inputSource && frame.session.visibilityState !== 'visible-blurred' ) { + + if ( hand && inputSource.hand ) { + + handPose = true; + + for ( const inputjoint of inputSource.hand.values() ) { + + // Update the joints groups with the XRJoint poses + const jointPose = frame.getJointPose( inputjoint, referenceSpace ); + + // The transform of this joint will be updated with the joint pose on each frame + const joint = this._getHandJoint( hand, inputjoint ); + + if ( jointPose !== null ) { + + joint.matrix.fromArray( jointPose.transform.matrix ); + joint.matrix.decompose( joint.position, joint.rotation, joint.scale ); + joint.matrixWorldNeedsUpdate = true; + joint.jointRadius = jointPose.radius; + + } + + joint.visible = jointPose !== null; + + } + + // Custom events + + // Check pinchz + const indexTip = hand.joints[ 'index-finger-tip' ]; + const thumbTip = hand.joints[ 'thumb-tip' ]; + const distance = indexTip.position.distanceTo( thumbTip.position ); + + const distanceToPinch = 0.02; + const threshold = 0.005; + + if ( hand.inputState.pinching && distance > distanceToPinch + threshold ) { + + hand.inputState.pinching = false; + this.dispatchEvent( { + type: 'pinchend', + handedness: inputSource.handedness, + target: this + } ); + + } else if ( ! hand.inputState.pinching && distance <= distanceToPinch - threshold ) { + + hand.inputState.pinching = true; + this.dispatchEvent( { + type: 'pinchstart', + handedness: inputSource.handedness, + target: this + } ); + + } + + } else { + + if ( grip !== null && inputSource.gripSpace ) { + + gripPose = frame.getPose( inputSource.gripSpace, referenceSpace ); + + if ( gripPose !== null ) { + + grip.matrix.fromArray( gripPose.transform.matrix ); + grip.matrix.decompose( grip.position, grip.rotation, grip.scale ); + grip.matrixWorldNeedsUpdate = true; + + if ( gripPose.linearVelocity ) { + + grip.hasLinearVelocity = true; + grip.linearVelocity.copy( gripPose.linearVelocity ); + + } else { + + grip.hasLinearVelocity = false; + + } + + if ( gripPose.angularVelocity ) { + + grip.hasAngularVelocity = true; + grip.angularVelocity.copy( gripPose.angularVelocity ); + + } else { + + grip.hasAngularVelocity = false; + + } + + } + + } + + } + + if ( targetRay !== null ) { + + inputPose = frame.getPose( inputSource.targetRaySpace, referenceSpace ); + + // Some runtimes (namely Vive Cosmos with Vive OpenXR Runtime) have only grip space and ray space is equal to it + if ( inputPose === null && gripPose !== null ) { + + inputPose = gripPose; + + } + + if ( inputPose !== null ) { + + targetRay.matrix.fromArray( inputPose.transform.matrix ); + targetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale ); + targetRay.matrixWorldNeedsUpdate = true; + + if ( inputPose.linearVelocity ) { + + targetRay.hasLinearVelocity = true; + targetRay.linearVelocity.copy( inputPose.linearVelocity ); + + } else { + + targetRay.hasLinearVelocity = false; + + } + + if ( inputPose.angularVelocity ) { + + targetRay.hasAngularVelocity = true; + targetRay.angularVelocity.copy( inputPose.angularVelocity ); + + } else { + + targetRay.hasAngularVelocity = false; + + } + + this.dispatchEvent( _moveEvent ); + + } + + } + + + } + + if ( targetRay !== null ) { + + targetRay.visible = ( inputPose !== null ); + + } + + if ( grip !== null ) { + + grip.visible = ( gripPose !== null ); + + } + + if ( hand !== null ) { + + hand.visible = ( handPose !== null ); + + } + + return this; + + } + + // private method + + _getHandJoint( hand, inputjoint ) { + + if ( hand.joints[ inputjoint.jointName ] === undefined ) { + + const joint = new Group(); + joint.matrixAutoUpdate = false; + joint.visible = false; + hand.joints[ inputjoint.jointName ] = joint; + + hand.add( joint ); + + } + + return hand.joints[ inputjoint.jointName ]; + + } + +} + +const _occlusion_vertex = ` +void main() { + + gl_Position = vec4( position, 1.0 ); + +}`; + +const _occlusion_fragment = ` +uniform sampler2DArray depthColor; +uniform float depthWidth; +uniform float depthHeight; + +void main() { + + vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); + + if ( coord.x >= 1.0 ) { + + gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; + + } else { + + gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; + + } + +}`; + +class WebXRDepthSensing { + + constructor() { + + this.texture = null; + this.mesh = null; + + this.depthNear = 0; + this.depthFar = 0; + + } + + init( renderer, depthData, renderState ) { + + if ( this.texture === null ) { + + const texture = new Texture(); + + const texProps = renderer.properties.get( texture ); + texProps.__webglTexture = depthData.texture; + + if ( ( depthData.depthNear != renderState.depthNear ) || ( depthData.depthFar != renderState.depthFar ) ) { + + this.depthNear = depthData.depthNear; + this.depthFar = depthData.depthFar; + + } + + this.texture = texture; + + } + + } + + render( renderer, cameraXR ) { + + if ( this.texture !== null ) { + + if ( this.mesh === null ) { + + const viewport = cameraXR.cameras[ 0 ].viewport; + const material = new ShaderMaterial( { + vertexShader: _occlusion_vertex, + fragmentShader: _occlusion_fragment, + uniforms: { + depthColor: { value: this.texture }, + depthWidth: { value: viewport.z }, + depthHeight: { value: viewport.w } + } + } ); + + this.mesh = new Mesh( new PlaneGeometry( 20, 20 ), material ); + + } + + renderer.render( this.mesh, cameraXR ); + + } + + } + + reset() { + + this.texture = null; + this.mesh = null; + + } + +} + +class WebXRManager extends EventDispatcher { + + constructor( renderer, gl ) { + + super(); + + const scope = this; + + let session = null; + + let framebufferScaleFactor = 1.0; + + let referenceSpace = null; + let referenceSpaceType = 'local-floor'; + // Set default foveation to maximum. + let foveation = 1.0; + let customReferenceSpace = null; + + let pose = null; + let glBinding = null; + let glProjLayer = null; + let glBaseLayer = null; + let xrFrame = null; + + const depthSensing = new WebXRDepthSensing(); + const attributes = gl.getContextAttributes(); + + let initialRenderTarget = null; + let newRenderTarget = null; + + const controllers = []; + const controllerInputSources = []; + + const currentSize = new Vector2(); + let currentPixelRatio = null; + + // + + const cameraL = new PerspectiveCamera(); + cameraL.layers.enable( 1 ); + cameraL.viewport = new Vector4(); + + const cameraR = new PerspectiveCamera(); + cameraR.layers.enable( 2 ); + cameraR.viewport = new Vector4(); + + const cameras = [ cameraL, cameraR ]; + + const cameraXR = new ArrayCamera(); + cameraXR.layers.enable( 1 ); + cameraXR.layers.enable( 2 ); + + let _currentDepthNear = null; + let _currentDepthFar = null; + + // + + this.cameraAutoUpdate = true; + this.enabled = false; + + this.isPresenting = false; + + this.getController = function ( index ) { + + let controller = controllers[ index ]; + + if ( controller === undefined ) { + + controller = new WebXRController(); + controllers[ index ] = controller; + + } + + return controller.getTargetRaySpace(); + + }; + + this.getControllerGrip = function ( index ) { + + let controller = controllers[ index ]; + + if ( controller === undefined ) { + + controller = new WebXRController(); + controllers[ index ] = controller; + + } + + return controller.getGripSpace(); + + }; + + this.getHand = function ( index ) { + + let controller = controllers[ index ]; + + if ( controller === undefined ) { + + controller = new WebXRController(); + controllers[ index ] = controller; + + } + + return controller.getHandSpace(); + + }; + + // + + function onSessionEvent( event ) { + + const controllerIndex = controllerInputSources.indexOf( event.inputSource ); + + if ( controllerIndex === - 1 ) { + + return; + + } + + const controller = controllers[ controllerIndex ]; + + if ( controller !== undefined ) { + + controller.update( event.inputSource, event.frame, customReferenceSpace || referenceSpace ); + controller.dispatchEvent( { type: event.type, data: event.inputSource } ); + + } + + } + + function onSessionEnd() { + + session.removeEventListener( 'select', onSessionEvent ); + session.removeEventListener( 'selectstart', onSessionEvent ); + session.removeEventListener( 'selectend', onSessionEvent ); + session.removeEventListener( 'squeeze', onSessionEvent ); + session.removeEventListener( 'squeezestart', onSessionEvent ); + session.removeEventListener( 'squeezeend', onSessionEvent ); + session.removeEventListener( 'end', onSessionEnd ); + session.removeEventListener( 'inputsourceschange', onInputSourcesChange ); + + for ( let i = 0; i < controllers.length; i ++ ) { + + const inputSource = controllerInputSources[ i ]; + + if ( inputSource === null ) continue; + + controllerInputSources[ i ] = null; + + controllers[ i ].disconnect( inputSource ); + + } + + _currentDepthNear = null; + _currentDepthFar = null; + + depthSensing.reset(); + + // restore framebuffer/rendering state + + renderer.setRenderTarget( initialRenderTarget ); + + glBaseLayer = null; + glProjLayer = null; + glBinding = null; + session = null; + newRenderTarget = null; + + // + + animation.stop(); + + scope.isPresenting = false; + + renderer.setPixelRatio( currentPixelRatio ); + renderer.setSize( currentSize.width, currentSize.height, false ); + + scope.dispatchEvent( { type: 'sessionend' } ); + + } + + this.setFramebufferScaleFactor = function ( value ) { + + framebufferScaleFactor = value; + + if ( scope.isPresenting === true ) { + + console.warn( 'THREE.WebXRManager: Cannot change framebuffer scale while presenting.' ); + + } + + }; + + this.setReferenceSpaceType = function ( value ) { + + referenceSpaceType = value; + + if ( scope.isPresenting === true ) { + + console.warn( 'THREE.WebXRManager: Cannot change reference space type while presenting.' ); + + } + + }; + + this.getReferenceSpace = function () { + + return customReferenceSpace || referenceSpace; + + }; + + this.setReferenceSpace = function ( space ) { + + customReferenceSpace = space; + + }; + + this.getBaseLayer = function () { + + return glProjLayer !== null ? glProjLayer : glBaseLayer; + + }; + + this.getBinding = function () { + + return glBinding; + + }; + + this.getFrame = function () { + + return xrFrame; + + }; + + this.getSession = function () { + + return session; + + }; + + this.setSession = async function ( value ) { + + session = value; + + if ( session !== null ) { + + initialRenderTarget = renderer.getRenderTarget(); + + session.addEventListener( 'select', onSessionEvent ); + session.addEventListener( 'selectstart', onSessionEvent ); + session.addEventListener( 'selectend', onSessionEvent ); + session.addEventListener( 'squeeze', onSessionEvent ); + session.addEventListener( 'squeezestart', onSessionEvent ); + session.addEventListener( 'squeezeend', onSessionEvent ); + session.addEventListener( 'end', onSessionEnd ); + session.addEventListener( 'inputsourceschange', onInputSourcesChange ); + + if ( attributes.xrCompatible !== true ) { + + await gl.makeXRCompatible(); + + } + + currentPixelRatio = renderer.getPixelRatio(); + renderer.getSize( currentSize ); + + if ( session.renderState.layers === undefined ) { + + const layerInit = { + antialias: attributes.antialias, + alpha: true, + depth: attributes.depth, + stencil: attributes.stencil, + framebufferScaleFactor: framebufferScaleFactor + }; + + glBaseLayer = new XRWebGLLayer( session, gl, layerInit ); + + session.updateRenderState( { baseLayer: glBaseLayer } ); + + renderer.setPixelRatio( 1 ); + renderer.setSize( glBaseLayer.framebufferWidth, glBaseLayer.framebufferHeight, false ); + + newRenderTarget = new WebGLRenderTarget( + glBaseLayer.framebufferWidth, + glBaseLayer.framebufferHeight, + { + format: RGBAFormat, + type: UnsignedByteType, + colorSpace: renderer.outputColorSpace, + stencilBuffer: attributes.stencil + } + ); + + } else { + + let depthFormat = null; + let depthType = null; + let glDepthFormat = null; + + if ( attributes.depth ) { + + glDepthFormat = attributes.stencil ? gl.DEPTH24_STENCIL8 : gl.DEPTH_COMPONENT24; + depthFormat = attributes.stencil ? DepthStencilFormat : DepthFormat; + depthType = attributes.stencil ? UnsignedInt248Type : UnsignedIntType; + + } + + const projectionlayerInit = { + colorFormat: gl.RGBA8, + depthFormat: glDepthFormat, + scaleFactor: framebufferScaleFactor + }; + + glBinding = new XRWebGLBinding( session, gl ); + + glProjLayer = glBinding.createProjectionLayer( projectionlayerInit ); + + session.updateRenderState( { layers: [ glProjLayer ] } ); + + renderer.setPixelRatio( 1 ); + renderer.setSize( glProjLayer.textureWidth, glProjLayer.textureHeight, false ); + + newRenderTarget = new WebGLRenderTarget( + glProjLayer.textureWidth, + glProjLayer.textureHeight, + { + format: RGBAFormat, + type: UnsignedByteType, + depthTexture: new DepthTexture( glProjLayer.textureWidth, glProjLayer.textureHeight, depthType, undefined, undefined, undefined, undefined, undefined, undefined, depthFormat ), + stencilBuffer: attributes.stencil, + colorSpace: renderer.outputColorSpace, + samples: attributes.antialias ? 4 : 0, + resolveDepthBuffer: ( glProjLayer.ignoreDepthValues === false ) + } ); + + } + + newRenderTarget.isXRRenderTarget = true; // TODO Remove this when possible, see #23278 + + this.setFoveation( foveation ); + + customReferenceSpace = null; + referenceSpace = await session.requestReferenceSpace( referenceSpaceType ); + + animation.setContext( session ); + animation.start(); + + scope.isPresenting = true; + + scope.dispatchEvent( { type: 'sessionstart' } ); + + } + + }; + + this.getEnvironmentBlendMode = function () { + + if ( session !== null ) { + + return session.environmentBlendMode; + + } + + }; + + function onInputSourcesChange( event ) { + + // Notify disconnected + + for ( let i = 0; i < event.removed.length; i ++ ) { + + const inputSource = event.removed[ i ]; + const index = controllerInputSources.indexOf( inputSource ); + + if ( index >= 0 ) { + + controllerInputSources[ index ] = null; + controllers[ index ].disconnect( inputSource ); + + } + + } + + // Notify connected + + for ( let i = 0; i < event.added.length; i ++ ) { + + const inputSource = event.added[ i ]; + + let controllerIndex = controllerInputSources.indexOf( inputSource ); + + if ( controllerIndex === - 1 ) { + + // Assign input source a controller that currently has no input source + + for ( let i = 0; i < controllers.length; i ++ ) { + + if ( i >= controllerInputSources.length ) { + + controllerInputSources.push( inputSource ); + controllerIndex = i; + break; + + } else if ( controllerInputSources[ i ] === null ) { + + controllerInputSources[ i ] = inputSource; + controllerIndex = i; + break; + + } + + } + + // If all controllers do currently receive input we ignore new ones + + if ( controllerIndex === - 1 ) break; + + } + + const controller = controllers[ controllerIndex ]; + + if ( controller ) { + + controller.connect( inputSource ); + + } + + } + + } + + // + + const cameraLPos = new Vector3(); + const cameraRPos = new Vector3(); + + /** + * Assumes 2 cameras that are parallel and share an X-axis, and that + * the cameras' projection and world matrices have already been set. + * And that near and far planes are identical for both cameras. + * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765 + */ + function setProjectionFromUnion( camera, cameraL, cameraR ) { + + cameraLPos.setFromMatrixPosition( cameraL.matrixWorld ); + cameraRPos.setFromMatrixPosition( cameraR.matrixWorld ); + + const ipd = cameraLPos.distanceTo( cameraRPos ); + + const projL = cameraL.projectionMatrix.elements; + const projR = cameraR.projectionMatrix.elements; + + // VR systems will have identical far and near planes, and + // most likely identical top and bottom frustum extents. + // Use the left camera for these values. + const near = projL[ 14 ] / ( projL[ 10 ] - 1 ); + const far = projL[ 14 ] / ( projL[ 10 ] + 1 ); + const topFov = ( projL[ 9 ] + 1 ) / projL[ 5 ]; + const bottomFov = ( projL[ 9 ] - 1 ) / projL[ 5 ]; + + const leftFov = ( projL[ 8 ] - 1 ) / projL[ 0 ]; + const rightFov = ( projR[ 8 ] + 1 ) / projR[ 0 ]; + const left = near * leftFov; + const right = near * rightFov; + + // Calculate the new camera's position offset from the + // left camera. xOffset should be roughly half `ipd`. + const zOffset = ipd / ( - leftFov + rightFov ); + const xOffset = zOffset * - leftFov; + + // TODO: Better way to apply this offset? + cameraL.matrixWorld.decompose( camera.position, camera.quaternion, camera.scale ); + camera.translateX( xOffset ); + camera.translateZ( zOffset ); + camera.matrixWorld.compose( camera.position, camera.quaternion, camera.scale ); + camera.matrixWorldInverse.copy( camera.matrixWorld ).invert(); + + // Find the union of the frustum values of the cameras and scale + // the values so that the near plane's position does not change in world space, + // although must now be relative to the new union camera. + const near2 = near + zOffset; + const far2 = far + zOffset; + const left2 = left - xOffset; + const right2 = right + ( ipd - xOffset ); + const top2 = topFov * far / far2 * near2; + const bottom2 = bottomFov * far / far2 * near2; + + camera.projectionMatrix.makePerspective( left2, right2, top2, bottom2, near2, far2 ); + camera.projectionMatrixInverse.copy( camera.projectionMatrix ).invert(); + + } + + function updateCamera( camera, parent ) { + + if ( parent === null ) { + + camera.matrixWorld.copy( camera.matrix ); + + } else { + + camera.matrixWorld.multiplyMatrices( parent.matrixWorld, camera.matrix ); + + } + + camera.matrixWorldInverse.copy( camera.matrixWorld ).invert(); + + } + + this.updateCamera = function ( camera ) { + + if ( session === null ) return; + + if ( depthSensing.texture !== null ) { + + camera.near = depthSensing.depthNear; + camera.far = depthSensing.depthFar; + + } + + cameraXR.near = cameraR.near = cameraL.near = camera.near; + cameraXR.far = cameraR.far = cameraL.far = camera.far; + + if ( _currentDepthNear !== cameraXR.near || _currentDepthFar !== cameraXR.far ) { + + // Note that the new renderState won't apply until the next frame. See #18320 + + session.updateRenderState( { + depthNear: cameraXR.near, + depthFar: cameraXR.far + } ); + + _currentDepthNear = cameraXR.near; + _currentDepthFar = cameraXR.far; + + cameraL.near = _currentDepthNear; + cameraL.far = _currentDepthFar; + cameraR.near = _currentDepthNear; + cameraR.far = _currentDepthFar; + + cameraL.updateProjectionMatrix(); + cameraR.updateProjectionMatrix(); + camera.updateProjectionMatrix(); + + } + + const parent = camera.parent; + const cameras = cameraXR.cameras; + + updateCamera( cameraXR, parent ); + + for ( let i = 0; i < cameras.length; i ++ ) { + + updateCamera( cameras[ i ], parent ); + + } + + // update projection matrix for proper view frustum culling + + if ( cameras.length === 2 ) { + + setProjectionFromUnion( cameraXR, cameraL, cameraR ); + + } else { + + // assume single camera setup (AR) + + cameraXR.projectionMatrix.copy( cameraL.projectionMatrix ); + + } + + // update user camera and its children + + updateUserCamera( camera, cameraXR, parent ); + + }; + + function updateUserCamera( camera, cameraXR, parent ) { + + if ( parent === null ) { + + camera.matrix.copy( cameraXR.matrixWorld ); + + } else { + + camera.matrix.copy( parent.matrixWorld ); + camera.matrix.invert(); + camera.matrix.multiply( cameraXR.matrixWorld ); + + } + + camera.matrix.decompose( camera.position, camera.quaternion, camera.scale ); + camera.updateMatrixWorld( true ); + + camera.projectionMatrix.copy( cameraXR.projectionMatrix ); + camera.projectionMatrixInverse.copy( cameraXR.projectionMatrixInverse ); + + if ( camera.isPerspectiveCamera ) { + + camera.fov = RAD2DEG * 2 * Math.atan( 1 / camera.projectionMatrix.elements[ 5 ] ); + camera.zoom = 1; + + } + + } + + this.getCamera = function () { + + return cameraXR; + + }; + + this.getFoveation = function () { + + if ( glProjLayer === null && glBaseLayer === null ) { + + return undefined; + + } + + return foveation; + + }; + + this.setFoveation = function ( value ) { + + // 0 = no foveation = full resolution + // 1 = maximum foveation = the edges render at lower resolution + + foveation = value; + + if ( glProjLayer !== null ) { + + glProjLayer.fixedFoveation = value; + + } + + if ( glBaseLayer !== null && glBaseLayer.fixedFoveation !== undefined ) { + + glBaseLayer.fixedFoveation = value; + + } + + }; + + this.hasDepthSensing = function () { + + return depthSensing.texture !== null; + + }; + + // Animation Loop + + let onAnimationFrameCallback = null; + + function onAnimationFrame( time, frame ) { + + pose = frame.getViewerPose( customReferenceSpace || referenceSpace ); + xrFrame = frame; + + if ( pose !== null ) { + + const views = pose.views; + + if ( glBaseLayer !== null ) { + + renderer.setRenderTargetFramebuffer( newRenderTarget, glBaseLayer.framebuffer ); + renderer.setRenderTarget( newRenderTarget ); + + } + + let cameraXRNeedsUpdate = false; + + // check if it's necessary to rebuild cameraXR's camera list + + if ( views.length !== cameraXR.cameras.length ) { + + cameraXR.cameras.length = 0; + cameraXRNeedsUpdate = true; + + } + + for ( let i = 0; i < views.length; i ++ ) { + + const view = views[ i ]; + + let viewport = null; + + if ( glBaseLayer !== null ) { + + viewport = glBaseLayer.getViewport( view ); + + } else { + + const glSubImage = glBinding.getViewSubImage( glProjLayer, view ); + viewport = glSubImage.viewport; + + // For side-by-side projection, we only produce a single texture for both eyes. + if ( i === 0 ) { + + renderer.setRenderTargetTextures( + newRenderTarget, + glSubImage.colorTexture, + glProjLayer.ignoreDepthValues ? undefined : glSubImage.depthStencilTexture ); + + renderer.setRenderTarget( newRenderTarget ); + + } + + } + + let camera = cameras[ i ]; + + if ( camera === undefined ) { + + camera = new PerspectiveCamera(); + camera.layers.enable( i ); + camera.viewport = new Vector4(); + cameras[ i ] = camera; + + } + + camera.matrix.fromArray( view.transform.matrix ); + camera.matrix.decompose( camera.position, camera.quaternion, camera.scale ); + camera.projectionMatrix.fromArray( view.projectionMatrix ); + camera.projectionMatrixInverse.copy( camera.projectionMatrix ).invert(); + camera.viewport.set( viewport.x, viewport.y, viewport.width, viewport.height ); + + if ( i === 0 ) { + + cameraXR.matrix.copy( camera.matrix ); + cameraXR.matrix.decompose( cameraXR.position, cameraXR.quaternion, cameraXR.scale ); + + } + + if ( cameraXRNeedsUpdate === true ) { + + cameraXR.cameras.push( camera ); + + } + + } + + // + + const enabledFeatures = session.enabledFeatures; + + if ( enabledFeatures && enabledFeatures.includes( 'depth-sensing' ) ) { + + const depthData = glBinding.getDepthInformation( views[ 0 ] ); + + if ( depthData && depthData.isValid && depthData.texture ) { + + depthSensing.init( renderer, depthData, session.renderState ); + + } + + } + + } + + // + + for ( let i = 0; i < controllers.length; i ++ ) { + + const inputSource = controllerInputSources[ i ]; + const controller = controllers[ i ]; + + if ( inputSource !== null && controller !== undefined ) { + + controller.update( inputSource, frame, customReferenceSpace || referenceSpace ); + + } + + } + + depthSensing.render( renderer, cameraXR ); + + if ( onAnimationFrameCallback ) onAnimationFrameCallback( time, frame ); + + if ( frame.detectedPlanes ) { + + scope.dispatchEvent( { type: 'planesdetected', data: frame } ); + + } + + xrFrame = null; + + } + + const animation = new WebGLAnimation(); + + animation.setAnimationLoop( onAnimationFrame ); + + this.setAnimationLoop = function ( callback ) { + + onAnimationFrameCallback = callback; + + }; + + this.dispose = function () {}; + + } + +} + +const _e1 = /*@__PURE__*/ new Euler(); +const _m1 = /*@__PURE__*/ new Matrix4(); + +function WebGLMaterials( renderer, properties ) { + + function refreshTransformUniform( map, uniform ) { + + if ( map.matrixAutoUpdate === true ) { + + map.updateMatrix(); + + } + + uniform.value.copy( map.matrix ); + + } + + function refreshFogUniforms( uniforms, fog ) { + + fog.color.getRGB( uniforms.fogColor.value, getUnlitUniformColorSpace( renderer ) ); + + if ( fog.isFog ) { + + uniforms.fogNear.value = fog.near; + uniforms.fogFar.value = fog.far; + + } else if ( fog.isFogExp2 ) { + + uniforms.fogDensity.value = fog.density; + + } + + } + + function refreshMaterialUniforms( uniforms, material, pixelRatio, height, transmissionRenderTarget ) { + + if ( material.isMeshBasicMaterial ) { + + refreshUniformsCommon( uniforms, material ); + + } else if ( material.isMeshLambertMaterial ) { + + refreshUniformsCommon( uniforms, material ); + + } else if ( material.isMeshToonMaterial ) { + + refreshUniformsCommon( uniforms, material ); + refreshUniformsToon( uniforms, material ); + + } else if ( material.isMeshPhongMaterial ) { + + refreshUniformsCommon( uniforms, material ); + refreshUniformsPhong( uniforms, material ); + + } else if ( material.isMeshStandardMaterial ) { + + refreshUniformsCommon( uniforms, material ); + refreshUniformsStandard( uniforms, material ); + + if ( material.isMeshPhysicalMaterial ) { + + refreshUniformsPhysical( uniforms, material, transmissionRenderTarget ); + + } + + } else if ( material.isMeshMatcapMaterial ) { + + refreshUniformsCommon( uniforms, material ); + refreshUniformsMatcap( uniforms, material ); + + } else if ( material.isMeshDepthMaterial ) { + + refreshUniformsCommon( uniforms, material ); + + } else if ( material.isMeshDistanceMaterial ) { + + refreshUniformsCommon( uniforms, material ); + refreshUniformsDistance( uniforms, material ); + + } else if ( material.isMeshNormalMaterial ) { + + refreshUniformsCommon( uniforms, material ); + + } else if ( material.isLineBasicMaterial ) { + + refreshUniformsLine( uniforms, material ); + + if ( material.isLineDashedMaterial ) { + + refreshUniformsDash( uniforms, material ); + + } + + } else if ( material.isPointsMaterial ) { + + refreshUniformsPoints( uniforms, material, pixelRatio, height ); + + } else if ( material.isSpriteMaterial ) { + + refreshUniformsSprites( uniforms, material ); + + } else if ( material.isShadowMaterial ) { + + uniforms.color.value.copy( material.color ); + uniforms.opacity.value = material.opacity; + + } else if ( material.isShaderMaterial ) { + + material.uniformsNeedUpdate = false; // #15581 + + } + + } + + function refreshUniformsCommon( uniforms, material ) { + + uniforms.opacity.value = material.opacity; + + if ( material.color ) { + + uniforms.diffuse.value.copy( material.color ); + + } + + if ( material.emissive ) { + + uniforms.emissive.value.copy( material.emissive ).multiplyScalar( material.emissiveIntensity ); + + } + + if ( material.map ) { + + uniforms.map.value = material.map; + + refreshTransformUniform( material.map, uniforms.mapTransform ); + + } + + if ( material.alphaMap ) { + + uniforms.alphaMap.value = material.alphaMap; + + refreshTransformUniform( material.alphaMap, uniforms.alphaMapTransform ); + + } + + if ( material.bumpMap ) { + + uniforms.bumpMap.value = material.bumpMap; + + refreshTransformUniform( material.bumpMap, uniforms.bumpMapTransform ); + + uniforms.bumpScale.value = material.bumpScale; + + if ( material.side === BackSide ) { + + uniforms.bumpScale.value *= - 1; + + } + + } + + if ( material.normalMap ) { + + uniforms.normalMap.value = material.normalMap; + + refreshTransformUniform( material.normalMap, uniforms.normalMapTransform ); + + uniforms.normalScale.value.copy( material.normalScale ); + + if ( material.side === BackSide ) { + + uniforms.normalScale.value.negate(); + + } + + } + + if ( material.displacementMap ) { + + uniforms.displacementMap.value = material.displacementMap; + + refreshTransformUniform( material.displacementMap, uniforms.displacementMapTransform ); + + uniforms.displacementScale.value = material.displacementScale; + uniforms.displacementBias.value = material.displacementBias; + + } + + if ( material.emissiveMap ) { + + uniforms.emissiveMap.value = material.emissiveMap; + + refreshTransformUniform( material.emissiveMap, uniforms.emissiveMapTransform ); + + } + + if ( material.specularMap ) { + + uniforms.specularMap.value = material.specularMap; + + refreshTransformUniform( material.specularMap, uniforms.specularMapTransform ); + + } + + if ( material.alphaTest > 0 ) { + + uniforms.alphaTest.value = material.alphaTest; + + } + + const materialProperties = properties.get( material ); + + const envMap = materialProperties.envMap; + const envMapRotation = materialProperties.envMapRotation; + + if ( envMap ) { + + uniforms.envMap.value = envMap; + + _e1.copy( envMapRotation ); + + // accommodate left-handed frame + _e1.x *= - 1; _e1.y *= - 1; _e1.z *= - 1; + + if ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) { + + // environment maps which are not cube render targets or PMREMs follow a different convention + _e1.y *= - 1; + _e1.z *= - 1; + + } + + uniforms.envMapRotation.value.setFromMatrix4( _m1.makeRotationFromEuler( _e1 ) ); + + uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? - 1 : 1; + + uniforms.reflectivity.value = material.reflectivity; + uniforms.ior.value = material.ior; + uniforms.refractionRatio.value = material.refractionRatio; + + } + + if ( material.lightMap ) { + + uniforms.lightMap.value = material.lightMap; + + // artist-friendly light intensity scaling factor + const scaleFactor = ( renderer._useLegacyLights === true ) ? Math.PI : 1; + + uniforms.lightMapIntensity.value = material.lightMapIntensity * scaleFactor; + + refreshTransformUniform( material.lightMap, uniforms.lightMapTransform ); + + } + + if ( material.aoMap ) { + + uniforms.aoMap.value = material.aoMap; + uniforms.aoMapIntensity.value = material.aoMapIntensity; + + refreshTransformUniform( material.aoMap, uniforms.aoMapTransform ); + + } + + } + + function refreshUniformsLine( uniforms, material ) { + + uniforms.diffuse.value.copy( material.color ); + uniforms.opacity.value = material.opacity; + + if ( material.map ) { + + uniforms.map.value = material.map; + + refreshTransformUniform( material.map, uniforms.mapTransform ); + + } + + } + + function refreshUniformsDash( uniforms, material ) { + + uniforms.dashSize.value = material.dashSize; + uniforms.totalSize.value = material.dashSize + material.gapSize; + uniforms.scale.value = material.scale; + + } + + function refreshUniformsPoints( uniforms, material, pixelRatio, height ) { + + uniforms.diffuse.value.copy( material.color ); + uniforms.opacity.value = material.opacity; + uniforms.size.value = material.size * pixelRatio; + uniforms.scale.value = height * 0.5; + + if ( material.map ) { + + uniforms.map.value = material.map; + + refreshTransformUniform( material.map, uniforms.uvTransform ); + + } + + if ( material.alphaMap ) { + + uniforms.alphaMap.value = material.alphaMap; + + refreshTransformUniform( material.alphaMap, uniforms.alphaMapTransform ); + + } + + if ( material.alphaTest > 0 ) { + + uniforms.alphaTest.value = material.alphaTest; + + } + + } + + function refreshUniformsSprites( uniforms, material ) { + + uniforms.diffuse.value.copy( material.color ); + uniforms.opacity.value = material.opacity; + uniforms.rotation.value = material.rotation; + + if ( material.map ) { + + uniforms.map.value = material.map; + + refreshTransformUniform( material.map, uniforms.mapTransform ); + + } + + if ( material.alphaMap ) { + + uniforms.alphaMap.value = material.alphaMap; + + refreshTransformUniform( material.alphaMap, uniforms.alphaMapTransform ); + + } + + if ( material.alphaTest > 0 ) { + + uniforms.alphaTest.value = material.alphaTest; + + } + + } + + function refreshUniformsPhong( uniforms, material ) { + + uniforms.specular.value.copy( material.specular ); + uniforms.shininess.value = Math.max( material.shininess, 1e-4 ); // to prevent pow( 0.0, 0.0 ) + + } + + function refreshUniformsToon( uniforms, material ) { + + if ( material.gradientMap ) { + + uniforms.gradientMap.value = material.gradientMap; + + } + + } + + function refreshUniformsStandard( uniforms, material ) { + + uniforms.metalness.value = material.metalness; + + if ( material.metalnessMap ) { + + uniforms.metalnessMap.value = material.metalnessMap; + + refreshTransformUniform( material.metalnessMap, uniforms.metalnessMapTransform ); + + } + + uniforms.roughness.value = material.roughness; + + if ( material.roughnessMap ) { + + uniforms.roughnessMap.value = material.roughnessMap; + + refreshTransformUniform( material.roughnessMap, uniforms.roughnessMapTransform ); + + } + + if ( material.envMap ) { + + //uniforms.envMap.value = material.envMap; // part of uniforms common + + uniforms.envMapIntensity.value = material.envMapIntensity; + + } + + } + + function refreshUniformsPhysical( uniforms, material, transmissionRenderTarget ) { + + uniforms.ior.value = material.ior; // also part of uniforms common + + if ( material.sheen > 0 ) { + + uniforms.sheenColor.value.copy( material.sheenColor ).multiplyScalar( material.sheen ); + + uniforms.sheenRoughness.value = material.sheenRoughness; + + if ( material.sheenColorMap ) { + + uniforms.sheenColorMap.value = material.sheenColorMap; + + refreshTransformUniform( material.sheenColorMap, uniforms.sheenColorMapTransform ); + + } + + if ( material.sheenRoughnessMap ) { + + uniforms.sheenRoughnessMap.value = material.sheenRoughnessMap; + + refreshTransformUniform( material.sheenRoughnessMap, uniforms.sheenRoughnessMapTransform ); + + } + + } + + if ( material.clearcoat > 0 ) { + + uniforms.clearcoat.value = material.clearcoat; + uniforms.clearcoatRoughness.value = material.clearcoatRoughness; + + if ( material.clearcoatMap ) { + + uniforms.clearcoatMap.value = material.clearcoatMap; + + refreshTransformUniform( material.clearcoatMap, uniforms.clearcoatMapTransform ); + + } + + if ( material.clearcoatRoughnessMap ) { + + uniforms.clearcoatRoughnessMap.value = material.clearcoatRoughnessMap; + + refreshTransformUniform( material.clearcoatRoughnessMap, uniforms.clearcoatRoughnessMapTransform ); + + } + + if ( material.clearcoatNormalMap ) { + + uniforms.clearcoatNormalMap.value = material.clearcoatNormalMap; + + refreshTransformUniform( material.clearcoatNormalMap, uniforms.clearcoatNormalMapTransform ); + + uniforms.clearcoatNormalScale.value.copy( material.clearcoatNormalScale ); + + if ( material.side === BackSide ) { + + uniforms.clearcoatNormalScale.value.negate(); + + } + + } + + } + + if ( material.dispersion > 0 ) { + + uniforms.dispersion.value = material.dispersion; + + } + + if ( material.iridescence > 0 ) { + + uniforms.iridescence.value = material.iridescence; + uniforms.iridescenceIOR.value = material.iridescenceIOR; + uniforms.iridescenceThicknessMinimum.value = material.iridescenceThicknessRange[ 0 ]; + uniforms.iridescenceThicknessMaximum.value = material.iridescenceThicknessRange[ 1 ]; + + if ( material.iridescenceMap ) { + + uniforms.iridescenceMap.value = material.iridescenceMap; + + refreshTransformUniform( material.iridescenceMap, uniforms.iridescenceMapTransform ); + + } + + if ( material.iridescenceThicknessMap ) { + + uniforms.iridescenceThicknessMap.value = material.iridescenceThicknessMap; + + refreshTransformUniform( material.iridescenceThicknessMap, uniforms.iridescenceThicknessMapTransform ); + + } + + } + + if ( material.transmission > 0 ) { + + uniforms.transmission.value = material.transmission; + uniforms.transmissionSamplerMap.value = transmissionRenderTarget.texture; + uniforms.transmissionSamplerSize.value.set( transmissionRenderTarget.width, transmissionRenderTarget.height ); + + if ( material.transmissionMap ) { + + uniforms.transmissionMap.value = material.transmissionMap; + + refreshTransformUniform( material.transmissionMap, uniforms.transmissionMapTransform ); + + } + + uniforms.thickness.value = material.thickness; + + if ( material.thicknessMap ) { + + uniforms.thicknessMap.value = material.thicknessMap; + + refreshTransformUniform( material.thicknessMap, uniforms.thicknessMapTransform ); + + } + + uniforms.attenuationDistance.value = material.attenuationDistance; + uniforms.attenuationColor.value.copy( material.attenuationColor ); + + } + + if ( material.anisotropy > 0 ) { + + uniforms.anisotropyVector.value.set( material.anisotropy * Math.cos( material.anisotropyRotation ), material.anisotropy * Math.sin( material.anisotropyRotation ) ); + + if ( material.anisotropyMap ) { + + uniforms.anisotropyMap.value = material.anisotropyMap; + + refreshTransformUniform( material.anisotropyMap, uniforms.anisotropyMapTransform ); + + } + + } + + uniforms.specularIntensity.value = material.specularIntensity; + uniforms.specularColor.value.copy( material.specularColor ); + + if ( material.specularColorMap ) { + + uniforms.specularColorMap.value = material.specularColorMap; + + refreshTransformUniform( material.specularColorMap, uniforms.specularColorMapTransform ); + + } + + if ( material.specularIntensityMap ) { + + uniforms.specularIntensityMap.value = material.specularIntensityMap; + + refreshTransformUniform( material.specularIntensityMap, uniforms.specularIntensityMapTransform ); + + } + + } + + function refreshUniformsMatcap( uniforms, material ) { + + if ( material.matcap ) { + + uniforms.matcap.value = material.matcap; + + } + + } + + function refreshUniformsDistance( uniforms, material ) { + + const light = properties.get( material ).light; + + uniforms.referencePosition.value.setFromMatrixPosition( light.matrixWorld ); + uniforms.nearDistance.value = light.shadow.camera.near; + uniforms.farDistance.value = light.shadow.camera.far; + + } + + return { + refreshFogUniforms: refreshFogUniforms, + refreshMaterialUniforms: refreshMaterialUniforms + }; + +} + +function WebGLUniformsGroups( gl, info, capabilities, state ) { + + let buffers = {}; + let updateList = {}; + let allocatedBindingPoints = []; + + const maxBindingPoints = gl.getParameter( gl.MAX_UNIFORM_BUFFER_BINDINGS ); // binding points are global whereas block indices are per shader program + + function bind( uniformsGroup, program ) { + + const webglProgram = program.program; + state.uniformBlockBinding( uniformsGroup, webglProgram ); + + } + + function update( uniformsGroup, program ) { + + let buffer = buffers[ uniformsGroup.id ]; + + if ( buffer === undefined ) { + + prepareUniformsGroup( uniformsGroup ); + + buffer = createBuffer( uniformsGroup ); + buffers[ uniformsGroup.id ] = buffer; + + uniformsGroup.addEventListener( 'dispose', onUniformsGroupsDispose ); + + } + + // ensure to update the binding points/block indices mapping for this program + + const webglProgram = program.program; + state.updateUBOMapping( uniformsGroup, webglProgram ); + + // update UBO once per frame + + const frame = info.render.frame; + + if ( updateList[ uniformsGroup.id ] !== frame ) { + + updateBufferData( uniformsGroup ); + + updateList[ uniformsGroup.id ] = frame; + + } + + } + + function createBuffer( uniformsGroup ) { + + // the setup of an UBO is independent of a particular shader program but global + + const bindingPointIndex = allocateBindingPointIndex(); + uniformsGroup.__bindingPointIndex = bindingPointIndex; + + const buffer = gl.createBuffer(); + const size = uniformsGroup.__size; + const usage = uniformsGroup.usage; + + gl.bindBuffer( gl.UNIFORM_BUFFER, buffer ); + gl.bufferData( gl.UNIFORM_BUFFER, size, usage ); + gl.bindBuffer( gl.UNIFORM_BUFFER, null ); + gl.bindBufferBase( gl.UNIFORM_BUFFER, bindingPointIndex, buffer ); + + return buffer; + + } + + function allocateBindingPointIndex() { + + for ( let i = 0; i < maxBindingPoints; i ++ ) { + + if ( allocatedBindingPoints.indexOf( i ) === - 1 ) { + + allocatedBindingPoints.push( i ); + return i; + + } + + } + + console.error( 'THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.' ); + + return 0; + + } + + function updateBufferData( uniformsGroup ) { + + const buffer = buffers[ uniformsGroup.id ]; + const uniforms = uniformsGroup.uniforms; + const cache = uniformsGroup.__cache; + + gl.bindBuffer( gl.UNIFORM_BUFFER, buffer ); + + for ( let i = 0, il = uniforms.length; i < il; i ++ ) { + + const uniformArray = Array.isArray( uniforms[ i ] ) ? uniforms[ i ] : [ uniforms[ i ] ]; + + for ( let j = 0, jl = uniformArray.length; j < jl; j ++ ) { + + const uniform = uniformArray[ j ]; + + if ( hasUniformChanged( uniform, i, j, cache ) === true ) { + + const offset = uniform.__offset; + + const values = Array.isArray( uniform.value ) ? uniform.value : [ uniform.value ]; + + let arrayOffset = 0; + + for ( let k = 0; k < values.length; k ++ ) { + + const value = values[ k ]; + + const info = getUniformSize( value ); + + // TODO add integer and struct support + if ( typeof value === 'number' || typeof value === 'boolean' ) { + + uniform.__data[ 0 ] = value; + gl.bufferSubData( gl.UNIFORM_BUFFER, offset + arrayOffset, uniform.__data ); + + } else if ( value.isMatrix3 ) { + + // manually converting 3x3 to 3x4 + + uniform.__data[ 0 ] = value.elements[ 0 ]; + uniform.__data[ 1 ] = value.elements[ 1 ]; + uniform.__data[ 2 ] = value.elements[ 2 ]; + uniform.__data[ 3 ] = 0; + uniform.__data[ 4 ] = value.elements[ 3 ]; + uniform.__data[ 5 ] = value.elements[ 4 ]; + uniform.__data[ 6 ] = value.elements[ 5 ]; + uniform.__data[ 7 ] = 0; + uniform.__data[ 8 ] = value.elements[ 6 ]; + uniform.__data[ 9 ] = value.elements[ 7 ]; + uniform.__data[ 10 ] = value.elements[ 8 ]; + uniform.__data[ 11 ] = 0; + + } else { + + value.toArray( uniform.__data, arrayOffset ); + + arrayOffset += info.storage / Float32Array.BYTES_PER_ELEMENT; + + } + + } + + gl.bufferSubData( gl.UNIFORM_BUFFER, offset, uniform.__data ); + + } + + } + + } + + gl.bindBuffer( gl.UNIFORM_BUFFER, null ); + + } + + function hasUniformChanged( uniform, index, indexArray, cache ) { + + const value = uniform.value; + const indexString = index + '_' + indexArray; + + if ( cache[ indexString ] === undefined ) { + + // cache entry does not exist so far + + if ( typeof value === 'number' || typeof value === 'boolean' ) { + + cache[ indexString ] = value; + + } else { + + cache[ indexString ] = value.clone(); + + } + + return true; + + } else { + + const cachedObject = cache[ indexString ]; + + // compare current value with cached entry + + if ( typeof value === 'number' || typeof value === 'boolean' ) { + + if ( cachedObject !== value ) { + + cache[ indexString ] = value; + return true; + + } + + } else { + + if ( cachedObject.equals( value ) === false ) { + + cachedObject.copy( value ); + return true; + + } + + } + + } + + return false; + + } + + function prepareUniformsGroup( uniformsGroup ) { + + // determine total buffer size according to the STD140 layout + // Hint: STD140 is the only supported layout in WebGL 2 + + const uniforms = uniformsGroup.uniforms; + + let offset = 0; // global buffer offset in bytes + const chunkSize = 16; // size of a chunk in bytes + + for ( let i = 0, l = uniforms.length; i < l; i ++ ) { + + const uniformArray = Array.isArray( uniforms[ i ] ) ? uniforms[ i ] : [ uniforms[ i ] ]; + + for ( let j = 0, jl = uniformArray.length; j < jl; j ++ ) { + + const uniform = uniformArray[ j ]; + + const values = Array.isArray( uniform.value ) ? uniform.value : [ uniform.value ]; + + for ( let k = 0, kl = values.length; k < kl; k ++ ) { + + const value = values[ k ]; + + const info = getUniformSize( value ); + + // Calculate the chunk offset + const chunkOffsetUniform = offset % chunkSize; + + // Check for chunk overflow + if ( chunkOffsetUniform !== 0 && ( chunkSize - chunkOffsetUniform ) < info.boundary ) { + + // Add padding and adjust offset + offset += ( chunkSize - chunkOffsetUniform ); + + } + + // the following two properties will be used for partial buffer updates + + uniform.__data = new Float32Array( info.storage / Float32Array.BYTES_PER_ELEMENT ); + uniform.__offset = offset; + + + // Update the global offset + offset += info.storage; + + + } + + } + + } + + // ensure correct final padding + + const chunkOffset = offset % chunkSize; + + if ( chunkOffset > 0 ) offset += ( chunkSize - chunkOffset ); + + // + + uniformsGroup.__size = offset; + uniformsGroup.__cache = {}; + + return this; + + } + + function getUniformSize( value ) { + + const info = { + boundary: 0, // bytes + storage: 0 // bytes + }; + + // determine sizes according to STD140 + + if ( typeof value === 'number' || typeof value === 'boolean' ) { + + // float/int/bool + + info.boundary = 4; + info.storage = 4; + + } else if ( value.isVector2 ) { + + // vec2 + + info.boundary = 8; + info.storage = 8; + + } else if ( value.isVector3 || value.isColor ) { + + // vec3 + + info.boundary = 16; + info.storage = 12; // evil: vec3 must start on a 16-byte boundary but it only consumes 12 bytes + + } else if ( value.isVector4 ) { + + // vec4 + + info.boundary = 16; + info.storage = 16; + + } else if ( value.isMatrix3 ) { + + // mat3 (in STD140 a 3x3 matrix is represented as 3x4) + + info.boundary = 48; + info.storage = 48; + + } else if ( value.isMatrix4 ) { + + // mat4 + + info.boundary = 64; + info.storage = 64; + + } else if ( value.isTexture ) { + + console.warn( 'THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.' ); + + } else { + + console.warn( 'THREE.WebGLRenderer: Unsupported uniform value type.', value ); + + } + + return info; + + } + + function onUniformsGroupsDispose( event ) { + + const uniformsGroup = event.target; + + uniformsGroup.removeEventListener( 'dispose', onUniformsGroupsDispose ); + + const index = allocatedBindingPoints.indexOf( uniformsGroup.__bindingPointIndex ); + allocatedBindingPoints.splice( index, 1 ); + + gl.deleteBuffer( buffers[ uniformsGroup.id ] ); + + delete buffers[ uniformsGroup.id ]; + delete updateList[ uniformsGroup.id ]; + + } + + function dispose() { + + for ( const id in buffers ) { + + gl.deleteBuffer( buffers[ id ] ); + + } + + allocatedBindingPoints = []; + buffers = {}; + updateList = {}; + + } + + return { + + bind: bind, + update: update, + + dispose: dispose + + }; + +} + +class WebGLRenderer { + + constructor( parameters = {} ) { + + const { + canvas = createCanvasElement(), + context = null, + depth = true, + stencil = false, + alpha = false, + antialias = false, + premultipliedAlpha = true, + preserveDrawingBuffer = false, + powerPreference = 'default', + failIfMajorPerformanceCaveat = false, + } = parameters; + + this.isWebGLRenderer = true; + + let _alpha; + + if ( context !== null ) { + + if ( typeof WebGLRenderingContext !== 'undefined' && context instanceof WebGLRenderingContext ) { + + throw new Error( 'THREE.WebGLRenderer: WebGL 1 is not supported since r163.' ); + + } + + _alpha = context.getContextAttributes().alpha; + + } else { + + _alpha = alpha; + + } + + const uintClearColor = new Uint32Array( 4 ); + const intClearColor = new Int32Array( 4 ); + + let currentRenderList = null; + let currentRenderState = null; + + // render() can be called from within a callback triggered by another render. + // We track this so that the nested render call gets its list and state isolated from the parent render call. + + const renderListStack = []; + const renderStateStack = []; + + // public properties + + this.domElement = canvas; + + // Debug configuration container + this.debug = { + + /** + * Enables error checking and reporting when shader programs are being compiled + * @type {boolean} + */ + checkShaderErrors: true, + /** + * Callback for custom error reporting. + * @type {?Function} + */ + onShaderError: null + }; + + // clearing + + this.autoClear = true; + this.autoClearColor = true; + this.autoClearDepth = true; + this.autoClearStencil = true; + + // scene graph + + this.sortObjects = true; + + // user-defined clipping + + this.clippingPlanes = []; + this.localClippingEnabled = false; + + // physically based shading + + this._outputColorSpace = SRGBColorSpace; + + // physical lights + + this._useLegacyLights = false; + + // tone mapping + + this.toneMapping = NoToneMapping; + this.toneMappingExposure = 1.0; + + // internal properties + + const _this = this; + + let _isContextLost = false; + + // internal state cache + + let _currentActiveCubeFace = 0; + let _currentActiveMipmapLevel = 0; + let _currentRenderTarget = null; + let _currentMaterialId = - 1; + + let _currentCamera = null; + + const _currentViewport = new Vector4(); + const _currentScissor = new Vector4(); + let _currentScissorTest = null; + + const _currentClearColor = new Color( 0x000000 ); + let _currentClearAlpha = 0; + + // + + let _width = canvas.width; + let _height = canvas.height; + + let _pixelRatio = 1; + let _opaqueSort = null; + let _transparentSort = null; + + const _viewport = new Vector4( 0, 0, _width, _height ); + const _scissor = new Vector4( 0, 0, _width, _height ); + let _scissorTest = false; + + // frustum + + const _frustum = new Frustum(); + + // clipping + + let _clippingEnabled = false; + let _localClippingEnabled = false; + + // camera matrices cache + + const _projScreenMatrix = new Matrix4(); + + const _vector3 = new Vector3(); + + const _emptyScene = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true }; + + function getTargetPixelRatio() { + + return _currentRenderTarget === null ? _pixelRatio : 1; + + } + + // initialize + + let _gl = context; + + function getContext( contextName, contextAttributes ) { + + return canvas.getContext( contextName, contextAttributes ); + + } + + try { + + const contextAttributes = { + alpha: true, + depth, + stencil, + antialias, + premultipliedAlpha, + preserveDrawingBuffer, + powerPreference, + failIfMajorPerformanceCaveat, + }; + + // OffscreenCanvas does not have setAttribute, see #22811 + if ( 'setAttribute' in canvas ) canvas.setAttribute( 'data-engine', `three.js r${REVISION}` ); + + // event listeners must be registered before WebGL context is created, see #12753 + canvas.addEventListener( 'webglcontextlost', onContextLost, false ); + canvas.addEventListener( 'webglcontextrestored', onContextRestore, false ); + canvas.addEventListener( 'webglcontextcreationerror', onContextCreationError, false ); + + if ( _gl === null ) { + + const contextName = 'webgl2'; + + _gl = getContext( contextName, contextAttributes ); + + if ( _gl === null ) { + + if ( getContext( contextName ) ) { + + throw new Error( 'Error creating WebGL context with your selected attributes.' ); + + } else { + + throw new Error( 'Error creating WebGL context.' ); + + } + + } + + } + + } catch ( error ) { + + console.error( 'THREE.WebGLRenderer: ' + error.message ); + throw error; + + } + + let extensions, capabilities, state, info; + let properties, textures, cubemaps, cubeuvmaps, attributes, geometries, objects; + let programCache, materials, renderLists, renderStates, clipping, shadowMap; + + let background, morphtargets, bufferRenderer, indexedBufferRenderer; + + let utils, bindingStates, uniformsGroups; + + function initGLContext() { + + extensions = new WebGLExtensions( _gl ); + extensions.init(); + + utils = new WebGLUtils( _gl, extensions ); + + capabilities = new WebGLCapabilities( _gl, extensions, parameters, utils ); + + state = new WebGLState( _gl ); + + info = new WebGLInfo( _gl ); + properties = new WebGLProperties(); + textures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info ); + cubemaps = new WebGLCubeMaps( _this ); + cubeuvmaps = new WebGLCubeUVMaps( _this ); + attributes = new WebGLAttributes( _gl ); + bindingStates = new WebGLBindingStates( _gl, attributes ); + geometries = new WebGLGeometries( _gl, attributes, info, bindingStates ); + objects = new WebGLObjects( _gl, geometries, attributes, info ); + morphtargets = new WebGLMorphtargets( _gl, capabilities, textures ); + clipping = new WebGLClipping( properties ); + programCache = new WebGLPrograms( _this, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping ); + materials = new WebGLMaterials( _this, properties ); + renderLists = new WebGLRenderLists(); + renderStates = new WebGLRenderStates( extensions ); + background = new WebGLBackground( _this, cubemaps, cubeuvmaps, state, objects, _alpha, premultipliedAlpha ); + shadowMap = new WebGLShadowMap( _this, objects, capabilities ); + uniformsGroups = new WebGLUniformsGroups( _gl, info, capabilities, state ); + + bufferRenderer = new WebGLBufferRenderer( _gl, extensions, info ); + indexedBufferRenderer = new WebGLIndexedBufferRenderer( _gl, extensions, info ); + + info.programs = programCache.programs; + + _this.capabilities = capabilities; + _this.extensions = extensions; + _this.properties = properties; + _this.renderLists = renderLists; + _this.shadowMap = shadowMap; + _this.state = state; + _this.info = info; + + } + + initGLContext(); + + // xr + + const xr = new WebXRManager( _this, _gl ); + + this.xr = xr; + + // API + + this.getContext = function () { + + return _gl; + + }; + + this.getContextAttributes = function () { + + return _gl.getContextAttributes(); + + }; + + this.forceContextLoss = function () { + + const extension = extensions.get( 'WEBGL_lose_context' ); + if ( extension ) extension.loseContext(); + + }; + + this.forceContextRestore = function () { + + const extension = extensions.get( 'WEBGL_lose_context' ); + if ( extension ) extension.restoreContext(); + + }; + + this.getPixelRatio = function () { + + return _pixelRatio; + + }; + + this.setPixelRatio = function ( value ) { + + if ( value === undefined ) return; + + _pixelRatio = value; + + this.setSize( _width, _height, false ); + + }; + + this.getSize = function ( target ) { + + return target.set( _width, _height ); + + }; + + this.setSize = function ( width, height, updateStyle = true ) { + + if ( xr.isPresenting ) { + + console.warn( 'THREE.WebGLRenderer: Can\'t change size while VR device is presenting.' ); + return; + + } + + _width = width; + _height = height; + + canvas.width = Math.floor( width * _pixelRatio ); + canvas.height = Math.floor( height * _pixelRatio ); + + if ( updateStyle === true ) { + + canvas.style.width = width + 'px'; + canvas.style.height = height + 'px'; + + } + + this.setViewport( 0, 0, width, height ); + + }; + + this.getDrawingBufferSize = function ( target ) { + + return target.set( _width * _pixelRatio, _height * _pixelRatio ).floor(); + + }; + + this.setDrawingBufferSize = function ( width, height, pixelRatio ) { + + _width = width; + _height = height; + + _pixelRatio = pixelRatio; + + canvas.width = Math.floor( width * pixelRatio ); + canvas.height = Math.floor( height * pixelRatio ); + + this.setViewport( 0, 0, width, height ); + + }; + + this.getCurrentViewport = function ( target ) { + + return target.copy( _currentViewport ); + + }; + + this.getViewport = function ( target ) { + + return target.copy( _viewport ); + + }; + + this.setViewport = function ( x, y, width, height ) { + + if ( x.isVector4 ) { + + _viewport.set( x.x, x.y, x.z, x.w ); + + } else { + + _viewport.set( x, y, width, height ); + + } + + state.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).round() ); + + }; + + this.getScissor = function ( target ) { + + return target.copy( _scissor ); + + }; + + this.setScissor = function ( x, y, width, height ) { + + if ( x.isVector4 ) { + + _scissor.set( x.x, x.y, x.z, x.w ); + + } else { + + _scissor.set( x, y, width, height ); + + } + + state.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).round() ); + + }; + + this.getScissorTest = function () { + + return _scissorTest; + + }; + + this.setScissorTest = function ( boolean ) { + + state.setScissorTest( _scissorTest = boolean ); + + }; + + this.setOpaqueSort = function ( method ) { + + _opaqueSort = method; + + }; + + this.setTransparentSort = function ( method ) { + + _transparentSort = method; + + }; + + // Clearing + + this.getClearColor = function ( target ) { + + return target.copy( background.getClearColor() ); + + }; + + this.setClearColor = function () { + + background.setClearColor.apply( background, arguments ); + + }; + + this.getClearAlpha = function () { + + return background.getClearAlpha(); + + }; + + this.setClearAlpha = function () { + + background.setClearAlpha.apply( background, arguments ); + + }; + + this.clear = function ( color = true, depth = true, stencil = true ) { + + let bits = 0; + + if ( color ) { + + // check if we're trying to clear an integer target + let isIntegerFormat = false; + if ( _currentRenderTarget !== null ) { + + const targetFormat = _currentRenderTarget.texture.format; + isIntegerFormat = targetFormat === RGBAIntegerFormat || + targetFormat === RGIntegerFormat || + targetFormat === RedIntegerFormat; + + } + + // use the appropriate clear functions to clear the target if it's a signed + // or unsigned integer target + if ( isIntegerFormat ) { + + const targetType = _currentRenderTarget.texture.type; + const isUnsignedType = targetType === UnsignedByteType || + targetType === UnsignedIntType || + targetType === UnsignedShortType || + targetType === UnsignedInt248Type || + targetType === UnsignedShort4444Type || + targetType === UnsignedShort5551Type; + + const clearColor = background.getClearColor(); + const a = background.getClearAlpha(); + const r = clearColor.r; + const g = clearColor.g; + const b = clearColor.b; + + if ( isUnsignedType ) { + + uintClearColor[ 0 ] = r; + uintClearColor[ 1 ] = g; + uintClearColor[ 2 ] = b; + uintClearColor[ 3 ] = a; + _gl.clearBufferuiv( _gl.COLOR, 0, uintClearColor ); + + } else { + + intClearColor[ 0 ] = r; + intClearColor[ 1 ] = g; + intClearColor[ 2 ] = b; + intClearColor[ 3 ] = a; + _gl.clearBufferiv( _gl.COLOR, 0, intClearColor ); + + } + + } else { + + bits |= _gl.COLOR_BUFFER_BIT; + + } + + } + + if ( depth ) bits |= _gl.DEPTH_BUFFER_BIT; + if ( stencil ) { + + bits |= _gl.STENCIL_BUFFER_BIT; + this.state.buffers.stencil.setMask( 0xffffffff ); + + } + + _gl.clear( bits ); + + }; + + this.clearColor = function () { + + this.clear( true, false, false ); + + }; + + this.clearDepth = function () { + + this.clear( false, true, false ); + + }; + + this.clearStencil = function () { + + this.clear( false, false, true ); + + }; + + // + + this.dispose = function () { + + canvas.removeEventListener( 'webglcontextlost', onContextLost, false ); + canvas.removeEventListener( 'webglcontextrestored', onContextRestore, false ); + canvas.removeEventListener( 'webglcontextcreationerror', onContextCreationError, false ); + + renderLists.dispose(); + renderStates.dispose(); + properties.dispose(); + cubemaps.dispose(); + cubeuvmaps.dispose(); + objects.dispose(); + bindingStates.dispose(); + uniformsGroups.dispose(); + programCache.dispose(); + + xr.dispose(); + + xr.removeEventListener( 'sessionstart', onXRSessionStart ); + xr.removeEventListener( 'sessionend', onXRSessionEnd ); + + animation.stop(); + + }; + + // Events + + function onContextLost( event ) { + + event.preventDefault(); + + console.log( 'THREE.WebGLRenderer: Context Lost.' ); + + _isContextLost = true; + + } + + function onContextRestore( /* event */ ) { + + console.log( 'THREE.WebGLRenderer: Context Restored.' ); + + _isContextLost = false; + + const infoAutoReset = info.autoReset; + const shadowMapEnabled = shadowMap.enabled; + const shadowMapAutoUpdate = shadowMap.autoUpdate; + const shadowMapNeedsUpdate = shadowMap.needsUpdate; + const shadowMapType = shadowMap.type; + + initGLContext(); + + info.autoReset = infoAutoReset; + shadowMap.enabled = shadowMapEnabled; + shadowMap.autoUpdate = shadowMapAutoUpdate; + shadowMap.needsUpdate = shadowMapNeedsUpdate; + shadowMap.type = shadowMapType; + + } + + function onContextCreationError( event ) { + + console.error( 'THREE.WebGLRenderer: A WebGL context could not be created. Reason: ', event.statusMessage ); + + } + + function onMaterialDispose( event ) { + + const material = event.target; + + material.removeEventListener( 'dispose', onMaterialDispose ); + + deallocateMaterial( material ); + + } + + // Buffer deallocation + + function deallocateMaterial( material ) { + + releaseMaterialProgramReferences( material ); + + properties.remove( material ); + + } + + + function releaseMaterialProgramReferences( material ) { + + const programs = properties.get( material ).programs; + + if ( programs !== undefined ) { + + programs.forEach( function ( program ) { + + programCache.releaseProgram( program ); + + } ); + + if ( material.isShaderMaterial ) { + + programCache.releaseShaderCache( material ); + + } + + } + + } + + // Buffer rendering + + this.renderBufferDirect = function ( camera, scene, geometry, material, object, group ) { + + if ( scene === null ) scene = _emptyScene; // renderBufferDirect second parameter used to be fog (could be null) + + const frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 ); + + const program = setProgram( camera, scene, geometry, material, object ); + + state.setMaterial( material, frontFaceCW ); + + // + + let index = geometry.index; + let rangeFactor = 1; + + if ( material.wireframe === true ) { + + index = geometries.getWireframeAttribute( geometry ); + + if ( index === undefined ) return; + + rangeFactor = 2; + + } + + // + + const drawRange = geometry.drawRange; + const position = geometry.attributes.position; + + let drawStart = drawRange.start * rangeFactor; + let drawEnd = ( drawRange.start + drawRange.count ) * rangeFactor; + + if ( group !== null ) { + + drawStart = Math.max( drawStart, group.start * rangeFactor ); + drawEnd = Math.min( drawEnd, ( group.start + group.count ) * rangeFactor ); + + } + + if ( index !== null ) { + + drawStart = Math.max( drawStart, 0 ); + drawEnd = Math.min( drawEnd, index.count ); + + } else if ( position !== undefined && position !== null ) { + + drawStart = Math.max( drawStart, 0 ); + drawEnd = Math.min( drawEnd, position.count ); + + } + + const drawCount = drawEnd - drawStart; + + if ( drawCount < 0 || drawCount === Infinity ) return; + + // + + bindingStates.setup( object, material, program, geometry, index ); + + let attribute; + let renderer = bufferRenderer; + + if ( index !== null ) { + + attribute = attributes.get( index ); + + renderer = indexedBufferRenderer; + renderer.setIndex( attribute ); + + } + + // + + if ( object.isMesh ) { + + if ( material.wireframe === true ) { + + state.setLineWidth( material.wireframeLinewidth * getTargetPixelRatio() ); + renderer.setMode( _gl.LINES ); + + } else { + + renderer.setMode( _gl.TRIANGLES ); + + } + + } else if ( object.isLine ) { + + let lineWidth = material.linewidth; + + if ( lineWidth === undefined ) lineWidth = 1; // Not using Line*Material + + state.setLineWidth( lineWidth * getTargetPixelRatio() ); + + if ( object.isLineSegments ) { + + renderer.setMode( _gl.LINES ); + + } else if ( object.isLineLoop ) { + + renderer.setMode( _gl.LINE_LOOP ); + + } else { + + renderer.setMode( _gl.LINE_STRIP ); + + } + + } else if ( object.isPoints ) { + + renderer.setMode( _gl.POINTS ); + + } else if ( object.isSprite ) { + + renderer.setMode( _gl.TRIANGLES ); + + } + + if ( object.isBatchedMesh ) { + + if ( object._multiDrawInstances !== null ) { + + renderer.renderMultiDrawInstances( object._multiDrawStarts, object._multiDrawCounts, object._multiDrawCount, object._multiDrawInstances ); + + } else { + + renderer.renderMultiDraw( object._multiDrawStarts, object._multiDrawCounts, object._multiDrawCount ); + + } + + } else if ( object.isInstancedMesh ) { + + renderer.renderInstances( drawStart, drawCount, object.count ); + + } else if ( geometry.isInstancedBufferGeometry ) { + + const maxInstanceCount = geometry._maxInstanceCount !== undefined ? geometry._maxInstanceCount : Infinity; + const instanceCount = Math.min( geometry.instanceCount, maxInstanceCount ); + + renderer.renderInstances( drawStart, drawCount, instanceCount ); + + } else { + + renderer.render( drawStart, drawCount ); + + } + + }; + + // Compile + + function prepareMaterial( material, scene, object ) { + + if ( material.transparent === true && material.side === DoubleSide && material.forceSinglePass === false ) { + + material.side = BackSide; + material.needsUpdate = true; + getProgram( material, scene, object ); + + material.side = FrontSide; + material.needsUpdate = true; + getProgram( material, scene, object ); + + material.side = DoubleSide; + + } else { + + getProgram( material, scene, object ); + + } + + } + + this.compile = function ( scene, camera, targetScene = null ) { + + if ( targetScene === null ) targetScene = scene; + + currentRenderState = renderStates.get( targetScene ); + currentRenderState.init( camera ); + + renderStateStack.push( currentRenderState ); + + // gather lights from both the target scene and the new object that will be added to the scene. + + targetScene.traverseVisible( function ( object ) { + + if ( object.isLight && object.layers.test( camera.layers ) ) { + + currentRenderState.pushLight( object ); + + if ( object.castShadow ) { + + currentRenderState.pushShadow( object ); + + } + + } + + } ); + + if ( scene !== targetScene ) { + + scene.traverseVisible( function ( object ) { + + if ( object.isLight && object.layers.test( camera.layers ) ) { + + currentRenderState.pushLight( object ); + + if ( object.castShadow ) { + + currentRenderState.pushShadow( object ); + + } + + } + + } ); + + } + + currentRenderState.setupLights( _this._useLegacyLights ); + + // Only initialize materials in the new scene, not the targetScene. + + const materials = new Set(); + + scene.traverse( function ( object ) { + + const material = object.material; + + if ( material ) { + + if ( Array.isArray( material ) ) { + + for ( let i = 0; i < material.length; i ++ ) { + + const material2 = material[ i ]; + + prepareMaterial( material2, targetScene, object ); + materials.add( material2 ); + + } + + } else { + + prepareMaterial( material, targetScene, object ); + materials.add( material ); + + } + + } + + } ); + + renderStateStack.pop(); + currentRenderState = null; + + return materials; + + }; + + // compileAsync + + this.compileAsync = function ( scene, camera, targetScene = null ) { + + const materials = this.compile( scene, camera, targetScene ); + + // Wait for all the materials in the new object to indicate that they're + // ready to be used before resolving the promise. + + return new Promise( ( resolve ) => { + + function checkMaterialsReady() { + + materials.forEach( function ( material ) { + + const materialProperties = properties.get( material ); + const program = materialProperties.currentProgram; + + if ( program.isReady() ) { + + // remove any programs that report they're ready to use from the list + materials.delete( material ); + + } + + } ); + + // once the list of compiling materials is empty, call the callback + + if ( materials.size === 0 ) { + + resolve( scene ); + return; + + } + + // if some materials are still not ready, wait a bit and check again + + setTimeout( checkMaterialsReady, 10 ); + + } + + if ( extensions.get( 'KHR_parallel_shader_compile' ) !== null ) { + + // If we can check the compilation status of the materials without + // blocking then do so right away. + + checkMaterialsReady(); + + } else { + + // Otherwise start by waiting a bit to give the materials we just + // initialized a chance to finish. + + setTimeout( checkMaterialsReady, 10 ); + + } + + } ); + + }; + + // Animation Loop + + let onAnimationFrameCallback = null; + + function onAnimationFrame( time ) { + + if ( onAnimationFrameCallback ) onAnimationFrameCallback( time ); + + } + + function onXRSessionStart() { + + animation.stop(); + + } + + function onXRSessionEnd() { + + animation.start(); + + } + + const animation = new WebGLAnimation(); + animation.setAnimationLoop( onAnimationFrame ); + + if ( typeof self !== 'undefined' ) animation.setContext( self ); + + this.setAnimationLoop = function ( callback ) { + + onAnimationFrameCallback = callback; + xr.setAnimationLoop( callback ); + + ( callback === null ) ? animation.stop() : animation.start(); + + }; + + xr.addEventListener( 'sessionstart', onXRSessionStart ); + xr.addEventListener( 'sessionend', onXRSessionEnd ); + + // Rendering + + this.render = function ( scene, camera ) { + + if ( camera !== undefined && camera.isCamera !== true ) { + + console.error( 'THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.' ); + return; + + } + + if ( _isContextLost === true ) return; + + // update scene graph + + if ( scene.matrixWorldAutoUpdate === true ) scene.updateMatrixWorld(); + + // update camera matrices and frustum + + if ( camera.parent === null && camera.matrixWorldAutoUpdate === true ) camera.updateMatrixWorld(); + + if ( xr.enabled === true && xr.isPresenting === true ) { + + if ( xr.cameraAutoUpdate === true ) xr.updateCamera( camera ); + + camera = xr.getCamera(); // use XR camera for rendering + + } + + // + if ( scene.isScene === true ) scene.onBeforeRender( _this, scene, camera, _currentRenderTarget ); + + currentRenderState = renderStates.get( scene, renderStateStack.length ); + currentRenderState.init( camera ); + + renderStateStack.push( currentRenderState ); + + _projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse ); + _frustum.setFromProjectionMatrix( _projScreenMatrix ); + + _localClippingEnabled = this.localClippingEnabled; + _clippingEnabled = clipping.init( this.clippingPlanes, _localClippingEnabled ); + + currentRenderList = renderLists.get( scene, renderListStack.length ); + currentRenderList.init(); + + renderListStack.push( currentRenderList ); + + projectObject( scene, camera, 0, _this.sortObjects ); + + currentRenderList.finish(); + + if ( _this.sortObjects === true ) { + + currentRenderList.sort( _opaqueSort, _transparentSort ); + + } + + const renderBackground = xr.enabled === false || xr.isPresenting === false || xr.hasDepthSensing() === false; + if ( renderBackground ) { + + background.addToRenderList( currentRenderList, scene ); + + } + + // + + this.info.render.frame ++; + + if ( _clippingEnabled === true ) clipping.beginShadows(); + + const shadowsArray = currentRenderState.state.shadowsArray; + + shadowMap.render( shadowsArray, scene, camera ); + + if ( _clippingEnabled === true ) clipping.endShadows(); + + // + + if ( this.info.autoReset === true ) this.info.reset(); + + // render scene + + const opaqueObjects = currentRenderList.opaque; + const transmissiveObjects = currentRenderList.transmissive; + + currentRenderState.setupLights( _this._useLegacyLights ); + + if ( camera.isArrayCamera ) { + + const cameras = camera.cameras; + + if ( transmissiveObjects.length > 0 ) { + + for ( let i = 0, l = cameras.length; i < l; i ++ ) { + + const camera2 = cameras[ i ]; + + renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera2 ); + + } + + } + + if ( renderBackground ) background.render( scene ); + + for ( let i = 0, l = cameras.length; i < l; i ++ ) { + + const camera2 = cameras[ i ]; + + renderScene( currentRenderList, scene, camera2, camera2.viewport ); + + } + + } else { + + if ( transmissiveObjects.length > 0 ) renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera ); + + if ( renderBackground ) background.render( scene ); + + renderScene( currentRenderList, scene, camera ); + + } + + // + + if ( _currentRenderTarget !== null ) { + + // resolve multisample renderbuffers to a single-sample texture if necessary + + textures.updateMultisampleRenderTarget( _currentRenderTarget ); + + // Generate mipmap if we're using any kind of mipmap filtering + + textures.updateRenderTargetMipmap( _currentRenderTarget ); + + } + + // + + if ( scene.isScene === true ) scene.onAfterRender( _this, scene, camera ); + + // _gl.finish(); + + bindingStates.resetDefaultState(); + _currentMaterialId = - 1; + _currentCamera = null; + + renderStateStack.pop(); + + if ( renderStateStack.length > 0 ) { + + currentRenderState = renderStateStack[ renderStateStack.length - 1 ]; + + if ( _clippingEnabled === true ) clipping.setGlobalState( _this.clippingPlanes, currentRenderState.state.camera ); + + } else { + + currentRenderState = null; + + } + + renderListStack.pop(); + + if ( renderListStack.length > 0 ) { + + currentRenderList = renderListStack[ renderListStack.length - 1 ]; + + } else { + + currentRenderList = null; + + } + + }; + + function projectObject( object, camera, groupOrder, sortObjects ) { + + if ( object.visible === false ) return; + + const visible = object.layers.test( camera.layers ); + + if ( visible ) { + + if ( object.isGroup ) { + + groupOrder = object.renderOrder; + + } else if ( object.isLOD ) { + + if ( object.autoUpdate === true ) object.update( camera ); + + } else if ( object.isLight ) { + + currentRenderState.pushLight( object ); + + if ( object.castShadow ) { + + currentRenderState.pushShadow( object ); + + } + + } else if ( object.isSprite ) { + + if ( ! object.frustumCulled || _frustum.intersectsSprite( object ) ) { + + if ( sortObjects ) { + + _vector3.setFromMatrixPosition( object.matrixWorld ) + .applyMatrix4( _projScreenMatrix ); + + } + + const geometry = objects.update( object ); + const material = object.material; + + if ( material.visible ) { + + currentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null ); + + } + + } + + } else if ( object.isMesh || object.isLine || object.isPoints ) { + + if ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) { + + const geometry = objects.update( object ); + const material = object.material; + + if ( sortObjects ) { + + if ( object.boundingSphere !== undefined ) { + + if ( object.boundingSphere === null ) object.computeBoundingSphere(); + _vector3.copy( object.boundingSphere.center ); + + } else { + + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + _vector3.copy( geometry.boundingSphere.center ); + + } + + _vector3 + .applyMatrix4( object.matrixWorld ) + .applyMatrix4( _projScreenMatrix ); + + } + + if ( Array.isArray( material ) ) { + + const groups = geometry.groups; + + for ( let i = 0, l = groups.length; i < l; i ++ ) { + + const group = groups[ i ]; + const groupMaterial = material[ group.materialIndex ]; + + if ( groupMaterial && groupMaterial.visible ) { + + currentRenderList.push( object, geometry, groupMaterial, groupOrder, _vector3.z, group ); + + } + + } + + } else if ( material.visible ) { + + currentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null ); + + } + + } + + } + + } + + const children = object.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + projectObject( children[ i ], camera, groupOrder, sortObjects ); + + } + + } + + function renderScene( currentRenderList, scene, camera, viewport ) { + + const opaqueObjects = currentRenderList.opaque; + const transmissiveObjects = currentRenderList.transmissive; + const transparentObjects = currentRenderList.transparent; + + currentRenderState.setupLightsView( camera ); + + if ( _clippingEnabled === true ) clipping.setGlobalState( _this.clippingPlanes, camera ); + + if ( viewport ) state.viewport( _currentViewport.copy( viewport ) ); + + if ( opaqueObjects.length > 0 ) renderObjects( opaqueObjects, scene, camera ); + if ( transmissiveObjects.length > 0 ) renderObjects( transmissiveObjects, scene, camera ); + if ( transparentObjects.length > 0 ) renderObjects( transparentObjects, scene, camera ); + + // Ensure depth buffer writing is enabled so it can be cleared on next render + + state.buffers.depth.setTest( true ); + state.buffers.depth.setMask( true ); + state.buffers.color.setMask( true ); + + state.setPolygonOffset( false ); + + } + + function renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera ) { + + const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null; + + if ( overrideMaterial !== null ) { + + return; + + } + + if ( currentRenderState.state.transmissionRenderTarget[ camera.id ] === undefined ) { + + currentRenderState.state.transmissionRenderTarget[ camera.id ] = new WebGLRenderTarget( 1, 1, { + generateMipmaps: true, + type: ( extensions.has( 'EXT_color_buffer_half_float' ) || extensions.has( 'EXT_color_buffer_float' ) ) ? HalfFloatType : UnsignedByteType, + minFilter: LinearMipmapLinearFilter, + samples: 4, + stencilBuffer: stencil, + resolveDepthBuffer: false, + resolveStencilBuffer: false + } ); + + // debug + + /* + const geometry = new PlaneGeometry(); + const material = new MeshBasicMaterial( { map: _transmissionRenderTarget.texture } ); + + const mesh = new Mesh( geometry, material ); + scene.add( mesh ); + */ + + } + + const transmissionRenderTarget = currentRenderState.state.transmissionRenderTarget[ camera.id ]; + + const activeViewport = camera.viewport || _currentViewport; + transmissionRenderTarget.setSize( activeViewport.z, activeViewport.w ); + + // + + const currentRenderTarget = _this.getRenderTarget(); + _this.setRenderTarget( transmissionRenderTarget ); + + _this.getClearColor( _currentClearColor ); + _currentClearAlpha = _this.getClearAlpha(); + if ( _currentClearAlpha < 1 ) _this.setClearColor( 0xffffff, 0.5 ); + + _this.clear(); + + // Turn off the features which can affect the frag color for opaque objects pass. + // Otherwise they are applied twice in opaque objects pass and transmission objects pass. + const currentToneMapping = _this.toneMapping; + _this.toneMapping = NoToneMapping; + + // Remove viewport from camera to avoid nested render calls resetting viewport to it (e.g Reflector). + // Transmission render pass requires viewport to match the transmissionRenderTarget. + const currentCameraViewport = camera.viewport; + if ( camera.viewport !== undefined ) camera.viewport = undefined; + + currentRenderState.setupLightsView( camera ); + + if ( _clippingEnabled === true ) clipping.setGlobalState( _this.clippingPlanes, camera ); + + renderObjects( opaqueObjects, scene, camera ); + + textures.updateMultisampleRenderTarget( transmissionRenderTarget ); + textures.updateRenderTargetMipmap( transmissionRenderTarget ); + + if ( extensions.has( 'WEBGL_multisampled_render_to_texture' ) === false ) { // see #28131 + + let renderTargetNeedsUpdate = false; + + for ( let i = 0, l = transmissiveObjects.length; i < l; i ++ ) { + + const renderItem = transmissiveObjects[ i ]; + + const object = renderItem.object; + const geometry = renderItem.geometry; + const material = renderItem.material; + const group = renderItem.group; + + if ( material.side === DoubleSide && object.layers.test( camera.layers ) ) { + + const currentSide = material.side; + + material.side = BackSide; + material.needsUpdate = true; + + renderObject( object, scene, camera, geometry, material, group ); + + material.side = currentSide; + material.needsUpdate = true; + + renderTargetNeedsUpdate = true; + + } + + } + + if ( renderTargetNeedsUpdate === true ) { + + textures.updateMultisampleRenderTarget( transmissionRenderTarget ); + textures.updateRenderTargetMipmap( transmissionRenderTarget ); + + } + + } + + _this.setRenderTarget( currentRenderTarget ); + + _this.setClearColor( _currentClearColor, _currentClearAlpha ); + + if ( currentCameraViewport !== undefined ) camera.viewport = currentCameraViewport; + + _this.toneMapping = currentToneMapping; + + } + + function renderObjects( renderList, scene, camera ) { + + const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null; + + for ( let i = 0, l = renderList.length; i < l; i ++ ) { + + const renderItem = renderList[ i ]; + + const object = renderItem.object; + const geometry = renderItem.geometry; + const material = overrideMaterial === null ? renderItem.material : overrideMaterial; + const group = renderItem.group; + + if ( object.layers.test( camera.layers ) ) { + + renderObject( object, scene, camera, geometry, material, group ); + + } + + } + + } + + function renderObject( object, scene, camera, geometry, material, group ) { + + object.onBeforeRender( _this, scene, camera, geometry, material, group ); + + object.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld ); + object.normalMatrix.getNormalMatrix( object.modelViewMatrix ); + + material.onBeforeRender( _this, scene, camera, geometry, object, group ); + + if ( material.transparent === true && material.side === DoubleSide && material.forceSinglePass === false ) { + + material.side = BackSide; + material.needsUpdate = true; + _this.renderBufferDirect( camera, scene, geometry, material, object, group ); + + material.side = FrontSide; + material.needsUpdate = true; + _this.renderBufferDirect( camera, scene, geometry, material, object, group ); + + material.side = DoubleSide; + + } else { + + _this.renderBufferDirect( camera, scene, geometry, material, object, group ); + + } + + object.onAfterRender( _this, scene, camera, geometry, material, group ); + + } + + function getProgram( material, scene, object ) { + + if ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ... + + const materialProperties = properties.get( material ); + + const lights = currentRenderState.state.lights; + const shadowsArray = currentRenderState.state.shadowsArray; + + const lightsStateVersion = lights.state.version; + + const parameters = programCache.getParameters( material, lights.state, shadowsArray, scene, object ); + const programCacheKey = programCache.getProgramCacheKey( parameters ); + + let programs = materialProperties.programs; + + // always update environment and fog - changing these trigger an getProgram call, but it's possible that the program doesn't change + + materialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null; + materialProperties.fog = scene.fog; + materialProperties.envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || materialProperties.environment ); + materialProperties.envMapRotation = ( materialProperties.environment !== null && material.envMap === null ) ? scene.environmentRotation : material.envMapRotation; + + if ( programs === undefined ) { + + // new material + + material.addEventListener( 'dispose', onMaterialDispose ); + + programs = new Map(); + materialProperties.programs = programs; + + } + + let program = programs.get( programCacheKey ); + + if ( program !== undefined ) { + + // early out if program and light state is identical + + if ( materialProperties.currentProgram === program && materialProperties.lightsStateVersion === lightsStateVersion ) { + + updateCommonMaterialProperties( material, parameters ); + + return program; + + } + + } else { + + parameters.uniforms = programCache.getUniforms( material ); + + material.onBuild( object, parameters, _this ); + + material.onBeforeCompile( parameters, _this ); + + program = programCache.acquireProgram( parameters, programCacheKey ); + programs.set( programCacheKey, program ); + + materialProperties.uniforms = parameters.uniforms; + + } + + const uniforms = materialProperties.uniforms; + + if ( ( ! material.isShaderMaterial && ! material.isRawShaderMaterial ) || material.clipping === true ) { + + uniforms.clippingPlanes = clipping.uniform; + + } + + updateCommonMaterialProperties( material, parameters ); + + // store the light setup it was created for + + materialProperties.needsLights = materialNeedsLights( material ); + materialProperties.lightsStateVersion = lightsStateVersion; + + if ( materialProperties.needsLights ) { + + // wire up the material to this renderer's lighting state + + uniforms.ambientLightColor.value = lights.state.ambient; + uniforms.lightProbe.value = lights.state.probe; + uniforms.directionalLights.value = lights.state.directional; + uniforms.directionalLightShadows.value = lights.state.directionalShadow; + uniforms.spotLights.value = lights.state.spot; + uniforms.spotLightShadows.value = lights.state.spotShadow; + uniforms.rectAreaLights.value = lights.state.rectArea; + uniforms.ltc_1.value = lights.state.rectAreaLTC1; + uniforms.ltc_2.value = lights.state.rectAreaLTC2; + uniforms.pointLights.value = lights.state.point; + uniforms.pointLightShadows.value = lights.state.pointShadow; + uniforms.hemisphereLights.value = lights.state.hemi; + + uniforms.directionalShadowMap.value = lights.state.directionalShadowMap; + uniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix; + uniforms.spotShadowMap.value = lights.state.spotShadowMap; + uniforms.spotLightMatrix.value = lights.state.spotLightMatrix; + uniforms.spotLightMap.value = lights.state.spotLightMap; + uniforms.pointShadowMap.value = lights.state.pointShadowMap; + uniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix; + // TODO (abelnation): add area lights shadow info to uniforms + + } + + materialProperties.currentProgram = program; + materialProperties.uniformsList = null; + + return program; + + } + + function getUniformList( materialProperties ) { + + if ( materialProperties.uniformsList === null ) { + + const progUniforms = materialProperties.currentProgram.getUniforms(); + materialProperties.uniformsList = WebGLUniforms.seqWithValue( progUniforms.seq, materialProperties.uniforms ); + + } + + return materialProperties.uniformsList; + + } + + function updateCommonMaterialProperties( material, parameters ) { + + const materialProperties = properties.get( material ); + + materialProperties.outputColorSpace = parameters.outputColorSpace; + materialProperties.batching = parameters.batching; + materialProperties.instancing = parameters.instancing; + materialProperties.instancingColor = parameters.instancingColor; + materialProperties.instancingMorph = parameters.instancingMorph; + materialProperties.skinning = parameters.skinning; + materialProperties.morphTargets = parameters.morphTargets; + materialProperties.morphNormals = parameters.morphNormals; + materialProperties.morphColors = parameters.morphColors; + materialProperties.morphTargetsCount = parameters.morphTargetsCount; + materialProperties.numClippingPlanes = parameters.numClippingPlanes; + materialProperties.numIntersection = parameters.numClipIntersection; + materialProperties.vertexAlphas = parameters.vertexAlphas; + materialProperties.vertexTangents = parameters.vertexTangents; + materialProperties.toneMapping = parameters.toneMapping; + + } + + function setProgram( camera, scene, geometry, material, object ) { + + if ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ... + + textures.resetTextureUnits(); + + const fog = scene.fog; + const environment = material.isMeshStandardMaterial ? scene.environment : null; + const colorSpace = ( _currentRenderTarget === null ) ? _this.outputColorSpace : ( _currentRenderTarget.isXRRenderTarget === true ? _currentRenderTarget.texture.colorSpace : LinearSRGBColorSpace ); + const envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || environment ); + const vertexAlphas = material.vertexColors === true && !! geometry.attributes.color && geometry.attributes.color.itemSize === 4; + const vertexTangents = !! geometry.attributes.tangent && ( !! material.normalMap || material.anisotropy > 0 ); + const morphTargets = !! geometry.morphAttributes.position; + const morphNormals = !! geometry.morphAttributes.normal; + const morphColors = !! geometry.morphAttributes.color; + + let toneMapping = NoToneMapping; + + if ( material.toneMapped ) { + + if ( _currentRenderTarget === null || _currentRenderTarget.isXRRenderTarget === true ) { + + toneMapping = _this.toneMapping; + + } + + } + + const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color; + const morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0; + + const materialProperties = properties.get( material ); + const lights = currentRenderState.state.lights; + + if ( _clippingEnabled === true ) { + + if ( _localClippingEnabled === true || camera !== _currentCamera ) { + + const useCache = + camera === _currentCamera && + material.id === _currentMaterialId; + + // we might want to call this function with some ClippingGroup + // object instead of the material, once it becomes feasible + // (#8465, #8379) + clipping.setState( material, camera, useCache ); + + } + + } + + // + + let needsProgramChange = false; + + if ( material.version === materialProperties.__version ) { + + if ( materialProperties.needsLights && ( materialProperties.lightsStateVersion !== lights.state.version ) ) { + + needsProgramChange = true; + + } else if ( materialProperties.outputColorSpace !== colorSpace ) { + + needsProgramChange = true; + + } else if ( object.isBatchedMesh && materialProperties.batching === false ) { + + needsProgramChange = true; + + } else if ( ! object.isBatchedMesh && materialProperties.batching === true ) { + + needsProgramChange = true; + + } else if ( object.isInstancedMesh && materialProperties.instancing === false ) { + + needsProgramChange = true; + + } else if ( ! object.isInstancedMesh && materialProperties.instancing === true ) { + + needsProgramChange = true; + + } else if ( object.isSkinnedMesh && materialProperties.skinning === false ) { + + needsProgramChange = true; + + } else if ( ! object.isSkinnedMesh && materialProperties.skinning === true ) { + + needsProgramChange = true; + + } else if ( object.isInstancedMesh && materialProperties.instancingColor === true && object.instanceColor === null ) { + + needsProgramChange = true; + + } else if ( object.isInstancedMesh && materialProperties.instancingColor === false && object.instanceColor !== null ) { + + needsProgramChange = true; + + } else if ( object.isInstancedMesh && materialProperties.instancingMorph === true && object.morphTexture === null ) { + + needsProgramChange = true; + + } else if ( object.isInstancedMesh && materialProperties.instancingMorph === false && object.morphTexture !== null ) { + + needsProgramChange = true; + + } else if ( materialProperties.envMap !== envMap ) { + + needsProgramChange = true; + + } else if ( material.fog === true && materialProperties.fog !== fog ) { + + needsProgramChange = true; + + } else if ( materialProperties.numClippingPlanes !== undefined && + ( materialProperties.numClippingPlanes !== clipping.numPlanes || + materialProperties.numIntersection !== clipping.numIntersection ) ) { + + needsProgramChange = true; + + } else if ( materialProperties.vertexAlphas !== vertexAlphas ) { + + needsProgramChange = true; + + } else if ( materialProperties.vertexTangents !== vertexTangents ) { + + needsProgramChange = true; + + } else if ( materialProperties.morphTargets !== morphTargets ) { + + needsProgramChange = true; + + } else if ( materialProperties.morphNormals !== morphNormals ) { + + needsProgramChange = true; + + } else if ( materialProperties.morphColors !== morphColors ) { + + needsProgramChange = true; + + } else if ( materialProperties.toneMapping !== toneMapping ) { + + needsProgramChange = true; + + } else if ( materialProperties.morphTargetsCount !== morphTargetsCount ) { + + needsProgramChange = true; + + } + + } else { + + needsProgramChange = true; + materialProperties.__version = material.version; + + } + + // + + let program = materialProperties.currentProgram; + + if ( needsProgramChange === true ) { + + program = getProgram( material, scene, object ); + + } + + let refreshProgram = false; + let refreshMaterial = false; + let refreshLights = false; + + const p_uniforms = program.getUniforms(), + m_uniforms = materialProperties.uniforms; + + if ( state.useProgram( program.program ) ) { + + refreshProgram = true; + refreshMaterial = true; + refreshLights = true; + + } + + if ( material.id !== _currentMaterialId ) { + + _currentMaterialId = material.id; + + refreshMaterial = true; + + } + + if ( refreshProgram || _currentCamera !== camera ) { + + // common camera uniforms + + p_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix ); + p_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse ); + + const uCamPos = p_uniforms.map.cameraPosition; + + if ( uCamPos !== undefined ) { + + uCamPos.setValue( _gl, _vector3.setFromMatrixPosition( camera.matrixWorld ) ); + + } + + if ( capabilities.logarithmicDepthBuffer ) { + + p_uniforms.setValue( _gl, 'logDepthBufFC', + 2.0 / ( Math.log( camera.far + 1.0 ) / Math.LN2 ) ); + + } + + // consider moving isOrthographic to UniformLib and WebGLMaterials, see https://github.com/mrdoob/three.js/pull/26467#issuecomment-1645185067 + + if ( material.isMeshPhongMaterial || + material.isMeshToonMaterial || + material.isMeshLambertMaterial || + material.isMeshBasicMaterial || + material.isMeshStandardMaterial || + material.isShaderMaterial ) { + + p_uniforms.setValue( _gl, 'isOrthographic', camera.isOrthographicCamera === true ); + + } + + if ( _currentCamera !== camera ) { + + _currentCamera = camera; + + // lighting uniforms depend on the camera so enforce an update + // now, in case this material supports lights - or later, when + // the next material that does gets activated: + + refreshMaterial = true; // set to true on material change + refreshLights = true; // remains set until update done + + } + + } + + // skinning and morph target uniforms must be set even if material didn't change + // auto-setting of texture unit for bone and morph texture must go before other textures + // otherwise textures used for skinning and morphing can take over texture units reserved for other material textures + + if ( object.isSkinnedMesh ) { + + p_uniforms.setOptional( _gl, object, 'bindMatrix' ); + p_uniforms.setOptional( _gl, object, 'bindMatrixInverse' ); + + const skeleton = object.skeleton; + + if ( skeleton ) { + + if ( skeleton.boneTexture === null ) skeleton.computeBoneTexture(); + + p_uniforms.setValue( _gl, 'boneTexture', skeleton.boneTexture, textures ); + + } + + } + + if ( object.isBatchedMesh ) { + + p_uniforms.setOptional( _gl, object, 'batchingTexture' ); + p_uniforms.setValue( _gl, 'batchingTexture', object._matricesTexture, textures ); + + } + + const morphAttributes = geometry.morphAttributes; + + if ( morphAttributes.position !== undefined || morphAttributes.normal !== undefined || ( morphAttributes.color !== undefined ) ) { + + morphtargets.update( object, geometry, program ); + + } + + if ( refreshMaterial || materialProperties.receiveShadow !== object.receiveShadow ) { + + materialProperties.receiveShadow = object.receiveShadow; + p_uniforms.setValue( _gl, 'receiveShadow', object.receiveShadow ); + + } + + // https://github.com/mrdoob/three.js/pull/24467#issuecomment-1209031512 + + if ( material.isMeshGouraudMaterial && material.envMap !== null ) { + + m_uniforms.envMap.value = envMap; + + m_uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? - 1 : 1; + + } + + if ( material.isMeshStandardMaterial && material.envMap === null && scene.environment !== null ) { + + m_uniforms.envMapIntensity.value = scene.environmentIntensity; + + } + + if ( refreshMaterial ) { + + p_uniforms.setValue( _gl, 'toneMappingExposure', _this.toneMappingExposure ); + + if ( materialProperties.needsLights ) { + + // the current material requires lighting info + + // note: all lighting uniforms are always set correctly + // they simply reference the renderer's state for their + // values + // + // use the current material's .needsUpdate flags to set + // the GL state when required + + markUniformsLightsNeedsUpdate( m_uniforms, refreshLights ); + + } + + // refresh uniforms common to several materials + + if ( fog && material.fog === true ) { + + materials.refreshFogUniforms( m_uniforms, fog ); + + } + + materials.refreshMaterialUniforms( m_uniforms, material, _pixelRatio, _height, currentRenderState.state.transmissionRenderTarget[ camera.id ] ); + + WebGLUniforms.upload( _gl, getUniformList( materialProperties ), m_uniforms, textures ); + + } + + if ( material.isShaderMaterial && material.uniformsNeedUpdate === true ) { + + WebGLUniforms.upload( _gl, getUniformList( materialProperties ), m_uniforms, textures ); + material.uniformsNeedUpdate = false; + + } + + if ( material.isSpriteMaterial ) { + + p_uniforms.setValue( _gl, 'center', object.center ); + + } + + // common matrices + + p_uniforms.setValue( _gl, 'modelViewMatrix', object.modelViewMatrix ); + p_uniforms.setValue( _gl, 'normalMatrix', object.normalMatrix ); + p_uniforms.setValue( _gl, 'modelMatrix', object.matrixWorld ); + + // UBOs + + if ( material.isShaderMaterial || material.isRawShaderMaterial ) { + + const groups = material.uniformsGroups; + + for ( let i = 0, l = groups.length; i < l; i ++ ) { + + const group = groups[ i ]; + + uniformsGroups.update( group, program ); + uniformsGroups.bind( group, program ); + + } + + } + + return program; + + } + + // If uniforms are marked as clean, they don't need to be loaded to the GPU. + + function markUniformsLightsNeedsUpdate( uniforms, value ) { + + uniforms.ambientLightColor.needsUpdate = value; + uniforms.lightProbe.needsUpdate = value; + + uniforms.directionalLights.needsUpdate = value; + uniforms.directionalLightShadows.needsUpdate = value; + uniforms.pointLights.needsUpdate = value; + uniforms.pointLightShadows.needsUpdate = value; + uniforms.spotLights.needsUpdate = value; + uniforms.spotLightShadows.needsUpdate = value; + uniforms.rectAreaLights.needsUpdate = value; + uniforms.hemisphereLights.needsUpdate = value; + + } + + function materialNeedsLights( material ) { + + return material.isMeshLambertMaterial || material.isMeshToonMaterial || material.isMeshPhongMaterial || + material.isMeshStandardMaterial || material.isShadowMaterial || + ( material.isShaderMaterial && material.lights === true ); + + } + + this.getActiveCubeFace = function () { + + return _currentActiveCubeFace; + + }; + + this.getActiveMipmapLevel = function () { + + return _currentActiveMipmapLevel; + + }; + + this.getRenderTarget = function () { + + return _currentRenderTarget; + + }; + + this.setRenderTargetTextures = function ( renderTarget, colorTexture, depthTexture ) { + + properties.get( renderTarget.texture ).__webglTexture = colorTexture; + properties.get( renderTarget.depthTexture ).__webglTexture = depthTexture; + + const renderTargetProperties = properties.get( renderTarget ); + renderTargetProperties.__hasExternalTextures = true; + + renderTargetProperties.__autoAllocateDepthBuffer = depthTexture === undefined; + + if ( ! renderTargetProperties.__autoAllocateDepthBuffer ) { + + // The multisample_render_to_texture extension doesn't work properly if there + // are midframe flushes and an external depth buffer. Disable use of the extension. + if ( extensions.has( 'WEBGL_multisampled_render_to_texture' ) === true ) { + + console.warn( 'THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided' ); + renderTargetProperties.__useRenderToTexture = false; + + } + + } + + }; + + this.setRenderTargetFramebuffer = function ( renderTarget, defaultFramebuffer ) { + + const renderTargetProperties = properties.get( renderTarget ); + renderTargetProperties.__webglFramebuffer = defaultFramebuffer; + renderTargetProperties.__useDefaultFramebuffer = defaultFramebuffer === undefined; + + }; + + this.setRenderTarget = function ( renderTarget, activeCubeFace = 0, activeMipmapLevel = 0 ) { + + _currentRenderTarget = renderTarget; + _currentActiveCubeFace = activeCubeFace; + _currentActiveMipmapLevel = activeMipmapLevel; + + let useDefaultFramebuffer = true; + let framebuffer = null; + let isCube = false; + let isRenderTarget3D = false; + + if ( renderTarget ) { + + const renderTargetProperties = properties.get( renderTarget ); + + if ( renderTargetProperties.__useDefaultFramebuffer !== undefined ) { + + // We need to make sure to rebind the framebuffer. + state.bindFramebuffer( _gl.FRAMEBUFFER, null ); + useDefaultFramebuffer = false; + + } else if ( renderTargetProperties.__webglFramebuffer === undefined ) { + + textures.setupRenderTarget( renderTarget ); + + } else if ( renderTargetProperties.__hasExternalTextures ) { + + // Color and depth texture must be rebound in order for the swapchain to update. + textures.rebindTextures( renderTarget, properties.get( renderTarget.texture ).__webglTexture, properties.get( renderTarget.depthTexture ).__webglTexture ); + + } + + const texture = renderTarget.texture; + + if ( texture.isData3DTexture || texture.isDataArrayTexture || texture.isCompressedArrayTexture ) { + + isRenderTarget3D = true; + + } + + const __webglFramebuffer = properties.get( renderTarget ).__webglFramebuffer; + + if ( renderTarget.isWebGLCubeRenderTarget ) { + + if ( Array.isArray( __webglFramebuffer[ activeCubeFace ] ) ) { + + framebuffer = __webglFramebuffer[ activeCubeFace ][ activeMipmapLevel ]; + + } else { + + framebuffer = __webglFramebuffer[ activeCubeFace ]; + + } + + isCube = true; + + } else if ( ( renderTarget.samples > 0 ) && textures.useMultisampledRTT( renderTarget ) === false ) { + + framebuffer = properties.get( renderTarget ).__webglMultisampledFramebuffer; + + } else { + + if ( Array.isArray( __webglFramebuffer ) ) { + + framebuffer = __webglFramebuffer[ activeMipmapLevel ]; + + } else { + + framebuffer = __webglFramebuffer; + + } + + } + + _currentViewport.copy( renderTarget.viewport ); + _currentScissor.copy( renderTarget.scissor ); + _currentScissorTest = renderTarget.scissorTest; + + } else { + + _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor(); + _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor(); + _currentScissorTest = _scissorTest; + + } + + const framebufferBound = state.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer ); + + if ( framebufferBound && useDefaultFramebuffer ) { + + state.drawBuffers( renderTarget, framebuffer ); + + } + + state.viewport( _currentViewport ); + state.scissor( _currentScissor ); + state.setScissorTest( _currentScissorTest ); + + if ( isCube ) { + + const textureProperties = properties.get( renderTarget.texture ); + _gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + activeCubeFace, textureProperties.__webglTexture, activeMipmapLevel ); + + } else if ( isRenderTarget3D ) { + + const textureProperties = properties.get( renderTarget.texture ); + const layer = activeCubeFace || 0; + _gl.framebufferTextureLayer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, textureProperties.__webglTexture, activeMipmapLevel || 0, layer ); + + } + + _currentMaterialId = - 1; // reset current material to ensure correct uniform bindings + + }; + + this.readRenderTargetPixels = function ( renderTarget, x, y, width, height, buffer, activeCubeFaceIndex ) { + + if ( ! ( renderTarget && renderTarget.isWebGLRenderTarget ) ) { + + console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.' ); + return; + + } + + let framebuffer = properties.get( renderTarget ).__webglFramebuffer; + + if ( renderTarget.isWebGLCubeRenderTarget && activeCubeFaceIndex !== undefined ) { + + framebuffer = framebuffer[ activeCubeFaceIndex ]; + + } + + if ( framebuffer ) { + + state.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer ); + + try { + + const texture = renderTarget.texture; + const textureFormat = texture.format; + const textureType = texture.type; + + if ( ! capabilities.textureFormatReadable( textureFormat ) ) { + + console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.' ); + return; + + } + + if ( ! capabilities.textureTypeReadable( textureType ) ) { + + console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.' ); + return; + + } + + // the following if statement ensures valid read requests (no out-of-bounds pixels, see #8604) + + if ( ( x >= 0 && x <= ( renderTarget.width - width ) ) && ( y >= 0 && y <= ( renderTarget.height - height ) ) ) { + + _gl.readPixels( x, y, width, height, utils.convert( textureFormat ), utils.convert( textureType ), buffer ); + + } + + } finally { + + // restore framebuffer of current render target if necessary + + const framebuffer = ( _currentRenderTarget !== null ) ? properties.get( _currentRenderTarget ).__webglFramebuffer : null; + state.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer ); + + } + + } + + }; + + this.copyFramebufferToTexture = function ( position, texture, level = 0 ) { + + const levelScale = Math.pow( 2, - level ); + const width = Math.floor( texture.image.width * levelScale ); + const height = Math.floor( texture.image.height * levelScale ); + + textures.setTexture2D( texture, 0 ); + + _gl.copyTexSubImage2D( _gl.TEXTURE_2D, level, 0, 0, position.x, position.y, width, height ); + + state.unbindTexture(); + + }; + + this.copyTextureToTexture = function ( position, srcTexture, dstTexture, level = 0 ) { + + const width = srcTexture.image.width; + const height = srcTexture.image.height; + const glFormat = utils.convert( dstTexture.format ); + const glType = utils.convert( dstTexture.type ); + + textures.setTexture2D( dstTexture, 0 ); + + // As another texture upload may have changed pixelStorei + // parameters, make sure they are correct for the dstTexture + _gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY ); + _gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha ); + _gl.pixelStorei( _gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment ); + + if ( srcTexture.isDataTexture ) { + + _gl.texSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data ); + + } else { + + if ( srcTexture.isCompressedTexture ) { + + _gl.compressedTexSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, srcTexture.mipmaps[ 0 ].width, srcTexture.mipmaps[ 0 ].height, glFormat, srcTexture.mipmaps[ 0 ].data ); + + } else { + + _gl.texSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, glFormat, glType, srcTexture.image ); + + } + + } + + // Generate mipmaps only when copying level 0 + if ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( _gl.TEXTURE_2D ); + + state.unbindTexture(); + + }; + + this.copyTextureToTexture3D = function ( sourceBox, position, srcTexture, dstTexture, level = 0 ) { + + const width = sourceBox.max.x - sourceBox.min.x; + const height = sourceBox.max.y - sourceBox.min.y; + const depth = sourceBox.max.z - sourceBox.min.z; + const glFormat = utils.convert( dstTexture.format ); + const glType = utils.convert( dstTexture.type ); + let glTarget; + + if ( dstTexture.isData3DTexture ) { + + textures.setTexture3D( dstTexture, 0 ); + glTarget = _gl.TEXTURE_3D; + + } else if ( dstTexture.isDataArrayTexture || dstTexture.isCompressedArrayTexture ) { + + textures.setTexture2DArray( dstTexture, 0 ); + glTarget = _gl.TEXTURE_2D_ARRAY; + + } else { + + console.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.' ); + return; + + } + + _gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY ); + _gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha ); + _gl.pixelStorei( _gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment ); + + const unpackRowLen = _gl.getParameter( _gl.UNPACK_ROW_LENGTH ); + const unpackImageHeight = _gl.getParameter( _gl.UNPACK_IMAGE_HEIGHT ); + const unpackSkipPixels = _gl.getParameter( _gl.UNPACK_SKIP_PIXELS ); + const unpackSkipRows = _gl.getParameter( _gl.UNPACK_SKIP_ROWS ); + const unpackSkipImages = _gl.getParameter( _gl.UNPACK_SKIP_IMAGES ); + + const image = srcTexture.isCompressedTexture ? srcTexture.mipmaps[ level ] : srcTexture.image; + + _gl.pixelStorei( _gl.UNPACK_ROW_LENGTH, image.width ); + _gl.pixelStorei( _gl.UNPACK_IMAGE_HEIGHT, image.height ); + _gl.pixelStorei( _gl.UNPACK_SKIP_PIXELS, sourceBox.min.x ); + _gl.pixelStorei( _gl.UNPACK_SKIP_ROWS, sourceBox.min.y ); + _gl.pixelStorei( _gl.UNPACK_SKIP_IMAGES, sourceBox.min.z ); + + if ( srcTexture.isDataTexture || srcTexture.isData3DTexture ) { + + _gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image.data ); + + } else { + + if ( dstTexture.isCompressedArrayTexture ) { + + _gl.compressedTexSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, image.data ); + + } else { + + _gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image ); + + } + + } + + _gl.pixelStorei( _gl.UNPACK_ROW_LENGTH, unpackRowLen ); + _gl.pixelStorei( _gl.UNPACK_IMAGE_HEIGHT, unpackImageHeight ); + _gl.pixelStorei( _gl.UNPACK_SKIP_PIXELS, unpackSkipPixels ); + _gl.pixelStorei( _gl.UNPACK_SKIP_ROWS, unpackSkipRows ); + _gl.pixelStorei( _gl.UNPACK_SKIP_IMAGES, unpackSkipImages ); + + // Generate mipmaps only when copying level 0 + if ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( glTarget ); + + state.unbindTexture(); + + }; + + this.initTexture = function ( texture ) { + + if ( texture.isCubeTexture ) { + + textures.setTextureCube( texture, 0 ); + + } else if ( texture.isData3DTexture ) { + + textures.setTexture3D( texture, 0 ); + + } else if ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) { + + textures.setTexture2DArray( texture, 0 ); + + } else { + + textures.setTexture2D( texture, 0 ); + + } + + state.unbindTexture(); + + }; + + this.resetState = function () { + + _currentActiveCubeFace = 0; + _currentActiveMipmapLevel = 0; + _currentRenderTarget = null; + + state.reset(); + bindingStates.reset(); + + }; + + if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { + + __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); + + } + + } + + get coordinateSystem() { + + return WebGLCoordinateSystem; + + } + + get outputColorSpace() { + + return this._outputColorSpace; + + } + + set outputColorSpace( colorSpace ) { + + this._outputColorSpace = colorSpace; + + const gl = this.getContext(); + gl.drawingBufferColorSpace = colorSpace === DisplayP3ColorSpace ? 'display-p3' : 'srgb'; + gl.unpackColorSpace = ColorManagement.workingColorSpace === LinearDisplayP3ColorSpace ? 'display-p3' : 'srgb'; + + } + + get useLegacyLights() { // @deprecated, r155 + + console.warn( 'THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.' ); + return this._useLegacyLights; + + } + + set useLegacyLights( value ) { // @deprecated, r155 + + console.warn( 'THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.' ); + this._useLegacyLights = value; + + } + +} + +class FogExp2 { + + constructor( color, density = 0.00025 ) { + + this.isFogExp2 = true; + + this.name = ''; + + this.color = new Color( color ); + this.density = density; + + } + + clone() { + + return new FogExp2( this.color, this.density ); + + } + + toJSON( /* meta */ ) { + + return { + type: 'FogExp2', + name: this.name, + color: this.color.getHex(), + density: this.density + }; + + } + +} + +class Fog { + + constructor( color, near = 1, far = 1000 ) { + + this.isFog = true; + + this.name = ''; + + this.color = new Color( color ); + + this.near = near; + this.far = far; + + } + + clone() { + + return new Fog( this.color, this.near, this.far ); + + } + + toJSON( /* meta */ ) { + + return { + type: 'Fog', + name: this.name, + color: this.color.getHex(), + near: this.near, + far: this.far + }; + + } + +} + +class Scene extends Object3D { + + constructor() { + + super(); + + this.isScene = true; + + this.type = 'Scene'; + + this.background = null; + this.environment = null; + this.fog = null; + + this.backgroundBlurriness = 0; + this.backgroundIntensity = 1; + this.backgroundRotation = new Euler(); + + this.environmentIntensity = 1; + this.environmentRotation = new Euler(); + + this.overrideMaterial = null; + + if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { + + __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); + + } + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + if ( source.background !== null ) this.background = source.background.clone(); + if ( source.environment !== null ) this.environment = source.environment.clone(); + if ( source.fog !== null ) this.fog = source.fog.clone(); + + this.backgroundBlurriness = source.backgroundBlurriness; + this.backgroundIntensity = source.backgroundIntensity; + this.backgroundRotation.copy( source.backgroundRotation ); + + this.environmentIntensity = source.environmentIntensity; + this.environmentRotation.copy( source.environmentRotation ); + + if ( source.overrideMaterial !== null ) this.overrideMaterial = source.overrideMaterial.clone(); + + this.matrixAutoUpdate = source.matrixAutoUpdate; + + return this; + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + if ( this.fog !== null ) data.object.fog = this.fog.toJSON(); + + if ( this.backgroundBlurriness > 0 ) data.object.backgroundBlurriness = this.backgroundBlurriness; + if ( this.backgroundIntensity !== 1 ) data.object.backgroundIntensity = this.backgroundIntensity; + data.object.backgroundRotation = this.backgroundRotation.toArray(); + + if ( this.environmentIntensity !== 1 ) data.object.environmentIntensity = this.environmentIntensity; + data.object.environmentRotation = this.environmentRotation.toArray(); + + return data; + + } + +} + +class InterleavedBuffer { + + constructor( array, stride ) { + + this.isInterleavedBuffer = true; + + this.array = array; + this.stride = stride; + this.count = array !== undefined ? array.length / stride : 0; + + this.usage = StaticDrawUsage; + this._updateRange = { offset: 0, count: - 1 }; + this.updateRanges = []; + + this.version = 0; + + this.uuid = generateUUID(); + + } + + onUploadCallback() {} + + set needsUpdate( value ) { + + if ( value === true ) this.version ++; + + } + + get updateRange() { + + warnOnce( 'THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.' ); // @deprecated, r159 + return this._updateRange; + + } + + setUsage( value ) { + + this.usage = value; + + return this; + + } + + addUpdateRange( start, count ) { + + this.updateRanges.push( { start, count } ); + + } + + clearUpdateRanges() { + + this.updateRanges.length = 0; + + } + + copy( source ) { + + this.array = new source.array.constructor( source.array ); + this.count = source.count; + this.stride = source.stride; + this.usage = source.usage; + + return this; + + } + + copyAt( index1, attribute, index2 ) { + + index1 *= this.stride; + index2 *= attribute.stride; + + for ( let i = 0, l = this.stride; i < l; i ++ ) { + + this.array[ index1 + i ] = attribute.array[ index2 + i ]; + + } + + return this; + + } + + set( value, offset = 0 ) { + + this.array.set( value, offset ); + + return this; + + } + + clone( data ) { + + if ( data.arrayBuffers === undefined ) { + + data.arrayBuffers = {}; + + } + + if ( this.array.buffer._uuid === undefined ) { + + this.array.buffer._uuid = generateUUID(); + + } + + if ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) { + + data.arrayBuffers[ this.array.buffer._uuid ] = this.array.slice( 0 ).buffer; + + } + + const array = new this.array.constructor( data.arrayBuffers[ this.array.buffer._uuid ] ); + + const ib = new this.constructor( array, this.stride ); + ib.setUsage( this.usage ); + + return ib; + + } + + onUpload( callback ) { + + this.onUploadCallback = callback; + + return this; + + } + + toJSON( data ) { + + if ( data.arrayBuffers === undefined ) { + + data.arrayBuffers = {}; + + } + + // generate UUID for array buffer if necessary + + if ( this.array.buffer._uuid === undefined ) { + + this.array.buffer._uuid = generateUUID(); + + } + + if ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) { + + data.arrayBuffers[ this.array.buffer._uuid ] = Array.from( new Uint32Array( this.array.buffer ) ); + + } + + // + + return { + uuid: this.uuid, + buffer: this.array.buffer._uuid, + type: this.array.constructor.name, + stride: this.stride + }; + + } + +} + +const _vector$6 = /*@__PURE__*/ new Vector3(); + +class InterleavedBufferAttribute { + + constructor( interleavedBuffer, itemSize, offset, normalized = false ) { + + this.isInterleavedBufferAttribute = true; + + this.name = ''; + + this.data = interleavedBuffer; + this.itemSize = itemSize; + this.offset = offset; + + this.normalized = normalized; + + } + + get count() { + + return this.data.count; + + } + + get array() { + + return this.data.array; + + } + + set needsUpdate( value ) { + + this.data.needsUpdate = value; + + } + + applyMatrix4( m ) { + + for ( let i = 0, l = this.data.count; i < l; i ++ ) { + + _vector$6.fromBufferAttribute( this, i ); + + _vector$6.applyMatrix4( m ); + + this.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z ); + + } + + return this; + + } + + applyNormalMatrix( m ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector$6.fromBufferAttribute( this, i ); + + _vector$6.applyNormalMatrix( m ); + + this.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z ); + + } + + return this; + + } + + transformDirection( m ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector$6.fromBufferAttribute( this, i ); + + _vector$6.transformDirection( m ); + + this.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z ); + + } + + return this; + + } + + getComponent( index, component ) { + + let value = this.array[ index * this.data.stride + this.offset + component ]; + + if ( this.normalized ) value = denormalize( value, this.array ); + + return value; + + } + + setComponent( index, component, value ) { + + if ( this.normalized ) value = normalize( value, this.array ); + + this.data.array[ index * this.data.stride + this.offset + component ] = value; + + return this; + + } + + setX( index, x ) { + + if ( this.normalized ) x = normalize( x, this.array ); + + this.data.array[ index * this.data.stride + this.offset ] = x; + + return this; + + } + + setY( index, y ) { + + if ( this.normalized ) y = normalize( y, this.array ); + + this.data.array[ index * this.data.stride + this.offset + 1 ] = y; + + return this; + + } + + setZ( index, z ) { + + if ( this.normalized ) z = normalize( z, this.array ); + + this.data.array[ index * this.data.stride + this.offset + 2 ] = z; + + return this; + + } + + setW( index, w ) { + + if ( this.normalized ) w = normalize( w, this.array ); + + this.data.array[ index * this.data.stride + this.offset + 3 ] = w; + + return this; + + } + + getX( index ) { + + let x = this.data.array[ index * this.data.stride + this.offset ]; + + if ( this.normalized ) x = denormalize( x, this.array ); + + return x; + + } + + getY( index ) { + + let y = this.data.array[ index * this.data.stride + this.offset + 1 ]; + + if ( this.normalized ) y = denormalize( y, this.array ); + + return y; + + } + + getZ( index ) { + + let z = this.data.array[ index * this.data.stride + this.offset + 2 ]; + + if ( this.normalized ) z = denormalize( z, this.array ); + + return z; + + } + + getW( index ) { + + let w = this.data.array[ index * this.data.stride + this.offset + 3 ]; + + if ( this.normalized ) w = denormalize( w, this.array ); + + return w; + + } + + setXY( index, x, y ) { + + index = index * this.data.stride + this.offset; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + + } + + this.data.array[ index + 0 ] = x; + this.data.array[ index + 1 ] = y; + + return this; + + } + + setXYZ( index, x, y, z ) { + + index = index * this.data.stride + this.offset; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + z = normalize( z, this.array ); + + } + + this.data.array[ index + 0 ] = x; + this.data.array[ index + 1 ] = y; + this.data.array[ index + 2 ] = z; + + return this; + + } + + setXYZW( index, x, y, z, w ) { + + index = index * this.data.stride + this.offset; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + z = normalize( z, this.array ); + w = normalize( w, this.array ); + + } + + this.data.array[ index + 0 ] = x; + this.data.array[ index + 1 ] = y; + this.data.array[ index + 2 ] = z; + this.data.array[ index + 3 ] = w; + + return this; + + } + + clone( data ) { + + if ( data === undefined ) { + + console.log( 'THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.' ); + + const array = []; + + for ( let i = 0; i < this.count; i ++ ) { + + const index = i * this.data.stride + this.offset; + + for ( let j = 0; j < this.itemSize; j ++ ) { + + array.push( this.data.array[ index + j ] ); + + } + + } + + return new BufferAttribute( new this.array.constructor( array ), this.itemSize, this.normalized ); + + } else { + + if ( data.interleavedBuffers === undefined ) { + + data.interleavedBuffers = {}; + + } + + if ( data.interleavedBuffers[ this.data.uuid ] === undefined ) { + + data.interleavedBuffers[ this.data.uuid ] = this.data.clone( data ); + + } + + return new InterleavedBufferAttribute( data.interleavedBuffers[ this.data.uuid ], this.itemSize, this.offset, this.normalized ); + + } + + } + + toJSON( data ) { + + if ( data === undefined ) { + + console.log( 'THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.' ); + + const array = []; + + for ( let i = 0; i < this.count; i ++ ) { + + const index = i * this.data.stride + this.offset; + + for ( let j = 0; j < this.itemSize; j ++ ) { + + array.push( this.data.array[ index + j ] ); + + } + + } + + // de-interleave data and save it as an ordinary buffer attribute for now + + return { + itemSize: this.itemSize, + type: this.array.constructor.name, + array: array, + normalized: this.normalized + }; + + } else { + + // save as true interleaved attribute + + if ( data.interleavedBuffers === undefined ) { + + data.interleavedBuffers = {}; + + } + + if ( data.interleavedBuffers[ this.data.uuid ] === undefined ) { + + data.interleavedBuffers[ this.data.uuid ] = this.data.toJSON( data ); + + } + + return { + isInterleavedBufferAttribute: true, + itemSize: this.itemSize, + data: this.data.uuid, + offset: this.offset, + normalized: this.normalized + }; + + } + + } + +} + +class SpriteMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isSpriteMaterial = true; + + this.type = 'SpriteMaterial'; + + this.color = new Color( 0xffffff ); + + this.map = null; + + this.alphaMap = null; + + this.rotation = 0; + + this.sizeAttenuation = true; + + this.transparent = true; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.map = source.map; + + this.alphaMap = source.alphaMap; + + this.rotation = source.rotation; + + this.sizeAttenuation = source.sizeAttenuation; + + this.fog = source.fog; + + return this; + + } + +} + +let _geometry; + +const _intersectPoint = /*@__PURE__*/ new Vector3(); +const _worldScale = /*@__PURE__*/ new Vector3(); +const _mvPosition = /*@__PURE__*/ new Vector3(); + +const _alignedPosition = /*@__PURE__*/ new Vector2(); +const _rotatedPosition = /*@__PURE__*/ new Vector2(); +const _viewWorldMatrix = /*@__PURE__*/ new Matrix4(); + +const _vA = /*@__PURE__*/ new Vector3(); +const _vB = /*@__PURE__*/ new Vector3(); +const _vC = /*@__PURE__*/ new Vector3(); + +const _uvA = /*@__PURE__*/ new Vector2(); +const _uvB = /*@__PURE__*/ new Vector2(); +const _uvC = /*@__PURE__*/ new Vector2(); + +class Sprite extends Object3D { + + constructor( material = new SpriteMaterial() ) { + + super(); + + this.isSprite = true; + + this.type = 'Sprite'; + + if ( _geometry === undefined ) { + + _geometry = new BufferGeometry(); + + const float32Array = new Float32Array( [ + - 0.5, - 0.5, 0, 0, 0, + 0.5, - 0.5, 0, 1, 0, + 0.5, 0.5, 0, 1, 1, + - 0.5, 0.5, 0, 0, 1 + ] ); + + const interleavedBuffer = new InterleavedBuffer( float32Array, 5 ); + + _geometry.setIndex( [ 0, 1, 2, 0, 2, 3 ] ); + _geometry.setAttribute( 'position', new InterleavedBufferAttribute( interleavedBuffer, 3, 0, false ) ); + _geometry.setAttribute( 'uv', new InterleavedBufferAttribute( interleavedBuffer, 2, 3, false ) ); + + } + + this.geometry = _geometry; + this.material = material; + + this.center = new Vector2( 0.5, 0.5 ); + + } + + raycast( raycaster, intersects ) { + + if ( raycaster.camera === null ) { + + console.error( 'THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.' ); + + } + + _worldScale.setFromMatrixScale( this.matrixWorld ); + + _viewWorldMatrix.copy( raycaster.camera.matrixWorld ); + this.modelViewMatrix.multiplyMatrices( raycaster.camera.matrixWorldInverse, this.matrixWorld ); + + _mvPosition.setFromMatrixPosition( this.modelViewMatrix ); + + if ( raycaster.camera.isPerspectiveCamera && this.material.sizeAttenuation === false ) { + + _worldScale.multiplyScalar( - _mvPosition.z ); + + } + + const rotation = this.material.rotation; + let sin, cos; + + if ( rotation !== 0 ) { + + cos = Math.cos( rotation ); + sin = Math.sin( rotation ); + + } + + const center = this.center; + + transformVertex( _vA.set( - 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos ); + transformVertex( _vB.set( 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos ); + transformVertex( _vC.set( 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos ); + + _uvA.set( 0, 0 ); + _uvB.set( 1, 0 ); + _uvC.set( 1, 1 ); + + // check first triangle + let intersect = raycaster.ray.intersectTriangle( _vA, _vB, _vC, false, _intersectPoint ); + + if ( intersect === null ) { + + // check second triangle + transformVertex( _vB.set( - 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos ); + _uvB.set( 0, 1 ); + + intersect = raycaster.ray.intersectTriangle( _vA, _vC, _vB, false, _intersectPoint ); + if ( intersect === null ) { + + return; + + } + + } + + const distance = raycaster.ray.origin.distanceTo( _intersectPoint ); + + if ( distance < raycaster.near || distance > raycaster.far ) return; + + intersects.push( { + + distance: distance, + point: _intersectPoint.clone(), + uv: Triangle.getInterpolation( _intersectPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2() ), + face: null, + object: this + + } ); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + if ( source.center !== undefined ) this.center.copy( source.center ); + + this.material = source.material; + + return this; + + } + +} + +function transformVertex( vertexPosition, mvPosition, center, scale, sin, cos ) { + + // compute position in camera space + _alignedPosition.subVectors( vertexPosition, center ).addScalar( 0.5 ).multiply( scale ); + + // to check if rotation is not zero + if ( sin !== undefined ) { + + _rotatedPosition.x = ( cos * _alignedPosition.x ) - ( sin * _alignedPosition.y ); + _rotatedPosition.y = ( sin * _alignedPosition.x ) + ( cos * _alignedPosition.y ); + + } else { + + _rotatedPosition.copy( _alignedPosition ); + + } + + + vertexPosition.copy( mvPosition ); + vertexPosition.x += _rotatedPosition.x; + vertexPosition.y += _rotatedPosition.y; + + // transform to world space + vertexPosition.applyMatrix4( _viewWorldMatrix ); + +} + +const _v1$2 = /*@__PURE__*/ new Vector3(); +const _v2$1 = /*@__PURE__*/ new Vector3(); + +class LOD extends Object3D { + + constructor() { + + super(); + + this._currentLevel = 0; + + this.type = 'LOD'; + + Object.defineProperties( this, { + levels: { + enumerable: true, + value: [] + }, + isLOD: { + value: true, + } + } ); + + this.autoUpdate = true; + + } + + copy( source ) { + + super.copy( source, false ); + + const levels = source.levels; + + for ( let i = 0, l = levels.length; i < l; i ++ ) { + + const level = levels[ i ]; + + this.addLevel( level.object.clone(), level.distance, level.hysteresis ); + + } + + this.autoUpdate = source.autoUpdate; + + return this; + + } + + addLevel( object, distance = 0, hysteresis = 0 ) { + + distance = Math.abs( distance ); + + const levels = this.levels; + + let l; + + for ( l = 0; l < levels.length; l ++ ) { + + if ( distance < levels[ l ].distance ) { + + break; + + } + + } + + levels.splice( l, 0, { distance: distance, hysteresis: hysteresis, object: object } ); + + this.add( object ); + + return this; + + } + + getCurrentLevel() { + + return this._currentLevel; + + } + + + + getObjectForDistance( distance ) { + + const levels = this.levels; + + if ( levels.length > 0 ) { + + let i, l; + + for ( i = 1, l = levels.length; i < l; i ++ ) { + + let levelDistance = levels[ i ].distance; + + if ( levels[ i ].object.visible ) { + + levelDistance -= levelDistance * levels[ i ].hysteresis; + + } + + if ( distance < levelDistance ) { + + break; + + } + + } + + return levels[ i - 1 ].object; + + } + + return null; + + } + + raycast( raycaster, intersects ) { + + const levels = this.levels; + + if ( levels.length > 0 ) { + + _v1$2.setFromMatrixPosition( this.matrixWorld ); + + const distance = raycaster.ray.origin.distanceTo( _v1$2 ); + + this.getObjectForDistance( distance ).raycast( raycaster, intersects ); + + } + + } + + update( camera ) { + + const levels = this.levels; + + if ( levels.length > 1 ) { + + _v1$2.setFromMatrixPosition( camera.matrixWorld ); + _v2$1.setFromMatrixPosition( this.matrixWorld ); + + const distance = _v1$2.distanceTo( _v2$1 ) / camera.zoom; + + levels[ 0 ].object.visible = true; + + let i, l; + + for ( i = 1, l = levels.length; i < l; i ++ ) { + + let levelDistance = levels[ i ].distance; + + if ( levels[ i ].object.visible ) { + + levelDistance -= levelDistance * levels[ i ].hysteresis; + + } + + if ( distance >= levelDistance ) { + + levels[ i - 1 ].object.visible = false; + levels[ i ].object.visible = true; + + } else { + + break; + + } + + } + + this._currentLevel = i - 1; + + for ( ; i < l; i ++ ) { + + levels[ i ].object.visible = false; + + } + + } + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + if ( this.autoUpdate === false ) data.object.autoUpdate = false; + + data.object.levels = []; + + const levels = this.levels; + + for ( let i = 0, l = levels.length; i < l; i ++ ) { + + const level = levels[ i ]; + + data.object.levels.push( { + object: level.object.uuid, + distance: level.distance, + hysteresis: level.hysteresis + } ); + + } + + return data; + + } + +} + +const _basePosition = /*@__PURE__*/ new Vector3(); + +const _skinIndex = /*@__PURE__*/ new Vector4(); +const _skinWeight = /*@__PURE__*/ new Vector4(); + +const _vector3 = /*@__PURE__*/ new Vector3(); +const _matrix4 = /*@__PURE__*/ new Matrix4(); +const _vertex = /*@__PURE__*/ new Vector3(); + +const _sphere$4 = /*@__PURE__*/ new Sphere(); +const _inverseMatrix$2 = /*@__PURE__*/ new Matrix4(); +const _ray$2 = /*@__PURE__*/ new Ray(); + +class SkinnedMesh extends Mesh { + + constructor( geometry, material ) { + + super( geometry, material ); + + this.isSkinnedMesh = true; + + this.type = 'SkinnedMesh'; + + this.bindMode = AttachedBindMode; + this.bindMatrix = new Matrix4(); + this.bindMatrixInverse = new Matrix4(); + + this.boundingBox = null; + this.boundingSphere = null; + + } + + computeBoundingBox() { + + const geometry = this.geometry; + + if ( this.boundingBox === null ) { + + this.boundingBox = new Box3(); + + } + + this.boundingBox.makeEmpty(); + + const positionAttribute = geometry.getAttribute( 'position' ); + + for ( let i = 0; i < positionAttribute.count; i ++ ) { + + this.getVertexPosition( i, _vertex ); + this.boundingBox.expandByPoint( _vertex ); + + } + + } + + computeBoundingSphere() { + + const geometry = this.geometry; + + if ( this.boundingSphere === null ) { + + this.boundingSphere = new Sphere(); + + } + + this.boundingSphere.makeEmpty(); + + const positionAttribute = geometry.getAttribute( 'position' ); + + for ( let i = 0; i < positionAttribute.count; i ++ ) { + + this.getVertexPosition( i, _vertex ); + this.boundingSphere.expandByPoint( _vertex ); + + } + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.bindMode = source.bindMode; + this.bindMatrix.copy( source.bindMatrix ); + this.bindMatrixInverse.copy( source.bindMatrixInverse ); + + this.skeleton = source.skeleton; + + if ( source.boundingBox !== null ) this.boundingBox = source.boundingBox.clone(); + if ( source.boundingSphere !== null ) this.boundingSphere = source.boundingSphere.clone(); + + return this; + + } + + raycast( raycaster, intersects ) { + + const material = this.material; + const matrixWorld = this.matrixWorld; + + if ( material === undefined ) return; + + // test with bounding sphere in world space + + if ( this.boundingSphere === null ) this.computeBoundingSphere(); + + _sphere$4.copy( this.boundingSphere ); + _sphere$4.applyMatrix4( matrixWorld ); + + if ( raycaster.ray.intersectsSphere( _sphere$4 ) === false ) return; + + // convert ray to local space of skinned mesh + + _inverseMatrix$2.copy( matrixWorld ).invert(); + _ray$2.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$2 ); + + // test with bounding box in local space + + if ( this.boundingBox !== null ) { + + if ( _ray$2.intersectsBox( this.boundingBox ) === false ) return; + + } + + // test for intersections with geometry + + this._computeIntersections( raycaster, intersects, _ray$2 ); + + } + + getVertexPosition( index, target ) { + + super.getVertexPosition( index, target ); + + this.applyBoneTransform( index, target ); + + return target; + + } + + bind( skeleton, bindMatrix ) { + + this.skeleton = skeleton; + + if ( bindMatrix === undefined ) { + + this.updateMatrixWorld( true ); + + this.skeleton.calculateInverses(); + + bindMatrix = this.matrixWorld; + + } + + this.bindMatrix.copy( bindMatrix ); + this.bindMatrixInverse.copy( bindMatrix ).invert(); + + } + + pose() { + + this.skeleton.pose(); + + } + + normalizeSkinWeights() { + + const vector = new Vector4(); + + const skinWeight = this.geometry.attributes.skinWeight; + + for ( let i = 0, l = skinWeight.count; i < l; i ++ ) { + + vector.fromBufferAttribute( skinWeight, i ); + + const scale = 1.0 / vector.manhattanLength(); + + if ( scale !== Infinity ) { + + vector.multiplyScalar( scale ); + + } else { + + vector.set( 1, 0, 0, 0 ); // do something reasonable + + } + + skinWeight.setXYZW( i, vector.x, vector.y, vector.z, vector.w ); + + } + + } + + updateMatrixWorld( force ) { + + super.updateMatrixWorld( force ); + + if ( this.bindMode === AttachedBindMode ) { + + this.bindMatrixInverse.copy( this.matrixWorld ).invert(); + + } else if ( this.bindMode === DetachedBindMode ) { + + this.bindMatrixInverse.copy( this.bindMatrix ).invert(); + + } else { + + console.warn( 'THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode ); + + } + + } + + applyBoneTransform( index, vector ) { + + const skeleton = this.skeleton; + const geometry = this.geometry; + + _skinIndex.fromBufferAttribute( geometry.attributes.skinIndex, index ); + _skinWeight.fromBufferAttribute( geometry.attributes.skinWeight, index ); + + _basePosition.copy( vector ).applyMatrix4( this.bindMatrix ); + + vector.set( 0, 0, 0 ); + + for ( let i = 0; i < 4; i ++ ) { + + const weight = _skinWeight.getComponent( i ); + + if ( weight !== 0 ) { + + const boneIndex = _skinIndex.getComponent( i ); + + _matrix4.multiplyMatrices( skeleton.bones[ boneIndex ].matrixWorld, skeleton.boneInverses[ boneIndex ] ); + + vector.addScaledVector( _vector3.copy( _basePosition ).applyMatrix4( _matrix4 ), weight ); + + } + + } + + return vector.applyMatrix4( this.bindMatrixInverse ); + + } + +} + +class Bone extends Object3D { + + constructor() { + + super(); + + this.isBone = true; + + this.type = 'Bone'; + + } + +} + +class DataTexture extends Texture { + + constructor( data = null, width = 1, height = 1, format, type, mapping, wrapS, wrapT, magFilter = NearestFilter, minFilter = NearestFilter, anisotropy, colorSpace ) { + + super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace ); + + this.isDataTexture = true; + + this.image = { data: data, width: width, height: height }; + + this.generateMipmaps = false; + this.flipY = false; + this.unpackAlignment = 1; + + } + +} + +const _offsetMatrix = /*@__PURE__*/ new Matrix4(); +const _identityMatrix$1 = /*@__PURE__*/ new Matrix4(); + +class Skeleton { + + constructor( bones = [], boneInverses = [] ) { + + this.uuid = generateUUID(); + + this.bones = bones.slice( 0 ); + this.boneInverses = boneInverses; + this.boneMatrices = null; + + this.boneTexture = null; + + this.init(); + + } + + init() { + + const bones = this.bones; + const boneInverses = this.boneInverses; + + this.boneMatrices = new Float32Array( bones.length * 16 ); + + // calculate inverse bone matrices if necessary + + if ( boneInverses.length === 0 ) { + + this.calculateInverses(); + + } else { + + // handle special case + + if ( bones.length !== boneInverses.length ) { + + console.warn( 'THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.' ); + + this.boneInverses = []; + + for ( let i = 0, il = this.bones.length; i < il; i ++ ) { + + this.boneInverses.push( new Matrix4() ); + + } + + } + + } + + } + + calculateInverses() { + + this.boneInverses.length = 0; + + for ( let i = 0, il = this.bones.length; i < il; i ++ ) { + + const inverse = new Matrix4(); + + if ( this.bones[ i ] ) { + + inverse.copy( this.bones[ i ].matrixWorld ).invert(); + + } + + this.boneInverses.push( inverse ); + + } + + } + + pose() { + + // recover the bind-time world matrices + + for ( let i = 0, il = this.bones.length; i < il; i ++ ) { + + const bone = this.bones[ i ]; + + if ( bone ) { + + bone.matrixWorld.copy( this.boneInverses[ i ] ).invert(); + + } + + } + + // compute the local matrices, positions, rotations and scales + + for ( let i = 0, il = this.bones.length; i < il; i ++ ) { + + const bone = this.bones[ i ]; + + if ( bone ) { + + if ( bone.parent && bone.parent.isBone ) { + + bone.matrix.copy( bone.parent.matrixWorld ).invert(); + bone.matrix.multiply( bone.matrixWorld ); + + } else { + + bone.matrix.copy( bone.matrixWorld ); + + } + + bone.matrix.decompose( bone.position, bone.quaternion, bone.scale ); + + } + + } + + } + + update() { + + const bones = this.bones; + const boneInverses = this.boneInverses; + const boneMatrices = this.boneMatrices; + const boneTexture = this.boneTexture; + + // flatten bone matrices to array + + for ( let i = 0, il = bones.length; i < il; i ++ ) { + + // compute the offset between the current and the original transform + + const matrix = bones[ i ] ? bones[ i ].matrixWorld : _identityMatrix$1; + + _offsetMatrix.multiplyMatrices( matrix, boneInverses[ i ] ); + _offsetMatrix.toArray( boneMatrices, i * 16 ); + + } + + if ( boneTexture !== null ) { + + boneTexture.needsUpdate = true; + + } + + } + + clone() { + + return new Skeleton( this.bones, this.boneInverses ); + + } + + computeBoneTexture() { + + // layout (1 matrix = 4 pixels) + // RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4) + // with 8x8 pixel texture max 16 bones * 4 pixels = (8 * 8) + // 16x16 pixel texture max 64 bones * 4 pixels = (16 * 16) + // 32x32 pixel texture max 256 bones * 4 pixels = (32 * 32) + // 64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64) + + let size = Math.sqrt( this.bones.length * 4 ); // 4 pixels needed for 1 matrix + size = Math.ceil( size / 4 ) * 4; + size = Math.max( size, 4 ); + + const boneMatrices = new Float32Array( size * size * 4 ); // 4 floats per RGBA pixel + boneMatrices.set( this.boneMatrices ); // copy current values + + const boneTexture = new DataTexture( boneMatrices, size, size, RGBAFormat, FloatType ); + boneTexture.needsUpdate = true; + + this.boneMatrices = boneMatrices; + this.boneTexture = boneTexture; + + return this; + + } + + getBoneByName( name ) { + + for ( let i = 0, il = this.bones.length; i < il; i ++ ) { + + const bone = this.bones[ i ]; + + if ( bone.name === name ) { + + return bone; + + } + + } + + return undefined; + + } + + dispose( ) { + + if ( this.boneTexture !== null ) { + + this.boneTexture.dispose(); + + this.boneTexture = null; + + } + + } + + fromJSON( json, bones ) { + + this.uuid = json.uuid; + + for ( let i = 0, l = json.bones.length; i < l; i ++ ) { + + const uuid = json.bones[ i ]; + let bone = bones[ uuid ]; + + if ( bone === undefined ) { + + console.warn( 'THREE.Skeleton: No bone found with UUID:', uuid ); + bone = new Bone(); + + } + + this.bones.push( bone ); + this.boneInverses.push( new Matrix4().fromArray( json.boneInverses[ i ] ) ); + + } + + this.init(); + + return this; + + } + + toJSON() { + + const data = { + metadata: { + version: 4.6, + type: 'Skeleton', + generator: 'Skeleton.toJSON' + }, + bones: [], + boneInverses: [] + }; + + data.uuid = this.uuid; + + const bones = this.bones; + const boneInverses = this.boneInverses; + + for ( let i = 0, l = bones.length; i < l; i ++ ) { + + const bone = bones[ i ]; + data.bones.push( bone.uuid ); + + const boneInverse = boneInverses[ i ]; + data.boneInverses.push( boneInverse.toArray() ); + + } + + return data; + + } + +} + +class InstancedBufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized, meshPerAttribute = 1 ) { + + super( array, itemSize, normalized ); + + this.isInstancedBufferAttribute = true; + + this.meshPerAttribute = meshPerAttribute; + + } + + copy( source ) { + + super.copy( source ); + + this.meshPerAttribute = source.meshPerAttribute; + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.meshPerAttribute = this.meshPerAttribute; + + data.isInstancedBufferAttribute = true; + + return data; + + } + +} + +const _instanceLocalMatrix = /*@__PURE__*/ new Matrix4(); +const _instanceWorldMatrix = /*@__PURE__*/ new Matrix4(); + +const _instanceIntersects = []; + +const _box3 = /*@__PURE__*/ new Box3(); +const _identity = /*@__PURE__*/ new Matrix4(); +const _mesh$1 = /*@__PURE__*/ new Mesh(); +const _sphere$3 = /*@__PURE__*/ new Sphere(); + +class InstancedMesh extends Mesh { + + constructor( geometry, material, count ) { + + super( geometry, material ); + + this.isInstancedMesh = true; + + this.instanceMatrix = new InstancedBufferAttribute( new Float32Array( count * 16 ), 16 ); + this.instanceColor = null; + this.morphTexture = null; + + this.count = count; + + this.boundingBox = null; + this.boundingSphere = null; + + for ( let i = 0; i < count; i ++ ) { + + this.setMatrixAt( i, _identity ); + + } + + } + + computeBoundingBox() { + + const geometry = this.geometry; + const count = this.count; + + if ( this.boundingBox === null ) { + + this.boundingBox = new Box3(); + + } + + if ( geometry.boundingBox === null ) { + + geometry.computeBoundingBox(); + + } + + this.boundingBox.makeEmpty(); + + for ( let i = 0; i < count; i ++ ) { + + this.getMatrixAt( i, _instanceLocalMatrix ); + + _box3.copy( geometry.boundingBox ).applyMatrix4( _instanceLocalMatrix ); + + this.boundingBox.union( _box3 ); + + } + + } + + computeBoundingSphere() { + + const geometry = this.geometry; + const count = this.count; + + if ( this.boundingSphere === null ) { + + this.boundingSphere = new Sphere(); + + } + + if ( geometry.boundingSphere === null ) { + + geometry.computeBoundingSphere(); + + } + + this.boundingSphere.makeEmpty(); + + for ( let i = 0; i < count; i ++ ) { + + this.getMatrixAt( i, _instanceLocalMatrix ); + + _sphere$3.copy( geometry.boundingSphere ).applyMatrix4( _instanceLocalMatrix ); + + this.boundingSphere.union( _sphere$3 ); + + } + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.instanceMatrix.copy( source.instanceMatrix ); + + if ( source.morphTexture !== null ) this.morphTexture = source.morphTexture.clone(); + if ( source.instanceColor !== null ) this.instanceColor = source.instanceColor.clone(); + + this.count = source.count; + + if ( source.boundingBox !== null ) this.boundingBox = source.boundingBox.clone(); + if ( source.boundingSphere !== null ) this.boundingSphere = source.boundingSphere.clone(); + + return this; + + } + + getColorAt( index, color ) { + + color.fromArray( this.instanceColor.array, index * 3 ); + + } + + getMatrixAt( index, matrix ) { + + matrix.fromArray( this.instanceMatrix.array, index * 16 ); + + } + + getMorphAt( index, object ) { + + const objectInfluences = object.morphTargetInfluences; + + const array = this.morphTexture.source.data.data; + + const len = objectInfluences.length + 1; // All influences + the baseInfluenceSum + + const dataIndex = index * len + 1; // Skip the baseInfluenceSum at the beginning + + for ( let i = 0; i < objectInfluences.length; i ++ ) { + + objectInfluences[ i ] = array[ dataIndex + i ]; + + } + + } + + raycast( raycaster, intersects ) { + + const matrixWorld = this.matrixWorld; + const raycastTimes = this.count; + + _mesh$1.geometry = this.geometry; + _mesh$1.material = this.material; + + if ( _mesh$1.material === undefined ) return; + + // test with bounding sphere first + + if ( this.boundingSphere === null ) this.computeBoundingSphere(); + + _sphere$3.copy( this.boundingSphere ); + _sphere$3.applyMatrix4( matrixWorld ); + + if ( raycaster.ray.intersectsSphere( _sphere$3 ) === false ) return; + + // now test each instance + + for ( let instanceId = 0; instanceId < raycastTimes; instanceId ++ ) { + + // calculate the world matrix for each instance + + this.getMatrixAt( instanceId, _instanceLocalMatrix ); + + _instanceWorldMatrix.multiplyMatrices( matrixWorld, _instanceLocalMatrix ); + + // the mesh represents this single instance + + _mesh$1.matrixWorld = _instanceWorldMatrix; + + _mesh$1.raycast( raycaster, _instanceIntersects ); + + // process the result of raycast + + for ( let i = 0, l = _instanceIntersects.length; i < l; i ++ ) { + + const intersect = _instanceIntersects[ i ]; + intersect.instanceId = instanceId; + intersect.object = this; + intersects.push( intersect ); + + } + + _instanceIntersects.length = 0; + + } + + } + + setColorAt( index, color ) { + + if ( this.instanceColor === null ) { + + this.instanceColor = new InstancedBufferAttribute( new Float32Array( this.instanceMatrix.count * 3 ), 3 ); + + } + + color.toArray( this.instanceColor.array, index * 3 ); + + } + + setMatrixAt( index, matrix ) { + + matrix.toArray( this.instanceMatrix.array, index * 16 ); + + } + + setMorphAt( index, object ) { + + const objectInfluences = object.morphTargetInfluences; + + const len = objectInfluences.length + 1; // morphBaseInfluence + all influences + + if ( this.morphTexture === null ) { + + this.morphTexture = new DataTexture( new Float32Array( len * this.count ), len, this.count, RedFormat, FloatType ); + + } + + const array = this.morphTexture.source.data.data; + + let morphInfluencesSum = 0; + + for ( let i = 0; i < objectInfluences.length; i ++ ) { + + morphInfluencesSum += objectInfluences[ i ]; + + } + + const morphBaseInfluence = this.geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum; + + const dataIndex = len * index; + + array[ dataIndex ] = morphBaseInfluence; + + array.set( objectInfluences, dataIndex + 1 ); + + } + + updateMorphTargets() { + + } + + dispose() { + + this.dispatchEvent( { type: 'dispose' } ); + + if ( this.morphTexture !== null ) { + + this.morphTexture.dispose(); + this.morphTexture = null; + + } + + return this; + + } + +} + +function sortOpaque( a, b ) { + + return a.z - b.z; + +} + +function sortTransparent( a, b ) { + + return b.z - a.z; + +} + +class MultiDrawRenderList { + + constructor() { + + this.index = 0; + this.pool = []; + this.list = []; + + } + + push( drawRange, z ) { + + const pool = this.pool; + const list = this.list; + if ( this.index >= pool.length ) { + + pool.push( { + + start: - 1, + count: - 1, + z: - 1, + + } ); + + } + + const item = pool[ this.index ]; + list.push( item ); + this.index ++; + + item.start = drawRange.start; + item.count = drawRange.count; + item.z = z; + + } + + reset() { + + this.list.length = 0; + this.index = 0; + + } + +} + +const ID_ATTR_NAME = 'batchId'; +const _matrix$1 = /*@__PURE__*/ new Matrix4(); +const _invMatrixWorld = /*@__PURE__*/ new Matrix4(); +const _identityMatrix = /*@__PURE__*/ new Matrix4(); +const _projScreenMatrix$2 = /*@__PURE__*/ new Matrix4(); +const _frustum = /*@__PURE__*/ new Frustum(); +const _box$1 = /*@__PURE__*/ new Box3(); +const _sphere$2 = /*@__PURE__*/ new Sphere(); +const _vector$5 = /*@__PURE__*/ new Vector3(); +const _renderList = /*@__PURE__*/ new MultiDrawRenderList(); +const _mesh = /*@__PURE__*/ new Mesh(); +const _batchIntersects = []; + +// @TODO: SkinnedMesh support? +// @TODO: geometry.groups support? +// @TODO: geometry.drawRange support? +// @TODO: geometry.morphAttributes support? +// @TODO: Support uniform parameter per geometry +// @TODO: Add an "optimize" function to pack geometry and remove data gaps + +// copies data from attribute "src" into "target" starting at "targetOffset" +function copyAttributeData( src, target, targetOffset = 0 ) { + + const itemSize = target.itemSize; + if ( src.isInterleavedBufferAttribute || src.array.constructor !== target.array.constructor ) { + + // use the component getters and setters if the array data cannot + // be copied directly + const vertexCount = src.count; + for ( let i = 0; i < vertexCount; i ++ ) { + + for ( let c = 0; c < itemSize; c ++ ) { + + target.setComponent( i + targetOffset, c, src.getComponent( i, c ) ); + + } + + } + + } else { + + // faster copy approach using typed array set function + target.array.set( src.array, targetOffset * itemSize ); + + } + + target.needsUpdate = true; + +} + +class BatchedMesh extends Mesh { + + get maxGeometryCount() { + + return this._maxGeometryCount; + + } + + constructor( maxGeometryCount, maxVertexCount, maxIndexCount = maxVertexCount * 2, material ) { + + super( new BufferGeometry(), material ); + + this.isBatchedMesh = true; + this.perObjectFrustumCulled = true; + this.sortObjects = true; + this.boundingBox = null; + this.boundingSphere = null; + this.customSort = null; + + this._drawRanges = []; + this._reservedRanges = []; + + this._visibility = []; + this._active = []; + this._bounds = []; + + this._maxGeometryCount = maxGeometryCount; + this._maxVertexCount = maxVertexCount; + this._maxIndexCount = maxIndexCount; + + this._geometryInitialized = false; + this._geometryCount = 0; + this._multiDrawCounts = new Int32Array( maxGeometryCount ); + this._multiDrawStarts = new Int32Array( maxGeometryCount ); + this._multiDrawCount = 0; + this._multiDrawInstances = null; + this._visibilityChanged = true; + + // Local matrix per geometry by using data texture + this._matricesTexture = null; + + this._initMatricesTexture(); + + } + + _initMatricesTexture() { + + // layout (1 matrix = 4 pixels) + // RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4) + // with 8x8 pixel texture max 16 matrices * 4 pixels = (8 * 8) + // 16x16 pixel texture max 64 matrices * 4 pixels = (16 * 16) + // 32x32 pixel texture max 256 matrices * 4 pixels = (32 * 32) + // 64x64 pixel texture max 1024 matrices * 4 pixels = (64 * 64) + + let size = Math.sqrt( this._maxGeometryCount * 4 ); // 4 pixels needed for 1 matrix + size = Math.ceil( size / 4 ) * 4; + size = Math.max( size, 4 ); + + const matricesArray = new Float32Array( size * size * 4 ); // 4 floats per RGBA pixel + const matricesTexture = new DataTexture( matricesArray, size, size, RGBAFormat, FloatType ); + + this._matricesTexture = matricesTexture; + + } + + _initializeGeometry( reference ) { + + const geometry = this.geometry; + const maxVertexCount = this._maxVertexCount; + const maxGeometryCount = this._maxGeometryCount; + const maxIndexCount = this._maxIndexCount; + if ( this._geometryInitialized === false ) { + + for ( const attributeName in reference.attributes ) { + + const srcAttribute = reference.getAttribute( attributeName ); + const { array, itemSize, normalized } = srcAttribute; + + const dstArray = new array.constructor( maxVertexCount * itemSize ); + const dstAttribute = new BufferAttribute( dstArray, itemSize, normalized ); + + geometry.setAttribute( attributeName, dstAttribute ); + + } + + if ( reference.getIndex() !== null ) { + + const indexArray = maxVertexCount > 65536 + ? new Uint32Array( maxIndexCount ) + : new Uint16Array( maxIndexCount ); + + geometry.setIndex( new BufferAttribute( indexArray, 1 ) ); + + } + + const idArray = maxGeometryCount > 65536 + ? new Uint32Array( maxVertexCount ) + : new Uint16Array( maxVertexCount ); + geometry.setAttribute( ID_ATTR_NAME, new BufferAttribute( idArray, 1 ) ); + + this._geometryInitialized = true; + + } + + } + + // Make sure the geometry is compatible with the existing combined geometry attributes + _validateGeometry( geometry ) { + + // check that the geometry doesn't have a version of our reserved id attribute + if ( geometry.getAttribute( ID_ATTR_NAME ) ) { + + throw new Error( `BatchedMesh: Geometry cannot use attribute "${ ID_ATTR_NAME }"` ); + + } + + // check to ensure the geometries are using consistent attributes and indices + const batchGeometry = this.geometry; + if ( Boolean( geometry.getIndex() ) !== Boolean( batchGeometry.getIndex() ) ) { + + throw new Error( 'BatchedMesh: All geometries must consistently have "index".' ); + + } + + for ( const attributeName in batchGeometry.attributes ) { + + if ( attributeName === ID_ATTR_NAME ) { + + continue; + + } + + if ( ! geometry.hasAttribute( attributeName ) ) { + + throw new Error( `BatchedMesh: Added geometry missing "${ attributeName }". All geometries must have consistent attributes.` ); + + } + + const srcAttribute = geometry.getAttribute( attributeName ); + const dstAttribute = batchGeometry.getAttribute( attributeName ); + if ( srcAttribute.itemSize !== dstAttribute.itemSize || srcAttribute.normalized !== dstAttribute.normalized ) { + + throw new Error( 'BatchedMesh: All attributes must have a consistent itemSize and normalized value.' ); + + } + + } + + } + + setCustomSort( func ) { + + this.customSort = func; + return this; + + } + + computeBoundingBox() { + + if ( this.boundingBox === null ) { + + this.boundingBox = new Box3(); + + } + + const geometryCount = this._geometryCount; + const boundingBox = this.boundingBox; + const active = this._active; + + boundingBox.makeEmpty(); + for ( let i = 0; i < geometryCount; i ++ ) { + + if ( active[ i ] === false ) continue; + + this.getMatrixAt( i, _matrix$1 ); + this.getBoundingBoxAt( i, _box$1 ).applyMatrix4( _matrix$1 ); + boundingBox.union( _box$1 ); + + } + + } + + computeBoundingSphere() { + + if ( this.boundingSphere === null ) { + + this.boundingSphere = new Sphere(); + + } + + const geometryCount = this._geometryCount; + const boundingSphere = this.boundingSphere; + const active = this._active; + + boundingSphere.makeEmpty(); + for ( let i = 0; i < geometryCount; i ++ ) { + + if ( active[ i ] === false ) continue; + + this.getMatrixAt( i, _matrix$1 ); + this.getBoundingSphereAt( i, _sphere$2 ).applyMatrix4( _matrix$1 ); + boundingSphere.union( _sphere$2 ); + + } + + } + + addGeometry( geometry, vertexCount = - 1, indexCount = - 1 ) { + + this._initializeGeometry( geometry ); + + this._validateGeometry( geometry ); + + // ensure we're not over geometry + if ( this._geometryCount >= this._maxGeometryCount ) { + + throw new Error( 'BatchedMesh: Maximum geometry count reached.' ); + + } + + // get the necessary range fo the geometry + const reservedRange = { + vertexStart: - 1, + vertexCount: - 1, + indexStart: - 1, + indexCount: - 1, + }; + + let lastRange = null; + const reservedRanges = this._reservedRanges; + const drawRanges = this._drawRanges; + const bounds = this._bounds; + if ( this._geometryCount !== 0 ) { + + lastRange = reservedRanges[ reservedRanges.length - 1 ]; + + } + + if ( vertexCount === - 1 ) { + + reservedRange.vertexCount = geometry.getAttribute( 'position' ).count; + + } else { + + reservedRange.vertexCount = vertexCount; + + } + + if ( lastRange === null ) { + + reservedRange.vertexStart = 0; + + } else { + + reservedRange.vertexStart = lastRange.vertexStart + lastRange.vertexCount; + + } + + const index = geometry.getIndex(); + const hasIndex = index !== null; + if ( hasIndex ) { + + if ( indexCount === - 1 ) { + + reservedRange.indexCount = index.count; + + } else { + + reservedRange.indexCount = indexCount; + + } + + if ( lastRange === null ) { + + reservedRange.indexStart = 0; + + } else { + + reservedRange.indexStart = lastRange.indexStart + lastRange.indexCount; + + } + + } + + if ( + reservedRange.indexStart !== - 1 && + reservedRange.indexStart + reservedRange.indexCount > this._maxIndexCount || + reservedRange.vertexStart + reservedRange.vertexCount > this._maxVertexCount + ) { + + throw new Error( 'BatchedMesh: Reserved space request exceeds the maximum buffer size.' ); + + } + + const visibility = this._visibility; + const active = this._active; + const matricesTexture = this._matricesTexture; + const matricesArray = this._matricesTexture.image.data; + + // push new visibility states + visibility.push( true ); + active.push( true ); + + // update id + const geometryId = this._geometryCount; + this._geometryCount ++; + + // initialize matrix information + _identityMatrix.toArray( matricesArray, geometryId * 16 ); + matricesTexture.needsUpdate = true; + + // add the reserved range and draw range objects + reservedRanges.push( reservedRange ); + drawRanges.push( { + start: hasIndex ? reservedRange.indexStart : reservedRange.vertexStart, + count: - 1 + } ); + bounds.push( { + boxInitialized: false, + box: new Box3(), + + sphereInitialized: false, + sphere: new Sphere() + } ); + + // set the id for the geometry + const idAttribute = this.geometry.getAttribute( ID_ATTR_NAME ); + for ( let i = 0; i < reservedRange.vertexCount; i ++ ) { + + idAttribute.setX( reservedRange.vertexStart + i, geometryId ); + + } + + idAttribute.needsUpdate = true; + + // update the geometry + this.setGeometryAt( geometryId, geometry ); + + return geometryId; + + } + + setGeometryAt( id, geometry ) { + + if ( id >= this._geometryCount ) { + + throw new Error( 'BatchedMesh: Maximum geometry count reached.' ); + + } + + this._validateGeometry( geometry ); + + const batchGeometry = this.geometry; + const hasIndex = batchGeometry.getIndex() !== null; + const dstIndex = batchGeometry.getIndex(); + const srcIndex = geometry.getIndex(); + const reservedRange = this._reservedRanges[ id ]; + if ( + hasIndex && + srcIndex.count > reservedRange.indexCount || + geometry.attributes.position.count > reservedRange.vertexCount + ) { + + throw new Error( 'BatchedMesh: Reserved space not large enough for provided geometry.' ); + + } + + // copy geometry over + const vertexStart = reservedRange.vertexStart; + const vertexCount = reservedRange.vertexCount; + for ( const attributeName in batchGeometry.attributes ) { + + if ( attributeName === ID_ATTR_NAME ) { + + continue; + + } + + // copy attribute data + const srcAttribute = geometry.getAttribute( attributeName ); + const dstAttribute = batchGeometry.getAttribute( attributeName ); + copyAttributeData( srcAttribute, dstAttribute, vertexStart ); + + // fill the rest in with zeroes + const itemSize = srcAttribute.itemSize; + for ( let i = srcAttribute.count, l = vertexCount; i < l; i ++ ) { + + const index = vertexStart + i; + for ( let c = 0; c < itemSize; c ++ ) { + + dstAttribute.setComponent( index, c, 0 ); + + } + + } + + dstAttribute.needsUpdate = true; + dstAttribute.addUpdateRange( vertexStart * itemSize, vertexCount * itemSize ); + + } + + // copy index + if ( hasIndex ) { + + const indexStart = reservedRange.indexStart; + + // copy index data over + for ( let i = 0; i < srcIndex.count; i ++ ) { + + dstIndex.setX( indexStart + i, vertexStart + srcIndex.getX( i ) ); + + } + + // fill the rest in with zeroes + for ( let i = srcIndex.count, l = reservedRange.indexCount; i < l; i ++ ) { + + dstIndex.setX( indexStart + i, vertexStart ); + + } + + dstIndex.needsUpdate = true; + dstIndex.addUpdateRange( indexStart, reservedRange.indexCount ); + + } + + // store the bounding boxes + const bound = this._bounds[ id ]; + if ( geometry.boundingBox !== null ) { + + bound.box.copy( geometry.boundingBox ); + bound.boxInitialized = true; + + } else { + + bound.boxInitialized = false; + + } + + if ( geometry.boundingSphere !== null ) { + + bound.sphere.copy( geometry.boundingSphere ); + bound.sphereInitialized = true; + + } else { + + bound.sphereInitialized = false; + + } + + // set drawRange count + const drawRange = this._drawRanges[ id ]; + const posAttr = geometry.getAttribute( 'position' ); + drawRange.count = hasIndex ? srcIndex.count : posAttr.count; + this._visibilityChanged = true; + + return id; + + } + + deleteGeometry( geometryId ) { + + // Note: User needs to call optimize() afterward to pack the data. + + const active = this._active; + if ( geometryId >= active.length || active[ geometryId ] === false ) { + + return this; + + } + + active[ geometryId ] = false; + this._visibilityChanged = true; + + return this; + + } + + getInstanceCountAt( id ) { + + if ( this._multiDrawInstances === null ) return null; + + return this._multiDrawInstances[ id ]; + + } + + setInstanceCountAt( id, instanceCount ) { + + if ( this._multiDrawInstances === null ) { + + this._multiDrawInstances = new Int32Array( this._maxGeometryCount ).fill( 1 ); + + } + + this._multiDrawInstances[ id ] = instanceCount; + + return id; + + } + + // get bounding box and compute it if it doesn't exist + getBoundingBoxAt( id, target ) { + + const active = this._active; + if ( active[ id ] === false ) { + + return null; + + } + + // compute bounding box + const bound = this._bounds[ id ]; + const box = bound.box; + const geometry = this.geometry; + if ( bound.boxInitialized === false ) { + + box.makeEmpty(); + + const index = geometry.index; + const position = geometry.attributes.position; + const drawRange = this._drawRanges[ id ]; + for ( let i = drawRange.start, l = drawRange.start + drawRange.count; i < l; i ++ ) { + + let iv = i; + if ( index ) { + + iv = index.getX( iv ); + + } + + box.expandByPoint( _vector$5.fromBufferAttribute( position, iv ) ); + + } + + bound.boxInitialized = true; + + } + + target.copy( box ); + return target; + + } + + // get bounding sphere and compute it if it doesn't exist + getBoundingSphereAt( id, target ) { + + const active = this._active; + if ( active[ id ] === false ) { + + return null; + + } + + // compute bounding sphere + const bound = this._bounds[ id ]; + const sphere = bound.sphere; + const geometry = this.geometry; + if ( bound.sphereInitialized === false ) { + + sphere.makeEmpty(); + + this.getBoundingBoxAt( id, _box$1 ); + _box$1.getCenter( sphere.center ); + + const index = geometry.index; + const position = geometry.attributes.position; + const drawRange = this._drawRanges[ id ]; + + let maxRadiusSq = 0; + for ( let i = drawRange.start, l = drawRange.start + drawRange.count; i < l; i ++ ) { + + let iv = i; + if ( index ) { + + iv = index.getX( iv ); + + } + + _vector$5.fromBufferAttribute( position, iv ); + maxRadiusSq = Math.max( maxRadiusSq, sphere.center.distanceToSquared( _vector$5 ) ); + + } + + sphere.radius = Math.sqrt( maxRadiusSq ); + bound.sphereInitialized = true; + + } + + target.copy( sphere ); + return target; + + } + + setMatrixAt( geometryId, matrix ) { + + // @TODO: Map geometryId to index of the arrays because + // optimize() can make geometryId mismatch the index + + const active = this._active; + const matricesTexture = this._matricesTexture; + const matricesArray = this._matricesTexture.image.data; + const geometryCount = this._geometryCount; + if ( geometryId >= geometryCount || active[ geometryId ] === false ) { + + return this; + + } + + matrix.toArray( matricesArray, geometryId * 16 ); + matricesTexture.needsUpdate = true; + + return this; + + } + + getMatrixAt( geometryId, matrix ) { + + const active = this._active; + const matricesArray = this._matricesTexture.image.data; + const geometryCount = this._geometryCount; + if ( geometryId >= geometryCount || active[ geometryId ] === false ) { + + return null; + + } + + return matrix.fromArray( matricesArray, geometryId * 16 ); + + } + + setVisibleAt( geometryId, value ) { + + const visibility = this._visibility; + const active = this._active; + const geometryCount = this._geometryCount; + + // if the geometry is out of range, not active, or visibility state + // does not change then return early + if ( + geometryId >= geometryCount || + active[ geometryId ] === false || + visibility[ geometryId ] === value + ) { + + return this; + + } + + visibility[ geometryId ] = value; + this._visibilityChanged = true; + + return this; + + } + + getVisibleAt( geometryId ) { + + const visibility = this._visibility; + const active = this._active; + const geometryCount = this._geometryCount; + + // return early if the geometry is out of range or not active + if ( geometryId >= geometryCount || active[ geometryId ] === false ) { + + return false; + + } + + return visibility[ geometryId ]; + + } + + raycast( raycaster, intersects ) { + + const visibility = this._visibility; + const active = this._active; + const drawRanges = this._drawRanges; + const geometryCount = this._geometryCount; + const matrixWorld = this.matrixWorld; + const batchGeometry = this.geometry; + + // iterate over each geometry + _mesh.material = this.material; + _mesh.geometry.index = batchGeometry.index; + _mesh.geometry.attributes = batchGeometry.attributes; + if ( _mesh.geometry.boundingBox === null ) { + + _mesh.geometry.boundingBox = new Box3(); + + } + + if ( _mesh.geometry.boundingSphere === null ) { + + _mesh.geometry.boundingSphere = new Sphere(); + + } + + for ( let i = 0; i < geometryCount; i ++ ) { + + if ( ! visibility[ i ] || ! active[ i ] ) { + + continue; + + } + + const drawRange = drawRanges[ i ]; + _mesh.geometry.setDrawRange( drawRange.start, drawRange.count ); + + // ge the intersects + this.getMatrixAt( i, _mesh.matrixWorld ).premultiply( matrixWorld ); + this.getBoundingBoxAt( i, _mesh.geometry.boundingBox ); + this.getBoundingSphereAt( i, _mesh.geometry.boundingSphere ); + _mesh.raycast( raycaster, _batchIntersects ); + + // add batch id to the intersects + for ( let j = 0, l = _batchIntersects.length; j < l; j ++ ) { + + const intersect = _batchIntersects[ j ]; + intersect.object = this; + intersect.batchId = i; + intersects.push( intersect ); + + } + + _batchIntersects.length = 0; + + } + + _mesh.material = null; + _mesh.geometry.index = null; + _mesh.geometry.attributes = {}; + _mesh.geometry.setDrawRange( 0, Infinity ); + + } + + copy( source ) { + + super.copy( source ); + + this.geometry = source.geometry.clone(); + this.perObjectFrustumCulled = source.perObjectFrustumCulled; + this.sortObjects = source.sortObjects; + this.boundingBox = source.boundingBox !== null ? source.boundingBox.clone() : null; + this.boundingSphere = source.boundingSphere !== null ? source.boundingSphere.clone() : null; + + this._drawRanges = source._drawRanges.map( range => ( { ...range } ) ); + this._reservedRanges = source._reservedRanges.map( range => ( { ...range } ) ); + + this._visibility = source._visibility.slice(); + this._active = source._active.slice(); + this._bounds = source._bounds.map( bound => ( { + boxInitialized: bound.boxInitialized, + box: bound.box.clone(), + + sphereInitialized: bound.sphereInitialized, + sphere: bound.sphere.clone() + } ) ); + + this._maxGeometryCount = source._maxGeometryCount; + this._maxVertexCount = source._maxVertexCount; + this._maxIndexCount = source._maxIndexCount; + + this._geometryInitialized = source._geometryInitialized; + this._geometryCount = source._geometryCount; + this._multiDrawCounts = source._multiDrawCounts.slice(); + this._multiDrawStarts = source._multiDrawStarts.slice(); + + this._matricesTexture = source._matricesTexture.clone(); + this._matricesTexture.image.data = this._matricesTexture.image.slice(); + + return this; + + } + + dispose() { + + // Assuming the geometry is not shared with other meshes + this.geometry.dispose(); + + this._matricesTexture.dispose(); + this._matricesTexture = null; + return this; + + } + + onBeforeRender( renderer, scene, camera, geometry, material/*, _group*/ ) { + + // if visibility has not changed and frustum culling and object sorting is not required + // then skip iterating over all items + if ( ! this._visibilityChanged && ! this.perObjectFrustumCulled && ! this.sortObjects ) { + + return; + + } + + // the indexed version of the multi draw function requires specifying the start + // offset in bytes. + const index = geometry.getIndex(); + const bytesPerElement = index === null ? 1 : index.array.BYTES_PER_ELEMENT; + + const active = this._active; + const visibility = this._visibility; + const multiDrawStarts = this._multiDrawStarts; + const multiDrawCounts = this._multiDrawCounts; + const drawRanges = this._drawRanges; + const perObjectFrustumCulled = this.perObjectFrustumCulled; + + // prepare the frustum in the local frame + if ( perObjectFrustumCulled ) { + + _projScreenMatrix$2 + .multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse ) + .multiply( this.matrixWorld ); + _frustum.setFromProjectionMatrix( + _projScreenMatrix$2, + renderer.coordinateSystem + ); + + } + + let count = 0; + if ( this.sortObjects ) { + + // get the camera position in the local frame + _invMatrixWorld.copy( this.matrixWorld ).invert(); + _vector$5.setFromMatrixPosition( camera.matrixWorld ).applyMatrix4( _invMatrixWorld ); + + for ( let i = 0, l = visibility.length; i < l; i ++ ) { + + if ( visibility[ i ] && active[ i ] ) { + + // get the bounds in world space + this.getMatrixAt( i, _matrix$1 ); + this.getBoundingSphereAt( i, _sphere$2 ).applyMatrix4( _matrix$1 ); + + // determine whether the batched geometry is within the frustum + let culled = false; + if ( perObjectFrustumCulled ) { + + culled = ! _frustum.intersectsSphere( _sphere$2 ); + + } + + if ( ! culled ) { + + // get the distance from camera used for sorting + const z = _vector$5.distanceTo( _sphere$2.center ); + _renderList.push( drawRanges[ i ], z ); + + } + + } + + } + + // Sort the draw ranges and prep for rendering + const list = _renderList.list; + const customSort = this.customSort; + if ( customSort === null ) { + + list.sort( material.transparent ? sortTransparent : sortOpaque ); + + } else { + + customSort.call( this, list, camera ); + + } + + for ( let i = 0, l = list.length; i < l; i ++ ) { + + const item = list[ i ]; + multiDrawStarts[ count ] = item.start * bytesPerElement; + multiDrawCounts[ count ] = item.count; + count ++; + + } + + _renderList.reset(); + + } else { + + for ( let i = 0, l = visibility.length; i < l; i ++ ) { + + if ( visibility[ i ] && active[ i ] ) { + + // determine whether the batched geometry is within the frustum + let culled = false; + if ( perObjectFrustumCulled ) { + + // get the bounds in world space + this.getMatrixAt( i, _matrix$1 ); + this.getBoundingSphereAt( i, _sphere$2 ).applyMatrix4( _matrix$1 ); + culled = ! _frustum.intersectsSphere( _sphere$2 ); + + } + + if ( ! culled ) { + + const range = drawRanges[ i ]; + multiDrawStarts[ count ] = range.start * bytesPerElement; + multiDrawCounts[ count ] = range.count; + count ++; + + } + + } + + } + + } + + this._multiDrawCount = count; + this._visibilityChanged = false; + + } + + onBeforeShadow( renderer, object, camera, shadowCamera, geometry, depthMaterial/* , group */ ) { + + this.onBeforeRender( renderer, null, shadowCamera, geometry, depthMaterial ); + + } + +} + +class LineBasicMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isLineBasicMaterial = true; + + this.type = 'LineBasicMaterial'; + + this.color = new Color( 0xffffff ); + + this.map = null; + + this.linewidth = 1; + this.linecap = 'round'; + this.linejoin = 'round'; + + this.fog = true; + + this.setValues( parameters ); + + } + + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.map = source.map; + + this.linewidth = source.linewidth; + this.linecap = source.linecap; + this.linejoin = source.linejoin; + + this.fog = source.fog; + + return this; + + } + +} + +const _vStart = /*@__PURE__*/ new Vector3(); +const _vEnd = /*@__PURE__*/ new Vector3(); + +const _inverseMatrix$1 = /*@__PURE__*/ new Matrix4(); +const _ray$1 = /*@__PURE__*/ new Ray(); +const _sphere$1 = /*@__PURE__*/ new Sphere(); + +const _intersectPointOnRay = /*@__PURE__*/ new Vector3(); +const _intersectPointOnSegment = /*@__PURE__*/ new Vector3(); + +class Line extends Object3D { + + constructor( geometry = new BufferGeometry(), material = new LineBasicMaterial() ) { + + super(); + + this.isLine = true; + + this.type = 'Line'; + + this.geometry = geometry; + this.material = material; + + this.updateMorphTargets(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.material = Array.isArray( source.material ) ? source.material.slice() : source.material; + this.geometry = source.geometry; + + return this; + + } + + computeLineDistances() { + + const geometry = this.geometry; + + // we assume non-indexed geometry + + if ( geometry.index === null ) { + + const positionAttribute = geometry.attributes.position; + const lineDistances = [ 0 ]; + + for ( let i = 1, l = positionAttribute.count; i < l; i ++ ) { + + _vStart.fromBufferAttribute( positionAttribute, i - 1 ); + _vEnd.fromBufferAttribute( positionAttribute, i ); + + lineDistances[ i ] = lineDistances[ i - 1 ]; + lineDistances[ i ] += _vStart.distanceTo( _vEnd ); + + } + + geometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) ); + + } else { + + console.warn( 'THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' ); + + } + + return this; + + } + + raycast( raycaster, intersects ) { + + const geometry = this.geometry; + const matrixWorld = this.matrixWorld; + const threshold = raycaster.params.Line.threshold; + const drawRange = geometry.drawRange; + + // Checking boundingSphere distance to ray + + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + + _sphere$1.copy( geometry.boundingSphere ); + _sphere$1.applyMatrix4( matrixWorld ); + _sphere$1.radius += threshold; + + if ( raycaster.ray.intersectsSphere( _sphere$1 ) === false ) return; + + // + + _inverseMatrix$1.copy( matrixWorld ).invert(); + _ray$1.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$1 ); + + const localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 ); + const localThresholdSq = localThreshold * localThreshold; + + const step = this.isLineSegments ? 2 : 1; + + const index = geometry.index; + const attributes = geometry.attributes; + const positionAttribute = attributes.position; + + if ( index !== null ) { + + const start = Math.max( 0, drawRange.start ); + const end = Math.min( index.count, ( drawRange.start + drawRange.count ) ); + + for ( let i = start, l = end - 1; i < l; i += step ) { + + const a = index.getX( i ); + const b = index.getX( i + 1 ); + + const intersect = checkIntersection( this, raycaster, _ray$1, localThresholdSq, a, b ); + + if ( intersect ) { + + intersects.push( intersect ); + + } + + } + + if ( this.isLineLoop ) { + + const a = index.getX( end - 1 ); + const b = index.getX( start ); + + const intersect = checkIntersection( this, raycaster, _ray$1, localThresholdSq, a, b ); + + if ( intersect ) { + + intersects.push( intersect ); + + } + + } + + } else { + + const start = Math.max( 0, drawRange.start ); + const end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) ); + + for ( let i = start, l = end - 1; i < l; i += step ) { + + const intersect = checkIntersection( this, raycaster, _ray$1, localThresholdSq, i, i + 1 ); + + if ( intersect ) { + + intersects.push( intersect ); + + } + + } + + if ( this.isLineLoop ) { + + const intersect = checkIntersection( this, raycaster, _ray$1, localThresholdSq, end - 1, start ); + + if ( intersect ) { + + intersects.push( intersect ); + + } + + } + + } + + } + + updateMorphTargets() { + + const geometry = this.geometry; + + const morphAttributes = geometry.morphAttributes; + const keys = Object.keys( morphAttributes ); + + if ( keys.length > 0 ) { + + const morphAttribute = morphAttributes[ keys[ 0 ] ]; + + if ( morphAttribute !== undefined ) { + + this.morphTargetInfluences = []; + this.morphTargetDictionary = {}; + + for ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) { + + const name = morphAttribute[ m ].name || String( m ); + + this.morphTargetInfluences.push( 0 ); + this.morphTargetDictionary[ name ] = m; + + } + + } + + } + + } + +} + +function checkIntersection( object, raycaster, ray, thresholdSq, a, b ) { + + const positionAttribute = object.geometry.attributes.position; + + _vStart.fromBufferAttribute( positionAttribute, a ); + _vEnd.fromBufferAttribute( positionAttribute, b ); + + const distSq = ray.distanceSqToSegment( _vStart, _vEnd, _intersectPointOnRay, _intersectPointOnSegment ); + + if ( distSq > thresholdSq ) return; + + _intersectPointOnRay.applyMatrix4( object.matrixWorld ); // Move back to world space for distance calculation + + const distance = raycaster.ray.origin.distanceTo( _intersectPointOnRay ); + + if ( distance < raycaster.near || distance > raycaster.far ) return; + + return { + + distance: distance, + // What do we want? intersection point on the ray or on the segment?? + // point: raycaster.ray.at( distance ), + point: _intersectPointOnSegment.clone().applyMatrix4( object.matrixWorld ), + index: a, + face: null, + faceIndex: null, + object: object + + }; + +} + +const _start = /*@__PURE__*/ new Vector3(); +const _end = /*@__PURE__*/ new Vector3(); + +class LineSegments extends Line { + + constructor( geometry, material ) { + + super( geometry, material ); + + this.isLineSegments = true; + + this.type = 'LineSegments'; + + } + + computeLineDistances() { + + const geometry = this.geometry; + + // we assume non-indexed geometry + + if ( geometry.index === null ) { + + const positionAttribute = geometry.attributes.position; + const lineDistances = []; + + for ( let i = 0, l = positionAttribute.count; i < l; i += 2 ) { + + _start.fromBufferAttribute( positionAttribute, i ); + _end.fromBufferAttribute( positionAttribute, i + 1 ); + + lineDistances[ i ] = ( i === 0 ) ? 0 : lineDistances[ i - 1 ]; + lineDistances[ i + 1 ] = lineDistances[ i ] + _start.distanceTo( _end ); + + } + + geometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) ); + + } else { + + console.warn( 'THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' ); + + } + + return this; + + } + +} + +class LineLoop extends Line { + + constructor( geometry, material ) { + + super( geometry, material ); + + this.isLineLoop = true; + + this.type = 'LineLoop'; + + } + +} + +class PointsMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isPointsMaterial = true; + + this.type = 'PointsMaterial'; + + this.color = new Color( 0xffffff ); + + this.map = null; + + this.alphaMap = null; + + this.size = 1; + this.sizeAttenuation = true; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.map = source.map; + + this.alphaMap = source.alphaMap; + + this.size = source.size; + this.sizeAttenuation = source.sizeAttenuation; + + this.fog = source.fog; + + return this; + + } + +} + +const _inverseMatrix = /*@__PURE__*/ new Matrix4(); +const _ray = /*@__PURE__*/ new Ray(); +const _sphere = /*@__PURE__*/ new Sphere(); +const _position$2 = /*@__PURE__*/ new Vector3(); + +class Points extends Object3D { + + constructor( geometry = new BufferGeometry(), material = new PointsMaterial() ) { + + super(); + + this.isPoints = true; + + this.type = 'Points'; + + this.geometry = geometry; + this.material = material; + + this.updateMorphTargets(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.material = Array.isArray( source.material ) ? source.material.slice() : source.material; + this.geometry = source.geometry; + + return this; + + } + + raycast( raycaster, intersects ) { + + const geometry = this.geometry; + const matrixWorld = this.matrixWorld; + const threshold = raycaster.params.Points.threshold; + const drawRange = geometry.drawRange; + + // Checking boundingSphere distance to ray + + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + + _sphere.copy( geometry.boundingSphere ); + _sphere.applyMatrix4( matrixWorld ); + _sphere.radius += threshold; + + if ( raycaster.ray.intersectsSphere( _sphere ) === false ) return; + + // + + _inverseMatrix.copy( matrixWorld ).invert(); + _ray.copy( raycaster.ray ).applyMatrix4( _inverseMatrix ); + + const localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 ); + const localThresholdSq = localThreshold * localThreshold; + + const index = geometry.index; + const attributes = geometry.attributes; + const positionAttribute = attributes.position; + + if ( index !== null ) { + + const start = Math.max( 0, drawRange.start ); + const end = Math.min( index.count, ( drawRange.start + drawRange.count ) ); + + for ( let i = start, il = end; i < il; i ++ ) { + + const a = index.getX( i ); + + _position$2.fromBufferAttribute( positionAttribute, a ); + + testPoint( _position$2, a, localThresholdSq, matrixWorld, raycaster, intersects, this ); + + } + + } else { + + const start = Math.max( 0, drawRange.start ); + const end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) ); + + for ( let i = start, l = end; i < l; i ++ ) { + + _position$2.fromBufferAttribute( positionAttribute, i ); + + testPoint( _position$2, i, localThresholdSq, matrixWorld, raycaster, intersects, this ); + + } + + } + + } + + updateMorphTargets() { + + const geometry = this.geometry; + + const morphAttributes = geometry.morphAttributes; + const keys = Object.keys( morphAttributes ); + + if ( keys.length > 0 ) { + + const morphAttribute = morphAttributes[ keys[ 0 ] ]; + + if ( morphAttribute !== undefined ) { + + this.morphTargetInfluences = []; + this.morphTargetDictionary = {}; + + for ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) { + + const name = morphAttribute[ m ].name || String( m ); + + this.morphTargetInfluences.push( 0 ); + this.morphTargetDictionary[ name ] = m; + + } + + } + + } + + } + +} + +function testPoint( point, index, localThresholdSq, matrixWorld, raycaster, intersects, object ) { + + const rayPointDistanceSq = _ray.distanceSqToPoint( point ); + + if ( rayPointDistanceSq < localThresholdSq ) { + + const intersectPoint = new Vector3(); + + _ray.closestPointToPoint( point, intersectPoint ); + intersectPoint.applyMatrix4( matrixWorld ); + + const distance = raycaster.ray.origin.distanceTo( intersectPoint ); + + if ( distance < raycaster.near || distance > raycaster.far ) return; + + intersects.push( { + + distance: distance, + distanceToRay: Math.sqrt( rayPointDistanceSq ), + point: intersectPoint, + index: index, + face: null, + object: object + + } ); + + } + +} + +class VideoTexture extends Texture { + + constructor( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) { + + super( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ); + + this.isVideoTexture = true; + + this.minFilter = minFilter !== undefined ? minFilter : LinearFilter; + this.magFilter = magFilter !== undefined ? magFilter : LinearFilter; + + this.generateMipmaps = false; + + const scope = this; + + function updateVideo() { + + scope.needsUpdate = true; + video.requestVideoFrameCallback( updateVideo ); + + } + + if ( 'requestVideoFrameCallback' in video ) { + + video.requestVideoFrameCallback( updateVideo ); + + } + + } + + clone() { + + return new this.constructor( this.image ).copy( this ); + + } + + update() { + + const video = this.image; + const hasVideoFrameCallback = 'requestVideoFrameCallback' in video; + + if ( hasVideoFrameCallback === false && video.readyState >= video.HAVE_CURRENT_DATA ) { + + this.needsUpdate = true; + + } + + } + +} + +class FramebufferTexture extends Texture { + + constructor( width, height ) { + + super( { width, height } ); + + this.isFramebufferTexture = true; + + this.magFilter = NearestFilter; + this.minFilter = NearestFilter; + + this.generateMipmaps = false; + + this.needsUpdate = true; + + } + +} + +class CompressedTexture extends Texture { + + constructor( mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, colorSpace ) { + + super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace ); + + this.isCompressedTexture = true; + + this.image = { width: width, height: height }; + this.mipmaps = mipmaps; + + // no flipping for cube textures + // (also flipping doesn't work for compressed textures ) + + this.flipY = false; + + // can't generate mipmaps for compressed textures + // mips must be embedded in DDS files + + this.generateMipmaps = false; + + } + +} + +class CompressedArrayTexture extends CompressedTexture { + + constructor( mipmaps, width, height, depth, format, type ) { + + super( mipmaps, width, height, format, type ); + + this.isCompressedArrayTexture = true; + this.image.depth = depth; + this.wrapR = ClampToEdgeWrapping; + + } + +} + +class CompressedCubeTexture extends CompressedTexture { + + constructor( images, format, type ) { + + super( undefined, images[ 0 ].width, images[ 0 ].height, format, type, CubeReflectionMapping ); + + this.isCompressedCubeTexture = true; + this.isCubeTexture = true; + + this.image = images; + + } + +} + +class CanvasTexture extends Texture { + + constructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) { + + super( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ); + + this.isCanvasTexture = true; + + this.needsUpdate = true; + + } + +} + +/** + * Extensible curve object. + * + * Some common of curve methods: + * .getPoint( t, optionalTarget ), .getTangent( t, optionalTarget ) + * .getPointAt( u, optionalTarget ), .getTangentAt( u, optionalTarget ) + * .getPoints(), .getSpacedPoints() + * .getLength() + * .updateArcLengths() + * + * This following curves inherit from THREE.Curve: + * + * -- 2D curves -- + * THREE.ArcCurve + * THREE.CubicBezierCurve + * THREE.EllipseCurve + * THREE.LineCurve + * THREE.QuadraticBezierCurve + * THREE.SplineCurve + * + * -- 3D curves -- + * THREE.CatmullRomCurve3 + * THREE.CubicBezierCurve3 + * THREE.LineCurve3 + * THREE.QuadraticBezierCurve3 + * + * A series of curves can be represented as a THREE.CurvePath. + * + **/ + +class Curve { + + constructor() { + + this.type = 'Curve'; + + this.arcLengthDivisions = 200; + + } + + // Virtual base class method to overwrite and implement in subclasses + // - t [0 .. 1] + + getPoint( /* t, optionalTarget */ ) { + + console.warn( 'THREE.Curve: .getPoint() not implemented.' ); + return null; + + } + + // Get point at relative position in curve according to arc length + // - u [0 .. 1] + + getPointAt( u, optionalTarget ) { + + const t = this.getUtoTmapping( u ); + return this.getPoint( t, optionalTarget ); + + } + + // Get sequence of points using getPoint( t ) + + getPoints( divisions = 5 ) { + + const points = []; + + for ( let d = 0; d <= divisions; d ++ ) { + + points.push( this.getPoint( d / divisions ) ); + + } + + return points; + + } + + // Get sequence of points using getPointAt( u ) + + getSpacedPoints( divisions = 5 ) { + + const points = []; + + for ( let d = 0; d <= divisions; d ++ ) { + + points.push( this.getPointAt( d / divisions ) ); + + } + + return points; + + } + + // Get total curve arc length + + getLength() { + + const lengths = this.getLengths(); + return lengths[ lengths.length - 1 ]; + + } + + // Get list of cumulative segment lengths + + getLengths( divisions = this.arcLengthDivisions ) { + + if ( this.cacheArcLengths && + ( this.cacheArcLengths.length === divisions + 1 ) && + ! this.needsUpdate ) { + + return this.cacheArcLengths; + + } + + this.needsUpdate = false; + + const cache = []; + let current, last = this.getPoint( 0 ); + let sum = 0; + + cache.push( 0 ); + + for ( let p = 1; p <= divisions; p ++ ) { + + current = this.getPoint( p / divisions ); + sum += current.distanceTo( last ); + cache.push( sum ); + last = current; + + } + + this.cacheArcLengths = cache; + + return cache; // { sums: cache, sum: sum }; Sum is in the last element. + + } + + updateArcLengths() { + + this.needsUpdate = true; + this.getLengths(); + + } + + // Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant + + getUtoTmapping( u, distance ) { + + const arcLengths = this.getLengths(); + + let i = 0; + const il = arcLengths.length; + + let targetArcLength; // The targeted u distance value to get + + if ( distance ) { + + targetArcLength = distance; + + } else { + + targetArcLength = u * arcLengths[ il - 1 ]; + + } + + // binary search for the index with largest value smaller than target u distance + + let low = 0, high = il - 1, comparison; + + while ( low <= high ) { + + i = Math.floor( low + ( high - low ) / 2 ); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats + + comparison = arcLengths[ i ] - targetArcLength; + + if ( comparison < 0 ) { + + low = i + 1; + + } else if ( comparison > 0 ) { + + high = i - 1; + + } else { + + high = i; + break; + + // DONE + + } + + } + + i = high; + + if ( arcLengths[ i ] === targetArcLength ) { + + return i / ( il - 1 ); + + } + + // we could get finer grain at lengths, or use simple interpolation between two points + + const lengthBefore = arcLengths[ i ]; + const lengthAfter = arcLengths[ i + 1 ]; + + const segmentLength = lengthAfter - lengthBefore; + + // determine where we are between the 'before' and 'after' points + + const segmentFraction = ( targetArcLength - lengthBefore ) / segmentLength; + + // add that fractional amount to t + + const t = ( i + segmentFraction ) / ( il - 1 ); + + return t; + + } + + // Returns a unit vector tangent at t + // In case any sub curve does not implement its tangent derivation, + // 2 points a small delta apart will be used to find its gradient + // which seems to give a reasonable approximation + + getTangent( t, optionalTarget ) { + + const delta = 0.0001; + let t1 = t - delta; + let t2 = t + delta; + + // Capping in case of danger + + if ( t1 < 0 ) t1 = 0; + if ( t2 > 1 ) t2 = 1; + + const pt1 = this.getPoint( t1 ); + const pt2 = this.getPoint( t2 ); + + const tangent = optionalTarget || ( ( pt1.isVector2 ) ? new Vector2() : new Vector3() ); + + tangent.copy( pt2 ).sub( pt1 ).normalize(); + + return tangent; + + } + + getTangentAt( u, optionalTarget ) { + + const t = this.getUtoTmapping( u ); + return this.getTangent( t, optionalTarget ); + + } + + computeFrenetFrames( segments, closed ) { + + // see http://www.cs.indiana.edu/pub/techreports/TR425.pdf + + const normal = new Vector3(); + + const tangents = []; + const normals = []; + const binormals = []; + + const vec = new Vector3(); + const mat = new Matrix4(); + + // compute the tangent vectors for each segment on the curve + + for ( let i = 0; i <= segments; i ++ ) { + + const u = i / segments; + + tangents[ i ] = this.getTangentAt( u, new Vector3() ); + + } + + // select an initial normal vector perpendicular to the first tangent vector, + // and in the direction of the minimum tangent xyz component + + normals[ 0 ] = new Vector3(); + binormals[ 0 ] = new Vector3(); + let min = Number.MAX_VALUE; + const tx = Math.abs( tangents[ 0 ].x ); + const ty = Math.abs( tangents[ 0 ].y ); + const tz = Math.abs( tangents[ 0 ].z ); + + if ( tx <= min ) { + + min = tx; + normal.set( 1, 0, 0 ); + + } + + if ( ty <= min ) { + + min = ty; + normal.set( 0, 1, 0 ); + + } + + if ( tz <= min ) { + + normal.set( 0, 0, 1 ); + + } + + vec.crossVectors( tangents[ 0 ], normal ).normalize(); + + normals[ 0 ].crossVectors( tangents[ 0 ], vec ); + binormals[ 0 ].crossVectors( tangents[ 0 ], normals[ 0 ] ); + + + // compute the slowly-varying normal and binormal vectors for each segment on the curve + + for ( let i = 1; i <= segments; i ++ ) { + + normals[ i ] = normals[ i - 1 ].clone(); + + binormals[ i ] = binormals[ i - 1 ].clone(); + + vec.crossVectors( tangents[ i - 1 ], tangents[ i ] ); + + if ( vec.length() > Number.EPSILON ) { + + vec.normalize(); + + const theta = Math.acos( clamp( tangents[ i - 1 ].dot( tangents[ i ] ), - 1, 1 ) ); // clamp for floating pt errors + + normals[ i ].applyMatrix4( mat.makeRotationAxis( vec, theta ) ); + + } + + binormals[ i ].crossVectors( tangents[ i ], normals[ i ] ); + + } + + // if the curve is closed, postprocess the vectors so the first and last normal vectors are the same + + if ( closed === true ) { + + let theta = Math.acos( clamp( normals[ 0 ].dot( normals[ segments ] ), - 1, 1 ) ); + theta /= segments; + + if ( tangents[ 0 ].dot( vec.crossVectors( normals[ 0 ], normals[ segments ] ) ) > 0 ) { + + theta = - theta; + + } + + for ( let i = 1; i <= segments; i ++ ) { + + // twist a little... + normals[ i ].applyMatrix4( mat.makeRotationAxis( tangents[ i ], theta * i ) ); + binormals[ i ].crossVectors( tangents[ i ], normals[ i ] ); + + } + + } + + return { + tangents: tangents, + normals: normals, + binormals: binormals + }; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( source ) { + + this.arcLengthDivisions = source.arcLengthDivisions; + + return this; + + } + + toJSON() { + + const data = { + metadata: { + version: 4.6, + type: 'Curve', + generator: 'Curve.toJSON' + } + }; + + data.arcLengthDivisions = this.arcLengthDivisions; + data.type = this.type; + + return data; + + } + + fromJSON( json ) { + + this.arcLengthDivisions = json.arcLengthDivisions; + + return this; + + } + +} + +class EllipseCurve extends Curve { + + constructor( aX = 0, aY = 0, xRadius = 1, yRadius = 1, aStartAngle = 0, aEndAngle = Math.PI * 2, aClockwise = false, aRotation = 0 ) { + + super(); + + this.isEllipseCurve = true; + + this.type = 'EllipseCurve'; + + this.aX = aX; + this.aY = aY; + + this.xRadius = xRadius; + this.yRadius = yRadius; + + this.aStartAngle = aStartAngle; + this.aEndAngle = aEndAngle; + + this.aClockwise = aClockwise; + + this.aRotation = aRotation; + + } + + getPoint( t, optionalTarget = new Vector2() ) { + + const point = optionalTarget; + + const twoPi = Math.PI * 2; + let deltaAngle = this.aEndAngle - this.aStartAngle; + const samePoints = Math.abs( deltaAngle ) < Number.EPSILON; + + // ensures that deltaAngle is 0 .. 2 PI + while ( deltaAngle < 0 ) deltaAngle += twoPi; + while ( deltaAngle > twoPi ) deltaAngle -= twoPi; + + if ( deltaAngle < Number.EPSILON ) { + + if ( samePoints ) { + + deltaAngle = 0; + + } else { + + deltaAngle = twoPi; + + } + + } + + if ( this.aClockwise === true && ! samePoints ) { + + if ( deltaAngle === twoPi ) { + + deltaAngle = - twoPi; + + } else { + + deltaAngle = deltaAngle - twoPi; + + } + + } + + const angle = this.aStartAngle + t * deltaAngle; + let x = this.aX + this.xRadius * Math.cos( angle ); + let y = this.aY + this.yRadius * Math.sin( angle ); + + if ( this.aRotation !== 0 ) { + + const cos = Math.cos( this.aRotation ); + const sin = Math.sin( this.aRotation ); + + const tx = x - this.aX; + const ty = y - this.aY; + + // Rotate the point about the center of the ellipse. + x = tx * cos - ty * sin + this.aX; + y = tx * sin + ty * cos + this.aY; + + } + + return point.set( x, y ); + + } + + copy( source ) { + + super.copy( source ); + + this.aX = source.aX; + this.aY = source.aY; + + this.xRadius = source.xRadius; + this.yRadius = source.yRadius; + + this.aStartAngle = source.aStartAngle; + this.aEndAngle = source.aEndAngle; + + this.aClockwise = source.aClockwise; + + this.aRotation = source.aRotation; + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.aX = this.aX; + data.aY = this.aY; + + data.xRadius = this.xRadius; + data.yRadius = this.yRadius; + + data.aStartAngle = this.aStartAngle; + data.aEndAngle = this.aEndAngle; + + data.aClockwise = this.aClockwise; + + data.aRotation = this.aRotation; + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.aX = json.aX; + this.aY = json.aY; + + this.xRadius = json.xRadius; + this.yRadius = json.yRadius; + + this.aStartAngle = json.aStartAngle; + this.aEndAngle = json.aEndAngle; + + this.aClockwise = json.aClockwise; + + this.aRotation = json.aRotation; + + return this; + + } + +} + +class ArcCurve extends EllipseCurve { + + constructor( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) { + + super( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise ); + + this.isArcCurve = true; + + this.type = 'ArcCurve'; + + } + +} + +/** + * Centripetal CatmullRom Curve - which is useful for avoiding + * cusps and self-intersections in non-uniform catmull rom curves. + * http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf + * + * curve.type accepts centripetal(default), chordal and catmullrom + * curve.tension is used for catmullrom which defaults to 0.5 + */ + + +/* +Based on an optimized c++ solution in + - http://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/ + - http://ideone.com/NoEbVM + +This CubicPoly class could be used for reusing some variables and calculations, +but for three.js curve use, it could be possible inlined and flatten into a single function call +which can be placed in CurveUtils. +*/ + +function CubicPoly() { + + let c0 = 0, c1 = 0, c2 = 0, c3 = 0; + + /* + * Compute coefficients for a cubic polynomial + * p(s) = c0 + c1*s + c2*s^2 + c3*s^3 + * such that + * p(0) = x0, p(1) = x1 + * and + * p'(0) = t0, p'(1) = t1. + */ + function init( x0, x1, t0, t1 ) { + + c0 = x0; + c1 = t0; + c2 = - 3 * x0 + 3 * x1 - 2 * t0 - t1; + c3 = 2 * x0 - 2 * x1 + t0 + t1; + + } + + return { + + initCatmullRom: function ( x0, x1, x2, x3, tension ) { + + init( x1, x2, tension * ( x2 - x0 ), tension * ( x3 - x1 ) ); + + }, + + initNonuniformCatmullRom: function ( x0, x1, x2, x3, dt0, dt1, dt2 ) { + + // compute tangents when parameterized in [t1,t2] + let t1 = ( x1 - x0 ) / dt0 - ( x2 - x0 ) / ( dt0 + dt1 ) + ( x2 - x1 ) / dt1; + let t2 = ( x2 - x1 ) / dt1 - ( x3 - x1 ) / ( dt1 + dt2 ) + ( x3 - x2 ) / dt2; + + // rescale tangents for parametrization in [0,1] + t1 *= dt1; + t2 *= dt1; + + init( x1, x2, t1, t2 ); + + }, + + calc: function ( t ) { + + const t2 = t * t; + const t3 = t2 * t; + return c0 + c1 * t + c2 * t2 + c3 * t3; + + } + + }; + +} + +// + +const tmp = /*@__PURE__*/ new Vector3(); +const px = /*@__PURE__*/ new CubicPoly(); +const py = /*@__PURE__*/ new CubicPoly(); +const pz = /*@__PURE__*/ new CubicPoly(); + +class CatmullRomCurve3 extends Curve { + + constructor( points = [], closed = false, curveType = 'centripetal', tension = 0.5 ) { + + super(); + + this.isCatmullRomCurve3 = true; + + this.type = 'CatmullRomCurve3'; + + this.points = points; + this.closed = closed; + this.curveType = curveType; + this.tension = tension; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + const points = this.points; + const l = points.length; + + const p = ( l - ( this.closed ? 0 : 1 ) ) * t; + let intPoint = Math.floor( p ); + let weight = p - intPoint; + + if ( this.closed ) { + + intPoint += intPoint > 0 ? 0 : ( Math.floor( Math.abs( intPoint ) / l ) + 1 ) * l; + + } else if ( weight === 0 && intPoint === l - 1 ) { + + intPoint = l - 2; + weight = 1; + + } + + let p0, p3; // 4 points (p1 & p2 defined below) + + if ( this.closed || intPoint > 0 ) { + + p0 = points[ ( intPoint - 1 ) % l ]; + + } else { + + // extrapolate first point + tmp.subVectors( points[ 0 ], points[ 1 ] ).add( points[ 0 ] ); + p0 = tmp; + + } + + const p1 = points[ intPoint % l ]; + const p2 = points[ ( intPoint + 1 ) % l ]; + + if ( this.closed || intPoint + 2 < l ) { + + p3 = points[ ( intPoint + 2 ) % l ]; + + } else { + + // extrapolate last point + tmp.subVectors( points[ l - 1 ], points[ l - 2 ] ).add( points[ l - 1 ] ); + p3 = tmp; + + } + + if ( this.curveType === 'centripetal' || this.curveType === 'chordal' ) { + + // init Centripetal / Chordal Catmull-Rom + const pow = this.curveType === 'chordal' ? 0.5 : 0.25; + let dt0 = Math.pow( p0.distanceToSquared( p1 ), pow ); + let dt1 = Math.pow( p1.distanceToSquared( p2 ), pow ); + let dt2 = Math.pow( p2.distanceToSquared( p3 ), pow ); + + // safety check for repeated points + if ( dt1 < 1e-4 ) dt1 = 1.0; + if ( dt0 < 1e-4 ) dt0 = dt1; + if ( dt2 < 1e-4 ) dt2 = dt1; + + px.initNonuniformCatmullRom( p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2 ); + py.initNonuniformCatmullRom( p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2 ); + pz.initNonuniformCatmullRom( p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2 ); + + } else if ( this.curveType === 'catmullrom' ) { + + px.initCatmullRom( p0.x, p1.x, p2.x, p3.x, this.tension ); + py.initCatmullRom( p0.y, p1.y, p2.y, p3.y, this.tension ); + pz.initCatmullRom( p0.z, p1.z, p2.z, p3.z, this.tension ); + + } + + point.set( + px.calc( weight ), + py.calc( weight ), + pz.calc( weight ) + ); + + return point; + + } + + copy( source ) { + + super.copy( source ); + + this.points = []; + + for ( let i = 0, l = source.points.length; i < l; i ++ ) { + + const point = source.points[ i ]; + + this.points.push( point.clone() ); + + } + + this.closed = source.closed; + this.curveType = source.curveType; + this.tension = source.tension; + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.points = []; + + for ( let i = 0, l = this.points.length; i < l; i ++ ) { + + const point = this.points[ i ]; + data.points.push( point.toArray() ); + + } + + data.closed = this.closed; + data.curveType = this.curveType; + data.tension = this.tension; + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.points = []; + + for ( let i = 0, l = json.points.length; i < l; i ++ ) { + + const point = json.points[ i ]; + this.points.push( new Vector3().fromArray( point ) ); + + } + + this.closed = json.closed; + this.curveType = json.curveType; + this.tension = json.tension; + + return this; + + } + +} + +/** + * Bezier Curves formulas obtained from + * https://en.wikipedia.org/wiki/B%C3%A9zier_curve + */ + +function CatmullRom( t, p0, p1, p2, p3 ) { + + const v0 = ( p2 - p0 ) * 0.5; + const v1 = ( p3 - p1 ) * 0.5; + const t2 = t * t; + const t3 = t * t2; + return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( - 3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1; + +} + +// + +function QuadraticBezierP0( t, p ) { + + const k = 1 - t; + return k * k * p; + +} + +function QuadraticBezierP1( t, p ) { + + return 2 * ( 1 - t ) * t * p; + +} + +function QuadraticBezierP2( t, p ) { + + return t * t * p; + +} + +function QuadraticBezier( t, p0, p1, p2 ) { + + return QuadraticBezierP0( t, p0 ) + QuadraticBezierP1( t, p1 ) + + QuadraticBezierP2( t, p2 ); + +} + +// + +function CubicBezierP0( t, p ) { + + const k = 1 - t; + return k * k * k * p; + +} + +function CubicBezierP1( t, p ) { + + const k = 1 - t; + return 3 * k * k * t * p; + +} + +function CubicBezierP2( t, p ) { + + return 3 * ( 1 - t ) * t * t * p; + +} + +function CubicBezierP3( t, p ) { + + return t * t * t * p; + +} + +function CubicBezier( t, p0, p1, p2, p3 ) { + + return CubicBezierP0( t, p0 ) + CubicBezierP1( t, p1 ) + CubicBezierP2( t, p2 ) + + CubicBezierP3( t, p3 ); + +} + +class CubicBezierCurve extends Curve { + + constructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2(), v3 = new Vector2() ) { + + super(); + + this.isCubicBezierCurve = true; + + this.type = 'CubicBezierCurve'; + + this.v0 = v0; + this.v1 = v1; + this.v2 = v2; + this.v3 = v3; + + } + + getPoint( t, optionalTarget = new Vector2() ) { + + const point = optionalTarget; + + const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3; + + point.set( + CubicBezier( t, v0.x, v1.x, v2.x, v3.x ), + CubicBezier( t, v0.y, v1.y, v2.y, v3.y ) + ); + + return point; + + } + + copy( source ) { + + super.copy( source ); + + this.v0.copy( source.v0 ); + this.v1.copy( source.v1 ); + this.v2.copy( source.v2 ); + this.v3.copy( source.v3 ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.v0 = this.v0.toArray(); + data.v1 = this.v1.toArray(); + data.v2 = this.v2.toArray(); + data.v3 = this.v3.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.v0.fromArray( json.v0 ); + this.v1.fromArray( json.v1 ); + this.v2.fromArray( json.v2 ); + this.v3.fromArray( json.v3 ); + + return this; + + } + +} + +class CubicBezierCurve3 extends Curve { + + constructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3() ) { + + super(); + + this.isCubicBezierCurve3 = true; + + this.type = 'CubicBezierCurve3'; + + this.v0 = v0; + this.v1 = v1; + this.v2 = v2; + this.v3 = v3; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3; + + point.set( + CubicBezier( t, v0.x, v1.x, v2.x, v3.x ), + CubicBezier( t, v0.y, v1.y, v2.y, v3.y ), + CubicBezier( t, v0.z, v1.z, v2.z, v3.z ) + ); + + return point; + + } + + copy( source ) { + + super.copy( source ); + + this.v0.copy( source.v0 ); + this.v1.copy( source.v1 ); + this.v2.copy( source.v2 ); + this.v3.copy( source.v3 ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.v0 = this.v0.toArray(); + data.v1 = this.v1.toArray(); + data.v2 = this.v2.toArray(); + data.v3 = this.v3.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.v0.fromArray( json.v0 ); + this.v1.fromArray( json.v1 ); + this.v2.fromArray( json.v2 ); + this.v3.fromArray( json.v3 ); + + return this; + + } + +} + +class LineCurve extends Curve { + + constructor( v1 = new Vector2(), v2 = new Vector2() ) { + + super(); + + this.isLineCurve = true; + + this.type = 'LineCurve'; + + this.v1 = v1; + this.v2 = v2; + + } + + getPoint( t, optionalTarget = new Vector2() ) { + + const point = optionalTarget; + + if ( t === 1 ) { + + point.copy( this.v2 ); + + } else { + + point.copy( this.v2 ).sub( this.v1 ); + point.multiplyScalar( t ).add( this.v1 ); + + } + + return point; + + } + + // Line curve is linear, so we can overwrite default getPointAt + getPointAt( u, optionalTarget ) { + + return this.getPoint( u, optionalTarget ); + + } + + getTangent( t, optionalTarget = new Vector2() ) { + + return optionalTarget.subVectors( this.v2, this.v1 ).normalize(); + + } + + getTangentAt( u, optionalTarget ) { + + return this.getTangent( u, optionalTarget ); + + } + + copy( source ) { + + super.copy( source ); + + this.v1.copy( source.v1 ); + this.v2.copy( source.v2 ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.v1 = this.v1.toArray(); + data.v2 = this.v2.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.v1.fromArray( json.v1 ); + this.v2.fromArray( json.v2 ); + + return this; + + } + +} + +class LineCurve3 extends Curve { + + constructor( v1 = new Vector3(), v2 = new Vector3() ) { + + super(); + + this.isLineCurve3 = true; + + this.type = 'LineCurve3'; + + this.v1 = v1; + this.v2 = v2; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + if ( t === 1 ) { + + point.copy( this.v2 ); + + } else { + + point.copy( this.v2 ).sub( this.v1 ); + point.multiplyScalar( t ).add( this.v1 ); + + } + + return point; + + } + + // Line curve is linear, so we can overwrite default getPointAt + getPointAt( u, optionalTarget ) { + + return this.getPoint( u, optionalTarget ); + + } + + getTangent( t, optionalTarget = new Vector3() ) { + + return optionalTarget.subVectors( this.v2, this.v1 ).normalize(); + + } + + getTangentAt( u, optionalTarget ) { + + return this.getTangent( u, optionalTarget ); + + } + + copy( source ) { + + super.copy( source ); + + this.v1.copy( source.v1 ); + this.v2.copy( source.v2 ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.v1 = this.v1.toArray(); + data.v2 = this.v2.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.v1.fromArray( json.v1 ); + this.v2.fromArray( json.v2 ); + + return this; + + } + +} + +class QuadraticBezierCurve extends Curve { + + constructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2() ) { + + super(); + + this.isQuadraticBezierCurve = true; + + this.type = 'QuadraticBezierCurve'; + + this.v0 = v0; + this.v1 = v1; + this.v2 = v2; + + } + + getPoint( t, optionalTarget = new Vector2() ) { + + const point = optionalTarget; + + const v0 = this.v0, v1 = this.v1, v2 = this.v2; + + point.set( + QuadraticBezier( t, v0.x, v1.x, v2.x ), + QuadraticBezier( t, v0.y, v1.y, v2.y ) + ); + + return point; + + } + + copy( source ) { + + super.copy( source ); + + this.v0.copy( source.v0 ); + this.v1.copy( source.v1 ); + this.v2.copy( source.v2 ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.v0 = this.v0.toArray(); + data.v1 = this.v1.toArray(); + data.v2 = this.v2.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.v0.fromArray( json.v0 ); + this.v1.fromArray( json.v1 ); + this.v2.fromArray( json.v2 ); + + return this; + + } + +} + +class QuadraticBezierCurve3 extends Curve { + + constructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3() ) { + + super(); + + this.isQuadraticBezierCurve3 = true; + + this.type = 'QuadraticBezierCurve3'; + + this.v0 = v0; + this.v1 = v1; + this.v2 = v2; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + const v0 = this.v0, v1 = this.v1, v2 = this.v2; + + point.set( + QuadraticBezier( t, v0.x, v1.x, v2.x ), + QuadraticBezier( t, v0.y, v1.y, v2.y ), + QuadraticBezier( t, v0.z, v1.z, v2.z ) + ); + + return point; + + } + + copy( source ) { + + super.copy( source ); + + this.v0.copy( source.v0 ); + this.v1.copy( source.v1 ); + this.v2.copy( source.v2 ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.v0 = this.v0.toArray(); + data.v1 = this.v1.toArray(); + data.v2 = this.v2.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.v0.fromArray( json.v0 ); + this.v1.fromArray( json.v1 ); + this.v2.fromArray( json.v2 ); + + return this; + + } + +} + +class SplineCurve extends Curve { + + constructor( points = [] ) { + + super(); + + this.isSplineCurve = true; + + this.type = 'SplineCurve'; + + this.points = points; + + } + + getPoint( t, optionalTarget = new Vector2() ) { + + const point = optionalTarget; + + const points = this.points; + const p = ( points.length - 1 ) * t; + + const intPoint = Math.floor( p ); + const weight = p - intPoint; + + const p0 = points[ intPoint === 0 ? intPoint : intPoint - 1 ]; + const p1 = points[ intPoint ]; + const p2 = points[ intPoint > points.length - 2 ? points.length - 1 : intPoint + 1 ]; + const p3 = points[ intPoint > points.length - 3 ? points.length - 1 : intPoint + 2 ]; + + point.set( + CatmullRom( weight, p0.x, p1.x, p2.x, p3.x ), + CatmullRom( weight, p0.y, p1.y, p2.y, p3.y ) + ); + + return point; + + } + + copy( source ) { + + super.copy( source ); + + this.points = []; + + for ( let i = 0, l = source.points.length; i < l; i ++ ) { + + const point = source.points[ i ]; + + this.points.push( point.clone() ); + + } + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.points = []; + + for ( let i = 0, l = this.points.length; i < l; i ++ ) { + + const point = this.points[ i ]; + data.points.push( point.toArray() ); + + } + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.points = []; + + for ( let i = 0, l = json.points.length; i < l; i ++ ) { + + const point = json.points[ i ]; + this.points.push( new Vector2().fromArray( point ) ); + + } + + return this; + + } + +} + +var Curves = /*#__PURE__*/Object.freeze({ + __proto__: null, + ArcCurve: ArcCurve, + CatmullRomCurve3: CatmullRomCurve3, + CubicBezierCurve: CubicBezierCurve, + CubicBezierCurve3: CubicBezierCurve3, + EllipseCurve: EllipseCurve, + LineCurve: LineCurve, + LineCurve3: LineCurve3, + QuadraticBezierCurve: QuadraticBezierCurve, + QuadraticBezierCurve3: QuadraticBezierCurve3, + SplineCurve: SplineCurve +}); + +/************************************************************** + * Curved Path - a curve path is simply a array of connected + * curves, but retains the api of a curve + **************************************************************/ + +class CurvePath extends Curve { + + constructor() { + + super(); + + this.type = 'CurvePath'; + + this.curves = []; + this.autoClose = false; // Automatically closes the path + + } + + add( curve ) { + + this.curves.push( curve ); + + } + + closePath() { + + // Add a line curve if start and end of lines are not connected + const startPoint = this.curves[ 0 ].getPoint( 0 ); + const endPoint = this.curves[ this.curves.length - 1 ].getPoint( 1 ); + + if ( ! startPoint.equals( endPoint ) ) { + + const lineType = ( startPoint.isVector2 === true ) ? 'LineCurve' : 'LineCurve3'; + this.curves.push( new Curves[ lineType ]( endPoint, startPoint ) ); + + } + + return this; + + } + + // To get accurate point with reference to + // entire path distance at time t, + // following has to be done: + + // 1. Length of each sub path have to be known + // 2. Locate and identify type of curve + // 3. Get t for the curve + // 4. Return curve.getPointAt(t') + + getPoint( t, optionalTarget ) { + + const d = t * this.getLength(); + const curveLengths = this.getCurveLengths(); + let i = 0; + + // To think about boundaries points. + + while ( i < curveLengths.length ) { + + if ( curveLengths[ i ] >= d ) { + + const diff = curveLengths[ i ] - d; + const curve = this.curves[ i ]; + + const segmentLength = curve.getLength(); + const u = segmentLength === 0 ? 0 : 1 - diff / segmentLength; + + return curve.getPointAt( u, optionalTarget ); + + } + + i ++; + + } + + return null; + + // loop where sum != 0, sum > d , sum+1 1 && ! points[ points.length - 1 ].equals( points[ 0 ] ) ) { + + points.push( points[ 0 ] ); + + } + + return points; + + } + + copy( source ) { + + super.copy( source ); + + this.curves = []; + + for ( let i = 0, l = source.curves.length; i < l; i ++ ) { + + const curve = source.curves[ i ]; + + this.curves.push( curve.clone() ); + + } + + this.autoClose = source.autoClose; + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.autoClose = this.autoClose; + data.curves = []; + + for ( let i = 0, l = this.curves.length; i < l; i ++ ) { + + const curve = this.curves[ i ]; + data.curves.push( curve.toJSON() ); + + } + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.autoClose = json.autoClose; + this.curves = []; + + for ( let i = 0, l = json.curves.length; i < l; i ++ ) { + + const curve = json.curves[ i ]; + this.curves.push( new Curves[ curve.type ]().fromJSON( curve ) ); + + } + + return this; + + } + +} + +class Path extends CurvePath { + + constructor( points ) { + + super(); + + this.type = 'Path'; + + this.currentPoint = new Vector2(); + + if ( points ) { + + this.setFromPoints( points ); + + } + + } + + setFromPoints( points ) { + + this.moveTo( points[ 0 ].x, points[ 0 ].y ); + + for ( let i = 1, l = points.length; i < l; i ++ ) { + + this.lineTo( points[ i ].x, points[ i ].y ); + + } + + return this; + + } + + moveTo( x, y ) { + + this.currentPoint.set( x, y ); // TODO consider referencing vectors instead of copying? + + return this; + + } + + lineTo( x, y ) { + + const curve = new LineCurve( this.currentPoint.clone(), new Vector2( x, y ) ); + this.curves.push( curve ); + + this.currentPoint.set( x, y ); + + return this; + + } + + quadraticCurveTo( aCPx, aCPy, aX, aY ) { + + const curve = new QuadraticBezierCurve( + this.currentPoint.clone(), + new Vector2( aCPx, aCPy ), + new Vector2( aX, aY ) + ); + + this.curves.push( curve ); + + this.currentPoint.set( aX, aY ); + + return this; + + } + + bezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) { + + const curve = new CubicBezierCurve( + this.currentPoint.clone(), + new Vector2( aCP1x, aCP1y ), + new Vector2( aCP2x, aCP2y ), + new Vector2( aX, aY ) + ); + + this.curves.push( curve ); + + this.currentPoint.set( aX, aY ); + + return this; + + } + + splineThru( pts /*Array of Vector*/ ) { + + const npts = [ this.currentPoint.clone() ].concat( pts ); + + const curve = new SplineCurve( npts ); + this.curves.push( curve ); + + this.currentPoint.copy( pts[ pts.length - 1 ] ); + + return this; + + } + + arc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) { + + const x0 = this.currentPoint.x; + const y0 = this.currentPoint.y; + + this.absarc( aX + x0, aY + y0, aRadius, + aStartAngle, aEndAngle, aClockwise ); + + return this; + + } + + absarc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) { + + this.absellipse( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise ); + + return this; + + } + + ellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) { + + const x0 = this.currentPoint.x; + const y0 = this.currentPoint.y; + + this.absellipse( aX + x0, aY + y0, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ); + + return this; + + } + + absellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) { + + const curve = new EllipseCurve( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ); + + if ( this.curves.length > 0 ) { + + // if a previous curve is present, attempt to join + const firstPoint = curve.getPoint( 0 ); + + if ( ! firstPoint.equals( this.currentPoint ) ) { + + this.lineTo( firstPoint.x, firstPoint.y ); + + } + + } + + this.curves.push( curve ); + + const lastPoint = curve.getPoint( 1 ); + this.currentPoint.copy( lastPoint ); + + return this; + + } + + copy( source ) { + + super.copy( source ); + + this.currentPoint.copy( source.currentPoint ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.currentPoint = this.currentPoint.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.currentPoint.fromArray( json.currentPoint ); + + return this; + + } + +} + +class LatheGeometry extends BufferGeometry { + + constructor( points = [ new Vector2( 0, - 0.5 ), new Vector2( 0.5, 0 ), new Vector2( 0, 0.5 ) ], segments = 12, phiStart = 0, phiLength = Math.PI * 2 ) { + + super(); + + this.type = 'LatheGeometry'; + + this.parameters = { + points: points, + segments: segments, + phiStart: phiStart, + phiLength: phiLength + }; + + segments = Math.floor( segments ); + + // clamp phiLength so it's in range of [ 0, 2PI ] + + phiLength = clamp( phiLength, 0, Math.PI * 2 ); + + // buffers + + const indices = []; + const vertices = []; + const uvs = []; + const initNormals = []; + const normals = []; + + // helper variables + + const inverseSegments = 1.0 / segments; + const vertex = new Vector3(); + const uv = new Vector2(); + const normal = new Vector3(); + const curNormal = new Vector3(); + const prevNormal = new Vector3(); + let dx = 0; + let dy = 0; + + // pre-compute normals for initial "meridian" + + for ( let j = 0; j <= ( points.length - 1 ); j ++ ) { + + switch ( j ) { + + case 0: // special handling for 1st vertex on path + + dx = points[ j + 1 ].x - points[ j ].x; + dy = points[ j + 1 ].y - points[ j ].y; + + normal.x = dy * 1.0; + normal.y = - dx; + normal.z = dy * 0.0; + + prevNormal.copy( normal ); + + normal.normalize(); + + initNormals.push( normal.x, normal.y, normal.z ); + + break; + + case ( points.length - 1 ): // special handling for last Vertex on path + + initNormals.push( prevNormal.x, prevNormal.y, prevNormal.z ); + + break; + + default: // default handling for all vertices in between + + dx = points[ j + 1 ].x - points[ j ].x; + dy = points[ j + 1 ].y - points[ j ].y; + + normal.x = dy * 1.0; + normal.y = - dx; + normal.z = dy * 0.0; + + curNormal.copy( normal ); + + normal.x += prevNormal.x; + normal.y += prevNormal.y; + normal.z += prevNormal.z; + + normal.normalize(); + + initNormals.push( normal.x, normal.y, normal.z ); + + prevNormal.copy( curNormal ); + + } + + } + + // generate vertices, uvs and normals + + for ( let i = 0; i <= segments; i ++ ) { + + const phi = phiStart + i * inverseSegments * phiLength; + + const sin = Math.sin( phi ); + const cos = Math.cos( phi ); + + for ( let j = 0; j <= ( points.length - 1 ); j ++ ) { + + // vertex + + vertex.x = points[ j ].x * sin; + vertex.y = points[ j ].y; + vertex.z = points[ j ].x * cos; + + vertices.push( vertex.x, vertex.y, vertex.z ); + + // uv + + uv.x = i / segments; + uv.y = j / ( points.length - 1 ); + + uvs.push( uv.x, uv.y ); + + // normal + + const x = initNormals[ 3 * j + 0 ] * sin; + const y = initNormals[ 3 * j + 1 ]; + const z = initNormals[ 3 * j + 0 ] * cos; + + normals.push( x, y, z ); + + } + + } + + // indices + + for ( let i = 0; i < segments; i ++ ) { + + for ( let j = 0; j < ( points.length - 1 ); j ++ ) { + + const base = j + i * points.length; + + const a = base; + const b = base + points.length; + const c = base + points.length + 1; + const d = base + 1; + + // faces + + indices.push( a, b, d ); + indices.push( c, d, b ); + + } + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new LatheGeometry( data.points, data.segments, data.phiStart, data.phiLength ); + + } + +} + +class CapsuleGeometry extends LatheGeometry { + + constructor( radius = 1, length = 1, capSegments = 4, radialSegments = 8 ) { + + const path = new Path(); + path.absarc( 0, - length / 2, radius, Math.PI * 1.5, 0 ); + path.absarc( 0, length / 2, radius, 0, Math.PI * 0.5 ); + + super( path.getPoints( capSegments ), radialSegments ); + + this.type = 'CapsuleGeometry'; + + this.parameters = { + radius: radius, + length: length, + capSegments: capSegments, + radialSegments: radialSegments, + }; + + } + + static fromJSON( data ) { + + return new CapsuleGeometry( data.radius, data.length, data.capSegments, data.radialSegments ); + + } + +} + +class CircleGeometry extends BufferGeometry { + + constructor( radius = 1, segments = 32, thetaStart = 0, thetaLength = Math.PI * 2 ) { + + super(); + + this.type = 'CircleGeometry'; + + this.parameters = { + radius: radius, + segments: segments, + thetaStart: thetaStart, + thetaLength: thetaLength + }; + + segments = Math.max( 3, segments ); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // helper variables + + const vertex = new Vector3(); + const uv = new Vector2(); + + // center point + + vertices.push( 0, 0, 0 ); + normals.push( 0, 0, 1 ); + uvs.push( 0.5, 0.5 ); + + for ( let s = 0, i = 3; s <= segments; s ++, i += 3 ) { + + const segment = thetaStart + s / segments * thetaLength; + + // vertex + + vertex.x = radius * Math.cos( segment ); + vertex.y = radius * Math.sin( segment ); + + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal + + normals.push( 0, 0, 1 ); + + // uvs + + uv.x = ( vertices[ i ] / radius + 1 ) / 2; + uv.y = ( vertices[ i + 1 ] / radius + 1 ) / 2; + + uvs.push( uv.x, uv.y ); + + } + + // indices + + for ( let i = 1; i <= segments; i ++ ) { + + indices.push( i, i + 1, 0 ); + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new CircleGeometry( data.radius, data.segments, data.thetaStart, data.thetaLength ); + + } + +} + +class CylinderGeometry extends BufferGeometry { + + constructor( radiusTop = 1, radiusBottom = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) { + + super(); + + this.type = 'CylinderGeometry'; + + this.parameters = { + radiusTop: radiusTop, + radiusBottom: radiusBottom, + height: height, + radialSegments: radialSegments, + heightSegments: heightSegments, + openEnded: openEnded, + thetaStart: thetaStart, + thetaLength: thetaLength + }; + + const scope = this; + + radialSegments = Math.floor( radialSegments ); + heightSegments = Math.floor( heightSegments ); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // helper variables + + let index = 0; + const indexArray = []; + const halfHeight = height / 2; + let groupStart = 0; + + // generate geometry + + generateTorso(); + + if ( openEnded === false ) { + + if ( radiusTop > 0 ) generateCap( true ); + if ( radiusBottom > 0 ) generateCap( false ); + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + function generateTorso() { + + const normal = new Vector3(); + const vertex = new Vector3(); + + let groupCount = 0; + + // this will be used to calculate the normal + const slope = ( radiusBottom - radiusTop ) / height; + + // generate vertices, normals and uvs + + for ( let y = 0; y <= heightSegments; y ++ ) { + + const indexRow = []; + + const v = y / heightSegments; + + // calculate the radius of the current row + + const radius = v * ( radiusBottom - radiusTop ) + radiusTop; + + for ( let x = 0; x <= radialSegments; x ++ ) { + + const u = x / radialSegments; + + const theta = u * thetaLength + thetaStart; + + const sinTheta = Math.sin( theta ); + const cosTheta = Math.cos( theta ); + + // vertex + + vertex.x = radius * sinTheta; + vertex.y = - v * height + halfHeight; + vertex.z = radius * cosTheta; + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal + + normal.set( sinTheta, slope, cosTheta ).normalize(); + normals.push( normal.x, normal.y, normal.z ); + + // uv + + uvs.push( u, 1 - v ); + + // save index of vertex in respective row + + indexRow.push( index ++ ); + + } + + // now save vertices of the row in our index array + + indexArray.push( indexRow ); + + } + + // generate indices + + for ( let x = 0; x < radialSegments; x ++ ) { + + for ( let y = 0; y < heightSegments; y ++ ) { + + // we use the index array to access the correct indices + + const a = indexArray[ y ][ x ]; + const b = indexArray[ y + 1 ][ x ]; + const c = indexArray[ y + 1 ][ x + 1 ]; + const d = indexArray[ y ][ x + 1 ]; + + // faces + + indices.push( a, b, d ); + indices.push( b, c, d ); + + // update group counter + + groupCount += 6; + + } + + } + + // add a group to the geometry. this will ensure multi material support + + scope.addGroup( groupStart, groupCount, 0 ); + + // calculate new start value for groups + + groupStart += groupCount; + + } + + function generateCap( top ) { + + // save the index of the first center vertex + const centerIndexStart = index; + + const uv = new Vector2(); + const vertex = new Vector3(); + + let groupCount = 0; + + const radius = ( top === true ) ? radiusTop : radiusBottom; + const sign = ( top === true ) ? 1 : - 1; + + // first we generate the center vertex data of the cap. + // because the geometry needs one set of uvs per face, + // we must generate a center vertex per face/segment + + for ( let x = 1; x <= radialSegments; x ++ ) { + + // vertex + + vertices.push( 0, halfHeight * sign, 0 ); + + // normal + + normals.push( 0, sign, 0 ); + + // uv + + uvs.push( 0.5, 0.5 ); + + // increase index + + index ++; + + } + + // save the index of the last center vertex + const centerIndexEnd = index; + + // now we generate the surrounding vertices, normals and uvs + + for ( let x = 0; x <= radialSegments; x ++ ) { + + const u = x / radialSegments; + const theta = u * thetaLength + thetaStart; + + const cosTheta = Math.cos( theta ); + const sinTheta = Math.sin( theta ); + + // vertex + + vertex.x = radius * sinTheta; + vertex.y = halfHeight * sign; + vertex.z = radius * cosTheta; + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal + + normals.push( 0, sign, 0 ); + + // uv + + uv.x = ( cosTheta * 0.5 ) + 0.5; + uv.y = ( sinTheta * 0.5 * sign ) + 0.5; + uvs.push( uv.x, uv.y ); + + // increase index + + index ++; + + } + + // generate indices + + for ( let x = 0; x < radialSegments; x ++ ) { + + const c = centerIndexStart + x; + const i = centerIndexEnd + x; + + if ( top === true ) { + + // face top + + indices.push( i, i + 1, c ); + + } else { + + // face bottom + + indices.push( i + 1, i, c ); + + } + + groupCount += 3; + + } + + // add a group to the geometry. this will ensure multi material support + + scope.addGroup( groupStart, groupCount, top === true ? 1 : 2 ); + + // calculate new start value for groups + + groupStart += groupCount; + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new CylinderGeometry( data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength ); + + } + +} + +class ConeGeometry extends CylinderGeometry { + + constructor( radius = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) { + + super( 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ); + + this.type = 'ConeGeometry'; + + this.parameters = { + radius: radius, + height: height, + radialSegments: radialSegments, + heightSegments: heightSegments, + openEnded: openEnded, + thetaStart: thetaStart, + thetaLength: thetaLength + }; + + } + + static fromJSON( data ) { + + return new ConeGeometry( data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength ); + + } + +} + +class PolyhedronGeometry extends BufferGeometry { + + constructor( vertices = [], indices = [], radius = 1, detail = 0 ) { + + super(); + + this.type = 'PolyhedronGeometry'; + + this.parameters = { + vertices: vertices, + indices: indices, + radius: radius, + detail: detail + }; + + // default buffer data + + const vertexBuffer = []; + const uvBuffer = []; + + // the subdivision creates the vertex buffer data + + subdivide( detail ); + + // all vertices should lie on a conceptual sphere with a given radius + + applyRadius( radius ); + + // finally, create the uv data + + generateUVs(); + + // build non-indexed geometry + + this.setAttribute( 'position', new Float32BufferAttribute( vertexBuffer, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( vertexBuffer.slice(), 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvBuffer, 2 ) ); + + if ( detail === 0 ) { + + this.computeVertexNormals(); // flat normals + + } else { + + this.normalizeNormals(); // smooth normals + + } + + // helper functions + + function subdivide( detail ) { + + const a = new Vector3(); + const b = new Vector3(); + const c = new Vector3(); + + // iterate over all faces and apply a subdivision with the given detail value + + for ( let i = 0; i < indices.length; i += 3 ) { + + // get the vertices of the face + + getVertexByIndex( indices[ i + 0 ], a ); + getVertexByIndex( indices[ i + 1 ], b ); + getVertexByIndex( indices[ i + 2 ], c ); + + // perform subdivision + + subdivideFace( a, b, c, detail ); + + } + + } + + function subdivideFace( a, b, c, detail ) { + + const cols = detail + 1; + + // we use this multidimensional array as a data structure for creating the subdivision + + const v = []; + + // construct all of the vertices for this subdivision + + for ( let i = 0; i <= cols; i ++ ) { + + v[ i ] = []; + + const aj = a.clone().lerp( c, i / cols ); + const bj = b.clone().lerp( c, i / cols ); + + const rows = cols - i; + + for ( let j = 0; j <= rows; j ++ ) { + + if ( j === 0 && i === cols ) { + + v[ i ][ j ] = aj; + + } else { + + v[ i ][ j ] = aj.clone().lerp( bj, j / rows ); + + } + + } + + } + + // construct all of the faces + + for ( let i = 0; i < cols; i ++ ) { + + for ( let j = 0; j < 2 * ( cols - i ) - 1; j ++ ) { + + const k = Math.floor( j / 2 ); + + if ( j % 2 === 0 ) { + + pushVertex( v[ i ][ k + 1 ] ); + pushVertex( v[ i + 1 ][ k ] ); + pushVertex( v[ i ][ k ] ); + + } else { + + pushVertex( v[ i ][ k + 1 ] ); + pushVertex( v[ i + 1 ][ k + 1 ] ); + pushVertex( v[ i + 1 ][ k ] ); + + } + + } + + } + + } + + function applyRadius( radius ) { + + const vertex = new Vector3(); + + // iterate over the entire buffer and apply the radius to each vertex + + for ( let i = 0; i < vertexBuffer.length; i += 3 ) { + + vertex.x = vertexBuffer[ i + 0 ]; + vertex.y = vertexBuffer[ i + 1 ]; + vertex.z = vertexBuffer[ i + 2 ]; + + vertex.normalize().multiplyScalar( radius ); + + vertexBuffer[ i + 0 ] = vertex.x; + vertexBuffer[ i + 1 ] = vertex.y; + vertexBuffer[ i + 2 ] = vertex.z; + + } + + } + + function generateUVs() { + + const vertex = new Vector3(); + + for ( let i = 0; i < vertexBuffer.length; i += 3 ) { + + vertex.x = vertexBuffer[ i + 0 ]; + vertex.y = vertexBuffer[ i + 1 ]; + vertex.z = vertexBuffer[ i + 2 ]; + + const u = azimuth( vertex ) / 2 / Math.PI + 0.5; + const v = inclination( vertex ) / Math.PI + 0.5; + uvBuffer.push( u, 1 - v ); + + } + + correctUVs(); + + correctSeam(); + + } + + function correctSeam() { + + // handle case when face straddles the seam, see #3269 + + for ( let i = 0; i < uvBuffer.length; i += 6 ) { + + // uv data of a single face + + const x0 = uvBuffer[ i + 0 ]; + const x1 = uvBuffer[ i + 2 ]; + const x2 = uvBuffer[ i + 4 ]; + + const max = Math.max( x0, x1, x2 ); + const min = Math.min( x0, x1, x2 ); + + // 0.9 is somewhat arbitrary + + if ( max > 0.9 && min < 0.1 ) { + + if ( x0 < 0.2 ) uvBuffer[ i + 0 ] += 1; + if ( x1 < 0.2 ) uvBuffer[ i + 2 ] += 1; + if ( x2 < 0.2 ) uvBuffer[ i + 4 ] += 1; + + } + + } + + } + + function pushVertex( vertex ) { + + vertexBuffer.push( vertex.x, vertex.y, vertex.z ); + + } + + function getVertexByIndex( index, vertex ) { + + const stride = index * 3; + + vertex.x = vertices[ stride + 0 ]; + vertex.y = vertices[ stride + 1 ]; + vertex.z = vertices[ stride + 2 ]; + + } + + function correctUVs() { + + const a = new Vector3(); + const b = new Vector3(); + const c = new Vector3(); + + const centroid = new Vector3(); + + const uvA = new Vector2(); + const uvB = new Vector2(); + const uvC = new Vector2(); + + for ( let i = 0, j = 0; i < vertexBuffer.length; i += 9, j += 6 ) { + + a.set( vertexBuffer[ i + 0 ], vertexBuffer[ i + 1 ], vertexBuffer[ i + 2 ] ); + b.set( vertexBuffer[ i + 3 ], vertexBuffer[ i + 4 ], vertexBuffer[ i + 5 ] ); + c.set( vertexBuffer[ i + 6 ], vertexBuffer[ i + 7 ], vertexBuffer[ i + 8 ] ); + + uvA.set( uvBuffer[ j + 0 ], uvBuffer[ j + 1 ] ); + uvB.set( uvBuffer[ j + 2 ], uvBuffer[ j + 3 ] ); + uvC.set( uvBuffer[ j + 4 ], uvBuffer[ j + 5 ] ); + + centroid.copy( a ).add( b ).add( c ).divideScalar( 3 ); + + const azi = azimuth( centroid ); + + correctUV( uvA, j + 0, a, azi ); + correctUV( uvB, j + 2, b, azi ); + correctUV( uvC, j + 4, c, azi ); + + } + + } + + function correctUV( uv, stride, vector, azimuth ) { + + if ( ( azimuth < 0 ) && ( uv.x === 1 ) ) { + + uvBuffer[ stride ] = uv.x - 1; + + } + + if ( ( vector.x === 0 ) && ( vector.z === 0 ) ) { + + uvBuffer[ stride ] = azimuth / 2 / Math.PI + 0.5; + + } + + } + + // Angle around the Y axis, counter-clockwise when looking from above. + + function azimuth( vector ) { + + return Math.atan2( vector.z, - vector.x ); + + } + + + // Angle above the XZ plane. + + function inclination( vector ) { + + return Math.atan2( - vector.y, Math.sqrt( ( vector.x * vector.x ) + ( vector.z * vector.z ) ) ); + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new PolyhedronGeometry( data.vertices, data.indices, data.radius, data.details ); + + } + +} + +class DodecahedronGeometry extends PolyhedronGeometry { + + constructor( radius = 1, detail = 0 ) { + + const t = ( 1 + Math.sqrt( 5 ) ) / 2; + const r = 1 / t; + + const vertices = [ + + // (±1, ±1, ±1) + - 1, - 1, - 1, - 1, - 1, 1, + - 1, 1, - 1, - 1, 1, 1, + 1, - 1, - 1, 1, - 1, 1, + 1, 1, - 1, 1, 1, 1, + + // (0, ±1/φ, ±φ) + 0, - r, - t, 0, - r, t, + 0, r, - t, 0, r, t, + + // (±1/φ, ±φ, 0) + - r, - t, 0, - r, t, 0, + r, - t, 0, r, t, 0, + + // (±φ, 0, ±1/φ) + - t, 0, - r, t, 0, - r, + - t, 0, r, t, 0, r + ]; + + const indices = [ + 3, 11, 7, 3, 7, 15, 3, 15, 13, + 7, 19, 17, 7, 17, 6, 7, 6, 15, + 17, 4, 8, 17, 8, 10, 17, 10, 6, + 8, 0, 16, 8, 16, 2, 8, 2, 10, + 0, 12, 1, 0, 1, 18, 0, 18, 16, + 6, 10, 2, 6, 2, 13, 6, 13, 15, + 2, 16, 18, 2, 18, 3, 2, 3, 13, + 18, 1, 9, 18, 9, 11, 18, 11, 3, + 4, 14, 12, 4, 12, 0, 4, 0, 8, + 11, 9, 5, 11, 5, 19, 11, 19, 7, + 19, 5, 14, 19, 14, 4, 19, 4, 17, + 1, 12, 14, 1, 14, 5, 1, 5, 9 + ]; + + super( vertices, indices, radius, detail ); + + this.type = 'DodecahedronGeometry'; + + this.parameters = { + radius: radius, + detail: detail + }; + + } + + static fromJSON( data ) { + + return new DodecahedronGeometry( data.radius, data.detail ); + + } + +} + +const _v0 = /*@__PURE__*/ new Vector3(); +const _v1$1 = /*@__PURE__*/ new Vector3(); +const _normal = /*@__PURE__*/ new Vector3(); +const _triangle = /*@__PURE__*/ new Triangle(); + +class EdgesGeometry extends BufferGeometry { + + constructor( geometry = null, thresholdAngle = 1 ) { + + super(); + + this.type = 'EdgesGeometry'; + + this.parameters = { + geometry: geometry, + thresholdAngle: thresholdAngle + }; + + if ( geometry !== null ) { + + const precisionPoints = 4; + const precision = Math.pow( 10, precisionPoints ); + const thresholdDot = Math.cos( DEG2RAD * thresholdAngle ); + + const indexAttr = geometry.getIndex(); + const positionAttr = geometry.getAttribute( 'position' ); + const indexCount = indexAttr ? indexAttr.count : positionAttr.count; + + const indexArr = [ 0, 0, 0 ]; + const vertKeys = [ 'a', 'b', 'c' ]; + const hashes = new Array( 3 ); + + const edgeData = {}; + const vertices = []; + for ( let i = 0; i < indexCount; i += 3 ) { + + if ( indexAttr ) { + + indexArr[ 0 ] = indexAttr.getX( i ); + indexArr[ 1 ] = indexAttr.getX( i + 1 ); + indexArr[ 2 ] = indexAttr.getX( i + 2 ); + + } else { + + indexArr[ 0 ] = i; + indexArr[ 1 ] = i + 1; + indexArr[ 2 ] = i + 2; + + } + + const { a, b, c } = _triangle; + a.fromBufferAttribute( positionAttr, indexArr[ 0 ] ); + b.fromBufferAttribute( positionAttr, indexArr[ 1 ] ); + c.fromBufferAttribute( positionAttr, indexArr[ 2 ] ); + _triangle.getNormal( _normal ); + + // create hashes for the edge from the vertices + hashes[ 0 ] = `${ Math.round( a.x * precision ) },${ Math.round( a.y * precision ) },${ Math.round( a.z * precision ) }`; + hashes[ 1 ] = `${ Math.round( b.x * precision ) },${ Math.round( b.y * precision ) },${ Math.round( b.z * precision ) }`; + hashes[ 2 ] = `${ Math.round( c.x * precision ) },${ Math.round( c.y * precision ) },${ Math.round( c.z * precision ) }`; + + // skip degenerate triangles + if ( hashes[ 0 ] === hashes[ 1 ] || hashes[ 1 ] === hashes[ 2 ] || hashes[ 2 ] === hashes[ 0 ] ) { + + continue; + + } + + // iterate over every edge + for ( let j = 0; j < 3; j ++ ) { + + // get the first and next vertex making up the edge + const jNext = ( j + 1 ) % 3; + const vecHash0 = hashes[ j ]; + const vecHash1 = hashes[ jNext ]; + const v0 = _triangle[ vertKeys[ j ] ]; + const v1 = _triangle[ vertKeys[ jNext ] ]; + + const hash = `${ vecHash0 }_${ vecHash1 }`; + const reverseHash = `${ vecHash1 }_${ vecHash0 }`; + + if ( reverseHash in edgeData && edgeData[ reverseHash ] ) { + + // if we found a sibling edge add it into the vertex array if + // it meets the angle threshold and delete the edge from the map. + if ( _normal.dot( edgeData[ reverseHash ].normal ) <= thresholdDot ) { + + vertices.push( v0.x, v0.y, v0.z ); + vertices.push( v1.x, v1.y, v1.z ); + + } + + edgeData[ reverseHash ] = null; + + } else if ( ! ( hash in edgeData ) ) { + + // if we've already got an edge here then skip adding a new one + edgeData[ hash ] = { + + index0: indexArr[ j ], + index1: indexArr[ jNext ], + normal: _normal.clone(), + + }; + + } + + } + + } + + // iterate over all remaining, unmatched edges and add them to the vertex array + for ( const key in edgeData ) { + + if ( edgeData[ key ] ) { + + const { index0, index1 } = edgeData[ key ]; + _v0.fromBufferAttribute( positionAttr, index0 ); + _v1$1.fromBufferAttribute( positionAttr, index1 ); + + vertices.push( _v0.x, _v0.y, _v0.z ); + vertices.push( _v1$1.x, _v1$1.y, _v1$1.z ); + + } + + } + + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + +} + +class Shape extends Path { + + constructor( points ) { + + super( points ); + + this.uuid = generateUUID(); + + this.type = 'Shape'; + + this.holes = []; + + } + + getPointsHoles( divisions ) { + + const holesPts = []; + + for ( let i = 0, l = this.holes.length; i < l; i ++ ) { + + holesPts[ i ] = this.holes[ i ].getPoints( divisions ); + + } + + return holesPts; + + } + + // get points of shape and holes (keypoints based on segments parameter) + + extractPoints( divisions ) { + + return { + + shape: this.getPoints( divisions ), + holes: this.getPointsHoles( divisions ) + + }; + + } + + copy( source ) { + + super.copy( source ); + + this.holes = []; + + for ( let i = 0, l = source.holes.length; i < l; i ++ ) { + + const hole = source.holes[ i ]; + + this.holes.push( hole.clone() ); + + } + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.uuid = this.uuid; + data.holes = []; + + for ( let i = 0, l = this.holes.length; i < l; i ++ ) { + + const hole = this.holes[ i ]; + data.holes.push( hole.toJSON() ); + + } + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.uuid = json.uuid; + this.holes = []; + + for ( let i = 0, l = json.holes.length; i < l; i ++ ) { + + const hole = json.holes[ i ]; + this.holes.push( new Path().fromJSON( hole ) ); + + } + + return this; + + } + +} + +/** + * Port from https://github.com/mapbox/earcut (v2.2.4) + */ + +const Earcut = { + + triangulate: function ( data, holeIndices, dim = 2 ) { + + const hasHoles = holeIndices && holeIndices.length; + const outerLen = hasHoles ? holeIndices[ 0 ] * dim : data.length; + let outerNode = linkedList( data, 0, outerLen, dim, true ); + const triangles = []; + + if ( ! outerNode || outerNode.next === outerNode.prev ) return triangles; + + let minX, minY, maxX, maxY, x, y, invSize; + + if ( hasHoles ) outerNode = eliminateHoles( data, holeIndices, outerNode, dim ); + + // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox + if ( data.length > 80 * dim ) { + + minX = maxX = data[ 0 ]; + minY = maxY = data[ 1 ]; + + for ( let i = dim; i < outerLen; i += dim ) { + + x = data[ i ]; + y = data[ i + 1 ]; + if ( x < minX ) minX = x; + if ( y < minY ) minY = y; + if ( x > maxX ) maxX = x; + if ( y > maxY ) maxY = y; + + } + + // minX, minY and invSize are later used to transform coords into integers for z-order calculation + invSize = Math.max( maxX - minX, maxY - minY ); + invSize = invSize !== 0 ? 32767 / invSize : 0; + + } + + earcutLinked( outerNode, triangles, dim, minX, minY, invSize, 0 ); + + return triangles; + + } + +}; + +// create a circular doubly linked list from polygon points in the specified winding order +function linkedList( data, start, end, dim, clockwise ) { + + let i, last; + + if ( clockwise === ( signedArea( data, start, end, dim ) > 0 ) ) { + + for ( i = start; i < end; i += dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last ); + + } else { + + for ( i = end - dim; i >= start; i -= dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last ); + + } + + if ( last && equals( last, last.next ) ) { + + removeNode( last ); + last = last.next; + + } + + return last; + +} + +// eliminate colinear or duplicate points +function filterPoints( start, end ) { + + if ( ! start ) return start; + if ( ! end ) end = start; + + let p = start, + again; + do { + + again = false; + + if ( ! p.steiner && ( equals( p, p.next ) || area( p.prev, p, p.next ) === 0 ) ) { + + removeNode( p ); + p = end = p.prev; + if ( p === p.next ) break; + again = true; + + } else { + + p = p.next; + + } + + } while ( again || p !== end ); + + return end; + +} + +// main ear slicing loop which triangulates a polygon (given as a linked list) +function earcutLinked( ear, triangles, dim, minX, minY, invSize, pass ) { + + if ( ! ear ) return; + + // interlink polygon nodes in z-order + if ( ! pass && invSize ) indexCurve( ear, minX, minY, invSize ); + + let stop = ear, + prev, next; + + // iterate through ears, slicing them one by one + while ( ear.prev !== ear.next ) { + + prev = ear.prev; + next = ear.next; + + if ( invSize ? isEarHashed( ear, minX, minY, invSize ) : isEar( ear ) ) { + + // cut off the triangle + triangles.push( prev.i / dim | 0 ); + triangles.push( ear.i / dim | 0 ); + triangles.push( next.i / dim | 0 ); + + removeNode( ear ); + + // skipping the next vertex leads to less sliver triangles + ear = next.next; + stop = next.next; + + continue; + + } + + ear = next; + + // if we looped through the whole remaining polygon and can't find any more ears + if ( ear === stop ) { + + // try filtering points and slicing again + if ( ! pass ) { + + earcutLinked( filterPoints( ear ), triangles, dim, minX, minY, invSize, 1 ); + + // if this didn't work, try curing all small self-intersections locally + + } else if ( pass === 1 ) { + + ear = cureLocalIntersections( filterPoints( ear ), triangles, dim ); + earcutLinked( ear, triangles, dim, minX, minY, invSize, 2 ); + + // as a last resort, try splitting the remaining polygon into two + + } else if ( pass === 2 ) { + + splitEarcut( ear, triangles, dim, minX, minY, invSize ); + + } + + break; + + } + + } + +} + +// check whether a polygon node forms a valid ear with adjacent nodes +function isEar( ear ) { + + const a = ear.prev, + b = ear, + c = ear.next; + + if ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear + + // now make sure we don't have other points inside the potential ear + const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y; + + // triangle bbox; min & max are calculated like this for speed + const x0 = ax < bx ? ( ax < cx ? ax : cx ) : ( bx < cx ? bx : cx ), + y0 = ay < by ? ( ay < cy ? ay : cy ) : ( by < cy ? by : cy ), + x1 = ax > bx ? ( ax > cx ? ax : cx ) : ( bx > cx ? bx : cx ), + y1 = ay > by ? ( ay > cy ? ay : cy ) : ( by > cy ? by : cy ); + + let p = c.next; + while ( p !== a ) { + + if ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && + pointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) && + area( p.prev, p, p.next ) >= 0 ) return false; + p = p.next; + + } + + return true; + +} + +function isEarHashed( ear, minX, minY, invSize ) { + + const a = ear.prev, + b = ear, + c = ear.next; + + if ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear + + const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y; + + // triangle bbox; min & max are calculated like this for speed + const x0 = ax < bx ? ( ax < cx ? ax : cx ) : ( bx < cx ? bx : cx ), + y0 = ay < by ? ( ay < cy ? ay : cy ) : ( by < cy ? by : cy ), + x1 = ax > bx ? ( ax > cx ? ax : cx ) : ( bx > cx ? bx : cx ), + y1 = ay > by ? ( ay > cy ? ay : cy ) : ( by > cy ? by : cy ); + + // z-order range for the current triangle bbox; + const minZ = zOrder( x0, y0, minX, minY, invSize ), + maxZ = zOrder( x1, y1, minX, minY, invSize ); + + let p = ear.prevZ, + n = ear.nextZ; + + // look for points inside the triangle in both directions + while ( p && p.z >= minZ && n && n.z <= maxZ ) { + + if ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && + pointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) && area( p.prev, p, p.next ) >= 0 ) return false; + p = p.prevZ; + + if ( n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && + pointInTriangle( ax, ay, bx, by, cx, cy, n.x, n.y ) && area( n.prev, n, n.next ) >= 0 ) return false; + n = n.nextZ; + + } + + // look for remaining points in decreasing z-order + while ( p && p.z >= minZ ) { + + if ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && + pointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) && area( p.prev, p, p.next ) >= 0 ) return false; + p = p.prevZ; + + } + + // look for remaining points in increasing z-order + while ( n && n.z <= maxZ ) { + + if ( n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && + pointInTriangle( ax, ay, bx, by, cx, cy, n.x, n.y ) && area( n.prev, n, n.next ) >= 0 ) return false; + n = n.nextZ; + + } + + return true; + +} + +// go through all polygon nodes and cure small local self-intersections +function cureLocalIntersections( start, triangles, dim ) { + + let p = start; + do { + + const a = p.prev, + b = p.next.next; + + if ( ! equals( a, b ) && intersects( a, p, p.next, b ) && locallyInside( a, b ) && locallyInside( b, a ) ) { + + triangles.push( a.i / dim | 0 ); + triangles.push( p.i / dim | 0 ); + triangles.push( b.i / dim | 0 ); + + // remove two nodes involved + removeNode( p ); + removeNode( p.next ); + + p = start = b; + + } + + p = p.next; + + } while ( p !== start ); + + return filterPoints( p ); + +} + +// try splitting polygon into two and triangulate them independently +function splitEarcut( start, triangles, dim, minX, minY, invSize ) { + + // look for a valid diagonal that divides the polygon into two + let a = start; + do { + + let b = a.next.next; + while ( b !== a.prev ) { + + if ( a.i !== b.i && isValidDiagonal( a, b ) ) { + + // split the polygon in two by the diagonal + let c = splitPolygon( a, b ); + + // filter colinear points around the cuts + a = filterPoints( a, a.next ); + c = filterPoints( c, c.next ); + + // run earcut on each half + earcutLinked( a, triangles, dim, minX, minY, invSize, 0 ); + earcutLinked( c, triangles, dim, minX, minY, invSize, 0 ); + return; + + } + + b = b.next; + + } + + a = a.next; + + } while ( a !== start ); + +} + +// link every hole into the outer loop, producing a single-ring polygon without holes +function eliminateHoles( data, holeIndices, outerNode, dim ) { + + const queue = []; + let i, len, start, end, list; + + for ( i = 0, len = holeIndices.length; i < len; i ++ ) { + + start = holeIndices[ i ] * dim; + end = i < len - 1 ? holeIndices[ i + 1 ] * dim : data.length; + list = linkedList( data, start, end, dim, false ); + if ( list === list.next ) list.steiner = true; + queue.push( getLeftmost( list ) ); + + } + + queue.sort( compareX ); + + // process holes from left to right + for ( i = 0; i < queue.length; i ++ ) { + + outerNode = eliminateHole( queue[ i ], outerNode ); + + } + + return outerNode; + +} + +function compareX( a, b ) { + + return a.x - b.x; + +} + +// find a bridge between vertices that connects hole with an outer ring and link it +function eliminateHole( hole, outerNode ) { + + const bridge = findHoleBridge( hole, outerNode ); + if ( ! bridge ) { + + return outerNode; + + } + + const bridgeReverse = splitPolygon( bridge, hole ); + + // filter collinear points around the cuts + filterPoints( bridgeReverse, bridgeReverse.next ); + return filterPoints( bridge, bridge.next ); + +} + +// David Eberly's algorithm for finding a bridge between hole and outer polygon +function findHoleBridge( hole, outerNode ) { + + let p = outerNode, + qx = - Infinity, + m; + + const hx = hole.x, hy = hole.y; + + // find a segment intersected by a ray from the hole's leftmost point to the left; + // segment's endpoint with lesser x will be potential connection point + do { + + if ( hy <= p.y && hy >= p.next.y && p.next.y !== p.y ) { + + const x = p.x + ( hy - p.y ) * ( p.next.x - p.x ) / ( p.next.y - p.y ); + if ( x <= hx && x > qx ) { + + qx = x; + m = p.x < p.next.x ? p : p.next; + if ( x === hx ) return m; // hole touches outer segment; pick leftmost endpoint + + } + + } + + p = p.next; + + } while ( p !== outerNode ); + + if ( ! m ) return null; + + // look for points inside the triangle of hole point, segment intersection and endpoint; + // if there are no points found, we have a valid connection; + // otherwise choose the point of the minimum angle with the ray as connection point + + const stop = m, + mx = m.x, + my = m.y; + let tanMin = Infinity, tan; + + p = m; + + do { + + if ( hx >= p.x && p.x >= mx && hx !== p.x && + pointInTriangle( hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y ) ) { + + tan = Math.abs( hy - p.y ) / ( hx - p.x ); // tangential + + if ( locallyInside( p, hole ) && ( tan < tanMin || ( tan === tanMin && ( p.x > m.x || ( p.x === m.x && sectorContainsSector( m, p ) ) ) ) ) ) { + + m = p; + tanMin = tan; + + } + + } + + p = p.next; + + } while ( p !== stop ); + + return m; + +} + +// whether sector in vertex m contains sector in vertex p in the same coordinates +function sectorContainsSector( m, p ) { + + return area( m.prev, m, p.prev ) < 0 && area( p.next, m, m.next ) < 0; + +} + +// interlink polygon nodes in z-order +function indexCurve( start, minX, minY, invSize ) { + + let p = start; + do { + + if ( p.z === 0 ) p.z = zOrder( p.x, p.y, minX, minY, invSize ); + p.prevZ = p.prev; + p.nextZ = p.next; + p = p.next; + + } while ( p !== start ); + + p.prevZ.nextZ = null; + p.prevZ = null; + + sortLinked( p ); + +} + +// Simon Tatham's linked list merge sort algorithm +// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html +function sortLinked( list ) { + + let i, p, q, e, tail, numMerges, pSize, qSize, + inSize = 1; + + do { + + p = list; + list = null; + tail = null; + numMerges = 0; + + while ( p ) { + + numMerges ++; + q = p; + pSize = 0; + for ( i = 0; i < inSize; i ++ ) { + + pSize ++; + q = q.nextZ; + if ( ! q ) break; + + } + + qSize = inSize; + + while ( pSize > 0 || ( qSize > 0 && q ) ) { + + if ( pSize !== 0 && ( qSize === 0 || ! q || p.z <= q.z ) ) { + + e = p; + p = p.nextZ; + pSize --; + + } else { + + e = q; + q = q.nextZ; + qSize --; + + } + + if ( tail ) tail.nextZ = e; + else list = e; + + e.prevZ = tail; + tail = e; + + } + + p = q; + + } + + tail.nextZ = null; + inSize *= 2; + + } while ( numMerges > 1 ); + + return list; + +} + +// z-order of a point given coords and inverse of the longer side of data bbox +function zOrder( x, y, minX, minY, invSize ) { + + // coords are transformed into non-negative 15-bit integer range + x = ( x - minX ) * invSize | 0; + y = ( y - minY ) * invSize | 0; + + x = ( x | ( x << 8 ) ) & 0x00FF00FF; + x = ( x | ( x << 4 ) ) & 0x0F0F0F0F; + x = ( x | ( x << 2 ) ) & 0x33333333; + x = ( x | ( x << 1 ) ) & 0x55555555; + + y = ( y | ( y << 8 ) ) & 0x00FF00FF; + y = ( y | ( y << 4 ) ) & 0x0F0F0F0F; + y = ( y | ( y << 2 ) ) & 0x33333333; + y = ( y | ( y << 1 ) ) & 0x55555555; + + return x | ( y << 1 ); + +} + +// find the leftmost node of a polygon ring +function getLeftmost( start ) { + + let p = start, + leftmost = start; + do { + + if ( p.x < leftmost.x || ( p.x === leftmost.x && p.y < leftmost.y ) ) leftmost = p; + p = p.next; + + } while ( p !== start ); + + return leftmost; + +} + +// check if a point lies within a convex triangle +function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) { + + return ( cx - px ) * ( ay - py ) >= ( ax - px ) * ( cy - py ) && + ( ax - px ) * ( by - py ) >= ( bx - px ) * ( ay - py ) && + ( bx - px ) * ( cy - py ) >= ( cx - px ) * ( by - py ); + +} + +// check if a diagonal between two polygon nodes is valid (lies in polygon interior) +function isValidDiagonal( a, b ) { + + return a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges + ( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible + ( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors + equals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case + +} + +// signed area of a triangle +function area( p, q, r ) { + + return ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y ); + +} + +// check if two points are equal +function equals( p1, p2 ) { + + return p1.x === p2.x && p1.y === p2.y; + +} + +// check if two segments intersect +function intersects( p1, q1, p2, q2 ) { + + const o1 = sign( area( p1, q1, p2 ) ); + const o2 = sign( area( p1, q1, q2 ) ); + const o3 = sign( area( p2, q2, p1 ) ); + const o4 = sign( area( p2, q2, q1 ) ); + + if ( o1 !== o2 && o3 !== o4 ) return true; // general case + + if ( o1 === 0 && onSegment( p1, p2, q1 ) ) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1 + if ( o2 === 0 && onSegment( p1, q2, q1 ) ) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1 + if ( o3 === 0 && onSegment( p2, p1, q2 ) ) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2 + if ( o4 === 0 && onSegment( p2, q1, q2 ) ) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2 + + return false; + +} + +// for collinear points p, q, r, check if point q lies on segment pr +function onSegment( p, q, r ) { + + return q.x <= Math.max( p.x, r.x ) && q.x >= Math.min( p.x, r.x ) && q.y <= Math.max( p.y, r.y ) && q.y >= Math.min( p.y, r.y ); + +} + +function sign( num ) { + + return num > 0 ? 1 : num < 0 ? - 1 : 0; + +} + +// check if a polygon diagonal intersects any polygon segments +function intersectsPolygon( a, b ) { + + let p = a; + do { + + if ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && + intersects( p, p.next, a, b ) ) return true; + p = p.next; + + } while ( p !== a ); + + return false; + +} + +// check if a polygon diagonal is locally inside the polygon +function locallyInside( a, b ) { + + return area( a.prev, a, a.next ) < 0 ? + area( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 : + area( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0; + +} + +// check if the middle point of a polygon diagonal is inside the polygon +function middleInside( a, b ) { + + let p = a, + inside = false; + const px = ( a.x + b.x ) / 2, + py = ( a.y + b.y ) / 2; + do { + + if ( ( ( p.y > py ) !== ( p.next.y > py ) ) && p.next.y !== p.y && + ( px < ( p.next.x - p.x ) * ( py - p.y ) / ( p.next.y - p.y ) + p.x ) ) + inside = ! inside; + p = p.next; + + } while ( p !== a ); + + return inside; + +} + +// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two; +// if one belongs to the outer ring and another to a hole, it merges it into a single ring +function splitPolygon( a, b ) { + + const a2 = new Node( a.i, a.x, a.y ), + b2 = new Node( b.i, b.x, b.y ), + an = a.next, + bp = b.prev; + + a.next = b; + b.prev = a; + + a2.next = an; + an.prev = a2; + + b2.next = a2; + a2.prev = b2; + + bp.next = b2; + b2.prev = bp; + + return b2; + +} + +// create a node and optionally link it with previous one (in a circular doubly linked list) +function insertNode( i, x, y, last ) { + + const p = new Node( i, x, y ); + + if ( ! last ) { + + p.prev = p; + p.next = p; + + } else { + + p.next = last.next; + p.prev = last; + last.next.prev = p; + last.next = p; + + } + + return p; + +} + +function removeNode( p ) { + + p.next.prev = p.prev; + p.prev.next = p.next; + + if ( p.prevZ ) p.prevZ.nextZ = p.nextZ; + if ( p.nextZ ) p.nextZ.prevZ = p.prevZ; + +} + +function Node( i, x, y ) { + + // vertex index in coordinates array + this.i = i; + + // vertex coordinates + this.x = x; + this.y = y; + + // previous and next vertex nodes in a polygon ring + this.prev = null; + this.next = null; + + // z-order curve value + this.z = 0; + + // previous and next nodes in z-order + this.prevZ = null; + this.nextZ = null; + + // indicates whether this is a steiner point + this.steiner = false; + +} + +function signedArea( data, start, end, dim ) { + + let sum = 0; + for ( let i = start, j = end - dim; i < end; i += dim ) { + + sum += ( data[ j ] - data[ i ] ) * ( data[ i + 1 ] + data[ j + 1 ] ); + j = i; + + } + + return sum; + +} + +class ShapeUtils { + + // calculate area of the contour polygon + + static area( contour ) { + + const n = contour.length; + let a = 0.0; + + for ( let p = n - 1, q = 0; q < n; p = q ++ ) { + + a += contour[ p ].x * contour[ q ].y - contour[ q ].x * contour[ p ].y; + + } + + return a * 0.5; + + } + + static isClockWise( pts ) { + + return ShapeUtils.area( pts ) < 0; + + } + + static triangulateShape( contour, holes ) { + + const vertices = []; // flat array of vertices like [ x0,y0, x1,y1, x2,y2, ... ] + const holeIndices = []; // array of hole indices + const faces = []; // final array of vertex indices like [ [ a,b,d ], [ b,c,d ] ] + + removeDupEndPts( contour ); + addContour( vertices, contour ); + + // + + let holeIndex = contour.length; + + holes.forEach( removeDupEndPts ); + + for ( let i = 0; i < holes.length; i ++ ) { + + holeIndices.push( holeIndex ); + holeIndex += holes[ i ].length; + addContour( vertices, holes[ i ] ); + + } + + // + + const triangles = Earcut.triangulate( vertices, holeIndices ); + + // + + for ( let i = 0; i < triangles.length; i += 3 ) { + + faces.push( triangles.slice( i, i + 3 ) ); + + } + + return faces; + + } + +} + +function removeDupEndPts( points ) { + + const l = points.length; + + if ( l > 2 && points[ l - 1 ].equals( points[ 0 ] ) ) { + + points.pop(); + + } + +} + +function addContour( vertices, contour ) { + + for ( let i = 0; i < contour.length; i ++ ) { + + vertices.push( contour[ i ].x ); + vertices.push( contour[ i ].y ); + + } + +} + +/** + * Creates extruded geometry from a path shape. + * + * parameters = { + * + * curveSegments: , // number of points on the curves + * steps: , // number of points for z-side extrusions / used for subdividing segments of extrude spline too + * depth: , // Depth to extrude the shape + * + * bevelEnabled: , // turn on bevel + * bevelThickness: , // how deep into the original shape bevel goes + * bevelSize: , // how far from shape outline (including bevelOffset) is bevel + * bevelOffset: , // how far from shape outline does bevel start + * bevelSegments: , // number of bevel layers + * + * extrudePath: // curve to extrude shape along + * + * UVGenerator: // object that provides UV generator functions + * + * } + */ + + +class ExtrudeGeometry extends BufferGeometry { + + constructor( shapes = new Shape( [ new Vector2( 0.5, 0.5 ), new Vector2( - 0.5, 0.5 ), new Vector2( - 0.5, - 0.5 ), new Vector2( 0.5, - 0.5 ) ] ), options = {} ) { + + super(); + + this.type = 'ExtrudeGeometry'; + + this.parameters = { + shapes: shapes, + options: options + }; + + shapes = Array.isArray( shapes ) ? shapes : [ shapes ]; + + const scope = this; + + const verticesArray = []; + const uvArray = []; + + for ( let i = 0, l = shapes.length; i < l; i ++ ) { + + const shape = shapes[ i ]; + addShape( shape ); + + } + + // build geometry + + this.setAttribute( 'position', new Float32BufferAttribute( verticesArray, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvArray, 2 ) ); + + this.computeVertexNormals(); + + // functions + + function addShape( shape ) { + + const placeholder = []; + + // options + + const curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12; + const steps = options.steps !== undefined ? options.steps : 1; + const depth = options.depth !== undefined ? options.depth : 1; + + let bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true; + let bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 0.2; + let bevelSize = options.bevelSize !== undefined ? options.bevelSize : bevelThickness - 0.1; + let bevelOffset = options.bevelOffset !== undefined ? options.bevelOffset : 0; + let bevelSegments = options.bevelSegments !== undefined ? options.bevelSegments : 3; + + const extrudePath = options.extrudePath; + + const uvgen = options.UVGenerator !== undefined ? options.UVGenerator : WorldUVGenerator; + + // + + let extrudePts, extrudeByPath = false; + let splineTube, binormal, normal, position2; + + if ( extrudePath ) { + + extrudePts = extrudePath.getSpacedPoints( steps ); + + extrudeByPath = true; + bevelEnabled = false; // bevels not supported for path extrusion + + // SETUP TNB variables + + // TODO1 - have a .isClosed in spline? + + splineTube = extrudePath.computeFrenetFrames( steps, false ); + + // console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length); + + binormal = new Vector3(); + normal = new Vector3(); + position2 = new Vector3(); + + } + + // Safeguards if bevels are not enabled + + if ( ! bevelEnabled ) { + + bevelSegments = 0; + bevelThickness = 0; + bevelSize = 0; + bevelOffset = 0; + + } + + // Variables initialization + + const shapePoints = shape.extractPoints( curveSegments ); + + let vertices = shapePoints.shape; + const holes = shapePoints.holes; + + const reverse = ! ShapeUtils.isClockWise( vertices ); + + if ( reverse ) { + + vertices = vertices.reverse(); + + // Maybe we should also check if holes are in the opposite direction, just to be safe ... + + for ( let h = 0, hl = holes.length; h < hl; h ++ ) { + + const ahole = holes[ h ]; + + if ( ShapeUtils.isClockWise( ahole ) ) { + + holes[ h ] = ahole.reverse(); + + } + + } + + } + + + const faces = ShapeUtils.triangulateShape( vertices, holes ); + + /* Vertices */ + + const contour = vertices; // vertices has all points but contour has only points of circumference + + for ( let h = 0, hl = holes.length; h < hl; h ++ ) { + + const ahole = holes[ h ]; + + vertices = vertices.concat( ahole ); + + } + + + function scalePt2( pt, vec, size ) { + + if ( ! vec ) console.error( 'THREE.ExtrudeGeometry: vec does not exist' ); + + return pt.clone().addScaledVector( vec, size ); + + } + + const vlen = vertices.length, flen = faces.length; + + + // Find directions for point movement + + + function getBevelVec( inPt, inPrev, inNext ) { + + // computes for inPt the corresponding point inPt' on a new contour + // shifted by 1 unit (length of normalized vector) to the left + // if we walk along contour clockwise, this new contour is outside the old one + // + // inPt' is the intersection of the two lines parallel to the two + // adjacent edges of inPt at a distance of 1 unit on the left side. + + let v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt + + // good reading for geometry algorithms (here: line-line intersection) + // http://geomalgorithms.com/a05-_intersect-1.html + + const v_prev_x = inPt.x - inPrev.x, + v_prev_y = inPt.y - inPrev.y; + const v_next_x = inNext.x - inPt.x, + v_next_y = inNext.y - inPt.y; + + const v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y ); + + // check for collinear edges + const collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x ); + + if ( Math.abs( collinear0 ) > Number.EPSILON ) { + + // not collinear + + // length of vectors for normalizing + + const v_prev_len = Math.sqrt( v_prev_lensq ); + const v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y ); + + // shift adjacent points by unit vectors to the left + + const ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len ); + const ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len ); + + const ptNextShift_x = ( inNext.x - v_next_y / v_next_len ); + const ptNextShift_y = ( inNext.y + v_next_x / v_next_len ); + + // scaling factor for v_prev to intersection point + + const sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y - + ( ptNextShift_y - ptPrevShift_y ) * v_next_x ) / + ( v_prev_x * v_next_y - v_prev_y * v_next_x ); + + // vector from inPt to intersection point + + v_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x ); + v_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y ); + + // Don't normalize!, otherwise sharp corners become ugly + // but prevent crazy spikes + const v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y ); + if ( v_trans_lensq <= 2 ) { + + return new Vector2( v_trans_x, v_trans_y ); + + } else { + + shrink_by = Math.sqrt( v_trans_lensq / 2 ); + + } + + } else { + + // handle special case of collinear edges + + let direction_eq = false; // assumes: opposite + + if ( v_prev_x > Number.EPSILON ) { + + if ( v_next_x > Number.EPSILON ) { + + direction_eq = true; + + } + + } else { + + if ( v_prev_x < - Number.EPSILON ) { + + if ( v_next_x < - Number.EPSILON ) { + + direction_eq = true; + + } + + } else { + + if ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) { + + direction_eq = true; + + } + + } + + } + + if ( direction_eq ) { + + // console.log("Warning: lines are a straight sequence"); + v_trans_x = - v_prev_y; + v_trans_y = v_prev_x; + shrink_by = Math.sqrt( v_prev_lensq ); + + } else { + + // console.log("Warning: lines are a straight spike"); + v_trans_x = v_prev_x; + v_trans_y = v_prev_y; + shrink_by = Math.sqrt( v_prev_lensq / 2 ); + + } + + } + + return new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by ); + + } + + + const contourMovements = []; + + for ( let i = 0, il = contour.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) { + + if ( j === il ) j = 0; + if ( k === il ) k = 0; + + // (j)---(i)---(k) + // console.log('i,j,k', i, j , k) + + contourMovements[ i ] = getBevelVec( contour[ i ], contour[ j ], contour[ k ] ); + + } + + const holesMovements = []; + let oneHoleMovements, verticesMovements = contourMovements.concat(); + + for ( let h = 0, hl = holes.length; h < hl; h ++ ) { + + const ahole = holes[ h ]; + + oneHoleMovements = []; + + for ( let i = 0, il = ahole.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) { + + if ( j === il ) j = 0; + if ( k === il ) k = 0; + + // (j)---(i)---(k) + oneHoleMovements[ i ] = getBevelVec( ahole[ i ], ahole[ j ], ahole[ k ] ); + + } + + holesMovements.push( oneHoleMovements ); + verticesMovements = verticesMovements.concat( oneHoleMovements ); + + } + + + // Loop bevelSegments, 1 for the front, 1 for the back + + for ( let b = 0; b < bevelSegments; b ++ ) { + + //for ( b = bevelSegments; b > 0; b -- ) { + + const t = b / bevelSegments; + const z = bevelThickness * Math.cos( t * Math.PI / 2 ); + const bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset; + + // contract shape + + for ( let i = 0, il = contour.length; i < il; i ++ ) { + + const vert = scalePt2( contour[ i ], contourMovements[ i ], bs ); + + v( vert.x, vert.y, - z ); + + } + + // expand holes + + for ( let h = 0, hl = holes.length; h < hl; h ++ ) { + + const ahole = holes[ h ]; + oneHoleMovements = holesMovements[ h ]; + + for ( let i = 0, il = ahole.length; i < il; i ++ ) { + + const vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs ); + + v( vert.x, vert.y, - z ); + + } + + } + + } + + const bs = bevelSize + bevelOffset; + + // Back facing vertices + + for ( let i = 0; i < vlen; i ++ ) { + + const vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ]; + + if ( ! extrudeByPath ) { + + v( vert.x, vert.y, 0 ); + + } else { + + // v( vert.x, vert.y + extrudePts[ 0 ].y, extrudePts[ 0 ].x ); + + normal.copy( splineTube.normals[ 0 ] ).multiplyScalar( vert.x ); + binormal.copy( splineTube.binormals[ 0 ] ).multiplyScalar( vert.y ); + + position2.copy( extrudePts[ 0 ] ).add( normal ).add( binormal ); + + v( position2.x, position2.y, position2.z ); + + } + + } + + // Add stepped vertices... + // Including front facing vertices + + for ( let s = 1; s <= steps; s ++ ) { + + for ( let i = 0; i < vlen; i ++ ) { + + const vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ]; + + if ( ! extrudeByPath ) { + + v( vert.x, vert.y, depth / steps * s ); + + } else { + + // v( vert.x, vert.y + extrudePts[ s - 1 ].y, extrudePts[ s - 1 ].x ); + + normal.copy( splineTube.normals[ s ] ).multiplyScalar( vert.x ); + binormal.copy( splineTube.binormals[ s ] ).multiplyScalar( vert.y ); + + position2.copy( extrudePts[ s ] ).add( normal ).add( binormal ); + + v( position2.x, position2.y, position2.z ); + + } + + } + + } + + + // Add bevel segments planes + + //for ( b = 1; b <= bevelSegments; b ++ ) { + for ( let b = bevelSegments - 1; b >= 0; b -- ) { + + const t = b / bevelSegments; + const z = bevelThickness * Math.cos( t * Math.PI / 2 ); + const bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset; + + // contract shape + + for ( let i = 0, il = contour.length; i < il; i ++ ) { + + const vert = scalePt2( contour[ i ], contourMovements[ i ], bs ); + v( vert.x, vert.y, depth + z ); + + } + + // expand holes + + for ( let h = 0, hl = holes.length; h < hl; h ++ ) { + + const ahole = holes[ h ]; + oneHoleMovements = holesMovements[ h ]; + + for ( let i = 0, il = ahole.length; i < il; i ++ ) { + + const vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs ); + + if ( ! extrudeByPath ) { + + v( vert.x, vert.y, depth + z ); + + } else { + + v( vert.x, vert.y + extrudePts[ steps - 1 ].y, extrudePts[ steps - 1 ].x + z ); + + } + + } + + } + + } + + /* Faces */ + + // Top and bottom faces + + buildLidFaces(); + + // Sides faces + + buildSideFaces(); + + + ///// Internal functions + + function buildLidFaces() { + + const start = verticesArray.length / 3; + + if ( bevelEnabled ) { + + let layer = 0; // steps + 1 + let offset = vlen * layer; + + // Bottom faces + + for ( let i = 0; i < flen; i ++ ) { + + const face = faces[ i ]; + f3( face[ 2 ] + offset, face[ 1 ] + offset, face[ 0 ] + offset ); + + } + + layer = steps + bevelSegments * 2; + offset = vlen * layer; + + // Top faces + + for ( let i = 0; i < flen; i ++ ) { + + const face = faces[ i ]; + f3( face[ 0 ] + offset, face[ 1 ] + offset, face[ 2 ] + offset ); + + } + + } else { + + // Bottom faces + + for ( let i = 0; i < flen; i ++ ) { + + const face = faces[ i ]; + f3( face[ 2 ], face[ 1 ], face[ 0 ] ); + + } + + // Top faces + + for ( let i = 0; i < flen; i ++ ) { + + const face = faces[ i ]; + f3( face[ 0 ] + vlen * steps, face[ 1 ] + vlen * steps, face[ 2 ] + vlen * steps ); + + } + + } + + scope.addGroup( start, verticesArray.length / 3 - start, 0 ); + + } + + // Create faces for the z-sides of the shape + + function buildSideFaces() { + + const start = verticesArray.length / 3; + let layeroffset = 0; + sidewalls( contour, layeroffset ); + layeroffset += contour.length; + + for ( let h = 0, hl = holes.length; h < hl; h ++ ) { + + const ahole = holes[ h ]; + sidewalls( ahole, layeroffset ); + + //, true + layeroffset += ahole.length; + + } + + + scope.addGroup( start, verticesArray.length / 3 - start, 1 ); + + + } + + function sidewalls( contour, layeroffset ) { + + let i = contour.length; + + while ( -- i >= 0 ) { + + const j = i; + let k = i - 1; + if ( k < 0 ) k = contour.length - 1; + + //console.log('b', i,j, i-1, k,vertices.length); + + for ( let s = 0, sl = ( steps + bevelSegments * 2 ); s < sl; s ++ ) { + + const slen1 = vlen * s; + const slen2 = vlen * ( s + 1 ); + + const a = layeroffset + j + slen1, + b = layeroffset + k + slen1, + c = layeroffset + k + slen2, + d = layeroffset + j + slen2; + + f4( a, b, c, d ); + + } + + } + + } + + function v( x, y, z ) { + + placeholder.push( x ); + placeholder.push( y ); + placeholder.push( z ); + + } + + + function f3( a, b, c ) { + + addVertex( a ); + addVertex( b ); + addVertex( c ); + + const nextIndex = verticesArray.length / 3; + const uvs = uvgen.generateTopUV( scope, verticesArray, nextIndex - 3, nextIndex - 2, nextIndex - 1 ); + + addUV( uvs[ 0 ] ); + addUV( uvs[ 1 ] ); + addUV( uvs[ 2 ] ); + + } + + function f4( a, b, c, d ) { + + addVertex( a ); + addVertex( b ); + addVertex( d ); + + addVertex( b ); + addVertex( c ); + addVertex( d ); + + + const nextIndex = verticesArray.length / 3; + const uvs = uvgen.generateSideWallUV( scope, verticesArray, nextIndex - 6, nextIndex - 3, nextIndex - 2, nextIndex - 1 ); + + addUV( uvs[ 0 ] ); + addUV( uvs[ 1 ] ); + addUV( uvs[ 3 ] ); + + addUV( uvs[ 1 ] ); + addUV( uvs[ 2 ] ); + addUV( uvs[ 3 ] ); + + } + + function addVertex( index ) { + + verticesArray.push( placeholder[ index * 3 + 0 ] ); + verticesArray.push( placeholder[ index * 3 + 1 ] ); + verticesArray.push( placeholder[ index * 3 + 2 ] ); + + } + + + function addUV( vector2 ) { + + uvArray.push( vector2.x ); + uvArray.push( vector2.y ); + + } + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + const shapes = this.parameters.shapes; + const options = this.parameters.options; + + return toJSON$1( shapes, options, data ); + + } + + static fromJSON( data, shapes ) { + + const geometryShapes = []; + + for ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) { + + const shape = shapes[ data.shapes[ j ] ]; + + geometryShapes.push( shape ); + + } + + const extrudePath = data.options.extrudePath; + + if ( extrudePath !== undefined ) { + + data.options.extrudePath = new Curves[ extrudePath.type ]().fromJSON( extrudePath ); + + } + + return new ExtrudeGeometry( geometryShapes, data.options ); + + } + +} + +const WorldUVGenerator = { + + generateTopUV: function ( geometry, vertices, indexA, indexB, indexC ) { + + const a_x = vertices[ indexA * 3 ]; + const a_y = vertices[ indexA * 3 + 1 ]; + const b_x = vertices[ indexB * 3 ]; + const b_y = vertices[ indexB * 3 + 1 ]; + const c_x = vertices[ indexC * 3 ]; + const c_y = vertices[ indexC * 3 + 1 ]; + + return [ + new Vector2( a_x, a_y ), + new Vector2( b_x, b_y ), + new Vector2( c_x, c_y ) + ]; + + }, + + generateSideWallUV: function ( geometry, vertices, indexA, indexB, indexC, indexD ) { + + const a_x = vertices[ indexA * 3 ]; + const a_y = vertices[ indexA * 3 + 1 ]; + const a_z = vertices[ indexA * 3 + 2 ]; + const b_x = vertices[ indexB * 3 ]; + const b_y = vertices[ indexB * 3 + 1 ]; + const b_z = vertices[ indexB * 3 + 2 ]; + const c_x = vertices[ indexC * 3 ]; + const c_y = vertices[ indexC * 3 + 1 ]; + const c_z = vertices[ indexC * 3 + 2 ]; + const d_x = vertices[ indexD * 3 ]; + const d_y = vertices[ indexD * 3 + 1 ]; + const d_z = vertices[ indexD * 3 + 2 ]; + + if ( Math.abs( a_y - b_y ) < Math.abs( a_x - b_x ) ) { + + return [ + new Vector2( a_x, 1 - a_z ), + new Vector2( b_x, 1 - b_z ), + new Vector2( c_x, 1 - c_z ), + new Vector2( d_x, 1 - d_z ) + ]; + + } else { + + return [ + new Vector2( a_y, 1 - a_z ), + new Vector2( b_y, 1 - b_z ), + new Vector2( c_y, 1 - c_z ), + new Vector2( d_y, 1 - d_z ) + ]; + + } + + } + +}; + +function toJSON$1( shapes, options, data ) { + + data.shapes = []; + + if ( Array.isArray( shapes ) ) { + + for ( let i = 0, l = shapes.length; i < l; i ++ ) { + + const shape = shapes[ i ]; + + data.shapes.push( shape.uuid ); + + } + + } else { + + data.shapes.push( shapes.uuid ); + + } + + data.options = Object.assign( {}, options ); + + if ( options.extrudePath !== undefined ) data.options.extrudePath = options.extrudePath.toJSON(); + + return data; + +} + +class IcosahedronGeometry extends PolyhedronGeometry { + + constructor( radius = 1, detail = 0 ) { + + const t = ( 1 + Math.sqrt( 5 ) ) / 2; + + const vertices = [ + - 1, t, 0, 1, t, 0, - 1, - t, 0, 1, - t, 0, + 0, - 1, t, 0, 1, t, 0, - 1, - t, 0, 1, - t, + t, 0, - 1, t, 0, 1, - t, 0, - 1, - t, 0, 1 + ]; + + const indices = [ + 0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11, + 1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8, + 3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9, + 4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1 + ]; + + super( vertices, indices, radius, detail ); + + this.type = 'IcosahedronGeometry'; + + this.parameters = { + radius: radius, + detail: detail + }; + + } + + static fromJSON( data ) { + + return new IcosahedronGeometry( data.radius, data.detail ); + + } + +} + +class OctahedronGeometry extends PolyhedronGeometry { + + constructor( radius = 1, detail = 0 ) { + + const vertices = [ + 1, 0, 0, - 1, 0, 0, 0, 1, 0, + 0, - 1, 0, 0, 0, 1, 0, 0, - 1 + ]; + + const indices = [ + 0, 2, 4, 0, 4, 3, 0, 3, 5, + 0, 5, 2, 1, 2, 5, 1, 5, 3, + 1, 3, 4, 1, 4, 2 + ]; + + super( vertices, indices, radius, detail ); + + this.type = 'OctahedronGeometry'; + + this.parameters = { + radius: radius, + detail: detail + }; + + } + + static fromJSON( data ) { + + return new OctahedronGeometry( data.radius, data.detail ); + + } + +} + +class RingGeometry extends BufferGeometry { + + constructor( innerRadius = 0.5, outerRadius = 1, thetaSegments = 32, phiSegments = 1, thetaStart = 0, thetaLength = Math.PI * 2 ) { + + super(); + + this.type = 'RingGeometry'; + + this.parameters = { + innerRadius: innerRadius, + outerRadius: outerRadius, + thetaSegments: thetaSegments, + phiSegments: phiSegments, + thetaStart: thetaStart, + thetaLength: thetaLength + }; + + thetaSegments = Math.max( 3, thetaSegments ); + phiSegments = Math.max( 1, phiSegments ); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // some helper variables + + let radius = innerRadius; + const radiusStep = ( ( outerRadius - innerRadius ) / phiSegments ); + const vertex = new Vector3(); + const uv = new Vector2(); + + // generate vertices, normals and uvs + + for ( let j = 0; j <= phiSegments; j ++ ) { + + for ( let i = 0; i <= thetaSegments; i ++ ) { + + // values are generate from the inside of the ring to the outside + + const segment = thetaStart + i / thetaSegments * thetaLength; + + // vertex + + vertex.x = radius * Math.cos( segment ); + vertex.y = radius * Math.sin( segment ); + + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal + + normals.push( 0, 0, 1 ); + + // uv + + uv.x = ( vertex.x / outerRadius + 1 ) / 2; + uv.y = ( vertex.y / outerRadius + 1 ) / 2; + + uvs.push( uv.x, uv.y ); + + } + + // increase the radius for next row of vertices + + radius += radiusStep; + + } + + // indices + + for ( let j = 0; j < phiSegments; j ++ ) { + + const thetaSegmentLevel = j * ( thetaSegments + 1 ); + + for ( let i = 0; i < thetaSegments; i ++ ) { + + const segment = i + thetaSegmentLevel; + + const a = segment; + const b = segment + thetaSegments + 1; + const c = segment + thetaSegments + 2; + const d = segment + 1; + + // faces + + indices.push( a, b, d ); + indices.push( b, c, d ); + + } + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new RingGeometry( data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength ); + + } + +} + +class ShapeGeometry extends BufferGeometry { + + constructor( shapes = new Shape( [ new Vector2( 0, 0.5 ), new Vector2( - 0.5, - 0.5 ), new Vector2( 0.5, - 0.5 ) ] ), curveSegments = 12 ) { + + super(); + + this.type = 'ShapeGeometry'; + + this.parameters = { + shapes: shapes, + curveSegments: curveSegments + }; + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // helper variables + + let groupStart = 0; + let groupCount = 0; + + // allow single and array values for "shapes" parameter + + if ( Array.isArray( shapes ) === false ) { + + addShape( shapes ); + + } else { + + for ( let i = 0; i < shapes.length; i ++ ) { + + addShape( shapes[ i ] ); + + this.addGroup( groupStart, groupCount, i ); // enables MultiMaterial support + + groupStart += groupCount; + groupCount = 0; + + } + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + + // helper functions + + function addShape( shape ) { + + const indexOffset = vertices.length / 3; + const points = shape.extractPoints( curveSegments ); + + let shapeVertices = points.shape; + const shapeHoles = points.holes; + + // check direction of vertices + + if ( ShapeUtils.isClockWise( shapeVertices ) === false ) { + + shapeVertices = shapeVertices.reverse(); + + } + + for ( let i = 0, l = shapeHoles.length; i < l; i ++ ) { + + const shapeHole = shapeHoles[ i ]; + + if ( ShapeUtils.isClockWise( shapeHole ) === true ) { + + shapeHoles[ i ] = shapeHole.reverse(); + + } + + } + + const faces = ShapeUtils.triangulateShape( shapeVertices, shapeHoles ); + + // join vertices of inner and outer paths to a single array + + for ( let i = 0, l = shapeHoles.length; i < l; i ++ ) { + + const shapeHole = shapeHoles[ i ]; + shapeVertices = shapeVertices.concat( shapeHole ); + + } + + // vertices, normals, uvs + + for ( let i = 0, l = shapeVertices.length; i < l; i ++ ) { + + const vertex = shapeVertices[ i ]; + + vertices.push( vertex.x, vertex.y, 0 ); + normals.push( 0, 0, 1 ); + uvs.push( vertex.x, vertex.y ); // world uvs + + } + + // indices + + for ( let i = 0, l = faces.length; i < l; i ++ ) { + + const face = faces[ i ]; + + const a = face[ 0 ] + indexOffset; + const b = face[ 1 ] + indexOffset; + const c = face[ 2 ] + indexOffset; + + indices.push( a, b, c ); + groupCount += 3; + + } + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + const shapes = this.parameters.shapes; + + return toJSON( shapes, data ); + + } + + static fromJSON( data, shapes ) { + + const geometryShapes = []; + + for ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) { + + const shape = shapes[ data.shapes[ j ] ]; + + geometryShapes.push( shape ); + + } + + return new ShapeGeometry( geometryShapes, data.curveSegments ); + + } + +} + +function toJSON( shapes, data ) { + + data.shapes = []; + + if ( Array.isArray( shapes ) ) { + + for ( let i = 0, l = shapes.length; i < l; i ++ ) { + + const shape = shapes[ i ]; + + data.shapes.push( shape.uuid ); + + } + + } else { + + data.shapes.push( shapes.uuid ); + + } + + return data; + +} + +class SphereGeometry extends BufferGeometry { + + constructor( radius = 1, widthSegments = 32, heightSegments = 16, phiStart = 0, phiLength = Math.PI * 2, thetaStart = 0, thetaLength = Math.PI ) { + + super(); + + this.type = 'SphereGeometry'; + + this.parameters = { + radius: radius, + widthSegments: widthSegments, + heightSegments: heightSegments, + phiStart: phiStart, + phiLength: phiLength, + thetaStart: thetaStart, + thetaLength: thetaLength + }; + + widthSegments = Math.max( 3, Math.floor( widthSegments ) ); + heightSegments = Math.max( 2, Math.floor( heightSegments ) ); + + const thetaEnd = Math.min( thetaStart + thetaLength, Math.PI ); + + let index = 0; + const grid = []; + + const vertex = new Vector3(); + const normal = new Vector3(); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // generate vertices, normals and uvs + + for ( let iy = 0; iy <= heightSegments; iy ++ ) { + + const verticesRow = []; + + const v = iy / heightSegments; + + // special case for the poles + + let uOffset = 0; + + if ( iy === 0 && thetaStart === 0 ) { + + uOffset = 0.5 / widthSegments; + + } else if ( iy === heightSegments && thetaEnd === Math.PI ) { + + uOffset = - 0.5 / widthSegments; + + } + + for ( let ix = 0; ix <= widthSegments; ix ++ ) { + + const u = ix / widthSegments; + + // vertex + + vertex.x = - radius * Math.cos( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength ); + vertex.y = radius * Math.cos( thetaStart + v * thetaLength ); + vertex.z = radius * Math.sin( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength ); + + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal + + normal.copy( vertex ).normalize(); + normals.push( normal.x, normal.y, normal.z ); + + // uv + + uvs.push( u + uOffset, 1 - v ); + + verticesRow.push( index ++ ); + + } + + grid.push( verticesRow ); + + } + + // indices + + for ( let iy = 0; iy < heightSegments; iy ++ ) { + + for ( let ix = 0; ix < widthSegments; ix ++ ) { + + const a = grid[ iy ][ ix + 1 ]; + const b = grid[ iy ][ ix ]; + const c = grid[ iy + 1 ][ ix ]; + const d = grid[ iy + 1 ][ ix + 1 ]; + + if ( iy !== 0 || thetaStart > 0 ) indices.push( a, b, d ); + if ( iy !== heightSegments - 1 || thetaEnd < Math.PI ) indices.push( b, c, d ); + + } + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new SphereGeometry( data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength ); + + } + +} + +class TetrahedronGeometry extends PolyhedronGeometry { + + constructor( radius = 1, detail = 0 ) { + + const vertices = [ + 1, 1, 1, - 1, - 1, 1, - 1, 1, - 1, 1, - 1, - 1 + ]; + + const indices = [ + 2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1 + ]; + + super( vertices, indices, radius, detail ); + + this.type = 'TetrahedronGeometry'; + + this.parameters = { + radius: radius, + detail: detail + }; + + } + + static fromJSON( data ) { + + return new TetrahedronGeometry( data.radius, data.detail ); + + } + +} + +class TorusGeometry extends BufferGeometry { + + constructor( radius = 1, tube = 0.4, radialSegments = 12, tubularSegments = 48, arc = Math.PI * 2 ) { + + super(); + + this.type = 'TorusGeometry'; + + this.parameters = { + radius: radius, + tube: tube, + radialSegments: radialSegments, + tubularSegments: tubularSegments, + arc: arc + }; + + radialSegments = Math.floor( radialSegments ); + tubularSegments = Math.floor( tubularSegments ); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // helper variables + + const center = new Vector3(); + const vertex = new Vector3(); + const normal = new Vector3(); + + // generate vertices, normals and uvs + + for ( let j = 0; j <= radialSegments; j ++ ) { + + for ( let i = 0; i <= tubularSegments; i ++ ) { + + const u = i / tubularSegments * arc; + const v = j / radialSegments * Math.PI * 2; + + // vertex + + vertex.x = ( radius + tube * Math.cos( v ) ) * Math.cos( u ); + vertex.y = ( radius + tube * Math.cos( v ) ) * Math.sin( u ); + vertex.z = tube * Math.sin( v ); + + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal + + center.x = radius * Math.cos( u ); + center.y = radius * Math.sin( u ); + normal.subVectors( vertex, center ).normalize(); + + normals.push( normal.x, normal.y, normal.z ); + + // uv + + uvs.push( i / tubularSegments ); + uvs.push( j / radialSegments ); + + } + + } + + // generate indices + + for ( let j = 1; j <= radialSegments; j ++ ) { + + for ( let i = 1; i <= tubularSegments; i ++ ) { + + // indices + + const a = ( tubularSegments + 1 ) * j + i - 1; + const b = ( tubularSegments + 1 ) * ( j - 1 ) + i - 1; + const c = ( tubularSegments + 1 ) * ( j - 1 ) + i; + const d = ( tubularSegments + 1 ) * j + i; + + // faces + + indices.push( a, b, d ); + indices.push( b, c, d ); + + } + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new TorusGeometry( data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc ); + + } + +} + +class TorusKnotGeometry extends BufferGeometry { + + constructor( radius = 1, tube = 0.4, tubularSegments = 64, radialSegments = 8, p = 2, q = 3 ) { + + super(); + + this.type = 'TorusKnotGeometry'; + + this.parameters = { + radius: radius, + tube: tube, + tubularSegments: tubularSegments, + radialSegments: radialSegments, + p: p, + q: q + }; + + tubularSegments = Math.floor( tubularSegments ); + radialSegments = Math.floor( radialSegments ); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // helper variables + + const vertex = new Vector3(); + const normal = new Vector3(); + + const P1 = new Vector3(); + const P2 = new Vector3(); + + const B = new Vector3(); + const T = new Vector3(); + const N = new Vector3(); + + // generate vertices, normals and uvs + + for ( let i = 0; i <= tubularSegments; ++ i ) { + + // the radian "u" is used to calculate the position on the torus curve of the current tubular segment + + const u = i / tubularSegments * p * Math.PI * 2; + + // now we calculate two points. P1 is our current position on the curve, P2 is a little farther ahead. + // these points are used to create a special "coordinate space", which is necessary to calculate the correct vertex positions + + calculatePositionOnCurve( u, p, q, radius, P1 ); + calculatePositionOnCurve( u + 0.01, p, q, radius, P2 ); + + // calculate orthonormal basis + + T.subVectors( P2, P1 ); + N.addVectors( P2, P1 ); + B.crossVectors( T, N ); + N.crossVectors( B, T ); + + // normalize B, N. T can be ignored, we don't use it + + B.normalize(); + N.normalize(); + + for ( let j = 0; j <= radialSegments; ++ j ) { + + // now calculate the vertices. they are nothing more than an extrusion of the torus curve. + // because we extrude a shape in the xy-plane, there is no need to calculate a z-value. + + const v = j / radialSegments * Math.PI * 2; + const cx = - tube * Math.cos( v ); + const cy = tube * Math.sin( v ); + + // now calculate the final vertex position. + // first we orient the extrusion with our basis vectors, then we add it to the current position on the curve + + vertex.x = P1.x + ( cx * N.x + cy * B.x ); + vertex.y = P1.y + ( cx * N.y + cy * B.y ); + vertex.z = P1.z + ( cx * N.z + cy * B.z ); + + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal (P1 is always the center/origin of the extrusion, thus we can use it to calculate the normal) + + normal.subVectors( vertex, P1 ).normalize(); + + normals.push( normal.x, normal.y, normal.z ); + + // uv + + uvs.push( i / tubularSegments ); + uvs.push( j / radialSegments ); + + } + + } + + // generate indices + + for ( let j = 1; j <= tubularSegments; j ++ ) { + + for ( let i = 1; i <= radialSegments; i ++ ) { + + // indices + + const a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 ); + const b = ( radialSegments + 1 ) * j + ( i - 1 ); + const c = ( radialSegments + 1 ) * j + i; + const d = ( radialSegments + 1 ) * ( j - 1 ) + i; + + // faces + + indices.push( a, b, d ); + indices.push( b, c, d ); + + } + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + // this function calculates the current position on the torus curve + + function calculatePositionOnCurve( u, p, q, radius, position ) { + + const cu = Math.cos( u ); + const su = Math.sin( u ); + const quOverP = q / p * u; + const cs = Math.cos( quOverP ); + + position.x = radius * ( 2 + cs ) * 0.5 * cu; + position.y = radius * ( 2 + cs ) * su * 0.5; + position.z = radius * Math.sin( quOverP ) * 0.5; + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new TorusKnotGeometry( data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q ); + + } + +} + +class TubeGeometry extends BufferGeometry { + + constructor( path = new QuadraticBezierCurve3( new Vector3( - 1, - 1, 0 ), new Vector3( - 1, 1, 0 ), new Vector3( 1, 1, 0 ) ), tubularSegments = 64, radius = 1, radialSegments = 8, closed = false ) { + + super(); + + this.type = 'TubeGeometry'; + + this.parameters = { + path: path, + tubularSegments: tubularSegments, + radius: radius, + radialSegments: radialSegments, + closed: closed + }; + + const frames = path.computeFrenetFrames( tubularSegments, closed ); + + // expose internals + + this.tangents = frames.tangents; + this.normals = frames.normals; + this.binormals = frames.binormals; + + // helper variables + + const vertex = new Vector3(); + const normal = new Vector3(); + const uv = new Vector2(); + let P = new Vector3(); + + // buffer + + const vertices = []; + const normals = []; + const uvs = []; + const indices = []; + + // create buffer data + + generateBufferData(); + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + // functions + + function generateBufferData() { + + for ( let i = 0; i < tubularSegments; i ++ ) { + + generateSegment( i ); + + } + + // if the geometry is not closed, generate the last row of vertices and normals + // at the regular position on the given path + // + // if the geometry is closed, duplicate the first row of vertices and normals (uvs will differ) + + generateSegment( ( closed === false ) ? tubularSegments : 0 ); + + // uvs are generated in a separate function. + // this makes it easy compute correct values for closed geometries + + generateUVs(); + + // finally create faces + + generateIndices(); + + } + + function generateSegment( i ) { + + // we use getPointAt to sample evenly distributed points from the given path + + P = path.getPointAt( i / tubularSegments, P ); + + // retrieve corresponding normal and binormal + + const N = frames.normals[ i ]; + const B = frames.binormals[ i ]; + + // generate normals and vertices for the current segment + + for ( let j = 0; j <= radialSegments; j ++ ) { + + const v = j / radialSegments * Math.PI * 2; + + const sin = Math.sin( v ); + const cos = - Math.cos( v ); + + // normal + + normal.x = ( cos * N.x + sin * B.x ); + normal.y = ( cos * N.y + sin * B.y ); + normal.z = ( cos * N.z + sin * B.z ); + normal.normalize(); + + normals.push( normal.x, normal.y, normal.z ); + + // vertex + + vertex.x = P.x + radius * normal.x; + vertex.y = P.y + radius * normal.y; + vertex.z = P.z + radius * normal.z; + + vertices.push( vertex.x, vertex.y, vertex.z ); + + } + + } + + function generateIndices() { + + for ( let j = 1; j <= tubularSegments; j ++ ) { + + for ( let i = 1; i <= radialSegments; i ++ ) { + + const a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 ); + const b = ( radialSegments + 1 ) * j + ( i - 1 ); + const c = ( radialSegments + 1 ) * j + i; + const d = ( radialSegments + 1 ) * ( j - 1 ) + i; + + // faces + + indices.push( a, b, d ); + indices.push( b, c, d ); + + } + + } + + } + + function generateUVs() { + + for ( let i = 0; i <= tubularSegments; i ++ ) { + + for ( let j = 0; j <= radialSegments; j ++ ) { + + uv.x = i / tubularSegments; + uv.y = j / radialSegments; + + uvs.push( uv.x, uv.y ); + + } + + } + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.path = this.parameters.path.toJSON(); + + return data; + + } + + static fromJSON( data ) { + + // This only works for built-in curves (e.g. CatmullRomCurve3). + // User defined curves or instances of CurvePath will not be deserialized. + return new TubeGeometry( + new Curves[ data.path.type ]().fromJSON( data.path ), + data.tubularSegments, + data.radius, + data.radialSegments, + data.closed + ); + + } + +} + +class WireframeGeometry extends BufferGeometry { + + constructor( geometry = null ) { + + super(); + + this.type = 'WireframeGeometry'; + + this.parameters = { + geometry: geometry + }; + + if ( geometry !== null ) { + + // buffer + + const vertices = []; + const edges = new Set(); + + // helper variables + + const start = new Vector3(); + const end = new Vector3(); + + if ( geometry.index !== null ) { + + // indexed BufferGeometry + + const position = geometry.attributes.position; + const indices = geometry.index; + let groups = geometry.groups; + + if ( groups.length === 0 ) { + + groups = [ { start: 0, count: indices.count, materialIndex: 0 } ]; + + } + + // create a data structure that contains all edges without duplicates + + for ( let o = 0, ol = groups.length; o < ol; ++ o ) { + + const group = groups[ o ]; + + const groupStart = group.start; + const groupCount = group.count; + + for ( let i = groupStart, l = ( groupStart + groupCount ); i < l; i += 3 ) { + + for ( let j = 0; j < 3; j ++ ) { + + const index1 = indices.getX( i + j ); + const index2 = indices.getX( i + ( j + 1 ) % 3 ); + + start.fromBufferAttribute( position, index1 ); + end.fromBufferAttribute( position, index2 ); + + if ( isUniqueEdge( start, end, edges ) === true ) { + + vertices.push( start.x, start.y, start.z ); + vertices.push( end.x, end.y, end.z ); + + } + + } + + } + + } + + } else { + + // non-indexed BufferGeometry + + const position = geometry.attributes.position; + + for ( let i = 0, l = ( position.count / 3 ); i < l; i ++ ) { + + for ( let j = 0; j < 3; j ++ ) { + + // three edges per triangle, an edge is represented as (index1, index2) + // e.g. the first triangle has the following edges: (0,1),(1,2),(2,0) + + const index1 = 3 * i + j; + const index2 = 3 * i + ( ( j + 1 ) % 3 ); + + start.fromBufferAttribute( position, index1 ); + end.fromBufferAttribute( position, index2 ); + + if ( isUniqueEdge( start, end, edges ) === true ) { + + vertices.push( start.x, start.y, start.z ); + vertices.push( end.x, end.y, end.z ); + + } + + } + + } + + } + + // build geometry + + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + +} + +function isUniqueEdge( start, end, edges ) { + + const hash1 = `${start.x},${start.y},${start.z}-${end.x},${end.y},${end.z}`; + const hash2 = `${end.x},${end.y},${end.z}-${start.x},${start.y},${start.z}`; // coincident edge + + if ( edges.has( hash1 ) === true || edges.has( hash2 ) === true ) { + + return false; + + } else { + + edges.add( hash1 ); + edges.add( hash2 ); + return true; + + } + +} + +var Geometries = /*#__PURE__*/Object.freeze({ + __proto__: null, + BoxGeometry: BoxGeometry, + CapsuleGeometry: CapsuleGeometry, + CircleGeometry: CircleGeometry, + ConeGeometry: ConeGeometry, + CylinderGeometry: CylinderGeometry, + DodecahedronGeometry: DodecahedronGeometry, + EdgesGeometry: EdgesGeometry, + ExtrudeGeometry: ExtrudeGeometry, + IcosahedronGeometry: IcosahedronGeometry, + LatheGeometry: LatheGeometry, + OctahedronGeometry: OctahedronGeometry, + PlaneGeometry: PlaneGeometry, + PolyhedronGeometry: PolyhedronGeometry, + RingGeometry: RingGeometry, + ShapeGeometry: ShapeGeometry, + SphereGeometry: SphereGeometry, + TetrahedronGeometry: TetrahedronGeometry, + TorusGeometry: TorusGeometry, + TorusKnotGeometry: TorusKnotGeometry, + TubeGeometry: TubeGeometry, + WireframeGeometry: WireframeGeometry +}); + +class ShadowMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isShadowMaterial = true; + + this.type = 'ShadowMaterial'; + + this.color = new Color( 0x000000 ); + this.transparent = true; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.fog = source.fog; + + return this; + + } + +} + +class RawShaderMaterial extends ShaderMaterial { + + constructor( parameters ) { + + super( parameters ); + + this.isRawShaderMaterial = true; + + this.type = 'RawShaderMaterial'; + + } + +} + +class MeshStandardMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshStandardMaterial = true; + + this.defines = { 'STANDARD': '' }; + + this.type = 'MeshStandardMaterial'; + + this.color = new Color( 0xffffff ); // diffuse + this.roughness = 1.0; + this.metalness = 0.0; + + this.map = null; + + this.lightMap = null; + this.lightMapIntensity = 1.0; + + this.aoMap = null; + this.aoMapIntensity = 1.0; + + this.emissive = new Color( 0x000000 ); + this.emissiveIntensity = 1.0; + this.emissiveMap = null; + + this.bumpMap = null; + this.bumpScale = 1; + + this.normalMap = null; + this.normalMapType = TangentSpaceNormalMap; + this.normalScale = new Vector2( 1, 1 ); + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.roughnessMap = null; + + this.metalnessMap = null; + + this.alphaMap = null; + + this.envMap = null; + this.envMapRotation = new Euler(); + this.envMapIntensity = 1.0; + + this.wireframe = false; + this.wireframeLinewidth = 1; + this.wireframeLinecap = 'round'; + this.wireframeLinejoin = 'round'; + + this.flatShading = false; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.defines = { 'STANDARD': '' }; + + this.color.copy( source.color ); + this.roughness = source.roughness; + this.metalness = source.metalness; + + this.map = source.map; + + this.lightMap = source.lightMap; + this.lightMapIntensity = source.lightMapIntensity; + + this.aoMap = source.aoMap; + this.aoMapIntensity = source.aoMapIntensity; + + this.emissive.copy( source.emissive ); + this.emissiveMap = source.emissiveMap; + this.emissiveIntensity = source.emissiveIntensity; + + this.bumpMap = source.bumpMap; + this.bumpScale = source.bumpScale; + + this.normalMap = source.normalMap; + this.normalMapType = source.normalMapType; + this.normalScale.copy( source.normalScale ); + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.roughnessMap = source.roughnessMap; + + this.metalnessMap = source.metalnessMap; + + this.alphaMap = source.alphaMap; + + this.envMap = source.envMap; + this.envMapRotation.copy( source.envMapRotation ); + this.envMapIntensity = source.envMapIntensity; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + this.wireframeLinecap = source.wireframeLinecap; + this.wireframeLinejoin = source.wireframeLinejoin; + + this.flatShading = source.flatShading; + + this.fog = source.fog; + + return this; + + } + +} + +class MeshPhysicalMaterial extends MeshStandardMaterial { + + constructor( parameters ) { + + super(); + + this.isMeshPhysicalMaterial = true; + + this.defines = { + + 'STANDARD': '', + 'PHYSICAL': '' + + }; + + this.type = 'MeshPhysicalMaterial'; + + this.anisotropyRotation = 0; + this.anisotropyMap = null; + + this.clearcoatMap = null; + this.clearcoatRoughness = 0.0; + this.clearcoatRoughnessMap = null; + this.clearcoatNormalScale = new Vector2( 1, 1 ); + this.clearcoatNormalMap = null; + + this.ior = 1.5; + + Object.defineProperty( this, 'reflectivity', { + get: function () { + + return ( clamp( 2.5 * ( this.ior - 1 ) / ( this.ior + 1 ), 0, 1 ) ); + + }, + set: function ( reflectivity ) { + + this.ior = ( 1 + 0.4 * reflectivity ) / ( 1 - 0.4 * reflectivity ); + + } + } ); + + this.iridescenceMap = null; + this.iridescenceIOR = 1.3; + this.iridescenceThicknessRange = [ 100, 400 ]; + this.iridescenceThicknessMap = null; + + this.sheenColor = new Color( 0x000000 ); + this.sheenColorMap = null; + this.sheenRoughness = 1.0; + this.sheenRoughnessMap = null; + + this.transmissionMap = null; + + this.thickness = 0; + this.thicknessMap = null; + this.attenuationDistance = Infinity; + this.attenuationColor = new Color( 1, 1, 1 ); + + this.specularIntensity = 1.0; + this.specularIntensityMap = null; + this.specularColor = new Color( 1, 1, 1 ); + this.specularColorMap = null; + + this._anisotropy = 0; + this._clearcoat = 0; + this._dispersion = 0; + this._iridescence = 0; + this._sheen = 0.0; + this._transmission = 0; + + this.setValues( parameters ); + + } + + get anisotropy() { + + return this._anisotropy; + + } + + set anisotropy( value ) { + + if ( this._anisotropy > 0 !== value > 0 ) { + + this.version ++; + + } + + this._anisotropy = value; + + } + + get clearcoat() { + + return this._clearcoat; + + } + + set clearcoat( value ) { + + if ( this._clearcoat > 0 !== value > 0 ) { + + this.version ++; + + } + + this._clearcoat = value; + + } + + get iridescence() { + + return this._iridescence; + + } + + set iridescence( value ) { + + if ( this._iridescence > 0 !== value > 0 ) { + + this.version ++; + + } + + this._iridescence = value; + + } + + get dispersion() { + + return this._dispersion; + + } + + set dispersion( value ) { + + if ( this._dispersion > 0 !== value > 0 ) { + + this.version ++; + + } + + this._dispersion = value; + + } + + get sheen() { + + return this._sheen; + + } + + set sheen( value ) { + + if ( this._sheen > 0 !== value > 0 ) { + + this.version ++; + + } + + this._sheen = value; + + } + + get transmission() { + + return this._transmission; + + } + + set transmission( value ) { + + if ( this._transmission > 0 !== value > 0 ) { + + this.version ++; + + } + + this._transmission = value; + + } + + copy( source ) { + + super.copy( source ); + + this.defines = { + + 'STANDARD': '', + 'PHYSICAL': '' + + }; + + this.anisotropy = source.anisotropy; + this.anisotropyRotation = source.anisotropyRotation; + this.anisotropyMap = source.anisotropyMap; + + this.clearcoat = source.clearcoat; + this.clearcoatMap = source.clearcoatMap; + this.clearcoatRoughness = source.clearcoatRoughness; + this.clearcoatRoughnessMap = source.clearcoatRoughnessMap; + this.clearcoatNormalMap = source.clearcoatNormalMap; + this.clearcoatNormalScale.copy( source.clearcoatNormalScale ); + + this.dispersion = source.dispersion; + this.ior = source.ior; + + this.iridescence = source.iridescence; + this.iridescenceMap = source.iridescenceMap; + this.iridescenceIOR = source.iridescenceIOR; + this.iridescenceThicknessRange = [ ...source.iridescenceThicknessRange ]; + this.iridescenceThicknessMap = source.iridescenceThicknessMap; + + this.sheen = source.sheen; + this.sheenColor.copy( source.sheenColor ); + this.sheenColorMap = source.sheenColorMap; + this.sheenRoughness = source.sheenRoughness; + this.sheenRoughnessMap = source.sheenRoughnessMap; + + this.transmission = source.transmission; + this.transmissionMap = source.transmissionMap; + + this.thickness = source.thickness; + this.thicknessMap = source.thicknessMap; + this.attenuationDistance = source.attenuationDistance; + this.attenuationColor.copy( source.attenuationColor ); + + this.specularIntensity = source.specularIntensity; + this.specularIntensityMap = source.specularIntensityMap; + this.specularColor.copy( source.specularColor ); + this.specularColorMap = source.specularColorMap; + + return this; + + } + +} + +class MeshPhongMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshPhongMaterial = true; + + this.type = 'MeshPhongMaterial'; + + this.color = new Color( 0xffffff ); // diffuse + this.specular = new Color( 0x111111 ); + this.shininess = 30; + + this.map = null; + + this.lightMap = null; + this.lightMapIntensity = 1.0; + + this.aoMap = null; + this.aoMapIntensity = 1.0; + + this.emissive = new Color( 0x000000 ); + this.emissiveIntensity = 1.0; + this.emissiveMap = null; + + this.bumpMap = null; + this.bumpScale = 1; + + this.normalMap = null; + this.normalMapType = TangentSpaceNormalMap; + this.normalScale = new Vector2( 1, 1 ); + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.specularMap = null; + + this.alphaMap = null; + + this.envMap = null; + this.envMapRotation = new Euler(); + this.combine = MultiplyOperation; + this.reflectivity = 1; + this.refractionRatio = 0.98; + + this.wireframe = false; + this.wireframeLinewidth = 1; + this.wireframeLinecap = 'round'; + this.wireframeLinejoin = 'round'; + + this.flatShading = false; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + this.specular.copy( source.specular ); + this.shininess = source.shininess; + + this.map = source.map; + + this.lightMap = source.lightMap; + this.lightMapIntensity = source.lightMapIntensity; + + this.aoMap = source.aoMap; + this.aoMapIntensity = source.aoMapIntensity; + + this.emissive.copy( source.emissive ); + this.emissiveMap = source.emissiveMap; + this.emissiveIntensity = source.emissiveIntensity; + + this.bumpMap = source.bumpMap; + this.bumpScale = source.bumpScale; + + this.normalMap = source.normalMap; + this.normalMapType = source.normalMapType; + this.normalScale.copy( source.normalScale ); + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.specularMap = source.specularMap; + + this.alphaMap = source.alphaMap; + + this.envMap = source.envMap; + this.envMapRotation.copy( source.envMapRotation ); + this.combine = source.combine; + this.reflectivity = source.reflectivity; + this.refractionRatio = source.refractionRatio; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + this.wireframeLinecap = source.wireframeLinecap; + this.wireframeLinejoin = source.wireframeLinejoin; + + this.flatShading = source.flatShading; + + this.fog = source.fog; + + return this; + + } + +} + +class MeshToonMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshToonMaterial = true; + + this.defines = { 'TOON': '' }; + + this.type = 'MeshToonMaterial'; + + this.color = new Color( 0xffffff ); + + this.map = null; + this.gradientMap = null; + + this.lightMap = null; + this.lightMapIntensity = 1.0; + + this.aoMap = null; + this.aoMapIntensity = 1.0; + + this.emissive = new Color( 0x000000 ); + this.emissiveIntensity = 1.0; + this.emissiveMap = null; + + this.bumpMap = null; + this.bumpScale = 1; + + this.normalMap = null; + this.normalMapType = TangentSpaceNormalMap; + this.normalScale = new Vector2( 1, 1 ); + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.alphaMap = null; + + this.wireframe = false; + this.wireframeLinewidth = 1; + this.wireframeLinecap = 'round'; + this.wireframeLinejoin = 'round'; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.map = source.map; + this.gradientMap = source.gradientMap; + + this.lightMap = source.lightMap; + this.lightMapIntensity = source.lightMapIntensity; + + this.aoMap = source.aoMap; + this.aoMapIntensity = source.aoMapIntensity; + + this.emissive.copy( source.emissive ); + this.emissiveMap = source.emissiveMap; + this.emissiveIntensity = source.emissiveIntensity; + + this.bumpMap = source.bumpMap; + this.bumpScale = source.bumpScale; + + this.normalMap = source.normalMap; + this.normalMapType = source.normalMapType; + this.normalScale.copy( source.normalScale ); + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.alphaMap = source.alphaMap; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + this.wireframeLinecap = source.wireframeLinecap; + this.wireframeLinejoin = source.wireframeLinejoin; + + this.fog = source.fog; + + return this; + + } + +} + +class MeshNormalMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshNormalMaterial = true; + + this.type = 'MeshNormalMaterial'; + + this.bumpMap = null; + this.bumpScale = 1; + + this.normalMap = null; + this.normalMapType = TangentSpaceNormalMap; + this.normalScale = new Vector2( 1, 1 ); + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.wireframe = false; + this.wireframeLinewidth = 1; + + this.flatShading = false; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.bumpMap = source.bumpMap; + this.bumpScale = source.bumpScale; + + this.normalMap = source.normalMap; + this.normalMapType = source.normalMapType; + this.normalScale.copy( source.normalScale ); + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + + this.flatShading = source.flatShading; + + return this; + + } + +} + +class MeshLambertMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshLambertMaterial = true; + + this.type = 'MeshLambertMaterial'; + + this.color = new Color( 0xffffff ); // diffuse + + this.map = null; + + this.lightMap = null; + this.lightMapIntensity = 1.0; + + this.aoMap = null; + this.aoMapIntensity = 1.0; + + this.emissive = new Color( 0x000000 ); + this.emissiveIntensity = 1.0; + this.emissiveMap = null; + + this.bumpMap = null; + this.bumpScale = 1; + + this.normalMap = null; + this.normalMapType = TangentSpaceNormalMap; + this.normalScale = new Vector2( 1, 1 ); + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.specularMap = null; + + this.alphaMap = null; + + this.envMap = null; + this.envMapRotation = new Euler(); + this.combine = MultiplyOperation; + this.reflectivity = 1; + this.refractionRatio = 0.98; + + this.wireframe = false; + this.wireframeLinewidth = 1; + this.wireframeLinecap = 'round'; + this.wireframeLinejoin = 'round'; + + this.flatShading = false; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.map = source.map; + + this.lightMap = source.lightMap; + this.lightMapIntensity = source.lightMapIntensity; + + this.aoMap = source.aoMap; + this.aoMapIntensity = source.aoMapIntensity; + + this.emissive.copy( source.emissive ); + this.emissiveMap = source.emissiveMap; + this.emissiveIntensity = source.emissiveIntensity; + + this.bumpMap = source.bumpMap; + this.bumpScale = source.bumpScale; + + this.normalMap = source.normalMap; + this.normalMapType = source.normalMapType; + this.normalScale.copy( source.normalScale ); + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.specularMap = source.specularMap; + + this.alphaMap = source.alphaMap; + + this.envMap = source.envMap; + this.envMapRotation.copy( source.envMapRotation ); + this.combine = source.combine; + this.reflectivity = source.reflectivity; + this.refractionRatio = source.refractionRatio; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + this.wireframeLinecap = source.wireframeLinecap; + this.wireframeLinejoin = source.wireframeLinejoin; + + this.flatShading = source.flatShading; + + this.fog = source.fog; + + return this; + + } + +} + +class MeshMatcapMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshMatcapMaterial = true; + + this.defines = { 'MATCAP': '' }; + + this.type = 'MeshMatcapMaterial'; + + this.color = new Color( 0xffffff ); // diffuse + + this.matcap = null; + + this.map = null; + + this.bumpMap = null; + this.bumpScale = 1; + + this.normalMap = null; + this.normalMapType = TangentSpaceNormalMap; + this.normalScale = new Vector2( 1, 1 ); + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.alphaMap = null; + + this.flatShading = false; + + this.fog = true; + + this.setValues( parameters ); + + } + + + copy( source ) { + + super.copy( source ); + + this.defines = { 'MATCAP': '' }; + + this.color.copy( source.color ); + + this.matcap = source.matcap; + + this.map = source.map; + + this.bumpMap = source.bumpMap; + this.bumpScale = source.bumpScale; + + this.normalMap = source.normalMap; + this.normalMapType = source.normalMapType; + this.normalScale.copy( source.normalScale ); + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.alphaMap = source.alphaMap; + + this.flatShading = source.flatShading; + + this.fog = source.fog; + + return this; + + } + +} + +class LineDashedMaterial extends LineBasicMaterial { + + constructor( parameters ) { + + super(); + + this.isLineDashedMaterial = true; + + this.type = 'LineDashedMaterial'; + + this.scale = 1; + this.dashSize = 3; + this.gapSize = 1; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.scale = source.scale; + this.dashSize = source.dashSize; + this.gapSize = source.gapSize; + + return this; + + } + +} + +// converts an array to a specific type +function convertArray( array, type, forceClone ) { + + if ( ! array || // let 'undefined' and 'null' pass + ! forceClone && array.constructor === type ) return array; + + if ( typeof type.BYTES_PER_ELEMENT === 'number' ) { + + return new type( array ); // create typed array + + } + + return Array.prototype.slice.call( array ); // create Array + +} + +function isTypedArray( object ) { + + return ArrayBuffer.isView( object ) && + ! ( object instanceof DataView ); + +} + +// returns an array by which times and values can be sorted +function getKeyframeOrder( times ) { + + function compareTime( i, j ) { + + return times[ i ] - times[ j ]; + + } + + const n = times.length; + const result = new Array( n ); + for ( let i = 0; i !== n; ++ i ) result[ i ] = i; + + result.sort( compareTime ); + + return result; + +} + +// uses the array previously returned by 'getKeyframeOrder' to sort data +function sortedArray( values, stride, order ) { + + const nValues = values.length; + const result = new values.constructor( nValues ); + + for ( let i = 0, dstOffset = 0; dstOffset !== nValues; ++ i ) { + + const srcOffset = order[ i ] * stride; + + for ( let j = 0; j !== stride; ++ j ) { + + result[ dstOffset ++ ] = values[ srcOffset + j ]; + + } + + } + + return result; + +} + +// function for parsing AOS keyframe formats +function flattenJSON( jsonKeys, times, values, valuePropertyName ) { + + let i = 1, key = jsonKeys[ 0 ]; + + while ( key !== undefined && key[ valuePropertyName ] === undefined ) { + + key = jsonKeys[ i ++ ]; + + } + + if ( key === undefined ) return; // no data + + let value = key[ valuePropertyName ]; + if ( value === undefined ) return; // no data + + if ( Array.isArray( value ) ) { + + do { + + value = key[ valuePropertyName ]; + + if ( value !== undefined ) { + + times.push( key.time ); + values.push.apply( values, value ); // push all elements + + } + + key = jsonKeys[ i ++ ]; + + } while ( key !== undefined ); + + } else if ( value.toArray !== undefined ) { + + // ...assume THREE.Math-ish + + do { + + value = key[ valuePropertyName ]; + + if ( value !== undefined ) { + + times.push( key.time ); + value.toArray( values, values.length ); + + } + + key = jsonKeys[ i ++ ]; + + } while ( key !== undefined ); + + } else { + + // otherwise push as-is + + do { + + value = key[ valuePropertyName ]; + + if ( value !== undefined ) { + + times.push( key.time ); + values.push( value ); + + } + + key = jsonKeys[ i ++ ]; + + } while ( key !== undefined ); + + } + +} + +function subclip( sourceClip, name, startFrame, endFrame, fps = 30 ) { + + const clip = sourceClip.clone(); + + clip.name = name; + + const tracks = []; + + for ( let i = 0; i < clip.tracks.length; ++ i ) { + + const track = clip.tracks[ i ]; + const valueSize = track.getValueSize(); + + const times = []; + const values = []; + + for ( let j = 0; j < track.times.length; ++ j ) { + + const frame = track.times[ j ] * fps; + + if ( frame < startFrame || frame >= endFrame ) continue; + + times.push( track.times[ j ] ); + + for ( let k = 0; k < valueSize; ++ k ) { + + values.push( track.values[ j * valueSize + k ] ); + + } + + } + + if ( times.length === 0 ) continue; + + track.times = convertArray( times, track.times.constructor ); + track.values = convertArray( values, track.values.constructor ); + + tracks.push( track ); + + } + + clip.tracks = tracks; + + // find minimum .times value across all tracks in the trimmed clip + + let minStartTime = Infinity; + + for ( let i = 0; i < clip.tracks.length; ++ i ) { + + if ( minStartTime > clip.tracks[ i ].times[ 0 ] ) { + + minStartTime = clip.tracks[ i ].times[ 0 ]; + + } + + } + + // shift all tracks such that clip begins at t=0 + + for ( let i = 0; i < clip.tracks.length; ++ i ) { + + clip.tracks[ i ].shift( - 1 * minStartTime ); + + } + + clip.resetDuration(); + + return clip; + +} + +function makeClipAdditive( targetClip, referenceFrame = 0, referenceClip = targetClip, fps = 30 ) { + + if ( fps <= 0 ) fps = 30; + + const numTracks = referenceClip.tracks.length; + const referenceTime = referenceFrame / fps; + + // Make each track's values relative to the values at the reference frame + for ( let i = 0; i < numTracks; ++ i ) { + + const referenceTrack = referenceClip.tracks[ i ]; + const referenceTrackType = referenceTrack.ValueTypeName; + + // Skip this track if it's non-numeric + if ( referenceTrackType === 'bool' || referenceTrackType === 'string' ) continue; + + // Find the track in the target clip whose name and type matches the reference track + const targetTrack = targetClip.tracks.find( function ( track ) { + + return track.name === referenceTrack.name + && track.ValueTypeName === referenceTrackType; + + } ); + + if ( targetTrack === undefined ) continue; + + let referenceOffset = 0; + const referenceValueSize = referenceTrack.getValueSize(); + + if ( referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) { + + referenceOffset = referenceValueSize / 3; + + } + + let targetOffset = 0; + const targetValueSize = targetTrack.getValueSize(); + + if ( targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) { + + targetOffset = targetValueSize / 3; + + } + + const lastIndex = referenceTrack.times.length - 1; + let referenceValue; + + // Find the value to subtract out of the track + if ( referenceTime <= referenceTrack.times[ 0 ] ) { + + // Reference frame is earlier than the first keyframe, so just use the first keyframe + const startIndex = referenceOffset; + const endIndex = referenceValueSize - referenceOffset; + referenceValue = referenceTrack.values.slice( startIndex, endIndex ); + + } else if ( referenceTime >= referenceTrack.times[ lastIndex ] ) { + + // Reference frame is after the last keyframe, so just use the last keyframe + const startIndex = lastIndex * referenceValueSize + referenceOffset; + const endIndex = startIndex + referenceValueSize - referenceOffset; + referenceValue = referenceTrack.values.slice( startIndex, endIndex ); + + } else { + + // Interpolate to the reference value + const interpolant = referenceTrack.createInterpolant(); + const startIndex = referenceOffset; + const endIndex = referenceValueSize - referenceOffset; + interpolant.evaluate( referenceTime ); + referenceValue = interpolant.resultBuffer.slice( startIndex, endIndex ); + + } + + // Conjugate the quaternion + if ( referenceTrackType === 'quaternion' ) { + + const referenceQuat = new Quaternion().fromArray( referenceValue ).normalize().conjugate(); + referenceQuat.toArray( referenceValue ); + + } + + // Subtract the reference value from all of the track values + + const numTimes = targetTrack.times.length; + for ( let j = 0; j < numTimes; ++ j ) { + + const valueStart = j * targetValueSize + targetOffset; + + if ( referenceTrackType === 'quaternion' ) { + + // Multiply the conjugate for quaternion track types + Quaternion.multiplyQuaternionsFlat( + targetTrack.values, + valueStart, + referenceValue, + 0, + targetTrack.values, + valueStart + ); + + } else { + + const valueEnd = targetValueSize - targetOffset * 2; + + // Subtract each value for all other numeric track types + for ( let k = 0; k < valueEnd; ++ k ) { + + targetTrack.values[ valueStart + k ] -= referenceValue[ k ]; + + } + + } + + } + + } + + targetClip.blendMode = AdditiveAnimationBlendMode; + + return targetClip; + +} + +const AnimationUtils = { + convertArray: convertArray, + isTypedArray: isTypedArray, + getKeyframeOrder: getKeyframeOrder, + sortedArray: sortedArray, + flattenJSON: flattenJSON, + subclip: subclip, + makeClipAdditive: makeClipAdditive +}; + +/** + * Abstract base class of interpolants over parametric samples. + * + * The parameter domain is one dimensional, typically the time or a path + * along a curve defined by the data. + * + * The sample values can have any dimensionality and derived classes may + * apply special interpretations to the data. + * + * This class provides the interval seek in a Template Method, deferring + * the actual interpolation to derived classes. + * + * Time complexity is O(1) for linear access crossing at most two points + * and O(log N) for random access, where N is the number of positions. + * + * References: + * + * http://www.oodesign.com/template-method-pattern.html + * + */ + +class Interpolant { + + constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { + + this.parameterPositions = parameterPositions; + this._cachedIndex = 0; + + this.resultBuffer = resultBuffer !== undefined ? + resultBuffer : new sampleValues.constructor( sampleSize ); + this.sampleValues = sampleValues; + this.valueSize = sampleSize; + + this.settings = null; + this.DefaultSettings_ = {}; + + } + + evaluate( t ) { + + const pp = this.parameterPositions; + let i1 = this._cachedIndex, + t1 = pp[ i1 ], + t0 = pp[ i1 - 1 ]; + + validate_interval: { + + seek: { + + let right; + + linear_scan: { + + //- See http://jsperf.com/comparison-to-undefined/3 + //- slower code: + //- + //- if ( t >= t1 || t1 === undefined ) { + forward_scan: if ( ! ( t < t1 ) ) { + + for ( let giveUpAt = i1 + 2; ; ) { + + if ( t1 === undefined ) { + + if ( t < t0 ) break forward_scan; + + // after end + + i1 = pp.length; + this._cachedIndex = i1; + return this.copySampleValue_( i1 - 1 ); + + } + + if ( i1 === giveUpAt ) break; // this loop + + t0 = t1; + t1 = pp[ ++ i1 ]; + + if ( t < t1 ) { + + // we have arrived at the sought interval + break seek; + + } + + } + + // prepare binary search on the right side of the index + right = pp.length; + break linear_scan; + + } + + //- slower code: + //- if ( t < t0 || t0 === undefined ) { + if ( ! ( t >= t0 ) ) { + + // looping? + + const t1global = pp[ 1 ]; + + if ( t < t1global ) { + + i1 = 2; // + 1, using the scan for the details + t0 = t1global; + + } + + // linear reverse scan + + for ( let giveUpAt = i1 - 2; ; ) { + + if ( t0 === undefined ) { + + // before start + + this._cachedIndex = 0; + return this.copySampleValue_( 0 ); + + } + + if ( i1 === giveUpAt ) break; // this loop + + t1 = t0; + t0 = pp[ -- i1 - 1 ]; + + if ( t >= t0 ) { + + // we have arrived at the sought interval + break seek; + + } + + } + + // prepare binary search on the left side of the index + right = i1; + i1 = 0; + break linear_scan; + + } + + // the interval is valid + + break validate_interval; + + } // linear scan + + // binary search + + while ( i1 < right ) { + + const mid = ( i1 + right ) >>> 1; + + if ( t < pp[ mid ] ) { + + right = mid; + + } else { + + i1 = mid + 1; + + } + + } + + t1 = pp[ i1 ]; + t0 = pp[ i1 - 1 ]; + + // check boundary cases, again + + if ( t0 === undefined ) { + + this._cachedIndex = 0; + return this.copySampleValue_( 0 ); + + } + + if ( t1 === undefined ) { + + i1 = pp.length; + this._cachedIndex = i1; + return this.copySampleValue_( i1 - 1 ); + + } + + } // seek + + this._cachedIndex = i1; + + this.intervalChanged_( i1, t0, t1 ); + + } // validate_interval + + return this.interpolate_( i1, t0, t, t1 ); + + } + + getSettings_() { + + return this.settings || this.DefaultSettings_; + + } + + copySampleValue_( index ) { + + // copies a sample value to the result buffer + + const result = this.resultBuffer, + values = this.sampleValues, + stride = this.valueSize, + offset = index * stride; + + for ( let i = 0; i !== stride; ++ i ) { + + result[ i ] = values[ offset + i ]; + + } + + return result; + + } + + // Template methods for derived classes: + + interpolate_( /* i1, t0, t, t1 */ ) { + + throw new Error( 'call to abstract method' ); + // implementations shall return this.resultBuffer + + } + + intervalChanged_( /* i1, t0, t1 */ ) { + + // empty + + } + +} + +/** + * Fast and simple cubic spline interpolant. + * + * It was derived from a Hermitian construction setting the first derivative + * at each sample position to the linear slope between neighboring positions + * over their parameter interval. + */ + +class CubicInterpolant extends Interpolant { + + constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { + + super( parameterPositions, sampleValues, sampleSize, resultBuffer ); + + this._weightPrev = - 0; + this._offsetPrev = - 0; + this._weightNext = - 0; + this._offsetNext = - 0; + + this.DefaultSettings_ = { + + endingStart: ZeroCurvatureEnding, + endingEnd: ZeroCurvatureEnding + + }; + + } + + intervalChanged_( i1, t0, t1 ) { + + const pp = this.parameterPositions; + let iPrev = i1 - 2, + iNext = i1 + 1, + + tPrev = pp[ iPrev ], + tNext = pp[ iNext ]; + + if ( tPrev === undefined ) { + + switch ( this.getSettings_().endingStart ) { + + case ZeroSlopeEnding: + + // f'(t0) = 0 + iPrev = i1; + tPrev = 2 * t0 - t1; + + break; + + case WrapAroundEnding: + + // use the other end of the curve + iPrev = pp.length - 2; + tPrev = t0 + pp[ iPrev ] - pp[ iPrev + 1 ]; + + break; + + default: // ZeroCurvatureEnding + + // f''(t0) = 0 a.k.a. Natural Spline + iPrev = i1; + tPrev = t1; + + } + + } + + if ( tNext === undefined ) { + + switch ( this.getSettings_().endingEnd ) { + + case ZeroSlopeEnding: + + // f'(tN) = 0 + iNext = i1; + tNext = 2 * t1 - t0; + + break; + + case WrapAroundEnding: + + // use the other end of the curve + iNext = 1; + tNext = t1 + pp[ 1 ] - pp[ 0 ]; + + break; + + default: // ZeroCurvatureEnding + + // f''(tN) = 0, a.k.a. Natural Spline + iNext = i1 - 1; + tNext = t0; + + } + + } + + const halfDt = ( t1 - t0 ) * 0.5, + stride = this.valueSize; + + this._weightPrev = halfDt / ( t0 - tPrev ); + this._weightNext = halfDt / ( tNext - t1 ); + this._offsetPrev = iPrev * stride; + this._offsetNext = iNext * stride; + + } + + interpolate_( i1, t0, t, t1 ) { + + const result = this.resultBuffer, + values = this.sampleValues, + stride = this.valueSize, + + o1 = i1 * stride, o0 = o1 - stride, + oP = this._offsetPrev, oN = this._offsetNext, + wP = this._weightPrev, wN = this._weightNext, + + p = ( t - t0 ) / ( t1 - t0 ), + pp = p * p, + ppp = pp * p; + + // evaluate polynomials + + const sP = - wP * ppp + 2 * wP * pp - wP * p; + const s0 = ( 1 + wP ) * ppp + ( - 1.5 - 2 * wP ) * pp + ( - 0.5 + wP ) * p + 1; + const s1 = ( - 1 - wN ) * ppp + ( 1.5 + wN ) * pp + 0.5 * p; + const sN = wN * ppp - wN * pp; + + // combine data linearly + + for ( let i = 0; i !== stride; ++ i ) { + + result[ i ] = + sP * values[ oP + i ] + + s0 * values[ o0 + i ] + + s1 * values[ o1 + i ] + + sN * values[ oN + i ]; + + } + + return result; + + } + +} + +class LinearInterpolant extends Interpolant { + + constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { + + super( parameterPositions, sampleValues, sampleSize, resultBuffer ); + + } + + interpolate_( i1, t0, t, t1 ) { + + const result = this.resultBuffer, + values = this.sampleValues, + stride = this.valueSize, + + offset1 = i1 * stride, + offset0 = offset1 - stride, + + weight1 = ( t - t0 ) / ( t1 - t0 ), + weight0 = 1 - weight1; + + for ( let i = 0; i !== stride; ++ i ) { + + result[ i ] = + values[ offset0 + i ] * weight0 + + values[ offset1 + i ] * weight1; + + } + + return result; + + } + +} + +/** + * + * Interpolant that evaluates to the sample value at the position preceding + * the parameter. + */ + +class DiscreteInterpolant extends Interpolant { + + constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { + + super( parameterPositions, sampleValues, sampleSize, resultBuffer ); + + } + + interpolate_( i1 /*, t0, t, t1 */ ) { + + return this.copySampleValue_( i1 - 1 ); + + } + +} + +class KeyframeTrack { + + constructor( name, times, values, interpolation ) { + + if ( name === undefined ) throw new Error( 'THREE.KeyframeTrack: track name is undefined' ); + if ( times === undefined || times.length === 0 ) throw new Error( 'THREE.KeyframeTrack: no keyframes in track named ' + name ); + + this.name = name; + + this.times = convertArray( times, this.TimeBufferType ); + this.values = convertArray( values, this.ValueBufferType ); + + this.setInterpolation( interpolation || this.DefaultInterpolation ); + + } + + // Serialization (in static context, because of constructor invocation + // and automatic invocation of .toJSON): + + static toJSON( track ) { + + const trackType = track.constructor; + + let json; + + // derived classes can define a static toJSON method + if ( trackType.toJSON !== this.toJSON ) { + + json = trackType.toJSON( track ); + + } else { + + // by default, we assume the data can be serialized as-is + json = { + + 'name': track.name, + 'times': convertArray( track.times, Array ), + 'values': convertArray( track.values, Array ) + + }; + + const interpolation = track.getInterpolation(); + + if ( interpolation !== track.DefaultInterpolation ) { + + json.interpolation = interpolation; + + } + + } + + json.type = track.ValueTypeName; // mandatory + + return json; + + } + + InterpolantFactoryMethodDiscrete( result ) { + + return new DiscreteInterpolant( this.times, this.values, this.getValueSize(), result ); + + } + + InterpolantFactoryMethodLinear( result ) { + + return new LinearInterpolant( this.times, this.values, this.getValueSize(), result ); + + } + + InterpolantFactoryMethodSmooth( result ) { + + return new CubicInterpolant( this.times, this.values, this.getValueSize(), result ); + + } + + setInterpolation( interpolation ) { + + let factoryMethod; + + switch ( interpolation ) { + + case InterpolateDiscrete: + + factoryMethod = this.InterpolantFactoryMethodDiscrete; + + break; + + case InterpolateLinear: + + factoryMethod = this.InterpolantFactoryMethodLinear; + + break; + + case InterpolateSmooth: + + factoryMethod = this.InterpolantFactoryMethodSmooth; + + break; + + } + + if ( factoryMethod === undefined ) { + + const message = 'unsupported interpolation for ' + + this.ValueTypeName + ' keyframe track named ' + this.name; + + if ( this.createInterpolant === undefined ) { + + // fall back to default, unless the default itself is messed up + if ( interpolation !== this.DefaultInterpolation ) { + + this.setInterpolation( this.DefaultInterpolation ); + + } else { + + throw new Error( message ); // fatal, in this case + + } + + } + + console.warn( 'THREE.KeyframeTrack:', message ); + return this; + + } + + this.createInterpolant = factoryMethod; + + return this; + + } + + getInterpolation() { + + switch ( this.createInterpolant ) { + + case this.InterpolantFactoryMethodDiscrete: + + return InterpolateDiscrete; + + case this.InterpolantFactoryMethodLinear: + + return InterpolateLinear; + + case this.InterpolantFactoryMethodSmooth: + + return InterpolateSmooth; + + } + + } + + getValueSize() { + + return this.values.length / this.times.length; + + } + + // move all keyframes either forwards or backwards in time + shift( timeOffset ) { + + if ( timeOffset !== 0.0 ) { + + const times = this.times; + + for ( let i = 0, n = times.length; i !== n; ++ i ) { + + times[ i ] += timeOffset; + + } + + } + + return this; + + } + + // scale all keyframe times by a factor (useful for frame <-> seconds conversions) + scale( timeScale ) { + + if ( timeScale !== 1.0 ) { + + const times = this.times; + + for ( let i = 0, n = times.length; i !== n; ++ i ) { + + times[ i ] *= timeScale; + + } + + } + + return this; + + } + + // removes keyframes before and after animation without changing any values within the range [startTime, endTime]. + // IMPORTANT: We do not shift around keys to the start of the track time, because for interpolated keys this will change their values + trim( startTime, endTime ) { + + const times = this.times, + nKeys = times.length; + + let from = 0, + to = nKeys - 1; + + while ( from !== nKeys && times[ from ] < startTime ) { + + ++ from; + + } + + while ( to !== - 1 && times[ to ] > endTime ) { + + -- to; + + } + + ++ to; // inclusive -> exclusive bound + + if ( from !== 0 || to !== nKeys ) { + + // empty tracks are forbidden, so keep at least one keyframe + if ( from >= to ) { + + to = Math.max( to, 1 ); + from = to - 1; + + } + + const stride = this.getValueSize(); + this.times = times.slice( from, to ); + this.values = this.values.slice( from * stride, to * stride ); + + } + + return this; + + } + + // ensure we do not get a GarbageInGarbageOut situation, make sure tracks are at least minimally viable + validate() { + + let valid = true; + + const valueSize = this.getValueSize(); + if ( valueSize - Math.floor( valueSize ) !== 0 ) { + + console.error( 'THREE.KeyframeTrack: Invalid value size in track.', this ); + valid = false; + + } + + const times = this.times, + values = this.values, + + nKeys = times.length; + + if ( nKeys === 0 ) { + + console.error( 'THREE.KeyframeTrack: Track is empty.', this ); + valid = false; + + } + + let prevTime = null; + + for ( let i = 0; i !== nKeys; i ++ ) { + + const currTime = times[ i ]; + + if ( typeof currTime === 'number' && isNaN( currTime ) ) { + + console.error( 'THREE.KeyframeTrack: Time is not a valid number.', this, i, currTime ); + valid = false; + break; + + } + + if ( prevTime !== null && prevTime > currTime ) { + + console.error( 'THREE.KeyframeTrack: Out of order keys.', this, i, currTime, prevTime ); + valid = false; + break; + + } + + prevTime = currTime; + + } + + if ( values !== undefined ) { + + if ( isTypedArray( values ) ) { + + for ( let i = 0, n = values.length; i !== n; ++ i ) { + + const value = values[ i ]; + + if ( isNaN( value ) ) { + + console.error( 'THREE.KeyframeTrack: Value is not a valid number.', this, i, value ); + valid = false; + break; + + } + + } + + } + + } + + return valid; + + } + + // removes equivalent sequential keys as common in morph target sequences + // (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0) + optimize() { + + // times or values may be shared with other tracks, so overwriting is unsafe + const times = this.times.slice(), + values = this.values.slice(), + stride = this.getValueSize(), + + smoothInterpolation = this.getInterpolation() === InterpolateSmooth, + + lastIndex = times.length - 1; + + let writeIndex = 1; + + for ( let i = 1; i < lastIndex; ++ i ) { + + let keep = false; + + const time = times[ i ]; + const timeNext = times[ i + 1 ]; + + // remove adjacent keyframes scheduled at the same time + + if ( time !== timeNext && ( i !== 1 || time !== times[ 0 ] ) ) { + + if ( ! smoothInterpolation ) { + + // remove unnecessary keyframes same as their neighbors + + const offset = i * stride, + offsetP = offset - stride, + offsetN = offset + stride; + + for ( let j = 0; j !== stride; ++ j ) { + + const value = values[ offset + j ]; + + if ( value !== values[ offsetP + j ] || + value !== values[ offsetN + j ] ) { + + keep = true; + break; + + } + + } + + } else { + + keep = true; + + } + + } + + // in-place compaction + + if ( keep ) { + + if ( i !== writeIndex ) { + + times[ writeIndex ] = times[ i ]; + + const readOffset = i * stride, + writeOffset = writeIndex * stride; + + for ( let j = 0; j !== stride; ++ j ) { + + values[ writeOffset + j ] = values[ readOffset + j ]; + + } + + } + + ++ writeIndex; + + } + + } + + // flush last keyframe (compaction looks ahead) + + if ( lastIndex > 0 ) { + + times[ writeIndex ] = times[ lastIndex ]; + + for ( let readOffset = lastIndex * stride, writeOffset = writeIndex * stride, j = 0; j !== stride; ++ j ) { + + values[ writeOffset + j ] = values[ readOffset + j ]; + + } + + ++ writeIndex; + + } + + if ( writeIndex !== times.length ) { + + this.times = times.slice( 0, writeIndex ); + this.values = values.slice( 0, writeIndex * stride ); + + } else { + + this.times = times; + this.values = values; + + } + + return this; + + } + + clone() { + + const times = this.times.slice(); + const values = this.values.slice(); + + const TypedKeyframeTrack = this.constructor; + const track = new TypedKeyframeTrack( this.name, times, values ); + + // Interpolant argument to constructor is not saved, so copy the factory method directly. + track.createInterpolant = this.createInterpolant; + + return track; + + } + +} + +KeyframeTrack.prototype.TimeBufferType = Float32Array; +KeyframeTrack.prototype.ValueBufferType = Float32Array; +KeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear; + +/** + * A Track of Boolean keyframe values. + */ +class BooleanKeyframeTrack extends KeyframeTrack {} + +BooleanKeyframeTrack.prototype.ValueTypeName = 'bool'; +BooleanKeyframeTrack.prototype.ValueBufferType = Array; +BooleanKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete; +BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined; +BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined; + +/** + * A Track of keyframe values that represent color. + */ +class ColorKeyframeTrack extends KeyframeTrack {} + +ColorKeyframeTrack.prototype.ValueTypeName = 'color'; + +/** + * A Track of numeric keyframe values. + */ +class NumberKeyframeTrack extends KeyframeTrack {} + +NumberKeyframeTrack.prototype.ValueTypeName = 'number'; + +/** + * Spherical linear unit quaternion interpolant. + */ + +class QuaternionLinearInterpolant extends Interpolant { + + constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { + + super( parameterPositions, sampleValues, sampleSize, resultBuffer ); + + } + + interpolate_( i1, t0, t, t1 ) { + + const result = this.resultBuffer, + values = this.sampleValues, + stride = this.valueSize, + + alpha = ( t - t0 ) / ( t1 - t0 ); + + let offset = i1 * stride; + + for ( let end = offset + stride; offset !== end; offset += 4 ) { + + Quaternion.slerpFlat( result, 0, values, offset - stride, values, offset, alpha ); + + } + + return result; + + } + +} + +/** + * A Track of quaternion keyframe values. + */ +class QuaternionKeyframeTrack extends KeyframeTrack { + + InterpolantFactoryMethodLinear( result ) { + + return new QuaternionLinearInterpolant( this.times, this.values, this.getValueSize(), result ); + + } + +} + +QuaternionKeyframeTrack.prototype.ValueTypeName = 'quaternion'; +// ValueBufferType is inherited +QuaternionKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear; +QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined; + +/** + * A Track that interpolates Strings + */ +class StringKeyframeTrack extends KeyframeTrack {} + +StringKeyframeTrack.prototype.ValueTypeName = 'string'; +StringKeyframeTrack.prototype.ValueBufferType = Array; +StringKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete; +StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined; +StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined; + +/** + * A Track of vectored keyframe values. + */ +class VectorKeyframeTrack extends KeyframeTrack {} + +VectorKeyframeTrack.prototype.ValueTypeName = 'vector'; + +class AnimationClip { + + constructor( name = '', duration = - 1, tracks = [], blendMode = NormalAnimationBlendMode ) { + + this.name = name; + this.tracks = tracks; + this.duration = duration; + this.blendMode = blendMode; + + this.uuid = generateUUID(); + + // this means it should figure out its duration by scanning the tracks + if ( this.duration < 0 ) { + + this.resetDuration(); + + } + + } + + + static parse( json ) { + + const tracks = [], + jsonTracks = json.tracks, + frameTime = 1.0 / ( json.fps || 1.0 ); + + for ( let i = 0, n = jsonTracks.length; i !== n; ++ i ) { + + tracks.push( parseKeyframeTrack( jsonTracks[ i ] ).scale( frameTime ) ); + + } + + const clip = new this( json.name, json.duration, tracks, json.blendMode ); + clip.uuid = json.uuid; + + return clip; + + } + + static toJSON( clip ) { + + const tracks = [], + clipTracks = clip.tracks; + + const json = { + + 'name': clip.name, + 'duration': clip.duration, + 'tracks': tracks, + 'uuid': clip.uuid, + 'blendMode': clip.blendMode + + }; + + for ( let i = 0, n = clipTracks.length; i !== n; ++ i ) { + + tracks.push( KeyframeTrack.toJSON( clipTracks[ i ] ) ); + + } + + return json; + + } + + static CreateFromMorphTargetSequence( name, morphTargetSequence, fps, noLoop ) { + + const numMorphTargets = morphTargetSequence.length; + const tracks = []; + + for ( let i = 0; i < numMorphTargets; i ++ ) { + + let times = []; + let values = []; + + times.push( + ( i + numMorphTargets - 1 ) % numMorphTargets, + i, + ( i + 1 ) % numMorphTargets ); + + values.push( 0, 1, 0 ); + + const order = getKeyframeOrder( times ); + times = sortedArray( times, 1, order ); + values = sortedArray( values, 1, order ); + + // if there is a key at the first frame, duplicate it as the + // last frame as well for perfect loop. + if ( ! noLoop && times[ 0 ] === 0 ) { + + times.push( numMorphTargets ); + values.push( values[ 0 ] ); + + } + + tracks.push( + new NumberKeyframeTrack( + '.morphTargetInfluences[' + morphTargetSequence[ i ].name + ']', + times, values + ).scale( 1.0 / fps ) ); + + } + + return new this( name, - 1, tracks ); + + } + + static findByName( objectOrClipArray, name ) { + + let clipArray = objectOrClipArray; + + if ( ! Array.isArray( objectOrClipArray ) ) { + + const o = objectOrClipArray; + clipArray = o.geometry && o.geometry.animations || o.animations; + + } + + for ( let i = 0; i < clipArray.length; i ++ ) { + + if ( clipArray[ i ].name === name ) { + + return clipArray[ i ]; + + } + + } + + return null; + + } + + static CreateClipsFromMorphTargetSequences( morphTargets, fps, noLoop ) { + + const animationToMorphTargets = {}; + + // tested with https://regex101.com/ on trick sequences + // such flamingo_flyA_003, flamingo_run1_003, crdeath0059 + const pattern = /^([\w-]*?)([\d]+)$/; + + // sort morph target names into animation groups based + // patterns like Walk_001, Walk_002, Run_001, Run_002 + for ( let i = 0, il = morphTargets.length; i < il; i ++ ) { + + const morphTarget = morphTargets[ i ]; + const parts = morphTarget.name.match( pattern ); + + if ( parts && parts.length > 1 ) { + + const name = parts[ 1 ]; + + let animationMorphTargets = animationToMorphTargets[ name ]; + + if ( ! animationMorphTargets ) { + + animationToMorphTargets[ name ] = animationMorphTargets = []; + + } + + animationMorphTargets.push( morphTarget ); + + } + + } + + const clips = []; + + for ( const name in animationToMorphTargets ) { + + clips.push( this.CreateFromMorphTargetSequence( name, animationToMorphTargets[ name ], fps, noLoop ) ); + + } + + return clips; + + } + + // parse the animation.hierarchy format + static parseAnimation( animation, bones ) { + + if ( ! animation ) { + + console.error( 'THREE.AnimationClip: No animation in JSONLoader data.' ); + return null; + + } + + const addNonemptyTrack = function ( trackType, trackName, animationKeys, propertyName, destTracks ) { + + // only return track if there are actually keys. + if ( animationKeys.length !== 0 ) { + + const times = []; + const values = []; + + flattenJSON( animationKeys, times, values, propertyName ); + + // empty keys are filtered out, so check again + if ( times.length !== 0 ) { + + destTracks.push( new trackType( trackName, times, values ) ); + + } + + } + + }; + + const tracks = []; + + const clipName = animation.name || 'default'; + const fps = animation.fps || 30; + const blendMode = animation.blendMode; + + // automatic length determination in AnimationClip. + let duration = animation.length || - 1; + + const hierarchyTracks = animation.hierarchy || []; + + for ( let h = 0; h < hierarchyTracks.length; h ++ ) { + + const animationKeys = hierarchyTracks[ h ].keys; + + // skip empty tracks + if ( ! animationKeys || animationKeys.length === 0 ) continue; + + // process morph targets + if ( animationKeys[ 0 ].morphTargets ) { + + // figure out all morph targets used in this track + const morphTargetNames = {}; + + let k; + + for ( k = 0; k < animationKeys.length; k ++ ) { + + if ( animationKeys[ k ].morphTargets ) { + + for ( let m = 0; m < animationKeys[ k ].morphTargets.length; m ++ ) { + + morphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = - 1; + + } + + } + + } + + // create a track for each morph target with all zero + // morphTargetInfluences except for the keys in which + // the morphTarget is named. + for ( const morphTargetName in morphTargetNames ) { + + const times = []; + const values = []; + + for ( let m = 0; m !== animationKeys[ k ].morphTargets.length; ++ m ) { + + const animationKey = animationKeys[ k ]; + + times.push( animationKey.time ); + values.push( ( animationKey.morphTarget === morphTargetName ) ? 1 : 0 ); + + } + + tracks.push( new NumberKeyframeTrack( '.morphTargetInfluence[' + morphTargetName + ']', times, values ) ); + + } + + duration = morphTargetNames.length * fps; + + } else { + + // ...assume skeletal animation + + const boneName = '.bones[' + bones[ h ].name + ']'; + + addNonemptyTrack( + VectorKeyframeTrack, boneName + '.position', + animationKeys, 'pos', tracks ); + + addNonemptyTrack( + QuaternionKeyframeTrack, boneName + '.quaternion', + animationKeys, 'rot', tracks ); + + addNonemptyTrack( + VectorKeyframeTrack, boneName + '.scale', + animationKeys, 'scl', tracks ); + + } + + } + + if ( tracks.length === 0 ) { + + return null; + + } + + const clip = new this( clipName, duration, tracks, blendMode ); + + return clip; + + } + + resetDuration() { + + const tracks = this.tracks; + let duration = 0; + + for ( let i = 0, n = tracks.length; i !== n; ++ i ) { + + const track = this.tracks[ i ]; + + duration = Math.max( duration, track.times[ track.times.length - 1 ] ); + + } + + this.duration = duration; + + return this; + + } + + trim() { + + for ( let i = 0; i < this.tracks.length; i ++ ) { + + this.tracks[ i ].trim( 0, this.duration ); + + } + + return this; + + } + + validate() { + + let valid = true; + + for ( let i = 0; i < this.tracks.length; i ++ ) { + + valid = valid && this.tracks[ i ].validate(); + + } + + return valid; + + } + + optimize() { + + for ( let i = 0; i < this.tracks.length; i ++ ) { + + this.tracks[ i ].optimize(); + + } + + return this; + + } + + clone() { + + const tracks = []; + + for ( let i = 0; i < this.tracks.length; i ++ ) { + + tracks.push( this.tracks[ i ].clone() ); + + } + + return new this.constructor( this.name, this.duration, tracks, this.blendMode ); + + } + + toJSON() { + + return this.constructor.toJSON( this ); + + } + +} + +function getTrackTypeForValueTypeName( typeName ) { + + switch ( typeName.toLowerCase() ) { + + case 'scalar': + case 'double': + case 'float': + case 'number': + case 'integer': + + return NumberKeyframeTrack; + + case 'vector': + case 'vector2': + case 'vector3': + case 'vector4': + + return VectorKeyframeTrack; + + case 'color': + + return ColorKeyframeTrack; + + case 'quaternion': + + return QuaternionKeyframeTrack; + + case 'bool': + case 'boolean': + + return BooleanKeyframeTrack; + + case 'string': + + return StringKeyframeTrack; + + } + + throw new Error( 'THREE.KeyframeTrack: Unsupported typeName: ' + typeName ); + +} + +function parseKeyframeTrack( json ) { + + if ( json.type === undefined ) { + + throw new Error( 'THREE.KeyframeTrack: track type undefined, can not parse' ); + + } + + const trackType = getTrackTypeForValueTypeName( json.type ); + + if ( json.times === undefined ) { + + const times = [], values = []; + + flattenJSON( json.keys, times, values, 'value' ); + + json.times = times; + json.values = values; + + } + + // derived classes can define a static parse method + if ( trackType.parse !== undefined ) { + + return trackType.parse( json ); + + } else { + + // by default, we assume a constructor compatible with the base + return new trackType( json.name, json.times, json.values, json.interpolation ); + + } + +} + +const Cache = { + + enabled: false, + + files: {}, + + add: function ( key, file ) { + + if ( this.enabled === false ) return; + + // console.log( 'THREE.Cache', 'Adding key:', key ); + + this.files[ key ] = file; + + }, + + get: function ( key ) { + + if ( this.enabled === false ) return; + + // console.log( 'THREE.Cache', 'Checking key:', key ); + + return this.files[ key ]; + + }, + + remove: function ( key ) { + + delete this.files[ key ]; + + }, + + clear: function () { + + this.files = {}; + + } + +}; + +class LoadingManager { + + constructor( onLoad, onProgress, onError ) { + + const scope = this; + + let isLoading = false; + let itemsLoaded = 0; + let itemsTotal = 0; + let urlModifier = undefined; + const handlers = []; + + // Refer to #5689 for the reason why we don't set .onStart + // in the constructor + + this.onStart = undefined; + this.onLoad = onLoad; + this.onProgress = onProgress; + this.onError = onError; + + this.itemStart = function ( url ) { + + itemsTotal ++; + + if ( isLoading === false ) { + + if ( scope.onStart !== undefined ) { + + scope.onStart( url, itemsLoaded, itemsTotal ); + + } + + } + + isLoading = true; + + }; + + this.itemEnd = function ( url ) { + + itemsLoaded ++; + + if ( scope.onProgress !== undefined ) { + + scope.onProgress( url, itemsLoaded, itemsTotal ); + + } + + if ( itemsLoaded === itemsTotal ) { + + isLoading = false; + + if ( scope.onLoad !== undefined ) { + + scope.onLoad(); + + } + + } + + }; + + this.itemError = function ( url ) { + + if ( scope.onError !== undefined ) { + + scope.onError( url ); + + } + + }; + + this.resolveURL = function ( url ) { + + if ( urlModifier ) { + + return urlModifier( url ); + + } + + return url; + + }; + + this.setURLModifier = function ( transform ) { + + urlModifier = transform; + + return this; + + }; + + this.addHandler = function ( regex, loader ) { + + handlers.push( regex, loader ); + + return this; + + }; + + this.removeHandler = function ( regex ) { + + const index = handlers.indexOf( regex ); + + if ( index !== - 1 ) { + + handlers.splice( index, 2 ); + + } + + return this; + + }; + + this.getHandler = function ( file ) { + + for ( let i = 0, l = handlers.length; i < l; i += 2 ) { + + const regex = handlers[ i ]; + const loader = handlers[ i + 1 ]; + + if ( regex.global ) regex.lastIndex = 0; // see #17920 + + if ( regex.test( file ) ) { + + return loader; + + } + + } + + return null; + + }; + + } + +} + +const DefaultLoadingManager = /*@__PURE__*/ new LoadingManager(); + +class Loader { + + constructor( manager ) { + + this.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager; + + this.crossOrigin = 'anonymous'; + this.withCredentials = false; + this.path = ''; + this.resourcePath = ''; + this.requestHeader = {}; + + } + + load( /* url, onLoad, onProgress, onError */ ) {} + + loadAsync( url, onProgress ) { + + const scope = this; + + return new Promise( function ( resolve, reject ) { + + scope.load( url, resolve, onProgress, reject ); + + } ); + + } + + parse( /* data */ ) {} + + setCrossOrigin( crossOrigin ) { + + this.crossOrigin = crossOrigin; + return this; + + } + + setWithCredentials( value ) { + + this.withCredentials = value; + return this; + + } + + setPath( path ) { + + this.path = path; + return this; + + } + + setResourcePath( resourcePath ) { + + this.resourcePath = resourcePath; + return this; + + } + + setRequestHeader( requestHeader ) { + + this.requestHeader = requestHeader; + return this; + + } + +} + +Loader.DEFAULT_MATERIAL_NAME = '__DEFAULT'; + +const loading = {}; + +class HttpError extends Error { + + constructor( message, response ) { + + super( message ); + this.response = response; + + } + +} + +class FileLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + if ( url === undefined ) url = ''; + + if ( this.path !== undefined ) url = this.path + url; + + url = this.manager.resolveURL( url ); + + const cached = Cache.get( url ); + + if ( cached !== undefined ) { + + this.manager.itemStart( url ); + + setTimeout( () => { + + if ( onLoad ) onLoad( cached ); + + this.manager.itemEnd( url ); + + }, 0 ); + + return cached; + + } + + // Check if request is duplicate + + if ( loading[ url ] !== undefined ) { + + loading[ url ].push( { + + onLoad: onLoad, + onProgress: onProgress, + onError: onError + + } ); + + return; + + } + + // Initialise array for duplicate requests + loading[ url ] = []; + + loading[ url ].push( { + onLoad: onLoad, + onProgress: onProgress, + onError: onError, + } ); + + // create request + const req = new Request( url, { + headers: new Headers( this.requestHeader ), + credentials: this.withCredentials ? 'include' : 'same-origin', + // An abort controller could be added within a future PR + } ); + + // record states ( avoid data race ) + const mimeType = this.mimeType; + const responseType = this.responseType; + + // start the fetch + fetch( req ) + .then( response => { + + if ( response.status === 200 || response.status === 0 ) { + + // Some browsers return HTTP Status 0 when using non-http protocol + // e.g. 'file://' or 'data://'. Handle as success. + + if ( response.status === 0 ) { + + console.warn( 'THREE.FileLoader: HTTP Status 0 received.' ); + + } + + // Workaround: Checking if response.body === undefined for Alipay browser #23548 + + if ( typeof ReadableStream === 'undefined' || response.body === undefined || response.body.getReader === undefined ) { + + return response; + + } + + const callbacks = loading[ url ]; + const reader = response.body.getReader(); + + // Nginx needs X-File-Size check + // https://serverfault.com/questions/482875/why-does-nginx-remove-content-length-header-for-chunked-content + const contentLength = response.headers.get( 'X-File-Size' ) || response.headers.get( 'Content-Length' ); + const total = contentLength ? parseInt( contentLength ) : 0; + const lengthComputable = total !== 0; + let loaded = 0; + + // periodically read data into the new stream tracking while download progress + const stream = new ReadableStream( { + start( controller ) { + + readData(); + + function readData() { + + reader.read().then( ( { done, value } ) => { + + if ( done ) { + + controller.close(); + + } else { + + loaded += value.byteLength; + + const event = new ProgressEvent( 'progress', { lengthComputable, loaded, total } ); + for ( let i = 0, il = callbacks.length; i < il; i ++ ) { + + const callback = callbacks[ i ]; + if ( callback.onProgress ) callback.onProgress( event ); + + } + + controller.enqueue( value ); + readData(); + + } + + } ); + + } + + } + + } ); + + return new Response( stream ); + + } else { + + throw new HttpError( `fetch for "${response.url}" responded with ${response.status}: ${response.statusText}`, response ); + + } + + } ) + .then( response => { + + switch ( responseType ) { + + case 'arraybuffer': + + return response.arrayBuffer(); + + case 'blob': + + return response.blob(); + + case 'document': + + return response.text() + .then( text => { + + const parser = new DOMParser(); + return parser.parseFromString( text, mimeType ); + + } ); + + case 'json': + + return response.json(); + + default: + + if ( mimeType === undefined ) { + + return response.text(); + + } else { + + // sniff encoding + const re = /charset="?([^;"\s]*)"?/i; + const exec = re.exec( mimeType ); + const label = exec && exec[ 1 ] ? exec[ 1 ].toLowerCase() : undefined; + const decoder = new TextDecoder( label ); + return response.arrayBuffer().then( ab => decoder.decode( ab ) ); + + } + + } + + } ) + .then( data => { + + // Add to cache only on HTTP success, so that we do not cache + // error response bodies as proper responses to requests. + Cache.add( url, data ); + + const callbacks = loading[ url ]; + delete loading[ url ]; + + for ( let i = 0, il = callbacks.length; i < il; i ++ ) { + + const callback = callbacks[ i ]; + if ( callback.onLoad ) callback.onLoad( data ); + + } + + } ) + .catch( err => { + + // Abort errors and other errors are handled the same + + const callbacks = loading[ url ]; + + if ( callbacks === undefined ) { + + // When onLoad was called and url was deleted in `loading` + this.manager.itemError( url ); + throw err; + + } + + delete loading[ url ]; + + for ( let i = 0, il = callbacks.length; i < il; i ++ ) { + + const callback = callbacks[ i ]; + if ( callback.onError ) callback.onError( err ); + + } + + this.manager.itemError( url ); + + } ) + .finally( () => { + + this.manager.itemEnd( url ); + + } ); + + this.manager.itemStart( url ); + + } + + setResponseType( value ) { + + this.responseType = value; + return this; + + } + + setMimeType( value ) { + + this.mimeType = value; + return this; + + } + +} + +class AnimationLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( JSON.parse( text ) ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( json ) { + + const animations = []; + + for ( let i = 0; i < json.length; i ++ ) { + + const clip = AnimationClip.parse( json[ i ] ); + + animations.push( clip ); + + } + + return animations; + + } + +} + +/** + * Abstract Base class to block based textures loader (dds, pvr, ...) + * + * Sub classes have to implement the parse() method which will be used in load(). + */ + +class CompressedTextureLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const images = []; + + const texture = new CompressedTexture(); + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + + let loaded = 0; + + function loadTexture( i ) { + + loader.load( url[ i ], function ( buffer ) { + + const texDatas = scope.parse( buffer, true ); + + images[ i ] = { + width: texDatas.width, + height: texDatas.height, + format: texDatas.format, + mipmaps: texDatas.mipmaps + }; + + loaded += 1; + + if ( loaded === 6 ) { + + if ( texDatas.mipmapCount === 1 ) texture.minFilter = LinearFilter; + + texture.image = images; + texture.format = texDatas.format; + texture.needsUpdate = true; + + if ( onLoad ) onLoad( texture ); + + } + + }, onProgress, onError ); + + } + + if ( Array.isArray( url ) ) { + + for ( let i = 0, il = url.length; i < il; ++ i ) { + + loadTexture( i ); + + } + + } else { + + // compressed cubemap texture stored in a single DDS file + + loader.load( url, function ( buffer ) { + + const texDatas = scope.parse( buffer, true ); + + if ( texDatas.isCubemap ) { + + const faces = texDatas.mipmaps.length / texDatas.mipmapCount; + + for ( let f = 0; f < faces; f ++ ) { + + images[ f ] = { mipmaps: [] }; + + for ( let i = 0; i < texDatas.mipmapCount; i ++ ) { + + images[ f ].mipmaps.push( texDatas.mipmaps[ f * texDatas.mipmapCount + i ] ); + images[ f ].format = texDatas.format; + images[ f ].width = texDatas.width; + images[ f ].height = texDatas.height; + + } + + } + + texture.image = images; + + } else { + + texture.image.width = texDatas.width; + texture.image.height = texDatas.height; + texture.mipmaps = texDatas.mipmaps; + + } + + if ( texDatas.mipmapCount === 1 ) { + + texture.minFilter = LinearFilter; + + } + + texture.format = texDatas.format; + texture.needsUpdate = true; + + if ( onLoad ) onLoad( texture ); + + }, onProgress, onError ); + + } + + return texture; + + } + +} + +class ImageLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + if ( this.path !== undefined ) url = this.path + url; + + url = this.manager.resolveURL( url ); + + const scope = this; + + const cached = Cache.get( url ); + + if ( cached !== undefined ) { + + scope.manager.itemStart( url ); + + setTimeout( function () { + + if ( onLoad ) onLoad( cached ); + + scope.manager.itemEnd( url ); + + }, 0 ); + + return cached; + + } + + const image = createElementNS( 'img' ); + + function onImageLoad() { + + removeEventListeners(); + + Cache.add( url, this ); + + if ( onLoad ) onLoad( this ); + + scope.manager.itemEnd( url ); + + } + + function onImageError( event ) { + + removeEventListeners(); + + if ( onError ) onError( event ); + + scope.manager.itemError( url ); + scope.manager.itemEnd( url ); + + } + + function removeEventListeners() { + + image.removeEventListener( 'load', onImageLoad, false ); + image.removeEventListener( 'error', onImageError, false ); + + } + + image.addEventListener( 'load', onImageLoad, false ); + image.addEventListener( 'error', onImageError, false ); + + if ( url.slice( 0, 5 ) !== 'data:' ) { + + if ( this.crossOrigin !== undefined ) image.crossOrigin = this.crossOrigin; + + } + + scope.manager.itemStart( url ); + + image.src = url; + + return image; + + } + +} + +class CubeTextureLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( urls, onLoad, onProgress, onError ) { + + const texture = new CubeTexture(); + texture.colorSpace = SRGBColorSpace; + + const loader = new ImageLoader( this.manager ); + loader.setCrossOrigin( this.crossOrigin ); + loader.setPath( this.path ); + + let loaded = 0; + + function loadTexture( i ) { + + loader.load( urls[ i ], function ( image ) { + + texture.images[ i ] = image; + + loaded ++; + + if ( loaded === 6 ) { + + texture.needsUpdate = true; + + if ( onLoad ) onLoad( texture ); + + } + + }, undefined, onError ); + + } + + for ( let i = 0; i < urls.length; ++ i ) { + + loadTexture( i ); + + } + + return texture; + + } + +} + +/** + * Abstract Base class to load generic binary textures formats (rgbe, hdr, ...) + * + * Sub classes have to implement the parse() method which will be used in load(). + */ + +class DataTextureLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const texture = new DataTexture(); + + const loader = new FileLoader( this.manager ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( this.requestHeader ); + loader.setPath( this.path ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( buffer ) { + + let texData; + + try { + + texData = scope.parse( buffer ); + + } catch ( error ) { + + if ( onError !== undefined ) { + + onError( error ); + + } else { + + console.error( error ); + return; + + } + + } + + if ( texData.image !== undefined ) { + + texture.image = texData.image; + + } else if ( texData.data !== undefined ) { + + texture.image.width = texData.width; + texture.image.height = texData.height; + texture.image.data = texData.data; + + } + + texture.wrapS = texData.wrapS !== undefined ? texData.wrapS : ClampToEdgeWrapping; + texture.wrapT = texData.wrapT !== undefined ? texData.wrapT : ClampToEdgeWrapping; + + texture.magFilter = texData.magFilter !== undefined ? texData.magFilter : LinearFilter; + texture.minFilter = texData.minFilter !== undefined ? texData.minFilter : LinearFilter; + + texture.anisotropy = texData.anisotropy !== undefined ? texData.anisotropy : 1; + + if ( texData.colorSpace !== undefined ) { + + texture.colorSpace = texData.colorSpace; + + } + + if ( texData.flipY !== undefined ) { + + texture.flipY = texData.flipY; + + } + + if ( texData.format !== undefined ) { + + texture.format = texData.format; + + } + + if ( texData.type !== undefined ) { + + texture.type = texData.type; + + } + + if ( texData.mipmaps !== undefined ) { + + texture.mipmaps = texData.mipmaps; + texture.minFilter = LinearMipmapLinearFilter; // presumably... + + } + + if ( texData.mipmapCount === 1 ) { + + texture.minFilter = LinearFilter; + + } + + if ( texData.generateMipmaps !== undefined ) { + + texture.generateMipmaps = texData.generateMipmaps; + + } + + texture.needsUpdate = true; + + if ( onLoad ) onLoad( texture, texData ); + + }, onProgress, onError ); + + + return texture; + + } + +} + +class TextureLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const texture = new Texture(); + + const loader = new ImageLoader( this.manager ); + loader.setCrossOrigin( this.crossOrigin ); + loader.setPath( this.path ); + + loader.load( url, function ( image ) { + + texture.image = image; + texture.needsUpdate = true; + + if ( onLoad !== undefined ) { + + onLoad( texture ); + + } + + }, onProgress, onError ); + + return texture; + + } + +} + +class Light extends Object3D { + + constructor( color, intensity = 1 ) { + + super(); + + this.isLight = true; + + this.type = 'Light'; + + this.color = new Color( color ); + this.intensity = intensity; + + } + + dispose() { + + // Empty here in base class; some subclasses override. + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.color.copy( source.color ); + this.intensity = source.intensity; + + return this; + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + data.object.color = this.color.getHex(); + data.object.intensity = this.intensity; + + if ( this.groundColor !== undefined ) data.object.groundColor = this.groundColor.getHex(); + + if ( this.distance !== undefined ) data.object.distance = this.distance; + if ( this.angle !== undefined ) data.object.angle = this.angle; + if ( this.decay !== undefined ) data.object.decay = this.decay; + if ( this.penumbra !== undefined ) data.object.penumbra = this.penumbra; + + if ( this.shadow !== undefined ) data.object.shadow = this.shadow.toJSON(); + + return data; + + } + +} + +class HemisphereLight extends Light { + + constructor( skyColor, groundColor, intensity ) { + + super( skyColor, intensity ); + + this.isHemisphereLight = true; + + this.type = 'HemisphereLight'; + + this.position.copy( Object3D.DEFAULT_UP ); + this.updateMatrix(); + + this.groundColor = new Color( groundColor ); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.groundColor.copy( source.groundColor ); + + return this; + + } + +} + +const _projScreenMatrix$1 = /*@__PURE__*/ new Matrix4(); +const _lightPositionWorld$1 = /*@__PURE__*/ new Vector3(); +const _lookTarget$1 = /*@__PURE__*/ new Vector3(); + +class LightShadow { + + constructor( camera ) { + + this.camera = camera; + + this.bias = 0; + this.normalBias = 0; + this.radius = 1; + this.blurSamples = 8; + + this.mapSize = new Vector2( 512, 512 ); + + this.map = null; + this.mapPass = null; + this.matrix = new Matrix4(); + + this.autoUpdate = true; + this.needsUpdate = false; + + this._frustum = new Frustum(); + this._frameExtents = new Vector2( 1, 1 ); + + this._viewportCount = 1; + + this._viewports = [ + + new Vector4( 0, 0, 1, 1 ) + + ]; + + } + + getViewportCount() { + + return this._viewportCount; + + } + + getFrustum() { + + return this._frustum; + + } + + updateMatrices( light ) { + + const shadowCamera = this.camera; + const shadowMatrix = this.matrix; + + _lightPositionWorld$1.setFromMatrixPosition( light.matrixWorld ); + shadowCamera.position.copy( _lightPositionWorld$1 ); + + _lookTarget$1.setFromMatrixPosition( light.target.matrixWorld ); + shadowCamera.lookAt( _lookTarget$1 ); + shadowCamera.updateMatrixWorld(); + + _projScreenMatrix$1.multiplyMatrices( shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse ); + this._frustum.setFromProjectionMatrix( _projScreenMatrix$1 ); + + shadowMatrix.set( + 0.5, 0.0, 0.0, 0.5, + 0.0, 0.5, 0.0, 0.5, + 0.0, 0.0, 0.5, 0.5, + 0.0, 0.0, 0.0, 1.0 + ); + + shadowMatrix.multiply( _projScreenMatrix$1 ); + + } + + getViewport( viewportIndex ) { + + return this._viewports[ viewportIndex ]; + + } + + getFrameExtents() { + + return this._frameExtents; + + } + + dispose() { + + if ( this.map ) { + + this.map.dispose(); + + } + + if ( this.mapPass ) { + + this.mapPass.dispose(); + + } + + } + + copy( source ) { + + this.camera = source.camera.clone(); + + this.bias = source.bias; + this.radius = source.radius; + + this.mapSize.copy( source.mapSize ); + + return this; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + toJSON() { + + const object = {}; + + if ( this.bias !== 0 ) object.bias = this.bias; + if ( this.normalBias !== 0 ) object.normalBias = this.normalBias; + if ( this.radius !== 1 ) object.radius = this.radius; + if ( this.mapSize.x !== 512 || this.mapSize.y !== 512 ) object.mapSize = this.mapSize.toArray(); + + object.camera = this.camera.toJSON( false ).object; + delete object.camera.matrix; + + return object; + + } + +} + +class SpotLightShadow extends LightShadow { + + constructor() { + + super( new PerspectiveCamera( 50, 1, 0.5, 500 ) ); + + this.isSpotLightShadow = true; + + this.focus = 1; + + } + + updateMatrices( light ) { + + const camera = this.camera; + + const fov = RAD2DEG * 2 * light.angle * this.focus; + const aspect = this.mapSize.width / this.mapSize.height; + const far = light.distance || camera.far; + + if ( fov !== camera.fov || aspect !== camera.aspect || far !== camera.far ) { + + camera.fov = fov; + camera.aspect = aspect; + camera.far = far; + camera.updateProjectionMatrix(); + + } + + super.updateMatrices( light ); + + } + + copy( source ) { + + super.copy( source ); + + this.focus = source.focus; + + return this; + + } + +} + +class SpotLight extends Light { + + constructor( color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 2 ) { + + super( color, intensity ); + + this.isSpotLight = true; + + this.type = 'SpotLight'; + + this.position.copy( Object3D.DEFAULT_UP ); + this.updateMatrix(); + + this.target = new Object3D(); + + this.distance = distance; + this.angle = angle; + this.penumbra = penumbra; + this.decay = decay; + + this.map = null; + + this.shadow = new SpotLightShadow(); + + } + + get power() { + + // compute the light's luminous power (in lumens) from its intensity (in candela) + // by convention for a spotlight, luminous power (lm) = π * luminous intensity (cd) + return this.intensity * Math.PI; + + } + + set power( power ) { + + // set the light's intensity (in candela) from the desired luminous power (in lumens) + this.intensity = power / Math.PI; + + } + + dispose() { + + this.shadow.dispose(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.distance = source.distance; + this.angle = source.angle; + this.penumbra = source.penumbra; + this.decay = source.decay; + + this.target = source.target.clone(); + + this.shadow = source.shadow.clone(); + + return this; + + } + +} + +const _projScreenMatrix = /*@__PURE__*/ new Matrix4(); +const _lightPositionWorld = /*@__PURE__*/ new Vector3(); +const _lookTarget = /*@__PURE__*/ new Vector3(); + +class PointLightShadow extends LightShadow { + + constructor() { + + super( new PerspectiveCamera( 90, 1, 0.5, 500 ) ); + + this.isPointLightShadow = true; + + this._frameExtents = new Vector2( 4, 2 ); + + this._viewportCount = 6; + + this._viewports = [ + // These viewports map a cube-map onto a 2D texture with the + // following orientation: + // + // xzXZ + // y Y + // + // X - Positive x direction + // x - Negative x direction + // Y - Positive y direction + // y - Negative y direction + // Z - Positive z direction + // z - Negative z direction + + // positive X + new Vector4( 2, 1, 1, 1 ), + // negative X + new Vector4( 0, 1, 1, 1 ), + // positive Z + new Vector4( 3, 1, 1, 1 ), + // negative Z + new Vector4( 1, 1, 1, 1 ), + // positive Y + new Vector4( 3, 0, 1, 1 ), + // negative Y + new Vector4( 1, 0, 1, 1 ) + ]; + + this._cubeDirections = [ + new Vector3( 1, 0, 0 ), new Vector3( - 1, 0, 0 ), new Vector3( 0, 0, 1 ), + new Vector3( 0, 0, - 1 ), new Vector3( 0, 1, 0 ), new Vector3( 0, - 1, 0 ) + ]; + + this._cubeUps = [ + new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ), + new Vector3( 0, 1, 0 ), new Vector3( 0, 0, 1 ), new Vector3( 0, 0, - 1 ) + ]; + + } + + updateMatrices( light, viewportIndex = 0 ) { + + const camera = this.camera; + const shadowMatrix = this.matrix; + + const far = light.distance || camera.far; + + if ( far !== camera.far ) { + + camera.far = far; + camera.updateProjectionMatrix(); + + } + + _lightPositionWorld.setFromMatrixPosition( light.matrixWorld ); + camera.position.copy( _lightPositionWorld ); + + _lookTarget.copy( camera.position ); + _lookTarget.add( this._cubeDirections[ viewportIndex ] ); + camera.up.copy( this._cubeUps[ viewportIndex ] ); + camera.lookAt( _lookTarget ); + camera.updateMatrixWorld(); + + shadowMatrix.makeTranslation( - _lightPositionWorld.x, - _lightPositionWorld.y, - _lightPositionWorld.z ); + + _projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse ); + this._frustum.setFromProjectionMatrix( _projScreenMatrix ); + + } + +} + +class PointLight extends Light { + + constructor( color, intensity, distance = 0, decay = 2 ) { + + super( color, intensity ); + + this.isPointLight = true; + + this.type = 'PointLight'; + + this.distance = distance; + this.decay = decay; + + this.shadow = new PointLightShadow(); + + } + + get power() { + + // compute the light's luminous power (in lumens) from its intensity (in candela) + // for an isotropic light source, luminous power (lm) = 4 π luminous intensity (cd) + return this.intensity * 4 * Math.PI; + + } + + set power( power ) { + + // set the light's intensity (in candela) from the desired luminous power (in lumens) + this.intensity = power / ( 4 * Math.PI ); + + } + + dispose() { + + this.shadow.dispose(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.distance = source.distance; + this.decay = source.decay; + + this.shadow = source.shadow.clone(); + + return this; + + } + +} + +class DirectionalLightShadow extends LightShadow { + + constructor() { + + super( new OrthographicCamera( - 5, 5, 5, - 5, 0.5, 500 ) ); + + this.isDirectionalLightShadow = true; + + } + +} + +class DirectionalLight extends Light { + + constructor( color, intensity ) { + + super( color, intensity ); + + this.isDirectionalLight = true; + + this.type = 'DirectionalLight'; + + this.position.copy( Object3D.DEFAULT_UP ); + this.updateMatrix(); + + this.target = new Object3D(); + + this.shadow = new DirectionalLightShadow(); + + } + + dispose() { + + this.shadow.dispose(); + + } + + copy( source ) { + + super.copy( source ); + + this.target = source.target.clone(); + this.shadow = source.shadow.clone(); + + return this; + + } + +} + +class AmbientLight extends Light { + + constructor( color, intensity ) { + + super( color, intensity ); + + this.isAmbientLight = true; + + this.type = 'AmbientLight'; + + } + +} + +class RectAreaLight extends Light { + + constructor( color, intensity, width = 10, height = 10 ) { + + super( color, intensity ); + + this.isRectAreaLight = true; + + this.type = 'RectAreaLight'; + + this.width = width; + this.height = height; + + } + + get power() { + + // compute the light's luminous power (in lumens) from its intensity (in nits) + return this.intensity * this.width * this.height * Math.PI; + + } + + set power( power ) { + + // set the light's intensity (in nits) from the desired luminous power (in lumens) + this.intensity = power / ( this.width * this.height * Math.PI ); + + } + + copy( source ) { + + super.copy( source ); + + this.width = source.width; + this.height = source.height; + + return this; + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + data.object.width = this.width; + data.object.height = this.height; + + return data; + + } + +} + +/** + * Primary reference: + * https://graphics.stanford.edu/papers/envmap/envmap.pdf + * + * Secondary reference: + * https://www.ppsloan.org/publications/StupidSH36.pdf + */ + +// 3-band SH defined by 9 coefficients + +class SphericalHarmonics3 { + + constructor() { + + this.isSphericalHarmonics3 = true; + + this.coefficients = []; + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients.push( new Vector3() ); + + } + + } + + set( coefficients ) { + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients[ i ].copy( coefficients[ i ] ); + + } + + return this; + + } + + zero() { + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients[ i ].set( 0, 0, 0 ); + + } + + return this; + + } + + // get the radiance in the direction of the normal + // target is a Vector3 + getAt( normal, target ) { + + // normal is assumed to be unit length + + const x = normal.x, y = normal.y, z = normal.z; + + const coeff = this.coefficients; + + // band 0 + target.copy( coeff[ 0 ] ).multiplyScalar( 0.282095 ); + + // band 1 + target.addScaledVector( coeff[ 1 ], 0.488603 * y ); + target.addScaledVector( coeff[ 2 ], 0.488603 * z ); + target.addScaledVector( coeff[ 3 ], 0.488603 * x ); + + // band 2 + target.addScaledVector( coeff[ 4 ], 1.092548 * ( x * y ) ); + target.addScaledVector( coeff[ 5 ], 1.092548 * ( y * z ) ); + target.addScaledVector( coeff[ 6 ], 0.315392 * ( 3.0 * z * z - 1.0 ) ); + target.addScaledVector( coeff[ 7 ], 1.092548 * ( x * z ) ); + target.addScaledVector( coeff[ 8 ], 0.546274 * ( x * x - y * y ) ); + + return target; + + } + + // get the irradiance (radiance convolved with cosine lobe) in the direction of the normal + // target is a Vector3 + // https://graphics.stanford.edu/papers/envmap/envmap.pdf + getIrradianceAt( normal, target ) { + + // normal is assumed to be unit length + + const x = normal.x, y = normal.y, z = normal.z; + + const coeff = this.coefficients; + + // band 0 + target.copy( coeff[ 0 ] ).multiplyScalar( 0.886227 ); // π * 0.282095 + + // band 1 + target.addScaledVector( coeff[ 1 ], 2.0 * 0.511664 * y ); // ( 2 * π / 3 ) * 0.488603 + target.addScaledVector( coeff[ 2 ], 2.0 * 0.511664 * z ); + target.addScaledVector( coeff[ 3 ], 2.0 * 0.511664 * x ); + + // band 2 + target.addScaledVector( coeff[ 4 ], 2.0 * 0.429043 * x * y ); // ( π / 4 ) * 1.092548 + target.addScaledVector( coeff[ 5 ], 2.0 * 0.429043 * y * z ); + target.addScaledVector( coeff[ 6 ], 0.743125 * z * z - 0.247708 ); // ( π / 4 ) * 0.315392 * 3 + target.addScaledVector( coeff[ 7 ], 2.0 * 0.429043 * x * z ); + target.addScaledVector( coeff[ 8 ], 0.429043 * ( x * x - y * y ) ); // ( π / 4 ) * 0.546274 + + return target; + + } + + add( sh ) { + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients[ i ].add( sh.coefficients[ i ] ); + + } + + return this; + + } + + addScaledSH( sh, s ) { + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients[ i ].addScaledVector( sh.coefficients[ i ], s ); + + } + + return this; + + } + + scale( s ) { + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients[ i ].multiplyScalar( s ); + + } + + return this; + + } + + lerp( sh, alpha ) { + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients[ i ].lerp( sh.coefficients[ i ], alpha ); + + } + + return this; + + } + + equals( sh ) { + + for ( let i = 0; i < 9; i ++ ) { + + if ( ! this.coefficients[ i ].equals( sh.coefficients[ i ] ) ) { + + return false; + + } + + } + + return true; + + } + + copy( sh ) { + + return this.set( sh.coefficients ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + fromArray( array, offset = 0 ) { + + const coefficients = this.coefficients; + + for ( let i = 0; i < 9; i ++ ) { + + coefficients[ i ].fromArray( array, offset + ( i * 3 ) ); + + } + + return this; + + } + + toArray( array = [], offset = 0 ) { + + const coefficients = this.coefficients; + + for ( let i = 0; i < 9; i ++ ) { + + coefficients[ i ].toArray( array, offset + ( i * 3 ) ); + + } + + return array; + + } + + // evaluate the basis functions + // shBasis is an Array[ 9 ] + static getBasisAt( normal, shBasis ) { + + // normal is assumed to be unit length + + const x = normal.x, y = normal.y, z = normal.z; + + // band 0 + shBasis[ 0 ] = 0.282095; + + // band 1 + shBasis[ 1 ] = 0.488603 * y; + shBasis[ 2 ] = 0.488603 * z; + shBasis[ 3 ] = 0.488603 * x; + + // band 2 + shBasis[ 4 ] = 1.092548 * x * y; + shBasis[ 5 ] = 1.092548 * y * z; + shBasis[ 6 ] = 0.315392 * ( 3 * z * z - 1 ); + shBasis[ 7 ] = 1.092548 * x * z; + shBasis[ 8 ] = 0.546274 * ( x * x - y * y ); + + } + +} + +class LightProbe extends Light { + + constructor( sh = new SphericalHarmonics3(), intensity = 1 ) { + + super( undefined, intensity ); + + this.isLightProbe = true; + + this.sh = sh; + + } + + copy( source ) { + + super.copy( source ); + + this.sh.copy( source.sh ); + + return this; + + } + + fromJSON( json ) { + + this.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON(); + this.sh.fromArray( json.sh ); + + return this; + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + data.object.sh = this.sh.toArray(); + + return data; + + } + +} + +class MaterialLoader extends Loader { + + constructor( manager ) { + + super( manager ); + this.textures = {}; + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( JSON.parse( text ) ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( json ) { + + const textures = this.textures; + + function getTexture( name ) { + + if ( textures[ name ] === undefined ) { + + console.warn( 'THREE.MaterialLoader: Undefined texture', name ); + + } + + return textures[ name ]; + + } + + const material = MaterialLoader.createMaterialFromType( json.type ); + + if ( json.uuid !== undefined ) material.uuid = json.uuid; + if ( json.name !== undefined ) material.name = json.name; + if ( json.color !== undefined && material.color !== undefined ) material.color.setHex( json.color ); + if ( json.roughness !== undefined ) material.roughness = json.roughness; + if ( json.metalness !== undefined ) material.metalness = json.metalness; + if ( json.sheen !== undefined ) material.sheen = json.sheen; + if ( json.sheenColor !== undefined ) material.sheenColor = new Color().setHex( json.sheenColor ); + if ( json.sheenRoughness !== undefined ) material.sheenRoughness = json.sheenRoughness; + if ( json.emissive !== undefined && material.emissive !== undefined ) material.emissive.setHex( json.emissive ); + if ( json.specular !== undefined && material.specular !== undefined ) material.specular.setHex( json.specular ); + if ( json.specularIntensity !== undefined ) material.specularIntensity = json.specularIntensity; + if ( json.specularColor !== undefined && material.specularColor !== undefined ) material.specularColor.setHex( json.specularColor ); + if ( json.shininess !== undefined ) material.shininess = json.shininess; + if ( json.clearcoat !== undefined ) material.clearcoat = json.clearcoat; + if ( json.clearcoatRoughness !== undefined ) material.clearcoatRoughness = json.clearcoatRoughness; + if ( json.dispersion !== undefined ) material.dispersion = json.dispersion; + if ( json.iridescence !== undefined ) material.iridescence = json.iridescence; + if ( json.iridescenceIOR !== undefined ) material.iridescenceIOR = json.iridescenceIOR; + if ( json.iridescenceThicknessRange !== undefined ) material.iridescenceThicknessRange = json.iridescenceThicknessRange; + if ( json.transmission !== undefined ) material.transmission = json.transmission; + if ( json.thickness !== undefined ) material.thickness = json.thickness; + if ( json.attenuationDistance !== undefined ) material.attenuationDistance = json.attenuationDistance; + if ( json.attenuationColor !== undefined && material.attenuationColor !== undefined ) material.attenuationColor.setHex( json.attenuationColor ); + if ( json.anisotropy !== undefined ) material.anisotropy = json.anisotropy; + if ( json.anisotropyRotation !== undefined ) material.anisotropyRotation = json.anisotropyRotation; + if ( json.fog !== undefined ) material.fog = json.fog; + if ( json.flatShading !== undefined ) material.flatShading = json.flatShading; + if ( json.blending !== undefined ) material.blending = json.blending; + if ( json.combine !== undefined ) material.combine = json.combine; + if ( json.side !== undefined ) material.side = json.side; + if ( json.shadowSide !== undefined ) material.shadowSide = json.shadowSide; + if ( json.opacity !== undefined ) material.opacity = json.opacity; + if ( json.transparent !== undefined ) material.transparent = json.transparent; + if ( json.alphaTest !== undefined ) material.alphaTest = json.alphaTest; + if ( json.alphaHash !== undefined ) material.alphaHash = json.alphaHash; + if ( json.depthFunc !== undefined ) material.depthFunc = json.depthFunc; + if ( json.depthTest !== undefined ) material.depthTest = json.depthTest; + if ( json.depthWrite !== undefined ) material.depthWrite = json.depthWrite; + if ( json.colorWrite !== undefined ) material.colorWrite = json.colorWrite; + if ( json.blendSrc !== undefined ) material.blendSrc = json.blendSrc; + if ( json.blendDst !== undefined ) material.blendDst = json.blendDst; + if ( json.blendEquation !== undefined ) material.blendEquation = json.blendEquation; + if ( json.blendSrcAlpha !== undefined ) material.blendSrcAlpha = json.blendSrcAlpha; + if ( json.blendDstAlpha !== undefined ) material.blendDstAlpha = json.blendDstAlpha; + if ( json.blendEquationAlpha !== undefined ) material.blendEquationAlpha = json.blendEquationAlpha; + if ( json.blendColor !== undefined && material.blendColor !== undefined ) material.blendColor.setHex( json.blendColor ); + if ( json.blendAlpha !== undefined ) material.blendAlpha = json.blendAlpha; + if ( json.stencilWriteMask !== undefined ) material.stencilWriteMask = json.stencilWriteMask; + if ( json.stencilFunc !== undefined ) material.stencilFunc = json.stencilFunc; + if ( json.stencilRef !== undefined ) material.stencilRef = json.stencilRef; + if ( json.stencilFuncMask !== undefined ) material.stencilFuncMask = json.stencilFuncMask; + if ( json.stencilFail !== undefined ) material.stencilFail = json.stencilFail; + if ( json.stencilZFail !== undefined ) material.stencilZFail = json.stencilZFail; + if ( json.stencilZPass !== undefined ) material.stencilZPass = json.stencilZPass; + if ( json.stencilWrite !== undefined ) material.stencilWrite = json.stencilWrite; + + if ( json.wireframe !== undefined ) material.wireframe = json.wireframe; + if ( json.wireframeLinewidth !== undefined ) material.wireframeLinewidth = json.wireframeLinewidth; + if ( json.wireframeLinecap !== undefined ) material.wireframeLinecap = json.wireframeLinecap; + if ( json.wireframeLinejoin !== undefined ) material.wireframeLinejoin = json.wireframeLinejoin; + + if ( json.rotation !== undefined ) material.rotation = json.rotation; + + if ( json.linewidth !== undefined ) material.linewidth = json.linewidth; + if ( json.dashSize !== undefined ) material.dashSize = json.dashSize; + if ( json.gapSize !== undefined ) material.gapSize = json.gapSize; + if ( json.scale !== undefined ) material.scale = json.scale; + + if ( json.polygonOffset !== undefined ) material.polygonOffset = json.polygonOffset; + if ( json.polygonOffsetFactor !== undefined ) material.polygonOffsetFactor = json.polygonOffsetFactor; + if ( json.polygonOffsetUnits !== undefined ) material.polygonOffsetUnits = json.polygonOffsetUnits; + + if ( json.dithering !== undefined ) material.dithering = json.dithering; + + if ( json.alphaToCoverage !== undefined ) material.alphaToCoverage = json.alphaToCoverage; + if ( json.premultipliedAlpha !== undefined ) material.premultipliedAlpha = json.premultipliedAlpha; + if ( json.forceSinglePass !== undefined ) material.forceSinglePass = json.forceSinglePass; + + if ( json.visible !== undefined ) material.visible = json.visible; + + if ( json.toneMapped !== undefined ) material.toneMapped = json.toneMapped; + + if ( json.userData !== undefined ) material.userData = json.userData; + + if ( json.vertexColors !== undefined ) { + + if ( typeof json.vertexColors === 'number' ) { + + material.vertexColors = ( json.vertexColors > 0 ) ? true : false; + + } else { + + material.vertexColors = json.vertexColors; + + } + + } + + // Shader Material + + if ( json.uniforms !== undefined ) { + + for ( const name in json.uniforms ) { + + const uniform = json.uniforms[ name ]; + + material.uniforms[ name ] = {}; + + switch ( uniform.type ) { + + case 't': + material.uniforms[ name ].value = getTexture( uniform.value ); + break; + + case 'c': + material.uniforms[ name ].value = new Color().setHex( uniform.value ); + break; + + case 'v2': + material.uniforms[ name ].value = new Vector2().fromArray( uniform.value ); + break; + + case 'v3': + material.uniforms[ name ].value = new Vector3().fromArray( uniform.value ); + break; + + case 'v4': + material.uniforms[ name ].value = new Vector4().fromArray( uniform.value ); + break; + + case 'm3': + material.uniforms[ name ].value = new Matrix3().fromArray( uniform.value ); + break; + + case 'm4': + material.uniforms[ name ].value = new Matrix4().fromArray( uniform.value ); + break; + + default: + material.uniforms[ name ].value = uniform.value; + + } + + } + + } + + if ( json.defines !== undefined ) material.defines = json.defines; + if ( json.vertexShader !== undefined ) material.vertexShader = json.vertexShader; + if ( json.fragmentShader !== undefined ) material.fragmentShader = json.fragmentShader; + if ( json.glslVersion !== undefined ) material.glslVersion = json.glslVersion; + + if ( json.extensions !== undefined ) { + + for ( const key in json.extensions ) { + + material.extensions[ key ] = json.extensions[ key ]; + + } + + } + + if ( json.lights !== undefined ) material.lights = json.lights; + if ( json.clipping !== undefined ) material.clipping = json.clipping; + + // for PointsMaterial + + if ( json.size !== undefined ) material.size = json.size; + if ( json.sizeAttenuation !== undefined ) material.sizeAttenuation = json.sizeAttenuation; + + // maps + + if ( json.map !== undefined ) material.map = getTexture( json.map ); + if ( json.matcap !== undefined ) material.matcap = getTexture( json.matcap ); + + if ( json.alphaMap !== undefined ) material.alphaMap = getTexture( json.alphaMap ); + + if ( json.bumpMap !== undefined ) material.bumpMap = getTexture( json.bumpMap ); + if ( json.bumpScale !== undefined ) material.bumpScale = json.bumpScale; + + if ( json.normalMap !== undefined ) material.normalMap = getTexture( json.normalMap ); + if ( json.normalMapType !== undefined ) material.normalMapType = json.normalMapType; + if ( json.normalScale !== undefined ) { + + let normalScale = json.normalScale; + + if ( Array.isArray( normalScale ) === false ) { + + // Blender exporter used to export a scalar. See #7459 + + normalScale = [ normalScale, normalScale ]; + + } + + material.normalScale = new Vector2().fromArray( normalScale ); + + } + + if ( json.displacementMap !== undefined ) material.displacementMap = getTexture( json.displacementMap ); + if ( json.displacementScale !== undefined ) material.displacementScale = json.displacementScale; + if ( json.displacementBias !== undefined ) material.displacementBias = json.displacementBias; + + if ( json.roughnessMap !== undefined ) material.roughnessMap = getTexture( json.roughnessMap ); + if ( json.metalnessMap !== undefined ) material.metalnessMap = getTexture( json.metalnessMap ); + + if ( json.emissiveMap !== undefined ) material.emissiveMap = getTexture( json.emissiveMap ); + if ( json.emissiveIntensity !== undefined ) material.emissiveIntensity = json.emissiveIntensity; + + if ( json.specularMap !== undefined ) material.specularMap = getTexture( json.specularMap ); + if ( json.specularIntensityMap !== undefined ) material.specularIntensityMap = getTexture( json.specularIntensityMap ); + if ( json.specularColorMap !== undefined ) material.specularColorMap = getTexture( json.specularColorMap ); + + if ( json.envMap !== undefined ) material.envMap = getTexture( json.envMap ); + if ( json.envMapRotation !== undefined ) material.envMapRotation.fromArray( json.envMapRotation ); + if ( json.envMapIntensity !== undefined ) material.envMapIntensity = json.envMapIntensity; + + if ( json.reflectivity !== undefined ) material.reflectivity = json.reflectivity; + if ( json.refractionRatio !== undefined ) material.refractionRatio = json.refractionRatio; + + if ( json.lightMap !== undefined ) material.lightMap = getTexture( json.lightMap ); + if ( json.lightMapIntensity !== undefined ) material.lightMapIntensity = json.lightMapIntensity; + + if ( json.aoMap !== undefined ) material.aoMap = getTexture( json.aoMap ); + if ( json.aoMapIntensity !== undefined ) material.aoMapIntensity = json.aoMapIntensity; + + if ( json.gradientMap !== undefined ) material.gradientMap = getTexture( json.gradientMap ); + + if ( json.clearcoatMap !== undefined ) material.clearcoatMap = getTexture( json.clearcoatMap ); + if ( json.clearcoatRoughnessMap !== undefined ) material.clearcoatRoughnessMap = getTexture( json.clearcoatRoughnessMap ); + if ( json.clearcoatNormalMap !== undefined ) material.clearcoatNormalMap = getTexture( json.clearcoatNormalMap ); + if ( json.clearcoatNormalScale !== undefined ) material.clearcoatNormalScale = new Vector2().fromArray( json.clearcoatNormalScale ); + + if ( json.iridescenceMap !== undefined ) material.iridescenceMap = getTexture( json.iridescenceMap ); + if ( json.iridescenceThicknessMap !== undefined ) material.iridescenceThicknessMap = getTexture( json.iridescenceThicknessMap ); + + if ( json.transmissionMap !== undefined ) material.transmissionMap = getTexture( json.transmissionMap ); + if ( json.thicknessMap !== undefined ) material.thicknessMap = getTexture( json.thicknessMap ); + + if ( json.anisotropyMap !== undefined ) material.anisotropyMap = getTexture( json.anisotropyMap ); + + if ( json.sheenColorMap !== undefined ) material.sheenColorMap = getTexture( json.sheenColorMap ); + if ( json.sheenRoughnessMap !== undefined ) material.sheenRoughnessMap = getTexture( json.sheenRoughnessMap ); + + return material; + + } + + setTextures( value ) { + + this.textures = value; + return this; + + } + + static createMaterialFromType( type ) { + + const materialLib = { + ShadowMaterial, + SpriteMaterial, + RawShaderMaterial, + ShaderMaterial, + PointsMaterial, + MeshPhysicalMaterial, + MeshStandardMaterial, + MeshPhongMaterial, + MeshToonMaterial, + MeshNormalMaterial, + MeshLambertMaterial, + MeshDepthMaterial, + MeshDistanceMaterial, + MeshBasicMaterial, + MeshMatcapMaterial, + LineDashedMaterial, + LineBasicMaterial, + Material + }; + + return new materialLib[ type ](); + + } + +} + +class LoaderUtils { + + static decodeText( array ) { + + if ( typeof TextDecoder !== 'undefined' ) { + + return new TextDecoder().decode( array ); + + } + + // Avoid the String.fromCharCode.apply(null, array) shortcut, which + // throws a "maximum call stack size exceeded" error for large arrays. + + let s = ''; + + for ( let i = 0, il = array.length; i < il; i ++ ) { + + // Implicitly assumes little-endian. + s += String.fromCharCode( array[ i ] ); + + } + + try { + + // merges multi-byte utf-8 characters. + + return decodeURIComponent( escape( s ) ); + + } catch ( e ) { // see #16358 + + return s; + + } + + } + + static extractUrlBase( url ) { + + const index = url.lastIndexOf( '/' ); + + if ( index === - 1 ) return './'; + + return url.slice( 0, index + 1 ); + + } + + static resolveURL( url, path ) { + + // Invalid URL + if ( typeof url !== 'string' || url === '' ) return ''; + + // Host Relative URL + if ( /^https?:\/\//i.test( path ) && /^\//.test( url ) ) { + + path = path.replace( /(^https?:\/\/[^\/]+).*/i, '$1' ); + + } + + // Absolute URL http://,https://,// + if ( /^(https?:)?\/\//i.test( url ) ) return url; + + // Data URI + if ( /^data:.*,.*$/i.test( url ) ) return url; + + // Blob URL + if ( /^blob:.*$/i.test( url ) ) return url; + + // Relative URL + return path + url; + + } + +} + +class InstancedBufferGeometry extends BufferGeometry { + + constructor() { + + super(); + + this.isInstancedBufferGeometry = true; + + this.type = 'InstancedBufferGeometry'; + this.instanceCount = Infinity; + + } + + copy( source ) { + + super.copy( source ); + + this.instanceCount = source.instanceCount; + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.instanceCount = this.instanceCount; + + data.isInstancedBufferGeometry = true; + + return data; + + } + +} + +class BufferGeometryLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( JSON.parse( text ) ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( json ) { + + const interleavedBufferMap = {}; + const arrayBufferMap = {}; + + function getInterleavedBuffer( json, uuid ) { + + if ( interleavedBufferMap[ uuid ] !== undefined ) return interleavedBufferMap[ uuid ]; + + const interleavedBuffers = json.interleavedBuffers; + const interleavedBuffer = interleavedBuffers[ uuid ]; + + const buffer = getArrayBuffer( json, interleavedBuffer.buffer ); + + const array = getTypedArray( interleavedBuffer.type, buffer ); + const ib = new InterleavedBuffer( array, interleavedBuffer.stride ); + ib.uuid = interleavedBuffer.uuid; + + interleavedBufferMap[ uuid ] = ib; + + return ib; + + } + + function getArrayBuffer( json, uuid ) { + + if ( arrayBufferMap[ uuid ] !== undefined ) return arrayBufferMap[ uuid ]; + + const arrayBuffers = json.arrayBuffers; + const arrayBuffer = arrayBuffers[ uuid ]; + + const ab = new Uint32Array( arrayBuffer ).buffer; + + arrayBufferMap[ uuid ] = ab; + + return ab; + + } + + const geometry = json.isInstancedBufferGeometry ? new InstancedBufferGeometry() : new BufferGeometry(); + + const index = json.data.index; + + if ( index !== undefined ) { + + const typedArray = getTypedArray( index.type, index.array ); + geometry.setIndex( new BufferAttribute( typedArray, 1 ) ); + + } + + const attributes = json.data.attributes; + + for ( const key in attributes ) { + + const attribute = attributes[ key ]; + let bufferAttribute; + + if ( attribute.isInterleavedBufferAttribute ) { + + const interleavedBuffer = getInterleavedBuffer( json.data, attribute.data ); + bufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized ); + + } else { + + const typedArray = getTypedArray( attribute.type, attribute.array ); + const bufferAttributeConstr = attribute.isInstancedBufferAttribute ? InstancedBufferAttribute : BufferAttribute; + bufferAttribute = new bufferAttributeConstr( typedArray, attribute.itemSize, attribute.normalized ); + + } + + if ( attribute.name !== undefined ) bufferAttribute.name = attribute.name; + if ( attribute.usage !== undefined ) bufferAttribute.setUsage( attribute.usage ); + + geometry.setAttribute( key, bufferAttribute ); + + } + + const morphAttributes = json.data.morphAttributes; + + if ( morphAttributes ) { + + for ( const key in morphAttributes ) { + + const attributeArray = morphAttributes[ key ]; + + const array = []; + + for ( let i = 0, il = attributeArray.length; i < il; i ++ ) { + + const attribute = attributeArray[ i ]; + let bufferAttribute; + + if ( attribute.isInterleavedBufferAttribute ) { + + const interleavedBuffer = getInterleavedBuffer( json.data, attribute.data ); + bufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized ); + + } else { + + const typedArray = getTypedArray( attribute.type, attribute.array ); + bufferAttribute = new BufferAttribute( typedArray, attribute.itemSize, attribute.normalized ); + + } + + if ( attribute.name !== undefined ) bufferAttribute.name = attribute.name; + array.push( bufferAttribute ); + + } + + geometry.morphAttributes[ key ] = array; + + } + + } + + const morphTargetsRelative = json.data.morphTargetsRelative; + + if ( morphTargetsRelative ) { + + geometry.morphTargetsRelative = true; + + } + + const groups = json.data.groups || json.data.drawcalls || json.data.offsets; + + if ( groups !== undefined ) { + + for ( let i = 0, n = groups.length; i !== n; ++ i ) { + + const group = groups[ i ]; + + geometry.addGroup( group.start, group.count, group.materialIndex ); + + } + + } + + const boundingSphere = json.data.boundingSphere; + + if ( boundingSphere !== undefined ) { + + const center = new Vector3(); + + if ( boundingSphere.center !== undefined ) { + + center.fromArray( boundingSphere.center ); + + } + + geometry.boundingSphere = new Sphere( center, boundingSphere.radius ); + + } + + if ( json.name ) geometry.name = json.name; + if ( json.userData ) geometry.userData = json.userData; + + return geometry; + + } + +} + +class ObjectLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path; + this.resourcePath = this.resourcePath || path; + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + loader.load( url, function ( text ) { + + let json = null; + + try { + + json = JSON.parse( text ); + + } catch ( error ) { + + if ( onError !== undefined ) onError( error ); + + console.error( 'THREE:ObjectLoader: Can\'t parse ' + url + '.', error.message ); + + return; + + } + + const metadata = json.metadata; + + if ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) { + + if ( onError !== undefined ) onError( new Error( 'THREE.ObjectLoader: Can\'t load ' + url ) ); + + console.error( 'THREE.ObjectLoader: Can\'t load ' + url ); + return; + + } + + scope.parse( json, onLoad ); + + }, onProgress, onError ); + + } + + async loadAsync( url, onProgress ) { + + const scope = this; + + const path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path; + this.resourcePath = this.resourcePath || path; + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + + const text = await loader.loadAsync( url, onProgress ); + + const json = JSON.parse( text ); + + const metadata = json.metadata; + + if ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) { + + throw new Error( 'THREE.ObjectLoader: Can\'t load ' + url ); + + } + + return await scope.parseAsync( json ); + + } + + parse( json, onLoad ) { + + const animations = this.parseAnimations( json.animations ); + const shapes = this.parseShapes( json.shapes ); + const geometries = this.parseGeometries( json.geometries, shapes ); + + const images = this.parseImages( json.images, function () { + + if ( onLoad !== undefined ) onLoad( object ); + + } ); + + const textures = this.parseTextures( json.textures, images ); + const materials = this.parseMaterials( json.materials, textures ); + + const object = this.parseObject( json.object, geometries, materials, textures, animations ); + const skeletons = this.parseSkeletons( json.skeletons, object ); + + this.bindSkeletons( object, skeletons ); + + // + + if ( onLoad !== undefined ) { + + let hasImages = false; + + for ( const uuid in images ) { + + if ( images[ uuid ].data instanceof HTMLImageElement ) { + + hasImages = true; + break; + + } + + } + + if ( hasImages === false ) onLoad( object ); + + } + + return object; + + } + + async parseAsync( json ) { + + const animations = this.parseAnimations( json.animations ); + const shapes = this.parseShapes( json.shapes ); + const geometries = this.parseGeometries( json.geometries, shapes ); + + const images = await this.parseImagesAsync( json.images ); + + const textures = this.parseTextures( json.textures, images ); + const materials = this.parseMaterials( json.materials, textures ); + + const object = this.parseObject( json.object, geometries, materials, textures, animations ); + const skeletons = this.parseSkeletons( json.skeletons, object ); + + this.bindSkeletons( object, skeletons ); + + return object; + + } + + parseShapes( json ) { + + const shapes = {}; + + if ( json !== undefined ) { + + for ( let i = 0, l = json.length; i < l; i ++ ) { + + const shape = new Shape().fromJSON( json[ i ] ); + + shapes[ shape.uuid ] = shape; + + } + + } + + return shapes; + + } + + parseSkeletons( json, object ) { + + const skeletons = {}; + const bones = {}; + + // generate bone lookup table + + object.traverse( function ( child ) { + + if ( child.isBone ) bones[ child.uuid ] = child; + + } ); + + // create skeletons + + if ( json !== undefined ) { + + for ( let i = 0, l = json.length; i < l; i ++ ) { + + const skeleton = new Skeleton().fromJSON( json[ i ], bones ); + + skeletons[ skeleton.uuid ] = skeleton; + + } + + } + + return skeletons; + + } + + parseGeometries( json, shapes ) { + + const geometries = {}; + + if ( json !== undefined ) { + + const bufferGeometryLoader = new BufferGeometryLoader(); + + for ( let i = 0, l = json.length; i < l; i ++ ) { + + let geometry; + const data = json[ i ]; + + switch ( data.type ) { + + case 'BufferGeometry': + case 'InstancedBufferGeometry': + + geometry = bufferGeometryLoader.parse( data ); + break; + + default: + + if ( data.type in Geometries ) { + + geometry = Geometries[ data.type ].fromJSON( data, shapes ); + + } else { + + console.warn( `THREE.ObjectLoader: Unsupported geometry type "${ data.type }"` ); + + } + + } + + geometry.uuid = data.uuid; + + if ( data.name !== undefined ) geometry.name = data.name; + if ( data.userData !== undefined ) geometry.userData = data.userData; + + geometries[ data.uuid ] = geometry; + + } + + } + + return geometries; + + } + + parseMaterials( json, textures ) { + + const cache = {}; // MultiMaterial + const materials = {}; + + if ( json !== undefined ) { + + const loader = new MaterialLoader(); + loader.setTextures( textures ); + + for ( let i = 0, l = json.length; i < l; i ++ ) { + + const data = json[ i ]; + + if ( cache[ data.uuid ] === undefined ) { + + cache[ data.uuid ] = loader.parse( data ); + + } + + materials[ data.uuid ] = cache[ data.uuid ]; + + } + + } + + return materials; + + } + + parseAnimations( json ) { + + const animations = {}; + + if ( json !== undefined ) { + + for ( let i = 0; i < json.length; i ++ ) { + + const data = json[ i ]; + + const clip = AnimationClip.parse( data ); + + animations[ clip.uuid ] = clip; + + } + + } + + return animations; + + } + + parseImages( json, onLoad ) { + + const scope = this; + const images = {}; + + let loader; + + function loadImage( url ) { + + scope.manager.itemStart( url ); + + return loader.load( url, function () { + + scope.manager.itemEnd( url ); + + }, undefined, function () { + + scope.manager.itemError( url ); + scope.manager.itemEnd( url ); + + } ); + + } + + function deserializeImage( image ) { + + if ( typeof image === 'string' ) { + + const url = image; + + const path = /^(\/\/)|([a-z]+:(\/\/)?)/i.test( url ) ? url : scope.resourcePath + url; + + return loadImage( path ); + + } else { + + if ( image.data ) { + + return { + data: getTypedArray( image.type, image.data ), + width: image.width, + height: image.height + }; + + } else { + + return null; + + } + + } + + } + + if ( json !== undefined && json.length > 0 ) { + + const manager = new LoadingManager( onLoad ); + + loader = new ImageLoader( manager ); + loader.setCrossOrigin( this.crossOrigin ); + + for ( let i = 0, il = json.length; i < il; i ++ ) { + + const image = json[ i ]; + const url = image.url; + + if ( Array.isArray( url ) ) { + + // load array of images e.g CubeTexture + + const imageArray = []; + + for ( let j = 0, jl = url.length; j < jl; j ++ ) { + + const currentUrl = url[ j ]; + + const deserializedImage = deserializeImage( currentUrl ); + + if ( deserializedImage !== null ) { + + if ( deserializedImage instanceof HTMLImageElement ) { + + imageArray.push( deserializedImage ); + + } else { + + // special case: handle array of data textures for cube textures + + imageArray.push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) ); + + } + + } + + } + + images[ image.uuid ] = new Source( imageArray ); + + } else { + + // load single image + + const deserializedImage = deserializeImage( image.url ); + images[ image.uuid ] = new Source( deserializedImage ); + + + } + + } + + } + + return images; + + } + + async parseImagesAsync( json ) { + + const scope = this; + const images = {}; + + let loader; + + async function deserializeImage( image ) { + + if ( typeof image === 'string' ) { + + const url = image; + + const path = /^(\/\/)|([a-z]+:(\/\/)?)/i.test( url ) ? url : scope.resourcePath + url; + + return await loader.loadAsync( path ); + + } else { + + if ( image.data ) { + + return { + data: getTypedArray( image.type, image.data ), + width: image.width, + height: image.height + }; + + } else { + + return null; + + } + + } + + } + + if ( json !== undefined && json.length > 0 ) { + + loader = new ImageLoader( this.manager ); + loader.setCrossOrigin( this.crossOrigin ); + + for ( let i = 0, il = json.length; i < il; i ++ ) { + + const image = json[ i ]; + const url = image.url; + + if ( Array.isArray( url ) ) { + + // load array of images e.g CubeTexture + + const imageArray = []; + + for ( let j = 0, jl = url.length; j < jl; j ++ ) { + + const currentUrl = url[ j ]; + + const deserializedImage = await deserializeImage( currentUrl ); + + if ( deserializedImage !== null ) { + + if ( deserializedImage instanceof HTMLImageElement ) { + + imageArray.push( deserializedImage ); + + } else { + + // special case: handle array of data textures for cube textures + + imageArray.push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) ); + + } + + } + + } + + images[ image.uuid ] = new Source( imageArray ); + + } else { + + // load single image + + const deserializedImage = await deserializeImage( image.url ); + images[ image.uuid ] = new Source( deserializedImage ); + + } + + } + + } + + return images; + + } + + parseTextures( json, images ) { + + function parseConstant( value, type ) { + + if ( typeof value === 'number' ) return value; + + console.warn( 'THREE.ObjectLoader.parseTexture: Constant should be in numeric form.', value ); + + return type[ value ]; + + } + + const textures = {}; + + if ( json !== undefined ) { + + for ( let i = 0, l = json.length; i < l; i ++ ) { + + const data = json[ i ]; + + if ( data.image === undefined ) { + + console.warn( 'THREE.ObjectLoader: No "image" specified for', data.uuid ); + + } + + if ( images[ data.image ] === undefined ) { + + console.warn( 'THREE.ObjectLoader: Undefined image', data.image ); + + } + + const source = images[ data.image ]; + const image = source.data; + + let texture; + + if ( Array.isArray( image ) ) { + + texture = new CubeTexture(); + + if ( image.length === 6 ) texture.needsUpdate = true; + + } else { + + if ( image && image.data ) { + + texture = new DataTexture(); + + } else { + + texture = new Texture(); + + } + + if ( image ) texture.needsUpdate = true; // textures can have undefined image data + + } + + texture.source = source; + + texture.uuid = data.uuid; + + if ( data.name !== undefined ) texture.name = data.name; + + if ( data.mapping !== undefined ) texture.mapping = parseConstant( data.mapping, TEXTURE_MAPPING ); + if ( data.channel !== undefined ) texture.channel = data.channel; + + if ( data.offset !== undefined ) texture.offset.fromArray( data.offset ); + if ( data.repeat !== undefined ) texture.repeat.fromArray( data.repeat ); + if ( data.center !== undefined ) texture.center.fromArray( data.center ); + if ( data.rotation !== undefined ) texture.rotation = data.rotation; + + if ( data.wrap !== undefined ) { + + texture.wrapS = parseConstant( data.wrap[ 0 ], TEXTURE_WRAPPING ); + texture.wrapT = parseConstant( data.wrap[ 1 ], TEXTURE_WRAPPING ); + + } + + if ( data.format !== undefined ) texture.format = data.format; + if ( data.internalFormat !== undefined ) texture.internalFormat = data.internalFormat; + if ( data.type !== undefined ) texture.type = data.type; + if ( data.colorSpace !== undefined ) texture.colorSpace = data.colorSpace; + + if ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter, TEXTURE_FILTER ); + if ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter, TEXTURE_FILTER ); + if ( data.anisotropy !== undefined ) texture.anisotropy = data.anisotropy; + + if ( data.flipY !== undefined ) texture.flipY = data.flipY; + + if ( data.generateMipmaps !== undefined ) texture.generateMipmaps = data.generateMipmaps; + if ( data.premultiplyAlpha !== undefined ) texture.premultiplyAlpha = data.premultiplyAlpha; + if ( data.unpackAlignment !== undefined ) texture.unpackAlignment = data.unpackAlignment; + if ( data.compareFunction !== undefined ) texture.compareFunction = data.compareFunction; + + if ( data.userData !== undefined ) texture.userData = data.userData; + + textures[ data.uuid ] = texture; + + } + + } + + return textures; + + } + + parseObject( data, geometries, materials, textures, animations ) { + + let object; + + function getGeometry( name ) { + + if ( geometries[ name ] === undefined ) { + + console.warn( 'THREE.ObjectLoader: Undefined geometry', name ); + + } + + return geometries[ name ]; + + } + + function getMaterial( name ) { + + if ( name === undefined ) return undefined; + + if ( Array.isArray( name ) ) { + + const array = []; + + for ( let i = 0, l = name.length; i < l; i ++ ) { + + const uuid = name[ i ]; + + if ( materials[ uuid ] === undefined ) { + + console.warn( 'THREE.ObjectLoader: Undefined material', uuid ); + + } + + array.push( materials[ uuid ] ); + + } + + return array; + + } + + if ( materials[ name ] === undefined ) { + + console.warn( 'THREE.ObjectLoader: Undefined material', name ); + + } + + return materials[ name ]; + + } + + function getTexture( uuid ) { + + if ( textures[ uuid ] === undefined ) { + + console.warn( 'THREE.ObjectLoader: Undefined texture', uuid ); + + } + + return textures[ uuid ]; + + } + + let geometry, material; + + switch ( data.type ) { + + case 'Scene': + + object = new Scene(); + + if ( data.background !== undefined ) { + + if ( Number.isInteger( data.background ) ) { + + object.background = new Color( data.background ); + + } else { + + object.background = getTexture( data.background ); + + } + + } + + if ( data.environment !== undefined ) { + + object.environment = getTexture( data.environment ); + + } + + if ( data.fog !== undefined ) { + + if ( data.fog.type === 'Fog' ) { + + object.fog = new Fog( data.fog.color, data.fog.near, data.fog.far ); + + } else if ( data.fog.type === 'FogExp2' ) { + + object.fog = new FogExp2( data.fog.color, data.fog.density ); + + } + + if ( data.fog.name !== '' ) { + + object.fog.name = data.fog.name; + + } + + } + + if ( data.backgroundBlurriness !== undefined ) object.backgroundBlurriness = data.backgroundBlurriness; + if ( data.backgroundIntensity !== undefined ) object.backgroundIntensity = data.backgroundIntensity; + if ( data.backgroundRotation !== undefined ) object.backgroundRotation.fromArray( data.backgroundRotation ); + + if ( data.environmentIntensity !== undefined ) object.environmentIntensity = data.environmentIntensity; + if ( data.environmentRotation !== undefined ) object.environmentRotation.fromArray( data.environmentRotation ); + + break; + + case 'PerspectiveCamera': + + object = new PerspectiveCamera( data.fov, data.aspect, data.near, data.far ); + + if ( data.focus !== undefined ) object.focus = data.focus; + if ( data.zoom !== undefined ) object.zoom = data.zoom; + if ( data.filmGauge !== undefined ) object.filmGauge = data.filmGauge; + if ( data.filmOffset !== undefined ) object.filmOffset = data.filmOffset; + if ( data.view !== undefined ) object.view = Object.assign( {}, data.view ); + + break; + + case 'OrthographicCamera': + + object = new OrthographicCamera( data.left, data.right, data.top, data.bottom, data.near, data.far ); + + if ( data.zoom !== undefined ) object.zoom = data.zoom; + if ( data.view !== undefined ) object.view = Object.assign( {}, data.view ); + + break; + + case 'AmbientLight': + + object = new AmbientLight( data.color, data.intensity ); + + break; + + case 'DirectionalLight': + + object = new DirectionalLight( data.color, data.intensity ); + + break; + + case 'PointLight': + + object = new PointLight( data.color, data.intensity, data.distance, data.decay ); + + break; + + case 'RectAreaLight': + + object = new RectAreaLight( data.color, data.intensity, data.width, data.height ); + + break; + + case 'SpotLight': + + object = new SpotLight( data.color, data.intensity, data.distance, data.angle, data.penumbra, data.decay ); + + break; + + case 'HemisphereLight': + + object = new HemisphereLight( data.color, data.groundColor, data.intensity ); + + break; + + case 'LightProbe': + + object = new LightProbe().fromJSON( data ); + + break; + + case 'SkinnedMesh': + + geometry = getGeometry( data.geometry ); + material = getMaterial( data.material ); + + object = new SkinnedMesh( geometry, material ); + + if ( data.bindMode !== undefined ) object.bindMode = data.bindMode; + if ( data.bindMatrix !== undefined ) object.bindMatrix.fromArray( data.bindMatrix ); + if ( data.skeleton !== undefined ) object.skeleton = data.skeleton; + + break; + + case 'Mesh': + + geometry = getGeometry( data.geometry ); + material = getMaterial( data.material ); + + object = new Mesh( geometry, material ); + + break; + + case 'InstancedMesh': + + geometry = getGeometry( data.geometry ); + material = getMaterial( data.material ); + const count = data.count; + const instanceMatrix = data.instanceMatrix; + const instanceColor = data.instanceColor; + + object = new InstancedMesh( geometry, material, count ); + object.instanceMatrix = new InstancedBufferAttribute( new Float32Array( instanceMatrix.array ), 16 ); + if ( instanceColor !== undefined ) object.instanceColor = new InstancedBufferAttribute( new Float32Array( instanceColor.array ), instanceColor.itemSize ); + + break; + + case 'BatchedMesh': + + geometry = getGeometry( data.geometry ); + material = getMaterial( data.material ); + + object = new BatchedMesh( data.maxGeometryCount, data.maxVertexCount, data.maxIndexCount, material ); + object.geometry = geometry; + object.perObjectFrustumCulled = data.perObjectFrustumCulled; + object.sortObjects = data.sortObjects; + + object._drawRanges = data.drawRanges; + object._reservedRanges = data.reservedRanges; + + object._visibility = data.visibility; + object._active = data.active; + object._bounds = data.bounds.map( bound => { + + const box = new Box3(); + box.min.fromArray( bound.boxMin ); + box.max.fromArray( bound.boxMax ); + + const sphere = new Sphere(); + sphere.radius = bound.sphereRadius; + sphere.center.fromArray( bound.sphereCenter ); + + return { + boxInitialized: bound.boxInitialized, + box: box, + + sphereInitialized: bound.sphereInitialized, + sphere: sphere + }; + + } ); + + object._maxGeometryCount = data.maxGeometryCount; + object._maxVertexCount = data.maxVertexCount; + object._maxIndexCount = data.maxIndexCount; + + object._geometryInitialized = data.geometryInitialized; + object._geometryCount = data.geometryCount; + + object._matricesTexture = getTexture( data.matricesTexture.uuid ); + + break; + + case 'LOD': + + object = new LOD(); + + break; + + case 'Line': + + object = new Line( getGeometry( data.geometry ), getMaterial( data.material ) ); + + break; + + case 'LineLoop': + + object = new LineLoop( getGeometry( data.geometry ), getMaterial( data.material ) ); + + break; + + case 'LineSegments': + + object = new LineSegments( getGeometry( data.geometry ), getMaterial( data.material ) ); + + break; + + case 'PointCloud': + case 'Points': + + object = new Points( getGeometry( data.geometry ), getMaterial( data.material ) ); + + break; + + case 'Sprite': + + object = new Sprite( getMaterial( data.material ) ); + + break; + + case 'Group': + + object = new Group(); + + break; + + case 'Bone': + + object = new Bone(); + + break; + + default: + + object = new Object3D(); + + } + + object.uuid = data.uuid; + + if ( data.name !== undefined ) object.name = data.name; + + if ( data.matrix !== undefined ) { + + object.matrix.fromArray( data.matrix ); + + if ( data.matrixAutoUpdate !== undefined ) object.matrixAutoUpdate = data.matrixAutoUpdate; + if ( object.matrixAutoUpdate ) object.matrix.decompose( object.position, object.quaternion, object.scale ); + + } else { + + if ( data.position !== undefined ) object.position.fromArray( data.position ); + if ( data.rotation !== undefined ) object.rotation.fromArray( data.rotation ); + if ( data.quaternion !== undefined ) object.quaternion.fromArray( data.quaternion ); + if ( data.scale !== undefined ) object.scale.fromArray( data.scale ); + + } + + if ( data.up !== undefined ) object.up.fromArray( data.up ); + + if ( data.castShadow !== undefined ) object.castShadow = data.castShadow; + if ( data.receiveShadow !== undefined ) object.receiveShadow = data.receiveShadow; + + if ( data.shadow ) { + + if ( data.shadow.bias !== undefined ) object.shadow.bias = data.shadow.bias; + if ( data.shadow.normalBias !== undefined ) object.shadow.normalBias = data.shadow.normalBias; + if ( data.shadow.radius !== undefined ) object.shadow.radius = data.shadow.radius; + if ( data.shadow.mapSize !== undefined ) object.shadow.mapSize.fromArray( data.shadow.mapSize ); + if ( data.shadow.camera !== undefined ) object.shadow.camera = this.parseObject( data.shadow.camera ); + + } + + if ( data.visible !== undefined ) object.visible = data.visible; + if ( data.frustumCulled !== undefined ) object.frustumCulled = data.frustumCulled; + if ( data.renderOrder !== undefined ) object.renderOrder = data.renderOrder; + if ( data.userData !== undefined ) object.userData = data.userData; + if ( data.layers !== undefined ) object.layers.mask = data.layers; + + if ( data.children !== undefined ) { + + const children = data.children; + + for ( let i = 0; i < children.length; i ++ ) { + + object.add( this.parseObject( children[ i ], geometries, materials, textures, animations ) ); + + } + + } + + if ( data.animations !== undefined ) { + + const objectAnimations = data.animations; + + for ( let i = 0; i < objectAnimations.length; i ++ ) { + + const uuid = objectAnimations[ i ]; + + object.animations.push( animations[ uuid ] ); + + } + + } + + if ( data.type === 'LOD' ) { + + if ( data.autoUpdate !== undefined ) object.autoUpdate = data.autoUpdate; + + const levels = data.levels; + + for ( let l = 0; l < levels.length; l ++ ) { + + const level = levels[ l ]; + const child = object.getObjectByProperty( 'uuid', level.object ); + + if ( child !== undefined ) { + + object.addLevel( child, level.distance, level.hysteresis ); + + } + + } + + } + + return object; + + } + + bindSkeletons( object, skeletons ) { + + if ( Object.keys( skeletons ).length === 0 ) return; + + object.traverse( function ( child ) { + + if ( child.isSkinnedMesh === true && child.skeleton !== undefined ) { + + const skeleton = skeletons[ child.skeleton ]; + + if ( skeleton === undefined ) { + + console.warn( 'THREE.ObjectLoader: No skeleton found with UUID:', child.skeleton ); + + } else { + + child.bind( skeleton, child.bindMatrix ); + + } + + } + + } ); + + } + +} + +const TEXTURE_MAPPING = { + UVMapping: UVMapping, + CubeReflectionMapping: CubeReflectionMapping, + CubeRefractionMapping: CubeRefractionMapping, + EquirectangularReflectionMapping: EquirectangularReflectionMapping, + EquirectangularRefractionMapping: EquirectangularRefractionMapping, + CubeUVReflectionMapping: CubeUVReflectionMapping +}; + +const TEXTURE_WRAPPING = { + RepeatWrapping: RepeatWrapping, + ClampToEdgeWrapping: ClampToEdgeWrapping, + MirroredRepeatWrapping: MirroredRepeatWrapping +}; + +const TEXTURE_FILTER = { + NearestFilter: NearestFilter, + NearestMipmapNearestFilter: NearestMipmapNearestFilter, + NearestMipmapLinearFilter: NearestMipmapLinearFilter, + LinearFilter: LinearFilter, + LinearMipmapNearestFilter: LinearMipmapNearestFilter, + LinearMipmapLinearFilter: LinearMipmapLinearFilter +}; + +class ImageBitmapLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.isImageBitmapLoader = true; + + if ( typeof createImageBitmap === 'undefined' ) { + + console.warn( 'THREE.ImageBitmapLoader: createImageBitmap() not supported.' ); + + } + + if ( typeof fetch === 'undefined' ) { + + console.warn( 'THREE.ImageBitmapLoader: fetch() not supported.' ); + + } + + this.options = { premultiplyAlpha: 'none' }; + + } + + setOptions( options ) { + + this.options = options; + + return this; + + } + + load( url, onLoad, onProgress, onError ) { + + if ( url === undefined ) url = ''; + + if ( this.path !== undefined ) url = this.path + url; + + url = this.manager.resolveURL( url ); + + const scope = this; + + const cached = Cache.get( url ); + + if ( cached !== undefined ) { + + scope.manager.itemStart( url ); + + // If cached is a promise, wait for it to resolve + if ( cached.then ) { + + cached.then( imageBitmap => { + + if ( onLoad ) onLoad( imageBitmap ); + + scope.manager.itemEnd( url ); + + } ).catch( e => { + + if ( onError ) onError( e ); + + } ); + return; + + } + + // If cached is not a promise (i.e., it's already an imageBitmap) + setTimeout( function () { + + if ( onLoad ) onLoad( cached ); + + scope.manager.itemEnd( url ); + + }, 0 ); + + return cached; + + } + + const fetchOptions = {}; + fetchOptions.credentials = ( this.crossOrigin === 'anonymous' ) ? 'same-origin' : 'include'; + fetchOptions.headers = this.requestHeader; + + const promise = fetch( url, fetchOptions ).then( function ( res ) { + + return res.blob(); + + } ).then( function ( blob ) { + + return createImageBitmap( blob, Object.assign( scope.options, { colorSpaceConversion: 'none' } ) ); + + } ).then( function ( imageBitmap ) { + + Cache.add( url, imageBitmap ); + + if ( onLoad ) onLoad( imageBitmap ); + + scope.manager.itemEnd( url ); + + return imageBitmap; + + } ).catch( function ( e ) { + + if ( onError ) onError( e ); + + Cache.remove( url ); + + scope.manager.itemError( url ); + scope.manager.itemEnd( url ); + + } ); + + Cache.add( url, promise ); + scope.manager.itemStart( url ); + + } + +} + +let _context; + +class AudioContext { + + static getContext() { + + if ( _context === undefined ) { + + _context = new ( window.AudioContext || window.webkitAudioContext )(); + + } + + return _context; + + } + + static setContext( value ) { + + _context = value; + + } + +} + +class AudioLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( this.manager ); + loader.setResponseType( 'arraybuffer' ); + loader.setPath( this.path ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + loader.load( url, function ( buffer ) { + + try { + + // Create a copy of the buffer. The `decodeAudioData` method + // detaches the buffer when complete, preventing reuse. + const bufferCopy = buffer.slice( 0 ); + + const context = AudioContext.getContext(); + context.decodeAudioData( bufferCopy, function ( audioBuffer ) { + + onLoad( audioBuffer ); + + } ).catch( handleError ); + + } catch ( e ) { + + handleError( e ); + + } + + }, onProgress, onError ); + + function handleError( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + } + +} + +const _eyeRight = /*@__PURE__*/ new Matrix4(); +const _eyeLeft = /*@__PURE__*/ new Matrix4(); +const _projectionMatrix = /*@__PURE__*/ new Matrix4(); + +class StereoCamera { + + constructor() { + + this.type = 'StereoCamera'; + + this.aspect = 1; + + this.eyeSep = 0.064; + + this.cameraL = new PerspectiveCamera(); + this.cameraL.layers.enable( 1 ); + this.cameraL.matrixAutoUpdate = false; + + this.cameraR = new PerspectiveCamera(); + this.cameraR.layers.enable( 2 ); + this.cameraR.matrixAutoUpdate = false; + + this._cache = { + focus: null, + fov: null, + aspect: null, + near: null, + far: null, + zoom: null, + eyeSep: null + }; + + } + + update( camera ) { + + const cache = this._cache; + + const needsUpdate = cache.focus !== camera.focus || cache.fov !== camera.fov || + cache.aspect !== camera.aspect * this.aspect || cache.near !== camera.near || + cache.far !== camera.far || cache.zoom !== camera.zoom || cache.eyeSep !== this.eyeSep; + + if ( needsUpdate ) { + + cache.focus = camera.focus; + cache.fov = camera.fov; + cache.aspect = camera.aspect * this.aspect; + cache.near = camera.near; + cache.far = camera.far; + cache.zoom = camera.zoom; + cache.eyeSep = this.eyeSep; + + // Off-axis stereoscopic effect based on + // http://paulbourke.net/stereographics/stereorender/ + + _projectionMatrix.copy( camera.projectionMatrix ); + const eyeSepHalf = cache.eyeSep / 2; + const eyeSepOnProjection = eyeSepHalf * cache.near / cache.focus; + const ymax = ( cache.near * Math.tan( DEG2RAD * cache.fov * 0.5 ) ) / cache.zoom; + let xmin, xmax; + + // translate xOffset + + _eyeLeft.elements[ 12 ] = - eyeSepHalf; + _eyeRight.elements[ 12 ] = eyeSepHalf; + + // for left eye + + xmin = - ymax * cache.aspect + eyeSepOnProjection; + xmax = ymax * cache.aspect + eyeSepOnProjection; + + _projectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin ); + _projectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin ); + + this.cameraL.projectionMatrix.copy( _projectionMatrix ); + + // for right eye + + xmin = - ymax * cache.aspect - eyeSepOnProjection; + xmax = ymax * cache.aspect - eyeSepOnProjection; + + _projectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin ); + _projectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin ); + + this.cameraR.projectionMatrix.copy( _projectionMatrix ); + + } + + this.cameraL.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeLeft ); + this.cameraR.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeRight ); + + } + +} + +class Clock { + + constructor( autoStart = true ) { + + this.autoStart = autoStart; + + this.startTime = 0; + this.oldTime = 0; + this.elapsedTime = 0; + + this.running = false; + + } + + start() { + + this.startTime = now(); + + this.oldTime = this.startTime; + this.elapsedTime = 0; + this.running = true; + + } + + stop() { + + this.getElapsedTime(); + this.running = false; + this.autoStart = false; + + } + + getElapsedTime() { + + this.getDelta(); + return this.elapsedTime; + + } + + getDelta() { + + let diff = 0; + + if ( this.autoStart && ! this.running ) { + + this.start(); + return 0; + + } + + if ( this.running ) { + + const newTime = now(); + + diff = ( newTime - this.oldTime ) / 1000; + this.oldTime = newTime; + + this.elapsedTime += diff; + + } + + return diff; + + } + +} + +function now() { + + return ( typeof performance === 'undefined' ? Date : performance ).now(); // see #10732 + +} + +const _position$1 = /*@__PURE__*/ new Vector3(); +const _quaternion$1 = /*@__PURE__*/ new Quaternion(); +const _scale$1 = /*@__PURE__*/ new Vector3(); +const _orientation$1 = /*@__PURE__*/ new Vector3(); + +class AudioListener extends Object3D { + + constructor() { + + super(); + + this.type = 'AudioListener'; + + this.context = AudioContext.getContext(); + + this.gain = this.context.createGain(); + this.gain.connect( this.context.destination ); + + this.filter = null; + + this.timeDelta = 0; + + // private + + this._clock = new Clock(); + + } + + getInput() { + + return this.gain; + + } + + removeFilter() { + + if ( this.filter !== null ) { + + this.gain.disconnect( this.filter ); + this.filter.disconnect( this.context.destination ); + this.gain.connect( this.context.destination ); + this.filter = null; + + } + + return this; + + } + + getFilter() { + + return this.filter; + + } + + setFilter( value ) { + + if ( this.filter !== null ) { + + this.gain.disconnect( this.filter ); + this.filter.disconnect( this.context.destination ); + + } else { + + this.gain.disconnect( this.context.destination ); + + } + + this.filter = value; + this.gain.connect( this.filter ); + this.filter.connect( this.context.destination ); + + return this; + + } + + getMasterVolume() { + + return this.gain.gain.value; + + } + + setMasterVolume( value ) { + + this.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 ); + + return this; + + } + + updateMatrixWorld( force ) { + + super.updateMatrixWorld( force ); + + const listener = this.context.listener; + const up = this.up; + + this.timeDelta = this._clock.getDelta(); + + this.matrixWorld.decompose( _position$1, _quaternion$1, _scale$1 ); + + _orientation$1.set( 0, 0, - 1 ).applyQuaternion( _quaternion$1 ); + + if ( listener.positionX ) { + + // code path for Chrome (see #14393) + + const endTime = this.context.currentTime + this.timeDelta; + + listener.positionX.linearRampToValueAtTime( _position$1.x, endTime ); + listener.positionY.linearRampToValueAtTime( _position$1.y, endTime ); + listener.positionZ.linearRampToValueAtTime( _position$1.z, endTime ); + listener.forwardX.linearRampToValueAtTime( _orientation$1.x, endTime ); + listener.forwardY.linearRampToValueAtTime( _orientation$1.y, endTime ); + listener.forwardZ.linearRampToValueAtTime( _orientation$1.z, endTime ); + listener.upX.linearRampToValueAtTime( up.x, endTime ); + listener.upY.linearRampToValueAtTime( up.y, endTime ); + listener.upZ.linearRampToValueAtTime( up.z, endTime ); + + } else { + + listener.setPosition( _position$1.x, _position$1.y, _position$1.z ); + listener.setOrientation( _orientation$1.x, _orientation$1.y, _orientation$1.z, up.x, up.y, up.z ); + + } + + } + +} + +class Audio extends Object3D { + + constructor( listener ) { + + super(); + + this.type = 'Audio'; + + this.listener = listener; + this.context = listener.context; + + this.gain = this.context.createGain(); + this.gain.connect( listener.getInput() ); + + this.autoplay = false; + + this.buffer = null; + this.detune = 0; + this.loop = false; + this.loopStart = 0; + this.loopEnd = 0; + this.offset = 0; + this.duration = undefined; + this.playbackRate = 1; + this.isPlaying = false; + this.hasPlaybackControl = true; + this.source = null; + this.sourceType = 'empty'; + + this._startedAt = 0; + this._progress = 0; + this._connected = false; + + this.filters = []; + + } + + getOutput() { + + return this.gain; + + } + + setNodeSource( audioNode ) { + + this.hasPlaybackControl = false; + this.sourceType = 'audioNode'; + this.source = audioNode; + this.connect(); + + return this; + + } + + setMediaElementSource( mediaElement ) { + + this.hasPlaybackControl = false; + this.sourceType = 'mediaNode'; + this.source = this.context.createMediaElementSource( mediaElement ); + this.connect(); + + return this; + + } + + setMediaStreamSource( mediaStream ) { + + this.hasPlaybackControl = false; + this.sourceType = 'mediaStreamNode'; + this.source = this.context.createMediaStreamSource( mediaStream ); + this.connect(); + + return this; + + } + + setBuffer( audioBuffer ) { + + this.buffer = audioBuffer; + this.sourceType = 'buffer'; + + if ( this.autoplay ) this.play(); + + return this; + + } + + play( delay = 0 ) { + + if ( this.isPlaying === true ) { + + console.warn( 'THREE.Audio: Audio is already playing.' ); + return; + + } + + if ( this.hasPlaybackControl === false ) { + + console.warn( 'THREE.Audio: this Audio has no playback control.' ); + return; + + } + + this._startedAt = this.context.currentTime + delay; + + const source = this.context.createBufferSource(); + source.buffer = this.buffer; + source.loop = this.loop; + source.loopStart = this.loopStart; + source.loopEnd = this.loopEnd; + source.onended = this.onEnded.bind( this ); + source.start( this._startedAt, this._progress + this.offset, this.duration ); + + this.isPlaying = true; + + this.source = source; + + this.setDetune( this.detune ); + this.setPlaybackRate( this.playbackRate ); + + return this.connect(); + + } + + pause() { + + if ( this.hasPlaybackControl === false ) { + + console.warn( 'THREE.Audio: this Audio has no playback control.' ); + return; + + } + + if ( this.isPlaying === true ) { + + // update current progress + + this._progress += Math.max( this.context.currentTime - this._startedAt, 0 ) * this.playbackRate; + + if ( this.loop === true ) { + + // ensure _progress does not exceed duration with looped audios + + this._progress = this._progress % ( this.duration || this.buffer.duration ); + + } + + this.source.stop(); + this.source.onended = null; + + this.isPlaying = false; + + } + + return this; + + } + + stop() { + + if ( this.hasPlaybackControl === false ) { + + console.warn( 'THREE.Audio: this Audio has no playback control.' ); + return; + + } + + this._progress = 0; + + if ( this.source !== null ) { + + this.source.stop(); + this.source.onended = null; + + } + + this.isPlaying = false; + + return this; + + } + + connect() { + + if ( this.filters.length > 0 ) { + + this.source.connect( this.filters[ 0 ] ); + + for ( let i = 1, l = this.filters.length; i < l; i ++ ) { + + this.filters[ i - 1 ].connect( this.filters[ i ] ); + + } + + this.filters[ this.filters.length - 1 ].connect( this.getOutput() ); + + } else { + + this.source.connect( this.getOutput() ); + + } + + this._connected = true; + + return this; + + } + + disconnect() { + + if ( this._connected === false ) { + + return; + + } + + if ( this.filters.length > 0 ) { + + this.source.disconnect( this.filters[ 0 ] ); + + for ( let i = 1, l = this.filters.length; i < l; i ++ ) { + + this.filters[ i - 1 ].disconnect( this.filters[ i ] ); + + } + + this.filters[ this.filters.length - 1 ].disconnect( this.getOutput() ); + + } else { + + this.source.disconnect( this.getOutput() ); + + } + + this._connected = false; + + return this; + + } + + getFilters() { + + return this.filters; + + } + + setFilters( value ) { + + if ( ! value ) value = []; + + if ( this._connected === true ) { + + this.disconnect(); + this.filters = value.slice(); + this.connect(); + + } else { + + this.filters = value.slice(); + + } + + return this; + + } + + setDetune( value ) { + + this.detune = value; + + if ( this.isPlaying === true && this.source.detune !== undefined ) { + + this.source.detune.setTargetAtTime( this.detune, this.context.currentTime, 0.01 ); + + } + + return this; + + } + + getDetune() { + + return this.detune; + + } + + getFilter() { + + return this.getFilters()[ 0 ]; + + } + + setFilter( filter ) { + + return this.setFilters( filter ? [ filter ] : [] ); + + } + + setPlaybackRate( value ) { + + if ( this.hasPlaybackControl === false ) { + + console.warn( 'THREE.Audio: this Audio has no playback control.' ); + return; + + } + + this.playbackRate = value; + + if ( this.isPlaying === true ) { + + this.source.playbackRate.setTargetAtTime( this.playbackRate, this.context.currentTime, 0.01 ); + + } + + return this; + + } + + getPlaybackRate() { + + return this.playbackRate; + + } + + onEnded() { + + this.isPlaying = false; + + } + + getLoop() { + + if ( this.hasPlaybackControl === false ) { + + console.warn( 'THREE.Audio: this Audio has no playback control.' ); + return false; + + } + + return this.loop; + + } + + setLoop( value ) { + + if ( this.hasPlaybackControl === false ) { + + console.warn( 'THREE.Audio: this Audio has no playback control.' ); + return; + + } + + this.loop = value; + + if ( this.isPlaying === true ) { + + this.source.loop = this.loop; + + } + + return this; + + } + + setLoopStart( value ) { + + this.loopStart = value; + + return this; + + } + + setLoopEnd( value ) { + + this.loopEnd = value; + + return this; + + } + + getVolume() { + + return this.gain.gain.value; + + } + + setVolume( value ) { + + this.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 ); + + return this; + + } + +} + +const _position = /*@__PURE__*/ new Vector3(); +const _quaternion = /*@__PURE__*/ new Quaternion(); +const _scale = /*@__PURE__*/ new Vector3(); +const _orientation = /*@__PURE__*/ new Vector3(); + +class PositionalAudio extends Audio { + + constructor( listener ) { + + super( listener ); + + this.panner = this.context.createPanner(); + this.panner.panningModel = 'HRTF'; + this.panner.connect( this.gain ); + + } + + connect() { + + super.connect(); + + this.panner.connect( this.gain ); + + } + + disconnect() { + + super.disconnect(); + + this.panner.disconnect( this.gain ); + + } + + getOutput() { + + return this.panner; + + } + + getRefDistance() { + + return this.panner.refDistance; + + } + + setRefDistance( value ) { + + this.panner.refDistance = value; + + return this; + + } + + getRolloffFactor() { + + return this.panner.rolloffFactor; + + } + + setRolloffFactor( value ) { + + this.panner.rolloffFactor = value; + + return this; + + } + + getDistanceModel() { + + return this.panner.distanceModel; + + } + + setDistanceModel( value ) { + + this.panner.distanceModel = value; + + return this; + + } + + getMaxDistance() { + + return this.panner.maxDistance; + + } + + setMaxDistance( value ) { + + this.panner.maxDistance = value; + + return this; + + } + + setDirectionalCone( coneInnerAngle, coneOuterAngle, coneOuterGain ) { + + this.panner.coneInnerAngle = coneInnerAngle; + this.panner.coneOuterAngle = coneOuterAngle; + this.panner.coneOuterGain = coneOuterGain; + + return this; + + } + + updateMatrixWorld( force ) { + + super.updateMatrixWorld( force ); + + if ( this.hasPlaybackControl === true && this.isPlaying === false ) return; + + this.matrixWorld.decompose( _position, _quaternion, _scale ); + + _orientation.set( 0, 0, 1 ).applyQuaternion( _quaternion ); + + const panner = this.panner; + + if ( panner.positionX ) { + + // code path for Chrome and Firefox (see #14393) + + const endTime = this.context.currentTime + this.listener.timeDelta; + + panner.positionX.linearRampToValueAtTime( _position.x, endTime ); + panner.positionY.linearRampToValueAtTime( _position.y, endTime ); + panner.positionZ.linearRampToValueAtTime( _position.z, endTime ); + panner.orientationX.linearRampToValueAtTime( _orientation.x, endTime ); + panner.orientationY.linearRampToValueAtTime( _orientation.y, endTime ); + panner.orientationZ.linearRampToValueAtTime( _orientation.z, endTime ); + + } else { + + panner.setPosition( _position.x, _position.y, _position.z ); + panner.setOrientation( _orientation.x, _orientation.y, _orientation.z ); + + } + + } + +} + +class AudioAnalyser { + + constructor( audio, fftSize = 2048 ) { + + this.analyser = audio.context.createAnalyser(); + this.analyser.fftSize = fftSize; + + this.data = new Uint8Array( this.analyser.frequencyBinCount ); + + audio.getOutput().connect( this.analyser ); + + } + + + getFrequencyData() { + + this.analyser.getByteFrequencyData( this.data ); + + return this.data; + + } + + getAverageFrequency() { + + let value = 0; + const data = this.getFrequencyData(); + + for ( let i = 0; i < data.length; i ++ ) { + + value += data[ i ]; + + } + + return value / data.length; + + } + +} + +class PropertyMixer { + + constructor( binding, typeName, valueSize ) { + + this.binding = binding; + this.valueSize = valueSize; + + let mixFunction, + mixFunctionAdditive, + setIdentity; + + // buffer layout: [ incoming | accu0 | accu1 | orig | addAccu | (optional work) ] + // + // interpolators can use .buffer as their .result + // the data then goes to 'incoming' + // + // 'accu0' and 'accu1' are used frame-interleaved for + // the cumulative result and are compared to detect + // changes + // + // 'orig' stores the original state of the property + // + // 'add' is used for additive cumulative results + // + // 'work' is optional and is only present for quaternion types. It is used + // to store intermediate quaternion multiplication results + + switch ( typeName ) { + + case 'quaternion': + mixFunction = this._slerp; + mixFunctionAdditive = this._slerpAdditive; + setIdentity = this._setAdditiveIdentityQuaternion; + + this.buffer = new Float64Array( valueSize * 6 ); + this._workIndex = 5; + break; + + case 'string': + case 'bool': + mixFunction = this._select; + + // Use the regular mix function and for additive on these types, + // additive is not relevant for non-numeric types + mixFunctionAdditive = this._select; + + setIdentity = this._setAdditiveIdentityOther; + + this.buffer = new Array( valueSize * 5 ); + break; + + default: + mixFunction = this._lerp; + mixFunctionAdditive = this._lerpAdditive; + setIdentity = this._setAdditiveIdentityNumeric; + + this.buffer = new Float64Array( valueSize * 5 ); + + } + + this._mixBufferRegion = mixFunction; + this._mixBufferRegionAdditive = mixFunctionAdditive; + this._setIdentity = setIdentity; + this._origIndex = 3; + this._addIndex = 4; + + this.cumulativeWeight = 0; + this.cumulativeWeightAdditive = 0; + + this.useCount = 0; + this.referenceCount = 0; + + } + + // accumulate data in the 'incoming' region into 'accu' + accumulate( accuIndex, weight ) { + + // note: happily accumulating nothing when weight = 0, the caller knows + // the weight and shouldn't have made the call in the first place + + const buffer = this.buffer, + stride = this.valueSize, + offset = accuIndex * stride + stride; + + let currentWeight = this.cumulativeWeight; + + if ( currentWeight === 0 ) { + + // accuN := incoming * weight + + for ( let i = 0; i !== stride; ++ i ) { + + buffer[ offset + i ] = buffer[ i ]; + + } + + currentWeight = weight; + + } else { + + // accuN := accuN + incoming * weight + + currentWeight += weight; + const mix = weight / currentWeight; + this._mixBufferRegion( buffer, offset, 0, mix, stride ); + + } + + this.cumulativeWeight = currentWeight; + + } + + // accumulate data in the 'incoming' region into 'add' + accumulateAdditive( weight ) { + + const buffer = this.buffer, + stride = this.valueSize, + offset = stride * this._addIndex; + + if ( this.cumulativeWeightAdditive === 0 ) { + + // add = identity + + this._setIdentity(); + + } + + // add := add + incoming * weight + + this._mixBufferRegionAdditive( buffer, offset, 0, weight, stride ); + this.cumulativeWeightAdditive += weight; + + } + + // apply the state of 'accu' to the binding when accus differ + apply( accuIndex ) { + + const stride = this.valueSize, + buffer = this.buffer, + offset = accuIndex * stride + stride, + + weight = this.cumulativeWeight, + weightAdditive = this.cumulativeWeightAdditive, + + binding = this.binding; + + this.cumulativeWeight = 0; + this.cumulativeWeightAdditive = 0; + + if ( weight < 1 ) { + + // accuN := accuN + original * ( 1 - cumulativeWeight ) + + const originalValueOffset = stride * this._origIndex; + + this._mixBufferRegion( + buffer, offset, originalValueOffset, 1 - weight, stride ); + + } + + if ( weightAdditive > 0 ) { + + // accuN := accuN + additive accuN + + this._mixBufferRegionAdditive( buffer, offset, this._addIndex * stride, 1, stride ); + + } + + for ( let i = stride, e = stride + stride; i !== e; ++ i ) { + + if ( buffer[ i ] !== buffer[ i + stride ] ) { + + // value has changed -> update scene graph + + binding.setValue( buffer, offset ); + break; + + } + + } + + } + + // remember the state of the bound property and copy it to both accus + saveOriginalState() { + + const binding = this.binding; + + const buffer = this.buffer, + stride = this.valueSize, + + originalValueOffset = stride * this._origIndex; + + binding.getValue( buffer, originalValueOffset ); + + // accu[0..1] := orig -- initially detect changes against the original + for ( let i = stride, e = originalValueOffset; i !== e; ++ i ) { + + buffer[ i ] = buffer[ originalValueOffset + ( i % stride ) ]; + + } + + // Add to identity for additive + this._setIdentity(); + + this.cumulativeWeight = 0; + this.cumulativeWeightAdditive = 0; + + } + + // apply the state previously taken via 'saveOriginalState' to the binding + restoreOriginalState() { + + const originalValueOffset = this.valueSize * 3; + this.binding.setValue( this.buffer, originalValueOffset ); + + } + + _setAdditiveIdentityNumeric() { + + const startIndex = this._addIndex * this.valueSize; + const endIndex = startIndex + this.valueSize; + + for ( let i = startIndex; i < endIndex; i ++ ) { + + this.buffer[ i ] = 0; + + } + + } + + _setAdditiveIdentityQuaternion() { + + this._setAdditiveIdentityNumeric(); + this.buffer[ this._addIndex * this.valueSize + 3 ] = 1; + + } + + _setAdditiveIdentityOther() { + + const startIndex = this._origIndex * this.valueSize; + const targetIndex = this._addIndex * this.valueSize; + + for ( let i = 0; i < this.valueSize; i ++ ) { + + this.buffer[ targetIndex + i ] = this.buffer[ startIndex + i ]; + + } + + } + + + // mix functions + + _select( buffer, dstOffset, srcOffset, t, stride ) { + + if ( t >= 0.5 ) { + + for ( let i = 0; i !== stride; ++ i ) { + + buffer[ dstOffset + i ] = buffer[ srcOffset + i ]; + + } + + } + + } + + _slerp( buffer, dstOffset, srcOffset, t ) { + + Quaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, srcOffset, t ); + + } + + _slerpAdditive( buffer, dstOffset, srcOffset, t, stride ) { + + const workOffset = this._workIndex * stride; + + // Store result in intermediate buffer offset + Quaternion.multiplyQuaternionsFlat( buffer, workOffset, buffer, dstOffset, buffer, srcOffset ); + + // Slerp to the intermediate result + Quaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, workOffset, t ); + + } + + _lerp( buffer, dstOffset, srcOffset, t, stride ) { + + const s = 1 - t; + + for ( let i = 0; i !== stride; ++ i ) { + + const j = dstOffset + i; + + buffer[ j ] = buffer[ j ] * s + buffer[ srcOffset + i ] * t; + + } + + } + + _lerpAdditive( buffer, dstOffset, srcOffset, t, stride ) { + + for ( let i = 0; i !== stride; ++ i ) { + + const j = dstOffset + i; + + buffer[ j ] = buffer[ j ] + buffer[ srcOffset + i ] * t; + + } + + } + +} + +// Characters [].:/ are reserved for track binding syntax. +const _RESERVED_CHARS_RE = '\\[\\]\\.:\\/'; +const _reservedRe = new RegExp( '[' + _RESERVED_CHARS_RE + ']', 'g' ); + +// Attempts to allow node names from any language. ES5's `\w` regexp matches +// only latin characters, and the unicode \p{L} is not yet supported. So +// instead, we exclude reserved characters and match everything else. +const _wordChar = '[^' + _RESERVED_CHARS_RE + ']'; +const _wordCharOrDot = '[^' + _RESERVED_CHARS_RE.replace( '\\.', '' ) + ']'; + +// Parent directories, delimited by '/' or ':'. Currently unused, but must +// be matched to parse the rest of the track name. +const _directoryRe = /*@__PURE__*/ /((?:WC+[\/:])*)/.source.replace( 'WC', _wordChar ); + +// Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'. +const _nodeRe = /*@__PURE__*/ /(WCOD+)?/.source.replace( 'WCOD', _wordCharOrDot ); + +// Object on target node, and accessor. May not contain reserved +// characters. Accessor may contain any character except closing bracket. +const _objectRe = /*@__PURE__*/ /(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace( 'WC', _wordChar ); + +// Property and accessor. May not contain reserved characters. Accessor may +// contain any non-bracket characters. +const _propertyRe = /*@__PURE__*/ /\.(WC+)(?:\[(.+)\])?/.source.replace( 'WC', _wordChar ); + +const _trackRe = new RegExp( '' + + '^' + + _directoryRe + + _nodeRe + + _objectRe + + _propertyRe + + '$' +); + +const _supportedObjectNames = [ 'material', 'materials', 'bones', 'map' ]; + +class Composite { + + constructor( targetGroup, path, optionalParsedPath ) { + + const parsedPath = optionalParsedPath || PropertyBinding.parseTrackName( path ); + + this._targetGroup = targetGroup; + this._bindings = targetGroup.subscribe_( path, parsedPath ); + + } + + getValue( array, offset ) { + + this.bind(); // bind all binding + + const firstValidIndex = this._targetGroup.nCachedObjects_, + binding = this._bindings[ firstValidIndex ]; + + // and only call .getValue on the first + if ( binding !== undefined ) binding.getValue( array, offset ); + + } + + setValue( array, offset ) { + + const bindings = this._bindings; + + for ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { + + bindings[ i ].setValue( array, offset ); + + } + + } + + bind() { + + const bindings = this._bindings; + + for ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { + + bindings[ i ].bind(); + + } + + } + + unbind() { + + const bindings = this._bindings; + + for ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { + + bindings[ i ].unbind(); + + } + + } + +} + +// Note: This class uses a State pattern on a per-method basis: +// 'bind' sets 'this.getValue' / 'setValue' and shadows the +// prototype version of these methods with one that represents +// the bound state. When the property is not found, the methods +// become no-ops. +class PropertyBinding { + + constructor( rootNode, path, parsedPath ) { + + this.path = path; + this.parsedPath = parsedPath || PropertyBinding.parseTrackName( path ); + + this.node = PropertyBinding.findNode( rootNode, this.parsedPath.nodeName ); + + this.rootNode = rootNode; + + // initial state of these methods that calls 'bind' + this.getValue = this._getValue_unbound; + this.setValue = this._setValue_unbound; + + } + + + static create( root, path, parsedPath ) { + + if ( ! ( root && root.isAnimationObjectGroup ) ) { + + return new PropertyBinding( root, path, parsedPath ); + + } else { + + return new PropertyBinding.Composite( root, path, parsedPath ); + + } + + } + + /** + * Replaces spaces with underscores and removes unsupported characters from + * node names, to ensure compatibility with parseTrackName(). + * + * @param {string} name Node name to be sanitized. + * @return {string} + */ + static sanitizeNodeName( name ) { + + return name.replace( /\s/g, '_' ).replace( _reservedRe, '' ); + + } + + static parseTrackName( trackName ) { + + const matches = _trackRe.exec( trackName ); + + if ( matches === null ) { + + throw new Error( 'PropertyBinding: Cannot parse trackName: ' + trackName ); + + } + + const results = { + // directoryName: matches[ 1 ], // (tschw) currently unused + nodeName: matches[ 2 ], + objectName: matches[ 3 ], + objectIndex: matches[ 4 ], + propertyName: matches[ 5 ], // required + propertyIndex: matches[ 6 ] + }; + + const lastDot = results.nodeName && results.nodeName.lastIndexOf( '.' ); + + if ( lastDot !== undefined && lastDot !== - 1 ) { + + const objectName = results.nodeName.substring( lastDot + 1 ); + + // Object names must be checked against an allowlist. Otherwise, there + // is no way to parse 'foo.bar.baz': 'baz' must be a property, but + // 'bar' could be the objectName, or part of a nodeName (which can + // include '.' characters). + if ( _supportedObjectNames.indexOf( objectName ) !== - 1 ) { + + results.nodeName = results.nodeName.substring( 0, lastDot ); + results.objectName = objectName; + + } + + } + + if ( results.propertyName === null || results.propertyName.length === 0 ) { + + throw new Error( 'PropertyBinding: can not parse propertyName from trackName: ' + trackName ); + + } + + return results; + + } + + static findNode( root, nodeName ) { + + if ( nodeName === undefined || nodeName === '' || nodeName === '.' || nodeName === - 1 || nodeName === root.name || nodeName === root.uuid ) { + + return root; + + } + + // search into skeleton bones. + if ( root.skeleton ) { + + const bone = root.skeleton.getBoneByName( nodeName ); + + if ( bone !== undefined ) { + + return bone; + + } + + } + + // search into node subtree. + if ( root.children ) { + + const searchNodeSubtree = function ( children ) { + + for ( let i = 0; i < children.length; i ++ ) { + + const childNode = children[ i ]; + + if ( childNode.name === nodeName || childNode.uuid === nodeName ) { + + return childNode; + + } + + const result = searchNodeSubtree( childNode.children ); + + if ( result ) return result; + + } + + return null; + + }; + + const subTreeNode = searchNodeSubtree( root.children ); + + if ( subTreeNode ) { + + return subTreeNode; + + } + + } + + return null; + + } + + // these are used to "bind" a nonexistent property + _getValue_unavailable() {} + _setValue_unavailable() {} + + // Getters + + _getValue_direct( buffer, offset ) { + + buffer[ offset ] = this.targetObject[ this.propertyName ]; + + } + + _getValue_array( buffer, offset ) { + + const source = this.resolvedProperty; + + for ( let i = 0, n = source.length; i !== n; ++ i ) { + + buffer[ offset ++ ] = source[ i ]; + + } + + } + + _getValue_arrayElement( buffer, offset ) { + + buffer[ offset ] = this.resolvedProperty[ this.propertyIndex ]; + + } + + _getValue_toArray( buffer, offset ) { + + this.resolvedProperty.toArray( buffer, offset ); + + } + + // Direct + + _setValue_direct( buffer, offset ) { + + this.targetObject[ this.propertyName ] = buffer[ offset ]; + + } + + _setValue_direct_setNeedsUpdate( buffer, offset ) { + + this.targetObject[ this.propertyName ] = buffer[ offset ]; + this.targetObject.needsUpdate = true; + + } + + _setValue_direct_setMatrixWorldNeedsUpdate( buffer, offset ) { + + this.targetObject[ this.propertyName ] = buffer[ offset ]; + this.targetObject.matrixWorldNeedsUpdate = true; + + } + + // EntireArray + + _setValue_array( buffer, offset ) { + + const dest = this.resolvedProperty; + + for ( let i = 0, n = dest.length; i !== n; ++ i ) { + + dest[ i ] = buffer[ offset ++ ]; + + } + + } + + _setValue_array_setNeedsUpdate( buffer, offset ) { + + const dest = this.resolvedProperty; + + for ( let i = 0, n = dest.length; i !== n; ++ i ) { + + dest[ i ] = buffer[ offset ++ ]; + + } + + this.targetObject.needsUpdate = true; + + } + + _setValue_array_setMatrixWorldNeedsUpdate( buffer, offset ) { + + const dest = this.resolvedProperty; + + for ( let i = 0, n = dest.length; i !== n; ++ i ) { + + dest[ i ] = buffer[ offset ++ ]; + + } + + this.targetObject.matrixWorldNeedsUpdate = true; + + } + + // ArrayElement + + _setValue_arrayElement( buffer, offset ) { + + this.resolvedProperty[ this.propertyIndex ] = buffer[ offset ]; + + } + + _setValue_arrayElement_setNeedsUpdate( buffer, offset ) { + + this.resolvedProperty[ this.propertyIndex ] = buffer[ offset ]; + this.targetObject.needsUpdate = true; + + } + + _setValue_arrayElement_setMatrixWorldNeedsUpdate( buffer, offset ) { + + this.resolvedProperty[ this.propertyIndex ] = buffer[ offset ]; + this.targetObject.matrixWorldNeedsUpdate = true; + + } + + // HasToFromArray + + _setValue_fromArray( buffer, offset ) { + + this.resolvedProperty.fromArray( buffer, offset ); + + } + + _setValue_fromArray_setNeedsUpdate( buffer, offset ) { + + this.resolvedProperty.fromArray( buffer, offset ); + this.targetObject.needsUpdate = true; + + } + + _setValue_fromArray_setMatrixWorldNeedsUpdate( buffer, offset ) { + + this.resolvedProperty.fromArray( buffer, offset ); + this.targetObject.matrixWorldNeedsUpdate = true; + + } + + _getValue_unbound( targetArray, offset ) { + + this.bind(); + this.getValue( targetArray, offset ); + + } + + _setValue_unbound( sourceArray, offset ) { + + this.bind(); + this.setValue( sourceArray, offset ); + + } + + // create getter / setter pair for a property in the scene graph + bind() { + + let targetObject = this.node; + const parsedPath = this.parsedPath; + + const objectName = parsedPath.objectName; + const propertyName = parsedPath.propertyName; + let propertyIndex = parsedPath.propertyIndex; + + if ( ! targetObject ) { + + targetObject = PropertyBinding.findNode( this.rootNode, parsedPath.nodeName ); + + this.node = targetObject; + + } + + // set fail state so we can just 'return' on error + this.getValue = this._getValue_unavailable; + this.setValue = this._setValue_unavailable; + + // ensure there is a value node + if ( ! targetObject ) { + + console.warn( 'THREE.PropertyBinding: No target node found for track: ' + this.path + '.' ); + return; + + } + + if ( objectName ) { + + let objectIndex = parsedPath.objectIndex; + + // special cases were we need to reach deeper into the hierarchy to get the face materials.... + switch ( objectName ) { + + case 'materials': + + if ( ! targetObject.material ) { + + console.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this ); + return; + + } + + if ( ! targetObject.material.materials ) { + + console.error( 'THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this ); + return; + + } + + targetObject = targetObject.material.materials; + + break; + + case 'bones': + + if ( ! targetObject.skeleton ) { + + console.error( 'THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.', this ); + return; + + } + + // potential future optimization: skip this if propertyIndex is already an integer + // and convert the integer string to a true integer. + + targetObject = targetObject.skeleton.bones; + + // support resolving morphTarget names into indices. + for ( let i = 0; i < targetObject.length; i ++ ) { + + if ( targetObject[ i ].name === objectIndex ) { + + objectIndex = i; + break; + + } + + } + + break; + + case 'map': + + if ( 'map' in targetObject ) { + + targetObject = targetObject.map; + break; + + } + + if ( ! targetObject.material ) { + + console.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this ); + return; + + } + + if ( ! targetObject.material.map ) { + + console.error( 'THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.', this ); + return; + + } + + targetObject = targetObject.material.map; + break; + + default: + + if ( targetObject[ objectName ] === undefined ) { + + console.error( 'THREE.PropertyBinding: Can not bind to objectName of node undefined.', this ); + return; + + } + + targetObject = targetObject[ objectName ]; + + } + + + if ( objectIndex !== undefined ) { + + if ( targetObject[ objectIndex ] === undefined ) { + + console.error( 'THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject ); + return; + + } + + targetObject = targetObject[ objectIndex ]; + + } + + } + + // resolve property + const nodeProperty = targetObject[ propertyName ]; + + if ( nodeProperty === undefined ) { + + const nodeName = parsedPath.nodeName; + + console.error( 'THREE.PropertyBinding: Trying to update property for track: ' + nodeName + + '.' + propertyName + ' but it wasn\'t found.', targetObject ); + return; + + } + + // determine versioning scheme + let versioning = this.Versioning.None; + + this.targetObject = targetObject; + + if ( targetObject.needsUpdate !== undefined ) { // material + + versioning = this.Versioning.NeedsUpdate; + + } else if ( targetObject.matrixWorldNeedsUpdate !== undefined ) { // node transform + + versioning = this.Versioning.MatrixWorldNeedsUpdate; + + } + + // determine how the property gets bound + let bindingType = this.BindingType.Direct; + + if ( propertyIndex !== undefined ) { + + // access a sub element of the property array (only primitives are supported right now) + + if ( propertyName === 'morphTargetInfluences' ) { + + // potential optimization, skip this if propertyIndex is already an integer, and convert the integer string to a true integer. + + // support resolving morphTarget names into indices. + if ( ! targetObject.geometry ) { + + console.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this ); + return; + + } + + if ( ! targetObject.geometry.morphAttributes ) { + + console.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this ); + return; + + } + + if ( targetObject.morphTargetDictionary[ propertyIndex ] !== undefined ) { + + propertyIndex = targetObject.morphTargetDictionary[ propertyIndex ]; + + } + + } + + bindingType = this.BindingType.ArrayElement; + + this.resolvedProperty = nodeProperty; + this.propertyIndex = propertyIndex; + + } else if ( nodeProperty.fromArray !== undefined && nodeProperty.toArray !== undefined ) { + + // must use copy for Object3D.Euler/Quaternion + + bindingType = this.BindingType.HasFromToArray; + + this.resolvedProperty = nodeProperty; + + } else if ( Array.isArray( nodeProperty ) ) { + + bindingType = this.BindingType.EntireArray; + + this.resolvedProperty = nodeProperty; + + } else { + + this.propertyName = propertyName; + + } + + // select getter / setter + this.getValue = this.GetterByBindingType[ bindingType ]; + this.setValue = this.SetterByBindingTypeAndVersioning[ bindingType ][ versioning ]; + + } + + unbind() { + + this.node = null; + + // back to the prototype version of getValue / setValue + // note: avoiding to mutate the shape of 'this' via 'delete' + this.getValue = this._getValue_unbound; + this.setValue = this._setValue_unbound; + + } + +} + +PropertyBinding.Composite = Composite; + +PropertyBinding.prototype.BindingType = { + Direct: 0, + EntireArray: 1, + ArrayElement: 2, + HasFromToArray: 3 +}; + +PropertyBinding.prototype.Versioning = { + None: 0, + NeedsUpdate: 1, + MatrixWorldNeedsUpdate: 2 +}; + +PropertyBinding.prototype.GetterByBindingType = [ + + PropertyBinding.prototype._getValue_direct, + PropertyBinding.prototype._getValue_array, + PropertyBinding.prototype._getValue_arrayElement, + PropertyBinding.prototype._getValue_toArray, + +]; + +PropertyBinding.prototype.SetterByBindingTypeAndVersioning = [ + + [ + // Direct + PropertyBinding.prototype._setValue_direct, + PropertyBinding.prototype._setValue_direct_setNeedsUpdate, + PropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate, + + ], [ + + // EntireArray + + PropertyBinding.prototype._setValue_array, + PropertyBinding.prototype._setValue_array_setNeedsUpdate, + PropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate, + + ], [ + + // ArrayElement + PropertyBinding.prototype._setValue_arrayElement, + PropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate, + PropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate, + + ], [ + + // HasToFromArray + PropertyBinding.prototype._setValue_fromArray, + PropertyBinding.prototype._setValue_fromArray_setNeedsUpdate, + PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate, + + ] + +]; + +/** + * + * A group of objects that receives a shared animation state. + * + * Usage: + * + * - Add objects you would otherwise pass as 'root' to the + * constructor or the .clipAction method of AnimationMixer. + * + * - Instead pass this object as 'root'. + * + * - You can also add and remove objects later when the mixer + * is running. + * + * Note: + * + * Objects of this class appear as one object to the mixer, + * so cache control of the individual objects must be done + * on the group. + * + * Limitation: + * + * - The animated properties must be compatible among the + * all objects in the group. + * + * - A single property can either be controlled through a + * target group or directly, but not both. + */ + +class AnimationObjectGroup { + + constructor() { + + this.isAnimationObjectGroup = true; + + this.uuid = generateUUID(); + + // cached objects followed by the active ones + this._objects = Array.prototype.slice.call( arguments ); + + this.nCachedObjects_ = 0; // threshold + // note: read by PropertyBinding.Composite + + const indices = {}; + this._indicesByUUID = indices; // for bookkeeping + + for ( let i = 0, n = arguments.length; i !== n; ++ i ) { + + indices[ arguments[ i ].uuid ] = i; + + } + + this._paths = []; // inside: string + this._parsedPaths = []; // inside: { we don't care, here } + this._bindings = []; // inside: Array< PropertyBinding > + this._bindingsIndicesByPath = {}; // inside: indices in these arrays + + const scope = this; + + this.stats = { + + objects: { + get total() { + + return scope._objects.length; + + }, + get inUse() { + + return this.total - scope.nCachedObjects_; + + } + }, + get bindingsPerObject() { + + return scope._bindings.length; + + } + + }; + + } + + add() { + + const objects = this._objects, + indicesByUUID = this._indicesByUUID, + paths = this._paths, + parsedPaths = this._parsedPaths, + bindings = this._bindings, + nBindings = bindings.length; + + let knownObject = undefined, + nObjects = objects.length, + nCachedObjects = this.nCachedObjects_; + + for ( let i = 0, n = arguments.length; i !== n; ++ i ) { + + const object = arguments[ i ], + uuid = object.uuid; + let index = indicesByUUID[ uuid ]; + + if ( index === undefined ) { + + // unknown object -> add it to the ACTIVE region + + index = nObjects ++; + indicesByUUID[ uuid ] = index; + objects.push( object ); + + // accounting is done, now do the same for all bindings + + for ( let j = 0, m = nBindings; j !== m; ++ j ) { + + bindings[ j ].push( new PropertyBinding( object, paths[ j ], parsedPaths[ j ] ) ); + + } + + } else if ( index < nCachedObjects ) { + + knownObject = objects[ index ]; + + // move existing object to the ACTIVE region + + const firstActiveIndex = -- nCachedObjects, + lastCachedObject = objects[ firstActiveIndex ]; + + indicesByUUID[ lastCachedObject.uuid ] = index; + objects[ index ] = lastCachedObject; + + indicesByUUID[ uuid ] = firstActiveIndex; + objects[ firstActiveIndex ] = object; + + // accounting is done, now do the same for all bindings + + for ( let j = 0, m = nBindings; j !== m; ++ j ) { + + const bindingsForPath = bindings[ j ], + lastCached = bindingsForPath[ firstActiveIndex ]; + + let binding = bindingsForPath[ index ]; + + bindingsForPath[ index ] = lastCached; + + if ( binding === undefined ) { + + // since we do not bother to create new bindings + // for objects that are cached, the binding may + // or may not exist + + binding = new PropertyBinding( object, paths[ j ], parsedPaths[ j ] ); + + } + + bindingsForPath[ firstActiveIndex ] = binding; + + } + + } else if ( objects[ index ] !== knownObject ) { + + console.error( 'THREE.AnimationObjectGroup: Different objects with the same UUID ' + + 'detected. Clean the caches or recreate your infrastructure when reloading scenes.' ); + + } // else the object is already where we want it to be + + } // for arguments + + this.nCachedObjects_ = nCachedObjects; + + } + + remove() { + + const objects = this._objects, + indicesByUUID = this._indicesByUUID, + bindings = this._bindings, + nBindings = bindings.length; + + let nCachedObjects = this.nCachedObjects_; + + for ( let i = 0, n = arguments.length; i !== n; ++ i ) { + + const object = arguments[ i ], + uuid = object.uuid, + index = indicesByUUID[ uuid ]; + + if ( index !== undefined && index >= nCachedObjects ) { + + // move existing object into the CACHED region + + const lastCachedIndex = nCachedObjects ++, + firstActiveObject = objects[ lastCachedIndex ]; + + indicesByUUID[ firstActiveObject.uuid ] = index; + objects[ index ] = firstActiveObject; + + indicesByUUID[ uuid ] = lastCachedIndex; + objects[ lastCachedIndex ] = object; + + // accounting is done, now do the same for all bindings + + for ( let j = 0, m = nBindings; j !== m; ++ j ) { + + const bindingsForPath = bindings[ j ], + firstActive = bindingsForPath[ lastCachedIndex ], + binding = bindingsForPath[ index ]; + + bindingsForPath[ index ] = firstActive; + bindingsForPath[ lastCachedIndex ] = binding; + + } + + } + + } // for arguments + + this.nCachedObjects_ = nCachedObjects; + + } + + // remove & forget + uncache() { + + const objects = this._objects, + indicesByUUID = this._indicesByUUID, + bindings = this._bindings, + nBindings = bindings.length; + + let nCachedObjects = this.nCachedObjects_, + nObjects = objects.length; + + for ( let i = 0, n = arguments.length; i !== n; ++ i ) { + + const object = arguments[ i ], + uuid = object.uuid, + index = indicesByUUID[ uuid ]; + + if ( index !== undefined ) { + + delete indicesByUUID[ uuid ]; + + if ( index < nCachedObjects ) { + + // object is cached, shrink the CACHED region + + const firstActiveIndex = -- nCachedObjects, + lastCachedObject = objects[ firstActiveIndex ], + lastIndex = -- nObjects, + lastObject = objects[ lastIndex ]; + + // last cached object takes this object's place + indicesByUUID[ lastCachedObject.uuid ] = index; + objects[ index ] = lastCachedObject; + + // last object goes to the activated slot and pop + indicesByUUID[ lastObject.uuid ] = firstActiveIndex; + objects[ firstActiveIndex ] = lastObject; + objects.pop(); + + // accounting is done, now do the same for all bindings + + for ( let j = 0, m = nBindings; j !== m; ++ j ) { + + const bindingsForPath = bindings[ j ], + lastCached = bindingsForPath[ firstActiveIndex ], + last = bindingsForPath[ lastIndex ]; + + bindingsForPath[ index ] = lastCached; + bindingsForPath[ firstActiveIndex ] = last; + bindingsForPath.pop(); + + } + + } else { + + // object is active, just swap with the last and pop + + const lastIndex = -- nObjects, + lastObject = objects[ lastIndex ]; + + if ( lastIndex > 0 ) { + + indicesByUUID[ lastObject.uuid ] = index; + + } + + objects[ index ] = lastObject; + objects.pop(); + + // accounting is done, now do the same for all bindings + + for ( let j = 0, m = nBindings; j !== m; ++ j ) { + + const bindingsForPath = bindings[ j ]; + + bindingsForPath[ index ] = bindingsForPath[ lastIndex ]; + bindingsForPath.pop(); + + } + + } // cached or active + + } // if object is known + + } // for arguments + + this.nCachedObjects_ = nCachedObjects; + + } + + // Internal interface used by befriended PropertyBinding.Composite: + + subscribe_( path, parsedPath ) { + + // returns an array of bindings for the given path that is changed + // according to the contained objects in the group + + const indicesByPath = this._bindingsIndicesByPath; + let index = indicesByPath[ path ]; + const bindings = this._bindings; + + if ( index !== undefined ) return bindings[ index ]; + + const paths = this._paths, + parsedPaths = this._parsedPaths, + objects = this._objects, + nObjects = objects.length, + nCachedObjects = this.nCachedObjects_, + bindingsForPath = new Array( nObjects ); + + index = bindings.length; + + indicesByPath[ path ] = index; + + paths.push( path ); + parsedPaths.push( parsedPath ); + bindings.push( bindingsForPath ); + + for ( let i = nCachedObjects, n = objects.length; i !== n; ++ i ) { + + const object = objects[ i ]; + bindingsForPath[ i ] = new PropertyBinding( object, path, parsedPath ); + + } + + return bindingsForPath; + + } + + unsubscribe_( path ) { + + // tells the group to forget about a property path and no longer + // update the array previously obtained with 'subscribe_' + + const indicesByPath = this._bindingsIndicesByPath, + index = indicesByPath[ path ]; + + if ( index !== undefined ) { + + const paths = this._paths, + parsedPaths = this._parsedPaths, + bindings = this._bindings, + lastBindingsIndex = bindings.length - 1, + lastBindings = bindings[ lastBindingsIndex ], + lastBindingsPath = path[ lastBindingsIndex ]; + + indicesByPath[ lastBindingsPath ] = index; + + bindings[ index ] = lastBindings; + bindings.pop(); + + parsedPaths[ index ] = parsedPaths[ lastBindingsIndex ]; + parsedPaths.pop(); + + paths[ index ] = paths[ lastBindingsIndex ]; + paths.pop(); + + } + + } + +} + +class AnimationAction { + + constructor( mixer, clip, localRoot = null, blendMode = clip.blendMode ) { + + this._mixer = mixer; + this._clip = clip; + this._localRoot = localRoot; + this.blendMode = blendMode; + + const tracks = clip.tracks, + nTracks = tracks.length, + interpolants = new Array( nTracks ); + + const interpolantSettings = { + endingStart: ZeroCurvatureEnding, + endingEnd: ZeroCurvatureEnding + }; + + for ( let i = 0; i !== nTracks; ++ i ) { + + const interpolant = tracks[ i ].createInterpolant( null ); + interpolants[ i ] = interpolant; + interpolant.settings = interpolantSettings; + + } + + this._interpolantSettings = interpolantSettings; + + this._interpolants = interpolants; // bound by the mixer + + // inside: PropertyMixer (managed by the mixer) + this._propertyBindings = new Array( nTracks ); + + this._cacheIndex = null; // for the memory manager + this._byClipCacheIndex = null; // for the memory manager + + this._timeScaleInterpolant = null; + this._weightInterpolant = null; + + this.loop = LoopRepeat; + this._loopCount = - 1; + + // global mixer time when the action is to be started + // it's set back to 'null' upon start of the action + this._startTime = null; + + // scaled local time of the action + // gets clamped or wrapped to 0..clip.duration according to loop + this.time = 0; + + this.timeScale = 1; + this._effectiveTimeScale = 1; + + this.weight = 1; + this._effectiveWeight = 1; + + this.repetitions = Infinity; // no. of repetitions when looping + + this.paused = false; // true -> zero effective time scale + this.enabled = true; // false -> zero effective weight + + this.clampWhenFinished = false;// keep feeding the last frame? + + this.zeroSlopeAtStart = true;// for smooth interpolation w/o separate + this.zeroSlopeAtEnd = true;// clips for start, loop and end + + } + + // State & Scheduling + + play() { + + this._mixer._activateAction( this ); + + return this; + + } + + stop() { + + this._mixer._deactivateAction( this ); + + return this.reset(); + + } + + reset() { + + this.paused = false; + this.enabled = true; + + this.time = 0; // restart clip + this._loopCount = - 1;// forget previous loops + this._startTime = null;// forget scheduling + + return this.stopFading().stopWarping(); + + } + + isRunning() { + + return this.enabled && ! this.paused && this.timeScale !== 0 && + this._startTime === null && this._mixer._isActiveAction( this ); + + } + + // return true when play has been called + isScheduled() { + + return this._mixer._isActiveAction( this ); + + } + + startAt( time ) { + + this._startTime = time; + + return this; + + } + + setLoop( mode, repetitions ) { + + this.loop = mode; + this.repetitions = repetitions; + + return this; + + } + + // Weight + + // set the weight stopping any scheduled fading + // although .enabled = false yields an effective weight of zero, this + // method does *not* change .enabled, because it would be confusing + setEffectiveWeight( weight ) { + + this.weight = weight; + + // note: same logic as when updated at runtime + this._effectiveWeight = this.enabled ? weight : 0; + + return this.stopFading(); + + } + + // return the weight considering fading and .enabled + getEffectiveWeight() { + + return this._effectiveWeight; + + } + + fadeIn( duration ) { + + return this._scheduleFading( duration, 0, 1 ); + + } + + fadeOut( duration ) { + + return this._scheduleFading( duration, 1, 0 ); + + } + + crossFadeFrom( fadeOutAction, duration, warp ) { + + fadeOutAction.fadeOut( duration ); + this.fadeIn( duration ); + + if ( warp ) { + + const fadeInDuration = this._clip.duration, + fadeOutDuration = fadeOutAction._clip.duration, + + startEndRatio = fadeOutDuration / fadeInDuration, + endStartRatio = fadeInDuration / fadeOutDuration; + + fadeOutAction.warp( 1.0, startEndRatio, duration ); + this.warp( endStartRatio, 1.0, duration ); + + } + + return this; + + } + + crossFadeTo( fadeInAction, duration, warp ) { + + return fadeInAction.crossFadeFrom( this, duration, warp ); + + } + + stopFading() { + + const weightInterpolant = this._weightInterpolant; + + if ( weightInterpolant !== null ) { + + this._weightInterpolant = null; + this._mixer._takeBackControlInterpolant( weightInterpolant ); + + } + + return this; + + } + + // Time Scale Control + + // set the time scale stopping any scheduled warping + // although .paused = true yields an effective time scale of zero, this + // method does *not* change .paused, because it would be confusing + setEffectiveTimeScale( timeScale ) { + + this.timeScale = timeScale; + this._effectiveTimeScale = this.paused ? 0 : timeScale; + + return this.stopWarping(); + + } + + // return the time scale considering warping and .paused + getEffectiveTimeScale() { + + return this._effectiveTimeScale; + + } + + setDuration( duration ) { + + this.timeScale = this._clip.duration / duration; + + return this.stopWarping(); + + } + + syncWith( action ) { + + this.time = action.time; + this.timeScale = action.timeScale; + + return this.stopWarping(); + + } + + halt( duration ) { + + return this.warp( this._effectiveTimeScale, 0, duration ); + + } + + warp( startTimeScale, endTimeScale, duration ) { + + const mixer = this._mixer, + now = mixer.time, + timeScale = this.timeScale; + + let interpolant = this._timeScaleInterpolant; + + if ( interpolant === null ) { + + interpolant = mixer._lendControlInterpolant(); + this._timeScaleInterpolant = interpolant; + + } + + const times = interpolant.parameterPositions, + values = interpolant.sampleValues; + + times[ 0 ] = now; + times[ 1 ] = now + duration; + + values[ 0 ] = startTimeScale / timeScale; + values[ 1 ] = endTimeScale / timeScale; + + return this; + + } + + stopWarping() { + + const timeScaleInterpolant = this._timeScaleInterpolant; + + if ( timeScaleInterpolant !== null ) { + + this._timeScaleInterpolant = null; + this._mixer._takeBackControlInterpolant( timeScaleInterpolant ); + + } + + return this; + + } + + // Object Accessors + + getMixer() { + + return this._mixer; + + } + + getClip() { + + return this._clip; + + } + + getRoot() { + + return this._localRoot || this._mixer._root; + + } + + // Interna + + _update( time, deltaTime, timeDirection, accuIndex ) { + + // called by the mixer + + if ( ! this.enabled ) { + + // call ._updateWeight() to update ._effectiveWeight + + this._updateWeight( time ); + return; + + } + + const startTime = this._startTime; + + if ( startTime !== null ) { + + // check for scheduled start of action + + const timeRunning = ( time - startTime ) * timeDirection; + if ( timeRunning < 0 || timeDirection === 0 ) { + + deltaTime = 0; + + } else { + + + this._startTime = null; // unschedule + deltaTime = timeDirection * timeRunning; + + } + + } + + // apply time scale and advance time + + deltaTime *= this._updateTimeScale( time ); + const clipTime = this._updateTime( deltaTime ); + + // note: _updateTime may disable the action resulting in + // an effective weight of 0 + + const weight = this._updateWeight( time ); + + if ( weight > 0 ) { + + const interpolants = this._interpolants; + const propertyMixers = this._propertyBindings; + + switch ( this.blendMode ) { + + case AdditiveAnimationBlendMode: + + for ( let j = 0, m = interpolants.length; j !== m; ++ j ) { + + interpolants[ j ].evaluate( clipTime ); + propertyMixers[ j ].accumulateAdditive( weight ); + + } + + break; + + case NormalAnimationBlendMode: + default: + + for ( let j = 0, m = interpolants.length; j !== m; ++ j ) { + + interpolants[ j ].evaluate( clipTime ); + propertyMixers[ j ].accumulate( accuIndex, weight ); + + } + + } + + } + + } + + _updateWeight( time ) { + + let weight = 0; + + if ( this.enabled ) { + + weight = this.weight; + const interpolant = this._weightInterpolant; + + if ( interpolant !== null ) { + + const interpolantValue = interpolant.evaluate( time )[ 0 ]; + + weight *= interpolantValue; + + if ( time > interpolant.parameterPositions[ 1 ] ) { + + this.stopFading(); + + if ( interpolantValue === 0 ) { + + // faded out, disable + this.enabled = false; + + } + + } + + } + + } + + this._effectiveWeight = weight; + return weight; + + } + + _updateTimeScale( time ) { + + let timeScale = 0; + + if ( ! this.paused ) { + + timeScale = this.timeScale; + + const interpolant = this._timeScaleInterpolant; + + if ( interpolant !== null ) { + + const interpolantValue = interpolant.evaluate( time )[ 0 ]; + + timeScale *= interpolantValue; + + if ( time > interpolant.parameterPositions[ 1 ] ) { + + this.stopWarping(); + + if ( timeScale === 0 ) { + + // motion has halted, pause + this.paused = true; + + } else { + + // warp done - apply final time scale + this.timeScale = timeScale; + + } + + } + + } + + } + + this._effectiveTimeScale = timeScale; + return timeScale; + + } + + _updateTime( deltaTime ) { + + const duration = this._clip.duration; + const loop = this.loop; + + let time = this.time + deltaTime; + let loopCount = this._loopCount; + + const pingPong = ( loop === LoopPingPong ); + + if ( deltaTime === 0 ) { + + if ( loopCount === - 1 ) return time; + + return ( pingPong && ( loopCount & 1 ) === 1 ) ? duration - time : time; + + } + + if ( loop === LoopOnce ) { + + if ( loopCount === - 1 ) { + + // just started + + this._loopCount = 0; + this._setEndings( true, true, false ); + + } + + handle_stop: { + + if ( time >= duration ) { + + time = duration; + + } else if ( time < 0 ) { + + time = 0; + + } else { + + this.time = time; + + break handle_stop; + + } + + if ( this.clampWhenFinished ) this.paused = true; + else this.enabled = false; + + this.time = time; + + this._mixer.dispatchEvent( { + type: 'finished', action: this, + direction: deltaTime < 0 ? - 1 : 1 + } ); + + } + + } else { // repetitive Repeat or PingPong + + if ( loopCount === - 1 ) { + + // just started + + if ( deltaTime >= 0 ) { + + loopCount = 0; + + this._setEndings( true, this.repetitions === 0, pingPong ); + + } else { + + // when looping in reverse direction, the initial + // transition through zero counts as a repetition, + // so leave loopCount at -1 + + this._setEndings( this.repetitions === 0, true, pingPong ); + + } + + } + + if ( time >= duration || time < 0 ) { + + // wrap around + + const loopDelta = Math.floor( time / duration ); // signed + time -= duration * loopDelta; + + loopCount += Math.abs( loopDelta ); + + const pending = this.repetitions - loopCount; + + if ( pending <= 0 ) { + + // have to stop (switch state, clamp time, fire event) + + if ( this.clampWhenFinished ) this.paused = true; + else this.enabled = false; + + time = deltaTime > 0 ? duration : 0; + + this.time = time; + + this._mixer.dispatchEvent( { + type: 'finished', action: this, + direction: deltaTime > 0 ? 1 : - 1 + } ); + + } else { + + // keep running + + if ( pending === 1 ) { + + // entering the last round + + const atStart = deltaTime < 0; + this._setEndings( atStart, ! atStart, pingPong ); + + } else { + + this._setEndings( false, false, pingPong ); + + } + + this._loopCount = loopCount; + + this.time = time; + + this._mixer.dispatchEvent( { + type: 'loop', action: this, loopDelta: loopDelta + } ); + + } + + } else { + + this.time = time; + + } + + if ( pingPong && ( loopCount & 1 ) === 1 ) { + + // invert time for the "pong round" + + return duration - time; + + } + + } + + return time; + + } + + _setEndings( atStart, atEnd, pingPong ) { + + const settings = this._interpolantSettings; + + if ( pingPong ) { + + settings.endingStart = ZeroSlopeEnding; + settings.endingEnd = ZeroSlopeEnding; + + } else { + + // assuming for LoopOnce atStart == atEnd == true + + if ( atStart ) { + + settings.endingStart = this.zeroSlopeAtStart ? ZeroSlopeEnding : ZeroCurvatureEnding; + + } else { + + settings.endingStart = WrapAroundEnding; + + } + + if ( atEnd ) { + + settings.endingEnd = this.zeroSlopeAtEnd ? ZeroSlopeEnding : ZeroCurvatureEnding; + + } else { + + settings.endingEnd = WrapAroundEnding; + + } + + } + + } + + _scheduleFading( duration, weightNow, weightThen ) { + + const mixer = this._mixer, now = mixer.time; + let interpolant = this._weightInterpolant; + + if ( interpolant === null ) { + + interpolant = mixer._lendControlInterpolant(); + this._weightInterpolant = interpolant; + + } + + const times = interpolant.parameterPositions, + values = interpolant.sampleValues; + + times[ 0 ] = now; + values[ 0 ] = weightNow; + times[ 1 ] = now + duration; + values[ 1 ] = weightThen; + + return this; + + } + +} + +const _controlInterpolantsResultBuffer = new Float32Array( 1 ); + + +class AnimationMixer extends EventDispatcher { + + constructor( root ) { + + super(); + + this._root = root; + this._initMemoryManager(); + this._accuIndex = 0; + this.time = 0; + this.timeScale = 1.0; + + } + + _bindAction( action, prototypeAction ) { + + const root = action._localRoot || this._root, + tracks = action._clip.tracks, + nTracks = tracks.length, + bindings = action._propertyBindings, + interpolants = action._interpolants, + rootUuid = root.uuid, + bindingsByRoot = this._bindingsByRootAndName; + + let bindingsByName = bindingsByRoot[ rootUuid ]; + + if ( bindingsByName === undefined ) { + + bindingsByName = {}; + bindingsByRoot[ rootUuid ] = bindingsByName; + + } + + for ( let i = 0; i !== nTracks; ++ i ) { + + const track = tracks[ i ], + trackName = track.name; + + let binding = bindingsByName[ trackName ]; + + if ( binding !== undefined ) { + + ++ binding.referenceCount; + bindings[ i ] = binding; + + } else { + + binding = bindings[ i ]; + + if ( binding !== undefined ) { + + // existing binding, make sure the cache knows + + if ( binding._cacheIndex === null ) { + + ++ binding.referenceCount; + this._addInactiveBinding( binding, rootUuid, trackName ); + + } + + continue; + + } + + const path = prototypeAction && prototypeAction. + _propertyBindings[ i ].binding.parsedPath; + + binding = new PropertyMixer( + PropertyBinding.create( root, trackName, path ), + track.ValueTypeName, track.getValueSize() ); + + ++ binding.referenceCount; + this._addInactiveBinding( binding, rootUuid, trackName ); + + bindings[ i ] = binding; + + } + + interpolants[ i ].resultBuffer = binding.buffer; + + } + + } + + _activateAction( action ) { + + if ( ! this._isActiveAction( action ) ) { + + if ( action._cacheIndex === null ) { + + // this action has been forgotten by the cache, but the user + // appears to be still using it -> rebind + + const rootUuid = ( action._localRoot || this._root ).uuid, + clipUuid = action._clip.uuid, + actionsForClip = this._actionsByClip[ clipUuid ]; + + this._bindAction( action, + actionsForClip && actionsForClip.knownActions[ 0 ] ); + + this._addInactiveAction( action, clipUuid, rootUuid ); + + } + + const bindings = action._propertyBindings; + + // increment reference counts / sort out state + for ( let i = 0, n = bindings.length; i !== n; ++ i ) { + + const binding = bindings[ i ]; + + if ( binding.useCount ++ === 0 ) { + + this._lendBinding( binding ); + binding.saveOriginalState(); + + } + + } + + this._lendAction( action ); + + } + + } + + _deactivateAction( action ) { + + if ( this._isActiveAction( action ) ) { + + const bindings = action._propertyBindings; + + // decrement reference counts / sort out state + for ( let i = 0, n = bindings.length; i !== n; ++ i ) { + + const binding = bindings[ i ]; + + if ( -- binding.useCount === 0 ) { + + binding.restoreOriginalState(); + this._takeBackBinding( binding ); + + } + + } + + this._takeBackAction( action ); + + } + + } + + // Memory manager + + _initMemoryManager() { + + this._actions = []; // 'nActiveActions' followed by inactive ones + this._nActiveActions = 0; + + this._actionsByClip = {}; + // inside: + // { + // knownActions: Array< AnimationAction > - used as prototypes + // actionByRoot: AnimationAction - lookup + // } + + + this._bindings = []; // 'nActiveBindings' followed by inactive ones + this._nActiveBindings = 0; + + this._bindingsByRootAndName = {}; // inside: Map< name, PropertyMixer > + + + this._controlInterpolants = []; // same game as above + this._nActiveControlInterpolants = 0; + + const scope = this; + + this.stats = { + + actions: { + get total() { + + return scope._actions.length; + + }, + get inUse() { + + return scope._nActiveActions; + + } + }, + bindings: { + get total() { + + return scope._bindings.length; + + }, + get inUse() { + + return scope._nActiveBindings; + + } + }, + controlInterpolants: { + get total() { + + return scope._controlInterpolants.length; + + }, + get inUse() { + + return scope._nActiveControlInterpolants; + + } + } + + }; + + } + + // Memory management for AnimationAction objects + + _isActiveAction( action ) { + + const index = action._cacheIndex; + return index !== null && index < this._nActiveActions; + + } + + _addInactiveAction( action, clipUuid, rootUuid ) { + + const actions = this._actions, + actionsByClip = this._actionsByClip; + + let actionsForClip = actionsByClip[ clipUuid ]; + + if ( actionsForClip === undefined ) { + + actionsForClip = { + + knownActions: [ action ], + actionByRoot: {} + + }; + + action._byClipCacheIndex = 0; + + actionsByClip[ clipUuid ] = actionsForClip; + + } else { + + const knownActions = actionsForClip.knownActions; + + action._byClipCacheIndex = knownActions.length; + knownActions.push( action ); + + } + + action._cacheIndex = actions.length; + actions.push( action ); + + actionsForClip.actionByRoot[ rootUuid ] = action; + + } + + _removeInactiveAction( action ) { + + const actions = this._actions, + lastInactiveAction = actions[ actions.length - 1 ], + cacheIndex = action._cacheIndex; + + lastInactiveAction._cacheIndex = cacheIndex; + actions[ cacheIndex ] = lastInactiveAction; + actions.pop(); + + action._cacheIndex = null; + + + const clipUuid = action._clip.uuid, + actionsByClip = this._actionsByClip, + actionsForClip = actionsByClip[ clipUuid ], + knownActionsForClip = actionsForClip.knownActions, + + lastKnownAction = + knownActionsForClip[ knownActionsForClip.length - 1 ], + + byClipCacheIndex = action._byClipCacheIndex; + + lastKnownAction._byClipCacheIndex = byClipCacheIndex; + knownActionsForClip[ byClipCacheIndex ] = lastKnownAction; + knownActionsForClip.pop(); + + action._byClipCacheIndex = null; + + + const actionByRoot = actionsForClip.actionByRoot, + rootUuid = ( action._localRoot || this._root ).uuid; + + delete actionByRoot[ rootUuid ]; + + if ( knownActionsForClip.length === 0 ) { + + delete actionsByClip[ clipUuid ]; + + } + + this._removeInactiveBindingsForAction( action ); + + } + + _removeInactiveBindingsForAction( action ) { + + const bindings = action._propertyBindings; + + for ( let i = 0, n = bindings.length; i !== n; ++ i ) { + + const binding = bindings[ i ]; + + if ( -- binding.referenceCount === 0 ) { + + this._removeInactiveBinding( binding ); + + } + + } + + } + + _lendAction( action ) { + + // [ active actions | inactive actions ] + // [ active actions >| inactive actions ] + // s a + // <-swap-> + // a s + + const actions = this._actions, + prevIndex = action._cacheIndex, + + lastActiveIndex = this._nActiveActions ++, + + firstInactiveAction = actions[ lastActiveIndex ]; + + action._cacheIndex = lastActiveIndex; + actions[ lastActiveIndex ] = action; + + firstInactiveAction._cacheIndex = prevIndex; + actions[ prevIndex ] = firstInactiveAction; + + } + + _takeBackAction( action ) { + + // [ active actions | inactive actions ] + // [ active actions |< inactive actions ] + // a s + // <-swap-> + // s a + + const actions = this._actions, + prevIndex = action._cacheIndex, + + firstInactiveIndex = -- this._nActiveActions, + + lastActiveAction = actions[ firstInactiveIndex ]; + + action._cacheIndex = firstInactiveIndex; + actions[ firstInactiveIndex ] = action; + + lastActiveAction._cacheIndex = prevIndex; + actions[ prevIndex ] = lastActiveAction; + + } + + // Memory management for PropertyMixer objects + + _addInactiveBinding( binding, rootUuid, trackName ) { + + const bindingsByRoot = this._bindingsByRootAndName, + bindings = this._bindings; + + let bindingByName = bindingsByRoot[ rootUuid ]; + + if ( bindingByName === undefined ) { + + bindingByName = {}; + bindingsByRoot[ rootUuid ] = bindingByName; + + } + + bindingByName[ trackName ] = binding; + + binding._cacheIndex = bindings.length; + bindings.push( binding ); + + } + + _removeInactiveBinding( binding ) { + + const bindings = this._bindings, + propBinding = binding.binding, + rootUuid = propBinding.rootNode.uuid, + trackName = propBinding.path, + bindingsByRoot = this._bindingsByRootAndName, + bindingByName = bindingsByRoot[ rootUuid ], + + lastInactiveBinding = bindings[ bindings.length - 1 ], + cacheIndex = binding._cacheIndex; + + lastInactiveBinding._cacheIndex = cacheIndex; + bindings[ cacheIndex ] = lastInactiveBinding; + bindings.pop(); + + delete bindingByName[ trackName ]; + + if ( Object.keys( bindingByName ).length === 0 ) { + + delete bindingsByRoot[ rootUuid ]; + + } + + } + + _lendBinding( binding ) { + + const bindings = this._bindings, + prevIndex = binding._cacheIndex, + + lastActiveIndex = this._nActiveBindings ++, + + firstInactiveBinding = bindings[ lastActiveIndex ]; + + binding._cacheIndex = lastActiveIndex; + bindings[ lastActiveIndex ] = binding; + + firstInactiveBinding._cacheIndex = prevIndex; + bindings[ prevIndex ] = firstInactiveBinding; + + } + + _takeBackBinding( binding ) { + + const bindings = this._bindings, + prevIndex = binding._cacheIndex, + + firstInactiveIndex = -- this._nActiveBindings, + + lastActiveBinding = bindings[ firstInactiveIndex ]; + + binding._cacheIndex = firstInactiveIndex; + bindings[ firstInactiveIndex ] = binding; + + lastActiveBinding._cacheIndex = prevIndex; + bindings[ prevIndex ] = lastActiveBinding; + + } + + + // Memory management of Interpolants for weight and time scale + + _lendControlInterpolant() { + + const interpolants = this._controlInterpolants, + lastActiveIndex = this._nActiveControlInterpolants ++; + + let interpolant = interpolants[ lastActiveIndex ]; + + if ( interpolant === undefined ) { + + interpolant = new LinearInterpolant( + new Float32Array( 2 ), new Float32Array( 2 ), + 1, _controlInterpolantsResultBuffer ); + + interpolant.__cacheIndex = lastActiveIndex; + interpolants[ lastActiveIndex ] = interpolant; + + } + + return interpolant; + + } + + _takeBackControlInterpolant( interpolant ) { + + const interpolants = this._controlInterpolants, + prevIndex = interpolant.__cacheIndex, + + firstInactiveIndex = -- this._nActiveControlInterpolants, + + lastActiveInterpolant = interpolants[ firstInactiveIndex ]; + + interpolant.__cacheIndex = firstInactiveIndex; + interpolants[ firstInactiveIndex ] = interpolant; + + lastActiveInterpolant.__cacheIndex = prevIndex; + interpolants[ prevIndex ] = lastActiveInterpolant; + + } + + // return an action for a clip optionally using a custom root target + // object (this method allocates a lot of dynamic memory in case a + // previously unknown clip/root combination is specified) + clipAction( clip, optionalRoot, blendMode ) { + + const root = optionalRoot || this._root, + rootUuid = root.uuid; + + let clipObject = typeof clip === 'string' ? AnimationClip.findByName( root, clip ) : clip; + + const clipUuid = clipObject !== null ? clipObject.uuid : clip; + + const actionsForClip = this._actionsByClip[ clipUuid ]; + let prototypeAction = null; + + if ( blendMode === undefined ) { + + if ( clipObject !== null ) { + + blendMode = clipObject.blendMode; + + } else { + + blendMode = NormalAnimationBlendMode; + + } + + } + + if ( actionsForClip !== undefined ) { + + const existingAction = actionsForClip.actionByRoot[ rootUuid ]; + + if ( existingAction !== undefined && existingAction.blendMode === blendMode ) { + + return existingAction; + + } + + // we know the clip, so we don't have to parse all + // the bindings again but can just copy + prototypeAction = actionsForClip.knownActions[ 0 ]; + + // also, take the clip from the prototype action + if ( clipObject === null ) + clipObject = prototypeAction._clip; + + } + + // clip must be known when specified via string + if ( clipObject === null ) return null; + + // allocate all resources required to run it + const newAction = new AnimationAction( this, clipObject, optionalRoot, blendMode ); + + this._bindAction( newAction, prototypeAction ); + + // and make the action known to the memory manager + this._addInactiveAction( newAction, clipUuid, rootUuid ); + + return newAction; + + } + + // get an existing action + existingAction( clip, optionalRoot ) { + + const root = optionalRoot || this._root, + rootUuid = root.uuid, + + clipObject = typeof clip === 'string' ? + AnimationClip.findByName( root, clip ) : clip, + + clipUuid = clipObject ? clipObject.uuid : clip, + + actionsForClip = this._actionsByClip[ clipUuid ]; + + if ( actionsForClip !== undefined ) { + + return actionsForClip.actionByRoot[ rootUuid ] || null; + + } + + return null; + + } + + // deactivates all previously scheduled actions + stopAllAction() { + + const actions = this._actions, + nActions = this._nActiveActions; + + for ( let i = nActions - 1; i >= 0; -- i ) { + + actions[ i ].stop(); + + } + + return this; + + } + + // advance the time and update apply the animation + update( deltaTime ) { + + deltaTime *= this.timeScale; + + const actions = this._actions, + nActions = this._nActiveActions, + + time = this.time += deltaTime, + timeDirection = Math.sign( deltaTime ), + + accuIndex = this._accuIndex ^= 1; + + // run active actions + + for ( let i = 0; i !== nActions; ++ i ) { + + const action = actions[ i ]; + + action._update( time, deltaTime, timeDirection, accuIndex ); + + } + + // update scene graph + + const bindings = this._bindings, + nBindings = this._nActiveBindings; + + for ( let i = 0; i !== nBindings; ++ i ) { + + bindings[ i ].apply( accuIndex ); + + } + + return this; + + } + + // Allows you to seek to a specific time in an animation. + setTime( timeInSeconds ) { + + this.time = 0; // Zero out time attribute for AnimationMixer object; + for ( let i = 0; i < this._actions.length; i ++ ) { + + this._actions[ i ].time = 0; // Zero out time attribute for all associated AnimationAction objects. + + } + + return this.update( timeInSeconds ); // Update used to set exact time. Returns "this" AnimationMixer object. + + } + + // return this mixer's root target object + getRoot() { + + return this._root; + + } + + // free all resources specific to a particular clip + uncacheClip( clip ) { + + const actions = this._actions, + clipUuid = clip.uuid, + actionsByClip = this._actionsByClip, + actionsForClip = actionsByClip[ clipUuid ]; + + if ( actionsForClip !== undefined ) { + + // note: just calling _removeInactiveAction would mess up the + // iteration state and also require updating the state we can + // just throw away + + const actionsToRemove = actionsForClip.knownActions; + + for ( let i = 0, n = actionsToRemove.length; i !== n; ++ i ) { + + const action = actionsToRemove[ i ]; + + this._deactivateAction( action ); + + const cacheIndex = action._cacheIndex, + lastInactiveAction = actions[ actions.length - 1 ]; + + action._cacheIndex = null; + action._byClipCacheIndex = null; + + lastInactiveAction._cacheIndex = cacheIndex; + actions[ cacheIndex ] = lastInactiveAction; + actions.pop(); + + this._removeInactiveBindingsForAction( action ); + + } + + delete actionsByClip[ clipUuid ]; + + } + + } + + // free all resources specific to a particular root target object + uncacheRoot( root ) { + + const rootUuid = root.uuid, + actionsByClip = this._actionsByClip; + + for ( const clipUuid in actionsByClip ) { + + const actionByRoot = actionsByClip[ clipUuid ].actionByRoot, + action = actionByRoot[ rootUuid ]; + + if ( action !== undefined ) { + + this._deactivateAction( action ); + this._removeInactiveAction( action ); + + } + + } + + const bindingsByRoot = this._bindingsByRootAndName, + bindingByName = bindingsByRoot[ rootUuid ]; + + if ( bindingByName !== undefined ) { + + for ( const trackName in bindingByName ) { + + const binding = bindingByName[ trackName ]; + binding.restoreOriginalState(); + this._removeInactiveBinding( binding ); + + } + + } + + } + + // remove a targeted clip from the cache + uncacheAction( clip, optionalRoot ) { + + const action = this.existingAction( clip, optionalRoot ); + + if ( action !== null ) { + + this._deactivateAction( action ); + this._removeInactiveAction( action ); + + } + + } + +} + +class Uniform { + + constructor( value ) { + + this.value = value; + + } + + clone() { + + return new Uniform( this.value.clone === undefined ? this.value : this.value.clone() ); + + } + +} + +let _id = 0; + +class UniformsGroup extends EventDispatcher { + + constructor() { + + super(); + + this.isUniformsGroup = true; + + Object.defineProperty( this, 'id', { value: _id ++ } ); + + this.name = ''; + + this.usage = StaticDrawUsage; + this.uniforms = []; + + } + + add( uniform ) { + + this.uniforms.push( uniform ); + + return this; + + } + + remove( uniform ) { + + const index = this.uniforms.indexOf( uniform ); + + if ( index !== - 1 ) this.uniforms.splice( index, 1 ); + + return this; + + } + + setName( name ) { + + this.name = name; + + return this; + + } + + setUsage( value ) { + + this.usage = value; + + return this; + + } + + dispose() { + + this.dispatchEvent( { type: 'dispose' } ); + + return this; + + } + + copy( source ) { + + this.name = source.name; + this.usage = source.usage; + + const uniformsSource = source.uniforms; + + this.uniforms.length = 0; + + for ( let i = 0, l = uniformsSource.length; i < l; i ++ ) { + + const uniforms = Array.isArray( uniformsSource[ i ] ) ? uniformsSource[ i ] : [ uniformsSource[ i ] ]; + + for ( let j = 0; j < uniforms.length; j ++ ) { + + this.uniforms.push( uniforms[ j ].clone() ); + + } + + } + + return this; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +class InstancedInterleavedBuffer extends InterleavedBuffer { + + constructor( array, stride, meshPerAttribute = 1 ) { + + super( array, stride ); + + this.isInstancedInterleavedBuffer = true; + + this.meshPerAttribute = meshPerAttribute; + + } + + copy( source ) { + + super.copy( source ); + + this.meshPerAttribute = source.meshPerAttribute; + + return this; + + } + + clone( data ) { + + const ib = super.clone( data ); + + ib.meshPerAttribute = this.meshPerAttribute; + + return ib; + + } + + toJSON( data ) { + + const json = super.toJSON( data ); + + json.isInstancedInterleavedBuffer = true; + json.meshPerAttribute = this.meshPerAttribute; + + return json; + + } + +} + +class GLBufferAttribute { + + constructor( buffer, type, itemSize, elementSize, count ) { + + this.isGLBufferAttribute = true; + + this.name = ''; + + this.buffer = buffer; + this.type = type; + this.itemSize = itemSize; + this.elementSize = elementSize; + this.count = count; + + this.version = 0; + + } + + set needsUpdate( value ) { + + if ( value === true ) this.version ++; + + } + + setBuffer( buffer ) { + + this.buffer = buffer; + + return this; + + } + + setType( type, elementSize ) { + + this.type = type; + this.elementSize = elementSize; + + return this; + + } + + setItemSize( itemSize ) { + + this.itemSize = itemSize; + + return this; + + } + + setCount( count ) { + + this.count = count; + + return this; + + } + +} + +const _matrix = /*@__PURE__*/ new Matrix4(); + +class Raycaster { + + constructor( origin, direction, near = 0, far = Infinity ) { + + this.ray = new Ray( origin, direction ); + // direction is assumed to be normalized (for accurate distance calculations) + + this.near = near; + this.far = far; + this.camera = null; + this.layers = new Layers(); + + this.params = { + Mesh: {}, + Line: { threshold: 1 }, + LOD: {}, + Points: { threshold: 1 }, + Sprite: {} + }; + + } + + set( origin, direction ) { + + // direction is assumed to be normalized (for accurate distance calculations) + + this.ray.set( origin, direction ); + + } + + setFromCamera( coords, camera ) { + + if ( camera.isPerspectiveCamera ) { + + this.ray.origin.setFromMatrixPosition( camera.matrixWorld ); + this.ray.direction.set( coords.x, coords.y, 0.5 ).unproject( camera ).sub( this.ray.origin ).normalize(); + this.camera = camera; + + } else if ( camera.isOrthographicCamera ) { + + this.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera + this.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld ); + this.camera = camera; + + } else { + + console.error( 'THREE.Raycaster: Unsupported camera type: ' + camera.type ); + + } + + } + + setFromXRController( controller ) { + + _matrix.identity().extractRotation( controller.matrixWorld ); + + this.ray.origin.setFromMatrixPosition( controller.matrixWorld ); + this.ray.direction.set( 0, 0, - 1 ).applyMatrix4( _matrix ); + + return this; + + } + + intersectObject( object, recursive = true, intersects = [] ) { + + intersect( object, this, intersects, recursive ); + + intersects.sort( ascSort ); + + return intersects; + + } + + intersectObjects( objects, recursive = true, intersects = [] ) { + + for ( let i = 0, l = objects.length; i < l; i ++ ) { + + intersect( objects[ i ], this, intersects, recursive ); + + } + + intersects.sort( ascSort ); + + return intersects; + + } + +} + +function ascSort( a, b ) { + + return a.distance - b.distance; + +} + +function intersect( object, raycaster, intersects, recursive ) { + + if ( object.layers.test( raycaster.layers ) ) { + + object.raycast( raycaster, intersects ); + + } + + if ( recursive === true ) { + + const children = object.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + intersect( children[ i ], raycaster, intersects, true ); + + } + + } + +} + +/** + * Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system + * + * phi (the polar angle) is measured from the positive y-axis. The positive y-axis is up. + * theta (the azimuthal angle) is measured from the positive z-axis. + */ +class Spherical { + + constructor( radius = 1, phi = 0, theta = 0 ) { + + this.radius = radius; + this.phi = phi; // polar angle + this.theta = theta; // azimuthal angle + + return this; + + } + + set( radius, phi, theta ) { + + this.radius = radius; + this.phi = phi; + this.theta = theta; + + return this; + + } + + copy( other ) { + + this.radius = other.radius; + this.phi = other.phi; + this.theta = other.theta; + + return this; + + } + + // restrict phi to be between EPS and PI-EPS + makeSafe() { + + const EPS = 0.000001; + this.phi = Math.max( EPS, Math.min( Math.PI - EPS, this.phi ) ); + + return this; + + } + + setFromVector3( v ) { + + return this.setFromCartesianCoords( v.x, v.y, v.z ); + + } + + setFromCartesianCoords( x, y, z ) { + + this.radius = Math.sqrt( x * x + y * y + z * z ); + + if ( this.radius === 0 ) { + + this.theta = 0; + this.phi = 0; + + } else { + + this.theta = Math.atan2( x, z ); + this.phi = Math.acos( clamp( y / this.radius, - 1, 1 ) ); + + } + + return this; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +/** + * Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system + */ + +class Cylindrical { + + constructor( radius = 1, theta = 0, y = 0 ) { + + this.radius = radius; // distance from the origin to a point in the x-z plane + this.theta = theta; // counterclockwise angle in the x-z plane measured in radians from the positive z-axis + this.y = y; // height above the x-z plane + + return this; + + } + + set( radius, theta, y ) { + + this.radius = radius; + this.theta = theta; + this.y = y; + + return this; + + } + + copy( other ) { + + this.radius = other.radius; + this.theta = other.theta; + this.y = other.y; + + return this; + + } + + setFromVector3( v ) { + + return this.setFromCartesianCoords( v.x, v.y, v.z ); + + } + + setFromCartesianCoords( x, y, z ) { + + this.radius = Math.sqrt( x * x + z * z ); + this.theta = Math.atan2( x, z ); + this.y = y; + + return this; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +const _vector$4 = /*@__PURE__*/ new Vector2(); + +class Box2 { + + constructor( min = new Vector2( + Infinity, + Infinity ), max = new Vector2( - Infinity, - Infinity ) ) { + + this.isBox2 = true; + + this.min = min; + this.max = max; + + } + + set( min, max ) { + + this.min.copy( min ); + this.max.copy( max ); + + return this; + + } + + setFromPoints( points ) { + + this.makeEmpty(); + + for ( let i = 0, il = points.length; i < il; i ++ ) { + + this.expandByPoint( points[ i ] ); + + } + + return this; + + } + + setFromCenterAndSize( center, size ) { + + const halfSize = _vector$4.copy( size ).multiplyScalar( 0.5 ); + this.min.copy( center ).sub( halfSize ); + this.max.copy( center ).add( halfSize ); + + return this; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( box ) { + + this.min.copy( box.min ); + this.max.copy( box.max ); + + return this; + + } + + makeEmpty() { + + this.min.x = this.min.y = + Infinity; + this.max.x = this.max.y = - Infinity; + + return this; + + } + + isEmpty() { + + // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes + + return ( this.max.x < this.min.x ) || ( this.max.y < this.min.y ); + + } + + getCenter( target ) { + + return this.isEmpty() ? target.set( 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 ); + + } + + getSize( target ) { + + return this.isEmpty() ? target.set( 0, 0 ) : target.subVectors( this.max, this.min ); + + } + + expandByPoint( point ) { + + this.min.min( point ); + this.max.max( point ); + + return this; + + } + + expandByVector( vector ) { + + this.min.sub( vector ); + this.max.add( vector ); + + return this; + + } + + expandByScalar( scalar ) { + + this.min.addScalar( - scalar ); + this.max.addScalar( scalar ); + + return this; + + } + + containsPoint( point ) { + + return point.x < this.min.x || point.x > this.max.x || + point.y < this.min.y || point.y > this.max.y ? false : true; + + } + + containsBox( box ) { + + return this.min.x <= box.min.x && box.max.x <= this.max.x && + this.min.y <= box.min.y && box.max.y <= this.max.y; + + } + + getParameter( point, target ) { + + // This can potentially have a divide by zero if the box + // has a size dimension of 0. + + return target.set( + ( point.x - this.min.x ) / ( this.max.x - this.min.x ), + ( point.y - this.min.y ) / ( this.max.y - this.min.y ) + ); + + } + + intersectsBox( box ) { + + // using 4 splitting planes to rule out intersections + + return box.max.x < this.min.x || box.min.x > this.max.x || + box.max.y < this.min.y || box.min.y > this.max.y ? false : true; + + } + + clampPoint( point, target ) { + + return target.copy( point ).clamp( this.min, this.max ); + + } + + distanceToPoint( point ) { + + return this.clampPoint( point, _vector$4 ).distanceTo( point ); + + } + + intersect( box ) { + + this.min.max( box.min ); + this.max.min( box.max ); + + if ( this.isEmpty() ) this.makeEmpty(); + + return this; + + } + + union( box ) { + + this.min.min( box.min ); + this.max.max( box.max ); + + return this; + + } + + translate( offset ) { + + this.min.add( offset ); + this.max.add( offset ); + + return this; + + } + + equals( box ) { + + return box.min.equals( this.min ) && box.max.equals( this.max ); + + } + +} + +const _startP = /*@__PURE__*/ new Vector3(); +const _startEnd = /*@__PURE__*/ new Vector3(); + +class Line3 { + + constructor( start = new Vector3(), end = new Vector3() ) { + + this.start = start; + this.end = end; + + } + + set( start, end ) { + + this.start.copy( start ); + this.end.copy( end ); + + return this; + + } + + copy( line ) { + + this.start.copy( line.start ); + this.end.copy( line.end ); + + return this; + + } + + getCenter( target ) { + + return target.addVectors( this.start, this.end ).multiplyScalar( 0.5 ); + + } + + delta( target ) { + + return target.subVectors( this.end, this.start ); + + } + + distanceSq() { + + return this.start.distanceToSquared( this.end ); + + } + + distance() { + + return this.start.distanceTo( this.end ); + + } + + at( t, target ) { + + return this.delta( target ).multiplyScalar( t ).add( this.start ); + + } + + closestPointToPointParameter( point, clampToLine ) { + + _startP.subVectors( point, this.start ); + _startEnd.subVectors( this.end, this.start ); + + const startEnd2 = _startEnd.dot( _startEnd ); + const startEnd_startP = _startEnd.dot( _startP ); + + let t = startEnd_startP / startEnd2; + + if ( clampToLine ) { + + t = clamp( t, 0, 1 ); + + } + + return t; + + } + + closestPointToPoint( point, clampToLine, target ) { + + const t = this.closestPointToPointParameter( point, clampToLine ); + + return this.delta( target ).multiplyScalar( t ).add( this.start ); + + } + + applyMatrix4( matrix ) { + + this.start.applyMatrix4( matrix ); + this.end.applyMatrix4( matrix ); + + return this; + + } + + equals( line ) { + + return line.start.equals( this.start ) && line.end.equals( this.end ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +const _vector$3 = /*@__PURE__*/ new Vector3(); + +class SpotLightHelper extends Object3D { + + constructor( light, color ) { + + super(); + + this.light = light; + + this.matrixAutoUpdate = false; + + this.color = color; + + this.type = 'SpotLightHelper'; + + const geometry = new BufferGeometry(); + + const positions = [ + 0, 0, 0, 0, 0, 1, + 0, 0, 0, 1, 0, 1, + 0, 0, 0, - 1, 0, 1, + 0, 0, 0, 0, 1, 1, + 0, 0, 0, 0, - 1, 1 + ]; + + for ( let i = 0, j = 1, l = 32; i < l; i ++, j ++ ) { + + const p1 = ( i / l ) * Math.PI * 2; + const p2 = ( j / l ) * Math.PI * 2; + + positions.push( + Math.cos( p1 ), Math.sin( p1 ), 1, + Math.cos( p2 ), Math.sin( p2 ), 1 + ); + + } + + geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); + + const material = new LineBasicMaterial( { fog: false, toneMapped: false } ); + + this.cone = new LineSegments( geometry, material ); + this.add( this.cone ); + + this.update(); + + } + + dispose() { + + this.cone.geometry.dispose(); + this.cone.material.dispose(); + + } + + update() { + + this.light.updateWorldMatrix( true, false ); + this.light.target.updateWorldMatrix( true, false ); + + // update the local matrix based on the parent and light target transforms + if ( this.parent ) { + + this.parent.updateWorldMatrix( true ); + + this.matrix + .copy( this.parent.matrixWorld ) + .invert() + .multiply( this.light.matrixWorld ); + + } else { + + this.matrix.copy( this.light.matrixWorld ); + + } + + this.matrixWorld.copy( this.light.matrixWorld ); + + const coneLength = this.light.distance ? this.light.distance : 1000; + const coneWidth = coneLength * Math.tan( this.light.angle ); + + this.cone.scale.set( coneWidth, coneWidth, coneLength ); + + _vector$3.setFromMatrixPosition( this.light.target.matrixWorld ); + + this.cone.lookAt( _vector$3 ); + + if ( this.color !== undefined ) { + + this.cone.material.color.set( this.color ); + + } else { + + this.cone.material.color.copy( this.light.color ); + + } + + } + +} + +const _vector$2 = /*@__PURE__*/ new Vector3(); +const _boneMatrix = /*@__PURE__*/ new Matrix4(); +const _matrixWorldInv = /*@__PURE__*/ new Matrix4(); + + +class SkeletonHelper extends LineSegments { + + constructor( object ) { + + const bones = getBoneList( object ); + + const geometry = new BufferGeometry(); + + const vertices = []; + const colors = []; + + const color1 = new Color( 0, 0, 1 ); + const color2 = new Color( 0, 1, 0 ); + + for ( let i = 0; i < bones.length; i ++ ) { + + const bone = bones[ i ]; + + if ( bone.parent && bone.parent.isBone ) { + + vertices.push( 0, 0, 0 ); + vertices.push( 0, 0, 0 ); + colors.push( color1.r, color1.g, color1.b ); + colors.push( color2.r, color2.g, color2.b ); + + } + + } + + geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); + + const material = new LineBasicMaterial( { vertexColors: true, depthTest: false, depthWrite: false, toneMapped: false, transparent: true } ); + + super( geometry, material ); + + this.isSkeletonHelper = true; + + this.type = 'SkeletonHelper'; + + this.root = object; + this.bones = bones; + + this.matrix = object.matrixWorld; + this.matrixAutoUpdate = false; + + } + + updateMatrixWorld( force ) { + + const bones = this.bones; + + const geometry = this.geometry; + const position = geometry.getAttribute( 'position' ); + + _matrixWorldInv.copy( this.root.matrixWorld ).invert(); + + for ( let i = 0, j = 0; i < bones.length; i ++ ) { + + const bone = bones[ i ]; + + if ( bone.parent && bone.parent.isBone ) { + + _boneMatrix.multiplyMatrices( _matrixWorldInv, bone.matrixWorld ); + _vector$2.setFromMatrixPosition( _boneMatrix ); + position.setXYZ( j, _vector$2.x, _vector$2.y, _vector$2.z ); + + _boneMatrix.multiplyMatrices( _matrixWorldInv, bone.parent.matrixWorld ); + _vector$2.setFromMatrixPosition( _boneMatrix ); + position.setXYZ( j + 1, _vector$2.x, _vector$2.y, _vector$2.z ); + + j += 2; + + } + + } + + geometry.getAttribute( 'position' ).needsUpdate = true; + + super.updateMatrixWorld( force ); + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + + +function getBoneList( object ) { + + const boneList = []; + + if ( object.isBone === true ) { + + boneList.push( object ); + + } + + for ( let i = 0; i < object.children.length; i ++ ) { + + boneList.push.apply( boneList, getBoneList( object.children[ i ] ) ); + + } + + return boneList; + +} + +class PointLightHelper extends Mesh { + + constructor( light, sphereSize, color ) { + + const geometry = new SphereGeometry( sphereSize, 4, 2 ); + const material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } ); + + super( geometry, material ); + + this.light = light; + + this.color = color; + + this.type = 'PointLightHelper'; + + this.matrix = this.light.matrixWorld; + this.matrixAutoUpdate = false; + + this.update(); + + + /* + // TODO: delete this comment? + const distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 ); + const distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } ); + + this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial ); + this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial ); + + const d = light.distance; + + if ( d === 0.0 ) { + + this.lightDistance.visible = false; + + } else { + + this.lightDistance.scale.set( d, d, d ); + + } + + this.add( this.lightDistance ); + */ + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + + update() { + + this.light.updateWorldMatrix( true, false ); + + if ( this.color !== undefined ) { + + this.material.color.set( this.color ); + + } else { + + this.material.color.copy( this.light.color ); + + } + + /* + const d = this.light.distance; + + if ( d === 0.0 ) { + + this.lightDistance.visible = false; + + } else { + + this.lightDistance.visible = true; + this.lightDistance.scale.set( d, d, d ); + + } + */ + + } + +} + +const _vector$1 = /*@__PURE__*/ new Vector3(); +const _color1 = /*@__PURE__*/ new Color(); +const _color2 = /*@__PURE__*/ new Color(); + +class HemisphereLightHelper extends Object3D { + + constructor( light, size, color ) { + + super(); + + this.light = light; + + this.matrix = light.matrixWorld; + this.matrixAutoUpdate = false; + + this.color = color; + + this.type = 'HemisphereLightHelper'; + + const geometry = new OctahedronGeometry( size ); + geometry.rotateY( Math.PI * 0.5 ); + + this.material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } ); + if ( this.color === undefined ) this.material.vertexColors = true; + + const position = geometry.getAttribute( 'position' ); + const colors = new Float32Array( position.count * 3 ); + + geometry.setAttribute( 'color', new BufferAttribute( colors, 3 ) ); + + this.add( new Mesh( geometry, this.material ) ); + + this.update(); + + } + + dispose() { + + this.children[ 0 ].geometry.dispose(); + this.children[ 0 ].material.dispose(); + + } + + update() { + + const mesh = this.children[ 0 ]; + + if ( this.color !== undefined ) { + + this.material.color.set( this.color ); + + } else { + + const colors = mesh.geometry.getAttribute( 'color' ); + + _color1.copy( this.light.color ); + _color2.copy( this.light.groundColor ); + + for ( let i = 0, l = colors.count; i < l; i ++ ) { + + const color = ( i < ( l / 2 ) ) ? _color1 : _color2; + + colors.setXYZ( i, color.r, color.g, color.b ); + + } + + colors.needsUpdate = true; + + } + + this.light.updateWorldMatrix( true, false ); + + mesh.lookAt( _vector$1.setFromMatrixPosition( this.light.matrixWorld ).negate() ); + + } + +} + +class GridHelper extends LineSegments { + + constructor( size = 10, divisions = 10, color1 = 0x444444, color2 = 0x888888 ) { + + color1 = new Color( color1 ); + color2 = new Color( color2 ); + + const center = divisions / 2; + const step = size / divisions; + const halfSize = size / 2; + + const vertices = [], colors = []; + + for ( let i = 0, j = 0, k = - halfSize; i <= divisions; i ++, k += step ) { + + vertices.push( - halfSize, 0, k, halfSize, 0, k ); + vertices.push( k, 0, - halfSize, k, 0, halfSize ); + + const color = i === center ? color1 : color2; + + color.toArray( colors, j ); j += 3; + color.toArray( colors, j ); j += 3; + color.toArray( colors, j ); j += 3; + color.toArray( colors, j ); j += 3; + + } + + const geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); + + const material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } ); + + super( geometry, material ); + + this.type = 'GridHelper'; + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +class PolarGridHelper extends LineSegments { + + constructor( radius = 10, sectors = 16, rings = 8, divisions = 64, color1 = 0x444444, color2 = 0x888888 ) { + + color1 = new Color( color1 ); + color2 = new Color( color2 ); + + const vertices = []; + const colors = []; + + // create the sectors + + if ( sectors > 1 ) { + + for ( let i = 0; i < sectors; i ++ ) { + + const v = ( i / sectors ) * ( Math.PI * 2 ); + + const x = Math.sin( v ) * radius; + const z = Math.cos( v ) * radius; + + vertices.push( 0, 0, 0 ); + vertices.push( x, 0, z ); + + const color = ( i & 1 ) ? color1 : color2; + + colors.push( color.r, color.g, color.b ); + colors.push( color.r, color.g, color.b ); + + } + + } + + // create the rings + + for ( let i = 0; i < rings; i ++ ) { + + const color = ( i & 1 ) ? color1 : color2; + + const r = radius - ( radius / rings * i ); + + for ( let j = 0; j < divisions; j ++ ) { + + // first vertex + + let v = ( j / divisions ) * ( Math.PI * 2 ); + + let x = Math.sin( v ) * r; + let z = Math.cos( v ) * r; + + vertices.push( x, 0, z ); + colors.push( color.r, color.g, color.b ); + + // second vertex + + v = ( ( j + 1 ) / divisions ) * ( Math.PI * 2 ); + + x = Math.sin( v ) * r; + z = Math.cos( v ) * r; + + vertices.push( x, 0, z ); + colors.push( color.r, color.g, color.b ); + + } + + } + + const geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); + + const material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } ); + + super( geometry, material ); + + this.type = 'PolarGridHelper'; + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +const _v1 = /*@__PURE__*/ new Vector3(); +const _v2 = /*@__PURE__*/ new Vector3(); +const _v3 = /*@__PURE__*/ new Vector3(); + +class DirectionalLightHelper extends Object3D { + + constructor( light, size, color ) { + + super(); + + this.light = light; + + this.matrix = light.matrixWorld; + this.matrixAutoUpdate = false; + + this.color = color; + + this.type = 'DirectionalLightHelper'; + + if ( size === undefined ) size = 1; + + let geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( [ + - size, size, 0, + size, size, 0, + size, - size, 0, + - size, - size, 0, + - size, size, 0 + ], 3 ) ); + + const material = new LineBasicMaterial( { fog: false, toneMapped: false } ); + + this.lightPlane = new Line( geometry, material ); + this.add( this.lightPlane ); + + geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 0, 1 ], 3 ) ); + + this.targetLine = new Line( geometry, material ); + this.add( this.targetLine ); + + this.update(); + + } + + dispose() { + + this.lightPlane.geometry.dispose(); + this.lightPlane.material.dispose(); + this.targetLine.geometry.dispose(); + this.targetLine.material.dispose(); + + } + + update() { + + this.light.updateWorldMatrix( true, false ); + this.light.target.updateWorldMatrix( true, false ); + + _v1.setFromMatrixPosition( this.light.matrixWorld ); + _v2.setFromMatrixPosition( this.light.target.matrixWorld ); + _v3.subVectors( _v2, _v1 ); + + this.lightPlane.lookAt( _v2 ); + + if ( this.color !== undefined ) { + + this.lightPlane.material.color.set( this.color ); + this.targetLine.material.color.set( this.color ); + + } else { + + this.lightPlane.material.color.copy( this.light.color ); + this.targetLine.material.color.copy( this.light.color ); + + } + + this.targetLine.lookAt( _v2 ); + this.targetLine.scale.z = _v3.length(); + + } + +} + +const _vector = /*@__PURE__*/ new Vector3(); +const _camera = /*@__PURE__*/ new Camera(); + +/** + * - shows frustum, line of sight and up of the camera + * - suitable for fast updates + * - based on frustum visualization in lightgl.js shadowmap example + * https://github.com/evanw/lightgl.js/blob/master/tests/shadowmap.html + */ + +class CameraHelper extends LineSegments { + + constructor( camera ) { + + const geometry = new BufferGeometry(); + const material = new LineBasicMaterial( { color: 0xffffff, vertexColors: true, toneMapped: false } ); + + const vertices = []; + const colors = []; + + const pointMap = {}; + + // near + + addLine( 'n1', 'n2' ); + addLine( 'n2', 'n4' ); + addLine( 'n4', 'n3' ); + addLine( 'n3', 'n1' ); + + // far + + addLine( 'f1', 'f2' ); + addLine( 'f2', 'f4' ); + addLine( 'f4', 'f3' ); + addLine( 'f3', 'f1' ); + + // sides + + addLine( 'n1', 'f1' ); + addLine( 'n2', 'f2' ); + addLine( 'n3', 'f3' ); + addLine( 'n4', 'f4' ); + + // cone + + addLine( 'p', 'n1' ); + addLine( 'p', 'n2' ); + addLine( 'p', 'n3' ); + addLine( 'p', 'n4' ); + + // up + + addLine( 'u1', 'u2' ); + addLine( 'u2', 'u3' ); + addLine( 'u3', 'u1' ); + + // target + + addLine( 'c', 't' ); + addLine( 'p', 'c' ); + + // cross + + addLine( 'cn1', 'cn2' ); + addLine( 'cn3', 'cn4' ); + + addLine( 'cf1', 'cf2' ); + addLine( 'cf3', 'cf4' ); + + function addLine( a, b ) { + + addPoint( a ); + addPoint( b ); + + } + + function addPoint( id ) { + + vertices.push( 0, 0, 0 ); + colors.push( 0, 0, 0 ); + + if ( pointMap[ id ] === undefined ) { + + pointMap[ id ] = []; + + } + + pointMap[ id ].push( ( vertices.length / 3 ) - 1 ); + + } + + geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); + + super( geometry, material ); + + this.type = 'CameraHelper'; + + this.camera = camera; + if ( this.camera.updateProjectionMatrix ) this.camera.updateProjectionMatrix(); + + this.matrix = camera.matrixWorld; + this.matrixAutoUpdate = false; + + this.pointMap = pointMap; + + this.update(); + + // colors + + const colorFrustum = new Color( 0xffaa00 ); + const colorCone = new Color( 0xff0000 ); + const colorUp = new Color( 0x00aaff ); + const colorTarget = new Color( 0xffffff ); + const colorCross = new Color( 0x333333 ); + + this.setColors( colorFrustum, colorCone, colorUp, colorTarget, colorCross ); + + } + + setColors( frustum, cone, up, target, cross ) { + + const geometry = this.geometry; + + const colorAttribute = geometry.getAttribute( 'color' ); + + // near + + colorAttribute.setXYZ( 0, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 1, frustum.r, frustum.g, frustum.b ); // n1, n2 + colorAttribute.setXYZ( 2, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 3, frustum.r, frustum.g, frustum.b ); // n2, n4 + colorAttribute.setXYZ( 4, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 5, frustum.r, frustum.g, frustum.b ); // n4, n3 + colorAttribute.setXYZ( 6, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 7, frustum.r, frustum.g, frustum.b ); // n3, n1 + + // far + + colorAttribute.setXYZ( 8, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 9, frustum.r, frustum.g, frustum.b ); // f1, f2 + colorAttribute.setXYZ( 10, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 11, frustum.r, frustum.g, frustum.b ); // f2, f4 + colorAttribute.setXYZ( 12, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 13, frustum.r, frustum.g, frustum.b ); // f4, f3 + colorAttribute.setXYZ( 14, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 15, frustum.r, frustum.g, frustum.b ); // f3, f1 + + // sides + + colorAttribute.setXYZ( 16, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 17, frustum.r, frustum.g, frustum.b ); // n1, f1 + colorAttribute.setXYZ( 18, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 19, frustum.r, frustum.g, frustum.b ); // n2, f2 + colorAttribute.setXYZ( 20, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 21, frustum.r, frustum.g, frustum.b ); // n3, f3 + colorAttribute.setXYZ( 22, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 23, frustum.r, frustum.g, frustum.b ); // n4, f4 + + // cone + + colorAttribute.setXYZ( 24, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 25, cone.r, cone.g, cone.b ); // p, n1 + colorAttribute.setXYZ( 26, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 27, cone.r, cone.g, cone.b ); // p, n2 + colorAttribute.setXYZ( 28, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 29, cone.r, cone.g, cone.b ); // p, n3 + colorAttribute.setXYZ( 30, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 31, cone.r, cone.g, cone.b ); // p, n4 + + // up + + colorAttribute.setXYZ( 32, up.r, up.g, up.b ); colorAttribute.setXYZ( 33, up.r, up.g, up.b ); // u1, u2 + colorAttribute.setXYZ( 34, up.r, up.g, up.b ); colorAttribute.setXYZ( 35, up.r, up.g, up.b ); // u2, u3 + colorAttribute.setXYZ( 36, up.r, up.g, up.b ); colorAttribute.setXYZ( 37, up.r, up.g, up.b ); // u3, u1 + + // target + + colorAttribute.setXYZ( 38, target.r, target.g, target.b ); colorAttribute.setXYZ( 39, target.r, target.g, target.b ); // c, t + colorAttribute.setXYZ( 40, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 41, cross.r, cross.g, cross.b ); // p, c + + // cross + + colorAttribute.setXYZ( 42, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 43, cross.r, cross.g, cross.b ); // cn1, cn2 + colorAttribute.setXYZ( 44, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 45, cross.r, cross.g, cross.b ); // cn3, cn4 + + colorAttribute.setXYZ( 46, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 47, cross.r, cross.g, cross.b ); // cf1, cf2 + colorAttribute.setXYZ( 48, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 49, cross.r, cross.g, cross.b ); // cf3, cf4 + + colorAttribute.needsUpdate = true; + + } + + update() { + + const geometry = this.geometry; + const pointMap = this.pointMap; + + const w = 1, h = 1; + + // we need just camera projection matrix inverse + // world matrix must be identity + + _camera.projectionMatrixInverse.copy( this.camera.projectionMatrixInverse ); + + // center / target + + setPoint( 'c', pointMap, geometry, _camera, 0, 0, - 1 ); + setPoint( 't', pointMap, geometry, _camera, 0, 0, 1 ); + + // near + + setPoint( 'n1', pointMap, geometry, _camera, - w, - h, - 1 ); + setPoint( 'n2', pointMap, geometry, _camera, w, - h, - 1 ); + setPoint( 'n3', pointMap, geometry, _camera, - w, h, - 1 ); + setPoint( 'n4', pointMap, geometry, _camera, w, h, - 1 ); + + // far + + setPoint( 'f1', pointMap, geometry, _camera, - w, - h, 1 ); + setPoint( 'f2', pointMap, geometry, _camera, w, - h, 1 ); + setPoint( 'f3', pointMap, geometry, _camera, - w, h, 1 ); + setPoint( 'f4', pointMap, geometry, _camera, w, h, 1 ); + + // up + + setPoint( 'u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, - 1 ); + setPoint( 'u2', pointMap, geometry, _camera, - w * 0.7, h * 1.1, - 1 ); + setPoint( 'u3', pointMap, geometry, _camera, 0, h * 2, - 1 ); + + // cross + + setPoint( 'cf1', pointMap, geometry, _camera, - w, 0, 1 ); + setPoint( 'cf2', pointMap, geometry, _camera, w, 0, 1 ); + setPoint( 'cf3', pointMap, geometry, _camera, 0, - h, 1 ); + setPoint( 'cf4', pointMap, geometry, _camera, 0, h, 1 ); + + setPoint( 'cn1', pointMap, geometry, _camera, - w, 0, - 1 ); + setPoint( 'cn2', pointMap, geometry, _camera, w, 0, - 1 ); + setPoint( 'cn3', pointMap, geometry, _camera, 0, - h, - 1 ); + setPoint( 'cn4', pointMap, geometry, _camera, 0, h, - 1 ); + + geometry.getAttribute( 'position' ).needsUpdate = true; + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + + +function setPoint( point, pointMap, geometry, camera, x, y, z ) { + + _vector.set( x, y, z ).unproject( camera ); + + const points = pointMap[ point ]; + + if ( points !== undefined ) { + + const position = geometry.getAttribute( 'position' ); + + for ( let i = 0, l = points.length; i < l; i ++ ) { + + position.setXYZ( points[ i ], _vector.x, _vector.y, _vector.z ); + + } + + } + +} + +const _box = /*@__PURE__*/ new Box3(); + +class BoxHelper extends LineSegments { + + constructor( object, color = 0xffff00 ) { + + const indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] ); + const positions = new Float32Array( 8 * 3 ); + + const geometry = new BufferGeometry(); + geometry.setIndex( new BufferAttribute( indices, 1 ) ); + geometry.setAttribute( 'position', new BufferAttribute( positions, 3 ) ); + + super( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) ); + + this.object = object; + this.type = 'BoxHelper'; + + this.matrixAutoUpdate = false; + + this.update(); + + } + + update( object ) { + + if ( object !== undefined ) { + + console.warn( 'THREE.BoxHelper: .update() has no longer arguments.' ); + + } + + if ( this.object !== undefined ) { + + _box.setFromObject( this.object ); + + } + + if ( _box.isEmpty() ) return; + + const min = _box.min; + const max = _box.max; + + /* + 5____4 + 1/___0/| + | 6__|_7 + 2/___3/ + + 0: max.x, max.y, max.z + 1: min.x, max.y, max.z + 2: min.x, min.y, max.z + 3: max.x, min.y, max.z + 4: max.x, max.y, min.z + 5: min.x, max.y, min.z + 6: min.x, min.y, min.z + 7: max.x, min.y, min.z + */ + + const position = this.geometry.attributes.position; + const array = position.array; + + array[ 0 ] = max.x; array[ 1 ] = max.y; array[ 2 ] = max.z; + array[ 3 ] = min.x; array[ 4 ] = max.y; array[ 5 ] = max.z; + array[ 6 ] = min.x; array[ 7 ] = min.y; array[ 8 ] = max.z; + array[ 9 ] = max.x; array[ 10 ] = min.y; array[ 11 ] = max.z; + array[ 12 ] = max.x; array[ 13 ] = max.y; array[ 14 ] = min.z; + array[ 15 ] = min.x; array[ 16 ] = max.y; array[ 17 ] = min.z; + array[ 18 ] = min.x; array[ 19 ] = min.y; array[ 20 ] = min.z; + array[ 21 ] = max.x; array[ 22 ] = min.y; array[ 23 ] = min.z; + + position.needsUpdate = true; + + this.geometry.computeBoundingSphere(); + + } + + setFromObject( object ) { + + this.object = object; + this.update(); + + return this; + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.object = source.object; + + return this; + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +class Box3Helper extends LineSegments { + + constructor( box, color = 0xffff00 ) { + + const indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] ); + + const positions = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, - 1, 1, 1, 1, - 1, - 1, 1, - 1, - 1, - 1, - 1, 1, - 1, - 1 ]; + + const geometry = new BufferGeometry(); + + geometry.setIndex( new BufferAttribute( indices, 1 ) ); + + geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); + + super( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) ); + + this.box = box; + + this.type = 'Box3Helper'; + + this.geometry.computeBoundingSphere(); + + } + + updateMatrixWorld( force ) { + + const box = this.box; + + if ( box.isEmpty() ) return; + + box.getCenter( this.position ); + + box.getSize( this.scale ); + + this.scale.multiplyScalar( 0.5 ); + + super.updateMatrixWorld( force ); + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +class PlaneHelper extends Line { + + constructor( plane, size = 1, hex = 0xffff00 ) { + + const color = hex; + + const positions = [ 1, - 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, - 1, 0, 1, 1, 0 ]; + + const geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); + geometry.computeBoundingSphere(); + + super( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) ); + + this.type = 'PlaneHelper'; + + this.plane = plane; + + this.size = size; + + const positions2 = [ 1, 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, - 1, 0, 1, - 1, 0 ]; + + const geometry2 = new BufferGeometry(); + geometry2.setAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) ); + geometry2.computeBoundingSphere(); + + this.add( new Mesh( geometry2, new MeshBasicMaterial( { color: color, opacity: 0.2, transparent: true, depthWrite: false, toneMapped: false } ) ) ); + + } + + updateMatrixWorld( force ) { + + this.position.set( 0, 0, 0 ); + + this.scale.set( 0.5 * this.size, 0.5 * this.size, 1 ); + + this.lookAt( this.plane.normal ); + + this.translateZ( - this.plane.constant ); + + super.updateMatrixWorld( force ); + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + this.children[ 0 ].geometry.dispose(); + this.children[ 0 ].material.dispose(); + + } + +} + +const _axis = /*@__PURE__*/ new Vector3(); +let _lineGeometry, _coneGeometry; + +class ArrowHelper extends Object3D { + + // dir is assumed to be normalized + + constructor( dir = new Vector3( 0, 0, 1 ), origin = new Vector3( 0, 0, 0 ), length = 1, color = 0xffff00, headLength = length * 0.2, headWidth = headLength * 0.2 ) { + + super(); + + this.type = 'ArrowHelper'; + + if ( _lineGeometry === undefined ) { + + _lineGeometry = new BufferGeometry(); + _lineGeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) ); + + _coneGeometry = new CylinderGeometry( 0, 0.5, 1, 5, 1 ); + _coneGeometry.translate( 0, - 0.5, 0 ); + + } + + this.position.copy( origin ); + + this.line = new Line( _lineGeometry, new LineBasicMaterial( { color: color, toneMapped: false } ) ); + this.line.matrixAutoUpdate = false; + this.add( this.line ); + + this.cone = new Mesh( _coneGeometry, new MeshBasicMaterial( { color: color, toneMapped: false } ) ); + this.cone.matrixAutoUpdate = false; + this.add( this.cone ); + + this.setDirection( dir ); + this.setLength( length, headLength, headWidth ); + + } + + setDirection( dir ) { + + // dir is assumed to be normalized + + if ( dir.y > 0.99999 ) { + + this.quaternion.set( 0, 0, 0, 1 ); + + } else if ( dir.y < - 0.99999 ) { + + this.quaternion.set( 1, 0, 0, 0 ); + + } else { + + _axis.set( dir.z, 0, - dir.x ).normalize(); + + const radians = Math.acos( dir.y ); + + this.quaternion.setFromAxisAngle( _axis, radians ); + + } + + } + + setLength( length, headLength = length * 0.2, headWidth = headLength * 0.2 ) { + + this.line.scale.set( 1, Math.max( 0.0001, length - headLength ), 1 ); // see #17458 + this.line.updateMatrix(); + + this.cone.scale.set( headWidth, headLength, headWidth ); + this.cone.position.y = length; + this.cone.updateMatrix(); + + } + + setColor( color ) { + + this.line.material.color.set( color ); + this.cone.material.color.set( color ); + + } + + copy( source ) { + + super.copy( source, false ); + + this.line.copy( source.line ); + this.cone.copy( source.cone ); + + return this; + + } + + dispose() { + + this.line.geometry.dispose(); + this.line.material.dispose(); + this.cone.geometry.dispose(); + this.cone.material.dispose(); + + } + +} + +class AxesHelper extends LineSegments { + + constructor( size = 1 ) { + + const vertices = [ + 0, 0, 0, size, 0, 0, + 0, 0, 0, 0, size, 0, + 0, 0, 0, 0, 0, size + ]; + + const colors = [ + 1, 0, 0, 1, 0.6, 0, + 0, 1, 0, 0.6, 1, 0, + 0, 0, 1, 0, 0.6, 1 + ]; + + const geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); + + const material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } ); + + super( geometry, material ); + + this.type = 'AxesHelper'; + + } + + setColors( xAxisColor, yAxisColor, zAxisColor ) { + + const color = new Color(); + const array = this.geometry.attributes.color.array; + + color.set( xAxisColor ); + color.toArray( array, 0 ); + color.toArray( array, 3 ); + + color.set( yAxisColor ); + color.toArray( array, 6 ); + color.toArray( array, 9 ); + + color.set( zAxisColor ); + color.toArray( array, 12 ); + color.toArray( array, 15 ); + + this.geometry.attributes.color.needsUpdate = true; + + return this; + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +class ShapePath { + + constructor() { + + this.type = 'ShapePath'; + + this.color = new Color(); + + this.subPaths = []; + this.currentPath = null; + + } + + moveTo( x, y ) { + + this.currentPath = new Path(); + this.subPaths.push( this.currentPath ); + this.currentPath.moveTo( x, y ); + + return this; + + } + + lineTo( x, y ) { + + this.currentPath.lineTo( x, y ); + + return this; + + } + + quadraticCurveTo( aCPx, aCPy, aX, aY ) { + + this.currentPath.quadraticCurveTo( aCPx, aCPy, aX, aY ); + + return this; + + } + + bezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) { + + this.currentPath.bezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ); + + return this; + + } + + splineThru( pts ) { + + this.currentPath.splineThru( pts ); + + return this; + + } + + toShapes( isCCW ) { + + function toShapesNoHoles( inSubpaths ) { + + const shapes = []; + + for ( let i = 0, l = inSubpaths.length; i < l; i ++ ) { + + const tmpPath = inSubpaths[ i ]; + + const tmpShape = new Shape(); + tmpShape.curves = tmpPath.curves; + + shapes.push( tmpShape ); + + } + + return shapes; + + } + + function isPointInsidePolygon( inPt, inPolygon ) { + + const polyLen = inPolygon.length; + + // inPt on polygon contour => immediate success or + // toggling of inside/outside at every single! intersection point of an edge + // with the horizontal line through inPt, left of inPt + // not counting lowerY endpoints of edges and whole edges on that line + let inside = false; + for ( let p = polyLen - 1, q = 0; q < polyLen; p = q ++ ) { + + let edgeLowPt = inPolygon[ p ]; + let edgeHighPt = inPolygon[ q ]; + + let edgeDx = edgeHighPt.x - edgeLowPt.x; + let edgeDy = edgeHighPt.y - edgeLowPt.y; + + if ( Math.abs( edgeDy ) > Number.EPSILON ) { + + // not parallel + if ( edgeDy < 0 ) { + + edgeLowPt = inPolygon[ q ]; edgeDx = - edgeDx; + edgeHighPt = inPolygon[ p ]; edgeDy = - edgeDy; + + } + + if ( ( inPt.y < edgeLowPt.y ) || ( inPt.y > edgeHighPt.y ) ) continue; + + if ( inPt.y === edgeLowPt.y ) { + + if ( inPt.x === edgeLowPt.x ) return true; // inPt is on contour ? + // continue; // no intersection or edgeLowPt => doesn't count !!! + + } else { + + const perpEdge = edgeDy * ( inPt.x - edgeLowPt.x ) - edgeDx * ( inPt.y - edgeLowPt.y ); + if ( perpEdge === 0 ) return true; // inPt is on contour ? + if ( perpEdge < 0 ) continue; + inside = ! inside; // true intersection left of inPt + + } + + } else { + + // parallel or collinear + if ( inPt.y !== edgeLowPt.y ) continue; // parallel + // edge lies on the same horizontal line as inPt + if ( ( ( edgeHighPt.x <= inPt.x ) && ( inPt.x <= edgeLowPt.x ) ) || + ( ( edgeLowPt.x <= inPt.x ) && ( inPt.x <= edgeHighPt.x ) ) ) return true; // inPt: Point on contour ! + // continue; + + } + + } + + return inside; + + } + + const isClockWise = ShapeUtils.isClockWise; + + const subPaths = this.subPaths; + if ( subPaths.length === 0 ) return []; + + let solid, tmpPath, tmpShape; + const shapes = []; + + if ( subPaths.length === 1 ) { + + tmpPath = subPaths[ 0 ]; + tmpShape = new Shape(); + tmpShape.curves = tmpPath.curves; + shapes.push( tmpShape ); + return shapes; + + } + + let holesFirst = ! isClockWise( subPaths[ 0 ].getPoints() ); + holesFirst = isCCW ? ! holesFirst : holesFirst; + + // console.log("Holes first", holesFirst); + + const betterShapeHoles = []; + const newShapes = []; + let newShapeHoles = []; + let mainIdx = 0; + let tmpPoints; + + newShapes[ mainIdx ] = undefined; + newShapeHoles[ mainIdx ] = []; + + for ( let i = 0, l = subPaths.length; i < l; i ++ ) { + + tmpPath = subPaths[ i ]; + tmpPoints = tmpPath.getPoints(); + solid = isClockWise( tmpPoints ); + solid = isCCW ? ! solid : solid; + + if ( solid ) { + + if ( ( ! holesFirst ) && ( newShapes[ mainIdx ] ) ) mainIdx ++; + + newShapes[ mainIdx ] = { s: new Shape(), p: tmpPoints }; + newShapes[ mainIdx ].s.curves = tmpPath.curves; + + if ( holesFirst ) mainIdx ++; + newShapeHoles[ mainIdx ] = []; + + //console.log('cw', i); + + } else { + + newShapeHoles[ mainIdx ].push( { h: tmpPath, p: tmpPoints[ 0 ] } ); + + //console.log('ccw', i); + + } + + } + + // only Holes? -> probably all Shapes with wrong orientation + if ( ! newShapes[ 0 ] ) return toShapesNoHoles( subPaths ); + + + if ( newShapes.length > 1 ) { + + let ambiguous = false; + let toChange = 0; + + for ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) { + + betterShapeHoles[ sIdx ] = []; + + } + + for ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) { + + const sho = newShapeHoles[ sIdx ]; + + for ( let hIdx = 0; hIdx < sho.length; hIdx ++ ) { + + const ho = sho[ hIdx ]; + let hole_unassigned = true; + + for ( let s2Idx = 0; s2Idx < newShapes.length; s2Idx ++ ) { + + if ( isPointInsidePolygon( ho.p, newShapes[ s2Idx ].p ) ) { + + if ( sIdx !== s2Idx ) toChange ++; + + if ( hole_unassigned ) { + + hole_unassigned = false; + betterShapeHoles[ s2Idx ].push( ho ); + + } else { + + ambiguous = true; + + } + + } + + } + + if ( hole_unassigned ) { + + betterShapeHoles[ sIdx ].push( ho ); + + } + + } + + } + + if ( toChange > 0 && ambiguous === false ) { + + newShapeHoles = betterShapeHoles; + + } + + } + + let tmpHoles; + + for ( let i = 0, il = newShapes.length; i < il; i ++ ) { + + tmpShape = newShapes[ i ].s; + shapes.push( tmpShape ); + tmpHoles = newShapeHoles[ i ]; + + for ( let j = 0, jl = tmpHoles.length; j < jl; j ++ ) { + + tmpShape.holes.push( tmpHoles[ j ].h ); + + } + + } + + //console.log("shape", shapes); + + return shapes; + + } + +} + +class WebGLMultipleRenderTargets extends WebGLRenderTarget { // @deprecated, r162 + + constructor( width = 1, height = 1, count = 1, options = {} ) { + + console.warn( 'THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.' ); + + super( width, height, { ...options, count } ); + + this.isWebGLMultipleRenderTargets = true; + + } + + get texture() { + + return this.textures; + + } + +} + +if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { + + __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'register', { detail: { + revision: REVISION, + } } ) ); + +} + +if ( typeof window !== 'undefined' ) { + + if ( window.__THREE__ ) { + + console.warn( 'WARNING: Multiple instances of Three.js being imported.' ); + + } else { + + window.__THREE__ = REVISION; + + } + +} + +exports.ACESFilmicToneMapping = ACESFilmicToneMapping; +exports.AddEquation = AddEquation; +exports.AddOperation = AddOperation; +exports.AdditiveAnimationBlendMode = AdditiveAnimationBlendMode; +exports.AdditiveBlending = AdditiveBlending; +exports.AgXToneMapping = AgXToneMapping; +exports.AlphaFormat = AlphaFormat; +exports.AlwaysCompare = AlwaysCompare; +exports.AlwaysDepth = AlwaysDepth; +exports.AlwaysStencilFunc = AlwaysStencilFunc; +exports.AmbientLight = AmbientLight; +exports.AnimationAction = AnimationAction; +exports.AnimationClip = AnimationClip; +exports.AnimationLoader = AnimationLoader; +exports.AnimationMixer = AnimationMixer; +exports.AnimationObjectGroup = AnimationObjectGroup; +exports.AnimationUtils = AnimationUtils; +exports.ArcCurve = ArcCurve; +exports.ArrayCamera = ArrayCamera; +exports.ArrowHelper = ArrowHelper; +exports.AttachedBindMode = AttachedBindMode; +exports.Audio = Audio; +exports.AudioAnalyser = AudioAnalyser; +exports.AudioContext = AudioContext; +exports.AudioListener = AudioListener; +exports.AudioLoader = AudioLoader; +exports.AxesHelper = AxesHelper; +exports.BackSide = BackSide; +exports.BasicDepthPacking = BasicDepthPacking; +exports.BasicShadowMap = BasicShadowMap; +exports.BatchedMesh = BatchedMesh; +exports.Bone = Bone; +exports.BooleanKeyframeTrack = BooleanKeyframeTrack; +exports.Box2 = Box2; +exports.Box3 = Box3; +exports.Box3Helper = Box3Helper; +exports.BoxGeometry = BoxGeometry; +exports.BoxHelper = BoxHelper; +exports.BufferAttribute = BufferAttribute; +exports.BufferGeometry = BufferGeometry; +exports.BufferGeometryLoader = BufferGeometryLoader; +exports.ByteType = ByteType; +exports.Cache = Cache; +exports.Camera = Camera; +exports.CameraHelper = CameraHelper; +exports.CanvasTexture = CanvasTexture; +exports.CapsuleGeometry = CapsuleGeometry; +exports.CatmullRomCurve3 = CatmullRomCurve3; +exports.CineonToneMapping = CineonToneMapping; +exports.CircleGeometry = CircleGeometry; +exports.ClampToEdgeWrapping = ClampToEdgeWrapping; +exports.Clock = Clock; +exports.Color = Color; +exports.ColorKeyframeTrack = ColorKeyframeTrack; +exports.ColorManagement = ColorManagement; +exports.CompressedArrayTexture = CompressedArrayTexture; +exports.CompressedCubeTexture = CompressedCubeTexture; +exports.CompressedTexture = CompressedTexture; +exports.CompressedTextureLoader = CompressedTextureLoader; +exports.ConeGeometry = ConeGeometry; +exports.ConstantAlphaFactor = ConstantAlphaFactor; +exports.ConstantColorFactor = ConstantColorFactor; +exports.CubeCamera = CubeCamera; +exports.CubeReflectionMapping = CubeReflectionMapping; +exports.CubeRefractionMapping = CubeRefractionMapping; +exports.CubeTexture = CubeTexture; +exports.CubeTextureLoader = CubeTextureLoader; +exports.CubeUVReflectionMapping = CubeUVReflectionMapping; +exports.CubicBezierCurve = CubicBezierCurve; +exports.CubicBezierCurve3 = CubicBezierCurve3; +exports.CubicInterpolant = CubicInterpolant; +exports.CullFaceBack = CullFaceBack; +exports.CullFaceFront = CullFaceFront; +exports.CullFaceFrontBack = CullFaceFrontBack; +exports.CullFaceNone = CullFaceNone; +exports.Curve = Curve; +exports.CurvePath = CurvePath; +exports.CustomBlending = CustomBlending; +exports.CustomToneMapping = CustomToneMapping; +exports.CylinderGeometry = CylinderGeometry; +exports.Cylindrical = Cylindrical; +exports.Data3DTexture = Data3DTexture; +exports.DataArrayTexture = DataArrayTexture; +exports.DataTexture = DataTexture; +exports.DataTextureLoader = DataTextureLoader; +exports.DataUtils = DataUtils; +exports.DecrementStencilOp = DecrementStencilOp; +exports.DecrementWrapStencilOp = DecrementWrapStencilOp; +exports.DefaultLoadingManager = DefaultLoadingManager; +exports.DepthFormat = DepthFormat; +exports.DepthStencilFormat = DepthStencilFormat; +exports.DepthTexture = DepthTexture; +exports.DetachedBindMode = DetachedBindMode; +exports.DirectionalLight = DirectionalLight; +exports.DirectionalLightHelper = DirectionalLightHelper; +exports.DiscreteInterpolant = DiscreteInterpolant; +exports.DisplayP3ColorSpace = DisplayP3ColorSpace; +exports.DodecahedronGeometry = DodecahedronGeometry; +exports.DoubleSide = DoubleSide; +exports.DstAlphaFactor = DstAlphaFactor; +exports.DstColorFactor = DstColorFactor; +exports.DynamicCopyUsage = DynamicCopyUsage; +exports.DynamicDrawUsage = DynamicDrawUsage; +exports.DynamicReadUsage = DynamicReadUsage; +exports.EdgesGeometry = EdgesGeometry; +exports.EllipseCurve = EllipseCurve; +exports.EqualCompare = EqualCompare; +exports.EqualDepth = EqualDepth; +exports.EqualStencilFunc = EqualStencilFunc; +exports.EquirectangularReflectionMapping = EquirectangularReflectionMapping; +exports.EquirectangularRefractionMapping = EquirectangularRefractionMapping; +exports.Euler = Euler; +exports.EventDispatcher = EventDispatcher; +exports.ExtrudeGeometry = ExtrudeGeometry; +exports.FileLoader = FileLoader; +exports.Float16BufferAttribute = Float16BufferAttribute; +exports.Float32BufferAttribute = Float32BufferAttribute; +exports.FloatType = FloatType; +exports.Fog = Fog; +exports.FogExp2 = FogExp2; +exports.FramebufferTexture = FramebufferTexture; +exports.FrontSide = FrontSide; +exports.Frustum = Frustum; +exports.GLBufferAttribute = GLBufferAttribute; +exports.GLSL1 = GLSL1; +exports.GLSL3 = GLSL3; +exports.GreaterCompare = GreaterCompare; +exports.GreaterDepth = GreaterDepth; +exports.GreaterEqualCompare = GreaterEqualCompare; +exports.GreaterEqualDepth = GreaterEqualDepth; +exports.GreaterEqualStencilFunc = GreaterEqualStencilFunc; +exports.GreaterStencilFunc = GreaterStencilFunc; +exports.GridHelper = GridHelper; +exports.Group = Group; +exports.HalfFloatType = HalfFloatType; +exports.HemisphereLight = HemisphereLight; +exports.HemisphereLightHelper = HemisphereLightHelper; +exports.IcosahedronGeometry = IcosahedronGeometry; +exports.ImageBitmapLoader = ImageBitmapLoader; +exports.ImageLoader = ImageLoader; +exports.ImageUtils = ImageUtils; +exports.IncrementStencilOp = IncrementStencilOp; +exports.IncrementWrapStencilOp = IncrementWrapStencilOp; +exports.InstancedBufferAttribute = InstancedBufferAttribute; +exports.InstancedBufferGeometry = InstancedBufferGeometry; +exports.InstancedInterleavedBuffer = InstancedInterleavedBuffer; +exports.InstancedMesh = InstancedMesh; +exports.Int16BufferAttribute = Int16BufferAttribute; +exports.Int32BufferAttribute = Int32BufferAttribute; +exports.Int8BufferAttribute = Int8BufferAttribute; +exports.IntType = IntType; +exports.InterleavedBuffer = InterleavedBuffer; +exports.InterleavedBufferAttribute = InterleavedBufferAttribute; +exports.Interpolant = Interpolant; +exports.InterpolateDiscrete = InterpolateDiscrete; +exports.InterpolateLinear = InterpolateLinear; +exports.InterpolateSmooth = InterpolateSmooth; +exports.InvertStencilOp = InvertStencilOp; +exports.KeepStencilOp = KeepStencilOp; +exports.KeyframeTrack = KeyframeTrack; +exports.LOD = LOD; +exports.LatheGeometry = LatheGeometry; +exports.Layers = Layers; +exports.LessCompare = LessCompare; +exports.LessDepth = LessDepth; +exports.LessEqualCompare = LessEqualCompare; +exports.LessEqualDepth = LessEqualDepth; +exports.LessEqualStencilFunc = LessEqualStencilFunc; +exports.LessStencilFunc = LessStencilFunc; +exports.Light = Light; +exports.LightProbe = LightProbe; +exports.Line = Line; +exports.Line3 = Line3; +exports.LineBasicMaterial = LineBasicMaterial; +exports.LineCurve = LineCurve; +exports.LineCurve3 = LineCurve3; +exports.LineDashedMaterial = LineDashedMaterial; +exports.LineLoop = LineLoop; +exports.LineSegments = LineSegments; +exports.LinearDisplayP3ColorSpace = LinearDisplayP3ColorSpace; +exports.LinearFilter = LinearFilter; +exports.LinearInterpolant = LinearInterpolant; +exports.LinearMipMapLinearFilter = LinearMipMapLinearFilter; +exports.LinearMipMapNearestFilter = LinearMipMapNearestFilter; +exports.LinearMipmapLinearFilter = LinearMipmapLinearFilter; +exports.LinearMipmapNearestFilter = LinearMipmapNearestFilter; +exports.LinearSRGBColorSpace = LinearSRGBColorSpace; +exports.LinearToneMapping = LinearToneMapping; +exports.LinearTransfer = LinearTransfer; +exports.Loader = Loader; +exports.LoaderUtils = LoaderUtils; +exports.LoadingManager = LoadingManager; +exports.LoopOnce = LoopOnce; +exports.LoopPingPong = LoopPingPong; +exports.LoopRepeat = LoopRepeat; +exports.LuminanceAlphaFormat = LuminanceAlphaFormat; +exports.LuminanceFormat = LuminanceFormat; +exports.MOUSE = MOUSE; +exports.Material = Material; +exports.MaterialLoader = MaterialLoader; +exports.MathUtils = MathUtils; +exports.Matrix3 = Matrix3; +exports.Matrix4 = Matrix4; +exports.MaxEquation = MaxEquation; +exports.Mesh = Mesh; +exports.MeshBasicMaterial = MeshBasicMaterial; +exports.MeshDepthMaterial = MeshDepthMaterial; +exports.MeshDistanceMaterial = MeshDistanceMaterial; +exports.MeshLambertMaterial = MeshLambertMaterial; +exports.MeshMatcapMaterial = MeshMatcapMaterial; +exports.MeshNormalMaterial = MeshNormalMaterial; +exports.MeshPhongMaterial = MeshPhongMaterial; +exports.MeshPhysicalMaterial = MeshPhysicalMaterial; +exports.MeshStandardMaterial = MeshStandardMaterial; +exports.MeshToonMaterial = MeshToonMaterial; +exports.MinEquation = MinEquation; +exports.MirroredRepeatWrapping = MirroredRepeatWrapping; +exports.MixOperation = MixOperation; +exports.MultiplyBlending = MultiplyBlending; +exports.MultiplyOperation = MultiplyOperation; +exports.NearestFilter = NearestFilter; +exports.NearestMipMapLinearFilter = NearestMipMapLinearFilter; +exports.NearestMipMapNearestFilter = NearestMipMapNearestFilter; +exports.NearestMipmapLinearFilter = NearestMipmapLinearFilter; +exports.NearestMipmapNearestFilter = NearestMipmapNearestFilter; +exports.NeutralToneMapping = NeutralToneMapping; +exports.NeverCompare = NeverCompare; +exports.NeverDepth = NeverDepth; +exports.NeverStencilFunc = NeverStencilFunc; +exports.NoBlending = NoBlending; +exports.NoColorSpace = NoColorSpace; +exports.NoToneMapping = NoToneMapping; +exports.NormalAnimationBlendMode = NormalAnimationBlendMode; +exports.NormalBlending = NormalBlending; +exports.NotEqualCompare = NotEqualCompare; +exports.NotEqualDepth = NotEqualDepth; +exports.NotEqualStencilFunc = NotEqualStencilFunc; +exports.NumberKeyframeTrack = NumberKeyframeTrack; +exports.Object3D = Object3D; +exports.ObjectLoader = ObjectLoader; +exports.ObjectSpaceNormalMap = ObjectSpaceNormalMap; +exports.OctahedronGeometry = OctahedronGeometry; +exports.OneFactor = OneFactor; +exports.OneMinusConstantAlphaFactor = OneMinusConstantAlphaFactor; +exports.OneMinusConstantColorFactor = OneMinusConstantColorFactor; +exports.OneMinusDstAlphaFactor = OneMinusDstAlphaFactor; +exports.OneMinusDstColorFactor = OneMinusDstColorFactor; +exports.OneMinusSrcAlphaFactor = OneMinusSrcAlphaFactor; +exports.OneMinusSrcColorFactor = OneMinusSrcColorFactor; +exports.OrthographicCamera = OrthographicCamera; +exports.P3Primaries = P3Primaries; +exports.PCFShadowMap = PCFShadowMap; +exports.PCFSoftShadowMap = PCFSoftShadowMap; +exports.PMREMGenerator = PMREMGenerator; +exports.Path = Path; +exports.PerspectiveCamera = PerspectiveCamera; +exports.Plane = Plane; +exports.PlaneGeometry = PlaneGeometry; +exports.PlaneHelper = PlaneHelper; +exports.PointLight = PointLight; +exports.PointLightHelper = PointLightHelper; +exports.Points = Points; +exports.PointsMaterial = PointsMaterial; +exports.PolarGridHelper = PolarGridHelper; +exports.PolyhedronGeometry = PolyhedronGeometry; +exports.PositionalAudio = PositionalAudio; +exports.PropertyBinding = PropertyBinding; +exports.PropertyMixer = PropertyMixer; +exports.QuadraticBezierCurve = QuadraticBezierCurve; +exports.QuadraticBezierCurve3 = QuadraticBezierCurve3; +exports.Quaternion = Quaternion; +exports.QuaternionKeyframeTrack = QuaternionKeyframeTrack; +exports.QuaternionLinearInterpolant = QuaternionLinearInterpolant; +exports.RED_GREEN_RGTC2_Format = RED_GREEN_RGTC2_Format; +exports.RED_RGTC1_Format = RED_RGTC1_Format; +exports.REVISION = REVISION; +exports.RGBADepthPacking = RGBADepthPacking; +exports.RGBAFormat = RGBAFormat; +exports.RGBAIntegerFormat = RGBAIntegerFormat; +exports.RGBA_ASTC_10x10_Format = RGBA_ASTC_10x10_Format; +exports.RGBA_ASTC_10x5_Format = RGBA_ASTC_10x5_Format; +exports.RGBA_ASTC_10x6_Format = RGBA_ASTC_10x6_Format; +exports.RGBA_ASTC_10x8_Format = RGBA_ASTC_10x8_Format; +exports.RGBA_ASTC_12x10_Format = RGBA_ASTC_12x10_Format; +exports.RGBA_ASTC_12x12_Format = RGBA_ASTC_12x12_Format; +exports.RGBA_ASTC_4x4_Format = RGBA_ASTC_4x4_Format; +exports.RGBA_ASTC_5x4_Format = RGBA_ASTC_5x4_Format; +exports.RGBA_ASTC_5x5_Format = RGBA_ASTC_5x5_Format; +exports.RGBA_ASTC_6x5_Format = RGBA_ASTC_6x5_Format; +exports.RGBA_ASTC_6x6_Format = RGBA_ASTC_6x6_Format; +exports.RGBA_ASTC_8x5_Format = RGBA_ASTC_8x5_Format; +exports.RGBA_ASTC_8x6_Format = RGBA_ASTC_8x6_Format; +exports.RGBA_ASTC_8x8_Format = RGBA_ASTC_8x8_Format; +exports.RGBA_BPTC_Format = RGBA_BPTC_Format; +exports.RGBA_ETC2_EAC_Format = RGBA_ETC2_EAC_Format; +exports.RGBA_PVRTC_2BPPV1_Format = RGBA_PVRTC_2BPPV1_Format; +exports.RGBA_PVRTC_4BPPV1_Format = RGBA_PVRTC_4BPPV1_Format; +exports.RGBA_S3TC_DXT1_Format = RGBA_S3TC_DXT1_Format; +exports.RGBA_S3TC_DXT3_Format = RGBA_S3TC_DXT3_Format; +exports.RGBA_S3TC_DXT5_Format = RGBA_S3TC_DXT5_Format; +exports.RGBFormat = RGBFormat; +exports.RGB_BPTC_SIGNED_Format = RGB_BPTC_SIGNED_Format; +exports.RGB_BPTC_UNSIGNED_Format = RGB_BPTC_UNSIGNED_Format; +exports.RGB_ETC1_Format = RGB_ETC1_Format; +exports.RGB_ETC2_Format = RGB_ETC2_Format; +exports.RGB_PVRTC_2BPPV1_Format = RGB_PVRTC_2BPPV1_Format; +exports.RGB_PVRTC_4BPPV1_Format = RGB_PVRTC_4BPPV1_Format; +exports.RGB_S3TC_DXT1_Format = RGB_S3TC_DXT1_Format; +exports.RGFormat = RGFormat; +exports.RGIntegerFormat = RGIntegerFormat; +exports.RawShaderMaterial = RawShaderMaterial; +exports.Ray = Ray; +exports.Raycaster = Raycaster; +exports.Rec709Primaries = Rec709Primaries; +exports.RectAreaLight = RectAreaLight; +exports.RedFormat = RedFormat; +exports.RedIntegerFormat = RedIntegerFormat; +exports.ReinhardToneMapping = ReinhardToneMapping; +exports.RenderTarget = RenderTarget; +exports.RepeatWrapping = RepeatWrapping; +exports.ReplaceStencilOp = ReplaceStencilOp; +exports.ReverseSubtractEquation = ReverseSubtractEquation; +exports.RingGeometry = RingGeometry; +exports.SIGNED_RED_GREEN_RGTC2_Format = SIGNED_RED_GREEN_RGTC2_Format; +exports.SIGNED_RED_RGTC1_Format = SIGNED_RED_RGTC1_Format; +exports.SRGBColorSpace = SRGBColorSpace; +exports.SRGBTransfer = SRGBTransfer; +exports.Scene = Scene; +exports.ShaderChunk = ShaderChunk; +exports.ShaderLib = ShaderLib; +exports.ShaderMaterial = ShaderMaterial; +exports.ShadowMaterial = ShadowMaterial; +exports.Shape = Shape; +exports.ShapeGeometry = ShapeGeometry; +exports.ShapePath = ShapePath; +exports.ShapeUtils = ShapeUtils; +exports.ShortType = ShortType; +exports.Skeleton = Skeleton; +exports.SkeletonHelper = SkeletonHelper; +exports.SkinnedMesh = SkinnedMesh; +exports.Source = Source; +exports.Sphere = Sphere; +exports.SphereGeometry = SphereGeometry; +exports.Spherical = Spherical; +exports.SphericalHarmonics3 = SphericalHarmonics3; +exports.SplineCurve = SplineCurve; +exports.SpotLight = SpotLight; +exports.SpotLightHelper = SpotLightHelper; +exports.Sprite = Sprite; +exports.SpriteMaterial = SpriteMaterial; +exports.SrcAlphaFactor = SrcAlphaFactor; +exports.SrcAlphaSaturateFactor = SrcAlphaSaturateFactor; +exports.SrcColorFactor = SrcColorFactor; +exports.StaticCopyUsage = StaticCopyUsage; +exports.StaticDrawUsage = StaticDrawUsage; +exports.StaticReadUsage = StaticReadUsage; +exports.StereoCamera = StereoCamera; +exports.StreamCopyUsage = StreamCopyUsage; +exports.StreamDrawUsage = StreamDrawUsage; +exports.StreamReadUsage = StreamReadUsage; +exports.StringKeyframeTrack = StringKeyframeTrack; +exports.SubtractEquation = SubtractEquation; +exports.SubtractiveBlending = SubtractiveBlending; +exports.TOUCH = TOUCH; +exports.TangentSpaceNormalMap = TangentSpaceNormalMap; +exports.TetrahedronGeometry = TetrahedronGeometry; +exports.Texture = Texture; +exports.TextureLoader = TextureLoader; +exports.TorusGeometry = TorusGeometry; +exports.TorusKnotGeometry = TorusKnotGeometry; +exports.Triangle = Triangle; +exports.TriangleFanDrawMode = TriangleFanDrawMode; +exports.TriangleStripDrawMode = TriangleStripDrawMode; +exports.TrianglesDrawMode = TrianglesDrawMode; +exports.TubeGeometry = TubeGeometry; +exports.UVMapping = UVMapping; +exports.Uint16BufferAttribute = Uint16BufferAttribute; +exports.Uint32BufferAttribute = Uint32BufferAttribute; +exports.Uint8BufferAttribute = Uint8BufferAttribute; +exports.Uint8ClampedBufferAttribute = Uint8ClampedBufferAttribute; +exports.Uniform = Uniform; +exports.UniformsGroup = UniformsGroup; +exports.UniformsLib = UniformsLib; +exports.UniformsUtils = UniformsUtils; +exports.UnsignedByteType = UnsignedByteType; +exports.UnsignedInt248Type = UnsignedInt248Type; +exports.UnsignedInt5999Type = UnsignedInt5999Type; +exports.UnsignedIntType = UnsignedIntType; +exports.UnsignedShort4444Type = UnsignedShort4444Type; +exports.UnsignedShort5551Type = UnsignedShort5551Type; +exports.UnsignedShortType = UnsignedShortType; +exports.VSMShadowMap = VSMShadowMap; +exports.Vector2 = Vector2; +exports.Vector3 = Vector3; +exports.Vector4 = Vector4; +exports.VectorKeyframeTrack = VectorKeyframeTrack; +exports.VideoTexture = VideoTexture; +exports.WebGL3DRenderTarget = WebGL3DRenderTarget; +exports.WebGLArrayRenderTarget = WebGLArrayRenderTarget; +exports.WebGLCoordinateSystem = WebGLCoordinateSystem; +exports.WebGLCubeRenderTarget = WebGLCubeRenderTarget; +exports.WebGLMultipleRenderTargets = WebGLMultipleRenderTargets; +exports.WebGLRenderTarget = WebGLRenderTarget; +exports.WebGLRenderer = WebGLRenderer; +exports.WebGLUtils = WebGLUtils; +exports.WebGPUCoordinateSystem = WebGPUCoordinateSystem; +exports.WireframeGeometry = WireframeGeometry; +exports.WrapAroundEnding = WrapAroundEnding; +exports.ZeroCurvatureEnding = ZeroCurvatureEnding; +exports.ZeroFactor = ZeroFactor; +exports.ZeroSlopeEnding = ZeroSlopeEnding; +exports.ZeroStencilOp = ZeroStencilOp; +exports.createCanvasElement = createCanvasElement; diff --git a/node_modules/three/build/three.module.js b/node_modules/three/build/three.module.js new file mode 100644 index 0000000..8c431f6 --- /dev/null +++ b/node_modules/three/build/three.module.js @@ -0,0 +1,53032 @@ +/** + * @license + * Copyright 2010-2024 Three.js Authors + * SPDX-License-Identifier: MIT + */ +const REVISION = '164'; + +const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }; +const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }; +const CullFaceNone = 0; +const CullFaceBack = 1; +const CullFaceFront = 2; +const CullFaceFrontBack = 3; +const BasicShadowMap = 0; +const PCFShadowMap = 1; +const PCFSoftShadowMap = 2; +const VSMShadowMap = 3; +const FrontSide = 0; +const BackSide = 1; +const DoubleSide = 2; +const NoBlending = 0; +const NormalBlending = 1; +const AdditiveBlending = 2; +const SubtractiveBlending = 3; +const MultiplyBlending = 4; +const CustomBlending = 5; +const AddEquation = 100; +const SubtractEquation = 101; +const ReverseSubtractEquation = 102; +const MinEquation = 103; +const MaxEquation = 104; +const ZeroFactor = 200; +const OneFactor = 201; +const SrcColorFactor = 202; +const OneMinusSrcColorFactor = 203; +const SrcAlphaFactor = 204; +const OneMinusSrcAlphaFactor = 205; +const DstAlphaFactor = 206; +const OneMinusDstAlphaFactor = 207; +const DstColorFactor = 208; +const OneMinusDstColorFactor = 209; +const SrcAlphaSaturateFactor = 210; +const ConstantColorFactor = 211; +const OneMinusConstantColorFactor = 212; +const ConstantAlphaFactor = 213; +const OneMinusConstantAlphaFactor = 214; +const NeverDepth = 0; +const AlwaysDepth = 1; +const LessDepth = 2; +const LessEqualDepth = 3; +const EqualDepth = 4; +const GreaterEqualDepth = 5; +const GreaterDepth = 6; +const NotEqualDepth = 7; +const MultiplyOperation = 0; +const MixOperation = 1; +const AddOperation = 2; +const NoToneMapping = 0; +const LinearToneMapping = 1; +const ReinhardToneMapping = 2; +const CineonToneMapping = 3; +const ACESFilmicToneMapping = 4; +const CustomToneMapping = 5; +const AgXToneMapping = 6; +const NeutralToneMapping = 7; +const AttachedBindMode = 'attached'; +const DetachedBindMode = 'detached'; + +const UVMapping = 300; +const CubeReflectionMapping = 301; +const CubeRefractionMapping = 302; +const EquirectangularReflectionMapping = 303; +const EquirectangularRefractionMapping = 304; +const CubeUVReflectionMapping = 306; +const RepeatWrapping = 1000; +const ClampToEdgeWrapping = 1001; +const MirroredRepeatWrapping = 1002; +const NearestFilter = 1003; +const NearestMipmapNearestFilter = 1004; +const NearestMipMapNearestFilter = 1004; +const NearestMipmapLinearFilter = 1005; +const NearestMipMapLinearFilter = 1005; +const LinearFilter = 1006; +const LinearMipmapNearestFilter = 1007; +const LinearMipMapNearestFilter = 1007; +const LinearMipmapLinearFilter = 1008; +const LinearMipMapLinearFilter = 1008; +const UnsignedByteType = 1009; +const ByteType = 1010; +const ShortType = 1011; +const UnsignedShortType = 1012; +const IntType = 1013; +const UnsignedIntType = 1014; +const FloatType = 1015; +const HalfFloatType = 1016; +const UnsignedShort4444Type = 1017; +const UnsignedShort5551Type = 1018; +const UnsignedInt248Type = 1020; +const UnsignedInt5999Type = 35902; +const AlphaFormat = 1021; +const RGBFormat = 1022; +const RGBAFormat = 1023; +const LuminanceFormat = 1024; +const LuminanceAlphaFormat = 1025; +const DepthFormat = 1026; +const DepthStencilFormat = 1027; +const RedFormat = 1028; +const RedIntegerFormat = 1029; +const RGFormat = 1030; +const RGIntegerFormat = 1031; +const RGBAIntegerFormat = 1033; + +const RGB_S3TC_DXT1_Format = 33776; +const RGBA_S3TC_DXT1_Format = 33777; +const RGBA_S3TC_DXT3_Format = 33778; +const RGBA_S3TC_DXT5_Format = 33779; +const RGB_PVRTC_4BPPV1_Format = 35840; +const RGB_PVRTC_2BPPV1_Format = 35841; +const RGBA_PVRTC_4BPPV1_Format = 35842; +const RGBA_PVRTC_2BPPV1_Format = 35843; +const RGB_ETC1_Format = 36196; +const RGB_ETC2_Format = 37492; +const RGBA_ETC2_EAC_Format = 37496; +const RGBA_ASTC_4x4_Format = 37808; +const RGBA_ASTC_5x4_Format = 37809; +const RGBA_ASTC_5x5_Format = 37810; +const RGBA_ASTC_6x5_Format = 37811; +const RGBA_ASTC_6x6_Format = 37812; +const RGBA_ASTC_8x5_Format = 37813; +const RGBA_ASTC_8x6_Format = 37814; +const RGBA_ASTC_8x8_Format = 37815; +const RGBA_ASTC_10x5_Format = 37816; +const RGBA_ASTC_10x6_Format = 37817; +const RGBA_ASTC_10x8_Format = 37818; +const RGBA_ASTC_10x10_Format = 37819; +const RGBA_ASTC_12x10_Format = 37820; +const RGBA_ASTC_12x12_Format = 37821; +const RGBA_BPTC_Format = 36492; +const RGB_BPTC_SIGNED_Format = 36494; +const RGB_BPTC_UNSIGNED_Format = 36495; +const RED_RGTC1_Format = 36283; +const SIGNED_RED_RGTC1_Format = 36284; +const RED_GREEN_RGTC2_Format = 36285; +const SIGNED_RED_GREEN_RGTC2_Format = 36286; +const LoopOnce = 2200; +const LoopRepeat = 2201; +const LoopPingPong = 2202; +const InterpolateDiscrete = 2300; +const InterpolateLinear = 2301; +const InterpolateSmooth = 2302; +const ZeroCurvatureEnding = 2400; +const ZeroSlopeEnding = 2401; +const WrapAroundEnding = 2402; +const NormalAnimationBlendMode = 2500; +const AdditiveAnimationBlendMode = 2501; +const TrianglesDrawMode = 0; +const TriangleStripDrawMode = 1; +const TriangleFanDrawMode = 2; +const BasicDepthPacking = 3200; +const RGBADepthPacking = 3201; +const TangentSpaceNormalMap = 0; +const ObjectSpaceNormalMap = 1; + +// Color space string identifiers, matching CSS Color Module Level 4 and WebGPU names where available. +const NoColorSpace = ''; +const SRGBColorSpace = 'srgb'; +const LinearSRGBColorSpace = 'srgb-linear'; +const DisplayP3ColorSpace = 'display-p3'; +const LinearDisplayP3ColorSpace = 'display-p3-linear'; + +const LinearTransfer = 'linear'; +const SRGBTransfer = 'srgb'; + +const Rec709Primaries = 'rec709'; +const P3Primaries = 'p3'; + +const ZeroStencilOp = 0; +const KeepStencilOp = 7680; +const ReplaceStencilOp = 7681; +const IncrementStencilOp = 7682; +const DecrementStencilOp = 7683; +const IncrementWrapStencilOp = 34055; +const DecrementWrapStencilOp = 34056; +const InvertStencilOp = 5386; + +const NeverStencilFunc = 512; +const LessStencilFunc = 513; +const EqualStencilFunc = 514; +const LessEqualStencilFunc = 515; +const GreaterStencilFunc = 516; +const NotEqualStencilFunc = 517; +const GreaterEqualStencilFunc = 518; +const AlwaysStencilFunc = 519; + +const NeverCompare = 512; +const LessCompare = 513; +const EqualCompare = 514; +const LessEqualCompare = 515; +const GreaterCompare = 516; +const NotEqualCompare = 517; +const GreaterEqualCompare = 518; +const AlwaysCompare = 519; + +const StaticDrawUsage = 35044; +const DynamicDrawUsage = 35048; +const StreamDrawUsage = 35040; +const StaticReadUsage = 35045; +const DynamicReadUsage = 35049; +const StreamReadUsage = 35041; +const StaticCopyUsage = 35046; +const DynamicCopyUsage = 35050; +const StreamCopyUsage = 35042; + +const GLSL1 = '100'; +const GLSL3 = '300 es'; + +const WebGLCoordinateSystem = 2000; +const WebGPUCoordinateSystem = 2001; + +/** + * https://github.com/mrdoob/eventdispatcher.js/ + */ + +class EventDispatcher { + + addEventListener( type, listener ) { + + if ( this._listeners === undefined ) this._listeners = {}; + + const listeners = this._listeners; + + if ( listeners[ type ] === undefined ) { + + listeners[ type ] = []; + + } + + if ( listeners[ type ].indexOf( listener ) === - 1 ) { + + listeners[ type ].push( listener ); + + } + + } + + hasEventListener( type, listener ) { + + if ( this._listeners === undefined ) return false; + + const listeners = this._listeners; + + return listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== - 1; + + } + + removeEventListener( type, listener ) { + + if ( this._listeners === undefined ) return; + + const listeners = this._listeners; + const listenerArray = listeners[ type ]; + + if ( listenerArray !== undefined ) { + + const index = listenerArray.indexOf( listener ); + + if ( index !== - 1 ) { + + listenerArray.splice( index, 1 ); + + } + + } + + } + + dispatchEvent( event ) { + + if ( this._listeners === undefined ) return; + + const listeners = this._listeners; + const listenerArray = listeners[ event.type ]; + + if ( listenerArray !== undefined ) { + + event.target = this; + + // Make a copy, in case listeners are removed while iterating. + const array = listenerArray.slice( 0 ); + + for ( let i = 0, l = array.length; i < l; i ++ ) { + + array[ i ].call( this, event ); + + } + + event.target = null; + + } + + } + +} + +const _lut = [ '00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '0a', '0b', '0c', '0d', '0e', '0f', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '1a', '1b', '1c', '1d', '1e', '1f', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '2a', '2b', '2c', '2d', '2e', '2f', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '3a', '3b', '3c', '3d', '3e', '3f', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '4a', '4b', '4c', '4d', '4e', '4f', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '5a', '5b', '5c', '5d', '5e', '5f', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '6a', '6b', '6c', '6d', '6e', '6f', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '7a', '7b', '7c', '7d', '7e', '7f', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '8a', '8b', '8c', '8d', '8e', '8f', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '9a', '9b', '9c', '9d', '9e', '9f', 'a0', 'a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8', 'a9', 'aa', 'ab', 'ac', 'ad', 'ae', 'af', 'b0', 'b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'b7', 'b8', 'b9', 'ba', 'bb', 'bc', 'bd', 'be', 'bf', 'c0', 'c1', 'c2', 'c3', 'c4', 'c5', 'c6', 'c7', 'c8', 'c9', 'ca', 'cb', 'cc', 'cd', 'ce', 'cf', 'd0', 'd1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'd9', 'da', 'db', 'dc', 'dd', 'de', 'df', 'e0', 'e1', 'e2', 'e3', 'e4', 'e5', 'e6', 'e7', 'e8', 'e9', 'ea', 'eb', 'ec', 'ed', 'ee', 'ef', 'f0', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'fa', 'fb', 'fc', 'fd', 'fe', 'ff' ]; + +let _seed = 1234567; + + +const DEG2RAD = Math.PI / 180; +const RAD2DEG = 180 / Math.PI; + +// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136 +function generateUUID() { + + const d0 = Math.random() * 0xffffffff | 0; + const d1 = Math.random() * 0xffffffff | 0; + const d2 = Math.random() * 0xffffffff | 0; + const d3 = Math.random() * 0xffffffff | 0; + const uuid = _lut[ d0 & 0xff ] + _lut[ d0 >> 8 & 0xff ] + _lut[ d0 >> 16 & 0xff ] + _lut[ d0 >> 24 & 0xff ] + '-' + + _lut[ d1 & 0xff ] + _lut[ d1 >> 8 & 0xff ] + '-' + _lut[ d1 >> 16 & 0x0f | 0x40 ] + _lut[ d1 >> 24 & 0xff ] + '-' + + _lut[ d2 & 0x3f | 0x80 ] + _lut[ d2 >> 8 & 0xff ] + '-' + _lut[ d2 >> 16 & 0xff ] + _lut[ d2 >> 24 & 0xff ] + + _lut[ d3 & 0xff ] + _lut[ d3 >> 8 & 0xff ] + _lut[ d3 >> 16 & 0xff ] + _lut[ d3 >> 24 & 0xff ]; + + // .toLowerCase() here flattens concatenated strings to save heap memory space. + return uuid.toLowerCase(); + +} + +function clamp( value, min, max ) { + + return Math.max( min, Math.min( max, value ) ); + +} + +// compute euclidean modulo of m % n +// https://en.wikipedia.org/wiki/Modulo_operation +function euclideanModulo( n, m ) { + + return ( ( n % m ) + m ) % m; + +} + +// Linear mapping from range to range +function mapLinear( x, a1, a2, b1, b2 ) { + + return b1 + ( x - a1 ) * ( b2 - b1 ) / ( a2 - a1 ); + +} + +// https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/inverse-lerp-a-super-useful-yet-often-overlooked-function-r5230/ +function inverseLerp( x, y, value ) { + + if ( x !== y ) { + + return ( value - x ) / ( y - x ); + + } else { + + return 0; + + } + +} + +// https://en.wikipedia.org/wiki/Linear_interpolation +function lerp( x, y, t ) { + + return ( 1 - t ) * x + t * y; + +} + +// http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/ +function damp( x, y, lambda, dt ) { + + return lerp( x, y, 1 - Math.exp( - lambda * dt ) ); + +} + +// https://www.desmos.com/calculator/vcsjnyz7x4 +function pingpong( x, length = 1 ) { + + return length - Math.abs( euclideanModulo( x, length * 2 ) - length ); + +} + +// http://en.wikipedia.org/wiki/Smoothstep +function smoothstep( x, min, max ) { + + if ( x <= min ) return 0; + if ( x >= max ) return 1; + + x = ( x - min ) / ( max - min ); + + return x * x * ( 3 - 2 * x ); + +} + +function smootherstep( x, min, max ) { + + if ( x <= min ) return 0; + if ( x >= max ) return 1; + + x = ( x - min ) / ( max - min ); + + return x * x * x * ( x * ( x * 6 - 15 ) + 10 ); + +} + +// Random integer from interval +function randInt( low, high ) { + + return low + Math.floor( Math.random() * ( high - low + 1 ) ); + +} + +// Random float from interval +function randFloat( low, high ) { + + return low + Math.random() * ( high - low ); + +} + +// Random float from <-range/2, range/2> interval +function randFloatSpread( range ) { + + return range * ( 0.5 - Math.random() ); + +} + +// Deterministic pseudo-random float in the interval [ 0, 1 ] +function seededRandom( s ) { + + if ( s !== undefined ) _seed = s; + + // Mulberry32 generator + + let t = _seed += 0x6D2B79F5; + + t = Math.imul( t ^ t >>> 15, t | 1 ); + + t ^= t + Math.imul( t ^ t >>> 7, t | 61 ); + + return ( ( t ^ t >>> 14 ) >>> 0 ) / 4294967296; + +} + +function degToRad( degrees ) { + + return degrees * DEG2RAD; + +} + +function radToDeg( radians ) { + + return radians * RAD2DEG; + +} + +function isPowerOfTwo( value ) { + + return ( value & ( value - 1 ) ) === 0 && value !== 0; + +} + +function ceilPowerOfTwo( value ) { + + return Math.pow( 2, Math.ceil( Math.log( value ) / Math.LN2 ) ); + +} + +function floorPowerOfTwo( value ) { + + return Math.pow( 2, Math.floor( Math.log( value ) / Math.LN2 ) ); + +} + +function setQuaternionFromProperEuler( q, a, b, c, order ) { + + // Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles + + // rotations are applied to the axes in the order specified by 'order' + // rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c' + // angles are in radians + + const cos = Math.cos; + const sin = Math.sin; + + const c2 = cos( b / 2 ); + const s2 = sin( b / 2 ); + + const c13 = cos( ( a + c ) / 2 ); + const s13 = sin( ( a + c ) / 2 ); + + const c1_3 = cos( ( a - c ) / 2 ); + const s1_3 = sin( ( a - c ) / 2 ); + + const c3_1 = cos( ( c - a ) / 2 ); + const s3_1 = sin( ( c - a ) / 2 ); + + switch ( order ) { + + case 'XYX': + q.set( c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13 ); + break; + + case 'YZY': + q.set( s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13 ); + break; + + case 'ZXZ': + q.set( s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13 ); + break; + + case 'XZX': + q.set( c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13 ); + break; + + case 'YXY': + q.set( s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13 ); + break; + + case 'ZYZ': + q.set( s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13 ); + break; + + default: + console.warn( 'THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + order ); + + } + +} + +function denormalize( value, array ) { + + switch ( array.constructor ) { + + case Float32Array: + + return value; + + case Uint32Array: + + return value / 4294967295.0; + + case Uint16Array: + + return value / 65535.0; + + case Uint8Array: + + return value / 255.0; + + case Int32Array: + + return Math.max( value / 2147483647.0, - 1.0 ); + + case Int16Array: + + return Math.max( value / 32767.0, - 1.0 ); + + case Int8Array: + + return Math.max( value / 127.0, - 1.0 ); + + default: + + throw new Error( 'Invalid component type.' ); + + } + +} + +function normalize( value, array ) { + + switch ( array.constructor ) { + + case Float32Array: + + return value; + + case Uint32Array: + + return Math.round( value * 4294967295.0 ); + + case Uint16Array: + + return Math.round( value * 65535.0 ); + + case Uint8Array: + + return Math.round( value * 255.0 ); + + case Int32Array: + + return Math.round( value * 2147483647.0 ); + + case Int16Array: + + return Math.round( value * 32767.0 ); + + case Int8Array: + + return Math.round( value * 127.0 ); + + default: + + throw new Error( 'Invalid component type.' ); + + } + +} + +const MathUtils = { + DEG2RAD: DEG2RAD, + RAD2DEG: RAD2DEG, + generateUUID: generateUUID, + clamp: clamp, + euclideanModulo: euclideanModulo, + mapLinear: mapLinear, + inverseLerp: inverseLerp, + lerp: lerp, + damp: damp, + pingpong: pingpong, + smoothstep: smoothstep, + smootherstep: smootherstep, + randInt: randInt, + randFloat: randFloat, + randFloatSpread: randFloatSpread, + seededRandom: seededRandom, + degToRad: degToRad, + radToDeg: radToDeg, + isPowerOfTwo: isPowerOfTwo, + ceilPowerOfTwo: ceilPowerOfTwo, + floorPowerOfTwo: floorPowerOfTwo, + setQuaternionFromProperEuler: setQuaternionFromProperEuler, + normalize: normalize, + denormalize: denormalize +}; + +class Vector2 { + + constructor( x = 0, y = 0 ) { + + Vector2.prototype.isVector2 = true; + + this.x = x; + this.y = y; + + } + + get width() { + + return this.x; + + } + + set width( value ) { + + this.x = value; + + } + + get height() { + + return this.y; + + } + + set height( value ) { + + this.y = value; + + } + + set( x, y ) { + + this.x = x; + this.y = y; + + return this; + + } + + setScalar( scalar ) { + + this.x = scalar; + this.y = scalar; + + return this; + + } + + setX( x ) { + + this.x = x; + + return this; + + } + + setY( y ) { + + this.y = y; + + return this; + + } + + setComponent( index, value ) { + + switch ( index ) { + + case 0: this.x = value; break; + case 1: this.y = value; break; + default: throw new Error( 'index is out of range: ' + index ); + + } + + return this; + + } + + getComponent( index ) { + + switch ( index ) { + + case 0: return this.x; + case 1: return this.y; + default: throw new Error( 'index is out of range: ' + index ); + + } + + } + + clone() { + + return new this.constructor( this.x, this.y ); + + } + + copy( v ) { + + this.x = v.x; + this.y = v.y; + + return this; + + } + + add( v ) { + + this.x += v.x; + this.y += v.y; + + return this; + + } + + addScalar( s ) { + + this.x += s; + this.y += s; + + return this; + + } + + addVectors( a, b ) { + + this.x = a.x + b.x; + this.y = a.y + b.y; + + return this; + + } + + addScaledVector( v, s ) { + + this.x += v.x * s; + this.y += v.y * s; + + return this; + + } + + sub( v ) { + + this.x -= v.x; + this.y -= v.y; + + return this; + + } + + subScalar( s ) { + + this.x -= s; + this.y -= s; + + return this; + + } + + subVectors( a, b ) { + + this.x = a.x - b.x; + this.y = a.y - b.y; + + return this; + + } + + multiply( v ) { + + this.x *= v.x; + this.y *= v.y; + + return this; + + } + + multiplyScalar( scalar ) { + + this.x *= scalar; + this.y *= scalar; + + return this; + + } + + divide( v ) { + + this.x /= v.x; + this.y /= v.y; + + return this; + + } + + divideScalar( scalar ) { + + return this.multiplyScalar( 1 / scalar ); + + } + + applyMatrix3( m ) { + + const x = this.x, y = this.y; + const e = m.elements; + + this.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ]; + this.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ]; + + return this; + + } + + min( v ) { + + this.x = Math.min( this.x, v.x ); + this.y = Math.min( this.y, v.y ); + + return this; + + } + + max( v ) { + + this.x = Math.max( this.x, v.x ); + this.y = Math.max( this.y, v.y ); + + return this; + + } + + clamp( min, max ) { + + // assumes min < max, componentwise + + this.x = Math.max( min.x, Math.min( max.x, this.x ) ); + this.y = Math.max( min.y, Math.min( max.y, this.y ) ); + + return this; + + } + + clampScalar( minVal, maxVal ) { + + this.x = Math.max( minVal, Math.min( maxVal, this.x ) ); + this.y = Math.max( minVal, Math.min( maxVal, this.y ) ); + + return this; + + } + + clampLength( min, max ) { + + const length = this.length(); + + return this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) ); + + } + + floor() { + + this.x = Math.floor( this.x ); + this.y = Math.floor( this.y ); + + return this; + + } + + ceil() { + + this.x = Math.ceil( this.x ); + this.y = Math.ceil( this.y ); + + return this; + + } + + round() { + + this.x = Math.round( this.x ); + this.y = Math.round( this.y ); + + return this; + + } + + roundToZero() { + + this.x = Math.trunc( this.x ); + this.y = Math.trunc( this.y ); + + return this; + + } + + negate() { + + this.x = - this.x; + this.y = - this.y; + + return this; + + } + + dot( v ) { + + return this.x * v.x + this.y * v.y; + + } + + cross( v ) { + + return this.x * v.y - this.y * v.x; + + } + + lengthSq() { + + return this.x * this.x + this.y * this.y; + + } + + length() { + + return Math.sqrt( this.x * this.x + this.y * this.y ); + + } + + manhattanLength() { + + return Math.abs( this.x ) + Math.abs( this.y ); + + } + + normalize() { + + return this.divideScalar( this.length() || 1 ); + + } + + angle() { + + // computes the angle in radians with respect to the positive x-axis + + const angle = Math.atan2( - this.y, - this.x ) + Math.PI; + + return angle; + + } + + angleTo( v ) { + + const denominator = Math.sqrt( this.lengthSq() * v.lengthSq() ); + + if ( denominator === 0 ) return Math.PI / 2; + + const theta = this.dot( v ) / denominator; + + // clamp, to handle numerical problems + + return Math.acos( clamp( theta, - 1, 1 ) ); + + } + + distanceTo( v ) { + + return Math.sqrt( this.distanceToSquared( v ) ); + + } + + distanceToSquared( v ) { + + const dx = this.x - v.x, dy = this.y - v.y; + return dx * dx + dy * dy; + + } + + manhattanDistanceTo( v ) { + + return Math.abs( this.x - v.x ) + Math.abs( this.y - v.y ); + + } + + setLength( length ) { + + return this.normalize().multiplyScalar( length ); + + } + + lerp( v, alpha ) { + + this.x += ( v.x - this.x ) * alpha; + this.y += ( v.y - this.y ) * alpha; + + return this; + + } + + lerpVectors( v1, v2, alpha ) { + + this.x = v1.x + ( v2.x - v1.x ) * alpha; + this.y = v1.y + ( v2.y - v1.y ) * alpha; + + return this; + + } + + equals( v ) { + + return ( ( v.x === this.x ) && ( v.y === this.y ) ); + + } + + fromArray( array, offset = 0 ) { + + this.x = array[ offset ]; + this.y = array[ offset + 1 ]; + + return this; + + } + + toArray( array = [], offset = 0 ) { + + array[ offset ] = this.x; + array[ offset + 1 ] = this.y; + + return array; + + } + + fromBufferAttribute( attribute, index ) { + + this.x = attribute.getX( index ); + this.y = attribute.getY( index ); + + return this; + + } + + rotateAround( center, angle ) { + + const c = Math.cos( angle ), s = Math.sin( angle ); + + const x = this.x - center.x; + const y = this.y - center.y; + + this.x = x * c - y * s + center.x; + this.y = x * s + y * c + center.y; + + return this; + + } + + random() { + + this.x = Math.random(); + this.y = Math.random(); + + return this; + + } + + *[ Symbol.iterator ]() { + + yield this.x; + yield this.y; + + } + +} + +class Matrix3 { + + constructor( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) { + + Matrix3.prototype.isMatrix3 = true; + + this.elements = [ + + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 + + ]; + + if ( n11 !== undefined ) { + + this.set( n11, n12, n13, n21, n22, n23, n31, n32, n33 ); + + } + + } + + set( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) { + + const te = this.elements; + + te[ 0 ] = n11; te[ 1 ] = n21; te[ 2 ] = n31; + te[ 3 ] = n12; te[ 4 ] = n22; te[ 5 ] = n32; + te[ 6 ] = n13; te[ 7 ] = n23; te[ 8 ] = n33; + + return this; + + } + + identity() { + + this.set( + + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 + + ); + + return this; + + } + + copy( m ) { + + const te = this.elements; + const me = m.elements; + + te[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ]; + te[ 3 ] = me[ 3 ]; te[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ]; + te[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ]; te[ 8 ] = me[ 8 ]; + + return this; + + } + + extractBasis( xAxis, yAxis, zAxis ) { + + xAxis.setFromMatrix3Column( this, 0 ); + yAxis.setFromMatrix3Column( this, 1 ); + zAxis.setFromMatrix3Column( this, 2 ); + + return this; + + } + + setFromMatrix4( m ) { + + const me = m.elements; + + this.set( + + me[ 0 ], me[ 4 ], me[ 8 ], + me[ 1 ], me[ 5 ], me[ 9 ], + me[ 2 ], me[ 6 ], me[ 10 ] + + ); + + return this; + + } + + multiply( m ) { + + return this.multiplyMatrices( this, m ); + + } + + premultiply( m ) { + + return this.multiplyMatrices( m, this ); + + } + + multiplyMatrices( a, b ) { + + const ae = a.elements; + const be = b.elements; + const te = this.elements; + + const a11 = ae[ 0 ], a12 = ae[ 3 ], a13 = ae[ 6 ]; + const a21 = ae[ 1 ], a22 = ae[ 4 ], a23 = ae[ 7 ]; + const a31 = ae[ 2 ], a32 = ae[ 5 ], a33 = ae[ 8 ]; + + const b11 = be[ 0 ], b12 = be[ 3 ], b13 = be[ 6 ]; + const b21 = be[ 1 ], b22 = be[ 4 ], b23 = be[ 7 ]; + const b31 = be[ 2 ], b32 = be[ 5 ], b33 = be[ 8 ]; + + te[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31; + te[ 3 ] = a11 * b12 + a12 * b22 + a13 * b32; + te[ 6 ] = a11 * b13 + a12 * b23 + a13 * b33; + + te[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31; + te[ 4 ] = a21 * b12 + a22 * b22 + a23 * b32; + te[ 7 ] = a21 * b13 + a22 * b23 + a23 * b33; + + te[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31; + te[ 5 ] = a31 * b12 + a32 * b22 + a33 * b32; + te[ 8 ] = a31 * b13 + a32 * b23 + a33 * b33; + + return this; + + } + + multiplyScalar( s ) { + + const te = this.elements; + + te[ 0 ] *= s; te[ 3 ] *= s; te[ 6 ] *= s; + te[ 1 ] *= s; te[ 4 ] *= s; te[ 7 ] *= s; + te[ 2 ] *= s; te[ 5 ] *= s; te[ 8 ] *= s; + + return this; + + } + + determinant() { + + const te = this.elements; + + const a = te[ 0 ], b = te[ 1 ], c = te[ 2 ], + d = te[ 3 ], e = te[ 4 ], f = te[ 5 ], + g = te[ 6 ], h = te[ 7 ], i = te[ 8 ]; + + return a * e * i - a * f * h - b * d * i + b * f * g + c * d * h - c * e * g; + + } + + invert() { + + const te = this.elements, + + n11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ], + n12 = te[ 3 ], n22 = te[ 4 ], n32 = te[ 5 ], + n13 = te[ 6 ], n23 = te[ 7 ], n33 = te[ 8 ], + + t11 = n33 * n22 - n32 * n23, + t12 = n32 * n13 - n33 * n12, + t13 = n23 * n12 - n22 * n13, + + det = n11 * t11 + n21 * t12 + n31 * t13; + + if ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0 ); + + const detInv = 1 / det; + + te[ 0 ] = t11 * detInv; + te[ 1 ] = ( n31 * n23 - n33 * n21 ) * detInv; + te[ 2 ] = ( n32 * n21 - n31 * n22 ) * detInv; + + te[ 3 ] = t12 * detInv; + te[ 4 ] = ( n33 * n11 - n31 * n13 ) * detInv; + te[ 5 ] = ( n31 * n12 - n32 * n11 ) * detInv; + + te[ 6 ] = t13 * detInv; + te[ 7 ] = ( n21 * n13 - n23 * n11 ) * detInv; + te[ 8 ] = ( n22 * n11 - n21 * n12 ) * detInv; + + return this; + + } + + transpose() { + + let tmp; + const m = this.elements; + + tmp = m[ 1 ]; m[ 1 ] = m[ 3 ]; m[ 3 ] = tmp; + tmp = m[ 2 ]; m[ 2 ] = m[ 6 ]; m[ 6 ] = tmp; + tmp = m[ 5 ]; m[ 5 ] = m[ 7 ]; m[ 7 ] = tmp; + + return this; + + } + + getNormalMatrix( matrix4 ) { + + return this.setFromMatrix4( matrix4 ).invert().transpose(); + + } + + transposeIntoArray( r ) { + + const m = this.elements; + + r[ 0 ] = m[ 0 ]; + r[ 1 ] = m[ 3 ]; + r[ 2 ] = m[ 6 ]; + r[ 3 ] = m[ 1 ]; + r[ 4 ] = m[ 4 ]; + r[ 5 ] = m[ 7 ]; + r[ 6 ] = m[ 2 ]; + r[ 7 ] = m[ 5 ]; + r[ 8 ] = m[ 8 ]; + + return this; + + } + + setUvTransform( tx, ty, sx, sy, rotation, cx, cy ) { + + const c = Math.cos( rotation ); + const s = Math.sin( rotation ); + + this.set( + sx * c, sx * s, - sx * ( c * cx + s * cy ) + cx + tx, + - sy * s, sy * c, - sy * ( - s * cx + c * cy ) + cy + ty, + 0, 0, 1 + ); + + return this; + + } + + // + + scale( sx, sy ) { + + this.premultiply( _m3.makeScale( sx, sy ) ); + + return this; + + } + + rotate( theta ) { + + this.premultiply( _m3.makeRotation( - theta ) ); + + return this; + + } + + translate( tx, ty ) { + + this.premultiply( _m3.makeTranslation( tx, ty ) ); + + return this; + + } + + // for 2D Transforms + + makeTranslation( x, y ) { + + if ( x.isVector2 ) { + + this.set( + + 1, 0, x.x, + 0, 1, x.y, + 0, 0, 1 + + ); + + } else { + + this.set( + + 1, 0, x, + 0, 1, y, + 0, 0, 1 + + ); + + } + + return this; + + } + + makeRotation( theta ) { + + // counterclockwise + + const c = Math.cos( theta ); + const s = Math.sin( theta ); + + this.set( + + c, - s, 0, + s, c, 0, + 0, 0, 1 + + ); + + return this; + + } + + makeScale( x, y ) { + + this.set( + + x, 0, 0, + 0, y, 0, + 0, 0, 1 + + ); + + return this; + + } + + // + + equals( matrix ) { + + const te = this.elements; + const me = matrix.elements; + + for ( let i = 0; i < 9; i ++ ) { + + if ( te[ i ] !== me[ i ] ) return false; + + } + + return true; + + } + + fromArray( array, offset = 0 ) { + + for ( let i = 0; i < 9; i ++ ) { + + this.elements[ i ] = array[ i + offset ]; + + } + + return this; + + } + + toArray( array = [], offset = 0 ) { + + const te = this.elements; + + array[ offset ] = te[ 0 ]; + array[ offset + 1 ] = te[ 1 ]; + array[ offset + 2 ] = te[ 2 ]; + + array[ offset + 3 ] = te[ 3 ]; + array[ offset + 4 ] = te[ 4 ]; + array[ offset + 5 ] = te[ 5 ]; + + array[ offset + 6 ] = te[ 6 ]; + array[ offset + 7 ] = te[ 7 ]; + array[ offset + 8 ] = te[ 8 ]; + + return array; + + } + + clone() { + + return new this.constructor().fromArray( this.elements ); + + } + +} + +const _m3 = /*@__PURE__*/ new Matrix3(); + +function arrayNeedsUint32( array ) { + + // assumes larger values usually on last + + for ( let i = array.length - 1; i >= 0; -- i ) { + + if ( array[ i ] >= 65535 ) return true; // account for PRIMITIVE_RESTART_FIXED_INDEX, #24565 + + } + + return false; + +} + +const TYPED_ARRAYS = { + Int8Array: Int8Array, + Uint8Array: Uint8Array, + Uint8ClampedArray: Uint8ClampedArray, + Int16Array: Int16Array, + Uint16Array: Uint16Array, + Int32Array: Int32Array, + Uint32Array: Uint32Array, + Float32Array: Float32Array, + Float64Array: Float64Array +}; + +function getTypedArray( type, buffer ) { + + return new TYPED_ARRAYS[ type ]( buffer ); + +} + +function createElementNS( name ) { + + return document.createElementNS( 'http://www.w3.org/1999/xhtml', name ); + +} + +function createCanvasElement() { + + const canvas = createElementNS( 'canvas' ); + canvas.style.display = 'block'; + return canvas; + +} + +const _cache = {}; + +function warnOnce( message ) { + + if ( message in _cache ) return; + + _cache[ message ] = true; + + console.warn( message ); + +} + +/** + * Matrices converting P3 <-> Rec. 709 primaries, without gamut mapping + * or clipping. Based on W3C specifications for sRGB and Display P3, + * and ICC specifications for the D50 connection space. Values in/out + * are _linear_ sRGB and _linear_ Display P3. + * + * Note that both sRGB and Display P3 use the sRGB transfer functions. + * + * Reference: + * - http://www.russellcottrell.com/photo/matrixCalculator.htm + */ + +const LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = /*@__PURE__*/ new Matrix3().set( + 0.8224621, 0.177538, 0.0, + 0.0331941, 0.9668058, 0.0, + 0.0170827, 0.0723974, 0.9105199, +); + +const LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = /*@__PURE__*/ new Matrix3().set( + 1.2249401, - 0.2249404, 0.0, + - 0.0420569, 1.0420571, 0.0, + - 0.0196376, - 0.0786361, 1.0982735 +); + +/** + * Defines supported color spaces by transfer function and primaries, + * and provides conversions to/from the Linear-sRGB reference space. + */ +const COLOR_SPACES = { + [ LinearSRGBColorSpace ]: { + transfer: LinearTransfer, + primaries: Rec709Primaries, + toReference: ( color ) => color, + fromReference: ( color ) => color, + }, + [ SRGBColorSpace ]: { + transfer: SRGBTransfer, + primaries: Rec709Primaries, + toReference: ( color ) => color.convertSRGBToLinear(), + fromReference: ( color ) => color.convertLinearToSRGB(), + }, + [ LinearDisplayP3ColorSpace ]: { + transfer: LinearTransfer, + primaries: P3Primaries, + toReference: ( color ) => color.applyMatrix3( LINEAR_DISPLAY_P3_TO_LINEAR_SRGB ), + fromReference: ( color ) => color.applyMatrix3( LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 ), + }, + [ DisplayP3ColorSpace ]: { + transfer: SRGBTransfer, + primaries: P3Primaries, + toReference: ( color ) => color.convertSRGBToLinear().applyMatrix3( LINEAR_DISPLAY_P3_TO_LINEAR_SRGB ), + fromReference: ( color ) => color.applyMatrix3( LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 ).convertLinearToSRGB(), + }, +}; + +const SUPPORTED_WORKING_COLOR_SPACES = new Set( [ LinearSRGBColorSpace, LinearDisplayP3ColorSpace ] ); + +const ColorManagement = { + + enabled: true, + + _workingColorSpace: LinearSRGBColorSpace, + + get workingColorSpace() { + + return this._workingColorSpace; + + }, + + set workingColorSpace( colorSpace ) { + + if ( ! SUPPORTED_WORKING_COLOR_SPACES.has( colorSpace ) ) { + + throw new Error( `Unsupported working color space, "${ colorSpace }".` ); + + } + + this._workingColorSpace = colorSpace; + + }, + + convert: function ( color, sourceColorSpace, targetColorSpace ) { + + if ( this.enabled === false || sourceColorSpace === targetColorSpace || ! sourceColorSpace || ! targetColorSpace ) { + + return color; + + } + + const sourceToReference = COLOR_SPACES[ sourceColorSpace ].toReference; + const targetFromReference = COLOR_SPACES[ targetColorSpace ].fromReference; + + return targetFromReference( sourceToReference( color ) ); + + }, + + fromWorkingColorSpace: function ( color, targetColorSpace ) { + + return this.convert( color, this._workingColorSpace, targetColorSpace ); + + }, + + toWorkingColorSpace: function ( color, sourceColorSpace ) { + + return this.convert( color, sourceColorSpace, this._workingColorSpace ); + + }, + + getPrimaries: function ( colorSpace ) { + + return COLOR_SPACES[ colorSpace ].primaries; + + }, + + getTransfer: function ( colorSpace ) { + + if ( colorSpace === NoColorSpace ) return LinearTransfer; + + return COLOR_SPACES[ colorSpace ].transfer; + + }, + +}; + + +function SRGBToLinear( c ) { + + return ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 ); + +} + +function LinearToSRGB( c ) { + + return ( c < 0.0031308 ) ? c * 12.92 : 1.055 * ( Math.pow( c, 0.41666 ) ) - 0.055; + +} + +let _canvas; + +class ImageUtils { + + static getDataURL( image ) { + + if ( /^data:/i.test( image.src ) ) { + + return image.src; + + } + + if ( typeof HTMLCanvasElement === 'undefined' ) { + + return image.src; + + } + + let canvas; + + if ( image instanceof HTMLCanvasElement ) { + + canvas = image; + + } else { + + if ( _canvas === undefined ) _canvas = createElementNS( 'canvas' ); + + _canvas.width = image.width; + _canvas.height = image.height; + + const context = _canvas.getContext( '2d' ); + + if ( image instanceof ImageData ) { + + context.putImageData( image, 0, 0 ); + + } else { + + context.drawImage( image, 0, 0, image.width, image.height ); + + } + + canvas = _canvas; + + } + + if ( canvas.width > 2048 || canvas.height > 2048 ) { + + console.warn( 'THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons', image ); + + return canvas.toDataURL( 'image/jpeg', 0.6 ); + + } else { + + return canvas.toDataURL( 'image/png' ); + + } + + } + + static sRGBToLinear( image ) { + + if ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) || + ( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) || + ( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) { + + const canvas = createElementNS( 'canvas' ); + + canvas.width = image.width; + canvas.height = image.height; + + const context = canvas.getContext( '2d' ); + context.drawImage( image, 0, 0, image.width, image.height ); + + const imageData = context.getImageData( 0, 0, image.width, image.height ); + const data = imageData.data; + + for ( let i = 0; i < data.length; i ++ ) { + + data[ i ] = SRGBToLinear( data[ i ] / 255 ) * 255; + + } + + context.putImageData( imageData, 0, 0 ); + + return canvas; + + } else if ( image.data ) { + + const data = image.data.slice( 0 ); + + for ( let i = 0; i < data.length; i ++ ) { + + if ( data instanceof Uint8Array || data instanceof Uint8ClampedArray ) { + + data[ i ] = Math.floor( SRGBToLinear( data[ i ] / 255 ) * 255 ); + + } else { + + // assuming float + + data[ i ] = SRGBToLinear( data[ i ] ); + + } + + } + + return { + data: data, + width: image.width, + height: image.height + }; + + } else { + + console.warn( 'THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied.' ); + return image; + + } + + } + +} + +let _sourceId = 0; + +class Source { + + constructor( data = null ) { + + this.isSource = true; + + Object.defineProperty( this, 'id', { value: _sourceId ++ } ); + + this.uuid = generateUUID(); + + this.data = data; + this.dataReady = true; + + this.version = 0; + + } + + set needsUpdate( value ) { + + if ( value === true ) this.version ++; + + } + + toJSON( meta ) { + + const isRootObject = ( meta === undefined || typeof meta === 'string' ); + + if ( ! isRootObject && meta.images[ this.uuid ] !== undefined ) { + + return meta.images[ this.uuid ]; + + } + + const output = { + uuid: this.uuid, + url: '' + }; + + const data = this.data; + + if ( data !== null ) { + + let url; + + if ( Array.isArray( data ) ) { + + // cube texture + + url = []; + + for ( let i = 0, l = data.length; i < l; i ++ ) { + + if ( data[ i ].isDataTexture ) { + + url.push( serializeImage( data[ i ].image ) ); + + } else { + + url.push( serializeImage( data[ i ] ) ); + + } + + } + + } else { + + // texture + + url = serializeImage( data ); + + } + + output.url = url; + + } + + if ( ! isRootObject ) { + + meta.images[ this.uuid ] = output; + + } + + return output; + + } + +} + +function serializeImage( image ) { + + if ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) || + ( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) || + ( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) { + + // default images + + return ImageUtils.getDataURL( image ); + + } else { + + if ( image.data ) { + + // images of DataTexture + + return { + data: Array.from( image.data ), + width: image.width, + height: image.height, + type: image.data.constructor.name + }; + + } else { + + console.warn( 'THREE.Texture: Unable to serialize Texture.' ); + return {}; + + } + + } + +} + +let _textureId = 0; + +class Texture extends EventDispatcher { + + constructor( image = Texture.DEFAULT_IMAGE, mapping = Texture.DEFAULT_MAPPING, wrapS = ClampToEdgeWrapping, wrapT = ClampToEdgeWrapping, magFilter = LinearFilter, minFilter = LinearMipmapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = Texture.DEFAULT_ANISOTROPY, colorSpace = NoColorSpace ) { + + super(); + + this.isTexture = true; + + Object.defineProperty( this, 'id', { value: _textureId ++ } ); + + this.uuid = generateUUID(); + + this.name = ''; + + this.source = new Source( image ); + this.mipmaps = []; + + this.mapping = mapping; + this.channel = 0; + + this.wrapS = wrapS; + this.wrapT = wrapT; + + this.magFilter = magFilter; + this.minFilter = minFilter; + + this.anisotropy = anisotropy; + + this.format = format; + this.internalFormat = null; + this.type = type; + + this.offset = new Vector2( 0, 0 ); + this.repeat = new Vector2( 1, 1 ); + this.center = new Vector2( 0, 0 ); + this.rotation = 0; + + this.matrixAutoUpdate = true; + this.matrix = new Matrix3(); + + this.generateMipmaps = true; + this.premultiplyAlpha = false; + this.flipY = true; + this.unpackAlignment = 4; // valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml) + + this.colorSpace = colorSpace; + + this.userData = {}; + + this.version = 0; + this.onUpdate = null; + + this.isRenderTargetTexture = false; // indicates whether a texture belongs to a render target or not + this.pmremVersion = 0; // indicates whether this texture should be processed by PMREMGenerator or not (only relevant for render target textures) + + } + + get image() { + + return this.source.data; + + } + + set image( value = null ) { + + this.source.data = value; + + } + + updateMatrix() { + + this.matrix.setUvTransform( this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( source ) { + + this.name = source.name; + + this.source = source.source; + this.mipmaps = source.mipmaps.slice( 0 ); + + this.mapping = source.mapping; + this.channel = source.channel; + + this.wrapS = source.wrapS; + this.wrapT = source.wrapT; + + this.magFilter = source.magFilter; + this.minFilter = source.minFilter; + + this.anisotropy = source.anisotropy; + + this.format = source.format; + this.internalFormat = source.internalFormat; + this.type = source.type; + + this.offset.copy( source.offset ); + this.repeat.copy( source.repeat ); + this.center.copy( source.center ); + this.rotation = source.rotation; + + this.matrixAutoUpdate = source.matrixAutoUpdate; + this.matrix.copy( source.matrix ); + + this.generateMipmaps = source.generateMipmaps; + this.premultiplyAlpha = source.premultiplyAlpha; + this.flipY = source.flipY; + this.unpackAlignment = source.unpackAlignment; + this.colorSpace = source.colorSpace; + + this.userData = JSON.parse( JSON.stringify( source.userData ) ); + + this.needsUpdate = true; + + return this; + + } + + toJSON( meta ) { + + const isRootObject = ( meta === undefined || typeof meta === 'string' ); + + if ( ! isRootObject && meta.textures[ this.uuid ] !== undefined ) { + + return meta.textures[ this.uuid ]; + + } + + const output = { + + metadata: { + version: 4.6, + type: 'Texture', + generator: 'Texture.toJSON' + }, + + uuid: this.uuid, + name: this.name, + + image: this.source.toJSON( meta ).uuid, + + mapping: this.mapping, + channel: this.channel, + + repeat: [ this.repeat.x, this.repeat.y ], + offset: [ this.offset.x, this.offset.y ], + center: [ this.center.x, this.center.y ], + rotation: this.rotation, + + wrap: [ this.wrapS, this.wrapT ], + + format: this.format, + internalFormat: this.internalFormat, + type: this.type, + colorSpace: this.colorSpace, + + minFilter: this.minFilter, + magFilter: this.magFilter, + anisotropy: this.anisotropy, + + flipY: this.flipY, + + generateMipmaps: this.generateMipmaps, + premultiplyAlpha: this.premultiplyAlpha, + unpackAlignment: this.unpackAlignment + + }; + + if ( Object.keys( this.userData ).length > 0 ) output.userData = this.userData; + + if ( ! isRootObject ) { + + meta.textures[ this.uuid ] = output; + + } + + return output; + + } + + dispose() { + + this.dispatchEvent( { type: 'dispose' } ); + + } + + transformUv( uv ) { + + if ( this.mapping !== UVMapping ) return uv; + + uv.applyMatrix3( this.matrix ); + + if ( uv.x < 0 || uv.x > 1 ) { + + switch ( this.wrapS ) { + + case RepeatWrapping: + + uv.x = uv.x - Math.floor( uv.x ); + break; + + case ClampToEdgeWrapping: + + uv.x = uv.x < 0 ? 0 : 1; + break; + + case MirroredRepeatWrapping: + + if ( Math.abs( Math.floor( uv.x ) % 2 ) === 1 ) { + + uv.x = Math.ceil( uv.x ) - uv.x; + + } else { + + uv.x = uv.x - Math.floor( uv.x ); + + } + + break; + + } + + } + + if ( uv.y < 0 || uv.y > 1 ) { + + switch ( this.wrapT ) { + + case RepeatWrapping: + + uv.y = uv.y - Math.floor( uv.y ); + break; + + case ClampToEdgeWrapping: + + uv.y = uv.y < 0 ? 0 : 1; + break; + + case MirroredRepeatWrapping: + + if ( Math.abs( Math.floor( uv.y ) % 2 ) === 1 ) { + + uv.y = Math.ceil( uv.y ) - uv.y; + + } else { + + uv.y = uv.y - Math.floor( uv.y ); + + } + + break; + + } + + } + + if ( this.flipY ) { + + uv.y = 1 - uv.y; + + } + + return uv; + + } + + set needsUpdate( value ) { + + if ( value === true ) { + + this.version ++; + this.source.needsUpdate = true; + + } + + } + + set needsPMREMUpdate( value ) { + + if ( value === true ) { + + this.pmremVersion ++; + + } + + } + +} + +Texture.DEFAULT_IMAGE = null; +Texture.DEFAULT_MAPPING = UVMapping; +Texture.DEFAULT_ANISOTROPY = 1; + +class Vector4 { + + constructor( x = 0, y = 0, z = 0, w = 1 ) { + + Vector4.prototype.isVector4 = true; + + this.x = x; + this.y = y; + this.z = z; + this.w = w; + + } + + get width() { + + return this.z; + + } + + set width( value ) { + + this.z = value; + + } + + get height() { + + return this.w; + + } + + set height( value ) { + + this.w = value; + + } + + set( x, y, z, w ) { + + this.x = x; + this.y = y; + this.z = z; + this.w = w; + + return this; + + } + + setScalar( scalar ) { + + this.x = scalar; + this.y = scalar; + this.z = scalar; + this.w = scalar; + + return this; + + } + + setX( x ) { + + this.x = x; + + return this; + + } + + setY( y ) { + + this.y = y; + + return this; + + } + + setZ( z ) { + + this.z = z; + + return this; + + } + + setW( w ) { + + this.w = w; + + return this; + + } + + setComponent( index, value ) { + + switch ( index ) { + + case 0: this.x = value; break; + case 1: this.y = value; break; + case 2: this.z = value; break; + case 3: this.w = value; break; + default: throw new Error( 'index is out of range: ' + index ); + + } + + return this; + + } + + getComponent( index ) { + + switch ( index ) { + + case 0: return this.x; + case 1: return this.y; + case 2: return this.z; + case 3: return this.w; + default: throw new Error( 'index is out of range: ' + index ); + + } + + } + + clone() { + + return new this.constructor( this.x, this.y, this.z, this.w ); + + } + + copy( v ) { + + this.x = v.x; + this.y = v.y; + this.z = v.z; + this.w = ( v.w !== undefined ) ? v.w : 1; + + return this; + + } + + add( v ) { + + this.x += v.x; + this.y += v.y; + this.z += v.z; + this.w += v.w; + + return this; + + } + + addScalar( s ) { + + this.x += s; + this.y += s; + this.z += s; + this.w += s; + + return this; + + } + + addVectors( a, b ) { + + this.x = a.x + b.x; + this.y = a.y + b.y; + this.z = a.z + b.z; + this.w = a.w + b.w; + + return this; + + } + + addScaledVector( v, s ) { + + this.x += v.x * s; + this.y += v.y * s; + this.z += v.z * s; + this.w += v.w * s; + + return this; + + } + + sub( v ) { + + this.x -= v.x; + this.y -= v.y; + this.z -= v.z; + this.w -= v.w; + + return this; + + } + + subScalar( s ) { + + this.x -= s; + this.y -= s; + this.z -= s; + this.w -= s; + + return this; + + } + + subVectors( a, b ) { + + this.x = a.x - b.x; + this.y = a.y - b.y; + this.z = a.z - b.z; + this.w = a.w - b.w; + + return this; + + } + + multiply( v ) { + + this.x *= v.x; + this.y *= v.y; + this.z *= v.z; + this.w *= v.w; + + return this; + + } + + multiplyScalar( scalar ) { + + this.x *= scalar; + this.y *= scalar; + this.z *= scalar; + this.w *= scalar; + + return this; + + } + + applyMatrix4( m ) { + + const x = this.x, y = this.y, z = this.z, w = this.w; + const e = m.elements; + + this.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] * w; + this.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] * w; + this.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] * w; + this.w = e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] * w; + + return this; + + } + + divideScalar( scalar ) { + + return this.multiplyScalar( 1 / scalar ); + + } + + setAxisAngleFromQuaternion( q ) { + + // http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm + + // q is assumed to be normalized + + this.w = 2 * Math.acos( q.w ); + + const s = Math.sqrt( 1 - q.w * q.w ); + + if ( s < 0.0001 ) { + + this.x = 1; + this.y = 0; + this.z = 0; + + } else { + + this.x = q.x / s; + this.y = q.y / s; + this.z = q.z / s; + + } + + return this; + + } + + setAxisAngleFromRotationMatrix( m ) { + + // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/index.htm + + // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) + + let angle, x, y, z; // variables for result + const epsilon = 0.01, // margin to allow for rounding errors + epsilon2 = 0.1, // margin to distinguish between 0 and 180 degrees + + te = m.elements, + + m11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ], + m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ], + m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ]; + + if ( ( Math.abs( m12 - m21 ) < epsilon ) && + ( Math.abs( m13 - m31 ) < epsilon ) && + ( Math.abs( m23 - m32 ) < epsilon ) ) { + + // singularity found + // first check for identity matrix which must have +1 for all terms + // in leading diagonal and zero in other terms + + if ( ( Math.abs( m12 + m21 ) < epsilon2 ) && + ( Math.abs( m13 + m31 ) < epsilon2 ) && + ( Math.abs( m23 + m32 ) < epsilon2 ) && + ( Math.abs( m11 + m22 + m33 - 3 ) < epsilon2 ) ) { + + // this singularity is identity matrix so angle = 0 + + this.set( 1, 0, 0, 0 ); + + return this; // zero angle, arbitrary axis + + } + + // otherwise this singularity is angle = 180 + + angle = Math.PI; + + const xx = ( m11 + 1 ) / 2; + const yy = ( m22 + 1 ) / 2; + const zz = ( m33 + 1 ) / 2; + const xy = ( m12 + m21 ) / 4; + const xz = ( m13 + m31 ) / 4; + const yz = ( m23 + m32 ) / 4; + + if ( ( xx > yy ) && ( xx > zz ) ) { + + // m11 is the largest diagonal term + + if ( xx < epsilon ) { + + x = 0; + y = 0.707106781; + z = 0.707106781; + + } else { + + x = Math.sqrt( xx ); + y = xy / x; + z = xz / x; + + } + + } else if ( yy > zz ) { + + // m22 is the largest diagonal term + + if ( yy < epsilon ) { + + x = 0.707106781; + y = 0; + z = 0.707106781; + + } else { + + y = Math.sqrt( yy ); + x = xy / y; + z = yz / y; + + } + + } else { + + // m33 is the largest diagonal term so base result on this + + if ( zz < epsilon ) { + + x = 0.707106781; + y = 0.707106781; + z = 0; + + } else { + + z = Math.sqrt( zz ); + x = xz / z; + y = yz / z; + + } + + } + + this.set( x, y, z, angle ); + + return this; // return 180 deg rotation + + } + + // as we have reached here there are no singularities so we can handle normally + + let s = Math.sqrt( ( m32 - m23 ) * ( m32 - m23 ) + + ( m13 - m31 ) * ( m13 - m31 ) + + ( m21 - m12 ) * ( m21 - m12 ) ); // used to normalize + + if ( Math.abs( s ) < 0.001 ) s = 1; + + // prevent divide by zero, should not happen if matrix is orthogonal and should be + // caught by singularity test above, but I've left it in just in case + + this.x = ( m32 - m23 ) / s; + this.y = ( m13 - m31 ) / s; + this.z = ( m21 - m12 ) / s; + this.w = Math.acos( ( m11 + m22 + m33 - 1 ) / 2 ); + + return this; + + } + + min( v ) { + + this.x = Math.min( this.x, v.x ); + this.y = Math.min( this.y, v.y ); + this.z = Math.min( this.z, v.z ); + this.w = Math.min( this.w, v.w ); + + return this; + + } + + max( v ) { + + this.x = Math.max( this.x, v.x ); + this.y = Math.max( this.y, v.y ); + this.z = Math.max( this.z, v.z ); + this.w = Math.max( this.w, v.w ); + + return this; + + } + + clamp( min, max ) { + + // assumes min < max, componentwise + + this.x = Math.max( min.x, Math.min( max.x, this.x ) ); + this.y = Math.max( min.y, Math.min( max.y, this.y ) ); + this.z = Math.max( min.z, Math.min( max.z, this.z ) ); + this.w = Math.max( min.w, Math.min( max.w, this.w ) ); + + return this; + + } + + clampScalar( minVal, maxVal ) { + + this.x = Math.max( minVal, Math.min( maxVal, this.x ) ); + this.y = Math.max( minVal, Math.min( maxVal, this.y ) ); + this.z = Math.max( minVal, Math.min( maxVal, this.z ) ); + this.w = Math.max( minVal, Math.min( maxVal, this.w ) ); + + return this; + + } + + clampLength( min, max ) { + + const length = this.length(); + + return this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) ); + + } + + floor() { + + this.x = Math.floor( this.x ); + this.y = Math.floor( this.y ); + this.z = Math.floor( this.z ); + this.w = Math.floor( this.w ); + + return this; + + } + + ceil() { + + this.x = Math.ceil( this.x ); + this.y = Math.ceil( this.y ); + this.z = Math.ceil( this.z ); + this.w = Math.ceil( this.w ); + + return this; + + } + + round() { + + this.x = Math.round( this.x ); + this.y = Math.round( this.y ); + this.z = Math.round( this.z ); + this.w = Math.round( this.w ); + + return this; + + } + + roundToZero() { + + this.x = Math.trunc( this.x ); + this.y = Math.trunc( this.y ); + this.z = Math.trunc( this.z ); + this.w = Math.trunc( this.w ); + + return this; + + } + + negate() { + + this.x = - this.x; + this.y = - this.y; + this.z = - this.z; + this.w = - this.w; + + return this; + + } + + dot( v ) { + + return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w; + + } + + lengthSq() { + + return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w; + + } + + length() { + + return Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w ); + + } + + manhattanLength() { + + return Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z ) + Math.abs( this.w ); + + } + + normalize() { + + return this.divideScalar( this.length() || 1 ); + + } + + setLength( length ) { + + return this.normalize().multiplyScalar( length ); + + } + + lerp( v, alpha ) { + + this.x += ( v.x - this.x ) * alpha; + this.y += ( v.y - this.y ) * alpha; + this.z += ( v.z - this.z ) * alpha; + this.w += ( v.w - this.w ) * alpha; + + return this; + + } + + lerpVectors( v1, v2, alpha ) { + + this.x = v1.x + ( v2.x - v1.x ) * alpha; + this.y = v1.y + ( v2.y - v1.y ) * alpha; + this.z = v1.z + ( v2.z - v1.z ) * alpha; + this.w = v1.w + ( v2.w - v1.w ) * alpha; + + return this; + + } + + equals( v ) { + + return ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) && ( v.w === this.w ) ); + + } + + fromArray( array, offset = 0 ) { + + this.x = array[ offset ]; + this.y = array[ offset + 1 ]; + this.z = array[ offset + 2 ]; + this.w = array[ offset + 3 ]; + + return this; + + } + + toArray( array = [], offset = 0 ) { + + array[ offset ] = this.x; + array[ offset + 1 ] = this.y; + array[ offset + 2 ] = this.z; + array[ offset + 3 ] = this.w; + + return array; + + } + + fromBufferAttribute( attribute, index ) { + + this.x = attribute.getX( index ); + this.y = attribute.getY( index ); + this.z = attribute.getZ( index ); + this.w = attribute.getW( index ); + + return this; + + } + + random() { + + this.x = Math.random(); + this.y = Math.random(); + this.z = Math.random(); + this.w = Math.random(); + + return this; + + } + + *[ Symbol.iterator ]() { + + yield this.x; + yield this.y; + yield this.z; + yield this.w; + + } + +} + +/* + In options, we can specify: + * Texture parameters for an auto-generated target texture + * depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers +*/ +class RenderTarget extends EventDispatcher { + + constructor( width = 1, height = 1, options = {} ) { + + super(); + + this.isRenderTarget = true; + + this.width = width; + this.height = height; + this.depth = 1; + + this.scissor = new Vector4( 0, 0, width, height ); + this.scissorTest = false; + + this.viewport = new Vector4( 0, 0, width, height ); + + const image = { width: width, height: height, depth: 1 }; + + options = Object.assign( { + generateMipmaps: false, + internalFormat: null, + minFilter: LinearFilter, + depthBuffer: true, + stencilBuffer: false, + resolveDepthBuffer: true, + resolveStencilBuffer: true, + depthTexture: null, + samples: 0, + count: 1 + }, options ); + + const texture = new Texture( image, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace ); + + texture.flipY = false; + texture.generateMipmaps = options.generateMipmaps; + texture.internalFormat = options.internalFormat; + + this.textures = []; + + const count = options.count; + for ( let i = 0; i < count; i ++ ) { + + this.textures[ i ] = texture.clone(); + this.textures[ i ].isRenderTargetTexture = true; + + } + + this.depthBuffer = options.depthBuffer; + this.stencilBuffer = options.stencilBuffer; + + this.resolveDepthBuffer = options.resolveDepthBuffer; + this.resolveStencilBuffer = options.resolveStencilBuffer; + + this.depthTexture = options.depthTexture; + + this.samples = options.samples; + + } + + get texture() { + + return this.textures[ 0 ]; + + } + + set texture( value ) { + + this.textures[ 0 ] = value; + + } + + setSize( width, height, depth = 1 ) { + + if ( this.width !== width || this.height !== height || this.depth !== depth ) { + + this.width = width; + this.height = height; + this.depth = depth; + + for ( let i = 0, il = this.textures.length; i < il; i ++ ) { + + this.textures[ i ].image.width = width; + this.textures[ i ].image.height = height; + this.textures[ i ].image.depth = depth; + + } + + this.dispose(); + + } + + this.viewport.set( 0, 0, width, height ); + this.scissor.set( 0, 0, width, height ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( source ) { + + this.width = source.width; + this.height = source.height; + this.depth = source.depth; + + this.scissor.copy( source.scissor ); + this.scissorTest = source.scissorTest; + + this.viewport.copy( source.viewport ); + + this.textures.length = 0; + + for ( let i = 0, il = source.textures.length; i < il; i ++ ) { + + this.textures[ i ] = source.textures[ i ].clone(); + this.textures[ i ].isRenderTargetTexture = true; + + } + + // ensure image object is not shared, see #20328 + + const image = Object.assign( {}, source.texture.image ); + this.texture.source = new Source( image ); + + this.depthBuffer = source.depthBuffer; + this.stencilBuffer = source.stencilBuffer; + + this.resolveDepthBuffer = source.resolveDepthBuffer; + this.resolveStencilBuffer = source.resolveStencilBuffer; + + if ( source.depthTexture !== null ) this.depthTexture = source.depthTexture.clone(); + + this.samples = source.samples; + + return this; + + } + + dispose() { + + this.dispatchEvent( { type: 'dispose' } ); + + } + +} + +class WebGLRenderTarget extends RenderTarget { + + constructor( width = 1, height = 1, options = {} ) { + + super( width, height, options ); + + this.isWebGLRenderTarget = true; + + } + +} + +class DataArrayTexture extends Texture { + + constructor( data = null, width = 1, height = 1, depth = 1 ) { + + super( null ); + + this.isDataArrayTexture = true; + + this.image = { data, width, height, depth }; + + this.magFilter = NearestFilter; + this.minFilter = NearestFilter; + + this.wrapR = ClampToEdgeWrapping; + + this.generateMipmaps = false; + this.flipY = false; + this.unpackAlignment = 1; + + } + +} + +class WebGLArrayRenderTarget extends WebGLRenderTarget { + + constructor( width = 1, height = 1, depth = 1, options = {} ) { + + super( width, height, options ); + + this.isWebGLArrayRenderTarget = true; + + this.depth = depth; + + this.texture = new DataArrayTexture( null, width, height, depth ); + + this.texture.isRenderTargetTexture = true; + + } + +} + +class Data3DTexture extends Texture { + + constructor( data = null, width = 1, height = 1, depth = 1 ) { + + // We're going to add .setXXX() methods for setting properties later. + // Users can still set in DataTexture3D directly. + // + // const texture = new THREE.DataTexture3D( data, width, height, depth ); + // texture.anisotropy = 16; + // + // See #14839 + + super( null ); + + this.isData3DTexture = true; + + this.image = { data, width, height, depth }; + + this.magFilter = NearestFilter; + this.minFilter = NearestFilter; + + this.wrapR = ClampToEdgeWrapping; + + this.generateMipmaps = false; + this.flipY = false; + this.unpackAlignment = 1; + + } + +} + +class WebGL3DRenderTarget extends WebGLRenderTarget { + + constructor( width = 1, height = 1, depth = 1, options = {} ) { + + super( width, height, options ); + + this.isWebGL3DRenderTarget = true; + + this.depth = depth; + + this.texture = new Data3DTexture( null, width, height, depth ); + + this.texture.isRenderTargetTexture = true; + + } + +} + +class Quaternion { + + constructor( x = 0, y = 0, z = 0, w = 1 ) { + + this.isQuaternion = true; + + this._x = x; + this._y = y; + this._z = z; + this._w = w; + + } + + static slerpFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t ) { + + // fuzz-free, array-based Quaternion SLERP operation + + let x0 = src0[ srcOffset0 + 0 ], + y0 = src0[ srcOffset0 + 1 ], + z0 = src0[ srcOffset0 + 2 ], + w0 = src0[ srcOffset0 + 3 ]; + + const x1 = src1[ srcOffset1 + 0 ], + y1 = src1[ srcOffset1 + 1 ], + z1 = src1[ srcOffset1 + 2 ], + w1 = src1[ srcOffset1 + 3 ]; + + if ( t === 0 ) { + + dst[ dstOffset + 0 ] = x0; + dst[ dstOffset + 1 ] = y0; + dst[ dstOffset + 2 ] = z0; + dst[ dstOffset + 3 ] = w0; + return; + + } + + if ( t === 1 ) { + + dst[ dstOffset + 0 ] = x1; + dst[ dstOffset + 1 ] = y1; + dst[ dstOffset + 2 ] = z1; + dst[ dstOffset + 3 ] = w1; + return; + + } + + if ( w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1 ) { + + let s = 1 - t; + const cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1, + dir = ( cos >= 0 ? 1 : - 1 ), + sqrSin = 1 - cos * cos; + + // Skip the Slerp for tiny steps to avoid numeric problems: + if ( sqrSin > Number.EPSILON ) { + + const sin = Math.sqrt( sqrSin ), + len = Math.atan2( sin, cos * dir ); + + s = Math.sin( s * len ) / sin; + t = Math.sin( t * len ) / sin; + + } + + const tDir = t * dir; + + x0 = x0 * s + x1 * tDir; + y0 = y0 * s + y1 * tDir; + z0 = z0 * s + z1 * tDir; + w0 = w0 * s + w1 * tDir; + + // Normalize in case we just did a lerp: + if ( s === 1 - t ) { + + const f = 1 / Math.sqrt( x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0 ); + + x0 *= f; + y0 *= f; + z0 *= f; + w0 *= f; + + } + + } + + dst[ dstOffset ] = x0; + dst[ dstOffset + 1 ] = y0; + dst[ dstOffset + 2 ] = z0; + dst[ dstOffset + 3 ] = w0; + + } + + static multiplyQuaternionsFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1 ) { + + const x0 = src0[ srcOffset0 ]; + const y0 = src0[ srcOffset0 + 1 ]; + const z0 = src0[ srcOffset0 + 2 ]; + const w0 = src0[ srcOffset0 + 3 ]; + + const x1 = src1[ srcOffset1 ]; + const y1 = src1[ srcOffset1 + 1 ]; + const z1 = src1[ srcOffset1 + 2 ]; + const w1 = src1[ srcOffset1 + 3 ]; + + dst[ dstOffset ] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1; + dst[ dstOffset + 1 ] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1; + dst[ dstOffset + 2 ] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1; + dst[ dstOffset + 3 ] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1; + + return dst; + + } + + get x() { + + return this._x; + + } + + set x( value ) { + + this._x = value; + this._onChangeCallback(); + + } + + get y() { + + return this._y; + + } + + set y( value ) { + + this._y = value; + this._onChangeCallback(); + + } + + get z() { + + return this._z; + + } + + set z( value ) { + + this._z = value; + this._onChangeCallback(); + + } + + get w() { + + return this._w; + + } + + set w( value ) { + + this._w = value; + this._onChangeCallback(); + + } + + set( x, y, z, w ) { + + this._x = x; + this._y = y; + this._z = z; + this._w = w; + + this._onChangeCallback(); + + return this; + + } + + clone() { + + return new this.constructor( this._x, this._y, this._z, this._w ); + + } + + copy( quaternion ) { + + this._x = quaternion.x; + this._y = quaternion.y; + this._z = quaternion.z; + this._w = quaternion.w; + + this._onChangeCallback(); + + return this; + + } + + setFromEuler( euler, update = true ) { + + const x = euler._x, y = euler._y, z = euler._z, order = euler._order; + + // http://www.mathworks.com/matlabcentral/fileexchange/ + // 20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/ + // content/SpinCalc.m + + const cos = Math.cos; + const sin = Math.sin; + + const c1 = cos( x / 2 ); + const c2 = cos( y / 2 ); + const c3 = cos( z / 2 ); + + const s1 = sin( x / 2 ); + const s2 = sin( y / 2 ); + const s3 = sin( z / 2 ); + + switch ( order ) { + + case 'XYZ': + this._x = s1 * c2 * c3 + c1 * s2 * s3; + this._y = c1 * s2 * c3 - s1 * c2 * s3; + this._z = c1 * c2 * s3 + s1 * s2 * c3; + this._w = c1 * c2 * c3 - s1 * s2 * s3; + break; + + case 'YXZ': + this._x = s1 * c2 * c3 + c1 * s2 * s3; + this._y = c1 * s2 * c3 - s1 * c2 * s3; + this._z = c1 * c2 * s3 - s1 * s2 * c3; + this._w = c1 * c2 * c3 + s1 * s2 * s3; + break; + + case 'ZXY': + this._x = s1 * c2 * c3 - c1 * s2 * s3; + this._y = c1 * s2 * c3 + s1 * c2 * s3; + this._z = c1 * c2 * s3 + s1 * s2 * c3; + this._w = c1 * c2 * c3 - s1 * s2 * s3; + break; + + case 'ZYX': + this._x = s1 * c2 * c3 - c1 * s2 * s3; + this._y = c1 * s2 * c3 + s1 * c2 * s3; + this._z = c1 * c2 * s3 - s1 * s2 * c3; + this._w = c1 * c2 * c3 + s1 * s2 * s3; + break; + + case 'YZX': + this._x = s1 * c2 * c3 + c1 * s2 * s3; + this._y = c1 * s2 * c3 + s1 * c2 * s3; + this._z = c1 * c2 * s3 - s1 * s2 * c3; + this._w = c1 * c2 * c3 - s1 * s2 * s3; + break; + + case 'XZY': + this._x = s1 * c2 * c3 - c1 * s2 * s3; + this._y = c1 * s2 * c3 - s1 * c2 * s3; + this._z = c1 * c2 * s3 + s1 * s2 * c3; + this._w = c1 * c2 * c3 + s1 * s2 * s3; + break; + + default: + console.warn( 'THREE.Quaternion: .setFromEuler() encountered an unknown order: ' + order ); + + } + + if ( update === true ) this._onChangeCallback(); + + return this; + + } + + setFromAxisAngle( axis, angle ) { + + // http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm + + // assumes axis is normalized + + const halfAngle = angle / 2, s = Math.sin( halfAngle ); + + this._x = axis.x * s; + this._y = axis.y * s; + this._z = axis.z * s; + this._w = Math.cos( halfAngle ); + + this._onChangeCallback(); + + return this; + + } + + setFromRotationMatrix( m ) { + + // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm + + // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) + + const te = m.elements, + + m11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ], + m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ], + m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ], + + trace = m11 + m22 + m33; + + if ( trace > 0 ) { + + const s = 0.5 / Math.sqrt( trace + 1.0 ); + + this._w = 0.25 / s; + this._x = ( m32 - m23 ) * s; + this._y = ( m13 - m31 ) * s; + this._z = ( m21 - m12 ) * s; + + } else if ( m11 > m22 && m11 > m33 ) { + + const s = 2.0 * Math.sqrt( 1.0 + m11 - m22 - m33 ); + + this._w = ( m32 - m23 ) / s; + this._x = 0.25 * s; + this._y = ( m12 + m21 ) / s; + this._z = ( m13 + m31 ) / s; + + } else if ( m22 > m33 ) { + + const s = 2.0 * Math.sqrt( 1.0 + m22 - m11 - m33 ); + + this._w = ( m13 - m31 ) / s; + this._x = ( m12 + m21 ) / s; + this._y = 0.25 * s; + this._z = ( m23 + m32 ) / s; + + } else { + + const s = 2.0 * Math.sqrt( 1.0 + m33 - m11 - m22 ); + + this._w = ( m21 - m12 ) / s; + this._x = ( m13 + m31 ) / s; + this._y = ( m23 + m32 ) / s; + this._z = 0.25 * s; + + } + + this._onChangeCallback(); + + return this; + + } + + setFromUnitVectors( vFrom, vTo ) { + + // assumes direction vectors vFrom and vTo are normalized + + let r = vFrom.dot( vTo ) + 1; + + if ( r < Number.EPSILON ) { + + // vFrom and vTo point in opposite directions + + r = 0; + + if ( Math.abs( vFrom.x ) > Math.abs( vFrom.z ) ) { + + this._x = - vFrom.y; + this._y = vFrom.x; + this._z = 0; + this._w = r; + + } else { + + this._x = 0; + this._y = - vFrom.z; + this._z = vFrom.y; + this._w = r; + + } + + } else { + + // crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3 + + this._x = vFrom.y * vTo.z - vFrom.z * vTo.y; + this._y = vFrom.z * vTo.x - vFrom.x * vTo.z; + this._z = vFrom.x * vTo.y - vFrom.y * vTo.x; + this._w = r; + + } + + return this.normalize(); + + } + + angleTo( q ) { + + return 2 * Math.acos( Math.abs( clamp( this.dot( q ), - 1, 1 ) ) ); + + } + + rotateTowards( q, step ) { + + const angle = this.angleTo( q ); + + if ( angle === 0 ) return this; + + const t = Math.min( 1, step / angle ); + + this.slerp( q, t ); + + return this; + + } + + identity() { + + return this.set( 0, 0, 0, 1 ); + + } + + invert() { + + // quaternion is assumed to have unit length + + return this.conjugate(); + + } + + conjugate() { + + this._x *= - 1; + this._y *= - 1; + this._z *= - 1; + + this._onChangeCallback(); + + return this; + + } + + dot( v ) { + + return this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w; + + } + + lengthSq() { + + return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w; + + } + + length() { + + return Math.sqrt( this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w ); + + } + + normalize() { + + let l = this.length(); + + if ( l === 0 ) { + + this._x = 0; + this._y = 0; + this._z = 0; + this._w = 1; + + } else { + + l = 1 / l; + + this._x = this._x * l; + this._y = this._y * l; + this._z = this._z * l; + this._w = this._w * l; + + } + + this._onChangeCallback(); + + return this; + + } + + multiply( q ) { + + return this.multiplyQuaternions( this, q ); + + } + + premultiply( q ) { + + return this.multiplyQuaternions( q, this ); + + } + + multiplyQuaternions( a, b ) { + + // from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm + + const qax = a._x, qay = a._y, qaz = a._z, qaw = a._w; + const qbx = b._x, qby = b._y, qbz = b._z, qbw = b._w; + + this._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby; + this._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz; + this._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx; + this._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz; + + this._onChangeCallback(); + + return this; + + } + + slerp( qb, t ) { + + if ( t === 0 ) return this; + if ( t === 1 ) return this.copy( qb ); + + const x = this._x, y = this._y, z = this._z, w = this._w; + + // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/ + + let cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z; + + if ( cosHalfTheta < 0 ) { + + this._w = - qb._w; + this._x = - qb._x; + this._y = - qb._y; + this._z = - qb._z; + + cosHalfTheta = - cosHalfTheta; + + } else { + + this.copy( qb ); + + } + + if ( cosHalfTheta >= 1.0 ) { + + this._w = w; + this._x = x; + this._y = y; + this._z = z; + + return this; + + } + + const sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta; + + if ( sqrSinHalfTheta <= Number.EPSILON ) { + + const s = 1 - t; + this._w = s * w + t * this._w; + this._x = s * x + t * this._x; + this._y = s * y + t * this._y; + this._z = s * z + t * this._z; + + this.normalize(); // normalize calls _onChangeCallback() + + return this; + + } + + const sinHalfTheta = Math.sqrt( sqrSinHalfTheta ); + const halfTheta = Math.atan2( sinHalfTheta, cosHalfTheta ); + const ratioA = Math.sin( ( 1 - t ) * halfTheta ) / sinHalfTheta, + ratioB = Math.sin( t * halfTheta ) / sinHalfTheta; + + this._w = ( w * ratioA + this._w * ratioB ); + this._x = ( x * ratioA + this._x * ratioB ); + this._y = ( y * ratioA + this._y * ratioB ); + this._z = ( z * ratioA + this._z * ratioB ); + + this._onChangeCallback(); + + return this; + + } + + slerpQuaternions( qa, qb, t ) { + + return this.copy( qa ).slerp( qb, t ); + + } + + random() { + + // sets this quaternion to a uniform random unit quaternnion + + // Ken Shoemake + // Uniform random rotations + // D. Kirk, editor, Graphics Gems III, pages 124-132. Academic Press, New York, 1992. + + const theta1 = 2 * Math.PI * Math.random(); + const theta2 = 2 * Math.PI * Math.random(); + + const x0 = Math.random(); + const r1 = Math.sqrt( 1 - x0 ); + const r2 = Math.sqrt( x0 ); + + return this.set( + r1 * Math.sin( theta1 ), + r1 * Math.cos( theta1 ), + r2 * Math.sin( theta2 ), + r2 * Math.cos( theta2 ), + ); + + } + + equals( quaternion ) { + + return ( quaternion._x === this._x ) && ( quaternion._y === this._y ) && ( quaternion._z === this._z ) && ( quaternion._w === this._w ); + + } + + fromArray( array, offset = 0 ) { + + this._x = array[ offset ]; + this._y = array[ offset + 1 ]; + this._z = array[ offset + 2 ]; + this._w = array[ offset + 3 ]; + + this._onChangeCallback(); + + return this; + + } + + toArray( array = [], offset = 0 ) { + + array[ offset ] = this._x; + array[ offset + 1 ] = this._y; + array[ offset + 2 ] = this._z; + array[ offset + 3 ] = this._w; + + return array; + + } + + fromBufferAttribute( attribute, index ) { + + this._x = attribute.getX( index ); + this._y = attribute.getY( index ); + this._z = attribute.getZ( index ); + this._w = attribute.getW( index ); + + this._onChangeCallback(); + + return this; + + } + + toJSON() { + + return this.toArray(); + + } + + _onChange( callback ) { + + this._onChangeCallback = callback; + + return this; + + } + + _onChangeCallback() {} + + *[ Symbol.iterator ]() { + + yield this._x; + yield this._y; + yield this._z; + yield this._w; + + } + +} + +class Vector3 { + + constructor( x = 0, y = 0, z = 0 ) { + + Vector3.prototype.isVector3 = true; + + this.x = x; + this.y = y; + this.z = z; + + } + + set( x, y, z ) { + + if ( z === undefined ) z = this.z; // sprite.scale.set(x,y) + + this.x = x; + this.y = y; + this.z = z; + + return this; + + } + + setScalar( scalar ) { + + this.x = scalar; + this.y = scalar; + this.z = scalar; + + return this; + + } + + setX( x ) { + + this.x = x; + + return this; + + } + + setY( y ) { + + this.y = y; + + return this; + + } + + setZ( z ) { + + this.z = z; + + return this; + + } + + setComponent( index, value ) { + + switch ( index ) { + + case 0: this.x = value; break; + case 1: this.y = value; break; + case 2: this.z = value; break; + default: throw new Error( 'index is out of range: ' + index ); + + } + + return this; + + } + + getComponent( index ) { + + switch ( index ) { + + case 0: return this.x; + case 1: return this.y; + case 2: return this.z; + default: throw new Error( 'index is out of range: ' + index ); + + } + + } + + clone() { + + return new this.constructor( this.x, this.y, this.z ); + + } + + copy( v ) { + + this.x = v.x; + this.y = v.y; + this.z = v.z; + + return this; + + } + + add( v ) { + + this.x += v.x; + this.y += v.y; + this.z += v.z; + + return this; + + } + + addScalar( s ) { + + this.x += s; + this.y += s; + this.z += s; + + return this; + + } + + addVectors( a, b ) { + + this.x = a.x + b.x; + this.y = a.y + b.y; + this.z = a.z + b.z; + + return this; + + } + + addScaledVector( v, s ) { + + this.x += v.x * s; + this.y += v.y * s; + this.z += v.z * s; + + return this; + + } + + sub( v ) { + + this.x -= v.x; + this.y -= v.y; + this.z -= v.z; + + return this; + + } + + subScalar( s ) { + + this.x -= s; + this.y -= s; + this.z -= s; + + return this; + + } + + subVectors( a, b ) { + + this.x = a.x - b.x; + this.y = a.y - b.y; + this.z = a.z - b.z; + + return this; + + } + + multiply( v ) { + + this.x *= v.x; + this.y *= v.y; + this.z *= v.z; + + return this; + + } + + multiplyScalar( scalar ) { + + this.x *= scalar; + this.y *= scalar; + this.z *= scalar; + + return this; + + } + + multiplyVectors( a, b ) { + + this.x = a.x * b.x; + this.y = a.y * b.y; + this.z = a.z * b.z; + + return this; + + } + + applyEuler( euler ) { + + return this.applyQuaternion( _quaternion$4.setFromEuler( euler ) ); + + } + + applyAxisAngle( axis, angle ) { + + return this.applyQuaternion( _quaternion$4.setFromAxisAngle( axis, angle ) ); + + } + + applyMatrix3( m ) { + + const x = this.x, y = this.y, z = this.z; + const e = m.elements; + + this.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ] * z; + this.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ] * z; + this.z = e[ 2 ] * x + e[ 5 ] * y + e[ 8 ] * z; + + return this; + + } + + applyNormalMatrix( m ) { + + return this.applyMatrix3( m ).normalize(); + + } + + applyMatrix4( m ) { + + const x = this.x, y = this.y, z = this.z; + const e = m.elements; + + const w = 1 / ( e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] ); + + this.x = ( e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] ) * w; + this.y = ( e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] ) * w; + this.z = ( e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] ) * w; + + return this; + + } + + applyQuaternion( q ) { + + // quaternion q is assumed to have unit length + + const vx = this.x, vy = this.y, vz = this.z; + const qx = q.x, qy = q.y, qz = q.z, qw = q.w; + + // t = 2 * cross( q.xyz, v ); + const tx = 2 * ( qy * vz - qz * vy ); + const ty = 2 * ( qz * vx - qx * vz ); + const tz = 2 * ( qx * vy - qy * vx ); + + // v + q.w * t + cross( q.xyz, t ); + this.x = vx + qw * tx + qy * tz - qz * ty; + this.y = vy + qw * ty + qz * tx - qx * tz; + this.z = vz + qw * tz + qx * ty - qy * tx; + + return this; + + } + + project( camera ) { + + return this.applyMatrix4( camera.matrixWorldInverse ).applyMatrix4( camera.projectionMatrix ); + + } + + unproject( camera ) { + + return this.applyMatrix4( camera.projectionMatrixInverse ).applyMatrix4( camera.matrixWorld ); + + } + + transformDirection( m ) { + + // input: THREE.Matrix4 affine matrix + // vector interpreted as a direction + + const x = this.x, y = this.y, z = this.z; + const e = m.elements; + + this.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z; + this.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z; + this.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z; + + return this.normalize(); + + } + + divide( v ) { + + this.x /= v.x; + this.y /= v.y; + this.z /= v.z; + + return this; + + } + + divideScalar( scalar ) { + + return this.multiplyScalar( 1 / scalar ); + + } + + min( v ) { + + this.x = Math.min( this.x, v.x ); + this.y = Math.min( this.y, v.y ); + this.z = Math.min( this.z, v.z ); + + return this; + + } + + max( v ) { + + this.x = Math.max( this.x, v.x ); + this.y = Math.max( this.y, v.y ); + this.z = Math.max( this.z, v.z ); + + return this; + + } + + clamp( min, max ) { + + // assumes min < max, componentwise + + this.x = Math.max( min.x, Math.min( max.x, this.x ) ); + this.y = Math.max( min.y, Math.min( max.y, this.y ) ); + this.z = Math.max( min.z, Math.min( max.z, this.z ) ); + + return this; + + } + + clampScalar( minVal, maxVal ) { + + this.x = Math.max( minVal, Math.min( maxVal, this.x ) ); + this.y = Math.max( minVal, Math.min( maxVal, this.y ) ); + this.z = Math.max( minVal, Math.min( maxVal, this.z ) ); + + return this; + + } + + clampLength( min, max ) { + + const length = this.length(); + + return this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) ); + + } + + floor() { + + this.x = Math.floor( this.x ); + this.y = Math.floor( this.y ); + this.z = Math.floor( this.z ); + + return this; + + } + + ceil() { + + this.x = Math.ceil( this.x ); + this.y = Math.ceil( this.y ); + this.z = Math.ceil( this.z ); + + return this; + + } + + round() { + + this.x = Math.round( this.x ); + this.y = Math.round( this.y ); + this.z = Math.round( this.z ); + + return this; + + } + + roundToZero() { + + this.x = Math.trunc( this.x ); + this.y = Math.trunc( this.y ); + this.z = Math.trunc( this.z ); + + return this; + + } + + negate() { + + this.x = - this.x; + this.y = - this.y; + this.z = - this.z; + + return this; + + } + + dot( v ) { + + return this.x * v.x + this.y * v.y + this.z * v.z; + + } + + // TODO lengthSquared? + + lengthSq() { + + return this.x * this.x + this.y * this.y + this.z * this.z; + + } + + length() { + + return Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z ); + + } + + manhattanLength() { + + return Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z ); + + } + + normalize() { + + return this.divideScalar( this.length() || 1 ); + + } + + setLength( length ) { + + return this.normalize().multiplyScalar( length ); + + } + + lerp( v, alpha ) { + + this.x += ( v.x - this.x ) * alpha; + this.y += ( v.y - this.y ) * alpha; + this.z += ( v.z - this.z ) * alpha; + + return this; + + } + + lerpVectors( v1, v2, alpha ) { + + this.x = v1.x + ( v2.x - v1.x ) * alpha; + this.y = v1.y + ( v2.y - v1.y ) * alpha; + this.z = v1.z + ( v2.z - v1.z ) * alpha; + + return this; + + } + + cross( v ) { + + return this.crossVectors( this, v ); + + } + + crossVectors( a, b ) { + + const ax = a.x, ay = a.y, az = a.z; + const bx = b.x, by = b.y, bz = b.z; + + this.x = ay * bz - az * by; + this.y = az * bx - ax * bz; + this.z = ax * by - ay * bx; + + return this; + + } + + projectOnVector( v ) { + + const denominator = v.lengthSq(); + + if ( denominator === 0 ) return this.set( 0, 0, 0 ); + + const scalar = v.dot( this ) / denominator; + + return this.copy( v ).multiplyScalar( scalar ); + + } + + projectOnPlane( planeNormal ) { + + _vector$c.copy( this ).projectOnVector( planeNormal ); + + return this.sub( _vector$c ); + + } + + reflect( normal ) { + + // reflect incident vector off plane orthogonal to normal + // normal is assumed to have unit length + + return this.sub( _vector$c.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) ); + + } + + angleTo( v ) { + + const denominator = Math.sqrt( this.lengthSq() * v.lengthSq() ); + + if ( denominator === 0 ) return Math.PI / 2; + + const theta = this.dot( v ) / denominator; + + // clamp, to handle numerical problems + + return Math.acos( clamp( theta, - 1, 1 ) ); + + } + + distanceTo( v ) { + + return Math.sqrt( this.distanceToSquared( v ) ); + + } + + distanceToSquared( v ) { + + const dx = this.x - v.x, dy = this.y - v.y, dz = this.z - v.z; + + return dx * dx + dy * dy + dz * dz; + + } + + manhattanDistanceTo( v ) { + + return Math.abs( this.x - v.x ) + Math.abs( this.y - v.y ) + Math.abs( this.z - v.z ); + + } + + setFromSpherical( s ) { + + return this.setFromSphericalCoords( s.radius, s.phi, s.theta ); + + } + + setFromSphericalCoords( radius, phi, theta ) { + + const sinPhiRadius = Math.sin( phi ) * radius; + + this.x = sinPhiRadius * Math.sin( theta ); + this.y = Math.cos( phi ) * radius; + this.z = sinPhiRadius * Math.cos( theta ); + + return this; + + } + + setFromCylindrical( c ) { + + return this.setFromCylindricalCoords( c.radius, c.theta, c.y ); + + } + + setFromCylindricalCoords( radius, theta, y ) { + + this.x = radius * Math.sin( theta ); + this.y = y; + this.z = radius * Math.cos( theta ); + + return this; + + } + + setFromMatrixPosition( m ) { + + const e = m.elements; + + this.x = e[ 12 ]; + this.y = e[ 13 ]; + this.z = e[ 14 ]; + + return this; + + } + + setFromMatrixScale( m ) { + + const sx = this.setFromMatrixColumn( m, 0 ).length(); + const sy = this.setFromMatrixColumn( m, 1 ).length(); + const sz = this.setFromMatrixColumn( m, 2 ).length(); + + this.x = sx; + this.y = sy; + this.z = sz; + + return this; + + } + + setFromMatrixColumn( m, index ) { + + return this.fromArray( m.elements, index * 4 ); + + } + + setFromMatrix3Column( m, index ) { + + return this.fromArray( m.elements, index * 3 ); + + } + + setFromEuler( e ) { + + this.x = e._x; + this.y = e._y; + this.z = e._z; + + return this; + + } + + setFromColor( c ) { + + this.x = c.r; + this.y = c.g; + this.z = c.b; + + return this; + + } + + equals( v ) { + + return ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) ); + + } + + fromArray( array, offset = 0 ) { + + this.x = array[ offset ]; + this.y = array[ offset + 1 ]; + this.z = array[ offset + 2 ]; + + return this; + + } + + toArray( array = [], offset = 0 ) { + + array[ offset ] = this.x; + array[ offset + 1 ] = this.y; + array[ offset + 2 ] = this.z; + + return array; + + } + + fromBufferAttribute( attribute, index ) { + + this.x = attribute.getX( index ); + this.y = attribute.getY( index ); + this.z = attribute.getZ( index ); + + return this; + + } + + random() { + + this.x = Math.random(); + this.y = Math.random(); + this.z = Math.random(); + + return this; + + } + + randomDirection() { + + // https://mathworld.wolfram.com/SpherePointPicking.html + + const theta = Math.random() * Math.PI * 2; + const u = Math.random() * 2 - 1; + const c = Math.sqrt( 1 - u * u ); + + this.x = c * Math.cos( theta ); + this.y = u; + this.z = c * Math.sin( theta ); + + return this; + + } + + *[ Symbol.iterator ]() { + + yield this.x; + yield this.y; + yield this.z; + + } + +} + +const _vector$c = /*@__PURE__*/ new Vector3(); +const _quaternion$4 = /*@__PURE__*/ new Quaternion(); + +class Box3 { + + constructor( min = new Vector3( + Infinity, + Infinity, + Infinity ), max = new Vector3( - Infinity, - Infinity, - Infinity ) ) { + + this.isBox3 = true; + + this.min = min; + this.max = max; + + } + + set( min, max ) { + + this.min.copy( min ); + this.max.copy( max ); + + return this; + + } + + setFromArray( array ) { + + this.makeEmpty(); + + for ( let i = 0, il = array.length; i < il; i += 3 ) { + + this.expandByPoint( _vector$b.fromArray( array, i ) ); + + } + + return this; + + } + + setFromBufferAttribute( attribute ) { + + this.makeEmpty(); + + for ( let i = 0, il = attribute.count; i < il; i ++ ) { + + this.expandByPoint( _vector$b.fromBufferAttribute( attribute, i ) ); + + } + + return this; + + } + + setFromPoints( points ) { + + this.makeEmpty(); + + for ( let i = 0, il = points.length; i < il; i ++ ) { + + this.expandByPoint( points[ i ] ); + + } + + return this; + + } + + setFromCenterAndSize( center, size ) { + + const halfSize = _vector$b.copy( size ).multiplyScalar( 0.5 ); + + this.min.copy( center ).sub( halfSize ); + this.max.copy( center ).add( halfSize ); + + return this; + + } + + setFromObject( object, precise = false ) { + + this.makeEmpty(); + + return this.expandByObject( object, precise ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( box ) { + + this.min.copy( box.min ); + this.max.copy( box.max ); + + return this; + + } + + makeEmpty() { + + this.min.x = this.min.y = this.min.z = + Infinity; + this.max.x = this.max.y = this.max.z = - Infinity; + + return this; + + } + + isEmpty() { + + // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes + + return ( this.max.x < this.min.x ) || ( this.max.y < this.min.y ) || ( this.max.z < this.min.z ); + + } + + getCenter( target ) { + + return this.isEmpty() ? target.set( 0, 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 ); + + } + + getSize( target ) { + + return this.isEmpty() ? target.set( 0, 0, 0 ) : target.subVectors( this.max, this.min ); + + } + + expandByPoint( point ) { + + this.min.min( point ); + this.max.max( point ); + + return this; + + } + + expandByVector( vector ) { + + this.min.sub( vector ); + this.max.add( vector ); + + return this; + + } + + expandByScalar( scalar ) { + + this.min.addScalar( - scalar ); + this.max.addScalar( scalar ); + + return this; + + } + + expandByObject( object, precise = false ) { + + // Computes the world-axis-aligned bounding box of an object (including its children), + // accounting for both the object's, and children's, world transforms + + object.updateWorldMatrix( false, false ); + + const geometry = object.geometry; + + if ( geometry !== undefined ) { + + const positionAttribute = geometry.getAttribute( 'position' ); + + // precise AABB computation based on vertex data requires at least a position attribute. + // instancing isn't supported so far and uses the normal (conservative) code path. + + if ( precise === true && positionAttribute !== undefined && object.isInstancedMesh !== true ) { + + for ( let i = 0, l = positionAttribute.count; i < l; i ++ ) { + + if ( object.isMesh === true ) { + + object.getVertexPosition( i, _vector$b ); + + } else { + + _vector$b.fromBufferAttribute( positionAttribute, i ); + + } + + _vector$b.applyMatrix4( object.matrixWorld ); + this.expandByPoint( _vector$b ); + + } + + } else { + + if ( object.boundingBox !== undefined ) { + + // object-level bounding box + + if ( object.boundingBox === null ) { + + object.computeBoundingBox(); + + } + + _box$4.copy( object.boundingBox ); + + + } else { + + // geometry-level bounding box + + if ( geometry.boundingBox === null ) { + + geometry.computeBoundingBox(); + + } + + _box$4.copy( geometry.boundingBox ); + + } + + _box$4.applyMatrix4( object.matrixWorld ); + + this.union( _box$4 ); + + } + + } + + const children = object.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + this.expandByObject( children[ i ], precise ); + + } + + return this; + + } + + containsPoint( point ) { + + return point.x < this.min.x || point.x > this.max.x || + point.y < this.min.y || point.y > this.max.y || + point.z < this.min.z || point.z > this.max.z ? false : true; + + } + + containsBox( box ) { + + return this.min.x <= box.min.x && box.max.x <= this.max.x && + this.min.y <= box.min.y && box.max.y <= this.max.y && + this.min.z <= box.min.z && box.max.z <= this.max.z; + + } + + getParameter( point, target ) { + + // This can potentially have a divide by zero if the box + // has a size dimension of 0. + + return target.set( + ( point.x - this.min.x ) / ( this.max.x - this.min.x ), + ( point.y - this.min.y ) / ( this.max.y - this.min.y ), + ( point.z - this.min.z ) / ( this.max.z - this.min.z ) + ); + + } + + intersectsBox( box ) { + + // using 6 splitting planes to rule out intersections. + return box.max.x < this.min.x || box.min.x > this.max.x || + box.max.y < this.min.y || box.min.y > this.max.y || + box.max.z < this.min.z || box.min.z > this.max.z ? false : true; + + } + + intersectsSphere( sphere ) { + + // Find the point on the AABB closest to the sphere center. + this.clampPoint( sphere.center, _vector$b ); + + // If that point is inside the sphere, the AABB and sphere intersect. + return _vector$b.distanceToSquared( sphere.center ) <= ( sphere.radius * sphere.radius ); + + } + + intersectsPlane( plane ) { + + // We compute the minimum and maximum dot product values. If those values + // are on the same side (back or front) of the plane, then there is no intersection. + + let min, max; + + if ( plane.normal.x > 0 ) { + + min = plane.normal.x * this.min.x; + max = plane.normal.x * this.max.x; + + } else { + + min = plane.normal.x * this.max.x; + max = plane.normal.x * this.min.x; + + } + + if ( plane.normal.y > 0 ) { + + min += plane.normal.y * this.min.y; + max += plane.normal.y * this.max.y; + + } else { + + min += plane.normal.y * this.max.y; + max += plane.normal.y * this.min.y; + + } + + if ( plane.normal.z > 0 ) { + + min += plane.normal.z * this.min.z; + max += plane.normal.z * this.max.z; + + } else { + + min += plane.normal.z * this.max.z; + max += plane.normal.z * this.min.z; + + } + + return ( min <= - plane.constant && max >= - plane.constant ); + + } + + intersectsTriangle( triangle ) { + + if ( this.isEmpty() ) { + + return false; + + } + + // compute box center and extents + this.getCenter( _center ); + _extents.subVectors( this.max, _center ); + + // translate triangle to aabb origin + _v0$2.subVectors( triangle.a, _center ); + _v1$7.subVectors( triangle.b, _center ); + _v2$4.subVectors( triangle.c, _center ); + + // compute edge vectors for triangle + _f0.subVectors( _v1$7, _v0$2 ); + _f1.subVectors( _v2$4, _v1$7 ); + _f2.subVectors( _v0$2, _v2$4 ); + + // test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb + // make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation + // axis_ij = u_i x f_j (u0, u1, u2 = face normals of aabb = x,y,z axes vectors since aabb is axis aligned) + let axes = [ + 0, - _f0.z, _f0.y, 0, - _f1.z, _f1.y, 0, - _f2.z, _f2.y, + _f0.z, 0, - _f0.x, _f1.z, 0, - _f1.x, _f2.z, 0, - _f2.x, + - _f0.y, _f0.x, 0, - _f1.y, _f1.x, 0, - _f2.y, _f2.x, 0 + ]; + if ( ! satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents ) ) { + + return false; + + } + + // test 3 face normals from the aabb + axes = [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ]; + if ( ! satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents ) ) { + + return false; + + } + + // finally testing the face normal of the triangle + // use already existing triangle edge vectors here + _triangleNormal.crossVectors( _f0, _f1 ); + axes = [ _triangleNormal.x, _triangleNormal.y, _triangleNormal.z ]; + + return satForAxes( axes, _v0$2, _v1$7, _v2$4, _extents ); + + } + + clampPoint( point, target ) { + + return target.copy( point ).clamp( this.min, this.max ); + + } + + distanceToPoint( point ) { + + return this.clampPoint( point, _vector$b ).distanceTo( point ); + + } + + getBoundingSphere( target ) { + + if ( this.isEmpty() ) { + + target.makeEmpty(); + + } else { + + this.getCenter( target.center ); + + target.radius = this.getSize( _vector$b ).length() * 0.5; + + } + + return target; + + } + + intersect( box ) { + + this.min.max( box.min ); + this.max.min( box.max ); + + // ensure that if there is no overlap, the result is fully empty, not slightly empty with non-inf/+inf values that will cause subsequence intersects to erroneously return valid values. + if ( this.isEmpty() ) this.makeEmpty(); + + return this; + + } + + union( box ) { + + this.min.min( box.min ); + this.max.max( box.max ); + + return this; + + } + + applyMatrix4( matrix ) { + + // transform of empty box is an empty box. + if ( this.isEmpty() ) return this; + + // NOTE: I am using a binary pattern to specify all 2^3 combinations below + _points[ 0 ].set( this.min.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 000 + _points[ 1 ].set( this.min.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 001 + _points[ 2 ].set( this.min.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 010 + _points[ 3 ].set( this.min.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 011 + _points[ 4 ].set( this.max.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 100 + _points[ 5 ].set( this.max.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 101 + _points[ 6 ].set( this.max.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 110 + _points[ 7 ].set( this.max.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 111 + + this.setFromPoints( _points ); + + return this; + + } + + translate( offset ) { + + this.min.add( offset ); + this.max.add( offset ); + + return this; + + } + + equals( box ) { + + return box.min.equals( this.min ) && box.max.equals( this.max ); + + } + +} + +const _points = [ + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3(), + /*@__PURE__*/ new Vector3() +]; + +const _vector$b = /*@__PURE__*/ new Vector3(); + +const _box$4 = /*@__PURE__*/ new Box3(); + +// triangle centered vertices + +const _v0$2 = /*@__PURE__*/ new Vector3(); +const _v1$7 = /*@__PURE__*/ new Vector3(); +const _v2$4 = /*@__PURE__*/ new Vector3(); + +// triangle edge vectors + +const _f0 = /*@__PURE__*/ new Vector3(); +const _f1 = /*@__PURE__*/ new Vector3(); +const _f2 = /*@__PURE__*/ new Vector3(); + +const _center = /*@__PURE__*/ new Vector3(); +const _extents = /*@__PURE__*/ new Vector3(); +const _triangleNormal = /*@__PURE__*/ new Vector3(); +const _testAxis = /*@__PURE__*/ new Vector3(); + +function satForAxes( axes, v0, v1, v2, extents ) { + + for ( let i = 0, j = axes.length - 3; i <= j; i += 3 ) { + + _testAxis.fromArray( axes, i ); + // project the aabb onto the separating axis + const r = extents.x * Math.abs( _testAxis.x ) + extents.y * Math.abs( _testAxis.y ) + extents.z * Math.abs( _testAxis.z ); + // project all 3 vertices of the triangle onto the separating axis + const p0 = v0.dot( _testAxis ); + const p1 = v1.dot( _testAxis ); + const p2 = v2.dot( _testAxis ); + // actual test, basically see if either of the most extreme of the triangle points intersects r + if ( Math.max( - Math.max( p0, p1, p2 ), Math.min( p0, p1, p2 ) ) > r ) { + + // points of the projected triangle are outside the projected half-length of the aabb + // the axis is separating and we can exit + return false; + + } + + } + + return true; + +} + +const _box$3 = /*@__PURE__*/ new Box3(); +const _v1$6 = /*@__PURE__*/ new Vector3(); +const _v2$3 = /*@__PURE__*/ new Vector3(); + +class Sphere { + + constructor( center = new Vector3(), radius = - 1 ) { + + this.isSphere = true; + + this.center = center; + this.radius = radius; + + } + + set( center, radius ) { + + this.center.copy( center ); + this.radius = radius; + + return this; + + } + + setFromPoints( points, optionalCenter ) { + + const center = this.center; + + if ( optionalCenter !== undefined ) { + + center.copy( optionalCenter ); + + } else { + + _box$3.setFromPoints( points ).getCenter( center ); + + } + + let maxRadiusSq = 0; + + for ( let i = 0, il = points.length; i < il; i ++ ) { + + maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( points[ i ] ) ); + + } + + this.radius = Math.sqrt( maxRadiusSq ); + + return this; + + } + + copy( sphere ) { + + this.center.copy( sphere.center ); + this.radius = sphere.radius; + + return this; + + } + + isEmpty() { + + return ( this.radius < 0 ); + + } + + makeEmpty() { + + this.center.set( 0, 0, 0 ); + this.radius = - 1; + + return this; + + } + + containsPoint( point ) { + + return ( point.distanceToSquared( this.center ) <= ( this.radius * this.radius ) ); + + } + + distanceToPoint( point ) { + + return ( point.distanceTo( this.center ) - this.radius ); + + } + + intersectsSphere( sphere ) { + + const radiusSum = this.radius + sphere.radius; + + return sphere.center.distanceToSquared( this.center ) <= ( radiusSum * radiusSum ); + + } + + intersectsBox( box ) { + + return box.intersectsSphere( this ); + + } + + intersectsPlane( plane ) { + + return Math.abs( plane.distanceToPoint( this.center ) ) <= this.radius; + + } + + clampPoint( point, target ) { + + const deltaLengthSq = this.center.distanceToSquared( point ); + + target.copy( point ); + + if ( deltaLengthSq > ( this.radius * this.radius ) ) { + + target.sub( this.center ).normalize(); + target.multiplyScalar( this.radius ).add( this.center ); + + } + + return target; + + } + + getBoundingBox( target ) { + + if ( this.isEmpty() ) { + + // Empty sphere produces empty bounding box + target.makeEmpty(); + return target; + + } + + target.set( this.center, this.center ); + target.expandByScalar( this.radius ); + + return target; + + } + + applyMatrix4( matrix ) { + + this.center.applyMatrix4( matrix ); + this.radius = this.radius * matrix.getMaxScaleOnAxis(); + + return this; + + } + + translate( offset ) { + + this.center.add( offset ); + + return this; + + } + + expandByPoint( point ) { + + if ( this.isEmpty() ) { + + this.center.copy( point ); + + this.radius = 0; + + return this; + + } + + _v1$6.subVectors( point, this.center ); + + const lengthSq = _v1$6.lengthSq(); + + if ( lengthSq > ( this.radius * this.radius ) ) { + + // calculate the minimal sphere + + const length = Math.sqrt( lengthSq ); + + const delta = ( length - this.radius ) * 0.5; + + this.center.addScaledVector( _v1$6, delta / length ); + + this.radius += delta; + + } + + return this; + + } + + union( sphere ) { + + if ( sphere.isEmpty() ) { + + return this; + + } + + if ( this.isEmpty() ) { + + this.copy( sphere ); + + return this; + + } + + if ( this.center.equals( sphere.center ) === true ) { + + this.radius = Math.max( this.radius, sphere.radius ); + + } else { + + _v2$3.subVectors( sphere.center, this.center ).setLength( sphere.radius ); + + this.expandByPoint( _v1$6.copy( sphere.center ).add( _v2$3 ) ); + + this.expandByPoint( _v1$6.copy( sphere.center ).sub( _v2$3 ) ); + + } + + return this; + + } + + equals( sphere ) { + + return sphere.center.equals( this.center ) && ( sphere.radius === this.radius ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +const _vector$a = /*@__PURE__*/ new Vector3(); +const _segCenter = /*@__PURE__*/ new Vector3(); +const _segDir = /*@__PURE__*/ new Vector3(); +const _diff = /*@__PURE__*/ new Vector3(); + +const _edge1 = /*@__PURE__*/ new Vector3(); +const _edge2 = /*@__PURE__*/ new Vector3(); +const _normal$1 = /*@__PURE__*/ new Vector3(); + +class Ray { + + constructor( origin = new Vector3(), direction = new Vector3( 0, 0, - 1 ) ) { + + this.origin = origin; + this.direction = direction; + + } + + set( origin, direction ) { + + this.origin.copy( origin ); + this.direction.copy( direction ); + + return this; + + } + + copy( ray ) { + + this.origin.copy( ray.origin ); + this.direction.copy( ray.direction ); + + return this; + + } + + at( t, target ) { + + return target.copy( this.origin ).addScaledVector( this.direction, t ); + + } + + lookAt( v ) { + + this.direction.copy( v ).sub( this.origin ).normalize(); + + return this; + + } + + recast( t ) { + + this.origin.copy( this.at( t, _vector$a ) ); + + return this; + + } + + closestPointToPoint( point, target ) { + + target.subVectors( point, this.origin ); + + const directionDistance = target.dot( this.direction ); + + if ( directionDistance < 0 ) { + + return target.copy( this.origin ); + + } + + return target.copy( this.origin ).addScaledVector( this.direction, directionDistance ); + + } + + distanceToPoint( point ) { + + return Math.sqrt( this.distanceSqToPoint( point ) ); + + } + + distanceSqToPoint( point ) { + + const directionDistance = _vector$a.subVectors( point, this.origin ).dot( this.direction ); + + // point behind the ray + + if ( directionDistance < 0 ) { + + return this.origin.distanceToSquared( point ); + + } + + _vector$a.copy( this.origin ).addScaledVector( this.direction, directionDistance ); + + return _vector$a.distanceToSquared( point ); + + } + + distanceSqToSegment( v0, v1, optionalPointOnRay, optionalPointOnSegment ) { + + // from https://github.com/pmjoniak/GeometricTools/blob/master/GTEngine/Include/Mathematics/GteDistRaySegment.h + // It returns the min distance between the ray and the segment + // defined by v0 and v1 + // It can also set two optional targets : + // - The closest point on the ray + // - The closest point on the segment + + _segCenter.copy( v0 ).add( v1 ).multiplyScalar( 0.5 ); + _segDir.copy( v1 ).sub( v0 ).normalize(); + _diff.copy( this.origin ).sub( _segCenter ); + + const segExtent = v0.distanceTo( v1 ) * 0.5; + const a01 = - this.direction.dot( _segDir ); + const b0 = _diff.dot( this.direction ); + const b1 = - _diff.dot( _segDir ); + const c = _diff.lengthSq(); + const det = Math.abs( 1 - a01 * a01 ); + let s0, s1, sqrDist, extDet; + + if ( det > 0 ) { + + // The ray and segment are not parallel. + + s0 = a01 * b1 - b0; + s1 = a01 * b0 - b1; + extDet = segExtent * det; + + if ( s0 >= 0 ) { + + if ( s1 >= - extDet ) { + + if ( s1 <= extDet ) { + + // region 0 + // Minimum at interior points of ray and segment. + + const invDet = 1 / det; + s0 *= invDet; + s1 *= invDet; + sqrDist = s0 * ( s0 + a01 * s1 + 2 * b0 ) + s1 * ( a01 * s0 + s1 + 2 * b1 ) + c; + + } else { + + // region 1 + + s1 = segExtent; + s0 = Math.max( 0, - ( a01 * s1 + b0 ) ); + sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; + + } + + } else { + + // region 5 + + s1 = - segExtent; + s0 = Math.max( 0, - ( a01 * s1 + b0 ) ); + sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; + + } + + } else { + + if ( s1 <= - extDet ) { + + // region 4 + + s0 = Math.max( 0, - ( - a01 * segExtent + b0 ) ); + s1 = ( s0 > 0 ) ? - segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent ); + sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; + + } else if ( s1 <= extDet ) { + + // region 3 + + s0 = 0; + s1 = Math.min( Math.max( - segExtent, - b1 ), segExtent ); + sqrDist = s1 * ( s1 + 2 * b1 ) + c; + + } else { + + // region 2 + + s0 = Math.max( 0, - ( a01 * segExtent + b0 ) ); + s1 = ( s0 > 0 ) ? segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent ); + sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; + + } + + } + + } else { + + // Ray and segment are parallel. + + s1 = ( a01 > 0 ) ? - segExtent : segExtent; + s0 = Math.max( 0, - ( a01 * s1 + b0 ) ); + sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; + + } + + if ( optionalPointOnRay ) { + + optionalPointOnRay.copy( this.origin ).addScaledVector( this.direction, s0 ); + + } + + if ( optionalPointOnSegment ) { + + optionalPointOnSegment.copy( _segCenter ).addScaledVector( _segDir, s1 ); + + } + + return sqrDist; + + } + + intersectSphere( sphere, target ) { + + _vector$a.subVectors( sphere.center, this.origin ); + const tca = _vector$a.dot( this.direction ); + const d2 = _vector$a.dot( _vector$a ) - tca * tca; + const radius2 = sphere.radius * sphere.radius; + + if ( d2 > radius2 ) return null; + + const thc = Math.sqrt( radius2 - d2 ); + + // t0 = first intersect point - entrance on front of sphere + const t0 = tca - thc; + + // t1 = second intersect point - exit point on back of sphere + const t1 = tca + thc; + + // test to see if t1 is behind the ray - if so, return null + if ( t1 < 0 ) return null; + + // test to see if t0 is behind the ray: + // if it is, the ray is inside the sphere, so return the second exit point scaled by t1, + // in order to always return an intersect point that is in front of the ray. + if ( t0 < 0 ) return this.at( t1, target ); + + // else t0 is in front of the ray, so return the first collision point scaled by t0 + return this.at( t0, target ); + + } + + intersectsSphere( sphere ) { + + return this.distanceSqToPoint( sphere.center ) <= ( sphere.radius * sphere.radius ); + + } + + distanceToPlane( plane ) { + + const denominator = plane.normal.dot( this.direction ); + + if ( denominator === 0 ) { + + // line is coplanar, return origin + if ( plane.distanceToPoint( this.origin ) === 0 ) { + + return 0; + + } + + // Null is preferable to undefined since undefined means.... it is undefined + + return null; + + } + + const t = - ( this.origin.dot( plane.normal ) + plane.constant ) / denominator; + + // Return if the ray never intersects the plane + + return t >= 0 ? t : null; + + } + + intersectPlane( plane, target ) { + + const t = this.distanceToPlane( plane ); + + if ( t === null ) { + + return null; + + } + + return this.at( t, target ); + + } + + intersectsPlane( plane ) { + + // check if the ray lies on the plane first + + const distToPoint = plane.distanceToPoint( this.origin ); + + if ( distToPoint === 0 ) { + + return true; + + } + + const denominator = plane.normal.dot( this.direction ); + + if ( denominator * distToPoint < 0 ) { + + return true; + + } + + // ray origin is behind the plane (and is pointing behind it) + + return false; + + } + + intersectBox( box, target ) { + + let tmin, tmax, tymin, tymax, tzmin, tzmax; + + const invdirx = 1 / this.direction.x, + invdiry = 1 / this.direction.y, + invdirz = 1 / this.direction.z; + + const origin = this.origin; + + if ( invdirx >= 0 ) { + + tmin = ( box.min.x - origin.x ) * invdirx; + tmax = ( box.max.x - origin.x ) * invdirx; + + } else { + + tmin = ( box.max.x - origin.x ) * invdirx; + tmax = ( box.min.x - origin.x ) * invdirx; + + } + + if ( invdiry >= 0 ) { + + tymin = ( box.min.y - origin.y ) * invdiry; + tymax = ( box.max.y - origin.y ) * invdiry; + + } else { + + tymin = ( box.max.y - origin.y ) * invdiry; + tymax = ( box.min.y - origin.y ) * invdiry; + + } + + if ( ( tmin > tymax ) || ( tymin > tmax ) ) return null; + + if ( tymin > tmin || isNaN( tmin ) ) tmin = tymin; + + if ( tymax < tmax || isNaN( tmax ) ) tmax = tymax; + + if ( invdirz >= 0 ) { + + tzmin = ( box.min.z - origin.z ) * invdirz; + tzmax = ( box.max.z - origin.z ) * invdirz; + + } else { + + tzmin = ( box.max.z - origin.z ) * invdirz; + tzmax = ( box.min.z - origin.z ) * invdirz; + + } + + if ( ( tmin > tzmax ) || ( tzmin > tmax ) ) return null; + + if ( tzmin > tmin || tmin !== tmin ) tmin = tzmin; + + if ( tzmax < tmax || tmax !== tmax ) tmax = tzmax; + + //return point closest to the ray (positive side) + + if ( tmax < 0 ) return null; + + return this.at( tmin >= 0 ? tmin : tmax, target ); + + } + + intersectsBox( box ) { + + return this.intersectBox( box, _vector$a ) !== null; + + } + + intersectTriangle( a, b, c, backfaceCulling, target ) { + + // Compute the offset origin, edges, and normal. + + // from https://github.com/pmjoniak/GeometricTools/blob/master/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h + + _edge1.subVectors( b, a ); + _edge2.subVectors( c, a ); + _normal$1.crossVectors( _edge1, _edge2 ); + + // Solve Q + t*D = b1*E1 + b2*E2 (Q = kDiff, D = ray direction, + // E1 = kEdge1, E2 = kEdge2, N = Cross(E1,E2)) by + // |Dot(D,N)|*b1 = sign(Dot(D,N))*Dot(D,Cross(Q,E2)) + // |Dot(D,N)|*b2 = sign(Dot(D,N))*Dot(D,Cross(E1,Q)) + // |Dot(D,N)|*t = -sign(Dot(D,N))*Dot(Q,N) + let DdN = this.direction.dot( _normal$1 ); + let sign; + + if ( DdN > 0 ) { + + if ( backfaceCulling ) return null; + sign = 1; + + } else if ( DdN < 0 ) { + + sign = - 1; + DdN = - DdN; + + } else { + + return null; + + } + + _diff.subVectors( this.origin, a ); + const DdQxE2 = sign * this.direction.dot( _edge2.crossVectors( _diff, _edge2 ) ); + + // b1 < 0, no intersection + if ( DdQxE2 < 0 ) { + + return null; + + } + + const DdE1xQ = sign * this.direction.dot( _edge1.cross( _diff ) ); + + // b2 < 0, no intersection + if ( DdE1xQ < 0 ) { + + return null; + + } + + // b1+b2 > 1, no intersection + if ( DdQxE2 + DdE1xQ > DdN ) { + + return null; + + } + + // Line intersects triangle, check if ray does. + const QdN = - sign * _diff.dot( _normal$1 ); + + // t < 0, no intersection + if ( QdN < 0 ) { + + return null; + + } + + // Ray intersects triangle. + return this.at( QdN / DdN, target ); + + } + + applyMatrix4( matrix4 ) { + + this.origin.applyMatrix4( matrix4 ); + this.direction.transformDirection( matrix4 ); + + return this; + + } + + equals( ray ) { + + return ray.origin.equals( this.origin ) && ray.direction.equals( this.direction ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +class Matrix4 { + + constructor( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) { + + Matrix4.prototype.isMatrix4 = true; + + this.elements = [ + + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + + ]; + + if ( n11 !== undefined ) { + + this.set( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ); + + } + + } + + set( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) { + + const te = this.elements; + + te[ 0 ] = n11; te[ 4 ] = n12; te[ 8 ] = n13; te[ 12 ] = n14; + te[ 1 ] = n21; te[ 5 ] = n22; te[ 9 ] = n23; te[ 13 ] = n24; + te[ 2 ] = n31; te[ 6 ] = n32; te[ 10 ] = n33; te[ 14 ] = n34; + te[ 3 ] = n41; te[ 7 ] = n42; te[ 11 ] = n43; te[ 15 ] = n44; + + return this; + + } + + identity() { + + this.set( + + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + clone() { + + return new Matrix4().fromArray( this.elements ); + + } + + copy( m ) { + + const te = this.elements; + const me = m.elements; + + te[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ]; te[ 3 ] = me[ 3 ]; + te[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ]; te[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ]; + te[ 8 ] = me[ 8 ]; te[ 9 ] = me[ 9 ]; te[ 10 ] = me[ 10 ]; te[ 11 ] = me[ 11 ]; + te[ 12 ] = me[ 12 ]; te[ 13 ] = me[ 13 ]; te[ 14 ] = me[ 14 ]; te[ 15 ] = me[ 15 ]; + + return this; + + } + + copyPosition( m ) { + + const te = this.elements, me = m.elements; + + te[ 12 ] = me[ 12 ]; + te[ 13 ] = me[ 13 ]; + te[ 14 ] = me[ 14 ]; + + return this; + + } + + setFromMatrix3( m ) { + + const me = m.elements; + + this.set( + + me[ 0 ], me[ 3 ], me[ 6 ], 0, + me[ 1 ], me[ 4 ], me[ 7 ], 0, + me[ 2 ], me[ 5 ], me[ 8 ], 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + extractBasis( xAxis, yAxis, zAxis ) { + + xAxis.setFromMatrixColumn( this, 0 ); + yAxis.setFromMatrixColumn( this, 1 ); + zAxis.setFromMatrixColumn( this, 2 ); + + return this; + + } + + makeBasis( xAxis, yAxis, zAxis ) { + + this.set( + xAxis.x, yAxis.x, zAxis.x, 0, + xAxis.y, yAxis.y, zAxis.y, 0, + xAxis.z, yAxis.z, zAxis.z, 0, + 0, 0, 0, 1 + ); + + return this; + + } + + extractRotation( m ) { + + // this method does not support reflection matrices + + const te = this.elements; + const me = m.elements; + + const scaleX = 1 / _v1$5.setFromMatrixColumn( m, 0 ).length(); + const scaleY = 1 / _v1$5.setFromMatrixColumn( m, 1 ).length(); + const scaleZ = 1 / _v1$5.setFromMatrixColumn( m, 2 ).length(); + + te[ 0 ] = me[ 0 ] * scaleX; + te[ 1 ] = me[ 1 ] * scaleX; + te[ 2 ] = me[ 2 ] * scaleX; + te[ 3 ] = 0; + + te[ 4 ] = me[ 4 ] * scaleY; + te[ 5 ] = me[ 5 ] * scaleY; + te[ 6 ] = me[ 6 ] * scaleY; + te[ 7 ] = 0; + + te[ 8 ] = me[ 8 ] * scaleZ; + te[ 9 ] = me[ 9 ] * scaleZ; + te[ 10 ] = me[ 10 ] * scaleZ; + te[ 11 ] = 0; + + te[ 12 ] = 0; + te[ 13 ] = 0; + te[ 14 ] = 0; + te[ 15 ] = 1; + + return this; + + } + + makeRotationFromEuler( euler ) { + + const te = this.elements; + + const x = euler.x, y = euler.y, z = euler.z; + const a = Math.cos( x ), b = Math.sin( x ); + const c = Math.cos( y ), d = Math.sin( y ); + const e = Math.cos( z ), f = Math.sin( z ); + + if ( euler.order === 'XYZ' ) { + + const ae = a * e, af = a * f, be = b * e, bf = b * f; + + te[ 0 ] = c * e; + te[ 4 ] = - c * f; + te[ 8 ] = d; + + te[ 1 ] = af + be * d; + te[ 5 ] = ae - bf * d; + te[ 9 ] = - b * c; + + te[ 2 ] = bf - ae * d; + te[ 6 ] = be + af * d; + te[ 10 ] = a * c; + + } else if ( euler.order === 'YXZ' ) { + + const ce = c * e, cf = c * f, de = d * e, df = d * f; + + te[ 0 ] = ce + df * b; + te[ 4 ] = de * b - cf; + te[ 8 ] = a * d; + + te[ 1 ] = a * f; + te[ 5 ] = a * e; + te[ 9 ] = - b; + + te[ 2 ] = cf * b - de; + te[ 6 ] = df + ce * b; + te[ 10 ] = a * c; + + } else if ( euler.order === 'ZXY' ) { + + const ce = c * e, cf = c * f, de = d * e, df = d * f; + + te[ 0 ] = ce - df * b; + te[ 4 ] = - a * f; + te[ 8 ] = de + cf * b; + + te[ 1 ] = cf + de * b; + te[ 5 ] = a * e; + te[ 9 ] = df - ce * b; + + te[ 2 ] = - a * d; + te[ 6 ] = b; + te[ 10 ] = a * c; + + } else if ( euler.order === 'ZYX' ) { + + const ae = a * e, af = a * f, be = b * e, bf = b * f; + + te[ 0 ] = c * e; + te[ 4 ] = be * d - af; + te[ 8 ] = ae * d + bf; + + te[ 1 ] = c * f; + te[ 5 ] = bf * d + ae; + te[ 9 ] = af * d - be; + + te[ 2 ] = - d; + te[ 6 ] = b * c; + te[ 10 ] = a * c; + + } else if ( euler.order === 'YZX' ) { + + const ac = a * c, ad = a * d, bc = b * c, bd = b * d; + + te[ 0 ] = c * e; + te[ 4 ] = bd - ac * f; + te[ 8 ] = bc * f + ad; + + te[ 1 ] = f; + te[ 5 ] = a * e; + te[ 9 ] = - b * e; + + te[ 2 ] = - d * e; + te[ 6 ] = ad * f + bc; + te[ 10 ] = ac - bd * f; + + } else if ( euler.order === 'XZY' ) { + + const ac = a * c, ad = a * d, bc = b * c, bd = b * d; + + te[ 0 ] = c * e; + te[ 4 ] = - f; + te[ 8 ] = d * e; + + te[ 1 ] = ac * f + bd; + te[ 5 ] = a * e; + te[ 9 ] = ad * f - bc; + + te[ 2 ] = bc * f - ad; + te[ 6 ] = b * e; + te[ 10 ] = bd * f + ac; + + } + + // bottom row + te[ 3 ] = 0; + te[ 7 ] = 0; + te[ 11 ] = 0; + + // last column + te[ 12 ] = 0; + te[ 13 ] = 0; + te[ 14 ] = 0; + te[ 15 ] = 1; + + return this; + + } + + makeRotationFromQuaternion( q ) { + + return this.compose( _zero, q, _one ); + + } + + lookAt( eye, target, up ) { + + const te = this.elements; + + _z.subVectors( eye, target ); + + if ( _z.lengthSq() === 0 ) { + + // eye and target are in the same position + + _z.z = 1; + + } + + _z.normalize(); + _x.crossVectors( up, _z ); + + if ( _x.lengthSq() === 0 ) { + + // up and z are parallel + + if ( Math.abs( up.z ) === 1 ) { + + _z.x += 0.0001; + + } else { + + _z.z += 0.0001; + + } + + _z.normalize(); + _x.crossVectors( up, _z ); + + } + + _x.normalize(); + _y.crossVectors( _z, _x ); + + te[ 0 ] = _x.x; te[ 4 ] = _y.x; te[ 8 ] = _z.x; + te[ 1 ] = _x.y; te[ 5 ] = _y.y; te[ 9 ] = _z.y; + te[ 2 ] = _x.z; te[ 6 ] = _y.z; te[ 10 ] = _z.z; + + return this; + + } + + multiply( m ) { + + return this.multiplyMatrices( this, m ); + + } + + premultiply( m ) { + + return this.multiplyMatrices( m, this ); + + } + + multiplyMatrices( a, b ) { + + const ae = a.elements; + const be = b.elements; + const te = this.elements; + + const a11 = ae[ 0 ], a12 = ae[ 4 ], a13 = ae[ 8 ], a14 = ae[ 12 ]; + const a21 = ae[ 1 ], a22 = ae[ 5 ], a23 = ae[ 9 ], a24 = ae[ 13 ]; + const a31 = ae[ 2 ], a32 = ae[ 6 ], a33 = ae[ 10 ], a34 = ae[ 14 ]; + const a41 = ae[ 3 ], a42 = ae[ 7 ], a43 = ae[ 11 ], a44 = ae[ 15 ]; + + const b11 = be[ 0 ], b12 = be[ 4 ], b13 = be[ 8 ], b14 = be[ 12 ]; + const b21 = be[ 1 ], b22 = be[ 5 ], b23 = be[ 9 ], b24 = be[ 13 ]; + const b31 = be[ 2 ], b32 = be[ 6 ], b33 = be[ 10 ], b34 = be[ 14 ]; + const b41 = be[ 3 ], b42 = be[ 7 ], b43 = be[ 11 ], b44 = be[ 15 ]; + + te[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41; + te[ 4 ] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42; + te[ 8 ] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43; + te[ 12 ] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44; + + te[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41; + te[ 5 ] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42; + te[ 9 ] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43; + te[ 13 ] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44; + + te[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41; + te[ 6 ] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42; + te[ 10 ] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43; + te[ 14 ] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44; + + te[ 3 ] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41; + te[ 7 ] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42; + te[ 11 ] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43; + te[ 15 ] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44; + + return this; + + } + + multiplyScalar( s ) { + + const te = this.elements; + + te[ 0 ] *= s; te[ 4 ] *= s; te[ 8 ] *= s; te[ 12 ] *= s; + te[ 1 ] *= s; te[ 5 ] *= s; te[ 9 ] *= s; te[ 13 ] *= s; + te[ 2 ] *= s; te[ 6 ] *= s; te[ 10 ] *= s; te[ 14 ] *= s; + te[ 3 ] *= s; te[ 7 ] *= s; te[ 11 ] *= s; te[ 15 ] *= s; + + return this; + + } + + determinant() { + + const te = this.elements; + + const n11 = te[ 0 ], n12 = te[ 4 ], n13 = te[ 8 ], n14 = te[ 12 ]; + const n21 = te[ 1 ], n22 = te[ 5 ], n23 = te[ 9 ], n24 = te[ 13 ]; + const n31 = te[ 2 ], n32 = te[ 6 ], n33 = te[ 10 ], n34 = te[ 14 ]; + const n41 = te[ 3 ], n42 = te[ 7 ], n43 = te[ 11 ], n44 = te[ 15 ]; + + //TODO: make this more efficient + //( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm ) + + return ( + n41 * ( + + n14 * n23 * n32 + - n13 * n24 * n32 + - n14 * n22 * n33 + + n12 * n24 * n33 + + n13 * n22 * n34 + - n12 * n23 * n34 + ) + + n42 * ( + + n11 * n23 * n34 + - n11 * n24 * n33 + + n14 * n21 * n33 + - n13 * n21 * n34 + + n13 * n24 * n31 + - n14 * n23 * n31 + ) + + n43 * ( + + n11 * n24 * n32 + - n11 * n22 * n34 + - n14 * n21 * n32 + + n12 * n21 * n34 + + n14 * n22 * n31 + - n12 * n24 * n31 + ) + + n44 * ( + - n13 * n22 * n31 + - n11 * n23 * n32 + + n11 * n22 * n33 + + n13 * n21 * n32 + - n12 * n21 * n33 + + n12 * n23 * n31 + ) + + ); + + } + + transpose() { + + const te = this.elements; + let tmp; + + tmp = te[ 1 ]; te[ 1 ] = te[ 4 ]; te[ 4 ] = tmp; + tmp = te[ 2 ]; te[ 2 ] = te[ 8 ]; te[ 8 ] = tmp; + tmp = te[ 6 ]; te[ 6 ] = te[ 9 ]; te[ 9 ] = tmp; + + tmp = te[ 3 ]; te[ 3 ] = te[ 12 ]; te[ 12 ] = tmp; + tmp = te[ 7 ]; te[ 7 ] = te[ 13 ]; te[ 13 ] = tmp; + tmp = te[ 11 ]; te[ 11 ] = te[ 14 ]; te[ 14 ] = tmp; + + return this; + + } + + setPosition( x, y, z ) { + + const te = this.elements; + + if ( x.isVector3 ) { + + te[ 12 ] = x.x; + te[ 13 ] = x.y; + te[ 14 ] = x.z; + + } else { + + te[ 12 ] = x; + te[ 13 ] = y; + te[ 14 ] = z; + + } + + return this; + + } + + invert() { + + // based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm + const te = this.elements, + + n11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ], n41 = te[ 3 ], + n12 = te[ 4 ], n22 = te[ 5 ], n32 = te[ 6 ], n42 = te[ 7 ], + n13 = te[ 8 ], n23 = te[ 9 ], n33 = te[ 10 ], n43 = te[ 11 ], + n14 = te[ 12 ], n24 = te[ 13 ], n34 = te[ 14 ], n44 = te[ 15 ], + + t11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44, + t12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44, + t13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44, + t14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34; + + const det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14; + + if ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); + + const detInv = 1 / det; + + te[ 0 ] = t11 * detInv; + te[ 1 ] = ( n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44 ) * detInv; + te[ 2 ] = ( n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44 ) * detInv; + te[ 3 ] = ( n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43 ) * detInv; + + te[ 4 ] = t12 * detInv; + te[ 5 ] = ( n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44 ) * detInv; + te[ 6 ] = ( n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44 ) * detInv; + te[ 7 ] = ( n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43 ) * detInv; + + te[ 8 ] = t13 * detInv; + te[ 9 ] = ( n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44 ) * detInv; + te[ 10 ] = ( n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44 ) * detInv; + te[ 11 ] = ( n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43 ) * detInv; + + te[ 12 ] = t14 * detInv; + te[ 13 ] = ( n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34 ) * detInv; + te[ 14 ] = ( n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34 ) * detInv; + te[ 15 ] = ( n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33 ) * detInv; + + return this; + + } + + scale( v ) { + + const te = this.elements; + const x = v.x, y = v.y, z = v.z; + + te[ 0 ] *= x; te[ 4 ] *= y; te[ 8 ] *= z; + te[ 1 ] *= x; te[ 5 ] *= y; te[ 9 ] *= z; + te[ 2 ] *= x; te[ 6 ] *= y; te[ 10 ] *= z; + te[ 3 ] *= x; te[ 7 ] *= y; te[ 11 ] *= z; + + return this; + + } + + getMaxScaleOnAxis() { + + const te = this.elements; + + const scaleXSq = te[ 0 ] * te[ 0 ] + te[ 1 ] * te[ 1 ] + te[ 2 ] * te[ 2 ]; + const scaleYSq = te[ 4 ] * te[ 4 ] + te[ 5 ] * te[ 5 ] + te[ 6 ] * te[ 6 ]; + const scaleZSq = te[ 8 ] * te[ 8 ] + te[ 9 ] * te[ 9 ] + te[ 10 ] * te[ 10 ]; + + return Math.sqrt( Math.max( scaleXSq, scaleYSq, scaleZSq ) ); + + } + + makeTranslation( x, y, z ) { + + if ( x.isVector3 ) { + + this.set( + + 1, 0, 0, x.x, + 0, 1, 0, x.y, + 0, 0, 1, x.z, + 0, 0, 0, 1 + + ); + + } else { + + this.set( + + 1, 0, 0, x, + 0, 1, 0, y, + 0, 0, 1, z, + 0, 0, 0, 1 + + ); + + } + + return this; + + } + + makeRotationX( theta ) { + + const c = Math.cos( theta ), s = Math.sin( theta ); + + this.set( + + 1, 0, 0, 0, + 0, c, - s, 0, + 0, s, c, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + makeRotationY( theta ) { + + const c = Math.cos( theta ), s = Math.sin( theta ); + + this.set( + + c, 0, s, 0, + 0, 1, 0, 0, + - s, 0, c, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + makeRotationZ( theta ) { + + const c = Math.cos( theta ), s = Math.sin( theta ); + + this.set( + + c, - s, 0, 0, + s, c, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + makeRotationAxis( axis, angle ) { + + // Based on http://www.gamedev.net/reference/articles/article1199.asp + + const c = Math.cos( angle ); + const s = Math.sin( angle ); + const t = 1 - c; + const x = axis.x, y = axis.y, z = axis.z; + const tx = t * x, ty = t * y; + + this.set( + + tx * x + c, tx * y - s * z, tx * z + s * y, 0, + tx * y + s * z, ty * y + c, ty * z - s * x, 0, + tx * z - s * y, ty * z + s * x, t * z * z + c, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + makeScale( x, y, z ) { + + this.set( + + x, 0, 0, 0, + 0, y, 0, 0, + 0, 0, z, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + makeShear( xy, xz, yx, yz, zx, zy ) { + + this.set( + + 1, yx, zx, 0, + xy, 1, zy, 0, + xz, yz, 1, 0, + 0, 0, 0, 1 + + ); + + return this; + + } + + compose( position, quaternion, scale ) { + + const te = this.elements; + + const x = quaternion._x, y = quaternion._y, z = quaternion._z, w = quaternion._w; + const x2 = x + x, y2 = y + y, z2 = z + z; + const xx = x * x2, xy = x * y2, xz = x * z2; + const yy = y * y2, yz = y * z2, zz = z * z2; + const wx = w * x2, wy = w * y2, wz = w * z2; + + const sx = scale.x, sy = scale.y, sz = scale.z; + + te[ 0 ] = ( 1 - ( yy + zz ) ) * sx; + te[ 1 ] = ( xy + wz ) * sx; + te[ 2 ] = ( xz - wy ) * sx; + te[ 3 ] = 0; + + te[ 4 ] = ( xy - wz ) * sy; + te[ 5 ] = ( 1 - ( xx + zz ) ) * sy; + te[ 6 ] = ( yz + wx ) * sy; + te[ 7 ] = 0; + + te[ 8 ] = ( xz + wy ) * sz; + te[ 9 ] = ( yz - wx ) * sz; + te[ 10 ] = ( 1 - ( xx + yy ) ) * sz; + te[ 11 ] = 0; + + te[ 12 ] = position.x; + te[ 13 ] = position.y; + te[ 14 ] = position.z; + te[ 15 ] = 1; + + return this; + + } + + decompose( position, quaternion, scale ) { + + const te = this.elements; + + let sx = _v1$5.set( te[ 0 ], te[ 1 ], te[ 2 ] ).length(); + const sy = _v1$5.set( te[ 4 ], te[ 5 ], te[ 6 ] ).length(); + const sz = _v1$5.set( te[ 8 ], te[ 9 ], te[ 10 ] ).length(); + + // if determine is negative, we need to invert one scale + const det = this.determinant(); + if ( det < 0 ) sx = - sx; + + position.x = te[ 12 ]; + position.y = te[ 13 ]; + position.z = te[ 14 ]; + + // scale the rotation part + _m1$4.copy( this ); + + const invSX = 1 / sx; + const invSY = 1 / sy; + const invSZ = 1 / sz; + + _m1$4.elements[ 0 ] *= invSX; + _m1$4.elements[ 1 ] *= invSX; + _m1$4.elements[ 2 ] *= invSX; + + _m1$4.elements[ 4 ] *= invSY; + _m1$4.elements[ 5 ] *= invSY; + _m1$4.elements[ 6 ] *= invSY; + + _m1$4.elements[ 8 ] *= invSZ; + _m1$4.elements[ 9 ] *= invSZ; + _m1$4.elements[ 10 ] *= invSZ; + + quaternion.setFromRotationMatrix( _m1$4 ); + + scale.x = sx; + scale.y = sy; + scale.z = sz; + + return this; + + } + + makePerspective( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem ) { + + const te = this.elements; + const x = 2 * near / ( right - left ); + const y = 2 * near / ( top - bottom ); + + const a = ( right + left ) / ( right - left ); + const b = ( top + bottom ) / ( top - bottom ); + + let c, d; + + if ( coordinateSystem === WebGLCoordinateSystem ) { + + c = - ( far + near ) / ( far - near ); + d = ( - 2 * far * near ) / ( far - near ); + + } else if ( coordinateSystem === WebGPUCoordinateSystem ) { + + c = - far / ( far - near ); + d = ( - far * near ) / ( far - near ); + + } else { + + throw new Error( 'THREE.Matrix4.makePerspective(): Invalid coordinate system: ' + coordinateSystem ); + + } + + te[ 0 ] = x; te[ 4 ] = 0; te[ 8 ] = a; te[ 12 ] = 0; + te[ 1 ] = 0; te[ 5 ] = y; te[ 9 ] = b; te[ 13 ] = 0; + te[ 2 ] = 0; te[ 6 ] = 0; te[ 10 ] = c; te[ 14 ] = d; + te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = - 1; te[ 15 ] = 0; + + return this; + + } + + makeOrthographic( left, right, top, bottom, near, far, coordinateSystem = WebGLCoordinateSystem ) { + + const te = this.elements; + const w = 1.0 / ( right - left ); + const h = 1.0 / ( top - bottom ); + const p = 1.0 / ( far - near ); + + const x = ( right + left ) * w; + const y = ( top + bottom ) * h; + + let z, zInv; + + if ( coordinateSystem === WebGLCoordinateSystem ) { + + z = ( far + near ) * p; + zInv = - 2 * p; + + } else if ( coordinateSystem === WebGPUCoordinateSystem ) { + + z = near * p; + zInv = - 1 * p; + + } else { + + throw new Error( 'THREE.Matrix4.makeOrthographic(): Invalid coordinate system: ' + coordinateSystem ); + + } + + te[ 0 ] = 2 * w; te[ 4 ] = 0; te[ 8 ] = 0; te[ 12 ] = - x; + te[ 1 ] = 0; te[ 5 ] = 2 * h; te[ 9 ] = 0; te[ 13 ] = - y; + te[ 2 ] = 0; te[ 6 ] = 0; te[ 10 ] = zInv; te[ 14 ] = - z; + te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = 0; te[ 15 ] = 1; + + return this; + + } + + equals( matrix ) { + + const te = this.elements; + const me = matrix.elements; + + for ( let i = 0; i < 16; i ++ ) { + + if ( te[ i ] !== me[ i ] ) return false; + + } + + return true; + + } + + fromArray( array, offset = 0 ) { + + for ( let i = 0; i < 16; i ++ ) { + + this.elements[ i ] = array[ i + offset ]; + + } + + return this; + + } + + toArray( array = [], offset = 0 ) { + + const te = this.elements; + + array[ offset ] = te[ 0 ]; + array[ offset + 1 ] = te[ 1 ]; + array[ offset + 2 ] = te[ 2 ]; + array[ offset + 3 ] = te[ 3 ]; + + array[ offset + 4 ] = te[ 4 ]; + array[ offset + 5 ] = te[ 5 ]; + array[ offset + 6 ] = te[ 6 ]; + array[ offset + 7 ] = te[ 7 ]; + + array[ offset + 8 ] = te[ 8 ]; + array[ offset + 9 ] = te[ 9 ]; + array[ offset + 10 ] = te[ 10 ]; + array[ offset + 11 ] = te[ 11 ]; + + array[ offset + 12 ] = te[ 12 ]; + array[ offset + 13 ] = te[ 13 ]; + array[ offset + 14 ] = te[ 14 ]; + array[ offset + 15 ] = te[ 15 ]; + + return array; + + } + +} + +const _v1$5 = /*@__PURE__*/ new Vector3(); +const _m1$4 = /*@__PURE__*/ new Matrix4(); +const _zero = /*@__PURE__*/ new Vector3( 0, 0, 0 ); +const _one = /*@__PURE__*/ new Vector3( 1, 1, 1 ); +const _x = /*@__PURE__*/ new Vector3(); +const _y = /*@__PURE__*/ new Vector3(); +const _z = /*@__PURE__*/ new Vector3(); + +const _matrix$2 = /*@__PURE__*/ new Matrix4(); +const _quaternion$3 = /*@__PURE__*/ new Quaternion(); + +class Euler { + + constructor( x = 0, y = 0, z = 0, order = Euler.DEFAULT_ORDER ) { + + this.isEuler = true; + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + } + + get x() { + + return this._x; + + } + + set x( value ) { + + this._x = value; + this._onChangeCallback(); + + } + + get y() { + + return this._y; + + } + + set y( value ) { + + this._y = value; + this._onChangeCallback(); + + } + + get z() { + + return this._z; + + } + + set z( value ) { + + this._z = value; + this._onChangeCallback(); + + } + + get order() { + + return this._order; + + } + + set order( value ) { + + this._order = value; + this._onChangeCallback(); + + } + + set( x, y, z, order = this._order ) { + + this._x = x; + this._y = y; + this._z = z; + this._order = order; + + this._onChangeCallback(); + + return this; + + } + + clone() { + + return new this.constructor( this._x, this._y, this._z, this._order ); + + } + + copy( euler ) { + + this._x = euler._x; + this._y = euler._y; + this._z = euler._z; + this._order = euler._order; + + this._onChangeCallback(); + + return this; + + } + + setFromRotationMatrix( m, order = this._order, update = true ) { + + // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) + + const te = m.elements; + const m11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ]; + const m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ]; + const m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ]; + + switch ( order ) { + + case 'XYZ': + + this._y = Math.asin( clamp( m13, - 1, 1 ) ); + + if ( Math.abs( m13 ) < 0.9999999 ) { + + this._x = Math.atan2( - m23, m33 ); + this._z = Math.atan2( - m12, m11 ); + + } else { + + this._x = Math.atan2( m32, m22 ); + this._z = 0; + + } + + break; + + case 'YXZ': + + this._x = Math.asin( - clamp( m23, - 1, 1 ) ); + + if ( Math.abs( m23 ) < 0.9999999 ) { + + this._y = Math.atan2( m13, m33 ); + this._z = Math.atan2( m21, m22 ); + + } else { + + this._y = Math.atan2( - m31, m11 ); + this._z = 0; + + } + + break; + + case 'ZXY': + + this._x = Math.asin( clamp( m32, - 1, 1 ) ); + + if ( Math.abs( m32 ) < 0.9999999 ) { + + this._y = Math.atan2( - m31, m33 ); + this._z = Math.atan2( - m12, m22 ); + + } else { + + this._y = 0; + this._z = Math.atan2( m21, m11 ); + + } + + break; + + case 'ZYX': + + this._y = Math.asin( - clamp( m31, - 1, 1 ) ); + + if ( Math.abs( m31 ) < 0.9999999 ) { + + this._x = Math.atan2( m32, m33 ); + this._z = Math.atan2( m21, m11 ); + + } else { + + this._x = 0; + this._z = Math.atan2( - m12, m22 ); + + } + + break; + + case 'YZX': + + this._z = Math.asin( clamp( m21, - 1, 1 ) ); + + if ( Math.abs( m21 ) < 0.9999999 ) { + + this._x = Math.atan2( - m23, m22 ); + this._y = Math.atan2( - m31, m11 ); + + } else { + + this._x = 0; + this._y = Math.atan2( m13, m33 ); + + } + + break; + + case 'XZY': + + this._z = Math.asin( - clamp( m12, - 1, 1 ) ); + + if ( Math.abs( m12 ) < 0.9999999 ) { + + this._x = Math.atan2( m32, m22 ); + this._y = Math.atan2( m13, m11 ); + + } else { + + this._x = Math.atan2( - m23, m33 ); + this._y = 0; + + } + + break; + + default: + + console.warn( 'THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ' + order ); + + } + + this._order = order; + + if ( update === true ) this._onChangeCallback(); + + return this; + + } + + setFromQuaternion( q, order, update ) { + + _matrix$2.makeRotationFromQuaternion( q ); + + return this.setFromRotationMatrix( _matrix$2, order, update ); + + } + + setFromVector3( v, order = this._order ) { + + return this.set( v.x, v.y, v.z, order ); + + } + + reorder( newOrder ) { + + // WARNING: this discards revolution information -bhouston + + _quaternion$3.setFromEuler( this ); + + return this.setFromQuaternion( _quaternion$3, newOrder ); + + } + + equals( euler ) { + + return ( euler._x === this._x ) && ( euler._y === this._y ) && ( euler._z === this._z ) && ( euler._order === this._order ); + + } + + fromArray( array ) { + + this._x = array[ 0 ]; + this._y = array[ 1 ]; + this._z = array[ 2 ]; + if ( array[ 3 ] !== undefined ) this._order = array[ 3 ]; + + this._onChangeCallback(); + + return this; + + } + + toArray( array = [], offset = 0 ) { + + array[ offset ] = this._x; + array[ offset + 1 ] = this._y; + array[ offset + 2 ] = this._z; + array[ offset + 3 ] = this._order; + + return array; + + } + + _onChange( callback ) { + + this._onChangeCallback = callback; + + return this; + + } + + _onChangeCallback() {} + + *[ Symbol.iterator ]() { + + yield this._x; + yield this._y; + yield this._z; + yield this._order; + + } + +} + +Euler.DEFAULT_ORDER = 'XYZ'; + +class Layers { + + constructor() { + + this.mask = 1 | 0; + + } + + set( channel ) { + + this.mask = ( 1 << channel | 0 ) >>> 0; + + } + + enable( channel ) { + + this.mask |= 1 << channel | 0; + + } + + enableAll() { + + this.mask = 0xffffffff | 0; + + } + + toggle( channel ) { + + this.mask ^= 1 << channel | 0; + + } + + disable( channel ) { + + this.mask &= ~ ( 1 << channel | 0 ); + + } + + disableAll() { + + this.mask = 0; + + } + + test( layers ) { + + return ( this.mask & layers.mask ) !== 0; + + } + + isEnabled( channel ) { + + return ( this.mask & ( 1 << channel | 0 ) ) !== 0; + + } + +} + +let _object3DId = 0; + +const _v1$4 = /*@__PURE__*/ new Vector3(); +const _q1 = /*@__PURE__*/ new Quaternion(); +const _m1$3 = /*@__PURE__*/ new Matrix4(); +const _target = /*@__PURE__*/ new Vector3(); + +const _position$3 = /*@__PURE__*/ new Vector3(); +const _scale$2 = /*@__PURE__*/ new Vector3(); +const _quaternion$2 = /*@__PURE__*/ new Quaternion(); + +const _xAxis = /*@__PURE__*/ new Vector3( 1, 0, 0 ); +const _yAxis = /*@__PURE__*/ new Vector3( 0, 1, 0 ); +const _zAxis = /*@__PURE__*/ new Vector3( 0, 0, 1 ); + +const _addedEvent = { type: 'added' }; +const _removedEvent = { type: 'removed' }; + +const _childaddedEvent = { type: 'childadded', child: null }; +const _childremovedEvent = { type: 'childremoved', child: null }; + +class Object3D extends EventDispatcher { + + constructor() { + + super(); + + this.isObject3D = true; + + Object.defineProperty( this, 'id', { value: _object3DId ++ } ); + + this.uuid = generateUUID(); + + this.name = ''; + this.type = 'Object3D'; + + this.parent = null; + this.children = []; + + this.up = Object3D.DEFAULT_UP.clone(); + + const position = new Vector3(); + const rotation = new Euler(); + const quaternion = new Quaternion(); + const scale = new Vector3( 1, 1, 1 ); + + function onRotationChange() { + + quaternion.setFromEuler( rotation, false ); + + } + + function onQuaternionChange() { + + rotation.setFromQuaternion( quaternion, undefined, false ); + + } + + rotation._onChange( onRotationChange ); + quaternion._onChange( onQuaternionChange ); + + Object.defineProperties( this, { + position: { + configurable: true, + enumerable: true, + value: position + }, + rotation: { + configurable: true, + enumerable: true, + value: rotation + }, + quaternion: { + configurable: true, + enumerable: true, + value: quaternion + }, + scale: { + configurable: true, + enumerable: true, + value: scale + }, + modelViewMatrix: { + value: new Matrix4() + }, + normalMatrix: { + value: new Matrix3() + } + } ); + + this.matrix = new Matrix4(); + this.matrixWorld = new Matrix4(); + + this.matrixAutoUpdate = Object3D.DEFAULT_MATRIX_AUTO_UPDATE; + + this.matrixWorldAutoUpdate = Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE; // checked by the renderer + this.matrixWorldNeedsUpdate = false; + + this.layers = new Layers(); + this.visible = true; + + this.castShadow = false; + this.receiveShadow = false; + + this.frustumCulled = true; + this.renderOrder = 0; + + this.animations = []; + + this.userData = {}; + + } + + onBeforeShadow( /* renderer, object, camera, shadowCamera, geometry, depthMaterial, group */ ) {} + + onAfterShadow( /* renderer, object, camera, shadowCamera, geometry, depthMaterial, group */ ) {} + + onBeforeRender( /* renderer, scene, camera, geometry, material, group */ ) {} + + onAfterRender( /* renderer, scene, camera, geometry, material, group */ ) {} + + applyMatrix4( matrix ) { + + if ( this.matrixAutoUpdate ) this.updateMatrix(); + + this.matrix.premultiply( matrix ); + + this.matrix.decompose( this.position, this.quaternion, this.scale ); + + } + + applyQuaternion( q ) { + + this.quaternion.premultiply( q ); + + return this; + + } + + setRotationFromAxisAngle( axis, angle ) { + + // assumes axis is normalized + + this.quaternion.setFromAxisAngle( axis, angle ); + + } + + setRotationFromEuler( euler ) { + + this.quaternion.setFromEuler( euler, true ); + + } + + setRotationFromMatrix( m ) { + + // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) + + this.quaternion.setFromRotationMatrix( m ); + + } + + setRotationFromQuaternion( q ) { + + // assumes q is normalized + + this.quaternion.copy( q ); + + } + + rotateOnAxis( axis, angle ) { + + // rotate object on axis in object space + // axis is assumed to be normalized + + _q1.setFromAxisAngle( axis, angle ); + + this.quaternion.multiply( _q1 ); + + return this; + + } + + rotateOnWorldAxis( axis, angle ) { + + // rotate object on axis in world space + // axis is assumed to be normalized + // method assumes no rotated parent + + _q1.setFromAxisAngle( axis, angle ); + + this.quaternion.premultiply( _q1 ); + + return this; + + } + + rotateX( angle ) { + + return this.rotateOnAxis( _xAxis, angle ); + + } + + rotateY( angle ) { + + return this.rotateOnAxis( _yAxis, angle ); + + } + + rotateZ( angle ) { + + return this.rotateOnAxis( _zAxis, angle ); + + } + + translateOnAxis( axis, distance ) { + + // translate object by distance along axis in object space + // axis is assumed to be normalized + + _v1$4.copy( axis ).applyQuaternion( this.quaternion ); + + this.position.add( _v1$4.multiplyScalar( distance ) ); + + return this; + + } + + translateX( distance ) { + + return this.translateOnAxis( _xAxis, distance ); + + } + + translateY( distance ) { + + return this.translateOnAxis( _yAxis, distance ); + + } + + translateZ( distance ) { + + return this.translateOnAxis( _zAxis, distance ); + + } + + localToWorld( vector ) { + + this.updateWorldMatrix( true, false ); + + return vector.applyMatrix4( this.matrixWorld ); + + } + + worldToLocal( vector ) { + + this.updateWorldMatrix( true, false ); + + return vector.applyMatrix4( _m1$3.copy( this.matrixWorld ).invert() ); + + } + + lookAt( x, y, z ) { + + // This method does not support objects having non-uniformly-scaled parent(s) + + if ( x.isVector3 ) { + + _target.copy( x ); + + } else { + + _target.set( x, y, z ); + + } + + const parent = this.parent; + + this.updateWorldMatrix( true, false ); + + _position$3.setFromMatrixPosition( this.matrixWorld ); + + if ( this.isCamera || this.isLight ) { + + _m1$3.lookAt( _position$3, _target, this.up ); + + } else { + + _m1$3.lookAt( _target, _position$3, this.up ); + + } + + this.quaternion.setFromRotationMatrix( _m1$3 ); + + if ( parent ) { + + _m1$3.extractRotation( parent.matrixWorld ); + _q1.setFromRotationMatrix( _m1$3 ); + this.quaternion.premultiply( _q1.invert() ); + + } + + } + + add( object ) { + + if ( arguments.length > 1 ) { + + for ( let i = 0; i < arguments.length; i ++ ) { + + this.add( arguments[ i ] ); + + } + + return this; + + } + + if ( object === this ) { + + console.error( 'THREE.Object3D.add: object can\'t be added as a child of itself.', object ); + return this; + + } + + if ( object && object.isObject3D ) { + + object.removeFromParent(); + object.parent = this; + this.children.push( object ); + + object.dispatchEvent( _addedEvent ); + + _childaddedEvent.child = object; + this.dispatchEvent( _childaddedEvent ); + _childaddedEvent.child = null; + + } else { + + console.error( 'THREE.Object3D.add: object not an instance of THREE.Object3D.', object ); + + } + + return this; + + } + + remove( object ) { + + if ( arguments.length > 1 ) { + + for ( let i = 0; i < arguments.length; i ++ ) { + + this.remove( arguments[ i ] ); + + } + + return this; + + } + + const index = this.children.indexOf( object ); + + if ( index !== - 1 ) { + + object.parent = null; + this.children.splice( index, 1 ); + + object.dispatchEvent( _removedEvent ); + + _childremovedEvent.child = object; + this.dispatchEvent( _childremovedEvent ); + _childremovedEvent.child = null; + + } + + return this; + + } + + removeFromParent() { + + const parent = this.parent; + + if ( parent !== null ) { + + parent.remove( this ); + + } + + return this; + + } + + clear() { + + return this.remove( ... this.children ); + + } + + attach( object ) { + + // adds object as a child of this, while maintaining the object's world transform + + // Note: This method does not support scene graphs having non-uniformly-scaled nodes(s) + + this.updateWorldMatrix( true, false ); + + _m1$3.copy( this.matrixWorld ).invert(); + + if ( object.parent !== null ) { + + object.parent.updateWorldMatrix( true, false ); + + _m1$3.multiply( object.parent.matrixWorld ); + + } + + object.applyMatrix4( _m1$3 ); + + object.removeFromParent(); + object.parent = this; + this.children.push( object ); + + object.updateWorldMatrix( false, true ); + + object.dispatchEvent( _addedEvent ); + + _childaddedEvent.child = object; + this.dispatchEvent( _childaddedEvent ); + _childaddedEvent.child = null; + + return this; + + } + + getObjectById( id ) { + + return this.getObjectByProperty( 'id', id ); + + } + + getObjectByName( name ) { + + return this.getObjectByProperty( 'name', name ); + + } + + getObjectByProperty( name, value ) { + + if ( this[ name ] === value ) return this; + + for ( let i = 0, l = this.children.length; i < l; i ++ ) { + + const child = this.children[ i ]; + const object = child.getObjectByProperty( name, value ); + + if ( object !== undefined ) { + + return object; + + } + + } + + return undefined; + + } + + getObjectsByProperty( name, value, result = [] ) { + + if ( this[ name ] === value ) result.push( this ); + + const children = this.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + children[ i ].getObjectsByProperty( name, value, result ); + + } + + return result; + + } + + getWorldPosition( target ) { + + this.updateWorldMatrix( true, false ); + + return target.setFromMatrixPosition( this.matrixWorld ); + + } + + getWorldQuaternion( target ) { + + this.updateWorldMatrix( true, false ); + + this.matrixWorld.decompose( _position$3, target, _scale$2 ); + + return target; + + } + + getWorldScale( target ) { + + this.updateWorldMatrix( true, false ); + + this.matrixWorld.decompose( _position$3, _quaternion$2, target ); + + return target; + + } + + getWorldDirection( target ) { + + this.updateWorldMatrix( true, false ); + + const e = this.matrixWorld.elements; + + return target.set( e[ 8 ], e[ 9 ], e[ 10 ] ).normalize(); + + } + + raycast( /* raycaster, intersects */ ) {} + + traverse( callback ) { + + callback( this ); + + const children = this.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + children[ i ].traverse( callback ); + + } + + } + + traverseVisible( callback ) { + + if ( this.visible === false ) return; + + callback( this ); + + const children = this.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + children[ i ].traverseVisible( callback ); + + } + + } + + traverseAncestors( callback ) { + + const parent = this.parent; + + if ( parent !== null ) { + + callback( parent ); + + parent.traverseAncestors( callback ); + + } + + } + + updateMatrix() { + + this.matrix.compose( this.position, this.quaternion, this.scale ); + + this.matrixWorldNeedsUpdate = true; + + } + + updateMatrixWorld( force ) { + + if ( this.matrixAutoUpdate ) this.updateMatrix(); + + if ( this.matrixWorldNeedsUpdate || force ) { + + if ( this.parent === null ) { + + this.matrixWorld.copy( this.matrix ); + + } else { + + this.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix ); + + } + + this.matrixWorldNeedsUpdate = false; + + force = true; + + } + + // update children + + const children = this.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + const child = children[ i ]; + + if ( child.matrixWorldAutoUpdate === true || force === true ) { + + child.updateMatrixWorld( force ); + + } + + } + + } + + updateWorldMatrix( updateParents, updateChildren ) { + + const parent = this.parent; + + if ( updateParents === true && parent !== null && parent.matrixWorldAutoUpdate === true ) { + + parent.updateWorldMatrix( true, false ); + + } + + if ( this.matrixAutoUpdate ) this.updateMatrix(); + + if ( this.parent === null ) { + + this.matrixWorld.copy( this.matrix ); + + } else { + + this.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix ); + + } + + // update children + + if ( updateChildren === true ) { + + const children = this.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + const child = children[ i ]; + + if ( child.matrixWorldAutoUpdate === true ) { + + child.updateWorldMatrix( false, true ); + + } + + } + + } + + } + + toJSON( meta ) { + + // meta is a string when called from JSON.stringify + const isRootObject = ( meta === undefined || typeof meta === 'string' ); + + const output = {}; + + // meta is a hash used to collect geometries, materials. + // not providing it implies that this is the root object + // being serialized. + if ( isRootObject ) { + + // initialize meta obj + meta = { + geometries: {}, + materials: {}, + textures: {}, + images: {}, + shapes: {}, + skeletons: {}, + animations: {}, + nodes: {} + }; + + output.metadata = { + version: 4.6, + type: 'Object', + generator: 'Object3D.toJSON' + }; + + } + + // standard Object3D serialization + + const object = {}; + + object.uuid = this.uuid; + object.type = this.type; + + if ( this.name !== '' ) object.name = this.name; + if ( this.castShadow === true ) object.castShadow = true; + if ( this.receiveShadow === true ) object.receiveShadow = true; + if ( this.visible === false ) object.visible = false; + if ( this.frustumCulled === false ) object.frustumCulled = false; + if ( this.renderOrder !== 0 ) object.renderOrder = this.renderOrder; + if ( Object.keys( this.userData ).length > 0 ) object.userData = this.userData; + + object.layers = this.layers.mask; + object.matrix = this.matrix.toArray(); + object.up = this.up.toArray(); + + if ( this.matrixAutoUpdate === false ) object.matrixAutoUpdate = false; + + // object specific properties + + if ( this.isInstancedMesh ) { + + object.type = 'InstancedMesh'; + object.count = this.count; + object.instanceMatrix = this.instanceMatrix.toJSON(); + if ( this.instanceColor !== null ) object.instanceColor = this.instanceColor.toJSON(); + + } + + if ( this.isBatchedMesh ) { + + object.type = 'BatchedMesh'; + object.perObjectFrustumCulled = this.perObjectFrustumCulled; + object.sortObjects = this.sortObjects; + + object.drawRanges = this._drawRanges; + object.reservedRanges = this._reservedRanges; + + object.visibility = this._visibility; + object.active = this._active; + object.bounds = this._bounds.map( bound => ( { + boxInitialized: bound.boxInitialized, + boxMin: bound.box.min.toArray(), + boxMax: bound.box.max.toArray(), + + sphereInitialized: bound.sphereInitialized, + sphereRadius: bound.sphere.radius, + sphereCenter: bound.sphere.center.toArray() + } ) ); + + object.maxGeometryCount = this._maxGeometryCount; + object.maxVertexCount = this._maxVertexCount; + object.maxIndexCount = this._maxIndexCount; + + object.geometryInitialized = this._geometryInitialized; + object.geometryCount = this._geometryCount; + + object.matricesTexture = this._matricesTexture.toJSON( meta ); + + if ( this.boundingSphere !== null ) { + + object.boundingSphere = { + center: object.boundingSphere.center.toArray(), + radius: object.boundingSphere.radius + }; + + } + + if ( this.boundingBox !== null ) { + + object.boundingBox = { + min: object.boundingBox.min.toArray(), + max: object.boundingBox.max.toArray() + }; + + } + + } + + // + + function serialize( library, element ) { + + if ( library[ element.uuid ] === undefined ) { + + library[ element.uuid ] = element.toJSON( meta ); + + } + + return element.uuid; + + } + + if ( this.isScene ) { + + if ( this.background ) { + + if ( this.background.isColor ) { + + object.background = this.background.toJSON(); + + } else if ( this.background.isTexture ) { + + object.background = this.background.toJSON( meta ).uuid; + + } + + } + + if ( this.environment && this.environment.isTexture && this.environment.isRenderTargetTexture !== true ) { + + object.environment = this.environment.toJSON( meta ).uuid; + + } + + } else if ( this.isMesh || this.isLine || this.isPoints ) { + + object.geometry = serialize( meta.geometries, this.geometry ); + + const parameters = this.geometry.parameters; + + if ( parameters !== undefined && parameters.shapes !== undefined ) { + + const shapes = parameters.shapes; + + if ( Array.isArray( shapes ) ) { + + for ( let i = 0, l = shapes.length; i < l; i ++ ) { + + const shape = shapes[ i ]; + + serialize( meta.shapes, shape ); + + } + + } else { + + serialize( meta.shapes, shapes ); + + } + + } + + } + + if ( this.isSkinnedMesh ) { + + object.bindMode = this.bindMode; + object.bindMatrix = this.bindMatrix.toArray(); + + if ( this.skeleton !== undefined ) { + + serialize( meta.skeletons, this.skeleton ); + + object.skeleton = this.skeleton.uuid; + + } + + } + + if ( this.material !== undefined ) { + + if ( Array.isArray( this.material ) ) { + + const uuids = []; + + for ( let i = 0, l = this.material.length; i < l; i ++ ) { + + uuids.push( serialize( meta.materials, this.material[ i ] ) ); + + } + + object.material = uuids; + + } else { + + object.material = serialize( meta.materials, this.material ); + + } + + } + + // + + if ( this.children.length > 0 ) { + + object.children = []; + + for ( let i = 0; i < this.children.length; i ++ ) { + + object.children.push( this.children[ i ].toJSON( meta ).object ); + + } + + } + + // + + if ( this.animations.length > 0 ) { + + object.animations = []; + + for ( let i = 0; i < this.animations.length; i ++ ) { + + const animation = this.animations[ i ]; + + object.animations.push( serialize( meta.animations, animation ) ); + + } + + } + + if ( isRootObject ) { + + const geometries = extractFromCache( meta.geometries ); + const materials = extractFromCache( meta.materials ); + const textures = extractFromCache( meta.textures ); + const images = extractFromCache( meta.images ); + const shapes = extractFromCache( meta.shapes ); + const skeletons = extractFromCache( meta.skeletons ); + const animations = extractFromCache( meta.animations ); + const nodes = extractFromCache( meta.nodes ); + + if ( geometries.length > 0 ) output.geometries = geometries; + if ( materials.length > 0 ) output.materials = materials; + if ( textures.length > 0 ) output.textures = textures; + if ( images.length > 0 ) output.images = images; + if ( shapes.length > 0 ) output.shapes = shapes; + if ( skeletons.length > 0 ) output.skeletons = skeletons; + if ( animations.length > 0 ) output.animations = animations; + if ( nodes.length > 0 ) output.nodes = nodes; + + } + + output.object = object; + + return output; + + // extract data from the cache hash + // remove metadata on each item + // and return as array + function extractFromCache( cache ) { + + const values = []; + for ( const key in cache ) { + + const data = cache[ key ]; + delete data.metadata; + values.push( data ); + + } + + return values; + + } + + } + + clone( recursive ) { + + return new this.constructor().copy( this, recursive ); + + } + + copy( source, recursive = true ) { + + this.name = source.name; + + this.up.copy( source.up ); + + this.position.copy( source.position ); + this.rotation.order = source.rotation.order; + this.quaternion.copy( source.quaternion ); + this.scale.copy( source.scale ); + + this.matrix.copy( source.matrix ); + this.matrixWorld.copy( source.matrixWorld ); + + this.matrixAutoUpdate = source.matrixAutoUpdate; + + this.matrixWorldAutoUpdate = source.matrixWorldAutoUpdate; + this.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate; + + this.layers.mask = source.layers.mask; + this.visible = source.visible; + + this.castShadow = source.castShadow; + this.receiveShadow = source.receiveShadow; + + this.frustumCulled = source.frustumCulled; + this.renderOrder = source.renderOrder; + + this.animations = source.animations.slice(); + + this.userData = JSON.parse( JSON.stringify( source.userData ) ); + + if ( recursive === true ) { + + for ( let i = 0; i < source.children.length; i ++ ) { + + const child = source.children[ i ]; + this.add( child.clone() ); + + } + + } + + return this; + + } + +} + +Object3D.DEFAULT_UP = /*@__PURE__*/ new Vector3( 0, 1, 0 ); +Object3D.DEFAULT_MATRIX_AUTO_UPDATE = true; +Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = true; + +const _v0$1 = /*@__PURE__*/ new Vector3(); +const _v1$3 = /*@__PURE__*/ new Vector3(); +const _v2$2 = /*@__PURE__*/ new Vector3(); +const _v3$2 = /*@__PURE__*/ new Vector3(); + +const _vab = /*@__PURE__*/ new Vector3(); +const _vac = /*@__PURE__*/ new Vector3(); +const _vbc = /*@__PURE__*/ new Vector3(); +const _vap = /*@__PURE__*/ new Vector3(); +const _vbp = /*@__PURE__*/ new Vector3(); +const _vcp = /*@__PURE__*/ new Vector3(); + +class Triangle { + + constructor( a = new Vector3(), b = new Vector3(), c = new Vector3() ) { + + this.a = a; + this.b = b; + this.c = c; + + } + + static getNormal( a, b, c, target ) { + + target.subVectors( c, b ); + _v0$1.subVectors( a, b ); + target.cross( _v0$1 ); + + const targetLengthSq = target.lengthSq(); + if ( targetLengthSq > 0 ) { + + return target.multiplyScalar( 1 / Math.sqrt( targetLengthSq ) ); + + } + + return target.set( 0, 0, 0 ); + + } + + // static/instance method to calculate barycentric coordinates + // based on: http://www.blackpawn.com/texts/pointinpoly/default.html + static getBarycoord( point, a, b, c, target ) { + + _v0$1.subVectors( c, a ); + _v1$3.subVectors( b, a ); + _v2$2.subVectors( point, a ); + + const dot00 = _v0$1.dot( _v0$1 ); + const dot01 = _v0$1.dot( _v1$3 ); + const dot02 = _v0$1.dot( _v2$2 ); + const dot11 = _v1$3.dot( _v1$3 ); + const dot12 = _v1$3.dot( _v2$2 ); + + const denom = ( dot00 * dot11 - dot01 * dot01 ); + + // collinear or singular triangle + if ( denom === 0 ) { + + target.set( 0, 0, 0 ); + return null; + + } + + const invDenom = 1 / denom; + const u = ( dot11 * dot02 - dot01 * dot12 ) * invDenom; + const v = ( dot00 * dot12 - dot01 * dot02 ) * invDenom; + + // barycentric coordinates must always sum to 1 + return target.set( 1 - u - v, v, u ); + + } + + static containsPoint( point, a, b, c ) { + + // if the triangle is degenerate then we can't contain a point + if ( this.getBarycoord( point, a, b, c, _v3$2 ) === null ) { + + return false; + + } + + return ( _v3$2.x >= 0 ) && ( _v3$2.y >= 0 ) && ( ( _v3$2.x + _v3$2.y ) <= 1 ); + + } + + static getInterpolation( point, p1, p2, p3, v1, v2, v3, target ) { + + if ( this.getBarycoord( point, p1, p2, p3, _v3$2 ) === null ) { + + target.x = 0; + target.y = 0; + if ( 'z' in target ) target.z = 0; + if ( 'w' in target ) target.w = 0; + return null; + + } + + target.setScalar( 0 ); + target.addScaledVector( v1, _v3$2.x ); + target.addScaledVector( v2, _v3$2.y ); + target.addScaledVector( v3, _v3$2.z ); + + return target; + + } + + static isFrontFacing( a, b, c, direction ) { + + _v0$1.subVectors( c, b ); + _v1$3.subVectors( a, b ); + + // strictly front facing + return ( _v0$1.cross( _v1$3 ).dot( direction ) < 0 ) ? true : false; + + } + + set( a, b, c ) { + + this.a.copy( a ); + this.b.copy( b ); + this.c.copy( c ); + + return this; + + } + + setFromPointsAndIndices( points, i0, i1, i2 ) { + + this.a.copy( points[ i0 ] ); + this.b.copy( points[ i1 ] ); + this.c.copy( points[ i2 ] ); + + return this; + + } + + setFromAttributeAndIndices( attribute, i0, i1, i2 ) { + + this.a.fromBufferAttribute( attribute, i0 ); + this.b.fromBufferAttribute( attribute, i1 ); + this.c.fromBufferAttribute( attribute, i2 ); + + return this; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( triangle ) { + + this.a.copy( triangle.a ); + this.b.copy( triangle.b ); + this.c.copy( triangle.c ); + + return this; + + } + + getArea() { + + _v0$1.subVectors( this.c, this.b ); + _v1$3.subVectors( this.a, this.b ); + + return _v0$1.cross( _v1$3 ).length() * 0.5; + + } + + getMidpoint( target ) { + + return target.addVectors( this.a, this.b ).add( this.c ).multiplyScalar( 1 / 3 ); + + } + + getNormal( target ) { + + return Triangle.getNormal( this.a, this.b, this.c, target ); + + } + + getPlane( target ) { + + return target.setFromCoplanarPoints( this.a, this.b, this.c ); + + } + + getBarycoord( point, target ) { + + return Triangle.getBarycoord( point, this.a, this.b, this.c, target ); + + } + + getInterpolation( point, v1, v2, v3, target ) { + + return Triangle.getInterpolation( point, this.a, this.b, this.c, v1, v2, v3, target ); + + } + + containsPoint( point ) { + + return Triangle.containsPoint( point, this.a, this.b, this.c ); + + } + + isFrontFacing( direction ) { + + return Triangle.isFrontFacing( this.a, this.b, this.c, direction ); + + } + + intersectsBox( box ) { + + return box.intersectsTriangle( this ); + + } + + closestPointToPoint( p, target ) { + + const a = this.a, b = this.b, c = this.c; + let v, w; + + // algorithm thanks to Real-Time Collision Detection by Christer Ericson, + // published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc., + // under the accompanying license; see chapter 5.1.5 for detailed explanation. + // basically, we're distinguishing which of the voronoi regions of the triangle + // the point lies in with the minimum amount of redundant computation. + + _vab.subVectors( b, a ); + _vac.subVectors( c, a ); + _vap.subVectors( p, a ); + const d1 = _vab.dot( _vap ); + const d2 = _vac.dot( _vap ); + if ( d1 <= 0 && d2 <= 0 ) { + + // vertex region of A; barycentric coords (1, 0, 0) + return target.copy( a ); + + } + + _vbp.subVectors( p, b ); + const d3 = _vab.dot( _vbp ); + const d4 = _vac.dot( _vbp ); + if ( d3 >= 0 && d4 <= d3 ) { + + // vertex region of B; barycentric coords (0, 1, 0) + return target.copy( b ); + + } + + const vc = d1 * d4 - d3 * d2; + if ( vc <= 0 && d1 >= 0 && d3 <= 0 ) { + + v = d1 / ( d1 - d3 ); + // edge region of AB; barycentric coords (1-v, v, 0) + return target.copy( a ).addScaledVector( _vab, v ); + + } + + _vcp.subVectors( p, c ); + const d5 = _vab.dot( _vcp ); + const d6 = _vac.dot( _vcp ); + if ( d6 >= 0 && d5 <= d6 ) { + + // vertex region of C; barycentric coords (0, 0, 1) + return target.copy( c ); + + } + + const vb = d5 * d2 - d1 * d6; + if ( vb <= 0 && d2 >= 0 && d6 <= 0 ) { + + w = d2 / ( d2 - d6 ); + // edge region of AC; barycentric coords (1-w, 0, w) + return target.copy( a ).addScaledVector( _vac, w ); + + } + + const va = d3 * d6 - d5 * d4; + if ( va <= 0 && ( d4 - d3 ) >= 0 && ( d5 - d6 ) >= 0 ) { + + _vbc.subVectors( c, b ); + w = ( d4 - d3 ) / ( ( d4 - d3 ) + ( d5 - d6 ) ); + // edge region of BC; barycentric coords (0, 1-w, w) + return target.copy( b ).addScaledVector( _vbc, w ); // edge region of BC + + } + + // face region + const denom = 1 / ( va + vb + vc ); + // u = va * denom + v = vb * denom; + w = vc * denom; + + return target.copy( a ).addScaledVector( _vab, v ).addScaledVector( _vac, w ); + + } + + equals( triangle ) { + + return triangle.a.equals( this.a ) && triangle.b.equals( this.b ) && triangle.c.equals( this.c ); + + } + +} + +const _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF, + 'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2, + 'brown': 0xA52A2A, 'burlywood': 0xDEB887, 'cadetblue': 0x5F9EA0, 'chartreuse': 0x7FFF00, 'chocolate': 0xD2691E, 'coral': 0xFF7F50, + 'cornflowerblue': 0x6495ED, 'cornsilk': 0xFFF8DC, 'crimson': 0xDC143C, 'cyan': 0x00FFFF, 'darkblue': 0x00008B, 'darkcyan': 0x008B8B, + 'darkgoldenrod': 0xB8860B, 'darkgray': 0xA9A9A9, 'darkgreen': 0x006400, 'darkgrey': 0xA9A9A9, 'darkkhaki': 0xBDB76B, 'darkmagenta': 0x8B008B, + 'darkolivegreen': 0x556B2F, 'darkorange': 0xFF8C00, 'darkorchid': 0x9932CC, 'darkred': 0x8B0000, 'darksalmon': 0xE9967A, 'darkseagreen': 0x8FBC8F, + 'darkslateblue': 0x483D8B, 'darkslategray': 0x2F4F4F, 'darkslategrey': 0x2F4F4F, 'darkturquoise': 0x00CED1, 'darkviolet': 0x9400D3, + 'deeppink': 0xFF1493, 'deepskyblue': 0x00BFFF, 'dimgray': 0x696969, 'dimgrey': 0x696969, 'dodgerblue': 0x1E90FF, 'firebrick': 0xB22222, + 'floralwhite': 0xFFFAF0, 'forestgreen': 0x228B22, 'fuchsia': 0xFF00FF, 'gainsboro': 0xDCDCDC, 'ghostwhite': 0xF8F8FF, 'gold': 0xFFD700, + 'goldenrod': 0xDAA520, 'gray': 0x808080, 'green': 0x008000, 'greenyellow': 0xADFF2F, 'grey': 0x808080, 'honeydew': 0xF0FFF0, 'hotpink': 0xFF69B4, + 'indianred': 0xCD5C5C, 'indigo': 0x4B0082, 'ivory': 0xFFFFF0, 'khaki': 0xF0E68C, 'lavender': 0xE6E6FA, 'lavenderblush': 0xFFF0F5, 'lawngreen': 0x7CFC00, + 'lemonchiffon': 0xFFFACD, 'lightblue': 0xADD8E6, 'lightcoral': 0xF08080, 'lightcyan': 0xE0FFFF, 'lightgoldenrodyellow': 0xFAFAD2, 'lightgray': 0xD3D3D3, + 'lightgreen': 0x90EE90, 'lightgrey': 0xD3D3D3, 'lightpink': 0xFFB6C1, 'lightsalmon': 0xFFA07A, 'lightseagreen': 0x20B2AA, 'lightskyblue': 0x87CEFA, + 'lightslategray': 0x778899, 'lightslategrey': 0x778899, 'lightsteelblue': 0xB0C4DE, 'lightyellow': 0xFFFFE0, 'lime': 0x00FF00, 'limegreen': 0x32CD32, + 'linen': 0xFAF0E6, 'magenta': 0xFF00FF, 'maroon': 0x800000, 'mediumaquamarine': 0x66CDAA, 'mediumblue': 0x0000CD, 'mediumorchid': 0xBA55D3, + 'mediumpurple': 0x9370DB, 'mediumseagreen': 0x3CB371, 'mediumslateblue': 0x7B68EE, 'mediumspringgreen': 0x00FA9A, 'mediumturquoise': 0x48D1CC, + 'mediumvioletred': 0xC71585, 'midnightblue': 0x191970, 'mintcream': 0xF5FFFA, 'mistyrose': 0xFFE4E1, 'moccasin': 0xFFE4B5, 'navajowhite': 0xFFDEAD, + 'navy': 0x000080, 'oldlace': 0xFDF5E6, 'olive': 0x808000, 'olivedrab': 0x6B8E23, 'orange': 0xFFA500, 'orangered': 0xFF4500, 'orchid': 0xDA70D6, + 'palegoldenrod': 0xEEE8AA, 'palegreen': 0x98FB98, 'paleturquoise': 0xAFEEEE, 'palevioletred': 0xDB7093, 'papayawhip': 0xFFEFD5, 'peachpuff': 0xFFDAB9, + 'peru': 0xCD853F, 'pink': 0xFFC0CB, 'plum': 0xDDA0DD, 'powderblue': 0xB0E0E6, 'purple': 0x800080, 'rebeccapurple': 0x663399, 'red': 0xFF0000, 'rosybrown': 0xBC8F8F, + 'royalblue': 0x4169E1, 'saddlebrown': 0x8B4513, 'salmon': 0xFA8072, 'sandybrown': 0xF4A460, 'seagreen': 0x2E8B57, 'seashell': 0xFFF5EE, + 'sienna': 0xA0522D, 'silver': 0xC0C0C0, 'skyblue': 0x87CEEB, 'slateblue': 0x6A5ACD, 'slategray': 0x708090, 'slategrey': 0x708090, 'snow': 0xFFFAFA, + 'springgreen': 0x00FF7F, 'steelblue': 0x4682B4, 'tan': 0xD2B48C, 'teal': 0x008080, 'thistle': 0xD8BFD8, 'tomato': 0xFF6347, 'turquoise': 0x40E0D0, + 'violet': 0xEE82EE, 'wheat': 0xF5DEB3, 'white': 0xFFFFFF, 'whitesmoke': 0xF5F5F5, 'yellow': 0xFFFF00, 'yellowgreen': 0x9ACD32 }; + +const _hslA = { h: 0, s: 0, l: 0 }; +const _hslB = { h: 0, s: 0, l: 0 }; + +function hue2rgb( p, q, t ) { + + if ( t < 0 ) t += 1; + if ( t > 1 ) t -= 1; + if ( t < 1 / 6 ) return p + ( q - p ) * 6 * t; + if ( t < 1 / 2 ) return q; + if ( t < 2 / 3 ) return p + ( q - p ) * 6 * ( 2 / 3 - t ); + return p; + +} + +class Color { + + constructor( r, g, b ) { + + this.isColor = true; + + this.r = 1; + this.g = 1; + this.b = 1; + + return this.set( r, g, b ); + + } + + set( r, g, b ) { + + if ( g === undefined && b === undefined ) { + + // r is THREE.Color, hex or string + + const value = r; + + if ( value && value.isColor ) { + + this.copy( value ); + + } else if ( typeof value === 'number' ) { + + this.setHex( value ); + + } else if ( typeof value === 'string' ) { + + this.setStyle( value ); + + } + + } else { + + this.setRGB( r, g, b ); + + } + + return this; + + } + + setScalar( scalar ) { + + this.r = scalar; + this.g = scalar; + this.b = scalar; + + return this; + + } + + setHex( hex, colorSpace = SRGBColorSpace ) { + + hex = Math.floor( hex ); + + this.r = ( hex >> 16 & 255 ) / 255; + this.g = ( hex >> 8 & 255 ) / 255; + this.b = ( hex & 255 ) / 255; + + ColorManagement.toWorkingColorSpace( this, colorSpace ); + + return this; + + } + + setRGB( r, g, b, colorSpace = ColorManagement.workingColorSpace ) { + + this.r = r; + this.g = g; + this.b = b; + + ColorManagement.toWorkingColorSpace( this, colorSpace ); + + return this; + + } + + setHSL( h, s, l, colorSpace = ColorManagement.workingColorSpace ) { + + // h,s,l ranges are in 0.0 - 1.0 + h = euclideanModulo( h, 1 ); + s = clamp( s, 0, 1 ); + l = clamp( l, 0, 1 ); + + if ( s === 0 ) { + + this.r = this.g = this.b = l; + + } else { + + const p = l <= 0.5 ? l * ( 1 + s ) : l + s - ( l * s ); + const q = ( 2 * l ) - p; + + this.r = hue2rgb( q, p, h + 1 / 3 ); + this.g = hue2rgb( q, p, h ); + this.b = hue2rgb( q, p, h - 1 / 3 ); + + } + + ColorManagement.toWorkingColorSpace( this, colorSpace ); + + return this; + + } + + setStyle( style, colorSpace = SRGBColorSpace ) { + + function handleAlpha( string ) { + + if ( string === undefined ) return; + + if ( parseFloat( string ) < 1 ) { + + console.warn( 'THREE.Color: Alpha component of ' + style + ' will be ignored.' ); + + } + + } + + + let m; + + if ( m = /^(\w+)\(([^\)]*)\)/.exec( style ) ) { + + // rgb / hsl + + let color; + const name = m[ 1 ]; + const components = m[ 2 ]; + + switch ( name ) { + + case 'rgb': + case 'rgba': + + if ( color = /^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( components ) ) { + + // rgb(255,0,0) rgba(255,0,0,0.5) + + handleAlpha( color[ 4 ] ); + + return this.setRGB( + Math.min( 255, parseInt( color[ 1 ], 10 ) ) / 255, + Math.min( 255, parseInt( color[ 2 ], 10 ) ) / 255, + Math.min( 255, parseInt( color[ 3 ], 10 ) ) / 255, + colorSpace + ); + + } + + if ( color = /^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( components ) ) { + + // rgb(100%,0%,0%) rgba(100%,0%,0%,0.5) + + handleAlpha( color[ 4 ] ); + + return this.setRGB( + Math.min( 100, parseInt( color[ 1 ], 10 ) ) / 100, + Math.min( 100, parseInt( color[ 2 ], 10 ) ) / 100, + Math.min( 100, parseInt( color[ 3 ], 10 ) ) / 100, + colorSpace + ); + + } + + break; + + case 'hsl': + case 'hsla': + + if ( color = /^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( components ) ) { + + // hsl(120,50%,50%) hsla(120,50%,50%,0.5) + + handleAlpha( color[ 4 ] ); + + return this.setHSL( + parseFloat( color[ 1 ] ) / 360, + parseFloat( color[ 2 ] ) / 100, + parseFloat( color[ 3 ] ) / 100, + colorSpace + ); + + } + + break; + + default: + + console.warn( 'THREE.Color: Unknown color model ' + style ); + + } + + } else if ( m = /^\#([A-Fa-f\d]+)$/.exec( style ) ) { + + // hex color + + const hex = m[ 1 ]; + const size = hex.length; + + if ( size === 3 ) { + + // #ff0 + return this.setRGB( + parseInt( hex.charAt( 0 ), 16 ) / 15, + parseInt( hex.charAt( 1 ), 16 ) / 15, + parseInt( hex.charAt( 2 ), 16 ) / 15, + colorSpace + ); + + } else if ( size === 6 ) { + + // #ff0000 + return this.setHex( parseInt( hex, 16 ), colorSpace ); + + } else { + + console.warn( 'THREE.Color: Invalid hex color ' + style ); + + } + + } else if ( style && style.length > 0 ) { + + return this.setColorName( style, colorSpace ); + + } + + return this; + + } + + setColorName( style, colorSpace = SRGBColorSpace ) { + + // color keywords + const hex = _colorKeywords[ style.toLowerCase() ]; + + if ( hex !== undefined ) { + + // red + this.setHex( hex, colorSpace ); + + } else { + + // unknown color + console.warn( 'THREE.Color: Unknown color ' + style ); + + } + + return this; + + } + + clone() { + + return new this.constructor( this.r, this.g, this.b ); + + } + + copy( color ) { + + this.r = color.r; + this.g = color.g; + this.b = color.b; + + return this; + + } + + copySRGBToLinear( color ) { + + this.r = SRGBToLinear( color.r ); + this.g = SRGBToLinear( color.g ); + this.b = SRGBToLinear( color.b ); + + return this; + + } + + copyLinearToSRGB( color ) { + + this.r = LinearToSRGB( color.r ); + this.g = LinearToSRGB( color.g ); + this.b = LinearToSRGB( color.b ); + + return this; + + } + + convertSRGBToLinear() { + + this.copySRGBToLinear( this ); + + return this; + + } + + convertLinearToSRGB() { + + this.copyLinearToSRGB( this ); + + return this; + + } + + getHex( colorSpace = SRGBColorSpace ) { + + ColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace ); + + return Math.round( clamp( _color.r * 255, 0, 255 ) ) * 65536 + Math.round( clamp( _color.g * 255, 0, 255 ) ) * 256 + Math.round( clamp( _color.b * 255, 0, 255 ) ); + + } + + getHexString( colorSpace = SRGBColorSpace ) { + + return ( '000000' + this.getHex( colorSpace ).toString( 16 ) ).slice( - 6 ); + + } + + getHSL( target, colorSpace = ColorManagement.workingColorSpace ) { + + // h,s,l ranges are in 0.0 - 1.0 + + ColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace ); + + const r = _color.r, g = _color.g, b = _color.b; + + const max = Math.max( r, g, b ); + const min = Math.min( r, g, b ); + + let hue, saturation; + const lightness = ( min + max ) / 2.0; + + if ( min === max ) { + + hue = 0; + saturation = 0; + + } else { + + const delta = max - min; + + saturation = lightness <= 0.5 ? delta / ( max + min ) : delta / ( 2 - max - min ); + + switch ( max ) { + + case r: hue = ( g - b ) / delta + ( g < b ? 6 : 0 ); break; + case g: hue = ( b - r ) / delta + 2; break; + case b: hue = ( r - g ) / delta + 4; break; + + } + + hue /= 6; + + } + + target.h = hue; + target.s = saturation; + target.l = lightness; + + return target; + + } + + getRGB( target, colorSpace = ColorManagement.workingColorSpace ) { + + ColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace ); + + target.r = _color.r; + target.g = _color.g; + target.b = _color.b; + + return target; + + } + + getStyle( colorSpace = SRGBColorSpace ) { + + ColorManagement.fromWorkingColorSpace( _color.copy( this ), colorSpace ); + + const r = _color.r, g = _color.g, b = _color.b; + + if ( colorSpace !== SRGBColorSpace ) { + + // Requires CSS Color Module Level 4 (https://www.w3.org/TR/css-color-4/). + return `color(${ colorSpace } ${ r.toFixed( 3 ) } ${ g.toFixed( 3 ) } ${ b.toFixed( 3 ) })`; + + } + + return `rgb(${ Math.round( r * 255 ) },${ Math.round( g * 255 ) },${ Math.round( b * 255 ) })`; + + } + + offsetHSL( h, s, l ) { + + this.getHSL( _hslA ); + + return this.setHSL( _hslA.h + h, _hslA.s + s, _hslA.l + l ); + + } + + add( color ) { + + this.r += color.r; + this.g += color.g; + this.b += color.b; + + return this; + + } + + addColors( color1, color2 ) { + + this.r = color1.r + color2.r; + this.g = color1.g + color2.g; + this.b = color1.b + color2.b; + + return this; + + } + + addScalar( s ) { + + this.r += s; + this.g += s; + this.b += s; + + return this; + + } + + sub( color ) { + + this.r = Math.max( 0, this.r - color.r ); + this.g = Math.max( 0, this.g - color.g ); + this.b = Math.max( 0, this.b - color.b ); + + return this; + + } + + multiply( color ) { + + this.r *= color.r; + this.g *= color.g; + this.b *= color.b; + + return this; + + } + + multiplyScalar( s ) { + + this.r *= s; + this.g *= s; + this.b *= s; + + return this; + + } + + lerp( color, alpha ) { + + this.r += ( color.r - this.r ) * alpha; + this.g += ( color.g - this.g ) * alpha; + this.b += ( color.b - this.b ) * alpha; + + return this; + + } + + lerpColors( color1, color2, alpha ) { + + this.r = color1.r + ( color2.r - color1.r ) * alpha; + this.g = color1.g + ( color2.g - color1.g ) * alpha; + this.b = color1.b + ( color2.b - color1.b ) * alpha; + + return this; + + } + + lerpHSL( color, alpha ) { + + this.getHSL( _hslA ); + color.getHSL( _hslB ); + + const h = lerp( _hslA.h, _hslB.h, alpha ); + const s = lerp( _hslA.s, _hslB.s, alpha ); + const l = lerp( _hslA.l, _hslB.l, alpha ); + + this.setHSL( h, s, l ); + + return this; + + } + + setFromVector3( v ) { + + this.r = v.x; + this.g = v.y; + this.b = v.z; + + return this; + + } + + applyMatrix3( m ) { + + const r = this.r, g = this.g, b = this.b; + const e = m.elements; + + this.r = e[ 0 ] * r + e[ 3 ] * g + e[ 6 ] * b; + this.g = e[ 1 ] * r + e[ 4 ] * g + e[ 7 ] * b; + this.b = e[ 2 ] * r + e[ 5 ] * g + e[ 8 ] * b; + + return this; + + } + + equals( c ) { + + return ( c.r === this.r ) && ( c.g === this.g ) && ( c.b === this.b ); + + } + + fromArray( array, offset = 0 ) { + + this.r = array[ offset ]; + this.g = array[ offset + 1 ]; + this.b = array[ offset + 2 ]; + + return this; + + } + + toArray( array = [], offset = 0 ) { + + array[ offset ] = this.r; + array[ offset + 1 ] = this.g; + array[ offset + 2 ] = this.b; + + return array; + + } + + fromBufferAttribute( attribute, index ) { + + this.r = attribute.getX( index ); + this.g = attribute.getY( index ); + this.b = attribute.getZ( index ); + + return this; + + } + + toJSON() { + + return this.getHex(); + + } + + *[ Symbol.iterator ]() { + + yield this.r; + yield this.g; + yield this.b; + + } + +} + +const _color = /*@__PURE__*/ new Color(); + +Color.NAMES = _colorKeywords; + +let _materialId = 0; + +class Material extends EventDispatcher { + + constructor() { + + super(); + + this.isMaterial = true; + + Object.defineProperty( this, 'id', { value: _materialId ++ } ); + + this.uuid = generateUUID(); + + this.name = ''; + this.type = 'Material'; + + this.blending = NormalBlending; + this.side = FrontSide; + this.vertexColors = false; + + this.opacity = 1; + this.transparent = false; + this.alphaHash = false; + + this.blendSrc = SrcAlphaFactor; + this.blendDst = OneMinusSrcAlphaFactor; + this.blendEquation = AddEquation; + this.blendSrcAlpha = null; + this.blendDstAlpha = null; + this.blendEquationAlpha = null; + this.blendColor = new Color( 0, 0, 0 ); + this.blendAlpha = 0; + + this.depthFunc = LessEqualDepth; + this.depthTest = true; + this.depthWrite = true; + + this.stencilWriteMask = 0xff; + this.stencilFunc = AlwaysStencilFunc; + this.stencilRef = 0; + this.stencilFuncMask = 0xff; + this.stencilFail = KeepStencilOp; + this.stencilZFail = KeepStencilOp; + this.stencilZPass = KeepStencilOp; + this.stencilWrite = false; + + this.clippingPlanes = null; + this.clipIntersection = false; + this.clipShadows = false; + + this.shadowSide = null; + + this.colorWrite = true; + + this.precision = null; // override the renderer's default precision for this material + + this.polygonOffset = false; + this.polygonOffsetFactor = 0; + this.polygonOffsetUnits = 0; + + this.dithering = false; + + this.alphaToCoverage = false; + this.premultipliedAlpha = false; + this.forceSinglePass = false; + + this.visible = true; + + this.toneMapped = true; + + this.userData = {}; + + this.version = 0; + + this._alphaTest = 0; + + } + + get alphaTest() { + + return this._alphaTest; + + } + + set alphaTest( value ) { + + if ( this._alphaTest > 0 !== value > 0 ) { + + this.version ++; + + } + + this._alphaTest = value; + + } + + onBuild( /* shaderobject, renderer */ ) {} + + onBeforeRender( /* renderer, scene, camera, geometry, object, group */ ) {} + + onBeforeCompile( /* shaderobject, renderer */ ) {} + + customProgramCacheKey() { + + return this.onBeforeCompile.toString(); + + } + + setValues( values ) { + + if ( values === undefined ) return; + + for ( const key in values ) { + + const newValue = values[ key ]; + + if ( newValue === undefined ) { + + console.warn( `THREE.Material: parameter '${ key }' has value of undefined.` ); + continue; + + } + + const currentValue = this[ key ]; + + if ( currentValue === undefined ) { + + console.warn( `THREE.Material: '${ key }' is not a property of THREE.${ this.type }.` ); + continue; + + } + + if ( currentValue && currentValue.isColor ) { + + currentValue.set( newValue ); + + } else if ( ( currentValue && currentValue.isVector3 ) && ( newValue && newValue.isVector3 ) ) { + + currentValue.copy( newValue ); + + } else { + + this[ key ] = newValue; + + } + + } + + } + + toJSON( meta ) { + + const isRootObject = ( meta === undefined || typeof meta === 'string' ); + + if ( isRootObject ) { + + meta = { + textures: {}, + images: {} + }; + + } + + const data = { + metadata: { + version: 4.6, + type: 'Material', + generator: 'Material.toJSON' + } + }; + + // standard Material serialization + data.uuid = this.uuid; + data.type = this.type; + + if ( this.name !== '' ) data.name = this.name; + + if ( this.color && this.color.isColor ) data.color = this.color.getHex(); + + if ( this.roughness !== undefined ) data.roughness = this.roughness; + if ( this.metalness !== undefined ) data.metalness = this.metalness; + + if ( this.sheen !== undefined ) data.sheen = this.sheen; + if ( this.sheenColor && this.sheenColor.isColor ) data.sheenColor = this.sheenColor.getHex(); + if ( this.sheenRoughness !== undefined ) data.sheenRoughness = this.sheenRoughness; + if ( this.emissive && this.emissive.isColor ) data.emissive = this.emissive.getHex(); + if ( this.emissiveIntensity !== undefined && this.emissiveIntensity !== 1 ) data.emissiveIntensity = this.emissiveIntensity; + + if ( this.specular && this.specular.isColor ) data.specular = this.specular.getHex(); + if ( this.specularIntensity !== undefined ) data.specularIntensity = this.specularIntensity; + if ( this.specularColor && this.specularColor.isColor ) data.specularColor = this.specularColor.getHex(); + if ( this.shininess !== undefined ) data.shininess = this.shininess; + if ( this.clearcoat !== undefined ) data.clearcoat = this.clearcoat; + if ( this.clearcoatRoughness !== undefined ) data.clearcoatRoughness = this.clearcoatRoughness; + + if ( this.clearcoatMap && this.clearcoatMap.isTexture ) { + + data.clearcoatMap = this.clearcoatMap.toJSON( meta ).uuid; + + } + + if ( this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture ) { + + data.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON( meta ).uuid; + + } + + if ( this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture ) { + + data.clearcoatNormalMap = this.clearcoatNormalMap.toJSON( meta ).uuid; + data.clearcoatNormalScale = this.clearcoatNormalScale.toArray(); + + } + + if ( this.dispersion !== undefined ) data.dispersion = this.dispersion; + + if ( this.iridescence !== undefined ) data.iridescence = this.iridescence; + if ( this.iridescenceIOR !== undefined ) data.iridescenceIOR = this.iridescenceIOR; + if ( this.iridescenceThicknessRange !== undefined ) data.iridescenceThicknessRange = this.iridescenceThicknessRange; + + if ( this.iridescenceMap && this.iridescenceMap.isTexture ) { + + data.iridescenceMap = this.iridescenceMap.toJSON( meta ).uuid; + + } + + if ( this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture ) { + + data.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON( meta ).uuid; + + } + + if ( this.anisotropy !== undefined ) data.anisotropy = this.anisotropy; + if ( this.anisotropyRotation !== undefined ) data.anisotropyRotation = this.anisotropyRotation; + + if ( this.anisotropyMap && this.anisotropyMap.isTexture ) { + + data.anisotropyMap = this.anisotropyMap.toJSON( meta ).uuid; + + } + + if ( this.map && this.map.isTexture ) data.map = this.map.toJSON( meta ).uuid; + if ( this.matcap && this.matcap.isTexture ) data.matcap = this.matcap.toJSON( meta ).uuid; + if ( this.alphaMap && this.alphaMap.isTexture ) data.alphaMap = this.alphaMap.toJSON( meta ).uuid; + + if ( this.lightMap && this.lightMap.isTexture ) { + + data.lightMap = this.lightMap.toJSON( meta ).uuid; + data.lightMapIntensity = this.lightMapIntensity; + + } + + if ( this.aoMap && this.aoMap.isTexture ) { + + data.aoMap = this.aoMap.toJSON( meta ).uuid; + data.aoMapIntensity = this.aoMapIntensity; + + } + + if ( this.bumpMap && this.bumpMap.isTexture ) { + + data.bumpMap = this.bumpMap.toJSON( meta ).uuid; + data.bumpScale = this.bumpScale; + + } + + if ( this.normalMap && this.normalMap.isTexture ) { + + data.normalMap = this.normalMap.toJSON( meta ).uuid; + data.normalMapType = this.normalMapType; + data.normalScale = this.normalScale.toArray(); + + } + + if ( this.displacementMap && this.displacementMap.isTexture ) { + + data.displacementMap = this.displacementMap.toJSON( meta ).uuid; + data.displacementScale = this.displacementScale; + data.displacementBias = this.displacementBias; + + } + + if ( this.roughnessMap && this.roughnessMap.isTexture ) data.roughnessMap = this.roughnessMap.toJSON( meta ).uuid; + if ( this.metalnessMap && this.metalnessMap.isTexture ) data.metalnessMap = this.metalnessMap.toJSON( meta ).uuid; + + if ( this.emissiveMap && this.emissiveMap.isTexture ) data.emissiveMap = this.emissiveMap.toJSON( meta ).uuid; + if ( this.specularMap && this.specularMap.isTexture ) data.specularMap = this.specularMap.toJSON( meta ).uuid; + if ( this.specularIntensityMap && this.specularIntensityMap.isTexture ) data.specularIntensityMap = this.specularIntensityMap.toJSON( meta ).uuid; + if ( this.specularColorMap && this.specularColorMap.isTexture ) data.specularColorMap = this.specularColorMap.toJSON( meta ).uuid; + + if ( this.envMap && this.envMap.isTexture ) { + + data.envMap = this.envMap.toJSON( meta ).uuid; + + if ( this.combine !== undefined ) data.combine = this.combine; + + } + + if ( this.envMapRotation !== undefined ) data.envMapRotation = this.envMapRotation.toArray(); + if ( this.envMapIntensity !== undefined ) data.envMapIntensity = this.envMapIntensity; + if ( this.reflectivity !== undefined ) data.reflectivity = this.reflectivity; + if ( this.refractionRatio !== undefined ) data.refractionRatio = this.refractionRatio; + + if ( this.gradientMap && this.gradientMap.isTexture ) { + + data.gradientMap = this.gradientMap.toJSON( meta ).uuid; + + } + + if ( this.transmission !== undefined ) data.transmission = this.transmission; + if ( this.transmissionMap && this.transmissionMap.isTexture ) data.transmissionMap = this.transmissionMap.toJSON( meta ).uuid; + if ( this.thickness !== undefined ) data.thickness = this.thickness; + if ( this.thicknessMap && this.thicknessMap.isTexture ) data.thicknessMap = this.thicknessMap.toJSON( meta ).uuid; + if ( this.attenuationDistance !== undefined && this.attenuationDistance !== Infinity ) data.attenuationDistance = this.attenuationDistance; + if ( this.attenuationColor !== undefined ) data.attenuationColor = this.attenuationColor.getHex(); + + if ( this.size !== undefined ) data.size = this.size; + if ( this.shadowSide !== null ) data.shadowSide = this.shadowSide; + if ( this.sizeAttenuation !== undefined ) data.sizeAttenuation = this.sizeAttenuation; + + if ( this.blending !== NormalBlending ) data.blending = this.blending; + if ( this.side !== FrontSide ) data.side = this.side; + if ( this.vertexColors === true ) data.vertexColors = true; + + if ( this.opacity < 1 ) data.opacity = this.opacity; + if ( this.transparent === true ) data.transparent = true; + + if ( this.blendSrc !== SrcAlphaFactor ) data.blendSrc = this.blendSrc; + if ( this.blendDst !== OneMinusSrcAlphaFactor ) data.blendDst = this.blendDst; + if ( this.blendEquation !== AddEquation ) data.blendEquation = this.blendEquation; + if ( this.blendSrcAlpha !== null ) data.blendSrcAlpha = this.blendSrcAlpha; + if ( this.blendDstAlpha !== null ) data.blendDstAlpha = this.blendDstAlpha; + if ( this.blendEquationAlpha !== null ) data.blendEquationAlpha = this.blendEquationAlpha; + if ( this.blendColor && this.blendColor.isColor ) data.blendColor = this.blendColor.getHex(); + if ( this.blendAlpha !== 0 ) data.blendAlpha = this.blendAlpha; + + if ( this.depthFunc !== LessEqualDepth ) data.depthFunc = this.depthFunc; + if ( this.depthTest === false ) data.depthTest = this.depthTest; + if ( this.depthWrite === false ) data.depthWrite = this.depthWrite; + if ( this.colorWrite === false ) data.colorWrite = this.colorWrite; + + if ( this.stencilWriteMask !== 0xff ) data.stencilWriteMask = this.stencilWriteMask; + if ( this.stencilFunc !== AlwaysStencilFunc ) data.stencilFunc = this.stencilFunc; + if ( this.stencilRef !== 0 ) data.stencilRef = this.stencilRef; + if ( this.stencilFuncMask !== 0xff ) data.stencilFuncMask = this.stencilFuncMask; + if ( this.stencilFail !== KeepStencilOp ) data.stencilFail = this.stencilFail; + if ( this.stencilZFail !== KeepStencilOp ) data.stencilZFail = this.stencilZFail; + if ( this.stencilZPass !== KeepStencilOp ) data.stencilZPass = this.stencilZPass; + if ( this.stencilWrite === true ) data.stencilWrite = this.stencilWrite; + + // rotation (SpriteMaterial) + if ( this.rotation !== undefined && this.rotation !== 0 ) data.rotation = this.rotation; + + if ( this.polygonOffset === true ) data.polygonOffset = true; + if ( this.polygonOffsetFactor !== 0 ) data.polygonOffsetFactor = this.polygonOffsetFactor; + if ( this.polygonOffsetUnits !== 0 ) data.polygonOffsetUnits = this.polygonOffsetUnits; + + if ( this.linewidth !== undefined && this.linewidth !== 1 ) data.linewidth = this.linewidth; + if ( this.dashSize !== undefined ) data.dashSize = this.dashSize; + if ( this.gapSize !== undefined ) data.gapSize = this.gapSize; + if ( this.scale !== undefined ) data.scale = this.scale; + + if ( this.dithering === true ) data.dithering = true; + + if ( this.alphaTest > 0 ) data.alphaTest = this.alphaTest; + if ( this.alphaHash === true ) data.alphaHash = true; + if ( this.alphaToCoverage === true ) data.alphaToCoverage = true; + if ( this.premultipliedAlpha === true ) data.premultipliedAlpha = true; + if ( this.forceSinglePass === true ) data.forceSinglePass = true; + + if ( this.wireframe === true ) data.wireframe = true; + if ( this.wireframeLinewidth > 1 ) data.wireframeLinewidth = this.wireframeLinewidth; + if ( this.wireframeLinecap !== 'round' ) data.wireframeLinecap = this.wireframeLinecap; + if ( this.wireframeLinejoin !== 'round' ) data.wireframeLinejoin = this.wireframeLinejoin; + + if ( this.flatShading === true ) data.flatShading = true; + + if ( this.visible === false ) data.visible = false; + + if ( this.toneMapped === false ) data.toneMapped = false; + + if ( this.fog === false ) data.fog = false; + + if ( Object.keys( this.userData ).length > 0 ) data.userData = this.userData; + + // TODO: Copied from Object3D.toJSON + + function extractFromCache( cache ) { + + const values = []; + + for ( const key in cache ) { + + const data = cache[ key ]; + delete data.metadata; + values.push( data ); + + } + + return values; + + } + + if ( isRootObject ) { + + const textures = extractFromCache( meta.textures ); + const images = extractFromCache( meta.images ); + + if ( textures.length > 0 ) data.textures = textures; + if ( images.length > 0 ) data.images = images; + + } + + return data; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( source ) { + + this.name = source.name; + + this.blending = source.blending; + this.side = source.side; + this.vertexColors = source.vertexColors; + + this.opacity = source.opacity; + this.transparent = source.transparent; + + this.blendSrc = source.blendSrc; + this.blendDst = source.blendDst; + this.blendEquation = source.blendEquation; + this.blendSrcAlpha = source.blendSrcAlpha; + this.blendDstAlpha = source.blendDstAlpha; + this.blendEquationAlpha = source.blendEquationAlpha; + this.blendColor.copy( source.blendColor ); + this.blendAlpha = source.blendAlpha; + + this.depthFunc = source.depthFunc; + this.depthTest = source.depthTest; + this.depthWrite = source.depthWrite; + + this.stencilWriteMask = source.stencilWriteMask; + this.stencilFunc = source.stencilFunc; + this.stencilRef = source.stencilRef; + this.stencilFuncMask = source.stencilFuncMask; + this.stencilFail = source.stencilFail; + this.stencilZFail = source.stencilZFail; + this.stencilZPass = source.stencilZPass; + this.stencilWrite = source.stencilWrite; + + const srcPlanes = source.clippingPlanes; + let dstPlanes = null; + + if ( srcPlanes !== null ) { + + const n = srcPlanes.length; + dstPlanes = new Array( n ); + + for ( let i = 0; i !== n; ++ i ) { + + dstPlanes[ i ] = srcPlanes[ i ].clone(); + + } + + } + + this.clippingPlanes = dstPlanes; + this.clipIntersection = source.clipIntersection; + this.clipShadows = source.clipShadows; + + this.shadowSide = source.shadowSide; + + this.colorWrite = source.colorWrite; + + this.precision = source.precision; + + this.polygonOffset = source.polygonOffset; + this.polygonOffsetFactor = source.polygonOffsetFactor; + this.polygonOffsetUnits = source.polygonOffsetUnits; + + this.dithering = source.dithering; + + this.alphaTest = source.alphaTest; + this.alphaHash = source.alphaHash; + this.alphaToCoverage = source.alphaToCoverage; + this.premultipliedAlpha = source.premultipliedAlpha; + this.forceSinglePass = source.forceSinglePass; + + this.visible = source.visible; + + this.toneMapped = source.toneMapped; + + this.userData = JSON.parse( JSON.stringify( source.userData ) ); + + return this; + + } + + dispose() { + + this.dispatchEvent( { type: 'dispose' } ); + + } + + set needsUpdate( value ) { + + if ( value === true ) this.version ++; + + } + +} + +class MeshBasicMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshBasicMaterial = true; + + this.type = 'MeshBasicMaterial'; + + this.color = new Color( 0xffffff ); // emissive + + this.map = null; + + this.lightMap = null; + this.lightMapIntensity = 1.0; + + this.aoMap = null; + this.aoMapIntensity = 1.0; + + this.specularMap = null; + + this.alphaMap = null; + + this.envMap = null; + this.envMapRotation = new Euler(); + this.combine = MultiplyOperation; + this.reflectivity = 1; + this.refractionRatio = 0.98; + + this.wireframe = false; + this.wireframeLinewidth = 1; + this.wireframeLinecap = 'round'; + this.wireframeLinejoin = 'round'; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.map = source.map; + + this.lightMap = source.lightMap; + this.lightMapIntensity = source.lightMapIntensity; + + this.aoMap = source.aoMap; + this.aoMapIntensity = source.aoMapIntensity; + + this.specularMap = source.specularMap; + + this.alphaMap = source.alphaMap; + + this.envMap = source.envMap; + this.envMapRotation.copy( source.envMapRotation ); + this.combine = source.combine; + this.reflectivity = source.reflectivity; + this.refractionRatio = source.refractionRatio; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + this.wireframeLinecap = source.wireframeLinecap; + this.wireframeLinejoin = source.wireframeLinejoin; + + this.fog = source.fog; + + return this; + + } + +} + +// Fast Half Float Conversions, http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf + +const _tables = /*@__PURE__*/ _generateTables(); + +function _generateTables() { + + // float32 to float16 helpers + + const buffer = new ArrayBuffer( 4 ); + const floatView = new Float32Array( buffer ); + const uint32View = new Uint32Array( buffer ); + + const baseTable = new Uint32Array( 512 ); + const shiftTable = new Uint32Array( 512 ); + + for ( let i = 0; i < 256; ++ i ) { + + const e = i - 127; + + // very small number (0, -0) + + if ( e < - 27 ) { + + baseTable[ i ] = 0x0000; + baseTable[ i | 0x100 ] = 0x8000; + shiftTable[ i ] = 24; + shiftTable[ i | 0x100 ] = 24; + + // small number (denorm) + + } else if ( e < - 14 ) { + + baseTable[ i ] = 0x0400 >> ( - e - 14 ); + baseTable[ i | 0x100 ] = ( 0x0400 >> ( - e - 14 ) ) | 0x8000; + shiftTable[ i ] = - e - 1; + shiftTable[ i | 0x100 ] = - e - 1; + + // normal number + + } else if ( e <= 15 ) { + + baseTable[ i ] = ( e + 15 ) << 10; + baseTable[ i | 0x100 ] = ( ( e + 15 ) << 10 ) | 0x8000; + shiftTable[ i ] = 13; + shiftTable[ i | 0x100 ] = 13; + + // large number (Infinity, -Infinity) + + } else if ( e < 128 ) { + + baseTable[ i ] = 0x7c00; + baseTable[ i | 0x100 ] = 0xfc00; + shiftTable[ i ] = 24; + shiftTable[ i | 0x100 ] = 24; + + // stay (NaN, Infinity, -Infinity) + + } else { + + baseTable[ i ] = 0x7c00; + baseTable[ i | 0x100 ] = 0xfc00; + shiftTable[ i ] = 13; + shiftTable[ i | 0x100 ] = 13; + + } + + } + + // float16 to float32 helpers + + const mantissaTable = new Uint32Array( 2048 ); + const exponentTable = new Uint32Array( 64 ); + const offsetTable = new Uint32Array( 64 ); + + for ( let i = 1; i < 1024; ++ i ) { + + let m = i << 13; // zero pad mantissa bits + let e = 0; // zero exponent + + // normalized + while ( ( m & 0x00800000 ) === 0 ) { + + m <<= 1; + e -= 0x00800000; // decrement exponent + + } + + m &= ~ 0x00800000; // clear leading 1 bit + e += 0x38800000; // adjust bias + + mantissaTable[ i ] = m | e; + + } + + for ( let i = 1024; i < 2048; ++ i ) { + + mantissaTable[ i ] = 0x38000000 + ( ( i - 1024 ) << 13 ); + + } + + for ( let i = 1; i < 31; ++ i ) { + + exponentTable[ i ] = i << 23; + + } + + exponentTable[ 31 ] = 0x47800000; + exponentTable[ 32 ] = 0x80000000; + + for ( let i = 33; i < 63; ++ i ) { + + exponentTable[ i ] = 0x80000000 + ( ( i - 32 ) << 23 ); + + } + + exponentTable[ 63 ] = 0xc7800000; + + for ( let i = 1; i < 64; ++ i ) { + + if ( i !== 32 ) { + + offsetTable[ i ] = 1024; + + } + + } + + return { + floatView: floatView, + uint32View: uint32View, + baseTable: baseTable, + shiftTable: shiftTable, + mantissaTable: mantissaTable, + exponentTable: exponentTable, + offsetTable: offsetTable + }; + +} + +// float32 to float16 + +function toHalfFloat( val ) { + + if ( Math.abs( val ) > 65504 ) console.warn( 'THREE.DataUtils.toHalfFloat(): Value out of range.' ); + + val = clamp( val, - 65504, 65504 ); + + _tables.floatView[ 0 ] = val; + const f = _tables.uint32View[ 0 ]; + const e = ( f >> 23 ) & 0x1ff; + return _tables.baseTable[ e ] + ( ( f & 0x007fffff ) >> _tables.shiftTable[ e ] ); + +} + +// float16 to float32 + +function fromHalfFloat( val ) { + + const m = val >> 10; + _tables.uint32View[ 0 ] = _tables.mantissaTable[ _tables.offsetTable[ m ] + ( val & 0x3ff ) ] + _tables.exponentTable[ m ]; + return _tables.floatView[ 0 ]; + +} + +const DataUtils = { + toHalfFloat: toHalfFloat, + fromHalfFloat: fromHalfFloat, +}; + +const _vector$9 = /*@__PURE__*/ new Vector3(); +const _vector2$1 = /*@__PURE__*/ new Vector2(); + +class BufferAttribute { + + constructor( array, itemSize, normalized = false ) { + + if ( Array.isArray( array ) ) { + + throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' ); + + } + + this.isBufferAttribute = true; + + this.name = ''; + + this.array = array; + this.itemSize = itemSize; + this.count = array !== undefined ? array.length / itemSize : 0; + this.normalized = normalized; + + this.usage = StaticDrawUsage; + this._updateRange = { offset: 0, count: - 1 }; + this.updateRanges = []; + this.gpuType = FloatType; + + this.version = 0; + + } + + onUploadCallback() {} + + set needsUpdate( value ) { + + if ( value === true ) this.version ++; + + } + + get updateRange() { + + warnOnce( 'THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.' ); // @deprecated, r159 + return this._updateRange; + + } + + setUsage( value ) { + + this.usage = value; + + return this; + + } + + addUpdateRange( start, count ) { + + this.updateRanges.push( { start, count } ); + + } + + clearUpdateRanges() { + + this.updateRanges.length = 0; + + } + + copy( source ) { + + this.name = source.name; + this.array = new source.array.constructor( source.array ); + this.itemSize = source.itemSize; + this.count = source.count; + this.normalized = source.normalized; + + this.usage = source.usage; + this.gpuType = source.gpuType; + + return this; + + } + + copyAt( index1, attribute, index2 ) { + + index1 *= this.itemSize; + index2 *= attribute.itemSize; + + for ( let i = 0, l = this.itemSize; i < l; i ++ ) { + + this.array[ index1 + i ] = attribute.array[ index2 + i ]; + + } + + return this; + + } + + copyArray( array ) { + + this.array.set( array ); + + return this; + + } + + applyMatrix3( m ) { + + if ( this.itemSize === 2 ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector2$1.fromBufferAttribute( this, i ); + _vector2$1.applyMatrix3( m ); + + this.setXY( i, _vector2$1.x, _vector2$1.y ); + + } + + } else if ( this.itemSize === 3 ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector$9.fromBufferAttribute( this, i ); + _vector$9.applyMatrix3( m ); + + this.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z ); + + } + + } + + return this; + + } + + applyMatrix4( m ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector$9.fromBufferAttribute( this, i ); + + _vector$9.applyMatrix4( m ); + + this.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z ); + + } + + return this; + + } + + applyNormalMatrix( m ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector$9.fromBufferAttribute( this, i ); + + _vector$9.applyNormalMatrix( m ); + + this.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z ); + + } + + return this; + + } + + transformDirection( m ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector$9.fromBufferAttribute( this, i ); + + _vector$9.transformDirection( m ); + + this.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z ); + + } + + return this; + + } + + set( value, offset = 0 ) { + + // Matching BufferAttribute constructor, do not normalize the array. + this.array.set( value, offset ); + + return this; + + } + + getComponent( index, component ) { + + let value = this.array[ index * this.itemSize + component ]; + + if ( this.normalized ) value = denormalize( value, this.array ); + + return value; + + } + + setComponent( index, component, value ) { + + if ( this.normalized ) value = normalize( value, this.array ); + + this.array[ index * this.itemSize + component ] = value; + + return this; + + } + + getX( index ) { + + let x = this.array[ index * this.itemSize ]; + + if ( this.normalized ) x = denormalize( x, this.array ); + + return x; + + } + + setX( index, x ) { + + if ( this.normalized ) x = normalize( x, this.array ); + + this.array[ index * this.itemSize ] = x; + + return this; + + } + + getY( index ) { + + let y = this.array[ index * this.itemSize + 1 ]; + + if ( this.normalized ) y = denormalize( y, this.array ); + + return y; + + } + + setY( index, y ) { + + if ( this.normalized ) y = normalize( y, this.array ); + + this.array[ index * this.itemSize + 1 ] = y; + + return this; + + } + + getZ( index ) { + + let z = this.array[ index * this.itemSize + 2 ]; + + if ( this.normalized ) z = denormalize( z, this.array ); + + return z; + + } + + setZ( index, z ) { + + if ( this.normalized ) z = normalize( z, this.array ); + + this.array[ index * this.itemSize + 2 ] = z; + + return this; + + } + + getW( index ) { + + let w = this.array[ index * this.itemSize + 3 ]; + + if ( this.normalized ) w = denormalize( w, this.array ); + + return w; + + } + + setW( index, w ) { + + if ( this.normalized ) w = normalize( w, this.array ); + + this.array[ index * this.itemSize + 3 ] = w; + + return this; + + } + + setXY( index, x, y ) { + + index *= this.itemSize; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + + } + + this.array[ index + 0 ] = x; + this.array[ index + 1 ] = y; + + return this; + + } + + setXYZ( index, x, y, z ) { + + index *= this.itemSize; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + z = normalize( z, this.array ); + + } + + this.array[ index + 0 ] = x; + this.array[ index + 1 ] = y; + this.array[ index + 2 ] = z; + + return this; + + } + + setXYZW( index, x, y, z, w ) { + + index *= this.itemSize; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + z = normalize( z, this.array ); + w = normalize( w, this.array ); + + } + + this.array[ index + 0 ] = x; + this.array[ index + 1 ] = y; + this.array[ index + 2 ] = z; + this.array[ index + 3 ] = w; + + return this; + + } + + onUpload( callback ) { + + this.onUploadCallback = callback; + + return this; + + } + + clone() { + + return new this.constructor( this.array, this.itemSize ).copy( this ); + + } + + toJSON() { + + const data = { + itemSize: this.itemSize, + type: this.array.constructor.name, + array: Array.from( this.array ), + normalized: this.normalized + }; + + if ( this.name !== '' ) data.name = this.name; + if ( this.usage !== StaticDrawUsage ) data.usage = this.usage; + + return data; + + } + +} + +// + +class Int8BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Int8Array( array ), itemSize, normalized ); + + } + +} + +class Uint8BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Uint8Array( array ), itemSize, normalized ); + + } + +} + +class Uint8ClampedBufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Uint8ClampedArray( array ), itemSize, normalized ); + + } + +} + +class Int16BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Int16Array( array ), itemSize, normalized ); + + } + +} + +class Uint16BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Uint16Array( array ), itemSize, normalized ); + + } + +} + +class Int32BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Int32Array( array ), itemSize, normalized ); + + } + +} + +class Uint32BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Uint32Array( array ), itemSize, normalized ); + + } + +} + +class Float16BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Uint16Array( array ), itemSize, normalized ); + + this.isFloat16BufferAttribute = true; + + } + + getX( index ) { + + let x = fromHalfFloat( this.array[ index * this.itemSize ] ); + + if ( this.normalized ) x = denormalize( x, this.array ); + + return x; + + } + + setX( index, x ) { + + if ( this.normalized ) x = normalize( x, this.array ); + + this.array[ index * this.itemSize ] = toHalfFloat( x ); + + return this; + + } + + getY( index ) { + + let y = fromHalfFloat( this.array[ index * this.itemSize + 1 ] ); + + if ( this.normalized ) y = denormalize( y, this.array ); + + return y; + + } + + setY( index, y ) { + + if ( this.normalized ) y = normalize( y, this.array ); + + this.array[ index * this.itemSize + 1 ] = toHalfFloat( y ); + + return this; + + } + + getZ( index ) { + + let z = fromHalfFloat( this.array[ index * this.itemSize + 2 ] ); + + if ( this.normalized ) z = denormalize( z, this.array ); + + return z; + + } + + setZ( index, z ) { + + if ( this.normalized ) z = normalize( z, this.array ); + + this.array[ index * this.itemSize + 2 ] = toHalfFloat( z ); + + return this; + + } + + getW( index ) { + + let w = fromHalfFloat( this.array[ index * this.itemSize + 3 ] ); + + if ( this.normalized ) w = denormalize( w, this.array ); + + return w; + + } + + setW( index, w ) { + + if ( this.normalized ) w = normalize( w, this.array ); + + this.array[ index * this.itemSize + 3 ] = toHalfFloat( w ); + + return this; + + } + + setXY( index, x, y ) { + + index *= this.itemSize; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + + } + + this.array[ index + 0 ] = toHalfFloat( x ); + this.array[ index + 1 ] = toHalfFloat( y ); + + return this; + + } + + setXYZ( index, x, y, z ) { + + index *= this.itemSize; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + z = normalize( z, this.array ); + + } + + this.array[ index + 0 ] = toHalfFloat( x ); + this.array[ index + 1 ] = toHalfFloat( y ); + this.array[ index + 2 ] = toHalfFloat( z ); + + return this; + + } + + setXYZW( index, x, y, z, w ) { + + index *= this.itemSize; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + z = normalize( z, this.array ); + w = normalize( w, this.array ); + + } + + this.array[ index + 0 ] = toHalfFloat( x ); + this.array[ index + 1 ] = toHalfFloat( y ); + this.array[ index + 2 ] = toHalfFloat( z ); + this.array[ index + 3 ] = toHalfFloat( w ); + + return this; + + } + +} + + +class Float32BufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized ) { + + super( new Float32Array( array ), itemSize, normalized ); + + } + +} + +let _id$2 = 0; + +const _m1$2 = /*@__PURE__*/ new Matrix4(); +const _obj = /*@__PURE__*/ new Object3D(); +const _offset = /*@__PURE__*/ new Vector3(); +const _box$2 = /*@__PURE__*/ new Box3(); +const _boxMorphTargets = /*@__PURE__*/ new Box3(); +const _vector$8 = /*@__PURE__*/ new Vector3(); + +class BufferGeometry extends EventDispatcher { + + constructor() { + + super(); + + this.isBufferGeometry = true; + + Object.defineProperty( this, 'id', { value: _id$2 ++ } ); + + this.uuid = generateUUID(); + + this.name = ''; + this.type = 'BufferGeometry'; + + this.index = null; + this.attributes = {}; + + this.morphAttributes = {}; + this.morphTargetsRelative = false; + + this.groups = []; + + this.boundingBox = null; + this.boundingSphere = null; + + this.drawRange = { start: 0, count: Infinity }; + + this.userData = {}; + + } + + getIndex() { + + return this.index; + + } + + setIndex( index ) { + + if ( Array.isArray( index ) ) { + + this.index = new ( arrayNeedsUint32( index ) ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 ); + + } else { + + this.index = index; + + } + + return this; + + } + + getAttribute( name ) { + + return this.attributes[ name ]; + + } + + setAttribute( name, attribute ) { + + this.attributes[ name ] = attribute; + + return this; + + } + + deleteAttribute( name ) { + + delete this.attributes[ name ]; + + return this; + + } + + hasAttribute( name ) { + + return this.attributes[ name ] !== undefined; + + } + + addGroup( start, count, materialIndex = 0 ) { + + this.groups.push( { + + start: start, + count: count, + materialIndex: materialIndex + + } ); + + } + + clearGroups() { + + this.groups = []; + + } + + setDrawRange( start, count ) { + + this.drawRange.start = start; + this.drawRange.count = count; + + } + + applyMatrix4( matrix ) { + + const position = this.attributes.position; + + if ( position !== undefined ) { + + position.applyMatrix4( matrix ); + + position.needsUpdate = true; + + } + + const normal = this.attributes.normal; + + if ( normal !== undefined ) { + + const normalMatrix = new Matrix3().getNormalMatrix( matrix ); + + normal.applyNormalMatrix( normalMatrix ); + + normal.needsUpdate = true; + + } + + const tangent = this.attributes.tangent; + + if ( tangent !== undefined ) { + + tangent.transformDirection( matrix ); + + tangent.needsUpdate = true; + + } + + if ( this.boundingBox !== null ) { + + this.computeBoundingBox(); + + } + + if ( this.boundingSphere !== null ) { + + this.computeBoundingSphere(); + + } + + return this; + + } + + applyQuaternion( q ) { + + _m1$2.makeRotationFromQuaternion( q ); + + this.applyMatrix4( _m1$2 ); + + return this; + + } + + rotateX( angle ) { + + // rotate geometry around world x-axis + + _m1$2.makeRotationX( angle ); + + this.applyMatrix4( _m1$2 ); + + return this; + + } + + rotateY( angle ) { + + // rotate geometry around world y-axis + + _m1$2.makeRotationY( angle ); + + this.applyMatrix4( _m1$2 ); + + return this; + + } + + rotateZ( angle ) { + + // rotate geometry around world z-axis + + _m1$2.makeRotationZ( angle ); + + this.applyMatrix4( _m1$2 ); + + return this; + + } + + translate( x, y, z ) { + + // translate geometry + + _m1$2.makeTranslation( x, y, z ); + + this.applyMatrix4( _m1$2 ); + + return this; + + } + + scale( x, y, z ) { + + // scale geometry + + _m1$2.makeScale( x, y, z ); + + this.applyMatrix4( _m1$2 ); + + return this; + + } + + lookAt( vector ) { + + _obj.lookAt( vector ); + + _obj.updateMatrix(); + + this.applyMatrix4( _obj.matrix ); + + return this; + + } + + center() { + + this.computeBoundingBox(); + + this.boundingBox.getCenter( _offset ).negate(); + + this.translate( _offset.x, _offset.y, _offset.z ); + + return this; + + } + + setFromPoints( points ) { + + const position = []; + + for ( let i = 0, l = points.length; i < l; i ++ ) { + + const point = points[ i ]; + position.push( point.x, point.y, point.z || 0 ); + + } + + this.setAttribute( 'position', new Float32BufferAttribute( position, 3 ) ); + + return this; + + } + + computeBoundingBox() { + + if ( this.boundingBox === null ) { + + this.boundingBox = new Box3(); + + } + + const position = this.attributes.position; + const morphAttributesPosition = this.morphAttributes.position; + + if ( position && position.isGLBufferAttribute ) { + + console.error( 'THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.', this ); + + this.boundingBox.set( + new Vector3( - Infinity, - Infinity, - Infinity ), + new Vector3( + Infinity, + Infinity, + Infinity ) + ); + + return; + + } + + if ( position !== undefined ) { + + this.boundingBox.setFromBufferAttribute( position ); + + // process morph attributes if present + + if ( morphAttributesPosition ) { + + for ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) { + + const morphAttribute = morphAttributesPosition[ i ]; + _box$2.setFromBufferAttribute( morphAttribute ); + + if ( this.morphTargetsRelative ) { + + _vector$8.addVectors( this.boundingBox.min, _box$2.min ); + this.boundingBox.expandByPoint( _vector$8 ); + + _vector$8.addVectors( this.boundingBox.max, _box$2.max ); + this.boundingBox.expandByPoint( _vector$8 ); + + } else { + + this.boundingBox.expandByPoint( _box$2.min ); + this.boundingBox.expandByPoint( _box$2.max ); + + } + + } + + } + + } else { + + this.boundingBox.makeEmpty(); + + } + + if ( isNaN( this.boundingBox.min.x ) || isNaN( this.boundingBox.min.y ) || isNaN( this.boundingBox.min.z ) ) { + + console.error( 'THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this ); + + } + + } + + computeBoundingSphere() { + + if ( this.boundingSphere === null ) { + + this.boundingSphere = new Sphere(); + + } + + const position = this.attributes.position; + const morphAttributesPosition = this.morphAttributes.position; + + if ( position && position.isGLBufferAttribute ) { + + console.error( 'THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.', this ); + + this.boundingSphere.set( new Vector3(), Infinity ); + + return; + + } + + if ( position ) { + + // first, find the center of the bounding sphere + + const center = this.boundingSphere.center; + + _box$2.setFromBufferAttribute( position ); + + // process morph attributes if present + + if ( morphAttributesPosition ) { + + for ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) { + + const morphAttribute = morphAttributesPosition[ i ]; + _boxMorphTargets.setFromBufferAttribute( morphAttribute ); + + if ( this.morphTargetsRelative ) { + + _vector$8.addVectors( _box$2.min, _boxMorphTargets.min ); + _box$2.expandByPoint( _vector$8 ); + + _vector$8.addVectors( _box$2.max, _boxMorphTargets.max ); + _box$2.expandByPoint( _vector$8 ); + + } else { + + _box$2.expandByPoint( _boxMorphTargets.min ); + _box$2.expandByPoint( _boxMorphTargets.max ); + + } + + } + + } + + _box$2.getCenter( center ); + + // second, try to find a boundingSphere with a radius smaller than the + // boundingSphere of the boundingBox: sqrt(3) smaller in the best case + + let maxRadiusSq = 0; + + for ( let i = 0, il = position.count; i < il; i ++ ) { + + _vector$8.fromBufferAttribute( position, i ); + + maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$8 ) ); + + } + + // process morph attributes if present + + if ( morphAttributesPosition ) { + + for ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) { + + const morphAttribute = morphAttributesPosition[ i ]; + const morphTargetsRelative = this.morphTargetsRelative; + + for ( let j = 0, jl = morphAttribute.count; j < jl; j ++ ) { + + _vector$8.fromBufferAttribute( morphAttribute, j ); + + if ( morphTargetsRelative ) { + + _offset.fromBufferAttribute( position, j ); + _vector$8.add( _offset ); + + } + + maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$8 ) ); + + } + + } + + } + + this.boundingSphere.radius = Math.sqrt( maxRadiusSq ); + + if ( isNaN( this.boundingSphere.radius ) ) { + + console.error( 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this ); + + } + + } + + } + + computeTangents() { + + const index = this.index; + const attributes = this.attributes; + + // based on http://www.terathon.com/code/tangent.html + // (per vertex tangents) + + if ( index === null || + attributes.position === undefined || + attributes.normal === undefined || + attributes.uv === undefined ) { + + console.error( 'THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)' ); + return; + + } + + const positionAttribute = attributes.position; + const normalAttribute = attributes.normal; + const uvAttribute = attributes.uv; + + if ( this.hasAttribute( 'tangent' ) === false ) { + + this.setAttribute( 'tangent', new BufferAttribute( new Float32Array( 4 * positionAttribute.count ), 4 ) ); + + } + + const tangentAttribute = this.getAttribute( 'tangent' ); + + const tan1 = [], tan2 = []; + + for ( let i = 0; i < positionAttribute.count; i ++ ) { + + tan1[ i ] = new Vector3(); + tan2[ i ] = new Vector3(); + + } + + const vA = new Vector3(), + vB = new Vector3(), + vC = new Vector3(), + + uvA = new Vector2(), + uvB = new Vector2(), + uvC = new Vector2(), + + sdir = new Vector3(), + tdir = new Vector3(); + + function handleTriangle( a, b, c ) { + + vA.fromBufferAttribute( positionAttribute, a ); + vB.fromBufferAttribute( positionAttribute, b ); + vC.fromBufferAttribute( positionAttribute, c ); + + uvA.fromBufferAttribute( uvAttribute, a ); + uvB.fromBufferAttribute( uvAttribute, b ); + uvC.fromBufferAttribute( uvAttribute, c ); + + vB.sub( vA ); + vC.sub( vA ); + + uvB.sub( uvA ); + uvC.sub( uvA ); + + const r = 1.0 / ( uvB.x * uvC.y - uvC.x * uvB.y ); + + // silently ignore degenerate uv triangles having coincident or colinear vertices + + if ( ! isFinite( r ) ) return; + + sdir.copy( vB ).multiplyScalar( uvC.y ).addScaledVector( vC, - uvB.y ).multiplyScalar( r ); + tdir.copy( vC ).multiplyScalar( uvB.x ).addScaledVector( vB, - uvC.x ).multiplyScalar( r ); + + tan1[ a ].add( sdir ); + tan1[ b ].add( sdir ); + tan1[ c ].add( sdir ); + + tan2[ a ].add( tdir ); + tan2[ b ].add( tdir ); + tan2[ c ].add( tdir ); + + } + + let groups = this.groups; + + if ( groups.length === 0 ) { + + groups = [ { + start: 0, + count: index.count + } ]; + + } + + for ( let i = 0, il = groups.length; i < il; ++ i ) { + + const group = groups[ i ]; + + const start = group.start; + const count = group.count; + + for ( let j = start, jl = start + count; j < jl; j += 3 ) { + + handleTriangle( + index.getX( j + 0 ), + index.getX( j + 1 ), + index.getX( j + 2 ) + ); + + } + + } + + const tmp = new Vector3(), tmp2 = new Vector3(); + const n = new Vector3(), n2 = new Vector3(); + + function handleVertex( v ) { + + n.fromBufferAttribute( normalAttribute, v ); + n2.copy( n ); + + const t = tan1[ v ]; + + // Gram-Schmidt orthogonalize + + tmp.copy( t ); + tmp.sub( n.multiplyScalar( n.dot( t ) ) ).normalize(); + + // Calculate handedness + + tmp2.crossVectors( n2, t ); + const test = tmp2.dot( tan2[ v ] ); + const w = ( test < 0.0 ) ? - 1.0 : 1.0; + + tangentAttribute.setXYZW( v, tmp.x, tmp.y, tmp.z, w ); + + } + + for ( let i = 0, il = groups.length; i < il; ++ i ) { + + const group = groups[ i ]; + + const start = group.start; + const count = group.count; + + for ( let j = start, jl = start + count; j < jl; j += 3 ) { + + handleVertex( index.getX( j + 0 ) ); + handleVertex( index.getX( j + 1 ) ); + handleVertex( index.getX( j + 2 ) ); + + } + + } + + } + + computeVertexNormals() { + + const index = this.index; + const positionAttribute = this.getAttribute( 'position' ); + + if ( positionAttribute !== undefined ) { + + let normalAttribute = this.getAttribute( 'normal' ); + + if ( normalAttribute === undefined ) { + + normalAttribute = new BufferAttribute( new Float32Array( positionAttribute.count * 3 ), 3 ); + this.setAttribute( 'normal', normalAttribute ); + + } else { + + // reset existing normals to zero + + for ( let i = 0, il = normalAttribute.count; i < il; i ++ ) { + + normalAttribute.setXYZ( i, 0, 0, 0 ); + + } + + } + + const pA = new Vector3(), pB = new Vector3(), pC = new Vector3(); + const nA = new Vector3(), nB = new Vector3(), nC = new Vector3(); + const cb = new Vector3(), ab = new Vector3(); + + // indexed elements + + if ( index ) { + + for ( let i = 0, il = index.count; i < il; i += 3 ) { + + const vA = index.getX( i + 0 ); + const vB = index.getX( i + 1 ); + const vC = index.getX( i + 2 ); + + pA.fromBufferAttribute( positionAttribute, vA ); + pB.fromBufferAttribute( positionAttribute, vB ); + pC.fromBufferAttribute( positionAttribute, vC ); + + cb.subVectors( pC, pB ); + ab.subVectors( pA, pB ); + cb.cross( ab ); + + nA.fromBufferAttribute( normalAttribute, vA ); + nB.fromBufferAttribute( normalAttribute, vB ); + nC.fromBufferAttribute( normalAttribute, vC ); + + nA.add( cb ); + nB.add( cb ); + nC.add( cb ); + + normalAttribute.setXYZ( vA, nA.x, nA.y, nA.z ); + normalAttribute.setXYZ( vB, nB.x, nB.y, nB.z ); + normalAttribute.setXYZ( vC, nC.x, nC.y, nC.z ); + + } + + } else { + + // non-indexed elements (unconnected triangle soup) + + for ( let i = 0, il = positionAttribute.count; i < il; i += 3 ) { + + pA.fromBufferAttribute( positionAttribute, i + 0 ); + pB.fromBufferAttribute( positionAttribute, i + 1 ); + pC.fromBufferAttribute( positionAttribute, i + 2 ); + + cb.subVectors( pC, pB ); + ab.subVectors( pA, pB ); + cb.cross( ab ); + + normalAttribute.setXYZ( i + 0, cb.x, cb.y, cb.z ); + normalAttribute.setXYZ( i + 1, cb.x, cb.y, cb.z ); + normalAttribute.setXYZ( i + 2, cb.x, cb.y, cb.z ); + + } + + } + + this.normalizeNormals(); + + normalAttribute.needsUpdate = true; + + } + + } + + normalizeNormals() { + + const normals = this.attributes.normal; + + for ( let i = 0, il = normals.count; i < il; i ++ ) { + + _vector$8.fromBufferAttribute( normals, i ); + + _vector$8.normalize(); + + normals.setXYZ( i, _vector$8.x, _vector$8.y, _vector$8.z ); + + } + + } + + toNonIndexed() { + + function convertBufferAttribute( attribute, indices ) { + + const array = attribute.array; + const itemSize = attribute.itemSize; + const normalized = attribute.normalized; + + const array2 = new array.constructor( indices.length * itemSize ); + + let index = 0, index2 = 0; + + for ( let i = 0, l = indices.length; i < l; i ++ ) { + + if ( attribute.isInterleavedBufferAttribute ) { + + index = indices[ i ] * attribute.data.stride + attribute.offset; + + } else { + + index = indices[ i ] * itemSize; + + } + + for ( let j = 0; j < itemSize; j ++ ) { + + array2[ index2 ++ ] = array[ index ++ ]; + + } + + } + + return new BufferAttribute( array2, itemSize, normalized ); + + } + + // + + if ( this.index === null ) { + + console.warn( 'THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.' ); + return this; + + } + + const geometry2 = new BufferGeometry(); + + const indices = this.index.array; + const attributes = this.attributes; + + // attributes + + for ( const name in attributes ) { + + const attribute = attributes[ name ]; + + const newAttribute = convertBufferAttribute( attribute, indices ); + + geometry2.setAttribute( name, newAttribute ); + + } + + // morph attributes + + const morphAttributes = this.morphAttributes; + + for ( const name in morphAttributes ) { + + const morphArray = []; + const morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes + + for ( let i = 0, il = morphAttribute.length; i < il; i ++ ) { + + const attribute = morphAttribute[ i ]; + + const newAttribute = convertBufferAttribute( attribute, indices ); + + morphArray.push( newAttribute ); + + } + + geometry2.morphAttributes[ name ] = morphArray; + + } + + geometry2.morphTargetsRelative = this.morphTargetsRelative; + + // groups + + const groups = this.groups; + + for ( let i = 0, l = groups.length; i < l; i ++ ) { + + const group = groups[ i ]; + geometry2.addGroup( group.start, group.count, group.materialIndex ); + + } + + return geometry2; + + } + + toJSON() { + + const data = { + metadata: { + version: 4.6, + type: 'BufferGeometry', + generator: 'BufferGeometry.toJSON' + } + }; + + // standard BufferGeometry serialization + + data.uuid = this.uuid; + data.type = this.type; + if ( this.name !== '' ) data.name = this.name; + if ( Object.keys( this.userData ).length > 0 ) data.userData = this.userData; + + if ( this.parameters !== undefined ) { + + const parameters = this.parameters; + + for ( const key in parameters ) { + + if ( parameters[ key ] !== undefined ) data[ key ] = parameters[ key ]; + + } + + return data; + + } + + // for simplicity the code assumes attributes are not shared across geometries, see #15811 + + data.data = { attributes: {} }; + + const index = this.index; + + if ( index !== null ) { + + data.data.index = { + type: index.array.constructor.name, + array: Array.prototype.slice.call( index.array ) + }; + + } + + const attributes = this.attributes; + + for ( const key in attributes ) { + + const attribute = attributes[ key ]; + + data.data.attributes[ key ] = attribute.toJSON( data.data ); + + } + + const morphAttributes = {}; + let hasMorphAttributes = false; + + for ( const key in this.morphAttributes ) { + + const attributeArray = this.morphAttributes[ key ]; + + const array = []; + + for ( let i = 0, il = attributeArray.length; i < il; i ++ ) { + + const attribute = attributeArray[ i ]; + + array.push( attribute.toJSON( data.data ) ); + + } + + if ( array.length > 0 ) { + + morphAttributes[ key ] = array; + + hasMorphAttributes = true; + + } + + } + + if ( hasMorphAttributes ) { + + data.data.morphAttributes = morphAttributes; + data.data.morphTargetsRelative = this.morphTargetsRelative; + + } + + const groups = this.groups; + + if ( groups.length > 0 ) { + + data.data.groups = JSON.parse( JSON.stringify( groups ) ); + + } + + const boundingSphere = this.boundingSphere; + + if ( boundingSphere !== null ) { + + data.data.boundingSphere = { + center: boundingSphere.center.toArray(), + radius: boundingSphere.radius + }; + + } + + return data; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( source ) { + + // reset + + this.index = null; + this.attributes = {}; + this.morphAttributes = {}; + this.groups = []; + this.boundingBox = null; + this.boundingSphere = null; + + // used for storing cloned, shared data + + const data = {}; + + // name + + this.name = source.name; + + // index + + const index = source.index; + + if ( index !== null ) { + + this.setIndex( index.clone( data ) ); + + } + + // attributes + + const attributes = source.attributes; + + for ( const name in attributes ) { + + const attribute = attributes[ name ]; + this.setAttribute( name, attribute.clone( data ) ); + + } + + // morph attributes + + const morphAttributes = source.morphAttributes; + + for ( const name in morphAttributes ) { + + const array = []; + const morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes + + for ( let i = 0, l = morphAttribute.length; i < l; i ++ ) { + + array.push( morphAttribute[ i ].clone( data ) ); + + } + + this.morphAttributes[ name ] = array; + + } + + this.morphTargetsRelative = source.morphTargetsRelative; + + // groups + + const groups = source.groups; + + for ( let i = 0, l = groups.length; i < l; i ++ ) { + + const group = groups[ i ]; + this.addGroup( group.start, group.count, group.materialIndex ); + + } + + // bounding box + + const boundingBox = source.boundingBox; + + if ( boundingBox !== null ) { + + this.boundingBox = boundingBox.clone(); + + } + + // bounding sphere + + const boundingSphere = source.boundingSphere; + + if ( boundingSphere !== null ) { + + this.boundingSphere = boundingSphere.clone(); + + } + + // draw range + + this.drawRange.start = source.drawRange.start; + this.drawRange.count = source.drawRange.count; + + // user data + + this.userData = source.userData; + + return this; + + } + + dispose() { + + this.dispatchEvent( { type: 'dispose' } ); + + } + +} + +const _inverseMatrix$3 = /*@__PURE__*/ new Matrix4(); +const _ray$3 = /*@__PURE__*/ new Ray(); +const _sphere$6 = /*@__PURE__*/ new Sphere(); +const _sphereHitAt = /*@__PURE__*/ new Vector3(); + +const _vA$1 = /*@__PURE__*/ new Vector3(); +const _vB$1 = /*@__PURE__*/ new Vector3(); +const _vC$1 = /*@__PURE__*/ new Vector3(); + +const _tempA = /*@__PURE__*/ new Vector3(); +const _morphA = /*@__PURE__*/ new Vector3(); + +const _uvA$1 = /*@__PURE__*/ new Vector2(); +const _uvB$1 = /*@__PURE__*/ new Vector2(); +const _uvC$1 = /*@__PURE__*/ new Vector2(); + +const _normalA = /*@__PURE__*/ new Vector3(); +const _normalB = /*@__PURE__*/ new Vector3(); +const _normalC = /*@__PURE__*/ new Vector3(); + +const _intersectionPoint = /*@__PURE__*/ new Vector3(); +const _intersectionPointWorld = /*@__PURE__*/ new Vector3(); + +class Mesh extends Object3D { + + constructor( geometry = new BufferGeometry(), material = new MeshBasicMaterial() ) { + + super(); + + this.isMesh = true; + + this.type = 'Mesh'; + + this.geometry = geometry; + this.material = material; + + this.updateMorphTargets(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + if ( source.morphTargetInfluences !== undefined ) { + + this.morphTargetInfluences = source.morphTargetInfluences.slice(); + + } + + if ( source.morphTargetDictionary !== undefined ) { + + this.morphTargetDictionary = Object.assign( {}, source.morphTargetDictionary ); + + } + + this.material = Array.isArray( source.material ) ? source.material.slice() : source.material; + this.geometry = source.geometry; + + return this; + + } + + updateMorphTargets() { + + const geometry = this.geometry; + + const morphAttributes = geometry.morphAttributes; + const keys = Object.keys( morphAttributes ); + + if ( keys.length > 0 ) { + + const morphAttribute = morphAttributes[ keys[ 0 ] ]; + + if ( morphAttribute !== undefined ) { + + this.morphTargetInfluences = []; + this.morphTargetDictionary = {}; + + for ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) { + + const name = morphAttribute[ m ].name || String( m ); + + this.morphTargetInfluences.push( 0 ); + this.morphTargetDictionary[ name ] = m; + + } + + } + + } + + } + + getVertexPosition( index, target ) { + + const geometry = this.geometry; + const position = geometry.attributes.position; + const morphPosition = geometry.morphAttributes.position; + const morphTargetsRelative = geometry.morphTargetsRelative; + + target.fromBufferAttribute( position, index ); + + const morphInfluences = this.morphTargetInfluences; + + if ( morphPosition && morphInfluences ) { + + _morphA.set( 0, 0, 0 ); + + for ( let i = 0, il = morphPosition.length; i < il; i ++ ) { + + const influence = morphInfluences[ i ]; + const morphAttribute = morphPosition[ i ]; + + if ( influence === 0 ) continue; + + _tempA.fromBufferAttribute( morphAttribute, index ); + + if ( morphTargetsRelative ) { + + _morphA.addScaledVector( _tempA, influence ); + + } else { + + _morphA.addScaledVector( _tempA.sub( target ), influence ); + + } + + } + + target.add( _morphA ); + + } + + return target; + + } + + raycast( raycaster, intersects ) { + + const geometry = this.geometry; + const material = this.material; + const matrixWorld = this.matrixWorld; + + if ( material === undefined ) return; + + // test with bounding sphere in world space + + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + + _sphere$6.copy( geometry.boundingSphere ); + _sphere$6.applyMatrix4( matrixWorld ); + + // check distance from ray origin to bounding sphere + + _ray$3.copy( raycaster.ray ).recast( raycaster.near ); + + if ( _sphere$6.containsPoint( _ray$3.origin ) === false ) { + + if ( _ray$3.intersectSphere( _sphere$6, _sphereHitAt ) === null ) return; + + if ( _ray$3.origin.distanceToSquared( _sphereHitAt ) > ( raycaster.far - raycaster.near ) ** 2 ) return; + + } + + // convert ray to local space of mesh + + _inverseMatrix$3.copy( matrixWorld ).invert(); + _ray$3.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$3 ); + + // test with bounding box in local space + + if ( geometry.boundingBox !== null ) { + + if ( _ray$3.intersectsBox( geometry.boundingBox ) === false ) return; + + } + + // test for intersections with geometry + + this._computeIntersections( raycaster, intersects, _ray$3 ); + + } + + _computeIntersections( raycaster, intersects, rayLocalSpace ) { + + let intersection; + + const geometry = this.geometry; + const material = this.material; + + const index = geometry.index; + const position = geometry.attributes.position; + const uv = geometry.attributes.uv; + const uv1 = geometry.attributes.uv1; + const normal = geometry.attributes.normal; + const groups = geometry.groups; + const drawRange = geometry.drawRange; + + if ( index !== null ) { + + // indexed buffer geometry + + if ( Array.isArray( material ) ) { + + for ( let i = 0, il = groups.length; i < il; i ++ ) { + + const group = groups[ i ]; + const groupMaterial = material[ group.materialIndex ]; + + const start = Math.max( group.start, drawRange.start ); + const end = Math.min( index.count, Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ) ); + + for ( let j = start, jl = end; j < jl; j += 3 ) { + + const a = index.getX( j ); + const b = index.getX( j + 1 ); + const c = index.getX( j + 2 ); + + intersection = checkGeometryIntersection( this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c ); + + if ( intersection ) { + + intersection.faceIndex = Math.floor( j / 3 ); // triangle number in indexed buffer semantics + intersection.face.materialIndex = group.materialIndex; + intersects.push( intersection ); + + } + + } + + } + + } else { + + const start = Math.max( 0, drawRange.start ); + const end = Math.min( index.count, ( drawRange.start + drawRange.count ) ); + + for ( let i = start, il = end; i < il; i += 3 ) { + + const a = index.getX( i ); + const b = index.getX( i + 1 ); + const c = index.getX( i + 2 ); + + intersection = checkGeometryIntersection( this, material, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c ); + + if ( intersection ) { + + intersection.faceIndex = Math.floor( i / 3 ); // triangle number in indexed buffer semantics + intersects.push( intersection ); + + } + + } + + } + + } else if ( position !== undefined ) { + + // non-indexed buffer geometry + + if ( Array.isArray( material ) ) { + + for ( let i = 0, il = groups.length; i < il; i ++ ) { + + const group = groups[ i ]; + const groupMaterial = material[ group.materialIndex ]; + + const start = Math.max( group.start, drawRange.start ); + const end = Math.min( position.count, Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ) ); + + for ( let j = start, jl = end; j < jl; j += 3 ) { + + const a = j; + const b = j + 1; + const c = j + 2; + + intersection = checkGeometryIntersection( this, groupMaterial, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c ); + + if ( intersection ) { + + intersection.faceIndex = Math.floor( j / 3 ); // triangle number in non-indexed buffer semantics + intersection.face.materialIndex = group.materialIndex; + intersects.push( intersection ); + + } + + } + + } + + } else { + + const start = Math.max( 0, drawRange.start ); + const end = Math.min( position.count, ( drawRange.start + drawRange.count ) ); + + for ( let i = start, il = end; i < il; i += 3 ) { + + const a = i; + const b = i + 1; + const c = i + 2; + + intersection = checkGeometryIntersection( this, material, raycaster, rayLocalSpace, uv, uv1, normal, a, b, c ); + + if ( intersection ) { + + intersection.faceIndex = Math.floor( i / 3 ); // triangle number in non-indexed buffer semantics + intersects.push( intersection ); + + } + + } + + } + + } + + } + +} + +function checkIntersection$1( object, material, raycaster, ray, pA, pB, pC, point ) { + + let intersect; + + if ( material.side === BackSide ) { + + intersect = ray.intersectTriangle( pC, pB, pA, true, point ); + + } else { + + intersect = ray.intersectTriangle( pA, pB, pC, ( material.side === FrontSide ), point ); + + } + + if ( intersect === null ) return null; + + _intersectionPointWorld.copy( point ); + _intersectionPointWorld.applyMatrix4( object.matrixWorld ); + + const distance = raycaster.ray.origin.distanceTo( _intersectionPointWorld ); + + if ( distance < raycaster.near || distance > raycaster.far ) return null; + + return { + distance: distance, + point: _intersectionPointWorld.clone(), + object: object + }; + +} + +function checkGeometryIntersection( object, material, raycaster, ray, uv, uv1, normal, a, b, c ) { + + object.getVertexPosition( a, _vA$1 ); + object.getVertexPosition( b, _vB$1 ); + object.getVertexPosition( c, _vC$1 ); + + const intersection = checkIntersection$1( object, material, raycaster, ray, _vA$1, _vB$1, _vC$1, _intersectionPoint ); + + if ( intersection ) { + + if ( uv ) { + + _uvA$1.fromBufferAttribute( uv, a ); + _uvB$1.fromBufferAttribute( uv, b ); + _uvC$1.fromBufferAttribute( uv, c ); + + intersection.uv = Triangle.getInterpolation( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() ); + + } + + if ( uv1 ) { + + _uvA$1.fromBufferAttribute( uv1, a ); + _uvB$1.fromBufferAttribute( uv1, b ); + _uvC$1.fromBufferAttribute( uv1, c ); + + intersection.uv1 = Triangle.getInterpolation( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() ); + + } + + if ( normal ) { + + _normalA.fromBufferAttribute( normal, a ); + _normalB.fromBufferAttribute( normal, b ); + _normalC.fromBufferAttribute( normal, c ); + + intersection.normal = Triangle.getInterpolation( _intersectionPoint, _vA$1, _vB$1, _vC$1, _normalA, _normalB, _normalC, new Vector3() ); + + if ( intersection.normal.dot( ray.direction ) > 0 ) { + + intersection.normal.multiplyScalar( - 1 ); + + } + + } + + const face = { + a: a, + b: b, + c: c, + normal: new Vector3(), + materialIndex: 0 + }; + + Triangle.getNormal( _vA$1, _vB$1, _vC$1, face.normal ); + + intersection.face = face; + + } + + return intersection; + +} + +class BoxGeometry extends BufferGeometry { + + constructor( width = 1, height = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1 ) { + + super(); + + this.type = 'BoxGeometry'; + + this.parameters = { + width: width, + height: height, + depth: depth, + widthSegments: widthSegments, + heightSegments: heightSegments, + depthSegments: depthSegments + }; + + const scope = this; + + // segments + + widthSegments = Math.floor( widthSegments ); + heightSegments = Math.floor( heightSegments ); + depthSegments = Math.floor( depthSegments ); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // helper variables + + let numberOfVertices = 0; + let groupStart = 0; + + // build each side of the box geometry + + buildPlane( 'z', 'y', 'x', - 1, - 1, depth, height, width, depthSegments, heightSegments, 0 ); // px + buildPlane( 'z', 'y', 'x', 1, - 1, depth, height, - width, depthSegments, heightSegments, 1 ); // nx + buildPlane( 'x', 'z', 'y', 1, 1, width, depth, height, widthSegments, depthSegments, 2 ); // py + buildPlane( 'x', 'z', 'y', 1, - 1, width, depth, - height, widthSegments, depthSegments, 3 ); // ny + buildPlane( 'x', 'y', 'z', 1, - 1, width, height, depth, widthSegments, heightSegments, 4 ); // pz + buildPlane( 'x', 'y', 'z', - 1, - 1, width, height, - depth, widthSegments, heightSegments, 5 ); // nz + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + function buildPlane( u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex ) { + + const segmentWidth = width / gridX; + const segmentHeight = height / gridY; + + const widthHalf = width / 2; + const heightHalf = height / 2; + const depthHalf = depth / 2; + + const gridX1 = gridX + 1; + const gridY1 = gridY + 1; + + let vertexCounter = 0; + let groupCount = 0; + + const vector = new Vector3(); + + // generate vertices, normals and uvs + + for ( let iy = 0; iy < gridY1; iy ++ ) { + + const y = iy * segmentHeight - heightHalf; + + for ( let ix = 0; ix < gridX1; ix ++ ) { + + const x = ix * segmentWidth - widthHalf; + + // set values to correct vector component + + vector[ u ] = x * udir; + vector[ v ] = y * vdir; + vector[ w ] = depthHalf; + + // now apply vector to vertex buffer + + vertices.push( vector.x, vector.y, vector.z ); + + // set values to correct vector component + + vector[ u ] = 0; + vector[ v ] = 0; + vector[ w ] = depth > 0 ? 1 : - 1; + + // now apply vector to normal buffer + + normals.push( vector.x, vector.y, vector.z ); + + // uvs + + uvs.push( ix / gridX ); + uvs.push( 1 - ( iy / gridY ) ); + + // counters + + vertexCounter += 1; + + } + + } + + // indices + + // 1. you need three indices to draw a single face + // 2. a single segment consists of two faces + // 3. so we need to generate six (2*3) indices per segment + + for ( let iy = 0; iy < gridY; iy ++ ) { + + for ( let ix = 0; ix < gridX; ix ++ ) { + + const a = numberOfVertices + ix + gridX1 * iy; + const b = numberOfVertices + ix + gridX1 * ( iy + 1 ); + const c = numberOfVertices + ( ix + 1 ) + gridX1 * ( iy + 1 ); + const d = numberOfVertices + ( ix + 1 ) + gridX1 * iy; + + // faces + + indices.push( a, b, d ); + indices.push( b, c, d ); + + // increase counter + + groupCount += 6; + + } + + } + + // add a group to the geometry. this will ensure multi material support + + scope.addGroup( groupStart, groupCount, materialIndex ); + + // calculate new start value for groups + + groupStart += groupCount; + + // update total number of vertices + + numberOfVertices += vertexCounter; + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new BoxGeometry( data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments ); + + } + +} + +/** + * Uniform Utilities + */ + +function cloneUniforms( src ) { + + const dst = {}; + + for ( const u in src ) { + + dst[ u ] = {}; + + for ( const p in src[ u ] ) { + + const property = src[ u ][ p ]; + + if ( property && ( property.isColor || + property.isMatrix3 || property.isMatrix4 || + property.isVector2 || property.isVector3 || property.isVector4 || + property.isTexture || property.isQuaternion ) ) { + + if ( property.isRenderTargetTexture ) { + + console.warn( 'UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms().' ); + dst[ u ][ p ] = null; + + } else { + + dst[ u ][ p ] = property.clone(); + + } + + } else if ( Array.isArray( property ) ) { + + dst[ u ][ p ] = property.slice(); + + } else { + + dst[ u ][ p ] = property; + + } + + } + + } + + return dst; + +} + +function mergeUniforms( uniforms ) { + + const merged = {}; + + for ( let u = 0; u < uniforms.length; u ++ ) { + + const tmp = cloneUniforms( uniforms[ u ] ); + + for ( const p in tmp ) { + + merged[ p ] = tmp[ p ]; + + } + + } + + return merged; + +} + +function cloneUniformsGroups( src ) { + + const dst = []; + + for ( let u = 0; u < src.length; u ++ ) { + + dst.push( src[ u ].clone() ); + + } + + return dst; + +} + +function getUnlitUniformColorSpace( renderer ) { + + const currentRenderTarget = renderer.getRenderTarget(); + + if ( currentRenderTarget === null ) { + + // https://github.com/mrdoob/three.js/pull/23937#issuecomment-1111067398 + return renderer.outputColorSpace; + + } + + // https://github.com/mrdoob/three.js/issues/27868 + if ( currentRenderTarget.isXRRenderTarget === true ) { + + return currentRenderTarget.texture.colorSpace; + + } + + return ColorManagement.workingColorSpace; + +} + +// Legacy + +const UniformsUtils = { clone: cloneUniforms, merge: mergeUniforms }; + +var default_vertex = "void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"; + +var default_fragment = "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}"; + +class ShaderMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isShaderMaterial = true; + + this.type = 'ShaderMaterial'; + + this.defines = {}; + this.uniforms = {}; + this.uniformsGroups = []; + + this.vertexShader = default_vertex; + this.fragmentShader = default_fragment; + + this.linewidth = 1; + + this.wireframe = false; + this.wireframeLinewidth = 1; + + this.fog = false; // set to use scene fog + this.lights = false; // set to use scene lights + this.clipping = false; // set to use user-defined clipping planes + + this.forceSinglePass = true; + + this.extensions = { + clipCullDistance: false, // set to use vertex shader clipping + multiDraw: false // set to use vertex shader multi_draw / enable gl_DrawID + }; + + // When rendered geometry doesn't include these attributes but the material does, + // use these default values in WebGL. This avoids errors when buffer data is missing. + this.defaultAttributeValues = { + 'color': [ 1, 1, 1 ], + 'uv': [ 0, 0 ], + 'uv1': [ 0, 0 ] + }; + + this.index0AttributeName = undefined; + this.uniformsNeedUpdate = false; + + this.glslVersion = null; + + if ( parameters !== undefined ) { + + this.setValues( parameters ); + + } + + } + + copy( source ) { + + super.copy( source ); + + this.fragmentShader = source.fragmentShader; + this.vertexShader = source.vertexShader; + + this.uniforms = cloneUniforms( source.uniforms ); + this.uniformsGroups = cloneUniformsGroups( source.uniformsGroups ); + + this.defines = Object.assign( {}, source.defines ); + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + + this.fog = source.fog; + this.lights = source.lights; + this.clipping = source.clipping; + + this.extensions = Object.assign( {}, source.extensions ); + + this.glslVersion = source.glslVersion; + + return this; + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + data.glslVersion = this.glslVersion; + data.uniforms = {}; + + for ( const name in this.uniforms ) { + + const uniform = this.uniforms[ name ]; + const value = uniform.value; + + if ( value && value.isTexture ) { + + data.uniforms[ name ] = { + type: 't', + value: value.toJSON( meta ).uuid + }; + + } else if ( value && value.isColor ) { + + data.uniforms[ name ] = { + type: 'c', + value: value.getHex() + }; + + } else if ( value && value.isVector2 ) { + + data.uniforms[ name ] = { + type: 'v2', + value: value.toArray() + }; + + } else if ( value && value.isVector3 ) { + + data.uniforms[ name ] = { + type: 'v3', + value: value.toArray() + }; + + } else if ( value && value.isVector4 ) { + + data.uniforms[ name ] = { + type: 'v4', + value: value.toArray() + }; + + } else if ( value && value.isMatrix3 ) { + + data.uniforms[ name ] = { + type: 'm3', + value: value.toArray() + }; + + } else if ( value && value.isMatrix4 ) { + + data.uniforms[ name ] = { + type: 'm4', + value: value.toArray() + }; + + } else { + + data.uniforms[ name ] = { + value: value + }; + + // note: the array variants v2v, v3v, v4v, m4v and tv are not supported so far + + } + + } + + if ( Object.keys( this.defines ).length > 0 ) data.defines = this.defines; + + data.vertexShader = this.vertexShader; + data.fragmentShader = this.fragmentShader; + + data.lights = this.lights; + data.clipping = this.clipping; + + const extensions = {}; + + for ( const key in this.extensions ) { + + if ( this.extensions[ key ] === true ) extensions[ key ] = true; + + } + + if ( Object.keys( extensions ).length > 0 ) data.extensions = extensions; + + return data; + + } + +} + +class Camera extends Object3D { + + constructor() { + + super(); + + this.isCamera = true; + + this.type = 'Camera'; + + this.matrixWorldInverse = new Matrix4(); + + this.projectionMatrix = new Matrix4(); + this.projectionMatrixInverse = new Matrix4(); + + this.coordinateSystem = WebGLCoordinateSystem; + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.matrixWorldInverse.copy( source.matrixWorldInverse ); + + this.projectionMatrix.copy( source.projectionMatrix ); + this.projectionMatrixInverse.copy( source.projectionMatrixInverse ); + + this.coordinateSystem = source.coordinateSystem; + + return this; + + } + + getWorldDirection( target ) { + + return super.getWorldDirection( target ).negate(); + + } + + updateMatrixWorld( force ) { + + super.updateMatrixWorld( force ); + + this.matrixWorldInverse.copy( this.matrixWorld ).invert(); + + } + + updateWorldMatrix( updateParents, updateChildren ) { + + super.updateWorldMatrix( updateParents, updateChildren ); + + this.matrixWorldInverse.copy( this.matrixWorld ).invert(); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +const _v3$1 = /*@__PURE__*/ new Vector3(); +const _minTarget = /*@__PURE__*/ new Vector2(); +const _maxTarget = /*@__PURE__*/ new Vector2(); + + +class PerspectiveCamera extends Camera { + + constructor( fov = 50, aspect = 1, near = 0.1, far = 2000 ) { + + super(); + + this.isPerspectiveCamera = true; + + this.type = 'PerspectiveCamera'; + + this.fov = fov; + this.zoom = 1; + + this.near = near; + this.far = far; + this.focus = 10; + + this.aspect = aspect; + this.view = null; + + this.filmGauge = 35; // width of the film (default in millimeters) + this.filmOffset = 0; // horizontal film offset (same unit as gauge) + + this.updateProjectionMatrix(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.fov = source.fov; + this.zoom = source.zoom; + + this.near = source.near; + this.far = source.far; + this.focus = source.focus; + + this.aspect = source.aspect; + this.view = source.view === null ? null : Object.assign( {}, source.view ); + + this.filmGauge = source.filmGauge; + this.filmOffset = source.filmOffset; + + return this; + + } + + /** + * Sets the FOV by focal length in respect to the current .filmGauge. + * + * The default film gauge is 35, so that the focal length can be specified for + * a 35mm (full frame) camera. + * + * Values for focal length and film gauge must have the same unit. + */ + setFocalLength( focalLength ) { + + /** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */ + const vExtentSlope = 0.5 * this.getFilmHeight() / focalLength; + + this.fov = RAD2DEG * 2 * Math.atan( vExtentSlope ); + this.updateProjectionMatrix(); + + } + + /** + * Calculates the focal length from the current .fov and .filmGauge. + */ + getFocalLength() { + + const vExtentSlope = Math.tan( DEG2RAD * 0.5 * this.fov ); + + return 0.5 * this.getFilmHeight() / vExtentSlope; + + } + + getEffectiveFOV() { + + return RAD2DEG * 2 * Math.atan( + Math.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom ); + + } + + getFilmWidth() { + + // film not completely covered in portrait format (aspect < 1) + return this.filmGauge * Math.min( this.aspect, 1 ); + + } + + getFilmHeight() { + + // film not completely covered in landscape format (aspect > 1) + return this.filmGauge / Math.max( this.aspect, 1 ); + + } + + /** + * Computes the 2D bounds of the camera's viewable rectangle at a given distance along the viewing direction. + * Sets minTarget and maxTarget to the coordinates of the lower-left and upper-right corners of the view rectangle. + */ + getViewBounds( distance, minTarget, maxTarget ) { + + _v3$1.set( - 1, - 1, 0.5 ).applyMatrix4( this.projectionMatrixInverse ); + + minTarget.set( _v3$1.x, _v3$1.y ).multiplyScalar( - distance / _v3$1.z ); + + _v3$1.set( 1, 1, 0.5 ).applyMatrix4( this.projectionMatrixInverse ); + + maxTarget.set( _v3$1.x, _v3$1.y ).multiplyScalar( - distance / _v3$1.z ); + + } + + /** + * Computes the width and height of the camera's viewable rectangle at a given distance along the viewing direction. + * Copies the result into the target Vector2, where x is width and y is height. + */ + getViewSize( distance, target ) { + + this.getViewBounds( distance, _minTarget, _maxTarget ); + + return target.subVectors( _maxTarget, _minTarget ); + + } + + /** + * Sets an offset in a larger frustum. This is useful for multi-window or + * multi-monitor/multi-machine setups. + * + * For example, if you have 3x2 monitors and each monitor is 1920x1080 and + * the monitors are in grid like this + * + * +---+---+---+ + * | A | B | C | + * +---+---+---+ + * | D | E | F | + * +---+---+---+ + * + * then for each monitor you would call it like this + * + * const w = 1920; + * const h = 1080; + * const fullWidth = w * 3; + * const fullHeight = h * 2; + * + * --A-- + * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h ); + * --B-- + * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h ); + * --C-- + * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h ); + * --D-- + * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h ); + * --E-- + * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h ); + * --F-- + * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h ); + * + * Note there is no reason monitors have to be the same size or in a grid. + */ + setViewOffset( fullWidth, fullHeight, x, y, width, height ) { + + this.aspect = fullWidth / fullHeight; + + if ( this.view === null ) { + + this.view = { + enabled: true, + fullWidth: 1, + fullHeight: 1, + offsetX: 0, + offsetY: 0, + width: 1, + height: 1 + }; + + } + + this.view.enabled = true; + this.view.fullWidth = fullWidth; + this.view.fullHeight = fullHeight; + this.view.offsetX = x; + this.view.offsetY = y; + this.view.width = width; + this.view.height = height; + + this.updateProjectionMatrix(); + + } + + clearViewOffset() { + + if ( this.view !== null ) { + + this.view.enabled = false; + + } + + this.updateProjectionMatrix(); + + } + + updateProjectionMatrix() { + + const near = this.near; + let top = near * Math.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom; + let height = 2 * top; + let width = this.aspect * height; + let left = - 0.5 * width; + const view = this.view; + + if ( this.view !== null && this.view.enabled ) { + + const fullWidth = view.fullWidth, + fullHeight = view.fullHeight; + + left += view.offsetX * width / fullWidth; + top -= view.offsetY * height / fullHeight; + width *= view.width / fullWidth; + height *= view.height / fullHeight; + + } + + const skew = this.filmOffset; + if ( skew !== 0 ) left += near * skew / this.getFilmWidth(); + + this.projectionMatrix.makePerspective( left, left + width, top, top - height, near, this.far, this.coordinateSystem ); + + this.projectionMatrixInverse.copy( this.projectionMatrix ).invert(); + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + data.object.fov = this.fov; + data.object.zoom = this.zoom; + + data.object.near = this.near; + data.object.far = this.far; + data.object.focus = this.focus; + + data.object.aspect = this.aspect; + + if ( this.view !== null ) data.object.view = Object.assign( {}, this.view ); + + data.object.filmGauge = this.filmGauge; + data.object.filmOffset = this.filmOffset; + + return data; + + } + +} + +const fov = - 90; // negative fov is not an error +const aspect = 1; + +class CubeCamera extends Object3D { + + constructor( near, far, renderTarget ) { + + super(); + + this.type = 'CubeCamera'; + + this.renderTarget = renderTarget; + this.coordinateSystem = null; + this.activeMipmapLevel = 0; + + const cameraPX = new PerspectiveCamera( fov, aspect, near, far ); + cameraPX.layers = this.layers; + this.add( cameraPX ); + + const cameraNX = new PerspectiveCamera( fov, aspect, near, far ); + cameraNX.layers = this.layers; + this.add( cameraNX ); + + const cameraPY = new PerspectiveCamera( fov, aspect, near, far ); + cameraPY.layers = this.layers; + this.add( cameraPY ); + + const cameraNY = new PerspectiveCamera( fov, aspect, near, far ); + cameraNY.layers = this.layers; + this.add( cameraNY ); + + const cameraPZ = new PerspectiveCamera( fov, aspect, near, far ); + cameraPZ.layers = this.layers; + this.add( cameraPZ ); + + const cameraNZ = new PerspectiveCamera( fov, aspect, near, far ); + cameraNZ.layers = this.layers; + this.add( cameraNZ ); + + } + + updateCoordinateSystem() { + + const coordinateSystem = this.coordinateSystem; + + const cameras = this.children.concat(); + + const [ cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ ] = cameras; + + for ( const camera of cameras ) this.remove( camera ); + + if ( coordinateSystem === WebGLCoordinateSystem ) { + + cameraPX.up.set( 0, 1, 0 ); + cameraPX.lookAt( 1, 0, 0 ); + + cameraNX.up.set( 0, 1, 0 ); + cameraNX.lookAt( - 1, 0, 0 ); + + cameraPY.up.set( 0, 0, - 1 ); + cameraPY.lookAt( 0, 1, 0 ); + + cameraNY.up.set( 0, 0, 1 ); + cameraNY.lookAt( 0, - 1, 0 ); + + cameraPZ.up.set( 0, 1, 0 ); + cameraPZ.lookAt( 0, 0, 1 ); + + cameraNZ.up.set( 0, 1, 0 ); + cameraNZ.lookAt( 0, 0, - 1 ); + + } else if ( coordinateSystem === WebGPUCoordinateSystem ) { + + cameraPX.up.set( 0, - 1, 0 ); + cameraPX.lookAt( - 1, 0, 0 ); + + cameraNX.up.set( 0, - 1, 0 ); + cameraNX.lookAt( 1, 0, 0 ); + + cameraPY.up.set( 0, 0, 1 ); + cameraPY.lookAt( 0, 1, 0 ); + + cameraNY.up.set( 0, 0, - 1 ); + cameraNY.lookAt( 0, - 1, 0 ); + + cameraPZ.up.set( 0, - 1, 0 ); + cameraPZ.lookAt( 0, 0, 1 ); + + cameraNZ.up.set( 0, - 1, 0 ); + cameraNZ.lookAt( 0, 0, - 1 ); + + } else { + + throw new Error( 'THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: ' + coordinateSystem ); + + } + + for ( const camera of cameras ) { + + this.add( camera ); + + camera.updateMatrixWorld(); + + } + + } + + update( renderer, scene ) { + + if ( this.parent === null ) this.updateMatrixWorld(); + + const { renderTarget, activeMipmapLevel } = this; + + if ( this.coordinateSystem !== renderer.coordinateSystem ) { + + this.coordinateSystem = renderer.coordinateSystem; + + this.updateCoordinateSystem(); + + } + + const [ cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ ] = this.children; + + const currentRenderTarget = renderer.getRenderTarget(); + const currentActiveCubeFace = renderer.getActiveCubeFace(); + const currentActiveMipmapLevel = renderer.getActiveMipmapLevel(); + + const currentXrEnabled = renderer.xr.enabled; + + renderer.xr.enabled = false; + + const generateMipmaps = renderTarget.texture.generateMipmaps; + + renderTarget.texture.generateMipmaps = false; + + renderer.setRenderTarget( renderTarget, 0, activeMipmapLevel ); + renderer.render( scene, cameraPX ); + + renderer.setRenderTarget( renderTarget, 1, activeMipmapLevel ); + renderer.render( scene, cameraNX ); + + renderer.setRenderTarget( renderTarget, 2, activeMipmapLevel ); + renderer.render( scene, cameraPY ); + + renderer.setRenderTarget( renderTarget, 3, activeMipmapLevel ); + renderer.render( scene, cameraNY ); + + renderer.setRenderTarget( renderTarget, 4, activeMipmapLevel ); + renderer.render( scene, cameraPZ ); + + // mipmaps are generated during the last call of render() + // at this point, all sides of the cube render target are defined + + renderTarget.texture.generateMipmaps = generateMipmaps; + + renderer.setRenderTarget( renderTarget, 5, activeMipmapLevel ); + renderer.render( scene, cameraNZ ); + + renderer.setRenderTarget( currentRenderTarget, currentActiveCubeFace, currentActiveMipmapLevel ); + + renderer.xr.enabled = currentXrEnabled; + + renderTarget.texture.needsPMREMUpdate = true; + + } + +} + +class CubeTexture extends Texture { + + constructor( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace ) { + + images = images !== undefined ? images : []; + mapping = mapping !== undefined ? mapping : CubeReflectionMapping; + + super( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace ); + + this.isCubeTexture = true; + + this.flipY = false; + + } + + get images() { + + return this.image; + + } + + set images( value ) { + + this.image = value; + + } + +} + +class WebGLCubeRenderTarget extends WebGLRenderTarget { + + constructor( size = 1, options = {} ) { + + super( size, size, options ); + + this.isWebGLCubeRenderTarget = true; + + const image = { width: size, height: size, depth: 1 }; + const images = [ image, image, image, image, image, image ]; + + this.texture = new CubeTexture( images, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.colorSpace ); + + // By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js) + // in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words, + // in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly. + + // three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped + // and the flag isRenderTargetTexture controls this conversion. The flip is not required when using WebGLCubeRenderTarget.texture + // as a cube texture (this is detected when isRenderTargetTexture is set to true for cube textures). + + this.texture.isRenderTargetTexture = true; + + this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false; + this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter; + + } + + fromEquirectangularTexture( renderer, texture ) { + + this.texture.type = texture.type; + this.texture.colorSpace = texture.colorSpace; + + this.texture.generateMipmaps = texture.generateMipmaps; + this.texture.minFilter = texture.minFilter; + this.texture.magFilter = texture.magFilter; + + const shader = { + + uniforms: { + tEquirect: { value: null }, + }, + + vertexShader: /* glsl */` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `, + + fragmentShader: /* glsl */` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + ` + }; + + const geometry = new BoxGeometry( 5, 5, 5 ); + + const material = new ShaderMaterial( { + + name: 'CubemapFromEquirect', + + uniforms: cloneUniforms( shader.uniforms ), + vertexShader: shader.vertexShader, + fragmentShader: shader.fragmentShader, + side: BackSide, + blending: NoBlending + + } ); + + material.uniforms.tEquirect.value = texture; + + const mesh = new Mesh( geometry, material ); + + const currentMinFilter = texture.minFilter; + + // Avoid blurred poles + if ( texture.minFilter === LinearMipmapLinearFilter ) texture.minFilter = LinearFilter; + + const camera = new CubeCamera( 1, 10, this ); + camera.update( renderer, mesh ); + + texture.minFilter = currentMinFilter; + + mesh.geometry.dispose(); + mesh.material.dispose(); + + return this; + + } + + clear( renderer, color, depth, stencil ) { + + const currentRenderTarget = renderer.getRenderTarget(); + + for ( let i = 0; i < 6; i ++ ) { + + renderer.setRenderTarget( this, i ); + + renderer.clear( color, depth, stencil ); + + } + + renderer.setRenderTarget( currentRenderTarget ); + + } + +} + +const _vector1 = /*@__PURE__*/ new Vector3(); +const _vector2 = /*@__PURE__*/ new Vector3(); +const _normalMatrix = /*@__PURE__*/ new Matrix3(); + +class Plane { + + constructor( normal = new Vector3( 1, 0, 0 ), constant = 0 ) { + + this.isPlane = true; + + // normal is assumed to be normalized + + this.normal = normal; + this.constant = constant; + + } + + set( normal, constant ) { + + this.normal.copy( normal ); + this.constant = constant; + + return this; + + } + + setComponents( x, y, z, w ) { + + this.normal.set( x, y, z ); + this.constant = w; + + return this; + + } + + setFromNormalAndCoplanarPoint( normal, point ) { + + this.normal.copy( normal ); + this.constant = - point.dot( this.normal ); + + return this; + + } + + setFromCoplanarPoints( a, b, c ) { + + const normal = _vector1.subVectors( c, b ).cross( _vector2.subVectors( a, b ) ).normalize(); + + // Q: should an error be thrown if normal is zero (e.g. degenerate plane)? + + this.setFromNormalAndCoplanarPoint( normal, a ); + + return this; + + } + + copy( plane ) { + + this.normal.copy( plane.normal ); + this.constant = plane.constant; + + return this; + + } + + normalize() { + + // Note: will lead to a divide by zero if the plane is invalid. + + const inverseNormalLength = 1.0 / this.normal.length(); + this.normal.multiplyScalar( inverseNormalLength ); + this.constant *= inverseNormalLength; + + return this; + + } + + negate() { + + this.constant *= - 1; + this.normal.negate(); + + return this; + + } + + distanceToPoint( point ) { + + return this.normal.dot( point ) + this.constant; + + } + + distanceToSphere( sphere ) { + + return this.distanceToPoint( sphere.center ) - sphere.radius; + + } + + projectPoint( point, target ) { + + return target.copy( point ).addScaledVector( this.normal, - this.distanceToPoint( point ) ); + + } + + intersectLine( line, target ) { + + const direction = line.delta( _vector1 ); + + const denominator = this.normal.dot( direction ); + + if ( denominator === 0 ) { + + // line is coplanar, return origin + if ( this.distanceToPoint( line.start ) === 0 ) { + + return target.copy( line.start ); + + } + + // Unsure if this is the correct method to handle this case. + return null; + + } + + const t = - ( line.start.dot( this.normal ) + this.constant ) / denominator; + + if ( t < 0 || t > 1 ) { + + return null; + + } + + return target.copy( line.start ).addScaledVector( direction, t ); + + } + + intersectsLine( line ) { + + // Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it. + + const startSign = this.distanceToPoint( line.start ); + const endSign = this.distanceToPoint( line.end ); + + return ( startSign < 0 && endSign > 0 ) || ( endSign < 0 && startSign > 0 ); + + } + + intersectsBox( box ) { + + return box.intersectsPlane( this ); + + } + + intersectsSphere( sphere ) { + + return sphere.intersectsPlane( this ); + + } + + coplanarPoint( target ) { + + return target.copy( this.normal ).multiplyScalar( - this.constant ); + + } + + applyMatrix4( matrix, optionalNormalMatrix ) { + + const normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix( matrix ); + + const referencePoint = this.coplanarPoint( _vector1 ).applyMatrix4( matrix ); + + const normal = this.normal.applyMatrix3( normalMatrix ).normalize(); + + this.constant = - referencePoint.dot( normal ); + + return this; + + } + + translate( offset ) { + + this.constant -= offset.dot( this.normal ); + + return this; + + } + + equals( plane ) { + + return plane.normal.equals( this.normal ) && ( plane.constant === this.constant ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +const _sphere$5 = /*@__PURE__*/ new Sphere(); +const _vector$7 = /*@__PURE__*/ new Vector3(); + +class Frustum { + + constructor( p0 = new Plane(), p1 = new Plane(), p2 = new Plane(), p3 = new Plane(), p4 = new Plane(), p5 = new Plane() ) { + + this.planes = [ p0, p1, p2, p3, p4, p5 ]; + + } + + set( p0, p1, p2, p3, p4, p5 ) { + + const planes = this.planes; + + planes[ 0 ].copy( p0 ); + planes[ 1 ].copy( p1 ); + planes[ 2 ].copy( p2 ); + planes[ 3 ].copy( p3 ); + planes[ 4 ].copy( p4 ); + planes[ 5 ].copy( p5 ); + + return this; + + } + + copy( frustum ) { + + const planes = this.planes; + + for ( let i = 0; i < 6; i ++ ) { + + planes[ i ].copy( frustum.planes[ i ] ); + + } + + return this; + + } + + setFromProjectionMatrix( m, coordinateSystem = WebGLCoordinateSystem ) { + + const planes = this.planes; + const me = m.elements; + const me0 = me[ 0 ], me1 = me[ 1 ], me2 = me[ 2 ], me3 = me[ 3 ]; + const me4 = me[ 4 ], me5 = me[ 5 ], me6 = me[ 6 ], me7 = me[ 7 ]; + const me8 = me[ 8 ], me9 = me[ 9 ], me10 = me[ 10 ], me11 = me[ 11 ]; + const me12 = me[ 12 ], me13 = me[ 13 ], me14 = me[ 14 ], me15 = me[ 15 ]; + + planes[ 0 ].setComponents( me3 - me0, me7 - me4, me11 - me8, me15 - me12 ).normalize(); + planes[ 1 ].setComponents( me3 + me0, me7 + me4, me11 + me8, me15 + me12 ).normalize(); + planes[ 2 ].setComponents( me3 + me1, me7 + me5, me11 + me9, me15 + me13 ).normalize(); + planes[ 3 ].setComponents( me3 - me1, me7 - me5, me11 - me9, me15 - me13 ).normalize(); + planes[ 4 ].setComponents( me3 - me2, me7 - me6, me11 - me10, me15 - me14 ).normalize(); + + if ( coordinateSystem === WebGLCoordinateSystem ) { + + planes[ 5 ].setComponents( me3 + me2, me7 + me6, me11 + me10, me15 + me14 ).normalize(); + + } else if ( coordinateSystem === WebGPUCoordinateSystem ) { + + planes[ 5 ].setComponents( me2, me6, me10, me14 ).normalize(); + + } else { + + throw new Error( 'THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: ' + coordinateSystem ); + + } + + return this; + + } + + intersectsObject( object ) { + + if ( object.boundingSphere !== undefined ) { + + if ( object.boundingSphere === null ) object.computeBoundingSphere(); + + _sphere$5.copy( object.boundingSphere ).applyMatrix4( object.matrixWorld ); + + } else { + + const geometry = object.geometry; + + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + + _sphere$5.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld ); + + } + + return this.intersectsSphere( _sphere$5 ); + + } + + intersectsSprite( sprite ) { + + _sphere$5.center.set( 0, 0, 0 ); + _sphere$5.radius = 0.7071067811865476; + _sphere$5.applyMatrix4( sprite.matrixWorld ); + + return this.intersectsSphere( _sphere$5 ); + + } + + intersectsSphere( sphere ) { + + const planes = this.planes; + const center = sphere.center; + const negRadius = - sphere.radius; + + for ( let i = 0; i < 6; i ++ ) { + + const distance = planes[ i ].distanceToPoint( center ); + + if ( distance < negRadius ) { + + return false; + + } + + } + + return true; + + } + + intersectsBox( box ) { + + const planes = this.planes; + + for ( let i = 0; i < 6; i ++ ) { + + const plane = planes[ i ]; + + // corner at max distance + + _vector$7.x = plane.normal.x > 0 ? box.max.x : box.min.x; + _vector$7.y = plane.normal.y > 0 ? box.max.y : box.min.y; + _vector$7.z = plane.normal.z > 0 ? box.max.z : box.min.z; + + if ( plane.distanceToPoint( _vector$7 ) < 0 ) { + + return false; + + } + + } + + return true; + + } + + containsPoint( point ) { + + const planes = this.planes; + + for ( let i = 0; i < 6; i ++ ) { + + if ( planes[ i ].distanceToPoint( point ) < 0 ) { + + return false; + + } + + } + + return true; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +function WebGLAnimation() { + + let context = null; + let isAnimating = false; + let animationLoop = null; + let requestId = null; + + function onAnimationFrame( time, frame ) { + + animationLoop( time, frame ); + + requestId = context.requestAnimationFrame( onAnimationFrame ); + + } + + return { + + start: function () { + + if ( isAnimating === true ) return; + if ( animationLoop === null ) return; + + requestId = context.requestAnimationFrame( onAnimationFrame ); + + isAnimating = true; + + }, + + stop: function () { + + context.cancelAnimationFrame( requestId ); + + isAnimating = false; + + }, + + setAnimationLoop: function ( callback ) { + + animationLoop = callback; + + }, + + setContext: function ( value ) { + + context = value; + + } + + }; + +} + +function WebGLAttributes( gl ) { + + const buffers = new WeakMap(); + + function createBuffer( attribute, bufferType ) { + + const array = attribute.array; + const usage = attribute.usage; + const size = array.byteLength; + + const buffer = gl.createBuffer(); + + gl.bindBuffer( bufferType, buffer ); + gl.bufferData( bufferType, array, usage ); + + attribute.onUploadCallback(); + + let type; + + if ( array instanceof Float32Array ) { + + type = gl.FLOAT; + + } else if ( array instanceof Uint16Array ) { + + if ( attribute.isFloat16BufferAttribute ) { + + type = gl.HALF_FLOAT; + + } else { + + type = gl.UNSIGNED_SHORT; + + } + + } else if ( array instanceof Int16Array ) { + + type = gl.SHORT; + + } else if ( array instanceof Uint32Array ) { + + type = gl.UNSIGNED_INT; + + } else if ( array instanceof Int32Array ) { + + type = gl.INT; + + } else if ( array instanceof Int8Array ) { + + type = gl.BYTE; + + } else if ( array instanceof Uint8Array ) { + + type = gl.UNSIGNED_BYTE; + + } else if ( array instanceof Uint8ClampedArray ) { + + type = gl.UNSIGNED_BYTE; + + } else { + + throw new Error( 'THREE.WebGLAttributes: Unsupported buffer data format: ' + array ); + + } + + return { + buffer: buffer, + type: type, + bytesPerElement: array.BYTES_PER_ELEMENT, + version: attribute.version, + size: size + }; + + } + + function updateBuffer( buffer, attribute, bufferType ) { + + const array = attribute.array; + const updateRange = attribute._updateRange; // @deprecated, r159 + const updateRanges = attribute.updateRanges; + + gl.bindBuffer( bufferType, buffer ); + + if ( updateRange.count === - 1 && updateRanges.length === 0 ) { + + // Not using update ranges + gl.bufferSubData( bufferType, 0, array ); + + } + + if ( updateRanges.length !== 0 ) { + + for ( let i = 0, l = updateRanges.length; i < l; i ++ ) { + + const range = updateRanges[ i ]; + + gl.bufferSubData( bufferType, range.start * array.BYTES_PER_ELEMENT, + array, range.start, range.count ); + + } + + attribute.clearUpdateRanges(); + + } + + // @deprecated, r159 + if ( updateRange.count !== - 1 ) { + + gl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, + array, updateRange.offset, updateRange.count ); + + updateRange.count = - 1; // reset range + + } + + attribute.onUploadCallback(); + + } + + // + + function get( attribute ) { + + if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data; + + return buffers.get( attribute ); + + } + + function remove( attribute ) { + + if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data; + + const data = buffers.get( attribute ); + + if ( data ) { + + gl.deleteBuffer( data.buffer ); + + buffers.delete( attribute ); + + } + + } + + function update( attribute, bufferType ) { + + if ( attribute.isGLBufferAttribute ) { + + const cached = buffers.get( attribute ); + + if ( ! cached || cached.version < attribute.version ) { + + buffers.set( attribute, { + buffer: attribute.buffer, + type: attribute.type, + bytesPerElement: attribute.elementSize, + version: attribute.version + } ); + + } + + return; + + } + + if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data; + + const data = buffers.get( attribute ); + + if ( data === undefined ) { + + buffers.set( attribute, createBuffer( attribute, bufferType ) ); + + } else if ( data.version < attribute.version ) { + + if ( data.size !== attribute.array.byteLength ) { + + throw new Error( 'THREE.WebGLAttributes: The size of the buffer attribute\'s array buffer does not match the original size. Resizing buffer attributes is not supported.' ); + + } + + updateBuffer( data.buffer, attribute, bufferType ); + + data.version = attribute.version; + + } + + } + + return { + + get: get, + remove: remove, + update: update + + }; + +} + +class PlaneGeometry extends BufferGeometry { + + constructor( width = 1, height = 1, widthSegments = 1, heightSegments = 1 ) { + + super(); + + this.type = 'PlaneGeometry'; + + this.parameters = { + width: width, + height: height, + widthSegments: widthSegments, + heightSegments: heightSegments + }; + + const width_half = width / 2; + const height_half = height / 2; + + const gridX = Math.floor( widthSegments ); + const gridY = Math.floor( heightSegments ); + + const gridX1 = gridX + 1; + const gridY1 = gridY + 1; + + const segment_width = width / gridX; + const segment_height = height / gridY; + + // + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + for ( let iy = 0; iy < gridY1; iy ++ ) { + + const y = iy * segment_height - height_half; + + for ( let ix = 0; ix < gridX1; ix ++ ) { + + const x = ix * segment_width - width_half; + + vertices.push( x, - y, 0 ); + + normals.push( 0, 0, 1 ); + + uvs.push( ix / gridX ); + uvs.push( 1 - ( iy / gridY ) ); + + } + + } + + for ( let iy = 0; iy < gridY; iy ++ ) { + + for ( let ix = 0; ix < gridX; ix ++ ) { + + const a = ix + gridX1 * iy; + const b = ix + gridX1 * ( iy + 1 ); + const c = ( ix + 1 ) + gridX1 * ( iy + 1 ); + const d = ( ix + 1 ) + gridX1 * iy; + + indices.push( a, b, d ); + indices.push( b, c, d ); + + } + + } + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new PlaneGeometry( data.width, data.height, data.widthSegments, data.heightSegments ); + + } + +} + +var alphahash_fragment = "#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif"; + +var alphahash_pars_fragment = "#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif"; + +var alphamap_fragment = "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif"; + +var alphamap_pars_fragment = "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif"; + +var alphatest_fragment = "#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif"; + +var alphatest_pars_fragment = "#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif"; + +var aomap_fragment = "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif"; + +var aomap_pars_fragment = "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif"; + +var batching_pars_vertex = "#ifdef USE_BATCHING\n\tattribute float batchId;\n\tuniform highp sampler2D batchingTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif"; + +var batching_vertex = "#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( batchId );\n#endif"; + +var begin_vertex = "vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif"; + +var beginnormal_vertex = "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif"; + +var bsdfs = "float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated"; + +var iridescence_fragment = "#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif"; + +var bumpmap_pars_fragment = "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif"; + +var clipping_planes_fragment = "#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif"; + +var clipping_planes_pars_fragment = "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif"; + +var clipping_planes_pars_vertex = "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif"; + +var clipping_planes_vertex = "#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif"; + +var color_fragment = "#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif"; + +var color_pars_fragment = "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif"; + +var color_pars_vertex = "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif"; + +var color_vertex = "#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif"; + +var common = "#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated"; + +var cube_uv_reflection_fragment = "#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif"; + +var defaultnormal_vertex = "vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif"; + +var displacementmap_pars_vertex = "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif"; + +var displacementmap_vertex = "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif"; + +var emissivemap_fragment = "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif"; + +var emissivemap_pars_fragment = "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif"; + +var colorspace_fragment = "gl_FragColor = linearToOutputTexel( gl_FragColor );"; + +var colorspace_pars_fragment = "\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}"; + +var envmap_fragment = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif"; + +var envmap_common_pars_fragment = "#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif"; + +var envmap_pars_fragment = "#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif"; + +var envmap_pars_vertex = "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif"; + +var envmap_vertex = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif"; + +var fog_vertex = "#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif"; + +var fog_pars_vertex = "#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif"; + +var fog_fragment = "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif"; + +var fog_pars_fragment = "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif"; + +var gradientmap_pars_fragment = "#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}"; + +var lightmap_pars_fragment = "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif"; + +var lights_lambert_fragment = "LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;"; + +var lights_lambert_pars_fragment = "varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert"; + +var lights_pars_begin = "uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif"; + +var envmap_physical_pars_fragment = "#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif"; + +var lights_toon_fragment = "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;"; + +var lights_toon_pars_fragment = "varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon"; + +var lights_phong_fragment = "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;"; + +var lights_phong_pars_fragment = "varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong"; + +var lights_physical_fragment = "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif"; + +var lights_physical_pars_fragment = "struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}"; + +var lights_fragment_begin = "\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif"; + +var lights_fragment_maps = "#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif"; + +var lights_fragment_end = "#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif"; + +var logdepthbuf_fragment = "#if defined( USE_LOGDEPTHBUF )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif"; + +var logdepthbuf_pars_fragment = "#if defined( USE_LOGDEPTHBUF )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif"; + +var logdepthbuf_pars_vertex = "#ifdef USE_LOGDEPTHBUF\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif"; + +var logdepthbuf_vertex = "#ifdef USE_LOGDEPTHBUF\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif"; + +var map_fragment = "#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif"; + +var map_pars_fragment = "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif"; + +var map_particle_fragment = "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif"; + +var map_particle_pars_fragment = "#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif"; + +var metalnessmap_fragment = "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif"; + +var metalnessmap_pars_fragment = "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif"; + +var morphinstance_vertex = "#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[MORPHTARGETS_COUNT];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif"; + +var morphcolor_vertex = "#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif"; + +var morphnormal_vertex = "#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif"; + +var morphtarget_pars_vertex = "#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t#endif\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\t#ifndef USE_INSTANCING_MORPH\n\t\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\t#endif\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif"; + +var morphtarget_vertex = "#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif"; + +var normal_fragment_begin = "float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;"; + +var normal_fragment_maps = "#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif"; + +var normal_pars_fragment = "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif"; + +var normal_pars_vertex = "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif"; + +var normal_vertex = "#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif"; + +var normalmap_pars_fragment = "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif"; + +var clearcoat_normal_fragment_begin = "#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif"; + +var clearcoat_normal_fragment_maps = "#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif"; + +var clearcoat_pars_fragment = "#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif"; + +var iridescence_pars_fragment = "#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif"; + +var opaque_fragment = "#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );"; + +var packing = "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}"; + +var premultiplied_alpha_fragment = "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif"; + +var project_vertex = "vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;"; + +var dithering_fragment = "#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif"; + +var dithering_pars_fragment = "#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif"; + +var roughnessmap_fragment = "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif"; + +var roughnessmap_pars_fragment = "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif"; + +var shadowmap_pars_fragment = "#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\t\n\t\tfloat lightToPositionLength = length( lightToPosition );\n\t\tif ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\t\tdp += shadowBias;\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t\t) * ( 1.0 / 9.0 );\n\t\t\t#else\n\t\t\t\tshadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n#endif"; + +var shadowmap_pars_vertex = "#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif"; + +var shadowmap_vertex = "#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif"; + +var shadowmask_pars_fragment = "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}"; + +var skinbase_vertex = "#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif"; + +var skinning_pars_vertex = "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif"; + +var skinning_vertex = "#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif"; + +var skinnormal_vertex = "#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif"; + +var specularmap_fragment = "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif"; + +var specularmap_pars_fragment = "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif"; + +var tonemapping_fragment = "#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif"; + +var tonemapping_pars_fragment = "#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak < StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }"; + +var transmission_fragment = "#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif"; + +var transmission_pars_fragment = "#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif"; + +var uv_pars_fragment = "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif"; + +var uv_pars_vertex = "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif"; + +var uv_vertex = "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif"; + +var worldpos_vertex = "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif"; + +const vertex$h = "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}"; + +const fragment$h = "uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}"; + +const vertex$g = "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}"; + +const fragment$g = "#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}"; + +const vertex$f = "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}"; + +const fragment$f = "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}"; + +const vertex$e = "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}"; + +const fragment$e = "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}"; + +const vertex$d = "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}"; + +const fragment$d = "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}"; + +const vertex$c = "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}"; + +const fragment$c = "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}"; + +const vertex$b = "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const fragment$b = "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$a = "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const fragment$a = "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$9 = "#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const fragment$9 = "#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$8 = "#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}"; + +const fragment$8 = "#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$7 = "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}"; + +const fragment$7 = "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}"; + +const vertex$6 = "#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const fragment$6 = "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$5 = "#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}"; + +const fragment$5 = "#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$4 = "#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}"; + +const fragment$4 = "#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$3 = "uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const fragment$3 = "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const vertex$2 = "#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const fragment$2 = "uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}"; + +const vertex$1 = "uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}"; + +const fragment$1 = "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; + +const ShaderChunk = { + alphahash_fragment: alphahash_fragment, + alphahash_pars_fragment: alphahash_pars_fragment, + alphamap_fragment: alphamap_fragment, + alphamap_pars_fragment: alphamap_pars_fragment, + alphatest_fragment: alphatest_fragment, + alphatest_pars_fragment: alphatest_pars_fragment, + aomap_fragment: aomap_fragment, + aomap_pars_fragment: aomap_pars_fragment, + batching_pars_vertex: batching_pars_vertex, + batching_vertex: batching_vertex, + begin_vertex: begin_vertex, + beginnormal_vertex: beginnormal_vertex, + bsdfs: bsdfs, + iridescence_fragment: iridescence_fragment, + bumpmap_pars_fragment: bumpmap_pars_fragment, + clipping_planes_fragment: clipping_planes_fragment, + clipping_planes_pars_fragment: clipping_planes_pars_fragment, + clipping_planes_pars_vertex: clipping_planes_pars_vertex, + clipping_planes_vertex: clipping_planes_vertex, + color_fragment: color_fragment, + color_pars_fragment: color_pars_fragment, + color_pars_vertex: color_pars_vertex, + color_vertex: color_vertex, + common: common, + cube_uv_reflection_fragment: cube_uv_reflection_fragment, + defaultnormal_vertex: defaultnormal_vertex, + displacementmap_pars_vertex: displacementmap_pars_vertex, + displacementmap_vertex: displacementmap_vertex, + emissivemap_fragment: emissivemap_fragment, + emissivemap_pars_fragment: emissivemap_pars_fragment, + colorspace_fragment: colorspace_fragment, + colorspace_pars_fragment: colorspace_pars_fragment, + envmap_fragment: envmap_fragment, + envmap_common_pars_fragment: envmap_common_pars_fragment, + envmap_pars_fragment: envmap_pars_fragment, + envmap_pars_vertex: envmap_pars_vertex, + envmap_physical_pars_fragment: envmap_physical_pars_fragment, + envmap_vertex: envmap_vertex, + fog_vertex: fog_vertex, + fog_pars_vertex: fog_pars_vertex, + fog_fragment: fog_fragment, + fog_pars_fragment: fog_pars_fragment, + gradientmap_pars_fragment: gradientmap_pars_fragment, + lightmap_pars_fragment: lightmap_pars_fragment, + lights_lambert_fragment: lights_lambert_fragment, + lights_lambert_pars_fragment: lights_lambert_pars_fragment, + lights_pars_begin: lights_pars_begin, + lights_toon_fragment: lights_toon_fragment, + lights_toon_pars_fragment: lights_toon_pars_fragment, + lights_phong_fragment: lights_phong_fragment, + lights_phong_pars_fragment: lights_phong_pars_fragment, + lights_physical_fragment: lights_physical_fragment, + lights_physical_pars_fragment: lights_physical_pars_fragment, + lights_fragment_begin: lights_fragment_begin, + lights_fragment_maps: lights_fragment_maps, + lights_fragment_end: lights_fragment_end, + logdepthbuf_fragment: logdepthbuf_fragment, + logdepthbuf_pars_fragment: logdepthbuf_pars_fragment, + logdepthbuf_pars_vertex: logdepthbuf_pars_vertex, + logdepthbuf_vertex: logdepthbuf_vertex, + map_fragment: map_fragment, + map_pars_fragment: map_pars_fragment, + map_particle_fragment: map_particle_fragment, + map_particle_pars_fragment: map_particle_pars_fragment, + metalnessmap_fragment: metalnessmap_fragment, + metalnessmap_pars_fragment: metalnessmap_pars_fragment, + morphinstance_vertex: morphinstance_vertex, + morphcolor_vertex: morphcolor_vertex, + morphnormal_vertex: morphnormal_vertex, + morphtarget_pars_vertex: morphtarget_pars_vertex, + morphtarget_vertex: morphtarget_vertex, + normal_fragment_begin: normal_fragment_begin, + normal_fragment_maps: normal_fragment_maps, + normal_pars_fragment: normal_pars_fragment, + normal_pars_vertex: normal_pars_vertex, + normal_vertex: normal_vertex, + normalmap_pars_fragment: normalmap_pars_fragment, + clearcoat_normal_fragment_begin: clearcoat_normal_fragment_begin, + clearcoat_normal_fragment_maps: clearcoat_normal_fragment_maps, + clearcoat_pars_fragment: clearcoat_pars_fragment, + iridescence_pars_fragment: iridescence_pars_fragment, + opaque_fragment: opaque_fragment, + packing: packing, + premultiplied_alpha_fragment: premultiplied_alpha_fragment, + project_vertex: project_vertex, + dithering_fragment: dithering_fragment, + dithering_pars_fragment: dithering_pars_fragment, + roughnessmap_fragment: roughnessmap_fragment, + roughnessmap_pars_fragment: roughnessmap_pars_fragment, + shadowmap_pars_fragment: shadowmap_pars_fragment, + shadowmap_pars_vertex: shadowmap_pars_vertex, + shadowmap_vertex: shadowmap_vertex, + shadowmask_pars_fragment: shadowmask_pars_fragment, + skinbase_vertex: skinbase_vertex, + skinning_pars_vertex: skinning_pars_vertex, + skinning_vertex: skinning_vertex, + skinnormal_vertex: skinnormal_vertex, + specularmap_fragment: specularmap_fragment, + specularmap_pars_fragment: specularmap_pars_fragment, + tonemapping_fragment: tonemapping_fragment, + tonemapping_pars_fragment: tonemapping_pars_fragment, + transmission_fragment: transmission_fragment, + transmission_pars_fragment: transmission_pars_fragment, + uv_pars_fragment: uv_pars_fragment, + uv_pars_vertex: uv_pars_vertex, + uv_vertex: uv_vertex, + worldpos_vertex: worldpos_vertex, + + background_vert: vertex$h, + background_frag: fragment$h, + backgroundCube_vert: vertex$g, + backgroundCube_frag: fragment$g, + cube_vert: vertex$f, + cube_frag: fragment$f, + depth_vert: vertex$e, + depth_frag: fragment$e, + distanceRGBA_vert: vertex$d, + distanceRGBA_frag: fragment$d, + equirect_vert: vertex$c, + equirect_frag: fragment$c, + linedashed_vert: vertex$b, + linedashed_frag: fragment$b, + meshbasic_vert: vertex$a, + meshbasic_frag: fragment$a, + meshlambert_vert: vertex$9, + meshlambert_frag: fragment$9, + meshmatcap_vert: vertex$8, + meshmatcap_frag: fragment$8, + meshnormal_vert: vertex$7, + meshnormal_frag: fragment$7, + meshphong_vert: vertex$6, + meshphong_frag: fragment$6, + meshphysical_vert: vertex$5, + meshphysical_frag: fragment$5, + meshtoon_vert: vertex$4, + meshtoon_frag: fragment$4, + points_vert: vertex$3, + points_frag: fragment$3, + shadow_vert: vertex$2, + shadow_frag: fragment$2, + sprite_vert: vertex$1, + sprite_frag: fragment$1 +}; + +/** + * Uniforms library for shared webgl shaders + */ + +const UniformsLib = { + + common: { + + diffuse: { value: /*@__PURE__*/ new Color( 0xffffff ) }, + opacity: { value: 1.0 }, + + map: { value: null }, + mapTransform: { value: /*@__PURE__*/ new Matrix3() }, + + alphaMap: { value: null }, + alphaMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + + alphaTest: { value: 0 } + + }, + + specularmap: { + + specularMap: { value: null }, + specularMapTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + envmap: { + + envMap: { value: null }, + envMapRotation: { value: /*@__PURE__*/ new Matrix3() }, + flipEnvMap: { value: - 1 }, + reflectivity: { value: 1.0 }, // basic, lambert, phong + ior: { value: 1.5 }, // physical + refractionRatio: { value: 0.98 }, // basic, lambert, phong + + }, + + aomap: { + + aoMap: { value: null }, + aoMapIntensity: { value: 1 }, + aoMapTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + lightmap: { + + lightMap: { value: null }, + lightMapIntensity: { value: 1 }, + lightMapTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + bumpmap: { + + bumpMap: { value: null }, + bumpMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + bumpScale: { value: 1 } + + }, + + normalmap: { + + normalMap: { value: null }, + normalMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + normalScale: { value: /*@__PURE__*/ new Vector2( 1, 1 ) } + + }, + + displacementmap: { + + displacementMap: { value: null }, + displacementMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + displacementScale: { value: 1 }, + displacementBias: { value: 0 } + + }, + + emissivemap: { + + emissiveMap: { value: null }, + emissiveMapTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + metalnessmap: { + + metalnessMap: { value: null }, + metalnessMapTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + roughnessmap: { + + roughnessMap: { value: null }, + roughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + gradientmap: { + + gradientMap: { value: null } + + }, + + fog: { + + fogDensity: { value: 0.00025 }, + fogNear: { value: 1 }, + fogFar: { value: 2000 }, + fogColor: { value: /*@__PURE__*/ new Color( 0xffffff ) } + + }, + + lights: { + + ambientLightColor: { value: [] }, + + lightProbe: { value: [] }, + + directionalLights: { value: [], properties: { + direction: {}, + color: {} + } }, + + directionalLightShadows: { value: [], properties: { + shadowBias: {}, + shadowNormalBias: {}, + shadowRadius: {}, + shadowMapSize: {} + } }, + + directionalShadowMap: { value: [] }, + directionalShadowMatrix: { value: [] }, + + spotLights: { value: [], properties: { + color: {}, + position: {}, + direction: {}, + distance: {}, + coneCos: {}, + penumbraCos: {}, + decay: {} + } }, + + spotLightShadows: { value: [], properties: { + shadowBias: {}, + shadowNormalBias: {}, + shadowRadius: {}, + shadowMapSize: {} + } }, + + spotLightMap: { value: [] }, + spotShadowMap: { value: [] }, + spotLightMatrix: { value: [] }, + + pointLights: { value: [], properties: { + color: {}, + position: {}, + decay: {}, + distance: {} + } }, + + pointLightShadows: { value: [], properties: { + shadowBias: {}, + shadowNormalBias: {}, + shadowRadius: {}, + shadowMapSize: {}, + shadowCameraNear: {}, + shadowCameraFar: {} + } }, + + pointShadowMap: { value: [] }, + pointShadowMatrix: { value: [] }, + + hemisphereLights: { value: [], properties: { + direction: {}, + skyColor: {}, + groundColor: {} + } }, + + // TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src + rectAreaLights: { value: [], properties: { + color: {}, + position: {}, + width: {}, + height: {} + } }, + + ltc_1: { value: null }, + ltc_2: { value: null } + + }, + + points: { + + diffuse: { value: /*@__PURE__*/ new Color( 0xffffff ) }, + opacity: { value: 1.0 }, + size: { value: 1.0 }, + scale: { value: 1.0 }, + map: { value: null }, + alphaMap: { value: null }, + alphaMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + alphaTest: { value: 0 }, + uvTransform: { value: /*@__PURE__*/ new Matrix3() } + + }, + + sprite: { + + diffuse: { value: /*@__PURE__*/ new Color( 0xffffff ) }, + opacity: { value: 1.0 }, + center: { value: /*@__PURE__*/ new Vector2( 0.5, 0.5 ) }, + rotation: { value: 0.0 }, + map: { value: null }, + mapTransform: { value: /*@__PURE__*/ new Matrix3() }, + alphaMap: { value: null }, + alphaMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + alphaTest: { value: 0 } + + } + +}; + +const ShaderLib = { + + basic: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.specularmap, + UniformsLib.envmap, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.fog + ] ), + + vertexShader: ShaderChunk.meshbasic_vert, + fragmentShader: ShaderChunk.meshbasic_frag + + }, + + lambert: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.specularmap, + UniformsLib.envmap, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.emissivemap, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.fog, + UniformsLib.lights, + { + emissive: { value: /*@__PURE__*/ new Color( 0x000000 ) } + } + ] ), + + vertexShader: ShaderChunk.meshlambert_vert, + fragmentShader: ShaderChunk.meshlambert_frag + + }, + + phong: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.specularmap, + UniformsLib.envmap, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.emissivemap, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.fog, + UniformsLib.lights, + { + emissive: { value: /*@__PURE__*/ new Color( 0x000000 ) }, + specular: { value: /*@__PURE__*/ new Color( 0x111111 ) }, + shininess: { value: 30 } + } + ] ), + + vertexShader: ShaderChunk.meshphong_vert, + fragmentShader: ShaderChunk.meshphong_frag + + }, + + standard: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.envmap, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.emissivemap, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.roughnessmap, + UniformsLib.metalnessmap, + UniformsLib.fog, + UniformsLib.lights, + { + emissive: { value: /*@__PURE__*/ new Color( 0x000000 ) }, + roughness: { value: 1.0 }, + metalness: { value: 0.0 }, + envMapIntensity: { value: 1 } + } + ] ), + + vertexShader: ShaderChunk.meshphysical_vert, + fragmentShader: ShaderChunk.meshphysical_frag + + }, + + toon: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.aomap, + UniformsLib.lightmap, + UniformsLib.emissivemap, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.gradientmap, + UniformsLib.fog, + UniformsLib.lights, + { + emissive: { value: /*@__PURE__*/ new Color( 0x000000 ) } + } + ] ), + + vertexShader: ShaderChunk.meshtoon_vert, + fragmentShader: ShaderChunk.meshtoon_frag + + }, + + matcap: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + UniformsLib.fog, + { + matcap: { value: null } + } + ] ), + + vertexShader: ShaderChunk.meshmatcap_vert, + fragmentShader: ShaderChunk.meshmatcap_frag + + }, + + points: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.points, + UniformsLib.fog + ] ), + + vertexShader: ShaderChunk.points_vert, + fragmentShader: ShaderChunk.points_frag + + }, + + dashed: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.fog, + { + scale: { value: 1 }, + dashSize: { value: 1 }, + totalSize: { value: 2 } + } + ] ), + + vertexShader: ShaderChunk.linedashed_vert, + fragmentShader: ShaderChunk.linedashed_frag + + }, + + depth: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.displacementmap + ] ), + + vertexShader: ShaderChunk.depth_vert, + fragmentShader: ShaderChunk.depth_frag + + }, + + normal: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.bumpmap, + UniformsLib.normalmap, + UniformsLib.displacementmap, + { + opacity: { value: 1.0 } + } + ] ), + + vertexShader: ShaderChunk.meshnormal_vert, + fragmentShader: ShaderChunk.meshnormal_frag + + }, + + sprite: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.sprite, + UniformsLib.fog + ] ), + + vertexShader: ShaderChunk.sprite_vert, + fragmentShader: ShaderChunk.sprite_frag + + }, + + background: { + + uniforms: { + uvTransform: { value: /*@__PURE__*/ new Matrix3() }, + t2D: { value: null }, + backgroundIntensity: { value: 1 } + }, + + vertexShader: ShaderChunk.background_vert, + fragmentShader: ShaderChunk.background_frag + + }, + + backgroundCube: { + + uniforms: { + envMap: { value: null }, + flipEnvMap: { value: - 1 }, + backgroundBlurriness: { value: 0 }, + backgroundIntensity: { value: 1 }, + backgroundRotation: { value: /*@__PURE__*/ new Matrix3() } + }, + + vertexShader: ShaderChunk.backgroundCube_vert, + fragmentShader: ShaderChunk.backgroundCube_frag + + }, + + cube: { + + uniforms: { + tCube: { value: null }, + tFlip: { value: - 1 }, + opacity: { value: 1.0 } + }, + + vertexShader: ShaderChunk.cube_vert, + fragmentShader: ShaderChunk.cube_frag + + }, + + equirect: { + + uniforms: { + tEquirect: { value: null }, + }, + + vertexShader: ShaderChunk.equirect_vert, + fragmentShader: ShaderChunk.equirect_frag + + }, + + distanceRGBA: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.common, + UniformsLib.displacementmap, + { + referencePosition: { value: /*@__PURE__*/ new Vector3() }, + nearDistance: { value: 1 }, + farDistance: { value: 1000 } + } + ] ), + + vertexShader: ShaderChunk.distanceRGBA_vert, + fragmentShader: ShaderChunk.distanceRGBA_frag + + }, + + shadow: { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + UniformsLib.lights, + UniformsLib.fog, + { + color: { value: /*@__PURE__*/ new Color( 0x00000 ) }, + opacity: { value: 1.0 } + }, + ] ), + + vertexShader: ShaderChunk.shadow_vert, + fragmentShader: ShaderChunk.shadow_frag + + } + +}; + +ShaderLib.physical = { + + uniforms: /*@__PURE__*/ mergeUniforms( [ + ShaderLib.standard.uniforms, + { + clearcoat: { value: 0 }, + clearcoatMap: { value: null }, + clearcoatMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + clearcoatNormalMap: { value: null }, + clearcoatNormalMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + clearcoatNormalScale: { value: /*@__PURE__*/ new Vector2( 1, 1 ) }, + clearcoatRoughness: { value: 0 }, + clearcoatRoughnessMap: { value: null }, + clearcoatRoughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + dispersion: { value: 0 }, + iridescence: { value: 0 }, + iridescenceMap: { value: null }, + iridescenceMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + iridescenceIOR: { value: 1.3 }, + iridescenceThicknessMinimum: { value: 100 }, + iridescenceThicknessMaximum: { value: 400 }, + iridescenceThicknessMap: { value: null }, + iridescenceThicknessMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + sheen: { value: 0 }, + sheenColor: { value: /*@__PURE__*/ new Color( 0x000000 ) }, + sheenColorMap: { value: null }, + sheenColorMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + sheenRoughness: { value: 1 }, + sheenRoughnessMap: { value: null }, + sheenRoughnessMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + transmission: { value: 0 }, + transmissionMap: { value: null }, + transmissionMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + transmissionSamplerSize: { value: /*@__PURE__*/ new Vector2() }, + transmissionSamplerMap: { value: null }, + thickness: { value: 0 }, + thicknessMap: { value: null }, + thicknessMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + attenuationDistance: { value: 0 }, + attenuationColor: { value: /*@__PURE__*/ new Color( 0x000000 ) }, + specularColor: { value: /*@__PURE__*/ new Color( 1, 1, 1 ) }, + specularColorMap: { value: null }, + specularColorMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + specularIntensity: { value: 1 }, + specularIntensityMap: { value: null }, + specularIntensityMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + anisotropyVector: { value: /*@__PURE__*/ new Vector2() }, + anisotropyMap: { value: null }, + anisotropyMapTransform: { value: /*@__PURE__*/ new Matrix3() }, + } + ] ), + + vertexShader: ShaderChunk.meshphysical_vert, + fragmentShader: ShaderChunk.meshphysical_frag + +}; + +const _rgb = { r: 0, b: 0, g: 0 }; +const _e1$1 = /*@__PURE__*/ new Euler(); +const _m1$1 = /*@__PURE__*/ new Matrix4(); + +function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha, premultipliedAlpha ) { + + const clearColor = new Color( 0x000000 ); + let clearAlpha = alpha === true ? 0 : 1; + + let planeMesh; + let boxMesh; + + let currentBackground = null; + let currentBackgroundVersion = 0; + let currentTonemapping = null; + + function getBackground( scene ) { + + let background = scene.isScene === true ? scene.background : null; + + if ( background && background.isTexture ) { + + const usePMREM = scene.backgroundBlurriness > 0; // use PMREM if the user wants to blur the background + background = ( usePMREM ? cubeuvmaps : cubemaps ).get( background ); + + } + + return background; + + } + + function render( scene ) { + + let forceClear = false; + const background = getBackground( scene ); + + if ( background === null ) { + + setClear( clearColor, clearAlpha ); + + } else if ( background && background.isColor ) { + + setClear( background, 1 ); + forceClear = true; + + } + + const environmentBlendMode = renderer.xr.getEnvironmentBlendMode(); + + if ( environmentBlendMode === 'additive' ) { + + state.buffers.color.setClear( 0, 0, 0, 1, premultipliedAlpha ); + + } else if ( environmentBlendMode === 'alpha-blend' ) { + + state.buffers.color.setClear( 0, 0, 0, 0, premultipliedAlpha ); + + } + + if ( renderer.autoClear || forceClear ) { + + renderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil ); + + } + + } + + function addToRenderList( renderList, scene ) { + + const background = getBackground( scene ); + + if ( background && ( background.isCubeTexture || background.mapping === CubeUVReflectionMapping ) ) { + + if ( boxMesh === undefined ) { + + boxMesh = new Mesh( + new BoxGeometry( 1, 1, 1 ), + new ShaderMaterial( { + name: 'BackgroundCubeMaterial', + uniforms: cloneUniforms( ShaderLib.backgroundCube.uniforms ), + vertexShader: ShaderLib.backgroundCube.vertexShader, + fragmentShader: ShaderLib.backgroundCube.fragmentShader, + side: BackSide, + depthTest: false, + depthWrite: false, + fog: false + } ) + ); + + boxMesh.geometry.deleteAttribute( 'normal' ); + boxMesh.geometry.deleteAttribute( 'uv' ); + + boxMesh.onBeforeRender = function ( renderer, scene, camera ) { + + this.matrixWorld.copyPosition( camera.matrixWorld ); + + }; + + // add "envMap" material property so the renderer can evaluate it like for built-in materials + Object.defineProperty( boxMesh.material, 'envMap', { + + get: function () { + + return this.uniforms.envMap.value; + + } + + } ); + + objects.update( boxMesh ); + + } + + _e1$1.copy( scene.backgroundRotation ); + + // accommodate left-handed frame + _e1$1.x *= - 1; _e1$1.y *= - 1; _e1$1.z *= - 1; + + if ( background.isCubeTexture && background.isRenderTargetTexture === false ) { + + // environment maps which are not cube render targets or PMREMs follow a different convention + _e1$1.y *= - 1; + _e1$1.z *= - 1; + + } + + boxMesh.material.uniforms.envMap.value = background; + boxMesh.material.uniforms.flipEnvMap.value = ( background.isCubeTexture && background.isRenderTargetTexture === false ) ? - 1 : 1; + boxMesh.material.uniforms.backgroundBlurriness.value = scene.backgroundBlurriness; + boxMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity; + boxMesh.material.uniforms.backgroundRotation.value.setFromMatrix4( _m1$1.makeRotationFromEuler( _e1$1 ) ); + boxMesh.material.toneMapped = ColorManagement.getTransfer( background.colorSpace ) !== SRGBTransfer; + + if ( currentBackground !== background || + currentBackgroundVersion !== background.version || + currentTonemapping !== renderer.toneMapping ) { + + boxMesh.material.needsUpdate = true; + + currentBackground = background; + currentBackgroundVersion = background.version; + currentTonemapping = renderer.toneMapping; + + } + + boxMesh.layers.enableAll(); + + // push to the pre-sorted opaque render list + renderList.unshift( boxMesh, boxMesh.geometry, boxMesh.material, 0, 0, null ); + + } else if ( background && background.isTexture ) { + + if ( planeMesh === undefined ) { + + planeMesh = new Mesh( + new PlaneGeometry( 2, 2 ), + new ShaderMaterial( { + name: 'BackgroundMaterial', + uniforms: cloneUniforms( ShaderLib.background.uniforms ), + vertexShader: ShaderLib.background.vertexShader, + fragmentShader: ShaderLib.background.fragmentShader, + side: FrontSide, + depthTest: false, + depthWrite: false, + fog: false + } ) + ); + + planeMesh.geometry.deleteAttribute( 'normal' ); + + // add "map" material property so the renderer can evaluate it like for built-in materials + Object.defineProperty( planeMesh.material, 'map', { + + get: function () { + + return this.uniforms.t2D.value; + + } + + } ); + + objects.update( planeMesh ); + + } + + planeMesh.material.uniforms.t2D.value = background; + planeMesh.material.uniforms.backgroundIntensity.value = scene.backgroundIntensity; + planeMesh.material.toneMapped = ColorManagement.getTransfer( background.colorSpace ) !== SRGBTransfer; + + if ( background.matrixAutoUpdate === true ) { + + background.updateMatrix(); + + } + + planeMesh.material.uniforms.uvTransform.value.copy( background.matrix ); + + if ( currentBackground !== background || + currentBackgroundVersion !== background.version || + currentTonemapping !== renderer.toneMapping ) { + + planeMesh.material.needsUpdate = true; + + currentBackground = background; + currentBackgroundVersion = background.version; + currentTonemapping = renderer.toneMapping; + + } + + planeMesh.layers.enableAll(); + + // push to the pre-sorted opaque render list + renderList.unshift( planeMesh, planeMesh.geometry, planeMesh.material, 0, 0, null ); + + } + + } + + function setClear( color, alpha ) { + + color.getRGB( _rgb, getUnlitUniformColorSpace( renderer ) ); + + state.buffers.color.setClear( _rgb.r, _rgb.g, _rgb.b, alpha, premultipliedAlpha ); + + } + + return { + + getClearColor: function () { + + return clearColor; + + }, + setClearColor: function ( color, alpha = 1 ) { + + clearColor.set( color ); + clearAlpha = alpha; + setClear( clearColor, clearAlpha ); + + }, + getClearAlpha: function () { + + return clearAlpha; + + }, + setClearAlpha: function ( alpha ) { + + clearAlpha = alpha; + setClear( clearColor, clearAlpha ); + + }, + render: render, + addToRenderList: addToRenderList + + }; + +} + +function WebGLBindingStates( gl, attributes ) { + + const maxVertexAttributes = gl.getParameter( gl.MAX_VERTEX_ATTRIBS ); + + const bindingStates = {}; + + const defaultState = createBindingState( null ); + let currentState = defaultState; + let forceUpdate = false; + + function setup( object, material, program, geometry, index ) { + + let updateBuffers = false; + + const state = getBindingState( geometry, program, material ); + + if ( currentState !== state ) { + + currentState = state; + bindVertexArrayObject( currentState.object ); + + } + + updateBuffers = needsUpdate( object, geometry, program, index ); + + if ( updateBuffers ) saveCache( object, geometry, program, index ); + + if ( index !== null ) { + + attributes.update( index, gl.ELEMENT_ARRAY_BUFFER ); + + } + + if ( updateBuffers || forceUpdate ) { + + forceUpdate = false; + + setupVertexAttributes( object, material, program, geometry ); + + if ( index !== null ) { + + gl.bindBuffer( gl.ELEMENT_ARRAY_BUFFER, attributes.get( index ).buffer ); + + } + + } + + } + + function createVertexArrayObject() { + + return gl.createVertexArray(); + + } + + function bindVertexArrayObject( vao ) { + + return gl.bindVertexArray( vao ); + + } + + function deleteVertexArrayObject( vao ) { + + return gl.deleteVertexArray( vao ); + + } + + function getBindingState( geometry, program, material ) { + + const wireframe = ( material.wireframe === true ); + + let programMap = bindingStates[ geometry.id ]; + + if ( programMap === undefined ) { + + programMap = {}; + bindingStates[ geometry.id ] = programMap; + + } + + let stateMap = programMap[ program.id ]; + + if ( stateMap === undefined ) { + + stateMap = {}; + programMap[ program.id ] = stateMap; + + } + + let state = stateMap[ wireframe ]; + + if ( state === undefined ) { + + state = createBindingState( createVertexArrayObject() ); + stateMap[ wireframe ] = state; + + } + + return state; + + } + + function createBindingState( vao ) { + + const newAttributes = []; + const enabledAttributes = []; + const attributeDivisors = []; + + for ( let i = 0; i < maxVertexAttributes; i ++ ) { + + newAttributes[ i ] = 0; + enabledAttributes[ i ] = 0; + attributeDivisors[ i ] = 0; + + } + + return { + + // for backward compatibility on non-VAO support browser + geometry: null, + program: null, + wireframe: false, + + newAttributes: newAttributes, + enabledAttributes: enabledAttributes, + attributeDivisors: attributeDivisors, + object: vao, + attributes: {}, + index: null + + }; + + } + + function needsUpdate( object, geometry, program, index ) { + + const cachedAttributes = currentState.attributes; + const geometryAttributes = geometry.attributes; + + let attributesNum = 0; + + const programAttributes = program.getAttributes(); + + for ( const name in programAttributes ) { + + const programAttribute = programAttributes[ name ]; + + if ( programAttribute.location >= 0 ) { + + const cachedAttribute = cachedAttributes[ name ]; + let geometryAttribute = geometryAttributes[ name ]; + + if ( geometryAttribute === undefined ) { + + if ( name === 'instanceMatrix' && object.instanceMatrix ) geometryAttribute = object.instanceMatrix; + if ( name === 'instanceColor' && object.instanceColor ) geometryAttribute = object.instanceColor; + + } + + if ( cachedAttribute === undefined ) return true; + + if ( cachedAttribute.attribute !== geometryAttribute ) return true; + + if ( geometryAttribute && cachedAttribute.data !== geometryAttribute.data ) return true; + + attributesNum ++; + + } + + } + + if ( currentState.attributesNum !== attributesNum ) return true; + + if ( currentState.index !== index ) return true; + + return false; + + } + + function saveCache( object, geometry, program, index ) { + + const cache = {}; + const attributes = geometry.attributes; + let attributesNum = 0; + + const programAttributes = program.getAttributes(); + + for ( const name in programAttributes ) { + + const programAttribute = programAttributes[ name ]; + + if ( programAttribute.location >= 0 ) { + + let attribute = attributes[ name ]; + + if ( attribute === undefined ) { + + if ( name === 'instanceMatrix' && object.instanceMatrix ) attribute = object.instanceMatrix; + if ( name === 'instanceColor' && object.instanceColor ) attribute = object.instanceColor; + + } + + const data = {}; + data.attribute = attribute; + + if ( attribute && attribute.data ) { + + data.data = attribute.data; + + } + + cache[ name ] = data; + + attributesNum ++; + + } + + } + + currentState.attributes = cache; + currentState.attributesNum = attributesNum; + + currentState.index = index; + + } + + function initAttributes() { + + const newAttributes = currentState.newAttributes; + + for ( let i = 0, il = newAttributes.length; i < il; i ++ ) { + + newAttributes[ i ] = 0; + + } + + } + + function enableAttribute( attribute ) { + + enableAttributeAndDivisor( attribute, 0 ); + + } + + function enableAttributeAndDivisor( attribute, meshPerAttribute ) { + + const newAttributes = currentState.newAttributes; + const enabledAttributes = currentState.enabledAttributes; + const attributeDivisors = currentState.attributeDivisors; + + newAttributes[ attribute ] = 1; + + if ( enabledAttributes[ attribute ] === 0 ) { + + gl.enableVertexAttribArray( attribute ); + enabledAttributes[ attribute ] = 1; + + } + + if ( attributeDivisors[ attribute ] !== meshPerAttribute ) { + + gl.vertexAttribDivisor( attribute, meshPerAttribute ); + attributeDivisors[ attribute ] = meshPerAttribute; + + } + + } + + function disableUnusedAttributes() { + + const newAttributes = currentState.newAttributes; + const enabledAttributes = currentState.enabledAttributes; + + for ( let i = 0, il = enabledAttributes.length; i < il; i ++ ) { + + if ( enabledAttributes[ i ] !== newAttributes[ i ] ) { + + gl.disableVertexAttribArray( i ); + enabledAttributes[ i ] = 0; + + } + + } + + } + + function vertexAttribPointer( index, size, type, normalized, stride, offset, integer ) { + + if ( integer === true ) { + + gl.vertexAttribIPointer( index, size, type, stride, offset ); + + } else { + + gl.vertexAttribPointer( index, size, type, normalized, stride, offset ); + + } + + } + + function setupVertexAttributes( object, material, program, geometry ) { + + initAttributes(); + + const geometryAttributes = geometry.attributes; + + const programAttributes = program.getAttributes(); + + const materialDefaultAttributeValues = material.defaultAttributeValues; + + for ( const name in programAttributes ) { + + const programAttribute = programAttributes[ name ]; + + if ( programAttribute.location >= 0 ) { + + let geometryAttribute = geometryAttributes[ name ]; + + if ( geometryAttribute === undefined ) { + + if ( name === 'instanceMatrix' && object.instanceMatrix ) geometryAttribute = object.instanceMatrix; + if ( name === 'instanceColor' && object.instanceColor ) geometryAttribute = object.instanceColor; + + } + + if ( geometryAttribute !== undefined ) { + + const normalized = geometryAttribute.normalized; + const size = geometryAttribute.itemSize; + + const attribute = attributes.get( geometryAttribute ); + + // TODO Attribute may not be available on context restore + + if ( attribute === undefined ) continue; + + const buffer = attribute.buffer; + const type = attribute.type; + const bytesPerElement = attribute.bytesPerElement; + + // check for integer attributes + + const integer = ( type === gl.INT || type === gl.UNSIGNED_INT || geometryAttribute.gpuType === IntType ); + + if ( geometryAttribute.isInterleavedBufferAttribute ) { + + const data = geometryAttribute.data; + const stride = data.stride; + const offset = geometryAttribute.offset; + + if ( data.isInstancedInterleavedBuffer ) { + + for ( let i = 0; i < programAttribute.locationSize; i ++ ) { + + enableAttributeAndDivisor( programAttribute.location + i, data.meshPerAttribute ); + + } + + if ( object.isInstancedMesh !== true && geometry._maxInstanceCount === undefined ) { + + geometry._maxInstanceCount = data.meshPerAttribute * data.count; + + } + + } else { + + for ( let i = 0; i < programAttribute.locationSize; i ++ ) { + + enableAttribute( programAttribute.location + i ); + + } + + } + + gl.bindBuffer( gl.ARRAY_BUFFER, buffer ); + + for ( let i = 0; i < programAttribute.locationSize; i ++ ) { + + vertexAttribPointer( + programAttribute.location + i, + size / programAttribute.locationSize, + type, + normalized, + stride * bytesPerElement, + ( offset + ( size / programAttribute.locationSize ) * i ) * bytesPerElement, + integer + ); + + } + + } else { + + if ( geometryAttribute.isInstancedBufferAttribute ) { + + for ( let i = 0; i < programAttribute.locationSize; i ++ ) { + + enableAttributeAndDivisor( programAttribute.location + i, geometryAttribute.meshPerAttribute ); + + } + + if ( object.isInstancedMesh !== true && geometry._maxInstanceCount === undefined ) { + + geometry._maxInstanceCount = geometryAttribute.meshPerAttribute * geometryAttribute.count; + + } + + } else { + + for ( let i = 0; i < programAttribute.locationSize; i ++ ) { + + enableAttribute( programAttribute.location + i ); + + } + + } + + gl.bindBuffer( gl.ARRAY_BUFFER, buffer ); + + for ( let i = 0; i < programAttribute.locationSize; i ++ ) { + + vertexAttribPointer( + programAttribute.location + i, + size / programAttribute.locationSize, + type, + normalized, + size * bytesPerElement, + ( size / programAttribute.locationSize ) * i * bytesPerElement, + integer + ); + + } + + } + + } else if ( materialDefaultAttributeValues !== undefined ) { + + const value = materialDefaultAttributeValues[ name ]; + + if ( value !== undefined ) { + + switch ( value.length ) { + + case 2: + gl.vertexAttrib2fv( programAttribute.location, value ); + break; + + case 3: + gl.vertexAttrib3fv( programAttribute.location, value ); + break; + + case 4: + gl.vertexAttrib4fv( programAttribute.location, value ); + break; + + default: + gl.vertexAttrib1fv( programAttribute.location, value ); + + } + + } + + } + + } + + } + + disableUnusedAttributes(); + + } + + function dispose() { + + reset(); + + for ( const geometryId in bindingStates ) { + + const programMap = bindingStates[ geometryId ]; + + for ( const programId in programMap ) { + + const stateMap = programMap[ programId ]; + + for ( const wireframe in stateMap ) { + + deleteVertexArrayObject( stateMap[ wireframe ].object ); + + delete stateMap[ wireframe ]; + + } + + delete programMap[ programId ]; + + } + + delete bindingStates[ geometryId ]; + + } + + } + + function releaseStatesOfGeometry( geometry ) { + + if ( bindingStates[ geometry.id ] === undefined ) return; + + const programMap = bindingStates[ geometry.id ]; + + for ( const programId in programMap ) { + + const stateMap = programMap[ programId ]; + + for ( const wireframe in stateMap ) { + + deleteVertexArrayObject( stateMap[ wireframe ].object ); + + delete stateMap[ wireframe ]; + + } + + delete programMap[ programId ]; + + } + + delete bindingStates[ geometry.id ]; + + } + + function releaseStatesOfProgram( program ) { + + for ( const geometryId in bindingStates ) { + + const programMap = bindingStates[ geometryId ]; + + if ( programMap[ program.id ] === undefined ) continue; + + const stateMap = programMap[ program.id ]; + + for ( const wireframe in stateMap ) { + + deleteVertexArrayObject( stateMap[ wireframe ].object ); + + delete stateMap[ wireframe ]; + + } + + delete programMap[ program.id ]; + + } + + } + + function reset() { + + resetDefaultState(); + forceUpdate = true; + + if ( currentState === defaultState ) return; + + currentState = defaultState; + bindVertexArrayObject( currentState.object ); + + } + + // for backward-compatibility + + function resetDefaultState() { + + defaultState.geometry = null; + defaultState.program = null; + defaultState.wireframe = false; + + } + + return { + + setup: setup, + reset: reset, + resetDefaultState: resetDefaultState, + dispose: dispose, + releaseStatesOfGeometry: releaseStatesOfGeometry, + releaseStatesOfProgram: releaseStatesOfProgram, + + initAttributes: initAttributes, + enableAttribute: enableAttribute, + disableUnusedAttributes: disableUnusedAttributes + + }; + +} + +function WebGLBufferRenderer( gl, extensions, info ) { + + let mode; + + function setMode( value ) { + + mode = value; + + } + + function render( start, count ) { + + gl.drawArrays( mode, start, count ); + + info.update( count, mode, 1 ); + + } + + function renderInstances( start, count, primcount ) { + + if ( primcount === 0 ) return; + + gl.drawArraysInstanced( mode, start, count, primcount ); + + info.update( count, mode, primcount ); + + } + + function renderMultiDraw( starts, counts, drawCount ) { + + if ( drawCount === 0 ) return; + + const extension = extensions.get( 'WEBGL_multi_draw' ); + + if ( extension === null ) { + + for ( let i = 0; i < drawCount; i ++ ) { + + this.render( starts[ i ], counts[ i ] ); + + } + + } else { + + extension.multiDrawArraysWEBGL( mode, starts, 0, counts, 0, drawCount ); + + let elementCount = 0; + for ( let i = 0; i < drawCount; i ++ ) { + + elementCount += counts[ i ]; + + } + + info.update( elementCount, mode, 1 ); + + } + + } + + function renderMultiDrawInstances( starts, counts, drawCount, primcount ) { + + if ( drawCount === 0 ) return; + + const extension = extensions.get( 'WEBGL_multi_draw' ); + + if ( extension === null ) { + + for ( let i = 0; i < starts.length; i ++ ) { + + renderInstances( starts[ i ], counts[ i ], primcount[ i ] ); + + } + + } else { + + extension.multiDrawArraysInstancedWEBGL( mode, starts, 0, counts, 0, primcount, 0, drawCount ); + + let elementCount = 0; + for ( let i = 0; i < drawCount; i ++ ) { + + elementCount += counts[ i ]; + + } + + for ( let i = 0; i < primcount.length; i ++ ) { + + info.update( elementCount, mode, primcount[ i ] ); + + } + + } + + } + + // + + this.setMode = setMode; + this.render = render; + this.renderInstances = renderInstances; + this.renderMultiDraw = renderMultiDraw; + this.renderMultiDrawInstances = renderMultiDrawInstances; + +} + +function WebGLCapabilities( gl, extensions, parameters, utils ) { + + let maxAnisotropy; + + function getMaxAnisotropy() { + + if ( maxAnisotropy !== undefined ) return maxAnisotropy; + + if ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) { + + const extension = extensions.get( 'EXT_texture_filter_anisotropic' ); + + maxAnisotropy = gl.getParameter( extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT ); + + } else { + + maxAnisotropy = 0; + + } + + return maxAnisotropy; + + } + + function textureFormatReadable( textureFormat ) { + + if ( textureFormat !== RGBAFormat && utils.convert( textureFormat ) !== gl.getParameter( gl.IMPLEMENTATION_COLOR_READ_FORMAT ) ) { + + return false; + + } + + return true; + + } + + function textureTypeReadable( textureType ) { + + const halfFloatSupportedByExt = ( textureType === HalfFloatType ) && ( extensions.has( 'EXT_color_buffer_half_float' ) || extensions.has( 'EXT_color_buffer_float' ) ); + + if ( textureType !== UnsignedByteType && utils.convert( textureType ) !== gl.getParameter( gl.IMPLEMENTATION_COLOR_READ_TYPE ) && // Edge and Chrome Mac < 52 (#9513) + textureType !== FloatType && ! halfFloatSupportedByExt ) { + + return false; + + } + + return true; + + } + + function getMaxPrecision( precision ) { + + if ( precision === 'highp' ) { + + if ( gl.getShaderPrecisionFormat( gl.VERTEX_SHADER, gl.HIGH_FLOAT ).precision > 0 && + gl.getShaderPrecisionFormat( gl.FRAGMENT_SHADER, gl.HIGH_FLOAT ).precision > 0 ) { + + return 'highp'; + + } + + precision = 'mediump'; + + } + + if ( precision === 'mediump' ) { + + if ( gl.getShaderPrecisionFormat( gl.VERTEX_SHADER, gl.MEDIUM_FLOAT ).precision > 0 && + gl.getShaderPrecisionFormat( gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT ).precision > 0 ) { + + return 'mediump'; + + } + + } + + return 'lowp'; + + } + + let precision = parameters.precision !== undefined ? parameters.precision : 'highp'; + const maxPrecision = getMaxPrecision( precision ); + + if ( maxPrecision !== precision ) { + + console.warn( 'THREE.WebGLRenderer:', precision, 'not supported, using', maxPrecision, 'instead.' ); + precision = maxPrecision; + + } + + const logarithmicDepthBuffer = parameters.logarithmicDepthBuffer === true; + + const maxTextures = gl.getParameter( gl.MAX_TEXTURE_IMAGE_UNITS ); + const maxVertexTextures = gl.getParameter( gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS ); + const maxTextureSize = gl.getParameter( gl.MAX_TEXTURE_SIZE ); + const maxCubemapSize = gl.getParameter( gl.MAX_CUBE_MAP_TEXTURE_SIZE ); + + const maxAttributes = gl.getParameter( gl.MAX_VERTEX_ATTRIBS ); + const maxVertexUniforms = gl.getParameter( gl.MAX_VERTEX_UNIFORM_VECTORS ); + const maxVaryings = gl.getParameter( gl.MAX_VARYING_VECTORS ); + const maxFragmentUniforms = gl.getParameter( gl.MAX_FRAGMENT_UNIFORM_VECTORS ); + + const vertexTextures = maxVertexTextures > 0; + + const maxSamples = gl.getParameter( gl.MAX_SAMPLES ); + + return { + + isWebGL2: true, // keeping this for backwards compatibility + + getMaxAnisotropy: getMaxAnisotropy, + getMaxPrecision: getMaxPrecision, + + textureFormatReadable: textureFormatReadable, + textureTypeReadable: textureTypeReadable, + + precision: precision, + logarithmicDepthBuffer: logarithmicDepthBuffer, + + maxTextures: maxTextures, + maxVertexTextures: maxVertexTextures, + maxTextureSize: maxTextureSize, + maxCubemapSize: maxCubemapSize, + + maxAttributes: maxAttributes, + maxVertexUniforms: maxVertexUniforms, + maxVaryings: maxVaryings, + maxFragmentUniforms: maxFragmentUniforms, + + vertexTextures: vertexTextures, + + maxSamples: maxSamples + + }; + +} + +function WebGLClipping( properties ) { + + const scope = this; + + let globalState = null, + numGlobalPlanes = 0, + localClippingEnabled = false, + renderingShadows = false; + + const plane = new Plane(), + viewNormalMatrix = new Matrix3(), + + uniform = { value: null, needsUpdate: false }; + + this.uniform = uniform; + this.numPlanes = 0; + this.numIntersection = 0; + + this.init = function ( planes, enableLocalClipping ) { + + const enabled = + planes.length !== 0 || + enableLocalClipping || + // enable state of previous frame - the clipping code has to + // run another frame in order to reset the state: + numGlobalPlanes !== 0 || + localClippingEnabled; + + localClippingEnabled = enableLocalClipping; + + numGlobalPlanes = planes.length; + + return enabled; + + }; + + this.beginShadows = function () { + + renderingShadows = true; + projectPlanes( null ); + + }; + + this.endShadows = function () { + + renderingShadows = false; + + }; + + this.setGlobalState = function ( planes, camera ) { + + globalState = projectPlanes( planes, camera, 0 ); + + }; + + this.setState = function ( material, camera, useCache ) { + + const planes = material.clippingPlanes, + clipIntersection = material.clipIntersection, + clipShadows = material.clipShadows; + + const materialProperties = properties.get( material ); + + if ( ! localClippingEnabled || planes === null || planes.length === 0 || renderingShadows && ! clipShadows ) { + + // there's no local clipping + + if ( renderingShadows ) { + + // there's no global clipping + + projectPlanes( null ); + + } else { + + resetGlobalState(); + + } + + } else { + + const nGlobal = renderingShadows ? 0 : numGlobalPlanes, + lGlobal = nGlobal * 4; + + let dstArray = materialProperties.clippingState || null; + + uniform.value = dstArray; // ensure unique state + + dstArray = projectPlanes( planes, camera, lGlobal, useCache ); + + for ( let i = 0; i !== lGlobal; ++ i ) { + + dstArray[ i ] = globalState[ i ]; + + } + + materialProperties.clippingState = dstArray; + this.numIntersection = clipIntersection ? this.numPlanes : 0; + this.numPlanes += nGlobal; + + } + + + }; + + function resetGlobalState() { + + if ( uniform.value !== globalState ) { + + uniform.value = globalState; + uniform.needsUpdate = numGlobalPlanes > 0; + + } + + scope.numPlanes = numGlobalPlanes; + scope.numIntersection = 0; + + } + + function projectPlanes( planes, camera, dstOffset, skipTransform ) { + + const nPlanes = planes !== null ? planes.length : 0; + let dstArray = null; + + if ( nPlanes !== 0 ) { + + dstArray = uniform.value; + + if ( skipTransform !== true || dstArray === null ) { + + const flatSize = dstOffset + nPlanes * 4, + viewMatrix = camera.matrixWorldInverse; + + viewNormalMatrix.getNormalMatrix( viewMatrix ); + + if ( dstArray === null || dstArray.length < flatSize ) { + + dstArray = new Float32Array( flatSize ); + + } + + for ( let i = 0, i4 = dstOffset; i !== nPlanes; ++ i, i4 += 4 ) { + + plane.copy( planes[ i ] ).applyMatrix4( viewMatrix, viewNormalMatrix ); + + plane.normal.toArray( dstArray, i4 ); + dstArray[ i4 + 3 ] = plane.constant; + + } + + } + + uniform.value = dstArray; + uniform.needsUpdate = true; + + } + + scope.numPlanes = nPlanes; + scope.numIntersection = 0; + + return dstArray; + + } + +} + +function WebGLCubeMaps( renderer ) { + + let cubemaps = new WeakMap(); + + function mapTextureMapping( texture, mapping ) { + + if ( mapping === EquirectangularReflectionMapping ) { + + texture.mapping = CubeReflectionMapping; + + } else if ( mapping === EquirectangularRefractionMapping ) { + + texture.mapping = CubeRefractionMapping; + + } + + return texture; + + } + + function get( texture ) { + + if ( texture && texture.isTexture ) { + + const mapping = texture.mapping; + + if ( mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping ) { + + if ( cubemaps.has( texture ) ) { + + const cubemap = cubemaps.get( texture ).texture; + return mapTextureMapping( cubemap, texture.mapping ); + + } else { + + const image = texture.image; + + if ( image && image.height > 0 ) { + + const renderTarget = new WebGLCubeRenderTarget( image.height ); + renderTarget.fromEquirectangularTexture( renderer, texture ); + cubemaps.set( texture, renderTarget ); + + texture.addEventListener( 'dispose', onTextureDispose ); + + return mapTextureMapping( renderTarget.texture, texture.mapping ); + + } else { + + // image not yet ready. try the conversion next frame + + return null; + + } + + } + + } + + } + + return texture; + + } + + function onTextureDispose( event ) { + + const texture = event.target; + + texture.removeEventListener( 'dispose', onTextureDispose ); + + const cubemap = cubemaps.get( texture ); + + if ( cubemap !== undefined ) { + + cubemaps.delete( texture ); + cubemap.dispose(); + + } + + } + + function dispose() { + + cubemaps = new WeakMap(); + + } + + return { + get: get, + dispose: dispose + }; + +} + +class OrthographicCamera extends Camera { + + constructor( left = - 1, right = 1, top = 1, bottom = - 1, near = 0.1, far = 2000 ) { + + super(); + + this.isOrthographicCamera = true; + + this.type = 'OrthographicCamera'; + + this.zoom = 1; + this.view = null; + + this.left = left; + this.right = right; + this.top = top; + this.bottom = bottom; + + this.near = near; + this.far = far; + + this.updateProjectionMatrix(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.left = source.left; + this.right = source.right; + this.top = source.top; + this.bottom = source.bottom; + this.near = source.near; + this.far = source.far; + + this.zoom = source.zoom; + this.view = source.view === null ? null : Object.assign( {}, source.view ); + + return this; + + } + + setViewOffset( fullWidth, fullHeight, x, y, width, height ) { + + if ( this.view === null ) { + + this.view = { + enabled: true, + fullWidth: 1, + fullHeight: 1, + offsetX: 0, + offsetY: 0, + width: 1, + height: 1 + }; + + } + + this.view.enabled = true; + this.view.fullWidth = fullWidth; + this.view.fullHeight = fullHeight; + this.view.offsetX = x; + this.view.offsetY = y; + this.view.width = width; + this.view.height = height; + + this.updateProjectionMatrix(); + + } + + clearViewOffset() { + + if ( this.view !== null ) { + + this.view.enabled = false; + + } + + this.updateProjectionMatrix(); + + } + + updateProjectionMatrix() { + + const dx = ( this.right - this.left ) / ( 2 * this.zoom ); + const dy = ( this.top - this.bottom ) / ( 2 * this.zoom ); + const cx = ( this.right + this.left ) / 2; + const cy = ( this.top + this.bottom ) / 2; + + let left = cx - dx; + let right = cx + dx; + let top = cy + dy; + let bottom = cy - dy; + + if ( this.view !== null && this.view.enabled ) { + + const scaleW = ( this.right - this.left ) / this.view.fullWidth / this.zoom; + const scaleH = ( this.top - this.bottom ) / this.view.fullHeight / this.zoom; + + left += scaleW * this.view.offsetX; + right = left + scaleW * this.view.width; + top -= scaleH * this.view.offsetY; + bottom = top - scaleH * this.view.height; + + } + + this.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far, this.coordinateSystem ); + + this.projectionMatrixInverse.copy( this.projectionMatrix ).invert(); + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + data.object.zoom = this.zoom; + data.object.left = this.left; + data.object.right = this.right; + data.object.top = this.top; + data.object.bottom = this.bottom; + data.object.near = this.near; + data.object.far = this.far; + + if ( this.view !== null ) data.object.view = Object.assign( {}, this.view ); + + return data; + + } + +} + +const LOD_MIN = 4; + +// The standard deviations (radians) associated with the extra mips. These are +// chosen to approximate a Trowbridge-Reitz distribution function times the +// geometric shadowing function. These sigma values squared must match the +// variance #defines in cube_uv_reflection_fragment.glsl.js. +const EXTRA_LOD_SIGMA = [ 0.125, 0.215, 0.35, 0.446, 0.526, 0.582 ]; + +// The maximum length of the blur for loop. Smaller sigmas will use fewer +// samples and exit early, but not recompile the shader. +const MAX_SAMPLES = 20; + +const _flatCamera = /*@__PURE__*/ new OrthographicCamera(); +const _clearColor = /*@__PURE__*/ new Color(); +let _oldTarget = null; +let _oldActiveCubeFace = 0; +let _oldActiveMipmapLevel = 0; +let _oldXrEnabled = false; + +// Golden Ratio +const PHI = ( 1 + Math.sqrt( 5 ) ) / 2; +const INV_PHI = 1 / PHI; + +// Vertices of a dodecahedron (except the opposites, which represent the +// same axis), used as axis directions evenly spread on a sphere. +const _axisDirections = [ + /*@__PURE__*/ new Vector3( - PHI, INV_PHI, 0 ), + /*@__PURE__*/ new Vector3( PHI, INV_PHI, 0 ), + /*@__PURE__*/ new Vector3( - INV_PHI, 0, PHI ), + /*@__PURE__*/ new Vector3( INV_PHI, 0, PHI ), + /*@__PURE__*/ new Vector3( 0, PHI, - INV_PHI ), + /*@__PURE__*/ new Vector3( 0, PHI, INV_PHI ), + /*@__PURE__*/ new Vector3( - 1, 1, - 1 ), + /*@__PURE__*/ new Vector3( 1, 1, - 1 ), + /*@__PURE__*/ new Vector3( - 1, 1, 1 ), + /*@__PURE__*/ new Vector3( 1, 1, 1 ) ]; + +/** + * This class generates a Prefiltered, Mipmapped Radiance Environment Map + * (PMREM) from a cubeMap environment texture. This allows different levels of + * blur to be quickly accessed based on material roughness. It is packed into a + * special CubeUV format that allows us to perform custom interpolation so that + * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap + * chain, it only goes down to the LOD_MIN level (above), and then creates extra + * even more filtered 'mips' at the same LOD_MIN resolution, associated with + * higher roughness levels. In this way we maintain resolution to smoothly + * interpolate diffuse lighting while limiting sampling computation. + * + * Paper: Fast, Accurate Image-Based Lighting + * https://drive.google.com/file/d/15y8r_UpKlU9SvV4ILb0C3qCPecS8pvLz/view +*/ + +class PMREMGenerator { + + constructor( renderer ) { + + this._renderer = renderer; + this._pingPongRenderTarget = null; + + this._lodMax = 0; + this._cubeSize = 0; + this._lodPlanes = []; + this._sizeLods = []; + this._sigmas = []; + + this._blurMaterial = null; + this._cubemapMaterial = null; + this._equirectMaterial = null; + + this._compileMaterial( this._blurMaterial ); + + } + + /** + * Generates a PMREM from a supplied Scene, which can be faster than using an + * image if networking bandwidth is low. Optional sigma specifies a blur radius + * in radians to be applied to the scene before PMREM generation. Optional near + * and far planes ensure the scene is rendered in its entirety (the cubeCamera + * is placed at the origin). + */ + fromScene( scene, sigma = 0, near = 0.1, far = 100 ) { + + _oldTarget = this._renderer.getRenderTarget(); + _oldActiveCubeFace = this._renderer.getActiveCubeFace(); + _oldActiveMipmapLevel = this._renderer.getActiveMipmapLevel(); + _oldXrEnabled = this._renderer.xr.enabled; + + this._renderer.xr.enabled = false; + + this._setSize( 256 ); + + const cubeUVRenderTarget = this._allocateTargets(); + cubeUVRenderTarget.depthBuffer = true; + + this._sceneToCubeUV( scene, near, far, cubeUVRenderTarget ); + + if ( sigma > 0 ) { + + this._blur( cubeUVRenderTarget, 0, 0, sigma ); + + } + + this._applyPMREM( cubeUVRenderTarget ); + this._cleanup( cubeUVRenderTarget ); + + return cubeUVRenderTarget; + + } + + /** + * Generates a PMREM from an equirectangular texture, which can be either LDR + * or HDR. The ideal input image size is 1k (1024 x 512), + * as this matches best with the 256 x 256 cubemap output. + * The smallest supported equirectangular image size is 64 x 32. + */ + fromEquirectangular( equirectangular, renderTarget = null ) { + + return this._fromTexture( equirectangular, renderTarget ); + + } + + /** + * Generates a PMREM from an cubemap texture, which can be either LDR + * or HDR. The ideal input cube size is 256 x 256, + * as this matches best with the 256 x 256 cubemap output. + * The smallest supported cube size is 16 x 16. + */ + fromCubemap( cubemap, renderTarget = null ) { + + return this._fromTexture( cubemap, renderTarget ); + + } + + /** + * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + */ + compileCubemapShader() { + + if ( this._cubemapMaterial === null ) { + + this._cubemapMaterial = _getCubemapMaterial(); + this._compileMaterial( this._cubemapMaterial ); + + } + + } + + /** + * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + */ + compileEquirectangularShader() { + + if ( this._equirectMaterial === null ) { + + this._equirectMaterial = _getEquirectMaterial(); + this._compileMaterial( this._equirectMaterial ); + + } + + } + + /** + * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, + * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on + * one of them will cause any others to also become unusable. + */ + dispose() { + + this._dispose(); + + if ( this._cubemapMaterial !== null ) this._cubemapMaterial.dispose(); + if ( this._equirectMaterial !== null ) this._equirectMaterial.dispose(); + + } + + // private interface + + _setSize( cubeSize ) { + + this._lodMax = Math.floor( Math.log2( cubeSize ) ); + this._cubeSize = Math.pow( 2, this._lodMax ); + + } + + _dispose() { + + if ( this._blurMaterial !== null ) this._blurMaterial.dispose(); + + if ( this._pingPongRenderTarget !== null ) this._pingPongRenderTarget.dispose(); + + for ( let i = 0; i < this._lodPlanes.length; i ++ ) { + + this._lodPlanes[ i ].dispose(); + + } + + } + + _cleanup( outputTarget ) { + + this._renderer.setRenderTarget( _oldTarget, _oldActiveCubeFace, _oldActiveMipmapLevel ); + this._renderer.xr.enabled = _oldXrEnabled; + + outputTarget.scissorTest = false; + _setViewport( outputTarget, 0, 0, outputTarget.width, outputTarget.height ); + + } + + _fromTexture( texture, renderTarget ) { + + if ( texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping ) { + + this._setSize( texture.image.length === 0 ? 16 : ( texture.image[ 0 ].width || texture.image[ 0 ].image.width ) ); + + } else { // Equirectangular + + this._setSize( texture.image.width / 4 ); + + } + + _oldTarget = this._renderer.getRenderTarget(); + _oldActiveCubeFace = this._renderer.getActiveCubeFace(); + _oldActiveMipmapLevel = this._renderer.getActiveMipmapLevel(); + _oldXrEnabled = this._renderer.xr.enabled; + + this._renderer.xr.enabled = false; + + const cubeUVRenderTarget = renderTarget || this._allocateTargets(); + this._textureToCubeUV( texture, cubeUVRenderTarget ); + this._applyPMREM( cubeUVRenderTarget ); + this._cleanup( cubeUVRenderTarget ); + + return cubeUVRenderTarget; + + } + + _allocateTargets() { + + const width = 3 * Math.max( this._cubeSize, 16 * 7 ); + const height = 4 * this._cubeSize; + + const params = { + magFilter: LinearFilter, + minFilter: LinearFilter, + generateMipmaps: false, + type: HalfFloatType, + format: RGBAFormat, + colorSpace: LinearSRGBColorSpace, + depthBuffer: false + }; + + const cubeUVRenderTarget = _createRenderTarget( width, height, params ); + + if ( this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== width || this._pingPongRenderTarget.height !== height ) { + + if ( this._pingPongRenderTarget !== null ) { + + this._dispose(); + + } + + this._pingPongRenderTarget = _createRenderTarget( width, height, params ); + + const { _lodMax } = this; + ( { sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = _createPlanes( _lodMax ) ); + + this._blurMaterial = _getBlurShader( _lodMax, width, height ); + + } + + return cubeUVRenderTarget; + + } + + _compileMaterial( material ) { + + const tmpMesh = new Mesh( this._lodPlanes[ 0 ], material ); + this._renderer.compile( tmpMesh, _flatCamera ); + + } + + _sceneToCubeUV( scene, near, far, cubeUVRenderTarget ) { + + const fov = 90; + const aspect = 1; + const cubeCamera = new PerspectiveCamera( fov, aspect, near, far ); + const upSign = [ 1, - 1, 1, 1, 1, 1 ]; + const forwardSign = [ 1, 1, 1, - 1, - 1, - 1 ]; + const renderer = this._renderer; + + const originalAutoClear = renderer.autoClear; + const toneMapping = renderer.toneMapping; + renderer.getClearColor( _clearColor ); + + renderer.toneMapping = NoToneMapping; + renderer.autoClear = false; + + const backgroundMaterial = new MeshBasicMaterial( { + name: 'PMREM.Background', + side: BackSide, + depthWrite: false, + depthTest: false, + } ); + + const backgroundBox = new Mesh( new BoxGeometry(), backgroundMaterial ); + + let useSolidColor = false; + const background = scene.background; + + if ( background ) { + + if ( background.isColor ) { + + backgroundMaterial.color.copy( background ); + scene.background = null; + useSolidColor = true; + + } + + } else { + + backgroundMaterial.color.copy( _clearColor ); + useSolidColor = true; + + } + + for ( let i = 0; i < 6; i ++ ) { + + const col = i % 3; + + if ( col === 0 ) { + + cubeCamera.up.set( 0, upSign[ i ], 0 ); + cubeCamera.lookAt( forwardSign[ i ], 0, 0 ); + + } else if ( col === 1 ) { + + cubeCamera.up.set( 0, 0, upSign[ i ] ); + cubeCamera.lookAt( 0, forwardSign[ i ], 0 ); + + } else { + + cubeCamera.up.set( 0, upSign[ i ], 0 ); + cubeCamera.lookAt( 0, 0, forwardSign[ i ] ); + + } + + const size = this._cubeSize; + + _setViewport( cubeUVRenderTarget, col * size, i > 2 ? size : 0, size, size ); + + renderer.setRenderTarget( cubeUVRenderTarget ); + + if ( useSolidColor ) { + + renderer.render( backgroundBox, cubeCamera ); + + } + + renderer.render( scene, cubeCamera ); + + } + + backgroundBox.geometry.dispose(); + backgroundBox.material.dispose(); + + renderer.toneMapping = toneMapping; + renderer.autoClear = originalAutoClear; + scene.background = background; + + } + + _textureToCubeUV( texture, cubeUVRenderTarget ) { + + const renderer = this._renderer; + + const isCubeTexture = ( texture.mapping === CubeReflectionMapping || texture.mapping === CubeRefractionMapping ); + + if ( isCubeTexture ) { + + if ( this._cubemapMaterial === null ) { + + this._cubemapMaterial = _getCubemapMaterial(); + + } + + this._cubemapMaterial.uniforms.flipEnvMap.value = ( texture.isRenderTargetTexture === false ) ? - 1 : 1; + + } else { + + if ( this._equirectMaterial === null ) { + + this._equirectMaterial = _getEquirectMaterial(); + + } + + } + + const material = isCubeTexture ? this._cubemapMaterial : this._equirectMaterial; + const mesh = new Mesh( this._lodPlanes[ 0 ], material ); + + const uniforms = material.uniforms; + + uniforms[ 'envMap' ].value = texture; + + const size = this._cubeSize; + + _setViewport( cubeUVRenderTarget, 0, 0, 3 * size, 2 * size ); + + renderer.setRenderTarget( cubeUVRenderTarget ); + renderer.render( mesh, _flatCamera ); + + } + + _applyPMREM( cubeUVRenderTarget ) { + + const renderer = this._renderer; + const autoClear = renderer.autoClear; + renderer.autoClear = false; + const n = this._lodPlanes.length; + + for ( let i = 1; i < n; i ++ ) { + + const sigma = Math.sqrt( this._sigmas[ i ] * this._sigmas[ i ] - this._sigmas[ i - 1 ] * this._sigmas[ i - 1 ] ); + + const poleAxis = _axisDirections[ ( n - i - 1 ) % _axisDirections.length ]; + + this._blur( cubeUVRenderTarget, i - 1, i, sigma, poleAxis ); + + } + + renderer.autoClear = autoClear; + + } + + /** + * This is a two-pass Gaussian blur for a cubemap. Normally this is done + * vertically and horizontally, but this breaks down on a cube. Here we apply + * the blur latitudinally (around the poles), and then longitudinally (towards + * the poles) to approximate the orthogonally-separable blur. It is least + * accurate at the poles, but still does a decent job. + */ + _blur( cubeUVRenderTarget, lodIn, lodOut, sigma, poleAxis ) { + + const pingPongRenderTarget = this._pingPongRenderTarget; + + this._halfBlur( + cubeUVRenderTarget, + pingPongRenderTarget, + lodIn, + lodOut, + sigma, + 'latitudinal', + poleAxis ); + + this._halfBlur( + pingPongRenderTarget, + cubeUVRenderTarget, + lodOut, + lodOut, + sigma, + 'longitudinal', + poleAxis ); + + } + + _halfBlur( targetIn, targetOut, lodIn, lodOut, sigmaRadians, direction, poleAxis ) { + + const renderer = this._renderer; + const blurMaterial = this._blurMaterial; + + if ( direction !== 'latitudinal' && direction !== 'longitudinal' ) { + + console.error( + 'blur direction must be either latitudinal or longitudinal!' ); + + } + + // Number of standard deviations at which to cut off the discrete approximation. + const STANDARD_DEVIATIONS = 3; + + const blurMesh = new Mesh( this._lodPlanes[ lodOut ], blurMaterial ); + const blurUniforms = blurMaterial.uniforms; + + const pixels = this._sizeLods[ lodIn ] - 1; + const radiansPerPixel = isFinite( sigmaRadians ) ? Math.PI / ( 2 * pixels ) : 2 * Math.PI / ( 2 * MAX_SAMPLES - 1 ); + const sigmaPixels = sigmaRadians / radiansPerPixel; + const samples = isFinite( sigmaRadians ) ? 1 + Math.floor( STANDARD_DEVIATIONS * sigmaPixels ) : MAX_SAMPLES; + + if ( samples > MAX_SAMPLES ) { + + console.warn( `sigmaRadians, ${ + sigmaRadians}, is too large and will clip, as it requested ${ + samples} samples when the maximum is set to ${MAX_SAMPLES}` ); + + } + + const weights = []; + let sum = 0; + + for ( let i = 0; i < MAX_SAMPLES; ++ i ) { + + const x = i / sigmaPixels; + const weight = Math.exp( - x * x / 2 ); + weights.push( weight ); + + if ( i === 0 ) { + + sum += weight; + + } else if ( i < samples ) { + + sum += 2 * weight; + + } + + } + + for ( let i = 0; i < weights.length; i ++ ) { + + weights[ i ] = weights[ i ] / sum; + + } + + blurUniforms[ 'envMap' ].value = targetIn.texture; + blurUniforms[ 'samples' ].value = samples; + blurUniforms[ 'weights' ].value = weights; + blurUniforms[ 'latitudinal' ].value = direction === 'latitudinal'; + + if ( poleAxis ) { + + blurUniforms[ 'poleAxis' ].value = poleAxis; + + } + + const { _lodMax } = this; + blurUniforms[ 'dTheta' ].value = radiansPerPixel; + blurUniforms[ 'mipInt' ].value = _lodMax - lodIn; + + const outputSize = this._sizeLods[ lodOut ]; + const x = 3 * outputSize * ( lodOut > _lodMax - LOD_MIN ? lodOut - _lodMax + LOD_MIN : 0 ); + const y = 4 * ( this._cubeSize - outputSize ); + + _setViewport( targetOut, x, y, 3 * outputSize, 2 * outputSize ); + renderer.setRenderTarget( targetOut ); + renderer.render( blurMesh, _flatCamera ); + + } + +} + + + +function _createPlanes( lodMax ) { + + const lodPlanes = []; + const sizeLods = []; + const sigmas = []; + + let lod = lodMax; + + const totalLods = lodMax - LOD_MIN + 1 + EXTRA_LOD_SIGMA.length; + + for ( let i = 0; i < totalLods; i ++ ) { + + const sizeLod = Math.pow( 2, lod ); + sizeLods.push( sizeLod ); + let sigma = 1.0 / sizeLod; + + if ( i > lodMax - LOD_MIN ) { + + sigma = EXTRA_LOD_SIGMA[ i - lodMax + LOD_MIN - 1 ]; + + } else if ( i === 0 ) { + + sigma = 0; + + } + + sigmas.push( sigma ); + + const texelSize = 1.0 / ( sizeLod - 2 ); + const min = - texelSize; + const max = 1 + texelSize; + const uv1 = [ min, min, max, min, max, max, min, min, max, max, min, max ]; + + const cubeFaces = 6; + const vertices = 6; + const positionSize = 3; + const uvSize = 2; + const faceIndexSize = 1; + + const position = new Float32Array( positionSize * vertices * cubeFaces ); + const uv = new Float32Array( uvSize * vertices * cubeFaces ); + const faceIndex = new Float32Array( faceIndexSize * vertices * cubeFaces ); + + for ( let face = 0; face < cubeFaces; face ++ ) { + + const x = ( face % 3 ) * 2 / 3 - 1; + const y = face > 2 ? 0 : - 1; + const coordinates = [ + x, y, 0, + x + 2 / 3, y, 0, + x + 2 / 3, y + 1, 0, + x, y, 0, + x + 2 / 3, y + 1, 0, + x, y + 1, 0 + ]; + position.set( coordinates, positionSize * vertices * face ); + uv.set( uv1, uvSize * vertices * face ); + const fill = [ face, face, face, face, face, face ]; + faceIndex.set( fill, faceIndexSize * vertices * face ); + + } + + const planes = new BufferGeometry(); + planes.setAttribute( 'position', new BufferAttribute( position, positionSize ) ); + planes.setAttribute( 'uv', new BufferAttribute( uv, uvSize ) ); + planes.setAttribute( 'faceIndex', new BufferAttribute( faceIndex, faceIndexSize ) ); + lodPlanes.push( planes ); + + if ( lod > LOD_MIN ) { + + lod --; + + } + + } + + return { lodPlanes, sizeLods, sigmas }; + +} + +function _createRenderTarget( width, height, params ) { + + const cubeUVRenderTarget = new WebGLRenderTarget( width, height, params ); + cubeUVRenderTarget.texture.mapping = CubeUVReflectionMapping; + cubeUVRenderTarget.texture.name = 'PMREM.cubeUv'; + cubeUVRenderTarget.scissorTest = true; + return cubeUVRenderTarget; + +} + +function _setViewport( target, x, y, width, height ) { + + target.viewport.set( x, y, width, height ); + target.scissor.set( x, y, width, height ); + +} + +function _getBlurShader( lodMax, width, height ) { + + const weights = new Float32Array( MAX_SAMPLES ); + const poleAxis = new Vector3( 0, 1, 0 ); + const shaderMaterial = new ShaderMaterial( { + + name: 'SphericalGaussianBlur', + + defines: { + 'n': MAX_SAMPLES, + 'CUBEUV_TEXEL_WIDTH': 1.0 / width, + 'CUBEUV_TEXEL_HEIGHT': 1.0 / height, + 'CUBEUV_MAX_MIP': `${lodMax}.0`, + }, + + uniforms: { + 'envMap': { value: null }, + 'samples': { value: 1 }, + 'weights': { value: weights }, + 'latitudinal': { value: false }, + 'dTheta': { value: 0 }, + 'mipInt': { value: 0 }, + 'poleAxis': { value: poleAxis } + }, + + vertexShader: _getCommonVertexShader(), + + fragmentShader: /* glsl */` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `, + + blending: NoBlending, + depthTest: false, + depthWrite: false + + } ); + + return shaderMaterial; + +} + +function _getEquirectMaterial() { + + return new ShaderMaterial( { + + name: 'EquirectangularToCubeUV', + + uniforms: { + 'envMap': { value: null } + }, + + vertexShader: _getCommonVertexShader(), + + fragmentShader: /* glsl */` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `, + + blending: NoBlending, + depthTest: false, + depthWrite: false + + } ); + +} + +function _getCubemapMaterial() { + + return new ShaderMaterial( { + + name: 'CubemapToCubeUV', + + uniforms: { + 'envMap': { value: null }, + 'flipEnvMap': { value: - 1 } + }, + + vertexShader: _getCommonVertexShader(), + + fragmentShader: /* glsl */` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `, + + blending: NoBlending, + depthTest: false, + depthWrite: false + + } ); + +} + +function _getCommonVertexShader() { + + return /* glsl */` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `; + +} + +function WebGLCubeUVMaps( renderer ) { + + let cubeUVmaps = new WeakMap(); + + let pmremGenerator = null; + + function get( texture ) { + + if ( texture && texture.isTexture ) { + + const mapping = texture.mapping; + + const isEquirectMap = ( mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping ); + const isCubeMap = ( mapping === CubeReflectionMapping || mapping === CubeRefractionMapping ); + + // equirect/cube map to cubeUV conversion + + if ( isEquirectMap || isCubeMap ) { + + let renderTarget = cubeUVmaps.get( texture ); + + const currentPMREMVersion = renderTarget !== undefined ? renderTarget.texture.pmremVersion : 0; + + if ( texture.isRenderTargetTexture && texture.pmremVersion !== currentPMREMVersion ) { + + if ( pmremGenerator === null ) pmremGenerator = new PMREMGenerator( renderer ); + + renderTarget = isEquirectMap ? pmremGenerator.fromEquirectangular( texture, renderTarget ) : pmremGenerator.fromCubemap( texture, renderTarget ); + renderTarget.texture.pmremVersion = texture.pmremVersion; + + cubeUVmaps.set( texture, renderTarget ); + + return renderTarget.texture; + + } else { + + if ( renderTarget !== undefined ) { + + return renderTarget.texture; + + } else { + + const image = texture.image; + + if ( ( isEquirectMap && image && image.height > 0 ) || ( isCubeMap && image && isCubeTextureComplete( image ) ) ) { + + if ( pmremGenerator === null ) pmremGenerator = new PMREMGenerator( renderer ); + + renderTarget = isEquirectMap ? pmremGenerator.fromEquirectangular( texture ) : pmremGenerator.fromCubemap( texture ); + renderTarget.texture.pmremVersion = texture.pmremVersion; + + cubeUVmaps.set( texture, renderTarget ); + + texture.addEventListener( 'dispose', onTextureDispose ); + + return renderTarget.texture; + + } else { + + // image not yet ready. try the conversion next frame + + return null; + + } + + } + + } + + } + + } + + return texture; + + } + + function isCubeTextureComplete( image ) { + + let count = 0; + const length = 6; + + for ( let i = 0; i < length; i ++ ) { + + if ( image[ i ] !== undefined ) count ++; + + } + + return count === length; + + + } + + function onTextureDispose( event ) { + + const texture = event.target; + + texture.removeEventListener( 'dispose', onTextureDispose ); + + const cubemapUV = cubeUVmaps.get( texture ); + + if ( cubemapUV !== undefined ) { + + cubeUVmaps.delete( texture ); + cubemapUV.dispose(); + + } + + } + + function dispose() { + + cubeUVmaps = new WeakMap(); + + if ( pmremGenerator !== null ) { + + pmremGenerator.dispose(); + pmremGenerator = null; + + } + + } + + return { + get: get, + dispose: dispose + }; + +} + +function WebGLExtensions( gl ) { + + const extensions = {}; + + function getExtension( name ) { + + if ( extensions[ name ] !== undefined ) { + + return extensions[ name ]; + + } + + let extension; + + switch ( name ) { + + case 'WEBGL_depth_texture': + extension = gl.getExtension( 'WEBGL_depth_texture' ) || gl.getExtension( 'MOZ_WEBGL_depth_texture' ) || gl.getExtension( 'WEBKIT_WEBGL_depth_texture' ); + break; + + case 'EXT_texture_filter_anisotropic': + extension = gl.getExtension( 'EXT_texture_filter_anisotropic' ) || gl.getExtension( 'MOZ_EXT_texture_filter_anisotropic' ) || gl.getExtension( 'WEBKIT_EXT_texture_filter_anisotropic' ); + break; + + case 'WEBGL_compressed_texture_s3tc': + extension = gl.getExtension( 'WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'MOZ_WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_s3tc' ); + break; + + case 'WEBGL_compressed_texture_pvrtc': + extension = gl.getExtension( 'WEBGL_compressed_texture_pvrtc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_pvrtc' ); + break; + + default: + extension = gl.getExtension( name ); + + } + + extensions[ name ] = extension; + + return extension; + + } + + return { + + has: function ( name ) { + + return getExtension( name ) !== null; + + }, + + init: function () { + + getExtension( 'EXT_color_buffer_float' ); + getExtension( 'WEBGL_clip_cull_distance' ); + getExtension( 'OES_texture_float_linear' ); + getExtension( 'EXT_color_buffer_half_float' ); + getExtension( 'WEBGL_multisampled_render_to_texture' ); + getExtension( 'WEBGL_render_shared_exponent' ); + + }, + + get: function ( name ) { + + const extension = getExtension( name ); + + if ( extension === null ) { + + console.warn( 'THREE.WebGLRenderer: ' + name + ' extension not supported.' ); + + } + + return extension; + + } + + }; + +} + +function WebGLGeometries( gl, attributes, info, bindingStates ) { + + const geometries = {}; + const wireframeAttributes = new WeakMap(); + + function onGeometryDispose( event ) { + + const geometry = event.target; + + if ( geometry.index !== null ) { + + attributes.remove( geometry.index ); + + } + + for ( const name in geometry.attributes ) { + + attributes.remove( geometry.attributes[ name ] ); + + } + + for ( const name in geometry.morphAttributes ) { + + const array = geometry.morphAttributes[ name ]; + + for ( let i = 0, l = array.length; i < l; i ++ ) { + + attributes.remove( array[ i ] ); + + } + + } + + geometry.removeEventListener( 'dispose', onGeometryDispose ); + + delete geometries[ geometry.id ]; + + const attribute = wireframeAttributes.get( geometry ); + + if ( attribute ) { + + attributes.remove( attribute ); + wireframeAttributes.delete( geometry ); + + } + + bindingStates.releaseStatesOfGeometry( geometry ); + + if ( geometry.isInstancedBufferGeometry === true ) { + + delete geometry._maxInstanceCount; + + } + + // + + info.memory.geometries --; + + } + + function get( object, geometry ) { + + if ( geometries[ geometry.id ] === true ) return geometry; + + geometry.addEventListener( 'dispose', onGeometryDispose ); + + geometries[ geometry.id ] = true; + + info.memory.geometries ++; + + return geometry; + + } + + function update( geometry ) { + + const geometryAttributes = geometry.attributes; + + // Updating index buffer in VAO now. See WebGLBindingStates. + + for ( const name in geometryAttributes ) { + + attributes.update( geometryAttributes[ name ], gl.ARRAY_BUFFER ); + + } + + // morph targets + + const morphAttributes = geometry.morphAttributes; + + for ( const name in morphAttributes ) { + + const array = morphAttributes[ name ]; + + for ( let i = 0, l = array.length; i < l; i ++ ) { + + attributes.update( array[ i ], gl.ARRAY_BUFFER ); + + } + + } + + } + + function updateWireframeAttribute( geometry ) { + + const indices = []; + + const geometryIndex = geometry.index; + const geometryPosition = geometry.attributes.position; + let version = 0; + + if ( geometryIndex !== null ) { + + const array = geometryIndex.array; + version = geometryIndex.version; + + for ( let i = 0, l = array.length; i < l; i += 3 ) { + + const a = array[ i + 0 ]; + const b = array[ i + 1 ]; + const c = array[ i + 2 ]; + + indices.push( a, b, b, c, c, a ); + + } + + } else if ( geometryPosition !== undefined ) { + + const array = geometryPosition.array; + version = geometryPosition.version; + + for ( let i = 0, l = ( array.length / 3 ) - 1; i < l; i += 3 ) { + + const a = i + 0; + const b = i + 1; + const c = i + 2; + + indices.push( a, b, b, c, c, a ); + + } + + } else { + + return; + + } + + const attribute = new ( arrayNeedsUint32( indices ) ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ); + attribute.version = version; + + // Updating index buffer in VAO now. See WebGLBindingStates + + // + + const previousAttribute = wireframeAttributes.get( geometry ); + + if ( previousAttribute ) attributes.remove( previousAttribute ); + + // + + wireframeAttributes.set( geometry, attribute ); + + } + + function getWireframeAttribute( geometry ) { + + const currentAttribute = wireframeAttributes.get( geometry ); + + if ( currentAttribute ) { + + const geometryIndex = geometry.index; + + if ( geometryIndex !== null ) { + + // if the attribute is obsolete, create a new one + + if ( currentAttribute.version < geometryIndex.version ) { + + updateWireframeAttribute( geometry ); + + } + + } + + } else { + + updateWireframeAttribute( geometry ); + + } + + return wireframeAttributes.get( geometry ); + + } + + return { + + get: get, + update: update, + + getWireframeAttribute: getWireframeAttribute + + }; + +} + +function WebGLIndexedBufferRenderer( gl, extensions, info ) { + + let mode; + + function setMode( value ) { + + mode = value; + + } + + let type, bytesPerElement; + + function setIndex( value ) { + + type = value.type; + bytesPerElement = value.bytesPerElement; + + } + + function render( start, count ) { + + gl.drawElements( mode, count, type, start * bytesPerElement ); + + info.update( count, mode, 1 ); + + } + + function renderInstances( start, count, primcount ) { + + if ( primcount === 0 ) return; + + gl.drawElementsInstanced( mode, count, type, start * bytesPerElement, primcount ); + + info.update( count, mode, primcount ); + + } + + function renderMultiDraw( starts, counts, drawCount ) { + + if ( drawCount === 0 ) return; + + const extension = extensions.get( 'WEBGL_multi_draw' ); + + if ( extension === null ) { + + for ( let i = 0; i < drawCount; i ++ ) { + + this.render( starts[ i ] / bytesPerElement, counts[ i ] ); + + } + + } else { + + extension.multiDrawElementsWEBGL( mode, counts, 0, type, starts, 0, drawCount ); + + let elementCount = 0; + for ( let i = 0; i < drawCount; i ++ ) { + + elementCount += counts[ i ]; + + } + + info.update( elementCount, mode, 1 ); + + } + + } + + function renderMultiDrawInstances( starts, counts, drawCount, primcount ) { + + if ( drawCount === 0 ) return; + + const extension = extensions.get( 'WEBGL_multi_draw' ); + + if ( extension === null ) { + + for ( let i = 0; i < starts.length; i ++ ) { + + renderInstances( starts[ i ] / bytesPerElement, counts[ i ], primcount[ i ] ); + + } + + } else { + + extension.multiDrawElementsInstancedWEBGL( mode, counts, 0, type, starts, 0, primcount, 0, drawCount ); + + let elementCount = 0; + for ( let i = 0; i < drawCount; i ++ ) { + + elementCount += counts[ i ]; + + } + + for ( let i = 0; i < primcount.length; i ++ ) { + + info.update( elementCount, mode, primcount[ i ] ); + + } + + } + + } + + // + + this.setMode = setMode; + this.setIndex = setIndex; + this.render = render; + this.renderInstances = renderInstances; + this.renderMultiDraw = renderMultiDraw; + this.renderMultiDrawInstances = renderMultiDrawInstances; + +} + +function WebGLInfo( gl ) { + + const memory = { + geometries: 0, + textures: 0 + }; + + const render = { + frame: 0, + calls: 0, + triangles: 0, + points: 0, + lines: 0 + }; + + function update( count, mode, instanceCount ) { + + render.calls ++; + + switch ( mode ) { + + case gl.TRIANGLES: + render.triangles += instanceCount * ( count / 3 ); + break; + + case gl.LINES: + render.lines += instanceCount * ( count / 2 ); + break; + + case gl.LINE_STRIP: + render.lines += instanceCount * ( count - 1 ); + break; + + case gl.LINE_LOOP: + render.lines += instanceCount * count; + break; + + case gl.POINTS: + render.points += instanceCount * count; + break; + + default: + console.error( 'THREE.WebGLInfo: Unknown draw mode:', mode ); + break; + + } + + } + + function reset() { + + render.calls = 0; + render.triangles = 0; + render.points = 0; + render.lines = 0; + + } + + return { + memory: memory, + render: render, + programs: null, + autoReset: true, + reset: reset, + update: update + }; + +} + +function WebGLMorphtargets( gl, capabilities, textures ) { + + const morphTextures = new WeakMap(); + const morph = new Vector4(); + + function update( object, geometry, program ) { + + const objectInfluences = object.morphTargetInfluences; + + // instead of using attributes, the WebGL 2 code path encodes morph targets + // into an array of data textures. Each layer represents a single morph target. + + const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color; + const morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0; + + let entry = morphTextures.get( geometry ); + + if ( entry === undefined || entry.count !== morphTargetsCount ) { + + if ( entry !== undefined ) entry.texture.dispose(); + + const hasMorphPosition = geometry.morphAttributes.position !== undefined; + const hasMorphNormals = geometry.morphAttributes.normal !== undefined; + const hasMorphColors = geometry.morphAttributes.color !== undefined; + + const morphTargets = geometry.morphAttributes.position || []; + const morphNormals = geometry.morphAttributes.normal || []; + const morphColors = geometry.morphAttributes.color || []; + + let vertexDataCount = 0; + + if ( hasMorphPosition === true ) vertexDataCount = 1; + if ( hasMorphNormals === true ) vertexDataCount = 2; + if ( hasMorphColors === true ) vertexDataCount = 3; + + let width = geometry.attributes.position.count * vertexDataCount; + let height = 1; + + if ( width > capabilities.maxTextureSize ) { + + height = Math.ceil( width / capabilities.maxTextureSize ); + width = capabilities.maxTextureSize; + + } + + const buffer = new Float32Array( width * height * 4 * morphTargetsCount ); + + const texture = new DataArrayTexture( buffer, width, height, morphTargetsCount ); + texture.type = FloatType; + texture.needsUpdate = true; + + // fill buffer + + const vertexDataStride = vertexDataCount * 4; + + for ( let i = 0; i < morphTargetsCount; i ++ ) { + + const morphTarget = morphTargets[ i ]; + const morphNormal = morphNormals[ i ]; + const morphColor = morphColors[ i ]; + + const offset = width * height * 4 * i; + + for ( let j = 0; j < morphTarget.count; j ++ ) { + + const stride = j * vertexDataStride; + + if ( hasMorphPosition === true ) { + + morph.fromBufferAttribute( morphTarget, j ); + + buffer[ offset + stride + 0 ] = morph.x; + buffer[ offset + stride + 1 ] = morph.y; + buffer[ offset + stride + 2 ] = morph.z; + buffer[ offset + stride + 3 ] = 0; + + } + + if ( hasMorphNormals === true ) { + + morph.fromBufferAttribute( morphNormal, j ); + + buffer[ offset + stride + 4 ] = morph.x; + buffer[ offset + stride + 5 ] = morph.y; + buffer[ offset + stride + 6 ] = morph.z; + buffer[ offset + stride + 7 ] = 0; + + } + + if ( hasMorphColors === true ) { + + morph.fromBufferAttribute( morphColor, j ); + + buffer[ offset + stride + 8 ] = morph.x; + buffer[ offset + stride + 9 ] = morph.y; + buffer[ offset + stride + 10 ] = morph.z; + buffer[ offset + stride + 11 ] = ( morphColor.itemSize === 4 ) ? morph.w : 1; + + } + + } + + } + + entry = { + count: morphTargetsCount, + texture: texture, + size: new Vector2( width, height ) + }; + + morphTextures.set( geometry, entry ); + + function disposeTexture() { + + texture.dispose(); + + morphTextures.delete( geometry ); + + geometry.removeEventListener( 'dispose', disposeTexture ); + + } + + geometry.addEventListener( 'dispose', disposeTexture ); + + } + + // + if ( object.isInstancedMesh === true && object.morphTexture !== null ) { + + program.getUniforms().setValue( gl, 'morphTexture', object.morphTexture, textures ); + + } else { + + let morphInfluencesSum = 0; + + for ( let i = 0; i < objectInfluences.length; i ++ ) { + + morphInfluencesSum += objectInfluences[ i ]; + + } + + const morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum; + + + program.getUniforms().setValue( gl, 'morphTargetBaseInfluence', morphBaseInfluence ); + program.getUniforms().setValue( gl, 'morphTargetInfluences', objectInfluences ); + + } + + program.getUniforms().setValue( gl, 'morphTargetsTexture', entry.texture, textures ); + program.getUniforms().setValue( gl, 'morphTargetsTextureSize', entry.size ); + + } + + return { + + update: update + + }; + +} + +function WebGLObjects( gl, geometries, attributes, info ) { + + let updateMap = new WeakMap(); + + function update( object ) { + + const frame = info.render.frame; + + const geometry = object.geometry; + const buffergeometry = geometries.get( object, geometry ); + + // Update once per frame + + if ( updateMap.get( buffergeometry ) !== frame ) { + + geometries.update( buffergeometry ); + + updateMap.set( buffergeometry, frame ); + + } + + if ( object.isInstancedMesh ) { + + if ( object.hasEventListener( 'dispose', onInstancedMeshDispose ) === false ) { + + object.addEventListener( 'dispose', onInstancedMeshDispose ); + + } + + if ( updateMap.get( object ) !== frame ) { + + attributes.update( object.instanceMatrix, gl.ARRAY_BUFFER ); + + if ( object.instanceColor !== null ) { + + attributes.update( object.instanceColor, gl.ARRAY_BUFFER ); + + } + + updateMap.set( object, frame ); + + } + + } + + if ( object.isSkinnedMesh ) { + + const skeleton = object.skeleton; + + if ( updateMap.get( skeleton ) !== frame ) { + + skeleton.update(); + + updateMap.set( skeleton, frame ); + + } + + } + + return buffergeometry; + + } + + function dispose() { + + updateMap = new WeakMap(); + + } + + function onInstancedMeshDispose( event ) { + + const instancedMesh = event.target; + + instancedMesh.removeEventListener( 'dispose', onInstancedMeshDispose ); + + attributes.remove( instancedMesh.instanceMatrix ); + + if ( instancedMesh.instanceColor !== null ) attributes.remove( instancedMesh.instanceColor ); + + } + + return { + + update: update, + dispose: dispose + + }; + +} + +class DepthTexture extends Texture { + + constructor( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format ) { + + format = format !== undefined ? format : DepthFormat; + + if ( format !== DepthFormat && format !== DepthStencilFormat ) { + + throw new Error( 'DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat' ); + + } + + if ( type === undefined && format === DepthFormat ) type = UnsignedIntType; + if ( type === undefined && format === DepthStencilFormat ) type = UnsignedInt248Type; + + super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ); + + this.isDepthTexture = true; + + this.image = { width: width, height: height }; + + this.magFilter = magFilter !== undefined ? magFilter : NearestFilter; + this.minFilter = minFilter !== undefined ? minFilter : NearestFilter; + + this.flipY = false; + this.generateMipmaps = false; + + this.compareFunction = null; + + } + + + copy( source ) { + + super.copy( source ); + + this.compareFunction = source.compareFunction; + + return this; + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + if ( this.compareFunction !== null ) data.compareFunction = this.compareFunction; + + return data; + + } + +} + +/** + * Uniforms of a program. + * Those form a tree structure with a special top-level container for the root, + * which you get by calling 'new WebGLUniforms( gl, program )'. + * + * + * Properties of inner nodes including the top-level container: + * + * .seq - array of nested uniforms + * .map - nested uniforms by name + * + * + * Methods of all nodes except the top-level container: + * + * .setValue( gl, value, [textures] ) + * + * uploads a uniform value(s) + * the 'textures' parameter is needed for sampler uniforms + * + * + * Static methods of the top-level container (textures factorizations): + * + * .upload( gl, seq, values, textures ) + * + * sets uniforms in 'seq' to 'values[id].value' + * + * .seqWithValue( seq, values ) : filteredSeq + * + * filters 'seq' entries with corresponding entry in values + * + * + * Methods of the top-level container (textures factorizations): + * + * .setValue( gl, name, value, textures ) + * + * sets uniform with name 'name' to 'value' + * + * .setOptional( gl, obj, prop ) + * + * like .set for an optional property of the object + * + */ + + +const emptyTexture = /*@__PURE__*/ new Texture(); + +const emptyShadowTexture = /*@__PURE__*/ new DepthTexture( 1, 1 ); +emptyShadowTexture.compareFunction = LessEqualCompare; + +const emptyArrayTexture = /*@__PURE__*/ new DataArrayTexture(); +const empty3dTexture = /*@__PURE__*/ new Data3DTexture(); +const emptyCubeTexture = /*@__PURE__*/ new CubeTexture(); + +// --- Utilities --- + +// Array Caches (provide typed arrays for temporary by size) + +const arrayCacheF32 = []; +const arrayCacheI32 = []; + +// Float32Array caches used for uploading Matrix uniforms + +const mat4array = new Float32Array( 16 ); +const mat3array = new Float32Array( 9 ); +const mat2array = new Float32Array( 4 ); + +// Flattening for arrays of vectors and matrices + +function flatten( array, nBlocks, blockSize ) { + + const firstElem = array[ 0 ]; + + if ( firstElem <= 0 || firstElem > 0 ) return array; + // unoptimized: ! isNaN( firstElem ) + // see http://jacksondunstan.com/articles/983 + + const n = nBlocks * blockSize; + let r = arrayCacheF32[ n ]; + + if ( r === undefined ) { + + r = new Float32Array( n ); + arrayCacheF32[ n ] = r; + + } + + if ( nBlocks !== 0 ) { + + firstElem.toArray( r, 0 ); + + for ( let i = 1, offset = 0; i !== nBlocks; ++ i ) { + + offset += blockSize; + array[ i ].toArray( r, offset ); + + } + + } + + return r; + +} + +function arraysEqual( a, b ) { + + if ( a.length !== b.length ) return false; + + for ( let i = 0, l = a.length; i < l; i ++ ) { + + if ( a[ i ] !== b[ i ] ) return false; + + } + + return true; + +} + +function copyArray( a, b ) { + + for ( let i = 0, l = b.length; i < l; i ++ ) { + + a[ i ] = b[ i ]; + + } + +} + +// Texture unit allocation + +function allocTexUnits( textures, n ) { + + let r = arrayCacheI32[ n ]; + + if ( r === undefined ) { + + r = new Int32Array( n ); + arrayCacheI32[ n ] = r; + + } + + for ( let i = 0; i !== n; ++ i ) { + + r[ i ] = textures.allocateTextureUnit(); + + } + + return r; + +} + +// --- Setters --- + +// Note: Defining these methods externally, because they come in a bunch +// and this way their names minify. + +// Single scalar + +function setValueV1f( gl, v ) { + + const cache = this.cache; + + if ( cache[ 0 ] === v ) return; + + gl.uniform1f( this.addr, v ); + + cache[ 0 ] = v; + +} + +// Single float vector (from flat array or THREE.VectorN) + +function setValueV2f( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) { + + gl.uniform2f( this.addr, v.x, v.y ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform2fv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +function setValueV3f( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) { + + gl.uniform3f( this.addr, v.x, v.y, v.z ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + cache[ 2 ] = v.z; + + } + + } else if ( v.r !== undefined ) { + + if ( cache[ 0 ] !== v.r || cache[ 1 ] !== v.g || cache[ 2 ] !== v.b ) { + + gl.uniform3f( this.addr, v.r, v.g, v.b ); + + cache[ 0 ] = v.r; + cache[ 1 ] = v.g; + cache[ 2 ] = v.b; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform3fv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +function setValueV4f( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) { + + gl.uniform4f( this.addr, v.x, v.y, v.z, v.w ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + cache[ 2 ] = v.z; + cache[ 3 ] = v.w; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform4fv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +// Single matrix (from flat array or THREE.MatrixN) + +function setValueM2( gl, v ) { + + const cache = this.cache; + const elements = v.elements; + + if ( elements === undefined ) { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniformMatrix2fv( this.addr, false, v ); + + copyArray( cache, v ); + + } else { + + if ( arraysEqual( cache, elements ) ) return; + + mat2array.set( elements ); + + gl.uniformMatrix2fv( this.addr, false, mat2array ); + + copyArray( cache, elements ); + + } + +} + +function setValueM3( gl, v ) { + + const cache = this.cache; + const elements = v.elements; + + if ( elements === undefined ) { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniformMatrix3fv( this.addr, false, v ); + + copyArray( cache, v ); + + } else { + + if ( arraysEqual( cache, elements ) ) return; + + mat3array.set( elements ); + + gl.uniformMatrix3fv( this.addr, false, mat3array ); + + copyArray( cache, elements ); + + } + +} + +function setValueM4( gl, v ) { + + const cache = this.cache; + const elements = v.elements; + + if ( elements === undefined ) { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniformMatrix4fv( this.addr, false, v ); + + copyArray( cache, v ); + + } else { + + if ( arraysEqual( cache, elements ) ) return; + + mat4array.set( elements ); + + gl.uniformMatrix4fv( this.addr, false, mat4array ); + + copyArray( cache, elements ); + + } + +} + +// Single integer / boolean + +function setValueV1i( gl, v ) { + + const cache = this.cache; + + if ( cache[ 0 ] === v ) return; + + gl.uniform1i( this.addr, v ); + + cache[ 0 ] = v; + +} + +// Single integer / boolean vector (from flat array or THREE.VectorN) + +function setValueV2i( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) { + + gl.uniform2i( this.addr, v.x, v.y ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform2iv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +function setValueV3i( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) { + + gl.uniform3i( this.addr, v.x, v.y, v.z ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + cache[ 2 ] = v.z; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform3iv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +function setValueV4i( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) { + + gl.uniform4i( this.addr, v.x, v.y, v.z, v.w ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + cache[ 2 ] = v.z; + cache[ 3 ] = v.w; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform4iv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +// Single unsigned integer + +function setValueV1ui( gl, v ) { + + const cache = this.cache; + + if ( cache[ 0 ] === v ) return; + + gl.uniform1ui( this.addr, v ); + + cache[ 0 ] = v; + +} + +// Single unsigned integer vector (from flat array or THREE.VectorN) + +function setValueV2ui( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) { + + gl.uniform2ui( this.addr, v.x, v.y ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform2uiv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +function setValueV3ui( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) { + + gl.uniform3ui( this.addr, v.x, v.y, v.z ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + cache[ 2 ] = v.z; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform3uiv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + +function setValueV4ui( gl, v ) { + + const cache = this.cache; + + if ( v.x !== undefined ) { + + if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) { + + gl.uniform4ui( this.addr, v.x, v.y, v.z, v.w ); + + cache[ 0 ] = v.x; + cache[ 1 ] = v.y; + cache[ 2 ] = v.z; + cache[ 3 ] = v.w; + + } + + } else { + + if ( arraysEqual( cache, v ) ) return; + + gl.uniform4uiv( this.addr, v ); + + copyArray( cache, v ); + + } + +} + + +// Single texture (2D / Cube) + +function setValueT1( gl, v, textures ) { + + const cache = this.cache; + const unit = textures.allocateTextureUnit(); + + if ( cache[ 0 ] !== unit ) { + + gl.uniform1i( this.addr, unit ); + cache[ 0 ] = unit; + + } + + const emptyTexture2D = ( this.type === gl.SAMPLER_2D_SHADOW ) ? emptyShadowTexture : emptyTexture; + + textures.setTexture2D( v || emptyTexture2D, unit ); + +} + +function setValueT3D1( gl, v, textures ) { + + const cache = this.cache; + const unit = textures.allocateTextureUnit(); + + if ( cache[ 0 ] !== unit ) { + + gl.uniform1i( this.addr, unit ); + cache[ 0 ] = unit; + + } + + textures.setTexture3D( v || empty3dTexture, unit ); + +} + +function setValueT6( gl, v, textures ) { + + const cache = this.cache; + const unit = textures.allocateTextureUnit(); + + if ( cache[ 0 ] !== unit ) { + + gl.uniform1i( this.addr, unit ); + cache[ 0 ] = unit; + + } + + textures.setTextureCube( v || emptyCubeTexture, unit ); + +} + +function setValueT2DArray1( gl, v, textures ) { + + const cache = this.cache; + const unit = textures.allocateTextureUnit(); + + if ( cache[ 0 ] !== unit ) { + + gl.uniform1i( this.addr, unit ); + cache[ 0 ] = unit; + + } + + textures.setTexture2DArray( v || emptyArrayTexture, unit ); + +} + +// Helper to pick the right setter for the singular case + +function getSingularSetter( type ) { + + switch ( type ) { + + case 0x1406: return setValueV1f; // FLOAT + case 0x8b50: return setValueV2f; // _VEC2 + case 0x8b51: return setValueV3f; // _VEC3 + case 0x8b52: return setValueV4f; // _VEC4 + + case 0x8b5a: return setValueM2; // _MAT2 + case 0x8b5b: return setValueM3; // _MAT3 + case 0x8b5c: return setValueM4; // _MAT4 + + case 0x1404: case 0x8b56: return setValueV1i; // INT, BOOL + case 0x8b53: case 0x8b57: return setValueV2i; // _VEC2 + case 0x8b54: case 0x8b58: return setValueV3i; // _VEC3 + case 0x8b55: case 0x8b59: return setValueV4i; // _VEC4 + + case 0x1405: return setValueV1ui; // UINT + case 0x8dc6: return setValueV2ui; // _VEC2 + case 0x8dc7: return setValueV3ui; // _VEC3 + case 0x8dc8: return setValueV4ui; // _VEC4 + + case 0x8b5e: // SAMPLER_2D + case 0x8d66: // SAMPLER_EXTERNAL_OES + case 0x8dca: // INT_SAMPLER_2D + case 0x8dd2: // UNSIGNED_INT_SAMPLER_2D + case 0x8b62: // SAMPLER_2D_SHADOW + return setValueT1; + + case 0x8b5f: // SAMPLER_3D + case 0x8dcb: // INT_SAMPLER_3D + case 0x8dd3: // UNSIGNED_INT_SAMPLER_3D + return setValueT3D1; + + case 0x8b60: // SAMPLER_CUBE + case 0x8dcc: // INT_SAMPLER_CUBE + case 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE + case 0x8dc5: // SAMPLER_CUBE_SHADOW + return setValueT6; + + case 0x8dc1: // SAMPLER_2D_ARRAY + case 0x8dcf: // INT_SAMPLER_2D_ARRAY + case 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY + case 0x8dc4: // SAMPLER_2D_ARRAY_SHADOW + return setValueT2DArray1; + + } + +} + + +// Array of scalars + +function setValueV1fArray( gl, v ) { + + gl.uniform1fv( this.addr, v ); + +} + +// Array of vectors (from flat array or array of THREE.VectorN) + +function setValueV2fArray( gl, v ) { + + const data = flatten( v, this.size, 2 ); + + gl.uniform2fv( this.addr, data ); + +} + +function setValueV3fArray( gl, v ) { + + const data = flatten( v, this.size, 3 ); + + gl.uniform3fv( this.addr, data ); + +} + +function setValueV4fArray( gl, v ) { + + const data = flatten( v, this.size, 4 ); + + gl.uniform4fv( this.addr, data ); + +} + +// Array of matrices (from flat array or array of THREE.MatrixN) + +function setValueM2Array( gl, v ) { + + const data = flatten( v, this.size, 4 ); + + gl.uniformMatrix2fv( this.addr, false, data ); + +} + +function setValueM3Array( gl, v ) { + + const data = flatten( v, this.size, 9 ); + + gl.uniformMatrix3fv( this.addr, false, data ); + +} + +function setValueM4Array( gl, v ) { + + const data = flatten( v, this.size, 16 ); + + gl.uniformMatrix4fv( this.addr, false, data ); + +} + +// Array of integer / boolean + +function setValueV1iArray( gl, v ) { + + gl.uniform1iv( this.addr, v ); + +} + +// Array of integer / boolean vectors (from flat array) + +function setValueV2iArray( gl, v ) { + + gl.uniform2iv( this.addr, v ); + +} + +function setValueV3iArray( gl, v ) { + + gl.uniform3iv( this.addr, v ); + +} + +function setValueV4iArray( gl, v ) { + + gl.uniform4iv( this.addr, v ); + +} + +// Array of unsigned integer + +function setValueV1uiArray( gl, v ) { + + gl.uniform1uiv( this.addr, v ); + +} + +// Array of unsigned integer vectors (from flat array) + +function setValueV2uiArray( gl, v ) { + + gl.uniform2uiv( this.addr, v ); + +} + +function setValueV3uiArray( gl, v ) { + + gl.uniform3uiv( this.addr, v ); + +} + +function setValueV4uiArray( gl, v ) { + + gl.uniform4uiv( this.addr, v ); + +} + + +// Array of textures (2D / 3D / Cube / 2DArray) + +function setValueT1Array( gl, v, textures ) { + + const cache = this.cache; + + const n = v.length; + + const units = allocTexUnits( textures, n ); + + if ( ! arraysEqual( cache, units ) ) { + + gl.uniform1iv( this.addr, units ); + + copyArray( cache, units ); + + } + + for ( let i = 0; i !== n; ++ i ) { + + textures.setTexture2D( v[ i ] || emptyTexture, units[ i ] ); + + } + +} + +function setValueT3DArray( gl, v, textures ) { + + const cache = this.cache; + + const n = v.length; + + const units = allocTexUnits( textures, n ); + + if ( ! arraysEqual( cache, units ) ) { + + gl.uniform1iv( this.addr, units ); + + copyArray( cache, units ); + + } + + for ( let i = 0; i !== n; ++ i ) { + + textures.setTexture3D( v[ i ] || empty3dTexture, units[ i ] ); + + } + +} + +function setValueT6Array( gl, v, textures ) { + + const cache = this.cache; + + const n = v.length; + + const units = allocTexUnits( textures, n ); + + if ( ! arraysEqual( cache, units ) ) { + + gl.uniform1iv( this.addr, units ); + + copyArray( cache, units ); + + } + + for ( let i = 0; i !== n; ++ i ) { + + textures.setTextureCube( v[ i ] || emptyCubeTexture, units[ i ] ); + + } + +} + +function setValueT2DArrayArray( gl, v, textures ) { + + const cache = this.cache; + + const n = v.length; + + const units = allocTexUnits( textures, n ); + + if ( ! arraysEqual( cache, units ) ) { + + gl.uniform1iv( this.addr, units ); + + copyArray( cache, units ); + + } + + for ( let i = 0; i !== n; ++ i ) { + + textures.setTexture2DArray( v[ i ] || emptyArrayTexture, units[ i ] ); + + } + +} + + +// Helper to pick the right setter for a pure (bottom-level) array + +function getPureArraySetter( type ) { + + switch ( type ) { + + case 0x1406: return setValueV1fArray; // FLOAT + case 0x8b50: return setValueV2fArray; // _VEC2 + case 0x8b51: return setValueV3fArray; // _VEC3 + case 0x8b52: return setValueV4fArray; // _VEC4 + + case 0x8b5a: return setValueM2Array; // _MAT2 + case 0x8b5b: return setValueM3Array; // _MAT3 + case 0x8b5c: return setValueM4Array; // _MAT4 + + case 0x1404: case 0x8b56: return setValueV1iArray; // INT, BOOL + case 0x8b53: case 0x8b57: return setValueV2iArray; // _VEC2 + case 0x8b54: case 0x8b58: return setValueV3iArray; // _VEC3 + case 0x8b55: case 0x8b59: return setValueV4iArray; // _VEC4 + + case 0x1405: return setValueV1uiArray; // UINT + case 0x8dc6: return setValueV2uiArray; // _VEC2 + case 0x8dc7: return setValueV3uiArray; // _VEC3 + case 0x8dc8: return setValueV4uiArray; // _VEC4 + + case 0x8b5e: // SAMPLER_2D + case 0x8d66: // SAMPLER_EXTERNAL_OES + case 0x8dca: // INT_SAMPLER_2D + case 0x8dd2: // UNSIGNED_INT_SAMPLER_2D + case 0x8b62: // SAMPLER_2D_SHADOW + return setValueT1Array; + + case 0x8b5f: // SAMPLER_3D + case 0x8dcb: // INT_SAMPLER_3D + case 0x8dd3: // UNSIGNED_INT_SAMPLER_3D + return setValueT3DArray; + + case 0x8b60: // SAMPLER_CUBE + case 0x8dcc: // INT_SAMPLER_CUBE + case 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE + case 0x8dc5: // SAMPLER_CUBE_SHADOW + return setValueT6Array; + + case 0x8dc1: // SAMPLER_2D_ARRAY + case 0x8dcf: // INT_SAMPLER_2D_ARRAY + case 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY + case 0x8dc4: // SAMPLER_2D_ARRAY_SHADOW + return setValueT2DArrayArray; + + } + +} + +// --- Uniform Classes --- + +class SingleUniform { + + constructor( id, activeInfo, addr ) { + + this.id = id; + this.addr = addr; + this.cache = []; + this.type = activeInfo.type; + this.setValue = getSingularSetter( activeInfo.type ); + + // this.path = activeInfo.name; // DEBUG + + } + +} + +class PureArrayUniform { + + constructor( id, activeInfo, addr ) { + + this.id = id; + this.addr = addr; + this.cache = []; + this.type = activeInfo.type; + this.size = activeInfo.size; + this.setValue = getPureArraySetter( activeInfo.type ); + + // this.path = activeInfo.name; // DEBUG + + } + +} + +class StructuredUniform { + + constructor( id ) { + + this.id = id; + + this.seq = []; + this.map = {}; + + } + + setValue( gl, value, textures ) { + + const seq = this.seq; + + for ( let i = 0, n = seq.length; i !== n; ++ i ) { + + const u = seq[ i ]; + u.setValue( gl, value[ u.id ], textures ); + + } + + } + +} + +// --- Top-level --- + +// Parser - builds up the property tree from the path strings + +const RePathPart = /(\w+)(\])?(\[|\.)?/g; + +// extracts +// - the identifier (member name or array index) +// - followed by an optional right bracket (found when array index) +// - followed by an optional left bracket or dot (type of subscript) +// +// Note: These portions can be read in a non-overlapping fashion and +// allow straightforward parsing of the hierarchy that WebGL encodes +// in the uniform names. + +function addUniform( container, uniformObject ) { + + container.seq.push( uniformObject ); + container.map[ uniformObject.id ] = uniformObject; + +} + +function parseUniform( activeInfo, addr, container ) { + + const path = activeInfo.name, + pathLength = path.length; + + // reset RegExp object, because of the early exit of a previous run + RePathPart.lastIndex = 0; + + while ( true ) { + + const match = RePathPart.exec( path ), + matchEnd = RePathPart.lastIndex; + + let id = match[ 1 ]; + const idIsIndex = match[ 2 ] === ']', + subscript = match[ 3 ]; + + if ( idIsIndex ) id = id | 0; // convert to integer + + if ( subscript === undefined || subscript === '[' && matchEnd + 2 === pathLength ) { + + // bare name or "pure" bottom-level array "[0]" suffix + + addUniform( container, subscript === undefined ? + new SingleUniform( id, activeInfo, addr ) : + new PureArrayUniform( id, activeInfo, addr ) ); + + break; + + } else { + + // step into inner node / create it in case it doesn't exist + + const map = container.map; + let next = map[ id ]; + + if ( next === undefined ) { + + next = new StructuredUniform( id ); + addUniform( container, next ); + + } + + container = next; + + } + + } + +} + +// Root Container + +class WebGLUniforms { + + constructor( gl, program ) { + + this.seq = []; + this.map = {}; + + const n = gl.getProgramParameter( program, gl.ACTIVE_UNIFORMS ); + + for ( let i = 0; i < n; ++ i ) { + + const info = gl.getActiveUniform( program, i ), + addr = gl.getUniformLocation( program, info.name ); + + parseUniform( info, addr, this ); + + } + + } + + setValue( gl, name, value, textures ) { + + const u = this.map[ name ]; + + if ( u !== undefined ) u.setValue( gl, value, textures ); + + } + + setOptional( gl, object, name ) { + + const v = object[ name ]; + + if ( v !== undefined ) this.setValue( gl, name, v ); + + } + + static upload( gl, seq, values, textures ) { + + for ( let i = 0, n = seq.length; i !== n; ++ i ) { + + const u = seq[ i ], + v = values[ u.id ]; + + if ( v.needsUpdate !== false ) { + + // note: always updating when .needsUpdate is undefined + u.setValue( gl, v.value, textures ); + + } + + } + + } + + static seqWithValue( seq, values ) { + + const r = []; + + for ( let i = 0, n = seq.length; i !== n; ++ i ) { + + const u = seq[ i ]; + if ( u.id in values ) r.push( u ); + + } + + return r; + + } + +} + +function WebGLShader( gl, type, string ) { + + const shader = gl.createShader( type ); + + gl.shaderSource( shader, string ); + gl.compileShader( shader ); + + return shader; + +} + +// From https://www.khronos.org/registry/webgl/extensions/KHR_parallel_shader_compile/ +const COMPLETION_STATUS_KHR = 0x91B1; + +let programIdCount = 0; + +function handleSource( string, errorLine ) { + + const lines = string.split( '\n' ); + const lines2 = []; + + const from = Math.max( errorLine - 6, 0 ); + const to = Math.min( errorLine + 6, lines.length ); + + for ( let i = from; i < to; i ++ ) { + + const line = i + 1; + lines2.push( `${line === errorLine ? '>' : ' '} ${line}: ${lines[ i ]}` ); + + } + + return lines2.join( '\n' ); + +} + +function getEncodingComponents( colorSpace ) { + + const workingPrimaries = ColorManagement.getPrimaries( ColorManagement.workingColorSpace ); + const encodingPrimaries = ColorManagement.getPrimaries( colorSpace ); + + let gamutMapping; + + if ( workingPrimaries === encodingPrimaries ) { + + gamutMapping = ''; + + } else if ( workingPrimaries === P3Primaries && encodingPrimaries === Rec709Primaries ) { + + gamutMapping = 'LinearDisplayP3ToLinearSRGB'; + + } else if ( workingPrimaries === Rec709Primaries && encodingPrimaries === P3Primaries ) { + + gamutMapping = 'LinearSRGBToLinearDisplayP3'; + + } + + switch ( colorSpace ) { + + case LinearSRGBColorSpace: + case LinearDisplayP3ColorSpace: + return [ gamutMapping, 'LinearTransferOETF' ]; + + case SRGBColorSpace: + case DisplayP3ColorSpace: + return [ gamutMapping, 'sRGBTransferOETF' ]; + + default: + console.warn( 'THREE.WebGLProgram: Unsupported color space:', colorSpace ); + return [ gamutMapping, 'LinearTransferOETF' ]; + + } + +} + +function getShaderErrors( gl, shader, type ) { + + const status = gl.getShaderParameter( shader, gl.COMPILE_STATUS ); + const errors = gl.getShaderInfoLog( shader ).trim(); + + if ( status && errors === '' ) return ''; + + const errorMatches = /ERROR: 0:(\d+)/.exec( errors ); + if ( errorMatches ) { + + // --enable-privileged-webgl-extension + // console.log( '**' + type + '**', gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) ); + + const errorLine = parseInt( errorMatches[ 1 ] ); + return type.toUpperCase() + '\n\n' + errors + '\n\n' + handleSource( gl.getShaderSource( shader ), errorLine ); + + } else { + + return errors; + + } + +} + +function getTexelEncodingFunction( functionName, colorSpace ) { + + const components = getEncodingComponents( colorSpace ); + return `vec4 ${functionName}( vec4 value ) { return ${components[ 0 ]}( ${components[ 1 ]}( value ) ); }`; + +} + +function getToneMappingFunction( functionName, toneMapping ) { + + let toneMappingName; + + switch ( toneMapping ) { + + case LinearToneMapping: + toneMappingName = 'Linear'; + break; + + case ReinhardToneMapping: + toneMappingName = 'Reinhard'; + break; + + case CineonToneMapping: + toneMappingName = 'OptimizedCineon'; + break; + + case ACESFilmicToneMapping: + toneMappingName = 'ACESFilmic'; + break; + + case AgXToneMapping: + toneMappingName = 'AgX'; + break; + + case NeutralToneMapping: + toneMappingName = 'Neutral'; + break; + + case CustomToneMapping: + toneMappingName = 'Custom'; + break; + + default: + console.warn( 'THREE.WebGLProgram: Unsupported toneMapping:', toneMapping ); + toneMappingName = 'Linear'; + + } + + return 'vec3 ' + functionName + '( vec3 color ) { return ' + toneMappingName + 'ToneMapping( color ); }'; + +} + +function generateVertexExtensions( parameters ) { + + const chunks = [ + parameters.extensionClipCullDistance ? '#extension GL_ANGLE_clip_cull_distance : require' : '', + parameters.extensionMultiDraw ? '#extension GL_ANGLE_multi_draw : require' : '', + ]; + + return chunks.filter( filterEmptyLine ).join( '\n' ); + +} + +function generateDefines( defines ) { + + const chunks = []; + + for ( const name in defines ) { + + const value = defines[ name ]; + + if ( value === false ) continue; + + chunks.push( '#define ' + name + ' ' + value ); + + } + + return chunks.join( '\n' ); + +} + +function fetchAttributeLocations( gl, program ) { + + const attributes = {}; + + const n = gl.getProgramParameter( program, gl.ACTIVE_ATTRIBUTES ); + + for ( let i = 0; i < n; i ++ ) { + + const info = gl.getActiveAttrib( program, i ); + const name = info.name; + + let locationSize = 1; + if ( info.type === gl.FLOAT_MAT2 ) locationSize = 2; + if ( info.type === gl.FLOAT_MAT3 ) locationSize = 3; + if ( info.type === gl.FLOAT_MAT4 ) locationSize = 4; + + // console.log( 'THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:', name, i ); + + attributes[ name ] = { + type: info.type, + location: gl.getAttribLocation( program, name ), + locationSize: locationSize + }; + + } + + return attributes; + +} + +function filterEmptyLine( string ) { + + return string !== ''; + +} + +function replaceLightNums( string, parameters ) { + + const numSpotLightCoords = parameters.numSpotLightShadows + parameters.numSpotLightMaps - parameters.numSpotLightShadowsWithMaps; + + return string + .replace( /NUM_DIR_LIGHTS/g, parameters.numDirLights ) + .replace( /NUM_SPOT_LIGHTS/g, parameters.numSpotLights ) + .replace( /NUM_SPOT_LIGHT_MAPS/g, parameters.numSpotLightMaps ) + .replace( /NUM_SPOT_LIGHT_COORDS/g, numSpotLightCoords ) + .replace( /NUM_RECT_AREA_LIGHTS/g, parameters.numRectAreaLights ) + .replace( /NUM_POINT_LIGHTS/g, parameters.numPointLights ) + .replace( /NUM_HEMI_LIGHTS/g, parameters.numHemiLights ) + .replace( /NUM_DIR_LIGHT_SHADOWS/g, parameters.numDirLightShadows ) + .replace( /NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g, parameters.numSpotLightShadowsWithMaps ) + .replace( /NUM_SPOT_LIGHT_SHADOWS/g, parameters.numSpotLightShadows ) + .replace( /NUM_POINT_LIGHT_SHADOWS/g, parameters.numPointLightShadows ); + +} + +function replaceClippingPlaneNums( string, parameters ) { + + return string + .replace( /NUM_CLIPPING_PLANES/g, parameters.numClippingPlanes ) + .replace( /UNION_CLIPPING_PLANES/g, ( parameters.numClippingPlanes - parameters.numClipIntersection ) ); + +} + +// Resolve Includes + +const includePattern = /^[ \t]*#include +<([\w\d./]+)>/gm; + +function resolveIncludes( string ) { + + return string.replace( includePattern, includeReplacer ); + +} + +const shaderChunkMap = new Map(); + +function includeReplacer( match, include ) { + + let string = ShaderChunk[ include ]; + + if ( string === undefined ) { + + const newInclude = shaderChunkMap.get( include ); + + if ( newInclude !== undefined ) { + + string = ShaderChunk[ newInclude ]; + console.warn( 'THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.', include, newInclude ); + + } else { + + throw new Error( 'Can not resolve #include <' + include + '>' ); + + } + + } + + return resolveIncludes( string ); + +} + +// Unroll Loops + +const unrollLoopPattern = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g; + +function unrollLoops( string ) { + + return string.replace( unrollLoopPattern, loopReplacer ); + +} + +function loopReplacer( match, start, end, snippet ) { + + let string = ''; + + for ( let i = parseInt( start ); i < parseInt( end ); i ++ ) { + + string += snippet + .replace( /\[\s*i\s*\]/g, '[ ' + i + ' ]' ) + .replace( /UNROLLED_LOOP_INDEX/g, i ); + + } + + return string; + +} + +// + +function generatePrecision( parameters ) { + + let precisionstring = `precision ${parameters.precision} float; + precision ${parameters.precision} int; + precision ${parameters.precision} sampler2D; + precision ${parameters.precision} samplerCube; + precision ${parameters.precision} sampler3D; + precision ${parameters.precision} sampler2DArray; + precision ${parameters.precision} sampler2DShadow; + precision ${parameters.precision} samplerCubeShadow; + precision ${parameters.precision} sampler2DArrayShadow; + precision ${parameters.precision} isampler2D; + precision ${parameters.precision} isampler3D; + precision ${parameters.precision} isamplerCube; + precision ${parameters.precision} isampler2DArray; + precision ${parameters.precision} usampler2D; + precision ${parameters.precision} usampler3D; + precision ${parameters.precision} usamplerCube; + precision ${parameters.precision} usampler2DArray; + `; + + if ( parameters.precision === 'highp' ) { + + precisionstring += '\n#define HIGH_PRECISION'; + + } else if ( parameters.precision === 'mediump' ) { + + precisionstring += '\n#define MEDIUM_PRECISION'; + + } else if ( parameters.precision === 'lowp' ) { + + precisionstring += '\n#define LOW_PRECISION'; + + } + + return precisionstring; + +} + +function generateShadowMapTypeDefine( parameters ) { + + let shadowMapTypeDefine = 'SHADOWMAP_TYPE_BASIC'; + + if ( parameters.shadowMapType === PCFShadowMap ) { + + shadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF'; + + } else if ( parameters.shadowMapType === PCFSoftShadowMap ) { + + shadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF_SOFT'; + + } else if ( parameters.shadowMapType === VSMShadowMap ) { + + shadowMapTypeDefine = 'SHADOWMAP_TYPE_VSM'; + + } + + return shadowMapTypeDefine; + +} + +function generateEnvMapTypeDefine( parameters ) { + + let envMapTypeDefine = 'ENVMAP_TYPE_CUBE'; + + if ( parameters.envMap ) { + + switch ( parameters.envMapMode ) { + + case CubeReflectionMapping: + case CubeRefractionMapping: + envMapTypeDefine = 'ENVMAP_TYPE_CUBE'; + break; + + case CubeUVReflectionMapping: + envMapTypeDefine = 'ENVMAP_TYPE_CUBE_UV'; + break; + + } + + } + + return envMapTypeDefine; + +} + +function generateEnvMapModeDefine( parameters ) { + + let envMapModeDefine = 'ENVMAP_MODE_REFLECTION'; + + if ( parameters.envMap ) { + + switch ( parameters.envMapMode ) { + + case CubeRefractionMapping: + + envMapModeDefine = 'ENVMAP_MODE_REFRACTION'; + break; + + } + + } + + return envMapModeDefine; + +} + +function generateEnvMapBlendingDefine( parameters ) { + + let envMapBlendingDefine = 'ENVMAP_BLENDING_NONE'; + + if ( parameters.envMap ) { + + switch ( parameters.combine ) { + + case MultiplyOperation: + envMapBlendingDefine = 'ENVMAP_BLENDING_MULTIPLY'; + break; + + case MixOperation: + envMapBlendingDefine = 'ENVMAP_BLENDING_MIX'; + break; + + case AddOperation: + envMapBlendingDefine = 'ENVMAP_BLENDING_ADD'; + break; + + } + + } + + return envMapBlendingDefine; + +} + +function generateCubeUVSize( parameters ) { + + const imageHeight = parameters.envMapCubeUVHeight; + + if ( imageHeight === null ) return null; + + const maxMip = Math.log2( imageHeight ) - 2; + + const texelHeight = 1.0 / imageHeight; + + const texelWidth = 1.0 / ( 3 * Math.max( Math.pow( 2, maxMip ), 7 * 16 ) ); + + return { texelWidth, texelHeight, maxMip }; + +} + +function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) { + + // TODO Send this event to Three.js DevTools + // console.log( 'WebGLProgram', cacheKey ); + + const gl = renderer.getContext(); + + const defines = parameters.defines; + + let vertexShader = parameters.vertexShader; + let fragmentShader = parameters.fragmentShader; + + const shadowMapTypeDefine = generateShadowMapTypeDefine( parameters ); + const envMapTypeDefine = generateEnvMapTypeDefine( parameters ); + const envMapModeDefine = generateEnvMapModeDefine( parameters ); + const envMapBlendingDefine = generateEnvMapBlendingDefine( parameters ); + const envMapCubeUVSize = generateCubeUVSize( parameters ); + + const customVertexExtensions = generateVertexExtensions( parameters ); + + const customDefines = generateDefines( defines ); + + const program = gl.createProgram(); + + let prefixVertex, prefixFragment; + let versionString = parameters.glslVersion ? '#version ' + parameters.glslVersion + '\n' : ''; + + if ( parameters.isRawShaderMaterial ) { + + prefixVertex = [ + + '#define SHADER_TYPE ' + parameters.shaderType, + '#define SHADER_NAME ' + parameters.shaderName, + + customDefines + + ].filter( filterEmptyLine ).join( '\n' ); + + if ( prefixVertex.length > 0 ) { + + prefixVertex += '\n'; + + } + + prefixFragment = [ + + '#define SHADER_TYPE ' + parameters.shaderType, + '#define SHADER_NAME ' + parameters.shaderName, + + customDefines + + ].filter( filterEmptyLine ).join( '\n' ); + + if ( prefixFragment.length > 0 ) { + + prefixFragment += '\n'; + + } + + } else { + + prefixVertex = [ + + generatePrecision( parameters ), + + '#define SHADER_TYPE ' + parameters.shaderType, + '#define SHADER_NAME ' + parameters.shaderName, + + customDefines, + + parameters.extensionClipCullDistance ? '#define USE_CLIP_DISTANCE' : '', + parameters.batching ? '#define USE_BATCHING' : '', + parameters.instancing ? '#define USE_INSTANCING' : '', + parameters.instancingColor ? '#define USE_INSTANCING_COLOR' : '', + parameters.instancingMorph ? '#define USE_INSTANCING_MORPH' : '', + + parameters.useFog && parameters.fog ? '#define USE_FOG' : '', + parameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '', + + parameters.map ? '#define USE_MAP' : '', + parameters.envMap ? '#define USE_ENVMAP' : '', + parameters.envMap ? '#define ' + envMapModeDefine : '', + parameters.lightMap ? '#define USE_LIGHTMAP' : '', + parameters.aoMap ? '#define USE_AOMAP' : '', + parameters.bumpMap ? '#define USE_BUMPMAP' : '', + parameters.normalMap ? '#define USE_NORMALMAP' : '', + parameters.normalMapObjectSpace ? '#define USE_NORMALMAP_OBJECTSPACE' : '', + parameters.normalMapTangentSpace ? '#define USE_NORMALMAP_TANGENTSPACE' : '', + parameters.displacementMap ? '#define USE_DISPLACEMENTMAP' : '', + parameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '', + + parameters.anisotropy ? '#define USE_ANISOTROPY' : '', + parameters.anisotropyMap ? '#define USE_ANISOTROPYMAP' : '', + + parameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', + parameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', + parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', + + parameters.iridescenceMap ? '#define USE_IRIDESCENCEMAP' : '', + parameters.iridescenceThicknessMap ? '#define USE_IRIDESCENCE_THICKNESSMAP' : '', + + parameters.specularMap ? '#define USE_SPECULARMAP' : '', + parameters.specularColorMap ? '#define USE_SPECULAR_COLORMAP' : '', + parameters.specularIntensityMap ? '#define USE_SPECULAR_INTENSITYMAP' : '', + + parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', + parameters.metalnessMap ? '#define USE_METALNESSMAP' : '', + parameters.alphaMap ? '#define USE_ALPHAMAP' : '', + parameters.alphaHash ? '#define USE_ALPHAHASH' : '', + + parameters.transmission ? '#define USE_TRANSMISSION' : '', + parameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', + parameters.thicknessMap ? '#define USE_THICKNESSMAP' : '', + + parameters.sheenColorMap ? '#define USE_SHEEN_COLORMAP' : '', + parameters.sheenRoughnessMap ? '#define USE_SHEEN_ROUGHNESSMAP' : '', + + // + + parameters.mapUv ? '#define MAP_UV ' + parameters.mapUv : '', + parameters.alphaMapUv ? '#define ALPHAMAP_UV ' + parameters.alphaMapUv : '', + parameters.lightMapUv ? '#define LIGHTMAP_UV ' + parameters.lightMapUv : '', + parameters.aoMapUv ? '#define AOMAP_UV ' + parameters.aoMapUv : '', + parameters.emissiveMapUv ? '#define EMISSIVEMAP_UV ' + parameters.emissiveMapUv : '', + parameters.bumpMapUv ? '#define BUMPMAP_UV ' + parameters.bumpMapUv : '', + parameters.normalMapUv ? '#define NORMALMAP_UV ' + parameters.normalMapUv : '', + parameters.displacementMapUv ? '#define DISPLACEMENTMAP_UV ' + parameters.displacementMapUv : '', + + parameters.metalnessMapUv ? '#define METALNESSMAP_UV ' + parameters.metalnessMapUv : '', + parameters.roughnessMapUv ? '#define ROUGHNESSMAP_UV ' + parameters.roughnessMapUv : '', + + parameters.anisotropyMapUv ? '#define ANISOTROPYMAP_UV ' + parameters.anisotropyMapUv : '', + + parameters.clearcoatMapUv ? '#define CLEARCOATMAP_UV ' + parameters.clearcoatMapUv : '', + parameters.clearcoatNormalMapUv ? '#define CLEARCOAT_NORMALMAP_UV ' + parameters.clearcoatNormalMapUv : '', + parameters.clearcoatRoughnessMapUv ? '#define CLEARCOAT_ROUGHNESSMAP_UV ' + parameters.clearcoatRoughnessMapUv : '', + + parameters.iridescenceMapUv ? '#define IRIDESCENCEMAP_UV ' + parameters.iridescenceMapUv : '', + parameters.iridescenceThicknessMapUv ? '#define IRIDESCENCE_THICKNESSMAP_UV ' + parameters.iridescenceThicknessMapUv : '', + + parameters.sheenColorMapUv ? '#define SHEEN_COLORMAP_UV ' + parameters.sheenColorMapUv : '', + parameters.sheenRoughnessMapUv ? '#define SHEEN_ROUGHNESSMAP_UV ' + parameters.sheenRoughnessMapUv : '', + + parameters.specularMapUv ? '#define SPECULARMAP_UV ' + parameters.specularMapUv : '', + parameters.specularColorMapUv ? '#define SPECULAR_COLORMAP_UV ' + parameters.specularColorMapUv : '', + parameters.specularIntensityMapUv ? '#define SPECULAR_INTENSITYMAP_UV ' + parameters.specularIntensityMapUv : '', + + parameters.transmissionMapUv ? '#define TRANSMISSIONMAP_UV ' + parameters.transmissionMapUv : '', + parameters.thicknessMapUv ? '#define THICKNESSMAP_UV ' + parameters.thicknessMapUv : '', + + // + + parameters.vertexTangents && parameters.flatShading === false ? '#define USE_TANGENT' : '', + parameters.vertexColors ? '#define USE_COLOR' : '', + parameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '', + parameters.vertexUv1s ? '#define USE_UV1' : '', + parameters.vertexUv2s ? '#define USE_UV2' : '', + parameters.vertexUv3s ? '#define USE_UV3' : '', + + parameters.pointsUvs ? '#define USE_POINTS_UV' : '', + + parameters.flatShading ? '#define FLAT_SHADED' : '', + + parameters.skinning ? '#define USE_SKINNING' : '', + + parameters.morphTargets ? '#define USE_MORPHTARGETS' : '', + parameters.morphNormals && parameters.flatShading === false ? '#define USE_MORPHNORMALS' : '', + ( parameters.morphColors ) ? '#define USE_MORPHCOLORS' : '', + ( parameters.morphTargetsCount > 0 ) ? '#define MORPHTARGETS_TEXTURE' : '', + ( parameters.morphTargetsCount > 0 ) ? '#define MORPHTARGETS_TEXTURE_STRIDE ' + parameters.morphTextureStride : '', + ( parameters.morphTargetsCount > 0 ) ? '#define MORPHTARGETS_COUNT ' + parameters.morphTargetsCount : '', + parameters.doubleSided ? '#define DOUBLE_SIDED' : '', + parameters.flipSided ? '#define FLIP_SIDED' : '', + + parameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', + parameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '', + + parameters.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '', + + parameters.numLightProbes > 0 ? '#define USE_LIGHT_PROBES' : '', + + parameters.useLegacyLights ? '#define LEGACY_LIGHTS' : '', + + parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', + + 'uniform mat4 modelMatrix;', + 'uniform mat4 modelViewMatrix;', + 'uniform mat4 projectionMatrix;', + 'uniform mat4 viewMatrix;', + 'uniform mat3 normalMatrix;', + 'uniform vec3 cameraPosition;', + 'uniform bool isOrthographic;', + + '#ifdef USE_INSTANCING', + + ' attribute mat4 instanceMatrix;', + + '#endif', + + '#ifdef USE_INSTANCING_COLOR', + + ' attribute vec3 instanceColor;', + + '#endif', + + '#ifdef USE_INSTANCING_MORPH', + + ' uniform sampler2D morphTexture;', + + '#endif', + + 'attribute vec3 position;', + 'attribute vec3 normal;', + 'attribute vec2 uv;', + + '#ifdef USE_UV1', + + ' attribute vec2 uv1;', + + '#endif', + + '#ifdef USE_UV2', + + ' attribute vec2 uv2;', + + '#endif', + + '#ifdef USE_UV3', + + ' attribute vec2 uv3;', + + '#endif', + + '#ifdef USE_TANGENT', + + ' attribute vec4 tangent;', + + '#endif', + + '#if defined( USE_COLOR_ALPHA )', + + ' attribute vec4 color;', + + '#elif defined( USE_COLOR )', + + ' attribute vec3 color;', + + '#endif', + + '#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )', + + ' attribute vec3 morphTarget0;', + ' attribute vec3 morphTarget1;', + ' attribute vec3 morphTarget2;', + ' attribute vec3 morphTarget3;', + + ' #ifdef USE_MORPHNORMALS', + + ' attribute vec3 morphNormal0;', + ' attribute vec3 morphNormal1;', + ' attribute vec3 morphNormal2;', + ' attribute vec3 morphNormal3;', + + ' #else', + + ' attribute vec3 morphTarget4;', + ' attribute vec3 morphTarget5;', + ' attribute vec3 morphTarget6;', + ' attribute vec3 morphTarget7;', + + ' #endif', + + '#endif', + + '#ifdef USE_SKINNING', + + ' attribute vec4 skinIndex;', + ' attribute vec4 skinWeight;', + + '#endif', + + '\n' + + ].filter( filterEmptyLine ).join( '\n' ); + + prefixFragment = [ + + generatePrecision( parameters ), + + '#define SHADER_TYPE ' + parameters.shaderType, + '#define SHADER_NAME ' + parameters.shaderName, + + customDefines, + + parameters.useFog && parameters.fog ? '#define USE_FOG' : '', + parameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '', + + parameters.alphaToCoverage ? '#define ALPHA_TO_COVERAGE' : '', + parameters.map ? '#define USE_MAP' : '', + parameters.matcap ? '#define USE_MATCAP' : '', + parameters.envMap ? '#define USE_ENVMAP' : '', + parameters.envMap ? '#define ' + envMapTypeDefine : '', + parameters.envMap ? '#define ' + envMapModeDefine : '', + parameters.envMap ? '#define ' + envMapBlendingDefine : '', + envMapCubeUVSize ? '#define CUBEUV_TEXEL_WIDTH ' + envMapCubeUVSize.texelWidth : '', + envMapCubeUVSize ? '#define CUBEUV_TEXEL_HEIGHT ' + envMapCubeUVSize.texelHeight : '', + envMapCubeUVSize ? '#define CUBEUV_MAX_MIP ' + envMapCubeUVSize.maxMip + '.0' : '', + parameters.lightMap ? '#define USE_LIGHTMAP' : '', + parameters.aoMap ? '#define USE_AOMAP' : '', + parameters.bumpMap ? '#define USE_BUMPMAP' : '', + parameters.normalMap ? '#define USE_NORMALMAP' : '', + parameters.normalMapObjectSpace ? '#define USE_NORMALMAP_OBJECTSPACE' : '', + parameters.normalMapTangentSpace ? '#define USE_NORMALMAP_TANGENTSPACE' : '', + parameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '', + + parameters.anisotropy ? '#define USE_ANISOTROPY' : '', + parameters.anisotropyMap ? '#define USE_ANISOTROPYMAP' : '', + + parameters.clearcoat ? '#define USE_CLEARCOAT' : '', + parameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', + parameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', + parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', + + parameters.dispersion ? '#define USE_DISPERSION' : '', + + parameters.iridescence ? '#define USE_IRIDESCENCE' : '', + parameters.iridescenceMap ? '#define USE_IRIDESCENCEMAP' : '', + parameters.iridescenceThicknessMap ? '#define USE_IRIDESCENCE_THICKNESSMAP' : '', + + parameters.specularMap ? '#define USE_SPECULARMAP' : '', + parameters.specularColorMap ? '#define USE_SPECULAR_COLORMAP' : '', + parameters.specularIntensityMap ? '#define USE_SPECULAR_INTENSITYMAP' : '', + + parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', + parameters.metalnessMap ? '#define USE_METALNESSMAP' : '', + + parameters.alphaMap ? '#define USE_ALPHAMAP' : '', + parameters.alphaTest ? '#define USE_ALPHATEST' : '', + parameters.alphaHash ? '#define USE_ALPHAHASH' : '', + + parameters.sheen ? '#define USE_SHEEN' : '', + parameters.sheenColorMap ? '#define USE_SHEEN_COLORMAP' : '', + parameters.sheenRoughnessMap ? '#define USE_SHEEN_ROUGHNESSMAP' : '', + + parameters.transmission ? '#define USE_TRANSMISSION' : '', + parameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', + parameters.thicknessMap ? '#define USE_THICKNESSMAP' : '', + + parameters.vertexTangents && parameters.flatShading === false ? '#define USE_TANGENT' : '', + parameters.vertexColors || parameters.instancingColor ? '#define USE_COLOR' : '', + parameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '', + parameters.vertexUv1s ? '#define USE_UV1' : '', + parameters.vertexUv2s ? '#define USE_UV2' : '', + parameters.vertexUv3s ? '#define USE_UV3' : '', + + parameters.pointsUvs ? '#define USE_POINTS_UV' : '', + + parameters.gradientMap ? '#define USE_GRADIENTMAP' : '', + + parameters.flatShading ? '#define FLAT_SHADED' : '', + + parameters.doubleSided ? '#define DOUBLE_SIDED' : '', + parameters.flipSided ? '#define FLIP_SIDED' : '', + + parameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', + parameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '', + + parameters.premultipliedAlpha ? '#define PREMULTIPLIED_ALPHA' : '', + + parameters.numLightProbes > 0 ? '#define USE_LIGHT_PROBES' : '', + + parameters.useLegacyLights ? '#define LEGACY_LIGHTS' : '', + + parameters.decodeVideoTexture ? '#define DECODE_VIDEO_TEXTURE' : '', + + parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', + + 'uniform mat4 viewMatrix;', + 'uniform vec3 cameraPosition;', + 'uniform bool isOrthographic;', + + ( parameters.toneMapping !== NoToneMapping ) ? '#define TONE_MAPPING' : '', + ( parameters.toneMapping !== NoToneMapping ) ? ShaderChunk[ 'tonemapping_pars_fragment' ] : '', // this code is required here because it is used by the toneMapping() function defined below + ( parameters.toneMapping !== NoToneMapping ) ? getToneMappingFunction( 'toneMapping', parameters.toneMapping ) : '', + + parameters.dithering ? '#define DITHERING' : '', + parameters.opaque ? '#define OPAQUE' : '', + + ShaderChunk[ 'colorspace_pars_fragment' ], // this code is required here because it is used by the various encoding/decoding function defined below + getTexelEncodingFunction( 'linearToOutputTexel', parameters.outputColorSpace ), + + parameters.useDepthPacking ? '#define DEPTH_PACKING ' + parameters.depthPacking : '', + + '\n' + + ].filter( filterEmptyLine ).join( '\n' ); + + } + + vertexShader = resolveIncludes( vertexShader ); + vertexShader = replaceLightNums( vertexShader, parameters ); + vertexShader = replaceClippingPlaneNums( vertexShader, parameters ); + + fragmentShader = resolveIncludes( fragmentShader ); + fragmentShader = replaceLightNums( fragmentShader, parameters ); + fragmentShader = replaceClippingPlaneNums( fragmentShader, parameters ); + + vertexShader = unrollLoops( vertexShader ); + fragmentShader = unrollLoops( fragmentShader ); + + if ( parameters.isRawShaderMaterial !== true ) { + + // GLSL 3.0 conversion for built-in materials and ShaderMaterial + + versionString = '#version 300 es\n'; + + prefixVertex = [ + customVertexExtensions, + '#define attribute in', + '#define varying out', + '#define texture2D texture' + ].join( '\n' ) + '\n' + prefixVertex; + + prefixFragment = [ + '#define varying in', + ( parameters.glslVersion === GLSL3 ) ? '' : 'layout(location = 0) out highp vec4 pc_fragColor;', + ( parameters.glslVersion === GLSL3 ) ? '' : '#define gl_FragColor pc_fragColor', + '#define gl_FragDepthEXT gl_FragDepth', + '#define texture2D texture', + '#define textureCube texture', + '#define texture2DProj textureProj', + '#define texture2DLodEXT textureLod', + '#define texture2DProjLodEXT textureProjLod', + '#define textureCubeLodEXT textureLod', + '#define texture2DGradEXT textureGrad', + '#define texture2DProjGradEXT textureProjGrad', + '#define textureCubeGradEXT textureGrad' + ].join( '\n' ) + '\n' + prefixFragment; + + } + + const vertexGlsl = versionString + prefixVertex + vertexShader; + const fragmentGlsl = versionString + prefixFragment + fragmentShader; + + // console.log( '*VERTEX*', vertexGlsl ); + // console.log( '*FRAGMENT*', fragmentGlsl ); + + const glVertexShader = WebGLShader( gl, gl.VERTEX_SHADER, vertexGlsl ); + const glFragmentShader = WebGLShader( gl, gl.FRAGMENT_SHADER, fragmentGlsl ); + + gl.attachShader( program, glVertexShader ); + gl.attachShader( program, glFragmentShader ); + + // Force a particular attribute to index 0. + + if ( parameters.index0AttributeName !== undefined ) { + + gl.bindAttribLocation( program, 0, parameters.index0AttributeName ); + + } else if ( parameters.morphTargets === true ) { + + // programs with morphTargets displace position out of attribute 0 + gl.bindAttribLocation( program, 0, 'position' ); + + } + + gl.linkProgram( program ); + + function onFirstUse( self ) { + + // check for link errors + if ( renderer.debug.checkShaderErrors ) { + + const programLog = gl.getProgramInfoLog( program ).trim(); + const vertexLog = gl.getShaderInfoLog( glVertexShader ).trim(); + const fragmentLog = gl.getShaderInfoLog( glFragmentShader ).trim(); + + let runnable = true; + let haveDiagnostics = true; + + if ( gl.getProgramParameter( program, gl.LINK_STATUS ) === false ) { + + runnable = false; + + if ( typeof renderer.debug.onShaderError === 'function' ) { + + renderer.debug.onShaderError( gl, program, glVertexShader, glFragmentShader ); + + } else { + + // default error reporting + + const vertexErrors = getShaderErrors( gl, glVertexShader, 'vertex' ); + const fragmentErrors = getShaderErrors( gl, glFragmentShader, 'fragment' ); + + console.error( + 'THREE.WebGLProgram: Shader Error ' + gl.getError() + ' - ' + + 'VALIDATE_STATUS ' + gl.getProgramParameter( program, gl.VALIDATE_STATUS ) + '\n\n' + + 'Material Name: ' + self.name + '\n' + + 'Material Type: ' + self.type + '\n\n' + + 'Program Info Log: ' + programLog + '\n' + + vertexErrors + '\n' + + fragmentErrors + ); + + } + + } else if ( programLog !== '' ) { + + console.warn( 'THREE.WebGLProgram: Program Info Log:', programLog ); + + } else if ( vertexLog === '' || fragmentLog === '' ) { + + haveDiagnostics = false; + + } + + if ( haveDiagnostics ) { + + self.diagnostics = { + + runnable: runnable, + + programLog: programLog, + + vertexShader: { + + log: vertexLog, + prefix: prefixVertex + + }, + + fragmentShader: { + + log: fragmentLog, + prefix: prefixFragment + + } + + }; + + } + + } + + // Clean up + + // Crashes in iOS9 and iOS10. #18402 + // gl.detachShader( program, glVertexShader ); + // gl.detachShader( program, glFragmentShader ); + + gl.deleteShader( glVertexShader ); + gl.deleteShader( glFragmentShader ); + + cachedUniforms = new WebGLUniforms( gl, program ); + cachedAttributes = fetchAttributeLocations( gl, program ); + + } + + // set up caching for uniform locations + + let cachedUniforms; + + this.getUniforms = function () { + + if ( cachedUniforms === undefined ) { + + // Populates cachedUniforms and cachedAttributes + onFirstUse( this ); + + } + + return cachedUniforms; + + }; + + // set up caching for attribute locations + + let cachedAttributes; + + this.getAttributes = function () { + + if ( cachedAttributes === undefined ) { + + // Populates cachedAttributes and cachedUniforms + onFirstUse( this ); + + } + + return cachedAttributes; + + }; + + // indicate when the program is ready to be used. if the KHR_parallel_shader_compile extension isn't supported, + // flag the program as ready immediately. It may cause a stall when it's first used. + + let programReady = ( parameters.rendererExtensionParallelShaderCompile === false ); + + this.isReady = function () { + + if ( programReady === false ) { + + programReady = gl.getProgramParameter( program, COMPLETION_STATUS_KHR ); + + } + + return programReady; + + }; + + // free resource + + this.destroy = function () { + + bindingStates.releaseStatesOfProgram( this ); + + gl.deleteProgram( program ); + this.program = undefined; + + }; + + // + + this.type = parameters.shaderType; + this.name = parameters.shaderName; + this.id = programIdCount ++; + this.cacheKey = cacheKey; + this.usedTimes = 1; + this.program = program; + this.vertexShader = glVertexShader; + this.fragmentShader = glFragmentShader; + + return this; + +} + +let _id$1 = 0; + +class WebGLShaderCache { + + constructor() { + + this.shaderCache = new Map(); + this.materialCache = new Map(); + + } + + update( material ) { + + const vertexShader = material.vertexShader; + const fragmentShader = material.fragmentShader; + + const vertexShaderStage = this._getShaderStage( vertexShader ); + const fragmentShaderStage = this._getShaderStage( fragmentShader ); + + const materialShaders = this._getShaderCacheForMaterial( material ); + + if ( materialShaders.has( vertexShaderStage ) === false ) { + + materialShaders.add( vertexShaderStage ); + vertexShaderStage.usedTimes ++; + + } + + if ( materialShaders.has( fragmentShaderStage ) === false ) { + + materialShaders.add( fragmentShaderStage ); + fragmentShaderStage.usedTimes ++; + + } + + return this; + + } + + remove( material ) { + + const materialShaders = this.materialCache.get( material ); + + for ( const shaderStage of materialShaders ) { + + shaderStage.usedTimes --; + + if ( shaderStage.usedTimes === 0 ) this.shaderCache.delete( shaderStage.code ); + + } + + this.materialCache.delete( material ); + + return this; + + } + + getVertexShaderID( material ) { + + return this._getShaderStage( material.vertexShader ).id; + + } + + getFragmentShaderID( material ) { + + return this._getShaderStage( material.fragmentShader ).id; + + } + + dispose() { + + this.shaderCache.clear(); + this.materialCache.clear(); + + } + + _getShaderCacheForMaterial( material ) { + + const cache = this.materialCache; + let set = cache.get( material ); + + if ( set === undefined ) { + + set = new Set(); + cache.set( material, set ); + + } + + return set; + + } + + _getShaderStage( code ) { + + const cache = this.shaderCache; + let stage = cache.get( code ); + + if ( stage === undefined ) { + + stage = new WebGLShaderStage( code ); + cache.set( code, stage ); + + } + + return stage; + + } + +} + +class WebGLShaderStage { + + constructor( code ) { + + this.id = _id$1 ++; + + this.code = code; + this.usedTimes = 0; + + } + +} + +function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping ) { + + const _programLayers = new Layers(); + const _customShaders = new WebGLShaderCache(); + const _activeChannels = new Set(); + const programs = []; + + const logarithmicDepthBuffer = capabilities.logarithmicDepthBuffer; + const SUPPORTS_VERTEX_TEXTURES = capabilities.vertexTextures; + + let precision = capabilities.precision; + + const shaderIDs = { + MeshDepthMaterial: 'depth', + MeshDistanceMaterial: 'distanceRGBA', + MeshNormalMaterial: 'normal', + MeshBasicMaterial: 'basic', + MeshLambertMaterial: 'lambert', + MeshPhongMaterial: 'phong', + MeshToonMaterial: 'toon', + MeshStandardMaterial: 'physical', + MeshPhysicalMaterial: 'physical', + MeshMatcapMaterial: 'matcap', + LineBasicMaterial: 'basic', + LineDashedMaterial: 'dashed', + PointsMaterial: 'points', + ShadowMaterial: 'shadow', + SpriteMaterial: 'sprite' + }; + + function getChannel( value ) { + + _activeChannels.add( value ); + + if ( value === 0 ) return 'uv'; + + return `uv${ value }`; + + } + + function getParameters( material, lights, shadows, scene, object ) { + + const fog = scene.fog; + const geometry = object.geometry; + const environment = material.isMeshStandardMaterial ? scene.environment : null; + + const envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || environment ); + const envMapCubeUVHeight = ( !! envMap ) && ( envMap.mapping === CubeUVReflectionMapping ) ? envMap.image.height : null; + + const shaderID = shaderIDs[ material.type ]; + + // heuristics to create shader parameters according to lights in the scene + // (not to blow over maxLights budget) + + if ( material.precision !== null ) { + + precision = capabilities.getMaxPrecision( material.precision ); + + if ( precision !== material.precision ) { + + console.warn( 'THREE.WebGLProgram.getParameters:', material.precision, 'not supported, using', precision, 'instead.' ); + + } + + } + + // + + const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color; + const morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0; + + let morphTextureStride = 0; + + if ( geometry.morphAttributes.position !== undefined ) morphTextureStride = 1; + if ( geometry.morphAttributes.normal !== undefined ) morphTextureStride = 2; + if ( geometry.morphAttributes.color !== undefined ) morphTextureStride = 3; + + // + + let vertexShader, fragmentShader; + let customVertexShaderID, customFragmentShaderID; + + if ( shaderID ) { + + const shader = ShaderLib[ shaderID ]; + + vertexShader = shader.vertexShader; + fragmentShader = shader.fragmentShader; + + } else { + + vertexShader = material.vertexShader; + fragmentShader = material.fragmentShader; + + _customShaders.update( material ); + + customVertexShaderID = _customShaders.getVertexShaderID( material ); + customFragmentShaderID = _customShaders.getFragmentShaderID( material ); + + } + + const currentRenderTarget = renderer.getRenderTarget(); + + const IS_INSTANCEDMESH = object.isInstancedMesh === true; + const IS_BATCHEDMESH = object.isBatchedMesh === true; + + const HAS_MAP = !! material.map; + const HAS_MATCAP = !! material.matcap; + const HAS_ENVMAP = !! envMap; + const HAS_AOMAP = !! material.aoMap; + const HAS_LIGHTMAP = !! material.lightMap; + const HAS_BUMPMAP = !! material.bumpMap; + const HAS_NORMALMAP = !! material.normalMap; + const HAS_DISPLACEMENTMAP = !! material.displacementMap; + const HAS_EMISSIVEMAP = !! material.emissiveMap; + + const HAS_METALNESSMAP = !! material.metalnessMap; + const HAS_ROUGHNESSMAP = !! material.roughnessMap; + + const HAS_ANISOTROPY = material.anisotropy > 0; + const HAS_CLEARCOAT = material.clearcoat > 0; + const HAS_DISPERSION = material.dispersion > 0; + const HAS_IRIDESCENCE = material.iridescence > 0; + const HAS_SHEEN = material.sheen > 0; + const HAS_TRANSMISSION = material.transmission > 0; + + const HAS_ANISOTROPYMAP = HAS_ANISOTROPY && !! material.anisotropyMap; + + const HAS_CLEARCOATMAP = HAS_CLEARCOAT && !! material.clearcoatMap; + const HAS_CLEARCOAT_NORMALMAP = HAS_CLEARCOAT && !! material.clearcoatNormalMap; + const HAS_CLEARCOAT_ROUGHNESSMAP = HAS_CLEARCOAT && !! material.clearcoatRoughnessMap; + + const HAS_IRIDESCENCEMAP = HAS_IRIDESCENCE && !! material.iridescenceMap; + const HAS_IRIDESCENCE_THICKNESSMAP = HAS_IRIDESCENCE && !! material.iridescenceThicknessMap; + + const HAS_SHEEN_COLORMAP = HAS_SHEEN && !! material.sheenColorMap; + const HAS_SHEEN_ROUGHNESSMAP = HAS_SHEEN && !! material.sheenRoughnessMap; + + const HAS_SPECULARMAP = !! material.specularMap; + const HAS_SPECULAR_COLORMAP = !! material.specularColorMap; + const HAS_SPECULAR_INTENSITYMAP = !! material.specularIntensityMap; + + const HAS_TRANSMISSIONMAP = HAS_TRANSMISSION && !! material.transmissionMap; + const HAS_THICKNESSMAP = HAS_TRANSMISSION && !! material.thicknessMap; + + const HAS_GRADIENTMAP = !! material.gradientMap; + + const HAS_ALPHAMAP = !! material.alphaMap; + + const HAS_ALPHATEST = material.alphaTest > 0; + + const HAS_ALPHAHASH = !! material.alphaHash; + + const HAS_EXTENSIONS = !! material.extensions; + + let toneMapping = NoToneMapping; + + if ( material.toneMapped ) { + + if ( currentRenderTarget === null || currentRenderTarget.isXRRenderTarget === true ) { + + toneMapping = renderer.toneMapping; + + } + + } + + const parameters = { + + shaderID: shaderID, + shaderType: material.type, + shaderName: material.name, + + vertexShader: vertexShader, + fragmentShader: fragmentShader, + defines: material.defines, + + customVertexShaderID: customVertexShaderID, + customFragmentShaderID: customFragmentShaderID, + + isRawShaderMaterial: material.isRawShaderMaterial === true, + glslVersion: material.glslVersion, + + precision: precision, + + batching: IS_BATCHEDMESH, + instancing: IS_INSTANCEDMESH, + instancingColor: IS_INSTANCEDMESH && object.instanceColor !== null, + instancingMorph: IS_INSTANCEDMESH && object.morphTexture !== null, + + supportsVertexTextures: SUPPORTS_VERTEX_TEXTURES, + outputColorSpace: ( currentRenderTarget === null ) ? renderer.outputColorSpace : ( currentRenderTarget.isXRRenderTarget === true ? currentRenderTarget.texture.colorSpace : LinearSRGBColorSpace ), + alphaToCoverage: !! material.alphaToCoverage, + + map: HAS_MAP, + matcap: HAS_MATCAP, + envMap: HAS_ENVMAP, + envMapMode: HAS_ENVMAP && envMap.mapping, + envMapCubeUVHeight: envMapCubeUVHeight, + aoMap: HAS_AOMAP, + lightMap: HAS_LIGHTMAP, + bumpMap: HAS_BUMPMAP, + normalMap: HAS_NORMALMAP, + displacementMap: SUPPORTS_VERTEX_TEXTURES && HAS_DISPLACEMENTMAP, + emissiveMap: HAS_EMISSIVEMAP, + + normalMapObjectSpace: HAS_NORMALMAP && material.normalMapType === ObjectSpaceNormalMap, + normalMapTangentSpace: HAS_NORMALMAP && material.normalMapType === TangentSpaceNormalMap, + + metalnessMap: HAS_METALNESSMAP, + roughnessMap: HAS_ROUGHNESSMAP, + + anisotropy: HAS_ANISOTROPY, + anisotropyMap: HAS_ANISOTROPYMAP, + + clearcoat: HAS_CLEARCOAT, + clearcoatMap: HAS_CLEARCOATMAP, + clearcoatNormalMap: HAS_CLEARCOAT_NORMALMAP, + clearcoatRoughnessMap: HAS_CLEARCOAT_ROUGHNESSMAP, + + dispersion: HAS_DISPERSION, + + iridescence: HAS_IRIDESCENCE, + iridescenceMap: HAS_IRIDESCENCEMAP, + iridescenceThicknessMap: HAS_IRIDESCENCE_THICKNESSMAP, + + sheen: HAS_SHEEN, + sheenColorMap: HAS_SHEEN_COLORMAP, + sheenRoughnessMap: HAS_SHEEN_ROUGHNESSMAP, + + specularMap: HAS_SPECULARMAP, + specularColorMap: HAS_SPECULAR_COLORMAP, + specularIntensityMap: HAS_SPECULAR_INTENSITYMAP, + + transmission: HAS_TRANSMISSION, + transmissionMap: HAS_TRANSMISSIONMAP, + thicknessMap: HAS_THICKNESSMAP, + + gradientMap: HAS_GRADIENTMAP, + + opaque: material.transparent === false && material.blending === NormalBlending && material.alphaToCoverage === false, + + alphaMap: HAS_ALPHAMAP, + alphaTest: HAS_ALPHATEST, + alphaHash: HAS_ALPHAHASH, + + combine: material.combine, + + // + + mapUv: HAS_MAP && getChannel( material.map.channel ), + aoMapUv: HAS_AOMAP && getChannel( material.aoMap.channel ), + lightMapUv: HAS_LIGHTMAP && getChannel( material.lightMap.channel ), + bumpMapUv: HAS_BUMPMAP && getChannel( material.bumpMap.channel ), + normalMapUv: HAS_NORMALMAP && getChannel( material.normalMap.channel ), + displacementMapUv: HAS_DISPLACEMENTMAP && getChannel( material.displacementMap.channel ), + emissiveMapUv: HAS_EMISSIVEMAP && getChannel( material.emissiveMap.channel ), + + metalnessMapUv: HAS_METALNESSMAP && getChannel( material.metalnessMap.channel ), + roughnessMapUv: HAS_ROUGHNESSMAP && getChannel( material.roughnessMap.channel ), + + anisotropyMapUv: HAS_ANISOTROPYMAP && getChannel( material.anisotropyMap.channel ), + + clearcoatMapUv: HAS_CLEARCOATMAP && getChannel( material.clearcoatMap.channel ), + clearcoatNormalMapUv: HAS_CLEARCOAT_NORMALMAP && getChannel( material.clearcoatNormalMap.channel ), + clearcoatRoughnessMapUv: HAS_CLEARCOAT_ROUGHNESSMAP && getChannel( material.clearcoatRoughnessMap.channel ), + + iridescenceMapUv: HAS_IRIDESCENCEMAP && getChannel( material.iridescenceMap.channel ), + iridescenceThicknessMapUv: HAS_IRIDESCENCE_THICKNESSMAP && getChannel( material.iridescenceThicknessMap.channel ), + + sheenColorMapUv: HAS_SHEEN_COLORMAP && getChannel( material.sheenColorMap.channel ), + sheenRoughnessMapUv: HAS_SHEEN_ROUGHNESSMAP && getChannel( material.sheenRoughnessMap.channel ), + + specularMapUv: HAS_SPECULARMAP && getChannel( material.specularMap.channel ), + specularColorMapUv: HAS_SPECULAR_COLORMAP && getChannel( material.specularColorMap.channel ), + specularIntensityMapUv: HAS_SPECULAR_INTENSITYMAP && getChannel( material.specularIntensityMap.channel ), + + transmissionMapUv: HAS_TRANSMISSIONMAP && getChannel( material.transmissionMap.channel ), + thicknessMapUv: HAS_THICKNESSMAP && getChannel( material.thicknessMap.channel ), + + alphaMapUv: HAS_ALPHAMAP && getChannel( material.alphaMap.channel ), + + // + + vertexTangents: !! geometry.attributes.tangent && ( HAS_NORMALMAP || HAS_ANISOTROPY ), + vertexColors: material.vertexColors, + vertexAlphas: material.vertexColors === true && !! geometry.attributes.color && geometry.attributes.color.itemSize === 4, + + pointsUvs: object.isPoints === true && !! geometry.attributes.uv && ( HAS_MAP || HAS_ALPHAMAP ), + + fog: !! fog, + useFog: material.fog === true, + fogExp2: ( !! fog && fog.isFogExp2 ), + + flatShading: material.flatShading === true, + + sizeAttenuation: material.sizeAttenuation === true, + logarithmicDepthBuffer: logarithmicDepthBuffer, + + skinning: object.isSkinnedMesh === true, + + morphTargets: geometry.morphAttributes.position !== undefined, + morphNormals: geometry.morphAttributes.normal !== undefined, + morphColors: geometry.morphAttributes.color !== undefined, + morphTargetsCount: morphTargetsCount, + morphTextureStride: morphTextureStride, + + numDirLights: lights.directional.length, + numPointLights: lights.point.length, + numSpotLights: lights.spot.length, + numSpotLightMaps: lights.spotLightMap.length, + numRectAreaLights: lights.rectArea.length, + numHemiLights: lights.hemi.length, + + numDirLightShadows: lights.directionalShadowMap.length, + numPointLightShadows: lights.pointShadowMap.length, + numSpotLightShadows: lights.spotShadowMap.length, + numSpotLightShadowsWithMaps: lights.numSpotLightShadowsWithMaps, + + numLightProbes: lights.numLightProbes, + + numClippingPlanes: clipping.numPlanes, + numClipIntersection: clipping.numIntersection, + + dithering: material.dithering, + + shadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0, + shadowMapType: renderer.shadowMap.type, + + toneMapping: toneMapping, + useLegacyLights: renderer._useLegacyLights, + + decodeVideoTexture: HAS_MAP && ( material.map.isVideoTexture === true ) && ( ColorManagement.getTransfer( material.map.colorSpace ) === SRGBTransfer ), + + premultipliedAlpha: material.premultipliedAlpha, + + doubleSided: material.side === DoubleSide, + flipSided: material.side === BackSide, + + useDepthPacking: material.depthPacking >= 0, + depthPacking: material.depthPacking || 0, + + index0AttributeName: material.index0AttributeName, + + extensionClipCullDistance: HAS_EXTENSIONS && material.extensions.clipCullDistance === true && extensions.has( 'WEBGL_clip_cull_distance' ), + extensionMultiDraw: HAS_EXTENSIONS && material.extensions.multiDraw === true && extensions.has( 'WEBGL_multi_draw' ), + + rendererExtensionParallelShaderCompile: extensions.has( 'KHR_parallel_shader_compile' ), + + customProgramCacheKey: material.customProgramCacheKey() + + }; + + // the usage of getChannel() determines the active texture channels for this shader + + parameters.vertexUv1s = _activeChannels.has( 1 ); + parameters.vertexUv2s = _activeChannels.has( 2 ); + parameters.vertexUv3s = _activeChannels.has( 3 ); + + _activeChannels.clear(); + + return parameters; + + } + + function getProgramCacheKey( parameters ) { + + const array = []; + + if ( parameters.shaderID ) { + + array.push( parameters.shaderID ); + + } else { + + array.push( parameters.customVertexShaderID ); + array.push( parameters.customFragmentShaderID ); + + } + + if ( parameters.defines !== undefined ) { + + for ( const name in parameters.defines ) { + + array.push( name ); + array.push( parameters.defines[ name ] ); + + } + + } + + if ( parameters.isRawShaderMaterial === false ) { + + getProgramCacheKeyParameters( array, parameters ); + getProgramCacheKeyBooleans( array, parameters ); + array.push( renderer.outputColorSpace ); + + } + + array.push( parameters.customProgramCacheKey ); + + return array.join(); + + } + + function getProgramCacheKeyParameters( array, parameters ) { + + array.push( parameters.precision ); + array.push( parameters.outputColorSpace ); + array.push( parameters.envMapMode ); + array.push( parameters.envMapCubeUVHeight ); + array.push( parameters.mapUv ); + array.push( parameters.alphaMapUv ); + array.push( parameters.lightMapUv ); + array.push( parameters.aoMapUv ); + array.push( parameters.bumpMapUv ); + array.push( parameters.normalMapUv ); + array.push( parameters.displacementMapUv ); + array.push( parameters.emissiveMapUv ); + array.push( parameters.metalnessMapUv ); + array.push( parameters.roughnessMapUv ); + array.push( parameters.anisotropyMapUv ); + array.push( parameters.clearcoatMapUv ); + array.push( parameters.clearcoatNormalMapUv ); + array.push( parameters.clearcoatRoughnessMapUv ); + array.push( parameters.iridescenceMapUv ); + array.push( parameters.iridescenceThicknessMapUv ); + array.push( parameters.sheenColorMapUv ); + array.push( parameters.sheenRoughnessMapUv ); + array.push( parameters.specularMapUv ); + array.push( parameters.specularColorMapUv ); + array.push( parameters.specularIntensityMapUv ); + array.push( parameters.transmissionMapUv ); + array.push( parameters.thicknessMapUv ); + array.push( parameters.combine ); + array.push( parameters.fogExp2 ); + array.push( parameters.sizeAttenuation ); + array.push( parameters.morphTargetsCount ); + array.push( parameters.morphAttributeCount ); + array.push( parameters.numDirLights ); + array.push( parameters.numPointLights ); + array.push( parameters.numSpotLights ); + array.push( parameters.numSpotLightMaps ); + array.push( parameters.numHemiLights ); + array.push( parameters.numRectAreaLights ); + array.push( parameters.numDirLightShadows ); + array.push( parameters.numPointLightShadows ); + array.push( parameters.numSpotLightShadows ); + array.push( parameters.numSpotLightShadowsWithMaps ); + array.push( parameters.numLightProbes ); + array.push( parameters.shadowMapType ); + array.push( parameters.toneMapping ); + array.push( parameters.numClippingPlanes ); + array.push( parameters.numClipIntersection ); + array.push( parameters.depthPacking ); + + } + + function getProgramCacheKeyBooleans( array, parameters ) { + + _programLayers.disableAll(); + + if ( parameters.supportsVertexTextures ) + _programLayers.enable( 0 ); + if ( parameters.instancing ) + _programLayers.enable( 1 ); + if ( parameters.instancingColor ) + _programLayers.enable( 2 ); + if ( parameters.instancingMorph ) + _programLayers.enable( 3 ); + if ( parameters.matcap ) + _programLayers.enable( 4 ); + if ( parameters.envMap ) + _programLayers.enable( 5 ); + if ( parameters.normalMapObjectSpace ) + _programLayers.enable( 6 ); + if ( parameters.normalMapTangentSpace ) + _programLayers.enable( 7 ); + if ( parameters.clearcoat ) + _programLayers.enable( 8 ); + if ( parameters.iridescence ) + _programLayers.enable( 9 ); + if ( parameters.alphaTest ) + _programLayers.enable( 10 ); + if ( parameters.vertexColors ) + _programLayers.enable( 11 ); + if ( parameters.vertexAlphas ) + _programLayers.enable( 12 ); + if ( parameters.vertexUv1s ) + _programLayers.enable( 13 ); + if ( parameters.vertexUv2s ) + _programLayers.enable( 14 ); + if ( parameters.vertexUv3s ) + _programLayers.enable( 15 ); + if ( parameters.vertexTangents ) + _programLayers.enable( 16 ); + if ( parameters.anisotropy ) + _programLayers.enable( 17 ); + if ( parameters.alphaHash ) + _programLayers.enable( 18 ); + if ( parameters.batching ) + _programLayers.enable( 19 ); + if ( parameters.dispersion ) + _programLayers.enable( 20 ); + + array.push( _programLayers.mask ); + _programLayers.disableAll(); + + if ( parameters.fog ) + _programLayers.enable( 0 ); + if ( parameters.useFog ) + _programLayers.enable( 1 ); + if ( parameters.flatShading ) + _programLayers.enable( 2 ); + if ( parameters.logarithmicDepthBuffer ) + _programLayers.enable( 3 ); + if ( parameters.skinning ) + _programLayers.enable( 4 ); + if ( parameters.morphTargets ) + _programLayers.enable( 5 ); + if ( parameters.morphNormals ) + _programLayers.enable( 6 ); + if ( parameters.morphColors ) + _programLayers.enable( 7 ); + if ( parameters.premultipliedAlpha ) + _programLayers.enable( 8 ); + if ( parameters.shadowMapEnabled ) + _programLayers.enable( 9 ); + if ( parameters.useLegacyLights ) + _programLayers.enable( 10 ); + if ( parameters.doubleSided ) + _programLayers.enable( 11 ); + if ( parameters.flipSided ) + _programLayers.enable( 12 ); + if ( parameters.useDepthPacking ) + _programLayers.enable( 13 ); + if ( parameters.dithering ) + _programLayers.enable( 14 ); + if ( parameters.transmission ) + _programLayers.enable( 15 ); + if ( parameters.sheen ) + _programLayers.enable( 16 ); + if ( parameters.opaque ) + _programLayers.enable( 17 ); + if ( parameters.pointsUvs ) + _programLayers.enable( 18 ); + if ( parameters.decodeVideoTexture ) + _programLayers.enable( 19 ); + if ( parameters.alphaToCoverage ) + _programLayers.enable( 20 ); + + array.push( _programLayers.mask ); + + } + + function getUniforms( material ) { + + const shaderID = shaderIDs[ material.type ]; + let uniforms; + + if ( shaderID ) { + + const shader = ShaderLib[ shaderID ]; + uniforms = UniformsUtils.clone( shader.uniforms ); + + } else { + + uniforms = material.uniforms; + + } + + return uniforms; + + } + + function acquireProgram( parameters, cacheKey ) { + + let program; + + // Check if code has been already compiled + for ( let p = 0, pl = programs.length; p < pl; p ++ ) { + + const preexistingProgram = programs[ p ]; + + if ( preexistingProgram.cacheKey === cacheKey ) { + + program = preexistingProgram; + ++ program.usedTimes; + + break; + + } + + } + + if ( program === undefined ) { + + program = new WebGLProgram( renderer, cacheKey, parameters, bindingStates ); + programs.push( program ); + + } + + return program; + + } + + function releaseProgram( program ) { + + if ( -- program.usedTimes === 0 ) { + + // Remove from unordered set + const i = programs.indexOf( program ); + programs[ i ] = programs[ programs.length - 1 ]; + programs.pop(); + + // Free WebGL resources + program.destroy(); + + } + + } + + function releaseShaderCache( material ) { + + _customShaders.remove( material ); + + } + + function dispose() { + + _customShaders.dispose(); + + } + + return { + getParameters: getParameters, + getProgramCacheKey: getProgramCacheKey, + getUniforms: getUniforms, + acquireProgram: acquireProgram, + releaseProgram: releaseProgram, + releaseShaderCache: releaseShaderCache, + // Exposed for resource monitoring & error feedback via renderer.info: + programs: programs, + dispose: dispose + }; + +} + +function WebGLProperties() { + + let properties = new WeakMap(); + + function get( object ) { + + let map = properties.get( object ); + + if ( map === undefined ) { + + map = {}; + properties.set( object, map ); + + } + + return map; + + } + + function remove( object ) { + + properties.delete( object ); + + } + + function update( object, key, value ) { + + properties.get( object )[ key ] = value; + + } + + function dispose() { + + properties = new WeakMap(); + + } + + return { + get: get, + remove: remove, + update: update, + dispose: dispose + }; + +} + +function painterSortStable( a, b ) { + + if ( a.groupOrder !== b.groupOrder ) { + + return a.groupOrder - b.groupOrder; + + } else if ( a.renderOrder !== b.renderOrder ) { + + return a.renderOrder - b.renderOrder; + + } else if ( a.material.id !== b.material.id ) { + + return a.material.id - b.material.id; + + } else if ( a.z !== b.z ) { + + return a.z - b.z; + + } else { + + return a.id - b.id; + + } + +} + +function reversePainterSortStable( a, b ) { + + if ( a.groupOrder !== b.groupOrder ) { + + return a.groupOrder - b.groupOrder; + + } else if ( a.renderOrder !== b.renderOrder ) { + + return a.renderOrder - b.renderOrder; + + } else if ( a.z !== b.z ) { + + return b.z - a.z; + + } else { + + return a.id - b.id; + + } + +} + + +function WebGLRenderList() { + + const renderItems = []; + let renderItemsIndex = 0; + + const opaque = []; + const transmissive = []; + const transparent = []; + + function init() { + + renderItemsIndex = 0; + + opaque.length = 0; + transmissive.length = 0; + transparent.length = 0; + + } + + function getNextRenderItem( object, geometry, material, groupOrder, z, group ) { + + let renderItem = renderItems[ renderItemsIndex ]; + + if ( renderItem === undefined ) { + + renderItem = { + id: object.id, + object: object, + geometry: geometry, + material: material, + groupOrder: groupOrder, + renderOrder: object.renderOrder, + z: z, + group: group + }; + + renderItems[ renderItemsIndex ] = renderItem; + + } else { + + renderItem.id = object.id; + renderItem.object = object; + renderItem.geometry = geometry; + renderItem.material = material; + renderItem.groupOrder = groupOrder; + renderItem.renderOrder = object.renderOrder; + renderItem.z = z; + renderItem.group = group; + + } + + renderItemsIndex ++; + + return renderItem; + + } + + function push( object, geometry, material, groupOrder, z, group ) { + + const renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group ); + + if ( material.transmission > 0.0 ) { + + transmissive.push( renderItem ); + + } else if ( material.transparent === true ) { + + transparent.push( renderItem ); + + } else { + + opaque.push( renderItem ); + + } + + } + + function unshift( object, geometry, material, groupOrder, z, group ) { + + const renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group ); + + if ( material.transmission > 0.0 ) { + + transmissive.unshift( renderItem ); + + } else if ( material.transparent === true ) { + + transparent.unshift( renderItem ); + + } else { + + opaque.unshift( renderItem ); + + } + + } + + function sort( customOpaqueSort, customTransparentSort ) { + + if ( opaque.length > 1 ) opaque.sort( customOpaqueSort || painterSortStable ); + if ( transmissive.length > 1 ) transmissive.sort( customTransparentSort || reversePainterSortStable ); + if ( transparent.length > 1 ) transparent.sort( customTransparentSort || reversePainterSortStable ); + + } + + function finish() { + + // Clear references from inactive renderItems in the list + + for ( let i = renderItemsIndex, il = renderItems.length; i < il; i ++ ) { + + const renderItem = renderItems[ i ]; + + if ( renderItem.id === null ) break; + + renderItem.id = null; + renderItem.object = null; + renderItem.geometry = null; + renderItem.material = null; + renderItem.group = null; + + } + + } + + return { + + opaque: opaque, + transmissive: transmissive, + transparent: transparent, + + init: init, + push: push, + unshift: unshift, + finish: finish, + + sort: sort + }; + +} + +function WebGLRenderLists() { + + let lists = new WeakMap(); + + function get( scene, renderCallDepth ) { + + const listArray = lists.get( scene ); + let list; + + if ( listArray === undefined ) { + + list = new WebGLRenderList(); + lists.set( scene, [ list ] ); + + } else { + + if ( renderCallDepth >= listArray.length ) { + + list = new WebGLRenderList(); + listArray.push( list ); + + } else { + + list = listArray[ renderCallDepth ]; + + } + + } + + return list; + + } + + function dispose() { + + lists = new WeakMap(); + + } + + return { + get: get, + dispose: dispose + }; + +} + +function UniformsCache() { + + const lights = {}; + + return { + + get: function ( light ) { + + if ( lights[ light.id ] !== undefined ) { + + return lights[ light.id ]; + + } + + let uniforms; + + switch ( light.type ) { + + case 'DirectionalLight': + uniforms = { + direction: new Vector3(), + color: new Color() + }; + break; + + case 'SpotLight': + uniforms = { + position: new Vector3(), + direction: new Vector3(), + color: new Color(), + distance: 0, + coneCos: 0, + penumbraCos: 0, + decay: 0 + }; + break; + + case 'PointLight': + uniforms = { + position: new Vector3(), + color: new Color(), + distance: 0, + decay: 0 + }; + break; + + case 'HemisphereLight': + uniforms = { + direction: new Vector3(), + skyColor: new Color(), + groundColor: new Color() + }; + break; + + case 'RectAreaLight': + uniforms = { + color: new Color(), + position: new Vector3(), + halfWidth: new Vector3(), + halfHeight: new Vector3() + }; + break; + + } + + lights[ light.id ] = uniforms; + + return uniforms; + + } + + }; + +} + +function ShadowUniformsCache() { + + const lights = {}; + + return { + + get: function ( light ) { + + if ( lights[ light.id ] !== undefined ) { + + return lights[ light.id ]; + + } + + let uniforms; + + switch ( light.type ) { + + case 'DirectionalLight': + uniforms = { + shadowBias: 0, + shadowNormalBias: 0, + shadowRadius: 1, + shadowMapSize: new Vector2() + }; + break; + + case 'SpotLight': + uniforms = { + shadowBias: 0, + shadowNormalBias: 0, + shadowRadius: 1, + shadowMapSize: new Vector2() + }; + break; + + case 'PointLight': + uniforms = { + shadowBias: 0, + shadowNormalBias: 0, + shadowRadius: 1, + shadowMapSize: new Vector2(), + shadowCameraNear: 1, + shadowCameraFar: 1000 + }; + break; + + // TODO (abelnation): set RectAreaLight shadow uniforms + + } + + lights[ light.id ] = uniforms; + + return uniforms; + + } + + }; + +} + + + +let nextVersion = 0; + +function shadowCastingAndTexturingLightsFirst( lightA, lightB ) { + + return ( lightB.castShadow ? 2 : 0 ) - ( lightA.castShadow ? 2 : 0 ) + ( lightB.map ? 1 : 0 ) - ( lightA.map ? 1 : 0 ); + +} + +function WebGLLights( extensions ) { + + const cache = new UniformsCache(); + + const shadowCache = ShadowUniformsCache(); + + const state = { + + version: 0, + + hash: { + directionalLength: - 1, + pointLength: - 1, + spotLength: - 1, + rectAreaLength: - 1, + hemiLength: - 1, + + numDirectionalShadows: - 1, + numPointShadows: - 1, + numSpotShadows: - 1, + numSpotMaps: - 1, + + numLightProbes: - 1 + }, + + ambient: [ 0, 0, 0 ], + probe: [], + directional: [], + directionalShadow: [], + directionalShadowMap: [], + directionalShadowMatrix: [], + spot: [], + spotLightMap: [], + spotShadow: [], + spotShadowMap: [], + spotLightMatrix: [], + rectArea: [], + rectAreaLTC1: null, + rectAreaLTC2: null, + point: [], + pointShadow: [], + pointShadowMap: [], + pointShadowMatrix: [], + hemi: [], + numSpotLightShadowsWithMaps: 0, + numLightProbes: 0 + + }; + + for ( let i = 0; i < 9; i ++ ) state.probe.push( new Vector3() ); + + const vector3 = new Vector3(); + const matrix4 = new Matrix4(); + const matrix42 = new Matrix4(); + + function setup( lights, useLegacyLights ) { + + let r = 0, g = 0, b = 0; + + for ( let i = 0; i < 9; i ++ ) state.probe[ i ].set( 0, 0, 0 ); + + let directionalLength = 0; + let pointLength = 0; + let spotLength = 0; + let rectAreaLength = 0; + let hemiLength = 0; + + let numDirectionalShadows = 0; + let numPointShadows = 0; + let numSpotShadows = 0; + let numSpotMaps = 0; + let numSpotShadowsWithMaps = 0; + + let numLightProbes = 0; + + // ordering : [shadow casting + map texturing, map texturing, shadow casting, none ] + lights.sort( shadowCastingAndTexturingLightsFirst ); + + // artist-friendly light intensity scaling factor + const scaleFactor = ( useLegacyLights === true ) ? Math.PI : 1; + + for ( let i = 0, l = lights.length; i < l; i ++ ) { + + const light = lights[ i ]; + + const color = light.color; + const intensity = light.intensity; + const distance = light.distance; + + const shadowMap = ( light.shadow && light.shadow.map ) ? light.shadow.map.texture : null; + + if ( light.isAmbientLight ) { + + r += color.r * intensity * scaleFactor; + g += color.g * intensity * scaleFactor; + b += color.b * intensity * scaleFactor; + + } else if ( light.isLightProbe ) { + + for ( let j = 0; j < 9; j ++ ) { + + state.probe[ j ].addScaledVector( light.sh.coefficients[ j ], intensity ); + + } + + numLightProbes ++; + + } else if ( light.isDirectionalLight ) { + + const uniforms = cache.get( light ); + + uniforms.color.copy( light.color ).multiplyScalar( light.intensity * scaleFactor ); + + if ( light.castShadow ) { + + const shadow = light.shadow; + + const shadowUniforms = shadowCache.get( light ); + + shadowUniforms.shadowBias = shadow.bias; + shadowUniforms.shadowNormalBias = shadow.normalBias; + shadowUniforms.shadowRadius = shadow.radius; + shadowUniforms.shadowMapSize = shadow.mapSize; + + state.directionalShadow[ directionalLength ] = shadowUniforms; + state.directionalShadowMap[ directionalLength ] = shadowMap; + state.directionalShadowMatrix[ directionalLength ] = light.shadow.matrix; + + numDirectionalShadows ++; + + } + + state.directional[ directionalLength ] = uniforms; + + directionalLength ++; + + } else if ( light.isSpotLight ) { + + const uniforms = cache.get( light ); + + uniforms.position.setFromMatrixPosition( light.matrixWorld ); + + uniforms.color.copy( color ).multiplyScalar( intensity * scaleFactor ); + uniforms.distance = distance; + + uniforms.coneCos = Math.cos( light.angle ); + uniforms.penumbraCos = Math.cos( light.angle * ( 1 - light.penumbra ) ); + uniforms.decay = light.decay; + + state.spot[ spotLength ] = uniforms; + + const shadow = light.shadow; + + if ( light.map ) { + + state.spotLightMap[ numSpotMaps ] = light.map; + numSpotMaps ++; + + // make sure the lightMatrix is up to date + // TODO : do it if required only + shadow.updateMatrices( light ); + + if ( light.castShadow ) numSpotShadowsWithMaps ++; + + } + + state.spotLightMatrix[ spotLength ] = shadow.matrix; + + if ( light.castShadow ) { + + const shadowUniforms = shadowCache.get( light ); + + shadowUniforms.shadowBias = shadow.bias; + shadowUniforms.shadowNormalBias = shadow.normalBias; + shadowUniforms.shadowRadius = shadow.radius; + shadowUniforms.shadowMapSize = shadow.mapSize; + + state.spotShadow[ spotLength ] = shadowUniforms; + state.spotShadowMap[ spotLength ] = shadowMap; + + numSpotShadows ++; + + } + + spotLength ++; + + } else if ( light.isRectAreaLight ) { + + const uniforms = cache.get( light ); + + uniforms.color.copy( color ).multiplyScalar( intensity ); + + uniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 ); + uniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 ); + + state.rectArea[ rectAreaLength ] = uniforms; + + rectAreaLength ++; + + } else if ( light.isPointLight ) { + + const uniforms = cache.get( light ); + + uniforms.color.copy( light.color ).multiplyScalar( light.intensity * scaleFactor ); + uniforms.distance = light.distance; + uniforms.decay = light.decay; + + if ( light.castShadow ) { + + const shadow = light.shadow; + + const shadowUniforms = shadowCache.get( light ); + + shadowUniforms.shadowBias = shadow.bias; + shadowUniforms.shadowNormalBias = shadow.normalBias; + shadowUniforms.shadowRadius = shadow.radius; + shadowUniforms.shadowMapSize = shadow.mapSize; + shadowUniforms.shadowCameraNear = shadow.camera.near; + shadowUniforms.shadowCameraFar = shadow.camera.far; + + state.pointShadow[ pointLength ] = shadowUniforms; + state.pointShadowMap[ pointLength ] = shadowMap; + state.pointShadowMatrix[ pointLength ] = light.shadow.matrix; + + numPointShadows ++; + + } + + state.point[ pointLength ] = uniforms; + + pointLength ++; + + } else if ( light.isHemisphereLight ) { + + const uniforms = cache.get( light ); + + uniforms.skyColor.copy( light.color ).multiplyScalar( intensity * scaleFactor ); + uniforms.groundColor.copy( light.groundColor ).multiplyScalar( intensity * scaleFactor ); + + state.hemi[ hemiLength ] = uniforms; + + hemiLength ++; + + } + + } + + if ( rectAreaLength > 0 ) { + + if ( extensions.has( 'OES_texture_float_linear' ) === true ) { + + state.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1; + state.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2; + + } else { + + state.rectAreaLTC1 = UniformsLib.LTC_HALF_1; + state.rectAreaLTC2 = UniformsLib.LTC_HALF_2; + + } + + } + + state.ambient[ 0 ] = r; + state.ambient[ 1 ] = g; + state.ambient[ 2 ] = b; + + const hash = state.hash; + + if ( hash.directionalLength !== directionalLength || + hash.pointLength !== pointLength || + hash.spotLength !== spotLength || + hash.rectAreaLength !== rectAreaLength || + hash.hemiLength !== hemiLength || + hash.numDirectionalShadows !== numDirectionalShadows || + hash.numPointShadows !== numPointShadows || + hash.numSpotShadows !== numSpotShadows || + hash.numSpotMaps !== numSpotMaps || + hash.numLightProbes !== numLightProbes ) { + + state.directional.length = directionalLength; + state.spot.length = spotLength; + state.rectArea.length = rectAreaLength; + state.point.length = pointLength; + state.hemi.length = hemiLength; + + state.directionalShadow.length = numDirectionalShadows; + state.directionalShadowMap.length = numDirectionalShadows; + state.pointShadow.length = numPointShadows; + state.pointShadowMap.length = numPointShadows; + state.spotShadow.length = numSpotShadows; + state.spotShadowMap.length = numSpotShadows; + state.directionalShadowMatrix.length = numDirectionalShadows; + state.pointShadowMatrix.length = numPointShadows; + state.spotLightMatrix.length = numSpotShadows + numSpotMaps - numSpotShadowsWithMaps; + state.spotLightMap.length = numSpotMaps; + state.numSpotLightShadowsWithMaps = numSpotShadowsWithMaps; + state.numLightProbes = numLightProbes; + + hash.directionalLength = directionalLength; + hash.pointLength = pointLength; + hash.spotLength = spotLength; + hash.rectAreaLength = rectAreaLength; + hash.hemiLength = hemiLength; + + hash.numDirectionalShadows = numDirectionalShadows; + hash.numPointShadows = numPointShadows; + hash.numSpotShadows = numSpotShadows; + hash.numSpotMaps = numSpotMaps; + + hash.numLightProbes = numLightProbes; + + state.version = nextVersion ++; + + } + + } + + function setupView( lights, camera ) { + + let directionalLength = 0; + let pointLength = 0; + let spotLength = 0; + let rectAreaLength = 0; + let hemiLength = 0; + + const viewMatrix = camera.matrixWorldInverse; + + for ( let i = 0, l = lights.length; i < l; i ++ ) { + + const light = lights[ i ]; + + if ( light.isDirectionalLight ) { + + const uniforms = state.directional[ directionalLength ]; + + uniforms.direction.setFromMatrixPosition( light.matrixWorld ); + vector3.setFromMatrixPosition( light.target.matrixWorld ); + uniforms.direction.sub( vector3 ); + uniforms.direction.transformDirection( viewMatrix ); + + directionalLength ++; + + } else if ( light.isSpotLight ) { + + const uniforms = state.spot[ spotLength ]; + + uniforms.position.setFromMatrixPosition( light.matrixWorld ); + uniforms.position.applyMatrix4( viewMatrix ); + + uniforms.direction.setFromMatrixPosition( light.matrixWorld ); + vector3.setFromMatrixPosition( light.target.matrixWorld ); + uniforms.direction.sub( vector3 ); + uniforms.direction.transformDirection( viewMatrix ); + + spotLength ++; + + } else if ( light.isRectAreaLight ) { + + const uniforms = state.rectArea[ rectAreaLength ]; + + uniforms.position.setFromMatrixPosition( light.matrixWorld ); + uniforms.position.applyMatrix4( viewMatrix ); + + // extract local rotation of light to derive width/height half vectors + matrix42.identity(); + matrix4.copy( light.matrixWorld ); + matrix4.premultiply( viewMatrix ); + matrix42.extractRotation( matrix4 ); + + uniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 ); + uniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 ); + + uniforms.halfWidth.applyMatrix4( matrix42 ); + uniforms.halfHeight.applyMatrix4( matrix42 ); + + rectAreaLength ++; + + } else if ( light.isPointLight ) { + + const uniforms = state.point[ pointLength ]; + + uniforms.position.setFromMatrixPosition( light.matrixWorld ); + uniforms.position.applyMatrix4( viewMatrix ); + + pointLength ++; + + } else if ( light.isHemisphereLight ) { + + const uniforms = state.hemi[ hemiLength ]; + + uniforms.direction.setFromMatrixPosition( light.matrixWorld ); + uniforms.direction.transformDirection( viewMatrix ); + + hemiLength ++; + + } + + } + + } + + return { + setup: setup, + setupView: setupView, + state: state + }; + +} + +function WebGLRenderState( extensions ) { + + const lights = new WebGLLights( extensions ); + + const lightsArray = []; + const shadowsArray = []; + + function init( camera ) { + + state.camera = camera; + + lightsArray.length = 0; + shadowsArray.length = 0; + + } + + function pushLight( light ) { + + lightsArray.push( light ); + + } + + function pushShadow( shadowLight ) { + + shadowsArray.push( shadowLight ); + + } + + function setupLights( useLegacyLights ) { + + lights.setup( lightsArray, useLegacyLights ); + + } + + function setupLightsView( camera ) { + + lights.setupView( lightsArray, camera ); + + } + + const state = { + lightsArray: lightsArray, + shadowsArray: shadowsArray, + + camera: null, + + lights: lights, + + transmissionRenderTarget: {} + }; + + return { + init: init, + state: state, + setupLights: setupLights, + setupLightsView: setupLightsView, + + pushLight: pushLight, + pushShadow: pushShadow + }; + +} + +function WebGLRenderStates( extensions ) { + + let renderStates = new WeakMap(); + + function get( scene, renderCallDepth = 0 ) { + + const renderStateArray = renderStates.get( scene ); + let renderState; + + if ( renderStateArray === undefined ) { + + renderState = new WebGLRenderState( extensions ); + renderStates.set( scene, [ renderState ] ); + + } else { + + if ( renderCallDepth >= renderStateArray.length ) { + + renderState = new WebGLRenderState( extensions ); + renderStateArray.push( renderState ); + + } else { + + renderState = renderStateArray[ renderCallDepth ]; + + } + + } + + return renderState; + + } + + function dispose() { + + renderStates = new WeakMap(); + + } + + return { + get: get, + dispose: dispose + }; + +} + +class MeshDepthMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshDepthMaterial = true; + + this.type = 'MeshDepthMaterial'; + + this.depthPacking = BasicDepthPacking; + + this.map = null; + + this.alphaMap = null; + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.wireframe = false; + this.wireframeLinewidth = 1; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.depthPacking = source.depthPacking; + + this.map = source.map; + + this.alphaMap = source.alphaMap; + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + + return this; + + } + +} + +class MeshDistanceMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshDistanceMaterial = true; + + this.type = 'MeshDistanceMaterial'; + + this.map = null; + + this.alphaMap = null; + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.map = source.map; + + this.alphaMap = source.alphaMap; + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + return this; + + } + +} + +const vertex = "void main() {\n\tgl_Position = vec4( position, 1.0 );\n}"; + +const fragment = "uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"; + +function WebGLShadowMap( renderer, objects, capabilities ) { + + let _frustum = new Frustum(); + + const _shadowMapSize = new Vector2(), + _viewportSize = new Vector2(), + + _viewport = new Vector4(), + + _depthMaterial = new MeshDepthMaterial( { depthPacking: RGBADepthPacking } ), + _distanceMaterial = new MeshDistanceMaterial(), + + _materialCache = {}, + + _maxTextureSize = capabilities.maxTextureSize; + + const shadowSide = { [ FrontSide ]: BackSide, [ BackSide ]: FrontSide, [ DoubleSide ]: DoubleSide }; + + const shadowMaterialVertical = new ShaderMaterial( { + defines: { + VSM_SAMPLES: 8 + }, + uniforms: { + shadow_pass: { value: null }, + resolution: { value: new Vector2() }, + radius: { value: 4.0 } + }, + + vertexShader: vertex, + fragmentShader: fragment + + } ); + + const shadowMaterialHorizontal = shadowMaterialVertical.clone(); + shadowMaterialHorizontal.defines.HORIZONTAL_PASS = 1; + + const fullScreenTri = new BufferGeometry(); + fullScreenTri.setAttribute( + 'position', + new BufferAttribute( + new Float32Array( [ - 1, - 1, 0.5, 3, - 1, 0.5, - 1, 3, 0.5 ] ), + 3 + ) + ); + + const fullScreenMesh = new Mesh( fullScreenTri, shadowMaterialVertical ); + + const scope = this; + + this.enabled = false; + + this.autoUpdate = true; + this.needsUpdate = false; + + this.type = PCFShadowMap; + let _previousType = this.type; + + this.render = function ( lights, scene, camera ) { + + if ( scope.enabled === false ) return; + if ( scope.autoUpdate === false && scope.needsUpdate === false ) return; + + if ( lights.length === 0 ) return; + + const currentRenderTarget = renderer.getRenderTarget(); + const activeCubeFace = renderer.getActiveCubeFace(); + const activeMipmapLevel = renderer.getActiveMipmapLevel(); + + const _state = renderer.state; + + // Set GL state for depth map. + _state.setBlending( NoBlending ); + _state.buffers.color.setClear( 1, 1, 1, 1 ); + _state.buffers.depth.setTest( true ); + _state.setScissorTest( false ); + + // check for shadow map type changes + + const toVSM = ( _previousType !== VSMShadowMap && this.type === VSMShadowMap ); + const fromVSM = ( _previousType === VSMShadowMap && this.type !== VSMShadowMap ); + + // render depth map + + for ( let i = 0, il = lights.length; i < il; i ++ ) { + + const light = lights[ i ]; + const shadow = light.shadow; + + if ( shadow === undefined ) { + + console.warn( 'THREE.WebGLShadowMap:', light, 'has no shadow.' ); + continue; + + } + + if ( shadow.autoUpdate === false && shadow.needsUpdate === false ) continue; + + _shadowMapSize.copy( shadow.mapSize ); + + const shadowFrameExtents = shadow.getFrameExtents(); + + _shadowMapSize.multiply( shadowFrameExtents ); + + _viewportSize.copy( shadow.mapSize ); + + if ( _shadowMapSize.x > _maxTextureSize || _shadowMapSize.y > _maxTextureSize ) { + + if ( _shadowMapSize.x > _maxTextureSize ) { + + _viewportSize.x = Math.floor( _maxTextureSize / shadowFrameExtents.x ); + _shadowMapSize.x = _viewportSize.x * shadowFrameExtents.x; + shadow.mapSize.x = _viewportSize.x; + + } + + if ( _shadowMapSize.y > _maxTextureSize ) { + + _viewportSize.y = Math.floor( _maxTextureSize / shadowFrameExtents.y ); + _shadowMapSize.y = _viewportSize.y * shadowFrameExtents.y; + shadow.mapSize.y = _viewportSize.y; + + } + + } + + if ( shadow.map === null || toVSM === true || fromVSM === true ) { + + const pars = ( this.type !== VSMShadowMap ) ? { minFilter: NearestFilter, magFilter: NearestFilter } : {}; + + if ( shadow.map !== null ) { + + shadow.map.dispose(); + + } + + shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars ); + shadow.map.texture.name = light.name + '.shadowMap'; + + shadow.camera.updateProjectionMatrix(); + + } + + renderer.setRenderTarget( shadow.map ); + renderer.clear(); + + const viewportCount = shadow.getViewportCount(); + + for ( let vp = 0; vp < viewportCount; vp ++ ) { + + const viewport = shadow.getViewport( vp ); + + _viewport.set( + _viewportSize.x * viewport.x, + _viewportSize.y * viewport.y, + _viewportSize.x * viewport.z, + _viewportSize.y * viewport.w + ); + + _state.viewport( _viewport ); + + shadow.updateMatrices( light, vp ); + + _frustum = shadow.getFrustum(); + + renderObject( scene, camera, shadow.camera, light, this.type ); + + } + + // do blur pass for VSM + + if ( shadow.isPointLightShadow !== true && this.type === VSMShadowMap ) { + + VSMPass( shadow, camera ); + + } + + shadow.needsUpdate = false; + + } + + _previousType = this.type; + + scope.needsUpdate = false; + + renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipmapLevel ); + + }; + + function VSMPass( shadow, camera ) { + + const geometry = objects.update( fullScreenMesh ); + + if ( shadowMaterialVertical.defines.VSM_SAMPLES !== shadow.blurSamples ) { + + shadowMaterialVertical.defines.VSM_SAMPLES = shadow.blurSamples; + shadowMaterialHorizontal.defines.VSM_SAMPLES = shadow.blurSamples; + + shadowMaterialVertical.needsUpdate = true; + shadowMaterialHorizontal.needsUpdate = true; + + } + + if ( shadow.mapPass === null ) { + + shadow.mapPass = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y ); + + } + + // vertical pass + + shadowMaterialVertical.uniforms.shadow_pass.value = shadow.map.texture; + shadowMaterialVertical.uniforms.resolution.value = shadow.mapSize; + shadowMaterialVertical.uniforms.radius.value = shadow.radius; + renderer.setRenderTarget( shadow.mapPass ); + renderer.clear(); + renderer.renderBufferDirect( camera, null, geometry, shadowMaterialVertical, fullScreenMesh, null ); + + // horizontal pass + + shadowMaterialHorizontal.uniforms.shadow_pass.value = shadow.mapPass.texture; + shadowMaterialHorizontal.uniforms.resolution.value = shadow.mapSize; + shadowMaterialHorizontal.uniforms.radius.value = shadow.radius; + renderer.setRenderTarget( shadow.map ); + renderer.clear(); + renderer.renderBufferDirect( camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null ); + + } + + function getDepthMaterial( object, material, light, type ) { + + let result = null; + + const customMaterial = ( light.isPointLight === true ) ? object.customDistanceMaterial : object.customDepthMaterial; + + if ( customMaterial !== undefined ) { + + result = customMaterial; + + } else { + + result = ( light.isPointLight === true ) ? _distanceMaterial : _depthMaterial; + + if ( ( renderer.localClippingEnabled && material.clipShadows === true && Array.isArray( material.clippingPlanes ) && material.clippingPlanes.length !== 0 ) || + ( material.displacementMap && material.displacementScale !== 0 ) || + ( material.alphaMap && material.alphaTest > 0 ) || + ( material.map && material.alphaTest > 0 ) ) { + + // in this case we need a unique material instance reflecting the + // appropriate state + + const keyA = result.uuid, keyB = material.uuid; + + let materialsForVariant = _materialCache[ keyA ]; + + if ( materialsForVariant === undefined ) { + + materialsForVariant = {}; + _materialCache[ keyA ] = materialsForVariant; + + } + + let cachedMaterial = materialsForVariant[ keyB ]; + + if ( cachedMaterial === undefined ) { + + cachedMaterial = result.clone(); + materialsForVariant[ keyB ] = cachedMaterial; + material.addEventListener( 'dispose', onMaterialDispose ); + + } + + result = cachedMaterial; + + } + + } + + result.visible = material.visible; + result.wireframe = material.wireframe; + + if ( type === VSMShadowMap ) { + + result.side = ( material.shadowSide !== null ) ? material.shadowSide : material.side; + + } else { + + result.side = ( material.shadowSide !== null ) ? material.shadowSide : shadowSide[ material.side ]; + + } + + result.alphaMap = material.alphaMap; + result.alphaTest = material.alphaTest; + result.map = material.map; + + result.clipShadows = material.clipShadows; + result.clippingPlanes = material.clippingPlanes; + result.clipIntersection = material.clipIntersection; + + result.displacementMap = material.displacementMap; + result.displacementScale = material.displacementScale; + result.displacementBias = material.displacementBias; + + result.wireframeLinewidth = material.wireframeLinewidth; + result.linewidth = material.linewidth; + + if ( light.isPointLight === true && result.isMeshDistanceMaterial === true ) { + + const materialProperties = renderer.properties.get( result ); + materialProperties.light = light; + + } + + return result; + + } + + function renderObject( object, camera, shadowCamera, light, type ) { + + if ( object.visible === false ) return; + + const visible = object.layers.test( camera.layers ); + + if ( visible && ( object.isMesh || object.isLine || object.isPoints ) ) { + + if ( ( object.castShadow || ( object.receiveShadow && type === VSMShadowMap ) ) && ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) ) { + + object.modelViewMatrix.multiplyMatrices( shadowCamera.matrixWorldInverse, object.matrixWorld ); + + const geometry = objects.update( object ); + const material = object.material; + + if ( Array.isArray( material ) ) { + + const groups = geometry.groups; + + for ( let k = 0, kl = groups.length; k < kl; k ++ ) { + + const group = groups[ k ]; + const groupMaterial = material[ group.materialIndex ]; + + if ( groupMaterial && groupMaterial.visible ) { + + const depthMaterial = getDepthMaterial( object, groupMaterial, light, type ); + + object.onBeforeShadow( renderer, object, camera, shadowCamera, geometry, depthMaterial, group ); + + renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, group ); + + object.onAfterShadow( renderer, object, camera, shadowCamera, geometry, depthMaterial, group ); + + } + + } + + } else if ( material.visible ) { + + const depthMaterial = getDepthMaterial( object, material, light, type ); + + object.onBeforeShadow( renderer, object, camera, shadowCamera, geometry, depthMaterial, null ); + + renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, null ); + + object.onAfterShadow( renderer, object, camera, shadowCamera, geometry, depthMaterial, null ); + + } + + } + + } + + const children = object.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + renderObject( children[ i ], camera, shadowCamera, light, type ); + + } + + } + + function onMaterialDispose( event ) { + + const material = event.target; + + material.removeEventListener( 'dispose', onMaterialDispose ); + + // make sure to remove the unique distance/depth materials used for shadow map rendering + + for ( const id in _materialCache ) { + + const cache = _materialCache[ id ]; + + const uuid = event.target.uuid; + + if ( uuid in cache ) { + + const shadowMaterial = cache[ uuid ]; + shadowMaterial.dispose(); + delete cache[ uuid ]; + + } + + } + + } + +} + +function WebGLState( gl ) { + + function ColorBuffer() { + + let locked = false; + + const color = new Vector4(); + let currentColorMask = null; + const currentColorClear = new Vector4( 0, 0, 0, 0 ); + + return { + + setMask: function ( colorMask ) { + + if ( currentColorMask !== colorMask && ! locked ) { + + gl.colorMask( colorMask, colorMask, colorMask, colorMask ); + currentColorMask = colorMask; + + } + + }, + + setLocked: function ( lock ) { + + locked = lock; + + }, + + setClear: function ( r, g, b, a, premultipliedAlpha ) { + + if ( premultipliedAlpha === true ) { + + r *= a; g *= a; b *= a; + + } + + color.set( r, g, b, a ); + + if ( currentColorClear.equals( color ) === false ) { + + gl.clearColor( r, g, b, a ); + currentColorClear.copy( color ); + + } + + }, + + reset: function () { + + locked = false; + + currentColorMask = null; + currentColorClear.set( - 1, 0, 0, 0 ); // set to invalid state + + } + + }; + + } + + function DepthBuffer() { + + let locked = false; + + let currentDepthMask = null; + let currentDepthFunc = null; + let currentDepthClear = null; + + return { + + setTest: function ( depthTest ) { + + if ( depthTest ) { + + enable( gl.DEPTH_TEST ); + + } else { + + disable( gl.DEPTH_TEST ); + + } + + }, + + setMask: function ( depthMask ) { + + if ( currentDepthMask !== depthMask && ! locked ) { + + gl.depthMask( depthMask ); + currentDepthMask = depthMask; + + } + + }, + + setFunc: function ( depthFunc ) { + + if ( currentDepthFunc !== depthFunc ) { + + switch ( depthFunc ) { + + case NeverDepth: + + gl.depthFunc( gl.NEVER ); + break; + + case AlwaysDepth: + + gl.depthFunc( gl.ALWAYS ); + break; + + case LessDepth: + + gl.depthFunc( gl.LESS ); + break; + + case LessEqualDepth: + + gl.depthFunc( gl.LEQUAL ); + break; + + case EqualDepth: + + gl.depthFunc( gl.EQUAL ); + break; + + case GreaterEqualDepth: + + gl.depthFunc( gl.GEQUAL ); + break; + + case GreaterDepth: + + gl.depthFunc( gl.GREATER ); + break; + + case NotEqualDepth: + + gl.depthFunc( gl.NOTEQUAL ); + break; + + default: + + gl.depthFunc( gl.LEQUAL ); + + } + + currentDepthFunc = depthFunc; + + } + + }, + + setLocked: function ( lock ) { + + locked = lock; + + }, + + setClear: function ( depth ) { + + if ( currentDepthClear !== depth ) { + + gl.clearDepth( depth ); + currentDepthClear = depth; + + } + + }, + + reset: function () { + + locked = false; + + currentDepthMask = null; + currentDepthFunc = null; + currentDepthClear = null; + + } + + }; + + } + + function StencilBuffer() { + + let locked = false; + + let currentStencilMask = null; + let currentStencilFunc = null; + let currentStencilRef = null; + let currentStencilFuncMask = null; + let currentStencilFail = null; + let currentStencilZFail = null; + let currentStencilZPass = null; + let currentStencilClear = null; + + return { + + setTest: function ( stencilTest ) { + + if ( ! locked ) { + + if ( stencilTest ) { + + enable( gl.STENCIL_TEST ); + + } else { + + disable( gl.STENCIL_TEST ); + + } + + } + + }, + + setMask: function ( stencilMask ) { + + if ( currentStencilMask !== stencilMask && ! locked ) { + + gl.stencilMask( stencilMask ); + currentStencilMask = stencilMask; + + } + + }, + + setFunc: function ( stencilFunc, stencilRef, stencilMask ) { + + if ( currentStencilFunc !== stencilFunc || + currentStencilRef !== stencilRef || + currentStencilFuncMask !== stencilMask ) { + + gl.stencilFunc( stencilFunc, stencilRef, stencilMask ); + + currentStencilFunc = stencilFunc; + currentStencilRef = stencilRef; + currentStencilFuncMask = stencilMask; + + } + + }, + + setOp: function ( stencilFail, stencilZFail, stencilZPass ) { + + if ( currentStencilFail !== stencilFail || + currentStencilZFail !== stencilZFail || + currentStencilZPass !== stencilZPass ) { + + gl.stencilOp( stencilFail, stencilZFail, stencilZPass ); + + currentStencilFail = stencilFail; + currentStencilZFail = stencilZFail; + currentStencilZPass = stencilZPass; + + } + + }, + + setLocked: function ( lock ) { + + locked = lock; + + }, + + setClear: function ( stencil ) { + + if ( currentStencilClear !== stencil ) { + + gl.clearStencil( stencil ); + currentStencilClear = stencil; + + } + + }, + + reset: function () { + + locked = false; + + currentStencilMask = null; + currentStencilFunc = null; + currentStencilRef = null; + currentStencilFuncMask = null; + currentStencilFail = null; + currentStencilZFail = null; + currentStencilZPass = null; + currentStencilClear = null; + + } + + }; + + } + + // + + const colorBuffer = new ColorBuffer(); + const depthBuffer = new DepthBuffer(); + const stencilBuffer = new StencilBuffer(); + + const uboBindings = new WeakMap(); + const uboProgramMap = new WeakMap(); + + let enabledCapabilities = {}; + + let currentBoundFramebuffers = {}; + let currentDrawbuffers = new WeakMap(); + let defaultDrawbuffers = []; + + let currentProgram = null; + + let currentBlendingEnabled = false; + let currentBlending = null; + let currentBlendEquation = null; + let currentBlendSrc = null; + let currentBlendDst = null; + let currentBlendEquationAlpha = null; + let currentBlendSrcAlpha = null; + let currentBlendDstAlpha = null; + let currentBlendColor = new Color( 0, 0, 0 ); + let currentBlendAlpha = 0; + let currentPremultipledAlpha = false; + + let currentFlipSided = null; + let currentCullFace = null; + + let currentLineWidth = null; + + let currentPolygonOffsetFactor = null; + let currentPolygonOffsetUnits = null; + + const maxTextures = gl.getParameter( gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS ); + + let lineWidthAvailable = false; + let version = 0; + const glVersion = gl.getParameter( gl.VERSION ); + + if ( glVersion.indexOf( 'WebGL' ) !== - 1 ) { + + version = parseFloat( /^WebGL (\d)/.exec( glVersion )[ 1 ] ); + lineWidthAvailable = ( version >= 1.0 ); + + } else if ( glVersion.indexOf( 'OpenGL ES' ) !== - 1 ) { + + version = parseFloat( /^OpenGL ES (\d)/.exec( glVersion )[ 1 ] ); + lineWidthAvailable = ( version >= 2.0 ); + + } + + let currentTextureSlot = null; + let currentBoundTextures = {}; + + const scissorParam = gl.getParameter( gl.SCISSOR_BOX ); + const viewportParam = gl.getParameter( gl.VIEWPORT ); + + const currentScissor = new Vector4().fromArray( scissorParam ); + const currentViewport = new Vector4().fromArray( viewportParam ); + + function createTexture( type, target, count, dimensions ) { + + const data = new Uint8Array( 4 ); // 4 is required to match default unpack alignment of 4. + const texture = gl.createTexture(); + + gl.bindTexture( type, texture ); + gl.texParameteri( type, gl.TEXTURE_MIN_FILTER, gl.NEAREST ); + gl.texParameteri( type, gl.TEXTURE_MAG_FILTER, gl.NEAREST ); + + for ( let i = 0; i < count; i ++ ) { + + if ( type === gl.TEXTURE_3D || type === gl.TEXTURE_2D_ARRAY ) { + + gl.texImage3D( target, 0, gl.RGBA, 1, 1, dimensions, 0, gl.RGBA, gl.UNSIGNED_BYTE, data ); + + } else { + + gl.texImage2D( target + i, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, data ); + + } + + } + + return texture; + + } + + const emptyTextures = {}; + emptyTextures[ gl.TEXTURE_2D ] = createTexture( gl.TEXTURE_2D, gl.TEXTURE_2D, 1 ); + emptyTextures[ gl.TEXTURE_CUBE_MAP ] = createTexture( gl.TEXTURE_CUBE_MAP, gl.TEXTURE_CUBE_MAP_POSITIVE_X, 6 ); + emptyTextures[ gl.TEXTURE_2D_ARRAY ] = createTexture( gl.TEXTURE_2D_ARRAY, gl.TEXTURE_2D_ARRAY, 1, 1 ); + emptyTextures[ gl.TEXTURE_3D ] = createTexture( gl.TEXTURE_3D, gl.TEXTURE_3D, 1, 1 ); + + // init + + colorBuffer.setClear( 0, 0, 0, 1 ); + depthBuffer.setClear( 1 ); + stencilBuffer.setClear( 0 ); + + enable( gl.DEPTH_TEST ); + depthBuffer.setFunc( LessEqualDepth ); + + setFlipSided( false ); + setCullFace( CullFaceBack ); + enable( gl.CULL_FACE ); + + setBlending( NoBlending ); + + // + + function enable( id ) { + + if ( enabledCapabilities[ id ] !== true ) { + + gl.enable( id ); + enabledCapabilities[ id ] = true; + + } + + } + + function disable( id ) { + + if ( enabledCapabilities[ id ] !== false ) { + + gl.disable( id ); + enabledCapabilities[ id ] = false; + + } + + } + + function bindFramebuffer( target, framebuffer ) { + + if ( currentBoundFramebuffers[ target ] !== framebuffer ) { + + gl.bindFramebuffer( target, framebuffer ); + + currentBoundFramebuffers[ target ] = framebuffer; + + // gl.DRAW_FRAMEBUFFER is equivalent to gl.FRAMEBUFFER + + if ( target === gl.DRAW_FRAMEBUFFER ) { + + currentBoundFramebuffers[ gl.FRAMEBUFFER ] = framebuffer; + + } + + if ( target === gl.FRAMEBUFFER ) { + + currentBoundFramebuffers[ gl.DRAW_FRAMEBUFFER ] = framebuffer; + + } + + return true; + + } + + return false; + + } + + function drawBuffers( renderTarget, framebuffer ) { + + let drawBuffers = defaultDrawbuffers; + + let needsUpdate = false; + + if ( renderTarget ) { + + drawBuffers = currentDrawbuffers.get( framebuffer ); + + if ( drawBuffers === undefined ) { + + drawBuffers = []; + currentDrawbuffers.set( framebuffer, drawBuffers ); + + } + + const textures = renderTarget.textures; + + if ( drawBuffers.length !== textures.length || drawBuffers[ 0 ] !== gl.COLOR_ATTACHMENT0 ) { + + for ( let i = 0, il = textures.length; i < il; i ++ ) { + + drawBuffers[ i ] = gl.COLOR_ATTACHMENT0 + i; + + } + + drawBuffers.length = textures.length; + + needsUpdate = true; + + } + + } else { + + if ( drawBuffers[ 0 ] !== gl.BACK ) { + + drawBuffers[ 0 ] = gl.BACK; + + needsUpdate = true; + + } + + } + + if ( needsUpdate ) { + + gl.drawBuffers( drawBuffers ); + + } + + } + + function useProgram( program ) { + + if ( currentProgram !== program ) { + + gl.useProgram( program ); + + currentProgram = program; + + return true; + + } + + return false; + + } + + const equationToGL = { + [ AddEquation ]: gl.FUNC_ADD, + [ SubtractEquation ]: gl.FUNC_SUBTRACT, + [ ReverseSubtractEquation ]: gl.FUNC_REVERSE_SUBTRACT + }; + + equationToGL[ MinEquation ] = gl.MIN; + equationToGL[ MaxEquation ] = gl.MAX; + + const factorToGL = { + [ ZeroFactor ]: gl.ZERO, + [ OneFactor ]: gl.ONE, + [ SrcColorFactor ]: gl.SRC_COLOR, + [ SrcAlphaFactor ]: gl.SRC_ALPHA, + [ SrcAlphaSaturateFactor ]: gl.SRC_ALPHA_SATURATE, + [ DstColorFactor ]: gl.DST_COLOR, + [ DstAlphaFactor ]: gl.DST_ALPHA, + [ OneMinusSrcColorFactor ]: gl.ONE_MINUS_SRC_COLOR, + [ OneMinusSrcAlphaFactor ]: gl.ONE_MINUS_SRC_ALPHA, + [ OneMinusDstColorFactor ]: gl.ONE_MINUS_DST_COLOR, + [ OneMinusDstAlphaFactor ]: gl.ONE_MINUS_DST_ALPHA, + [ ConstantColorFactor ]: gl.CONSTANT_COLOR, + [ OneMinusConstantColorFactor ]: gl.ONE_MINUS_CONSTANT_COLOR, + [ ConstantAlphaFactor ]: gl.CONSTANT_ALPHA, + [ OneMinusConstantAlphaFactor ]: gl.ONE_MINUS_CONSTANT_ALPHA + }; + + function setBlending( blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, blendColor, blendAlpha, premultipliedAlpha ) { + + if ( blending === NoBlending ) { + + if ( currentBlendingEnabled === true ) { + + disable( gl.BLEND ); + currentBlendingEnabled = false; + + } + + return; + + } + + if ( currentBlendingEnabled === false ) { + + enable( gl.BLEND ); + currentBlendingEnabled = true; + + } + + if ( blending !== CustomBlending ) { + + if ( blending !== currentBlending || premultipliedAlpha !== currentPremultipledAlpha ) { + + if ( currentBlendEquation !== AddEquation || currentBlendEquationAlpha !== AddEquation ) { + + gl.blendEquation( gl.FUNC_ADD ); + + currentBlendEquation = AddEquation; + currentBlendEquationAlpha = AddEquation; + + } + + if ( premultipliedAlpha ) { + + switch ( blending ) { + + case NormalBlending: + gl.blendFuncSeparate( gl.ONE, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA ); + break; + + case AdditiveBlending: + gl.blendFunc( gl.ONE, gl.ONE ); + break; + + case SubtractiveBlending: + gl.blendFuncSeparate( gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE ); + break; + + case MultiplyBlending: + gl.blendFuncSeparate( gl.ZERO, gl.SRC_COLOR, gl.ZERO, gl.SRC_ALPHA ); + break; + + default: + console.error( 'THREE.WebGLState: Invalid blending: ', blending ); + break; + + } + + } else { + + switch ( blending ) { + + case NormalBlending: + gl.blendFuncSeparate( gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA ); + break; + + case AdditiveBlending: + gl.blendFunc( gl.SRC_ALPHA, gl.ONE ); + break; + + case SubtractiveBlending: + gl.blendFuncSeparate( gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE ); + break; + + case MultiplyBlending: + gl.blendFunc( gl.ZERO, gl.SRC_COLOR ); + break; + + default: + console.error( 'THREE.WebGLState: Invalid blending: ', blending ); + break; + + } + + } + + currentBlendSrc = null; + currentBlendDst = null; + currentBlendSrcAlpha = null; + currentBlendDstAlpha = null; + currentBlendColor.set( 0, 0, 0 ); + currentBlendAlpha = 0; + + currentBlending = blending; + currentPremultipledAlpha = premultipliedAlpha; + + } + + return; + + } + + // custom blending + + blendEquationAlpha = blendEquationAlpha || blendEquation; + blendSrcAlpha = blendSrcAlpha || blendSrc; + blendDstAlpha = blendDstAlpha || blendDst; + + if ( blendEquation !== currentBlendEquation || blendEquationAlpha !== currentBlendEquationAlpha ) { + + gl.blendEquationSeparate( equationToGL[ blendEquation ], equationToGL[ blendEquationAlpha ] ); + + currentBlendEquation = blendEquation; + currentBlendEquationAlpha = blendEquationAlpha; + + } + + if ( blendSrc !== currentBlendSrc || blendDst !== currentBlendDst || blendSrcAlpha !== currentBlendSrcAlpha || blendDstAlpha !== currentBlendDstAlpha ) { + + gl.blendFuncSeparate( factorToGL[ blendSrc ], factorToGL[ blendDst ], factorToGL[ blendSrcAlpha ], factorToGL[ blendDstAlpha ] ); + + currentBlendSrc = blendSrc; + currentBlendDst = blendDst; + currentBlendSrcAlpha = blendSrcAlpha; + currentBlendDstAlpha = blendDstAlpha; + + } + + if ( blendColor.equals( currentBlendColor ) === false || blendAlpha !== currentBlendAlpha ) { + + gl.blendColor( blendColor.r, blendColor.g, blendColor.b, blendAlpha ); + + currentBlendColor.copy( blendColor ); + currentBlendAlpha = blendAlpha; + + } + + currentBlending = blending; + currentPremultipledAlpha = false; + + } + + function setMaterial( material, frontFaceCW ) { + + material.side === DoubleSide + ? disable( gl.CULL_FACE ) + : enable( gl.CULL_FACE ); + + let flipSided = ( material.side === BackSide ); + if ( frontFaceCW ) flipSided = ! flipSided; + + setFlipSided( flipSided ); + + ( material.blending === NormalBlending && material.transparent === false ) + ? setBlending( NoBlending ) + : setBlending( material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.blendColor, material.blendAlpha, material.premultipliedAlpha ); + + depthBuffer.setFunc( material.depthFunc ); + depthBuffer.setTest( material.depthTest ); + depthBuffer.setMask( material.depthWrite ); + colorBuffer.setMask( material.colorWrite ); + + const stencilWrite = material.stencilWrite; + stencilBuffer.setTest( stencilWrite ); + if ( stencilWrite ) { + + stencilBuffer.setMask( material.stencilWriteMask ); + stencilBuffer.setFunc( material.stencilFunc, material.stencilRef, material.stencilFuncMask ); + stencilBuffer.setOp( material.stencilFail, material.stencilZFail, material.stencilZPass ); + + } + + setPolygonOffset( material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits ); + + material.alphaToCoverage === true + ? enable( gl.SAMPLE_ALPHA_TO_COVERAGE ) + : disable( gl.SAMPLE_ALPHA_TO_COVERAGE ); + + } + + // + + function setFlipSided( flipSided ) { + + if ( currentFlipSided !== flipSided ) { + + if ( flipSided ) { + + gl.frontFace( gl.CW ); + + } else { + + gl.frontFace( gl.CCW ); + + } + + currentFlipSided = flipSided; + + } + + } + + function setCullFace( cullFace ) { + + if ( cullFace !== CullFaceNone ) { + + enable( gl.CULL_FACE ); + + if ( cullFace !== currentCullFace ) { + + if ( cullFace === CullFaceBack ) { + + gl.cullFace( gl.BACK ); + + } else if ( cullFace === CullFaceFront ) { + + gl.cullFace( gl.FRONT ); + + } else { + + gl.cullFace( gl.FRONT_AND_BACK ); + + } + + } + + } else { + + disable( gl.CULL_FACE ); + + } + + currentCullFace = cullFace; + + } + + function setLineWidth( width ) { + + if ( width !== currentLineWidth ) { + + if ( lineWidthAvailable ) gl.lineWidth( width ); + + currentLineWidth = width; + + } + + } + + function setPolygonOffset( polygonOffset, factor, units ) { + + if ( polygonOffset ) { + + enable( gl.POLYGON_OFFSET_FILL ); + + if ( currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units ) { + + gl.polygonOffset( factor, units ); + + currentPolygonOffsetFactor = factor; + currentPolygonOffsetUnits = units; + + } + + } else { + + disable( gl.POLYGON_OFFSET_FILL ); + + } + + } + + function setScissorTest( scissorTest ) { + + if ( scissorTest ) { + + enable( gl.SCISSOR_TEST ); + + } else { + + disable( gl.SCISSOR_TEST ); + + } + + } + + // texture + + function activeTexture( webglSlot ) { + + if ( webglSlot === undefined ) webglSlot = gl.TEXTURE0 + maxTextures - 1; + + if ( currentTextureSlot !== webglSlot ) { + + gl.activeTexture( webglSlot ); + currentTextureSlot = webglSlot; + + } + + } + + function bindTexture( webglType, webglTexture, webglSlot ) { + + if ( webglSlot === undefined ) { + + if ( currentTextureSlot === null ) { + + webglSlot = gl.TEXTURE0 + maxTextures - 1; + + } else { + + webglSlot = currentTextureSlot; + + } + + } + + let boundTexture = currentBoundTextures[ webglSlot ]; + + if ( boundTexture === undefined ) { + + boundTexture = { type: undefined, texture: undefined }; + currentBoundTextures[ webglSlot ] = boundTexture; + + } + + if ( boundTexture.type !== webglType || boundTexture.texture !== webglTexture ) { + + if ( currentTextureSlot !== webglSlot ) { + + gl.activeTexture( webglSlot ); + currentTextureSlot = webglSlot; + + } + + gl.bindTexture( webglType, webglTexture || emptyTextures[ webglType ] ); + + boundTexture.type = webglType; + boundTexture.texture = webglTexture; + + } + + } + + function unbindTexture() { + + const boundTexture = currentBoundTextures[ currentTextureSlot ]; + + if ( boundTexture !== undefined && boundTexture.type !== undefined ) { + + gl.bindTexture( boundTexture.type, null ); + + boundTexture.type = undefined; + boundTexture.texture = undefined; + + } + + } + + function compressedTexImage2D() { + + try { + + gl.compressedTexImage2D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function compressedTexImage3D() { + + try { + + gl.compressedTexImage3D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function texSubImage2D() { + + try { + + gl.texSubImage2D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function texSubImage3D() { + + try { + + gl.texSubImage3D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function compressedTexSubImage2D() { + + try { + + gl.compressedTexSubImage2D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function compressedTexSubImage3D() { + + try { + + gl.compressedTexSubImage3D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function texStorage2D() { + + try { + + gl.texStorage2D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function texStorage3D() { + + try { + + gl.texStorage3D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function texImage2D() { + + try { + + gl.texImage2D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + function texImage3D() { + + try { + + gl.texImage3D.apply( gl, arguments ); + + } catch ( error ) { + + console.error( 'THREE.WebGLState:', error ); + + } + + } + + // + + function scissor( scissor ) { + + if ( currentScissor.equals( scissor ) === false ) { + + gl.scissor( scissor.x, scissor.y, scissor.z, scissor.w ); + currentScissor.copy( scissor ); + + } + + } + + function viewport( viewport ) { + + if ( currentViewport.equals( viewport ) === false ) { + + gl.viewport( viewport.x, viewport.y, viewport.z, viewport.w ); + currentViewport.copy( viewport ); + + } + + } + + function updateUBOMapping( uniformsGroup, program ) { + + let mapping = uboProgramMap.get( program ); + + if ( mapping === undefined ) { + + mapping = new WeakMap(); + + uboProgramMap.set( program, mapping ); + + } + + let blockIndex = mapping.get( uniformsGroup ); + + if ( blockIndex === undefined ) { + + blockIndex = gl.getUniformBlockIndex( program, uniformsGroup.name ); + + mapping.set( uniformsGroup, blockIndex ); + + } + + } + + function uniformBlockBinding( uniformsGroup, program ) { + + const mapping = uboProgramMap.get( program ); + const blockIndex = mapping.get( uniformsGroup ); + + if ( uboBindings.get( program ) !== blockIndex ) { + + // bind shader specific block index to global block point + gl.uniformBlockBinding( program, blockIndex, uniformsGroup.__bindingPointIndex ); + + uboBindings.set( program, blockIndex ); + + } + + } + + // + + function reset() { + + // reset state + + gl.disable( gl.BLEND ); + gl.disable( gl.CULL_FACE ); + gl.disable( gl.DEPTH_TEST ); + gl.disable( gl.POLYGON_OFFSET_FILL ); + gl.disable( gl.SCISSOR_TEST ); + gl.disable( gl.STENCIL_TEST ); + gl.disable( gl.SAMPLE_ALPHA_TO_COVERAGE ); + + gl.blendEquation( gl.FUNC_ADD ); + gl.blendFunc( gl.ONE, gl.ZERO ); + gl.blendFuncSeparate( gl.ONE, gl.ZERO, gl.ONE, gl.ZERO ); + gl.blendColor( 0, 0, 0, 0 ); + + gl.colorMask( true, true, true, true ); + gl.clearColor( 0, 0, 0, 0 ); + + gl.depthMask( true ); + gl.depthFunc( gl.LESS ); + gl.clearDepth( 1 ); + + gl.stencilMask( 0xffffffff ); + gl.stencilFunc( gl.ALWAYS, 0, 0xffffffff ); + gl.stencilOp( gl.KEEP, gl.KEEP, gl.KEEP ); + gl.clearStencil( 0 ); + + gl.cullFace( gl.BACK ); + gl.frontFace( gl.CCW ); + + gl.polygonOffset( 0, 0 ); + + gl.activeTexture( gl.TEXTURE0 ); + + gl.bindFramebuffer( gl.FRAMEBUFFER, null ); + gl.bindFramebuffer( gl.DRAW_FRAMEBUFFER, null ); + gl.bindFramebuffer( gl.READ_FRAMEBUFFER, null ); + + gl.useProgram( null ); + + gl.lineWidth( 1 ); + + gl.scissor( 0, 0, gl.canvas.width, gl.canvas.height ); + gl.viewport( 0, 0, gl.canvas.width, gl.canvas.height ); + + // reset internals + + enabledCapabilities = {}; + + currentTextureSlot = null; + currentBoundTextures = {}; + + currentBoundFramebuffers = {}; + currentDrawbuffers = new WeakMap(); + defaultDrawbuffers = []; + + currentProgram = null; + + currentBlendingEnabled = false; + currentBlending = null; + currentBlendEquation = null; + currentBlendSrc = null; + currentBlendDst = null; + currentBlendEquationAlpha = null; + currentBlendSrcAlpha = null; + currentBlendDstAlpha = null; + currentBlendColor = new Color( 0, 0, 0 ); + currentBlendAlpha = 0; + currentPremultipledAlpha = false; + + currentFlipSided = null; + currentCullFace = null; + + currentLineWidth = null; + + currentPolygonOffsetFactor = null; + currentPolygonOffsetUnits = null; + + currentScissor.set( 0, 0, gl.canvas.width, gl.canvas.height ); + currentViewport.set( 0, 0, gl.canvas.width, gl.canvas.height ); + + colorBuffer.reset(); + depthBuffer.reset(); + stencilBuffer.reset(); + + } + + return { + + buffers: { + color: colorBuffer, + depth: depthBuffer, + stencil: stencilBuffer + }, + + enable: enable, + disable: disable, + + bindFramebuffer: bindFramebuffer, + drawBuffers: drawBuffers, + + useProgram: useProgram, + + setBlending: setBlending, + setMaterial: setMaterial, + + setFlipSided: setFlipSided, + setCullFace: setCullFace, + + setLineWidth: setLineWidth, + setPolygonOffset: setPolygonOffset, + + setScissorTest: setScissorTest, + + activeTexture: activeTexture, + bindTexture: bindTexture, + unbindTexture: unbindTexture, + compressedTexImage2D: compressedTexImage2D, + compressedTexImage3D: compressedTexImage3D, + texImage2D: texImage2D, + texImage3D: texImage3D, + + updateUBOMapping: updateUBOMapping, + uniformBlockBinding: uniformBlockBinding, + + texStorage2D: texStorage2D, + texStorage3D: texStorage3D, + texSubImage2D: texSubImage2D, + texSubImage3D: texSubImage3D, + compressedTexSubImage2D: compressedTexSubImage2D, + compressedTexSubImage3D: compressedTexSubImage3D, + + scissor: scissor, + viewport: viewport, + + reset: reset + + }; + +} + +function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info ) { + + const multisampledRTTExt = extensions.has( 'WEBGL_multisampled_render_to_texture' ) ? extensions.get( 'WEBGL_multisampled_render_to_texture' ) : null; + const supportsInvalidateFramebuffer = typeof navigator === 'undefined' ? false : /OculusBrowser/g.test( navigator.userAgent ); + + const _imageDimensions = new Vector2(); + const _videoTextures = new WeakMap(); + let _canvas; + + const _sources = new WeakMap(); // maps WebglTexture objects to instances of Source + + // cordova iOS (as of 5.0) still uses UIWebView, which provides OffscreenCanvas, + // also OffscreenCanvas.getContext("webgl"), but not OffscreenCanvas.getContext("2d")! + // Some implementations may only implement OffscreenCanvas partially (e.g. lacking 2d). + + let useOffscreenCanvas = false; + + try { + + useOffscreenCanvas = typeof OffscreenCanvas !== 'undefined' + // eslint-disable-next-line compat/compat + && ( new OffscreenCanvas( 1, 1 ).getContext( '2d' ) ) !== null; + + } catch ( err ) { + + // Ignore any errors + + } + + function createCanvas( width, height ) { + + // Use OffscreenCanvas when available. Specially needed in web workers + + return useOffscreenCanvas ? + // eslint-disable-next-line compat/compat + new OffscreenCanvas( width, height ) : createElementNS( 'canvas' ); + + } + + function resizeImage( image, needsNewCanvas, maxSize ) { + + let scale = 1; + + const dimensions = getDimensions( image ); + + // handle case if texture exceeds max size + + if ( dimensions.width > maxSize || dimensions.height > maxSize ) { + + scale = maxSize / Math.max( dimensions.width, dimensions.height ); + + } + + // only perform resize if necessary + + if ( scale < 1 ) { + + // only perform resize for certain image types + + if ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) || + ( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) || + ( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) || + ( typeof VideoFrame !== 'undefined' && image instanceof VideoFrame ) ) { + + const width = Math.floor( scale * dimensions.width ); + const height = Math.floor( scale * dimensions.height ); + + if ( _canvas === undefined ) _canvas = createCanvas( width, height ); + + // cube textures can't reuse the same canvas + + const canvas = needsNewCanvas ? createCanvas( width, height ) : _canvas; + + canvas.width = width; + canvas.height = height; + + const context = canvas.getContext( '2d' ); + context.drawImage( image, 0, 0, width, height ); + + console.warn( 'THREE.WebGLRenderer: Texture has been resized from (' + dimensions.width + 'x' + dimensions.height + ') to (' + width + 'x' + height + ').' ); + + return canvas; + + } else { + + if ( 'data' in image ) { + + console.warn( 'THREE.WebGLRenderer: Image in DataTexture is too big (' + dimensions.width + 'x' + dimensions.height + ').' ); + + } + + return image; + + } + + } + + return image; + + } + + function textureNeedsGenerateMipmaps( texture ) { + + return texture.generateMipmaps && texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter; + + } + + function generateMipmap( target ) { + + _gl.generateMipmap( target ); + + } + + function getInternalFormat( internalFormatName, glFormat, glType, colorSpace, forceLinearTransfer = false ) { + + if ( internalFormatName !== null ) { + + if ( _gl[ internalFormatName ] !== undefined ) return _gl[ internalFormatName ]; + + console.warn( 'THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \'' + internalFormatName + '\'' ); + + } + + let internalFormat = glFormat; + + if ( glFormat === _gl.RED ) { + + if ( glType === _gl.FLOAT ) internalFormat = _gl.R32F; + if ( glType === _gl.HALF_FLOAT ) internalFormat = _gl.R16F; + if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.R8; + + } + + if ( glFormat === _gl.RED_INTEGER ) { + + if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.R8UI; + if ( glType === _gl.UNSIGNED_SHORT ) internalFormat = _gl.R16UI; + if ( glType === _gl.UNSIGNED_INT ) internalFormat = _gl.R32UI; + if ( glType === _gl.BYTE ) internalFormat = _gl.R8I; + if ( glType === _gl.SHORT ) internalFormat = _gl.R16I; + if ( glType === _gl.INT ) internalFormat = _gl.R32I; + + } + + if ( glFormat === _gl.RG ) { + + if ( glType === _gl.FLOAT ) internalFormat = _gl.RG32F; + if ( glType === _gl.HALF_FLOAT ) internalFormat = _gl.RG16F; + if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.RG8; + + } + + if ( glFormat === _gl.RG_INTEGER ) { + + if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = _gl.RG8UI; + if ( glType === _gl.UNSIGNED_SHORT ) internalFormat = _gl.RG16UI; + if ( glType === _gl.UNSIGNED_INT ) internalFormat = _gl.RG32UI; + if ( glType === _gl.BYTE ) internalFormat = _gl.RG8I; + if ( glType === _gl.SHORT ) internalFormat = _gl.RG16I; + if ( glType === _gl.INT ) internalFormat = _gl.RG32I; + + } + + if ( glFormat === _gl.RGB ) { + + if ( glType === _gl.UNSIGNED_INT_5_9_9_9_REV ) internalFormat = _gl.RGB9_E5; + + } + + if ( glFormat === _gl.RGBA ) { + + const transfer = forceLinearTransfer ? LinearTransfer : ColorManagement.getTransfer( colorSpace ); + + if ( glType === _gl.FLOAT ) internalFormat = _gl.RGBA32F; + if ( glType === _gl.HALF_FLOAT ) internalFormat = _gl.RGBA16F; + if ( glType === _gl.UNSIGNED_BYTE ) internalFormat = ( transfer === SRGBTransfer ) ? _gl.SRGB8_ALPHA8 : _gl.RGBA8; + if ( glType === _gl.UNSIGNED_SHORT_4_4_4_4 ) internalFormat = _gl.RGBA4; + if ( glType === _gl.UNSIGNED_SHORT_5_5_5_1 ) internalFormat = _gl.RGB5_A1; + + } + + if ( internalFormat === _gl.R16F || internalFormat === _gl.R32F || + internalFormat === _gl.RG16F || internalFormat === _gl.RG32F || + internalFormat === _gl.RGBA16F || internalFormat === _gl.RGBA32F ) { + + extensions.get( 'EXT_color_buffer_float' ); + + } + + return internalFormat; + + } + + function getMipLevels( texture, image ) { + + if ( textureNeedsGenerateMipmaps( texture ) === true || ( texture.isFramebufferTexture && texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter ) ) { + + return Math.log2( Math.max( image.width, image.height ) ) + 1; + + } else if ( texture.mipmaps !== undefined && texture.mipmaps.length > 0 ) { + + // user-defined mipmaps + + return texture.mipmaps.length; + + } else if ( texture.isCompressedTexture && Array.isArray( texture.image ) ) { + + return image.mipmaps.length; + + } else { + + // texture without mipmaps (only base level) + + return 1; + + } + + } + + // + + function onTextureDispose( event ) { + + const texture = event.target; + + texture.removeEventListener( 'dispose', onTextureDispose ); + + deallocateTexture( texture ); + + if ( texture.isVideoTexture ) { + + _videoTextures.delete( texture ); + + } + + } + + function onRenderTargetDispose( event ) { + + const renderTarget = event.target; + + renderTarget.removeEventListener( 'dispose', onRenderTargetDispose ); + + deallocateRenderTarget( renderTarget ); + + } + + // + + function deallocateTexture( texture ) { + + const textureProperties = properties.get( texture ); + + if ( textureProperties.__webglInit === undefined ) return; + + // check if it's necessary to remove the WebGLTexture object + + const source = texture.source; + const webglTextures = _sources.get( source ); + + if ( webglTextures ) { + + const webglTexture = webglTextures[ textureProperties.__cacheKey ]; + webglTexture.usedTimes --; + + // the WebGLTexture object is not used anymore, remove it + + if ( webglTexture.usedTimes === 0 ) { + + deleteTexture( texture ); + + } + + // remove the weak map entry if no WebGLTexture uses the source anymore + + if ( Object.keys( webglTextures ).length === 0 ) { + + _sources.delete( source ); + + } + + } + + properties.remove( texture ); + + } + + function deleteTexture( texture ) { + + const textureProperties = properties.get( texture ); + _gl.deleteTexture( textureProperties.__webglTexture ); + + const source = texture.source; + const webglTextures = _sources.get( source ); + delete webglTextures[ textureProperties.__cacheKey ]; + + info.memory.textures --; + + } + + function deallocateRenderTarget( renderTarget ) { + + const renderTargetProperties = properties.get( renderTarget ); + + if ( renderTarget.depthTexture ) { + + renderTarget.depthTexture.dispose(); + + } + + if ( renderTarget.isWebGLCubeRenderTarget ) { + + for ( let i = 0; i < 6; i ++ ) { + + if ( Array.isArray( renderTargetProperties.__webglFramebuffer[ i ] ) ) { + + for ( let level = 0; level < renderTargetProperties.__webglFramebuffer[ i ].length; level ++ ) _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ][ level ] ); + + } else { + + _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ] ); + + } + + if ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer[ i ] ); + + } + + } else { + + if ( Array.isArray( renderTargetProperties.__webglFramebuffer ) ) { + + for ( let level = 0; level < renderTargetProperties.__webglFramebuffer.length; level ++ ) _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ level ] ); + + } else { + + _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer ); + + } + + if ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer ); + if ( renderTargetProperties.__webglMultisampledFramebuffer ) _gl.deleteFramebuffer( renderTargetProperties.__webglMultisampledFramebuffer ); + + if ( renderTargetProperties.__webglColorRenderbuffer ) { + + for ( let i = 0; i < renderTargetProperties.__webglColorRenderbuffer.length; i ++ ) { + + if ( renderTargetProperties.__webglColorRenderbuffer[ i ] ) _gl.deleteRenderbuffer( renderTargetProperties.__webglColorRenderbuffer[ i ] ); + + } + + } + + if ( renderTargetProperties.__webglDepthRenderbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthRenderbuffer ); + + } + + const textures = renderTarget.textures; + + for ( let i = 0, il = textures.length; i < il; i ++ ) { + + const attachmentProperties = properties.get( textures[ i ] ); + + if ( attachmentProperties.__webglTexture ) { + + _gl.deleteTexture( attachmentProperties.__webglTexture ); + + info.memory.textures --; + + } + + properties.remove( textures[ i ] ); + + } + + properties.remove( renderTarget ); + + } + + // + + let textureUnits = 0; + + function resetTextureUnits() { + + textureUnits = 0; + + } + + function allocateTextureUnit() { + + const textureUnit = textureUnits; + + if ( textureUnit >= capabilities.maxTextures ) { + + console.warn( 'THREE.WebGLTextures: Trying to use ' + textureUnit + ' texture units while this GPU supports only ' + capabilities.maxTextures ); + + } + + textureUnits += 1; + + return textureUnit; + + } + + function getTextureCacheKey( texture ) { + + const array = []; + + array.push( texture.wrapS ); + array.push( texture.wrapT ); + array.push( texture.wrapR || 0 ); + array.push( texture.magFilter ); + array.push( texture.minFilter ); + array.push( texture.anisotropy ); + array.push( texture.internalFormat ); + array.push( texture.format ); + array.push( texture.type ); + array.push( texture.generateMipmaps ); + array.push( texture.premultiplyAlpha ); + array.push( texture.flipY ); + array.push( texture.unpackAlignment ); + array.push( texture.colorSpace ); + + return array.join(); + + } + + // + + function setTexture2D( texture, slot ) { + + const textureProperties = properties.get( texture ); + + if ( texture.isVideoTexture ) updateVideoTexture( texture ); + + if ( texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version ) { + + const image = texture.image; + + if ( image === null ) { + + console.warn( 'THREE.WebGLRenderer: Texture marked for update but no image data found.' ); + + } else if ( image.complete === false ) { + + console.warn( 'THREE.WebGLRenderer: Texture marked for update but image is incomplete' ); + + } else { + + uploadTexture( textureProperties, texture, slot ); + return; + + } + + } + + state.bindTexture( _gl.TEXTURE_2D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot ); + + } + + function setTexture2DArray( texture, slot ) { + + const textureProperties = properties.get( texture ); + + if ( texture.version > 0 && textureProperties.__version !== texture.version ) { + + uploadTexture( textureProperties, texture, slot ); + return; + + } + + state.bindTexture( _gl.TEXTURE_2D_ARRAY, textureProperties.__webglTexture, _gl.TEXTURE0 + slot ); + + } + + function setTexture3D( texture, slot ) { + + const textureProperties = properties.get( texture ); + + if ( texture.version > 0 && textureProperties.__version !== texture.version ) { + + uploadTexture( textureProperties, texture, slot ); + return; + + } + + state.bindTexture( _gl.TEXTURE_3D, textureProperties.__webglTexture, _gl.TEXTURE0 + slot ); + + } + + function setTextureCube( texture, slot ) { + + const textureProperties = properties.get( texture ); + + if ( texture.version > 0 && textureProperties.__version !== texture.version ) { + + uploadCubeTexture( textureProperties, texture, slot ); + return; + + } + + state.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot ); + + } + + const wrappingToGL = { + [ RepeatWrapping ]: _gl.REPEAT, + [ ClampToEdgeWrapping ]: _gl.CLAMP_TO_EDGE, + [ MirroredRepeatWrapping ]: _gl.MIRRORED_REPEAT + }; + + const filterToGL = { + [ NearestFilter ]: _gl.NEAREST, + [ NearestMipmapNearestFilter ]: _gl.NEAREST_MIPMAP_NEAREST, + [ NearestMipmapLinearFilter ]: _gl.NEAREST_MIPMAP_LINEAR, + + [ LinearFilter ]: _gl.LINEAR, + [ LinearMipmapNearestFilter ]: _gl.LINEAR_MIPMAP_NEAREST, + [ LinearMipmapLinearFilter ]: _gl.LINEAR_MIPMAP_LINEAR + }; + + const compareToGL = { + [ NeverCompare ]: _gl.NEVER, + [ AlwaysCompare ]: _gl.ALWAYS, + [ LessCompare ]: _gl.LESS, + [ LessEqualCompare ]: _gl.LEQUAL, + [ EqualCompare ]: _gl.EQUAL, + [ GreaterEqualCompare ]: _gl.GEQUAL, + [ GreaterCompare ]: _gl.GREATER, + [ NotEqualCompare ]: _gl.NOTEQUAL + }; + + function setTextureParameters( textureType, texture ) { + + if ( texture.type === FloatType && extensions.has( 'OES_texture_float_linear' ) === false && + ( texture.magFilter === LinearFilter || texture.magFilter === LinearMipmapNearestFilter || texture.magFilter === NearestMipmapLinearFilter || texture.magFilter === LinearMipmapLinearFilter || + texture.minFilter === LinearFilter || texture.minFilter === LinearMipmapNearestFilter || texture.minFilter === NearestMipmapLinearFilter || texture.minFilter === LinearMipmapLinearFilter ) ) { + + console.warn( 'THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device.' ); + + } + + _gl.texParameteri( textureType, _gl.TEXTURE_WRAP_S, wrappingToGL[ texture.wrapS ] ); + _gl.texParameteri( textureType, _gl.TEXTURE_WRAP_T, wrappingToGL[ texture.wrapT ] ); + + if ( textureType === _gl.TEXTURE_3D || textureType === _gl.TEXTURE_2D_ARRAY ) { + + _gl.texParameteri( textureType, _gl.TEXTURE_WRAP_R, wrappingToGL[ texture.wrapR ] ); + + } + + _gl.texParameteri( textureType, _gl.TEXTURE_MAG_FILTER, filterToGL[ texture.magFilter ] ); + _gl.texParameteri( textureType, _gl.TEXTURE_MIN_FILTER, filterToGL[ texture.minFilter ] ); + + if ( texture.compareFunction ) { + + _gl.texParameteri( textureType, _gl.TEXTURE_COMPARE_MODE, _gl.COMPARE_REF_TO_TEXTURE ); + _gl.texParameteri( textureType, _gl.TEXTURE_COMPARE_FUNC, compareToGL[ texture.compareFunction ] ); + + } + + if ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) { + + if ( texture.magFilter === NearestFilter ) return; + if ( texture.minFilter !== NearestMipmapLinearFilter && texture.minFilter !== LinearMipmapLinearFilter ) return; + if ( texture.type === FloatType && extensions.has( 'OES_texture_float_linear' ) === false ) return; // verify extension + + if ( texture.anisotropy > 1 || properties.get( texture ).__currentAnisotropy ) { + + const extension = extensions.get( 'EXT_texture_filter_anisotropic' ); + _gl.texParameterf( textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min( texture.anisotropy, capabilities.getMaxAnisotropy() ) ); + properties.get( texture ).__currentAnisotropy = texture.anisotropy; + + } + + } + + } + + function initTexture( textureProperties, texture ) { + + let forceUpload = false; + + if ( textureProperties.__webglInit === undefined ) { + + textureProperties.__webglInit = true; + + texture.addEventListener( 'dispose', onTextureDispose ); + + } + + // create Source <-> WebGLTextures mapping if necessary + + const source = texture.source; + let webglTextures = _sources.get( source ); + + if ( webglTextures === undefined ) { + + webglTextures = {}; + _sources.set( source, webglTextures ); + + } + + // check if there is already a WebGLTexture object for the given texture parameters + + const textureCacheKey = getTextureCacheKey( texture ); + + if ( textureCacheKey !== textureProperties.__cacheKey ) { + + // if not, create a new instance of WebGLTexture + + if ( webglTextures[ textureCacheKey ] === undefined ) { + + // create new entry + + webglTextures[ textureCacheKey ] = { + texture: _gl.createTexture(), + usedTimes: 0 + }; + + info.memory.textures ++; + + // when a new instance of WebGLTexture was created, a texture upload is required + // even if the image contents are identical + + forceUpload = true; + + } + + webglTextures[ textureCacheKey ].usedTimes ++; + + // every time the texture cache key changes, it's necessary to check if an instance of + // WebGLTexture can be deleted in order to avoid a memory leak. + + const webglTexture = webglTextures[ textureProperties.__cacheKey ]; + + if ( webglTexture !== undefined ) { + + webglTextures[ textureProperties.__cacheKey ].usedTimes --; + + if ( webglTexture.usedTimes === 0 ) { + + deleteTexture( texture ); + + } + + } + + // store references to cache key and WebGLTexture object + + textureProperties.__cacheKey = textureCacheKey; + textureProperties.__webglTexture = webglTextures[ textureCacheKey ].texture; + + } + + return forceUpload; + + } + + function uploadTexture( textureProperties, texture, slot ) { + + let textureType = _gl.TEXTURE_2D; + + if ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) textureType = _gl.TEXTURE_2D_ARRAY; + if ( texture.isData3DTexture ) textureType = _gl.TEXTURE_3D; + + const forceUpload = initTexture( textureProperties, texture ); + const source = texture.source; + + state.bindTexture( textureType, textureProperties.__webglTexture, _gl.TEXTURE0 + slot ); + + const sourceProperties = properties.get( source ); + + if ( source.version !== sourceProperties.__version || forceUpload === true ) { + + state.activeTexture( _gl.TEXTURE0 + slot ); + + const workingPrimaries = ColorManagement.getPrimaries( ColorManagement.workingColorSpace ); + const texturePrimaries = texture.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries( texture.colorSpace ); + const unpackConversion = texture.colorSpace === NoColorSpace || workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL; + + _gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY ); + _gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha ); + _gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment ); + _gl.pixelStorei( _gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, unpackConversion ); + + let image = resizeImage( texture.image, false, capabilities.maxTextureSize ); + image = verifyColorSpace( texture, image ); + + const glFormat = utils.convert( texture.format, texture.colorSpace ); + + const glType = utils.convert( texture.type ); + let glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace, texture.isVideoTexture ); + + setTextureParameters( textureType, texture ); + + let mipmap; + const mipmaps = texture.mipmaps; + + const useTexStorage = ( texture.isVideoTexture !== true ); + const allocateMemory = ( sourceProperties.__version === undefined ) || ( forceUpload === true ); + const dataReady = source.dataReady; + const levels = getMipLevels( texture, image ); + + if ( texture.isDepthTexture ) { + + // populate depth texture with dummy data + + glInternalFormat = _gl.DEPTH_COMPONENT16; + + if ( texture.type === FloatType ) { + + glInternalFormat = _gl.DEPTH_COMPONENT32F; + + } else if ( texture.type === UnsignedIntType ) { + + glInternalFormat = _gl.DEPTH_COMPONENT24; + + } else if ( texture.type === UnsignedInt248Type ) { + + glInternalFormat = _gl.DEPTH24_STENCIL8; + + } + + // + + if ( allocateMemory ) { + + if ( useTexStorage ) { + + state.texStorage2D( _gl.TEXTURE_2D, 1, glInternalFormat, image.width, image.height ); + + } else { + + state.texImage2D( _gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, null ); + + } + + } + + } else if ( texture.isDataTexture ) { + + // use manually created mipmaps if available + // if there are no manual mipmaps + // set 0 level mipmap and then use GL to generate other mipmap levels + + if ( mipmaps.length > 0 ) { + + if ( useTexStorage && allocateMemory ) { + + state.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height ); + + } + + for ( let i = 0, il = mipmaps.length; i < il; i ++ ) { + + mipmap = mipmaps[ i ]; + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data ); + + } + + } + + texture.generateMipmaps = false; + + } else { + + if ( useTexStorage ) { + + if ( allocateMemory ) { + + state.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height ); + + } + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_2D, 0, 0, 0, image.width, image.height, glFormat, glType, image.data ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, image.data ); + + } + + } + + } else if ( texture.isCompressedTexture ) { + + if ( texture.isCompressedArrayTexture ) { + + if ( useTexStorage && allocateMemory ) { + + state.texStorage3D( _gl.TEXTURE_2D_ARRAY, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height, image.depth ); + + } + + for ( let i = 0, il = mipmaps.length; i < il; i ++ ) { + + mipmap = mipmaps[ i ]; + + if ( texture.format !== RGBAFormat ) { + + if ( glFormat !== null ) { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.compressedTexSubImage3D( _gl.TEXTURE_2D_ARRAY, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, mipmap.data, 0, 0 ); + + } + + } else { + + state.compressedTexImage3D( _gl.TEXTURE_2D_ARRAY, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, mipmap.data, 0, 0 ); + + } + + } else { + + console.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()' ); + + } + + } else { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage3D( _gl.TEXTURE_2D_ARRAY, i, 0, 0, 0, mipmap.width, mipmap.height, image.depth, glFormat, glType, mipmap.data ); + + } + + } else { + + state.texImage3D( _gl.TEXTURE_2D_ARRAY, i, glInternalFormat, mipmap.width, mipmap.height, image.depth, 0, glFormat, glType, mipmap.data ); + + } + + } + + } + + } else { + + if ( useTexStorage && allocateMemory ) { + + state.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, mipmaps[ 0 ].width, mipmaps[ 0 ].height ); + + } + + for ( let i = 0, il = mipmaps.length; i < il; i ++ ) { + + mipmap = mipmaps[ i ]; + + if ( texture.format !== RGBAFormat ) { + + if ( glFormat !== null ) { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.compressedTexSubImage2D( _gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data ); + + } + + } else { + + state.compressedTexImage2D( _gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data ); + + } + + } else { + + console.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()' ); + + } + + } else { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_2D, i, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data ); + + } + + } + + } + + } + + } else if ( texture.isDataArrayTexture ) { + + if ( useTexStorage ) { + + if ( allocateMemory ) { + + state.texStorage3D( _gl.TEXTURE_2D_ARRAY, levels, glInternalFormat, image.width, image.height, image.depth ); + + } + + if ( dataReady ) { + + state.texSubImage3D( _gl.TEXTURE_2D_ARRAY, 0, 0, 0, 0, image.width, image.height, image.depth, glFormat, glType, image.data ); + + } + + } else { + + state.texImage3D( _gl.TEXTURE_2D_ARRAY, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data ); + + } + + } else if ( texture.isData3DTexture ) { + + if ( useTexStorage ) { + + if ( allocateMemory ) { + + state.texStorage3D( _gl.TEXTURE_3D, levels, glInternalFormat, image.width, image.height, image.depth ); + + } + + if ( dataReady ) { + + state.texSubImage3D( _gl.TEXTURE_3D, 0, 0, 0, 0, image.width, image.height, image.depth, glFormat, glType, image.data ); + + } + + } else { + + state.texImage3D( _gl.TEXTURE_3D, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data ); + + } + + } else if ( texture.isFramebufferTexture ) { + + if ( allocateMemory ) { + + if ( useTexStorage ) { + + state.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, image.width, image.height ); + + } else { + + let width = image.width, height = image.height; + + for ( let i = 0; i < levels; i ++ ) { + + state.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, width, height, 0, glFormat, glType, null ); + + width >>= 1; + height >>= 1; + + } + + } + + } + + } else { + + // regular Texture (image, video, canvas) + + // use manually created mipmaps if available + // if there are no manual mipmaps + // set 0 level mipmap and then use GL to generate other mipmap levels + + if ( mipmaps.length > 0 ) { + + if ( useTexStorage && allocateMemory ) { + + const dimensions = getDimensions( mipmaps[ 0 ] ); + + state.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, dimensions.width, dimensions.height ); + + } + + for ( let i = 0, il = mipmaps.length; i < il; i ++ ) { + + mipmap = mipmaps[ i ]; + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_2D, i, 0, 0, glFormat, glType, mipmap ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_2D, i, glInternalFormat, glFormat, glType, mipmap ); + + } + + } + + texture.generateMipmaps = false; + + } else { + + if ( useTexStorage ) { + + if ( allocateMemory ) { + + const dimensions = getDimensions( image ); + + state.texStorage2D( _gl.TEXTURE_2D, levels, glInternalFormat, dimensions.width, dimensions.height ); + + } + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_2D, 0, 0, 0, glFormat, glType, image ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_2D, 0, glInternalFormat, glFormat, glType, image ); + + } + + } + + } + + if ( textureNeedsGenerateMipmaps( texture ) ) { + + generateMipmap( textureType ); + + } + + sourceProperties.__version = source.version; + + if ( texture.onUpdate ) texture.onUpdate( texture ); + + } + + textureProperties.__version = texture.version; + + } + + function uploadCubeTexture( textureProperties, texture, slot ) { + + if ( texture.image.length !== 6 ) return; + + const forceUpload = initTexture( textureProperties, texture ); + const source = texture.source; + + state.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture, _gl.TEXTURE0 + slot ); + + const sourceProperties = properties.get( source ); + + if ( source.version !== sourceProperties.__version || forceUpload === true ) { + + state.activeTexture( _gl.TEXTURE0 + slot ); + + const workingPrimaries = ColorManagement.getPrimaries( ColorManagement.workingColorSpace ); + const texturePrimaries = texture.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries( texture.colorSpace ); + const unpackConversion = texture.colorSpace === NoColorSpace || workingPrimaries === texturePrimaries ? _gl.NONE : _gl.BROWSER_DEFAULT_WEBGL; + + _gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, texture.flipY ); + _gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha ); + _gl.pixelStorei( _gl.UNPACK_ALIGNMENT, texture.unpackAlignment ); + _gl.pixelStorei( _gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, unpackConversion ); + + const isCompressed = ( texture.isCompressedTexture || texture.image[ 0 ].isCompressedTexture ); + const isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture ); + + const cubeImage = []; + + for ( let i = 0; i < 6; i ++ ) { + + if ( ! isCompressed && ! isDataTexture ) { + + cubeImage[ i ] = resizeImage( texture.image[ i ], true, capabilities.maxCubemapSize ); + + } else { + + cubeImage[ i ] = isDataTexture ? texture.image[ i ].image : texture.image[ i ]; + + } + + cubeImage[ i ] = verifyColorSpace( texture, cubeImage[ i ] ); + + } + + const image = cubeImage[ 0 ], + glFormat = utils.convert( texture.format, texture.colorSpace ), + glType = utils.convert( texture.type ), + glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace ); + + const useTexStorage = ( texture.isVideoTexture !== true ); + const allocateMemory = ( sourceProperties.__version === undefined ) || ( forceUpload === true ); + const dataReady = source.dataReady; + let levels = getMipLevels( texture, image ); + + setTextureParameters( _gl.TEXTURE_CUBE_MAP, texture ); + + let mipmaps; + + if ( isCompressed ) { + + if ( useTexStorage && allocateMemory ) { + + state.texStorage2D( _gl.TEXTURE_CUBE_MAP, levels, glInternalFormat, image.width, image.height ); + + } + + for ( let i = 0; i < 6; i ++ ) { + + mipmaps = cubeImage[ i ].mipmaps; + + for ( let j = 0; j < mipmaps.length; j ++ ) { + + const mipmap = mipmaps[ j ]; + + if ( texture.format !== RGBAFormat ) { + + if ( glFormat !== null ) { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.compressedTexSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, 0, 0, mipmap.width, mipmap.height, glFormat, mipmap.data ); + + } + + } else { + + state.compressedTexImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data ); + + } + + } else { + + console.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()' ); + + } + + } else { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, 0, 0, mipmap.width, mipmap.height, glFormat, glType, mipmap.data ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data ); + + } + + } + + } + + } + + } else { + + mipmaps = texture.mipmaps; + + if ( useTexStorage && allocateMemory ) { + + // TODO: Uniformly handle mipmap definitions + // Normal textures and compressed cube textures define base level + mips with their mipmap array + // Uncompressed cube textures use their mipmap array only for mips (no base level) + + if ( mipmaps.length > 0 ) levels ++; + + const dimensions = getDimensions( cubeImage[ 0 ] ); + + state.texStorage2D( _gl.TEXTURE_CUBE_MAP, levels, glInternalFormat, dimensions.width, dimensions.height ); + + } + + for ( let i = 0; i < 6; i ++ ) { + + if ( isDataTexture ) { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, 0, 0, cubeImage[ i ].width, cubeImage[ i ].height, glFormat, glType, cubeImage[ i ].data ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, cubeImage[ i ].width, cubeImage[ i ].height, 0, glFormat, glType, cubeImage[ i ].data ); + + } + + for ( let j = 0; j < mipmaps.length; j ++ ) { + + const mipmap = mipmaps[ j ]; + const mipmapImage = mipmap.image[ i ].image; + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, 0, 0, mipmapImage.width, mipmapImage.height, glFormat, glType, mipmapImage.data ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, mipmapImage.width, mipmapImage.height, 0, glFormat, glType, mipmapImage.data ); + + } + + } + + } else { + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, 0, 0, glFormat, glType, cubeImage[ i ] ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, glFormat, glType, cubeImage[ i ] ); + + } + + for ( let j = 0; j < mipmaps.length; j ++ ) { + + const mipmap = mipmaps[ j ]; + + if ( useTexStorage ) { + + if ( dataReady ) { + + state.texSubImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, 0, 0, glFormat, glType, mipmap.image[ i ] ); + + } + + } else { + + state.texImage2D( _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, glFormat, glType, mipmap.image[ i ] ); + + } + + } + + } + + } + + } + + if ( textureNeedsGenerateMipmaps( texture ) ) { + + // We assume images for cube map have the same size. + generateMipmap( _gl.TEXTURE_CUBE_MAP ); + + } + + sourceProperties.__version = source.version; + + if ( texture.onUpdate ) texture.onUpdate( texture ); + + } + + textureProperties.__version = texture.version; + + } + + // Render targets + + // Setup storage for target texture and bind it to correct framebuffer + function setupFrameBufferTexture( framebuffer, renderTarget, texture, attachment, textureTarget, level ) { + + const glFormat = utils.convert( texture.format, texture.colorSpace ); + const glType = utils.convert( texture.type ); + const glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace ); + const renderTargetProperties = properties.get( renderTarget ); + + if ( ! renderTargetProperties.__hasExternalTextures ) { + + const width = Math.max( 1, renderTarget.width >> level ); + const height = Math.max( 1, renderTarget.height >> level ); + + if ( textureTarget === _gl.TEXTURE_3D || textureTarget === _gl.TEXTURE_2D_ARRAY ) { + + state.texImage3D( textureTarget, level, glInternalFormat, width, height, renderTarget.depth, 0, glFormat, glType, null ); + + } else { + + state.texImage2D( textureTarget, level, glInternalFormat, width, height, 0, glFormat, glType, null ); + + } + + } + + state.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer ); + + if ( useMultisampledRTT( renderTarget ) ) { + + multisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, 0, getRenderTargetSamples( renderTarget ) ); + + } else if ( textureTarget === _gl.TEXTURE_2D || ( textureTarget >= _gl.TEXTURE_CUBE_MAP_POSITIVE_X && textureTarget <= _gl.TEXTURE_CUBE_MAP_NEGATIVE_Z ) ) { // see #24753 + + _gl.framebufferTexture2D( _gl.FRAMEBUFFER, attachment, textureTarget, properties.get( texture ).__webglTexture, level ); + + } + + state.bindFramebuffer( _gl.FRAMEBUFFER, null ); + + } + + + // Setup storage for internal depth/stencil buffers and bind to correct framebuffer + function setupRenderBufferStorage( renderbuffer, renderTarget, isMultisample ) { + + _gl.bindRenderbuffer( _gl.RENDERBUFFER, renderbuffer ); + + if ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) { + + let glInternalFormat = _gl.DEPTH_COMPONENT24; + + if ( isMultisample || useMultisampledRTT( renderTarget ) ) { + + const depthTexture = renderTarget.depthTexture; + + if ( depthTexture && depthTexture.isDepthTexture ) { + + if ( depthTexture.type === FloatType ) { + + glInternalFormat = _gl.DEPTH_COMPONENT32F; + + } else if ( depthTexture.type === UnsignedIntType ) { + + glInternalFormat = _gl.DEPTH_COMPONENT24; + + } + + } + + const samples = getRenderTargetSamples( renderTarget ); + + if ( useMultisampledRTT( renderTarget ) ) { + + multisampledRTTExt.renderbufferStorageMultisampleEXT( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height ); + + } else { + + _gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height ); + + } + + } else { + + _gl.renderbufferStorage( _gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height ); + + } + + _gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer ); + + } else if ( renderTarget.depthBuffer && renderTarget.stencilBuffer ) { + + const samples = getRenderTargetSamples( renderTarget ); + + if ( isMultisample && useMultisampledRTT( renderTarget ) === false ) { + + _gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, _gl.DEPTH24_STENCIL8, renderTarget.width, renderTarget.height ); + + } else if ( useMultisampledRTT( renderTarget ) ) { + + multisampledRTTExt.renderbufferStorageMultisampleEXT( _gl.RENDERBUFFER, samples, _gl.DEPTH24_STENCIL8, renderTarget.width, renderTarget.height ); + + } else { + + _gl.renderbufferStorage( _gl.RENDERBUFFER, _gl.DEPTH_STENCIL, renderTarget.width, renderTarget.height ); + + } + + + _gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer ); + + } else { + + const textures = renderTarget.textures; + + for ( let i = 0; i < textures.length; i ++ ) { + + const texture = textures[ i ]; + + const glFormat = utils.convert( texture.format, texture.colorSpace ); + const glType = utils.convert( texture.type ); + const glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace ); + const samples = getRenderTargetSamples( renderTarget ); + + if ( isMultisample && useMultisampledRTT( renderTarget ) === false ) { + + _gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height ); + + } else if ( useMultisampledRTT( renderTarget ) ) { + + multisampledRTTExt.renderbufferStorageMultisampleEXT( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height ); + + } else { + + _gl.renderbufferStorage( _gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height ); + + } + + } + + } + + _gl.bindRenderbuffer( _gl.RENDERBUFFER, null ); + + } + + // Setup resources for a Depth Texture for a FBO (needs an extension) + function setupDepthTexture( framebuffer, renderTarget ) { + + const isCube = ( renderTarget && renderTarget.isWebGLCubeRenderTarget ); + if ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' ); + + state.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer ); + + if ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) { + + throw new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' ); + + } + + // upload an empty depth texture with framebuffer size + if ( ! properties.get( renderTarget.depthTexture ).__webglTexture || + renderTarget.depthTexture.image.width !== renderTarget.width || + renderTarget.depthTexture.image.height !== renderTarget.height ) { + + renderTarget.depthTexture.image.width = renderTarget.width; + renderTarget.depthTexture.image.height = renderTarget.height; + renderTarget.depthTexture.needsUpdate = true; + + } + + setTexture2D( renderTarget.depthTexture, 0 ); + + const webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture; + const samples = getRenderTargetSamples( renderTarget ); + + if ( renderTarget.depthTexture.format === DepthFormat ) { + + if ( useMultisampledRTT( renderTarget ) ) { + + multisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples ); + + } else { + + _gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 ); + + } + + } else if ( renderTarget.depthTexture.format === DepthStencilFormat ) { + + if ( useMultisampledRTT( renderTarget ) ) { + + multisampledRTTExt.framebufferTexture2DMultisampleEXT( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0, samples ); + + } else { + + _gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0 ); + + } + + } else { + + throw new Error( 'Unknown depthTexture format' ); + + } + + } + + // Setup GL resources for a non-texture depth buffer + function setupDepthRenderbuffer( renderTarget ) { + + const renderTargetProperties = properties.get( renderTarget ); + const isCube = ( renderTarget.isWebGLCubeRenderTarget === true ); + + if ( renderTarget.depthTexture && ! renderTargetProperties.__autoAllocateDepthBuffer ) { + + if ( isCube ) throw new Error( 'target.depthTexture not supported in Cube render targets' ); + + setupDepthTexture( renderTargetProperties.__webglFramebuffer, renderTarget ); + + } else { + + if ( isCube ) { + + renderTargetProperties.__webglDepthbuffer = []; + + for ( let i = 0; i < 6; i ++ ) { + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer[ i ] ); + renderTargetProperties.__webglDepthbuffer[ i ] = _gl.createRenderbuffer(); + setupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer[ i ], renderTarget, false ); + + } + + } else { + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer ); + renderTargetProperties.__webglDepthbuffer = _gl.createRenderbuffer(); + setupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer, renderTarget, false ); + + } + + } + + state.bindFramebuffer( _gl.FRAMEBUFFER, null ); + + } + + // rebind framebuffer with external textures + function rebindTextures( renderTarget, colorTexture, depthTexture ) { + + const renderTargetProperties = properties.get( renderTarget ); + + if ( colorTexture !== undefined ) { + + setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, renderTarget.texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, 0 ); + + } + + if ( depthTexture !== undefined ) { + + setupDepthRenderbuffer( renderTarget ); + + } + + } + + // Set up GL resources for the render target + function setupRenderTarget( renderTarget ) { + + const texture = renderTarget.texture; + + const renderTargetProperties = properties.get( renderTarget ); + const textureProperties = properties.get( texture ); + + renderTarget.addEventListener( 'dispose', onRenderTargetDispose ); + + const textures = renderTarget.textures; + + const isCube = ( renderTarget.isWebGLCubeRenderTarget === true ); + const isMultipleRenderTargets = ( textures.length > 1 ); + + if ( ! isMultipleRenderTargets ) { + + if ( textureProperties.__webglTexture === undefined ) { + + textureProperties.__webglTexture = _gl.createTexture(); + + } + + textureProperties.__version = texture.version; + info.memory.textures ++; + + } + + // Setup framebuffer + + if ( isCube ) { + + renderTargetProperties.__webglFramebuffer = []; + + for ( let i = 0; i < 6; i ++ ) { + + if ( texture.mipmaps && texture.mipmaps.length > 0 ) { + + renderTargetProperties.__webglFramebuffer[ i ] = []; + + for ( let level = 0; level < texture.mipmaps.length; level ++ ) { + + renderTargetProperties.__webglFramebuffer[ i ][ level ] = _gl.createFramebuffer(); + + } + + } else { + + renderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer(); + + } + + } + + } else { + + if ( texture.mipmaps && texture.mipmaps.length > 0 ) { + + renderTargetProperties.__webglFramebuffer = []; + + for ( let level = 0; level < texture.mipmaps.length; level ++ ) { + + renderTargetProperties.__webglFramebuffer[ level ] = _gl.createFramebuffer(); + + } + + } else { + + renderTargetProperties.__webglFramebuffer = _gl.createFramebuffer(); + + } + + if ( isMultipleRenderTargets ) { + + for ( let i = 0, il = textures.length; i < il; i ++ ) { + + const attachmentProperties = properties.get( textures[ i ] ); + + if ( attachmentProperties.__webglTexture === undefined ) { + + attachmentProperties.__webglTexture = _gl.createTexture(); + + info.memory.textures ++; + + } + + } + + } + + if ( ( renderTarget.samples > 0 ) && useMultisampledRTT( renderTarget ) === false ) { + + renderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer(); + renderTargetProperties.__webglColorRenderbuffer = []; + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer ); + + for ( let i = 0; i < textures.length; i ++ ) { + + const texture = textures[ i ]; + renderTargetProperties.__webglColorRenderbuffer[ i ] = _gl.createRenderbuffer(); + + _gl.bindRenderbuffer( _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] ); + + const glFormat = utils.convert( texture.format, texture.colorSpace ); + const glType = utils.convert( texture.type ); + const glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType, texture.colorSpace, renderTarget.isXRRenderTarget === true ); + const samples = getRenderTargetSamples( renderTarget ); + _gl.renderbufferStorageMultisample( _gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height ); + + _gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] ); + + } + + _gl.bindRenderbuffer( _gl.RENDERBUFFER, null ); + + if ( renderTarget.depthBuffer ) { + + renderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer(); + setupRenderBufferStorage( renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true ); + + } + + state.bindFramebuffer( _gl.FRAMEBUFFER, null ); + + } + + } + + // Setup color buffer + + if ( isCube ) { + + state.bindTexture( _gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture ); + setTextureParameters( _gl.TEXTURE_CUBE_MAP, texture ); + + for ( let i = 0; i < 6; i ++ ) { + + if ( texture.mipmaps && texture.mipmaps.length > 0 ) { + + for ( let level = 0; level < texture.mipmaps.length; level ++ ) { + + setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ][ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, level ); + + } + + } else { + + setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0 ); + + } + + } + + if ( textureNeedsGenerateMipmaps( texture ) ) { + + generateMipmap( _gl.TEXTURE_CUBE_MAP ); + + } + + state.unbindTexture(); + + } else if ( isMultipleRenderTargets ) { + + for ( let i = 0, il = textures.length; i < il; i ++ ) { + + const attachment = textures[ i ]; + const attachmentProperties = properties.get( attachment ); + + state.bindTexture( _gl.TEXTURE_2D, attachmentProperties.__webglTexture ); + setTextureParameters( _gl.TEXTURE_2D, attachment ); + setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, attachment, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, 0 ); + + if ( textureNeedsGenerateMipmaps( attachment ) ) { + + generateMipmap( _gl.TEXTURE_2D ); + + } + + } + + state.unbindTexture(); + + } else { + + let glTextureType = _gl.TEXTURE_2D; + + if ( renderTarget.isWebGL3DRenderTarget || renderTarget.isWebGLArrayRenderTarget ) { + + glTextureType = renderTarget.isWebGL3DRenderTarget ? _gl.TEXTURE_3D : _gl.TEXTURE_2D_ARRAY; + + } + + state.bindTexture( glTextureType, textureProperties.__webglTexture ); + setTextureParameters( glTextureType, texture ); + + if ( texture.mipmaps && texture.mipmaps.length > 0 ) { + + for ( let level = 0; level < texture.mipmaps.length; level ++ ) { + + setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ level ], renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, level ); + + } + + } else { + + setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType, 0 ); + + } + + if ( textureNeedsGenerateMipmaps( texture ) ) { + + generateMipmap( glTextureType ); + + } + + state.unbindTexture(); + + } + + // Setup depth and stencil buffers + + if ( renderTarget.depthBuffer ) { + + setupDepthRenderbuffer( renderTarget ); + + } + + } + + function updateRenderTargetMipmap( renderTarget ) { + + const textures = renderTarget.textures; + + for ( let i = 0, il = textures.length; i < il; i ++ ) { + + const texture = textures[ i ]; + + if ( textureNeedsGenerateMipmaps( texture ) ) { + + const target = renderTarget.isWebGLCubeRenderTarget ? _gl.TEXTURE_CUBE_MAP : _gl.TEXTURE_2D; + const webglTexture = properties.get( texture ).__webglTexture; + + state.bindTexture( target, webglTexture ); + generateMipmap( target ); + state.unbindTexture(); + + } + + } + + } + + const invalidationArrayRead = []; + const invalidationArrayDraw = []; + + function updateMultisampleRenderTarget( renderTarget ) { + + if ( renderTarget.samples > 0 ) { + + if ( useMultisampledRTT( renderTarget ) === false ) { + + const textures = renderTarget.textures; + const width = renderTarget.width; + const height = renderTarget.height; + let mask = _gl.COLOR_BUFFER_BIT; + const depthStyle = renderTarget.stencilBuffer ? _gl.DEPTH_STENCIL_ATTACHMENT : _gl.DEPTH_ATTACHMENT; + const renderTargetProperties = properties.get( renderTarget ); + const isMultipleRenderTargets = ( textures.length > 1 ); + + // If MRT we need to remove FBO attachments + if ( isMultipleRenderTargets ) { + + for ( let i = 0; i < textures.length; i ++ ) { + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer ); + _gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, null ); + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer ); + _gl.framebufferTexture2D( _gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, null, 0 ); + + } + + } + + state.bindFramebuffer( _gl.READ_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer ); + state.bindFramebuffer( _gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglFramebuffer ); + + for ( let i = 0; i < textures.length; i ++ ) { + + if ( renderTarget.resolveDepthBuffer ) { + + if ( renderTarget.depthBuffer ) mask |= _gl.DEPTH_BUFFER_BIT; + + // resolving stencil is slow with a D3D backend. disable it for all transmission render targets (see #27799) + + if ( renderTarget.stencilBuffer && renderTarget.resolveStencilBuffer ) mask |= _gl.STENCIL_BUFFER_BIT; + + } + + if ( isMultipleRenderTargets ) { + + _gl.framebufferRenderbuffer( _gl.READ_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] ); + + const webglTexture = properties.get( textures[ i ] ).__webglTexture; + _gl.framebufferTexture2D( _gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_2D, webglTexture, 0 ); + + } + + _gl.blitFramebuffer( 0, 0, width, height, 0, 0, width, height, mask, _gl.NEAREST ); + + if ( supportsInvalidateFramebuffer === true ) { + + invalidationArrayRead.length = 0; + invalidationArrayDraw.length = 0; + + invalidationArrayRead.push( _gl.COLOR_ATTACHMENT0 + i ); + + if ( renderTarget.depthBuffer && renderTarget.resolveDepthBuffer === false ) { + + invalidationArrayRead.push( depthStyle ); + invalidationArrayDraw.push( depthStyle ); + + _gl.invalidateFramebuffer( _gl.DRAW_FRAMEBUFFER, invalidationArrayDraw ); + + } + + _gl.invalidateFramebuffer( _gl.READ_FRAMEBUFFER, invalidationArrayRead ); + + } + + } + + state.bindFramebuffer( _gl.READ_FRAMEBUFFER, null ); + state.bindFramebuffer( _gl.DRAW_FRAMEBUFFER, null ); + + // If MRT since pre-blit we removed the FBO we need to reconstruct the attachments + if ( isMultipleRenderTargets ) { + + for ( let i = 0; i < textures.length; i ++ ) { + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer ); + _gl.framebufferRenderbuffer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer[ i ] ); + + const webglTexture = properties.get( textures[ i ] ).__webglTexture; + + state.bindFramebuffer( _gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer ); + _gl.framebufferTexture2D( _gl.DRAW_FRAMEBUFFER, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D, webglTexture, 0 ); + + } + + } + + state.bindFramebuffer( _gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer ); + + } else { + + if ( renderTarget.depthBuffer && renderTarget.resolveDepthBuffer === false && supportsInvalidateFramebuffer ) { + + const depthStyle = renderTarget.stencilBuffer ? _gl.DEPTH_STENCIL_ATTACHMENT : _gl.DEPTH_ATTACHMENT; + + _gl.invalidateFramebuffer( _gl.DRAW_FRAMEBUFFER, [ depthStyle ] ); + + } + + } + + } + + } + + function getRenderTargetSamples( renderTarget ) { + + return Math.min( capabilities.maxSamples, renderTarget.samples ); + + } + + function useMultisampledRTT( renderTarget ) { + + const renderTargetProperties = properties.get( renderTarget ); + + return renderTarget.samples > 0 && extensions.has( 'WEBGL_multisampled_render_to_texture' ) === true && renderTargetProperties.__useRenderToTexture !== false; + + } + + function updateVideoTexture( texture ) { + + const frame = info.render.frame; + + // Check the last frame we updated the VideoTexture + + if ( _videoTextures.get( texture ) !== frame ) { + + _videoTextures.set( texture, frame ); + texture.update(); + + } + + } + + function verifyColorSpace( texture, image ) { + + const colorSpace = texture.colorSpace; + const format = texture.format; + const type = texture.type; + + if ( texture.isCompressedTexture === true || texture.isVideoTexture === true ) return image; + + if ( colorSpace !== LinearSRGBColorSpace && colorSpace !== NoColorSpace ) { + + // sRGB + + if ( ColorManagement.getTransfer( colorSpace ) === SRGBTransfer ) { + + // in WebGL 2 uncompressed textures can only be sRGB encoded if they have the RGBA8 format + + if ( format !== RGBAFormat || type !== UnsignedByteType ) { + + console.warn( 'THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.' ); + + } + + } else { + + console.error( 'THREE.WebGLTextures: Unsupported texture color space:', colorSpace ); + + } + + } + + return image; + + } + + function getDimensions( image ) { + + if ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) { + + // if intrinsic data are not available, fallback to width/height + + _imageDimensions.width = image.naturalWidth || image.width; + _imageDimensions.height = image.naturalHeight || image.height; + + } else if ( typeof VideoFrame !== 'undefined' && image instanceof VideoFrame ) { + + _imageDimensions.width = image.displayWidth; + _imageDimensions.height = image.displayHeight; + + } else { + + _imageDimensions.width = image.width; + _imageDimensions.height = image.height; + + } + + return _imageDimensions; + + } + + // + + this.allocateTextureUnit = allocateTextureUnit; + this.resetTextureUnits = resetTextureUnits; + + this.setTexture2D = setTexture2D; + this.setTexture2DArray = setTexture2DArray; + this.setTexture3D = setTexture3D; + this.setTextureCube = setTextureCube; + this.rebindTextures = rebindTextures; + this.setupRenderTarget = setupRenderTarget; + this.updateRenderTargetMipmap = updateRenderTargetMipmap; + this.updateMultisampleRenderTarget = updateMultisampleRenderTarget; + this.setupDepthRenderbuffer = setupDepthRenderbuffer; + this.setupFrameBufferTexture = setupFrameBufferTexture; + this.useMultisampledRTT = useMultisampledRTT; + +} + +function WebGLUtils( gl, extensions ) { + + function convert( p, colorSpace = NoColorSpace ) { + + let extension; + + const transfer = ColorManagement.getTransfer( colorSpace ); + + if ( p === UnsignedByteType ) return gl.UNSIGNED_BYTE; + if ( p === UnsignedShort4444Type ) return gl.UNSIGNED_SHORT_4_4_4_4; + if ( p === UnsignedShort5551Type ) return gl.UNSIGNED_SHORT_5_5_5_1; + if ( p === UnsignedInt5999Type ) return gl.UNSIGNED_INT_5_9_9_9_REV; + + if ( p === ByteType ) return gl.BYTE; + if ( p === ShortType ) return gl.SHORT; + if ( p === UnsignedShortType ) return gl.UNSIGNED_SHORT; + if ( p === IntType ) return gl.INT; + if ( p === UnsignedIntType ) return gl.UNSIGNED_INT; + if ( p === FloatType ) return gl.FLOAT; + if ( p === HalfFloatType ) return gl.HALF_FLOAT; + + if ( p === AlphaFormat ) return gl.ALPHA; + if ( p === RGBFormat ) return gl.RGB; + if ( p === RGBAFormat ) return gl.RGBA; + if ( p === LuminanceFormat ) return gl.LUMINANCE; + if ( p === LuminanceAlphaFormat ) return gl.LUMINANCE_ALPHA; + if ( p === DepthFormat ) return gl.DEPTH_COMPONENT; + if ( p === DepthStencilFormat ) return gl.DEPTH_STENCIL; + + // WebGL2 formats. + + if ( p === RedFormat ) return gl.RED; + if ( p === RedIntegerFormat ) return gl.RED_INTEGER; + if ( p === RGFormat ) return gl.RG; + if ( p === RGIntegerFormat ) return gl.RG_INTEGER; + if ( p === RGBAIntegerFormat ) return gl.RGBA_INTEGER; + + // S3TC + + if ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format || p === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) { + + if ( transfer === SRGBTransfer ) { + + extension = extensions.get( 'WEBGL_compressed_texture_s3tc_srgb' ); + + if ( extension !== null ) { + + if ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_SRGB_S3TC_DXT1_EXT; + if ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT; + if ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT; + if ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT; + + } else { + + return null; + + } + + } else { + + extension = extensions.get( 'WEBGL_compressed_texture_s3tc' ); + + if ( extension !== null ) { + + if ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT; + if ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT; + if ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT; + if ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT; + + } else { + + return null; + + } + + } + + } + + // PVRTC + + if ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format || p === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) { + + extension = extensions.get( 'WEBGL_compressed_texture_pvrtc' ); + + if ( extension !== null ) { + + if ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG; + if ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG; + if ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; + if ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; + + } else { + + return null; + + } + + } + + // ETC + + if ( p === RGB_ETC1_Format || p === RGB_ETC2_Format || p === RGBA_ETC2_EAC_Format ) { + + extension = extensions.get( 'WEBGL_compressed_texture_etc' ); + + if ( extension !== null ) { + + if ( p === RGB_ETC1_Format || p === RGB_ETC2_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ETC2 : extension.COMPRESSED_RGB8_ETC2; + if ( p === RGBA_ETC2_EAC_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : extension.COMPRESSED_RGBA8_ETC2_EAC; + + } else { + + return null; + + } + + } + + // ASTC + + if ( p === RGBA_ASTC_4x4_Format || p === RGBA_ASTC_5x4_Format || p === RGBA_ASTC_5x5_Format || + p === RGBA_ASTC_6x5_Format || p === RGBA_ASTC_6x6_Format || p === RGBA_ASTC_8x5_Format || + p === RGBA_ASTC_8x6_Format || p === RGBA_ASTC_8x8_Format || p === RGBA_ASTC_10x5_Format || + p === RGBA_ASTC_10x6_Format || p === RGBA_ASTC_10x8_Format || p === RGBA_ASTC_10x10_Format || + p === RGBA_ASTC_12x10_Format || p === RGBA_ASTC_12x12_Format ) { + + extension = extensions.get( 'WEBGL_compressed_texture_astc' ); + + if ( extension !== null ) { + + if ( p === RGBA_ASTC_4x4_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : extension.COMPRESSED_RGBA_ASTC_4x4_KHR; + if ( p === RGBA_ASTC_5x4_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : extension.COMPRESSED_RGBA_ASTC_5x4_KHR; + if ( p === RGBA_ASTC_5x5_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : extension.COMPRESSED_RGBA_ASTC_5x5_KHR; + if ( p === RGBA_ASTC_6x5_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : extension.COMPRESSED_RGBA_ASTC_6x5_KHR; + if ( p === RGBA_ASTC_6x6_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : extension.COMPRESSED_RGBA_ASTC_6x6_KHR; + if ( p === RGBA_ASTC_8x5_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : extension.COMPRESSED_RGBA_ASTC_8x5_KHR; + if ( p === RGBA_ASTC_8x6_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : extension.COMPRESSED_RGBA_ASTC_8x6_KHR; + if ( p === RGBA_ASTC_8x8_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : extension.COMPRESSED_RGBA_ASTC_8x8_KHR; + if ( p === RGBA_ASTC_10x5_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : extension.COMPRESSED_RGBA_ASTC_10x5_KHR; + if ( p === RGBA_ASTC_10x6_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : extension.COMPRESSED_RGBA_ASTC_10x6_KHR; + if ( p === RGBA_ASTC_10x8_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : extension.COMPRESSED_RGBA_ASTC_10x8_KHR; + if ( p === RGBA_ASTC_10x10_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : extension.COMPRESSED_RGBA_ASTC_10x10_KHR; + if ( p === RGBA_ASTC_12x10_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : extension.COMPRESSED_RGBA_ASTC_12x10_KHR; + if ( p === RGBA_ASTC_12x12_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : extension.COMPRESSED_RGBA_ASTC_12x12_KHR; + + } else { + + return null; + + } + + } + + // BPTC + + if ( p === RGBA_BPTC_Format || p === RGB_BPTC_SIGNED_Format || p === RGB_BPTC_UNSIGNED_Format ) { + + extension = extensions.get( 'EXT_texture_compression_bptc' ); + + if ( extension !== null ) { + + if ( p === RGBA_BPTC_Format ) return ( transfer === SRGBTransfer ) ? extension.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : extension.COMPRESSED_RGBA_BPTC_UNORM_EXT; + if ( p === RGB_BPTC_SIGNED_Format ) return extension.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT; + if ( p === RGB_BPTC_UNSIGNED_Format ) return extension.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT; + + } else { + + return null; + + } + + } + + // RGTC + + if ( p === RED_RGTC1_Format || p === SIGNED_RED_RGTC1_Format || p === RED_GREEN_RGTC2_Format || p === SIGNED_RED_GREEN_RGTC2_Format ) { + + extension = extensions.get( 'EXT_texture_compression_rgtc' ); + + if ( extension !== null ) { + + if ( p === RGBA_BPTC_Format ) return extension.COMPRESSED_RED_RGTC1_EXT; + if ( p === SIGNED_RED_RGTC1_Format ) return extension.COMPRESSED_SIGNED_RED_RGTC1_EXT; + if ( p === RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_RED_GREEN_RGTC2_EXT; + if ( p === SIGNED_RED_GREEN_RGTC2_Format ) return extension.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT; + + } else { + + return null; + + } + + } + + // + + if ( p === UnsignedInt248Type ) return gl.UNSIGNED_INT_24_8; + + // if "p" can't be resolved, assume the user defines a WebGL constant as a string (fallback/workaround for packed RGB formats) + + return ( gl[ p ] !== undefined ) ? gl[ p ] : null; + + } + + return { convert: convert }; + +} + +class ArrayCamera extends PerspectiveCamera { + + constructor( array = [] ) { + + super(); + + this.isArrayCamera = true; + + this.cameras = array; + + } + +} + +class Group extends Object3D { + + constructor() { + + super(); + + this.isGroup = true; + + this.type = 'Group'; + + } + +} + +const _moveEvent = { type: 'move' }; + +class WebXRController { + + constructor() { + + this._targetRay = null; + this._grip = null; + this._hand = null; + + } + + getHandSpace() { + + if ( this._hand === null ) { + + this._hand = new Group(); + this._hand.matrixAutoUpdate = false; + this._hand.visible = false; + + this._hand.joints = {}; + this._hand.inputState = { pinching: false }; + + } + + return this._hand; + + } + + getTargetRaySpace() { + + if ( this._targetRay === null ) { + + this._targetRay = new Group(); + this._targetRay.matrixAutoUpdate = false; + this._targetRay.visible = false; + this._targetRay.hasLinearVelocity = false; + this._targetRay.linearVelocity = new Vector3(); + this._targetRay.hasAngularVelocity = false; + this._targetRay.angularVelocity = new Vector3(); + + } + + return this._targetRay; + + } + + getGripSpace() { + + if ( this._grip === null ) { + + this._grip = new Group(); + this._grip.matrixAutoUpdate = false; + this._grip.visible = false; + this._grip.hasLinearVelocity = false; + this._grip.linearVelocity = new Vector3(); + this._grip.hasAngularVelocity = false; + this._grip.angularVelocity = new Vector3(); + + } + + return this._grip; + + } + + dispatchEvent( event ) { + + if ( this._targetRay !== null ) { + + this._targetRay.dispatchEvent( event ); + + } + + if ( this._grip !== null ) { + + this._grip.dispatchEvent( event ); + + } + + if ( this._hand !== null ) { + + this._hand.dispatchEvent( event ); + + } + + return this; + + } + + connect( inputSource ) { + + if ( inputSource && inputSource.hand ) { + + const hand = this._hand; + + if ( hand ) { + + for ( const inputjoint of inputSource.hand.values() ) { + + // Initialize hand with joints when connected + this._getHandJoint( hand, inputjoint ); + + } + + } + + } + + this.dispatchEvent( { type: 'connected', data: inputSource } ); + + return this; + + } + + disconnect( inputSource ) { + + this.dispatchEvent( { type: 'disconnected', data: inputSource } ); + + if ( this._targetRay !== null ) { + + this._targetRay.visible = false; + + } + + if ( this._grip !== null ) { + + this._grip.visible = false; + + } + + if ( this._hand !== null ) { + + this._hand.visible = false; + + } + + return this; + + } + + update( inputSource, frame, referenceSpace ) { + + let inputPose = null; + let gripPose = null; + let handPose = null; + + const targetRay = this._targetRay; + const grip = this._grip; + const hand = this._hand; + + if ( inputSource && frame.session.visibilityState !== 'visible-blurred' ) { + + if ( hand && inputSource.hand ) { + + handPose = true; + + for ( const inputjoint of inputSource.hand.values() ) { + + // Update the joints groups with the XRJoint poses + const jointPose = frame.getJointPose( inputjoint, referenceSpace ); + + // The transform of this joint will be updated with the joint pose on each frame + const joint = this._getHandJoint( hand, inputjoint ); + + if ( jointPose !== null ) { + + joint.matrix.fromArray( jointPose.transform.matrix ); + joint.matrix.decompose( joint.position, joint.rotation, joint.scale ); + joint.matrixWorldNeedsUpdate = true; + joint.jointRadius = jointPose.radius; + + } + + joint.visible = jointPose !== null; + + } + + // Custom events + + // Check pinchz + const indexTip = hand.joints[ 'index-finger-tip' ]; + const thumbTip = hand.joints[ 'thumb-tip' ]; + const distance = indexTip.position.distanceTo( thumbTip.position ); + + const distanceToPinch = 0.02; + const threshold = 0.005; + + if ( hand.inputState.pinching && distance > distanceToPinch + threshold ) { + + hand.inputState.pinching = false; + this.dispatchEvent( { + type: 'pinchend', + handedness: inputSource.handedness, + target: this + } ); + + } else if ( ! hand.inputState.pinching && distance <= distanceToPinch - threshold ) { + + hand.inputState.pinching = true; + this.dispatchEvent( { + type: 'pinchstart', + handedness: inputSource.handedness, + target: this + } ); + + } + + } else { + + if ( grip !== null && inputSource.gripSpace ) { + + gripPose = frame.getPose( inputSource.gripSpace, referenceSpace ); + + if ( gripPose !== null ) { + + grip.matrix.fromArray( gripPose.transform.matrix ); + grip.matrix.decompose( grip.position, grip.rotation, grip.scale ); + grip.matrixWorldNeedsUpdate = true; + + if ( gripPose.linearVelocity ) { + + grip.hasLinearVelocity = true; + grip.linearVelocity.copy( gripPose.linearVelocity ); + + } else { + + grip.hasLinearVelocity = false; + + } + + if ( gripPose.angularVelocity ) { + + grip.hasAngularVelocity = true; + grip.angularVelocity.copy( gripPose.angularVelocity ); + + } else { + + grip.hasAngularVelocity = false; + + } + + } + + } + + } + + if ( targetRay !== null ) { + + inputPose = frame.getPose( inputSource.targetRaySpace, referenceSpace ); + + // Some runtimes (namely Vive Cosmos with Vive OpenXR Runtime) have only grip space and ray space is equal to it + if ( inputPose === null && gripPose !== null ) { + + inputPose = gripPose; + + } + + if ( inputPose !== null ) { + + targetRay.matrix.fromArray( inputPose.transform.matrix ); + targetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale ); + targetRay.matrixWorldNeedsUpdate = true; + + if ( inputPose.linearVelocity ) { + + targetRay.hasLinearVelocity = true; + targetRay.linearVelocity.copy( inputPose.linearVelocity ); + + } else { + + targetRay.hasLinearVelocity = false; + + } + + if ( inputPose.angularVelocity ) { + + targetRay.hasAngularVelocity = true; + targetRay.angularVelocity.copy( inputPose.angularVelocity ); + + } else { + + targetRay.hasAngularVelocity = false; + + } + + this.dispatchEvent( _moveEvent ); + + } + + } + + + } + + if ( targetRay !== null ) { + + targetRay.visible = ( inputPose !== null ); + + } + + if ( grip !== null ) { + + grip.visible = ( gripPose !== null ); + + } + + if ( hand !== null ) { + + hand.visible = ( handPose !== null ); + + } + + return this; + + } + + // private method + + _getHandJoint( hand, inputjoint ) { + + if ( hand.joints[ inputjoint.jointName ] === undefined ) { + + const joint = new Group(); + joint.matrixAutoUpdate = false; + joint.visible = false; + hand.joints[ inputjoint.jointName ] = joint; + + hand.add( joint ); + + } + + return hand.joints[ inputjoint.jointName ]; + + } + +} + +const _occlusion_vertex = ` +void main() { + + gl_Position = vec4( position, 1.0 ); + +}`; + +const _occlusion_fragment = ` +uniform sampler2DArray depthColor; +uniform float depthWidth; +uniform float depthHeight; + +void main() { + + vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); + + if ( coord.x >= 1.0 ) { + + gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; + + } else { + + gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; + + } + +}`; + +class WebXRDepthSensing { + + constructor() { + + this.texture = null; + this.mesh = null; + + this.depthNear = 0; + this.depthFar = 0; + + } + + init( renderer, depthData, renderState ) { + + if ( this.texture === null ) { + + const texture = new Texture(); + + const texProps = renderer.properties.get( texture ); + texProps.__webglTexture = depthData.texture; + + if ( ( depthData.depthNear != renderState.depthNear ) || ( depthData.depthFar != renderState.depthFar ) ) { + + this.depthNear = depthData.depthNear; + this.depthFar = depthData.depthFar; + + } + + this.texture = texture; + + } + + } + + render( renderer, cameraXR ) { + + if ( this.texture !== null ) { + + if ( this.mesh === null ) { + + const viewport = cameraXR.cameras[ 0 ].viewport; + const material = new ShaderMaterial( { + vertexShader: _occlusion_vertex, + fragmentShader: _occlusion_fragment, + uniforms: { + depthColor: { value: this.texture }, + depthWidth: { value: viewport.z }, + depthHeight: { value: viewport.w } + } + } ); + + this.mesh = new Mesh( new PlaneGeometry( 20, 20 ), material ); + + } + + renderer.render( this.mesh, cameraXR ); + + } + + } + + reset() { + + this.texture = null; + this.mesh = null; + + } + +} + +class WebXRManager extends EventDispatcher { + + constructor( renderer, gl ) { + + super(); + + const scope = this; + + let session = null; + + let framebufferScaleFactor = 1.0; + + let referenceSpace = null; + let referenceSpaceType = 'local-floor'; + // Set default foveation to maximum. + let foveation = 1.0; + let customReferenceSpace = null; + + let pose = null; + let glBinding = null; + let glProjLayer = null; + let glBaseLayer = null; + let xrFrame = null; + + const depthSensing = new WebXRDepthSensing(); + const attributes = gl.getContextAttributes(); + + let initialRenderTarget = null; + let newRenderTarget = null; + + const controllers = []; + const controllerInputSources = []; + + const currentSize = new Vector2(); + let currentPixelRatio = null; + + // + + const cameraL = new PerspectiveCamera(); + cameraL.layers.enable( 1 ); + cameraL.viewport = new Vector4(); + + const cameraR = new PerspectiveCamera(); + cameraR.layers.enable( 2 ); + cameraR.viewport = new Vector4(); + + const cameras = [ cameraL, cameraR ]; + + const cameraXR = new ArrayCamera(); + cameraXR.layers.enable( 1 ); + cameraXR.layers.enable( 2 ); + + let _currentDepthNear = null; + let _currentDepthFar = null; + + // + + this.cameraAutoUpdate = true; + this.enabled = false; + + this.isPresenting = false; + + this.getController = function ( index ) { + + let controller = controllers[ index ]; + + if ( controller === undefined ) { + + controller = new WebXRController(); + controllers[ index ] = controller; + + } + + return controller.getTargetRaySpace(); + + }; + + this.getControllerGrip = function ( index ) { + + let controller = controllers[ index ]; + + if ( controller === undefined ) { + + controller = new WebXRController(); + controllers[ index ] = controller; + + } + + return controller.getGripSpace(); + + }; + + this.getHand = function ( index ) { + + let controller = controllers[ index ]; + + if ( controller === undefined ) { + + controller = new WebXRController(); + controllers[ index ] = controller; + + } + + return controller.getHandSpace(); + + }; + + // + + function onSessionEvent( event ) { + + const controllerIndex = controllerInputSources.indexOf( event.inputSource ); + + if ( controllerIndex === - 1 ) { + + return; + + } + + const controller = controllers[ controllerIndex ]; + + if ( controller !== undefined ) { + + controller.update( event.inputSource, event.frame, customReferenceSpace || referenceSpace ); + controller.dispatchEvent( { type: event.type, data: event.inputSource } ); + + } + + } + + function onSessionEnd() { + + session.removeEventListener( 'select', onSessionEvent ); + session.removeEventListener( 'selectstart', onSessionEvent ); + session.removeEventListener( 'selectend', onSessionEvent ); + session.removeEventListener( 'squeeze', onSessionEvent ); + session.removeEventListener( 'squeezestart', onSessionEvent ); + session.removeEventListener( 'squeezeend', onSessionEvent ); + session.removeEventListener( 'end', onSessionEnd ); + session.removeEventListener( 'inputsourceschange', onInputSourcesChange ); + + for ( let i = 0; i < controllers.length; i ++ ) { + + const inputSource = controllerInputSources[ i ]; + + if ( inputSource === null ) continue; + + controllerInputSources[ i ] = null; + + controllers[ i ].disconnect( inputSource ); + + } + + _currentDepthNear = null; + _currentDepthFar = null; + + depthSensing.reset(); + + // restore framebuffer/rendering state + + renderer.setRenderTarget( initialRenderTarget ); + + glBaseLayer = null; + glProjLayer = null; + glBinding = null; + session = null; + newRenderTarget = null; + + // + + animation.stop(); + + scope.isPresenting = false; + + renderer.setPixelRatio( currentPixelRatio ); + renderer.setSize( currentSize.width, currentSize.height, false ); + + scope.dispatchEvent( { type: 'sessionend' } ); + + } + + this.setFramebufferScaleFactor = function ( value ) { + + framebufferScaleFactor = value; + + if ( scope.isPresenting === true ) { + + console.warn( 'THREE.WebXRManager: Cannot change framebuffer scale while presenting.' ); + + } + + }; + + this.setReferenceSpaceType = function ( value ) { + + referenceSpaceType = value; + + if ( scope.isPresenting === true ) { + + console.warn( 'THREE.WebXRManager: Cannot change reference space type while presenting.' ); + + } + + }; + + this.getReferenceSpace = function () { + + return customReferenceSpace || referenceSpace; + + }; + + this.setReferenceSpace = function ( space ) { + + customReferenceSpace = space; + + }; + + this.getBaseLayer = function () { + + return glProjLayer !== null ? glProjLayer : glBaseLayer; + + }; + + this.getBinding = function () { + + return glBinding; + + }; + + this.getFrame = function () { + + return xrFrame; + + }; + + this.getSession = function () { + + return session; + + }; + + this.setSession = async function ( value ) { + + session = value; + + if ( session !== null ) { + + initialRenderTarget = renderer.getRenderTarget(); + + session.addEventListener( 'select', onSessionEvent ); + session.addEventListener( 'selectstart', onSessionEvent ); + session.addEventListener( 'selectend', onSessionEvent ); + session.addEventListener( 'squeeze', onSessionEvent ); + session.addEventListener( 'squeezestart', onSessionEvent ); + session.addEventListener( 'squeezeend', onSessionEvent ); + session.addEventListener( 'end', onSessionEnd ); + session.addEventListener( 'inputsourceschange', onInputSourcesChange ); + + if ( attributes.xrCompatible !== true ) { + + await gl.makeXRCompatible(); + + } + + currentPixelRatio = renderer.getPixelRatio(); + renderer.getSize( currentSize ); + + if ( session.renderState.layers === undefined ) { + + const layerInit = { + antialias: attributes.antialias, + alpha: true, + depth: attributes.depth, + stencil: attributes.stencil, + framebufferScaleFactor: framebufferScaleFactor + }; + + glBaseLayer = new XRWebGLLayer( session, gl, layerInit ); + + session.updateRenderState( { baseLayer: glBaseLayer } ); + + renderer.setPixelRatio( 1 ); + renderer.setSize( glBaseLayer.framebufferWidth, glBaseLayer.framebufferHeight, false ); + + newRenderTarget = new WebGLRenderTarget( + glBaseLayer.framebufferWidth, + glBaseLayer.framebufferHeight, + { + format: RGBAFormat, + type: UnsignedByteType, + colorSpace: renderer.outputColorSpace, + stencilBuffer: attributes.stencil + } + ); + + } else { + + let depthFormat = null; + let depthType = null; + let glDepthFormat = null; + + if ( attributes.depth ) { + + glDepthFormat = attributes.stencil ? gl.DEPTH24_STENCIL8 : gl.DEPTH_COMPONENT24; + depthFormat = attributes.stencil ? DepthStencilFormat : DepthFormat; + depthType = attributes.stencil ? UnsignedInt248Type : UnsignedIntType; + + } + + const projectionlayerInit = { + colorFormat: gl.RGBA8, + depthFormat: glDepthFormat, + scaleFactor: framebufferScaleFactor + }; + + glBinding = new XRWebGLBinding( session, gl ); + + glProjLayer = glBinding.createProjectionLayer( projectionlayerInit ); + + session.updateRenderState( { layers: [ glProjLayer ] } ); + + renderer.setPixelRatio( 1 ); + renderer.setSize( glProjLayer.textureWidth, glProjLayer.textureHeight, false ); + + newRenderTarget = new WebGLRenderTarget( + glProjLayer.textureWidth, + glProjLayer.textureHeight, + { + format: RGBAFormat, + type: UnsignedByteType, + depthTexture: new DepthTexture( glProjLayer.textureWidth, glProjLayer.textureHeight, depthType, undefined, undefined, undefined, undefined, undefined, undefined, depthFormat ), + stencilBuffer: attributes.stencil, + colorSpace: renderer.outputColorSpace, + samples: attributes.antialias ? 4 : 0, + resolveDepthBuffer: ( glProjLayer.ignoreDepthValues === false ) + } ); + + } + + newRenderTarget.isXRRenderTarget = true; // TODO Remove this when possible, see #23278 + + this.setFoveation( foveation ); + + customReferenceSpace = null; + referenceSpace = await session.requestReferenceSpace( referenceSpaceType ); + + animation.setContext( session ); + animation.start(); + + scope.isPresenting = true; + + scope.dispatchEvent( { type: 'sessionstart' } ); + + } + + }; + + this.getEnvironmentBlendMode = function () { + + if ( session !== null ) { + + return session.environmentBlendMode; + + } + + }; + + function onInputSourcesChange( event ) { + + // Notify disconnected + + for ( let i = 0; i < event.removed.length; i ++ ) { + + const inputSource = event.removed[ i ]; + const index = controllerInputSources.indexOf( inputSource ); + + if ( index >= 0 ) { + + controllerInputSources[ index ] = null; + controllers[ index ].disconnect( inputSource ); + + } + + } + + // Notify connected + + for ( let i = 0; i < event.added.length; i ++ ) { + + const inputSource = event.added[ i ]; + + let controllerIndex = controllerInputSources.indexOf( inputSource ); + + if ( controllerIndex === - 1 ) { + + // Assign input source a controller that currently has no input source + + for ( let i = 0; i < controllers.length; i ++ ) { + + if ( i >= controllerInputSources.length ) { + + controllerInputSources.push( inputSource ); + controllerIndex = i; + break; + + } else if ( controllerInputSources[ i ] === null ) { + + controllerInputSources[ i ] = inputSource; + controllerIndex = i; + break; + + } + + } + + // If all controllers do currently receive input we ignore new ones + + if ( controllerIndex === - 1 ) break; + + } + + const controller = controllers[ controllerIndex ]; + + if ( controller ) { + + controller.connect( inputSource ); + + } + + } + + } + + // + + const cameraLPos = new Vector3(); + const cameraRPos = new Vector3(); + + /** + * Assumes 2 cameras that are parallel and share an X-axis, and that + * the cameras' projection and world matrices have already been set. + * And that near and far planes are identical for both cameras. + * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765 + */ + function setProjectionFromUnion( camera, cameraL, cameraR ) { + + cameraLPos.setFromMatrixPosition( cameraL.matrixWorld ); + cameraRPos.setFromMatrixPosition( cameraR.matrixWorld ); + + const ipd = cameraLPos.distanceTo( cameraRPos ); + + const projL = cameraL.projectionMatrix.elements; + const projR = cameraR.projectionMatrix.elements; + + // VR systems will have identical far and near planes, and + // most likely identical top and bottom frustum extents. + // Use the left camera for these values. + const near = projL[ 14 ] / ( projL[ 10 ] - 1 ); + const far = projL[ 14 ] / ( projL[ 10 ] + 1 ); + const topFov = ( projL[ 9 ] + 1 ) / projL[ 5 ]; + const bottomFov = ( projL[ 9 ] - 1 ) / projL[ 5 ]; + + const leftFov = ( projL[ 8 ] - 1 ) / projL[ 0 ]; + const rightFov = ( projR[ 8 ] + 1 ) / projR[ 0 ]; + const left = near * leftFov; + const right = near * rightFov; + + // Calculate the new camera's position offset from the + // left camera. xOffset should be roughly half `ipd`. + const zOffset = ipd / ( - leftFov + rightFov ); + const xOffset = zOffset * - leftFov; + + // TODO: Better way to apply this offset? + cameraL.matrixWorld.decompose( camera.position, camera.quaternion, camera.scale ); + camera.translateX( xOffset ); + camera.translateZ( zOffset ); + camera.matrixWorld.compose( camera.position, camera.quaternion, camera.scale ); + camera.matrixWorldInverse.copy( camera.matrixWorld ).invert(); + + // Find the union of the frustum values of the cameras and scale + // the values so that the near plane's position does not change in world space, + // although must now be relative to the new union camera. + const near2 = near + zOffset; + const far2 = far + zOffset; + const left2 = left - xOffset; + const right2 = right + ( ipd - xOffset ); + const top2 = topFov * far / far2 * near2; + const bottom2 = bottomFov * far / far2 * near2; + + camera.projectionMatrix.makePerspective( left2, right2, top2, bottom2, near2, far2 ); + camera.projectionMatrixInverse.copy( camera.projectionMatrix ).invert(); + + } + + function updateCamera( camera, parent ) { + + if ( parent === null ) { + + camera.matrixWorld.copy( camera.matrix ); + + } else { + + camera.matrixWorld.multiplyMatrices( parent.matrixWorld, camera.matrix ); + + } + + camera.matrixWorldInverse.copy( camera.matrixWorld ).invert(); + + } + + this.updateCamera = function ( camera ) { + + if ( session === null ) return; + + if ( depthSensing.texture !== null ) { + + camera.near = depthSensing.depthNear; + camera.far = depthSensing.depthFar; + + } + + cameraXR.near = cameraR.near = cameraL.near = camera.near; + cameraXR.far = cameraR.far = cameraL.far = camera.far; + + if ( _currentDepthNear !== cameraXR.near || _currentDepthFar !== cameraXR.far ) { + + // Note that the new renderState won't apply until the next frame. See #18320 + + session.updateRenderState( { + depthNear: cameraXR.near, + depthFar: cameraXR.far + } ); + + _currentDepthNear = cameraXR.near; + _currentDepthFar = cameraXR.far; + + cameraL.near = _currentDepthNear; + cameraL.far = _currentDepthFar; + cameraR.near = _currentDepthNear; + cameraR.far = _currentDepthFar; + + cameraL.updateProjectionMatrix(); + cameraR.updateProjectionMatrix(); + camera.updateProjectionMatrix(); + + } + + const parent = camera.parent; + const cameras = cameraXR.cameras; + + updateCamera( cameraXR, parent ); + + for ( let i = 0; i < cameras.length; i ++ ) { + + updateCamera( cameras[ i ], parent ); + + } + + // update projection matrix for proper view frustum culling + + if ( cameras.length === 2 ) { + + setProjectionFromUnion( cameraXR, cameraL, cameraR ); + + } else { + + // assume single camera setup (AR) + + cameraXR.projectionMatrix.copy( cameraL.projectionMatrix ); + + } + + // update user camera and its children + + updateUserCamera( camera, cameraXR, parent ); + + }; + + function updateUserCamera( camera, cameraXR, parent ) { + + if ( parent === null ) { + + camera.matrix.copy( cameraXR.matrixWorld ); + + } else { + + camera.matrix.copy( parent.matrixWorld ); + camera.matrix.invert(); + camera.matrix.multiply( cameraXR.matrixWorld ); + + } + + camera.matrix.decompose( camera.position, camera.quaternion, camera.scale ); + camera.updateMatrixWorld( true ); + + camera.projectionMatrix.copy( cameraXR.projectionMatrix ); + camera.projectionMatrixInverse.copy( cameraXR.projectionMatrixInverse ); + + if ( camera.isPerspectiveCamera ) { + + camera.fov = RAD2DEG * 2 * Math.atan( 1 / camera.projectionMatrix.elements[ 5 ] ); + camera.zoom = 1; + + } + + } + + this.getCamera = function () { + + return cameraXR; + + }; + + this.getFoveation = function () { + + if ( glProjLayer === null && glBaseLayer === null ) { + + return undefined; + + } + + return foveation; + + }; + + this.setFoveation = function ( value ) { + + // 0 = no foveation = full resolution + // 1 = maximum foveation = the edges render at lower resolution + + foveation = value; + + if ( glProjLayer !== null ) { + + glProjLayer.fixedFoveation = value; + + } + + if ( glBaseLayer !== null && glBaseLayer.fixedFoveation !== undefined ) { + + glBaseLayer.fixedFoveation = value; + + } + + }; + + this.hasDepthSensing = function () { + + return depthSensing.texture !== null; + + }; + + // Animation Loop + + let onAnimationFrameCallback = null; + + function onAnimationFrame( time, frame ) { + + pose = frame.getViewerPose( customReferenceSpace || referenceSpace ); + xrFrame = frame; + + if ( pose !== null ) { + + const views = pose.views; + + if ( glBaseLayer !== null ) { + + renderer.setRenderTargetFramebuffer( newRenderTarget, glBaseLayer.framebuffer ); + renderer.setRenderTarget( newRenderTarget ); + + } + + let cameraXRNeedsUpdate = false; + + // check if it's necessary to rebuild cameraXR's camera list + + if ( views.length !== cameraXR.cameras.length ) { + + cameraXR.cameras.length = 0; + cameraXRNeedsUpdate = true; + + } + + for ( let i = 0; i < views.length; i ++ ) { + + const view = views[ i ]; + + let viewport = null; + + if ( glBaseLayer !== null ) { + + viewport = glBaseLayer.getViewport( view ); + + } else { + + const glSubImage = glBinding.getViewSubImage( glProjLayer, view ); + viewport = glSubImage.viewport; + + // For side-by-side projection, we only produce a single texture for both eyes. + if ( i === 0 ) { + + renderer.setRenderTargetTextures( + newRenderTarget, + glSubImage.colorTexture, + glProjLayer.ignoreDepthValues ? undefined : glSubImage.depthStencilTexture ); + + renderer.setRenderTarget( newRenderTarget ); + + } + + } + + let camera = cameras[ i ]; + + if ( camera === undefined ) { + + camera = new PerspectiveCamera(); + camera.layers.enable( i ); + camera.viewport = new Vector4(); + cameras[ i ] = camera; + + } + + camera.matrix.fromArray( view.transform.matrix ); + camera.matrix.decompose( camera.position, camera.quaternion, camera.scale ); + camera.projectionMatrix.fromArray( view.projectionMatrix ); + camera.projectionMatrixInverse.copy( camera.projectionMatrix ).invert(); + camera.viewport.set( viewport.x, viewport.y, viewport.width, viewport.height ); + + if ( i === 0 ) { + + cameraXR.matrix.copy( camera.matrix ); + cameraXR.matrix.decompose( cameraXR.position, cameraXR.quaternion, cameraXR.scale ); + + } + + if ( cameraXRNeedsUpdate === true ) { + + cameraXR.cameras.push( camera ); + + } + + } + + // + + const enabledFeatures = session.enabledFeatures; + + if ( enabledFeatures && enabledFeatures.includes( 'depth-sensing' ) ) { + + const depthData = glBinding.getDepthInformation( views[ 0 ] ); + + if ( depthData && depthData.isValid && depthData.texture ) { + + depthSensing.init( renderer, depthData, session.renderState ); + + } + + } + + } + + // + + for ( let i = 0; i < controllers.length; i ++ ) { + + const inputSource = controllerInputSources[ i ]; + const controller = controllers[ i ]; + + if ( inputSource !== null && controller !== undefined ) { + + controller.update( inputSource, frame, customReferenceSpace || referenceSpace ); + + } + + } + + depthSensing.render( renderer, cameraXR ); + + if ( onAnimationFrameCallback ) onAnimationFrameCallback( time, frame ); + + if ( frame.detectedPlanes ) { + + scope.dispatchEvent( { type: 'planesdetected', data: frame } ); + + } + + xrFrame = null; + + } + + const animation = new WebGLAnimation(); + + animation.setAnimationLoop( onAnimationFrame ); + + this.setAnimationLoop = function ( callback ) { + + onAnimationFrameCallback = callback; + + }; + + this.dispose = function () {}; + + } + +} + +const _e1 = /*@__PURE__*/ new Euler(); +const _m1 = /*@__PURE__*/ new Matrix4(); + +function WebGLMaterials( renderer, properties ) { + + function refreshTransformUniform( map, uniform ) { + + if ( map.matrixAutoUpdate === true ) { + + map.updateMatrix(); + + } + + uniform.value.copy( map.matrix ); + + } + + function refreshFogUniforms( uniforms, fog ) { + + fog.color.getRGB( uniforms.fogColor.value, getUnlitUniformColorSpace( renderer ) ); + + if ( fog.isFog ) { + + uniforms.fogNear.value = fog.near; + uniforms.fogFar.value = fog.far; + + } else if ( fog.isFogExp2 ) { + + uniforms.fogDensity.value = fog.density; + + } + + } + + function refreshMaterialUniforms( uniforms, material, pixelRatio, height, transmissionRenderTarget ) { + + if ( material.isMeshBasicMaterial ) { + + refreshUniformsCommon( uniforms, material ); + + } else if ( material.isMeshLambertMaterial ) { + + refreshUniformsCommon( uniforms, material ); + + } else if ( material.isMeshToonMaterial ) { + + refreshUniformsCommon( uniforms, material ); + refreshUniformsToon( uniforms, material ); + + } else if ( material.isMeshPhongMaterial ) { + + refreshUniformsCommon( uniforms, material ); + refreshUniformsPhong( uniforms, material ); + + } else if ( material.isMeshStandardMaterial ) { + + refreshUniformsCommon( uniforms, material ); + refreshUniformsStandard( uniforms, material ); + + if ( material.isMeshPhysicalMaterial ) { + + refreshUniformsPhysical( uniforms, material, transmissionRenderTarget ); + + } + + } else if ( material.isMeshMatcapMaterial ) { + + refreshUniformsCommon( uniforms, material ); + refreshUniformsMatcap( uniforms, material ); + + } else if ( material.isMeshDepthMaterial ) { + + refreshUniformsCommon( uniforms, material ); + + } else if ( material.isMeshDistanceMaterial ) { + + refreshUniformsCommon( uniforms, material ); + refreshUniformsDistance( uniforms, material ); + + } else if ( material.isMeshNormalMaterial ) { + + refreshUniformsCommon( uniforms, material ); + + } else if ( material.isLineBasicMaterial ) { + + refreshUniformsLine( uniforms, material ); + + if ( material.isLineDashedMaterial ) { + + refreshUniformsDash( uniforms, material ); + + } + + } else if ( material.isPointsMaterial ) { + + refreshUniformsPoints( uniforms, material, pixelRatio, height ); + + } else if ( material.isSpriteMaterial ) { + + refreshUniformsSprites( uniforms, material ); + + } else if ( material.isShadowMaterial ) { + + uniforms.color.value.copy( material.color ); + uniforms.opacity.value = material.opacity; + + } else if ( material.isShaderMaterial ) { + + material.uniformsNeedUpdate = false; // #15581 + + } + + } + + function refreshUniformsCommon( uniforms, material ) { + + uniforms.opacity.value = material.opacity; + + if ( material.color ) { + + uniforms.diffuse.value.copy( material.color ); + + } + + if ( material.emissive ) { + + uniforms.emissive.value.copy( material.emissive ).multiplyScalar( material.emissiveIntensity ); + + } + + if ( material.map ) { + + uniforms.map.value = material.map; + + refreshTransformUniform( material.map, uniforms.mapTransform ); + + } + + if ( material.alphaMap ) { + + uniforms.alphaMap.value = material.alphaMap; + + refreshTransformUniform( material.alphaMap, uniforms.alphaMapTransform ); + + } + + if ( material.bumpMap ) { + + uniforms.bumpMap.value = material.bumpMap; + + refreshTransformUniform( material.bumpMap, uniforms.bumpMapTransform ); + + uniforms.bumpScale.value = material.bumpScale; + + if ( material.side === BackSide ) { + + uniforms.bumpScale.value *= - 1; + + } + + } + + if ( material.normalMap ) { + + uniforms.normalMap.value = material.normalMap; + + refreshTransformUniform( material.normalMap, uniforms.normalMapTransform ); + + uniforms.normalScale.value.copy( material.normalScale ); + + if ( material.side === BackSide ) { + + uniforms.normalScale.value.negate(); + + } + + } + + if ( material.displacementMap ) { + + uniforms.displacementMap.value = material.displacementMap; + + refreshTransformUniform( material.displacementMap, uniforms.displacementMapTransform ); + + uniforms.displacementScale.value = material.displacementScale; + uniforms.displacementBias.value = material.displacementBias; + + } + + if ( material.emissiveMap ) { + + uniforms.emissiveMap.value = material.emissiveMap; + + refreshTransformUniform( material.emissiveMap, uniforms.emissiveMapTransform ); + + } + + if ( material.specularMap ) { + + uniforms.specularMap.value = material.specularMap; + + refreshTransformUniform( material.specularMap, uniforms.specularMapTransform ); + + } + + if ( material.alphaTest > 0 ) { + + uniforms.alphaTest.value = material.alphaTest; + + } + + const materialProperties = properties.get( material ); + + const envMap = materialProperties.envMap; + const envMapRotation = materialProperties.envMapRotation; + + if ( envMap ) { + + uniforms.envMap.value = envMap; + + _e1.copy( envMapRotation ); + + // accommodate left-handed frame + _e1.x *= - 1; _e1.y *= - 1; _e1.z *= - 1; + + if ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) { + + // environment maps which are not cube render targets or PMREMs follow a different convention + _e1.y *= - 1; + _e1.z *= - 1; + + } + + uniforms.envMapRotation.value.setFromMatrix4( _m1.makeRotationFromEuler( _e1 ) ); + + uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? - 1 : 1; + + uniforms.reflectivity.value = material.reflectivity; + uniforms.ior.value = material.ior; + uniforms.refractionRatio.value = material.refractionRatio; + + } + + if ( material.lightMap ) { + + uniforms.lightMap.value = material.lightMap; + + // artist-friendly light intensity scaling factor + const scaleFactor = ( renderer._useLegacyLights === true ) ? Math.PI : 1; + + uniforms.lightMapIntensity.value = material.lightMapIntensity * scaleFactor; + + refreshTransformUniform( material.lightMap, uniforms.lightMapTransform ); + + } + + if ( material.aoMap ) { + + uniforms.aoMap.value = material.aoMap; + uniforms.aoMapIntensity.value = material.aoMapIntensity; + + refreshTransformUniform( material.aoMap, uniforms.aoMapTransform ); + + } + + } + + function refreshUniformsLine( uniforms, material ) { + + uniforms.diffuse.value.copy( material.color ); + uniforms.opacity.value = material.opacity; + + if ( material.map ) { + + uniforms.map.value = material.map; + + refreshTransformUniform( material.map, uniforms.mapTransform ); + + } + + } + + function refreshUniformsDash( uniforms, material ) { + + uniforms.dashSize.value = material.dashSize; + uniforms.totalSize.value = material.dashSize + material.gapSize; + uniforms.scale.value = material.scale; + + } + + function refreshUniformsPoints( uniforms, material, pixelRatio, height ) { + + uniforms.diffuse.value.copy( material.color ); + uniforms.opacity.value = material.opacity; + uniforms.size.value = material.size * pixelRatio; + uniforms.scale.value = height * 0.5; + + if ( material.map ) { + + uniforms.map.value = material.map; + + refreshTransformUniform( material.map, uniforms.uvTransform ); + + } + + if ( material.alphaMap ) { + + uniforms.alphaMap.value = material.alphaMap; + + refreshTransformUniform( material.alphaMap, uniforms.alphaMapTransform ); + + } + + if ( material.alphaTest > 0 ) { + + uniforms.alphaTest.value = material.alphaTest; + + } + + } + + function refreshUniformsSprites( uniforms, material ) { + + uniforms.diffuse.value.copy( material.color ); + uniforms.opacity.value = material.opacity; + uniforms.rotation.value = material.rotation; + + if ( material.map ) { + + uniforms.map.value = material.map; + + refreshTransformUniform( material.map, uniforms.mapTransform ); + + } + + if ( material.alphaMap ) { + + uniforms.alphaMap.value = material.alphaMap; + + refreshTransformUniform( material.alphaMap, uniforms.alphaMapTransform ); + + } + + if ( material.alphaTest > 0 ) { + + uniforms.alphaTest.value = material.alphaTest; + + } + + } + + function refreshUniformsPhong( uniforms, material ) { + + uniforms.specular.value.copy( material.specular ); + uniforms.shininess.value = Math.max( material.shininess, 1e-4 ); // to prevent pow( 0.0, 0.0 ) + + } + + function refreshUniformsToon( uniforms, material ) { + + if ( material.gradientMap ) { + + uniforms.gradientMap.value = material.gradientMap; + + } + + } + + function refreshUniformsStandard( uniforms, material ) { + + uniforms.metalness.value = material.metalness; + + if ( material.metalnessMap ) { + + uniforms.metalnessMap.value = material.metalnessMap; + + refreshTransformUniform( material.metalnessMap, uniforms.metalnessMapTransform ); + + } + + uniforms.roughness.value = material.roughness; + + if ( material.roughnessMap ) { + + uniforms.roughnessMap.value = material.roughnessMap; + + refreshTransformUniform( material.roughnessMap, uniforms.roughnessMapTransform ); + + } + + if ( material.envMap ) { + + //uniforms.envMap.value = material.envMap; // part of uniforms common + + uniforms.envMapIntensity.value = material.envMapIntensity; + + } + + } + + function refreshUniformsPhysical( uniforms, material, transmissionRenderTarget ) { + + uniforms.ior.value = material.ior; // also part of uniforms common + + if ( material.sheen > 0 ) { + + uniforms.sheenColor.value.copy( material.sheenColor ).multiplyScalar( material.sheen ); + + uniforms.sheenRoughness.value = material.sheenRoughness; + + if ( material.sheenColorMap ) { + + uniforms.sheenColorMap.value = material.sheenColorMap; + + refreshTransformUniform( material.sheenColorMap, uniforms.sheenColorMapTransform ); + + } + + if ( material.sheenRoughnessMap ) { + + uniforms.sheenRoughnessMap.value = material.sheenRoughnessMap; + + refreshTransformUniform( material.sheenRoughnessMap, uniforms.sheenRoughnessMapTransform ); + + } + + } + + if ( material.clearcoat > 0 ) { + + uniforms.clearcoat.value = material.clearcoat; + uniforms.clearcoatRoughness.value = material.clearcoatRoughness; + + if ( material.clearcoatMap ) { + + uniforms.clearcoatMap.value = material.clearcoatMap; + + refreshTransformUniform( material.clearcoatMap, uniforms.clearcoatMapTransform ); + + } + + if ( material.clearcoatRoughnessMap ) { + + uniforms.clearcoatRoughnessMap.value = material.clearcoatRoughnessMap; + + refreshTransformUniform( material.clearcoatRoughnessMap, uniforms.clearcoatRoughnessMapTransform ); + + } + + if ( material.clearcoatNormalMap ) { + + uniforms.clearcoatNormalMap.value = material.clearcoatNormalMap; + + refreshTransformUniform( material.clearcoatNormalMap, uniforms.clearcoatNormalMapTransform ); + + uniforms.clearcoatNormalScale.value.copy( material.clearcoatNormalScale ); + + if ( material.side === BackSide ) { + + uniforms.clearcoatNormalScale.value.negate(); + + } + + } + + } + + if ( material.dispersion > 0 ) { + + uniforms.dispersion.value = material.dispersion; + + } + + if ( material.iridescence > 0 ) { + + uniforms.iridescence.value = material.iridescence; + uniforms.iridescenceIOR.value = material.iridescenceIOR; + uniforms.iridescenceThicknessMinimum.value = material.iridescenceThicknessRange[ 0 ]; + uniforms.iridescenceThicknessMaximum.value = material.iridescenceThicknessRange[ 1 ]; + + if ( material.iridescenceMap ) { + + uniforms.iridescenceMap.value = material.iridescenceMap; + + refreshTransformUniform( material.iridescenceMap, uniforms.iridescenceMapTransform ); + + } + + if ( material.iridescenceThicknessMap ) { + + uniforms.iridescenceThicknessMap.value = material.iridescenceThicknessMap; + + refreshTransformUniform( material.iridescenceThicknessMap, uniforms.iridescenceThicknessMapTransform ); + + } + + } + + if ( material.transmission > 0 ) { + + uniforms.transmission.value = material.transmission; + uniforms.transmissionSamplerMap.value = transmissionRenderTarget.texture; + uniforms.transmissionSamplerSize.value.set( transmissionRenderTarget.width, transmissionRenderTarget.height ); + + if ( material.transmissionMap ) { + + uniforms.transmissionMap.value = material.transmissionMap; + + refreshTransformUniform( material.transmissionMap, uniforms.transmissionMapTransform ); + + } + + uniforms.thickness.value = material.thickness; + + if ( material.thicknessMap ) { + + uniforms.thicknessMap.value = material.thicknessMap; + + refreshTransformUniform( material.thicknessMap, uniforms.thicknessMapTransform ); + + } + + uniforms.attenuationDistance.value = material.attenuationDistance; + uniforms.attenuationColor.value.copy( material.attenuationColor ); + + } + + if ( material.anisotropy > 0 ) { + + uniforms.anisotropyVector.value.set( material.anisotropy * Math.cos( material.anisotropyRotation ), material.anisotropy * Math.sin( material.anisotropyRotation ) ); + + if ( material.anisotropyMap ) { + + uniforms.anisotropyMap.value = material.anisotropyMap; + + refreshTransformUniform( material.anisotropyMap, uniforms.anisotropyMapTransform ); + + } + + } + + uniforms.specularIntensity.value = material.specularIntensity; + uniforms.specularColor.value.copy( material.specularColor ); + + if ( material.specularColorMap ) { + + uniforms.specularColorMap.value = material.specularColorMap; + + refreshTransformUniform( material.specularColorMap, uniforms.specularColorMapTransform ); + + } + + if ( material.specularIntensityMap ) { + + uniforms.specularIntensityMap.value = material.specularIntensityMap; + + refreshTransformUniform( material.specularIntensityMap, uniforms.specularIntensityMapTransform ); + + } + + } + + function refreshUniformsMatcap( uniforms, material ) { + + if ( material.matcap ) { + + uniforms.matcap.value = material.matcap; + + } + + } + + function refreshUniformsDistance( uniforms, material ) { + + const light = properties.get( material ).light; + + uniforms.referencePosition.value.setFromMatrixPosition( light.matrixWorld ); + uniforms.nearDistance.value = light.shadow.camera.near; + uniforms.farDistance.value = light.shadow.camera.far; + + } + + return { + refreshFogUniforms: refreshFogUniforms, + refreshMaterialUniforms: refreshMaterialUniforms + }; + +} + +function WebGLUniformsGroups( gl, info, capabilities, state ) { + + let buffers = {}; + let updateList = {}; + let allocatedBindingPoints = []; + + const maxBindingPoints = gl.getParameter( gl.MAX_UNIFORM_BUFFER_BINDINGS ); // binding points are global whereas block indices are per shader program + + function bind( uniformsGroup, program ) { + + const webglProgram = program.program; + state.uniformBlockBinding( uniformsGroup, webglProgram ); + + } + + function update( uniformsGroup, program ) { + + let buffer = buffers[ uniformsGroup.id ]; + + if ( buffer === undefined ) { + + prepareUniformsGroup( uniformsGroup ); + + buffer = createBuffer( uniformsGroup ); + buffers[ uniformsGroup.id ] = buffer; + + uniformsGroup.addEventListener( 'dispose', onUniformsGroupsDispose ); + + } + + // ensure to update the binding points/block indices mapping for this program + + const webglProgram = program.program; + state.updateUBOMapping( uniformsGroup, webglProgram ); + + // update UBO once per frame + + const frame = info.render.frame; + + if ( updateList[ uniformsGroup.id ] !== frame ) { + + updateBufferData( uniformsGroup ); + + updateList[ uniformsGroup.id ] = frame; + + } + + } + + function createBuffer( uniformsGroup ) { + + // the setup of an UBO is independent of a particular shader program but global + + const bindingPointIndex = allocateBindingPointIndex(); + uniformsGroup.__bindingPointIndex = bindingPointIndex; + + const buffer = gl.createBuffer(); + const size = uniformsGroup.__size; + const usage = uniformsGroup.usage; + + gl.bindBuffer( gl.UNIFORM_BUFFER, buffer ); + gl.bufferData( gl.UNIFORM_BUFFER, size, usage ); + gl.bindBuffer( gl.UNIFORM_BUFFER, null ); + gl.bindBufferBase( gl.UNIFORM_BUFFER, bindingPointIndex, buffer ); + + return buffer; + + } + + function allocateBindingPointIndex() { + + for ( let i = 0; i < maxBindingPoints; i ++ ) { + + if ( allocatedBindingPoints.indexOf( i ) === - 1 ) { + + allocatedBindingPoints.push( i ); + return i; + + } + + } + + console.error( 'THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached.' ); + + return 0; + + } + + function updateBufferData( uniformsGroup ) { + + const buffer = buffers[ uniformsGroup.id ]; + const uniforms = uniformsGroup.uniforms; + const cache = uniformsGroup.__cache; + + gl.bindBuffer( gl.UNIFORM_BUFFER, buffer ); + + for ( let i = 0, il = uniforms.length; i < il; i ++ ) { + + const uniformArray = Array.isArray( uniforms[ i ] ) ? uniforms[ i ] : [ uniforms[ i ] ]; + + for ( let j = 0, jl = uniformArray.length; j < jl; j ++ ) { + + const uniform = uniformArray[ j ]; + + if ( hasUniformChanged( uniform, i, j, cache ) === true ) { + + const offset = uniform.__offset; + + const values = Array.isArray( uniform.value ) ? uniform.value : [ uniform.value ]; + + let arrayOffset = 0; + + for ( let k = 0; k < values.length; k ++ ) { + + const value = values[ k ]; + + const info = getUniformSize( value ); + + // TODO add integer and struct support + if ( typeof value === 'number' || typeof value === 'boolean' ) { + + uniform.__data[ 0 ] = value; + gl.bufferSubData( gl.UNIFORM_BUFFER, offset + arrayOffset, uniform.__data ); + + } else if ( value.isMatrix3 ) { + + // manually converting 3x3 to 3x4 + + uniform.__data[ 0 ] = value.elements[ 0 ]; + uniform.__data[ 1 ] = value.elements[ 1 ]; + uniform.__data[ 2 ] = value.elements[ 2 ]; + uniform.__data[ 3 ] = 0; + uniform.__data[ 4 ] = value.elements[ 3 ]; + uniform.__data[ 5 ] = value.elements[ 4 ]; + uniform.__data[ 6 ] = value.elements[ 5 ]; + uniform.__data[ 7 ] = 0; + uniform.__data[ 8 ] = value.elements[ 6 ]; + uniform.__data[ 9 ] = value.elements[ 7 ]; + uniform.__data[ 10 ] = value.elements[ 8 ]; + uniform.__data[ 11 ] = 0; + + } else { + + value.toArray( uniform.__data, arrayOffset ); + + arrayOffset += info.storage / Float32Array.BYTES_PER_ELEMENT; + + } + + } + + gl.bufferSubData( gl.UNIFORM_BUFFER, offset, uniform.__data ); + + } + + } + + } + + gl.bindBuffer( gl.UNIFORM_BUFFER, null ); + + } + + function hasUniformChanged( uniform, index, indexArray, cache ) { + + const value = uniform.value; + const indexString = index + '_' + indexArray; + + if ( cache[ indexString ] === undefined ) { + + // cache entry does not exist so far + + if ( typeof value === 'number' || typeof value === 'boolean' ) { + + cache[ indexString ] = value; + + } else { + + cache[ indexString ] = value.clone(); + + } + + return true; + + } else { + + const cachedObject = cache[ indexString ]; + + // compare current value with cached entry + + if ( typeof value === 'number' || typeof value === 'boolean' ) { + + if ( cachedObject !== value ) { + + cache[ indexString ] = value; + return true; + + } + + } else { + + if ( cachedObject.equals( value ) === false ) { + + cachedObject.copy( value ); + return true; + + } + + } + + } + + return false; + + } + + function prepareUniformsGroup( uniformsGroup ) { + + // determine total buffer size according to the STD140 layout + // Hint: STD140 is the only supported layout in WebGL 2 + + const uniforms = uniformsGroup.uniforms; + + let offset = 0; // global buffer offset in bytes + const chunkSize = 16; // size of a chunk in bytes + + for ( let i = 0, l = uniforms.length; i < l; i ++ ) { + + const uniformArray = Array.isArray( uniforms[ i ] ) ? uniforms[ i ] : [ uniforms[ i ] ]; + + for ( let j = 0, jl = uniformArray.length; j < jl; j ++ ) { + + const uniform = uniformArray[ j ]; + + const values = Array.isArray( uniform.value ) ? uniform.value : [ uniform.value ]; + + for ( let k = 0, kl = values.length; k < kl; k ++ ) { + + const value = values[ k ]; + + const info = getUniformSize( value ); + + // Calculate the chunk offset + const chunkOffsetUniform = offset % chunkSize; + + // Check for chunk overflow + if ( chunkOffsetUniform !== 0 && ( chunkSize - chunkOffsetUniform ) < info.boundary ) { + + // Add padding and adjust offset + offset += ( chunkSize - chunkOffsetUniform ); + + } + + // the following two properties will be used for partial buffer updates + + uniform.__data = new Float32Array( info.storage / Float32Array.BYTES_PER_ELEMENT ); + uniform.__offset = offset; + + + // Update the global offset + offset += info.storage; + + + } + + } + + } + + // ensure correct final padding + + const chunkOffset = offset % chunkSize; + + if ( chunkOffset > 0 ) offset += ( chunkSize - chunkOffset ); + + // + + uniformsGroup.__size = offset; + uniformsGroup.__cache = {}; + + return this; + + } + + function getUniformSize( value ) { + + const info = { + boundary: 0, // bytes + storage: 0 // bytes + }; + + // determine sizes according to STD140 + + if ( typeof value === 'number' || typeof value === 'boolean' ) { + + // float/int/bool + + info.boundary = 4; + info.storage = 4; + + } else if ( value.isVector2 ) { + + // vec2 + + info.boundary = 8; + info.storage = 8; + + } else if ( value.isVector3 || value.isColor ) { + + // vec3 + + info.boundary = 16; + info.storage = 12; // evil: vec3 must start on a 16-byte boundary but it only consumes 12 bytes + + } else if ( value.isVector4 ) { + + // vec4 + + info.boundary = 16; + info.storage = 16; + + } else if ( value.isMatrix3 ) { + + // mat3 (in STD140 a 3x3 matrix is represented as 3x4) + + info.boundary = 48; + info.storage = 48; + + } else if ( value.isMatrix4 ) { + + // mat4 + + info.boundary = 64; + info.storage = 64; + + } else if ( value.isTexture ) { + + console.warn( 'THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group.' ); + + } else { + + console.warn( 'THREE.WebGLRenderer: Unsupported uniform value type.', value ); + + } + + return info; + + } + + function onUniformsGroupsDispose( event ) { + + const uniformsGroup = event.target; + + uniformsGroup.removeEventListener( 'dispose', onUniformsGroupsDispose ); + + const index = allocatedBindingPoints.indexOf( uniformsGroup.__bindingPointIndex ); + allocatedBindingPoints.splice( index, 1 ); + + gl.deleteBuffer( buffers[ uniformsGroup.id ] ); + + delete buffers[ uniformsGroup.id ]; + delete updateList[ uniformsGroup.id ]; + + } + + function dispose() { + + for ( const id in buffers ) { + + gl.deleteBuffer( buffers[ id ] ); + + } + + allocatedBindingPoints = []; + buffers = {}; + updateList = {}; + + } + + return { + + bind: bind, + update: update, + + dispose: dispose + + }; + +} + +class WebGLRenderer { + + constructor( parameters = {} ) { + + const { + canvas = createCanvasElement(), + context = null, + depth = true, + stencil = false, + alpha = false, + antialias = false, + premultipliedAlpha = true, + preserveDrawingBuffer = false, + powerPreference = 'default', + failIfMajorPerformanceCaveat = false, + } = parameters; + + this.isWebGLRenderer = true; + + let _alpha; + + if ( context !== null ) { + + if ( typeof WebGLRenderingContext !== 'undefined' && context instanceof WebGLRenderingContext ) { + + throw new Error( 'THREE.WebGLRenderer: WebGL 1 is not supported since r163.' ); + + } + + _alpha = context.getContextAttributes().alpha; + + } else { + + _alpha = alpha; + + } + + const uintClearColor = new Uint32Array( 4 ); + const intClearColor = new Int32Array( 4 ); + + let currentRenderList = null; + let currentRenderState = null; + + // render() can be called from within a callback triggered by another render. + // We track this so that the nested render call gets its list and state isolated from the parent render call. + + const renderListStack = []; + const renderStateStack = []; + + // public properties + + this.domElement = canvas; + + // Debug configuration container + this.debug = { + + /** + * Enables error checking and reporting when shader programs are being compiled + * @type {boolean} + */ + checkShaderErrors: true, + /** + * Callback for custom error reporting. + * @type {?Function} + */ + onShaderError: null + }; + + // clearing + + this.autoClear = true; + this.autoClearColor = true; + this.autoClearDepth = true; + this.autoClearStencil = true; + + // scene graph + + this.sortObjects = true; + + // user-defined clipping + + this.clippingPlanes = []; + this.localClippingEnabled = false; + + // physically based shading + + this._outputColorSpace = SRGBColorSpace; + + // physical lights + + this._useLegacyLights = false; + + // tone mapping + + this.toneMapping = NoToneMapping; + this.toneMappingExposure = 1.0; + + // internal properties + + const _this = this; + + let _isContextLost = false; + + // internal state cache + + let _currentActiveCubeFace = 0; + let _currentActiveMipmapLevel = 0; + let _currentRenderTarget = null; + let _currentMaterialId = - 1; + + let _currentCamera = null; + + const _currentViewport = new Vector4(); + const _currentScissor = new Vector4(); + let _currentScissorTest = null; + + const _currentClearColor = new Color( 0x000000 ); + let _currentClearAlpha = 0; + + // + + let _width = canvas.width; + let _height = canvas.height; + + let _pixelRatio = 1; + let _opaqueSort = null; + let _transparentSort = null; + + const _viewport = new Vector4( 0, 0, _width, _height ); + const _scissor = new Vector4( 0, 0, _width, _height ); + let _scissorTest = false; + + // frustum + + const _frustum = new Frustum(); + + // clipping + + let _clippingEnabled = false; + let _localClippingEnabled = false; + + // camera matrices cache + + const _projScreenMatrix = new Matrix4(); + + const _vector3 = new Vector3(); + + const _emptyScene = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true }; + + function getTargetPixelRatio() { + + return _currentRenderTarget === null ? _pixelRatio : 1; + + } + + // initialize + + let _gl = context; + + function getContext( contextName, contextAttributes ) { + + return canvas.getContext( contextName, contextAttributes ); + + } + + try { + + const contextAttributes = { + alpha: true, + depth, + stencil, + antialias, + premultipliedAlpha, + preserveDrawingBuffer, + powerPreference, + failIfMajorPerformanceCaveat, + }; + + // OffscreenCanvas does not have setAttribute, see #22811 + if ( 'setAttribute' in canvas ) canvas.setAttribute( 'data-engine', `three.js r${REVISION}` ); + + // event listeners must be registered before WebGL context is created, see #12753 + canvas.addEventListener( 'webglcontextlost', onContextLost, false ); + canvas.addEventListener( 'webglcontextrestored', onContextRestore, false ); + canvas.addEventListener( 'webglcontextcreationerror', onContextCreationError, false ); + + if ( _gl === null ) { + + const contextName = 'webgl2'; + + _gl = getContext( contextName, contextAttributes ); + + if ( _gl === null ) { + + if ( getContext( contextName ) ) { + + throw new Error( 'Error creating WebGL context with your selected attributes.' ); + + } else { + + throw new Error( 'Error creating WebGL context.' ); + + } + + } + + } + + } catch ( error ) { + + console.error( 'THREE.WebGLRenderer: ' + error.message ); + throw error; + + } + + let extensions, capabilities, state, info; + let properties, textures, cubemaps, cubeuvmaps, attributes, geometries, objects; + let programCache, materials, renderLists, renderStates, clipping, shadowMap; + + let background, morphtargets, bufferRenderer, indexedBufferRenderer; + + let utils, bindingStates, uniformsGroups; + + function initGLContext() { + + extensions = new WebGLExtensions( _gl ); + extensions.init(); + + utils = new WebGLUtils( _gl, extensions ); + + capabilities = new WebGLCapabilities( _gl, extensions, parameters, utils ); + + state = new WebGLState( _gl ); + + info = new WebGLInfo( _gl ); + properties = new WebGLProperties(); + textures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info ); + cubemaps = new WebGLCubeMaps( _this ); + cubeuvmaps = new WebGLCubeUVMaps( _this ); + attributes = new WebGLAttributes( _gl ); + bindingStates = new WebGLBindingStates( _gl, attributes ); + geometries = new WebGLGeometries( _gl, attributes, info, bindingStates ); + objects = new WebGLObjects( _gl, geometries, attributes, info ); + morphtargets = new WebGLMorphtargets( _gl, capabilities, textures ); + clipping = new WebGLClipping( properties ); + programCache = new WebGLPrograms( _this, cubemaps, cubeuvmaps, extensions, capabilities, bindingStates, clipping ); + materials = new WebGLMaterials( _this, properties ); + renderLists = new WebGLRenderLists(); + renderStates = new WebGLRenderStates( extensions ); + background = new WebGLBackground( _this, cubemaps, cubeuvmaps, state, objects, _alpha, premultipliedAlpha ); + shadowMap = new WebGLShadowMap( _this, objects, capabilities ); + uniformsGroups = new WebGLUniformsGroups( _gl, info, capabilities, state ); + + bufferRenderer = new WebGLBufferRenderer( _gl, extensions, info ); + indexedBufferRenderer = new WebGLIndexedBufferRenderer( _gl, extensions, info ); + + info.programs = programCache.programs; + + _this.capabilities = capabilities; + _this.extensions = extensions; + _this.properties = properties; + _this.renderLists = renderLists; + _this.shadowMap = shadowMap; + _this.state = state; + _this.info = info; + + } + + initGLContext(); + + // xr + + const xr = new WebXRManager( _this, _gl ); + + this.xr = xr; + + // API + + this.getContext = function () { + + return _gl; + + }; + + this.getContextAttributes = function () { + + return _gl.getContextAttributes(); + + }; + + this.forceContextLoss = function () { + + const extension = extensions.get( 'WEBGL_lose_context' ); + if ( extension ) extension.loseContext(); + + }; + + this.forceContextRestore = function () { + + const extension = extensions.get( 'WEBGL_lose_context' ); + if ( extension ) extension.restoreContext(); + + }; + + this.getPixelRatio = function () { + + return _pixelRatio; + + }; + + this.setPixelRatio = function ( value ) { + + if ( value === undefined ) return; + + _pixelRatio = value; + + this.setSize( _width, _height, false ); + + }; + + this.getSize = function ( target ) { + + return target.set( _width, _height ); + + }; + + this.setSize = function ( width, height, updateStyle = true ) { + + if ( xr.isPresenting ) { + + console.warn( 'THREE.WebGLRenderer: Can\'t change size while VR device is presenting.' ); + return; + + } + + _width = width; + _height = height; + + canvas.width = Math.floor( width * _pixelRatio ); + canvas.height = Math.floor( height * _pixelRatio ); + + if ( updateStyle === true ) { + + canvas.style.width = width + 'px'; + canvas.style.height = height + 'px'; + + } + + this.setViewport( 0, 0, width, height ); + + }; + + this.getDrawingBufferSize = function ( target ) { + + return target.set( _width * _pixelRatio, _height * _pixelRatio ).floor(); + + }; + + this.setDrawingBufferSize = function ( width, height, pixelRatio ) { + + _width = width; + _height = height; + + _pixelRatio = pixelRatio; + + canvas.width = Math.floor( width * pixelRatio ); + canvas.height = Math.floor( height * pixelRatio ); + + this.setViewport( 0, 0, width, height ); + + }; + + this.getCurrentViewport = function ( target ) { + + return target.copy( _currentViewport ); + + }; + + this.getViewport = function ( target ) { + + return target.copy( _viewport ); + + }; + + this.setViewport = function ( x, y, width, height ) { + + if ( x.isVector4 ) { + + _viewport.set( x.x, x.y, x.z, x.w ); + + } else { + + _viewport.set( x, y, width, height ); + + } + + state.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).round() ); + + }; + + this.getScissor = function ( target ) { + + return target.copy( _scissor ); + + }; + + this.setScissor = function ( x, y, width, height ) { + + if ( x.isVector4 ) { + + _scissor.set( x.x, x.y, x.z, x.w ); + + } else { + + _scissor.set( x, y, width, height ); + + } + + state.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).round() ); + + }; + + this.getScissorTest = function () { + + return _scissorTest; + + }; + + this.setScissorTest = function ( boolean ) { + + state.setScissorTest( _scissorTest = boolean ); + + }; + + this.setOpaqueSort = function ( method ) { + + _opaqueSort = method; + + }; + + this.setTransparentSort = function ( method ) { + + _transparentSort = method; + + }; + + // Clearing + + this.getClearColor = function ( target ) { + + return target.copy( background.getClearColor() ); + + }; + + this.setClearColor = function () { + + background.setClearColor.apply( background, arguments ); + + }; + + this.getClearAlpha = function () { + + return background.getClearAlpha(); + + }; + + this.setClearAlpha = function () { + + background.setClearAlpha.apply( background, arguments ); + + }; + + this.clear = function ( color = true, depth = true, stencil = true ) { + + let bits = 0; + + if ( color ) { + + // check if we're trying to clear an integer target + let isIntegerFormat = false; + if ( _currentRenderTarget !== null ) { + + const targetFormat = _currentRenderTarget.texture.format; + isIntegerFormat = targetFormat === RGBAIntegerFormat || + targetFormat === RGIntegerFormat || + targetFormat === RedIntegerFormat; + + } + + // use the appropriate clear functions to clear the target if it's a signed + // or unsigned integer target + if ( isIntegerFormat ) { + + const targetType = _currentRenderTarget.texture.type; + const isUnsignedType = targetType === UnsignedByteType || + targetType === UnsignedIntType || + targetType === UnsignedShortType || + targetType === UnsignedInt248Type || + targetType === UnsignedShort4444Type || + targetType === UnsignedShort5551Type; + + const clearColor = background.getClearColor(); + const a = background.getClearAlpha(); + const r = clearColor.r; + const g = clearColor.g; + const b = clearColor.b; + + if ( isUnsignedType ) { + + uintClearColor[ 0 ] = r; + uintClearColor[ 1 ] = g; + uintClearColor[ 2 ] = b; + uintClearColor[ 3 ] = a; + _gl.clearBufferuiv( _gl.COLOR, 0, uintClearColor ); + + } else { + + intClearColor[ 0 ] = r; + intClearColor[ 1 ] = g; + intClearColor[ 2 ] = b; + intClearColor[ 3 ] = a; + _gl.clearBufferiv( _gl.COLOR, 0, intClearColor ); + + } + + } else { + + bits |= _gl.COLOR_BUFFER_BIT; + + } + + } + + if ( depth ) bits |= _gl.DEPTH_BUFFER_BIT; + if ( stencil ) { + + bits |= _gl.STENCIL_BUFFER_BIT; + this.state.buffers.stencil.setMask( 0xffffffff ); + + } + + _gl.clear( bits ); + + }; + + this.clearColor = function () { + + this.clear( true, false, false ); + + }; + + this.clearDepth = function () { + + this.clear( false, true, false ); + + }; + + this.clearStencil = function () { + + this.clear( false, false, true ); + + }; + + // + + this.dispose = function () { + + canvas.removeEventListener( 'webglcontextlost', onContextLost, false ); + canvas.removeEventListener( 'webglcontextrestored', onContextRestore, false ); + canvas.removeEventListener( 'webglcontextcreationerror', onContextCreationError, false ); + + renderLists.dispose(); + renderStates.dispose(); + properties.dispose(); + cubemaps.dispose(); + cubeuvmaps.dispose(); + objects.dispose(); + bindingStates.dispose(); + uniformsGroups.dispose(); + programCache.dispose(); + + xr.dispose(); + + xr.removeEventListener( 'sessionstart', onXRSessionStart ); + xr.removeEventListener( 'sessionend', onXRSessionEnd ); + + animation.stop(); + + }; + + // Events + + function onContextLost( event ) { + + event.preventDefault(); + + console.log( 'THREE.WebGLRenderer: Context Lost.' ); + + _isContextLost = true; + + } + + function onContextRestore( /* event */ ) { + + console.log( 'THREE.WebGLRenderer: Context Restored.' ); + + _isContextLost = false; + + const infoAutoReset = info.autoReset; + const shadowMapEnabled = shadowMap.enabled; + const shadowMapAutoUpdate = shadowMap.autoUpdate; + const shadowMapNeedsUpdate = shadowMap.needsUpdate; + const shadowMapType = shadowMap.type; + + initGLContext(); + + info.autoReset = infoAutoReset; + shadowMap.enabled = shadowMapEnabled; + shadowMap.autoUpdate = shadowMapAutoUpdate; + shadowMap.needsUpdate = shadowMapNeedsUpdate; + shadowMap.type = shadowMapType; + + } + + function onContextCreationError( event ) { + + console.error( 'THREE.WebGLRenderer: A WebGL context could not be created. Reason: ', event.statusMessage ); + + } + + function onMaterialDispose( event ) { + + const material = event.target; + + material.removeEventListener( 'dispose', onMaterialDispose ); + + deallocateMaterial( material ); + + } + + // Buffer deallocation + + function deallocateMaterial( material ) { + + releaseMaterialProgramReferences( material ); + + properties.remove( material ); + + } + + + function releaseMaterialProgramReferences( material ) { + + const programs = properties.get( material ).programs; + + if ( programs !== undefined ) { + + programs.forEach( function ( program ) { + + programCache.releaseProgram( program ); + + } ); + + if ( material.isShaderMaterial ) { + + programCache.releaseShaderCache( material ); + + } + + } + + } + + // Buffer rendering + + this.renderBufferDirect = function ( camera, scene, geometry, material, object, group ) { + + if ( scene === null ) scene = _emptyScene; // renderBufferDirect second parameter used to be fog (could be null) + + const frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 ); + + const program = setProgram( camera, scene, geometry, material, object ); + + state.setMaterial( material, frontFaceCW ); + + // + + let index = geometry.index; + let rangeFactor = 1; + + if ( material.wireframe === true ) { + + index = geometries.getWireframeAttribute( geometry ); + + if ( index === undefined ) return; + + rangeFactor = 2; + + } + + // + + const drawRange = geometry.drawRange; + const position = geometry.attributes.position; + + let drawStart = drawRange.start * rangeFactor; + let drawEnd = ( drawRange.start + drawRange.count ) * rangeFactor; + + if ( group !== null ) { + + drawStart = Math.max( drawStart, group.start * rangeFactor ); + drawEnd = Math.min( drawEnd, ( group.start + group.count ) * rangeFactor ); + + } + + if ( index !== null ) { + + drawStart = Math.max( drawStart, 0 ); + drawEnd = Math.min( drawEnd, index.count ); + + } else if ( position !== undefined && position !== null ) { + + drawStart = Math.max( drawStart, 0 ); + drawEnd = Math.min( drawEnd, position.count ); + + } + + const drawCount = drawEnd - drawStart; + + if ( drawCount < 0 || drawCount === Infinity ) return; + + // + + bindingStates.setup( object, material, program, geometry, index ); + + let attribute; + let renderer = bufferRenderer; + + if ( index !== null ) { + + attribute = attributes.get( index ); + + renderer = indexedBufferRenderer; + renderer.setIndex( attribute ); + + } + + // + + if ( object.isMesh ) { + + if ( material.wireframe === true ) { + + state.setLineWidth( material.wireframeLinewidth * getTargetPixelRatio() ); + renderer.setMode( _gl.LINES ); + + } else { + + renderer.setMode( _gl.TRIANGLES ); + + } + + } else if ( object.isLine ) { + + let lineWidth = material.linewidth; + + if ( lineWidth === undefined ) lineWidth = 1; // Not using Line*Material + + state.setLineWidth( lineWidth * getTargetPixelRatio() ); + + if ( object.isLineSegments ) { + + renderer.setMode( _gl.LINES ); + + } else if ( object.isLineLoop ) { + + renderer.setMode( _gl.LINE_LOOP ); + + } else { + + renderer.setMode( _gl.LINE_STRIP ); + + } + + } else if ( object.isPoints ) { + + renderer.setMode( _gl.POINTS ); + + } else if ( object.isSprite ) { + + renderer.setMode( _gl.TRIANGLES ); + + } + + if ( object.isBatchedMesh ) { + + if ( object._multiDrawInstances !== null ) { + + renderer.renderMultiDrawInstances( object._multiDrawStarts, object._multiDrawCounts, object._multiDrawCount, object._multiDrawInstances ); + + } else { + + renderer.renderMultiDraw( object._multiDrawStarts, object._multiDrawCounts, object._multiDrawCount ); + + } + + } else if ( object.isInstancedMesh ) { + + renderer.renderInstances( drawStart, drawCount, object.count ); + + } else if ( geometry.isInstancedBufferGeometry ) { + + const maxInstanceCount = geometry._maxInstanceCount !== undefined ? geometry._maxInstanceCount : Infinity; + const instanceCount = Math.min( geometry.instanceCount, maxInstanceCount ); + + renderer.renderInstances( drawStart, drawCount, instanceCount ); + + } else { + + renderer.render( drawStart, drawCount ); + + } + + }; + + // Compile + + function prepareMaterial( material, scene, object ) { + + if ( material.transparent === true && material.side === DoubleSide && material.forceSinglePass === false ) { + + material.side = BackSide; + material.needsUpdate = true; + getProgram( material, scene, object ); + + material.side = FrontSide; + material.needsUpdate = true; + getProgram( material, scene, object ); + + material.side = DoubleSide; + + } else { + + getProgram( material, scene, object ); + + } + + } + + this.compile = function ( scene, camera, targetScene = null ) { + + if ( targetScene === null ) targetScene = scene; + + currentRenderState = renderStates.get( targetScene ); + currentRenderState.init( camera ); + + renderStateStack.push( currentRenderState ); + + // gather lights from both the target scene and the new object that will be added to the scene. + + targetScene.traverseVisible( function ( object ) { + + if ( object.isLight && object.layers.test( camera.layers ) ) { + + currentRenderState.pushLight( object ); + + if ( object.castShadow ) { + + currentRenderState.pushShadow( object ); + + } + + } + + } ); + + if ( scene !== targetScene ) { + + scene.traverseVisible( function ( object ) { + + if ( object.isLight && object.layers.test( camera.layers ) ) { + + currentRenderState.pushLight( object ); + + if ( object.castShadow ) { + + currentRenderState.pushShadow( object ); + + } + + } + + } ); + + } + + currentRenderState.setupLights( _this._useLegacyLights ); + + // Only initialize materials in the new scene, not the targetScene. + + const materials = new Set(); + + scene.traverse( function ( object ) { + + const material = object.material; + + if ( material ) { + + if ( Array.isArray( material ) ) { + + for ( let i = 0; i < material.length; i ++ ) { + + const material2 = material[ i ]; + + prepareMaterial( material2, targetScene, object ); + materials.add( material2 ); + + } + + } else { + + prepareMaterial( material, targetScene, object ); + materials.add( material ); + + } + + } + + } ); + + renderStateStack.pop(); + currentRenderState = null; + + return materials; + + }; + + // compileAsync + + this.compileAsync = function ( scene, camera, targetScene = null ) { + + const materials = this.compile( scene, camera, targetScene ); + + // Wait for all the materials in the new object to indicate that they're + // ready to be used before resolving the promise. + + return new Promise( ( resolve ) => { + + function checkMaterialsReady() { + + materials.forEach( function ( material ) { + + const materialProperties = properties.get( material ); + const program = materialProperties.currentProgram; + + if ( program.isReady() ) { + + // remove any programs that report they're ready to use from the list + materials.delete( material ); + + } + + } ); + + // once the list of compiling materials is empty, call the callback + + if ( materials.size === 0 ) { + + resolve( scene ); + return; + + } + + // if some materials are still not ready, wait a bit and check again + + setTimeout( checkMaterialsReady, 10 ); + + } + + if ( extensions.get( 'KHR_parallel_shader_compile' ) !== null ) { + + // If we can check the compilation status of the materials without + // blocking then do so right away. + + checkMaterialsReady(); + + } else { + + // Otherwise start by waiting a bit to give the materials we just + // initialized a chance to finish. + + setTimeout( checkMaterialsReady, 10 ); + + } + + } ); + + }; + + // Animation Loop + + let onAnimationFrameCallback = null; + + function onAnimationFrame( time ) { + + if ( onAnimationFrameCallback ) onAnimationFrameCallback( time ); + + } + + function onXRSessionStart() { + + animation.stop(); + + } + + function onXRSessionEnd() { + + animation.start(); + + } + + const animation = new WebGLAnimation(); + animation.setAnimationLoop( onAnimationFrame ); + + if ( typeof self !== 'undefined' ) animation.setContext( self ); + + this.setAnimationLoop = function ( callback ) { + + onAnimationFrameCallback = callback; + xr.setAnimationLoop( callback ); + + ( callback === null ) ? animation.stop() : animation.start(); + + }; + + xr.addEventListener( 'sessionstart', onXRSessionStart ); + xr.addEventListener( 'sessionend', onXRSessionEnd ); + + // Rendering + + this.render = function ( scene, camera ) { + + if ( camera !== undefined && camera.isCamera !== true ) { + + console.error( 'THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.' ); + return; + + } + + if ( _isContextLost === true ) return; + + // update scene graph + + if ( scene.matrixWorldAutoUpdate === true ) scene.updateMatrixWorld(); + + // update camera matrices and frustum + + if ( camera.parent === null && camera.matrixWorldAutoUpdate === true ) camera.updateMatrixWorld(); + + if ( xr.enabled === true && xr.isPresenting === true ) { + + if ( xr.cameraAutoUpdate === true ) xr.updateCamera( camera ); + + camera = xr.getCamera(); // use XR camera for rendering + + } + + // + if ( scene.isScene === true ) scene.onBeforeRender( _this, scene, camera, _currentRenderTarget ); + + currentRenderState = renderStates.get( scene, renderStateStack.length ); + currentRenderState.init( camera ); + + renderStateStack.push( currentRenderState ); + + _projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse ); + _frustum.setFromProjectionMatrix( _projScreenMatrix ); + + _localClippingEnabled = this.localClippingEnabled; + _clippingEnabled = clipping.init( this.clippingPlanes, _localClippingEnabled ); + + currentRenderList = renderLists.get( scene, renderListStack.length ); + currentRenderList.init(); + + renderListStack.push( currentRenderList ); + + projectObject( scene, camera, 0, _this.sortObjects ); + + currentRenderList.finish(); + + if ( _this.sortObjects === true ) { + + currentRenderList.sort( _opaqueSort, _transparentSort ); + + } + + const renderBackground = xr.enabled === false || xr.isPresenting === false || xr.hasDepthSensing() === false; + if ( renderBackground ) { + + background.addToRenderList( currentRenderList, scene ); + + } + + // + + this.info.render.frame ++; + + if ( _clippingEnabled === true ) clipping.beginShadows(); + + const shadowsArray = currentRenderState.state.shadowsArray; + + shadowMap.render( shadowsArray, scene, camera ); + + if ( _clippingEnabled === true ) clipping.endShadows(); + + // + + if ( this.info.autoReset === true ) this.info.reset(); + + // render scene + + const opaqueObjects = currentRenderList.opaque; + const transmissiveObjects = currentRenderList.transmissive; + + currentRenderState.setupLights( _this._useLegacyLights ); + + if ( camera.isArrayCamera ) { + + const cameras = camera.cameras; + + if ( transmissiveObjects.length > 0 ) { + + for ( let i = 0, l = cameras.length; i < l; i ++ ) { + + const camera2 = cameras[ i ]; + + renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera2 ); + + } + + } + + if ( renderBackground ) background.render( scene ); + + for ( let i = 0, l = cameras.length; i < l; i ++ ) { + + const camera2 = cameras[ i ]; + + renderScene( currentRenderList, scene, camera2, camera2.viewport ); + + } + + } else { + + if ( transmissiveObjects.length > 0 ) renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera ); + + if ( renderBackground ) background.render( scene ); + + renderScene( currentRenderList, scene, camera ); + + } + + // + + if ( _currentRenderTarget !== null ) { + + // resolve multisample renderbuffers to a single-sample texture if necessary + + textures.updateMultisampleRenderTarget( _currentRenderTarget ); + + // Generate mipmap if we're using any kind of mipmap filtering + + textures.updateRenderTargetMipmap( _currentRenderTarget ); + + } + + // + + if ( scene.isScene === true ) scene.onAfterRender( _this, scene, camera ); + + // _gl.finish(); + + bindingStates.resetDefaultState(); + _currentMaterialId = - 1; + _currentCamera = null; + + renderStateStack.pop(); + + if ( renderStateStack.length > 0 ) { + + currentRenderState = renderStateStack[ renderStateStack.length - 1 ]; + + if ( _clippingEnabled === true ) clipping.setGlobalState( _this.clippingPlanes, currentRenderState.state.camera ); + + } else { + + currentRenderState = null; + + } + + renderListStack.pop(); + + if ( renderListStack.length > 0 ) { + + currentRenderList = renderListStack[ renderListStack.length - 1 ]; + + } else { + + currentRenderList = null; + + } + + }; + + function projectObject( object, camera, groupOrder, sortObjects ) { + + if ( object.visible === false ) return; + + const visible = object.layers.test( camera.layers ); + + if ( visible ) { + + if ( object.isGroup ) { + + groupOrder = object.renderOrder; + + } else if ( object.isLOD ) { + + if ( object.autoUpdate === true ) object.update( camera ); + + } else if ( object.isLight ) { + + currentRenderState.pushLight( object ); + + if ( object.castShadow ) { + + currentRenderState.pushShadow( object ); + + } + + } else if ( object.isSprite ) { + + if ( ! object.frustumCulled || _frustum.intersectsSprite( object ) ) { + + if ( sortObjects ) { + + _vector3.setFromMatrixPosition( object.matrixWorld ) + .applyMatrix4( _projScreenMatrix ); + + } + + const geometry = objects.update( object ); + const material = object.material; + + if ( material.visible ) { + + currentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null ); + + } + + } + + } else if ( object.isMesh || object.isLine || object.isPoints ) { + + if ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) { + + const geometry = objects.update( object ); + const material = object.material; + + if ( sortObjects ) { + + if ( object.boundingSphere !== undefined ) { + + if ( object.boundingSphere === null ) object.computeBoundingSphere(); + _vector3.copy( object.boundingSphere.center ); + + } else { + + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + _vector3.copy( geometry.boundingSphere.center ); + + } + + _vector3 + .applyMatrix4( object.matrixWorld ) + .applyMatrix4( _projScreenMatrix ); + + } + + if ( Array.isArray( material ) ) { + + const groups = geometry.groups; + + for ( let i = 0, l = groups.length; i < l; i ++ ) { + + const group = groups[ i ]; + const groupMaterial = material[ group.materialIndex ]; + + if ( groupMaterial && groupMaterial.visible ) { + + currentRenderList.push( object, geometry, groupMaterial, groupOrder, _vector3.z, group ); + + } + + } + + } else if ( material.visible ) { + + currentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null ); + + } + + } + + } + + } + + const children = object.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + projectObject( children[ i ], camera, groupOrder, sortObjects ); + + } + + } + + function renderScene( currentRenderList, scene, camera, viewport ) { + + const opaqueObjects = currentRenderList.opaque; + const transmissiveObjects = currentRenderList.transmissive; + const transparentObjects = currentRenderList.transparent; + + currentRenderState.setupLightsView( camera ); + + if ( _clippingEnabled === true ) clipping.setGlobalState( _this.clippingPlanes, camera ); + + if ( viewport ) state.viewport( _currentViewport.copy( viewport ) ); + + if ( opaqueObjects.length > 0 ) renderObjects( opaqueObjects, scene, camera ); + if ( transmissiveObjects.length > 0 ) renderObjects( transmissiveObjects, scene, camera ); + if ( transparentObjects.length > 0 ) renderObjects( transparentObjects, scene, camera ); + + // Ensure depth buffer writing is enabled so it can be cleared on next render + + state.buffers.depth.setTest( true ); + state.buffers.depth.setMask( true ); + state.buffers.color.setMask( true ); + + state.setPolygonOffset( false ); + + } + + function renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera ) { + + const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null; + + if ( overrideMaterial !== null ) { + + return; + + } + + if ( currentRenderState.state.transmissionRenderTarget[ camera.id ] === undefined ) { + + currentRenderState.state.transmissionRenderTarget[ camera.id ] = new WebGLRenderTarget( 1, 1, { + generateMipmaps: true, + type: ( extensions.has( 'EXT_color_buffer_half_float' ) || extensions.has( 'EXT_color_buffer_float' ) ) ? HalfFloatType : UnsignedByteType, + minFilter: LinearMipmapLinearFilter, + samples: 4, + stencilBuffer: stencil, + resolveDepthBuffer: false, + resolveStencilBuffer: false + } ); + + // debug + + /* + const geometry = new PlaneGeometry(); + const material = new MeshBasicMaterial( { map: _transmissionRenderTarget.texture } ); + + const mesh = new Mesh( geometry, material ); + scene.add( mesh ); + */ + + } + + const transmissionRenderTarget = currentRenderState.state.transmissionRenderTarget[ camera.id ]; + + const activeViewport = camera.viewport || _currentViewport; + transmissionRenderTarget.setSize( activeViewport.z, activeViewport.w ); + + // + + const currentRenderTarget = _this.getRenderTarget(); + _this.setRenderTarget( transmissionRenderTarget ); + + _this.getClearColor( _currentClearColor ); + _currentClearAlpha = _this.getClearAlpha(); + if ( _currentClearAlpha < 1 ) _this.setClearColor( 0xffffff, 0.5 ); + + _this.clear(); + + // Turn off the features which can affect the frag color for opaque objects pass. + // Otherwise they are applied twice in opaque objects pass and transmission objects pass. + const currentToneMapping = _this.toneMapping; + _this.toneMapping = NoToneMapping; + + // Remove viewport from camera to avoid nested render calls resetting viewport to it (e.g Reflector). + // Transmission render pass requires viewport to match the transmissionRenderTarget. + const currentCameraViewport = camera.viewport; + if ( camera.viewport !== undefined ) camera.viewport = undefined; + + currentRenderState.setupLightsView( camera ); + + if ( _clippingEnabled === true ) clipping.setGlobalState( _this.clippingPlanes, camera ); + + renderObjects( opaqueObjects, scene, camera ); + + textures.updateMultisampleRenderTarget( transmissionRenderTarget ); + textures.updateRenderTargetMipmap( transmissionRenderTarget ); + + if ( extensions.has( 'WEBGL_multisampled_render_to_texture' ) === false ) { // see #28131 + + let renderTargetNeedsUpdate = false; + + for ( let i = 0, l = transmissiveObjects.length; i < l; i ++ ) { + + const renderItem = transmissiveObjects[ i ]; + + const object = renderItem.object; + const geometry = renderItem.geometry; + const material = renderItem.material; + const group = renderItem.group; + + if ( material.side === DoubleSide && object.layers.test( camera.layers ) ) { + + const currentSide = material.side; + + material.side = BackSide; + material.needsUpdate = true; + + renderObject( object, scene, camera, geometry, material, group ); + + material.side = currentSide; + material.needsUpdate = true; + + renderTargetNeedsUpdate = true; + + } + + } + + if ( renderTargetNeedsUpdate === true ) { + + textures.updateMultisampleRenderTarget( transmissionRenderTarget ); + textures.updateRenderTargetMipmap( transmissionRenderTarget ); + + } + + } + + _this.setRenderTarget( currentRenderTarget ); + + _this.setClearColor( _currentClearColor, _currentClearAlpha ); + + if ( currentCameraViewport !== undefined ) camera.viewport = currentCameraViewport; + + _this.toneMapping = currentToneMapping; + + } + + function renderObjects( renderList, scene, camera ) { + + const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null; + + for ( let i = 0, l = renderList.length; i < l; i ++ ) { + + const renderItem = renderList[ i ]; + + const object = renderItem.object; + const geometry = renderItem.geometry; + const material = overrideMaterial === null ? renderItem.material : overrideMaterial; + const group = renderItem.group; + + if ( object.layers.test( camera.layers ) ) { + + renderObject( object, scene, camera, geometry, material, group ); + + } + + } + + } + + function renderObject( object, scene, camera, geometry, material, group ) { + + object.onBeforeRender( _this, scene, camera, geometry, material, group ); + + object.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld ); + object.normalMatrix.getNormalMatrix( object.modelViewMatrix ); + + material.onBeforeRender( _this, scene, camera, geometry, object, group ); + + if ( material.transparent === true && material.side === DoubleSide && material.forceSinglePass === false ) { + + material.side = BackSide; + material.needsUpdate = true; + _this.renderBufferDirect( camera, scene, geometry, material, object, group ); + + material.side = FrontSide; + material.needsUpdate = true; + _this.renderBufferDirect( camera, scene, geometry, material, object, group ); + + material.side = DoubleSide; + + } else { + + _this.renderBufferDirect( camera, scene, geometry, material, object, group ); + + } + + object.onAfterRender( _this, scene, camera, geometry, material, group ); + + } + + function getProgram( material, scene, object ) { + + if ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ... + + const materialProperties = properties.get( material ); + + const lights = currentRenderState.state.lights; + const shadowsArray = currentRenderState.state.shadowsArray; + + const lightsStateVersion = lights.state.version; + + const parameters = programCache.getParameters( material, lights.state, shadowsArray, scene, object ); + const programCacheKey = programCache.getProgramCacheKey( parameters ); + + let programs = materialProperties.programs; + + // always update environment and fog - changing these trigger an getProgram call, but it's possible that the program doesn't change + + materialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null; + materialProperties.fog = scene.fog; + materialProperties.envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || materialProperties.environment ); + materialProperties.envMapRotation = ( materialProperties.environment !== null && material.envMap === null ) ? scene.environmentRotation : material.envMapRotation; + + if ( programs === undefined ) { + + // new material + + material.addEventListener( 'dispose', onMaterialDispose ); + + programs = new Map(); + materialProperties.programs = programs; + + } + + let program = programs.get( programCacheKey ); + + if ( program !== undefined ) { + + // early out if program and light state is identical + + if ( materialProperties.currentProgram === program && materialProperties.lightsStateVersion === lightsStateVersion ) { + + updateCommonMaterialProperties( material, parameters ); + + return program; + + } + + } else { + + parameters.uniforms = programCache.getUniforms( material ); + + material.onBuild( object, parameters, _this ); + + material.onBeforeCompile( parameters, _this ); + + program = programCache.acquireProgram( parameters, programCacheKey ); + programs.set( programCacheKey, program ); + + materialProperties.uniforms = parameters.uniforms; + + } + + const uniforms = materialProperties.uniforms; + + if ( ( ! material.isShaderMaterial && ! material.isRawShaderMaterial ) || material.clipping === true ) { + + uniforms.clippingPlanes = clipping.uniform; + + } + + updateCommonMaterialProperties( material, parameters ); + + // store the light setup it was created for + + materialProperties.needsLights = materialNeedsLights( material ); + materialProperties.lightsStateVersion = lightsStateVersion; + + if ( materialProperties.needsLights ) { + + // wire up the material to this renderer's lighting state + + uniforms.ambientLightColor.value = lights.state.ambient; + uniforms.lightProbe.value = lights.state.probe; + uniforms.directionalLights.value = lights.state.directional; + uniforms.directionalLightShadows.value = lights.state.directionalShadow; + uniforms.spotLights.value = lights.state.spot; + uniforms.spotLightShadows.value = lights.state.spotShadow; + uniforms.rectAreaLights.value = lights.state.rectArea; + uniforms.ltc_1.value = lights.state.rectAreaLTC1; + uniforms.ltc_2.value = lights.state.rectAreaLTC2; + uniforms.pointLights.value = lights.state.point; + uniforms.pointLightShadows.value = lights.state.pointShadow; + uniforms.hemisphereLights.value = lights.state.hemi; + + uniforms.directionalShadowMap.value = lights.state.directionalShadowMap; + uniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix; + uniforms.spotShadowMap.value = lights.state.spotShadowMap; + uniforms.spotLightMatrix.value = lights.state.spotLightMatrix; + uniforms.spotLightMap.value = lights.state.spotLightMap; + uniforms.pointShadowMap.value = lights.state.pointShadowMap; + uniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix; + // TODO (abelnation): add area lights shadow info to uniforms + + } + + materialProperties.currentProgram = program; + materialProperties.uniformsList = null; + + return program; + + } + + function getUniformList( materialProperties ) { + + if ( materialProperties.uniformsList === null ) { + + const progUniforms = materialProperties.currentProgram.getUniforms(); + materialProperties.uniformsList = WebGLUniforms.seqWithValue( progUniforms.seq, materialProperties.uniforms ); + + } + + return materialProperties.uniformsList; + + } + + function updateCommonMaterialProperties( material, parameters ) { + + const materialProperties = properties.get( material ); + + materialProperties.outputColorSpace = parameters.outputColorSpace; + materialProperties.batching = parameters.batching; + materialProperties.instancing = parameters.instancing; + materialProperties.instancingColor = parameters.instancingColor; + materialProperties.instancingMorph = parameters.instancingMorph; + materialProperties.skinning = parameters.skinning; + materialProperties.morphTargets = parameters.morphTargets; + materialProperties.morphNormals = parameters.morphNormals; + materialProperties.morphColors = parameters.morphColors; + materialProperties.morphTargetsCount = parameters.morphTargetsCount; + materialProperties.numClippingPlanes = parameters.numClippingPlanes; + materialProperties.numIntersection = parameters.numClipIntersection; + materialProperties.vertexAlphas = parameters.vertexAlphas; + materialProperties.vertexTangents = parameters.vertexTangents; + materialProperties.toneMapping = parameters.toneMapping; + + } + + function setProgram( camera, scene, geometry, material, object ) { + + if ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ... + + textures.resetTextureUnits(); + + const fog = scene.fog; + const environment = material.isMeshStandardMaterial ? scene.environment : null; + const colorSpace = ( _currentRenderTarget === null ) ? _this.outputColorSpace : ( _currentRenderTarget.isXRRenderTarget === true ? _currentRenderTarget.texture.colorSpace : LinearSRGBColorSpace ); + const envMap = ( material.isMeshStandardMaterial ? cubeuvmaps : cubemaps ).get( material.envMap || environment ); + const vertexAlphas = material.vertexColors === true && !! geometry.attributes.color && geometry.attributes.color.itemSize === 4; + const vertexTangents = !! geometry.attributes.tangent && ( !! material.normalMap || material.anisotropy > 0 ); + const morphTargets = !! geometry.morphAttributes.position; + const morphNormals = !! geometry.morphAttributes.normal; + const morphColors = !! geometry.morphAttributes.color; + + let toneMapping = NoToneMapping; + + if ( material.toneMapped ) { + + if ( _currentRenderTarget === null || _currentRenderTarget.isXRRenderTarget === true ) { + + toneMapping = _this.toneMapping; + + } + + } + + const morphAttribute = geometry.morphAttributes.position || geometry.morphAttributes.normal || geometry.morphAttributes.color; + const morphTargetsCount = ( morphAttribute !== undefined ) ? morphAttribute.length : 0; + + const materialProperties = properties.get( material ); + const lights = currentRenderState.state.lights; + + if ( _clippingEnabled === true ) { + + if ( _localClippingEnabled === true || camera !== _currentCamera ) { + + const useCache = + camera === _currentCamera && + material.id === _currentMaterialId; + + // we might want to call this function with some ClippingGroup + // object instead of the material, once it becomes feasible + // (#8465, #8379) + clipping.setState( material, camera, useCache ); + + } + + } + + // + + let needsProgramChange = false; + + if ( material.version === materialProperties.__version ) { + + if ( materialProperties.needsLights && ( materialProperties.lightsStateVersion !== lights.state.version ) ) { + + needsProgramChange = true; + + } else if ( materialProperties.outputColorSpace !== colorSpace ) { + + needsProgramChange = true; + + } else if ( object.isBatchedMesh && materialProperties.batching === false ) { + + needsProgramChange = true; + + } else if ( ! object.isBatchedMesh && materialProperties.batching === true ) { + + needsProgramChange = true; + + } else if ( object.isInstancedMesh && materialProperties.instancing === false ) { + + needsProgramChange = true; + + } else if ( ! object.isInstancedMesh && materialProperties.instancing === true ) { + + needsProgramChange = true; + + } else if ( object.isSkinnedMesh && materialProperties.skinning === false ) { + + needsProgramChange = true; + + } else if ( ! object.isSkinnedMesh && materialProperties.skinning === true ) { + + needsProgramChange = true; + + } else if ( object.isInstancedMesh && materialProperties.instancingColor === true && object.instanceColor === null ) { + + needsProgramChange = true; + + } else if ( object.isInstancedMesh && materialProperties.instancingColor === false && object.instanceColor !== null ) { + + needsProgramChange = true; + + } else if ( object.isInstancedMesh && materialProperties.instancingMorph === true && object.morphTexture === null ) { + + needsProgramChange = true; + + } else if ( object.isInstancedMesh && materialProperties.instancingMorph === false && object.morphTexture !== null ) { + + needsProgramChange = true; + + } else if ( materialProperties.envMap !== envMap ) { + + needsProgramChange = true; + + } else if ( material.fog === true && materialProperties.fog !== fog ) { + + needsProgramChange = true; + + } else if ( materialProperties.numClippingPlanes !== undefined && + ( materialProperties.numClippingPlanes !== clipping.numPlanes || + materialProperties.numIntersection !== clipping.numIntersection ) ) { + + needsProgramChange = true; + + } else if ( materialProperties.vertexAlphas !== vertexAlphas ) { + + needsProgramChange = true; + + } else if ( materialProperties.vertexTangents !== vertexTangents ) { + + needsProgramChange = true; + + } else if ( materialProperties.morphTargets !== morphTargets ) { + + needsProgramChange = true; + + } else if ( materialProperties.morphNormals !== morphNormals ) { + + needsProgramChange = true; + + } else if ( materialProperties.morphColors !== morphColors ) { + + needsProgramChange = true; + + } else if ( materialProperties.toneMapping !== toneMapping ) { + + needsProgramChange = true; + + } else if ( materialProperties.morphTargetsCount !== morphTargetsCount ) { + + needsProgramChange = true; + + } + + } else { + + needsProgramChange = true; + materialProperties.__version = material.version; + + } + + // + + let program = materialProperties.currentProgram; + + if ( needsProgramChange === true ) { + + program = getProgram( material, scene, object ); + + } + + let refreshProgram = false; + let refreshMaterial = false; + let refreshLights = false; + + const p_uniforms = program.getUniforms(), + m_uniforms = materialProperties.uniforms; + + if ( state.useProgram( program.program ) ) { + + refreshProgram = true; + refreshMaterial = true; + refreshLights = true; + + } + + if ( material.id !== _currentMaterialId ) { + + _currentMaterialId = material.id; + + refreshMaterial = true; + + } + + if ( refreshProgram || _currentCamera !== camera ) { + + // common camera uniforms + + p_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix ); + p_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse ); + + const uCamPos = p_uniforms.map.cameraPosition; + + if ( uCamPos !== undefined ) { + + uCamPos.setValue( _gl, _vector3.setFromMatrixPosition( camera.matrixWorld ) ); + + } + + if ( capabilities.logarithmicDepthBuffer ) { + + p_uniforms.setValue( _gl, 'logDepthBufFC', + 2.0 / ( Math.log( camera.far + 1.0 ) / Math.LN2 ) ); + + } + + // consider moving isOrthographic to UniformLib and WebGLMaterials, see https://github.com/mrdoob/three.js/pull/26467#issuecomment-1645185067 + + if ( material.isMeshPhongMaterial || + material.isMeshToonMaterial || + material.isMeshLambertMaterial || + material.isMeshBasicMaterial || + material.isMeshStandardMaterial || + material.isShaderMaterial ) { + + p_uniforms.setValue( _gl, 'isOrthographic', camera.isOrthographicCamera === true ); + + } + + if ( _currentCamera !== camera ) { + + _currentCamera = camera; + + // lighting uniforms depend on the camera so enforce an update + // now, in case this material supports lights - or later, when + // the next material that does gets activated: + + refreshMaterial = true; // set to true on material change + refreshLights = true; // remains set until update done + + } + + } + + // skinning and morph target uniforms must be set even if material didn't change + // auto-setting of texture unit for bone and morph texture must go before other textures + // otherwise textures used for skinning and morphing can take over texture units reserved for other material textures + + if ( object.isSkinnedMesh ) { + + p_uniforms.setOptional( _gl, object, 'bindMatrix' ); + p_uniforms.setOptional( _gl, object, 'bindMatrixInverse' ); + + const skeleton = object.skeleton; + + if ( skeleton ) { + + if ( skeleton.boneTexture === null ) skeleton.computeBoneTexture(); + + p_uniforms.setValue( _gl, 'boneTexture', skeleton.boneTexture, textures ); + + } + + } + + if ( object.isBatchedMesh ) { + + p_uniforms.setOptional( _gl, object, 'batchingTexture' ); + p_uniforms.setValue( _gl, 'batchingTexture', object._matricesTexture, textures ); + + } + + const morphAttributes = geometry.morphAttributes; + + if ( morphAttributes.position !== undefined || morphAttributes.normal !== undefined || ( morphAttributes.color !== undefined ) ) { + + morphtargets.update( object, geometry, program ); + + } + + if ( refreshMaterial || materialProperties.receiveShadow !== object.receiveShadow ) { + + materialProperties.receiveShadow = object.receiveShadow; + p_uniforms.setValue( _gl, 'receiveShadow', object.receiveShadow ); + + } + + // https://github.com/mrdoob/three.js/pull/24467#issuecomment-1209031512 + + if ( material.isMeshGouraudMaterial && material.envMap !== null ) { + + m_uniforms.envMap.value = envMap; + + m_uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) ? - 1 : 1; + + } + + if ( material.isMeshStandardMaterial && material.envMap === null && scene.environment !== null ) { + + m_uniforms.envMapIntensity.value = scene.environmentIntensity; + + } + + if ( refreshMaterial ) { + + p_uniforms.setValue( _gl, 'toneMappingExposure', _this.toneMappingExposure ); + + if ( materialProperties.needsLights ) { + + // the current material requires lighting info + + // note: all lighting uniforms are always set correctly + // they simply reference the renderer's state for their + // values + // + // use the current material's .needsUpdate flags to set + // the GL state when required + + markUniformsLightsNeedsUpdate( m_uniforms, refreshLights ); + + } + + // refresh uniforms common to several materials + + if ( fog && material.fog === true ) { + + materials.refreshFogUniforms( m_uniforms, fog ); + + } + + materials.refreshMaterialUniforms( m_uniforms, material, _pixelRatio, _height, currentRenderState.state.transmissionRenderTarget[ camera.id ] ); + + WebGLUniforms.upload( _gl, getUniformList( materialProperties ), m_uniforms, textures ); + + } + + if ( material.isShaderMaterial && material.uniformsNeedUpdate === true ) { + + WebGLUniforms.upload( _gl, getUniformList( materialProperties ), m_uniforms, textures ); + material.uniformsNeedUpdate = false; + + } + + if ( material.isSpriteMaterial ) { + + p_uniforms.setValue( _gl, 'center', object.center ); + + } + + // common matrices + + p_uniforms.setValue( _gl, 'modelViewMatrix', object.modelViewMatrix ); + p_uniforms.setValue( _gl, 'normalMatrix', object.normalMatrix ); + p_uniforms.setValue( _gl, 'modelMatrix', object.matrixWorld ); + + // UBOs + + if ( material.isShaderMaterial || material.isRawShaderMaterial ) { + + const groups = material.uniformsGroups; + + for ( let i = 0, l = groups.length; i < l; i ++ ) { + + const group = groups[ i ]; + + uniformsGroups.update( group, program ); + uniformsGroups.bind( group, program ); + + } + + } + + return program; + + } + + // If uniforms are marked as clean, they don't need to be loaded to the GPU. + + function markUniformsLightsNeedsUpdate( uniforms, value ) { + + uniforms.ambientLightColor.needsUpdate = value; + uniforms.lightProbe.needsUpdate = value; + + uniforms.directionalLights.needsUpdate = value; + uniforms.directionalLightShadows.needsUpdate = value; + uniforms.pointLights.needsUpdate = value; + uniforms.pointLightShadows.needsUpdate = value; + uniforms.spotLights.needsUpdate = value; + uniforms.spotLightShadows.needsUpdate = value; + uniforms.rectAreaLights.needsUpdate = value; + uniforms.hemisphereLights.needsUpdate = value; + + } + + function materialNeedsLights( material ) { + + return material.isMeshLambertMaterial || material.isMeshToonMaterial || material.isMeshPhongMaterial || + material.isMeshStandardMaterial || material.isShadowMaterial || + ( material.isShaderMaterial && material.lights === true ); + + } + + this.getActiveCubeFace = function () { + + return _currentActiveCubeFace; + + }; + + this.getActiveMipmapLevel = function () { + + return _currentActiveMipmapLevel; + + }; + + this.getRenderTarget = function () { + + return _currentRenderTarget; + + }; + + this.setRenderTargetTextures = function ( renderTarget, colorTexture, depthTexture ) { + + properties.get( renderTarget.texture ).__webglTexture = colorTexture; + properties.get( renderTarget.depthTexture ).__webglTexture = depthTexture; + + const renderTargetProperties = properties.get( renderTarget ); + renderTargetProperties.__hasExternalTextures = true; + + renderTargetProperties.__autoAllocateDepthBuffer = depthTexture === undefined; + + if ( ! renderTargetProperties.__autoAllocateDepthBuffer ) { + + // The multisample_render_to_texture extension doesn't work properly if there + // are midframe flushes and an external depth buffer. Disable use of the extension. + if ( extensions.has( 'WEBGL_multisampled_render_to_texture' ) === true ) { + + console.warn( 'THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided' ); + renderTargetProperties.__useRenderToTexture = false; + + } + + } + + }; + + this.setRenderTargetFramebuffer = function ( renderTarget, defaultFramebuffer ) { + + const renderTargetProperties = properties.get( renderTarget ); + renderTargetProperties.__webglFramebuffer = defaultFramebuffer; + renderTargetProperties.__useDefaultFramebuffer = defaultFramebuffer === undefined; + + }; + + this.setRenderTarget = function ( renderTarget, activeCubeFace = 0, activeMipmapLevel = 0 ) { + + _currentRenderTarget = renderTarget; + _currentActiveCubeFace = activeCubeFace; + _currentActiveMipmapLevel = activeMipmapLevel; + + let useDefaultFramebuffer = true; + let framebuffer = null; + let isCube = false; + let isRenderTarget3D = false; + + if ( renderTarget ) { + + const renderTargetProperties = properties.get( renderTarget ); + + if ( renderTargetProperties.__useDefaultFramebuffer !== undefined ) { + + // We need to make sure to rebind the framebuffer. + state.bindFramebuffer( _gl.FRAMEBUFFER, null ); + useDefaultFramebuffer = false; + + } else if ( renderTargetProperties.__webglFramebuffer === undefined ) { + + textures.setupRenderTarget( renderTarget ); + + } else if ( renderTargetProperties.__hasExternalTextures ) { + + // Color and depth texture must be rebound in order for the swapchain to update. + textures.rebindTextures( renderTarget, properties.get( renderTarget.texture ).__webglTexture, properties.get( renderTarget.depthTexture ).__webglTexture ); + + } + + const texture = renderTarget.texture; + + if ( texture.isData3DTexture || texture.isDataArrayTexture || texture.isCompressedArrayTexture ) { + + isRenderTarget3D = true; + + } + + const __webglFramebuffer = properties.get( renderTarget ).__webglFramebuffer; + + if ( renderTarget.isWebGLCubeRenderTarget ) { + + if ( Array.isArray( __webglFramebuffer[ activeCubeFace ] ) ) { + + framebuffer = __webglFramebuffer[ activeCubeFace ][ activeMipmapLevel ]; + + } else { + + framebuffer = __webglFramebuffer[ activeCubeFace ]; + + } + + isCube = true; + + } else if ( ( renderTarget.samples > 0 ) && textures.useMultisampledRTT( renderTarget ) === false ) { + + framebuffer = properties.get( renderTarget ).__webglMultisampledFramebuffer; + + } else { + + if ( Array.isArray( __webglFramebuffer ) ) { + + framebuffer = __webglFramebuffer[ activeMipmapLevel ]; + + } else { + + framebuffer = __webglFramebuffer; + + } + + } + + _currentViewport.copy( renderTarget.viewport ); + _currentScissor.copy( renderTarget.scissor ); + _currentScissorTest = renderTarget.scissorTest; + + } else { + + _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor(); + _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor(); + _currentScissorTest = _scissorTest; + + } + + const framebufferBound = state.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer ); + + if ( framebufferBound && useDefaultFramebuffer ) { + + state.drawBuffers( renderTarget, framebuffer ); + + } + + state.viewport( _currentViewport ); + state.scissor( _currentScissor ); + state.setScissorTest( _currentScissorTest ); + + if ( isCube ) { + + const textureProperties = properties.get( renderTarget.texture ); + _gl.framebufferTexture2D( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + activeCubeFace, textureProperties.__webglTexture, activeMipmapLevel ); + + } else if ( isRenderTarget3D ) { + + const textureProperties = properties.get( renderTarget.texture ); + const layer = activeCubeFace || 0; + _gl.framebufferTextureLayer( _gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, textureProperties.__webglTexture, activeMipmapLevel || 0, layer ); + + } + + _currentMaterialId = - 1; // reset current material to ensure correct uniform bindings + + }; + + this.readRenderTargetPixels = function ( renderTarget, x, y, width, height, buffer, activeCubeFaceIndex ) { + + if ( ! ( renderTarget && renderTarget.isWebGLRenderTarget ) ) { + + console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.' ); + return; + + } + + let framebuffer = properties.get( renderTarget ).__webglFramebuffer; + + if ( renderTarget.isWebGLCubeRenderTarget && activeCubeFaceIndex !== undefined ) { + + framebuffer = framebuffer[ activeCubeFaceIndex ]; + + } + + if ( framebuffer ) { + + state.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer ); + + try { + + const texture = renderTarget.texture; + const textureFormat = texture.format; + const textureType = texture.type; + + if ( ! capabilities.textureFormatReadable( textureFormat ) ) { + + console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.' ); + return; + + } + + if ( ! capabilities.textureTypeReadable( textureType ) ) { + + console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.' ); + return; + + } + + // the following if statement ensures valid read requests (no out-of-bounds pixels, see #8604) + + if ( ( x >= 0 && x <= ( renderTarget.width - width ) ) && ( y >= 0 && y <= ( renderTarget.height - height ) ) ) { + + _gl.readPixels( x, y, width, height, utils.convert( textureFormat ), utils.convert( textureType ), buffer ); + + } + + } finally { + + // restore framebuffer of current render target if necessary + + const framebuffer = ( _currentRenderTarget !== null ) ? properties.get( _currentRenderTarget ).__webglFramebuffer : null; + state.bindFramebuffer( _gl.FRAMEBUFFER, framebuffer ); + + } + + } + + }; + + this.copyFramebufferToTexture = function ( position, texture, level = 0 ) { + + const levelScale = Math.pow( 2, - level ); + const width = Math.floor( texture.image.width * levelScale ); + const height = Math.floor( texture.image.height * levelScale ); + + textures.setTexture2D( texture, 0 ); + + _gl.copyTexSubImage2D( _gl.TEXTURE_2D, level, 0, 0, position.x, position.y, width, height ); + + state.unbindTexture(); + + }; + + this.copyTextureToTexture = function ( position, srcTexture, dstTexture, level = 0 ) { + + const width = srcTexture.image.width; + const height = srcTexture.image.height; + const glFormat = utils.convert( dstTexture.format ); + const glType = utils.convert( dstTexture.type ); + + textures.setTexture2D( dstTexture, 0 ); + + // As another texture upload may have changed pixelStorei + // parameters, make sure they are correct for the dstTexture + _gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY ); + _gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha ); + _gl.pixelStorei( _gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment ); + + if ( srcTexture.isDataTexture ) { + + _gl.texSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data ); + + } else { + + if ( srcTexture.isCompressedTexture ) { + + _gl.compressedTexSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, srcTexture.mipmaps[ 0 ].width, srcTexture.mipmaps[ 0 ].height, glFormat, srcTexture.mipmaps[ 0 ].data ); + + } else { + + _gl.texSubImage2D( _gl.TEXTURE_2D, level, position.x, position.y, glFormat, glType, srcTexture.image ); + + } + + } + + // Generate mipmaps only when copying level 0 + if ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( _gl.TEXTURE_2D ); + + state.unbindTexture(); + + }; + + this.copyTextureToTexture3D = function ( sourceBox, position, srcTexture, dstTexture, level = 0 ) { + + const width = sourceBox.max.x - sourceBox.min.x; + const height = sourceBox.max.y - sourceBox.min.y; + const depth = sourceBox.max.z - sourceBox.min.z; + const glFormat = utils.convert( dstTexture.format ); + const glType = utils.convert( dstTexture.type ); + let glTarget; + + if ( dstTexture.isData3DTexture ) { + + textures.setTexture3D( dstTexture, 0 ); + glTarget = _gl.TEXTURE_3D; + + } else if ( dstTexture.isDataArrayTexture || dstTexture.isCompressedArrayTexture ) { + + textures.setTexture2DArray( dstTexture, 0 ); + glTarget = _gl.TEXTURE_2D_ARRAY; + + } else { + + console.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.' ); + return; + + } + + _gl.pixelStorei( _gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY ); + _gl.pixelStorei( _gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha ); + _gl.pixelStorei( _gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment ); + + const unpackRowLen = _gl.getParameter( _gl.UNPACK_ROW_LENGTH ); + const unpackImageHeight = _gl.getParameter( _gl.UNPACK_IMAGE_HEIGHT ); + const unpackSkipPixels = _gl.getParameter( _gl.UNPACK_SKIP_PIXELS ); + const unpackSkipRows = _gl.getParameter( _gl.UNPACK_SKIP_ROWS ); + const unpackSkipImages = _gl.getParameter( _gl.UNPACK_SKIP_IMAGES ); + + const image = srcTexture.isCompressedTexture ? srcTexture.mipmaps[ level ] : srcTexture.image; + + _gl.pixelStorei( _gl.UNPACK_ROW_LENGTH, image.width ); + _gl.pixelStorei( _gl.UNPACK_IMAGE_HEIGHT, image.height ); + _gl.pixelStorei( _gl.UNPACK_SKIP_PIXELS, sourceBox.min.x ); + _gl.pixelStorei( _gl.UNPACK_SKIP_ROWS, sourceBox.min.y ); + _gl.pixelStorei( _gl.UNPACK_SKIP_IMAGES, sourceBox.min.z ); + + if ( srcTexture.isDataTexture || srcTexture.isData3DTexture ) { + + _gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image.data ); + + } else { + + if ( dstTexture.isCompressedArrayTexture ) { + + _gl.compressedTexSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, image.data ); + + } else { + + _gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image ); + + } + + } + + _gl.pixelStorei( _gl.UNPACK_ROW_LENGTH, unpackRowLen ); + _gl.pixelStorei( _gl.UNPACK_IMAGE_HEIGHT, unpackImageHeight ); + _gl.pixelStorei( _gl.UNPACK_SKIP_PIXELS, unpackSkipPixels ); + _gl.pixelStorei( _gl.UNPACK_SKIP_ROWS, unpackSkipRows ); + _gl.pixelStorei( _gl.UNPACK_SKIP_IMAGES, unpackSkipImages ); + + // Generate mipmaps only when copying level 0 + if ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( glTarget ); + + state.unbindTexture(); + + }; + + this.initTexture = function ( texture ) { + + if ( texture.isCubeTexture ) { + + textures.setTextureCube( texture, 0 ); + + } else if ( texture.isData3DTexture ) { + + textures.setTexture3D( texture, 0 ); + + } else if ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) { + + textures.setTexture2DArray( texture, 0 ); + + } else { + + textures.setTexture2D( texture, 0 ); + + } + + state.unbindTexture(); + + }; + + this.resetState = function () { + + _currentActiveCubeFace = 0; + _currentActiveMipmapLevel = 0; + _currentRenderTarget = null; + + state.reset(); + bindingStates.reset(); + + }; + + if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { + + __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); + + } + + } + + get coordinateSystem() { + + return WebGLCoordinateSystem; + + } + + get outputColorSpace() { + + return this._outputColorSpace; + + } + + set outputColorSpace( colorSpace ) { + + this._outputColorSpace = colorSpace; + + const gl = this.getContext(); + gl.drawingBufferColorSpace = colorSpace === DisplayP3ColorSpace ? 'display-p3' : 'srgb'; + gl.unpackColorSpace = ColorManagement.workingColorSpace === LinearDisplayP3ColorSpace ? 'display-p3' : 'srgb'; + + } + + get useLegacyLights() { // @deprecated, r155 + + console.warn( 'THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.' ); + return this._useLegacyLights; + + } + + set useLegacyLights( value ) { // @deprecated, r155 + + console.warn( 'THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.' ); + this._useLegacyLights = value; + + } + +} + +class FogExp2 { + + constructor( color, density = 0.00025 ) { + + this.isFogExp2 = true; + + this.name = ''; + + this.color = new Color( color ); + this.density = density; + + } + + clone() { + + return new FogExp2( this.color, this.density ); + + } + + toJSON( /* meta */ ) { + + return { + type: 'FogExp2', + name: this.name, + color: this.color.getHex(), + density: this.density + }; + + } + +} + +class Fog { + + constructor( color, near = 1, far = 1000 ) { + + this.isFog = true; + + this.name = ''; + + this.color = new Color( color ); + + this.near = near; + this.far = far; + + } + + clone() { + + return new Fog( this.color, this.near, this.far ); + + } + + toJSON( /* meta */ ) { + + return { + type: 'Fog', + name: this.name, + color: this.color.getHex(), + near: this.near, + far: this.far + }; + + } + +} + +class Scene extends Object3D { + + constructor() { + + super(); + + this.isScene = true; + + this.type = 'Scene'; + + this.background = null; + this.environment = null; + this.fog = null; + + this.backgroundBlurriness = 0; + this.backgroundIntensity = 1; + this.backgroundRotation = new Euler(); + + this.environmentIntensity = 1; + this.environmentRotation = new Euler(); + + this.overrideMaterial = null; + + if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { + + __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); + + } + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + if ( source.background !== null ) this.background = source.background.clone(); + if ( source.environment !== null ) this.environment = source.environment.clone(); + if ( source.fog !== null ) this.fog = source.fog.clone(); + + this.backgroundBlurriness = source.backgroundBlurriness; + this.backgroundIntensity = source.backgroundIntensity; + this.backgroundRotation.copy( source.backgroundRotation ); + + this.environmentIntensity = source.environmentIntensity; + this.environmentRotation.copy( source.environmentRotation ); + + if ( source.overrideMaterial !== null ) this.overrideMaterial = source.overrideMaterial.clone(); + + this.matrixAutoUpdate = source.matrixAutoUpdate; + + return this; + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + if ( this.fog !== null ) data.object.fog = this.fog.toJSON(); + + if ( this.backgroundBlurriness > 0 ) data.object.backgroundBlurriness = this.backgroundBlurriness; + if ( this.backgroundIntensity !== 1 ) data.object.backgroundIntensity = this.backgroundIntensity; + data.object.backgroundRotation = this.backgroundRotation.toArray(); + + if ( this.environmentIntensity !== 1 ) data.object.environmentIntensity = this.environmentIntensity; + data.object.environmentRotation = this.environmentRotation.toArray(); + + return data; + + } + +} + +class InterleavedBuffer { + + constructor( array, stride ) { + + this.isInterleavedBuffer = true; + + this.array = array; + this.stride = stride; + this.count = array !== undefined ? array.length / stride : 0; + + this.usage = StaticDrawUsage; + this._updateRange = { offset: 0, count: - 1 }; + this.updateRanges = []; + + this.version = 0; + + this.uuid = generateUUID(); + + } + + onUploadCallback() {} + + set needsUpdate( value ) { + + if ( value === true ) this.version ++; + + } + + get updateRange() { + + warnOnce( 'THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead.' ); // @deprecated, r159 + return this._updateRange; + + } + + setUsage( value ) { + + this.usage = value; + + return this; + + } + + addUpdateRange( start, count ) { + + this.updateRanges.push( { start, count } ); + + } + + clearUpdateRanges() { + + this.updateRanges.length = 0; + + } + + copy( source ) { + + this.array = new source.array.constructor( source.array ); + this.count = source.count; + this.stride = source.stride; + this.usage = source.usage; + + return this; + + } + + copyAt( index1, attribute, index2 ) { + + index1 *= this.stride; + index2 *= attribute.stride; + + for ( let i = 0, l = this.stride; i < l; i ++ ) { + + this.array[ index1 + i ] = attribute.array[ index2 + i ]; + + } + + return this; + + } + + set( value, offset = 0 ) { + + this.array.set( value, offset ); + + return this; + + } + + clone( data ) { + + if ( data.arrayBuffers === undefined ) { + + data.arrayBuffers = {}; + + } + + if ( this.array.buffer._uuid === undefined ) { + + this.array.buffer._uuid = generateUUID(); + + } + + if ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) { + + data.arrayBuffers[ this.array.buffer._uuid ] = this.array.slice( 0 ).buffer; + + } + + const array = new this.array.constructor( data.arrayBuffers[ this.array.buffer._uuid ] ); + + const ib = new this.constructor( array, this.stride ); + ib.setUsage( this.usage ); + + return ib; + + } + + onUpload( callback ) { + + this.onUploadCallback = callback; + + return this; + + } + + toJSON( data ) { + + if ( data.arrayBuffers === undefined ) { + + data.arrayBuffers = {}; + + } + + // generate UUID for array buffer if necessary + + if ( this.array.buffer._uuid === undefined ) { + + this.array.buffer._uuid = generateUUID(); + + } + + if ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) { + + data.arrayBuffers[ this.array.buffer._uuid ] = Array.from( new Uint32Array( this.array.buffer ) ); + + } + + // + + return { + uuid: this.uuid, + buffer: this.array.buffer._uuid, + type: this.array.constructor.name, + stride: this.stride + }; + + } + +} + +const _vector$6 = /*@__PURE__*/ new Vector3(); + +class InterleavedBufferAttribute { + + constructor( interleavedBuffer, itemSize, offset, normalized = false ) { + + this.isInterleavedBufferAttribute = true; + + this.name = ''; + + this.data = interleavedBuffer; + this.itemSize = itemSize; + this.offset = offset; + + this.normalized = normalized; + + } + + get count() { + + return this.data.count; + + } + + get array() { + + return this.data.array; + + } + + set needsUpdate( value ) { + + this.data.needsUpdate = value; + + } + + applyMatrix4( m ) { + + for ( let i = 0, l = this.data.count; i < l; i ++ ) { + + _vector$6.fromBufferAttribute( this, i ); + + _vector$6.applyMatrix4( m ); + + this.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z ); + + } + + return this; + + } + + applyNormalMatrix( m ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector$6.fromBufferAttribute( this, i ); + + _vector$6.applyNormalMatrix( m ); + + this.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z ); + + } + + return this; + + } + + transformDirection( m ) { + + for ( let i = 0, l = this.count; i < l; i ++ ) { + + _vector$6.fromBufferAttribute( this, i ); + + _vector$6.transformDirection( m ); + + this.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z ); + + } + + return this; + + } + + getComponent( index, component ) { + + let value = this.array[ index * this.data.stride + this.offset + component ]; + + if ( this.normalized ) value = denormalize( value, this.array ); + + return value; + + } + + setComponent( index, component, value ) { + + if ( this.normalized ) value = normalize( value, this.array ); + + this.data.array[ index * this.data.stride + this.offset + component ] = value; + + return this; + + } + + setX( index, x ) { + + if ( this.normalized ) x = normalize( x, this.array ); + + this.data.array[ index * this.data.stride + this.offset ] = x; + + return this; + + } + + setY( index, y ) { + + if ( this.normalized ) y = normalize( y, this.array ); + + this.data.array[ index * this.data.stride + this.offset + 1 ] = y; + + return this; + + } + + setZ( index, z ) { + + if ( this.normalized ) z = normalize( z, this.array ); + + this.data.array[ index * this.data.stride + this.offset + 2 ] = z; + + return this; + + } + + setW( index, w ) { + + if ( this.normalized ) w = normalize( w, this.array ); + + this.data.array[ index * this.data.stride + this.offset + 3 ] = w; + + return this; + + } + + getX( index ) { + + let x = this.data.array[ index * this.data.stride + this.offset ]; + + if ( this.normalized ) x = denormalize( x, this.array ); + + return x; + + } + + getY( index ) { + + let y = this.data.array[ index * this.data.stride + this.offset + 1 ]; + + if ( this.normalized ) y = denormalize( y, this.array ); + + return y; + + } + + getZ( index ) { + + let z = this.data.array[ index * this.data.stride + this.offset + 2 ]; + + if ( this.normalized ) z = denormalize( z, this.array ); + + return z; + + } + + getW( index ) { + + let w = this.data.array[ index * this.data.stride + this.offset + 3 ]; + + if ( this.normalized ) w = denormalize( w, this.array ); + + return w; + + } + + setXY( index, x, y ) { + + index = index * this.data.stride + this.offset; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + + } + + this.data.array[ index + 0 ] = x; + this.data.array[ index + 1 ] = y; + + return this; + + } + + setXYZ( index, x, y, z ) { + + index = index * this.data.stride + this.offset; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + z = normalize( z, this.array ); + + } + + this.data.array[ index + 0 ] = x; + this.data.array[ index + 1 ] = y; + this.data.array[ index + 2 ] = z; + + return this; + + } + + setXYZW( index, x, y, z, w ) { + + index = index * this.data.stride + this.offset; + + if ( this.normalized ) { + + x = normalize( x, this.array ); + y = normalize( y, this.array ); + z = normalize( z, this.array ); + w = normalize( w, this.array ); + + } + + this.data.array[ index + 0 ] = x; + this.data.array[ index + 1 ] = y; + this.data.array[ index + 2 ] = z; + this.data.array[ index + 3 ] = w; + + return this; + + } + + clone( data ) { + + if ( data === undefined ) { + + console.log( 'THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.' ); + + const array = []; + + for ( let i = 0; i < this.count; i ++ ) { + + const index = i * this.data.stride + this.offset; + + for ( let j = 0; j < this.itemSize; j ++ ) { + + array.push( this.data.array[ index + j ] ); + + } + + } + + return new BufferAttribute( new this.array.constructor( array ), this.itemSize, this.normalized ); + + } else { + + if ( data.interleavedBuffers === undefined ) { + + data.interleavedBuffers = {}; + + } + + if ( data.interleavedBuffers[ this.data.uuid ] === undefined ) { + + data.interleavedBuffers[ this.data.uuid ] = this.data.clone( data ); + + } + + return new InterleavedBufferAttribute( data.interleavedBuffers[ this.data.uuid ], this.itemSize, this.offset, this.normalized ); + + } + + } + + toJSON( data ) { + + if ( data === undefined ) { + + console.log( 'THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.' ); + + const array = []; + + for ( let i = 0; i < this.count; i ++ ) { + + const index = i * this.data.stride + this.offset; + + for ( let j = 0; j < this.itemSize; j ++ ) { + + array.push( this.data.array[ index + j ] ); + + } + + } + + // de-interleave data and save it as an ordinary buffer attribute for now + + return { + itemSize: this.itemSize, + type: this.array.constructor.name, + array: array, + normalized: this.normalized + }; + + } else { + + // save as true interleaved attribute + + if ( data.interleavedBuffers === undefined ) { + + data.interleavedBuffers = {}; + + } + + if ( data.interleavedBuffers[ this.data.uuid ] === undefined ) { + + data.interleavedBuffers[ this.data.uuid ] = this.data.toJSON( data ); + + } + + return { + isInterleavedBufferAttribute: true, + itemSize: this.itemSize, + data: this.data.uuid, + offset: this.offset, + normalized: this.normalized + }; + + } + + } + +} + +class SpriteMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isSpriteMaterial = true; + + this.type = 'SpriteMaterial'; + + this.color = new Color( 0xffffff ); + + this.map = null; + + this.alphaMap = null; + + this.rotation = 0; + + this.sizeAttenuation = true; + + this.transparent = true; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.map = source.map; + + this.alphaMap = source.alphaMap; + + this.rotation = source.rotation; + + this.sizeAttenuation = source.sizeAttenuation; + + this.fog = source.fog; + + return this; + + } + +} + +let _geometry; + +const _intersectPoint = /*@__PURE__*/ new Vector3(); +const _worldScale = /*@__PURE__*/ new Vector3(); +const _mvPosition = /*@__PURE__*/ new Vector3(); + +const _alignedPosition = /*@__PURE__*/ new Vector2(); +const _rotatedPosition = /*@__PURE__*/ new Vector2(); +const _viewWorldMatrix = /*@__PURE__*/ new Matrix4(); + +const _vA = /*@__PURE__*/ new Vector3(); +const _vB = /*@__PURE__*/ new Vector3(); +const _vC = /*@__PURE__*/ new Vector3(); + +const _uvA = /*@__PURE__*/ new Vector2(); +const _uvB = /*@__PURE__*/ new Vector2(); +const _uvC = /*@__PURE__*/ new Vector2(); + +class Sprite extends Object3D { + + constructor( material = new SpriteMaterial() ) { + + super(); + + this.isSprite = true; + + this.type = 'Sprite'; + + if ( _geometry === undefined ) { + + _geometry = new BufferGeometry(); + + const float32Array = new Float32Array( [ + - 0.5, - 0.5, 0, 0, 0, + 0.5, - 0.5, 0, 1, 0, + 0.5, 0.5, 0, 1, 1, + - 0.5, 0.5, 0, 0, 1 + ] ); + + const interleavedBuffer = new InterleavedBuffer( float32Array, 5 ); + + _geometry.setIndex( [ 0, 1, 2, 0, 2, 3 ] ); + _geometry.setAttribute( 'position', new InterleavedBufferAttribute( interleavedBuffer, 3, 0, false ) ); + _geometry.setAttribute( 'uv', new InterleavedBufferAttribute( interleavedBuffer, 2, 3, false ) ); + + } + + this.geometry = _geometry; + this.material = material; + + this.center = new Vector2( 0.5, 0.5 ); + + } + + raycast( raycaster, intersects ) { + + if ( raycaster.camera === null ) { + + console.error( 'THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.' ); + + } + + _worldScale.setFromMatrixScale( this.matrixWorld ); + + _viewWorldMatrix.copy( raycaster.camera.matrixWorld ); + this.modelViewMatrix.multiplyMatrices( raycaster.camera.matrixWorldInverse, this.matrixWorld ); + + _mvPosition.setFromMatrixPosition( this.modelViewMatrix ); + + if ( raycaster.camera.isPerspectiveCamera && this.material.sizeAttenuation === false ) { + + _worldScale.multiplyScalar( - _mvPosition.z ); + + } + + const rotation = this.material.rotation; + let sin, cos; + + if ( rotation !== 0 ) { + + cos = Math.cos( rotation ); + sin = Math.sin( rotation ); + + } + + const center = this.center; + + transformVertex( _vA.set( - 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos ); + transformVertex( _vB.set( 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos ); + transformVertex( _vC.set( 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos ); + + _uvA.set( 0, 0 ); + _uvB.set( 1, 0 ); + _uvC.set( 1, 1 ); + + // check first triangle + let intersect = raycaster.ray.intersectTriangle( _vA, _vB, _vC, false, _intersectPoint ); + + if ( intersect === null ) { + + // check second triangle + transformVertex( _vB.set( - 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos ); + _uvB.set( 0, 1 ); + + intersect = raycaster.ray.intersectTriangle( _vA, _vC, _vB, false, _intersectPoint ); + if ( intersect === null ) { + + return; + + } + + } + + const distance = raycaster.ray.origin.distanceTo( _intersectPoint ); + + if ( distance < raycaster.near || distance > raycaster.far ) return; + + intersects.push( { + + distance: distance, + point: _intersectPoint.clone(), + uv: Triangle.getInterpolation( _intersectPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2() ), + face: null, + object: this + + } ); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + if ( source.center !== undefined ) this.center.copy( source.center ); + + this.material = source.material; + + return this; + + } + +} + +function transformVertex( vertexPosition, mvPosition, center, scale, sin, cos ) { + + // compute position in camera space + _alignedPosition.subVectors( vertexPosition, center ).addScalar( 0.5 ).multiply( scale ); + + // to check if rotation is not zero + if ( sin !== undefined ) { + + _rotatedPosition.x = ( cos * _alignedPosition.x ) - ( sin * _alignedPosition.y ); + _rotatedPosition.y = ( sin * _alignedPosition.x ) + ( cos * _alignedPosition.y ); + + } else { + + _rotatedPosition.copy( _alignedPosition ); + + } + + + vertexPosition.copy( mvPosition ); + vertexPosition.x += _rotatedPosition.x; + vertexPosition.y += _rotatedPosition.y; + + // transform to world space + vertexPosition.applyMatrix4( _viewWorldMatrix ); + +} + +const _v1$2 = /*@__PURE__*/ new Vector3(); +const _v2$1 = /*@__PURE__*/ new Vector3(); + +class LOD extends Object3D { + + constructor() { + + super(); + + this._currentLevel = 0; + + this.type = 'LOD'; + + Object.defineProperties( this, { + levels: { + enumerable: true, + value: [] + }, + isLOD: { + value: true, + } + } ); + + this.autoUpdate = true; + + } + + copy( source ) { + + super.copy( source, false ); + + const levels = source.levels; + + for ( let i = 0, l = levels.length; i < l; i ++ ) { + + const level = levels[ i ]; + + this.addLevel( level.object.clone(), level.distance, level.hysteresis ); + + } + + this.autoUpdate = source.autoUpdate; + + return this; + + } + + addLevel( object, distance = 0, hysteresis = 0 ) { + + distance = Math.abs( distance ); + + const levels = this.levels; + + let l; + + for ( l = 0; l < levels.length; l ++ ) { + + if ( distance < levels[ l ].distance ) { + + break; + + } + + } + + levels.splice( l, 0, { distance: distance, hysteresis: hysteresis, object: object } ); + + this.add( object ); + + return this; + + } + + getCurrentLevel() { + + return this._currentLevel; + + } + + + + getObjectForDistance( distance ) { + + const levels = this.levels; + + if ( levels.length > 0 ) { + + let i, l; + + for ( i = 1, l = levels.length; i < l; i ++ ) { + + let levelDistance = levels[ i ].distance; + + if ( levels[ i ].object.visible ) { + + levelDistance -= levelDistance * levels[ i ].hysteresis; + + } + + if ( distance < levelDistance ) { + + break; + + } + + } + + return levels[ i - 1 ].object; + + } + + return null; + + } + + raycast( raycaster, intersects ) { + + const levels = this.levels; + + if ( levels.length > 0 ) { + + _v1$2.setFromMatrixPosition( this.matrixWorld ); + + const distance = raycaster.ray.origin.distanceTo( _v1$2 ); + + this.getObjectForDistance( distance ).raycast( raycaster, intersects ); + + } + + } + + update( camera ) { + + const levels = this.levels; + + if ( levels.length > 1 ) { + + _v1$2.setFromMatrixPosition( camera.matrixWorld ); + _v2$1.setFromMatrixPosition( this.matrixWorld ); + + const distance = _v1$2.distanceTo( _v2$1 ) / camera.zoom; + + levels[ 0 ].object.visible = true; + + let i, l; + + for ( i = 1, l = levels.length; i < l; i ++ ) { + + let levelDistance = levels[ i ].distance; + + if ( levels[ i ].object.visible ) { + + levelDistance -= levelDistance * levels[ i ].hysteresis; + + } + + if ( distance >= levelDistance ) { + + levels[ i - 1 ].object.visible = false; + levels[ i ].object.visible = true; + + } else { + + break; + + } + + } + + this._currentLevel = i - 1; + + for ( ; i < l; i ++ ) { + + levels[ i ].object.visible = false; + + } + + } + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + if ( this.autoUpdate === false ) data.object.autoUpdate = false; + + data.object.levels = []; + + const levels = this.levels; + + for ( let i = 0, l = levels.length; i < l; i ++ ) { + + const level = levels[ i ]; + + data.object.levels.push( { + object: level.object.uuid, + distance: level.distance, + hysteresis: level.hysteresis + } ); + + } + + return data; + + } + +} + +const _basePosition = /*@__PURE__*/ new Vector3(); + +const _skinIndex = /*@__PURE__*/ new Vector4(); +const _skinWeight = /*@__PURE__*/ new Vector4(); + +const _vector3 = /*@__PURE__*/ new Vector3(); +const _matrix4 = /*@__PURE__*/ new Matrix4(); +const _vertex = /*@__PURE__*/ new Vector3(); + +const _sphere$4 = /*@__PURE__*/ new Sphere(); +const _inverseMatrix$2 = /*@__PURE__*/ new Matrix4(); +const _ray$2 = /*@__PURE__*/ new Ray(); + +class SkinnedMesh extends Mesh { + + constructor( geometry, material ) { + + super( geometry, material ); + + this.isSkinnedMesh = true; + + this.type = 'SkinnedMesh'; + + this.bindMode = AttachedBindMode; + this.bindMatrix = new Matrix4(); + this.bindMatrixInverse = new Matrix4(); + + this.boundingBox = null; + this.boundingSphere = null; + + } + + computeBoundingBox() { + + const geometry = this.geometry; + + if ( this.boundingBox === null ) { + + this.boundingBox = new Box3(); + + } + + this.boundingBox.makeEmpty(); + + const positionAttribute = geometry.getAttribute( 'position' ); + + for ( let i = 0; i < positionAttribute.count; i ++ ) { + + this.getVertexPosition( i, _vertex ); + this.boundingBox.expandByPoint( _vertex ); + + } + + } + + computeBoundingSphere() { + + const geometry = this.geometry; + + if ( this.boundingSphere === null ) { + + this.boundingSphere = new Sphere(); + + } + + this.boundingSphere.makeEmpty(); + + const positionAttribute = geometry.getAttribute( 'position' ); + + for ( let i = 0; i < positionAttribute.count; i ++ ) { + + this.getVertexPosition( i, _vertex ); + this.boundingSphere.expandByPoint( _vertex ); + + } + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.bindMode = source.bindMode; + this.bindMatrix.copy( source.bindMatrix ); + this.bindMatrixInverse.copy( source.bindMatrixInverse ); + + this.skeleton = source.skeleton; + + if ( source.boundingBox !== null ) this.boundingBox = source.boundingBox.clone(); + if ( source.boundingSphere !== null ) this.boundingSphere = source.boundingSphere.clone(); + + return this; + + } + + raycast( raycaster, intersects ) { + + const material = this.material; + const matrixWorld = this.matrixWorld; + + if ( material === undefined ) return; + + // test with bounding sphere in world space + + if ( this.boundingSphere === null ) this.computeBoundingSphere(); + + _sphere$4.copy( this.boundingSphere ); + _sphere$4.applyMatrix4( matrixWorld ); + + if ( raycaster.ray.intersectsSphere( _sphere$4 ) === false ) return; + + // convert ray to local space of skinned mesh + + _inverseMatrix$2.copy( matrixWorld ).invert(); + _ray$2.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$2 ); + + // test with bounding box in local space + + if ( this.boundingBox !== null ) { + + if ( _ray$2.intersectsBox( this.boundingBox ) === false ) return; + + } + + // test for intersections with geometry + + this._computeIntersections( raycaster, intersects, _ray$2 ); + + } + + getVertexPosition( index, target ) { + + super.getVertexPosition( index, target ); + + this.applyBoneTransform( index, target ); + + return target; + + } + + bind( skeleton, bindMatrix ) { + + this.skeleton = skeleton; + + if ( bindMatrix === undefined ) { + + this.updateMatrixWorld( true ); + + this.skeleton.calculateInverses(); + + bindMatrix = this.matrixWorld; + + } + + this.bindMatrix.copy( bindMatrix ); + this.bindMatrixInverse.copy( bindMatrix ).invert(); + + } + + pose() { + + this.skeleton.pose(); + + } + + normalizeSkinWeights() { + + const vector = new Vector4(); + + const skinWeight = this.geometry.attributes.skinWeight; + + for ( let i = 0, l = skinWeight.count; i < l; i ++ ) { + + vector.fromBufferAttribute( skinWeight, i ); + + const scale = 1.0 / vector.manhattanLength(); + + if ( scale !== Infinity ) { + + vector.multiplyScalar( scale ); + + } else { + + vector.set( 1, 0, 0, 0 ); // do something reasonable + + } + + skinWeight.setXYZW( i, vector.x, vector.y, vector.z, vector.w ); + + } + + } + + updateMatrixWorld( force ) { + + super.updateMatrixWorld( force ); + + if ( this.bindMode === AttachedBindMode ) { + + this.bindMatrixInverse.copy( this.matrixWorld ).invert(); + + } else if ( this.bindMode === DetachedBindMode ) { + + this.bindMatrixInverse.copy( this.bindMatrix ).invert(); + + } else { + + console.warn( 'THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode ); + + } + + } + + applyBoneTransform( index, vector ) { + + const skeleton = this.skeleton; + const geometry = this.geometry; + + _skinIndex.fromBufferAttribute( geometry.attributes.skinIndex, index ); + _skinWeight.fromBufferAttribute( geometry.attributes.skinWeight, index ); + + _basePosition.copy( vector ).applyMatrix4( this.bindMatrix ); + + vector.set( 0, 0, 0 ); + + for ( let i = 0; i < 4; i ++ ) { + + const weight = _skinWeight.getComponent( i ); + + if ( weight !== 0 ) { + + const boneIndex = _skinIndex.getComponent( i ); + + _matrix4.multiplyMatrices( skeleton.bones[ boneIndex ].matrixWorld, skeleton.boneInverses[ boneIndex ] ); + + vector.addScaledVector( _vector3.copy( _basePosition ).applyMatrix4( _matrix4 ), weight ); + + } + + } + + return vector.applyMatrix4( this.bindMatrixInverse ); + + } + +} + +class Bone extends Object3D { + + constructor() { + + super(); + + this.isBone = true; + + this.type = 'Bone'; + + } + +} + +class DataTexture extends Texture { + + constructor( data = null, width = 1, height = 1, format, type, mapping, wrapS, wrapT, magFilter = NearestFilter, minFilter = NearestFilter, anisotropy, colorSpace ) { + + super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace ); + + this.isDataTexture = true; + + this.image = { data: data, width: width, height: height }; + + this.generateMipmaps = false; + this.flipY = false; + this.unpackAlignment = 1; + + } + +} + +const _offsetMatrix = /*@__PURE__*/ new Matrix4(); +const _identityMatrix$1 = /*@__PURE__*/ new Matrix4(); + +class Skeleton { + + constructor( bones = [], boneInverses = [] ) { + + this.uuid = generateUUID(); + + this.bones = bones.slice( 0 ); + this.boneInverses = boneInverses; + this.boneMatrices = null; + + this.boneTexture = null; + + this.init(); + + } + + init() { + + const bones = this.bones; + const boneInverses = this.boneInverses; + + this.boneMatrices = new Float32Array( bones.length * 16 ); + + // calculate inverse bone matrices if necessary + + if ( boneInverses.length === 0 ) { + + this.calculateInverses(); + + } else { + + // handle special case + + if ( bones.length !== boneInverses.length ) { + + console.warn( 'THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.' ); + + this.boneInverses = []; + + for ( let i = 0, il = this.bones.length; i < il; i ++ ) { + + this.boneInverses.push( new Matrix4() ); + + } + + } + + } + + } + + calculateInverses() { + + this.boneInverses.length = 0; + + for ( let i = 0, il = this.bones.length; i < il; i ++ ) { + + const inverse = new Matrix4(); + + if ( this.bones[ i ] ) { + + inverse.copy( this.bones[ i ].matrixWorld ).invert(); + + } + + this.boneInverses.push( inverse ); + + } + + } + + pose() { + + // recover the bind-time world matrices + + for ( let i = 0, il = this.bones.length; i < il; i ++ ) { + + const bone = this.bones[ i ]; + + if ( bone ) { + + bone.matrixWorld.copy( this.boneInverses[ i ] ).invert(); + + } + + } + + // compute the local matrices, positions, rotations and scales + + for ( let i = 0, il = this.bones.length; i < il; i ++ ) { + + const bone = this.bones[ i ]; + + if ( bone ) { + + if ( bone.parent && bone.parent.isBone ) { + + bone.matrix.copy( bone.parent.matrixWorld ).invert(); + bone.matrix.multiply( bone.matrixWorld ); + + } else { + + bone.matrix.copy( bone.matrixWorld ); + + } + + bone.matrix.decompose( bone.position, bone.quaternion, bone.scale ); + + } + + } + + } + + update() { + + const bones = this.bones; + const boneInverses = this.boneInverses; + const boneMatrices = this.boneMatrices; + const boneTexture = this.boneTexture; + + // flatten bone matrices to array + + for ( let i = 0, il = bones.length; i < il; i ++ ) { + + // compute the offset between the current and the original transform + + const matrix = bones[ i ] ? bones[ i ].matrixWorld : _identityMatrix$1; + + _offsetMatrix.multiplyMatrices( matrix, boneInverses[ i ] ); + _offsetMatrix.toArray( boneMatrices, i * 16 ); + + } + + if ( boneTexture !== null ) { + + boneTexture.needsUpdate = true; + + } + + } + + clone() { + + return new Skeleton( this.bones, this.boneInverses ); + + } + + computeBoneTexture() { + + // layout (1 matrix = 4 pixels) + // RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4) + // with 8x8 pixel texture max 16 bones * 4 pixels = (8 * 8) + // 16x16 pixel texture max 64 bones * 4 pixels = (16 * 16) + // 32x32 pixel texture max 256 bones * 4 pixels = (32 * 32) + // 64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64) + + let size = Math.sqrt( this.bones.length * 4 ); // 4 pixels needed for 1 matrix + size = Math.ceil( size / 4 ) * 4; + size = Math.max( size, 4 ); + + const boneMatrices = new Float32Array( size * size * 4 ); // 4 floats per RGBA pixel + boneMatrices.set( this.boneMatrices ); // copy current values + + const boneTexture = new DataTexture( boneMatrices, size, size, RGBAFormat, FloatType ); + boneTexture.needsUpdate = true; + + this.boneMatrices = boneMatrices; + this.boneTexture = boneTexture; + + return this; + + } + + getBoneByName( name ) { + + for ( let i = 0, il = this.bones.length; i < il; i ++ ) { + + const bone = this.bones[ i ]; + + if ( bone.name === name ) { + + return bone; + + } + + } + + return undefined; + + } + + dispose( ) { + + if ( this.boneTexture !== null ) { + + this.boneTexture.dispose(); + + this.boneTexture = null; + + } + + } + + fromJSON( json, bones ) { + + this.uuid = json.uuid; + + for ( let i = 0, l = json.bones.length; i < l; i ++ ) { + + const uuid = json.bones[ i ]; + let bone = bones[ uuid ]; + + if ( bone === undefined ) { + + console.warn( 'THREE.Skeleton: No bone found with UUID:', uuid ); + bone = new Bone(); + + } + + this.bones.push( bone ); + this.boneInverses.push( new Matrix4().fromArray( json.boneInverses[ i ] ) ); + + } + + this.init(); + + return this; + + } + + toJSON() { + + const data = { + metadata: { + version: 4.6, + type: 'Skeleton', + generator: 'Skeleton.toJSON' + }, + bones: [], + boneInverses: [] + }; + + data.uuid = this.uuid; + + const bones = this.bones; + const boneInverses = this.boneInverses; + + for ( let i = 0, l = bones.length; i < l; i ++ ) { + + const bone = bones[ i ]; + data.bones.push( bone.uuid ); + + const boneInverse = boneInverses[ i ]; + data.boneInverses.push( boneInverse.toArray() ); + + } + + return data; + + } + +} + +class InstancedBufferAttribute extends BufferAttribute { + + constructor( array, itemSize, normalized, meshPerAttribute = 1 ) { + + super( array, itemSize, normalized ); + + this.isInstancedBufferAttribute = true; + + this.meshPerAttribute = meshPerAttribute; + + } + + copy( source ) { + + super.copy( source ); + + this.meshPerAttribute = source.meshPerAttribute; + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.meshPerAttribute = this.meshPerAttribute; + + data.isInstancedBufferAttribute = true; + + return data; + + } + +} + +const _instanceLocalMatrix = /*@__PURE__*/ new Matrix4(); +const _instanceWorldMatrix = /*@__PURE__*/ new Matrix4(); + +const _instanceIntersects = []; + +const _box3 = /*@__PURE__*/ new Box3(); +const _identity = /*@__PURE__*/ new Matrix4(); +const _mesh$1 = /*@__PURE__*/ new Mesh(); +const _sphere$3 = /*@__PURE__*/ new Sphere(); + +class InstancedMesh extends Mesh { + + constructor( geometry, material, count ) { + + super( geometry, material ); + + this.isInstancedMesh = true; + + this.instanceMatrix = new InstancedBufferAttribute( new Float32Array( count * 16 ), 16 ); + this.instanceColor = null; + this.morphTexture = null; + + this.count = count; + + this.boundingBox = null; + this.boundingSphere = null; + + for ( let i = 0; i < count; i ++ ) { + + this.setMatrixAt( i, _identity ); + + } + + } + + computeBoundingBox() { + + const geometry = this.geometry; + const count = this.count; + + if ( this.boundingBox === null ) { + + this.boundingBox = new Box3(); + + } + + if ( geometry.boundingBox === null ) { + + geometry.computeBoundingBox(); + + } + + this.boundingBox.makeEmpty(); + + for ( let i = 0; i < count; i ++ ) { + + this.getMatrixAt( i, _instanceLocalMatrix ); + + _box3.copy( geometry.boundingBox ).applyMatrix4( _instanceLocalMatrix ); + + this.boundingBox.union( _box3 ); + + } + + } + + computeBoundingSphere() { + + const geometry = this.geometry; + const count = this.count; + + if ( this.boundingSphere === null ) { + + this.boundingSphere = new Sphere(); + + } + + if ( geometry.boundingSphere === null ) { + + geometry.computeBoundingSphere(); + + } + + this.boundingSphere.makeEmpty(); + + for ( let i = 0; i < count; i ++ ) { + + this.getMatrixAt( i, _instanceLocalMatrix ); + + _sphere$3.copy( geometry.boundingSphere ).applyMatrix4( _instanceLocalMatrix ); + + this.boundingSphere.union( _sphere$3 ); + + } + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.instanceMatrix.copy( source.instanceMatrix ); + + if ( source.morphTexture !== null ) this.morphTexture = source.morphTexture.clone(); + if ( source.instanceColor !== null ) this.instanceColor = source.instanceColor.clone(); + + this.count = source.count; + + if ( source.boundingBox !== null ) this.boundingBox = source.boundingBox.clone(); + if ( source.boundingSphere !== null ) this.boundingSphere = source.boundingSphere.clone(); + + return this; + + } + + getColorAt( index, color ) { + + color.fromArray( this.instanceColor.array, index * 3 ); + + } + + getMatrixAt( index, matrix ) { + + matrix.fromArray( this.instanceMatrix.array, index * 16 ); + + } + + getMorphAt( index, object ) { + + const objectInfluences = object.morphTargetInfluences; + + const array = this.morphTexture.source.data.data; + + const len = objectInfluences.length + 1; // All influences + the baseInfluenceSum + + const dataIndex = index * len + 1; // Skip the baseInfluenceSum at the beginning + + for ( let i = 0; i < objectInfluences.length; i ++ ) { + + objectInfluences[ i ] = array[ dataIndex + i ]; + + } + + } + + raycast( raycaster, intersects ) { + + const matrixWorld = this.matrixWorld; + const raycastTimes = this.count; + + _mesh$1.geometry = this.geometry; + _mesh$1.material = this.material; + + if ( _mesh$1.material === undefined ) return; + + // test with bounding sphere first + + if ( this.boundingSphere === null ) this.computeBoundingSphere(); + + _sphere$3.copy( this.boundingSphere ); + _sphere$3.applyMatrix4( matrixWorld ); + + if ( raycaster.ray.intersectsSphere( _sphere$3 ) === false ) return; + + // now test each instance + + for ( let instanceId = 0; instanceId < raycastTimes; instanceId ++ ) { + + // calculate the world matrix for each instance + + this.getMatrixAt( instanceId, _instanceLocalMatrix ); + + _instanceWorldMatrix.multiplyMatrices( matrixWorld, _instanceLocalMatrix ); + + // the mesh represents this single instance + + _mesh$1.matrixWorld = _instanceWorldMatrix; + + _mesh$1.raycast( raycaster, _instanceIntersects ); + + // process the result of raycast + + for ( let i = 0, l = _instanceIntersects.length; i < l; i ++ ) { + + const intersect = _instanceIntersects[ i ]; + intersect.instanceId = instanceId; + intersect.object = this; + intersects.push( intersect ); + + } + + _instanceIntersects.length = 0; + + } + + } + + setColorAt( index, color ) { + + if ( this.instanceColor === null ) { + + this.instanceColor = new InstancedBufferAttribute( new Float32Array( this.instanceMatrix.count * 3 ), 3 ); + + } + + color.toArray( this.instanceColor.array, index * 3 ); + + } + + setMatrixAt( index, matrix ) { + + matrix.toArray( this.instanceMatrix.array, index * 16 ); + + } + + setMorphAt( index, object ) { + + const objectInfluences = object.morphTargetInfluences; + + const len = objectInfluences.length + 1; // morphBaseInfluence + all influences + + if ( this.morphTexture === null ) { + + this.morphTexture = new DataTexture( new Float32Array( len * this.count ), len, this.count, RedFormat, FloatType ); + + } + + const array = this.morphTexture.source.data.data; + + let morphInfluencesSum = 0; + + for ( let i = 0; i < objectInfluences.length; i ++ ) { + + morphInfluencesSum += objectInfluences[ i ]; + + } + + const morphBaseInfluence = this.geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum; + + const dataIndex = len * index; + + array[ dataIndex ] = morphBaseInfluence; + + array.set( objectInfluences, dataIndex + 1 ); + + } + + updateMorphTargets() { + + } + + dispose() { + + this.dispatchEvent( { type: 'dispose' } ); + + if ( this.morphTexture !== null ) { + + this.morphTexture.dispose(); + this.morphTexture = null; + + } + + return this; + + } + +} + +function sortOpaque( a, b ) { + + return a.z - b.z; + +} + +function sortTransparent( a, b ) { + + return b.z - a.z; + +} + +class MultiDrawRenderList { + + constructor() { + + this.index = 0; + this.pool = []; + this.list = []; + + } + + push( drawRange, z ) { + + const pool = this.pool; + const list = this.list; + if ( this.index >= pool.length ) { + + pool.push( { + + start: - 1, + count: - 1, + z: - 1, + + } ); + + } + + const item = pool[ this.index ]; + list.push( item ); + this.index ++; + + item.start = drawRange.start; + item.count = drawRange.count; + item.z = z; + + } + + reset() { + + this.list.length = 0; + this.index = 0; + + } + +} + +const ID_ATTR_NAME = 'batchId'; +const _matrix$1 = /*@__PURE__*/ new Matrix4(); +const _invMatrixWorld = /*@__PURE__*/ new Matrix4(); +const _identityMatrix = /*@__PURE__*/ new Matrix4(); +const _projScreenMatrix$2 = /*@__PURE__*/ new Matrix4(); +const _frustum = /*@__PURE__*/ new Frustum(); +const _box$1 = /*@__PURE__*/ new Box3(); +const _sphere$2 = /*@__PURE__*/ new Sphere(); +const _vector$5 = /*@__PURE__*/ new Vector3(); +const _renderList = /*@__PURE__*/ new MultiDrawRenderList(); +const _mesh = /*@__PURE__*/ new Mesh(); +const _batchIntersects = []; + +// @TODO: SkinnedMesh support? +// @TODO: geometry.groups support? +// @TODO: geometry.drawRange support? +// @TODO: geometry.morphAttributes support? +// @TODO: Support uniform parameter per geometry +// @TODO: Add an "optimize" function to pack geometry and remove data gaps + +// copies data from attribute "src" into "target" starting at "targetOffset" +function copyAttributeData( src, target, targetOffset = 0 ) { + + const itemSize = target.itemSize; + if ( src.isInterleavedBufferAttribute || src.array.constructor !== target.array.constructor ) { + + // use the component getters and setters if the array data cannot + // be copied directly + const vertexCount = src.count; + for ( let i = 0; i < vertexCount; i ++ ) { + + for ( let c = 0; c < itemSize; c ++ ) { + + target.setComponent( i + targetOffset, c, src.getComponent( i, c ) ); + + } + + } + + } else { + + // faster copy approach using typed array set function + target.array.set( src.array, targetOffset * itemSize ); + + } + + target.needsUpdate = true; + +} + +class BatchedMesh extends Mesh { + + get maxGeometryCount() { + + return this._maxGeometryCount; + + } + + constructor( maxGeometryCount, maxVertexCount, maxIndexCount = maxVertexCount * 2, material ) { + + super( new BufferGeometry(), material ); + + this.isBatchedMesh = true; + this.perObjectFrustumCulled = true; + this.sortObjects = true; + this.boundingBox = null; + this.boundingSphere = null; + this.customSort = null; + + this._drawRanges = []; + this._reservedRanges = []; + + this._visibility = []; + this._active = []; + this._bounds = []; + + this._maxGeometryCount = maxGeometryCount; + this._maxVertexCount = maxVertexCount; + this._maxIndexCount = maxIndexCount; + + this._geometryInitialized = false; + this._geometryCount = 0; + this._multiDrawCounts = new Int32Array( maxGeometryCount ); + this._multiDrawStarts = new Int32Array( maxGeometryCount ); + this._multiDrawCount = 0; + this._multiDrawInstances = null; + this._visibilityChanged = true; + + // Local matrix per geometry by using data texture + this._matricesTexture = null; + + this._initMatricesTexture(); + + } + + _initMatricesTexture() { + + // layout (1 matrix = 4 pixels) + // RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4) + // with 8x8 pixel texture max 16 matrices * 4 pixels = (8 * 8) + // 16x16 pixel texture max 64 matrices * 4 pixels = (16 * 16) + // 32x32 pixel texture max 256 matrices * 4 pixels = (32 * 32) + // 64x64 pixel texture max 1024 matrices * 4 pixels = (64 * 64) + + let size = Math.sqrt( this._maxGeometryCount * 4 ); // 4 pixels needed for 1 matrix + size = Math.ceil( size / 4 ) * 4; + size = Math.max( size, 4 ); + + const matricesArray = new Float32Array( size * size * 4 ); // 4 floats per RGBA pixel + const matricesTexture = new DataTexture( matricesArray, size, size, RGBAFormat, FloatType ); + + this._matricesTexture = matricesTexture; + + } + + _initializeGeometry( reference ) { + + const geometry = this.geometry; + const maxVertexCount = this._maxVertexCount; + const maxGeometryCount = this._maxGeometryCount; + const maxIndexCount = this._maxIndexCount; + if ( this._geometryInitialized === false ) { + + for ( const attributeName in reference.attributes ) { + + const srcAttribute = reference.getAttribute( attributeName ); + const { array, itemSize, normalized } = srcAttribute; + + const dstArray = new array.constructor( maxVertexCount * itemSize ); + const dstAttribute = new BufferAttribute( dstArray, itemSize, normalized ); + + geometry.setAttribute( attributeName, dstAttribute ); + + } + + if ( reference.getIndex() !== null ) { + + const indexArray = maxVertexCount > 65536 + ? new Uint32Array( maxIndexCount ) + : new Uint16Array( maxIndexCount ); + + geometry.setIndex( new BufferAttribute( indexArray, 1 ) ); + + } + + const idArray = maxGeometryCount > 65536 + ? new Uint32Array( maxVertexCount ) + : new Uint16Array( maxVertexCount ); + geometry.setAttribute( ID_ATTR_NAME, new BufferAttribute( idArray, 1 ) ); + + this._geometryInitialized = true; + + } + + } + + // Make sure the geometry is compatible with the existing combined geometry attributes + _validateGeometry( geometry ) { + + // check that the geometry doesn't have a version of our reserved id attribute + if ( geometry.getAttribute( ID_ATTR_NAME ) ) { + + throw new Error( `BatchedMesh: Geometry cannot use attribute "${ ID_ATTR_NAME }"` ); + + } + + // check to ensure the geometries are using consistent attributes and indices + const batchGeometry = this.geometry; + if ( Boolean( geometry.getIndex() ) !== Boolean( batchGeometry.getIndex() ) ) { + + throw new Error( 'BatchedMesh: All geometries must consistently have "index".' ); + + } + + for ( const attributeName in batchGeometry.attributes ) { + + if ( attributeName === ID_ATTR_NAME ) { + + continue; + + } + + if ( ! geometry.hasAttribute( attributeName ) ) { + + throw new Error( `BatchedMesh: Added geometry missing "${ attributeName }". All geometries must have consistent attributes.` ); + + } + + const srcAttribute = geometry.getAttribute( attributeName ); + const dstAttribute = batchGeometry.getAttribute( attributeName ); + if ( srcAttribute.itemSize !== dstAttribute.itemSize || srcAttribute.normalized !== dstAttribute.normalized ) { + + throw new Error( 'BatchedMesh: All attributes must have a consistent itemSize and normalized value.' ); + + } + + } + + } + + setCustomSort( func ) { + + this.customSort = func; + return this; + + } + + computeBoundingBox() { + + if ( this.boundingBox === null ) { + + this.boundingBox = new Box3(); + + } + + const geometryCount = this._geometryCount; + const boundingBox = this.boundingBox; + const active = this._active; + + boundingBox.makeEmpty(); + for ( let i = 0; i < geometryCount; i ++ ) { + + if ( active[ i ] === false ) continue; + + this.getMatrixAt( i, _matrix$1 ); + this.getBoundingBoxAt( i, _box$1 ).applyMatrix4( _matrix$1 ); + boundingBox.union( _box$1 ); + + } + + } + + computeBoundingSphere() { + + if ( this.boundingSphere === null ) { + + this.boundingSphere = new Sphere(); + + } + + const geometryCount = this._geometryCount; + const boundingSphere = this.boundingSphere; + const active = this._active; + + boundingSphere.makeEmpty(); + for ( let i = 0; i < geometryCount; i ++ ) { + + if ( active[ i ] === false ) continue; + + this.getMatrixAt( i, _matrix$1 ); + this.getBoundingSphereAt( i, _sphere$2 ).applyMatrix4( _matrix$1 ); + boundingSphere.union( _sphere$2 ); + + } + + } + + addGeometry( geometry, vertexCount = - 1, indexCount = - 1 ) { + + this._initializeGeometry( geometry ); + + this._validateGeometry( geometry ); + + // ensure we're not over geometry + if ( this._geometryCount >= this._maxGeometryCount ) { + + throw new Error( 'BatchedMesh: Maximum geometry count reached.' ); + + } + + // get the necessary range fo the geometry + const reservedRange = { + vertexStart: - 1, + vertexCount: - 1, + indexStart: - 1, + indexCount: - 1, + }; + + let lastRange = null; + const reservedRanges = this._reservedRanges; + const drawRanges = this._drawRanges; + const bounds = this._bounds; + if ( this._geometryCount !== 0 ) { + + lastRange = reservedRanges[ reservedRanges.length - 1 ]; + + } + + if ( vertexCount === - 1 ) { + + reservedRange.vertexCount = geometry.getAttribute( 'position' ).count; + + } else { + + reservedRange.vertexCount = vertexCount; + + } + + if ( lastRange === null ) { + + reservedRange.vertexStart = 0; + + } else { + + reservedRange.vertexStart = lastRange.vertexStart + lastRange.vertexCount; + + } + + const index = geometry.getIndex(); + const hasIndex = index !== null; + if ( hasIndex ) { + + if ( indexCount === - 1 ) { + + reservedRange.indexCount = index.count; + + } else { + + reservedRange.indexCount = indexCount; + + } + + if ( lastRange === null ) { + + reservedRange.indexStart = 0; + + } else { + + reservedRange.indexStart = lastRange.indexStart + lastRange.indexCount; + + } + + } + + if ( + reservedRange.indexStart !== - 1 && + reservedRange.indexStart + reservedRange.indexCount > this._maxIndexCount || + reservedRange.vertexStart + reservedRange.vertexCount > this._maxVertexCount + ) { + + throw new Error( 'BatchedMesh: Reserved space request exceeds the maximum buffer size.' ); + + } + + const visibility = this._visibility; + const active = this._active; + const matricesTexture = this._matricesTexture; + const matricesArray = this._matricesTexture.image.data; + + // push new visibility states + visibility.push( true ); + active.push( true ); + + // update id + const geometryId = this._geometryCount; + this._geometryCount ++; + + // initialize matrix information + _identityMatrix.toArray( matricesArray, geometryId * 16 ); + matricesTexture.needsUpdate = true; + + // add the reserved range and draw range objects + reservedRanges.push( reservedRange ); + drawRanges.push( { + start: hasIndex ? reservedRange.indexStart : reservedRange.vertexStart, + count: - 1 + } ); + bounds.push( { + boxInitialized: false, + box: new Box3(), + + sphereInitialized: false, + sphere: new Sphere() + } ); + + // set the id for the geometry + const idAttribute = this.geometry.getAttribute( ID_ATTR_NAME ); + for ( let i = 0; i < reservedRange.vertexCount; i ++ ) { + + idAttribute.setX( reservedRange.vertexStart + i, geometryId ); + + } + + idAttribute.needsUpdate = true; + + // update the geometry + this.setGeometryAt( geometryId, geometry ); + + return geometryId; + + } + + setGeometryAt( id, geometry ) { + + if ( id >= this._geometryCount ) { + + throw new Error( 'BatchedMesh: Maximum geometry count reached.' ); + + } + + this._validateGeometry( geometry ); + + const batchGeometry = this.geometry; + const hasIndex = batchGeometry.getIndex() !== null; + const dstIndex = batchGeometry.getIndex(); + const srcIndex = geometry.getIndex(); + const reservedRange = this._reservedRanges[ id ]; + if ( + hasIndex && + srcIndex.count > reservedRange.indexCount || + geometry.attributes.position.count > reservedRange.vertexCount + ) { + + throw new Error( 'BatchedMesh: Reserved space not large enough for provided geometry.' ); + + } + + // copy geometry over + const vertexStart = reservedRange.vertexStart; + const vertexCount = reservedRange.vertexCount; + for ( const attributeName in batchGeometry.attributes ) { + + if ( attributeName === ID_ATTR_NAME ) { + + continue; + + } + + // copy attribute data + const srcAttribute = geometry.getAttribute( attributeName ); + const dstAttribute = batchGeometry.getAttribute( attributeName ); + copyAttributeData( srcAttribute, dstAttribute, vertexStart ); + + // fill the rest in with zeroes + const itemSize = srcAttribute.itemSize; + for ( let i = srcAttribute.count, l = vertexCount; i < l; i ++ ) { + + const index = vertexStart + i; + for ( let c = 0; c < itemSize; c ++ ) { + + dstAttribute.setComponent( index, c, 0 ); + + } + + } + + dstAttribute.needsUpdate = true; + dstAttribute.addUpdateRange( vertexStart * itemSize, vertexCount * itemSize ); + + } + + // copy index + if ( hasIndex ) { + + const indexStart = reservedRange.indexStart; + + // copy index data over + for ( let i = 0; i < srcIndex.count; i ++ ) { + + dstIndex.setX( indexStart + i, vertexStart + srcIndex.getX( i ) ); + + } + + // fill the rest in with zeroes + for ( let i = srcIndex.count, l = reservedRange.indexCount; i < l; i ++ ) { + + dstIndex.setX( indexStart + i, vertexStart ); + + } + + dstIndex.needsUpdate = true; + dstIndex.addUpdateRange( indexStart, reservedRange.indexCount ); + + } + + // store the bounding boxes + const bound = this._bounds[ id ]; + if ( geometry.boundingBox !== null ) { + + bound.box.copy( geometry.boundingBox ); + bound.boxInitialized = true; + + } else { + + bound.boxInitialized = false; + + } + + if ( geometry.boundingSphere !== null ) { + + bound.sphere.copy( geometry.boundingSphere ); + bound.sphereInitialized = true; + + } else { + + bound.sphereInitialized = false; + + } + + // set drawRange count + const drawRange = this._drawRanges[ id ]; + const posAttr = geometry.getAttribute( 'position' ); + drawRange.count = hasIndex ? srcIndex.count : posAttr.count; + this._visibilityChanged = true; + + return id; + + } + + deleteGeometry( geometryId ) { + + // Note: User needs to call optimize() afterward to pack the data. + + const active = this._active; + if ( geometryId >= active.length || active[ geometryId ] === false ) { + + return this; + + } + + active[ geometryId ] = false; + this._visibilityChanged = true; + + return this; + + } + + getInstanceCountAt( id ) { + + if ( this._multiDrawInstances === null ) return null; + + return this._multiDrawInstances[ id ]; + + } + + setInstanceCountAt( id, instanceCount ) { + + if ( this._multiDrawInstances === null ) { + + this._multiDrawInstances = new Int32Array( this._maxGeometryCount ).fill( 1 ); + + } + + this._multiDrawInstances[ id ] = instanceCount; + + return id; + + } + + // get bounding box and compute it if it doesn't exist + getBoundingBoxAt( id, target ) { + + const active = this._active; + if ( active[ id ] === false ) { + + return null; + + } + + // compute bounding box + const bound = this._bounds[ id ]; + const box = bound.box; + const geometry = this.geometry; + if ( bound.boxInitialized === false ) { + + box.makeEmpty(); + + const index = geometry.index; + const position = geometry.attributes.position; + const drawRange = this._drawRanges[ id ]; + for ( let i = drawRange.start, l = drawRange.start + drawRange.count; i < l; i ++ ) { + + let iv = i; + if ( index ) { + + iv = index.getX( iv ); + + } + + box.expandByPoint( _vector$5.fromBufferAttribute( position, iv ) ); + + } + + bound.boxInitialized = true; + + } + + target.copy( box ); + return target; + + } + + // get bounding sphere and compute it if it doesn't exist + getBoundingSphereAt( id, target ) { + + const active = this._active; + if ( active[ id ] === false ) { + + return null; + + } + + // compute bounding sphere + const bound = this._bounds[ id ]; + const sphere = bound.sphere; + const geometry = this.geometry; + if ( bound.sphereInitialized === false ) { + + sphere.makeEmpty(); + + this.getBoundingBoxAt( id, _box$1 ); + _box$1.getCenter( sphere.center ); + + const index = geometry.index; + const position = geometry.attributes.position; + const drawRange = this._drawRanges[ id ]; + + let maxRadiusSq = 0; + for ( let i = drawRange.start, l = drawRange.start + drawRange.count; i < l; i ++ ) { + + let iv = i; + if ( index ) { + + iv = index.getX( iv ); + + } + + _vector$5.fromBufferAttribute( position, iv ); + maxRadiusSq = Math.max( maxRadiusSq, sphere.center.distanceToSquared( _vector$5 ) ); + + } + + sphere.radius = Math.sqrt( maxRadiusSq ); + bound.sphereInitialized = true; + + } + + target.copy( sphere ); + return target; + + } + + setMatrixAt( geometryId, matrix ) { + + // @TODO: Map geometryId to index of the arrays because + // optimize() can make geometryId mismatch the index + + const active = this._active; + const matricesTexture = this._matricesTexture; + const matricesArray = this._matricesTexture.image.data; + const geometryCount = this._geometryCount; + if ( geometryId >= geometryCount || active[ geometryId ] === false ) { + + return this; + + } + + matrix.toArray( matricesArray, geometryId * 16 ); + matricesTexture.needsUpdate = true; + + return this; + + } + + getMatrixAt( geometryId, matrix ) { + + const active = this._active; + const matricesArray = this._matricesTexture.image.data; + const geometryCount = this._geometryCount; + if ( geometryId >= geometryCount || active[ geometryId ] === false ) { + + return null; + + } + + return matrix.fromArray( matricesArray, geometryId * 16 ); + + } + + setVisibleAt( geometryId, value ) { + + const visibility = this._visibility; + const active = this._active; + const geometryCount = this._geometryCount; + + // if the geometry is out of range, not active, or visibility state + // does not change then return early + if ( + geometryId >= geometryCount || + active[ geometryId ] === false || + visibility[ geometryId ] === value + ) { + + return this; + + } + + visibility[ geometryId ] = value; + this._visibilityChanged = true; + + return this; + + } + + getVisibleAt( geometryId ) { + + const visibility = this._visibility; + const active = this._active; + const geometryCount = this._geometryCount; + + // return early if the geometry is out of range or not active + if ( geometryId >= geometryCount || active[ geometryId ] === false ) { + + return false; + + } + + return visibility[ geometryId ]; + + } + + raycast( raycaster, intersects ) { + + const visibility = this._visibility; + const active = this._active; + const drawRanges = this._drawRanges; + const geometryCount = this._geometryCount; + const matrixWorld = this.matrixWorld; + const batchGeometry = this.geometry; + + // iterate over each geometry + _mesh.material = this.material; + _mesh.geometry.index = batchGeometry.index; + _mesh.geometry.attributes = batchGeometry.attributes; + if ( _mesh.geometry.boundingBox === null ) { + + _mesh.geometry.boundingBox = new Box3(); + + } + + if ( _mesh.geometry.boundingSphere === null ) { + + _mesh.geometry.boundingSphere = new Sphere(); + + } + + for ( let i = 0; i < geometryCount; i ++ ) { + + if ( ! visibility[ i ] || ! active[ i ] ) { + + continue; + + } + + const drawRange = drawRanges[ i ]; + _mesh.geometry.setDrawRange( drawRange.start, drawRange.count ); + + // ge the intersects + this.getMatrixAt( i, _mesh.matrixWorld ).premultiply( matrixWorld ); + this.getBoundingBoxAt( i, _mesh.geometry.boundingBox ); + this.getBoundingSphereAt( i, _mesh.geometry.boundingSphere ); + _mesh.raycast( raycaster, _batchIntersects ); + + // add batch id to the intersects + for ( let j = 0, l = _batchIntersects.length; j < l; j ++ ) { + + const intersect = _batchIntersects[ j ]; + intersect.object = this; + intersect.batchId = i; + intersects.push( intersect ); + + } + + _batchIntersects.length = 0; + + } + + _mesh.material = null; + _mesh.geometry.index = null; + _mesh.geometry.attributes = {}; + _mesh.geometry.setDrawRange( 0, Infinity ); + + } + + copy( source ) { + + super.copy( source ); + + this.geometry = source.geometry.clone(); + this.perObjectFrustumCulled = source.perObjectFrustumCulled; + this.sortObjects = source.sortObjects; + this.boundingBox = source.boundingBox !== null ? source.boundingBox.clone() : null; + this.boundingSphere = source.boundingSphere !== null ? source.boundingSphere.clone() : null; + + this._drawRanges = source._drawRanges.map( range => ( { ...range } ) ); + this._reservedRanges = source._reservedRanges.map( range => ( { ...range } ) ); + + this._visibility = source._visibility.slice(); + this._active = source._active.slice(); + this._bounds = source._bounds.map( bound => ( { + boxInitialized: bound.boxInitialized, + box: bound.box.clone(), + + sphereInitialized: bound.sphereInitialized, + sphere: bound.sphere.clone() + } ) ); + + this._maxGeometryCount = source._maxGeometryCount; + this._maxVertexCount = source._maxVertexCount; + this._maxIndexCount = source._maxIndexCount; + + this._geometryInitialized = source._geometryInitialized; + this._geometryCount = source._geometryCount; + this._multiDrawCounts = source._multiDrawCounts.slice(); + this._multiDrawStarts = source._multiDrawStarts.slice(); + + this._matricesTexture = source._matricesTexture.clone(); + this._matricesTexture.image.data = this._matricesTexture.image.slice(); + + return this; + + } + + dispose() { + + // Assuming the geometry is not shared with other meshes + this.geometry.dispose(); + + this._matricesTexture.dispose(); + this._matricesTexture = null; + return this; + + } + + onBeforeRender( renderer, scene, camera, geometry, material/*, _group*/ ) { + + // if visibility has not changed and frustum culling and object sorting is not required + // then skip iterating over all items + if ( ! this._visibilityChanged && ! this.perObjectFrustumCulled && ! this.sortObjects ) { + + return; + + } + + // the indexed version of the multi draw function requires specifying the start + // offset in bytes. + const index = geometry.getIndex(); + const bytesPerElement = index === null ? 1 : index.array.BYTES_PER_ELEMENT; + + const active = this._active; + const visibility = this._visibility; + const multiDrawStarts = this._multiDrawStarts; + const multiDrawCounts = this._multiDrawCounts; + const drawRanges = this._drawRanges; + const perObjectFrustumCulled = this.perObjectFrustumCulled; + + // prepare the frustum in the local frame + if ( perObjectFrustumCulled ) { + + _projScreenMatrix$2 + .multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse ) + .multiply( this.matrixWorld ); + _frustum.setFromProjectionMatrix( + _projScreenMatrix$2, + renderer.coordinateSystem + ); + + } + + let count = 0; + if ( this.sortObjects ) { + + // get the camera position in the local frame + _invMatrixWorld.copy( this.matrixWorld ).invert(); + _vector$5.setFromMatrixPosition( camera.matrixWorld ).applyMatrix4( _invMatrixWorld ); + + for ( let i = 0, l = visibility.length; i < l; i ++ ) { + + if ( visibility[ i ] && active[ i ] ) { + + // get the bounds in world space + this.getMatrixAt( i, _matrix$1 ); + this.getBoundingSphereAt( i, _sphere$2 ).applyMatrix4( _matrix$1 ); + + // determine whether the batched geometry is within the frustum + let culled = false; + if ( perObjectFrustumCulled ) { + + culled = ! _frustum.intersectsSphere( _sphere$2 ); + + } + + if ( ! culled ) { + + // get the distance from camera used for sorting + const z = _vector$5.distanceTo( _sphere$2.center ); + _renderList.push( drawRanges[ i ], z ); + + } + + } + + } + + // Sort the draw ranges and prep for rendering + const list = _renderList.list; + const customSort = this.customSort; + if ( customSort === null ) { + + list.sort( material.transparent ? sortTransparent : sortOpaque ); + + } else { + + customSort.call( this, list, camera ); + + } + + for ( let i = 0, l = list.length; i < l; i ++ ) { + + const item = list[ i ]; + multiDrawStarts[ count ] = item.start * bytesPerElement; + multiDrawCounts[ count ] = item.count; + count ++; + + } + + _renderList.reset(); + + } else { + + for ( let i = 0, l = visibility.length; i < l; i ++ ) { + + if ( visibility[ i ] && active[ i ] ) { + + // determine whether the batched geometry is within the frustum + let culled = false; + if ( perObjectFrustumCulled ) { + + // get the bounds in world space + this.getMatrixAt( i, _matrix$1 ); + this.getBoundingSphereAt( i, _sphere$2 ).applyMatrix4( _matrix$1 ); + culled = ! _frustum.intersectsSphere( _sphere$2 ); + + } + + if ( ! culled ) { + + const range = drawRanges[ i ]; + multiDrawStarts[ count ] = range.start * bytesPerElement; + multiDrawCounts[ count ] = range.count; + count ++; + + } + + } + + } + + } + + this._multiDrawCount = count; + this._visibilityChanged = false; + + } + + onBeforeShadow( renderer, object, camera, shadowCamera, geometry, depthMaterial/* , group */ ) { + + this.onBeforeRender( renderer, null, shadowCamera, geometry, depthMaterial ); + + } + +} + +class LineBasicMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isLineBasicMaterial = true; + + this.type = 'LineBasicMaterial'; + + this.color = new Color( 0xffffff ); + + this.map = null; + + this.linewidth = 1; + this.linecap = 'round'; + this.linejoin = 'round'; + + this.fog = true; + + this.setValues( parameters ); + + } + + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.map = source.map; + + this.linewidth = source.linewidth; + this.linecap = source.linecap; + this.linejoin = source.linejoin; + + this.fog = source.fog; + + return this; + + } + +} + +const _vStart = /*@__PURE__*/ new Vector3(); +const _vEnd = /*@__PURE__*/ new Vector3(); + +const _inverseMatrix$1 = /*@__PURE__*/ new Matrix4(); +const _ray$1 = /*@__PURE__*/ new Ray(); +const _sphere$1 = /*@__PURE__*/ new Sphere(); + +const _intersectPointOnRay = /*@__PURE__*/ new Vector3(); +const _intersectPointOnSegment = /*@__PURE__*/ new Vector3(); + +class Line extends Object3D { + + constructor( geometry = new BufferGeometry(), material = new LineBasicMaterial() ) { + + super(); + + this.isLine = true; + + this.type = 'Line'; + + this.geometry = geometry; + this.material = material; + + this.updateMorphTargets(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.material = Array.isArray( source.material ) ? source.material.slice() : source.material; + this.geometry = source.geometry; + + return this; + + } + + computeLineDistances() { + + const geometry = this.geometry; + + // we assume non-indexed geometry + + if ( geometry.index === null ) { + + const positionAttribute = geometry.attributes.position; + const lineDistances = [ 0 ]; + + for ( let i = 1, l = positionAttribute.count; i < l; i ++ ) { + + _vStart.fromBufferAttribute( positionAttribute, i - 1 ); + _vEnd.fromBufferAttribute( positionAttribute, i ); + + lineDistances[ i ] = lineDistances[ i - 1 ]; + lineDistances[ i ] += _vStart.distanceTo( _vEnd ); + + } + + geometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) ); + + } else { + + console.warn( 'THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' ); + + } + + return this; + + } + + raycast( raycaster, intersects ) { + + const geometry = this.geometry; + const matrixWorld = this.matrixWorld; + const threshold = raycaster.params.Line.threshold; + const drawRange = geometry.drawRange; + + // Checking boundingSphere distance to ray + + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + + _sphere$1.copy( geometry.boundingSphere ); + _sphere$1.applyMatrix4( matrixWorld ); + _sphere$1.radius += threshold; + + if ( raycaster.ray.intersectsSphere( _sphere$1 ) === false ) return; + + // + + _inverseMatrix$1.copy( matrixWorld ).invert(); + _ray$1.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$1 ); + + const localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 ); + const localThresholdSq = localThreshold * localThreshold; + + const step = this.isLineSegments ? 2 : 1; + + const index = geometry.index; + const attributes = geometry.attributes; + const positionAttribute = attributes.position; + + if ( index !== null ) { + + const start = Math.max( 0, drawRange.start ); + const end = Math.min( index.count, ( drawRange.start + drawRange.count ) ); + + for ( let i = start, l = end - 1; i < l; i += step ) { + + const a = index.getX( i ); + const b = index.getX( i + 1 ); + + const intersect = checkIntersection( this, raycaster, _ray$1, localThresholdSq, a, b ); + + if ( intersect ) { + + intersects.push( intersect ); + + } + + } + + if ( this.isLineLoop ) { + + const a = index.getX( end - 1 ); + const b = index.getX( start ); + + const intersect = checkIntersection( this, raycaster, _ray$1, localThresholdSq, a, b ); + + if ( intersect ) { + + intersects.push( intersect ); + + } + + } + + } else { + + const start = Math.max( 0, drawRange.start ); + const end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) ); + + for ( let i = start, l = end - 1; i < l; i += step ) { + + const intersect = checkIntersection( this, raycaster, _ray$1, localThresholdSq, i, i + 1 ); + + if ( intersect ) { + + intersects.push( intersect ); + + } + + } + + if ( this.isLineLoop ) { + + const intersect = checkIntersection( this, raycaster, _ray$1, localThresholdSq, end - 1, start ); + + if ( intersect ) { + + intersects.push( intersect ); + + } + + } + + } + + } + + updateMorphTargets() { + + const geometry = this.geometry; + + const morphAttributes = geometry.morphAttributes; + const keys = Object.keys( morphAttributes ); + + if ( keys.length > 0 ) { + + const morphAttribute = morphAttributes[ keys[ 0 ] ]; + + if ( morphAttribute !== undefined ) { + + this.morphTargetInfluences = []; + this.morphTargetDictionary = {}; + + for ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) { + + const name = morphAttribute[ m ].name || String( m ); + + this.morphTargetInfluences.push( 0 ); + this.morphTargetDictionary[ name ] = m; + + } + + } + + } + + } + +} + +function checkIntersection( object, raycaster, ray, thresholdSq, a, b ) { + + const positionAttribute = object.geometry.attributes.position; + + _vStart.fromBufferAttribute( positionAttribute, a ); + _vEnd.fromBufferAttribute( positionAttribute, b ); + + const distSq = ray.distanceSqToSegment( _vStart, _vEnd, _intersectPointOnRay, _intersectPointOnSegment ); + + if ( distSq > thresholdSq ) return; + + _intersectPointOnRay.applyMatrix4( object.matrixWorld ); // Move back to world space for distance calculation + + const distance = raycaster.ray.origin.distanceTo( _intersectPointOnRay ); + + if ( distance < raycaster.near || distance > raycaster.far ) return; + + return { + + distance: distance, + // What do we want? intersection point on the ray or on the segment?? + // point: raycaster.ray.at( distance ), + point: _intersectPointOnSegment.clone().applyMatrix4( object.matrixWorld ), + index: a, + face: null, + faceIndex: null, + object: object + + }; + +} + +const _start = /*@__PURE__*/ new Vector3(); +const _end = /*@__PURE__*/ new Vector3(); + +class LineSegments extends Line { + + constructor( geometry, material ) { + + super( geometry, material ); + + this.isLineSegments = true; + + this.type = 'LineSegments'; + + } + + computeLineDistances() { + + const geometry = this.geometry; + + // we assume non-indexed geometry + + if ( geometry.index === null ) { + + const positionAttribute = geometry.attributes.position; + const lineDistances = []; + + for ( let i = 0, l = positionAttribute.count; i < l; i += 2 ) { + + _start.fromBufferAttribute( positionAttribute, i ); + _end.fromBufferAttribute( positionAttribute, i + 1 ); + + lineDistances[ i ] = ( i === 0 ) ? 0 : lineDistances[ i - 1 ]; + lineDistances[ i + 1 ] = lineDistances[ i ] + _start.distanceTo( _end ); + + } + + geometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) ); + + } else { + + console.warn( 'THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' ); + + } + + return this; + + } + +} + +class LineLoop extends Line { + + constructor( geometry, material ) { + + super( geometry, material ); + + this.isLineLoop = true; + + this.type = 'LineLoop'; + + } + +} + +class PointsMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isPointsMaterial = true; + + this.type = 'PointsMaterial'; + + this.color = new Color( 0xffffff ); + + this.map = null; + + this.alphaMap = null; + + this.size = 1; + this.sizeAttenuation = true; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.map = source.map; + + this.alphaMap = source.alphaMap; + + this.size = source.size; + this.sizeAttenuation = source.sizeAttenuation; + + this.fog = source.fog; + + return this; + + } + +} + +const _inverseMatrix = /*@__PURE__*/ new Matrix4(); +const _ray = /*@__PURE__*/ new Ray(); +const _sphere = /*@__PURE__*/ new Sphere(); +const _position$2 = /*@__PURE__*/ new Vector3(); + +class Points extends Object3D { + + constructor( geometry = new BufferGeometry(), material = new PointsMaterial() ) { + + super(); + + this.isPoints = true; + + this.type = 'Points'; + + this.geometry = geometry; + this.material = material; + + this.updateMorphTargets(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.material = Array.isArray( source.material ) ? source.material.slice() : source.material; + this.geometry = source.geometry; + + return this; + + } + + raycast( raycaster, intersects ) { + + const geometry = this.geometry; + const matrixWorld = this.matrixWorld; + const threshold = raycaster.params.Points.threshold; + const drawRange = geometry.drawRange; + + // Checking boundingSphere distance to ray + + if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); + + _sphere.copy( geometry.boundingSphere ); + _sphere.applyMatrix4( matrixWorld ); + _sphere.radius += threshold; + + if ( raycaster.ray.intersectsSphere( _sphere ) === false ) return; + + // + + _inverseMatrix.copy( matrixWorld ).invert(); + _ray.copy( raycaster.ray ).applyMatrix4( _inverseMatrix ); + + const localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 ); + const localThresholdSq = localThreshold * localThreshold; + + const index = geometry.index; + const attributes = geometry.attributes; + const positionAttribute = attributes.position; + + if ( index !== null ) { + + const start = Math.max( 0, drawRange.start ); + const end = Math.min( index.count, ( drawRange.start + drawRange.count ) ); + + for ( let i = start, il = end; i < il; i ++ ) { + + const a = index.getX( i ); + + _position$2.fromBufferAttribute( positionAttribute, a ); + + testPoint( _position$2, a, localThresholdSq, matrixWorld, raycaster, intersects, this ); + + } + + } else { + + const start = Math.max( 0, drawRange.start ); + const end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) ); + + for ( let i = start, l = end; i < l; i ++ ) { + + _position$2.fromBufferAttribute( positionAttribute, i ); + + testPoint( _position$2, i, localThresholdSq, matrixWorld, raycaster, intersects, this ); + + } + + } + + } + + updateMorphTargets() { + + const geometry = this.geometry; + + const morphAttributes = geometry.morphAttributes; + const keys = Object.keys( morphAttributes ); + + if ( keys.length > 0 ) { + + const morphAttribute = morphAttributes[ keys[ 0 ] ]; + + if ( morphAttribute !== undefined ) { + + this.morphTargetInfluences = []; + this.morphTargetDictionary = {}; + + for ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) { + + const name = morphAttribute[ m ].name || String( m ); + + this.morphTargetInfluences.push( 0 ); + this.morphTargetDictionary[ name ] = m; + + } + + } + + } + + } + +} + +function testPoint( point, index, localThresholdSq, matrixWorld, raycaster, intersects, object ) { + + const rayPointDistanceSq = _ray.distanceSqToPoint( point ); + + if ( rayPointDistanceSq < localThresholdSq ) { + + const intersectPoint = new Vector3(); + + _ray.closestPointToPoint( point, intersectPoint ); + intersectPoint.applyMatrix4( matrixWorld ); + + const distance = raycaster.ray.origin.distanceTo( intersectPoint ); + + if ( distance < raycaster.near || distance > raycaster.far ) return; + + intersects.push( { + + distance: distance, + distanceToRay: Math.sqrt( rayPointDistanceSq ), + point: intersectPoint, + index: index, + face: null, + object: object + + } ); + + } + +} + +class VideoTexture extends Texture { + + constructor( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) { + + super( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ); + + this.isVideoTexture = true; + + this.minFilter = minFilter !== undefined ? minFilter : LinearFilter; + this.magFilter = magFilter !== undefined ? magFilter : LinearFilter; + + this.generateMipmaps = false; + + const scope = this; + + function updateVideo() { + + scope.needsUpdate = true; + video.requestVideoFrameCallback( updateVideo ); + + } + + if ( 'requestVideoFrameCallback' in video ) { + + video.requestVideoFrameCallback( updateVideo ); + + } + + } + + clone() { + + return new this.constructor( this.image ).copy( this ); + + } + + update() { + + const video = this.image; + const hasVideoFrameCallback = 'requestVideoFrameCallback' in video; + + if ( hasVideoFrameCallback === false && video.readyState >= video.HAVE_CURRENT_DATA ) { + + this.needsUpdate = true; + + } + + } + +} + +class FramebufferTexture extends Texture { + + constructor( width, height ) { + + super( { width, height } ); + + this.isFramebufferTexture = true; + + this.magFilter = NearestFilter; + this.minFilter = NearestFilter; + + this.generateMipmaps = false; + + this.needsUpdate = true; + + } + +} + +class CompressedTexture extends Texture { + + constructor( mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, colorSpace ) { + + super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, colorSpace ); + + this.isCompressedTexture = true; + + this.image = { width: width, height: height }; + this.mipmaps = mipmaps; + + // no flipping for cube textures + // (also flipping doesn't work for compressed textures ) + + this.flipY = false; + + // can't generate mipmaps for compressed textures + // mips must be embedded in DDS files + + this.generateMipmaps = false; + + } + +} + +class CompressedArrayTexture extends CompressedTexture { + + constructor( mipmaps, width, height, depth, format, type ) { + + super( mipmaps, width, height, format, type ); + + this.isCompressedArrayTexture = true; + this.image.depth = depth; + this.wrapR = ClampToEdgeWrapping; + + } + +} + +class CompressedCubeTexture extends CompressedTexture { + + constructor( images, format, type ) { + + super( undefined, images[ 0 ].width, images[ 0 ].height, format, type, CubeReflectionMapping ); + + this.isCompressedCubeTexture = true; + this.isCubeTexture = true; + + this.image = images; + + } + +} + +class CanvasTexture extends Texture { + + constructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) { + + super( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ); + + this.isCanvasTexture = true; + + this.needsUpdate = true; + + } + +} + +/** + * Extensible curve object. + * + * Some common of curve methods: + * .getPoint( t, optionalTarget ), .getTangent( t, optionalTarget ) + * .getPointAt( u, optionalTarget ), .getTangentAt( u, optionalTarget ) + * .getPoints(), .getSpacedPoints() + * .getLength() + * .updateArcLengths() + * + * This following curves inherit from THREE.Curve: + * + * -- 2D curves -- + * THREE.ArcCurve + * THREE.CubicBezierCurve + * THREE.EllipseCurve + * THREE.LineCurve + * THREE.QuadraticBezierCurve + * THREE.SplineCurve + * + * -- 3D curves -- + * THREE.CatmullRomCurve3 + * THREE.CubicBezierCurve3 + * THREE.LineCurve3 + * THREE.QuadraticBezierCurve3 + * + * A series of curves can be represented as a THREE.CurvePath. + * + **/ + +class Curve { + + constructor() { + + this.type = 'Curve'; + + this.arcLengthDivisions = 200; + + } + + // Virtual base class method to overwrite and implement in subclasses + // - t [0 .. 1] + + getPoint( /* t, optionalTarget */ ) { + + console.warn( 'THREE.Curve: .getPoint() not implemented.' ); + return null; + + } + + // Get point at relative position in curve according to arc length + // - u [0 .. 1] + + getPointAt( u, optionalTarget ) { + + const t = this.getUtoTmapping( u ); + return this.getPoint( t, optionalTarget ); + + } + + // Get sequence of points using getPoint( t ) + + getPoints( divisions = 5 ) { + + const points = []; + + for ( let d = 0; d <= divisions; d ++ ) { + + points.push( this.getPoint( d / divisions ) ); + + } + + return points; + + } + + // Get sequence of points using getPointAt( u ) + + getSpacedPoints( divisions = 5 ) { + + const points = []; + + for ( let d = 0; d <= divisions; d ++ ) { + + points.push( this.getPointAt( d / divisions ) ); + + } + + return points; + + } + + // Get total curve arc length + + getLength() { + + const lengths = this.getLengths(); + return lengths[ lengths.length - 1 ]; + + } + + // Get list of cumulative segment lengths + + getLengths( divisions = this.arcLengthDivisions ) { + + if ( this.cacheArcLengths && + ( this.cacheArcLengths.length === divisions + 1 ) && + ! this.needsUpdate ) { + + return this.cacheArcLengths; + + } + + this.needsUpdate = false; + + const cache = []; + let current, last = this.getPoint( 0 ); + let sum = 0; + + cache.push( 0 ); + + for ( let p = 1; p <= divisions; p ++ ) { + + current = this.getPoint( p / divisions ); + sum += current.distanceTo( last ); + cache.push( sum ); + last = current; + + } + + this.cacheArcLengths = cache; + + return cache; // { sums: cache, sum: sum }; Sum is in the last element. + + } + + updateArcLengths() { + + this.needsUpdate = true; + this.getLengths(); + + } + + // Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant + + getUtoTmapping( u, distance ) { + + const arcLengths = this.getLengths(); + + let i = 0; + const il = arcLengths.length; + + let targetArcLength; // The targeted u distance value to get + + if ( distance ) { + + targetArcLength = distance; + + } else { + + targetArcLength = u * arcLengths[ il - 1 ]; + + } + + // binary search for the index with largest value smaller than target u distance + + let low = 0, high = il - 1, comparison; + + while ( low <= high ) { + + i = Math.floor( low + ( high - low ) / 2 ); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats + + comparison = arcLengths[ i ] - targetArcLength; + + if ( comparison < 0 ) { + + low = i + 1; + + } else if ( comparison > 0 ) { + + high = i - 1; + + } else { + + high = i; + break; + + // DONE + + } + + } + + i = high; + + if ( arcLengths[ i ] === targetArcLength ) { + + return i / ( il - 1 ); + + } + + // we could get finer grain at lengths, or use simple interpolation between two points + + const lengthBefore = arcLengths[ i ]; + const lengthAfter = arcLengths[ i + 1 ]; + + const segmentLength = lengthAfter - lengthBefore; + + // determine where we are between the 'before' and 'after' points + + const segmentFraction = ( targetArcLength - lengthBefore ) / segmentLength; + + // add that fractional amount to t + + const t = ( i + segmentFraction ) / ( il - 1 ); + + return t; + + } + + // Returns a unit vector tangent at t + // In case any sub curve does not implement its tangent derivation, + // 2 points a small delta apart will be used to find its gradient + // which seems to give a reasonable approximation + + getTangent( t, optionalTarget ) { + + const delta = 0.0001; + let t1 = t - delta; + let t2 = t + delta; + + // Capping in case of danger + + if ( t1 < 0 ) t1 = 0; + if ( t2 > 1 ) t2 = 1; + + const pt1 = this.getPoint( t1 ); + const pt2 = this.getPoint( t2 ); + + const tangent = optionalTarget || ( ( pt1.isVector2 ) ? new Vector2() : new Vector3() ); + + tangent.copy( pt2 ).sub( pt1 ).normalize(); + + return tangent; + + } + + getTangentAt( u, optionalTarget ) { + + const t = this.getUtoTmapping( u ); + return this.getTangent( t, optionalTarget ); + + } + + computeFrenetFrames( segments, closed ) { + + // see http://www.cs.indiana.edu/pub/techreports/TR425.pdf + + const normal = new Vector3(); + + const tangents = []; + const normals = []; + const binormals = []; + + const vec = new Vector3(); + const mat = new Matrix4(); + + // compute the tangent vectors for each segment on the curve + + for ( let i = 0; i <= segments; i ++ ) { + + const u = i / segments; + + tangents[ i ] = this.getTangentAt( u, new Vector3() ); + + } + + // select an initial normal vector perpendicular to the first tangent vector, + // and in the direction of the minimum tangent xyz component + + normals[ 0 ] = new Vector3(); + binormals[ 0 ] = new Vector3(); + let min = Number.MAX_VALUE; + const tx = Math.abs( tangents[ 0 ].x ); + const ty = Math.abs( tangents[ 0 ].y ); + const tz = Math.abs( tangents[ 0 ].z ); + + if ( tx <= min ) { + + min = tx; + normal.set( 1, 0, 0 ); + + } + + if ( ty <= min ) { + + min = ty; + normal.set( 0, 1, 0 ); + + } + + if ( tz <= min ) { + + normal.set( 0, 0, 1 ); + + } + + vec.crossVectors( tangents[ 0 ], normal ).normalize(); + + normals[ 0 ].crossVectors( tangents[ 0 ], vec ); + binormals[ 0 ].crossVectors( tangents[ 0 ], normals[ 0 ] ); + + + // compute the slowly-varying normal and binormal vectors for each segment on the curve + + for ( let i = 1; i <= segments; i ++ ) { + + normals[ i ] = normals[ i - 1 ].clone(); + + binormals[ i ] = binormals[ i - 1 ].clone(); + + vec.crossVectors( tangents[ i - 1 ], tangents[ i ] ); + + if ( vec.length() > Number.EPSILON ) { + + vec.normalize(); + + const theta = Math.acos( clamp( tangents[ i - 1 ].dot( tangents[ i ] ), - 1, 1 ) ); // clamp for floating pt errors + + normals[ i ].applyMatrix4( mat.makeRotationAxis( vec, theta ) ); + + } + + binormals[ i ].crossVectors( tangents[ i ], normals[ i ] ); + + } + + // if the curve is closed, postprocess the vectors so the first and last normal vectors are the same + + if ( closed === true ) { + + let theta = Math.acos( clamp( normals[ 0 ].dot( normals[ segments ] ), - 1, 1 ) ); + theta /= segments; + + if ( tangents[ 0 ].dot( vec.crossVectors( normals[ 0 ], normals[ segments ] ) ) > 0 ) { + + theta = - theta; + + } + + for ( let i = 1; i <= segments; i ++ ) { + + // twist a little... + normals[ i ].applyMatrix4( mat.makeRotationAxis( tangents[ i ], theta * i ) ); + binormals[ i ].crossVectors( tangents[ i ], normals[ i ] ); + + } + + } + + return { + tangents: tangents, + normals: normals, + binormals: binormals + }; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( source ) { + + this.arcLengthDivisions = source.arcLengthDivisions; + + return this; + + } + + toJSON() { + + const data = { + metadata: { + version: 4.6, + type: 'Curve', + generator: 'Curve.toJSON' + } + }; + + data.arcLengthDivisions = this.arcLengthDivisions; + data.type = this.type; + + return data; + + } + + fromJSON( json ) { + + this.arcLengthDivisions = json.arcLengthDivisions; + + return this; + + } + +} + +class EllipseCurve extends Curve { + + constructor( aX = 0, aY = 0, xRadius = 1, yRadius = 1, aStartAngle = 0, aEndAngle = Math.PI * 2, aClockwise = false, aRotation = 0 ) { + + super(); + + this.isEllipseCurve = true; + + this.type = 'EllipseCurve'; + + this.aX = aX; + this.aY = aY; + + this.xRadius = xRadius; + this.yRadius = yRadius; + + this.aStartAngle = aStartAngle; + this.aEndAngle = aEndAngle; + + this.aClockwise = aClockwise; + + this.aRotation = aRotation; + + } + + getPoint( t, optionalTarget = new Vector2() ) { + + const point = optionalTarget; + + const twoPi = Math.PI * 2; + let deltaAngle = this.aEndAngle - this.aStartAngle; + const samePoints = Math.abs( deltaAngle ) < Number.EPSILON; + + // ensures that deltaAngle is 0 .. 2 PI + while ( deltaAngle < 0 ) deltaAngle += twoPi; + while ( deltaAngle > twoPi ) deltaAngle -= twoPi; + + if ( deltaAngle < Number.EPSILON ) { + + if ( samePoints ) { + + deltaAngle = 0; + + } else { + + deltaAngle = twoPi; + + } + + } + + if ( this.aClockwise === true && ! samePoints ) { + + if ( deltaAngle === twoPi ) { + + deltaAngle = - twoPi; + + } else { + + deltaAngle = deltaAngle - twoPi; + + } + + } + + const angle = this.aStartAngle + t * deltaAngle; + let x = this.aX + this.xRadius * Math.cos( angle ); + let y = this.aY + this.yRadius * Math.sin( angle ); + + if ( this.aRotation !== 0 ) { + + const cos = Math.cos( this.aRotation ); + const sin = Math.sin( this.aRotation ); + + const tx = x - this.aX; + const ty = y - this.aY; + + // Rotate the point about the center of the ellipse. + x = tx * cos - ty * sin + this.aX; + y = tx * sin + ty * cos + this.aY; + + } + + return point.set( x, y ); + + } + + copy( source ) { + + super.copy( source ); + + this.aX = source.aX; + this.aY = source.aY; + + this.xRadius = source.xRadius; + this.yRadius = source.yRadius; + + this.aStartAngle = source.aStartAngle; + this.aEndAngle = source.aEndAngle; + + this.aClockwise = source.aClockwise; + + this.aRotation = source.aRotation; + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.aX = this.aX; + data.aY = this.aY; + + data.xRadius = this.xRadius; + data.yRadius = this.yRadius; + + data.aStartAngle = this.aStartAngle; + data.aEndAngle = this.aEndAngle; + + data.aClockwise = this.aClockwise; + + data.aRotation = this.aRotation; + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.aX = json.aX; + this.aY = json.aY; + + this.xRadius = json.xRadius; + this.yRadius = json.yRadius; + + this.aStartAngle = json.aStartAngle; + this.aEndAngle = json.aEndAngle; + + this.aClockwise = json.aClockwise; + + this.aRotation = json.aRotation; + + return this; + + } + +} + +class ArcCurve extends EllipseCurve { + + constructor( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) { + + super( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise ); + + this.isArcCurve = true; + + this.type = 'ArcCurve'; + + } + +} + +/** + * Centripetal CatmullRom Curve - which is useful for avoiding + * cusps and self-intersections in non-uniform catmull rom curves. + * http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf + * + * curve.type accepts centripetal(default), chordal and catmullrom + * curve.tension is used for catmullrom which defaults to 0.5 + */ + + +/* +Based on an optimized c++ solution in + - http://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/ + - http://ideone.com/NoEbVM + +This CubicPoly class could be used for reusing some variables and calculations, +but for three.js curve use, it could be possible inlined and flatten into a single function call +which can be placed in CurveUtils. +*/ + +function CubicPoly() { + + let c0 = 0, c1 = 0, c2 = 0, c3 = 0; + + /* + * Compute coefficients for a cubic polynomial + * p(s) = c0 + c1*s + c2*s^2 + c3*s^3 + * such that + * p(0) = x0, p(1) = x1 + * and + * p'(0) = t0, p'(1) = t1. + */ + function init( x0, x1, t0, t1 ) { + + c0 = x0; + c1 = t0; + c2 = - 3 * x0 + 3 * x1 - 2 * t0 - t1; + c3 = 2 * x0 - 2 * x1 + t0 + t1; + + } + + return { + + initCatmullRom: function ( x0, x1, x2, x3, tension ) { + + init( x1, x2, tension * ( x2 - x0 ), tension * ( x3 - x1 ) ); + + }, + + initNonuniformCatmullRom: function ( x0, x1, x2, x3, dt0, dt1, dt2 ) { + + // compute tangents when parameterized in [t1,t2] + let t1 = ( x1 - x0 ) / dt0 - ( x2 - x0 ) / ( dt0 + dt1 ) + ( x2 - x1 ) / dt1; + let t2 = ( x2 - x1 ) / dt1 - ( x3 - x1 ) / ( dt1 + dt2 ) + ( x3 - x2 ) / dt2; + + // rescale tangents for parametrization in [0,1] + t1 *= dt1; + t2 *= dt1; + + init( x1, x2, t1, t2 ); + + }, + + calc: function ( t ) { + + const t2 = t * t; + const t3 = t2 * t; + return c0 + c1 * t + c2 * t2 + c3 * t3; + + } + + }; + +} + +// + +const tmp = /*@__PURE__*/ new Vector3(); +const px = /*@__PURE__*/ new CubicPoly(); +const py = /*@__PURE__*/ new CubicPoly(); +const pz = /*@__PURE__*/ new CubicPoly(); + +class CatmullRomCurve3 extends Curve { + + constructor( points = [], closed = false, curveType = 'centripetal', tension = 0.5 ) { + + super(); + + this.isCatmullRomCurve3 = true; + + this.type = 'CatmullRomCurve3'; + + this.points = points; + this.closed = closed; + this.curveType = curveType; + this.tension = tension; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + const points = this.points; + const l = points.length; + + const p = ( l - ( this.closed ? 0 : 1 ) ) * t; + let intPoint = Math.floor( p ); + let weight = p - intPoint; + + if ( this.closed ) { + + intPoint += intPoint > 0 ? 0 : ( Math.floor( Math.abs( intPoint ) / l ) + 1 ) * l; + + } else if ( weight === 0 && intPoint === l - 1 ) { + + intPoint = l - 2; + weight = 1; + + } + + let p0, p3; // 4 points (p1 & p2 defined below) + + if ( this.closed || intPoint > 0 ) { + + p0 = points[ ( intPoint - 1 ) % l ]; + + } else { + + // extrapolate first point + tmp.subVectors( points[ 0 ], points[ 1 ] ).add( points[ 0 ] ); + p0 = tmp; + + } + + const p1 = points[ intPoint % l ]; + const p2 = points[ ( intPoint + 1 ) % l ]; + + if ( this.closed || intPoint + 2 < l ) { + + p3 = points[ ( intPoint + 2 ) % l ]; + + } else { + + // extrapolate last point + tmp.subVectors( points[ l - 1 ], points[ l - 2 ] ).add( points[ l - 1 ] ); + p3 = tmp; + + } + + if ( this.curveType === 'centripetal' || this.curveType === 'chordal' ) { + + // init Centripetal / Chordal Catmull-Rom + const pow = this.curveType === 'chordal' ? 0.5 : 0.25; + let dt0 = Math.pow( p0.distanceToSquared( p1 ), pow ); + let dt1 = Math.pow( p1.distanceToSquared( p2 ), pow ); + let dt2 = Math.pow( p2.distanceToSquared( p3 ), pow ); + + // safety check for repeated points + if ( dt1 < 1e-4 ) dt1 = 1.0; + if ( dt0 < 1e-4 ) dt0 = dt1; + if ( dt2 < 1e-4 ) dt2 = dt1; + + px.initNonuniformCatmullRom( p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2 ); + py.initNonuniformCatmullRom( p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2 ); + pz.initNonuniformCatmullRom( p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2 ); + + } else if ( this.curveType === 'catmullrom' ) { + + px.initCatmullRom( p0.x, p1.x, p2.x, p3.x, this.tension ); + py.initCatmullRom( p0.y, p1.y, p2.y, p3.y, this.tension ); + pz.initCatmullRom( p0.z, p1.z, p2.z, p3.z, this.tension ); + + } + + point.set( + px.calc( weight ), + py.calc( weight ), + pz.calc( weight ) + ); + + return point; + + } + + copy( source ) { + + super.copy( source ); + + this.points = []; + + for ( let i = 0, l = source.points.length; i < l; i ++ ) { + + const point = source.points[ i ]; + + this.points.push( point.clone() ); + + } + + this.closed = source.closed; + this.curveType = source.curveType; + this.tension = source.tension; + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.points = []; + + for ( let i = 0, l = this.points.length; i < l; i ++ ) { + + const point = this.points[ i ]; + data.points.push( point.toArray() ); + + } + + data.closed = this.closed; + data.curveType = this.curveType; + data.tension = this.tension; + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.points = []; + + for ( let i = 0, l = json.points.length; i < l; i ++ ) { + + const point = json.points[ i ]; + this.points.push( new Vector3().fromArray( point ) ); + + } + + this.closed = json.closed; + this.curveType = json.curveType; + this.tension = json.tension; + + return this; + + } + +} + +/** + * Bezier Curves formulas obtained from + * https://en.wikipedia.org/wiki/B%C3%A9zier_curve + */ + +function CatmullRom( t, p0, p1, p2, p3 ) { + + const v0 = ( p2 - p0 ) * 0.5; + const v1 = ( p3 - p1 ) * 0.5; + const t2 = t * t; + const t3 = t * t2; + return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( - 3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1; + +} + +// + +function QuadraticBezierP0( t, p ) { + + const k = 1 - t; + return k * k * p; + +} + +function QuadraticBezierP1( t, p ) { + + return 2 * ( 1 - t ) * t * p; + +} + +function QuadraticBezierP2( t, p ) { + + return t * t * p; + +} + +function QuadraticBezier( t, p0, p1, p2 ) { + + return QuadraticBezierP0( t, p0 ) + QuadraticBezierP1( t, p1 ) + + QuadraticBezierP2( t, p2 ); + +} + +// + +function CubicBezierP0( t, p ) { + + const k = 1 - t; + return k * k * k * p; + +} + +function CubicBezierP1( t, p ) { + + const k = 1 - t; + return 3 * k * k * t * p; + +} + +function CubicBezierP2( t, p ) { + + return 3 * ( 1 - t ) * t * t * p; + +} + +function CubicBezierP3( t, p ) { + + return t * t * t * p; + +} + +function CubicBezier( t, p0, p1, p2, p3 ) { + + return CubicBezierP0( t, p0 ) + CubicBezierP1( t, p1 ) + CubicBezierP2( t, p2 ) + + CubicBezierP3( t, p3 ); + +} + +class CubicBezierCurve extends Curve { + + constructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2(), v3 = new Vector2() ) { + + super(); + + this.isCubicBezierCurve = true; + + this.type = 'CubicBezierCurve'; + + this.v0 = v0; + this.v1 = v1; + this.v2 = v2; + this.v3 = v3; + + } + + getPoint( t, optionalTarget = new Vector2() ) { + + const point = optionalTarget; + + const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3; + + point.set( + CubicBezier( t, v0.x, v1.x, v2.x, v3.x ), + CubicBezier( t, v0.y, v1.y, v2.y, v3.y ) + ); + + return point; + + } + + copy( source ) { + + super.copy( source ); + + this.v0.copy( source.v0 ); + this.v1.copy( source.v1 ); + this.v2.copy( source.v2 ); + this.v3.copy( source.v3 ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.v0 = this.v0.toArray(); + data.v1 = this.v1.toArray(); + data.v2 = this.v2.toArray(); + data.v3 = this.v3.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.v0.fromArray( json.v0 ); + this.v1.fromArray( json.v1 ); + this.v2.fromArray( json.v2 ); + this.v3.fromArray( json.v3 ); + + return this; + + } + +} + +class CubicBezierCurve3 extends Curve { + + constructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3() ) { + + super(); + + this.isCubicBezierCurve3 = true; + + this.type = 'CubicBezierCurve3'; + + this.v0 = v0; + this.v1 = v1; + this.v2 = v2; + this.v3 = v3; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3; + + point.set( + CubicBezier( t, v0.x, v1.x, v2.x, v3.x ), + CubicBezier( t, v0.y, v1.y, v2.y, v3.y ), + CubicBezier( t, v0.z, v1.z, v2.z, v3.z ) + ); + + return point; + + } + + copy( source ) { + + super.copy( source ); + + this.v0.copy( source.v0 ); + this.v1.copy( source.v1 ); + this.v2.copy( source.v2 ); + this.v3.copy( source.v3 ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.v0 = this.v0.toArray(); + data.v1 = this.v1.toArray(); + data.v2 = this.v2.toArray(); + data.v3 = this.v3.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.v0.fromArray( json.v0 ); + this.v1.fromArray( json.v1 ); + this.v2.fromArray( json.v2 ); + this.v3.fromArray( json.v3 ); + + return this; + + } + +} + +class LineCurve extends Curve { + + constructor( v1 = new Vector2(), v2 = new Vector2() ) { + + super(); + + this.isLineCurve = true; + + this.type = 'LineCurve'; + + this.v1 = v1; + this.v2 = v2; + + } + + getPoint( t, optionalTarget = new Vector2() ) { + + const point = optionalTarget; + + if ( t === 1 ) { + + point.copy( this.v2 ); + + } else { + + point.copy( this.v2 ).sub( this.v1 ); + point.multiplyScalar( t ).add( this.v1 ); + + } + + return point; + + } + + // Line curve is linear, so we can overwrite default getPointAt + getPointAt( u, optionalTarget ) { + + return this.getPoint( u, optionalTarget ); + + } + + getTangent( t, optionalTarget = new Vector2() ) { + + return optionalTarget.subVectors( this.v2, this.v1 ).normalize(); + + } + + getTangentAt( u, optionalTarget ) { + + return this.getTangent( u, optionalTarget ); + + } + + copy( source ) { + + super.copy( source ); + + this.v1.copy( source.v1 ); + this.v2.copy( source.v2 ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.v1 = this.v1.toArray(); + data.v2 = this.v2.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.v1.fromArray( json.v1 ); + this.v2.fromArray( json.v2 ); + + return this; + + } + +} + +class LineCurve3 extends Curve { + + constructor( v1 = new Vector3(), v2 = new Vector3() ) { + + super(); + + this.isLineCurve3 = true; + + this.type = 'LineCurve3'; + + this.v1 = v1; + this.v2 = v2; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + if ( t === 1 ) { + + point.copy( this.v2 ); + + } else { + + point.copy( this.v2 ).sub( this.v1 ); + point.multiplyScalar( t ).add( this.v1 ); + + } + + return point; + + } + + // Line curve is linear, so we can overwrite default getPointAt + getPointAt( u, optionalTarget ) { + + return this.getPoint( u, optionalTarget ); + + } + + getTangent( t, optionalTarget = new Vector3() ) { + + return optionalTarget.subVectors( this.v2, this.v1 ).normalize(); + + } + + getTangentAt( u, optionalTarget ) { + + return this.getTangent( u, optionalTarget ); + + } + + copy( source ) { + + super.copy( source ); + + this.v1.copy( source.v1 ); + this.v2.copy( source.v2 ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.v1 = this.v1.toArray(); + data.v2 = this.v2.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.v1.fromArray( json.v1 ); + this.v2.fromArray( json.v2 ); + + return this; + + } + +} + +class QuadraticBezierCurve extends Curve { + + constructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2() ) { + + super(); + + this.isQuadraticBezierCurve = true; + + this.type = 'QuadraticBezierCurve'; + + this.v0 = v0; + this.v1 = v1; + this.v2 = v2; + + } + + getPoint( t, optionalTarget = new Vector2() ) { + + const point = optionalTarget; + + const v0 = this.v0, v1 = this.v1, v2 = this.v2; + + point.set( + QuadraticBezier( t, v0.x, v1.x, v2.x ), + QuadraticBezier( t, v0.y, v1.y, v2.y ) + ); + + return point; + + } + + copy( source ) { + + super.copy( source ); + + this.v0.copy( source.v0 ); + this.v1.copy( source.v1 ); + this.v2.copy( source.v2 ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.v0 = this.v0.toArray(); + data.v1 = this.v1.toArray(); + data.v2 = this.v2.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.v0.fromArray( json.v0 ); + this.v1.fromArray( json.v1 ); + this.v2.fromArray( json.v2 ); + + return this; + + } + +} + +class QuadraticBezierCurve3 extends Curve { + + constructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3() ) { + + super(); + + this.isQuadraticBezierCurve3 = true; + + this.type = 'QuadraticBezierCurve3'; + + this.v0 = v0; + this.v1 = v1; + this.v2 = v2; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + const v0 = this.v0, v1 = this.v1, v2 = this.v2; + + point.set( + QuadraticBezier( t, v0.x, v1.x, v2.x ), + QuadraticBezier( t, v0.y, v1.y, v2.y ), + QuadraticBezier( t, v0.z, v1.z, v2.z ) + ); + + return point; + + } + + copy( source ) { + + super.copy( source ); + + this.v0.copy( source.v0 ); + this.v1.copy( source.v1 ); + this.v2.copy( source.v2 ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.v0 = this.v0.toArray(); + data.v1 = this.v1.toArray(); + data.v2 = this.v2.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.v0.fromArray( json.v0 ); + this.v1.fromArray( json.v1 ); + this.v2.fromArray( json.v2 ); + + return this; + + } + +} + +class SplineCurve extends Curve { + + constructor( points = [] ) { + + super(); + + this.isSplineCurve = true; + + this.type = 'SplineCurve'; + + this.points = points; + + } + + getPoint( t, optionalTarget = new Vector2() ) { + + const point = optionalTarget; + + const points = this.points; + const p = ( points.length - 1 ) * t; + + const intPoint = Math.floor( p ); + const weight = p - intPoint; + + const p0 = points[ intPoint === 0 ? intPoint : intPoint - 1 ]; + const p1 = points[ intPoint ]; + const p2 = points[ intPoint > points.length - 2 ? points.length - 1 : intPoint + 1 ]; + const p3 = points[ intPoint > points.length - 3 ? points.length - 1 : intPoint + 2 ]; + + point.set( + CatmullRom( weight, p0.x, p1.x, p2.x, p3.x ), + CatmullRom( weight, p0.y, p1.y, p2.y, p3.y ) + ); + + return point; + + } + + copy( source ) { + + super.copy( source ); + + this.points = []; + + for ( let i = 0, l = source.points.length; i < l; i ++ ) { + + const point = source.points[ i ]; + + this.points.push( point.clone() ); + + } + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.points = []; + + for ( let i = 0, l = this.points.length; i < l; i ++ ) { + + const point = this.points[ i ]; + data.points.push( point.toArray() ); + + } + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.points = []; + + for ( let i = 0, l = json.points.length; i < l; i ++ ) { + + const point = json.points[ i ]; + this.points.push( new Vector2().fromArray( point ) ); + + } + + return this; + + } + +} + +var Curves = /*#__PURE__*/Object.freeze({ + __proto__: null, + ArcCurve: ArcCurve, + CatmullRomCurve3: CatmullRomCurve3, + CubicBezierCurve: CubicBezierCurve, + CubicBezierCurve3: CubicBezierCurve3, + EllipseCurve: EllipseCurve, + LineCurve: LineCurve, + LineCurve3: LineCurve3, + QuadraticBezierCurve: QuadraticBezierCurve, + QuadraticBezierCurve3: QuadraticBezierCurve3, + SplineCurve: SplineCurve +}); + +/************************************************************** + * Curved Path - a curve path is simply a array of connected + * curves, but retains the api of a curve + **************************************************************/ + +class CurvePath extends Curve { + + constructor() { + + super(); + + this.type = 'CurvePath'; + + this.curves = []; + this.autoClose = false; // Automatically closes the path + + } + + add( curve ) { + + this.curves.push( curve ); + + } + + closePath() { + + // Add a line curve if start and end of lines are not connected + const startPoint = this.curves[ 0 ].getPoint( 0 ); + const endPoint = this.curves[ this.curves.length - 1 ].getPoint( 1 ); + + if ( ! startPoint.equals( endPoint ) ) { + + const lineType = ( startPoint.isVector2 === true ) ? 'LineCurve' : 'LineCurve3'; + this.curves.push( new Curves[ lineType ]( endPoint, startPoint ) ); + + } + + return this; + + } + + // To get accurate point with reference to + // entire path distance at time t, + // following has to be done: + + // 1. Length of each sub path have to be known + // 2. Locate and identify type of curve + // 3. Get t for the curve + // 4. Return curve.getPointAt(t') + + getPoint( t, optionalTarget ) { + + const d = t * this.getLength(); + const curveLengths = this.getCurveLengths(); + let i = 0; + + // To think about boundaries points. + + while ( i < curveLengths.length ) { + + if ( curveLengths[ i ] >= d ) { + + const diff = curveLengths[ i ] - d; + const curve = this.curves[ i ]; + + const segmentLength = curve.getLength(); + const u = segmentLength === 0 ? 0 : 1 - diff / segmentLength; + + return curve.getPointAt( u, optionalTarget ); + + } + + i ++; + + } + + return null; + + // loop where sum != 0, sum > d , sum+1 1 && ! points[ points.length - 1 ].equals( points[ 0 ] ) ) { + + points.push( points[ 0 ] ); + + } + + return points; + + } + + copy( source ) { + + super.copy( source ); + + this.curves = []; + + for ( let i = 0, l = source.curves.length; i < l; i ++ ) { + + const curve = source.curves[ i ]; + + this.curves.push( curve.clone() ); + + } + + this.autoClose = source.autoClose; + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.autoClose = this.autoClose; + data.curves = []; + + for ( let i = 0, l = this.curves.length; i < l; i ++ ) { + + const curve = this.curves[ i ]; + data.curves.push( curve.toJSON() ); + + } + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.autoClose = json.autoClose; + this.curves = []; + + for ( let i = 0, l = json.curves.length; i < l; i ++ ) { + + const curve = json.curves[ i ]; + this.curves.push( new Curves[ curve.type ]().fromJSON( curve ) ); + + } + + return this; + + } + +} + +class Path extends CurvePath { + + constructor( points ) { + + super(); + + this.type = 'Path'; + + this.currentPoint = new Vector2(); + + if ( points ) { + + this.setFromPoints( points ); + + } + + } + + setFromPoints( points ) { + + this.moveTo( points[ 0 ].x, points[ 0 ].y ); + + for ( let i = 1, l = points.length; i < l; i ++ ) { + + this.lineTo( points[ i ].x, points[ i ].y ); + + } + + return this; + + } + + moveTo( x, y ) { + + this.currentPoint.set( x, y ); // TODO consider referencing vectors instead of copying? + + return this; + + } + + lineTo( x, y ) { + + const curve = new LineCurve( this.currentPoint.clone(), new Vector2( x, y ) ); + this.curves.push( curve ); + + this.currentPoint.set( x, y ); + + return this; + + } + + quadraticCurveTo( aCPx, aCPy, aX, aY ) { + + const curve = new QuadraticBezierCurve( + this.currentPoint.clone(), + new Vector2( aCPx, aCPy ), + new Vector2( aX, aY ) + ); + + this.curves.push( curve ); + + this.currentPoint.set( aX, aY ); + + return this; + + } + + bezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) { + + const curve = new CubicBezierCurve( + this.currentPoint.clone(), + new Vector2( aCP1x, aCP1y ), + new Vector2( aCP2x, aCP2y ), + new Vector2( aX, aY ) + ); + + this.curves.push( curve ); + + this.currentPoint.set( aX, aY ); + + return this; + + } + + splineThru( pts /*Array of Vector*/ ) { + + const npts = [ this.currentPoint.clone() ].concat( pts ); + + const curve = new SplineCurve( npts ); + this.curves.push( curve ); + + this.currentPoint.copy( pts[ pts.length - 1 ] ); + + return this; + + } + + arc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) { + + const x0 = this.currentPoint.x; + const y0 = this.currentPoint.y; + + this.absarc( aX + x0, aY + y0, aRadius, + aStartAngle, aEndAngle, aClockwise ); + + return this; + + } + + absarc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) { + + this.absellipse( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise ); + + return this; + + } + + ellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) { + + const x0 = this.currentPoint.x; + const y0 = this.currentPoint.y; + + this.absellipse( aX + x0, aY + y0, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ); + + return this; + + } + + absellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) { + + const curve = new EllipseCurve( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ); + + if ( this.curves.length > 0 ) { + + // if a previous curve is present, attempt to join + const firstPoint = curve.getPoint( 0 ); + + if ( ! firstPoint.equals( this.currentPoint ) ) { + + this.lineTo( firstPoint.x, firstPoint.y ); + + } + + } + + this.curves.push( curve ); + + const lastPoint = curve.getPoint( 1 ); + this.currentPoint.copy( lastPoint ); + + return this; + + } + + copy( source ) { + + super.copy( source ); + + this.currentPoint.copy( source.currentPoint ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.currentPoint = this.currentPoint.toArray(); + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.currentPoint.fromArray( json.currentPoint ); + + return this; + + } + +} + +class LatheGeometry extends BufferGeometry { + + constructor( points = [ new Vector2( 0, - 0.5 ), new Vector2( 0.5, 0 ), new Vector2( 0, 0.5 ) ], segments = 12, phiStart = 0, phiLength = Math.PI * 2 ) { + + super(); + + this.type = 'LatheGeometry'; + + this.parameters = { + points: points, + segments: segments, + phiStart: phiStart, + phiLength: phiLength + }; + + segments = Math.floor( segments ); + + // clamp phiLength so it's in range of [ 0, 2PI ] + + phiLength = clamp( phiLength, 0, Math.PI * 2 ); + + // buffers + + const indices = []; + const vertices = []; + const uvs = []; + const initNormals = []; + const normals = []; + + // helper variables + + const inverseSegments = 1.0 / segments; + const vertex = new Vector3(); + const uv = new Vector2(); + const normal = new Vector3(); + const curNormal = new Vector3(); + const prevNormal = new Vector3(); + let dx = 0; + let dy = 0; + + // pre-compute normals for initial "meridian" + + for ( let j = 0; j <= ( points.length - 1 ); j ++ ) { + + switch ( j ) { + + case 0: // special handling for 1st vertex on path + + dx = points[ j + 1 ].x - points[ j ].x; + dy = points[ j + 1 ].y - points[ j ].y; + + normal.x = dy * 1.0; + normal.y = - dx; + normal.z = dy * 0.0; + + prevNormal.copy( normal ); + + normal.normalize(); + + initNormals.push( normal.x, normal.y, normal.z ); + + break; + + case ( points.length - 1 ): // special handling for last Vertex on path + + initNormals.push( prevNormal.x, prevNormal.y, prevNormal.z ); + + break; + + default: // default handling for all vertices in between + + dx = points[ j + 1 ].x - points[ j ].x; + dy = points[ j + 1 ].y - points[ j ].y; + + normal.x = dy * 1.0; + normal.y = - dx; + normal.z = dy * 0.0; + + curNormal.copy( normal ); + + normal.x += prevNormal.x; + normal.y += prevNormal.y; + normal.z += prevNormal.z; + + normal.normalize(); + + initNormals.push( normal.x, normal.y, normal.z ); + + prevNormal.copy( curNormal ); + + } + + } + + // generate vertices, uvs and normals + + for ( let i = 0; i <= segments; i ++ ) { + + const phi = phiStart + i * inverseSegments * phiLength; + + const sin = Math.sin( phi ); + const cos = Math.cos( phi ); + + for ( let j = 0; j <= ( points.length - 1 ); j ++ ) { + + // vertex + + vertex.x = points[ j ].x * sin; + vertex.y = points[ j ].y; + vertex.z = points[ j ].x * cos; + + vertices.push( vertex.x, vertex.y, vertex.z ); + + // uv + + uv.x = i / segments; + uv.y = j / ( points.length - 1 ); + + uvs.push( uv.x, uv.y ); + + // normal + + const x = initNormals[ 3 * j + 0 ] * sin; + const y = initNormals[ 3 * j + 1 ]; + const z = initNormals[ 3 * j + 0 ] * cos; + + normals.push( x, y, z ); + + } + + } + + // indices + + for ( let i = 0; i < segments; i ++ ) { + + for ( let j = 0; j < ( points.length - 1 ); j ++ ) { + + const base = j + i * points.length; + + const a = base; + const b = base + points.length; + const c = base + points.length + 1; + const d = base + 1; + + // faces + + indices.push( a, b, d ); + indices.push( c, d, b ); + + } + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new LatheGeometry( data.points, data.segments, data.phiStart, data.phiLength ); + + } + +} + +class CapsuleGeometry extends LatheGeometry { + + constructor( radius = 1, length = 1, capSegments = 4, radialSegments = 8 ) { + + const path = new Path(); + path.absarc( 0, - length / 2, radius, Math.PI * 1.5, 0 ); + path.absarc( 0, length / 2, radius, 0, Math.PI * 0.5 ); + + super( path.getPoints( capSegments ), radialSegments ); + + this.type = 'CapsuleGeometry'; + + this.parameters = { + radius: radius, + length: length, + capSegments: capSegments, + radialSegments: radialSegments, + }; + + } + + static fromJSON( data ) { + + return new CapsuleGeometry( data.radius, data.length, data.capSegments, data.radialSegments ); + + } + +} + +class CircleGeometry extends BufferGeometry { + + constructor( radius = 1, segments = 32, thetaStart = 0, thetaLength = Math.PI * 2 ) { + + super(); + + this.type = 'CircleGeometry'; + + this.parameters = { + radius: radius, + segments: segments, + thetaStart: thetaStart, + thetaLength: thetaLength + }; + + segments = Math.max( 3, segments ); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // helper variables + + const vertex = new Vector3(); + const uv = new Vector2(); + + // center point + + vertices.push( 0, 0, 0 ); + normals.push( 0, 0, 1 ); + uvs.push( 0.5, 0.5 ); + + for ( let s = 0, i = 3; s <= segments; s ++, i += 3 ) { + + const segment = thetaStart + s / segments * thetaLength; + + // vertex + + vertex.x = radius * Math.cos( segment ); + vertex.y = radius * Math.sin( segment ); + + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal + + normals.push( 0, 0, 1 ); + + // uvs + + uv.x = ( vertices[ i ] / radius + 1 ) / 2; + uv.y = ( vertices[ i + 1 ] / radius + 1 ) / 2; + + uvs.push( uv.x, uv.y ); + + } + + // indices + + for ( let i = 1; i <= segments; i ++ ) { + + indices.push( i, i + 1, 0 ); + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new CircleGeometry( data.radius, data.segments, data.thetaStart, data.thetaLength ); + + } + +} + +class CylinderGeometry extends BufferGeometry { + + constructor( radiusTop = 1, radiusBottom = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) { + + super(); + + this.type = 'CylinderGeometry'; + + this.parameters = { + radiusTop: radiusTop, + radiusBottom: radiusBottom, + height: height, + radialSegments: radialSegments, + heightSegments: heightSegments, + openEnded: openEnded, + thetaStart: thetaStart, + thetaLength: thetaLength + }; + + const scope = this; + + radialSegments = Math.floor( radialSegments ); + heightSegments = Math.floor( heightSegments ); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // helper variables + + let index = 0; + const indexArray = []; + const halfHeight = height / 2; + let groupStart = 0; + + // generate geometry + + generateTorso(); + + if ( openEnded === false ) { + + if ( radiusTop > 0 ) generateCap( true ); + if ( radiusBottom > 0 ) generateCap( false ); + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + function generateTorso() { + + const normal = new Vector3(); + const vertex = new Vector3(); + + let groupCount = 0; + + // this will be used to calculate the normal + const slope = ( radiusBottom - radiusTop ) / height; + + // generate vertices, normals and uvs + + for ( let y = 0; y <= heightSegments; y ++ ) { + + const indexRow = []; + + const v = y / heightSegments; + + // calculate the radius of the current row + + const radius = v * ( radiusBottom - radiusTop ) + radiusTop; + + for ( let x = 0; x <= radialSegments; x ++ ) { + + const u = x / radialSegments; + + const theta = u * thetaLength + thetaStart; + + const sinTheta = Math.sin( theta ); + const cosTheta = Math.cos( theta ); + + // vertex + + vertex.x = radius * sinTheta; + vertex.y = - v * height + halfHeight; + vertex.z = radius * cosTheta; + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal + + normal.set( sinTheta, slope, cosTheta ).normalize(); + normals.push( normal.x, normal.y, normal.z ); + + // uv + + uvs.push( u, 1 - v ); + + // save index of vertex in respective row + + indexRow.push( index ++ ); + + } + + // now save vertices of the row in our index array + + indexArray.push( indexRow ); + + } + + // generate indices + + for ( let x = 0; x < radialSegments; x ++ ) { + + for ( let y = 0; y < heightSegments; y ++ ) { + + // we use the index array to access the correct indices + + const a = indexArray[ y ][ x ]; + const b = indexArray[ y + 1 ][ x ]; + const c = indexArray[ y + 1 ][ x + 1 ]; + const d = indexArray[ y ][ x + 1 ]; + + // faces + + indices.push( a, b, d ); + indices.push( b, c, d ); + + // update group counter + + groupCount += 6; + + } + + } + + // add a group to the geometry. this will ensure multi material support + + scope.addGroup( groupStart, groupCount, 0 ); + + // calculate new start value for groups + + groupStart += groupCount; + + } + + function generateCap( top ) { + + // save the index of the first center vertex + const centerIndexStart = index; + + const uv = new Vector2(); + const vertex = new Vector3(); + + let groupCount = 0; + + const radius = ( top === true ) ? radiusTop : radiusBottom; + const sign = ( top === true ) ? 1 : - 1; + + // first we generate the center vertex data of the cap. + // because the geometry needs one set of uvs per face, + // we must generate a center vertex per face/segment + + for ( let x = 1; x <= radialSegments; x ++ ) { + + // vertex + + vertices.push( 0, halfHeight * sign, 0 ); + + // normal + + normals.push( 0, sign, 0 ); + + // uv + + uvs.push( 0.5, 0.5 ); + + // increase index + + index ++; + + } + + // save the index of the last center vertex + const centerIndexEnd = index; + + // now we generate the surrounding vertices, normals and uvs + + for ( let x = 0; x <= radialSegments; x ++ ) { + + const u = x / radialSegments; + const theta = u * thetaLength + thetaStart; + + const cosTheta = Math.cos( theta ); + const sinTheta = Math.sin( theta ); + + // vertex + + vertex.x = radius * sinTheta; + vertex.y = halfHeight * sign; + vertex.z = radius * cosTheta; + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal + + normals.push( 0, sign, 0 ); + + // uv + + uv.x = ( cosTheta * 0.5 ) + 0.5; + uv.y = ( sinTheta * 0.5 * sign ) + 0.5; + uvs.push( uv.x, uv.y ); + + // increase index + + index ++; + + } + + // generate indices + + for ( let x = 0; x < radialSegments; x ++ ) { + + const c = centerIndexStart + x; + const i = centerIndexEnd + x; + + if ( top === true ) { + + // face top + + indices.push( i, i + 1, c ); + + } else { + + // face bottom + + indices.push( i + 1, i, c ); + + } + + groupCount += 3; + + } + + // add a group to the geometry. this will ensure multi material support + + scope.addGroup( groupStart, groupCount, top === true ? 1 : 2 ); + + // calculate new start value for groups + + groupStart += groupCount; + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new CylinderGeometry( data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength ); + + } + +} + +class ConeGeometry extends CylinderGeometry { + + constructor( radius = 1, height = 1, radialSegments = 32, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) { + + super( 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ); + + this.type = 'ConeGeometry'; + + this.parameters = { + radius: radius, + height: height, + radialSegments: radialSegments, + heightSegments: heightSegments, + openEnded: openEnded, + thetaStart: thetaStart, + thetaLength: thetaLength + }; + + } + + static fromJSON( data ) { + + return new ConeGeometry( data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength ); + + } + +} + +class PolyhedronGeometry extends BufferGeometry { + + constructor( vertices = [], indices = [], radius = 1, detail = 0 ) { + + super(); + + this.type = 'PolyhedronGeometry'; + + this.parameters = { + vertices: vertices, + indices: indices, + radius: radius, + detail: detail + }; + + // default buffer data + + const vertexBuffer = []; + const uvBuffer = []; + + // the subdivision creates the vertex buffer data + + subdivide( detail ); + + // all vertices should lie on a conceptual sphere with a given radius + + applyRadius( radius ); + + // finally, create the uv data + + generateUVs(); + + // build non-indexed geometry + + this.setAttribute( 'position', new Float32BufferAttribute( vertexBuffer, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( vertexBuffer.slice(), 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvBuffer, 2 ) ); + + if ( detail === 0 ) { + + this.computeVertexNormals(); // flat normals + + } else { + + this.normalizeNormals(); // smooth normals + + } + + // helper functions + + function subdivide( detail ) { + + const a = new Vector3(); + const b = new Vector3(); + const c = new Vector3(); + + // iterate over all faces and apply a subdivision with the given detail value + + for ( let i = 0; i < indices.length; i += 3 ) { + + // get the vertices of the face + + getVertexByIndex( indices[ i + 0 ], a ); + getVertexByIndex( indices[ i + 1 ], b ); + getVertexByIndex( indices[ i + 2 ], c ); + + // perform subdivision + + subdivideFace( a, b, c, detail ); + + } + + } + + function subdivideFace( a, b, c, detail ) { + + const cols = detail + 1; + + // we use this multidimensional array as a data structure for creating the subdivision + + const v = []; + + // construct all of the vertices for this subdivision + + for ( let i = 0; i <= cols; i ++ ) { + + v[ i ] = []; + + const aj = a.clone().lerp( c, i / cols ); + const bj = b.clone().lerp( c, i / cols ); + + const rows = cols - i; + + for ( let j = 0; j <= rows; j ++ ) { + + if ( j === 0 && i === cols ) { + + v[ i ][ j ] = aj; + + } else { + + v[ i ][ j ] = aj.clone().lerp( bj, j / rows ); + + } + + } + + } + + // construct all of the faces + + for ( let i = 0; i < cols; i ++ ) { + + for ( let j = 0; j < 2 * ( cols - i ) - 1; j ++ ) { + + const k = Math.floor( j / 2 ); + + if ( j % 2 === 0 ) { + + pushVertex( v[ i ][ k + 1 ] ); + pushVertex( v[ i + 1 ][ k ] ); + pushVertex( v[ i ][ k ] ); + + } else { + + pushVertex( v[ i ][ k + 1 ] ); + pushVertex( v[ i + 1 ][ k + 1 ] ); + pushVertex( v[ i + 1 ][ k ] ); + + } + + } + + } + + } + + function applyRadius( radius ) { + + const vertex = new Vector3(); + + // iterate over the entire buffer and apply the radius to each vertex + + for ( let i = 0; i < vertexBuffer.length; i += 3 ) { + + vertex.x = vertexBuffer[ i + 0 ]; + vertex.y = vertexBuffer[ i + 1 ]; + vertex.z = vertexBuffer[ i + 2 ]; + + vertex.normalize().multiplyScalar( radius ); + + vertexBuffer[ i + 0 ] = vertex.x; + vertexBuffer[ i + 1 ] = vertex.y; + vertexBuffer[ i + 2 ] = vertex.z; + + } + + } + + function generateUVs() { + + const vertex = new Vector3(); + + for ( let i = 0; i < vertexBuffer.length; i += 3 ) { + + vertex.x = vertexBuffer[ i + 0 ]; + vertex.y = vertexBuffer[ i + 1 ]; + vertex.z = vertexBuffer[ i + 2 ]; + + const u = azimuth( vertex ) / 2 / Math.PI + 0.5; + const v = inclination( vertex ) / Math.PI + 0.5; + uvBuffer.push( u, 1 - v ); + + } + + correctUVs(); + + correctSeam(); + + } + + function correctSeam() { + + // handle case when face straddles the seam, see #3269 + + for ( let i = 0; i < uvBuffer.length; i += 6 ) { + + // uv data of a single face + + const x0 = uvBuffer[ i + 0 ]; + const x1 = uvBuffer[ i + 2 ]; + const x2 = uvBuffer[ i + 4 ]; + + const max = Math.max( x0, x1, x2 ); + const min = Math.min( x0, x1, x2 ); + + // 0.9 is somewhat arbitrary + + if ( max > 0.9 && min < 0.1 ) { + + if ( x0 < 0.2 ) uvBuffer[ i + 0 ] += 1; + if ( x1 < 0.2 ) uvBuffer[ i + 2 ] += 1; + if ( x2 < 0.2 ) uvBuffer[ i + 4 ] += 1; + + } + + } + + } + + function pushVertex( vertex ) { + + vertexBuffer.push( vertex.x, vertex.y, vertex.z ); + + } + + function getVertexByIndex( index, vertex ) { + + const stride = index * 3; + + vertex.x = vertices[ stride + 0 ]; + vertex.y = vertices[ stride + 1 ]; + vertex.z = vertices[ stride + 2 ]; + + } + + function correctUVs() { + + const a = new Vector3(); + const b = new Vector3(); + const c = new Vector3(); + + const centroid = new Vector3(); + + const uvA = new Vector2(); + const uvB = new Vector2(); + const uvC = new Vector2(); + + for ( let i = 0, j = 0; i < vertexBuffer.length; i += 9, j += 6 ) { + + a.set( vertexBuffer[ i + 0 ], vertexBuffer[ i + 1 ], vertexBuffer[ i + 2 ] ); + b.set( vertexBuffer[ i + 3 ], vertexBuffer[ i + 4 ], vertexBuffer[ i + 5 ] ); + c.set( vertexBuffer[ i + 6 ], vertexBuffer[ i + 7 ], vertexBuffer[ i + 8 ] ); + + uvA.set( uvBuffer[ j + 0 ], uvBuffer[ j + 1 ] ); + uvB.set( uvBuffer[ j + 2 ], uvBuffer[ j + 3 ] ); + uvC.set( uvBuffer[ j + 4 ], uvBuffer[ j + 5 ] ); + + centroid.copy( a ).add( b ).add( c ).divideScalar( 3 ); + + const azi = azimuth( centroid ); + + correctUV( uvA, j + 0, a, azi ); + correctUV( uvB, j + 2, b, azi ); + correctUV( uvC, j + 4, c, azi ); + + } + + } + + function correctUV( uv, stride, vector, azimuth ) { + + if ( ( azimuth < 0 ) && ( uv.x === 1 ) ) { + + uvBuffer[ stride ] = uv.x - 1; + + } + + if ( ( vector.x === 0 ) && ( vector.z === 0 ) ) { + + uvBuffer[ stride ] = azimuth / 2 / Math.PI + 0.5; + + } + + } + + // Angle around the Y axis, counter-clockwise when looking from above. + + function azimuth( vector ) { + + return Math.atan2( vector.z, - vector.x ); + + } + + + // Angle above the XZ plane. + + function inclination( vector ) { + + return Math.atan2( - vector.y, Math.sqrt( ( vector.x * vector.x ) + ( vector.z * vector.z ) ) ); + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new PolyhedronGeometry( data.vertices, data.indices, data.radius, data.details ); + + } + +} + +class DodecahedronGeometry extends PolyhedronGeometry { + + constructor( radius = 1, detail = 0 ) { + + const t = ( 1 + Math.sqrt( 5 ) ) / 2; + const r = 1 / t; + + const vertices = [ + + // (±1, ±1, ±1) + - 1, - 1, - 1, - 1, - 1, 1, + - 1, 1, - 1, - 1, 1, 1, + 1, - 1, - 1, 1, - 1, 1, + 1, 1, - 1, 1, 1, 1, + + // (0, ±1/φ, ±φ) + 0, - r, - t, 0, - r, t, + 0, r, - t, 0, r, t, + + // (±1/φ, ±φ, 0) + - r, - t, 0, - r, t, 0, + r, - t, 0, r, t, 0, + + // (±φ, 0, ±1/φ) + - t, 0, - r, t, 0, - r, + - t, 0, r, t, 0, r + ]; + + const indices = [ + 3, 11, 7, 3, 7, 15, 3, 15, 13, + 7, 19, 17, 7, 17, 6, 7, 6, 15, + 17, 4, 8, 17, 8, 10, 17, 10, 6, + 8, 0, 16, 8, 16, 2, 8, 2, 10, + 0, 12, 1, 0, 1, 18, 0, 18, 16, + 6, 10, 2, 6, 2, 13, 6, 13, 15, + 2, 16, 18, 2, 18, 3, 2, 3, 13, + 18, 1, 9, 18, 9, 11, 18, 11, 3, + 4, 14, 12, 4, 12, 0, 4, 0, 8, + 11, 9, 5, 11, 5, 19, 11, 19, 7, + 19, 5, 14, 19, 14, 4, 19, 4, 17, + 1, 12, 14, 1, 14, 5, 1, 5, 9 + ]; + + super( vertices, indices, radius, detail ); + + this.type = 'DodecahedronGeometry'; + + this.parameters = { + radius: radius, + detail: detail + }; + + } + + static fromJSON( data ) { + + return new DodecahedronGeometry( data.radius, data.detail ); + + } + +} + +const _v0 = /*@__PURE__*/ new Vector3(); +const _v1$1 = /*@__PURE__*/ new Vector3(); +const _normal = /*@__PURE__*/ new Vector3(); +const _triangle = /*@__PURE__*/ new Triangle(); + +class EdgesGeometry extends BufferGeometry { + + constructor( geometry = null, thresholdAngle = 1 ) { + + super(); + + this.type = 'EdgesGeometry'; + + this.parameters = { + geometry: geometry, + thresholdAngle: thresholdAngle + }; + + if ( geometry !== null ) { + + const precisionPoints = 4; + const precision = Math.pow( 10, precisionPoints ); + const thresholdDot = Math.cos( DEG2RAD * thresholdAngle ); + + const indexAttr = geometry.getIndex(); + const positionAttr = geometry.getAttribute( 'position' ); + const indexCount = indexAttr ? indexAttr.count : positionAttr.count; + + const indexArr = [ 0, 0, 0 ]; + const vertKeys = [ 'a', 'b', 'c' ]; + const hashes = new Array( 3 ); + + const edgeData = {}; + const vertices = []; + for ( let i = 0; i < indexCount; i += 3 ) { + + if ( indexAttr ) { + + indexArr[ 0 ] = indexAttr.getX( i ); + indexArr[ 1 ] = indexAttr.getX( i + 1 ); + indexArr[ 2 ] = indexAttr.getX( i + 2 ); + + } else { + + indexArr[ 0 ] = i; + indexArr[ 1 ] = i + 1; + indexArr[ 2 ] = i + 2; + + } + + const { a, b, c } = _triangle; + a.fromBufferAttribute( positionAttr, indexArr[ 0 ] ); + b.fromBufferAttribute( positionAttr, indexArr[ 1 ] ); + c.fromBufferAttribute( positionAttr, indexArr[ 2 ] ); + _triangle.getNormal( _normal ); + + // create hashes for the edge from the vertices + hashes[ 0 ] = `${ Math.round( a.x * precision ) },${ Math.round( a.y * precision ) },${ Math.round( a.z * precision ) }`; + hashes[ 1 ] = `${ Math.round( b.x * precision ) },${ Math.round( b.y * precision ) },${ Math.round( b.z * precision ) }`; + hashes[ 2 ] = `${ Math.round( c.x * precision ) },${ Math.round( c.y * precision ) },${ Math.round( c.z * precision ) }`; + + // skip degenerate triangles + if ( hashes[ 0 ] === hashes[ 1 ] || hashes[ 1 ] === hashes[ 2 ] || hashes[ 2 ] === hashes[ 0 ] ) { + + continue; + + } + + // iterate over every edge + for ( let j = 0; j < 3; j ++ ) { + + // get the first and next vertex making up the edge + const jNext = ( j + 1 ) % 3; + const vecHash0 = hashes[ j ]; + const vecHash1 = hashes[ jNext ]; + const v0 = _triangle[ vertKeys[ j ] ]; + const v1 = _triangle[ vertKeys[ jNext ] ]; + + const hash = `${ vecHash0 }_${ vecHash1 }`; + const reverseHash = `${ vecHash1 }_${ vecHash0 }`; + + if ( reverseHash in edgeData && edgeData[ reverseHash ] ) { + + // if we found a sibling edge add it into the vertex array if + // it meets the angle threshold and delete the edge from the map. + if ( _normal.dot( edgeData[ reverseHash ].normal ) <= thresholdDot ) { + + vertices.push( v0.x, v0.y, v0.z ); + vertices.push( v1.x, v1.y, v1.z ); + + } + + edgeData[ reverseHash ] = null; + + } else if ( ! ( hash in edgeData ) ) { + + // if we've already got an edge here then skip adding a new one + edgeData[ hash ] = { + + index0: indexArr[ j ], + index1: indexArr[ jNext ], + normal: _normal.clone(), + + }; + + } + + } + + } + + // iterate over all remaining, unmatched edges and add them to the vertex array + for ( const key in edgeData ) { + + if ( edgeData[ key ] ) { + + const { index0, index1 } = edgeData[ key ]; + _v0.fromBufferAttribute( positionAttr, index0 ); + _v1$1.fromBufferAttribute( positionAttr, index1 ); + + vertices.push( _v0.x, _v0.y, _v0.z ); + vertices.push( _v1$1.x, _v1$1.y, _v1$1.z ); + + } + + } + + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + +} + +class Shape extends Path { + + constructor( points ) { + + super( points ); + + this.uuid = generateUUID(); + + this.type = 'Shape'; + + this.holes = []; + + } + + getPointsHoles( divisions ) { + + const holesPts = []; + + for ( let i = 0, l = this.holes.length; i < l; i ++ ) { + + holesPts[ i ] = this.holes[ i ].getPoints( divisions ); + + } + + return holesPts; + + } + + // get points of shape and holes (keypoints based on segments parameter) + + extractPoints( divisions ) { + + return { + + shape: this.getPoints( divisions ), + holes: this.getPointsHoles( divisions ) + + }; + + } + + copy( source ) { + + super.copy( source ); + + this.holes = []; + + for ( let i = 0, l = source.holes.length; i < l; i ++ ) { + + const hole = source.holes[ i ]; + + this.holes.push( hole.clone() ); + + } + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.uuid = this.uuid; + data.holes = []; + + for ( let i = 0, l = this.holes.length; i < l; i ++ ) { + + const hole = this.holes[ i ]; + data.holes.push( hole.toJSON() ); + + } + + return data; + + } + + fromJSON( json ) { + + super.fromJSON( json ); + + this.uuid = json.uuid; + this.holes = []; + + for ( let i = 0, l = json.holes.length; i < l; i ++ ) { + + const hole = json.holes[ i ]; + this.holes.push( new Path().fromJSON( hole ) ); + + } + + return this; + + } + +} + +/** + * Port from https://github.com/mapbox/earcut (v2.2.4) + */ + +const Earcut = { + + triangulate: function ( data, holeIndices, dim = 2 ) { + + const hasHoles = holeIndices && holeIndices.length; + const outerLen = hasHoles ? holeIndices[ 0 ] * dim : data.length; + let outerNode = linkedList( data, 0, outerLen, dim, true ); + const triangles = []; + + if ( ! outerNode || outerNode.next === outerNode.prev ) return triangles; + + let minX, minY, maxX, maxY, x, y, invSize; + + if ( hasHoles ) outerNode = eliminateHoles( data, holeIndices, outerNode, dim ); + + // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox + if ( data.length > 80 * dim ) { + + minX = maxX = data[ 0 ]; + minY = maxY = data[ 1 ]; + + for ( let i = dim; i < outerLen; i += dim ) { + + x = data[ i ]; + y = data[ i + 1 ]; + if ( x < minX ) minX = x; + if ( y < minY ) minY = y; + if ( x > maxX ) maxX = x; + if ( y > maxY ) maxY = y; + + } + + // minX, minY and invSize are later used to transform coords into integers for z-order calculation + invSize = Math.max( maxX - minX, maxY - minY ); + invSize = invSize !== 0 ? 32767 / invSize : 0; + + } + + earcutLinked( outerNode, triangles, dim, minX, minY, invSize, 0 ); + + return triangles; + + } + +}; + +// create a circular doubly linked list from polygon points in the specified winding order +function linkedList( data, start, end, dim, clockwise ) { + + let i, last; + + if ( clockwise === ( signedArea( data, start, end, dim ) > 0 ) ) { + + for ( i = start; i < end; i += dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last ); + + } else { + + for ( i = end - dim; i >= start; i -= dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last ); + + } + + if ( last && equals( last, last.next ) ) { + + removeNode( last ); + last = last.next; + + } + + return last; + +} + +// eliminate colinear or duplicate points +function filterPoints( start, end ) { + + if ( ! start ) return start; + if ( ! end ) end = start; + + let p = start, + again; + do { + + again = false; + + if ( ! p.steiner && ( equals( p, p.next ) || area( p.prev, p, p.next ) === 0 ) ) { + + removeNode( p ); + p = end = p.prev; + if ( p === p.next ) break; + again = true; + + } else { + + p = p.next; + + } + + } while ( again || p !== end ); + + return end; + +} + +// main ear slicing loop which triangulates a polygon (given as a linked list) +function earcutLinked( ear, triangles, dim, minX, minY, invSize, pass ) { + + if ( ! ear ) return; + + // interlink polygon nodes in z-order + if ( ! pass && invSize ) indexCurve( ear, minX, minY, invSize ); + + let stop = ear, + prev, next; + + // iterate through ears, slicing them one by one + while ( ear.prev !== ear.next ) { + + prev = ear.prev; + next = ear.next; + + if ( invSize ? isEarHashed( ear, minX, minY, invSize ) : isEar( ear ) ) { + + // cut off the triangle + triangles.push( prev.i / dim | 0 ); + triangles.push( ear.i / dim | 0 ); + triangles.push( next.i / dim | 0 ); + + removeNode( ear ); + + // skipping the next vertex leads to less sliver triangles + ear = next.next; + stop = next.next; + + continue; + + } + + ear = next; + + // if we looped through the whole remaining polygon and can't find any more ears + if ( ear === stop ) { + + // try filtering points and slicing again + if ( ! pass ) { + + earcutLinked( filterPoints( ear ), triangles, dim, minX, minY, invSize, 1 ); + + // if this didn't work, try curing all small self-intersections locally + + } else if ( pass === 1 ) { + + ear = cureLocalIntersections( filterPoints( ear ), triangles, dim ); + earcutLinked( ear, triangles, dim, minX, minY, invSize, 2 ); + + // as a last resort, try splitting the remaining polygon into two + + } else if ( pass === 2 ) { + + splitEarcut( ear, triangles, dim, minX, minY, invSize ); + + } + + break; + + } + + } + +} + +// check whether a polygon node forms a valid ear with adjacent nodes +function isEar( ear ) { + + const a = ear.prev, + b = ear, + c = ear.next; + + if ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear + + // now make sure we don't have other points inside the potential ear + const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y; + + // triangle bbox; min & max are calculated like this for speed + const x0 = ax < bx ? ( ax < cx ? ax : cx ) : ( bx < cx ? bx : cx ), + y0 = ay < by ? ( ay < cy ? ay : cy ) : ( by < cy ? by : cy ), + x1 = ax > bx ? ( ax > cx ? ax : cx ) : ( bx > cx ? bx : cx ), + y1 = ay > by ? ( ay > cy ? ay : cy ) : ( by > cy ? by : cy ); + + let p = c.next; + while ( p !== a ) { + + if ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && + pointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) && + area( p.prev, p, p.next ) >= 0 ) return false; + p = p.next; + + } + + return true; + +} + +function isEarHashed( ear, minX, minY, invSize ) { + + const a = ear.prev, + b = ear, + c = ear.next; + + if ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear + + const ax = a.x, bx = b.x, cx = c.x, ay = a.y, by = b.y, cy = c.y; + + // triangle bbox; min & max are calculated like this for speed + const x0 = ax < bx ? ( ax < cx ? ax : cx ) : ( bx < cx ? bx : cx ), + y0 = ay < by ? ( ay < cy ? ay : cy ) : ( by < cy ? by : cy ), + x1 = ax > bx ? ( ax > cx ? ax : cx ) : ( bx > cx ? bx : cx ), + y1 = ay > by ? ( ay > cy ? ay : cy ) : ( by > cy ? by : cy ); + + // z-order range for the current triangle bbox; + const minZ = zOrder( x0, y0, minX, minY, invSize ), + maxZ = zOrder( x1, y1, minX, minY, invSize ); + + let p = ear.prevZ, + n = ear.nextZ; + + // look for points inside the triangle in both directions + while ( p && p.z >= minZ && n && n.z <= maxZ ) { + + if ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && + pointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) && area( p.prev, p, p.next ) >= 0 ) return false; + p = p.prevZ; + + if ( n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && + pointInTriangle( ax, ay, bx, by, cx, cy, n.x, n.y ) && area( n.prev, n, n.next ) >= 0 ) return false; + n = n.nextZ; + + } + + // look for remaining points in decreasing z-order + while ( p && p.z >= minZ ) { + + if ( p.x >= x0 && p.x <= x1 && p.y >= y0 && p.y <= y1 && p !== a && p !== c && + pointInTriangle( ax, ay, bx, by, cx, cy, p.x, p.y ) && area( p.prev, p, p.next ) >= 0 ) return false; + p = p.prevZ; + + } + + // look for remaining points in increasing z-order + while ( n && n.z <= maxZ ) { + + if ( n.x >= x0 && n.x <= x1 && n.y >= y0 && n.y <= y1 && n !== a && n !== c && + pointInTriangle( ax, ay, bx, by, cx, cy, n.x, n.y ) && area( n.prev, n, n.next ) >= 0 ) return false; + n = n.nextZ; + + } + + return true; + +} + +// go through all polygon nodes and cure small local self-intersections +function cureLocalIntersections( start, triangles, dim ) { + + let p = start; + do { + + const a = p.prev, + b = p.next.next; + + if ( ! equals( a, b ) && intersects( a, p, p.next, b ) && locallyInside( a, b ) && locallyInside( b, a ) ) { + + triangles.push( a.i / dim | 0 ); + triangles.push( p.i / dim | 0 ); + triangles.push( b.i / dim | 0 ); + + // remove two nodes involved + removeNode( p ); + removeNode( p.next ); + + p = start = b; + + } + + p = p.next; + + } while ( p !== start ); + + return filterPoints( p ); + +} + +// try splitting polygon into two and triangulate them independently +function splitEarcut( start, triangles, dim, minX, minY, invSize ) { + + // look for a valid diagonal that divides the polygon into two + let a = start; + do { + + let b = a.next.next; + while ( b !== a.prev ) { + + if ( a.i !== b.i && isValidDiagonal( a, b ) ) { + + // split the polygon in two by the diagonal + let c = splitPolygon( a, b ); + + // filter colinear points around the cuts + a = filterPoints( a, a.next ); + c = filterPoints( c, c.next ); + + // run earcut on each half + earcutLinked( a, triangles, dim, minX, minY, invSize, 0 ); + earcutLinked( c, triangles, dim, minX, minY, invSize, 0 ); + return; + + } + + b = b.next; + + } + + a = a.next; + + } while ( a !== start ); + +} + +// link every hole into the outer loop, producing a single-ring polygon without holes +function eliminateHoles( data, holeIndices, outerNode, dim ) { + + const queue = []; + let i, len, start, end, list; + + for ( i = 0, len = holeIndices.length; i < len; i ++ ) { + + start = holeIndices[ i ] * dim; + end = i < len - 1 ? holeIndices[ i + 1 ] * dim : data.length; + list = linkedList( data, start, end, dim, false ); + if ( list === list.next ) list.steiner = true; + queue.push( getLeftmost( list ) ); + + } + + queue.sort( compareX ); + + // process holes from left to right + for ( i = 0; i < queue.length; i ++ ) { + + outerNode = eliminateHole( queue[ i ], outerNode ); + + } + + return outerNode; + +} + +function compareX( a, b ) { + + return a.x - b.x; + +} + +// find a bridge between vertices that connects hole with an outer ring and link it +function eliminateHole( hole, outerNode ) { + + const bridge = findHoleBridge( hole, outerNode ); + if ( ! bridge ) { + + return outerNode; + + } + + const bridgeReverse = splitPolygon( bridge, hole ); + + // filter collinear points around the cuts + filterPoints( bridgeReverse, bridgeReverse.next ); + return filterPoints( bridge, bridge.next ); + +} + +// David Eberly's algorithm for finding a bridge between hole and outer polygon +function findHoleBridge( hole, outerNode ) { + + let p = outerNode, + qx = - Infinity, + m; + + const hx = hole.x, hy = hole.y; + + // find a segment intersected by a ray from the hole's leftmost point to the left; + // segment's endpoint with lesser x will be potential connection point + do { + + if ( hy <= p.y && hy >= p.next.y && p.next.y !== p.y ) { + + const x = p.x + ( hy - p.y ) * ( p.next.x - p.x ) / ( p.next.y - p.y ); + if ( x <= hx && x > qx ) { + + qx = x; + m = p.x < p.next.x ? p : p.next; + if ( x === hx ) return m; // hole touches outer segment; pick leftmost endpoint + + } + + } + + p = p.next; + + } while ( p !== outerNode ); + + if ( ! m ) return null; + + // look for points inside the triangle of hole point, segment intersection and endpoint; + // if there are no points found, we have a valid connection; + // otherwise choose the point of the minimum angle with the ray as connection point + + const stop = m, + mx = m.x, + my = m.y; + let tanMin = Infinity, tan; + + p = m; + + do { + + if ( hx >= p.x && p.x >= mx && hx !== p.x && + pointInTriangle( hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y ) ) { + + tan = Math.abs( hy - p.y ) / ( hx - p.x ); // tangential + + if ( locallyInside( p, hole ) && ( tan < tanMin || ( tan === tanMin && ( p.x > m.x || ( p.x === m.x && sectorContainsSector( m, p ) ) ) ) ) ) { + + m = p; + tanMin = tan; + + } + + } + + p = p.next; + + } while ( p !== stop ); + + return m; + +} + +// whether sector in vertex m contains sector in vertex p in the same coordinates +function sectorContainsSector( m, p ) { + + return area( m.prev, m, p.prev ) < 0 && area( p.next, m, m.next ) < 0; + +} + +// interlink polygon nodes in z-order +function indexCurve( start, minX, minY, invSize ) { + + let p = start; + do { + + if ( p.z === 0 ) p.z = zOrder( p.x, p.y, minX, minY, invSize ); + p.prevZ = p.prev; + p.nextZ = p.next; + p = p.next; + + } while ( p !== start ); + + p.prevZ.nextZ = null; + p.prevZ = null; + + sortLinked( p ); + +} + +// Simon Tatham's linked list merge sort algorithm +// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html +function sortLinked( list ) { + + let i, p, q, e, tail, numMerges, pSize, qSize, + inSize = 1; + + do { + + p = list; + list = null; + tail = null; + numMerges = 0; + + while ( p ) { + + numMerges ++; + q = p; + pSize = 0; + for ( i = 0; i < inSize; i ++ ) { + + pSize ++; + q = q.nextZ; + if ( ! q ) break; + + } + + qSize = inSize; + + while ( pSize > 0 || ( qSize > 0 && q ) ) { + + if ( pSize !== 0 && ( qSize === 0 || ! q || p.z <= q.z ) ) { + + e = p; + p = p.nextZ; + pSize --; + + } else { + + e = q; + q = q.nextZ; + qSize --; + + } + + if ( tail ) tail.nextZ = e; + else list = e; + + e.prevZ = tail; + tail = e; + + } + + p = q; + + } + + tail.nextZ = null; + inSize *= 2; + + } while ( numMerges > 1 ); + + return list; + +} + +// z-order of a point given coords and inverse of the longer side of data bbox +function zOrder( x, y, minX, minY, invSize ) { + + // coords are transformed into non-negative 15-bit integer range + x = ( x - minX ) * invSize | 0; + y = ( y - minY ) * invSize | 0; + + x = ( x | ( x << 8 ) ) & 0x00FF00FF; + x = ( x | ( x << 4 ) ) & 0x0F0F0F0F; + x = ( x | ( x << 2 ) ) & 0x33333333; + x = ( x | ( x << 1 ) ) & 0x55555555; + + y = ( y | ( y << 8 ) ) & 0x00FF00FF; + y = ( y | ( y << 4 ) ) & 0x0F0F0F0F; + y = ( y | ( y << 2 ) ) & 0x33333333; + y = ( y | ( y << 1 ) ) & 0x55555555; + + return x | ( y << 1 ); + +} + +// find the leftmost node of a polygon ring +function getLeftmost( start ) { + + let p = start, + leftmost = start; + do { + + if ( p.x < leftmost.x || ( p.x === leftmost.x && p.y < leftmost.y ) ) leftmost = p; + p = p.next; + + } while ( p !== start ); + + return leftmost; + +} + +// check if a point lies within a convex triangle +function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) { + + return ( cx - px ) * ( ay - py ) >= ( ax - px ) * ( cy - py ) && + ( ax - px ) * ( by - py ) >= ( bx - px ) * ( ay - py ) && + ( bx - px ) * ( cy - py ) >= ( cx - px ) * ( by - py ); + +} + +// check if a diagonal between two polygon nodes is valid (lies in polygon interior) +function isValidDiagonal( a, b ) { + + return a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges + ( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible + ( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors + equals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case + +} + +// signed area of a triangle +function area( p, q, r ) { + + return ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y ); + +} + +// check if two points are equal +function equals( p1, p2 ) { + + return p1.x === p2.x && p1.y === p2.y; + +} + +// check if two segments intersect +function intersects( p1, q1, p2, q2 ) { + + const o1 = sign( area( p1, q1, p2 ) ); + const o2 = sign( area( p1, q1, q2 ) ); + const o3 = sign( area( p2, q2, p1 ) ); + const o4 = sign( area( p2, q2, q1 ) ); + + if ( o1 !== o2 && o3 !== o4 ) return true; // general case + + if ( o1 === 0 && onSegment( p1, p2, q1 ) ) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1 + if ( o2 === 0 && onSegment( p1, q2, q1 ) ) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1 + if ( o3 === 0 && onSegment( p2, p1, q2 ) ) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2 + if ( o4 === 0 && onSegment( p2, q1, q2 ) ) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2 + + return false; + +} + +// for collinear points p, q, r, check if point q lies on segment pr +function onSegment( p, q, r ) { + + return q.x <= Math.max( p.x, r.x ) && q.x >= Math.min( p.x, r.x ) && q.y <= Math.max( p.y, r.y ) && q.y >= Math.min( p.y, r.y ); + +} + +function sign( num ) { + + return num > 0 ? 1 : num < 0 ? - 1 : 0; + +} + +// check if a polygon diagonal intersects any polygon segments +function intersectsPolygon( a, b ) { + + let p = a; + do { + + if ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && + intersects( p, p.next, a, b ) ) return true; + p = p.next; + + } while ( p !== a ); + + return false; + +} + +// check if a polygon diagonal is locally inside the polygon +function locallyInside( a, b ) { + + return area( a.prev, a, a.next ) < 0 ? + area( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 : + area( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0; + +} + +// check if the middle point of a polygon diagonal is inside the polygon +function middleInside( a, b ) { + + let p = a, + inside = false; + const px = ( a.x + b.x ) / 2, + py = ( a.y + b.y ) / 2; + do { + + if ( ( ( p.y > py ) !== ( p.next.y > py ) ) && p.next.y !== p.y && + ( px < ( p.next.x - p.x ) * ( py - p.y ) / ( p.next.y - p.y ) + p.x ) ) + inside = ! inside; + p = p.next; + + } while ( p !== a ); + + return inside; + +} + +// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two; +// if one belongs to the outer ring and another to a hole, it merges it into a single ring +function splitPolygon( a, b ) { + + const a2 = new Node( a.i, a.x, a.y ), + b2 = new Node( b.i, b.x, b.y ), + an = a.next, + bp = b.prev; + + a.next = b; + b.prev = a; + + a2.next = an; + an.prev = a2; + + b2.next = a2; + a2.prev = b2; + + bp.next = b2; + b2.prev = bp; + + return b2; + +} + +// create a node and optionally link it with previous one (in a circular doubly linked list) +function insertNode( i, x, y, last ) { + + const p = new Node( i, x, y ); + + if ( ! last ) { + + p.prev = p; + p.next = p; + + } else { + + p.next = last.next; + p.prev = last; + last.next.prev = p; + last.next = p; + + } + + return p; + +} + +function removeNode( p ) { + + p.next.prev = p.prev; + p.prev.next = p.next; + + if ( p.prevZ ) p.prevZ.nextZ = p.nextZ; + if ( p.nextZ ) p.nextZ.prevZ = p.prevZ; + +} + +function Node( i, x, y ) { + + // vertex index in coordinates array + this.i = i; + + // vertex coordinates + this.x = x; + this.y = y; + + // previous and next vertex nodes in a polygon ring + this.prev = null; + this.next = null; + + // z-order curve value + this.z = 0; + + // previous and next nodes in z-order + this.prevZ = null; + this.nextZ = null; + + // indicates whether this is a steiner point + this.steiner = false; + +} + +function signedArea( data, start, end, dim ) { + + let sum = 0; + for ( let i = start, j = end - dim; i < end; i += dim ) { + + sum += ( data[ j ] - data[ i ] ) * ( data[ i + 1 ] + data[ j + 1 ] ); + j = i; + + } + + return sum; + +} + +class ShapeUtils { + + // calculate area of the contour polygon + + static area( contour ) { + + const n = contour.length; + let a = 0.0; + + for ( let p = n - 1, q = 0; q < n; p = q ++ ) { + + a += contour[ p ].x * contour[ q ].y - contour[ q ].x * contour[ p ].y; + + } + + return a * 0.5; + + } + + static isClockWise( pts ) { + + return ShapeUtils.area( pts ) < 0; + + } + + static triangulateShape( contour, holes ) { + + const vertices = []; // flat array of vertices like [ x0,y0, x1,y1, x2,y2, ... ] + const holeIndices = []; // array of hole indices + const faces = []; // final array of vertex indices like [ [ a,b,d ], [ b,c,d ] ] + + removeDupEndPts( contour ); + addContour( vertices, contour ); + + // + + let holeIndex = contour.length; + + holes.forEach( removeDupEndPts ); + + for ( let i = 0; i < holes.length; i ++ ) { + + holeIndices.push( holeIndex ); + holeIndex += holes[ i ].length; + addContour( vertices, holes[ i ] ); + + } + + // + + const triangles = Earcut.triangulate( vertices, holeIndices ); + + // + + for ( let i = 0; i < triangles.length; i += 3 ) { + + faces.push( triangles.slice( i, i + 3 ) ); + + } + + return faces; + + } + +} + +function removeDupEndPts( points ) { + + const l = points.length; + + if ( l > 2 && points[ l - 1 ].equals( points[ 0 ] ) ) { + + points.pop(); + + } + +} + +function addContour( vertices, contour ) { + + for ( let i = 0; i < contour.length; i ++ ) { + + vertices.push( contour[ i ].x ); + vertices.push( contour[ i ].y ); + + } + +} + +/** + * Creates extruded geometry from a path shape. + * + * parameters = { + * + * curveSegments: , // number of points on the curves + * steps: , // number of points for z-side extrusions / used for subdividing segments of extrude spline too + * depth: , // Depth to extrude the shape + * + * bevelEnabled: , // turn on bevel + * bevelThickness: , // how deep into the original shape bevel goes + * bevelSize: , // how far from shape outline (including bevelOffset) is bevel + * bevelOffset: , // how far from shape outline does bevel start + * bevelSegments: , // number of bevel layers + * + * extrudePath: // curve to extrude shape along + * + * UVGenerator: // object that provides UV generator functions + * + * } + */ + + +class ExtrudeGeometry extends BufferGeometry { + + constructor( shapes = new Shape( [ new Vector2( 0.5, 0.5 ), new Vector2( - 0.5, 0.5 ), new Vector2( - 0.5, - 0.5 ), new Vector2( 0.5, - 0.5 ) ] ), options = {} ) { + + super(); + + this.type = 'ExtrudeGeometry'; + + this.parameters = { + shapes: shapes, + options: options + }; + + shapes = Array.isArray( shapes ) ? shapes : [ shapes ]; + + const scope = this; + + const verticesArray = []; + const uvArray = []; + + for ( let i = 0, l = shapes.length; i < l; i ++ ) { + + const shape = shapes[ i ]; + addShape( shape ); + + } + + // build geometry + + this.setAttribute( 'position', new Float32BufferAttribute( verticesArray, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvArray, 2 ) ); + + this.computeVertexNormals(); + + // functions + + function addShape( shape ) { + + const placeholder = []; + + // options + + const curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12; + const steps = options.steps !== undefined ? options.steps : 1; + const depth = options.depth !== undefined ? options.depth : 1; + + let bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true; + let bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 0.2; + let bevelSize = options.bevelSize !== undefined ? options.bevelSize : bevelThickness - 0.1; + let bevelOffset = options.bevelOffset !== undefined ? options.bevelOffset : 0; + let bevelSegments = options.bevelSegments !== undefined ? options.bevelSegments : 3; + + const extrudePath = options.extrudePath; + + const uvgen = options.UVGenerator !== undefined ? options.UVGenerator : WorldUVGenerator; + + // + + let extrudePts, extrudeByPath = false; + let splineTube, binormal, normal, position2; + + if ( extrudePath ) { + + extrudePts = extrudePath.getSpacedPoints( steps ); + + extrudeByPath = true; + bevelEnabled = false; // bevels not supported for path extrusion + + // SETUP TNB variables + + // TODO1 - have a .isClosed in spline? + + splineTube = extrudePath.computeFrenetFrames( steps, false ); + + // console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length); + + binormal = new Vector3(); + normal = new Vector3(); + position2 = new Vector3(); + + } + + // Safeguards if bevels are not enabled + + if ( ! bevelEnabled ) { + + bevelSegments = 0; + bevelThickness = 0; + bevelSize = 0; + bevelOffset = 0; + + } + + // Variables initialization + + const shapePoints = shape.extractPoints( curveSegments ); + + let vertices = shapePoints.shape; + const holes = shapePoints.holes; + + const reverse = ! ShapeUtils.isClockWise( vertices ); + + if ( reverse ) { + + vertices = vertices.reverse(); + + // Maybe we should also check if holes are in the opposite direction, just to be safe ... + + for ( let h = 0, hl = holes.length; h < hl; h ++ ) { + + const ahole = holes[ h ]; + + if ( ShapeUtils.isClockWise( ahole ) ) { + + holes[ h ] = ahole.reverse(); + + } + + } + + } + + + const faces = ShapeUtils.triangulateShape( vertices, holes ); + + /* Vertices */ + + const contour = vertices; // vertices has all points but contour has only points of circumference + + for ( let h = 0, hl = holes.length; h < hl; h ++ ) { + + const ahole = holes[ h ]; + + vertices = vertices.concat( ahole ); + + } + + + function scalePt2( pt, vec, size ) { + + if ( ! vec ) console.error( 'THREE.ExtrudeGeometry: vec does not exist' ); + + return pt.clone().addScaledVector( vec, size ); + + } + + const vlen = vertices.length, flen = faces.length; + + + // Find directions for point movement + + + function getBevelVec( inPt, inPrev, inNext ) { + + // computes for inPt the corresponding point inPt' on a new contour + // shifted by 1 unit (length of normalized vector) to the left + // if we walk along contour clockwise, this new contour is outside the old one + // + // inPt' is the intersection of the two lines parallel to the two + // adjacent edges of inPt at a distance of 1 unit on the left side. + + let v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt + + // good reading for geometry algorithms (here: line-line intersection) + // http://geomalgorithms.com/a05-_intersect-1.html + + const v_prev_x = inPt.x - inPrev.x, + v_prev_y = inPt.y - inPrev.y; + const v_next_x = inNext.x - inPt.x, + v_next_y = inNext.y - inPt.y; + + const v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y ); + + // check for collinear edges + const collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x ); + + if ( Math.abs( collinear0 ) > Number.EPSILON ) { + + // not collinear + + // length of vectors for normalizing + + const v_prev_len = Math.sqrt( v_prev_lensq ); + const v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y ); + + // shift adjacent points by unit vectors to the left + + const ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len ); + const ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len ); + + const ptNextShift_x = ( inNext.x - v_next_y / v_next_len ); + const ptNextShift_y = ( inNext.y + v_next_x / v_next_len ); + + // scaling factor for v_prev to intersection point + + const sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y - + ( ptNextShift_y - ptPrevShift_y ) * v_next_x ) / + ( v_prev_x * v_next_y - v_prev_y * v_next_x ); + + // vector from inPt to intersection point + + v_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x ); + v_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y ); + + // Don't normalize!, otherwise sharp corners become ugly + // but prevent crazy spikes + const v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y ); + if ( v_trans_lensq <= 2 ) { + + return new Vector2( v_trans_x, v_trans_y ); + + } else { + + shrink_by = Math.sqrt( v_trans_lensq / 2 ); + + } + + } else { + + // handle special case of collinear edges + + let direction_eq = false; // assumes: opposite + + if ( v_prev_x > Number.EPSILON ) { + + if ( v_next_x > Number.EPSILON ) { + + direction_eq = true; + + } + + } else { + + if ( v_prev_x < - Number.EPSILON ) { + + if ( v_next_x < - Number.EPSILON ) { + + direction_eq = true; + + } + + } else { + + if ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) { + + direction_eq = true; + + } + + } + + } + + if ( direction_eq ) { + + // console.log("Warning: lines are a straight sequence"); + v_trans_x = - v_prev_y; + v_trans_y = v_prev_x; + shrink_by = Math.sqrt( v_prev_lensq ); + + } else { + + // console.log("Warning: lines are a straight spike"); + v_trans_x = v_prev_x; + v_trans_y = v_prev_y; + shrink_by = Math.sqrt( v_prev_lensq / 2 ); + + } + + } + + return new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by ); + + } + + + const contourMovements = []; + + for ( let i = 0, il = contour.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) { + + if ( j === il ) j = 0; + if ( k === il ) k = 0; + + // (j)---(i)---(k) + // console.log('i,j,k', i, j , k) + + contourMovements[ i ] = getBevelVec( contour[ i ], contour[ j ], contour[ k ] ); + + } + + const holesMovements = []; + let oneHoleMovements, verticesMovements = contourMovements.concat(); + + for ( let h = 0, hl = holes.length; h < hl; h ++ ) { + + const ahole = holes[ h ]; + + oneHoleMovements = []; + + for ( let i = 0, il = ahole.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) { + + if ( j === il ) j = 0; + if ( k === il ) k = 0; + + // (j)---(i)---(k) + oneHoleMovements[ i ] = getBevelVec( ahole[ i ], ahole[ j ], ahole[ k ] ); + + } + + holesMovements.push( oneHoleMovements ); + verticesMovements = verticesMovements.concat( oneHoleMovements ); + + } + + + // Loop bevelSegments, 1 for the front, 1 for the back + + for ( let b = 0; b < bevelSegments; b ++ ) { + + //for ( b = bevelSegments; b > 0; b -- ) { + + const t = b / bevelSegments; + const z = bevelThickness * Math.cos( t * Math.PI / 2 ); + const bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset; + + // contract shape + + for ( let i = 0, il = contour.length; i < il; i ++ ) { + + const vert = scalePt2( contour[ i ], contourMovements[ i ], bs ); + + v( vert.x, vert.y, - z ); + + } + + // expand holes + + for ( let h = 0, hl = holes.length; h < hl; h ++ ) { + + const ahole = holes[ h ]; + oneHoleMovements = holesMovements[ h ]; + + for ( let i = 0, il = ahole.length; i < il; i ++ ) { + + const vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs ); + + v( vert.x, vert.y, - z ); + + } + + } + + } + + const bs = bevelSize + bevelOffset; + + // Back facing vertices + + for ( let i = 0; i < vlen; i ++ ) { + + const vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ]; + + if ( ! extrudeByPath ) { + + v( vert.x, vert.y, 0 ); + + } else { + + // v( vert.x, vert.y + extrudePts[ 0 ].y, extrudePts[ 0 ].x ); + + normal.copy( splineTube.normals[ 0 ] ).multiplyScalar( vert.x ); + binormal.copy( splineTube.binormals[ 0 ] ).multiplyScalar( vert.y ); + + position2.copy( extrudePts[ 0 ] ).add( normal ).add( binormal ); + + v( position2.x, position2.y, position2.z ); + + } + + } + + // Add stepped vertices... + // Including front facing vertices + + for ( let s = 1; s <= steps; s ++ ) { + + for ( let i = 0; i < vlen; i ++ ) { + + const vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ]; + + if ( ! extrudeByPath ) { + + v( vert.x, vert.y, depth / steps * s ); + + } else { + + // v( vert.x, vert.y + extrudePts[ s - 1 ].y, extrudePts[ s - 1 ].x ); + + normal.copy( splineTube.normals[ s ] ).multiplyScalar( vert.x ); + binormal.copy( splineTube.binormals[ s ] ).multiplyScalar( vert.y ); + + position2.copy( extrudePts[ s ] ).add( normal ).add( binormal ); + + v( position2.x, position2.y, position2.z ); + + } + + } + + } + + + // Add bevel segments planes + + //for ( b = 1; b <= bevelSegments; b ++ ) { + for ( let b = bevelSegments - 1; b >= 0; b -- ) { + + const t = b / bevelSegments; + const z = bevelThickness * Math.cos( t * Math.PI / 2 ); + const bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset; + + // contract shape + + for ( let i = 0, il = contour.length; i < il; i ++ ) { + + const vert = scalePt2( contour[ i ], contourMovements[ i ], bs ); + v( vert.x, vert.y, depth + z ); + + } + + // expand holes + + for ( let h = 0, hl = holes.length; h < hl; h ++ ) { + + const ahole = holes[ h ]; + oneHoleMovements = holesMovements[ h ]; + + for ( let i = 0, il = ahole.length; i < il; i ++ ) { + + const vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs ); + + if ( ! extrudeByPath ) { + + v( vert.x, vert.y, depth + z ); + + } else { + + v( vert.x, vert.y + extrudePts[ steps - 1 ].y, extrudePts[ steps - 1 ].x + z ); + + } + + } + + } + + } + + /* Faces */ + + // Top and bottom faces + + buildLidFaces(); + + // Sides faces + + buildSideFaces(); + + + ///// Internal functions + + function buildLidFaces() { + + const start = verticesArray.length / 3; + + if ( bevelEnabled ) { + + let layer = 0; // steps + 1 + let offset = vlen * layer; + + // Bottom faces + + for ( let i = 0; i < flen; i ++ ) { + + const face = faces[ i ]; + f3( face[ 2 ] + offset, face[ 1 ] + offset, face[ 0 ] + offset ); + + } + + layer = steps + bevelSegments * 2; + offset = vlen * layer; + + // Top faces + + for ( let i = 0; i < flen; i ++ ) { + + const face = faces[ i ]; + f3( face[ 0 ] + offset, face[ 1 ] + offset, face[ 2 ] + offset ); + + } + + } else { + + // Bottom faces + + for ( let i = 0; i < flen; i ++ ) { + + const face = faces[ i ]; + f3( face[ 2 ], face[ 1 ], face[ 0 ] ); + + } + + // Top faces + + for ( let i = 0; i < flen; i ++ ) { + + const face = faces[ i ]; + f3( face[ 0 ] + vlen * steps, face[ 1 ] + vlen * steps, face[ 2 ] + vlen * steps ); + + } + + } + + scope.addGroup( start, verticesArray.length / 3 - start, 0 ); + + } + + // Create faces for the z-sides of the shape + + function buildSideFaces() { + + const start = verticesArray.length / 3; + let layeroffset = 0; + sidewalls( contour, layeroffset ); + layeroffset += contour.length; + + for ( let h = 0, hl = holes.length; h < hl; h ++ ) { + + const ahole = holes[ h ]; + sidewalls( ahole, layeroffset ); + + //, true + layeroffset += ahole.length; + + } + + + scope.addGroup( start, verticesArray.length / 3 - start, 1 ); + + + } + + function sidewalls( contour, layeroffset ) { + + let i = contour.length; + + while ( -- i >= 0 ) { + + const j = i; + let k = i - 1; + if ( k < 0 ) k = contour.length - 1; + + //console.log('b', i,j, i-1, k,vertices.length); + + for ( let s = 0, sl = ( steps + bevelSegments * 2 ); s < sl; s ++ ) { + + const slen1 = vlen * s; + const slen2 = vlen * ( s + 1 ); + + const a = layeroffset + j + slen1, + b = layeroffset + k + slen1, + c = layeroffset + k + slen2, + d = layeroffset + j + slen2; + + f4( a, b, c, d ); + + } + + } + + } + + function v( x, y, z ) { + + placeholder.push( x ); + placeholder.push( y ); + placeholder.push( z ); + + } + + + function f3( a, b, c ) { + + addVertex( a ); + addVertex( b ); + addVertex( c ); + + const nextIndex = verticesArray.length / 3; + const uvs = uvgen.generateTopUV( scope, verticesArray, nextIndex - 3, nextIndex - 2, nextIndex - 1 ); + + addUV( uvs[ 0 ] ); + addUV( uvs[ 1 ] ); + addUV( uvs[ 2 ] ); + + } + + function f4( a, b, c, d ) { + + addVertex( a ); + addVertex( b ); + addVertex( d ); + + addVertex( b ); + addVertex( c ); + addVertex( d ); + + + const nextIndex = verticesArray.length / 3; + const uvs = uvgen.generateSideWallUV( scope, verticesArray, nextIndex - 6, nextIndex - 3, nextIndex - 2, nextIndex - 1 ); + + addUV( uvs[ 0 ] ); + addUV( uvs[ 1 ] ); + addUV( uvs[ 3 ] ); + + addUV( uvs[ 1 ] ); + addUV( uvs[ 2 ] ); + addUV( uvs[ 3 ] ); + + } + + function addVertex( index ) { + + verticesArray.push( placeholder[ index * 3 + 0 ] ); + verticesArray.push( placeholder[ index * 3 + 1 ] ); + verticesArray.push( placeholder[ index * 3 + 2 ] ); + + } + + + function addUV( vector2 ) { + + uvArray.push( vector2.x ); + uvArray.push( vector2.y ); + + } + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + const shapes = this.parameters.shapes; + const options = this.parameters.options; + + return toJSON$1( shapes, options, data ); + + } + + static fromJSON( data, shapes ) { + + const geometryShapes = []; + + for ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) { + + const shape = shapes[ data.shapes[ j ] ]; + + geometryShapes.push( shape ); + + } + + const extrudePath = data.options.extrudePath; + + if ( extrudePath !== undefined ) { + + data.options.extrudePath = new Curves[ extrudePath.type ]().fromJSON( extrudePath ); + + } + + return new ExtrudeGeometry( geometryShapes, data.options ); + + } + +} + +const WorldUVGenerator = { + + generateTopUV: function ( geometry, vertices, indexA, indexB, indexC ) { + + const a_x = vertices[ indexA * 3 ]; + const a_y = vertices[ indexA * 3 + 1 ]; + const b_x = vertices[ indexB * 3 ]; + const b_y = vertices[ indexB * 3 + 1 ]; + const c_x = vertices[ indexC * 3 ]; + const c_y = vertices[ indexC * 3 + 1 ]; + + return [ + new Vector2( a_x, a_y ), + new Vector2( b_x, b_y ), + new Vector2( c_x, c_y ) + ]; + + }, + + generateSideWallUV: function ( geometry, vertices, indexA, indexB, indexC, indexD ) { + + const a_x = vertices[ indexA * 3 ]; + const a_y = vertices[ indexA * 3 + 1 ]; + const a_z = vertices[ indexA * 3 + 2 ]; + const b_x = vertices[ indexB * 3 ]; + const b_y = vertices[ indexB * 3 + 1 ]; + const b_z = vertices[ indexB * 3 + 2 ]; + const c_x = vertices[ indexC * 3 ]; + const c_y = vertices[ indexC * 3 + 1 ]; + const c_z = vertices[ indexC * 3 + 2 ]; + const d_x = vertices[ indexD * 3 ]; + const d_y = vertices[ indexD * 3 + 1 ]; + const d_z = vertices[ indexD * 3 + 2 ]; + + if ( Math.abs( a_y - b_y ) < Math.abs( a_x - b_x ) ) { + + return [ + new Vector2( a_x, 1 - a_z ), + new Vector2( b_x, 1 - b_z ), + new Vector2( c_x, 1 - c_z ), + new Vector2( d_x, 1 - d_z ) + ]; + + } else { + + return [ + new Vector2( a_y, 1 - a_z ), + new Vector2( b_y, 1 - b_z ), + new Vector2( c_y, 1 - c_z ), + new Vector2( d_y, 1 - d_z ) + ]; + + } + + } + +}; + +function toJSON$1( shapes, options, data ) { + + data.shapes = []; + + if ( Array.isArray( shapes ) ) { + + for ( let i = 0, l = shapes.length; i < l; i ++ ) { + + const shape = shapes[ i ]; + + data.shapes.push( shape.uuid ); + + } + + } else { + + data.shapes.push( shapes.uuid ); + + } + + data.options = Object.assign( {}, options ); + + if ( options.extrudePath !== undefined ) data.options.extrudePath = options.extrudePath.toJSON(); + + return data; + +} + +class IcosahedronGeometry extends PolyhedronGeometry { + + constructor( radius = 1, detail = 0 ) { + + const t = ( 1 + Math.sqrt( 5 ) ) / 2; + + const vertices = [ + - 1, t, 0, 1, t, 0, - 1, - t, 0, 1, - t, 0, + 0, - 1, t, 0, 1, t, 0, - 1, - t, 0, 1, - t, + t, 0, - 1, t, 0, 1, - t, 0, - 1, - t, 0, 1 + ]; + + const indices = [ + 0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11, + 1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8, + 3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9, + 4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1 + ]; + + super( vertices, indices, radius, detail ); + + this.type = 'IcosahedronGeometry'; + + this.parameters = { + radius: radius, + detail: detail + }; + + } + + static fromJSON( data ) { + + return new IcosahedronGeometry( data.radius, data.detail ); + + } + +} + +class OctahedronGeometry extends PolyhedronGeometry { + + constructor( radius = 1, detail = 0 ) { + + const vertices = [ + 1, 0, 0, - 1, 0, 0, 0, 1, 0, + 0, - 1, 0, 0, 0, 1, 0, 0, - 1 + ]; + + const indices = [ + 0, 2, 4, 0, 4, 3, 0, 3, 5, + 0, 5, 2, 1, 2, 5, 1, 5, 3, + 1, 3, 4, 1, 4, 2 + ]; + + super( vertices, indices, radius, detail ); + + this.type = 'OctahedronGeometry'; + + this.parameters = { + radius: radius, + detail: detail + }; + + } + + static fromJSON( data ) { + + return new OctahedronGeometry( data.radius, data.detail ); + + } + +} + +class RingGeometry extends BufferGeometry { + + constructor( innerRadius = 0.5, outerRadius = 1, thetaSegments = 32, phiSegments = 1, thetaStart = 0, thetaLength = Math.PI * 2 ) { + + super(); + + this.type = 'RingGeometry'; + + this.parameters = { + innerRadius: innerRadius, + outerRadius: outerRadius, + thetaSegments: thetaSegments, + phiSegments: phiSegments, + thetaStart: thetaStart, + thetaLength: thetaLength + }; + + thetaSegments = Math.max( 3, thetaSegments ); + phiSegments = Math.max( 1, phiSegments ); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // some helper variables + + let radius = innerRadius; + const radiusStep = ( ( outerRadius - innerRadius ) / phiSegments ); + const vertex = new Vector3(); + const uv = new Vector2(); + + // generate vertices, normals and uvs + + for ( let j = 0; j <= phiSegments; j ++ ) { + + for ( let i = 0; i <= thetaSegments; i ++ ) { + + // values are generate from the inside of the ring to the outside + + const segment = thetaStart + i / thetaSegments * thetaLength; + + // vertex + + vertex.x = radius * Math.cos( segment ); + vertex.y = radius * Math.sin( segment ); + + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal + + normals.push( 0, 0, 1 ); + + // uv + + uv.x = ( vertex.x / outerRadius + 1 ) / 2; + uv.y = ( vertex.y / outerRadius + 1 ) / 2; + + uvs.push( uv.x, uv.y ); + + } + + // increase the radius for next row of vertices + + radius += radiusStep; + + } + + // indices + + for ( let j = 0; j < phiSegments; j ++ ) { + + const thetaSegmentLevel = j * ( thetaSegments + 1 ); + + for ( let i = 0; i < thetaSegments; i ++ ) { + + const segment = i + thetaSegmentLevel; + + const a = segment; + const b = segment + thetaSegments + 1; + const c = segment + thetaSegments + 2; + const d = segment + 1; + + // faces + + indices.push( a, b, d ); + indices.push( b, c, d ); + + } + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new RingGeometry( data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength ); + + } + +} + +class ShapeGeometry extends BufferGeometry { + + constructor( shapes = new Shape( [ new Vector2( 0, 0.5 ), new Vector2( - 0.5, - 0.5 ), new Vector2( 0.5, - 0.5 ) ] ), curveSegments = 12 ) { + + super(); + + this.type = 'ShapeGeometry'; + + this.parameters = { + shapes: shapes, + curveSegments: curveSegments + }; + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // helper variables + + let groupStart = 0; + let groupCount = 0; + + // allow single and array values for "shapes" parameter + + if ( Array.isArray( shapes ) === false ) { + + addShape( shapes ); + + } else { + + for ( let i = 0; i < shapes.length; i ++ ) { + + addShape( shapes[ i ] ); + + this.addGroup( groupStart, groupCount, i ); // enables MultiMaterial support + + groupStart += groupCount; + groupCount = 0; + + } + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + + // helper functions + + function addShape( shape ) { + + const indexOffset = vertices.length / 3; + const points = shape.extractPoints( curveSegments ); + + let shapeVertices = points.shape; + const shapeHoles = points.holes; + + // check direction of vertices + + if ( ShapeUtils.isClockWise( shapeVertices ) === false ) { + + shapeVertices = shapeVertices.reverse(); + + } + + for ( let i = 0, l = shapeHoles.length; i < l; i ++ ) { + + const shapeHole = shapeHoles[ i ]; + + if ( ShapeUtils.isClockWise( shapeHole ) === true ) { + + shapeHoles[ i ] = shapeHole.reverse(); + + } + + } + + const faces = ShapeUtils.triangulateShape( shapeVertices, shapeHoles ); + + // join vertices of inner and outer paths to a single array + + for ( let i = 0, l = shapeHoles.length; i < l; i ++ ) { + + const shapeHole = shapeHoles[ i ]; + shapeVertices = shapeVertices.concat( shapeHole ); + + } + + // vertices, normals, uvs + + for ( let i = 0, l = shapeVertices.length; i < l; i ++ ) { + + const vertex = shapeVertices[ i ]; + + vertices.push( vertex.x, vertex.y, 0 ); + normals.push( 0, 0, 1 ); + uvs.push( vertex.x, vertex.y ); // world uvs + + } + + // indices + + for ( let i = 0, l = faces.length; i < l; i ++ ) { + + const face = faces[ i ]; + + const a = face[ 0 ] + indexOffset; + const b = face[ 1 ] + indexOffset; + const c = face[ 2 ] + indexOffset; + + indices.push( a, b, c ); + groupCount += 3; + + } + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + const shapes = this.parameters.shapes; + + return toJSON( shapes, data ); + + } + + static fromJSON( data, shapes ) { + + const geometryShapes = []; + + for ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) { + + const shape = shapes[ data.shapes[ j ] ]; + + geometryShapes.push( shape ); + + } + + return new ShapeGeometry( geometryShapes, data.curveSegments ); + + } + +} + +function toJSON( shapes, data ) { + + data.shapes = []; + + if ( Array.isArray( shapes ) ) { + + for ( let i = 0, l = shapes.length; i < l; i ++ ) { + + const shape = shapes[ i ]; + + data.shapes.push( shape.uuid ); + + } + + } else { + + data.shapes.push( shapes.uuid ); + + } + + return data; + +} + +class SphereGeometry extends BufferGeometry { + + constructor( radius = 1, widthSegments = 32, heightSegments = 16, phiStart = 0, phiLength = Math.PI * 2, thetaStart = 0, thetaLength = Math.PI ) { + + super(); + + this.type = 'SphereGeometry'; + + this.parameters = { + radius: radius, + widthSegments: widthSegments, + heightSegments: heightSegments, + phiStart: phiStart, + phiLength: phiLength, + thetaStart: thetaStart, + thetaLength: thetaLength + }; + + widthSegments = Math.max( 3, Math.floor( widthSegments ) ); + heightSegments = Math.max( 2, Math.floor( heightSegments ) ); + + const thetaEnd = Math.min( thetaStart + thetaLength, Math.PI ); + + let index = 0; + const grid = []; + + const vertex = new Vector3(); + const normal = new Vector3(); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // generate vertices, normals and uvs + + for ( let iy = 0; iy <= heightSegments; iy ++ ) { + + const verticesRow = []; + + const v = iy / heightSegments; + + // special case for the poles + + let uOffset = 0; + + if ( iy === 0 && thetaStart === 0 ) { + + uOffset = 0.5 / widthSegments; + + } else if ( iy === heightSegments && thetaEnd === Math.PI ) { + + uOffset = - 0.5 / widthSegments; + + } + + for ( let ix = 0; ix <= widthSegments; ix ++ ) { + + const u = ix / widthSegments; + + // vertex + + vertex.x = - radius * Math.cos( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength ); + vertex.y = radius * Math.cos( thetaStart + v * thetaLength ); + vertex.z = radius * Math.sin( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength ); + + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal + + normal.copy( vertex ).normalize(); + normals.push( normal.x, normal.y, normal.z ); + + // uv + + uvs.push( u + uOffset, 1 - v ); + + verticesRow.push( index ++ ); + + } + + grid.push( verticesRow ); + + } + + // indices + + for ( let iy = 0; iy < heightSegments; iy ++ ) { + + for ( let ix = 0; ix < widthSegments; ix ++ ) { + + const a = grid[ iy ][ ix + 1 ]; + const b = grid[ iy ][ ix ]; + const c = grid[ iy + 1 ][ ix ]; + const d = grid[ iy + 1 ][ ix + 1 ]; + + if ( iy !== 0 || thetaStart > 0 ) indices.push( a, b, d ); + if ( iy !== heightSegments - 1 || thetaEnd < Math.PI ) indices.push( b, c, d ); + + } + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new SphereGeometry( data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength ); + + } + +} + +class TetrahedronGeometry extends PolyhedronGeometry { + + constructor( radius = 1, detail = 0 ) { + + const vertices = [ + 1, 1, 1, - 1, - 1, 1, - 1, 1, - 1, 1, - 1, - 1 + ]; + + const indices = [ + 2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1 + ]; + + super( vertices, indices, radius, detail ); + + this.type = 'TetrahedronGeometry'; + + this.parameters = { + radius: radius, + detail: detail + }; + + } + + static fromJSON( data ) { + + return new TetrahedronGeometry( data.radius, data.detail ); + + } + +} + +class TorusGeometry extends BufferGeometry { + + constructor( radius = 1, tube = 0.4, radialSegments = 12, tubularSegments = 48, arc = Math.PI * 2 ) { + + super(); + + this.type = 'TorusGeometry'; + + this.parameters = { + radius: radius, + tube: tube, + radialSegments: radialSegments, + tubularSegments: tubularSegments, + arc: arc + }; + + radialSegments = Math.floor( radialSegments ); + tubularSegments = Math.floor( tubularSegments ); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // helper variables + + const center = new Vector3(); + const vertex = new Vector3(); + const normal = new Vector3(); + + // generate vertices, normals and uvs + + for ( let j = 0; j <= radialSegments; j ++ ) { + + for ( let i = 0; i <= tubularSegments; i ++ ) { + + const u = i / tubularSegments * arc; + const v = j / radialSegments * Math.PI * 2; + + // vertex + + vertex.x = ( radius + tube * Math.cos( v ) ) * Math.cos( u ); + vertex.y = ( radius + tube * Math.cos( v ) ) * Math.sin( u ); + vertex.z = tube * Math.sin( v ); + + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal + + center.x = radius * Math.cos( u ); + center.y = radius * Math.sin( u ); + normal.subVectors( vertex, center ).normalize(); + + normals.push( normal.x, normal.y, normal.z ); + + // uv + + uvs.push( i / tubularSegments ); + uvs.push( j / radialSegments ); + + } + + } + + // generate indices + + for ( let j = 1; j <= radialSegments; j ++ ) { + + for ( let i = 1; i <= tubularSegments; i ++ ) { + + // indices + + const a = ( tubularSegments + 1 ) * j + i - 1; + const b = ( tubularSegments + 1 ) * ( j - 1 ) + i - 1; + const c = ( tubularSegments + 1 ) * ( j - 1 ) + i; + const d = ( tubularSegments + 1 ) * j + i; + + // faces + + indices.push( a, b, d ); + indices.push( b, c, d ); + + } + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new TorusGeometry( data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc ); + + } + +} + +class TorusKnotGeometry extends BufferGeometry { + + constructor( radius = 1, tube = 0.4, tubularSegments = 64, radialSegments = 8, p = 2, q = 3 ) { + + super(); + + this.type = 'TorusKnotGeometry'; + + this.parameters = { + radius: radius, + tube: tube, + tubularSegments: tubularSegments, + radialSegments: radialSegments, + p: p, + q: q + }; + + tubularSegments = Math.floor( tubularSegments ); + radialSegments = Math.floor( radialSegments ); + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + // helper variables + + const vertex = new Vector3(); + const normal = new Vector3(); + + const P1 = new Vector3(); + const P2 = new Vector3(); + + const B = new Vector3(); + const T = new Vector3(); + const N = new Vector3(); + + // generate vertices, normals and uvs + + for ( let i = 0; i <= tubularSegments; ++ i ) { + + // the radian "u" is used to calculate the position on the torus curve of the current tubular segment + + const u = i / tubularSegments * p * Math.PI * 2; + + // now we calculate two points. P1 is our current position on the curve, P2 is a little farther ahead. + // these points are used to create a special "coordinate space", which is necessary to calculate the correct vertex positions + + calculatePositionOnCurve( u, p, q, radius, P1 ); + calculatePositionOnCurve( u + 0.01, p, q, radius, P2 ); + + // calculate orthonormal basis + + T.subVectors( P2, P1 ); + N.addVectors( P2, P1 ); + B.crossVectors( T, N ); + N.crossVectors( B, T ); + + // normalize B, N. T can be ignored, we don't use it + + B.normalize(); + N.normalize(); + + for ( let j = 0; j <= radialSegments; ++ j ) { + + // now calculate the vertices. they are nothing more than an extrusion of the torus curve. + // because we extrude a shape in the xy-plane, there is no need to calculate a z-value. + + const v = j / radialSegments * Math.PI * 2; + const cx = - tube * Math.cos( v ); + const cy = tube * Math.sin( v ); + + // now calculate the final vertex position. + // first we orient the extrusion with our basis vectors, then we add it to the current position on the curve + + vertex.x = P1.x + ( cx * N.x + cy * B.x ); + vertex.y = P1.y + ( cx * N.y + cy * B.y ); + vertex.z = P1.z + ( cx * N.z + cy * B.z ); + + vertices.push( vertex.x, vertex.y, vertex.z ); + + // normal (P1 is always the center/origin of the extrusion, thus we can use it to calculate the normal) + + normal.subVectors( vertex, P1 ).normalize(); + + normals.push( normal.x, normal.y, normal.z ); + + // uv + + uvs.push( i / tubularSegments ); + uvs.push( j / radialSegments ); + + } + + } + + // generate indices + + for ( let j = 1; j <= tubularSegments; j ++ ) { + + for ( let i = 1; i <= radialSegments; i ++ ) { + + // indices + + const a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 ); + const b = ( radialSegments + 1 ) * j + ( i - 1 ); + const c = ( radialSegments + 1 ) * j + i; + const d = ( radialSegments + 1 ) * ( j - 1 ) + i; + + // faces + + indices.push( a, b, d ); + indices.push( b, c, d ); + + } + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + // this function calculates the current position on the torus curve + + function calculatePositionOnCurve( u, p, q, radius, position ) { + + const cu = Math.cos( u ); + const su = Math.sin( u ); + const quOverP = q / p * u; + const cs = Math.cos( quOverP ); + + position.x = radius * ( 2 + cs ) * 0.5 * cu; + position.y = radius * ( 2 + cs ) * su * 0.5; + position.z = radius * Math.sin( quOverP ) * 0.5; + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + static fromJSON( data ) { + + return new TorusKnotGeometry( data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q ); + + } + +} + +class TubeGeometry extends BufferGeometry { + + constructor( path = new QuadraticBezierCurve3( new Vector3( - 1, - 1, 0 ), new Vector3( - 1, 1, 0 ), new Vector3( 1, 1, 0 ) ), tubularSegments = 64, radius = 1, radialSegments = 8, closed = false ) { + + super(); + + this.type = 'TubeGeometry'; + + this.parameters = { + path: path, + tubularSegments: tubularSegments, + radius: radius, + radialSegments: radialSegments, + closed: closed + }; + + const frames = path.computeFrenetFrames( tubularSegments, closed ); + + // expose internals + + this.tangents = frames.tangents; + this.normals = frames.normals; + this.binormals = frames.binormals; + + // helper variables + + const vertex = new Vector3(); + const normal = new Vector3(); + const uv = new Vector2(); + let P = new Vector3(); + + // buffer + + const vertices = []; + const normals = []; + const uvs = []; + const indices = []; + + // create buffer data + + generateBufferData(); + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + // functions + + function generateBufferData() { + + for ( let i = 0; i < tubularSegments; i ++ ) { + + generateSegment( i ); + + } + + // if the geometry is not closed, generate the last row of vertices and normals + // at the regular position on the given path + // + // if the geometry is closed, duplicate the first row of vertices and normals (uvs will differ) + + generateSegment( ( closed === false ) ? tubularSegments : 0 ); + + // uvs are generated in a separate function. + // this makes it easy compute correct values for closed geometries + + generateUVs(); + + // finally create faces + + generateIndices(); + + } + + function generateSegment( i ) { + + // we use getPointAt to sample evenly distributed points from the given path + + P = path.getPointAt( i / tubularSegments, P ); + + // retrieve corresponding normal and binormal + + const N = frames.normals[ i ]; + const B = frames.binormals[ i ]; + + // generate normals and vertices for the current segment + + for ( let j = 0; j <= radialSegments; j ++ ) { + + const v = j / radialSegments * Math.PI * 2; + + const sin = Math.sin( v ); + const cos = - Math.cos( v ); + + // normal + + normal.x = ( cos * N.x + sin * B.x ); + normal.y = ( cos * N.y + sin * B.y ); + normal.z = ( cos * N.z + sin * B.z ); + normal.normalize(); + + normals.push( normal.x, normal.y, normal.z ); + + // vertex + + vertex.x = P.x + radius * normal.x; + vertex.y = P.y + radius * normal.y; + vertex.z = P.z + radius * normal.z; + + vertices.push( vertex.x, vertex.y, vertex.z ); + + } + + } + + function generateIndices() { + + for ( let j = 1; j <= tubularSegments; j ++ ) { + + for ( let i = 1; i <= radialSegments; i ++ ) { + + const a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 ); + const b = ( radialSegments + 1 ) * j + ( i - 1 ); + const c = ( radialSegments + 1 ) * j + i; + const d = ( radialSegments + 1 ) * ( j - 1 ) + i; + + // faces + + indices.push( a, b, d ); + indices.push( b, c, d ); + + } + + } + + } + + function generateUVs() { + + for ( let i = 0; i <= tubularSegments; i ++ ) { + + for ( let j = 0; j <= radialSegments; j ++ ) { + + uv.x = i / tubularSegments; + uv.y = j / radialSegments; + + uvs.push( uv.x, uv.y ); + + } + + } + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.path = this.parameters.path.toJSON(); + + return data; + + } + + static fromJSON( data ) { + + // This only works for built-in curves (e.g. CatmullRomCurve3). + // User defined curves or instances of CurvePath will not be deserialized. + return new TubeGeometry( + new Curves[ data.path.type ]().fromJSON( data.path ), + data.tubularSegments, + data.radius, + data.radialSegments, + data.closed + ); + + } + +} + +class WireframeGeometry extends BufferGeometry { + + constructor( geometry = null ) { + + super(); + + this.type = 'WireframeGeometry'; + + this.parameters = { + geometry: geometry + }; + + if ( geometry !== null ) { + + // buffer + + const vertices = []; + const edges = new Set(); + + // helper variables + + const start = new Vector3(); + const end = new Vector3(); + + if ( geometry.index !== null ) { + + // indexed BufferGeometry + + const position = geometry.attributes.position; + const indices = geometry.index; + let groups = geometry.groups; + + if ( groups.length === 0 ) { + + groups = [ { start: 0, count: indices.count, materialIndex: 0 } ]; + + } + + // create a data structure that contains all edges without duplicates + + for ( let o = 0, ol = groups.length; o < ol; ++ o ) { + + const group = groups[ o ]; + + const groupStart = group.start; + const groupCount = group.count; + + for ( let i = groupStart, l = ( groupStart + groupCount ); i < l; i += 3 ) { + + for ( let j = 0; j < 3; j ++ ) { + + const index1 = indices.getX( i + j ); + const index2 = indices.getX( i + ( j + 1 ) % 3 ); + + start.fromBufferAttribute( position, index1 ); + end.fromBufferAttribute( position, index2 ); + + if ( isUniqueEdge( start, end, edges ) === true ) { + + vertices.push( start.x, start.y, start.z ); + vertices.push( end.x, end.y, end.z ); + + } + + } + + } + + } + + } else { + + // non-indexed BufferGeometry + + const position = geometry.attributes.position; + + for ( let i = 0, l = ( position.count / 3 ); i < l; i ++ ) { + + for ( let j = 0; j < 3; j ++ ) { + + // three edges per triangle, an edge is represented as (index1, index2) + // e.g. the first triangle has the following edges: (0,1),(1,2),(2,0) + + const index1 = 3 * i + j; + const index2 = 3 * i + ( ( j + 1 ) % 3 ); + + start.fromBufferAttribute( position, index1 ); + end.fromBufferAttribute( position, index2 ); + + if ( isUniqueEdge( start, end, edges ) === true ) { + + vertices.push( start.x, start.y, start.z ); + vertices.push( end.x, end.y, end.z ); + + } + + } + + } + + } + + // build geometry + + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + + } + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + +} + +function isUniqueEdge( start, end, edges ) { + + const hash1 = `${start.x},${start.y},${start.z}-${end.x},${end.y},${end.z}`; + const hash2 = `${end.x},${end.y},${end.z}-${start.x},${start.y},${start.z}`; // coincident edge + + if ( edges.has( hash1 ) === true || edges.has( hash2 ) === true ) { + + return false; + + } else { + + edges.add( hash1 ); + edges.add( hash2 ); + return true; + + } + +} + +var Geometries = /*#__PURE__*/Object.freeze({ + __proto__: null, + BoxGeometry: BoxGeometry, + CapsuleGeometry: CapsuleGeometry, + CircleGeometry: CircleGeometry, + ConeGeometry: ConeGeometry, + CylinderGeometry: CylinderGeometry, + DodecahedronGeometry: DodecahedronGeometry, + EdgesGeometry: EdgesGeometry, + ExtrudeGeometry: ExtrudeGeometry, + IcosahedronGeometry: IcosahedronGeometry, + LatheGeometry: LatheGeometry, + OctahedronGeometry: OctahedronGeometry, + PlaneGeometry: PlaneGeometry, + PolyhedronGeometry: PolyhedronGeometry, + RingGeometry: RingGeometry, + ShapeGeometry: ShapeGeometry, + SphereGeometry: SphereGeometry, + TetrahedronGeometry: TetrahedronGeometry, + TorusGeometry: TorusGeometry, + TorusKnotGeometry: TorusKnotGeometry, + TubeGeometry: TubeGeometry, + WireframeGeometry: WireframeGeometry +}); + +class ShadowMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isShadowMaterial = true; + + this.type = 'ShadowMaterial'; + + this.color = new Color( 0x000000 ); + this.transparent = true; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.fog = source.fog; + + return this; + + } + +} + +class RawShaderMaterial extends ShaderMaterial { + + constructor( parameters ) { + + super( parameters ); + + this.isRawShaderMaterial = true; + + this.type = 'RawShaderMaterial'; + + } + +} + +class MeshStandardMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshStandardMaterial = true; + + this.defines = { 'STANDARD': '' }; + + this.type = 'MeshStandardMaterial'; + + this.color = new Color( 0xffffff ); // diffuse + this.roughness = 1.0; + this.metalness = 0.0; + + this.map = null; + + this.lightMap = null; + this.lightMapIntensity = 1.0; + + this.aoMap = null; + this.aoMapIntensity = 1.0; + + this.emissive = new Color( 0x000000 ); + this.emissiveIntensity = 1.0; + this.emissiveMap = null; + + this.bumpMap = null; + this.bumpScale = 1; + + this.normalMap = null; + this.normalMapType = TangentSpaceNormalMap; + this.normalScale = new Vector2( 1, 1 ); + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.roughnessMap = null; + + this.metalnessMap = null; + + this.alphaMap = null; + + this.envMap = null; + this.envMapRotation = new Euler(); + this.envMapIntensity = 1.0; + + this.wireframe = false; + this.wireframeLinewidth = 1; + this.wireframeLinecap = 'round'; + this.wireframeLinejoin = 'round'; + + this.flatShading = false; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.defines = { 'STANDARD': '' }; + + this.color.copy( source.color ); + this.roughness = source.roughness; + this.metalness = source.metalness; + + this.map = source.map; + + this.lightMap = source.lightMap; + this.lightMapIntensity = source.lightMapIntensity; + + this.aoMap = source.aoMap; + this.aoMapIntensity = source.aoMapIntensity; + + this.emissive.copy( source.emissive ); + this.emissiveMap = source.emissiveMap; + this.emissiveIntensity = source.emissiveIntensity; + + this.bumpMap = source.bumpMap; + this.bumpScale = source.bumpScale; + + this.normalMap = source.normalMap; + this.normalMapType = source.normalMapType; + this.normalScale.copy( source.normalScale ); + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.roughnessMap = source.roughnessMap; + + this.metalnessMap = source.metalnessMap; + + this.alphaMap = source.alphaMap; + + this.envMap = source.envMap; + this.envMapRotation.copy( source.envMapRotation ); + this.envMapIntensity = source.envMapIntensity; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + this.wireframeLinecap = source.wireframeLinecap; + this.wireframeLinejoin = source.wireframeLinejoin; + + this.flatShading = source.flatShading; + + this.fog = source.fog; + + return this; + + } + +} + +class MeshPhysicalMaterial extends MeshStandardMaterial { + + constructor( parameters ) { + + super(); + + this.isMeshPhysicalMaterial = true; + + this.defines = { + + 'STANDARD': '', + 'PHYSICAL': '' + + }; + + this.type = 'MeshPhysicalMaterial'; + + this.anisotropyRotation = 0; + this.anisotropyMap = null; + + this.clearcoatMap = null; + this.clearcoatRoughness = 0.0; + this.clearcoatRoughnessMap = null; + this.clearcoatNormalScale = new Vector2( 1, 1 ); + this.clearcoatNormalMap = null; + + this.ior = 1.5; + + Object.defineProperty( this, 'reflectivity', { + get: function () { + + return ( clamp( 2.5 * ( this.ior - 1 ) / ( this.ior + 1 ), 0, 1 ) ); + + }, + set: function ( reflectivity ) { + + this.ior = ( 1 + 0.4 * reflectivity ) / ( 1 - 0.4 * reflectivity ); + + } + } ); + + this.iridescenceMap = null; + this.iridescenceIOR = 1.3; + this.iridescenceThicknessRange = [ 100, 400 ]; + this.iridescenceThicknessMap = null; + + this.sheenColor = new Color( 0x000000 ); + this.sheenColorMap = null; + this.sheenRoughness = 1.0; + this.sheenRoughnessMap = null; + + this.transmissionMap = null; + + this.thickness = 0; + this.thicknessMap = null; + this.attenuationDistance = Infinity; + this.attenuationColor = new Color( 1, 1, 1 ); + + this.specularIntensity = 1.0; + this.specularIntensityMap = null; + this.specularColor = new Color( 1, 1, 1 ); + this.specularColorMap = null; + + this._anisotropy = 0; + this._clearcoat = 0; + this._dispersion = 0; + this._iridescence = 0; + this._sheen = 0.0; + this._transmission = 0; + + this.setValues( parameters ); + + } + + get anisotropy() { + + return this._anisotropy; + + } + + set anisotropy( value ) { + + if ( this._anisotropy > 0 !== value > 0 ) { + + this.version ++; + + } + + this._anisotropy = value; + + } + + get clearcoat() { + + return this._clearcoat; + + } + + set clearcoat( value ) { + + if ( this._clearcoat > 0 !== value > 0 ) { + + this.version ++; + + } + + this._clearcoat = value; + + } + + get iridescence() { + + return this._iridescence; + + } + + set iridescence( value ) { + + if ( this._iridescence > 0 !== value > 0 ) { + + this.version ++; + + } + + this._iridescence = value; + + } + + get dispersion() { + + return this._dispersion; + + } + + set dispersion( value ) { + + if ( this._dispersion > 0 !== value > 0 ) { + + this.version ++; + + } + + this._dispersion = value; + + } + + get sheen() { + + return this._sheen; + + } + + set sheen( value ) { + + if ( this._sheen > 0 !== value > 0 ) { + + this.version ++; + + } + + this._sheen = value; + + } + + get transmission() { + + return this._transmission; + + } + + set transmission( value ) { + + if ( this._transmission > 0 !== value > 0 ) { + + this.version ++; + + } + + this._transmission = value; + + } + + copy( source ) { + + super.copy( source ); + + this.defines = { + + 'STANDARD': '', + 'PHYSICAL': '' + + }; + + this.anisotropy = source.anisotropy; + this.anisotropyRotation = source.anisotropyRotation; + this.anisotropyMap = source.anisotropyMap; + + this.clearcoat = source.clearcoat; + this.clearcoatMap = source.clearcoatMap; + this.clearcoatRoughness = source.clearcoatRoughness; + this.clearcoatRoughnessMap = source.clearcoatRoughnessMap; + this.clearcoatNormalMap = source.clearcoatNormalMap; + this.clearcoatNormalScale.copy( source.clearcoatNormalScale ); + + this.dispersion = source.dispersion; + this.ior = source.ior; + + this.iridescence = source.iridescence; + this.iridescenceMap = source.iridescenceMap; + this.iridescenceIOR = source.iridescenceIOR; + this.iridescenceThicknessRange = [ ...source.iridescenceThicknessRange ]; + this.iridescenceThicknessMap = source.iridescenceThicknessMap; + + this.sheen = source.sheen; + this.sheenColor.copy( source.sheenColor ); + this.sheenColorMap = source.sheenColorMap; + this.sheenRoughness = source.sheenRoughness; + this.sheenRoughnessMap = source.sheenRoughnessMap; + + this.transmission = source.transmission; + this.transmissionMap = source.transmissionMap; + + this.thickness = source.thickness; + this.thicknessMap = source.thicknessMap; + this.attenuationDistance = source.attenuationDistance; + this.attenuationColor.copy( source.attenuationColor ); + + this.specularIntensity = source.specularIntensity; + this.specularIntensityMap = source.specularIntensityMap; + this.specularColor.copy( source.specularColor ); + this.specularColorMap = source.specularColorMap; + + return this; + + } + +} + +class MeshPhongMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshPhongMaterial = true; + + this.type = 'MeshPhongMaterial'; + + this.color = new Color( 0xffffff ); // diffuse + this.specular = new Color( 0x111111 ); + this.shininess = 30; + + this.map = null; + + this.lightMap = null; + this.lightMapIntensity = 1.0; + + this.aoMap = null; + this.aoMapIntensity = 1.0; + + this.emissive = new Color( 0x000000 ); + this.emissiveIntensity = 1.0; + this.emissiveMap = null; + + this.bumpMap = null; + this.bumpScale = 1; + + this.normalMap = null; + this.normalMapType = TangentSpaceNormalMap; + this.normalScale = new Vector2( 1, 1 ); + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.specularMap = null; + + this.alphaMap = null; + + this.envMap = null; + this.envMapRotation = new Euler(); + this.combine = MultiplyOperation; + this.reflectivity = 1; + this.refractionRatio = 0.98; + + this.wireframe = false; + this.wireframeLinewidth = 1; + this.wireframeLinecap = 'round'; + this.wireframeLinejoin = 'round'; + + this.flatShading = false; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + this.specular.copy( source.specular ); + this.shininess = source.shininess; + + this.map = source.map; + + this.lightMap = source.lightMap; + this.lightMapIntensity = source.lightMapIntensity; + + this.aoMap = source.aoMap; + this.aoMapIntensity = source.aoMapIntensity; + + this.emissive.copy( source.emissive ); + this.emissiveMap = source.emissiveMap; + this.emissiveIntensity = source.emissiveIntensity; + + this.bumpMap = source.bumpMap; + this.bumpScale = source.bumpScale; + + this.normalMap = source.normalMap; + this.normalMapType = source.normalMapType; + this.normalScale.copy( source.normalScale ); + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.specularMap = source.specularMap; + + this.alphaMap = source.alphaMap; + + this.envMap = source.envMap; + this.envMapRotation.copy( source.envMapRotation ); + this.combine = source.combine; + this.reflectivity = source.reflectivity; + this.refractionRatio = source.refractionRatio; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + this.wireframeLinecap = source.wireframeLinecap; + this.wireframeLinejoin = source.wireframeLinejoin; + + this.flatShading = source.flatShading; + + this.fog = source.fog; + + return this; + + } + +} + +class MeshToonMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshToonMaterial = true; + + this.defines = { 'TOON': '' }; + + this.type = 'MeshToonMaterial'; + + this.color = new Color( 0xffffff ); + + this.map = null; + this.gradientMap = null; + + this.lightMap = null; + this.lightMapIntensity = 1.0; + + this.aoMap = null; + this.aoMapIntensity = 1.0; + + this.emissive = new Color( 0x000000 ); + this.emissiveIntensity = 1.0; + this.emissiveMap = null; + + this.bumpMap = null; + this.bumpScale = 1; + + this.normalMap = null; + this.normalMapType = TangentSpaceNormalMap; + this.normalScale = new Vector2( 1, 1 ); + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.alphaMap = null; + + this.wireframe = false; + this.wireframeLinewidth = 1; + this.wireframeLinecap = 'round'; + this.wireframeLinejoin = 'round'; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.map = source.map; + this.gradientMap = source.gradientMap; + + this.lightMap = source.lightMap; + this.lightMapIntensity = source.lightMapIntensity; + + this.aoMap = source.aoMap; + this.aoMapIntensity = source.aoMapIntensity; + + this.emissive.copy( source.emissive ); + this.emissiveMap = source.emissiveMap; + this.emissiveIntensity = source.emissiveIntensity; + + this.bumpMap = source.bumpMap; + this.bumpScale = source.bumpScale; + + this.normalMap = source.normalMap; + this.normalMapType = source.normalMapType; + this.normalScale.copy( source.normalScale ); + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.alphaMap = source.alphaMap; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + this.wireframeLinecap = source.wireframeLinecap; + this.wireframeLinejoin = source.wireframeLinejoin; + + this.fog = source.fog; + + return this; + + } + +} + +class MeshNormalMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshNormalMaterial = true; + + this.type = 'MeshNormalMaterial'; + + this.bumpMap = null; + this.bumpScale = 1; + + this.normalMap = null; + this.normalMapType = TangentSpaceNormalMap; + this.normalScale = new Vector2( 1, 1 ); + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.wireframe = false; + this.wireframeLinewidth = 1; + + this.flatShading = false; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.bumpMap = source.bumpMap; + this.bumpScale = source.bumpScale; + + this.normalMap = source.normalMap; + this.normalMapType = source.normalMapType; + this.normalScale.copy( source.normalScale ); + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + + this.flatShading = source.flatShading; + + return this; + + } + +} + +class MeshLambertMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshLambertMaterial = true; + + this.type = 'MeshLambertMaterial'; + + this.color = new Color( 0xffffff ); // diffuse + + this.map = null; + + this.lightMap = null; + this.lightMapIntensity = 1.0; + + this.aoMap = null; + this.aoMapIntensity = 1.0; + + this.emissive = new Color( 0x000000 ); + this.emissiveIntensity = 1.0; + this.emissiveMap = null; + + this.bumpMap = null; + this.bumpScale = 1; + + this.normalMap = null; + this.normalMapType = TangentSpaceNormalMap; + this.normalScale = new Vector2( 1, 1 ); + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.specularMap = null; + + this.alphaMap = null; + + this.envMap = null; + this.envMapRotation = new Euler(); + this.combine = MultiplyOperation; + this.reflectivity = 1; + this.refractionRatio = 0.98; + + this.wireframe = false; + this.wireframeLinewidth = 1; + this.wireframeLinecap = 'round'; + this.wireframeLinejoin = 'round'; + + this.flatShading = false; + + this.fog = true; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.color.copy( source.color ); + + this.map = source.map; + + this.lightMap = source.lightMap; + this.lightMapIntensity = source.lightMapIntensity; + + this.aoMap = source.aoMap; + this.aoMapIntensity = source.aoMapIntensity; + + this.emissive.copy( source.emissive ); + this.emissiveMap = source.emissiveMap; + this.emissiveIntensity = source.emissiveIntensity; + + this.bumpMap = source.bumpMap; + this.bumpScale = source.bumpScale; + + this.normalMap = source.normalMap; + this.normalMapType = source.normalMapType; + this.normalScale.copy( source.normalScale ); + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.specularMap = source.specularMap; + + this.alphaMap = source.alphaMap; + + this.envMap = source.envMap; + this.envMapRotation.copy( source.envMapRotation ); + this.combine = source.combine; + this.reflectivity = source.reflectivity; + this.refractionRatio = source.refractionRatio; + + this.wireframe = source.wireframe; + this.wireframeLinewidth = source.wireframeLinewidth; + this.wireframeLinecap = source.wireframeLinecap; + this.wireframeLinejoin = source.wireframeLinejoin; + + this.flatShading = source.flatShading; + + this.fog = source.fog; + + return this; + + } + +} + +class MeshMatcapMaterial extends Material { + + constructor( parameters ) { + + super(); + + this.isMeshMatcapMaterial = true; + + this.defines = { 'MATCAP': '' }; + + this.type = 'MeshMatcapMaterial'; + + this.color = new Color( 0xffffff ); // diffuse + + this.matcap = null; + + this.map = null; + + this.bumpMap = null; + this.bumpScale = 1; + + this.normalMap = null; + this.normalMapType = TangentSpaceNormalMap; + this.normalScale = new Vector2( 1, 1 ); + + this.displacementMap = null; + this.displacementScale = 1; + this.displacementBias = 0; + + this.alphaMap = null; + + this.flatShading = false; + + this.fog = true; + + this.setValues( parameters ); + + } + + + copy( source ) { + + super.copy( source ); + + this.defines = { 'MATCAP': '' }; + + this.color.copy( source.color ); + + this.matcap = source.matcap; + + this.map = source.map; + + this.bumpMap = source.bumpMap; + this.bumpScale = source.bumpScale; + + this.normalMap = source.normalMap; + this.normalMapType = source.normalMapType; + this.normalScale.copy( source.normalScale ); + + this.displacementMap = source.displacementMap; + this.displacementScale = source.displacementScale; + this.displacementBias = source.displacementBias; + + this.alphaMap = source.alphaMap; + + this.flatShading = source.flatShading; + + this.fog = source.fog; + + return this; + + } + +} + +class LineDashedMaterial extends LineBasicMaterial { + + constructor( parameters ) { + + super(); + + this.isLineDashedMaterial = true; + + this.type = 'LineDashedMaterial'; + + this.scale = 1; + this.dashSize = 3; + this.gapSize = 1; + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.scale = source.scale; + this.dashSize = source.dashSize; + this.gapSize = source.gapSize; + + return this; + + } + +} + +// converts an array to a specific type +function convertArray( array, type, forceClone ) { + + if ( ! array || // let 'undefined' and 'null' pass + ! forceClone && array.constructor === type ) return array; + + if ( typeof type.BYTES_PER_ELEMENT === 'number' ) { + + return new type( array ); // create typed array + + } + + return Array.prototype.slice.call( array ); // create Array + +} + +function isTypedArray( object ) { + + return ArrayBuffer.isView( object ) && + ! ( object instanceof DataView ); + +} + +// returns an array by which times and values can be sorted +function getKeyframeOrder( times ) { + + function compareTime( i, j ) { + + return times[ i ] - times[ j ]; + + } + + const n = times.length; + const result = new Array( n ); + for ( let i = 0; i !== n; ++ i ) result[ i ] = i; + + result.sort( compareTime ); + + return result; + +} + +// uses the array previously returned by 'getKeyframeOrder' to sort data +function sortedArray( values, stride, order ) { + + const nValues = values.length; + const result = new values.constructor( nValues ); + + for ( let i = 0, dstOffset = 0; dstOffset !== nValues; ++ i ) { + + const srcOffset = order[ i ] * stride; + + for ( let j = 0; j !== stride; ++ j ) { + + result[ dstOffset ++ ] = values[ srcOffset + j ]; + + } + + } + + return result; + +} + +// function for parsing AOS keyframe formats +function flattenJSON( jsonKeys, times, values, valuePropertyName ) { + + let i = 1, key = jsonKeys[ 0 ]; + + while ( key !== undefined && key[ valuePropertyName ] === undefined ) { + + key = jsonKeys[ i ++ ]; + + } + + if ( key === undefined ) return; // no data + + let value = key[ valuePropertyName ]; + if ( value === undefined ) return; // no data + + if ( Array.isArray( value ) ) { + + do { + + value = key[ valuePropertyName ]; + + if ( value !== undefined ) { + + times.push( key.time ); + values.push.apply( values, value ); // push all elements + + } + + key = jsonKeys[ i ++ ]; + + } while ( key !== undefined ); + + } else if ( value.toArray !== undefined ) { + + // ...assume THREE.Math-ish + + do { + + value = key[ valuePropertyName ]; + + if ( value !== undefined ) { + + times.push( key.time ); + value.toArray( values, values.length ); + + } + + key = jsonKeys[ i ++ ]; + + } while ( key !== undefined ); + + } else { + + // otherwise push as-is + + do { + + value = key[ valuePropertyName ]; + + if ( value !== undefined ) { + + times.push( key.time ); + values.push( value ); + + } + + key = jsonKeys[ i ++ ]; + + } while ( key !== undefined ); + + } + +} + +function subclip( sourceClip, name, startFrame, endFrame, fps = 30 ) { + + const clip = sourceClip.clone(); + + clip.name = name; + + const tracks = []; + + for ( let i = 0; i < clip.tracks.length; ++ i ) { + + const track = clip.tracks[ i ]; + const valueSize = track.getValueSize(); + + const times = []; + const values = []; + + for ( let j = 0; j < track.times.length; ++ j ) { + + const frame = track.times[ j ] * fps; + + if ( frame < startFrame || frame >= endFrame ) continue; + + times.push( track.times[ j ] ); + + for ( let k = 0; k < valueSize; ++ k ) { + + values.push( track.values[ j * valueSize + k ] ); + + } + + } + + if ( times.length === 0 ) continue; + + track.times = convertArray( times, track.times.constructor ); + track.values = convertArray( values, track.values.constructor ); + + tracks.push( track ); + + } + + clip.tracks = tracks; + + // find minimum .times value across all tracks in the trimmed clip + + let minStartTime = Infinity; + + for ( let i = 0; i < clip.tracks.length; ++ i ) { + + if ( minStartTime > clip.tracks[ i ].times[ 0 ] ) { + + minStartTime = clip.tracks[ i ].times[ 0 ]; + + } + + } + + // shift all tracks such that clip begins at t=0 + + for ( let i = 0; i < clip.tracks.length; ++ i ) { + + clip.tracks[ i ].shift( - 1 * minStartTime ); + + } + + clip.resetDuration(); + + return clip; + +} + +function makeClipAdditive( targetClip, referenceFrame = 0, referenceClip = targetClip, fps = 30 ) { + + if ( fps <= 0 ) fps = 30; + + const numTracks = referenceClip.tracks.length; + const referenceTime = referenceFrame / fps; + + // Make each track's values relative to the values at the reference frame + for ( let i = 0; i < numTracks; ++ i ) { + + const referenceTrack = referenceClip.tracks[ i ]; + const referenceTrackType = referenceTrack.ValueTypeName; + + // Skip this track if it's non-numeric + if ( referenceTrackType === 'bool' || referenceTrackType === 'string' ) continue; + + // Find the track in the target clip whose name and type matches the reference track + const targetTrack = targetClip.tracks.find( function ( track ) { + + return track.name === referenceTrack.name + && track.ValueTypeName === referenceTrackType; + + } ); + + if ( targetTrack === undefined ) continue; + + let referenceOffset = 0; + const referenceValueSize = referenceTrack.getValueSize(); + + if ( referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) { + + referenceOffset = referenceValueSize / 3; + + } + + let targetOffset = 0; + const targetValueSize = targetTrack.getValueSize(); + + if ( targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) { + + targetOffset = targetValueSize / 3; + + } + + const lastIndex = referenceTrack.times.length - 1; + let referenceValue; + + // Find the value to subtract out of the track + if ( referenceTime <= referenceTrack.times[ 0 ] ) { + + // Reference frame is earlier than the first keyframe, so just use the first keyframe + const startIndex = referenceOffset; + const endIndex = referenceValueSize - referenceOffset; + referenceValue = referenceTrack.values.slice( startIndex, endIndex ); + + } else if ( referenceTime >= referenceTrack.times[ lastIndex ] ) { + + // Reference frame is after the last keyframe, so just use the last keyframe + const startIndex = lastIndex * referenceValueSize + referenceOffset; + const endIndex = startIndex + referenceValueSize - referenceOffset; + referenceValue = referenceTrack.values.slice( startIndex, endIndex ); + + } else { + + // Interpolate to the reference value + const interpolant = referenceTrack.createInterpolant(); + const startIndex = referenceOffset; + const endIndex = referenceValueSize - referenceOffset; + interpolant.evaluate( referenceTime ); + referenceValue = interpolant.resultBuffer.slice( startIndex, endIndex ); + + } + + // Conjugate the quaternion + if ( referenceTrackType === 'quaternion' ) { + + const referenceQuat = new Quaternion().fromArray( referenceValue ).normalize().conjugate(); + referenceQuat.toArray( referenceValue ); + + } + + // Subtract the reference value from all of the track values + + const numTimes = targetTrack.times.length; + for ( let j = 0; j < numTimes; ++ j ) { + + const valueStart = j * targetValueSize + targetOffset; + + if ( referenceTrackType === 'quaternion' ) { + + // Multiply the conjugate for quaternion track types + Quaternion.multiplyQuaternionsFlat( + targetTrack.values, + valueStart, + referenceValue, + 0, + targetTrack.values, + valueStart + ); + + } else { + + const valueEnd = targetValueSize - targetOffset * 2; + + // Subtract each value for all other numeric track types + for ( let k = 0; k < valueEnd; ++ k ) { + + targetTrack.values[ valueStart + k ] -= referenceValue[ k ]; + + } + + } + + } + + } + + targetClip.blendMode = AdditiveAnimationBlendMode; + + return targetClip; + +} + +const AnimationUtils = { + convertArray: convertArray, + isTypedArray: isTypedArray, + getKeyframeOrder: getKeyframeOrder, + sortedArray: sortedArray, + flattenJSON: flattenJSON, + subclip: subclip, + makeClipAdditive: makeClipAdditive +}; + +/** + * Abstract base class of interpolants over parametric samples. + * + * The parameter domain is one dimensional, typically the time or a path + * along a curve defined by the data. + * + * The sample values can have any dimensionality and derived classes may + * apply special interpretations to the data. + * + * This class provides the interval seek in a Template Method, deferring + * the actual interpolation to derived classes. + * + * Time complexity is O(1) for linear access crossing at most two points + * and O(log N) for random access, where N is the number of positions. + * + * References: + * + * http://www.oodesign.com/template-method-pattern.html + * + */ + +class Interpolant { + + constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { + + this.parameterPositions = parameterPositions; + this._cachedIndex = 0; + + this.resultBuffer = resultBuffer !== undefined ? + resultBuffer : new sampleValues.constructor( sampleSize ); + this.sampleValues = sampleValues; + this.valueSize = sampleSize; + + this.settings = null; + this.DefaultSettings_ = {}; + + } + + evaluate( t ) { + + const pp = this.parameterPositions; + let i1 = this._cachedIndex, + t1 = pp[ i1 ], + t0 = pp[ i1 - 1 ]; + + validate_interval: { + + seek: { + + let right; + + linear_scan: { + + //- See http://jsperf.com/comparison-to-undefined/3 + //- slower code: + //- + //- if ( t >= t1 || t1 === undefined ) { + forward_scan: if ( ! ( t < t1 ) ) { + + for ( let giveUpAt = i1 + 2; ; ) { + + if ( t1 === undefined ) { + + if ( t < t0 ) break forward_scan; + + // after end + + i1 = pp.length; + this._cachedIndex = i1; + return this.copySampleValue_( i1 - 1 ); + + } + + if ( i1 === giveUpAt ) break; // this loop + + t0 = t1; + t1 = pp[ ++ i1 ]; + + if ( t < t1 ) { + + // we have arrived at the sought interval + break seek; + + } + + } + + // prepare binary search on the right side of the index + right = pp.length; + break linear_scan; + + } + + //- slower code: + //- if ( t < t0 || t0 === undefined ) { + if ( ! ( t >= t0 ) ) { + + // looping? + + const t1global = pp[ 1 ]; + + if ( t < t1global ) { + + i1 = 2; // + 1, using the scan for the details + t0 = t1global; + + } + + // linear reverse scan + + for ( let giveUpAt = i1 - 2; ; ) { + + if ( t0 === undefined ) { + + // before start + + this._cachedIndex = 0; + return this.copySampleValue_( 0 ); + + } + + if ( i1 === giveUpAt ) break; // this loop + + t1 = t0; + t0 = pp[ -- i1 - 1 ]; + + if ( t >= t0 ) { + + // we have arrived at the sought interval + break seek; + + } + + } + + // prepare binary search on the left side of the index + right = i1; + i1 = 0; + break linear_scan; + + } + + // the interval is valid + + break validate_interval; + + } // linear scan + + // binary search + + while ( i1 < right ) { + + const mid = ( i1 + right ) >>> 1; + + if ( t < pp[ mid ] ) { + + right = mid; + + } else { + + i1 = mid + 1; + + } + + } + + t1 = pp[ i1 ]; + t0 = pp[ i1 - 1 ]; + + // check boundary cases, again + + if ( t0 === undefined ) { + + this._cachedIndex = 0; + return this.copySampleValue_( 0 ); + + } + + if ( t1 === undefined ) { + + i1 = pp.length; + this._cachedIndex = i1; + return this.copySampleValue_( i1 - 1 ); + + } + + } // seek + + this._cachedIndex = i1; + + this.intervalChanged_( i1, t0, t1 ); + + } // validate_interval + + return this.interpolate_( i1, t0, t, t1 ); + + } + + getSettings_() { + + return this.settings || this.DefaultSettings_; + + } + + copySampleValue_( index ) { + + // copies a sample value to the result buffer + + const result = this.resultBuffer, + values = this.sampleValues, + stride = this.valueSize, + offset = index * stride; + + for ( let i = 0; i !== stride; ++ i ) { + + result[ i ] = values[ offset + i ]; + + } + + return result; + + } + + // Template methods for derived classes: + + interpolate_( /* i1, t0, t, t1 */ ) { + + throw new Error( 'call to abstract method' ); + // implementations shall return this.resultBuffer + + } + + intervalChanged_( /* i1, t0, t1 */ ) { + + // empty + + } + +} + +/** + * Fast and simple cubic spline interpolant. + * + * It was derived from a Hermitian construction setting the first derivative + * at each sample position to the linear slope between neighboring positions + * over their parameter interval. + */ + +class CubicInterpolant extends Interpolant { + + constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { + + super( parameterPositions, sampleValues, sampleSize, resultBuffer ); + + this._weightPrev = - 0; + this._offsetPrev = - 0; + this._weightNext = - 0; + this._offsetNext = - 0; + + this.DefaultSettings_ = { + + endingStart: ZeroCurvatureEnding, + endingEnd: ZeroCurvatureEnding + + }; + + } + + intervalChanged_( i1, t0, t1 ) { + + const pp = this.parameterPositions; + let iPrev = i1 - 2, + iNext = i1 + 1, + + tPrev = pp[ iPrev ], + tNext = pp[ iNext ]; + + if ( tPrev === undefined ) { + + switch ( this.getSettings_().endingStart ) { + + case ZeroSlopeEnding: + + // f'(t0) = 0 + iPrev = i1; + tPrev = 2 * t0 - t1; + + break; + + case WrapAroundEnding: + + // use the other end of the curve + iPrev = pp.length - 2; + tPrev = t0 + pp[ iPrev ] - pp[ iPrev + 1 ]; + + break; + + default: // ZeroCurvatureEnding + + // f''(t0) = 0 a.k.a. Natural Spline + iPrev = i1; + tPrev = t1; + + } + + } + + if ( tNext === undefined ) { + + switch ( this.getSettings_().endingEnd ) { + + case ZeroSlopeEnding: + + // f'(tN) = 0 + iNext = i1; + tNext = 2 * t1 - t0; + + break; + + case WrapAroundEnding: + + // use the other end of the curve + iNext = 1; + tNext = t1 + pp[ 1 ] - pp[ 0 ]; + + break; + + default: // ZeroCurvatureEnding + + // f''(tN) = 0, a.k.a. Natural Spline + iNext = i1 - 1; + tNext = t0; + + } + + } + + const halfDt = ( t1 - t0 ) * 0.5, + stride = this.valueSize; + + this._weightPrev = halfDt / ( t0 - tPrev ); + this._weightNext = halfDt / ( tNext - t1 ); + this._offsetPrev = iPrev * stride; + this._offsetNext = iNext * stride; + + } + + interpolate_( i1, t0, t, t1 ) { + + const result = this.resultBuffer, + values = this.sampleValues, + stride = this.valueSize, + + o1 = i1 * stride, o0 = o1 - stride, + oP = this._offsetPrev, oN = this._offsetNext, + wP = this._weightPrev, wN = this._weightNext, + + p = ( t - t0 ) / ( t1 - t0 ), + pp = p * p, + ppp = pp * p; + + // evaluate polynomials + + const sP = - wP * ppp + 2 * wP * pp - wP * p; + const s0 = ( 1 + wP ) * ppp + ( - 1.5 - 2 * wP ) * pp + ( - 0.5 + wP ) * p + 1; + const s1 = ( - 1 - wN ) * ppp + ( 1.5 + wN ) * pp + 0.5 * p; + const sN = wN * ppp - wN * pp; + + // combine data linearly + + for ( let i = 0; i !== stride; ++ i ) { + + result[ i ] = + sP * values[ oP + i ] + + s0 * values[ o0 + i ] + + s1 * values[ o1 + i ] + + sN * values[ oN + i ]; + + } + + return result; + + } + +} + +class LinearInterpolant extends Interpolant { + + constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { + + super( parameterPositions, sampleValues, sampleSize, resultBuffer ); + + } + + interpolate_( i1, t0, t, t1 ) { + + const result = this.resultBuffer, + values = this.sampleValues, + stride = this.valueSize, + + offset1 = i1 * stride, + offset0 = offset1 - stride, + + weight1 = ( t - t0 ) / ( t1 - t0 ), + weight0 = 1 - weight1; + + for ( let i = 0; i !== stride; ++ i ) { + + result[ i ] = + values[ offset0 + i ] * weight0 + + values[ offset1 + i ] * weight1; + + } + + return result; + + } + +} + +/** + * + * Interpolant that evaluates to the sample value at the position preceding + * the parameter. + */ + +class DiscreteInterpolant extends Interpolant { + + constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { + + super( parameterPositions, sampleValues, sampleSize, resultBuffer ); + + } + + interpolate_( i1 /*, t0, t, t1 */ ) { + + return this.copySampleValue_( i1 - 1 ); + + } + +} + +class KeyframeTrack { + + constructor( name, times, values, interpolation ) { + + if ( name === undefined ) throw new Error( 'THREE.KeyframeTrack: track name is undefined' ); + if ( times === undefined || times.length === 0 ) throw new Error( 'THREE.KeyframeTrack: no keyframes in track named ' + name ); + + this.name = name; + + this.times = convertArray( times, this.TimeBufferType ); + this.values = convertArray( values, this.ValueBufferType ); + + this.setInterpolation( interpolation || this.DefaultInterpolation ); + + } + + // Serialization (in static context, because of constructor invocation + // and automatic invocation of .toJSON): + + static toJSON( track ) { + + const trackType = track.constructor; + + let json; + + // derived classes can define a static toJSON method + if ( trackType.toJSON !== this.toJSON ) { + + json = trackType.toJSON( track ); + + } else { + + // by default, we assume the data can be serialized as-is + json = { + + 'name': track.name, + 'times': convertArray( track.times, Array ), + 'values': convertArray( track.values, Array ) + + }; + + const interpolation = track.getInterpolation(); + + if ( interpolation !== track.DefaultInterpolation ) { + + json.interpolation = interpolation; + + } + + } + + json.type = track.ValueTypeName; // mandatory + + return json; + + } + + InterpolantFactoryMethodDiscrete( result ) { + + return new DiscreteInterpolant( this.times, this.values, this.getValueSize(), result ); + + } + + InterpolantFactoryMethodLinear( result ) { + + return new LinearInterpolant( this.times, this.values, this.getValueSize(), result ); + + } + + InterpolantFactoryMethodSmooth( result ) { + + return new CubicInterpolant( this.times, this.values, this.getValueSize(), result ); + + } + + setInterpolation( interpolation ) { + + let factoryMethod; + + switch ( interpolation ) { + + case InterpolateDiscrete: + + factoryMethod = this.InterpolantFactoryMethodDiscrete; + + break; + + case InterpolateLinear: + + factoryMethod = this.InterpolantFactoryMethodLinear; + + break; + + case InterpolateSmooth: + + factoryMethod = this.InterpolantFactoryMethodSmooth; + + break; + + } + + if ( factoryMethod === undefined ) { + + const message = 'unsupported interpolation for ' + + this.ValueTypeName + ' keyframe track named ' + this.name; + + if ( this.createInterpolant === undefined ) { + + // fall back to default, unless the default itself is messed up + if ( interpolation !== this.DefaultInterpolation ) { + + this.setInterpolation( this.DefaultInterpolation ); + + } else { + + throw new Error( message ); // fatal, in this case + + } + + } + + console.warn( 'THREE.KeyframeTrack:', message ); + return this; + + } + + this.createInterpolant = factoryMethod; + + return this; + + } + + getInterpolation() { + + switch ( this.createInterpolant ) { + + case this.InterpolantFactoryMethodDiscrete: + + return InterpolateDiscrete; + + case this.InterpolantFactoryMethodLinear: + + return InterpolateLinear; + + case this.InterpolantFactoryMethodSmooth: + + return InterpolateSmooth; + + } + + } + + getValueSize() { + + return this.values.length / this.times.length; + + } + + // move all keyframes either forwards or backwards in time + shift( timeOffset ) { + + if ( timeOffset !== 0.0 ) { + + const times = this.times; + + for ( let i = 0, n = times.length; i !== n; ++ i ) { + + times[ i ] += timeOffset; + + } + + } + + return this; + + } + + // scale all keyframe times by a factor (useful for frame <-> seconds conversions) + scale( timeScale ) { + + if ( timeScale !== 1.0 ) { + + const times = this.times; + + for ( let i = 0, n = times.length; i !== n; ++ i ) { + + times[ i ] *= timeScale; + + } + + } + + return this; + + } + + // removes keyframes before and after animation without changing any values within the range [startTime, endTime]. + // IMPORTANT: We do not shift around keys to the start of the track time, because for interpolated keys this will change their values + trim( startTime, endTime ) { + + const times = this.times, + nKeys = times.length; + + let from = 0, + to = nKeys - 1; + + while ( from !== nKeys && times[ from ] < startTime ) { + + ++ from; + + } + + while ( to !== - 1 && times[ to ] > endTime ) { + + -- to; + + } + + ++ to; // inclusive -> exclusive bound + + if ( from !== 0 || to !== nKeys ) { + + // empty tracks are forbidden, so keep at least one keyframe + if ( from >= to ) { + + to = Math.max( to, 1 ); + from = to - 1; + + } + + const stride = this.getValueSize(); + this.times = times.slice( from, to ); + this.values = this.values.slice( from * stride, to * stride ); + + } + + return this; + + } + + // ensure we do not get a GarbageInGarbageOut situation, make sure tracks are at least minimally viable + validate() { + + let valid = true; + + const valueSize = this.getValueSize(); + if ( valueSize - Math.floor( valueSize ) !== 0 ) { + + console.error( 'THREE.KeyframeTrack: Invalid value size in track.', this ); + valid = false; + + } + + const times = this.times, + values = this.values, + + nKeys = times.length; + + if ( nKeys === 0 ) { + + console.error( 'THREE.KeyframeTrack: Track is empty.', this ); + valid = false; + + } + + let prevTime = null; + + for ( let i = 0; i !== nKeys; i ++ ) { + + const currTime = times[ i ]; + + if ( typeof currTime === 'number' && isNaN( currTime ) ) { + + console.error( 'THREE.KeyframeTrack: Time is not a valid number.', this, i, currTime ); + valid = false; + break; + + } + + if ( prevTime !== null && prevTime > currTime ) { + + console.error( 'THREE.KeyframeTrack: Out of order keys.', this, i, currTime, prevTime ); + valid = false; + break; + + } + + prevTime = currTime; + + } + + if ( values !== undefined ) { + + if ( isTypedArray( values ) ) { + + for ( let i = 0, n = values.length; i !== n; ++ i ) { + + const value = values[ i ]; + + if ( isNaN( value ) ) { + + console.error( 'THREE.KeyframeTrack: Value is not a valid number.', this, i, value ); + valid = false; + break; + + } + + } + + } + + } + + return valid; + + } + + // removes equivalent sequential keys as common in morph target sequences + // (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0) + optimize() { + + // times or values may be shared with other tracks, so overwriting is unsafe + const times = this.times.slice(), + values = this.values.slice(), + stride = this.getValueSize(), + + smoothInterpolation = this.getInterpolation() === InterpolateSmooth, + + lastIndex = times.length - 1; + + let writeIndex = 1; + + for ( let i = 1; i < lastIndex; ++ i ) { + + let keep = false; + + const time = times[ i ]; + const timeNext = times[ i + 1 ]; + + // remove adjacent keyframes scheduled at the same time + + if ( time !== timeNext && ( i !== 1 || time !== times[ 0 ] ) ) { + + if ( ! smoothInterpolation ) { + + // remove unnecessary keyframes same as their neighbors + + const offset = i * stride, + offsetP = offset - stride, + offsetN = offset + stride; + + for ( let j = 0; j !== stride; ++ j ) { + + const value = values[ offset + j ]; + + if ( value !== values[ offsetP + j ] || + value !== values[ offsetN + j ] ) { + + keep = true; + break; + + } + + } + + } else { + + keep = true; + + } + + } + + // in-place compaction + + if ( keep ) { + + if ( i !== writeIndex ) { + + times[ writeIndex ] = times[ i ]; + + const readOffset = i * stride, + writeOffset = writeIndex * stride; + + for ( let j = 0; j !== stride; ++ j ) { + + values[ writeOffset + j ] = values[ readOffset + j ]; + + } + + } + + ++ writeIndex; + + } + + } + + // flush last keyframe (compaction looks ahead) + + if ( lastIndex > 0 ) { + + times[ writeIndex ] = times[ lastIndex ]; + + for ( let readOffset = lastIndex * stride, writeOffset = writeIndex * stride, j = 0; j !== stride; ++ j ) { + + values[ writeOffset + j ] = values[ readOffset + j ]; + + } + + ++ writeIndex; + + } + + if ( writeIndex !== times.length ) { + + this.times = times.slice( 0, writeIndex ); + this.values = values.slice( 0, writeIndex * stride ); + + } else { + + this.times = times; + this.values = values; + + } + + return this; + + } + + clone() { + + const times = this.times.slice(); + const values = this.values.slice(); + + const TypedKeyframeTrack = this.constructor; + const track = new TypedKeyframeTrack( this.name, times, values ); + + // Interpolant argument to constructor is not saved, so copy the factory method directly. + track.createInterpolant = this.createInterpolant; + + return track; + + } + +} + +KeyframeTrack.prototype.TimeBufferType = Float32Array; +KeyframeTrack.prototype.ValueBufferType = Float32Array; +KeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear; + +/** + * A Track of Boolean keyframe values. + */ +class BooleanKeyframeTrack extends KeyframeTrack {} + +BooleanKeyframeTrack.prototype.ValueTypeName = 'bool'; +BooleanKeyframeTrack.prototype.ValueBufferType = Array; +BooleanKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete; +BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined; +BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined; + +/** + * A Track of keyframe values that represent color. + */ +class ColorKeyframeTrack extends KeyframeTrack {} + +ColorKeyframeTrack.prototype.ValueTypeName = 'color'; + +/** + * A Track of numeric keyframe values. + */ +class NumberKeyframeTrack extends KeyframeTrack {} + +NumberKeyframeTrack.prototype.ValueTypeName = 'number'; + +/** + * Spherical linear unit quaternion interpolant. + */ + +class QuaternionLinearInterpolant extends Interpolant { + + constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { + + super( parameterPositions, sampleValues, sampleSize, resultBuffer ); + + } + + interpolate_( i1, t0, t, t1 ) { + + const result = this.resultBuffer, + values = this.sampleValues, + stride = this.valueSize, + + alpha = ( t - t0 ) / ( t1 - t0 ); + + let offset = i1 * stride; + + for ( let end = offset + stride; offset !== end; offset += 4 ) { + + Quaternion.slerpFlat( result, 0, values, offset - stride, values, offset, alpha ); + + } + + return result; + + } + +} + +/** + * A Track of quaternion keyframe values. + */ +class QuaternionKeyframeTrack extends KeyframeTrack { + + InterpolantFactoryMethodLinear( result ) { + + return new QuaternionLinearInterpolant( this.times, this.values, this.getValueSize(), result ); + + } + +} + +QuaternionKeyframeTrack.prototype.ValueTypeName = 'quaternion'; +// ValueBufferType is inherited +QuaternionKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear; +QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined; + +/** + * A Track that interpolates Strings + */ +class StringKeyframeTrack extends KeyframeTrack {} + +StringKeyframeTrack.prototype.ValueTypeName = 'string'; +StringKeyframeTrack.prototype.ValueBufferType = Array; +StringKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete; +StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined; +StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined; + +/** + * A Track of vectored keyframe values. + */ +class VectorKeyframeTrack extends KeyframeTrack {} + +VectorKeyframeTrack.prototype.ValueTypeName = 'vector'; + +class AnimationClip { + + constructor( name = '', duration = - 1, tracks = [], blendMode = NormalAnimationBlendMode ) { + + this.name = name; + this.tracks = tracks; + this.duration = duration; + this.blendMode = blendMode; + + this.uuid = generateUUID(); + + // this means it should figure out its duration by scanning the tracks + if ( this.duration < 0 ) { + + this.resetDuration(); + + } + + } + + + static parse( json ) { + + const tracks = [], + jsonTracks = json.tracks, + frameTime = 1.0 / ( json.fps || 1.0 ); + + for ( let i = 0, n = jsonTracks.length; i !== n; ++ i ) { + + tracks.push( parseKeyframeTrack( jsonTracks[ i ] ).scale( frameTime ) ); + + } + + const clip = new this( json.name, json.duration, tracks, json.blendMode ); + clip.uuid = json.uuid; + + return clip; + + } + + static toJSON( clip ) { + + const tracks = [], + clipTracks = clip.tracks; + + const json = { + + 'name': clip.name, + 'duration': clip.duration, + 'tracks': tracks, + 'uuid': clip.uuid, + 'blendMode': clip.blendMode + + }; + + for ( let i = 0, n = clipTracks.length; i !== n; ++ i ) { + + tracks.push( KeyframeTrack.toJSON( clipTracks[ i ] ) ); + + } + + return json; + + } + + static CreateFromMorphTargetSequence( name, morphTargetSequence, fps, noLoop ) { + + const numMorphTargets = morphTargetSequence.length; + const tracks = []; + + for ( let i = 0; i < numMorphTargets; i ++ ) { + + let times = []; + let values = []; + + times.push( + ( i + numMorphTargets - 1 ) % numMorphTargets, + i, + ( i + 1 ) % numMorphTargets ); + + values.push( 0, 1, 0 ); + + const order = getKeyframeOrder( times ); + times = sortedArray( times, 1, order ); + values = sortedArray( values, 1, order ); + + // if there is a key at the first frame, duplicate it as the + // last frame as well for perfect loop. + if ( ! noLoop && times[ 0 ] === 0 ) { + + times.push( numMorphTargets ); + values.push( values[ 0 ] ); + + } + + tracks.push( + new NumberKeyframeTrack( + '.morphTargetInfluences[' + morphTargetSequence[ i ].name + ']', + times, values + ).scale( 1.0 / fps ) ); + + } + + return new this( name, - 1, tracks ); + + } + + static findByName( objectOrClipArray, name ) { + + let clipArray = objectOrClipArray; + + if ( ! Array.isArray( objectOrClipArray ) ) { + + const o = objectOrClipArray; + clipArray = o.geometry && o.geometry.animations || o.animations; + + } + + for ( let i = 0; i < clipArray.length; i ++ ) { + + if ( clipArray[ i ].name === name ) { + + return clipArray[ i ]; + + } + + } + + return null; + + } + + static CreateClipsFromMorphTargetSequences( morphTargets, fps, noLoop ) { + + const animationToMorphTargets = {}; + + // tested with https://regex101.com/ on trick sequences + // such flamingo_flyA_003, flamingo_run1_003, crdeath0059 + const pattern = /^([\w-]*?)([\d]+)$/; + + // sort morph target names into animation groups based + // patterns like Walk_001, Walk_002, Run_001, Run_002 + for ( let i = 0, il = morphTargets.length; i < il; i ++ ) { + + const morphTarget = morphTargets[ i ]; + const parts = morphTarget.name.match( pattern ); + + if ( parts && parts.length > 1 ) { + + const name = parts[ 1 ]; + + let animationMorphTargets = animationToMorphTargets[ name ]; + + if ( ! animationMorphTargets ) { + + animationToMorphTargets[ name ] = animationMorphTargets = []; + + } + + animationMorphTargets.push( morphTarget ); + + } + + } + + const clips = []; + + for ( const name in animationToMorphTargets ) { + + clips.push( this.CreateFromMorphTargetSequence( name, animationToMorphTargets[ name ], fps, noLoop ) ); + + } + + return clips; + + } + + // parse the animation.hierarchy format + static parseAnimation( animation, bones ) { + + if ( ! animation ) { + + console.error( 'THREE.AnimationClip: No animation in JSONLoader data.' ); + return null; + + } + + const addNonemptyTrack = function ( trackType, trackName, animationKeys, propertyName, destTracks ) { + + // only return track if there are actually keys. + if ( animationKeys.length !== 0 ) { + + const times = []; + const values = []; + + flattenJSON( animationKeys, times, values, propertyName ); + + // empty keys are filtered out, so check again + if ( times.length !== 0 ) { + + destTracks.push( new trackType( trackName, times, values ) ); + + } + + } + + }; + + const tracks = []; + + const clipName = animation.name || 'default'; + const fps = animation.fps || 30; + const blendMode = animation.blendMode; + + // automatic length determination in AnimationClip. + let duration = animation.length || - 1; + + const hierarchyTracks = animation.hierarchy || []; + + for ( let h = 0; h < hierarchyTracks.length; h ++ ) { + + const animationKeys = hierarchyTracks[ h ].keys; + + // skip empty tracks + if ( ! animationKeys || animationKeys.length === 0 ) continue; + + // process morph targets + if ( animationKeys[ 0 ].morphTargets ) { + + // figure out all morph targets used in this track + const morphTargetNames = {}; + + let k; + + for ( k = 0; k < animationKeys.length; k ++ ) { + + if ( animationKeys[ k ].morphTargets ) { + + for ( let m = 0; m < animationKeys[ k ].morphTargets.length; m ++ ) { + + morphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = - 1; + + } + + } + + } + + // create a track for each morph target with all zero + // morphTargetInfluences except for the keys in which + // the morphTarget is named. + for ( const morphTargetName in morphTargetNames ) { + + const times = []; + const values = []; + + for ( let m = 0; m !== animationKeys[ k ].morphTargets.length; ++ m ) { + + const animationKey = animationKeys[ k ]; + + times.push( animationKey.time ); + values.push( ( animationKey.morphTarget === morphTargetName ) ? 1 : 0 ); + + } + + tracks.push( new NumberKeyframeTrack( '.morphTargetInfluence[' + morphTargetName + ']', times, values ) ); + + } + + duration = morphTargetNames.length * fps; + + } else { + + // ...assume skeletal animation + + const boneName = '.bones[' + bones[ h ].name + ']'; + + addNonemptyTrack( + VectorKeyframeTrack, boneName + '.position', + animationKeys, 'pos', tracks ); + + addNonemptyTrack( + QuaternionKeyframeTrack, boneName + '.quaternion', + animationKeys, 'rot', tracks ); + + addNonemptyTrack( + VectorKeyframeTrack, boneName + '.scale', + animationKeys, 'scl', tracks ); + + } + + } + + if ( tracks.length === 0 ) { + + return null; + + } + + const clip = new this( clipName, duration, tracks, blendMode ); + + return clip; + + } + + resetDuration() { + + const tracks = this.tracks; + let duration = 0; + + for ( let i = 0, n = tracks.length; i !== n; ++ i ) { + + const track = this.tracks[ i ]; + + duration = Math.max( duration, track.times[ track.times.length - 1 ] ); + + } + + this.duration = duration; + + return this; + + } + + trim() { + + for ( let i = 0; i < this.tracks.length; i ++ ) { + + this.tracks[ i ].trim( 0, this.duration ); + + } + + return this; + + } + + validate() { + + let valid = true; + + for ( let i = 0; i < this.tracks.length; i ++ ) { + + valid = valid && this.tracks[ i ].validate(); + + } + + return valid; + + } + + optimize() { + + for ( let i = 0; i < this.tracks.length; i ++ ) { + + this.tracks[ i ].optimize(); + + } + + return this; + + } + + clone() { + + const tracks = []; + + for ( let i = 0; i < this.tracks.length; i ++ ) { + + tracks.push( this.tracks[ i ].clone() ); + + } + + return new this.constructor( this.name, this.duration, tracks, this.blendMode ); + + } + + toJSON() { + + return this.constructor.toJSON( this ); + + } + +} + +function getTrackTypeForValueTypeName( typeName ) { + + switch ( typeName.toLowerCase() ) { + + case 'scalar': + case 'double': + case 'float': + case 'number': + case 'integer': + + return NumberKeyframeTrack; + + case 'vector': + case 'vector2': + case 'vector3': + case 'vector4': + + return VectorKeyframeTrack; + + case 'color': + + return ColorKeyframeTrack; + + case 'quaternion': + + return QuaternionKeyframeTrack; + + case 'bool': + case 'boolean': + + return BooleanKeyframeTrack; + + case 'string': + + return StringKeyframeTrack; + + } + + throw new Error( 'THREE.KeyframeTrack: Unsupported typeName: ' + typeName ); + +} + +function parseKeyframeTrack( json ) { + + if ( json.type === undefined ) { + + throw new Error( 'THREE.KeyframeTrack: track type undefined, can not parse' ); + + } + + const trackType = getTrackTypeForValueTypeName( json.type ); + + if ( json.times === undefined ) { + + const times = [], values = []; + + flattenJSON( json.keys, times, values, 'value' ); + + json.times = times; + json.values = values; + + } + + // derived classes can define a static parse method + if ( trackType.parse !== undefined ) { + + return trackType.parse( json ); + + } else { + + // by default, we assume a constructor compatible with the base + return new trackType( json.name, json.times, json.values, json.interpolation ); + + } + +} + +const Cache = { + + enabled: false, + + files: {}, + + add: function ( key, file ) { + + if ( this.enabled === false ) return; + + // console.log( 'THREE.Cache', 'Adding key:', key ); + + this.files[ key ] = file; + + }, + + get: function ( key ) { + + if ( this.enabled === false ) return; + + // console.log( 'THREE.Cache', 'Checking key:', key ); + + return this.files[ key ]; + + }, + + remove: function ( key ) { + + delete this.files[ key ]; + + }, + + clear: function () { + + this.files = {}; + + } + +}; + +class LoadingManager { + + constructor( onLoad, onProgress, onError ) { + + const scope = this; + + let isLoading = false; + let itemsLoaded = 0; + let itemsTotal = 0; + let urlModifier = undefined; + const handlers = []; + + // Refer to #5689 for the reason why we don't set .onStart + // in the constructor + + this.onStart = undefined; + this.onLoad = onLoad; + this.onProgress = onProgress; + this.onError = onError; + + this.itemStart = function ( url ) { + + itemsTotal ++; + + if ( isLoading === false ) { + + if ( scope.onStart !== undefined ) { + + scope.onStart( url, itemsLoaded, itemsTotal ); + + } + + } + + isLoading = true; + + }; + + this.itemEnd = function ( url ) { + + itemsLoaded ++; + + if ( scope.onProgress !== undefined ) { + + scope.onProgress( url, itemsLoaded, itemsTotal ); + + } + + if ( itemsLoaded === itemsTotal ) { + + isLoading = false; + + if ( scope.onLoad !== undefined ) { + + scope.onLoad(); + + } + + } + + }; + + this.itemError = function ( url ) { + + if ( scope.onError !== undefined ) { + + scope.onError( url ); + + } + + }; + + this.resolveURL = function ( url ) { + + if ( urlModifier ) { + + return urlModifier( url ); + + } + + return url; + + }; + + this.setURLModifier = function ( transform ) { + + urlModifier = transform; + + return this; + + }; + + this.addHandler = function ( regex, loader ) { + + handlers.push( regex, loader ); + + return this; + + }; + + this.removeHandler = function ( regex ) { + + const index = handlers.indexOf( regex ); + + if ( index !== - 1 ) { + + handlers.splice( index, 2 ); + + } + + return this; + + }; + + this.getHandler = function ( file ) { + + for ( let i = 0, l = handlers.length; i < l; i += 2 ) { + + const regex = handlers[ i ]; + const loader = handlers[ i + 1 ]; + + if ( regex.global ) regex.lastIndex = 0; // see #17920 + + if ( regex.test( file ) ) { + + return loader; + + } + + } + + return null; + + }; + + } + +} + +const DefaultLoadingManager = /*@__PURE__*/ new LoadingManager(); + +class Loader { + + constructor( manager ) { + + this.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager; + + this.crossOrigin = 'anonymous'; + this.withCredentials = false; + this.path = ''; + this.resourcePath = ''; + this.requestHeader = {}; + + } + + load( /* url, onLoad, onProgress, onError */ ) {} + + loadAsync( url, onProgress ) { + + const scope = this; + + return new Promise( function ( resolve, reject ) { + + scope.load( url, resolve, onProgress, reject ); + + } ); + + } + + parse( /* data */ ) {} + + setCrossOrigin( crossOrigin ) { + + this.crossOrigin = crossOrigin; + return this; + + } + + setWithCredentials( value ) { + + this.withCredentials = value; + return this; + + } + + setPath( path ) { + + this.path = path; + return this; + + } + + setResourcePath( resourcePath ) { + + this.resourcePath = resourcePath; + return this; + + } + + setRequestHeader( requestHeader ) { + + this.requestHeader = requestHeader; + return this; + + } + +} + +Loader.DEFAULT_MATERIAL_NAME = '__DEFAULT'; + +const loading = {}; + +class HttpError extends Error { + + constructor( message, response ) { + + super( message ); + this.response = response; + + } + +} + +class FileLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + if ( url === undefined ) url = ''; + + if ( this.path !== undefined ) url = this.path + url; + + url = this.manager.resolveURL( url ); + + const cached = Cache.get( url ); + + if ( cached !== undefined ) { + + this.manager.itemStart( url ); + + setTimeout( () => { + + if ( onLoad ) onLoad( cached ); + + this.manager.itemEnd( url ); + + }, 0 ); + + return cached; + + } + + // Check if request is duplicate + + if ( loading[ url ] !== undefined ) { + + loading[ url ].push( { + + onLoad: onLoad, + onProgress: onProgress, + onError: onError + + } ); + + return; + + } + + // Initialise array for duplicate requests + loading[ url ] = []; + + loading[ url ].push( { + onLoad: onLoad, + onProgress: onProgress, + onError: onError, + } ); + + // create request + const req = new Request( url, { + headers: new Headers( this.requestHeader ), + credentials: this.withCredentials ? 'include' : 'same-origin', + // An abort controller could be added within a future PR + } ); + + // record states ( avoid data race ) + const mimeType = this.mimeType; + const responseType = this.responseType; + + // start the fetch + fetch( req ) + .then( response => { + + if ( response.status === 200 || response.status === 0 ) { + + // Some browsers return HTTP Status 0 when using non-http protocol + // e.g. 'file://' or 'data://'. Handle as success. + + if ( response.status === 0 ) { + + console.warn( 'THREE.FileLoader: HTTP Status 0 received.' ); + + } + + // Workaround: Checking if response.body === undefined for Alipay browser #23548 + + if ( typeof ReadableStream === 'undefined' || response.body === undefined || response.body.getReader === undefined ) { + + return response; + + } + + const callbacks = loading[ url ]; + const reader = response.body.getReader(); + + // Nginx needs X-File-Size check + // https://serverfault.com/questions/482875/why-does-nginx-remove-content-length-header-for-chunked-content + const contentLength = response.headers.get( 'X-File-Size' ) || response.headers.get( 'Content-Length' ); + const total = contentLength ? parseInt( contentLength ) : 0; + const lengthComputable = total !== 0; + let loaded = 0; + + // periodically read data into the new stream tracking while download progress + const stream = new ReadableStream( { + start( controller ) { + + readData(); + + function readData() { + + reader.read().then( ( { done, value } ) => { + + if ( done ) { + + controller.close(); + + } else { + + loaded += value.byteLength; + + const event = new ProgressEvent( 'progress', { lengthComputable, loaded, total } ); + for ( let i = 0, il = callbacks.length; i < il; i ++ ) { + + const callback = callbacks[ i ]; + if ( callback.onProgress ) callback.onProgress( event ); + + } + + controller.enqueue( value ); + readData(); + + } + + } ); + + } + + } + + } ); + + return new Response( stream ); + + } else { + + throw new HttpError( `fetch for "${response.url}" responded with ${response.status}: ${response.statusText}`, response ); + + } + + } ) + .then( response => { + + switch ( responseType ) { + + case 'arraybuffer': + + return response.arrayBuffer(); + + case 'blob': + + return response.blob(); + + case 'document': + + return response.text() + .then( text => { + + const parser = new DOMParser(); + return parser.parseFromString( text, mimeType ); + + } ); + + case 'json': + + return response.json(); + + default: + + if ( mimeType === undefined ) { + + return response.text(); + + } else { + + // sniff encoding + const re = /charset="?([^;"\s]*)"?/i; + const exec = re.exec( mimeType ); + const label = exec && exec[ 1 ] ? exec[ 1 ].toLowerCase() : undefined; + const decoder = new TextDecoder( label ); + return response.arrayBuffer().then( ab => decoder.decode( ab ) ); + + } + + } + + } ) + .then( data => { + + // Add to cache only on HTTP success, so that we do not cache + // error response bodies as proper responses to requests. + Cache.add( url, data ); + + const callbacks = loading[ url ]; + delete loading[ url ]; + + for ( let i = 0, il = callbacks.length; i < il; i ++ ) { + + const callback = callbacks[ i ]; + if ( callback.onLoad ) callback.onLoad( data ); + + } + + } ) + .catch( err => { + + // Abort errors and other errors are handled the same + + const callbacks = loading[ url ]; + + if ( callbacks === undefined ) { + + // When onLoad was called and url was deleted in `loading` + this.manager.itemError( url ); + throw err; + + } + + delete loading[ url ]; + + for ( let i = 0, il = callbacks.length; i < il; i ++ ) { + + const callback = callbacks[ i ]; + if ( callback.onError ) callback.onError( err ); + + } + + this.manager.itemError( url ); + + } ) + .finally( () => { + + this.manager.itemEnd( url ); + + } ); + + this.manager.itemStart( url ); + + } + + setResponseType( value ) { + + this.responseType = value; + return this; + + } + + setMimeType( value ) { + + this.mimeType = value; + return this; + + } + +} + +class AnimationLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( JSON.parse( text ) ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( json ) { + + const animations = []; + + for ( let i = 0; i < json.length; i ++ ) { + + const clip = AnimationClip.parse( json[ i ] ); + + animations.push( clip ); + + } + + return animations; + + } + +} + +/** + * Abstract Base class to block based textures loader (dds, pvr, ...) + * + * Sub classes have to implement the parse() method which will be used in load(). + */ + +class CompressedTextureLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const images = []; + + const texture = new CompressedTexture(); + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + + let loaded = 0; + + function loadTexture( i ) { + + loader.load( url[ i ], function ( buffer ) { + + const texDatas = scope.parse( buffer, true ); + + images[ i ] = { + width: texDatas.width, + height: texDatas.height, + format: texDatas.format, + mipmaps: texDatas.mipmaps + }; + + loaded += 1; + + if ( loaded === 6 ) { + + if ( texDatas.mipmapCount === 1 ) texture.minFilter = LinearFilter; + + texture.image = images; + texture.format = texDatas.format; + texture.needsUpdate = true; + + if ( onLoad ) onLoad( texture ); + + } + + }, onProgress, onError ); + + } + + if ( Array.isArray( url ) ) { + + for ( let i = 0, il = url.length; i < il; ++ i ) { + + loadTexture( i ); + + } + + } else { + + // compressed cubemap texture stored in a single DDS file + + loader.load( url, function ( buffer ) { + + const texDatas = scope.parse( buffer, true ); + + if ( texDatas.isCubemap ) { + + const faces = texDatas.mipmaps.length / texDatas.mipmapCount; + + for ( let f = 0; f < faces; f ++ ) { + + images[ f ] = { mipmaps: [] }; + + for ( let i = 0; i < texDatas.mipmapCount; i ++ ) { + + images[ f ].mipmaps.push( texDatas.mipmaps[ f * texDatas.mipmapCount + i ] ); + images[ f ].format = texDatas.format; + images[ f ].width = texDatas.width; + images[ f ].height = texDatas.height; + + } + + } + + texture.image = images; + + } else { + + texture.image.width = texDatas.width; + texture.image.height = texDatas.height; + texture.mipmaps = texDatas.mipmaps; + + } + + if ( texDatas.mipmapCount === 1 ) { + + texture.minFilter = LinearFilter; + + } + + texture.format = texDatas.format; + texture.needsUpdate = true; + + if ( onLoad ) onLoad( texture ); + + }, onProgress, onError ); + + } + + return texture; + + } + +} + +class ImageLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + if ( this.path !== undefined ) url = this.path + url; + + url = this.manager.resolveURL( url ); + + const scope = this; + + const cached = Cache.get( url ); + + if ( cached !== undefined ) { + + scope.manager.itemStart( url ); + + setTimeout( function () { + + if ( onLoad ) onLoad( cached ); + + scope.manager.itemEnd( url ); + + }, 0 ); + + return cached; + + } + + const image = createElementNS( 'img' ); + + function onImageLoad() { + + removeEventListeners(); + + Cache.add( url, this ); + + if ( onLoad ) onLoad( this ); + + scope.manager.itemEnd( url ); + + } + + function onImageError( event ) { + + removeEventListeners(); + + if ( onError ) onError( event ); + + scope.manager.itemError( url ); + scope.manager.itemEnd( url ); + + } + + function removeEventListeners() { + + image.removeEventListener( 'load', onImageLoad, false ); + image.removeEventListener( 'error', onImageError, false ); + + } + + image.addEventListener( 'load', onImageLoad, false ); + image.addEventListener( 'error', onImageError, false ); + + if ( url.slice( 0, 5 ) !== 'data:' ) { + + if ( this.crossOrigin !== undefined ) image.crossOrigin = this.crossOrigin; + + } + + scope.manager.itemStart( url ); + + image.src = url; + + return image; + + } + +} + +class CubeTextureLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( urls, onLoad, onProgress, onError ) { + + const texture = new CubeTexture(); + texture.colorSpace = SRGBColorSpace; + + const loader = new ImageLoader( this.manager ); + loader.setCrossOrigin( this.crossOrigin ); + loader.setPath( this.path ); + + let loaded = 0; + + function loadTexture( i ) { + + loader.load( urls[ i ], function ( image ) { + + texture.images[ i ] = image; + + loaded ++; + + if ( loaded === 6 ) { + + texture.needsUpdate = true; + + if ( onLoad ) onLoad( texture ); + + } + + }, undefined, onError ); + + } + + for ( let i = 0; i < urls.length; ++ i ) { + + loadTexture( i ); + + } + + return texture; + + } + +} + +/** + * Abstract Base class to load generic binary textures formats (rgbe, hdr, ...) + * + * Sub classes have to implement the parse() method which will be used in load(). + */ + +class DataTextureLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const texture = new DataTexture(); + + const loader = new FileLoader( this.manager ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( this.requestHeader ); + loader.setPath( this.path ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( buffer ) { + + let texData; + + try { + + texData = scope.parse( buffer ); + + } catch ( error ) { + + if ( onError !== undefined ) { + + onError( error ); + + } else { + + console.error( error ); + return; + + } + + } + + if ( texData.image !== undefined ) { + + texture.image = texData.image; + + } else if ( texData.data !== undefined ) { + + texture.image.width = texData.width; + texture.image.height = texData.height; + texture.image.data = texData.data; + + } + + texture.wrapS = texData.wrapS !== undefined ? texData.wrapS : ClampToEdgeWrapping; + texture.wrapT = texData.wrapT !== undefined ? texData.wrapT : ClampToEdgeWrapping; + + texture.magFilter = texData.magFilter !== undefined ? texData.magFilter : LinearFilter; + texture.minFilter = texData.minFilter !== undefined ? texData.minFilter : LinearFilter; + + texture.anisotropy = texData.anisotropy !== undefined ? texData.anisotropy : 1; + + if ( texData.colorSpace !== undefined ) { + + texture.colorSpace = texData.colorSpace; + + } + + if ( texData.flipY !== undefined ) { + + texture.flipY = texData.flipY; + + } + + if ( texData.format !== undefined ) { + + texture.format = texData.format; + + } + + if ( texData.type !== undefined ) { + + texture.type = texData.type; + + } + + if ( texData.mipmaps !== undefined ) { + + texture.mipmaps = texData.mipmaps; + texture.minFilter = LinearMipmapLinearFilter; // presumably... + + } + + if ( texData.mipmapCount === 1 ) { + + texture.minFilter = LinearFilter; + + } + + if ( texData.generateMipmaps !== undefined ) { + + texture.generateMipmaps = texData.generateMipmaps; + + } + + texture.needsUpdate = true; + + if ( onLoad ) onLoad( texture, texData ); + + }, onProgress, onError ); + + + return texture; + + } + +} + +class TextureLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const texture = new Texture(); + + const loader = new ImageLoader( this.manager ); + loader.setCrossOrigin( this.crossOrigin ); + loader.setPath( this.path ); + + loader.load( url, function ( image ) { + + texture.image = image; + texture.needsUpdate = true; + + if ( onLoad !== undefined ) { + + onLoad( texture ); + + } + + }, onProgress, onError ); + + return texture; + + } + +} + +class Light extends Object3D { + + constructor( color, intensity = 1 ) { + + super(); + + this.isLight = true; + + this.type = 'Light'; + + this.color = new Color( color ); + this.intensity = intensity; + + } + + dispose() { + + // Empty here in base class; some subclasses override. + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.color.copy( source.color ); + this.intensity = source.intensity; + + return this; + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + data.object.color = this.color.getHex(); + data.object.intensity = this.intensity; + + if ( this.groundColor !== undefined ) data.object.groundColor = this.groundColor.getHex(); + + if ( this.distance !== undefined ) data.object.distance = this.distance; + if ( this.angle !== undefined ) data.object.angle = this.angle; + if ( this.decay !== undefined ) data.object.decay = this.decay; + if ( this.penumbra !== undefined ) data.object.penumbra = this.penumbra; + + if ( this.shadow !== undefined ) data.object.shadow = this.shadow.toJSON(); + + return data; + + } + +} + +class HemisphereLight extends Light { + + constructor( skyColor, groundColor, intensity ) { + + super( skyColor, intensity ); + + this.isHemisphereLight = true; + + this.type = 'HemisphereLight'; + + this.position.copy( Object3D.DEFAULT_UP ); + this.updateMatrix(); + + this.groundColor = new Color( groundColor ); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.groundColor.copy( source.groundColor ); + + return this; + + } + +} + +const _projScreenMatrix$1 = /*@__PURE__*/ new Matrix4(); +const _lightPositionWorld$1 = /*@__PURE__*/ new Vector3(); +const _lookTarget$1 = /*@__PURE__*/ new Vector3(); + +class LightShadow { + + constructor( camera ) { + + this.camera = camera; + + this.bias = 0; + this.normalBias = 0; + this.radius = 1; + this.blurSamples = 8; + + this.mapSize = new Vector2( 512, 512 ); + + this.map = null; + this.mapPass = null; + this.matrix = new Matrix4(); + + this.autoUpdate = true; + this.needsUpdate = false; + + this._frustum = new Frustum(); + this._frameExtents = new Vector2( 1, 1 ); + + this._viewportCount = 1; + + this._viewports = [ + + new Vector4( 0, 0, 1, 1 ) + + ]; + + } + + getViewportCount() { + + return this._viewportCount; + + } + + getFrustum() { + + return this._frustum; + + } + + updateMatrices( light ) { + + const shadowCamera = this.camera; + const shadowMatrix = this.matrix; + + _lightPositionWorld$1.setFromMatrixPosition( light.matrixWorld ); + shadowCamera.position.copy( _lightPositionWorld$1 ); + + _lookTarget$1.setFromMatrixPosition( light.target.matrixWorld ); + shadowCamera.lookAt( _lookTarget$1 ); + shadowCamera.updateMatrixWorld(); + + _projScreenMatrix$1.multiplyMatrices( shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse ); + this._frustum.setFromProjectionMatrix( _projScreenMatrix$1 ); + + shadowMatrix.set( + 0.5, 0.0, 0.0, 0.5, + 0.0, 0.5, 0.0, 0.5, + 0.0, 0.0, 0.5, 0.5, + 0.0, 0.0, 0.0, 1.0 + ); + + shadowMatrix.multiply( _projScreenMatrix$1 ); + + } + + getViewport( viewportIndex ) { + + return this._viewports[ viewportIndex ]; + + } + + getFrameExtents() { + + return this._frameExtents; + + } + + dispose() { + + if ( this.map ) { + + this.map.dispose(); + + } + + if ( this.mapPass ) { + + this.mapPass.dispose(); + + } + + } + + copy( source ) { + + this.camera = source.camera.clone(); + + this.bias = source.bias; + this.radius = source.radius; + + this.mapSize.copy( source.mapSize ); + + return this; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + toJSON() { + + const object = {}; + + if ( this.bias !== 0 ) object.bias = this.bias; + if ( this.normalBias !== 0 ) object.normalBias = this.normalBias; + if ( this.radius !== 1 ) object.radius = this.radius; + if ( this.mapSize.x !== 512 || this.mapSize.y !== 512 ) object.mapSize = this.mapSize.toArray(); + + object.camera = this.camera.toJSON( false ).object; + delete object.camera.matrix; + + return object; + + } + +} + +class SpotLightShadow extends LightShadow { + + constructor() { + + super( new PerspectiveCamera( 50, 1, 0.5, 500 ) ); + + this.isSpotLightShadow = true; + + this.focus = 1; + + } + + updateMatrices( light ) { + + const camera = this.camera; + + const fov = RAD2DEG * 2 * light.angle * this.focus; + const aspect = this.mapSize.width / this.mapSize.height; + const far = light.distance || camera.far; + + if ( fov !== camera.fov || aspect !== camera.aspect || far !== camera.far ) { + + camera.fov = fov; + camera.aspect = aspect; + camera.far = far; + camera.updateProjectionMatrix(); + + } + + super.updateMatrices( light ); + + } + + copy( source ) { + + super.copy( source ); + + this.focus = source.focus; + + return this; + + } + +} + +class SpotLight extends Light { + + constructor( color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 2 ) { + + super( color, intensity ); + + this.isSpotLight = true; + + this.type = 'SpotLight'; + + this.position.copy( Object3D.DEFAULT_UP ); + this.updateMatrix(); + + this.target = new Object3D(); + + this.distance = distance; + this.angle = angle; + this.penumbra = penumbra; + this.decay = decay; + + this.map = null; + + this.shadow = new SpotLightShadow(); + + } + + get power() { + + // compute the light's luminous power (in lumens) from its intensity (in candela) + // by convention for a spotlight, luminous power (lm) = π * luminous intensity (cd) + return this.intensity * Math.PI; + + } + + set power( power ) { + + // set the light's intensity (in candela) from the desired luminous power (in lumens) + this.intensity = power / Math.PI; + + } + + dispose() { + + this.shadow.dispose(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.distance = source.distance; + this.angle = source.angle; + this.penumbra = source.penumbra; + this.decay = source.decay; + + this.target = source.target.clone(); + + this.shadow = source.shadow.clone(); + + return this; + + } + +} + +const _projScreenMatrix = /*@__PURE__*/ new Matrix4(); +const _lightPositionWorld = /*@__PURE__*/ new Vector3(); +const _lookTarget = /*@__PURE__*/ new Vector3(); + +class PointLightShadow extends LightShadow { + + constructor() { + + super( new PerspectiveCamera( 90, 1, 0.5, 500 ) ); + + this.isPointLightShadow = true; + + this._frameExtents = new Vector2( 4, 2 ); + + this._viewportCount = 6; + + this._viewports = [ + // These viewports map a cube-map onto a 2D texture with the + // following orientation: + // + // xzXZ + // y Y + // + // X - Positive x direction + // x - Negative x direction + // Y - Positive y direction + // y - Negative y direction + // Z - Positive z direction + // z - Negative z direction + + // positive X + new Vector4( 2, 1, 1, 1 ), + // negative X + new Vector4( 0, 1, 1, 1 ), + // positive Z + new Vector4( 3, 1, 1, 1 ), + // negative Z + new Vector4( 1, 1, 1, 1 ), + // positive Y + new Vector4( 3, 0, 1, 1 ), + // negative Y + new Vector4( 1, 0, 1, 1 ) + ]; + + this._cubeDirections = [ + new Vector3( 1, 0, 0 ), new Vector3( - 1, 0, 0 ), new Vector3( 0, 0, 1 ), + new Vector3( 0, 0, - 1 ), new Vector3( 0, 1, 0 ), new Vector3( 0, - 1, 0 ) + ]; + + this._cubeUps = [ + new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ), + new Vector3( 0, 1, 0 ), new Vector3( 0, 0, 1 ), new Vector3( 0, 0, - 1 ) + ]; + + } + + updateMatrices( light, viewportIndex = 0 ) { + + const camera = this.camera; + const shadowMatrix = this.matrix; + + const far = light.distance || camera.far; + + if ( far !== camera.far ) { + + camera.far = far; + camera.updateProjectionMatrix(); + + } + + _lightPositionWorld.setFromMatrixPosition( light.matrixWorld ); + camera.position.copy( _lightPositionWorld ); + + _lookTarget.copy( camera.position ); + _lookTarget.add( this._cubeDirections[ viewportIndex ] ); + camera.up.copy( this._cubeUps[ viewportIndex ] ); + camera.lookAt( _lookTarget ); + camera.updateMatrixWorld(); + + shadowMatrix.makeTranslation( - _lightPositionWorld.x, - _lightPositionWorld.y, - _lightPositionWorld.z ); + + _projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse ); + this._frustum.setFromProjectionMatrix( _projScreenMatrix ); + + } + +} + +class PointLight extends Light { + + constructor( color, intensity, distance = 0, decay = 2 ) { + + super( color, intensity ); + + this.isPointLight = true; + + this.type = 'PointLight'; + + this.distance = distance; + this.decay = decay; + + this.shadow = new PointLightShadow(); + + } + + get power() { + + // compute the light's luminous power (in lumens) from its intensity (in candela) + // for an isotropic light source, luminous power (lm) = 4 π luminous intensity (cd) + return this.intensity * 4 * Math.PI; + + } + + set power( power ) { + + // set the light's intensity (in candela) from the desired luminous power (in lumens) + this.intensity = power / ( 4 * Math.PI ); + + } + + dispose() { + + this.shadow.dispose(); + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.distance = source.distance; + this.decay = source.decay; + + this.shadow = source.shadow.clone(); + + return this; + + } + +} + +class DirectionalLightShadow extends LightShadow { + + constructor() { + + super( new OrthographicCamera( - 5, 5, 5, - 5, 0.5, 500 ) ); + + this.isDirectionalLightShadow = true; + + } + +} + +class DirectionalLight extends Light { + + constructor( color, intensity ) { + + super( color, intensity ); + + this.isDirectionalLight = true; + + this.type = 'DirectionalLight'; + + this.position.copy( Object3D.DEFAULT_UP ); + this.updateMatrix(); + + this.target = new Object3D(); + + this.shadow = new DirectionalLightShadow(); + + } + + dispose() { + + this.shadow.dispose(); + + } + + copy( source ) { + + super.copy( source ); + + this.target = source.target.clone(); + this.shadow = source.shadow.clone(); + + return this; + + } + +} + +class AmbientLight extends Light { + + constructor( color, intensity ) { + + super( color, intensity ); + + this.isAmbientLight = true; + + this.type = 'AmbientLight'; + + } + +} + +class RectAreaLight extends Light { + + constructor( color, intensity, width = 10, height = 10 ) { + + super( color, intensity ); + + this.isRectAreaLight = true; + + this.type = 'RectAreaLight'; + + this.width = width; + this.height = height; + + } + + get power() { + + // compute the light's luminous power (in lumens) from its intensity (in nits) + return this.intensity * this.width * this.height * Math.PI; + + } + + set power( power ) { + + // set the light's intensity (in nits) from the desired luminous power (in lumens) + this.intensity = power / ( this.width * this.height * Math.PI ); + + } + + copy( source ) { + + super.copy( source ); + + this.width = source.width; + this.height = source.height; + + return this; + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + data.object.width = this.width; + data.object.height = this.height; + + return data; + + } + +} + +/** + * Primary reference: + * https://graphics.stanford.edu/papers/envmap/envmap.pdf + * + * Secondary reference: + * https://www.ppsloan.org/publications/StupidSH36.pdf + */ + +// 3-band SH defined by 9 coefficients + +class SphericalHarmonics3 { + + constructor() { + + this.isSphericalHarmonics3 = true; + + this.coefficients = []; + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients.push( new Vector3() ); + + } + + } + + set( coefficients ) { + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients[ i ].copy( coefficients[ i ] ); + + } + + return this; + + } + + zero() { + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients[ i ].set( 0, 0, 0 ); + + } + + return this; + + } + + // get the radiance in the direction of the normal + // target is a Vector3 + getAt( normal, target ) { + + // normal is assumed to be unit length + + const x = normal.x, y = normal.y, z = normal.z; + + const coeff = this.coefficients; + + // band 0 + target.copy( coeff[ 0 ] ).multiplyScalar( 0.282095 ); + + // band 1 + target.addScaledVector( coeff[ 1 ], 0.488603 * y ); + target.addScaledVector( coeff[ 2 ], 0.488603 * z ); + target.addScaledVector( coeff[ 3 ], 0.488603 * x ); + + // band 2 + target.addScaledVector( coeff[ 4 ], 1.092548 * ( x * y ) ); + target.addScaledVector( coeff[ 5 ], 1.092548 * ( y * z ) ); + target.addScaledVector( coeff[ 6 ], 0.315392 * ( 3.0 * z * z - 1.0 ) ); + target.addScaledVector( coeff[ 7 ], 1.092548 * ( x * z ) ); + target.addScaledVector( coeff[ 8 ], 0.546274 * ( x * x - y * y ) ); + + return target; + + } + + // get the irradiance (radiance convolved with cosine lobe) in the direction of the normal + // target is a Vector3 + // https://graphics.stanford.edu/papers/envmap/envmap.pdf + getIrradianceAt( normal, target ) { + + // normal is assumed to be unit length + + const x = normal.x, y = normal.y, z = normal.z; + + const coeff = this.coefficients; + + // band 0 + target.copy( coeff[ 0 ] ).multiplyScalar( 0.886227 ); // π * 0.282095 + + // band 1 + target.addScaledVector( coeff[ 1 ], 2.0 * 0.511664 * y ); // ( 2 * π / 3 ) * 0.488603 + target.addScaledVector( coeff[ 2 ], 2.0 * 0.511664 * z ); + target.addScaledVector( coeff[ 3 ], 2.0 * 0.511664 * x ); + + // band 2 + target.addScaledVector( coeff[ 4 ], 2.0 * 0.429043 * x * y ); // ( π / 4 ) * 1.092548 + target.addScaledVector( coeff[ 5 ], 2.0 * 0.429043 * y * z ); + target.addScaledVector( coeff[ 6 ], 0.743125 * z * z - 0.247708 ); // ( π / 4 ) * 0.315392 * 3 + target.addScaledVector( coeff[ 7 ], 2.0 * 0.429043 * x * z ); + target.addScaledVector( coeff[ 8 ], 0.429043 * ( x * x - y * y ) ); // ( π / 4 ) * 0.546274 + + return target; + + } + + add( sh ) { + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients[ i ].add( sh.coefficients[ i ] ); + + } + + return this; + + } + + addScaledSH( sh, s ) { + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients[ i ].addScaledVector( sh.coefficients[ i ], s ); + + } + + return this; + + } + + scale( s ) { + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients[ i ].multiplyScalar( s ); + + } + + return this; + + } + + lerp( sh, alpha ) { + + for ( let i = 0; i < 9; i ++ ) { + + this.coefficients[ i ].lerp( sh.coefficients[ i ], alpha ); + + } + + return this; + + } + + equals( sh ) { + + for ( let i = 0; i < 9; i ++ ) { + + if ( ! this.coefficients[ i ].equals( sh.coefficients[ i ] ) ) { + + return false; + + } + + } + + return true; + + } + + copy( sh ) { + + return this.set( sh.coefficients ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + fromArray( array, offset = 0 ) { + + const coefficients = this.coefficients; + + for ( let i = 0; i < 9; i ++ ) { + + coefficients[ i ].fromArray( array, offset + ( i * 3 ) ); + + } + + return this; + + } + + toArray( array = [], offset = 0 ) { + + const coefficients = this.coefficients; + + for ( let i = 0; i < 9; i ++ ) { + + coefficients[ i ].toArray( array, offset + ( i * 3 ) ); + + } + + return array; + + } + + // evaluate the basis functions + // shBasis is an Array[ 9 ] + static getBasisAt( normal, shBasis ) { + + // normal is assumed to be unit length + + const x = normal.x, y = normal.y, z = normal.z; + + // band 0 + shBasis[ 0 ] = 0.282095; + + // band 1 + shBasis[ 1 ] = 0.488603 * y; + shBasis[ 2 ] = 0.488603 * z; + shBasis[ 3 ] = 0.488603 * x; + + // band 2 + shBasis[ 4 ] = 1.092548 * x * y; + shBasis[ 5 ] = 1.092548 * y * z; + shBasis[ 6 ] = 0.315392 * ( 3 * z * z - 1 ); + shBasis[ 7 ] = 1.092548 * x * z; + shBasis[ 8 ] = 0.546274 * ( x * x - y * y ); + + } + +} + +class LightProbe extends Light { + + constructor( sh = new SphericalHarmonics3(), intensity = 1 ) { + + super( undefined, intensity ); + + this.isLightProbe = true; + + this.sh = sh; + + } + + copy( source ) { + + super.copy( source ); + + this.sh.copy( source.sh ); + + return this; + + } + + fromJSON( json ) { + + this.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON(); + this.sh.fromArray( json.sh ); + + return this; + + } + + toJSON( meta ) { + + const data = super.toJSON( meta ); + + data.object.sh = this.sh.toArray(); + + return data; + + } + +} + +class MaterialLoader extends Loader { + + constructor( manager ) { + + super( manager ); + this.textures = {}; + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( JSON.parse( text ) ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( json ) { + + const textures = this.textures; + + function getTexture( name ) { + + if ( textures[ name ] === undefined ) { + + console.warn( 'THREE.MaterialLoader: Undefined texture', name ); + + } + + return textures[ name ]; + + } + + const material = MaterialLoader.createMaterialFromType( json.type ); + + if ( json.uuid !== undefined ) material.uuid = json.uuid; + if ( json.name !== undefined ) material.name = json.name; + if ( json.color !== undefined && material.color !== undefined ) material.color.setHex( json.color ); + if ( json.roughness !== undefined ) material.roughness = json.roughness; + if ( json.metalness !== undefined ) material.metalness = json.metalness; + if ( json.sheen !== undefined ) material.sheen = json.sheen; + if ( json.sheenColor !== undefined ) material.sheenColor = new Color().setHex( json.sheenColor ); + if ( json.sheenRoughness !== undefined ) material.sheenRoughness = json.sheenRoughness; + if ( json.emissive !== undefined && material.emissive !== undefined ) material.emissive.setHex( json.emissive ); + if ( json.specular !== undefined && material.specular !== undefined ) material.specular.setHex( json.specular ); + if ( json.specularIntensity !== undefined ) material.specularIntensity = json.specularIntensity; + if ( json.specularColor !== undefined && material.specularColor !== undefined ) material.specularColor.setHex( json.specularColor ); + if ( json.shininess !== undefined ) material.shininess = json.shininess; + if ( json.clearcoat !== undefined ) material.clearcoat = json.clearcoat; + if ( json.clearcoatRoughness !== undefined ) material.clearcoatRoughness = json.clearcoatRoughness; + if ( json.dispersion !== undefined ) material.dispersion = json.dispersion; + if ( json.iridescence !== undefined ) material.iridescence = json.iridescence; + if ( json.iridescenceIOR !== undefined ) material.iridescenceIOR = json.iridescenceIOR; + if ( json.iridescenceThicknessRange !== undefined ) material.iridescenceThicknessRange = json.iridescenceThicknessRange; + if ( json.transmission !== undefined ) material.transmission = json.transmission; + if ( json.thickness !== undefined ) material.thickness = json.thickness; + if ( json.attenuationDistance !== undefined ) material.attenuationDistance = json.attenuationDistance; + if ( json.attenuationColor !== undefined && material.attenuationColor !== undefined ) material.attenuationColor.setHex( json.attenuationColor ); + if ( json.anisotropy !== undefined ) material.anisotropy = json.anisotropy; + if ( json.anisotropyRotation !== undefined ) material.anisotropyRotation = json.anisotropyRotation; + if ( json.fog !== undefined ) material.fog = json.fog; + if ( json.flatShading !== undefined ) material.flatShading = json.flatShading; + if ( json.blending !== undefined ) material.blending = json.blending; + if ( json.combine !== undefined ) material.combine = json.combine; + if ( json.side !== undefined ) material.side = json.side; + if ( json.shadowSide !== undefined ) material.shadowSide = json.shadowSide; + if ( json.opacity !== undefined ) material.opacity = json.opacity; + if ( json.transparent !== undefined ) material.transparent = json.transparent; + if ( json.alphaTest !== undefined ) material.alphaTest = json.alphaTest; + if ( json.alphaHash !== undefined ) material.alphaHash = json.alphaHash; + if ( json.depthFunc !== undefined ) material.depthFunc = json.depthFunc; + if ( json.depthTest !== undefined ) material.depthTest = json.depthTest; + if ( json.depthWrite !== undefined ) material.depthWrite = json.depthWrite; + if ( json.colorWrite !== undefined ) material.colorWrite = json.colorWrite; + if ( json.blendSrc !== undefined ) material.blendSrc = json.blendSrc; + if ( json.blendDst !== undefined ) material.blendDst = json.blendDst; + if ( json.blendEquation !== undefined ) material.blendEquation = json.blendEquation; + if ( json.blendSrcAlpha !== undefined ) material.blendSrcAlpha = json.blendSrcAlpha; + if ( json.blendDstAlpha !== undefined ) material.blendDstAlpha = json.blendDstAlpha; + if ( json.blendEquationAlpha !== undefined ) material.blendEquationAlpha = json.blendEquationAlpha; + if ( json.blendColor !== undefined && material.blendColor !== undefined ) material.blendColor.setHex( json.blendColor ); + if ( json.blendAlpha !== undefined ) material.blendAlpha = json.blendAlpha; + if ( json.stencilWriteMask !== undefined ) material.stencilWriteMask = json.stencilWriteMask; + if ( json.stencilFunc !== undefined ) material.stencilFunc = json.stencilFunc; + if ( json.stencilRef !== undefined ) material.stencilRef = json.stencilRef; + if ( json.stencilFuncMask !== undefined ) material.stencilFuncMask = json.stencilFuncMask; + if ( json.stencilFail !== undefined ) material.stencilFail = json.stencilFail; + if ( json.stencilZFail !== undefined ) material.stencilZFail = json.stencilZFail; + if ( json.stencilZPass !== undefined ) material.stencilZPass = json.stencilZPass; + if ( json.stencilWrite !== undefined ) material.stencilWrite = json.stencilWrite; + + if ( json.wireframe !== undefined ) material.wireframe = json.wireframe; + if ( json.wireframeLinewidth !== undefined ) material.wireframeLinewidth = json.wireframeLinewidth; + if ( json.wireframeLinecap !== undefined ) material.wireframeLinecap = json.wireframeLinecap; + if ( json.wireframeLinejoin !== undefined ) material.wireframeLinejoin = json.wireframeLinejoin; + + if ( json.rotation !== undefined ) material.rotation = json.rotation; + + if ( json.linewidth !== undefined ) material.linewidth = json.linewidth; + if ( json.dashSize !== undefined ) material.dashSize = json.dashSize; + if ( json.gapSize !== undefined ) material.gapSize = json.gapSize; + if ( json.scale !== undefined ) material.scale = json.scale; + + if ( json.polygonOffset !== undefined ) material.polygonOffset = json.polygonOffset; + if ( json.polygonOffsetFactor !== undefined ) material.polygonOffsetFactor = json.polygonOffsetFactor; + if ( json.polygonOffsetUnits !== undefined ) material.polygonOffsetUnits = json.polygonOffsetUnits; + + if ( json.dithering !== undefined ) material.dithering = json.dithering; + + if ( json.alphaToCoverage !== undefined ) material.alphaToCoverage = json.alphaToCoverage; + if ( json.premultipliedAlpha !== undefined ) material.premultipliedAlpha = json.premultipliedAlpha; + if ( json.forceSinglePass !== undefined ) material.forceSinglePass = json.forceSinglePass; + + if ( json.visible !== undefined ) material.visible = json.visible; + + if ( json.toneMapped !== undefined ) material.toneMapped = json.toneMapped; + + if ( json.userData !== undefined ) material.userData = json.userData; + + if ( json.vertexColors !== undefined ) { + + if ( typeof json.vertexColors === 'number' ) { + + material.vertexColors = ( json.vertexColors > 0 ) ? true : false; + + } else { + + material.vertexColors = json.vertexColors; + + } + + } + + // Shader Material + + if ( json.uniforms !== undefined ) { + + for ( const name in json.uniforms ) { + + const uniform = json.uniforms[ name ]; + + material.uniforms[ name ] = {}; + + switch ( uniform.type ) { + + case 't': + material.uniforms[ name ].value = getTexture( uniform.value ); + break; + + case 'c': + material.uniforms[ name ].value = new Color().setHex( uniform.value ); + break; + + case 'v2': + material.uniforms[ name ].value = new Vector2().fromArray( uniform.value ); + break; + + case 'v3': + material.uniforms[ name ].value = new Vector3().fromArray( uniform.value ); + break; + + case 'v4': + material.uniforms[ name ].value = new Vector4().fromArray( uniform.value ); + break; + + case 'm3': + material.uniforms[ name ].value = new Matrix3().fromArray( uniform.value ); + break; + + case 'm4': + material.uniforms[ name ].value = new Matrix4().fromArray( uniform.value ); + break; + + default: + material.uniforms[ name ].value = uniform.value; + + } + + } + + } + + if ( json.defines !== undefined ) material.defines = json.defines; + if ( json.vertexShader !== undefined ) material.vertexShader = json.vertexShader; + if ( json.fragmentShader !== undefined ) material.fragmentShader = json.fragmentShader; + if ( json.glslVersion !== undefined ) material.glslVersion = json.glslVersion; + + if ( json.extensions !== undefined ) { + + for ( const key in json.extensions ) { + + material.extensions[ key ] = json.extensions[ key ]; + + } + + } + + if ( json.lights !== undefined ) material.lights = json.lights; + if ( json.clipping !== undefined ) material.clipping = json.clipping; + + // for PointsMaterial + + if ( json.size !== undefined ) material.size = json.size; + if ( json.sizeAttenuation !== undefined ) material.sizeAttenuation = json.sizeAttenuation; + + // maps + + if ( json.map !== undefined ) material.map = getTexture( json.map ); + if ( json.matcap !== undefined ) material.matcap = getTexture( json.matcap ); + + if ( json.alphaMap !== undefined ) material.alphaMap = getTexture( json.alphaMap ); + + if ( json.bumpMap !== undefined ) material.bumpMap = getTexture( json.bumpMap ); + if ( json.bumpScale !== undefined ) material.bumpScale = json.bumpScale; + + if ( json.normalMap !== undefined ) material.normalMap = getTexture( json.normalMap ); + if ( json.normalMapType !== undefined ) material.normalMapType = json.normalMapType; + if ( json.normalScale !== undefined ) { + + let normalScale = json.normalScale; + + if ( Array.isArray( normalScale ) === false ) { + + // Blender exporter used to export a scalar. See #7459 + + normalScale = [ normalScale, normalScale ]; + + } + + material.normalScale = new Vector2().fromArray( normalScale ); + + } + + if ( json.displacementMap !== undefined ) material.displacementMap = getTexture( json.displacementMap ); + if ( json.displacementScale !== undefined ) material.displacementScale = json.displacementScale; + if ( json.displacementBias !== undefined ) material.displacementBias = json.displacementBias; + + if ( json.roughnessMap !== undefined ) material.roughnessMap = getTexture( json.roughnessMap ); + if ( json.metalnessMap !== undefined ) material.metalnessMap = getTexture( json.metalnessMap ); + + if ( json.emissiveMap !== undefined ) material.emissiveMap = getTexture( json.emissiveMap ); + if ( json.emissiveIntensity !== undefined ) material.emissiveIntensity = json.emissiveIntensity; + + if ( json.specularMap !== undefined ) material.specularMap = getTexture( json.specularMap ); + if ( json.specularIntensityMap !== undefined ) material.specularIntensityMap = getTexture( json.specularIntensityMap ); + if ( json.specularColorMap !== undefined ) material.specularColorMap = getTexture( json.specularColorMap ); + + if ( json.envMap !== undefined ) material.envMap = getTexture( json.envMap ); + if ( json.envMapRotation !== undefined ) material.envMapRotation.fromArray( json.envMapRotation ); + if ( json.envMapIntensity !== undefined ) material.envMapIntensity = json.envMapIntensity; + + if ( json.reflectivity !== undefined ) material.reflectivity = json.reflectivity; + if ( json.refractionRatio !== undefined ) material.refractionRatio = json.refractionRatio; + + if ( json.lightMap !== undefined ) material.lightMap = getTexture( json.lightMap ); + if ( json.lightMapIntensity !== undefined ) material.lightMapIntensity = json.lightMapIntensity; + + if ( json.aoMap !== undefined ) material.aoMap = getTexture( json.aoMap ); + if ( json.aoMapIntensity !== undefined ) material.aoMapIntensity = json.aoMapIntensity; + + if ( json.gradientMap !== undefined ) material.gradientMap = getTexture( json.gradientMap ); + + if ( json.clearcoatMap !== undefined ) material.clearcoatMap = getTexture( json.clearcoatMap ); + if ( json.clearcoatRoughnessMap !== undefined ) material.clearcoatRoughnessMap = getTexture( json.clearcoatRoughnessMap ); + if ( json.clearcoatNormalMap !== undefined ) material.clearcoatNormalMap = getTexture( json.clearcoatNormalMap ); + if ( json.clearcoatNormalScale !== undefined ) material.clearcoatNormalScale = new Vector2().fromArray( json.clearcoatNormalScale ); + + if ( json.iridescenceMap !== undefined ) material.iridescenceMap = getTexture( json.iridescenceMap ); + if ( json.iridescenceThicknessMap !== undefined ) material.iridescenceThicknessMap = getTexture( json.iridescenceThicknessMap ); + + if ( json.transmissionMap !== undefined ) material.transmissionMap = getTexture( json.transmissionMap ); + if ( json.thicknessMap !== undefined ) material.thicknessMap = getTexture( json.thicknessMap ); + + if ( json.anisotropyMap !== undefined ) material.anisotropyMap = getTexture( json.anisotropyMap ); + + if ( json.sheenColorMap !== undefined ) material.sheenColorMap = getTexture( json.sheenColorMap ); + if ( json.sheenRoughnessMap !== undefined ) material.sheenRoughnessMap = getTexture( json.sheenRoughnessMap ); + + return material; + + } + + setTextures( value ) { + + this.textures = value; + return this; + + } + + static createMaterialFromType( type ) { + + const materialLib = { + ShadowMaterial, + SpriteMaterial, + RawShaderMaterial, + ShaderMaterial, + PointsMaterial, + MeshPhysicalMaterial, + MeshStandardMaterial, + MeshPhongMaterial, + MeshToonMaterial, + MeshNormalMaterial, + MeshLambertMaterial, + MeshDepthMaterial, + MeshDistanceMaterial, + MeshBasicMaterial, + MeshMatcapMaterial, + LineDashedMaterial, + LineBasicMaterial, + Material + }; + + return new materialLib[ type ](); + + } + +} + +class LoaderUtils { + + static decodeText( array ) { + + if ( typeof TextDecoder !== 'undefined' ) { + + return new TextDecoder().decode( array ); + + } + + // Avoid the String.fromCharCode.apply(null, array) shortcut, which + // throws a "maximum call stack size exceeded" error for large arrays. + + let s = ''; + + for ( let i = 0, il = array.length; i < il; i ++ ) { + + // Implicitly assumes little-endian. + s += String.fromCharCode( array[ i ] ); + + } + + try { + + // merges multi-byte utf-8 characters. + + return decodeURIComponent( escape( s ) ); + + } catch ( e ) { // see #16358 + + return s; + + } + + } + + static extractUrlBase( url ) { + + const index = url.lastIndexOf( '/' ); + + if ( index === - 1 ) return './'; + + return url.slice( 0, index + 1 ); + + } + + static resolveURL( url, path ) { + + // Invalid URL + if ( typeof url !== 'string' || url === '' ) return ''; + + // Host Relative URL + if ( /^https?:\/\//i.test( path ) && /^\//.test( url ) ) { + + path = path.replace( /(^https?:\/\/[^\/]+).*/i, '$1' ); + + } + + // Absolute URL http://,https://,// + if ( /^(https?:)?\/\//i.test( url ) ) return url; + + // Data URI + if ( /^data:.*,.*$/i.test( url ) ) return url; + + // Blob URL + if ( /^blob:.*$/i.test( url ) ) return url; + + // Relative URL + return path + url; + + } + +} + +class InstancedBufferGeometry extends BufferGeometry { + + constructor() { + + super(); + + this.isInstancedBufferGeometry = true; + + this.type = 'InstancedBufferGeometry'; + this.instanceCount = Infinity; + + } + + copy( source ) { + + super.copy( source ); + + this.instanceCount = source.instanceCount; + + return this; + + } + + toJSON() { + + const data = super.toJSON(); + + data.instanceCount = this.instanceCount; + + data.isInstancedBufferGeometry = true; + + return data; + + } + +} + +class BufferGeometryLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( JSON.parse( text ) ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( json ) { + + const interleavedBufferMap = {}; + const arrayBufferMap = {}; + + function getInterleavedBuffer( json, uuid ) { + + if ( interleavedBufferMap[ uuid ] !== undefined ) return interleavedBufferMap[ uuid ]; + + const interleavedBuffers = json.interleavedBuffers; + const interleavedBuffer = interleavedBuffers[ uuid ]; + + const buffer = getArrayBuffer( json, interleavedBuffer.buffer ); + + const array = getTypedArray( interleavedBuffer.type, buffer ); + const ib = new InterleavedBuffer( array, interleavedBuffer.stride ); + ib.uuid = interleavedBuffer.uuid; + + interleavedBufferMap[ uuid ] = ib; + + return ib; + + } + + function getArrayBuffer( json, uuid ) { + + if ( arrayBufferMap[ uuid ] !== undefined ) return arrayBufferMap[ uuid ]; + + const arrayBuffers = json.arrayBuffers; + const arrayBuffer = arrayBuffers[ uuid ]; + + const ab = new Uint32Array( arrayBuffer ).buffer; + + arrayBufferMap[ uuid ] = ab; + + return ab; + + } + + const geometry = json.isInstancedBufferGeometry ? new InstancedBufferGeometry() : new BufferGeometry(); + + const index = json.data.index; + + if ( index !== undefined ) { + + const typedArray = getTypedArray( index.type, index.array ); + geometry.setIndex( new BufferAttribute( typedArray, 1 ) ); + + } + + const attributes = json.data.attributes; + + for ( const key in attributes ) { + + const attribute = attributes[ key ]; + let bufferAttribute; + + if ( attribute.isInterleavedBufferAttribute ) { + + const interleavedBuffer = getInterleavedBuffer( json.data, attribute.data ); + bufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized ); + + } else { + + const typedArray = getTypedArray( attribute.type, attribute.array ); + const bufferAttributeConstr = attribute.isInstancedBufferAttribute ? InstancedBufferAttribute : BufferAttribute; + bufferAttribute = new bufferAttributeConstr( typedArray, attribute.itemSize, attribute.normalized ); + + } + + if ( attribute.name !== undefined ) bufferAttribute.name = attribute.name; + if ( attribute.usage !== undefined ) bufferAttribute.setUsage( attribute.usage ); + + geometry.setAttribute( key, bufferAttribute ); + + } + + const morphAttributes = json.data.morphAttributes; + + if ( morphAttributes ) { + + for ( const key in morphAttributes ) { + + const attributeArray = morphAttributes[ key ]; + + const array = []; + + for ( let i = 0, il = attributeArray.length; i < il; i ++ ) { + + const attribute = attributeArray[ i ]; + let bufferAttribute; + + if ( attribute.isInterleavedBufferAttribute ) { + + const interleavedBuffer = getInterleavedBuffer( json.data, attribute.data ); + bufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized ); + + } else { + + const typedArray = getTypedArray( attribute.type, attribute.array ); + bufferAttribute = new BufferAttribute( typedArray, attribute.itemSize, attribute.normalized ); + + } + + if ( attribute.name !== undefined ) bufferAttribute.name = attribute.name; + array.push( bufferAttribute ); + + } + + geometry.morphAttributes[ key ] = array; + + } + + } + + const morphTargetsRelative = json.data.morphTargetsRelative; + + if ( morphTargetsRelative ) { + + geometry.morphTargetsRelative = true; + + } + + const groups = json.data.groups || json.data.drawcalls || json.data.offsets; + + if ( groups !== undefined ) { + + for ( let i = 0, n = groups.length; i !== n; ++ i ) { + + const group = groups[ i ]; + + geometry.addGroup( group.start, group.count, group.materialIndex ); + + } + + } + + const boundingSphere = json.data.boundingSphere; + + if ( boundingSphere !== undefined ) { + + const center = new Vector3(); + + if ( boundingSphere.center !== undefined ) { + + center.fromArray( boundingSphere.center ); + + } + + geometry.boundingSphere = new Sphere( center, boundingSphere.radius ); + + } + + if ( json.name ) geometry.name = json.name; + if ( json.userData ) geometry.userData = json.userData; + + return geometry; + + } + +} + +class ObjectLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path; + this.resourcePath = this.resourcePath || path; + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + loader.load( url, function ( text ) { + + let json = null; + + try { + + json = JSON.parse( text ); + + } catch ( error ) { + + if ( onError !== undefined ) onError( error ); + + console.error( 'THREE:ObjectLoader: Can\'t parse ' + url + '.', error.message ); + + return; + + } + + const metadata = json.metadata; + + if ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) { + + if ( onError !== undefined ) onError( new Error( 'THREE.ObjectLoader: Can\'t load ' + url ) ); + + console.error( 'THREE.ObjectLoader: Can\'t load ' + url ); + return; + + } + + scope.parse( json, onLoad ); + + }, onProgress, onError ); + + } + + async loadAsync( url, onProgress ) { + + const scope = this; + + const path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path; + this.resourcePath = this.resourcePath || path; + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + + const text = await loader.loadAsync( url, onProgress ); + + const json = JSON.parse( text ); + + const metadata = json.metadata; + + if ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) { + + throw new Error( 'THREE.ObjectLoader: Can\'t load ' + url ); + + } + + return await scope.parseAsync( json ); + + } + + parse( json, onLoad ) { + + const animations = this.parseAnimations( json.animations ); + const shapes = this.parseShapes( json.shapes ); + const geometries = this.parseGeometries( json.geometries, shapes ); + + const images = this.parseImages( json.images, function () { + + if ( onLoad !== undefined ) onLoad( object ); + + } ); + + const textures = this.parseTextures( json.textures, images ); + const materials = this.parseMaterials( json.materials, textures ); + + const object = this.parseObject( json.object, geometries, materials, textures, animations ); + const skeletons = this.parseSkeletons( json.skeletons, object ); + + this.bindSkeletons( object, skeletons ); + + // + + if ( onLoad !== undefined ) { + + let hasImages = false; + + for ( const uuid in images ) { + + if ( images[ uuid ].data instanceof HTMLImageElement ) { + + hasImages = true; + break; + + } + + } + + if ( hasImages === false ) onLoad( object ); + + } + + return object; + + } + + async parseAsync( json ) { + + const animations = this.parseAnimations( json.animations ); + const shapes = this.parseShapes( json.shapes ); + const geometries = this.parseGeometries( json.geometries, shapes ); + + const images = await this.parseImagesAsync( json.images ); + + const textures = this.parseTextures( json.textures, images ); + const materials = this.parseMaterials( json.materials, textures ); + + const object = this.parseObject( json.object, geometries, materials, textures, animations ); + const skeletons = this.parseSkeletons( json.skeletons, object ); + + this.bindSkeletons( object, skeletons ); + + return object; + + } + + parseShapes( json ) { + + const shapes = {}; + + if ( json !== undefined ) { + + for ( let i = 0, l = json.length; i < l; i ++ ) { + + const shape = new Shape().fromJSON( json[ i ] ); + + shapes[ shape.uuid ] = shape; + + } + + } + + return shapes; + + } + + parseSkeletons( json, object ) { + + const skeletons = {}; + const bones = {}; + + // generate bone lookup table + + object.traverse( function ( child ) { + + if ( child.isBone ) bones[ child.uuid ] = child; + + } ); + + // create skeletons + + if ( json !== undefined ) { + + for ( let i = 0, l = json.length; i < l; i ++ ) { + + const skeleton = new Skeleton().fromJSON( json[ i ], bones ); + + skeletons[ skeleton.uuid ] = skeleton; + + } + + } + + return skeletons; + + } + + parseGeometries( json, shapes ) { + + const geometries = {}; + + if ( json !== undefined ) { + + const bufferGeometryLoader = new BufferGeometryLoader(); + + for ( let i = 0, l = json.length; i < l; i ++ ) { + + let geometry; + const data = json[ i ]; + + switch ( data.type ) { + + case 'BufferGeometry': + case 'InstancedBufferGeometry': + + geometry = bufferGeometryLoader.parse( data ); + break; + + default: + + if ( data.type in Geometries ) { + + geometry = Geometries[ data.type ].fromJSON( data, shapes ); + + } else { + + console.warn( `THREE.ObjectLoader: Unsupported geometry type "${ data.type }"` ); + + } + + } + + geometry.uuid = data.uuid; + + if ( data.name !== undefined ) geometry.name = data.name; + if ( data.userData !== undefined ) geometry.userData = data.userData; + + geometries[ data.uuid ] = geometry; + + } + + } + + return geometries; + + } + + parseMaterials( json, textures ) { + + const cache = {}; // MultiMaterial + const materials = {}; + + if ( json !== undefined ) { + + const loader = new MaterialLoader(); + loader.setTextures( textures ); + + for ( let i = 0, l = json.length; i < l; i ++ ) { + + const data = json[ i ]; + + if ( cache[ data.uuid ] === undefined ) { + + cache[ data.uuid ] = loader.parse( data ); + + } + + materials[ data.uuid ] = cache[ data.uuid ]; + + } + + } + + return materials; + + } + + parseAnimations( json ) { + + const animations = {}; + + if ( json !== undefined ) { + + for ( let i = 0; i < json.length; i ++ ) { + + const data = json[ i ]; + + const clip = AnimationClip.parse( data ); + + animations[ clip.uuid ] = clip; + + } + + } + + return animations; + + } + + parseImages( json, onLoad ) { + + const scope = this; + const images = {}; + + let loader; + + function loadImage( url ) { + + scope.manager.itemStart( url ); + + return loader.load( url, function () { + + scope.manager.itemEnd( url ); + + }, undefined, function () { + + scope.manager.itemError( url ); + scope.manager.itemEnd( url ); + + } ); + + } + + function deserializeImage( image ) { + + if ( typeof image === 'string' ) { + + const url = image; + + const path = /^(\/\/)|([a-z]+:(\/\/)?)/i.test( url ) ? url : scope.resourcePath + url; + + return loadImage( path ); + + } else { + + if ( image.data ) { + + return { + data: getTypedArray( image.type, image.data ), + width: image.width, + height: image.height + }; + + } else { + + return null; + + } + + } + + } + + if ( json !== undefined && json.length > 0 ) { + + const manager = new LoadingManager( onLoad ); + + loader = new ImageLoader( manager ); + loader.setCrossOrigin( this.crossOrigin ); + + for ( let i = 0, il = json.length; i < il; i ++ ) { + + const image = json[ i ]; + const url = image.url; + + if ( Array.isArray( url ) ) { + + // load array of images e.g CubeTexture + + const imageArray = []; + + for ( let j = 0, jl = url.length; j < jl; j ++ ) { + + const currentUrl = url[ j ]; + + const deserializedImage = deserializeImage( currentUrl ); + + if ( deserializedImage !== null ) { + + if ( deserializedImage instanceof HTMLImageElement ) { + + imageArray.push( deserializedImage ); + + } else { + + // special case: handle array of data textures for cube textures + + imageArray.push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) ); + + } + + } + + } + + images[ image.uuid ] = new Source( imageArray ); + + } else { + + // load single image + + const deserializedImage = deserializeImage( image.url ); + images[ image.uuid ] = new Source( deserializedImage ); + + + } + + } + + } + + return images; + + } + + async parseImagesAsync( json ) { + + const scope = this; + const images = {}; + + let loader; + + async function deserializeImage( image ) { + + if ( typeof image === 'string' ) { + + const url = image; + + const path = /^(\/\/)|([a-z]+:(\/\/)?)/i.test( url ) ? url : scope.resourcePath + url; + + return await loader.loadAsync( path ); + + } else { + + if ( image.data ) { + + return { + data: getTypedArray( image.type, image.data ), + width: image.width, + height: image.height + }; + + } else { + + return null; + + } + + } + + } + + if ( json !== undefined && json.length > 0 ) { + + loader = new ImageLoader( this.manager ); + loader.setCrossOrigin( this.crossOrigin ); + + for ( let i = 0, il = json.length; i < il; i ++ ) { + + const image = json[ i ]; + const url = image.url; + + if ( Array.isArray( url ) ) { + + // load array of images e.g CubeTexture + + const imageArray = []; + + for ( let j = 0, jl = url.length; j < jl; j ++ ) { + + const currentUrl = url[ j ]; + + const deserializedImage = await deserializeImage( currentUrl ); + + if ( deserializedImage !== null ) { + + if ( deserializedImage instanceof HTMLImageElement ) { + + imageArray.push( deserializedImage ); + + } else { + + // special case: handle array of data textures for cube textures + + imageArray.push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) ); + + } + + } + + } + + images[ image.uuid ] = new Source( imageArray ); + + } else { + + // load single image + + const deserializedImage = await deserializeImage( image.url ); + images[ image.uuid ] = new Source( deserializedImage ); + + } + + } + + } + + return images; + + } + + parseTextures( json, images ) { + + function parseConstant( value, type ) { + + if ( typeof value === 'number' ) return value; + + console.warn( 'THREE.ObjectLoader.parseTexture: Constant should be in numeric form.', value ); + + return type[ value ]; + + } + + const textures = {}; + + if ( json !== undefined ) { + + for ( let i = 0, l = json.length; i < l; i ++ ) { + + const data = json[ i ]; + + if ( data.image === undefined ) { + + console.warn( 'THREE.ObjectLoader: No "image" specified for', data.uuid ); + + } + + if ( images[ data.image ] === undefined ) { + + console.warn( 'THREE.ObjectLoader: Undefined image', data.image ); + + } + + const source = images[ data.image ]; + const image = source.data; + + let texture; + + if ( Array.isArray( image ) ) { + + texture = new CubeTexture(); + + if ( image.length === 6 ) texture.needsUpdate = true; + + } else { + + if ( image && image.data ) { + + texture = new DataTexture(); + + } else { + + texture = new Texture(); + + } + + if ( image ) texture.needsUpdate = true; // textures can have undefined image data + + } + + texture.source = source; + + texture.uuid = data.uuid; + + if ( data.name !== undefined ) texture.name = data.name; + + if ( data.mapping !== undefined ) texture.mapping = parseConstant( data.mapping, TEXTURE_MAPPING ); + if ( data.channel !== undefined ) texture.channel = data.channel; + + if ( data.offset !== undefined ) texture.offset.fromArray( data.offset ); + if ( data.repeat !== undefined ) texture.repeat.fromArray( data.repeat ); + if ( data.center !== undefined ) texture.center.fromArray( data.center ); + if ( data.rotation !== undefined ) texture.rotation = data.rotation; + + if ( data.wrap !== undefined ) { + + texture.wrapS = parseConstant( data.wrap[ 0 ], TEXTURE_WRAPPING ); + texture.wrapT = parseConstant( data.wrap[ 1 ], TEXTURE_WRAPPING ); + + } + + if ( data.format !== undefined ) texture.format = data.format; + if ( data.internalFormat !== undefined ) texture.internalFormat = data.internalFormat; + if ( data.type !== undefined ) texture.type = data.type; + if ( data.colorSpace !== undefined ) texture.colorSpace = data.colorSpace; + + if ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter, TEXTURE_FILTER ); + if ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter, TEXTURE_FILTER ); + if ( data.anisotropy !== undefined ) texture.anisotropy = data.anisotropy; + + if ( data.flipY !== undefined ) texture.flipY = data.flipY; + + if ( data.generateMipmaps !== undefined ) texture.generateMipmaps = data.generateMipmaps; + if ( data.premultiplyAlpha !== undefined ) texture.premultiplyAlpha = data.premultiplyAlpha; + if ( data.unpackAlignment !== undefined ) texture.unpackAlignment = data.unpackAlignment; + if ( data.compareFunction !== undefined ) texture.compareFunction = data.compareFunction; + + if ( data.userData !== undefined ) texture.userData = data.userData; + + textures[ data.uuid ] = texture; + + } + + } + + return textures; + + } + + parseObject( data, geometries, materials, textures, animations ) { + + let object; + + function getGeometry( name ) { + + if ( geometries[ name ] === undefined ) { + + console.warn( 'THREE.ObjectLoader: Undefined geometry', name ); + + } + + return geometries[ name ]; + + } + + function getMaterial( name ) { + + if ( name === undefined ) return undefined; + + if ( Array.isArray( name ) ) { + + const array = []; + + for ( let i = 0, l = name.length; i < l; i ++ ) { + + const uuid = name[ i ]; + + if ( materials[ uuid ] === undefined ) { + + console.warn( 'THREE.ObjectLoader: Undefined material', uuid ); + + } + + array.push( materials[ uuid ] ); + + } + + return array; + + } + + if ( materials[ name ] === undefined ) { + + console.warn( 'THREE.ObjectLoader: Undefined material', name ); + + } + + return materials[ name ]; + + } + + function getTexture( uuid ) { + + if ( textures[ uuid ] === undefined ) { + + console.warn( 'THREE.ObjectLoader: Undefined texture', uuid ); + + } + + return textures[ uuid ]; + + } + + let geometry, material; + + switch ( data.type ) { + + case 'Scene': + + object = new Scene(); + + if ( data.background !== undefined ) { + + if ( Number.isInteger( data.background ) ) { + + object.background = new Color( data.background ); + + } else { + + object.background = getTexture( data.background ); + + } + + } + + if ( data.environment !== undefined ) { + + object.environment = getTexture( data.environment ); + + } + + if ( data.fog !== undefined ) { + + if ( data.fog.type === 'Fog' ) { + + object.fog = new Fog( data.fog.color, data.fog.near, data.fog.far ); + + } else if ( data.fog.type === 'FogExp2' ) { + + object.fog = new FogExp2( data.fog.color, data.fog.density ); + + } + + if ( data.fog.name !== '' ) { + + object.fog.name = data.fog.name; + + } + + } + + if ( data.backgroundBlurriness !== undefined ) object.backgroundBlurriness = data.backgroundBlurriness; + if ( data.backgroundIntensity !== undefined ) object.backgroundIntensity = data.backgroundIntensity; + if ( data.backgroundRotation !== undefined ) object.backgroundRotation.fromArray( data.backgroundRotation ); + + if ( data.environmentIntensity !== undefined ) object.environmentIntensity = data.environmentIntensity; + if ( data.environmentRotation !== undefined ) object.environmentRotation.fromArray( data.environmentRotation ); + + break; + + case 'PerspectiveCamera': + + object = new PerspectiveCamera( data.fov, data.aspect, data.near, data.far ); + + if ( data.focus !== undefined ) object.focus = data.focus; + if ( data.zoom !== undefined ) object.zoom = data.zoom; + if ( data.filmGauge !== undefined ) object.filmGauge = data.filmGauge; + if ( data.filmOffset !== undefined ) object.filmOffset = data.filmOffset; + if ( data.view !== undefined ) object.view = Object.assign( {}, data.view ); + + break; + + case 'OrthographicCamera': + + object = new OrthographicCamera( data.left, data.right, data.top, data.bottom, data.near, data.far ); + + if ( data.zoom !== undefined ) object.zoom = data.zoom; + if ( data.view !== undefined ) object.view = Object.assign( {}, data.view ); + + break; + + case 'AmbientLight': + + object = new AmbientLight( data.color, data.intensity ); + + break; + + case 'DirectionalLight': + + object = new DirectionalLight( data.color, data.intensity ); + + break; + + case 'PointLight': + + object = new PointLight( data.color, data.intensity, data.distance, data.decay ); + + break; + + case 'RectAreaLight': + + object = new RectAreaLight( data.color, data.intensity, data.width, data.height ); + + break; + + case 'SpotLight': + + object = new SpotLight( data.color, data.intensity, data.distance, data.angle, data.penumbra, data.decay ); + + break; + + case 'HemisphereLight': + + object = new HemisphereLight( data.color, data.groundColor, data.intensity ); + + break; + + case 'LightProbe': + + object = new LightProbe().fromJSON( data ); + + break; + + case 'SkinnedMesh': + + geometry = getGeometry( data.geometry ); + material = getMaterial( data.material ); + + object = new SkinnedMesh( geometry, material ); + + if ( data.bindMode !== undefined ) object.bindMode = data.bindMode; + if ( data.bindMatrix !== undefined ) object.bindMatrix.fromArray( data.bindMatrix ); + if ( data.skeleton !== undefined ) object.skeleton = data.skeleton; + + break; + + case 'Mesh': + + geometry = getGeometry( data.geometry ); + material = getMaterial( data.material ); + + object = new Mesh( geometry, material ); + + break; + + case 'InstancedMesh': + + geometry = getGeometry( data.geometry ); + material = getMaterial( data.material ); + const count = data.count; + const instanceMatrix = data.instanceMatrix; + const instanceColor = data.instanceColor; + + object = new InstancedMesh( geometry, material, count ); + object.instanceMatrix = new InstancedBufferAttribute( new Float32Array( instanceMatrix.array ), 16 ); + if ( instanceColor !== undefined ) object.instanceColor = new InstancedBufferAttribute( new Float32Array( instanceColor.array ), instanceColor.itemSize ); + + break; + + case 'BatchedMesh': + + geometry = getGeometry( data.geometry ); + material = getMaterial( data.material ); + + object = new BatchedMesh( data.maxGeometryCount, data.maxVertexCount, data.maxIndexCount, material ); + object.geometry = geometry; + object.perObjectFrustumCulled = data.perObjectFrustumCulled; + object.sortObjects = data.sortObjects; + + object._drawRanges = data.drawRanges; + object._reservedRanges = data.reservedRanges; + + object._visibility = data.visibility; + object._active = data.active; + object._bounds = data.bounds.map( bound => { + + const box = new Box3(); + box.min.fromArray( bound.boxMin ); + box.max.fromArray( bound.boxMax ); + + const sphere = new Sphere(); + sphere.radius = bound.sphereRadius; + sphere.center.fromArray( bound.sphereCenter ); + + return { + boxInitialized: bound.boxInitialized, + box: box, + + sphereInitialized: bound.sphereInitialized, + sphere: sphere + }; + + } ); + + object._maxGeometryCount = data.maxGeometryCount; + object._maxVertexCount = data.maxVertexCount; + object._maxIndexCount = data.maxIndexCount; + + object._geometryInitialized = data.geometryInitialized; + object._geometryCount = data.geometryCount; + + object._matricesTexture = getTexture( data.matricesTexture.uuid ); + + break; + + case 'LOD': + + object = new LOD(); + + break; + + case 'Line': + + object = new Line( getGeometry( data.geometry ), getMaterial( data.material ) ); + + break; + + case 'LineLoop': + + object = new LineLoop( getGeometry( data.geometry ), getMaterial( data.material ) ); + + break; + + case 'LineSegments': + + object = new LineSegments( getGeometry( data.geometry ), getMaterial( data.material ) ); + + break; + + case 'PointCloud': + case 'Points': + + object = new Points( getGeometry( data.geometry ), getMaterial( data.material ) ); + + break; + + case 'Sprite': + + object = new Sprite( getMaterial( data.material ) ); + + break; + + case 'Group': + + object = new Group(); + + break; + + case 'Bone': + + object = new Bone(); + + break; + + default: + + object = new Object3D(); + + } + + object.uuid = data.uuid; + + if ( data.name !== undefined ) object.name = data.name; + + if ( data.matrix !== undefined ) { + + object.matrix.fromArray( data.matrix ); + + if ( data.matrixAutoUpdate !== undefined ) object.matrixAutoUpdate = data.matrixAutoUpdate; + if ( object.matrixAutoUpdate ) object.matrix.decompose( object.position, object.quaternion, object.scale ); + + } else { + + if ( data.position !== undefined ) object.position.fromArray( data.position ); + if ( data.rotation !== undefined ) object.rotation.fromArray( data.rotation ); + if ( data.quaternion !== undefined ) object.quaternion.fromArray( data.quaternion ); + if ( data.scale !== undefined ) object.scale.fromArray( data.scale ); + + } + + if ( data.up !== undefined ) object.up.fromArray( data.up ); + + if ( data.castShadow !== undefined ) object.castShadow = data.castShadow; + if ( data.receiveShadow !== undefined ) object.receiveShadow = data.receiveShadow; + + if ( data.shadow ) { + + if ( data.shadow.bias !== undefined ) object.shadow.bias = data.shadow.bias; + if ( data.shadow.normalBias !== undefined ) object.shadow.normalBias = data.shadow.normalBias; + if ( data.shadow.radius !== undefined ) object.shadow.radius = data.shadow.radius; + if ( data.shadow.mapSize !== undefined ) object.shadow.mapSize.fromArray( data.shadow.mapSize ); + if ( data.shadow.camera !== undefined ) object.shadow.camera = this.parseObject( data.shadow.camera ); + + } + + if ( data.visible !== undefined ) object.visible = data.visible; + if ( data.frustumCulled !== undefined ) object.frustumCulled = data.frustumCulled; + if ( data.renderOrder !== undefined ) object.renderOrder = data.renderOrder; + if ( data.userData !== undefined ) object.userData = data.userData; + if ( data.layers !== undefined ) object.layers.mask = data.layers; + + if ( data.children !== undefined ) { + + const children = data.children; + + for ( let i = 0; i < children.length; i ++ ) { + + object.add( this.parseObject( children[ i ], geometries, materials, textures, animations ) ); + + } + + } + + if ( data.animations !== undefined ) { + + const objectAnimations = data.animations; + + for ( let i = 0; i < objectAnimations.length; i ++ ) { + + const uuid = objectAnimations[ i ]; + + object.animations.push( animations[ uuid ] ); + + } + + } + + if ( data.type === 'LOD' ) { + + if ( data.autoUpdate !== undefined ) object.autoUpdate = data.autoUpdate; + + const levels = data.levels; + + for ( let l = 0; l < levels.length; l ++ ) { + + const level = levels[ l ]; + const child = object.getObjectByProperty( 'uuid', level.object ); + + if ( child !== undefined ) { + + object.addLevel( child, level.distance, level.hysteresis ); + + } + + } + + } + + return object; + + } + + bindSkeletons( object, skeletons ) { + + if ( Object.keys( skeletons ).length === 0 ) return; + + object.traverse( function ( child ) { + + if ( child.isSkinnedMesh === true && child.skeleton !== undefined ) { + + const skeleton = skeletons[ child.skeleton ]; + + if ( skeleton === undefined ) { + + console.warn( 'THREE.ObjectLoader: No skeleton found with UUID:', child.skeleton ); + + } else { + + child.bind( skeleton, child.bindMatrix ); + + } + + } + + } ); + + } + +} + +const TEXTURE_MAPPING = { + UVMapping: UVMapping, + CubeReflectionMapping: CubeReflectionMapping, + CubeRefractionMapping: CubeRefractionMapping, + EquirectangularReflectionMapping: EquirectangularReflectionMapping, + EquirectangularRefractionMapping: EquirectangularRefractionMapping, + CubeUVReflectionMapping: CubeUVReflectionMapping +}; + +const TEXTURE_WRAPPING = { + RepeatWrapping: RepeatWrapping, + ClampToEdgeWrapping: ClampToEdgeWrapping, + MirroredRepeatWrapping: MirroredRepeatWrapping +}; + +const TEXTURE_FILTER = { + NearestFilter: NearestFilter, + NearestMipmapNearestFilter: NearestMipmapNearestFilter, + NearestMipmapLinearFilter: NearestMipmapLinearFilter, + LinearFilter: LinearFilter, + LinearMipmapNearestFilter: LinearMipmapNearestFilter, + LinearMipmapLinearFilter: LinearMipmapLinearFilter +}; + +class ImageBitmapLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.isImageBitmapLoader = true; + + if ( typeof createImageBitmap === 'undefined' ) { + + console.warn( 'THREE.ImageBitmapLoader: createImageBitmap() not supported.' ); + + } + + if ( typeof fetch === 'undefined' ) { + + console.warn( 'THREE.ImageBitmapLoader: fetch() not supported.' ); + + } + + this.options = { premultiplyAlpha: 'none' }; + + } + + setOptions( options ) { + + this.options = options; + + return this; + + } + + load( url, onLoad, onProgress, onError ) { + + if ( url === undefined ) url = ''; + + if ( this.path !== undefined ) url = this.path + url; + + url = this.manager.resolveURL( url ); + + const scope = this; + + const cached = Cache.get( url ); + + if ( cached !== undefined ) { + + scope.manager.itemStart( url ); + + // If cached is a promise, wait for it to resolve + if ( cached.then ) { + + cached.then( imageBitmap => { + + if ( onLoad ) onLoad( imageBitmap ); + + scope.manager.itemEnd( url ); + + } ).catch( e => { + + if ( onError ) onError( e ); + + } ); + return; + + } + + // If cached is not a promise (i.e., it's already an imageBitmap) + setTimeout( function () { + + if ( onLoad ) onLoad( cached ); + + scope.manager.itemEnd( url ); + + }, 0 ); + + return cached; + + } + + const fetchOptions = {}; + fetchOptions.credentials = ( this.crossOrigin === 'anonymous' ) ? 'same-origin' : 'include'; + fetchOptions.headers = this.requestHeader; + + const promise = fetch( url, fetchOptions ).then( function ( res ) { + + return res.blob(); + + } ).then( function ( blob ) { + + return createImageBitmap( blob, Object.assign( scope.options, { colorSpaceConversion: 'none' } ) ); + + } ).then( function ( imageBitmap ) { + + Cache.add( url, imageBitmap ); + + if ( onLoad ) onLoad( imageBitmap ); + + scope.manager.itemEnd( url ); + + return imageBitmap; + + } ).catch( function ( e ) { + + if ( onError ) onError( e ); + + Cache.remove( url ); + + scope.manager.itemError( url ); + scope.manager.itemEnd( url ); + + } ); + + Cache.add( url, promise ); + scope.manager.itemStart( url ); + + } + +} + +let _context; + +class AudioContext { + + static getContext() { + + if ( _context === undefined ) { + + _context = new ( window.AudioContext || window.webkitAudioContext )(); + + } + + return _context; + + } + + static setContext( value ) { + + _context = value; + + } + +} + +class AudioLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( this.manager ); + loader.setResponseType( 'arraybuffer' ); + loader.setPath( this.path ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + loader.load( url, function ( buffer ) { + + try { + + // Create a copy of the buffer. The `decodeAudioData` method + // detaches the buffer when complete, preventing reuse. + const bufferCopy = buffer.slice( 0 ); + + const context = AudioContext.getContext(); + context.decodeAudioData( bufferCopy, function ( audioBuffer ) { + + onLoad( audioBuffer ); + + } ).catch( handleError ); + + } catch ( e ) { + + handleError( e ); + + } + + }, onProgress, onError ); + + function handleError( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + } + +} + +const _eyeRight = /*@__PURE__*/ new Matrix4(); +const _eyeLeft = /*@__PURE__*/ new Matrix4(); +const _projectionMatrix = /*@__PURE__*/ new Matrix4(); + +class StereoCamera { + + constructor() { + + this.type = 'StereoCamera'; + + this.aspect = 1; + + this.eyeSep = 0.064; + + this.cameraL = new PerspectiveCamera(); + this.cameraL.layers.enable( 1 ); + this.cameraL.matrixAutoUpdate = false; + + this.cameraR = new PerspectiveCamera(); + this.cameraR.layers.enable( 2 ); + this.cameraR.matrixAutoUpdate = false; + + this._cache = { + focus: null, + fov: null, + aspect: null, + near: null, + far: null, + zoom: null, + eyeSep: null + }; + + } + + update( camera ) { + + const cache = this._cache; + + const needsUpdate = cache.focus !== camera.focus || cache.fov !== camera.fov || + cache.aspect !== camera.aspect * this.aspect || cache.near !== camera.near || + cache.far !== camera.far || cache.zoom !== camera.zoom || cache.eyeSep !== this.eyeSep; + + if ( needsUpdate ) { + + cache.focus = camera.focus; + cache.fov = camera.fov; + cache.aspect = camera.aspect * this.aspect; + cache.near = camera.near; + cache.far = camera.far; + cache.zoom = camera.zoom; + cache.eyeSep = this.eyeSep; + + // Off-axis stereoscopic effect based on + // http://paulbourke.net/stereographics/stereorender/ + + _projectionMatrix.copy( camera.projectionMatrix ); + const eyeSepHalf = cache.eyeSep / 2; + const eyeSepOnProjection = eyeSepHalf * cache.near / cache.focus; + const ymax = ( cache.near * Math.tan( DEG2RAD * cache.fov * 0.5 ) ) / cache.zoom; + let xmin, xmax; + + // translate xOffset + + _eyeLeft.elements[ 12 ] = - eyeSepHalf; + _eyeRight.elements[ 12 ] = eyeSepHalf; + + // for left eye + + xmin = - ymax * cache.aspect + eyeSepOnProjection; + xmax = ymax * cache.aspect + eyeSepOnProjection; + + _projectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin ); + _projectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin ); + + this.cameraL.projectionMatrix.copy( _projectionMatrix ); + + // for right eye + + xmin = - ymax * cache.aspect - eyeSepOnProjection; + xmax = ymax * cache.aspect - eyeSepOnProjection; + + _projectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin ); + _projectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin ); + + this.cameraR.projectionMatrix.copy( _projectionMatrix ); + + } + + this.cameraL.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeLeft ); + this.cameraR.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeRight ); + + } + +} + +class Clock { + + constructor( autoStart = true ) { + + this.autoStart = autoStart; + + this.startTime = 0; + this.oldTime = 0; + this.elapsedTime = 0; + + this.running = false; + + } + + start() { + + this.startTime = now(); + + this.oldTime = this.startTime; + this.elapsedTime = 0; + this.running = true; + + } + + stop() { + + this.getElapsedTime(); + this.running = false; + this.autoStart = false; + + } + + getElapsedTime() { + + this.getDelta(); + return this.elapsedTime; + + } + + getDelta() { + + let diff = 0; + + if ( this.autoStart && ! this.running ) { + + this.start(); + return 0; + + } + + if ( this.running ) { + + const newTime = now(); + + diff = ( newTime - this.oldTime ) / 1000; + this.oldTime = newTime; + + this.elapsedTime += diff; + + } + + return diff; + + } + +} + +function now() { + + return ( typeof performance === 'undefined' ? Date : performance ).now(); // see #10732 + +} + +const _position$1 = /*@__PURE__*/ new Vector3(); +const _quaternion$1 = /*@__PURE__*/ new Quaternion(); +const _scale$1 = /*@__PURE__*/ new Vector3(); +const _orientation$1 = /*@__PURE__*/ new Vector3(); + +class AudioListener extends Object3D { + + constructor() { + + super(); + + this.type = 'AudioListener'; + + this.context = AudioContext.getContext(); + + this.gain = this.context.createGain(); + this.gain.connect( this.context.destination ); + + this.filter = null; + + this.timeDelta = 0; + + // private + + this._clock = new Clock(); + + } + + getInput() { + + return this.gain; + + } + + removeFilter() { + + if ( this.filter !== null ) { + + this.gain.disconnect( this.filter ); + this.filter.disconnect( this.context.destination ); + this.gain.connect( this.context.destination ); + this.filter = null; + + } + + return this; + + } + + getFilter() { + + return this.filter; + + } + + setFilter( value ) { + + if ( this.filter !== null ) { + + this.gain.disconnect( this.filter ); + this.filter.disconnect( this.context.destination ); + + } else { + + this.gain.disconnect( this.context.destination ); + + } + + this.filter = value; + this.gain.connect( this.filter ); + this.filter.connect( this.context.destination ); + + return this; + + } + + getMasterVolume() { + + return this.gain.gain.value; + + } + + setMasterVolume( value ) { + + this.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 ); + + return this; + + } + + updateMatrixWorld( force ) { + + super.updateMatrixWorld( force ); + + const listener = this.context.listener; + const up = this.up; + + this.timeDelta = this._clock.getDelta(); + + this.matrixWorld.decompose( _position$1, _quaternion$1, _scale$1 ); + + _orientation$1.set( 0, 0, - 1 ).applyQuaternion( _quaternion$1 ); + + if ( listener.positionX ) { + + // code path for Chrome (see #14393) + + const endTime = this.context.currentTime + this.timeDelta; + + listener.positionX.linearRampToValueAtTime( _position$1.x, endTime ); + listener.positionY.linearRampToValueAtTime( _position$1.y, endTime ); + listener.positionZ.linearRampToValueAtTime( _position$1.z, endTime ); + listener.forwardX.linearRampToValueAtTime( _orientation$1.x, endTime ); + listener.forwardY.linearRampToValueAtTime( _orientation$1.y, endTime ); + listener.forwardZ.linearRampToValueAtTime( _orientation$1.z, endTime ); + listener.upX.linearRampToValueAtTime( up.x, endTime ); + listener.upY.linearRampToValueAtTime( up.y, endTime ); + listener.upZ.linearRampToValueAtTime( up.z, endTime ); + + } else { + + listener.setPosition( _position$1.x, _position$1.y, _position$1.z ); + listener.setOrientation( _orientation$1.x, _orientation$1.y, _orientation$1.z, up.x, up.y, up.z ); + + } + + } + +} + +class Audio extends Object3D { + + constructor( listener ) { + + super(); + + this.type = 'Audio'; + + this.listener = listener; + this.context = listener.context; + + this.gain = this.context.createGain(); + this.gain.connect( listener.getInput() ); + + this.autoplay = false; + + this.buffer = null; + this.detune = 0; + this.loop = false; + this.loopStart = 0; + this.loopEnd = 0; + this.offset = 0; + this.duration = undefined; + this.playbackRate = 1; + this.isPlaying = false; + this.hasPlaybackControl = true; + this.source = null; + this.sourceType = 'empty'; + + this._startedAt = 0; + this._progress = 0; + this._connected = false; + + this.filters = []; + + } + + getOutput() { + + return this.gain; + + } + + setNodeSource( audioNode ) { + + this.hasPlaybackControl = false; + this.sourceType = 'audioNode'; + this.source = audioNode; + this.connect(); + + return this; + + } + + setMediaElementSource( mediaElement ) { + + this.hasPlaybackControl = false; + this.sourceType = 'mediaNode'; + this.source = this.context.createMediaElementSource( mediaElement ); + this.connect(); + + return this; + + } + + setMediaStreamSource( mediaStream ) { + + this.hasPlaybackControl = false; + this.sourceType = 'mediaStreamNode'; + this.source = this.context.createMediaStreamSource( mediaStream ); + this.connect(); + + return this; + + } + + setBuffer( audioBuffer ) { + + this.buffer = audioBuffer; + this.sourceType = 'buffer'; + + if ( this.autoplay ) this.play(); + + return this; + + } + + play( delay = 0 ) { + + if ( this.isPlaying === true ) { + + console.warn( 'THREE.Audio: Audio is already playing.' ); + return; + + } + + if ( this.hasPlaybackControl === false ) { + + console.warn( 'THREE.Audio: this Audio has no playback control.' ); + return; + + } + + this._startedAt = this.context.currentTime + delay; + + const source = this.context.createBufferSource(); + source.buffer = this.buffer; + source.loop = this.loop; + source.loopStart = this.loopStart; + source.loopEnd = this.loopEnd; + source.onended = this.onEnded.bind( this ); + source.start( this._startedAt, this._progress + this.offset, this.duration ); + + this.isPlaying = true; + + this.source = source; + + this.setDetune( this.detune ); + this.setPlaybackRate( this.playbackRate ); + + return this.connect(); + + } + + pause() { + + if ( this.hasPlaybackControl === false ) { + + console.warn( 'THREE.Audio: this Audio has no playback control.' ); + return; + + } + + if ( this.isPlaying === true ) { + + // update current progress + + this._progress += Math.max( this.context.currentTime - this._startedAt, 0 ) * this.playbackRate; + + if ( this.loop === true ) { + + // ensure _progress does not exceed duration with looped audios + + this._progress = this._progress % ( this.duration || this.buffer.duration ); + + } + + this.source.stop(); + this.source.onended = null; + + this.isPlaying = false; + + } + + return this; + + } + + stop() { + + if ( this.hasPlaybackControl === false ) { + + console.warn( 'THREE.Audio: this Audio has no playback control.' ); + return; + + } + + this._progress = 0; + + if ( this.source !== null ) { + + this.source.stop(); + this.source.onended = null; + + } + + this.isPlaying = false; + + return this; + + } + + connect() { + + if ( this.filters.length > 0 ) { + + this.source.connect( this.filters[ 0 ] ); + + for ( let i = 1, l = this.filters.length; i < l; i ++ ) { + + this.filters[ i - 1 ].connect( this.filters[ i ] ); + + } + + this.filters[ this.filters.length - 1 ].connect( this.getOutput() ); + + } else { + + this.source.connect( this.getOutput() ); + + } + + this._connected = true; + + return this; + + } + + disconnect() { + + if ( this._connected === false ) { + + return; + + } + + if ( this.filters.length > 0 ) { + + this.source.disconnect( this.filters[ 0 ] ); + + for ( let i = 1, l = this.filters.length; i < l; i ++ ) { + + this.filters[ i - 1 ].disconnect( this.filters[ i ] ); + + } + + this.filters[ this.filters.length - 1 ].disconnect( this.getOutput() ); + + } else { + + this.source.disconnect( this.getOutput() ); + + } + + this._connected = false; + + return this; + + } + + getFilters() { + + return this.filters; + + } + + setFilters( value ) { + + if ( ! value ) value = []; + + if ( this._connected === true ) { + + this.disconnect(); + this.filters = value.slice(); + this.connect(); + + } else { + + this.filters = value.slice(); + + } + + return this; + + } + + setDetune( value ) { + + this.detune = value; + + if ( this.isPlaying === true && this.source.detune !== undefined ) { + + this.source.detune.setTargetAtTime( this.detune, this.context.currentTime, 0.01 ); + + } + + return this; + + } + + getDetune() { + + return this.detune; + + } + + getFilter() { + + return this.getFilters()[ 0 ]; + + } + + setFilter( filter ) { + + return this.setFilters( filter ? [ filter ] : [] ); + + } + + setPlaybackRate( value ) { + + if ( this.hasPlaybackControl === false ) { + + console.warn( 'THREE.Audio: this Audio has no playback control.' ); + return; + + } + + this.playbackRate = value; + + if ( this.isPlaying === true ) { + + this.source.playbackRate.setTargetAtTime( this.playbackRate, this.context.currentTime, 0.01 ); + + } + + return this; + + } + + getPlaybackRate() { + + return this.playbackRate; + + } + + onEnded() { + + this.isPlaying = false; + + } + + getLoop() { + + if ( this.hasPlaybackControl === false ) { + + console.warn( 'THREE.Audio: this Audio has no playback control.' ); + return false; + + } + + return this.loop; + + } + + setLoop( value ) { + + if ( this.hasPlaybackControl === false ) { + + console.warn( 'THREE.Audio: this Audio has no playback control.' ); + return; + + } + + this.loop = value; + + if ( this.isPlaying === true ) { + + this.source.loop = this.loop; + + } + + return this; + + } + + setLoopStart( value ) { + + this.loopStart = value; + + return this; + + } + + setLoopEnd( value ) { + + this.loopEnd = value; + + return this; + + } + + getVolume() { + + return this.gain.gain.value; + + } + + setVolume( value ) { + + this.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 ); + + return this; + + } + +} + +const _position = /*@__PURE__*/ new Vector3(); +const _quaternion = /*@__PURE__*/ new Quaternion(); +const _scale = /*@__PURE__*/ new Vector3(); +const _orientation = /*@__PURE__*/ new Vector3(); + +class PositionalAudio extends Audio { + + constructor( listener ) { + + super( listener ); + + this.panner = this.context.createPanner(); + this.panner.panningModel = 'HRTF'; + this.panner.connect( this.gain ); + + } + + connect() { + + super.connect(); + + this.panner.connect( this.gain ); + + } + + disconnect() { + + super.disconnect(); + + this.panner.disconnect( this.gain ); + + } + + getOutput() { + + return this.panner; + + } + + getRefDistance() { + + return this.panner.refDistance; + + } + + setRefDistance( value ) { + + this.panner.refDistance = value; + + return this; + + } + + getRolloffFactor() { + + return this.panner.rolloffFactor; + + } + + setRolloffFactor( value ) { + + this.panner.rolloffFactor = value; + + return this; + + } + + getDistanceModel() { + + return this.panner.distanceModel; + + } + + setDistanceModel( value ) { + + this.panner.distanceModel = value; + + return this; + + } + + getMaxDistance() { + + return this.panner.maxDistance; + + } + + setMaxDistance( value ) { + + this.panner.maxDistance = value; + + return this; + + } + + setDirectionalCone( coneInnerAngle, coneOuterAngle, coneOuterGain ) { + + this.panner.coneInnerAngle = coneInnerAngle; + this.panner.coneOuterAngle = coneOuterAngle; + this.panner.coneOuterGain = coneOuterGain; + + return this; + + } + + updateMatrixWorld( force ) { + + super.updateMatrixWorld( force ); + + if ( this.hasPlaybackControl === true && this.isPlaying === false ) return; + + this.matrixWorld.decompose( _position, _quaternion, _scale ); + + _orientation.set( 0, 0, 1 ).applyQuaternion( _quaternion ); + + const panner = this.panner; + + if ( panner.positionX ) { + + // code path for Chrome and Firefox (see #14393) + + const endTime = this.context.currentTime + this.listener.timeDelta; + + panner.positionX.linearRampToValueAtTime( _position.x, endTime ); + panner.positionY.linearRampToValueAtTime( _position.y, endTime ); + panner.positionZ.linearRampToValueAtTime( _position.z, endTime ); + panner.orientationX.linearRampToValueAtTime( _orientation.x, endTime ); + panner.orientationY.linearRampToValueAtTime( _orientation.y, endTime ); + panner.orientationZ.linearRampToValueAtTime( _orientation.z, endTime ); + + } else { + + panner.setPosition( _position.x, _position.y, _position.z ); + panner.setOrientation( _orientation.x, _orientation.y, _orientation.z ); + + } + + } + +} + +class AudioAnalyser { + + constructor( audio, fftSize = 2048 ) { + + this.analyser = audio.context.createAnalyser(); + this.analyser.fftSize = fftSize; + + this.data = new Uint8Array( this.analyser.frequencyBinCount ); + + audio.getOutput().connect( this.analyser ); + + } + + + getFrequencyData() { + + this.analyser.getByteFrequencyData( this.data ); + + return this.data; + + } + + getAverageFrequency() { + + let value = 0; + const data = this.getFrequencyData(); + + for ( let i = 0; i < data.length; i ++ ) { + + value += data[ i ]; + + } + + return value / data.length; + + } + +} + +class PropertyMixer { + + constructor( binding, typeName, valueSize ) { + + this.binding = binding; + this.valueSize = valueSize; + + let mixFunction, + mixFunctionAdditive, + setIdentity; + + // buffer layout: [ incoming | accu0 | accu1 | orig | addAccu | (optional work) ] + // + // interpolators can use .buffer as their .result + // the data then goes to 'incoming' + // + // 'accu0' and 'accu1' are used frame-interleaved for + // the cumulative result and are compared to detect + // changes + // + // 'orig' stores the original state of the property + // + // 'add' is used for additive cumulative results + // + // 'work' is optional and is only present for quaternion types. It is used + // to store intermediate quaternion multiplication results + + switch ( typeName ) { + + case 'quaternion': + mixFunction = this._slerp; + mixFunctionAdditive = this._slerpAdditive; + setIdentity = this._setAdditiveIdentityQuaternion; + + this.buffer = new Float64Array( valueSize * 6 ); + this._workIndex = 5; + break; + + case 'string': + case 'bool': + mixFunction = this._select; + + // Use the regular mix function and for additive on these types, + // additive is not relevant for non-numeric types + mixFunctionAdditive = this._select; + + setIdentity = this._setAdditiveIdentityOther; + + this.buffer = new Array( valueSize * 5 ); + break; + + default: + mixFunction = this._lerp; + mixFunctionAdditive = this._lerpAdditive; + setIdentity = this._setAdditiveIdentityNumeric; + + this.buffer = new Float64Array( valueSize * 5 ); + + } + + this._mixBufferRegion = mixFunction; + this._mixBufferRegionAdditive = mixFunctionAdditive; + this._setIdentity = setIdentity; + this._origIndex = 3; + this._addIndex = 4; + + this.cumulativeWeight = 0; + this.cumulativeWeightAdditive = 0; + + this.useCount = 0; + this.referenceCount = 0; + + } + + // accumulate data in the 'incoming' region into 'accu' + accumulate( accuIndex, weight ) { + + // note: happily accumulating nothing when weight = 0, the caller knows + // the weight and shouldn't have made the call in the first place + + const buffer = this.buffer, + stride = this.valueSize, + offset = accuIndex * stride + stride; + + let currentWeight = this.cumulativeWeight; + + if ( currentWeight === 0 ) { + + // accuN := incoming * weight + + for ( let i = 0; i !== stride; ++ i ) { + + buffer[ offset + i ] = buffer[ i ]; + + } + + currentWeight = weight; + + } else { + + // accuN := accuN + incoming * weight + + currentWeight += weight; + const mix = weight / currentWeight; + this._mixBufferRegion( buffer, offset, 0, mix, stride ); + + } + + this.cumulativeWeight = currentWeight; + + } + + // accumulate data in the 'incoming' region into 'add' + accumulateAdditive( weight ) { + + const buffer = this.buffer, + stride = this.valueSize, + offset = stride * this._addIndex; + + if ( this.cumulativeWeightAdditive === 0 ) { + + // add = identity + + this._setIdentity(); + + } + + // add := add + incoming * weight + + this._mixBufferRegionAdditive( buffer, offset, 0, weight, stride ); + this.cumulativeWeightAdditive += weight; + + } + + // apply the state of 'accu' to the binding when accus differ + apply( accuIndex ) { + + const stride = this.valueSize, + buffer = this.buffer, + offset = accuIndex * stride + stride, + + weight = this.cumulativeWeight, + weightAdditive = this.cumulativeWeightAdditive, + + binding = this.binding; + + this.cumulativeWeight = 0; + this.cumulativeWeightAdditive = 0; + + if ( weight < 1 ) { + + // accuN := accuN + original * ( 1 - cumulativeWeight ) + + const originalValueOffset = stride * this._origIndex; + + this._mixBufferRegion( + buffer, offset, originalValueOffset, 1 - weight, stride ); + + } + + if ( weightAdditive > 0 ) { + + // accuN := accuN + additive accuN + + this._mixBufferRegionAdditive( buffer, offset, this._addIndex * stride, 1, stride ); + + } + + for ( let i = stride, e = stride + stride; i !== e; ++ i ) { + + if ( buffer[ i ] !== buffer[ i + stride ] ) { + + // value has changed -> update scene graph + + binding.setValue( buffer, offset ); + break; + + } + + } + + } + + // remember the state of the bound property and copy it to both accus + saveOriginalState() { + + const binding = this.binding; + + const buffer = this.buffer, + stride = this.valueSize, + + originalValueOffset = stride * this._origIndex; + + binding.getValue( buffer, originalValueOffset ); + + // accu[0..1] := orig -- initially detect changes against the original + for ( let i = stride, e = originalValueOffset; i !== e; ++ i ) { + + buffer[ i ] = buffer[ originalValueOffset + ( i % stride ) ]; + + } + + // Add to identity for additive + this._setIdentity(); + + this.cumulativeWeight = 0; + this.cumulativeWeightAdditive = 0; + + } + + // apply the state previously taken via 'saveOriginalState' to the binding + restoreOriginalState() { + + const originalValueOffset = this.valueSize * 3; + this.binding.setValue( this.buffer, originalValueOffset ); + + } + + _setAdditiveIdentityNumeric() { + + const startIndex = this._addIndex * this.valueSize; + const endIndex = startIndex + this.valueSize; + + for ( let i = startIndex; i < endIndex; i ++ ) { + + this.buffer[ i ] = 0; + + } + + } + + _setAdditiveIdentityQuaternion() { + + this._setAdditiveIdentityNumeric(); + this.buffer[ this._addIndex * this.valueSize + 3 ] = 1; + + } + + _setAdditiveIdentityOther() { + + const startIndex = this._origIndex * this.valueSize; + const targetIndex = this._addIndex * this.valueSize; + + for ( let i = 0; i < this.valueSize; i ++ ) { + + this.buffer[ targetIndex + i ] = this.buffer[ startIndex + i ]; + + } + + } + + + // mix functions + + _select( buffer, dstOffset, srcOffset, t, stride ) { + + if ( t >= 0.5 ) { + + for ( let i = 0; i !== stride; ++ i ) { + + buffer[ dstOffset + i ] = buffer[ srcOffset + i ]; + + } + + } + + } + + _slerp( buffer, dstOffset, srcOffset, t ) { + + Quaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, srcOffset, t ); + + } + + _slerpAdditive( buffer, dstOffset, srcOffset, t, stride ) { + + const workOffset = this._workIndex * stride; + + // Store result in intermediate buffer offset + Quaternion.multiplyQuaternionsFlat( buffer, workOffset, buffer, dstOffset, buffer, srcOffset ); + + // Slerp to the intermediate result + Quaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, workOffset, t ); + + } + + _lerp( buffer, dstOffset, srcOffset, t, stride ) { + + const s = 1 - t; + + for ( let i = 0; i !== stride; ++ i ) { + + const j = dstOffset + i; + + buffer[ j ] = buffer[ j ] * s + buffer[ srcOffset + i ] * t; + + } + + } + + _lerpAdditive( buffer, dstOffset, srcOffset, t, stride ) { + + for ( let i = 0; i !== stride; ++ i ) { + + const j = dstOffset + i; + + buffer[ j ] = buffer[ j ] + buffer[ srcOffset + i ] * t; + + } + + } + +} + +// Characters [].:/ are reserved for track binding syntax. +const _RESERVED_CHARS_RE = '\\[\\]\\.:\\/'; +const _reservedRe = new RegExp( '[' + _RESERVED_CHARS_RE + ']', 'g' ); + +// Attempts to allow node names from any language. ES5's `\w` regexp matches +// only latin characters, and the unicode \p{L} is not yet supported. So +// instead, we exclude reserved characters and match everything else. +const _wordChar = '[^' + _RESERVED_CHARS_RE + ']'; +const _wordCharOrDot = '[^' + _RESERVED_CHARS_RE.replace( '\\.', '' ) + ']'; + +// Parent directories, delimited by '/' or ':'. Currently unused, but must +// be matched to parse the rest of the track name. +const _directoryRe = /*@__PURE__*/ /((?:WC+[\/:])*)/.source.replace( 'WC', _wordChar ); + +// Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'. +const _nodeRe = /*@__PURE__*/ /(WCOD+)?/.source.replace( 'WCOD', _wordCharOrDot ); + +// Object on target node, and accessor. May not contain reserved +// characters. Accessor may contain any character except closing bracket. +const _objectRe = /*@__PURE__*/ /(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace( 'WC', _wordChar ); + +// Property and accessor. May not contain reserved characters. Accessor may +// contain any non-bracket characters. +const _propertyRe = /*@__PURE__*/ /\.(WC+)(?:\[(.+)\])?/.source.replace( 'WC', _wordChar ); + +const _trackRe = new RegExp( '' + + '^' + + _directoryRe + + _nodeRe + + _objectRe + + _propertyRe + + '$' +); + +const _supportedObjectNames = [ 'material', 'materials', 'bones', 'map' ]; + +class Composite { + + constructor( targetGroup, path, optionalParsedPath ) { + + const parsedPath = optionalParsedPath || PropertyBinding.parseTrackName( path ); + + this._targetGroup = targetGroup; + this._bindings = targetGroup.subscribe_( path, parsedPath ); + + } + + getValue( array, offset ) { + + this.bind(); // bind all binding + + const firstValidIndex = this._targetGroup.nCachedObjects_, + binding = this._bindings[ firstValidIndex ]; + + // and only call .getValue on the first + if ( binding !== undefined ) binding.getValue( array, offset ); + + } + + setValue( array, offset ) { + + const bindings = this._bindings; + + for ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { + + bindings[ i ].setValue( array, offset ); + + } + + } + + bind() { + + const bindings = this._bindings; + + for ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { + + bindings[ i ].bind(); + + } + + } + + unbind() { + + const bindings = this._bindings; + + for ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { + + bindings[ i ].unbind(); + + } + + } + +} + +// Note: This class uses a State pattern on a per-method basis: +// 'bind' sets 'this.getValue' / 'setValue' and shadows the +// prototype version of these methods with one that represents +// the bound state. When the property is not found, the methods +// become no-ops. +class PropertyBinding { + + constructor( rootNode, path, parsedPath ) { + + this.path = path; + this.parsedPath = parsedPath || PropertyBinding.parseTrackName( path ); + + this.node = PropertyBinding.findNode( rootNode, this.parsedPath.nodeName ); + + this.rootNode = rootNode; + + // initial state of these methods that calls 'bind' + this.getValue = this._getValue_unbound; + this.setValue = this._setValue_unbound; + + } + + + static create( root, path, parsedPath ) { + + if ( ! ( root && root.isAnimationObjectGroup ) ) { + + return new PropertyBinding( root, path, parsedPath ); + + } else { + + return new PropertyBinding.Composite( root, path, parsedPath ); + + } + + } + + /** + * Replaces spaces with underscores and removes unsupported characters from + * node names, to ensure compatibility with parseTrackName(). + * + * @param {string} name Node name to be sanitized. + * @return {string} + */ + static sanitizeNodeName( name ) { + + return name.replace( /\s/g, '_' ).replace( _reservedRe, '' ); + + } + + static parseTrackName( trackName ) { + + const matches = _trackRe.exec( trackName ); + + if ( matches === null ) { + + throw new Error( 'PropertyBinding: Cannot parse trackName: ' + trackName ); + + } + + const results = { + // directoryName: matches[ 1 ], // (tschw) currently unused + nodeName: matches[ 2 ], + objectName: matches[ 3 ], + objectIndex: matches[ 4 ], + propertyName: matches[ 5 ], // required + propertyIndex: matches[ 6 ] + }; + + const lastDot = results.nodeName && results.nodeName.lastIndexOf( '.' ); + + if ( lastDot !== undefined && lastDot !== - 1 ) { + + const objectName = results.nodeName.substring( lastDot + 1 ); + + // Object names must be checked against an allowlist. Otherwise, there + // is no way to parse 'foo.bar.baz': 'baz' must be a property, but + // 'bar' could be the objectName, or part of a nodeName (which can + // include '.' characters). + if ( _supportedObjectNames.indexOf( objectName ) !== - 1 ) { + + results.nodeName = results.nodeName.substring( 0, lastDot ); + results.objectName = objectName; + + } + + } + + if ( results.propertyName === null || results.propertyName.length === 0 ) { + + throw new Error( 'PropertyBinding: can not parse propertyName from trackName: ' + trackName ); + + } + + return results; + + } + + static findNode( root, nodeName ) { + + if ( nodeName === undefined || nodeName === '' || nodeName === '.' || nodeName === - 1 || nodeName === root.name || nodeName === root.uuid ) { + + return root; + + } + + // search into skeleton bones. + if ( root.skeleton ) { + + const bone = root.skeleton.getBoneByName( nodeName ); + + if ( bone !== undefined ) { + + return bone; + + } + + } + + // search into node subtree. + if ( root.children ) { + + const searchNodeSubtree = function ( children ) { + + for ( let i = 0; i < children.length; i ++ ) { + + const childNode = children[ i ]; + + if ( childNode.name === nodeName || childNode.uuid === nodeName ) { + + return childNode; + + } + + const result = searchNodeSubtree( childNode.children ); + + if ( result ) return result; + + } + + return null; + + }; + + const subTreeNode = searchNodeSubtree( root.children ); + + if ( subTreeNode ) { + + return subTreeNode; + + } + + } + + return null; + + } + + // these are used to "bind" a nonexistent property + _getValue_unavailable() {} + _setValue_unavailable() {} + + // Getters + + _getValue_direct( buffer, offset ) { + + buffer[ offset ] = this.targetObject[ this.propertyName ]; + + } + + _getValue_array( buffer, offset ) { + + const source = this.resolvedProperty; + + for ( let i = 0, n = source.length; i !== n; ++ i ) { + + buffer[ offset ++ ] = source[ i ]; + + } + + } + + _getValue_arrayElement( buffer, offset ) { + + buffer[ offset ] = this.resolvedProperty[ this.propertyIndex ]; + + } + + _getValue_toArray( buffer, offset ) { + + this.resolvedProperty.toArray( buffer, offset ); + + } + + // Direct + + _setValue_direct( buffer, offset ) { + + this.targetObject[ this.propertyName ] = buffer[ offset ]; + + } + + _setValue_direct_setNeedsUpdate( buffer, offset ) { + + this.targetObject[ this.propertyName ] = buffer[ offset ]; + this.targetObject.needsUpdate = true; + + } + + _setValue_direct_setMatrixWorldNeedsUpdate( buffer, offset ) { + + this.targetObject[ this.propertyName ] = buffer[ offset ]; + this.targetObject.matrixWorldNeedsUpdate = true; + + } + + // EntireArray + + _setValue_array( buffer, offset ) { + + const dest = this.resolvedProperty; + + for ( let i = 0, n = dest.length; i !== n; ++ i ) { + + dest[ i ] = buffer[ offset ++ ]; + + } + + } + + _setValue_array_setNeedsUpdate( buffer, offset ) { + + const dest = this.resolvedProperty; + + for ( let i = 0, n = dest.length; i !== n; ++ i ) { + + dest[ i ] = buffer[ offset ++ ]; + + } + + this.targetObject.needsUpdate = true; + + } + + _setValue_array_setMatrixWorldNeedsUpdate( buffer, offset ) { + + const dest = this.resolvedProperty; + + for ( let i = 0, n = dest.length; i !== n; ++ i ) { + + dest[ i ] = buffer[ offset ++ ]; + + } + + this.targetObject.matrixWorldNeedsUpdate = true; + + } + + // ArrayElement + + _setValue_arrayElement( buffer, offset ) { + + this.resolvedProperty[ this.propertyIndex ] = buffer[ offset ]; + + } + + _setValue_arrayElement_setNeedsUpdate( buffer, offset ) { + + this.resolvedProperty[ this.propertyIndex ] = buffer[ offset ]; + this.targetObject.needsUpdate = true; + + } + + _setValue_arrayElement_setMatrixWorldNeedsUpdate( buffer, offset ) { + + this.resolvedProperty[ this.propertyIndex ] = buffer[ offset ]; + this.targetObject.matrixWorldNeedsUpdate = true; + + } + + // HasToFromArray + + _setValue_fromArray( buffer, offset ) { + + this.resolvedProperty.fromArray( buffer, offset ); + + } + + _setValue_fromArray_setNeedsUpdate( buffer, offset ) { + + this.resolvedProperty.fromArray( buffer, offset ); + this.targetObject.needsUpdate = true; + + } + + _setValue_fromArray_setMatrixWorldNeedsUpdate( buffer, offset ) { + + this.resolvedProperty.fromArray( buffer, offset ); + this.targetObject.matrixWorldNeedsUpdate = true; + + } + + _getValue_unbound( targetArray, offset ) { + + this.bind(); + this.getValue( targetArray, offset ); + + } + + _setValue_unbound( sourceArray, offset ) { + + this.bind(); + this.setValue( sourceArray, offset ); + + } + + // create getter / setter pair for a property in the scene graph + bind() { + + let targetObject = this.node; + const parsedPath = this.parsedPath; + + const objectName = parsedPath.objectName; + const propertyName = parsedPath.propertyName; + let propertyIndex = parsedPath.propertyIndex; + + if ( ! targetObject ) { + + targetObject = PropertyBinding.findNode( this.rootNode, parsedPath.nodeName ); + + this.node = targetObject; + + } + + // set fail state so we can just 'return' on error + this.getValue = this._getValue_unavailable; + this.setValue = this._setValue_unavailable; + + // ensure there is a value node + if ( ! targetObject ) { + + console.warn( 'THREE.PropertyBinding: No target node found for track: ' + this.path + '.' ); + return; + + } + + if ( objectName ) { + + let objectIndex = parsedPath.objectIndex; + + // special cases were we need to reach deeper into the hierarchy to get the face materials.... + switch ( objectName ) { + + case 'materials': + + if ( ! targetObject.material ) { + + console.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this ); + return; + + } + + if ( ! targetObject.material.materials ) { + + console.error( 'THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this ); + return; + + } + + targetObject = targetObject.material.materials; + + break; + + case 'bones': + + if ( ! targetObject.skeleton ) { + + console.error( 'THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.', this ); + return; + + } + + // potential future optimization: skip this if propertyIndex is already an integer + // and convert the integer string to a true integer. + + targetObject = targetObject.skeleton.bones; + + // support resolving morphTarget names into indices. + for ( let i = 0; i < targetObject.length; i ++ ) { + + if ( targetObject[ i ].name === objectIndex ) { + + objectIndex = i; + break; + + } + + } + + break; + + case 'map': + + if ( 'map' in targetObject ) { + + targetObject = targetObject.map; + break; + + } + + if ( ! targetObject.material ) { + + console.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this ); + return; + + } + + if ( ! targetObject.material.map ) { + + console.error( 'THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.', this ); + return; + + } + + targetObject = targetObject.material.map; + break; + + default: + + if ( targetObject[ objectName ] === undefined ) { + + console.error( 'THREE.PropertyBinding: Can not bind to objectName of node undefined.', this ); + return; + + } + + targetObject = targetObject[ objectName ]; + + } + + + if ( objectIndex !== undefined ) { + + if ( targetObject[ objectIndex ] === undefined ) { + + console.error( 'THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject ); + return; + + } + + targetObject = targetObject[ objectIndex ]; + + } + + } + + // resolve property + const nodeProperty = targetObject[ propertyName ]; + + if ( nodeProperty === undefined ) { + + const nodeName = parsedPath.nodeName; + + console.error( 'THREE.PropertyBinding: Trying to update property for track: ' + nodeName + + '.' + propertyName + ' but it wasn\'t found.', targetObject ); + return; + + } + + // determine versioning scheme + let versioning = this.Versioning.None; + + this.targetObject = targetObject; + + if ( targetObject.needsUpdate !== undefined ) { // material + + versioning = this.Versioning.NeedsUpdate; + + } else if ( targetObject.matrixWorldNeedsUpdate !== undefined ) { // node transform + + versioning = this.Versioning.MatrixWorldNeedsUpdate; + + } + + // determine how the property gets bound + let bindingType = this.BindingType.Direct; + + if ( propertyIndex !== undefined ) { + + // access a sub element of the property array (only primitives are supported right now) + + if ( propertyName === 'morphTargetInfluences' ) { + + // potential optimization, skip this if propertyIndex is already an integer, and convert the integer string to a true integer. + + // support resolving morphTarget names into indices. + if ( ! targetObject.geometry ) { + + console.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this ); + return; + + } + + if ( ! targetObject.geometry.morphAttributes ) { + + console.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this ); + return; + + } + + if ( targetObject.morphTargetDictionary[ propertyIndex ] !== undefined ) { + + propertyIndex = targetObject.morphTargetDictionary[ propertyIndex ]; + + } + + } + + bindingType = this.BindingType.ArrayElement; + + this.resolvedProperty = nodeProperty; + this.propertyIndex = propertyIndex; + + } else if ( nodeProperty.fromArray !== undefined && nodeProperty.toArray !== undefined ) { + + // must use copy for Object3D.Euler/Quaternion + + bindingType = this.BindingType.HasFromToArray; + + this.resolvedProperty = nodeProperty; + + } else if ( Array.isArray( nodeProperty ) ) { + + bindingType = this.BindingType.EntireArray; + + this.resolvedProperty = nodeProperty; + + } else { + + this.propertyName = propertyName; + + } + + // select getter / setter + this.getValue = this.GetterByBindingType[ bindingType ]; + this.setValue = this.SetterByBindingTypeAndVersioning[ bindingType ][ versioning ]; + + } + + unbind() { + + this.node = null; + + // back to the prototype version of getValue / setValue + // note: avoiding to mutate the shape of 'this' via 'delete' + this.getValue = this._getValue_unbound; + this.setValue = this._setValue_unbound; + + } + +} + +PropertyBinding.Composite = Composite; + +PropertyBinding.prototype.BindingType = { + Direct: 0, + EntireArray: 1, + ArrayElement: 2, + HasFromToArray: 3 +}; + +PropertyBinding.prototype.Versioning = { + None: 0, + NeedsUpdate: 1, + MatrixWorldNeedsUpdate: 2 +}; + +PropertyBinding.prototype.GetterByBindingType = [ + + PropertyBinding.prototype._getValue_direct, + PropertyBinding.prototype._getValue_array, + PropertyBinding.prototype._getValue_arrayElement, + PropertyBinding.prototype._getValue_toArray, + +]; + +PropertyBinding.prototype.SetterByBindingTypeAndVersioning = [ + + [ + // Direct + PropertyBinding.prototype._setValue_direct, + PropertyBinding.prototype._setValue_direct_setNeedsUpdate, + PropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate, + + ], [ + + // EntireArray + + PropertyBinding.prototype._setValue_array, + PropertyBinding.prototype._setValue_array_setNeedsUpdate, + PropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate, + + ], [ + + // ArrayElement + PropertyBinding.prototype._setValue_arrayElement, + PropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate, + PropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate, + + ], [ + + // HasToFromArray + PropertyBinding.prototype._setValue_fromArray, + PropertyBinding.prototype._setValue_fromArray_setNeedsUpdate, + PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate, + + ] + +]; + +/** + * + * A group of objects that receives a shared animation state. + * + * Usage: + * + * - Add objects you would otherwise pass as 'root' to the + * constructor or the .clipAction method of AnimationMixer. + * + * - Instead pass this object as 'root'. + * + * - You can also add and remove objects later when the mixer + * is running. + * + * Note: + * + * Objects of this class appear as one object to the mixer, + * so cache control of the individual objects must be done + * on the group. + * + * Limitation: + * + * - The animated properties must be compatible among the + * all objects in the group. + * + * - A single property can either be controlled through a + * target group or directly, but not both. + */ + +class AnimationObjectGroup { + + constructor() { + + this.isAnimationObjectGroup = true; + + this.uuid = generateUUID(); + + // cached objects followed by the active ones + this._objects = Array.prototype.slice.call( arguments ); + + this.nCachedObjects_ = 0; // threshold + // note: read by PropertyBinding.Composite + + const indices = {}; + this._indicesByUUID = indices; // for bookkeeping + + for ( let i = 0, n = arguments.length; i !== n; ++ i ) { + + indices[ arguments[ i ].uuid ] = i; + + } + + this._paths = []; // inside: string + this._parsedPaths = []; // inside: { we don't care, here } + this._bindings = []; // inside: Array< PropertyBinding > + this._bindingsIndicesByPath = {}; // inside: indices in these arrays + + const scope = this; + + this.stats = { + + objects: { + get total() { + + return scope._objects.length; + + }, + get inUse() { + + return this.total - scope.nCachedObjects_; + + } + }, + get bindingsPerObject() { + + return scope._bindings.length; + + } + + }; + + } + + add() { + + const objects = this._objects, + indicesByUUID = this._indicesByUUID, + paths = this._paths, + parsedPaths = this._parsedPaths, + bindings = this._bindings, + nBindings = bindings.length; + + let knownObject = undefined, + nObjects = objects.length, + nCachedObjects = this.nCachedObjects_; + + for ( let i = 0, n = arguments.length; i !== n; ++ i ) { + + const object = arguments[ i ], + uuid = object.uuid; + let index = indicesByUUID[ uuid ]; + + if ( index === undefined ) { + + // unknown object -> add it to the ACTIVE region + + index = nObjects ++; + indicesByUUID[ uuid ] = index; + objects.push( object ); + + // accounting is done, now do the same for all bindings + + for ( let j = 0, m = nBindings; j !== m; ++ j ) { + + bindings[ j ].push( new PropertyBinding( object, paths[ j ], parsedPaths[ j ] ) ); + + } + + } else if ( index < nCachedObjects ) { + + knownObject = objects[ index ]; + + // move existing object to the ACTIVE region + + const firstActiveIndex = -- nCachedObjects, + lastCachedObject = objects[ firstActiveIndex ]; + + indicesByUUID[ lastCachedObject.uuid ] = index; + objects[ index ] = lastCachedObject; + + indicesByUUID[ uuid ] = firstActiveIndex; + objects[ firstActiveIndex ] = object; + + // accounting is done, now do the same for all bindings + + for ( let j = 0, m = nBindings; j !== m; ++ j ) { + + const bindingsForPath = bindings[ j ], + lastCached = bindingsForPath[ firstActiveIndex ]; + + let binding = bindingsForPath[ index ]; + + bindingsForPath[ index ] = lastCached; + + if ( binding === undefined ) { + + // since we do not bother to create new bindings + // for objects that are cached, the binding may + // or may not exist + + binding = new PropertyBinding( object, paths[ j ], parsedPaths[ j ] ); + + } + + bindingsForPath[ firstActiveIndex ] = binding; + + } + + } else if ( objects[ index ] !== knownObject ) { + + console.error( 'THREE.AnimationObjectGroup: Different objects with the same UUID ' + + 'detected. Clean the caches or recreate your infrastructure when reloading scenes.' ); + + } // else the object is already where we want it to be + + } // for arguments + + this.nCachedObjects_ = nCachedObjects; + + } + + remove() { + + const objects = this._objects, + indicesByUUID = this._indicesByUUID, + bindings = this._bindings, + nBindings = bindings.length; + + let nCachedObjects = this.nCachedObjects_; + + for ( let i = 0, n = arguments.length; i !== n; ++ i ) { + + const object = arguments[ i ], + uuid = object.uuid, + index = indicesByUUID[ uuid ]; + + if ( index !== undefined && index >= nCachedObjects ) { + + // move existing object into the CACHED region + + const lastCachedIndex = nCachedObjects ++, + firstActiveObject = objects[ lastCachedIndex ]; + + indicesByUUID[ firstActiveObject.uuid ] = index; + objects[ index ] = firstActiveObject; + + indicesByUUID[ uuid ] = lastCachedIndex; + objects[ lastCachedIndex ] = object; + + // accounting is done, now do the same for all bindings + + for ( let j = 0, m = nBindings; j !== m; ++ j ) { + + const bindingsForPath = bindings[ j ], + firstActive = bindingsForPath[ lastCachedIndex ], + binding = bindingsForPath[ index ]; + + bindingsForPath[ index ] = firstActive; + bindingsForPath[ lastCachedIndex ] = binding; + + } + + } + + } // for arguments + + this.nCachedObjects_ = nCachedObjects; + + } + + // remove & forget + uncache() { + + const objects = this._objects, + indicesByUUID = this._indicesByUUID, + bindings = this._bindings, + nBindings = bindings.length; + + let nCachedObjects = this.nCachedObjects_, + nObjects = objects.length; + + for ( let i = 0, n = arguments.length; i !== n; ++ i ) { + + const object = arguments[ i ], + uuid = object.uuid, + index = indicesByUUID[ uuid ]; + + if ( index !== undefined ) { + + delete indicesByUUID[ uuid ]; + + if ( index < nCachedObjects ) { + + // object is cached, shrink the CACHED region + + const firstActiveIndex = -- nCachedObjects, + lastCachedObject = objects[ firstActiveIndex ], + lastIndex = -- nObjects, + lastObject = objects[ lastIndex ]; + + // last cached object takes this object's place + indicesByUUID[ lastCachedObject.uuid ] = index; + objects[ index ] = lastCachedObject; + + // last object goes to the activated slot and pop + indicesByUUID[ lastObject.uuid ] = firstActiveIndex; + objects[ firstActiveIndex ] = lastObject; + objects.pop(); + + // accounting is done, now do the same for all bindings + + for ( let j = 0, m = nBindings; j !== m; ++ j ) { + + const bindingsForPath = bindings[ j ], + lastCached = bindingsForPath[ firstActiveIndex ], + last = bindingsForPath[ lastIndex ]; + + bindingsForPath[ index ] = lastCached; + bindingsForPath[ firstActiveIndex ] = last; + bindingsForPath.pop(); + + } + + } else { + + // object is active, just swap with the last and pop + + const lastIndex = -- nObjects, + lastObject = objects[ lastIndex ]; + + if ( lastIndex > 0 ) { + + indicesByUUID[ lastObject.uuid ] = index; + + } + + objects[ index ] = lastObject; + objects.pop(); + + // accounting is done, now do the same for all bindings + + for ( let j = 0, m = nBindings; j !== m; ++ j ) { + + const bindingsForPath = bindings[ j ]; + + bindingsForPath[ index ] = bindingsForPath[ lastIndex ]; + bindingsForPath.pop(); + + } + + } // cached or active + + } // if object is known + + } // for arguments + + this.nCachedObjects_ = nCachedObjects; + + } + + // Internal interface used by befriended PropertyBinding.Composite: + + subscribe_( path, parsedPath ) { + + // returns an array of bindings for the given path that is changed + // according to the contained objects in the group + + const indicesByPath = this._bindingsIndicesByPath; + let index = indicesByPath[ path ]; + const bindings = this._bindings; + + if ( index !== undefined ) return bindings[ index ]; + + const paths = this._paths, + parsedPaths = this._parsedPaths, + objects = this._objects, + nObjects = objects.length, + nCachedObjects = this.nCachedObjects_, + bindingsForPath = new Array( nObjects ); + + index = bindings.length; + + indicesByPath[ path ] = index; + + paths.push( path ); + parsedPaths.push( parsedPath ); + bindings.push( bindingsForPath ); + + for ( let i = nCachedObjects, n = objects.length; i !== n; ++ i ) { + + const object = objects[ i ]; + bindingsForPath[ i ] = new PropertyBinding( object, path, parsedPath ); + + } + + return bindingsForPath; + + } + + unsubscribe_( path ) { + + // tells the group to forget about a property path and no longer + // update the array previously obtained with 'subscribe_' + + const indicesByPath = this._bindingsIndicesByPath, + index = indicesByPath[ path ]; + + if ( index !== undefined ) { + + const paths = this._paths, + parsedPaths = this._parsedPaths, + bindings = this._bindings, + lastBindingsIndex = bindings.length - 1, + lastBindings = bindings[ lastBindingsIndex ], + lastBindingsPath = path[ lastBindingsIndex ]; + + indicesByPath[ lastBindingsPath ] = index; + + bindings[ index ] = lastBindings; + bindings.pop(); + + parsedPaths[ index ] = parsedPaths[ lastBindingsIndex ]; + parsedPaths.pop(); + + paths[ index ] = paths[ lastBindingsIndex ]; + paths.pop(); + + } + + } + +} + +class AnimationAction { + + constructor( mixer, clip, localRoot = null, blendMode = clip.blendMode ) { + + this._mixer = mixer; + this._clip = clip; + this._localRoot = localRoot; + this.blendMode = blendMode; + + const tracks = clip.tracks, + nTracks = tracks.length, + interpolants = new Array( nTracks ); + + const interpolantSettings = { + endingStart: ZeroCurvatureEnding, + endingEnd: ZeroCurvatureEnding + }; + + for ( let i = 0; i !== nTracks; ++ i ) { + + const interpolant = tracks[ i ].createInterpolant( null ); + interpolants[ i ] = interpolant; + interpolant.settings = interpolantSettings; + + } + + this._interpolantSettings = interpolantSettings; + + this._interpolants = interpolants; // bound by the mixer + + // inside: PropertyMixer (managed by the mixer) + this._propertyBindings = new Array( nTracks ); + + this._cacheIndex = null; // for the memory manager + this._byClipCacheIndex = null; // for the memory manager + + this._timeScaleInterpolant = null; + this._weightInterpolant = null; + + this.loop = LoopRepeat; + this._loopCount = - 1; + + // global mixer time when the action is to be started + // it's set back to 'null' upon start of the action + this._startTime = null; + + // scaled local time of the action + // gets clamped or wrapped to 0..clip.duration according to loop + this.time = 0; + + this.timeScale = 1; + this._effectiveTimeScale = 1; + + this.weight = 1; + this._effectiveWeight = 1; + + this.repetitions = Infinity; // no. of repetitions when looping + + this.paused = false; // true -> zero effective time scale + this.enabled = true; // false -> zero effective weight + + this.clampWhenFinished = false;// keep feeding the last frame? + + this.zeroSlopeAtStart = true;// for smooth interpolation w/o separate + this.zeroSlopeAtEnd = true;// clips for start, loop and end + + } + + // State & Scheduling + + play() { + + this._mixer._activateAction( this ); + + return this; + + } + + stop() { + + this._mixer._deactivateAction( this ); + + return this.reset(); + + } + + reset() { + + this.paused = false; + this.enabled = true; + + this.time = 0; // restart clip + this._loopCount = - 1;// forget previous loops + this._startTime = null;// forget scheduling + + return this.stopFading().stopWarping(); + + } + + isRunning() { + + return this.enabled && ! this.paused && this.timeScale !== 0 && + this._startTime === null && this._mixer._isActiveAction( this ); + + } + + // return true when play has been called + isScheduled() { + + return this._mixer._isActiveAction( this ); + + } + + startAt( time ) { + + this._startTime = time; + + return this; + + } + + setLoop( mode, repetitions ) { + + this.loop = mode; + this.repetitions = repetitions; + + return this; + + } + + // Weight + + // set the weight stopping any scheduled fading + // although .enabled = false yields an effective weight of zero, this + // method does *not* change .enabled, because it would be confusing + setEffectiveWeight( weight ) { + + this.weight = weight; + + // note: same logic as when updated at runtime + this._effectiveWeight = this.enabled ? weight : 0; + + return this.stopFading(); + + } + + // return the weight considering fading and .enabled + getEffectiveWeight() { + + return this._effectiveWeight; + + } + + fadeIn( duration ) { + + return this._scheduleFading( duration, 0, 1 ); + + } + + fadeOut( duration ) { + + return this._scheduleFading( duration, 1, 0 ); + + } + + crossFadeFrom( fadeOutAction, duration, warp ) { + + fadeOutAction.fadeOut( duration ); + this.fadeIn( duration ); + + if ( warp ) { + + const fadeInDuration = this._clip.duration, + fadeOutDuration = fadeOutAction._clip.duration, + + startEndRatio = fadeOutDuration / fadeInDuration, + endStartRatio = fadeInDuration / fadeOutDuration; + + fadeOutAction.warp( 1.0, startEndRatio, duration ); + this.warp( endStartRatio, 1.0, duration ); + + } + + return this; + + } + + crossFadeTo( fadeInAction, duration, warp ) { + + return fadeInAction.crossFadeFrom( this, duration, warp ); + + } + + stopFading() { + + const weightInterpolant = this._weightInterpolant; + + if ( weightInterpolant !== null ) { + + this._weightInterpolant = null; + this._mixer._takeBackControlInterpolant( weightInterpolant ); + + } + + return this; + + } + + // Time Scale Control + + // set the time scale stopping any scheduled warping + // although .paused = true yields an effective time scale of zero, this + // method does *not* change .paused, because it would be confusing + setEffectiveTimeScale( timeScale ) { + + this.timeScale = timeScale; + this._effectiveTimeScale = this.paused ? 0 : timeScale; + + return this.stopWarping(); + + } + + // return the time scale considering warping and .paused + getEffectiveTimeScale() { + + return this._effectiveTimeScale; + + } + + setDuration( duration ) { + + this.timeScale = this._clip.duration / duration; + + return this.stopWarping(); + + } + + syncWith( action ) { + + this.time = action.time; + this.timeScale = action.timeScale; + + return this.stopWarping(); + + } + + halt( duration ) { + + return this.warp( this._effectiveTimeScale, 0, duration ); + + } + + warp( startTimeScale, endTimeScale, duration ) { + + const mixer = this._mixer, + now = mixer.time, + timeScale = this.timeScale; + + let interpolant = this._timeScaleInterpolant; + + if ( interpolant === null ) { + + interpolant = mixer._lendControlInterpolant(); + this._timeScaleInterpolant = interpolant; + + } + + const times = interpolant.parameterPositions, + values = interpolant.sampleValues; + + times[ 0 ] = now; + times[ 1 ] = now + duration; + + values[ 0 ] = startTimeScale / timeScale; + values[ 1 ] = endTimeScale / timeScale; + + return this; + + } + + stopWarping() { + + const timeScaleInterpolant = this._timeScaleInterpolant; + + if ( timeScaleInterpolant !== null ) { + + this._timeScaleInterpolant = null; + this._mixer._takeBackControlInterpolant( timeScaleInterpolant ); + + } + + return this; + + } + + // Object Accessors + + getMixer() { + + return this._mixer; + + } + + getClip() { + + return this._clip; + + } + + getRoot() { + + return this._localRoot || this._mixer._root; + + } + + // Interna + + _update( time, deltaTime, timeDirection, accuIndex ) { + + // called by the mixer + + if ( ! this.enabled ) { + + // call ._updateWeight() to update ._effectiveWeight + + this._updateWeight( time ); + return; + + } + + const startTime = this._startTime; + + if ( startTime !== null ) { + + // check for scheduled start of action + + const timeRunning = ( time - startTime ) * timeDirection; + if ( timeRunning < 0 || timeDirection === 0 ) { + + deltaTime = 0; + + } else { + + + this._startTime = null; // unschedule + deltaTime = timeDirection * timeRunning; + + } + + } + + // apply time scale and advance time + + deltaTime *= this._updateTimeScale( time ); + const clipTime = this._updateTime( deltaTime ); + + // note: _updateTime may disable the action resulting in + // an effective weight of 0 + + const weight = this._updateWeight( time ); + + if ( weight > 0 ) { + + const interpolants = this._interpolants; + const propertyMixers = this._propertyBindings; + + switch ( this.blendMode ) { + + case AdditiveAnimationBlendMode: + + for ( let j = 0, m = interpolants.length; j !== m; ++ j ) { + + interpolants[ j ].evaluate( clipTime ); + propertyMixers[ j ].accumulateAdditive( weight ); + + } + + break; + + case NormalAnimationBlendMode: + default: + + for ( let j = 0, m = interpolants.length; j !== m; ++ j ) { + + interpolants[ j ].evaluate( clipTime ); + propertyMixers[ j ].accumulate( accuIndex, weight ); + + } + + } + + } + + } + + _updateWeight( time ) { + + let weight = 0; + + if ( this.enabled ) { + + weight = this.weight; + const interpolant = this._weightInterpolant; + + if ( interpolant !== null ) { + + const interpolantValue = interpolant.evaluate( time )[ 0 ]; + + weight *= interpolantValue; + + if ( time > interpolant.parameterPositions[ 1 ] ) { + + this.stopFading(); + + if ( interpolantValue === 0 ) { + + // faded out, disable + this.enabled = false; + + } + + } + + } + + } + + this._effectiveWeight = weight; + return weight; + + } + + _updateTimeScale( time ) { + + let timeScale = 0; + + if ( ! this.paused ) { + + timeScale = this.timeScale; + + const interpolant = this._timeScaleInterpolant; + + if ( interpolant !== null ) { + + const interpolantValue = interpolant.evaluate( time )[ 0 ]; + + timeScale *= interpolantValue; + + if ( time > interpolant.parameterPositions[ 1 ] ) { + + this.stopWarping(); + + if ( timeScale === 0 ) { + + // motion has halted, pause + this.paused = true; + + } else { + + // warp done - apply final time scale + this.timeScale = timeScale; + + } + + } + + } + + } + + this._effectiveTimeScale = timeScale; + return timeScale; + + } + + _updateTime( deltaTime ) { + + const duration = this._clip.duration; + const loop = this.loop; + + let time = this.time + deltaTime; + let loopCount = this._loopCount; + + const pingPong = ( loop === LoopPingPong ); + + if ( deltaTime === 0 ) { + + if ( loopCount === - 1 ) return time; + + return ( pingPong && ( loopCount & 1 ) === 1 ) ? duration - time : time; + + } + + if ( loop === LoopOnce ) { + + if ( loopCount === - 1 ) { + + // just started + + this._loopCount = 0; + this._setEndings( true, true, false ); + + } + + handle_stop: { + + if ( time >= duration ) { + + time = duration; + + } else if ( time < 0 ) { + + time = 0; + + } else { + + this.time = time; + + break handle_stop; + + } + + if ( this.clampWhenFinished ) this.paused = true; + else this.enabled = false; + + this.time = time; + + this._mixer.dispatchEvent( { + type: 'finished', action: this, + direction: deltaTime < 0 ? - 1 : 1 + } ); + + } + + } else { // repetitive Repeat or PingPong + + if ( loopCount === - 1 ) { + + // just started + + if ( deltaTime >= 0 ) { + + loopCount = 0; + + this._setEndings( true, this.repetitions === 0, pingPong ); + + } else { + + // when looping in reverse direction, the initial + // transition through zero counts as a repetition, + // so leave loopCount at -1 + + this._setEndings( this.repetitions === 0, true, pingPong ); + + } + + } + + if ( time >= duration || time < 0 ) { + + // wrap around + + const loopDelta = Math.floor( time / duration ); // signed + time -= duration * loopDelta; + + loopCount += Math.abs( loopDelta ); + + const pending = this.repetitions - loopCount; + + if ( pending <= 0 ) { + + // have to stop (switch state, clamp time, fire event) + + if ( this.clampWhenFinished ) this.paused = true; + else this.enabled = false; + + time = deltaTime > 0 ? duration : 0; + + this.time = time; + + this._mixer.dispatchEvent( { + type: 'finished', action: this, + direction: deltaTime > 0 ? 1 : - 1 + } ); + + } else { + + // keep running + + if ( pending === 1 ) { + + // entering the last round + + const atStart = deltaTime < 0; + this._setEndings( atStart, ! atStart, pingPong ); + + } else { + + this._setEndings( false, false, pingPong ); + + } + + this._loopCount = loopCount; + + this.time = time; + + this._mixer.dispatchEvent( { + type: 'loop', action: this, loopDelta: loopDelta + } ); + + } + + } else { + + this.time = time; + + } + + if ( pingPong && ( loopCount & 1 ) === 1 ) { + + // invert time for the "pong round" + + return duration - time; + + } + + } + + return time; + + } + + _setEndings( atStart, atEnd, pingPong ) { + + const settings = this._interpolantSettings; + + if ( pingPong ) { + + settings.endingStart = ZeroSlopeEnding; + settings.endingEnd = ZeroSlopeEnding; + + } else { + + // assuming for LoopOnce atStart == atEnd == true + + if ( atStart ) { + + settings.endingStart = this.zeroSlopeAtStart ? ZeroSlopeEnding : ZeroCurvatureEnding; + + } else { + + settings.endingStart = WrapAroundEnding; + + } + + if ( atEnd ) { + + settings.endingEnd = this.zeroSlopeAtEnd ? ZeroSlopeEnding : ZeroCurvatureEnding; + + } else { + + settings.endingEnd = WrapAroundEnding; + + } + + } + + } + + _scheduleFading( duration, weightNow, weightThen ) { + + const mixer = this._mixer, now = mixer.time; + let interpolant = this._weightInterpolant; + + if ( interpolant === null ) { + + interpolant = mixer._lendControlInterpolant(); + this._weightInterpolant = interpolant; + + } + + const times = interpolant.parameterPositions, + values = interpolant.sampleValues; + + times[ 0 ] = now; + values[ 0 ] = weightNow; + times[ 1 ] = now + duration; + values[ 1 ] = weightThen; + + return this; + + } + +} + +const _controlInterpolantsResultBuffer = new Float32Array( 1 ); + + +class AnimationMixer extends EventDispatcher { + + constructor( root ) { + + super(); + + this._root = root; + this._initMemoryManager(); + this._accuIndex = 0; + this.time = 0; + this.timeScale = 1.0; + + } + + _bindAction( action, prototypeAction ) { + + const root = action._localRoot || this._root, + tracks = action._clip.tracks, + nTracks = tracks.length, + bindings = action._propertyBindings, + interpolants = action._interpolants, + rootUuid = root.uuid, + bindingsByRoot = this._bindingsByRootAndName; + + let bindingsByName = bindingsByRoot[ rootUuid ]; + + if ( bindingsByName === undefined ) { + + bindingsByName = {}; + bindingsByRoot[ rootUuid ] = bindingsByName; + + } + + for ( let i = 0; i !== nTracks; ++ i ) { + + const track = tracks[ i ], + trackName = track.name; + + let binding = bindingsByName[ trackName ]; + + if ( binding !== undefined ) { + + ++ binding.referenceCount; + bindings[ i ] = binding; + + } else { + + binding = bindings[ i ]; + + if ( binding !== undefined ) { + + // existing binding, make sure the cache knows + + if ( binding._cacheIndex === null ) { + + ++ binding.referenceCount; + this._addInactiveBinding( binding, rootUuid, trackName ); + + } + + continue; + + } + + const path = prototypeAction && prototypeAction. + _propertyBindings[ i ].binding.parsedPath; + + binding = new PropertyMixer( + PropertyBinding.create( root, trackName, path ), + track.ValueTypeName, track.getValueSize() ); + + ++ binding.referenceCount; + this._addInactiveBinding( binding, rootUuid, trackName ); + + bindings[ i ] = binding; + + } + + interpolants[ i ].resultBuffer = binding.buffer; + + } + + } + + _activateAction( action ) { + + if ( ! this._isActiveAction( action ) ) { + + if ( action._cacheIndex === null ) { + + // this action has been forgotten by the cache, but the user + // appears to be still using it -> rebind + + const rootUuid = ( action._localRoot || this._root ).uuid, + clipUuid = action._clip.uuid, + actionsForClip = this._actionsByClip[ clipUuid ]; + + this._bindAction( action, + actionsForClip && actionsForClip.knownActions[ 0 ] ); + + this._addInactiveAction( action, clipUuid, rootUuid ); + + } + + const bindings = action._propertyBindings; + + // increment reference counts / sort out state + for ( let i = 0, n = bindings.length; i !== n; ++ i ) { + + const binding = bindings[ i ]; + + if ( binding.useCount ++ === 0 ) { + + this._lendBinding( binding ); + binding.saveOriginalState(); + + } + + } + + this._lendAction( action ); + + } + + } + + _deactivateAction( action ) { + + if ( this._isActiveAction( action ) ) { + + const bindings = action._propertyBindings; + + // decrement reference counts / sort out state + for ( let i = 0, n = bindings.length; i !== n; ++ i ) { + + const binding = bindings[ i ]; + + if ( -- binding.useCount === 0 ) { + + binding.restoreOriginalState(); + this._takeBackBinding( binding ); + + } + + } + + this._takeBackAction( action ); + + } + + } + + // Memory manager + + _initMemoryManager() { + + this._actions = []; // 'nActiveActions' followed by inactive ones + this._nActiveActions = 0; + + this._actionsByClip = {}; + // inside: + // { + // knownActions: Array< AnimationAction > - used as prototypes + // actionByRoot: AnimationAction - lookup + // } + + + this._bindings = []; // 'nActiveBindings' followed by inactive ones + this._nActiveBindings = 0; + + this._bindingsByRootAndName = {}; // inside: Map< name, PropertyMixer > + + + this._controlInterpolants = []; // same game as above + this._nActiveControlInterpolants = 0; + + const scope = this; + + this.stats = { + + actions: { + get total() { + + return scope._actions.length; + + }, + get inUse() { + + return scope._nActiveActions; + + } + }, + bindings: { + get total() { + + return scope._bindings.length; + + }, + get inUse() { + + return scope._nActiveBindings; + + } + }, + controlInterpolants: { + get total() { + + return scope._controlInterpolants.length; + + }, + get inUse() { + + return scope._nActiveControlInterpolants; + + } + } + + }; + + } + + // Memory management for AnimationAction objects + + _isActiveAction( action ) { + + const index = action._cacheIndex; + return index !== null && index < this._nActiveActions; + + } + + _addInactiveAction( action, clipUuid, rootUuid ) { + + const actions = this._actions, + actionsByClip = this._actionsByClip; + + let actionsForClip = actionsByClip[ clipUuid ]; + + if ( actionsForClip === undefined ) { + + actionsForClip = { + + knownActions: [ action ], + actionByRoot: {} + + }; + + action._byClipCacheIndex = 0; + + actionsByClip[ clipUuid ] = actionsForClip; + + } else { + + const knownActions = actionsForClip.knownActions; + + action._byClipCacheIndex = knownActions.length; + knownActions.push( action ); + + } + + action._cacheIndex = actions.length; + actions.push( action ); + + actionsForClip.actionByRoot[ rootUuid ] = action; + + } + + _removeInactiveAction( action ) { + + const actions = this._actions, + lastInactiveAction = actions[ actions.length - 1 ], + cacheIndex = action._cacheIndex; + + lastInactiveAction._cacheIndex = cacheIndex; + actions[ cacheIndex ] = lastInactiveAction; + actions.pop(); + + action._cacheIndex = null; + + + const clipUuid = action._clip.uuid, + actionsByClip = this._actionsByClip, + actionsForClip = actionsByClip[ clipUuid ], + knownActionsForClip = actionsForClip.knownActions, + + lastKnownAction = + knownActionsForClip[ knownActionsForClip.length - 1 ], + + byClipCacheIndex = action._byClipCacheIndex; + + lastKnownAction._byClipCacheIndex = byClipCacheIndex; + knownActionsForClip[ byClipCacheIndex ] = lastKnownAction; + knownActionsForClip.pop(); + + action._byClipCacheIndex = null; + + + const actionByRoot = actionsForClip.actionByRoot, + rootUuid = ( action._localRoot || this._root ).uuid; + + delete actionByRoot[ rootUuid ]; + + if ( knownActionsForClip.length === 0 ) { + + delete actionsByClip[ clipUuid ]; + + } + + this._removeInactiveBindingsForAction( action ); + + } + + _removeInactiveBindingsForAction( action ) { + + const bindings = action._propertyBindings; + + for ( let i = 0, n = bindings.length; i !== n; ++ i ) { + + const binding = bindings[ i ]; + + if ( -- binding.referenceCount === 0 ) { + + this._removeInactiveBinding( binding ); + + } + + } + + } + + _lendAction( action ) { + + // [ active actions | inactive actions ] + // [ active actions >| inactive actions ] + // s a + // <-swap-> + // a s + + const actions = this._actions, + prevIndex = action._cacheIndex, + + lastActiveIndex = this._nActiveActions ++, + + firstInactiveAction = actions[ lastActiveIndex ]; + + action._cacheIndex = lastActiveIndex; + actions[ lastActiveIndex ] = action; + + firstInactiveAction._cacheIndex = prevIndex; + actions[ prevIndex ] = firstInactiveAction; + + } + + _takeBackAction( action ) { + + // [ active actions | inactive actions ] + // [ active actions |< inactive actions ] + // a s + // <-swap-> + // s a + + const actions = this._actions, + prevIndex = action._cacheIndex, + + firstInactiveIndex = -- this._nActiveActions, + + lastActiveAction = actions[ firstInactiveIndex ]; + + action._cacheIndex = firstInactiveIndex; + actions[ firstInactiveIndex ] = action; + + lastActiveAction._cacheIndex = prevIndex; + actions[ prevIndex ] = lastActiveAction; + + } + + // Memory management for PropertyMixer objects + + _addInactiveBinding( binding, rootUuid, trackName ) { + + const bindingsByRoot = this._bindingsByRootAndName, + bindings = this._bindings; + + let bindingByName = bindingsByRoot[ rootUuid ]; + + if ( bindingByName === undefined ) { + + bindingByName = {}; + bindingsByRoot[ rootUuid ] = bindingByName; + + } + + bindingByName[ trackName ] = binding; + + binding._cacheIndex = bindings.length; + bindings.push( binding ); + + } + + _removeInactiveBinding( binding ) { + + const bindings = this._bindings, + propBinding = binding.binding, + rootUuid = propBinding.rootNode.uuid, + trackName = propBinding.path, + bindingsByRoot = this._bindingsByRootAndName, + bindingByName = bindingsByRoot[ rootUuid ], + + lastInactiveBinding = bindings[ bindings.length - 1 ], + cacheIndex = binding._cacheIndex; + + lastInactiveBinding._cacheIndex = cacheIndex; + bindings[ cacheIndex ] = lastInactiveBinding; + bindings.pop(); + + delete bindingByName[ trackName ]; + + if ( Object.keys( bindingByName ).length === 0 ) { + + delete bindingsByRoot[ rootUuid ]; + + } + + } + + _lendBinding( binding ) { + + const bindings = this._bindings, + prevIndex = binding._cacheIndex, + + lastActiveIndex = this._nActiveBindings ++, + + firstInactiveBinding = bindings[ lastActiveIndex ]; + + binding._cacheIndex = lastActiveIndex; + bindings[ lastActiveIndex ] = binding; + + firstInactiveBinding._cacheIndex = prevIndex; + bindings[ prevIndex ] = firstInactiveBinding; + + } + + _takeBackBinding( binding ) { + + const bindings = this._bindings, + prevIndex = binding._cacheIndex, + + firstInactiveIndex = -- this._nActiveBindings, + + lastActiveBinding = bindings[ firstInactiveIndex ]; + + binding._cacheIndex = firstInactiveIndex; + bindings[ firstInactiveIndex ] = binding; + + lastActiveBinding._cacheIndex = prevIndex; + bindings[ prevIndex ] = lastActiveBinding; + + } + + + // Memory management of Interpolants for weight and time scale + + _lendControlInterpolant() { + + const interpolants = this._controlInterpolants, + lastActiveIndex = this._nActiveControlInterpolants ++; + + let interpolant = interpolants[ lastActiveIndex ]; + + if ( interpolant === undefined ) { + + interpolant = new LinearInterpolant( + new Float32Array( 2 ), new Float32Array( 2 ), + 1, _controlInterpolantsResultBuffer ); + + interpolant.__cacheIndex = lastActiveIndex; + interpolants[ lastActiveIndex ] = interpolant; + + } + + return interpolant; + + } + + _takeBackControlInterpolant( interpolant ) { + + const interpolants = this._controlInterpolants, + prevIndex = interpolant.__cacheIndex, + + firstInactiveIndex = -- this._nActiveControlInterpolants, + + lastActiveInterpolant = interpolants[ firstInactiveIndex ]; + + interpolant.__cacheIndex = firstInactiveIndex; + interpolants[ firstInactiveIndex ] = interpolant; + + lastActiveInterpolant.__cacheIndex = prevIndex; + interpolants[ prevIndex ] = lastActiveInterpolant; + + } + + // return an action for a clip optionally using a custom root target + // object (this method allocates a lot of dynamic memory in case a + // previously unknown clip/root combination is specified) + clipAction( clip, optionalRoot, blendMode ) { + + const root = optionalRoot || this._root, + rootUuid = root.uuid; + + let clipObject = typeof clip === 'string' ? AnimationClip.findByName( root, clip ) : clip; + + const clipUuid = clipObject !== null ? clipObject.uuid : clip; + + const actionsForClip = this._actionsByClip[ clipUuid ]; + let prototypeAction = null; + + if ( blendMode === undefined ) { + + if ( clipObject !== null ) { + + blendMode = clipObject.blendMode; + + } else { + + blendMode = NormalAnimationBlendMode; + + } + + } + + if ( actionsForClip !== undefined ) { + + const existingAction = actionsForClip.actionByRoot[ rootUuid ]; + + if ( existingAction !== undefined && existingAction.blendMode === blendMode ) { + + return existingAction; + + } + + // we know the clip, so we don't have to parse all + // the bindings again but can just copy + prototypeAction = actionsForClip.knownActions[ 0 ]; + + // also, take the clip from the prototype action + if ( clipObject === null ) + clipObject = prototypeAction._clip; + + } + + // clip must be known when specified via string + if ( clipObject === null ) return null; + + // allocate all resources required to run it + const newAction = new AnimationAction( this, clipObject, optionalRoot, blendMode ); + + this._bindAction( newAction, prototypeAction ); + + // and make the action known to the memory manager + this._addInactiveAction( newAction, clipUuid, rootUuid ); + + return newAction; + + } + + // get an existing action + existingAction( clip, optionalRoot ) { + + const root = optionalRoot || this._root, + rootUuid = root.uuid, + + clipObject = typeof clip === 'string' ? + AnimationClip.findByName( root, clip ) : clip, + + clipUuid = clipObject ? clipObject.uuid : clip, + + actionsForClip = this._actionsByClip[ clipUuid ]; + + if ( actionsForClip !== undefined ) { + + return actionsForClip.actionByRoot[ rootUuid ] || null; + + } + + return null; + + } + + // deactivates all previously scheduled actions + stopAllAction() { + + const actions = this._actions, + nActions = this._nActiveActions; + + for ( let i = nActions - 1; i >= 0; -- i ) { + + actions[ i ].stop(); + + } + + return this; + + } + + // advance the time and update apply the animation + update( deltaTime ) { + + deltaTime *= this.timeScale; + + const actions = this._actions, + nActions = this._nActiveActions, + + time = this.time += deltaTime, + timeDirection = Math.sign( deltaTime ), + + accuIndex = this._accuIndex ^= 1; + + // run active actions + + for ( let i = 0; i !== nActions; ++ i ) { + + const action = actions[ i ]; + + action._update( time, deltaTime, timeDirection, accuIndex ); + + } + + // update scene graph + + const bindings = this._bindings, + nBindings = this._nActiveBindings; + + for ( let i = 0; i !== nBindings; ++ i ) { + + bindings[ i ].apply( accuIndex ); + + } + + return this; + + } + + // Allows you to seek to a specific time in an animation. + setTime( timeInSeconds ) { + + this.time = 0; // Zero out time attribute for AnimationMixer object; + for ( let i = 0; i < this._actions.length; i ++ ) { + + this._actions[ i ].time = 0; // Zero out time attribute for all associated AnimationAction objects. + + } + + return this.update( timeInSeconds ); // Update used to set exact time. Returns "this" AnimationMixer object. + + } + + // return this mixer's root target object + getRoot() { + + return this._root; + + } + + // free all resources specific to a particular clip + uncacheClip( clip ) { + + const actions = this._actions, + clipUuid = clip.uuid, + actionsByClip = this._actionsByClip, + actionsForClip = actionsByClip[ clipUuid ]; + + if ( actionsForClip !== undefined ) { + + // note: just calling _removeInactiveAction would mess up the + // iteration state and also require updating the state we can + // just throw away + + const actionsToRemove = actionsForClip.knownActions; + + for ( let i = 0, n = actionsToRemove.length; i !== n; ++ i ) { + + const action = actionsToRemove[ i ]; + + this._deactivateAction( action ); + + const cacheIndex = action._cacheIndex, + lastInactiveAction = actions[ actions.length - 1 ]; + + action._cacheIndex = null; + action._byClipCacheIndex = null; + + lastInactiveAction._cacheIndex = cacheIndex; + actions[ cacheIndex ] = lastInactiveAction; + actions.pop(); + + this._removeInactiveBindingsForAction( action ); + + } + + delete actionsByClip[ clipUuid ]; + + } + + } + + // free all resources specific to a particular root target object + uncacheRoot( root ) { + + const rootUuid = root.uuid, + actionsByClip = this._actionsByClip; + + for ( const clipUuid in actionsByClip ) { + + const actionByRoot = actionsByClip[ clipUuid ].actionByRoot, + action = actionByRoot[ rootUuid ]; + + if ( action !== undefined ) { + + this._deactivateAction( action ); + this._removeInactiveAction( action ); + + } + + } + + const bindingsByRoot = this._bindingsByRootAndName, + bindingByName = bindingsByRoot[ rootUuid ]; + + if ( bindingByName !== undefined ) { + + for ( const trackName in bindingByName ) { + + const binding = bindingByName[ trackName ]; + binding.restoreOriginalState(); + this._removeInactiveBinding( binding ); + + } + + } + + } + + // remove a targeted clip from the cache + uncacheAction( clip, optionalRoot ) { + + const action = this.existingAction( clip, optionalRoot ); + + if ( action !== null ) { + + this._deactivateAction( action ); + this._removeInactiveAction( action ); + + } + + } + +} + +class Uniform { + + constructor( value ) { + + this.value = value; + + } + + clone() { + + return new Uniform( this.value.clone === undefined ? this.value : this.value.clone() ); + + } + +} + +let _id = 0; + +class UniformsGroup extends EventDispatcher { + + constructor() { + + super(); + + this.isUniformsGroup = true; + + Object.defineProperty( this, 'id', { value: _id ++ } ); + + this.name = ''; + + this.usage = StaticDrawUsage; + this.uniforms = []; + + } + + add( uniform ) { + + this.uniforms.push( uniform ); + + return this; + + } + + remove( uniform ) { + + const index = this.uniforms.indexOf( uniform ); + + if ( index !== - 1 ) this.uniforms.splice( index, 1 ); + + return this; + + } + + setName( name ) { + + this.name = name; + + return this; + + } + + setUsage( value ) { + + this.usage = value; + + return this; + + } + + dispose() { + + this.dispatchEvent( { type: 'dispose' } ); + + return this; + + } + + copy( source ) { + + this.name = source.name; + this.usage = source.usage; + + const uniformsSource = source.uniforms; + + this.uniforms.length = 0; + + for ( let i = 0, l = uniformsSource.length; i < l; i ++ ) { + + const uniforms = Array.isArray( uniformsSource[ i ] ) ? uniformsSource[ i ] : [ uniformsSource[ i ] ]; + + for ( let j = 0; j < uniforms.length; j ++ ) { + + this.uniforms.push( uniforms[ j ].clone() ); + + } + + } + + return this; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +class InstancedInterleavedBuffer extends InterleavedBuffer { + + constructor( array, stride, meshPerAttribute = 1 ) { + + super( array, stride ); + + this.isInstancedInterleavedBuffer = true; + + this.meshPerAttribute = meshPerAttribute; + + } + + copy( source ) { + + super.copy( source ); + + this.meshPerAttribute = source.meshPerAttribute; + + return this; + + } + + clone( data ) { + + const ib = super.clone( data ); + + ib.meshPerAttribute = this.meshPerAttribute; + + return ib; + + } + + toJSON( data ) { + + const json = super.toJSON( data ); + + json.isInstancedInterleavedBuffer = true; + json.meshPerAttribute = this.meshPerAttribute; + + return json; + + } + +} + +class GLBufferAttribute { + + constructor( buffer, type, itemSize, elementSize, count ) { + + this.isGLBufferAttribute = true; + + this.name = ''; + + this.buffer = buffer; + this.type = type; + this.itemSize = itemSize; + this.elementSize = elementSize; + this.count = count; + + this.version = 0; + + } + + set needsUpdate( value ) { + + if ( value === true ) this.version ++; + + } + + setBuffer( buffer ) { + + this.buffer = buffer; + + return this; + + } + + setType( type, elementSize ) { + + this.type = type; + this.elementSize = elementSize; + + return this; + + } + + setItemSize( itemSize ) { + + this.itemSize = itemSize; + + return this; + + } + + setCount( count ) { + + this.count = count; + + return this; + + } + +} + +const _matrix = /*@__PURE__*/ new Matrix4(); + +class Raycaster { + + constructor( origin, direction, near = 0, far = Infinity ) { + + this.ray = new Ray( origin, direction ); + // direction is assumed to be normalized (for accurate distance calculations) + + this.near = near; + this.far = far; + this.camera = null; + this.layers = new Layers(); + + this.params = { + Mesh: {}, + Line: { threshold: 1 }, + LOD: {}, + Points: { threshold: 1 }, + Sprite: {} + }; + + } + + set( origin, direction ) { + + // direction is assumed to be normalized (for accurate distance calculations) + + this.ray.set( origin, direction ); + + } + + setFromCamera( coords, camera ) { + + if ( camera.isPerspectiveCamera ) { + + this.ray.origin.setFromMatrixPosition( camera.matrixWorld ); + this.ray.direction.set( coords.x, coords.y, 0.5 ).unproject( camera ).sub( this.ray.origin ).normalize(); + this.camera = camera; + + } else if ( camera.isOrthographicCamera ) { + + this.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera + this.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld ); + this.camera = camera; + + } else { + + console.error( 'THREE.Raycaster: Unsupported camera type: ' + camera.type ); + + } + + } + + setFromXRController( controller ) { + + _matrix.identity().extractRotation( controller.matrixWorld ); + + this.ray.origin.setFromMatrixPosition( controller.matrixWorld ); + this.ray.direction.set( 0, 0, - 1 ).applyMatrix4( _matrix ); + + return this; + + } + + intersectObject( object, recursive = true, intersects = [] ) { + + intersect( object, this, intersects, recursive ); + + intersects.sort( ascSort ); + + return intersects; + + } + + intersectObjects( objects, recursive = true, intersects = [] ) { + + for ( let i = 0, l = objects.length; i < l; i ++ ) { + + intersect( objects[ i ], this, intersects, recursive ); + + } + + intersects.sort( ascSort ); + + return intersects; + + } + +} + +function ascSort( a, b ) { + + return a.distance - b.distance; + +} + +function intersect( object, raycaster, intersects, recursive ) { + + if ( object.layers.test( raycaster.layers ) ) { + + object.raycast( raycaster, intersects ); + + } + + if ( recursive === true ) { + + const children = object.children; + + for ( let i = 0, l = children.length; i < l; i ++ ) { + + intersect( children[ i ], raycaster, intersects, true ); + + } + + } + +} + +/** + * Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system + * + * phi (the polar angle) is measured from the positive y-axis. The positive y-axis is up. + * theta (the azimuthal angle) is measured from the positive z-axis. + */ +class Spherical { + + constructor( radius = 1, phi = 0, theta = 0 ) { + + this.radius = radius; + this.phi = phi; // polar angle + this.theta = theta; // azimuthal angle + + return this; + + } + + set( radius, phi, theta ) { + + this.radius = radius; + this.phi = phi; + this.theta = theta; + + return this; + + } + + copy( other ) { + + this.radius = other.radius; + this.phi = other.phi; + this.theta = other.theta; + + return this; + + } + + // restrict phi to be between EPS and PI-EPS + makeSafe() { + + const EPS = 0.000001; + this.phi = Math.max( EPS, Math.min( Math.PI - EPS, this.phi ) ); + + return this; + + } + + setFromVector3( v ) { + + return this.setFromCartesianCoords( v.x, v.y, v.z ); + + } + + setFromCartesianCoords( x, y, z ) { + + this.radius = Math.sqrt( x * x + y * y + z * z ); + + if ( this.radius === 0 ) { + + this.theta = 0; + this.phi = 0; + + } else { + + this.theta = Math.atan2( x, z ); + this.phi = Math.acos( clamp( y / this.radius, - 1, 1 ) ); + + } + + return this; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +/** + * Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system + */ + +class Cylindrical { + + constructor( radius = 1, theta = 0, y = 0 ) { + + this.radius = radius; // distance from the origin to a point in the x-z plane + this.theta = theta; // counterclockwise angle in the x-z plane measured in radians from the positive z-axis + this.y = y; // height above the x-z plane + + return this; + + } + + set( radius, theta, y ) { + + this.radius = radius; + this.theta = theta; + this.y = y; + + return this; + + } + + copy( other ) { + + this.radius = other.radius; + this.theta = other.theta; + this.y = other.y; + + return this; + + } + + setFromVector3( v ) { + + return this.setFromCartesianCoords( v.x, v.y, v.z ); + + } + + setFromCartesianCoords( x, y, z ) { + + this.radius = Math.sqrt( x * x + z * z ); + this.theta = Math.atan2( x, z ); + this.y = y; + + return this; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +const _vector$4 = /*@__PURE__*/ new Vector2(); + +class Box2 { + + constructor( min = new Vector2( + Infinity, + Infinity ), max = new Vector2( - Infinity, - Infinity ) ) { + + this.isBox2 = true; + + this.min = min; + this.max = max; + + } + + set( min, max ) { + + this.min.copy( min ); + this.max.copy( max ); + + return this; + + } + + setFromPoints( points ) { + + this.makeEmpty(); + + for ( let i = 0, il = points.length; i < il; i ++ ) { + + this.expandByPoint( points[ i ] ); + + } + + return this; + + } + + setFromCenterAndSize( center, size ) { + + const halfSize = _vector$4.copy( size ).multiplyScalar( 0.5 ); + this.min.copy( center ).sub( halfSize ); + this.max.copy( center ).add( halfSize ); + + return this; + + } + + clone() { + + return new this.constructor().copy( this ); + + } + + copy( box ) { + + this.min.copy( box.min ); + this.max.copy( box.max ); + + return this; + + } + + makeEmpty() { + + this.min.x = this.min.y = + Infinity; + this.max.x = this.max.y = - Infinity; + + return this; + + } + + isEmpty() { + + // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes + + return ( this.max.x < this.min.x ) || ( this.max.y < this.min.y ); + + } + + getCenter( target ) { + + return this.isEmpty() ? target.set( 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 ); + + } + + getSize( target ) { + + return this.isEmpty() ? target.set( 0, 0 ) : target.subVectors( this.max, this.min ); + + } + + expandByPoint( point ) { + + this.min.min( point ); + this.max.max( point ); + + return this; + + } + + expandByVector( vector ) { + + this.min.sub( vector ); + this.max.add( vector ); + + return this; + + } + + expandByScalar( scalar ) { + + this.min.addScalar( - scalar ); + this.max.addScalar( scalar ); + + return this; + + } + + containsPoint( point ) { + + return point.x < this.min.x || point.x > this.max.x || + point.y < this.min.y || point.y > this.max.y ? false : true; + + } + + containsBox( box ) { + + return this.min.x <= box.min.x && box.max.x <= this.max.x && + this.min.y <= box.min.y && box.max.y <= this.max.y; + + } + + getParameter( point, target ) { + + // This can potentially have a divide by zero if the box + // has a size dimension of 0. + + return target.set( + ( point.x - this.min.x ) / ( this.max.x - this.min.x ), + ( point.y - this.min.y ) / ( this.max.y - this.min.y ) + ); + + } + + intersectsBox( box ) { + + // using 4 splitting planes to rule out intersections + + return box.max.x < this.min.x || box.min.x > this.max.x || + box.max.y < this.min.y || box.min.y > this.max.y ? false : true; + + } + + clampPoint( point, target ) { + + return target.copy( point ).clamp( this.min, this.max ); + + } + + distanceToPoint( point ) { + + return this.clampPoint( point, _vector$4 ).distanceTo( point ); + + } + + intersect( box ) { + + this.min.max( box.min ); + this.max.min( box.max ); + + if ( this.isEmpty() ) this.makeEmpty(); + + return this; + + } + + union( box ) { + + this.min.min( box.min ); + this.max.max( box.max ); + + return this; + + } + + translate( offset ) { + + this.min.add( offset ); + this.max.add( offset ); + + return this; + + } + + equals( box ) { + + return box.min.equals( this.min ) && box.max.equals( this.max ); + + } + +} + +const _startP = /*@__PURE__*/ new Vector3(); +const _startEnd = /*@__PURE__*/ new Vector3(); + +class Line3 { + + constructor( start = new Vector3(), end = new Vector3() ) { + + this.start = start; + this.end = end; + + } + + set( start, end ) { + + this.start.copy( start ); + this.end.copy( end ); + + return this; + + } + + copy( line ) { + + this.start.copy( line.start ); + this.end.copy( line.end ); + + return this; + + } + + getCenter( target ) { + + return target.addVectors( this.start, this.end ).multiplyScalar( 0.5 ); + + } + + delta( target ) { + + return target.subVectors( this.end, this.start ); + + } + + distanceSq() { + + return this.start.distanceToSquared( this.end ); + + } + + distance() { + + return this.start.distanceTo( this.end ); + + } + + at( t, target ) { + + return this.delta( target ).multiplyScalar( t ).add( this.start ); + + } + + closestPointToPointParameter( point, clampToLine ) { + + _startP.subVectors( point, this.start ); + _startEnd.subVectors( this.end, this.start ); + + const startEnd2 = _startEnd.dot( _startEnd ); + const startEnd_startP = _startEnd.dot( _startP ); + + let t = startEnd_startP / startEnd2; + + if ( clampToLine ) { + + t = clamp( t, 0, 1 ); + + } + + return t; + + } + + closestPointToPoint( point, clampToLine, target ) { + + const t = this.closestPointToPointParameter( point, clampToLine ); + + return this.delta( target ).multiplyScalar( t ).add( this.start ); + + } + + applyMatrix4( matrix ) { + + this.start.applyMatrix4( matrix ); + this.end.applyMatrix4( matrix ); + + return this; + + } + + equals( line ) { + + return line.start.equals( this.start ) && line.end.equals( this.end ); + + } + + clone() { + + return new this.constructor().copy( this ); + + } + +} + +const _vector$3 = /*@__PURE__*/ new Vector3(); + +class SpotLightHelper extends Object3D { + + constructor( light, color ) { + + super(); + + this.light = light; + + this.matrixAutoUpdate = false; + + this.color = color; + + this.type = 'SpotLightHelper'; + + const geometry = new BufferGeometry(); + + const positions = [ + 0, 0, 0, 0, 0, 1, + 0, 0, 0, 1, 0, 1, + 0, 0, 0, - 1, 0, 1, + 0, 0, 0, 0, 1, 1, + 0, 0, 0, 0, - 1, 1 + ]; + + for ( let i = 0, j = 1, l = 32; i < l; i ++, j ++ ) { + + const p1 = ( i / l ) * Math.PI * 2; + const p2 = ( j / l ) * Math.PI * 2; + + positions.push( + Math.cos( p1 ), Math.sin( p1 ), 1, + Math.cos( p2 ), Math.sin( p2 ), 1 + ); + + } + + geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); + + const material = new LineBasicMaterial( { fog: false, toneMapped: false } ); + + this.cone = new LineSegments( geometry, material ); + this.add( this.cone ); + + this.update(); + + } + + dispose() { + + this.cone.geometry.dispose(); + this.cone.material.dispose(); + + } + + update() { + + this.light.updateWorldMatrix( true, false ); + this.light.target.updateWorldMatrix( true, false ); + + // update the local matrix based on the parent and light target transforms + if ( this.parent ) { + + this.parent.updateWorldMatrix( true ); + + this.matrix + .copy( this.parent.matrixWorld ) + .invert() + .multiply( this.light.matrixWorld ); + + } else { + + this.matrix.copy( this.light.matrixWorld ); + + } + + this.matrixWorld.copy( this.light.matrixWorld ); + + const coneLength = this.light.distance ? this.light.distance : 1000; + const coneWidth = coneLength * Math.tan( this.light.angle ); + + this.cone.scale.set( coneWidth, coneWidth, coneLength ); + + _vector$3.setFromMatrixPosition( this.light.target.matrixWorld ); + + this.cone.lookAt( _vector$3 ); + + if ( this.color !== undefined ) { + + this.cone.material.color.set( this.color ); + + } else { + + this.cone.material.color.copy( this.light.color ); + + } + + } + +} + +const _vector$2 = /*@__PURE__*/ new Vector3(); +const _boneMatrix = /*@__PURE__*/ new Matrix4(); +const _matrixWorldInv = /*@__PURE__*/ new Matrix4(); + + +class SkeletonHelper extends LineSegments { + + constructor( object ) { + + const bones = getBoneList( object ); + + const geometry = new BufferGeometry(); + + const vertices = []; + const colors = []; + + const color1 = new Color( 0, 0, 1 ); + const color2 = new Color( 0, 1, 0 ); + + for ( let i = 0; i < bones.length; i ++ ) { + + const bone = bones[ i ]; + + if ( bone.parent && bone.parent.isBone ) { + + vertices.push( 0, 0, 0 ); + vertices.push( 0, 0, 0 ); + colors.push( color1.r, color1.g, color1.b ); + colors.push( color2.r, color2.g, color2.b ); + + } + + } + + geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); + + const material = new LineBasicMaterial( { vertexColors: true, depthTest: false, depthWrite: false, toneMapped: false, transparent: true } ); + + super( geometry, material ); + + this.isSkeletonHelper = true; + + this.type = 'SkeletonHelper'; + + this.root = object; + this.bones = bones; + + this.matrix = object.matrixWorld; + this.matrixAutoUpdate = false; + + } + + updateMatrixWorld( force ) { + + const bones = this.bones; + + const geometry = this.geometry; + const position = geometry.getAttribute( 'position' ); + + _matrixWorldInv.copy( this.root.matrixWorld ).invert(); + + for ( let i = 0, j = 0; i < bones.length; i ++ ) { + + const bone = bones[ i ]; + + if ( bone.parent && bone.parent.isBone ) { + + _boneMatrix.multiplyMatrices( _matrixWorldInv, bone.matrixWorld ); + _vector$2.setFromMatrixPosition( _boneMatrix ); + position.setXYZ( j, _vector$2.x, _vector$2.y, _vector$2.z ); + + _boneMatrix.multiplyMatrices( _matrixWorldInv, bone.parent.matrixWorld ); + _vector$2.setFromMatrixPosition( _boneMatrix ); + position.setXYZ( j + 1, _vector$2.x, _vector$2.y, _vector$2.z ); + + j += 2; + + } + + } + + geometry.getAttribute( 'position' ).needsUpdate = true; + + super.updateMatrixWorld( force ); + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + + +function getBoneList( object ) { + + const boneList = []; + + if ( object.isBone === true ) { + + boneList.push( object ); + + } + + for ( let i = 0; i < object.children.length; i ++ ) { + + boneList.push.apply( boneList, getBoneList( object.children[ i ] ) ); + + } + + return boneList; + +} + +class PointLightHelper extends Mesh { + + constructor( light, sphereSize, color ) { + + const geometry = new SphereGeometry( sphereSize, 4, 2 ); + const material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } ); + + super( geometry, material ); + + this.light = light; + + this.color = color; + + this.type = 'PointLightHelper'; + + this.matrix = this.light.matrixWorld; + this.matrixAutoUpdate = false; + + this.update(); + + + /* + // TODO: delete this comment? + const distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 ); + const distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } ); + + this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial ); + this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial ); + + const d = light.distance; + + if ( d === 0.0 ) { + + this.lightDistance.visible = false; + + } else { + + this.lightDistance.scale.set( d, d, d ); + + } + + this.add( this.lightDistance ); + */ + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + + update() { + + this.light.updateWorldMatrix( true, false ); + + if ( this.color !== undefined ) { + + this.material.color.set( this.color ); + + } else { + + this.material.color.copy( this.light.color ); + + } + + /* + const d = this.light.distance; + + if ( d === 0.0 ) { + + this.lightDistance.visible = false; + + } else { + + this.lightDistance.visible = true; + this.lightDistance.scale.set( d, d, d ); + + } + */ + + } + +} + +const _vector$1 = /*@__PURE__*/ new Vector3(); +const _color1 = /*@__PURE__*/ new Color(); +const _color2 = /*@__PURE__*/ new Color(); + +class HemisphereLightHelper extends Object3D { + + constructor( light, size, color ) { + + super(); + + this.light = light; + + this.matrix = light.matrixWorld; + this.matrixAutoUpdate = false; + + this.color = color; + + this.type = 'HemisphereLightHelper'; + + const geometry = new OctahedronGeometry( size ); + geometry.rotateY( Math.PI * 0.5 ); + + this.material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } ); + if ( this.color === undefined ) this.material.vertexColors = true; + + const position = geometry.getAttribute( 'position' ); + const colors = new Float32Array( position.count * 3 ); + + geometry.setAttribute( 'color', new BufferAttribute( colors, 3 ) ); + + this.add( new Mesh( geometry, this.material ) ); + + this.update(); + + } + + dispose() { + + this.children[ 0 ].geometry.dispose(); + this.children[ 0 ].material.dispose(); + + } + + update() { + + const mesh = this.children[ 0 ]; + + if ( this.color !== undefined ) { + + this.material.color.set( this.color ); + + } else { + + const colors = mesh.geometry.getAttribute( 'color' ); + + _color1.copy( this.light.color ); + _color2.copy( this.light.groundColor ); + + for ( let i = 0, l = colors.count; i < l; i ++ ) { + + const color = ( i < ( l / 2 ) ) ? _color1 : _color2; + + colors.setXYZ( i, color.r, color.g, color.b ); + + } + + colors.needsUpdate = true; + + } + + this.light.updateWorldMatrix( true, false ); + + mesh.lookAt( _vector$1.setFromMatrixPosition( this.light.matrixWorld ).negate() ); + + } + +} + +class GridHelper extends LineSegments { + + constructor( size = 10, divisions = 10, color1 = 0x444444, color2 = 0x888888 ) { + + color1 = new Color( color1 ); + color2 = new Color( color2 ); + + const center = divisions / 2; + const step = size / divisions; + const halfSize = size / 2; + + const vertices = [], colors = []; + + for ( let i = 0, j = 0, k = - halfSize; i <= divisions; i ++, k += step ) { + + vertices.push( - halfSize, 0, k, halfSize, 0, k ); + vertices.push( k, 0, - halfSize, k, 0, halfSize ); + + const color = i === center ? color1 : color2; + + color.toArray( colors, j ); j += 3; + color.toArray( colors, j ); j += 3; + color.toArray( colors, j ); j += 3; + color.toArray( colors, j ); j += 3; + + } + + const geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); + + const material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } ); + + super( geometry, material ); + + this.type = 'GridHelper'; + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +class PolarGridHelper extends LineSegments { + + constructor( radius = 10, sectors = 16, rings = 8, divisions = 64, color1 = 0x444444, color2 = 0x888888 ) { + + color1 = new Color( color1 ); + color2 = new Color( color2 ); + + const vertices = []; + const colors = []; + + // create the sectors + + if ( sectors > 1 ) { + + for ( let i = 0; i < sectors; i ++ ) { + + const v = ( i / sectors ) * ( Math.PI * 2 ); + + const x = Math.sin( v ) * radius; + const z = Math.cos( v ) * radius; + + vertices.push( 0, 0, 0 ); + vertices.push( x, 0, z ); + + const color = ( i & 1 ) ? color1 : color2; + + colors.push( color.r, color.g, color.b ); + colors.push( color.r, color.g, color.b ); + + } + + } + + // create the rings + + for ( let i = 0; i < rings; i ++ ) { + + const color = ( i & 1 ) ? color1 : color2; + + const r = radius - ( radius / rings * i ); + + for ( let j = 0; j < divisions; j ++ ) { + + // first vertex + + let v = ( j / divisions ) * ( Math.PI * 2 ); + + let x = Math.sin( v ) * r; + let z = Math.cos( v ) * r; + + vertices.push( x, 0, z ); + colors.push( color.r, color.g, color.b ); + + // second vertex + + v = ( ( j + 1 ) / divisions ) * ( Math.PI * 2 ); + + x = Math.sin( v ) * r; + z = Math.cos( v ) * r; + + vertices.push( x, 0, z ); + colors.push( color.r, color.g, color.b ); + + } + + } + + const geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); + + const material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } ); + + super( geometry, material ); + + this.type = 'PolarGridHelper'; + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +const _v1 = /*@__PURE__*/ new Vector3(); +const _v2 = /*@__PURE__*/ new Vector3(); +const _v3 = /*@__PURE__*/ new Vector3(); + +class DirectionalLightHelper extends Object3D { + + constructor( light, size, color ) { + + super(); + + this.light = light; + + this.matrix = light.matrixWorld; + this.matrixAutoUpdate = false; + + this.color = color; + + this.type = 'DirectionalLightHelper'; + + if ( size === undefined ) size = 1; + + let geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( [ + - size, size, 0, + size, size, 0, + size, - size, 0, + - size, - size, 0, + - size, size, 0 + ], 3 ) ); + + const material = new LineBasicMaterial( { fog: false, toneMapped: false } ); + + this.lightPlane = new Line( geometry, material ); + this.add( this.lightPlane ); + + geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 0, 1 ], 3 ) ); + + this.targetLine = new Line( geometry, material ); + this.add( this.targetLine ); + + this.update(); + + } + + dispose() { + + this.lightPlane.geometry.dispose(); + this.lightPlane.material.dispose(); + this.targetLine.geometry.dispose(); + this.targetLine.material.dispose(); + + } + + update() { + + this.light.updateWorldMatrix( true, false ); + this.light.target.updateWorldMatrix( true, false ); + + _v1.setFromMatrixPosition( this.light.matrixWorld ); + _v2.setFromMatrixPosition( this.light.target.matrixWorld ); + _v3.subVectors( _v2, _v1 ); + + this.lightPlane.lookAt( _v2 ); + + if ( this.color !== undefined ) { + + this.lightPlane.material.color.set( this.color ); + this.targetLine.material.color.set( this.color ); + + } else { + + this.lightPlane.material.color.copy( this.light.color ); + this.targetLine.material.color.copy( this.light.color ); + + } + + this.targetLine.lookAt( _v2 ); + this.targetLine.scale.z = _v3.length(); + + } + +} + +const _vector = /*@__PURE__*/ new Vector3(); +const _camera = /*@__PURE__*/ new Camera(); + +/** + * - shows frustum, line of sight and up of the camera + * - suitable for fast updates + * - based on frustum visualization in lightgl.js shadowmap example + * https://github.com/evanw/lightgl.js/blob/master/tests/shadowmap.html + */ + +class CameraHelper extends LineSegments { + + constructor( camera ) { + + const geometry = new BufferGeometry(); + const material = new LineBasicMaterial( { color: 0xffffff, vertexColors: true, toneMapped: false } ); + + const vertices = []; + const colors = []; + + const pointMap = {}; + + // near + + addLine( 'n1', 'n2' ); + addLine( 'n2', 'n4' ); + addLine( 'n4', 'n3' ); + addLine( 'n3', 'n1' ); + + // far + + addLine( 'f1', 'f2' ); + addLine( 'f2', 'f4' ); + addLine( 'f4', 'f3' ); + addLine( 'f3', 'f1' ); + + // sides + + addLine( 'n1', 'f1' ); + addLine( 'n2', 'f2' ); + addLine( 'n3', 'f3' ); + addLine( 'n4', 'f4' ); + + // cone + + addLine( 'p', 'n1' ); + addLine( 'p', 'n2' ); + addLine( 'p', 'n3' ); + addLine( 'p', 'n4' ); + + // up + + addLine( 'u1', 'u2' ); + addLine( 'u2', 'u3' ); + addLine( 'u3', 'u1' ); + + // target + + addLine( 'c', 't' ); + addLine( 'p', 'c' ); + + // cross + + addLine( 'cn1', 'cn2' ); + addLine( 'cn3', 'cn4' ); + + addLine( 'cf1', 'cf2' ); + addLine( 'cf3', 'cf4' ); + + function addLine( a, b ) { + + addPoint( a ); + addPoint( b ); + + } + + function addPoint( id ) { + + vertices.push( 0, 0, 0 ); + colors.push( 0, 0, 0 ); + + if ( pointMap[ id ] === undefined ) { + + pointMap[ id ] = []; + + } + + pointMap[ id ].push( ( vertices.length / 3 ) - 1 ); + + } + + geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); + + super( geometry, material ); + + this.type = 'CameraHelper'; + + this.camera = camera; + if ( this.camera.updateProjectionMatrix ) this.camera.updateProjectionMatrix(); + + this.matrix = camera.matrixWorld; + this.matrixAutoUpdate = false; + + this.pointMap = pointMap; + + this.update(); + + // colors + + const colorFrustum = new Color( 0xffaa00 ); + const colorCone = new Color( 0xff0000 ); + const colorUp = new Color( 0x00aaff ); + const colorTarget = new Color( 0xffffff ); + const colorCross = new Color( 0x333333 ); + + this.setColors( colorFrustum, colorCone, colorUp, colorTarget, colorCross ); + + } + + setColors( frustum, cone, up, target, cross ) { + + const geometry = this.geometry; + + const colorAttribute = geometry.getAttribute( 'color' ); + + // near + + colorAttribute.setXYZ( 0, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 1, frustum.r, frustum.g, frustum.b ); // n1, n2 + colorAttribute.setXYZ( 2, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 3, frustum.r, frustum.g, frustum.b ); // n2, n4 + colorAttribute.setXYZ( 4, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 5, frustum.r, frustum.g, frustum.b ); // n4, n3 + colorAttribute.setXYZ( 6, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 7, frustum.r, frustum.g, frustum.b ); // n3, n1 + + // far + + colorAttribute.setXYZ( 8, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 9, frustum.r, frustum.g, frustum.b ); // f1, f2 + colorAttribute.setXYZ( 10, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 11, frustum.r, frustum.g, frustum.b ); // f2, f4 + colorAttribute.setXYZ( 12, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 13, frustum.r, frustum.g, frustum.b ); // f4, f3 + colorAttribute.setXYZ( 14, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 15, frustum.r, frustum.g, frustum.b ); // f3, f1 + + // sides + + colorAttribute.setXYZ( 16, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 17, frustum.r, frustum.g, frustum.b ); // n1, f1 + colorAttribute.setXYZ( 18, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 19, frustum.r, frustum.g, frustum.b ); // n2, f2 + colorAttribute.setXYZ( 20, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 21, frustum.r, frustum.g, frustum.b ); // n3, f3 + colorAttribute.setXYZ( 22, frustum.r, frustum.g, frustum.b ); colorAttribute.setXYZ( 23, frustum.r, frustum.g, frustum.b ); // n4, f4 + + // cone + + colorAttribute.setXYZ( 24, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 25, cone.r, cone.g, cone.b ); // p, n1 + colorAttribute.setXYZ( 26, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 27, cone.r, cone.g, cone.b ); // p, n2 + colorAttribute.setXYZ( 28, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 29, cone.r, cone.g, cone.b ); // p, n3 + colorAttribute.setXYZ( 30, cone.r, cone.g, cone.b ); colorAttribute.setXYZ( 31, cone.r, cone.g, cone.b ); // p, n4 + + // up + + colorAttribute.setXYZ( 32, up.r, up.g, up.b ); colorAttribute.setXYZ( 33, up.r, up.g, up.b ); // u1, u2 + colorAttribute.setXYZ( 34, up.r, up.g, up.b ); colorAttribute.setXYZ( 35, up.r, up.g, up.b ); // u2, u3 + colorAttribute.setXYZ( 36, up.r, up.g, up.b ); colorAttribute.setXYZ( 37, up.r, up.g, up.b ); // u3, u1 + + // target + + colorAttribute.setXYZ( 38, target.r, target.g, target.b ); colorAttribute.setXYZ( 39, target.r, target.g, target.b ); // c, t + colorAttribute.setXYZ( 40, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 41, cross.r, cross.g, cross.b ); // p, c + + // cross + + colorAttribute.setXYZ( 42, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 43, cross.r, cross.g, cross.b ); // cn1, cn2 + colorAttribute.setXYZ( 44, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 45, cross.r, cross.g, cross.b ); // cn3, cn4 + + colorAttribute.setXYZ( 46, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 47, cross.r, cross.g, cross.b ); // cf1, cf2 + colorAttribute.setXYZ( 48, cross.r, cross.g, cross.b ); colorAttribute.setXYZ( 49, cross.r, cross.g, cross.b ); // cf3, cf4 + + colorAttribute.needsUpdate = true; + + } + + update() { + + const geometry = this.geometry; + const pointMap = this.pointMap; + + const w = 1, h = 1; + + // we need just camera projection matrix inverse + // world matrix must be identity + + _camera.projectionMatrixInverse.copy( this.camera.projectionMatrixInverse ); + + // center / target + + setPoint( 'c', pointMap, geometry, _camera, 0, 0, - 1 ); + setPoint( 't', pointMap, geometry, _camera, 0, 0, 1 ); + + // near + + setPoint( 'n1', pointMap, geometry, _camera, - w, - h, - 1 ); + setPoint( 'n2', pointMap, geometry, _camera, w, - h, - 1 ); + setPoint( 'n3', pointMap, geometry, _camera, - w, h, - 1 ); + setPoint( 'n4', pointMap, geometry, _camera, w, h, - 1 ); + + // far + + setPoint( 'f1', pointMap, geometry, _camera, - w, - h, 1 ); + setPoint( 'f2', pointMap, geometry, _camera, w, - h, 1 ); + setPoint( 'f3', pointMap, geometry, _camera, - w, h, 1 ); + setPoint( 'f4', pointMap, geometry, _camera, w, h, 1 ); + + // up + + setPoint( 'u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, - 1 ); + setPoint( 'u2', pointMap, geometry, _camera, - w * 0.7, h * 1.1, - 1 ); + setPoint( 'u3', pointMap, geometry, _camera, 0, h * 2, - 1 ); + + // cross + + setPoint( 'cf1', pointMap, geometry, _camera, - w, 0, 1 ); + setPoint( 'cf2', pointMap, geometry, _camera, w, 0, 1 ); + setPoint( 'cf3', pointMap, geometry, _camera, 0, - h, 1 ); + setPoint( 'cf4', pointMap, geometry, _camera, 0, h, 1 ); + + setPoint( 'cn1', pointMap, geometry, _camera, - w, 0, - 1 ); + setPoint( 'cn2', pointMap, geometry, _camera, w, 0, - 1 ); + setPoint( 'cn3', pointMap, geometry, _camera, 0, - h, - 1 ); + setPoint( 'cn4', pointMap, geometry, _camera, 0, h, - 1 ); + + geometry.getAttribute( 'position' ).needsUpdate = true; + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + + +function setPoint( point, pointMap, geometry, camera, x, y, z ) { + + _vector.set( x, y, z ).unproject( camera ); + + const points = pointMap[ point ]; + + if ( points !== undefined ) { + + const position = geometry.getAttribute( 'position' ); + + for ( let i = 0, l = points.length; i < l; i ++ ) { + + position.setXYZ( points[ i ], _vector.x, _vector.y, _vector.z ); + + } + + } + +} + +const _box = /*@__PURE__*/ new Box3(); + +class BoxHelper extends LineSegments { + + constructor( object, color = 0xffff00 ) { + + const indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] ); + const positions = new Float32Array( 8 * 3 ); + + const geometry = new BufferGeometry(); + geometry.setIndex( new BufferAttribute( indices, 1 ) ); + geometry.setAttribute( 'position', new BufferAttribute( positions, 3 ) ); + + super( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) ); + + this.object = object; + this.type = 'BoxHelper'; + + this.matrixAutoUpdate = false; + + this.update(); + + } + + update( object ) { + + if ( object !== undefined ) { + + console.warn( 'THREE.BoxHelper: .update() has no longer arguments.' ); + + } + + if ( this.object !== undefined ) { + + _box.setFromObject( this.object ); + + } + + if ( _box.isEmpty() ) return; + + const min = _box.min; + const max = _box.max; + + /* + 5____4 + 1/___0/| + | 6__|_7 + 2/___3/ + + 0: max.x, max.y, max.z + 1: min.x, max.y, max.z + 2: min.x, min.y, max.z + 3: max.x, min.y, max.z + 4: max.x, max.y, min.z + 5: min.x, max.y, min.z + 6: min.x, min.y, min.z + 7: max.x, min.y, min.z + */ + + const position = this.geometry.attributes.position; + const array = position.array; + + array[ 0 ] = max.x; array[ 1 ] = max.y; array[ 2 ] = max.z; + array[ 3 ] = min.x; array[ 4 ] = max.y; array[ 5 ] = max.z; + array[ 6 ] = min.x; array[ 7 ] = min.y; array[ 8 ] = max.z; + array[ 9 ] = max.x; array[ 10 ] = min.y; array[ 11 ] = max.z; + array[ 12 ] = max.x; array[ 13 ] = max.y; array[ 14 ] = min.z; + array[ 15 ] = min.x; array[ 16 ] = max.y; array[ 17 ] = min.z; + array[ 18 ] = min.x; array[ 19 ] = min.y; array[ 20 ] = min.z; + array[ 21 ] = max.x; array[ 22 ] = min.y; array[ 23 ] = min.z; + + position.needsUpdate = true; + + this.geometry.computeBoundingSphere(); + + } + + setFromObject( object ) { + + this.object = object; + this.update(); + + return this; + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.object = source.object; + + return this; + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +class Box3Helper extends LineSegments { + + constructor( box, color = 0xffff00 ) { + + const indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] ); + + const positions = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, - 1, 1, 1, 1, - 1, - 1, 1, - 1, - 1, - 1, - 1, 1, - 1, - 1 ]; + + const geometry = new BufferGeometry(); + + geometry.setIndex( new BufferAttribute( indices, 1 ) ); + + geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); + + super( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) ); + + this.box = box; + + this.type = 'Box3Helper'; + + this.geometry.computeBoundingSphere(); + + } + + updateMatrixWorld( force ) { + + const box = this.box; + + if ( box.isEmpty() ) return; + + box.getCenter( this.position ); + + box.getSize( this.scale ); + + this.scale.multiplyScalar( 0.5 ); + + super.updateMatrixWorld( force ); + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +class PlaneHelper extends Line { + + constructor( plane, size = 1, hex = 0xffff00 ) { + + const color = hex; + + const positions = [ 1, - 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, - 1, 0, 1, 1, 0 ]; + + const geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); + geometry.computeBoundingSphere(); + + super( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) ); + + this.type = 'PlaneHelper'; + + this.plane = plane; + + this.size = size; + + const positions2 = [ 1, 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, - 1, 0, 1, - 1, 0 ]; + + const geometry2 = new BufferGeometry(); + geometry2.setAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) ); + geometry2.computeBoundingSphere(); + + this.add( new Mesh( geometry2, new MeshBasicMaterial( { color: color, opacity: 0.2, transparent: true, depthWrite: false, toneMapped: false } ) ) ); + + } + + updateMatrixWorld( force ) { + + this.position.set( 0, 0, 0 ); + + this.scale.set( 0.5 * this.size, 0.5 * this.size, 1 ); + + this.lookAt( this.plane.normal ); + + this.translateZ( - this.plane.constant ); + + super.updateMatrixWorld( force ); + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + this.children[ 0 ].geometry.dispose(); + this.children[ 0 ].material.dispose(); + + } + +} + +const _axis = /*@__PURE__*/ new Vector3(); +let _lineGeometry, _coneGeometry; + +class ArrowHelper extends Object3D { + + // dir is assumed to be normalized + + constructor( dir = new Vector3( 0, 0, 1 ), origin = new Vector3( 0, 0, 0 ), length = 1, color = 0xffff00, headLength = length * 0.2, headWidth = headLength * 0.2 ) { + + super(); + + this.type = 'ArrowHelper'; + + if ( _lineGeometry === undefined ) { + + _lineGeometry = new BufferGeometry(); + _lineGeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) ); + + _coneGeometry = new CylinderGeometry( 0, 0.5, 1, 5, 1 ); + _coneGeometry.translate( 0, - 0.5, 0 ); + + } + + this.position.copy( origin ); + + this.line = new Line( _lineGeometry, new LineBasicMaterial( { color: color, toneMapped: false } ) ); + this.line.matrixAutoUpdate = false; + this.add( this.line ); + + this.cone = new Mesh( _coneGeometry, new MeshBasicMaterial( { color: color, toneMapped: false } ) ); + this.cone.matrixAutoUpdate = false; + this.add( this.cone ); + + this.setDirection( dir ); + this.setLength( length, headLength, headWidth ); + + } + + setDirection( dir ) { + + // dir is assumed to be normalized + + if ( dir.y > 0.99999 ) { + + this.quaternion.set( 0, 0, 0, 1 ); + + } else if ( dir.y < - 0.99999 ) { + + this.quaternion.set( 1, 0, 0, 0 ); + + } else { + + _axis.set( dir.z, 0, - dir.x ).normalize(); + + const radians = Math.acos( dir.y ); + + this.quaternion.setFromAxisAngle( _axis, radians ); + + } + + } + + setLength( length, headLength = length * 0.2, headWidth = headLength * 0.2 ) { + + this.line.scale.set( 1, Math.max( 0.0001, length - headLength ), 1 ); // see #17458 + this.line.updateMatrix(); + + this.cone.scale.set( headWidth, headLength, headWidth ); + this.cone.position.y = length; + this.cone.updateMatrix(); + + } + + setColor( color ) { + + this.line.material.color.set( color ); + this.cone.material.color.set( color ); + + } + + copy( source ) { + + super.copy( source, false ); + + this.line.copy( source.line ); + this.cone.copy( source.cone ); + + return this; + + } + + dispose() { + + this.line.geometry.dispose(); + this.line.material.dispose(); + this.cone.geometry.dispose(); + this.cone.material.dispose(); + + } + +} + +class AxesHelper extends LineSegments { + + constructor( size = 1 ) { + + const vertices = [ + 0, 0, 0, size, 0, 0, + 0, 0, 0, 0, size, 0, + 0, 0, 0, 0, 0, size + ]; + + const colors = [ + 1, 0, 0, 1, 0.6, 0, + 0, 1, 0, 0.6, 1, 0, + 0, 0, 1, 0, 0.6, 1 + ]; + + const geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); + + const material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } ); + + super( geometry, material ); + + this.type = 'AxesHelper'; + + } + + setColors( xAxisColor, yAxisColor, zAxisColor ) { + + const color = new Color(); + const array = this.geometry.attributes.color.array; + + color.set( xAxisColor ); + color.toArray( array, 0 ); + color.toArray( array, 3 ); + + color.set( yAxisColor ); + color.toArray( array, 6 ); + color.toArray( array, 9 ); + + color.set( zAxisColor ); + color.toArray( array, 12 ); + color.toArray( array, 15 ); + + this.geometry.attributes.color.needsUpdate = true; + + return this; + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +class ShapePath { + + constructor() { + + this.type = 'ShapePath'; + + this.color = new Color(); + + this.subPaths = []; + this.currentPath = null; + + } + + moveTo( x, y ) { + + this.currentPath = new Path(); + this.subPaths.push( this.currentPath ); + this.currentPath.moveTo( x, y ); + + return this; + + } + + lineTo( x, y ) { + + this.currentPath.lineTo( x, y ); + + return this; + + } + + quadraticCurveTo( aCPx, aCPy, aX, aY ) { + + this.currentPath.quadraticCurveTo( aCPx, aCPy, aX, aY ); + + return this; + + } + + bezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) { + + this.currentPath.bezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ); + + return this; + + } + + splineThru( pts ) { + + this.currentPath.splineThru( pts ); + + return this; + + } + + toShapes( isCCW ) { + + function toShapesNoHoles( inSubpaths ) { + + const shapes = []; + + for ( let i = 0, l = inSubpaths.length; i < l; i ++ ) { + + const tmpPath = inSubpaths[ i ]; + + const tmpShape = new Shape(); + tmpShape.curves = tmpPath.curves; + + shapes.push( tmpShape ); + + } + + return shapes; + + } + + function isPointInsidePolygon( inPt, inPolygon ) { + + const polyLen = inPolygon.length; + + // inPt on polygon contour => immediate success or + // toggling of inside/outside at every single! intersection point of an edge + // with the horizontal line through inPt, left of inPt + // not counting lowerY endpoints of edges and whole edges on that line + let inside = false; + for ( let p = polyLen - 1, q = 0; q < polyLen; p = q ++ ) { + + let edgeLowPt = inPolygon[ p ]; + let edgeHighPt = inPolygon[ q ]; + + let edgeDx = edgeHighPt.x - edgeLowPt.x; + let edgeDy = edgeHighPt.y - edgeLowPt.y; + + if ( Math.abs( edgeDy ) > Number.EPSILON ) { + + // not parallel + if ( edgeDy < 0 ) { + + edgeLowPt = inPolygon[ q ]; edgeDx = - edgeDx; + edgeHighPt = inPolygon[ p ]; edgeDy = - edgeDy; + + } + + if ( ( inPt.y < edgeLowPt.y ) || ( inPt.y > edgeHighPt.y ) ) continue; + + if ( inPt.y === edgeLowPt.y ) { + + if ( inPt.x === edgeLowPt.x ) return true; // inPt is on contour ? + // continue; // no intersection or edgeLowPt => doesn't count !!! + + } else { + + const perpEdge = edgeDy * ( inPt.x - edgeLowPt.x ) - edgeDx * ( inPt.y - edgeLowPt.y ); + if ( perpEdge === 0 ) return true; // inPt is on contour ? + if ( perpEdge < 0 ) continue; + inside = ! inside; // true intersection left of inPt + + } + + } else { + + // parallel or collinear + if ( inPt.y !== edgeLowPt.y ) continue; // parallel + // edge lies on the same horizontal line as inPt + if ( ( ( edgeHighPt.x <= inPt.x ) && ( inPt.x <= edgeLowPt.x ) ) || + ( ( edgeLowPt.x <= inPt.x ) && ( inPt.x <= edgeHighPt.x ) ) ) return true; // inPt: Point on contour ! + // continue; + + } + + } + + return inside; + + } + + const isClockWise = ShapeUtils.isClockWise; + + const subPaths = this.subPaths; + if ( subPaths.length === 0 ) return []; + + let solid, tmpPath, tmpShape; + const shapes = []; + + if ( subPaths.length === 1 ) { + + tmpPath = subPaths[ 0 ]; + tmpShape = new Shape(); + tmpShape.curves = tmpPath.curves; + shapes.push( tmpShape ); + return shapes; + + } + + let holesFirst = ! isClockWise( subPaths[ 0 ].getPoints() ); + holesFirst = isCCW ? ! holesFirst : holesFirst; + + // console.log("Holes first", holesFirst); + + const betterShapeHoles = []; + const newShapes = []; + let newShapeHoles = []; + let mainIdx = 0; + let tmpPoints; + + newShapes[ mainIdx ] = undefined; + newShapeHoles[ mainIdx ] = []; + + for ( let i = 0, l = subPaths.length; i < l; i ++ ) { + + tmpPath = subPaths[ i ]; + tmpPoints = tmpPath.getPoints(); + solid = isClockWise( tmpPoints ); + solid = isCCW ? ! solid : solid; + + if ( solid ) { + + if ( ( ! holesFirst ) && ( newShapes[ mainIdx ] ) ) mainIdx ++; + + newShapes[ mainIdx ] = { s: new Shape(), p: tmpPoints }; + newShapes[ mainIdx ].s.curves = tmpPath.curves; + + if ( holesFirst ) mainIdx ++; + newShapeHoles[ mainIdx ] = []; + + //console.log('cw', i); + + } else { + + newShapeHoles[ mainIdx ].push( { h: tmpPath, p: tmpPoints[ 0 ] } ); + + //console.log('ccw', i); + + } + + } + + // only Holes? -> probably all Shapes with wrong orientation + if ( ! newShapes[ 0 ] ) return toShapesNoHoles( subPaths ); + + + if ( newShapes.length > 1 ) { + + let ambiguous = false; + let toChange = 0; + + for ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) { + + betterShapeHoles[ sIdx ] = []; + + } + + for ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) { + + const sho = newShapeHoles[ sIdx ]; + + for ( let hIdx = 0; hIdx < sho.length; hIdx ++ ) { + + const ho = sho[ hIdx ]; + let hole_unassigned = true; + + for ( let s2Idx = 0; s2Idx < newShapes.length; s2Idx ++ ) { + + if ( isPointInsidePolygon( ho.p, newShapes[ s2Idx ].p ) ) { + + if ( sIdx !== s2Idx ) toChange ++; + + if ( hole_unassigned ) { + + hole_unassigned = false; + betterShapeHoles[ s2Idx ].push( ho ); + + } else { + + ambiguous = true; + + } + + } + + } + + if ( hole_unassigned ) { + + betterShapeHoles[ sIdx ].push( ho ); + + } + + } + + } + + if ( toChange > 0 && ambiguous === false ) { + + newShapeHoles = betterShapeHoles; + + } + + } + + let tmpHoles; + + for ( let i = 0, il = newShapes.length; i < il; i ++ ) { + + tmpShape = newShapes[ i ].s; + shapes.push( tmpShape ); + tmpHoles = newShapeHoles[ i ]; + + for ( let j = 0, jl = tmpHoles.length; j < jl; j ++ ) { + + tmpShape.holes.push( tmpHoles[ j ].h ); + + } + + } + + //console.log("shape", shapes); + + return shapes; + + } + +} + +class WebGLMultipleRenderTargets extends WebGLRenderTarget { // @deprecated, r162 + + constructor( width = 1, height = 1, count = 1, options = {} ) { + + console.warn( 'THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.' ); + + super( width, height, { ...options, count } ); + + this.isWebGLMultipleRenderTargets = true; + + } + + get texture() { + + return this.textures; + + } + +} + +if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { + + __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'register', { detail: { + revision: REVISION, + } } ) ); + +} + +if ( typeof window !== 'undefined' ) { + + if ( window.__THREE__ ) { + + console.warn( 'WARNING: Multiple instances of Three.js being imported.' ); + + } else { + + window.__THREE__ = REVISION; + + } + +} + +export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BackSide, BasicDepthPacking, BasicShadowMap, BatchedMesh, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CineonToneMapping, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, ColorManagement, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, ConstantAlphaFactor, ConstantColorFactor, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry, Cylindrical, Data3DTexture, DataArrayTexture, DataTexture, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DisplayP3ColorSpace, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualCompare, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Float32BufferAttribute, FloatType, Fog, FogExp2, FramebufferTexture, FrontSide, Frustum, GLBufferAttribute, GLSL1, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearDisplayP3ColorSpace, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, LuminanceAlphaFormat, LuminanceFormat, MOUSE, Material, MaterialLoader, MathUtils, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, P3Primaries, PCFShadowMap, PCFSoftShadowMap, PMREMGenerator, Path, PerspectiveCamera, Plane, PlaneGeometry, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBFormat, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, Rec709Primaries, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RenderTarget, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SRGBColorSpace, SRGBTransfer, Scene, ShaderChunk, ShaderLib, ShaderMaterial, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronGeometry, Texture, TextureLoader, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, UniformsLib, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLCoordinateSystem, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLRenderTarget, WebGLRenderer, WebGLUtils, WebGPUCoordinateSystem, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, createCanvasElement }; diff --git a/node_modules/three/build/three.module.min.js b/node_modules/three/build/three.module.min.js new file mode 100644 index 0000000..8b28e9d --- /dev/null +++ b/node_modules/three/build/three.module.min.js @@ -0,0 +1,6 @@ +/** + * @license + * Copyright 2010-2024 Three.js Authors + * SPDX-License-Identifier: MIT + */ +const t="164",e={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},n={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},i=0,r=1,s=2,a=3,o=0,l=1,c=2,h=3,u=0,d=1,p=2,m=0,f=1,g=2,v=3,_=4,x=5,y=100,M=101,S=102,b=103,w=104,T=200,E=201,A=202,R=203,C=204,P=205,L=206,I=207,U=208,N=209,D=210,O=211,F=212,z=213,B=214,k=0,V=1,H=2,G=3,W=4,X=5,j=6,q=7,Y=0,Z=1,J=2,K=0,$=1,Q=2,tt=3,et=4,nt=5,it=6,rt=7,st="attached",at="detached",ot=300,lt=301,ct=302,ht=303,ut=304,dt=306,pt=1e3,mt=1001,ft=1002,gt=1003,vt=1004,_t=1004,xt=1005,yt=1005,Mt=1006,St=1007,bt=1007,wt=1008,Tt=1008,Et=1009,At=1010,Rt=1011,Ct=1012,Pt=1013,Lt=1014,It=1015,Ut=1016,Nt=1017,Dt=1018,Ot=1020,Ft=35902,zt=1021,Bt=1022,kt=1023,Vt=1024,Ht=1025,Gt=1026,Wt=1027,Xt=1028,jt=1029,qt=1030,Yt=1031,Zt=1033,Jt=33776,Kt=33777,$t=33778,Qt=33779,te=35840,ee=35841,ne=35842,ie=35843,re=36196,se=37492,ae=37496,oe=37808,le=37809,ce=37810,he=37811,ue=37812,de=37813,pe=37814,me=37815,fe=37816,ge=37817,ve=37818,_e=37819,xe=37820,ye=37821,Me=36492,Se=36494,be=36495,we=36283,Te=36284,Ee=36285,Ae=36286,Re=2200,Ce=2201,Pe=2202,Le=2300,Ie=2301,Ue=2302,Ne=2400,De=2401,Oe=2402,Fe=2500,ze=2501,Be=0,ke=1,Ve=2,He=3200,Ge=3201,We=0,Xe=1,je="",qe="srgb",Ye="srgb-linear",Ze="display-p3",Je="display-p3-linear",Ke="linear",$e="srgb",Qe="rec709",tn="p3",en=0,nn=7680,rn=7681,sn=7682,an=7683,on=34055,ln=34056,cn=5386,hn=512,un=513,dn=514,pn=515,mn=516,fn=517,gn=518,vn=519,_n=512,xn=513,yn=514,Mn=515,Sn=516,bn=517,wn=518,Tn=519,En=35044,An=35048,Rn=35040,Cn=35045,Pn=35049,Ln=35041,In=35046,Un=35050,Nn=35042,Dn="100",On="300 es",Fn=2e3,zn=2001;class Bn{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;const n=this._listeners[t];if(void 0!==n){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}dispatchEvent(t){if(void 0===this._listeners)return;const e=this._listeners[t.type];if(void 0!==e){t.target=this;const n=e.slice(0);for(let e=0,i=n.length;e>8&255]+kn[t>>16&255]+kn[t>>24&255]+"-"+kn[255&e]+kn[e>>8&255]+"-"+kn[e>>16&15|64]+kn[e>>24&255]+"-"+kn[63&n|128]+kn[n>>8&255]+"-"+kn[n>>16&255]+kn[n>>24&255]+kn[255&i]+kn[i>>8&255]+kn[i>>16&255]+kn[i>>24&255]).toLowerCase()}function Xn(t,e,n){return Math.max(e,Math.min(n,t))}function jn(t,e){return(t%e+e)%e}function qn(t,e,n){return(1-n)*t+n*e}function Yn(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function Zn(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(4294967295*t);case Uint16Array:return Math.round(65535*t);case Uint8Array:return Math.round(255*t);case Int32Array:return Math.round(2147483647*t);case Int16Array:return Math.round(32767*t);case Int8Array:return Math.round(127*t);default:throw new Error("Invalid component type.")}}const Jn={DEG2RAD:Hn,RAD2DEG:Gn,generateUUID:Wn,clamp:Xn,euclideanModulo:jn,mapLinear:function(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)},inverseLerp:function(t,e,n){return t!==e?(n-t)/(e-t):0},lerp:qn,damp:function(t,e,n,i){return qn(t,e,1-Math.exp(-n*i))},pingpong:function(t,e=1){return e-Math.abs(jn(t,2*e)-e)},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},seededRandom:function(t){void 0!==t&&(Vn=t);let e=Vn+=1831565813;return e=Math.imul(e^e>>>15,1|e),e^=e+Math.imul(e^e>>>7,61|e),((e^e>>>14)>>>0)/4294967296},degToRad:function(t){return t*Hn},radToDeg:function(t){return t*Gn},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))},setQuaternionFromProperEuler:function(t,e,n,i,r){const s=Math.cos,a=Math.sin,o=s(n/2),l=a(n/2),c=s((e+i)/2),h=a((e+i)/2),u=s((e-i)/2),d=a((e-i)/2),p=s((i-e)/2),m=a((i-e)/2);switch(r){case"XYX":t.set(o*h,l*u,l*d,o*c);break;case"YZY":t.set(l*d,o*h,l*u,o*c);break;case"ZXZ":t.set(l*u,l*d,o*h,o*c);break;case"XZX":t.set(o*h,l*m,l*p,o*c);break;case"YXY":t.set(l*p,o*h,l*m,o*c);break;case"ZYZ":t.set(l*m,l*p,o*h,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}},normalize:Zn,denormalize:Yn};class Kn{constructor(t=0,e=0){Kn.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(Xn(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,s=this.y-t.y;return this.x=r*n-s*i+t.x,this.y=r*i+s*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class $n{constructor(t,e,n,i,r,s,a,o,l){$n.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==t&&this.set(t,e,n,i,r,s,a,o,l)}set(t,e,n,i,r,s,a,o,l){const c=this.elements;return c[0]=t,c[1]=i,c[2]=a,c[3]=e,c[4]=r,c[5]=o,c[6]=n,c[7]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],a=n[3],o=n[6],l=n[1],c=n[4],h=n[7],u=n[2],d=n[5],p=n[8],m=i[0],f=i[3],g=i[6],v=i[1],_=i[4],x=i[7],y=i[2],M=i[5],S=i[8];return r[0]=s*m+a*v+o*y,r[3]=s*f+a*_+o*M,r[6]=s*g+a*x+o*S,r[1]=l*m+c*v+h*y,r[4]=l*f+c*_+h*M,r[7]=l*g+c*x+h*S,r[2]=u*m+d*v+p*y,r[5]=u*f+d*_+p*M,r[8]=u*g+d*x+p*S,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8];return e*s*c-e*a*l-n*r*c+n*a*o+i*r*l-i*s*o}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=c*s-a*l,u=a*o-c*r,d=l*r-s*o,p=e*h+n*u+i*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const m=1/p;return t[0]=h*m,t[1]=(i*l-c*n)*m,t[2]=(a*n-i*s)*m,t[3]=u*m,t[4]=(c*e-i*o)*m,t[5]=(i*r-a*e)*m,t[6]=d*m,t[7]=(n*o-l*e)*m,t[8]=(s*e-n*r)*m,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,r,s,a){const o=Math.cos(r),l=Math.sin(r);return this.set(n*o,n*l,-n*(o*s+l*a)+s+t,-i*l,i*o,-i*(-l*s+o*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(Qn.makeScale(t,e)),this}rotate(t){return this.premultiply(Qn.makeRotation(-t)),this}translate(t,e){return this.premultiply(Qn.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<9;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}const Qn=new $n;function ti(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const ei={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function ni(t,e){return new ei[t](e)}function ii(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function ri(){const t=ii("canvas");return t.style.display="block",t}const si={};function ai(t){t in si||(si[t]=!0,console.warn(t))}const oi=(new $n).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),li=(new $n).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),ci={[Ye]:{transfer:Ke,primaries:Qe,toReference:t=>t,fromReference:t=>t},[qe]:{transfer:$e,primaries:Qe,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[Je]:{transfer:Ke,primaries:tn,toReference:t=>t.applyMatrix3(li),fromReference:t=>t.applyMatrix3(oi)},[Ze]:{transfer:$e,primaries:tn,toReference:t=>t.convertSRGBToLinear().applyMatrix3(li),fromReference:t=>t.applyMatrix3(oi).convertLinearToSRGB()}},hi=new Set([Ye,Je]),ui={enabled:!0,_workingColorSpace:Ye,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!hi.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(!1===this.enabled||e===n||!e||!n)return t;const i=ci[e].toReference;return(0,ci[n].fromReference)(i(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return ci[t].primaries},getTransfer:function(t){return t===je?Ke:ci[t].transfer}};function di(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function pi(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}let mi;class fi{static getDataURL(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===mi&&(mi=ii("canvas")),mi.width=t.width,mi.height=t.height;const n=mi.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=mi}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const e=ii("canvas");e.width=t.width,e.height=t.height;const n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);const i=n.getImageData(0,0,t.width,t.height),r=i.data;for(let t=0;t0&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==ot)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case pt:t.x=t.x-Math.floor(t.x);break;case mt:t.x=t.x<0?0:1;break;case ft:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case pt:t.y=t.y-Math.floor(t.y);break;case mt:t.y=t.y<0?0:1;break;case ft:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){!0===t&&this.pmremVersion++}}yi.DEFAULT_IMAGE=null,yi.DEFAULT_MAPPING=ot,yi.DEFAULT_ANISOTROPY=1;class Mi{constructor(t=0,e=0,n=0,i=1){Mi.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=this.w,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*e+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*e+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*e+s[7]*n+s[11]*i+s[15]*r,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,r;const s=.01,a=.1,o=t.elements,l=o[0],c=o[4],h=o[8],u=o[1],d=o[5],p=o[9],m=o[2],f=o[6],g=o[10];if(Math.abs(c-u)o&&t>v?tv?o=0?1:-1,i=1-e*e;if(i>Number.EPSILON){const r=Math.sqrt(i),s=Math.atan2(r,e*n);t=Math.sin(t*s)/r,a=Math.sin(a*s)/r}const r=a*n;if(o=o*t+u*r,l=l*t+d*r,c=c*t+p*r,h=h*t+m*r,t===1-a){const t=1/Math.sqrt(o*o+l*l+c*c+h*h);o*=t,l*=t,c*=t,h*=t}}t[e]=o,t[e+1]=l,t[e+2]=c,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,i,r,s){const a=n[i],o=n[i+1],l=n[i+2],c=n[i+3],h=r[s],u=r[s+1],d=r[s+2],p=r[s+3];return t[e]=a*p+c*h+o*d-l*u,t[e+1]=o*p+c*u+l*h-a*d,t[e+2]=l*p+c*d+a*u-o*h,t[e+3]=c*p-a*h-o*u-l*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const n=t._x,i=t._y,r=t._z,s=t._order,a=Math.cos,o=Math.sin,l=a(n/2),c=a(i/2),h=a(r/2),u=o(n/2),d=o(i/2),p=o(r/2);switch(s){case"XYZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"YXZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"ZXY":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"ZYX":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"YZX":this._x=u*c*h+l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h-u*d*p;break;case"XZY":this._x=u*c*h-l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h+u*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!0===e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,n=e[0],i=e[4],r=e[8],s=e[1],a=e[5],o=e[9],l=e[2],c=e[6],h=e[10],u=n+a+h;if(u>0){const t=.5/Math.sqrt(u+1);this._w=.25/t,this._x=(c-o)*t,this._y=(r-l)*t,this._z=(s-i)*t}else if(n>a&&n>h){const t=2*Math.sqrt(1+n-a-h);this._w=(c-o)/t,this._x=.25*t,this._y=(i+s)/t,this._z=(r+l)/t}else if(a>h){const t=2*Math.sqrt(1+a-n-h);this._w=(r-l)/t,this._x=(i+s)/t,this._y=.25*t,this._z=(o+c)/t}else{const t=2*Math.sqrt(1+h-n-a);this._w=(s-i)/t,this._x=(r+l)/t,this._y=(o+c)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return nMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Xn(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(0===n)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,s=t._w,a=e._x,o=e._y,l=e._z,c=e._w;return this._x=n*c+s*a+i*l-r*o,this._y=i*c+s*o+r*a-n*l,this._z=r*c+s*l+n*o-i*a,this._w=s*c-n*a-i*o-r*l,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const n=this._x,i=this._y,r=this._z,s=this._w;let a=s*t._w+n*t._x+i*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=s,this._x=n,this._y=i,this._z=r,this;const o=1-a*a;if(o<=Number.EPSILON){const t=1-e;return this._w=t*s+e*this._w,this._x=t*n+e*this._x,this._y=t*i+e*this._y,this._z=t*r+e*this._z,this.normalize(),this}const l=Math.sqrt(o),c=Math.atan2(l,a),h=Math.sin((1-e)*c)/l,u=Math.sin(e*c)/l;return this._w=s*h+this._w*u,this._x=n*h+this._x*u,this._y=i*h+this._y*u,this._z=r*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(t),i*Math.cos(t),r*Math.sin(e),r*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Ci{constructor(t=0,e=0,n=0){Ci.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return void 0===n&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(Li.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(Li.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.elements,s=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*s,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*s,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*s,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z,o=t.w,l=2*(s*i-a*n),c=2*(a*e-r*i),h=2*(r*n-s*e);return this.x=e+o*l+s*h-a*c,this.y=n+o*c+a*l-r*h,this.z=i+o*h+r*c-s*l,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=i*o-r*a,this.y=r*s-n*o,this.z=n*a-i*s,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return Pi.copy(this).projectOnVector(t),this.sub(Pi)}reflect(t){return this.sub(Pi.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(Xn(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){const i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=2*Math.random()-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Pi=new Ci,Li=new Ri;class Ii{constructor(t=new Ci(1/0,1/0,1/0),e=new Ci(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,Ni),Ni.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Hi),Gi.subVectors(this.max,Hi),Oi.subVectors(t.a,Hi),Fi.subVectors(t.b,Hi),zi.subVectors(t.c,Hi),Bi.subVectors(Fi,Oi),ki.subVectors(zi,Fi),Vi.subVectors(Oi,zi);let e=[0,-Bi.z,Bi.y,0,-ki.z,ki.y,0,-Vi.z,Vi.y,Bi.z,0,-Bi.x,ki.z,0,-ki.x,Vi.z,0,-Vi.x,-Bi.y,Bi.x,0,-ki.y,ki.x,0,-Vi.y,Vi.x,0];return!!ji(e,Oi,Fi,zi,Gi)&&(e=[1,0,0,0,1,0,0,0,1],!!ji(e,Oi,Fi,zi,Gi)&&(Wi.crossVectors(Bi,ki),e=[Wi.x,Wi.y,Wi.z],ji(e,Oi,Fi,zi,Gi)))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,Ni).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(Ni).length()),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(Ui[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Ui[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Ui[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Ui[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Ui[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Ui[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Ui[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Ui[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Ui)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const Ui=[new Ci,new Ci,new Ci,new Ci,new Ci,new Ci,new Ci,new Ci],Ni=new Ci,Di=new Ii,Oi=new Ci,Fi=new Ci,zi=new Ci,Bi=new Ci,ki=new Ci,Vi=new Ci,Hi=new Ci,Gi=new Ci,Wi=new Ci,Xi=new Ci;function ji(t,e,n,i,r){for(let s=0,a=t.length-3;s<=a;s+=3){Xi.fromArray(t,s);const a=r.x*Math.abs(Xi.x)+r.y*Math.abs(Xi.y)+r.z*Math.abs(Xi.z),o=e.dot(Xi),l=n.dot(Xi),c=i.dot(Xi);if(Math.max(-Math.max(o,l,c),Math.min(o,l,c))>a)return!1}return!0}const qi=new Ii,Yi=new Ci,Zi=new Ci;class Ji{constructor(t=new Ci,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const n=this.center;void 0!==e?n.copy(e):qi.setFromPoints(t).getCenter(n);let i=0;for(let e=0,r=t.length;ethis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Yi.subVectors(t,this.center);const e=Yi.lengthSq();if(e>this.radius*this.radius){const t=Math.sqrt(e),n=.5*(t-this.radius);this.center.addScaledVector(Yi,n/t),this.radius+=n}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(!0===this.center.equals(t.center)?this.radius=Math.max(this.radius,t.radius):(Zi.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Yi.copy(t.center).add(Zi)),this.expandByPoint(Yi.copy(t.center).sub(Zi))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Ki=new Ci,$i=new Ci,Qi=new Ci,tr=new Ci,er=new Ci,nr=new Ci,ir=new Ci;class rr{constructor(t=new Ci,e=new Ci(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Ki)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=Ki.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Ki.copy(this.origin).addScaledVector(this.direction,e),Ki.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){$i.copy(t).add(e).multiplyScalar(.5),Qi.copy(e).sub(t).normalize(),tr.copy(this.origin).sub($i);const r=.5*t.distanceTo(e),s=-this.direction.dot(Qi),a=tr.dot(this.direction),o=-tr.dot(Qi),l=tr.lengthSq(),c=Math.abs(1-s*s);let h,u,d,p;if(c>0)if(h=s*o-a,u=s*a-o,p=r*c,h>=0)if(u>=-p)if(u<=p){const t=1/c;h*=t,u*=t,d=h*(h+s*u+2*a)+u*(s*h+u+2*o)+l}else u=r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u=-r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u<=-p?(h=Math.max(0,-(-s*r+a)),u=h>0?-r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l):u<=p?(h=0,u=Math.min(Math.max(-r,-o),r),d=u*(u+2*o)+l):(h=Math.max(0,-(s*r+a)),u=h>0?r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l);else u=s>0?-r:r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,h),i&&i.copy($i).addScaledVector(Qi,u),d}intersectSphere(t,e){Ki.subVectors(t.center,this.origin);const n=Ki.dot(this.direction),i=Ki.dot(Ki)-n*n,r=t.radius*t.radius;if(i>r)return null;const s=Math.sqrt(r-i),a=n-s,o=n+s;return o<0?null:a<0?this.at(o,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){const n=this.distanceToPlane(t);return null===n?null:this.at(n,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);if(0===e)return!0;return t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,r,s,a,o;const l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(n=(t.min.x-u.x)*l,i=(t.max.x-u.x)*l):(n=(t.max.x-u.x)*l,i=(t.min.x-u.x)*l),c>=0?(r=(t.min.y-u.y)*c,s=(t.max.y-u.y)*c):(r=(t.max.y-u.y)*c,s=(t.min.y-u.y)*c),n>s||r>i?null:((r>n||isNaN(n))&&(n=r),(s=0?(a=(t.min.z-u.z)*h,o=(t.max.z-u.z)*h):(a=(t.max.z-u.z)*h,o=(t.min.z-u.z)*h),n>o||a>i?null:((a>n||n!=n)&&(n=a),(o=0?n:i,e)))}intersectsBox(t){return null!==this.intersectBox(t,Ki)}intersectTriangle(t,e,n,i,r){er.subVectors(e,t),nr.subVectors(n,t),ir.crossVectors(er,nr);let s,a=this.direction.dot(ir);if(a>0){if(i)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}tr.subVectors(this.origin,t);const o=s*this.direction.dot(nr.crossVectors(tr,nr));if(o<0)return null;const l=s*this.direction.dot(er.cross(tr));if(l<0)return null;if(o+l>a)return null;const c=-s*tr.dot(ir);return c<0?null:this.at(c/a,r)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class sr{constructor(t,e,n,i,r,s,a,o,l,c,h,u,d,p,m,f){sr.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==t&&this.set(t,e,n,i,r,s,a,o,l,c,h,u,d,p,m,f)}set(t,e,n,i,r,s,a,o,l,c,h,u,d,p,m,f){const g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=i,g[1]=r,g[5]=s,g[9]=a,g[13]=o,g[2]=l,g[6]=c,g[10]=h,g[14]=u,g[3]=d,g[7]=p,g[11]=m,g[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new sr).fromArray(this.elements)}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){const e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,n=t.elements,i=1/ar.setFromMatrixColumn(t,0).length(),r=1/ar.setFromMatrixColumn(t,1).length(),s=1/ar.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=0,e[8]=n[8]*s,e[9]=n[9]*s,e[10]=n[10]*s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,n=t.x,i=t.y,r=t.z,s=Math.cos(n),a=Math.sin(n),o=Math.cos(i),l=Math.sin(i),c=Math.cos(r),h=Math.sin(r);if("XYZ"===t.order){const t=s*c,n=s*h,i=a*c,r=a*h;e[0]=o*c,e[4]=-o*h,e[8]=l,e[1]=n+i*l,e[5]=t-r*l,e[9]=-a*o,e[2]=r-t*l,e[6]=i+n*l,e[10]=s*o}else if("YXZ"===t.order){const t=o*c,n=o*h,i=l*c,r=l*h;e[0]=t+r*a,e[4]=i*a-n,e[8]=s*l,e[1]=s*h,e[5]=s*c,e[9]=-a,e[2]=n*a-i,e[6]=r+t*a,e[10]=s*o}else if("ZXY"===t.order){const t=o*c,n=o*h,i=l*c,r=l*h;e[0]=t-r*a,e[4]=-s*h,e[8]=i+n*a,e[1]=n+i*a,e[5]=s*c,e[9]=r-t*a,e[2]=-s*l,e[6]=a,e[10]=s*o}else if("ZYX"===t.order){const t=s*c,n=s*h,i=a*c,r=a*h;e[0]=o*c,e[4]=i*l-n,e[8]=t*l+r,e[1]=o*h,e[5]=r*l+t,e[9]=n*l-i,e[2]=-l,e[6]=a*o,e[10]=s*o}else if("YZX"===t.order){const t=s*o,n=s*l,i=a*o,r=a*l;e[0]=o*c,e[4]=r-t*h,e[8]=i*h+n,e[1]=h,e[5]=s*c,e[9]=-a*c,e[2]=-l*c,e[6]=n*h+i,e[10]=t-r*h}else if("XZY"===t.order){const t=s*o,n=s*l,i=a*o,r=a*l;e[0]=o*c,e[4]=-h,e[8]=l*c,e[1]=t*h+r,e[5]=s*c,e[9]=n*h-i,e[2]=i*h-n,e[6]=a*c,e[10]=r*h+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(lr,t,cr)}lookAt(t,e,n){const i=this.elements;return dr.subVectors(t,e),0===dr.lengthSq()&&(dr.z=1),dr.normalize(),hr.crossVectors(n,dr),0===hr.lengthSq()&&(1===Math.abs(n.z)?dr.x+=1e-4:dr.z+=1e-4,dr.normalize(),hr.crossVectors(n,dr)),hr.normalize(),ur.crossVectors(dr,hr),i[0]=hr.x,i[4]=ur.x,i[8]=dr.x,i[1]=hr.y,i[5]=ur.y,i[9]=dr.y,i[2]=hr.z,i[6]=ur.z,i[10]=dr.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],a=n[4],o=n[8],l=n[12],c=n[1],h=n[5],u=n[9],d=n[13],p=n[2],m=n[6],f=n[10],g=n[14],v=n[3],_=n[7],x=n[11],y=n[15],M=i[0],S=i[4],b=i[8],w=i[12],T=i[1],E=i[5],A=i[9],R=i[13],C=i[2],P=i[6],L=i[10],I=i[14],U=i[3],N=i[7],D=i[11],O=i[15];return r[0]=s*M+a*T+o*C+l*U,r[4]=s*S+a*E+o*P+l*N,r[8]=s*b+a*A+o*L+l*D,r[12]=s*w+a*R+o*I+l*O,r[1]=c*M+h*T+u*C+d*U,r[5]=c*S+h*E+u*P+d*N,r[9]=c*b+h*A+u*L+d*D,r[13]=c*w+h*R+u*I+d*O,r[2]=p*M+m*T+f*C+g*U,r[6]=p*S+m*E+f*P+g*N,r[10]=p*b+m*A+f*L+g*D,r[14]=p*w+m*R+f*I+g*O,r[3]=v*M+_*T+x*C+y*U,r[7]=v*S+_*E+x*P+y*N,r[11]=v*b+_*A+x*L+y*D,r[15]=v*w+_*R+x*I+y*O,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[4],i=t[8],r=t[12],s=t[1],a=t[5],o=t[9],l=t[13],c=t[2],h=t[6],u=t[10],d=t[14];return t[3]*(+r*o*h-i*l*h-r*a*u+n*l*u+i*a*d-n*o*d)+t[7]*(+e*o*d-e*l*u+r*s*u-i*s*d+i*l*c-r*o*c)+t[11]*(+e*l*h-e*a*d-r*s*h+n*s*d+r*a*c-n*l*c)+t[15]*(-i*a*c-e*o*h+e*a*u+i*s*h-n*s*u+n*o*c)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=t[9],u=t[10],d=t[11],p=t[12],m=t[13],f=t[14],g=t[15],v=h*f*l-m*u*l+m*o*d-a*f*d-h*o*g+a*u*g,_=p*u*l-c*f*l-p*o*d+s*f*d+c*o*g-s*u*g,x=c*m*l-p*h*l+p*a*d-s*m*d-c*a*g+s*h*g,y=p*h*o-c*m*o-p*a*u+s*m*u+c*a*f-s*h*f,M=e*v+n*_+i*x+r*y;if(0===M)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const S=1/M;return t[0]=v*S,t[1]=(m*u*r-h*f*r-m*i*d+n*f*d+h*i*g-n*u*g)*S,t[2]=(a*f*r-m*o*r+m*i*l-n*f*l-a*i*g+n*o*g)*S,t[3]=(h*o*r-a*u*r-h*i*l+n*u*l+a*i*d-n*o*d)*S,t[4]=_*S,t[5]=(c*f*r-p*u*r+p*i*d-e*f*d-c*i*g+e*u*g)*S,t[6]=(p*o*r-s*f*r-p*i*l+e*f*l+s*i*g-e*o*g)*S,t[7]=(s*u*r-c*o*r+c*i*l-e*u*l-s*i*d+e*o*d)*S,t[8]=x*S,t[9]=(p*h*r-c*m*r-p*n*d+e*m*d+c*n*g-e*h*g)*S,t[10]=(s*m*r-p*a*r+p*n*l-e*m*l-s*n*g+e*a*g)*S,t[11]=(c*a*r-s*h*r-c*n*l+e*h*l+s*n*d-e*a*d)*S,t[12]=y*S,t[13]=(c*m*i-p*h*i+p*n*u-e*m*u-c*n*f+e*h*f)*S,t[14]=(p*a*i-s*m*i-p*n*o+e*m*o+s*n*f-e*a*f)*S,t[15]=(s*h*i-c*a*i+c*n*o-e*h*o-s*n*u+e*a*u)*S,this}scale(t){const e=this.elements,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=i,e[8]*=r,e[1]*=n,e[5]*=i,e[9]*=r,e[2]*=n,e[6]*=i,e[10]*=r,e[3]*=n,e[7]*=i,e[11]*=r,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),r=1-n,s=t.x,a=t.y,o=t.z,l=r*s,c=r*a;return this.set(l*s+n,l*a-i*o,l*o+i*a,0,l*a+i*o,c*a+n,c*o-i*s,0,l*o-i*a,c*o+i*s,r*o*o+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,r,s){return this.set(1,n,r,0,t,1,s,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){const i=this.elements,r=e._x,s=e._y,a=e._z,o=e._w,l=r+r,c=s+s,h=a+a,u=r*l,d=r*c,p=r*h,m=s*c,f=s*h,g=a*h,v=o*l,_=o*c,x=o*h,y=n.x,M=n.y,S=n.z;return i[0]=(1-(m+g))*y,i[1]=(d+x)*y,i[2]=(p-_)*y,i[3]=0,i[4]=(d-x)*M,i[5]=(1-(u+g))*M,i[6]=(f+v)*M,i[7]=0,i[8]=(p+_)*S,i[9]=(f-v)*S,i[10]=(1-(u+m))*S,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){const i=this.elements;let r=ar.set(i[0],i[1],i[2]).length();const s=ar.set(i[4],i[5],i[6]).length(),a=ar.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],or.copy(this);const o=1/r,l=1/s,c=1/a;return or.elements[0]*=o,or.elements[1]*=o,or.elements[2]*=o,or.elements[4]*=l,or.elements[5]*=l,or.elements[6]*=l,or.elements[8]*=c,or.elements[9]*=c,or.elements[10]*=c,e.setFromRotationMatrix(or),n.x=r,n.y=s,n.z=a,this}makePerspective(t,e,n,i,r,s,a=2e3){const o=this.elements,l=2*r/(e-t),c=2*r/(n-i),h=(e+t)/(e-t),u=(n+i)/(n-i);let d,p;if(a===Fn)d=-(s+r)/(s-r),p=-2*s*r/(s-r);else{if(a!==zn)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);d=-s/(s-r),p=-s*r/(s-r)}return o[0]=l,o[4]=0,o[8]=h,o[12]=0,o[1]=0,o[5]=c,o[9]=u,o[13]=0,o[2]=0,o[6]=0,o[10]=d,o[14]=p,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(t,e,n,i,r,s,a=2e3){const o=this.elements,l=1/(e-t),c=1/(n-i),h=1/(s-r),u=(e+t)*l,d=(n+i)*c;let p,m;if(a===Fn)p=(s+r)*h,m=-2*h;else{if(a!==zn)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);p=r*h,m=-1*h}return o[0]=2*l,o[4]=0,o[8]=0,o[12]=-u,o[1]=0,o[5]=2*c,o[9]=0,o[13]=-d,o[2]=0,o[6]=0,o[10]=m,o[14]=-p,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<16;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}const ar=new Ci,or=new sr,lr=new Ci(0,0,0),cr=new Ci(1,1,1),hr=new Ci,ur=new Ci,dr=new Ci,pr=new sr,mr=new Ri;class fr{constructor(t=0,e=0,n=0,i=fr.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){const i=t.elements,r=i[0],s=i[4],a=i[8],o=i[1],l=i[5],c=i[9],h=i[2],u=i[6],d=i[10];switch(e){case"XYZ":this._y=Math.asin(Xn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Xn(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(Xn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(o,r));break;case"ZYX":this._y=Math.asin(-Xn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(o,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(Xn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-Xn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===n&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return pr.makeRotationFromQuaternion(t),this.setFromRotationMatrix(pr,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return mr.setFromEuler(this),this.setFromQuaternion(mr,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}fr.DEFAULT_ORDER="XYZ";class gr{constructor(){this.mask=1}set(t){this.mask=(1<>>0}enable(t){this.mask|=1<1){for(let t=0;t1){for(let t=0;t0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map((t=>({boxInitialized:t.boxInitialized,boxMin:t.box.min.toArray(),boxMax:t.box.max.toArray(),sphereInitialized:t.sphereInitialized,sphereRadius:t.sphere.radius,sphereCenter:t.sphere.center.toArray()}))),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(t),null!==this.boundingSphere&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),null!==this.boundingBox&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const n=e.shapes;if(Array.isArray(n))for(let e=0,i=n.length;e0){i.children=[];for(let e=0;e0){i.animations=[];for(let e=0;e0&&(n.geometries=e),i.length>0&&(n.materials=i),r.length>0&&(n.textures=r),a.length>0&&(n.images=a),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c),h.length>0&&(n.nodes=h)}return n.object=i,n;function s(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(t,e,n,i,r){Ur.subVectors(i,e),Nr.subVectors(n,e),Dr.subVectors(t,e);const s=Ur.dot(Ur),a=Ur.dot(Nr),o=Ur.dot(Dr),l=Nr.dot(Nr),c=Nr.dot(Dr),h=s*l-a*a;if(0===h)return r.set(0,0,0),null;const u=1/h,d=(l*o-a*c)*u,p=(s*c-a*o)*u;return r.set(1-d-p,p,d)}static containsPoint(t,e,n,i){return null!==this.getBarycoord(t,e,n,i,Or)&&(Or.x>=0&&Or.y>=0&&Or.x+Or.y<=1)}static getInterpolation(t,e,n,i,r,s,a,o){return null===this.getBarycoord(t,e,n,i,Or)?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(r,Or.x),o.addScaledVector(s,Or.y),o.addScaledVector(a,Or.z),o)}static isFrontFacing(t,e,n,i){return Ur.subVectors(n,e),Nr.subVectors(t,e),Ur.cross(Nr).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,e,n,i){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return Ur.subVectors(this.c,this.b),Nr.subVectors(this.a,this.b),.5*Ur.cross(Nr).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Gr.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Gr.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,i,r){return Gr.getInterpolation(t,this.a,this.b,this.c,e,n,i,r)}containsPoint(t){return Gr.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Gr.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const n=this.a,i=this.b,r=this.c;let s,a;Fr.subVectors(i,n),zr.subVectors(r,n),kr.subVectors(t,n);const o=Fr.dot(kr),l=zr.dot(kr);if(o<=0&&l<=0)return e.copy(n);Vr.subVectors(t,i);const c=Fr.dot(Vr),h=zr.dot(Vr);if(c>=0&&h<=c)return e.copy(i);const u=o*h-c*l;if(u<=0&&o>=0&&c<=0)return s=o/(o-c),e.copy(n).addScaledVector(Fr,s);Hr.subVectors(t,r);const d=Fr.dot(Hr),p=zr.dot(Hr);if(p>=0&&d<=p)return e.copy(r);const m=d*l-o*p;if(m<=0&&l>=0&&p<=0)return a=l/(l-p),e.copy(n).addScaledVector(zr,a);const f=c*p-d*h;if(f<=0&&h-c>=0&&d-p>=0)return Br.subVectors(r,i),a=(h-c)/(h-c+(d-p)),e.copy(i).addScaledVector(Br,a);const g=1/(f+m+u);return s=m*g,a=u*g,e.copy(n).addScaledVector(Fr,s).addScaledVector(zr,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const Wr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Xr={h:0,s:0,l:0},jr={h:0,s:0,l:0};function qr(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}class Yr{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,n)}set(t,e,n){if(void 0===e&&void 0===n){const e=t;e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e)}else this.setRGB(t,e,n);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=qe){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,ui.toWorkingColorSpace(this,e),this}setRGB(t,e,n,i=ui.workingColorSpace){return this.r=t,this.g=e,this.b=n,ui.toWorkingColorSpace(this,i),this}setHSL(t,e,n,i=ui.workingColorSpace){if(t=jn(t,1),e=Xn(e,0,1),n=Xn(n,0,1),0===e)this.r=this.g=this.b=n;else{const i=n<=.5?n*(1+e):n+e-n*e,r=2*n-i;this.r=qr(r,i,t+1/3),this.g=qr(r,i,t),this.b=qr(r,i,t-1/3)}return ui.toWorkingColorSpace(this,i),this}setStyle(t,e=qe){function n(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(t)){let r;const s=i[1],a=i[2];switch(s){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,e);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,e);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(t)){const n=i[1],r=n.length;if(3===r)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,e);if(6===r)return this.setHex(parseInt(n,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=qe){const n=Wr[t.toLowerCase()];return void 0!==n?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=di(t.r),this.g=di(t.g),this.b=di(t.b),this}copyLinearToSRGB(t){return this.r=pi(t.r),this.g=pi(t.g),this.b=pi(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=qe){return ui.fromWorkingColorSpace(Zr.copy(this),t),65536*Math.round(Xn(255*Zr.r,0,255))+256*Math.round(Xn(255*Zr.g,0,255))+Math.round(Xn(255*Zr.b,0,255))}getHexString(t=qe){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=ui.workingColorSpace){ui.fromWorkingColorSpace(Zr.copy(this),e);const n=Zr.r,i=Zr.g,r=Zr.b,s=Math.max(n,i,r),a=Math.min(n,i,r);let o,l;const c=(a+s)/2;if(a===s)o=0,l=0;else{const t=s-a;switch(l=c<=.5?t/(s+a):t/(2-s-a),s){case n:o=(i-r)/t+(i0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(const e in t){const n=t[e];if(void 0===n){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}const i=this[e];void 0!==i?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n:console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`)}}toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function i(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.dispersion&&(n.dispersion=this.dispersion),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapRotation&&(n.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),this.side!==u&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),this.blendSrc!==C&&(n.blendSrc=this.blendSrc),this.blendDst!==P&&(n.blendDst=this.blendDst),this.blendEquation!==y&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==nn&&(n.stencilFail=this.stencilFail),this.stencilZFail!==nn&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==nn&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),e){const e=i(t.textures),r=i(t.images);e.length>0&&(n.textures=e),r.length>0&&(n.images=r)}return n}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let n=null;if(null!==e){const t=e.length;n=new Array(t);for(let i=0;i!==t;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}}class $r extends Kr{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Yr(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new fr,this.combine=Y,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const Qr=ts();function ts(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),i=new Uint32Array(512),r=new Uint32Array(512);for(let t=0;t<256;++t){const e=t-127;e<-27?(i[t]=0,i[256|t]=32768,r[t]=24,r[256|t]=24):e<-14?(i[t]=1024>>-e-14,i[256|t]=1024>>-e-14|32768,r[t]=-e-1,r[256|t]=-e-1):e<=15?(i[t]=e+15<<10,i[256|t]=e+15<<10|32768,r[t]=13,r[256|t]=13):e<128?(i[t]=31744,i[256|t]=64512,r[t]=24,r[256|t]=24):(i[t]=31744,i[256|t]=64512,r[t]=13,r[256|t]=13)}const s=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let t=1;t<1024;++t){let e=t<<13,n=0;for(;0==(8388608&e);)e<<=1,n-=8388608;e&=-8388609,n+=947912704,s[t]=e|n}for(let t=1024;t<2048;++t)s[t]=939524096+(t-1024<<13);for(let t=1;t<31;++t)a[t]=t<<23;a[31]=1199570944,a[32]=2147483648;for(let t=33;t<63;++t)a[t]=2147483648+(t-32<<23);a[63]=3347054592;for(let t=1;t<64;++t)32!==t&&(o[t]=1024);return{floatView:e,uint32View:n,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:a,offsetTable:o}}function es(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Xn(t,-65504,65504),Qr.floatView[0]=t;const e=Qr.uint32View[0],n=e>>23&511;return Qr.baseTable[n]+((8388607&e)>>Qr.shiftTable[n])}function ns(t){const e=t>>10;return Qr.uint32View[0]=Qr.mantissaTable[Qr.offsetTable[e]+(1023&t)]+Qr.exponentTable[e],Qr.floatView[0]}const is={toHalfFloat:es,fromHalfFloat:ns},rs=new Ci,ss=new Kn;class as{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=n,this.usage=En,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=It,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return ai("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let i=0,r=this.itemSize;i0&&(t.userData=this.userData),void 0!==this.parameters){const e=this.parameters;for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const n=this.attributes;for(const e in n){const i=n[e];t.data.attributes[e]=i.toJSON(t.data)}const i={};let r=!1;for(const e in this.morphAttributes){const n=this.morphAttributes[e],s=[];for(let e=0,i=n.length;e0&&(i[e]=s,r=!0)}r&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return null!==a&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return(new this.constructor).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const n=t.index;null!==n&&this.setIndex(n.clone(e));const i=t.attributes;for(const t in i){const n=i[t];this.setAttribute(t,n.clone(e))}const r=t.morphAttributes;for(const t in r){const n=[],i=r[t];for(let t=0,r=i.length;t0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;t(t.far-t.near)**2)return}ws.copy(r).invert(),Ts.copy(t.ray).applyMatrix4(ws),null!==n.boundingBox&&!1===Ts.intersectsBox(n.boundingBox)||this._computeIntersections(t,e,Ts)}}_computeIntersections(t,e,n){let i;const r=this.geometry,s=this.material,a=r.index,o=r.attributes.position,l=r.attributes.uv,c=r.attributes.uv1,h=r.attributes.normal,u=r.groups,d=r.drawRange;if(null!==a)if(Array.isArray(s))for(let r=0,o=u.length;rn.far?null:{distance:c,point:ks.clone(),object:t}}(t,e,n,i,Rs,Cs,Ps,Bs);if(h){r&&(Us.fromBufferAttribute(r,o),Ns.fromBufferAttribute(r,l),Ds.fromBufferAttribute(r,c),h.uv=Gr.getInterpolation(Bs,Rs,Cs,Ps,Us,Ns,Ds,new Kn)),s&&(Us.fromBufferAttribute(s,o),Ns.fromBufferAttribute(s,l),Ds.fromBufferAttribute(s,c),h.uv1=Gr.getInterpolation(Bs,Rs,Cs,Ps,Us,Ns,Ds,new Kn)),a&&(Os.fromBufferAttribute(a,o),Fs.fromBufferAttribute(a,l),zs.fromBufferAttribute(a,c),h.normal=Gr.getInterpolation(Bs,Rs,Cs,Ps,Os,Fs,zs,new Ci),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const t={a:o,b:l,c:c,normal:new Ci,materialIndex:0};Gr.getNormal(Rs,Cs,Ps,t.normal),h.face=t}return h}class Gs extends bs{constructor(t=1,e=1,n=1,i=1,r=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:r,depthSegments:s};const a=this;i=Math.floor(i),r=Math.floor(r),s=Math.floor(s);const o=[],l=[],c=[],h=[];let u=0,d=0;function p(t,e,n,i,r,s,p,m,f,g,v){const _=s/f,x=p/g,y=s/2,M=p/2,S=m/2,b=f+1,w=g+1;let T=0,E=0;const A=new Ci;for(let s=0;s0?1:-1,c.push(A.x,A.y,A.z),h.push(o/f),h.push(1-s/g),T+=1}}for(let t=0;t0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const n={};for(const t in this.extensions)!0===this.extensions[t]&&(n[t]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}}class Zs extends Ir{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new sr,this.projectionMatrix=new sr,this.projectionMatrixInverse=new sr,this.coordinateSystem=Fn}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}const Js=new Ci,Ks=new Kn,$s=new Kn;class Qs extends Zs{constructor(t=50,e=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*Gn*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Hn*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*Gn*Math.atan(Math.tan(.5*Hn*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,e,n){Js.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Js.x,Js.y).multiplyScalar(-t/Js.z),Js.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Js.x,Js.y).multiplyScalar(-t/Js.z)}getViewSize(t,e){return this.getViewBounds(t,Ks,$s),e.subVectors($s,Ks)}setViewOffset(t,e,n,i,r,s){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*Hn*this.fov)/this.zoom,n=2*e,i=this.aspect*n,r=-.5*i;const s=this.view;if(null!==this.view&&this.view.enabled){const t=s.fullWidth,a=s.fullHeight;r+=s.offsetX*i/t,e-=s.offsetY*n/a,i*=s.width/t,n*=s.height/a}const a=this.filmOffset;0!==a&&(r+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,e,e-n,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}const ta=-90;class ea extends Ir{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Qs(ta,1,t,e);i.layers=this.layers,this.add(i);const r=new Qs(ta,1,t,e);r.layers=this.layers,this.add(r);const s=new Qs(ta,1,t,e);s.layers=this.layers,this.add(s);const a=new Qs(ta,1,t,e);a.layers=this.layers,this.add(a);const o=new Qs(ta,1,t,e);o.layers=this.layers,this.add(o);const l=new Qs(ta,1,t,e);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[n,i,r,s,a,o]=e;for(const t of e)this.remove(t);if(t===Fn)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),s.up.set(0,0,1),s.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else{if(t!==zn)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),s.up.set(0,0,-1),s.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1)}for(const t of e)this.add(t),t.updateMatrixWorld()}update(t,e){null===this.parent&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[r,s,a,o,l,c]=this.children,h=t.getRenderTarget(),u=t.getActiveCubeFace(),d=t.getActiveMipmapLevel(),p=t.xr.enabled;t.xr.enabled=!1;const m=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0,i),t.render(e,r),t.setRenderTarget(n,1,i),t.render(e,s),t.setRenderTarget(n,2,i),t.render(e,a),t.setRenderTarget(n,3,i),t.render(e,o),t.setRenderTarget(n,4,i),t.render(e,l),n.texture.generateMipmaps=m,t.setRenderTarget(n,5,i),t.render(e,c),t.setRenderTarget(h,u,d),t.xr.enabled=p,n.texture.needsPMREMUpdate=!0}}class na extends yi{constructor(t,e,n,i,r,s,a,o,l,c){super(t=void 0!==t?t:[],e=void 0!==e?e:lt,n,i,r,s,a,o,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class ia extends bi{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1},i=[n,n,n,n,n,n];this.texture=new na(i,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:Mt}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},i=new Gs(5,5,5),r=new Ys({name:"CubemapFromEquirect",uniforms:Ws(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:d,blending:0});r.uniforms.tEquirect.value=e;const s=new Vs(i,r),a=e.minFilter;e.minFilter===wt&&(e.minFilter=Mt);return new ea(1,10,this).update(t,s),e.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(t,e,n,i){const r=t.getRenderTarget();for(let r=0;r<6;r++)t.setRenderTarget(this,r),t.clear(e,n,i);t.setRenderTarget(r)}}const ra=new Ci,sa=new Ci,aa=new $n;class oa{constructor(t=new Ci(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){const i=ra.subVectors(n,e).cross(sa.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const n=t.delta(ra),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const r=-(t.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:e.copy(t.start).addScaledVector(n,r)}intersectsLine(t){const e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const n=e||aa.getNormalMatrix(t),i=this.coplanarPoint(ra).applyMatrix4(t),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const la=new Ji,ca=new Ci;class ha{constructor(t=new oa,e=new oa,n=new oa,i=new oa,r=new oa,s=new oa){this.planes=[t,e,n,i,r,s]}set(t,e,n,i,r,s){const a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(i),a[4].copy(r),a[5].copy(s),this}copy(t){const e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t,e=2e3){const n=this.planes,i=t.elements,r=i[0],s=i[1],a=i[2],o=i[3],l=i[4],c=i[5],h=i[6],u=i[7],d=i[8],p=i[9],m=i[10],f=i[11],g=i[12],v=i[13],_=i[14],x=i[15];if(n[0].setComponents(o-r,u-l,f-d,x-g).normalize(),n[1].setComponents(o+r,u+l,f+d,x+g).normalize(),n[2].setComponents(o+s,u+c,f+p,x+v).normalize(),n[3].setComponents(o-s,u-c,f-p,x-v).normalize(),n[4].setComponents(o-a,u-h,f-m,x-_).normalize(),e===Fn)n[5].setComponents(o+a,u+h,f+m,x+_).normalize();else{if(e!==zn)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);n[5].setComponents(a,h,m,_).normalize()}return this}intersectsObject(t){if(void 0!==t.boundingSphere)null===t.boundingSphere&&t.computeBoundingSphere(),la.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),la.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(la)}intersectsSprite(t){return la.center.set(0,0,0),la.radius=.7071067811865476,la.applyMatrix4(t.matrixWorld),this.intersectsSphere(la)}intersectsSphere(t){const e=this.planes,n=t.center,i=-t.radius;for(let t=0;t<6;t++){if(e[t].distanceToPoint(n)0?t.max.x:t.min.x,ca.y=i.normal.y>0?t.max.y:t.min.y,ca.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(ca)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function ua(){let t=null,e=!1,n=null,i=null;function r(e,s){n(e,s),i=t.requestAnimationFrame(r)}return{start:function(){!0!==e&&null!==n&&(i=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(t){n=t},setContext:function(e){t=e}}}function da(t){const e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);const i=e.get(n);i&&(t.deleteBuffer(i.buffer),e.delete(n))},update:function(n,i){if(n.isGLBufferAttribute){const t=e.get(n);return void((!t||t.version 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphinstance_vertex:"#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[MORPHTARGETS_COUNT];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t#endif\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\t#ifndef USE_INSTANCING_MORPH\n\t\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\t#endif\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\t\n\t\tfloat lightToPositionLength = length( lightToPosition );\n\t\tif ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\t\tdp += shadowBias;\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t\t) * ( 1.0 / 9.0 );\n\t\t\t#else\n\t\t\t\tshadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak < StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},fa={common:{diffuse:{value:new Yr(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new $n},alphaMap:{value:null},alphaMapTransform:{value:new $n},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new $n}},envmap:{envMap:{value:null},envMapRotation:{value:new $n},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new $n}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new $n}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new $n},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new $n},normalScale:{value:new Kn(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new $n},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new $n}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new $n}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new $n}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Yr(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Yr(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new $n},alphaTest:{value:0},uvTransform:{value:new $n}},sprite:{diffuse:{value:new Yr(16777215)},opacity:{value:1},center:{value:new Kn(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new $n},alphaMap:{value:null},alphaMapTransform:{value:new $n},alphaTest:{value:0}}},ga={basic:{uniforms:Xs([fa.common,fa.specularmap,fa.envmap,fa.aomap,fa.lightmap,fa.fog]),vertexShader:ma.meshbasic_vert,fragmentShader:ma.meshbasic_frag},lambert:{uniforms:Xs([fa.common,fa.specularmap,fa.envmap,fa.aomap,fa.lightmap,fa.emissivemap,fa.bumpmap,fa.normalmap,fa.displacementmap,fa.fog,fa.lights,{emissive:{value:new Yr(0)}}]),vertexShader:ma.meshlambert_vert,fragmentShader:ma.meshlambert_frag},phong:{uniforms:Xs([fa.common,fa.specularmap,fa.envmap,fa.aomap,fa.lightmap,fa.emissivemap,fa.bumpmap,fa.normalmap,fa.displacementmap,fa.fog,fa.lights,{emissive:{value:new Yr(0)},specular:{value:new Yr(1118481)},shininess:{value:30}}]),vertexShader:ma.meshphong_vert,fragmentShader:ma.meshphong_frag},standard:{uniforms:Xs([fa.common,fa.envmap,fa.aomap,fa.lightmap,fa.emissivemap,fa.bumpmap,fa.normalmap,fa.displacementmap,fa.roughnessmap,fa.metalnessmap,fa.fog,fa.lights,{emissive:{value:new Yr(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ma.meshphysical_vert,fragmentShader:ma.meshphysical_frag},toon:{uniforms:Xs([fa.common,fa.aomap,fa.lightmap,fa.emissivemap,fa.bumpmap,fa.normalmap,fa.displacementmap,fa.gradientmap,fa.fog,fa.lights,{emissive:{value:new Yr(0)}}]),vertexShader:ma.meshtoon_vert,fragmentShader:ma.meshtoon_frag},matcap:{uniforms:Xs([fa.common,fa.bumpmap,fa.normalmap,fa.displacementmap,fa.fog,{matcap:{value:null}}]),vertexShader:ma.meshmatcap_vert,fragmentShader:ma.meshmatcap_frag},points:{uniforms:Xs([fa.points,fa.fog]),vertexShader:ma.points_vert,fragmentShader:ma.points_frag},dashed:{uniforms:Xs([fa.common,fa.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ma.linedashed_vert,fragmentShader:ma.linedashed_frag},depth:{uniforms:Xs([fa.common,fa.displacementmap]),vertexShader:ma.depth_vert,fragmentShader:ma.depth_frag},normal:{uniforms:Xs([fa.common,fa.bumpmap,fa.normalmap,fa.displacementmap,{opacity:{value:1}}]),vertexShader:ma.meshnormal_vert,fragmentShader:ma.meshnormal_frag},sprite:{uniforms:Xs([fa.sprite,fa.fog]),vertexShader:ma.sprite_vert,fragmentShader:ma.sprite_frag},background:{uniforms:{uvTransform:{value:new $n},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ma.background_vert,fragmentShader:ma.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new $n}},vertexShader:ma.backgroundCube_vert,fragmentShader:ma.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ma.cube_vert,fragmentShader:ma.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ma.equirect_vert,fragmentShader:ma.equirect_frag},distanceRGBA:{uniforms:Xs([fa.common,fa.displacementmap,{referencePosition:{value:new Ci},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ma.distanceRGBA_vert,fragmentShader:ma.distanceRGBA_frag},shadow:{uniforms:Xs([fa.lights,fa.fog,{color:{value:new Yr(0)},opacity:{value:1}}]),vertexShader:ma.shadow_vert,fragmentShader:ma.shadow_frag}};ga.physical={uniforms:Xs([ga.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new $n},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new $n},clearcoatNormalScale:{value:new Kn(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new $n},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new $n},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new $n},sheen:{value:0},sheenColor:{value:new Yr(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new $n},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new $n},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new $n},transmissionSamplerSize:{value:new Kn},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new $n},attenuationDistance:{value:0},attenuationColor:{value:new Yr(0)},specularColor:{value:new Yr(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new $n},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new $n},anisotropyVector:{value:new Kn},anisotropyMap:{value:null},anisotropyMapTransform:{value:new $n}}]),vertexShader:ma.meshphysical_vert,fragmentShader:ma.meshphysical_frag};const va={r:0,b:0,g:0},_a=new fr,xa=new sr;function ya(t,e,n,i,r,s,a){const o=new Yr(0);let l,c,h=!0===s?0:1,p=null,m=0,f=null;function g(t){let i=!0===t.isScene?t.background:null;if(i&&i.isTexture){i=(t.backgroundBlurriness>0?n:e).get(i)}return i}function v(e,n){e.getRGB(va,js(t)),i.buffers.color.setClear(va.r,va.g,va.b,n,a)}return{getClearColor:function(){return o},setClearColor:function(t,e=1){o.set(t),h=e,v(o,h)},getClearAlpha:function(){return h},setClearAlpha:function(t){h=t,v(o,h)},render:function(e){let n=!1;const r=g(e);null===r?v(o,h):r&&r.isColor&&(v(r,1),n=!0);const s=t.xr.getEnvironmentBlendMode();"additive"===s?i.buffers.color.setClear(0,0,0,1,a):"alpha-blend"===s&&i.buffers.color.setClear(0,0,0,0,a),(t.autoClear||n)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil)},addToRenderList:function(e,n){const i=g(n);i&&(i.isCubeTexture||i.mapping===dt)?(void 0===c&&(c=new Vs(new Gs(1,1,1),new Ys({name:"BackgroundCubeMaterial",uniforms:Ws(ga.backgroundCube.uniforms),vertexShader:ga.backgroundCube.vertexShader,fragmentShader:ga.backgroundCube.fragmentShader,side:d,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(c)),_a.copy(n.backgroundRotation),_a.x*=-1,_a.y*=-1,_a.z*=-1,i.isCubeTexture&&!1===i.isRenderTargetTexture&&(_a.y*=-1,_a.z*=-1),c.material.uniforms.envMap.value=i,c.material.uniforms.flipEnvMap.value=i.isCubeTexture&&!1===i.isRenderTargetTexture?-1:1,c.material.uniforms.backgroundBlurriness.value=n.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,c.material.uniforms.backgroundRotation.value.setFromMatrix4(xa.makeRotationFromEuler(_a)),c.material.toneMapped=ui.getTransfer(i.colorSpace)!==$e,p===i&&m===i.version&&f===t.toneMapping||(c.material.needsUpdate=!0,p=i,m=i.version,f=t.toneMapping),c.layers.enableAll(),e.unshift(c,c.geometry,c.material,0,0,null)):i&&i.isTexture&&(void 0===l&&(l=new Vs(new pa(2,2),new Ys({name:"BackgroundMaterial",uniforms:Ws(ga.background.uniforms),vertexShader:ga.background.vertexShader,fragmentShader:ga.background.fragmentShader,side:u,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(l)),l.material.uniforms.t2D.value=i,l.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,l.material.toneMapped=ui.getTransfer(i.colorSpace)!==$e,!0===i.matrixAutoUpdate&&i.updateMatrix(),l.material.uniforms.uvTransform.value.copy(i.matrix),p===i&&m===i.version&&f===t.toneMapping||(l.material.needsUpdate=!0,p=i,m=i.version,f=t.toneMapping),l.layers.enableAll(),e.unshift(l,l.geometry,l.material,0,0,null))}}}function Ma(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),i={},r=c(null);let s=r,a=!1;function o(e){return t.bindVertexArray(e)}function l(e){return t.deleteVertexArray(e)}function c(t){const e=[],i=[],r=[];for(let t=0;t=0){const n=r[e];let i=a[e];if(void 0===i&&("instanceMatrix"===e&&t.instanceMatrix&&(i=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(i=t.instanceColor)),void 0===n)return!0;if(n.attribute!==i)return!0;if(i&&n.data!==i.data)return!0;o++}}return s.attributesNum!==o||s.index!==i}(n,f,l,g),v&&function(t,e,n,i){const r={},a=e.attributes;let o=0;const l=n.getAttributes();for(const e in l){if(l[e].location>=0){let n=a[e];void 0===n&&("instanceMatrix"===e&&t.instanceMatrix&&(n=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(n=t.instanceColor));const i={};i.attribute=n,n&&n.data&&(i.data=n.data),r[e]=i,o++}}s.attributes=r,s.attributesNum=o,s.index=i}(n,f,l,g),null!==g&&e.update(g,t.ELEMENT_ARRAY_BUFFER),(v||a)&&(a=!1,function(n,i,r,s){h();const a=s.attributes,o=r.getAttributes(),l=i.defaultAttributeValues;for(const i in o){const r=o[i];if(r.location>=0){let o=a[i];if(void 0===o&&("instanceMatrix"===i&&n.instanceMatrix&&(o=n.instanceMatrix),"instanceColor"===i&&n.instanceColor&&(o=n.instanceColor)),void 0!==o){const i=o.normalized,a=o.itemSize,l=e.get(o);if(void 0===l)continue;const c=l.buffer,h=l.type,p=l.bytesPerElement,f=h===t.INT||h===t.UNSIGNED_INT||o.gpuType===Pt;if(o.isInterleavedBufferAttribute){const e=o.data,l=e.stride,g=o.offset;if(e.isInstancedInterleavedBuffer){for(let t=0;t0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let a=void 0!==n.precision?n.precision:"highp";const o=s(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);const l=!0===n.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===e.has("EXT_texture_filter_anisotropic")){const n=e.get("EXT_texture_filter_anisotropic");r=t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:s,textureFormatReadable:function(e){return e===kt||i.convert(e)===t.getParameter(t.IMPLEMENTATION_COLOR_READ_FORMAT)},textureTypeReadable:function(n){const r=n===Ut&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(n!==Et&&i.convert(n)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_TYPE)&&n!==It&&!r)},precision:a,logarithmicDepthBuffer:l,maxTextures:c,maxVertexTextures:h,maxTextureSize:t.getParameter(t.MAX_TEXTURE_SIZE),maxCubemapSize:t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),maxAttributes:t.getParameter(t.MAX_VERTEX_ATTRIBS),maxVertexUniforms:t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),maxVaryings:t.getParameter(t.MAX_VARYING_VECTORS),maxFragmentUniforms:t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),vertexTextures:h>0,maxSamples:t.getParameter(t.MAX_SAMPLES)}}function wa(t){const e=this;let n=null,i=0,r=!1,s=!1;const a=new oa,o=new $n,l={value:null,needsUpdate:!1};function c(t,n,i,r){const s=null!==t?t.length:0;let c=null;if(0!==s){if(c=l.value,!0!==r||null===c){const e=i+4*s,r=n.matrixWorldInverse;o.getNormalMatrix(r),(null===c||c.length0);e.numPlanes=i,e.numIntersection=0}();else{const t=s?0:i,e=4*t;let r=m.clippingState||null;l.value=r,r=c(u,o,e,h);for(let t=0;t!==e;++t)r[t]=n[t];m.clippingState=r,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=t}}}function Ta(t){let e=new WeakMap;function n(t,e){return e===ht?t.mapping=lt:e===ut&&(t.mapping=ct),t}function i(t){const n=t.target;n.removeEventListener("dispose",i);const r=e.get(n);void 0!==r&&(e.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture){const s=r.mapping;if(s===ht||s===ut){if(e.has(r)){return n(e.get(r).texture,r.mapping)}{const s=r.image;if(s&&s.height>0){const a=new ia(s.height);return a.fromEquirectangularTexture(t,r),e.set(r,a),r.addEventListener("dispose",i),n(a.texture,r.mapping)}return null}}}return r},dispose:function(){e=new WeakMap}}}class Ea extends Zs{constructor(t=-1,e=1,n=1,i=-1,r=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=i,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,n,i,r,s){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let r=n-t,s=n+t,a=i+e,o=i-e;if(null!==this.view&&this.view.enabled){const t=(this.right-this.left)/this.view.fullWidth/this.zoom,e=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=t*this.view.offsetX,s=r+t*this.view.width,a-=e*this.view.offsetY,o=a-e*this.view.height}this.projectionMatrix.makeOrthographic(r,s,a,o,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}const Aa=[.125,.215,.35,.446,.526,.582],Ra=20,Ca=new Ea,Pa=new Yr;let La=null,Ia=0,Ua=0,Na=!1;const Da=(1+Math.sqrt(5))/2,Oa=1/Da,Fa=[new Ci(-Da,Oa,0),new Ci(Da,Oa,0),new Ci(-Oa,0,Da),new Ci(Oa,0,Da),new Ci(0,Da,-Oa),new Ci(0,Da,Oa),new Ci(-1,1,-1),new Ci(1,1,-1),new Ci(-1,1,1),new Ci(1,1,1)];class za{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,n=.1,i=100){La=this._renderer.getRenderTarget(),Ia=this._renderer.getActiveCubeFace(),Ua=this._renderer.getActiveMipmapLevel(),Na=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(t,n,i,r),e>0&&this._blur(r,0,0,e),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=Ha(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=Va(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let t=0;tt-4?o=Aa[a-t+4-1]:0===a&&(o=0),i.push(o);const l=1/(s-2),c=-l,h=1+l,u=[c,c,h,c,h,h,c,c,h,h,c,h],d=6,p=6,m=3,f=2,g=1,v=new Float32Array(m*p*d),_=new Float32Array(f*p*d),x=new Float32Array(g*p*d);for(let t=0;t2?0:-1,i=[e,n,0,e+2/3,n,0,e+2/3,n+1,0,e,n,0,e+2/3,n+1,0,e,n+1,0];v.set(i,m*p*t),_.set(u,f*p*t);const r=[t,t,t,t,t,t];x.set(r,g*p*t)}const y=new bs;y.setAttribute("position",new as(v,m)),y.setAttribute("uv",new as(_,f)),y.setAttribute("faceIndex",new as(x,g)),e.push(y),r>4&&r--}return{lodPlanes:e,sizeLods:n,sigmas:i}}(i)),this._blurMaterial=function(t,e,n){const i=new Float32Array(Ra),r=new Ci(0,1,0),s=new Ys({name:"SphericalGaussianBlur",defines:{n:Ra,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:Ga(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1});return s}(i,t,e)}return i}_compileMaterial(t){const e=new Vs(this._lodPlanes[0],t);this._renderer.compile(e,Ca)}_sceneToCubeUV(t,e,n,i){const r=new Qs(90,1,e,n),s=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],o=this._renderer,l=o.autoClear,c=o.toneMapping;o.getClearColor(Pa),o.toneMapping=K,o.autoClear=!1;const h=new $r({name:"PMREM.Background",side:d,depthWrite:!1,depthTest:!1}),u=new Vs(new Gs,h);let p=!1;const m=t.background;m?m.isColor&&(h.color.copy(m),t.background=null,p=!0):(h.color.copy(Pa),p=!0);for(let e=0;e<6;e++){const n=e%3;0===n?(r.up.set(0,s[e],0),r.lookAt(a[e],0,0)):1===n?(r.up.set(0,0,s[e]),r.lookAt(0,a[e],0)):(r.up.set(0,s[e],0),r.lookAt(0,0,a[e]));const l=this._cubeSize;ka(i,n*l,e>2?l:0,l,l),o.setRenderTarget(i),p&&o.render(u,r),o.render(t,r)}u.geometry.dispose(),u.material.dispose(),o.toneMapping=c,o.autoClear=l,t.background=m}_textureToCubeUV(t,e){const n=this._renderer,i=t.mapping===lt||t.mapping===ct;i?(null===this._cubemapMaterial&&(this._cubemapMaterial=Ha()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=Va());const r=i?this._cubemapMaterial:this._equirectMaterial,s=new Vs(this._lodPlanes[0],r);r.uniforms.envMap.value=t;const a=this._cubeSize;ka(e,0,0,3*a,2*a),n.setRenderTarget(e),n.render(s,Ca)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const i=this._lodPlanes.length;for(let e=1;eRa&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${m} samples when the maximum is set to 20`);const f=[];let g=0;for(let t=0;tv-4?i-v+4:0),4*(this._cubeSize-_),3*_,2*_),o.setRenderTarget(e),o.render(c,Ca)}}function Ba(t,e,n){const i=new bi(t,e,n);return i.texture.mapping=dt,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function ka(t,e,n,i,r){t.viewport.set(e,n,i,r),t.scissor.set(e,n,i,r)}function Va(){return new Ys({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Ga(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function Ha(){return new Ys({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Ga(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function Ga(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function Wa(t){let e=new WeakMap,n=null;function i(t){const n=t.target;n.removeEventListener("dispose",i);const r=e.get(n);void 0!==r&&(e.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture){const s=r.mapping,a=s===ht||s===ut,o=s===lt||s===ct;if(a||o){let s=e.get(r);const l=void 0!==s?s.texture.pmremVersion:0;if(r.isRenderTargetTexture&&r.pmremVersion!==l)return null===n&&(n=new za(t)),s=a?n.fromEquirectangular(r,s):n.fromCubemap(r,s),s.texture.pmremVersion=r.pmremVersion,e.set(r,s),s.texture;if(void 0!==s)return s.texture;{const l=r.image;return a&&l&&l.height>0||o&&l&&function(t){let e=0;const n=6;for(let i=0;ie.maxTextureSize&&(y=Math.ceil(x/e.maxTextureSize),x=e.maxTextureSize);const M=new Float32Array(x*y*4*h),S=new wi(M,x,y,h);S.type=It,S.needsUpdate=!0;const b=4*_;for(let T=0;T0)return t;const r=e*n;let s=io[r];if(void 0===s&&(s=new Float32Array(r),io[r]=s),0!==e){i.toArray(s,0);for(let i=1,r=0;i!==e;++i)r+=n,t[i].toArray(s,r)}return s}function co(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n":" "} ${r}: ${n[t]}`)}return i.join("\n")}(t.getShaderSource(e),i)}return r}function ll(t,e){const n=function(t){const e=ui.getPrimaries(ui.workingColorSpace),n=ui.getPrimaries(t);let i;switch(e===n?i="":e===tn&&n===Qe?i="LinearDisplayP3ToLinearSRGB":e===Qe&&n===tn&&(i="LinearSRGBToLinearDisplayP3"),t){case Ye:case Je:return[i,"LinearTransferOETF"];case qe:case Ze:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[i,"LinearTransferOETF"]}}(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function cl(t,e){let n;switch(e){case $:n="Linear";break;case Q:n="Reinhard";break;case tt:n="OptimizedCineon";break;case et:n="ACESFilmic";break;case it:n="AgX";break;case rt:n="Neutral";break;case nt:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function hl(t){return""!==t}function ul(t,e){const n=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function dl(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const pl=/^[ \t]*#include +<([\w\d./]+)>/gm;function ml(t){return t.replace(pl,gl)}const fl=new Map;function gl(t,e){let n=ma[e];if(void 0===n){const t=fl.get(e);if(void 0===t)throw new Error("Can not resolve #include <"+e+">");n=ma[t],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,t)}return ml(n)}const vl=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function _l(t){return t.replace(vl,xl)}function xl(t,e,n,i){let r="";for(let t=parseInt(e);t0&&(x+="\n"),y=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(hl).join("\n"),y.length>0&&(y+="\n")):(x=[yl(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+p:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+u:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","\tuniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(hl).join("\n"),y=[yl(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+d:"",n.envMap?"#define "+p:"",n.envMap?"#define "+m:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+u:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==K?"#define TONE_MAPPING":"",n.toneMapping!==K?ma.tonemapping_pars_fragment:"",n.toneMapping!==K?cl("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",ma.colorspace_pars_fragment,ll("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(hl).join("\n")),a=ml(a),a=ul(a,n),a=dl(a,n),o=ml(o),o=ul(o,n),o=dl(o,n),a=_l(a),o=_l(o),!0!==n.isRawShaderMaterial&&(M="#version 300 es\n",x=[g,"#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+x,y=["#define varying in",n.glslVersion===On?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===On?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+y);const S=M+x+a,b=M+y+o,w=rl(r,r.VERTEX_SHADER,S),T=rl(r,r.FRAGMENT_SHADER,b);function E(e){if(t.debug.checkShaderErrors){const n=r.getProgramInfoLog(_).trim(),i=r.getShaderInfoLog(w).trim(),s=r.getShaderInfoLog(T).trim();let a=!0,o=!0;if(!1===r.getProgramParameter(_,r.LINK_STATUS))if(a=!1,"function"==typeof t.debug.onShaderError)t.debug.onShaderError(r,_,w,T);else{const t=ol(r,w,"vertex"),i=ol(r,T,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(_,r.VALIDATE_STATUS)+"\n\nMaterial Name: "+e.name+"\nMaterial Type: "+e.type+"\n\nProgram Info Log: "+n+"\n"+t+"\n"+i)}else""!==n?console.warn("THREE.WebGLProgram: Program Info Log:",n):""!==i&&""!==s||(o=!1);o&&(e.diagnostics={runnable:a,programLog:n,vertexShader:{log:i,prefix:x},fragmentShader:{log:s,prefix:y}})}r.deleteShader(w),r.deleteShader(T),A=new il(r,_),R=function(t,e){const n={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let r=0;r0,q=s.clearcoat>0,Y=s.dispersion>0,Z=s.iridescence>0,J=s.sheen>0,$=s.transmission>0,Q=j&&!!s.anisotropyMap,tt=q&&!!s.clearcoatMap,et=q&&!!s.clearcoatNormalMap,nt=q&&!!s.clearcoatRoughnessMap,it=Z&&!!s.iridescenceMap,rt=Z&&!!s.iridescenceThicknessMap,st=J&&!!s.sheenColorMap,at=J&&!!s.sheenRoughnessMap,ot=!!s.specularMap,lt=!!s.specularColorMap,ct=!!s.specularIntensityMap,ht=$&&!!s.transmissionMap,ut=$&&!!s.thicknessMap,pt=!!s.gradientMap,mt=!!s.alphaMap,ft=s.alphaTest>0,gt=!!s.alphaHash,vt=!!s.extensions;let _t=K;s.toneMapped&&(null!==I&&!0!==I.isXRRenderTarget||(_t=t.toneMapping));const xt={shaderID:w,shaderType:s.type,shaderName:s.name,vertexShader:A,fragmentShader:R,defines:s.defines,customVertexShaderID:C,customFragmentShaderID:P,isRawShaderMaterial:!0===s.isRawShaderMaterial,glslVersion:s.glslVersion,precision:m,batching:N,instancing:U,instancingColor:U&&null!==_.instanceColor,instancingMorph:U&&null!==_.morphTexture,supportsVertexTextures:p,outputColorSpace:null===I?t.outputColorSpace:!0===I.isXRRenderTarget?I.texture.colorSpace:Ye,alphaToCoverage:!!s.alphaToCoverage,map:D,matcap:O,envMap:F,envMapMode:F&&S.mapping,envMapCubeUVHeight:b,aoMap:z,lightMap:B,bumpMap:k,normalMap:V,displacementMap:p&&H,emissiveMap:G,normalMapObjectSpace:V&&1===s.normalMapType,normalMapTangentSpace:V&&0===s.normalMapType,metalnessMap:W,roughnessMap:X,anisotropy:j,anisotropyMap:Q,clearcoat:q,clearcoatMap:tt,clearcoatNormalMap:et,clearcoatRoughnessMap:nt,dispersion:Y,iridescence:Z,iridescenceMap:it,iridescenceThicknessMap:rt,sheen:J,sheenColorMap:st,sheenRoughnessMap:at,specularMap:ot,specularColorMap:lt,specularIntensityMap:ct,transmission:$,transmissionMap:ht,thicknessMap:ut,gradientMap:pt,opaque:!1===s.transparent&&1===s.blending&&!1===s.alphaToCoverage,alphaMap:mt,alphaTest:ft,alphaHash:gt,combine:s.combine,mapUv:D&&g(s.map.channel),aoMapUv:z&&g(s.aoMap.channel),lightMapUv:B&&g(s.lightMap.channel),bumpMapUv:k&&g(s.bumpMap.channel),normalMapUv:V&&g(s.normalMap.channel),displacementMapUv:H&&g(s.displacementMap.channel),emissiveMapUv:G&&g(s.emissiveMap.channel),metalnessMapUv:W&&g(s.metalnessMap.channel),roughnessMapUv:X&&g(s.roughnessMap.channel),anisotropyMapUv:Q&&g(s.anisotropyMap.channel),clearcoatMapUv:tt&&g(s.clearcoatMap.channel),clearcoatNormalMapUv:et&&g(s.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:nt&&g(s.clearcoatRoughnessMap.channel),iridescenceMapUv:it&&g(s.iridescenceMap.channel),iridescenceThicknessMapUv:rt&&g(s.iridescenceThicknessMap.channel),sheenColorMapUv:st&&g(s.sheenColorMap.channel),sheenRoughnessMapUv:at&&g(s.sheenRoughnessMap.channel),specularMapUv:ot&&g(s.specularMap.channel),specularColorMapUv:lt&&g(s.specularColorMap.channel),specularIntensityMapUv:ct&&g(s.specularIntensityMap.channel),transmissionMapUv:ht&&g(s.transmissionMap.channel),thicknessMapUv:ut&&g(s.thicknessMap.channel),alphaMapUv:mt&&g(s.alphaMap.channel),vertexTangents:!!y.attributes.tangent&&(V||j),vertexColors:s.vertexColors,vertexAlphas:!0===s.vertexColors&&!!y.attributes.color&&4===y.attributes.color.itemSize,pointsUvs:!0===_.isPoints&&!!y.attributes.uv&&(D||mt),fog:!!x,useFog:!0===s.fog,fogExp2:!!x&&x.isFogExp2,flatShading:!0===s.flatShading,sizeAttenuation:!0===s.sizeAttenuation,logarithmicDepthBuffer:u,skinning:!0===_.isSkinnedMesh,morphTargets:void 0!==y.morphAttributes.position,morphNormals:void 0!==y.morphAttributes.normal,morphColors:void 0!==y.morphAttributes.color,morphTargetsCount:E,morphTextureStride:L,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numLightProbes:o.numLightProbes,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:s.dithering,shadowMapEnabled:t.shadowMap.enabled&&h.length>0,shadowMapType:t.shadowMap.type,toneMapping:_t,useLegacyLights:t._useLegacyLights,decodeVideoTexture:D&&!0===s.map.isVideoTexture&&ui.getTransfer(s.map.colorSpace)===$e,premultipliedAlpha:s.premultipliedAlpha,doubleSided:2===s.side,flipSided:s.side===d,useDepthPacking:s.depthPacking>=0,depthPacking:s.depthPacking||0,index0AttributeName:s.index0AttributeName,extensionClipCullDistance:vt&&!0===s.extensions.clipCullDistance&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:vt&&!0===s.extensions.multiDraw&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:s.customProgramCacheKey()};return xt.vertexUv1s=c.has(1),xt.vertexUv2s=c.has(2),xt.vertexUv3s=c.has(3),c.clear(),xt},getProgramCacheKey:function(e){const n=[];if(e.shaderID?n.push(e.shaderID):(n.push(e.customVertexShaderID),n.push(e.customFragmentShaderID)),void 0!==e.defines)for(const t in e.defines)n.push(t),n.push(e.defines[t]);return!1===e.isRawShaderMaterial&&(!function(t,e){t.push(e.precision),t.push(e.outputColorSpace),t.push(e.envMapMode),t.push(e.envMapCubeUVHeight),t.push(e.mapUv),t.push(e.alphaMapUv),t.push(e.lightMapUv),t.push(e.aoMapUv),t.push(e.bumpMapUv),t.push(e.normalMapUv),t.push(e.displacementMapUv),t.push(e.emissiveMapUv),t.push(e.metalnessMapUv),t.push(e.roughnessMapUv),t.push(e.anisotropyMapUv),t.push(e.clearcoatMapUv),t.push(e.clearcoatNormalMapUv),t.push(e.clearcoatRoughnessMapUv),t.push(e.iridescenceMapUv),t.push(e.iridescenceThicknessMapUv),t.push(e.sheenColorMapUv),t.push(e.sheenRoughnessMapUv),t.push(e.specularMapUv),t.push(e.specularColorMapUv),t.push(e.specularIntensityMapUv),t.push(e.transmissionMapUv),t.push(e.thicknessMapUv),t.push(e.combine),t.push(e.fogExp2),t.push(e.sizeAttenuation),t.push(e.morphTargetsCount),t.push(e.morphAttributeCount),t.push(e.numDirLights),t.push(e.numPointLights),t.push(e.numSpotLights),t.push(e.numSpotLightMaps),t.push(e.numHemiLights),t.push(e.numRectAreaLights),t.push(e.numDirLightShadows),t.push(e.numPointLightShadows),t.push(e.numSpotLightShadows),t.push(e.numSpotLightShadowsWithMaps),t.push(e.numLightProbes),t.push(e.shadowMapType),t.push(e.toneMapping),t.push(e.numClippingPlanes),t.push(e.numClipIntersection),t.push(e.depthPacking)}(n,e),function(t,e){o.disableAll(),e.supportsVertexTextures&&o.enable(0);e.instancing&&o.enable(1);e.instancingColor&&o.enable(2);e.instancingMorph&&o.enable(3);e.matcap&&o.enable(4);e.envMap&&o.enable(5);e.normalMapObjectSpace&&o.enable(6);e.normalMapTangentSpace&&o.enable(7);e.clearcoat&&o.enable(8);e.iridescence&&o.enable(9);e.alphaTest&&o.enable(10);e.vertexColors&&o.enable(11);e.vertexAlphas&&o.enable(12);e.vertexUv1s&&o.enable(13);e.vertexUv2s&&o.enable(14);e.vertexUv3s&&o.enable(15);e.vertexTangents&&o.enable(16);e.anisotropy&&o.enable(17);e.alphaHash&&o.enable(18);e.batching&&o.enable(19);e.dispersion&&o.enable(20);t.push(o.mask),o.disableAll(),e.fog&&o.enable(0);e.useFog&&o.enable(1);e.flatShading&&o.enable(2);e.logarithmicDepthBuffer&&o.enable(3);e.skinning&&o.enable(4);e.morphTargets&&o.enable(5);e.morphNormals&&o.enable(6);e.morphColors&&o.enable(7);e.premultipliedAlpha&&o.enable(8);e.shadowMapEnabled&&o.enable(9);e.useLegacyLights&&o.enable(10);e.doubleSided&&o.enable(11);e.flipSided&&o.enable(12);e.useDepthPacking&&o.enable(13);e.dithering&&o.enable(14);e.transmission&&o.enable(15);e.sheen&&o.enable(16);e.opaque&&o.enable(17);e.pointsUvs&&o.enable(18);e.decodeVideoTexture&&o.enable(19);e.alphaToCoverage&&o.enable(20);t.push(o.mask)}(n,e),n.push(t.outputColorSpace)),n.push(e.customProgramCacheKey),n.join()},getUniforms:function(t){const e=f[t.type];let n;if(e){const t=ga[e];n=qs.clone(t.uniforms)}else n=t.uniforms;return n},acquireProgram:function(e,n){let i;for(let t=0,e=h.length;t0?i.push(h):!0===a.transparent?r.push(h):n.push(h)},unshift:function(t,e,a,o,l,c){const h=s(t,e,a,o,l,c);a.transmission>0?i.unshift(h):!0===a.transparent?r.unshift(h):n.unshift(h)},finish:function(){for(let n=e,i=t.length;n1&&n.sort(t||Al),i.length>1&&i.sort(e||Rl),r.length>1&&r.sort(e||Rl)}}}function Pl(){let t=new WeakMap;return{get:function(e,n){const i=t.get(e);let r;return void 0===i?(r=new Cl,t.set(e,[r])):n>=i.length?(r=new Cl,i.push(r)):r=i[n],r},dispose:function(){t=new WeakMap}}}function Ll(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new Ci,color:new Yr};break;case"SpotLight":n={position:new Ci,direction:new Ci,color:new Yr,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Ci,color:new Yr,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Ci,skyColor:new Yr,groundColor:new Yr};break;case"RectAreaLight":n={color:new Yr,position:new Ci,halfWidth:new Ci,halfHeight:new Ci}}return t[e.id]=n,n}}}let Il=0;function Ul(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function Nl(t){const e=new Ll,n=function(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Kn};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Kn,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let t=0;t<9;t++)i.probe.push(new Ci);const r=new Ci,s=new sr,a=new sr;return{setup:function(r,s){let a=0,o=0,l=0;for(let t=0;t<9;t++)i.probe[t].set(0,0,0);let c=0,h=0,u=0,d=0,p=0,m=0,f=0,g=0,v=0,_=0,x=0;r.sort(Ul);const y=!0===s?Math.PI:1;for(let t=0,s=r.length;t0&&(!0===t.has("OES_texture_float_linear")?(i.rectAreaLTC1=fa.LTC_FLOAT_1,i.rectAreaLTC2=fa.LTC_FLOAT_2):(i.rectAreaLTC1=fa.LTC_HALF_1,i.rectAreaLTC2=fa.LTC_HALF_2)),i.ambient[0]=a,i.ambient[1]=o,i.ambient[2]=l;const M=i.hash;M.directionalLength===c&&M.pointLength===h&&M.spotLength===u&&M.rectAreaLength===d&&M.hemiLength===p&&M.numDirectionalShadows===m&&M.numPointShadows===f&&M.numSpotShadows===g&&M.numSpotMaps===v&&M.numLightProbes===x||(i.directional.length=c,i.spot.length=u,i.rectArea.length=d,i.point.length=h,i.hemi.length=p,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=f,i.pointShadowMap.length=f,i.spotShadow.length=g,i.spotShadowMap.length=g,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=f,i.spotLightMatrix.length=g+v-_,i.spotLightMap.length=v,i.numSpotLightShadowsWithMaps=_,i.numLightProbes=x,M.directionalLength=c,M.pointLength=h,M.spotLength=u,M.rectAreaLength=d,M.hemiLength=p,M.numDirectionalShadows=m,M.numPointShadows=f,M.numSpotShadows=g,M.numSpotMaps=v,M.numLightProbes=x,i.version=Il++)},setupView:function(t,e){let n=0,o=0,l=0,c=0,h=0;const u=e.matrixWorldInverse;for(let e=0,d=t.length;e=r.length?(s=new Dl(t),r.push(s)):s=r[i],s},dispose:function(){e=new WeakMap}}}class Fl extends Kr{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class zl extends Kr{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}function Bl(t,e,n){let i=new ha;const r=new Kn,s=new Kn,a=new Mi,o=new Fl({depthPacking:3201}),c=new zl,p={},m=n.maxTextureSize,f={[u]:d,[d]:u,2:2},g=new Ys({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Kn},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),v=g.clone();v.defines.HORIZONTAL_PASS=1;const _=new bs;_.setAttribute("position",new as(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new Vs(_,g),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=l;let M=this.type;function S(n,i){const s=e.update(x);g.defines.VSM_SAMPLES!==n.blurSamples&&(g.defines.VSM_SAMPLES=n.blurSamples,v.defines.VSM_SAMPLES=n.blurSamples,g.needsUpdate=!0,v.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new bi(r.x,r.y)),g.uniforms.shadow_pass.value=n.map.texture,g.uniforms.resolution.value=n.mapSize,g.uniforms.radius.value=n.radius,t.setRenderTarget(n.mapPass),t.clear(),t.renderBufferDirect(i,null,s,g,x,null),v.uniforms.shadow_pass.value=n.mapPass.texture,v.uniforms.resolution.value=n.mapSize,v.uniforms.radius.value=n.radius,t.setRenderTarget(n.map),t.clear(),t.renderBufferDirect(i,null,s,v,x,null)}function b(e,n,i,r){let s=null;const a=!0===i.isPointLight?e.customDistanceMaterial:e.customDepthMaterial;if(void 0!==a)s=a;else if(s=!0===i.isPointLight?c:o,t.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const t=s.uuid,e=n.uuid;let i=p[t];void 0===i&&(i={},p[t]=i);let r=i[e];void 0===r&&(r=s.clone(),i[e]=r,n.addEventListener("dispose",T)),s=r}if(s.visible=n.visible,s.wireframe=n.wireframe,s.side=r===h?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:f[n.side],s.alphaMap=n.alphaMap,s.alphaTest=n.alphaTest,s.map=n.map,s.clipShadows=n.clipShadows,s.clippingPlanes=n.clippingPlanes,s.clipIntersection=n.clipIntersection,s.displacementMap=n.displacementMap,s.displacementScale=n.displacementScale,s.displacementBias=n.displacementBias,s.wireframeLinewidth=n.wireframeLinewidth,s.linewidth=n.linewidth,!0===i.isPointLight&&!0===s.isMeshDistanceMaterial){t.properties.get(s).light=i}return s}function w(n,r,s,a,o){if(!1===n.visible)return;if(n.layers.test(r.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&o===h)&&(!n.frustumCulled||i.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,n.matrixWorld);const i=e.update(n),l=n.material;if(Array.isArray(l)){const e=i.groups;for(let c=0,h=e.length;cm||r.y>m)&&(r.x>m&&(s.x=Math.floor(m/g.x),r.x=s.x*g.x,u.mapSize.x=s.x),r.y>m&&(s.y=Math.floor(m/g.y),r.y=s.y*g.y,u.mapSize.y=s.y)),null===u.map||!0===p||!0===f){const t=this.type!==h?{minFilter:gt,magFilter:gt}:{};null!==u.map&&u.map.dispose(),u.map=new bi(r.x,r.y,t),u.map.texture.name=c.name+".shadowMap",u.camera.updateProjectionMatrix()}t.setRenderTarget(u.map),t.clear();const v=u.getViewportCount();for(let t=0;t=1):-1!==N.indexOf("OpenGL ES")&&(U=parseFloat(/^OpenGL ES (\d)/.exec(N)[1]),I=U>=2);let D=null,O={};const F=t.getParameter(t.SCISSOR_BOX),z=t.getParameter(t.VIEWPORT),B=(new Mi).fromArray(F),k=(new Mi).fromArray(z);function V(e,n,i,r){const s=new Uint8Array(4),a=t.createTexture();t.bindTexture(e,a),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let a=0;an||r.height>n)&&(i=n/Math.max(r.width,r.height)),i<1){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof VideoFrame&&t instanceof VideoFrame){const n=Math.floor(i*r.width),s=Math.floor(i*r.height);void 0===u&&(u=m(n,s));const a=e?m(n,s):u;a.width=n,a.height=s;return a.getContext("2d").drawImage(t,0,0,n,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+r.width+"x"+r.height+") to ("+n+"x"+s+")."),a}return"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+r.width+"x"+r.height+")."),t}return t}function g(t){return t.generateMipmaps&&t.minFilter!==gt&&t.minFilter!==Mt}function v(e){t.generateMipmap(e)}function _(n,i,r,s,a=!1){if(null!==n){if(void 0!==t[n])return t[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let o=i;if(i===t.RED&&(r===t.FLOAT&&(o=t.R32F),r===t.HALF_FLOAT&&(o=t.R16F),r===t.UNSIGNED_BYTE&&(o=t.R8)),i===t.RED_INTEGER&&(r===t.UNSIGNED_BYTE&&(o=t.R8UI),r===t.UNSIGNED_SHORT&&(o=t.R16UI),r===t.UNSIGNED_INT&&(o=t.R32UI),r===t.BYTE&&(o=t.R8I),r===t.SHORT&&(o=t.R16I),r===t.INT&&(o=t.R32I)),i===t.RG&&(r===t.FLOAT&&(o=t.RG32F),r===t.HALF_FLOAT&&(o=t.RG16F),r===t.UNSIGNED_BYTE&&(o=t.RG8)),i===t.RG_INTEGER&&(r===t.UNSIGNED_BYTE&&(o=t.RG8UI),r===t.UNSIGNED_SHORT&&(o=t.RG16UI),r===t.UNSIGNED_INT&&(o=t.RG32UI),r===t.BYTE&&(o=t.RG8I),r===t.SHORT&&(o=t.RG16I),r===t.INT&&(o=t.RG32I)),i===t.RGB&&r===t.UNSIGNED_INT_5_9_9_9_REV&&(o=t.RGB9_E5),i===t.RGBA){const e=a?Ke:ui.getTransfer(s);r===t.FLOAT&&(o=t.RGBA32F),r===t.HALF_FLOAT&&(o=t.RGBA16F),r===t.UNSIGNED_BYTE&&(o=e===$e?t.SRGB8_ALPHA8:t.RGBA8),r===t.UNSIGNED_SHORT_4_4_4_4&&(o=t.RGBA4),r===t.UNSIGNED_SHORT_5_5_5_1&&(o=t.RGB5_A1)}return o!==t.R16F&&o!==t.R32F&&o!==t.RG16F&&o!==t.RG32F&&o!==t.RGBA16F&&o!==t.RGBA32F||e.get("EXT_color_buffer_float"),o}function x(t,e){return!0===g(t)||t.isFramebufferTexture&&t.minFilter!==gt&&t.minFilter!==Mt?Math.log2(Math.max(e.width,e.height))+1:void 0!==t.mipmaps&&t.mipmaps.length>0?t.mipmaps.length:t.isCompressedTexture&&Array.isArray(t.image)?e.mipmaps.length:1}function y(t){const e=t.target;e.removeEventListener("dispose",y),function(t){const e=i.get(t);if(void 0===e.__webglInit)return;const n=t.source,r=d.get(n);if(r){const i=r[e.__cacheKey];i.usedTimes--,0===i.usedTimes&&S(t),0===Object.keys(r).length&&d.delete(n)}i.remove(t)}(e),e.isVideoTexture&&h.delete(e)}function M(e){const n=e.target;n.removeEventListener("dispose",M),function(e){const n=i.get(e);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++){if(Array.isArray(n.__webglFramebuffer[e]))for(let i=0;i0&&s.__version!==e.version){const t=e.image;if(null===t)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==t.complete)return void P(s,e,r);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(t.TEXTURE_2D,s.__webglTexture,t.TEXTURE0+r)}const T={[pt]:t.REPEAT,[mt]:t.CLAMP_TO_EDGE,[ft]:t.MIRRORED_REPEAT},E={[gt]:t.NEAREST,[vt]:t.NEAREST_MIPMAP_NEAREST,[xt]:t.NEAREST_MIPMAP_LINEAR,[Mt]:t.LINEAR,[St]:t.LINEAR_MIPMAP_NEAREST,[wt]:t.LINEAR_MIPMAP_LINEAR},A={512:t.NEVER,519:t.ALWAYS,513:t.LESS,515:t.LEQUAL,514:t.EQUAL,518:t.GEQUAL,516:t.GREATER,517:t.NOTEQUAL};function R(n,s){if(s.type!==It||!1!==e.has("OES_texture_float_linear")||s.magFilter!==Mt&&s.magFilter!==St&&s.magFilter!==xt&&s.magFilter!==wt&&s.minFilter!==Mt&&s.minFilter!==St&&s.minFilter!==xt&&s.minFilter!==wt||console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(n,t.TEXTURE_WRAP_S,T[s.wrapS]),t.texParameteri(n,t.TEXTURE_WRAP_T,T[s.wrapT]),n!==t.TEXTURE_3D&&n!==t.TEXTURE_2D_ARRAY||t.texParameteri(n,t.TEXTURE_WRAP_R,T[s.wrapR]),t.texParameteri(n,t.TEXTURE_MAG_FILTER,E[s.magFilter]),t.texParameteri(n,t.TEXTURE_MIN_FILTER,E[s.minFilter]),s.compareFunction&&(t.texParameteri(n,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(n,t.TEXTURE_COMPARE_FUNC,A[s.compareFunction])),!0===e.has("EXT_texture_filter_anisotropic")){if(s.magFilter===gt)return;if(s.minFilter!==xt&&s.minFilter!==wt)return;if(s.type===It&&!1===e.has("OES_texture_float_linear"))return;if(s.anisotropy>1||i.get(s).__currentAnisotropy){const a=e.get("EXT_texture_filter_anisotropic");t.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,r.getMaxAnisotropy())),i.get(s).__currentAnisotropy=s.anisotropy}}}function C(e,n){let i=!1;void 0===e.__webglInit&&(e.__webglInit=!0,n.addEventListener("dispose",y));const r=n.source;let s=d.get(r);void 0===s&&(s={},d.set(r,s));const o=function(t){const e=[];return e.push(t.wrapS),e.push(t.wrapT),e.push(t.wrapR||0),e.push(t.magFilter),e.push(t.minFilter),e.push(t.anisotropy),e.push(t.internalFormat),e.push(t.format),e.push(t.type),e.push(t.generateMipmaps),e.push(t.premultiplyAlpha),e.push(t.flipY),e.push(t.unpackAlignment),e.push(t.colorSpace),e.join()}(n);if(o!==e.__cacheKey){void 0===s[o]&&(s[o]={texture:t.createTexture(),usedTimes:0},a.memory.textures++,i=!0),s[o].usedTimes++;const r=s[e.__cacheKey];void 0!==r&&(s[e.__cacheKey].usedTimes--,0===r.usedTimes&&S(n)),e.__cacheKey=o,e.__webglTexture=s[o].texture}return i}function P(e,a,o){let l=t.TEXTURE_2D;(a.isDataArrayTexture||a.isCompressedArrayTexture)&&(l=t.TEXTURE_2D_ARRAY),a.isData3DTexture&&(l=t.TEXTURE_3D);const c=C(e,a),h=a.source;n.bindTexture(l,e.__webglTexture,t.TEXTURE0+o);const u=i.get(h);if(h.version!==u.__version||!0===c){n.activeTexture(t.TEXTURE0+o);const e=ui.getPrimaries(ui.workingColorSpace),i=a.colorSpace===je?null:ui.getPrimaries(a.colorSpace),d=a.colorSpace===je||e===i?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,a.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,a.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);let p=f(a.image,!1,r.maxTextureSize);p=z(a,p);const m=s.convert(a.format,a.colorSpace),y=s.convert(a.type);let M,S=_(a.internalFormat,m,y,a.colorSpace,a.isVideoTexture);R(l,a);const b=a.mipmaps,w=!0!==a.isVideoTexture,T=void 0===u.__version||!0===c,E=h.dataReady,A=x(a,p);if(a.isDepthTexture)S=t.DEPTH_COMPONENT16,a.type===It?S=t.DEPTH_COMPONENT32F:a.type===Lt?S=t.DEPTH_COMPONENT24:a.type===Ot&&(S=t.DEPTH24_STENCIL8),T&&(w?n.texStorage2D(t.TEXTURE_2D,1,S,p.width,p.height):n.texImage2D(t.TEXTURE_2D,0,S,p.width,p.height,0,m,y,null));else if(a.isDataTexture)if(b.length>0){w&&T&&n.texStorage2D(t.TEXTURE_2D,A,S,b[0].width,b[0].height);for(let e=0,i=b.length;e>=1,i>>=1}}else if(b.length>0){if(w&&T){const e=B(b[0]);n.texStorage2D(t.TEXTURE_2D,A,S,e.width,e.height)}for(let e=0,i=b.length;e>h),i=Math.max(1,r.height>>h);c===t.TEXTURE_3D||c===t.TEXTURE_2D_ARRAY?n.texImage3D(c,h,p,e,i,r.depth,0,u,d,null):n.texImage2D(c,h,p,e,i,0,u,d,null)}n.bindFramebuffer(t.FRAMEBUFFER,e),F(r)?o.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,l,c,i.get(a).__webglTexture,0,O(r)):(c===t.TEXTURE_2D||c>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&c<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,l,c,i.get(a).__webglTexture,h),n.bindFramebuffer(t.FRAMEBUFFER,null)}function I(e,n,i){if(t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer&&!n.stencilBuffer){let r=t.DEPTH_COMPONENT24;if(i||F(n)){const e=n.depthTexture;e&&e.isDepthTexture&&(e.type===It?r=t.DEPTH_COMPONENT32F:e.type===Lt&&(r=t.DEPTH_COMPONENT24));const i=O(n);F(n)?o.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,i,r,n.width,n.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,i,r,n.width,n.height)}else t.renderbufferStorage(t.RENDERBUFFER,r,n.width,n.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)}else if(n.depthBuffer&&n.stencilBuffer){const r=O(n);i&&!1===F(n)?t.renderbufferStorageMultisample(t.RENDERBUFFER,r,t.DEPTH24_STENCIL8,n.width,n.height):F(n)?o.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,r,t.DEPTH24_STENCIL8,n.width,n.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)}else{const e=n.textures;for(let r=0;r0&&!0===e.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function z(t,e){const n=t.colorSpace,i=t.format,r=t.type;return!0===t.isCompressedTexture||!0===t.isVideoTexture||n!==Ye&&n!==je&&(ui.getTransfer(n)===$e?i===kt&&r===Et||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",n)),e}function B(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?(c.width=t.naturalWidth||t.width,c.height=t.naturalHeight||t.height):"undefined"!=typeof VideoFrame&&t instanceof VideoFrame?(c.width=t.displayWidth,c.height=t.displayHeight):(c.width=t.width,c.height=t.height),c}this.allocateTextureUnit=function(){const t=b;return t>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+r.maxTextures),b+=1,t},this.resetTextureUnits=function(){b=0},this.setTexture2D=w,this.setTexture2DArray=function(e,r){const s=i.get(e);e.version>0&&s.__version!==e.version?P(s,e,r):n.bindTexture(t.TEXTURE_2D_ARRAY,s.__webglTexture,t.TEXTURE0+r)},this.setTexture3D=function(e,r){const s=i.get(e);e.version>0&&s.__version!==e.version?P(s,e,r):n.bindTexture(t.TEXTURE_3D,s.__webglTexture,t.TEXTURE0+r)},this.setTextureCube=function(e,a){const o=i.get(e);e.version>0&&o.__version!==e.version?function(e,a,o){if(6!==a.image.length)return;const l=C(e,a),c=a.source;n.bindTexture(t.TEXTURE_CUBE_MAP,e.__webglTexture,t.TEXTURE0+o);const h=i.get(c);if(c.version!==h.__version||!0===l){n.activeTexture(t.TEXTURE0+o);const e=ui.getPrimaries(ui.workingColorSpace),i=a.colorSpace===je?null:ui.getPrimaries(a.colorSpace),u=a.colorSpace===je||e===i?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,a.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,a.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,a.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,u);const d=a.isCompressedTexture||a.image[0].isCompressedTexture,p=a.image[0]&&a.image[0].isDataTexture,m=[];for(let t=0;t<6;t++)m[t]=d||p?p?a.image[t].image:a.image[t]:f(a.image[t],!0,r.maxCubemapSize),m[t]=z(a,m[t]);const y=m[0],M=s.convert(a.format,a.colorSpace),S=s.convert(a.type),b=_(a.internalFormat,M,S,a.colorSpace),w=!0!==a.isVideoTexture,T=void 0===h.__version||!0===l,E=c.dataReady;let A,C=x(a,y);if(R(t.TEXTURE_CUBE_MAP,a),d){w&&T&&n.texStorage2D(t.TEXTURE_CUBE_MAP,C,b,y.width,y.height);for(let e=0;e<6;e++){A=m[e].mipmaps;for(let i=0;i0&&C++;const e=B(m[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,C,b,e.width,e.height)}for(let e=0;e<6;e++)if(p){w?E&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,0,0,m[e].width,m[e].height,M,S,m[e].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,b,m[e].width,m[e].height,0,M,S,m[e].data);for(let i=0;i1;if(u||(void 0===l.__webglTexture&&(l.__webglTexture=t.createTexture()),l.__version=r.version,a.memory.textures++),h){o.__webglFramebuffer=[];for(let e=0;e<6;e++)if(r.mipmaps&&r.mipmaps.length>0){o.__webglFramebuffer[e]=[];for(let n=0;n0){o.__webglFramebuffer=[];for(let e=0;e0&&!1===F(e)){o.__webglMultisampledFramebuffer=t.createFramebuffer(),o.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,o.__webglMultisampledFramebuffer);for(let n=0;n0)for(let i=0;i0)for(let n=0;n0)if(!1===F(e)){const r=e.textures,s=e.width,a=e.height;let o=t.COLOR_BUFFER_BIT;const c=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,h=i.get(e),u=r.length>1;if(u)for(let e=0;eo+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&a<=o-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==o&&t.gripSpace&&(r=e.getPose(t.gripSpace,n),null!==r&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1));null!==a&&(i=e.getPose(t.targetRaySpace,n),null===i&&null!==r&&(i=r),null!==i&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(Xl)))}return null!==a&&(a.visible=null!==i),null!==o&&(o.visible=null!==r),null!==l&&(l.visible=null!==s),this}_getHandJoint(t,e){if(void 0===t.joints[e.jointName]){const n=new Wl;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class ql{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const i=new yi;t.properties.get(i).__webglTexture=e.texture,e.depthNear==n.depthNear&&e.depthFar==n.depthFar||(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=i}}render(t,e){if(null!==this.texture){if(null===this.mesh){const t=e.cameras[0].viewport,n=new Ys({vertexShader:"\nvoid main() {\n\n\tgl_Position = vec4( position, 1.0 );\n\n}",fragmentShader:"\nuniform sampler2DArray depthColor;\nuniform float depthWidth;\nuniform float depthHeight;\n\nvoid main() {\n\n\tvec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );\n\n\tif ( coord.x >= 1.0 ) {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;\n\n\t} else {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;\n\n\t}\n\n}",uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Vs(new pa(20,20),n)}t.render(this.mesh,e)}}reset(){this.texture=null,this.mesh=null}}class Yl extends Bn{constructor(t,e){super();const n=this;let i=null,r=1,s=null,a="local-floor",o=1,l=null,c=null,h=null,u=null,d=null,p=null;const m=new ql,f=e.getContextAttributes();let g=null,v=null;const _=[],x=[],y=new Kn;let M=null;const S=new Qs;S.layers.enable(1),S.viewport=new Mi;const b=new Qs;b.layers.enable(2),b.viewport=new Mi;const w=[S,b],T=new Gl;T.layers.enable(1),T.layers.enable(2);let E=null,A=null;function R(t){const e=x.indexOf(t.inputSource);if(-1===e)return;const n=_[e];void 0!==n&&(n.update(t.inputSource,t.frame,l||s),n.dispatchEvent({type:t.type,data:t.inputSource}))}function C(){i.removeEventListener("select",R),i.removeEventListener("selectstart",R),i.removeEventListener("selectend",R),i.removeEventListener("squeeze",R),i.removeEventListener("squeezestart",R),i.removeEventListener("squeezeend",R),i.removeEventListener("end",C),i.removeEventListener("inputsourceschange",P);for(let t=0;t<_.length;t++){const e=x[t];null!==e&&(x[t]=null,_[t].disconnect(e))}E=null,A=null,m.reset(),t.setRenderTarget(g),d=null,u=null,h=null,i=null,v=null,D.stop(),n.isPresenting=!1,t.setPixelRatio(M),t.setSize(y.width,y.height,!1),n.dispatchEvent({type:"sessionend"})}function P(t){for(let e=0;e=0&&(x[i]=null,_[i].disconnect(n))}for(let e=0;e=x.length){x.push(n),i=t;break}if(null===x[t]){x[t]=n,i=t;break}}if(-1===i)break}const r=_[i];r&&r.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(t){let e=_[t];return void 0===e&&(e=new jl,_[t]=e),e.getTargetRaySpace()},this.getControllerGrip=function(t){let e=_[t];return void 0===e&&(e=new jl,_[t]=e),e.getGripSpace()},this.getHand=function(t){let e=_[t];return void 0===e&&(e=new jl,_[t]=e),e.getHandSpace()},this.setFramebufferScaleFactor=function(t){r=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(t){a=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||s},this.setReferenceSpace=function(t){l=t},this.getBaseLayer=function(){return null!==u?u:d},this.getBinding=function(){return h},this.getFrame=function(){return p},this.getSession=function(){return i},this.setSession=async function(c){if(i=c,null!==i){if(g=t.getRenderTarget(),i.addEventListener("select",R),i.addEventListener("selectstart",R),i.addEventListener("selectend",R),i.addEventListener("squeeze",R),i.addEventListener("squeezestart",R),i.addEventListener("squeezeend",R),i.addEventListener("end",C),i.addEventListener("inputsourceschange",P),!0!==f.xrCompatible&&await e.makeXRCompatible(),M=t.getPixelRatio(),t.getSize(y),void 0===i.renderState.layers){const n={antialias:f.antialias,alpha:!0,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:r};d=new XRWebGLLayer(i,e,n),i.updateRenderState({baseLayer:d}),t.setPixelRatio(1),t.setSize(d.framebufferWidth,d.framebufferHeight,!1),v=new bi(d.framebufferWidth,d.framebufferHeight,{format:kt,type:Et,colorSpace:t.outputColorSpace,stencilBuffer:f.stencil})}else{let n=null,s=null,a=null;f.depth&&(a=f.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,n=f.stencil?Wt:Gt,s=f.stencil?Ot:Lt);const o={colorFormat:e.RGBA8,depthFormat:a,scaleFactor:r};h=new XRWebGLBinding(i,e),u=h.createProjectionLayer(o),i.updateRenderState({layers:[u]}),t.setPixelRatio(1),t.setSize(u.textureWidth,u.textureHeight,!1),v=new bi(u.textureWidth,u.textureHeight,{format:kt,type:Et,depthTexture:new Ka(u.textureWidth,u.textureHeight,s,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:f.stencil,colorSpace:t.outputColorSpace,samples:f.antialias?4:0,resolveDepthBuffer:!1===u.ignoreDepthValues})}v.isXRRenderTarget=!0,this.setFoveation(o),l=null,s=await i.requestReferenceSpace(a),D.setContext(i),D.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==i)return i.environmentBlendMode};const L=new Ci,I=new Ci;function U(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.copy(t.matrixWorld).invert()}this.updateCamera=function(t){if(null===i)return;null!==m.texture&&(t.near=m.depthNear,t.far=m.depthFar),T.near=b.near=S.near=t.near,T.far=b.far=S.far=t.far,E===T.near&&A===T.far||(i.updateRenderState({depthNear:T.near,depthFar:T.far}),E=T.near,A=T.far,S.near=E,S.far=A,b.near=E,b.far=A,S.updateProjectionMatrix(),b.updateProjectionMatrix(),t.updateProjectionMatrix());const e=t.parent,n=T.cameras;U(T,e);for(let t=0;t0&&(i.alphaTest.value=r.alphaTest);const s=e.get(r),a=s.envMap,o=s.envMapRotation;if(a&&(i.envMap.value=a,Zl.copy(o),Zl.x*=-1,Zl.y*=-1,Zl.z*=-1,a.isCubeTexture&&!1===a.isRenderTargetTexture&&(Zl.y*=-1,Zl.z*=-1),i.envMapRotation.value.setFromMatrix4(Jl.makeRotationFromEuler(Zl)),i.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,i.reflectivity.value=r.reflectivity,i.ior.value=r.ior,i.refractionRatio.value=r.refractionRatio),r.lightMap){i.lightMap.value=r.lightMap;const e=!0===t._useLegacyLights?Math.PI:1;i.lightMapIntensity.value=r.lightMapIntensity*e,n(r.lightMap,i.lightMapTransform)}r.aoMap&&(i.aoMap.value=r.aoMap,i.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,i.aoMapTransform))}return{refreshFogUniforms:function(e,n){n.color.getRGB(e.fogColor.value,js(t)),n.isFog?(e.fogNear.value=n.near,e.fogFar.value=n.far):n.isFogExp2&&(e.fogDensity.value=n.density)},refreshMaterialUniforms:function(t,r,s,a,o){r.isMeshBasicMaterial||r.isMeshLambertMaterial?i(t,r):r.isMeshToonMaterial?(i(t,r),function(t,e){e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(t,r)):r.isMeshPhongMaterial?(i(t,r),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4)}(t,r)):r.isMeshStandardMaterial?(i(t,r),function(t,e){t.metalness.value=e.metalness,e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap,n(e.metalnessMap,t.metalnessMapTransform));t.roughness.value=e.roughness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap,n(e.roughnessMap,t.roughnessMapTransform));e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}(t,r),r.isMeshPhysicalMaterial&&function(t,e,i){t.ior.value=e.ior,e.sheen>0&&(t.sheenColor.value.copy(e.sheenColor).multiplyScalar(e.sheen),t.sheenRoughness.value=e.sheenRoughness,e.sheenColorMap&&(t.sheenColorMap.value=e.sheenColorMap,n(e.sheenColorMap,t.sheenColorMapTransform)),e.sheenRoughnessMap&&(t.sheenRoughnessMap.value=e.sheenRoughnessMap,n(e.sheenRoughnessMap,t.sheenRoughnessMapTransform)));e.clearcoat>0&&(t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.clearcoatMap&&(t.clearcoatMap.value=e.clearcoatMap,n(e.clearcoatMap,t.clearcoatMapTransform)),e.clearcoatRoughnessMap&&(t.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap,n(e.clearcoatRoughnessMap,t.clearcoatRoughnessMapTransform)),e.clearcoatNormalMap&&(t.clearcoatNormalMap.value=e.clearcoatNormalMap,n(e.clearcoatNormalMap,t.clearcoatNormalMapTransform),t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),e.side===d&&t.clearcoatNormalScale.value.negate()));e.dispersion>0&&(t.dispersion.value=e.dispersion);e.iridescence>0&&(t.iridescence.value=e.iridescence,t.iridescenceIOR.value=e.iridescenceIOR,t.iridescenceThicknessMinimum.value=e.iridescenceThicknessRange[0],t.iridescenceThicknessMaximum.value=e.iridescenceThicknessRange[1],e.iridescenceMap&&(t.iridescenceMap.value=e.iridescenceMap,n(e.iridescenceMap,t.iridescenceMapTransform)),e.iridescenceThicknessMap&&(t.iridescenceThicknessMap.value=e.iridescenceThicknessMap,n(e.iridescenceThicknessMap,t.iridescenceThicknessMapTransform)));e.transmission>0&&(t.transmission.value=e.transmission,t.transmissionSamplerMap.value=i.texture,t.transmissionSamplerSize.value.set(i.width,i.height),e.transmissionMap&&(t.transmissionMap.value=e.transmissionMap,n(e.transmissionMap,t.transmissionMapTransform)),t.thickness.value=e.thickness,e.thicknessMap&&(t.thicknessMap.value=e.thicknessMap,n(e.thicknessMap,t.thicknessMapTransform)),t.attenuationDistance.value=e.attenuationDistance,t.attenuationColor.value.copy(e.attenuationColor));e.anisotropy>0&&(t.anisotropyVector.value.set(e.anisotropy*Math.cos(e.anisotropyRotation),e.anisotropy*Math.sin(e.anisotropyRotation)),e.anisotropyMap&&(t.anisotropyMap.value=e.anisotropyMap,n(e.anisotropyMap,t.anisotropyMapTransform)));t.specularIntensity.value=e.specularIntensity,t.specularColor.value.copy(e.specularColor),e.specularColorMap&&(t.specularColorMap.value=e.specularColorMap,n(e.specularColorMap,t.specularColorMapTransform));e.specularIntensityMap&&(t.specularIntensityMap.value=e.specularIntensityMap,n(e.specularIntensityMap,t.specularIntensityMapTransform))}(t,r,o)):r.isMeshMatcapMaterial?(i(t,r),function(t,e){e.matcap&&(t.matcap.value=e.matcap)}(t,r)):r.isMeshDepthMaterial?i(t,r):r.isMeshDistanceMaterial?(i(t,r),function(t,n){const i=e.get(n).light;t.referencePosition.value.setFromMatrixPosition(i.matrixWorld),t.nearDistance.value=i.shadow.camera.near,t.farDistance.value=i.shadow.camera.far}(t,r)):r.isMeshNormalMaterial?i(t,r):r.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,e.map&&(t.map.value=e.map,n(e.map,t.mapTransform))}(t,r),r.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(t,r)):r.isPointsMaterial?function(t,e,i,r){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*i,t.scale.value=.5*r,e.map&&(t.map.value=e.map,n(e.map,t.uvTransform));e.alphaMap&&(t.alphaMap.value=e.alphaMap,n(e.alphaMap,t.alphaMapTransform));e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,r,s,a):r.isSpriteMaterial?function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,e.map&&(t.map.value=e.map,n(e.map,t.mapTransform));e.alphaMap&&(t.alphaMap.value=e.alphaMap,n(e.alphaMap,t.alphaMapTransform));e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,r):r.isShadowMaterial?(t.color.value.copy(r.color),t.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function $l(t,e,n,i){let r={},s={},a=[];const o=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function l(t,e,n,i){const r=t.value,s=e+"_"+n;if(void 0===i[s])return i[s]="number"==typeof r||"boolean"==typeof r?r:r.clone(),!0;{const t=i[s];if("number"==typeof r||"boolean"==typeof r){if(t!==r)return i[s]=r,!0}else if(!1===t.equals(r))return t.copy(r),!0}return!1}function c(t){const e={boundary:0,storage:0};return"number"==typeof t||"boolean"==typeof t?(e.boundary=4,e.storage=4):t.isVector2?(e.boundary=8,e.storage=8):t.isVector3||t.isColor?(e.boundary=16,e.storage=12):t.isVector4?(e.boundary=16,e.storage=16):t.isMatrix3?(e.boundary=48,e.storage=48):t.isMatrix4?(e.boundary=64,e.storage=64):t.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",t),e}function h(e){const n=e.target;n.removeEventListener("dispose",h);const i=a.indexOf(n.__bindingPointIndex);a.splice(i,1),t.deleteBuffer(r[n.id]),delete r[n.id],delete s[n.id]}return{bind:function(t,e){const n=e.program;i.uniformBlockBinding(t,n)},update:function(n,u){let d=r[n.id];void 0===d&&(!function(t){const e=t.uniforms;let n=0;const i=16;for(let t=0,r=e.length;t0&&(n+=i-r);t.__size=n,t.__cache={}}(n),d=function(e){const n=function(){for(let t=0;t0),u=!!n.morphAttributes.position,d=!!n.morphAttributes.normal,p=!!n.morphAttributes.color;let m=K;i.toneMapped&&(null!==T&&!0!==T.isXRRenderTarget||(m=M.toneMapping));const f=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,g=void 0!==f?f.length:0,v=Q.get(i),x=_.state.lights;if(!0===H&&(!0===G||t!==A)){const e=t===A&&i.id===E;ht.setState(i,t,e)}let y=!1;i.version===v.__version?v.needsLights&&v.lightsStateVersion!==x.state.version||v.outputColorSpace!==o||r.isBatchedMesh&&!1===v.batching?y=!0:r.isBatchedMesh||!0!==v.batching?r.isInstancedMesh&&!1===v.instancing?y=!0:r.isInstancedMesh||!0!==v.instancing?r.isSkinnedMesh&&!1===v.skinning?y=!0:r.isSkinnedMesh||!0!==v.skinning?r.isInstancedMesh&&!0===v.instancingColor&&null===r.instanceColor||r.isInstancedMesh&&!1===v.instancingColor&&null!==r.instanceColor||r.isInstancedMesh&&!0===v.instancingMorph&&null===r.morphTexture||r.isInstancedMesh&&!1===v.instancingMorph&&null!==r.morphTexture||v.envMap!==l||!0===i.fog&&v.fog!==s?y=!0:void 0===v.numClippingPlanes||v.numClippingPlanes===ht.numPlanes&&v.numIntersection===ht.numIntersection?(v.vertexAlphas!==c||v.vertexTangents!==h||v.morphTargets!==u||v.morphNormals!==d||v.morphColors!==p||v.toneMapping!==m||v.morphTargetsCount!==g)&&(y=!0):y=!0:y=!0:y=!0:y=!0:(y=!0,v.__version=i.version);let S=v.currentProgram;!0===y&&(S=Xt(i,e,r));let b=!1,w=!1,R=!1;const C=S.getUniforms(),P=v.uniforms;J.useProgram(S.program)&&(b=!0,w=!0,R=!0);i.id!==E&&(E=i.id,w=!0);if(b||A!==t){C.setValue(xt,"projectionMatrix",t.projectionMatrix),C.setValue(xt,"viewMatrix",t.matrixWorldInverse);const e=C.map.cameraPosition;void 0!==e&&e.setValue(xt,X.setFromMatrixPosition(t.matrixWorld)),Z.logarithmicDepthBuffer&&C.setValue(xt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),(i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial)&&C.setValue(xt,"isOrthographic",!0===t.isOrthographicCamera),A!==t&&(A=t,w=!0,R=!0)}if(r.isSkinnedMesh){C.setOptional(xt,r,"bindMatrix"),C.setOptional(xt,r,"bindMatrixInverse");const t=r.skeleton;t&&(null===t.boneTexture&&t.computeBoneTexture(),C.setValue(xt,"boneTexture",t.boneTexture,tt))}r.isBatchedMesh&&(C.setOptional(xt,r,"batchingTexture"),C.setValue(xt,"batchingTexture",r._matricesTexture,tt));const L=n.morphAttributes;void 0===L.position&&void 0===L.normal&&void 0===L.color||pt.update(r,n,S);(w||v.receiveShadow!==r.receiveShadow)&&(v.receiveShadow=r.receiveShadow,C.setValue(xt,"receiveShadow",r.receiveShadow));i.isMeshGouraudMaterial&&null!==i.envMap&&(P.envMap.value=l,P.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1);i.isMeshStandardMaterial&&null===i.envMap&&null!==e.environment&&(P.envMapIntensity.value=e.environmentIntensity);w&&(C.setValue(xt,"toneMappingExposure",M.toneMappingExposure),v.needsLights&&(U=R,(I=P).ambientLightColor.needsUpdate=U,I.lightProbe.needsUpdate=U,I.directionalLights.needsUpdate=U,I.directionalLightShadows.needsUpdate=U,I.pointLights.needsUpdate=U,I.pointLightShadows.needsUpdate=U,I.spotLights.needsUpdate=U,I.spotLightShadows.needsUpdate=U,I.rectAreaLights.needsUpdate=U,I.hemisphereLights.needsUpdate=U),s&&!0===i.fog&&ot.refreshFogUniforms(P,s),ot.refreshMaterialUniforms(P,i,D,N,_.state.transmissionRenderTarget[t.id]),il.upload(xt,qt(v),P,tt));var I,U;i.isShaderMaterial&&!0===i.uniformsNeedUpdate&&(il.upload(xt,qt(v),P,tt),i.uniformsNeedUpdate=!1);i.isSpriteMaterial&&C.setValue(xt,"center",r.center);if(C.setValue(xt,"modelViewMatrix",r.modelViewMatrix),C.setValue(xt,"normalMatrix",r.normalMatrix),C.setValue(xt,"modelMatrix",r.matrixWorld),i.isShaderMaterial||i.isRawShaderMaterial){const t=i.uniformsGroups;for(let e=0,n=t.length;e{function n(){i.forEach((function(t){Q.get(t).currentProgram.isReady()&&i.delete(t)})),0!==i.size?setTimeout(n,10):e(t)}null!==Y.get("KHR_parallel_shader_compile")?n():setTimeout(n,10)}))};let It=null;function Ft(){Bt.stop()}function zt(){Bt.start()}const Bt=new ua;function kt(t,e,n,i){if(!1===t.visible)return;if(t.layers.test(e.layers))if(t.isGroup)n=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(e);else if(t.isLight)_.pushLight(t),t.castShadow&&_.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||V.intersectsSprite(t)){i&&X.setFromMatrixPosition(t.matrixWorld).applyMatrix4(W);const e=st.update(t),r=t.material;r.visible&&v.push(t,e,r,n,X.z,null)}}else if((t.isMesh||t.isLine||t.isPoints)&&(!t.frustumCulled||V.intersectsObject(t))){const e=st.update(t),r=t.material;if(i&&(void 0!==t.boundingSphere?(null===t.boundingSphere&&t.computeBoundingSphere(),X.copy(t.boundingSphere.center)):(null===e.boundingSphere&&e.computeBoundingSphere(),X.copy(e.boundingSphere.center)),X.applyMatrix4(t.matrixWorld).applyMatrix4(W)),Array.isArray(r)){const i=e.groups;for(let s=0,a=i.length;s0&&Gt(r,e,n),s.length>0&&Gt(s,e,n),a.length>0&&Gt(a,e,n),J.buffers.depth.setTest(!0),J.buffers.depth.setMask(!0),J.buffers.color.setMask(!0),J.setPolygonOffset(!1)}function Ht(t,e,n,i){if(null!==(!0===n.isScene?n.overrideMaterial:null))return;void 0===_.state.transmissionRenderTarget[i.id]&&(_.state.transmissionRenderTarget[i.id]=new bi(1,1,{generateMipmaps:!0,type:Y.has("EXT_color_buffer_half_float")||Y.has("EXT_color_buffer_float")?Ut:Et,minFilter:wt,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1}));const r=_.state.transmissionRenderTarget[i.id],a=i.viewport||R;r.setSize(a.z,a.w);const o=M.getRenderTarget();M.setRenderTarget(r),M.getClearColor(L),I=M.getClearAlpha(),I<1&&M.setClearColor(16777215,.5),M.clear();const l=M.toneMapping;M.toneMapping=K;const c=i.viewport;if(void 0!==i.viewport&&(i.viewport=void 0),_.setupLightsView(i),!0===H&&ht.setGlobalState(M.clippingPlanes,i),Gt(t,n,i),tt.updateMultisampleRenderTarget(r),tt.updateRenderTargetMipmap(r),!1===Y.has("WEBGL_multisampled_render_to_texture")){let t=!1;for(let r=0,s=e.length;r0)for(let e=0,n=i.length;e0&&Ht(r,s,t,e),n&&dt.render(t),Vt(v,t,e);null!==T&&(tt.updateMultisampleRenderTarget(T),tt.updateRenderTargetMipmap(T)),!0===t.isScene&&t.onAfterRender(M,t,e),vt.resetDefaultState(),E=-1,A=null,y.pop(),y.length>0?(_=y[y.length-1],!0===H&&ht.setGlobalState(M.clippingPlanes,_.state.camera)):_=null,x.pop(),v=x.length>0?x[x.length-1]:null},this.getActiveCubeFace=function(){return b},this.getActiveMipmapLevel=function(){return w},this.getRenderTarget=function(){return T},this.setRenderTargetTextures=function(t,e,n){Q.get(t.texture).__webglTexture=e,Q.get(t.depthTexture).__webglTexture=n;const i=Q.get(t);i.__hasExternalTextures=!0,i.__autoAllocateDepthBuffer=void 0===n,i.__autoAllocateDepthBuffer||!0===Y.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),i.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(t,e){const n=Q.get(t);n.__webglFramebuffer=e,n.__useDefaultFramebuffer=void 0===e},this.setRenderTarget=function(t,e=0,n=0){T=t,b=e,w=n;let i=!0,r=null,s=!1,a=!1;if(t){const o=Q.get(t);void 0!==o.__useDefaultFramebuffer?(J.bindFramebuffer(xt.FRAMEBUFFER,null),i=!1):void 0===o.__webglFramebuffer?tt.setupRenderTarget(t):o.__hasExternalTextures&&tt.rebindTextures(t,Q.get(t.texture).__webglTexture,Q.get(t.depthTexture).__webglTexture);const l=t.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(a=!0);const c=Q.get(t).__webglFramebuffer;t.isWebGLCubeRenderTarget?(r=Array.isArray(c[e])?c[e][n]:c[e],s=!0):r=t.samples>0&&!1===tt.useMultisampledRTT(t)?Q.get(t).__webglMultisampledFramebuffer:Array.isArray(c)?c[n]:c,R.copy(t.viewport),C.copy(t.scissor),P=t.scissorTest}else R.copy(z).multiplyScalar(D).floor(),C.copy(B).multiplyScalar(D).floor(),P=k;if(J.bindFramebuffer(xt.FRAMEBUFFER,r)&&i&&J.drawBuffers(t,r),J.viewport(R),J.scissor(C),J.setScissorTest(P),s){const i=Q.get(t.texture);xt.framebufferTexture2D(xt.FRAMEBUFFER,xt.COLOR_ATTACHMENT0,xt.TEXTURE_CUBE_MAP_POSITIVE_X+e,i.__webglTexture,n)}else if(a){const i=Q.get(t.texture),r=e||0;xt.framebufferTextureLayer(xt.FRAMEBUFFER,xt.COLOR_ATTACHMENT0,i.__webglTexture,n||0,r)}E=-1},this.readRenderTargetPixels=function(t,e,n,i,r,s,a){if(!t||!t.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let o=Q.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==a&&(o=o[a]),o){J.bindFramebuffer(xt.FRAMEBUFFER,o);try{const a=t.texture,o=a.format,l=a.type;if(!Z.textureFormatReadable(o))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!Z.textureTypeReadable(l))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");e>=0&&e<=t.width-i&&n>=0&&n<=t.height-r&&xt.readPixels(e,n,i,r,gt.convert(o),gt.convert(l),s)}finally{const t=null!==T?Q.get(T).__webglFramebuffer:null;J.bindFramebuffer(xt.FRAMEBUFFER,t)}}},this.copyFramebufferToTexture=function(t,e,n=0){const i=Math.pow(2,-n),r=Math.floor(e.image.width*i),s=Math.floor(e.image.height*i);tt.setTexture2D(e,0),xt.copyTexSubImage2D(xt.TEXTURE_2D,n,0,0,t.x,t.y,r,s),J.unbindTexture()},this.copyTextureToTexture=function(t,e,n,i=0){const r=e.image.width,s=e.image.height,a=gt.convert(n.format),o=gt.convert(n.type);tt.setTexture2D(n,0),xt.pixelStorei(xt.UNPACK_FLIP_Y_WEBGL,n.flipY),xt.pixelStorei(xt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),xt.pixelStorei(xt.UNPACK_ALIGNMENT,n.unpackAlignment),e.isDataTexture?xt.texSubImage2D(xt.TEXTURE_2D,i,t.x,t.y,r,s,a,o,e.image.data):e.isCompressedTexture?xt.compressedTexSubImage2D(xt.TEXTURE_2D,i,t.x,t.y,e.mipmaps[0].width,e.mipmaps[0].height,a,e.mipmaps[0].data):xt.texSubImage2D(xt.TEXTURE_2D,i,t.x,t.y,a,o,e.image),0===i&&n.generateMipmaps&&xt.generateMipmap(xt.TEXTURE_2D),J.unbindTexture()},this.copyTextureToTexture3D=function(t,e,n,i,r=0){const s=t.max.x-t.min.x,a=t.max.y-t.min.y,o=t.max.z-t.min.z,l=gt.convert(i.format),c=gt.convert(i.type);let h;if(i.isData3DTexture)tt.setTexture3D(i,0),h=xt.TEXTURE_3D;else{if(!i.isDataArrayTexture&&!i.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");tt.setTexture2DArray(i,0),h=xt.TEXTURE_2D_ARRAY}xt.pixelStorei(xt.UNPACK_FLIP_Y_WEBGL,i.flipY),xt.pixelStorei(xt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),xt.pixelStorei(xt.UNPACK_ALIGNMENT,i.unpackAlignment);const u=xt.getParameter(xt.UNPACK_ROW_LENGTH),d=xt.getParameter(xt.UNPACK_IMAGE_HEIGHT),p=xt.getParameter(xt.UNPACK_SKIP_PIXELS),m=xt.getParameter(xt.UNPACK_SKIP_ROWS),f=xt.getParameter(xt.UNPACK_SKIP_IMAGES),g=n.isCompressedTexture?n.mipmaps[r]:n.image;xt.pixelStorei(xt.UNPACK_ROW_LENGTH,g.width),xt.pixelStorei(xt.UNPACK_IMAGE_HEIGHT,g.height),xt.pixelStorei(xt.UNPACK_SKIP_PIXELS,t.min.x),xt.pixelStorei(xt.UNPACK_SKIP_ROWS,t.min.y),xt.pixelStorei(xt.UNPACK_SKIP_IMAGES,t.min.z),n.isDataTexture||n.isData3DTexture?xt.texSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,c,g.data):i.isCompressedArrayTexture?xt.compressedTexSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,g.data):xt.texSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,c,g),xt.pixelStorei(xt.UNPACK_ROW_LENGTH,u),xt.pixelStorei(xt.UNPACK_IMAGE_HEIGHT,d),xt.pixelStorei(xt.UNPACK_SKIP_PIXELS,p),xt.pixelStorei(xt.UNPACK_SKIP_ROWS,m),xt.pixelStorei(xt.UNPACK_SKIP_IMAGES,f),0===r&&i.generateMipmaps&&xt.generateMipmap(h),J.unbindTexture()},this.initTexture=function(t){t.isCubeTexture?tt.setTextureCube(t,0):t.isData3DTexture?tt.setTexture3D(t,0):t.isDataArrayTexture||t.isCompressedArrayTexture?tt.setTexture2DArray(t,0):tt.setTexture2D(t,0),J.unbindTexture()},this.resetState=function(){b=0,w=0,T=null,J.reset(),vt.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Fn}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace=t===Ze?"display-p3":"srgb",e.unpackColorSpace=ui.workingColorSpace===Je?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(t){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=t}}class tc{constructor(t,e=25e-5){this.isFogExp2=!0,this.name="",this.color=new Yr(t),this.density=e}clone(){return new tc(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class ec{constructor(t,e=1,n=1e3){this.isFog=!0,this.name="",this.color=new Yr(t),this.near=e,this.far=n}clone(){return new ec(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class nc extends Ir{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new fr,this.environmentIntensity=1,this.environmentRotation=new fr,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}}class ic{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=En,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Wn()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}get updateRange(){return ai("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,n){t*=this.stride,n*=e.stride;for(let i=0,r=this.stride;it.far||e.push({distance:o,point:lc.clone(),uv:Gr.getInterpolation(lc,mc,fc,gc,vc,_c,xc,new Kn),face:null,object:this})}copy(t,e){return super.copy(t,e),void 0!==t.center&&this.center.copy(t.center),this.material=t.material,this}}function Mc(t,e,n,i,r,s){uc.subVectors(t,n).addScalar(.5).multiply(i),void 0!==r?(dc.x=s*uc.x-r*uc.y,dc.y=r*uc.x+s*uc.y):dc.copy(uc),t.copy(e),t.x+=dc.x,t.y+=dc.y,t.applyMatrix4(pc)}const Sc=new Ci,bc=new Ci;class wc extends Ir{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const e=t.levels;for(let t=0,n=e.length;t0){let n,i;for(n=1,i=e.length;n0){Sc.setFromMatrixPosition(this.matrixWorld);const n=t.ray.origin.distanceTo(Sc);this.getObjectForDistance(n).raycast(t,e)}}update(t){const e=this.levels;if(e.length>1){Sc.setFromMatrixPosition(t.matrixWorld),bc.setFromMatrixPosition(this.matrixWorld);const n=Sc.distanceTo(bc)/t.zoom;let i,r;for(e[0].object.visible=!0,i=1,r=e.length;i=t))break;e[i-1].object.visible=!1,e[i].object.visible=!0}for(this._currentLevel=i-1;i=n.length&&n.push({start:-1,count:-1,z:-1});const r=n[this.index];i.push(r),this.index++,r.start=t.start,r.count=t.count,r.z=e}reset(){this.list.length=0,this.index=0}}const $c="batchId",Qc=new sr,th=new sr,eh=new sr,nh=new sr,ih=new ha,rh=new Ii,sh=new Ji,ah=new Ci,oh=new Kc,lh=new Vs,ch=[];function hh(t,e,n=0){const i=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const r=t.count;for(let s=0;s65536?new Uint32Array(r):new Uint16Array(r);e.setIndex(new as(t,1))}const s=i>65536?new Uint32Array(n):new Uint16Array(n);e.setAttribute($c,new as(s,1)),this._geometryInitialized=!0}}_validateGeometry(t){if(t.getAttribute($c))throw new Error(`BatchedMesh: Geometry cannot use attribute "${$c}"`);const e=this.geometry;if(Boolean(t.getIndex())!==Boolean(e.getIndex()))throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const n in e.attributes){if(n===$c)continue;if(!t.hasAttribute(n))throw new Error(`BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const i=t.getAttribute(n),r=e.getAttribute(n);if(i.itemSize!==r.itemSize||i.normalized!==r.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(t){return this.customSort=t,this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new Ii);const t=this._geometryCount,e=this.boundingBox,n=this._active;e.makeEmpty();for(let i=0;i=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const i={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let r=null;const s=this._reservedRanges,a=this._drawRanges,o=this._bounds;0!==this._geometryCount&&(r=s[s.length-1]),i.vertexCount=-1===e?t.getAttribute("position").count:e,i.vertexStart=null===r?0:r.vertexStart+r.vertexCount;const l=t.getIndex(),c=null!==l;if(c&&(i.indexCount=-1===n?l.count:n,i.indexStart=null===r?0:r.indexStart+r.indexCount),-1!==i.indexStart&&i.indexStart+i.indexCount>this._maxIndexCount||i.vertexStart+i.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const h=this._visibility,u=this._active,d=this._matricesTexture,p=this._matricesTexture.image.data;h.push(!0),u.push(!0);const m=this._geometryCount;this._geometryCount++,eh.toArray(p,16*m),d.needsUpdate=!0,s.push(i),a.push({start:c?i.indexStart:i.vertexStart,count:-1}),o.push({boxInitialized:!1,box:new Ii,sphereInitialized:!1,sphere:new Ji});const f=this.geometry.getAttribute($c);for(let t=0;t=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(e);const n=this.geometry,i=null!==n.getIndex(),r=n.getIndex(),s=e.getIndex(),a=this._reservedRanges[t];if(i&&s.count>a.indexCount||e.attributes.position.count>a.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const o=a.vertexStart,l=a.vertexCount;for(const t in n.attributes){if(t===$c)continue;const i=e.getAttribute(t),r=n.getAttribute(t);hh(i,r,o);const s=i.itemSize;for(let t=i.count,e=l;t=e.length||!1===e[t]||(e[t]=!1,this._visibilityChanged=!0),this}getInstanceCountAt(t){return null===this._multiDrawInstances?null:this._multiDrawInstances[t]}setInstanceCountAt(t,e){return null===this._multiDrawInstances&&(this._multiDrawInstances=new Int32Array(this._maxGeometryCount).fill(1)),this._multiDrawInstances[t]=e,t}getBoundingBoxAt(t,e){if(!1===this._active[t])return null;const n=this._bounds[t],i=n.box,r=this.geometry;if(!1===n.boxInitialized){i.makeEmpty();const e=r.index,s=r.attributes.position,a=this._drawRanges[t];for(let t=a.start,n=a.start+a.count;t=this._geometryCount||!1===n[t]||(e.toArray(r,16*t),i.needsUpdate=!0),this}getMatrixAt(t,e){const n=this._active,i=this._matricesTexture.image.data;return t>=this._geometryCount||!1===n[t]?null:e.fromArray(i,16*t)}setVisibleAt(t,e){const n=this._visibility,i=this._active;return t>=this._geometryCount||!1===i[t]||n[t]===e||(n[t]=e,this._visibilityChanged=!0),this}getVisibleAt(t){const e=this._visibility,n=this._active;return!(t>=this._geometryCount||!1===n[t])&&e[t]}raycast(t,e){const n=this._visibility,i=this._active,r=this._drawRanges,s=this._geometryCount,a=this.matrixWorld,o=this.geometry;lh.material=this.material,lh.geometry.index=o.index,lh.geometry.attributes=o.attributes,null===lh.geometry.boundingBox&&(lh.geometry.boundingBox=new Ii),null===lh.geometry.boundingSphere&&(lh.geometry.boundingSphere=new Ji);for(let o=0;o({...t}))),this._reservedRanges=t._reservedRanges.map((t=>({...t}))),this._visibility=t._visibility.slice(),this._active=t._active.slice(),this._bounds=t._bounds.map((t=>({boxInitialized:t.boxInitialized,box:t.box.clone(),sphereInitialized:t.sphereInitialized,sphere:t.sphere.clone()}))),this._maxGeometryCount=t._maxGeometryCount,this._maxVertexCount=t._maxVertexCount,this._maxIndexCount=t._maxIndexCount,this._geometryInitialized=t._geometryInitialized,this._geometryCount=t._geometryCount,this._multiDrawCounts=t._multiDrawCounts.slice(),this._multiDrawStarts=t._multiDrawStarts.slice(),this._matricesTexture=t._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(t,e,n,i,r){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const s=i.getIndex(),a=null===s?1:s.array.BYTES_PER_ELEMENT,o=this._active,l=this._visibility,c=this._multiDrawStarts,h=this._multiDrawCounts,u=this._drawRanges,d=this.perObjectFrustumCulled;d&&(nh.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),ih.setFromProjectionMatrix(nh,t.coordinateSystem));let p=0;if(this.sortObjects){th.copy(this.matrixWorld).invert(),ah.setFromMatrixPosition(n.matrixWorld).applyMatrix4(th);for(let t=0,e=l.length;t0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;ti)return;_h.applyMatrix4(t.matrixWorld);const o=e.ray.origin.distanceTo(_h);return oe.far?void 0:{distance:o,point:xh.clone().applyMatrix4(t.matrixWorld),index:r,face:null,faceIndex:null,object:t}}const Sh=new Ci,bh=new Ci;class wh extends yh{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let t=0,i=e.count;t0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;tr.far)return;s.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:e,face:null,object:a})}}class Uh extends yi{constructor(t,e,n,i,r,s,a,o,l){super(t,e,n,i,r,s,a,o,l),this.isVideoTexture=!0,this.minFilter=void 0!==s?s:Mt,this.magFilter=void 0!==r?r:Mt,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback((function e(){c.needsUpdate=!0,t.requestVideoFrameCallback(e)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;!1==="requestVideoFrameCallback"in t&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class Nh extends yi{constructor(t,e){super({width:t,height:e}),this.isFramebufferTexture=!0,this.magFilter=gt,this.minFilter=gt,this.generateMipmaps=!1,this.needsUpdate=!0}}class Dh extends yi{constructor(t,e,n,i,r,s,a,o,l,c,h,u){super(null,s,a,o,l,c,i,r,h,u),this.isCompressedTexture=!0,this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class Oh extends Dh{constructor(t,e,n,i,r,s){super(t,e,n,r,s),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=mt}}class Fh extends Dh{constructor(t,e,n){super(void 0,t[0].width,t[0].height,e,n,lt),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class zh extends yi{constructor(t,e,n,i,r,s,a,o,l){super(t,e,n,i,r,s,a,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Bh{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,e){const n=this.getUtoTmapping(t);return this.getPoint(n,e)}getPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPoint(n/t));return e}getSpacedPoints(t=5){const e=[];for(let n=0;n<=t;n++)e.push(this.getPointAt(n/t));return e}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const e=[];let n,i=this.getPoint(0),r=0;e.push(0);for(let s=1;s<=t;s++)n=this.getPoint(s/t),r+=n.distanceTo(i),e.push(r),i=n;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e){const n=this.getLengths();let i=0;const r=n.length;let s;s=e||t*n[r-1];let a,o=0,l=r-1;for(;o<=l;)if(i=Math.floor(o+(l-o)/2),a=n[i]-s,a<0)o=i+1;else{if(!(a>0)){l=i;break}l=i-1}if(i=l,n[i]===s)return i/(r-1);const c=n[i];return(i+(s-c)/(n[i+1]-c))/(r-1)}getTangent(t,e){const n=1e-4;let i=t-n,r=t+n;i<0&&(i=0),r>1&&(r=1);const s=this.getPoint(i),a=this.getPoint(r),o=e||(s.isVector2?new Kn:new Ci);return o.copy(a).sub(s).normalize(),o}getTangentAt(t,e){const n=this.getUtoTmapping(t);return this.getTangent(n,e)}computeFrenetFrames(t,e){const n=new Ci,i=[],r=[],s=[],a=new Ci,o=new sr;for(let e=0;e<=t;e++){const n=e/t;i[e]=this.getTangentAt(n,new Ci)}r[0]=new Ci,s[0]=new Ci;let l=Number.MAX_VALUE;const c=Math.abs(i[0].x),h=Math.abs(i[0].y),u=Math.abs(i[0].z);c<=l&&(l=c,n.set(1,0,0)),h<=l&&(l=h,n.set(0,1,0)),u<=l&&n.set(0,0,1),a.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],a),s[0].crossVectors(i[0],r[0]);for(let e=1;e<=t;e++){if(r[e]=r[e-1].clone(),s[e]=s[e-1].clone(),a.crossVectors(i[e-1],i[e]),a.length()>Number.EPSILON){a.normalize();const t=Math.acos(Xn(i[e-1].dot(i[e]),-1,1));r[e].applyMatrix4(o.makeRotationAxis(a,t))}s[e].crossVectors(i[e],r[e])}if(!0===e){let e=Math.acos(Xn(r[0].dot(r[t]),-1,1));e/=t,i[0].dot(a.crossVectors(r[0],r[t]))>0&&(e=-e);for(let n=1;n<=t;n++)r[n].applyMatrix4(o.makeRotationAxis(i[n],e*n)),s[n].crossVectors(i[n],r[n])}return{tangents:i,normals:r,binormals:s}}clone(){return(new this.constructor).copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class kh extends Bh{constructor(t=0,e=0,n=1,i=1,r=0,s=2*Math.PI,a=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=s,this.aClockwise=a,this.aRotation=o}getPoint(t,e=new Kn){const n=e,i=2*Math.PI;let r=this.aEndAngle-this.aStartAngle;const s=Math.abs(r)i;)r-=i;r0?0:(Math.floor(Math.abs(l)/r)+1)*r:0===c&&l===r-1&&(l=r-2,c=1),this.closed||l>0?a=i[(l-1)%r]:(Gh.subVectors(i[0],i[1]).add(i[0]),a=Gh);const h=i[l%r],u=i[(l+1)%r];if(this.closed||l+2i.length-2?i.length-1:s+1],h=i[s>i.length-3?i.length-1:s+2];return n.set(Yh(a,o.x,l.x,c.x,h.x),Yh(a,o.y,l.y,c.y,h.y)),n}copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e=n){const t=i[r]-n,s=this.curves[r],a=s.getLength(),o=0===a?0:1-t/a;return s.getPointAt(o,e)}r++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let e=0;for(let n=0,i=this.curves.length;n1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,n=t.curves.length;e0){const t=l.getPoint(0);t.equals(this.currentPoint)||this.lineTo(t.x,t.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class ou extends bs{constructor(t=[new Kn(0,-.5),new Kn(.5,0),new Kn(0,.5)],e=12,n=0,i=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:n,phiLength:i},e=Math.floor(e),i=Xn(i,0,2*Math.PI);const r=[],s=[],a=[],o=[],l=[],c=1/e,h=new Ci,u=new Kn,d=new Ci,p=new Ci,m=new Ci;let f=0,g=0;for(let e=0;e<=t.length-1;e++)switch(e){case 0:f=t[e+1].x-t[e].x,g=t[e+1].y-t[e].y,d.x=1*g,d.y=-f,d.z=0*g,m.copy(d),d.normalize(),o.push(d.x,d.y,d.z);break;case t.length-1:o.push(m.x,m.y,m.z);break;default:f=t[e+1].x-t[e].x,g=t[e+1].y-t[e].y,d.x=1*g,d.y=-f,d.z=0*g,p.copy(d),d.x+=m.x,d.y+=m.y,d.z+=m.z,d.normalize(),o.push(d.x,d.y,d.z),m.copy(p)}for(let r=0;r<=e;r++){const d=n+r*c*i,p=Math.sin(d),m=Math.cos(d);for(let n=0;n<=t.length-1;n++){h.x=t[n].x*p,h.y=t[n].y,h.z=t[n].x*m,s.push(h.x,h.y,h.z),u.x=r/e,u.y=n/(t.length-1),a.push(u.x,u.y);const i=o[3*n+0]*p,c=o[3*n+1],d=o[3*n+0]*m;l.push(i,c,d)}}for(let n=0;n0&&v(!0),e>0&&v(!1)),this.setIndex(c),this.setAttribute("position",new fs(h,3)),this.setAttribute("normal",new fs(u,3)),this.setAttribute("uv",new fs(d,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new hu(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class uu extends hu{constructor(t=1,e=1,n=32,i=1,r=!1,s=0,a=2*Math.PI){super(0,t,e,n,i,r,s,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:s,thetaLength:a}}static fromJSON(t){return new uu(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class du extends bs{constructor(t=[],e=[],n=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:i};const r=[],s=[];function a(t,e,n,i){const r=i+1,s=[];for(let i=0;i<=r;i++){s[i]=[];const a=t.clone().lerp(n,i/r),o=e.clone().lerp(n,i/r),l=r-i;for(let t=0;t<=l;t++)s[i][t]=0===t&&i===r?a:a.clone().lerp(o,t/l)}for(let t=0;t.9&&a<.1&&(e<.2&&(s[t+0]+=1),n<.2&&(s[t+2]+=1),i<.2&&(s[t+4]+=1))}}()}(),this.setAttribute("position",new fs(r,3)),this.setAttribute("normal",new fs(r.slice(),3)),this.setAttribute("uv",new fs(s,2)),0===i?this.computeVertexNormals():this.normalizeNormals()}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new du(t.vertices,t.indices,t.radius,t.details)}}class pu extends du{constructor(t=1,e=0){const n=(1+Math.sqrt(5))/2,i=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new pu(t.radius,t.detail)}}const mu=new Ci,fu=new Ci,gu=new Ci,vu=new Gr;class _u extends bs{constructor(t=null,e=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:t,thresholdAngle:e},null!==t){const n=4,i=Math.pow(10,n),r=Math.cos(Hn*e),s=t.getIndex(),a=t.getAttribute("position"),o=s?s.count:a.count,l=[0,0,0],c=["a","b","c"],h=new Array(3),u={},d=[];for(let t=0;t80*n){o=c=t[0],l=h=t[1];for(let e=n;ec&&(c=u),d>h&&(h=d);p=Math.max(c-o,h-l),p=0!==p?32767/p:0}return bu(s,a,n,o,l,p,0),a};function Mu(t,e,n,i,r){let s,a;if(r===function(t,e,n,i){let r=0;for(let s=e,a=n-i;s0)for(s=e;s=e;s-=i)a=Hu(s,t[s],t[s+1],a);return a&&Ou(a,a.next)&&(Gu(a),a=a.next),a}function Su(t,e){if(!t)return t;e||(e=t);let n,i=t;do{if(n=!1,i.steiner||!Ou(i,i.next)&&0!==Du(i.prev,i,i.next))i=i.next;else{if(Gu(i),i=e=i.prev,i===i.next)break;n=!0}}while(n||i!==e);return e}function bu(t,e,n,i,r,s,a){if(!t)return;!a&&s&&function(t,e,n,i){let r=t;do{0===r.z&&(r.z=Lu(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){let e,n,i,r,s,a,o,l,c=1;do{for(n=t,t=null,s=null,a=0;n;){for(a++,i=n,o=0,e=0;e0||l>0&&i;)0!==o&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,o--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;n=i}s.nextZ=null,c*=2}while(a>1)}(r)}(t,i,r,s);let o,l,c=t;for(;t.prev!==t.next;)if(o=t.prev,l=t.next,s?Tu(t,i,r,s):wu(t))e.push(o.i/n|0),e.push(t.i/n|0),e.push(l.i/n|0),Gu(t),t=l.next,c=l.next;else if((t=l)===c){a?1===a?bu(t=Eu(Su(t),e,n),e,n,i,r,s,2):2===a&&Au(t,e,n,i,r,s):bu(Su(t),e,n,i,r,s,1);break}}function wu(t){const e=t.prev,n=t,i=t.next;if(Du(e,n,i)>=0)return!1;const r=e.x,s=n.x,a=i.x,o=e.y,l=n.y,c=i.y,h=rs?r>a?r:a:s>a?s:a,p=o>l?o>c?o:c:l>c?l:c;let m=i.next;for(;m!==e;){if(m.x>=h&&m.x<=d&&m.y>=u&&m.y<=p&&Uu(r,o,s,l,a,c,m.x,m.y)&&Du(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function Tu(t,e,n,i){const r=t.prev,s=t,a=t.next;if(Du(r,s,a)>=0)return!1;const o=r.x,l=s.x,c=a.x,h=r.y,u=s.y,d=a.y,p=ol?o>c?o:c:l>c?l:c,g=h>u?h>d?h:d:u>d?u:d,v=Lu(p,m,e,n,i),_=Lu(f,g,e,n,i);let x=t.prevZ,y=t.nextZ;for(;x&&x.z>=v&&y&&y.z<=_;){if(x.x>=p&&x.x<=f&&x.y>=m&&x.y<=g&&x!==r&&x!==a&&Uu(o,h,l,u,c,d,x.x,x.y)&&Du(x.prev,x,x.next)>=0)return!1;if(x=x.prevZ,y.x>=p&&y.x<=f&&y.y>=m&&y.y<=g&&y!==r&&y!==a&&Uu(o,h,l,u,c,d,y.x,y.y)&&Du(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(;x&&x.z>=v;){if(x.x>=p&&x.x<=f&&x.y>=m&&x.y<=g&&x!==r&&x!==a&&Uu(o,h,l,u,c,d,x.x,x.y)&&Du(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;y&&y.z<=_;){if(y.x>=p&&y.x<=f&&y.y>=m&&y.y<=g&&y!==r&&y!==a&&Uu(o,h,l,u,c,d,y.x,y.y)&&Du(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function Eu(t,e,n){let i=t;do{const r=i.prev,s=i.next.next;!Ou(r,s)&&Fu(r,i,i.next,s)&&ku(r,s)&&ku(s,r)&&(e.push(r.i/n|0),e.push(i.i/n|0),e.push(s.i/n|0),Gu(i),Gu(i.next),i=t=s),i=i.next}while(i!==t);return Su(i)}function Au(t,e,n,i,r,s){let a=t;do{let t=a.next.next;for(;t!==a.prev;){if(a.i!==t.i&&Nu(a,t)){let o=Vu(a,t);return a=Su(a,a.next),o=Su(o,o.next),bu(a,e,n,i,r,s,0),void bu(o,e,n,i,r,s,0)}t=t.next}a=a.next}while(a!==t)}function Ru(t,e){return t.x-e.x}function Cu(t,e){const n=function(t,e){let n,i=e,r=-1/0;const s=t.x,a=t.y;do{if(a<=i.y&&a>=i.next.y&&i.next.y!==i.y){const t=i.x+(a-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(t<=s&&t>r&&(r=t,n=i.x=i.x&&i.x>=l&&s!==i.x&&Uu(an.x||i.x===n.x&&Pu(n,i)))&&(n=i,u=h)),i=i.next}while(i!==o);return n}(t,e);if(!n)return e;const i=Vu(n,t);return Su(i,i.next),Su(n,n.next)}function Pu(t,e){return Du(t.prev,t,e.prev)<0&&Du(e.next,t,t.next)<0}function Lu(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*r|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-i)*r|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Iu(t){let e=t,n=t;do{(e.x=(t-a)*(s-o)&&(t-a)*(i-o)>=(n-a)*(e-o)&&(n-a)*(s-o)>=(r-a)*(i-o)}function Nu(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Fu(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(ku(t,e)&&ku(e,t)&&function(t,e){let n=t,i=!1;const r=(t.x+e.x)/2,s=(t.y+e.y)/2;do{n.y>s!=n.next.y>s&&n.next.y!==n.y&&r<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(Du(t.prev,t,e.prev)||Du(t,e.prev,e))||Ou(t,e)&&Du(t.prev,t,t.next)>0&&Du(e.prev,e,e.next)>0)}function Du(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Ou(t,e){return t.x===e.x&&t.y===e.y}function Fu(t,e,n,i){const r=Bu(Du(t,e,n)),s=Bu(Du(t,e,i)),a=Bu(Du(n,i,t)),o=Bu(Du(n,i,e));return r!==s&&a!==o||(!(0!==r||!zu(t,n,e))||(!(0!==s||!zu(t,i,e))||(!(0!==a||!zu(n,t,i))||!(0!==o||!zu(n,e,i)))))}function zu(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Bu(t){return t>0?1:t<0?-1:0}function ku(t,e){return Du(t.prev,t,t.next)<0?Du(t,e,t.next)>=0&&Du(t,t.prev,e)>=0:Du(t,e,t.prev)<0||Du(t,t.next,e)<0}function Vu(t,e){const n=new Wu(t.i,t.x,t.y),i=new Wu(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,s.next=i,i.prev=s,i}function Hu(t,e,n,i){const r=new Wu(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Gu(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wu(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Xu{static area(t){const e=t.length;let n=0;for(let i=e-1,r=0;r2&&t[e-1].equals(t[0])&&t.pop()}function qu(t,e){for(let n=0;nNumber.EPSILON){const u=Math.sqrt(h),d=Math.sqrt(l*l+c*c),p=e.x-o/u,m=e.y+a/u,f=((n.x-c/d-p)*c-(n.y+l/d-m)*l)/(a*c-o*l);i=p+a*f-t.x,r=m+o*f-t.y;const g=i*i+r*r;if(g<=2)return new Kn(i,r);s=Math.sqrt(g/2)}else{let t=!1;a>Number.EPSILON?l>Number.EPSILON&&(t=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(t=!0):Math.sign(o)===Math.sign(c)&&(t=!0),t?(i=-o,r=a,s=Math.sqrt(h)):(i=a,r=o,s=Math.sqrt(h/2))}return new Kn(i/s,r/s)}const L=[];for(let t=0,e=E.length,n=e-1,i=t+1;t=0;t--){const e=t/p,n=h*Math.cos(e*Math.PI/2),i=u*Math.sin(e*Math.PI/2)+d;for(let t=0,e=E.length;t=0;){const i=n;let r=n-1;r<0&&(r=t.length-1);for(let t=0,n=o+2*p;t0)&&d.push(e,r,l),(t!==n-1||o0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.dispersion=t.dispersion,this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class dd extends Kr{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Yr(16777215),this.specular=new Yr(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Yr(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Kn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new fr,this.combine=Y,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class pd extends Kr{constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Yr(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Yr(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Kn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class md extends Kr{constructor(t){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Kn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class fd extends Kr{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Yr(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Yr(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Kn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new fr,this.combine=Y,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class gd extends Kr{constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Yr(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Kn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this.fog=t.fog,this}}class vd extends dh{constructor(t){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}function _d(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)}function xd(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function yd(t){const e=t.length,n=new Array(e);for(let t=0;t!==e;++t)n[t]=t;return n.sort((function(e,n){return t[e]-t[n]})),n}function Md(t,e,n){const i=t.length,r=new t.constructor(i);for(let s=0,a=0;a!==i;++s){const i=n[s]*e;for(let n=0;n!==e;++n)r[a++]=t[i+n]}return r}function Sd(t,e,n,i){let r=1,s=t[0];for(;void 0!==s&&void 0===s[i];)s=t[r++];if(void 0===s)return;let a=s[i];if(void 0!==a)if(Array.isArray(a))do{a=s[i],void 0!==a&&(e.push(s.time),n.push.apply(n,a)),s=t[r++]}while(void 0!==s);else if(void 0!==a.toArray)do{a=s[i],void 0!==a&&(e.push(s.time),a.toArray(n,n.length)),s=t[r++]}while(void 0!==s);else do{a=s[i],void 0!==a&&(e.push(s.time),n.push(a)),s=t[r++]}while(void 0!==s)}const bd={convertArray:_d,isTypedArray:xd,getKeyframeOrder:yd,sortedArray:Md,flattenJSON:Sd,subclip:function(t,e,n,i,r=30){const s=t.clone();s.name=e;const a=[];for(let t=0;t=i)){l.push(e.times[t]);for(let n=0;ns.tracks[t].times[0]&&(o=s.tracks[t].times[0]);for(let t=0;t=i.times[u]){const t=u*l+o,e=t+l-o;d=i.values.slice(t,e)}else{const t=i.createInterpolant(),e=o,n=l-o;t.evaluate(s),d=t.resultBuffer.slice(e,n)}if("quaternion"===r){(new Ri).fromArray(d).normalize().conjugate().toArray(d)}const p=a.times.length;for(let t=0;t=r)break t;{const a=e[1];t=r)break e}s=n,n=0}}for(;n>>1;te;)--s;if(++s,0!==r||s!==i){r>=s&&(s=Math.max(s,1),r=s-1);const t=this.getValueSize();this.times=n.slice(r,s),this.values=this.values.slice(r*t,s*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const n=this.times,i=this.values,r=n.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let e=0;e!==r;e++){const i=n[e];if("number"==typeof i&&isNaN(i)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,i),t=!1;break}if(null!==s&&s>i){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,i,s),t=!1;break}s=i}if(void 0!==i&&xd(i))for(let e=0,n=i.length;e!==n;++e){const n=i[e];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,n),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===Ue,r=t.length-1;let s=1;for(let a=1;a0){t[s]=t[r];for(let t=r*n,i=s*n,a=0;a!==n;++a)e[i+a]=e[t+a];++s}return s!==t.length?(this.times=t.slice(0,s),this.values=e.slice(0,s*n)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),n=new(0,this.constructor)(this.name,t,e);return n.createInterpolant=this.createInterpolant,n}}Rd.prototype.TimeBufferType=Float32Array,Rd.prototype.ValueBufferType=Float32Array,Rd.prototype.DefaultInterpolation=Ie;class Cd extends Rd{}Cd.prototype.ValueTypeName="bool",Cd.prototype.ValueBufferType=Array,Cd.prototype.DefaultInterpolation=Le,Cd.prototype.InterpolantFactoryMethodLinear=void 0,Cd.prototype.InterpolantFactoryMethodSmooth=void 0;class Pd extends Rd{}Pd.prototype.ValueTypeName="color";class Ld extends Rd{}Ld.prototype.ValueTypeName="number";class Id extends wd{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,o=(n-e)/(i-e);let l=t*a;for(let t=l+a;l!==t;l+=4)Ri.slerpFlat(r,0,s,l-a,s,l,o);return r}}class Ud extends Rd{InterpolantFactoryMethodLinear(t){return new Id(this.times,this.values,this.getValueSize(),t)}}Ud.prototype.ValueTypeName="quaternion",Ud.prototype.DefaultInterpolation=Ie,Ud.prototype.InterpolantFactoryMethodSmooth=void 0;class Nd extends Rd{}Nd.prototype.ValueTypeName="string",Nd.prototype.ValueBufferType=Array,Nd.prototype.DefaultInterpolation=Le,Nd.prototype.InterpolantFactoryMethodLinear=void 0,Nd.prototype.InterpolantFactoryMethodSmooth=void 0;class Dd extends Rd{}Dd.prototype.ValueTypeName="vector";class Od{constructor(t="",e=-1,n=[],i=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=i,this.uuid=Wn(),this.duration<0&&this.resetDuration()}static parse(t){const e=[],n=t.tracks,i=1/(t.fps||1);for(let t=0,r=n.length;t!==r;++t)e.push(Fd(n[t]).scale(i));const r=new this(t.name,t.duration,e,t.blendMode);return r.uuid=t.uuid,r}static toJSON(t){const e=[],n=t.tracks,i={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let t=0,i=n.length;t!==i;++t)e.push(Rd.toJSON(n[t]));return i}static CreateFromMorphTargetSequence(t,e,n,i){const r=e.length,s=[];for(let t=0;t1){const t=s[1];let e=i[t];e||(i[t]=e=[]),e.push(n)}}const s=[];for(const t in i)s.push(this.CreateFromMorphTargetSequence(t,i[t],e,n));return s}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(t,e,n,i,r){if(0!==n.length){const s=[],a=[];Sd(n,s,a,i),0!==s.length&&r.push(new t(e,s,a))}},i=[],r=t.name||"default",s=t.fps||30,a=t.blendMode;let o=t.length||-1;const l=t.hierarchy||[];for(let t=0;t{e&&e(r),this.manager.itemEnd(t)}),0),r;if(void 0!==Hd[t])return void Hd[t].push({onLoad:e,onProgress:n,onError:i});Hd[t]=[],Hd[t].push({onLoad:e,onProgress:n,onError:i});const s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,o=this.responseType;fetch(s).then((e=>{if(200===e.status||0===e.status){if(0===e.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===e.body||void 0===e.body.getReader)return e;const n=Hd[t],i=e.body.getReader(),r=e.headers.get("X-File-Size")||e.headers.get("Content-Length"),s=r?parseInt(r):0,a=0!==s;let o=0;const l=new ReadableStream({start(t){!function e(){i.read().then((({done:i,value:r})=>{if(i)t.close();else{o+=r.byteLength;const i=new ProgressEvent("progress",{lengthComputable:a,loaded:o,total:s});for(let t=0,e=n.length;t{switch(o){case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"document":return t.text().then((t=>(new DOMParser).parseFromString(t,a)));case"json":return t.json();default:if(void 0===a)return t.text();{const e=/charset="?([^;"\s]*)"?/i.exec(a),n=e&&e[1]?e[1].toLowerCase():void 0,i=new TextDecoder(n);return t.arrayBuffer().then((t=>i.decode(t)))}}})).then((e=>{zd.add(t,e);const n=Hd[t];delete Hd[t];for(let t=0,i=n.length;t{const n=Hd[t];if(void 0===n)throw this.manager.itemError(t),e;delete Hd[t];for(let t=0,i=n.length;t{this.manager.itemEnd(t)})),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class Xd extends Vd{constructor(t){super(t)}load(t,e,n,i){const r=this,s=new Wd(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,(function(n){try{e(r.parse(JSON.parse(n)))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}}),n,i)}parse(t){const e=[];for(let n=0;n0:i.vertexColors=t.vertexColors),void 0!==t.uniforms)for(const e in t.uniforms){const r=t.uniforms[e];switch(i.uniforms[e]={},r.type){case"t":i.uniforms[e].value=n(r.value);break;case"c":i.uniforms[e].value=(new Yr).setHex(r.value);break;case"v2":i.uniforms[e].value=(new Kn).fromArray(r.value);break;case"v3":i.uniforms[e].value=(new Ci).fromArray(r.value);break;case"v4":i.uniforms[e].value=(new Mi).fromArray(r.value);break;case"m3":i.uniforms[e].value=(new $n).fromArray(r.value);break;case"m4":i.uniforms[e].value=(new sr).fromArray(r.value);break;default:i.uniforms[e].value=r.value}}if(void 0!==t.defines&&(i.defines=t.defines),void 0!==t.vertexShader&&(i.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(i.fragmentShader=t.fragmentShader),void 0!==t.glslVersion&&(i.glslVersion=t.glslVersion),void 0!==t.extensions)for(const e in t.extensions)i.extensions[e]=t.extensions[e];if(void 0!==t.lights&&(i.lights=t.lights),void 0!==t.clipping&&(i.clipping=t.clipping),void 0!==t.size&&(i.size=t.size),void 0!==t.sizeAttenuation&&(i.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(i.map=n(t.map)),void 0!==t.matcap&&(i.matcap=n(t.matcap)),void 0!==t.alphaMap&&(i.alphaMap=n(t.alphaMap)),void 0!==t.bumpMap&&(i.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(i.bumpScale=t.bumpScale),void 0!==t.normalMap&&(i.normalMap=n(t.normalMap)),void 0!==t.normalMapType&&(i.normalMapType=t.normalMapType),void 0!==t.normalScale){let e=t.normalScale;!1===Array.isArray(e)&&(e=[e,e]),i.normalScale=(new Kn).fromArray(e)}return void 0!==t.displacementMap&&(i.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(i.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(i.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(i.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(i.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(i.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(i.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(i.specularMap=n(t.specularMap)),void 0!==t.specularIntensityMap&&(i.specularIntensityMap=n(t.specularIntensityMap)),void 0!==t.specularColorMap&&(i.specularColorMap=n(t.specularColorMap)),void 0!==t.envMap&&(i.envMap=n(t.envMap)),void 0!==t.envMapRotation&&i.envMapRotation.fromArray(t.envMapRotation),void 0!==t.envMapIntensity&&(i.envMapIntensity=t.envMapIntensity),void 0!==t.reflectivity&&(i.reflectivity=t.reflectivity),void 0!==t.refractionRatio&&(i.refractionRatio=t.refractionRatio),void 0!==t.lightMap&&(i.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(i.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(i.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(i.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(i.gradientMap=n(t.gradientMap)),void 0!==t.clearcoatMap&&(i.clearcoatMap=n(t.clearcoatMap)),void 0!==t.clearcoatRoughnessMap&&(i.clearcoatRoughnessMap=n(t.clearcoatRoughnessMap)),void 0!==t.clearcoatNormalMap&&(i.clearcoatNormalMap=n(t.clearcoatNormalMap)),void 0!==t.clearcoatNormalScale&&(i.clearcoatNormalScale=(new Kn).fromArray(t.clearcoatNormalScale)),void 0!==t.iridescenceMap&&(i.iridescenceMap=n(t.iridescenceMap)),void 0!==t.iridescenceThicknessMap&&(i.iridescenceThicknessMap=n(t.iridescenceThicknessMap)),void 0!==t.transmissionMap&&(i.transmissionMap=n(t.transmissionMap)),void 0!==t.thicknessMap&&(i.thicknessMap=n(t.thicknessMap)),void 0!==t.anisotropyMap&&(i.anisotropyMap=n(t.anisotropyMap)),void 0!==t.sheenColorMap&&(i.sheenColorMap=n(t.sheenColorMap)),void 0!==t.sheenRoughnessMap&&(i.sheenRoughnessMap=n(t.sheenRoughnessMap)),i}setTextures(t){return this.textures=t,this}static createMaterialFromType(t){return new{ShadowMaterial:ld,SpriteMaterial:ac,RawShaderMaterial:cd,ShaderMaterial:Ys,PointsMaterial:Eh,MeshPhysicalMaterial:ud,MeshStandardMaterial:hd,MeshPhongMaterial:dd,MeshToonMaterial:pd,MeshNormalMaterial:md,MeshLambertMaterial:fd,MeshDepthMaterial:Fl,MeshDistanceMaterial:zl,MeshBasicMaterial:$r,MeshMatcapMaterial:gd,LineDashedMaterial:vd,LineBasicMaterial:dh,Material:Kr}[t]}}class vp{static decodeText(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);let e="";for(let n=0,i=t.length;n0){const n=new Bd(e);r=new qd(n),r.setCrossOrigin(this.crossOrigin);for(let e=0,n=t.length;e0){i=new qd(this.manager),i.setCrossOrigin(this.crossOrigin);for(let e=0,i=t.length;e{const e=new Ii;e.min.fromArray(t.boxMin),e.max.fromArray(t.boxMax);const n=new Ji;return n.radius=t.sphereRadius,n.center.fromArray(t.sphereCenter),{boxInitialized:t.boxInitialized,box:e,sphereInitialized:t.sphereInitialized,sphere:n}})),s._maxGeometryCount=t.maxGeometryCount,s._maxVertexCount=t.maxVertexCount,s._maxIndexCount=t.maxIndexCount,s._geometryInitialized=t.geometryInitialized,s._geometryCount=t.geometryCount,s._matricesTexture=h(t.matricesTexture.uuid);break;case"LOD":s=new wc;break;case"Line":s=new yh(l(t.geometry),c(t.material));break;case"LineLoop":s=new Th(l(t.geometry),c(t.material));break;case"LineSegments":s=new wh(l(t.geometry),c(t.material));break;case"PointCloud":case"Points":s=new Lh(l(t.geometry),c(t.material));break;case"Sprite":s=new yc(c(t.material));break;case"Group":s=new Wl;break;case"Bone":s=new Dc;break;default:s=new Ir}if(s.uuid=t.uuid,void 0!==t.name&&(s.name=t.name),void 0!==t.matrix?(s.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(s.matrixAutoUpdate=t.matrixAutoUpdate),s.matrixAutoUpdate&&s.matrix.decompose(s.position,s.quaternion,s.scale)):(void 0!==t.position&&s.position.fromArray(t.position),void 0!==t.rotation&&s.rotation.fromArray(t.rotation),void 0!==t.quaternion&&s.quaternion.fromArray(t.quaternion),void 0!==t.scale&&s.scale.fromArray(t.scale)),void 0!==t.up&&s.up.fromArray(t.up),void 0!==t.castShadow&&(s.castShadow=t.castShadow),void 0!==t.receiveShadow&&(s.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(s.shadow.bias=t.shadow.bias),void 0!==t.shadow.normalBias&&(s.shadow.normalBias=t.shadow.normalBias),void 0!==t.shadow.radius&&(s.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&s.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(s.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(s.visible=t.visible),void 0!==t.frustumCulled&&(s.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(s.renderOrder=t.renderOrder),void 0!==t.userData&&(s.userData=t.userData),void 0!==t.layers&&(s.layers.mask=t.layers),void 0!==t.children){const a=t.children;for(let t=0;t{e&&e(n),r.manager.itemEnd(t)})).catch((t=>{i&&i(t)})):(setTimeout((function(){e&&e(s),r.manager.itemEnd(t)}),0),s);const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader;const o=fetch(t,a).then((function(t){return t.blob()})).then((function(t){return createImageBitmap(t,Object.assign(r.options,{colorSpaceConversion:"none"}))})).then((function(n){return zd.add(t,n),e&&e(n),r.manager.itemEnd(t),n})).catch((function(e){i&&i(e),zd.remove(t),r.manager.itemError(t),r.manager.itemEnd(t)}));zd.add(t,o),r.manager.itemStart(t)}}let Tp;class Ep{static getContext(){return void 0===Tp&&(Tp=new(window.AudioContext||window.webkitAudioContext)),Tp}static setContext(t){Tp=t}}class Ap extends Vd{constructor(t){super(t)}load(t,e,n,i){const r=this,s=new Wd(this.manager);function a(e){i?i(e):console.error(e),r.manager.itemError(t)}s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,(function(t){try{const n=t.slice(0);Ep.getContext().decodeAudioData(n,(function(t){e(t)})).catch(a)}catch(t){a(t)}}),n,i)}}const Rp=new sr,Cp=new sr,Pp=new sr;class Lp{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Qs,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Qs,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){const e=this._cache;if(e.focus!==t.focus||e.fov!==t.fov||e.aspect!==t.aspect*this.aspect||e.near!==t.near||e.far!==t.far||e.zoom!==t.zoom||e.eyeSep!==this.eyeSep){e.focus=t.focus,e.fov=t.fov,e.aspect=t.aspect*this.aspect,e.near=t.near,e.far=t.far,e.zoom=t.zoom,e.eyeSep=this.eyeSep,Pp.copy(t.projectionMatrix);const n=e.eyeSep/2,i=n*e.near/e.focus,r=e.near*Math.tan(Hn*e.fov*.5)/e.zoom;let s,a;Cp.elements[12]=-n,Rp.elements[12]=n,s=-r*e.aspect+i,a=r*e.aspect+i,Pp.elements[0]=2*e.near/(a-s),Pp.elements[8]=(a+s)/(a-s),this.cameraL.projectionMatrix.copy(Pp),s=-r*e.aspect-i,a=r*e.aspect-i,Pp.elements[0]=2*e.near/(a-s),Pp.elements[8]=(a+s)/(a-s),this.cameraR.projectionMatrix.copy(Pp)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(Cp),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(Rp)}}class Ip{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Up(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=Up();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function Up(){return("undefined"==typeof performance?Date:performance).now()}const Np=new Ci,Dp=new Ri,Op=new Ci,Fp=new Ci;class zp extends Ir{constructor(){super(),this.type="AudioListener",this.context=Ep.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Ip}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);const e=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Np,Dp,Op),Fp.set(0,0,-1).applyQuaternion(Dp),e.positionX){const t=this.context.currentTime+this.timeDelta;e.positionX.linearRampToValueAtTime(Np.x,t),e.positionY.linearRampToValueAtTime(Np.y,t),e.positionZ.linearRampToValueAtTime(Np.z,t),e.forwardX.linearRampToValueAtTime(Fp.x,t),e.forwardY.linearRampToValueAtTime(Fp.y,t),e.forwardZ.linearRampToValueAtTime(Fp.z,t),e.upX.linearRampToValueAtTime(n.x,t),e.upY.linearRampToValueAtTime(n.y,t),e.upZ.linearRampToValueAtTime(n.z,t)}else e.setPosition(Np.x,Np.y,Np.z),e.setOrientation(Fp.x,Fp.y,Fp.z,n.x,n.y,n.z)}}class Bp extends Ir{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+t;const e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.loopStart=this.loopStart,e.loopEnd=this.loopEnd,e.onended=this.onEnded.bind(this),e.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=e,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,null!==this.source&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t0&&this._mixBufferRegionAdditive(n,i,this._addIndex*e,1,e);for(let t=e,r=e+e;t!==r;++t)if(n[t]!==n[t+e]){a.setValue(n,i);break}}saveOriginalState(){const t=this.binding,e=this.buffer,n=this.valueSize,i=n*this._origIndex;t.getValue(e,i);for(let t=n,r=i;t!==r;++t)e[t]=e[i+t%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=3*this.valueSize;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let n=t;n=.5)for(let i=0;i!==r;++i)t[e+i]=t[n+i]}_slerp(t,e,n,i){Ri.slerpFlat(t,e,t,e,t,n,i)}_slerpAdditive(t,e,n,i,r){const s=this._workIndex*r;Ri.multiplyQuaternionsFlat(t,s,t,e,t,n),Ri.slerpFlat(t,e,t,e,t,s,i)}_lerp(t,e,n,i,r){const s=1-i;for(let a=0;a!==r;++a){const r=e+a;t[r]=t[r]*s+t[n+a]*i}}_lerpAdditive(t,e,n,i,r){for(let s=0;s!==r;++s){const r=e+s;t[r]=t[r]+t[n+s]*i}}}const qp="\\[\\]\\.:\\/",Yp=new RegExp("["+qp+"]","g"),Zp="[^"+qp+"]",Jp="[^"+qp.replace("\\.","")+"]",Kp=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Zp)+/(WCOD+)?/.source.replace("WCOD",Jp)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Zp)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Zp)+"$"),$p=["material","materials","bones","map"];class Qp{constructor(t,e,n){this.path=e,this.parsedPath=n||Qp.parseTrackName(e),this.node=Qp.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new Qp.Composite(t,e,n):new Qp(t,e,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Yp,"")}static parseTrackName(t){const e=Kp.exec(t);if(null===e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==i&&-1!==i){const t=n.nodeName.substring(i+1);-1!==$p.indexOf(t)&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=t)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(void 0===e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){const n=function(t){for(let i=0;i=r){const s=r++,c=t[s];e[c.uuid]=l,t[l]=c,e[o]=s,t[s]=a;for(let t=0,e=i;t!==e;++t){const e=n[t],i=e[s],r=e[l];e[l]=i,e[s]=r}}}this.nCachedObjects_=r}uncache(){const t=this._objects,e=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_,s=t.length;for(let a=0,o=arguments.length;a!==o;++a){const o=arguments[a].uuid,l=e[o];if(void 0!==l)if(delete e[o],l0&&(e[a.uuid]=l),t[l]=a,t.pop();for(let t=0,e=i;t!==e;++t){const e=n[t];e[l]=e[r],e.pop()}}}this.nCachedObjects_=r}subscribe_(t,e){const n=this._bindingsIndicesByPath;let i=n[t];const r=this._bindings;if(void 0!==i)return r[i];const s=this._paths,a=this._parsedPaths,o=this._objects,l=o.length,c=this.nCachedObjects_,h=new Array(l);i=r.length,n[t]=i,s.push(t),a.push(e),r.push(h);for(let n=c,i=o.length;n!==i;++n){const i=o[n];h[n]=new Qp(i,t,e)}return h}unsubscribe_(t){const e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){const i=this._paths,r=this._parsedPaths,s=this._bindings,a=s.length-1,o=s[a];e[t[a]]=n,s[n]=o,s.pop(),r[n]=r[a],r.pop(),i[n]=i[a],i.pop()}}}class em{constructor(t,e,n=null,i=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=n,this.blendMode=i;const r=e.tracks,s=r.length,a=new Array(s),o={endingStart:Ne,endingEnd:Ne};for(let t=0;t!==s;++t){const e=r[t].createInterpolant(null);a[t]=e,e.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){const n=this._clip.duration,i=t._clip.duration,r=i/n,s=n/i;t.warp(1,r,e),this.warp(s,1,e)}return this}crossFadeTo(t,e,n){return t.crossFadeFrom(this,e,n)}stopFading(){const t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,n){const i=this._mixer,r=i.time,s=this.timeScale;let a=this._timeScaleInterpolant;null===a&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const o=a.parameterPositions,l=a.sampleValues;return o[0]=r,o[1]=r+n,l[0]=t/s,l[1]=e/s,this}stopWarping(){const t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,n,i){if(!this.enabled)return void this._updateWeight(t);const r=this._startTime;if(null!==r){const i=(t-r)*n;i<0||0===n?e=0:(this._startTime=null,e=n*i)}e*=this._updateTimeScale(t);const s=this._updateTime(e),a=this._updateWeight(t);if(a>0){const t=this._interpolants,e=this._propertyBindings;if(this.blendMode===ze)for(let n=0,i=t.length;n!==i;++n)t[n].evaluate(s),e[n].accumulateAdditive(a);else for(let n=0,r=t.length;n!==r;++n)t[n].evaluate(s),e[n].accumulate(i,a)}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const n=this._weightInterpolant;if(null!==n){const i=n.evaluate(t)[0];e*=i,t>n.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,n=this.loop;let i=this.time+t,r=this._loopCount;const s=2202===n;if(0===t)return-1===r?i:s&&1==(1&r)?e-i:i;if(2200===n){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(i>=e)i=e;else{if(!(i<0)){this.time=i;break t}i=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===r&&(t>=0?(r=0,this._setEndings(!0,0===this.repetitions,s)):this._setEndings(0===this.repetitions,!0,s)),i>=e||i<0){const n=Math.floor(i/e);i-=e*n,r+=Math.abs(n);const a=this.repetitions-r;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=t>0?e:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===a){const e=t<0;this._setEndings(e,!e,s)}else this._setEndings(!1,!1,s);this._loopCount=r,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=i;if(s&&1==(1&r))return e-i}return i}_setEndings(t,e,n){const i=this._interpolantSettings;n?(i.endingStart=De,i.endingEnd=De):(i.endingStart=t?this.zeroSlopeAtStart?De:Ne:Oe,i.endingEnd=e?this.zeroSlopeAtEnd?De:Ne:Oe)}_scheduleFading(t,e,n){const i=this._mixer,r=i.time;let s=this._weightInterpolant;null===s&&(s=i._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,o=s.sampleValues;return a[0]=r,o[0]=e,a[1]=r+t,o[1]=n,this}}const nm=new Float32Array(1);class im extends Bn{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){const n=t._localRoot||this._root,i=t._clip.tracks,r=i.length,s=t._propertyBindings,a=t._interpolants,o=n.uuid,l=this._bindingsByRootAndName;let c=l[o];void 0===c&&(c={},l[o]=c);for(let t=0;t!==r;++t){const r=i[t],l=r.name;let h=c[l];if(void 0!==h)++h.referenceCount,s[t]=h;else{if(h=s[t],void 0!==h){null===h._cacheIndex&&(++h.referenceCount,this._addInactiveBinding(h,o,l));continue}const i=e&&e._propertyBindings[t].binding.parsedPath;h=new jp(Qp.create(n,l,i),r.ValueTypeName,r.getValueSize()),++h.referenceCount,this._addInactiveBinding(h,o,l),s[t]=h}a[t].resultBuffer=h.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){const e=(t._localRoot||this._root).uuid,n=t._clip.uuid,i=this._actionsByClip[n];this._bindAction(t,i&&i.knownActions[0]),this._addInactiveAction(t,n,e)}const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const e=t._cacheIndex;return null!==e&&e=0;--e)t[e].stop();return this}update(t){t*=this.timeScale;const e=this._actions,n=this._nActiveActions,i=this.time+=t,r=Math.sign(t),s=this._accuIndex^=1;for(let a=0;a!==n;++a){e[a]._update(i,t,r,s)}const a=this._bindings,o=this._nActiveBindings;for(let t=0;t!==o;++t)a[t].apply(s);return this}setTime(t){this.time=0;for(let t=0;tthis.max.x||t.ythis.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,fm).distanceTo(t)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const vm=new Ci,_m=new Ci;class xm{constructor(t=new Ci,e=new Ci){this.start=t,this.end=e}set(t,e){return this.start.copy(t),this.end.copy(e),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){vm.subVectors(t,this.start),_m.subVectors(this.end,this.start);const n=_m.dot(_m);let i=_m.dot(vm)/n;return e&&(i=Xn(i,0,1)),i}closestPointToPoint(t,e,n){const i=this.closestPointToPointParameter(t,e);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}const ym=new Ci;class Mm extends Ir{constructor(t,e){super(),this.light=t,this.matrixAutoUpdate=!1,this.color=e,this.type="SpotLightHelper";const n=new bs,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let t=0,e=1,n=32;t1)for(let n=0;n.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{jm.set(t.z,0,-t.x).normalize();const e=Math.acos(t.y);this.quaternion.setFromAxisAngle(jm,e)}}setLength(t,e=.2*t,n=.2*e){this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Jm extends wh{constructor(t=1){const e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=new bs;n.setAttribute("position",new fs(e,3)),n.setAttribute("color",new fs([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));super(n,new dh({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(t,e,n){const i=new Yr,r=this.geometry.attributes.color.array;return i.set(t),i.toArray(r,0),i.toArray(r,3),i.set(e),i.toArray(r,6),i.toArray(r,9),i.set(n),i.toArray(r,12),i.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Km{constructor(){this.type="ShapePath",this.color=new Yr,this.subPaths=[],this.currentPath=null}moveTo(t,e){return this.currentPath=new au,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e),this}lineTo(t,e){return this.currentPath.lineTo(t,e),this}quadraticCurveTo(t,e,n,i){return this.currentPath.quadraticCurveTo(t,e,n,i),this}bezierCurveTo(t,e,n,i,r,s){return this.currentPath.bezierCurveTo(t,e,n,i,r,s),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t){function e(t,e){const n=e.length;let i=!1;for(let r=n-1,s=0;sNumber.EPSILON){if(l<0&&(n=e[s],o=-o,a=e[r],l=-l),t.ya.y)continue;if(t.y===n.y){if(t.x===n.x)return!0}else{const e=l*(t.x-n.x)-o*(t.y-n.y);if(0===e)return!0;if(e<0)continue;i=!i}}else{if(t.y!==n.y)continue;if(a.x<=t.x&&t.x<=n.x||n.x<=t.x&&t.x<=a.x)return!0}}return i}const n=Xu.isClockWise,i=this.subPaths;if(0===i.length)return[];let r,s,a;const o=[];if(1===i.length)return s=i[0],a=new xu,a.curves=s.curves,o.push(a),o;let l=!n(i[0].getPoints());l=t?!l:l;const c=[],h=[];let u,d,p=[],m=0;h[m]=void 0,p[m]=[];for(let e=0,a=i.length;e1){let t=!1,n=0;for(let t=0,e=h.length;t0&&!1===t&&(p=c)}for(let t=0,e=h.length;t":{"x_min":60,"x_max":705,"ha":765,"o":"m 60 300 l 496 490 l 60 705 l 60 868 l 705 531 l 705 434 l 60 138 l 60 300 "},"τ":{"x_min":27,"x_max":666.140625,"ha":720,"o":"m 424 604 l 424 238 q 446 173 424 194 q 503 152 468 152 q 561 158 534 152 q 618 175 589 165 l 618 20 q 545 -4 588 5 q 451 -14 502 -14 q 359 -2 402 -14 q 285 38 316 9 q 236 115 254 67 q 218 237 218 164 l 218 604 l 27 604 l 27 689 l 140 758 l 666 758 l 666 604 l 424 604 "},"Ų":{"x_min":118,"x_max":876,"ha":994,"o":"m 876 992 l 876 349 q 852 205 876 272 q 781 90 829 139 q 661 13 733 41 q 492 -14 589 -14 q 331 12 401 -14 q 213 86 261 38 q 142 202 166 134 q 118 352 118 269 l 118 992 l 328 992 l 328 367 q 339 272 328 311 q 371 208 349 233 q 424 172 392 184 q 498 160 455 160 q 626 212 586 160 q 665 368 665 264 l 665 992 l 876 992 m 514 -154 q 529 -196 514 -182 q 568 -209 544 -209 q 611 -205 589 -209 q 646 -197 632 -201 l 646 -318 q 599 -329 624 -324 q 540 -334 574 -334 q 469 -322 501 -334 q 416 -290 438 -310 q 382 -241 394 -269 q 371 -177 371 -212 q 380 -124 371 -148 q 406 -78 389 -99 q 445 -38 423 -57 q 493 0 467 -19 l 614 0 q 540 -81 567 -44 q 514 -154 514 -118 "},"Ŵ":{"x_min":-0.25,"x_max":1287.25,"ha":1287,"o":"m 1048 0 l 809 0 l 687 489 q 681 517 684 499 q 672 559 677 536 q 663 607 667 582 q 654 656 658 632 q 647 700 650 679 q 642 732 644 720 q 638 700 641 720 q 631 656 635 679 q 622 608 627 633 q 613 559 618 582 q 605 517 609 536 q 598 487 601 498 l 477 0 l 238 0 l 0 992 l 206 992 l 319 450 q 325 418 321 439 q 333 372 328 398 q 343 318 338 346 q 353 262 348 289 q 361 211 357 235 q 368 173 366 188 q 373 211 370 188 q 381 260 377 234 q 390 314 385 286 q 399 366 395 342 q 407 409 404 390 q 413 436 411 428 l 551 992 l 735 992 l 873 436 q 879 409 875 428 q 887 366 882 390 q 896 314 891 342 q 905 260 901 286 q 913 211 910 234 q 919 173 917 188 q 925 211 921 188 q 933 262 929 235 q 943 318 938 289 q 953 372 948 346 q 962 418 958 398 q 967 450 965 439 l 1080 992 l 1287 992 l 1048 0 m 785 1071 q 713 1123 750 1093 q 640 1189 675 1152 q 568 1123 603 1152 q 498 1071 533 1093 l 361 1071 l 361 1089 q 400 1134 378 1108 q 443 1187 421 1160 q 485 1242 465 1215 q 521 1293 506 1269 l 762 1293 q 797 1242 777 1269 q 839 1187 817 1215 q 883 1134 861 1160 q 923 1089 906 1108 l 923 1071 l 785 1071 "},"‛":{"x_min":16,"x_max":284,"ha":298,"o":"m 215 992 q 228 913 220 956 q 244 827 235 871 q 263 737 254 782 q 284 652 273 692 l 135 652 q 100 731 118 690 q 67 815 83 772 q 38 898 51 857 q 16 977 25 939 l 25 992 l 215 992 "},"Ð":{"x_min":32.078125,"x_max":892,"ha":973,"o":"m 32 577 l 125 577 l 125 992 l 415 992 q 612 960 524 992 q 762 868 700 929 q 858 715 824 806 q 892 505 892 624 q 857 285 892 379 q 758 127 823 190 q 600 31 693 63 q 386 0 506 0 l 125 0 l 125 402 l 32 402 l 32 577 m 681 499 q 665 641 681 581 q 616 740 648 701 q 538 798 584 779 q 432 817 492 817 l 335 817 l 335 577 l 495 577 l 495 402 l 335 402 l 335 174 l 413 174 q 614 255 547 174 q 681 499 681 336 "},"Λ":{"x_min":-0.25,"x_max":847.25,"ha":847,"o":"m 469 597 q 459 637 466 610 q 446 696 453 664 q 433 761 439 728 q 423 815 427 793 q 414 760 420 793 q 401 695 408 728 q 389 636 395 663 q 380 597 383 609 l 212 0 l 0 0 l 308 992 l 537 992 l 847 0 l 634 0 l 469 597 "},"·":{"x_min":79,"x_max":316,"ha":396,"o":"m 79 489 q 88 543 79 521 q 113 579 97 565 q 151 598 129 592 q 198 605 173 605 q 243 598 221 605 q 280 579 264 592 q 306 543 297 565 q 316 489 316 521 q 306 437 316 458 q 280 401 297 415 q 243 380 264 386 q 198 374 221 374 q 151 380 173 374 q 113 401 129 386 q 88 437 97 415 q 79 489 79 458 "},"Х":{"x_min":-0.25,"x_max":871.25,"ha":871,"o":"m 871 0 l 631 0 l 428 375 l 224 0 l 0 0 l 301 511 l 20 992 l 252 992 l 438 635 l 620 992 l 847 992 l 563 500 l 871 0 "},"Υ":{"x_min":-0.25,"x_max":812.25,"ha":811,"o":"m 406 583 l 585 992 l 812 992 l 511 385 l 511 0 l 301 0 l 301 379 l 0 992 l 227 992 l 406 583 "},"r":{"x_min":109,"x_max":570,"ha":603,"o":"m 504 773 q 522 772 512 773 q 541 771 532 772 q 558 769 550 770 q 570 766 565 768 l 570 572 q 555 575 564 574 q 535 578 545 576 q 514 579 524 579 q 497 579 504 579 q 423 569 457 579 q 366 536 390 559 q 329 476 342 513 q 315 386 315 439 l 315 0 l 109 0 l 109 758 l 265 758 l 296 644 l 306 644 q 341 697 322 673 q 383 738 360 721 q 436 763 407 754 q 504 773 466 773 "},"ж":{"x_min":-0.25,"x_max":1171.25,"ha":1171,"o":"m 489 389 l 489 758 l 695 758 l 695 389 l 930 758 l 1145 758 l 900 394 l 1171 0 l 950 0 l 695 384 l 695 0 l 489 0 l 489 384 l 220 0 l 0 0 l 284 394 l 25 758 l 239 758 l 489 389 "},"Ø":{"x_min":81,"x_max":970,"ha":1050,"o":"m 970 496 q 943 287 970 382 q 861 126 916 193 q 722 22 806 59 q 525 -14 639 -14 q 316 27 403 -14 l 268 -51 l 154 11 l 209 102 q 112 270 144 170 q 81 498 81 371 q 107 707 81 613 q 189 867 134 801 q 328 970 244 934 q 526 1007 411 1007 q 640 995 588 1007 q 737 963 693 984 l 784 1038 l 897 973 l 843 886 q 938 720 906 819 q 970 496 970 621 m 297 496 q 329 296 297 374 l 639 802 q 526 832 592 832 q 424 808 467 832 q 352 742 380 785 q 310 636 324 699 q 297 496 297 574 m 753 496 q 724 691 753 612 l 415 188 q 465 169 438 175 q 525 162 492 162 q 629 185 585 162 q 699 251 672 208 q 740 356 727 294 q 753 496 753 418 "},"Ỳ":{"x_min":-0.25,"x_max":812.25,"ha":811,"o":"m 406 583 l 585 992 l 812 992 l 511 385 l 511 0 l 301 0 l 301 379 l 0 992 l 227 992 l 406 583 m 362 1071 q 307 1118 339 1089 q 243 1175 274 1146 q 186 1233 212 1205 q 150 1278 160 1260 l 150 1293 l 381 1293 q 407 1242 392 1269 q 437 1187 421 1215 q 469 1134 453 1160 q 500 1089 485 1108 l 500 1071 l 362 1071 "},"÷":{"x_min":60,"x_max":705,"ha":765,"o":"m 60 415 l 60 564 l 705 564 l 705 415 l 60 415 m 288 224 q 295 259 288 245 q 315 282 302 273 q 346 294 328 290 q 382 298 363 298 q 418 294 401 298 q 448 282 435 290 q 469 259 461 273 q 477 224 477 245 q 469 190 477 204 q 448 167 461 176 q 418 154 435 158 q 382 150 401 150 q 346 154 363 150 q 315 167 328 158 q 295 190 302 176 q 288 224 288 204 m 288 754 q 295 789 288 775 q 315 812 302 803 q 346 825 328 821 q 382 829 363 829 q 418 825 401 829 q 448 812 435 821 q 469 789 461 803 q 477 754 477 775 q 469 720 477 734 q 448 697 461 706 q 418 684 435 688 q 382 680 401 680 q 346 684 363 680 q 315 697 328 688 q 295 720 302 706 q 288 754 288 734 "},"с":{"x_min":69,"x_max":648.703125,"ha":693,"o":"m 424 -14 q 277 8 342 -14 q 165 78 211 30 q 93 198 118 125 q 69 375 69 272 q 94 564 69 488 q 166 687 119 641 q 278 753 212 733 q 424 773 343 773 q 540 758 482 773 q 648 718 597 744 l 588 562 q 502 594 544 581 q 423 606 461 606 q 314 549 348 606 q 280 376 280 491 q 314 206 280 261 q 421 152 348 152 q 528 167 480 152 q 627 206 576 182 l 627 35 q 578 13 601 23 q 530 -1 554 4 q 480 -10 506 -7 q 424 -14 453 -14 "},"h":{"x_min":109,"x_max":767,"ha":871,"o":"m 767 0 l 560 0 l 560 442 q 534 565 560 524 q 456 606 509 606 q 389 590 416 606 q 345 542 362 574 q 322 463 329 510 q 315 356 315 416 l 315 0 l 109 0 l 109 1055 l 315 1055 l 315 840 q 314 780 315 811 q 311 722 313 748 q 306 661 308 690 l 317 661 q 402 746 350 720 q 518 773 453 773 q 620 757 575 773 q 699 707 666 741 q 749 620 731 673 q 767 494 767 568 l 767 0 "},"f":{"x_min":28,"x_max":570,"ha":538,"o":"m 503 604 l 348 604 l 348 0 l 142 0 l 142 604 l 28 604 l 28 703 l 142 758 l 142 813 q 159 934 142 886 q 209 1010 177 982 q 288 1051 242 1039 q 392 1063 334 1063 q 497 1053 454 1063 q 570 1030 540 1043 l 521 877 q 477 890 500 884 q 422 896 454 896 q 365 871 382 896 q 348 804 348 845 l 348 758 l 503 758 l 503 604 "},"“":{"x_min":16,"x_max":601,"ha":615,"o":"m 332 666 q 355 744 341 703 q 384 828 368 786 q 417 912 400 870 q 452 992 435 954 l 601 992 q 580 905 590 950 q 561 816 570 861 q 545 730 552 772 q 532 652 537 687 l 342 652 l 332 666 m 16 666 q 38 744 25 703 q 67 828 51 786 q 100 912 83 870 q 135 992 118 954 l 284 992 q 263 905 273 950 q 244 816 254 861 q 228 730 235 772 q 215 652 220 687 l 25 652 l 16 666 "},"A":{"x_min":-0.25,"x_max":903.25,"ha":903,"o":"m 690 0 l 623 238 l 280 238 l 212 0 l 0 0 l 322 996 l 579 996 l 903 0 l 690 0 m 574 413 l 510 629 q 498 669 506 642 q 480 731 489 697 q 463 798 471 764 q 451 856 455 832 q 444 821 449 841 q 434 778 440 800 q 422 732 428 755 q 411 688 416 709 q 401 652 405 668 q 394 629 396 637 l 331 413 l 574 413 "},"O":{"x_min":81,"x_max":970,"ha":1050,"o":"m 970 496 q 943 287 970 382 q 861 126 916 193 q 722 22 806 59 q 525 -14 639 -14 q 327 22 411 -14 q 189 126 243 59 q 107 288 134 193 q 81 498 81 382 q 107 707 81 613 q 189 867 134 801 q 328 970 244 934 q 526 1007 411 1007 q 723 970 640 1007 q 861 867 807 934 q 943 706 916 800 q 970 496 970 612 m 297 496 q 310 355 297 417 q 352 250 324 293 q 423 184 380 207 q 525 160 466 160 q 629 184 585 160 q 699 250 672 207 q 740 355 727 293 q 753 496 753 417 q 740 636 753 574 q 699 742 727 698 q 629 808 672 785 q 526 832 586 832 q 424 808 467 832 q 352 742 380 785 q 310 636 324 698 q 297 496 297 574 "},"Đ":{"x_min":32.078125,"x_max":892,"ha":973,"o":"m 32 577 l 125 577 l 125 992 l 415 992 q 612 960 524 992 q 762 868 700 929 q 858 715 824 806 q 892 505 892 624 q 857 285 892 379 q 758 127 823 190 q 600 31 693 63 q 386 0 506 0 l 125 0 l 125 402 l 32 402 l 32 577 m 681 499 q 665 641 681 581 q 616 740 648 701 q 538 798 584 779 q 432 817 492 817 l 335 817 l 335 577 l 495 577 l 495 402 l 335 402 l 335 174 l 413 174 q 614 255 547 174 q 681 499 681 336 "},"3":{"x_min":39,"x_max":711,"ha":765,"o":"m 682 768 q 665 675 682 717 q 619 603 648 634 q 552 551 591 572 q 467 520 513 531 l 467 516 q 649 443 587 501 q 711 287 711 385 q 687 167 711 222 q 615 71 664 112 q 493 8 567 31 q 320 -14 420 -14 q 170 0 240 -14 q 39 39 99 12 l 39 217 q 103 188 69 200 q 171 166 137 175 q 237 153 204 157 q 299 148 270 148 q 396 159 357 148 q 458 190 435 170 q 490 237 481 210 q 500 298 500 265 q 488 353 500 329 q 447 396 475 378 q 374 423 419 413 q 262 432 328 432 l 192 432 l 192 580 l 260 580 q 362 591 321 580 q 427 622 402 602 q 461 667 451 641 q 471 722 471 693 q 439 806 471 776 q 336 836 406 836 q 276 829 304 836 q 224 813 248 823 q 180 792 200 803 q 145 768 161 780 l 40 908 q 102 946 68 929 q 175 977 135 964 q 259 998 214 991 q 356 1006 305 1006 q 489 989 429 1006 q 592 943 549 973 q 658 869 635 913 q 682 768 682 825 "},"Ǿ":{"x_min":81,"x_max":970,"ha":1050,"o":"m 970 496 q 943 287 970 382 q 861 126 916 193 q 722 22 806 59 q 525 -14 639 -14 q 316 27 403 -14 l 268 -51 l 154 11 l 209 102 q 112 270 144 170 q 81 498 81 371 q 107 707 81 613 q 189 867 134 801 q 328 970 244 934 q 526 1007 411 1007 q 640 995 588 1007 q 737 963 693 984 l 784 1038 l 897 973 l 843 886 q 938 720 906 819 q 970 496 970 621 m 297 496 q 329 296 297 374 l 639 802 q 526 832 592 832 q 424 808 467 832 q 352 742 380 785 q 310 636 324 699 q 297 496 297 574 m 753 496 q 724 691 753 612 l 415 188 q 465 169 438 175 q 525 162 492 162 q 629 185 585 162 q 699 251 672 208 q 740 356 727 294 q 753 496 753 418 m 400 1071 l 400 1089 q 430 1134 414 1108 q 462 1187 446 1160 q 492 1242 478 1215 q 518 1293 507 1269 l 750 1293 l 750 1278 q 728 1250 742 1266 q 695 1214 714 1233 q 656 1175 677 1195 q 614 1136 635 1155 q 572 1100 592 1117 q 537 1071 553 1083 l 400 1071 "},"⅛":{"x_min":40,"x_max":1159,"ha":1224,"o":"m 373 397 l 212 397 l 212 700 q 212 734 212 713 q 213 776 212 755 q 215 814 214 797 q 217 840 216 832 q 206 828 213 835 q 193 813 200 820 q 179 799 186 805 q 166 787 172 792 l 113 746 l 40 832 l 243 992 l 373 992 l 373 397 m 913 992 l 362 0 l 200 0 l 751 992 l 913 992 m 927 607 q 1009 597 971 607 q 1076 569 1047 588 q 1120 523 1104 551 q 1137 458 1137 495 q 1129 413 1137 434 q 1108 376 1122 393 q 1078 347 1095 360 q 1040 323 1060 334 q 1084 295 1063 309 q 1122 263 1105 281 q 1148 221 1138 244 q 1159 169 1159 198 q 1142 95 1159 129 q 1095 36 1125 61 q 1022 -2 1064 11 q 927 -16 979 -16 q 827 -2 870 -16 q 754 34 784 10 q 710 92 725 58 q 695 165 695 126 q 703 218 695 195 q 727 259 712 241 q 761 291 741 277 q 801 317 780 305 q 768 345 783 330 q 740 376 752 359 q 722 414 728 393 q 716 458 716 434 q 732 523 716 495 q 778 569 749 550 q 845 597 807 587 q 927 607 884 607 m 842 169 q 863 114 842 135 q 925 92 884 92 q 989 114 967 92 q 1011 169 1011 135 q 988 223 1011 201 q 924 261 965 246 l 915 264 q 861 226 880 248 q 842 169 842 203 m 925 498 q 879 482 895 498 q 863 447 863 467 q 882 403 863 420 q 927 373 900 387 q 951 386 940 379 q 971 402 963 393 q 984 422 979 411 q 989 447 989 433 q 974 482 989 467 q 925 498 959 498 "},"4":{"x_min":3,"x_max":741.625,"ha":765,"o":"m 741 205 l 622 205 l 622 0 l 412 0 l 412 205 l 3 205 l 3 351 l 423 992 l 622 992 l 622 368 l 741 368 l 741 205 m 412 368 l 412 536 q 412 562 412 545 q 413 599 412 578 q 415 643 414 620 q 417 686 416 665 q 419 721 418 706 q 420 743 420 736 l 414 743 q 387 683 402 715 q 352 619 372 651 l 187 368 l 412 368 "},"Ẁ":{"x_min":-0.25,"x_max":1287.25,"ha":1287,"o":"m 1048 0 l 809 0 l 687 489 q 681 517 684 499 q 672 559 677 536 q 663 607 667 582 q 654 656 658 632 q 647 700 650 679 q 642 732 644 720 q 638 700 641 720 q 631 656 635 679 q 622 608 627 633 q 613 559 618 582 q 605 517 609 536 q 598 487 601 498 l 477 0 l 238 0 l 0 992 l 206 992 l 319 450 q 325 418 321 439 q 333 372 328 398 q 343 318 338 346 q 353 262 348 289 q 361 211 357 235 q 368 173 366 188 q 373 211 370 188 q 381 260 377 234 q 390 314 385 286 q 399 366 395 342 q 407 409 404 390 q 413 436 411 428 l 551 992 l 735 992 l 873 436 q 879 409 875 428 q 887 366 882 390 q 896 314 891 342 q 905 260 901 286 q 913 211 910 234 q 919 173 917 188 q 925 211 921 188 q 933 262 929 235 q 943 318 938 289 q 953 372 948 346 q 962 418 958 398 q 967 450 965 439 l 1080 992 l 1287 992 l 1048 0 m 594 1071 q 539 1118 571 1089 q 475 1175 506 1146 q 418 1233 444 1205 q 382 1278 392 1260 l 382 1293 l 613 1293 q 639 1242 624 1269 q 669 1187 653 1215 q 701 1134 685 1160 q 732 1089 717 1108 l 732 1071 l 594 1071 "},"Ť":{"x_min":28,"x_max":735,"ha":762,"o":"m 487 0 l 277 0 l 277 817 l 28 817 l 28 992 l 735 992 l 735 817 l 487 817 l 487 0 m 664 1274 q 624 1229 647 1255 q 580 1176 602 1203 q 538 1121 558 1148 q 503 1071 518 1094 l 262 1071 q 226 1121 247 1094 q 184 1176 206 1148 q 141 1229 162 1203 q 102 1274 119 1255 l 102 1293 l 239 1293 q 309 1240 274 1270 q 381 1174 344 1211 q 454 1240 416 1211 q 526 1293 491 1270 l 664 1293 l 664 1274 "},"ψ":{"x_min":97,"x_max":1047,"ha":1128,"o":"m 662 1054 l 662 142 q 747 162 711 148 q 806 205 782 177 q 841 278 829 234 q 852 389 852 323 q 837 571 852 481 q 798 758 821 661 l 993 758 q 1034 571 1021 660 q 1047 389 1047 482 q 1017 208 1047 283 q 935 86 987 134 q 813 16 883 39 q 662 -12 743 -7 l 662 -334 l 468 -334 l 468 -12 q 318 12 387 -9 q 201 80 250 34 q 124 199 152 126 q 97 376 97 272 l 97 758 l 291 758 l 291 368 q 300 267 291 308 q 330 199 309 225 q 384 159 351 172 q 468 141 418 145 l 468 1054 l 662 1054 "},"ŗ":{"x_min":77,"x_max":570,"ha":603,"o":"m 504 773 q 522 772 512 773 q 541 771 532 772 q 558 769 550 770 q 570 766 565 768 l 570 572 q 555 575 564 574 q 535 578 545 576 q 514 579 524 579 q 497 579 504 579 q 423 569 457 579 q 366 536 390 559 q 329 476 342 513 q 315 386 315 439 l 315 0 l 109 0 l 109 758 l 265 758 l 296 644 l 306 644 q 341 697 322 673 q 383 738 360 721 q 436 763 407 754 q 504 773 466 773 m 77 -288 q 89 -242 83 -268 q 100 -188 95 -216 q 111 -134 106 -161 q 118 -85 116 -107 l 310 -85 l 310 -98 q 261 -198 289 -145 q 197 -307 233 -251 l 77 -307 l 77 -288 "}},"cssFontWeight":"bold","ascender":1290,"underlinePosition":-154,"cssFontStyle":"normal","boundingBox":{"yMin":-407,"xMin":-269,"yMax":1391,"xMax":1695},"resolution":1000,"original_font_information":{"postscript_name":"DroidSans-Bold","version_string":"Version 1.00 build 107","vendor_url":"http://www.ascendercorp.com/","full_font_name":"Droid Sans Bold","font_family_name":"Droid Sans","copyright":"Digitized data copyright © 2006, Google Corporation.","description":"Droid Sans is a humanist sans serif typeface designed for user interfaces and electronic communication.","trademark":"Droid is a trademark of Google and may be registered in certain jurisdictions.","designer":"","designer_url":"http://www.ascendercorp.com/typedesigners.html","unique_font_identifier":"Ascender - Droid Sans Bold","license_url":"http://ascendercorp.com/eula10.html","license_description":"This font software is the valuable property of Ascender Corporation and/or its suppliers and its use by you is covered under the terms of a license agreement. This font software is licensed to you by Ascender Corporation for your personal or business use on up to five personal computers. You may not use this font software on more than five personal computers unless you have obtained a license from Ascender to do so. Except as specifically permitted by the license, you may not copy this font software.\n\nIf you have any questions, please review the license agreement you received with this font software, and/or contact Ascender Corporation. \n\nContact Information:\nAscender Corporation\nWeb http://www.ascendercorp.com/","manufacturer_name":"Ascender Corporation","font_sub_family_name":"Bold"},"descender":-328,"familyName":"Droid Sans","lineHeight":1617,"underlineThickness":102} \ No newline at end of file diff --git a/node_modules/three/examples/fonts/droid/droid_sans_mono_regular.typeface.json b/node_modules/three/examples/fonts/droid/droid_sans_mono_regular.typeface.json new file mode 100644 index 0000000..2678aab --- /dev/null +++ b/node_modules/three/examples/fonts/droid/droid_sans_mono_regular.typeface.json @@ -0,0 +1 @@ +{"glyphs":{"ǻ":{"x_min":92,"x_max":696,"ha":834,"o":"m 606 0 l 580 99 l 575 99 q 468 10 523 35 q 327 -14 413 -14 q 154 44 217 -14 q 92 207 92 102 q 436 442 92 431 l 573 447 l 573 494 q 409 655 573 655 q 187 599 309 655 l 144 692 q 404 758 277 758 q 627 699 558 758 q 696 509 696 640 l 696 0 l 606 0 m 572 362 l 462 357 q 274 315 330 352 q 219 204 219 279 q 354 82 219 82 q 513 138 454 82 q 572 294 572 194 l 572 362 m 414 842 q 304 881 345 842 q 263 988 263 920 q 304 1094 263 1055 q 414 1134 345 1134 q 526 1093 482 1134 q 570 989 570 1053 q 526 882 570 922 q 414 842 483 842 m 416 1064 q 359 1044 381 1064 q 337 988 337 1024 q 416 911 337 911 q 473 931 451 911 q 495 988 495 951 q 473 1044 495 1024 q 416 1064 451 1064 m 347 1185 q 465 1389 411 1275 l 614 1389 l 614 1374 q 429 1167 537 1257 l 347 1167 l 347 1185 "},"Á":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 m 353 1089 q 471 1293 417 1179 l 620 1293 l 620 1278 q 435 1071 543 1161 l 353 1071 l 353 1089 "},"ĥ":{"x_min":109,"x_max":725,"ha":834,"o":"m 601 0 l 601 479 q 440 655 601 655 q 232 385 232 655 l 232 0 l 109 0 l 109 1055 l 232 1055 l 232 741 l 227 644 l 233 644 q 461 758 303 758 q 725 486 725 758 l 725 0 l 601 0 m 652 1109 l 569 1109 q 426 1234 512 1146 q 283 1109 336 1142 l 202 1109 l 202 1127 q 242 1172 218 1146 q 361 1331 336 1277 l 492 1331 q 611 1172 517 1277 l 652 1127 l 652 1109 "},"Κ":{"x_min":143,"x_max":813.25,"ha":834,"o":"m 813 0 l 669 0 l 364 473 l 269 396 l 269 0 l 143 0 l 143 992 l 269 992 l 269 496 l 351 609 l 659 992 l 801 992 l 447 559 l 813 0 "},"»":{"x_min":134,"x_max":699,"ha":834,"o":"m 699 356 l 489 78 l 410 130 l 571 366 l 410 602 l 489 655 l 699 374 l 699 356 m 423 356 l 212 78 l 134 130 l 295 366 l 134 602 l 212 655 l 423 374 l 423 356 "},"∆":{"x_min":50,"x_max":784,"ha":834,"o":"m 50 76 l 353 992 l 479 992 l 784 75 l 784 0 l 50 0 l 50 76 m 478 625 q 415 856 438 749 q 355 629 384 720 l 185 111 l 646 111 l 478 625 "},"ў":{"x_min":56,"x_max":777,"ha":834,"o":"m 56 745 l 183 745 l 361 301 q 421 104 416 162 l 425 104 q 486 302 441 180 l 648 745 l 777 745 l 454 -97 q 348 -274 409 -215 q 181 -334 288 -334 q 68 -322 123 -334 l 68 -224 q 160 -231 110 -231 q 261 -203 225 -231 q 326 -108 298 -176 l 365 -7 l 56 745 m 684 1058 q 419 842 670 842 q 229 892 287 842 q 164 1058 170 942 l 280 1058 q 314 959 286 988 q 424 930 343 930 q 567 1058 555 930 l 684 1058 "},"ţ":{"x_min":95,"x_max":696,"ha":834,"o":"m 692 101 l 692 7 q 521 -14 603 -14 q 276 218 276 -14 l 276 648 l 95 648 l 95 715 l 276 749 l 328 943 l 399 943 l 399 745 l 696 745 l 696 648 l 399 648 l 399 219 q 529 88 399 88 q 692 101 592 88 m 332 -288 q 389 -85 374 -193 l 510 -85 l 510 -98 q 477 -182 510 -113 q 399 -307 444 -251 l 332 -307 l 332 -288 "},"«":{"x_min":134,"x_max":699,"ha":834,"o":"m 134 374 l 343 655 l 423 602 l 261 366 l 423 130 l 343 78 l 134 356 l 134 374 m 410 374 l 619 655 l 699 602 l 537 366 l 699 130 l 619 78 l 410 356 l 410 374 "},"í":{"x_min":133.6875,"x_max":729.171875,"ha":834,"o":"m 367 648 l 184 662 l 184 745 l 490 745 l 490 96 l 729 83 l 729 0 l 133 0 l 133 83 l 367 96 l 367 648 m 360 860 q 478 1064 424 950 l 627 1064 l 627 1049 q 442 842 550 932 l 360 842 l 360 860 "},"ņ":{"x_min":109,"x_max":725,"ha":834,"o":"m 601 0 l 601 479 q 440 655 601 655 q 232 385 232 655 l 232 0 l 109 0 l 109 745 l 208 745 l 227 644 l 233 644 q 461 758 303 758 q 725 486 725 758 l 725 0 l 601 0 m 309 -288 q 366 -85 351 -193 l 487 -85 l 487 -98 q 454 -182 487 -113 q 376 -307 421 -251 l 309 -307 l 309 -288 "},"µ":{"x_min":122,"x_max":712,"ha":834,"o":"m 245 264 q 393 88 245 88 q 541 150 494 88 q 588 357 588 211 l 588 745 l 712 745 l 712 0 l 612 0 l 593 99 l 587 99 q 386 -14 521 -14 q 241 45 291 -14 q 245 -117 245 -58 l 245 -334 l 122 -334 l 122 745 l 245 745 l 245 264 "},"ỳ":{"x_min":56,"x_max":777,"ha":834,"o":"m 56 745 l 183 745 l 361 301 q 421 104 416 162 l 425 104 q 486 302 441 180 l 648 745 l 777 745 l 454 -97 q 348 -274 409 -215 q 181 -334 288 -334 q 68 -322 123 -334 l 68 -224 q 160 -231 110 -231 q 261 -203 225 -231 q 326 -108 298 -176 l 365 -7 l 56 745 m 480 842 l 397 842 q 213 1049 285 938 l 213 1064 l 361 1064 q 480 860 420 943 l 480 842 "},"Ι":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 "},"Ύ":{"x_min":-160,"x_max":809,"ha":834,"o":"m 415 490 l 672 992 l 809 992 l 479 386 l 479 0 l 353 0 l 353 379 l 23 992 l 160 992 l 415 490 m -160 789 l -137 861 q -108 993 -115 938 l 22 993 l 22 978 q -11 897 22 967 q -86 771 -44 827 l -160 771 l -160 789 "},"ѕ":{"x_min":138,"x_max":696,"ha":834,"o":"m 138 32 l 138 145 q 388 88 268 88 q 575 196 575 88 q 542 264 575 235 q 388 336 508 292 q 190 444 231 395 q 149 560 149 493 q 224 705 149 652 q 433 758 300 758 q 684 707 568 758 l 643 606 q 428 655 520 655 q 269 565 269 655 q 303 499 269 523 q 460 430 337 474 q 649 327 602 378 q 696 203 696 277 q 616 44 696 102 q 392 -14 537 -14 q 138 32 224 -14 "},"Ш":{"x_min":82,"x_max":753,"ha":834,"o":"m 753 0 l 82 0 l 82 992 l 208 992 l 208 111 l 354 111 l 354 992 l 480 992 l 480 111 l 626 111 l 626 992 l 753 992 l 753 0 "},"M":{"x_min":77,"x_max":757,"ha":834,"o":"m 361 0 l 173 868 l 167 868 q 180 592 180 687 l 180 0 l 77 0 l 77 992 l 244 992 l 412 183 l 416 183 l 586 992 l 757 992 l 757 0 l 653 0 l 653 601 q 663 866 653 670 l 657 866 l 466 0 l 361 0 "},"Ψ":{"x_min":39,"x_max":797,"ha":834,"o":"m 797 667 q 720 387 797 472 q 494 303 644 303 l 483 303 l 483 0 l 357 0 l 357 303 l 346 303 q 115 388 192 303 q 39 664 39 473 l 39 992 l 165 992 l 165 667 q 208 460 165 511 q 346 410 252 410 l 357 410 l 357 992 l 483 992 l 483 410 l 493 410 q 628 459 585 410 q 670 664 670 508 l 670 992 l 797 992 l 797 667 "},"ũ":{"x_min":109,"x_max":725,"ha":834,"o":"m 625 0 l 607 99 l 600 99 q 373 -14 529 -14 q 109 258 109 -14 l 109 745 l 232 745 l 232 264 q 392 88 232 88 q 551 151 501 88 q 601 357 601 214 l 601 745 l 725 745 l 725 0 l 625 0 m 245 841 l 174 841 q 317 1021 190 1021 q 426 982 356 1021 q 518 944 495 944 q 590 1022 573 944 l 662 1022 q 519 843 643 843 q 412 881 480 843 q 317 919 344 919 q 245 841 262 919 "},"ŭ":{"x_min":109,"x_max":725,"ha":834,"o":"m 625 0 l 607 99 l 600 99 q 373 -14 529 -14 q 109 258 109 -14 l 109 745 l 232 745 l 232 264 q 392 88 232 88 q 551 151 501 88 q 601 357 601 214 l 601 745 l 725 745 l 725 0 l 625 0 m 621 1030 q 560 892 614 943 q 414 842 506 842 q 213 1030 224 842 l 287 1030 q 319 960 292 977 q 416 943 346 943 q 546 1030 539 943 l 621 1030 "},"―":{"x_min":-4,"x_max":838,"ha":834,"o":"m -4 315 l -4 429 l 838 429 l 838 315 l -4 315 "},"{":{"x_min":153,"x_max":679,"ha":834,"o":"m 505 -10 q 543 -91 505 -65 q 679 -118 581 -116 l 679 -220 q 382 -19 382 -215 l 382 208 q 153 337 382 337 l 153 439 q 382 567 382 439 l 382 793 q 679 992 382 987 l 679 890 q 543 863 581 888 q 505 783 505 838 l 505 559 q 347 391 505 419 l 347 383 q 505 214 505 355 l 505 -10 "},"¼":{"x_min":15,"x_max":823.71875,"ha":834,"o":"m 163 990 l 257 990 l 257 456 l 156 456 l 156 771 q 162 906 156 817 q 111 862 134 876 l 64 828 l 15 887 l 163 990 m 717 992 l 222 0 l 115 0 l 609 992 l 717 992 m 823 117 l 766 117 l 766 0 l 665 0 l 665 117 l 411 117 l 411 184 l 666 539 l 766 539 l 766 195 l 823 195 l 823 117 m 665 195 l 665 314 q 669 430 665 369 q 614 341 641 381 l 509 195 l 665 195 "},"Ḿ":{"x_min":77,"x_max":757,"ha":834,"o":"m 361 0 l 173 868 l 167 868 q 180 592 180 687 l 180 0 l 77 0 l 77 992 l 244 992 l 412 183 l 416 183 l 586 992 l 757 992 l 757 0 l 653 0 l 653 601 q 663 866 653 670 l 657 866 l 466 0 l 361 0 m 352 1091 q 470 1295 416 1181 l 619 1295 l 619 1280 q 434 1073 542 1163 l 352 1073 l 352 1091 "},"ι":{"x_min":290,"x_max":690,"ha":834,"o":"m 413 745 l 413 220 q 544 88 413 88 q 690 101 621 88 l 690 7 q 536 -14 626 -14 q 290 219 290 -14 l 290 745 l 413 745 "},"IJ":{"x_min":106,"x_max":719,"ha":834,"o":"m 106 0 l 106 992 l 232 992 l 232 0 l 106 0 m 334 15 l 334 125 q 460 93 397 93 q 592 286 592 93 l 592 992 l 719 992 l 719 295 q 471 -14 719 -14 q 334 15 380 -14 "},"Ê":{"x_min":147,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 m 666 1071 l 583 1071 q 440 1196 526 1108 q 297 1071 350 1104 l 216 1071 l 216 1089 q 256 1134 232 1108 q 375 1293 350 1239 l 506 1293 q 625 1134 531 1239 l 666 1089 l 666 1071 "},"Ά":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 m 25 789 l 47 861 q 76 993 69 938 l 207 993 l 207 978 q 173 897 207 967 q 98 771 140 827 l 25 771 l 25 789 "},")":{"x_min":201,"x_max":634,"ha":834,"o":"m 331 -220 l 202 -220 q 506 386 506 31 q 201 992 506 737 l 331 992 q 634 384 634 747 q 331 -220 634 18 "},"ε":{"x_min":136,"x_max":700.703125,"ha":834,"o":"m 570 439 l 570 336 l 462 336 q 259 210 259 336 q 450 88 259 88 q 698 145 583 88 l 698 36 q 441 -14 606 -14 q 217 43 298 -14 q 136 203 136 100 q 297 385 136 334 l 297 392 q 160 561 160 437 q 236 705 160 652 q 440 758 312 758 q 700 706 587 758 l 658 606 q 446 655 550 655 q 283 551 283 655 q 467 439 283 439 l 570 439 "},"э":{"x_min":124.9375,"x_max":720,"ha":834,"o":"m 129 27 l 129 135 q 343 93 239 93 q 592 326 580 93 l 228 326 l 228 434 l 591 434 q 344 650 572 650 q 166 610 271 650 l 124 717 q 350 758 228 758 q 625 658 531 758 q 720 367 720 559 q 622 85 720 184 q 346 -14 525 -14 q 129 27 219 -14 "},"ш":{"x_min":85,"x_max":751,"ha":834,"o":"m 470 102 l 645 102 l 645 745 l 751 745 l 751 0 l 85 0 l 85 745 l 190 745 l 190 102 l 365 102 l 365 745 l 470 745 l 470 102 "},"Я":{"x_min":38.75,"x_max":707,"ha":834,"o":"m 414 409 l 187 0 l 38 0 l 297 443 q 113 720 113 510 q 454 992 113 992 l 707 992 l 707 0 l 580 0 l 580 409 l 414 409 m 580 884 l 454 884 q 246 710 246 884 q 301 567 246 617 q 460 517 356 517 l 580 517 l 580 884 "},"a":{"x_min":92,"x_max":696,"ha":834,"o":"m 606 0 l 580 99 l 575 99 q 468 10 523 35 q 327 -14 413 -14 q 154 44 217 -14 q 92 207 92 102 q 436 442 92 431 l 573 447 l 573 494 q 409 655 573 655 q 187 599 309 655 l 144 692 q 404 758 277 758 q 627 699 558 758 q 696 509 696 640 l 696 0 l 606 0 m 572 362 l 462 357 q 274 315 330 352 q 219 204 219 279 q 354 82 219 82 q 513 138 454 82 q 572 294 572 194 l 572 362 "},"Ę":{"x_min":147,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 m 692 -217 l 692 -293 q 586 -309 642 -309 q 462 -271 505 -309 q 420 -171 420 -234 q 544 0 420 -73 l 636 0 q 517 -162 517 -85 q 606 -227 517 -227 q 692 -217 652 -227 "},"Z":{"x_min":69,"x_max":763,"ha":834,"o":"m 763 0 l 69 0 l 69 97 l 607 880 l 83 880 l 83 992 l 749 992 l 749 895 l 210 111 l 763 111 l 763 0 "}," ":{"x_min":0,"x_max":0,"ha":834},"k":{"x_min":146,"x_max":789,"ha":834,"o":"m 261 375 l 352 478 l 619 745 l 770 745 l 435 422 l 789 0 l 644 0 l 356 341 l 269 286 l 269 0 l 146 0 l 146 1055 l 269 1055 l 269 571 l 258 375 l 261 375 "},"Ù":{"x_min":85,"x_max":749,"ha":834,"o":"m 749 993 l 749 349 q 663 79 749 173 q 412 -14 578 -14 q 85 352 85 -14 l 85 991 l 211 991 l 211 359 q 419 97 211 97 q 622 361 619 97 l 622 993 l 749 993 m 504 1071 l 421 1071 q 237 1278 309 1167 l 237 1293 l 385 1293 q 504 1089 444 1172 l 504 1071 "},"Ů":{"x_min":85,"x_max":749,"ha":834,"o":"m 749 993 l 749 349 q 663 79 749 173 q 412 -14 578 -14 q 85 352 85 -14 l 85 991 l 211 991 l 211 359 q 419 97 211 97 q 622 361 619 97 l 622 993 l 749 993 m 415 1071 q 305 1110 346 1071 q 264 1217 264 1149 q 305 1323 264 1284 q 415 1363 346 1363 q 527 1322 483 1363 q 571 1218 571 1282 q 527 1111 571 1151 q 415 1071 484 1071 m 417 1293 q 360 1273 382 1293 q 338 1217 338 1253 q 417 1140 338 1140 q 474 1160 452 1140 q 496 1217 496 1180 q 474 1273 496 1253 q 417 1293 452 1293 "},"¢":{"x_min":117,"x_max":719.890625,"ha":834,"o":"m 531 894 q 719 854 627 892 l 677 747 q 496 786 576 786 q 244 505 244 786 q 489 229 244 229 q 707 271 593 229 l 707 163 q 531 122 635 124 l 531 -14 l 411 -14 l 411 126 q 117 503 117 172 q 411 889 117 838 l 411 1006 l 531 1006 l 531 894 "},"В":{"x_min":92,"x_max":772,"ha":834,"o":"m 92 992 l 390 992 q 660 932 576 992 q 744 740 744 873 q 690 596 744 653 q 546 526 637 538 l 546 519 q 772 287 772 482 q 685 76 772 153 q 449 0 598 0 l 92 0 l 92 992 m 218 572 l 409 572 q 562 609 514 572 q 610 732 610 646 q 558 848 610 813 q 395 884 507 884 l 218 884 l 218 572 m 218 464 l 218 107 l 426 107 q 638 292 638 107 q 418 464 638 464 l 218 464 "},"І":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 "},"ē":{"x_min":90,"x_max":744,"ha":834,"o":"m 744 346 l 217 346 q 451 93 222 93 q 703 145 584 93 l 703 36 q 456 -14 590 -14 q 189 87 289 -14 q 90 366 90 188 q 182 652 90 547 q 428 758 274 758 q 658 666 572 758 q 744 423 744 575 l 744 346 m 220 449 l 616 449 q 428 655 616 655 q 220 449 238 655 m 235 943 l 626 943 l 626 842 l 235 842 l 235 943 "},"β":{"x_min":107,"x_max":749,"ha":834,"o":"m 490 562 l 490 558 q 749 280 749 525 q 665 63 749 141 q 436 -14 582 -14 q 230 28 309 -14 l 230 -334 l 107 -334 l 107 743 q 187 979 107 896 q 409 1063 268 1063 q 623 991 543 1063 q 704 796 704 920 q 649 642 704 704 q 490 562 594 580 m 230 141 q 426 88 322 88 q 625 290 625 88 q 561 445 625 389 q 388 501 496 501 l 325 501 l 325 604 l 372 604 q 522 654 467 604 q 576 791 576 705 q 531 915 576 871 q 408 960 485 960 q 230 736 230 960 l 230 141 "},"≠":{"x_min":103,"x_max":730,"ha":834,"o":"m 271 300 l 103 300 l 103 401 l 318 401 l 401 577 l 103 577 l 103 679 l 448 679 l 539 870 l 632 830 l 560 679 l 730 679 l 730 577 l 513 577 l 430 401 l 730 401 l 730 300 l 382 300 l 294 111 l 202 150 l 271 300 "},"‼":{"x_min":173,"x_max":659.265625,"ha":834,"o":"m 615 280 l 533 280 l 498 992 l 649 992 l 615 280 m 573 168 q 659 74 659 168 q 573 -20 659 -20 q 487 74 487 -20 q 573 168 487 168 m 301 280 l 219 280 l 184 992 l 335 992 l 301 280 m 259 168 q 345 74 345 168 q 259 -20 345 -20 q 173 74 173 -20 q 259 168 173 168 "},"¥":{"x_min":54,"x_max":779,"ha":834,"o":"m 415 490 l 649 992 l 779 992 l 517 471 l 681 471 l 681 378 l 475 378 l 475 270 l 681 270 l 681 178 l 475 178 l 475 0 l 356 0 l 356 178 l 152 178 l 152 270 l 356 270 l 356 378 l 152 378 l 152 471 l 310 471 l 54 992 l 184 992 l 415 490 "},"Ĥ":{"x_min":92,"x_max":742,"ha":834,"o":"m 742 0 l 615 0 l 615 462 l 218 462 l 218 0 l 92 0 l 92 992 l 218 992 l 218 574 l 615 574 l 615 992 l 742 992 l 742 0 m 642 1071 l 559 1071 q 416 1196 502 1108 q 273 1071 326 1104 l 192 1071 l 192 1089 q 232 1134 208 1108 q 351 1293 326 1239 l 482 1293 q 601 1134 507 1239 l 642 1089 l 642 1071 "},"U":{"x_min":85,"x_max":749,"ha":834,"o":"m 749 993 l 749 349 q 663 79 749 173 q 412 -14 578 -14 q 85 352 85 -14 l 85 991 l 211 991 l 211 359 q 419 97 211 97 q 622 361 619 97 l 622 993 l 749 993 "},"Ñ":{"x_min":92,"x_max":741,"ha":834,"o":"m 741 0 l 596 0 l 201 821 l 196 821 q 208 538 208 633 l 208 0 l 92 0 l 92 992 l 236 992 l 629 174 l 633 174 q 624 449 624 380 l 624 992 l 741 992 l 741 0 m 246 1070 l 175 1070 q 318 1250 191 1250 q 427 1211 357 1250 q 519 1173 496 1173 q 591 1251 574 1173 l 663 1251 q 520 1072 644 1072 q 413 1110 481 1072 q 318 1148 345 1148 q 246 1070 263 1148 "},"F":{"x_min":165,"x_max":736,"ha":834,"o":"m 291 0 l 165 0 l 165 992 l 736 992 l 736 880 l 291 880 l 291 531 l 710 531 l 710 419 l 291 419 l 291 0 "},"ϑ":{"x_min":7.125,"x_max":815.203125,"ha":834,"o":"m 594 662 q 565 794 585 736 q 520 892 546 852 q 463 953 494 932 q 399 974 432 974 q 318 943 348 974 q 289 864 289 913 q 305 789 289 825 q 356 725 320 753 q 451 680 392 697 q 594 662 509 662 m 722 573 q 724 538 723 558 q 725 497 725 518 q 703 295 725 388 q 637 133 681 201 q 527 25 594 64 q 372 -14 461 -14 q 247 4 297 -14 q 169 55 198 23 q 128 130 140 87 q 117 219 117 172 q 120 278 117 247 q 127 340 123 310 q 134 396 131 370 q 137 438 137 421 q 127 479 137 468 q 95 491 117 491 q 61 485 79 491 q 32 474 43 480 l 7 559 q 66 579 32 570 q 136 588 100 588 q 193 578 169 588 q 231 551 216 568 q 252 511 245 534 q 258 461 258 488 q 255 408 258 437 q 248 347 251 379 q 241 283 244 316 q 237 219 237 250 q 244 165 237 191 q 268 122 252 140 q 311 93 284 104 q 377 82 338 82 q 545 187 489 82 q 601 501 601 292 q 600 538 601 516 q 598 573 600 559 q 398 599 480 574 q 265 665 316 625 q 191 757 214 705 q 169 864 169 809 q 182 947 169 909 q 222 1012 195 984 q 293 1055 250 1040 q 396 1071 336 1071 q 521 1042 466 1071 q 615 960 576 1013 q 680 832 655 907 q 718 662 706 756 l 815 662 l 815 573 l 722 573 "},"Ќ":{"x_min":143,"x_max":813.25,"ha":834,"o":"m 813 0 l 664 0 l 269 502 l 269 0 l 143 0 l 143 992 l 269 992 l 269 511 l 654 992 l 794 992 l 409 515 l 813 0 m 390 1089 q 508 1293 454 1179 l 657 1293 l 657 1278 q 472 1071 580 1161 l 390 1071 l 390 1089 "},"å":{"x_min":92,"x_max":696,"ha":834,"o":"m 606 0 l 580 99 l 575 99 q 468 10 523 35 q 327 -14 413 -14 q 154 44 217 -14 q 92 207 92 102 q 436 442 92 431 l 573 447 l 573 494 q 409 655 573 655 q 187 599 309 655 l 144 692 q 404 758 277 758 q 627 699 558 758 q 696 509 696 640 l 696 0 l 606 0 m 572 362 l 462 357 q 274 315 330 352 q 219 204 219 279 q 354 82 219 82 q 513 138 454 82 q 572 294 572 194 l 572 362 m 413 842 q 303 881 344 842 q 262 988 262 920 q 303 1094 262 1055 q 413 1134 344 1134 q 525 1093 481 1134 q 569 989 569 1053 q 525 882 569 922 q 413 842 482 842 m 415 1064 q 358 1044 380 1064 q 336 988 336 1024 q 415 911 336 911 q 472 931 450 911 q 494 988 494 951 q 472 1044 494 1024 q 415 1064 450 1064 "},"Ϋ":{"x_min":23,"x_max":809,"ha":834,"o":"m 415 490 l 672 992 l 809 992 l 479 386 l 479 0 l 353 0 l 353 379 l 23 992 l 160 992 l 415 490 m 290 1244 q 355 1174 355 1244 q 290 1105 355 1105 q 225 1174 225 1105 q 290 1244 225 1244 m 544 1244 q 610 1174 610 1244 q 544 1105 610 1105 q 479 1174 479 1105 q 544 1244 479 1244 "},"0":{"x_min":100,"x_max":734,"ha":834,"o":"m 415 -14 q 180 117 260 -14 q 100 496 100 248 q 415 1007 100 1007 q 653 875 573 1007 q 734 496 734 744 q 415 -14 734 -14 m 415 91 q 561 186 514 91 q 608 497 608 281 q 561 806 608 711 q 415 901 514 901 q 271 807 317 901 q 225 497 225 712 q 271 186 225 281 q 415 91 317 91 "},"ō":{"x_min":78,"x_max":755,"ha":834,"o":"m 414 -14 q 172 91 267 -14 q 78 373 78 196 q 170 654 78 551 q 418 758 262 758 q 660 652 566 758 q 755 373 755 547 q 661 89 755 193 q 414 -14 568 -14 m 416 88 q 627 373 627 88 q 415 655 627 655 q 205 373 205 655 q 416 88 205 88 m 221 943 l 612 943 l 612 842 l 221 842 l 221 943 "},"”":{"x_min":158,"x_max":674,"ha":834,"o":"m 375 992 l 385 977 q 265 652 347 832 l 158 652 q 224 992 200 832 l 375 992 m 664 992 l 674 977 q 554 652 636 832 l 447 652 q 513 992 489 832 l 664 992 "},"ö":{"x_min":78,"x_max":755,"ha":834,"o":"m 414 -14 q 172 91 267 -14 q 78 373 78 196 q 170 654 78 551 q 418 758 262 758 q 660 652 566 758 q 755 373 755 547 q 661 89 755 193 q 414 -14 568 -14 m 416 88 q 627 373 627 88 q 415 655 627 655 q 205 373 205 655 q 416 88 205 88 m 285 1015 q 350 945 350 1015 q 285 876 350 876 q 220 945 220 876 q 285 1015 220 1015 m 539 1015 q 605 945 605 1015 q 539 876 605 876 q 474 945 474 876 q 539 1015 474 1015 "},"ć":{"x_min":117,"x_max":720,"ha":834,"o":"m 720 717 l 677 610 q 496 650 576 650 q 244 369 244 650 q 489 93 244 93 q 707 135 595 93 l 707 27 q 483 -14 616 -14 q 213 84 309 -14 q 117 367 117 183 q 215 658 117 558 q 492 758 313 758 q 720 717 612 758 m 392 860 q 510 1064 456 950 l 659 1064 l 659 1049 q 474 842 582 932 l 392 842 l 392 860 "},"þ":{"x_min":107,"x_max":741,"ha":834,"o":"m 230 644 q 449 758 305 758 q 663 656 585 758 q 741 373 741 555 q 662 88 741 190 q 449 -14 584 -14 q 230 93 308 -14 l 222 93 q 230 -16 230 6 l 230 -334 l 107 -334 l 107 1055 l 230 1055 l 230 744 l 225 644 l 230 644 m 230 401 l 230 373 q 277 153 230 219 q 428 88 325 88 q 613 374 613 88 q 427 655 613 655 q 278 595 323 655 q 230 401 233 536 "},"]":{"x_min":196,"x_max":555,"ha":834,"o":"m 196 -118 l 431 -118 l 431 890 l 196 890 l 196 992 l 555 992 l 555 -220 l 196 -220 l 196 -118 "},"А":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 "},"′":{"x_min":336,"x_max":496.734375,"ha":834,"o":"m 496 992 l 468 634 l 363 634 l 336 992 l 496 992 "},"Ы":{"x_min":65,"x_max":769,"ha":834,"o":"m 65 0 l 65 992 l 191 992 l 191 574 l 221 574 q 573 290 573 574 q 484 74 573 149 q 226 0 395 0 l 65 0 m 191 107 l 240 107 q 456 290 456 107 q 401 421 456 380 q 221 462 347 462 l 191 462 l 191 107 m 652 0 l 652 992 l 769 992 l 769 0 l 652 0 "},"ẁ":{"x_min":-3,"x_max":836,"ha":834,"o":"m 551 0 l 462 404 l 416 628 l 411 628 l 367 401 l 276 0 l 148 0 l -3 745 l 106 745 l 173 376 q 212 109 196 250 l 216 109 q 262 352 237 235 l 352 745 l 483 745 l 569 352 q 614 109 598 220 l 619 109 q 659 376 640 274 l 728 745 l 836 745 l 683 0 l 551 0 m 473 842 l 390 842 q 206 1049 278 938 l 206 1064 l 354 1064 q 473 860 413 943 l 473 842 "},"ĭ":{"x_min":133.6875,"x_max":729.171875,"ha":834,"o":"m 367 648 l 184 662 l 184 745 l 490 745 l 490 96 l 729 83 l 729 0 l 133 0 l 133 83 l 367 96 l 367 648 m 639 1030 q 578 892 632 943 q 432 842 524 842 q 231 1030 242 842 l 305 1030 q 337 960 310 977 q 434 943 364 943 q 564 1030 557 943 l 639 1030 "},"8":{"x_min":106,"x_max":728,"ha":834,"o":"m 517 526 q 728 258 728 417 q 642 60 728 135 q 416 -14 557 -14 q 188 56 270 -14 q 106 253 106 126 q 297 520 106 428 q 138 770 138 619 q 216 943 138 879 q 416 1007 295 1007 q 618 942 541 1007 q 696 768 696 878 q 517 526 696 613 m 417 576 q 576 762 576 645 q 533 866 576 830 q 415 901 490 901 q 300 866 342 901 q 257 762 257 830 q 291 660 257 702 q 417 576 324 618 m 399 473 q 225 253 225 391 q 413 91 225 91 q 557 135 506 91 q 608 258 608 179 q 565 366 608 319 q 420 463 522 413 l 399 473 "},"R":{"x_min":126,"x_max":794.25,"ha":834,"o":"m 252 409 l 252 0 l 126 0 l 126 992 l 368 992 q 721 710 721 992 q 524 443 721 515 l 794 0 l 645 0 l 407 409 l 252 409 m 252 517 l 362 517 q 532 561 478 517 q 587 704 587 606 q 533 842 587 800 q 359 884 479 884 l 252 884 l 252 517 "},"Ż":{"x_min":69,"x_max":763,"ha":834,"o":"m 763 0 l 69 0 l 69 97 l 607 880 l 83 880 l 83 992 l 749 992 l 749 895 l 210 111 l 763 111 l 763 0 m 434 1252 q 499 1174 499 1252 q 434 1097 499 1097 q 369 1174 369 1097 q 434 1252 369 1252 "},"ħ":{"x_min":3.203125,"x_max":725,"ha":834,"o":"m 601 0 l 601 451 q 441 627 601 627 q 282 564 332 627 q 232 357 232 500 l 232 0 l 109 0 l 109 843 l 3 843 l 3 932 l 109 932 l 109 1055 l 233 1055 l 233 932 l 516 932 l 516 843 l 232 843 l 232 715 l 225 616 l 232 616 q 466 730 305 730 q 660 665 596 730 q 725 458 725 600 l 725 0 l 601 0 "},"õ":{"x_min":78,"x_max":755,"ha":834,"o":"m 414 -14 q 172 91 267 -14 q 78 373 78 196 q 170 654 78 551 q 418 758 262 758 q 660 652 566 758 q 755 373 755 547 q 661 89 755 193 q 414 -14 568 -14 m 416 88 q 627 373 627 88 q 415 655 627 655 q 205 373 205 655 q 416 88 205 88 m 244 841 l 173 841 q 316 1021 189 1021 q 425 982 355 1021 q 517 944 494 944 q 589 1022 572 944 l 661 1022 q 518 843 642 843 q 411 881 479 843 q 316 919 343 919 q 244 841 261 919 "},"˙":{"x_min":359.25,"x_max":489.46875,"ha":834,"o":"m 424 1023 q 489 945 489 1023 q 424 868 489 868 q 359 945 359 868 q 424 1023 359 1023 "},"ê":{"x_min":90,"x_max":744,"ha":834,"o":"m 744 346 l 217 346 q 451 93 222 93 q 703 145 584 93 l 703 36 q 456 -14 590 -14 q 189 87 289 -14 q 90 366 90 188 q 182 652 90 547 q 428 758 274 758 q 658 666 572 758 q 744 423 744 575 l 744 346 m 220 449 l 616 449 q 428 655 616 655 q 220 449 238 655 m 653 842 l 570 842 q 427 967 513 879 q 284 842 337 875 l 203 842 l 203 860 q 243 905 219 879 q 362 1064 337 1010 l 493 1064 q 612 905 518 1010 l 653 860 l 653 842 "},"″":{"x_min":193,"x_max":640.734375,"ha":834,"o":"m 353 992 l 325 634 l 220 634 l 193 992 l 353 992 m 640 992 l 612 634 l 507 634 l 480 992 l 640 992 "},"„":{"x_min":166,"x_max":667,"ha":834,"o":"m 367 161 l 378 145 q 258 -179 340 1 l 166 -179 q 217 161 202 18 l 367 161 m 656 161 l 667 145 q 547 -179 632 12 l 455 -179 q 506 161 491 18 l 656 161 "},"ч":{"x_min":103,"x_max":720,"ha":834,"o":"m 226 745 l 226 466 q 365 348 226 348 q 596 426 481 348 l 596 745 l 720 745 l 720 0 l 596 0 l 596 331 q 337 246 473 246 q 166 305 229 246 q 103 458 103 364 l 103 745 l 226 745 "},"δ":{"x_min":92,"x_max":742,"ha":834,"o":"m 378 636 q 206 872 206 734 q 267 1012 206 962 q 437 1063 329 1063 q 704 989 572 1063 l 654 890 q 434 960 541 960 q 355 936 384 960 q 326 868 326 911 q 354 791 326 825 q 499 689 383 756 q 742 337 742 549 q 654 78 742 170 q 413 -14 566 -14 q 180 69 269 -14 q 92 296 92 153 q 378 636 92 549 m 464 579 q 219 294 219 511 q 271 145 219 202 q 412 88 323 88 q 614 325 614 88 q 464 579 614 491 "},"Â":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 m 642 1071 l 559 1071 q 416 1196 502 1108 q 273 1071 326 1104 l 192 1071 l 192 1089 q 232 1134 208 1108 q 351 1293 326 1239 l 482 1293 q 601 1134 507 1239 l 642 1089 l 642 1071 "},"Į":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 m 558 -217 l 558 -293 q 452 -309 508 -309 q 328 -271 371 -309 q 286 -171 286 -234 q 410 0 286 -73 l 502 0 q 383 -162 383 -85 q 472 -227 383 -227 q 558 -217 518 -227 "},"ω":{"x_min":61,"x_max":774,"ha":834,"o":"m 132 745 l 244 745 q 166 360 166 567 q 266 88 166 88 q 341 136 314 88 q 368 270 368 184 l 368 478 l 473 478 l 473 270 q 501 135 473 182 q 572 88 528 88 q 668 360 668 88 q 590 745 668 568 l 702 745 q 774 360 774 569 q 579 -14 774 -14 q 424 106 458 -14 l 417 106 q 258 -14 382 -14 q 61 360 61 -14 q 132 745 61 565 "},"Ţ":{"x_min":69,"x_max":762,"ha":834,"o":"m 479 0 l 353 0 l 353 880 l 69 880 l 69 992 l 762 992 l 762 880 l 479 880 l 479 0 m 304 -288 q 361 -85 346 -193 l 482 -85 l 482 -98 q 449 -182 482 -113 q 371 -307 416 -251 l 304 -307 l 304 -288 "},"´":{"x_min":284,"x_max":551,"ha":834,"o":"m 284 860 q 402 1064 348 950 l 551 1064 l 551 1049 q 366 842 474 932 l 284 842 l 284 860 "},"Ĉ":{"x_min":87,"x_max":801,"ha":834,"o":"m 763 136 l 763 26 q 519 -14 663 -14 q 198 119 309 -14 q 87 497 87 252 q 208 868 87 731 q 540 1006 330 1006 q 801 947 690 1006 l 747 841 q 540 894 643 894 q 307 787 394 894 q 220 496 220 679 q 302 199 220 301 q 540 97 383 97 q 763 136 629 97 m 751 1071 l 668 1071 q 525 1196 611 1108 q 382 1071 435 1104 l 301 1071 l 301 1089 q 341 1134 317 1108 q 460 1293 435 1239 l 591 1293 q 710 1134 616 1239 l 751 1089 l 751 1071 "},"И":{"x_min":93,"x_max":742,"ha":834,"o":"m 93 992 l 209 992 l 209 449 q 204 276 209 352 l 200 174 l 204 174 l 597 992 l 742 992 l 742 0 l 625 0 l 625 538 q 637 821 625 633 l 632 821 l 237 0 l 93 0 l 93 992 "},"Љ":{"x_min":0,"x_max":820,"ha":834,"o":"m 256 880 l 242 508 q 185 52 228 119 q 65 -14 142 -14 q 0 -1 27 -14 l 0 96 q 46 82 21 82 q 88 106 70 82 q 114 193 106 130 q 137 551 123 256 q 153 992 150 846 l 504 992 l 504 574 l 529 574 q 820 290 820 574 q 742 74 820 149 q 518 0 665 0 l 378 0 l 378 880 l 256 880 m 504 107 l 532 107 q 703 290 703 107 q 659 421 703 381 q 516 462 615 462 l 504 462 l 504 107 "},"р":{"x_min":107,"x_max":741,"ha":834,"o":"m 230 93 l 222 93 q 230 -16 230 6 l 230 -334 l 107 -334 l 107 745 l 206 745 l 225 644 l 230 644 q 449 758 305 758 q 663 656 585 758 q 741 373 741 555 q 662 88 741 190 q 449 -14 584 -14 q 230 93 308 -14 m 230 401 l 230 373 q 277 153 230 219 q 428 88 325 88 q 613 374 613 88 q 427 655 613 655 q 278 595 323 655 q 230 401 233 536 "},"Ω":{"x_min":49.859375,"x_max":786.140625,"ha":834,"o":"m 367 99 l 367 0 l 49 0 l 49 111 l 230 111 q 58 559 58 270 q 153 889 58 771 q 417 1007 248 1007 q 682 889 587 1007 q 778 559 778 771 q 604 111 778 268 l 786 111 l 786 0 l 468 0 l 468 99 q 644 556 644 256 q 417 895 644 895 q 191 556 191 895 q 367 99 191 256 "},"т":{"x_min":82,"x_max":749,"ha":834,"o":"m 749 642 l 477 642 l 477 0 l 354 0 l 354 642 l 82 642 l 82 745 l 749 745 l 749 642 "},"П":{"x_min":92,"x_max":742,"ha":834,"o":"m 742 0 l 615 0 l 615 880 l 218 880 l 218 0 l 92 0 l 92 992 l 742 992 l 742 0 "},"Ö":{"x_min":57,"x_max":778,"ha":834,"o":"m 417 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 684 118 778 251 q 417 -14 590 -14 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 m 290 1244 q 355 1174 355 1244 q 290 1105 355 1105 q 225 1174 225 1105 q 290 1244 225 1244 m 544 1244 q 610 1174 610 1244 q 544 1105 610 1105 q 479 1174 479 1105 q 544 1244 479 1244 "},"z":{"x_min":123,"x_max":709,"ha":834,"o":"m 709 0 l 123 0 l 123 88 l 572 648 l 145 648 l 145 745 l 697 745 l 697 641 l 256 96 l 709 96 l 709 0 "},"™":{"x_min":-0.375,"x_max":801,"ha":834,"o":"m 205 503 l 119 503 l 119 918 l 0 918 l 0 992 l 326 992 l 326 918 l 205 918 l 205 503 m 542 503 l 444 875 l 436 875 l 443 753 l 443 503 l 357 503 l 357 992 l 486 992 l 579 629 l 679 992 l 801 992 l 801 503 l 714 503 l 714 734 q 721 875 714 793 l 713 875 l 609 503 l 542 503 "},"Θ":{"x_min":57,"x_max":778,"ha":834,"o":"m 417 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 684 118 778 251 q 417 -14 590 -14 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 m 278 560 l 557 560 l 557 452 l 278 452 l 278 560 "},"Ř":{"x_min":126,"x_max":794.25,"ha":834,"o":"m 252 409 l 252 0 l 126 0 l 126 992 l 368 992 q 721 710 721 992 q 524 443 721 515 l 794 0 l 645 0 l 407 409 l 252 409 m 252 517 l 362 517 q 532 561 478 517 q 587 704 587 606 q 533 842 587 800 q 359 884 479 884 l 252 884 l 252 517 m 622 1274 q 581 1229 605 1255 q 462 1071 486 1122 l 331 1071 q 212 1229 307 1122 l 172 1274 l 172 1293 l 253 1293 q 396 1166 309 1256 q 539 1293 479 1253 l 622 1293 l 622 1274 "},"Ň":{"x_min":92,"x_max":741,"ha":834,"o":"m 741 0 l 596 0 l 201 821 l 196 821 q 208 538 208 633 l 208 0 l 92 0 l 92 992 l 236 992 l 629 174 l 633 174 q 624 449 624 380 l 624 992 l 741 992 l 741 0 m 640 1274 q 599 1229 623 1255 q 480 1071 504 1122 l 349 1071 q 230 1229 325 1122 l 190 1274 l 190 1293 l 271 1293 q 414 1166 327 1256 q 557 1293 497 1253 l 640 1293 l 640 1274 "},"É":{"x_min":147,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 m 326 1089 q 444 1293 390 1179 l 593 1293 l 593 1278 q 408 1071 516 1161 l 326 1071 l 326 1089 "},"и":{"x_min":109,"x_max":725,"ha":834,"o":"m 229 745 l 229 291 l 220 120 l 562 745 l 725 745 l 725 0 l 604 0 l 604 439 l 611 622 l 271 0 l 109 0 l 109 745 l 229 745 "},"³":{"x_min":232,"x_max":574,"ha":834,"o":"m 454 738 q 574 611 574 711 q 523 487 574 531 q 377 444 472 444 q 232 477 289 444 l 232 562 q 370 522 307 522 q 472 614 472 522 q 371 699 472 699 l 322 699 l 322 768 l 369 768 q 454 851 454 768 q 388 924 454 924 q 278 880 339 924 l 233 938 q 394 1002 308 1002 q 512 965 468 1002 q 556 865 556 928 q 454 738 556 771 "},"[":{"x_min":279,"x_max":638,"ha":834,"o":"m 638 -220 l 279 -220 l 279 992 l 638 992 l 638 890 l 402 890 l 402 -118 l 638 -118 l 638 -220 "},"ζ":{"x_min":110,"x_max":724,"ha":834,"o":"m 151 1055 l 720 1055 l 720 960 q 344 631 451 765 q 237 323 237 497 q 293 175 237 219 q 505 105 350 132 q 672 51 621 85 q 724 -58 724 16 q 641 -272 724 -159 l 526 -272 q 603 -95 603 -162 q 568 -35 603 -57 q 403 6 534 -12 q 180 106 250 30 q 110 318 110 181 q 219 642 110 492 q 583 960 328 793 q 344 952 437 952 l 151 952 l 151 1055 "},"∏":{"x_min":106,"x_max":755,"ha":834,"o":"m 628 -334 l 628 880 l 232 880 l 232 -334 l 106 -334 l 106 992 l 755 992 l 755 -334 l 628 -334 "},"Έ":{"x_min":-76,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 m -76 789 l -53 861 q -24 993 -31 938 l 106 993 l 106 978 q 72 897 106 967 q -2 771 39 827 l -76 771 l -76 789 "},"Ρ":{"x_min":119,"x_max":742,"ha":834,"o":"m 245 385 l 245 0 l 119 0 l 119 992 l 393 992 q 742 701 742 992 q 647 468 742 552 q 374 385 553 385 l 245 385 m 245 493 l 359 493 q 550 541 493 493 q 608 694 608 590 q 380 884 608 884 l 245 884 l 245 493 "},"ğ":{"x_min":70,"x_max":763.84375,"ha":834,"o":"m 763 745 l 763 668 l 630 650 q 675 506 675 592 q 602 333 675 397 q 401 269 530 269 q 343 273 364 269 q 275 182 275 234 q 384 125 275 125 l 511 125 q 691 72 629 125 q 754 -77 754 20 q 371 -334 754 -334 q 146 -278 223 -334 q 70 -123 70 -223 q 232 61 70 22 q 167 165 167 93 q 257 293 167 240 q 162 376 197 318 q 128 502 128 434 q 200 691 128 625 q 405 758 272 758 q 507 745 464 758 l 763 745 m 402 353 q 554 508 554 353 q 401 669 554 669 q 248 506 248 669 q 402 353 248 353 m 469 17 l 342 17 q 186 -118 186 17 q 370 -237 186 -237 q 637 -84 637 -237 q 603 -3 637 -24 q 469 17 569 17 m 612 1030 q 551 892 605 943 q 405 842 497 842 q 204 1030 215 842 l 278 1030 q 310 960 283 977 q 407 943 337 943 q 537 1030 530 943 l 612 1030 "},"ª":{"x_min":187,"x_max":616,"ha":834,"o":"m 539 541 l 516 622 q 336 532 446 532 q 187 671 187 532 q 244 784 187 749 q 430 823 301 819 l 514 827 l 514 833 q 412 925 514 925 q 247 889 336 925 l 219 963 q 418 1003 313 1003 q 616 841 616 1003 l 616 541 l 539 541 m 446 757 q 329 738 369 755 q 288 670 288 720 q 358 610 288 610 q 472 646 429 610 q 514 745 514 683 l 514 758 l 446 757 "},"ї":{"x_min":133.6875,"x_max":729.171875,"ha":834,"o":"m 367 648 l 184 662 l 184 745 l 490 745 l 490 96 l 729 83 l 729 0 l 133 0 l 133 83 l 367 96 l 367 648 m 289 1015 q 354 945 354 1015 q 289 876 354 876 q 224 945 224 876 q 289 1015 224 1015 m 543 1015 q 609 945 609 1015 q 543 876 609 876 q 478 945 478 876 q 543 1015 478 1015 "},"T":{"x_min":69,"x_max":762,"ha":834,"o":"m 479 0 l 353 0 l 353 880 l 69 880 l 69 992 l 762 992 l 762 880 l 479 880 l 479 0 "},"š":{"x_min":138,"x_max":696,"ha":834,"o":"m 138 32 l 138 145 q 388 88 268 88 q 575 196 575 88 q 542 264 575 235 q 388 336 508 292 q 190 444 231 395 q 149 560 149 493 q 224 705 149 652 q 433 758 300 758 q 684 707 568 758 l 643 606 q 428 655 520 655 q 269 565 269 655 q 303 499 269 523 q 460 430 337 474 q 649 327 602 378 q 696 203 696 277 q 616 44 696 102 q 392 -14 537 -14 q 138 32 224 -14 m 649 1045 q 608 1000 632 1026 q 489 842 513 893 l 358 842 q 239 1000 334 893 l 199 1045 l 199 1064 l 280 1064 q 423 937 336 1027 q 566 1064 506 1024 l 649 1064 l 649 1045 "},"є":{"x_min":117,"x_max":719.890625,"ha":834,"o":"m 719 717 l 677 610 q 500 650 576 650 q 245 434 266 650 l 609 434 l 609 326 l 244 326 q 494 93 258 93 q 707 135 597 93 l 707 27 q 490 -14 616 -14 q 213 85 310 -14 q 117 367 117 184 q 215 658 117 559 q 496 758 314 758 q 719 717 616 758 "},"Þ":{"x_min":119,"x_max":742,"ha":834,"o":"m 245 215 l 245 0 l 119 0 l 119 992 l 245 992 l 245 821 l 393 821 q 742 530 742 821 q 647 298 742 381 q 374 215 553 215 l 245 215 m 245 322 l 359 322 q 550 371 493 322 q 608 524 608 420 q 380 713 608 713 l 245 713 l 245 322 "},"j":{"x_min":92,"x_max":580,"ha":834,"o":"m 504 1051 q 577 973 577 1051 q 504 896 577 896 q 432 973 432 896 q 504 1051 432 1051 m 92 -310 l 92 -205 q 288 -231 182 -231 q 412 -192 367 -231 q 456 -85 456 -154 l 456 648 l 171 662 l 171 745 l 580 745 l 580 -79 q 503 -267 580 -201 q 286 -334 426 -334 q 92 -310 175 -334 "},"Σ":{"x_min":89,"x_max":744,"ha":834,"o":"m 89 0 l 89 103 l 370 519 l 97 892 l 97 992 l 703 992 l 703 880 l 241 880 l 505 520 l 228 111 l 744 111 l 744 0 l 89 0 "},"1":{"x_min":153,"x_max":514.375,"ha":834,"o":"m 514 0 l 395 0 l 395 619 q 400 864 395 702 q 318 788 373 835 l 218 706 l 153 789 l 412 992 l 514 992 l 514 0 "},"ϒ":{"x_min":21,"x_max":818.3125,"ha":834,"o":"m 414 496 q 456 603 431 546 q 508 715 482 660 q 559 815 535 769 q 600 892 584 862 q 631 940 615 919 q 665 974 646 960 q 705 994 683 987 q 754 1000 726 1000 q 792 997 777 1000 q 818 989 806 994 l 818 890 q 798 894 810 892 q 779 896 787 896 q 739 880 760 896 q 694 823 718 864 q 670 781 686 809 q 635 715 654 753 q 593 634 615 678 q 549 544 570 591 q 509 453 528 498 q 477 367 490 407 l 477 0 l 351 0 l 351 379 l 21 992 l 158 992 l 414 496 "},"ℓ":{"x_min":154,"x_max":678,"ha":834,"o":"m 584 225 l 678 225 q 483 -14 665 -14 q 337 49 389 -14 q 285 232 285 112 l 285 393 q 154 354 226 372 l 154 429 q 285 469 202 442 l 285 803 q 331 952 285 898 q 468 1006 377 1006 q 585 950 542 1006 q 628 804 628 895 q 404 443 628 567 l 404 235 q 491 82 404 82 q 584 225 578 82 m 404 524 q 534 798 534 605 q 469 925 534 925 q 420 897 436 925 q 404 798 404 870 l 404 524 "},"ĉ":{"x_min":117,"x_max":720,"ha":834,"o":"m 720 717 l 677 610 q 496 650 576 650 q 244 369 244 650 q 489 93 244 93 q 707 135 595 93 l 707 27 q 483 -14 616 -14 q 213 84 309 -14 q 117 367 117 183 q 215 658 117 558 q 492 758 313 758 q 720 717 612 758 m 699 842 l 616 842 q 473 967 559 879 q 330 842 383 875 l 249 842 l 249 860 q 289 905 265 879 q 408 1064 383 1010 l 539 1064 q 658 905 564 1010 l 699 860 l 699 842 "},"ī":{"x_min":133.6875,"x_max":729.171875,"ha":834,"o":"m 367 648 l 184 662 l 184 745 l 490 745 l 490 96 l 729 83 l 729 0 l 133 0 l 133 83 l 367 96 l 367 648 m 221 943 l 612 943 l 612 842 l 221 842 l 221 943 "},"О":{"x_min":57,"x_max":778,"ha":834,"o":"m 417 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 684 118 778 251 q 417 -14 590 -14 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 "},"ξ":{"x_min":117,"x_max":724,"ha":834,"o":"m 668 601 l 668 512 l 531 512 q 318 456 391 512 q 244 298 244 400 q 270 200 244 236 q 343 145 296 164 q 511 104 390 126 q 672 50 621 84 q 724 -58 724 16 q 638 -272 724 -159 l 521 -272 q 603 -94 603 -162 q 570 -36 603 -58 q 410 5 536 -14 q 117 286 117 51 q 168 449 117 377 q 308 550 219 521 l 308 558 q 163 747 163 598 q 213 875 163 824 q 390 960 264 926 q 200 952 270 952 l 158 952 l 158 1055 l 677 1055 l 677 952 l 630 952 q 383 898 483 952 q 283 748 283 843 q 345 636 283 671 q 539 601 407 601 l 668 601 "},"Ď":{"x_min":92,"x_max":778,"ha":834,"o":"m 92 0 l 92 992 l 323 992 q 658 863 538 992 q 778 505 778 735 q 653 130 778 260 q 296 0 529 0 l 92 0 m 218 884 l 218 107 l 283 107 q 644 501 644 107 q 309 884 644 884 l 218 884 m 637 1274 q 596 1229 620 1255 q 477 1071 501 1122 l 346 1071 q 227 1229 322 1122 l 187 1274 l 187 1293 l 268 1293 q 411 1166 324 1256 q 554 1293 494 1253 l 637 1293 l 637 1274 "},"&":{"x_min":41,"x_max":833,"ha":834,"o":"m 410 525 l 600 290 q 671 470 648 371 l 795 470 q 674 197 759 311 l 833 0 l 685 0 l 596 112 q 316 -14 478 -14 q 114 58 188 -14 q 41 258 41 131 q 84 413 41 347 q 243 548 127 479 q 133 790 133 678 q 197 948 133 890 q 384 1007 262 1007 q 562 948 499 1007 q 625 789 625 890 q 410 525 625 652 m 346 607 q 468 701 435 661 q 501 792 501 741 q 468 873 501 842 q 381 904 435 904 q 289 874 322 904 q 256 789 256 844 q 346 607 256 709 m 528 194 l 308 466 q 168 261 168 382 q 214 141 168 189 q 323 93 260 93 q 528 194 433 93 "},"G":{"x_min":79,"x_max":742,"ha":834,"o":"m 455 524 l 742 524 l 742 36 q 456 -14 609 -14 q 179 121 279 -14 q 79 497 79 256 q 188 870 79 735 q 491 1006 298 1006 q 726 947 621 1006 l 677 837 q 487 894 578 894 q 285 789 357 894 q 212 496 212 683 q 479 97 212 97 q 615 116 544 97 l 615 412 l 455 412 l 455 524 "},"ΰ":{"x_min":109,"x_max":735,"ha":834,"o":"m 109 745 l 232 745 l 232 345 q 418 88 232 88 q 565 167 520 88 q 611 412 611 245 q 568 745 611 573 l 691 745 q 735 406 735 578 q 657 88 735 191 q 414 -14 579 -14 q 109 337 109 -14 l 109 745 m 359 959 q 412 1164 388 1054 l 561 1164 l 561 1150 q 414 942 497 1039 l 359 942 l 359 959 m 265 1015 q 331 945 331 1015 q 312 894 331 912 q 265 876 293 876 q 201 945 201 876 q 265 1015 201 1015 m 562 1015 q 628 945 628 1015 q 562 876 628 876 q 497 945 497 876 q 562 1015 497 1015 "},"`":{"x_min":284,"x_max":551,"ha":834,"o":"m 551 842 l 468 842 q 284 1049 356 938 l 284 1064 l 432 1064 q 551 860 491 943 l 551 842 "},"ŏ":{"x_min":78,"x_max":755,"ha":834,"o":"m 414 -14 q 172 91 267 -14 q 78 373 78 196 q 170 654 78 551 q 418 758 262 758 q 660 652 566 758 q 755 373 755 547 q 661 89 755 193 q 414 -14 568 -14 m 416 88 q 627 373 627 88 q 415 655 627 655 q 205 373 205 655 q 416 88 205 88 m 621 1030 q 560 892 614 943 q 414 842 506 842 q 213 1030 224 842 l 287 1030 q 319 960 292 977 q 416 943 346 943 q 546 1030 539 943 l 621 1030 "},"ý":{"x_min":56,"x_max":777,"ha":834,"o":"m 56 745 l 183 745 l 361 301 q 421 104 416 162 l 425 104 q 486 302 441 180 l 648 745 l 777 745 l 454 -97 q 348 -274 409 -215 q 181 -334 288 -334 q 68 -322 123 -334 l 68 -224 q 160 -231 110 -231 q 261 -203 225 -231 q 326 -108 298 -176 l 365 -7 l 56 745 m 335 860 q 453 1064 399 950 l 602 1064 l 602 1049 q 417 842 525 932 l 335 842 l 335 860 "},"º":{"x_min":191,"x_max":643,"ha":834,"o":"m 415 532 q 254 595 317 532 q 191 768 191 658 q 251 940 191 878 q 418 1003 312 1003 q 579 940 516 1003 q 643 768 643 877 q 580 594 643 656 q 415 532 518 532 m 417 613 q 541 769 541 613 q 417 921 541 921 q 292 769 292 921 q 417 613 292 613 "},"∞":{"x_min":47,"x_max":785,"ha":834,"o":"m 411 421 q 228 277 332 277 q 97 335 147 277 q 47 490 47 394 q 97 642 47 581 q 228 704 147 704 q 413 555 340 704 q 604 699 492 699 q 735 641 685 699 q 785 486 785 583 q 733 334 785 397 q 604 272 681 272 q 411 421 488 272 m 365 490 q 238 611 310 611 q 168 576 195 611 q 141 489 141 540 q 168 403 141 436 q 239 369 195 369 q 365 490 308 369 m 461 486 q 592 365 519 365 q 663 400 636 365 q 690 487 690 436 q 661 573 690 539 q 590 607 633 607 q 461 486 520 607 "},"ź":{"x_min":123,"x_max":709,"ha":834,"o":"m 709 0 l 123 0 l 123 88 l 572 648 l 145 648 l 145 745 l 697 745 l 697 641 l 256 96 l 709 96 l 709 0 m 336 860 q 454 1064 400 950 l 603 1064 l 603 1049 q 418 842 526 932 l 336 842 l 336 860 "},"я":{"x_min":77.75,"x_max":702,"ha":834,"o":"m 212 0 l 77 0 l 275 315 q 117 527 117 360 q 186 686 117 628 q 372 745 255 745 l 702 745 l 702 0 l 578 0 l 578 295 l 385 295 l 212 0 m 578 398 l 578 642 l 381 642 q 240 525 240 642 q 399 398 240 398 l 578 398 "},"Ё":{"x_min":147,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 m 306 1244 q 371 1174 371 1244 q 306 1105 371 1105 q 241 1174 241 1105 q 306 1244 241 1244 m 560 1244 q 626 1174 626 1244 q 560 1105 626 1105 q 495 1174 495 1105 q 560 1244 495 1244 "},"ń":{"x_min":109,"x_max":725,"ha":834,"o":"m 601 0 l 601 479 q 440 655 601 655 q 232 385 232 655 l 232 0 l 109 0 l 109 745 l 208 745 l 227 644 l 233 644 q 461 758 303 758 q 725 486 725 758 l 725 0 l 601 0 m 359 860 q 477 1064 423 950 l 626 1064 l 626 1049 q 441 842 549 932 l 359 842 l 359 860 "}," ":{"x_min":0,"x_max":0,"ha":834},"Г":{"x_min":158,"x_max":719,"ha":834,"o":"m 719 992 l 719 880 l 284 880 l 284 0 l 158 0 l 158 992 l 719 992 "},"Ь":{"x_min":119,"x_max":742,"ha":834,"o":"m 119 0 l 119 992 l 245 992 l 245 574 l 374 574 q 742 290 742 574 q 652 74 742 149 q 393 0 563 0 l 119 0 m 245 107 l 380 107 q 608 290 608 107 q 550 421 608 380 q 359 462 493 462 l 245 462 l 245 107 "},"¤":{"x_min":118.59375,"x_max":716.0625,"ha":834,"o":"m 206 634 l 118 721 l 185 788 l 271 700 q 416 747 339 747 q 561 700 494 747 l 648 788 l 716 723 l 628 635 q 674 489 674 567 q 628 343 674 408 l 714 257 l 648 192 l 561 278 q 416 234 494 234 q 271 280 336 234 l 185 193 l 119 259 l 206 345 q 162 489 162 409 q 206 634 162 567 m 416 326 q 531 374 483 326 q 579 489 579 421 q 531 605 579 557 q 416 654 483 654 q 303 606 350 654 q 256 489 256 558 q 303 374 256 421 q 416 326 350 326 "},"Ĝ":{"x_min":79,"x_max":742,"ha":834,"o":"m 455 524 l 742 524 l 742 36 q 456 -14 609 -14 q 179 121 279 -14 q 79 497 79 256 q 188 870 79 735 q 491 1006 298 1006 q 726 947 621 1006 l 677 837 q 487 894 578 894 q 285 789 357 894 q 212 496 212 683 q 479 97 212 97 q 615 116 544 97 l 615 412 l 455 412 l 455 524 m 696 1071 l 613 1071 q 470 1196 556 1108 q 327 1071 380 1104 l 246 1071 l 246 1089 q 286 1134 262 1108 q 405 1293 380 1239 l 536 1293 q 655 1134 561 1239 l 696 1089 l 696 1071 "},"p":{"x_min":107,"x_max":741,"ha":834,"o":"m 230 93 l 222 93 q 230 -16 230 6 l 230 -334 l 107 -334 l 107 745 l 206 745 l 225 644 l 230 644 q 449 758 305 758 q 663 656 585 758 q 741 373 741 555 q 662 88 741 190 q 449 -14 584 -14 q 230 93 308 -14 m 230 401 l 230 373 q 277 153 230 219 q 428 88 325 88 q 613 374 613 88 q 427 655 613 655 q 278 595 323 655 q 230 401 233 536 "},"Ю":{"x_min":66,"x_max":787,"ha":834,"o":"m 273 462 l 192 462 l 192 0 l 66 0 l 66 992 l 192 992 l 192 574 l 276 574 q 348 908 288 810 q 532 1007 407 1007 q 724 887 662 1007 q 787 496 787 767 q 724 106 787 227 q 530 -14 661 -14 q 340 92 401 -14 q 273 462 279 199 m 530 97 q 637 176 604 97 q 670 497 670 255 q 636 818 670 741 q 530 895 603 895 q 422 815 455 895 q 389 497 389 735 q 422 179 389 261 q 530 97 454 97 "},"ο":{"x_min":78,"x_max":755,"ha":834,"o":"m 414 -14 q 172 91 267 -14 q 78 373 78 196 q 170 654 78 551 q 418 758 262 758 q 660 652 566 758 q 755 373 755 547 q 661 89 755 193 q 414 -14 568 -14 m 416 88 q 627 373 627 88 q 415 655 627 655 q 205 373 205 655 q 416 88 205 88 "},"S":{"x_min":96,"x_max":738,"ha":834,"o":"m 96 32 l 96 152 q 375 93 238 93 q 611 258 611 93 q 564 366 611 328 q 371 456 516 404 q 170 575 231 506 q 109 754 109 644 q 196 939 109 872 q 435 1006 283 1006 q 718 953 591 1006 l 674 841 q 432 894 544 894 q 235 752 235 894 q 279 641 235 683 q 461 551 323 599 q 682 428 626 491 q 738 264 738 364 q 644 60 738 134 q 376 -14 550 -14 q 96 32 197 -14 "},"/":{"x_min":143,"x_max":690,"ha":834,"o":"m 690 992 l 263 0 l 143 0 l 569 992 l 690 992 "},"Ŧ":{"x_min":69,"x_max":762,"ha":834,"o":"m 353 556 l 353 880 l 69 880 l 69 992 l 762 992 l 762 880 l 479 880 l 479 556 l 679 556 l 679 448 l 479 448 l 479 0 l 353 0 l 353 448 l 151 448 l 151 556 l 353 556 "},"ђ":{"x_min":3.203125,"x_max":725,"ha":834,"o":"m 438 -317 l 438 -216 q 515 -231 474 -231 q 601 -115 601 -231 l 601 451 q 441 627 601 627 q 282 564 332 627 q 232 357 232 500 l 232 0 l 109 0 l 109 843 l 3 843 l 3 932 l 109 932 l 109 1055 l 232 1055 l 232 932 l 489 932 l 489 843 l 232 843 l 232 715 l 227 616 l 233 616 q 460 730 305 730 q 725 458 725 730 l 725 -107 q 528 -334 725 -334 q 438 -317 473 -334 "},"y":{"x_min":56,"x_max":777,"ha":834,"o":"m 56 745 l 183 745 l 361 301 q 421 104 416 162 l 425 104 q 486 302 441 180 l 648 745 l 777 745 l 454 -97 q 348 -274 409 -215 q 181 -334 288 -334 q 68 -322 123 -334 l 68 -224 q 160 -231 110 -231 q 261 -203 225 -231 q 326 -108 298 -176 l 365 -7 l 56 745 "},"Π":{"x_min":92,"x_max":742,"ha":834,"o":"m 742 0 l 615 0 l 615 880 l 218 880 l 218 0 l 92 0 l 92 992 l 742 992 l 742 0 "},"‗":{"x_min":-14,"x_max":848,"ha":834,"o":"m 848 -125 l -14 -125 l -14 -31 l 848 -31 l 848 -125 m 848 -314 l -14 -314 l -14 -219 l 848 -219 l 848 -314 "},"–":{"x_min":125,"x_max":709,"ha":834,"o":"m 125 315 l 125 429 l 709 429 l 709 315 l 125 315 "},"ë":{"x_min":90,"x_max":744,"ha":834,"o":"m 744 346 l 217 346 q 451 93 222 93 q 703 145 584 93 l 703 36 q 456 -14 590 -14 q 189 87 289 -14 q 90 366 90 188 q 182 652 90 547 q 428 758 274 758 q 658 666 572 758 q 744 423 744 575 l 744 346 m 220 449 l 616 449 q 428 655 616 655 q 220 449 238 655 m 301 1015 q 366 945 366 1015 q 301 876 366 876 q 236 945 236 876 q 301 1015 236 1015 m 555 1015 q 621 945 621 1015 q 555 876 621 876 q 490 945 490 876 q 555 1015 490 1015 "},"б":{"x_min":97,"x_max":735,"ha":834,"o":"m 705 1065 l 728 956 q 388 889 458 911 q 275 793 318 867 q 227 578 232 720 l 235 578 q 463 693 314 693 q 662 603 590 693 q 735 359 735 514 q 650 84 735 182 q 415 -14 565 -14 q 181 108 266 -14 q 97 446 97 230 q 118 687 97 590 q 174 845 139 785 q 256 940 209 904 q 371 996 303 976 q 705 1065 440 1015 m 224 444 q 425 88 224 88 q 607 343 607 88 q 443 590 607 590 q 317 547 377 590 q 224 444 256 504 "},"ƒ":{"x_min":146,"x_max":689,"ha":834,"o":"m 454 564 l 454 -85 q 402 -274 454 -214 q 228 -334 350 -334 q 146 -323 193 -334 l 146 -220 q 223 -228 185 -228 q 307 -194 286 -228 q 329 -84 329 -160 l 329 564 l 197 564 l 197 617 l 329 665 l 329 757 q 381 946 329 886 q 554 1006 433 1006 q 689 980 620 1006 l 657 885 q 559 900 603 900 q 475 866 497 900 q 454 757 454 832 l 454 661 l 620 661 l 620 564 l 454 564 "},"у":{"x_min":56,"x_max":777,"ha":834,"o":"m 56 745 l 183 745 l 361 301 q 421 104 416 162 l 425 104 q 486 302 441 180 l 648 745 l 777 745 l 454 -97 q 348 -274 409 -215 q 181 -334 288 -334 q 68 -322 123 -334 l 68 -224 q 160 -231 110 -231 q 261 -203 225 -231 q 326 -108 298 -176 l 365 -7 l 56 745 "},"J":{"x_min":93,"x_max":664,"ha":834,"o":"m 93 26 l 93 138 q 302 97 202 97 q 474 151 411 97 q 537 304 537 205 l 537 992 l 664 992 l 664 305 q 568 72 664 159 q 312 -14 473 -14 q 93 26 165 -14 "},"ŷ":{"x_min":56,"x_max":777,"ha":834,"o":"m 56 745 l 183 745 l 361 301 q 421 104 416 162 l 425 104 q 486 302 441 180 l 648 745 l 777 745 l 454 -97 q 348 -274 409 -215 q 181 -334 288 -334 q 68 -322 123 -334 l 68 -224 q 160 -231 110 -231 q 261 -203 225 -231 q 326 -108 298 -176 l 365 -7 l 56 745 m 644 842 l 561 842 q 418 967 504 879 q 275 842 328 875 l 194 842 l 194 860 q 234 905 210 879 q 353 1064 328 1010 l 484 1064 q 603 905 509 1010 l 644 860 l 644 842 "},"ŕ":{"x_min":179,"x_max":719,"ha":834,"o":"m 719 727 l 685 614 q 533 650 602 650 q 362 586 422 650 q 302 404 302 523 l 302 0 l 179 0 l 179 745 l 279 745 l 294 608 l 299 608 q 410 723 351 688 q 555 758 469 758 q 719 727 636 758 m 346 860 q 464 1064 410 950 l 613 1064 l 613 1049 q 428 842 536 932 l 346 842 l 346 860 "},"ώ":{"x_min":61,"x_max":774,"ha":834,"o":"m 132 745 l 244 745 q 166 360 166 567 q 266 88 166 88 q 341 136 314 88 q 368 270 368 184 l 368 478 l 473 478 l 473 270 q 501 135 473 182 q 572 88 528 88 q 668 360 668 88 q 590 745 668 568 l 702 745 q 774 360 774 569 q 579 -14 774 -14 q 424 106 458 -14 l 417 106 q 258 -14 382 -14 q 61 360 61 -14 q 132 745 61 565 m 360 860 l 382 932 q 411 1064 404 1009 l 542 1064 l 542 1049 q 508 968 542 1038 q 433 842 475 898 l 360 842 l 360 860 "},"˘":{"x_min":213,"x_max":621,"ha":834,"o":"m 621 1030 q 560 892 614 943 q 414 842 506 842 q 213 1030 224 842 l 287 1030 q 319 960 292 977 q 416 943 346 943 q 546 1030 539 943 l 621 1030 "},"D":{"x_min":92,"x_max":778,"ha":834,"o":"m 92 0 l 92 992 l 323 992 q 658 863 538 992 q 778 505 778 735 q 653 130 778 260 q 296 0 529 0 l 92 0 m 218 884 l 218 107 l 283 107 q 644 501 644 107 q 309 884 644 884 l 218 884 "},"ł":{"x_min":127.6875,"x_max":723.171875,"ha":834,"o":"m 361 401 l 265 339 l 212 421 l 361 518 l 361 958 l 179 972 l 179 1055 l 484 1055 l 484 599 l 595 672 l 648 589 l 484 482 l 484 96 l 723 83 l 723 0 l 127 0 l 127 83 l 361 96 l 361 401 "},"ĺ":{"x_min":127.6875,"x_max":723.171875,"ha":834,"o":"m 361 958 l 179 972 l 179 1055 l 484 1055 l 484 96 l 723 83 l 723 0 l 127 0 l 127 83 l 361 96 l 361 958 m 336 1128 q 454 1332 400 1218 l 603 1332 l 603 1317 q 418 1110 526 1200 l 336 1110 l 336 1128 "},"ц":{"x_min":103,"x_max":801,"ha":834,"o":"m 801 -258 l 677 -258 l 677 0 l 103 0 l 103 745 l 226 745 l 226 102 l 568 102 l 568 745 l 692 745 l 692 102 l 801 102 l 801 -258 "},"Л":{"x_min":3,"x_max":742,"ha":834,"o":"m 742 0 l 615 0 l 615 880 l 435 880 q 288 100 351 217 q 100 -16 225 -16 q 3 0 50 -16 l 3 102 q 79 91 41 91 q 186 213 148 91 q 309 992 223 335 l 742 992 l 742 0 "},"$":{"x_min":123,"x_max":709,"ha":834,"o":"m 464 75 l 464 -81 l 371 -81 l 371 69 q 123 116 216 69 l 123 233 q 371 174 256 174 l 371 465 q 187 563 240 508 q 135 712 135 619 q 197 860 135 801 q 371 932 259 918 l 371 1054 l 464 1054 l 464 934 q 692 881 591 928 l 647 783 q 464 829 552 823 l 464 545 q 654 445 599 499 q 709 302 709 390 q 464 75 709 112 m 371 579 l 371 826 q 254 711 254 807 q 281 629 254 658 q 371 579 309 600 m 464 430 l 464 180 q 589 302 589 199 q 464 430 589 388 "},"w":{"x_min":-3,"x_max":836,"ha":834,"o":"m 551 0 l 462 404 l 416 628 l 411 628 l 367 401 l 276 0 l 148 0 l -3 745 l 106 745 l 173 376 q 212 109 196 250 l 216 109 q 262 352 237 235 l 352 745 l 483 745 l 569 352 q 614 109 598 220 l 619 109 q 659 376 640 274 l 728 745 l 836 745 l 683 0 l 551 0 "},"о":{"x_min":78,"x_max":755,"ha":834,"o":"m 414 -14 q 172 91 267 -14 q 78 373 78 196 q 170 654 78 551 q 418 758 262 758 q 660 652 566 758 q 755 373 755 547 q 661 89 755 193 q 414 -14 568 -14 m 416 88 q 627 373 627 88 q 415 655 627 655 q 205 373 205 655 q 416 88 205 88 "},"Д":{"x_min":4,"x_max":828,"ha":834,"o":"m 828 -261 l 711 -261 l 711 0 l 120 0 l 120 -261 l 4 -261 l 4 111 l 81 111 q 227 514 168 271 q 294 992 285 758 l 696 992 l 696 111 l 828 111 l 828 -261 m 569 111 l 569 880 l 420 880 q 349 474 407 699 q 214 111 291 249 l 569 111 "},"Ç":{"x_min":87,"x_max":801,"ha":834,"o":"m 763 136 l 763 26 q 519 -14 663 -14 q 198 119 309 -14 q 87 497 87 252 q 208 868 87 731 q 540 1006 330 1006 q 801 947 690 1006 l 747 841 q 540 894 643 894 q 307 787 394 894 q 220 496 220 679 q 302 199 220 301 q 540 97 383 97 q 763 136 629 97 m 345 -327 l 345 -254 q 398 -258 367 -258 q 500 -196 500 -258 q 384 -119 500 -146 l 446 0 l 526 0 l 488 -78 q 598 -194 598 -103 q 400 -334 598 -334 q 345 -327 377 -334 "},"Ŝ":{"x_min":96,"x_max":738,"ha":834,"o":"m 96 32 l 96 152 q 375 93 238 93 q 611 258 611 93 q 564 366 611 328 q 371 456 516 404 q 170 575 231 506 q 109 754 109 644 q 196 939 109 872 q 435 1006 283 1006 q 718 953 591 1006 l 674 841 q 432 894 544 894 q 235 752 235 894 q 279 641 235 683 q 461 551 323 599 q 682 428 626 491 q 738 264 738 364 q 644 60 738 134 q 376 -14 550 -14 q 96 32 197 -14 m 656 1071 l 573 1071 q 430 1196 516 1108 q 287 1071 340 1104 l 206 1071 l 206 1089 q 246 1134 222 1108 q 365 1293 340 1239 l 496 1293 q 615 1134 521 1239 l 656 1089 l 656 1071 "},"C":{"x_min":87,"x_max":801,"ha":834,"o":"m 763 136 l 763 26 q 519 -14 663 -14 q 198 119 309 -14 q 87 497 87 252 q 208 868 87 731 q 540 1006 330 1006 q 801 947 690 1006 l 747 841 q 540 894 643 894 q 307 787 394 894 q 220 496 220 679 q 302 199 220 301 q 540 97 383 97 q 763 136 629 97 "},"Ḁ":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 m 571 -229 q 559 -291 571 -264 q 526 -338 547 -319 q 476 -367 505 -357 q 415 -377 448 -377 q 353 -367 381 -377 q 305 -338 325 -357 q 274 -292 285 -319 q 264 -231 264 -265 q 274 -169 264 -196 q 305 -123 285 -142 q 353 -94 325 -104 q 415 -85 381 -85 q 476 -94 447 -85 q 525 -123 504 -104 q 558 -168 546 -142 q 571 -229 571 -195 m 496 -231 q 474 -174 496 -194 q 417 -154 452 -154 q 360 -174 382 -154 q 338 -231 338 -194 q 358 -287 338 -267 q 417 -307 378 -307 q 474 -287 452 -307 q 496 -231 496 -267 "},"Ĵ":{"x_min":93,"x_max":825,"ha":834,"o":"m 93 26 l 93 138 q 302 97 202 97 q 474 151 411 97 q 537 304 537 205 l 537 992 l 664 992 l 664 305 q 568 72 664 159 q 312 -14 473 -14 q 93 26 165 -14 m 825 1071 l 742 1071 q 599 1196 685 1108 q 456 1071 509 1104 l 375 1071 l 375 1089 q 415 1134 391 1108 q 534 1293 509 1239 l 665 1293 q 784 1134 690 1239 l 825 1089 l 825 1071 "},"È":{"x_min":147,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 m 502 1071 l 419 1071 q 235 1278 307 1167 l 235 1293 l 383 1293 q 502 1089 442 1172 l 502 1071 "},"fi":{"x_min":33,"x_max":723.84375,"ha":834,"o":"m 456 656 l 288 656 l 288 0 l 165 0 l 165 656 l 33 656 l 33 704 l 165 749 l 165 814 q 216 1002 165 942 q 389 1063 268 1063 q 523 1037 455 1063 l 491 942 q 394 960 438 960 q 310 926 331 960 q 288 815 288 892 l 288 745 l 456 745 l 456 656 m 652 1024 q 723 946 723 1024 q 702 888 723 907 q 652 869 681 869 q 580 946 580 869 q 652 1024 580 1024 m 713 0 l 589 0 l 589 745 l 713 745 l 713 0 "},"X":{"x_min":36,"x_max":797,"ha":834,"o":"m 797 0 l 653 0 l 412 430 l 164 0 l 36 0 l 343 518 l 57 992 l 191 992 l 416 612 l 643 992 l 773 992 l 486 522 l 797 0 "},"ô":{"x_min":78,"x_max":755,"ha":834,"o":"m 414 -14 q 172 91 267 -14 q 78 373 78 196 q 170 654 78 551 q 418 758 262 758 q 660 652 566 758 q 755 373 755 547 q 661 89 755 193 q 414 -14 568 -14 m 416 88 q 627 373 627 88 q 415 655 627 655 q 205 373 205 655 q 416 88 205 88 m 639 842 l 556 842 q 413 967 499 879 q 270 842 323 875 l 189 842 l 189 860 q 229 905 205 879 q 348 1064 323 1010 l 479 1064 q 598 905 504 1010 l 639 860 l 639 842 "},"Ė":{"x_min":147,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 m 447 1233 q 512 1155 512 1233 q 447 1078 512 1078 q 382 1155 382 1078 q 447 1233 382 1233 "},"г":{"x_min":197,"x_max":704,"ha":834,"o":"m 704 642 l 320 642 l 320 0 l 197 0 l 197 745 l 704 745 l 704 642 "},"Ŀ":{"x_min":158,"x_max":716,"ha":834,"o":"m 158 0 l 158 992 l 284 992 l 284 111 l 716 111 l 716 0 l 158 0 m 587 603 q 652 525 652 603 q 587 448 652 448 q 522 525 522 448 q 587 603 522 603 "},"х":{"x_min":65,"x_max":767,"ha":834,"o":"m 346 382 l 79 745 l 219 745 l 416 466 l 614 745 l 754 745 l 486 382 l 767 0 l 627 0 l 416 295 l 205 0 l 65 0 l 346 382 "},"ŋ":{"x_min":109,"x_max":725,"ha":834,"o":"m 232 0 l 109 0 l 109 745 l 208 745 l 227 644 l 233 644 q 461 758 303 758 q 725 486 725 758 l 725 -107 q 528 -334 725 -334 q 438 -317 473 -334 l 438 -216 q 515 -231 474 -231 q 601 -116 601 -231 l 601 479 q 440 655 601 655 q 232 385 232 655 l 232 0 "},"Ч":{"x_min":92,"x_max":742,"ha":834,"o":"m 742 0 l 615 0 l 615 406 q 349 345 461 345 q 92 596 92 345 l 92 992 l 218 992 l 218 612 q 253 490 218 524 q 362 456 288 456 q 615 510 466 456 l 615 992 l 742 992 l 742 0 "},"ü":{"x_min":109,"x_max":725,"ha":834,"o":"m 625 0 l 607 99 l 600 99 q 373 -14 529 -14 q 109 258 109 -14 l 109 745 l 232 745 l 232 264 q 392 88 232 88 q 551 151 501 88 q 601 357 601 214 l 601 745 l 725 745 l 725 0 l 625 0 m 290 1015 q 355 945 355 1015 q 290 876 355 876 q 225 945 225 876 q 290 1015 225 1015 m 544 1015 q 610 945 610 1015 q 544 876 610 876 q 479 945 479 876 q 544 1015 479 1015 "},"ь":{"x_min":147,"x_max":741,"ha":834,"o":"m 270 439 l 458 439 q 741 227 741 439 q 455 0 741 0 l 147 0 l 147 745 l 270 745 l 270 439 m 270 336 l 270 102 l 447 102 q 620 219 620 102 q 580 308 620 280 q 444 336 539 336 l 270 336 "},"Ÿ":{"x_min":23,"x_max":809,"ha":834,"o":"m 415 490 l 672 992 l 809 992 l 479 386 l 479 0 l 353 0 l 353 379 l 23 992 l 160 992 l 415 490 m 290 1244 q 355 1174 355 1244 q 290 1105 355 1105 q 225 1174 225 1105 q 290 1244 225 1244 m 544 1244 q 610 1174 610 1244 q 544 1105 610 1105 q 479 1174 479 1105 q 544 1244 479 1244 "},"€":{"x_min":65,"x_max":766.875,"ha":834,"o":"m 302 634 l 593 634 l 593 541 l 292 541 q 291 521 292 530 l 291 504 l 291 462 q 292 433 291 448 l 552 433 l 552 341 l 304 341 q 553 97 354 97 q 735 136 645 97 l 735 26 q 543 -14 652 -14 q 175 341 239 -14 l 65 341 l 65 433 l 165 433 l 163 459 l 165 541 l 65 541 l 65 634 l 173 634 q 295 908 199 811 q 539 1006 390 1006 q 766 943 669 1006 l 713 844 q 549 894 631 894 q 392 827 458 894 q 302 634 327 759 "},"в":{"x_min":119,"x_max":752,"ha":834,"o":"m 572 395 l 572 390 q 752 215 752 366 q 680 57 752 114 q 466 0 608 0 l 119 0 l 119 745 l 465 745 q 728 557 728 745 q 572 395 728 423 m 242 642 l 242 439 l 440 439 q 568 463 530 439 q 607 545 607 488 q 460 642 607 642 l 242 642 m 242 336 l 242 102 l 458 102 q 631 224 631 102 q 587 312 631 287 q 455 336 542 336 l 242 336 "},"Η":{"x_min":92,"x_max":742,"ha":834,"o":"m 742 0 l 615 0 l 615 462 l 218 462 l 218 0 l 92 0 l 92 992 l 218 992 l 218 574 l 615 574 l 615 992 l 742 992 l 742 0 "},"С":{"x_min":87,"x_max":801,"ha":834,"o":"m 763 136 l 763 26 q 519 -14 663 -14 q 198 119 309 -14 q 87 497 87 252 q 208 868 87 731 q 540 1006 330 1006 q 801 947 690 1006 l 747 841 q 540 894 643 894 q 307 787 394 894 q 220 496 220 679 q 302 199 220 301 q 540 97 383 97 q 763 136 629 97 "},"ß":{"x_min":111,"x_max":781,"ha":834,"o":"m 325 32 l 325 145 q 513 88 422 88 q 657 205 657 88 q 626 294 657 260 q 528 370 595 329 q 410 465 444 423 q 376 565 376 506 q 465 716 376 644 q 554 849 554 788 q 399 960 554 960 q 234 814 234 960 l 234 0 l 111 0 l 111 814 q 398 1063 111 1063 q 604 1009 530 1063 q 678 854 678 955 q 587 685 678 765 q 513 614 530 635 q 497 570 497 593 q 516 524 497 544 q 619 448 536 503 q 749 331 717 384 q 781 211 781 278 q 713 44 781 102 q 521 -14 645 -14 q 325 32 397 -14 "},"њ":{"x_min":72,"x_max":812,"ha":834,"o":"m 177 745 l 177 437 l 386 437 l 386 745 l 491 745 l 491 439 l 526 439 q 812 228 812 439 q 527 0 812 0 l 386 0 l 386 334 l 177 334 l 177 0 l 72 0 l 72 745 l 177 745 m 491 337 l 491 102 l 529 102 q 706 220 706 102 q 665 309 706 281 q 527 337 624 337 l 491 337 "},"Ű":{"x_min":85,"x_max":749,"ha":834,"o":"m 749 993 l 749 349 q 663 79 749 173 q 412 -14 578 -14 q 85 352 85 -14 l 85 991 l 211 991 l 211 359 q 419 97 211 97 q 622 361 619 97 l 622 993 l 749 993 m 219 1089 q 322 1293 274 1179 l 471 1293 l 471 1278 q 286 1071 395 1161 l 219 1071 l 219 1089 m 464 1089 q 568 1293 516 1169 l 717 1293 l 717 1278 q 532 1071 641 1161 l 464 1071 l 464 1089 "},"c":{"x_min":117,"x_max":720,"ha":834,"o":"m 720 717 l 677 610 q 496 650 576 650 q 244 369 244 650 q 489 93 244 93 q 707 135 595 93 l 707 27 q 483 -14 616 -14 q 213 84 309 -14 q 117 367 117 183 q 215 658 117 558 q 492 758 313 758 q 720 717 612 758 "},"¶":{"x_min":45,"x_max":732,"ha":834,"o":"m 732 -176 l 649 -176 l 649 947 l 510 947 l 510 -176 l 428 -176 l 428 379 q 329 367 386 367 q 45 706 45 367 q 118 968 45 882 q 350 1055 192 1055 l 732 1055 l 732 -176 "},"Ή":{"x_min":-104,"x_max":742,"ha":834,"o":"m 742 0 l 615 0 l 615 462 l 218 462 l 218 0 l 92 0 l 92 992 l 218 992 l 218 574 l 615 574 l 615 992 l 742 992 l 742 0 m -104 789 l -81 861 q -52 993 -59 938 l 78 993 l 78 978 q 44 897 78 967 q -30 771 11 827 l -104 771 l -104 789 "},"Ὅ":{"x_min":-211,"x_max":876,"ha":834,"o":"m 515 -14 q 155 498 155 -14 q 517 1007 155 1007 q 783 874 690 1007 q 876 496 876 741 q 782 118 876 251 q 515 -14 688 -14 m 515 97 q 687 195 633 97 q 742 497 742 293 q 687 799 742 702 q 517 895 631 895 q 288 497 288 895 q 515 97 288 97 m -211 851 q -170 942 -211 904 q -47 1003 -129 981 l -47 951 q -107 920 -87 936 q -126 889 -126 905 q -115 870 -126 876 q -93 858 -105 864 q -70 844 -80 853 q -60 816 -60 835 q -76 778 -60 791 q -125 765 -93 765 q -187 788 -164 765 q -211 851 -211 812 m -2 787 q 13 833 5 807 q 30 885 22 858 q 46 939 38 911 q 58 991 53 966 l 199 991 l 199 977 q 170 929 186 955 q 135 876 154 903 q 95 822 116 849 q 53 770 74 795 l -2 770 l -2 787 "},"γ":{"x_min":56,"x_max":777,"ha":834,"o":"m 501 42 q 424 -334 424 -147 l 297 -334 q 365 8 297 -193 l 56 745 l 186 745 l 350 343 q 422 126 398 225 l 426 126 q 493 326 444 196 l 648 745 l 777 745 l 501 42 "},"­":{"x_min":193,"x_max":641,"ha":834,"o":"m 193 315 l 193 429 l 641 429 l 641 315 l 193 315 "},":":{"x_min":330,"x_max":502,"ha":834,"o":"m 416 764 q 502 669 502 764 q 416 575 502 575 q 330 669 330 575 q 416 764 330 764 m 416 169 q 502 74 502 169 q 416 -20 502 -20 q 330 74 330 -20 q 416 169 330 169 "},"ś":{"x_min":138,"x_max":696,"ha":834,"o":"m 138 32 l 138 145 q 388 88 268 88 q 575 196 575 88 q 542 264 575 235 q 388 336 508 292 q 190 444 231 395 q 149 560 149 493 q 224 705 149 652 q 433 758 300 758 q 684 707 568 758 l 643 606 q 428 655 520 655 q 269 565 269 655 q 303 499 269 523 q 460 430 337 474 q 649 327 602 378 q 696 203 696 277 q 616 44 696 102 q 392 -14 537 -14 q 138 32 224 -14 m 347 860 q 465 1064 411 950 l 614 1064 l 614 1049 q 429 842 537 932 l 347 842 l 347 860 "}," ":{"x_min":0,"x_max":0,"ha":834},"У":{"x_min":18,"x_max":814,"ha":834,"o":"m 814 992 l 523 289 q 431 109 471 166 q 329 18 390 51 q 183 -14 269 -14 q 63 6 113 -14 l 63 131 q 184 97 120 97 q 299 132 258 97 q 377 250 341 167 l 18 992 l 156 992 l 416 440 q 429 408 424 423 q 441 377 435 391 l 442 377 l 469 451 l 681 992 l 814 992 "},"¾":{"x_min":14,"x_max":838.71875,"ha":834,"o":"m 236 738 q 356 611 356 711 q 305 487 356 531 q 159 444 254 444 q 14 477 71 444 l 14 562 q 152 522 89 522 q 254 614 254 522 q 153 699 254 699 l 104 699 l 104 768 l 151 768 q 236 851 236 768 q 170 924 236 924 q 60 880 121 924 l 15 938 q 176 1002 90 1002 q 294 965 250 1002 q 338 865 338 928 q 236 738 338 771 m 753 992 l 258 0 l 151 0 l 645 992 l 753 992 m 838 117 l 781 117 l 781 0 l 680 0 l 680 117 l 426 117 l 426 184 l 681 539 l 781 539 l 781 195 l 838 195 l 838 117 m 680 195 l 680 314 q 684 430 680 369 q 629 341 656 381 l 524 195 l 680 195 "},"Ί":{"x_min":-62,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 m -62 789 l -39 861 q -10 993 -17 938 l 120 993 l 120 978 q 86 897 120 967 q 11 771 53 827 l -62 771 l -62 789 "},"ʼn":{"x_min":-11,"x_max":767,"ha":834,"o":"m 191 992 l 201 977 q 81 652 167 843 l -11 652 q 56 992 29 816 l 191 992 m 643 0 l 643 479 q 494 655 643 655 q 301 385 301 655 l 301 0 l 178 0 l 178 745 l 278 745 l 296 644 l 302 644 q 390 727 331 696 q 518 758 448 758 q 767 486 767 758 l 767 0 l 643 0 "},"Ģ":{"x_min":79,"x_max":742,"ha":834,"o":"m 455 524 l 742 524 l 742 36 q 456 -14 609 -14 q 179 121 279 -14 q 79 497 79 256 q 188 870 79 735 q 491 1006 298 1006 q 726 947 621 1006 l 677 837 q 487 894 578 894 q 285 789 357 894 q 212 496 212 683 q 479 97 212 97 q 615 116 544 97 l 615 412 l 455 412 l 455 524 m 366 -288 q 423 -85 408 -193 l 544 -85 l 544 -98 q 511 -182 544 -113 q 433 -307 478 -251 l 366 -307 l 366 -288 "},"m":{"x_min":62,"x_max":773,"ha":834,"o":"m 649 0 l 649 479 q 633 616 649 578 q 579 655 617 655 q 503 599 527 655 q 479 410 479 543 l 479 0 l 356 0 l 356 479 q 280 655 356 655 q 207 601 229 655 q 185 385 185 547 l 185 0 l 62 0 l 62 745 l 159 745 l 180 644 l 186 644 q 320 758 231 758 q 461 634 428 758 l 465 634 q 611 758 516 758 q 734 695 696 758 q 773 486 773 632 l 773 0 l 649 0 "},"Е":{"x_min":147,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 "},"ž":{"x_min":123,"x_max":709,"ha":834,"o":"m 709 0 l 123 0 l 123 88 l 572 648 l 145 648 l 145 745 l 697 745 l 697 641 l 256 96 l 709 96 l 709 0 m 650 1045 q 609 1000 633 1026 q 490 842 514 893 l 359 842 q 240 1000 335 893 l 200 1045 l 200 1064 l 281 1064 q 424 937 337 1027 q 567 1064 507 1024 l 650 1064 l 650 1045 "},"á":{"x_min":92,"x_max":696,"ha":834,"o":"m 606 0 l 580 99 l 575 99 q 468 10 523 35 q 327 -14 413 -14 q 154 44 217 -14 q 92 207 92 102 q 436 442 92 431 l 573 447 l 573 494 q 409 655 573 655 q 187 599 309 655 l 144 692 q 404 758 277 758 q 627 699 558 758 q 696 509 696 640 l 696 0 l 606 0 m 572 362 l 462 357 q 274 315 330 352 q 219 204 219 279 q 354 82 219 82 q 513 138 454 82 q 572 294 572 194 l 572 362 m 341 860 q 459 1064 405 950 l 608 1064 l 608 1049 q 423 842 531 932 l 341 842 l 341 860 "},"×":{"x_min":129.28125,"x_max":704.421875,"ha":834,"o":"m 344 490 l 129 706 l 200 778 l 415 562 l 633 778 l 704 708 l 486 490 l 703 273 l 633 204 l 415 419 l 200 205 l 131 275 l 344 490 "},"п":{"x_min":109,"x_max":725,"ha":834,"o":"m 232 0 l 109 0 l 109 745 l 725 745 l 725 0 l 601 0 l 601 642 l 232 642 l 232 0 "},"Ǻ":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 m 414 927 q 304 966 345 927 q 263 1073 263 1005 q 304 1179 263 1140 q 414 1219 345 1219 q 526 1178 482 1219 q 570 1074 570 1138 q 526 967 570 1007 q 414 927 483 927 m 416 1149 q 359 1129 381 1149 q 337 1073 337 1109 q 416 996 337 996 q 473 1016 451 996 q 495 1073 495 1036 q 473 1129 495 1109 q 416 1149 451 1149 m 332 1263 q 450 1467 396 1353 l 599 1467 l 599 1452 q 414 1245 522 1335 l 332 1245 l 332 1263 "},"K":{"x_min":143,"x_max":813.25,"ha":834,"o":"m 813 0 l 669 0 l 364 473 l 269 396 l 269 0 l 143 0 l 143 992 l 269 992 l 269 496 l 351 609 l 659 992 l 801 992 l 447 559 l 813 0 "},"7":{"x_min":97,"x_max":735,"ha":834,"o":"m 227 0 l 608 879 l 97 879 l 97 992 l 735 992 l 735 893 l 358 0 l 227 0 "},"¨":{"x_min":224,"x_max":609,"ha":834,"o":"m 289 1015 q 354 945 354 1015 q 289 876 354 876 q 224 945 224 876 q 289 1015 224 1015 m 543 1015 q 609 945 609 1015 q 543 876 609 876 q 478 945 478 876 q 543 1015 478 1015 "},"Y":{"x_min":23,"x_max":809,"ha":834,"o":"m 415 490 l 672 992 l 809 992 l 479 386 l 479 0 l 353 0 l 353 379 l 23 992 l 160 992 l 415 490 "},"E":{"x_min":147,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 "},"Ô":{"x_min":57,"x_max":778,"ha":834,"o":"m 417 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 684 118 778 251 q 417 -14 590 -14 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 m 642 1071 l 559 1071 q 416 1196 502 1108 q 273 1071 326 1104 l 192 1071 l 192 1089 q 232 1134 208 1108 q 351 1293 326 1239 l 482 1293 q 601 1134 507 1239 l 642 1089 l 642 1071 "},"Є":{"x_min":87,"x_max":801,"ha":834,"o":"m 224 574 l 652 574 l 652 462 l 220 462 q 540 97 236 97 q 763 135 629 97 l 763 26 q 519 -14 663 -14 q 198 119 309 -14 q 87 497 87 252 q 208 868 87 731 q 540 1006 330 1006 q 801 947 690 1006 l 747 841 q 540 894 643 894 q 327 810 412 894 q 224 574 243 725 "},"Ï":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 m 290 1244 q 355 1174 355 1244 q 290 1105 355 1105 q 225 1174 225 1105 q 290 1244 225 1244 m 544 1244 q 610 1174 610 1244 q 544 1105 610 1105 q 479 1174 479 1105 q 544 1244 479 1244 "},"ġ":{"x_min":70,"x_max":763.84375,"ha":834,"o":"m 763 745 l 763 668 l 630 650 q 675 506 675 592 q 602 333 675 397 q 401 269 530 269 q 343 273 364 269 q 275 182 275 234 q 384 125 275 125 l 511 125 q 691 72 629 125 q 754 -77 754 20 q 371 -334 754 -334 q 146 -278 223 -334 q 70 -123 70 -223 q 232 61 70 22 q 167 165 167 93 q 257 293 167 240 q 162 376 197 318 q 128 502 128 434 q 200 691 128 625 q 405 758 272 758 q 507 745 464 758 l 763 745 m 402 353 q 554 508 554 353 q 401 669 554 669 q 248 506 248 669 q 402 353 248 353 m 469 17 l 342 17 q 186 -118 186 17 q 370 -237 186 -237 q 637 -84 637 -237 q 603 -3 637 -24 q 469 17 569 17 m 422 1023 q 487 945 487 1023 q 422 868 487 868 q 357 945 357 868 q 422 1023 357 1023 "},"έ":{"x_min":136,"x_max":700.703125,"ha":834,"o":"m 570 439 l 570 336 l 462 336 q 259 210 259 336 q 450 88 259 88 q 698 145 583 88 l 698 36 q 441 -14 606 -14 q 217 43 298 -14 q 136 203 136 100 q 297 385 136 334 l 297 392 q 160 561 160 437 q 236 705 160 652 q 440 758 312 758 q 700 706 587 758 l 658 606 q 446 655 550 655 q 283 551 283 655 q 467 439 283 439 l 570 439 m 391 860 l 413 932 q 442 1064 435 1009 l 573 1064 l 573 1049 q 539 968 573 1038 q 464 842 506 898 l 391 842 l 391 860 "}," ":{"x_min":0,"x_max":0,"ha":834},"ϋ":{"x_min":109,"x_max":735,"ha":834,"o":"m 109 745 l 232 745 l 232 345 q 418 88 232 88 q 565 167 520 88 q 611 412 611 245 q 568 745 611 573 l 691 745 q 735 406 735 578 q 657 88 735 191 q 414 -14 579 -14 q 109 337 109 -14 l 109 745 m 289 1015 q 354 945 354 1015 q 289 876 354 876 q 224 945 224 876 q 289 1015 224 1015 m 543 1015 q 609 945 609 1015 q 543 876 609 876 q 478 945 478 876 q 543 1015 478 1015 "},"й":{"x_min":109,"x_max":725,"ha":834,"o":"m 229 745 l 229 291 l 220 120 l 562 745 l 725 745 l 725 0 l 604 0 l 604 439 l 611 622 l 271 0 l 109 0 l 109 745 l 229 745 m 702 1058 q 437 842 688 842 q 247 892 305 842 q 182 1058 188 942 l 298 1058 q 332 959 304 988 q 442 930 361 930 q 585 1058 573 930 l 702 1058 "},"b":{"x_min":107,"x_max":741,"ha":834,"o":"m 230 93 l 222 93 l 197 0 l 107 0 l 107 1055 l 230 1055 l 230 800 q 225 646 230 745 l 230 646 q 449 758 303 758 q 663 656 585 758 q 741 373 741 555 q 662 88 741 190 q 449 -14 584 -14 q 230 93 308 -14 m 230 373 q 277 153 230 219 q 428 88 325 88 q 613 374 613 88 q 427 655 613 655 q 276 591 321 655 q 230 373 230 528 "},"ύ":{"x_min":109,"x_max":735,"ha":834,"o":"m 109 745 l 232 745 l 232 345 q 418 88 232 88 q 565 167 520 88 q 611 412 611 245 q 568 745 611 573 l 691 745 q 735 406 735 578 q 657 88 735 191 q 414 -14 579 -14 q 109 337 109 -14 l 109 745 m 352 860 l 374 932 q 403 1064 396 1009 l 534 1064 l 534 1049 q 500 968 534 1038 q 425 842 467 898 l 352 842 l 352 860 "},"fl":{"x_min":33,"x_max":713,"ha":834,"o":"m 456 656 l 288 656 l 288 0 l 165 0 l 165 656 l 33 656 l 33 704 l 165 749 l 165 814 q 216 1002 165 942 q 389 1063 268 1063 q 523 1037 455 1063 l 491 942 q 394 960 438 960 q 310 926 331 960 q 288 815 288 892 l 288 745 l 456 745 l 456 656 m 713 0 l 589 0 l 589 1055 l 713 1055 l 713 0 "},"ф":{"x_min":50,"x_max":782,"ha":834,"o":"m 473 756 q 782 373 782 722 q 473 -11 782 17 l 473 -334 l 368 -334 l 368 -11 q 50 373 50 19 q 368 756 50 728 l 368 1055 l 473 1055 l 473 756 m 368 91 l 368 653 q 155 373 155 633 q 368 91 155 111 m 473 652 l 473 91 q 676 373 676 113 q 473 652 676 629 "},"Ŋ":{"x_min":92,"x_max":741,"ha":834,"o":"m 201 821 l 196 821 q 208 538 208 633 l 208 0 l 92 0 l 92 992 l 236 992 l 629 226 l 636 226 q 624 500 624 412 l 624 992 l 741 992 l 741 13 q 673 -192 741 -120 q 478 -264 605 -264 q 373 -247 415 -264 l 373 -139 q 480 -152 425 -152 q 624 0 624 -152 l 201 821 "},"Ũ":{"x_min":85,"x_max":749,"ha":834,"o":"m 749 993 l 749 349 q 663 79 749 173 q 412 -14 578 -14 q 85 352 85 -14 l 85 991 l 211 991 l 211 359 q 419 97 211 97 q 622 361 619 97 l 622 993 l 749 993 m 248 1070 l 177 1070 q 320 1250 193 1250 q 429 1211 359 1250 q 521 1173 498 1173 q 593 1251 576 1173 l 665 1251 q 522 1072 646 1072 q 415 1110 483 1072 q 320 1148 347 1148 q 248 1070 265 1148 "},"Щ":{"x_min":41,"x_max":834,"ha":834,"o":"m 713 111 l 834 111 l 834 -261 l 717 -261 l 717 0 l 41 0 l 41 992 l 167 992 l 167 111 l 321 111 l 321 992 l 447 992 l 447 111 l 586 111 l 586 992 l 713 992 l 713 111 "},"L":{"x_min":158,"x_max":716,"ha":834,"o":"m 158 0 l 158 992 l 284 992 l 284 111 l 716 111 l 716 0 l 158 0 "},"ď":{"x_min":54,"x_max":892,"ha":834,"o":"m 569 99 l 564 99 q 345 -14 487 -14 q 131 87 209 -14 q 54 370 54 188 q 132 655 54 553 q 345 758 210 758 q 564 649 485 758 l 572 649 q 564 759 564 736 l 564 1055 l 688 1055 l 688 0 l 588 0 l 569 99 m 564 342 l 564 370 q 517 590 564 524 q 366 655 469 655 q 181 369 181 655 q 367 88 181 88 q 516 148 471 88 q 564 342 561 208 m 729 850 l 746 923 q 770 1055 764 1002 l 892 1055 l 892 1041 q 863 964 892 1031 q 793 833 835 897 l 729 833 l 729 850 "},"Ο":{"x_min":57,"x_max":778,"ha":834,"o":"m 417 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 684 118 778 251 q 417 -14 590 -14 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 "},"Ĭ":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 m 621 1259 q 560 1121 614 1172 q 414 1071 506 1071 q 213 1259 224 1071 l 287 1259 q 319 1189 292 1206 q 416 1172 346 1172 q 546 1259 539 1172 l 621 1259 "},"ŧ":{"x_min":95,"x_max":696,"ha":834,"o":"m 692 101 l 692 7 q 521 -14 603 -14 q 276 217 276 -14 l 276 387 l 166 387 l 166 484 l 276 484 l 276 648 l 95 648 l 95 715 l 276 749 l 328 943 l 399 943 l 399 745 l 696 745 l 696 648 l 399 648 l 399 484 l 607 484 l 607 387 l 399 387 l 399 218 q 529 88 399 88 q 692 101 592 88 "},"À":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 m 499 1071 l 416 1071 q 232 1278 304 1167 l 232 1293 l 380 1293 q 499 1089 439 1172 l 499 1071 "},"Ϊ":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 m 290 1244 q 355 1174 355 1244 q 290 1105 355 1105 q 225 1174 225 1105 q 290 1244 225 1244 m 544 1244 q 610 1174 610 1244 q 544 1105 610 1105 q 479 1174 479 1105 q 544 1244 479 1244 "},"ḁ":{"x_min":92,"x_max":696,"ha":834,"o":"m 606 0 l 580 99 l 575 99 q 468 10 523 35 q 327 -14 413 -14 q 154 44 217 -14 q 92 207 92 102 q 436 442 92 431 l 573 447 l 573 494 q 409 655 573 655 q 187 599 309 655 l 144 692 q 404 758 277 758 q 627 699 558 758 q 696 509 696 640 l 696 0 l 606 0 m 572 362 l 462 357 q 274 315 330 352 q 219 204 219 279 q 354 82 219 82 q 513 138 454 82 q 572 294 572 194 l 572 362 m 567 -229 q 555 -291 567 -264 q 522 -338 543 -319 q 472 -367 501 -357 q 411 -377 444 -377 q 349 -367 377 -377 q 301 -338 321 -357 q 270 -292 281 -319 q 260 -231 260 -265 q 270 -169 260 -196 q 301 -123 281 -142 q 349 -94 321 -104 q 411 -85 377 -85 q 472 -94 443 -85 q 521 -123 500 -104 q 554 -168 542 -142 q 567 -229 567 -195 m 492 -231 q 470 -174 492 -194 q 413 -154 448 -154 q 356 -174 378 -154 q 334 -231 334 -194 q 354 -287 334 -267 q 413 -307 374 -307 q 470 -287 448 -307 q 492 -231 492 -267 "},"½":{"x_min":2,"x_max":831,"ha":834,"o":"m 150 990 l 244 990 l 244 456 l 143 456 l 143 771 q 149 906 143 817 q 98 862 121 876 l 51 828 l 2 887 l 150 990 m 673 992 l 178 0 l 71 0 l 565 992 l 673 992 m 831 1 l 471 1 l 471 70 l 595 205 q 689 319 668 285 q 709 392 709 353 q 635 469 709 469 q 526 418 581 469 l 475 477 q 643 547 554 547 q 766 506 722 547 q 811 395 811 465 q 787 304 811 350 q 676 171 763 258 l 584 79 l 831 79 l 831 1 "},"'":{"x_min":336,"x_max":496.734375,"ha":834,"o":"m 496 992 l 468 634 l 363 634 l 336 992 l 496 992 "},"ij":{"x_min":127.828125,"x_max":704,"ha":834,"o":"m 200 1051 q 272 973 272 1051 q 250 915 272 934 q 200 896 229 896 q 127 973 127 896 q 200 1051 127 1051 m 629 1051 q 701 973 701 1051 q 679 915 701 934 q 629 896 658 896 q 556 973 556 896 q 629 1051 556 1051 m 138 745 l 261 745 l 261 0 l 138 0 l 138 745 m 341 -310 l 341 -205 q 469 -231 400 -231 q 580 -85 580 -231 l 580 648 l 435 662 l 435 745 l 704 745 l 704 -79 q 646 -268 704 -203 q 486 -334 588 -334 q 341 -310 403 -334 "},"Р":{"x_min":119,"x_max":742,"ha":834,"o":"m 245 385 l 245 0 l 119 0 l 119 992 l 393 992 q 742 701 742 992 q 647 468 742 552 q 374 385 553 385 l 245 385 m 245 493 l 359 493 q 550 541 493 493 q 608 694 608 590 q 380 884 608 884 l 245 884 l 245 493 "},"˛":{"x_min":281,"x_max":553,"ha":834,"o":"m 553 -217 l 553 -293 q 447 -309 503 -309 q 323 -271 366 -309 q 281 -171 281 -234 q 405 0 281 -73 l 497 0 q 378 -162 378 -85 q 467 -227 378 -227 q 553 -217 513 -227 "},"Ć":{"x_min":87,"x_max":801,"ha":834,"o":"m 763 136 l 763 26 q 519 -14 663 -14 q 198 119 309 -14 q 87 497 87 252 q 208 868 87 731 q 540 1006 330 1006 q 801 947 690 1006 l 747 841 q 540 894 643 894 q 307 787 394 894 q 220 496 220 679 q 302 199 220 301 q 540 97 383 97 q 763 136 629 97 m 448 1089 q 566 1293 512 1179 l 715 1293 l 715 1278 q 530 1071 638 1161 l 448 1071 l 448 1089 "},"Т":{"x_min":69,"x_max":762,"ha":834,"o":"m 479 0 l 353 0 l 353 880 l 69 880 l 69 992 l 762 992 l 762 880 l 479 880 l 479 0 "},"£":{"x_min":81,"x_max":753,"ha":834,"o":"m 721 949 l 676 852 q 492 898 581 898 q 342 732 342 898 l 342 534 l 596 534 l 596 437 l 342 437 l 342 295 q 247 112 342 164 l 753 112 l 753 0 l 81 0 l 81 104 q 217 294 217 137 l 217 437 l 82 437 l 82 534 l 217 534 l 217 753 q 290 935 217 867 q 486 1004 364 1004 q 721 949 616 1004 "},"ů":{"x_min":109,"x_max":725,"ha":834,"o":"m 625 0 l 607 99 l 600 99 q 373 -14 529 -14 q 109 258 109 -14 l 109 745 l 232 745 l 232 264 q 392 88 232 88 q 551 151 501 88 q 601 357 601 214 l 601 745 l 725 745 l 725 0 l 625 0 m 412 842 q 302 881 343 842 q 261 988 261 920 q 302 1094 261 1055 q 412 1134 343 1134 q 524 1093 480 1134 q 568 989 568 1053 q 524 882 568 922 q 412 842 481 842 m 414 1064 q 357 1044 379 1064 q 335 988 335 1024 q 414 911 335 911 q 471 931 449 911 q 493 988 493 951 q 471 1044 493 1024 q 414 1064 449 1064 "},"Ō":{"x_min":57,"x_max":778,"ha":834,"o":"m 417 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 684 118 778 251 q 417 -14 590 -14 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 m 224 1172 l 615 1172 l 615 1071 l 224 1071 l 224 1172 "},"а":{"x_min":92,"x_max":696,"ha":834,"o":"m 606 0 l 580 99 l 575 99 q 468 10 523 35 q 327 -14 413 -14 q 154 44 217 -14 q 92 207 92 102 q 436 442 92 431 l 573 447 l 573 494 q 409 655 573 655 q 187 599 309 655 l 144 692 q 404 758 277 758 q 627 699 558 758 q 696 509 696 640 l 696 0 l 606 0 m 572 362 l 462 357 q 274 315 330 352 q 219 204 219 279 q 354 82 219 82 q 513 138 454 82 q 572 294 572 194 l 572 362 "},"Ğ":{"x_min":79,"x_max":742,"ha":834,"o":"m 455 524 l 742 524 l 742 36 q 456 -14 609 -14 q 179 121 279 -14 q 79 497 79 256 q 188 870 79 735 q 491 1006 298 1006 q 726 947 621 1006 l 677 837 q 487 894 578 894 q 285 789 357 894 q 212 496 212 683 q 479 97 212 97 q 615 116 544 97 l 615 412 l 455 412 l 455 524 m 687 1259 q 626 1121 680 1172 q 480 1071 572 1071 q 279 1259 290 1071 l 353 1259 q 385 1189 358 1206 q 482 1172 412 1172 q 612 1259 605 1172 l 687 1259 "},"v":{"x_min":56,"x_max":777,"ha":834,"o":"m 338 0 l 56 745 l 183 745 l 346 302 q 414 82 403 145 l 418 82 q 486 302 422 111 l 648 745 l 777 745 l 494 0 l 338 0 "},"Ї":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 m 290 1244 q 355 1174 355 1244 q 290 1105 355 1105 q 225 1174 225 1105 q 290 1244 225 1244 m 544 1244 q 610 1174 610 1244 q 544 1105 610 1105 q 479 1174 479 1105 q 544 1244 479 1244 "},"û":{"x_min":109,"x_max":725,"ha":834,"o":"m 625 0 l 607 99 l 600 99 q 373 -14 529 -14 q 109 258 109 -14 l 109 745 l 232 745 l 232 264 q 392 88 232 88 q 551 151 501 88 q 601 357 601 214 l 601 745 l 725 745 l 725 0 l 625 0 m 648 842 l 565 842 q 422 967 508 879 q 279 842 332 875 l 198 842 l 198 860 q 238 905 214 879 q 357 1064 332 1010 l 488 1064 q 607 905 513 1010 l 648 860 l 648 842 "},"Ź":{"x_min":69,"x_max":763,"ha":834,"o":"m 763 0 l 69 0 l 69 97 l 607 880 l 83 880 l 83 992 l 749 992 l 749 895 l 210 111 l 763 111 l 763 0 m 322 1089 q 440 1293 386 1179 l 589 1293 l 589 1278 q 404 1071 512 1161 l 322 1071 l 322 1089 "},"ˉ":{"x_min":221,"x_max":612,"ha":834,"o":"m 221 943 l 612 943 l 612 842 l 221 842 l 221 943 "},"Ĺ":{"x_min":158,"x_max":716,"ha":834,"o":"m 158 0 l 158 992 l 284 992 l 284 111 l 716 111 l 716 0 l 158 0 m 179 1089 q 297 1293 243 1179 l 446 1293 l 446 1278 q 261 1071 369 1161 l 179 1071 l 179 1089 "},"₤":{"x_min":81,"x_max":753,"ha":834,"o":"m 721 949 l 676 852 q 492 898 581 898 q 342 733 342 898 l 342 604 l 596 604 l 596 507 l 342 507 l 342 407 l 596 407 l 596 311 l 342 311 l 342 298 q 245 112 342 165 l 753 112 l 753 0 l 81 0 l 81 104 q 217 296 217 137 l 217 311 l 82 311 l 82 407 l 217 407 l 217 507 l 82 507 l 82 604 l 217 604 l 217 753 q 290 935 217 867 q 486 1004 364 1004 q 721 949 616 1004 "},"Č":{"x_min":87,"x_max":801,"ha":834,"o":"m 763 136 l 763 26 q 519 -14 663 -14 q 198 119 309 -14 q 87 497 87 252 q 208 868 87 731 q 540 1006 330 1006 q 801 947 690 1006 l 747 841 q 540 894 643 894 q 307 787 394 894 q 220 496 220 679 q 302 199 220 301 q 540 97 383 97 q 763 136 629 97 m 747 1274 q 706 1229 730 1255 q 587 1071 611 1122 l 456 1071 q 337 1229 432 1122 l 297 1274 l 297 1293 l 378 1293 q 521 1166 434 1256 q 664 1293 604 1253 l 747 1293 l 747 1274 "},"x":{"x_min":65,"x_max":767,"ha":834,"o":"m 346 382 l 79 745 l 219 745 l 416 466 l 614 745 l 754 745 l 486 382 l 767 0 l 627 0 l 416 295 l 205 0 l 65 0 l 346 382 "},"è":{"x_min":90,"x_max":744,"ha":834,"o":"m 744 346 l 217 346 q 451 93 222 93 q 703 145 584 93 l 703 36 q 456 -14 590 -14 q 189 87 289 -14 q 90 366 90 188 q 182 652 90 547 q 428 758 274 758 q 658 666 572 758 q 744 423 744 575 l 744 346 m 220 449 l 616 449 q 428 655 616 655 q 220 449 238 655 m 521 842 l 438 842 q 254 1049 326 938 l 254 1064 l 402 1064 q 521 860 461 943 l 521 842 "},"Ń":{"x_min":92,"x_max":741,"ha":834,"o":"m 741 0 l 596 0 l 201 821 l 196 821 q 208 538 208 633 l 208 0 l 92 0 l 92 992 l 236 992 l 629 174 l 633 174 q 624 449 624 380 l 624 992 l 741 992 l 741 0 m 350 1089 q 468 1293 414 1179 l 617 1293 l 617 1278 q 432 1071 540 1161 l 350 1071 l 350 1089 "},"ḿ":{"x_min":62,"x_max":773,"ha":834,"o":"m 649 0 l 649 479 q 633 616 649 578 q 579 655 617 655 q 503 599 527 655 q 479 410 479 543 l 479 0 l 356 0 l 356 479 q 280 655 356 655 q 207 601 229 655 q 185 385 185 547 l 185 0 l 62 0 l 62 745 l 159 745 l 180 644 l 186 644 q 320 758 231 758 q 461 634 428 758 l 465 634 q 611 758 516 758 q 734 695 696 758 q 773 486 773 632 l 773 0 l 649 0 m 370 860 q 488 1064 434 950 l 637 1064 l 637 1049 q 452 842 560 932 l 370 842 l 370 860 "},"μ":{"x_min":109,"x_max":725,"ha":834,"o":"m 232 264 q 393 88 232 88 q 551 151 502 88 q 601 357 601 214 l 601 745 l 725 745 l 725 0 l 625 0 l 607 99 l 600 99 q 396 -14 534 -14 q 228 45 279 -14 q 232 -117 232 -58 l 232 -334 l 109 -334 l 109 745 l 232 745 l 232 264 "},".":{"x_min":314,"x_max":520,"ha":834,"o":"m 416 204 q 520 91 520 204 q 416 -21 520 -21 q 314 91 314 -21 q 416 204 314 204 "},"‘":{"x_min":303,"x_max":530,"ha":834,"o":"m 313 652 l 303 666 q 423 992 339 806 l 530 992 q 463 652 488 818 l 313 652 "},"π":{"x_min":9.4375,"x_max":823.421875,"ha":834,"o":"m 803 101 l 803 3 q 710 -14 767 -14 q 557 164 557 -14 l 557 642 l 283 642 l 283 0 l 160 0 l 160 642 l 9 642 l 9 691 l 103 745 l 823 745 l 823 642 l 681 642 l 681 173 q 742 88 681 88 q 803 101 773 88 "},"9":{"x_min":104,"x_max":730,"ha":834,"o":"m 179 -1 l 179 104 q 291 82 224 82 q 518 178 442 82 q 601 483 595 274 l 593 483 q 385 368 528 368 q 178 448 253 368 q 104 670 104 528 q 185 916 104 826 q 405 1006 267 1006 q 642 889 555 1006 q 730 568 730 773 q 295 -14 730 -14 q 179 -1 224 -14 m 223 670 q 269 518 223 571 q 402 464 316 464 q 546 520 488 464 q 604 646 604 576 q 550 825 604 749 q 406 900 496 900 q 271 841 319 900 q 223 670 223 782 "},"l":{"x_min":127.6875,"x_max":723.171875,"ha":834,"o":"m 361 958 l 179 972 l 179 1055 l 484 1055 l 484 96 l 723 83 l 723 0 l 127 0 l 127 83 l 361 96 l 361 958 "},"Ъ":{"x_min":18,"x_max":774,"ha":834,"o":"m 220 0 l 220 880 l 18 880 l 18 992 l 346 992 l 346 574 l 392 574 q 675 500 576 574 q 774 290 774 426 q 679 76 774 153 q 410 0 585 0 l 220 0 m 346 107 l 412 107 q 640 290 640 107 q 582 421 640 379 q 392 462 524 462 l 346 462 l 346 107 "}," ":{"x_min":0,"x_max":0,"ha":834},"Ś":{"x_min":96,"x_max":738,"ha":834,"o":"m 96 32 l 96 152 q 375 93 238 93 q 611 258 611 93 q 564 366 611 328 q 371 456 516 404 q 170 575 231 506 q 109 754 109 644 q 196 939 109 872 q 435 1006 283 1006 q 718 953 591 1006 l 674 841 q 432 894 544 894 q 235 752 235 894 q 279 641 235 683 q 461 551 323 599 q 682 428 626 491 q 738 264 738 364 q 644 60 738 134 q 376 -14 550 -14 q 96 32 197 -14 m 349 1089 q 467 1293 413 1179 l 616 1293 l 616 1278 q 431 1071 539 1161 l 349 1071 l 349 1089 "},"Ü":{"x_min":85,"x_max":749,"ha":834,"o":"m 749 993 l 749 349 q 663 79 749 173 q 412 -14 578 -14 q 85 352 85 -14 l 85 991 l 211 991 l 211 359 q 419 97 211 97 q 622 361 619 97 l 622 993 l 749 993 m 290 1244 q 355 1174 355 1244 q 290 1105 355 1105 q 225 1174 225 1105 q 290 1244 225 1244 m 544 1244 q 610 1174 610 1244 q 544 1105 610 1105 q 479 1174 479 1105 q 544 1244 479 1244 "},"à":{"x_min":92,"x_max":696,"ha":834,"o":"m 606 0 l 580 99 l 575 99 q 468 10 523 35 q 327 -14 413 -14 q 154 44 217 -14 q 92 207 92 102 q 436 442 92 431 l 573 447 l 573 494 q 409 655 573 655 q 187 599 309 655 l 144 692 q 404 758 277 758 q 627 699 558 758 q 696 509 696 640 l 696 0 l 606 0 m 572 362 l 462 357 q 274 315 330 352 q 219 204 219 279 q 354 82 219 82 q 513 138 454 82 q 572 294 572 194 l 572 362 m 493 842 l 410 842 q 226 1049 298 938 l 226 1064 l 374 1064 q 493 860 433 943 l 493 842 "},"η":{"x_min":109,"x_max":725,"ha":834,"o":"m 601 -334 l 601 479 q 440 655 601 655 q 232 385 232 655 l 232 0 l 109 0 l 109 745 l 208 745 l 227 644 l 233 644 q 461 758 302 758 q 725 486 725 758 l 725 -334 l 601 -334 "},"ó":{"x_min":78,"x_max":755,"ha":834,"o":"m 414 -14 q 172 91 267 -14 q 78 373 78 196 q 170 654 78 551 q 418 758 262 758 q 660 652 566 758 q 755 373 755 547 q 661 89 755 193 q 414 -14 568 -14 m 416 88 q 627 373 627 88 q 415 655 627 655 q 205 373 205 655 q 416 88 205 88 m 338 860 q 456 1064 402 950 l 605 1064 l 605 1049 q 420 842 528 932 l 338 842 l 338 860 "},"¦":{"x_min":366,"x_max":467.734375,"ha":834,"o":"m 366 1055 l 467 1055 l 467 526 l 366 526 l 366 1055 m 366 196 l 467 196 l 467 -334 l 366 -334 l 366 196 "},"Ő":{"x_min":57,"x_max":778,"ha":834,"o":"m 417 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 684 118 778 251 q 417 -14 590 -14 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 m 222 1089 q 325 1293 277 1179 l 474 1293 l 474 1278 q 289 1071 398 1161 l 222 1071 l 222 1089 m 467 1089 q 571 1293 519 1169 l 720 1293 l 720 1278 q 535 1071 644 1161 l 467 1071 l 467 1089 "},"Ž":{"x_min":69,"x_max":763,"ha":834,"o":"m 763 0 l 69 0 l 69 97 l 607 880 l 83 880 l 83 992 l 749 992 l 749 895 l 210 111 l 763 111 l 763 0 m 641 1274 q 600 1229 624 1255 q 481 1071 505 1122 l 350 1071 q 231 1229 326 1122 l 191 1274 l 191 1293 l 272 1293 q 415 1166 328 1256 q 558 1293 498 1253 l 641 1293 l 641 1274 "},"е":{"x_min":90,"x_max":744,"ha":834,"o":"m 744 346 l 217 346 q 451 93 222 93 q 703 145 584 93 l 703 36 q 456 -14 590 -14 q 189 87 289 -14 q 90 366 90 188 q 182 652 90 547 q 428 758 274 758 q 658 666 572 758 q 744 423 744 575 l 744 346 m 220 449 l 616 449 q 428 655 616 655 q 220 449 238 655 "},"Î":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 m 642 1071 l 559 1071 q 416 1196 502 1108 q 273 1071 326 1104 l 192 1071 l 192 1089 q 232 1134 208 1108 q 351 1293 326 1239 l 482 1293 q 601 1134 507 1239 l 642 1089 l 642 1071 "},"e":{"x_min":90,"x_max":744,"ha":834,"o":"m 744 346 l 217 346 q 451 93 222 93 q 703 145 584 93 l 703 36 q 456 -14 590 -14 q 189 87 289 -14 q 90 366 90 188 q 182 652 90 547 q 428 758 274 758 q 658 666 572 758 q 744 423 744 575 l 744 346 m 220 449 l 616 449 q 428 655 616 655 q 220 449 238 655 "},"ό":{"x_min":78,"x_max":755,"ha":834,"o":"m 414 -14 q 172 91 267 -14 q 78 373 78 196 q 170 654 78 551 q 418 758 262 758 q 660 652 566 758 q 755 373 755 547 q 661 89 755 193 q 414 -14 568 -14 m 416 88 q 627 373 627 88 q 415 655 627 655 q 205 373 205 655 q 416 88 205 88 m 375 860 l 397 932 q 426 1064 419 1009 l 557 1064 l 557 1049 q 523 968 557 1038 q 448 842 490 898 l 375 842 l 375 860 "},"Ĕ":{"x_min":147,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 m 641 1259 q 580 1121 634 1172 q 434 1071 526 1071 q 233 1259 244 1071 l 307 1259 q 339 1189 312 1206 q 436 1172 366 1172 q 566 1259 559 1172 l 641 1259 "},"ļ":{"x_min":127.6875,"x_max":723.171875,"ha":834,"o":"m 361 958 l 179 972 l 179 1055 l 484 1055 l 484 96 l 723 83 l 723 0 l 127 0 l 127 83 l 361 96 l 361 958 m 313 -288 q 370 -85 355 -193 l 491 -85 l 491 -98 q 458 -182 491 -113 q 380 -307 425 -251 l 313 -307 l 313 -288 "}," ":{"x_min":0,"x_max":0,"ha":834},"Ѓ":{"x_min":158,"x_max":719,"ha":834,"o":"m 719 992 l 719 880 l 284 880 l 284 0 l 158 0 l 158 992 l 719 992 m 345 1089 q 463 1293 409 1179 l 612 1293 l 612 1278 q 427 1071 535 1161 l 345 1071 l 345 1089 "},"ò":{"x_min":78,"x_max":755,"ha":834,"o":"m 414 -14 q 172 91 267 -14 q 78 373 78 196 q 170 654 78 551 q 418 758 262 758 q 660 652 566 758 q 755 373 755 547 q 661 89 755 193 q 414 -14 568 -14 m 416 88 q 627 373 627 88 q 415 655 627 655 q 205 373 205 655 q 416 88 205 88 m 524 842 l 441 842 q 257 1049 329 938 l 257 1064 l 405 1064 q 524 860 464 943 l 524 842 "},"ffl":{"x_min":45.1875,"x_max":723.234375,"ha":834,"o":"m 570 660 l 474 660 l 474 0 l 364 0 l 364 660 l 224 660 l 224 0 l 113 0 l 113 660 l 45 660 l 45 703 l 113 745 l 113 800 q 126 920 113 872 q 166 996 140 968 q 230 1036 192 1025 q 317 1048 268 1048 q 380 1041 350 1048 q 433 1025 410 1033 q 493 1053 458 1044 q 570 1063 528 1063 q 634 1055 603 1063 l 723 1055 l 723 0 l 612 0 l 612 961 q 592 965 602 963 q 573 966 582 966 q 529 958 547 966 q 498 933 510 951 q 480 887 486 916 q 474 814 474 857 l 474 745 l 570 745 l 570 660 m 224 745 l 364 745 l 364 813 q 380 943 364 890 q 351 949 366 947 q 320 952 335 952 q 278 945 296 952 q 248 920 260 937 q 230 873 236 902 q 224 801 224 844 l 224 745 "},"^":{"x_min":75,"x_max":759,"ha":834,"o":"m 75 372 l 363 999 l 432 999 l 759 372 l 649 372 l 399 870 l 182 372 l 75 372 "},"ⁿ":{"x_min":215,"x_max":618,"ha":834,"o":"m 516 541 l 516 820 q 431 921 516 921 q 340 885 364 921 q 316 769 316 849 l 316 541 l 215 541 l 215 992 l 300 992 l 312 920 l 318 920 q 457 1003 364 1003 q 575 958 532 1003 q 618 833 618 914 l 618 541 l 516 541 "},"к":{"x_min":146,"x_max":797,"ha":834,"o":"m 620 745 l 771 745 l 413 387 l 797 0 l 639 0 l 269 377 l 269 0 l 146 0 l 146 745 l 269 745 l 269 383 l 620 745 "},"":{"x_min":37,"x_max":796,"ha":834,"o":"m 456 734 q 447 668 456 697 q 421 616 439 638 q 377 582 403 594 q 314 571 350 571 q 250 582 277 571 q 206 616 223 594 q 180 668 188 638 q 172 734 172 697 q 180 802 172 772 q 206 853 188 832 q 250 887 223 875 q 314 899 277 899 q 377 887 350 899 q 421 853 403 875 q 447 802 439 832 q 456 734 456 772 m 363 539 l 456 539 q 545 521 515 539 q 575 458 575 503 q 562 413 575 431 q 526 390 550 395 l 526 387 q 549 380 538 385 q 567 367 559 375 q 580 346 575 359 q 585 314 585 333 q 555 245 585 269 q 475 221 525 221 l 363 221 l 363 539 m 514 185 l 694 185 l 694 132 l 645 132 l 645 -31 q 615 -111 645 -85 q 539 -137 586 -137 q 503 -135 518 -137 q 481 -131 489 -133 l 481 -75 q 502 -78 489 -77 q 531 -80 515 -80 q 564 -70 551 -80 q 578 -32 578 -60 l 578 132 l 514 132 l 514 185 m 239 734 q 257 656 239 684 q 314 627 275 627 q 370 656 352 627 q 387 734 387 684 q 370 813 387 785 q 314 842 352 842 q 257 813 275 842 q 239 734 239 785 m 37 823 l 37 1030 l 242 1030 l 242 954 l 112 954 l 112 823 l 37 823 m 37 -260 l 37 -54 l 112 -54 l 112 -186 l 242 -186 l 242 -260 l 37 -260 m 589 954 l 589 1030 l 796 1030 l 796 823 l 722 823 l 722 954 l 589 954 m 589 -260 l 589 -186 l 722 -186 l 722 -54 l 796 -54 l 796 -260 l 589 -260 m 112 291 l 37 291 l 37 476 l 112 476 l 112 291 m 324 954 l 324 1030 l 508 1030 l 508 954 l 324 954 m 112 26 l 37 26 l 37 210 l 112 210 l 112 26 m 112 558 l 37 558 l 37 742 l 112 742 l 112 558 m 796 291 l 722 291 l 722 476 l 796 476 l 796 291 m 796 26 l 722 26 l 722 210 l 796 210 l 796 26 m 796 558 l 722 558 l 722 742 l 796 742 l 796 558 m 324 -260 l 324 -186 l 508 -186 l 508 -260 l 324 -260 m 429 359 l 429 276 l 469 276 q 505 288 495 276 q 515 320 515 299 q 505 348 515 337 q 466 359 495 359 l 429 359 m 429 414 l 464 414 q 499 423 489 414 q 509 449 509 432 q 497 475 509 467 q 461 483 486 483 l 429 483 l 429 414 "},"ū":{"x_min":109,"x_max":725,"ha":834,"o":"m 625 0 l 607 99 l 600 99 q 373 -14 529 -14 q 109 258 109 -14 l 109 745 l 232 745 l 232 264 q 392 88 232 88 q 551 151 501 88 q 601 357 601 214 l 601 745 l 725 745 l 725 0 l 625 0 m 222 943 l 613 943 l 613 842 l 222 842 l 222 943 "},"ˆ":{"x_min":192,"x_max":642,"ha":834,"o":"m 642 842 l 559 842 q 416 967 502 879 q 273 842 326 875 l 192 842 l 192 860 q 232 905 208 879 q 351 1064 326 1010 l 482 1064 q 601 905 507 1010 l 642 860 l 642 842 "},"Ẅ":{"x_min":1,"x_max":833,"ha":834,"o":"m 358 684 l 478 684 l 577 330 q 626 122 618 181 q 670 542 627 158 l 717 992 l 833 992 l 706 0 l 577 0 l 462 393 q 418 584 435 487 q 373 392 396 467 l 267 0 l 139 0 l 1 992 l 116 992 l 176 542 q 203 285 191 422 q 215 122 215 148 q 262 333 231 224 l 358 684 m 292 1244 q 357 1174 357 1244 q 292 1105 357 1105 q 227 1174 227 1105 q 292 1244 227 1244 m 546 1244 q 612 1174 612 1244 q 546 1105 612 1105 q 481 1174 481 1105 q 546 1244 481 1244 "},"č":{"x_min":117,"x_max":720,"ha":834,"o":"m 720 717 l 677 610 q 496 650 576 650 q 244 369 244 650 q 489 93 244 93 q 707 135 595 93 l 707 27 q 483 -14 616 -14 q 213 84 309 -14 q 117 367 117 183 q 215 658 117 558 q 492 758 313 758 q 720 717 612 758 m 705 1045 q 664 1000 688 1026 q 545 842 569 893 l 414 842 q 295 1000 390 893 l 255 1045 l 255 1064 l 336 1064 q 479 937 392 1027 q 622 1064 562 1024 l 705 1064 l 705 1045 "},"’":{"x_min":303,"x_max":530,"ha":834,"o":"m 520 992 l 530 977 q 410 652 492 832 l 303 652 q 369 992 345 832 l 520 992 "},"Ν":{"x_min":92,"x_max":741,"ha":834,"o":"m 741 0 l 596 0 l 201 821 l 196 821 q 208 538 208 633 l 208 0 l 92 0 l 92 992 l 236 992 l 629 174 l 633 174 q 624 449 624 380 l 624 992 l 741 992 l 741 0 "},"-":{"x_min":193,"x_max":641,"ha":834,"o":"m 193 315 l 193 429 l 641 429 l 641 315 l 193 315 "},"Q":{"x_min":57,"x_max":778,"ha":834,"o":"m 584 26 q 774 -184 642 -95 l 691 -281 q 469 -9 531 -165 q 417 -14 444 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 584 26 778 139 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 "},"ј":{"x_min":92,"x_max":580,"ha":834,"o":"m 504 1051 q 577 973 577 1051 q 504 896 577 896 q 432 973 432 896 q 504 1051 432 1051 m 92 -310 l 92 -205 q 288 -231 182 -231 q 412 -192 367 -231 q 456 -85 456 -154 l 456 648 l 171 662 l 171 745 l 580 745 l 580 -79 q 503 -267 580 -201 q 286 -334 426 -334 q 92 -310 175 -334 "},"ě":{"x_min":90,"x_max":744,"ha":834,"o":"m 744 346 l 217 346 q 451 93 222 93 q 703 145 584 93 l 703 36 q 456 -14 590 -14 q 189 87 289 -14 q 90 366 90 188 q 182 652 90 547 q 428 758 274 758 q 658 666 572 758 q 744 423 744 575 l 744 346 m 220 449 l 616 449 q 428 655 616 655 q 220 449 238 655 m 659 1045 q 618 1000 642 1026 q 499 842 523 893 l 368 842 q 249 1000 344 893 l 209 1045 l 209 1064 l 290 1064 q 433 937 346 1027 q 576 1064 516 1024 l 659 1064 l 659 1045 "},"œ":{"x_min":39,"x_max":797,"ha":834,"o":"m 445 135 q 263 -14 385 -14 q 101 90 163 -14 q 39 373 39 194 q 99 656 39 555 q 264 758 159 758 q 442 610 381 758 q 605 758 499 758 q 745 667 693 758 q 797 423 797 576 l 797 346 l 506 346 q 631 93 508 93 q 765 145 702 93 l 765 35 q 620 -14 702 -14 q 513 26 561 -14 q 445 135 465 66 m 273 88 q 383 366 383 88 q 272 655 383 655 q 187 585 213 655 q 162 373 162 515 q 188 159 162 230 q 273 88 213 88 m 676 449 q 596 655 676 655 q 507 449 515 655 l 676 449 "},"#":{"x_min":31,"x_max":803,"ha":834,"o":"m 635 606 l 592 383 l 754 383 l 754 290 l 574 290 l 519 0 l 418 0 l 475 290 l 276 290 l 219 0 l 125 0 l 177 290 l 31 290 l 31 383 l 195 383 l 239 606 l 83 606 l 83 699 l 256 699 l 311 992 l 413 992 l 357 699 l 557 699 l 615 992 l 710 992 l 653 699 l 803 699 l 803 606 l 635 606 m 294 383 l 494 383 l 538 606 l 339 606 l 294 383 "},"Џ":{"x_min":92,"x_max":742,"ha":834,"o":"m 742 0 l 482 0 l 482 -261 l 356 -261 l 356 0 l 92 0 l 92 992 l 218 992 l 218 111 l 615 111 l 615 992 l 742 992 l 742 0 "},"Å":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 m 414 927 q 304 966 345 927 q 263 1073 263 1005 q 304 1179 263 1140 q 414 1219 345 1219 q 526 1178 482 1219 q 570 1074 570 1138 q 526 967 570 1007 q 414 927 483 927 m 416 1149 q 359 1129 381 1149 q 337 1073 337 1109 q 416 996 337 996 q 473 1016 451 996 q 495 1073 495 1036 q 473 1129 495 1109 q 416 1149 451 1149 "},"ș":{"x_min":138,"x_max":696,"ha":834,"o":"m 138 32 l 138 145 q 388 88 268 88 q 575 196 575 88 q 542 264 575 235 q 388 336 508 292 q 190 444 231 395 q 149 560 149 493 q 224 705 149 652 q 433 758 300 758 q 684 707 568 758 l 643 606 q 428 655 520 655 q 269 565 269 655 q 303 499 269 523 q 460 430 337 474 q 649 327 602 378 q 696 203 696 277 q 616 44 696 102 q 392 -14 537 -14 q 138 32 224 -14 m 309 -288 q 366 -85 351 -193 l 487 -85 l 487 -98 q 454 -182 487 -113 q 376 -307 421 -251 l 309 -307 l 309 -288 "},"¸":{"x_min":291,"x_max":544,"ha":834,"o":"m 291 -327 l 291 -254 q 344 -258 313 -258 q 446 -196 446 -258 q 330 -119 446 -146 l 392 0 l 472 0 l 434 -78 q 544 -194 544 -103 q 346 -334 544 -334 q 291 -327 323 -334 "},"=":{"x_min":103,"x_max":730,"ha":834,"o":"m 103 577 l 103 679 l 730 679 l 730 577 l 103 577 m 103 300 l 103 401 l 730 401 l 730 300 l 103 300 "},"ρ":{"x_min":107,"x_max":735,"ha":834,"o":"m 230 47 l 226 47 q 230 -136 230 -70 l 230 -334 l 107 -334 l 107 373 q 192 654 107 551 q 426 758 278 758 q 650 653 566 758 q 735 373 735 549 q 651 88 735 190 q 421 -14 567 -14 q 230 47 307 -14 m 230 156 q 422 88 306 88 q 564 159 520 88 q 607 373 607 231 q 563 585 607 515 q 421 655 519 655 q 230 386 230 655 l 230 156 "},"Ћ":{"x_min":16,"x_max":791,"ha":834,"o":"m 345 609 l 524 609 q 721 543 651 609 q 791 357 791 477 l 791 0 l 664 0 l 664 340 q 510 497 664 497 l 345 497 l 345 0 l 219 0 l 219 880 l 16 880 l 16 992 l 587 992 l 587 880 l 345 880 l 345 609 "},"ú":{"x_min":109,"x_max":725,"ha":834,"o":"m 625 0 l 607 99 l 600 99 q 373 -14 529 -14 q 109 258 109 -14 l 109 745 l 232 745 l 232 264 q 392 88 232 88 q 551 151 501 88 q 601 357 601 214 l 601 745 l 725 745 l 725 0 l 625 0 m 339 860 q 457 1064 403 950 l 606 1064 l 606 1049 q 421 842 529 932 l 339 842 l 339 860 "},"˚":{"x_min":263,"x_max":570,"ha":834,"o":"m 414 842 q 304 881 345 842 q 263 988 263 920 q 304 1094 263 1055 q 414 1134 345 1134 q 526 1093 482 1134 q 570 989 570 1053 q 526 882 570 922 q 414 842 483 842 m 416 1064 q 359 1044 381 1064 q 337 988 337 1024 q 416 911 337 911 q 473 931 451 911 q 495 988 495 951 q 473 1044 495 1024 q 416 1064 451 1064 "},"д":{"x_min":22,"x_max":765,"ha":834,"o":"m 765 -258 l 644 -258 l 644 0 l 145 0 l 145 -258 l 22 -258 l 22 102 l 80 102 q 261 745 258 367 l 663 745 l 663 102 l 765 102 l 765 -258 m 539 102 l 539 648 l 369 648 q 210 102 345 321 l 539 102 "},"¯":{"x_min":-14,"x_max":847,"ha":834,"o":"m 847 1055 l -14 1055 l -14 1149 l 847 1149 l 847 1055 "},"u":{"x_min":109,"x_max":725,"ha":834,"o":"m 625 0 l 607 99 l 600 99 q 373 -14 529 -14 q 109 258 109 -14 l 109 745 l 232 745 l 232 264 q 392 88 232 88 q 551 151 501 88 q 601 357 601 214 l 601 745 l 725 745 l 725 0 l 625 0 "},"З":{"x_min":94,"x_max":727,"ha":834,"o":"m 476 521 l 476 517 q 662 440 597 501 q 727 281 727 378 q 630 64 727 143 q 356 -14 534 -14 q 94 39 192 -14 l 94 154 q 353 93 218 93 q 593 281 593 93 q 326 457 593 457 l 198 457 l 198 565 l 317 565 q 507 614 439 565 q 575 747 575 664 q 528 857 575 816 q 400 898 480 898 q 161 819 274 898 l 98 904 q 407 1006 229 1006 q 629 938 549 1006 q 709 759 709 871 q 648 602 709 666 q 476 521 587 539 "},"Α":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 "},"⅝":{"x_min":16,"x_max":832,"ha":834,"o":"m 16 478 l 16 566 q 149 524 81 524 q 253 624 253 524 q 146 723 253 723 q 66 708 113 723 l 27 735 l 48 992 l 317 992 l 317 914 l 121 914 l 110 787 q 175 792 134 792 q 305 747 255 792 q 355 629 355 703 q 304 494 355 542 q 154 446 253 446 q 16 478 70 446 m 705 992 l 210 0 l 103 0 l 597 992 l 705 992 m 720 287 q 832 147 832 230 q 780 35 832 77 q 644 -7 728 -7 q 502 33 552 -7 q 453 143 453 73 q 546 281 453 231 q 470 412 470 335 q 518 511 470 474 q 643 549 567 549 q 766 512 718 549 q 814 412 814 475 q 720 287 814 334 m 645 321 q 712 413 712 355 q 641 480 712 480 q 571 413 571 480 q 645 321 571 357 m 630 247 q 554 142 554 203 q 641 61 554 61 q 730 142 730 61 q 639 243 730 203 l 630 247 "},"é":{"x_min":90,"x_max":744,"ha":834,"o":"m 744 346 l 217 346 q 451 93 222 93 q 703 145 584 93 l 703 36 q 456 -14 590 -14 q 189 87 289 -14 q 90 366 90 188 q 182 652 90 547 q 428 758 274 758 q 658 666 572 758 q 744 423 744 575 l 744 346 m 220 449 l 616 449 q 428 655 616 655 q 220 449 238 655 m 339 860 q 457 1064 403 950 l 606 1064 l 606 1049 q 421 842 529 932 l 339 842 l 339 860 "},"Ş":{"x_min":96,"x_max":738,"ha":834,"o":"m 96 32 l 96 152 q 375 93 238 93 q 611 258 611 93 q 564 366 611 328 q 371 456 516 404 q 170 575 231 506 q 109 754 109 644 q 196 939 109 872 q 435 1006 283 1006 q 718 953 591 1006 l 674 841 q 432 894 544 894 q 235 752 235 894 q 279 641 235 683 q 461 551 323 599 q 682 428 626 491 q 738 264 738 364 q 644 60 738 134 q 376 -14 550 -14 q 96 32 197 -14 m 277 -327 l 277 -254 q 330 -258 299 -258 q 432 -196 432 -258 q 316 -119 432 -146 l 378 0 l 458 0 l 420 -78 q 530 -194 530 -103 q 332 -334 530 -334 q 277 -327 309 -334 "},"B":{"x_min":92,"x_max":772,"ha":834,"o":"m 92 992 l 390 992 q 660 932 576 992 q 744 740 744 873 q 690 596 744 653 q 546 526 637 538 l 546 519 q 772 287 772 482 q 685 76 772 153 q 449 0 598 0 l 92 0 l 92 992 m 218 572 l 409 572 q 562 609 514 572 q 610 732 610 646 q 558 848 610 813 q 395 884 507 884 l 218 884 l 218 572 m 218 464 l 218 107 l 426 107 q 638 292 638 107 q 418 464 638 464 l 218 464 "},"…":{"x_min":53,"x_max":780.265625,"ha":834,"o":"m 139 168 q 225 74 225 168 q 139 -20 225 -20 q 53 74 53 -20 q 139 168 53 168 m 416 168 q 502 74 502 168 q 416 -20 502 -20 q 330 74 330 -20 q 416 168 330 168 m 694 168 q 780 74 780 168 q 694 -20 780 -20 q 608 74 608 -20 q 694 168 608 168 "},"H":{"x_min":92,"x_max":742,"ha":834,"o":"m 742 0 l 615 0 l 615 462 l 218 462 l 218 0 l 92 0 l 92 992 l 218 992 l 218 574 l 615 574 l 615 992 l 742 992 l 742 0 "},"î":{"x_min":133.6875,"x_max":729.171875,"ha":834,"o":"m 367 648 l 184 662 l 184 745 l 490 745 l 490 96 l 729 83 l 729 0 l 133 0 l 133 83 l 367 96 l 367 648 m 642 842 l 559 842 q 416 967 502 879 q 273 842 326 875 l 192 842 l 192 860 q 232 905 208 879 q 351 1064 326 1010 l 482 1064 q 601 905 507 1010 l 642 860 l 642 842 "},"ν":{"x_min":40.75,"x_max":745,"ha":834,"o":"m 40 745 l 168 745 l 320 347 q 402 104 395 151 l 406 104 q 567 354 513 215 q 621 745 621 493 l 745 745 q 676 331 745 497 q 455 0 608 164 l 328 0 l 40 745 "},"Ό":{"x_min":-89,"x_max":778,"ha":834,"o":"m 417 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 684 118 778 251 q 417 -14 590 -14 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 m -89 789 l -66 861 q -37 993 -44 938 l 93 993 l 93 978 q 59 897 93 967 q -15 771 26 827 l -89 771 l -89 789 "},"−":{"x_min":103,"x_max":730,"ha":834,"o":"m 103 439 l 103 541 l 730 541 l 730 439 l 103 439 "},"⅜":{"x_min":8,"x_max":832,"ha":834,"o":"m 230 738 q 350 611 350 711 q 299 487 350 531 q 153 444 248 444 q 8 477 65 444 l 8 562 q 146 522 83 522 q 248 614 248 522 q 147 699 248 699 l 98 699 l 98 768 l 145 768 q 230 851 230 768 q 164 924 230 924 q 54 880 115 924 l 9 938 q 170 1002 84 1002 q 288 965 244 1002 q 332 865 332 928 q 230 738 332 771 m 705 992 l 210 0 l 103 0 l 597 992 l 705 992 m 720 287 q 832 147 832 230 q 780 35 832 77 q 644 -7 728 -7 q 502 33 552 -7 q 453 143 453 73 q 546 281 453 231 q 470 412 470 335 q 518 511 470 474 q 643 549 567 549 q 766 512 718 549 q 814 412 814 475 q 720 287 814 334 m 645 321 q 712 413 712 355 q 641 480 712 480 q 571 413 571 480 q 645 321 571 357 m 630 247 q 554 142 554 203 q 641 61 554 61 q 730 142 730 61 q 639 243 730 203 l 630 247 "},"ǰ":{"x_min":92,"x_max":637,"ha":834,"o":"m 92 -310 l 92 -205 q 288 -231 182 -231 q 412 -192 367 -231 q 456 -85 456 -154 l 456 648 l 171 662 l 171 745 l 580 745 l 580 -79 q 503 -267 580 -201 q 286 -334 426 -334 q 92 -310 175 -334 m 637 1045 q 596 1000 620 1026 q 477 842 501 893 l 346 842 q 227 1000 322 893 l 187 1045 l 187 1064 l 268 1064 q 411 937 324 1027 q 554 1064 494 1024 l 637 1064 l 637 1045 "},"ā":{"x_min":92,"x_max":696,"ha":834,"o":"m 606 0 l 580 99 l 575 99 q 468 10 523 35 q 327 -14 413 -14 q 154 44 217 -14 q 92 207 92 102 q 436 442 92 431 l 573 447 l 573 494 q 409 655 573 655 q 187 599 309 655 l 144 692 q 404 758 277 758 q 627 699 558 758 q 696 509 696 640 l 696 0 l 606 0 m 572 362 l 462 357 q 274 315 330 352 q 219 204 219 279 q 354 82 219 82 q 513 138 454 82 q 572 294 572 194 l 572 362 m 215 943 l 606 943 l 606 842 l 215 842 l 215 943 "},"ĵ":{"x_min":92,"x_max":656,"ha":834,"o":"m 656 842 l 573 842 q 430 967 516 879 q 287 842 340 875 l 206 842 l 206 860 q 246 905 222 879 q 365 1064 340 1010 l 496 1064 q 615 905 521 1010 l 656 860 l 656 842 m 92 -310 l 92 -205 q 288 -231 182 -231 q 412 -192 367 -231 q 456 -85 456 -154 l 456 648 l 171 662 l 171 745 l 580 745 l 580 -79 q 503 -267 580 -201 q 286 -334 426 -334 q 92 -310 175 -334 "},"Ĩ":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 m 243 1070 l 172 1070 q 315 1250 188 1250 q 424 1211 354 1250 q 516 1173 493 1173 q 588 1251 571 1173 l 660 1251 q 517 1072 641 1072 q 410 1110 478 1072 q 315 1148 342 1148 q 243 1070 260 1148 "},"*":{"x_min":90.34375,"x_max":743.46875,"ha":834,"o":"m 485 1055 l 455 788 l 725 863 l 743 733 l 486 714 l 653 493 l 531 428 l 412 670 l 306 428 l 180 493 l 344 714 l 90 733 l 110 863 l 375 788 l 346 1055 l 485 1055 "},"ă":{"x_min":92,"x_max":696,"ha":834,"o":"m 606 0 l 580 99 l 575 99 q 468 10 523 35 q 327 -14 413 -14 q 154 44 217 -14 q 92 207 92 102 q 436 442 92 431 l 573 447 l 573 494 q 409 655 573 655 q 187 599 309 655 l 144 692 q 404 758 277 758 q 627 699 558 758 q 696 509 696 640 l 696 0 l 606 0 m 572 362 l 462 357 q 274 315 330 352 q 219 204 219 279 q 354 82 219 82 q 513 138 454 82 q 572 294 572 194 l 572 362 m 613 1030 q 552 892 606 943 q 406 842 498 842 q 205 1030 216 842 l 279 1030 q 311 960 284 977 q 408 943 338 943 q 538 1030 531 943 l 613 1030 "},"Χ":{"x_min":36,"x_max":797,"ha":834,"o":"m 797 0 l 653 0 l 412 430 l 164 0 l 36 0 l 343 518 l 57 992 l 191 992 l 416 612 l 643 992 l 773 992 l 486 522 l 797 0 "},"†":{"x_min":163.375,"x_max":671.359375,"ha":834,"o":"m 671 670 l 446 691 l 484 0 l 337 0 l 374 691 l 163 670 l 163 793 l 374 772 l 337 1055 l 484 1055 l 446 772 l 671 793 l 671 670 "},"°":{"x_min":203,"x_max":631,"ha":834,"o":"m 416 1006 q 567 942 504 1006 q 631 791 631 879 q 567 641 631 703 q 416 579 504 579 q 265 641 327 579 q 203 791 203 704 q 265 942 203 879 q 416 1006 328 1006 m 416 661 q 500 699 465 661 q 536 790 536 737 q 500 884 536 845 q 416 923 464 923 q 332 884 367 923 q 297 790 297 845 q 332 699 297 737 q 416 661 367 661 "},"Ξ":{"x_min":75,"x_max":757,"ha":834,"o":"m 103 992 l 729 992 l 729 880 l 103 880 l 103 992 m 158 574 l 674 574 l 674 462 l 158 462 l 158 574 m 757 111 l 757 0 l 75 0 l 75 111 l 757 111 "},"Ķ":{"x_min":143,"x_max":813.25,"ha":834,"o":"m 813 0 l 669 0 l 364 473 l 269 396 l 269 0 l 143 0 l 143 992 l 269 992 l 269 496 l 351 609 l 659 992 l 801 992 l 447 559 l 813 0 m 347 -288 q 404 -85 389 -193 l 525 -85 l 525 -98 q 492 -182 525 -113 q 414 -307 459 -251 l 347 -307 l 347 -288 "},"ŵ":{"x_min":-3,"x_max":836,"ha":834,"o":"m 551 0 l 462 404 l 416 628 l 411 628 l 367 401 l 276 0 l 148 0 l -3 745 l 106 745 l 173 376 q 212 109 196 250 l 216 109 q 262 352 237 235 l 352 745 l 483 745 l 569 352 q 614 109 598 220 l 619 109 q 659 376 640 274 l 728 745 l 836 745 l 683 0 l 551 0 m 640 842 l 557 842 q 414 967 500 879 q 271 842 324 875 l 190 842 l 190 860 q 230 905 206 879 q 349 1064 324 1010 l 480 1064 q 599 905 505 1010 l 640 860 l 640 842 "},"΄":{"x_min":326,"x_max":508,"ha":834,"o":"m 326 860 l 348 932 q 377 1064 370 1009 l 508 1064 l 508 1049 q 474 968 508 1038 q 399 842 441 898 l 326 842 l 326 860 "},"ǽ":{"x_min":31,"x_max":805,"ha":834,"o":"m 354 450 l 354 496 q 260 655 354 655 q 117 599 187 655 l 78 692 q 268 758 168 758 q 437 637 398 758 q 598 758 490 758 q 747 665 690 758 q 805 424 805 573 l 805 347 l 476 347 q 520 157 478 219 q 632 96 563 96 q 786 145 705 96 l 786 35 q 624 -14 714 -14 q 412 144 475 -14 q 206 -14 340 -14 q 79 44 127 -14 q 31 208 31 103 q 253 445 31 434 l 354 450 m 479 450 l 684 450 q 657 600 684 545 q 585 655 631 655 q 512 603 541 655 q 479 450 483 550 m 353 363 l 295 358 q 154 207 154 347 q 175 120 154 152 q 231 88 196 88 q 319 143 285 88 q 353 296 353 198 l 353 363 m 361 860 q 479 1064 425 950 l 628 1064 l 628 1049 q 443 842 551 932 l 361 842 l 361 860 "},"Β":{"x_min":92,"x_max":772,"ha":834,"o":"m 92 992 l 390 992 q 660 932 576 992 q 744 740 744 873 q 690 596 744 653 q 546 526 637 538 l 546 519 q 772 287 772 482 q 685 76 772 153 q 449 0 598 0 l 92 0 l 92 992 m 218 572 l 409 572 q 562 609 514 572 q 610 732 610 646 q 558 848 610 813 q 395 884 507 884 l 218 884 l 218 572 m 218 464 l 218 107 l 426 107 q 638 292 638 107 q 418 464 638 464 l 218 464 "},"Ļ":{"x_min":158,"x_max":716,"ha":834,"o":"m 158 0 l 158 992 l 284 992 l 284 111 l 716 111 l 716 0 l 158 0 m 333 -288 q 390 -85 375 -193 l 511 -85 l 511 -98 q 478 -182 511 -113 q 400 -307 445 -251 l 333 -307 l 333 -288 "},"Õ":{"x_min":57,"x_max":778,"ha":834,"o":"m 417 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 684 118 778 251 q 417 -14 590 -14 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 m 249 1070 l 178 1070 q 321 1250 194 1250 q 430 1211 360 1250 q 522 1173 499 1173 q 594 1251 577 1173 l 666 1251 q 523 1072 647 1072 q 416 1110 484 1072 q 321 1148 348 1148 q 249 1070 266 1148 "},"№":{"x_min":17,"x_max":820,"ha":834,"o":"m 441 0 l 322 0 l 101 793 l 94 793 q 107 510 107 621 l 107 0 l 17 0 l 17 992 l 135 992 l 355 202 l 359 202 q 350 476 350 408 l 350 992 l 441 992 l 441 0 m 647 183 q 524 246 570 183 q 479 420 479 310 q 650 656 479 656 q 773 593 727 656 q 820 420 820 531 q 775 244 820 306 q 647 183 730 183 m 649 264 q 711 303 694 264 q 729 421 729 343 q 711 537 729 499 q 649 574 694 574 q 587 536 604 574 q 569 421 569 498 q 587 304 569 344 q 649 264 604 264 m 506 0 l 506 96 l 787 96 l 787 0 l 506 0 "},"χ":{"x_min":29,"x_max":791,"ha":834,"o":"m 432 342 l 644 745 l 765 745 l 480 218 l 607 -94 q 665 -201 638 -171 q 736 -231 693 -231 q 791 -226 766 -231 l 791 -321 q 710 -334 746 -334 q 595 -303 641 -334 q 501 -153 549 -273 l 402 102 l 161 -334 l 29 -334 l 351 229 l 229 530 q 125 644 183 644 q 83 638 106 644 l 83 735 q 170 747 119 747 q 263 710 225 747 q 337 578 300 673 l 432 342 "},"ί":{"x_min":290,"x_max":690,"ha":834,"o":"m 413 745 l 413 220 q 544 88 413 88 q 690 101 621 88 l 690 7 q 536 -14 626 -14 q 290 219 290 -14 l 290 745 l 413 745 m 319 860 l 341 932 q 370 1064 363 1009 l 501 1064 l 501 1049 q 467 968 501 1038 q 392 842 434 898 l 319 842 l 319 860 "},"Ζ":{"x_min":69,"x_max":763,"ha":834,"o":"m 763 0 l 69 0 l 69 97 l 607 880 l 83 880 l 83 992 l 749 992 l 749 895 l 210 111 l 763 111 l 763 0 "},"Ľ":{"x_min":158,"x_max":716,"ha":834,"o":"m 158 0 l 158 992 l 284 992 l 284 111 l 716 111 l 716 0 l 158 0 m 509 787 l 526 860 q 550 992 544 939 l 672 992 l 672 978 q 643 901 672 968 q 573 770 615 834 l 509 770 l 509 787 "},"ť":{"x_min":95,"x_max":706,"ha":834,"o":"m 692 101 l 692 7 q 521 -14 603 -14 q 276 218 276 -14 l 276 648 l 95 648 l 95 715 l 276 749 l 328 943 l 399 943 l 399 745 l 696 745 l 696 648 l 399 648 l 399 219 q 529 88 399 88 q 692 101 592 88 m 543 850 l 560 923 q 584 1055 578 1002 l 706 1055 l 706 1041 q 677 964 706 1031 q 607 833 649 897 l 543 833 l 543 850 "},"5":{"x_min":117,"x_max":716,"ha":834,"o":"m 117 39 l 117 156 q 361 91 214 91 q 590 303 590 91 q 356 502 590 502 q 199 485 295 502 l 138 524 l 175 992 l 643 992 l 643 879 l 282 879 l 256 594 q 397 608 328 608 q 628 530 540 608 q 716 317 716 452 q 622 72 716 158 q 358 -14 528 -14 q 117 39 206 -14 "},"o":{"x_min":78,"x_max":755,"ha":834,"o":"m 414 -14 q 172 91 267 -14 q 78 373 78 196 q 170 654 78 551 q 418 758 262 758 q 660 652 566 758 q 755 373 755 547 q 661 89 755 193 q 414 -14 568 -14 m 416 88 q 627 373 627 88 q 415 655 627 655 q 205 373 205 655 q 416 88 205 88 "},"Ѕ":{"x_min":96,"x_max":738,"ha":834,"o":"m 96 32 l 96 152 q 375 93 238 93 q 611 258 611 93 q 564 366 611 328 q 371 456 516 404 q 170 575 231 506 q 109 754 109 644 q 196 939 109 872 q 435 1006 283 1006 q 718 953 591 1006 l 674 841 q 432 894 544 894 q 235 752 235 894 q 279 641 235 683 q 461 551 323 599 q 682 428 626 491 q 738 264 738 364 q 644 60 738 134 q 376 -14 550 -14 q 96 32 197 -14 "},"�":{"x_min":2.796875,"x_max":832.25,"ha":834,"o":"m 416 1055 l 832 419 l 416 -216 l 2 419 l 416 1055 m 453 261 l 453 290 q 455 317 453 305 q 464 340 458 328 q 483 362 471 351 q 514 389 495 374 q 556 431 538 412 q 585 472 574 451 q 603 517 597 493 q 610 572 610 541 q 558 702 610 656 q 415 749 506 749 q 367 744 391 749 q 318 731 342 739 q 273 711 295 722 q 232 687 251 700 l 276 579 q 348 614 314 600 q 413 628 383 628 q 466 610 449 628 q 483 563 483 592 q 480 532 483 546 q 468 506 476 518 q 447 481 460 494 q 415 453 434 469 q 379 416 394 434 q 355 381 365 399 q 342 342 346 362 q 338 298 338 322 l 338 261 l 453 261 m 324 94 q 346 30 324 50 q 402 11 368 11 q 430 15 416 11 q 455 30 444 20 q 472 56 466 40 q 479 94 479 72 q 472 133 479 117 q 455 159 466 149 q 430 173 444 169 q 402 177 416 177 q 346 158 368 177 q 324 94 324 139 "},"d":{"x_min":93,"x_max":727,"ha":834,"o":"m 608 99 l 603 99 q 384 -14 526 -14 q 170 87 248 -14 q 93 370 93 188 q 171 655 93 553 q 384 758 249 758 q 603 649 524 758 l 611 649 q 603 759 603 736 l 603 1055 l 727 1055 l 727 0 l 627 0 l 608 99 m 603 342 l 603 370 q 556 590 603 524 q 405 655 508 655 q 220 369 220 655 q 406 88 220 88 q 555 148 510 88 q 603 342 600 208 "},",":{"x_min":299,"x_max":534,"ha":834,"o":"m 523 178 l 534 161 q 402 -196 495 9 l 299 -196 q 373 178 349 23 l 523 178 "},"\"":{"x_min":193,"x_max":640.734375,"ha":834,"o":"m 353 992 l 325 634 l 220 634 l 193 992 l 353 992 m 640 992 l 612 634 l 507 634 l 480 992 l 640 992 "},"ľ":{"x_min":127.6875,"x_max":750,"ha":834,"o":"m 361 958 l 179 972 l 179 1055 l 484 1055 l 484 96 l 723 83 l 723 0 l 127 0 l 127 83 l 361 96 l 361 958 m 587 850 l 604 923 q 628 1055 622 1002 l 750 1055 l 750 1041 q 721 964 750 1031 q 651 833 693 897 l 587 833 l 587 850 "},"ė":{"x_min":90,"x_max":744,"ha":834,"o":"m 744 346 l 217 346 q 451 93 222 93 q 703 145 584 93 l 703 36 q 456 -14 590 -14 q 189 87 289 -14 q 90 366 90 188 q 182 652 90 547 q 428 758 274 758 q 658 666 572 758 q 744 423 744 575 l 744 346 m 220 449 l 616 449 q 428 655 616 655 q 220 449 238 655 m 439 1023 q 504 945 504 1023 q 439 868 504 868 q 374 945 374 868 q 439 1023 374 1023 "},"Í":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 m 364 1089 q 482 1293 428 1179 l 631 1293 l 631 1278 q 446 1071 554 1161 l 364 1071 l 364 1089 "},"Ú":{"x_min":85,"x_max":749,"ha":834,"o":"m 749 993 l 749 349 q 663 79 749 173 q 412 -14 578 -14 q 85 352 85 -14 l 85 991 l 211 991 l 211 359 q 419 97 211 97 q 622 361 619 97 l 622 993 l 749 993 m 335 1089 q 453 1293 399 1179 l 602 1293 l 602 1278 q 417 1071 525 1161 l 335 1071 l 335 1089 "}," ":{"x_min":0,"x_max":0,"ha":834},"Ŷ":{"x_min":23,"x_max":809,"ha":834,"o":"m 415 490 l 672 992 l 809 992 l 479 386 l 479 0 l 353 0 l 353 379 l 23 992 l 160 992 l 415 490 m 641 1071 l 558 1071 q 415 1196 501 1108 q 272 1071 325 1104 l 191 1071 l 191 1089 q 231 1134 207 1108 q 350 1293 325 1239 l 481 1293 q 600 1134 506 1239 l 641 1089 l 641 1071 "},"Ý":{"x_min":23,"x_max":809,"ha":834,"o":"m 415 490 l 672 992 l 809 992 l 479 386 l 479 0 l 353 0 l 353 379 l 23 992 l 160 992 l 415 490 m 335 1089 q 453 1293 399 1179 l 602 1293 l 602 1278 q 417 1071 525 1161 l 335 1071 l 335 1089 "},"ŝ":{"x_min":138,"x_max":696,"ha":834,"o":"m 138 32 l 138 145 q 388 88 268 88 q 575 196 575 88 q 542 264 575 235 q 388 336 508 292 q 190 444 231 395 q 149 560 149 493 q 224 705 149 652 q 433 758 300 758 q 684 707 568 758 l 643 606 q 428 655 520 655 q 269 565 269 655 q 303 499 269 523 q 460 430 337 474 q 649 327 602 378 q 696 203 696 277 q 616 44 696 102 q 392 -14 537 -14 q 138 32 224 -14 m 658 842 l 575 842 q 432 967 518 879 q 289 842 342 875 l 208 842 l 208 860 q 248 905 224 879 q 367 1064 342 1010 l 498 1064 q 617 905 523 1010 l 658 860 l 658 842 "}," ":{"x_min":0,"x_max":0,"ha":834},"ą":{"x_min":92,"x_max":751,"ha":834,"o":"m 606 0 l 580 99 l 575 99 q 468 10 523 35 q 327 -14 413 -14 q 154 44 217 -14 q 92 207 92 102 q 436 442 92 431 l 573 447 l 573 494 q 409 655 573 655 q 187 599 309 655 l 144 692 q 404 758 277 758 q 627 699 558 758 q 696 509 696 640 l 696 0 l 606 0 m 572 362 l 462 357 q 274 315 330 352 q 219 204 219 279 q 354 82 219 82 q 513 138 454 82 q 572 294 572 194 l 572 362 m 751 -217 l 751 -293 q 645 -309 701 -309 q 521 -271 564 -309 q 479 -171 479 -234 q 603 0 479 -73 l 695 0 q 576 -162 576 -85 q 665 -227 576 -227 q 751 -217 711 -227 "},"​":{"x_min":0,"x_max":0,"ha":834},"ã":{"x_min":92,"x_max":696,"ha":834,"o":"m 606 0 l 580 99 l 575 99 q 468 10 523 35 q 327 -14 413 -14 q 154 44 217 -14 q 92 207 92 102 q 436 442 92 431 l 573 447 l 573 494 q 409 655 573 655 q 187 599 309 655 l 144 692 q 404 758 277 758 q 627 699 558 758 q 696 509 696 640 l 696 0 l 606 0 m 572 362 l 462 357 q 274 315 330 352 q 219 204 219 279 q 354 82 219 82 q 513 138 454 82 q 572 294 572 194 l 572 362 m 250 841 l 179 841 q 322 1021 195 1021 q 431 982 361 1021 q 523 944 500 944 q 595 1022 578 944 l 667 1022 q 524 843 648 843 q 417 881 485 843 q 322 919 349 919 q 250 841 267 919 "},"æ":{"x_min":31,"x_max":805,"ha":834,"o":"m 354 450 l 354 496 q 260 655 354 655 q 117 599 187 655 l 78 692 q 268 758 168 758 q 437 637 398 758 q 598 758 490 758 q 747 665 690 758 q 805 424 805 573 l 805 347 l 476 347 q 520 157 478 219 q 632 96 563 96 q 786 145 705 96 l 786 35 q 624 -14 714 -14 q 412 144 475 -14 q 206 -14 340 -14 q 79 44 127 -14 q 31 208 31 103 q 253 445 31 434 l 354 450 m 479 450 l 684 450 q 657 600 684 545 q 585 655 631 655 q 512 603 541 655 q 479 450 483 550 m 353 363 l 295 358 q 154 207 154 347 q 175 120 154 152 q 231 88 196 88 q 319 143 285 88 q 353 296 353 198 l 353 363 "},"ĩ":{"x_min":133.6875,"x_max":729.171875,"ha":834,"o":"m 367 648 l 184 662 l 184 745 l 490 745 l 490 96 l 729 83 l 729 0 l 133 0 l 133 83 l 367 96 l 367 648 m 242 841 l 171 841 q 314 1021 187 1021 q 423 982 353 1021 q 515 944 492 944 q 587 1022 570 944 l 659 1022 q 516 843 640 843 q 409 881 477 843 q 314 919 341 919 q 242 841 259 919 "},"~":{"x_min":103,"x_max":730,"ha":834,"o":"m 103 397 l 103 507 q 270 581 170 581 q 439 538 338 581 q 575 500 527 500 q 730 582 649 500 l 730 472 q 561 399 662 399 q 393 441 493 399 q 257 479 304 479 q 103 397 183 479 "},"ŀ":{"x_min":127.6875,"x_max":731.46875,"ha":834,"o":"m 361 958 l 179 972 l 179 1055 l 484 1055 l 484 96 l 723 83 l 723 0 l 127 0 l 127 83 l 361 96 l 361 958 m 666 540 q 731 462 731 540 q 666 385 731 385 q 601 462 601 385 q 666 540 601 540 "},"Ċ":{"x_min":87,"x_max":801,"ha":834,"o":"m 763 136 l 763 26 q 519 -14 663 -14 q 198 119 309 -14 q 87 497 87 252 q 208 868 87 731 q 540 1006 330 1006 q 801 947 690 1006 l 747 841 q 540 894 643 894 q 307 787 394 894 q 220 496 220 679 q 302 199 220 301 q 540 97 383 97 q 763 136 629 97 m 534 1252 q 599 1174 599 1252 q 534 1097 599 1097 q 469 1174 469 1097 q 534 1252 469 1252 "},"¡":{"x_min":330,"x_max":502.265625,"ha":834,"o":"m 416 569 q 330 663 330 569 q 416 758 330 758 q 502 663 502 758 q 416 569 502 569 m 374 458 l 456 458 l 491 -253 l 340 -253 l 374 458 "},"ẅ":{"x_min":-3,"x_max":836,"ha":834,"o":"m 551 0 l 462 404 l 416 628 l 411 628 l 367 401 l 276 0 l 148 0 l -3 745 l 106 745 l 173 376 q 212 109 196 250 l 216 109 q 262 352 237 235 l 352 745 l 483 745 l 569 352 q 614 109 598 220 l 619 109 q 659 376 640 274 l 728 745 l 836 745 l 683 0 l 551 0 m 288 1015 q 353 945 353 1015 q 288 876 353 876 q 223 945 223 876 q 288 1015 223 1015 m 542 1015 q 608 945 608 1015 q 542 876 608 876 q 477 945 477 876 q 542 1015 477 1015 "},"К":{"x_min":143,"x_max":813.25,"ha":834,"o":"m 813 0 l 664 0 l 269 502 l 269 0 l 143 0 l 143 992 l 269 992 l 269 511 l 654 992 l 794 992 l 409 515 l 813 0 "},"Γ":{"x_min":158,"x_max":719,"ha":834,"o":"m 719 992 l 719 880 l 284 880 l 284 0 l 158 0 l 158 992 l 719 992 "},"P":{"x_min":119,"x_max":742,"ha":834,"o":"m 245 385 l 245 0 l 119 0 l 119 992 l 393 992 q 742 701 742 992 q 647 468 742 552 q 374 385 553 385 l 245 385 m 245 493 l 359 493 q 550 541 493 493 q 608 694 608 590 q 380 884 608 884 l 245 884 l 245 493 "},"%":{"x_min":0,"x_max":834,"ha":834,"o":"m 197 532 q 54 596 108 532 q 0 768 0 660 q 53 941 0 879 q 199 1003 107 1003 q 342 939 287 1003 q 397 768 397 876 q 343 595 397 658 q 197 532 290 532 m 199 613 q 293 769 293 613 q 199 921 293 921 q 103 769 103 921 q 199 613 103 613 m 717 992 l 222 0 l 115 0 l 609 992 l 717 992 m 634 -12 q 491 52 546 -12 q 437 224 437 116 q 490 397 437 335 q 636 459 544 459 q 779 395 724 459 q 834 224 834 332 q 780 51 834 114 q 634 -12 727 -12 m 636 69 q 730 225 730 69 q 636 377 730 377 q 540 225 540 377 q 636 69 540 69 "},"ϖ":{"x_min":12.15625,"x_max":816.71875,"ha":834,"o":"m 258 -14 q 167 9 204 -14 q 105 75 129 32 q 71 181 82 119 q 61 320 61 242 q 64 405 61 366 q 75 482 67 445 q 94 558 82 520 q 123 642 106 597 l 12 642 l 12 691 l 103 745 l 816 745 l 816 642 l 711 642 q 739 558 727 597 q 759 482 751 520 q 770 405 767 445 q 774 320 774 366 q 763 181 774 242 q 729 75 753 119 q 669 9 706 32 q 579 -14 632 -14 q 479 15 516 -14 q 424 106 442 45 l 417 106 q 361 15 399 45 q 258 -14 323 -14 m 668 320 q 664 401 668 362 q 653 478 661 440 q 632 556 645 516 q 604 642 620 596 l 230 642 q 201 556 213 596 q 181 478 189 516 q 170 401 173 440 q 166 320 166 362 q 172 214 166 258 q 190 142 178 170 q 221 101 203 114 q 266 88 240 88 q 311 102 292 88 q 343 140 330 116 q 361 198 355 165 q 368 270 368 231 l 368 408 l 473 408 l 473 270 q 501 135 473 182 q 572 88 528 88 q 614 101 596 88 q 645 142 632 114 q 662 214 657 170 q 668 320 668 258 "},"_":{"x_min":-11,"x_max":844,"ha":834,"o":"m 844 -219 l -11 -219 l -11 -125 l 844 -125 l 844 -219 "},"ñ":{"x_min":109,"x_max":725,"ha":834,"o":"m 601 0 l 601 479 q 440 655 601 655 q 232 385 232 655 l 232 0 l 109 0 l 109 745 l 208 745 l 227 644 l 233 644 q 461 758 303 758 q 725 486 725 758 l 725 0 l 601 0 m 248 841 l 177 841 q 320 1021 193 1021 q 429 982 359 1021 q 521 944 498 944 q 593 1022 576 944 l 665 1022 q 522 843 646 843 q 415 881 483 843 q 320 919 347 919 q 248 841 265 919 "},"Ŕ":{"x_min":126,"x_max":794.25,"ha":834,"o":"m 252 409 l 252 0 l 126 0 l 126 992 l 368 992 q 721 710 721 992 q 524 443 721 515 l 794 0 l 645 0 l 407 409 l 252 409 m 252 517 l 362 517 q 532 561 478 517 q 587 704 587 606 q 533 842 587 800 q 359 884 479 884 l 252 884 l 252 517 m 303 1089 q 421 1293 367 1179 l 570 1293 l 570 1278 q 385 1071 493 1161 l 303 1071 l 303 1089 "},"‚":{"x_min":310,"x_max":522,"ha":834,"o":"m 511 161 l 522 145 q 402 -179 484 1 l 310 -179 q 361 161 346 18 l 511 161 "},"⅞":{"x_min":19,"x_max":832,"ha":834,"o":"m 76 456 l 285 910 l 19 910 l 19 992 l 391 992 l 391 924 l 181 456 l 76 456 m 662 992 l 167 0 l 60 0 l 554 992 l 662 992 m 720 287 q 832 147 832 230 q 780 35 832 77 q 644 -7 728 -7 q 502 33 552 -7 q 453 143 453 73 q 546 281 453 231 q 470 412 470 335 q 518 511 470 474 q 643 549 567 549 q 766 512 718 549 q 814 412 814 475 q 720 287 814 334 m 645 321 q 712 413 712 355 q 641 480 712 480 q 571 413 571 480 q 645 321 571 357 m 630 247 q 554 142 554 203 q 641 61 554 61 q 730 142 730 61 q 639 243 730 203 l 630 247 "},"Æ":{"x_min":0,"x_max":821,"ha":834,"o":"m 821 0 l 378 0 l 378 307 l 181 307 l 116 0 l 0 0 l 229 992 l 821 992 l 821 880 l 504 880 l 504 574 l 795 574 l 795 462 l 504 462 l 504 111 l 821 111 l 821 0 m 206 419 l 378 419 l 378 880 l 305 880 l 206 419 "},"₣":{"x_min":88,"x_max":717,"ha":834,"o":"m 326 274 l 526 274 l 526 178 l 326 178 l 326 0 l 207 0 l 207 178 l 88 178 l 88 274 l 207 274 l 207 992 l 717 992 l 717 879 l 326 879 l 326 531 l 691 531 l 691 418 l 326 418 l 326 274 "},"Ū":{"x_min":85,"x_max":749,"ha":834,"o":"m 749 993 l 749 349 q 663 79 749 173 q 412 -14 578 -14 q 85 352 85 -14 l 85 991 l 211 991 l 211 359 q 419 97 211 97 q 622 361 619 97 l 622 993 l 749 993 m 221 1172 l 612 1172 l 612 1071 l 221 1071 l 221 1172 "},"ы":{"x_min":77,"x_max":756,"ha":834,"o":"m 182 439 l 275 439 q 562 227 562 439 q 275 0 562 0 l 77 0 l 77 745 l 182 745 l 182 439 m 182 336 l 182 102 l 279 102 q 456 219 456 102 q 415 308 456 280 q 276 336 373 336 l 182 336 m 756 0 l 650 0 l 650 745 l 756 745 l 756 0 "},"ѓ":{"x_min":197,"x_max":704,"ha":834,"o":"m 704 642 l 320 642 l 320 0 l 197 0 l 197 745 l 704 745 l 704 642 m 354 860 q 472 1064 418 950 l 621 1064 l 621 1049 q 436 842 544 932 l 354 842 l 354 860 "},"Œ":{"x_min":14,"x_max":833,"ha":834,"o":"m 833 0 l 443 0 l 410 -7 q 345 -14 376 -14 q 14 498 14 -14 q 361 1007 14 1007 q 465 992 417 1007 l 833 992 l 833 880 l 568 880 l 568 574 l 807 574 l 807 462 l 568 462 l 568 111 l 833 111 l 833 0 m 442 119 l 442 873 q 352 895 402 895 q 140 497 140 895 q 351 97 140 97 q 442 119 398 97 "},"΅":{"x_min":202,"x_max":629,"ha":834,"o":"m 360 959 q 413 1164 389 1054 l 562 1164 l 562 1150 q 415 942 498 1039 l 360 942 l 360 959 m 266 1015 q 332 945 332 1015 q 313 894 332 912 q 266 876 294 876 q 202 945 202 876 q 266 1015 202 1015 m 563 1015 q 629 945 629 1015 q 563 876 629 876 q 498 945 498 876 q 563 1015 498 1015 "},"Ą":{"x_min":22,"x_max":825,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 m 825 -217 l 825 -293 q 719 -309 775 -309 q 595 -271 638 -309 q 553 -171 553 -234 q 677 0 553 -73 l 769 0 q 650 -162 650 -85 q 739 -227 650 -227 q 825 -217 785 -227 "},"Њ":{"x_min":45,"x_max":814,"ha":834,"o":"m 373 0 l 373 462 l 171 462 l 171 0 l 45 0 l 45 992 l 171 992 l 171 574 l 373 574 l 373 992 l 499 992 l 499 574 l 524 574 q 740 501 666 574 q 814 290 814 428 q 736 74 814 149 q 513 0 659 0 l 373 0 m 499 107 l 527 107 q 697 290 697 107 q 653 421 697 381 q 511 462 609 462 l 499 462 l 499 107 "},"›":{"x_min":272,"x_max":561,"ha":834,"o":"m 561 356 l 351 78 l 272 130 l 433 366 l 272 602 l 351 655 l 561 374 l 561 356 "},"ћ":{"x_min":3.203125,"x_max":725,"ha":834,"o":"m 601 0 l 601 451 q 441 627 601 627 q 282 564 332 627 q 232 357 232 500 l 232 0 l 109 0 l 109 843 l 3 843 l 3 932 l 109 932 l 109 1055 l 233 1055 l 233 932 l 516 932 l 516 843 l 232 843 l 232 715 l 225 616 l 232 616 q 466 730 305 730 q 660 665 596 730 q 725 458 725 600 l 725 0 l 601 0 "},"<":{"x_min":103,"x_max":730,"ha":834,"o":"m 730 150 l 103 455 l 103 525 l 730 831 l 730 722 l 244 490 l 730 258 l 730 150 "},"¬":{"x_min":103,"x_max":730,"ha":834,"o":"m 730 541 l 730 178 l 628 178 l 628 439 l 103 439 l 103 541 l 730 541 "},"t":{"x_min":95,"x_max":696,"ha":834,"o":"m 692 101 l 692 7 q 521 -14 603 -14 q 276 218 276 -14 l 276 648 l 95 648 l 95 715 l 276 749 l 328 943 l 399 943 l 399 745 l 696 745 l 696 648 l 399 648 l 399 219 q 529 88 399 88 q 692 101 592 88 "},"Ц":{"x_min":92,"x_max":821,"ha":834,"o":"m 702 111 l 821 111 l 821 -261 l 704 -261 l 704 0 l 92 0 l 92 992 l 218 992 l 218 111 l 575 111 l 575 992 l 702 992 l 702 111 "},"ù":{"x_min":109,"x_max":725,"ha":834,"o":"m 625 0 l 607 99 l 600 99 q 373 -14 529 -14 q 109 258 109 -14 l 109 745 l 232 745 l 232 264 q 392 88 232 88 q 551 151 501 88 q 601 357 601 214 l 601 745 l 725 745 l 725 0 l 625 0 m 499 842 l 416 842 q 232 1049 304 938 l 232 1064 l 380 1064 q 499 860 439 943 l 499 842 "},"ï":{"x_min":133.6875,"x_max":729.171875,"ha":834,"o":"m 367 648 l 184 662 l 184 745 l 490 745 l 490 96 l 729 83 l 729 0 l 133 0 l 133 83 l 367 96 l 367 648 m 289 1015 q 354 945 354 1015 q 289 876 354 876 q 224 945 224 876 q 289 1015 224 1015 m 543 1015 q 609 945 609 1015 q 543 876 609 876 q 478 945 478 876 q 543 1015 478 1015 "},"Ф":{"x_min":18,"x_max":817,"ha":834,"o":"m 361 1006 l 487 1006 l 487 884 l 517 884 q 736 779 656 884 q 817 514 817 674 q 734 246 817 354 q 503 139 652 139 l 487 139 l 487 -14 l 361 -14 l 361 139 l 344 139 q 103 246 188 139 q 18 514 18 354 q 101 778 18 673 q 329 884 184 884 l 361 884 l 361 1006 m 487 246 l 491 246 q 638 319 585 246 q 690 517 690 391 q 642 705 690 634 q 507 776 594 776 l 487 776 l 487 246 m 361 776 l 340 776 q 195 705 247 776 q 144 517 144 634 q 200 319 144 391 q 357 246 256 246 l 361 246 l 361 776 "},"Ò":{"x_min":57,"x_max":778,"ha":834,"o":"m 417 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 684 118 778 251 q 417 -14 590 -14 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 m 496 1071 l 413 1071 q 229 1278 301 1167 l 229 1293 l 377 1293 q 496 1089 436 1172 l 496 1071 "},"I":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 "},"˝":{"x_min":168,"x_max":666,"ha":834,"o":"m 168 860 q 271 1064 223 950 l 420 1064 l 420 1049 q 235 842 344 932 l 168 842 l 168 860 m 413 860 q 517 1064 465 940 l 666 1064 l 666 1049 q 481 842 590 932 l 413 842 l 413 860 "},"·":{"x_min":330,"x_max":502,"ha":834,"o":"m 416 585 q 502 490 502 585 q 416 396 502 396 q 330 490 330 396 q 416 585 330 585 "},"¿":{"x_min":114,"x_max":716,"ha":834,"o":"m 461 569 q 375 663 375 569 q 461 758 375 758 q 547 663 547 758 q 461 569 547 569 m 520 458 l 520 432 q 490 301 520 352 q 381 194 460 251 q 265 89 294 128 q 237 -18 237 49 q 287 -120 237 -82 q 426 -159 337 -159 q 674 -97 547 -159 l 716 -195 q 429 -267 567 -267 q 198 -200 282 -267 q 114 -24 114 -134 q 150 122 114 66 q 285 252 187 179 q 389 347 367 311 q 412 445 412 384 l 412 458 l 520 458 "},"ſ":{"x_min":242,"x_max":691,"ha":834,"o":"m 691 1039 l 663 942 q 508 960 591 960 q 396 928 427 960 q 365 814 365 895 l 365 0 l 242 0 l 242 814 q 303 1002 242 942 q 505 1063 364 1063 q 691 1039 590 1063 "},"Ђ":{"x_min":16,"x_max":791,"ha":834,"o":"m 451 2 l 451 110 q 542 97 497 97 q 664 250 664 97 l 664 340 q 510 497 664 497 l 345 497 l 345 0 l 219 0 l 219 880 l 16 880 l 16 992 l 587 992 l 587 880 l 345 880 l 345 609 l 524 609 q 721 543 651 609 q 791 356 791 477 l 791 263 q 726 58 791 130 q 546 -14 662 -14 q 451 2 486 -14 "},"ű":{"x_min":109,"x_max":725,"ha":834,"o":"m 625 0 l 607 99 l 600 99 q 373 -14 529 -14 q 109 258 109 -14 l 109 745 l 232 745 l 232 264 q 392 88 232 88 q 551 151 501 88 q 601 357 601 214 l 601 745 l 725 745 l 725 0 l 625 0 m 222 860 q 325 1064 277 950 l 474 1064 l 474 1049 q 289 842 398 932 l 222 842 l 222 860 m 467 860 q 571 1064 519 940 l 720 1064 l 720 1049 q 535 842 644 932 l 467 842 l 467 860 "},"Ǽ":{"x_min":0,"x_max":821,"ha":834,"o":"m 821 0 l 378 0 l 378 307 l 181 307 l 116 0 l 0 0 l 229 992 l 821 992 l 821 880 l 504 880 l 504 574 l 795 574 l 795 462 l 504 462 l 504 111 l 821 111 l 821 0 m 206 419 l 378 419 l 378 880 l 305 880 l 206 419 m 428 1089 q 546 1293 492 1179 l 695 1293 l 695 1278 q 510 1071 618 1161 l 428 1071 l 428 1089 "},"φ":{"x_min":50,"x_max":784,"ha":834,"o":"m 352 -334 l 352 -12 q 50 371 50 4 q 188 750 50 583 l 268 688 q 179 531 202 601 q 155 371 155 462 q 352 90 155 112 l 352 500 q 544 758 352 758 q 720 658 656 758 q 784 387 784 558 q 697 102 784 208 q 457 -12 611 -2 l 457 -334 l 352 -334 m 457 90 q 663 386 663 110 q 544 655 663 655 q 457 501 457 655 l 457 90 "},";":{"x_min":278,"x_max":507,"ha":834,"o":"m 421 764 q 507 669 507 764 q 421 575 507 575 q 335 669 335 575 q 421 764 335 764 m 479 161 l 490 145 q 370 -179 455 12 l 278 -179 q 329 161 309 -6 l 479 161 "},"Ș":{"x_min":96,"x_max":738,"ha":834,"o":"m 96 32 l 96 152 q 375 93 238 93 q 611 258 611 93 q 564 366 611 328 q 371 456 516 404 q 170 575 231 506 q 109 754 109 644 q 196 939 109 872 q 435 1006 283 1006 q 718 953 591 1006 l 674 841 q 432 894 544 894 q 235 752 235 894 q 279 641 235 683 q 461 551 323 599 q 682 428 626 491 q 738 264 738 364 q 644 60 738 134 q 376 -14 550 -14 q 96 32 197 -14 m 328 -288 q 385 -85 370 -193 l 506 -85 l 506 -98 q 473 -182 506 -113 q 395 -307 440 -251 l 328 -307 l 328 -288 "},"Ġ":{"x_min":79,"x_max":742,"ha":834,"o":"m 455 524 l 742 524 l 742 36 q 456 -14 609 -14 q 179 121 279 -14 q 79 497 79 256 q 188 870 79 735 q 491 1006 298 1006 q 726 947 621 1006 l 677 837 q 487 894 578 894 q 285 789 357 894 q 212 496 212 683 q 479 97 212 97 q 615 116 544 97 l 615 412 l 455 412 l 455 524 m 497 1252 q 562 1174 562 1252 q 497 1097 562 1097 q 432 1174 432 1097 q 497 1252 432 1252 "},"6":{"x_min":104,"x_max":730,"ha":834,"o":"m 655 993 l 655 888 q 542 900 606 900 q 315 806 391 900 q 232 505 238 711 l 240 505 q 448 621 304 621 q 655 540 580 621 q 730 319 730 459 q 648 75 730 164 q 428 -14 566 -14 q 192 100 280 -14 q 104 423 104 214 q 538 1006 104 1006 q 655 993 608 1006 m 610 320 q 564 471 610 418 q 431 524 517 524 q 287 469 345 524 q 229 343 229 414 q 284 165 229 240 q 427 91 339 91 q 562 150 513 91 q 610 320 610 210 "},"n":{"x_min":109,"x_max":725,"ha":834,"o":"m 601 0 l 601 479 q 440 655 601 655 q 232 385 232 655 l 232 0 l 109 0 l 109 745 l 208 745 l 227 644 l 233 644 q 461 758 303 758 q 725 486 725 758 l 725 0 l 601 0 "},"ά":{"x_min":82,"x_max":799.671875,"ha":834,"o":"m 585 644 l 593 644 q 639 745 613 714 l 736 745 q 702 446 702 632 l 702 162 q 758 87 702 87 q 799 93 778 87 l 799 3 q 721 -14 764 -14 q 586 99 613 -14 l 578 99 q 365 -14 505 -14 q 157 86 233 -14 q 82 370 82 187 q 160 656 82 555 q 378 758 238 758 q 585 644 520 758 m 578 360 l 578 370 q 533 590 578 524 q 387 655 487 655 q 209 369 209 655 q 388 88 209 88 q 532 150 489 88 q 578 360 575 213 m 336 860 l 358 932 q 387 1064 380 1009 l 518 1064 l 518 1049 q 484 968 518 1038 q 409 842 451 898 l 336 842 l 336 860 "},"ϊ":{"x_min":175,"x_max":690,"ha":834,"o":"m 413 745 l 413 220 q 544 88 413 88 q 690 101 621 88 l 690 7 q 536 -14 626 -14 q 290 219 290 -14 l 290 745 l 413 745 m 240 1015 q 305 945 305 1015 q 240 876 305 876 q 175 945 175 876 q 240 1015 175 1015 m 494 1015 q 560 945 560 1015 q 494 876 560 876 q 429 945 429 876 q 494 1015 429 1015 "},"":{"x_min":0,"x_max":0,"ha":834},"ģ":{"x_min":70,"x_max":763.84375,"ha":834,"o":"m 763 745 l 763 668 l 630 650 q 675 506 675 592 q 602 333 675 397 q 401 269 530 269 q 343 273 364 269 q 275 182 275 234 q 384 125 275 125 l 511 125 q 691 72 629 125 q 754 -77 754 20 q 371 -334 754 -334 q 146 -278 223 -334 q 70 -123 70 -223 q 232 61 70 22 q 167 165 167 93 q 257 293 167 240 q 162 376 197 318 q 128 502 128 434 q 200 691 128 625 q 405 758 272 758 q 507 745 464 758 l 763 745 m 402 353 q 554 508 554 353 q 401 669 554 669 q 248 506 248 669 q 402 353 248 353 m 469 17 l 342 17 q 186 -118 186 17 q 370 -237 186 -237 q 637 -84 637 -237 q 603 -3 637 -24 q 469 17 569 17 m 537 1045 q 480 842 494 942 l 359 842 l 359 856 q 389 935 359 867 q 470 1064 420 1003 l 537 1064 l 537 1045 "},"∂":{"x_min":82,"x_max":751,"ha":834,"o":"m 628 582 l 630 609 q 591 816 636 733 q 441 899 545 899 q 266 841 352 899 l 266 959 q 457 1002 356 1002 q 751 633 751 1002 q 636 177 751 369 q 327 -14 522 -14 q 82 254 82 -14 q 175 554 82 423 q 436 685 269 685 q 628 582 561 685 m 606 459 q 548 552 591 516 q 453 588 504 588 q 276 479 343 588 q 209 248 209 371 q 337 88 209 88 q 505 192 431 88 q 606 459 580 295 "},"κ":{"x_min":146,"x_max":789,"ha":834,"o":"m 258 344 l 351 457 l 625 745 l 770 745 l 434 398 l 789 0 l 644 0 l 354 318 l 266 262 l 266 0 l 146 0 l 146 745 l 266 745 l 266 547 l 255 344 l 258 344 "},"‡":{"x_min":155.125,"x_max":677.359375,"ha":834,"o":"m 452 336 l 677 357 l 677 235 l 452 256 l 490 0 l 343 0 l 380 256 l 155 235 l 155 357 l 380 336 l 348 532 l 380 718 l 155 697 l 155 820 l 380 799 l 343 1055 l 490 1055 l 452 799 l 677 820 l 677 697 l 452 718 l 484 532 l 452 336 "},"ň":{"x_min":109,"x_max":725,"ha":834,"o":"m 601 0 l 601 479 q 440 655 601 655 q 232 385 232 655 l 232 0 l 109 0 l 109 745 l 208 745 l 227 644 l 233 644 q 461 758 303 758 q 725 486 725 758 l 725 0 l 601 0 m 650 1045 q 609 1000 633 1026 q 490 842 514 893 l 359 842 q 240 1000 335 893 l 200 1045 l 200 1064 l 281 1064 q 424 937 337 1027 q 567 1064 507 1024 l 650 1064 l 650 1045 "},"√":{"x_min":16,"x_max":818,"ha":834,"o":"m 415 -10 l 325 -10 l 138 522 l 16 522 l 16 615 l 216 615 l 372 165 l 719 1150 l 818 1150 l 415 -10 "},"ę":{"x_min":90,"x_max":744,"ha":834,"o":"m 744 346 l 217 346 q 451 93 222 93 q 703 145 584 93 l 703 36 q 456 -14 590 -14 q 189 87 289 -14 q 90 366 90 188 q 182 652 90 547 q 428 758 274 758 q 658 666 572 758 q 744 423 744 575 l 744 346 m 220 449 l 616 449 q 428 655 616 655 q 220 449 238 655 m 707 -196 l 707 -272 q 601 -288 657 -288 q 477 -250 520 -288 q 435 -150 435 -213 q 559 21 435 -52 l 651 21 q 532 -141 532 -64 q 621 -206 532 -206 q 707 -196 667 -206 "},"į":{"x_min":133.6875,"x_max":729.171875,"ha":834,"o":"m 429 1051 q 501 973 501 1051 q 479 915 501 934 q 429 896 458 896 q 356 973 356 896 q 429 1051 356 1051 m 367 648 l 184 662 l 184 745 l 490 745 l 490 96 l 729 83 l 729 0 l 133 0 l 133 83 l 367 96 l 367 648 m 570 -217 l 570 -293 q 464 -309 520 -309 q 340 -271 383 -309 q 298 -171 298 -234 q 422 0 298 -73 l 514 0 q 395 -162 395 -85 q 484 -227 395 -227 q 570 -217 530 -227 "},"Τ":{"x_min":69,"x_max":762,"ha":834,"o":"m 479 0 l 353 0 l 353 880 l 69 880 l 69 992 l 762 992 l 762 880 l 479 880 l 479 0 "},"≈":{"x_min":103,"x_max":730,"ha":834,"o":"m 103 533 l 103 643 q 270 718 169 718 q 439 674 337 718 q 575 637 525 637 q 730 719 649 637 l 730 609 q 561 536 664 536 q 393 578 493 536 q 257 616 306 616 q 103 533 181 616 m 103 256 l 103 366 q 270 440 170 440 q 439 397 338 440 q 575 359 527 359 q 730 441 649 359 l 730 331 q 561 258 662 258 q 393 300 493 258 q 257 338 304 338 q 103 256 183 338 "},"ΐ":{"x_min":164,"x_max":690,"ha":834,"o":"m 413 745 l 413 220 q 544 88 413 88 q 690 101 621 88 l 690 7 q 536 -14 626 -14 q 290 219 290 -14 l 290 745 l 413 745 m 322 959 q 375 1164 351 1054 l 524 1164 l 524 1150 q 377 942 460 1039 l 322 942 l 322 959 m 228 1015 q 294 945 294 1015 q 275 894 294 912 q 228 876 256 876 q 164 945 164 876 q 228 1015 164 1015 m 525 1015 q 591 945 591 1015 q 525 876 591 876 q 460 945 460 876 q 525 1015 460 1015 "},"ĸ":{"x_min":146,"x_max":789,"ha":834,"o":"m 258 344 l 351 457 l 625 745 l 770 745 l 434 398 l 789 0 l 644 0 l 354 318 l 266 262 l 266 0 l 146 0 l 146 745 l 266 745 l 266 547 l 255 344 l 258 344 "},"g":{"x_min":70,"x_max":763.84375,"ha":834,"o":"m 763 745 l 763 668 l 630 650 q 675 506 675 592 q 602 333 675 397 q 401 269 530 269 q 343 273 364 269 q 275 182 275 234 q 384 125 275 125 l 511 125 q 691 72 629 125 q 754 -77 754 20 q 371 -334 754 -334 q 146 -278 223 -334 q 70 -123 70 -223 q 232 61 70 22 q 167 165 167 93 q 257 293 167 240 q 162 376 197 318 q 128 502 128 434 q 200 691 128 625 q 405 758 272 758 q 507 745 464 758 l 763 745 m 402 353 q 554 508 554 353 q 401 669 554 669 q 248 506 248 669 q 402 353 248 353 m 469 17 l 342 17 q 186 -118 186 17 q 370 -237 186 -237 q 637 -84 637 -237 q 603 -3 637 -24 q 469 17 569 17 "},"ǿ":{"x_min":78,"x_max":755,"ha":834,"o":"m 255 21 l 204 -58 l 115 -1 l 172 87 q 78 373 78 194 q 168 655 78 553 q 418 758 258 758 q 578 719 505 758 l 630 800 l 719 743 l 661 654 q 755 373 755 548 q 663 87 755 189 q 414 -14 572 -14 q 255 21 326 -14 m 241 186 l 517 631 q 411 655 472 655 q 253 585 302 655 q 205 373 205 515 q 241 186 205 251 m 592 553 l 316 110 q 421 88 358 88 q 579 159 531 88 q 627 373 627 231 q 592 553 627 484 m 338 860 q 456 1064 402 950 l 605 1064 l 605 1049 q 420 842 528 932 l 338 842 l 338 860 "},"²":{"x_min":236,"x_max":596,"ha":834,"o":"m 596 456 l 236 456 l 236 525 l 360 660 q 454 774 433 740 q 474 847 474 808 q 400 924 474 924 q 291 873 346 924 l 240 932 q 408 1002 319 1002 q 531 961 487 1002 q 576 850 576 920 q 552 759 576 805 q 441 626 528 713 l 349 534 l 596 534 l 596 456 "},"Ã":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 m 243 1070 l 172 1070 q 315 1250 188 1250 q 424 1211 354 1250 q 516 1173 493 1173 q 588 1251 571 1173 l 660 1251 q 517 1072 641 1072 q 410 1110 478 1072 q 315 1148 342 1148 q 243 1070 260 1148 "},"Ј":{"x_min":93,"x_max":664,"ha":834,"o":"m 93 26 l 93 138 q 302 97 202 97 q 474 151 411 97 q 537 304 537 205 l 537 992 l 664 992 l 664 305 q 568 72 664 159 q 312 -14 473 -14 q 93 26 165 -14 "},"©":{"x_min":4,"x_max":830,"ha":834,"o":"m 416 1006 q 720 867 610 1006 q 830 495 830 729 q 720 123 830 261 q 416 -14 610 -14 q 113 124 222 -14 q 4 495 4 262 q 112 867 4 728 q 416 1006 221 1006 m 416 59 q 667 175 579 59 q 756 496 756 291 q 667 816 756 700 q 416 932 579 932 q 165 816 253 932 q 77 496 77 700 q 165 175 77 291 q 416 59 253 59 m 593 307 l 593 218 q 442 185 520 185 q 239 268 310 185 q 168 497 168 352 q 242 722 168 639 q 447 806 317 806 q 619 763 533 806 l 578 677 q 446 713 503 713 q 320 655 364 713 q 276 495 276 598 q 446 277 276 277 q 593 307 510 277 "},"≥":{"x_min":103,"x_max":730,"ha":834,"o":"m 103 258 l 588 490 l 103 722 l 103 831 l 730 525 l 730 455 l 103 150 l 103 258 m 103 0 l 103 101 l 730 101 l 730 0 l 103 0 "},"Ă":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 m 619 1259 q 558 1121 612 1172 q 412 1071 504 1071 q 211 1259 222 1071 l 285 1259 q 317 1189 290 1206 q 414 1172 344 1172 q 544 1259 537 1172 l 619 1259 "},"ґ":{"x_min":197,"x_max":691,"ha":834,"o":"m 691 656 l 320 656 l 320 0 l 197 0 l 197 745 l 567 745 l 567 961 l 691 961 l 691 656 "},"ÿ":{"x_min":56,"x_max":777,"ha":834,"o":"m 56 745 l 183 745 l 361 301 q 421 104 416 162 l 425 104 q 486 302 441 180 l 648 745 l 777 745 l 454 -97 q 348 -274 409 -215 q 181 -334 288 -334 q 68 -322 123 -334 l 68 -224 q 160 -231 110 -231 q 261 -203 225 -231 q 326 -108 298 -176 l 365 -7 l 56 745 m 295 1015 q 360 945 360 1015 q 295 876 360 876 q 230 945 230 876 q 295 1015 230 1015 m 549 1015 q 615 945 615 1015 q 549 876 615 876 q 484 945 484 876 q 549 1015 484 1015 "},"Ł":{"x_min":49,"x_max":741,"ha":834,"o":"m 183 0 l 183 334 l 98 281 l 49 365 l 183 450 l 183 992 l 309 992 l 309 530 l 512 659 l 566 574 l 309 413 l 309 111 l 741 111 l 741 0 l 183 0 "}," ":{"x_min":0,"x_max":0,"ha":834},"∫":{"x_min":160.25,"x_max":656.703125,"ha":834,"o":"m 656 1042 l 656 943 q 579 962 618 962 q 462 803 462 962 l 462 -92 q 405 -272 462 -211 q 245 -334 348 -334 q 160 -321 195 -334 l 160 -221 q 238 -241 200 -241 q 361 -82 361 -241 l 361 814 q 572 1055 361 1055 q 656 1042 629 1055 "},"\\":{"x_min":143,"x_max":690,"ha":834,"o":"m 263 992 l 690 0 l 569 0 l 143 992 l 263 992 "},"Ì":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 m 478 1071 l 395 1071 q 211 1278 283 1167 l 211 1293 l 359 1293 q 478 1089 418 1172 l 478 1071 "},"ъ":{"x_min":29,"x_max":784,"ha":834,"o":"m 402 439 l 505 439 q 784 227 784 439 q 501 0 784 0 l 279 0 l 279 642 l 29 642 l 29 745 l 402 745 l 402 439 m 402 336 l 402 102 l 499 102 q 678 219 678 102 q 636 308 678 280 q 496 336 594 336 l 402 336 "},"ς":{"x_min":117,"x_max":723,"ha":834,"o":"m 638 -272 l 525 -272 q 602 -94 602 -161 q 557 -33 602 -53 q 404 5 513 -13 q 117 349 117 53 q 501 758 117 758 q 720 717 613 758 l 678 610 q 493 650 570 650 q 244 351 244 650 q 297 179 244 224 q 480 109 349 133 q 723 -61 723 65 q 638 -272 723 -156 "},"Ē":{"x_min":147,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 m 228 1172 l 619 1172 l 619 1071 l 228 1071 l 228 1172 "},"!":{"x_min":330,"x_max":502.265625,"ha":834,"o":"m 458 280 l 376 280 l 341 992 l 492 992 l 458 280 m 416 168 q 502 74 502 168 q 416 -20 502 -20 q 330 74 330 -20 q 416 168 330 168 "},"ç":{"x_min":117,"x_max":720,"ha":834,"o":"m 720 717 l 677 610 q 496 650 576 650 q 244 369 244 650 q 489 93 244 93 q 707 135 595 93 l 707 27 q 483 -14 616 -14 q 213 84 309 -14 q 117 367 117 183 q 215 658 117 558 q 492 758 313 758 q 720 717 612 758 m 324 -327 l 324 -254 q 377 -258 346 -258 q 479 -196 479 -258 q 363 -119 479 -146 l 425 0 l 505 0 l 467 -78 q 577 -194 577 -103 q 379 -334 577 -334 q 324 -327 356 -334 "},"Й":{"x_min":93,"x_max":742,"ha":834,"o":"m 93 992 l 209 992 l 209 449 q 204 276 209 352 l 200 174 l 204 174 l 597 992 l 742 992 l 742 0 l 625 0 l 625 538 q 637 821 625 633 l 632 821 l 237 0 l 93 0 l 93 992 m 677 1287 q 412 1071 663 1071 q 222 1121 280 1071 q 157 1287 163 1171 l 273 1287 q 307 1188 279 1217 q 417 1159 336 1159 q 560 1287 548 1159 l 677 1287 "},"Б":{"x_min":92,"x_max":770,"ha":834,"o":"m 92 0 l 92 992 l 710 992 l 710 880 l 218 880 l 218 574 l 402 574 q 770 290 770 574 q 680 74 770 149 q 421 0 591 0 l 92 0 m 218 107 l 408 107 q 636 290 636 107 q 578 421 636 380 q 387 462 521 462 l 218 462 l 218 107 "},"đ":{"x_min":93,"x_max":832.796875,"ha":834,"o":"m 608 99 l 603 99 q 384 -14 526 -14 q 170 83 248 -14 q 93 356 93 181 q 171 631 93 532 q 384 730 249 730 q 603 622 526 730 l 611 622 q 603 733 603 709 l 603 843 l 346 843 l 346 932 l 603 932 l 603 1055 l 727 1055 l 727 932 l 832 932 l 832 843 l 727 843 l 727 0 l 627 0 l 608 99 m 603 329 l 603 356 q 556 565 603 502 q 405 627 508 627 q 220 354 220 627 q 406 88 220 88 q 555 144 509 88 q 603 329 600 200 "},"ċ":{"x_min":117,"x_max":720,"ha":834,"o":"m 720 717 l 677 610 q 496 650 576 650 q 244 369 244 650 q 489 93 244 93 q 707 135 595 93 l 707 27 q 483 -14 616 -14 q 213 84 309 -14 q 117 367 117 183 q 215 658 117 558 q 492 758 313 758 q 720 717 612 758 m 480 1023 q 545 945 545 1023 q 480 868 545 868 q 415 945 415 868 q 480 1023 415 1023 "},"Ā":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 m 221 1172 l 612 1172 l 612 1071 l 221 1071 l 221 1172 "},"Ẃ":{"x_min":1,"x_max":833,"ha":834,"o":"m 358 684 l 478 684 l 577 330 q 626 122 618 181 q 670 542 627 158 l 717 992 l 833 992 l 706 0 l 577 0 l 462 393 q 418 584 435 487 q 373 392 396 467 l 267 0 l 139 0 l 1 992 l 116 992 l 176 542 q 203 285 191 422 q 215 122 215 148 q 262 333 231 224 l 358 684 m 339 1089 q 457 1293 403 1179 l 606 1293 l 606 1278 q 421 1071 529 1161 l 339 1071 l 339 1089 "},"ø":{"x_min":78,"x_max":755,"ha":834,"o":"m 255 21 l 204 -58 l 115 -1 l 172 87 q 78 373 78 194 q 168 655 78 553 q 418 758 258 758 q 578 719 505 758 l 630 800 l 719 743 l 661 654 q 755 373 755 548 q 663 87 755 189 q 414 -14 572 -14 q 255 21 326 -14 m 241 186 l 517 631 q 411 655 472 655 q 253 585 302 655 q 205 373 205 515 q 241 186 205 251 m 592 553 l 316 110 q 421 88 358 88 q 579 159 531 88 q 627 373 627 231 q 592 553 627 484 "},"â":{"x_min":92,"x_max":696,"ha":834,"o":"m 606 0 l 580 99 l 575 99 q 468 10 523 35 q 327 -14 413 -14 q 154 44 217 -14 q 92 207 92 102 q 436 442 92 431 l 573 447 l 573 494 q 409 655 573 655 q 187 599 309 655 l 144 692 q 404 758 277 758 q 627 699 558 758 q 696 509 696 640 l 696 0 l 606 0 m 572 362 l 462 357 q 274 315 330 352 q 219 204 219 279 q 354 82 219 82 q 513 138 454 82 q 572 294 572 194 l 572 362 m 648 842 l 565 842 q 422 967 508 879 q 279 842 332 875 l 198 842 l 198 860 q 238 905 214 879 q 357 1064 332 1010 l 488 1064 q 607 905 513 1010 l 648 860 l 648 842 "},"}":{"x_min":154,"x_max":681,"ha":834,"o":"m 328 214 q 486 383 328 355 l 486 391 q 328 559 328 419 l 328 783 q 290 863 328 838 q 154 890 251 889 l 154 992 q 452 793 452 987 l 452 567 q 681 439 452 439 l 681 337 q 452 208 452 337 l 452 -19 q 154 -220 452 -215 l 154 -118 q 290 -91 251 -117 q 328 -10 328 -65 l 328 214 "},"Δ":{"x_min":46,"x_max":786,"ha":834,"o":"m 786 83 l 786 0 l 46 0 l 46 89 l 351 992 l 477 992 l 786 83 m 413 852 q 353 626 378 701 l 181 111 l 646 111 l 475 622 q 413 852 440 727 "},"‰":{"x_min":3,"x_max":820,"ha":834,"o":"m 176 583 q 56 638 99 583 q 14 793 14 693 q 179 1004 14 1004 q 298 949 255 1004 q 342 793 342 894 q 176 583 342 583 m 178 664 q 226 696 214 664 q 238 794 238 728 q 224 895 238 868 q 178 922 211 922 q 131 894 144 922 q 117 794 117 865 q 130 696 117 728 q 178 664 142 664 m 505 572 l 30 378 l 3 444 l 477 640 l 505 572 m 294 0 q 174 55 216 0 q 132 210 132 110 q 297 421 132 421 q 416 366 373 421 q 460 210 460 311 q 294 0 460 0 m 296 81 q 344 113 332 81 q 356 211 356 145 q 342 312 356 285 q 296 339 329 339 q 249 311 262 339 q 235 211 235 283 q 248 113 235 145 q 296 81 260 81 m 654 0 q 534 55 576 0 q 492 210 492 110 q 657 421 492 421 q 776 366 733 421 q 820 210 820 311 q 654 0 820 0 m 656 81 q 704 113 692 81 q 716 211 716 145 q 703 311 716 284 q 656 339 691 339 q 609 311 622 339 q 595 211 595 283 q 608 113 595 145 q 656 81 620 81 "},"Ä":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 m 289 1244 q 354 1174 354 1244 q 289 1105 354 1105 q 224 1174 224 1105 q 289 1244 224 1244 m 543 1244 q 609 1174 609 1244 q 543 1105 609 1105 q 478 1174 478 1105 q 543 1244 478 1244 "},"ř":{"x_min":179,"x_max":719,"ha":834,"o":"m 719 727 l 685 614 q 533 650 602 650 q 362 586 422 650 q 302 404 302 523 l 302 0 l 179 0 l 179 745 l 279 745 l 294 608 l 299 608 q 410 723 351 688 q 555 758 469 758 q 719 727 636 758 m 651 1045 q 610 1000 634 1026 q 491 842 515 893 l 360 842 q 241 1000 336 893 l 201 1045 l 201 1064 l 282 1064 q 425 937 338 1027 q 568 1064 508 1024 l 651 1064 l 651 1045 "},"—":{"x_min":-4,"x_max":838,"ha":834,"o":"m -4 315 l -4 429 l 838 429 l 838 315 l -4 315 "},"N":{"x_min":92,"x_max":741,"ha":834,"o":"m 741 0 l 596 0 l 201 821 l 196 821 q 208 538 208 633 l 208 0 l 92 0 l 92 992 l 236 992 l 629 174 l 633 174 q 624 449 624 380 l 624 992 l 741 992 l 741 0 "},"⁄":{"x_min":115,"x_max":717,"ha":834,"o":"m 717 992 l 222 0 l 115 0 l 609 992 l 717 992 "},"2":{"x_min":107,"x_max":726,"ha":834,"o":"m 726 0 l 107 0 l 107 105 l 344 364 q 519 579 477 508 q 561 736 561 650 q 518 856 561 812 q 401 900 475 900 q 185 808 293 900 l 116 889 q 403 1006 246 1006 q 610 934 534 1006 q 687 740 687 862 q 646 575 687 660 q 449 320 606 490 l 258 118 l 258 112 l 726 112 l 726 0 "},"М":{"x_min":77,"x_max":757,"ha":834,"o":"m 361 0 l 173 868 l 167 868 q 180 592 180 687 l 180 0 l 77 0 l 77 992 l 244 992 l 412 183 l 416 183 l 586 992 l 757 992 l 757 0 l 653 0 l 653 601 q 663 866 653 670 l 657 866 l 466 0 l 361 0 "},"Ó":{"x_min":57,"x_max":778,"ha":834,"o":"m 417 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 684 118 778 251 q 417 -14 590 -14 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 m 345 1089 q 463 1293 409 1179 l 612 1293 l 612 1278 q 427 1071 535 1161 l 345 1071 l 345 1089 "},"˜":{"x_min":172,"x_max":660,"ha":834,"o":"m 243 841 l 172 841 q 315 1021 188 1021 q 424 982 354 1021 q 516 944 493 944 q 588 1022 571 944 l 660 1022 q 517 843 641 843 q 410 881 478 843 q 315 919 342 919 q 243 841 260 919 "}," ":{"x_min":0,"x_max":0,"ha":834},"ˇ":{"x_min":192,"x_max":642,"ha":834,"o":"m 642 1045 q 601 1000 625 1026 q 482 842 506 893 l 351 842 q 232 1000 327 893 l 192 1045 l 192 1064 l 273 1064 q 416 937 329 1027 q 559 1064 499 1024 l 642 1064 l 642 1045 "},"ų":{"x_min":109,"x_max":764,"ha":834,"o":"m 625 0 l 607 99 l 600 99 q 373 -14 529 -14 q 109 258 109 -14 l 109 745 l 232 745 l 232 264 q 392 88 232 88 q 551 151 501 88 q 601 357 601 214 l 601 745 l 725 745 l 725 0 l 625 0 m 764 -217 l 764 -293 q 658 -309 714 -309 q 534 -271 577 -309 q 492 -171 492 -234 q 616 0 492 -73 l 708 0 q 589 -162 589 -85 q 678 -227 589 -227 q 764 -217 724 -227 "},"Ў":{"x_min":18,"x_max":814,"ha":834,"o":"m 814 992 l 523 289 q 431 109 471 166 q 329 18 390 51 q 183 -14 269 -14 q 63 6 113 -14 l 63 131 q 184 97 120 97 q 299 132 258 97 q 377 250 341 167 l 18 992 l 156 992 l 416 440 q 429 408 424 423 q 441 377 435 391 l 442 377 l 469 451 l 681 992 l 814 992 m 680 1287 q 415 1071 666 1071 q 225 1121 283 1071 q 160 1287 166 1171 l 276 1287 q 310 1188 282 1217 q 420 1159 339 1159 q 563 1287 551 1159 l 680 1287 "},"Ŭ":{"x_min":85,"x_max":749,"ha":834,"o":"m 749 993 l 749 349 q 663 79 749 173 q 412 -14 578 -14 q 85 352 85 -14 l 85 991 l 211 991 l 211 359 q 419 97 211 97 q 622 361 619 97 l 622 993 l 749 993 m 621 1259 q 560 1121 614 1172 q 414 1071 506 1071 q 213 1259 224 1071 l 287 1259 q 319 1189 292 1206 q 416 1172 346 1172 q 546 1259 539 1172 l 621 1259 "},"ĝ":{"x_min":70,"x_max":763.84375,"ha":834,"o":"m 763 745 l 763 668 l 630 650 q 675 506 675 592 q 602 333 675 397 q 401 269 530 269 q 343 273 364 269 q 275 182 275 234 q 384 125 275 125 l 511 125 q 691 72 629 125 q 754 -77 754 20 q 371 -334 754 -334 q 146 -278 223 -334 q 70 -123 70 -223 q 232 61 70 22 q 167 165 167 93 q 257 293 167 240 q 162 376 197 318 q 128 502 128 434 q 200 691 128 625 q 405 758 272 758 q 507 745 464 758 l 763 745 m 402 353 q 554 508 554 353 q 401 669 554 669 q 248 506 248 669 q 402 353 248 353 m 469 17 l 342 17 q 186 -118 186 17 q 370 -237 186 -237 q 637 -84 637 -237 q 603 -3 637 -24 q 469 17 569 17 m 637 842 l 554 842 q 411 967 497 879 q 268 842 321 875 l 187 842 l 187 860 q 227 905 203 879 q 346 1064 321 1010 l 477 1064 q 596 905 502 1010 l 637 860 l 637 842 "},"Ω":{"x_min":49.859375,"x_max":786.140625,"ha":834,"o":"m 367 99 l 367 0 l 49 0 l 49 111 l 230 111 q 58 559 58 270 q 153 889 58 771 q 417 1007 248 1007 q 682 889 587 1007 q 778 559 778 771 q 604 111 778 268 l 786 111 l 786 0 l 468 0 l 468 99 q 644 556 644 256 q 417 895 644 895 q 191 556 191 895 q 367 99 191 256 "},"s":{"x_min":138,"x_max":696,"ha":834,"o":"m 138 32 l 138 145 q 388 88 268 88 q 575 196 575 88 q 542 264 575 235 q 388 336 508 292 q 190 444 231 395 q 149 560 149 493 q 224 705 149 652 q 433 758 300 758 q 684 707 568 758 l 643 606 q 428 655 520 655 q 269 565 269 655 q 303 499 269 523 q 460 430 337 474 q 649 327 602 378 q 696 203 696 277 q 616 44 696 102 q 392 -14 537 -14 q 138 32 224 -14 "},"?":{"x_min":114,"x_max":719,"ha":834,"o":"m 313 280 l 313 305 q 344 437 313 386 q 452 544 375 488 q 567 649 539 610 q 595 756 595 688 q 545 858 595 819 q 406 898 495 898 q 157 836 289 898 l 114 940 q 403 1006 255 1006 q 633 939 548 1006 q 719 762 719 873 q 682 615 719 671 q 547 485 645 559 q 444 390 467 426 q 421 292 421 353 l 421 280 l 313 280 m 373 168 q 459 74 459 168 q 373 -20 459 -20 q 287 74 287 -20 q 373 168 287 168 "},"Ņ":{"x_min":92,"x_max":741,"ha":834,"o":"m 741 0 l 596 0 l 201 821 l 196 821 q 208 538 208 633 l 208 0 l 92 0 l 92 992 l 236 992 l 629 174 l 633 174 q 624 449 624 380 l 624 992 l 741 992 l 741 0 m 295 -288 q 352 -85 337 -193 l 473 -85 l 473 -98 q 440 -182 473 -113 q 362 -307 407 -251 l 295 -307 l 295 -288 "},"Ī":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 m 222 1172 l 613 1172 l 613 1071 l 222 1071 l 222 1172 "},"Μ":{"x_min":77,"x_max":757,"ha":834,"o":"m 361 0 l 173 868 l 167 868 q 180 592 180 687 l 180 0 l 77 0 l 77 992 l 244 992 l 412 183 l 416 183 l 586 992 l 757 992 l 757 0 l 653 0 l 653 601 q 663 866 653 670 l 657 866 l 466 0 l 361 0 "},"•":{"x_min":258,"x_max":577,"ha":834,"o":"m 417 685 q 577 507 577 685 q 533 374 577 420 q 417 329 490 329 q 299 374 341 329 q 258 507 258 419 q 417 685 258 685 "},"н":{"x_min":109,"x_max":725,"ha":834,"o":"m 232 745 l 232 436 l 601 436 l 601 745 l 725 745 l 725 0 l 601 0 l 601 333 l 232 333 l 232 0 l 109 0 l 109 745 l 232 745 "},"(":{"x_min":200,"x_max":633,"ha":834,"o":"m 502 992 l 633 992 q 327 386 327 736 q 631 -220 327 32 l 502 -220 q 200 384 200 19 q 502 992 200 745 "},"◊":{"x_min":85,"x_max":749,"ha":834,"o":"m 749 499 l 441 0 l 390 0 l 85 498 l 390 1000 l 441 1000 l 749 499 m 624 499 l 416 846 l 209 499 l 416 151 l 624 499 "},"α":{"x_min":82,"x_max":799.671875,"ha":834,"o":"m 585 644 l 593 644 q 639 745 613 714 l 736 745 q 702 446 702 632 l 702 162 q 758 87 702 87 q 799 93 778 87 l 799 3 q 721 -14 764 -14 q 586 99 613 -14 l 578 99 q 365 -14 505 -14 q 157 86 233 -14 q 82 370 82 187 q 160 656 82 555 q 378 758 238 758 q 585 644 520 758 m 578 360 l 578 370 q 533 590 578 524 q 387 655 487 655 q 209 369 209 655 q 388 88 209 88 q 532 150 489 88 q 578 360 575 213 "},"Ħ":{"x_min":0.4375,"x_max":833.5625,"ha":834,"o":"m 92 827 l 92 992 l 218 992 l 218 827 l 615 827 l 615 992 l 742 992 l 742 827 l 833 827 l 833 719 l 742 719 l 742 0 l 615 0 l 615 462 l 218 462 l 218 0 l 92 0 l 92 719 l 0 719 l 0 827 l 92 827 m 615 574 l 615 719 l 218 719 l 218 574 l 615 574 "},"м":{"x_min":78,"x_max":756,"ha":834,"o":"m 756 0 l 650 0 l 650 608 q 628 522 644 590 q 604 439 613 464 l 462 0 l 371 0 l 229 439 q 183 608 223 456 l 183 0 l 78 0 l 78 745 l 224 745 l 367 299 q 416 118 384 247 q 451 247 419 126 q 465 297 458 274 l 612 745 l 756 745 l 756 0 "},"з":{"x_min":136.296875,"x_max":700,"ha":834,"o":"m 342 439 q 506 465 457 439 q 555 551 555 492 q 386 655 555 655 q 178 606 296 655 l 136 706 q 387 758 244 758 q 601 707 526 758 q 676 562 676 657 q 545 398 676 436 l 545 390 q 700 205 700 346 q 618 44 700 102 q 384 -14 536 -14 q 139 32 225 -14 l 139 145 q 387 88 261 88 q 579 210 579 88 q 367 336 579 336 l 266 336 l 266 439 l 342 439 "},"Ґ":{"x_min":158,"x_max":711,"ha":834,"o":"m 594 992 l 594 1196 l 711 1196 l 711 880 l 284 880 l 284 0 l 158 0 l 158 992 l 594 992 "},"Û":{"x_min":85,"x_max":749,"ha":834,"o":"m 749 993 l 749 349 q 663 79 749 173 q 412 -14 578 -14 q 85 352 85 -14 l 85 991 l 211 991 l 211 359 q 419 97 211 97 q 622 361 619 97 l 622 993 l 749 993 m 642 1071 l 559 1071 q 416 1196 502 1108 q 273 1071 326 1104 l 192 1071 l 192 1089 q 232 1134 208 1108 q 351 1293 326 1239 l 482 1293 q 601 1134 507 1239 l 642 1089 l 642 1071 "},"і":{"x_min":133.6875,"x_max":729.171875,"ha":834,"o":"m 429 1051 q 501 973 501 1051 q 479 915 501 934 q 429 896 458 896 q 356 973 356 896 q 429 1051 356 1051 m 367 648 l 184 662 l 184 745 l 490 745 l 490 96 l 729 83 l 729 0 l 133 0 l 133 83 l 367 96 l 367 648 "},"V":{"x_min":22,"x_max":812,"ha":834,"o":"m 677 992 l 812 992 l 479 0 l 353 0 l 22 992 l 154 992 l 355 363 q 415 136 383 276 q 478 367 436 234 l 677 992 "},"Ŗ":{"x_min":126,"x_max":794.25,"ha":834,"o":"m 252 409 l 252 0 l 126 0 l 126 992 l 368 992 q 721 710 721 992 q 524 443 721 515 l 794 0 l 645 0 l 407 409 l 252 409 m 252 517 l 362 517 q 532 561 478 517 q 587 704 587 606 q 533 842 587 800 q 359 884 479 884 l 252 884 l 252 517 m 326 -288 q 383 -85 368 -193 l 504 -85 l 504 -98 q 471 -182 504 -113 q 393 -307 438 -251 l 326 -307 l 326 -288 "},"@":{"x_min":21,"x_max":813,"ha":834,"o":"m 537 272 l 535 272 q 380 150 485 150 q 253 220 300 150 q 206 411 206 291 q 271 637 206 551 q 444 723 337 723 q 618 691 537 723 l 603 409 q 602 362 602 383 l 602 357 q 650 238 602 238 q 718 497 718 238 q 642 792 718 685 q 440 899 567 899 q 201 769 287 899 q 115 412 115 639 q 203 85 115 200 q 453 -30 291 -30 q 687 22 575 -30 l 687 -67 q 449 -123 580 -123 q 134 17 247 -123 q 21 408 21 157 q 134 834 21 677 q 443 992 247 992 q 712 859 611 992 q 813 496 813 726 q 768 244 813 339 q 646 150 724 150 q 537 272 557 150 m 503 620 q 435 634 468 634 q 345 571 377 634 q 314 408 314 508 q 398 238 314 238 q 493 449 484 238 l 503 620 "},"ʼ":{"x_min":303,"x_max":530,"ha":834,"o":"m 520 992 l 530 977 q 410 652 492 832 l 303 652 q 369 992 345 832 l 520 992 "},"℅":{"x_min":5,"x_max":830,"ha":834,"o":"m 360 973 l 339 901 q 240 917 285 917 q 108 764 108 917 q 237 615 108 615 q 354 631 305 615 l 354 559 q 230 534 303 534 q 64 593 124 534 q 5 763 5 652 q 66 939 5 879 q 237 999 127 999 q 360 973 304 999 m 707 992 l 212 0 l 106 0 l 600 992 l 707 992 m 622 -5 q 475 57 533 -5 q 418 227 418 120 q 474 397 418 336 q 625 459 530 459 q 772 395 714 459 q 830 227 830 332 q 774 57 830 119 q 622 -5 718 -5 m 624 76 q 726 227 726 76 q 624 377 726 377 q 521 227 521 377 q 624 76 521 76 "},"i":{"x_min":133.6875,"x_max":729.171875,"ha":834,"o":"m 429 1051 q 501 973 501 1051 q 479 915 501 934 q 429 896 458 896 q 356 973 356 896 q 429 1051 356 1051 m 367 648 l 184 662 l 184 745 l 490 745 l 490 96 l 729 83 l 729 0 l 133 0 l 133 83 l 367 96 l 367 648 "},"ќ":{"x_min":146,"x_max":789,"ha":834,"o":"m 258 344 l 351 457 l 625 745 l 770 745 l 434 398 l 789 0 l 644 0 l 354 318 l 266 262 l 266 0 l 146 0 l 146 745 l 266 745 l 266 547 l 255 344 l 258 344 m 344 860 q 462 1064 408 950 l 611 1064 l 611 1049 q 426 842 534 932 l 344 842 l 344 860 "},"≤":{"x_min":103,"x_max":730,"ha":834,"o":"m 730 150 l 103 455 l 103 525 l 730 831 l 730 722 l 244 490 l 730 258 l 730 150 m 103 0 l 103 101 l 730 101 l 730 0 l 103 0 "},"ё":{"x_min":90,"x_max":744,"ha":834,"o":"m 744 346 l 217 346 q 451 93 222 93 q 703 145 584 93 l 703 36 q 456 -14 590 -14 q 189 87 289 -14 q 90 366 90 188 q 182 652 90 547 q 428 758 274 758 q 658 666 572 758 q 744 423 744 575 l 744 346 m 220 449 l 616 449 q 428 655 616 655 q 220 449 238 655 m 301 1015 q 366 945 366 1015 q 301 876 366 876 q 236 945 236 876 q 301 1015 236 1015 m 555 1015 q 621 945 621 1015 q 555 876 621 876 q 490 945 490 876 q 555 1015 490 1015 "},"υ":{"x_min":109,"x_max":735,"ha":834,"o":"m 109 745 l 232 745 l 232 345 q 418 88 232 88 q 565 167 520 88 q 611 412 611 245 q 568 745 611 573 l 691 745 q 735 406 735 578 q 657 88 735 191 q 414 -14 579 -14 q 109 337 109 -14 l 109 745 "},"ĕ":{"x_min":90,"x_max":744,"ha":834,"o":"m 744 346 l 217 346 q 451 93 222 93 q 703 145 584 93 l 703 36 q 456 -14 590 -14 q 189 87 289 -14 q 90 366 90 188 q 182 652 90 547 q 428 758 274 758 q 658 666 572 758 q 744 423 744 575 l 744 346 m 220 449 l 616 449 q 428 655 616 655 q 220 449 238 655 m 631 1030 q 570 892 624 943 q 424 842 516 842 q 223 1030 234 842 l 297 1030 q 329 960 302 977 q 426 943 356 943 q 556 1030 549 943 l 631 1030 "},"ffi":{"x_min":45.1875,"x_max":723.234375,"ha":834,"o":"m 723 0 l 612 0 l 612 660 l 474 660 l 474 0 l 364 0 l 364 660 l 224 660 l 224 0 l 113 0 l 113 660 l 45 660 l 45 703 l 113 745 l 113 800 q 126 920 113 872 q 166 996 140 968 q 230 1036 192 1025 q 317 1048 268 1048 q 380 1041 350 1048 q 433 1025 410 1033 q 493 1053 458 1044 q 570 1063 528 1063 q 636 1055 605 1063 q 692 1037 667 1047 l 664 947 q 621 960 645 954 q 573 966 598 966 q 529 958 547 966 q 498 933 510 951 q 480 887 486 916 q 474 814 474 857 l 474 745 l 723 745 l 723 0 m 224 745 l 364 745 l 364 813 q 380 943 364 890 q 351 949 366 947 q 320 952 336 952 q 278 945 296 952 q 248 920 260 937 q 230 873 236 902 q 224 801 224 844 l 224 745 "},"ż":{"x_min":123,"x_max":709,"ha":834,"o":"m 709 0 l 123 0 l 123 88 l 572 648 l 145 648 l 145 745 l 697 745 l 697 641 l 256 96 l 709 96 l 709 0 m 434 1023 q 499 945 499 1023 q 434 868 499 868 q 369 945 369 868 q 434 1023 369 1023 "},"Э":{"x_min":46.15625,"x_max":747,"ha":834,"o":"m 98 841 l 46 947 q 306 1006 155 1006 q 629 874 512 1006 q 747 513 747 742 q 630 123 747 260 q 300 -14 514 -14 q 57 26 156 -14 l 57 135 q 280 97 191 97 q 613 462 602 97 l 185 462 l 185 574 l 610 574 q 517 809 597 724 q 306 894 436 894 q 98 841 203 894 "},"ő":{"x_min":78,"x_max":755,"ha":834,"o":"m 414 -14 q 172 91 267 -14 q 78 373 78 196 q 170 654 78 551 q 418 758 262 758 q 660 652 566 758 q 755 373 755 547 q 661 89 755 193 q 414 -14 568 -14 m 416 88 q 627 373 627 88 q 415 655 627 655 q 205 373 205 655 q 416 88 205 88 m 223 860 q 326 1064 278 950 l 475 1064 l 475 1049 q 290 842 399 932 l 223 842 l 223 860 m 468 860 q 572 1064 520 940 l 721 1064 l 721 1049 q 536 842 645 932 l 468 842 l 468 860 "},"Ŏ":{"x_min":57,"x_max":778,"ha":834,"o":"m 417 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 684 118 778 251 q 417 -14 590 -14 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 m 620 1259 q 559 1121 613 1172 q 413 1071 505 1071 q 212 1259 223 1071 l 286 1259 q 318 1189 291 1206 q 415 1172 345 1172 q 545 1259 538 1172 l 620 1259 "},"ю":{"x_min":83,"x_max":791,"ha":834,"o":"m 294 333 l 188 333 l 188 0 l 83 0 l 83 745 l 188 745 l 188 436 l 296 436 q 545 758 319 758 q 726 657 661 758 q 791 373 791 557 q 541 -14 791 -14 q 294 333 313 -14 m 544 88 q 651 154 618 88 q 685 373 685 220 q 652 588 685 521 q 543 655 619 655 q 435 590 468 655 q 401 373 401 525 q 435 155 401 223 q 544 88 468 88 "},"İ":{"x_min":152.921875,"x_max":678.5625,"ha":834,"o":"m 678 0 l 152 0 l 152 83 l 353 96 l 353 895 l 152 908 l 152 992 l 678 992 l 678 908 l 479 895 l 479 96 l 678 83 l 678 0 m 423 1252 q 488 1174 488 1252 q 423 1097 488 1097 q 358 1174 358 1097 q 423 1252 358 1252 "},"Ě":{"x_min":147,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 m 666 1274 q 625 1229 649 1255 q 506 1071 530 1122 l 375 1071 q 256 1229 351 1122 l 216 1274 l 216 1293 l 297 1293 q 440 1166 353 1256 q 583 1293 523 1253 l 666 1293 l 666 1274 "},"‹":{"x_min":272,"x_max":561,"ha":834,"o":"m 272 374 l 482 655 l 561 602 l 399 366 l 561 130 l 482 78 l 272 356 l 272 374 "},"ķ":{"x_min":146,"x_max":789,"ha":834,"o":"m 261 375 l 352 478 l 619 745 l 770 745 l 435 422 l 789 0 l 644 0 l 356 341 l 269 286 l 269 0 l 146 0 l 146 1055 l 269 1055 l 269 571 l 258 375 l 261 375 m 329 -288 q 386 -85 371 -193 l 507 -85 l 507 -98 q 474 -182 507 -113 q 396 -307 441 -251 l 329 -307 l 329 -288 "},"ì":{"x_min":133.6875,"x_max":729.171875,"ha":834,"o":"m 367 648 l 184 662 l 184 745 l 490 745 l 490 96 l 729 83 l 729 0 l 133 0 l 133 83 l 367 96 l 367 648 m 493 842 l 410 842 q 226 1049 298 938 l 226 1064 l 374 1064 q 493 860 433 943 l 493 842 "},"±":{"x_min":103.53125,"x_max":730.203125,"ha":834,"o":"m 366 439 l 103 439 l 103 541 l 366 541 l 366 804 l 467 804 l 467 541 l 730 541 l 730 439 l 467 439 l 467 178 l 366 178 l 366 439 m 103 0 l 103 101 l 730 101 l 730 0 l 103 0 "},"|":{"x_min":366,"x_max":467.734375,"ha":834,"o":"m 366 1055 l 467 1055 l 467 -334 l 366 -334 l 366 1055 "},"§":{"x_min":165.140625,"x_max":669,"ha":834,"o":"m 285 724 q 176 884 176 778 q 246 1014 176 965 q 435 1063 317 1063 q 656 1014 545 1063 l 618 919 q 432 966 513 966 q 296 886 296 966 q 330 823 296 850 q 462 756 363 797 q 619 661 569 714 q 669 532 669 609 q 570 349 669 409 q 669 196 669 295 q 593 47 669 102 q 384 -7 518 -7 q 165 37 246 -7 l 165 144 q 384 89 281 89 q 548 185 548 89 q 519 251 548 224 q 386 320 489 278 q 214 428 252 377 q 176 549 176 478 q 285 724 176 670 m 484 389 q 563 514 563 440 q 513 612 563 575 q 371 682 462 650 q 281 564 281 650 q 320 478 281 514 q 460 399 358 442 l 484 389 "},"џ":{"x_min":109,"x_max":725,"ha":834,"o":"m 232 102 l 601 102 l 601 745 l 725 745 l 725 0 l 484 0 l 484 -258 l 361 -258 l 361 0 l 109 0 l 109 745 l 232 745 l 232 102 "},"љ":{"x_min":0,"x_max":801,"ha":834,"o":"m 498 437 l 531 437 q 801 226 801 437 q 516 0 801 0 l 375 0 l 375 642 l 248 642 q 207 191 225 319 q 159 26 190 62 q 62 -10 127 -10 q 0 -1 20 -10 l 0 86 q 33 78 14 78 q 77 107 61 78 q 109 266 94 136 q 149 745 125 397 l 498 745 l 498 437 m 498 334 l 498 102 l 533 102 q 695 218 695 102 q 657 306 695 279 q 530 334 620 334 l 498 334 "},"q":{"x_min":93,"x_max":727,"ha":834,"o":"m 603 644 l 608 644 l 627 745 l 727 745 l 727 -334 l 603 -334 l 603 -16 q 611 99 603 11 l 603 99 q 384 -14 526 -14 q 170 87 248 -14 q 93 370 93 188 q 171 655 93 553 q 384 758 249 758 q 603 644 525 758 m 603 342 l 603 370 q 556 590 603 524 q 405 655 508 655 q 220 369 220 655 q 406 88 220 88 q 555 148 510 88 q 603 342 600 208 "},"˳":{"x_min":262,"x_max":569,"ha":834,"o":"m 569 -229 q 557 -291 569 -264 q 524 -338 545 -319 q 474 -367 503 -357 q 413 -377 446 -377 q 351 -367 379 -377 q 303 -338 323 -357 q 272 -292 283 -319 q 262 -231 262 -265 q 272 -169 262 -196 q 303 -123 283 -142 q 351 -94 323 -104 q 413 -85 379 -85 q 474 -94 445 -85 q 523 -123 502 -104 q 556 -168 544 -142 q 569 -229 569 -195 m 494 -231 q 472 -174 494 -194 q 415 -154 450 -154 q 358 -174 380 -154 q 336 -231 336 -194 q 356 -287 336 -267 q 415 -307 376 -307 q 472 -287 450 -307 q 494 -231 494 -267 "},"ή":{"x_min":109,"x_max":725,"ha":834,"o":"m 601 -334 l 601 479 q 440 655 601 655 q 232 385 232 655 l 232 0 l 109 0 l 109 745 l 208 745 l 227 644 l 233 644 q 461 758 302 758 q 725 486 725 758 l 725 -334 l 601 -334 m 380 860 l 402 932 q 431 1064 424 1009 l 562 1064 l 562 1049 q 528 968 562 1038 q 453 842 495 898 l 380 842 l 380 860 "},"Ж":{"x_min":-0.25,"x_max":834.25,"ha":834,"o":"m 253 511 l 7 992 l 128 992 l 366 511 l 366 992 l 492 992 l 492 511 l 703 992 l 824 992 l 603 511 l 834 0 l 708 0 l 492 502 l 492 0 l 366 0 l 366 502 l 123 0 l 0 0 l 253 511 "},"®":{"x_min":4,"x_max":830,"ha":834,"o":"m 416 1006 q 720 867 610 1006 q 830 495 830 729 q 720 123 830 261 q 416 -14 610 -14 q 113 124 222 -14 q 4 495 4 262 q 112 867 4 728 q 416 1006 221 1006 m 416 59 q 667 175 579 59 q 756 496 756 291 q 667 816 756 700 q 416 932 579 932 q 165 816 253 932 q 77 496 77 700 q 165 175 77 291 q 416 59 253 59 m 508 461 l 668 194 l 548 194 l 407 432 l 344 432 l 344 194 l 236 194 l 236 799 l 395 799 q 616 619 616 799 q 508 461 616 508 m 344 524 l 393 524 q 507 618 507 524 q 479 687 507 667 q 390 706 450 706 l 344 706 l 344 524 "},"Н":{"x_min":92,"x_max":742,"ha":834,"o":"m 742 0 l 615 0 l 615 462 l 218 462 l 218 0 l 92 0 l 92 992 l 218 992 l 218 574 l 615 574 l 615 992 l 742 992 l 742 0 "},"Ε":{"x_min":147,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 "},"₧":{"x_min":56,"x_max":808,"ha":834,"o":"m 182 388 l 182 0 l 56 0 l 56 992 l 199 992 q 515 702 515 992 q 438 470 515 553 q 209 388 361 388 l 182 388 m 182 485 l 207 485 q 389 690 389 485 q 222 884 389 884 l 182 884 l 182 485 m 808 92 l 808 7 q 699 -14 766 -14 q 554 172 554 -14 l 554 407 l 476 407 l 476 466 l 554 501 l 594 647 l 648 647 l 648 504 l 790 504 l 790 407 l 648 407 l 648 181 q 724 82 648 82 q 808 92 766 82 "},"л":{"x_min":21,"x_max":706,"ha":834,"o":"m 706 0 l 582 0 l 582 642 l 351 642 q 266 148 326 306 q 83 -10 205 -10 q 21 -1 41 -10 l 21 86 q 54 78 35 78 q 175 241 129 78 q 246 745 221 403 l 706 745 l 706 0 "},"σ":{"x_min":87,"x_max":796.359375,"ha":834,"o":"m 796 745 l 796 642 l 615 642 q 736 342 736 509 q 648 84 736 182 q 409 -14 561 -14 q 173 83 259 -14 q 87 355 87 180 q 463 745 87 745 l 796 745 m 503 642 l 463 642 q 271 576 328 642 q 214 356 214 509 q 266 159 214 230 q 414 88 318 88 q 558 153 509 88 q 608 337 608 218 q 503 642 608 520 "},"θ":{"x_min":100,"x_max":734,"ha":834,"o":"m 415 -14 q 180 115 260 -14 q 100 494 100 245 q 177 875 100 751 q 415 1000 254 1000 q 653 870 572 1000 q 734 494 734 741 q 415 -14 734 -14 m 223 547 l 606 547 q 556 810 601 723 q 413 897 511 897 q 274 812 319 897 q 223 547 228 727 m 606 458 l 223 458 q 272 177 227 267 q 413 88 317 88 q 556 176 510 88 q 606 458 602 264 "}," ":{"x_min":0,"x_max":0,"ha":834},"∑":{"x_min":50,"x_max":793,"ha":834,"o":"m 50 -334 l 50 -256 l 446 364 l 60 914 l 60 992 l 748 992 l 748 880 l 237 880 l 596 365 l 219 -222 l 793 -222 l 793 -334 l 50 -334 "},"Ώ":{"x_min":-91,"x_max":786.140625,"ha":834,"o":"m 367 99 l 367 0 l 49 0 l 49 111 l 230 111 q 58 559 58 270 q 153 889 58 771 q 417 1007 248 1007 q 682 889 587 1007 q 778 559 778 771 q 604 111 778 268 l 786 111 l 786 0 l 468 0 l 468 99 q 644 556 644 256 q 417 895 644 895 q 191 556 191 895 q 367 99 191 256 m -91 789 l -68 861 q -39 993 -46 938 l 91 993 l 91 978 q 57 897 91 967 q -17 771 24 827 l -91 771 l -91 789 "},"ẃ":{"x_min":-3,"x_max":836,"ha":834,"o":"m 551 0 l 462 404 l 416 628 l 411 628 l 367 401 l 276 0 l 148 0 l -3 745 l 106 745 l 173 376 q 212 109 196 250 l 216 109 q 262 352 237 235 l 352 745 l 483 745 l 569 352 q 614 109 598 220 l 619 109 q 659 376 640 274 l 728 745 l 836 745 l 683 0 l 551 0 m 354 860 q 472 1064 418 950 l 621 1064 l 621 1049 q 436 842 544 932 l 354 842 l 354 860 "},"+":{"x_min":103.53125,"x_max":730.203125,"ha":834,"o":"m 366 439 l 103 439 l 103 541 l 366 541 l 366 804 l 467 804 l 467 541 l 730 541 l 730 439 l 467 439 l 467 178 l 366 178 l 366 439 "},"Ë":{"x_min":147,"x_max":719,"ha":834,"o":"m 719 0 l 147 0 l 147 992 l 719 992 l 719 880 l 273 880 l 273 574 l 693 574 l 693 462 l 273 462 l 273 111 l 719 111 l 719 0 m 306 1244 q 371 1174 371 1244 q 306 1105 371 1105 q 241 1174 241 1105 q 306 1244 241 1244 m 560 1244 q 626 1174 626 1244 q 560 1105 626 1105 q 495 1174 495 1105 q 560 1244 495 1244 "},"Š":{"x_min":96,"x_max":738,"ha":834,"o":"m 96 32 l 96 152 q 375 93 238 93 q 611 258 611 93 q 564 366 611 328 q 371 456 516 404 q 170 575 231 506 q 109 754 109 644 q 196 939 109 872 q 435 1006 283 1006 q 718 953 591 1006 l 674 841 q 432 894 544 894 q 235 752 235 894 q 279 641 235 683 q 461 551 323 599 q 682 428 626 491 q 738 264 738 364 q 644 60 738 134 q 376 -14 550 -14 q 96 32 197 -14 m 663 1274 q 622 1229 646 1255 q 503 1071 527 1122 l 372 1071 q 253 1229 348 1122 l 213 1274 l 213 1293 l 294 1293 q 437 1166 350 1256 q 580 1293 520 1253 l 663 1293 l 663 1274 "}," ":{"x_min":0,"x_max":0,"ha":834},"ð":{"x_min":92,"x_max":742,"ha":834,"o":"m 603 575 l 609 578 q 443 845 569 733 l 270 742 l 221 819 l 368 907 q 251 981 297 955 l 298 1065 q 465 964 395 1017 l 618 1058 l 669 981 l 537 902 q 742 388 742 705 q 654 93 742 200 q 415 -14 567 -14 q 181 76 270 -14 q 92 323 92 167 q 173 569 92 481 q 400 658 255 658 q 603 575 543 658 m 415 555 q 219 317 219 555 q 416 88 219 88 q 568 155 522 88 q 614 355 614 222 q 561 498 614 442 q 415 555 508 555 "},"щ":{"x_min":74,"x_max":820,"ha":834,"o":"m 459 102 l 634 102 l 634 745 l 740 745 l 740 102 l 820 102 l 820 -258 l 714 -258 l 714 0 l 74 0 l 74 745 l 179 745 l 179 102 l 354 102 l 354 745 l 459 745 l 459 102 "},"℮":{"x_min":56,"x_max":776,"ha":834,"o":"m 776 359 l 214 359 l 214 117 q 415 33 297 33 q 684 193 588 33 l 732 165 q 592 17 666 59 q 415 -24 518 -24 q 154 85 252 -24 q 56 359 56 195 q 160 639 56 536 q 415 743 264 743 q 674 637 572 743 q 776 362 776 532 l 776 359 m 618 417 l 618 604 q 414 685 536 685 q 214 606 298 685 l 214 417 l 618 417 "},"Φ":{"x_min":18,"x_max":817,"ha":834,"o":"m 361 1006 l 487 1006 l 487 884 l 517 884 q 736 779 656 884 q 817 514 817 674 q 734 246 817 354 q 503 139 652 139 l 487 139 l 487 -14 l 361 -14 l 361 139 l 344 139 q 103 246 188 139 q 18 514 18 354 q 101 778 18 673 q 329 884 184 884 l 361 884 l 361 1006 m 487 246 l 491 246 q 638 319 585 246 q 690 517 690 391 q 642 705 690 634 q 507 776 594 776 l 487 776 l 487 246 m 361 776 l 340 776 q 195 705 247 776 q 144 517 144 634 q 200 319 144 391 q 357 246 256 246 l 361 246 l 361 776 "},"ş":{"x_min":138,"x_max":696,"ha":834,"o":"m 138 32 l 138 145 q 388 88 268 88 q 575 196 575 88 q 542 264 575 235 q 388 336 508 292 q 190 444 231 395 q 149 560 149 493 q 224 705 149 652 q 433 758 300 758 q 684 707 568 758 l 643 606 q 428 655 520 655 q 269 565 269 655 q 303 499 269 523 q 460 430 337 474 q 649 327 602 378 q 696 203 696 277 q 616 44 696 102 q 392 -14 537 -14 q 138 32 224 -14 m 285 -327 l 285 -254 q 338 -258 307 -258 q 440 -196 440 -258 q 324 -119 440 -146 l 386 0 l 466 0 l 428 -78 q 538 -194 538 -103 q 340 -334 538 -334 q 285 -327 317 -334 "}," ":{"x_min":0,"x_max":0,"ha":834},"ı":{"x_min":133.6875,"x_max":729.171875,"ha":834,"o":"m 367 648 l 184 662 l 184 745 l 490 745 l 490 96 l 729 83 l 729 0 l 133 0 l 133 83 l 367 96 l 367 648 "},"ä":{"x_min":92,"x_max":696,"ha":834,"o":"m 606 0 l 580 99 l 575 99 q 468 10 523 35 q 327 -14 413 -14 q 154 44 217 -14 q 92 207 92 102 q 436 442 92 431 l 573 447 l 573 494 q 409 655 573 655 q 187 599 309 655 l 144 692 q 404 758 277 758 q 627 699 558 758 q 696 509 696 640 l 696 0 l 606 0 m 572 362 l 462 357 q 274 315 330 352 q 219 204 219 279 q 354 82 219 82 q 513 138 454 82 q 572 294 572 194 l 572 362 m 297 1015 q 362 945 362 1015 q 297 876 362 876 q 232 945 232 876 q 297 1015 232 1015 m 551 1015 q 617 945 617 1015 q 551 876 617 876 q 486 945 486 876 q 551 1015 486 1015 "},"¹":{"x_min":249,"x_max":491.734375,"ha":834,"o":"m 397 990 l 491 990 l 491 456 l 390 456 l 390 771 q 396 906 390 817 q 345 862 368 876 l 298 828 l 249 887 l 397 990 "},"W":{"x_min":1,"x_max":833,"ha":834,"o":"m 358 684 l 478 684 l 577 330 q 626 122 618 181 q 670 542 627 158 l 717 992 l 833 992 l 706 0 l 577 0 l 462 393 q 418 584 435 487 q 373 392 396 467 l 267 0 l 139 0 l 1 992 l 116 992 l 176 542 q 203 285 191 422 q 215 122 215 148 q 262 333 231 224 l 358 684 "},"λ":{"x_min":41,"x_max":803.484375,"ha":834,"o":"m 41 0 l 383 734 l 347 842 q 294 937 324 912 q 216 961 265 961 q 145 953 178 961 l 145 1052 q 231 1064 189 1064 q 376 1018 328 1064 q 472 829 424 972 l 693 163 q 762 88 718 88 q 803 93 782 88 l 803 3 q 725 -14 769 -14 q 640 13 669 -14 q 591 99 610 40 l 500 383 q 436 611 453 528 l 432 611 q 351 393 407 517 l 169 0 l 41 0 "},">":{"x_min":103,"x_max":730,"ha":834,"o":"m 103 258 l 588 490 l 103 722 l 103 831 l 730 525 l 730 455 l 103 150 l 103 258 "},"τ":{"x_min":72.328125,"x_max":733.859375,"ha":834,"o":"m 733 745 l 733 642 l 411 642 l 411 230 q 553 84 411 84 q 683 97 625 84 l 683 5 q 533 -18 625 -18 q 288 216 288 -18 l 288 642 l 72 642 l 72 691 l 163 745 l 733 745 "},"Ų":{"x_min":85,"x_max":749,"ha":834,"o":"m 749 993 l 749 349 q 663 79 749 173 q 412 -14 578 -14 q 85 352 85 -14 l 85 991 l 211 991 l 211 359 q 419 97 211 97 q 622 361 619 97 l 622 993 l 749 993 m 572 -217 l 572 -293 q 466 -309 522 -309 q 342 -271 385 -309 q 300 -171 300 -234 q 424 0 300 -73 l 516 0 q 397 -162 397 -85 q 486 -227 397 -227 q 572 -217 532 -227 "},"Ŵ":{"x_min":1,"x_max":833,"ha":834,"o":"m 358 684 l 478 684 l 577 330 q 626 122 618 181 q 670 542 627 158 l 717 992 l 833 992 l 706 0 l 577 0 l 462 393 q 418 584 435 487 q 373 392 396 467 l 267 0 l 139 0 l 1 992 l 116 992 l 176 542 q 203 285 191 422 q 215 122 215 148 q 262 333 231 224 l 358 684 m 644 1071 l 561 1071 q 418 1196 504 1108 q 275 1071 328 1104 l 194 1071 l 194 1089 q 234 1134 210 1108 q 353 1293 328 1239 l 484 1293 q 603 1134 509 1239 l 644 1089 l 644 1071 "},"‛":{"x_min":303,"x_max":530,"ha":834,"o":"m 463 992 q 530 652 490 816 l 423 652 q 303 977 339 837 l 313 992 l 463 992 "},"Ð":{"x_min":0,"x_max":778,"ha":834,"o":"m 92 0 l 92 445 l 0 445 l 0 557 l 92 557 l 92 992 l 323 992 q 658 863 538 992 q 778 505 778 735 q 653 130 778 260 q 296 0 529 0 l 92 0 m 218 884 l 218 557 l 476 557 l 476 445 l 218 445 l 218 107 l 283 107 q 644 501 644 107 q 309 884 644 884 l 218 884 "},"Λ":{"x_min":22,"x_max":811,"ha":834,"o":"m 811 0 l 676 0 l 478 625 q 415 856 435 760 q 355 629 384 720 l 154 0 l 22 0 l 352 992 l 479 992 l 811 0 "},"·":{"x_min":330,"x_max":502,"ha":834,"o":"m 416 585 q 502 490 502 585 q 416 396 502 396 q 330 490 330 396 q 416 585 330 585 "},"Х":{"x_min":36,"x_max":797,"ha":834,"o":"m 797 0 l 653 0 l 412 430 l 164 0 l 36 0 l 343 518 l 57 992 l 191 992 l 416 612 l 643 992 l 773 992 l 486 522 l 797 0 "},"Υ":{"x_min":23,"x_max":809,"ha":834,"o":"m 415 490 l 672 992 l 809 992 l 479 386 l 479 0 l 353 0 l 353 379 l 23 992 l 160 992 l 415 490 "},"r":{"x_min":179,"x_max":719,"ha":834,"o":"m 719 727 l 685 614 q 533 650 602 650 q 362 586 422 650 q 302 404 302 523 l 302 0 l 179 0 l 179 745 l 279 745 l 294 608 l 299 608 q 410 723 351 688 q 555 758 469 758 q 719 727 636 758 "},"ж":{"x_min":-1.25,"x_max":835.25,"ha":834,"o":"m 363 383 l 363 745 l 486 745 l 486 383 l 709 745 l 835 745 l 600 383 l 833 0 l 701 0 l 486 377 l 486 0 l 363 0 l 363 377 l 133 0 l 0 0 l 250 383 l -1 745 l 123 745 l 363 383 "},"Ø":{"x_min":54.296875,"x_max":784.78125,"ha":834,"o":"m 209 49 l 147 -51 l 54 0 l 136 134 q 57 498 57 259 q 419 1007 57 1007 q 629 935 545 1007 l 691 1038 l 784 985 l 700 849 q 778 496 778 722 q 684 118 778 251 q 417 -14 590 -14 q 209 49 289 -14 m 216 265 l 565 832 q 419 895 511 895 q 190 497 190 895 q 216 265 190 353 m 620 719 l 273 155 q 417 97 327 97 q 589 195 535 97 q 644 497 644 293 q 620 719 644 638 "},"Ỳ":{"x_min":23,"x_max":809,"ha":834,"o":"m 415 490 l 672 992 l 809 992 l 479 386 l 479 0 l 353 0 l 353 379 l 23 992 l 160 992 l 415 490 m 473 1071 l 390 1071 q 206 1278 278 1167 l 206 1293 l 354 1293 q 473 1089 413 1172 l 473 1071 "},"÷":{"x_min":103,"x_max":729,"ha":834,"o":"m 415 812 q 493 727 493 812 q 415 642 493 642 q 338 727 338 642 q 415 812 338 812 m 103 439 l 103 541 l 729 541 l 729 439 l 103 439 m 415 338 q 493 253 493 338 q 415 169 493 169 q 338 253 338 169 q 415 338 338 338 "},"с":{"x_min":117,"x_max":720,"ha":834,"o":"m 720 717 l 677 610 q 496 650 576 650 q 244 369 244 650 q 489 93 244 93 q 707 135 595 93 l 707 27 q 483 -14 616 -14 q 213 84 309 -14 q 117 367 117 183 q 215 658 117 558 q 492 758 313 758 q 720 717 612 758 "},"h":{"x_min":109,"x_max":725,"ha":834,"o":"m 601 0 l 601 479 q 440 655 601 655 q 232 385 232 655 l 232 0 l 109 0 l 109 1055 l 232 1055 l 232 741 l 227 644 l 233 644 q 461 758 303 758 q 725 486 725 758 l 725 0 l 601 0 "},"f":{"x_min":106,"x_max":756,"ha":834,"o":"m 708 648 l 444 648 l 444 0 l 321 0 l 321 648 l 106 648 l 106 726 l 321 749 l 321 814 q 382 1004 321 945 q 584 1063 443 1063 q 756 1039 672 1063 l 728 942 q 587 960 657 960 q 474 926 504 960 q 444 815 444 893 l 444 745 l 708 745 l 708 648 "},"“":{"x_min":158,"x_max":674,"ha":834,"o":"m 457 652 l 447 666 q 567 992 483 806 l 674 992 q 607 652 632 818 l 457 652 m 168 652 l 158 666 q 278 992 194 806 l 385 992 q 318 652 343 818 l 168 652 "},"A":{"x_min":22,"x_max":812,"ha":834,"o":"m 681 0 l 583 307 l 250 307 l 150 0 l 22 0 l 350 996 l 482 996 l 812 0 l 681 0 m 547 419 l 457 706 q 415 860 431 791 q 384 736 401 793 l 286 419 l 547 419 "},"O":{"x_min":57,"x_max":778,"ha":834,"o":"m 417 -14 q 57 498 57 -14 q 419 1007 57 1007 q 685 874 592 1007 q 778 496 778 741 q 684 118 778 251 q 417 -14 590 -14 m 417 97 q 589 195 535 97 q 644 497 644 293 q 589 799 644 702 q 419 895 533 895 q 190 497 190 895 q 417 97 190 97 "},"Đ":{"x_min":0,"x_max":778,"ha":834,"o":"m 92 0 l 92 445 l 0 445 l 0 557 l 92 557 l 92 992 l 323 992 q 658 863 538 992 q 778 505 778 735 q 653 130 778 260 q 296 0 529 0 l 92 0 m 218 884 l 218 557 l 476 557 l 476 445 l 218 445 l 218 107 l 283 107 q 644 501 644 107 q 309 884 644 884 l 218 884 "},"3":{"x_min":89,"x_max":716,"ha":834,"o":"m 471 521 l 471 517 q 716 281 716 485 q 622 64 716 143 q 351 -14 528 -14 q 89 39 187 -14 l 89 154 q 349 91 214 91 q 590 285 590 91 q 331 458 590 458 l 241 458 l 241 564 l 331 564 q 499 615 440 564 q 559 751 559 666 q 513 860 559 820 q 389 900 467 900 q 155 819 268 900 l 93 904 q 388 1006 219 1006 q 606 938 528 1006 q 685 759 685 871 q 629 602 685 665 q 471 521 574 539 "},"Ǿ":{"x_min":54.296875,"x_max":784.78125,"ha":834,"o":"m 209 49 l 147 -51 l 54 0 l 136 134 q 57 498 57 259 q 419 1007 57 1007 q 629 935 545 1007 l 691 1038 l 784 985 l 700 849 q 778 496 778 722 q 684 118 778 251 q 417 -14 590 -14 q 209 49 289 -14 m 216 265 l 565 832 q 419 895 511 895 q 190 497 190 895 q 216 265 190 353 m 620 719 l 273 155 q 417 97 327 97 q 589 195 535 97 q 644 497 644 293 q 620 719 644 638 m 322 1089 q 440 1293 386 1179 l 589 1293 l 589 1278 q 404 1071 512 1161 l 322 1071 l 322 1089 "},"⅛":{"x_min":12,"x_max":818,"ha":834,"o":"m 160 990 l 254 990 l 254 456 l 153 456 l 153 771 q 159 906 153 817 q 108 862 131 876 l 61 828 l 12 887 l 160 990 m 679 992 l 184 0 l 77 0 l 571 992 l 679 992 m 706 287 q 818 147 818 230 q 766 35 818 77 q 630 -7 714 -7 q 488 33 538 -7 q 439 143 439 73 q 532 281 439 231 q 456 412 456 335 q 504 511 456 474 q 629 549 553 549 q 752 512 704 549 q 800 412 800 475 q 706 287 800 334 m 631 321 q 698 413 698 355 q 627 480 698 480 q 557 413 557 480 q 631 321 557 357 m 616 247 q 540 142 540 203 q 627 61 540 61 q 716 142 716 61 q 625 243 716 203 l 616 247 "},"4":{"x_min":41,"x_max":764.453125,"ha":834,"o":"m 764 222 l 620 222 l 620 0 l 500 0 l 500 222 l 41 222 l 41 330 l 492 997 l 620 997 l 620 335 l 764 335 l 764 222 m 500 335 l 500 576 q 509 869 500 695 l 503 869 q 442 747 478 800 l 162 335 l 500 335 "},"Ẁ":{"x_min":1,"x_max":833,"ha":834,"o":"m 358 684 l 478 684 l 577 330 q 626 122 618 181 q 670 542 627 158 l 717 992 l 833 992 l 706 0 l 577 0 l 462 393 q 418 584 435 487 q 373 392 396 467 l 267 0 l 139 0 l 1 992 l 116 992 l 176 542 q 203 285 191 422 q 215 122 215 148 q 262 333 231 224 l 358 684 m 496 1071 l 413 1071 q 229 1278 301 1167 l 229 1293 l 377 1293 q 496 1089 436 1172 l 496 1071 "},"Ť":{"x_min":69,"x_max":762,"ha":834,"o":"m 479 0 l 353 0 l 353 880 l 69 880 l 69 992 l 762 992 l 762 880 l 479 880 l 479 0 m 641 1274 q 600 1229 624 1255 q 481 1071 505 1122 l 350 1071 q 231 1229 326 1122 l 191 1274 l 191 1293 l 272 1293 q 415 1166 328 1256 q 558 1293 498 1253 l 641 1293 l 641 1274 "},"ψ":{"x_min":54,"x_max":784,"ha":834,"o":"m 459 1054 l 459 91 q 663 386 663 110 q 624 745 663 556 l 741 745 q 784 390 784 557 q 459 -12 784 5 l 459 -334 l 354 -334 l 354 -12 q 125 85 196 -6 q 54 376 54 176 l 54 745 l 174 745 l 174 386 q 354 90 174 101 l 354 1054 l 459 1054 "},"ŗ":{"x_min":128,"x_max":719,"ha":834,"o":"m 719 727 l 685 614 q 533 650 602 650 q 362 586 422 650 q 302 404 302 523 l 302 0 l 179 0 l 179 745 l 279 745 l 294 608 l 299 608 q 410 723 351 688 q 555 758 469 758 q 719 727 636 758 m 128 -288 q 185 -85 170 -193 l 306 -85 l 306 -98 q 273 -182 306 -113 q 195 -307 240 -251 l 128 -307 l 128 -288 "}},"cssFontWeight":"normal","ascender":1290,"underlinePosition":-154,"cssFontStyle":"normal","boundingBox":{"yMin":-377,"xMin":-211,"yMax":1467,"xMax":892},"resolution":1000,"original_font_information":{"postscript_name":"DroidSansMono","version_string":"Version 1.00 build 107","vendor_url":"http://www.ascendercorp.com/","full_font_name":"Droid Sans Mono","font_family_name":"Droid Sans Mono","copyright":"Digitized data copyright © 2006, Google Corporation.","description":"Droid Sans is a humanist sans serif typeface designed for user interfaces and electronic communication.","trademark":"Droid is a trademark of Google and may be registered in certain jurisdictions.","designer":"","designer_url":"http://www.ascendercorp.com/typedesigners.html","unique_font_identifier":"Ascender - Droid Sans Mono","license_url":"http://ascendercorp.com/eula10.html","license_description":"This font software is the valuable property of Ascender Corporation and/or its suppliers and its use by you is covered under the terms of a license agreement. This font software is licensed to you by Ascender Corporation for your personal or business use on up to five personal computers. You may not use this font software on more than five personal computers unless you have obtained a license from Ascender to do so. Except as specifically permitted by the license, you may not copy this font software.\n\nIf you have any questions, please review the license agreement you received with this font software, and/or contact Ascender Corporation. \n\nContact Information:\nAscender Corporation\nWeb http://www.ascendercorp.com/","manufacturer_name":"Ascender Corporation","font_sub_family_name":"Regular"},"descender":-328,"familyName":"Droid Sans Mono","lineHeight":1617,"underlineThickness":102} \ No newline at end of file diff --git a/node_modules/three/examples/fonts/droid/droid_sans_regular.typeface.json b/node_modules/three/examples/fonts/droid/droid_sans_regular.typeface.json new file mode 100644 index 0000000..e94d48f --- /dev/null +++ b/node_modules/three/examples/fonts/droid/droid_sans_regular.typeface.json @@ -0,0 +1 @@ +{"glyphs":{"ǻ":{"x_min":64,"x_max":626,"ha":737,"o":"m 308 1166 q 338 1203 322 1182 q 370 1246 354 1224 q 401 1290 386 1268 q 426 1331 415 1311 l 575 1331 l 575 1320 q 542 1283 564 1305 q 495 1236 521 1261 q 441 1190 469 1212 q 389 1153 413 1167 l 308 1153 l 308 1166 m 536 0 l 511 102 l 505 102 q 461 50 483 72 q 412 13 439 28 q 353 -7 386 0 q 278 -14 321 -14 q 193 0 232 -14 q 125 40 153 12 q 80 109 96 67 q 64 208 64 151 q 142 379 64 320 q 379 445 220 439 l 503 450 l 503 496 q 494 572 503 541 q 465 620 484 602 q 419 647 447 639 q 357 655 392 655 q 253 639 301 655 q 160 599 204 623 l 117 692 q 228 739 167 720 q 357 758 290 758 q 477 744 427 758 q 560 700 527 730 q 609 623 593 669 q 626 509 626 576 l 626 0 l 536 0 m 310 88 q 386 101 351 88 q 447 140 422 114 q 488 205 473 166 q 502 298 502 245 l 502 365 l 405 360 q 303 346 345 357 q 237 316 262 336 q 202 270 213 297 q 191 208 191 243 q 224 117 191 146 q 310 88 257 88 m 522 959 q 510 897 522 924 q 477 850 498 869 q 428 821 456 831 q 366 812 400 812 q 305 821 332 812 q 257 850 277 831 q 226 896 237 869 q 215 958 215 923 q 226 1019 215 992 q 257 1065 237 1046 q 305 1094 277 1084 q 366 1104 332 1104 q 427 1094 399 1104 q 477 1065 456 1084 q 510 1020 498 1046 q 522 959 522 993 m 447 958 q 425 1014 447 994 q 368 1034 403 1034 q 311 1014 333 1034 q 289 958 289 994 q 309 901 289 921 q 368 881 329 881 q 425 901 403 881 q 447 958 447 921 "},"Á":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 m 362 1089 q 392 1134 376 1108 q 424 1187 408 1160 q 455 1242 440 1215 q 480 1293 469 1269 l 629 1293 l 629 1278 q 596 1233 618 1260 q 549 1175 575 1205 q 495 1118 523 1146 q 444 1071 467 1089 l 362 1071 l 362 1089 "},"ĥ":{"x_min":118,"x_max":707,"ha":818,"o":"m 583 0 l 583 479 q 547 611 583 567 q 436 655 512 655 q 343 637 381 655 q 283 585 306 620 q 251 501 261 551 q 241 385 241 450 l 241 0 l 118 0 l 118 1055 l 241 1055 l 241 741 l 236 644 l 242 644 q 283 694 259 673 q 334 730 306 715 q 393 751 362 744 q 457 758 424 758 q 644 693 581 758 q 707 486 707 628 l 707 0 l 583 0 m 655 1109 l 573 1109 q 501 1164 538 1131 q 430 1234 465 1197 q 357 1164 393 1197 q 287 1109 321 1131 l 205 1109 l 205 1127 q 245 1172 222 1146 q 291 1225 268 1198 q 334 1280 314 1253 q 364 1331 354 1307 l 495 1331 q 525 1280 505 1307 q 568 1225 545 1253 q 614 1172 591 1198 q 655 1127 638 1146 l 655 1109 "},"Κ":{"x_min":135,"x_max":804.25,"ha":804,"o":"m 804 0 l 661 0 l 355 473 l 261 396 l 261 0 l 135 0 l 135 992 l 261 992 l 261 496 l 343 609 l 649 992 l 791 992 l 438 559 l 804 0 "},"»":{"x_min":57,"x_max":621.5,"ha":676,"o":"m 621 356 l 411 78 l 333 130 l 494 367 l 333 603 l 411 656 l 621 375 l 621 356 m 345 356 l 136 78 l 57 130 l 218 367 l 57 603 l 136 656 l 345 375 l 345 356 "},"∆":{"x_min":28,"x_max":761,"ha":789,"o":"m 28 76 l 330 992 l 457 992 l 761 75 l 761 0 l 28 0 l 28 76 m 456 625 q 419 748 434 691 q 393 856 403 805 q 367 748 381 805 q 333 629 353 691 l 161 111 l 627 111 l 456 625 "},"ў":{"x_min":6.75,"x_max":672.25,"ha":679,"o":"m 6 745 l 134 745 l 280 329 q 300 272 290 301 q 318 212 310 242 q 333 154 327 182 q 341 103 339 126 l 346 103 q 356 149 349 120 q 373 211 364 178 q 392 276 382 244 q 409 330 402 308 l 544 745 l 672 745 l 377 -96 q 336 -195 358 -152 q 285 -270 314 -239 q 217 -317 256 -300 q 123 -334 177 -334 q 62 -330 88 -334 q 18 -322 36 -326 l 18 -223 q 54 -229 32 -226 q 99 -231 75 -231 q 156 -223 132 -231 q 197 -201 179 -216 q 227 -164 215 -186 q 250 -115 240 -142 l 289 -6 l 6 745 m 607 1058 q 586 964 602 1005 q 538 897 569 924 q 458 855 506 869 q 342 842 410 842 q 225 855 273 842 q 148 895 177 868 q 104 963 118 922 q 87 1058 90 1003 l 202 1058 q 214 990 205 1016 q 241 949 224 964 q 283 929 258 934 q 345 923 309 923 q 400 930 375 923 q 443 952 425 937 q 473 993 461 968 q 488 1058 484 1019 l 607 1058 "},"ţ":{"x_min":23,"x_max":445,"ha":471,"o":"m 343 88 q 371 89 355 88 q 400 93 386 91 q 426 97 415 95 q 445 102 438 100 l 445 8 q 422 0 436 3 q 392 -7 409 -4 q 358 -12 376 -10 q 324 -14 341 -14 q 246 -3 282 -14 q 184 34 210 7 q 142 106 157 61 q 128 221 128 152 l 128 656 l 23 656 l 23 709 l 128 759 l 180 915 l 251 915 l 251 745 l 439 745 l 439 656 l 251 656 l 251 221 q 272 121 251 155 q 343 88 294 88 m 138 -288 q 154 -246 145 -271 q 171 -191 163 -220 q 185 -135 179 -163 q 194 -85 192 -107 l 317 -85 l 317 -98 q 302 -141 312 -115 q 276 -197 291 -167 q 242 -255 261 -226 q 204 -307 224 -284 l 138 -307 l 138 -288 "},"«":{"x_min":55.5,"x_max":620,"ha":676,"o":"m 55 375 l 264 656 l 344 603 l 183 367 l 344 130 l 264 78 l 55 356 l 55 375 m 331 375 l 541 656 l 620 603 l 459 367 l 620 130 l 541 78 l 331 356 l 331 375 "},"í":{"x_min":118,"x_max":392,"ha":359,"o":"m 241 0 l 118 0 l 118 745 l 241 745 l 241 0 m 125 860 q 155 905 139 879 q 187 958 171 931 q 218 1013 203 986 q 243 1064 232 1040 l 392 1064 l 392 1049 q 359 1004 381 1031 q 312 946 338 976 q 258 889 286 917 q 207 842 230 860 l 125 842 l 125 860 "},"ņ":{"x_min":118,"x_max":707,"ha":818,"o":"m 583 0 l 583 479 q 547 611 583 567 q 436 655 512 655 q 343 637 381 655 q 283 585 306 620 q 251 501 261 551 q 241 385 241 450 l 241 0 l 118 0 l 118 745 l 218 745 l 236 644 l 242 644 q 283 694 259 673 q 334 730 306 715 q 393 751 362 744 q 457 758 424 758 q 644 693 581 758 q 707 486 707 628 l 707 0 l 583 0 m 300 -288 q 316 -246 307 -271 q 333 -191 325 -220 q 347 -135 341 -163 q 356 -85 354 -107 l 479 -85 l 479 -98 q 464 -141 474 -115 q 438 -197 453 -167 q 404 -255 423 -226 q 366 -307 386 -284 l 300 -307 l 300 -288 "},"µ":{"x_min":118,"x_max":706,"ha":825,"o":"m 241 264 q 277 132 241 176 q 388 88 313 88 q 481 106 443 88 q 540 158 518 123 q 573 242 563 192 q 582 357 582 292 l 582 745 l 706 745 l 706 0 l 606 0 l 588 99 l 581 99 q 500 14 548 43 q 381 -14 451 -14 q 296 1 332 -14 q 237 45 261 17 q 239 -7 238 19 q 241 -59 240 -30 q 241 -117 241 -88 l 241 -334 l 118 -334 l 118 745 l 241 745 l 241 264 "},"ỳ":{"x_min":6.75,"x_max":672.25,"ha":679,"o":"m 6 745 l 134 745 l 280 329 q 300 272 290 301 q 318 212 310 242 q 333 154 327 182 q 341 103 339 126 l 346 103 q 356 149 349 120 q 373 211 364 178 q 392 276 382 244 q 409 330 402 308 l 544 745 l 672 745 l 377 -96 q 336 -195 358 -152 q 285 -270 314 -239 q 217 -317 256 -300 q 123 -334 177 -334 q 62 -330 88 -334 q 18 -322 36 -326 l 18 -223 q 54 -229 32 -226 q 99 -231 75 -231 q 156 -223 132 -231 q 197 -201 179 -216 q 227 -164 215 -186 q 250 -115 240 -142 l 289 -6 l 6 745 m 411 842 l 329 842 q 277 889 305 860 q 223 946 249 917 q 176 1004 197 976 q 144 1049 154 1031 l 144 1064 l 292 1064 q 318 1013 303 1040 q 348 958 332 986 q 380 905 364 931 q 411 860 396 879 l 411 842 "},"Ι":{"x_min":55.34375,"x_max":414.8125,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 "},"Ύ":{"x_min":-18,"x_max":924.25,"ha":925,"o":"m 557 490 l 788 992 l 924 992 l 621 386 l 621 0 l 495 0 l 495 379 l 192 992 l 330 992 l 557 490 m -18 789 q -4 835 -11 809 q 8 889 2 861 q 20 943 15 916 q 29 993 26 970 l 164 993 l 164 978 q 148 936 159 962 q 122 880 137 909 q 89 821 106 850 q 55 771 71 792 l -18 771 l -18 789 "},"ѕ":{"x_min":61.15625,"x_max":564,"ha":627,"o":"m 564 203 q 544 108 564 149 q 487 40 524 68 q 398 0 450 13 q 281 -14 346 -14 q 154 -2 207 -14 q 61 33 101 9 l 61 146 q 107 125 82 135 q 161 106 133 114 q 219 93 189 98 q 279 88 249 88 q 353 95 323 88 q 403 116 384 103 q 431 150 423 130 q 440 194 440 170 q 433 232 440 215 q 409 265 427 249 q 360 299 391 282 q 280 337 329 316 q 193 378 232 358 q 127 424 154 399 q 86 482 100 449 q 72 560 72 515 q 90 645 72 608 q 143 707 109 682 q 224 745 177 732 q 330 758 272 758 q 451 743 396 758 q 554 706 505 729 l 512 606 q 422 641 468 626 q 329 655 376 655 q 228 632 261 655 q 195 568 195 610 q 203 526 195 544 q 229 493 210 509 q 279 461 248 477 q 358 426 311 445 q 444 385 406 405 q 509 339 482 365 q 549 281 535 314 q 564 203 564 249 "},"Ш":{"x_min":135,"x_max":1250,"ha":1385,"o":"m 1250 0 l 135 0 l 135 992 l 261 992 l 261 111 l 629 111 l 629 992 l 755 992 l 755 111 l 1123 111 l 1123 992 l 1250 992 l 1250 0 "},"M":{"x_min":135,"x_max":1074,"ha":1209,"o":"m 544 0 l 253 868 l 248 868 q 255 768 252 818 q 259 678 257 726 q 261 593 261 631 l 261 0 l 135 0 l 135 992 l 331 992 l 601 183 l 605 183 l 886 992 l 1074 992 l 1074 0 l 947 0 l 947 601 q 949 682 947 637 q 952 769 950 728 q 957 867 955 817 l 951 867 l 648 0 l 544 0 "},"Ψ":{"x_min":71,"x_max":994,"ha":1065,"o":"m 994 667 q 985 582 994 625 q 959 499 977 539 q 913 423 942 458 q 844 360 885 387 q 749 318 803 334 q 626 303 694 303 l 594 303 l 594 0 l 468 0 l 468 303 l 436 303 q 314 318 368 303 q 220 359 260 333 q 151 421 179 386 q 105 497 122 456 q 79 580 87 537 q 71 664 71 623 l 71 992 l 204 992 l 204 667 q 219 560 204 607 q 265 479 235 512 q 342 428 295 446 q 450 410 388 410 l 468 410 l 468 992 l 594 992 l 594 410 l 611 410 q 798 477 737 410 q 860 664 860 544 l 860 992 l 994 992 l 994 667 "},"ũ":{"x_min":111,"x_max":700,"ha":818,"o":"m 600 0 l 582 99 l 575 99 q 534 48 558 70 q 483 13 511 27 q 424 -7 455 0 q 360 -14 393 -14 q 252 1 299 -14 q 174 50 205 17 q 126 135 142 83 q 111 258 111 186 l 111 745 l 234 745 l 234 264 q 270 132 234 176 q 381 88 306 88 q 474 106 436 88 q 534 158 511 123 q 566 242 556 192 q 576 357 576 292 l 576 745 l 700 745 l 700 0 l 600 0 m 510 843 q 456 854 483 843 q 404 881 430 866 q 354 907 378 895 q 309 919 330 919 q 262 901 278 919 q 236 841 246 883 l 166 841 q 180 915 169 882 q 209 972 191 948 q 252 1008 227 995 q 309 1021 277 1021 q 365 1009 337 1021 q 418 982 392 997 q 467 956 444 968 q 510 944 491 944 q 556 962 541 944 q 582 1022 572 980 l 654 1022 q 639 948 650 981 q 610 892 628 915 q 567 855 592 868 q 510 843 542 843 "},"ŭ":{"x_min":111,"x_max":700,"ha":818,"o":"m 600 0 l 582 99 l 575 99 q 534 48 558 70 q 483 13 511 27 q 424 -7 455 0 q 360 -14 393 -14 q 252 1 299 -14 q 174 50 205 17 q 126 135 142 83 q 111 258 111 186 l 111 745 l 234 745 l 234 264 q 270 132 234 176 q 381 88 306 88 q 474 106 436 88 q 534 158 511 123 q 566 242 556 192 q 576 357 576 292 l 576 745 l 700 745 l 700 0 l 600 0 m 612 1030 q 594 954 609 988 q 553 894 579 920 q 490 855 527 869 q 405 842 453 842 q 318 855 355 842 q 257 893 281 868 q 219 952 232 918 q 204 1030 206 987 l 278 1030 q 290 983 281 1000 q 316 957 300 965 q 355 946 332 948 q 408 943 378 943 q 454 946 432 943 q 494 959 476 949 q 523 985 511 968 q 537 1030 534 1002 l 612 1030 "},"―":{"x_min":56,"x_max":1333,"ha":1389,"o":"m 56 315 l 56 429 l 1333 429 l 1333 315 l 56 315 "},"{":{"x_min":41,"x_max":456,"ha":492,"o":"m 338 -10 q 346 -64 338 -43 q 369 -96 354 -84 q 407 -113 385 -108 q 456 -118 428 -117 l 456 -220 q 359 -208 404 -219 q 283 -172 315 -196 q 233 -110 251 -148 q 215 -19 215 -73 l 215 208 q 170 307 215 278 q 41 337 125 337 l 41 439 q 170 468 125 439 q 215 567 215 497 l 215 793 q 233 883 215 846 q 283 944 251 920 q 359 980 315 968 q 456 992 404 991 l 456 890 q 407 885 428 889 q 369 868 385 880 q 346 836 354 857 q 338 783 338 815 l 338 559 q 298 446 338 488 q 180 391 258 405 l 180 383 q 298 328 258 369 q 338 214 338 286 l 338 -10 "},"¼":{"x_min":42,"x_max":962.765625,"ha":1023,"o":"m 207 992 l 297 992 l 297 397 l 201 397 l 201 754 q 201 792 201 771 q 202 833 201 813 q 204 873 203 854 q 206 908 205 893 q 184 881 196 895 q 156 853 171 866 l 92 799 l 42 864 l 207 992 m 815 992 l 264 0 l 157 0 l 708 992 l 815 992 m 962 133 l 877 133 l 877 0 l 781 0 l 781 133 l 526 133 l 526 208 l 782 599 l 877 599 l 877 217 l 962 217 l 962 133 m 781 217 l 781 368 q 782 439 781 400 q 785 515 783 477 q 774 492 781 507 q 760 462 767 478 q 744 430 752 445 q 729 403 736 414 l 622 217 l 781 217 "},"Ḿ":{"x_min":135,"x_max":1074,"ha":1209,"o":"m 544 0 l 253 868 l 248 868 q 255 768 252 818 q 259 678 257 726 q 261 593 261 631 l 261 0 l 135 0 l 135 992 l 331 992 l 601 183 l 605 183 l 886 992 l 1074 992 l 1074 0 l 947 0 l 947 601 q 949 682 947 637 q 952 769 950 728 q 957 867 955 817 l 951 867 l 648 0 l 544 0 m 522 1091 q 552 1136 536 1110 q 584 1189 568 1162 q 615 1244 600 1217 q 640 1295 629 1271 l 789 1295 l 789 1280 q 756 1235 778 1262 q 709 1177 735 1207 q 655 1120 683 1148 q 604 1073 627 1091 l 522 1073 l 522 1091 "},"ι":{"x_min":111,"x_max":428,"ha":454,"o":"m 234 743 l 234 220 q 255 121 234 154 q 326 88 277 88 q 353 89 338 88 q 383 93 368 91 q 409 97 397 95 q 428 102 421 100 l 428 8 q 405 0 419 3 q 375 -7 391 -4 q 341 -12 358 -10 q 307 -14 323 -14 q 229 -3 265 -14 q 167 34 193 7 q 125 105 140 60 q 111 219 111 150 l 111 743 l 234 743 "},"IJ":{"x_min":55.34375,"x_max":722.15625,"ha":847,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 m 451 -264 q 390 -259 416 -264 q 346 -247 364 -255 l 346 -139 q 395 -149 369 -145 q 452 -152 422 -152 q 503 -146 477 -152 q 549 -122 528 -139 q 583 -76 570 -105 q 596 0 596 -46 l 596 992 l 722 992 l 722 13 q 702 -109 722 -57 q 646 -196 682 -162 q 561 -247 611 -230 q 451 -264 511 -264 "},"Ê":{"x_min":135,"x_max":650,"ha":733,"o":"m 650 0 l 135 0 l 135 992 l 650 992 l 650 880 l 261 880 l 261 574 l 624 574 l 624 462 l 261 462 l 261 111 l 650 111 l 650 0 m 616 1071 l 534 1071 q 462 1126 499 1093 q 391 1196 426 1159 q 318 1126 354 1159 q 248 1071 282 1093 l 166 1071 l 166 1089 q 206 1134 183 1108 q 252 1187 229 1160 q 295 1242 275 1215 q 325 1293 315 1269 l 456 1293 q 486 1242 466 1269 q 529 1187 506 1215 q 575 1134 552 1160 q 616 1089 599 1108 l 616 1071 "},"Ά":{"x_min":-16,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 m -16 789 q -2 835 -9 809 q 10 889 4 861 q 22 943 17 916 q 31 993 28 970 l 166 993 l 166 978 q 150 936 161 962 q 124 880 139 909 q 91 821 108 850 q 57 771 73 792 l -16 771 l -16 789 "},")":{"x_min":42,"x_max":363,"ha":418,"o":"m 363 380 q 350 214 363 296 q 313 57 338 133 q 249 -89 287 -19 q 158 -220 211 -158 l 43 -220 q 126 -84 90 -156 q 186 64 162 -12 q 223 221 211 141 q 235 381 235 301 q 186 704 235 547 q 42 992 137 861 l 158 992 q 249 857 211 928 q 313 708 287 785 q 350 547 338 630 q 363 380 363 465 "},"ε":{"x_min":61,"x_max":583,"ha":629,"o":"m 453 439 l 453 336 l 366 336 q 229 305 273 336 q 184 210 184 274 q 198 152 184 176 q 235 114 212 129 q 291 94 259 100 q 360 88 323 88 q 426 93 395 88 q 484 106 457 98 q 535 125 511 114 q 580 146 559 135 l 580 37 q 486 0 540 14 q 359 -14 433 -14 q 226 2 282 -14 q 133 48 170 19 q 78 117 96 77 q 61 203 61 157 q 73 275 61 245 q 108 326 86 305 q 157 361 129 347 q 215 385 185 375 l 215 392 q 162 416 185 402 q 121 452 138 431 q 94 500 103 473 q 85 561 85 527 q 104 645 85 608 q 159 707 124 682 q 244 745 195 732 q 351 758 293 758 q 417 754 387 758 q 475 745 448 751 q 529 729 503 739 q 583 706 555 720 l 540 606 q 445 642 489 629 q 353 655 401 655 q 240 629 279 655 q 201 551 201 603 q 214 499 201 520 q 252 464 228 477 q 311 445 277 451 q 386 439 345 439 l 453 439 "},"э":{"x_min":37,"x_max":566,"ha":642,"o":"m 218 -14 q 115 -3 157 -14 q 37 26 73 6 l 37 135 q 118 106 73 118 q 219 93 163 93 q 308 107 269 93 q 376 149 348 121 q 420 223 404 178 q 439 331 437 268 l 114 331 l 114 434 l 438 434 q 379 598 429 547 q 234 650 329 650 q 197 647 217 650 q 156 638 176 644 q 116 627 135 633 q 82 614 97 621 l 45 718 q 83 733 62 726 q 130 746 105 741 q 180 754 154 751 q 233 758 207 758 q 363 736 302 758 q 468 669 424 715 q 539 548 513 623 q 566 367 566 474 q 538 196 566 268 q 463 78 511 125 q 352 8 415 31 q 218 -14 289 -14 "},"ш":{"x_min":118,"x_max":1089,"ha":1207,"o":"m 665 102 l 965 102 l 965 745 l 1089 745 l 1089 0 l 118 0 l 118 745 l 241 745 l 241 102 l 542 102 l 542 745 l 665 745 l 665 102 "},"Я":{"x_min":16.75,"x_max":685,"ha":819,"o":"m 391 410 l 165 0 l 16 0 l 275 444 q 204 479 237 458 q 145 533 170 500 q 104 612 119 566 q 90 721 90 658 q 175 923 90 855 q 431 992 261 992 l 685 992 l 685 0 l 558 0 l 558 410 l 391 410 m 558 884 l 432 884 q 343 874 382 884 q 277 843 304 864 q 237 789 251 822 q 223 710 223 756 q 236 630 223 666 q 276 569 249 595 q 342 531 302 544 q 437 517 382 517 l 558 517 l 558 884 "},"a":{"x_min":64,"x_max":626,"ha":737,"o":"m 536 0 l 511 102 l 505 102 q 461 50 483 72 q 412 13 439 28 q 353 -7 386 0 q 278 -14 321 -14 q 193 0 232 -14 q 125 40 153 12 q 80 109 96 67 q 64 208 64 151 q 142 379 64 320 q 379 445 220 439 l 503 450 l 503 496 q 494 572 503 541 q 465 620 484 602 q 419 647 447 639 q 357 655 392 655 q 253 639 301 655 q 160 599 204 623 l 117 692 q 228 739 167 720 q 357 758 290 758 q 477 744 427 758 q 560 700 527 730 q 609 623 593 669 q 626 509 626 576 l 626 0 l 536 0 m 310 88 q 386 101 351 88 q 447 140 422 114 q 488 205 473 166 q 502 298 502 245 l 502 365 l 405 360 q 303 346 345 357 q 237 316 262 336 q 202 270 213 297 q 191 208 191 243 q 224 117 191 146 q 310 88 257 88 "},"Ę":{"x_min":135,"x_max":650,"ha":733,"o":"m 650 0 l 135 0 l 135 992 l 650 992 l 650 880 l 261 880 l 261 574 l 624 574 l 624 462 l 261 462 l 261 111 l 650 111 l 650 0 m 489 -161 q 507 -206 489 -191 q 549 -220 525 -220 q 582 -218 566 -220 q 608 -214 598 -217 l 608 -291 q 568 -299 590 -296 q 527 -302 547 -302 q 425 -266 459 -302 q 392 -170 392 -231 q 401 -116 392 -142 q 427 -69 411 -91 q 460 -30 442 -48 q 496 0 479 -12 l 583 0 q 489 -161 489 -90 "},"Z":{"x_min":56,"x_max":693,"ha":749,"o":"m 693 0 l 56 0 l 56 97 l 537 880 l 70 880 l 70 992 l 679 992 l 679 894 l 197 111 l 693 111 l 693 0 "}," ":{"x_min":0,"x_max":0,"ha":231},"k":{"x_min":118,"x_max":684.25,"ha":689,"o":"m 233 384 l 324 500 l 522 745 l 665 745 l 394 422 l 684 0 l 542 0 l 315 341 l 241 286 l 241 0 l 118 0 l 118 1055 l 241 1055 l 241 571 l 230 384 l 233 384 "},"Ù":{"x_min":125,"x_max":845,"ha":970,"o":"m 845 993 l 845 349 q 822 205 845 272 q 755 90 800 139 q 641 13 709 41 q 481 -14 573 -14 q 327 12 394 -14 q 216 86 261 38 q 148 202 171 134 q 125 352 125 269 l 125 991 l 251 991 l 251 346 q 309 162 251 227 q 487 97 368 97 q 591 115 548 97 q 663 167 635 133 q 704 246 690 200 q 718 347 718 292 l 718 993 l 845 993 m 575 1071 l 493 1071 q 441 1118 469 1089 q 387 1175 413 1146 q 340 1233 361 1205 q 308 1278 318 1260 l 308 1293 l 456 1293 q 482 1242 467 1269 q 512 1187 496 1215 q 544 1134 528 1160 q 575 1089 560 1108 l 575 1071 "},"Ů":{"x_min":125,"x_max":845,"ha":970,"o":"m 845 993 l 845 349 q 822 205 845 272 q 755 90 800 139 q 641 13 709 41 q 481 -14 573 -14 q 327 12 394 -14 q 216 86 261 38 q 148 202 171 134 q 125 352 125 269 l 125 991 l 251 991 l 251 346 q 309 162 251 227 q 487 97 368 97 q 591 115 548 97 q 663 167 635 133 q 704 246 690 200 q 718 347 718 292 l 718 993 l 845 993 m 639 1218 q 627 1156 639 1183 q 594 1109 615 1128 q 545 1080 573 1090 q 483 1071 516 1071 q 421 1080 449 1071 q 373 1109 393 1090 q 342 1155 353 1128 q 332 1217 332 1182 q 342 1278 332 1251 q 373 1324 353 1305 q 421 1353 393 1343 q 483 1363 449 1363 q 544 1353 516 1363 q 594 1324 573 1343 q 627 1279 615 1305 q 639 1218 639 1252 m 564 1217 q 542 1273 564 1253 q 485 1293 520 1293 q 428 1273 450 1293 q 406 1217 406 1253 q 426 1160 406 1180 q 485 1140 446 1140 q 542 1160 520 1140 q 564 1217 564 1180 "},"¢":{"x_min":128,"x_max":647,"ha":765,"o":"m 634 162 q 574 133 605 143 q 498 121 542 123 l 498 -14 l 382 -14 l 382 126 q 276 160 323 134 q 196 230 229 185 q 145 343 163 275 q 128 503 128 410 q 145 668 128 599 q 196 783 163 737 q 276 854 229 829 q 382 889 323 880 l 382 1006 l 498 1006 l 498 894 q 580 880 540 892 q 647 853 620 869 l 611 747 q 576 761 595 754 q 537 772 557 767 q 496 780 516 777 q 459 783 476 783 q 304 715 353 783 q 255 504 255 647 q 304 296 255 362 q 454 231 353 231 q 553 243 509 231 q 634 272 598 256 l 634 162 "},"В":{"x_min":135,"x_max":786,"ha":863,"o":"m 135 992 l 405 992 q 558 978 492 992 q 668 936 624 965 q 735 858 713 906 q 758 740 758 810 q 744 662 758 698 q 707 597 731 625 q 645 551 682 569 q 563 526 609 532 l 563 519 q 650 496 609 511 q 720 454 690 480 q 768 386 751 427 q 786 287 786 345 q 763 166 786 219 q 700 76 741 113 q 598 19 658 39 q 463 0 539 0 l 135 0 l 135 992 m 261 572 l 427 572 q 523 582 485 572 q 586 612 562 592 q 621 662 610 632 q 631 732 631 692 q 579 848 631 813 q 413 884 526 884 l 261 884 l 261 572 m 261 464 l 261 107 l 441 107 q 541 121 500 107 q 606 159 581 134 q 641 217 630 183 q 652 292 652 251 q 641 362 652 330 q 604 416 630 393 q 537 451 579 439 q 433 464 495 464 l 261 464 "},"І":{"x_min":55.34375,"x_max":414.8125,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 "},"ē":{"x_min":77,"x_max":673,"ha":743,"o":"m 412 -14 q 276 11 337 -14 q 170 84 214 36 q 101 203 125 132 q 77 366 77 274 q 99 531 77 458 q 162 654 121 604 q 259 731 202 705 q 384 758 316 758 q 505 733 451 758 q 595 665 558 709 q 653 560 633 621 q 673 423 673 498 l 673 346 l 204 346 q 259 155 207 216 q 413 93 311 93 q 477 97 448 93 q 534 107 507 100 q 587 123 561 113 q 639 145 613 133 l 639 35 q 586 13 612 22 q 533 -2 560 3 q 476 -11 505 -8 q 412 -14 446 -14 m 384 655 q 260 602 306 655 q 207 449 214 549 l 545 449 q 536 533 545 495 q 507 598 526 571 q 457 640 487 625 q 384 655 427 655 m 192 943 l 582 943 l 582 842 l 192 842 l 192 943 "},"β":{"x_min":118,"x_max":774,"ha":836,"o":"m 427 1063 q 548 1046 493 1063 q 643 996 603 1029 q 706 913 683 963 q 729 796 729 863 q 677 637 729 695 q 528 563 625 578 l 528 559 q 711 476 648 544 q 774 281 774 407 q 752 152 774 207 q 690 60 731 97 q 591 4 649 23 q 458 -14 532 -14 q 337 -3 393 -14 q 241 28 282 7 l 241 -334 l 118 -334 l 118 743 q 141 887 118 826 q 205 986 164 947 q 303 1044 246 1025 q 427 1063 360 1063 m 427 960 q 355 950 389 960 q 296 913 321 939 q 256 845 271 888 q 241 737 241 802 l 241 142 q 289 120 263 130 q 344 102 316 110 q 399 92 371 95 q 452 88 427 88 q 544 101 506 88 q 605 141 581 115 q 640 205 629 167 q 650 291 650 243 q 632 385 650 345 q 581 451 614 425 q 504 490 549 477 q 405 502 459 502 l 336 502 l 336 605 l 388 605 q 483 618 443 605 q 550 656 523 632 q 589 715 576 681 q 601 791 601 750 q 588 865 601 834 q 552 918 575 897 q 497 950 529 939 q 427 960 465 960 "},"≠":{"x_min":69,"x_max":696,"ha":765,"o":"m 237 300 l 69 300 l 69 402 l 285 402 l 367 577 l 69 577 l 69 679 l 414 679 l 504 870 l 598 830 l 526 679 l 696 679 l 696 577 l 479 577 l 396 402 l 696 402 l 696 300 l 349 300 l 260 111 l 167 150 l 237 300 "},"‼":{"x_min":100,"x_max":587.265625,"ha":688,"o":"m 543 280 l 461 280 l 427 992 l 577 992 l 543 280 m 415 74 q 421 118 415 100 q 440 147 428 136 q 467 163 451 158 q 501 169 482 169 q 534 163 518 169 q 562 147 550 158 q 580 118 573 136 q 587 74 587 100 q 580 31 587 49 q 562 2 573 13 q 534 -14 550 -9 q 501 -20 518 -20 q 467 -14 482 -20 q 440 2 451 -9 q 421 31 428 13 q 415 74 415 49 m 228 280 l 146 280 l 112 992 l 262 992 l 228 280 m 100 74 q 106 118 100 100 q 125 147 113 136 q 152 163 136 158 q 186 169 167 169 q 219 163 203 169 q 247 147 235 158 q 265 118 258 136 q 272 74 272 100 q 265 31 272 49 q 247 2 258 13 q 219 -14 235 -9 q 186 -20 203 -20 q 152 -14 167 -20 q 125 2 136 -9 q 106 31 113 13 q 100 74 100 49 "},"¥":{"x_min":20,"x_max":751,"ha":765,"o":"m 384 490 l 621 992 l 751 992 l 490 471 l 652 471 l 652 363 l 448 363 l 448 271 l 652 271 l 652 163 l 448 163 l 448 0 l 322 0 l 322 163 l 118 163 l 118 271 l 322 271 l 322 363 l 118 363 l 118 471 l 276 471 l 20 992 l 150 992 l 384 490 "},"Ĥ":{"x_min":135,"x_max":839,"ha":974,"o":"m 839 0 l 712 0 l 712 462 l 261 462 l 261 0 l 135 0 l 135 992 l 261 992 l 261 574 l 712 574 l 712 992 l 839 992 l 839 0 m 712 1071 l 630 1071 q 558 1126 595 1093 q 487 1196 522 1159 q 414 1126 450 1159 q 344 1071 378 1093 l 262 1071 l 262 1089 q 302 1134 279 1108 q 348 1187 325 1160 q 391 1242 371 1215 q 421 1293 411 1269 l 552 1293 q 582 1242 562 1269 q 625 1187 602 1215 q 671 1134 648 1160 q 712 1089 695 1108 l 712 1071 "},"U":{"x_min":125,"x_max":845,"ha":970,"o":"m 845 993 l 845 349 q 822 205 845 272 q 755 90 800 139 q 641 13 709 41 q 481 -14 573 -14 q 327 12 394 -14 q 216 86 261 38 q 148 202 171 134 q 125 352 125 269 l 125 991 l 251 991 l 251 346 q 309 162 251 227 q 487 97 368 97 q 591 115 548 97 q 663 167 635 133 q 704 246 690 200 q 718 347 718 292 l 718 993 l 845 993 "},"Ñ":{"x_min":135,"x_max":878,"ha":1013,"o":"m 878 0 l 724 0 l 253 821 l 248 821 q 255 717 252 768 q 259 624 257 673 q 261 538 261 576 l 261 0 l 135 0 l 135 992 l 288 992 l 757 174 l 762 174 q 757 276 759 226 q 755 321 756 298 q 753 366 754 343 q 752 410 752 389 q 751 449 751 431 l 751 992 l 878 992 l 878 0 m 614 1072 q 560 1083 587 1072 q 508 1110 534 1095 q 458 1136 482 1124 q 413 1148 434 1148 q 366 1130 382 1148 q 340 1070 350 1112 l 270 1070 q 284 1144 273 1111 q 313 1201 295 1177 q 356 1237 331 1224 q 413 1250 381 1250 q 469 1238 441 1250 q 522 1211 496 1226 q 571 1185 548 1197 q 614 1173 595 1173 q 660 1191 645 1173 q 686 1251 676 1209 l 758 1251 q 743 1177 754 1210 q 714 1121 732 1144 q 671 1084 696 1097 q 614 1072 646 1072 "},"F":{"x_min":135,"x_max":649,"ha":682,"o":"m 261 0 l 135 0 l 135 992 l 649 992 l 649 880 l 261 880 l 261 531 l 623 531 l 623 419 l 261 419 l 261 0 "},"ϑ":{"x_min":7.125,"x_max":815.203125,"ha":834,"o":"m 594 664 q 566 793 585 736 q 521 888 547 850 q 464 948 495 927 q 401 968 433 968 q 321 939 350 968 q 292 861 292 909 q 307 788 292 824 q 359 726 323 753 q 452 681 394 698 q 594 664 509 664 m 722 575 q 724 540 723 560 q 725 499 725 520 q 703 296 725 390 q 637 133 681 202 q 527 25 594 64 q 372 -14 461 -14 q 247 4 297 -14 q 169 55 198 23 q 128 129 140 87 q 117 218 117 172 q 120 277 117 245 q 127 338 123 308 q 134 394 131 368 q 138 435 138 419 q 127 477 138 466 q 95 488 117 488 q 61 483 79 488 q 32 471 43 478 l 7 560 q 66 581 32 572 q 136 591 100 591 q 194 581 171 591 q 233 555 218 572 q 255 515 248 538 q 261 465 261 492 q 258 412 261 441 q 250 351 254 383 q 243 287 247 320 q 240 224 240 254 q 247 170 240 195 q 270 127 254 145 q 313 98 287 109 q 379 88 340 88 q 546 192 490 88 q 601 503 601 296 q 600 540 601 519 q 598 575 600 561 q 398 601 480 576 q 265 667 316 626 q 191 759 214 707 q 169 865 169 810 q 182 947 169 909 q 222 1012 195 985 q 293 1055 250 1040 q 396 1071 336 1071 q 521 1042 466 1071 q 615 961 576 1014 q 680 833 655 908 q 718 664 706 757 l 815 664 l 815 575 l 722 575 "},"Ќ":{"x_min":135,"x_max":804.25,"ha":804,"o":"m 804 0 l 655 0 l 261 502 l 261 0 l 135 0 l 135 992 l 261 992 l 261 511 l 644 992 l 784 992 l 401 515 l 804 0 m 359 1089 q 389 1134 373 1108 q 421 1187 405 1160 q 452 1242 437 1215 q 477 1293 466 1269 l 626 1293 l 626 1278 q 593 1233 615 1260 q 546 1175 572 1205 q 492 1118 520 1146 q 441 1071 464 1089 l 359 1071 l 359 1089 "},"å":{"x_min":64,"x_max":626,"ha":737,"o":"m 536 0 l 511 102 l 505 102 q 461 50 483 72 q 412 13 439 28 q 353 -7 386 0 q 278 -14 321 -14 q 193 0 232 -14 q 125 40 153 12 q 80 109 96 67 q 64 208 64 151 q 142 379 64 320 q 379 445 220 439 l 503 450 l 503 496 q 494 572 503 541 q 465 620 484 602 q 419 647 447 639 q 357 655 392 655 q 253 639 301 655 q 160 599 204 623 l 117 692 q 228 739 167 720 q 357 758 290 758 q 477 744 427 758 q 560 700 527 730 q 609 623 593 669 q 626 509 626 576 l 626 0 l 536 0 m 310 88 q 386 101 351 88 q 447 140 422 114 q 488 205 473 166 q 502 298 502 245 l 502 365 l 405 360 q 303 346 345 357 q 237 316 262 336 q 202 270 213 297 q 191 208 191 243 q 224 117 191 146 q 310 88 257 88 m 531 989 q 519 927 531 954 q 486 880 507 899 q 437 851 465 861 q 375 842 408 842 q 313 851 341 842 q 265 880 285 861 q 234 926 245 899 q 224 988 224 953 q 234 1049 224 1022 q 265 1095 245 1076 q 313 1124 285 1114 q 375 1134 341 1134 q 436 1124 408 1134 q 486 1095 465 1114 q 519 1050 507 1076 q 531 989 531 1023 m 456 988 q 434 1044 456 1024 q 377 1064 412 1064 q 320 1044 342 1064 q 298 988 298 1024 q 318 931 298 951 q 377 911 338 911 q 434 931 412 911 q 456 988 456 951 "},"Ϋ":{"x_min":-0.25,"x_max":731.25,"ha":732,"o":"m 364 490 l 595 992 l 731 992 l 428 386 l 428 0 l 302 0 l 302 379 l 0 992 l 137 992 l 364 490 m 174 1174 q 192 1227 174 1211 q 239 1244 211 1244 q 285 1227 265 1244 q 304 1174 304 1210 q 285 1121 304 1138 q 239 1105 265 1105 q 192 1121 211 1105 q 174 1174 174 1138 m 428 1174 q 447 1227 428 1211 q 493 1244 466 1244 q 518 1239 506 1244 q 539 1227 530 1235 q 553 1206 548 1218 q 559 1174 559 1193 q 539 1121 559 1138 q 493 1105 519 1105 q 447 1121 466 1105 q 428 1174 428 1138 "},"0":{"x_min":66,"x_max":700,"ha":765,"o":"m 700 496 q 682 281 700 376 q 627 121 665 186 q 528 20 588 55 q 381 -14 467 -14 q 242 20 301 -14 q 143 121 182 55 q 85 281 104 186 q 66 496 66 376 q 83 711 66 616 q 138 872 100 806 q 236 972 175 937 q 381 1007 296 1007 q 522 972 462 1007 q 621 873 581 938 q 680 712 660 807 q 700 496 700 617 m 191 497 q 201 319 191 395 q 234 192 211 243 q 292 116 256 142 q 381 91 329 91 q 470 116 433 91 q 530 191 506 141 q 564 318 553 241 q 574 497 574 394 q 564 675 574 599 q 530 801 553 751 q 470 876 506 851 q 381 901 433 901 q 292 876 329 901 q 234 801 256 851 q 201 675 211 751 q 191 497 191 599 "},"ō":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 702 208 725 280 q 637 86 679 135 q 534 11 594 37 q 398 -14 474 -14 q 270 11 329 -14 q 168 86 211 37 q 101 208 125 135 q 77 373 77 280 q 99 537 77 465 q 164 657 122 608 q 267 732 206 707 q 403 758 327 758 q 531 732 472 758 q 633 657 590 707 q 700 537 676 608 q 725 373 725 465 m 204 373 q 250 159 204 231 q 401 88 297 88 q 551 159 506 88 q 597 373 597 231 q 551 585 597 515 q 400 655 504 655 q 250 585 295 655 q 204 373 204 515 m 206 943 l 596 943 l 596 842 l 206 842 l 206 943 "},"”":{"x_min":16,"x_max":489,"ha":504,"o":"m 219 992 l 228 977 q 205 898 218 939 q 176 815 192 857 q 143 731 160 772 q 108 652 125 690 l 16 652 q 38 737 26 692 q 60 827 49 782 q 79 913 70 871 q 94 992 88 956 l 219 992 m 480 992 l 489 977 q 466 898 479 939 q 437 815 453 857 q 404 731 421 772 q 369 652 386 690 l 277 652 q 299 737 287 692 q 321 827 310 782 q 340 913 331 871 q 355 992 349 956 l 480 992 "},"ö":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 702 208 725 280 q 637 86 679 135 q 534 11 594 37 q 398 -14 474 -14 q 270 11 329 -14 q 168 86 211 37 q 101 208 125 135 q 77 373 77 280 q 99 537 77 465 q 164 657 122 608 q 267 732 206 707 q 403 758 327 758 q 531 732 472 758 q 633 657 590 707 q 700 537 676 608 q 725 373 725 465 m 204 373 q 250 159 204 231 q 401 88 297 88 q 551 159 506 88 q 597 373 597 231 q 551 585 597 515 q 400 655 504 655 q 250 585 295 655 q 204 373 204 515 m 204 945 q 222 998 204 982 q 269 1015 241 1015 q 315 998 295 1015 q 334 945 334 981 q 315 892 334 909 q 269 876 295 876 q 222 892 241 876 q 204 945 204 909 m 458 945 q 477 998 458 982 q 523 1015 496 1015 q 548 1010 536 1015 q 569 998 560 1006 q 583 977 578 989 q 589 945 589 964 q 569 892 589 909 q 523 876 549 876 q 477 892 496 876 q 458 945 458 909 "},"ć":{"x_min":77,"x_max":596,"ha":643,"o":"m 402 -14 q 274 7 334 -14 q 171 75 215 28 q 102 193 127 121 q 77 367 77 266 q 102 548 77 474 q 173 669 128 623 q 278 736 218 715 q 408 758 339 758 q 511 746 461 758 q 596 718 562 735 l 559 614 q 524 627 543 621 q 485 638 505 633 q 445 647 465 644 q 408 650 425 650 q 253 581 302 650 q 204 369 204 513 q 253 160 204 226 q 402 93 302 93 q 502 106 457 93 q 583 135 546 118 l 583 26 q 504 -3 546 6 q 402 -14 463 -14 m 316 860 q 346 905 330 879 q 378 958 362 931 q 409 1013 394 986 q 434 1064 423 1040 l 583 1064 l 583 1049 q 550 1004 572 1031 q 503 946 529 976 q 449 889 477 917 q 398 842 421 860 l 316 842 l 316 860 "},"þ":{"x_min":118,"x_max":737,"ha":814,"o":"m 241 644 q 276 688 257 667 q 322 724 296 709 q 381 748 348 739 q 454 758 413 758 q 570 733 518 758 q 659 660 622 709 q 716 540 696 612 q 737 373 737 468 q 716 205 737 277 q 659 84 696 133 q 570 10 622 35 q 454 -14 518 -14 q 381 -5 414 -14 q 323 18 349 3 q 277 52 297 32 q 241 93 257 72 l 233 93 q 237 49 235 70 q 240 13 238 32 q 241 -16 241 -5 l 241 -334 l 118 -334 l 118 1055 l 241 1055 l 241 744 l 236 644 l 241 644 m 430 655 q 343 639 379 655 q 285 592 307 624 q 253 513 263 560 q 241 401 242 465 l 241 373 q 250 251 241 304 q 281 162 259 198 q 340 107 303 125 q 431 88 377 88 q 566 162 523 88 q 609 374 609 236 q 566 585 609 515 q 430 655 523 655 "},"]":{"x_min":35,"x_max":310,"ha":421,"o":"m 35 -118 l 186 -118 l 186 890 l 35 890 l 35 992 l 310 992 l 310 -220 l 35 -220 l 35 -118 "},"А":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 "},"′":{"x_min":90,"x_max":223.609375,"ha":314,"o":"m 223 992 l 195 634 l 117 634 l 90 992 l 223 992 "},"Ы":{"x_min":135,"x_max":1008,"ha":1143,"o":"m 729 290 q 708 170 729 224 q 645 79 688 117 q 537 20 602 41 q 380 0 471 0 l 135 0 l 135 992 l 261 992 l 261 574 l 362 574 q 536 551 465 574 q 648 490 606 529 q 710 400 691 452 q 729 290 729 349 m 261 107 l 368 107 q 540 152 485 107 q 595 290 595 197 q 579 370 595 337 q 533 424 564 403 q 456 453 503 444 q 347 462 410 462 l 261 462 l 261 107 m 881 0 l 881 992 l 1008 992 l 1008 0 l 881 0 "},"ẁ":{"x_min":13.75,"x_max":1022.25,"ha":1036,"o":"m 683 0 l 570 417 q 563 445 567 430 q 555 477 559 460 q 546 512 551 494 q 538 546 542 529 q 518 628 528 586 l 514 628 q 496 546 505 585 q 480 476 488 512 q 464 415 471 440 l 347 0 l 204 0 l 13 745 l 143 745 l 232 348 q 245 282 239 318 q 258 211 252 246 q 269 146 264 177 q 277 95 274 115 l 281 95 q 290 142 284 113 q 303 205 296 172 q 317 270 310 238 q 331 324 325 302 l 453 745 l 586 745 l 702 324 q 716 270 709 301 q 732 207 724 239 q 745 145 739 175 q 754 95 751 115 l 758 95 q 764 142 760 113 q 775 207 769 172 q 788 279 781 242 q 803 348 795 316 l 896 745 l 1022 745 l 829 0 l 683 0 m 585 842 l 503 842 q 451 889 479 860 q 397 946 423 917 q 350 1004 371 976 q 318 1049 328 1031 l 318 1064 l 466 1064 q 492 1013 477 1040 q 522 958 506 986 q 554 905 538 931 q 585 860 570 879 l 585 842 "},"ĭ":{"x_min":-23,"x_max":385,"ha":359,"o":"m 241 0 l 118 0 l 118 745 l 241 745 l 241 0 m 385 1030 q 367 954 382 988 q 326 894 352 920 q 263 855 300 869 q 178 842 226 842 q 91 855 128 842 q 30 893 54 868 q -7 952 5 918 q -23 1030 -20 987 l 51 1030 q 63 983 54 1000 q 89 957 73 965 q 128 946 105 948 q 181 943 151 943 q 227 946 205 943 q 267 959 249 949 q 296 985 284 968 q 310 1030 307 1002 l 385 1030 "},"8":{"x_min":72,"x_max":694,"ha":765,"o":"m 383 1007 q 490 992 440 1007 q 579 947 540 977 q 639 873 617 917 q 662 768 662 828 q 648 686 662 723 q 610 620 634 650 q 554 568 587 591 q 483 525 521 544 q 561 478 523 504 q 628 420 598 453 q 675 348 657 388 q 694 258 694 308 q 671 145 694 196 q 607 59 648 94 q 509 5 566 24 q 383 -14 452 -14 q 250 4 308 -14 q 152 57 192 22 q 92 141 113 91 q 72 253 72 190 q 87 344 72 304 q 128 418 102 385 q 189 476 154 451 q 264 520 225 501 q 202 566 231 541 q 151 621 172 590 q 117 688 130 651 q 105 770 105 725 q 127 873 105 829 q 188 947 150 917 q 277 992 227 977 q 383 1007 328 1007 m 191 253 q 202 187 191 217 q 236 136 213 157 q 295 102 259 114 q 379 91 330 91 q 464 102 427 91 q 525 136 500 114 q 562 189 550 158 q 574 258 574 220 q 561 322 574 293 q 523 374 547 350 q 463 420 498 399 q 385 463 428 442 l 364 472 q 235 379 278 432 q 191 253 191 327 m 381 901 q 266 866 309 901 q 224 762 224 830 q 236 696 224 724 q 269 647 248 669 q 320 609 290 626 q 384 576 349 592 q 446 608 417 590 q 496 647 475 625 q 530 698 518 670 q 542 762 542 726 q 499 866 542 830 q 381 901 456 901 "},"R":{"x_min":135,"x_max":803.25,"ha":819,"o":"m 261 410 l 261 0 l 135 0 l 135 992 l 376 992 q 642 922 556 992 q 729 710 729 852 q 712 607 729 651 q 668 531 695 563 q 605 479 640 500 q 533 444 570 458 l 803 0 l 654 0 l 416 410 l 261 410 m 261 517 l 371 517 q 473 529 431 517 q 543 564 516 541 q 582 623 570 588 q 595 704 595 658 q 581 787 595 753 q 540 842 567 821 q 469 874 512 864 q 368 884 426 884 l 261 884 l 261 517 "},"Ż":{"x_min":56,"x_max":693,"ha":749,"o":"m 693 0 l 56 0 l 56 97 l 537 880 l 70 880 l 70 992 l 679 992 l 679 894 l 197 111 l 693 111 l 693 0 m 310 1174 q 330 1233 310 1215 q 381 1252 351 1252 q 410 1247 396 1252 q 433 1233 423 1243 q 448 1209 442 1224 q 454 1174 454 1195 q 433 1116 454 1135 q 381 1097 411 1097 q 330 1115 351 1097 q 310 1174 310 1134 "},"ħ":{"x_min":12.1875,"x_max":707,"ha":818,"o":"m 583 0 l 583 451 q 547 583 583 539 q 436 627 512 627 q 343 609 381 627 q 283 557 306 592 q 251 473 261 523 q 241 357 241 422 l 241 0 l 118 0 l 118 843 l 12 843 l 12 932 l 118 932 l 118 1055 l 241 1055 l 241 932 l 498 932 l 498 843 l 241 843 l 241 715 l 236 616 l 242 616 q 283 666 259 645 q 334 702 306 687 q 393 723 362 716 q 457 730 424 730 q 644 665 581 730 q 707 458 707 600 l 707 0 l 583 0 "},"õ":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 702 208 725 280 q 637 86 679 135 q 534 11 594 37 q 398 -14 474 -14 q 270 11 329 -14 q 168 86 211 37 q 101 208 125 135 q 77 373 77 280 q 99 537 77 465 q 164 657 122 608 q 267 732 206 707 q 403 758 327 758 q 531 732 472 758 q 633 657 590 707 q 700 537 676 608 q 725 373 725 465 m 204 373 q 250 159 204 231 q 401 88 297 88 q 551 159 506 88 q 597 373 597 231 q 551 585 597 515 q 400 655 504 655 q 250 585 295 655 q 204 373 204 515 m 499 843 q 445 854 472 843 q 393 881 419 866 q 343 907 367 895 q 298 919 319 919 q 251 901 267 919 q 225 841 235 883 l 155 841 q 169 915 158 882 q 198 972 180 948 q 241 1008 216 995 q 298 1021 266 1021 q 354 1009 326 1021 q 407 982 381 997 q 456 956 433 968 q 499 944 480 944 q 545 962 530 944 q 571 1022 561 980 l 643 1022 q 628 948 639 981 q 599 892 617 915 q 556 855 581 868 q 499 843 531 843 "},"˙":{"x_min":109,"x_max":253.46875,"ha":359,"o":"m 109 945 q 129 1004 109 986 q 180 1023 150 1023 q 209 1018 195 1023 q 232 1004 222 1014 q 247 980 241 995 q 253 945 253 966 q 232 887 253 906 q 180 868 210 868 q 129 886 150 868 q 109 945 109 905 "},"ê":{"x_min":77,"x_max":673,"ha":743,"o":"m 412 -14 q 276 11 337 -14 q 170 84 214 36 q 101 203 125 132 q 77 366 77 274 q 99 531 77 458 q 162 654 121 604 q 259 731 202 705 q 384 758 316 758 q 505 733 451 758 q 595 665 558 709 q 653 560 633 621 q 673 423 673 498 l 673 346 l 204 346 q 259 155 207 216 q 413 93 311 93 q 477 97 448 93 q 534 107 507 100 q 587 123 561 113 q 639 145 613 133 l 639 35 q 586 13 612 22 q 533 -2 560 3 q 476 -11 505 -8 q 412 -14 446 -14 m 384 655 q 260 602 306 655 q 207 449 214 549 l 545 449 q 536 533 545 495 q 507 598 526 571 q 457 640 487 625 q 384 655 427 655 m 602 842 l 520 842 q 448 897 485 864 q 377 967 412 930 q 304 897 340 930 q 234 842 268 864 l 152 842 l 152 860 q 192 905 169 879 q 238 958 215 931 q 281 1013 261 986 q 311 1064 301 1040 l 442 1064 q 472 1013 452 1040 q 515 958 492 986 q 561 905 538 931 q 602 860 585 879 l 602 842 "},"″":{"x_min":90,"x_max":468.609375,"ha":558,"o":"m 223 992 l 195 634 l 117 634 l 90 992 l 223 992 m 468 992 l 440 634 l 362 634 l 335 992 l 468 992 "},"„":{"x_min":43,"x_max":517,"ha":608,"o":"m 246 161 l 256 145 q 233 67 246 108 q 204 -15 220 26 q 170 -99 188 -57 q 136 -179 153 -141 l 43 -179 q 66 -92 54 -137 q 88 -3 77 -48 q 107 82 98 40 q 122 161 116 125 l 246 161 m 508 161 l 517 145 q 494 67 507 108 q 465 -15 481 26 q 432 -99 449 -57 q 397 -179 414 -141 l 305 -179 q 327 -92 315 -137 q 349 -3 338 -48 q 368 82 359 40 q 383 161 377 125 l 508 161 "},"ч":{"x_min":104,"x_max":693,"ha":811,"o":"m 227 745 l 227 466 q 352 348 227 348 q 410 353 382 348 q 462 368 437 358 q 514 392 488 377 q 569 427 541 407 l 569 745 l 693 745 l 693 0 l 569 0 l 569 332 q 512 295 539 311 q 456 268 485 279 q 395 251 427 257 q 324 246 363 246 q 230 261 271 246 q 161 306 188 277 q 118 373 133 334 q 104 458 104 412 l 104 745 l 227 745 "},"δ":{"x_min":75,"x_max":725,"ha":802,"o":"m 360 635 q 291 683 322 657 q 236 737 259 708 q 201 800 214 767 q 189 872 189 833 q 206 956 189 921 q 254 1016 223 992 q 328 1051 286 1039 q 421 1063 370 1063 q 505 1056 467 1063 q 576 1038 543 1049 q 636 1015 609 1028 q 687 989 663 1001 l 637 890 q 590 916 615 903 q 538 938 565 928 q 479 954 510 948 q 413 960 448 960 q 364 952 385 960 q 331 933 344 945 q 311 904 317 920 q 305 869 305 887 q 314 823 305 844 q 344 781 324 802 q 398 738 364 760 q 479 689 431 716 q 583 619 537 655 q 660 539 629 582 q 708 447 691 496 q 725 337 725 397 q 701 185 725 251 q 635 75 678 120 q 531 8 592 31 q 397 -14 471 -14 q 268 6 327 -14 q 166 67 209 27 q 99 164 123 106 q 75 296 75 222 q 97 423 75 368 q 159 520 120 479 q 249 590 197 562 q 360 635 301 618 m 597 325 q 587 410 597 372 q 557 478 577 448 q 510 533 538 508 q 446 579 482 557 q 363 548 407 568 q 284 495 320 528 q 225 413 249 462 q 202 294 202 363 q 215 211 202 249 q 253 146 228 173 q 314 103 278 118 q 395 88 350 88 q 545 149 492 88 q 597 325 597 210 "},"Â":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 m 647 1071 l 565 1071 q 493 1126 530 1093 q 422 1196 457 1159 q 349 1126 385 1159 q 279 1071 313 1093 l 197 1071 l 197 1089 q 237 1134 214 1108 q 283 1187 260 1160 q 326 1242 306 1215 q 356 1293 346 1269 l 487 1293 q 517 1242 497 1269 q 560 1187 537 1215 q 606 1134 583 1160 q 647 1089 630 1108 l 647 1071 "},"Į":{"x_min":55.34375,"x_max":414.8125,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 m 224 -161 q 242 -206 224 -191 q 284 -220 260 -220 q 317 -218 301 -220 q 343 -214 333 -217 l 343 -291 q 303 -299 325 -296 q 262 -302 282 -302 q 160 -266 194 -302 q 127 -170 127 -231 q 136 -116 127 -142 q 162 -69 146 -91 q 195 -30 177 -48 q 231 0 214 -12 l 318 0 q 224 -161 224 -90 "},"ω":{"x_min":77,"x_max":970,"ha":1046,"o":"m 332 -14 q 223 13 271 -14 q 143 91 176 41 q 93 209 110 140 q 77 360 77 278 q 82 464 77 415 q 97 558 87 512 q 124 650 108 604 q 162 745 140 696 l 289 745 q 251 649 267 695 q 225 558 235 604 q 209 464 214 512 q 204 360 204 416 q 214 243 204 294 q 242 158 224 192 q 285 106 260 123 q 340 88 310 88 q 394 102 371 88 q 432 140 417 116 q 454 198 447 165 q 462 270 462 231 l 462 478 l 585 478 l 585 270 q 618 135 585 182 q 706 88 651 88 q 761 106 736 88 q 804 158 786 123 q 832 243 823 192 q 842 360 842 294 q 837 464 842 416 q 821 558 832 512 q 795 649 811 604 q 757 745 779 695 l 884 745 q 922 650 906 696 q 949 558 938 604 q 964 464 959 512 q 970 360 970 415 q 953 209 970 278 q 903 91 936 140 q 823 13 871 41 q 714 -14 775 -14 q 595 15 642 -14 q 527 106 548 45 l 520 106 q 452 15 499 45 q 332 -14 404 -14 "},"Ţ":{"x_min":14,"x_max":706,"ha":721,"o":"m 423 0 l 297 0 l 297 880 l 14 880 l 14 992 l 706 992 l 706 880 l 423 880 l 423 0 m 244 -288 q 260 -246 251 -271 q 277 -191 269 -220 q 291 -135 285 -163 q 300 -85 298 -107 l 423 -85 l 423 -98 q 408 -141 418 -115 q 382 -197 397 -167 q 348 -255 367 -226 q 310 -307 330 -284 l 244 -307 l 244 -288 "},"´":{"x_min":267,"x_max":534,"ha":802,"o":"m 267 860 q 297 905 281 879 q 329 958 313 931 q 360 1013 345 986 q 385 1064 374 1040 l 534 1064 l 534 1049 q 501 1004 523 1031 q 454 946 480 976 q 400 889 428 917 q 349 842 372 860 l 267 842 l 267 860 "},"Ĉ":{"x_min":85,"x_max":798,"ha":838,"o":"m 538 894 q 406 867 465 894 q 305 788 347 839 q 241 662 264 736 q 218 496 218 588 q 238 326 218 400 q 298 200 258 251 q 398 123 338 150 q 538 97 458 97 q 652 108 598 97 q 760 135 707 120 l 760 26 q 707 8 733 15 q 651 -4 680 0 q 590 -11 622 -9 q 517 -14 557 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 497 85 382 q 114 703 85 609 q 201 864 144 796 q 343 968 258 931 q 538 1006 428 1006 q 677 991 611 1006 q 798 947 744 976 l 745 841 q 652 879 702 863 q 538 894 601 894 m 747 1071 l 665 1071 q 593 1126 630 1093 q 522 1196 557 1159 q 449 1126 485 1159 q 379 1071 413 1093 l 297 1071 l 297 1089 q 337 1134 314 1108 q 383 1187 360 1160 q 426 1242 406 1215 q 456 1293 446 1269 l 587 1293 q 617 1242 597 1269 q 660 1187 637 1215 q 706 1134 683 1160 q 747 1089 730 1108 l 747 1071 "},"И":{"x_min":136,"x_max":879,"ha":1013,"o":"m 136 992 l 262 992 l 262 449 q 261 410 262 431 q 260 366 261 389 q 259 321 260 343 q 257 276 258 298 q 251 174 254 226 l 256 174 l 725 992 l 879 992 l 879 0 l 752 0 l 752 538 q 754 624 752 576 q 759 717 756 673 q 765 821 762 768 l 760 821 l 289 0 l 136 0 l 136 992 "},"Љ":{"x_min":0,"x_max":1193,"ha":1264,"o":"m 1193 290 q 1172 170 1193 224 q 1109 79 1152 117 q 1000 20 1066 41 q 843 0 934 0 l 625 0 l 625 880 l 431 880 q 410 721 420 804 q 388 558 399 638 q 366 406 377 478 q 343 279 354 334 q 310 154 329 209 q 262 61 291 99 q 194 4 234 24 q 98 -16 154 -16 q 46 -10 73 -16 q 0 1 20 -5 l 0 111 q 35 97 15 102 q 76 91 54 91 q 129 113 108 91 q 164 167 150 134 q 187 239 179 200 q 204 315 196 279 q 223 421 213 354 q 247 577 234 488 q 275 771 261 665 q 305 992 290 877 l 751 992 l 751 574 l 825 574 q 999 551 928 574 q 1112 490 1069 529 q 1174 400 1155 452 q 1193 290 1193 349 m 751 107 l 831 107 q 1004 152 948 107 q 1059 290 1059 197 q 1043 370 1059 337 q 997 424 1028 403 q 920 453 966 444 q 810 462 873 462 l 751 462 l 751 107 "},"р":{"x_min":118,"x_max":737,"ha":814,"o":"m 454 -14 q 381 -5 414 -14 q 323 18 349 3 q 277 52 297 32 q 241 93 257 72 l 233 93 q 237 49 235 70 q 240 13 238 32 q 241 -16 241 -5 l 241 -334 l 118 -334 l 118 745 l 218 745 l 236 644 l 241 644 q 276 688 257 667 q 322 724 296 709 q 381 748 348 739 q 454 758 413 758 q 570 733 518 758 q 659 660 622 709 q 716 540 696 612 q 737 373 737 468 q 716 205 737 277 q 659 84 696 133 q 570 10 622 35 q 454 -14 518 -14 m 430 655 q 343 639 379 655 q 285 592 307 624 q 253 513 263 560 q 241 401 242 465 l 241 373 q 250 251 241 304 q 281 162 259 198 q 340 107 303 125 q 431 88 377 88 q 566 162 523 88 q 609 374 609 236 q 566 585 609 515 q 430 655 523 655 "},"Ω":{"x_min":53.0625,"x_max":980.9375,"ha":1031,"o":"m 517 895 q 384 872 439 895 q 292 805 328 849 q 239 699 256 762 q 222 556 222 636 q 234 425 222 488 q 273 304 246 362 q 345 194 301 246 q 455 99 390 143 l 455 0 l 53 0 l 53 111 l 321 111 q 229 189 271 143 q 155 292 186 235 q 106 416 124 349 q 89 559 89 484 q 116 743 89 661 q 198 884 143 826 q 332 975 252 943 q 517 1007 412 1007 q 701 975 622 1007 q 835 884 781 943 q 917 743 890 826 q 945 559 945 661 q 927 416 945 484 q 878 292 909 349 q 805 189 847 235 q 712 111 762 143 l 980 111 l 980 0 l 579 0 l 579 99 q 688 194 643 143 q 760 304 732 246 q 799 425 787 362 q 811 556 811 488 q 794 699 811 636 q 741 805 777 762 q 649 872 705 849 q 517 895 594 895 "},"т":{"x_min":28,"x_max":584,"ha":612,"o":"m 584 642 l 367 642 l 367 0 l 244 0 l 244 642 l 28 642 l 28 745 l 584 745 l 584 642 "},"П":{"x_min":135,"x_max":826,"ha":960,"o":"m 826 0 l 699 0 l 699 880 l 261 880 l 261 0 l 135 0 l 135 992 l 826 992 l 826 0 "},"Ö":{"x_min":85,"x_max":945,"ha":1031,"o":"m 945 496 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 701 970 622 1007 q 835 867 781 934 q 917 706 890 800 q 945 496 945 612 m 218 497 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 q 794 664 811 590 q 741 789 777 738 q 649 868 705 840 q 517 895 594 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 m 323 1174 q 341 1227 323 1211 q 388 1244 360 1244 q 434 1227 414 1244 q 453 1174 453 1210 q 434 1121 453 1138 q 388 1105 414 1105 q 341 1121 360 1105 q 323 1174 323 1138 m 577 1174 q 596 1227 577 1211 q 642 1244 615 1244 q 667 1239 655 1244 q 688 1227 679 1235 q 702 1206 697 1218 q 708 1174 708 1193 q 688 1121 708 1138 q 642 1105 668 1105 q 596 1121 615 1105 q 577 1174 577 1138 "},"z":{"x_min":56,"x_max":556.21875,"ha":612,"o":"m 556 0 l 56 0 l 56 80 l 418 656 l 78 656 l 78 745 l 544 745 l 544 650 l 189 88 l 556 88 l 556 0 "},"™":{"x_min":25,"x_max":922,"ha":1040,"o":"m 244 503 l 158 503 l 158 918 l 25 918 l 25 992 l 379 992 l 379 918 l 244 918 l 244 503 m 636 503 l 511 875 l 506 875 q 508 852 507 864 q 509 831 508 841 q 509 812 509 821 q 510 800 510 804 l 510 503 l 424 503 l 424 992 l 552 992 l 673 618 l 801 992 l 922 992 l 922 503 l 835 503 l 835 793 q 836 809 835 799 q 836 831 836 819 q 837 855 837 843 q 838 875 837 867 l 834 875 l 703 503 l 636 503 "},"Θ":{"x_min":85,"x_max":945,"ha":1031,"o":"m 334 560 l 696 560 l 696 452 l 334 452 l 334 560 m 945 496 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 701 970 622 1007 q 835 867 781 934 q 917 706 890 800 q 945 496 945 612 m 218 497 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 q 794 664 811 590 q 741 789 777 738 q 649 868 705 840 q 517 895 594 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 "},"Ř":{"x_min":135,"x_max":803.25,"ha":819,"o":"m 261 410 l 261 0 l 135 0 l 135 992 l 376 992 q 642 922 556 992 q 729 710 729 852 q 712 607 729 651 q 668 531 695 563 q 605 479 640 500 q 533 444 570 458 l 803 0 l 654 0 l 416 410 l 261 410 m 261 517 l 371 517 q 473 529 431 517 q 543 564 516 541 q 582 623 570 588 q 595 704 595 658 q 581 787 595 753 q 540 842 567 821 q 469 874 512 864 q 368 884 426 884 l 261 884 l 261 517 m 635 1274 q 594 1229 618 1255 q 548 1176 571 1203 q 505 1121 525 1148 q 475 1071 485 1094 l 344 1071 q 314 1121 334 1094 q 271 1176 294 1148 q 225 1229 248 1203 q 185 1274 202 1255 l 185 1293 l 267 1293 q 337 1237 301 1270 q 410 1166 373 1204 q 481 1237 445 1204 q 553 1293 518 1270 l 635 1293 l 635 1274 "},"Ň":{"x_min":135,"x_max":878,"ha":1013,"o":"m 878 0 l 724 0 l 253 821 l 248 821 q 255 717 252 768 q 259 624 257 673 q 261 538 261 576 l 261 0 l 135 0 l 135 992 l 288 992 l 757 174 l 762 174 q 757 276 759 226 q 755 321 756 298 q 753 366 754 343 q 752 410 752 389 q 751 449 751 431 l 751 992 l 878 992 l 878 0 m 732 1274 q 691 1229 715 1255 q 645 1176 668 1203 q 602 1121 622 1148 q 572 1071 582 1094 l 441 1071 q 411 1121 431 1094 q 368 1176 391 1148 q 322 1229 345 1203 q 282 1274 299 1255 l 282 1293 l 364 1293 q 434 1237 398 1270 q 507 1166 470 1204 q 578 1237 542 1204 q 650 1293 615 1270 l 732 1293 l 732 1274 "},"É":{"x_min":135,"x_max":650,"ha":733,"o":"m 650 0 l 135 0 l 135 992 l 650 992 l 650 880 l 261 880 l 261 574 l 624 574 l 624 462 l 261 462 l 261 111 l 650 111 l 650 0 m 309 1089 q 339 1134 323 1108 q 371 1187 355 1160 q 402 1242 387 1215 q 427 1293 416 1269 l 576 1293 l 576 1278 q 543 1233 565 1260 q 496 1175 522 1205 q 442 1118 470 1146 q 391 1071 414 1089 l 309 1071 l 309 1089 "},"и":{"x_min":118,"x_max":735,"ha":853,"o":"m 234 745 l 234 291 l 226 120 l 576 745 l 735 745 l 735 0 l 618 0 l 618 439 l 625 622 l 276 0 l 118 0 l 118 745 l 234 745 "},"³":{"x_min":21,"x_max":418,"ha":460,"o":"m 400 852 q 372 764 400 800 q 298 712 345 729 q 388 660 358 697 q 418 571 418 624 q 404 496 418 530 q 362 437 390 461 q 291 399 334 413 q 190 386 249 386 q 101 394 143 386 q 21 423 59 402 l 21 514 q 110 481 64 493 q 192 469 155 469 q 290 497 260 469 q 321 575 321 525 q 283 648 321 625 q 179 671 246 671 l 111 671 l 111 745 l 179 745 q 273 771 244 745 q 303 839 303 797 q 296 876 303 860 q 277 901 289 891 q 248 915 264 911 q 213 920 232 920 q 138 907 172 920 q 69 870 105 894 l 22 935 q 62 963 41 951 q 106 985 83 976 q 155 998 129 993 q 210 1004 180 1004 q 293 992 257 1004 q 352 961 328 981 q 388 913 376 940 q 400 852 400 885 "},"[":{"x_min":111,"x_max":386,"ha":421,"o":"m 386 -220 l 111 -220 l 111 992 l 386 992 l 386 890 l 234 890 l 234 -118 l 386 -118 l 386 -220 "},"ζ":{"x_min":77,"x_max":593,"ha":632,"o":"m 118 952 l 118 1055 l 589 1055 l 589 960 q 439 811 502 880 q 334 680 377 741 q 266 567 291 619 q 226 470 240 515 q 208 387 213 425 q 204 317 204 349 q 219 220 204 256 q 263 161 235 183 q 332 128 291 140 q 424 104 373 116 q 504 78 472 94 q 556 43 536 63 q 584 -1 576 23 q 593 -54 593 -25 q 585 -114 593 -84 q 567 -172 578 -144 q 541 -225 555 -200 q 511 -272 526 -250 l 396 -272 q 426 -225 412 -250 q 451 -176 440 -201 q 469 -129 463 -152 q 476 -87 476 -107 q 471 -61 476 -73 q 450 -37 466 -48 q 403 -15 434 -25 q 321 5 373 -4 q 215 39 261 17 q 139 98 170 61 q 92 186 108 135 q 77 307 77 238 q 108 495 77 408 q 191 661 139 582 q 311 813 243 740 q 453 960 380 887 q 392 956 424 958 q 332 953 365 955 q 268 952 299 952 l 118 952 "},"∏":{"x_min":135,"x_max":895,"ha":1030,"o":"m 768 -334 l 768 880 l 261 880 l 261 -334 l 135 -334 l 135 992 l 895 992 l 895 -334 l 768 -334 "},"Έ":{"x_min":-17,"x_max":747,"ha":831,"o":"m 747 0 l 232 0 l 232 992 l 747 992 l 747 880 l 358 880 l 358 574 l 721 574 l 721 462 l 358 462 l 358 111 l 747 111 l 747 0 m -17 789 q -3 835 -10 809 q 9 889 3 861 q 21 943 16 916 q 30 993 27 970 l 165 993 l 165 978 q 149 936 160 962 q 123 880 138 909 q 90 821 107 850 q 56 771 72 792 l -17 771 l -17 789 "},"Ρ":{"x_min":135,"x_max":729,"ha":800,"o":"m 729 701 q 710 582 729 639 q 648 482 691 525 q 536 412 606 438 q 362 386 465 386 l 261 386 l 261 0 l 135 0 l 135 992 l 380 992 q 537 972 471 992 q 645 916 602 953 q 708 825 688 879 q 729 701 729 770 m 261 493 l 347 493 q 456 504 410 493 q 533 539 503 515 q 579 601 564 563 q 595 695 595 640 q 540 837 595 791 q 368 884 485 884 l 261 884 l 261 493 "},"ğ":{"x_min":25,"x_max":692.484375,"ha":720,"o":"m 692 745 l 692 668 l 559 649 q 591 588 578 625 q 604 504 604 551 q 588 409 604 453 q 539 333 572 365 q 459 283 507 301 q 348 266 412 266 q 319 266 333 266 q 294 268 304 266 q 271 253 282 261 q 251 233 260 244 q 236 208 242 222 q 230 178 230 194 q 238 148 230 159 q 260 130 246 136 q 293 122 274 124 q 333 120 312 120 l 453 120 q 560 104 516 120 q 631 61 603 88 q 670 -2 658 34 q 683 -80 683 -38 q 660 -186 683 -139 q 593 -266 638 -233 q 478 -316 547 -298 q 314 -334 408 -334 q 187 -319 241 -334 q 96 -278 132 -305 q 42 -213 60 -251 q 25 -128 25 -175 q 38 -57 25 -87 q 73 -4 51 -26 q 125 32 96 17 q 187 53 155 46 q 140 94 158 66 q 122 159 122 122 q 143 231 122 201 q 212 291 165 262 q 158 324 182 303 q 118 373 134 346 q 92 433 101 401 q 83 500 83 466 q 99 608 83 561 q 150 689 116 656 q 233 740 183 722 q 348 758 282 758 q 400 754 373 758 q 445 745 427 750 l 692 745 m 141 -126 q 150 -173 141 -151 q 179 -211 159 -195 q 232 -235 199 -226 q 314 -245 265 -245 q 503 -205 440 -245 q 566 -92 566 -166 q 558 -41 566 -61 q 531 -10 550 -21 q 482 4 512 0 q 407 8 451 8 l 287 8 q 238 3 263 8 q 190 -17 212 -2 q 155 -58 169 -32 q 141 -126 141 -84 m 206 504 q 242 388 206 426 q 344 350 278 350 q 446 388 411 350 q 480 506 480 426 q 445 629 480 590 q 343 669 410 669 q 241 628 277 669 q 206 504 206 587 m 551 1030 q 533 954 548 988 q 492 894 518 920 q 429 855 466 869 q 344 842 392 842 q 257 855 294 842 q 196 893 220 868 q 158 952 171 918 q 143 1030 145 987 l 217 1030 q 229 983 220 1000 q 255 957 239 965 q 294 946 271 948 q 347 943 317 943 q 393 946 371 943 q 433 959 415 949 q 462 985 450 968 q 476 1030 473 1002 l 551 1030 "},"ª":{"x_min":46,"x_max":392,"ha":460,"o":"m 328 541 l 308 597 q 283 570 296 582 q 254 549 270 558 q 219 536 238 540 q 177 532 201 532 q 124 540 148 532 q 82 566 100 549 q 55 610 65 584 q 46 671 46 636 q 93 777 46 740 q 236 817 140 813 l 303 820 l 303 841 q 282 909 303 890 q 224 929 262 929 q 162 919 192 929 q 104 894 132 909 l 72 961 q 146 991 106 979 q 226 1003 185 1003 q 351 967 311 1003 q 392 848 392 931 l 392 541 l 328 541 m 253 743 q 196 736 219 741 q 160 720 174 730 q 140 698 146 711 q 134 666 134 684 q 151 620 134 634 q 196 605 168 605 q 238 612 219 605 q 272 632 257 619 q 294 667 286 646 q 303 715 303 687 l 303 746 l 253 743 "},"ї":{"x_min":-13,"x_max":372,"ha":359,"o":"m 241 0 l 118 0 l 118 745 l 241 745 l 241 0 m -13 945 q 5 998 -13 982 q 52 1015 24 1015 q 98 998 78 1015 q 117 945 117 981 q 98 892 117 909 q 52 876 78 876 q 5 892 24 876 q -13 945 -13 909 m 241 945 q 260 998 241 982 q 306 1015 279 1015 q 331 1010 319 1015 q 352 998 343 1006 q 366 977 361 989 q 372 945 372 964 q 352 892 372 909 q 306 876 332 876 q 260 892 279 876 q 241 945 241 909 "},"T":{"x_min":14,"x_max":706,"ha":721,"o":"m 423 0 l 297 0 l 297 880 l 14 880 l 14 992 l 706 992 l 706 880 l 423 880 l 423 0 "},"š":{"x_min":61.15625,"x_max":564,"ha":627,"o":"m 564 203 q 544 108 564 149 q 487 40 524 68 q 398 0 450 13 q 281 -14 346 -14 q 154 -2 207 -14 q 61 33 101 9 l 61 146 q 107 125 82 135 q 161 106 133 114 q 219 93 189 98 q 279 88 249 88 q 353 95 323 88 q 403 116 384 103 q 431 150 423 130 q 440 194 440 170 q 433 232 440 215 q 409 265 427 249 q 360 299 391 282 q 280 337 329 316 q 193 378 232 358 q 127 424 154 399 q 86 482 100 449 q 72 560 72 515 q 90 645 72 608 q 143 707 109 682 q 224 745 177 732 q 330 758 272 758 q 451 743 396 758 q 554 706 505 729 l 512 606 q 422 641 468 626 q 329 655 376 655 q 228 632 261 655 q 195 568 195 610 q 203 526 195 544 q 229 493 210 509 q 279 461 248 477 q 358 426 311 445 q 444 385 406 405 q 509 339 482 365 q 549 281 535 314 q 564 203 564 249 m 554 1045 q 513 1000 537 1026 q 467 947 490 974 q 424 892 444 919 q 394 842 404 865 l 263 842 q 233 892 253 865 q 190 947 213 919 q 144 1000 167 974 q 104 1045 121 1026 l 104 1064 l 186 1064 q 256 1008 220 1041 q 329 937 292 975 q 400 1008 364 975 q 472 1064 437 1041 l 554 1064 l 554 1045 "},"є":{"x_min":77,"x_max":596,"ha":643,"o":"m 402 -14 q 274 7 334 -14 q 171 75 215 28 q 102 193 127 121 q 77 367 77 266 q 102 548 77 474 q 173 669 128 623 q 278 736 218 715 q 408 758 339 758 q 511 746 461 758 q 596 718 562 735 l 559 614 q 524 627 543 621 q 485 638 505 633 q 445 647 465 644 q 408 650 425 650 q 264 598 314 650 q 205 434 215 547 l 528 434 l 528 331 l 204 331 q 260 149 210 205 q 402 93 309 93 q 502 106 457 93 q 583 135 546 118 l 583 26 q 504 -3 546 6 q 402 -14 463 -14 "},"Þ":{"x_min":135,"x_max":729,"ha":800,"o":"m 729 530 q 710 411 729 468 q 648 311 691 354 q 536 241 606 267 q 362 215 465 215 l 261 215 l 261 0 l 135 0 l 135 992 l 261 992 l 261 821 l 380 821 q 537 801 471 821 q 645 745 602 782 q 708 654 688 708 q 729 530 729 599 m 261 322 l 347 322 q 456 333 410 322 q 533 368 503 344 q 579 430 564 392 q 595 524 595 469 q 540 667 595 621 q 368 713 485 713 l 261 713 l 261 322 "},"j":{"x_min":-46,"x_max":252.96875,"ha":359,"o":"m 44 -334 q -9 -329 12 -334 q -46 -317 -30 -324 l -46 -217 q -10 -227 -28 -224 q 31 -231 8 -231 q 65 -226 50 -231 q 93 -208 81 -221 q 111 -172 105 -194 q 118 -116 118 -150 l 118 745 l 241 745 l 241 -107 q 229 -201 241 -159 q 193 -272 218 -243 q 132 -318 169 -302 q 44 -334 95 -334 m 108 945 q 129 1004 108 986 q 180 1023 149 1023 q 208 1018 195 1023 q 231 1004 221 1014 q 247 980 241 995 q 252 945 252 966 q 231 887 252 906 q 180 868 210 868 q 129 886 149 868 q 108 945 108 905 "},"Σ":{"x_min":53,"x_max":706,"ha":739,"o":"m 53 0 l 53 103 l 333 519 l 61 892 l 61 992 l 666 992 l 666 880 l 200 880 l 466 520 l 186 111 l 706 111 l 706 0 l 53 0 "},"1":{"x_min":121,"x_max":482.375,"ha":765,"o":"m 482 0 l 363 0 l 363 619 q 363 682 363 648 q 364 748 363 715 q 366 811 365 781 q 368 864 367 841 q 348 843 356 852 q 330 826 339 834 q 310 809 320 818 q 286 788 300 800 l 186 706 l 121 789 l 380 992 l 482 992 l 482 0 "},"ϒ":{"x_min":-0.25,"x_max":742,"ha":750,"o":"m 366 496 q 403 603 383 546 q 445 714 424 660 q 487 815 467 769 q 523 891 507 861 q 554 939 538 918 q 588 973 570 960 q 628 993 606 986 q 677 1000 649 1000 q 715 996 701 1000 q 742 988 730 993 l 742 890 q 722 893 733 892 q 702 895 711 895 q 685 893 695 895 q 665 883 676 890 q 642 860 654 875 q 617 823 630 846 q 595 778 609 806 q 565 711 582 749 q 529 631 548 674 q 493 542 511 587 q 457 452 474 497 q 428 367 441 407 l 428 0 l 302 0 l 302 379 l 0 992 l 137 992 l 366 496 "},"ℓ":{"x_min":81,"x_max":605,"ha":695,"o":"m 426 82 q 466 90 447 82 q 500 114 485 97 q 525 158 515 130 q 537 225 535 185 l 605 225 q 589 124 602 168 q 552 49 576 79 q 493 2 528 18 q 410 -14 457 -14 q 334 -1 370 -14 q 271 39 298 11 q 227 114 243 68 q 211 228 211 161 l 211 385 q 147 364 179 374 q 81 347 114 355 l 81 422 q 148 442 116 431 q 211 462 180 452 l 211 801 q 220 878 211 841 q 251 943 230 915 q 308 989 273 972 q 395 1006 344 1006 q 461 991 431 1006 q 511 950 491 977 q 543 886 532 924 q 555 802 555 848 q 537 679 555 735 q 489 577 519 622 q 418 496 459 532 q 330 436 377 461 l 330 232 q 335 172 330 199 q 353 125 341 145 q 383 94 365 105 q 426 82 401 82 m 461 795 q 396 925 461 925 q 363 916 376 925 q 343 889 350 906 q 333 848 336 872 q 330 795 330 824 l 330 516 q 389 566 364 539 q 430 626 413 593 q 453 702 446 660 q 461 795 461 743 "},"ĉ":{"x_min":77,"x_max":618,"ha":643,"o":"m 402 -14 q 274 7 334 -14 q 171 75 215 28 q 102 193 127 121 q 77 367 77 266 q 102 548 77 474 q 173 669 128 623 q 278 736 218 715 q 408 758 339 758 q 511 746 461 758 q 596 718 562 735 l 559 614 q 524 627 543 621 q 485 638 505 633 q 445 647 465 644 q 408 650 425 650 q 253 581 302 650 q 204 369 204 513 q 253 160 204 226 q 402 93 302 93 q 502 106 457 93 q 583 135 546 118 l 583 26 q 504 -3 546 6 q 402 -14 463 -14 m 618 842 l 536 842 q 464 897 501 864 q 393 967 428 930 q 320 897 356 930 q 250 842 284 864 l 168 842 l 168 860 q 208 905 185 879 q 254 958 231 931 q 297 1013 277 986 q 327 1064 317 1040 l 458 1064 q 488 1013 468 1040 q 531 958 508 986 q 577 905 554 931 q 618 860 601 879 l 618 842 "},"ī":{"x_min":-14,"x_max":376,"ha":359,"o":"m 241 0 l 118 0 l 118 745 l 241 745 l 241 0 m -14 943 l 376 943 l 376 842 l -14 842 l -14 943 "},"О":{"x_min":85,"x_max":945,"ha":1031,"o":"m 945 496 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 701 970 622 1007 q 835 867 781 934 q 917 706 890 800 q 945 496 945 612 m 218 497 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 q 794 664 811 590 q 741 789 777 738 q 649 868 705 840 q 517 895 594 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 "},"ξ":{"x_min":77,"x_max":593,"ha":632,"o":"m 543 601 l 543 512 l 433 512 q 336 495 379 512 q 264 449 293 478 q 219 382 234 420 q 204 299 204 343 q 219 213 204 246 q 263 160 235 181 q 332 129 291 140 q 424 106 373 117 q 504 80 472 95 q 556 44 536 64 q 584 0 576 24 q 593 -53 593 -24 q 585 -113 593 -83 q 566 -171 578 -143 q 540 -225 555 -199 q 510 -272 525 -250 l 394 -272 q 425 -225 410 -250 q 451 -176 439 -201 q 469 -129 462 -152 q 476 -86 476 -106 q 471 -60 476 -73 q 450 -36 466 -47 q 403 -14 434 -24 q 321 6 373 -3 q 139 97 201 29 q 77 288 77 165 q 92 383 77 340 q 135 459 108 426 q 195 515 161 493 q 267 550 230 538 l 267 558 q 160 622 199 577 q 122 747 122 667 q 137 830 122 796 q 179 889 152 865 q 242 931 206 914 q 321 960 278 947 q 271 956 297 958 q 220 953 249 955 q 160 952 191 952 l 117 952 l 117 1055 l 553 1055 l 553 960 l 515 960 q 415 947 465 960 q 326 908 366 934 q 262 841 287 881 q 238 748 238 801 q 249 685 238 712 q 284 638 260 657 q 346 610 308 620 q 440 601 385 601 l 543 601 "},"Ď":{"x_min":135,"x_max":865,"ha":950,"o":"m 865 505 q 832 285 865 379 q 738 127 799 190 q 586 31 676 63 q 383 0 496 0 l 135 0 l 135 992 l 410 992 q 598 960 514 992 q 741 868 682 929 q 832 715 800 806 q 865 505 865 624 m 731 501 q 709 672 731 600 q 643 791 686 744 q 538 861 601 838 q 397 884 476 884 l 261 884 l 261 107 l 370 107 q 640 207 549 107 q 731 501 731 306 m 676 1274 q 635 1229 659 1255 q 589 1176 612 1203 q 546 1121 566 1148 q 516 1071 526 1094 l 385 1071 q 355 1121 375 1094 q 312 1176 335 1148 q 266 1229 289 1203 q 226 1274 243 1255 l 226 1293 l 308 1293 q 378 1237 342 1270 q 451 1166 414 1204 q 522 1237 486 1204 q 594 1293 559 1270 l 676 1293 l 676 1274 "},"&":{"x_min":74,"x_max":953,"ha":975,"o":"m 289 789 q 294 744 289 766 q 311 700 300 722 q 340 655 322 678 q 381 608 357 633 q 448 652 420 631 q 494 695 476 673 q 522 740 513 717 q 531 792 531 764 q 523 837 531 816 q 499 872 515 857 q 462 896 483 887 q 412 904 440 904 q 322 874 355 904 q 289 789 289 844 m 377 93 q 449 101 416 93 q 511 123 483 109 q 565 155 540 137 q 611 195 589 174 l 349 471 q 285 427 313 449 q 239 381 258 406 q 211 328 220 357 q 201 261 201 299 q 213 193 201 224 q 247 140 225 162 q 302 106 270 118 q 377 93 335 93 m 74 257 q 87 352 74 310 q 127 427 101 393 q 191 490 153 461 q 277 548 228 519 q 235 598 256 572 q 200 654 215 624 q 175 717 184 683 q 166 789 166 751 q 182 881 166 840 q 231 949 199 921 q 310 992 263 977 q 416 1007 356 1007 q 516 992 472 1007 q 591 949 560 977 q 638 881 622 921 q 655 790 655 840 q 638 709 655 746 q 593 641 621 672 q 529 582 565 609 q 452 531 492 556 l 690 279 q 723 319 708 299 q 749 362 738 339 q 770 411 761 385 q 786 470 779 438 l 910 470 q 886 387 899 425 q 854 317 872 350 q 814 255 836 283 q 766 198 792 226 l 953 0 l 800 0 l 686 116 q 620 61 653 85 q 551 21 588 37 q 472 -4 514 4 q 377 -14 430 -14 q 250 3 306 -14 q 154 56 193 21 q 94 142 115 91 q 74 257 74 192 "},"G":{"x_min":85,"x_max":858,"ha":958,"o":"m 530 524 l 858 524 l 858 36 q 782 15 820 24 q 704 0 744 5 q 620 -10 664 -7 q 526 -14 576 -14 q 337 21 419 -14 q 199 123 255 57 q 114 284 143 189 q 85 497 85 378 q 117 708 85 613 q 211 868 149 802 q 363 970 272 934 q 569 1006 453 1006 q 713 991 644 1006 q 842 947 782 976 l 793 837 q 741 859 769 849 q 683 877 713 869 q 621 890 653 885 q 559 894 590 894 q 412 867 476 894 q 306 788 349 839 q 240 662 263 736 q 218 496 218 588 q 237 334 218 407 q 296 208 255 261 q 401 126 336 155 q 556 97 465 97 q 610 98 585 97 q 656 103 635 100 q 695 109 677 106 q 731 116 714 113 l 731 412 l 530 412 l 530 524 "},"ΰ":{"x_min":111,"x_max":736,"ha":819,"o":"m 409 -14 q 264 13 322 -14 q 172 87 206 40 q 124 199 138 135 q 111 337 111 263 l 111 745 l 234 745 l 234 345 q 245 239 234 286 q 278 158 256 192 q 335 106 300 125 q 417 88 370 88 q 564 167 516 88 q 612 412 612 245 q 609 503 612 461 q 601 585 606 545 q 587 664 595 625 q 569 745 580 703 l 693 745 q 711 664 703 703 q 725 585 719 626 q 733 501 730 545 q 736 406 736 457 q 653 88 736 190 q 409 -14 570 -14 m 357 959 q 372 1005 364 980 q 389 1057 381 1030 q 404 1112 397 1084 q 417 1164 412 1139 l 558 1164 l 558 1150 q 529 1102 545 1128 q 494 1049 513 1076 q 454 994 475 1022 q 412 942 434 967 l 357 942 l 357 959 m 198 945 q 212 998 198 982 q 247 1015 226 1015 q 265 1010 256 1015 q 281 998 274 1006 q 291 977 287 989 q 295 945 295 964 q 280 892 295 909 q 247 876 266 876 q 212 892 226 876 q 198 945 198 909 m 527 945 q 541 998 527 982 q 576 1015 555 1015 q 594 1010 585 1015 q 610 998 603 1006 q 620 977 616 989 q 625 945 625 964 q 610 892 625 909 q 576 876 595 876 q 541 892 555 876 q 527 945 527 909 "},"`":{"x_min":267,"x_max":534,"ha":802,"o":"m 534 842 l 452 842 q 400 889 428 860 q 346 946 372 917 q 299 1004 320 976 q 267 1049 277 1031 l 267 1064 l 415 1064 q 441 1013 426 1040 q 471 958 455 986 q 503 905 487 931 q 534 860 519 879 l 534 842 "},"ŏ":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 702 208 725 280 q 637 86 679 135 q 534 11 594 37 q 398 -14 474 -14 q 270 11 329 -14 q 168 86 211 37 q 101 208 125 135 q 77 373 77 280 q 99 537 77 465 q 164 657 122 608 q 267 732 206 707 q 403 758 327 758 q 531 732 472 758 q 633 657 590 707 q 700 537 676 608 q 725 373 725 465 m 204 373 q 250 159 204 231 q 401 88 297 88 q 551 159 506 88 q 597 373 597 231 q 551 585 597 515 q 400 655 504 655 q 250 585 295 655 q 204 373 204 515 m 605 1030 q 587 954 602 988 q 546 894 572 920 q 483 855 520 869 q 398 842 446 842 q 311 855 348 842 q 250 893 274 868 q 212 952 225 918 q 197 1030 199 987 l 271 1030 q 283 983 274 1000 q 309 957 293 965 q 348 946 325 948 q 401 943 371 943 q 447 946 425 943 q 487 959 469 949 q 516 985 504 968 q 530 1030 527 1002 l 605 1030 "},"ý":{"x_min":6.75,"x_max":672.25,"ha":679,"o":"m 6 745 l 134 745 l 280 329 q 300 272 290 301 q 318 212 310 242 q 333 154 327 182 q 341 103 339 126 l 346 103 q 356 149 349 120 q 373 211 364 178 q 392 276 382 244 q 409 330 402 308 l 544 745 l 672 745 l 377 -96 q 336 -195 358 -152 q 285 -270 314 -239 q 217 -317 256 -300 q 123 -334 177 -334 q 62 -330 88 -334 q 18 -322 36 -326 l 18 -223 q 54 -229 32 -226 q 99 -231 75 -231 q 156 -223 132 -231 q 197 -201 179 -216 q 227 -164 215 -186 q 250 -115 240 -142 l 289 -6 l 6 745 m 276 860 q 306 905 290 879 q 338 958 322 931 q 369 1013 354 986 q 394 1064 383 1040 l 543 1064 l 543 1049 q 510 1004 532 1031 q 463 946 489 976 q 409 889 437 917 q 358 842 381 860 l 276 842 l 276 860 "},"º":{"x_min":45,"x_max":441,"ha":486,"o":"m 441 768 q 427 668 441 712 q 387 594 413 624 q 324 547 361 563 q 241 532 287 532 q 162 547 198 532 q 100 594 126 563 q 59 668 74 624 q 45 768 45 712 q 58 868 45 824 q 98 942 72 912 q 161 987 124 971 q 244 1003 197 1003 q 322 987 285 1003 q 384 942 358 971 q 426 868 411 912 q 441 768 441 824 m 133 769 q 159 647 133 688 q 243 605 184 605 q 326 647 301 605 q 352 769 352 688 q 326 889 352 850 q 243 929 301 929 q 159 889 184 929 q 133 769 133 850 "},"∞":{"x_min":81,"x_max":901,"ha":982,"o":"m 901 486 q 886 405 901 443 q 845 336 871 366 q 782 289 819 307 q 700 272 745 272 q 585 307 637 272 q 488 421 532 343 q 445 362 468 388 q 395 316 421 335 q 340 287 368 297 q 283 277 312 277 q 202 291 239 277 q 138 334 164 306 q 96 402 111 362 q 81 490 81 441 q 95 573 81 534 q 136 641 110 612 q 200 687 162 670 q 283 704 238 704 q 394 667 340 704 q 489 555 447 631 q 532 614 509 588 q 582 659 555 640 q 638 689 609 678 q 700 699 668 699 q 782 684 745 699 q 845 641 819 669 q 886 574 871 613 q 901 486 901 534 m 296 369 q 372 398 337 369 q 441 490 407 426 q 374 581 409 552 q 294 611 339 611 q 247 601 268 611 q 212 575 227 592 q 190 536 198 558 q 182 489 182 514 q 189 443 182 465 q 210 405 196 422 q 246 379 225 389 q 296 369 267 369 m 690 607 q 612 578 648 607 q 538 486 575 550 q 609 395 573 425 q 692 365 646 365 q 740 374 718 365 q 777 400 762 384 q 800 439 792 417 q 808 487 808 462 q 800 534 808 512 q 776 572 791 556 q 739 597 760 588 q 690 607 717 607 "},"ź":{"x_min":56,"x_max":556.21875,"ha":612,"o":"m 556 0 l 56 0 l 56 80 l 418 656 l 78 656 l 78 745 l 544 745 l 544 650 l 189 88 l 556 88 l 556 0 m 238 860 q 268 905 252 879 q 300 958 284 931 q 331 1013 316 986 q 356 1064 345 1040 l 505 1064 l 505 1049 q 472 1004 494 1031 q 425 946 451 976 q 371 889 399 917 q 320 842 343 860 l 238 842 l 238 860 "},"я":{"x_min":22.75,"x_max":619,"ha":737,"o":"m 157 0 l 22 0 l 220 315 q 161 339 190 323 q 111 381 133 355 q 75 443 89 407 q 62 527 62 479 q 81 621 62 580 q 133 689 100 662 q 214 730 167 716 q 317 745 261 745 l 619 745 l 619 0 l 495 0 l 495 295 l 330 295 l 157 0 m 178 525 q 191 468 178 492 q 226 428 203 444 q 278 405 248 413 q 346 398 309 398 l 495 398 l 495 642 l 322 642 q 214 610 249 642 q 178 525 178 577 "},"Ё":{"x_min":135,"x_max":650,"ha":733,"o":"m 650 0 l 135 0 l 135 992 l 650 992 l 650 880 l 261 880 l 261 574 l 624 574 l 624 462 l 261 462 l 261 111 l 650 111 l 650 0 m 201 1174 q 219 1227 201 1211 q 266 1244 238 1244 q 312 1227 292 1244 q 331 1174 331 1210 q 312 1121 331 1138 q 266 1105 292 1105 q 219 1121 238 1105 q 201 1174 201 1138 m 455 1174 q 474 1227 455 1211 q 520 1244 493 1244 q 545 1239 533 1244 q 566 1227 557 1235 q 580 1206 575 1218 q 586 1174 586 1193 q 566 1121 586 1138 q 520 1105 546 1105 q 474 1121 493 1105 q 455 1174 455 1138 "},"ń":{"x_min":118,"x_max":707,"ha":818,"o":"m 583 0 l 583 479 q 547 611 583 567 q 436 655 512 655 q 343 637 381 655 q 283 585 306 620 q 251 501 261 551 q 241 385 241 450 l 241 0 l 118 0 l 118 745 l 218 745 l 236 644 l 242 644 q 283 694 259 673 q 334 730 306 715 q 393 751 362 744 q 457 758 424 758 q 644 693 581 758 q 707 486 707 628 l 707 0 l 583 0 m 342 860 q 372 905 356 879 q 404 958 388 931 q 435 1013 420 986 q 460 1064 449 1040 l 609 1064 l 609 1049 q 576 1004 598 1031 q 529 946 555 976 q 475 889 503 917 q 424 842 447 860 l 342 842 l 342 860 "}," ":{"x_min":0,"x_max":0,"ha":347},"Г":{"x_min":135,"x_max":649,"ha":682,"o":"m 649 992 l 649 880 l 261 880 l 261 0 l 135 0 l 135 992 l 649 992 "},"Ь":{"x_min":135,"x_max":729,"ha":800,"o":"m 729 290 q 708 170 729 224 q 645 79 688 117 q 537 20 602 41 q 380 0 471 0 l 135 0 l 135 992 l 261 992 l 261 574 l 362 574 q 536 551 465 574 q 648 490 606 529 q 710 400 691 452 q 729 290 729 349 m 261 107 l 368 107 q 540 152 485 107 q 595 290 595 197 q 579 370 595 337 q 533 424 564 403 q 456 453 503 444 q 347 462 410 462 l 261 462 l 261 107 "},"¤":{"x_min":83.640625,"x_max":680.03125,"ha":765,"o":"m 126 490 q 137 566 126 530 q 170 634 149 602 l 83 721 l 149 788 l 235 700 q 304 734 267 722 q 381 747 341 747 q 458 734 422 747 q 526 700 495 722 l 613 788 l 680 723 l 592 635 q 626 567 613 604 q 639 490 639 530 q 627 412 639 449 q 592 344 615 375 l 678 258 l 613 193 l 526 279 q 458 246 495 258 q 381 235 422 235 q 303 247 341 235 q 235 281 266 259 l 149 195 l 85 259 l 170 345 q 137 412 149 376 q 126 490 126 449 m 227 489 q 239 426 227 455 q 273 375 252 397 q 323 340 295 353 q 385 327 352 327 q 448 340 419 327 q 499 375 478 353 q 534 426 521 397 q 546 489 546 455 q 534 554 546 524 q 499 606 521 584 q 448 641 478 628 q 385 654 419 654 q 323 641 352 654 q 273 606 295 628 q 239 554 252 584 q 227 489 227 524 "},"Ĝ":{"x_min":85,"x_max":858,"ha":958,"o":"m 530 524 l 858 524 l 858 36 q 782 15 820 24 q 704 0 744 5 q 620 -10 664 -7 q 526 -14 576 -14 q 337 21 419 -14 q 199 123 255 57 q 114 284 143 189 q 85 497 85 378 q 117 708 85 613 q 211 868 149 802 q 363 970 272 934 q 569 1006 453 1006 q 713 991 644 1006 q 842 947 782 976 l 793 837 q 741 859 769 849 q 683 877 713 869 q 621 890 653 885 q 559 894 590 894 q 412 867 476 894 q 306 788 349 839 q 240 662 263 736 q 218 496 218 588 q 237 334 218 407 q 296 208 255 261 q 401 126 336 155 q 556 97 465 97 q 610 98 585 97 q 656 103 635 100 q 695 109 677 106 q 731 116 714 113 l 731 412 l 530 412 l 530 524 m 771 1071 l 689 1071 q 617 1126 654 1093 q 546 1196 581 1159 q 473 1126 509 1159 q 403 1071 437 1093 l 321 1071 l 321 1089 q 361 1134 338 1108 q 407 1187 384 1160 q 450 1242 430 1215 q 480 1293 470 1269 l 611 1293 q 641 1242 621 1269 q 684 1187 661 1215 q 730 1134 707 1160 q 771 1089 754 1108 l 771 1071 "},"p":{"x_min":118,"x_max":737,"ha":814,"o":"m 454 -14 q 381 -5 414 -14 q 323 18 349 3 q 277 52 297 32 q 241 93 257 72 l 233 93 q 237 49 235 70 q 240 13 238 32 q 241 -16 241 -5 l 241 -334 l 118 -334 l 118 745 l 218 745 l 236 644 l 241 644 q 276 688 257 667 q 322 724 296 709 q 381 748 348 739 q 454 758 413 758 q 570 733 518 758 q 659 660 622 709 q 716 540 696 612 q 737 373 737 468 q 716 205 737 277 q 659 84 696 133 q 570 10 622 35 q 454 -14 518 -14 m 430 655 q 343 639 379 655 q 285 592 307 624 q 253 513 263 560 q 241 401 242 465 l 241 373 q 250 251 241 304 q 281 162 259 198 q 340 107 303 125 q 431 88 377 88 q 566 162 523 88 q 609 374 609 236 q 566 585 609 515 q 430 655 523 655 "},"Ю":{"x_min":135,"x_max":1323,"ha":1409,"o":"m 1323 496 q 1296 287 1323 382 q 1216 126 1269 193 q 1086 22 1164 59 q 906 -14 1008 -14 q 728 19 804 -14 q 600 116 651 53 q 521 266 548 178 q 490 462 494 354 l 261 462 l 261 0 l 135 0 l 135 992 l 261 992 l 261 574 l 493 574 q 529 752 500 672 q 609 889 558 832 q 735 976 661 946 q 908 1007 809 1007 q 1087 970 1009 1007 q 1217 867 1164 934 q 1296 706 1269 800 q 1323 496 1323 612 m 626 497 q 643 330 626 404 q 694 204 659 255 q 782 124 729 152 q 908 97 835 97 q 1035 124 981 97 q 1122 204 1088 152 q 1173 330 1156 255 q 1189 497 1189 404 q 1173 664 1189 590 q 1122 789 1156 738 q 1035 868 1088 840 q 909 895 982 895 q 782 868 836 895 q 694 789 729 840 q 643 664 659 738 q 626 497 626 590 "},"ο":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 702 208 725 280 q 637 86 679 135 q 534 11 594 37 q 398 -14 474 -14 q 270 11 329 -14 q 168 86 211 37 q 101 208 125 135 q 77 373 77 280 q 99 537 77 465 q 164 657 122 608 q 267 732 206 707 q 403 758 327 758 q 531 732 472 758 q 633 657 590 707 q 700 537 676 608 q 725 373 725 465 m 204 373 q 250 159 204 231 q 401 88 297 88 q 551 159 506 88 q 597 373 597 231 q 551 585 597 515 q 400 655 504 655 q 250 585 295 655 q 204 373 204 515 "},"S":{"x_min":70.109375,"x_max":657,"ha":721,"o":"m 657 264 q 633 147 657 199 q 566 59 610 95 q 460 4 523 23 q 320 -14 398 -14 q 179 -2 245 -14 q 70 32 114 9 l 70 153 q 122 131 93 142 q 184 112 151 120 q 251 99 216 104 q 319 93 285 93 q 479 134 427 93 q 530 252 530 176 q 521 316 530 289 q 486 366 511 343 q 420 410 461 389 q 316 456 379 431 q 212 508 256 480 q 139 572 168 537 q 96 652 110 607 q 83 754 83 697 q 104 860 83 813 q 165 939 126 907 q 259 989 205 972 q 380 1006 314 1006 q 525 990 460 1006 q 640 951 589 975 l 595 845 q 495 880 551 865 q 381 894 440 894 q 254 856 299 894 q 209 752 209 818 q 219 686 209 714 q 252 635 229 657 q 315 592 276 612 q 410 549 353 572 q 517 499 471 525 q 594 441 563 473 q 641 366 625 408 q 657 264 657 323 "},"/":{"x_min":13.75,"x_max":504.015625,"ha":518,"o":"m 504 992 l 135 0 l 13 0 l 383 992 l 504 992 "},"Ŧ":{"x_min":14,"x_max":706,"ha":721,"o":"m 297 556 l 297 880 l 14 880 l 14 992 l 706 992 l 706 880 l 423 880 l 423 556 l 623 556 l 623 448 l 423 448 l 423 0 l 297 0 l 297 448 l 95 448 l 95 556 l 297 556 "},"ђ":{"x_min":12.1875,"x_max":707,"ha":818,"o":"m 510 -334 q 456 -329 477 -334 q 419 -317 435 -324 l 419 -217 q 455 -227 437 -224 q 497 -231 473 -231 q 531 -226 515 -231 q 558 -208 546 -221 q 577 -172 570 -194 q 583 -116 583 -150 l 583 451 q 547 583 583 539 q 436 627 512 627 q 343 609 381 627 q 283 557 306 592 q 251 473 261 523 q 241 357 241 422 l 241 0 l 118 0 l 118 843 l 12 843 l 12 932 l 118 932 l 118 1055 l 241 1055 l 241 932 l 498 932 l 498 843 l 241 843 l 241 715 l 236 616 l 242 616 q 283 666 259 645 q 334 702 306 687 q 393 723 362 716 q 457 730 424 730 q 644 665 581 730 q 707 458 707 600 l 707 -107 q 695 -201 707 -159 q 659 -272 683 -243 q 598 -318 635 -302 q 510 -334 561 -334 "},"y":{"x_min":6.75,"x_max":672.25,"ha":679,"o":"m 6 745 l 134 745 l 280 329 q 300 272 290 301 q 318 212 310 242 q 333 154 327 182 q 341 103 339 126 l 346 103 q 356 149 349 120 q 373 211 364 178 q 392 276 382 244 q 409 330 402 308 l 544 745 l 672 745 l 377 -96 q 336 -195 358 -152 q 285 -270 314 -239 q 217 -317 256 -300 q 123 -334 177 -334 q 62 -330 88 -334 q 18 -322 36 -326 l 18 -223 q 54 -229 32 -226 q 99 -231 75 -231 q 156 -223 132 -231 q 197 -201 179 -216 q 227 -164 215 -186 q 250 -115 240 -142 l 289 -6 l 6 745 "},"Π":{"x_min":135,"x_max":826,"ha":960,"o":"m 826 0 l 699 0 l 699 880 l 261 880 l 261 0 l 135 0 l 135 992 l 826 992 l 826 0 "},"‗":{"x_min":-3,"x_max":574,"ha":571,"o":"m 574 -314 l -3 -314 l -3 -219 l 574 -219 l 574 -314 m 574 -125 l -3 -125 l -3 -31 l 574 -31 l 574 -125 "},"–":{"x_min":56,"x_max":639,"ha":695,"o":"m 56 315 l 56 429 l 639 429 l 639 315 l 56 315 "},"ë":{"x_min":77,"x_max":673,"ha":743,"o":"m 412 -14 q 276 11 337 -14 q 170 84 214 36 q 101 203 125 132 q 77 366 77 274 q 99 531 77 458 q 162 654 121 604 q 259 731 202 705 q 384 758 316 758 q 505 733 451 758 q 595 665 558 709 q 653 560 633 621 q 673 423 673 498 l 673 346 l 204 346 q 259 155 207 216 q 413 93 311 93 q 477 97 448 93 q 534 107 507 100 q 587 123 561 113 q 639 145 613 133 l 639 35 q 586 13 612 22 q 533 -2 560 3 q 476 -11 505 -8 q 412 -14 446 -14 m 384 655 q 260 602 306 655 q 207 449 214 549 l 545 449 q 536 533 545 495 q 507 598 526 571 q 457 640 487 625 q 384 655 427 655 m 183 945 q 201 998 183 982 q 248 1015 220 1015 q 294 998 274 1015 q 313 945 313 981 q 294 892 313 909 q 248 876 274 876 q 201 892 220 876 q 183 945 183 909 m 437 945 q 456 998 437 982 q 502 1015 475 1015 q 527 1010 515 1015 q 548 998 539 1006 q 562 977 557 989 q 568 945 568 964 q 548 892 568 909 q 502 876 528 876 q 456 892 475 876 q 437 945 437 909 "},"б":{"x_min":79,"x_max":716,"ha":791,"o":"m 79 446 q 95 664 79 569 q 147 828 112 759 q 237 940 182 897 q 369 999 292 982 q 535 1034 453 1018 q 686 1065 617 1051 l 709 957 q 633 944 675 951 q 549 928 592 936 q 467 912 507 920 q 398 897 428 904 q 322 865 356 887 q 264 804 288 843 q 225 710 239 766 q 209 577 211 654 l 218 577 q 251 617 230 597 q 300 654 272 638 q 365 682 329 671 q 445 693 401 693 q 562 668 512 693 q 647 599 613 643 q 699 493 682 554 q 716 359 716 432 q 692 196 716 266 q 627 79 669 126 q 526 9 585 32 q 396 -14 467 -14 q 265 16 324 -14 q 165 105 207 46 q 101 249 123 163 q 79 446 79 335 m 406 88 q 481 101 447 88 q 538 144 514 114 q 575 223 562 174 q 588 343 588 271 q 579 445 588 400 q 550 523 570 491 q 500 573 531 555 q 425 590 469 590 q 347 574 383 590 q 282 534 311 557 q 234 486 254 511 q 206 444 215 462 q 215 312 206 376 q 245 198 223 248 q 306 118 268 148 q 406 88 345 88 "},"ƒ":{"x_min":138,"x_max":679,"ha":765,"o":"m 444 552 l 444 -89 q 429 -207 444 -160 q 385 -282 413 -254 q 314 -322 356 -310 q 220 -334 272 -334 q 177 -330 198 -334 q 138 -323 156 -327 l 138 -219 q 174 -228 155 -224 q 215 -231 194 -231 q 262 -225 242 -231 q 295 -202 282 -218 q 314 -159 308 -187 q 321 -88 321 -131 l 321 552 l 189 552 l 189 610 l 321 664 l 321 757 q 336 877 321 829 q 380 953 351 925 q 451 994 409 982 q 546 1006 493 1006 q 619 998 586 1006 q 679 980 653 990 l 647 884 q 601 897 626 892 q 550 903 577 903 q 503 897 523 903 q 470 874 483 890 q 450 830 457 858 q 444 758 444 802 l 444 660 l 611 660 l 611 552 l 444 552 "},"у":{"x_min":6.75,"x_max":672.25,"ha":679,"o":"m 6 745 l 134 745 l 280 329 q 300 272 290 301 q 318 212 310 242 q 333 154 327 182 q 341 103 339 126 l 346 103 q 356 149 349 120 q 373 211 364 178 q 392 276 382 244 q 409 330 402 308 l 544 745 l 672 745 l 377 -96 q 336 -195 358 -152 q 285 -270 314 -239 q 217 -317 256 -300 q 123 -334 177 -334 q 62 -330 88 -334 q 18 -322 36 -326 l 18 -223 q 54 -229 32 -226 q 99 -231 75 -231 q 156 -223 132 -231 q 197 -201 179 -216 q 227 -164 215 -186 q 250 -115 240 -142 l 289 -6 l 6 745 "},"J":{"x_min":-125,"x_max":251.15625,"ha":376,"o":"m -19 -264 q -80 -259 -54 -264 q -125 -247 -106 -255 l -125 -139 q -75 -149 -101 -145 q -18 -152 -48 -152 q 32 -146 6 -152 q 78 -122 57 -139 q 112 -76 99 -105 q 125 0 125 -46 l 125 992 l 251 992 l 251 13 q 231 -109 251 -57 q 175 -196 211 -162 q 90 -247 140 -230 q -19 -264 40 -264 "},"ŷ":{"x_min":6.75,"x_max":672.25,"ha":679,"o":"m 6 745 l 134 745 l 280 329 q 300 272 290 301 q 318 212 310 242 q 333 154 327 182 q 341 103 339 126 l 346 103 q 356 149 349 120 q 373 211 364 178 q 392 276 382 244 q 409 330 402 308 l 544 745 l 672 745 l 377 -96 q 336 -195 358 -152 q 285 -270 314 -239 q 217 -317 256 -300 q 123 -334 177 -334 q 62 -330 88 -334 q 18 -322 36 -326 l 18 -223 q 54 -229 32 -226 q 99 -231 75 -231 q 156 -223 132 -231 q 197 -201 179 -216 q 227 -164 215 -186 q 250 -115 240 -142 l 289 -6 l 6 745 m 566 842 l 484 842 q 412 897 449 864 q 341 967 376 930 q 268 897 304 930 q 198 842 232 864 l 116 842 l 116 860 q 156 905 133 879 q 202 958 179 931 q 245 1013 225 986 q 275 1064 265 1040 l 406 1064 q 436 1013 416 1040 q 479 958 456 986 q 525 905 502 931 q 566 860 549 879 l 566 842 "},"ŕ":{"x_min":118,"x_max":526,"ha":554,"o":"m 439 758 q 483 756 459 758 q 526 751 508 754 l 509 637 q 470 643 490 640 q 433 645 450 645 q 355 628 390 645 q 294 578 320 610 q 255 501 269 546 q 241 401 241 456 l 241 0 l 118 0 l 118 745 l 218 745 l 233 608 l 238 608 q 274 664 255 637 q 318 712 294 691 q 372 745 342 732 q 439 758 402 758 m 232 860 q 262 905 246 879 q 294 958 278 931 q 325 1013 310 986 q 350 1064 339 1040 l 499 1064 l 499 1049 q 466 1004 488 1031 q 419 946 445 976 q 365 889 393 917 q 314 842 337 860 l 232 842 l 232 860 "},"ώ":{"x_min":77,"x_max":970,"ha":1046,"o":"m 332 -14 q 223 13 271 -14 q 143 91 176 41 q 93 209 110 140 q 77 360 77 278 q 82 464 77 415 q 97 558 87 512 q 124 650 108 604 q 162 745 140 696 l 289 745 q 251 649 267 695 q 225 558 235 604 q 209 464 214 512 q 204 360 204 416 q 214 243 204 294 q 242 158 224 192 q 285 106 260 123 q 340 88 310 88 q 394 102 371 88 q 432 140 417 116 q 454 198 447 165 q 462 270 462 231 l 462 478 l 585 478 l 585 270 q 618 135 585 182 q 706 88 651 88 q 761 106 736 88 q 804 158 786 123 q 832 243 823 192 q 842 360 842 294 q 837 464 842 416 q 821 558 832 512 q 795 649 811 604 q 757 745 779 695 l 884 745 q 922 650 906 696 q 949 558 938 604 q 964 464 959 512 q 970 360 970 415 q 953 209 970 278 q 903 91 936 140 q 823 13 871 41 q 714 -14 775 -14 q 595 15 642 -14 q 527 106 548 45 l 520 106 q 452 15 499 45 q 332 -14 404 -14 m 474 860 q 487 906 480 880 q 500 960 494 932 q 512 1014 507 987 q 521 1064 518 1041 l 656 1064 l 656 1049 q 640 1007 651 1033 q 614 951 629 980 q 581 892 598 921 q 547 842 563 863 l 474 842 l 474 860 "},"˘":{"x_min":196,"x_max":604,"ha":802,"o":"m 604 1030 q 586 954 601 988 q 545 894 571 920 q 482 855 519 869 q 397 842 445 842 q 310 855 347 842 q 249 893 273 868 q 211 952 224 918 q 196 1030 198 987 l 270 1030 q 282 983 273 1000 q 308 957 292 965 q 347 946 324 948 q 400 943 370 943 q 446 946 424 943 q 486 959 468 949 q 515 985 503 968 q 529 1030 526 1002 l 604 1030 "},"D":{"x_min":135,"x_max":865,"ha":950,"o":"m 865 505 q 832 285 865 379 q 738 127 799 190 q 586 31 676 63 q 383 0 496 0 l 135 0 l 135 992 l 410 992 q 598 960 514 992 q 741 868 682 929 q 832 715 800 806 q 865 505 865 624 m 731 501 q 709 672 731 600 q 643 791 686 744 q 538 861 601 838 q 397 884 476 884 l 261 884 l 261 107 l 370 107 q 640 207 549 107 q 731 501 731 306 "},"ł":{"x_min":-7,"x_max":367,"ha":359,"o":"m 118 513 l 118 1055 l 241 1055 l 241 593 l 314 641 l 367 558 l 241 477 l 241 0 l 118 0 l 118 396 l 45 350 l -7 432 l 118 513 "},"ĺ":{"x_min":116,"x_max":383,"ha":359,"o":"m 241 0 l 118 0 l 118 1055 l 241 1055 l 241 0 m 116 1128 q 146 1173 130 1147 q 178 1226 162 1199 q 209 1281 194 1254 q 234 1332 223 1308 l 383 1332 l 383 1317 q 350 1272 372 1299 q 303 1214 329 1244 q 249 1157 277 1185 q 198 1110 221 1128 l 116 1110 l 116 1128 "},"ц":{"x_min":118,"x_max":815,"ha":836,"o":"m 815 -258 l 691 -258 l 691 0 l 118 0 l 118 745 l 241 745 l 241 102 l 582 102 l 582 745 l 706 745 l 706 102 l 815 102 l 815 -258 "},"Л":{"x_min":0,"x_max":794,"ha":929,"o":"m 794 0 l 667 0 l 667 880 l 432 880 q 411 721 421 804 q 389 558 400 638 q 367 406 378 478 q 344 279 355 334 q 311 154 330 209 q 263 61 291 99 q 195 4 234 24 q 99 -16 155 -16 q 46 -11 73 -16 q 0 0 20 -6 l 0 105 q 35 95 15 99 q 76 91 55 91 q 130 113 109 91 q 165 167 151 134 q 188 239 180 200 q 205 315 197 279 q 224 421 214 354 q 248 577 235 488 q 276 771 262 665 q 306 992 291 877 l 794 992 l 794 0 "},"$":{"x_min":83,"x_max":668,"ha":765,"o":"m 668 303 q 651 216 668 255 q 602 149 634 177 q 525 102 570 120 q 423 75 480 83 l 423 -81 l 330 -81 l 330 69 q 261 72 296 69 q 194 81 226 75 q 133 96 161 87 q 83 116 104 104 l 83 233 q 134 212 105 222 q 197 193 164 201 q 263 179 229 185 q 330 174 298 174 l 330 466 q 225 509 269 487 q 151 560 180 531 q 108 626 122 589 q 94 713 94 663 q 110 796 94 759 q 158 862 127 834 q 232 908 188 890 q 330 932 276 926 l 330 1054 l 423 1054 l 423 935 q 548 917 491 931 q 651 882 606 903 l 606 783 q 521 812 568 799 q 423 829 473 826 l 423 547 q 529 504 483 526 q 605 453 574 481 q 652 388 636 425 q 668 303 668 352 m 548 302 q 541 344 548 325 q 520 378 535 362 q 482 406 505 393 q 423 432 458 420 l 423 180 q 517 222 486 190 q 548 302 548 254 m 213 711 q 219 668 213 687 q 238 633 224 649 q 274 605 252 617 q 330 580 296 592 l 330 827 q 241 787 269 816 q 213 711 213 757 "},"w":{"x_min":13.75,"x_max":1022.25,"ha":1036,"o":"m 683 0 l 570 417 q 563 445 567 430 q 555 477 559 460 q 546 512 551 494 q 538 546 542 529 q 518 628 528 586 l 514 628 q 496 546 505 585 q 480 476 488 512 q 464 415 471 440 l 347 0 l 204 0 l 13 745 l 143 745 l 232 348 q 245 282 239 318 q 258 211 252 246 q 269 146 264 177 q 277 95 274 115 l 281 95 q 290 142 284 113 q 303 205 296 172 q 317 270 310 238 q 331 324 325 302 l 453 745 l 586 745 l 702 324 q 716 270 709 301 q 732 207 724 239 q 745 145 739 175 q 754 95 751 115 l 758 95 q 764 142 760 113 q 775 207 769 172 q 788 279 781 242 q 803 348 795 316 l 896 745 l 1022 745 l 829 0 l 683 0 "},"о":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 702 208 725 280 q 637 86 679 135 q 534 11 594 37 q 398 -14 474 -14 q 270 11 329 -14 q 168 86 211 37 q 101 208 125 135 q 77 373 77 280 q 99 537 77 465 q 164 657 122 608 q 267 732 206 707 q 403 758 327 758 q 531 732 472 758 q 633 657 590 707 q 700 537 676 608 q 725 373 725 465 m 204 373 q 250 159 204 231 q 401 88 297 88 q 551 159 506 88 q 597 373 597 231 q 551 585 597 515 q 400 655 504 655 q 250 585 295 655 q 204 373 204 515 "},"Д":{"x_min":10,"x_max":876,"ha":903,"o":"m 876 -261 l 749 -261 l 749 0 l 136 0 l 136 -261 l 10 -261 l 10 111 l 86 111 q 147 223 118 170 q 203 354 177 277 q 251 512 229 431 q 290 675 273 593 q 316 837 306 757 q 329 992 326 917 l 744 992 l 744 111 l 876 111 l 876 -261 m 617 111 l 617 880 l 455 880 q 440 766 452 829 q 413 634 429 703 q 374 494 396 565 q 326 355 352 423 q 273 224 301 286 q 216 111 245 162 l 617 111 "},"Ç":{"x_min":85,"x_max":798,"ha":838,"o":"m 538 894 q 406 867 465 894 q 305 788 347 839 q 241 662 264 736 q 218 496 218 588 q 238 326 218 400 q 298 200 258 251 q 398 123 338 150 q 538 97 458 97 q 652 108 598 97 q 760 135 707 120 l 760 26 q 707 8 733 15 q 651 -4 680 0 q 590 -11 622 -9 q 517 -14 557 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 497 85 382 q 114 703 85 609 q 201 864 144 796 q 343 968 258 931 q 538 1006 428 1006 q 677 991 611 1006 q 798 947 744 976 l 745 841 q 652 879 702 863 q 538 894 601 894 m 622 -194 q 574 -297 622 -260 q 424 -334 526 -334 q 394 -331 409 -334 q 369 -327 379 -329 l 369 -254 q 395 -257 379 -256 q 422 -258 412 -258 q 497 -247 470 -258 q 524 -208 524 -235 q 515 -186 524 -195 q 491 -169 506 -176 q 454 -157 476 -162 q 409 -147 433 -152 l 470 0 l 552 0 l 513 -78 q 556 -92 536 -83 q 590 -115 575 -101 q 613 -148 605 -128 q 622 -194 622 -168 "},"Ŝ":{"x_min":70.109375,"x_max":657,"ha":721,"o":"m 657 264 q 633 147 657 199 q 566 59 610 95 q 460 4 523 23 q 320 -14 398 -14 q 179 -2 245 -14 q 70 32 114 9 l 70 153 q 122 131 93 142 q 184 112 151 120 q 251 99 216 104 q 319 93 285 93 q 479 134 427 93 q 530 252 530 176 q 521 316 530 289 q 486 366 511 343 q 420 410 461 389 q 316 456 379 431 q 212 508 256 480 q 139 572 168 537 q 96 652 110 607 q 83 754 83 697 q 104 860 83 813 q 165 939 126 907 q 259 989 205 972 q 380 1006 314 1006 q 525 990 460 1006 q 640 951 589 975 l 595 845 q 495 880 551 865 q 381 894 440 894 q 254 856 299 894 q 209 752 209 818 q 219 686 209 714 q 252 635 229 657 q 315 592 276 612 q 410 549 353 572 q 517 499 471 525 q 594 441 563 473 q 641 366 625 408 q 657 264 657 323 m 612 1071 l 530 1071 q 458 1126 495 1093 q 387 1196 422 1159 q 314 1126 350 1159 q 244 1071 278 1093 l 162 1071 l 162 1089 q 202 1134 179 1108 q 248 1187 225 1160 q 291 1242 271 1215 q 321 1293 311 1269 l 452 1293 q 482 1242 462 1269 q 525 1187 502 1215 q 571 1134 548 1160 q 612 1089 595 1108 l 612 1071 "},"C":{"x_min":85,"x_max":798,"ha":838,"o":"m 538 894 q 406 867 465 894 q 305 788 347 839 q 241 662 264 736 q 218 496 218 588 q 238 326 218 400 q 298 200 258 251 q 398 123 338 150 q 538 97 458 97 q 652 108 598 97 q 760 135 707 120 l 760 26 q 707 8 733 15 q 651 -4 680 0 q 590 -11 622 -9 q 517 -14 557 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 497 85 382 q 114 703 85 609 q 201 864 144 796 q 343 968 258 931 q 538 1006 428 1006 q 677 991 611 1006 q 798 947 744 976 l 745 841 q 652 879 702 863 q 538 894 601 894 "},"Ḁ":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 m 576 -229 q 564 -291 576 -264 q 531 -338 552 -319 q 482 -367 510 -357 q 420 -377 453 -377 q 358 -367 386 -377 q 310 -338 330 -357 q 279 -292 290 -319 q 269 -231 269 -265 q 279 -169 269 -196 q 310 -123 290 -142 q 358 -94 330 -104 q 420 -85 386 -85 q 481 -94 453 -85 q 531 -123 510 -104 q 564 -168 552 -142 q 576 -229 576 -195 m 501 -231 q 479 -174 501 -194 q 422 -154 456 -154 q 365 -174 387 -154 q 343 -231 343 -194 q 363 -287 343 -267 q 422 -307 383 -307 q 479 -287 456 -307 q 501 -231 501 -267 "},"Ĵ":{"x_min":-125,"x_max":414,"ha":376,"o":"m -19 -264 q -80 -259 -54 -264 q -125 -247 -106 -255 l -125 -139 q -75 -149 -101 -145 q -18 -152 -48 -152 q 32 -146 6 -152 q 78 -122 57 -139 q 112 -76 99 -105 q 125 0 125 -46 l 125 992 l 251 992 l 251 13 q 231 -109 251 -57 q 175 -196 211 -162 q 90 -247 140 -230 q -19 -264 40 -264 m 414 1071 l 332 1071 q 260 1126 297 1093 q 189 1196 224 1159 q 116 1126 152 1159 q 46 1071 80 1093 l -36 1071 l -36 1089 q 4 1134 -18 1108 q 50 1187 27 1160 q 93 1242 73 1215 q 123 1293 113 1269 l 254 1293 q 284 1242 264 1269 q 327 1187 304 1215 q 373 1134 350 1160 q 414 1089 397 1108 l 414 1071 "},"È":{"x_min":135,"x_max":650,"ha":733,"o":"m 650 0 l 135 0 l 135 992 l 650 992 l 650 880 l 261 880 l 261 574 l 624 574 l 624 462 l 261 462 l 261 111 l 650 111 l 650 0 m 484 1071 l 402 1071 q 350 1118 378 1089 q 296 1175 322 1146 q 249 1233 270 1205 q 217 1278 227 1260 l 217 1293 l 365 1293 q 391 1242 376 1269 q 421 1187 405 1215 q 453 1134 437 1160 q 484 1089 469 1108 l 484 1071 "},"fi":{"x_min":19,"x_max":709.96875,"ha":817,"o":"m 441 656 l 274 656 l 274 0 l 151 0 l 151 656 l 19 656 l 19 704 l 151 749 l 151 814 q 166 934 151 886 q 210 1010 181 982 q 280 1051 238 1039 q 375 1063 322 1063 q 449 1055 415 1063 q 509 1037 482 1047 l 477 941 q 431 954 456 949 q 379 960 406 960 q 332 954 352 960 q 300 931 313 947 q 280 887 287 915 q 274 815 274 859 l 274 745 l 441 745 l 441 656 m 698 0 l 575 0 l 575 745 l 698 745 l 698 0 m 565 945 q 586 1004 565 986 q 637 1023 606 1023 q 665 1018 652 1023 q 688 1004 678 1014 q 704 980 698 995 q 709 945 709 966 q 688 887 709 906 q 637 868 667 868 q 586 886 606 868 q 565 945 565 905 "},"X":{"x_min":-0.25,"x_max":760.25,"ha":760,"o":"m 760 0 l 617 0 l 376 430 l 127 0 l 0 0 l 307 518 l 20 992 l 155 992 l 380 612 l 608 992 l 737 992 l 450 522 l 760 0 "},"ô":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 702 208 725 280 q 637 86 679 135 q 534 11 594 37 q 398 -14 474 -14 q 270 11 329 -14 q 168 86 211 37 q 101 208 125 135 q 77 373 77 280 q 99 537 77 465 q 164 657 122 608 q 267 732 206 707 q 403 758 327 758 q 531 732 472 758 q 633 657 590 707 q 700 537 676 608 q 725 373 725 465 m 204 373 q 250 159 204 231 q 401 88 297 88 q 551 159 506 88 q 597 373 597 231 q 551 585 597 515 q 400 655 504 655 q 250 585 295 655 q 204 373 204 515 m 622 842 l 540 842 q 468 897 505 864 q 397 967 432 930 q 324 897 360 930 q 254 842 288 864 l 172 842 l 172 860 q 212 905 189 879 q 258 958 235 931 q 301 1013 281 986 q 331 1064 321 1040 l 462 1064 q 492 1013 472 1040 q 535 958 512 986 q 581 905 558 931 q 622 860 605 879 l 622 842 "},"Ė":{"x_min":135,"x_max":650,"ha":733,"o":"m 650 0 l 135 0 l 135 992 l 650 992 l 650 880 l 261 880 l 261 574 l 624 574 l 624 462 l 261 462 l 261 111 l 650 111 l 650 0 m 325 1155 q 345 1214 325 1196 q 396 1233 366 1233 q 425 1228 411 1233 q 448 1214 438 1224 q 463 1190 457 1205 q 469 1155 469 1176 q 448 1097 469 1116 q 396 1078 426 1078 q 345 1096 366 1078 q 325 1155 325 1115 "},"г":{"x_min":118,"x_max":527,"ha":555,"o":"m 527 642 l 241 642 l 241 0 l 118 0 l 118 745 l 527 745 l 527 642 "},"Ŀ":{"x_min":135,"x_max":649.4375,"ha":682,"o":"m 135 0 l 135 992 l 261 992 l 261 111 l 649 111 l 649 0 l 135 0 m 436 493 q 456 552 436 534 q 507 571 477 571 q 536 566 522 571 q 559 552 549 562 q 574 528 568 543 q 580 493 580 514 q 559 435 580 454 q 507 416 537 416 q 456 434 477 416 q 436 493 436 453 "},"х":{"x_min":24,"x_max":670,"ha":695,"o":"m 276 382 l 38 745 l 178 745 l 347 466 l 517 745 l 658 745 l 416 382 l 670 0 l 529 0 l 347 295 l 164 0 l 24 0 l 276 382 "},"ŋ":{"x_min":118,"x_max":706.34375,"ha":818,"o":"m 508 -334 q 454 -329 476 -334 q 418 -317 433 -324 l 418 -217 q 453 -227 435 -224 q 495 -231 472 -231 q 529 -226 513 -231 q 556 -208 545 -221 q 575 -172 568 -194 q 581 -116 581 -150 l 582 479 q 547 611 582 567 q 435 655 511 655 q 343 637 381 655 q 283 585 306 620 q 251 501 261 551 q 241 385 241 450 l 241 0 l 118 0 l 118 745 l 218 745 l 236 644 l 242 644 q 283 694 259 673 q 334 730 306 715 q 393 751 362 744 q 456 758 424 758 q 643 693 580 758 q 706 486 706 628 l 705 -107 q 693 -201 705 -159 q 657 -272 681 -243 q 596 -318 633 -302 q 508 -334 559 -334 "},"Ч":{"x_min":113,"x_max":782,"ha":917,"o":"m 782 0 l 655 0 l 655 406 q 511 360 577 376 q 379 345 445 345 q 266 361 316 345 q 183 410 217 378 q 130 489 148 442 q 113 596 113 536 l 113 992 l 239 992 l 239 612 q 274 495 239 534 q 393 456 310 456 q 517 469 454 456 q 655 510 579 483 l 655 992 l 782 992 l 782 0 "},"ü":{"x_min":111,"x_max":700,"ha":818,"o":"m 600 0 l 582 99 l 575 99 q 534 48 558 70 q 483 13 511 27 q 424 -7 455 0 q 360 -14 393 -14 q 252 1 299 -14 q 174 50 205 17 q 126 135 142 83 q 111 258 111 186 l 111 745 l 234 745 l 234 264 q 270 132 234 176 q 381 88 306 88 q 474 106 436 88 q 534 158 511 123 q 566 242 556 192 q 576 357 576 292 l 576 745 l 700 745 l 700 0 l 600 0 m 210 945 q 228 998 210 982 q 275 1015 247 1015 q 321 998 301 1015 q 340 945 340 981 q 321 892 340 909 q 275 876 301 876 q 228 892 247 876 q 210 945 210 909 m 464 945 q 483 998 464 982 q 529 1015 502 1015 q 554 1010 542 1015 q 575 998 566 1006 q 589 977 584 989 q 595 945 595 964 q 575 892 595 909 q 529 876 555 876 q 483 892 502 876 q 464 945 464 909 "},"ь":{"x_min":118,"x_max":711,"ha":787,"o":"m 241 439 l 429 439 q 641 386 572 439 q 711 227 711 333 q 695 133 711 175 q 644 61 679 91 q 556 15 610 31 q 426 0 502 0 l 118 0 l 118 745 l 241 745 l 241 439 m 241 336 l 241 102 l 416 102 q 485 108 454 102 q 539 127 516 113 q 574 164 561 141 q 587 219 587 186 q 576 275 587 252 q 543 311 565 297 q 489 330 521 325 q 413 336 456 336 l 241 336 "},"Ÿ":{"x_min":-0.25,"x_max":731.25,"ha":732,"o":"m 364 490 l 595 992 l 731 992 l 428 386 l 428 0 l 302 0 l 302 379 l 0 992 l 137 992 l 364 490 m 174 1174 q 192 1227 174 1211 q 239 1244 211 1244 q 285 1227 265 1244 q 304 1174 304 1210 q 285 1121 304 1138 q 239 1105 265 1105 q 192 1121 211 1105 q 174 1174 174 1138 m 428 1174 q 447 1227 428 1211 q 493 1244 466 1244 q 518 1239 506 1244 q 539 1227 530 1235 q 553 1206 548 1218 q 559 1174 559 1193 q 539 1121 559 1138 q 493 1105 519 1105 q 447 1121 466 1105 q 428 1174 428 1138 "},"€":{"x_min":42.984375,"x_max":744.875,"ha":765,"o":"m 526 893 q 440 875 480 893 q 368 825 400 858 q 313 743 336 791 q 279 634 291 695 l 571 634 l 571 526 l 268 526 q 268 509 268 517 q 267 494 267 502 q 267 481 267 487 q 267 458 267 470 q 268 434 267 446 l 529 434 l 529 326 l 281 326 q 367 155 304 214 q 530 97 429 97 q 627 107 581 97 q 713 135 673 118 l 713 26 q 627 -3 672 7 q 521 -14 582 -14 q 381 9 443 -14 q 273 77 319 33 q 198 184 228 121 q 154 326 168 247 l 42 326 l 42 434 l 143 434 q 142 456 142 447 q 142 481 142 464 q 142 508 142 494 q 143 526 143 521 l 42 526 l 42 634 l 151 634 q 193 787 163 718 q 269 904 223 855 q 377 979 314 953 q 517 1006 439 1006 q 637 991 582 1006 q 744 943 691 976 l 690 844 q 615 879 656 865 q 526 893 575 893 "},"в":{"x_min":118,"x_max":711,"ha":787,"o":"m 687 557 q 645 447 687 486 q 531 395 603 407 l 531 390 q 602 373 569 385 q 659 340 635 361 q 697 289 683 320 q 711 215 711 258 q 695 130 711 169 q 644 61 679 91 q 556 16 610 32 q 426 0 502 0 l 118 0 l 118 745 l 424 745 q 529 735 481 745 q 612 704 577 726 q 667 646 647 682 q 687 557 687 610 m 587 224 q 543 312 587 287 q 413 336 500 336 l 241 336 l 241 102 l 416 102 q 485 108 454 102 q 539 128 516 114 q 574 166 561 143 q 587 224 587 190 m 570 545 q 533 620 570 598 q 422 642 496 642 l 241 642 l 241 439 l 401 439 q 475 444 443 439 q 527 461 506 449 q 559 494 549 473 q 570 545 570 515 "},"Η":{"x_min":135,"x_max":839,"ha":974,"o":"m 839 0 l 712 0 l 712 462 l 261 462 l 261 0 l 135 0 l 135 992 l 261 992 l 261 574 l 712 574 l 712 992 l 839 992 l 839 0 "},"С":{"x_min":85,"x_max":798,"ha":838,"o":"m 538 894 q 406 867 465 894 q 305 788 347 839 q 241 662 264 736 q 218 496 218 588 q 238 326 218 400 q 298 200 258 251 q 398 123 338 150 q 538 97 458 97 q 652 108 598 97 q 760 135 707 120 l 760 26 q 707 8 733 15 q 651 -4 680 0 q 590 -11 622 -9 q 517 -14 557 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 497 85 382 q 114 703 85 609 q 201 864 144 796 q 343 968 258 931 q 538 1006 428 1006 q 677 991 611 1006 q 798 947 744 976 l 745 841 q 652 879 702 863 q 538 894 601 894 "},"ß":{"x_min":118,"x_max":774,"ha":836,"o":"m 685 854 q 670 785 685 815 q 633 730 655 755 q 586 685 612 706 q 538 646 560 665 q 502 609 517 627 q 487 570 487 591 q 492 545 487 556 q 510 521 497 534 q 547 491 523 507 q 610 448 571 474 q 679 399 649 423 q 730 347 709 374 q 762 286 751 319 q 774 211 774 254 q 755 110 774 152 q 701 39 736 67 q 619 0 667 12 q 514 -14 571 -14 q 401 -2 448 -14 q 318 32 353 9 l 318 145 q 357 124 335 134 q 404 106 379 114 q 454 93 428 98 q 505 88 480 88 q 571 96 543 88 q 616 120 598 105 q 642 156 634 135 q 650 205 650 178 q 644 249 650 229 q 624 288 639 269 q 585 327 609 307 q 522 370 560 347 q 450 421 479 397 q 403 466 422 444 q 378 513 385 489 q 371 565 371 537 q 385 629 371 602 q 420 677 399 655 q 466 716 441 698 q 512 754 490 735 q 547 797 533 774 q 561 849 561 820 q 550 899 561 878 q 518 933 539 920 q 469 954 498 947 q 406 960 441 960 q 343 954 373 960 q 290 931 313 947 q 254 887 268 915 q 241 814 241 858 l 241 0 l 118 0 l 118 814 q 139 932 118 884 q 199 1009 160 980 q 290 1050 237 1037 q 405 1063 343 1063 q 519 1050 467 1063 q 607 1011 571 1037 q 664 946 644 985 q 685 854 685 906 "},"њ":{"x_min":118,"x_max":1121,"ha":1197,"o":"m 241 745 l 241 437 l 554 437 l 554 745 l 677 745 l 677 439 l 837 439 q 1051 386 982 439 q 1121 228 1121 333 q 1105 133 1121 176 q 1054 61 1089 91 q 966 15 1020 31 q 835 0 912 0 l 554 0 l 554 334 l 241 334 l 241 0 l 118 0 l 118 745 l 241 745 m 997 220 q 986 276 997 253 q 953 312 975 298 q 898 332 931 326 q 823 337 865 337 l 677 337 l 677 102 l 826 102 q 894 108 863 102 q 948 128 925 114 q 984 164 971 142 q 997 220 997 187 "},"Ű":{"x_min":125,"x_max":845,"ha":970,"o":"m 845 993 l 845 349 q 822 205 845 272 q 755 90 800 139 q 641 13 709 41 q 481 -14 573 -14 q 327 12 394 -14 q 216 86 261 38 q 148 202 171 134 q 125 352 125 269 l 125 991 l 251 991 l 251 346 q 309 162 251 227 q 487 97 368 97 q 591 115 548 97 q 663 167 635 133 q 704 246 690 200 q 718 347 718 292 l 718 993 l 845 993 m 273 1089 q 303 1134 287 1108 q 335 1187 319 1160 q 365 1242 351 1215 q 391 1293 380 1269 l 526 1293 l 526 1278 q 493 1233 515 1260 q 446 1175 472 1205 q 392 1118 420 1146 q 341 1071 365 1089 l 273 1071 l 273 1089 m 519 1089 q 549 1134 533 1108 q 581 1187 565 1160 q 611 1242 597 1215 q 636 1293 626 1269 l 771 1293 l 771 1278 q 738 1233 760 1260 q 691 1175 717 1205 q 637 1118 665 1146 q 586 1071 610 1089 l 519 1071 l 519 1089 "},"c":{"x_min":77,"x_max":596,"ha":643,"o":"m 402 -14 q 274 7 334 -14 q 171 75 215 28 q 102 193 127 121 q 77 367 77 266 q 102 548 77 474 q 173 669 128 623 q 278 736 218 715 q 408 758 339 758 q 511 746 461 758 q 596 718 562 735 l 559 614 q 524 627 543 621 q 485 638 505 633 q 445 647 465 644 q 408 650 425 650 q 253 581 302 650 q 204 369 204 513 q 253 160 204 226 q 402 93 302 93 q 502 106 457 93 q 583 135 546 118 l 583 26 q 504 -3 546 6 q 402 -14 463 -14 "},"¶":{"x_min":77,"x_max":764,"ha":910,"o":"m 764 -176 l 682 -176 l 682 947 l 541 947 l 541 -176 l 460 -176 l 460 379 q 361 366 418 366 q 244 384 296 366 q 154 441 191 401 q 97 546 117 481 q 77 706 77 611 q 99 872 77 806 q 161 980 121 939 q 258 1038 201 1021 q 382 1055 314 1055 l 764 1055 l 764 -176 "},"Ή":{"x_min":-17,"x_max":922,"ha":1057,"o":"m 922 0 l 795 0 l 795 462 l 344 462 l 344 0 l 218 0 l 218 992 l 344 992 l 344 574 l 795 574 l 795 992 l 922 992 l 922 0 m -17 789 q -3 835 -10 809 q 9 889 3 861 q 21 943 16 916 q 30 993 27 970 l 165 993 l 165 978 q 149 936 160 962 q 123 880 138 909 q 90 821 107 850 q 56 771 72 792 l -17 771 l -17 789 "},"Ὅ":{"x_min":-203,"x_max":1001,"ha":1087,"o":"m 1001 496 q 973 287 1001 382 q 891 126 946 193 q 757 22 837 59 q 571 -14 676 -14 q 380 22 461 -14 q 245 126 299 59 q 166 288 192 193 q 141 498 141 382 q 166 707 141 613 q 246 867 192 801 q 381 970 299 934 q 573 1007 462 1007 q 757 970 678 1007 q 891 867 837 934 q 973 706 946 800 q 1001 496 1001 612 m 274 497 q 292 330 274 404 q 346 204 309 255 q 438 124 382 152 q 571 97 494 97 q 704 124 649 97 q 797 204 760 152 q 850 330 833 255 q 867 497 867 404 q 850 664 867 590 q 797 789 833 738 q 705 868 761 840 q 573 895 650 895 q 439 868 495 895 q 346 789 383 840 q 292 664 309 738 q 274 497 274 590 m -10 787 q 5 833 -2 807 q 22 885 14 858 q 38 939 30 911 q 50 991 45 966 l 191 991 l 191 977 q 162 929 178 955 q 127 876 146 903 q 87 822 108 849 q 45 770 66 795 l -10 770 l -10 787 m -203 851 q -162 942 -203 904 q -38 1003 -121 981 l -38 951 q -98 920 -79 936 q -118 889 -118 905 q -107 870 -118 876 q -84 858 -97 864 q -61 844 -72 853 q -51 816 -51 835 q -67 778 -51 791 q -116 765 -84 765 q -179 788 -156 765 q -203 851 -203 812 "},"γ":{"x_min":6.75,"x_max":672.25,"ha":679,"o":"m 412 12 q 385 -76 397 -30 q 365 -167 373 -122 q 352 -255 356 -213 q 348 -334 348 -298 l 220 -334 q 225 -264 220 -305 q 240 -176 230 -223 q 262 -82 249 -130 q 289 8 274 -34 l 6 745 l 134 745 l 282 349 q 301 291 291 322 q 320 229 312 259 q 336 171 329 198 q 346 126 343 144 l 350 126 q 360 171 353 143 q 375 230 367 199 q 393 292 383 262 q 409 345 402 323 l 544 745 l 672 745 l 412 12 "},"­":{"x_min":56,"x_max":392,"ha":447,"o":"m 56 315 l 56 429 l 392 429 l 392 315 l 56 315 "},":":{"x_min":100,"x_max":272,"ha":372,"o":"m 100 74 q 106 118 100 100 q 125 147 113 136 q 152 163 136 158 q 186 169 167 169 q 219 163 203 169 q 246 147 235 158 q 265 118 258 136 q 272 74 272 100 q 265 31 272 49 q 246 2 258 13 q 219 -14 235 -9 q 186 -20 203 -20 q 152 -14 167 -20 q 125 2 136 -9 q 106 31 113 13 q 100 74 100 49 m 100 669 q 106 714 100 696 q 125 743 113 732 q 152 759 136 754 q 186 764 167 764 q 219 759 203 764 q 246 743 235 754 q 265 714 258 732 q 272 669 272 696 q 265 626 272 644 q 246 597 258 609 q 219 580 235 585 q 186 575 203 575 q 152 580 167 575 q 125 597 136 585 q 106 626 113 609 q 100 669 100 644 "},"ś":{"x_min":61.15625,"x_max":564,"ha":627,"o":"m 564 203 q 544 108 564 149 q 487 40 524 68 q 398 0 450 13 q 281 -14 346 -14 q 154 -2 207 -14 q 61 33 101 9 l 61 146 q 107 125 82 135 q 161 106 133 114 q 219 93 189 98 q 279 88 249 88 q 353 95 323 88 q 403 116 384 103 q 431 150 423 130 q 440 194 440 170 q 433 232 440 215 q 409 265 427 249 q 360 299 391 282 q 280 337 329 316 q 193 378 232 358 q 127 424 154 399 q 86 482 100 449 q 72 560 72 515 q 90 645 72 608 q 143 707 109 682 q 224 745 177 732 q 330 758 272 758 q 451 743 396 758 q 554 706 505 729 l 512 606 q 422 641 468 626 q 329 655 376 655 q 228 632 261 655 q 195 568 195 610 q 203 526 195 544 q 229 493 210 509 q 279 461 248 477 q 358 426 311 445 q 444 385 406 405 q 509 339 482 365 q 549 281 535 314 q 564 203 564 249 m 242 860 q 272 905 256 879 q 304 958 288 931 q 335 1013 320 986 q 360 1064 349 1040 l 509 1064 l 509 1049 q 476 1004 498 1031 q 429 946 455 976 q 375 889 403 917 q 324 842 347 860 l 242 842 l 242 860 "}," ":{"x_min":0,"x_max":0,"ha":361},"У":{"x_min":16.75,"x_max":813.25,"ha":813,"o":"m 813 992 l 522 289 q 468 172 496 227 q 402 75 440 116 q 311 10 364 34 q 183 -14 258 -14 q 117 -8 148 -14 q 62 6 87 -3 l 62 131 q 117 106 87 116 q 183 97 147 97 q 246 105 219 97 q 297 130 274 112 q 338 178 319 149 q 376 250 357 207 l 16 992 l 155 992 l 415 440 q 422 425 418 433 q 428 408 425 417 q 434 391 431 399 q 440 377 437 383 l 441 377 q 447 394 443 383 q 455 416 451 404 q 462 437 458 427 q 468 451 466 447 l 679 992 l 813 992 "},"¾":{"x_min":21,"x_max":1008.765625,"ha":1023,"o":"m 400 852 q 372 764 400 800 q 298 712 345 729 q 388 660 358 697 q 418 571 418 624 q 404 496 418 530 q 362 437 390 461 q 291 399 334 413 q 190 386 249 386 q 101 394 143 386 q 21 423 59 402 l 21 514 q 110 481 64 493 q 192 469 155 469 q 290 497 260 469 q 321 575 321 525 q 283 648 321 625 q 179 671 246 671 l 111 671 l 111 745 l 179 745 q 273 771 244 745 q 303 839 303 797 q 296 876 303 860 q 277 901 289 891 q 248 915 264 911 q 213 920 232 920 q 138 907 172 920 q 69 870 105 894 l 22 935 q 62 963 41 951 q 106 985 83 976 q 155 998 129 993 q 210 1004 180 1004 q 293 992 257 1004 q 352 961 328 981 q 388 913 376 940 q 400 852 400 885 m 879 992 l 328 0 l 221 0 l 772 992 l 879 992 m 1008 133 l 923 133 l 923 0 l 827 0 l 827 133 l 572 133 l 572 208 l 828 599 l 923 599 l 923 217 l 1008 217 l 1008 133 m 827 217 l 827 368 q 828 439 827 400 q 831 515 829 477 q 820 492 827 507 q 806 462 813 478 q 790 430 798 445 q 775 403 782 414 l 668 217 l 827 217 "},"Ί":{"x_min":-17,"x_max":585.8125,"ha":642,"o":"m 585 0 l 226 0 l 226 69 l 343 96 l 343 895 l 226 922 l 226 992 l 585 992 l 585 922 l 469 895 l 469 96 l 585 69 l 585 0 m -17 789 q -3 835 -10 809 q 9 889 3 861 q 21 943 16 916 q 30 993 27 970 l 165 993 l 165 978 q 149 936 160 962 q 123 880 138 909 q 90 821 107 850 q 56 771 72 792 l -17 771 l -17 789 "},"ʼn":{"x_min":0,"x_max":804,"ha":916,"o":"m 680 0 l 680 479 q 644 611 680 567 q 533 655 609 655 q 440 637 478 655 q 380 585 403 620 q 348 501 358 551 q 338 385 338 450 l 338 0 l 215 0 l 215 745 l 315 745 l 333 644 l 339 644 q 380 694 356 673 q 431 730 403 715 q 490 751 459 744 q 554 758 521 758 q 741 693 678 758 q 804 486 804 628 l 804 0 l 680 0 m 203 992 l 212 977 q 189 898 202 939 q 160 815 176 857 q 127 731 144 772 q 92 652 109 690 l 0 652 q 22 737 10 692 q 44 827 33 782 q 63 913 54 871 q 78 992 72 956 l 203 992 "},"Ģ":{"x_min":85,"x_max":858,"ha":958,"o":"m 530 524 l 858 524 l 858 36 q 782 15 820 24 q 704 0 744 5 q 620 -10 664 -7 q 526 -14 576 -14 q 337 21 419 -14 q 199 123 255 57 q 114 284 143 189 q 85 497 85 378 q 117 708 85 613 q 211 868 149 802 q 363 970 272 934 q 569 1006 453 1006 q 713 991 644 1006 q 842 947 782 976 l 793 837 q 741 859 769 849 q 683 877 713 869 q 621 890 653 885 q 559 894 590 894 q 412 867 476 894 q 306 788 349 839 q 240 662 263 736 q 218 496 218 588 q 237 334 218 407 q 296 208 255 261 q 401 126 336 155 q 556 97 465 97 q 610 98 585 97 q 656 103 635 100 q 695 109 677 106 q 731 116 714 113 l 731 412 l 530 412 l 530 524 m 437 -288 q 453 -246 444 -271 q 470 -191 462 -220 q 484 -135 478 -163 q 493 -85 491 -107 l 616 -85 l 616 -98 q 601 -141 611 -115 q 575 -197 590 -167 q 541 -255 560 -226 q 503 -307 523 -284 l 437 -307 l 437 -288 "},"m":{"x_min":118,"x_max":1134,"ha":1245,"o":"m 1010 0 l 1010 479 q 976 611 1010 567 q 871 655 942 655 q 786 639 821 655 q 729 592 752 623 q 697 516 707 562 q 687 410 687 470 l 687 0 l 564 0 l 564 479 q 530 611 564 567 q 425 655 496 655 q 337 637 373 655 q 281 585 302 620 q 250 501 259 551 q 241 385 241 450 l 241 0 l 118 0 l 118 745 l 218 745 l 236 644 l 242 644 q 281 694 259 673 q 330 730 303 715 q 387 751 357 744 q 448 758 417 758 q 584 728 530 758 q 663 634 637 698 l 669 634 q 711 689 686 666 q 765 727 736 712 q 828 750 795 743 q 894 758 860 758 q 1073 693 1013 758 q 1134 486 1134 628 l 1134 0 l 1010 0 "},"Е":{"x_min":135,"x_max":650,"ha":733,"o":"m 650 0 l 135 0 l 135 992 l 650 992 l 650 880 l 261 880 l 261 574 l 624 574 l 624 462 l 261 462 l 261 111 l 650 111 l 650 0 "},"ž":{"x_min":56,"x_max":556.21875,"ha":612,"o":"m 556 0 l 56 0 l 56 80 l 418 656 l 78 656 l 78 745 l 544 745 l 544 650 l 189 88 l 556 88 l 556 0 m 542 1045 q 501 1000 525 1026 q 455 947 478 974 q 412 892 432 919 q 382 842 392 865 l 251 842 q 221 892 241 865 q 178 947 201 919 q 132 1000 155 974 q 92 1045 109 1026 l 92 1064 l 174 1064 q 244 1008 208 1041 q 317 937 280 975 q 388 1008 352 975 q 460 1064 425 1041 l 542 1064 l 542 1045 "},"á":{"x_min":64,"x_max":626,"ha":737,"o":"m 536 0 l 511 102 l 505 102 q 461 50 483 72 q 412 13 439 28 q 353 -7 386 0 q 278 -14 321 -14 q 193 0 232 -14 q 125 40 153 12 q 80 109 96 67 q 64 208 64 151 q 142 379 64 320 q 379 445 220 439 l 503 450 l 503 496 q 494 572 503 541 q 465 620 484 602 q 419 647 447 639 q 357 655 392 655 q 253 639 301 655 q 160 599 204 623 l 117 692 q 228 739 167 720 q 357 758 290 758 q 477 744 427 758 q 560 700 527 730 q 609 623 593 669 q 626 509 626 576 l 626 0 l 536 0 m 310 88 q 386 101 351 88 q 447 140 422 114 q 488 205 473 166 q 502 298 502 245 l 502 365 l 405 360 q 303 346 345 357 q 237 316 262 336 q 202 270 213 297 q 191 208 191 243 q 224 117 191 146 q 310 88 257 88 m 302 860 q 332 905 316 879 q 364 958 348 931 q 395 1013 380 986 q 420 1064 409 1040 l 569 1064 l 569 1049 q 536 1004 558 1031 q 489 946 515 976 q 435 889 463 917 q 384 842 407 860 l 302 842 l 302 860 "},"×":{"x_min":95.28125,"x_max":670.421875,"ha":765,"o":"m 310 490 l 95 706 l 166 778 l 381 562 l 599 778 l 670 708 l 452 490 l 669 273 l 599 204 l 381 419 l 166 205 l 96 275 l 310 490 "},"п":{"x_min":118,"x_max":706,"ha":825,"o":"m 241 0 l 118 0 l 118 745 l 706 745 l 706 0 l 582 0 l 582 642 l 241 642 l 241 0 "},"Ǻ":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 575 974 q 554 894 575 926 q 499 844 534 861 l 844 0 l 715 0 l 610 266 l 233 266 l 127 0 l 0 0 l 341 843 q 287 892 307 860 q 268 972 268 925 q 278 1034 268 1007 q 309 1080 289 1061 q 357 1109 329 1099 q 419 1119 385 1119 q 480 1109 452 1119 q 530 1080 509 1099 q 563 1035 551 1061 q 575 974 575 1008 m 566 378 l 466 636 q 456 662 462 647 q 444 696 450 678 q 432 734 438 714 q 421 773 426 754 q 410 734 416 754 q 397 695 404 714 q 386 662 391 677 q 376 636 380 646 l 277 378 l 566 378 m 368 1166 q 398 1203 382 1182 q 430 1246 414 1224 q 460 1290 446 1268 q 486 1331 475 1311 l 635 1331 l 635 1320 q 602 1283 624 1305 q 555 1236 581 1261 q 501 1190 528 1212 q 450 1153 473 1167 l 368 1153 l 368 1166 m 500 973 q 478 1029 500 1008 q 421 1049 456 1049 q 364 1029 386 1049 q 342 973 342 1008 q 360 918 342 938 q 412 896 378 898 l 421 896 q 478 916 456 896 q 500 973 500 937 "},"K":{"x_min":135,"x_max":804.25,"ha":804,"o":"m 804 0 l 661 0 l 355 473 l 261 396 l 261 0 l 135 0 l 135 992 l 261 992 l 261 496 l 343 609 l 649 992 l 791 992 l 438 559 l 804 0 "},"7":{"x_min":61,"x_max":699,"ha":765,"o":"m 190 0 l 572 879 l 61 879 l 61 992 l 699 992 l 699 893 l 322 0 l 190 0 "},"¨":{"x_min":208,"x_max":593,"ha":802,"o":"m 208 945 q 226 998 208 982 q 273 1015 245 1015 q 319 998 299 1015 q 338 945 338 981 q 319 892 338 909 q 273 876 299 876 q 226 892 245 876 q 208 945 208 909 m 462 945 q 481 998 462 982 q 527 1015 500 1015 q 552 1010 540 1015 q 573 998 564 1006 q 587 977 582 989 q 593 945 593 964 q 573 892 593 909 q 527 876 553 876 q 481 892 500 876 q 462 945 462 909 "},"Y":{"x_min":-0.25,"x_max":731.25,"ha":732,"o":"m 364 490 l 595 992 l 731 992 l 428 386 l 428 0 l 302 0 l 302 379 l 0 992 l 137 992 l 364 490 "},"E":{"x_min":135,"x_max":650,"ha":733,"o":"m 650 0 l 135 0 l 135 992 l 650 992 l 650 880 l 261 880 l 261 574 l 624 574 l 624 462 l 261 462 l 261 111 l 650 111 l 650 0 "},"Ô":{"x_min":85,"x_max":945,"ha":1031,"o":"m 945 496 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 701 970 622 1007 q 835 867 781 934 q 917 706 890 800 q 945 496 945 612 m 218 497 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 q 794 664 811 590 q 741 789 777 738 q 649 868 705 840 q 517 895 594 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 m 744 1071 l 662 1071 q 590 1126 627 1093 q 519 1196 554 1159 q 446 1126 482 1159 q 376 1071 410 1093 l 294 1071 l 294 1089 q 334 1134 311 1108 q 380 1187 357 1160 q 423 1242 403 1215 q 453 1293 443 1269 l 584 1293 q 614 1242 594 1269 q 657 1187 634 1215 q 703 1134 680 1160 q 744 1089 727 1108 l 744 1071 "},"Є":{"x_min":85,"x_max":798,"ha":838,"o":"m 538 894 q 419 872 473 894 q 324 809 365 850 q 257 708 283 767 q 222 574 231 649 l 649 574 l 649 462 l 218 462 q 243 307 222 374 q 305 192 265 239 q 403 121 345 145 q 538 97 461 97 q 652 108 598 97 q 760 135 707 120 l 760 26 q 707 8 733 15 q 651 -4 680 0 q 590 -11 622 -9 q 517 -14 557 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 497 85 382 q 114 703 85 609 q 201 864 144 796 q 343 968 258 931 q 538 1006 428 1006 q 677 991 611 1006 q 798 947 744 976 l 745 841 q 652 879 702 863 q 538 894 601 894 "},"Ï":{"x_min":43,"x_max":428,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 m 43 1174 q 61 1227 43 1211 q 108 1244 80 1244 q 154 1227 134 1244 q 173 1174 173 1210 q 154 1121 173 1138 q 108 1105 134 1105 q 61 1121 80 1105 q 43 1174 43 1138 m 297 1174 q 316 1227 297 1211 q 362 1244 335 1244 q 387 1239 375 1244 q 408 1227 399 1235 q 422 1206 417 1218 q 428 1174 428 1193 q 408 1121 428 1138 q 362 1105 388 1105 q 316 1121 335 1105 q 297 1174 297 1138 "},"ġ":{"x_min":25,"x_max":692.484375,"ha":720,"o":"m 692 745 l 692 668 l 559 649 q 591 588 578 625 q 604 504 604 551 q 588 409 604 453 q 539 333 572 365 q 459 283 507 301 q 348 266 412 266 q 319 266 333 266 q 294 268 304 266 q 271 253 282 261 q 251 233 260 244 q 236 208 242 222 q 230 178 230 194 q 238 148 230 159 q 260 130 246 136 q 293 122 274 124 q 333 120 312 120 l 453 120 q 560 104 516 120 q 631 61 603 88 q 670 -2 658 34 q 683 -80 683 -38 q 660 -186 683 -139 q 593 -266 638 -233 q 478 -316 547 -298 q 314 -334 408 -334 q 187 -319 241 -334 q 96 -278 132 -305 q 42 -213 60 -251 q 25 -128 25 -175 q 38 -57 25 -87 q 73 -4 51 -26 q 125 32 96 17 q 187 53 155 46 q 140 94 158 66 q 122 159 122 122 q 143 231 122 201 q 212 291 165 262 q 158 324 182 303 q 118 373 134 346 q 92 433 101 401 q 83 500 83 466 q 99 608 83 561 q 150 689 116 656 q 233 740 183 722 q 348 758 282 758 q 400 754 373 758 q 445 745 427 750 l 692 745 m 141 -126 q 150 -173 141 -151 q 179 -211 159 -195 q 232 -235 199 -226 q 314 -245 265 -245 q 503 -205 440 -245 q 566 -92 566 -166 q 558 -41 566 -61 q 531 -10 550 -21 q 482 4 512 0 q 407 8 451 8 l 287 8 q 238 3 263 8 q 190 -17 212 -2 q 155 -58 169 -32 q 141 -126 141 -84 m 206 504 q 242 388 206 426 q 344 350 278 350 q 446 388 411 350 q 480 506 480 426 q 445 629 480 590 q 343 669 410 669 q 241 628 277 669 q 206 504 206 587 m 273 945 q 293 1004 273 986 q 344 1023 314 1023 q 373 1018 359 1023 q 396 1004 386 1014 q 411 980 405 995 q 417 945 417 966 q 396 887 417 906 q 344 868 374 868 q 293 886 314 868 q 273 945 273 905 "},"έ":{"x_min":61,"x_max":583,"ha":629,"o":"m 453 439 l 453 336 l 366 336 q 229 305 273 336 q 184 210 184 274 q 198 152 184 176 q 235 114 212 129 q 291 94 259 100 q 360 88 323 88 q 426 93 395 88 q 484 106 457 98 q 535 125 511 114 q 580 146 559 135 l 580 37 q 486 0 540 14 q 359 -14 433 -14 q 226 2 282 -14 q 133 48 170 19 q 78 117 96 77 q 61 203 61 157 q 73 275 61 245 q 108 326 86 305 q 157 361 129 347 q 215 385 185 375 l 215 392 q 162 416 185 402 q 121 452 138 431 q 94 500 103 473 q 85 561 85 527 q 104 645 85 608 q 159 707 124 682 q 244 745 195 732 q 351 758 293 758 q 417 754 387 758 q 475 745 448 751 q 529 729 503 739 q 583 706 555 720 l 540 606 q 445 642 489 629 q 353 655 401 655 q 240 629 279 655 q 201 551 201 603 q 214 499 201 520 q 252 464 228 477 q 311 445 277 451 q 386 439 345 439 l 453 439 m 305 860 q 318 906 311 880 q 331 960 325 932 q 343 1014 338 987 q 352 1064 349 1041 l 487 1064 l 487 1049 q 471 1007 482 1033 q 445 951 460 980 q 412 892 429 921 q 378 842 394 863 l 305 842 l 305 860 "}," ":{"x_min":0,"x_max":0,"ha":463},"ϋ":{"x_min":111,"x_max":736,"ha":819,"o":"m 409 -14 q 264 13 322 -14 q 172 87 206 40 q 124 199 138 135 q 111 337 111 263 l 111 745 l 234 745 l 234 345 q 245 239 234 286 q 278 158 256 192 q 335 106 300 125 q 417 88 370 88 q 564 167 516 88 q 612 412 612 245 q 609 503 612 461 q 601 585 606 545 q 587 664 595 625 q 569 745 580 703 l 693 745 q 711 664 703 703 q 725 585 719 626 q 733 501 730 545 q 736 406 736 457 q 653 88 736 190 q 409 -14 570 -14 m 208 945 q 226 998 208 982 q 273 1015 245 1015 q 319 998 299 1015 q 338 945 338 981 q 319 892 338 909 q 273 876 299 876 q 226 892 245 876 q 208 945 208 909 m 462 945 q 481 998 462 982 q 527 1015 500 1015 q 552 1010 540 1015 q 573 998 564 1006 q 587 977 582 989 q 593 945 593 964 q 573 892 593 909 q 527 876 553 876 q 481 892 500 876 q 462 945 462 909 "},"й":{"x_min":118,"x_max":735,"ha":853,"o":"m 234 745 l 234 291 l 226 120 l 576 745 l 735 745 l 735 0 l 618 0 l 618 439 l 625 622 l 276 0 l 118 0 l 118 745 l 234 745 m 686 1058 q 665 964 681 1005 q 617 897 648 924 q 537 855 585 869 q 421 842 489 842 q 304 855 352 842 q 227 895 256 868 q 183 963 197 922 q 166 1058 169 1003 l 281 1058 q 293 990 284 1016 q 320 949 303 964 q 362 929 337 934 q 424 923 388 923 q 479 930 454 923 q 522 952 504 937 q 552 993 540 968 q 567 1058 563 1019 l 686 1058 "},"b":{"x_min":118,"x_max":737,"ha":814,"o":"m 454 758 q 570 733 518 758 q 659 660 622 709 q 716 540 696 612 q 737 373 737 468 q 716 205 737 277 q 659 84 696 133 q 570 10 622 35 q 454 -14 518 -14 q 381 -5 414 -14 q 323 18 349 3 q 277 52 297 32 q 241 93 257 72 l 233 93 l 208 0 l 118 0 l 118 1055 l 241 1055 l 241 800 q 240 749 241 776 q 238 699 240 722 q 236 646 237 672 l 241 646 q 276 690 257 670 q 322 726 296 711 q 381 749 348 741 q 454 758 413 758 m 430 655 q 340 638 376 655 q 281 585 303 621 q 250 497 259 550 q 241 373 241 444 q 250 251 241 304 q 281 162 259 198 q 340 107 303 125 q 431 88 377 88 q 566 162 523 88 q 609 374 609 236 q 566 585 609 515 q 430 655 523 655 "},"ύ":{"x_min":111,"x_max":736,"ha":819,"o":"m 409 -14 q 264 13 322 -14 q 172 87 206 40 q 124 199 138 135 q 111 337 111 263 l 111 745 l 234 745 l 234 345 q 245 239 234 286 q 278 158 256 192 q 335 106 300 125 q 417 88 370 88 q 564 167 516 88 q 612 412 612 245 q 609 503 612 461 q 601 585 606 545 q 587 664 595 625 q 569 745 580 703 l 693 745 q 711 664 703 703 q 725 585 719 626 q 733 501 730 545 q 736 406 736 457 q 653 88 736 190 q 409 -14 570 -14 m 352 860 q 365 906 358 880 q 378 960 372 932 q 390 1014 385 987 q 399 1064 396 1041 l 534 1064 l 534 1049 q 518 1007 529 1033 q 492 951 507 980 q 459 892 476 921 q 425 842 441 863 l 352 842 l 352 860 "},"fl":{"x_min":19,"x_max":698.4375,"ha":817,"o":"m 441 656 l 274 656 l 274 0 l 151 0 l 151 656 l 19 656 l 19 704 l 151 749 l 151 814 q 166 934 151 886 q 210 1010 181 982 q 280 1051 238 1039 q 375 1063 322 1063 q 449 1055 415 1063 q 509 1037 482 1047 l 477 941 q 431 954 456 949 q 379 960 406 960 q 332 954 352 960 q 300 931 313 947 q 280 887 287 915 q 274 815 274 859 l 274 745 l 441 745 l 441 656 m 698 0 l 575 0 l 575 1055 l 698 1055 l 698 0 "},"ф":{"x_min":77,"x_max":892,"ha":968,"o":"m 545 756 q 685 719 621 747 q 794 641 749 690 q 866 525 840 593 q 892 373 892 458 q 868 221 892 289 q 799 104 844 153 q 689 25 753 54 q 545 -11 625 -3 l 545 -334 l 429 -334 l 429 -11 q 286 24 351 -4 q 175 103 221 54 q 102 220 128 151 q 77 373 77 288 q 101 526 77 458 q 170 642 125 593 q 281 719 215 690 q 429 756 346 748 l 429 1055 l 545 1055 l 545 756 m 204 373 q 257 175 204 246 q 429 91 310 104 l 429 653 q 326 626 369 647 q 256 571 284 606 q 217 486 229 536 q 204 373 204 437 m 764 373 q 712 569 764 500 q 545 652 660 638 l 545 91 q 712 175 661 104 q 764 373 764 246 "},"Ŋ":{"x_min":135,"x_max":878,"ha":1013,"o":"m 615 -264 q 554 -259 580 -264 q 510 -247 528 -255 l 510 -139 q 557 -149 532 -145 q 613 -152 583 -152 q 662 -146 637 -152 q 706 -122 686 -139 q 739 -76 726 -105 q 751 0 751 -46 l 253 821 l 248 821 q 255 717 252 768 q 259 624 257 673 q 261 538 261 576 l 261 0 l 135 0 l 135 992 l 288 992 l 757 202 l 762 202 q 757 291 759 246 q 753 371 755 329 q 751 449 751 413 l 751 992 l 878 992 l 878 13 q 859 -109 878 -57 q 806 -196 840 -162 q 724 -247 772 -230 q 615 -264 675 -264 "},"Ũ":{"x_min":125,"x_max":845,"ha":970,"o":"m 845 993 l 845 349 q 822 205 845 272 q 755 90 800 139 q 641 13 709 41 q 481 -14 573 -14 q 327 12 394 -14 q 216 86 261 38 q 148 202 171 134 q 125 352 125 269 l 125 991 l 251 991 l 251 346 q 309 162 251 227 q 487 97 368 97 q 591 115 548 97 q 663 167 635 133 q 704 246 690 200 q 718 347 718 292 l 718 993 l 845 993 m 585 1072 q 531 1083 558 1072 q 479 1110 505 1095 q 429 1136 453 1124 q 384 1148 405 1148 q 337 1130 353 1148 q 311 1070 321 1112 l 241 1070 q 255 1144 244 1111 q 284 1201 266 1177 q 327 1237 302 1224 q 384 1250 352 1250 q 440 1238 412 1250 q 493 1211 467 1226 q 542 1185 519 1197 q 585 1173 566 1173 q 631 1191 616 1173 q 657 1251 647 1209 l 729 1251 q 714 1177 725 1210 q 685 1121 703 1144 q 642 1084 667 1097 q 585 1072 617 1072 "},"Щ":{"x_min":135,"x_max":1369,"ha":1385,"o":"m 1250 111 l 1369 111 l 1369 -261 l 1242 -261 l 1242 0 l 135 0 l 135 992 l 261 992 l 261 111 l 629 111 l 629 992 l 755 992 l 755 111 l 1123 111 l 1123 992 l 1250 992 l 1250 111 "},"L":{"x_min":135,"x_max":649.4375,"ha":682,"o":"m 135 0 l 135 992 l 261 992 l 261 111 l 649 111 l 649 0 l 135 0 "},"ď":{"x_min":77,"x_max":924,"ha":814,"o":"m 577 99 l 572 99 q 537 55 557 76 q 491 19 517 34 q 432 -5 465 3 q 359 -14 400 -14 q 244 10 296 -14 q 154 83 192 34 q 97 203 117 131 q 77 370 77 275 q 97 538 77 466 q 154 659 117 610 q 244 733 192 708 q 359 758 296 758 q 432 749 399 758 q 490 725 464 740 q 537 690 516 710 q 572 649 557 671 l 580 649 q 576 693 578 672 q 573 729 575 711 q 572 759 572 748 l 572 1055 l 696 1055 l 696 0 l 596 0 l 577 99 m 383 88 q 470 104 434 88 q 528 151 506 119 q 560 231 550 183 q 572 342 571 279 l 572 370 q 563 492 572 439 q 532 581 554 545 q 473 636 510 618 q 382 655 437 655 q 247 581 290 655 q 204 369 204 507 q 247 157 204 227 q 383 88 290 88 m 760 850 q 772 897 766 871 q 784 950 778 923 q 794 1005 789 978 q 801 1055 799 1032 l 924 1055 l 924 1041 q 909 997 919 1024 q 885 942 898 971 q 855 883 871 913 q 825 833 840 854 l 760 833 l 760 850 "},"Ο":{"x_min":85,"x_max":945,"ha":1031,"o":"m 945 496 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 701 970 622 1007 q 835 867 781 934 q 917 706 890 800 q 945 496 945 612 m 218 497 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 q 794 664 811 590 q 741 789 777 738 q 649 868 705 840 q 517 895 594 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 "},"Ĭ":{"x_min":33,"x_max":441,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 m 441 1259 q 423 1183 438 1217 q 382 1123 408 1149 q 319 1084 356 1098 q 234 1071 282 1071 q 147 1084 184 1071 q 86 1122 110 1097 q 48 1181 61 1147 q 33 1259 35 1216 l 107 1259 q 119 1212 110 1229 q 145 1186 129 1194 q 184 1175 161 1177 q 237 1172 207 1172 q 283 1175 261 1172 q 323 1188 305 1178 q 352 1214 340 1197 q 366 1259 363 1231 l 441 1259 "},"ŧ":{"x_min":23,"x_max":445,"ha":471,"o":"m 343 88 q 371 89 355 88 q 400 93 386 91 q 426 97 415 95 q 445 102 438 100 l 445 8 q 422 0 436 3 q 392 -7 409 -4 q 358 -12 376 -10 q 324 -14 341 -14 q 246 -3 282 -14 q 184 34 210 8 q 142 107 157 61 q 128 222 128 153 l 128 395 l 33 395 l 33 484 l 128 484 l 128 656 l 23 656 l 23 709 l 128 759 l 180 915 l 251 915 l 251 745 l 439 745 l 439 656 l 251 656 l 251 484 l 427 484 l 427 395 l 251 395 l 251 222 q 272 122 251 155 q 343 88 294 88 "},"À":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 m 488 1071 l 406 1071 q 354 1118 382 1089 q 300 1175 326 1146 q 253 1233 274 1205 q 221 1278 231 1260 l 221 1293 l 369 1293 q 395 1242 380 1269 q 425 1187 409 1215 q 457 1134 441 1160 q 488 1089 473 1108 l 488 1071 "},"Ϊ":{"x_min":43,"x_max":428,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 m 43 1174 q 61 1227 43 1211 q 108 1244 80 1244 q 154 1227 134 1244 q 173 1174 173 1210 q 154 1121 173 1138 q 108 1105 134 1105 q 61 1121 80 1105 q 43 1174 43 1138 m 297 1174 q 316 1227 297 1211 q 362 1244 335 1244 q 387 1239 375 1244 q 408 1227 399 1235 q 422 1206 417 1218 q 428 1174 428 1193 q 408 1121 428 1138 q 362 1105 388 1105 q 316 1121 335 1105 q 297 1174 297 1138 "},"ḁ":{"x_min":64,"x_max":626,"ha":737,"o":"m 536 0 l 511 102 l 505 102 q 461 50 483 72 q 412 13 439 28 q 353 -7 386 0 q 278 -14 321 -14 q 193 0 232 -14 q 125 40 153 12 q 80 109 96 67 q 64 208 64 151 q 142 379 64 320 q 379 445 220 439 l 503 450 l 503 496 q 494 572 503 541 q 465 620 484 602 q 419 647 447 639 q 357 655 392 655 q 253 639 301 655 q 160 599 204 623 l 117 692 q 228 739 167 720 q 357 758 290 758 q 477 744 427 758 q 560 700 527 730 q 609 623 593 669 q 626 509 626 576 l 626 0 l 536 0 m 310 88 q 386 101 351 88 q 447 140 422 114 q 488 205 473 166 q 502 298 502 245 l 502 365 l 405 360 q 303 346 345 357 q 237 316 262 336 q 202 270 213 297 q 191 208 191 243 q 224 117 191 146 q 310 88 257 88 m 512 -229 q 500 -291 512 -264 q 467 -338 488 -319 q 418 -367 446 -357 q 356 -377 389 -377 q 294 -367 322 -377 q 246 -338 266 -357 q 215 -292 226 -319 q 205 -231 205 -265 q 215 -169 205 -196 q 246 -123 226 -142 q 294 -94 266 -104 q 356 -85 322 -85 q 417 -94 389 -85 q 467 -123 446 -104 q 500 -168 488 -142 q 512 -229 512 -195 m 437 -231 q 415 -174 437 -194 q 358 -154 392 -154 q 301 -174 323 -154 q 279 -231 279 -194 q 299 -287 279 -267 q 358 -307 319 -307 q 415 -287 392 -307 q 437 -231 437 -267 "},"½":{"x_min":29,"x_max":976.734375,"ha":1023,"o":"m 194 992 l 284 992 l 284 397 l 188 397 l 188 754 q 188 792 188 771 q 189 833 188 813 q 191 873 190 854 q 193 908 192 893 q 171 881 183 895 q 143 853 158 866 l 79 799 l 29 864 l 194 992 m 801 992 l 250 0 l 143 0 l 694 992 l 801 992 m 976 0 l 588 0 l 588 75 l 730 230 q 793 300 769 272 q 832 352 818 329 q 850 394 845 374 q 856 437 856 414 q 833 502 856 481 q 774 523 810 523 q 707 506 739 523 q 645 463 675 489 l 592 527 q 673 584 628 561 q 774 607 719 607 q 848 595 815 607 q 904 563 881 584 q 940 510 927 541 q 953 440 953 479 q 942 377 953 406 q 911 318 931 347 q 862 258 891 289 q 794 190 832 227 l 684 83 l 976 83 l 976 0 "},"'":{"x_min":90,"x_max":223.609375,"ha":314,"o":"m 223 992 l 195 634 l 117 634 l 90 992 l 223 992 "},"ij":{"x_min":108.5,"x_max":611.96875,"ha":720,"o":"m 241 0 l 118 0 l 118 745 l 241 745 l 241 0 m 108 945 q 129 1004 108 986 q 180 1023 149 1023 q 208 1018 195 1023 q 231 1004 221 1014 q 247 980 241 995 q 252 945 252 966 q 231 887 252 906 q 180 868 210 868 q 129 886 149 868 q 108 945 108 905 m 403 -334 q 349 -329 371 -334 q 313 -317 328 -324 l 313 -217 q 348 -227 330 -224 q 390 -231 367 -231 q 424 -226 409 -231 q 452 -208 440 -221 q 470 -172 464 -194 q 477 -116 477 -150 l 477 745 l 600 745 l 600 -107 q 588 -201 600 -159 q 552 -272 577 -243 q 491 -318 528 -302 q 403 -334 454 -334 m 467 945 q 488 1004 467 986 q 539 1023 508 1023 q 567 1018 554 1023 q 590 1004 580 1014 q 606 980 600 995 q 611 945 611 966 q 590 887 611 906 q 539 868 569 868 q 488 886 508 868 q 467 945 467 905 "},"Р":{"x_min":135,"x_max":729,"ha":800,"o":"m 729 701 q 710 582 729 639 q 648 482 691 525 q 536 412 606 438 q 362 386 465 386 l 261 386 l 261 0 l 135 0 l 135 992 l 380 992 q 537 972 471 992 q 645 916 602 953 q 708 825 688 879 q 729 701 729 770 m 261 493 l 347 493 q 456 504 410 493 q 533 539 503 515 q 579 601 564 563 q 595 695 595 640 q 540 837 595 791 q 368 884 485 884 l 261 884 l 261 493 "},"˛":{"x_min":21,"x_max":237,"ha":257,"o":"m 118 -161 q 136 -206 118 -191 q 178 -220 154 -220 q 211 -218 195 -220 q 237 -214 227 -217 l 237 -291 q 197 -299 219 -296 q 156 -302 176 -302 q 54 -266 88 -302 q 21 -170 21 -231 q 30 -116 21 -142 q 56 -69 40 -91 q 89 -30 71 -48 q 125 0 108 -12 l 212 0 q 118 -161 118 -90 "},"Ć":{"x_min":85,"x_max":798,"ha":838,"o":"m 538 894 q 406 867 465 894 q 305 788 347 839 q 241 662 264 736 q 218 496 218 588 q 238 326 218 400 q 298 200 258 251 q 398 123 338 150 q 538 97 458 97 q 652 108 598 97 q 760 135 707 120 l 760 26 q 707 8 733 15 q 651 -4 680 0 q 590 -11 622 -9 q 517 -14 557 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 497 85 382 q 114 703 85 609 q 201 864 144 796 q 343 968 258 931 q 538 1006 428 1006 q 677 991 611 1006 q 798 947 744 976 l 745 841 q 652 879 702 863 q 538 894 601 894 m 447 1089 q 477 1134 461 1108 q 509 1187 493 1160 q 540 1242 525 1215 q 565 1293 554 1269 l 714 1293 l 714 1278 q 681 1233 703 1260 q 634 1175 660 1205 q 580 1118 608 1146 q 529 1071 552 1089 l 447 1071 l 447 1089 "},"Т":{"x_min":14,"x_max":706,"ha":721,"o":"m 423 0 l 297 0 l 297 880 l 14 880 l 14 992 l 706 992 l 706 880 l 423 880 l 423 0 "},"£":{"x_min":46,"x_max":718,"ha":765,"o":"m 451 1004 q 582 988 523 1004 q 686 948 641 972 l 641 850 q 556 884 603 869 q 457 898 508 898 q 397 889 425 898 q 349 860 370 880 q 318 809 329 840 q 307 732 307 777 l 307 534 l 561 534 l 561 437 l 307 437 l 307 295 q 299 224 307 254 q 278 173 291 194 q 248 137 265 152 q 212 112 230 123 l 718 112 l 718 0 l 46 0 l 46 103 q 100 124 75 110 q 143 161 125 138 q 171 216 161 183 q 182 294 182 249 l 182 437 l 47 437 l 47 534 l 182 534 l 182 753 q 201 859 182 812 q 257 937 221 905 q 342 987 293 970 q 451 1004 392 1004 "},"ů":{"x_min":111,"x_max":700,"ha":818,"o":"m 600 0 l 582 99 l 575 99 q 534 48 558 70 q 483 13 511 27 q 424 -7 455 0 q 360 -14 393 -14 q 252 1 299 -14 q 174 50 205 17 q 126 135 142 83 q 111 258 111 186 l 111 745 l 234 745 l 234 264 q 270 132 234 176 q 381 88 306 88 q 474 106 436 88 q 534 158 511 123 q 566 242 556 192 q 576 357 576 292 l 576 745 l 700 745 l 700 0 l 600 0 m 563 989 q 551 927 563 954 q 518 880 539 899 q 469 851 497 861 q 407 842 440 842 q 345 851 373 842 q 297 880 317 861 q 266 926 277 899 q 256 988 256 953 q 266 1049 256 1022 q 297 1095 277 1076 q 345 1124 317 1114 q 407 1134 373 1134 q 468 1124 440 1134 q 518 1095 497 1114 q 551 1050 539 1076 q 563 989 563 1023 m 488 988 q 466 1044 488 1024 q 409 1064 444 1064 q 352 1044 374 1064 q 330 988 330 1024 q 350 931 330 951 q 409 911 370 911 q 466 931 444 911 q 488 988 488 951 "},"Ō":{"x_min":85,"x_max":945,"ha":1031,"o":"m 945 496 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 701 970 622 1007 q 835 867 781 934 q 917 706 890 800 q 945 496 945 612 m 218 497 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 q 794 664 811 590 q 741 789 777 738 q 649 868 705 840 q 517 895 594 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 m 320 1172 l 710 1172 l 710 1071 l 320 1071 l 320 1172 "},"а":{"x_min":64,"x_max":626,"ha":737,"o":"m 536 0 l 511 102 l 505 102 q 461 50 483 72 q 412 13 439 28 q 353 -7 386 0 q 278 -14 321 -14 q 193 0 232 -14 q 125 40 153 12 q 80 109 96 67 q 64 208 64 151 q 142 379 64 320 q 379 445 220 439 l 503 450 l 503 496 q 494 572 503 541 q 465 620 484 602 q 419 647 447 639 q 357 655 392 655 q 253 639 301 655 q 160 599 204 623 l 117 692 q 228 739 167 720 q 357 758 290 758 q 477 744 427 758 q 560 700 527 730 q 609 623 593 669 q 626 509 626 576 l 626 0 l 536 0 m 310 88 q 386 101 351 88 q 447 140 422 114 q 488 205 473 166 q 502 298 502 245 l 502 365 l 405 360 q 303 346 345 357 q 237 316 262 336 q 202 270 213 297 q 191 208 191 243 q 224 117 191 146 q 310 88 257 88 "},"Ğ":{"x_min":85,"x_max":858,"ha":958,"o":"m 530 524 l 858 524 l 858 36 q 782 15 820 24 q 704 0 744 5 q 620 -10 664 -7 q 526 -14 576 -14 q 337 21 419 -14 q 199 123 255 57 q 114 284 143 189 q 85 497 85 378 q 117 708 85 613 q 211 868 149 802 q 363 970 272 934 q 569 1006 453 1006 q 713 991 644 1006 q 842 947 782 976 l 793 837 q 741 859 769 849 q 683 877 713 869 q 621 890 653 885 q 559 894 590 894 q 412 867 476 894 q 306 788 349 839 q 240 662 263 736 q 218 496 218 588 q 237 334 218 407 q 296 208 255 261 q 401 126 336 155 q 556 97 465 97 q 610 98 585 97 q 656 103 635 100 q 695 109 677 106 q 731 116 714 113 l 731 412 l 530 412 l 530 524 m 740 1259 q 722 1183 737 1217 q 681 1123 707 1149 q 618 1084 655 1098 q 533 1071 581 1071 q 446 1084 483 1071 q 385 1122 409 1097 q 347 1181 360 1147 q 332 1259 334 1216 l 406 1259 q 418 1212 409 1229 q 444 1186 428 1194 q 483 1175 460 1177 q 536 1172 506 1172 q 582 1175 560 1172 q 622 1188 604 1178 q 651 1214 639 1197 q 665 1259 662 1231 l 740 1259 "},"v":{"x_min":-0.25,"x_max":665.25,"ha":665,"o":"m 254 0 l 0 745 l 127 745 l 262 330 q 280 272 269 308 q 300 200 290 237 q 319 131 310 164 q 330 82 327 99 l 335 82 q 346 131 338 99 q 364 200 354 164 q 385 272 375 237 q 402 330 395 308 l 537 745 l 665 745 l 410 0 l 254 0 "},"Ї":{"x_min":43,"x_max":428,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 m 43 1174 q 61 1227 43 1211 q 108 1244 80 1244 q 154 1227 134 1244 q 173 1174 173 1210 q 154 1121 173 1138 q 108 1105 134 1105 q 61 1121 80 1105 q 43 1174 43 1138 m 297 1174 q 316 1227 297 1211 q 362 1244 335 1244 q 387 1239 375 1244 q 408 1227 399 1235 q 422 1206 417 1218 q 428 1174 428 1193 q 408 1121 428 1138 q 362 1105 388 1105 q 316 1121 335 1105 q 297 1174 297 1138 "},"û":{"x_min":111,"x_max":700,"ha":818,"o":"m 600 0 l 582 99 l 575 99 q 534 48 558 70 q 483 13 511 27 q 424 -7 455 0 q 360 -14 393 -14 q 252 1 299 -14 q 174 50 205 17 q 126 135 142 83 q 111 258 111 186 l 111 745 l 234 745 l 234 264 q 270 132 234 176 q 381 88 306 88 q 474 106 436 88 q 534 158 511 123 q 566 242 556 192 q 576 357 576 292 l 576 745 l 700 745 l 700 0 l 600 0 m 631 842 l 549 842 q 477 897 514 864 q 406 967 441 930 q 333 897 369 930 q 263 842 297 864 l 181 842 l 181 860 q 221 905 198 879 q 267 958 244 931 q 310 1013 290 986 q 340 1064 330 1040 l 471 1064 q 501 1013 481 1040 q 544 958 521 986 q 590 905 567 931 q 631 860 614 879 l 631 842 "},"Ź":{"x_min":56,"x_max":693,"ha":749,"o":"m 693 0 l 56 0 l 56 97 l 537 880 l 70 880 l 70 992 l 679 992 l 679 894 l 197 111 l 693 111 l 693 0 m 305 1089 q 335 1134 319 1108 q 367 1187 351 1160 q 398 1242 383 1215 q 423 1293 412 1269 l 572 1293 l 572 1278 q 539 1233 561 1260 q 492 1175 518 1205 q 438 1118 466 1146 q 387 1071 410 1089 l 305 1071 l 305 1089 "},"ˉ":{"x_min":192,"x_max":582,"ha":774,"o":"m 192 943 l 582 943 l 582 842 l 192 842 l 192 943 "},"Ĺ":{"x_min":135,"x_max":649.4375,"ha":682,"o":"m 135 0 l 135 992 l 261 992 l 261 111 l 649 111 l 649 0 l 135 0 m 161 1089 q 191 1134 175 1108 q 223 1187 207 1160 q 254 1242 239 1215 q 279 1293 268 1269 l 428 1293 l 428 1278 q 395 1233 417 1260 q 348 1175 374 1205 q 294 1118 322 1146 q 243 1071 266 1089 l 161 1071 l 161 1089 "},"₤":{"x_min":46,"x_max":718,"ha":765,"o":"m 451 1004 q 582 988 523 1004 q 686 948 641 972 l 641 850 q 556 884 603 869 q 457 898 508 898 q 397 889 425 898 q 349 860 370 880 q 318 809 329 840 q 307 733 307 777 l 307 604 l 561 604 l 561 507 l 307 507 l 307 404 l 561 404 l 561 307 l 307 307 l 307 294 q 299 223 307 253 q 278 172 291 194 q 248 137 265 151 q 212 112 230 123 l 718 112 l 718 0 l 46 0 l 46 104 q 100 125 75 111 q 143 161 125 138 q 171 216 161 184 q 182 293 182 248 l 182 307 l 47 307 l 47 404 l 182 404 l 182 507 l 47 507 l 47 604 l 182 604 l 182 753 q 201 859 182 812 q 257 937 221 905 q 342 987 293 970 q 451 1004 392 1004 "},"Č":{"x_min":85,"x_max":798,"ha":838,"o":"m 538 894 q 406 867 465 894 q 305 788 347 839 q 241 662 264 736 q 218 496 218 588 q 238 326 218 400 q 298 200 258 251 q 398 123 338 150 q 538 97 458 97 q 652 108 598 97 q 760 135 707 120 l 760 26 q 707 8 733 15 q 651 -4 680 0 q 590 -11 622 -9 q 517 -14 557 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 497 85 382 q 114 703 85 609 q 201 864 144 796 q 343 968 258 931 q 538 1006 428 1006 q 677 991 611 1006 q 798 947 744 976 l 745 841 q 652 879 702 863 q 538 894 601 894 m 739 1274 q 698 1229 722 1255 q 652 1176 675 1203 q 609 1121 629 1148 q 579 1071 589 1094 l 448 1071 q 418 1121 438 1094 q 375 1176 398 1148 q 329 1229 352 1203 q 289 1274 306 1255 l 289 1293 l 371 1293 q 441 1237 405 1270 q 514 1166 477 1204 q 585 1237 549 1204 q 657 1293 622 1270 l 739 1293 l 739 1274 "},"x":{"x_min":24,"x_max":670,"ha":695,"o":"m 276 382 l 38 745 l 178 745 l 347 466 l 517 745 l 658 745 l 416 382 l 670 0 l 529 0 l 347 295 l 164 0 l 24 0 l 276 382 "},"è":{"x_min":77,"x_max":673,"ha":743,"o":"m 412 -14 q 276 11 337 -14 q 170 84 214 36 q 101 203 125 132 q 77 366 77 274 q 99 531 77 458 q 162 654 121 604 q 259 731 202 705 q 384 758 316 758 q 505 733 451 758 q 595 665 558 709 q 653 560 633 621 q 673 423 673 498 l 673 346 l 204 346 q 259 155 207 216 q 413 93 311 93 q 477 97 448 93 q 534 107 507 100 q 587 123 561 113 q 639 145 613 133 l 639 35 q 586 13 612 22 q 533 -2 560 3 q 476 -11 505 -8 q 412 -14 446 -14 m 384 655 q 260 602 306 655 q 207 449 214 549 l 545 449 q 536 533 545 495 q 507 598 526 571 q 457 640 487 625 q 384 655 427 655 m 461 842 l 379 842 q 327 889 355 860 q 273 946 299 917 q 226 1004 247 976 q 194 1049 204 1031 l 194 1064 l 342 1064 q 368 1013 353 1040 q 398 958 382 986 q 430 905 414 931 q 461 860 446 879 l 461 842 "},"Ń":{"x_min":135,"x_max":878,"ha":1013,"o":"m 878 0 l 724 0 l 253 821 l 248 821 q 255 717 252 768 q 259 624 257 673 q 261 538 261 576 l 261 0 l 135 0 l 135 992 l 288 992 l 757 174 l 762 174 q 757 276 759 226 q 755 321 756 298 q 753 366 754 343 q 752 410 752 389 q 751 449 751 431 l 751 992 l 878 992 l 878 0 m 431 1089 q 461 1134 445 1108 q 493 1187 477 1160 q 524 1242 509 1215 q 549 1293 538 1269 l 698 1293 l 698 1278 q 665 1233 687 1260 q 618 1175 644 1205 q 564 1118 592 1146 q 513 1071 536 1089 l 431 1071 l 431 1089 "},"ḿ":{"x_min":118,"x_max":1134,"ha":1245,"o":"m 1010 0 l 1010 479 q 976 611 1010 567 q 871 655 942 655 q 786 639 821 655 q 729 592 752 623 q 697 516 707 562 q 687 410 687 470 l 687 0 l 564 0 l 564 479 q 530 611 564 567 q 425 655 496 655 q 337 637 373 655 q 281 585 302 620 q 250 501 259 551 q 241 385 241 450 l 241 0 l 118 0 l 118 745 l 218 745 l 236 644 l 242 644 q 281 694 259 673 q 330 730 303 715 q 387 751 357 744 q 448 758 417 758 q 584 728 530 758 q 663 634 637 698 l 669 634 q 711 689 686 666 q 765 727 736 712 q 828 750 795 743 q 894 758 860 758 q 1073 693 1013 758 q 1134 486 1134 628 l 1134 0 l 1010 0 m 575 860 q 605 905 589 879 q 637 958 621 931 q 668 1013 653 986 q 693 1064 682 1040 l 842 1064 l 842 1049 q 809 1004 831 1031 q 762 946 788 976 q 708 889 736 917 q 657 842 680 860 l 575 842 l 575 860 "},"μ":{"x_min":118,"x_max":706,"ha":825,"o":"m 241 264 q 277 132 241 176 q 388 88 313 88 q 481 106 443 88 q 540 158 518 123 q 573 242 563 192 q 582 357 582 292 l 582 745 l 706 745 l 706 0 l 606 0 l 588 99 l 581 99 q 500 14 548 42 q 381 -14 451 -14 q 296 1 332 -14 q 237 45 261 17 q 239 -7 238 19 q 241 -59 240 -30 q 241 -117 241 -88 l 241 -334 l 118 -334 l 118 745 l 241 745 l 241 264 "},".":{"x_min":100,"x_max":272,"ha":372,"o":"m 100 74 q 106 118 100 100 q 125 147 113 136 q 152 163 136 158 q 186 169 167 169 q 219 163 203 169 q 246 147 235 158 q 265 118 258 136 q 272 74 272 100 q 265 31 272 49 q 246 2 258 13 q 219 -14 235 -9 q 186 -20 203 -20 q 152 -14 167 -20 q 125 2 136 -9 q 106 31 113 13 q 100 74 100 49 "},"‘":{"x_min":16,"x_max":228,"ha":243,"o":"m 24 652 l 16 666 q 38 744 25 703 q 67 828 51 786 q 100 912 82 870 q 135 992 118 954 l 228 992 q 204 905 216 950 q 183 816 193 861 q 164 730 173 772 q 149 652 155 687 l 24 652 "},"π":{"x_min":17.109375,"x_max":831,"ha":875,"o":"m 749 88 q 783 92 767 88 q 810 102 799 97 l 810 3 q 774 -8 799 -2 q 717 -14 749 -14 q 602 30 640 -14 q 564 164 564 75 l 564 642 l 290 642 l 290 0 l 167 0 l 167 642 l 17 642 l 17 691 l 110 745 l 831 745 l 831 642 l 688 642 l 688 173 q 703 107 688 125 q 749 88 719 88 "},"9":{"x_min":72,"x_max":697,"ha":765,"o":"m 697 568 q 689 426 697 497 q 664 290 682 355 q 615 170 646 226 q 536 73 584 114 q 421 9 488 32 q 263 -14 354 -14 q 235 -13 250 -14 q 204 -11 219 -12 q 173 -7 188 -9 q 147 -2 158 -5 l 147 99 q 200 87 171 91 q 259 82 230 82 q 410 115 351 82 q 504 203 469 147 q 553 332 538 258 q 571 486 568 405 l 562 486 q 530 440 549 461 q 485 404 511 419 q 426 379 459 388 q 354 371 394 371 q 237 391 289 371 q 148 449 185 411 q 92 544 112 488 q 72 672 72 600 q 93 811 72 749 q 153 916 114 873 q 248 982 192 959 q 373 1006 304 1006 q 501 979 442 1006 q 603 898 560 953 q 671 762 646 844 q 697 568 697 679 m 374 900 q 300 887 334 900 q 242 845 266 873 q 204 773 217 816 q 191 671 191 730 q 202 586 191 624 q 236 522 213 549 q 292 482 258 496 q 370 467 326 467 q 454 483 417 467 q 518 525 491 499 q 559 583 545 550 q 574 648 574 615 q 561 738 574 693 q 524 819 549 783 q 462 878 499 856 q 374 900 424 900 "},"l":{"x_min":118,"x_max":241.4375,"ha":359,"o":"m 241 0 l 118 0 l 118 1055 l 241 1055 l 241 0 "},"Ъ":{"x_min":14,"x_max":839,"ha":910,"o":"m 839 290 q 818 170 839 224 q 755 79 798 117 q 647 20 712 41 q 490 0 581 0 l 244 0 l 244 880 l 14 880 l 14 992 l 370 992 l 370 574 l 471 574 q 645 551 574 574 q 758 490 715 529 q 820 400 801 452 q 839 290 839 349 m 370 107 l 478 107 q 650 152 595 107 q 705 290 705 197 q 690 370 705 337 q 644 424 675 403 q 566 453 612 444 q 457 462 519 462 l 370 462 l 370 107 "}," ":{"x_min":0,"x_max":0,"ha":139},"Ś":{"x_min":70.109375,"x_max":657,"ha":721,"o":"m 657 264 q 633 147 657 199 q 566 59 610 95 q 460 4 523 23 q 320 -14 398 -14 q 179 -2 245 -14 q 70 32 114 9 l 70 153 q 122 131 93 142 q 184 112 151 120 q 251 99 216 104 q 319 93 285 93 q 479 134 427 93 q 530 252 530 176 q 521 316 530 289 q 486 366 511 343 q 420 410 461 389 q 316 456 379 431 q 212 508 256 480 q 139 572 168 537 q 96 652 110 607 q 83 754 83 697 q 104 860 83 813 q 165 939 126 907 q 259 989 205 972 q 380 1006 314 1006 q 525 990 460 1006 q 640 951 589 975 l 595 845 q 495 880 551 865 q 381 894 440 894 q 254 856 299 894 q 209 752 209 818 q 219 686 209 714 q 252 635 229 657 q 315 592 276 612 q 410 549 353 572 q 517 499 471 525 q 594 441 563 473 q 641 366 625 408 q 657 264 657 323 m 306 1089 q 336 1134 320 1108 q 368 1187 352 1160 q 399 1242 384 1215 q 424 1293 413 1269 l 573 1293 l 573 1278 q 540 1233 562 1260 q 493 1175 519 1205 q 439 1118 467 1146 q 388 1071 411 1089 l 306 1071 l 306 1089 "},"Ü":{"x_min":125,"x_max":845,"ha":970,"o":"m 845 993 l 845 349 q 822 205 845 272 q 755 90 800 139 q 641 13 709 41 q 481 -14 573 -14 q 327 12 394 -14 q 216 86 261 38 q 148 202 171 134 q 125 352 125 269 l 125 991 l 251 991 l 251 346 q 309 162 251 227 q 487 97 368 97 q 591 115 548 97 q 663 167 635 133 q 704 246 690 200 q 718 347 718 292 l 718 993 l 845 993 m 293 1174 q 311 1227 293 1211 q 358 1244 330 1244 q 404 1227 384 1244 q 423 1174 423 1210 q 404 1121 423 1138 q 358 1105 384 1105 q 311 1121 330 1105 q 293 1174 293 1138 m 547 1174 q 566 1227 547 1211 q 612 1244 585 1244 q 637 1239 625 1244 q 658 1227 649 1235 q 672 1206 667 1218 q 678 1174 678 1193 q 658 1121 678 1138 q 612 1105 638 1105 q 566 1121 585 1105 q 547 1174 547 1138 "},"à":{"x_min":64,"x_max":626,"ha":737,"o":"m 536 0 l 511 102 l 505 102 q 461 50 483 72 q 412 13 439 28 q 353 -7 386 0 q 278 -14 321 -14 q 193 0 232 -14 q 125 40 153 12 q 80 109 96 67 q 64 208 64 151 q 142 379 64 320 q 379 445 220 439 l 503 450 l 503 496 q 494 572 503 541 q 465 620 484 602 q 419 647 447 639 q 357 655 392 655 q 253 639 301 655 q 160 599 204 623 l 117 692 q 228 739 167 720 q 357 758 290 758 q 477 744 427 758 q 560 700 527 730 q 609 623 593 669 q 626 509 626 576 l 626 0 l 536 0 m 310 88 q 386 101 351 88 q 447 140 422 114 q 488 205 473 166 q 502 298 502 245 l 502 365 l 405 360 q 303 346 345 357 q 237 316 262 336 q 202 270 213 297 q 191 208 191 243 q 224 117 191 146 q 310 88 257 88 m 460 842 l 378 842 q 326 889 354 860 q 272 946 298 917 q 225 1004 246 976 q 193 1049 203 1031 l 193 1064 l 341 1064 q 367 1013 352 1040 q 397 958 381 986 q 429 905 413 931 q 460 860 445 879 l 460 842 "},"η":{"x_min":118,"x_max":707,"ha":818,"o":"m 583 -334 l 583 479 q 547 611 583 567 q 436 655 512 655 q 343 637 381 655 q 283 585 306 620 q 251 501 261 551 q 241 385 241 450 l 241 0 l 118 0 l 118 745 l 218 745 l 236 644 l 242 644 q 283 694 259 673 q 334 730 306 715 q 393 751 362 744 q 457 758 424 758 q 644 693 581 758 q 707 486 707 628 l 707 -334 l 583 -334 "},"ó":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 702 208 725 280 q 637 86 679 135 q 534 11 594 37 q 398 -14 474 -14 q 270 11 329 -14 q 168 86 211 37 q 101 208 125 135 q 77 373 77 280 q 99 537 77 465 q 164 657 122 608 q 267 732 206 707 q 403 758 327 758 q 531 732 472 758 q 633 657 590 707 q 700 537 676 608 q 725 373 725 465 m 204 373 q 250 159 204 231 q 401 88 297 88 q 551 159 506 88 q 597 373 597 231 q 551 585 597 515 q 400 655 504 655 q 250 585 295 655 q 204 373 204 515 m 321 860 q 351 905 335 879 q 383 958 367 931 q 414 1013 399 986 q 439 1064 428 1040 l 588 1064 l 588 1049 q 555 1004 577 1031 q 508 946 534 976 q 454 889 482 917 q 403 842 426 860 l 321 842 l 321 860 "},"¦":{"x_min":332,"x_max":433.734375,"ha":765,"o":"m 332 1055 l 433 1055 l 433 526 l 332 526 l 332 1055 m 332 196 l 433 196 l 433 -334 l 332 -334 l 332 196 "},"Ő":{"x_min":85,"x_max":945,"ha":1031,"o":"m 945 496 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 701 970 622 1007 q 835 867 781 934 q 917 706 890 800 q 945 496 945 612 m 218 497 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 q 794 664 811 590 q 741 789 777 738 q 649 868 705 840 q 517 895 594 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 m 312 1089 q 342 1134 326 1108 q 374 1187 358 1160 q 404 1242 390 1215 q 430 1293 419 1269 l 565 1293 l 565 1278 q 532 1233 554 1260 q 485 1175 511 1205 q 431 1118 459 1146 q 380 1071 404 1089 l 312 1071 l 312 1089 m 558 1089 q 588 1134 572 1108 q 620 1187 604 1160 q 650 1242 636 1215 q 675 1293 665 1269 l 810 1293 l 810 1278 q 777 1233 799 1260 q 730 1175 756 1205 q 676 1118 704 1146 q 625 1071 649 1089 l 558 1071 l 558 1089 "},"Ž":{"x_min":56,"x_max":693,"ha":749,"o":"m 693 0 l 56 0 l 56 97 l 537 880 l 70 880 l 70 992 l 679 992 l 679 894 l 197 111 l 693 111 l 693 0 m 604 1274 q 563 1229 587 1255 q 517 1176 540 1203 q 474 1121 494 1148 q 444 1071 454 1094 l 313 1071 q 283 1121 303 1094 q 240 1176 263 1148 q 194 1229 217 1203 q 154 1274 171 1255 l 154 1293 l 236 1293 q 306 1237 270 1270 q 379 1166 342 1204 q 450 1237 414 1204 q 522 1293 487 1270 l 604 1293 l 604 1274 "},"е":{"x_min":77,"x_max":673,"ha":743,"o":"m 412 -14 q 276 11 337 -14 q 170 84 214 36 q 101 203 125 132 q 77 366 77 274 q 99 531 77 458 q 162 654 121 604 q 259 731 202 705 q 384 758 316 758 q 505 733 451 758 q 595 665 558 709 q 653 560 633 621 q 673 423 673 498 l 673 346 l 204 346 q 259 155 207 216 q 413 93 311 93 q 477 97 448 93 q 534 107 507 100 q 587 123 561 113 q 639 145 613 133 l 639 35 q 586 13 612 22 q 533 -2 560 3 q 476 -11 505 -8 q 412 -14 446 -14 m 384 655 q 260 602 306 655 q 207 449 214 549 l 545 449 q 536 533 545 495 q 507 598 526 571 q 457 640 487 625 q 384 655 427 655 "},"Î":{"x_min":12,"x_max":462,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 m 462 1071 l 380 1071 q 308 1126 345 1093 q 237 1196 272 1159 q 164 1126 200 1159 q 94 1071 128 1093 l 12 1071 l 12 1089 q 52 1134 29 1108 q 98 1187 75 1160 q 141 1242 121 1215 q 171 1293 161 1269 l 302 1293 q 332 1242 312 1269 q 375 1187 352 1215 q 421 1134 398 1160 q 462 1089 445 1108 l 462 1071 "},"e":{"x_min":77,"x_max":673,"ha":743,"o":"m 412 -14 q 276 11 337 -14 q 170 84 214 36 q 101 203 125 132 q 77 366 77 274 q 99 531 77 458 q 162 654 121 604 q 259 731 202 705 q 384 758 316 758 q 505 733 451 758 q 595 665 558 709 q 653 560 633 621 q 673 423 673 498 l 673 346 l 204 346 q 259 155 207 216 q 413 93 311 93 q 477 97 448 93 q 534 107 507 100 q 587 123 561 113 q 639 145 613 133 l 639 35 q 586 13 612 22 q 533 -2 560 3 q 476 -11 505 -8 q 412 -14 446 -14 m 384 655 q 260 602 306 655 q 207 449 214 549 l 545 449 q 536 533 545 495 q 507 598 526 571 q 457 640 487 625 q 384 655 427 655 "},"ό":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 702 208 725 280 q 637 86 679 135 q 534 11 594 37 q 398 -14 474 -14 q 270 11 329 -14 q 168 86 211 37 q 101 208 125 135 q 77 373 77 280 q 99 537 77 465 q 164 657 122 608 q 267 732 206 707 q 403 758 327 758 q 531 732 472 758 q 633 657 590 707 q 700 537 676 608 q 725 373 725 465 m 204 373 q 250 159 204 231 q 401 88 297 88 q 551 159 506 88 q 597 373 597 231 q 551 585 597 515 q 400 655 504 655 q 250 585 295 655 q 204 373 204 515 m 352 860 q 365 906 358 880 q 378 960 372 932 q 390 1014 385 987 q 399 1064 396 1041 l 534 1064 l 534 1049 q 518 1007 529 1033 q 492 951 507 980 q 459 892 476 921 q 425 842 441 863 l 352 842 l 352 860 "},"Ĕ":{"x_min":135,"x_max":650,"ha":733,"o":"m 650 0 l 135 0 l 135 992 l 650 992 l 650 880 l 261 880 l 261 574 l 624 574 l 624 462 l 261 462 l 261 111 l 650 111 l 650 0 m 601 1259 q 583 1183 598 1217 q 542 1123 568 1149 q 479 1084 516 1098 q 394 1071 442 1071 q 307 1084 344 1071 q 246 1122 270 1097 q 208 1181 221 1147 q 193 1259 195 1216 l 267 1259 q 279 1212 270 1229 q 305 1186 289 1194 q 344 1175 321 1177 q 397 1172 367 1172 q 443 1175 421 1172 q 483 1188 465 1178 q 512 1214 500 1197 q 526 1259 523 1231 l 601 1259 "},"ļ":{"x_min":69,"x_max":248,"ha":359,"o":"m 241 0 l 118 0 l 118 1055 l 241 1055 l 241 0 m 69 -288 q 85 -246 76 -271 q 102 -191 94 -220 q 116 -135 110 -163 q 125 -85 123 -107 l 248 -85 l 248 -98 q 233 -141 243 -115 q 207 -197 222 -167 q 173 -255 192 -226 q 135 -307 155 -284 l 69 -307 l 69 -288 "}," ":{"x_min":0,"x_max":0,"ha":695},"Ѓ":{"x_min":135,"x_max":649,"ha":682,"o":"m 649 992 l 649 880 l 261 880 l 261 0 l 135 0 l 135 992 l 649 992 m 301 1089 q 331 1134 315 1108 q 363 1187 347 1160 q 394 1242 379 1215 q 419 1293 408 1269 l 568 1293 l 568 1278 q 535 1233 557 1260 q 488 1175 514 1205 q 434 1118 462 1146 q 383 1071 406 1089 l 301 1071 l 301 1089 "},"ò":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 702 208 725 280 q 637 86 679 135 q 534 11 594 37 q 398 -14 474 -14 q 270 11 329 -14 q 168 86 211 37 q 101 208 125 135 q 77 373 77 280 q 99 537 77 465 q 164 657 122 608 q 267 732 206 707 q 403 758 327 758 q 531 732 472 758 q 633 657 590 707 q 700 537 676 608 q 725 373 725 465 m 204 373 q 250 159 204 231 q 401 88 297 88 q 551 159 506 88 q 597 373 597 231 q 551 585 597 515 q 400 655 504 655 q 250 585 295 655 q 204 373 204 515 m 507 842 l 425 842 q 373 889 401 860 q 319 946 345 917 q 272 1004 293 976 q 240 1049 250 1031 l 240 1064 l 388 1064 q 414 1013 399 1040 q 444 958 428 986 q 476 905 460 931 q 507 860 492 879 l 507 842 "},"ffl":{"x_min":19,"x_max":1155.4375,"ha":1274,"o":"m 441 656 l 274 656 l 274 0 l 151 0 l 151 656 l 19 656 l 19 704 l 151 749 l 151 814 q 166 934 151 886 q 210 1010 181 982 q 280 1051 238 1039 q 375 1063 322 1063 q 449 1055 415 1063 q 509 1037 482 1047 l 477 941 q 431 954 456 949 q 379 960 406 960 q 332 954 352 960 q 300 931 313 947 q 280 887 287 915 q 274 815 274 859 l 274 745 l 441 745 l 441 656 m 898 656 l 731 656 l 731 0 l 608 0 l 608 656 l 476 656 l 476 704 l 608 749 l 608 814 q 623 934 608 886 q 667 1010 638 982 q 737 1051 695 1039 q 832 1063 779 1063 q 906 1055 872 1063 q 966 1037 939 1047 l 934 941 q 888 954 913 949 q 836 960 863 960 q 789 954 809 960 q 757 931 770 947 q 737 887 744 915 q 731 815 731 859 l 731 745 l 898 745 l 898 656 m 1155 0 l 1032 0 l 1032 1055 l 1155 1055 l 1155 0 "},"^":{"x_min":28,"x_max":711,"ha":739,"o":"m 28 372 l 339 999 l 408 999 l 711 372 l 601 372 l 373 870 l 137 372 l 28 372 "},"ⁿ":{"x_min":72,"x_max":446,"ha":515,"o":"m 357 540 l 357 827 q 336 905 357 882 q 274 929 315 929 q 223 921 244 929 q 188 897 202 914 q 167 849 174 879 q 160 775 160 820 l 160 540 l 72 540 l 72 994 l 145 994 l 156 934 l 162 934 q 292 1003 205 1003 q 446 833 446 1003 l 446 540 l 357 540 "},"к":{"x_min":118,"x_max":676.25,"ha":682,"o":"m 516 745 l 649 745 l 369 387 l 676 0 l 536 0 l 241 377 l 241 0 l 118 0 l 118 745 l 241 745 l 241 383 l 516 745 "},"":{"x_min":57,"x_max":1346,"ha":1389,"o":"m 57 823 l 57 1030 l 262 1030 l 262 954 l 132 954 l 132 823 l 57 823 m 1139 954 l 1139 1030 l 1346 1030 l 1346 823 l 1272 823 l 1272 954 l 1139 954 m 57 -260 l 57 -54 l 132 -54 l 132 -186 l 262 -186 l 262 -260 l 57 -260 m 1139 -260 l 1139 -186 l 1272 -186 l 1272 -54 l 1346 -54 l 1346 -260 l 1139 -260 m 875 -260 l 875 -186 l 1060 -186 l 1060 -260 l 875 -260 m 345 -260 l 345 -186 l 528 -186 l 528 -260 l 345 -260 m 345 954 l 345 1030 l 528 1030 l 528 954 l 345 954 m 1346 26 l 1272 26 l 1272 210 l 1346 210 l 1346 26 m 1346 558 l 1272 558 l 1272 742 l 1346 742 l 1346 558 m 610 -260 l 610 -186 l 794 -186 l 794 -260 l 610 -260 m 132 26 l 57 26 l 57 210 l 132 210 l 132 26 m 610 954 l 610 1030 l 794 1030 l 794 954 l 610 954 m 875 954 l 875 1030 l 1060 1030 l 1060 954 l 875 954 m 132 291 l 57 291 l 57 476 l 132 476 l 132 291 m 132 558 l 57 558 l 57 742 l 132 742 l 132 558 m 1346 291 l 1272 291 l 1272 476 l 1346 476 l 1346 291 m 408 224 q 276 277 322 224 q 231 427 231 331 q 276 577 231 525 q 408 631 322 630 q 540 578 494 631 q 586 427 586 525 q 540 277 586 331 q 408 224 494 224 m 408 294 q 478 329 457 294 q 499 427 499 364 q 478 525 499 490 q 408 559 457 559 q 339 525 361 559 q 317 427 317 490 q 339 329 317 364 q 408 294 361 294 m 643 626 l 759 626 q 871 603 833 626 q 909 524 909 580 q 893 468 909 491 q 847 439 878 445 l 847 437 q 903 406 886 429 q 921 344 921 383 q 884 259 921 289 q 783 229 847 229 l 643 229 l 643 626 m 726 469 l 770 469 q 814 480 801 469 q 826 513 826 491 q 812 546 826 536 q 766 556 798 556 l 726 556 l 726 469 m 726 402 l 726 298 l 776 298 q 822 312 809 298 q 834 352 834 327 q 821 388 834 374 q 773 402 809 402 l 726 402 m 956 231 l 956 300 q 978 297 967 298 q 1002 295 989 295 q 1044 307 1028 295 q 1061 353 1061 319 l 1061 626 l 1146 626 l 1146 356 q 1110 258 1146 292 q 1011 225 1075 225 q 956 231 969 225 "},"ū":{"x_min":111,"x_max":700,"ha":818,"o":"m 600 0 l 582 99 l 575 99 q 534 48 558 70 q 483 13 511 27 q 424 -7 455 0 q 360 -14 393 -14 q 252 1 299 -14 q 174 50 205 17 q 126 135 142 83 q 111 258 111 186 l 111 745 l 234 745 l 234 264 q 270 132 234 176 q 381 88 306 88 q 474 106 436 88 q 534 158 511 123 q 566 242 556 192 q 576 357 576 292 l 576 745 l 700 745 l 700 0 l 600 0 m 214 943 l 604 943 l 604 842 l 214 842 l 214 943 "},"ˆ":{"x_min":175,"x_max":625,"ha":802,"o":"m 625 842 l 543 842 q 471 897 508 864 q 400 967 435 930 q 327 897 363 930 q 257 842 291 864 l 175 842 l 175 860 q 215 905 192 879 q 261 958 238 931 q 304 1013 284 986 q 334 1064 324 1040 l 465 1064 q 495 1013 475 1040 q 538 958 515 986 q 584 905 561 931 q 625 860 608 879 l 625 842 "},"Ẅ":{"x_min":13.75,"x_max":1214.25,"ha":1228,"o":"m 549 992 l 682 992 l 837 411 q 857 335 847 373 q 876 261 867 297 q 891 194 884 225 q 901 136 897 162 q 908 192 904 162 q 917 256 912 223 q 929 325 923 290 q 943 393 936 360 l 1079 992 l 1214 992 l 965 0 l 837 0 l 665 636 q 647 707 656 671 q 631 776 638 744 q 615 848 622 813 q 600 776 608 814 q 585 707 593 745 q 567 632 576 669 l 402 0 l 275 0 l 13 992 l 147 992 l 298 388 q 313 323 306 357 q 325 257 320 290 q 336 192 331 223 q 344 136 341 162 q 352 194 347 161 q 364 264 358 227 q 379 338 371 301 q 396 409 387 376 l 549 992 m 421 1174 q 439 1227 421 1211 q 486 1244 458 1244 q 532 1227 512 1244 q 551 1174 551 1210 q 532 1121 551 1138 q 486 1105 512 1105 q 439 1121 458 1105 q 421 1174 421 1138 m 675 1174 q 694 1227 675 1211 q 740 1244 713 1244 q 765 1239 753 1244 q 786 1227 777 1235 q 800 1206 795 1218 q 806 1174 806 1193 q 786 1121 806 1138 q 740 1105 766 1105 q 694 1121 713 1105 q 675 1174 675 1138 "},"č":{"x_min":77,"x_max":630,"ha":643,"o":"m 402 -14 q 274 7 334 -14 q 171 75 215 28 q 102 193 127 121 q 77 367 77 266 q 102 548 77 474 q 173 669 128 623 q 278 736 218 715 q 408 758 339 758 q 511 746 461 758 q 596 718 562 735 l 559 614 q 524 627 543 621 q 485 638 505 633 q 445 647 465 644 q 408 650 425 650 q 253 581 302 650 q 204 369 204 513 q 253 160 204 226 q 402 93 302 93 q 502 106 457 93 q 583 135 546 118 l 583 26 q 504 -3 546 6 q 402 -14 463 -14 m 630 1045 q 589 1000 613 1026 q 543 947 566 974 q 500 892 520 919 q 470 842 480 865 l 339 842 q 309 892 329 865 q 266 947 289 919 q 220 1000 243 974 q 180 1045 197 1026 l 180 1064 l 262 1064 q 332 1008 296 1041 q 405 937 368 975 q 476 1008 440 975 q 548 1064 513 1041 l 630 1064 l 630 1045 "},"’":{"x_min":16,"x_max":228,"ha":243,"o":"m 219 992 l 228 977 q 205 898 218 939 q 176 815 192 857 q 143 731 160 772 q 108 652 125 690 l 16 652 q 38 737 26 692 q 60 827 49 782 q 79 913 70 871 q 94 992 88 956 l 219 992 "},"Ν":{"x_min":135,"x_max":878,"ha":1013,"o":"m 878 0 l 724 0 l 253 821 l 248 821 q 255 717 252 768 q 259 624 257 673 q 261 538 261 576 l 261 0 l 135 0 l 135 992 l 288 992 l 757 174 l 762 174 q 757 276 759 226 q 755 321 756 298 q 753 366 754 343 q 752 410 752 389 q 751 449 751 431 l 751 992 l 878 992 l 878 0 "},"-":{"x_min":56,"x_max":392,"ha":447,"o":"m 56 315 l 56 429 l 392 429 l 392 315 l 56 315 "},"Q":{"x_min":85,"x_max":945,"ha":1030,"o":"m 945 496 q 928 331 945 407 q 879 193 911 254 q 799 87 847 131 q 687 16 751 42 q 763 -95 717 -47 q 871 -184 810 -144 l 789 -281 q 660 -164 719 -231 q 567 -11 601 -97 q 541 -13 555 -12 q 515 -14 527 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 701 970 622 1007 q 835 867 781 934 q 917 706 890 800 q 945 496 945 612 m 218 497 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 q 794 664 811 590 q 741 789 777 738 q 649 868 705 840 q 517 895 594 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 "},"ј":{"x_min":-46,"x_max":252.96875,"ha":359,"o":"m 44 -334 q -9 -329 12 -334 q -46 -317 -30 -324 l -46 -217 q -10 -227 -28 -224 q 31 -231 8 -231 q 65 -226 50 -231 q 93 -208 81 -221 q 111 -172 105 -194 q 118 -116 118 -150 l 118 745 l 241 745 l 241 -107 q 229 -201 241 -159 q 193 -272 218 -243 q 132 -318 169 -302 q 44 -334 95 -334 m 108 945 q 129 1004 108 986 q 180 1023 149 1023 q 208 1018 195 1023 q 231 1004 221 1014 q 247 980 241 995 q 252 945 252 966 q 231 887 252 906 q 180 868 210 868 q 129 886 149 868 q 108 945 108 905 "},"ě":{"x_min":77,"x_max":673,"ha":743,"o":"m 412 -14 q 276 11 337 -14 q 170 84 214 36 q 101 203 125 132 q 77 366 77 274 q 99 531 77 458 q 162 654 121 604 q 259 731 202 705 q 384 758 316 758 q 505 733 451 758 q 595 665 558 709 q 653 560 633 621 q 673 423 673 498 l 673 346 l 204 346 q 259 155 207 216 q 413 93 311 93 q 477 97 448 93 q 534 107 507 100 q 587 123 561 113 q 639 145 613 133 l 639 35 q 586 13 612 22 q 533 -2 560 3 q 476 -11 505 -8 q 412 -14 446 -14 m 384 655 q 260 602 306 655 q 207 449 214 549 l 545 449 q 536 533 545 495 q 507 598 526 571 q 457 640 487 625 q 384 655 427 655 m 606 1045 q 565 1000 589 1026 q 519 947 542 974 q 476 892 496 919 q 446 842 456 865 l 315 842 q 285 892 305 865 q 242 947 265 919 q 196 1000 219 974 q 156 1045 173 1026 l 156 1064 l 238 1064 q 308 1008 272 1041 q 381 937 344 975 q 452 1008 416 975 q 524 1064 489 1041 l 606 1064 l 606 1045 "},"œ":{"x_min":77,"x_max":1194,"ha":1264,"o":"m 934 -14 q 777 23 846 -14 q 665 135 708 61 q 554 23 622 61 q 400 -14 487 -14 q 271 11 330 -14 q 168 86 211 37 q 101 208 125 135 q 77 373 77 280 q 99 537 77 465 q 164 657 122 608 q 267 732 207 707 q 404 758 328 758 q 553 720 486 758 q 662 610 619 682 q 765 720 702 682 q 906 758 827 758 q 1026 733 973 758 q 1117 665 1079 709 q 1174 560 1154 621 q 1194 423 1194 498 l 1194 346 l 727 346 q 782 155 730 216 q 935 93 833 93 q 999 97 970 93 q 1056 107 1028 100 q 1108 123 1083 113 q 1160 145 1134 133 l 1160 35 q 1107 13 1133 22 q 1054 -2 1081 3 q 997 -11 1027 -8 q 934 -14 968 -14 m 204 373 q 251 159 204 231 q 402 88 297 88 q 552 156 505 88 q 600 366 600 224 q 552 585 600 515 q 401 655 504 655 q 250 585 296 655 q 204 373 204 515 m 1066 449 q 1057 533 1066 495 q 1028 598 1048 571 q 979 640 1009 625 q 906 655 948 655 q 783 602 828 655 q 730 449 737 549 l 1066 449 "},"#":{"x_min":35,"x_max":863,"ha":897,"o":"m 666 606 l 623 382 l 814 382 l 814 290 l 605 290 l 550 0 l 450 0 l 507 290 l 310 290 l 254 0 l 157 0 l 209 290 l 35 290 l 35 382 l 228 382 l 272 606 l 87 606 l 87 699 l 289 699 l 345 992 l 444 992 l 389 699 l 587 699 l 644 992 l 742 992 l 685 699 l 863 699 l 863 606 l 666 606 m 327 382 l 524 382 l 568 606 l 371 606 l 327 382 "},"Џ":{"x_min":135,"x_max":826,"ha":960,"o":"m 826 0 l 546 0 l 546 -261 l 420 -261 l 420 0 l 135 0 l 135 992 l 261 992 l 261 111 l 699 111 l 699 992 l 826 992 l 826 0 "},"Å":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 m 576 1074 q 564 1012 576 1039 q 531 965 552 984 q 482 936 510 946 q 420 927 453 927 q 358 936 386 927 q 310 965 330 946 q 279 1011 290 984 q 269 1073 269 1038 q 279 1134 269 1107 q 310 1180 290 1161 q 358 1209 330 1199 q 420 1219 386 1219 q 481 1209 453 1219 q 531 1180 510 1199 q 564 1135 552 1161 q 576 1074 576 1108 m 501 1073 q 479 1129 501 1109 q 422 1149 457 1149 q 365 1129 387 1149 q 343 1073 343 1109 q 363 1016 343 1036 q 422 996 383 996 q 479 1016 457 996 q 501 1073 501 1036 "},"ș":{"x_min":61.15625,"x_max":564,"ha":627,"o":"m 564 203 q 544 108 564 149 q 487 40 524 68 q 398 0 450 13 q 281 -14 346 -14 q 154 -2 207 -14 q 61 33 101 9 l 61 146 q 107 125 82 135 q 161 106 133 114 q 219 93 189 98 q 279 88 249 88 q 353 95 323 88 q 403 116 384 103 q 431 150 423 130 q 440 194 440 170 q 433 232 440 215 q 409 265 427 249 q 360 299 391 282 q 280 337 329 316 q 193 378 232 358 q 127 424 154 399 q 86 482 100 449 q 72 560 72 515 q 90 645 72 608 q 143 707 109 682 q 224 745 177 732 q 330 758 272 758 q 451 743 396 758 q 554 706 505 729 l 512 606 q 422 641 468 626 q 329 655 376 655 q 228 632 261 655 q 195 568 195 610 q 203 526 195 544 q 229 493 210 509 q 279 461 248 477 q 358 426 311 445 q 444 385 406 405 q 509 339 482 365 q 549 281 535 314 q 564 203 564 249 m 202 -288 q 218 -246 209 -271 q 235 -191 227 -220 q 249 -135 243 -163 q 258 -85 256 -107 l 381 -85 l 381 -98 q 366 -141 376 -115 q 340 -197 355 -167 q 306 -255 325 -226 q 268 -307 288 -284 l 202 -307 l 202 -288 "},"¸":{"x_min":24,"x_max":277,"ha":285,"o":"m 277 -194 q 229 -297 277 -260 q 79 -334 181 -334 q 49 -331 64 -334 q 24 -327 34 -329 l 24 -254 q 50 -257 34 -256 q 77 -258 67 -258 q 152 -247 125 -258 q 179 -208 179 -235 q 170 -186 179 -195 q 146 -169 161 -176 q 109 -157 131 -162 q 64 -147 88 -152 l 125 0 l 207 0 l 168 -78 q 211 -92 191 -83 q 245 -115 230 -101 q 268 -148 260 -128 q 277 -194 277 -168 "},"=":{"x_min":69,"x_max":696,"ha":765,"o":"m 69 577 l 69 679 l 696 679 l 696 577 l 69 577 m 69 300 l 69 402 l 696 402 l 696 300 l 69 300 "},"ρ":{"x_min":111,"x_max":725,"ha":802,"o":"m 725 373 q 703 208 725 280 q 642 86 682 135 q 546 11 602 37 q 418 -14 489 -14 q 319 1 368 -14 q 234 47 271 16 l 230 47 q 232 -13 231 17 q 234 -72 233 -39 q 234 -136 234 -105 l 234 -334 l 111 -334 l 111 373 q 133 537 111 465 q 195 657 155 608 q 293 732 236 707 q 422 758 351 758 q 543 732 488 758 q 639 657 598 707 q 702 537 679 608 q 725 373 725 465 m 417 655 q 280 589 324 655 q 234 386 236 522 l 234 156 q 319 105 271 121 q 419 88 368 88 q 555 159 514 88 q 597 373 597 231 q 555 585 597 515 q 417 655 512 655 "},"Ћ":{"x_min":13,"x_max":873,"ha":977,"o":"m 370 609 l 605 609 q 718 592 668 609 q 802 543 768 575 q 854 464 836 511 q 873 357 873 417 l 873 0 l 746 0 l 746 340 q 711 458 746 419 q 591 497 675 497 l 370 497 l 370 0 l 244 0 l 244 880 l 13 880 l 13 992 l 654 992 l 654 880 l 370 880 l 370 609 "},"ú":{"x_min":111,"x_max":700,"ha":818,"o":"m 600 0 l 582 99 l 575 99 q 534 48 558 70 q 483 13 511 27 q 424 -7 455 0 q 360 -14 393 -14 q 252 1 299 -14 q 174 50 205 17 q 126 135 142 83 q 111 258 111 186 l 111 745 l 234 745 l 234 264 q 270 132 234 176 q 381 88 306 88 q 474 106 436 88 q 534 158 511 123 q 566 242 556 192 q 576 357 576 292 l 576 745 l 700 745 l 700 0 l 600 0 m 331 860 q 361 905 345 879 q 393 958 377 931 q 424 1013 409 986 q 449 1064 438 1040 l 598 1064 l 598 1049 q 565 1004 587 1031 q 518 946 544 976 q 464 889 492 917 q 413 842 436 860 l 331 842 l 331 860 "},"˚":{"x_min":248,"x_max":555,"ha":802,"o":"m 555 989 q 543 927 555 954 q 510 880 531 899 q 461 851 489 861 q 399 842 432 842 q 337 851 365 842 q 289 880 309 861 q 258 926 269 899 q 248 988 248 953 q 258 1049 248 1022 q 289 1095 269 1076 q 337 1124 309 1114 q 399 1134 365 1134 q 460 1124 432 1134 q 510 1095 489 1114 q 543 1050 531 1076 q 555 989 555 1023 m 480 988 q 458 1044 480 1024 q 401 1064 436 1064 q 344 1044 366 1064 q 322 988 322 1024 q 342 931 322 951 q 401 911 362 911 q 458 931 436 911 q 480 988 480 951 "},"д":{"x_min":28,"x_max":732,"ha":760,"o":"m 732 -258 l 615 -258 l 615 0 l 144 0 l 144 -258 l 28 -258 l 28 102 l 85 102 q 163 242 130 167 q 220 401 197 318 q 254 571 243 484 q 267 745 266 658 l 630 745 l 630 102 l 732 102 l 732 -258 m 506 102 l 506 656 l 383 656 q 365 511 378 585 q 332 365 352 437 q 282 226 311 293 q 215 102 253 159 l 506 102 "},"¯":{"x_min":-4,"x_max":699,"ha":695,"o":"m 699 1055 l -4 1055 l -4 1150 l 699 1150 l 699 1055 "},"u":{"x_min":111,"x_max":700,"ha":818,"o":"m 600 0 l 582 99 l 575 99 q 534 48 558 70 q 483 13 511 27 q 424 -7 455 0 q 360 -14 393 -14 q 252 1 299 -14 q 174 50 205 17 q 126 135 142 83 q 111 258 111 186 l 111 745 l 234 745 l 234 264 q 270 132 234 176 q 381 88 306 88 q 474 106 436 88 q 534 158 511 123 q 566 242 556 192 q 576 357 576 292 l 576 745 l 700 745 l 700 0 l 600 0 "},"З":{"x_min":49,"x_max":681,"ha":757,"o":"m 663 759 q 645 668 663 709 q 597 598 628 628 q 524 548 566 568 q 431 521 481 529 l 431 517 q 536 490 489 509 q 615 441 583 471 q 664 370 647 410 q 681 281 681 330 q 658 162 681 216 q 589 68 635 108 q 473 7 543 29 q 311 -14 404 -14 q 171 -2 236 -14 q 49 39 106 9 l 49 154 q 110 128 78 140 q 176 109 143 117 q 243 97 209 102 q 308 93 276 93 q 487 142 428 93 q 547 281 547 192 q 477 414 547 371 q 281 457 407 457 l 153 457 l 153 565 l 271 565 q 382 578 334 565 q 462 615 430 591 q 512 673 495 639 q 529 747 529 706 q 516 811 529 783 q 481 858 504 839 q 426 888 458 878 q 354 898 394 898 q 223 876 280 898 q 115 819 166 854 l 53 904 q 112 943 78 925 q 184 975 145 961 q 268 997 223 989 q 361 1006 312 1006 q 491 987 435 1006 q 585 936 547 969 q 643 858 624 903 q 663 759 663 812 "},"Α":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 "},"⅝":{"x_min":54,"x_max":1011,"ha":1051,"o":"m 232 769 q 310 757 274 769 q 373 722 346 745 q 415 664 400 699 q 431 586 431 630 q 374 438 431 491 q 208 385 318 385 q 124 394 166 385 q 54 422 83 404 l 54 518 q 92 497 71 506 q 133 481 112 488 q 174 471 154 475 q 211 468 194 468 q 301 493 269 468 q 334 577 334 519 q 301 657 334 628 q 208 685 269 685 q 186 684 199 685 q 160 680 174 682 q 134 676 147 678 q 112 672 122 674 l 67 702 l 89 992 l 389 992 l 389 908 l 170 908 l 158 762 q 191 766 172 764 q 232 769 210 769 m 860 992 l 309 0 l 202 0 l 753 992 l 860 992 m 815 604 q 883 594 851 604 q 938 567 914 585 q 976 519 962 548 q 991 453 991 491 q 983 407 991 428 q 962 369 976 386 q 931 338 949 352 q 893 313 914 325 q 938 285 917 300 q 975 251 959 270 q 1001 209 991 233 q 1011 157 1011 186 q 996 87 1011 119 q 956 33 982 56 q 894 0 930 11 q 816 -13 858 -13 q 670 31 721 -13 q 620 153 620 75 q 628 205 620 182 q 651 247 636 228 q 684 281 665 266 q 724 307 703 295 q 690 335 705 321 q 662 368 674 350 q 644 407 650 386 q 638 453 638 428 q 652 519 638 491 q 691 566 667 547 q 748 594 716 585 q 815 604 780 604 m 716 155 q 741 93 716 116 q 814 70 766 70 q 888 93 863 70 q 914 155 914 116 q 906 190 914 174 q 885 219 899 206 q 854 242 872 232 q 813 262 835 253 l 802 266 q 738 219 760 244 q 716 155 716 193 m 813 520 q 755 502 776 520 q 734 449 734 484 q 741 417 734 431 q 757 392 747 404 q 783 371 768 380 q 815 353 798 361 q 846 370 831 360 q 871 390 860 379 q 887 416 881 402 q 894 449 894 430 q 872 502 894 484 q 813 520 850 520 "},"é":{"x_min":77,"x_max":673,"ha":743,"o":"m 412 -14 q 276 11 337 -14 q 170 84 214 36 q 101 203 125 132 q 77 366 77 274 q 99 531 77 458 q 162 654 121 604 q 259 731 202 705 q 384 758 316 758 q 505 733 451 758 q 595 665 558 709 q 653 560 633 621 q 673 423 673 498 l 673 346 l 204 346 q 259 155 207 216 q 413 93 311 93 q 477 97 448 93 q 534 107 507 100 q 587 123 561 113 q 639 145 613 133 l 639 35 q 586 13 612 22 q 533 -2 560 3 q 476 -11 505 -8 q 412 -14 446 -14 m 384 655 q 260 602 306 655 q 207 449 214 549 l 545 449 q 536 533 545 495 q 507 598 526 571 q 457 640 487 625 q 384 655 427 655 m 322 860 q 352 905 336 879 q 384 958 368 931 q 415 1013 400 986 q 440 1064 429 1040 l 589 1064 l 589 1049 q 556 1004 578 1031 q 509 946 535 976 q 455 889 483 917 q 404 842 427 860 l 322 842 l 322 860 "},"Ş":{"x_min":70.109375,"x_max":657,"ha":721,"o":"m 657 264 q 633 147 657 199 q 566 59 610 95 q 460 4 523 23 q 320 -14 398 -14 q 179 -2 245 -14 q 70 32 114 9 l 70 153 q 122 131 93 142 q 184 112 151 120 q 251 99 216 104 q 319 93 285 93 q 479 134 427 93 q 530 252 530 176 q 521 316 530 289 q 486 366 511 343 q 420 410 461 389 q 316 456 379 431 q 212 508 256 480 q 139 572 168 537 q 96 652 110 607 q 83 754 83 697 q 104 860 83 813 q 165 939 126 907 q 259 989 205 972 q 380 1006 314 1006 q 525 990 460 1006 q 640 951 589 975 l 595 845 q 495 880 551 865 q 381 894 440 894 q 254 856 299 894 q 209 752 209 818 q 219 686 209 714 q 252 635 229 657 q 315 592 276 612 q 410 549 353 572 q 517 499 471 525 q 594 441 563 473 q 641 366 625 408 q 657 264 657 323 m 486 -194 q 438 -297 486 -260 q 288 -334 390 -334 q 258 -331 273 -334 q 233 -327 243 -329 l 233 -254 q 259 -257 243 -256 q 286 -258 276 -258 q 361 -247 334 -258 q 388 -208 388 -235 q 379 -186 388 -195 q 355 -169 370 -176 q 318 -157 340 -162 q 273 -147 297 -152 l 334 0 l 416 0 l 377 -78 q 420 -92 400 -83 q 454 -115 439 -101 q 477 -148 469 -128 q 486 -194 486 -168 "},"B":{"x_min":135,"x_max":786,"ha":863,"o":"m 135 992 l 405 992 q 558 978 492 992 q 668 936 624 965 q 735 858 713 906 q 758 740 758 810 q 744 662 758 698 q 707 597 731 625 q 645 551 682 569 q 563 526 609 532 l 563 519 q 650 496 609 511 q 720 454 690 480 q 768 386 751 427 q 786 287 786 345 q 763 166 786 219 q 700 76 741 113 q 598 19 658 39 q 463 0 539 0 l 135 0 l 135 992 m 261 572 l 427 572 q 523 582 485 572 q 586 612 562 592 q 621 662 610 632 q 631 732 631 692 q 579 848 631 813 q 413 884 526 884 l 261 884 l 261 572 m 261 464 l 261 107 l 441 107 q 541 121 500 107 q 606 159 581 134 q 641 217 630 183 q 652 292 652 251 q 641 362 652 330 q 604 416 630 393 q 537 451 579 439 q 433 464 495 464 l 261 464 "},"…":{"x_min":100,"x_max":1017,"ha":1117,"o":"m 100 74 q 106 118 100 100 q 125 147 113 136 q 152 163 136 158 q 186 169 167 169 q 219 163 203 169 q 246 147 235 158 q 265 118 258 136 q 272 74 272 100 q 265 31 272 49 q 246 2 258 13 q 219 -14 235 -9 q 186 -20 203 -20 q 152 -14 167 -20 q 125 2 136 -9 q 106 31 113 13 q 100 74 100 49 m 473 74 q 479 118 473 100 q 498 147 486 136 q 525 163 509 158 q 559 169 540 169 q 592 163 576 169 q 619 147 608 158 q 638 118 631 136 q 645 74 645 100 q 638 31 645 49 q 619 2 631 13 q 592 -14 608 -9 q 559 -20 576 -20 q 525 -14 540 -20 q 498 2 509 -9 q 479 31 486 13 q 473 74 473 49 m 845 74 q 851 118 845 100 q 869 147 857 136 q 897 163 881 158 q 931 169 912 169 q 964 163 948 169 q 991 147 980 158 q 1010 118 1003 136 q 1017 74 1017 100 q 1010 31 1017 49 q 991 2 1003 13 q 964 -14 980 -9 q 931 -20 948 -20 q 869 2 894 -20 q 845 74 845 24 "},"H":{"x_min":135,"x_max":839,"ha":974,"o":"m 839 0 l 712 0 l 712 462 l 261 462 l 261 0 l 135 0 l 135 992 l 261 992 l 261 574 l 712 574 l 712 992 l 839 992 l 839 0 "},"î":{"x_min":-45,"x_max":405,"ha":359,"o":"m 241 0 l 118 0 l 118 745 l 241 745 l 241 0 m 405 842 l 323 842 q 251 897 288 864 q 180 967 215 930 q 107 897 143 930 q 37 842 71 864 l -45 842 l -45 860 q -4 905 -27 879 q 41 958 18 931 q 84 1013 64 986 q 114 1064 104 1040 l 245 1064 q 275 1013 255 1040 q 318 958 295 986 q 364 905 341 931 q 405 860 388 879 l 405 842 "},"ν":{"x_min":-0.25,"x_max":661,"ha":718,"o":"m 0 745 l 127 745 l 263 343 q 282 287 271 320 q 302 218 292 253 q 321 152 313 183 q 333 104 330 121 l 337 104 q 437 239 398 169 q 498 387 475 308 q 529 553 520 465 q 537 745 537 642 l 661 745 q 648 536 661 634 q 604 348 635 439 q 521 172 573 257 q 389 0 469 86 l 259 0 l 0 745 "},"Ό":{"x_min":-16,"x_max":1001,"ha":1087,"o":"m 1001 496 q 973 287 1001 382 q 891 126 946 193 q 757 22 837 59 q 571 -14 676 -14 q 380 22 461 -14 q 245 126 299 59 q 166 288 192 193 q 141 498 141 382 q 166 707 141 613 q 246 867 192 801 q 381 970 299 934 q 573 1007 462 1007 q 757 970 678 1007 q 891 867 837 934 q 973 706 946 800 q 1001 496 1001 612 m 274 497 q 292 330 274 404 q 346 204 309 255 q 438 124 382 152 q 571 97 494 97 q 704 124 649 97 q 797 204 760 152 q 850 330 833 255 q 867 497 867 404 q 850 664 867 590 q 797 789 833 738 q 705 868 761 840 q 573 895 650 895 q 439 868 495 895 q 346 789 383 840 q 292 664 309 738 q 274 497 274 590 m -16 789 q -2 835 -9 809 q 10 889 4 861 q 22 943 17 916 q 31 993 28 970 l 166 993 l 166 978 q 150 936 161 962 q 124 880 139 909 q 91 821 108 850 q 57 771 73 792 l -16 771 l -16 789 "},"−":{"x_min":69,"x_max":696,"ha":765,"o":"m 69 439 l 69 541 l 696 541 l 696 439 l 69 439 "},"⅜":{"x_min":35,"x_max":1011,"ha":1051,"o":"m 414 852 q 386 764 414 800 q 312 712 359 729 q 402 660 372 697 q 432 571 432 624 q 418 496 432 530 q 376 437 404 461 q 305 399 348 413 q 204 386 263 386 q 115 394 157 386 q 35 423 73 402 l 35 514 q 124 481 78 493 q 206 469 169 469 q 304 497 274 469 q 335 575 335 525 q 297 648 335 625 q 193 671 260 671 l 125 671 l 125 745 l 193 745 q 287 771 258 745 q 317 839 317 797 q 310 876 317 860 q 291 901 303 891 q 262 915 278 911 q 227 920 246 920 q 152 907 186 920 q 83 870 119 894 l 36 935 q 76 963 55 951 q 120 985 97 976 q 169 998 143 993 q 224 1004 194 1004 q 307 992 271 1004 q 366 961 342 981 q 402 913 390 940 q 414 852 414 885 m 860 992 l 309 0 l 202 0 l 753 992 l 860 992 m 815 604 q 883 594 851 604 q 938 567 914 585 q 976 519 962 548 q 991 453 991 491 q 983 407 991 428 q 962 369 976 386 q 931 338 949 352 q 893 313 914 325 q 938 285 917 300 q 975 251 959 270 q 1001 209 991 233 q 1011 157 1011 186 q 996 87 1011 119 q 956 33 982 56 q 894 0 930 11 q 816 -13 858 -13 q 670 31 721 -13 q 620 153 620 75 q 628 205 620 182 q 651 247 636 228 q 684 281 665 266 q 724 307 703 295 q 690 335 705 321 q 662 368 674 350 q 644 407 650 386 q 638 453 638 428 q 652 519 638 491 q 691 566 667 547 q 748 594 716 585 q 815 604 780 604 m 716 155 q 741 93 716 116 q 814 70 766 70 q 888 93 863 70 q 914 155 914 116 q 906 190 914 174 q 885 219 899 206 q 854 242 872 232 q 813 262 835 253 l 802 266 q 738 219 760 244 q 716 155 716 193 m 813 520 q 755 502 776 520 q 734 449 734 484 q 741 417 734 431 q 757 392 747 404 q 783 371 768 380 q 815 353 798 361 q 846 370 831 360 q 871 390 860 379 q 887 416 881 402 q 894 449 894 430 q 872 502 894 484 q 813 520 850 520 "},"ǰ":{"x_min":-46,"x_max":405,"ha":359,"o":"m 44 -334 q -9 -329 12 -334 q -46 -317 -30 -324 l -46 -217 q -10 -227 -28 -224 q 31 -231 8 -231 q 65 -226 50 -231 q 93 -208 81 -221 q 111 -172 105 -194 q 118 -116 118 -150 l 118 745 l 241 745 l 241 -107 q 229 -201 241 -159 q 193 -272 218 -243 q 132 -318 169 -302 q 44 -334 95 -334 m 405 1045 q 364 1000 388 1026 q 318 947 341 974 q 275 892 295 919 q 245 842 255 865 l 114 842 q 84 892 104 865 q 41 947 64 919 q -4 1000 18 974 q -45 1045 -27 1026 l -45 1064 l 37 1064 q 107 1008 71 1041 q 180 937 143 975 q 251 1008 215 975 q 323 1064 288 1041 l 405 1064 l 405 1045 "},"ā":{"x_min":64,"x_max":626,"ha":737,"o":"m 536 0 l 511 102 l 505 102 q 461 50 483 72 q 412 13 439 28 q 353 -7 386 0 q 278 -14 321 -14 q 193 0 232 -14 q 125 40 153 12 q 80 109 96 67 q 64 208 64 151 q 142 379 64 320 q 379 445 220 439 l 503 450 l 503 496 q 494 572 503 541 q 465 620 484 602 q 419 647 447 639 q 357 655 392 655 q 253 639 301 655 q 160 599 204 623 l 117 692 q 228 739 167 720 q 357 758 290 758 q 477 744 427 758 q 560 700 527 730 q 609 623 593 669 q 626 509 626 576 l 626 0 l 536 0 m 310 88 q 386 101 351 88 q 447 140 422 114 q 488 205 473 166 q 502 298 502 245 l 502 365 l 405 360 q 303 346 345 357 q 237 316 262 336 q 202 270 213 297 q 191 208 191 243 q 224 117 191 146 q 310 88 257 88 m 174 943 l 564 943 l 564 842 l 174 842 l 174 943 "},"ĵ":{"x_min":-46,"x_max":405,"ha":359,"o":"m 44 -334 q -9 -329 12 -334 q -46 -317 -30 -324 l -46 -217 q -10 -227 -28 -224 q 31 -231 8 -231 q 65 -226 50 -231 q 93 -208 81 -221 q 111 -172 105 -194 q 118 -116 118 -150 l 118 745 l 241 745 l 241 -107 q 229 -201 241 -159 q 193 -272 218 -243 q 132 -318 169 -302 q 44 -334 95 -334 m 405 842 l 323 842 q 251 897 288 864 q 180 967 215 930 q 107 897 143 930 q 37 842 71 864 l -45 842 l -45 860 q -4 905 -27 879 q 41 958 18 931 q 84 1013 64 986 q 114 1064 104 1040 l 245 1064 q 275 1013 255 1040 q 318 958 295 986 q 364 905 341 931 q 405 860 388 879 l 405 842 "},"Ĩ":{"x_min":-8,"x_max":480,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 m 336 1072 q 282 1083 309 1072 q 230 1110 256 1095 q 180 1136 204 1124 q 135 1148 156 1148 q 88 1130 104 1148 q 62 1070 72 1112 l -8 1070 q 6 1144 -4 1111 q 35 1201 17 1177 q 78 1237 53 1224 q 135 1250 103 1250 q 191 1238 163 1250 q 244 1211 218 1226 q 293 1185 270 1197 q 336 1173 317 1173 q 382 1191 367 1173 q 408 1251 398 1209 l 480 1251 q 465 1177 476 1210 q 436 1121 454 1144 q 393 1084 418 1097 q 336 1072 368 1072 "},"*":{"x_min":55.3125,"x_max":707.71875,"ha":765,"o":"m 450 1055 l 420 788 l 690 863 l 707 733 l 451 714 l 617 493 l 496 428 l 377 670 l 270 428 l 145 493 l 309 714 l 55 733 l 74 863 l 340 788 l 311 1055 l 450 1055 "},"ă":{"x_min":64,"x_max":626,"ha":737,"o":"m 536 0 l 511 102 l 505 102 q 461 50 483 72 q 412 13 439 28 q 353 -7 386 0 q 278 -14 321 -14 q 193 0 232 -14 q 125 40 153 12 q 80 109 96 67 q 64 208 64 151 q 142 379 64 320 q 379 445 220 439 l 503 450 l 503 496 q 494 572 503 541 q 465 620 484 602 q 419 647 447 639 q 357 655 392 655 q 253 639 301 655 q 160 599 204 623 l 117 692 q 228 739 167 720 q 357 758 290 758 q 477 744 427 758 q 560 700 527 730 q 609 623 593 669 q 626 509 626 576 l 626 0 l 536 0 m 310 88 q 386 101 351 88 q 447 140 422 114 q 488 205 473 166 q 502 298 502 245 l 502 365 l 405 360 q 303 346 345 357 q 237 316 262 336 q 202 270 213 297 q 191 208 191 243 q 224 117 191 146 q 310 88 257 88 m 574 1030 q 556 954 571 988 q 515 894 541 920 q 452 855 489 869 q 367 842 415 842 q 280 855 317 842 q 219 893 243 868 q 181 952 194 918 q 166 1030 168 987 l 240 1030 q 252 983 243 1000 q 278 957 262 965 q 317 946 294 948 q 370 943 340 943 q 416 946 394 943 q 456 959 438 949 q 485 985 473 968 q 499 1030 496 1002 l 574 1030 "},"Χ":{"x_min":-0.25,"x_max":760.25,"ha":760,"o":"m 760 0 l 617 0 l 376 430 l 127 0 l 0 0 l 307 518 l 20 992 l 155 992 l 380 612 l 608 992 l 737 992 l 450 522 l 760 0 "},"†":{"x_min":83,"x_max":591.171875,"ha":675,"o":"m 591 670 l 366 691 l 404 0 l 257 0 l 294 691 l 83 670 l 83 793 l 294 772 l 257 1055 l 404 1055 l 366 772 l 591 793 l 591 670 "},"°":{"x_min":83,"x_max":512,"ha":595,"o":"m 83 791 q 100 874 83 835 q 145 942 117 913 q 213 989 174 972 q 297 1006 252 1006 q 380 989 341 1006 q 448 942 419 972 q 495 874 478 913 q 512 791 512 835 q 495 708 512 747 q 448 641 478 669 q 380 595 419 612 q 297 579 341 579 q 213 595 252 579 q 145 641 174 612 q 100 708 117 669 q 83 791 83 747 m 184 790 q 193 744 184 766 q 218 707 203 723 q 256 681 234 690 q 301 671 277 671 q 347 681 326 671 q 385 707 369 690 q 410 744 401 723 q 419 790 419 766 q 410 838 419 815 q 385 877 401 860 q 347 903 369 893 q 301 913 326 913 q 256 903 277 913 q 218 877 234 893 q 193 838 203 860 q 184 790 184 815 "},"Ξ":{"x_min":56,"x_max":682,"ha":737,"o":"m 139 574 l 599 574 l 599 462 l 139 462 l 139 574 m 84 992 l 654 992 l 654 880 l 84 880 l 84 992 m 682 111 l 682 0 l 56 0 l 56 111 l 682 111 "},"Ķ":{"x_min":135,"x_max":804.25,"ha":804,"o":"m 804 0 l 661 0 l 355 473 l 261 396 l 261 0 l 135 0 l 135 992 l 261 992 l 261 496 l 343 609 l 649 992 l 791 992 l 438 559 l 804 0 m 327 -288 q 343 -246 334 -271 q 360 -191 352 -220 q 374 -135 368 -163 q 383 -85 381 -107 l 506 -85 l 506 -98 q 491 -141 501 -115 q 465 -197 480 -167 q 431 -255 450 -226 q 393 -307 413 -284 l 327 -307 l 327 -288 "},"ŵ":{"x_min":13.75,"x_max":1022.25,"ha":1036,"o":"m 683 0 l 570 417 q 563 445 567 430 q 555 477 559 460 q 546 512 551 494 q 538 546 542 529 q 518 628 528 586 l 514 628 q 496 546 505 585 q 480 476 488 512 q 464 415 471 440 l 347 0 l 204 0 l 13 745 l 143 745 l 232 348 q 245 282 239 318 q 258 211 252 246 q 269 146 264 177 q 277 95 274 115 l 281 95 q 290 142 284 113 q 303 205 296 172 q 317 270 310 238 q 331 324 325 302 l 453 745 l 586 745 l 702 324 q 716 270 709 301 q 732 207 724 239 q 745 145 739 175 q 754 95 751 115 l 758 95 q 764 142 760 113 q 775 207 769 172 q 788 279 781 242 q 803 348 795 316 l 896 745 l 1022 745 l 829 0 l 683 0 m 743 842 l 661 842 q 589 897 626 864 q 518 967 553 930 q 445 897 481 930 q 375 842 409 864 l 293 842 l 293 860 q 333 905 310 879 q 379 958 356 931 q 422 1013 402 986 q 452 1064 442 1040 l 583 1064 q 613 1013 593 1040 q 656 958 633 986 q 702 905 679 931 q 743 860 726 879 l 743 842 "},"΄":{"x_min":342,"x_max":524,"ha":802,"o":"m 342 860 q 355 906 348 880 q 368 960 362 932 q 380 1014 375 987 q 389 1064 386 1041 l 524 1064 l 524 1049 q 508 1007 519 1033 q 482 951 497 980 q 449 892 466 921 q 415 842 431 863 l 342 842 l 342 860 "},"ǽ":{"x_min":64,"x_max":1088,"ha":1157,"o":"m 64 208 q 142 379 64 320 q 382 445 221 439 l 508 450 l 508 496 q 498 572 508 541 q 469 620 488 602 q 423 647 450 639 q 360 655 395 655 q 254 639 303 655 q 160 599 205 623 l 117 692 q 229 739 167 720 q 359 758 291 758 q 505 729 448 758 q 591 637 562 700 q 681 726 625 694 q 807 758 737 758 q 924 733 872 758 q 1013 665 976 709 q 1068 560 1049 622 q 1088 424 1088 499 l 1088 347 l 634 347 q 687 157 637 218 q 836 96 737 96 q 897 99 869 96 q 952 109 926 103 q 1004 126 979 116 q 1054 148 1029 135 l 1054 36 q 1002 13 1027 23 q 950 -2 977 4 q 895 -11 923 -8 q 833 -14 866 -14 q 672 24 740 -14 q 562 141 604 63 q 513 75 539 104 q 454 27 487 47 q 383 -3 422 7 q 293 -14 343 -14 q 202 0 244 -14 q 130 40 160 12 q 81 109 99 67 q 64 208 64 151 m 191 207 q 224 117 191 146 q 312 88 258 88 q 389 101 354 88 q 451 139 425 113 q 492 204 477 165 q 507 296 507 243 l 507 363 l 408 358 q 305 345 347 355 q 238 315 263 334 q 202 269 213 296 q 191 207 191 241 m 807 655 q 688 603 731 655 q 637 450 644 550 l 960 450 q 951 533 960 495 q 923 598 942 572 q 876 640 904 625 q 807 655 847 655 m 519 860 q 549 905 533 879 q 581 958 565 931 q 612 1013 597 986 q 637 1064 626 1040 l 786 1064 l 786 1049 q 753 1004 775 1031 q 706 946 732 976 q 652 889 680 917 q 601 842 624 860 l 519 842 l 519 860 "},"Β":{"x_min":135,"x_max":786,"ha":863,"o":"m 135 992 l 405 992 q 558 978 492 992 q 668 936 624 965 q 735 858 713 906 q 758 740 758 810 q 744 662 758 698 q 707 597 731 625 q 645 551 682 569 q 563 526 609 532 l 563 519 q 650 496 609 511 q 720 454 690 480 q 768 386 751 427 q 786 287 786 345 q 763 166 786 219 q 700 76 741 113 q 598 19 658 39 q 463 0 539 0 l 135 0 l 135 992 m 261 572 l 427 572 q 523 582 485 572 q 586 612 562 592 q 621 662 610 632 q 631 732 631 692 q 579 848 631 813 q 413 884 526 884 l 261 884 l 261 572 m 261 464 l 261 107 l 441 107 q 541 121 500 107 q 606 159 581 134 q 641 217 630 183 q 652 292 652 251 q 641 362 652 330 q 604 416 630 393 q 537 451 579 439 q 433 464 495 464 l 261 464 "},"Ļ":{"x_min":135,"x_max":649.4375,"ha":682,"o":"m 135 0 l 135 992 l 261 992 l 261 111 l 649 111 l 649 0 l 135 0 m 279 -288 q 295 -246 286 -271 q 312 -191 304 -220 q 326 -135 320 -163 q 335 -85 333 -107 l 458 -85 l 458 -98 q 443 -141 453 -115 q 417 -197 432 -167 q 383 -255 402 -226 q 345 -307 365 -284 l 279 -307 l 279 -288 "},"Õ":{"x_min":85,"x_max":945,"ha":1031,"o":"m 945 496 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 701 970 622 1007 q 835 867 781 934 q 917 706 890 800 q 945 496 945 612 m 218 497 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 q 794 664 811 590 q 741 789 777 738 q 649 868 705 840 q 517 895 594 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 m 604 1072 q 550 1083 577 1072 q 498 1110 524 1095 q 448 1136 472 1124 q 403 1148 424 1148 q 356 1130 372 1148 q 330 1070 340 1112 l 260 1070 q 274 1144 263 1111 q 303 1201 285 1177 q 346 1237 321 1224 q 403 1250 371 1250 q 459 1238 431 1250 q 512 1211 486 1226 q 561 1185 538 1197 q 604 1173 585 1173 q 650 1191 635 1173 q 676 1251 666 1209 l 748 1251 q 733 1177 744 1210 q 704 1121 722 1144 q 661 1084 686 1097 q 604 1072 636 1072 "},"№":{"x_min":135,"x_max":1308,"ha":1372,"o":"m 807 0 l 653 0 l 253 821 l 248 821 q 255 717 252 768 q 259 624 257 673 q 261 538 261 576 l 261 0 l 135 0 l 135 992 l 288 992 l 686 174 l 690 174 q 685 276 688 226 q 683 321 684 298 q 682 366 682 343 q 681 410 681 389 q 680 449 680 431 l 680 992 l 807 992 l 807 0 m 1308 412 q 1294 309 1308 354 q 1254 234 1280 264 q 1190 187 1227 203 q 1107 171 1153 171 q 1028 187 1064 171 q 966 234 992 203 q 924 309 939 264 q 910 412 910 354 q 923 513 910 469 q 963 588 937 558 q 1027 635 990 619 q 1110 651 1064 651 q 1188 635 1152 651 q 1251 588 1225 619 q 1293 513 1278 558 q 1308 412 1308 469 m 1006 412 q 1031 294 1006 334 q 1109 254 1055 254 q 1187 294 1163 254 q 1211 412 1211 334 q 1187 529 1211 491 q 1109 567 1163 567 q 1031 529 1055 567 q 1006 412 1006 491 m 938 0 l 938 83 l 1275 83 l 1275 0 l 938 0 "},"χ":{"x_min":-14.25,"x_max":720,"ha":728,"o":"m 126 747 q 182 736 157 747 q 226 704 207 725 q 263 652 246 683 q 294 580 279 621 l 377 346 l 573 745 l 694 745 l 424 218 l 544 -107 q 564 -155 554 -132 q 586 -194 574 -177 q 617 -221 599 -211 q 660 -231 635 -231 q 693 -229 677 -231 q 720 -226 709 -228 l 720 -322 q 685 -330 705 -326 q 639 -334 666 -334 q 561 -321 593 -334 q 505 -284 529 -308 q 463 -226 481 -260 q 430 -147 446 -191 l 342 98 l 117 -334 l -14 -334 l 294 228 l 185 530 q 142 614 167 584 q 82 644 118 644 q 39 637 58 644 l 39 735 q 75 743 53 740 q 126 747 96 747 "},"ί":{"x_min":111,"x_max":428,"ha":454,"o":"m 234 743 l 234 220 q 255 121 234 154 q 326 88 277 88 q 353 89 338 88 q 383 93 368 91 q 409 97 397 95 q 428 102 421 100 l 428 8 q 405 0 419 3 q 375 -7 391 -4 q 341 -12 358 -10 q 307 -14 323 -14 q 229 -3 265 -14 q 167 34 193 7 q 125 105 140 60 q 111 219 111 150 l 111 743 l 234 743 m 134 860 q 147 906 140 880 q 160 960 154 932 q 172 1014 167 987 q 181 1064 178 1041 l 316 1064 l 316 1049 q 300 1007 311 1033 q 274 951 289 980 q 241 892 258 921 q 207 842 223 863 l 134 842 l 134 860 "},"Ζ":{"x_min":56,"x_max":693,"ha":749,"o":"m 693 0 l 56 0 l 56 97 l 537 880 l 70 880 l 70 992 l 679 992 l 679 894 l 197 111 l 693 111 l 693 0 "},"Ľ":{"x_min":135,"x_max":649.4375,"ha":682,"o":"m 135 0 l 135 992 l 261 992 l 261 111 l 649 111 l 649 0 l 135 0 m 439 787 q 451 834 445 808 q 463 887 457 860 q 473 942 468 915 q 480 992 478 969 l 603 992 l 603 978 q 588 934 598 961 q 564 879 577 908 q 534 820 550 850 q 504 770 519 791 l 439 770 l 439 787 "},"ť":{"x_min":23,"x_max":505,"ha":471,"o":"m 343 88 q 371 89 355 88 q 400 93 386 91 q 426 97 415 95 q 445 102 438 100 l 445 8 q 422 0 436 3 q 392 -7 409 -4 q 358 -12 376 -10 q 324 -14 341 -14 q 246 -3 282 -14 q 184 34 210 7 q 142 106 157 61 q 128 221 128 152 l 128 656 l 23 656 l 23 709 l 128 759 l 180 915 l 251 915 l 251 745 l 439 745 l 439 656 l 251 656 l 251 221 q 272 121 251 155 q 343 88 294 88 m 341 850 q 353 897 347 871 q 365 950 359 923 q 375 1005 370 978 q 382 1055 380 1032 l 505 1055 l 505 1041 q 490 997 500 1024 q 466 942 479 971 q 436 883 452 913 q 406 833 421 854 l 341 833 l 341 850 "},"5":{"x_min":89,"x_max":688,"ha":765,"o":"m 369 608 q 494 589 436 608 q 596 534 552 570 q 663 443 639 497 q 688 317 688 388 q 664 178 688 240 q 596 74 641 116 q 484 8 550 31 q 330 -14 417 -14 q 262 -10 295 -14 q 197 0 228 -7 q 139 15 167 5 q 89 39 111 26 l 89 156 q 141 128 111 140 q 205 108 172 116 q 272 95 238 99 q 334 91 306 91 q 430 103 388 91 q 501 142 472 116 q 546 208 531 169 q 562 303 562 248 q 502 451 562 400 q 328 502 442 502 q 288 501 310 502 q 245 496 267 499 q 204 491 224 494 q 171 485 185 487 l 110 523 l 147 992 l 615 992 l 615 879 l 254 879 l 228 594 q 285 603 249 598 q 369 608 320 608 "},"o":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 702 208 725 280 q 637 86 679 135 q 534 11 594 37 q 398 -14 474 -14 q 270 11 329 -14 q 168 86 211 37 q 101 208 125 135 q 77 373 77 280 q 99 537 77 465 q 164 657 122 608 q 267 732 206 707 q 403 758 327 758 q 531 732 472 758 q 633 657 590 707 q 700 537 676 608 q 725 373 725 465 m 204 373 q 250 159 204 231 q 401 88 297 88 q 551 159 506 88 q 597 373 597 231 q 551 585 597 515 q 400 655 504 655 q 250 585 295 655 q 204 373 204 515 "},"Ѕ":{"x_min":70.109375,"x_max":657,"ha":721,"o":"m 657 264 q 633 147 657 199 q 566 59 610 95 q 460 4 523 23 q 320 -14 398 -14 q 179 -2 245 -14 q 70 32 114 9 l 70 153 q 122 131 93 142 q 184 112 151 120 q 251 99 216 104 q 319 93 285 93 q 479 134 427 93 q 530 252 530 176 q 521 316 530 289 q 486 366 511 343 q 420 410 461 389 q 316 456 379 431 q 212 508 256 480 q 139 572 168 537 q 96 652 110 607 q 83 754 83 697 q 104 860 83 813 q 165 939 126 907 q 259 989 205 972 q 380 1006 314 1006 q 525 990 460 1006 q 640 951 589 975 l 595 845 q 495 880 551 865 q 381 894 440 894 q 254 856 299 894 q 209 752 209 818 q 219 686 209 714 q 252 635 229 657 q 315 592 276 612 q 410 549 353 572 q 517 499 471 525 q 594 441 563 473 q 641 366 625 408 q 657 264 657 323 "},"�":{"x_min":57.328125,"x_max":1331.03125,"ha":1389,"o":"m 693 1055 l 1331 419 l 693 -216 l 57 419 l 693 1055 m 737 249 l 737 280 q 748 331 737 310 q 811 392 759 352 q 904 488 878 443 q 931 592 931 532 q 914 676 931 639 q 866 737 897 712 q 791 775 835 762 q 692 789 747 789 q 632 783 662 789 q 572 769 601 778 q 514 747 542 759 q 464 722 487 736 l 519 601 q 608 640 565 624 q 689 656 651 656 q 753 636 732 656 q 774 584 774 616 q 761 528 774 551 q 692 461 747 505 q 620 384 645 425 q 595 289 595 343 l 595 249 l 737 249 m 577 62 q 601 -4 577 20 q 672 -29 625 -29 q 742 -4 718 -29 q 767 62 767 20 q 742 130 767 105 q 672 155 718 155 q 601 130 625 155 q 577 62 577 105 "},"d":{"x_min":77,"x_max":696,"ha":814,"o":"m 577 99 l 572 99 q 537 55 557 76 q 491 19 517 34 q 432 -5 465 3 q 359 -14 400 -14 q 244 10 296 -14 q 154 83 192 34 q 97 203 117 131 q 77 370 77 275 q 97 538 77 466 q 154 659 117 610 q 244 733 192 708 q 359 758 296 758 q 432 749 399 758 q 490 725 464 740 q 537 690 516 710 q 572 649 557 671 l 580 649 q 576 693 578 672 q 573 729 575 711 q 572 759 572 748 l 572 1055 l 696 1055 l 696 0 l 596 0 l 577 99 m 383 88 q 470 104 434 88 q 528 151 506 119 q 560 231 550 183 q 572 342 571 279 l 572 370 q 563 492 572 439 q 532 581 554 545 q 473 636 510 618 q 382 655 437 655 q 247 581 290 655 q 204 369 204 507 q 247 157 204 227 q 383 88 290 88 "},",":{"x_min":43,"x_max":256,"ha":347,"o":"m 245 161 l 256 145 q 233 67 246 108 q 204 -15 220 26 q 170 -99 188 -57 q 136 -179 153 -141 l 43 -179 q 63 -92 53 -137 q 82 -3 72 -48 q 98 82 91 40 q 111 161 106 125 l 245 161 "},"\"":{"x_min":90,"x_max":468.609375,"ha":558,"o":"m 223 992 l 195 634 l 117 634 l 90 992 l 223 992 m 468 992 l 440 634 l 362 634 l 335 992 l 468 992 "},"ľ":{"x_min":118,"x_max":469,"ha":359,"o":"m 241 0 l 118 0 l 118 1055 l 241 1055 l 241 0 m 305 850 q 317 897 311 871 q 329 950 323 923 q 339 1005 334 978 q 346 1055 344 1032 l 469 1055 l 469 1041 q 454 997 464 1024 q 430 942 443 971 q 400 883 416 913 q 370 833 385 854 l 305 833 l 305 850 "},"ė":{"x_min":77,"x_max":673,"ha":743,"o":"m 412 -14 q 276 11 337 -14 q 170 84 214 36 q 101 203 125 132 q 77 366 77 274 q 99 531 77 458 q 162 654 121 604 q 259 731 202 705 q 384 758 316 758 q 505 733 451 758 q 595 665 558 709 q 653 560 633 621 q 673 423 673 498 l 673 346 l 204 346 q 259 155 207 216 q 413 93 311 93 q 477 97 448 93 q 534 107 507 100 q 587 123 561 113 q 639 145 613 133 l 639 35 q 586 13 612 22 q 533 -2 560 3 q 476 -11 505 -8 q 412 -14 446 -14 m 384 655 q 260 602 306 655 q 207 449 214 549 l 545 449 q 536 533 545 495 q 507 598 526 571 q 457 640 487 625 q 384 655 427 655 m 311 945 q 331 1004 311 986 q 382 1023 352 1023 q 411 1018 397 1023 q 434 1004 424 1014 q 449 980 443 995 q 455 945 455 966 q 434 887 455 906 q 382 868 412 868 q 331 886 352 868 q 311 945 311 905 "},"Í":{"x_min":55.34375,"x_max":441,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 m 174 1089 q 204 1134 188 1108 q 236 1187 220 1160 q 267 1242 252 1215 q 292 1293 281 1269 l 441 1293 l 441 1278 q 408 1233 430 1260 q 361 1175 387 1205 q 307 1118 335 1146 q 256 1071 279 1089 l 174 1071 l 174 1089 "},"Ú":{"x_min":125,"x_max":845,"ha":970,"o":"m 845 993 l 845 349 q 822 205 845 272 q 755 90 800 139 q 641 13 709 41 q 481 -14 573 -14 q 327 12 394 -14 q 216 86 261 38 q 148 202 171 134 q 125 352 125 269 l 125 991 l 251 991 l 251 346 q 309 162 251 227 q 487 97 368 97 q 591 115 548 97 q 663 167 635 133 q 704 246 690 200 q 718 347 718 292 l 718 993 l 845 993 m 401 1089 q 431 1134 415 1108 q 463 1187 447 1160 q 494 1242 479 1215 q 519 1293 508 1269 l 668 1293 l 668 1278 q 635 1233 657 1260 q 588 1175 614 1205 q 534 1118 562 1146 q 483 1071 506 1089 l 401 1071 l 401 1089 "}," ":{"x_min":0,"x_max":0,"ha":278},"Ŷ":{"x_min":-0.25,"x_max":731.25,"ha":732,"o":"m 364 490 l 595 992 l 731 992 l 428 386 l 428 0 l 302 0 l 302 379 l 0 992 l 137 992 l 364 490 m 592 1071 l 510 1071 q 438 1126 475 1093 q 367 1196 402 1159 q 294 1126 330 1159 q 224 1071 258 1093 l 142 1071 l 142 1089 q 182 1134 159 1108 q 228 1187 205 1160 q 271 1242 251 1215 q 301 1293 291 1269 l 432 1293 q 462 1242 442 1269 q 505 1187 482 1215 q 551 1134 528 1160 q 592 1089 575 1108 l 592 1071 "},"Ý":{"x_min":-0.25,"x_max":731.25,"ha":732,"o":"m 364 490 l 595 992 l 731 992 l 428 386 l 428 0 l 302 0 l 302 379 l 0 992 l 137 992 l 364 490 m 299 1089 q 329 1134 313 1108 q 361 1187 345 1160 q 392 1242 377 1215 q 417 1293 406 1269 l 566 1293 l 566 1278 q 533 1233 555 1260 q 486 1175 512 1205 q 432 1118 460 1146 q 381 1071 404 1089 l 299 1071 l 299 1089 "},"ŝ":{"x_min":61.15625,"x_max":564,"ha":627,"o":"m 564 203 q 544 108 564 149 q 487 40 524 68 q 398 0 450 13 q 281 -14 346 -14 q 154 -2 207 -14 q 61 33 101 9 l 61 146 q 107 125 82 135 q 161 106 133 114 q 219 93 189 98 q 279 88 249 88 q 353 95 323 88 q 403 116 384 103 q 431 150 423 130 q 440 194 440 170 q 433 232 440 215 q 409 265 427 249 q 360 299 391 282 q 280 337 329 316 q 193 378 232 358 q 127 424 154 399 q 86 482 100 449 q 72 560 72 515 q 90 645 72 608 q 143 707 109 682 q 224 745 177 732 q 330 758 272 758 q 451 743 396 758 q 554 706 505 729 l 512 606 q 422 641 468 626 q 329 655 376 655 q 228 632 261 655 q 195 568 195 610 q 203 526 195 544 q 229 493 210 509 q 279 461 248 477 q 358 426 311 445 q 444 385 406 405 q 509 339 482 365 q 549 281 535 314 q 564 203 564 249 m 557 842 l 475 842 q 403 897 440 864 q 332 967 367 930 q 259 897 295 930 q 189 842 223 864 l 107 842 l 107 860 q 147 905 124 879 q 193 958 170 931 q 236 1013 216 986 q 266 1064 256 1040 l 397 1064 q 427 1013 407 1040 q 470 958 447 986 q 516 905 493 931 q 557 860 540 879 l 557 842 "}," ":{"x_min":0,"x_max":0,"ha":1389},"ą":{"x_min":64,"x_max":646,"ha":737,"o":"m 536 0 l 511 102 l 505 102 q 461 50 483 72 q 412 13 439 28 q 353 -7 386 0 q 278 -14 321 -14 q 193 0 232 -14 q 125 40 153 12 q 80 109 96 67 q 64 208 64 151 q 142 379 64 320 q 379 445 220 439 l 503 450 l 503 496 q 494 572 503 541 q 465 620 484 602 q 419 647 447 639 q 357 655 392 655 q 253 639 301 655 q 160 599 204 623 l 117 692 q 228 739 167 720 q 357 758 290 758 q 477 744 427 758 q 560 700 527 730 q 609 623 593 669 q 626 509 626 576 l 626 0 l 536 0 m 310 88 q 386 101 351 88 q 447 140 422 114 q 488 205 473 166 q 502 298 502 245 l 502 365 l 405 360 q 303 346 345 357 q 237 316 262 336 q 202 270 213 297 q 191 208 191 243 q 224 117 191 146 q 310 88 257 88 m 527 -161 q 545 -206 527 -191 q 587 -220 563 -220 q 620 -218 604 -220 q 646 -214 636 -217 l 646 -291 q 606 -299 628 -296 q 565 -302 585 -302 q 463 -266 497 -302 q 430 -170 430 -231 q 439 -116 430 -142 q 465 -69 449 -91 q 498 -30 480 -48 q 534 0 517 -12 l 621 0 q 527 -161 527 -90 "},"​":{"x_min":0,"x_max":0,"ha":0},"ã":{"x_min":64,"x_max":626,"ha":737,"o":"m 536 0 l 511 102 l 505 102 q 461 50 483 72 q 412 13 439 28 q 353 -7 386 0 q 278 -14 321 -14 q 193 0 232 -14 q 125 40 153 12 q 80 109 96 67 q 64 208 64 151 q 142 379 64 320 q 379 445 220 439 l 503 450 l 503 496 q 494 572 503 541 q 465 620 484 602 q 419 647 447 639 q 357 655 392 655 q 253 639 301 655 q 160 599 204 623 l 117 692 q 228 739 167 720 q 357 758 290 758 q 477 744 427 758 q 560 700 527 730 q 609 623 593 669 q 626 509 626 576 l 626 0 l 536 0 m 310 88 q 386 101 351 88 q 447 140 422 114 q 488 205 473 166 q 502 298 502 245 l 502 365 l 405 360 q 303 346 345 357 q 237 316 262 336 q 202 270 213 297 q 191 208 191 243 q 224 117 191 146 q 310 88 257 88 m 473 843 q 419 854 446 843 q 367 881 393 866 q 317 907 341 895 q 272 919 293 919 q 225 901 241 919 q 199 841 209 883 l 129 841 q 143 915 132 882 q 172 972 154 948 q 215 1008 190 995 q 272 1021 240 1021 q 328 1009 300 1021 q 381 982 355 997 q 430 956 407 968 q 473 944 454 944 q 519 962 504 944 q 545 1022 535 980 l 617 1022 q 602 948 613 981 q 573 892 591 915 q 530 855 555 868 q 473 843 505 843 "},"æ":{"x_min":64,"x_max":1088,"ha":1157,"o":"m 64 208 q 142 379 64 320 q 382 445 221 439 l 508 450 l 508 496 q 498 572 508 541 q 469 620 488 602 q 423 647 450 639 q 360 655 395 655 q 254 639 303 655 q 160 599 205 623 l 117 692 q 229 739 167 720 q 359 758 291 758 q 505 729 448 758 q 591 637 562 700 q 681 726 625 694 q 807 758 737 758 q 924 733 872 758 q 1013 665 976 709 q 1068 560 1049 622 q 1088 424 1088 499 l 1088 347 l 634 347 q 687 157 637 218 q 836 96 737 96 q 897 99 869 96 q 952 109 926 103 q 1004 126 979 116 q 1054 148 1029 135 l 1054 36 q 1002 13 1027 23 q 950 -2 977 4 q 895 -11 923 -8 q 833 -14 866 -14 q 672 24 740 -14 q 562 141 604 63 q 513 75 539 104 q 454 27 487 47 q 383 -3 422 7 q 293 -14 343 -14 q 202 0 244 -14 q 130 40 160 12 q 81 109 99 67 q 64 208 64 151 m 191 207 q 224 117 191 146 q 312 88 258 88 q 389 101 354 88 q 451 139 425 113 q 492 204 477 165 q 507 296 507 243 l 507 363 l 408 358 q 305 345 347 355 q 238 315 263 334 q 202 269 213 296 q 191 207 191 241 m 807 655 q 688 603 731 655 q 637 450 644 550 l 960 450 q 951 533 960 495 q 923 598 942 572 q 876 640 904 625 q 807 655 847 655 "},"ĩ":{"x_min":-63,"x_max":425,"ha":359,"o":"m 241 0 l 118 0 l 118 745 l 241 745 l 241 0 m 281 843 q 227 854 254 843 q 175 881 201 866 q 125 907 149 895 q 80 919 101 919 q 33 901 49 919 q 7 841 17 883 l -63 841 q -48 915 -59 882 q -19 972 -37 948 q 23 1008 -1 995 q 80 1021 48 1021 q 136 1009 108 1021 q 189 982 163 997 q 238 956 215 968 q 281 944 262 944 q 327 962 312 944 q 353 1022 343 980 l 425 1022 q 410 948 421 981 q 381 892 399 915 q 338 855 363 868 q 281 843 313 843 "},"~":{"x_min":69,"x_max":696,"ha":765,"o":"m 359 441 q 315 459 334 452 q 281 471 297 467 q 252 477 266 475 q 223 479 238 479 q 184 472 204 479 q 143 455 164 466 q 104 429 123 444 q 69 397 85 414 l 69 507 q 237 581 136 581 q 273 579 256 581 q 309 573 290 577 q 350 560 328 568 q 405 538 373 552 q 449 520 430 527 q 483 508 468 512 q 513 502 499 504 q 541 500 527 500 q 581 507 560 500 q 621 524 601 513 q 660 550 641 535 q 696 582 679 565 l 696 472 q 527 399 628 399 q 491 400 508 399 q 455 406 474 402 q 414 419 436 411 q 359 441 391 428 "},"ŀ":{"x_min":118,"x_max":457.46875,"ha":416,"o":"m 241 0 l 118 0 l 118 1055 l 241 1055 l 241 0 m 313 462 q 333 521 313 503 q 384 540 354 540 q 413 535 399 540 q 436 521 426 531 q 451 497 445 512 q 457 462 457 483 q 436 404 457 423 q 384 385 414 385 q 333 403 354 385 q 313 462 313 422 "},"Ċ":{"x_min":85,"x_max":798,"ha":838,"o":"m 538 894 q 406 867 465 894 q 305 788 347 839 q 241 662 264 736 q 218 496 218 588 q 238 326 218 400 q 298 200 258 251 q 398 123 338 150 q 538 97 458 97 q 652 108 598 97 q 760 135 707 120 l 760 26 q 707 8 733 15 q 651 -4 680 0 q 590 -11 622 -9 q 517 -14 557 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 497 85 382 q 114 703 85 609 q 201 864 144 796 q 343 968 258 931 q 538 1006 428 1006 q 677 991 611 1006 q 798 947 744 976 l 745 841 q 652 879 702 863 q 538 894 601 894 m 456 1174 q 476 1233 456 1215 q 527 1252 497 1252 q 556 1247 542 1252 q 579 1233 569 1243 q 594 1209 588 1224 q 600 1174 600 1195 q 579 1116 600 1135 q 527 1097 557 1097 q 476 1115 497 1097 q 456 1174 456 1134 "},"¡":{"x_min":100,"x_max":272.265625,"ha":374,"o":"m 144 458 l 226 458 l 261 -253 l 110 -253 l 144 458 m 272 663 q 265 619 272 637 q 247 590 259 601 q 220 574 235 579 q 186 569 204 569 q 152 574 168 569 q 125 590 137 579 q 106 619 113 601 q 100 663 100 637 q 106 706 100 688 q 125 735 113 724 q 152 752 137 747 q 186 758 168 758 q 220 752 204 758 q 247 735 235 747 q 265 706 259 724 q 272 663 272 688 "},"ẅ":{"x_min":13.75,"x_max":1022.25,"ha":1036,"o":"m 683 0 l 570 417 q 563 445 567 430 q 555 477 559 460 q 546 512 551 494 q 538 546 542 529 q 518 628 528 586 l 514 628 q 496 546 505 585 q 480 476 488 512 q 464 415 471 440 l 347 0 l 204 0 l 13 745 l 143 745 l 232 348 q 245 282 239 318 q 258 211 252 246 q 269 146 264 177 q 277 95 274 115 l 281 95 q 290 142 284 113 q 303 205 296 172 q 317 270 310 238 q 331 324 325 302 l 453 745 l 586 745 l 702 324 q 716 270 709 301 q 732 207 724 239 q 745 145 739 175 q 754 95 751 115 l 758 95 q 764 142 760 113 q 775 207 769 172 q 788 279 781 242 q 803 348 795 316 l 896 745 l 1022 745 l 829 0 l 683 0 m 325 945 q 343 998 325 982 q 390 1015 362 1015 q 436 998 416 1015 q 455 945 455 981 q 436 892 455 909 q 390 876 416 876 q 343 892 362 876 q 325 945 325 909 m 579 945 q 598 998 579 982 q 644 1015 617 1015 q 669 1010 657 1015 q 690 998 681 1006 q 704 977 699 989 q 710 945 710 964 q 690 892 710 909 q 644 876 670 876 q 598 892 617 876 q 579 945 579 909 "},"К":{"x_min":135,"x_max":804.25,"ha":804,"o":"m 804 0 l 655 0 l 261 502 l 261 0 l 135 0 l 135 992 l 261 992 l 261 511 l 644 992 l 784 992 l 401 515 l 804 0 "},"Γ":{"x_min":135,"x_max":649,"ha":682,"o":"m 649 992 l 649 880 l 261 880 l 261 0 l 135 0 l 135 992 l 649 992 "},"P":{"x_min":135,"x_max":729,"ha":800,"o":"m 729 701 q 710 582 729 639 q 648 482 691 525 q 536 412 606 438 q 362 386 465 386 l 261 386 l 261 0 l 135 0 l 135 992 l 380 992 q 537 972 471 992 q 645 916 602 953 q 708 825 688 879 q 729 701 729 770 m 261 493 l 347 493 q 456 504 410 493 q 533 539 503 515 q 579 601 564 563 q 595 695 595 640 q 540 837 595 791 q 368 884 485 884 l 261 884 l 261 493 "},"%":{"x_min":69,"x_max":1076,"ha":1146,"o":"m 169 695 q 193 527 169 583 q 271 471 217 471 q 377 695 377 471 q 271 917 377 917 q 193 862 217 917 q 169 695 169 807 m 478 695 q 465 564 478 622 q 428 465 453 505 q 364 404 403 425 q 271 383 325 383 q 184 404 222 383 q 120 465 146 425 q 81 564 94 505 q 69 695 69 622 q 80 826 69 769 q 117 924 92 884 q 180 984 142 963 q 271 1006 218 1006 q 360 984 322 1006 q 425 924 399 963 q 464 826 451 884 q 478 695 478 769 m 768 297 q 792 129 768 185 q 870 74 816 74 q 975 297 975 74 q 870 519 975 519 q 792 464 816 519 q 768 297 768 409 m 1076 298 q 1064 166 1076 224 q 1027 68 1052 108 q 963 7 1002 28 q 870 -14 924 -14 q 782 7 820 -14 q 719 68 744 28 q 680 166 693 108 q 668 298 668 224 q 679 428 668 371 q 716 526 691 486 q 779 586 741 565 q 870 608 817 608 q 959 586 921 608 q 1023 526 998 565 q 1062 428 1049 486 q 1076 298 1076 371 m 902 992 l 351 0 l 244 0 l 795 992 l 902 992 "},"ϖ":{"x_min":11.828125,"x_max":1106.265625,"ha":1150,"o":"m 374 -14 q 185 65 251 -14 q 119 310 119 145 q 125 392 119 349 q 142 477 131 434 q 167 562 152 520 q 199 642 182 604 l 11 642 l 11 691 l 102 745 l 1106 745 l 1106 642 l 941 642 q 970 562 957 604 q 992 477 983 520 q 1006 392 1001 434 q 1012 310 1012 349 q 945 65 1012 145 q 756 -14 879 -14 q 637 15 684 -14 q 569 106 590 45 l 562 106 q 493 15 541 45 q 374 -14 446 -14 m 321 642 q 293 565 306 605 q 269 484 279 525 q 252 401 258 442 q 246 320 246 359 q 256 208 246 253 q 284 137 266 164 q 327 99 302 110 q 382 88 352 88 q 436 102 413 88 q 474 140 459 116 q 496 198 489 165 q 504 270 504 231 l 504 390 l 627 390 l 627 270 q 660 135 627 182 q 748 88 693 88 q 803 99 778 88 q 846 137 828 110 q 874 208 865 164 q 884 320 884 253 q 879 401 884 359 q 865 484 874 442 q 845 565 857 525 q 819 642 833 605 l 321 642 "},"_":{"x_min":-3,"x_max":574,"ha":571,"o":"m 574 -219 l -3 -219 l -3 -125 l 574 -125 l 574 -219 "},"ñ":{"x_min":118,"x_max":707,"ha":818,"o":"m 583 0 l 583 479 q 547 611 583 567 q 436 655 512 655 q 343 637 381 655 q 283 585 306 620 q 251 501 261 551 q 241 385 241 450 l 241 0 l 118 0 l 118 745 l 218 745 l 236 644 l 242 644 q 283 694 259 673 q 334 730 306 715 q 393 751 362 744 q 457 758 424 758 q 644 693 581 758 q 707 486 707 628 l 707 0 l 583 0 m 514 843 q 460 854 487 843 q 408 881 434 866 q 358 907 382 895 q 313 919 334 919 q 266 901 282 919 q 240 841 250 883 l 170 841 q 184 915 173 882 q 213 972 195 948 q 256 1008 231 995 q 313 1021 281 1021 q 369 1009 341 1021 q 422 982 396 997 q 471 956 448 968 q 514 944 495 944 q 560 962 545 944 q 586 1022 576 980 l 658 1022 q 643 948 654 981 q 614 892 632 915 q 571 855 596 868 q 514 843 546 843 "},"Ŕ":{"x_min":135,"x_max":803.25,"ha":819,"o":"m 261 410 l 261 0 l 135 0 l 135 992 l 376 992 q 642 922 556 992 q 729 710 729 852 q 712 607 729 651 q 668 531 695 563 q 605 479 640 500 q 533 444 570 458 l 803 0 l 654 0 l 416 410 l 261 410 m 261 517 l 371 517 q 473 529 431 517 q 543 564 516 541 q 582 623 570 588 q 595 704 595 658 q 581 787 595 753 q 540 842 567 821 q 469 874 512 864 q 368 884 426 884 l 261 884 l 261 517 m 324 1089 q 354 1134 338 1108 q 386 1187 370 1160 q 417 1242 402 1215 q 442 1293 431 1269 l 591 1293 l 591 1278 q 558 1233 580 1260 q 511 1175 537 1205 q 457 1118 485 1146 q 406 1071 429 1089 l 324 1071 l 324 1089 "},"‚":{"x_min":43,"x_max":256,"ha":347,"o":"m 246 161 l 256 145 q 233 67 246 108 q 204 -15 220 26 q 170 -99 188 -57 q 136 -179 153 -141 l 43 -179 q 66 -92 54 -137 q 88 -3 77 -48 q 107 82 98 40 q 122 161 116 125 l 246 161 "},"⅞":{"x_min":77,"x_max":1011,"ha":1051,"o":"m 141 397 l 363 908 l 77 908 l 77 992 l 460 992 l 460 924 l 243 397 l 141 397 m 804 992 l 253 0 l 146 0 l 697 992 l 804 992 m 815 604 q 883 594 851 604 q 938 567 914 585 q 976 519 962 548 q 991 453 991 491 q 983 407 991 428 q 962 369 976 386 q 931 338 949 352 q 893 313 914 325 q 938 285 917 300 q 975 251 959 270 q 1001 209 991 233 q 1011 157 1011 186 q 996 87 1011 119 q 956 33 982 56 q 894 0 930 11 q 816 -13 858 -13 q 670 31 721 -13 q 620 153 620 75 q 628 205 620 182 q 651 247 636 228 q 684 281 665 266 q 724 307 703 295 q 690 335 705 321 q 662 368 674 350 q 644 407 650 386 q 638 453 638 428 q 652 519 638 491 q 691 566 667 547 q 748 594 716 585 q 815 604 780 604 m 716 155 q 741 93 716 116 q 814 70 766 70 q 888 93 863 70 q 914 155 914 116 q 906 190 914 174 q 885 219 899 206 q 854 242 872 232 q 813 262 835 253 l 802 266 q 738 219 760 244 q 716 155 716 193 m 813 520 q 755 502 776 520 q 734 449 734 484 q 741 417 734 431 q 757 392 747 404 q 783 371 768 380 q 815 353 798 361 q 846 370 831 360 q 871 390 860 379 q 887 416 881 402 q 894 449 894 430 q 872 502 894 484 q 813 520 850 520 "},"Æ":{"x_min":-1.25,"x_max":1101,"ha":1184,"o":"m 1101 0 l 585 0 l 585 307 l 262 307 l 124 0 l -1 0 l 443 992 l 1101 992 l 1101 880 l 711 880 l 711 574 l 1075 574 l 1075 462 l 711 462 l 711 111 l 1101 111 l 1101 0 m 311 419 l 585 419 l 585 880 l 512 880 l 311 419 "},"₣":{"x_min":65,"x_max":694,"ha":765,"o":"m 310 271 l 503 271 l 503 163 l 310 163 l 310 0 l 184 0 l 184 163 l 65 163 l 65 271 l 184 271 l 184 992 l 694 992 l 694 880 l 310 880 l 310 531 l 668 531 l 668 419 l 310 419 l 310 271 "},"Ū":{"x_min":125,"x_max":845,"ha":970,"o":"m 845 993 l 845 349 q 822 205 845 272 q 755 90 800 139 q 641 13 709 41 q 481 -14 573 -14 q 327 12 394 -14 q 216 86 261 38 q 148 202 171 134 q 125 352 125 269 l 125 991 l 251 991 l 251 346 q 309 162 251 227 q 487 97 368 97 q 591 115 548 97 q 663 167 635 133 q 704 246 690 200 q 718 347 718 292 l 718 993 l 845 993 m 290 1172 l 680 1172 l 680 1071 l 290 1071 l 290 1172 "},"ы":{"x_min":118,"x_max":922,"ha":1040,"o":"m 241 439 l 401 439 q 613 386 544 439 q 683 227 683 333 q 667 133 683 175 q 616 61 651 91 q 528 15 582 31 q 398 0 475 0 l 118 0 l 118 745 l 241 745 l 241 439 m 922 0 l 798 0 l 798 745 l 922 745 l 922 0 m 241 336 l 241 102 l 388 102 q 457 108 426 102 q 511 127 488 113 q 546 164 534 141 q 559 219 559 186 q 548 275 559 252 q 515 311 537 297 q 461 330 493 325 q 386 336 429 336 l 241 336 "},"ѓ":{"x_min":118,"x_max":527,"ha":555,"o":"m 527 642 l 241 642 l 241 0 l 118 0 l 118 745 l 527 745 l 527 642 m 236 860 q 266 905 250 879 q 298 958 282 931 q 329 1013 314 986 q 354 1064 343 1040 l 503 1064 l 503 1049 q 470 1004 492 1031 q 423 946 449 976 q 369 889 397 917 q 318 842 341 860 l 236 842 l 236 860 "},"Œ":{"x_min":85,"x_max":1153,"ha":1236,"o":"m 1153 0 l 639 0 q 578 -10 609 -6 q 515 -14 548 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 516 1007 406 1007 q 640 992 583 1007 l 1153 992 l 1153 880 l 764 880 l 764 574 l 1127 574 l 1127 462 l 764 462 l 764 111 l 1153 111 l 1153 0 m 517 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 581 103 551 97 q 638 119 612 109 l 638 873 q 582 890 612 884 q 517 895 551 895 "},"΅":{"x_min":187,"x_max":614,"ha":802,"o":"m 346 959 q 361 1005 353 980 q 378 1057 370 1030 q 393 1112 386 1084 q 406 1164 401 1139 l 547 1164 l 547 1150 q 518 1102 534 1128 q 483 1049 502 1076 q 443 994 464 1022 q 401 942 423 967 l 346 942 l 346 959 m 187 945 q 201 998 187 982 q 236 1015 215 1015 q 254 1010 245 1015 q 270 998 263 1006 q 280 977 276 989 q 284 945 284 964 q 269 892 284 909 q 236 876 255 876 q 201 892 215 876 q 187 945 187 909 m 516 945 q 530 998 516 982 q 565 1015 544 1015 q 583 1010 574 1015 q 599 998 592 1006 q 609 977 605 989 q 614 945 614 964 q 599 892 614 909 q 565 876 584 876 q 530 892 544 876 q 516 945 516 909 "},"Ą":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 m 706 -161 q 724 -206 706 -191 q 766 -220 742 -220 q 799 -218 783 -220 q 825 -214 815 -217 l 825 -291 q 785 -299 807 -296 q 744 -302 764 -302 q 642 -266 676 -302 q 609 -170 609 -231 q 618 -116 609 -142 q 644 -69 628 -91 q 677 -30 659 -48 q 713 0 696 -12 l 800 0 q 706 -161 706 -90 "},"Њ":{"x_min":135,"x_max":1224,"ha":1295,"o":"m 1224 290 q 1203 170 1224 224 q 1140 79 1183 117 q 1031 20 1097 41 q 874 0 965 0 l 656 0 l 656 462 l 261 462 l 261 0 l 135 0 l 135 992 l 261 992 l 261 574 l 656 574 l 656 992 l 782 992 l 782 574 l 856 574 q 1030 551 959 574 q 1143 490 1100 529 q 1205 400 1186 452 q 1224 290 1224 349 m 782 107 l 862 107 q 1035 152 979 107 q 1090 290 1090 197 q 1074 370 1090 337 q 1028 424 1059 403 q 951 453 997 444 q 841 462 904 462 l 782 462 l 782 107 "},"›":{"x_min":56,"x_max":343.5,"ha":400,"o":"m 343 356 l 134 78 l 56 130 l 216 367 l 56 603 l 134 656 l 343 375 l 343 356 "},"ћ":{"x_min":12.1875,"x_max":707,"ha":818,"o":"m 583 0 l 583 451 q 547 583 583 539 q 436 627 512 627 q 343 609 381 627 q 283 557 306 592 q 251 473 261 523 q 241 357 241 422 l 241 0 l 118 0 l 118 843 l 12 843 l 12 932 l 118 932 l 118 1055 l 241 1055 l 241 932 l 498 932 l 498 843 l 241 843 l 241 715 l 236 616 l 242 616 q 283 666 259 645 q 334 702 306 687 q 393 723 362 716 q 457 730 424 730 q 644 665 581 730 q 707 458 707 600 l 707 0 l 583 0 "},"<":{"x_min":69,"x_max":696,"ha":765,"o":"m 696 161 l 69 448 l 69 517 l 696 844 l 696 735 l 197 488 l 696 270 l 696 161 "},"¬":{"x_min":69,"x_max":696,"ha":765,"o":"m 696 541 l 696 178 l 594 178 l 594 439 l 69 439 l 69 541 l 696 541 "},"t":{"x_min":23,"x_max":445,"ha":471,"o":"m 343 88 q 371 89 355 88 q 400 93 386 91 q 426 97 415 95 q 445 102 438 100 l 445 8 q 422 0 436 3 q 392 -7 409 -4 q 358 -12 376 -10 q 324 -14 341 -14 q 246 -3 282 -14 q 184 34 210 7 q 142 106 157 61 q 128 221 128 152 l 128 656 l 23 656 l 23 709 l 128 759 l 180 915 l 251 915 l 251 745 l 439 745 l 439 656 l 251 656 l 251 221 q 272 121 251 155 q 343 88 294 88 "},"Ц":{"x_min":135,"x_max":945,"ha":973,"o":"m 826 111 l 945 111 l 945 -261 l 818 -261 l 818 0 l 135 0 l 135 992 l 261 992 l 261 111 l 699 111 l 699 992 l 826 992 l 826 111 "},"ù":{"x_min":111,"x_max":700,"ha":818,"o":"m 600 0 l 582 99 l 575 99 q 534 48 558 70 q 483 13 511 27 q 424 -7 455 0 q 360 -14 393 -14 q 252 1 299 -14 q 174 50 205 17 q 126 135 142 83 q 111 258 111 186 l 111 745 l 234 745 l 234 264 q 270 132 234 176 q 381 88 306 88 q 474 106 436 88 q 534 158 511 123 q 566 242 556 192 q 576 357 576 292 l 576 745 l 700 745 l 700 0 l 600 0 m 471 842 l 389 842 q 337 889 365 860 q 283 946 309 917 q 236 1004 257 976 q 204 1049 214 1031 l 204 1064 l 352 1064 q 378 1013 363 1040 q 408 958 392 986 q 440 905 424 931 q 471 860 456 879 l 471 842 "},"ï":{"x_min":-13,"x_max":372,"ha":359,"o":"m 241 0 l 118 0 l 118 745 l 241 745 l 241 0 m -13 945 q 5 998 -13 982 q 52 1015 24 1015 q 98 998 78 1015 q 117 945 117 981 q 98 892 117 909 q 52 876 78 876 q 5 892 24 876 q -13 945 -13 909 m 241 945 q 260 998 241 982 q 306 1015 279 1015 q 331 1010 319 1015 q 352 998 343 1006 q 366 977 361 989 q 372 945 372 964 q 352 892 372 909 q 306 876 332 876 q 260 892 279 876 q 241 945 241 909 "},"Ф":{"x_min":71,"x_max":994,"ha":1065,"o":"m 468 1006 l 594 1006 l 594 884 l 643 884 q 801 852 735 884 q 910 768 867 820 q 973 649 953 716 q 994 514 994 583 q 985 429 994 472 q 959 343 977 385 q 913 264 942 301 q 844 199 885 227 q 749 155 803 171 q 626 139 694 139 l 594 139 l 594 -14 l 468 -14 l 468 139 l 436 139 q 314 155 368 139 q 220 199 260 171 q 151 264 179 227 q 105 343 122 301 q 79 429 87 385 q 71 514 71 472 q 91 649 71 583 q 154 768 112 716 q 262 852 197 820 q 418 884 328 884 l 468 884 l 468 1006 m 594 246 l 611 246 q 721 266 674 246 q 798 322 768 286 q 844 408 829 358 q 860 517 860 458 q 846 617 860 570 q 804 700 832 665 q 734 755 776 735 q 632 776 691 776 l 594 776 l 594 246 m 468 776 l 429 776 q 329 755 371 776 q 259 700 287 735 q 217 617 231 665 q 204 517 204 570 q 219 408 204 458 q 265 322 235 358 q 342 266 295 286 q 450 246 388 246 l 468 246 l 468 776 "},"Ò":{"x_min":85,"x_max":945,"ha":1031,"o":"m 945 496 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 701 970 622 1007 q 835 867 781 934 q 917 706 890 800 q 945 496 945 612 m 218 497 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 q 794 664 811 590 q 741 789 777 738 q 649 868 705 840 q 517 895 594 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 m 591 1071 l 509 1071 q 457 1118 485 1089 q 403 1175 429 1146 q 356 1233 377 1205 q 324 1278 334 1260 l 324 1293 l 472 1293 q 498 1242 483 1269 q 528 1187 512 1215 q 560 1134 544 1160 q 591 1089 576 1108 l 591 1071 "},"I":{"x_min":55.34375,"x_max":414.8125,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 "},"˝":{"x_min":151,"x_max":649,"ha":802,"o":"m 151 860 q 181 905 165 879 q 213 958 197 931 q 243 1013 229 986 q 269 1064 258 1040 l 404 1064 l 404 1049 q 371 1004 393 1031 q 324 946 350 976 q 270 889 298 917 q 219 842 243 860 l 151 842 l 151 860 m 397 860 q 427 905 411 879 q 459 958 443 931 q 489 1013 475 986 q 514 1064 504 1040 l 649 1064 l 649 1049 q 616 1004 638 1031 q 569 946 595 976 q 515 889 543 917 q 464 842 488 860 l 397 842 l 397 860 "},"·":{"x_min":100,"x_max":272,"ha":372,"o":"m 100 490 q 106 534 100 516 q 125 563 113 552 q 152 579 136 574 q 186 585 167 585 q 219 579 203 585 q 246 563 235 574 q 265 534 258 552 q 272 490 272 516 q 265 447 272 465 q 246 418 258 430 q 219 401 235 406 q 186 396 203 396 q 152 401 167 396 q 125 418 136 406 q 106 447 113 430 q 100 490 100 465 "},"¿":{"x_min":46,"x_max":567,"ha":591,"o":"m 401 458 l 401 432 q 395 362 401 393 q 376 304 390 331 q 341 251 363 276 q 285 196 319 225 q 229 146 252 169 q 191 100 206 123 q 169 50 176 76 q 162 -12 162 23 q 172 -72 162 -45 q 202 -118 183 -99 q 250 -148 221 -138 q 317 -159 279 -159 q 425 -141 374 -159 q 523 -100 476 -124 l 567 -199 q 447 -247 511 -227 q 318 -267 383 -267 q 204 -249 254 -267 q 118 -199 153 -232 q 64 -120 83 -167 q 46 -14 46 -73 q 54 67 46 32 q 79 133 62 102 q 120 192 95 163 q 179 252 145 220 q 231 305 211 283 q 263 349 252 328 q 280 393 275 370 q 284 445 284 415 l 284 458 l 401 458 m 433 663 q 426 619 433 637 q 408 590 420 601 q 380 574 396 579 q 346 569 365 569 q 313 574 329 569 q 286 590 298 579 q 267 619 274 601 q 260 663 260 637 q 267 706 260 688 q 286 735 274 724 q 313 752 298 747 q 346 758 329 758 q 380 752 365 758 q 408 735 396 747 q 426 706 420 724 q 433 663 433 688 "},"ſ":{"x_min":118,"x_max":476,"ha":399,"o":"m 118 0 l 118 814 q 133 934 118 886 q 177 1010 148 982 q 248 1051 206 1039 q 343 1063 290 1063 q 416 1055 383 1063 q 476 1037 450 1047 l 444 941 q 398 954 423 949 q 347 960 374 960 q 300 954 320 960 q 267 931 280 947 q 247 887 254 915 q 241 814 241 858 l 241 0 l 118 0 "},"Ђ":{"x_min":13,"x_max":873,"ha":977,"o":"m 628 -14 q 572 -9 596 -14 q 532 2 548 -5 l 532 111 q 574 101 551 105 q 624 97 597 97 q 667 103 646 97 q 707 127 689 110 q 735 174 724 144 q 746 250 746 203 l 746 340 q 711 458 746 419 q 591 497 675 497 l 370 497 l 370 0 l 244 0 l 244 880 l 13 880 l 13 992 l 654 992 l 654 880 l 370 880 l 370 609 l 605 609 q 718 592 668 609 q 802 543 768 575 q 854 464 836 511 q 873 356 873 417 l 873 263 q 855 140 873 192 q 804 53 837 87 q 727 2 772 19 q 628 -14 682 -14 "},"ű":{"x_min":111,"x_max":704,"ha":818,"o":"m 600 0 l 582 99 l 575 99 q 534 48 558 70 q 483 13 511 27 q 424 -7 455 0 q 360 -14 393 -14 q 252 1 299 -14 q 174 50 205 17 q 126 135 142 83 q 111 258 111 186 l 111 745 l 234 745 l 234 264 q 270 132 234 176 q 381 88 306 88 q 474 106 436 88 q 534 158 511 123 q 566 242 556 192 q 576 357 576 292 l 576 745 l 700 745 l 700 0 l 600 0 m 206 860 q 236 905 220 879 q 268 958 252 931 q 298 1013 284 986 q 324 1064 313 1040 l 459 1064 l 459 1049 q 426 1004 448 1031 q 379 946 405 976 q 325 889 353 917 q 274 842 298 860 l 206 842 l 206 860 m 452 860 q 482 905 466 879 q 514 958 498 931 q 544 1013 530 986 q 569 1064 559 1040 l 704 1064 l 704 1049 q 671 1004 693 1031 q 624 946 650 976 q 570 889 598 917 q 519 842 543 860 l 452 842 l 452 860 "},"Ǽ":{"x_min":-1.25,"x_max":1101,"ha":1184,"o":"m 1101 0 l 585 0 l 585 307 l 262 307 l 124 0 l -1 0 l 443 992 l 1101 992 l 1101 880 l 711 880 l 711 574 l 1075 574 l 1075 462 l 711 462 l 711 111 l 1101 111 l 1101 0 m 311 419 l 585 419 l 585 880 l 512 880 l 311 419 m 639 1089 q 669 1134 653 1108 q 701 1187 685 1160 q 732 1242 717 1215 q 757 1293 746 1269 l 906 1293 l 906 1278 q 873 1233 895 1260 q 826 1175 852 1205 q 772 1118 800 1146 q 721 1071 744 1089 l 639 1071 l 639 1089 "},"φ":{"x_min":77,"x_max":893,"ha":970,"o":"m 417 -334 l 417 -12 q 280 14 343 -8 q 173 83 218 36 q 102 201 127 129 q 77 376 77 274 q 87 484 77 432 q 117 582 98 535 q 163 671 136 629 q 220 751 189 713 l 315 686 q 269 616 290 651 q 232 542 247 581 q 208 462 217 504 q 200 371 200 419 q 217 244 200 296 q 264 160 235 193 q 334 111 294 127 q 417 90 373 95 l 417 500 q 472 692 417 627 q 626 758 528 758 q 737 730 687 758 q 821 654 786 703 q 874 538 855 606 q 893 387 893 469 q 864 212 893 286 q 786 90 835 139 q 674 16 738 41 q 540 -12 610 -8 l 540 -334 l 417 -334 m 765 386 q 755 502 765 452 q 727 586 745 552 q 684 638 709 621 q 631 655 660 655 q 596 647 613 655 q 567 622 580 640 q 547 574 555 604 q 540 501 540 545 l 540 90 q 630 115 588 95 q 701 171 671 135 q 748 261 731 207 q 765 386 765 314 "},";":{"x_min":43,"x_max":272,"ha":372,"o":"m 245 161 l 256 145 q 233 67 246 108 q 204 -15 220 26 q 170 -99 188 -57 q 136 -179 153 -141 l 43 -179 q 63 -92 53 -137 q 82 -3 72 -48 q 98 82 91 40 q 111 161 106 125 l 245 161 m 100 669 q 106 714 100 696 q 125 743 113 732 q 152 759 136 754 q 186 764 167 764 q 219 759 203 764 q 246 743 235 754 q 265 714 258 732 q 272 669 272 696 q 265 626 272 644 q 246 597 258 609 q 219 580 235 585 q 186 575 203 575 q 152 580 167 575 q 125 597 136 585 q 106 626 113 609 q 100 669 100 644 "},"Ș":{"x_min":70.109375,"x_max":657,"ha":721,"o":"m 657 264 q 633 147 657 199 q 566 59 610 95 q 460 4 523 23 q 320 -14 398 -14 q 179 -2 245 -14 q 70 32 114 9 l 70 153 q 122 131 93 142 q 184 112 151 120 q 251 99 216 104 q 319 93 285 93 q 479 134 427 93 q 530 252 530 176 q 521 316 530 289 q 486 366 511 343 q 420 410 461 389 q 316 456 379 431 q 212 508 256 480 q 139 572 168 537 q 96 652 110 607 q 83 754 83 697 q 104 860 83 813 q 165 939 126 907 q 259 989 205 972 q 380 1006 314 1006 q 525 990 460 1006 q 640 951 589 975 l 595 845 q 495 880 551 865 q 381 894 440 894 q 254 856 299 894 q 209 752 209 818 q 219 686 209 714 q 252 635 229 657 q 315 592 276 612 q 410 549 353 572 q 517 499 471 525 q 594 441 563 473 q 641 366 625 408 q 657 264 657 323 m 249 -288 q 265 -246 256 -271 q 282 -191 274 -220 q 296 -135 290 -163 q 305 -85 303 -107 l 428 -85 l 428 -98 q 413 -141 423 -115 q 387 -197 402 -167 q 353 -255 372 -226 q 315 -307 335 -284 l 249 -307 l 249 -288 "},"Ġ":{"x_min":85,"x_max":858,"ha":958,"o":"m 530 524 l 858 524 l 858 36 q 782 15 820 24 q 704 0 744 5 q 620 -10 664 -7 q 526 -14 576 -14 q 337 21 419 -14 q 199 123 255 57 q 114 284 143 189 q 85 497 85 378 q 117 708 85 613 q 211 868 149 802 q 363 970 272 934 q 569 1006 453 1006 q 713 991 644 1006 q 842 947 782 976 l 793 837 q 741 859 769 849 q 683 877 713 869 q 621 890 653 885 q 559 894 590 894 q 412 867 476 894 q 306 788 349 839 q 240 662 263 736 q 218 496 218 588 q 237 334 218 407 q 296 208 255 261 q 401 126 336 155 q 556 97 465 97 q 610 98 585 97 q 656 103 635 100 q 695 109 677 106 q 731 116 714 113 l 731 412 l 530 412 l 530 524 m 464 1174 q 484 1233 464 1215 q 535 1252 505 1252 q 564 1247 550 1252 q 587 1233 577 1243 q 602 1209 596 1224 q 608 1174 608 1195 q 587 1116 608 1135 q 535 1097 565 1097 q 484 1115 505 1097 q 464 1174 464 1134 "},"6":{"x_min":77,"x_max":701,"ha":765,"o":"m 77 423 q 84 565 77 494 q 109 700 91 636 q 158 821 127 765 q 237 918 189 877 q 352 982 285 959 q 509 1006 419 1006 q 538 1005 522 1006 q 569 1002 553 1004 q 600 998 585 1001 q 626 992 614 996 l 626 884 q 573 896 602 892 q 514 900 543 900 q 407 886 453 900 q 327 845 361 872 q 271 783 294 819 q 234 703 248 747 q 213 609 220 659 q 205 505 207 559 l 213 505 q 245 551 226 530 q 290 588 265 572 q 348 612 316 603 q 420 621 380 621 q 536 600 484 621 q 624 542 588 580 q 681 447 661 503 q 701 319 701 391 q 680 180 701 242 q 619 75 659 118 q 524 9 580 32 q 400 -14 469 -14 q 273 12 332 -14 q 170 93 213 38 q 102 229 127 147 q 77 423 77 311 m 399 91 q 473 105 440 91 q 531 147 506 118 q 568 218 555 175 q 581 320 581 261 q 570 405 581 367 q 537 469 559 442 q 481 509 514 495 q 403 524 448 524 q 321 508 358 524 q 257 466 283 492 q 216 408 231 441 q 202 343 202 376 q 214 253 202 298 q 251 172 227 208 q 313 113 276 136 q 399 91 350 91 "},"n":{"x_min":118,"x_max":707,"ha":818,"o":"m 583 0 l 583 479 q 547 611 583 567 q 436 655 512 655 q 343 637 381 655 q 283 585 306 620 q 251 501 261 551 q 241 385 241 450 l 241 0 l 118 0 l 118 745 l 218 745 l 236 644 l 242 644 q 283 694 259 673 q 334 730 306 715 q 393 751 362 744 q 457 758 424 758 q 644 693 581 758 q 707 486 707 628 l 707 0 l 583 0 "},"ά":{"x_min":77,"x_max":792.984375,"ha":814,"o":"m 383 88 q 470 104 434 88 q 528 153 506 120 q 560 238 550 186 q 572 360 571 289 l 572 370 q 563 492 572 439 q 532 581 554 545 q 473 636 510 618 q 382 655 437 655 q 247 581 290 655 q 204 369 204 507 q 247 157 204 227 q 383 88 290 88 m 359 -14 q 244 10 296 -14 q 154 83 192 34 q 97 203 117 131 q 77 370 77 275 q 97 538 77 466 q 156 659 118 610 q 249 733 194 708 q 372 758 304 758 q 497 729 448 758 q 579 644 546 701 l 587 644 q 605 695 594 667 q 633 745 616 723 l 730 745 q 716 687 723 722 q 705 610 710 651 q 698 527 701 569 q 696 446 696 484 l 696 162 q 712 104 696 121 q 752 87 729 87 q 775 89 762 87 q 792 93 787 91 l 792 3 q 760 -8 782 -2 q 715 -14 738 -14 q 668 -8 689 -14 q 630 10 647 -3 q 601 45 613 23 q 580 99 588 66 l 572 99 q 537 55 557 76 q 491 19 517 34 q 432 -5 465 3 q 359 -14 400 -14 m 359 860 q 372 906 365 880 q 385 960 379 932 q 397 1014 392 987 q 406 1064 403 1041 l 541 1064 l 541 1049 q 525 1007 536 1033 q 499 951 514 980 q 466 892 483 921 q 432 842 448 863 l 359 842 l 359 860 "},"ϊ":{"x_min":14,"x_max":428,"ha":454,"o":"m 234 743 l 234 220 q 255 121 234 154 q 326 88 277 88 q 353 89 338 88 q 383 93 368 91 q 409 97 397 95 q 428 102 421 100 l 428 8 q 405 0 419 3 q 375 -7 391 -4 q 341 -12 358 -10 q 307 -14 323 -14 q 229 -3 265 -14 q 167 34 193 7 q 125 105 140 60 q 111 219 111 150 l 111 743 l 234 743 m 14 945 q 32 998 14 982 q 79 1015 51 1015 q 125 998 105 1015 q 144 945 144 981 q 125 892 144 909 q 79 876 105 876 q 32 892 51 876 q 14 945 14 909 m 268 945 q 287 998 268 982 q 333 1015 306 1015 q 358 1010 346 1015 q 379 998 370 1006 q 393 977 388 989 q 399 945 399 964 q 379 892 399 909 q 333 876 359 876 q 287 892 306 876 q 268 945 268 909 "},"":{"x_min":0,"x_max":0,"ha":0},"ģ":{"x_min":25,"x_max":692.484375,"ha":720,"o":"m 692 745 l 692 668 l 559 649 q 591 588 578 625 q 604 504 604 551 q 588 409 604 453 q 539 333 572 365 q 459 283 507 301 q 348 266 412 266 q 319 266 333 266 q 294 268 304 266 q 271 253 282 261 q 251 233 260 244 q 236 208 242 222 q 230 178 230 194 q 238 148 230 159 q 260 130 246 136 q 293 122 274 124 q 333 120 312 120 l 453 120 q 560 104 516 120 q 631 61 603 88 q 670 -2 658 34 q 683 -80 683 -38 q 660 -186 683 -139 q 593 -266 638 -233 q 478 -316 547 -298 q 314 -334 408 -334 q 187 -319 241 -334 q 96 -278 132 -305 q 42 -213 60 -251 q 25 -128 25 -175 q 38 -57 25 -87 q 73 -4 51 -26 q 125 32 96 17 q 187 53 155 46 q 140 94 158 66 q 122 159 122 122 q 143 231 122 201 q 212 291 165 262 q 158 324 182 303 q 118 373 134 346 q 92 433 101 401 q 83 500 83 466 q 99 608 83 561 q 150 689 116 656 q 233 740 183 722 q 348 758 282 758 q 400 754 373 758 q 445 745 427 750 l 692 745 m 141 -126 q 150 -173 141 -151 q 179 -211 159 -195 q 232 -235 199 -226 q 314 -245 265 -245 q 503 -205 440 -245 q 566 -92 566 -166 q 558 -41 566 -61 q 531 -10 550 -21 q 482 4 512 0 q 407 8 451 8 l 287 8 q 238 3 263 8 q 190 -17 212 -2 q 155 -58 169 -32 q 141 -126 141 -84 m 206 504 q 242 388 206 426 q 344 350 278 350 q 446 388 411 350 q 480 506 480 426 q 445 629 480 590 q 343 669 410 669 q 241 628 277 669 q 206 504 206 587 m 467 1045 q 450 1003 458 1028 q 433 948 441 977 q 418 892 424 920 q 410 842 412 864 l 288 842 l 288 856 q 302 898 291 872 q 328 954 312 925 q 362 1012 343 983 q 400 1064 381 1041 l 467 1064 l 467 1045 "},"∂":{"x_min":66,"x_max":734,"ha":807,"o":"m 734 633 q 723 485 734 561 q 690 336 712 408 q 633 201 668 264 q 552 89 599 137 q 446 13 506 41 q 312 -14 386 -14 q 192 8 240 -14 q 117 68 145 30 q 77 153 89 105 q 66 254 66 202 q 73 342 66 294 q 98 438 81 390 q 142 530 115 486 q 209 609 170 575 q 299 664 247 643 q 417 685 351 685 q 529 658 479 685 q 609 584 578 631 q 610 611 610 597 q 610 633 610 626 q 563 831 610 762 q 424 899 516 899 q 380 895 403 899 q 334 883 357 891 q 289 865 311 876 q 249 841 268 854 l 249 959 q 288 975 266 968 q 336 989 311 983 q 389 998 362 995 q 441 1002 415 1002 q 582 971 525 1002 q 671 890 638 941 q 719 773 705 839 q 734 633 734 706 m 319 88 q 387 103 355 88 q 446 145 418 118 q 496 207 473 171 q 537 285 519 243 q 567 373 555 327 q 586 465 580 419 q 566 516 580 492 q 532 557 552 540 q 487 585 512 575 q 434 596 462 596 q 358 579 392 596 q 296 535 323 563 q 250 471 270 507 q 218 397 230 435 q 199 321 205 359 q 193 251 193 283 q 200 186 193 216 q 222 135 207 157 q 261 100 238 113 q 319 88 285 88 "},"κ":{"x_min":118,"x_max":684.25,"ha":689,"o":"m 545 0 l 315 331 l 241 276 l 241 0 l 118 0 l 118 745 l 241 745 l 241 554 q 239 479 241 513 q 236 418 238 444 q 230 364 233 388 l 319 483 l 526 745 l 665 745 l 394 412 l 684 0 l 545 0 "},"‡":{"x_min":84,"x_max":606.171875,"ha":689,"o":"m 380 336 l 606 357 l 606 235 l 380 256 l 418 0 l 271 0 l 308 256 l 84 235 l 84 357 l 308 336 l 277 532 l 308 718 l 84 697 l 84 820 l 308 799 l 271 1055 l 418 1055 l 380 799 l 606 820 l 606 697 l 380 718 l 412 532 l 380 336 "},"ň":{"x_min":118,"x_max":707,"ha":818,"o":"m 583 0 l 583 479 q 547 611 583 567 q 436 655 512 655 q 343 637 381 655 q 283 585 306 620 q 251 501 261 551 q 241 385 241 450 l 241 0 l 118 0 l 118 745 l 218 745 l 236 644 l 242 644 q 283 694 259 673 q 334 730 306 715 q 393 751 362 744 q 457 758 424 758 q 644 693 581 758 q 707 486 707 628 l 707 0 l 583 0 m 634 1045 q 593 1000 617 1026 q 547 947 570 974 q 504 892 524 919 q 474 842 484 865 l 343 842 q 313 892 333 865 q 270 947 293 919 q 224 1000 247 974 q 184 1045 201 1026 l 184 1064 l 266 1064 q 336 1008 300 1041 q 409 937 372 975 q 480 1008 444 975 q 552 1064 517 1041 l 634 1064 l 634 1045 "},"√":{"x_min":25,"x_max":828.25,"ha":762,"o":"m 424 -10 l 334 -10 l 147 522 l 25 522 l 25 615 l 226 615 l 381 165 l 729 1150 l 828 1150 l 424 -10 "},"ę":{"x_min":77,"x_max":673,"ha":743,"o":"m 412 -14 q 276 11 337 -14 q 170 84 214 36 q 101 203 125 132 q 77 366 77 274 q 99 531 77 458 q 162 654 121 604 q 259 731 202 705 q 384 758 316 758 q 505 733 451 758 q 595 665 558 709 q 653 560 633 621 q 673 423 673 498 l 673 346 l 204 346 q 259 155 207 216 q 413 93 311 93 q 477 97 448 93 q 534 107 507 100 q 587 123 561 113 q 639 145 613 133 l 639 35 q 586 13 612 22 q 533 -2 560 3 q 476 -11 505 -8 q 412 -14 446 -14 m 384 655 q 260 602 306 655 q 207 449 214 549 l 545 449 q 536 533 545 495 q 507 598 526 571 q 457 640 487 625 q 384 655 427 655 m 506 -140 q 524 -185 506 -170 q 566 -199 542 -199 q 599 -197 583 -199 q 625 -193 615 -196 l 625 -270 q 585 -278 607 -275 q 544 -281 564 -281 q 442 -245 476 -281 q 409 -149 409 -210 q 418 -95 409 -121 q 444 -48 428 -70 q 477 -9 459 -27 q 513 21 496 8 l 600 21 q 506 -140 506 -69 "},"į":{"x_min":47,"x_max":263,"ha":359,"o":"m 241 0 l 118 0 l 118 745 l 241 745 l 241 0 m 108 945 q 129 1004 108 986 q 180 1023 149 1023 q 208 1018 195 1023 q 231 1004 221 1014 q 247 980 241 995 q 252 945 252 966 q 231 887 252 906 q 180 868 210 868 q 129 886 149 868 q 108 945 108 905 m 144 -161 q 162 -206 144 -191 q 204 -220 180 -220 q 237 -218 221 -220 q 263 -214 253 -217 l 263 -291 q 223 -299 245 -296 q 182 -302 202 -302 q 80 -266 114 -302 q 47 -170 47 -231 q 56 -116 47 -142 q 82 -69 66 -91 q 115 -30 97 -48 q 151 0 134 -12 l 238 0 q 144 -161 144 -90 "},"Τ":{"x_min":14,"x_max":706,"ha":721,"o":"m 423 0 l 297 0 l 297 880 l 14 880 l 14 992 l 706 992 l 706 880 l 423 880 l 423 0 "},"≈":{"x_min":69,"x_max":696,"ha":765,"o":"m 359 300 q 315 318 334 311 q 281 330 297 326 q 252 336 266 334 q 223 338 238 338 q 184 331 204 338 q 143 314 164 325 q 104 288 123 303 q 69 256 85 273 l 69 366 q 237 440 136 440 q 273 438 256 440 q 309 432 290 436 q 350 419 328 427 q 405 397 373 411 q 449 379 430 386 q 483 367 468 371 q 513 361 499 363 q 541 359 527 359 q 581 366 560 359 q 621 383 601 372 q 660 409 641 394 q 696 441 679 424 l 696 331 q 527 258 628 258 q 491 259 508 258 q 455 265 474 261 q 414 278 436 270 q 359 300 391 287 m 359 578 q 315 596 334 589 q 281 608 297 604 q 252 614 266 612 q 223 616 238 616 q 184 609 204 616 q 143 592 164 603 q 104 566 123 581 q 69 533 85 551 l 69 643 q 237 718 136 718 q 273 716 256 718 q 309 709 290 714 q 350 696 328 705 q 405 674 373 688 q 449 656 430 664 q 483 645 468 649 q 513 639 499 641 q 541 637 527 637 q 581 644 560 637 q 621 661 601 650 q 660 687 641 672 q 696 719 679 702 l 696 609 q 527 536 630 536 q 491 537 508 536 q 455 543 474 539 q 414 556 436 548 q 359 578 391 565 "},"ΐ":{"x_min":-19,"x_max":428,"ha":454,"o":"m 234 743 l 234 220 q 255 121 234 154 q 326 88 277 88 q 353 89 338 88 q 383 93 368 91 q 409 97 397 95 q 428 102 421 100 l 428 8 q 405 0 419 3 q 375 -7 391 -4 q 341 -12 358 -10 q 307 -14 323 -14 q 229 -3 265 -14 q 167 34 193 7 q 125 105 140 60 q 111 219 111 150 l 111 743 l 234 743 m 140 959 q 155 1005 147 980 q 172 1057 164 1030 q 187 1112 180 1084 q 200 1164 195 1139 l 341 1164 l 341 1150 q 312 1102 328 1128 q 277 1049 296 1076 q 237 994 258 1022 q 195 942 217 967 l 140 942 l 140 959 m -19 945 q -4 998 -19 982 q 30 1015 9 1015 q 48 1010 39 1015 q 64 998 57 1006 q 74 977 70 989 q 78 945 78 964 q 63 892 78 909 q 30 876 49 876 q -4 892 9 876 q -19 945 -19 909 m 310 945 q 324 998 310 982 q 359 1015 338 1015 q 377 1010 368 1015 q 393 998 386 1006 q 403 977 399 989 q 408 945 408 964 q 393 892 408 909 q 359 876 378 876 q 324 892 338 876 q 310 945 310 909 "},"ĸ":{"x_min":118,"x_max":684.25,"ha":689,"o":"m 545 0 l 315 331 l 241 276 l 241 0 l 118 0 l 118 745 l 241 745 l 241 554 q 239 479 241 513 q 236 418 238 444 q 230 364 233 388 l 319 483 l 526 745 l 665 745 l 394 412 l 684 0 l 545 0 "},"g":{"x_min":25,"x_max":692.484375,"ha":720,"o":"m 692 745 l 692 668 l 559 649 q 591 588 578 625 q 604 504 604 551 q 588 409 604 453 q 539 333 572 365 q 459 283 507 301 q 348 266 412 266 q 319 266 333 266 q 294 268 304 266 q 271 253 282 261 q 251 233 260 244 q 236 208 242 222 q 230 178 230 194 q 238 148 230 159 q 260 130 246 136 q 293 122 274 124 q 333 120 312 120 l 453 120 q 560 104 516 120 q 631 61 603 88 q 670 -2 658 34 q 683 -80 683 -38 q 660 -186 683 -139 q 593 -266 638 -233 q 478 -316 547 -298 q 314 -334 408 -334 q 187 -319 241 -334 q 96 -278 132 -305 q 42 -213 60 -251 q 25 -128 25 -175 q 38 -57 25 -87 q 73 -4 51 -26 q 125 32 96 17 q 187 53 155 46 q 140 94 158 66 q 122 159 122 122 q 143 231 122 201 q 212 291 165 262 q 158 324 182 303 q 118 373 134 346 q 92 433 101 401 q 83 500 83 466 q 99 608 83 561 q 150 689 116 656 q 233 740 183 722 q 348 758 282 758 q 400 754 373 758 q 445 745 427 750 l 692 745 m 141 -126 q 150 -173 141 -151 q 179 -211 159 -195 q 232 -235 199 -226 q 314 -245 265 -245 q 503 -205 440 -245 q 566 -92 566 -166 q 558 -41 566 -61 q 531 -10 550 -21 q 482 4 512 0 q 407 8 451 8 l 287 8 q 238 3 263 8 q 190 -17 212 -2 q 155 -58 169 -32 q 141 -126 141 -84 m 206 504 q 242 388 206 426 q 344 350 278 350 q 446 388 411 350 q 480 506 480 426 q 445 629 480 590 q 343 669 410 669 q 241 628 277 669 q 206 504 206 587 "},"ǿ":{"x_min":78,"x_max":727,"ha":802,"o":"m 727 373 q 704 208 727 280 q 639 86 681 135 q 536 11 596 37 q 400 -14 475 -14 q 249 21 315 -14 l 202 -52 l 113 -1 l 168 87 q 101 208 125 135 q 78 373 78 280 q 100 537 78 465 q 165 657 123 608 q 268 732 207 707 q 404 758 329 758 q 485 748 447 758 q 557 719 524 738 l 603 793 l 692 743 l 638 655 q 703 535 680 606 q 727 373 727 464 m 205 373 q 211 271 205 316 q 233 192 218 227 l 503 631 q 457 649 483 643 q 401 655 432 655 q 251 585 297 655 q 205 373 205 515 m 599 373 q 573 548 599 481 l 302 110 q 348 93 323 99 q 403 88 372 88 q 553 159 507 88 q 599 373 599 231 m 321 860 q 351 905 335 879 q 383 958 367 931 q 414 1013 399 986 q 439 1064 428 1040 l 588 1064 l 588 1049 q 555 1004 577 1031 q 508 946 534 976 q 454 889 482 917 q 403 842 426 860 l 321 842 l 321 860 "},"²":{"x_min":33,"x_max":421.734375,"ha":460,"o":"m 421 397 l 33 397 l 33 472 l 175 627 q 238 697 214 669 q 277 749 263 726 q 295 791 290 771 q 301 834 301 811 q 278 899 301 878 q 219 920 255 920 q 152 903 184 920 q 90 860 120 886 l 37 924 q 118 981 73 958 q 219 1004 164 1004 q 293 992 260 1004 q 349 960 326 981 q 385 907 372 938 q 398 837 398 876 q 387 774 398 803 q 356 715 376 744 q 307 655 336 686 q 239 587 277 624 l 129 480 l 421 480 l 421 397 "},"Ã":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 m 523 1072 q 469 1083 496 1072 q 417 1110 443 1095 q 367 1136 391 1124 q 322 1148 343 1148 q 275 1130 291 1148 q 249 1070 259 1112 l 179 1070 q 193 1144 182 1111 q 222 1201 204 1177 q 265 1237 240 1224 q 322 1250 290 1250 q 378 1238 350 1250 q 431 1211 405 1226 q 480 1185 457 1197 q 523 1173 504 1173 q 569 1191 554 1173 q 595 1251 585 1209 l 667 1251 q 652 1177 663 1210 q 623 1121 641 1144 q 580 1084 605 1097 q 523 1072 555 1072 "},"Ј":{"x_min":-125,"x_max":251.15625,"ha":376,"o":"m -19 -264 q -80 -259 -54 -264 q -125 -247 -106 -255 l -125 -139 q -75 -149 -101 -145 q -18 -152 -48 -152 q 32 -146 6 -152 q 78 -122 57 -139 q 112 -76 99 -105 q 125 0 125 -46 l 125 992 l 251 992 l 251 13 q 231 -109 251 -57 q 175 -196 211 -162 q 90 -247 140 -230 q -19 -264 40 -264 "},"©":{"x_min":68,"x_max":1088,"ha":1156,"o":"m 604 713 q 531 698 563 713 q 477 655 499 683 q 444 587 455 627 q 433 495 433 546 q 443 402 433 443 q 473 334 453 361 q 526 291 494 306 q 604 277 559 277 q 638 279 620 277 q 676 286 657 281 q 714 295 695 290 q 751 307 734 301 l 751 218 q 718 205 734 211 q 683 194 701 199 q 645 187 665 189 q 600 185 624 185 q 479 207 531 185 q 393 271 428 229 q 342 370 359 312 q 325 497 325 427 q 343 622 325 566 q 397 719 361 679 q 484 783 432 760 q 604 806 536 806 q 692 794 647 806 q 777 763 736 783 l 734 677 q 666 704 699 694 q 604 713 633 713 m 68 495 q 86 631 68 566 q 137 753 104 696 q 217 856 170 809 q 320 936 264 903 q 442 987 377 969 q 578 1006 507 1006 q 713 987 648 1006 q 835 936 778 969 q 938 856 892 903 q 1018 753 985 809 q 1069 631 1051 696 q 1088 495 1088 566 q 1069 359 1088 425 q 1018 238 1051 294 q 938 134 985 181 q 835 55 892 88 q 713 3 778 21 q 578 -14 648 -14 q 442 3 507 -14 q 320 55 377 21 q 217 134 264 88 q 137 238 170 181 q 86 359 104 294 q 68 495 68 425 m 141 496 q 176 326 141 405 q 269 187 210 247 q 408 94 329 128 q 578 59 487 59 q 747 94 668 59 q 886 187 826 128 q 979 326 945 247 q 1014 496 1014 405 q 979 665 1014 586 q 886 804 945 744 q 747 897 826 863 q 578 932 668 932 q 408 897 487 932 q 269 804 329 863 q 176 665 210 744 q 141 496 141 586 "},"≥":{"x_min":69,"x_max":696,"ha":765,"o":"m 69 270 l 569 488 l 69 734 l 69 844 l 696 517 l 696 448 l 69 161 l 69 270 m 69 0 l 69 101 l 696 101 l 696 0 l 69 0 "},"Ă":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 m 626 1259 q 608 1183 623 1217 q 567 1123 593 1149 q 504 1084 541 1098 q 419 1071 467 1071 q 332 1084 369 1071 q 271 1122 295 1097 q 233 1181 246 1147 q 218 1259 220 1216 l 292 1259 q 304 1212 295 1229 q 330 1186 314 1194 q 369 1175 346 1177 q 422 1172 392 1172 q 468 1175 446 1172 q 508 1188 490 1178 q 537 1214 525 1197 q 551 1259 548 1231 l 626 1259 "},"ґ":{"x_min":118,"x_max":527,"ha":555,"o":"m 527 656 l 241 656 l 241 0 l 118 0 l 118 745 l 403 745 l 403 961 l 527 961 l 527 656 "},"ÿ":{"x_min":6.75,"x_max":672.25,"ha":679,"o":"m 6 745 l 134 745 l 280 329 q 300 272 290 301 q 318 212 310 242 q 333 154 327 182 q 341 103 339 126 l 346 103 q 356 149 349 120 q 373 211 364 178 q 392 276 382 244 q 409 330 402 308 l 544 745 l 672 745 l 377 -96 q 336 -195 358 -152 q 285 -270 314 -239 q 217 -317 256 -300 q 123 -334 177 -334 q 62 -330 88 -334 q 18 -322 36 -326 l 18 -223 q 54 -229 32 -226 q 99 -231 75 -231 q 156 -223 132 -231 q 197 -201 179 -216 q 227 -164 215 -186 q 250 -115 240 -142 l 289 -6 l 6 745 m 155 945 q 173 998 155 982 q 220 1015 192 1015 q 266 998 246 1015 q 285 945 285 981 q 266 892 285 909 q 220 876 246 876 q 173 892 192 876 q 155 945 155 909 m 409 945 q 428 998 409 982 q 474 1015 447 1015 q 499 1010 487 1015 q 520 998 511 1006 q 534 977 529 989 q 540 945 540 964 q 520 892 540 909 q 474 876 500 876 q 428 892 447 876 q 409 945 409 909 "},"Ł":{"x_min":20,"x_max":649.4375,"ha":682,"o":"m 135 458 l 135 992 l 261 992 l 261 537 l 415 635 l 468 550 l 261 420 l 261 111 l 649 111 l 649 0 l 135 0 l 135 341 l 69 301 l 20 385 l 135 458 "}," ":{"x_min":0,"x_max":0,"ha":372},"∫":{"x_min":10.578125,"x_max":524.65625,"ha":538,"o":"m 435 1055 q 484 1051 458 1055 q 524 1042 509 1048 l 524 944 q 491 956 512 950 q 446 962 471 962 q 389 948 412 962 q 354 913 367 935 q 335 862 340 891 q 330 803 330 834 l 330 -92 q 313 -202 330 -156 q 265 -276 296 -247 q 193 -320 235 -306 q 101 -334 151 -334 q 51 -330 77 -334 q 10 -321 26 -326 l 10 -224 q 45 -235 24 -230 q 89 -241 66 -241 q 147 -228 124 -241 q 185 -194 171 -215 q 205 -143 199 -172 q 212 -82 212 -115 l 212 814 q 227 923 212 878 q 273 998 243 969 q 343 1041 302 1027 q 435 1055 384 1055 "},"\\":{"x_min":15.75,"x_max":505.375,"ha":518,"o":"m 136 992 l 505 0 l 384 0 l 15 992 l 136 992 "},"Ì":{"x_min":42,"x_max":414.8125,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 m 309 1071 l 227 1071 q 175 1118 203 1089 q 121 1175 147 1146 q 74 1233 95 1205 q 42 1278 52 1260 l 42 1293 l 190 1293 q 216 1242 201 1269 q 246 1187 230 1215 q 278 1134 262 1160 q 309 1089 294 1108 l 309 1071 "},"ъ":{"x_min":28,"x_max":865,"ha":942,"o":"m 395 439 l 582 439 q 795 386 726 439 q 865 227 865 333 q 849 133 865 175 q 798 61 833 91 q 710 15 764 31 q 580 0 656 0 l 272 0 l 272 642 l 28 642 l 28 745 l 395 745 l 395 439 m 741 219 q 730 275 741 252 q 697 311 719 297 q 643 330 675 325 q 567 336 610 336 l 395 336 l 395 102 l 570 102 q 638 108 607 102 q 693 127 670 113 q 728 164 715 141 q 741 219 741 186 "},"ς":{"x_min":77,"x_max":596,"ha":632,"o":"m 204 351 q 213 245 204 286 q 248 177 223 204 q 315 135 272 151 q 424 104 358 119 q 504 78 472 94 q 556 42 536 62 q 584 -1 576 22 q 593 -54 593 -25 q 585 -114 593 -84 q 567 -172 578 -144 q 541 -225 555 -200 q 511 -272 526 -250 l 396 -272 q 426 -225 412 -250 q 451 -177 440 -201 q 469 -129 463 -152 q 476 -87 476 -107 q 471 -61 476 -74 q 450 -37 466 -48 q 403 -15 434 -25 q 321 5 373 -4 q 224 37 269 15 q 147 99 180 59 q 95 200 114 139 q 77 349 77 261 q 101 530 77 454 q 170 657 126 607 q 275 733 215 708 q 408 758 336 758 q 511 746 461 758 q 596 718 562 735 l 559 614 q 524 627 543 621 q 485 638 505 633 q 445 647 465 644 q 408 650 425 650 q 315 630 354 650 q 252 573 276 611 q 216 479 227 535 q 204 351 204 423 "},"Ē":{"x_min":135,"x_max":650,"ha":733,"o":"m 650 0 l 135 0 l 135 992 l 650 992 l 650 880 l 261 880 l 261 574 l 624 574 l 624 462 l 261 462 l 261 111 l 650 111 l 650 0 m 199 1172 l 589 1172 l 589 1071 l 199 1071 l 199 1172 "},"!":{"x_min":100,"x_max":272.265625,"ha":374,"o":"m 228 280 l 146 280 l 112 992 l 262 992 l 228 280 m 100 74 q 106 118 100 100 q 125 147 113 136 q 152 163 136 158 q 186 169 167 169 q 219 163 203 169 q 247 147 235 158 q 265 118 258 136 q 272 74 272 100 q 265 31 272 49 q 247 2 258 13 q 219 -14 235 -9 q 186 -20 203 -20 q 152 -14 167 -20 q 125 2 136 -9 q 106 31 113 13 q 100 74 100 49 "},"ç":{"x_min":77,"x_max":596,"ha":643,"o":"m 402 -14 q 274 7 334 -14 q 171 75 215 28 q 102 193 127 121 q 77 367 77 266 q 102 548 77 474 q 173 669 128 623 q 278 736 218 715 q 408 758 339 758 q 511 746 461 758 q 596 718 562 735 l 559 614 q 524 627 543 621 q 485 638 505 633 q 445 647 465 644 q 408 650 425 650 q 253 581 302 650 q 204 369 204 513 q 253 160 204 226 q 402 93 302 93 q 502 106 457 93 q 583 135 546 118 l 583 26 q 504 -3 546 6 q 402 -14 463 -14 m 495 -194 q 447 -297 495 -260 q 297 -334 399 -334 q 267 -331 282 -334 q 242 -327 252 -329 l 242 -254 q 268 -257 252 -256 q 295 -258 285 -258 q 370 -247 343 -258 q 397 -208 397 -235 q 388 -186 397 -195 q 364 -169 379 -176 q 327 -157 349 -162 q 282 -147 306 -152 l 343 0 l 425 0 l 386 -78 q 429 -92 409 -83 q 463 -115 448 -101 q 486 -148 478 -128 q 495 -194 495 -168 "},"Й":{"x_min":136,"x_max":879,"ha":1013,"o":"m 136 992 l 262 992 l 262 449 q 261 410 262 431 q 260 366 261 389 q 259 321 260 343 q 257 276 258 298 q 251 174 254 226 l 256 174 l 725 992 l 879 992 l 879 0 l 752 0 l 752 538 q 754 624 752 576 q 759 717 756 673 q 765 821 762 768 l 760 821 l 289 0 l 136 0 l 136 992 m 754 1287 q 733 1193 749 1234 q 685 1126 716 1153 q 605 1084 653 1098 q 489 1071 557 1071 q 372 1084 420 1071 q 295 1124 324 1097 q 251 1192 265 1151 q 234 1287 237 1232 l 349 1287 q 361 1219 352 1245 q 388 1178 371 1193 q 430 1158 405 1163 q 492 1152 456 1152 q 547 1159 522 1152 q 590 1181 572 1166 q 620 1222 608 1197 q 635 1287 631 1248 l 754 1287 "},"Б":{"x_min":135,"x_max":729,"ha":800,"o":"m 729 290 q 708 170 729 224 q 645 79 688 117 q 537 20 602 41 q 380 0 471 0 l 135 0 l 135 992 l 669 992 l 669 880 l 261 880 l 261 574 l 362 574 q 536 551 465 574 q 648 490 606 529 q 710 400 691 452 q 729 290 729 349 m 261 107 l 368 107 q 540 152 485 107 q 595 290 595 197 q 579 370 595 337 q 533 424 564 403 q 456 453 503 444 q 347 462 410 462 l 261 462 l 261 107 "},"đ":{"x_min":77,"x_max":801.796875,"ha":814,"o":"m 577 99 l 572 99 q 537 55 557 76 q 491 19 517 34 q 432 -5 465 3 q 359 -14 400 -14 q 244 9 296 -14 q 154 80 192 33 q 97 196 117 127 q 77 356 77 265 q 97 517 77 447 q 154 634 117 587 q 244 705 192 681 q 359 730 296 730 q 432 721 399 730 q 490 698 464 713 q 537 663 516 683 q 572 622 557 643 l 580 622 q 576 666 578 645 q 573 703 575 684 q 572 733 572 722 l 572 843 l 316 843 l 316 932 l 572 932 l 572 1055 l 696 1055 l 696 932 l 801 932 l 801 843 l 696 843 l 696 0 l 596 0 l 577 99 m 383 88 q 470 103 434 88 q 528 148 506 118 q 560 223 550 178 q 572 329 571 268 l 572 356 q 563 472 572 422 q 532 557 554 523 q 473 609 510 592 q 382 627 437 627 q 247 557 290 627 q 204 354 204 487 q 247 154 204 220 q 383 88 290 88 "},"ċ":{"x_min":77,"x_max":596,"ha":643,"o":"m 402 -14 q 274 7 334 -14 q 171 75 215 28 q 102 193 127 121 q 77 367 77 266 q 102 548 77 474 q 173 669 128 623 q 278 736 218 715 q 408 758 339 758 q 511 746 461 758 q 596 718 562 735 l 559 614 q 524 627 543 621 q 485 638 505 633 q 445 647 465 644 q 408 650 425 650 q 253 581 302 650 q 204 369 204 513 q 253 160 204 226 q 402 93 302 93 q 502 106 457 93 q 583 135 546 118 l 583 26 q 504 -3 546 6 q 402 -14 463 -14 m 317 945 q 337 1004 317 986 q 388 1023 358 1023 q 417 1018 403 1023 q 440 1004 430 1014 q 455 980 449 995 q 461 945 461 966 q 440 887 461 906 q 388 868 418 868 q 337 886 358 868 q 317 945 317 905 "},"Ā":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 m 227 1172 l 617 1172 l 617 1071 l 227 1071 l 227 1172 "},"Ẃ":{"x_min":13.75,"x_max":1214.25,"ha":1228,"o":"m 549 992 l 682 992 l 837 411 q 857 335 847 373 q 876 261 867 297 q 891 194 884 225 q 901 136 897 162 q 908 192 904 162 q 917 256 912 223 q 929 325 923 290 q 943 393 936 360 l 1079 992 l 1214 992 l 965 0 l 837 0 l 665 636 q 647 707 656 671 q 631 776 638 744 q 615 848 622 813 q 600 776 608 814 q 585 707 593 745 q 567 632 576 669 l 402 0 l 275 0 l 13 992 l 147 992 l 298 388 q 313 323 306 357 q 325 257 320 290 q 336 192 331 223 q 344 136 341 162 q 352 194 347 161 q 364 264 358 227 q 379 338 371 301 q 396 409 387 376 l 549 992 m 549 1089 q 579 1134 563 1108 q 611 1187 595 1160 q 642 1242 627 1215 q 667 1293 656 1269 l 816 1293 l 816 1278 q 783 1233 805 1260 q 736 1175 762 1205 q 682 1118 710 1146 q 631 1071 654 1089 l 549 1071 l 549 1089 "},"ø":{"x_min":78,"x_max":727,"ha":802,"o":"m 727 373 q 704 208 727 280 q 639 86 681 135 q 536 11 596 37 q 400 -14 475 -14 q 249 21 315 -14 l 202 -52 l 113 -1 l 168 87 q 101 208 125 135 q 78 373 78 280 q 100 537 78 465 q 165 657 123 608 q 268 732 207 707 q 404 758 329 758 q 485 748 447 758 q 557 719 524 738 l 603 793 l 692 743 l 638 655 q 703 535 680 606 q 727 373 727 464 m 205 373 q 211 271 205 316 q 233 192 218 227 l 503 631 q 457 649 483 643 q 401 655 432 655 q 251 585 297 655 q 205 373 205 515 m 599 373 q 573 548 599 481 l 302 110 q 348 93 323 99 q 403 88 372 88 q 553 159 507 88 q 599 373 599 231 "},"â":{"x_min":64,"x_max":626,"ha":737,"o":"m 536 0 l 511 102 l 505 102 q 461 50 483 72 q 412 13 439 28 q 353 -7 386 0 q 278 -14 321 -14 q 193 0 232 -14 q 125 40 153 12 q 80 109 96 67 q 64 208 64 151 q 142 379 64 320 q 379 445 220 439 l 503 450 l 503 496 q 494 572 503 541 q 465 620 484 602 q 419 647 447 639 q 357 655 392 655 q 253 639 301 655 q 160 599 204 623 l 117 692 q 228 739 167 720 q 357 758 290 758 q 477 744 427 758 q 560 700 527 730 q 609 623 593 669 q 626 509 626 576 l 626 0 l 536 0 m 310 88 q 386 101 351 88 q 447 140 422 114 q 488 205 473 166 q 502 298 502 245 l 502 365 l 405 360 q 303 346 345 357 q 237 316 262 336 q 202 270 213 297 q 191 208 191 243 q 224 117 191 146 q 310 88 257 88 m 605 842 l 523 842 q 451 897 488 864 q 380 967 415 930 q 307 897 343 930 q 237 842 271 864 l 155 842 l 155 860 q 195 905 172 879 q 241 958 218 931 q 284 1013 264 986 q 314 1064 304 1040 l 445 1064 q 475 1013 455 1040 q 518 958 495 986 q 564 905 541 931 q 605 860 588 879 l 605 842 "},"}":{"x_min":36,"x_max":451,"ha":492,"o":"m 153 214 q 193 328 153 286 q 311 383 233 369 l 311 391 q 193 446 233 405 q 153 559 153 488 l 153 783 q 145 836 153 815 q 122 868 137 857 q 84 885 106 880 q 36 890 63 889 l 36 992 q 132 980 87 991 q 208 944 176 968 q 258 883 240 920 q 277 793 277 846 l 277 567 q 288 507 277 531 q 321 467 299 483 q 376 445 343 452 q 451 439 408 439 l 451 337 q 321 307 366 337 q 277 208 277 278 l 277 -19 q 258 -110 277 -73 q 208 -172 240 -148 q 132 -208 176 -196 q 36 -220 87 -219 l 36 -118 q 84 -113 63 -117 q 122 -96 106 -108 q 145 -64 137 -84 q 153 -10 153 -43 l 153 214 "},"Δ":{"x_min":25,"x_max":765,"ha":789,"o":"m 765 84 l 765 0 l 25 0 l 25 90 l 330 992 l 457 992 l 765 84 m 393 852 q 367 745 381 802 q 333 626 352 688 l 158 111 l 631 111 l 457 622 q 419 745 435 688 q 393 852 403 802 "},"‰":{"x_min":69,"x_max":1555,"ha":1624,"o":"m 169 695 q 193 527 169 583 q 271 471 217 471 q 377 695 377 471 q 271 917 377 917 q 193 862 217 917 q 169 695 169 807 m 478 695 q 465 564 478 622 q 428 465 453 505 q 364 404 403 425 q 271 383 325 383 q 184 404 222 383 q 120 465 146 425 q 81 564 94 505 q 69 695 69 622 q 80 826 69 769 q 117 924 92 884 q 180 984 142 963 q 271 1006 218 1006 q 360 984 322 1006 q 425 924 399 963 q 464 826 451 884 q 478 695 478 769 m 769 297 q 793 129 769 185 q 871 74 817 74 q 976 297 976 74 q 871 519 976 519 q 793 464 817 519 q 769 297 769 409 m 1077 298 q 1065 166 1077 224 q 1028 68 1053 108 q 964 7 1003 28 q 871 -14 925 -14 q 783 7 821 -14 q 720 68 745 28 q 681 166 694 108 q 669 298 669 224 q 680 428 669 371 q 717 526 692 486 q 780 586 742 565 q 871 608 818 608 q 960 586 922 608 q 1024 526 999 565 q 1063 428 1050 486 q 1077 298 1077 371 m 903 992 l 352 0 l 245 0 l 796 992 l 903 992 m 1247 297 q 1271 129 1247 185 q 1349 74 1295 74 q 1454 297 1454 74 q 1349 519 1454 519 q 1271 464 1295 519 q 1247 297 1247 409 m 1555 298 q 1543 166 1555 224 q 1506 68 1531 108 q 1442 7 1481 28 q 1349 -14 1403 -14 q 1261 7 1299 -14 q 1198 68 1223 28 q 1159 166 1172 108 q 1147 298 1147 224 q 1158 428 1147 371 q 1195 526 1170 486 q 1258 586 1220 565 q 1349 608 1296 608 q 1438 586 1399 608 q 1502 526 1477 565 q 1541 428 1528 486 q 1555 298 1555 371 "},"Ä":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 m 230 1174 q 248 1227 230 1211 q 295 1244 267 1244 q 341 1227 321 1244 q 360 1174 360 1210 q 341 1121 360 1138 q 295 1105 321 1105 q 248 1121 267 1105 q 230 1174 230 1138 m 484 1174 q 503 1227 484 1211 q 549 1244 522 1244 q 574 1239 562 1244 q 595 1227 586 1235 q 609 1206 604 1218 q 615 1174 615 1193 q 595 1121 615 1138 q 549 1105 575 1105 q 503 1121 522 1105 q 484 1174 484 1138 "},"ř":{"x_min":78,"x_max":528,"ha":554,"o":"m 439 758 q 483 756 459 758 q 526 751 508 754 l 509 637 q 470 643 490 640 q 433 645 450 645 q 355 628 390 645 q 294 578 320 610 q 255 501 269 546 q 241 401 241 456 l 241 0 l 118 0 l 118 745 l 218 745 l 233 608 l 238 608 q 274 664 255 637 q 318 712 294 691 q 372 745 342 732 q 439 758 402 758 m 528 1045 q 487 1000 511 1026 q 441 947 464 974 q 398 892 418 919 q 368 842 378 865 l 237 842 q 207 892 227 865 q 164 947 187 919 q 118 1000 141 974 q 78 1045 95 1026 l 78 1064 l 160 1064 q 230 1008 194 1041 q 303 937 266 975 q 374 1008 338 975 q 446 1064 411 1041 l 528 1064 l 528 1045 "},"—":{"x_min":56,"x_max":1333,"ha":1389,"o":"m 56 315 l 56 429 l 1333 429 l 1333 315 l 56 315 "},"N":{"x_min":135,"x_max":878,"ha":1013,"o":"m 878 0 l 724 0 l 253 821 l 248 821 q 255 717 252 768 q 259 624 257 673 q 261 538 261 576 l 261 0 l 135 0 l 135 992 l 288 992 l 757 174 l 762 174 q 757 276 759 226 q 755 321 756 298 q 753 366 754 343 q 752 410 752 389 q 751 449 751 431 l 751 992 l 878 992 l 878 0 "},"⁄":{"x_min":-239.25,"x_max":418.25,"ha":180,"o":"m 418 992 l -132 0 l -239 0 l 311 992 l 418 992 "},"2":{"x_min":65,"x_max":683.34375,"ha":765,"o":"m 683 0 l 65 0 l 65 105 l 301 364 q 392 464 352 419 q 460 553 432 510 q 503 640 488 596 q 518 736 518 684 q 507 806 518 775 q 474 857 495 836 q 423 890 452 879 q 358 900 394 900 q 242 874 294 900 q 144 808 190 849 l 75 889 q 133 935 102 913 q 200 972 164 956 q 276 996 236 987 q 360 1006 316 1006 q 478 987 425 1006 q 567 935 530 969 q 623 851 603 900 q 644 740 644 802 q 626 630 644 683 q 576 528 608 578 q 501 426 545 477 q 406 320 457 375 l 216 118 l 216 112 l 683 112 l 683 0 "},"М":{"x_min":135,"x_max":1074,"ha":1209,"o":"m 544 0 l 253 868 l 248 868 q 255 768 252 818 q 259 678 257 726 q 261 593 261 631 l 261 0 l 135 0 l 135 992 l 331 992 l 601 183 l 605 183 l 886 992 l 1074 992 l 1074 0 l 947 0 l 947 601 q 949 682 947 637 q 952 769 950 728 q 957 867 955 817 l 951 867 l 648 0 l 544 0 "},"Ó":{"x_min":85,"x_max":945,"ha":1031,"o":"m 945 496 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 701 970 622 1007 q 835 867 781 934 q 917 706 890 800 q 945 496 945 612 m 218 497 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 q 794 664 811 590 q 741 789 777 738 q 649 868 705 840 q 517 895 594 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 m 441 1089 q 471 1134 455 1108 q 503 1187 487 1160 q 534 1242 519 1215 q 559 1293 548 1269 l 708 1293 l 708 1278 q 675 1233 697 1260 q 628 1175 654 1205 q 574 1118 602 1146 q 523 1071 546 1089 l 441 1071 l 441 1089 "},"˜":{"x_min":175,"x_max":663,"ha":802,"o":"m 519 843 q 465 854 492 843 q 413 881 439 866 q 363 907 387 895 q 318 919 339 919 q 271 901 287 919 q 245 841 255 883 l 175 841 q 189 915 178 882 q 218 972 200 948 q 261 1008 236 995 q 318 1021 286 1021 q 374 1009 346 1021 q 427 982 401 997 q 476 956 453 968 q 519 944 500 944 q 565 962 550 944 q 591 1022 581 980 l 663 1022 q 648 948 659 981 q 619 892 637 915 q 576 855 601 868 q 519 843 551 843 "}," ":{"x_min":0,"x_max":0,"ha":695},"ˇ":{"x_min":175,"x_max":625,"ha":802,"o":"m 625 1045 q 584 1000 608 1026 q 538 947 561 974 q 495 892 515 919 q 465 842 475 865 l 334 842 q 304 892 324 865 q 261 947 284 919 q 215 1000 238 974 q 175 1045 192 1026 l 175 1064 l 257 1064 q 327 1008 291 1041 q 400 937 363 975 q 471 1008 435 975 q 543 1064 508 1041 l 625 1064 l 625 1045 "},"ų":{"x_min":111,"x_max":710,"ha":818,"o":"m 600 0 l 582 99 l 575 99 q 534 48 558 70 q 483 13 511 27 q 424 -7 455 0 q 360 -14 393 -14 q 252 1 299 -14 q 174 50 205 17 q 126 135 142 83 q 111 258 111 186 l 111 745 l 234 745 l 234 264 q 270 132 234 176 q 381 88 306 88 q 474 106 436 88 q 534 158 511 123 q 566 242 556 192 q 576 357 576 292 l 576 745 l 700 745 l 700 0 l 600 0 m 591 -161 q 609 -206 591 -191 q 651 -220 627 -220 q 684 -218 668 -220 q 710 -214 700 -217 l 710 -291 q 670 -299 692 -296 q 629 -302 649 -302 q 527 -266 561 -302 q 494 -170 494 -231 q 503 -116 494 -142 q 529 -69 513 -91 q 562 -30 544 -48 q 598 0 581 -12 l 685 0 q 591 -161 591 -90 "},"Ў":{"x_min":16.75,"x_max":813.25,"ha":813,"o":"m 813 992 l 522 289 q 468 172 496 227 q 402 75 440 116 q 311 10 364 34 q 183 -14 258 -14 q 117 -8 148 -14 q 62 6 87 -3 l 62 131 q 117 106 87 116 q 183 97 147 97 q 246 105 219 97 q 297 130 274 112 q 338 178 319 149 q 376 250 357 207 l 16 992 l 155 992 l 415 440 q 422 425 418 433 q 428 408 425 417 q 434 391 431 399 q 440 377 437 383 l 441 377 q 447 394 443 383 q 455 416 451 404 q 462 437 458 427 q 468 451 466 447 l 679 992 l 813 992 m 684 1287 q 663 1193 679 1234 q 615 1126 646 1153 q 535 1084 583 1098 q 419 1071 487 1071 q 302 1084 350 1071 q 225 1124 254 1097 q 181 1192 195 1151 q 164 1287 167 1232 l 279 1287 q 291 1219 282 1245 q 318 1178 301 1193 q 360 1158 335 1163 q 422 1152 386 1152 q 477 1159 452 1152 q 520 1181 502 1166 q 550 1222 538 1197 q 565 1287 561 1248 l 684 1287 "},"Ŭ":{"x_min":125,"x_max":845,"ha":970,"o":"m 845 993 l 845 349 q 822 205 845 272 q 755 90 800 139 q 641 13 709 41 q 481 -14 573 -14 q 327 12 394 -14 q 216 86 261 38 q 148 202 171 134 q 125 352 125 269 l 125 991 l 251 991 l 251 346 q 309 162 251 227 q 487 97 368 97 q 591 115 548 97 q 663 167 635 133 q 704 246 690 200 q 718 347 718 292 l 718 993 l 845 993 m 689 1259 q 671 1183 686 1217 q 630 1123 656 1149 q 567 1084 604 1098 q 482 1071 530 1071 q 395 1084 432 1071 q 334 1122 358 1097 q 296 1181 309 1147 q 281 1259 283 1216 l 355 1259 q 367 1212 358 1229 q 393 1186 377 1194 q 432 1175 409 1177 q 485 1172 455 1172 q 531 1175 509 1172 q 571 1188 553 1178 q 600 1214 588 1197 q 614 1259 611 1231 l 689 1259 "},"ĝ":{"x_min":25,"x_max":692.484375,"ha":720,"o":"m 692 745 l 692 668 l 559 649 q 591 588 578 625 q 604 504 604 551 q 588 409 604 453 q 539 333 572 365 q 459 283 507 301 q 348 266 412 266 q 319 266 333 266 q 294 268 304 266 q 271 253 282 261 q 251 233 260 244 q 236 208 242 222 q 230 178 230 194 q 238 148 230 159 q 260 130 246 136 q 293 122 274 124 q 333 120 312 120 l 453 120 q 560 104 516 120 q 631 61 603 88 q 670 -2 658 34 q 683 -80 683 -38 q 660 -186 683 -139 q 593 -266 638 -233 q 478 -316 547 -298 q 314 -334 408 -334 q 187 -319 241 -334 q 96 -278 132 -305 q 42 -213 60 -251 q 25 -128 25 -175 q 38 -57 25 -87 q 73 -4 51 -26 q 125 32 96 17 q 187 53 155 46 q 140 94 158 66 q 122 159 122 122 q 143 231 122 201 q 212 291 165 262 q 158 324 182 303 q 118 373 134 346 q 92 433 101 401 q 83 500 83 466 q 99 608 83 561 q 150 689 116 656 q 233 740 183 722 q 348 758 282 758 q 400 754 373 758 q 445 745 427 750 l 692 745 m 141 -126 q 150 -173 141 -151 q 179 -211 159 -195 q 232 -235 199 -226 q 314 -245 265 -245 q 503 -205 440 -245 q 566 -92 566 -166 q 558 -41 566 -61 q 531 -10 550 -21 q 482 4 512 0 q 407 8 451 8 l 287 8 q 238 3 263 8 q 190 -17 212 -2 q 155 -58 169 -32 q 141 -126 141 -84 m 206 504 q 242 388 206 426 q 344 350 278 350 q 446 388 411 350 q 480 506 480 426 q 445 629 480 590 q 343 669 410 669 q 241 628 277 669 q 206 504 206 587 m 586 842 l 504 842 q 432 897 469 864 q 361 967 396 930 q 288 897 324 930 q 218 842 252 864 l 136 842 l 136 860 q 176 905 153 879 q 222 958 199 931 q 265 1013 245 986 q 295 1064 285 1040 l 426 1064 q 456 1013 436 1040 q 499 958 476 986 q 545 905 522 931 q 586 860 569 879 l 586 842 "},"Ω":{"x_min":53.0625,"x_max":980.9375,"ha":1031,"o":"m 517 895 q 384 872 439 895 q 292 805 328 849 q 239 699 256 762 q 222 556 222 636 q 234 425 222 488 q 273 304 246 362 q 345 194 301 246 q 455 99 390 143 l 455 0 l 53 0 l 53 111 l 321 111 q 229 189 271 143 q 155 292 186 235 q 106 416 124 349 q 89 559 89 484 q 116 743 89 661 q 198 884 143 826 q 332 975 252 943 q 517 1007 412 1007 q 701 975 622 1007 q 835 884 781 943 q 917 743 890 826 q 945 559 945 661 q 927 416 945 484 q 878 292 909 349 q 805 189 847 235 q 712 111 762 143 l 980 111 l 980 0 l 579 0 l 579 99 q 688 194 643 143 q 760 304 732 246 q 799 425 787 362 q 811 556 811 488 q 794 699 811 636 q 741 805 777 762 q 649 872 705 849 q 517 895 594 895 "},"s":{"x_min":61.15625,"x_max":564,"ha":627,"o":"m 564 203 q 544 108 564 149 q 487 40 524 68 q 398 0 450 13 q 281 -14 346 -14 q 154 -2 207 -14 q 61 33 101 9 l 61 146 q 107 125 82 135 q 161 106 133 114 q 219 93 189 98 q 279 88 249 88 q 353 95 323 88 q 403 116 384 103 q 431 150 423 130 q 440 194 440 170 q 433 232 440 215 q 409 265 427 249 q 360 299 391 282 q 280 337 329 316 q 193 378 232 358 q 127 424 154 399 q 86 482 100 449 q 72 560 72 515 q 90 645 72 608 q 143 707 109 682 q 224 745 177 732 q 330 758 272 758 q 451 743 396 758 q 554 706 505 729 l 512 606 q 422 641 468 626 q 329 655 376 655 q 228 632 261 655 q 195 568 195 610 q 203 526 195 544 q 229 493 210 509 q 279 461 248 477 q 358 426 311 445 q 444 385 406 405 q 509 339 482 365 q 549 281 535 314 q 564 203 564 249 "},"?":{"x_min":25,"x_max":546,"ha":591,"o":"m 191 280 l 191 305 q 196 375 191 343 q 214 433 201 406 q 250 486 227 460 q 306 541 272 512 q 362 592 339 569 q 400 638 385 614 q 422 688 415 661 q 429 751 429 715 q 419 811 429 784 q 389 857 408 838 q 341 887 370 876 q 274 898 312 898 q 166 880 217 898 q 67 839 115 862 l 25 937 q 143 985 79 965 q 273 1006 207 1006 q 386 988 336 1006 q 472 938 437 971 q 527 858 508 906 q 546 752 546 811 q 537 671 546 707 q 512 605 529 635 q 471 546 495 574 q 412 485 446 517 q 360 432 380 455 q 328 388 339 409 q 311 344 316 366 q 307 292 307 322 l 307 280 l 191 280 m 158 74 q 164 118 158 100 q 183 147 171 136 q 210 163 194 158 q 244 169 225 169 q 277 163 261 169 q 305 147 293 158 q 323 118 316 136 q 330 74 330 100 q 323 31 330 49 q 305 2 316 13 q 277 -14 293 -9 q 244 -20 261 -20 q 210 -14 225 -20 q 183 2 194 -9 q 164 31 171 13 q 158 74 158 49 "},"Ņ":{"x_min":135,"x_max":878,"ha":1013,"o":"m 878 0 l 724 0 l 253 821 l 248 821 q 255 717 252 768 q 259 624 257 673 q 261 538 261 576 l 261 0 l 135 0 l 135 992 l 288 992 l 757 174 l 762 174 q 757 276 759 226 q 755 321 756 298 q 753 366 754 343 q 752 410 752 389 q 751 449 751 431 l 751 992 l 878 992 l 878 0 m 396 -288 q 412 -246 403 -271 q 429 -191 421 -220 q 443 -135 437 -163 q 452 -85 450 -107 l 575 -85 l 575 -98 q 560 -141 570 -115 q 534 -197 549 -167 q 500 -255 519 -226 q 462 -307 482 -284 l 396 -307 l 396 -288 "},"Ī":{"x_min":41,"x_max":431,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 m 41 1172 l 431 1172 l 431 1071 l 41 1071 l 41 1172 "},"Μ":{"x_min":135,"x_max":1074,"ha":1209,"o":"m 544 0 l 253 868 l 248 868 q 255 768 252 818 q 259 678 257 726 q 261 593 261 631 l 261 0 l 135 0 l 135 992 l 331 992 l 601 183 l 605 183 l 886 992 l 1074 992 l 1074 0 l 947 0 l 947 601 q 949 682 947 637 q 952 769 950 728 q 957 867 955 817 l 951 867 l 648 0 l 544 0 "},"•":{"x_min":102,"x_max":421,"ha":522,"o":"m 102 507 q 114 589 102 555 q 147 644 126 623 q 198 675 169 666 q 261 685 227 685 q 323 675 294 685 q 374 644 352 666 q 408 589 395 623 q 421 507 421 555 q 408 425 421 459 q 374 370 395 392 q 323 339 352 349 q 261 329 294 329 q 198 339 227 329 q 147 370 169 349 q 114 425 126 392 q 102 507 102 459 "},"н":{"x_min":118,"x_max":735,"ha":853,"o":"m 241 745 l 241 436 l 611 436 l 611 745 l 735 745 l 735 0 l 611 0 l 611 333 l 241 333 l 241 0 l 118 0 l 118 745 l 241 745 "},"(":{"x_min":56,"x_max":376.34375,"ha":418,"o":"m 56 380 q 68 547 56 465 q 105 708 80 630 q 168 857 130 785 q 259 992 207 928 l 376 992 q 232 704 281 861 q 183 381 183 547 q 196 221 183 301 q 232 64 208 141 q 292 -84 256 -12 q 375 -220 328 -156 l 259 -220 q 168 -89 207 -158 q 105 57 130 -19 q 68 214 80 133 q 56 380 56 296 "},"◊":{"x_min":74,"x_max":737,"ha":810,"o":"m 737 499 l 430 0 l 379 0 l 74 498 l 379 1000 l 430 1000 l 737 499 m 618 499 l 405 898 l 175 499 l 405 101 l 618 499 "},"α":{"x_min":77,"x_max":792.984375,"ha":814,"o":"m 383 88 q 470 104 434 88 q 528 153 506 120 q 560 238 550 186 q 572 360 571 289 l 572 370 q 563 492 572 439 q 532 581 554 545 q 473 636 510 618 q 382 655 437 655 q 247 581 290 655 q 204 369 204 507 q 247 157 204 227 q 383 88 290 88 m 359 -14 q 244 10 296 -14 q 154 83 192 34 q 97 203 117 131 q 77 370 77 275 q 97 538 77 466 q 156 659 118 610 q 249 733 194 708 q 372 758 304 758 q 497 729 448 758 q 579 644 546 701 l 587 644 q 605 695 594 667 q 633 745 616 723 l 730 745 q 716 687 723 722 q 705 610 710 651 q 698 527 701 569 q 696 446 696 484 l 696 162 q 712 104 696 121 q 752 87 729 87 q 775 89 762 87 q 792 93 787 91 l 792 3 q 760 -8 782 -2 q 715 -14 738 -14 q 668 -8 689 -14 q 630 10 647 -3 q 601 45 613 23 q 580 99 588 66 l 572 99 q 537 55 557 76 q 491 19 517 34 q 432 -5 465 3 q 359 -14 400 -14 "},"Ħ":{"x_min":0.03125,"x_max":973.953125,"ha":974,"o":"m 135 827 l 135 992 l 261 992 l 261 827 l 712 827 l 712 992 l 839 992 l 839 827 l 973 827 l 973 719 l 839 719 l 839 0 l 712 0 l 712 462 l 261 462 l 261 0 l 135 0 l 135 719 l 0 719 l 0 827 l 135 827 m 712 574 l 712 719 l 261 719 l 261 574 l 712 574 "},"м":{"x_min":118,"x_max":879,"ha":997,"o":"m 879 0 l 762 0 l 762 608 q 752 575 758 594 q 740 535 747 555 q 728 497 733 515 q 717 466 722 479 l 543 0 l 453 0 l 278 466 q 269 492 275 475 q 257 528 264 508 q 245 569 251 548 q 234 608 239 591 l 234 0 l 118 0 l 118 745 l 274 745 l 450 272 q 465 226 458 248 q 479 183 473 203 q 490 145 485 162 q 498 118 495 128 q 506 146 502 129 q 517 182 511 162 q 531 224 523 202 q 546 269 538 246 l 724 745 l 879 745 l 879 0 "},"з":{"x_min":45.859375,"x_max":577,"ha":639,"o":"m 250 439 q 326 445 292 439 q 385 464 360 451 q 423 499 409 477 q 436 551 436 520 q 397 629 436 603 q 284 655 357 655 q 192 642 235 655 q 96 606 148 629 l 54 706 q 107 729 81 720 q 161 745 133 739 q 219 754 189 751 q 286 758 250 758 q 393 745 344 758 q 477 707 442 732 q 533 645 513 682 q 553 561 553 608 q 543 501 553 527 q 516 455 533 475 q 475 421 499 435 q 422 398 451 407 l 422 390 q 480 366 452 381 q 529 328 508 351 q 564 275 551 306 q 577 202 577 245 q 559 117 577 157 q 504 48 541 77 q 411 2 467 19 q 278 -14 354 -14 q 144 -1 204 -14 q 45 33 85 10 l 45 146 q 92 125 66 135 q 147 106 118 114 q 209 93 176 98 q 276 88 242 88 q 346 94 313 88 q 402 114 378 100 q 439 152 425 129 q 453 210 453 176 q 408 305 453 274 q 270 336 363 336 l 184 336 l 184 439 l 250 439 "},"Ґ":{"x_min":135,"x_max":649,"ha":682,"o":"m 522 992 l 522 1196 l 649 1196 l 649 880 l 261 880 l 261 0 l 135 0 l 135 992 l 522 992 "},"Û":{"x_min":125,"x_max":845,"ha":970,"o":"m 845 993 l 845 349 q 822 205 845 272 q 755 90 800 139 q 641 13 709 41 q 481 -14 573 -14 q 327 12 394 -14 q 216 86 261 38 q 148 202 171 134 q 125 352 125 269 l 125 991 l 251 991 l 251 346 q 309 162 251 227 q 487 97 368 97 q 591 115 548 97 q 663 167 635 133 q 704 246 690 200 q 718 347 718 292 l 718 993 l 845 993 m 708 1071 l 626 1071 q 554 1126 591 1093 q 483 1196 518 1159 q 410 1126 446 1159 q 340 1071 374 1093 l 258 1071 l 258 1089 q 298 1134 275 1108 q 344 1187 321 1160 q 387 1242 367 1215 q 417 1293 407 1269 l 548 1293 q 578 1242 558 1269 q 621 1187 598 1215 q 667 1134 644 1160 q 708 1089 691 1108 l 708 1071 "},"і":{"x_min":108.5,"x_max":252.96875,"ha":359,"o":"m 241 0 l 118 0 l 118 745 l 241 745 l 241 0 m 108 945 q 129 1004 108 986 q 180 1023 149 1023 q 208 1018 195 1023 q 231 1004 221 1014 q 247 980 241 995 q 252 945 252 966 q 231 887 252 906 q 180 868 210 868 q 129 886 149 868 q 108 945 108 905 "},"V":{"x_min":-0.25,"x_max":789.25,"ha":789,"o":"m 654 992 l 789 992 l 457 0 l 330 0 l 0 992 l 133 992 l 333 362 q 367 243 353 301 q 393 136 381 186 q 419 243 403 186 q 455 367 434 301 l 654 992 "},"Ŗ":{"x_min":135,"x_max":803.25,"ha":819,"o":"m 261 410 l 261 0 l 135 0 l 135 992 l 376 992 q 642 922 556 992 q 729 710 729 852 q 712 607 729 651 q 668 531 695 563 q 605 479 640 500 q 533 444 570 458 l 803 0 l 654 0 l 416 410 l 261 410 m 261 517 l 371 517 q 473 529 431 517 q 543 564 516 541 q 582 623 570 588 q 595 704 595 658 q 581 787 595 753 q 540 842 567 821 q 469 874 512 864 q 368 884 426 884 l 261 884 l 261 517 m 330 -288 q 346 -246 337 -271 q 363 -191 355 -220 q 377 -135 371 -163 q 386 -85 384 -107 l 509 -85 l 509 -98 q 494 -141 504 -115 q 468 -197 483 -167 q 434 -255 453 -226 q 396 -307 416 -284 l 330 -307 l 330 -288 "},"@":{"x_min":74,"x_max":1129,"ha":1203,"o":"m 1129 496 q 1122 411 1129 453 q 1103 330 1116 369 q 1071 259 1091 292 q 1026 202 1052 226 q 967 163 1000 177 q 895 150 934 150 q 840 160 865 150 q 797 187 815 170 q 769 226 780 204 q 753 272 757 248 l 751 272 q 720 224 738 246 q 678 185 702 202 q 623 159 654 168 q 557 150 593 150 q 465 169 505 150 q 396 222 424 188 q 354 304 369 256 q 340 411 340 353 q 360 536 340 479 q 417 635 380 594 q 509 699 455 676 q 629 723 562 723 q 690 720 659 723 q 748 712 720 717 q 799 702 776 708 q 838 691 823 696 l 823 408 q 822 384 822 393 q 822 369 822 375 q 822 361 822 364 q 822 357 822 359 q 829 297 822 321 q 847 261 836 274 q 873 242 859 247 q 903 237 888 237 q 958 258 935 237 q 998 314 982 278 q 1022 396 1014 349 q 1030 497 1030 444 q 1001 668 1030 593 q 920 795 972 743 q 798 873 869 846 q 644 900 727 900 q 442 862 529 900 q 295 757 354 825 q 205 597 236 690 q 175 395 175 505 q 201 213 175 292 q 280 79 228 134 q 409 -2 332 25 q 585 -30 486 -30 q 667 -25 627 -30 q 745 -12 707 -20 q 816 6 783 -4 q 880 28 850 16 l 880 -67 q 748 -108 821 -93 q 587 -123 675 -123 q 370 -88 465 -123 q 209 12 275 -53 q 108 173 143 78 q 74 390 74 269 q 114 628 74 517 q 228 819 154 738 q 407 945 302 899 q 644 992 513 992 q 838 957 749 992 q 992 859 927 923 q 1093 703 1057 795 q 1129 496 1129 611 m 448 408 q 482 277 448 318 q 574 237 517 237 q 638 252 612 237 q 682 296 665 268 q 708 363 699 324 q 719 449 716 402 l 729 621 q 683 631 710 626 q 629 635 657 635 q 544 615 578 635 q 488 564 510 596 q 458 491 467 532 q 448 408 448 450 "},"ʼ":{"x_min":16,"x_max":228,"ha":243,"o":"m 219 992 l 228 977 q 205 898 218 939 q 176 815 192 857 q 143 731 160 772 q 108 652 125 690 l 16 652 q 38 737 26 692 q 60 827 49 782 q 79 913 70 871 q 94 992 88 956 l 219 992 "},"℅":{"x_min":96,"x_max":1016,"ha":1112,"o":"m 874 992 l 325 0 l 218 0 l 767 992 l 874 992 m 1016 227 q 1000 127 1016 170 q 958 55 985 84 q 893 10 931 25 q 809 -5 855 -5 q 729 10 766 -5 q 664 55 691 25 q 620 127 636 84 q 605 227 605 170 q 619 326 605 283 q 661 398 634 369 q 727 443 689 428 q 811 459 765 459 q 891 443 853 459 q 956 398 928 428 q 1000 326 984 369 q 1016 227 1016 283 m 705 228 q 711 164 705 193 q 729 114 716 135 q 762 82 742 93 q 811 70 782 70 q 859 82 839 70 q 891 114 879 93 q 909 164 904 135 q 915 228 915 193 q 909 291 915 263 q 891 340 904 320 q 859 372 879 361 q 811 383 839 383 q 762 372 782 383 q 729 340 742 361 q 711 291 716 320 q 705 228 705 263 m 320 534 q 233 546 274 534 q 161 587 192 559 q 113 658 131 615 q 96 763 96 702 q 113 872 96 827 q 163 945 131 917 q 236 986 194 973 q 327 999 278 999 q 395 991 362 999 q 451 973 429 984 l 429 901 q 380 916 408 910 q 328 923 351 923 q 228 884 259 923 q 196 764 196 844 q 326 609 196 609 q 390 615 360 609 q 444 631 420 620 l 444 559 q 386 540 420 546 q 320 534 353 534 "},"i":{"x_min":108.5,"x_max":252.96875,"ha":359,"o":"m 241 0 l 118 0 l 118 745 l 241 745 l 241 0 m 108 945 q 129 1004 108 986 q 180 1023 149 1023 q 208 1018 195 1023 q 231 1004 221 1014 q 247 980 241 995 q 252 945 252 966 q 231 887 252 906 q 180 868 210 868 q 129 886 149 868 q 108 945 108 905 "},"ќ":{"x_min":118,"x_max":676.25,"ha":682,"o":"m 516 745 l 649 745 l 369 387 l 676 0 l 536 0 l 241 377 l 241 0 l 118 0 l 118 745 l 241 745 l 241 383 l 516 745 m 272 860 q 302 905 286 879 q 334 958 318 931 q 365 1013 350 986 q 390 1064 379 1040 l 539 1064 l 539 1049 q 506 1004 528 1031 q 459 946 485 976 q 405 889 433 917 q 354 842 377 860 l 272 842 l 272 860 "},"≤":{"x_min":69,"x_max":696,"ha":765,"o":"m 696 161 l 69 448 l 69 517 l 696 844 l 696 735 l 197 488 l 696 270 l 696 161 m 69 0 l 69 101 l 696 101 l 696 0 l 69 0 "},"ё":{"x_min":77,"x_max":673,"ha":743,"o":"m 412 -14 q 276 11 337 -14 q 170 84 214 36 q 101 203 125 132 q 77 366 77 274 q 99 531 77 458 q 162 654 121 604 q 259 731 202 705 q 384 758 316 758 q 505 733 451 758 q 595 665 558 709 q 653 560 633 621 q 673 423 673 498 l 673 346 l 204 346 q 259 155 207 216 q 413 93 311 93 q 477 97 448 93 q 534 107 507 100 q 587 123 561 113 q 639 145 613 133 l 639 35 q 586 13 612 22 q 533 -2 560 3 q 476 -11 505 -8 q 412 -14 446 -14 m 384 655 q 260 602 306 655 q 207 449 214 549 l 545 449 q 536 533 545 495 q 507 598 526 571 q 457 640 487 625 q 384 655 427 655 m 183 945 q 201 998 183 982 q 248 1015 220 1015 q 294 998 274 1015 q 313 945 313 981 q 294 892 313 909 q 248 876 274 876 q 201 892 220 876 q 183 945 183 909 m 437 945 q 456 998 437 982 q 502 1015 475 1015 q 527 1010 515 1015 q 548 998 539 1006 q 562 977 557 989 q 568 945 568 964 q 548 892 568 909 q 502 876 528 876 q 456 892 475 876 q 437 945 437 909 "},"υ":{"x_min":111,"x_max":736,"ha":819,"o":"m 409 -14 q 264 13 322 -14 q 172 87 206 40 q 124 199 138 135 q 111 337 111 263 l 111 745 l 234 745 l 234 345 q 245 239 234 286 q 278 158 256 192 q 335 106 300 125 q 417 88 370 88 q 564 167 516 88 q 612 412 612 245 q 609 503 612 461 q 601 585 606 545 q 587 664 595 625 q 569 745 580 703 l 693 745 q 711 664 703 703 q 725 585 719 626 q 733 501 730 545 q 736 406 736 457 q 653 88 736 190 q 409 -14 570 -14 "},"ĕ":{"x_min":77,"x_max":673,"ha":743,"o":"m 412 -14 q 276 11 337 -14 q 170 84 214 36 q 101 203 125 132 q 77 366 77 274 q 99 531 77 458 q 162 654 121 604 q 259 731 202 705 q 384 758 316 758 q 505 733 451 758 q 595 665 558 709 q 653 560 633 621 q 673 423 673 498 l 673 346 l 204 346 q 259 155 207 216 q 413 93 311 93 q 477 97 448 93 q 534 107 507 100 q 587 123 561 113 q 639 145 613 133 l 639 35 q 586 13 612 22 q 533 -2 560 3 q 476 -11 505 -8 q 412 -14 446 -14 m 384 655 q 260 602 306 655 q 207 449 214 549 l 545 449 q 536 533 545 495 q 507 598 526 571 q 457 640 487 625 q 384 655 427 655 m 589 1030 q 571 954 586 988 q 530 894 556 920 q 467 855 504 869 q 382 842 430 842 q 295 855 332 842 q 234 893 258 868 q 196 952 209 918 q 181 1030 183 987 l 255 1030 q 267 983 258 1000 q 293 957 277 965 q 332 946 309 948 q 385 943 355 943 q 431 946 409 943 q 471 959 453 949 q 500 985 488 968 q 514 1030 511 1002 l 589 1030 "},"ffi":{"x_min":19,"x_max":1166.96875,"ha":1274,"o":"m 441 656 l 274 656 l 274 0 l 151 0 l 151 656 l 19 656 l 19 704 l 151 749 l 151 814 q 166 934 151 886 q 210 1010 181 982 q 280 1051 238 1039 q 375 1063 322 1063 q 449 1055 415 1063 q 509 1037 482 1047 l 477 941 q 431 954 456 949 q 379 960 406 960 q 332 954 352 960 q 300 931 313 947 q 280 887 287 915 q 274 815 274 859 l 274 745 l 441 745 l 441 656 m 898 656 l 731 656 l 731 0 l 608 0 l 608 656 l 476 656 l 476 704 l 608 749 l 608 814 q 623 934 608 886 q 667 1010 638 982 q 737 1051 695 1039 q 832 1063 779 1063 q 906 1055 872 1063 q 966 1037 939 1047 l 934 941 q 888 954 913 949 q 836 960 863 960 q 789 954 809 960 q 757 931 770 947 q 737 887 744 915 q 731 815 731 859 l 731 745 l 898 745 l 898 656 m 1155 0 l 1032 0 l 1032 745 l 1155 745 l 1155 0 m 1022 945 q 1043 1004 1022 986 q 1094 1023 1063 1023 q 1122 1018 1109 1023 q 1145 1004 1135 1014 q 1161 980 1155 995 q 1166 945 1166 966 q 1145 887 1166 906 q 1094 868 1124 868 q 1043 886 1063 868 q 1022 945 1022 905 "},"ż":{"x_min":56,"x_max":556.21875,"ha":612,"o":"m 556 0 l 56 0 l 56 80 l 418 656 l 78 656 l 78 745 l 544 745 l 544 650 l 189 88 l 556 88 l 556 0 m 248 945 q 268 1004 248 986 q 319 1023 289 1023 q 348 1018 334 1023 q 371 1004 361 1014 q 386 980 380 995 q 392 945 392 966 q 371 887 392 906 q 319 868 349 868 q 268 886 289 868 q 248 945 248 905 "},"Э":{"x_min":40,"x_max":740,"ha":825,"o":"m 301 894 q 186 879 237 894 q 93 841 136 863 l 40 947 q 159 991 93 976 q 299 1006 226 1006 q 491 969 409 1006 q 629 866 574 932 q 712 710 684 801 q 740 513 740 620 q 712 294 740 392 q 628 128 684 197 q 489 22 572 59 q 294 -14 405 -14 q 222 -11 255 -14 q 160 -4 189 -9 q 104 8 131 0 q 52 26 78 15 l 52 135 q 159 108 105 120 q 274 97 214 97 q 520 191 436 97 q 609 462 605 285 l 179 462 l 179 574 l 606 574 q 576 708 600 649 q 512 809 551 768 q 419 873 473 851 q 301 894 366 894 "},"ő":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 702 208 725 280 q 637 86 679 135 q 534 11 594 37 q 398 -14 474 -14 q 270 11 329 -14 q 168 86 211 37 q 101 208 125 135 q 77 373 77 280 q 99 537 77 465 q 164 657 122 608 q 267 732 206 707 q 403 758 327 758 q 531 732 472 758 q 633 657 590 707 q 700 537 676 608 q 725 373 725 465 m 204 373 q 250 159 204 231 q 401 88 297 88 q 551 159 506 88 q 597 373 597 231 q 551 585 597 515 q 400 655 504 655 q 250 585 295 655 q 204 373 204 515 m 199 860 q 229 905 213 879 q 261 958 245 931 q 291 1013 277 986 q 317 1064 306 1040 l 452 1064 l 452 1049 q 419 1004 441 1031 q 372 946 398 976 q 318 889 346 917 q 267 842 291 860 l 199 842 l 199 860 m 445 860 q 475 905 459 879 q 507 958 491 931 q 537 1013 523 986 q 562 1064 552 1040 l 697 1064 l 697 1049 q 664 1004 686 1031 q 617 946 643 976 q 563 889 591 917 q 512 842 536 860 l 445 842 l 445 860 "},"Ŏ":{"x_min":85,"x_max":945,"ha":1031,"o":"m 945 496 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 701 970 622 1007 q 835 867 781 934 q 917 706 890 800 q 945 496 945 612 m 218 497 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 q 794 664 811 590 q 741 789 777 738 q 649 868 705 840 q 517 895 594 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 m 720 1259 q 702 1183 717 1217 q 661 1123 687 1149 q 598 1084 635 1098 q 513 1071 561 1071 q 426 1084 463 1071 q 365 1122 389 1097 q 327 1181 340 1147 q 312 1259 314 1216 l 386 1259 q 398 1212 389 1229 q 424 1186 408 1194 q 463 1175 440 1177 q 516 1172 486 1172 q 562 1175 540 1172 q 602 1188 584 1178 q 631 1214 619 1197 q 645 1259 642 1231 l 720 1259 "},"ю":{"x_min":118,"x_max":1047,"ha":1124,"o":"m 1047 373 q 1025 208 1047 280 q 962 86 1003 135 q 864 11 922 37 q 734 -14 806 -14 q 613 8 668 -14 q 518 75 558 31 q 455 184 478 119 q 426 333 431 248 l 241 333 l 241 0 l 118 0 l 118 745 l 241 745 l 241 436 l 428 436 q 459 574 434 514 q 523 675 483 634 q 617 736 563 715 q 739 758 672 758 q 862 732 805 758 q 959 657 918 707 q 1023 537 1000 608 q 1047 373 1047 465 m 555 373 q 598 159 555 231 q 737 88 641 88 q 876 159 834 88 q 919 373 919 231 q 876 585 919 515 q 736 655 833 655 q 598 585 640 655 q 555 373 555 515 "},"İ":{"x_min":55.34375,"x_max":414.8125,"ha":471,"o":"m 414 0 l 55 0 l 55 69 l 172 96 l 172 895 l 55 922 l 55 992 l 414 992 l 414 922 l 298 895 l 298 96 l 414 69 l 414 0 m 163 1174 q 183 1233 163 1215 q 234 1252 204 1252 q 263 1247 249 1252 q 286 1233 276 1243 q 301 1209 295 1224 q 307 1174 307 1195 q 286 1116 307 1135 q 234 1097 264 1097 q 183 1115 204 1097 q 163 1174 163 1134 "},"Ě":{"x_min":135,"x_max":650,"ha":733,"o":"m 650 0 l 135 0 l 135 992 l 650 992 l 650 880 l 261 880 l 261 574 l 624 574 l 624 462 l 261 462 l 261 111 l 650 111 l 650 0 m 620 1274 q 579 1229 603 1255 q 533 1176 556 1203 q 490 1121 510 1148 q 460 1071 470 1094 l 329 1071 q 299 1121 319 1094 q 256 1176 279 1148 q 210 1229 233 1203 q 170 1274 187 1255 l 170 1293 l 252 1293 q 322 1237 286 1270 q 395 1166 358 1204 q 466 1237 430 1204 q 538 1293 503 1270 l 620 1293 l 620 1274 "},"‹":{"x_min":55.5,"x_max":344,"ha":400,"o":"m 55 375 l 264 656 l 344 603 l 183 367 l 344 130 l 264 78 l 55 356 l 55 375 "},"ķ":{"x_min":118,"x_max":684.25,"ha":689,"o":"m 233 384 l 324 500 l 522 745 l 665 745 l 394 422 l 684 0 l 542 0 l 315 341 l 241 286 l 241 0 l 118 0 l 118 1055 l 241 1055 l 241 571 l 230 384 l 233 384 m 271 -288 q 287 -246 278 -271 q 304 -191 296 -220 q 318 -135 312 -163 q 327 -85 325 -107 l 450 -85 l 450 -98 q 435 -141 445 -115 q 409 -197 424 -167 q 375 -255 394 -226 q 337 -307 357 -284 l 271 -307 l 271 -288 "},"ì":{"x_min":-23,"x_max":244,"ha":359,"o":"m 241 0 l 118 0 l 118 745 l 241 745 l 241 0 m 244 842 l 162 842 q 110 889 138 860 q 56 946 82 917 q 9 1004 30 976 q -23 1049 -12 1031 l -23 1064 l 125 1064 q 151 1013 136 1040 q 181 958 165 986 q 213 905 197 931 q 244 860 229 879 l 244 842 "},"±":{"x_min":69.515625,"x_max":696.203125,"ha":765,"o":"m 332 439 l 69 439 l 69 541 l 332 541 l 332 804 l 433 804 l 433 541 l 696 541 l 696 439 l 433 439 l 433 178 l 332 178 l 332 439 m 69 0 l 69 101 l 696 101 l 696 0 l 69 0 "},"|":{"x_min":332,"x_max":433.734375,"ha":765,"o":"m 332 1055 l 433 1055 l 433 -334 l 332 -334 l 332 1055 "},"§":{"x_min":82.140625,"x_max":585,"ha":675,"o":"m 93 550 q 101 612 93 584 q 125 661 110 640 q 159 698 139 683 q 198 723 178 713 q 121 788 149 749 q 93 883 93 826 q 111 958 93 925 q 164 1014 130 991 q 245 1050 198 1037 q 351 1063 293 1063 q 470 1048 417 1063 q 572 1011 523 1034 l 534 915 q 442 947 490 934 q 346 960 394 960 q 244 941 279 960 q 209 886 209 922 q 217 852 209 868 q 245 822 226 837 q 297 791 264 807 q 377 755 329 775 q 464 714 426 736 q 529 666 503 692 q 570 606 556 639 q 585 531 585 573 q 577 467 585 496 q 555 415 569 438 q 525 376 542 392 q 489 348 508 359 q 560 285 535 322 q 585 195 585 248 q 564 110 585 147 q 508 46 544 72 q 419 6 471 20 q 301 -7 366 -7 q 175 4 228 -7 q 82 40 122 16 l 82 151 q 129 130 103 140 q 184 112 155 120 q 243 100 213 104 q 303 95 274 95 q 382 103 351 95 q 433 124 414 111 q 460 154 452 137 q 468 190 468 171 q 462 224 468 209 q 439 254 456 239 q 389 286 421 269 q 305 323 357 302 q 215 365 254 344 q 148 412 176 386 q 107 471 121 438 q 93 550 93 505 m 209 563 q 218 517 209 538 q 248 476 228 495 q 302 437 269 456 q 383 398 335 419 l 406 388 q 428 409 417 397 q 448 437 439 421 q 462 472 457 453 q 468 514 468 491 q 459 561 468 539 q 429 603 451 583 q 372 642 408 623 q 282 682 336 662 q 256 666 268 676 q 232 640 243 655 q 215 605 222 625 q 209 563 209 586 "},"џ":{"x_min":118,"x_max":706,"ha":825,"o":"m 241 102 l 582 102 l 582 745 l 706 745 l 706 0 l 479 0 l 479 -258 l 356 -258 l 356 0 l 118 0 l 118 745 l 241 745 l 241 102 "},"љ":{"x_min":11,"x_max":1054,"ha":1131,"o":"m 611 439 l 771 439 q 985 386 916 439 q 1054 227 1054 333 q 1038 133 1054 175 q 988 61 1022 91 q 900 15 954 31 q 769 0 846 0 l 488 0 l 488 642 l 351 642 q 315 342 337 466 q 259 139 293 218 q 181 25 226 61 q 75 -10 135 -10 q 39 -8 56 -10 q 11 -2 22 -6 l 11 82 q 44 78 26 78 q 111 118 81 78 q 165 241 141 158 q 205 448 188 323 q 235 745 222 574 l 611 745 l 611 439 m 930 219 q 919 275 930 252 q 886 311 908 297 q 832 330 864 325 q 756 336 799 336 l 611 336 l 611 102 l 759 102 q 828 108 796 102 q 882 127 859 113 q 917 164 904 141 q 930 219 930 186 "},"q":{"x_min":77,"x_max":696,"ha":814,"o":"m 383 88 q 470 104 434 88 q 528 151 506 119 q 560 231 550 183 q 572 342 571 279 l 572 370 q 563 492 572 439 q 532 581 554 545 q 473 636 510 618 q 382 655 437 655 q 247 581 290 655 q 204 369 204 507 q 247 157 204 227 q 383 88 290 88 m 359 -14 q 244 10 296 -14 q 154 83 192 34 q 97 203 117 131 q 77 370 77 275 q 97 538 77 466 q 154 659 117 610 q 244 733 192 708 q 359 758 296 758 q 432 748 399 758 q 490 724 464 739 q 536 688 516 709 q 572 644 556 667 l 577 644 l 596 745 l 696 745 l 696 -334 l 572 -334 l 572 -16 q 573 16 572 -3 q 576 54 575 36 q 580 99 578 76 l 572 99 q 537 55 557 76 q 491 19 517 34 q 432 -5 465 3 q 359 -14 400 -14 "},"˳":{"x_min":78,"x_max":385,"ha":463,"o":"m 385 -229 q 373 -291 385 -264 q 340 -338 361 -319 q 291 -367 319 -357 q 229 -377 262 -377 q 167 -367 195 -377 q 119 -338 139 -357 q 88 -292 99 -319 q 78 -231 78 -265 q 88 -169 78 -196 q 119 -123 99 -142 q 167 -94 139 -104 q 229 -85 195 -85 q 290 -94 262 -85 q 340 -123 319 -104 q 373 -168 361 -142 q 385 -229 385 -195 m 310 -231 q 288 -174 310 -194 q 231 -154 265 -154 q 174 -174 196 -154 q 152 -231 152 -194 q 172 -287 152 -267 q 231 -307 192 -307 q 288 -287 265 -307 q 310 -231 310 -267 "},"ή":{"x_min":118,"x_max":707,"ha":818,"o":"m 583 -334 l 583 479 q 547 611 583 567 q 436 655 512 655 q 343 637 381 655 q 283 585 306 620 q 251 501 261 551 q 241 385 241 450 l 241 0 l 118 0 l 118 745 l 218 745 l 236 644 l 242 644 q 283 694 259 673 q 334 730 306 715 q 393 751 362 744 q 457 758 424 758 q 644 693 581 758 q 707 486 707 628 l 707 -334 l 583 -334 m 388 860 q 401 906 394 880 q 414 960 408 932 q 426 1014 421 987 q 435 1064 432 1041 l 570 1064 l 570 1049 q 554 1007 565 1033 q 528 951 543 980 q 495 892 512 921 q 461 842 477 863 l 388 842 l 388 860 "},"Ж":{"x_min":2.75,"x_max":1129.25,"ha":1132,"o":"m 372 511 l 12 992 l 151 992 l 505 511 l 505 992 l 631 992 l 631 511 l 980 992 l 1119 992 l 764 511 l 1129 0 l 986 0 l 631 502 l 631 0 l 505 0 l 505 502 l 145 0 l 2 0 l 372 511 "},"®":{"x_min":68,"x_max":1088,"ha":1156,"o":"m 506 521 l 554 521 q 641 545 615 521 q 668 616 668 569 q 640 686 668 666 q 553 706 612 706 l 506 706 l 506 521 m 776 617 q 767 559 776 584 q 743 513 758 533 q 709 480 728 494 q 669 458 689 467 q 749 326 714 384 q 779 277 765 301 q 804 235 793 254 q 822 205 816 216 l 829 194 l 707 194 l 569 429 l 506 429 l 506 194 l 398 194 l 398 799 l 555 799 q 723 754 669 799 q 776 617 776 710 m 68 495 q 86 631 68 566 q 137 753 104 696 q 217 856 170 809 q 320 936 264 903 q 442 987 377 969 q 578 1006 507 1006 q 713 987 648 1006 q 835 936 778 969 q 938 856 892 903 q 1018 753 985 809 q 1069 631 1051 696 q 1088 495 1088 566 q 1069 359 1088 425 q 1018 238 1051 294 q 938 134 985 181 q 835 55 892 88 q 713 3 778 21 q 578 -14 648 -14 q 442 3 507 -14 q 320 55 377 21 q 217 134 264 88 q 137 238 170 181 q 86 359 104 294 q 68 495 68 425 m 141 496 q 176 326 141 405 q 269 187 210 247 q 408 94 329 128 q 578 59 487 59 q 747 94 668 59 q 886 187 826 128 q 979 326 945 247 q 1014 496 1014 405 q 979 665 1014 586 q 886 804 945 744 q 747 897 826 863 q 578 932 668 932 q 408 897 487 932 q 269 804 329 863 q 176 665 210 744 q 141 496 141 586 "},"Н":{"x_min":135,"x_max":839,"ha":974,"o":"m 839 0 l 712 0 l 712 462 l 261 462 l 261 0 l 135 0 l 135 992 l 261 992 l 261 574 l 712 574 l 712 992 l 839 992 l 839 0 "},"Ε":{"x_min":135,"x_max":650,"ha":733,"o":"m 650 0 l 135 0 l 135 992 l 650 992 l 650 880 l 261 880 l 261 574 l 624 574 l 624 462 l 261 462 l 261 111 l 650 111 l 650 0 "},"₧":{"x_min":102,"x_max":992,"ha":1042,"o":"m 908 82 q 931 84 918 82 q 955 87 943 85 q 977 92 966 89 q 992 97 987 95 l 992 6 q 948 -7 976 0 q 878 -14 921 -14 q 812 -2 842 -14 q 760 32 782 8 q 725 91 738 56 q 713 175 713 127 l 713 477 l 607 477 l 607 534 l 713 588 l 758 717 l 833 717 l 833 574 l 974 574 l 974 477 l 833 477 l 833 187 q 850 109 833 135 q 908 82 868 82 m 616 701 q 598 582 616 639 q 538 482 580 525 q 426 412 496 438 q 253 386 357 386 l 221 386 l 221 0 l 102 0 l 102 992 l 272 992 q 428 972 363 992 q 534 916 493 953 q 596 825 576 879 q 616 701 616 770 m 221 491 l 239 491 q 349 502 302 491 q 428 537 397 513 q 474 600 459 561 q 490 695 490 639 q 434 839 490 792 q 260 886 378 886 l 221 886 l 221 491 "},"л":{"x_min":11,"x_max":640,"ha":758,"o":"m 640 0 l 516 0 l 516 642 l 352 642 q 316 342 338 466 q 260 139 293 218 q 181 25 227 61 q 76 -10 136 -10 q 39 -8 56 -10 q 11 -2 22 -6 l 11 82 q 44 78 26 78 q 112 118 82 78 q 165 241 142 158 q 206 448 189 323 q 236 745 223 574 l 640 745 l 640 0 "},"σ":{"x_min":77,"x_max":784.6875,"ha":817,"o":"m 725 342 q 703 201 725 267 q 641 88 682 136 q 539 13 600 40 q 398 -14 478 -14 q 267 9 326 -14 q 165 80 207 33 q 100 196 123 127 q 77 355 77 265 q 103 535 77 461 q 178 656 129 609 q 296 723 226 702 q 453 745 366 745 l 784 745 l 784 642 l 604 642 q 651 583 629 614 q 689 514 673 551 q 715 435 706 477 q 725 342 725 393 m 204 356 q 215 249 204 298 q 250 164 226 200 q 312 108 274 128 q 401 88 349 88 q 490 107 453 88 q 551 159 527 125 q 586 238 575 192 q 597 337 597 284 q 570 508 597 435 q 493 642 543 581 l 453 642 q 341 627 388 642 q 264 578 294 612 q 219 490 233 545 q 204 356 204 435 "},"θ":{"x_min":77,"x_max":710,"ha":786,"o":"m 710 528 q 692 300 710 401 q 636 129 674 199 q 538 22 598 59 q 392 -14 477 -14 q 252 22 312 -14 q 154 129 193 59 q 95 300 114 199 q 77 528 77 401 q 94 757 77 656 q 149 927 111 857 q 246 1034 186 997 q 392 1071 306 1071 q 531 1034 472 1071 q 631 928 591 998 q 690 758 670 859 q 710 528 710 657 m 392 88 q 477 113 442 88 q 537 189 513 138 q 572 315 560 239 q 586 493 584 391 l 200 493 q 213 317 201 393 q 247 190 224 241 q 306 113 270 139 q 392 88 341 88 m 392 968 q 309 945 343 968 q 251 875 274 921 q 215 758 227 828 q 200 596 203 689 l 585 596 q 533 875 579 781 q 392 968 488 968 "}," ":{"x_min":0,"x_max":0,"ha":361},"∑":{"x_min":50,"x_max":848,"ha":876,"o":"m 50 -334 l 50 -255 l 473 364 l 60 914 l 60 992 l 804 992 l 804 880 l 237 880 l 606 365 l 222 -222 l 848 -222 l 848 -334 l 50 -334 "},"Ώ":{"x_min":-17,"x_max":1041.9375,"ha":1092,"o":"m 578 895 q 445 872 500 895 q 353 805 389 849 q 300 699 317 762 q 283 556 283 636 q 295 425 283 488 q 334 304 307 362 q 406 194 362 246 q 516 99 451 143 l 516 0 l 114 0 l 114 111 l 382 111 q 290 189 332 143 q 216 292 247 235 q 167 416 185 349 q 150 559 150 484 q 177 743 150 661 q 259 884 204 826 q 393 975 313 943 q 578 1007 473 1007 q 762 975 683 1007 q 896 884 842 943 q 978 743 951 826 q 1006 559 1006 661 q 988 416 1006 484 q 939 292 970 349 q 866 189 908 235 q 773 111 823 143 l 1041 111 l 1041 0 l 640 0 l 640 99 q 749 194 704 143 q 821 304 793 246 q 860 425 848 362 q 872 556 872 488 q 855 699 872 636 q 802 805 838 762 q 710 872 766 849 q 578 895 655 895 m -17 789 q -3 835 -10 809 q 9 889 3 861 q 21 943 16 916 q 30 993 27 970 l 165 993 l 165 978 q 149 936 160 962 q 123 880 138 909 q 90 821 107 850 q 56 771 72 792 l -17 771 l -17 789 "},"ẃ":{"x_min":13.75,"x_max":1022.25,"ha":1036,"o":"m 683 0 l 570 417 q 563 445 567 430 q 555 477 559 460 q 546 512 551 494 q 538 546 542 529 q 518 628 528 586 l 514 628 q 496 546 505 585 q 480 476 488 512 q 464 415 471 440 l 347 0 l 204 0 l 13 745 l 143 745 l 232 348 q 245 282 239 318 q 258 211 252 246 q 269 146 264 177 q 277 95 274 115 l 281 95 q 290 142 284 113 q 303 205 296 172 q 317 270 310 238 q 331 324 325 302 l 453 745 l 586 745 l 702 324 q 716 270 709 301 q 732 207 724 239 q 745 145 739 175 q 754 95 751 115 l 758 95 q 764 142 760 113 q 775 207 769 172 q 788 279 781 242 q 803 348 795 316 l 896 745 l 1022 745 l 829 0 l 683 0 m 456 860 q 486 905 470 879 q 518 958 502 931 q 549 1013 534 986 q 574 1064 563 1040 l 723 1064 l 723 1049 q 690 1004 712 1031 q 643 946 669 976 q 589 889 617 917 q 538 842 561 860 l 456 842 l 456 860 "},"+":{"x_min":69.515625,"x_max":696.203125,"ha":765,"o":"m 332 439 l 69 439 l 69 541 l 332 541 l 332 804 l 433 804 l 433 541 l 696 541 l 696 439 l 433 439 l 433 178 l 332 178 l 332 439 "},"Ë":{"x_min":135,"x_max":650,"ha":733,"o":"m 650 0 l 135 0 l 135 992 l 650 992 l 650 880 l 261 880 l 261 574 l 624 574 l 624 462 l 261 462 l 261 111 l 650 111 l 650 0 m 201 1174 q 219 1227 201 1211 q 266 1244 238 1244 q 312 1227 292 1244 q 331 1174 331 1210 q 312 1121 331 1138 q 266 1105 292 1105 q 219 1121 238 1105 q 201 1174 201 1138 m 455 1174 q 474 1227 455 1211 q 520 1244 493 1244 q 545 1239 533 1244 q 566 1227 557 1235 q 580 1206 575 1218 q 586 1174 586 1193 q 566 1121 586 1138 q 520 1105 546 1105 q 474 1121 493 1105 q 455 1174 455 1138 "},"Š":{"x_min":70.109375,"x_max":657,"ha":721,"o":"m 657 264 q 633 147 657 199 q 566 59 610 95 q 460 4 523 23 q 320 -14 398 -14 q 179 -2 245 -14 q 70 32 114 9 l 70 153 q 122 131 93 142 q 184 112 151 120 q 251 99 216 104 q 319 93 285 93 q 479 134 427 93 q 530 252 530 176 q 521 316 530 289 q 486 366 511 343 q 420 410 461 389 q 316 456 379 431 q 212 508 256 480 q 139 572 168 537 q 96 652 110 607 q 83 754 83 697 q 104 860 83 813 q 165 939 126 907 q 259 989 205 972 q 380 1006 314 1006 q 525 990 460 1006 q 640 951 589 975 l 595 845 q 495 880 551 865 q 381 894 440 894 q 254 856 299 894 q 209 752 209 818 q 219 686 209 714 q 252 635 229 657 q 315 592 276 612 q 410 549 353 572 q 517 499 471 525 q 594 441 563 473 q 641 366 625 408 q 657 264 657 323 m 607 1274 q 566 1229 590 1255 q 520 1176 543 1203 q 477 1121 497 1148 q 447 1071 457 1094 l 316 1071 q 286 1121 306 1094 q 243 1176 266 1148 q 197 1229 220 1203 q 157 1274 174 1255 l 157 1293 l 239 1293 q 309 1237 273 1270 q 382 1166 345 1204 q 453 1237 417 1204 q 525 1293 490 1270 l 607 1293 l 607 1274 "}," ":{"x_min":0,"x_max":0,"ha":1389},"ð":{"x_min":75,"x_max":725,"ha":802,"o":"m 725 388 q 702 217 725 291 q 637 91 679 142 q 534 12 594 39 q 398 -14 473 -14 q 268 8 328 -14 q 166 73 209 30 q 99 179 123 116 q 75 323 75 242 q 96 466 75 403 q 157 571 117 528 q 254 635 197 613 q 383 658 311 658 q 504 637 452 658 q 585 577 556 617 l 591 580 q 529 725 570 660 q 427 845 488 790 l 254 742 l 204 819 l 350 907 q 294 945 323 926 q 234 981 265 964 l 281 1065 q 367 1018 325 1043 q 448 964 408 994 l 602 1058 l 653 981 l 520 902 q 603 805 566 858 q 668 689 641 752 q 710 550 695 625 q 725 388 725 475 m 597 355 q 585 429 597 393 q 550 493 574 466 q 488 538 526 521 q 400 555 451 555 q 310 540 347 555 q 248 494 272 524 q 213 420 225 464 q 202 318 202 376 q 213 224 202 267 q 249 152 225 182 q 310 104 273 121 q 400 88 348 88 q 551 155 505 88 q 597 355 597 223 "},"щ":{"x_min":118,"x_max":1197,"ha":1218,"o":"m 1197 -258 l 1073 -258 l 1073 0 l 118 0 l 118 745 l 241 745 l 241 102 l 542 102 l 542 745 l 665 745 l 665 102 l 965 102 l 965 745 l 1089 745 l 1089 102 l 1197 102 l 1197 -258 "},"℮":{"x_min":69,"x_max":789,"ha":860,"o":"m 429 -24 q 273 7 341 -24 q 161 92 206 39 q 92 215 115 146 q 69 359 69 284 q 83 480 69 426 q 124 577 98 534 q 185 651 150 620 q 259 702 219 682 q 343 733 299 723 q 429 743 386 743 q 571 716 506 743 q 685 639 637 689 q 761 518 734 589 q 789 359 789 448 l 213 359 l 213 117 q 251 86 228 100 q 300 59 273 71 q 357 40 327 47 q 420 33 388 33 q 512 44 472 33 q 585 75 553 55 q 645 125 618 96 q 696 193 672 155 l 746 165 q 693 92 721 126 q 628 31 665 58 q 542 -9 590 5 q 429 -24 493 -24 m 644 417 l 644 604 q 609 632 630 618 q 560 658 588 646 q 498 677 532 670 q 426 685 465 685 q 358 678 389 685 q 300 661 327 672 q 252 635 274 650 q 213 606 230 621 l 213 417 l 644 417 "},"Φ":{"x_min":71,"x_max":994,"ha":1065,"o":"m 468 1006 l 594 1006 l 594 884 l 643 884 q 801 852 735 884 q 910 768 867 820 q 973 649 953 716 q 994 514 994 583 q 985 429 994 472 q 959 343 977 385 q 913 264 942 301 q 844 199 885 227 q 749 155 803 171 q 626 139 694 139 l 594 139 l 594 -14 l 468 -14 l 468 139 l 436 139 q 314 155 368 139 q 220 199 260 171 q 151 264 179 227 q 105 343 122 301 q 79 429 87 385 q 71 514 71 472 q 91 649 71 583 q 154 768 112 716 q 262 852 197 820 q 418 884 328 884 l 468 884 l 468 1006 m 594 246 l 611 246 q 721 266 674 246 q 798 322 768 286 q 844 408 829 358 q 860 517 860 458 q 846 617 860 570 q 804 700 832 665 q 734 755 776 735 q 632 776 691 776 l 594 776 l 594 246 m 468 776 l 429 776 q 329 755 371 776 q 259 700 287 735 q 217 617 231 665 q 204 517 204 570 q 219 408 204 458 q 265 322 235 358 q 342 266 295 286 q 450 246 388 246 l 468 246 l 468 776 "},"ş":{"x_min":61.15625,"x_max":564,"ha":627,"o":"m 564 203 q 544 108 564 149 q 487 40 524 68 q 398 0 450 13 q 281 -14 346 -14 q 154 -2 207 -14 q 61 33 101 9 l 61 146 q 107 125 82 135 q 161 106 133 114 q 219 93 189 98 q 279 88 249 88 q 353 95 323 88 q 403 116 384 103 q 431 150 423 130 q 440 194 440 170 q 433 232 440 215 q 409 265 427 249 q 360 299 391 282 q 280 337 329 316 q 193 378 232 358 q 127 424 154 399 q 86 482 100 449 q 72 560 72 515 q 90 645 72 608 q 143 707 109 682 q 224 745 177 732 q 330 758 272 758 q 451 743 396 758 q 554 706 505 729 l 512 606 q 422 641 468 626 q 329 655 376 655 q 228 632 261 655 q 195 568 195 610 q 203 526 195 544 q 229 493 210 509 q 279 461 248 477 q 358 426 311 445 q 444 385 406 405 q 509 339 482 365 q 549 281 535 314 q 564 203 564 249 m 440 -194 q 392 -297 440 -260 q 242 -334 344 -334 q 212 -331 227 -334 q 187 -327 197 -329 l 187 -254 q 213 -257 197 -256 q 240 -258 230 -258 q 315 -247 288 -258 q 342 -208 342 -235 q 333 -186 342 -195 q 309 -169 324 -176 q 272 -157 294 -162 q 227 -147 251 -152 l 288 0 l 370 0 l 331 -78 q 374 -92 354 -83 q 408 -115 393 -101 q 431 -148 423 -128 q 440 -194 440 -168 "}," ":{"x_min":0,"x_max":0,"ha":765},"ı":{"x_min":118,"x_max":241.4375,"ha":359,"o":"m 241 0 l 118 0 l 118 745 l 241 745 l 241 0 "},"ä":{"x_min":64,"x_max":626,"ha":737,"o":"m 536 0 l 511 102 l 505 102 q 461 50 483 72 q 412 13 439 28 q 353 -7 386 0 q 278 -14 321 -14 q 193 0 232 -14 q 125 40 153 12 q 80 109 96 67 q 64 208 64 151 q 142 379 64 320 q 379 445 220 439 l 503 450 l 503 496 q 494 572 503 541 q 465 620 484 602 q 419 647 447 639 q 357 655 392 655 q 253 639 301 655 q 160 599 204 623 l 117 692 q 228 739 167 720 q 357 758 290 758 q 477 744 427 758 q 560 700 527 730 q 609 623 593 669 q 626 509 626 576 l 626 0 l 536 0 m 310 88 q 386 101 351 88 q 447 140 422 114 q 488 205 473 166 q 502 298 502 245 l 502 365 l 405 360 q 303 346 345 357 q 237 316 262 336 q 202 270 213 297 q 191 208 191 243 q 224 117 191 146 q 310 88 257 88 m 185 945 q 203 998 185 982 q 250 1015 222 1015 q 296 998 276 1015 q 315 945 315 981 q 296 892 315 909 q 250 876 276 876 q 203 892 222 876 q 185 945 185 909 m 439 945 q 458 998 439 982 q 504 1015 477 1015 q 529 1010 517 1015 q 550 998 541 1006 q 564 977 559 989 q 570 945 570 964 q 550 892 570 909 q 504 876 530 876 q 458 892 477 876 q 439 945 439 909 "},"¹":{"x_min":42,"x_max":297.984375,"ha":460,"o":"m 207 992 l 297 992 l 297 397 l 201 397 l 201 754 q 201 792 201 771 q 202 833 201 813 q 204 873 203 854 q 206 908 205 893 q 184 881 196 895 q 156 853 171 866 l 92 799 l 42 864 l 207 992 "},"W":{"x_min":13.75,"x_max":1214.25,"ha":1228,"o":"m 549 992 l 682 992 l 837 411 q 857 335 847 373 q 876 261 867 297 q 891 194 884 225 q 901 136 897 162 q 908 192 904 162 q 917 256 912 223 q 929 325 923 290 q 943 393 936 360 l 1079 992 l 1214 992 l 965 0 l 837 0 l 665 636 q 647 707 656 671 q 631 776 638 744 q 615 848 622 813 q 600 776 608 814 q 585 707 593 745 q 567 632 576 669 l 402 0 l 275 0 l 13 992 l 147 992 l 298 388 q 313 323 306 357 q 325 257 320 290 q 336 192 331 223 q 344 136 341 162 q 352 194 347 161 q 364 264 358 227 q 379 338 371 301 q 396 409 387 376 l 549 992 "},"λ":{"x_min":-10.25,"x_max":710,"ha":710,"o":"m -10 0 l 288 729 l 252 837 q 233 887 243 864 q 208 926 222 910 q 172 952 193 943 q 122 961 152 961 q 82 959 99 961 q 52 953 65 956 l 52 1052 q 92 1060 69 1057 q 138 1064 114 1064 q 224 1049 188 1064 q 286 1005 260 1035 q 335 929 313 975 q 377 820 356 883 l 600 163 q 627 107 612 127 q 669 88 643 88 q 691 90 678 88 q 710 95 704 93 l 710 3 q 675 -9 694 -4 q 632 -14 657 -14 q 585 -8 605 -14 q 549 11 565 -2 q 521 46 533 24 q 498 99 508 68 l 406 382 q 389 437 399 405 q 370 502 379 469 q 353 564 361 534 q 343 610 346 594 l 338 610 q 312 501 330 558 q 272 389 294 443 l 117 0 l -10 0 "},">":{"x_min":69,"x_max":696,"ha":765,"o":"m 69 270 l 568 488 l 69 735 l 69 844 l 696 517 l 696 448 l 69 161 l 69 270 "},"τ":{"x_min":13,"x_max":590.296875,"ha":624,"o":"m 590 745 l 590 642 l 337 642 l 337 230 q 345 162 337 190 q 369 117 354 134 q 406 92 385 100 q 451 84 427 84 q 478 85 463 84 q 506 88 492 86 q 531 92 519 90 q 553 97 544 95 l 553 5 q 530 -2 544 1 q 502 -10 517 -6 q 468 -15 486 -13 q 432 -18 450 -18 q 349 -8 388 -18 q 279 27 309 1 q 231 99 249 54 q 214 216 214 145 l 214 642 l 13 642 l 13 691 l 103 745 l 590 745 "},"Ų":{"x_min":125,"x_max":845,"ha":970,"o":"m 845 993 l 845 349 q 822 205 845 272 q 755 90 800 139 q 641 13 709 41 q 481 -14 573 -14 q 327 12 394 -14 q 216 86 261 38 q 148 202 171 134 q 125 352 125 269 l 125 991 l 251 991 l 251 346 q 309 162 251 227 q 487 97 368 97 q 591 115 548 97 q 663 167 635 133 q 704 246 690 200 q 718 347 718 292 l 718 993 l 845 993 m 483 -161 q 501 -206 483 -191 q 543 -220 519 -220 q 576 -218 560 -220 q 602 -214 592 -217 l 602 -291 q 562 -299 584 -296 q 521 -302 541 -302 q 419 -266 453 -302 q 386 -170 386 -231 q 395 -116 386 -142 q 421 -69 405 -91 q 454 -30 436 -48 q 490 0 473 -12 l 577 0 q 483 -161 483 -90 "},"Ŵ":{"x_min":13.75,"x_max":1214.25,"ha":1228,"o":"m 549 992 l 682 992 l 837 411 q 857 335 847 373 q 876 261 867 297 q 891 194 884 225 q 901 136 897 162 q 908 192 904 162 q 917 256 912 223 q 929 325 923 290 q 943 393 936 360 l 1079 992 l 1214 992 l 965 0 l 837 0 l 665 636 q 647 707 656 671 q 631 776 638 744 q 615 848 622 813 q 600 776 608 814 q 585 707 593 745 q 567 632 576 669 l 402 0 l 275 0 l 13 992 l 147 992 l 298 388 q 313 323 306 357 q 325 257 320 290 q 336 192 331 223 q 344 136 341 162 q 352 194 347 161 q 364 264 358 227 q 379 338 371 301 q 396 409 387 376 l 549 992 m 839 1071 l 757 1071 q 685 1126 722 1093 q 614 1196 649 1159 q 541 1126 577 1159 q 471 1071 505 1093 l 389 1071 l 389 1089 q 429 1134 406 1108 q 475 1187 452 1160 q 518 1242 498 1215 q 548 1293 538 1269 l 679 1293 q 709 1242 689 1269 q 752 1187 729 1215 q 798 1134 775 1160 q 839 1089 822 1108 l 839 1071 "},"‛":{"x_min":17,"x_max":229,"ha":243,"o":"m 150 992 q 165 913 156 956 q 184 827 174 871 q 205 737 194 782 q 229 652 217 692 l 136 652 q 101 731 119 690 q 68 815 83 772 q 39 898 52 857 q 17 977 26 939 l 25 992 l 150 992 "},"Ð":{"x_min":32,"x_max":865,"ha":950,"o":"m 32 546 l 135 546 l 135 992 l 410 992 q 598 960 514 992 q 741 868 682 929 q 832 715 800 806 q 865 505 865 624 q 832 285 865 379 q 738 127 799 190 q 586 31 676 63 q 383 0 496 0 l 135 0 l 135 434 l 32 434 l 32 546 m 731 501 q 709 672 731 600 q 643 791 686 744 q 538 861 601 838 q 397 884 476 884 l 261 884 l 261 546 l 489 546 l 489 434 l 261 434 l 261 107 l 370 107 q 640 207 549 107 q 731 501 731 306 "},"Λ":{"x_min":-0.25,"x_max":789.25,"ha":789,"o":"m 789 0 l 654 0 l 455 625 q 419 748 434 691 q 393 856 403 805 q 367 748 381 805 q 333 629 353 691 l 133 0 l 0 0 l 330 992 l 457 992 l 789 0 "},"·":{"x_min":100,"x_max":272,"ha":372,"o":"m 100 490 q 106 534 100 516 q 125 563 113 552 q 152 579 136 574 q 186 585 167 585 q 219 579 203 585 q 246 563 235 574 q 265 534 258 552 q 272 490 272 516 q 265 447 272 465 q 246 418 258 430 q 219 401 235 406 q 186 396 203 396 q 152 401 167 396 q 125 418 136 406 q 106 447 113 430 q 100 490 100 465 "},"Х":{"x_min":-0.25,"x_max":760.25,"ha":760,"o":"m 760 0 l 617 0 l 376 430 l 127 0 l 0 0 l 307 518 l 20 992 l 155 992 l 380 612 l 608 992 l 737 992 l 450 522 l 760 0 "},"Υ":{"x_min":-0.25,"x_max":731.25,"ha":732,"o":"m 364 490 l 595 992 l 731 992 l 428 386 l 428 0 l 302 0 l 302 379 l 0 992 l 137 992 l 364 490 "},"r":{"x_min":118,"x_max":526,"ha":554,"o":"m 439 758 q 483 756 459 758 q 526 751 508 754 l 509 637 q 470 643 490 640 q 433 645 450 645 q 355 628 390 645 q 294 578 320 610 q 255 501 269 546 q 241 401 241 456 l 241 0 l 118 0 l 118 745 l 218 745 l 233 608 l 238 608 q 274 664 255 637 q 318 712 294 691 q 372 745 342 732 q 439 758 402 758 "},"ж":{"x_min":2.75,"x_max":997.25,"ha":1000,"o":"m 444 383 l 444 745 l 560 745 l 560 383 l 837 745 l 971 745 l 688 383 l 997 0 l 857 0 l 560 377 l 560 0 l 444 0 l 444 377 l 143 0 l 2 0 l 316 383 l 29 745 l 162 745 l 444 383 "},"Ø":{"x_min":85,"x_max":945,"ha":1031,"o":"m 881 985 l 819 884 q 913 719 881 817 q 945 496 945 620 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 297 34 387 -14 l 244 -51 l 151 0 l 212 99 q 115 268 146 167 q 85 498 85 369 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 635 992 580 1007 q 734 952 689 978 l 789 1038 l 881 985 m 218 497 q 234 337 218 408 q 282 213 249 266 l 675 854 q 603 884 642 874 q 517 895 565 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 m 811 497 q 751 773 811 671 l 359 136 q 430 107 391 117 q 515 97 468 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 "},"Ỳ":{"x_min":-0.25,"x_max":731.25,"ha":732,"o":"m 364 490 l 595 992 l 731 992 l 428 386 l 428 0 l 302 0 l 302 379 l 0 992 l 137 992 l 364 490 m 437 1071 l 355 1071 q 303 1118 331 1089 q 249 1175 275 1146 q 202 1233 223 1205 q 170 1278 180 1260 l 170 1293 l 318 1293 q 344 1242 329 1269 q 374 1187 358 1215 q 406 1134 390 1160 q 437 1089 422 1108 l 437 1071 "},"÷":{"x_min":69.65625,"x_max":696.34375,"ha":765,"o":"m 69 439 l 69 541 l 696 541 l 696 439 l 69 439 m 305 219 q 309 243 305 234 q 319 259 313 253 q 335 268 326 265 q 355 270 344 270 q 375 268 365 270 q 391 259 384 265 q 402 243 398 253 q 406 219 406 234 q 402 196 406 206 q 391 181 398 187 q 375 171 384 174 q 355 169 365 169 q 335 171 344 169 q 319 181 326 174 q 309 196 313 187 q 305 219 305 206 m 305 761 q 309 784 305 775 q 319 800 313 794 q 335 809 326 806 q 355 812 344 812 q 375 809 365 812 q 391 800 384 806 q 402 784 398 794 q 406 761 406 775 q 402 738 406 747 q 391 722 398 728 q 375 713 384 715 q 355 710 365 710 q 335 713 344 710 q 319 722 326 715 q 309 738 313 728 q 305 761 305 747 "},"с":{"x_min":77,"x_max":596,"ha":643,"o":"m 402 -14 q 274 7 334 -14 q 171 75 215 28 q 102 193 127 121 q 77 367 77 266 q 102 548 77 474 q 173 669 128 623 q 278 736 218 715 q 408 758 339 758 q 511 746 461 758 q 596 718 562 735 l 559 614 q 524 627 543 621 q 485 638 505 633 q 445 647 465 644 q 408 650 425 650 q 253 581 302 650 q 204 369 204 513 q 253 160 204 226 q 402 93 302 93 q 502 106 457 93 q 583 135 546 118 l 583 26 q 504 -3 546 6 q 402 -14 463 -14 "},"h":{"x_min":118,"x_max":707,"ha":818,"o":"m 583 0 l 583 479 q 547 611 583 567 q 436 655 512 655 q 343 637 381 655 q 283 585 306 620 q 251 501 261 551 q 241 385 241 450 l 241 0 l 118 0 l 118 1055 l 241 1055 l 241 741 l 236 644 l 242 644 q 283 694 259 673 q 334 730 306 715 q 393 751 362 744 q 457 758 424 758 q 644 693 581 758 q 707 486 707 628 l 707 0 l 583 0 "},"f":{"x_min":19,"x_max":509,"ha":457,"o":"m 441 656 l 274 656 l 274 0 l 151 0 l 151 656 l 19 656 l 19 704 l 151 749 l 151 814 q 166 934 151 886 q 210 1010 181 982 q 280 1051 238 1039 q 375 1063 322 1063 q 449 1055 415 1063 q 509 1037 482 1047 l 477 941 q 431 954 456 949 q 379 960 406 960 q 332 954 352 960 q 300 931 313 947 q 280 887 287 915 q 274 815 274 859 l 274 745 l 441 745 l 441 656 "},"“":{"x_min":16,"x_max":489,"ha":504,"o":"m 285 652 l 277 666 q 299 744 286 703 q 328 828 312 786 q 361 912 343 870 q 396 992 379 954 l 489 992 q 465 905 477 950 q 444 816 454 861 q 425 730 434 772 q 410 652 416 687 l 285 652 m 24 652 l 16 666 q 38 744 25 703 q 67 828 51 786 q 100 912 82 870 q 135 992 118 954 l 228 992 q 204 905 216 950 q 183 816 193 861 q 164 730 173 772 q 149 652 155 687 l 24 652 "},"A":{"x_min":-0.25,"x_max":844.25,"ha":844,"o":"m 715 0 l 606 307 l 237 307 l 127 0 l 0 0 l 364 996 l 479 996 l 844 0 l 715 0 m 566 419 l 466 706 q 456 736 462 719 q 444 774 450 754 q 432 817 438 795 q 421 860 426 839 q 410 816 416 839 q 397 773 404 794 q 386 735 391 752 q 376 706 380 718 l 277 419 l 566 419 "},"O":{"x_min":85,"x_max":945,"ha":1031,"o":"m 945 496 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 324 22 405 -14 q 189 126 243 59 q 110 288 136 193 q 85 498 85 382 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 701 970 622 1007 q 835 867 781 934 q 917 706 890 800 q 945 496 945 612 m 218 497 q 236 330 218 404 q 290 204 253 255 q 382 124 326 152 q 515 97 438 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 q 794 664 811 590 q 741 789 777 738 q 649 868 705 840 q 517 895 594 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 "},"Đ":{"x_min":32,"x_max":865,"ha":950,"o":"m 32 546 l 135 546 l 135 992 l 410 992 q 598 960 514 992 q 741 868 682 929 q 832 715 800 806 q 865 505 865 624 q 832 285 865 379 q 738 127 799 190 q 586 31 676 63 q 383 0 496 0 l 135 0 l 135 434 l 32 434 l 32 546 m 731 501 q 709 672 731 600 q 643 791 686 744 q 538 861 601 838 q 397 884 476 884 l 261 884 l 261 546 l 489 546 l 489 434 l 261 434 l 261 107 l 370 107 q 640 207 549 107 q 731 501 731 306 "},"3":{"x_min":56,"x_max":682,"ha":765,"o":"m 651 759 q 635 668 651 709 q 591 598 619 628 q 524 548 563 568 q 436 521 484 529 l 436 517 q 619 441 556 502 q 682 281 682 379 q 659 162 682 216 q 593 68 637 108 q 480 7 548 29 q 318 -14 411 -14 q 178 -2 244 -14 q 56 39 113 9 l 56 154 q 184 107 115 124 q 316 91 252 91 q 424 104 378 91 q 499 142 469 118 q 542 204 528 167 q 556 285 556 240 q 538 363 556 331 q 487 417 520 396 q 405 448 453 438 q 297 458 357 458 l 207 458 l 207 564 l 297 564 q 395 577 352 564 q 466 616 437 591 q 510 675 495 641 q 525 751 525 710 q 513 814 525 786 q 478 861 501 842 q 425 890 456 880 q 355 900 393 900 q 227 878 283 900 q 122 819 172 855 l 60 904 q 117 943 85 925 q 185 975 148 961 q 265 997 223 989 q 355 1006 307 1006 q 483 987 428 1006 q 575 936 538 969 q 632 858 613 903 q 651 759 651 812 "},"Ǿ":{"x_min":85,"x_max":945,"ha":1031,"o":"m 881 985 l 819 884 q 913 719 881 817 q 945 496 945 620 q 917 287 945 382 q 835 126 890 193 q 701 22 781 59 q 515 -14 620 -14 q 297 34 387 -14 l 244 -51 l 151 0 l 212 99 q 115 268 146 167 q 85 498 85 369 q 110 707 85 613 q 190 867 136 801 q 325 970 243 934 q 517 1007 406 1007 q 635 992 580 1007 q 734 952 689 978 l 789 1038 l 881 985 m 218 497 q 234 337 218 408 q 282 213 249 266 l 675 854 q 603 884 642 874 q 517 895 565 895 q 383 868 439 895 q 290 789 327 840 q 236 664 253 738 q 218 497 218 590 m 811 497 q 751 773 811 671 l 359 136 q 430 107 391 117 q 515 97 468 97 q 648 124 593 97 q 741 204 704 152 q 794 330 777 255 q 811 497 811 404 m 441 1089 q 471 1134 455 1108 q 503 1187 487 1160 q 534 1242 519 1215 q 559 1293 548 1269 l 708 1293 l 708 1278 q 675 1233 697 1260 q 628 1175 654 1205 q 574 1118 602 1146 q 523 1071 546 1089 l 441 1071 l 441 1089 "},"⅛":{"x_min":56,"x_max":1011,"ha":1051,"o":"m 221 992 l 311 992 l 311 397 l 215 397 l 215 754 q 215 792 215 771 q 216 833 215 813 q 218 873 217 854 q 220 908 219 893 q 198 881 210 895 q 170 853 185 866 l 106 799 l 56 864 l 221 992 m 829 992 l 278 0 l 171 0 l 722 992 l 829 992 m 815 604 q 883 594 851 604 q 938 567 914 585 q 976 519 962 548 q 991 453 991 491 q 983 407 991 428 q 962 369 976 386 q 931 338 949 352 q 893 313 914 325 q 938 285 917 300 q 975 251 959 270 q 1001 209 991 233 q 1011 157 1011 186 q 996 87 1011 119 q 956 33 982 56 q 894 0 930 11 q 816 -13 858 -13 q 670 31 721 -13 q 620 153 620 75 q 628 205 620 182 q 651 247 636 228 q 684 281 665 266 q 724 307 703 295 q 690 335 705 321 q 662 368 674 350 q 644 407 650 386 q 638 453 638 428 q 652 519 638 491 q 691 566 667 547 q 748 594 716 585 q 815 604 780 604 m 716 155 q 741 93 716 116 q 814 70 766 70 q 888 93 863 70 q 914 155 914 116 q 906 190 914 174 q 885 219 899 206 q 854 242 872 232 q 813 262 835 253 l 802 266 q 738 219 760 244 q 716 155 716 193 m 813 520 q 755 502 776 520 q 734 449 734 484 q 741 417 734 431 q 757 392 747 404 q 783 371 768 380 q 815 353 798 361 q 846 370 831 360 q 871 390 860 379 q 887 416 881 402 q 894 449 894 430 q 872 502 894 484 q 813 520 850 520 "},"4":{"x_min":16,"x_max":738,"ha":765,"o":"m 738 222 l 593 222 l 593 0 l 474 0 l 474 222 l 16 222 l 16 329 l 465 997 l 593 997 l 593 334 l 738 334 l 738 222 m 474 334 l 474 576 q 475 656 474 614 q 477 737 476 697 q 480 811 478 777 q 482 869 482 846 l 476 869 q 464 839 471 855 q 449 806 457 822 q 431 773 440 789 q 415 747 423 758 l 136 334 l 474 334 "},"Ẁ":{"x_min":13.75,"x_max":1214.25,"ha":1228,"o":"m 549 992 l 682 992 l 837 411 q 857 335 847 373 q 876 261 867 297 q 891 194 884 225 q 901 136 897 162 q 908 192 904 162 q 917 256 912 223 q 929 325 923 290 q 943 393 936 360 l 1079 992 l 1214 992 l 965 0 l 837 0 l 665 636 q 647 707 656 671 q 631 776 638 744 q 615 848 622 813 q 600 776 608 814 q 585 707 593 745 q 567 632 576 669 l 402 0 l 275 0 l 13 992 l 147 992 l 298 388 q 313 323 306 357 q 325 257 320 290 q 336 192 331 223 q 344 136 341 162 q 352 194 347 161 q 364 264 358 227 q 379 338 371 301 q 396 409 387 376 l 549 992 m 691 1071 l 609 1071 q 557 1118 585 1089 q 503 1175 529 1146 q 456 1233 477 1205 q 424 1278 434 1260 l 424 1293 l 572 1293 q 598 1242 583 1269 q 628 1187 612 1215 q 660 1134 644 1160 q 691 1089 676 1108 l 691 1071 "},"Ť":{"x_min":14,"x_max":706,"ha":721,"o":"m 423 0 l 297 0 l 297 880 l 14 880 l 14 992 l 706 992 l 706 880 l 423 880 l 423 0 m 587 1274 q 546 1229 570 1255 q 500 1176 523 1203 q 457 1121 477 1148 q 427 1071 437 1094 l 296 1071 q 266 1121 286 1094 q 223 1176 246 1148 q 177 1229 200 1203 q 137 1274 154 1255 l 137 1293 l 219 1293 q 289 1237 253 1270 q 362 1166 325 1204 q 433 1237 397 1204 q 505 1293 470 1270 l 587 1293 l 587 1274 "},"ψ":{"x_min":111,"x_max":945,"ha":1028,"o":"m 582 1054 l 582 91 q 678 118 634 97 q 754 175 722 138 q 804 264 786 211 q 821 386 821 317 q 818 478 821 434 q 811 564 816 521 q 797 651 805 606 q 778 745 789 695 l 901 745 q 920 651 912 696 q 934 564 928 607 q 942 479 939 521 q 945 390 945 436 q 915 209 945 283 q 837 87 886 134 q 721 16 787 39 q 582 -12 655 -7 l 582 -334 l 459 -334 l 459 -12 q 319 12 383 -9 q 209 80 255 34 q 136 199 162 127 q 111 376 111 272 l 111 745 l 234 745 l 234 372 q 252 242 234 294 q 301 157 271 190 q 373 109 332 124 q 459 90 414 93 l 459 1054 l 582 1054 "},"ŗ":{"x_min":65,"x_max":526,"ha":554,"o":"m 439 758 q 483 756 459 758 q 526 751 508 754 l 509 637 q 470 643 490 640 q 433 645 450 645 q 355 628 390 645 q 294 578 320 610 q 255 501 269 546 q 241 401 241 456 l 241 0 l 118 0 l 118 745 l 218 745 l 233 608 l 238 608 q 274 664 255 637 q 318 712 294 691 q 372 745 342 732 q 439 758 402 758 m 65 -288 q 81 -246 72 -271 q 98 -191 90 -220 q 112 -135 106 -163 q 121 -85 119 -107 l 244 -85 l 244 -98 q 229 -141 239 -115 q 203 -197 218 -167 q 169 -255 188 -226 q 131 -307 151 -284 l 65 -307 l 65 -288 "}},"cssFontWeight":"normal","ascender":1290,"underlinePosition":-154,"cssFontStyle":"normal","boundingBox":{"yMin":-377,"xMin":-239.25,"yMax":1363,"xMax":1555},"resolution":1000,"original_font_information":{"postscript_name":"DroidSans","version_string":"Version 1.00 build 107","vendor_url":"http://www.ascendercorp.com/","full_font_name":"Droid Sans","font_family_name":"Droid Sans","copyright":"Digitized data copyright © 2006, Google Corporation.","description":"Droid Sans is a humanist sans serif typeface designed for user interfaces and electronic communication.","trademark":"Droid is a trademark of Google and may be registered in certain jurisdictions.","designer":"","designer_url":"http://www.ascendercorp.com/typedesigners.html","unique_font_identifier":"Ascender - Droid Sans","license_url":"http://ascendercorp.com/eula10.html","license_description":"This font software is the valuable property of Ascender Corporation and/or its suppliers and its use by you is covered under the terms of a license agreement. This font software is licensed to you by Ascender Corporation for your personal or business use on up to five personal computers. You may not use this font software on more than five personal computers unless you have obtained a license from Ascender to do so. Except as specifically permitted by the license, you may not copy this font software.\n\nIf you have any questions, please review the license agreement you received with this font software, and/or contact Ascender Corporation. \n\nContact Information:\nAscender Corporation\nWeb http://www.ascendercorp.com/","manufacturer_name":"Ascender Corporation","font_sub_family_name":"Regular"},"descender":-328,"familyName":"Droid Sans","lineHeight":1617,"underlineThickness":102} \ No newline at end of file diff --git a/node_modules/three/examples/fonts/droid/droid_serif_bold.typeface.json b/node_modules/three/examples/fonts/droid/droid_serif_bold.typeface.json new file mode 100644 index 0000000..4a82b45 --- /dev/null +++ b/node_modules/three/examples/fonts/droid/droid_serif_bold.typeface.json @@ -0,0 +1 @@ +{"glyphs":{"ǻ":{"x_min":62,"x_max":786.859375,"ha":832,"o":"m 322 1166 q 356 1203 337 1182 q 394 1246 375 1224 q 429 1290 413 1268 q 457 1331 446 1311 l 675 1331 l 675 1320 q 632 1283 662 1305 q 565 1236 602 1261 q 488 1190 528 1212 q 416 1153 448 1167 l 322 1153 l 322 1166 m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 265 487 224 l 487 369 l 424 365 q 354 352 383 363 q 309 321 326 341 q 285 273 292 301 q 277 206 277 244 m 401 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 534 749 479 762 q 625 709 588 736 q 679 636 661 681 q 698 526 698 591 l 698 172 q 702 124 698 143 q 716 94 706 105 q 742 78 725 83 q 781 73 758 73 l 786 73 l 786 0 l 528 0 l 499 95 l 487 95 q 443 46 464 67 q 400 12 423 26 q 348 -7 377 -1 q 280 -14 319 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 212 62 154 q 139 379 62 325 q 373 438 217 434 l 487 443 l 487 519 q 484 583 487 554 q 472 633 481 612 q 446 665 464 654 q 401 677 429 677 m 586 962 q 573 897 586 925 q 537 849 560 868 q 484 820 515 830 q 419 811 454 811 q 354 820 384 811 q 301 849 323 830 q 265 897 278 868 q 253 962 253 925 q 265 1028 253 999 q 301 1075 278 1056 q 354 1104 323 1094 q 419 1114 384 1114 q 484 1104 454 1114 q 537 1075 515 1094 q 573 1028 560 1056 q 586 962 586 999 m 501 962 q 494 997 501 982 q 477 1020 488 1011 q 451 1033 465 1029 q 419 1038 436 1038 q 387 1033 402 1038 q 361 1020 373 1029 q 344 997 350 1011 q 337 962 337 982 q 344 927 337 942 q 361 904 350 913 q 387 891 373 895 q 419 887 402 887 q 451 891 436 887 q 477 904 465 895 q 494 927 488 913 q 501 962 501 942 "},"Á":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 m 436 1089 q 469 1134 450 1108 q 506 1187 487 1160 q 542 1242 525 1215 q 569 1293 558 1269 l 788 1293 l 788 1278 q 745 1233 775 1260 q 678 1175 715 1205 q 602 1118 641 1146 q 530 1071 562 1089 l 436 1071 l 436 1089 "},"ĥ":{"x_min":23.703125,"x_max":889.65625,"ha":926,"o":"m 581 0 l 581 456 q 575 536 581 501 q 556 595 569 571 q 521 631 543 618 q 470 643 500 643 q 412 626 435 643 q 375 579 389 608 q 356 510 362 549 q 349 429 349 471 l 349 164 q 357 117 349 134 q 377 89 364 99 q 408 76 389 79 q 450 73 427 73 l 454 73 l 454 0 l 27 0 l 27 73 l 30 73 q 73 76 54 73 q 108 90 93 80 q 130 119 122 100 q 139 169 139 138 l 139 897 q 129 941 139 924 q 104 967 119 958 q 72 979 89 976 q 39 981 54 981 l 23 981 l 23 1055 l 349 1055 l 349 826 q 348 768 349 799 q 344 710 346 736 q 339 649 341 679 l 351 649 q 395 711 372 688 q 445 744 418 733 q 501 758 471 755 q 563 762 530 762 q 659 746 616 762 q 731 698 701 730 q 776 615 760 665 q 792 494 792 564 l 792 172 q 797 120 792 139 q 815 90 803 101 q 844 77 826 80 q 885 73 861 73 l 889 73 l 889 0 l 581 0 m 207 1127 q 245 1172 223 1146 q 289 1225 267 1198 q 330 1280 310 1253 q 360 1331 349 1307 l 547 1331 q 577 1280 558 1307 q 618 1225 596 1253 q 662 1172 640 1198 q 700 1127 683 1146 l 700 1109 l 604 1109 q 570 1136 590 1120 q 529 1168 550 1151 q 488 1202 508 1185 q 453 1233 468 1219 q 417 1202 437 1219 q 376 1168 397 1185 q 336 1136 356 1151 q 303 1109 317 1120 l 207 1109 l 207 1127 "},"Κ":{"x_min":38.453125,"x_max":1019,"ha":1019,"o":"m 602 739 q 640 782 625 763 q 664 818 655 802 q 677 850 673 835 q 681 879 681 865 q 664 911 681 902 q 603 920 646 920 l 603 992 l 980 992 l 980 920 q 926 911 951 920 q 876 886 901 902 q 828 847 852 869 q 780 797 804 825 l 597 596 l 855 185 q 894 131 875 153 q 932 97 913 110 q 970 79 951 84 q 1013 73 990 73 l 1019 73 l 1019 0 l 944 0 q 851 3 891 0 q 781 13 811 6 q 729 30 751 20 q 691 55 707 41 q 661 87 675 69 q 635 127 648 105 l 448 447 l 387 398 l 387 164 q 392 116 387 134 q 408 89 398 99 q 431 76 417 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 903 417 912 q 392 876 398 893 q 387 828 387 858 l 387 504 l 602 739 "},"»":{"x_min":90.046875,"x_max":679,"ha":770,"o":"m 679 339 l 466 97 l 369 97 l 510 375 l 369 654 l 466 654 l 679 411 l 679 339 m 400 339 l 187 97 l 90 97 l 230 375 l 90 654 l 187 654 l 400 411 l 400 339 "},"∆":{"x_min":68,"x_max":904,"ha":973,"o":"m 904 0 l 68 0 l 68 90 l 393 992 l 591 992 l 904 99 l 904 0 m 689 109 l 510 632 q 471 751 489 694 q 441 860 453 809 q 414 759 431 810 q 376 644 398 709 l 192 109 l 689 109 "},"ў":{"x_min":-0.265625,"x_max":804.234375,"ha":804,"o":"m 804 745 l 804 671 q 767 666 783 671 q 738 649 751 661 q 714 618 725 637 q 693 569 703 599 q 642 428 668 500 q 588 284 615 356 q 535 140 562 212 q 483 0 508 69 q 437 -118 458 -67 q 391 -206 415 -169 q 338 -268 367 -243 q 270 -307 309 -292 q 180 -327 231 -321 q 60 -334 129 -334 l 37 -334 l 37 -253 q 160 -235 109 -253 q 246 -185 211 -217 q 304 -107 281 -152 q 344 -6 327 -61 l 94 604 q 75 635 85 624 q 53 653 65 647 q 28 661 42 659 q 0 662 15 662 l 0 745 l 395 745 l 395 671 q 331 660 355 671 q 308 619 308 650 q 313 592 308 607 q 321 565 317 576 q 347 502 334 536 q 373 433 360 468 q 397 367 385 399 q 417 311 408 335 q 434 263 427 284 q 445 224 441 242 q 452 192 450 207 q 456 164 455 178 q 462 195 458 178 q 471 228 466 212 q 480 257 475 244 q 487 275 485 270 l 579 547 q 584 563 581 554 q 588 582 586 572 q 591 600 590 591 q 592 615 592 609 q 566 659 592 647 q 491 671 539 671 l 491 745 l 804 745 m 407 918 q 499 952 467 918 q 539 1059 531 986 l 713 1059 q 695 977 708 1016 q 649 908 682 938 q 559 859 617 877 q 407 842 501 842 q 256 859 314 842 q 165 908 198 877 q 119 977 132 938 q 102 1059 106 1016 l 275 1059 q 315 952 283 986 q 407 918 348 918 "},"ţ":{"x_min":29.546875,"x_max":534,"ha":562,"o":"m 436 97 q 487 101 463 97 q 534 110 512 105 l 534 20 q 504 9 523 15 q 461 -2 485 2 q 405 -10 436 -7 q 337 -14 374 -14 q 253 -2 291 -14 q 188 34 215 8 q 148 102 162 60 q 134 205 134 144 l 134 650 l 29 650 l 29 721 q 109 738 74 721 q 165 779 144 756 q 229 917 208 824 l 344 917 l 344 745 l 521 745 l 521 650 l 344 650 l 344 219 q 366 127 344 156 q 436 97 387 97 m 179 -289 q 193 -242 185 -268 q 209 -189 201 -216 q 223 -134 216 -161 q 233 -85 229 -108 l 395 -85 l 395 -98 q 370 -147 385 -120 q 336 -202 354 -174 q 299 -257 318 -230 q 262 -307 280 -285 l 179 -307 l 179 -289 "},"«":{"x_min":90,"x_max":678.28125,"ha":770,"o":"m 90 411 l 302 654 l 399 654 l 259 375 l 399 97 l 302 97 l 90 339 l 90 411 m 369 411 l 581 654 l 678 654 l 538 375 l 678 97 l 581 97 l 369 339 l 369 411 "},"í":{"x_min":23.703125,"x_max":532,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m 180 860 q 213 905 194 879 q 250 958 231 931 q 286 1013 269 986 q 313 1064 302 1040 l 532 1064 l 532 1049 q 489 1004 519 1031 q 422 946 459 976 q 346 889 385 917 q 274 842 306 860 l 180 842 l 180 860 "},"ņ":{"x_min":27.78125,"x_max":889.65625,"ha":926,"o":"m 581 0 l 581 456 q 575 536 581 501 q 556 595 569 571 q 521 631 543 618 q 470 643 500 643 q 412 626 435 643 q 375 579 389 608 q 356 510 362 549 q 349 429 349 471 l 349 164 q 357 117 349 134 q 377 89 364 99 q 408 76 389 80 q 450 73 427 73 l 454 73 l 454 0 l 27 0 l 27 73 l 30 73 q 73 76 54 73 q 108 90 93 80 q 130 119 122 100 q 139 169 139 138 l 139 580 q 131 627 139 610 q 111 655 124 645 q 80 668 98 664 q 38 671 61 671 l 34 671 l 34 745 l 326 745 l 344 645 l 351 645 q 395 707 372 684 q 445 743 418 730 q 501 758 471 755 q 563 762 530 762 q 659 746 616 762 q 731 698 701 730 q 776 615 760 665 q 792 494 792 564 l 792 172 q 797 120 792 139 q 815 90 803 101 q 844 77 826 80 q 885 73 861 73 l 889 73 l 889 0 l 581 0 m 344 -289 q 358 -242 350 -268 q 374 -189 366 -216 q 388 -134 381 -161 q 398 -85 394 -108 l 560 -85 l 560 -98 q 535 -147 550 -120 q 501 -202 519 -174 q 464 -257 483 -230 q 427 -307 445 -285 l 344 -307 l 344 -289 "},"µ":{"x_min":112.71875,"x_max":888.453125,"ha":924,"o":"m 389 -14 q 290 7 331 -14 q 222 67 249 28 q 227 -39 222 9 q 247 -124 232 -87 q 292 -183 263 -161 q 371 -212 322 -206 q 362 -261 371 -239 q 336 -299 353 -283 q 296 -324 320 -315 q 242 -334 272 -334 q 193 -324 217 -334 q 151 -293 169 -315 q 123 -237 133 -272 q 112 -151 112 -202 q 114 -64 112 -110 q 119 35 116 -19 q 125 158 122 90 q 129 312 128 225 l 129 745 l 340 745 l 340 285 q 345 215 340 248 q 362 157 350 182 q 394 118 374 132 q 445 104 415 104 q 498 119 475 104 q 538 163 522 135 q 564 231 555 191 q 573 319 573 271 l 573 745 l 784 745 l 784 191 q 807 101 784 128 q 878 73 830 73 l 888 73 l 888 0 l 767 0 q 650 33 695 0 q 586 120 604 66 l 579 120 q 545 64 563 89 q 505 22 527 39 q 454 -4 482 4 q 389 -14 425 -14 "},"ỳ":{"x_min":-0.265625,"x_max":804.234375,"ha":804,"o":"m 804 745 l 804 671 q 767 666 783 671 q 738 649 751 661 q 714 618 725 637 q 693 569 703 599 q 642 428 668 500 q 588 284 615 356 q 535 140 562 212 q 483 0 508 69 q 437 -118 458 -67 q 391 -206 415 -169 q 338 -268 367 -243 q 270 -307 309 -292 q 180 -327 231 -321 q 60 -334 129 -334 l 37 -334 l 37 -253 q 160 -235 109 -253 q 246 -185 211 -217 q 304 -107 281 -152 q 344 -6 327 -61 l 94 604 q 75 635 85 624 q 53 653 65 647 q 28 661 42 659 q 0 662 15 662 l 0 745 l 395 745 l 395 671 q 331 660 355 671 q 308 619 308 650 q 313 592 308 607 q 321 565 317 576 q 347 502 334 536 q 373 433 360 468 q 397 367 385 399 q 417 311 408 335 q 434 263 427 284 q 445 224 441 242 q 452 192 450 207 q 456 164 455 178 q 462 195 458 178 q 471 228 466 212 q 480 257 475 244 q 487 275 485 270 l 579 547 q 584 563 581 554 q 588 582 586 572 q 591 600 590 591 q 592 615 592 609 q 566 659 592 647 q 491 671 539 671 l 491 745 l 804 745 m 420 842 q 348 889 388 860 q 271 946 308 917 q 204 1004 234 976 q 162 1049 174 1031 l 162 1064 l 379 1064 q 407 1013 390 1040 q 443 958 424 986 q 481 905 461 931 q 515 860 500 879 l 515 842 l 420 842 "},"Ι":{"x_min":38.453125,"x_max":517.953125,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 "},"Ύ":{"x_min":-52,"x_max":1166.5625,"ha":1167,"o":"m 432 0 l 432 73 l 497 73 q 528 75 514 73 q 554 86 543 77 q 571 111 565 94 q 578 157 578 128 l 578 351 l 321 844 q 301 879 310 865 q 281 902 292 893 q 256 914 270 910 q 222 918 243 918 l 204 918 l 204 992 l 669 992 l 669 918 l 645 918 q 583 901 603 918 q 562 856 562 884 q 568 817 562 838 q 583 779 575 797 l 686 575 q 722 496 708 530 q 747 430 736 462 q 780 510 761 467 q 822 600 799 553 l 902 766 q 922 817 917 797 q 926 850 926 838 q 903 902 926 886 q 834 918 881 918 l 803 918 l 803 992 l 1166 992 l 1166 918 l 1140 918 q 1109 913 1122 918 q 1086 897 1097 909 q 1063 863 1075 884 q 1035 810 1051 842 l 799 349 l 799 159 q 805 112 799 129 q 821 86 811 95 q 846 75 832 77 q 876 73 860 73 l 944 73 l 944 0 l 432 0 m -52 788 q -37 835 -45 809 q -22 888 -30 861 q -8 943 -15 916 q 1 993 -2 969 l 191 993 l 191 978 q 164 930 181 957 q 128 875 148 903 q 86 820 108 847 q 44 770 64 793 l -52 770 l -52 788 "},"ѕ":{"x_min":41.765625,"x_max":623,"ha":678,"o":"m 321 -14 q 192 -1 245 -14 q 105 32 139 10 q 57 83 72 53 q 41 148 41 113 q 54 202 41 182 q 88 234 68 223 q 130 250 108 246 q 171 253 153 253 q 182 175 171 210 q 212 117 193 141 q 259 80 232 93 q 321 67 287 67 q 383 74 357 67 q 425 95 409 82 q 450 126 442 108 q 458 162 458 143 q 450 203 458 185 q 422 237 441 221 q 369 268 402 253 q 287 300 336 283 q 188 342 231 320 q 116 392 145 364 q 71 457 86 421 q 56 540 56 493 q 77 637 56 596 q 138 706 98 678 q 232 747 177 733 q 354 761 287 761 q 466 749 420 761 q 541 720 512 738 q 584 678 570 702 q 597 632 597 655 q 565 560 597 585 q 456 536 532 536 q 425 644 456 605 q 334 682 394 682 q 291 676 311 682 q 255 660 270 671 q 230 633 239 649 q 221 596 221 617 q 229 556 221 573 q 259 522 238 538 q 317 490 281 506 q 411 454 354 473 q 496 417 457 437 q 563 369 535 396 q 607 308 591 342 q 623 230 623 274 q 602 127 623 172 q 544 50 582 81 q 449 2 505 19 q 321 -14 393 -14 "},"Ш":{"x_min":38.453125,"x_max":1541.859375,"ha":1581,"o":"m 38 0 l 38 73 l 96 73 q 123 76 111 73 q 146 88 136 79 q 162 114 156 97 q 168 158 168 130 l 168 828 q 162 876 168 858 q 147 903 157 893 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 495 992 l 495 918 l 450 918 q 422 915 435 918 q 399 903 409 912 q 384 876 390 893 q 378 828 378 858 l 378 84 l 685 84 l 685 828 q 679 876 685 858 q 664 903 674 893 q 641 915 654 912 q 613 918 628 918 l 568 918 l 568 992 l 1011 992 l 1011 918 l 966 918 q 939 916 952 918 q 917 904 927 913 q 901 879 907 895 q 895 835 895 863 l 895 84 l 1202 84 l 1202 828 q 1196 876 1202 858 q 1181 903 1190 893 q 1158 915 1171 912 q 1130 918 1145 918 l 1084 918 l 1084 992 l 1541 992 l 1541 918 l 1483 918 q 1456 915 1469 918 q 1433 903 1443 912 q 1418 876 1423 893 q 1413 828 1413 858 l 1413 158 q 1418 114 1413 130 q 1434 88 1424 97 q 1456 76 1444 79 q 1483 73 1469 73 l 1541 73 l 1541 0 l 38 0 "},"M":{"x_min":38.453125,"x_max":1283.875,"ha":1323,"o":"m 839 0 l 839 73 l 853 73 q 891 76 874 73 q 918 87 908 79 q 935 110 929 95 q 940 151 940 126 l 940 855 l 660 0 l 565 0 l 271 855 l 271 164 q 278 116 271 134 q 299 89 286 99 q 331 76 312 80 q 374 73 350 73 l 383 73 l 383 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 438 992 l 669 320 l 891 992 l 1283 992 l 1283 918 l 1225 918 q 1197 915 1210 918 q 1175 903 1184 912 q 1160 876 1165 893 q 1155 828 1155 858 l 1155 164 q 1160 116 1155 134 q 1175 89 1165 99 q 1197 76 1184 80 q 1225 73 1210 73 l 1283 73 l 1283 0 l 839 0 "},"Ψ":{"x_min":30.046875,"x_max":1322.9375,"ha":1356,"o":"m 522 330 q 385 341 444 330 q 285 375 327 353 q 215 426 243 396 q 172 490 188 455 q 150 564 156 525 q 144 645 144 604 l 144 818 q 134 870 144 850 q 110 901 125 890 q 74 915 95 911 q 30 918 53 918 l 30 992 l 346 992 l 346 664 q 355 550 346 598 q 385 471 363 502 q 445 425 407 439 q 544 410 484 410 l 575 410 l 575 832 q 565 876 575 860 q 541 903 556 893 q 505 915 526 912 q 461 918 484 918 l 442 918 l 442 992 l 909 992 l 909 918 l 891 918 q 847 915 868 918 q 811 903 826 912 q 786 876 796 893 q 777 832 777 860 l 777 410 l 808 410 q 906 425 868 410 q 967 471 945 439 q 997 550 989 502 q 1006 664 1006 598 l 1006 992 l 1322 992 l 1322 918 q 1278 915 1299 918 q 1242 901 1257 911 q 1218 870 1227 890 q 1209 818 1209 850 l 1209 645 q 1202 564 1209 604 q 1180 490 1196 525 q 1137 426 1164 455 q 1067 375 1109 396 q 967 341 1025 353 q 830 330 908 330 l 777 330 l 777 157 q 786 114 777 130 q 811 88 796 97 q 847 76 826 79 q 891 73 868 73 l 909 73 l 909 0 l 442 0 l 442 73 l 461 73 q 505 76 484 73 q 541 88 526 79 q 565 114 556 97 q 575 157 575 130 l 575 330 l 522 330 "},"ũ":{"x_min":36.34375,"x_max":891.4375,"ha":926,"o":"m 614 0 l 584 97 l 577 97 q 532 39 556 61 q 479 6 507 17 q 421 -9 452 -5 q 358 -14 390 -14 q 191 53 249 -14 q 134 260 134 120 l 134 572 q 128 622 134 603 q 111 652 123 641 q 82 667 100 662 q 39 671 64 671 l 36 671 l 36 745 l 344 745 l 344 299 q 349 218 344 254 q 367 157 355 182 q 399 117 379 131 q 450 104 419 104 q 507 118 483 104 q 546 160 531 133 q 568 227 561 188 q 576 315 576 266 l 576 582 q 567 630 576 612 q 546 657 559 647 q 514 668 532 666 q 475 671 496 671 l 471 671 l 471 745 l 787 745 l 787 161 q 794 113 787 130 q 813 87 801 96 q 842 76 825 78 q 879 73 859 73 l 891 73 l 891 0 l 614 0 m 573 974 q 600 980 588 974 q 621 996 612 986 q 634 1020 629 1006 q 641 1047 639 1033 l 732 1047 q 716 968 729 1005 q 680 902 702 930 q 626 858 657 874 q 558 842 595 842 q 490 855 521 842 q 434 885 460 869 q 385 916 408 902 q 340 929 363 929 q 313 923 325 929 q 292 907 301 917 q 279 883 284 897 q 272 856 274 870 l 182 856 q 197 935 184 898 q 234 1001 211 973 q 288 1045 257 1029 q 356 1062 319 1062 q 424 1048 394 1062 q 480 1018 454 1034 q 529 987 506 1001 q 573 974 552 974 "},"ŭ":{"x_min":36.34375,"x_max":891.4375,"ha":926,"o":"m 614 0 l 584 97 l 577 97 q 532 39 556 61 q 479 6 507 17 q 421 -9 452 -5 q 358 -14 390 -14 q 191 53 249 -14 q 134 260 134 120 l 134 572 q 128 622 134 603 q 111 652 123 641 q 82 667 100 662 q 39 671 64 671 l 36 671 l 36 745 l 344 745 l 344 299 q 349 218 344 254 q 367 157 355 182 q 399 117 379 131 q 450 104 419 104 q 507 118 483 104 q 546 160 531 133 q 568 227 561 188 q 576 315 576 266 l 576 582 q 567 630 576 612 q 546 657 559 647 q 514 668 532 666 q 475 671 496 671 l 471 671 l 471 745 l 787 745 l 787 161 q 794 113 787 130 q 813 87 801 96 q 842 76 825 78 q 879 73 859 73 l 891 73 l 891 0 l 614 0 m 454 842 q 358 861 399 842 q 289 911 317 880 q 247 981 261 942 q 232 1060 233 1020 l 323 1060 q 369 987 335 1009 q 454 965 402 965 q 539 987 505 965 q 584 1060 573 1009 l 677 1060 q 661 981 675 1020 q 619 911 647 942 q 550 861 591 880 q 454 842 509 842 "},"―":{"x_min":-7,"x_max":1396,"ha":1389,"o":"m 1396 331 l -7 331 l -7 414 l 1396 414 l 1396 331 "},"{":{"x_min":41.59375,"x_max":572.640625,"ha":614,"o":"m 440 -174 q 337 -159 382 -174 q 263 -118 293 -145 q 218 -53 233 -91 q 203 31 203 -15 l 203 269 q 190 334 203 309 q 156 373 177 358 q 105 393 134 387 q 41 400 75 398 l 41 485 q 105 491 75 486 q 156 511 134 497 q 190 550 177 525 q 203 613 203 575 l 203 852 q 263 1002 203 949 q 440 1055 323 1055 l 572 1055 l 572 981 l 518 981 q 469 972 488 981 q 439 947 450 964 q 423 904 428 930 q 419 846 419 879 l 419 611 q 383 507 419 548 q 266 449 347 467 l 266 437 q 383 377 346 417 q 419 273 419 336 l 419 35 q 423 -22 419 3 q 439 -65 428 -47 q 469 -91 450 -82 q 518 -100 488 -100 l 572 -100 l 572 -174 l 440 -174 "},"¼":{"x_min":7.015625,"x_max":1139.84375,"ha":1167,"o":"m 300 999 l 300 512 q 305 484 300 495 q 319 468 310 474 q 339 461 327 463 q 364 460 351 460 l 421 460 l 421 399 l 29 399 l 29 460 l 99 460 q 124 461 113 460 q 144 468 135 463 q 158 484 153 474 q 163 512 163 495 l 163 906 q 105 844 130 868 q 54 821 79 821 q 20 840 34 821 q 7 889 7 860 q 62 909 32 895 q 135 952 93 923 l 197 999 l 300 999 m 392 0 l 284 0 l 779 992 l 887 992 l 392 0 m 1032 163 l 1032 114 q 1036 86 1032 97 q 1049 70 1041 76 q 1068 63 1057 65 q 1090 62 1078 62 l 1118 62 l 1118 1 l 798 1 l 798 62 l 837 62 q 859 63 848 62 q 877 70 869 65 q 889 86 884 76 q 894 114 894 97 l 894 163 l 630 163 l 630 218 l 906 601 l 1032 601 l 1032 237 l 1139 237 l 1139 163 l 1032 163 m 894 403 q 896 446 894 425 q 901 493 897 468 q 889 471 895 482 q 880 454 883 459 l 721 237 l 894 237 l 894 403 "},"Ḿ":{"x_min":38.453125,"x_max":1283.875,"ha":1323,"o":"m 839 0 l 839 73 l 853 73 q 891 76 874 73 q 918 87 908 79 q 935 110 929 95 q 940 151 940 126 l 940 855 l 660 0 l 565 0 l 271 855 l 271 164 q 278 116 271 134 q 299 89 286 99 q 331 76 312 80 q 374 73 350 73 l 383 73 l 383 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 438 992 l 669 320 l 891 992 l 1283 992 l 1283 918 l 1225 918 q 1197 915 1210 918 q 1175 903 1184 912 q 1160 876 1165 893 q 1155 828 1155 858 l 1155 164 q 1160 116 1155 134 q 1175 89 1165 99 q 1197 76 1184 80 q 1225 73 1210 73 l 1283 73 l 1283 0 l 839 0 m 578 1108 q 611 1153 592 1127 q 648 1206 629 1179 q 684 1261 667 1234 q 711 1312 700 1288 l 930 1312 l 930 1297 q 887 1252 917 1279 q 820 1194 857 1224 q 744 1137 783 1165 q 672 1090 704 1108 l 578 1090 l 578 1108 "},"ι":{"x_min":129,"x_max":533,"ha":546,"o":"m 339 745 l 339 227 q 361 128 339 159 q 432 97 383 97 q 484 100 457 97 q 533 108 511 104 l 533 15 q 507 6 524 11 q 468 -3 490 0 q 417 -10 445 -7 q 359 -14 389 -14 q 262 -2 305 -14 q 190 33 219 8 q 144 100 160 58 q 129 201 129 141 l 129 745 l 339 745 "},"IJ":{"x_min":38.453125,"x_max":1052.96875,"ha":1068,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 m 1052 918 l 994 918 q 966 915 979 918 q 943 903 953 912 q 928 876 934 893 q 922 828 922 858 l 922 -2 q 908 -114 922 -65 q 869 -200 894 -163 q 809 -263 844 -237 q 733 -304 774 -288 q 646 -326 692 -319 q 553 -334 600 -334 l 502 -334 l 502 -253 l 528 -253 q 592 -240 561 -253 q 648 -199 624 -228 q 688 -121 673 -169 q 703 -4 703 -74 l 703 833 q 697 878 703 861 q 682 903 692 895 q 659 915 672 912 q 632 918 646 918 l 574 918 l 574 992 l 1052 992 l 1052 918 "},"Ê":{"x_min":38.453125,"x_max":863,"ha":907,"o":"m 388 84 l 666 84 q 702 92 687 84 q 728 114 717 100 q 745 148 739 128 q 755 190 752 167 l 766 256 l 863 256 l 852 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 809 992 l 815 736 l 718 736 l 711 801 q 685 880 705 852 q 622 907 665 907 l 388 907 l 388 560 l 718 560 l 718 476 l 388 476 l 388 84 m 196 1089 q 234 1134 212 1108 q 278 1187 256 1160 q 319 1242 299 1215 q 349 1293 338 1269 l 536 1293 q 566 1242 547 1269 q 607 1187 585 1215 q 651 1134 629 1160 q 689 1089 672 1108 l 689 1071 l 593 1071 q 559 1098 579 1082 q 518 1130 539 1113 q 477 1164 497 1147 q 442 1195 457 1181 q 406 1164 426 1181 q 365 1130 386 1147 q 325 1098 345 1113 q 292 1071 306 1082 l 196 1071 l 196 1089 "},"Ά":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 m 63 788 q 77 835 69 809 q 92 888 84 861 q 106 943 99 916 q 116 993 112 969 l 306 993 l 306 978 q 279 930 296 957 q 243 875 263 903 q 201 820 223 847 q 159 770 179 793 l 63 770 l 63 788 "},")":{"x_min":45,"x_max":476,"ha":555,"o":"m 252 441 q 244 603 252 524 q 213 752 235 682 q 149 882 190 823 q 45 984 109 941 l 45 1072 q 242 963 160 1025 q 376 822 324 901 q 452 648 428 743 q 476 441 476 553 q 452 233 476 329 q 376 58 428 137 q 242 -83 324 -20 q 45 -193 160 -146 l 45 -104 q 149 -1 109 -61 q 213 128 190 57 q 244 279 235 199 q 252 441 252 358 "},"ε":{"x_min":52,"x_max":691,"ha":743,"o":"m 285 560 q 290 512 285 535 q 306 470 296 488 q 333 440 317 452 q 369 426 348 428 q 433 442 398 434 q 500 450 468 450 q 549 437 531 450 q 567 397 567 425 q 542 346 567 366 q 474 327 517 327 q 445 329 463 327 q 407 335 427 331 q 370 344 387 339 q 340 353 352 348 q 285 308 306 343 q 265 219 265 273 q 309 122 265 155 q 436 89 353 89 q 512 98 478 89 q 574 121 546 107 q 622 155 601 136 q 659 192 643 173 q 681 169 671 186 q 691 135 691 153 q 674 79 691 106 q 619 31 657 52 q 521 -1 582 11 q 374 -14 461 -14 q 232 3 292 -14 q 131 51 171 21 q 71 122 91 81 q 52 209 52 163 q 65 280 52 251 q 100 328 78 308 q 149 362 121 348 q 208 385 178 375 l 208 393 q 152 419 177 402 q 109 459 127 437 q 81 509 91 482 q 72 563 72 535 q 94 648 72 611 q 156 710 116 685 q 254 748 196 735 q 383 761 311 761 q 509 747 456 761 q 597 713 563 734 q 648 667 632 693 q 664 615 664 640 q 617 551 664 571 q 474 531 571 531 q 450 642 474 602 q 378 682 426 682 q 334 672 352 682 q 305 645 316 662 q 290 607 294 629 q 285 560 285 585 "},"э":{"x_min":47,"x_max":656,"ha":721,"o":"m 313 63 q 366 78 343 63 q 405 125 389 92 q 430 211 421 158 q 441 343 439 265 l 199 343 l 199 432 l 441 432 q 433 536 439 489 q 413 615 426 582 q 377 665 399 647 q 320 682 354 682 q 270 667 292 682 q 234 627 249 651 q 213 573 220 602 q 206 514 206 543 q 102 540 135 514 q 70 611 70 567 q 84 665 70 638 q 130 713 98 692 q 211 748 161 735 q 333 761 262 761 q 470 740 410 761 q 571 675 530 719 q 634 560 612 630 q 656 390 656 489 q 631 200 656 276 q 563 76 607 123 q 457 8 519 28 q 320 -12 395 -12 q 188 0 241 -12 q 104 34 135 13 q 59 84 72 56 q 47 146 47 113 q 81 225 47 196 q 184 253 116 253 q 192 178 184 213 q 217 118 201 143 q 257 78 233 93 q 313 63 281 63 "},"ш":{"x_min":23.703125,"x_max":1358.296875,"ha":1382,"o":"m 494 745 l 888 745 l 888 671 l 885 671 q 854 668 871 671 q 825 655 838 664 q 802 628 811 645 q 793 580 793 610 l 793 79 l 1038 79 l 1038 580 q 1029 628 1038 610 q 1006 655 1020 645 q 977 668 993 664 q 947 671 961 671 l 944 671 l 944 745 l 1358 745 l 1358 671 l 1341 671 q 1309 668 1326 671 q 1277 655 1291 664 q 1252 628 1262 645 q 1243 580 1243 610 l 1243 158 q 1252 114 1243 130 q 1277 88 1262 97 q 1309 76 1292 79 q 1341 73 1327 73 l 1358 73 l 1358 0 l 23 0 l 23 73 l 39 73 q 72 76 54 73 q 104 88 89 79 q 129 114 119 97 q 139 158 139 130 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 437 745 l 437 671 l 434 671 q 404 668 420 671 q 375 655 388 664 q 352 628 361 645 q 343 580 343 610 l 343 79 l 589 79 l 589 586 q 579 630 589 614 q 556 656 570 647 q 526 668 542 665 q 497 671 511 671 l 494 671 l 494 745 "},"Я":{"x_min":-7,"x_max":942.53125,"ha":981,"o":"m 942 0 l 463 0 l 463 73 l 522 73 q 549 76 536 73 q 571 87 562 79 q 587 112 581 96 q 593 156 593 129 l 593 431 l 489 431 l 350 152 q 296 73 325 103 q 232 26 268 42 q 148 5 195 10 q 38 0 100 0 l -7 0 l -7 73 l -1 73 q 74 100 38 73 q 143 187 109 126 l 295 469 q 228 506 261 484 q 170 561 195 528 q 129 637 144 594 q 114 735 114 680 q 205 926 114 860 q 494 992 297 992 l 942 992 l 942 918 l 884 918 q 857 915 869 918 q 834 903 844 912 q 818 878 824 895 q 813 833 813 861 l 813 156 q 818 112 813 129 q 834 87 824 96 q 857 76 844 79 q 884 73 869 73 l 942 73 l 942 0 m 593 909 l 518 909 q 439 899 472 909 q 386 865 407 888 q 356 805 366 842 q 347 716 347 768 q 355 626 347 665 q 383 563 363 588 q 435 524 403 537 q 515 512 467 512 l 593 512 l 593 909 "},"a":{"x_min":62,"x_max":786.859375,"ha":832,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 265 487 224 l 487 369 l 424 365 q 354 352 383 363 q 309 321 326 341 q 285 273 292 301 q 277 206 277 244 m 401 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 534 749 479 762 q 625 709 588 736 q 679 636 661 681 q 698 526 698 591 l 698 172 q 702 124 698 143 q 716 94 706 105 q 742 78 725 83 q 781 73 758 73 l 786 73 l 786 0 l 528 0 l 499 95 l 487 95 q 443 46 464 67 q 400 12 423 26 q 348 -7 377 -1 q 280 -14 319 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 212 62 154 q 139 379 62 325 q 373 438 217 434 l 487 443 l 487 519 q 484 583 487 554 q 472 633 481 612 q 446 665 464 654 q 401 677 429 677 "},"Ę":{"x_min":38.453125,"x_max":863,"ha":907,"o":"m 388 84 l 666 84 q 702 92 687 84 q 728 114 717 100 q 745 148 739 128 q 755 190 752 167 l 766 256 l 863 256 l 852 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 809 992 l 815 736 l 718 736 l 711 801 q 685 880 705 852 q 622 907 665 907 l 388 907 l 388 560 l 718 560 l 718 476 l 388 476 l 388 84 m 484 -180 q 497 -118 484 -147 q 534 -65 511 -89 q 586 -24 557 -41 q 648 0 616 -7 l 755 0 q 710 -20 733 -6 q 668 -53 687 -33 q 637 -100 650 -74 q 625 -160 625 -127 q 632 -193 625 -179 q 652 -215 639 -207 q 683 -229 665 -224 q 721 -233 700 -233 q 761 -230 740 -233 q 809 -222 783 -228 l 809 -311 q 782 -321 798 -317 q 749 -327 766 -325 q 717 -332 733 -330 q 690 -334 701 -334 q 536 -297 589 -334 q 484 -180 484 -260 "},"Z":{"x_min":58,"x_max":864,"ha":925,"o":"m 833 921 l 310 84 l 610 84 q 680 96 653 84 q 723 128 707 108 q 746 172 739 147 q 756 223 754 197 l 763 286 l 864 286 l 857 0 l 58 0 l 58 69 l 578 907 l 305 907 q 251 898 272 907 q 217 873 230 889 q 199 833 205 856 q 191 781 193 809 l 183 706 l 84 706 l 90 992 l 833 992 l 833 921 "}," ":{"x_min":0,"x_max":0,"ha":231},"k":{"x_min":23.703125,"x_max":884,"ha":884,"o":"m 884 0 l 864 0 q 736 3 788 0 q 647 18 685 6 q 583 55 610 31 q 529 123 556 80 l 405 318 l 349 276 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 897 q 129 941 139 924 q 104 967 119 958 q 72 979 89 976 q 39 981 54 981 l 23 981 l 23 1055 l 349 1055 l 349 519 q 348 475 349 500 q 346 428 347 451 q 343 375 344 402 l 518 571 q 548 612 541 597 q 555 637 555 627 q 536 665 555 655 q 483 675 518 675 l 483 745 l 833 745 l 833 675 q 739 646 785 675 q 637 557 692 618 l 550 457 l 734 181 q 808 100 771 126 q 879 73 846 73 l 884 73 l 884 0 "},"Ù":{"x_min":22.78125,"x_max":1015.21875,"ha":1038,"o":"m 1015 918 l 955 918 q 928 915 941 918 q 905 903 915 912 q 890 875 895 893 q 885 828 885 858 l 885 286 q 865 160 885 216 q 802 66 845 104 q 694 6 760 27 q 537 -14 628 -14 q 375 3 447 -14 q 254 58 304 20 q 179 156 205 96 q 153 302 153 216 l 153 833 q 147 878 153 861 q 131 903 141 894 q 109 915 121 912 q 82 918 96 918 l 22 918 l 22 992 l 501 992 l 501 918 l 443 918 q 416 915 429 918 q 393 903 403 912 q 378 875 383 893 q 372 828 372 858 l 372 291 q 387 193 372 233 q 428 129 401 153 q 494 94 456 105 q 579 84 531 84 q 662 96 625 84 q 726 133 699 108 q 766 197 752 158 q 780 288 780 235 l 780 833 q 775 878 780 861 q 759 903 769 894 q 737 915 750 912 q 710 918 724 918 l 651 918 l 651 992 l 1015 992 l 1015 918 m 551 1071 q 479 1118 519 1089 q 402 1175 439 1146 q 335 1233 365 1205 q 293 1278 305 1260 l 293 1293 l 510 1293 q 538 1242 521 1269 q 574 1187 555 1215 q 612 1134 592 1160 q 646 1089 631 1108 l 646 1071 l 551 1071 "},"Ů":{"x_min":22.78125,"x_max":1015.21875,"ha":1038,"o":"m 1015 918 l 955 918 q 928 915 941 918 q 905 903 915 912 q 890 875 895 893 q 885 828 885 858 l 885 286 q 865 160 885 216 q 802 66 845 104 q 694 6 760 27 q 537 -14 628 -14 q 375 3 447 -14 q 254 58 304 20 q 179 156 205 96 q 153 302 153 216 l 153 833 q 147 878 153 861 q 131 903 141 894 q 109 915 121 912 q 82 918 96 918 l 22 918 l 22 992 l 501 992 l 501 918 l 443 918 q 416 915 429 918 q 393 903 403 912 q 378 875 383 893 q 372 828 372 858 l 372 291 q 387 193 372 233 q 428 129 401 153 q 494 94 456 105 q 579 84 531 84 q 662 96 625 84 q 726 133 699 108 q 766 197 752 158 q 780 288 780 235 l 780 833 q 775 878 780 861 q 759 903 769 894 q 737 915 750 912 q 710 918 724 918 l 651 918 l 651 992 l 1015 992 l 1015 918 m 696 1208 q 683 1142 696 1170 q 647 1095 670 1114 q 594 1066 624 1076 q 529 1057 563 1057 q 463 1066 494 1057 q 410 1095 433 1076 q 374 1142 387 1114 q 362 1208 362 1170 q 374 1273 362 1244 q 410 1320 387 1301 q 463 1349 433 1339 q 529 1359 494 1359 q 594 1349 563 1359 q 647 1320 624 1339 q 683 1273 670 1301 q 696 1208 696 1244 m 611 1208 q 604 1242 611 1228 q 587 1265 598 1256 q 560 1278 575 1274 q 529 1282 545 1282 q 497 1278 512 1282 q 470 1265 482 1274 q 453 1242 459 1256 q 446 1208 446 1228 q 453 1173 446 1187 q 470 1150 459 1159 q 497 1137 482 1141 q 529 1132 512 1132 q 560 1137 545 1132 q 587 1150 575 1141 q 604 1173 598 1159 q 611 1208 611 1187 "},"¢":{"x_min":79,"x_max":720,"ha":777,"o":"m 387 115 q 260 143 317 119 q 163 212 203 166 q 101 327 123 257 q 79 496 79 397 q 102 672 79 600 q 166 791 125 745 q 263 860 207 837 q 387 889 320 883 l 387 991 l 473 991 l 473 889 q 579 873 532 885 q 656 841 625 860 q 704 797 688 821 q 720 744 720 772 q 712 700 720 722 q 684 663 704 679 q 629 636 664 646 q 540 626 595 626 q 537 683 540 655 q 526 734 534 711 q 505 774 518 757 q 473 798 492 790 l 473 218 q 539 227 508 218 q 595 251 570 237 q 640 286 621 266 q 672 330 660 306 q 698 302 690 319 q 707 266 707 285 q 693 217 707 242 q 650 170 679 192 q 577 134 621 149 q 473 115 533 119 l 473 0 l 387 0 l 387 115 m 291 498 q 314 325 291 391 q 387 234 336 259 l 387 796 q 346 764 364 785 q 316 707 329 743 q 297 620 304 671 q 291 498 291 568 "},"В":{"x_min":38.453125,"x_max":884,"ha":933,"o":"m 842 739 q 829 659 842 693 q 793 600 816 624 q 738 557 770 575 q 666 527 706 539 l 666 520 q 754 487 715 508 q 823 435 794 466 q 868 363 852 404 q 884 272 884 322 q 784 67 884 135 q 486 0 684 0 l 38 0 l 38 73 l 95 73 q 124 76 111 73 q 146 89 137 80 q 162 116 156 99 q 168 164 168 134 l 168 829 q 162 874 168 857 q 146 901 156 892 q 123 915 136 911 q 95 918 110 918 l 38 918 l 38 992 l 444 992 q 742 930 642 992 q 842 739 842 869 m 387 84 l 479 84 q 558 94 525 84 q 611 127 590 105 q 640 187 631 150 q 650 276 650 223 q 641 365 650 327 q 614 427 633 402 q 562 464 594 451 q 482 476 530 476 l 387 476 l 387 84 m 387 561 l 440 561 q 521 571 489 561 q 573 602 553 581 q 600 657 592 624 q 608 739 608 691 q 599 818 608 786 q 569 870 590 850 q 516 898 549 889 q 437 906 484 906 l 387 906 l 387 561 "},"І":{"x_min":38.453125,"x_max":517.953125,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 "},"ē":{"x_min":65,"x_max":735,"ha":793,"o":"m 412 671 q 319 614 354 671 q 282 445 285 556 l 522 445 q 516 540 522 497 q 497 611 510 582 q 463 656 483 640 q 412 671 442 671 m 425 -14 q 269 11 337 -14 q 156 86 202 37 q 88 206 111 135 q 65 367 65 277 q 88 539 65 465 q 155 662 111 613 q 263 737 199 712 q 409 762 327 762 q 545 740 485 762 q 648 677 606 719 q 712 572 690 635 q 735 427 735 510 l 735 356 l 279 356 q 294 236 281 286 q 331 153 307 186 q 388 105 354 120 q 465 89 421 89 q 531 98 501 89 q 587 121 562 106 q 630 157 612 137 q 661 202 649 178 q 699 134 699 182 q 682 77 699 104 q 632 30 666 51 q 547 -1 598 10 q 425 -14 496 -14 m 623 842 l 220 842 l 220 951 l 623 951 l 623 842 "},"β":{"x_min":129,"x_max":856,"ha":921,"o":"m 129 -334 l 129 793 q 155 924 129 871 q 229 1009 182 977 q 339 1056 276 1042 q 475 1070 402 1070 q 621 1054 558 1070 q 725 1009 684 1038 q 788 937 767 979 q 809 842 809 894 q 801 779 809 808 q 780 727 793 751 q 752 685 768 704 q 718 651 735 666 q 628 597 678 618 l 628 588 q 717 550 676 573 q 790 494 759 527 q 838 415 820 460 q 856 309 856 370 q 834 168 856 229 q 772 67 812 107 q 674 6 731 26 q 546 -14 617 -14 q 421 2 472 -14 q 339 48 370 19 l 339 -334 l 129 -334 m 507 67 q 562 81 537 67 q 605 125 587 95 q 634 200 624 155 q 644 307 644 245 q 635 401 644 362 q 610 468 626 440 q 568 514 593 495 q 511 544 543 532 q 472 531 494 537 q 422 526 451 526 q 383 540 399 526 q 368 579 368 554 q 438 635 368 635 q 457 633 446 635 q 480 631 468 632 q 504 628 493 630 q 521 624 515 626 q 587 692 565 645 q 610 818 610 738 q 601 889 610 857 q 576 945 593 922 q 534 980 559 968 q 476 993 509 993 q 416 980 441 993 q 373 942 390 966 q 347 883 356 918 q 339 804 339 848 l 339 149 q 369 119 352 133 q 408 93 386 104 q 454 74 429 81 q 507 67 478 67 "},"≠":{"x_min":87,"x_max":690,"ha":777,"o":"m 386 679 l 424 822 l 521 822 l 483 679 l 690 679 l 690 582 l 458 582 l 413 409 l 690 409 l 690 313 l 388 313 l 352 169 l 253 169 l 289 313 l 87 313 l 87 409 l 315 409 l 360 582 l 87 582 l 87 679 l 386 679 "},"‼":{"x_min":144.875,"x_max":730.421875,"ha":874,"o":"m 144 992 l 386 992 l 305 317 l 226 317 l 144 992 m 153 99 q 161 152 153 131 q 185 187 170 174 q 222 205 201 200 q 267 211 243 211 q 310 205 290 211 q 347 187 331 200 q 371 152 362 174 q 381 99 381 131 q 371 47 381 68 q 347 13 362 26 q 310 -5 331 0 q 267 -11 290 -11 q 222 -5 243 -11 q 185 13 201 0 q 161 47 170 26 q 153 99 153 68 m 488 992 l 730 992 l 649 317 l 570 317 l 488 992 m 497 99 q 505 152 497 131 q 529 187 514 174 q 566 205 545 200 q 611 211 587 211 q 654 205 634 211 q 691 187 675 200 q 715 152 706 174 q 725 99 725 131 q 715 47 725 68 q 691 13 706 26 q 654 -5 675 0 q 611 -11 634 -11 q 566 -5 587 -11 q 529 13 545 0 q 505 47 514 26 q 497 99 497 68 "},"¥":{"x_min":-4.265625,"x_max":749.859375,"ha":749,"o":"m 132 0 l 132 73 l 164 73 q 207 74 187 73 q 243 82 227 75 q 267 105 258 89 q 278 152 277 122 l 278 229 l 83 229 l 83 311 l 278 311 l 278 392 l 83 392 l 83 474 l 254 474 l 90 844 q 72 880 80 865 q 53 902 63 894 q 30 915 43 911 q 0 918 17 918 l -4 918 l -4 992 l 393 992 l 393 918 l 383 918 q 322 905 340 918 q 304 864 304 893 q 310 827 304 847 q 326 782 315 807 l 379 650 q 409 565 396 606 q 427 496 422 524 q 442 541 431 515 q 463 598 452 568 l 522 750 q 536 791 530 774 q 544 821 541 808 q 548 844 547 834 q 549 863 549 854 q 530 905 549 891 q 465 918 511 918 l 460 918 l 460 992 l 749 992 l 749 918 l 745 918 q 714 914 728 918 q 689 897 701 909 q 665 863 677 884 q 640 810 654 842 l 497 474 l 678 474 l 678 392 l 484 392 l 484 311 l 678 311 l 678 229 l 484 229 l 484 159 q 494 109 484 126 q 518 83 503 91 q 554 74 533 75 q 598 73 575 73 l 630 73 l 630 0 l 132 0 "},"Ĥ":{"x_min":38.453125,"x_max":1097.859375,"ha":1137,"o":"m 618 0 l 618 73 l 678 73 q 705 76 692 73 q 728 89 718 80 q 743 116 738 99 q 749 164 749 134 l 749 475 l 387 475 l 387 164 q 392 116 387 134 q 408 89 398 99 q 430 76 417 80 q 458 73 443 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 877 168 861 q 146 903 156 894 q 123 915 136 911 q 96 918 111 918 l 38 918 l 38 992 l 517 992 l 517 918 l 458 918 q 430 915 443 918 q 408 902 417 911 q 392 875 398 892 q 387 827 387 857 l 387 560 l 749 560 l 749 827 q 743 875 749 857 q 728 902 738 892 q 705 915 718 911 q 678 918 692 918 l 618 918 l 618 992 l 1097 992 l 1097 918 l 1039 918 q 1012 915 1025 918 q 989 902 999 911 q 974 875 979 892 q 969 827 969 857 l 969 156 q 974 112 969 129 q 990 87 980 96 q 1012 76 1000 79 q 1039 73 1025 73 l 1097 73 l 1097 0 l 618 0 m 323 1089 q 361 1134 339 1108 q 405 1187 383 1160 q 446 1242 426 1215 q 476 1293 465 1269 l 663 1293 q 693 1242 674 1269 q 734 1187 712 1215 q 778 1134 756 1160 q 816 1089 799 1108 l 816 1071 l 720 1071 q 686 1098 706 1082 q 645 1130 666 1113 q 604 1164 624 1147 q 569 1195 584 1181 q 533 1164 553 1181 q 492 1130 513 1147 q 452 1098 472 1113 q 419 1071 433 1082 l 323 1071 l 323 1089 "},"U":{"x_min":22.78125,"x_max":1015.21875,"ha":1038,"o":"m 1015 918 l 955 918 q 928 915 941 918 q 905 903 915 912 q 890 875 895 893 q 885 828 885 858 l 885 286 q 865 160 885 216 q 802 66 845 104 q 694 6 760 27 q 537 -14 628 -14 q 375 3 447 -14 q 254 58 304 20 q 179 156 205 96 q 153 302 153 216 l 153 833 q 147 878 153 861 q 131 903 141 894 q 109 915 121 912 q 82 918 96 918 l 22 918 l 22 992 l 501 992 l 501 918 l 443 918 q 416 915 429 918 q 393 903 403 912 q 378 875 383 893 q 372 828 372 858 l 372 291 q 387 193 372 233 q 428 129 401 153 q 494 94 456 105 q 579 84 531 84 q 662 96 625 84 q 726 133 699 108 q 766 197 752 158 q 780 288 780 235 l 780 833 q 775 878 780 861 q 759 903 769 894 q 737 915 750 912 q 710 918 724 918 l 651 918 l 651 992 l 1015 992 l 1015 918 "},"Ñ":{"x_min":38.453125,"x_max":1070.859375,"ha":1095,"o":"m 813 0 l 271 765 l 271 164 q 277 116 271 134 q 292 89 283 99 q 315 76 302 80 q 342 73 328 73 l 401 73 l 401 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 347 992 l 837 298 l 837 833 q 831 878 837 861 q 816 903 826 895 q 793 915 806 912 q 766 918 780 918 l 708 918 l 708 992 l 1070 992 l 1070 918 l 1012 918 q 985 915 998 918 q 962 903 972 912 q 947 876 952 893 q 942 828 942 858 l 942 0 l 813 0 m 676 1203 q 703 1209 691 1203 q 724 1225 715 1215 q 737 1249 732 1235 q 744 1276 742 1262 l 835 1276 q 819 1197 832 1234 q 783 1131 805 1159 q 729 1087 760 1103 q 661 1071 698 1071 q 593 1084 624 1071 q 537 1114 563 1098 q 488 1145 511 1131 q 443 1158 466 1158 q 416 1152 428 1158 q 395 1136 404 1146 q 382 1112 387 1126 q 375 1085 377 1099 l 285 1085 q 300 1164 287 1127 q 337 1230 314 1202 q 391 1274 360 1258 q 459 1291 422 1291 q 527 1277 497 1291 q 583 1247 557 1263 q 632 1216 609 1230 q 676 1203 655 1203 "},"F":{"x_min":38.453125,"x_max":815,"ha":863,"o":"m 718 736 l 711 803 q 677 882 704 858 q 608 907 650 907 l 387 907 l 387 528 l 716 528 l 716 445 l 387 445 l 387 164 q 392 116 387 134 q 408 89 398 99 q 431 76 417 80 q 459 73 444 73 l 545 73 l 545 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 808 992 l 815 736 l 718 736 "},"ϑ":{"x_min":21.453125,"x_max":937.203125,"ha":958,"o":"m 629 668 q 609 796 623 740 q 576 892 596 853 q 531 952 556 932 q 475 973 505 973 q 411 945 437 973 q 386 859 386 917 q 406 774 386 810 q 458 715 425 738 q 536 680 491 691 q 629 668 580 668 m 844 592 q 846 556 845 576 q 847 514 847 536 q 821 300 847 397 q 744 133 796 202 q 614 24 692 63 q 432 -14 536 -14 q 282 6 343 -14 q 183 59 221 26 q 129 135 146 92 q 113 226 113 179 q 115 282 113 253 q 120 338 117 310 q 126 389 123 365 q 129 430 129 413 q 116 476 129 459 q 65 494 102 494 l 21 494 l 21 568 l 165 568 q 301 537 260 568 q 343 446 343 506 q 340 393 343 423 q 335 331 338 363 q 329 268 332 300 q 326 211 326 237 q 332 156 326 182 q 353 113 338 131 q 391 84 367 94 q 449 73 414 73 q 533 105 497 73 q 592 194 569 136 q 627 332 615 251 q 638 512 638 413 q 638 555 638 533 q 636 592 637 578 q 432 613 517 594 q 292 668 346 633 q 211 750 237 702 q 185 858 185 799 q 203 943 185 905 q 258 1007 222 980 q 345 1047 294 1033 q 464 1061 397 1061 q 616 1032 552 1061 q 725 952 680 1003 q 797 827 770 900 q 838 666 824 754 l 937 666 l 937 592 l 844 592 "},"Ќ":{"x_min":38.453125,"x_max":1000,"ha":1000,"o":"m 901 0 q 807 8 847 0 q 738 33 768 16 q 687 75 709 50 q 648 132 665 99 l 516 372 q 485 419 499 403 q 455 445 471 436 q 419 456 439 454 q 373 458 400 458 l 373 164 q 379 116 373 134 q 394 89 385 99 q 417 76 404 80 q 445 73 430 73 l 503 73 l 503 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 503 992 l 503 918 l 445 918 q 417 915 430 918 q 394 903 404 912 q 379 875 385 893 q 373 828 373 858 l 373 538 q 413 540 396 538 q 442 546 429 542 q 467 558 456 550 q 488 577 477 566 q 538 647 507 597 q 606 773 568 697 q 663 877 637 834 q 719 947 690 920 q 781 987 748 974 q 856 1000 814 1000 q 940 975 915 1000 q 966 912 966 950 q 947 842 966 869 q 898 809 929 815 q 889 836 895 823 q 873 859 883 849 q 851 875 864 869 q 820 881 837 881 q 781 872 799 881 q 748 846 764 864 q 714 798 732 827 q 675 727 697 769 q 635 652 652 684 q 601 597 617 620 q 571 558 586 575 q 540 530 556 542 q 598 521 570 530 q 650 494 626 511 q 694 453 674 477 q 731 400 715 429 l 844 198 q 879 141 863 165 q 914 103 896 118 q 950 81 932 88 q 991 73 969 73 l 1000 73 l 1000 0 l 901 0 m 449 1089 q 482 1134 463 1108 q 519 1187 500 1160 q 555 1242 538 1215 q 582 1293 571 1269 l 801 1293 l 801 1278 q 758 1233 788 1260 q 691 1175 728 1205 q 615 1118 654 1146 q 543 1071 575 1089 l 449 1071 l 449 1089 "},"å":{"x_min":62,"x_max":786.859375,"ha":832,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 265 487 224 l 487 369 l 424 365 q 354 352 383 363 q 309 321 326 341 q 285 273 292 301 q 277 206 277 244 m 401 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 534 749 479 762 q 625 709 588 736 q 679 636 661 681 q 698 526 698 591 l 698 172 q 702 124 698 143 q 716 94 706 105 q 742 78 725 83 q 781 73 758 73 l 786 73 l 786 0 l 528 0 l 499 95 l 487 95 q 443 46 464 67 q 400 12 423 26 q 348 -7 377 -1 q 280 -14 319 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 212 62 154 q 139 379 62 325 q 373 438 217 434 l 487 443 l 487 519 q 484 583 487 554 q 472 633 481 612 q 446 665 464 654 q 401 677 429 677 m 587 979 q 574 913 587 941 q 538 866 561 885 q 485 837 515 847 q 420 828 454 828 q 354 837 385 828 q 301 866 324 847 q 265 913 278 885 q 253 979 253 941 q 265 1044 253 1015 q 301 1091 278 1072 q 354 1120 324 1110 q 420 1130 385 1130 q 485 1120 454 1130 q 538 1091 515 1110 q 574 1044 561 1072 q 587 979 587 1015 m 502 979 q 495 1013 502 999 q 478 1036 489 1027 q 451 1049 466 1045 q 420 1053 436 1053 q 388 1049 403 1053 q 361 1036 373 1045 q 344 1013 350 1027 q 337 979 337 999 q 344 944 337 958 q 361 921 350 930 q 388 908 373 912 q 420 903 403 903 q 451 908 436 903 q 478 921 466 912 q 495 944 489 930 q 502 979 502 958 "},"Ϋ":{"x_min":0.34375,"x_max":962.5625,"ha":962,"o":"m 228 0 l 228 73 l 293 73 q 324 75 310 73 q 350 86 339 77 q 367 111 361 94 q 374 157 374 128 l 374 351 l 117 844 q 97 879 106 865 q 77 902 88 893 q 52 914 66 910 q 18 918 39 918 l 0 918 l 0 992 l 465 992 l 465 918 l 441 918 q 379 901 399 918 q 358 856 358 884 q 364 817 358 838 q 379 779 371 797 l 482 575 q 518 496 504 530 q 543 430 532 462 q 576 510 557 467 q 618 600 595 553 l 698 766 q 718 817 713 797 q 722 850 722 838 q 699 902 722 886 q 630 918 677 918 l 599 918 l 599 992 l 962 992 l 962 918 l 936 918 q 905 913 918 918 q 882 897 893 909 q 859 863 871 884 q 831 810 847 842 l 595 349 l 595 159 q 601 112 595 129 q 617 86 607 95 q 642 75 628 77 q 672 73 656 73 l 740 73 l 740 0 l 228 0 m 272 1184 q 278 1224 272 1207 q 296 1251 285 1240 q 322 1265 307 1261 q 353 1270 337 1270 q 384 1265 370 1270 q 411 1251 399 1261 q 429 1224 422 1240 q 437 1184 437 1207 q 429 1144 437 1160 q 411 1117 422 1127 q 384 1102 399 1107 q 353 1098 370 1098 q 322 1102 337 1098 q 296 1117 307 1107 q 278 1144 285 1127 q 272 1184 272 1160 m 557 1184 q 563 1224 557 1207 q 582 1251 570 1240 q 608 1265 593 1261 q 640 1270 623 1270 q 670 1265 655 1270 q 696 1251 684 1261 q 714 1224 707 1240 q 722 1184 722 1207 q 714 1144 722 1160 q 696 1117 707 1127 q 670 1102 684 1107 q 640 1098 655 1098 q 608 1102 623 1098 q 582 1117 593 1107 q 563 1144 570 1127 q 557 1184 557 1160 "},"0":{"x_min":47,"x_max":730,"ha":777,"o":"m 730 497 q 710 288 730 382 q 650 126 691 193 q 544 22 609 59 q 388 -14 479 -14 q 228 22 293 -14 q 122 126 163 59 q 64 288 82 193 q 47 498 47 383 q 64 707 47 613 q 122 867 82 801 q 228 970 163 934 q 390 1006 294 1006 q 545 970 480 1006 q 650 867 609 934 q 710 707 691 801 q 730 497 730 613 m 262 497 q 267 319 262 397 q 286 187 272 241 q 325 104 300 133 q 388 76 349 76 q 452 104 427 76 q 490 187 476 133 q 509 319 504 241 q 515 497 515 397 q 509 674 515 596 q 491 805 504 752 q 452 887 477 859 q 390 915 428 915 q 326 887 351 915 q 287 805 301 859 q 267 674 272 752 q 262 497 262 596 "},"ō":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 273 10 340 -14 q 160 82 207 34 q 89 203 114 130 q 65 374 65 277 q 156 666 65 570 q 427 762 248 762 q 577 738 511 762 q 690 666 643 714 q 761 545 736 618 q 786 374 786 472 m 280 374 q 288 244 280 300 q 313 150 296 188 q 358 92 330 112 q 426 73 386 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 q 563 505 571 449 q 538 598 555 561 q 492 654 520 635 q 425 673 465 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 m 623 842 l 220 842 l 220 951 l 623 951 l 623 842 "},"”":{"x_min":61.96875,"x_max":601,"ha":679,"o":"m 311 839 q 297 753 311 795 q 254 676 283 712 q 176 613 224 641 q 61 567 129 585 l 61 638 q 115 660 92 649 q 153 684 138 671 q 176 711 168 696 q 184 747 184 727 q 176 769 184 761 q 158 784 169 777 q 133 800 146 792 q 109 820 120 807 q 90 850 97 832 q 83 896 83 868 q 111 967 83 943 q 182 992 140 992 q 276 951 241 992 q 311 839 311 910 m 601 839 q 587 753 601 795 q 544 676 573 712 q 466 613 514 641 q 351 567 419 585 l 351 638 q 405 660 382 649 q 443 684 428 671 q 466 711 458 696 q 474 747 474 727 q 466 769 474 761 q 448 784 459 777 q 423 800 436 792 q 399 820 410 807 q 380 850 387 832 q 373 896 373 868 q 401 967 373 943 q 472 992 430 992 q 566 951 531 992 q 601 839 601 910 "},"ö":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 273 10 340 -14 q 160 82 207 34 q 89 203 114 130 q 65 374 65 277 q 156 666 65 570 q 427 762 248 762 q 577 738 511 762 q 690 666 643 714 q 761 545 736 618 q 786 374 786 472 m 280 374 q 288 244 280 300 q 313 150 296 188 q 358 92 330 112 q 426 73 386 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 q 563 505 571 449 q 538 598 555 561 q 492 654 520 635 q 425 673 465 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 m 199 955 q 205 995 199 978 q 223 1022 212 1011 q 249 1036 234 1032 q 280 1041 264 1041 q 311 1036 297 1041 q 338 1022 326 1032 q 356 995 349 1011 q 364 955 364 978 q 356 915 364 931 q 338 888 349 898 q 311 873 326 878 q 280 869 297 869 q 249 873 264 869 q 223 888 234 878 q 205 915 212 898 q 199 955 199 931 m 484 955 q 490 995 484 978 q 509 1022 497 1011 q 535 1036 520 1032 q 567 1041 550 1041 q 597 1036 582 1041 q 623 1022 611 1032 q 641 995 634 1011 q 649 955 649 978 q 641 915 649 931 q 623 888 634 898 q 597 873 611 878 q 567 869 582 869 q 535 873 550 869 q 509 888 520 878 q 490 915 497 898 q 484 955 484 931 "},"ć":{"x_min":65,"x_max":681,"ha":732,"o":"m 409 -14 q 269 5 332 -14 q 160 70 206 25 q 90 189 115 116 q 65 369 65 262 q 91 557 65 481 q 163 677 117 632 q 271 742 208 723 q 405 762 333 762 q 524 750 472 762 q 610 719 575 739 q 663 673 645 700 q 681 616 681 646 q 673 572 681 593 q 645 534 665 551 q 590 508 625 518 q 501 498 555 498 q 496 566 501 534 q 482 623 492 599 q 454 662 472 648 q 410 677 437 677 q 356 662 380 677 q 314 612 332 648 q 288 518 297 577 q 279 370 279 459 q 317 159 279 229 q 444 89 356 89 q 511 98 480 89 q 569 121 543 106 q 614 157 594 137 q 645 202 633 178 q 670 174 662 192 q 679 138 679 157 q 663 85 679 112 q 614 35 647 57 q 531 0 581 13 q 409 -14 480 -14 m 304 860 q 337 905 318 879 q 374 958 355 931 q 410 1013 393 986 q 437 1064 426 1040 l 656 1064 l 656 1049 q 613 1004 643 1031 q 546 946 583 976 q 470 889 509 917 q 398 842 430 860 l 304 842 l 304 860 "},"þ":{"x_min":18.703125,"x_max":831,"ha":896,"o":"m 34 -260 q 67 -257 49 -260 q 99 -244 85 -253 q 124 -217 114 -234 q 134 -169 134 -199 l 134 884 q 126 935 134 916 q 107 964 119 954 q 77 978 94 974 q 40 981 60 981 l 30 981 l 30 1055 l 344 1055 l 344 800 q 342 752 344 780 q 336 698 339 724 q 327 635 332 667 l 334 635 q 368 685 348 663 q 415 724 388 707 q 473 749 441 740 q 546 758 506 758 q 668 735 615 758 q 757 664 721 712 q 812 543 793 616 q 831 369 831 470 q 812 196 831 269 q 758 75 794 123 q 671 5 723 28 q 551 -17 619 -17 q 422 13 472 -17 q 343 94 373 43 l 334 94 q 339 31 336 62 q 343 -23 341 5 q 344 -74 344 -52 l 344 -169 q 354 -217 344 -199 q 379 -244 364 -234 q 411 -257 393 -253 q 443 -260 428 -260 l 473 -260 l 473 -334 l 18 -334 l 18 -260 l 34 -260 m 486 86 q 586 156 556 86 q 616 368 616 226 q 586 580 616 506 q 487 654 556 654 q 418 635 445 654 q 374 580 391 616 q 351 491 358 544 q 344 369 344 437 q 351 244 344 297 q 374 155 358 191 q 418 103 391 120 q 486 86 445 86 "},"]":{"x_min":51.453125,"x_max":436,"ha":575,"o":"m 436 1055 l 436 -178 l 51 -178 l 51 -104 l 111 -104 q 155 -101 134 -104 q 191 -87 176 -97 q 215 -56 206 -76 q 225 -4 225 -36 l 225 881 q 215 934 225 914 q 191 964 206 953 q 155 978 176 974 q 111 981 134 981 l 51 981 l 51 1055 l 436 1055 "},"А":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 "},"′":{"x_min":93,"x_max":310.03125,"ha":403,"o":"m 93 992 l 310 992 l 247 610 l 155 610 l 93 992 "},"Ы":{"x_min":38.453125,"x_max":1332.859375,"ha":1372,"o":"m 545 992 l 545 918 l 460 918 q 405 900 423 918 q 387 835 387 881 l 387 558 l 460 558 q 630 537 560 558 q 745 480 700 517 q 809 392 789 444 q 830 280 830 341 q 807 166 830 218 q 738 77 784 114 q 620 20 691 40 q 453 0 550 0 l 38 0 l 38 73 l 96 73 q 131 79 117 73 q 153 94 144 84 q 164 123 161 105 q 168 165 168 141 l 168 828 q 162 874 168 857 q 148 902 157 892 q 126 915 139 911 q 96 918 113 918 l 38 918 l 38 992 l 545 992 m 387 82 l 441 82 q 512 93 483 82 q 560 129 541 105 q 586 189 578 153 q 595 273 595 225 q 585 367 595 328 q 556 431 576 406 q 503 466 535 455 q 426 477 471 477 l 387 477 l 387 82 m 854 0 l 854 73 l 912 73 q 940 76 927 73 q 962 89 953 80 q 977 116 972 99 q 982 164 982 134 l 982 828 q 977 876 982 858 q 962 903 972 893 q 940 915 953 912 q 912 918 927 918 l 854 918 l 854 992 l 1332 992 l 1332 918 l 1274 918 q 1246 915 1259 918 q 1224 903 1233 912 q 1209 876 1214 893 q 1204 828 1204 858 l 1204 164 q 1209 116 1204 134 q 1224 89 1214 99 q 1246 76 1233 80 q 1274 73 1259 73 l 1332 73 l 1332 0 l 854 0 "},"ẁ":{"x_min":-4.40625,"x_max":1190.078125,"ha":1189,"o":"m 686 737 l 821 327 q 846 242 838 277 q 858 181 853 207 l 862 181 q 868 215 865 199 q 876 247 871 230 q 886 284 880 264 q 899 330 891 304 l 960 533 q 970 571 966 550 q 973 603 973 591 q 951 654 973 638 q 881 671 928 671 l 871 671 l 871 745 l 1190 745 l 1190 671 l 1172 671 q 1137 667 1152 671 q 1110 651 1122 662 q 1089 617 1099 639 q 1068 562 1078 596 l 888 0 l 739 0 l 587 461 l 427 0 l 276 0 l 98 597 q 81 633 90 619 q 61 656 72 648 q 34 667 49 664 q 0 671 20 671 l -4 671 l -4 745 l 402 745 l 402 671 l 384 671 q 321 659 342 671 q 300 612 300 647 q 304 584 300 601 q 312 553 308 568 l 363 372 q 376 320 370 347 q 388 269 382 294 q 398 221 393 244 q 405 181 402 199 l 409 181 q 425 253 415 216 q 454 341 436 290 l 595 737 l 686 737 m 632 842 q 560 889 600 860 q 483 946 520 917 q 416 1004 446 976 q 374 1049 386 1031 l 374 1064 l 591 1064 q 619 1013 602 1040 q 655 958 636 986 q 693 905 673 931 q 727 860 712 879 l 727 842 l 632 842 "},"ĭ":{"x_min":12,"x_max":465.234375,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m 234 842 q 138 861 179 842 q 69 911 97 880 q 27 981 41 942 q 12 1060 13 1020 l 103 1060 q 149 987 115 1009 q 234 965 182 965 q 319 987 285 965 q 364 1060 353 1009 l 457 1060 q 441 981 455 1020 q 399 911 427 942 q 330 861 371 880 q 234 842 289 842 "},"8":{"x_min":41,"x_max":735,"ha":777,"o":"m 41 252 q 55 333 41 297 q 97 398 70 369 q 162 453 124 428 q 245 501 200 478 q 118 610 162 549 q 74 752 74 671 q 90 846 74 801 q 145 927 107 892 q 244 984 183 963 q 396 1006 306 1006 q 524 987 469 1006 q 617 936 580 969 q 673 859 654 904 q 692 762 692 815 q 678 689 692 720 q 641 631 665 657 q 582 582 616 604 q 504 537 547 560 q 610 476 566 507 q 682 411 654 445 q 722 341 709 378 q 735 262 735 304 q 710 145 735 196 q 640 58 686 93 q 529 4 595 23 q 379 -14 463 -14 q 228 7 292 -14 q 122 64 164 28 q 61 148 81 100 q 41 252 41 197 m 385 64 q 450 77 422 64 q 500 113 479 90 q 531 168 520 136 q 542 238 542 200 q 530 299 542 272 q 494 351 519 327 q 431 398 469 375 q 339 445 393 421 q 295 411 316 430 q 260 367 275 391 q 237 313 245 343 q 228 247 228 283 q 240 172 228 206 q 272 115 251 139 q 321 77 292 91 q 385 64 350 64 m 517 765 q 508 823 517 794 q 483 875 500 852 q 443 911 467 897 q 387 925 419 925 q 336 913 358 925 q 299 880 314 901 q 277 831 284 860 q 269 769 269 803 q 279 706 269 733 q 308 657 289 679 q 354 618 327 636 q 419 584 382 601 q 463 616 445 599 q 493 655 481 633 q 511 703 505 676 q 517 765 517 730 "},"R":{"x_min":38.453125,"x_max":987.734375,"ha":982,"o":"m 38 73 l 96 73 q 123 76 111 73 q 146 87 136 79 q 162 112 156 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 486 992 q 775 926 683 992 q 867 735 867 860 q 850 637 867 680 q 807 562 834 594 q 746 508 780 530 q 677 472 712 486 l 843 187 q 877 136 860 157 q 910 100 894 114 q 945 80 927 86 q 982 73 962 73 l 987 73 l 987 0 l 942 0 q 833 4 879 0 q 751 23 786 9 q 691 61 716 37 q 644 124 666 86 l 479 431 l 387 431 l 387 156 q 392 112 387 129 q 408 87 398 96 q 431 76 418 79 q 458 73 444 73 l 517 73 l 517 0 l 38 0 l 38 73 m 387 512 l 465 512 q 545 524 513 512 q 597 563 577 537 q 625 626 616 588 q 633 716 633 665 q 624 805 633 768 q 594 865 614 842 q 541 899 573 888 q 462 909 508 909 l 387 909 l 387 512 "},"Ż":{"x_min":58,"x_max":864,"ha":925,"o":"m 833 921 l 310 84 l 610 84 q 680 96 653 84 q 723 128 707 108 q 746 172 739 147 q 756 223 754 197 l 763 286 l 864 286 l 857 0 l 58 0 l 58 69 l 578 907 l 305 907 q 251 898 272 907 q 217 873 230 889 q 199 833 205 856 q 191 781 193 809 l 183 706 l 84 706 l 90 992 l 833 992 l 833 921 m 368 1198 q 377 1243 368 1224 q 402 1274 386 1262 q 439 1292 418 1286 q 486 1298 460 1298 q 531 1292 509 1298 q 569 1274 553 1286 q 595 1243 585 1262 q 605 1198 605 1224 q 595 1153 605 1172 q 569 1122 585 1134 q 531 1104 553 1110 q 486 1098 509 1098 q 439 1104 460 1098 q 402 1122 418 1110 q 377 1153 386 1134 q 368 1198 368 1172 "},"ħ":{"x_min":18.28125,"x_max":889.65625,"ha":926,"o":"m 139 876 l 139 897 q 129 941 139 924 q 104 967 119 958 q 72 979 89 976 q 39 981 54 981 l 23 981 l 23 1055 l 349 1055 l 349 876 l 565 876 l 565 802 l 349 802 l 349 784 q 348 726 349 757 q 344 669 346 695 q 339 608 341 638 l 351 608 q 395 670 372 647 q 445 703 418 692 q 501 717 471 714 q 563 721 530 721 q 659 705 616 721 q 731 657 701 689 q 776 574 760 624 q 792 453 792 523 l 792 172 q 797 120 792 139 q 815 90 803 101 q 844 77 826 80 q 885 73 861 73 l 889 73 l 889 0 l 581 0 l 581 415 q 575 494 581 459 q 556 553 569 529 q 521 590 543 577 q 470 602 500 602 q 412 585 435 602 q 375 537 389 567 q 356 469 362 508 q 349 387 349 430 l 349 164 q 357 117 349 134 q 377 89 364 99 q 408 76 389 80 q 450 73 427 73 l 454 73 l 454 0 l 27 0 l 27 73 l 30 73 q 73 76 54 73 q 108 90 93 80 q 130 119 122 100 q 139 169 139 138 l 139 802 l 18 802 l 18 876 l 139 876 "},"õ":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 273 10 340 -14 q 160 82 207 34 q 89 203 114 130 q 65 374 65 277 q 156 666 65 570 q 427 762 248 762 q 577 738 511 762 q 690 666 643 714 q 761 545 736 618 q 786 374 786 472 m 280 374 q 288 244 280 300 q 313 150 296 188 q 358 92 330 112 q 426 73 386 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 q 563 505 571 449 q 538 598 555 561 q 492 654 520 635 q 425 673 465 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 m 538 974 q 565 980 553 974 q 586 996 577 986 q 599 1020 594 1006 q 606 1047 604 1033 l 697 1047 q 681 968 694 1005 q 645 902 667 930 q 591 858 622 874 q 523 842 560 842 q 455 855 486 842 q 399 885 425 869 q 350 916 373 902 q 305 929 328 929 q 278 923 290 929 q 257 907 266 917 q 244 883 249 897 q 237 856 239 870 l 147 856 q 162 935 149 898 q 199 1001 176 973 q 253 1045 222 1029 q 321 1062 284 1062 q 389 1048 359 1062 q 445 1018 419 1034 q 494 987 471 1001 q 538 974 517 974 "},"˙":{"x_min":113,"x_max":350.390625,"ha":452,"o":"m 113 969 q 122 1014 113 995 q 147 1045 131 1033 q 184 1063 163 1057 q 231 1069 205 1069 q 276 1063 254 1069 q 314 1045 298 1057 q 340 1014 330 1033 q 350 969 350 995 q 340 924 350 943 q 314 893 330 905 q 276 875 298 881 q 231 869 254 869 q 184 875 205 869 q 147 893 163 881 q 122 924 131 905 q 113 969 113 943 "},"ê":{"x_min":65,"x_max":735,"ha":793,"o":"m 412 671 q 319 614 354 671 q 282 445 285 556 l 522 445 q 516 540 522 497 q 497 611 510 582 q 463 656 483 640 q 412 671 442 671 m 425 -14 q 269 11 337 -14 q 156 86 202 37 q 88 206 111 135 q 65 367 65 277 q 88 539 65 465 q 155 662 111 613 q 263 737 199 712 q 409 762 327 762 q 545 740 485 762 q 648 677 606 719 q 712 572 690 635 q 735 427 735 510 l 735 356 l 279 356 q 294 236 281 286 q 331 153 307 186 q 388 105 354 120 q 465 89 421 89 q 531 98 501 89 q 587 121 562 106 q 630 157 612 137 q 661 202 649 178 q 699 134 699 182 q 682 77 699 104 q 632 30 666 51 q 547 -1 598 10 q 425 -14 496 -14 m 173 860 q 211 905 189 879 q 255 958 233 931 q 296 1013 276 986 q 326 1064 315 1040 l 513 1064 q 543 1013 524 1040 q 584 958 562 986 q 628 905 606 931 q 666 860 649 879 l 666 842 l 570 842 q 536 869 556 853 q 495 901 516 884 q 454 935 474 918 q 419 966 434 952 q 383 935 403 952 q 342 901 363 918 q 302 869 322 884 q 269 842 283 853 l 173 842 l 173 860 "},"″":{"x_min":93,"x_max":612.359375,"ha":705,"o":"m 396 992 l 612 992 l 563 610 l 471 610 l 396 992 m 93 992 l 310 992 l 247 610 l 155 610 l 93 992 "},"„":{"x_min":61.96875,"x_max":601,"ha":699,"o":"m 311 58 q 297 -27 311 14 q 254 -104 283 -68 q 176 -167 224 -139 q 61 -214 129 -195 l 61 -142 q 115 -120 92 -131 q 153 -96 138 -109 q 176 -69 168 -84 q 184 -33 184 -53 q 176 -12 184 -20 q 158 3 169 -3 q 133 19 146 11 q 109 39 120 26 q 90 69 97 51 q 83 115 83 87 q 111 186 83 162 q 182 211 140 211 q 276 170 241 211 q 311 58 311 129 m 601 58 q 587 -27 601 14 q 544 -104 573 -68 q 466 -167 514 -139 q 351 -214 419 -195 l 351 -142 q 405 -120 382 -131 q 443 -96 428 -109 q 466 -69 458 -84 q 474 -33 474 -53 q 466 -12 474 -20 q 448 3 459 -3 q 423 19 436 11 q 399 39 410 26 q 380 69 387 51 q 373 115 373 87 q 401 186 373 162 q 472 211 430 211 q 566 170 531 211 q 601 58 601 129 "},"ч":{"x_min":22.578125,"x_max":922.3125,"ha":946,"o":"m 463 0 l 463 73 l 487 73 q 530 76 510 73 q 564 89 549 80 q 587 117 579 98 q 596 166 596 136 l 596 342 q 529 304 561 321 q 466 275 498 287 q 400 256 434 263 q 324 250 365 250 q 240 263 277 250 q 177 300 202 276 q 138 359 151 325 q 125 433 125 392 l 125 576 q 98 649 125 627 q 26 671 71 671 l 22 671 l 22 745 l 430 745 l 430 671 l 428 671 q 396 667 412 671 q 366 654 380 664 q 345 625 353 643 q 336 577 336 607 l 336 454 q 358 383 336 405 q 425 362 381 362 q 466 365 447 362 q 504 375 484 368 q 546 394 524 382 q 596 421 568 405 l 596 576 q 588 623 596 605 q 568 652 581 641 q 539 667 556 662 q 503 671 522 671 l 501 671 l 501 745 l 922 745 l 922 671 l 906 671 q 868 667 886 671 q 836 652 850 662 q 814 624 822 642 q 807 578 807 606 l 807 166 q 814 120 807 138 q 836 92 822 102 q 868 77 850 82 q 906 73 886 73 l 922 73 l 922 0 l 463 0 "},"δ":{"x_min":65,"x_max":786,"ha":851,"o":"m 571 299 q 558 391 571 352 q 525 461 546 430 q 478 516 505 491 q 421 563 451 540 q 369 534 394 552 q 324 484 344 515 q 292 405 305 452 q 280 291 280 358 q 290 200 280 240 q 319 132 300 160 q 365 88 338 104 q 426 73 391 73 q 487 88 461 73 q 533 133 514 104 q 561 204 551 162 q 571 299 571 246 m 350 885 q 360 831 350 855 q 391 785 369 808 q 447 740 413 763 q 530 687 481 717 q 635 614 588 651 q 716 536 682 577 q 767 445 749 494 q 786 337 786 396 q 759 185 786 251 q 686 75 733 120 q 572 8 638 31 q 423 -14 505 -14 q 280 6 345 -14 q 166 67 214 27 q 91 164 118 106 q 65 296 65 221 q 85 420 65 368 q 143 510 106 472 q 232 573 181 548 q 344 615 283 598 q 281 667 310 640 q 229 725 251 694 q 194 790 207 755 q 182 866 182 825 q 203 952 182 915 q 262 1013 224 988 q 351 1050 299 1038 q 463 1063 402 1063 q 586 1050 535 1063 q 668 1017 636 1037 q 714 973 699 997 q 729 925 729 949 q 691 851 729 876 q 591 825 654 825 q 582 889 591 860 q 558 940 574 919 q 517 973 541 961 q 461 985 493 985 q 411 976 432 985 q 376 954 390 968 q 356 922 363 940 q 350 885 350 904 "},"Â":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 m 282 1089 q 320 1134 298 1108 q 364 1187 342 1160 q 405 1242 385 1215 q 435 1293 424 1269 l 622 1293 q 652 1242 633 1269 q 693 1187 671 1215 q 737 1134 715 1160 q 775 1089 758 1108 l 775 1071 l 679 1071 q 645 1098 665 1082 q 604 1130 625 1113 q 563 1164 583 1147 q 528 1195 543 1181 q 492 1164 512 1181 q 451 1130 472 1147 q 411 1098 431 1113 q 378 1071 392 1082 l 282 1071 l 282 1089 "},"Į":{"x_min":38.453125,"x_max":517.953125,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 m 136 -180 q 149 -118 136 -147 q 186 -65 163 -89 q 238 -24 209 -41 q 300 0 268 -7 l 407 0 q 362 -20 385 -6 q 320 -53 339 -33 q 289 -100 302 -74 q 277 -160 277 -127 q 284 -193 277 -179 q 304 -215 291 -207 q 335 -229 317 -224 q 373 -233 352 -233 q 413 -230 392 -233 q 461 -222 435 -228 l 461 -311 q 434 -321 450 -317 q 401 -327 418 -325 q 369 -332 385 -330 q 342 -334 353 -334 q 188 -297 241 -334 q 136 -180 136 -260 "},"ω":{"x_min":65,"x_max":1046,"ha":1111,"o":"m 761 -14 q 686 -3 718 -14 q 630 25 654 6 q 587 71 605 44 q 554 133 569 99 q 521 71 539 99 q 479 25 503 44 q 423 -3 455 6 q 349 -14 392 -14 q 139 74 213 -14 q 65 341 65 163 q 78 465 65 407 q 118 577 92 524 q 180 678 144 630 q 262 770 216 725 l 360 706 q 323 630 339 669 q 297 548 307 592 q 283 453 288 504 q 279 338 279 402 q 289 223 279 271 q 317 146 300 175 q 356 103 334 116 q 398 89 377 89 q 466 120 439 89 q 503 220 493 151 q 486 278 493 253 q 474 326 478 304 q 467 369 469 348 q 465 412 465 390 q 488 499 465 473 q 555 526 511 526 q 622 499 599 526 q 645 412 645 473 q 643 369 645 390 q 636 327 640 349 q 624 280 631 306 q 607 222 617 254 q 644 121 617 152 q 712 89 672 89 q 755 103 734 89 q 794 146 776 116 q 821 223 811 175 q 832 338 832 271 q 827 453 832 402 q 813 548 822 504 q 787 630 803 592 q 750 706 772 669 l 848 770 q 930 678 894 725 q 992 577 967 630 q 1032 465 1018 524 q 1046 341 1046 407 q 972 74 1046 163 q 761 -14 898 -14 "},"Ţ":{"x_min":13,"x_max":893,"ha":907,"o":"m 563 164 q 568 116 563 134 q 584 89 574 99 q 606 76 593 80 q 634 73 619 73 l 692 73 l 692 0 l 213 0 l 213 73 l 271 73 q 300 76 287 73 q 322 89 313 80 q 337 116 332 99 q 343 164 343 134 l 343 907 l 231 907 q 179 900 200 907 q 144 881 158 893 q 125 850 131 868 q 116 809 118 832 l 106 723 l 13 723 l 20 992 l 886 992 l 893 723 l 800 723 l 789 809 q 780 850 787 832 q 761 881 774 868 q 726 900 747 893 q 674 907 705 907 l 563 907 l 563 164 m 328 -289 q 342 -242 334 -268 q 358 -189 350 -216 q 372 -134 365 -161 q 382 -85 378 -108 l 544 -85 l 544 -98 q 519 -147 534 -120 q 485 -202 503 -174 q 448 -257 467 -230 q 411 -307 429 -285 l 328 -307 l 328 -289 "},"´":{"x_min":224,"x_max":576,"ha":802,"o":"m 224 860 q 257 905 238 879 q 294 958 275 931 q 330 1013 313 986 q 357 1064 346 1040 l 576 1064 l 576 1049 q 533 1004 563 1031 q 466 946 503 976 q 390 889 429 917 q 318 842 350 860 l 224 842 l 224 860 "},"Ĉ":{"x_min":77,"x_max":872,"ha":928,"o":"m 590 96 q 680 108 640 96 q 751 139 720 120 q 805 182 782 158 q 846 228 829 205 q 864 203 857 220 q 870 169 870 186 q 855 107 870 139 q 802 48 839 75 q 705 3 766 21 q 556 -14 645 -14 q 346 22 436 -14 q 196 126 255 59 q 106 288 136 193 q 77 497 77 382 q 107 703 77 609 q 197 864 138 796 q 347 968 257 931 q 555 1006 437 1006 q 694 993 635 1006 q 793 959 754 980 q 852 908 832 937 q 872 844 872 878 q 860 796 872 818 q 827 758 849 774 q 772 733 805 742 q 698 723 740 723 q 690 792 698 758 q 665 854 683 826 q 618 899 647 882 q 546 917 589 917 q 434 889 480 917 q 362 807 389 861 q 322 675 334 754 q 310 497 310 597 q 325 321 310 396 q 373 195 340 245 q 459 121 406 146 q 590 96 512 96 m 280 1089 q 318 1134 296 1108 q 362 1187 340 1160 q 403 1242 383 1215 q 433 1293 422 1269 l 620 1293 q 650 1242 631 1269 q 691 1187 669 1215 q 735 1134 713 1160 q 773 1089 756 1108 l 773 1071 l 677 1071 q 643 1098 663 1082 q 602 1130 623 1113 q 561 1164 581 1147 q 526 1195 541 1181 q 490 1164 510 1181 q 449 1130 470 1147 q 409 1098 429 1113 q 376 1071 390 1082 l 280 1071 l 280 1089 "},"И":{"x_min":38.453125,"x_max":1097.859375,"ha":1137,"o":"m 749 685 l 387 220 l 387 164 q 392 116 387 134 q 408 89 398 99 q 430 76 417 80 q 458 73 443 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 517 992 l 517 918 l 458 918 q 430 915 443 918 q 408 903 417 912 q 392 876 398 893 q 387 828 387 858 l 387 339 l 749 805 l 749 828 q 743 876 749 858 q 728 903 738 893 q 705 915 718 912 q 678 918 692 918 l 618 918 l 618 992 l 1097 992 l 1097 918 l 1039 918 q 1012 915 1025 918 q 989 903 999 912 q 974 876 979 893 q 969 828 969 858 l 969 156 q 974 112 969 129 q 990 87 980 96 q 1012 76 1000 79 q 1039 73 1025 73 l 1097 73 l 1097 0 l 618 0 l 618 73 l 678 73 q 705 76 692 73 q 728 89 718 80 q 743 116 738 99 q 749 164 749 134 l 749 685 "},"Љ":{"x_min":0,"x_max":1285,"ha":1327,"o":"m 441 918 q 429 736 437 831 q 408 546 420 640 q 379 365 395 452 q 343 210 363 279 q 299 104 324 146 q 247 36 275 61 q 184 0 218 11 q 111 -10 149 -10 q 30 16 61 -10 q 0 93 0 43 q 5 132 0 114 q 21 161 11 149 q 42 180 30 173 q 67 186 54 186 q 84 140 67 159 q 128 121 101 121 q 171 130 151 121 q 207 158 190 138 q 238 214 224 179 q 267 302 253 249 q 290 402 279 347 q 308 514 300 457 q 323 627 317 571 q 334 730 330 683 q 340 812 338 777 q 343 863 343 847 q 334 893 343 882 q 310 910 325 904 q 274 917 294 916 q 231 918 254 918 l 210 918 l 210 992 l 1000 992 l 1000 918 l 915 918 q 860 900 878 918 q 842 835 842 881 l 842 558 l 916 558 q 1085 537 1015 558 q 1199 480 1155 517 q 1264 392 1244 444 q 1285 280 1285 341 q 1262 166 1285 218 q 1193 77 1239 114 q 1075 20 1146 40 q 908 0 1004 0 l 493 0 l 493 73 l 551 73 q 586 79 572 73 q 608 94 599 84 q 619 123 616 105 q 623 165 623 141 l 623 918 l 441 918 m 842 82 l 896 82 q 967 93 938 82 q 1015 129 997 105 q 1042 189 1034 153 q 1050 273 1050 225 q 1040 367 1050 328 q 1010 431 1031 406 q 958 466 990 455 q 880 477 926 477 l 842 477 l 842 82 "},"р":{"x_min":18.703125,"x_max":831,"ha":896,"o":"m 34 -260 q 67 -257 50 -260 q 99 -244 85 -253 q 124 -217 114 -234 q 134 -169 134 -199 l 134 574 q 126 624 134 605 q 107 654 119 643 q 77 667 94 664 q 40 671 60 671 l 30 671 l 30 745 l 302 745 l 327 635 l 334 635 q 368 685 348 663 q 415 724 388 707 q 473 749 441 740 q 546 758 506 758 q 668 735 615 758 q 757 664 721 712 q 812 543 793 616 q 831 369 831 470 q 812 196 831 269 q 758 75 794 123 q 671 5 723 28 q 551 -17 619 -17 q 422 13 472 -17 q 343 94 373 43 l 334 94 q 339 31 336 62 q 343 -23 341 5 q 344 -74 344 -52 l 344 -169 q 354 -217 344 -199 q 379 -244 364 -234 q 411 -257 393 -253 q 443 -260 428 -260 l 473 -260 l 473 -334 l 18 -334 l 18 -260 l 34 -260 m 486 86 q 586 156 556 86 q 616 368 616 226 q 586 580 616 506 q 487 654 556 654 q 418 635 446 654 q 374 580 391 616 q 351 491 358 544 q 344 369 344 437 q 351 244 344 297 q 374 155 358 191 q 418 103 391 120 q 486 86 445 86 "},"Ω":{"x_min":61,"x_max":1061,"ha":1122,"o":"m 89 625 q 118 782 89 712 q 206 902 147 852 q 354 979 265 952 q 563 1007 443 1007 q 763 979 676 1007 q 911 902 851 952 q 1002 782 971 852 q 1033 625 1033 712 q 947 386 1033 478 q 693 265 861 295 l 690 148 l 829 148 q 890 153 865 148 q 931 168 915 158 q 958 195 948 179 q 973 234 968 211 l 984 280 l 1061 280 l 1050 0 l 603 0 l 612 335 q 696 363 661 341 q 752 423 730 386 q 782 510 773 460 q 792 625 792 561 q 780 748 792 694 q 740 840 767 802 q 669 897 713 877 q 562 916 625 916 q 453 897 498 916 q 381 840 408 877 q 340 748 353 802 q 327 625 327 694 q 337 510 327 561 q 368 423 347 460 q 424 363 390 386 q 508 335 459 341 l 518 0 l 70 0 l 61 278 l 137 278 l 148 231 q 162 192 153 208 q 188 165 172 176 q 230 150 205 155 q 291 145 255 145 l 431 145 l 427 267 q 174 388 259 296 q 89 625 89 479 "},"т":{"x_min":28,"x_max":760,"ha":787,"o":"m 751 745 l 760 508 l 664 508 l 658 553 q 649 607 654 585 q 634 641 643 629 q 612 660 624 654 q 579 665 599 665 l 499 665 l 499 166 q 507 121 499 139 q 527 92 514 103 q 557 77 540 82 q 592 73 574 73 l 608 73 l 608 0 l 173 0 l 173 73 l 189 73 q 227 77 209 73 q 259 92 245 82 q 280 121 272 103 q 289 166 289 139 l 289 665 l 208 665 q 176 660 189 665 q 153 641 162 654 q 138 607 144 629 q 129 553 133 585 l 123 508 l 28 508 l 36 745 l 751 745 "},"П":{"x_min":38.453125,"x_max":1084.875,"ha":1124,"o":"m 606 0 l 606 73 l 665 73 q 692 76 679 73 q 715 89 705 80 q 730 116 725 99 q 736 164 736 134 l 736 907 l 387 907 l 387 164 q 392 116 387 134 q 408 89 398 99 q 430 76 417 80 q 458 73 443 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 1084 992 l 1084 918 l 1026 918 q 999 915 1012 918 q 976 903 986 912 q 961 876 966 893 q 956 828 956 858 l 956 156 q 961 112 956 129 q 977 87 967 96 q 999 76 987 79 q 1026 73 1012 73 l 1084 73 l 1084 0 l 606 0 "},"Ö":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 340 22 428 -14 q 193 126 251 59 q 106 288 135 193 q 77 498 77 382 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 748 970 661 1007 q 894 867 835 934 q 985 706 954 800 q 1016 496 1016 612 m 310 496 q 323 319 310 397 q 364 187 336 241 q 437 104 392 133 q 547 76 482 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 q 770 674 782 596 q 729 806 757 752 q 657 888 702 860 q 548 916 612 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 m 314 1184 q 320 1224 314 1207 q 338 1251 327 1240 q 364 1265 349 1261 q 395 1270 379 1270 q 426 1265 412 1270 q 453 1251 441 1261 q 471 1224 464 1240 q 479 1184 479 1207 q 471 1144 479 1160 q 453 1117 464 1127 q 426 1102 441 1107 q 395 1098 412 1098 q 364 1102 379 1098 q 338 1117 349 1107 q 320 1144 327 1127 q 314 1184 314 1160 m 599 1184 q 605 1224 599 1207 q 624 1251 612 1240 q 650 1265 635 1261 q 682 1270 665 1270 q 712 1265 697 1270 q 738 1251 726 1261 q 756 1224 749 1240 q 764 1184 764 1207 q 756 1144 764 1160 q 738 1117 749 1127 q 712 1102 726 1107 q 682 1098 697 1098 q 650 1102 665 1098 q 624 1117 635 1107 q 605 1144 612 1127 q 599 1184 599 1160 "},"z":{"x_min":25,"x_max":694,"ha":735,"o":"m 511 94 q 547 100 532 94 q 572 120 562 106 q 590 155 583 133 q 603 207 597 176 l 611 252 l 694 252 l 687 0 l 25 0 l 25 56 l 435 650 l 232 650 q 204 645 216 650 q 184 630 193 641 q 167 600 175 618 q 152 553 160 581 l 144 520 l 61 520 l 77 745 l 678 745 l 678 685 l 266 94 l 511 94 "},"™":{"x_min":37.21875,"x_max":1101.828125,"ha":1160,"o":"m 896 512 l 896 549 q 934 556 920 549 q 950 586 948 562 l 950 896 l 792 512 l 744 512 l 587 897 l 587 591 q 601 556 587 564 q 642 549 615 549 l 642 512 l 474 512 l 474 549 l 488 549 q 525 556 509 549 q 543 587 541 562 l 543 914 q 537 935 542 927 q 526 947 533 943 q 508 952 518 951 q 488 953 498 953 l 474 953 l 474 992 l 634 992 l 787 607 l 945 992 l 1101 992 l 1101 953 l 1086 953 q 1065 951 1075 953 q 1048 946 1055 950 q 1037 934 1041 942 q 1034 911 1034 925 l 1034 592 q 1037 569 1034 577 q 1048 556 1041 561 q 1065 550 1055 552 q 1086 549 1075 549 l 1101 549 l 1101 512 l 896 512 m 286 592 q 290 569 286 577 q 302 556 294 561 q 319 550 309 552 q 339 549 328 549 l 360 549 l 360 512 l 124 512 l 124 549 l 148 549 q 168 550 158 549 q 184 556 177 552 q 195 567 191 560 q 200 587 200 575 l 200 947 l 138 947 q 113 943 124 947 q 97 933 103 939 q 88 917 91 926 q 83 899 84 909 l 77 865 l 37 865 l 41 992 l 446 992 l 451 865 l 410 865 l 405 899 q 391 933 402 918 q 349 947 379 947 l 286 947 l 286 592 "},"Θ":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 433 638 l 440 611 q 449 584 444 596 q 463 564 453 573 q 492 552 474 556 q 541 548 510 548 l 548 548 q 594 552 576 548 q 624 565 612 556 q 642 585 636 573 q 652 611 648 597 l 659 638 l 731 638 l 731 373 l 659 373 l 652 399 q 642 425 648 413 q 624 445 636 437 q 594 458 612 454 q 548 463 576 463 l 541 463 q 492 458 510 463 q 463 446 474 454 q 449 426 453 438 q 440 399 444 414 l 433 373 l 361 373 l 361 638 l 433 638 m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 340 22 428 -14 q 193 126 251 59 q 106 288 135 193 q 77 498 77 382 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 748 970 661 1007 q 894 867 835 934 q 985 706 954 800 q 1016 496 1016 612 m 310 496 q 323 319 310 397 q 364 187 336 241 q 437 104 392 133 q 547 76 482 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 q 770 674 782 596 q 729 806 757 752 q 657 888 702 860 q 548 916 612 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 "},"Ř":{"x_min":38.453125,"x_max":987.734375,"ha":982,"o":"m 38 73 l 96 73 q 123 76 111 73 q 146 87 136 79 q 162 112 156 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 486 992 q 775 926 683 992 q 867 735 867 860 q 850 637 867 680 q 807 562 834 594 q 746 508 780 530 q 677 472 712 486 l 843 187 q 877 136 860 157 q 910 100 894 114 q 945 80 927 86 q 982 73 962 73 l 987 73 l 987 0 l 942 0 q 833 4 879 0 q 751 23 786 9 q 691 61 716 37 q 644 124 666 86 l 479 431 l 387 431 l 387 156 q 392 112 387 129 q 408 87 398 96 q 431 76 418 79 q 458 73 444 73 l 517 73 l 517 0 l 38 0 l 38 73 m 387 512 l 465 512 q 545 524 513 512 q 597 563 577 537 q 625 626 616 588 q 633 716 633 665 q 624 805 633 768 q 594 865 614 842 q 541 899 573 888 q 462 909 508 909 l 387 909 l 387 512 m 209 1293 l 305 1293 q 338 1265 319 1281 q 378 1233 358 1250 q 419 1199 399 1215 q 455 1167 439 1182 q 490 1199 470 1182 q 531 1233 510 1215 q 572 1265 552 1250 q 606 1293 592 1281 l 702 1293 l 702 1274 q 664 1229 685 1255 q 620 1176 642 1203 q 579 1121 598 1148 q 549 1071 560 1094 l 362 1071 q 332 1121 351 1094 q 291 1176 312 1148 q 247 1229 269 1203 q 209 1274 225 1255 l 209 1293 "},"Ň":{"x_min":38.453125,"x_max":1070.859375,"ha":1095,"o":"m 813 0 l 271 765 l 271 164 q 277 116 271 134 q 292 89 283 99 q 315 76 302 80 q 342 73 328 73 l 401 73 l 401 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 347 992 l 837 298 l 837 833 q 831 878 837 861 q 816 903 826 895 q 793 915 806 912 q 766 918 780 918 l 708 918 l 708 992 l 1070 992 l 1070 918 l 1012 918 q 985 915 998 918 q 962 903 972 912 q 947 876 952 893 q 942 828 942 858 l 942 0 l 813 0 m 330 1293 l 426 1293 q 459 1265 440 1281 q 499 1233 479 1250 q 540 1199 520 1215 q 576 1167 560 1182 q 611 1199 591 1182 q 652 1233 631 1215 q 693 1265 673 1250 q 727 1293 713 1281 l 823 1293 l 823 1274 q 785 1229 806 1255 q 741 1176 763 1203 q 700 1121 719 1148 q 670 1071 681 1094 l 483 1071 q 453 1121 472 1094 q 412 1176 433 1148 q 368 1229 390 1203 q 330 1274 346 1255 l 330 1293 "},"É":{"x_min":38.453125,"x_max":863,"ha":907,"o":"m 388 84 l 666 84 q 702 92 687 84 q 728 114 717 100 q 745 148 739 128 q 755 190 752 167 l 766 256 l 863 256 l 852 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 809 992 l 815 736 l 718 736 l 711 801 q 685 880 705 852 q 622 907 665 907 l 388 907 l 388 560 l 718 560 l 718 476 l 388 476 l 388 84 m 355 1089 q 388 1134 369 1108 q 425 1187 406 1160 q 461 1242 444 1215 q 488 1293 477 1269 l 707 1293 l 707 1278 q 664 1233 694 1260 q 597 1175 634 1205 q 521 1118 560 1146 q 449 1071 481 1089 l 355 1071 l 355 1089 "},"и":{"x_min":23.703125,"x_max":936.296875,"ha":960,"o":"m 821 164 q 830 116 821 134 q 855 89 840 99 q 887 76 869 80 q 920 73 905 73 l 936 73 l 936 0 l 515 0 l 515 73 l 518 73 q 548 76 532 73 q 578 89 564 80 q 600 116 591 99 q 610 164 610 134 l 610 462 l 349 177 l 349 164 q 359 116 349 134 q 381 89 368 99 q 411 76 395 80 q 441 73 427 73 l 444 73 l 444 0 l 23 0 l 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 444 745 l 444 671 l 441 671 q 411 668 427 671 q 381 655 395 664 q 359 628 368 645 q 349 580 349 610 l 349 284 l 610 569 l 610 580 q 600 628 610 610 q 578 655 591 645 q 548 668 564 664 q 518 671 532 671 l 515 671 l 515 745 l 936 745 l 936 671 l 920 671 q 887 668 905 671 q 855 655 869 664 q 830 628 840 645 q 821 580 821 610 l 821 164 "},"³":{"x_min":54,"x_max":497,"ha":555,"o":"m 324 854 q 309 920 324 897 q 259 943 295 943 q 223 933 237 943 q 200 906 208 923 q 187 868 191 890 q 184 822 184 846 q 134 824 156 822 q 96 834 111 827 q 71 852 80 840 q 63 881 63 863 q 76 930 63 907 q 114 969 89 953 q 176 996 139 986 q 262 1006 214 1006 q 348 996 310 1006 q 415 969 387 987 q 458 926 443 951 q 473 868 473 900 q 435 768 473 807 q 331 714 397 730 l 331 706 q 392 694 362 702 q 445 672 422 687 q 482 633 468 657 q 497 571 497 609 q 471 485 497 520 q 405 429 445 450 q 318 398 366 407 q 229 389 271 389 q 126 399 172 389 q 54 422 81 409 l 54 494 q 87 482 68 488 q 127 471 106 476 q 170 463 148 466 q 212 460 191 460 q 315 486 278 460 q 352 574 352 513 q 314 645 352 620 q 201 670 277 670 l 155 670 l 155 736 l 201 736 q 249 744 226 736 q 288 768 272 752 q 314 806 305 784 q 324 854 324 828 "},"[":{"x_min":139,"x_max":523.5625,"ha":575,"o":"m 139 -178 l 139 1055 l 523 1055 l 523 981 l 463 981 q 419 978 440 981 q 383 964 398 974 q 359 934 368 953 q 349 881 349 914 l 349 -4 q 359 -56 349 -36 q 383 -87 368 -76 q 419 -101 398 -97 q 463 -104 440 -104 l 523 -104 l 523 -178 l 139 -178 "},"ζ":{"x_min":65,"x_max":718,"ha":692,"o":"m 65 283 q 87 455 65 369 q 152 621 110 540 q 255 775 194 701 q 391 909 315 848 q 321 924 357 913 q 250 952 285 935 q 180 988 214 968 q 115 1031 145 1008 l 165 1101 q 227 1058 195 1078 q 296 1022 260 1038 q 371 995 332 1006 q 455 980 411 984 q 492 1008 471 994 q 537 1035 513 1023 q 586 1055 561 1047 q 637 1064 611 1064 q 696 1047 675 1064 q 718 1000 718 1030 q 707 953 718 974 q 673 917 696 932 q 613 893 650 901 q 524 884 576 884 q 499 884 513 884 q 473 886 486 884 q 385 749 421 819 q 325 607 348 679 q 290 463 301 535 q 279 319 279 390 q 291 229 279 262 q 329 175 303 196 q 395 143 355 155 q 492 118 435 131 q 615 58 574 99 q 657 -50 657 17 q 639 -128 657 -90 q 586 -196 622 -165 q 495 -249 550 -227 q 365 -282 440 -271 l 365 -209 q 419 -190 397 -201 q 453 -167 440 -180 q 472 -138 467 -153 q 477 -104 477 -122 q 470 -69 477 -84 q 444 -43 463 -54 q 392 -23 425 -32 q 309 -3 359 -14 q 204 28 249 7 q 127 84 158 50 q 80 168 96 119 q 65 283 65 217 "},"∏":{"x_min":38.453125,"x_max":1097.859375,"ha":1137,"o":"m 618 -334 l 618 -260 l 678 -260 q 705 -257 692 -260 q 728 -244 718 -253 q 743 -217 738 -234 q 749 -169 749 -199 l 749 907 l 387 907 l 387 -169 q 392 -217 387 -199 q 408 -244 398 -234 q 430 -257 417 -253 q 458 -260 443 -260 l 517 -260 l 517 -334 l 38 -334 l 38 -260 l 96 -260 q 124 -257 111 -260 q 147 -244 137 -253 q 162 -217 157 -234 q 168 -169 168 -199 l 168 833 q 161 878 167 861 q 145 903 155 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 1097 992 l 1097 918 l 1039 918 q 1012 915 1025 918 q 989 903 999 912 q 974 875 979 893 q 969 828 969 858 l 969 -176 q 976 -221 970 -204 q 991 -246 981 -237 q 1013 -257 1000 -254 q 1039 -260 1025 -260 l 1097 -260 l 1097 -334 l 618 -334 "},"Έ":{"x_min":-52,"x_max":1033,"ha":1076,"o":"m 558 84 l 836 84 q 872 92 857 84 q 898 114 887 100 q 915 148 909 128 q 925 190 922 167 l 936 256 l 1033 256 l 1022 0 l 208 0 l 208 73 l 266 73 q 294 76 281 73 q 317 87 307 79 q 332 112 327 96 q 338 156 338 129 l 338 828 q 332 876 338 858 q 317 903 327 893 q 295 915 308 912 q 266 918 282 918 l 208 918 l 208 992 l 979 992 l 985 736 l 888 736 l 881 801 q 855 880 875 852 q 792 907 835 907 l 558 907 l 558 560 l 888 560 l 888 476 l 558 476 l 558 84 m -52 788 q -37 835 -45 809 q -22 888 -30 861 q -8 943 -15 916 q 1 993 -2 969 l 191 993 l 191 978 q 164 930 181 957 q 128 875 148 903 q 86 820 108 847 q 44 770 64 793 l -52 770 l -52 788 "},"Ρ":{"x_min":38.453125,"x_max":844,"ha":886,"o":"m 844 697 q 822 577 844 635 q 751 475 800 519 q 625 405 702 431 q 434 379 547 379 l 387 379 l 387 156 q 393 112 387 129 q 409 87 399 96 q 433 76 419 79 q 460 73 446 73 l 545 73 l 545 0 l 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 464 992 q 632 971 561 992 q 750 912 703 951 q 820 820 797 874 q 844 697 844 766 m 387 460 l 420 460 q 508 472 472 460 q 566 513 544 485 q 600 585 589 541 q 610 692 610 629 q 601 788 610 747 q 572 856 592 829 q 520 896 552 883 q 441 909 488 909 l 387 909 l 387 460 "},"ğ":{"x_min":3,"x_max":772,"ha":778,"o":"m 772 717 q 767 687 772 702 q 751 662 762 672 q 720 644 740 651 q 672 638 701 638 q 668 663 672 652 q 656 681 664 674 q 639 693 649 689 q 619 696 630 696 q 594 692 608 696 q 574 681 581 687 q 600 646 588 666 q 622 603 612 626 q 636 555 631 580 q 642 504 642 530 q 625 408 642 452 q 574 331 608 363 q 486 280 539 298 q 361 262 433 262 q 342 262 353 262 q 319 263 330 262 q 297 264 307 263 q 281 266 286 265 q 263 254 272 261 q 246 238 253 247 q 235 218 239 229 q 230 195 230 207 q 248 161 230 172 q 295 151 266 151 l 464 151 q 583 136 533 151 q 666 94 633 121 q 715 27 699 67 q 731 -61 731 -11 q 706 -176 731 -125 q 632 -261 682 -226 q 506 -315 582 -296 q 327 -334 431 -334 q 83 -284 163 -334 q 3 -140 3 -235 q 51 -26 3 -66 q 190 20 99 13 q 153 39 171 28 q 120 65 135 49 q 97 100 106 80 q 89 144 89 119 q 98 186 89 167 q 123 224 107 206 q 162 258 139 242 q 212 289 185 274 q 156 320 182 300 q 111 366 130 339 q 81 428 92 393 q 71 504 71 462 q 141 694 71 627 q 361 762 212 762 q 453 749 410 762 q 526 719 495 736 q 552 745 538 731 q 583 770 566 759 q 623 789 601 782 q 671 797 644 797 q 715 790 696 797 q 746 773 733 784 q 765 748 759 762 q 772 717 772 733 m 167 -137 q 208 -223 167 -195 q 330 -250 250 -250 q 508 -215 452 -250 q 564 -111 564 -180 q 536 -49 564 -67 q 452 -32 508 -32 l 290 -32 q 247 -35 269 -32 q 208 -51 226 -39 q 178 -83 190 -62 q 167 -137 167 -104 m 260 504 q 265 438 260 468 q 281 388 270 409 q 311 355 293 367 q 357 344 330 344 q 403 355 384 344 q 432 387 421 366 q 447 439 443 409 q 452 506 452 469 q 447 577 452 545 q 431 631 442 608 q 401 666 420 653 q 355 678 383 678 q 310 665 328 678 q 280 629 292 652 q 264 574 269 606 q 260 504 260 542 m 357 842 q 261 861 302 842 q 192 911 220 880 q 150 981 164 942 q 135 1060 136 1020 l 226 1060 q 272 987 238 1009 q 357 965 305 965 q 442 987 408 965 q 487 1060 476 1009 l 580 1060 q 564 981 578 1020 q 522 911 550 942 q 453 861 494 880 q 357 842 412 842 "},"ª":{"x_min":40,"x_max":553.6875,"ha":583,"o":"m 200 672 q 215 620 200 635 q 252 606 231 606 q 316 632 295 606 q 337 701 337 659 l 337 758 l 305 757 q 224 733 248 755 q 200 672 200 712 m 281 938 q 254 932 264 938 q 238 913 244 925 q 231 886 233 902 q 229 852 229 870 q 117 866 157 852 q 77 912 77 880 q 94 952 77 936 q 138 979 110 969 q 204 994 166 989 q 284 999 241 999 q 441 966 389 999 q 494 854 494 933 l 494 649 q 507 607 494 618 q 553 597 520 597 l 553 536 l 391 536 l 357 604 l 348 604 q 320 575 336 589 q 285 551 304 561 q 242 534 266 540 q 191 528 219 528 q 80 563 121 528 q 40 669 40 599 q 98 771 40 739 q 275 810 156 804 l 337 813 l 337 850 q 335 886 337 869 q 327 914 333 902 q 310 932 321 925 q 281 938 300 938 "},"ї":{"x_min":0,"x_max":465.234375,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m 0 955 q 6 995 0 978 q 24 1022 13 1011 q 50 1036 35 1032 q 81 1041 65 1041 q 112 1036 98 1041 q 139 1022 127 1032 q 157 995 150 1011 q 165 955 165 978 q 157 915 165 931 q 139 888 150 898 q 112 873 127 878 q 81 869 98 869 q 50 873 65 869 q 24 888 35 878 q 6 915 13 898 q 0 955 0 931 m 285 955 q 291 995 285 978 q 310 1022 298 1011 q 336 1036 321 1032 q 368 1041 351 1041 q 398 1036 383 1041 q 424 1022 412 1032 q 442 995 435 1011 q 450 955 450 978 q 442 915 450 931 q 424 888 435 898 q 398 873 412 878 q 368 869 383 869 q 336 873 351 869 q 310 888 321 878 q 291 915 298 898 q 285 955 285 931 "},"T":{"x_min":13,"x_max":893,"ha":907,"o":"m 563 164 q 568 116 563 134 q 584 89 574 99 q 606 76 593 80 q 634 73 619 73 l 692 73 l 692 0 l 213 0 l 213 73 l 271 73 q 300 76 287 73 q 322 89 313 80 q 337 116 332 99 q 343 164 343 134 l 343 907 l 231 907 q 179 900 200 907 q 144 881 158 893 q 125 850 131 868 q 116 809 118 832 l 106 723 l 13 723 l 20 992 l 886 992 l 893 723 l 800 723 l 789 809 q 780 850 787 832 q 761 881 774 868 q 726 900 747 893 q 674 907 705 907 l 563 907 l 563 164 "},"š":{"x_min":41.765625,"x_max":623,"ha":678,"o":"m 321 -14 q 192 -1 245 -14 q 105 32 139 10 q 57 83 72 53 q 41 148 41 113 q 54 202 41 182 q 88 234 68 223 q 130 250 108 246 q 171 253 153 253 q 182 175 171 210 q 212 117 193 141 q 259 80 232 93 q 321 67 287 67 q 383 74 357 67 q 425 95 409 82 q 450 126 442 108 q 458 162 458 143 q 450 203 458 185 q 422 237 441 221 q 369 268 402 253 q 287 300 336 283 q 188 342 231 320 q 116 392 145 364 q 71 457 86 421 q 56 540 56 493 q 77 637 56 596 q 138 706 98 678 q 232 747 177 733 q 354 761 287 761 q 466 749 420 761 q 541 720 512 738 q 584 678 570 702 q 597 632 597 655 q 565 560 597 585 q 456 536 532 536 q 425 644 456 605 q 334 682 394 682 q 291 676 311 682 q 255 660 270 671 q 230 633 239 649 q 221 596 221 617 q 229 556 221 573 q 259 522 238 538 q 317 490 281 506 q 411 454 354 473 q 496 417 457 437 q 563 369 535 396 q 607 308 591 342 q 623 230 623 274 q 602 127 623 172 q 544 50 582 81 q 449 2 505 19 q 321 -14 393 -14 m 93 1064 l 189 1064 q 222 1036 203 1052 q 262 1004 242 1021 q 303 970 283 986 q 339 938 323 953 q 374 970 354 953 q 415 1004 394 986 q 456 1036 436 1021 q 490 1064 476 1052 l 586 1064 l 586 1045 q 548 1000 569 1026 q 504 947 526 974 q 463 892 482 919 q 433 842 444 865 l 246 842 q 216 892 235 865 q 175 947 196 919 q 131 1000 153 974 q 93 1045 109 1026 l 93 1064 "},"є":{"x_min":65,"x_max":681.03125,"ha":732,"o":"m 409 -14 q 269 5 332 -14 q 160 70 206 25 q 90 189 115 116 q 65 369 65 262 q 91 557 65 481 q 163 677 117 632 q 271 742 208 723 q 405 762 333 762 q 524 750 472 762 q 610 719 575 739 q 663 673 645 700 q 681 616 681 646 q 673 572 681 593 q 645 534 665 551 q 590 508 625 518 q 501 498 555 498 q 496 566 501 534 q 482 623 492 599 q 454 662 472 648 q 411 677 437 677 q 359 664 382 677 q 318 620 335 651 q 291 537 301 589 q 279 407 281 484 l 520 407 l 520 318 l 280 318 q 325 146 286 202 q 444 89 364 89 q 511 98 480 89 q 569 121 543 106 q 614 157 594 137 q 645 202 633 178 q 670 174 662 192 q 679 138 679 157 q 663 85 679 112 q 614 35 647 57 q 531 0 581 13 q 409 -14 480 -14 "},"Þ":{"x_min":38.453125,"x_max":844,"ha":886,"o":"m 387 278 l 420 278 q 508 290 472 278 q 566 331 544 303 q 600 403 589 359 q 610 510 610 447 q 601 606 610 565 q 572 674 592 647 q 520 714 552 701 q 441 727 488 727 l 387 727 l 387 278 m 844 515 q 822 395 844 453 q 751 293 800 337 q 625 223 702 249 q 434 197 547 197 l 387 197 l 387 156 q 394 112 388 129 q 410 87 400 96 q 433 76 420 79 q 460 73 446 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 460 918 q 433 916 446 918 q 409 904 419 913 q 393 879 399 895 q 387 835 387 863 l 387 810 l 465 810 q 632 787 561 808 q 750 729 703 767 q 820 637 797 691 q 844 515 844 584 "},"j":{"x_min":-27.84375,"x_max":358.078125,"ha":480,"o":"m 349 745 l 349 -10 q 323 -166 349 -104 q 251 -265 297 -228 q 140 -318 204 -302 q 0 -334 76 -334 l -27 -334 l -27 -247 l -18 -247 q 49 -235 19 -247 q 98 -194 78 -223 q 128 -118 118 -166 q 139 0 139 -71 l 139 579 q 130 627 139 609 q 106 655 121 645 q 70 668 90 664 q 27 671 50 671 l 23 671 l 23 745 l 349 745 m 120 970 q 129 1015 120 996 q 154 1046 139 1034 q 192 1064 170 1058 q 238 1070 213 1070 q 284 1064 262 1070 q 322 1046 305 1058 q 348 1015 338 1034 q 358 970 358 996 q 348 925 358 944 q 322 894 338 906 q 284 876 305 882 q 238 870 262 870 q 192 876 213 870 q 154 894 170 882 q 129 925 139 906 q 120 970 120 944 "},"Σ":{"x_min":32,"x_max":824,"ha":882,"o":"m 602 169 q 657 179 634 169 q 696 206 680 189 q 720 248 711 224 q 732 301 729 272 l 737 343 l 824 343 l 817 0 l 32 0 l 32 86 l 318 479 l 63 937 l 63 992 l 756 992 l 763 735 l 676 735 l 670 808 q 637 881 665 855 q 547 907 610 907 l 281 907 l 474 558 l 474 537 l 200 169 l 602 169 "},"1":{"x_min":58.234375,"x_max":707.96875,"ha":777,"o":"m 134 0 l 134 73 l 248 73 q 279 78 266 73 q 301 92 292 82 q 313 120 309 103 q 318 164 318 137 l 318 860 q 268 801 291 827 q 223 755 244 774 q 180 726 201 736 q 138 716 159 716 q 107 723 121 716 q 81 743 92 730 q 64 776 71 757 q 58 818 58 795 q 102 831 79 823 q 151 851 125 839 q 207 882 177 864 q 271 925 237 900 l 369 997 l 524 997 l 524 164 q 527 125 524 142 q 538 96 530 108 q 560 79 546 85 q 596 73 574 73 l 707 73 l 707 0 l 134 0 "},"ϒ":{"x_min":0.296875,"x_max":1008.8125,"ha":1009,"o":"m 595 160 q 601 112 595 129 q 617 86 607 95 q 642 75 628 78 q 672 73 656 73 l 740 73 l 740 0 l 228 0 l 228 73 l 293 73 q 324 75 310 73 q 350 86 339 78 q 367 111 361 94 q 374 158 374 128 l 374 273 q 362 364 374 315 q 332 462 350 412 q 292 562 315 512 q 247 654 269 611 q 205 730 225 696 q 173 785 186 764 q 137 839 156 814 q 99 881 118 863 q 59 908 79 899 q 18 918 39 918 l 0 918 l 0 992 l 158 992 q 247 983 209 992 q 316 952 285 974 q 373 895 347 931 q 425 804 399 859 q 466 714 448 755 q 497 636 483 673 q 522 564 511 599 q 543 496 533 530 q 566 581 553 538 q 594 665 579 624 q 624 745 609 707 q 656 818 640 784 q 707 911 681 875 q 760 967 732 947 q 817 994 787 987 q 884 1002 848 1002 q 939 995 916 1002 q 978 975 963 987 q 1001 945 993 962 q 1008 909 1008 928 q 988 844 1008 869 q 929 812 968 819 q 908 860 924 840 q 863 880 892 880 q 827 873 844 880 q 792 847 810 865 q 755 796 774 828 q 715 717 736 765 q 692 662 705 694 q 666 595 679 631 q 640 519 652 559 q 617 440 627 479 q 601 364 607 401 q 595 295 595 327 l 595 160 "},"ℓ":{"x_min":27,"x_max":666,"ha":695,"o":"m 475 73 q 548 111 522 73 q 583 215 574 150 l 666 215 q 640 115 657 158 q 595 43 623 72 q 525 -1 566 13 q 425 -16 483 -16 q 305 1 354 -16 q 226 52 256 19 q 183 135 196 86 q 170 247 170 183 l 170 349 q 99 326 135 337 q 27 306 63 316 l 27 381 q 100 403 65 392 q 170 426 136 414 l 170 776 q 228 957 170 897 q 410 1018 287 1018 q 508 1003 466 1018 q 575 959 549 988 q 614 888 601 930 q 627 792 627 846 q 608 658 627 718 q 556 552 589 599 q 478 468 523 505 q 380 404 433 432 l 380 227 q 387 154 380 183 q 406 107 393 124 q 435 81 418 89 q 475 73 453 73 m 542 793 q 456 938 542 938 q 416 927 431 938 q 393 895 401 915 q 383 848 385 875 q 380 791 380 821 l 380 488 q 444 532 415 506 q 496 596 474 559 q 530 682 517 634 q 542 793 542 731 "},"ĉ":{"x_min":65,"x_max":681,"ha":732,"o":"m 409 -14 q 269 5 332 -14 q 160 70 206 25 q 90 189 115 116 q 65 369 65 262 q 91 557 65 481 q 163 677 117 632 q 271 742 208 723 q 405 762 333 762 q 524 750 472 762 q 610 719 575 739 q 663 673 645 700 q 681 616 681 646 q 673 572 681 593 q 645 534 665 551 q 590 508 625 518 q 501 498 555 498 q 496 566 501 534 q 482 623 492 599 q 454 662 472 648 q 410 677 437 677 q 356 662 380 677 q 314 612 332 648 q 288 518 297 577 q 279 370 279 459 q 317 159 279 229 q 444 89 356 89 q 511 98 480 89 q 569 121 543 106 q 614 157 594 137 q 645 202 633 178 q 670 174 662 192 q 679 138 679 157 q 663 85 679 112 q 614 35 647 57 q 531 0 581 13 q 409 -14 480 -14 m 154 860 q 192 905 170 879 q 236 958 214 931 q 277 1013 257 986 q 307 1064 296 1040 l 494 1064 q 524 1013 505 1040 q 565 958 543 986 q 609 905 587 931 q 647 860 630 879 l 647 842 l 551 842 q 517 869 537 853 q 476 901 497 884 q 435 935 455 918 q 400 966 415 952 q 364 935 384 952 q 323 901 344 918 q 283 869 303 884 q 250 842 264 853 l 154 842 l 154 860 "},"ī":{"x_min":21,"x_max":465.234375,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m 424 842 l 21 842 l 21 951 l 424 951 l 424 842 "},"О":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 340 22 428 -14 q 193 126 251 59 q 106 288 135 193 q 77 498 77 382 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 748 970 661 1007 q 894 867 835 934 q 985 706 954 800 q 1016 496 1016 612 m 310 496 q 323 319 310 397 q 364 187 336 241 q 437 104 392 133 q 547 76 482 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 q 770 674 782 596 q 729 806 757 752 q 657 888 702 860 q 548 916 612 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 "},"ξ":{"x_min":65,"x_max":673,"ha":701,"o":"m 279 290 q 292 219 279 245 q 330 175 305 192 q 395 146 356 157 q 485 123 433 135 q 571 96 536 111 q 629 61 607 81 q 662 14 652 41 q 673 -46 673 -11 q 657 -119 673 -82 q 607 -188 641 -156 q 521 -246 574 -220 q 394 -285 468 -271 l 394 -211 q 442 -192 423 -202 q 473 -168 462 -181 q 490 -139 485 -154 q 495 -107 495 -124 q 488 -71 495 -86 q 466 -46 482 -57 q 425 -28 451 -36 q 362 -12 400 -20 q 226 26 282 3 q 134 81 170 48 q 81 157 98 113 q 65 260 65 201 q 85 364 65 315 q 142 455 105 413 q 232 530 179 496 q 348 589 284 564 l 348 598 q 252 618 295 604 q 179 654 209 633 q 133 701 149 675 q 117 758 117 727 q 129 807 117 782 q 165 856 142 832 q 223 903 189 880 q 300 944 257 925 q 185 977 240 954 q 90 1030 129 1000 l 141 1100 q 190 1072 161 1086 q 254 1045 220 1057 q 324 1022 288 1032 q 394 1008 361 1013 q 427 1027 408 1017 q 470 1045 447 1036 q 518 1058 493 1053 q 570 1064 544 1064 q 612 1059 595 1064 q 639 1047 629 1055 q 653 1030 649 1040 q 658 1008 658 1019 q 612 941 658 965 q 467 916 567 916 q 435 917 451 916 q 399 919 418 918 q 364 888 380 905 q 336 852 348 872 q 318 811 325 833 q 311 763 311 789 q 321 722 311 740 q 346 689 330 703 q 382 664 361 674 q 423 646 402 653 q 454 659 436 652 q 492 670 472 665 q 534 678 512 675 q 576 682 555 682 q 629 667 612 682 q 647 629 647 652 q 642 600 647 614 q 623 575 636 587 q 590 557 610 564 q 540 551 569 551 q 507 552 524 551 q 475 554 490 553 q 447 556 459 555 q 429 559 436 557 q 373 520 400 547 q 325 458 346 494 q 291 378 304 422 q 279 290 279 335 "},"Ď":{"x_min":38.453125,"x_max":988,"ha":1065,"o":"m 988 514 q 956 305 988 400 q 863 143 925 211 q 709 37 801 75 q 496 0 617 0 l 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 496 992 q 703 961 611 992 q 857 871 794 931 q 954 721 920 811 q 988 514 988 632 m 753 514 q 680 810 753 713 q 466 907 607 907 l 387 907 l 387 86 l 464 86 q 590 115 536 86 q 680 200 644 145 q 735 335 716 256 q 753 514 753 414 m 262 1293 l 358 1293 q 391 1265 372 1281 q 431 1233 411 1250 q 472 1199 452 1215 q 508 1167 492 1182 q 543 1199 523 1182 q 584 1233 563 1215 q 625 1265 605 1250 q 659 1293 645 1281 l 755 1293 l 755 1274 q 717 1229 738 1255 q 673 1176 695 1203 q 632 1121 651 1148 q 602 1071 613 1094 l 415 1071 q 385 1121 404 1094 q 344 1176 365 1148 q 300 1229 322 1203 q 262 1274 278 1255 l 262 1293 "},"&":{"x_min":65,"x_max":1094.828125,"ha":1112,"o":"m 819 0 l 723 101 q 666 54 697 75 q 596 18 634 33 q 514 -5 558 3 q 417 -14 470 -14 q 266 6 332 -14 q 155 64 200 26 q 88 157 111 102 q 65 282 65 212 q 84 386 65 343 q 136 460 103 429 q 211 514 168 492 q 302 555 254 536 q 255 617 275 588 q 222 676 235 647 q 203 736 209 705 q 197 801 197 766 q 214 885 197 847 q 267 949 232 922 q 354 991 302 976 q 475 1006 406 1006 q 593 990 543 1006 q 675 947 642 974 q 725 884 708 920 q 742 808 742 848 q 729 732 742 766 q 690 669 716 698 q 624 615 663 641 q 530 565 584 590 q 540 555 533 560 l 737 348 q 748 443 745 396 q 751 530 751 490 l 751 591 l 1055 591 l 1055 517 l 1033 517 q 988 515 1010 517 q 947 502 966 512 q 913 474 928 492 q 890 423 899 455 q 865 341 879 385 q 829 253 850 297 l 968 108 q 1016 80 987 87 q 1081 73 1044 73 l 1094 73 l 1094 0 l 819 0 m 269 275 q 282 198 269 233 q 319 135 295 162 q 377 94 343 109 q 453 78 411 78 q 577 103 526 78 q 662 168 628 127 l 365 485 q 317 440 336 464 q 288 390 298 417 q 273 335 277 364 q 269 275 269 307 m 573 807 q 569 852 573 831 q 554 889 564 873 q 524 913 543 904 q 475 922 505 922 q 435 913 452 922 q 407 889 418 904 q 390 852 396 873 q 385 805 385 831 q 390 760 385 782 q 406 717 396 738 q 433 674 417 696 q 471 628 450 652 q 520 662 501 644 q 552 702 540 681 q 568 749 563 723 q 573 807 573 775 "},"G":{"x_min":77,"x_max":1029.375,"ha":1068,"o":"m 587 -14 q 362 22 458 -14 q 203 126 266 59 q 108 288 139 193 q 77 497 77 382 q 110 703 77 609 q 208 864 143 796 q 370 968 273 931 q 594 1006 467 1006 q 746 993 681 1006 q 854 959 811 980 q 920 908 898 937 q 941 844 941 878 q 930 798 941 820 q 895 761 918 777 q 839 735 872 744 q 762 726 806 726 q 751 803 762 768 q 720 864 741 839 q 666 903 699 889 q 590 917 634 917 q 461 889 514 917 q 374 807 407 861 q 325 675 340 754 q 310 497 310 597 q 326 318 310 396 q 377 188 342 241 q 469 107 413 135 q 608 80 526 80 q 659 82 634 80 q 709 89 685 84 l 709 293 q 684 371 709 349 q 610 392 659 392 l 592 392 l 592 466 l 1029 466 l 1029 392 l 1011 392 q 974 387 990 392 q 948 370 958 382 q 933 338 938 358 q 929 288 929 318 l 929 60 q 764 4 847 23 q 587 -14 682 -14 "},"ΰ":{"x_min":37.6875,"x_max":815,"ha":879,"o":"m 458 -14 q 315 7 376 -14 q 213 69 253 29 q 153 165 173 109 q 134 291 134 222 l 134 586 q 127 630 134 613 q 109 656 121 647 q 80 668 98 665 q 37 671 62 671 l 37 745 l 343 745 l 343 291 q 355 198 343 237 q 387 136 366 160 q 440 100 409 112 q 511 89 472 89 q 601 111 563 89 q 664 173 639 133 q 701 268 689 213 q 713 390 713 324 q 698 503 713 456 q 658 580 682 549 q 607 627 634 610 q 556 650 579 643 q 562 691 556 671 q 580 724 568 710 q 610 747 592 739 q 652 756 628 756 q 718 732 688 756 q 769 666 747 709 q 802 562 790 623 q 815 425 815 501 q 808 317 815 371 q 786 214 802 263 q 743 124 770 165 q 677 51 717 82 q 584 3 638 20 q 458 -14 530 -14 m 407 973 q 421 1019 413 994 q 437 1073 429 1045 q 451 1127 444 1100 q 461 1177 457 1153 l 623 1177 l 623 1162 q 598 1114 613 1141 q 564 1059 582 1087 q 527 1004 546 1031 q 490 955 508 977 l 407 955 l 407 973 m 219 955 q 225 995 219 978 q 243 1022 232 1011 q 269 1036 254 1032 q 300 1041 284 1041 q 331 1036 317 1041 q 358 1022 346 1032 q 376 995 369 1011 q 384 955 384 978 q 376 915 384 931 q 358 888 369 898 q 331 873 346 878 q 300 869 317 869 q 269 873 284 869 q 243 888 254 878 q 225 915 232 898 q 219 955 219 931 m 559 955 q 565 995 559 978 q 584 1022 572 1011 q 610 1036 595 1032 q 642 1041 625 1041 q 672 1036 658 1041 q 698 1022 687 1032 q 717 995 710 1011 q 724 955 724 978 q 717 915 724 931 q 698 888 710 898 q 672 873 687 878 q 642 869 658 869 q 610 873 625 869 q 584 888 595 878 q 565 915 572 898 q 559 955 559 931 "},"`":{"x_min":225,"x_max":578,"ha":802,"o":"m 483 842 q 411 889 451 860 q 334 946 371 917 q 267 1004 297 976 q 225 1049 237 1031 l 225 1064 l 442 1064 q 470 1013 453 1040 q 506 958 487 986 q 544 905 524 931 q 578 860 563 879 l 578 842 l 483 842 "},"ŏ":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 273 10 340 -14 q 160 82 207 34 q 89 203 114 130 q 65 374 65 277 q 156 666 65 570 q 427 762 248 762 q 577 738 511 762 q 690 666 643 714 q 761 545 736 618 q 786 374 786 472 m 280 374 q 288 244 280 300 q 313 150 296 188 q 358 92 330 112 q 426 73 386 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 q 563 505 571 449 q 538 598 555 561 q 492 654 520 635 q 425 673 465 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 m 423 842 q 327 861 368 842 q 258 911 286 880 q 216 981 230 942 q 201 1060 202 1020 l 292 1060 q 338 987 304 1009 q 423 965 371 965 q 508 987 474 965 q 553 1060 542 1009 l 646 1060 q 630 981 644 1020 q 588 911 616 942 q 519 861 560 880 q 423 842 478 842 "},"ý":{"x_min":-0.265625,"x_max":804.234375,"ha":804,"o":"m 804 745 l 804 671 q 767 666 783 671 q 738 649 751 661 q 714 618 725 637 q 693 569 703 599 q 642 428 668 500 q 588 284 615 356 q 535 140 562 212 q 483 0 508 69 q 437 -118 458 -67 q 391 -206 415 -169 q 338 -268 367 -243 q 270 -307 309 -292 q 180 -327 231 -321 q 60 -334 129 -334 l 37 -334 l 37 -253 q 160 -235 109 -253 q 246 -185 211 -217 q 304 -107 281 -152 q 344 -6 327 -61 l 94 604 q 75 635 85 624 q 53 653 65 647 q 28 661 42 659 q 0 662 15 662 l 0 745 l 395 745 l 395 671 q 331 660 355 671 q 308 619 308 650 q 313 592 308 607 q 321 565 317 576 q 347 502 334 536 q 373 433 360 468 q 397 367 385 399 q 417 311 408 335 q 434 263 427 284 q 445 224 441 242 q 452 192 450 207 q 456 164 455 178 q 462 195 458 178 q 471 228 466 212 q 480 257 475 244 q 487 275 485 270 l 579 547 q 584 563 581 554 q 588 582 586 572 q 591 600 590 591 q 592 615 592 609 q 566 659 592 647 q 491 671 539 671 l 491 745 l 804 745 m 314 860 q 347 905 328 879 q 384 958 365 931 q 420 1013 403 986 q 447 1064 436 1040 l 666 1064 l 666 1049 q 623 1004 653 1031 q 556 946 593 976 q 480 889 519 917 q 408 842 440 860 l 314 842 l 314 860 "},"º":{"x_min":49,"x_max":558,"ha":607,"o":"m 211 763 q 231 639 211 681 q 304 597 252 597 q 376 639 355 597 q 397 763 397 681 q 375 886 397 845 q 302 926 353 926 q 231 886 251 926 q 211 763 211 845 m 558 763 q 493 586 558 644 q 302 528 428 528 q 115 586 181 528 q 49 763 49 645 q 114 941 49 883 q 305 999 179 999 q 410 984 364 999 q 490 940 457 969 q 540 867 522 911 q 558 763 558 823 "},"∞":{"x_min":49,"x_max":933,"ha":982,"o":"m 933 401 q 917 299 933 347 q 873 215 901 251 q 805 157 845 178 q 718 136 766 136 q 593 176 653 136 q 482 306 532 216 q 383 182 439 224 q 266 141 328 141 q 179 159 219 141 q 110 212 139 178 q 64 295 80 246 q 49 406 49 345 q 64 510 49 461 q 108 594 80 558 q 177 650 137 629 q 266 671 217 671 q 329 661 298 671 q 391 632 361 652 q 449 581 421 612 q 499 505 476 550 q 596 626 542 586 q 719 666 649 666 q 806 647 766 666 q 873 594 845 628 q 917 511 901 559 q 933 401 933 462 m 712 574 q 623 531 663 574 q 544 401 584 489 q 620 272 580 315 q 714 229 660 229 q 767 243 743 229 q 808 280 791 256 q 835 335 825 304 q 844 403 844 367 q 834 470 844 439 q 807 524 825 501 q 766 560 790 547 q 712 574 742 574 m 269 233 q 357 275 316 233 q 437 405 398 317 q 360 535 401 492 q 266 578 320 578 q 214 564 237 578 q 174 527 190 550 q 148 472 157 503 q 139 404 139 440 q 147 339 139 370 q 171 285 154 308 q 211 247 187 261 q 269 233 236 233 "},"ź":{"x_min":25,"x_max":694,"ha":735,"o":"m 511 94 q 547 100 532 94 q 572 120 562 106 q 590 155 583 133 q 603 207 597 176 l 611 252 l 694 252 l 687 0 l 25 0 l 25 56 l 435 650 l 232 650 q 204 645 216 650 q 184 630 193 641 q 167 600 175 618 q 152 553 160 581 l 144 520 l 61 520 l 77 745 l 678 745 l 678 685 l 266 94 l 511 94 m 283 860 q 316 905 297 879 q 353 958 334 931 q 389 1013 372 986 q 416 1064 405 1040 l 635 1064 l 635 1049 q 592 1004 622 1031 q 525 946 562 976 q 449 889 488 917 q 377 842 409 860 l 283 842 l 283 860 "},"я":{"x_min":0,"x_max":828.296875,"ha":851,"o":"m 409 665 q 358 656 379 665 q 324 631 337 647 q 305 592 311 614 q 299 542 299 569 q 305 487 299 512 q 324 446 311 463 q 358 419 337 428 q 409 410 379 410 l 501 410 l 501 665 l 409 665 m 319 127 q 269 64 298 88 q 202 25 241 39 q 113 5 163 10 q 0 0 63 0 l 0 73 l 4 73 q 37 78 23 73 q 66 93 52 83 q 91 119 79 103 q 118 156 104 135 l 240 353 q 184 374 212 359 q 133 413 156 389 q 96 470 110 437 q 82 547 82 504 q 98 630 82 593 q 151 692 115 667 q 246 731 188 717 q 386 745 303 745 l 828 745 l 828 671 l 823 671 q 738 650 763 671 q 713 586 713 629 l 713 166 q 717 131 713 147 q 732 101 721 114 q 762 81 743 88 q 809 73 781 73 l 828 73 l 828 0 l 382 0 l 382 73 l 387 73 q 431 76 410 73 q 467 89 451 80 q 492 117 483 99 q 501 166 501 136 l 501 327 l 428 327 l 319 127 "},"Ё":{"x_min":38.453125,"x_max":863,"ha":907,"o":"m 388 84 l 666 84 q 702 92 687 84 q 728 114 717 100 q 745 148 739 128 q 755 190 752 167 l 766 256 l 863 256 l 852 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 809 992 l 815 736 l 718 736 l 711 801 q 685 880 705 852 q 622 907 665 907 l 388 907 l 388 560 l 718 560 l 718 476 l 388 476 l 388 84 m 242 1184 q 248 1224 242 1207 q 266 1251 255 1240 q 292 1265 277 1261 q 323 1270 307 1270 q 354 1265 340 1270 q 381 1251 369 1261 q 399 1224 392 1240 q 407 1184 407 1207 q 399 1144 407 1160 q 381 1117 392 1127 q 354 1102 369 1107 q 323 1098 340 1098 q 292 1102 307 1098 q 266 1117 277 1107 q 248 1144 255 1127 q 242 1184 242 1160 m 527 1184 q 533 1224 527 1207 q 552 1251 540 1240 q 578 1265 563 1261 q 610 1270 593 1270 q 640 1265 625 1270 q 666 1251 654 1261 q 684 1224 677 1240 q 692 1184 692 1207 q 684 1144 692 1160 q 666 1117 677 1127 q 640 1102 654 1107 q 610 1098 625 1098 q 578 1102 593 1098 q 552 1117 563 1107 q 533 1144 540 1127 q 527 1184 527 1160 "},"ń":{"x_min":27.78125,"x_max":889.65625,"ha":926,"o":"m 581 0 l 581 456 q 575 536 581 501 q 556 595 569 571 q 521 631 543 618 q 470 643 500 643 q 412 626 435 643 q 375 579 389 608 q 356 510 362 549 q 349 429 349 471 l 349 164 q 357 117 349 134 q 377 89 364 99 q 408 76 389 80 q 450 73 427 73 l 454 73 l 454 0 l 27 0 l 27 73 l 30 73 q 73 76 54 73 q 108 90 93 80 q 130 119 122 100 q 139 169 139 138 l 139 580 q 131 627 139 610 q 111 655 124 645 q 80 668 98 664 q 38 671 61 671 l 34 671 l 34 745 l 326 745 l 344 645 l 351 645 q 395 707 372 684 q 445 743 418 730 q 501 758 471 755 q 563 762 530 762 q 659 746 616 762 q 731 698 701 730 q 776 615 760 665 q 792 494 792 564 l 792 172 q 797 120 792 139 q 815 90 803 101 q 844 77 826 80 q 885 73 861 73 l 889 73 l 889 0 l 581 0 m 375 860 q 408 905 389 879 q 445 958 426 931 q 481 1013 464 986 q 508 1064 497 1040 l 727 1064 l 727 1049 q 684 1004 714 1031 q 617 946 654 976 q 541 889 580 917 q 469 842 501 860 l 375 842 l 375 860 "}," ":{"x_min":0,"x_max":0,"ha":347},"Г":{"x_min":38.453125,"x_max":807,"ha":821,"o":"m 797 992 l 807 720 l 729 720 l 712 786 q 666 877 697 846 q 579 907 635 907 l 388 907 l 388 158 q 394 114 388 130 q 409 88 399 97 q 432 76 418 79 q 459 73 445 73 l 545 73 l 545 0 l 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 797 992 "},"Ь":{"x_min":38.453125,"x_max":844,"ha":886,"o":"m 545 992 l 545 918 l 460 918 q 405 900 423 918 q 387 835 387 881 l 387 558 l 474 558 q 644 537 574 558 q 758 480 714 517 q 823 392 803 444 q 844 280 844 341 q 821 166 844 218 q 752 77 798 114 q 634 20 705 40 q 467 0 563 0 l 38 0 l 38 73 l 96 73 q 131 79 117 73 q 153 94 144 84 q 164 123 161 105 q 168 165 168 141 l 168 828 q 162 874 168 857 q 148 902 157 892 q 126 915 139 911 q 96 918 113 918 l 38 918 l 38 992 l 545 992 m 387 82 l 455 82 q 526 93 497 82 q 574 129 556 105 q 601 189 593 153 q 609 273 609 225 q 599 367 609 328 q 570 431 590 406 q 517 466 549 455 q 439 477 485 477 l 387 477 l 387 82 "},"¤":{"x_min":91.3125,"x_max":681.703125,"ha":777,"o":"m 132 494 q 143 571 132 534 q 176 638 154 608 l 92 722 l 162 791 l 245 707 q 310 738 275 727 q 385 750 346 750 q 459 738 424 750 q 525 706 495 727 l 611 792 l 681 722 l 596 636 q 629 569 617 605 q 641 494 641 534 q 630 419 641 454 q 599 353 619 384 l 681 271 l 611 202 l 529 284 q 462 251 498 263 q 385 240 425 240 q 309 251 346 240 q 242 283 272 262 l 162 202 l 91 273 l 171 353 q 132 494 132 415 m 226 494 q 238 431 226 461 q 272 380 251 402 q 323 346 294 358 q 385 333 352 333 q 449 346 420 333 q 500 380 478 358 q 533 431 521 402 q 545 494 545 461 q 533 558 545 528 q 500 609 521 587 q 449 644 478 632 q 385 657 420 657 q 323 644 352 657 q 272 609 294 632 q 238 558 251 587 q 226 494 226 528 "},"Ĝ":{"x_min":77,"x_max":1029.375,"ha":1068,"o":"m 587 -14 q 362 22 458 -14 q 203 126 266 59 q 108 288 139 193 q 77 497 77 382 q 110 703 77 609 q 208 864 143 796 q 370 968 273 931 q 594 1006 467 1006 q 746 993 681 1006 q 854 959 811 980 q 920 908 898 937 q 941 844 941 878 q 930 798 941 820 q 895 761 918 777 q 839 735 872 744 q 762 726 806 726 q 751 803 762 768 q 720 864 741 839 q 666 903 699 889 q 590 917 634 917 q 461 889 514 917 q 374 807 407 861 q 325 675 340 754 q 310 497 310 597 q 326 318 310 396 q 377 188 342 241 q 469 107 413 135 q 608 80 526 80 q 659 82 634 80 q 709 89 685 84 l 709 293 q 684 371 709 349 q 610 392 659 392 l 592 392 l 592 466 l 1029 466 l 1029 392 l 1011 392 q 974 387 990 392 q 948 370 958 382 q 933 338 938 358 q 929 288 929 318 l 929 60 q 764 4 847 23 q 587 -14 682 -14 m 323 1089 q 361 1134 339 1108 q 405 1187 383 1160 q 446 1242 426 1215 q 476 1293 465 1269 l 663 1293 q 693 1242 674 1269 q 734 1187 712 1215 q 778 1134 756 1160 q 816 1089 799 1108 l 816 1071 l 720 1071 q 686 1098 706 1082 q 645 1130 666 1113 q 604 1164 624 1147 q 569 1195 584 1181 q 533 1164 553 1181 q 492 1130 513 1147 q 452 1098 472 1113 q 419 1071 433 1082 l 323 1071 l 323 1089 "},"p":{"x_min":18.703125,"x_max":831,"ha":896,"o":"m 34 -260 q 67 -257 50 -260 q 99 -244 85 -253 q 124 -217 114 -234 q 134 -169 134 -199 l 134 574 q 126 624 134 605 q 107 654 119 643 q 77 667 94 664 q 40 671 60 671 l 30 671 l 30 745 l 302 745 l 327 635 l 334 635 q 368 685 348 663 q 415 724 388 707 q 473 749 441 740 q 546 758 506 758 q 668 735 615 758 q 757 664 721 712 q 812 543 793 616 q 831 369 831 470 q 812 196 831 269 q 758 75 794 123 q 671 5 723 28 q 551 -17 619 -17 q 422 13 472 -17 q 343 94 373 43 l 334 94 q 339 31 336 62 q 343 -23 341 5 q 344 -74 344 -52 l 344 -169 q 354 -217 344 -199 q 379 -244 364 -234 q 411 -257 393 -253 q 443 -260 428 -260 l 473 -260 l 473 -334 l 18 -334 l 18 -260 l 34 -260 m 486 86 q 586 156 556 86 q 616 368 616 226 q 586 580 616 506 q 487 654 556 654 q 418 635 446 654 q 374 580 391 616 q 351 491 358 544 q 344 369 344 437 q 351 244 344 297 q 374 155 358 191 q 418 103 391 120 q 486 86 445 86 "},"Ю":{"x_min":38.453125,"x_max":1468,"ha":1544,"o":"m 1468 496 q 1438 287 1468 382 q 1353 126 1409 193 q 1214 22 1297 59 q 1025 -14 1132 -14 q 834 20 916 -14 q 697 119 752 55 q 614 274 642 183 q 583 475 585 364 l 387 475 l 387 164 q 392 116 387 134 q 408 89 398 99 q 430 76 417 80 q 458 73 443 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 517 992 l 517 918 l 458 918 q 430 915 443 918 q 408 903 417 912 q 392 876 398 893 q 387 828 387 858 l 387 560 l 584 560 q 622 744 591 662 q 707 885 652 827 q 842 975 762 944 q 1027 1007 922 1007 q 1215 970 1133 1007 q 1353 867 1297 934 q 1438 706 1409 800 q 1468 496 1468 612 m 816 496 q 827 319 816 397 q 863 187 838 241 q 928 104 888 133 q 1025 76 968 76 q 1123 104 1083 76 q 1187 187 1162 133 q 1223 319 1212 241 q 1234 496 1234 397 q 1223 674 1234 596 q 1187 806 1212 752 q 1124 888 1163 860 q 1027 916 1084 916 q 929 888 970 916 q 864 806 889 860 q 827 674 838 752 q 816 496 816 596 "},"ο":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 273 10 340 -14 q 160 82 207 34 q 89 203 114 130 q 65 374 65 277 q 156 666 65 570 q 427 762 248 762 q 577 738 511 762 q 690 666 643 714 q 761 545 736 618 q 786 374 786 472 m 280 374 q 288 244 280 300 q 313 150 296 188 q 358 92 330 112 q 426 73 386 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 q 563 505 571 449 q 538 598 555 561 q 492 654 520 635 q 425 673 465 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 "},"S":{"x_min":41.203125,"x_max":745,"ha":814,"o":"m 366 -14 q 210 3 273 -14 q 110 49 148 21 q 57 111 73 76 q 41 179 41 146 q 54 240 41 215 q 89 280 67 264 q 139 302 111 295 q 198 309 168 309 q 212 204 198 249 q 252 129 227 159 q 312 83 277 99 q 388 68 347 68 q 461 80 429 68 q 515 112 493 91 q 549 160 538 132 q 561 219 561 187 q 546 282 561 254 q 503 333 532 309 q 431 377 474 356 q 329 423 387 399 q 206 485 256 453 q 126 553 156 516 q 82 632 95 590 q 69 726 69 675 q 94 841 69 790 q 166 930 120 893 q 273 986 211 966 q 409 1006 336 1006 q 542 993 486 1006 q 634 959 597 980 q 688 908 670 937 q 705 844 705 878 q 695 799 705 820 q 663 762 684 778 q 609 738 641 746 q 534 729 577 729 q 526 792 534 758 q 501 854 519 825 q 455 902 483 883 q 387 921 427 921 q 334 913 359 921 q 290 888 309 904 q 260 848 271 872 q 250 792 250 824 q 259 737 250 763 q 294 687 269 712 q 364 637 320 662 q 479 584 408 613 q 601 524 550 555 q 683 459 651 494 q 730 382 715 424 q 745 289 745 340 q 718 166 745 222 q 642 70 692 110 q 523 8 592 30 q 366 -14 453 -14 "},"/":{"x_min":0,"x_max":400,"ha":400,"o":"m 99 -170 l 0 -168 l 302 1055 l 400 1055 l 99 -170 "},"Ŧ":{"x_min":13,"x_max":893,"ha":907,"o":"m 563 531 l 763 531 l 763 457 l 563 457 l 563 164 q 568 116 563 134 q 584 89 574 99 q 606 76 593 80 q 634 73 619 73 l 692 73 l 692 0 l 213 0 l 213 73 l 271 73 q 300 76 287 73 q 322 89 313 80 q 337 116 332 99 q 343 164 343 134 l 343 457 l 142 457 l 142 531 l 343 531 l 343 907 l 231 907 q 179 900 200 907 q 144 881 158 893 q 125 850 131 868 q 116 809 118 832 l 106 723 l 13 723 l 20 992 l 886 992 l 893 723 l 800 723 l 789 809 q 780 850 787 832 q 761 881 774 868 q 726 900 747 893 q 674 907 705 907 l 563 907 l 563 531 "},"ђ":{"x_min":18.28125,"x_max":793,"ha":904,"o":"m 470 602 q 413 585 436 602 q 376 537 389 567 q 356 469 362 508 q 349 387 349 430 l 349 164 q 357 117 349 134 q 377 89 364 99 q 408 76 389 80 q 450 73 427 73 l 454 73 l 454 0 l 27 0 l 27 73 l 30 73 q 73 76 53 73 q 108 90 93 80 q 130 119 122 100 q 139 169 139 138 l 139 802 l 18 802 l 18 876 l 139 876 l 139 897 q 129 941 139 924 q 104 967 119 958 q 72 979 89 976 q 39 981 54 981 l 23 981 l 23 1055 l 349 1055 l 349 876 l 565 876 l 565 802 l 349 802 l 349 784 q 348 726 349 757 q 344 669 346 695 q 339 608 341 638 l 351 608 q 395 670 372 647 q 445 703 419 692 q 501 717 472 714 q 563 721 531 721 q 660 705 617 721 q 732 657 702 689 q 777 573 761 624 q 793 453 793 522 l 793 -11 q 768 -166 793 -104 q 700 -265 744 -228 q 596 -318 656 -302 q 464 -334 535 -334 l 437 -334 l 437 -247 l 445 -247 q 503 -235 478 -247 q 546 -194 529 -223 q 572 -118 563 -166 q 582 0 582 -71 l 582 415 q 576 494 582 459 q 557 553 570 529 q 522 590 544 577 q 470 602 501 602 "},"y":{"x_min":-0.265625,"x_max":804.234375,"ha":804,"o":"m 804 745 l 804 671 q 767 666 783 671 q 738 649 751 661 q 714 618 725 637 q 693 569 703 599 q 642 428 668 500 q 588 284 615 356 q 535 140 562 212 q 483 0 508 69 q 437 -118 458 -67 q 391 -206 415 -169 q 338 -268 367 -243 q 270 -307 309 -292 q 180 -327 231 -321 q 60 -334 129 -334 l 37 -334 l 37 -253 q 160 -235 109 -253 q 246 -185 211 -217 q 304 -107 281 -152 q 344 -6 327 -61 l 94 604 q 75 635 85 624 q 53 653 65 647 q 28 661 42 659 q 0 662 15 662 l 0 745 l 395 745 l 395 671 q 331 660 355 671 q 308 619 308 650 q 313 592 308 607 q 321 565 317 576 q 347 502 334 536 q 373 433 360 468 q 397 367 385 399 q 417 311 408 335 q 434 263 427 284 q 445 224 441 242 q 452 192 450 207 q 456 164 455 178 q 462 195 458 178 q 471 228 466 212 q 480 257 475 244 q 487 275 485 270 l 579 547 q 584 563 581 554 q 588 582 586 572 q 591 600 590 591 q 592 615 592 609 q 566 659 592 647 q 491 671 539 671 l 491 745 l 804 745 "},"Π":{"x_min":38.453125,"x_max":1084.875,"ha":1124,"o":"m 606 0 l 606 73 l 665 73 q 692 76 679 73 q 715 89 705 80 q 730 116 725 99 q 736 164 736 134 l 736 907 l 387 907 l 387 164 q 392 116 387 134 q 408 89 398 99 q 430 76 417 80 q 458 73 443 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 1084 992 l 1084 918 l 1026 918 q 999 915 1012 918 q 976 903 986 912 q 961 876 966 893 q 956 828 956 858 l 956 156 q 961 112 956 129 q 977 87 967 96 q 999 76 987 79 q 1026 73 1012 73 l 1084 73 l 1084 0 l 606 0 "},"‗":{"x_min":-7,"x_max":578,"ha":571,"o":"m 578 -115 l -7 -115 l -7 -33 l 578 -33 l 578 -115 m 578 -279 l -7 -279 l -7 -196 l 578 -196 l 578 -279 "},"–":{"x_min":-7,"x_max":701,"ha":695,"o":"m 701 323 l -7 323 l -7 423 l 701 423 l 701 323 "},"ë":{"x_min":65,"x_max":735,"ha":793,"o":"m 412 671 q 319 614 354 671 q 282 445 285 556 l 522 445 q 516 540 522 497 q 497 611 510 582 q 463 656 483 640 q 412 671 442 671 m 425 -14 q 269 11 337 -14 q 156 86 202 37 q 88 206 111 135 q 65 367 65 277 q 88 539 65 465 q 155 662 111 613 q 263 737 199 712 q 409 762 327 762 q 545 740 485 762 q 648 677 606 719 q 712 572 690 635 q 735 427 735 510 l 735 356 l 279 356 q 294 236 281 286 q 331 153 307 186 q 388 105 354 120 q 465 89 421 89 q 531 98 501 89 q 587 121 562 106 q 630 157 612 137 q 661 202 649 178 q 699 134 699 182 q 682 77 699 104 q 632 30 666 51 q 547 -1 598 10 q 425 -14 496 -14 m 191 955 q 197 995 191 978 q 215 1022 204 1011 q 241 1036 226 1032 q 272 1041 256 1041 q 303 1036 289 1041 q 330 1022 318 1032 q 348 995 341 1011 q 356 955 356 978 q 348 915 356 931 q 330 888 341 898 q 303 873 318 878 q 272 869 289 869 q 241 873 256 869 q 215 888 226 878 q 197 915 204 898 q 191 955 191 931 m 476 955 q 482 995 476 978 q 501 1022 489 1011 q 527 1036 512 1032 q 559 1041 542 1041 q 589 1036 574 1041 q 615 1022 603 1032 q 633 995 626 1011 q 641 955 641 978 q 633 915 641 931 q 615 888 626 898 q 589 873 603 878 q 559 869 574 869 q 527 873 542 869 q 501 888 512 878 q 482 915 489 898 q 476 955 476 931 "},"б":{"x_min":66,"x_max":786,"ha":851,"o":"m 66 442 q 72 592 66 521 q 93 725 78 663 q 135 837 108 786 q 203 925 162 887 q 302 986 245 963 q 438 1018 360 1010 q 534 1027 490 1023 q 612 1036 578 1031 q 669 1049 646 1041 q 701 1071 692 1057 l 766 1071 q 741 960 764 1001 q 677 896 719 919 q 573 862 635 873 q 431 840 512 851 q 333 828 374 835 q 263 807 291 820 q 215 774 234 794 q 186 726 196 755 q 170 658 175 697 q 162 567 165 618 l 167 567 q 203 627 179 599 q 259 675 226 654 q 335 708 292 696 q 431 720 378 720 q 697 627 608 720 q 786 354 786 535 q 763 196 786 265 q 697 81 741 127 q 583 10 652 34 q 422 -14 515 -14 q 155 97 245 -14 q 66 442 66 209 m 571 352 q 563 474 571 421 q 538 562 555 527 q 492 614 520 597 q 422 632 463 632 q 352 614 380 632 q 309 562 325 597 q 286 474 293 527 q 280 352 280 421 q 313 144 280 215 q 422 73 347 73 q 492 91 463 73 q 538 144 520 109 q 563 232 555 180 q 571 352 571 284 "},"ƒ":{"x_min":-118,"x_max":791,"ha":777,"o":"m 626 527 l 448 527 q 422 393 435 459 q 396 259 408 326 q 370 126 383 193 q 344 -9 357 58 q 295 -165 326 -103 q 222 -265 265 -228 q 126 -318 180 -302 q 8 -334 72 -334 q -59 -328 -25 -334 q -118 -315 -94 -323 l -96 -228 q -75 -234 -87 -231 q -49 -241 -63 -238 q -21 -245 -35 -243 q 5 -247 -7 -247 q 50 -235 31 -247 q 84 -194 69 -222 q 112 -120 99 -166 q 137 -8 124 -74 l 239 527 l 102 527 l 120 624 l 256 624 q 270 689 262 656 q 283 754 277 721 q 317 861 294 814 q 377 940 340 908 q 464 989 413 972 q 581 1006 515 1006 q 674 997 635 1006 q 739 973 713 989 q 778 938 765 958 q 791 894 791 918 q 783 850 791 871 q 757 814 776 829 q 708 790 739 799 q 631 782 677 782 q 617 887 631 849 q 574 926 603 926 q 545 916 557 926 q 525 886 534 906 q 508 835 515 866 q 492 763 500 805 l 466 624 l 643 624 l 626 527 "},"у":{"x_min":-0.265625,"x_max":804.234375,"ha":804,"o":"m 804 745 l 804 671 q 767 666 783 671 q 738 649 751 661 q 714 618 725 637 q 693 569 703 599 q 642 428 668 500 q 588 284 615 356 q 535 140 562 212 q 483 0 508 69 q 437 -118 458 -67 q 391 -206 415 -169 q 338 -268 367 -243 q 270 -307 309 -292 q 180 -327 231 -321 q 60 -334 129 -334 l 37 -334 l 37 -253 q 160 -235 109 -253 q 246 -185 211 -217 q 304 -107 281 -152 q 344 -6 327 -61 l 94 604 q 75 635 85 624 q 53 653 65 647 q 28 661 42 659 q 0 662 15 662 l 0 745 l 395 745 l 395 671 q 331 660 355 671 q 308 619 308 650 q 313 592 308 607 q 321 565 317 576 q 347 502 334 536 q 373 433 360 468 q 397 367 385 399 q 417 311 408 335 q 434 263 427 284 q 445 224 441 242 q 452 192 450 207 q 456 164 455 178 q 462 195 458 178 q 471 228 466 212 q 480 257 475 244 q 487 275 485 270 l 579 547 q 584 563 581 554 q 588 582 586 572 q 591 600 590 591 q 592 615 592 609 q 566 659 592 647 q 491 671 539 671 l 491 745 l 804 745 "},"J":{"x_min":-54.078125,"x_max":495.96875,"ha":511,"o":"m 495 918 l 437 918 q 409 915 422 918 q 386 903 396 912 q 371 876 377 893 q 365 828 365 858 l 365 -2 q 351 -114 365 -65 q 312 -200 337 -163 q 252 -263 287 -237 q 176 -304 217 -288 q 89 -326 135 -319 q -3 -334 43 -334 l -54 -334 l -54 -253 l -28 -253 q 35 -240 4 -253 q 91 -199 67 -228 q 131 -121 116 -169 q 146 -4 146 -74 l 146 833 q 140 878 146 861 q 125 903 135 895 q 102 915 115 912 q 75 918 89 918 l 17 918 l 17 992 l 495 992 l 495 918 "},"ŷ":{"x_min":-0.265625,"x_max":804.234375,"ha":804,"o":"m 804 745 l 804 671 q 767 666 783 671 q 738 649 751 661 q 714 618 725 637 q 693 569 703 599 q 642 428 668 500 q 588 284 615 356 q 535 140 562 212 q 483 0 508 69 q 437 -118 458 -67 q 391 -206 415 -169 q 338 -268 367 -243 q 270 -307 309 -292 q 180 -327 231 -321 q 60 -334 129 -334 l 37 -334 l 37 -253 q 160 -235 109 -253 q 246 -185 211 -217 q 304 -107 281 -152 q 344 -6 327 -61 l 94 604 q 75 635 85 624 q 53 653 65 647 q 28 661 42 659 q 0 662 15 662 l 0 745 l 395 745 l 395 671 q 331 660 355 671 q 308 619 308 650 q 313 592 308 607 q 321 565 317 576 q 347 502 334 536 q 373 433 360 468 q 397 367 385 399 q 417 311 408 335 q 434 263 427 284 q 445 224 441 242 q 452 192 450 207 q 456 164 455 178 q 462 195 458 178 q 471 228 466 212 q 480 257 475 244 q 487 275 485 270 l 579 547 q 584 563 581 554 q 588 582 586 572 q 591 600 590 591 q 592 615 592 609 q 566 659 592 647 q 491 671 539 671 l 491 745 l 804 745 m 163 860 q 201 905 179 879 q 245 958 223 931 q 286 1013 266 986 q 316 1064 305 1040 l 503 1064 q 533 1013 514 1040 q 574 958 552 986 q 618 905 596 931 q 656 860 639 879 l 656 842 l 560 842 q 526 869 546 853 q 485 901 506 884 q 444 935 464 918 q 409 966 424 952 q 373 935 393 952 q 332 901 353 918 q 292 869 312 884 q 259 842 273 853 l 163 842 l 163 860 "},"ŕ":{"x_min":27.78125,"x_max":705,"ha":726,"o":"m 491 0 l 27 0 l 27 73 l 31 73 q 75 77 55 73 q 109 91 94 80 q 131 121 123 101 q 139 173 139 141 l 139 576 q 131 625 139 607 q 111 654 124 644 q 80 668 98 664 q 38 671 61 671 l 34 671 l 34 745 l 315 745 l 343 636 l 349 636 q 379 690 363 667 q 418 729 396 714 q 472 753 441 745 q 545 761 503 761 q 666 732 627 761 q 705 648 705 703 q 658 549 705 584 q 528 514 612 514 q 525 564 528 542 q 514 600 522 586 q 493 621 507 614 q 460 629 480 629 q 418 617 436 629 q 389 585 401 605 q 369 541 377 566 q 357 492 361 517 q 351 445 352 468 q 349 406 349 423 l 349 166 q 357 117 349 136 q 377 89 364 99 q 408 76 390 80 q 446 73 426 73 l 491 73 l 491 0 m 250 860 q 283 905 264 879 q 320 958 301 931 q 356 1013 339 986 q 383 1064 372 1040 l 602 1064 l 602 1049 q 559 1004 589 1031 q 492 946 529 976 q 416 889 455 917 q 344 842 376 860 l 250 842 l 250 860 "},"ώ":{"x_min":65,"x_max":1046,"ha":1111,"o":"m 761 -14 q 686 -3 718 -14 q 630 25 654 6 q 587 71 605 44 q 554 133 569 99 q 521 71 539 99 q 479 25 503 44 q 423 -3 455 6 q 349 -14 392 -14 q 139 74 213 -14 q 65 341 65 163 q 78 465 65 407 q 118 577 92 524 q 180 678 144 630 q 262 770 216 725 l 360 706 q 323 630 339 669 q 297 548 307 592 q 283 453 288 504 q 279 338 279 402 q 289 223 279 271 q 317 146 300 175 q 356 103 334 116 q 398 89 377 89 q 466 120 439 89 q 503 220 493 151 q 486 278 493 253 q 474 326 478 304 q 467 369 469 348 q 465 412 465 390 q 488 499 465 473 q 555 526 511 526 q 622 499 599 526 q 645 412 645 473 q 643 369 645 390 q 636 327 640 349 q 624 280 631 306 q 607 222 617 254 q 644 121 617 152 q 712 89 672 89 q 755 103 734 89 q 794 146 776 116 q 821 223 811 175 q 832 338 832 271 q 827 453 832 402 q 813 548 822 504 q 787 630 803 592 q 750 706 772 669 l 848 770 q 930 678 894 725 q 992 577 967 630 q 1032 465 1018 524 q 1046 341 1046 407 q 972 74 1046 163 q 761 -14 898 -14 m 486 860 q 500 907 492 881 q 515 960 507 932 q 529 1014 522 987 q 539 1064 535 1041 l 729 1064 l 729 1050 q 702 1001 719 1028 q 666 947 686 974 q 624 892 646 919 q 582 842 602 865 l 486 842 l 486 860 "},"˘":{"x_min":178,"x_max":623,"ha":802,"o":"m 400 842 q 304 861 345 842 q 235 911 263 880 q 193 981 207 942 q 178 1060 179 1020 l 269 1060 q 315 987 281 1009 q 400 965 348 965 q 485 987 451 965 q 530 1060 519 1009 l 623 1060 q 607 981 621 1020 q 565 911 593 942 q 496 861 537 880 q 400 842 455 842 "},"D":{"x_min":38.453125,"x_max":988,"ha":1065,"o":"m 988 514 q 956 305 988 400 q 863 143 925 211 q 709 37 801 75 q 496 0 617 0 l 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 496 992 q 703 961 611 992 q 857 871 794 931 q 954 721 920 811 q 988 514 988 632 m 753 514 q 680 810 753 713 q 466 907 607 907 l 387 907 l 387 86 l 464 86 q 590 115 536 86 q 680 200 644 145 q 735 335 716 256 q 753 514 753 414 "},"ł":{"x_min":23.703125,"x_max":465.234375,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 366 l 37 310 l 37 404 l 139 462 l 139 896 q 129 941 139 924 q 104 967 119 958 q 72 979 89 976 q 39 981 54 981 l 23 981 l 23 1055 l 349 1055 l 349 582 l 461 645 l 461 548 l 349 485 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 "},"ĺ":{"x_min":23.703125,"x_max":506,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 897 q 129 941 139 924 q 104 967 119 958 q 72 979 89 976 q 39 981 54 981 l 23 981 l 23 1055 l 349 1055 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m 154 1128 q 187 1173 168 1147 q 224 1226 205 1199 q 260 1281 243 1254 q 287 1332 276 1308 l 506 1332 l 506 1317 q 463 1272 493 1299 q 396 1214 433 1244 q 320 1157 359 1185 q 248 1110 280 1128 l 154 1110 l 154 1128 "},"ц":{"x_min":23.703125,"x_max":925,"ha":953,"o":"m 908 745 l 908 671 l 892 671 q 859 668 877 671 q 827 655 841 664 q 802 628 812 645 q 793 580 793 610 l 793 152 q 801 112 793 128 q 823 89 809 97 q 855 77 837 80 q 893 73 873 74 l 925 73 l 925 -292 l 829 -292 l 821 -190 q 805 -102 818 -138 q 775 -43 793 -65 q 735 -10 757 -20 q 691 0 714 0 l 23 0 l 23 73 l 39 73 q 72 76 54 73 q 104 88 89 79 q 129 114 119 97 q 139 158 139 130 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 437 745 l 437 671 l 434 671 q 404 668 420 671 q 375 655 388 664 q 352 628 361 645 q 343 580 343 610 l 343 79 l 588 79 l 588 586 q 579 630 588 614 q 556 656 570 647 q 526 668 542 665 q 497 671 510 671 l 494 671 l 494 745 l 908 745 "},"Л":{"x_min":0,"x_max":971.546875,"ha":1010,"o":"m 492 0 l 492 73 l 551 73 q 579 76 565 73 q 601 89 592 80 q 617 116 611 99 q 622 164 622 134 l 622 918 l 441 918 q 429 736 437 831 q 408 546 420 640 q 379 364 395 451 q 343 209 363 277 q 299 103 324 145 q 247 36 275 61 q 184 0 218 11 q 111 -10 149 -10 q 30 16 61 -10 q 0 93 0 43 q 5 132 0 114 q 21 161 11 149 q 42 180 30 173 q 67 186 54 186 q 84 140 67 159 q 128 121 101 121 q 171 130 151 121 q 207 158 190 138 q 238 214 224 179 q 267 302 253 249 q 290 402 279 347 q 308 514 300 457 q 323 627 317 571 q 334 730 330 683 q 340 812 338 777 q 343 863 343 847 q 334 893 343 882 q 310 910 325 904 q 274 917 294 916 q 231 918 254 918 l 210 918 l 210 992 l 971 992 l 971 918 l 913 918 q 885 915 898 918 q 862 903 872 912 q 847 875 852 893 q 842 828 842 857 l 842 156 q 847 112 842 128 q 863 87 853 96 q 886 76 873 79 q 913 73 898 73 l 971 73 l 971 0 l 492 0 "},"$":{"x_min":67,"x_max":707,"ha":777,"o":"m 433 1055 l 433 950 q 539 936 494 948 q 613 906 584 925 q 657 863 643 887 q 671 811 671 839 q 633 738 671 767 q 518 710 595 710 q 513 754 518 730 q 498 800 508 778 q 472 840 488 822 q 433 868 456 858 l 433 597 q 448 591 437 595 q 467 583 460 586 q 577 531 531 558 q 651 474 622 505 q 693 406 680 443 q 707 326 707 370 q 688 228 707 273 q 634 148 669 183 q 548 92 599 114 q 433 62 497 70 l 433 -110 l 355 -110 l 355 60 q 220 80 275 62 q 131 126 165 98 q 81 188 96 154 q 67 254 67 222 q 78 306 67 285 q 107 340 89 327 q 149 359 126 353 q 197 365 172 365 q 209 272 197 313 q 241 203 220 232 q 290 156 261 174 q 355 133 319 139 l 355 433 l 331 443 q 220 498 264 470 q 148 557 175 525 q 109 625 121 588 q 98 706 98 662 q 116 798 98 757 q 169 871 135 840 q 250 922 203 902 q 355 949 298 942 l 355 1055 l 433 1055 m 542 264 q 514 339 542 308 q 433 398 487 370 l 433 136 q 513 182 485 148 q 542 264 542 217 m 260 765 q 264 729 260 746 q 279 697 268 712 q 308 665 290 681 q 355 635 327 650 l 355 875 q 287 840 314 867 q 260 765 260 812 "},"w":{"x_min":-4.40625,"x_max":1190.078125,"ha":1189,"o":"m 686 737 l 821 327 q 846 242 838 277 q 858 181 853 207 l 862 181 q 868 215 865 199 q 876 247 871 230 q 886 284 880 264 q 899 330 891 304 l 960 533 q 970 571 966 550 q 973 603 973 591 q 951 654 973 638 q 881 671 928 671 l 871 671 l 871 745 l 1190 745 l 1190 671 l 1172 671 q 1137 667 1152 671 q 1110 651 1122 662 q 1089 617 1099 639 q 1068 562 1078 596 l 888 0 l 739 0 l 587 461 l 427 0 l 276 0 l 98 597 q 81 633 90 619 q 61 656 72 648 q 34 667 49 664 q 0 671 20 671 l -4 671 l -4 745 l 402 745 l 402 671 l 384 671 q 321 659 342 671 q 300 612 300 647 q 304 584 300 601 q 312 553 308 568 l 363 372 q 376 320 370 347 q 388 269 382 294 q 398 221 393 244 q 405 181 402 199 l 409 181 q 425 253 415 216 q 454 341 436 290 l 595 737 l 686 737 "},"о":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 273 10 340 -14 q 160 82 207 34 q 89 203 114 130 q 65 374 65 277 q 156 666 65 570 q 427 762 248 762 q 577 738 511 762 q 690 666 643 714 q 761 545 736 618 q 786 374 786 472 m 280 374 q 288 244 280 300 q 313 150 296 188 q 358 92 330 112 q 426 73 386 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 q 563 505 571 449 q 538 598 555 561 q 492 654 520 635 q 425 673 465 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 "},"Д":{"x_min":11,"x_max":949,"ha":983,"o":"m 455 907 q 444 766 455 838 q 414 621 433 694 q 370 476 395 548 q 317 335 345 404 q 260 203 289 266 q 204 84 231 139 l 587 84 l 587 907 l 455 907 m 96 84 q 193 288 146 184 q 275 491 240 391 q 333 686 311 592 q 355 861 355 781 q 344 892 355 880 q 317 909 334 903 q 279 917 300 915 q 234 918 257 918 l 230 918 l 230 992 l 922 992 l 922 918 l 904 918 q 867 915 884 918 q 836 902 849 912 q 814 874 822 892 q 807 825 807 856 l 807 184 q 816 132 807 151 q 840 102 825 112 q 876 88 855 91 q 921 84 897 84 l 949 84 l 949 -292 l 857 -292 q 847 -159 857 -214 q 816 -68 837 -104 q 761 -16 795 -33 q 679 0 727 0 l 280 0 q 199 -16 232 0 q 144 -68 165 -33 q 113 -159 122 -104 q 103 -292 103 -214 l 11 -292 l 11 84 l 96 84 "},"Ç":{"x_min":77,"x_max":872,"ha":928,"o":"m 590 96 q 680 108 640 96 q 751 139 720 120 q 805 182 782 158 q 846 228 829 205 q 864 203 857 220 q 870 169 870 186 q 855 107 870 139 q 802 48 839 75 q 705 3 766 21 q 556 -14 645 -14 q 346 22 436 -14 q 196 126 255 59 q 106 288 136 193 q 77 497 77 382 q 107 703 77 609 q 197 864 138 796 q 347 968 257 931 q 555 1006 437 1006 q 694 993 635 1006 q 793 959 754 980 q 852 908 832 937 q 872 844 872 878 q 860 796 872 818 q 827 758 849 774 q 772 733 805 742 q 698 723 740 723 q 690 792 698 758 q 665 854 683 826 q 618 899 647 882 q 546 917 589 917 q 434 889 480 917 q 362 807 389 861 q 322 675 334 754 q 310 497 310 597 q 325 321 310 396 q 373 195 340 245 q 459 121 406 146 q 590 96 512 96 m 653 -175 q 638 -241 653 -211 q 598 -291 624 -270 q 536 -323 572 -312 q 456 -334 500 -334 q 429 -332 445 -334 q 397 -329 414 -331 q 364 -324 380 -327 q 335 -318 347 -321 l 335 -233 q 385 -241 360 -239 q 429 -244 410 -244 q 491 -230 469 -244 q 514 -180 514 -216 q 506 -147 514 -160 q 484 -126 499 -134 q 451 -115 470 -118 q 410 -110 432 -111 l 439 12 l 518 12 l 504 -47 q 565 -60 538 -50 q 612 -86 593 -70 q 642 -125 631 -102 q 653 -175 653 -148 "},"Ŝ":{"x_min":41.203125,"x_max":745,"ha":814,"o":"m 366 -14 q 210 3 273 -14 q 110 49 148 21 q 57 111 73 76 q 41 179 41 146 q 54 240 41 215 q 89 280 67 264 q 139 302 111 295 q 198 309 168 309 q 212 204 198 249 q 252 129 227 159 q 312 83 277 99 q 388 68 347 68 q 461 80 429 68 q 515 112 493 91 q 549 160 538 132 q 561 219 561 187 q 546 282 561 254 q 503 333 532 309 q 431 377 474 356 q 329 423 387 399 q 206 485 256 453 q 126 553 156 516 q 82 632 95 590 q 69 726 69 675 q 94 841 69 790 q 166 930 120 893 q 273 986 211 966 q 409 1006 336 1006 q 542 993 486 1006 q 634 959 597 980 q 688 908 670 937 q 705 844 705 878 q 695 799 705 820 q 663 762 684 778 q 609 738 641 746 q 534 729 577 729 q 526 792 534 758 q 501 854 519 825 q 455 902 483 883 q 387 921 427 921 q 334 913 359 921 q 290 888 309 904 q 260 848 271 872 q 250 792 250 824 q 259 737 250 763 q 294 687 269 712 q 364 637 320 662 q 479 584 408 613 q 601 524 550 555 q 683 459 651 494 q 730 382 715 424 q 745 289 745 340 q 718 166 745 222 q 642 70 692 110 q 523 8 592 30 q 366 -14 453 -14 m 167 1089 q 205 1134 183 1108 q 249 1187 227 1160 q 290 1242 270 1215 q 320 1293 309 1269 l 507 1293 q 537 1242 518 1269 q 578 1187 556 1215 q 622 1134 600 1160 q 660 1089 643 1108 l 660 1071 l 564 1071 q 530 1098 550 1082 q 489 1130 510 1113 q 448 1164 468 1147 q 413 1195 428 1181 q 377 1164 397 1181 q 336 1130 357 1147 q 296 1098 316 1113 q 263 1071 277 1082 l 167 1071 l 167 1089 "},"C":{"x_min":77,"x_max":872,"ha":928,"o":"m 590 96 q 680 108 640 96 q 751 139 720 120 q 805 182 782 158 q 846 228 829 205 q 864 203 857 220 q 870 169 870 186 q 855 107 870 139 q 802 48 839 75 q 705 3 766 21 q 556 -14 645 -14 q 346 22 436 -14 q 196 126 255 59 q 106 288 136 193 q 77 497 77 382 q 107 703 77 609 q 197 864 138 796 q 347 968 257 931 q 555 1006 437 1006 q 694 993 635 1006 q 793 959 754 980 q 852 908 832 937 q 872 844 872 878 q 860 796 872 818 q 827 758 849 774 q 772 733 805 742 q 698 723 740 723 q 690 792 698 758 q 665 854 683 826 q 618 899 647 882 q 546 917 589 917 q 434 889 480 917 q 362 807 389 861 q 322 675 334 754 q 310 497 310 597 q 325 321 310 396 q 373 195 340 245 q 459 121 406 146 q 590 96 512 96 "},"Ḁ":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 m 670 -236 q 657 -301 670 -273 q 621 -348 644 -329 q 568 -377 598 -367 q 503 -387 537 -387 q 437 -377 468 -387 q 384 -348 407 -367 q 348 -301 361 -329 q 336 -236 336 -273 q 348 -171 336 -199 q 384 -123 361 -142 q 437 -94 407 -104 q 503 -85 468 -85 q 568 -94 537 -85 q 621 -123 598 -104 q 657 -171 644 -142 q 670 -236 670 -199 m 585 -236 q 578 -201 585 -215 q 561 -178 572 -187 q 534 -165 549 -169 q 503 -161 519 -161 q 471 -165 486 -161 q 444 -178 456 -169 q 427 -201 433 -187 q 420 -236 420 -215 q 427 -270 420 -256 q 444 -293 433 -284 q 471 -306 456 -302 q 503 -311 486 -311 q 534 -306 519 -311 q 561 -293 549 -302 q 578 -270 572 -284 q 585 -236 585 -256 "},"Ĵ":{"x_min":-54.078125,"x_max":501,"ha":511,"o":"m 495 918 l 437 918 q 409 915 422 918 q 386 903 396 912 q 371 876 377 893 q 365 828 365 858 l 365 -2 q 351 -114 365 -65 q 312 -200 337 -163 q 252 -263 287 -237 q 176 -304 217 -288 q 89 -326 135 -319 q -3 -334 43 -334 l -54 -334 l -54 -253 l -28 -253 q 35 -240 4 -253 q 91 -199 67 -228 q 131 -121 116 -169 q 146 -4 146 -74 l 146 833 q 140 878 146 861 q 125 903 135 895 q 102 915 115 912 q 75 918 89 918 l 17 918 l 17 992 l 495 992 l 495 918 m 8 1089 q 46 1134 24 1108 q 90 1187 68 1160 q 131 1242 111 1215 q 161 1293 150 1269 l 348 1293 q 378 1242 359 1269 q 419 1187 397 1215 q 463 1134 441 1160 q 501 1089 484 1108 l 501 1071 l 405 1071 q 371 1098 391 1082 q 330 1130 351 1113 q 289 1164 309 1147 q 254 1195 269 1181 q 218 1164 238 1181 q 177 1130 198 1147 q 137 1098 157 1113 q 104 1071 118 1082 l 8 1071 l 8 1089 "},"È":{"x_min":38.453125,"x_max":863,"ha":907,"o":"m 388 84 l 666 84 q 702 92 687 84 q 728 114 717 100 q 745 148 739 128 q 755 190 752 167 l 766 256 l 863 256 l 852 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 809 992 l 815 736 l 718 736 l 711 801 q 685 880 705 852 q 622 907 665 907 l 388 907 l 388 560 l 718 560 l 718 476 l 388 476 l 388 84 m 467 1071 q 395 1118 435 1089 q 318 1175 355 1146 q 251 1233 281 1205 q 209 1278 221 1260 l 209 1293 l 426 1293 q 454 1242 437 1269 q 490 1187 471 1215 q 528 1134 508 1160 q 562 1089 547 1108 l 562 1071 l 467 1071 "},"fi":{"x_min":26.140625,"x_max":975.296875,"ha":999,"o":"m 550 73 q 582 76 564 73 q 614 89 599 80 q 638 116 628 99 q 648 164 648 134 l 648 650 l 366 650 l 366 164 q 376 116 366 134 q 400 89 386 99 q 432 76 415 80 q 464 73 450 73 l 502 73 l 502 0 l 26 0 l 26 73 l 56 73 q 88 76 71 73 q 120 89 106 80 q 145 116 135 99 q 155 164 155 134 l 155 650 l 31 650 l 31 745 l 155 745 l 155 753 q 177 886 155 828 q 245 985 199 945 q 362 1047 291 1026 q 530 1068 432 1068 q 676 1059 617 1068 q 770 1036 734 1051 q 822 997 806 1020 q 838 945 838 975 q 826 898 838 919 q 790 861 814 876 q 726 837 765 846 q 632 829 687 829 q 627 875 632 848 q 607 928 621 903 q 567 971 593 953 q 502 988 542 988 q 400 946 435 988 q 366 811 366 903 l 366 745 l 860 745 l 860 164 q 869 116 860 134 q 894 89 879 99 q 926 76 908 80 q 958 73 943 73 l 975 73 l 975 0 l 533 0 l 533 73 l 550 73 "},"X":{"x_min":13.71875,"x_max":1003.546875,"ha":1017,"o":"m 727 878 q 720 898 727 890 q 704 910 714 906 q 679 917 693 915 q 649 918 665 918 l 645 918 l 645 992 l 970 992 l 970 918 l 957 918 q 921 913 937 918 q 888 896 904 908 q 856 865 872 884 q 820 818 840 846 l 618 543 l 874 147 q 930 89 901 104 q 985 73 959 73 l 1003 73 l 1003 0 l 545 0 l 545 73 l 551 73 q 635 119 635 73 q 633 134 635 127 q 627 152 632 142 q 613 177 622 162 q 588 215 604 192 l 461 408 l 311 205 q 287 165 298 187 q 275 120 275 142 q 294 85 275 97 q 359 73 313 73 l 364 73 l 364 0 l 13 0 l 13 73 l 22 73 q 66 80 47 73 q 102 100 85 87 q 134 130 118 112 q 167 170 150 148 l 410 487 l 181 844 q 158 877 169 863 q 133 900 147 890 q 102 914 119 909 q 61 918 85 918 l 43 918 l 43 992 l 503 992 l 503 918 l 499 918 q 459 915 475 918 q 433 906 443 912 q 420 893 424 901 q 417 878 417 886 q 427 842 417 863 q 453 796 437 820 l 568 624 l 689 793 q 714 835 701 812 q 727 878 727 859 "},"ô":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 273 10 340 -14 q 160 82 207 34 q 89 203 114 130 q 65 374 65 277 q 156 666 65 570 q 427 762 248 762 q 577 738 511 762 q 690 666 643 714 q 761 545 736 618 q 786 374 786 472 m 280 374 q 288 244 280 300 q 313 150 296 188 q 358 92 330 112 q 426 73 386 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 q 563 505 571 449 q 538 598 555 561 q 492 654 520 635 q 425 673 465 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 m 178 860 q 216 905 194 879 q 260 958 238 931 q 301 1013 281 986 q 331 1064 320 1040 l 518 1064 q 548 1013 529 1040 q 589 958 567 986 q 633 905 611 931 q 671 860 654 879 l 671 842 l 575 842 q 541 869 561 853 q 500 901 521 884 q 459 935 479 918 q 424 966 439 952 q 388 935 408 952 q 347 901 368 918 q 307 869 327 884 q 274 842 288 853 l 178 842 l 178 860 "},"Ė":{"x_min":38.453125,"x_max":863,"ha":907,"o":"m 388 84 l 666 84 q 702 92 687 84 q 728 114 717 100 q 745 148 739 128 q 755 190 752 167 l 766 256 l 863 256 l 852 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 809 992 l 815 736 l 718 736 l 711 801 q 685 880 705 852 q 622 907 665 907 l 388 907 l 388 560 l 718 560 l 718 476 l 388 476 l 388 84 m 342 1179 q 351 1224 342 1205 q 376 1255 360 1243 q 413 1273 392 1267 q 460 1279 434 1279 q 505 1273 483 1279 q 543 1255 527 1267 q 569 1224 559 1243 q 579 1179 579 1205 q 569 1134 579 1153 q 543 1103 559 1115 q 505 1085 527 1091 q 460 1079 483 1079 q 413 1085 434 1079 q 376 1103 392 1091 q 351 1134 360 1115 q 342 1179 342 1153 "},"г":{"x_min":23.703125,"x_max":677,"ha":705,"o":"m 349 164 q 359 116 349 134 q 381 89 368 99 q 411 76 395 80 q 441 73 427 73 l 472 73 l 472 0 l 23 0 l 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 677 745 l 677 509 l 581 509 l 574 568 q 564 620 571 601 q 546 650 557 639 q 518 662 535 660 q 477 665 501 665 l 349 665 l 349 164 "},"Ŀ":{"x_min":38.453125,"x_max":863,"ha":908,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 432 915 445 918 q 409 903 418 912 q 394 878 399 895 q 388 833 388 861 l 388 84 l 647 84 q 723 115 696 84 q 762 205 750 146 l 785 310 l 863 310 l 852 0 l 38 0 m 513 515 q 522 560 513 541 q 547 591 531 579 q 584 609 563 603 q 631 615 605 615 q 676 609 654 615 q 714 591 698 603 q 740 560 730 579 q 750 515 750 541 q 740 470 750 489 q 714 439 730 451 q 676 421 698 427 q 631 415 654 415 q 584 421 605 415 q 547 439 563 427 q 522 470 531 451 q 513 515 513 489 "},"х":{"x_min":15.59375,"x_max":887.515625,"ha":897,"o":"m 604 629 q 584 662 604 654 q 532 671 565 671 l 528 671 l 528 745 l 849 745 l 849 671 l 837 671 q 801 667 816 671 q 769 653 785 663 q 736 626 753 643 q 696 582 719 609 l 553 407 l 757 147 q 816 90 789 107 q 869 73 843 73 l 887 73 l 887 0 l 445 0 l 445 73 l 452 73 q 536 119 536 73 q 534 135 536 127 q 526 154 532 143 q 510 180 521 165 q 483 215 500 194 l 404 311 l 307 190 q 286 156 294 173 q 278 120 278 138 q 297 85 278 97 q 364 73 317 73 l 368 73 l 368 0 l 15 0 l 15 73 l 27 73 q 71 78 52 73 q 107 92 90 82 q 141 120 124 103 q 179 162 158 137 l 353 373 l 179 597 q 120 652 149 634 q 59 671 91 671 l 41 671 l 41 745 l 478 745 l 478 671 l 473 671 q 434 668 449 671 q 410 659 419 664 q 398 646 401 654 q 394 631 394 639 q 402 602 394 616 q 426 567 409 588 l 503 472 l 569 551 q 594 591 585 572 q 604 629 604 610 "},"ŋ":{"x_min":27.78125,"x_max":792,"ha":922,"o":"m 436 -247 l 444 -247 q 502 -235 477 -247 q 545 -194 528 -223 q 571 -118 562 -166 q 581 0 581 -71 l 581 456 q 575 536 581 501 q 556 595 569 571 q 521 631 543 618 q 470 643 500 643 q 412 626 435 643 q 375 579 389 608 q 356 510 362 549 q 349 429 349 471 l 349 164 q 357 117 349 134 q 377 89 364 99 q 408 76 389 80 q 450 73 427 73 l 454 73 l 454 0 l 27 0 l 27 73 l 30 73 q 73 76 54 73 q 108 90 93 80 q 130 119 122 100 q 139 169 139 138 l 139 580 q 131 627 139 610 q 111 655 124 645 q 80 668 98 664 q 38 671 61 671 l 34 671 l 34 745 l 326 745 l 344 645 l 351 645 q 395 707 372 684 q 445 743 418 730 q 501 758 471 755 q 563 762 530 762 q 659 746 616 762 q 731 698 701 730 q 776 615 760 665 q 792 494 792 564 l 792 -10 q 767 -166 792 -104 q 699 -265 743 -228 q 595 -318 655 -302 q 463 -334 534 -334 l 436 -334 l 436 -247 "},"Ч":{"x_min":26.703125,"x_max":1043.875,"ha":1083,"o":"m 915 164 q 920 116 915 134 q 935 89 925 99 q 957 76 944 80 q 985 73 970 73 l 1043 73 l 1043 0 l 565 0 l 565 73 l 623 73 q 651 76 638 73 q 673 89 664 80 q 688 116 683 99 q 693 164 693 134 l 693 402 q 652 386 676 395 q 597 370 628 378 q 529 358 566 363 q 446 354 491 354 q 320 368 376 354 q 224 417 263 383 q 163 510 184 452 q 142 654 142 568 l 142 828 q 136 875 142 858 q 121 903 131 893 q 99 915 112 912 q 70 918 86 918 l 26 918 l 26 992 l 491 992 l 491 918 l 433 918 q 405 915 418 918 q 383 903 392 912 q 368 875 373 893 q 363 828 363 858 l 363 658 q 372 566 363 603 q 401 506 382 529 q 452 474 421 484 q 526 465 482 465 q 577 468 552 465 q 624 476 602 472 q 663 487 645 481 q 693 498 681 493 l 693 828 q 688 875 693 858 q 673 903 683 893 q 651 915 664 912 q 623 918 638 918 l 565 918 l 565 992 l 1043 992 l 1043 918 l 985 918 q 957 915 970 918 q 935 903 944 912 q 920 876 925 893 q 915 828 915 858 l 915 164 "},"ü":{"x_min":36.34375,"x_max":891.4375,"ha":926,"o":"m 614 0 l 584 97 l 577 97 q 532 39 556 61 q 479 6 507 17 q 421 -9 452 -5 q 358 -14 390 -14 q 191 53 249 -14 q 134 260 134 120 l 134 572 q 128 622 134 603 q 111 652 123 641 q 82 667 100 662 q 39 671 64 671 l 36 671 l 36 745 l 344 745 l 344 299 q 349 218 344 254 q 367 157 355 182 q 399 117 379 131 q 450 104 419 104 q 507 118 483 104 q 546 160 531 133 q 568 227 561 188 q 576 315 576 266 l 576 582 q 567 630 576 612 q 546 657 559 647 q 514 668 532 666 q 475 671 496 671 l 471 671 l 471 745 l 787 745 l 787 161 q 794 113 787 130 q 813 87 801 96 q 842 76 825 78 q 879 73 859 73 l 891 73 l 891 0 l 614 0 m 226 955 q 232 995 226 978 q 250 1022 239 1011 q 276 1036 261 1032 q 307 1041 291 1041 q 338 1036 324 1041 q 365 1022 353 1032 q 383 995 376 1011 q 391 955 391 978 q 383 915 391 931 q 365 888 376 898 q 338 873 353 878 q 307 869 324 869 q 276 873 291 869 q 250 888 261 878 q 232 915 239 898 q 226 955 226 931 m 511 955 q 517 995 511 978 q 536 1022 524 1011 q 562 1036 547 1032 q 594 1041 577 1041 q 624 1036 609 1041 q 650 1022 638 1032 q 668 995 661 1011 q 676 955 676 978 q 668 915 676 931 q 650 888 661 898 q 624 873 638 878 q 594 869 609 869 q 562 873 577 869 q 536 888 547 878 q 517 915 524 898 q 511 955 511 931 "},"ь":{"x_min":23.703125,"x_max":803,"ha":838,"o":"m 482 745 l 482 665 l 463 665 q 420 661 440 665 q 383 647 399 657 q 359 621 368 637 q 349 580 349 605 l 349 424 l 483 424 q 605 416 547 424 q 707 386 663 408 q 777 323 751 364 q 803 218 803 283 q 783 131 803 171 q 725 62 764 91 q 628 16 687 33 q 490 0 569 0 l 23 0 l 23 73 l 38 73 q 114 96 90 73 q 139 162 139 118 l 139 580 q 113 650 139 629 q 38 671 88 671 l 23 671 l 23 745 l 482 745 m 454 80 q 513 88 488 80 q 552 112 537 96 q 574 156 567 129 q 581 222 581 183 q 546 315 581 288 q 448 343 512 343 l 349 343 l 349 80 l 454 80 "},"Ÿ":{"x_min":0.34375,"x_max":962.5625,"ha":962,"o":"m 228 0 l 228 73 l 293 73 q 324 75 310 73 q 350 86 339 77 q 367 111 361 94 q 374 157 374 128 l 374 351 l 117 844 q 97 879 106 865 q 77 902 88 893 q 52 914 66 910 q 18 918 39 918 l 0 918 l 0 992 l 465 992 l 465 918 l 441 918 q 379 901 399 918 q 358 856 358 884 q 364 817 358 838 q 379 779 371 797 l 482 575 q 518 496 504 530 q 543 430 532 462 q 576 510 557 467 q 618 600 595 553 l 698 766 q 718 817 713 797 q 722 850 722 838 q 699 902 722 886 q 630 918 677 918 l 599 918 l 599 992 l 962 992 l 962 918 l 936 918 q 905 913 918 918 q 882 897 893 909 q 859 863 871 884 q 831 810 847 842 l 595 349 l 595 159 q 601 112 595 129 q 617 86 607 95 q 642 75 628 77 q 672 73 656 73 l 740 73 l 740 0 l 228 0 m 272 1184 q 278 1224 272 1207 q 296 1251 285 1240 q 322 1265 307 1261 q 353 1270 337 1270 q 384 1265 370 1270 q 411 1251 399 1261 q 429 1224 422 1240 q 437 1184 437 1207 q 429 1144 437 1160 q 411 1117 422 1127 q 384 1102 399 1107 q 353 1098 370 1098 q 322 1102 337 1098 q 296 1117 307 1107 q 278 1144 285 1127 q 272 1184 272 1160 m 557 1184 q 563 1224 557 1207 q 582 1251 570 1240 q 608 1265 593 1261 q 640 1270 623 1270 q 670 1265 655 1270 q 696 1251 684 1261 q 714 1224 707 1240 q 722 1184 722 1207 q 714 1144 722 1160 q 696 1117 707 1127 q 670 1102 684 1107 q 640 1098 655 1098 q 608 1102 623 1098 q 582 1117 593 1107 q 563 1144 570 1127 q 557 1184 557 1160 "},"€":{"x_min":37.0625,"x_max":753,"ha":777,"o":"m 500 -14 q 365 6 428 -14 q 252 72 302 27 q 167 190 202 118 q 119 368 133 263 l 37 368 l 37 454 l 111 454 l 111 496 l 111 539 l 37 539 l 37 626 l 117 626 q 163 806 130 734 q 247 922 197 878 q 359 984 296 966 q 490 1003 421 1003 q 600 990 552 1003 q 683 956 649 978 q 735 906 717 935 q 753 842 753 876 q 741 797 753 819 q 708 760 730 776 q 654 734 686 743 q 580 724 622 724 q 575 791 580 757 q 558 852 570 825 q 526 897 546 880 q 476 915 506 915 q 420 903 446 915 q 373 858 394 891 q 339 770 353 826 q 319 626 325 714 l 575 626 l 575 539 l 315 539 l 315 493 l 315 454 l 519 454 l 519 368 l 321 368 q 383 158 333 228 q 527 89 433 89 q 590 98 561 89 q 642 121 619 106 q 684 157 666 137 q 714 202 702 178 q 736 174 729 190 q 744 138 744 157 q 731 85 744 112 q 689 35 718 57 q 613 0 660 13 q 500 -14 567 -14 "},"в":{"x_min":23.703125,"x_max":803,"ha":863,"o":"m 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 461 745 q 690 699 616 745 q 765 567 765 654 q 752 494 765 525 q 719 441 740 463 q 668 407 697 419 q 602 390 638 394 l 602 383 q 679 368 642 379 q 742 335 715 356 q 786 282 770 314 q 803 206 803 251 q 785 123 803 161 q 730 57 767 84 q 637 15 693 30 q 502 0 580 0 l 23 0 l 23 73 m 448 79 q 509 85 484 79 q 550 106 534 91 q 574 148 566 122 q 581 216 581 175 q 572 277 581 253 q 545 316 563 301 q 501 337 527 331 q 441 343 475 343 l 349 343 l 349 79 l 448 79 m 556 551 q 551 600 556 578 q 531 636 545 621 q 496 658 518 650 q 442 665 474 665 l 349 665 l 349 424 l 442 424 q 531 457 505 424 q 556 551 556 491 "},"Η":{"x_min":38.453125,"x_max":1097.859375,"ha":1137,"o":"m 618 0 l 618 73 l 678 73 q 705 76 692 73 q 728 89 718 80 q 743 116 738 99 q 749 164 749 134 l 749 475 l 387 475 l 387 164 q 392 116 387 134 q 408 89 398 99 q 430 76 417 80 q 458 73 443 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 877 168 861 q 146 903 156 894 q 123 915 136 911 q 96 918 111 918 l 38 918 l 38 992 l 517 992 l 517 918 l 458 918 q 430 915 443 918 q 408 902 417 911 q 392 875 398 892 q 387 827 387 857 l 387 560 l 749 560 l 749 827 q 743 875 749 857 q 728 902 738 892 q 705 915 718 911 q 678 918 692 918 l 618 918 l 618 992 l 1097 992 l 1097 918 l 1039 918 q 1012 915 1025 918 q 989 902 999 911 q 974 875 979 892 q 969 827 969 857 l 969 156 q 974 112 969 129 q 990 87 980 96 q 1012 76 1000 79 q 1039 73 1025 73 l 1097 73 l 1097 0 l 618 0 "},"С":{"x_min":77,"x_max":872,"ha":928,"o":"m 590 96 q 680 108 640 96 q 751 139 720 120 q 805 182 782 158 q 846 228 829 205 q 864 203 857 220 q 870 169 870 186 q 855 107 870 139 q 802 48 839 75 q 705 3 766 21 q 556 -14 645 -14 q 346 22 436 -14 q 196 126 255 59 q 106 288 136 193 q 77 497 77 382 q 107 703 77 609 q 197 864 138 796 q 347 968 257 931 q 555 1006 437 1006 q 694 993 635 1006 q 793 959 754 980 q 852 908 832 937 q 872 844 872 878 q 860 796 872 818 q 827 758 849 774 q 772 733 805 742 q 698 723 740 723 q 690 792 698 758 q 665 854 683 826 q 618 899 647 882 q 546 917 589 917 q 434 889 480 917 q 362 807 389 861 q 322 675 334 754 q 310 497 310 597 q 325 321 310 396 q 373 195 340 245 q 459 121 406 146 q 590 96 512 96 "},"ß":{"x_min":8.109375,"x_max":925,"ha":981,"o":"m 139 758 q 166 905 139 845 q 243 1001 194 964 q 357 1054 291 1038 q 499 1070 423 1070 q 663 1044 596 1070 q 772 970 730 1019 q 834 849 815 921 q 854 682 853 776 l 776 682 q 713 678 742 682 q 661 663 683 674 q 626 634 639 652 q 613 588 613 616 q 622 546 613 564 q 649 511 630 527 q 696 479 667 495 q 768 444 726 463 q 841 398 811 423 q 890 343 871 372 q 916 283 908 314 q 925 219 925 252 q 906 116 925 160 q 852 43 887 72 q 767 0 817 14 q 651 -14 716 -14 q 532 -1 588 -14 q 430 36 475 11 l 430 205 l 505 205 q 521 152 509 177 q 551 108 533 127 q 593 78 569 89 q 645 67 617 67 q 719 91 692 67 q 747 161 747 116 q 740 206 747 185 q 718 246 734 227 q 675 283 702 265 q 606 320 648 301 q 522 371 556 344 q 468 430 488 399 q 440 495 448 461 q 432 565 432 529 q 448 648 432 614 q 495 707 465 683 q 566 743 525 730 q 657 758 608 755 q 645 866 656 822 q 615 939 635 911 q 567 979 596 966 q 503 992 539 992 q 439 980 468 992 q 390 944 410 968 q 359 883 370 920 q 348 796 348 846 l 348 0 l 8 0 l 8 73 l 67 73 q 95 76 82 73 q 118 89 108 80 q 133 116 128 99 q 139 164 139 134 l 139 648 l 27 648 l 27 745 l 139 745 l 139 758 "},"њ":{"x_min":23.703125,"x_max":1245,"ha":1280,"o":"m 952 745 l 952 665 l 934 665 q 890 661 911 665 q 854 647 869 657 q 829 621 838 637 q 820 580 820 605 l 820 424 l 925 424 q 1047 416 990 424 q 1149 386 1105 408 q 1219 324 1193 364 q 1245 218 1245 283 q 1226 131 1245 171 q 1168 62 1207 91 q 1070 16 1129 33 q 932 0 1011 0 l 514 0 l 514 73 l 517 73 q 616 158 616 73 l 616 343 l 343 343 l 343 164 q 352 116 343 134 q 375 89 361 99 q 404 76 388 80 q 434 73 420 73 l 437 73 l 437 0 l 23 0 l 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 437 745 l 437 671 l 434 671 q 404 668 420 671 q 375 655 388 664 q 352 628 361 646 q 343 580 343 610 l 343 423 l 616 423 l 616 586 q 589 651 616 631 q 516 671 563 671 l 514 671 l 514 745 l 952 745 m 896 80 q 955 88 931 80 q 994 112 979 96 q 1016 156 1009 129 q 1023 222 1023 183 q 989 316 1023 288 q 891 343 954 343 l 820 343 l 820 80 l 896 80 "},"Ű":{"x_min":22.78125,"x_max":1015.21875,"ha":1038,"o":"m 1015 918 l 955 918 q 928 915 941 918 q 905 903 915 912 q 890 875 895 893 q 885 828 885 858 l 885 286 q 865 160 885 216 q 802 66 845 104 q 694 6 760 27 q 537 -14 628 -14 q 375 3 447 -14 q 254 58 304 20 q 179 156 205 96 q 153 302 153 216 l 153 833 q 147 878 153 861 q 131 903 141 894 q 109 915 121 912 q 82 918 96 918 l 22 918 l 22 992 l 501 992 l 501 918 l 443 918 q 416 915 429 918 q 393 903 403 912 q 378 875 383 893 q 372 828 372 858 l 372 291 q 387 193 372 233 q 428 129 401 153 q 494 94 456 105 q 579 84 531 84 q 662 96 625 84 q 726 133 699 108 q 766 197 752 158 q 780 288 780 235 l 780 833 q 775 878 780 861 q 759 903 769 894 q 737 915 750 912 q 710 918 724 918 l 651 918 l 651 992 l 1015 992 l 1015 918 m 338 1071 l 338 1089 q 368 1137 352 1111 q 400 1190 384 1163 q 430 1243 416 1217 q 455 1293 445 1269 l 633 1293 l 633 1278 q 612 1250 625 1266 q 582 1214 599 1233 q 545 1175 565 1195 q 506 1136 526 1155 q 468 1100 487 1117 q 434 1071 449 1083 l 338 1071 m 602 1071 l 602 1089 q 632 1137 616 1111 q 664 1190 648 1163 q 694 1243 680 1217 q 719 1293 708 1269 l 896 1293 l 896 1278 q 875 1250 888 1266 q 845 1214 862 1233 q 809 1175 828 1195 q 770 1136 789 1155 q 731 1100 750 1117 q 697 1071 713 1083 l 602 1071 "},"c":{"x_min":65,"x_max":681,"ha":732,"o":"m 409 -14 q 269 5 332 -14 q 160 70 206 25 q 90 189 115 116 q 65 369 65 262 q 91 557 65 481 q 163 677 117 632 q 271 742 208 723 q 405 762 333 762 q 524 750 472 762 q 610 719 575 739 q 663 673 645 700 q 681 616 681 646 q 673 572 681 593 q 645 534 665 551 q 590 508 625 518 q 501 498 555 498 q 496 566 501 534 q 482 623 492 599 q 454 662 472 648 q 410 677 437 677 q 356 662 380 677 q 314 612 332 648 q 288 518 297 577 q 279 370 279 459 q 317 159 279 229 q 444 89 356 89 q 511 98 480 89 q 569 121 543 106 q 614 157 594 137 q 645 202 633 178 q 670 174 662 192 q 679 138 679 157 q 663 85 679 112 q 614 35 647 57 q 531 0 581 13 q 409 -14 480 -14 "},"¶":{"x_min":56,"x_max":815.5625,"ha":871,"o":"m 583 969 l 466 969 l 466 -154 l 234 -154 l 234 -80 l 253 -80 q 297 -77 276 -80 q 333 -64 318 -74 q 357 -33 348 -53 q 367 18 367 -14 l 367 536 l 268 536 q 166 558 207 536 q 101 617 125 580 q 66 704 77 655 q 56 808 56 753 q 67 909 56 863 q 104 987 79 954 q 171 1037 130 1019 q 270 1055 211 1055 l 815 1055 l 815 981 l 797 981 q 753 978 774 981 q 717 964 732 974 q 692 934 701 953 q 684 881 684 914 l 684 18 q 692 -33 684 -14 q 717 -64 701 -53 q 753 -77 732 -74 q 797 -80 774 -80 l 815 -80 l 815 -154 l 583 -154 l 583 969 "},"Ή":{"x_min":-52,"x_max":1267.859375,"ha":1307,"o":"m 788 0 l 788 73 l 848 73 q 875 76 862 73 q 898 89 888 80 q 913 116 908 99 q 919 164 919 134 l 919 475 l 557 475 l 557 164 q 562 116 557 134 q 578 89 568 99 q 600 76 587 80 q 628 73 613 73 l 687 73 l 687 0 l 208 0 l 208 73 l 266 73 q 294 76 281 73 q 317 89 307 80 q 332 116 327 99 q 338 164 338 134 l 338 833 q 332 877 338 861 q 316 903 326 894 q 293 915 306 911 q 266 918 281 918 l 208 918 l 208 992 l 687 992 l 687 918 l 628 918 q 600 915 613 918 q 578 902 587 911 q 562 875 568 892 q 557 827 557 857 l 557 560 l 919 560 l 919 827 q 913 875 919 857 q 898 902 908 892 q 875 915 888 911 q 848 918 862 918 l 788 918 l 788 992 l 1267 992 l 1267 918 l 1209 918 q 1182 915 1195 918 q 1159 902 1169 911 q 1144 875 1149 892 q 1139 827 1139 857 l 1139 156 q 1144 112 1139 129 q 1160 87 1150 96 q 1182 76 1170 79 q 1209 73 1195 73 l 1267 73 l 1267 0 l 788 0 m -52 788 q -37 835 -45 809 q -22 888 -30 861 q -8 943 -15 916 q 1 993 -2 969 l 191 993 l 191 978 q 164 930 181 957 q 128 875 148 903 q 86 820 108 847 q 44 770 64 793 l -52 770 l -52 788 "},"Ὅ":{"x_min":-289.125,"x_max":1040,"ha":1117,"o":"m 1040 496 q 1009 287 1040 382 q 918 126 978 193 q 771 22 858 59 q 571 -14 684 -14 q 364 22 452 -14 q 217 126 275 59 q 130 288 159 193 q 101 498 101 382 q 130 707 101 613 q 217 867 159 801 q 364 970 276 934 q 572 1007 453 1007 q 772 970 685 1007 q 918 867 859 934 q 1009 706 978 800 q 1040 496 1040 612 m 334 496 q 347 319 334 397 q 388 187 360 241 q 461 104 416 133 q 571 76 506 76 q 681 104 636 76 q 753 187 726 133 q 794 319 781 241 q 806 496 806 397 q 794 674 806 596 q 753 806 781 752 q 681 888 726 860 q 572 916 636 916 q 462 888 507 916 q 388 806 416 860 q 347 674 360 752 q 334 496 334 596 m -289 858 q -278 904 -289 881 q -243 947 -267 927 q -182 980 -219 966 q -90 1003 -144 995 l -90 952 q -163 925 -139 937 q -186 893 -186 912 q -174 874 -186 880 q -146 862 -161 868 q -118 848 -131 857 q -106 820 -106 839 q -127 780 -106 795 q -193 765 -148 765 q -230 770 -213 765 q -261 787 -248 775 q -281 816 -274 798 q -289 858 -289 834 m -41 787 q -26 834 -34 808 q -11 887 -18 859 q 2 941 -3 914 q 13 991 9 968 l 174 991 l 174 977 q 149 928 165 955 q 116 874 134 901 q 78 819 98 846 q 42 770 59 792 l -41 770 l -41 787 "},"γ":{"x_min":-42.34375,"x_max":735,"ha":798,"o":"m 150 758 q 242 721 203 758 q 315 608 281 684 q 381 414 348 532 q 453 133 413 296 q 519 231 489 176 q 569 343 548 286 q 601 455 590 400 q 612 553 612 510 q 594 624 612 596 q 539 661 576 651 q 564 732 539 707 q 629 758 589 758 q 682 746 661 758 q 714 715 702 734 q 730 672 726 696 q 735 623 735 648 q 723 518 735 573 q 692 406 711 462 q 646 295 672 350 q 591 192 620 241 q 530 103 561 143 q 470 35 499 63 q 471 15 471 26 q 472 -8 472 3 q 473 -31 472 -19 q 473 -50 473 -42 q 460 -168 473 -116 q 425 -258 448 -221 q 373 -314 403 -294 q 307 -334 342 -334 q 237 -306 259 -334 q 215 -234 215 -279 q 222 -171 215 -204 q 240 -107 229 -139 q 266 -44 251 -74 q 295 10 280 -14 q 229 261 261 144 q 165 463 196 377 q 103 599 134 550 q 40 649 72 649 q 11 644 26 649 q -15 631 -2 639 l -42 688 q -2 713 -24 701 q 44 735 19 725 q 96 751 69 745 q 150 758 123 758 "},"­":{"x_min":35,"x_max":396,"ha":431,"o":"m 35 306 l 35 452 l 396 452 l 396 306 l 35 306 "},":":{"x_min":97,"x_max":325,"ha":423,"o":"m 97 99 q 105 152 97 131 q 129 187 114 174 q 166 205 145 200 q 211 211 187 211 q 254 205 234 211 q 291 187 275 200 q 315 152 306 174 q 325 99 325 131 q 315 47 325 68 q 291 13 306 26 q 254 -5 275 0 q 211 -11 234 -11 q 166 -5 187 -11 q 129 13 145 0 q 105 47 114 26 q 97 99 97 68 m 97 646 q 105 699 97 677 q 129 733 114 720 q 166 751 145 746 q 211 757 187 757 q 254 751 234 757 q 291 733 275 746 q 315 699 306 720 q 325 646 325 677 q 315 593 325 614 q 291 559 306 572 q 254 540 275 546 q 211 535 234 535 q 166 540 187 535 q 129 559 145 546 q 105 593 114 572 q 97 646 97 614 "},"ś":{"x_min":41.765625,"x_max":623,"ha":678,"o":"m 321 -14 q 192 -1 245 -14 q 105 32 139 10 q 57 83 72 53 q 41 148 41 113 q 54 202 41 182 q 88 234 68 223 q 130 250 108 246 q 171 253 153 253 q 182 175 171 210 q 212 117 193 141 q 259 80 232 93 q 321 67 287 67 q 383 74 357 67 q 425 95 409 82 q 450 126 442 108 q 458 162 458 143 q 450 203 458 185 q 422 237 441 221 q 369 268 402 253 q 287 300 336 283 q 188 342 231 320 q 116 392 145 364 q 71 457 86 421 q 56 540 56 493 q 77 637 56 596 q 138 706 98 678 q 232 747 177 733 q 354 761 287 761 q 466 749 420 761 q 541 720 512 738 q 584 678 570 702 q 597 632 597 655 q 565 560 597 585 q 456 536 532 536 q 425 644 456 605 q 334 682 394 682 q 291 676 311 682 q 255 660 270 671 q 230 633 239 649 q 221 596 221 617 q 229 556 221 573 q 259 522 238 538 q 317 490 281 506 q 411 454 354 473 q 496 417 457 437 q 563 369 535 396 q 607 308 591 342 q 623 230 623 274 q 602 127 623 172 q 544 50 582 81 q 449 2 505 19 q 321 -14 393 -14 m 262 860 q 295 905 276 879 q 332 958 313 931 q 368 1013 351 986 q 395 1064 384 1040 l 614 1064 l 614 1049 q 571 1004 601 1031 q 504 946 541 976 q 428 889 467 917 q 356 842 388 860 l 262 842 l 262 860 "}," ":{"x_min":0,"x_max":0,"ha":361},"У":{"x_min":0,"x_max":964,"ha":964,"o":"m 964 918 l 937 918 q 903 914 917 918 q 877 897 889 909 q 855 863 866 884 q 832 810 845 842 l 629 287 q 585 184 606 228 q 542 107 565 139 q 491 54 518 75 q 428 21 464 33 q 347 4 393 9 q 241 0 301 0 l 155 0 l 155 80 l 216 80 q 287 87 251 80 q 354 106 322 93 q 409 138 385 119 q 444 183 432 157 l 116 844 q 97 879 106 865 q 77 902 88 893 q 52 914 66 910 q 18 918 38 918 l 0 918 l 0 992 l 476 992 l 476 918 l 426 918 q 370 905 390 918 q 351 861 351 892 q 357 823 351 842 q 375 782 364 804 l 480 558 q 505 506 492 533 q 528 452 517 479 q 548 398 540 424 q 562 348 557 371 q 581 407 571 377 q 607 476 592 437 l 708 754 q 727 813 721 788 q 734 850 734 838 q 712 902 734 886 q 643 918 689 918 l 614 918 l 614 992 l 964 992 l 964 918 "},"¾":{"x_min":54,"x_max":1139.84375,"ha":1167,"o":"m 324 854 q 309 920 324 897 q 259 943 295 943 q 223 933 237 943 q 200 906 208 923 q 187 868 191 890 q 184 822 184 846 q 134 824 156 822 q 96 834 111 827 q 71 852 80 840 q 63 881 63 863 q 76 930 63 907 q 114 969 89 953 q 176 996 139 986 q 262 1006 214 1006 q 348 996 310 1006 q 415 969 387 987 q 458 926 443 951 q 473 868 473 900 q 435 768 473 807 q 331 714 397 730 l 331 706 q 392 694 362 702 q 445 672 422 687 q 482 633 468 657 q 497 571 497 609 q 471 485 497 520 q 405 429 445 450 q 318 398 366 407 q 229 389 271 389 q 126 399 172 389 q 54 422 81 409 l 54 494 q 87 482 68 488 q 127 471 106 476 q 170 463 148 466 q 212 460 191 460 q 315 486 278 460 q 352 574 352 513 q 314 645 352 620 q 201 670 277 670 l 155 670 l 155 736 l 201 736 q 249 744 226 736 q 288 768 272 752 q 314 806 305 784 q 324 854 324 828 m 420 0 l 312 0 l 807 992 l 915 992 l 420 0 m 1032 163 l 1032 114 q 1036 86 1032 97 q 1049 70 1041 76 q 1068 63 1057 65 q 1090 62 1078 62 l 1118 62 l 1118 1 l 798 1 l 798 62 l 837 62 q 859 63 848 62 q 877 70 869 65 q 889 86 884 76 q 894 114 894 97 l 894 163 l 630 163 l 630 218 l 906 601 l 1032 601 l 1032 237 l 1139 237 l 1139 163 l 1032 163 m 894 403 q 896 446 894 425 q 901 493 897 468 q 889 471 895 482 q 880 454 883 459 l 721 237 l 894 237 l 894 403 "},"Ί":{"x_min":-52,"x_max":687.953125,"ha":726,"o":"m 208 0 l 208 73 l 266 73 q 295 76 282 73 q 317 89 308 80 q 332 116 327 99 q 338 164 338 134 l 338 827 q 332 875 338 857 q 317 902 327 892 q 295 915 308 911 q 266 918 282 918 l 208 918 l 208 992 l 687 992 l 687 918 l 629 918 q 601 915 614 918 q 578 902 588 911 q 563 875 569 892 q 558 827 558 857 l 558 164 q 563 116 558 134 q 578 89 569 99 q 601 76 588 80 q 629 73 614 73 l 687 73 l 687 0 l 208 0 m -52 788 q -37 835 -45 809 q -22 888 -30 861 q -8 943 -15 916 q 1 993 -2 969 l 191 993 l 191 978 q 164 930 181 957 q 128 875 148 903 q 86 820 108 847 q 44 770 64 793 l -52 770 l -52 788 "},"ʼn":{"x_min":21.96875,"x_max":1150.65625,"ha":1188,"o":"m 842 0 l 842 456 q 836 536 842 501 q 817 595 830 571 q 782 631 804 618 q 731 643 761 643 q 673 626 696 643 q 636 579 650 608 q 617 510 623 549 q 610 429 610 471 l 610 164 q 618 117 610 134 q 638 89 625 99 q 669 76 650 80 q 711 73 688 73 l 715 73 l 715 0 l 288 0 l 288 73 l 291 73 q 334 76 315 73 q 369 90 354 80 q 391 119 383 100 q 400 169 400 138 l 400 580 q 392 627 400 610 q 372 655 385 645 q 341 668 359 664 q 299 671 322 671 l 295 671 l 295 745 l 587 745 l 605 645 l 612 645 q 656 707 633 684 q 706 743 679 730 q 762 758 732 755 q 824 762 791 762 q 920 746 877 762 q 992 698 962 730 q 1037 615 1021 665 q 1053 494 1053 564 l 1053 172 q 1058 120 1053 139 q 1076 90 1064 101 q 1105 77 1087 80 q 1146 73 1122 73 l 1150 73 l 1150 0 l 842 0 m 271 839 q 257 753 271 795 q 214 676 243 712 q 136 613 184 641 q 21 567 89 585 l 21 638 q 75 660 52 649 q 113 684 98 671 q 136 711 128 696 q 144 747 144 727 q 136 769 144 761 q 118 784 129 777 q 93 800 106 792 q 69 820 80 807 q 50 850 57 832 q 43 896 43 868 q 71 967 43 943 q 142 992 100 992 q 236 951 201 992 q 271 839 271 910 "},"Ģ":{"x_min":77,"x_max":1029.375,"ha":1068,"o":"m 587 -14 q 362 22 458 -14 q 203 126 266 59 q 108 288 139 193 q 77 497 77 382 q 110 703 77 609 q 208 864 143 796 q 370 968 273 931 q 594 1006 467 1006 q 746 993 681 1006 q 854 959 811 980 q 920 908 898 937 q 941 844 941 878 q 930 798 941 820 q 895 761 918 777 q 839 735 872 744 q 762 726 806 726 q 751 803 762 768 q 720 864 741 839 q 666 903 699 889 q 590 917 634 917 q 461 889 514 917 q 374 807 407 861 q 325 675 340 754 q 310 497 310 597 q 326 318 310 396 q 377 188 342 241 q 469 107 413 135 q 608 80 526 80 q 659 82 634 80 q 709 89 685 84 l 709 293 q 684 371 709 349 q 610 392 659 392 l 592 392 l 592 466 l 1029 466 l 1029 392 l 1011 392 q 974 387 990 392 q 948 370 958 382 q 933 338 938 358 q 929 288 929 318 l 929 60 q 764 4 847 23 q 587 -14 682 -14 m 430 -289 q 444 -242 436 -268 q 460 -189 452 -216 q 474 -134 467 -161 q 484 -85 480 -108 l 646 -85 l 646 -98 q 621 -147 636 -120 q 587 -202 605 -174 q 550 -257 569 -230 q 513 -307 531 -285 l 430 -307 l 430 -289 "},"m":{"x_min":27.78125,"x_max":1332.984375,"ha":1369,"o":"m 582 0 l 582 456 q 576 536 582 501 q 557 595 570 571 q 522 631 544 618 q 470 643 501 643 q 413 626 436 643 q 376 579 389 608 q 356 510 362 549 q 349 429 349 471 l 349 164 q 357 117 349 134 q 377 89 364 99 q 408 76 389 80 q 450 73 427 73 l 454 73 l 454 0 l 27 0 l 27 73 l 30 73 q 73 76 54 73 q 108 90 93 80 q 130 119 122 100 q 139 169 139 138 l 139 584 q 131 631 139 614 q 111 659 124 649 q 80 672 98 669 q 38 675 61 675 l 34 675 l 34 745 l 326 745 l 344 645 l 351 645 q 395 707 372 684 q 445 743 419 730 q 501 758 472 755 q 563 762 531 762 q 694 734 640 762 q 773 645 748 707 l 786 645 q 831 707 807 684 q 884 743 856 730 q 943 758 912 755 q 1007 762 974 762 q 1103 746 1060 762 q 1175 698 1145 730 q 1220 615 1204 665 q 1236 494 1236 564 l 1236 172 q 1241 120 1236 139 q 1259 90 1247 101 q 1288 77 1270 80 q 1328 73 1305 73 l 1332 73 l 1332 0 l 1024 0 l 1024 456 q 999 595 1024 546 q 914 643 974 643 q 858 628 881 643 q 821 585 835 612 q 799 521 806 557 q 792 445 792 485 l 792 172 q 798 120 792 139 q 815 90 804 101 q 845 77 827 80 q 886 73 862 73 l 890 73 l 890 0 l 582 0 "},"Е":{"x_min":38.453125,"x_max":863,"ha":907,"o":"m 388 84 l 666 84 q 702 92 687 84 q 728 114 717 100 q 745 148 739 128 q 755 190 752 167 l 766 256 l 863 256 l 852 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 809 992 l 815 736 l 718 736 l 711 801 q 685 880 705 852 q 622 907 665 907 l 388 907 l 388 560 l 718 560 l 718 476 l 388 476 l 388 84 "},"ž":{"x_min":25,"x_max":694,"ha":735,"o":"m 511 94 q 547 100 532 94 q 572 120 562 106 q 590 155 583 133 q 603 207 597 176 l 611 252 l 694 252 l 687 0 l 25 0 l 25 56 l 435 650 l 232 650 q 204 645 216 650 q 184 630 193 641 q 167 600 175 618 q 152 553 160 581 l 144 520 l 61 520 l 77 745 l 678 745 l 678 685 l 266 94 l 511 94 m 142 1064 l 238 1064 q 271 1036 252 1052 q 311 1004 291 1021 q 352 970 332 986 q 388 938 372 953 q 423 970 403 953 q 464 1004 443 986 q 505 1036 485 1021 q 539 1064 525 1052 l 635 1064 l 635 1045 q 597 1000 618 1026 q 553 947 575 974 q 512 892 531 919 q 482 842 493 865 l 295 842 q 265 892 284 865 q 224 947 245 919 q 180 1000 202 974 q 142 1045 158 1026 l 142 1064 "},"á":{"x_min":62,"x_max":786.859375,"ha":832,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 265 487 224 l 487 369 l 424 365 q 354 352 383 363 q 309 321 326 341 q 285 273 292 301 q 277 206 277 244 m 401 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 534 749 479 762 q 625 709 588 736 q 679 636 661 681 q 698 526 698 591 l 698 172 q 702 124 698 143 q 716 94 706 105 q 742 78 725 83 q 781 73 758 73 l 786 73 l 786 0 l 528 0 l 499 95 l 487 95 q 443 46 464 67 q 400 12 423 26 q 348 -7 377 -1 q 280 -14 319 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 212 62 154 q 139 379 62 325 q 373 438 217 434 l 487 443 l 487 519 q 484 583 487 554 q 472 633 481 612 q 446 665 464 654 q 401 677 429 677 m 316 860 q 349 905 330 879 q 386 958 367 931 q 422 1013 405 986 q 449 1064 438 1040 l 668 1064 l 668 1049 q 625 1004 655 1031 q 558 946 595 976 q 482 889 521 917 q 410 842 442 860 l 316 842 l 316 860 "},"×":{"x_min":112.8125,"x_max":662.859375,"ha":777,"o":"m 387 427 l 183 222 l 112 293 l 316 498 l 112 702 l 183 772 l 387 568 l 591 773 l 662 702 l 457 497 l 662 291 l 593 222 l 387 427 "},"п":{"x_min":23.703125,"x_max":908.296875,"ha":932,"o":"m 908 73 l 908 0 l 487 0 l 487 73 l 490 73 q 520 76 504 73 q 550 89 536 80 q 572 116 563 99 q 582 164 582 134 l 582 665 l 349 665 l 349 164 q 359 116 349 134 q 381 89 368 99 q 411 76 395 80 q 441 73 427 73 l 444 73 l 444 0 l 23 0 l 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 908 745 l 908 671 l 892 671 q 859 668 877 671 q 827 656 842 665 q 802 630 812 647 q 793 586 793 614 l 793 164 q 802 116 793 134 q 827 89 812 99 q 859 76 841 80 q 892 73 877 73 l 908 73 "},"Ǻ":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 695 966 q 680 898 695 927 q 641 849 665 868 l 916 164 q 937 120 926 137 q 962 92 949 103 q 990 78 975 82 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 102 690 92 q 701 124 701 111 q 698 154 701 140 q 690 179 694 168 l 646 293 l 303 293 l 265 197 q 252 161 259 181 q 245 124 245 140 q 251 103 245 112 q 265 87 256 94 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 91 71 81 q 109 119 98 101 q 134 165 121 137 l 416 847 q 375 896 390 866 q 361 966 361 926 q 373 1032 361 1004 q 409 1079 386 1060 q 462 1109 432 1099 q 528 1119 493 1119 q 593 1109 562 1119 q 646 1079 623 1099 q 682 1032 669 1060 q 695 966 695 1004 m 539 575 q 524 620 532 596 q 508 670 516 645 q 493 722 500 696 q 481 769 486 747 q 467 726 475 750 q 449 677 458 702 q 431 627 440 652 q 414 580 422 602 l 336 378 l 610 378 l 539 575 m 434 1166 q 467 1203 448 1182 q 505 1246 486 1224 q 541 1290 524 1268 q 569 1331 558 1311 l 787 1331 l 787 1320 q 744 1283 774 1305 q 677 1236 714 1261 q 600 1190 640 1212 q 528 1153 560 1167 l 434 1153 l 434 1166 m 610 966 q 603 1001 610 987 q 586 1025 597 1015 q 559 1038 574 1034 q 528 1042 544 1042 q 496 1038 511 1042 q 470 1025 481 1034 q 452 1001 459 1015 q 445 966 445 987 q 467 911 445 928 q 521 892 489 893 l 534 892 q 588 911 566 893 q 610 966 610 928 "},"K":{"x_min":38.453125,"x_max":1019,"ha":1019,"o":"m 602 739 q 640 782 625 763 q 664 818 655 802 q 677 850 673 835 q 681 879 681 865 q 664 911 681 902 q 603 920 646 920 l 603 992 l 980 992 l 980 920 q 926 911 951 920 q 876 886 901 902 q 828 847 852 869 q 780 797 804 825 l 597 596 l 855 185 q 894 131 875 153 q 932 97 913 110 q 970 79 951 84 q 1013 73 990 73 l 1019 73 l 1019 0 l 944 0 q 851 3 891 0 q 781 13 811 6 q 729 30 751 20 q 691 55 707 41 q 661 87 675 69 q 635 127 648 105 l 448 447 l 387 398 l 387 164 q 392 116 387 134 q 408 89 398 99 q 431 76 417 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 903 417 912 q 392 876 398 893 q 387 828 387 858 l 387 504 l 602 739 "},"7":{"x_min":61,"x_max":731,"ha":777,"o":"m 228 0 l 599 840 l 233 840 q 176 822 195 840 q 152 770 156 804 l 144 700 l 61 700 l 67 992 l 731 992 l 731 924 l 346 0 l 228 0 "},"¨":{"x_min":175,"x_max":625,"ha":802,"o":"m 175 955 q 181 995 175 978 q 199 1022 188 1011 q 225 1036 210 1032 q 256 1041 240 1041 q 287 1036 273 1041 q 314 1022 302 1032 q 332 995 325 1011 q 340 955 340 978 q 332 915 340 931 q 314 888 325 898 q 287 873 302 878 q 256 869 273 869 q 225 873 240 869 q 199 888 210 878 q 181 915 188 898 q 175 955 175 931 m 460 955 q 466 995 460 978 q 485 1022 473 1011 q 511 1036 496 1032 q 543 1041 526 1041 q 573 1036 558 1041 q 599 1022 587 1032 q 617 995 610 1011 q 625 955 625 978 q 617 915 625 931 q 599 888 610 898 q 573 873 587 878 q 543 869 558 869 q 511 873 526 869 q 485 888 496 878 q 466 915 473 898 q 460 955 460 931 "},"Y":{"x_min":0.34375,"x_max":962.5625,"ha":962,"o":"m 228 0 l 228 73 l 293 73 q 324 75 310 73 q 350 86 339 77 q 367 111 361 94 q 374 157 374 128 l 374 351 l 117 844 q 97 879 106 865 q 77 902 88 893 q 52 914 66 910 q 18 918 39 918 l 0 918 l 0 992 l 465 992 l 465 918 l 441 918 q 379 901 399 918 q 358 856 358 884 q 364 817 358 838 q 379 779 371 797 l 482 575 q 518 496 504 530 q 543 430 532 462 q 576 510 557 467 q 618 600 595 553 l 698 766 q 718 817 713 797 q 722 850 722 838 q 699 902 722 886 q 630 918 677 918 l 599 918 l 599 992 l 962 992 l 962 918 l 936 918 q 905 913 918 918 q 882 897 893 909 q 859 863 871 884 q 831 810 847 842 l 595 349 l 595 159 q 601 112 595 129 q 617 86 607 95 q 642 75 628 77 q 672 73 656 73 l 740 73 l 740 0 l 228 0 "},"E":{"x_min":38.453125,"x_max":863,"ha":907,"o":"m 388 84 l 666 84 q 702 92 687 84 q 728 114 717 100 q 745 148 739 128 q 755 190 752 167 l 766 256 l 863 256 l 852 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 809 992 l 815 736 l 718 736 l 711 801 q 685 880 705 852 q 622 907 665 907 l 388 907 l 388 560 l 718 560 l 718 476 l 388 476 l 388 84 "},"Ô":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 340 22 428 -14 q 193 126 251 59 q 106 288 135 193 q 77 498 77 382 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 748 970 661 1007 q 894 867 835 934 q 985 706 954 800 q 1016 496 1016 612 m 310 496 q 323 319 310 397 q 364 187 336 241 q 437 104 392 133 q 547 76 482 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 q 770 674 782 596 q 729 806 757 752 q 657 888 702 860 q 548 916 612 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 m 299 1089 q 337 1134 315 1108 q 381 1187 359 1160 q 422 1242 402 1215 q 452 1293 441 1269 l 639 1293 q 669 1242 650 1269 q 710 1187 688 1215 q 754 1134 732 1160 q 792 1089 775 1108 l 792 1071 l 696 1071 q 662 1098 682 1082 q 621 1130 642 1113 q 580 1164 600 1147 q 545 1195 560 1181 q 509 1164 529 1181 q 468 1130 489 1147 q 428 1098 448 1113 q 395 1071 409 1082 l 299 1071 l 299 1089 "},"Є":{"x_min":77,"x_max":872,"ha":928,"o":"m 590 96 q 680 108 640 96 q 751 139 720 120 q 805 182 782 158 q 846 228 829 205 q 864 203 857 220 q 870 169 870 186 q 855 107 870 139 q 802 48 839 75 q 705 3 766 21 q 556 -14 645 -14 q 346 22 436 -14 q 196 126 255 59 q 106 288 136 193 q 77 497 77 382 q 107 703 77 609 q 197 864 138 796 q 347 968 257 931 q 555 1006 437 1006 q 694 993 635 1006 q 793 959 754 980 q 852 908 832 937 q 872 844 872 878 q 860 796 872 818 q 827 758 849 774 q 772 733 805 742 q 698 723 740 723 q 690 792 698 758 q 665 854 683 826 q 618 899 647 882 q 546 917 589 917 q 440 892 483 917 q 368 818 396 866 q 326 700 340 770 q 310 539 313 629 l 636 539 l 636 455 l 310 455 q 330 297 313 365 q 380 185 346 230 q 465 118 413 140 q 590 96 517 96 "},"Ï":{"x_min":38.453125,"x_max":517.953125,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 m 53 1184 q 59 1224 53 1207 q 77 1251 66 1240 q 103 1265 88 1261 q 134 1270 118 1270 q 165 1265 151 1270 q 192 1251 180 1261 q 210 1224 203 1240 q 218 1184 218 1207 q 210 1144 218 1160 q 192 1117 203 1127 q 165 1102 180 1107 q 134 1098 151 1098 q 103 1102 118 1098 q 77 1117 88 1107 q 59 1144 66 1127 q 53 1184 53 1160 m 338 1184 q 344 1224 338 1207 q 363 1251 351 1240 q 389 1265 374 1261 q 421 1270 404 1270 q 451 1265 436 1270 q 477 1251 465 1261 q 495 1224 488 1240 q 503 1184 503 1207 q 495 1144 503 1160 q 477 1117 488 1127 q 451 1102 465 1107 q 421 1098 436 1098 q 389 1102 404 1098 q 363 1117 374 1107 q 344 1144 351 1127 q 338 1184 338 1160 "},"ġ":{"x_min":3,"x_max":772,"ha":778,"o":"m 772 717 q 767 687 772 702 q 751 662 762 672 q 720 644 740 651 q 672 638 701 638 q 668 663 672 652 q 656 681 664 674 q 639 693 649 689 q 619 696 630 696 q 594 692 608 696 q 574 681 581 687 q 600 646 588 666 q 622 603 612 626 q 636 555 631 580 q 642 504 642 530 q 625 408 642 452 q 574 331 608 363 q 486 280 539 298 q 361 262 433 262 q 342 262 353 262 q 319 263 330 262 q 297 264 307 263 q 281 266 286 265 q 263 254 272 261 q 246 238 253 247 q 235 218 239 229 q 230 195 230 207 q 248 161 230 172 q 295 151 266 151 l 464 151 q 583 136 533 151 q 666 94 633 121 q 715 27 699 67 q 731 -61 731 -11 q 706 -176 731 -125 q 632 -261 682 -226 q 506 -315 582 -296 q 327 -334 431 -334 q 83 -284 163 -334 q 3 -140 3 -235 q 51 -26 3 -66 q 190 20 99 13 q 153 39 171 28 q 120 65 135 49 q 97 100 106 80 q 89 144 89 119 q 98 186 89 167 q 123 224 107 206 q 162 258 139 242 q 212 289 185 274 q 156 320 182 300 q 111 366 130 339 q 81 428 92 393 q 71 504 71 462 q 141 694 71 627 q 361 762 212 762 q 453 749 410 762 q 526 719 495 736 q 552 745 538 731 q 583 770 566 759 q 623 789 601 782 q 671 797 644 797 q 715 790 696 797 q 746 773 733 784 q 765 748 759 762 q 772 717 772 733 m 167 -137 q 208 -223 167 -195 q 330 -250 250 -250 q 508 -215 452 -250 q 564 -111 564 -180 q 536 -49 564 -67 q 452 -32 508 -32 l 290 -32 q 247 -35 269 -32 q 208 -51 226 -39 q 178 -83 190 -62 q 167 -137 167 -104 m 260 504 q 265 438 260 468 q 281 388 270 409 q 311 355 293 367 q 357 344 330 344 q 403 355 384 344 q 432 387 421 366 q 447 439 443 409 q 452 506 452 469 q 447 577 452 545 q 431 631 442 608 q 401 666 420 653 q 355 678 383 678 q 310 665 328 678 q 280 629 292 652 q 264 574 269 606 q 260 504 260 542 m 239 969 q 248 1014 239 995 q 273 1045 257 1033 q 310 1063 289 1057 q 357 1069 331 1069 q 402 1063 380 1069 q 440 1045 424 1057 q 466 1014 456 1033 q 476 969 476 995 q 466 924 476 943 q 440 893 456 905 q 402 875 424 881 q 357 869 380 869 q 310 875 331 869 q 273 893 289 881 q 248 924 257 905 q 239 969 239 943 "},"έ":{"x_min":52,"x_max":691,"ha":743,"o":"m 285 560 q 290 512 285 535 q 306 470 296 488 q 333 440 317 452 q 369 426 348 428 q 433 442 398 434 q 500 450 468 450 q 549 437 531 450 q 567 397 567 425 q 542 346 567 366 q 474 327 517 327 q 445 329 463 327 q 407 335 427 331 q 370 344 387 339 q 340 353 352 348 q 285 308 306 343 q 265 219 265 273 q 309 122 265 155 q 436 89 353 89 q 512 98 478 89 q 574 121 546 107 q 622 155 601 136 q 659 192 643 173 q 681 169 671 186 q 691 135 691 153 q 674 79 691 106 q 619 31 657 52 q 521 -1 582 11 q 374 -14 461 -14 q 232 3 292 -14 q 131 51 171 21 q 71 122 91 81 q 52 209 52 163 q 65 280 52 251 q 100 328 78 308 q 149 362 121 348 q 208 385 178 375 l 208 393 q 152 419 177 402 q 109 459 127 437 q 81 509 91 482 q 72 563 72 535 q 94 648 72 611 q 156 710 116 685 q 254 748 196 735 q 383 761 311 761 q 509 747 456 761 q 597 713 563 734 q 648 667 632 693 q 664 615 664 640 q 617 551 664 571 q 474 531 571 531 q 450 642 474 602 q 378 682 426 682 q 334 672 352 682 q 305 645 316 662 q 290 607 294 629 q 285 560 285 585 m 311 860 q 325 907 317 881 q 340 960 332 932 q 354 1014 347 987 q 364 1064 360 1041 l 554 1064 l 554 1050 q 527 1001 544 1028 q 491 947 511 974 q 449 892 471 919 q 407 842 427 865 l 311 842 l 311 860 "}," ":{"x_min":0,"x_max":0,"ha":463},"ϋ":{"x_min":37.6875,"x_max":815,"ha":879,"o":"m 458 -14 q 315 7 376 -14 q 213 69 253 29 q 153 165 173 109 q 134 291 134 222 l 134 586 q 127 630 134 613 q 109 656 121 647 q 80 668 98 665 q 37 671 62 671 l 37 745 l 343 745 l 343 291 q 355 198 343 237 q 387 136 366 160 q 440 100 409 112 q 511 89 472 89 q 601 111 563 89 q 664 173 639 133 q 701 268 689 213 q 713 390 713 324 q 698 503 713 456 q 658 580 682 549 q 607 627 634 610 q 556 650 579 643 q 562 691 556 671 q 580 724 568 710 q 610 747 592 739 q 652 756 628 756 q 718 732 688 756 q 769 666 747 709 q 802 562 790 623 q 815 425 815 501 q 808 317 815 371 q 786 214 802 263 q 743 124 770 165 q 677 51 717 82 q 584 3 638 20 q 458 -14 530 -14 m 240 955 q 246 995 240 978 q 264 1022 253 1011 q 290 1036 275 1032 q 321 1041 305 1041 q 352 1036 338 1041 q 379 1022 367 1032 q 397 995 390 1011 q 405 955 405 978 q 397 915 405 931 q 379 888 390 898 q 352 873 367 878 q 321 869 338 869 q 290 873 305 869 q 264 888 275 878 q 246 915 253 898 q 240 955 240 931 m 525 955 q 531 995 525 978 q 550 1022 538 1011 q 576 1036 561 1032 q 608 1041 591 1041 q 638 1036 623 1041 q 664 1022 652 1032 q 682 995 675 1011 q 690 955 690 978 q 682 915 690 931 q 664 888 675 898 q 638 873 652 878 q 608 869 623 869 q 576 873 591 869 q 550 888 561 878 q 531 915 538 898 q 525 955 525 931 "},"й":{"x_min":23.703125,"x_max":936.296875,"ha":960,"o":"m 821 164 q 830 116 821 134 q 855 89 840 99 q 887 76 869 80 q 920 73 905 73 l 936 73 l 936 0 l 515 0 l 515 73 l 518 73 q 548 76 532 73 q 578 89 564 80 q 600 116 591 99 q 610 164 610 134 l 610 462 l 349 177 l 349 164 q 359 116 349 134 q 381 89 368 99 q 411 76 395 80 q 441 73 427 73 l 444 73 l 444 0 l 23 0 l 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 444 745 l 444 671 l 441 671 q 411 668 427 671 q 381 655 395 664 q 359 628 368 645 q 349 580 349 610 l 349 284 l 610 569 l 610 580 q 600 628 610 610 q 578 655 591 645 q 548 668 564 664 q 518 671 532 671 l 515 671 l 515 745 l 936 745 l 936 671 l 920 671 q 887 668 905 671 q 855 655 869 664 q 830 628 840 645 q 821 580 821 610 l 821 164 m 479 918 q 571 952 539 918 q 611 1059 603 986 l 785 1059 q 767 977 780 1016 q 721 908 754 938 q 631 859 689 877 q 479 842 573 842 q 328 859 386 842 q 237 908 270 877 q 191 977 204 938 q 174 1059 178 1016 l 347 1059 q 387 952 355 986 q 479 918 420 918 "},"b":{"x_min":23.703125,"x_max":836,"ha":901,"o":"m 836 374 q 817 200 836 273 q 762 79 798 127 q 673 8 726 31 q 551 -14 620 -14 q 478 -5 511 -14 q 420 19 446 3 q 373 58 393 36 q 339 108 353 80 l 326 108 l 287 0 l 23 0 l 23 73 l 33 73 q 71 77 52 73 q 105 90 90 80 q 129 120 120 101 q 139 170 139 139 l 139 888 q 130 936 139 918 q 106 964 121 954 q 71 978 91 974 q 29 981 51 981 l 23 981 l 23 1055 l 349 1055 l 349 817 q 348 767 349 796 q 344 712 346 737 q 339 649 341 681 l 348 649 q 428 731 378 701 q 556 761 478 761 q 676 738 624 761 q 763 668 728 715 q 817 548 799 621 q 836 374 836 475 m 491 658 q 423 641 450 658 q 379 588 396 623 q 356 500 363 553 q 349 374 349 446 q 356 253 349 306 q 379 163 363 199 q 423 108 396 127 q 492 89 451 89 q 591 163 561 89 q 622 376 622 237 q 591 588 622 518 q 491 658 561 658 "},"ύ":{"x_min":37.6875,"x_max":815,"ha":879,"o":"m 458 -14 q 315 7 376 -14 q 213 69 253 29 q 153 165 173 109 q 134 291 134 222 l 134 586 q 127 630 134 613 q 109 656 121 647 q 80 668 98 665 q 37 671 62 671 l 37 745 l 343 745 l 343 291 q 355 198 343 237 q 387 136 366 160 q 440 100 409 112 q 511 89 472 89 q 601 111 563 89 q 664 173 639 133 q 701 268 689 213 q 713 390 713 324 q 698 503 713 456 q 658 580 682 549 q 607 627 634 610 q 556 650 579 643 q 562 691 556 671 q 580 724 568 710 q 610 747 592 739 q 652 756 628 756 q 718 732 688 756 q 769 666 747 709 q 802 562 790 623 q 815 425 815 501 q 808 317 815 371 q 786 214 802 263 q 743 124 770 165 q 677 51 717 82 q 584 3 638 20 q 458 -14 530 -14 m 397 860 q 411 907 403 881 q 426 960 418 932 q 440 1014 433 987 q 450 1064 446 1041 l 640 1064 l 640 1050 q 613 1001 630 1028 q 577 947 597 974 q 535 892 557 919 q 493 842 513 865 l 397 842 l 397 860 "},"fl":{"x_min":26.140625,"x_max":975.296875,"ha":999,"o":"m 550 73 q 582 76 564 73 q 614 89 599 80 q 638 116 628 99 q 648 164 648 134 l 648 817 q 638 867 647 838 q 611 923 629 897 q 567 969 594 950 q 502 988 540 988 q 400 946 435 988 q 366 811 366 903 l 366 745 l 540 745 l 540 650 l 366 650 l 366 164 q 376 116 366 134 q 400 89 386 99 q 432 76 415 80 q 464 73 450 73 l 488 73 l 488 0 l 26 0 l 26 73 l 56 73 q 88 76 71 73 q 120 89 106 80 q 145 116 135 99 q 155 164 155 134 l 155 650 l 31 650 l 31 745 l 155 745 l 155 753 q 177 886 155 828 q 245 985 199 945 q 361 1047 291 1026 q 530 1068 432 1068 q 611 1064 572 1068 q 682 1055 649 1061 l 860 1055 l 860 164 q 869 116 860 134 q 894 89 879 99 q 926 76 908 80 q 958 73 943 73 l 975 73 l 975 0 l 547 0 l 547 73 l 550 73 "},"ф":{"x_min":65,"x_max":1075,"ha":1140,"o":"m 373 -260 q 405 -257 388 -260 q 437 -245 423 -254 q 462 -218 452 -236 q 472 -171 472 -201 l 472 -7 q 303 25 379 -2 q 175 102 228 54 q 93 219 122 151 q 65 373 65 287 q 92 525 65 458 q 171 641 119 593 q 298 717 223 689 q 472 751 374 745 l 472 896 q 462 941 472 924 q 437 967 452 958 q 405 979 422 976 q 373 981 387 981 l 356 981 l 356 1055 l 672 1055 l 672 749 q 838 715 764 743 q 965 639 913 687 q 1046 524 1018 591 q 1075 373 1075 457 q 1047 219 1075 287 q 969 102 1020 151 q 842 25 917 54 q 672 -7 767 -2 l 672 -171 q 681 -218 672 -201 q 706 -245 691 -236 q 738 -257 720 -254 q 771 -260 756 -260 l 787 -260 l 787 -334 l 356 -334 l 356 -260 l 373 -260 m 273 373 q 321 169 273 245 q 472 80 370 94 l 472 660 q 321 575 369 647 q 273 373 273 502 m 866 373 q 818 573 866 499 q 672 660 770 647 l 672 81 q 819 170 771 95 q 866 373 866 245 "},"Ŋ":{"x_min":38.453125,"x_max":1070.859375,"ha":1095,"o":"m 271 765 l 271 164 q 277 116 271 134 q 292 89 283 99 q 315 76 302 80 q 342 73 328 73 l 401 73 l 401 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 347 992 l 837 328 l 837 833 q 831 878 837 861 q 816 903 826 895 q 793 915 806 912 q 766 918 780 918 l 708 918 l 708 992 l 1070 992 l 1070 918 l 1012 918 q 985 915 998 918 q 962 903 972 912 q 947 876 952 893 q 942 828 942 858 l 942 -10 q 925 -166 942 -104 q 879 -265 909 -228 q 806 -318 849 -302 q 711 -334 763 -334 l 665 -334 l 665 -253 l 698 -253 q 750 -239 725 -253 q 795 -196 775 -226 q 826 -122 814 -167 q 837 -12 837 -76 l 837 0 l 271 765 "},"Ũ":{"x_min":22.78125,"x_max":1015.21875,"ha":1038,"o":"m 1015 918 l 955 918 q 928 915 941 918 q 905 903 915 912 q 890 875 895 893 q 885 828 885 858 l 885 286 q 865 160 885 216 q 802 66 845 104 q 694 6 760 27 q 537 -14 628 -14 q 375 3 447 -14 q 254 58 304 20 q 179 156 205 96 q 153 302 153 216 l 153 833 q 147 878 153 861 q 131 903 141 894 q 109 915 121 912 q 82 918 96 918 l 22 918 l 22 992 l 501 992 l 501 918 l 443 918 q 416 915 429 918 q 393 903 403 912 q 378 875 383 893 q 372 828 372 858 l 372 291 q 387 193 372 233 q 428 129 401 153 q 494 94 456 105 q 579 84 531 84 q 662 96 625 84 q 726 133 699 108 q 766 197 752 158 q 780 288 780 235 l 780 833 q 775 878 780 861 q 759 903 769 894 q 737 915 750 912 q 710 918 724 918 l 651 918 l 651 992 l 1015 992 l 1015 918 m 671 1203 q 698 1209 686 1203 q 719 1225 710 1215 q 732 1249 727 1235 q 739 1276 737 1262 l 830 1276 q 814 1197 827 1234 q 778 1131 800 1159 q 724 1087 755 1103 q 656 1071 693 1071 q 588 1084 619 1071 q 532 1114 558 1098 q 483 1145 506 1131 q 438 1158 461 1158 q 411 1152 423 1158 q 390 1136 399 1146 q 377 1112 382 1126 q 370 1085 372 1099 l 280 1085 q 295 1164 282 1127 q 332 1230 309 1202 q 386 1274 355 1258 q 454 1291 417 1291 q 522 1277 492 1291 q 578 1247 552 1263 q 627 1216 604 1230 q 671 1203 650 1203 "},"Щ":{"x_min":38.453125,"x_max":1545.9375,"ha":1589,"o":"m 1413 84 l 1545 84 l 1545 -292 l 1454 -292 q 1445 -161 1454 -216 q 1415 -70 1436 -105 q 1363 -17 1395 -34 q 1286 0 1331 0 l 38 0 l 38 73 l 96 73 q 123 76 111 73 q 146 88 136 79 q 162 114 156 97 q 168 158 168 130 l 168 828 q 162 876 168 858 q 147 903 157 893 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 495 992 l 495 918 l 450 918 q 422 915 435 918 q 399 903 409 912 q 384 876 390 893 q 378 828 378 858 l 378 84 l 685 84 l 685 828 q 679 876 685 858 q 664 903 674 893 q 641 915 654 912 q 613 918 628 918 l 568 918 l 568 992 l 1011 992 l 1011 918 l 966 918 q 939 916 952 918 q 917 904 927 913 q 901 879 907 895 q 895 835 895 863 l 895 84 l 1202 84 l 1202 828 q 1196 876 1202 858 q 1181 903 1190 893 q 1158 915 1171 912 q 1130 918 1145 918 l 1084 918 l 1084 992 l 1541 992 l 1541 918 l 1483 918 q 1456 915 1469 918 q 1433 903 1443 912 q 1418 876 1423 893 q 1413 828 1413 858 l 1413 84 "},"L":{"x_min":38.453125,"x_max":863,"ha":908,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 432 915 445 918 q 409 903 418 912 q 394 878 399 895 q 388 833 388 861 l 388 84 l 647 84 q 723 115 696 84 q 762 205 750 146 l 785 310 l 863 310 l 852 0 l 38 0 "},"ď":{"x_min":64,"x_max":1053,"ha":901,"o":"m 761 170 q 770 120 761 139 q 795 90 779 101 q 832 77 811 80 q 876 73 853 73 l 881 73 l 881 0 l 612 0 l 573 108 l 560 108 q 525 57 545 79 q 479 18 505 34 q 420 -5 453 2 q 347 -14 388 -14 q 226 8 279 -14 q 137 78 173 31 q 82 198 101 125 q 64 370 64 271 q 82 544 64 471 q 137 666 101 618 q 225 737 173 714 q 344 761 277 761 q 415 752 383 761 q 472 729 447 744 q 517 694 497 714 q 551 649 537 674 l 560 649 q 555 722 558 688 q 553 751 554 736 q 551 779 552 766 q 550 802 550 792 q 550 819 550 813 l 550 895 q 540 941 550 924 q 516 967 531 958 q 480 979 501 976 q 437 981 460 981 l 426 981 l 426 1055 l 761 1055 l 761 170 m 407 89 q 475 107 448 89 q 519 159 503 124 q 543 248 536 194 q 550 373 550 301 q 543 495 550 442 q 519 584 536 548 q 475 639 503 621 q 407 658 448 658 q 347 639 372 658 q 307 584 323 621 q 285 494 292 547 q 278 372 278 441 q 307 160 278 230 q 407 89 337 89 m 838 850 q 852 897 844 871 q 867 950 859 923 q 881 1005 874 978 q 891 1055 887 1031 l 1053 1055 l 1053 1041 q 1028 992 1043 1019 q 994 938 1012 966 q 957 882 976 909 q 920 833 938 855 l 838 833 l 838 850 "},"Ο":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 340 22 428 -14 q 193 126 251 59 q 106 288 135 193 q 77 498 77 382 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 748 970 661 1007 q 894 867 835 934 q 985 706 954 800 q 1016 496 1016 612 m 310 496 q 323 319 310 397 q 364 187 336 241 q 437 104 392 133 q 547 76 482 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 q 770 674 782 596 q 729 806 757 752 q 657 888 702 860 q 548 916 612 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 "},"Ĭ":{"x_min":38.453125,"x_max":517.953125,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 m 277 1071 q 181 1090 222 1071 q 112 1140 140 1109 q 70 1210 84 1171 q 55 1289 56 1249 l 146 1289 q 192 1216 158 1238 q 277 1194 225 1194 q 362 1216 328 1194 q 407 1289 396 1238 l 500 1289 q 484 1210 498 1249 q 442 1140 470 1171 q 373 1090 414 1109 q 277 1071 332 1071 "},"ŧ":{"x_min":29.546875,"x_max":534,"ha":562,"o":"m 436 97 q 487 101 463 97 q 534 110 512 105 l 534 20 q 504 9 523 15 q 461 -2 485 2 q 405 -10 436 -7 q 337 -14 374 -14 q 253 -2 291 -14 q 188 34 215 8 q 148 102 162 60 q 134 205 134 144 l 134 390 l 37 390 l 37 464 l 134 464 l 134 650 l 29 650 l 29 721 q 109 738 74 721 q 165 779 144 756 q 229 917 208 824 l 343 917 l 343 745 l 521 745 l 521 650 l 343 650 l 343 464 l 499 464 l 499 390 l 343 390 l 343 219 q 365 127 343 156 q 436 97 387 97 "},"À":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 m 514 1071 q 442 1118 482 1089 q 365 1175 402 1146 q 298 1233 328 1205 q 256 1278 268 1260 l 256 1293 l 473 1293 q 501 1242 484 1269 q 537 1187 518 1215 q 575 1134 555 1160 q 609 1089 594 1108 l 609 1071 l 514 1071 "},"Ϊ":{"x_min":38.453125,"x_max":517.953125,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 m 53 1184 q 59 1224 53 1207 q 77 1251 66 1240 q 103 1265 88 1261 q 134 1270 118 1270 q 165 1265 151 1270 q 192 1251 180 1261 q 210 1224 203 1240 q 218 1184 218 1207 q 210 1144 218 1160 q 192 1117 203 1127 q 165 1102 180 1107 q 134 1098 151 1098 q 103 1102 118 1098 q 77 1117 88 1107 q 59 1144 66 1127 q 53 1184 53 1160 m 338 1184 q 344 1224 338 1207 q 363 1251 351 1240 q 389 1265 374 1261 q 421 1270 404 1270 q 451 1265 436 1270 q 477 1251 465 1261 q 495 1224 488 1240 q 503 1184 503 1207 q 495 1144 503 1160 q 477 1117 488 1127 q 451 1102 465 1107 q 421 1098 436 1098 q 389 1102 404 1098 q 363 1117 374 1107 q 344 1144 351 1127 q 338 1184 338 1160 "},"ḁ":{"x_min":62,"x_max":786.859375,"ha":832,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 265 487 224 l 487 369 l 424 365 q 354 352 383 363 q 309 321 326 341 q 285 273 292 301 q 277 206 277 244 m 401 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 534 749 479 762 q 625 709 588 736 q 679 636 661 681 q 698 526 698 591 l 698 172 q 702 124 698 143 q 716 94 706 105 q 742 78 725 83 q 781 73 758 73 l 786 73 l 786 0 l 528 0 l 499 95 l 487 95 q 443 46 464 67 q 400 12 423 26 q 348 -7 377 -1 q 280 -14 319 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 212 62 154 q 139 379 62 325 q 373 438 217 434 l 487 443 l 487 519 q 484 583 487 554 q 472 633 481 612 q 446 665 464 654 q 401 677 429 677 m 571 -236 q 558 -301 571 -273 q 522 -348 545 -329 q 469 -377 499 -367 q 404 -387 438 -387 q 338 -377 369 -387 q 285 -348 308 -367 q 249 -301 262 -329 q 237 -236 237 -273 q 249 -171 237 -199 q 285 -123 262 -142 q 338 -94 308 -104 q 404 -85 369 -85 q 469 -94 438 -85 q 522 -123 499 -104 q 558 -171 545 -142 q 571 -236 571 -199 m 486 -236 q 479 -201 486 -215 q 462 -178 473 -187 q 435 -165 450 -169 q 404 -161 420 -161 q 372 -165 387 -161 q 345 -178 357 -169 q 328 -201 334 -187 q 321 -236 321 -215 q 328 -270 321 -256 q 345 -293 334 -284 q 372 -306 357 -302 q 404 -311 387 -311 q 435 -306 420 -311 q 462 -293 450 -302 q 479 -270 473 -284 q 486 -236 486 -256 "},"½":{"x_min":7.015625,"x_max":1129,"ha":1167,"o":"m 300 999 l 300 512 q 305 484 300 495 q 319 468 310 474 q 339 461 327 463 q 364 460 351 460 l 421 460 l 421 399 l 29 399 l 29 460 l 99 460 q 124 461 113 460 q 144 468 135 463 q 158 484 153 474 q 163 512 163 495 l 163 906 q 105 844 130 868 q 54 821 79 821 q 20 840 34 821 q 7 889 7 860 q 62 909 32 895 q 135 952 93 923 l 197 999 l 300 999 m 364 0 l 256 0 l 751 992 l 859 992 l 364 0 m 1104 460 q 1095 402 1104 429 q 1064 345 1087 375 q 1003 280 1042 315 q 904 197 964 245 l 791 107 l 1012 107 q 1054 121 1042 107 q 1070 153 1066 134 l 1077 191 l 1129 191 l 1123 0 l 683 0 l 683 99 l 835 228 q 894 286 870 257 q 931 341 917 314 q 950 395 944 368 q 955 451 955 423 q 940 521 955 496 q 890 546 926 546 q 853 534 867 546 q 831 501 838 521 q 821 457 823 482 q 818 408 818 432 q 773 413 795 408 q 733 428 750 418 q 704 454 715 438 q 693 492 693 469 q 706 538 693 517 q 744 575 719 560 q 806 600 769 591 q 890 609 843 609 q 987 598 946 609 q 1053 568 1027 587 q 1091 521 1079 549 q 1104 460 1104 494 "},"'":{"x_min":93,"x_max":310.03125,"ha":403,"o":"m 93 992 l 310 992 l 247 610 l 155 610 l 93 992 "},"ij":{"x_min":23.703125,"x_max":847.078125,"ha":968,"o":"m 119 970 q 128 1015 119 996 q 153 1046 137 1034 q 190 1064 169 1058 q 237 1070 212 1070 q 282 1064 261 1070 q 320 1046 304 1058 q 346 1015 337 1034 q 356 970 356 996 q 346 925 356 944 q 320 894 337 906 q 282 876 304 882 q 237 870 261 870 q 190 876 212 870 q 153 894 169 882 q 128 925 137 906 q 119 970 119 944 m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m 838 745 l 838 -10 q 812 -166 838 -104 q 740 -265 786 -228 q 629 -318 693 -302 q 488 -334 565 -334 l 461 -334 l 461 -247 l 470 -247 q 538 -235 508 -247 q 587 -194 567 -223 q 617 -118 607 -166 q 628 0 628 -71 l 628 579 q 619 627 628 609 q 595 655 610 645 q 559 668 579 664 q 516 671 539 671 l 512 671 l 512 745 l 838 745 m 609 970 q 618 1015 609 996 q 643 1046 628 1034 q 681 1064 659 1058 q 727 1070 702 1070 q 773 1064 751 1070 q 811 1046 794 1058 q 837 1015 827 1034 q 847 970 847 996 q 837 925 847 944 q 811 894 827 906 q 773 876 794 882 q 727 870 751 870 q 681 876 702 870 q 643 894 659 882 q 618 925 628 906 q 609 970 609 944 "},"Р":{"x_min":38.453125,"x_max":844,"ha":886,"o":"m 844 697 q 822 577 844 635 q 751 475 800 519 q 625 405 702 431 q 434 379 547 379 l 387 379 l 387 156 q 393 112 387 129 q 409 87 399 96 q 433 76 419 79 q 460 73 446 73 l 545 73 l 545 0 l 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 464 992 q 632 971 561 992 q 750 912 703 951 q 820 820 797 874 q 844 697 844 766 m 387 460 l 420 460 q 508 472 472 460 q 566 513 544 485 q 600 585 589 541 q 610 692 610 629 q 601 788 610 747 q 572 856 592 829 q 520 896 552 883 q 441 909 488 909 l 387 909 l 387 460 "},"˛":{"x_min":211,"x_max":536,"ha":695,"o":"m 211 -180 q 224 -118 211 -147 q 261 -65 238 -89 q 313 -24 284 -41 q 375 0 343 -7 l 482 0 q 437 -20 460 -6 q 395 -53 414 -33 q 364 -100 377 -74 q 352 -160 352 -127 q 359 -193 352 -179 q 379 -215 366 -207 q 410 -229 392 -224 q 448 -233 427 -233 q 488 -230 467 -233 q 536 -222 510 -228 l 536 -311 q 509 -321 525 -317 q 476 -327 493 -325 q 444 -332 460 -330 q 417 -334 428 -334 q 263 -297 316 -334 q 211 -180 211 -260 "},"Ć":{"x_min":77,"x_max":872,"ha":928,"o":"m 590 96 q 680 108 640 96 q 751 139 720 120 q 805 182 782 158 q 846 228 829 205 q 864 203 857 220 q 870 169 870 186 q 855 107 870 139 q 802 48 839 75 q 705 3 766 21 q 556 -14 645 -14 q 346 22 436 -14 q 196 126 255 59 q 106 288 136 193 q 77 497 77 382 q 107 703 77 609 q 197 864 138 796 q 347 968 257 931 q 555 1006 437 1006 q 694 993 635 1006 q 793 959 754 980 q 852 908 832 937 q 872 844 872 878 q 860 796 872 818 q 827 758 849 774 q 772 733 805 742 q 698 723 740 723 q 690 792 698 758 q 665 854 683 826 q 618 899 647 882 q 546 917 589 917 q 434 889 480 917 q 362 807 389 861 q 322 675 334 754 q 310 497 310 597 q 325 321 310 396 q 373 195 340 245 q 459 121 406 146 q 590 96 512 96 m 455 1089 q 488 1134 469 1108 q 525 1187 506 1160 q 561 1242 544 1215 q 588 1293 577 1269 l 807 1293 l 807 1278 q 764 1233 794 1260 q 697 1175 734 1205 q 621 1118 660 1146 q 549 1071 581 1089 l 455 1071 l 455 1089 "},"Т":{"x_min":13,"x_max":893,"ha":907,"o":"m 563 164 q 568 116 563 134 q 584 89 574 99 q 606 76 593 80 q 634 73 619 73 l 692 73 l 692 0 l 213 0 l 213 73 l 271 73 q 300 76 287 73 q 322 89 313 80 q 337 116 332 99 q 343 164 343 134 l 343 907 l 231 907 q 179 900 200 907 q 144 881 158 893 q 125 850 131 868 q 116 809 118 832 l 106 723 l 13 723 l 20 992 l 886 992 l 893 723 l 800 723 l 789 809 q 780 850 787 832 q 761 881 774 868 q 726 900 747 893 q 674 907 705 907 l 563 907 l 563 164 "},"£":{"x_min":33.328125,"x_max":737,"ha":777,"o":"m 375 482 q 384 453 380 466 q 390 427 387 440 q 395 399 393 413 q 396 368 396 386 q 271 177 396 258 l 276 170 q 288 173 280 171 q 308 177 297 175 q 332 181 319 179 q 357 182 345 182 q 384 180 371 182 q 411 175 397 179 q 442 166 425 171 q 480 154 458 161 q 535 139 510 145 q 591 134 560 134 q 674 162 638 134 q 737 236 709 190 l 737 81 q 670 9 709 33 q 576 -14 631 -14 q 532 -11 554 -14 q 487 -4 509 -8 q 445 4 465 0 q 410 16 425 10 q 338 37 376 28 q 272 47 300 47 q 227 43 248 47 q 188 35 207 40 q 151 22 169 30 q 114 4 133 14 l 53 -26 l 53 98 l 97 125 q 141 158 119 139 q 182 203 164 177 q 212 263 200 229 q 224 339 224 297 q 216 412 224 379 q 194 481 207 445 l 33 481 l 33 566 l 163 566 q 147 604 155 582 q 133 650 140 626 q 122 701 126 675 q 118 754 118 728 q 197 941 118 876 q 426 1006 276 1006 q 553 993 501 1006 q 639 959 606 980 q 687 908 672 937 q 702 844 702 878 q 657 763 702 795 q 528 732 613 732 q 523 797 528 763 q 506 858 518 831 q 472 903 494 885 q 416 921 450 921 q 333 881 364 921 q 302 759 302 841 q 306 703 302 731 q 317 651 311 676 q 332 604 324 626 q 349 566 341 582 l 595 566 l 595 481 l 375 482 "},"ů":{"x_min":36.34375,"x_max":891.4375,"ha":926,"o":"m 614 0 l 584 97 l 577 97 q 532 39 556 61 q 479 6 507 17 q 421 -9 452 -5 q 358 -14 390 -14 q 191 53 249 -14 q 134 260 134 120 l 134 572 q 128 622 134 603 q 111 652 123 641 q 82 667 100 662 q 39 671 64 671 l 36 671 l 36 745 l 344 745 l 344 299 q 349 218 344 254 q 367 157 355 182 q 399 117 379 131 q 450 104 419 104 q 507 118 483 104 q 546 160 531 133 q 568 227 561 188 q 576 315 576 266 l 576 582 q 567 630 576 612 q 546 657 559 647 q 514 668 532 666 q 475 671 496 671 l 471 671 l 471 745 l 787 745 l 787 161 q 794 113 787 130 q 813 87 801 96 q 842 76 825 78 q 879 73 859 73 l 891 73 l 891 0 l 614 0 m 610 979 q 597 913 610 941 q 561 866 584 885 q 508 837 538 847 q 443 828 477 828 q 377 837 408 828 q 324 866 347 847 q 288 913 301 885 q 276 979 276 941 q 288 1044 276 1015 q 324 1091 301 1072 q 377 1120 347 1110 q 443 1130 408 1130 q 508 1120 477 1130 q 561 1091 538 1110 q 597 1044 584 1072 q 610 979 610 1015 m 525 979 q 518 1013 525 999 q 501 1036 512 1027 q 474 1049 489 1045 q 443 1053 459 1053 q 411 1049 426 1053 q 384 1036 396 1045 q 367 1013 373 1027 q 360 979 360 999 q 367 944 360 958 q 384 921 373 930 q 411 908 396 912 q 443 903 426 903 q 474 908 459 903 q 501 921 489 912 q 518 944 512 930 q 525 979 525 958 "},"Ō":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 340 22 428 -14 q 193 126 251 59 q 106 288 135 193 q 77 498 77 382 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 748 970 661 1007 q 894 867 835 934 q 985 706 954 800 q 1016 496 1016 612 m 310 496 q 323 319 310 397 q 364 187 336 241 q 437 104 392 133 q 547 76 482 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 q 770 674 782 596 q 729 806 757 752 q 657 888 702 860 q 548 916 612 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 m 746 1071 l 343 1071 l 343 1180 l 746 1180 l 746 1071 "},"а":{"x_min":62,"x_max":786.859375,"ha":832,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 265 487 224 l 487 369 l 424 365 q 354 352 383 363 q 309 321 326 341 q 285 273 292 301 q 277 206 277 244 m 401 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 534 749 479 762 q 625 709 588 736 q 679 636 661 681 q 698 526 698 591 l 698 172 q 702 124 698 143 q 716 94 706 105 q 742 78 725 83 q 781 73 758 73 l 786 73 l 786 0 l 528 0 l 499 95 l 487 95 q 443 46 464 67 q 400 12 423 26 q 348 -7 377 -1 q 280 -14 319 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 212 62 154 q 139 379 62 325 q 373 438 217 434 l 487 443 l 487 519 q 484 583 487 554 q 472 633 481 612 q 446 665 464 654 q 401 677 429 677 "},"Ğ":{"x_min":77,"x_max":1029.375,"ha":1068,"o":"m 587 -14 q 362 22 458 -14 q 203 126 266 59 q 108 288 139 193 q 77 497 77 382 q 110 703 77 609 q 208 864 143 796 q 370 968 273 931 q 594 1006 467 1006 q 746 993 681 1006 q 854 959 811 980 q 920 908 898 937 q 941 844 941 878 q 930 798 941 820 q 895 761 918 777 q 839 735 872 744 q 762 726 806 726 q 751 803 762 768 q 720 864 741 839 q 666 903 699 889 q 590 917 634 917 q 461 889 514 917 q 374 807 407 861 q 325 675 340 754 q 310 497 310 597 q 326 318 310 396 q 377 188 342 241 q 469 107 413 135 q 608 80 526 80 q 659 82 634 80 q 709 89 685 84 l 709 293 q 684 371 709 349 q 610 392 659 392 l 592 392 l 592 466 l 1029 466 l 1029 392 l 1011 392 q 974 387 990 392 q 948 370 958 382 q 933 338 938 358 q 929 288 929 318 l 929 60 q 764 4 847 23 q 587 -14 682 -14 m 568 1071 q 472 1090 513 1071 q 403 1140 431 1109 q 361 1210 375 1171 q 346 1289 347 1249 l 437 1289 q 483 1216 449 1238 q 568 1194 516 1194 q 653 1216 619 1194 q 698 1289 687 1238 l 791 1289 q 775 1210 789 1249 q 733 1140 761 1171 q 664 1090 705 1109 q 568 1071 623 1071 "},"v":{"x_min":-0.234375,"x_max":842.015625,"ha":842,"o":"m 842 671 l 814 671 q 788 667 799 671 q 767 653 777 664 q 746 623 756 643 q 724 569 736 603 l 522 0 l 339 0 l 111 604 q 93 637 103 624 q 70 657 83 650 q 40 668 57 664 q 0 671 22 671 l 0 745 l 430 745 l 430 671 l 372 671 q 338 659 351 671 q 325 626 325 648 q 330 593 325 610 q 338 565 334 577 l 432 302 q 461 213 449 258 q 480 133 474 168 q 490 171 484 149 q 502 214 496 193 q 513 251 508 234 q 521 275 519 268 l 615 554 q 626 592 622 573 q 631 631 631 612 q 615 662 631 654 q 576 671 600 671 l 536 671 l 536 745 l 842 745 l 842 671 "},"Ї":{"x_min":38.453125,"x_max":517.953125,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 m 53 1184 q 59 1224 53 1207 q 77 1251 66 1240 q 103 1265 88 1261 q 134 1270 118 1270 q 165 1265 151 1270 q 192 1251 180 1261 q 210 1224 203 1240 q 218 1184 218 1207 q 210 1144 218 1160 q 192 1117 203 1127 q 165 1102 180 1107 q 134 1098 151 1098 q 103 1102 118 1098 q 77 1117 88 1107 q 59 1144 66 1127 q 53 1184 53 1160 m 338 1184 q 344 1224 338 1207 q 363 1251 351 1240 q 389 1265 374 1261 q 421 1270 404 1270 q 451 1265 436 1270 q 477 1251 465 1261 q 495 1224 488 1240 q 503 1184 503 1207 q 495 1144 503 1160 q 477 1117 488 1127 q 451 1102 465 1107 q 421 1098 436 1098 q 389 1102 404 1098 q 363 1117 374 1107 q 344 1144 351 1127 q 338 1184 338 1160 "},"û":{"x_min":36.34375,"x_max":891.4375,"ha":926,"o":"m 614 0 l 584 97 l 577 97 q 532 39 556 61 q 479 6 507 17 q 421 -9 452 -5 q 358 -14 390 -14 q 191 53 249 -14 q 134 260 134 120 l 134 572 q 128 622 134 603 q 111 652 123 641 q 82 667 100 662 q 39 671 64 671 l 36 671 l 36 745 l 344 745 l 344 299 q 349 218 344 254 q 367 157 355 182 q 399 117 379 131 q 450 104 419 104 q 507 118 483 104 q 546 160 531 133 q 568 227 561 188 q 576 315 576 266 l 576 582 q 567 630 576 612 q 546 657 559 647 q 514 668 532 666 q 475 671 496 671 l 471 671 l 471 745 l 787 745 l 787 161 q 794 113 787 130 q 813 87 801 96 q 842 76 825 78 q 879 73 859 73 l 891 73 l 891 0 l 614 0 m 201 860 q 239 905 217 879 q 283 958 261 931 q 324 1013 304 986 q 354 1064 343 1040 l 541 1064 q 571 1013 552 1040 q 612 958 590 986 q 656 905 634 931 q 694 860 677 879 l 694 842 l 598 842 q 564 869 584 853 q 523 901 544 884 q 482 935 502 918 q 447 966 462 952 q 411 935 431 952 q 370 901 391 918 q 330 869 350 884 q 297 842 311 853 l 201 842 l 201 860 "},"Ź":{"x_min":58,"x_max":864,"ha":925,"o":"m 833 921 l 310 84 l 610 84 q 680 96 653 84 q 723 128 707 108 q 746 172 739 147 q 756 223 754 197 l 763 286 l 864 286 l 857 0 l 58 0 l 58 69 l 578 907 l 305 907 q 251 898 272 907 q 217 873 230 889 q 199 833 205 856 q 191 781 193 809 l 183 706 l 84 706 l 90 992 l 833 992 l 833 921 m 365 1089 q 398 1134 379 1108 q 435 1187 416 1160 q 471 1242 454 1215 q 498 1293 487 1269 l 717 1293 l 717 1278 q 674 1233 704 1260 q 607 1175 644 1205 q 531 1118 570 1146 q 459 1071 491 1089 l 365 1071 l 365 1089 "},"ˉ":{"x_min":146,"x_max":549,"ha":695,"o":"m 549 842 l 146 842 l 146 951 l 549 951 l 549 842 "},"Ĺ":{"x_min":38.453125,"x_max":863,"ha":908,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 432 915 445 918 q 409 903 418 912 q 394 878 399 895 q 388 833 388 861 l 388 84 l 647 84 q 723 115 696 84 q 762 205 750 146 l 785 310 l 863 310 l 852 0 l 38 0 m 234 1089 q 267 1134 248 1108 q 304 1187 285 1160 q 340 1242 323 1215 q 367 1293 356 1269 l 586 1293 l 586 1278 q 543 1233 573 1260 q 476 1175 513 1205 q 400 1118 439 1146 q 328 1071 360 1089 l 234 1071 l 234 1089 "},"₤":{"x_min":33.328125,"x_max":737,"ha":777,"o":"m 375 481 q 382 457 379 468 q 388 437 385 447 q 392 417 390 427 q 395 395 394 407 l 595 395 l 595 311 l 386 311 q 271 177 362 234 l 275 170 q 288 173 280 171 q 308 177 297 175 q 332 181 319 179 q 357 182 345 182 q 384 180 371 182 q 411 175 397 179 q 441 166 425 171 q 480 154 458 161 q 535 139 510 145 q 591 134 560 134 q 674 162 638 134 q 737 236 709 190 l 737 81 q 670 9 709 33 q 576 -14 631 -14 q 532 -11 554 -14 q 487 -4 509 -8 q 445 4 465 0 q 410 16 425 10 q 338 37 376 28 q 272 47 300 47 q 227 43 248 47 q 188 35 207 40 q 151 22 169 30 q 114 4 133 14 l 53 -26 l 53 97 l 97 125 q 137 154 116 137 q 175 193 157 171 q 206 245 193 216 q 223 311 218 275 l 33 311 l 33 395 l 219 395 q 193 481 209 438 l 33 481 l 33 566 l 163 566 q 147 604 155 582 q 133 650 140 626 q 122 701 126 675 q 118 754 118 728 q 197 941 118 876 q 426 1006 276 1006 q 553 993 501 1006 q 639 959 606 980 q 687 908 672 937 q 702 844 702 878 q 657 763 702 795 q 528 732 613 732 q 523 797 528 763 q 506 858 518 831 q 472 903 494 885 q 416 921 450 921 q 333 881 364 921 q 302 759 302 841 q 306 703 302 731 q 317 651 311 676 q 332 604 324 626 q 349 566 340 582 l 595 566 l 595 481 l 375 481 "},"Č":{"x_min":77,"x_max":872,"ha":928,"o":"m 590 96 q 680 108 640 96 q 751 139 720 120 q 805 182 782 158 q 846 228 829 205 q 864 203 857 220 q 870 169 870 186 q 855 107 870 139 q 802 48 839 75 q 705 3 766 21 q 556 -14 645 -14 q 346 22 436 -14 q 196 126 255 59 q 106 288 136 193 q 77 497 77 382 q 107 703 77 609 q 197 864 138 796 q 347 968 257 931 q 555 1006 437 1006 q 694 993 635 1006 q 793 959 754 980 q 852 908 832 937 q 872 844 872 878 q 860 796 872 818 q 827 758 849 774 q 772 733 805 742 q 698 723 740 723 q 690 792 698 758 q 665 854 683 826 q 618 899 647 882 q 546 917 589 917 q 434 889 480 917 q 362 807 389 861 q 322 675 334 754 q 310 497 310 597 q 325 321 310 396 q 373 195 340 245 q 459 121 406 146 q 590 96 512 96 m 280 1293 l 376 1293 q 409 1265 390 1281 q 449 1233 429 1250 q 490 1199 470 1215 q 526 1167 510 1182 q 561 1199 541 1182 q 602 1233 581 1215 q 643 1265 623 1250 q 677 1293 663 1281 l 773 1293 l 773 1274 q 735 1229 756 1255 q 691 1176 713 1203 q 650 1121 669 1148 q 620 1071 631 1094 l 433 1071 q 403 1121 422 1094 q 362 1176 383 1148 q 318 1229 340 1203 q 280 1274 296 1255 l 280 1293 "},"x":{"x_min":15.59375,"x_max":887.515625,"ha":897,"o":"m 604 629 q 584 662 604 654 q 532 671 565 671 l 528 671 l 528 745 l 849 745 l 849 671 l 837 671 q 801 667 816 671 q 769 653 785 663 q 736 626 753 643 q 696 582 719 609 l 553 407 l 757 147 q 816 90 789 107 q 869 73 843 73 l 887 73 l 887 0 l 445 0 l 445 73 l 452 73 q 536 119 536 73 q 534 135 536 127 q 526 154 532 143 q 510 180 521 165 q 483 215 500 194 l 404 311 l 307 190 q 286 156 294 173 q 278 120 278 138 q 297 85 278 97 q 364 73 317 73 l 368 73 l 368 0 l 15 0 l 15 73 l 27 73 q 71 78 52 73 q 107 92 90 82 q 141 120 124 103 q 179 162 158 137 l 353 373 l 179 597 q 120 652 149 634 q 59 671 91 671 l 41 671 l 41 745 l 478 745 l 478 671 l 473 671 q 434 668 449 671 q 410 659 419 664 q 398 646 401 654 q 394 631 394 639 q 402 602 394 616 q 426 567 409 588 l 503 472 l 569 551 q 594 591 585 572 q 604 629 604 610 "},"è":{"x_min":65,"x_max":735,"ha":793,"o":"m 412 671 q 319 614 354 671 q 282 445 285 556 l 522 445 q 516 540 522 497 q 497 611 510 582 q 463 656 483 640 q 412 671 442 671 m 425 -14 q 269 11 337 -14 q 156 86 202 37 q 88 206 111 135 q 65 367 65 277 q 88 539 65 465 q 155 662 111 613 q 263 737 199 712 q 409 762 327 762 q 545 740 485 762 q 648 677 606 719 q 712 572 690 635 q 735 427 735 510 l 735 356 l 279 356 q 294 236 281 286 q 331 153 307 186 q 388 105 354 120 q 465 89 421 89 q 531 98 501 89 q 587 121 562 106 q 630 157 612 137 q 661 202 649 178 q 699 134 699 182 q 682 77 699 104 q 632 30 666 51 q 547 -1 598 10 q 425 -14 496 -14 m 436 842 q 364 889 404 860 q 287 946 324 917 q 220 1004 250 976 q 178 1049 190 1031 l 178 1064 l 395 1064 q 423 1013 406 1040 q 459 958 440 986 q 497 905 477 931 q 531 860 516 879 l 531 842 l 436 842 "},"Ń":{"x_min":38.453125,"x_max":1070.859375,"ha":1095,"o":"m 813 0 l 271 765 l 271 164 q 277 116 271 134 q 292 89 283 99 q 315 76 302 80 q 342 73 328 73 l 401 73 l 401 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 347 992 l 837 298 l 837 833 q 831 878 837 861 q 816 903 826 895 q 793 915 806 912 q 766 918 780 918 l 708 918 l 708 992 l 1070 992 l 1070 918 l 1012 918 q 985 915 998 918 q 962 903 972 912 q 947 876 952 893 q 942 828 942 858 l 942 0 l 813 0 m 484 1089 q 517 1134 498 1108 q 554 1187 535 1160 q 590 1242 573 1215 q 617 1293 606 1269 l 836 1293 l 836 1278 q 793 1233 823 1260 q 726 1175 763 1205 q 650 1118 689 1146 q 578 1071 610 1089 l 484 1071 l 484 1089 "},"ḿ":{"x_min":27.78125,"x_max":1332.984375,"ha":1369,"o":"m 582 0 l 582 456 q 576 536 582 501 q 557 595 570 571 q 522 631 544 618 q 470 643 501 643 q 413 626 436 643 q 376 579 389 608 q 356 510 362 549 q 349 429 349 471 l 349 164 q 357 117 349 134 q 377 89 364 99 q 408 76 389 80 q 450 73 427 73 l 454 73 l 454 0 l 27 0 l 27 73 l 30 73 q 73 76 54 73 q 108 90 93 80 q 130 119 122 100 q 139 169 139 138 l 139 584 q 131 631 139 614 q 111 659 124 649 q 80 672 98 669 q 38 675 61 675 l 34 675 l 34 745 l 326 745 l 344 645 l 351 645 q 395 707 372 684 q 445 743 419 730 q 501 758 472 755 q 563 762 531 762 q 694 734 640 762 q 773 645 748 707 l 786 645 q 831 707 807 684 q 884 743 856 730 q 943 758 912 755 q 1007 762 974 762 q 1103 746 1060 762 q 1175 698 1145 730 q 1220 615 1204 665 q 1236 494 1236 564 l 1236 172 q 1241 120 1236 139 q 1259 90 1247 101 q 1288 77 1270 80 q 1328 73 1305 73 l 1332 73 l 1332 0 l 1024 0 l 1024 456 q 999 595 1024 546 q 914 643 974 643 q 858 628 881 643 q 821 585 835 612 q 799 521 806 557 q 792 445 792 485 l 792 172 q 798 120 792 139 q 815 90 804 101 q 845 77 827 80 q 886 73 862 73 l 890 73 l 890 0 l 582 0 m 591 860 q 624 905 605 879 q 661 958 642 931 q 697 1013 680 986 q 724 1064 713 1040 l 943 1064 l 943 1049 q 900 1004 930 1031 q 833 946 870 976 q 757 889 796 917 q 685 842 717 860 l 591 842 l 591 860 "},"μ":{"x_min":112.71875,"x_max":888.453125,"ha":924,"o":"m 389 -14 q 290 7 331 -14 q 222 67 249 28 q 227 -39 222 9 q 247 -124 232 -87 q 292 -183 263 -161 q 371 -212 322 -206 q 362 -261 371 -239 q 336 -299 353 -283 q 296 -324 320 -315 q 242 -334 272 -334 q 193 -324 217 -334 q 151 -293 169 -315 q 123 -237 133 -272 q 112 -151 112 -202 q 114 -64 112 -110 q 119 35 116 -19 q 125 158 122 90 q 129 312 128 225 l 129 745 l 340 745 l 340 285 q 345 215 340 248 q 362 157 350 182 q 394 118 374 132 q 445 104 415 104 q 498 119 475 104 q 538 163 522 135 q 564 231 555 191 q 573 319 573 271 l 573 745 l 784 745 l 784 191 q 807 101 784 128 q 878 73 830 73 l 888 73 l 888 0 l 767 0 q 650 33 695 0 q 586 120 604 66 l 579 120 q 545 64 563 89 q 505 22 527 39 q 454 -4 482 4 q 389 -14 425 -14 "},".":{"x_min":97,"x_max":325,"ha":423,"o":"m 97 99 q 105 152 97 131 q 129 187 114 174 q 166 205 145 200 q 211 211 187 211 q 254 205 234 211 q 291 187 275 200 q 315 152 306 174 q 325 99 325 131 q 315 47 325 68 q 291 13 306 26 q 254 -5 275 0 q 211 -11 234 -11 q 166 -5 187 -11 q 129 13 145 0 q 105 47 114 26 q 97 99 97 68 "},"‘":{"x_min":78,"x_max":326.34375,"ha":389,"o":"m 78 719 q 91 805 78 763 q 134 882 105 846 q 211 945 164 917 q 326 992 258 973 l 326 920 q 273 898 295 909 q 235 874 250 887 q 211 847 219 862 q 204 811 204 831 q 211 789 204 797 q 230 774 219 781 q 255 758 242 766 q 279 739 267 751 q 298 708 291 727 q 306 662 306 690 q 277 591 306 615 q 205 567 248 567 q 112 607 146 567 q 78 719 78 648 "},"π":{"x_min":45,"x_max":889.71875,"ha":928,"o":"m 889 565 l 705 565 q 699 462 701 516 q 694 359 696 409 q 691 267 692 309 q 691 198 691 225 q 696 151 691 170 q 712 120 702 132 q 735 103 722 108 q 765 98 749 98 q 804 102 785 98 q 836 112 823 107 l 836 26 q 788 0 819 10 q 718 -11 757 -11 q 651 -2 680 -11 q 601 25 621 6 q 569 76 580 45 q 558 152 558 107 q 562 237 558 187 q 572 342 566 286 q 587 455 579 398 q 604 565 596 513 l 372 565 l 355 213 q 341 118 352 158 q 308 52 330 78 q 250 12 286 25 q 162 0 214 0 l 70 0 l 70 71 q 118 80 92 71 q 167 110 143 88 q 209 167 190 131 q 235 257 227 202 l 278 565 l 213 565 q 152 541 173 565 q 126 478 131 516 l 45 478 q 57 580 45 532 q 97 665 70 629 q 167 723 125 702 q 269 745 210 745 l 889 745 l 889 565 "},"9":{"x_min":49,"x_max":715,"ha":777,"o":"m 316 -14 q 209 0 252 -14 q 138 34 166 12 q 99 84 111 56 q 88 142 88 112 q 104 193 88 173 q 155 222 120 214 q 180 163 166 190 q 214 116 194 136 q 261 85 234 96 q 322 73 288 73 q 467 174 416 73 q 524 476 517 275 q 488 438 508 455 q 442 409 468 422 q 387 389 417 396 q 321 382 357 382 q 211 400 261 382 q 125 455 161 419 q 69 545 89 491 q 49 669 49 599 q 70 806 49 744 q 133 912 92 868 q 233 981 174 957 q 367 1006 292 1006 q 506 978 442 1006 q 616 894 570 951 q 689 749 663 837 q 715 539 715 661 q 692 323 715 424 q 622 147 670 222 q 498 29 574 72 q 316 -14 423 -14 m 380 482 q 467 507 431 482 q 524 575 503 533 q 512 727 523 664 q 481 832 501 791 q 435 893 462 873 q 375 913 408 913 q 283 854 315 913 q 250 677 250 795 q 283 531 250 581 q 380 482 315 482 "},"l":{"x_min":23.703125,"x_max":465.234375,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 897 q 129 941 139 924 q 104 967 119 958 q 72 979 89 976 q 39 981 54 981 l 23 981 l 23 1055 l 349 1055 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 "},"Ъ":{"x_min":13,"x_max":992,"ha":1034,"o":"m 692 992 l 692 918 l 607 918 q 552 900 570 918 q 534 835 534 881 l 534 558 l 622 558 q 792 537 722 558 q 906 480 862 517 q 971 392 951 444 q 992 280 992 341 q 969 166 992 218 q 899 77 946 114 q 782 20 853 40 q 615 0 711 0 l 185 0 l 185 73 l 243 73 q 278 79 264 73 q 300 94 291 84 q 311 123 308 105 q 315 165 315 141 l 315 907 l 231 907 q 179 900 200 907 q 144 881 158 893 q 125 850 131 868 q 116 809 118 832 l 106 723 l 13 723 l 20 992 l 692 992 m 534 82 l 602 82 q 674 93 645 82 q 722 129 704 105 q 749 189 740 153 q 757 273 757 225 q 747 367 757 328 q 717 431 738 406 q 665 466 697 455 q 587 477 632 477 l 534 477 l 534 82 "}," ":{"x_min":0,"x_max":0,"ha":139},"Ś":{"x_min":41.203125,"x_max":745,"ha":814,"o":"m 366 -14 q 210 3 273 -14 q 110 49 148 21 q 57 111 73 76 q 41 179 41 146 q 54 240 41 215 q 89 280 67 264 q 139 302 111 295 q 198 309 168 309 q 212 204 198 249 q 252 129 227 159 q 312 83 277 99 q 388 68 347 68 q 461 80 429 68 q 515 112 493 91 q 549 160 538 132 q 561 219 561 187 q 546 282 561 254 q 503 333 532 309 q 431 377 474 356 q 329 423 387 399 q 206 485 256 453 q 126 553 156 516 q 82 632 95 590 q 69 726 69 675 q 94 841 69 790 q 166 930 120 893 q 273 986 211 966 q 409 1006 336 1006 q 542 993 486 1006 q 634 959 597 980 q 688 908 670 937 q 705 844 705 878 q 695 799 705 820 q 663 762 684 778 q 609 738 641 746 q 534 729 577 729 q 526 792 534 758 q 501 854 519 825 q 455 902 483 883 q 387 921 427 921 q 334 913 359 921 q 290 888 309 904 q 260 848 271 872 q 250 792 250 824 q 259 737 250 763 q 294 687 269 712 q 364 637 320 662 q 479 584 408 613 q 601 524 550 555 q 683 459 651 494 q 730 382 715 424 q 745 289 745 340 q 718 166 745 222 q 642 70 692 110 q 523 8 592 30 q 366 -14 453 -14 m 341 1089 q 374 1134 355 1108 q 411 1187 392 1160 q 447 1242 430 1215 q 474 1293 463 1269 l 693 1293 l 693 1278 q 650 1233 680 1260 q 583 1175 620 1205 q 507 1118 546 1146 q 435 1071 467 1089 l 341 1071 l 341 1089 "},"Ü":{"x_min":22.78125,"x_max":1015.21875,"ha":1038,"o":"m 1015 918 l 955 918 q 928 915 941 918 q 905 903 915 912 q 890 875 895 893 q 885 828 885 858 l 885 286 q 865 160 885 216 q 802 66 845 104 q 694 6 760 27 q 537 -14 628 -14 q 375 3 447 -14 q 254 58 304 20 q 179 156 205 96 q 153 302 153 216 l 153 833 q 147 878 153 861 q 131 903 141 894 q 109 915 121 912 q 82 918 96 918 l 22 918 l 22 992 l 501 992 l 501 918 l 443 918 q 416 915 429 918 q 393 903 403 912 q 378 875 383 893 q 372 828 372 858 l 372 291 q 387 193 372 233 q 428 129 401 153 q 494 94 456 105 q 579 84 531 84 q 662 96 625 84 q 726 133 699 108 q 766 197 752 158 q 780 288 780 235 l 780 833 q 775 878 780 861 q 759 903 769 894 q 737 915 750 912 q 710 918 724 918 l 651 918 l 651 992 l 1015 992 l 1015 918 m 336 1184 q 342 1224 336 1207 q 360 1251 349 1240 q 386 1265 371 1261 q 417 1270 401 1270 q 448 1265 434 1270 q 475 1251 463 1261 q 493 1224 486 1240 q 501 1184 501 1207 q 493 1144 501 1160 q 475 1117 486 1127 q 448 1102 463 1107 q 417 1098 434 1098 q 386 1102 401 1098 q 360 1117 371 1107 q 342 1144 349 1127 q 336 1184 336 1160 m 621 1184 q 627 1224 621 1207 q 646 1251 634 1240 q 672 1265 657 1261 q 704 1270 687 1270 q 734 1265 719 1270 q 760 1251 748 1261 q 778 1224 771 1240 q 786 1184 786 1207 q 778 1144 786 1160 q 760 1117 771 1127 q 734 1102 748 1107 q 704 1098 719 1098 q 672 1102 687 1098 q 646 1117 657 1107 q 627 1144 634 1127 q 621 1184 621 1160 "},"à":{"x_min":62,"x_max":786.859375,"ha":832,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 265 487 224 l 487 369 l 424 365 q 354 352 383 363 q 309 321 326 341 q 285 273 292 301 q 277 206 277 244 m 401 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 534 749 479 762 q 625 709 588 736 q 679 636 661 681 q 698 526 698 591 l 698 172 q 702 124 698 143 q 716 94 706 105 q 742 78 725 83 q 781 73 758 73 l 786 73 l 786 0 l 528 0 l 499 95 l 487 95 q 443 46 464 67 q 400 12 423 26 q 348 -7 377 -1 q 280 -14 319 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 212 62 154 q 139 379 62 325 q 373 438 217 434 l 487 443 l 487 519 q 484 583 487 554 q 472 633 481 612 q 446 665 464 654 q 401 677 429 677 m 419 842 q 347 889 387 860 q 270 946 307 917 q 203 1004 233 976 q 161 1049 173 1031 l 161 1064 l 378 1064 q 406 1013 389 1040 q 442 958 423 986 q 480 905 460 931 q 514 860 499 879 l 514 842 l 419 842 "},"η":{"x_min":93.0625,"x_max":809.453125,"ha":913,"o":"m 129 470 q 125 543 129 504 q 117 620 122 582 q 105 691 112 658 q 93 745 99 724 l 276 745 q 300 685 291 716 q 318 617 310 654 l 323 617 q 358 671 339 645 q 404 717 378 697 q 464 749 430 737 q 541 762 497 762 q 648 746 602 762 q 723 697 693 730 q 768 612 753 664 q 783 488 783 560 l 783 -95 q 785 -157 783 -122 q 790 -227 787 -192 q 798 -291 793 -262 q 809 -334 803 -320 l 609 -334 q 592 -292 599 -321 q 580 -228 585 -264 q 574 -155 576 -193 q 572 -87 572 -118 l 572 471 q 543 600 572 557 q 467 643 514 643 q 407 626 431 643 q 368 575 383 608 q 347 495 353 542 q 340 388 340 448 l 340 0 l 129 0 l 129 470 "},"ó":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 273 10 340 -14 q 160 82 207 34 q 89 203 114 130 q 65 374 65 277 q 156 666 65 570 q 427 762 248 762 q 577 738 511 762 q 690 666 643 714 q 761 545 736 618 q 786 374 786 472 m 280 374 q 288 244 280 300 q 313 150 296 188 q 358 92 330 112 q 426 73 386 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 q 563 505 571 449 q 538 598 555 561 q 492 654 520 635 q 425 673 465 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 m 342 860 q 375 905 356 879 q 412 958 393 931 q 448 1013 431 986 q 475 1064 464 1040 l 694 1064 l 694 1049 q 651 1004 681 1031 q 584 946 621 976 q 508 889 547 917 q 436 842 468 860 l 342 842 l 342 860 "},"¦":{"x_min":338,"x_max":437.703125,"ha":777,"o":"m 437 499 l 338 499 l 338 1055 l 437 1055 l 437 499 m 437 -334 l 338 -334 l 338 222 l 437 222 l 437 -334 "},"Ő":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 340 22 428 -14 q 193 126 251 59 q 106 288 135 193 q 77 498 77 382 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 748 970 661 1007 q 894 867 835 934 q 985 706 954 800 q 1016 496 1016 612 m 310 496 q 323 319 310 397 q 364 187 336 241 q 437 104 392 133 q 547 76 482 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 q 770 674 782 596 q 729 806 757 752 q 657 888 702 860 q 548 916 612 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 m 321 1071 l 321 1089 q 351 1137 335 1111 q 383 1190 367 1163 q 413 1243 399 1217 q 438 1293 428 1269 l 616 1293 l 616 1278 q 595 1250 608 1266 q 565 1214 582 1233 q 528 1175 548 1195 q 489 1136 509 1155 q 451 1100 470 1117 q 417 1071 432 1083 l 321 1071 m 585 1071 l 585 1089 q 615 1137 599 1111 q 647 1190 631 1163 q 677 1243 663 1217 q 702 1293 691 1269 l 879 1293 l 879 1278 q 858 1250 871 1266 q 828 1214 845 1233 q 792 1175 811 1195 q 753 1136 772 1155 q 714 1100 733 1117 q 680 1071 696 1083 l 585 1071 "},"Ž":{"x_min":58,"x_max":864,"ha":925,"o":"m 833 921 l 310 84 l 610 84 q 680 96 653 84 q 723 128 707 108 q 746 172 739 147 q 756 223 754 197 l 763 286 l 864 286 l 857 0 l 58 0 l 58 69 l 578 907 l 305 907 q 251 898 272 907 q 217 873 230 889 q 199 833 205 856 q 191 781 193 809 l 183 706 l 84 706 l 90 992 l 833 992 l 833 921 m 229 1293 l 325 1293 q 358 1265 339 1281 q 398 1233 378 1250 q 439 1199 419 1215 q 475 1167 459 1182 q 510 1199 490 1182 q 551 1233 530 1215 q 592 1265 572 1250 q 626 1293 612 1281 l 722 1293 l 722 1274 q 684 1229 705 1255 q 640 1176 662 1203 q 599 1121 618 1148 q 569 1071 580 1094 l 382 1071 q 352 1121 371 1094 q 311 1176 332 1148 q 267 1229 289 1203 q 229 1274 245 1255 l 229 1293 "},"е":{"x_min":65,"x_max":735,"ha":793,"o":"m 412 671 q 319 614 354 671 q 282 445 285 556 l 522 445 q 516 540 522 497 q 497 611 510 582 q 463 656 483 640 q 412 671 442 671 m 425 -14 q 269 11 337 -14 q 156 86 202 37 q 88 206 111 135 q 65 367 65 277 q 88 539 65 465 q 155 662 111 613 q 263 737 199 712 q 409 762 327 762 q 545 740 485 762 q 648 677 606 719 q 712 572 690 635 q 735 427 735 510 l 735 356 l 279 356 q 294 236 281 286 q 331 153 307 186 q 388 105 354 120 q 465 89 421 89 q 531 98 501 89 q 587 121 562 106 q 630 157 612 137 q 661 202 649 178 q 699 134 699 182 q 682 77 699 104 q 632 30 666 51 q 547 -1 598 10 q 425 -14 496 -14 "},"Î":{"x_min":33,"x_max":526,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 m 33 1089 q 71 1134 49 1108 q 115 1187 93 1160 q 156 1242 136 1215 q 186 1293 175 1269 l 373 1293 q 403 1242 384 1269 q 444 1187 422 1215 q 488 1134 466 1160 q 526 1089 509 1108 l 526 1071 l 430 1071 q 396 1098 416 1082 q 355 1130 376 1113 q 314 1164 334 1147 q 279 1195 294 1181 q 243 1164 263 1181 q 202 1130 223 1147 q 162 1098 182 1113 q 129 1071 143 1082 l 33 1071 l 33 1089 "},"e":{"x_min":65,"x_max":735,"ha":793,"o":"m 412 671 q 319 614 354 671 q 282 445 285 556 l 522 445 q 516 540 522 497 q 497 611 510 582 q 463 656 483 640 q 412 671 442 671 m 425 -14 q 269 11 337 -14 q 156 86 202 37 q 88 206 111 135 q 65 367 65 277 q 88 539 65 465 q 155 662 111 613 q 263 737 199 712 q 409 762 327 762 q 545 740 485 762 q 648 677 606 719 q 712 572 690 635 q 735 427 735 510 l 735 356 l 279 356 q 294 236 281 286 q 331 153 307 186 q 388 105 354 120 q 465 89 421 89 q 531 98 501 89 q 587 121 562 106 q 630 157 612 137 q 661 202 649 178 q 699 134 699 182 q 682 77 699 104 q 632 30 666 51 q 547 -1 598 10 q 425 -14 496 -14 "},"ό":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 273 10 340 -14 q 160 82 207 34 q 89 203 114 130 q 65 374 65 277 q 156 666 65 570 q 427 762 248 762 q 577 738 511 762 q 690 666 643 714 q 761 545 736 618 q 786 374 786 472 m 280 374 q 288 244 280 300 q 313 150 296 188 q 358 92 330 112 q 426 73 386 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 q 563 505 571 449 q 538 598 555 561 q 492 654 520 635 q 425 673 465 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 m 342 860 q 356 907 348 881 q 371 960 363 932 q 385 1014 378 987 q 395 1064 391 1041 l 585 1064 l 585 1050 q 558 1001 575 1028 q 522 947 542 974 q 480 892 502 919 q 438 842 458 865 l 342 842 l 342 860 "},"Ĕ":{"x_min":38.453125,"x_max":863,"ha":907,"o":"m 388 84 l 666 84 q 702 92 687 84 q 728 114 717 100 q 745 148 739 128 q 755 190 752 167 l 766 256 l 863 256 l 852 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 809 992 l 815 736 l 718 736 l 711 801 q 685 880 705 852 q 622 907 665 907 l 388 907 l 388 560 l 718 560 l 718 476 l 388 476 l 388 84 m 463 1071 q 367 1090 408 1071 q 298 1140 326 1109 q 256 1210 270 1171 q 241 1289 242 1249 l 332 1289 q 378 1216 344 1238 q 463 1194 411 1194 q 548 1216 514 1194 q 593 1289 582 1238 l 686 1289 q 670 1210 684 1249 q 628 1140 656 1171 q 559 1090 600 1109 q 463 1071 518 1071 "},"ļ":{"x_min":23.703125,"x_max":465.234375,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 897 q 129 941 139 924 q 104 967 119 958 q 72 979 89 976 q 39 981 54 981 l 23 981 l 23 1055 l 349 1055 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m 114 -289 q 128 -242 120 -268 q 144 -189 136 -216 q 158 -134 151 -161 q 168 -85 164 -108 l 330 -85 l 330 -98 q 305 -147 320 -120 q 271 -202 289 -174 q 234 -257 253 -230 q 197 -307 215 -285 l 114 -307 l 114 -289 "}," ":{"x_min":0,"x_max":0,"ha":695},"Ѓ":{"x_min":38.453125,"x_max":807,"ha":821,"o":"m 797 992 l 807 720 l 729 720 l 712 786 q 666 877 697 846 q 579 907 635 907 l 388 907 l 388 158 q 394 114 388 130 q 409 88 399 97 q 432 76 418 79 q 459 73 445 73 l 545 73 l 545 0 l 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 797 992 m 328 1089 q 361 1134 342 1108 q 398 1187 379 1160 q 434 1242 417 1215 q 461 1293 450 1269 l 680 1293 l 680 1278 q 637 1233 667 1260 q 570 1175 607 1205 q 494 1118 533 1146 q 422 1071 454 1089 l 328 1071 l 328 1089 "},"ò":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 273 10 340 -14 q 160 82 207 34 q 89 203 114 130 q 65 374 65 277 q 156 666 65 570 q 427 762 248 762 q 577 738 511 762 q 690 666 643 714 q 761 545 736 618 q 786 374 786 472 m 280 374 q 288 244 280 300 q 313 150 296 188 q 358 92 330 112 q 426 73 386 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 q 563 505 571 449 q 538 598 555 561 q 492 654 520 635 q 425 673 465 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 m 419 842 q 347 889 387 860 q 270 946 307 917 q 203 1004 233 976 q 161 1049 173 1031 l 161 1064 l 378 1064 q 406 1013 389 1040 q 442 958 423 986 q 480 905 460 931 q 514 860 499 879 l 514 842 l 419 842 "},"ffl":{"x_min":26.140625,"x_max":1467.90625,"ha":1492,"o":"m 1042 73 q 1074 76 1057 73 q 1106 89 1092 80 q 1131 116 1121 99 q 1141 164 1141 134 l 1141 817 q 1130 867 1139 838 q 1104 923 1122 897 q 1059 969 1086 950 q 995 988 1032 988 q 893 946 928 988 q 859 811 859 903 l 859 745 l 1033 745 l 1033 650 l 859 650 l 859 164 q 869 116 859 134 q 893 89 879 99 q 925 76 908 80 q 957 73 943 73 l 981 73 l 981 0 l 532 0 l 532 73 l 549 73 q 581 76 564 73 q 613 89 599 80 q 638 116 628 99 q 648 164 648 134 l 648 650 l 366 650 l 366 164 q 376 116 366 134 q 400 89 386 99 q 432 76 415 80 q 464 73 450 73 l 488 73 l 488 0 l 26 0 l 26 73 l 56 73 q 88 76 71 73 q 120 89 106 80 q 145 116 135 99 q 155 164 155 134 l 155 650 l 31 650 l 31 745 l 155 745 l 155 755 q 224 979 155 904 q 438 1054 293 1054 q 544 1043 503 1054 q 607 1018 585 1033 q 638 984 630 1002 q 647 950 647 966 q 609 883 647 903 q 499 862 571 862 q 497 898 499 879 q 487 935 494 918 q 468 963 480 952 q 437 975 456 975 q 408 966 420 975 q 385 934 395 957 q 371 869 376 910 q 366 765 366 829 l 366 745 l 648 745 l 648 753 q 670 886 648 828 q 738 985 692 945 q 854 1047 784 1026 q 1023 1068 925 1068 q 1104 1064 1065 1068 q 1174 1055 1142 1061 l 1352 1055 l 1352 164 q 1362 116 1352 134 q 1386 89 1372 99 q 1418 76 1401 80 q 1450 73 1436 73 l 1467 73 l 1467 0 l 1039 0 l 1039 73 l 1042 73 "},"^":{"x_min":64,"x_max":711,"ha":777,"o":"m 356 992 l 416 992 l 711 365 l 602 365 l 385 840 l 172 365 l 64 365 l 356 992 "},"ⁿ":{"x_min":35.71875,"x_max":636.828125,"ha":667,"o":"m 338 597 l 338 536 l 35 536 l 35 597 l 42 597 q 69 599 56 597 q 90 606 81 601 q 105 622 100 612 q 111 649 111 633 l 111 881 q 105 907 111 897 q 90 921 100 916 q 68 928 81 926 q 42 930 56 930 l 39 930 l 39 992 l 245 992 l 260 923 l 266 923 q 297 961 281 947 q 331 985 313 976 q 370 996 349 993 q 412 1000 390 1000 q 528 963 487 1000 q 569 845 569 926 l 569 655 q 573 624 569 636 q 587 607 578 613 q 607 599 596 601 q 632 597 619 597 l 636 597 l 636 536 l 411 536 l 411 810 q 396 888 411 860 q 343 916 382 916 q 307 907 322 916 q 284 882 292 898 q 271 846 275 867 q 267 802 267 825 l 267 645 q 273 620 267 629 q 288 605 278 610 q 310 598 298 600 q 337 597 323 597 l 338 597 "},"к":{"x_min":23.703125,"x_max":892,"ha":892,"o":"m 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 444 745 l 444 671 l 441 671 q 411 668 427 671 q 381 655 395 664 q 359 628 368 645 q 349 580 349 610 l 349 428 q 404 435 383 428 q 441 458 425 442 q 480 508 458 475 q 536 594 501 541 q 580 660 559 631 q 625 710 601 689 q 680 741 649 730 q 751 753 710 753 q 808 745 786 753 q 845 726 831 738 q 865 699 859 715 q 870 668 870 684 q 864 633 870 649 q 846 606 858 618 q 820 588 835 595 q 788 580 805 582 q 766 632 783 612 q 719 651 750 651 q 695 645 707 651 q 669 626 683 639 q 641 593 656 613 q 607 546 626 573 q 575 499 589 519 q 548 464 560 479 q 525 438 536 449 q 502 417 514 427 q 547 407 524 415 q 592 385 570 400 q 634 350 614 371 q 673 297 655 328 l 750 166 q 781 120 766 138 q 812 91 796 101 q 846 77 828 81 q 887 73 864 73 l 892 73 l 892 0 l 833 0 q 730 4 776 0 q 648 22 685 8 q 583 62 611 36 q 530 132 554 88 l 459 263 q 432 309 444 292 q 408 335 420 326 q 382 348 396 345 q 349 351 368 351 l 349 164 q 359 116 349 134 q 381 89 368 99 q 411 76 395 80 q 441 73 427 73 l 444 73 l 444 0 l 23 0 l 23 73 "},"":{"x_min":57,"x_max":1346,"ha":1389,"o":"m 57 823 l 57 1030 l 262 1030 l 262 954 l 132 954 l 132 823 l 57 823 m 1139 954 l 1139 1030 l 1346 1030 l 1346 823 l 1272 823 l 1272 954 l 1139 954 m 57 -260 l 57 -54 l 132 -54 l 132 -186 l 262 -186 l 262 -260 l 57 -260 m 1139 -260 l 1139 -186 l 1272 -186 l 1272 -54 l 1346 -54 l 1346 -260 l 1139 -260 m 875 -260 l 875 -186 l 1060 -186 l 1060 -260 l 875 -260 m 345 -260 l 345 -186 l 528 -186 l 528 -260 l 345 -260 m 345 954 l 345 1030 l 528 1030 l 528 954 l 345 954 m 1346 26 l 1272 26 l 1272 210 l 1346 210 l 1346 26 m 1346 558 l 1272 558 l 1272 742 l 1346 742 l 1346 558 m 610 -260 l 610 -186 l 794 -186 l 794 -260 l 610 -260 m 132 26 l 57 26 l 57 210 l 132 210 l 132 26 m 610 954 l 610 1030 l 794 1030 l 794 954 l 610 954 m 875 954 l 875 1030 l 1060 1030 l 1060 954 l 875 954 m 132 291 l 57 291 l 57 476 l 132 476 l 132 291 m 132 558 l 57 558 l 57 742 l 132 742 l 132 558 m 1346 291 l 1272 291 l 1272 476 l 1346 476 l 1346 291 m 584 429 q 571 345 584 382 q 535 281 559 308 q 477 239 512 254 q 397 225 442 225 q 314 239 349 225 q 255 281 278 254 q 219 345 231 308 q 208 429 208 382 q 219 512 208 475 q 255 577 231 550 q 314 618 278 603 q 397 633 349 633 q 477 618 442 633 q 535 577 512 603 q 571 512 559 550 q 584 429 584 475 m 302 429 q 323 305 302 349 q 397 260 344 260 q 469 305 448 260 q 491 429 491 349 q 486 499 491 468 q 469 552 480 530 q 440 585 458 574 q 397 597 422 597 q 352 585 370 597 q 323 552 334 574 q 307 499 312 530 q 302 429 302 468 m 938 524 q 918 469 938 487 q 867 439 898 450 l 867 437 q 930 402 906 427 q 955 338 955 378 q 795 229 955 229 l 616 229 l 616 258 l 639 258 q 660 264 651 258 q 669 294 669 271 l 669 560 q 660 589 669 581 q 639 596 651 596 l 616 596 l 616 626 l 778 626 q 898 601 858 626 q 938 524 938 576 m 756 263 l 792 263 q 845 280 830 263 q 860 340 860 297 q 846 399 860 380 q 793 418 832 418 l 756 418 l 756 263 m 751 454 l 772 454 q 824 470 809 454 q 838 524 838 486 q 823 576 838 562 q 770 590 807 590 l 751 590 l 751 454 m 1194 596 l 1170 596 q 1151 590 1159 596 q 1143 560 1143 583 l 1143 356 q 1130 293 1143 319 q 1097 253 1118 268 q 1049 231 1077 237 q 994 224 1022 224 l 975 224 l 975 256 l 984 256 q 1010 261 998 256 q 1032 278 1023 266 q 1048 309 1042 289 q 1054 356 1054 328 l 1054 561 q 1045 590 1054 583 q 1026 596 1037 596 l 1003 596 l 1003 626 l 1194 626 l 1194 596 "},"ū":{"x_min":36.34375,"x_max":891.4375,"ha":926,"o":"m 614 0 l 584 97 l 577 97 q 532 39 556 61 q 479 6 507 17 q 421 -9 452 -5 q 358 -14 390 -14 q 191 53 249 -14 q 134 260 134 120 l 134 572 q 128 622 134 603 q 111 652 123 641 q 82 667 100 662 q 39 671 64 671 l 36 671 l 36 745 l 344 745 l 344 299 q 349 218 344 254 q 367 157 355 182 q 399 117 379 131 q 450 104 419 104 q 507 118 483 104 q 546 160 531 133 q 568 227 561 188 q 576 315 576 266 l 576 582 q 567 630 576 612 q 546 657 559 647 q 514 668 532 666 q 475 671 496 671 l 471 671 l 471 745 l 787 745 l 787 161 q 794 113 787 130 q 813 87 801 96 q 842 76 825 78 q 879 73 859 73 l 891 73 l 891 0 l 614 0 m 647 842 l 244 842 l 244 951 l 647 951 l 647 842 "},"ˆ":{"x_min":154,"x_max":647,"ha":802,"o":"m 154 860 q 192 905 170 879 q 236 958 214 931 q 277 1013 257 986 q 307 1064 296 1040 l 494 1064 q 524 1013 505 1040 q 565 958 543 986 q 609 905 587 931 q 647 860 630 879 l 647 842 l 551 842 q 517 869 537 853 q 476 901 497 884 q 435 935 455 918 q 400 966 415 952 q 364 935 384 952 q 323 901 344 918 q 283 869 303 884 q 250 842 264 853 l 154 842 l 154 860 "},"Ẅ":{"x_min":0.34375,"x_max":1481.578125,"ha":1482,"o":"m 838 982 l 1030 451 q 1053 385 1042 419 q 1072 321 1063 352 q 1088 265 1081 290 q 1098 221 1095 239 q 1110 276 1103 246 q 1123 340 1116 307 q 1138 409 1130 374 q 1154 478 1145 445 l 1227 778 q 1231 797 1229 786 q 1236 818 1234 808 q 1239 838 1238 829 q 1240 852 1240 847 q 1218 903 1240 888 q 1151 918 1197 918 l 1119 918 l 1119 992 l 1481 992 l 1481 918 l 1455 918 q 1419 914 1434 918 q 1391 898 1403 910 q 1369 865 1379 886 q 1350 810 1359 844 l 1134 0 l 976 0 l 743 652 l 543 0 l 371 0 l 117 844 q 102 880 110 866 q 81 903 93 895 q 54 915 69 911 q 18 918 39 918 l 0 918 l 0 992 l 464 992 l 464 918 l 432 918 q 369 902 390 918 q 348 851 348 886 q 353 817 348 840 q 363 776 357 795 l 455 455 q 471 398 463 429 q 487 336 480 367 q 501 275 495 304 q 510 223 507 246 q 530 307 519 268 q 554 387 542 346 l 737 982 l 838 982 m 551 1184 q 557 1224 551 1207 q 575 1251 564 1240 q 601 1265 586 1261 q 632 1270 616 1270 q 663 1265 649 1270 q 690 1251 678 1261 q 708 1224 701 1240 q 716 1184 716 1207 q 708 1144 716 1160 q 690 1117 701 1127 q 663 1102 678 1107 q 632 1098 649 1098 q 601 1102 616 1098 q 575 1117 586 1107 q 557 1144 564 1127 q 551 1184 551 1160 m 836 1184 q 842 1224 836 1207 q 861 1251 849 1240 q 887 1265 872 1261 q 919 1270 902 1270 q 949 1265 934 1270 q 975 1251 963 1261 q 993 1224 986 1240 q 1001 1184 1001 1207 q 993 1144 1001 1160 q 975 1117 986 1127 q 949 1102 963 1107 q 919 1098 934 1098 q 887 1102 902 1098 q 861 1117 872 1107 q 842 1144 849 1127 q 836 1184 836 1160 "},"č":{"x_min":65,"x_max":681,"ha":732,"o":"m 409 -14 q 269 5 332 -14 q 160 70 206 25 q 90 189 115 116 q 65 369 65 262 q 91 557 65 481 q 163 677 117 632 q 271 742 208 723 q 405 762 333 762 q 524 750 472 762 q 610 719 575 739 q 663 673 645 700 q 681 616 681 646 q 673 572 681 593 q 645 534 665 551 q 590 508 625 518 q 501 498 555 498 q 496 566 501 534 q 482 623 492 599 q 454 662 472 648 q 410 677 437 677 q 356 662 380 677 q 314 612 332 648 q 288 518 297 577 q 279 370 279 459 q 317 159 279 229 q 444 89 356 89 q 511 98 480 89 q 569 121 543 106 q 614 157 594 137 q 645 202 633 178 q 670 174 662 192 q 679 138 679 157 q 663 85 679 112 q 614 35 647 57 q 531 0 581 13 q 409 -14 480 -14 m 155 1064 l 251 1064 q 284 1036 265 1052 q 324 1004 304 1021 q 365 970 345 986 q 401 938 385 953 q 436 970 416 953 q 477 1004 456 986 q 518 1036 498 1021 q 552 1064 538 1052 l 648 1064 l 648 1045 q 610 1000 631 1026 q 566 947 588 974 q 525 892 544 919 q 495 842 506 865 l 308 842 q 278 892 297 865 q 237 947 258 919 q 193 1000 215 974 q 155 1045 171 1026 l 155 1064 "},"’":{"x_min":61.96875,"x_max":311,"ha":389,"o":"m 311 839 q 297 753 311 795 q 254 676 283 712 q 176 613 224 641 q 61 567 129 585 l 61 638 q 115 660 92 649 q 153 684 138 671 q 176 711 168 696 q 184 747 184 727 q 176 769 184 761 q 158 784 169 777 q 133 800 146 792 q 109 820 120 807 q 90 850 97 832 q 83 896 83 868 q 111 967 83 943 q 182 992 140 992 q 276 951 241 992 q 311 839 311 910 "},"Ν":{"x_min":38.453125,"x_max":1070.859375,"ha":1095,"o":"m 813 0 l 271 765 l 271 164 q 277 116 271 134 q 292 89 283 99 q 315 76 302 80 q 342 73 328 73 l 401 73 l 401 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 347 992 l 837 298 l 837 833 q 831 878 837 861 q 816 903 826 895 q 793 915 806 912 q 766 918 780 918 l 708 918 l 708 992 l 1070 992 l 1070 918 l 1012 918 q 985 915 998 918 q 962 903 972 912 q 947 876 952 893 q 942 828 942 858 l 942 0 l 813 0 "},"-":{"x_min":35,"x_max":396,"ha":431,"o":"m 35 306 l 35 452 l 396 452 l 396 306 l 35 306 "},"Q":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 497 q 993 317 1016 399 q 929 171 971 234 q 823 63 886 107 q 678 0 760 20 q 703 -125 684 -76 q 750 -203 722 -175 q 810 -242 777 -231 q 878 -253 843 -253 l 900 -253 l 900 -334 l 801 -334 q 678 -315 738 -334 q 568 -257 617 -297 q 486 -155 519 -217 q 446 -5 453 -93 q 283 51 353 9 q 168 159 214 93 q 99 310 122 224 q 77 498 77 396 q 106 707 77 613 q 193 868 135 801 q 340 970 252 934 q 548 1007 429 1007 q 748 970 661 1007 q 894 867 835 934 q 985 707 954 800 q 1016 497 1016 613 m 310 497 q 323 319 310 397 q 364 187 336 241 q 437 105 392 134 q 547 77 482 77 q 657 105 612 77 q 729 187 702 134 q 770 319 757 241 q 782 497 782 397 q 770 674 782 596 q 729 806 757 752 q 657 888 702 860 q 548 916 612 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 497 310 596 "},"ј":{"x_min":-27.84375,"x_max":358.078125,"ha":480,"o":"m 349 745 l 349 -10 q 323 -166 349 -104 q 251 -265 297 -228 q 140 -318 204 -302 q 0 -334 76 -334 l -27 -334 l -27 -247 l -18 -247 q 49 -235 19 -247 q 98 -194 78 -223 q 128 -118 118 -166 q 139 0 139 -71 l 139 579 q 130 627 139 609 q 106 655 121 645 q 70 668 90 664 q 27 671 50 671 l 23 671 l 23 745 l 349 745 m 120 970 q 129 1015 120 996 q 154 1046 139 1034 q 192 1064 170 1058 q 238 1070 213 1070 q 284 1064 262 1070 q 322 1046 305 1058 q 348 1015 338 1034 q 358 970 358 996 q 348 925 358 944 q 322 894 338 906 q 284 876 305 882 q 238 870 262 870 q 192 876 213 870 q 154 894 170 882 q 129 925 139 906 q 120 970 120 944 "},"ě":{"x_min":65,"x_max":735,"ha":793,"o":"m 412 671 q 319 614 354 671 q 282 445 285 556 l 522 445 q 516 540 522 497 q 497 611 510 582 q 463 656 483 640 q 412 671 442 671 m 425 -14 q 269 11 337 -14 q 156 86 202 37 q 88 206 111 135 q 65 367 65 277 q 88 539 65 465 q 155 662 111 613 q 263 737 199 712 q 409 762 327 762 q 545 740 485 762 q 648 677 606 719 q 712 572 690 635 q 735 427 735 510 l 735 356 l 279 356 q 294 236 281 286 q 331 153 307 186 q 388 105 354 120 q 465 89 421 89 q 531 98 501 89 q 587 121 562 106 q 630 157 612 137 q 661 202 649 178 q 699 134 699 182 q 682 77 699 104 q 632 30 666 51 q 547 -1 598 10 q 425 -14 496 -14 m 159 1064 l 255 1064 q 288 1036 269 1052 q 328 1004 308 1021 q 369 970 349 986 q 405 938 389 953 q 440 970 420 953 q 481 1004 460 986 q 522 1036 502 1021 q 556 1064 542 1052 l 652 1064 l 652 1045 q 614 1000 635 1026 q 570 947 592 974 q 529 892 548 919 q 499 842 510 865 l 312 842 q 282 892 301 865 q 241 947 262 919 q 197 1000 219 974 q 159 1045 175 1026 l 159 1064 "},"œ":{"x_min":65,"x_max":1241,"ha":1299,"o":"m 280 374 q 288 244 280 300 q 313 150 296 188 q 358 92 330 112 q 426 73 386 73 q 491 91 464 73 q 535 143 518 108 q 561 229 552 177 q 571 349 569 281 l 571 386 q 536 601 570 530 q 425 673 503 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 m 918 671 q 825 614 860 671 q 787 445 790 556 l 1028 445 q 1002 612 1028 553 q 918 671 975 671 m 933 -14 q 790 13 853 -14 q 680 92 727 40 q 570 11 635 37 q 423 -14 505 -14 q 273 10 340 -14 q 160 82 207 34 q 89 203 114 130 q 65 374 65 277 q 156 666 65 570 q 427 762 248 762 q 567 735 505 762 q 676 655 630 708 q 779 735 718 708 q 915 762 839 762 q 1051 740 991 762 q 1154 677 1112 719 q 1218 572 1196 635 q 1241 427 1241 510 l 1241 356 l 786 356 q 785 348 786 352 q 784 339 784 343 q 801 227 788 274 q 839 149 815 179 q 896 104 862 118 q 971 89 929 89 q 1037 98 1007 89 q 1093 121 1068 106 q 1136 157 1118 137 q 1167 202 1154 178 q 1205 134 1205 182 q 1189 77 1205 104 q 1139 30 1173 51 q 1055 -1 1106 10 q 933 -14 1004 -14 "},"#":{"x_min":39,"x_max":738,"ha":777,"o":"m 694 373 l 694 278 l 519 278 l 467 0 l 369 0 l 421 278 l 276 278 l 223 0 l 124 0 l 177 278 l 39 278 l 39 373 l 195 373 l 244 626 l 83 626 l 83 723 l 262 723 l 311 992 l 410 992 l 360 723 l 505 723 l 557 992 l 656 992 l 604 723 l 738 723 l 738 626 l 586 626 l 539 373 l 694 373 m 294 373 l 440 373 l 489 626 l 343 626 l 294 373 "},"Џ":{"x_min":38.453125,"x_max":1084.875,"ha":1124,"o":"m 1084 992 l 1084 918 l 1026 918 q 999 916 1012 918 q 977 904 987 913 q 961 879 967 895 q 956 835 956 863 l 956 164 q 961 116 956 134 q 976 89 966 99 q 999 76 986 80 q 1026 73 1012 73 l 1084 73 l 1084 0 l 757 0 q 691 -16 719 0 q 645 -68 664 -33 q 617 -159 626 -104 q 608 -292 608 -214 l 516 -292 q 506 -161 516 -216 q 474 -70 495 -105 q 425 -17 454 -34 q 360 0 396 0 l 38 0 l 38 73 l 96 73 q 123 76 111 73 q 146 88 136 79 q 162 114 156 97 q 168 158 168 130 l 168 828 q 162 876 168 858 q 147 903 157 893 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 517 992 l 517 918 l 458 918 q 430 915 443 918 q 408 903 417 912 q 392 876 398 893 q 387 828 387 858 l 387 84 l 736 84 l 736 828 q 730 876 736 858 q 715 903 725 893 q 692 915 705 912 q 665 918 679 918 l 606 918 l 606 992 l 1084 992 "},"Å":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 m 696 1066 q 683 1000 696 1028 q 647 953 670 972 q 594 924 624 934 q 529 915 563 915 q 463 924 494 915 q 410 953 433 934 q 374 1000 387 972 q 362 1066 362 1028 q 374 1131 362 1102 q 410 1178 387 1159 q 463 1207 433 1197 q 529 1217 494 1217 q 594 1207 563 1217 q 647 1178 624 1197 q 683 1131 670 1159 q 696 1066 696 1102 m 611 1066 q 604 1100 611 1086 q 587 1123 598 1114 q 560 1136 575 1132 q 529 1140 545 1140 q 497 1136 512 1140 q 470 1123 482 1132 q 453 1100 459 1114 q 446 1066 446 1086 q 453 1031 446 1045 q 470 1008 459 1017 q 497 995 482 999 q 529 990 512 990 q 560 995 545 990 q 587 1008 575 999 q 604 1031 598 1017 q 611 1066 611 1045 "},"ș":{"x_min":41.765625,"x_max":623,"ha":678,"o":"m 321 -14 q 192 -1 245 -14 q 105 32 139 10 q 57 83 72 53 q 41 148 41 113 q 54 202 41 182 q 88 234 68 223 q 130 250 108 246 q 171 253 153 253 q 182 175 171 210 q 212 117 193 141 q 259 80 232 93 q 321 67 287 67 q 383 74 357 67 q 425 95 409 82 q 450 126 442 108 q 458 162 458 143 q 450 203 458 185 q 422 237 441 221 q 369 268 402 253 q 287 300 336 283 q 188 342 231 320 q 116 392 145 364 q 71 457 86 421 q 56 540 56 493 q 77 637 56 596 q 138 706 98 678 q 232 747 177 733 q 354 761 287 761 q 466 749 420 761 q 541 720 512 738 q 584 678 570 702 q 597 632 597 655 q 565 560 597 585 q 456 536 532 536 q 425 644 456 605 q 334 682 394 682 q 291 676 311 682 q 255 660 270 671 q 230 633 239 649 q 221 596 221 617 q 229 556 221 573 q 259 522 238 538 q 317 490 281 506 q 411 454 354 473 q 496 417 457 437 q 563 369 535 396 q 607 308 591 342 q 623 230 623 274 q 602 127 623 172 q 544 50 582 81 q 449 2 505 19 q 321 -14 393 -14 m 214 -289 q 228 -242 220 -268 q 244 -189 236 -216 q 258 -134 251 -161 q 268 -85 264 -108 l 430 -85 l 430 -98 q 405 -147 420 -120 q 371 -202 389 -174 q 334 -257 353 -230 q 297 -307 315 -285 l 214 -307 l 214 -289 "},"¸":{"x_min":69,"x_max":387,"ha":463,"o":"m 387 -175 q 372 -241 387 -211 q 332 -291 358 -270 q 270 -323 306 -312 q 190 -334 234 -334 q 163 -332 179 -334 q 131 -329 148 -331 q 98 -324 114 -327 q 69 -318 81 -321 l 69 -233 q 119 -241 94 -239 q 163 -244 144 -244 q 225 -230 203 -244 q 248 -180 248 -216 q 240 -147 248 -160 q 218 -126 233 -134 q 185 -115 204 -118 q 144 -110 166 -111 l 173 12 l 252 12 l 238 -47 q 299 -60 272 -50 q 346 -86 327 -70 q 376 -125 365 -102 q 387 -175 387 -148 "},"=":{"x_min":87,"x_max":690,"ha":777,"o":"m 690 409 l 690 313 l 87 313 l 87 409 l 690 409 m 690 679 l 690 582 l 87 582 l 87 679 l 690 679 "},"ρ":{"x_min":115,"x_max":835,"ha":900,"o":"m 835 357 q 814 189 835 260 q 754 73 793 118 q 660 7 716 28 q 532 -14 604 -14 q 419 0 472 -14 q 321 49 365 15 q 323 0 323 30 q 324 -68 324 -30 l 324 -334 l 115 -334 l 115 406 q 135 557 115 491 q 198 669 155 623 q 305 738 240 714 q 459 762 370 762 q 612 735 543 762 q 730 657 681 708 q 807 530 780 605 q 835 357 835 455 m 620 360 q 611 493 620 435 q 581 591 601 551 q 532 652 562 631 q 462 673 502 673 q 395 654 422 673 q 353 600 369 635 q 331 516 337 565 q 324 406 324 466 l 324 152 q 397 95 358 116 q 487 73 437 73 q 541 88 517 73 q 584 137 566 104 q 611 226 601 171 q 620 360 620 281 "},"Ћ":{"x_min":13,"x_max":1204.3125,"ha":1229,"o":"m 739 0 l 739 73 l 797 73 q 825 76 812 73 q 847 89 838 80 q 862 116 857 99 q 867 164 867 134 l 867 298 q 858 390 867 352 q 829 451 849 427 q 779 486 810 476 q 703 497 747 497 q 652 494 677 497 q 605 486 627 491 q 566 475 584 481 q 536 464 548 469 l 536 164 q 541 116 536 134 q 556 89 546 99 q 578 76 565 80 q 606 73 591 73 l 664 73 l 664 0 l 185 0 l 185 73 l 243 73 q 272 76 259 73 q 294 89 285 80 q 309 116 304 99 q 315 164 315 134 l 315 907 l 231 907 q 179 900 200 907 q 144 881 158 893 q 125 850 131 868 q 116 809 118 832 l 106 723 l 13 723 l 20 992 l 830 992 l 837 723 l 744 723 l 733 809 q 724 850 731 832 q 705 881 718 868 q 670 900 691 893 q 618 907 649 907 l 536 907 l 536 566 q 577 579 553 572 q 633 593 602 587 q 701 604 664 600 q 780 609 738 609 q 908 594 851 609 q 1006 545 966 580 q 1067 453 1046 511 q 1089 308 1089 395 l 1089 164 q 1094 116 1089 134 q 1109 89 1099 99 q 1131 76 1118 80 q 1159 73 1144 73 l 1204 73 l 1204 0 l 739 0 "},"ú":{"x_min":36.34375,"x_max":891.4375,"ha":926,"o":"m 614 0 l 584 97 l 577 97 q 532 39 556 61 q 479 6 507 17 q 421 -9 452 -5 q 358 -14 390 -14 q 191 53 249 -14 q 134 260 134 120 l 134 572 q 128 622 134 603 q 111 652 123 641 q 82 667 100 662 q 39 671 64 671 l 36 671 l 36 745 l 344 745 l 344 299 q 349 218 344 254 q 367 157 355 182 q 399 117 379 131 q 450 104 419 104 q 507 118 483 104 q 546 160 531 133 q 568 227 561 188 q 576 315 576 266 l 576 582 q 567 630 576 612 q 546 657 559 647 q 514 668 532 666 q 475 671 496 671 l 471 671 l 471 745 l 787 745 l 787 161 q 794 113 787 130 q 813 87 801 96 q 842 76 825 78 q 879 73 859 73 l 891 73 l 891 0 l 614 0 m 358 860 q 391 905 372 879 q 428 958 409 931 q 464 1013 447 986 q 491 1064 480 1040 l 710 1064 l 710 1049 q 667 1004 697 1031 q 600 946 637 976 q 524 889 563 917 q 452 842 484 860 l 358 842 l 358 860 "},"˚":{"x_min":64,"x_max":398,"ha":463,"o":"m 398 979 q 385 913 398 941 q 349 866 372 885 q 296 837 326 847 q 231 828 265 828 q 165 837 196 828 q 112 866 135 847 q 76 913 89 885 q 64 979 64 941 q 76 1044 64 1015 q 112 1091 89 1072 q 165 1120 135 1110 q 231 1130 196 1130 q 296 1120 265 1130 q 349 1091 326 1110 q 385 1044 372 1072 q 398 979 398 1015 m 313 979 q 306 1013 313 999 q 289 1036 300 1027 q 262 1049 277 1045 q 231 1053 247 1053 q 199 1049 214 1053 q 172 1036 184 1045 q 155 1013 161 1027 q 148 979 148 999 q 155 944 148 958 q 172 921 161 930 q 199 908 184 912 q 231 903 214 903 q 262 908 247 903 q 289 921 277 912 q 306 944 300 930 q 313 979 313 958 "},"д":{"x_min":18,"x_max":833,"ha":868,"o":"m 816 745 l 816 671 l 800 671 q 767 668 785 671 q 735 655 749 664 q 710 628 720 645 q 701 580 701 610 l 701 152 q 709 112 701 128 q 731 89 717 97 q 763 77 745 80 q 801 73 781 74 l 833 73 l 833 -292 l 736 -292 l 729 -190 q 714 -102 726 -138 q 683 -43 701 -65 q 643 -10 665 -20 q 599 0 622 0 l 255 0 q 198 -10 222 0 q 158 -43 174 -20 q 132 -102 142 -65 q 120 -190 123 -138 l 113 -292 l 18 -292 l 18 79 l 113 79 q 155 163 133 111 q 198 287 177 214 q 219 367 209 326 q 237 449 229 409 q 249 526 244 489 q 254 590 254 562 q 244 632 254 616 q 220 656 235 648 q 183 668 204 664 q 140 671 163 671 l 134 671 l 134 745 l 816 745 m 496 665 l 348 665 q 316 426 336 531 q 275 249 296 322 q 257 193 265 217 q 241 148 249 168 q 226 111 234 128 q 210 79 218 94 l 496 79 l 496 665 "},"¯":{"x_min":-7,"x_max":644,"ha":638,"o":"m 644 1055 l -7 1055 l -7 1137 l 644 1137 l 644 1055 "},"u":{"x_min":36.34375,"x_max":891.4375,"ha":926,"o":"m 614 0 l 584 97 l 577 97 q 532 39 556 61 q 479 6 507 17 q 421 -9 452 -5 q 358 -14 390 -14 q 191 53 249 -14 q 134 260 134 120 l 134 572 q 128 622 134 603 q 111 652 123 641 q 82 667 100 662 q 39 671 64 671 l 36 671 l 36 745 l 344 745 l 344 299 q 349 218 344 254 q 367 157 355 182 q 399 117 379 131 q 450 104 419 104 q 507 118 483 104 q 546 160 531 133 q 568 227 561 188 q 576 315 576 266 l 576 582 q 567 630 576 612 q 546 657 559 647 q 514 668 532 666 q 475 671 496 671 l 471 671 l 471 745 l 787 745 l 787 161 q 794 113 787 130 q 813 87 801 96 q 842 76 825 78 q 879 73 859 73 l 891 73 l 891 0 l 614 0 "},"З":{"x_min":50,"x_max":807,"ha":857,"o":"m 397 -16 q 240 1 305 -16 q 132 47 174 18 q 70 113 90 76 q 50 191 50 151 q 86 279 50 246 q 197 312 123 312 q 218 213 203 258 q 257 138 233 169 q 318 90 282 107 q 401 73 353 73 q 541 122 490 73 q 592 274 592 170 q 579 357 592 321 q 536 418 565 393 q 460 455 506 443 q 351 468 414 468 l 223 468 l 223 555 l 348 555 q 506 605 453 555 q 559 758 559 655 q 550 827 559 796 q 524 878 542 857 q 478 910 506 899 q 410 921 450 921 q 337 903 366 921 q 291 856 308 885 q 266 787 273 826 q 259 705 259 748 q 188 710 221 705 q 130 727 155 715 q 92 763 106 740 q 78 820 78 785 q 101 891 78 858 q 167 950 124 925 q 272 991 210 976 q 412 1006 334 1006 q 557 992 491 1006 q 671 950 623 978 q 745 877 719 921 q 772 773 772 834 q 754 676 772 719 q 705 602 736 634 q 634 550 675 571 q 546 519 593 529 q 630 501 585 514 q 715 461 675 488 q 780 390 754 434 q 807 283 807 347 q 774 145 807 202 q 685 53 741 89 q 555 0 629 17 q 397 -16 480 -16 "},"Α":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 "},"⅝":{"x_min":33,"x_max":1136,"ha":1167,"o":"m 241 460 q 284 466 265 460 q 317 489 304 473 q 338 528 331 504 q 345 587 345 553 q 312 667 345 640 q 219 694 280 694 q 153 687 179 694 q 106 669 127 679 l 59 679 l 91 992 l 445 992 l 450 821 l 395 821 l 390 846 q 385 861 388 855 q 377 872 382 867 q 362 878 372 876 q 337 880 353 880 l 151 880 l 136 745 q 185 757 153 751 q 262 764 218 764 q 430 719 370 764 q 490 584 490 674 q 473 504 490 540 q 425 442 457 468 q 348 402 394 416 q 244 389 303 389 q 149 397 189 389 q 83 420 109 405 q 45 457 57 435 q 33 505 33 478 q 38 535 33 521 q 55 559 43 549 q 86 575 66 569 q 134 580 106 580 q 142 535 134 557 q 163 497 149 513 q 197 470 177 480 q 241 460 217 460 m 386 0 l 278 0 l 773 992 l 881 992 l 386 0 m 653 152 q 664 202 653 181 q 694 240 675 223 q 740 270 714 257 q 795 294 766 283 q 749 322 771 306 q 711 357 727 337 q 684 402 694 377 q 675 457 675 427 q 687 511 675 484 q 726 559 699 537 q 796 593 753 580 q 902 607 840 607 q 989 597 950 607 q 1055 569 1028 588 q 1097 525 1082 551 q 1112 466 1112 499 q 1102 420 1112 441 q 1076 382 1093 399 q 1038 351 1060 364 q 992 327 1017 337 q 1053 296 1026 312 q 1098 260 1079 280 q 1126 215 1116 240 q 1136 158 1136 190 q 1120 92 1136 122 q 1074 38 1105 61 q 997 2 1043 15 q 889 -10 951 -10 q 786 2 830 -10 q 712 37 741 15 q 667 89 682 59 q 653 152 653 118 m 897 51 q 968 72 942 51 q 994 137 994 93 q 986 176 994 159 q 961 208 977 194 q 921 235 945 222 q 864 261 896 248 q 814 215 834 243 q 794 147 794 187 q 820 78 794 105 q 897 51 846 51 m 963 463 q 959 495 963 480 q 945 521 954 510 q 923 539 937 532 q 893 545 910 545 q 841 525 858 545 q 823 470 823 505 q 831 431 823 447 q 851 401 839 414 q 880 379 864 388 q 912 362 896 370 q 949 400 935 377 q 963 463 963 423 "},"é":{"x_min":65,"x_max":735,"ha":793,"o":"m 412 671 q 319 614 354 671 q 282 445 285 556 l 522 445 q 516 540 522 497 q 497 611 510 582 q 463 656 483 640 q 412 671 442 671 m 425 -14 q 269 11 337 -14 q 156 86 202 37 q 88 206 111 135 q 65 367 65 277 q 88 539 65 465 q 155 662 111 613 q 263 737 199 712 q 409 762 327 762 q 545 740 485 762 q 648 677 606 719 q 712 572 690 635 q 735 427 735 510 l 735 356 l 279 356 q 294 236 281 286 q 331 153 307 186 q 388 105 354 120 q 465 89 421 89 q 531 98 501 89 q 587 121 562 106 q 630 157 612 137 q 661 202 649 178 q 699 134 699 182 q 682 77 699 104 q 632 30 666 51 q 547 -1 598 10 q 425 -14 496 -14 m 321 860 q 354 905 335 879 q 391 958 372 931 q 427 1013 410 986 q 454 1064 443 1040 l 673 1064 l 673 1049 q 630 1004 660 1031 q 563 946 600 976 q 487 889 526 917 q 415 842 447 860 l 321 842 l 321 860 "},"Ş":{"x_min":41.203125,"x_max":745,"ha":814,"o":"m 366 -14 q 210 3 273 -14 q 110 49 148 21 q 57 111 73 76 q 41 179 41 146 q 54 240 41 215 q 89 280 67 264 q 139 302 111 295 q 198 309 168 309 q 212 204 198 249 q 252 129 227 159 q 312 83 277 99 q 388 68 347 68 q 461 80 429 68 q 515 112 493 91 q 549 160 538 132 q 561 219 561 187 q 546 282 561 254 q 503 333 532 309 q 431 377 474 356 q 329 423 387 399 q 206 485 256 453 q 126 553 156 516 q 82 632 95 590 q 69 726 69 675 q 94 841 69 790 q 166 930 120 893 q 273 986 211 966 q 409 1006 336 1006 q 542 993 486 1006 q 634 959 597 980 q 688 908 670 937 q 705 844 705 878 q 695 799 705 820 q 663 762 684 778 q 609 738 641 746 q 534 729 577 729 q 526 792 534 758 q 501 854 519 825 q 455 902 483 883 q 387 921 427 921 q 334 913 359 921 q 290 888 309 904 q 260 848 271 872 q 250 792 250 824 q 259 737 250 763 q 294 687 269 712 q 364 637 320 662 q 479 584 408 613 q 601 524 550 555 q 683 459 651 494 q 730 382 715 424 q 745 289 745 340 q 718 166 745 222 q 642 70 692 110 q 523 8 592 30 q 366 -14 453 -14 m 554 -175 q 539 -241 554 -211 q 499 -291 525 -270 q 437 -323 473 -312 q 357 -334 401 -334 q 330 -332 346 -334 q 298 -329 315 -331 q 265 -324 281 -327 q 236 -318 248 -321 l 236 -233 q 286 -241 261 -239 q 330 -244 311 -244 q 392 -230 370 -244 q 415 -180 415 -216 q 407 -147 415 -160 q 385 -126 400 -134 q 352 -115 371 -118 q 311 -110 333 -111 l 340 12 l 419 12 l 405 -47 q 466 -60 439 -50 q 513 -86 494 -70 q 543 -125 532 -102 q 554 -175 554 -148 "},"B":{"x_min":38.453125,"x_max":884,"ha":933,"o":"m 842 739 q 829 659 842 693 q 793 600 816 624 q 738 557 770 575 q 666 527 706 539 l 666 520 q 754 487 715 508 q 823 435 794 466 q 868 363 852 404 q 884 272 884 322 q 784 67 884 135 q 486 0 684 0 l 38 0 l 38 73 l 95 73 q 124 76 111 73 q 146 89 137 80 q 162 116 156 99 q 168 164 168 134 l 168 829 q 162 874 168 857 q 146 901 156 892 q 123 915 136 911 q 95 918 110 918 l 38 918 l 38 992 l 444 992 q 742 930 642 992 q 842 739 842 869 m 387 84 l 479 84 q 558 94 525 84 q 611 127 590 105 q 640 187 631 150 q 650 276 650 223 q 641 365 650 327 q 614 427 633 402 q 562 464 594 451 q 482 476 530 476 l 387 476 l 387 84 m 387 561 l 440 561 q 521 571 489 561 q 573 602 553 581 q 600 657 592 624 q 608 739 608 691 q 599 818 608 786 q 569 870 590 850 q 516 898 549 889 q 437 906 484 906 l 387 906 l 387 561 "},"…":{"x_min":97,"x_max":1169,"ha":1267,"o":"m 97 99 q 105 152 97 131 q 129 187 114 174 q 166 205 145 200 q 211 211 187 211 q 254 205 234 211 q 291 187 275 200 q 315 152 306 174 q 325 99 325 131 q 315 47 325 68 q 291 13 306 26 q 254 -5 275 0 q 211 -11 234 -11 q 166 -5 187 -11 q 129 13 145 0 q 105 47 114 26 q 97 99 97 68 m 520 99 q 528 152 520 131 q 552 187 537 174 q 589 205 568 200 q 634 211 610 211 q 677 205 657 211 q 714 187 698 200 q 738 152 729 174 q 748 99 748 131 q 738 47 748 68 q 714 13 729 26 q 677 -5 698 0 q 634 -11 657 -11 q 589 -5 610 -11 q 552 13 568 0 q 528 47 537 26 q 520 99 520 68 m 942 99 q 950 152 942 131 q 974 187 959 174 q 1010 205 990 200 q 1055 211 1031 211 q 1098 205 1078 211 q 1135 187 1119 200 q 1159 152 1150 174 q 1169 99 1169 131 q 1159 47 1169 68 q 1135 13 1150 26 q 1098 -5 1119 0 q 1055 -11 1078 -11 q 1010 -5 1031 -11 q 974 13 990 0 q 950 47 959 26 q 942 99 942 68 "},"H":{"x_min":38.453125,"x_max":1097.859375,"ha":1137,"o":"m 618 0 l 618 73 l 678 73 q 705 76 692 73 q 728 89 718 80 q 743 116 738 99 q 749 164 749 134 l 749 475 l 387 475 l 387 164 q 392 116 387 134 q 408 89 398 99 q 430 76 417 80 q 458 73 443 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 877 168 861 q 146 903 156 894 q 123 915 136 911 q 96 918 111 918 l 38 918 l 38 992 l 517 992 l 517 918 l 458 918 q 430 915 443 918 q 408 902 417 911 q 392 875 398 892 q 387 827 387 857 l 387 560 l 749 560 l 749 827 q 743 875 749 857 q 728 902 738 892 q 705 915 718 911 q 678 918 692 918 l 618 918 l 618 992 l 1097 992 l 1097 918 l 1039 918 q 1012 915 1025 918 q 989 902 999 911 q 974 875 979 892 q 969 827 969 857 l 969 156 q 974 112 969 129 q 990 87 980 96 q 1012 76 1000 79 q 1039 73 1025 73 l 1097 73 l 1097 0 l 618 0 "},"î":{"x_min":-20,"x_max":473,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m -20 860 q 18 905 -3 879 q 62 958 40 931 q 103 1013 83 986 q 133 1064 122 1040 l 320 1064 q 350 1013 331 1040 q 391 958 369 986 q 435 905 413 931 q 473 860 456 879 l 473 842 l 377 842 q 343 869 363 853 q 302 901 323 884 q 261 935 281 918 q 226 966 241 952 q 190 935 210 952 q 149 901 170 918 q 109 869 129 884 q 76 842 90 853 l -20 842 l -20 860 "},"ν":{"x_min":-45.21875,"x_max":737,"ha":804,"o":"m 737 623 q 725 517 737 573 q 694 402 714 461 q 645 286 673 344 q 583 175 617 228 q 511 78 549 123 q 433 0 473 33 l 299 0 q 254 171 276 89 q 210 325 232 254 q 168 455 189 397 q 125 555 146 513 q 81 619 104 597 q 36 642 59 642 q 10 637 25 642 q -17 625 -4 632 l -45 683 q -1 707 -25 695 q 47 729 21 720 q 97 745 72 739 q 148 751 123 751 q 207 739 180 751 q 259 700 234 728 q 305 626 283 672 q 350 512 327 581 q 398 349 374 443 q 452 133 423 256 q 524 234 494 179 q 575 345 555 290 q 605 453 595 401 q 614 544 614 505 q 608 591 614 571 q 590 626 601 612 q 566 649 580 640 q 538 661 553 657 q 546 705 538 686 q 566 734 553 723 q 596 752 579 746 q 631 758 612 758 q 679 746 659 758 q 712 715 699 734 q 731 672 725 696 q 737 623 737 648 "},"Ό":{"x_min":-53,"x_max":1040,"ha":1117,"o":"m 1040 496 q 1009 287 1040 382 q 918 126 978 193 q 771 22 858 59 q 571 -14 684 -14 q 364 22 452 -14 q 217 126 275 59 q 130 288 159 193 q 101 498 101 382 q 130 707 101 613 q 217 867 159 801 q 364 970 276 934 q 572 1007 453 1007 q 772 970 685 1007 q 918 867 859 934 q 1009 706 978 800 q 1040 496 1040 612 m 334 496 q 347 319 334 397 q 388 187 360 241 q 461 104 416 133 q 571 76 506 76 q 681 104 636 76 q 753 187 726 133 q 794 319 781 241 q 806 496 806 397 q 794 674 806 596 q 753 806 781 752 q 681 888 726 860 q 572 916 636 916 q 462 888 507 916 q 388 806 416 860 q 347 674 360 752 q 334 496 334 596 m -53 788 q -38 835 -46 809 q -23 888 -31 861 q -9 943 -16 916 q 0 993 -3 969 l 190 993 l 190 978 q 163 930 180 957 q 127 875 147 903 q 85 820 107 847 q 43 770 63 793 l -53 770 l -53 788 "},"−":{"x_min":90,"x_max":687,"ha":777,"o":"m 687 446 l 90 446 l 90 546 l 687 546 l 687 446 "},"⅜":{"x_min":49,"x_max":1136,"ha":1167,"o":"m 319 854 q 304 920 319 897 q 254 943 290 943 q 218 933 232 943 q 195 906 203 923 q 182 868 186 890 q 179 822 179 846 q 129 824 151 822 q 91 834 106 827 q 66 852 75 840 q 58 881 58 863 q 71 930 58 907 q 109 969 84 953 q 171 996 134 986 q 257 1006 209 1006 q 343 996 305 1006 q 410 969 382 987 q 453 926 438 951 q 468 868 468 900 q 430 768 468 807 q 326 714 392 730 l 326 706 q 387 694 357 702 q 440 672 417 687 q 477 633 463 657 q 492 571 492 609 q 466 485 492 520 q 400 429 440 450 q 313 398 361 407 q 224 389 266 389 q 121 399 167 389 q 49 422 76 409 l 49 494 q 82 482 63 488 q 122 471 101 476 q 165 463 143 466 q 207 460 186 460 q 310 486 273 460 q 347 574 347 513 q 309 645 347 620 q 196 670 272 670 l 150 670 l 150 736 l 196 736 q 244 744 221 736 q 283 768 267 752 q 309 806 300 784 q 319 854 319 828 m 384 0 l 276 0 l 771 992 l 879 992 l 384 0 m 653 152 q 664 202 653 181 q 694 240 675 223 q 740 270 714 257 q 795 294 766 283 q 749 322 771 306 q 711 357 727 337 q 684 402 694 377 q 675 457 675 427 q 687 511 675 484 q 726 559 699 537 q 796 593 753 580 q 902 607 840 607 q 989 597 950 607 q 1055 569 1028 588 q 1097 525 1082 551 q 1112 466 1112 499 q 1102 420 1112 441 q 1076 382 1093 399 q 1038 351 1060 364 q 992 327 1017 337 q 1053 296 1026 312 q 1098 260 1079 280 q 1126 215 1116 240 q 1136 158 1136 190 q 1120 92 1136 122 q 1074 38 1105 61 q 997 2 1043 15 q 889 -10 951 -10 q 786 2 830 -10 q 712 37 741 15 q 667 89 682 59 q 653 152 653 118 m 897 51 q 968 72 942 51 q 994 137 994 93 q 986 176 994 159 q 961 208 977 194 q 921 235 945 222 q 864 261 896 248 q 814 215 834 243 q 794 147 794 187 q 820 78 794 105 q 897 51 846 51 m 963 463 q 959 495 963 480 q 945 521 954 510 q 923 539 937 532 q 893 545 910 545 q 841 525 858 545 q 823 470 823 505 q 831 431 823 447 q 851 401 839 414 q 880 379 864 388 q 912 362 896 370 q 949 400 935 377 q 963 463 963 423 "},"ǰ":{"x_min":-29,"x_max":464,"ha":480,"o":"m 349 745 l 349 -10 q 325 -166 349 -104 q 257 -265 301 -228 q 153 -318 213 -302 q 21 -334 92 -334 l -5 -334 l -5 -247 l 2 -247 q 60 -235 35 -247 q 103 -194 86 -223 q 129 -118 120 -166 q 139 0 139 -71 l 139 579 q 130 627 139 609 q 106 655 121 645 q 70 668 90 664 q 27 671 50 671 l 23 671 l 23 745 l 349 745 m -29 1064 l 67 1064 q 100 1036 81 1052 q 140 1004 120 1021 q 181 970 161 986 q 217 938 201 953 q 252 970 232 953 q 293 1004 272 986 q 334 1036 314 1021 q 368 1064 354 1052 l 464 1064 l 464 1045 q 426 1000 447 1026 q 382 947 404 974 q 341 892 360 919 q 311 842 322 865 l 124 842 q 94 892 113 865 q 53 947 74 919 q 9 1000 31 974 q -29 1045 -12 1026 l -29 1064 "},"ā":{"x_min":62,"x_max":786.859375,"ha":832,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 265 487 224 l 487 369 l 424 365 q 354 352 383 363 q 309 321 326 341 q 285 273 292 301 q 277 206 277 244 m 401 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 534 749 479 762 q 625 709 588 736 q 679 636 661 681 q 698 526 698 591 l 698 172 q 702 124 698 143 q 716 94 706 105 q 742 78 725 83 q 781 73 758 73 l 786 73 l 786 0 l 528 0 l 499 95 l 487 95 q 443 46 464 67 q 400 12 423 26 q 348 -7 377 -1 q 280 -14 319 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 212 62 154 q 139 379 62 325 q 373 438 217 434 l 487 443 l 487 519 q 484 583 487 554 q 472 633 481 612 q 446 665 464 654 q 401 677 429 677 m 600 842 l 197 842 l 197 951 l 600 951 l 600 842 "},"ĵ":{"x_min":-29,"x_max":464,"ha":480,"o":"m 349 745 l 349 -10 q 325 -166 349 -104 q 257 -265 301 -228 q 153 -318 213 -302 q 21 -334 92 -334 l -5 -334 l -5 -247 l 2 -247 q 60 -235 35 -247 q 103 -194 86 -223 q 129 -118 120 -166 q 139 0 139 -71 l 139 579 q 130 627 139 609 q 106 655 121 645 q 70 668 90 664 q 27 671 50 671 l 23 671 l 23 745 l 349 745 m -29 860 q 9 905 -12 879 q 53 958 31 931 q 94 1013 74 986 q 124 1064 113 1040 l 311 1064 q 341 1013 322 1040 q 382 958 360 986 q 426 905 404 931 q 464 860 447 879 l 464 842 l 368 842 q 334 869 354 853 q 293 901 314 884 q 252 935 272 918 q 217 966 232 952 q 181 935 201 952 q 140 901 161 918 q 100 869 120 884 q 67 842 81 853 l -29 842 l -29 860 "},"Ĩ":{"x_min":1,"x_max":551,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 m 392 1203 q 419 1209 407 1203 q 440 1225 431 1215 q 453 1249 448 1235 q 460 1276 458 1262 l 551 1276 q 535 1197 548 1234 q 499 1131 521 1159 q 445 1087 476 1103 q 377 1071 414 1071 q 309 1084 340 1071 q 253 1114 279 1098 q 204 1145 227 1131 q 159 1158 182 1158 q 132 1152 144 1158 q 111 1136 120 1146 q 98 1112 103 1126 q 91 1085 93 1099 l 1 1085 q 16 1164 3 1127 q 53 1230 30 1202 q 107 1274 76 1258 q 175 1291 138 1291 q 243 1277 213 1291 q 299 1247 273 1263 q 348 1216 325 1230 q 392 1203 371 1203 "},"*":{"x_min":48.859375,"x_max":648.40625,"ha":697,"o":"m 48 838 l 111 979 l 318 829 l 272 1055 l 427 1055 l 377 831 l 586 976 l 648 837 l 432 783 l 648 727 l 586 589 l 377 734 l 426 510 l 272 510 l 316 735 l 111 588 l 48 726 l 265 783 l 48 838 "},"ă":{"x_min":62,"x_max":786.859375,"ha":832,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 265 487 224 l 487 369 l 424 365 q 354 352 383 363 q 309 321 326 341 q 285 273 292 301 q 277 206 277 244 m 401 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 534 749 479 762 q 625 709 588 736 q 679 636 661 681 q 698 526 698 591 l 698 172 q 702 124 698 143 q 716 94 706 105 q 742 78 725 83 q 781 73 758 73 l 786 73 l 786 0 l 528 0 l 499 95 l 487 95 q 443 46 464 67 q 400 12 423 26 q 348 -7 377 -1 q 280 -14 319 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 212 62 154 q 139 379 62 325 q 373 438 217 434 l 487 443 l 487 519 q 484 583 487 554 q 472 633 481 612 q 446 665 464 654 q 401 677 429 677 m 396 842 q 300 861 341 842 q 231 911 259 880 q 189 981 203 942 q 174 1060 175 1020 l 265 1060 q 311 987 277 1009 q 396 965 344 965 q 481 987 447 965 q 526 1060 515 1009 l 619 1060 q 603 981 617 1020 q 561 911 589 942 q 492 861 533 880 q 396 842 451 842 "},"Χ":{"x_min":13.71875,"x_max":1003.546875,"ha":1017,"o":"m 727 878 q 720 898 727 890 q 704 910 714 906 q 679 917 693 915 q 649 918 665 918 l 645 918 l 645 992 l 970 992 l 970 918 l 957 918 q 921 913 937 918 q 888 896 904 908 q 856 865 872 884 q 820 818 840 846 l 618 543 l 874 147 q 930 89 901 104 q 985 73 959 73 l 1003 73 l 1003 0 l 545 0 l 545 73 l 551 73 q 635 119 635 73 q 633 134 635 127 q 627 152 632 142 q 613 177 622 162 q 588 215 604 192 l 461 408 l 311 205 q 287 165 298 187 q 275 120 275 142 q 294 85 275 97 q 359 73 313 73 l 364 73 l 364 0 l 13 0 l 13 73 l 22 73 q 66 80 47 73 q 102 100 85 87 q 134 130 118 112 q 167 170 150 148 l 410 487 l 181 844 q 158 877 169 863 q 133 900 147 890 q 102 914 119 909 q 61 918 85 918 l 43 918 l 43 992 l 503 992 l 503 918 l 499 918 q 459 915 475 918 q 433 906 443 912 q 420 893 424 901 q 417 878 417 886 q 427 842 417 863 q 453 796 437 820 l 568 624 l 689 793 q 714 835 701 812 q 727 878 727 859 "},"†":{"x_min":48.875,"x_max":615.40625,"ha":664,"o":"m 435 510 q 401 325 416 428 q 378 115 388 236 q 368 -154 368 -6 l 295 -154 q 285 113 295 -7 q 263 323 276 234 q 232 510 249 426 l 295 666 l 48 628 l 48 789 l 295 753 l 245 1055 l 421 1055 l 368 753 l 615 789 l 615 628 l 368 666 l 435 510 "},"°":{"x_min":66,"x_max":487,"ha":555,"o":"m 66 780 q 82 863 66 824 q 127 930 99 901 q 194 975 156 958 q 276 992 232 992 q 358 975 320 992 q 425 930 396 958 q 470 863 453 901 q 487 780 487 824 q 470 698 487 737 q 425 632 453 660 q 358 587 396 603 q 276 571 320 571 q 194 587 232 571 q 127 632 156 603 q 82 698 99 660 q 66 780 66 737 m 162 780 q 171 736 162 757 q 195 699 179 715 q 231 674 211 683 q 276 665 252 665 q 321 674 300 665 q 358 699 342 683 q 382 736 373 715 q 391 780 391 757 q 382 826 391 805 q 358 863 373 848 q 321 888 342 879 q 276 897 300 897 q 231 888 252 897 q 195 863 211 879 q 171 826 179 848 q 162 780 162 805 "},"Ξ":{"x_min":45,"x_max":832,"ha":876,"o":"m 825 0 l 51 0 l 45 315 l 131 315 l 136 273 q 146 233 139 252 q 166 200 152 214 q 200 178 179 186 q 253 169 221 169 l 623 169 q 676 178 655 169 q 710 200 697 186 q 730 233 723 214 q 740 273 737 252 l 745 315 l 832 315 l 825 0 m 790 693 l 703 693 l 698 734 q 688 774 695 755 q 668 808 682 793 q 634 830 655 822 q 581 839 612 839 l 294 839 q 241 830 263 839 q 207 808 220 822 q 187 774 193 793 q 177 734 180 755 l 172 693 l 86 693 l 92 992 l 783 992 l 790 693 m 305 639 l 312 612 q 321 585 316 597 q 335 565 325 574 q 364 553 345 557 q 413 549 382 549 l 462 549 q 508 553 490 549 q 538 566 526 557 q 556 586 550 574 q 566 612 562 598 l 573 639 l 645 639 l 645 374 l 573 374 l 566 400 q 556 426 562 414 q 538 446 550 438 q 508 459 526 455 q 462 464 490 464 l 413 464 q 364 459 382 464 q 335 447 345 455 q 321 427 325 439 q 312 400 316 415 l 305 374 l 233 374 l 233 639 l 305 639 "},"Ķ":{"x_min":38.453125,"x_max":1019,"ha":1019,"o":"m 602 739 q 640 782 625 763 q 664 818 655 802 q 677 850 673 835 q 681 879 681 865 q 664 911 681 902 q 603 920 646 920 l 603 992 l 980 992 l 980 920 q 926 911 951 920 q 876 886 901 902 q 828 847 852 869 q 780 797 804 825 l 597 596 l 855 185 q 894 131 875 153 q 932 97 913 110 q 970 79 951 84 q 1013 73 990 73 l 1019 73 l 1019 0 l 944 0 q 851 3 891 0 q 781 13 811 6 q 729 30 751 20 q 691 55 707 41 q 661 87 675 69 q 635 127 648 105 l 448 447 l 387 398 l 387 164 q 392 116 387 134 q 408 89 398 99 q 431 76 417 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 903 417 912 q 392 876 398 893 q 387 828 387 858 l 387 504 l 602 739 m 432 -289 q 446 -242 438 -268 q 462 -189 454 -216 q 476 -134 469 -161 q 486 -85 482 -108 l 648 -85 l 648 -98 q 623 -147 638 -120 q 589 -202 607 -174 q 552 -257 571 -230 q 515 -307 533 -285 l 432 -307 l 432 -289 "},"ŵ":{"x_min":-4.40625,"x_max":1190.078125,"ha":1189,"o":"m 686 737 l 821 327 q 846 242 838 277 q 858 181 853 207 l 862 181 q 868 215 865 199 q 876 247 871 230 q 886 284 880 264 q 899 330 891 304 l 960 533 q 970 571 966 550 q 973 603 973 591 q 951 654 973 638 q 881 671 928 671 l 871 671 l 871 745 l 1190 745 l 1190 671 l 1172 671 q 1137 667 1152 671 q 1110 651 1122 662 q 1089 617 1099 639 q 1068 562 1078 596 l 888 0 l 739 0 l 587 461 l 427 0 l 276 0 l 98 597 q 81 633 90 619 q 61 656 72 648 q 34 667 49 664 q 0 671 20 671 l -4 671 l -4 745 l 402 745 l 402 671 l 384 671 q 321 659 342 671 q 300 612 300 647 q 304 584 300 601 q 312 553 308 568 l 363 372 q 376 320 370 347 q 388 269 382 294 q 398 221 393 244 q 405 181 402 199 l 409 181 q 425 253 415 216 q 454 341 436 290 l 595 737 l 686 737 m 376 860 q 414 905 392 879 q 458 958 436 931 q 499 1013 479 986 q 529 1064 518 1040 l 716 1064 q 746 1013 727 1040 q 787 958 765 986 q 831 905 809 931 q 869 860 852 879 l 869 842 l 773 842 q 739 869 759 853 q 698 901 719 884 q 657 935 677 918 q 622 966 637 952 q 586 935 606 952 q 545 901 566 918 q 505 869 525 884 q 472 842 486 853 l 376 842 l 376 860 "},"΄":{"x_min":306,"x_max":549,"ha":802,"o":"m 306 860 q 320 907 312 881 q 335 960 327 932 q 349 1014 342 987 q 359 1064 355 1041 l 549 1064 l 549 1050 q 522 1001 539 1028 q 486 947 506 974 q 444 892 466 919 q 402 842 422 865 l 306 842 l 306 860 "},"ǽ":{"x_min":62,"x_max":1157,"ha":1215,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 264 487 223 l 487 369 l 424 364 q 354 351 383 362 q 309 320 326 340 q 285 272 292 301 q 277 206 277 244 m 834 671 q 741 614 776 671 q 703 445 706 556 l 944 445 q 918 612 944 553 q 834 671 891 671 m 849 -14 q 672 19 746 -14 q 553 118 598 53 q 437 17 506 49 q 280 -14 368 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 211 62 154 q 139 379 62 324 q 373 438 217 433 l 487 442 l 487 519 q 484 582 487 553 q 472 633 481 612 q 446 665 463 654 q 400 677 429 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 535 743 480 762 q 627 683 590 725 q 719 741 668 721 q 831 762 769 762 q 967 740 907 762 q 1070 677 1028 719 q 1134 572 1112 635 q 1157 427 1157 510 l 1157 356 l 700 356 q 715 236 702 286 q 752 153 729 186 q 810 105 776 120 q 887 89 843 89 q 953 98 923 89 q 1009 121 984 106 q 1052 157 1034 137 q 1083 202 1070 178 q 1121 134 1121 182 q 1105 77 1121 104 q 1055 30 1089 51 q 971 -1 1022 10 q 849 -14 920 -14 m 553 860 q 586 905 567 879 q 623 958 604 931 q 659 1013 642 986 q 686 1064 675 1040 l 905 1064 l 905 1049 q 862 1004 892 1031 q 795 946 832 976 q 719 889 758 917 q 647 842 679 860 l 553 842 l 553 860 "},"Β":{"x_min":38.453125,"x_max":884,"ha":933,"o":"m 842 739 q 829 659 842 693 q 793 600 816 624 q 738 557 770 575 q 666 527 706 539 l 666 520 q 754 487 715 508 q 823 435 794 466 q 868 363 852 404 q 884 272 884 322 q 784 67 884 135 q 486 0 684 0 l 38 0 l 38 73 l 95 73 q 124 76 111 73 q 146 89 137 80 q 162 116 156 99 q 168 164 168 134 l 168 829 q 162 874 168 857 q 146 901 156 892 q 123 915 136 911 q 95 918 110 918 l 38 918 l 38 992 l 444 992 q 742 930 642 992 q 842 739 842 869 m 387 84 l 479 84 q 558 94 525 84 q 611 127 590 105 q 640 187 631 150 q 650 276 650 223 q 641 365 650 327 q 614 427 633 402 q 562 464 594 451 q 482 476 530 476 l 387 476 l 387 84 m 387 561 l 440 561 q 521 571 489 561 q 573 602 553 581 q 600 657 592 624 q 608 739 608 691 q 599 818 608 786 q 569 870 590 850 q 516 898 549 889 q 437 906 484 906 l 387 906 l 387 561 "},"Ļ":{"x_min":38.453125,"x_max":863,"ha":908,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 432 915 445 918 q 409 903 418 912 q 394 878 399 895 q 388 833 388 861 l 388 84 l 647 84 q 723 115 696 84 q 762 205 750 146 l 785 310 l 863 310 l 852 0 l 38 0 m 338 -289 q 352 -242 344 -268 q 368 -189 360 -216 q 382 -134 375 -161 q 392 -85 388 -108 l 554 -85 l 554 -98 q 529 -147 544 -120 q 495 -202 513 -174 q 458 -257 477 -230 q 421 -307 439 -285 l 338 -307 l 338 -289 "},"Õ":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 340 22 428 -14 q 193 126 251 59 q 106 288 135 193 q 77 498 77 382 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 748 970 661 1007 q 894 867 835 934 q 985 706 954 800 q 1016 496 1016 612 m 310 496 q 323 319 310 397 q 364 187 336 241 q 437 104 392 133 q 547 76 482 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 q 770 674 782 596 q 729 806 757 752 q 657 888 702 860 q 548 916 612 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 m 661 1203 q 688 1209 676 1203 q 709 1225 700 1215 q 722 1249 717 1235 q 729 1276 727 1262 l 820 1276 q 804 1197 817 1234 q 768 1131 790 1159 q 714 1087 745 1103 q 646 1071 683 1071 q 578 1084 609 1071 q 522 1114 548 1098 q 473 1145 496 1131 q 428 1158 451 1158 q 401 1152 413 1158 q 380 1136 389 1146 q 367 1112 372 1126 q 360 1085 362 1099 l 270 1085 q 285 1164 272 1127 q 322 1230 299 1202 q 376 1274 345 1258 q 444 1291 407 1291 q 512 1277 482 1291 q 568 1247 542 1263 q 617 1216 594 1230 q 661 1203 640 1203 "},"№":{"x_min":38.453125,"x_max":1407,"ha":1425,"o":"m 923 0 l 923 118 l 1377 118 l 1377 0 l 923 0 m 674 0 l 264 846 l 264 164 q 270 116 264 134 q 286 89 276 99 q 308 76 295 80 q 336 73 321 73 l 394 73 l 394 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 402 992 l 705 324 l 705 833 q 699 878 705 861 q 683 903 693 895 q 661 915 674 912 q 634 918 649 918 l 576 918 l 576 992 l 931 992 l 931 918 l 873 918 q 846 915 859 918 q 823 903 833 912 q 808 876 813 893 q 803 828 803 858 l 803 0 l 674 0 m 1059 420 q 1080 296 1059 338 q 1152 253 1100 253 q 1224 295 1203 253 q 1245 420 1245 337 q 1223 542 1245 501 q 1151 582 1202 582 q 1079 542 1099 582 q 1059 420 1059 501 m 1407 420 q 1341 242 1407 301 q 1151 184 1276 184 q 1043 198 1090 184 q 963 242 996 213 q 913 316 930 272 q 897 420 897 360 q 961 597 897 539 q 1154 655 1025 655 q 1259 640 1212 655 q 1338 596 1305 625 q 1389 523 1371 567 q 1407 420 1407 479 "},"χ":{"x_min":17.75,"x_max":834,"ha":838,"o":"m 246 -334 l 17 -334 l 356 278 l 251 544 q 229 593 240 572 q 205 627 218 614 q 177 648 193 641 q 140 654 161 654 q 122 652 132 654 q 101 647 112 650 q 81 640 91 643 q 64 633 71 636 l 39 688 q 75 711 56 700 q 114 730 93 721 q 155 743 134 738 q 197 749 176 749 q 247 741 226 749 q 286 715 269 734 q 318 666 304 697 q 350 590 333 636 l 419 392 l 590 745 l 809 745 l 508 208 l 628 -114 q 649 -165 638 -142 q 673 -203 660 -187 q 701 -227 686 -219 q 737 -236 717 -236 q 776 -230 759 -236 q 807 -218 794 -224 l 834 -277 q 761 -315 797 -300 q 681 -330 726 -330 q 628 -319 650 -330 q 589 -287 606 -308 q 558 -235 572 -266 q 530 -162 544 -203 l 444 86 l 246 -334 "},"ί":{"x_min":129,"x_max":533,"ha":546,"o":"m 339 745 l 339 227 q 361 128 339 159 q 432 97 383 97 q 484 100 457 97 q 533 108 511 104 l 533 15 q 507 6 524 11 q 468 -3 490 0 q 417 -10 445 -7 q 359 -14 389 -14 q 262 -2 305 -14 q 190 33 219 8 q 144 100 160 58 q 129 201 129 141 l 129 745 l 339 745 m 179 860 q 193 907 185 881 q 208 960 200 932 q 222 1014 215 987 q 232 1064 228 1041 l 422 1064 l 422 1050 q 395 1001 412 1028 q 359 947 379 974 q 317 892 339 919 q 275 842 295 865 l 179 842 l 179 860 "},"Ζ":{"x_min":58,"x_max":864,"ha":925,"o":"m 833 921 l 310 84 l 610 84 q 680 96 653 84 q 723 128 707 108 q 746 172 739 147 q 756 223 754 197 l 763 286 l 864 286 l 857 0 l 58 0 l 58 69 l 578 907 l 305 907 q 251 898 272 907 q 217 873 230 889 q 199 833 205 856 q 191 781 193 809 l 183 706 l 84 706 l 90 992 l 833 992 l 833 921 "},"Ľ":{"x_min":38.453125,"x_max":863,"ha":908,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 432 915 445 918 q 409 903 418 912 q 394 878 399 895 q 388 833 388 861 l 388 84 l 647 84 q 723 115 696 84 q 762 205 750 146 l 785 310 l 863 310 l 852 0 l 38 0 m 627 787 q 641 834 633 808 q 656 887 648 860 q 670 942 663 915 q 680 992 676 968 l 842 992 l 842 978 q 817 929 832 956 q 783 875 801 903 q 746 819 765 846 q 709 770 727 792 l 627 770 l 627 787 "},"ť":{"x_min":29.546875,"x_max":642,"ha":562,"o":"m 436 97 q 487 101 463 97 q 534 110 512 105 l 534 20 q 504 9 523 15 q 461 -2 485 2 q 405 -10 436 -7 q 337 -14 374 -14 q 253 -2 291 -14 q 188 34 215 8 q 148 102 162 60 q 134 205 134 144 l 134 650 l 29 650 l 29 721 q 109 738 74 721 q 165 779 144 756 q 229 917 208 824 l 344 917 l 344 745 l 521 745 l 521 650 l 344 650 l 344 219 q 366 127 344 156 q 436 97 387 97 m 427 850 q 441 897 433 871 q 456 950 448 923 q 470 1005 463 978 q 480 1055 476 1031 l 642 1055 l 642 1041 q 617 992 632 1019 q 583 938 601 966 q 546 882 565 909 q 509 833 527 855 l 427 833 l 427 850 "},"5":{"x_min":56,"x_max":703,"ha":777,"o":"m 319 82 q 385 93 354 82 q 439 130 416 104 q 476 198 462 155 q 490 305 490 241 q 441 460 490 409 q 301 511 391 511 q 253 509 275 511 q 214 503 232 507 q 179 495 195 499 q 147 486 163 491 l 83 511 l 127 992 l 653 992 l 660 739 l 580 739 l 569 786 q 562 808 566 798 q 551 825 558 818 q 533 835 544 831 q 505 839 522 839 l 216 839 q 215 827 216 838 q 213 797 214 816 q 209 756 212 779 q 205 709 207 733 l 195 581 q 223 589 205 586 q 260 596 240 593 q 303 601 281 599 q 347 603 326 603 q 493 584 428 603 q 605 528 559 565 q 677 436 652 491 q 703 305 703 380 q 670 153 703 215 q 584 55 637 92 q 468 1 532 17 q 340 -14 403 -14 q 208 0 262 -14 q 120 37 154 13 q 71 90 86 60 q 56 153 56 120 q 86 226 56 202 q 167 249 116 249 q 175 190 167 219 q 200 136 182 160 q 247 97 218 112 q 319 82 277 82 "},"o":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 273 10 340 -14 q 160 82 207 34 q 89 203 114 130 q 65 374 65 277 q 156 666 65 570 q 427 762 248 762 q 577 738 511 762 q 690 666 643 714 q 761 545 736 618 q 786 374 786 472 m 280 374 q 288 244 280 300 q 313 150 296 188 q 358 92 330 112 q 426 73 386 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 q 563 505 571 449 q 538 598 555 561 q 492 654 520 635 q 425 673 465 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 "},"Ѕ":{"x_min":41.203125,"x_max":745,"ha":814,"o":"m 366 -14 q 210 3 273 -14 q 110 49 148 21 q 57 111 73 76 q 41 179 41 146 q 54 240 41 215 q 89 280 67 264 q 139 302 111 295 q 198 309 168 309 q 212 204 198 249 q 252 129 227 159 q 312 83 277 99 q 388 68 347 68 q 461 80 429 68 q 515 112 493 91 q 549 160 538 132 q 561 219 561 187 q 546 282 561 254 q 503 333 532 309 q 431 377 474 356 q 329 423 387 399 q 206 485 256 453 q 126 553 156 516 q 82 632 95 590 q 69 726 69 675 q 94 841 69 790 q 166 930 120 893 q 273 986 211 966 q 409 1006 336 1006 q 542 993 486 1006 q 634 959 597 980 q 688 908 670 937 q 705 844 705 878 q 695 799 705 820 q 663 762 684 778 q 609 738 641 746 q 534 729 577 729 q 526 792 534 758 q 501 854 519 825 q 455 902 483 883 q 387 921 427 921 q 334 913 359 921 q 290 888 309 904 q 260 848 271 872 q 250 792 250 824 q 259 737 250 763 q 294 687 269 712 q 364 637 320 662 q 479 584 408 613 q 601 524 550 555 q 683 459 651 494 q 730 382 715 424 q 745 289 745 340 q 718 166 745 222 q 642 70 692 110 q 523 8 592 30 q 366 -14 453 -14 "},"�":{"x_min":56.828125,"x_max":1330.53125,"ha":1389,"o":"m 693 1055 l 1330 419 l 693 -216 l 56 419 l 693 1055 m 958 581 q 937 668 958 630 q 881 732 917 706 q 794 772 844 758 q 686 786 745 786 q 580 775 624 786 q 506 748 536 765 q 463 707 477 731 q 450 657 450 684 q 461 622 450 637 q 494 598 473 607 q 543 583 515 588 q 606 579 572 579 q 611 633 606 607 q 626 677 615 658 q 653 708 636 697 q 695 719 670 719 q 734 710 718 719 q 761 685 751 701 q 776 648 772 670 q 781 598 781 625 q 774 533 781 566 q 750 471 768 501 q 702 415 732 441 q 625 371 672 390 l 646 234 l 715 234 l 736 336 q 833 383 792 359 q 902 437 875 408 q 944 501 930 466 q 958 581 958 537 m 588 61 q 595 18 588 35 q 614 -8 602 1 q 643 -23 626 -19 q 677 -28 659 -28 q 713 -23 696 -28 q 742 -8 730 -19 q 762 18 755 1 q 770 61 770 35 q 762 103 770 86 q 742 130 755 120 q 713 145 730 141 q 677 150 696 150 q 643 145 659 150 q 614 130 626 141 q 595 103 602 120 q 588 61 588 86 "},"d":{"x_min":64,"x_max":881.71875,"ha":901,"o":"m 761 170 q 770 120 761 139 q 795 90 779 101 q 832 77 811 80 q 876 73 853 73 l 881 73 l 881 0 l 612 0 l 573 108 l 560 108 q 525 57 545 79 q 479 18 505 34 q 420 -5 453 2 q 347 -14 388 -14 q 226 8 279 -14 q 137 78 173 31 q 82 198 101 125 q 64 370 64 271 q 82 544 64 471 q 137 666 101 618 q 225 737 173 714 q 344 761 277 761 q 415 752 383 761 q 472 729 447 744 q 517 694 497 714 q 551 649 537 674 l 560 649 q 555 722 558 688 q 553 751 554 736 q 551 779 552 766 q 550 802 550 792 q 550 819 550 813 l 550 895 q 540 941 550 924 q 516 967 531 958 q 480 979 501 976 q 437 981 460 981 l 426 981 l 426 1055 l 761 1055 l 761 170 m 407 89 q 475 107 448 89 q 519 159 503 124 q 543 248 536 194 q 550 373 550 301 q 543 495 550 442 q 519 584 536 548 q 475 639 503 621 q 407 658 448 658 q 347 639 372 658 q 307 584 323 621 q 285 494 292 547 q 278 372 278 441 q 307 160 278 230 q 407 89 337 89 "},",":{"x_min":61.96875,"x_max":311,"ha":408,"o":"m 311 58 q 297 -27 311 14 q 254 -104 283 -68 q 176 -167 224 -139 q 61 -214 129 -195 l 61 -142 q 115 -120 92 -131 q 153 -96 138 -109 q 176 -69 168 -84 q 184 -33 184 -53 q 176 -12 184 -20 q 158 3 169 -3 q 133 19 146 11 q 109 39 120 26 q 90 69 97 51 q 83 115 83 87 q 111 186 83 162 q 182 211 140 211 q 276 170 241 211 q 311 58 311 129 "},"\"":{"x_min":93,"x_max":612.359375,"ha":705,"o":"m 396 992 l 612 992 l 563 610 l 471 610 l 396 992 m 93 992 l 310 992 l 247 610 l 155 610 l 93 992 "},"ľ":{"x_min":23.703125,"x_max":642,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 897 q 129 941 139 924 q 104 967 119 958 q 72 979 89 976 q 39 981 54 981 l 23 981 l 23 1055 l 349 1055 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m 427 850 q 441 897 433 871 q 456 950 448 923 q 470 1005 463 978 q 480 1055 476 1031 l 642 1055 l 642 1041 q 617 992 632 1019 q 583 938 601 966 q 546 882 565 909 q 509 833 527 855 l 427 833 l 427 850 "},"ė":{"x_min":65,"x_max":735,"ha":793,"o":"m 412 671 q 319 614 354 671 q 282 445 285 556 l 522 445 q 516 540 522 497 q 497 611 510 582 q 463 656 483 640 q 412 671 442 671 m 425 -14 q 269 11 337 -14 q 156 86 202 37 q 88 206 111 135 q 65 367 65 277 q 88 539 65 465 q 155 662 111 613 q 263 737 199 712 q 409 762 327 762 q 545 740 485 762 q 648 677 606 719 q 712 572 690 635 q 735 427 735 510 l 735 356 l 279 356 q 294 236 281 286 q 331 153 307 186 q 388 105 354 120 q 465 89 421 89 q 531 98 501 89 q 587 121 562 106 q 630 157 612 137 q 661 202 649 178 q 699 134 699 182 q 682 77 699 104 q 632 30 666 51 q 547 -1 598 10 q 425 -14 496 -14 m 294 969 q 303 1014 294 995 q 328 1045 312 1033 q 365 1063 344 1057 q 412 1069 386 1069 q 457 1063 435 1069 q 495 1045 479 1057 q 521 1014 511 1033 q 531 969 531 995 q 521 924 531 943 q 495 893 511 905 q 457 875 479 881 q 412 869 435 869 q 365 875 386 869 q 328 893 344 881 q 303 924 312 905 q 294 969 294 943 "},"Í":{"x_min":38.453125,"x_max":524,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 m 172 1089 q 205 1134 186 1108 q 242 1187 223 1160 q 278 1242 261 1215 q 305 1293 294 1269 l 524 1293 l 524 1278 q 481 1233 511 1260 q 414 1175 451 1205 q 338 1118 377 1146 q 266 1071 298 1089 l 172 1071 l 172 1089 "},"Ú":{"x_min":22.78125,"x_max":1015.21875,"ha":1038,"o":"m 1015 918 l 955 918 q 928 915 941 918 q 905 903 915 912 q 890 875 895 893 q 885 828 885 858 l 885 286 q 865 160 885 216 q 802 66 845 104 q 694 6 760 27 q 537 -14 628 -14 q 375 3 447 -14 q 254 58 304 20 q 179 156 205 96 q 153 302 153 216 l 153 833 q 147 878 153 861 q 131 903 141 894 q 109 915 121 912 q 82 918 96 918 l 22 918 l 22 992 l 501 992 l 501 918 l 443 918 q 416 915 429 918 q 393 903 403 912 q 378 875 383 893 q 372 828 372 858 l 372 291 q 387 193 372 233 q 428 129 401 153 q 494 94 456 105 q 579 84 531 84 q 662 96 625 84 q 726 133 699 108 q 766 197 752 158 q 780 288 780 235 l 780 833 q 775 878 780 861 q 759 903 769 894 q 737 915 750 912 q 710 918 724 918 l 651 918 l 651 992 l 1015 992 l 1015 918 m 437 1089 q 470 1134 451 1108 q 507 1187 488 1160 q 543 1242 526 1215 q 570 1293 559 1269 l 789 1293 l 789 1278 q 746 1233 776 1260 q 679 1175 716 1205 q 603 1118 642 1146 q 531 1071 563 1089 l 437 1071 l 437 1089 "}," ":{"x_min":0,"x_max":0,"ha":278},"Ŷ":{"x_min":0.34375,"x_max":962.5625,"ha":962,"o":"m 228 0 l 228 73 l 293 73 q 324 75 310 73 q 350 86 339 77 q 367 111 361 94 q 374 157 374 128 l 374 351 l 117 844 q 97 879 106 865 q 77 902 88 893 q 52 914 66 910 q 18 918 39 918 l 0 918 l 0 992 l 465 992 l 465 918 l 441 918 q 379 901 399 918 q 358 856 358 884 q 364 817 358 838 q 379 779 371 797 l 482 575 q 518 496 504 530 q 543 430 532 462 q 576 510 557 467 q 618 600 595 553 l 698 766 q 718 817 713 797 q 722 850 722 838 q 699 902 722 886 q 630 918 677 918 l 599 918 l 599 992 l 962 992 l 962 918 l 936 918 q 905 913 918 918 q 882 897 893 909 q 859 863 871 884 q 831 810 847 842 l 595 349 l 595 159 q 601 112 595 129 q 617 86 607 95 q 642 75 628 77 q 672 73 656 73 l 740 73 l 740 0 l 228 0 m 242 1089 q 280 1134 258 1108 q 324 1187 302 1160 q 365 1242 345 1215 q 395 1293 384 1269 l 582 1293 q 612 1242 593 1269 q 653 1187 631 1215 q 697 1134 675 1160 q 735 1089 718 1108 l 735 1071 l 639 1071 q 605 1098 625 1082 q 564 1130 585 1113 q 523 1164 543 1147 q 488 1195 503 1181 q 452 1164 472 1181 q 411 1130 432 1147 q 371 1098 391 1113 q 338 1071 352 1082 l 242 1071 l 242 1089 "},"Ý":{"x_min":0.34375,"x_max":962.5625,"ha":962,"o":"m 228 0 l 228 73 l 293 73 q 324 75 310 73 q 350 86 339 77 q 367 111 361 94 q 374 157 374 128 l 374 351 l 117 844 q 97 879 106 865 q 77 902 88 893 q 52 914 66 910 q 18 918 39 918 l 0 918 l 0 992 l 465 992 l 465 918 l 441 918 q 379 901 399 918 q 358 856 358 884 q 364 817 358 838 q 379 779 371 797 l 482 575 q 518 496 504 530 q 543 430 532 462 q 576 510 557 467 q 618 600 595 553 l 698 766 q 718 817 713 797 q 722 850 722 838 q 699 902 722 886 q 630 918 677 918 l 599 918 l 599 992 l 962 992 l 962 918 l 936 918 q 905 913 918 918 q 882 897 893 909 q 859 863 871 884 q 831 810 847 842 l 595 349 l 595 159 q 601 112 595 129 q 617 86 607 95 q 642 75 628 77 q 672 73 656 73 l 740 73 l 740 0 l 228 0 m 409 1089 q 442 1134 423 1108 q 479 1187 460 1160 q 515 1242 498 1215 q 542 1293 531 1269 l 761 1293 l 761 1278 q 718 1233 748 1260 q 651 1175 688 1205 q 575 1118 614 1146 q 503 1071 535 1089 l 409 1071 l 409 1089 "},"ŝ":{"x_min":41.765625,"x_max":623,"ha":678,"o":"m 321 -14 q 192 -1 245 -14 q 105 32 139 10 q 57 83 72 53 q 41 148 41 113 q 54 202 41 182 q 88 234 68 223 q 130 250 108 246 q 171 253 153 253 q 182 175 171 210 q 212 117 193 141 q 259 80 232 93 q 321 67 287 67 q 383 74 357 67 q 425 95 409 82 q 450 126 442 108 q 458 162 458 143 q 450 203 458 185 q 422 237 441 221 q 369 268 402 253 q 287 300 336 283 q 188 342 231 320 q 116 392 145 364 q 71 457 86 421 q 56 540 56 493 q 77 637 56 596 q 138 706 98 678 q 232 747 177 733 q 354 761 287 761 q 466 749 420 761 q 541 720 512 738 q 584 678 570 702 q 597 632 597 655 q 565 560 597 585 q 456 536 532 536 q 425 644 456 605 q 334 682 394 682 q 291 676 311 682 q 255 660 270 671 q 230 633 239 649 q 221 596 221 617 q 229 556 221 573 q 259 522 238 538 q 317 490 281 506 q 411 454 354 473 q 496 417 457 437 q 563 369 535 396 q 607 308 591 342 q 623 230 623 274 q 602 127 623 172 q 544 50 582 81 q 449 2 505 19 q 321 -14 393 -14 m 94 860 q 132 905 110 879 q 176 958 154 931 q 217 1013 197 986 q 247 1064 236 1040 l 434 1064 q 464 1013 445 1040 q 505 958 483 986 q 549 905 527 931 q 587 860 570 879 l 587 842 l 491 842 q 457 869 477 853 q 416 901 437 884 q 375 935 395 918 q 340 966 355 952 q 304 935 324 952 q 263 901 284 918 q 223 869 243 884 q 190 842 204 853 l 94 842 l 94 860 "}," ":{"x_min":0,"x_max":0,"ha":1389},"ą":{"x_min":62,"x_max":786.859375,"ha":832,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 265 487 224 l 487 369 l 424 365 q 354 352 383 363 q 309 321 326 341 q 285 273 292 301 q 277 206 277 244 m 401 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 534 749 479 762 q 625 709 588 736 q 679 636 661 681 q 698 526 698 591 l 698 172 q 702 124 698 143 q 716 94 706 105 q 742 78 725 83 q 781 73 758 73 l 786 73 l 786 0 l 528 0 l 499 95 l 487 95 q 443 46 464 67 q 400 12 423 26 q 348 -7 377 -1 q 280 -14 319 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 212 62 154 q 139 379 62 325 q 373 438 217 434 l 487 443 l 487 519 q 484 583 487 554 q 472 633 481 612 q 446 665 464 654 q 401 677 429 677 m 367 -180 q 380 -118 367 -147 q 417 -65 394 -89 q 469 -24 440 -41 q 531 0 499 -7 l 638 0 q 593 -20 616 -6 q 551 -53 570 -33 q 520 -100 533 -74 q 508 -160 508 -127 q 515 -193 508 -179 q 535 -215 522 -207 q 566 -229 548 -224 q 604 -233 583 -233 q 644 -230 623 -233 q 692 -222 666 -228 l 692 -311 q 665 -321 681 -317 q 632 -327 649 -325 q 600 -332 616 -330 q 573 -334 584 -334 q 419 -297 472 -334 q 367 -180 367 -260 "},"​":{"x_min":0,"x_max":0,"ha":0},"ã":{"x_min":62,"x_max":786.859375,"ha":832,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 265 487 224 l 487 369 l 424 365 q 354 352 383 363 q 309 321 326 341 q 285 273 292 301 q 277 206 277 244 m 401 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 534 749 479 762 q 625 709 588 736 q 679 636 661 681 q 698 526 698 591 l 698 172 q 702 124 698 143 q 716 94 706 105 q 742 78 725 83 q 781 73 758 73 l 786 73 l 786 0 l 528 0 l 499 95 l 487 95 q 443 46 464 67 q 400 12 423 26 q 348 -7 377 -1 q 280 -14 319 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 212 62 154 q 139 379 62 325 q 373 438 217 434 l 487 443 l 487 519 q 484 583 487 554 q 472 633 481 612 q 446 665 464 654 q 401 677 429 677 m 534 974 q 561 980 549 974 q 582 996 573 986 q 595 1020 590 1006 q 602 1047 600 1033 l 693 1047 q 677 968 690 1005 q 641 902 663 930 q 587 858 618 874 q 519 842 556 842 q 451 855 482 842 q 395 885 421 869 q 346 916 369 902 q 301 929 324 929 q 274 923 286 929 q 253 907 262 917 q 240 883 245 897 q 233 856 235 870 l 143 856 q 158 935 145 898 q 195 1001 172 973 q 249 1045 218 1029 q 317 1062 280 1062 q 385 1048 355 1062 q 441 1018 415 1034 q 490 987 467 1001 q 534 974 513 974 "},"æ":{"x_min":62,"x_max":1157,"ha":1215,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 264 487 223 l 487 369 l 424 364 q 354 351 383 362 q 309 320 326 340 q 285 272 292 301 q 277 206 277 244 m 834 671 q 741 614 776 671 q 703 445 706 556 l 944 445 q 918 612 944 553 q 834 671 891 671 m 849 -14 q 672 19 746 -14 q 553 118 598 53 q 437 17 506 49 q 280 -14 368 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 211 62 154 q 139 379 62 324 q 373 438 217 433 l 487 442 l 487 519 q 484 582 487 553 q 472 633 481 612 q 446 665 463 654 q 400 677 429 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 535 743 480 762 q 627 683 590 725 q 719 741 668 721 q 831 762 769 762 q 967 740 907 762 q 1070 677 1028 719 q 1134 572 1112 635 q 1157 427 1157 510 l 1157 356 l 700 356 q 715 236 702 286 q 752 153 729 186 q 810 105 776 120 q 887 89 843 89 q 953 98 923 89 q 1009 121 984 106 q 1052 157 1034 137 q 1083 202 1070 178 q 1121 134 1121 182 q 1105 77 1121 104 q 1055 30 1089 51 q 971 -1 1022 10 q 849 -14 920 -14 "},"ĩ":{"x_min":-36,"x_max":514,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m 355 974 q 382 980 370 974 q 403 996 394 986 q 416 1020 411 1006 q 423 1047 421 1033 l 514 1047 q 498 968 511 1005 q 462 902 484 930 q 408 858 439 874 q 340 842 377 842 q 272 855 303 842 q 216 885 242 869 q 167 916 190 902 q 122 929 145 929 q 95 923 107 929 q 74 907 83 917 q 61 883 66 897 q 54 856 56 870 l -36 856 q -20 935 -33 898 q 16 1001 -6 973 q 70 1045 39 1029 q 138 1062 101 1062 q 206 1048 176 1062 q 262 1018 236 1034 q 311 987 288 1001 q 355 974 334 974 "},"~":{"x_min":77,"x_max":702,"ha":779,"o":"m 366 450 q 322 468 341 461 q 288 479 303 475 q 259 485 273 484 q 230 487 245 487 q 191 481 211 487 q 151 463 171 474 q 112 438 131 453 q 77 405 93 423 l 77 512 q 244 586 144 586 q 280 584 263 586 q 316 578 297 582 q 357 565 334 573 q 412 543 380 556 q 456 525 437 532 q 490 513 475 517 q 520 507 506 508 q 548 505 534 505 q 587 511 567 505 q 627 529 607 518 q 666 555 647 540 q 702 587 685 570 l 702 480 q 534 407 635 407 q 497 408 514 407 q 462 415 481 410 q 421 428 444 419 q 366 450 398 436 "},"ŀ":{"x_min":23.703125,"x_max":683.390625,"ha":650,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 897 q 129 941 139 924 q 104 967 119 958 q 72 979 89 976 q 39 981 54 981 l 23 981 l 23 1055 l 349 1055 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m 446 456 q 455 501 446 482 q 480 532 464 520 q 517 550 496 544 q 564 556 538 556 q 609 550 587 556 q 647 532 631 544 q 673 501 663 520 q 683 456 683 482 q 673 411 683 430 q 647 380 663 392 q 609 362 631 368 q 564 356 587 356 q 517 362 538 356 q 480 380 496 368 q 455 411 464 392 q 446 456 446 430 "},"Ċ":{"x_min":77,"x_max":872,"ha":928,"o":"m 590 96 q 680 108 640 96 q 751 139 720 120 q 805 182 782 158 q 846 228 829 205 q 864 203 857 220 q 870 169 870 186 q 855 107 870 139 q 802 48 839 75 q 705 3 766 21 q 556 -14 645 -14 q 346 22 436 -14 q 196 126 255 59 q 106 288 136 193 q 77 497 77 382 q 107 703 77 609 q 197 864 138 796 q 347 968 257 931 q 555 1006 437 1006 q 694 993 635 1006 q 793 959 754 980 q 852 908 832 937 q 872 844 872 878 q 860 796 872 818 q 827 758 849 774 q 772 733 805 742 q 698 723 740 723 q 690 792 698 758 q 665 854 683 826 q 618 899 647 882 q 546 917 589 917 q 434 889 480 917 q 362 807 389 861 q 322 675 334 754 q 310 497 310 597 q 325 321 310 396 q 373 195 340 245 q 459 121 406 146 q 590 96 512 96 m 421 1198 q 430 1243 421 1224 q 455 1274 439 1262 q 492 1292 471 1286 q 539 1298 513 1298 q 584 1292 562 1298 q 622 1274 606 1286 q 648 1243 638 1262 q 658 1198 658 1224 q 648 1153 658 1172 q 622 1122 638 1134 q 584 1104 606 1110 q 539 1098 562 1098 q 492 1104 513 1098 q 455 1122 471 1110 q 430 1153 439 1134 q 421 1198 421 1172 "},"¡":{"x_min":144.578125,"x_max":386.140625,"ha":530,"o":"m 386 -250 l 144 -250 l 226 426 l 304 426 l 386 -250 m 378 642 q 369 588 378 610 q 345 554 360 567 q 308 536 329 541 q 264 531 287 531 q 220 536 240 531 q 183 554 199 541 q 159 588 168 567 q 150 642 150 610 q 159 694 150 673 q 183 728 168 715 q 220 747 199 741 q 264 753 240 753 q 308 747 287 753 q 345 728 329 741 q 369 694 360 715 q 378 642 378 673 "},"ẅ":{"x_min":-4.40625,"x_max":1190.078125,"ha":1189,"o":"m 686 737 l 821 327 q 846 242 838 277 q 858 181 853 207 l 862 181 q 868 215 865 199 q 876 247 871 230 q 886 284 880 264 q 899 330 891 304 l 960 533 q 970 571 966 550 q 973 603 973 591 q 951 654 973 638 q 881 671 928 671 l 871 671 l 871 745 l 1190 745 l 1190 671 l 1172 671 q 1137 667 1152 671 q 1110 651 1122 662 q 1089 617 1099 639 q 1068 562 1078 596 l 888 0 l 739 0 l 587 461 l 427 0 l 276 0 l 98 597 q 81 633 90 619 q 61 656 72 648 q 34 667 49 664 q 0 671 20 671 l -4 671 l -4 745 l 402 745 l 402 671 l 384 671 q 321 659 342 671 q 300 612 300 647 q 304 584 300 601 q 312 553 308 568 l 363 372 q 376 320 370 347 q 388 269 382 294 q 398 221 393 244 q 405 181 402 199 l 409 181 q 425 253 415 216 q 454 341 436 290 l 595 737 l 686 737 m 395 955 q 401 995 395 978 q 419 1022 408 1011 q 445 1036 430 1032 q 476 1041 460 1041 q 507 1036 493 1041 q 534 1022 522 1032 q 552 995 545 1011 q 560 955 560 978 q 552 915 560 931 q 534 888 545 898 q 507 873 522 878 q 476 869 493 869 q 445 873 460 869 q 419 888 430 878 q 401 915 408 898 q 395 955 395 931 m 680 955 q 686 995 680 978 q 705 1022 693 1011 q 731 1036 716 1032 q 763 1041 746 1041 q 793 1036 778 1041 q 819 1022 807 1032 q 837 995 830 1011 q 845 955 845 978 q 837 915 845 931 q 819 888 830 898 q 793 873 807 878 q 763 869 778 869 q 731 873 746 869 q 705 888 716 878 q 686 915 693 898 q 680 955 680 931 "},"К":{"x_min":38.453125,"x_max":1000,"ha":1000,"o":"m 901 0 q 807 8 847 0 q 738 33 768 16 q 687 75 709 50 q 648 132 665 99 l 516 372 q 485 419 499 403 q 455 445 471 436 q 419 456 439 454 q 373 458 400 458 l 373 164 q 379 116 373 134 q 394 89 385 99 q 417 76 404 80 q 445 73 430 73 l 503 73 l 503 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 503 992 l 503 918 l 445 918 q 417 915 430 918 q 394 903 404 912 q 379 875 385 893 q 373 828 373 858 l 373 538 q 413 540 396 538 q 442 546 429 542 q 467 558 456 550 q 488 577 477 566 q 538 647 507 597 q 606 773 568 697 q 663 877 637 834 q 719 947 690 920 q 781 987 748 974 q 856 1000 814 1000 q 940 975 915 1000 q 966 912 966 950 q 947 842 966 869 q 898 809 929 815 q 889 836 895 823 q 873 859 883 849 q 851 875 864 869 q 820 881 837 881 q 781 872 799 881 q 748 846 764 864 q 714 798 732 827 q 675 727 697 769 q 635 652 652 684 q 601 597 617 620 q 571 558 586 575 q 540 530 556 542 q 598 521 570 530 q 650 494 626 511 q 694 453 674 477 q 731 400 715 429 l 844 198 q 879 141 863 165 q 914 103 896 118 q 950 81 932 88 q 991 73 969 73 l 1000 73 l 1000 0 l 901 0 "},"Γ":{"x_min":38.453125,"x_max":807,"ha":821,"o":"m 797 992 l 807 720 l 729 720 l 712 786 q 666 877 697 846 q 579 907 635 907 l 388 907 l 388 158 q 394 114 388 130 q 409 88 399 97 q 432 76 418 79 q 459 73 445 73 l 545 73 l 545 0 l 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 797 992 "},"P":{"x_min":38.453125,"x_max":844,"ha":886,"o":"m 844 697 q 822 577 844 635 q 751 475 800 519 q 625 405 702 431 q 434 379 547 379 l 387 379 l 387 156 q 393 112 387 129 q 409 87 399 96 q 433 76 419 79 q 460 73 446 73 l 545 73 l 545 0 l 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 464 992 q 632 971 561 992 q 750 912 703 951 q 820 820 797 874 q 844 697 844 766 m 387 460 l 420 460 q 508 472 472 460 q 566 513 544 485 q 600 585 589 541 q 610 692 610 629 q 601 788 610 747 q 572 856 592 829 q 520 896 552 883 q 441 909 488 909 l 387 909 l 387 460 "},"%":{"x_min":47,"x_max":1211,"ha":1258,"o":"m 547 698 q 531 572 547 629 q 484 474 515 515 q 406 411 454 433 q 296 389 359 389 q 183 411 230 389 q 105 474 135 433 q 61 572 75 515 q 47 698 47 629 q 61 825 47 768 q 106 922 75 881 q 184 984 136 962 q 298 1006 231 1006 q 407 984 360 1006 q 485 922 454 962 q 531 825 516 881 q 547 698 547 768 m 203 698 q 208 597 203 641 q 224 522 213 553 q 253 475 235 491 q 296 458 271 458 q 340 475 323 458 q 368 522 357 491 q 383 597 379 553 q 388 698 388 641 q 383 798 388 754 q 368 872 379 841 q 341 918 358 902 q 298 934 323 934 q 254 918 272 934 q 225 872 236 902 q 208 798 213 841 q 203 698 203 754 m 440 0 l 332 0 l 812 992 l 919 992 l 440 0 m 1211 295 q 1195 168 1211 225 q 1148 70 1179 111 q 1070 8 1118 30 q 960 -14 1023 -14 q 847 8 894 -14 q 769 70 799 30 q 725 168 739 111 q 711 295 711 225 q 725 422 711 365 q 770 519 739 478 q 848 581 800 559 q 962 603 895 603 q 1071 581 1024 603 q 1149 519 1118 559 q 1195 422 1180 478 q 1211 295 1211 365 m 867 295 q 872 194 867 238 q 888 118 877 149 q 917 71 899 87 q 960 55 935 55 q 1004 71 987 55 q 1032 118 1021 87 q 1047 194 1043 149 q 1052 295 1052 238 q 1047 394 1052 351 q 1032 469 1043 438 q 1005 515 1022 499 q 962 531 987 531 q 918 515 936 531 q 889 469 900 499 q 872 394 877 438 q 867 295 867 351 "},"ϖ":{"x_min":28,"x_max":1381.328125,"ha":1409,"o":"m 1194 745 q 1247 754 1225 745 q 1281 779 1268 763 q 1301 817 1295 795 q 1307 863 1307 838 l 1381 863 q 1363 723 1381 780 q 1317 632 1346 667 q 1255 581 1289 597 q 1186 565 1220 565 l 1120 565 q 1181 440 1158 508 q 1205 287 1205 373 q 1186 157 1205 213 q 1132 62 1167 100 q 1047 5 1097 24 q 934 -14 997 -14 q 851 -3 886 -14 q 790 25 816 6 q 746 71 764 44 q 713 133 728 99 q 679 71 697 99 q 636 25 661 44 q 576 -3 610 6 q 494 -14 542 -14 q 381 5 431 -14 q 296 62 331 24 q 242 157 261 100 q 224 287 224 213 q 246 440 224 373 q 307 565 269 508 l 213 565 q 161 556 183 565 q 127 531 140 547 q 108 493 114 515 q 101 447 101 471 l 28 447 q 45 586 28 529 q 91 678 63 643 q 154 729 119 713 q 222 745 188 745 l 1194 745 m 990 302 q 986 382 990 345 q 975 452 982 419 q 957 512 968 484 q 935 565 947 540 l 491 565 q 469 511 479 540 q 452 451 460 483 q 441 381 445 419 q 437 299 437 343 q 448 201 437 241 q 475 136 458 161 q 514 100 493 111 q 557 89 535 89 q 624 117 597 89 q 662 206 652 144 q 645 258 652 235 q 633 300 637 281 q 626 338 628 320 q 624 376 624 356 q 647 454 624 431 q 714 478 670 478 q 781 454 758 478 q 804 376 804 431 q 802 338 804 356 q 794 301 799 321 q 782 258 789 281 q 765 206 775 235 q 803 117 776 145 q 871 89 830 89 q 913 100 892 89 q 952 136 935 111 q 980 202 969 161 q 990 302 990 243 "},"_":{"x_min":-7,"x_max":644,"ha":638,"o":"m 644 -197 l -7 -197 l -7 -114 l 644 -114 l 644 -197 "},"ñ":{"x_min":27.78125,"x_max":889.65625,"ha":926,"o":"m 581 0 l 581 456 q 575 536 581 501 q 556 595 569 571 q 521 631 543 618 q 470 643 500 643 q 412 626 435 643 q 375 579 389 608 q 356 510 362 549 q 349 429 349 471 l 349 164 q 357 117 349 134 q 377 89 364 99 q 408 76 389 80 q 450 73 427 73 l 454 73 l 454 0 l 27 0 l 27 73 l 30 73 q 73 76 54 73 q 108 90 93 80 q 130 119 122 100 q 139 169 139 138 l 139 580 q 131 627 139 610 q 111 655 124 645 q 80 668 98 664 q 38 671 61 671 l 34 671 l 34 745 l 326 745 l 344 645 l 351 645 q 395 707 372 684 q 445 743 418 730 q 501 758 471 755 q 563 762 530 762 q 659 746 616 762 q 731 698 701 730 q 776 615 760 665 q 792 494 792 564 l 792 172 q 797 120 792 139 q 815 90 803 101 q 844 77 826 80 q 885 73 861 73 l 889 73 l 889 0 l 581 0 m 570 974 q 597 980 585 974 q 618 996 609 986 q 631 1020 626 1006 q 638 1047 636 1033 l 729 1047 q 713 968 726 1005 q 677 902 699 930 q 623 858 654 874 q 555 842 592 842 q 487 855 518 842 q 431 885 457 869 q 382 916 405 902 q 337 929 360 929 q 310 923 322 929 q 289 907 298 917 q 276 883 281 897 q 269 856 271 870 l 179 856 q 194 935 181 898 q 231 1001 208 973 q 285 1045 254 1029 q 353 1062 316 1062 q 421 1048 391 1062 q 477 1018 451 1034 q 526 987 503 1001 q 570 974 549 974 "},"Ŕ":{"x_min":38.453125,"x_max":987.734375,"ha":982,"o":"m 38 73 l 96 73 q 123 76 111 73 q 146 87 136 79 q 162 112 156 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 486 992 q 775 926 683 992 q 867 735 867 860 q 850 637 867 680 q 807 562 834 594 q 746 508 780 530 q 677 472 712 486 l 843 187 q 877 136 860 157 q 910 100 894 114 q 945 80 927 86 q 982 73 962 73 l 987 73 l 987 0 l 942 0 q 833 4 879 0 q 751 23 786 9 q 691 61 716 37 q 644 124 666 86 l 479 431 l 387 431 l 387 156 q 392 112 387 129 q 408 87 398 96 q 431 76 418 79 q 458 73 444 73 l 517 73 l 517 0 l 38 0 l 38 73 m 387 512 l 465 512 q 545 524 513 512 q 597 563 577 537 q 625 626 616 588 q 633 716 633 665 q 624 805 633 768 q 594 865 614 842 q 541 899 573 888 q 462 909 508 909 l 387 909 l 387 512 m 373 1089 q 406 1134 387 1108 q 443 1187 424 1160 q 479 1242 462 1215 q 506 1293 495 1269 l 725 1293 l 725 1278 q 682 1233 712 1260 q 615 1175 652 1205 q 539 1118 578 1146 q 467 1071 499 1089 l 373 1071 l 373 1089 "},"‚":{"x_min":61.96875,"x_max":311,"ha":408,"o":"m 311 58 q 297 -27 311 14 q 254 -104 283 -68 q 176 -167 224 -139 q 61 -214 129 -195 l 61 -142 q 115 -120 92 -131 q 153 -96 138 -109 q 176 -69 168 -84 q 184 -33 184 -53 q 176 -12 184 -20 q 158 3 169 -3 q 133 19 146 11 q 109 39 120 26 q 90 69 97 51 q 83 115 83 87 q 111 186 83 162 q 182 211 140 211 q 276 170 241 211 q 311 58 311 129 "},"⅞":{"x_min":67,"x_max":1136,"ha":1167,"o":"m 176 399 l 425 880 l 182 880 q 148 871 159 880 q 136 840 138 861 l 130 796 l 67 796 l 71 992 l 514 992 l 514 908 l 281 399 l 176 399 m 336 0 l 228 0 l 723 992 l 831 992 l 336 0 m 653 152 q 664 202 653 181 q 694 240 675 223 q 740 270 714 257 q 795 294 766 283 q 749 322 771 306 q 711 357 727 337 q 684 402 694 377 q 675 457 675 427 q 687 511 675 484 q 726 559 699 537 q 796 593 753 580 q 902 607 840 607 q 989 597 950 607 q 1055 569 1028 588 q 1097 525 1082 551 q 1112 466 1112 499 q 1102 420 1112 441 q 1076 382 1093 399 q 1038 351 1060 364 q 992 327 1017 337 q 1053 296 1026 312 q 1098 260 1079 280 q 1126 215 1116 240 q 1136 158 1136 190 q 1120 92 1136 122 q 1074 38 1105 61 q 997 2 1043 15 q 889 -10 951 -10 q 786 2 830 -10 q 712 37 741 15 q 667 89 682 59 q 653 152 653 118 m 897 51 q 968 72 942 51 q 994 137 994 93 q 986 176 994 159 q 961 208 977 194 q 921 235 945 222 q 864 261 896 248 q 814 215 834 243 q 794 147 794 187 q 820 78 794 105 q 897 51 846 51 m 963 463 q 959 495 963 480 q 945 521 954 510 q 923 539 937 532 q 893 545 910 545 q 841 525 858 545 q 823 470 823 505 q 831 431 823 447 q 851 401 839 414 q 880 379 864 388 q 912 362 896 370 q 949 400 935 377 q 963 463 963 423 "},"Æ":{"x_min":-0.390625,"x_max":1335,"ha":1380,"o":"m 861 84 l 1138 84 q 1174 92 1159 84 q 1200 114 1189 100 q 1217 148 1211 128 q 1227 190 1224 167 l 1239 256 l 1335 256 l 1325 0 l 511 0 l 511 73 l 569 73 q 623 97 607 73 q 640 156 640 120 l 640 318 l 320 318 l 262 201 q 245 160 250 180 q 239 128 239 140 q 261 86 239 99 q 323 73 282 73 l 346 73 l 346 0 l 0 0 l 0 73 l 16 73 q 81 100 52 73 q 140 181 109 126 l 530 911 l 438 918 l 438 992 l 1282 992 l 1288 736 l 1191 736 l 1184 801 q 1158 880 1178 852 q 1095 907 1137 907 l 861 907 l 861 560 l 1190 560 l 1190 476 l 861 476 l 861 84 m 626 907 l 365 402 l 640 402 l 640 907 l 626 907 "},"₣":{"x_min":38.453125,"x_max":745,"ha":777,"o":"m 647 736 l 640 803 q 607 882 634 858 q 537 907 580 907 l 373 907 l 373 528 l 645 528 l 645 445 l 373 445 l 373 318 l 560 318 l 560 237 l 373 237 l 373 164 q 379 116 373 134 q 394 89 385 99 q 417 76 404 80 q 445 73 430 73 l 531 73 l 531 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 237 l 44 237 l 44 318 l 168 318 l 168 833 q 162 878 168 861 q 147 903 157 894 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 737 992 l 745 736 l 647 736 "},"Ū":{"x_min":22.78125,"x_max":1015.21875,"ha":1038,"o":"m 1015 918 l 955 918 q 928 915 941 918 q 905 903 915 912 q 890 875 895 893 q 885 828 885 858 l 885 286 q 865 160 885 216 q 802 66 845 104 q 694 6 760 27 q 537 -14 628 -14 q 375 3 447 -14 q 254 58 304 20 q 179 156 205 96 q 153 302 153 216 l 153 833 q 147 878 153 861 q 131 903 141 894 q 109 915 121 912 q 82 918 96 918 l 22 918 l 22 992 l 501 992 l 501 918 l 443 918 q 416 915 429 918 q 393 903 403 912 q 378 875 383 893 q 372 828 372 858 l 372 291 q 387 193 372 233 q 428 129 401 153 q 494 94 456 105 q 579 84 531 84 q 662 96 625 84 q 726 133 699 108 q 766 197 752 158 q 780 288 780 235 l 780 833 q 775 878 780 861 q 759 903 769 894 q 737 915 750 912 q 710 918 724 918 l 651 918 l 651 992 l 1015 992 l 1015 918 m 760 1071 l 357 1071 l 357 1180 l 760 1180 l 760 1071 "},"ы":{"x_min":23.703125,"x_max":1226.84375,"ha":1257,"o":"m 482 745 l 482 665 l 463 665 q 420 661 440 665 q 383 647 399 657 q 359 621 368 637 q 349 580 349 605 l 349 424 l 455 424 q 578 416 520 424 q 680 386 636 408 q 750 323 724 364 q 776 218 776 283 q 756 131 776 171 q 698 62 737 91 q 601 16 659 33 q 462 0 542 0 l 23 0 l 23 73 l 38 73 q 114 96 90 73 q 139 162 139 118 l 139 580 q 113 650 139 629 q 38 671 88 671 l 23 671 l 23 745 l 482 745 m 426 80 q 485 88 461 80 q 525 112 509 96 q 547 156 540 129 q 554 222 554 183 q 519 315 554 288 q 421 343 484 343 l 349 343 l 349 80 l 426 80 m 792 0 l 792 73 l 809 73 q 841 76 823 73 q 873 89 858 80 q 897 116 887 99 q 907 164 907 134 l 907 580 q 897 628 907 610 q 873 655 887 645 q 841 668 858 664 q 809 671 823 671 l 792 671 l 792 745 l 1226 745 l 1226 671 l 1210 671 q 1180 668 1196 671 q 1150 655 1164 664 q 1128 628 1137 645 q 1119 580 1119 610 l 1119 164 q 1128 116 1119 134 q 1150 89 1137 99 q 1180 76 1164 80 q 1210 73 1196 73 l 1226 73 l 1226 0 l 792 0 "},"ѓ":{"x_min":23.703125,"x_max":677,"ha":705,"o":"m 349 164 q 359 116 349 134 q 381 89 368 99 q 411 76 395 80 q 441 73 427 73 l 472 73 l 472 0 l 23 0 l 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 677 745 l 677 509 l 581 509 l 574 568 q 564 620 571 601 q 546 650 557 639 q 518 662 535 660 q 477 665 501 665 l 349 665 l 349 164 m 248 860 q 281 905 262 879 q 318 958 299 931 q 354 1013 337 986 q 381 1064 370 1040 l 600 1064 l 600 1049 q 557 1004 587 1031 q 490 946 527 976 q 414 889 453 917 q 342 842 374 860 l 248 842 l 248 860 "},"Œ":{"x_min":77,"x_max":1370,"ha":1415,"o":"m 897 84 l 1174 84 q 1210 92 1195 84 q 1236 114 1225 100 q 1253 147 1246 128 q 1263 190 1259 167 l 1274 255 l 1370 255 l 1360 0 l 691 0 q 621 -10 661 -6 q 547 -14 581 -14 q 340 22 428 -14 q 193 126 251 59 q 106 288 135 193 q 77 498 77 382 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 624 1003 584 1007 q 695 992 665 999 l 1317 992 l 1323 736 l 1225 736 l 1218 801 q 1192 880 1213 852 q 1129 907 1172 907 l 897 907 l 897 559 l 1225 559 l 1225 475 l 897 475 l 897 84 m 547 76 q 618 86 587 76 q 676 116 650 96 l 676 874 q 620 904 652 892 q 548 916 587 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 q 323 319 310 397 q 364 187 336 241 q 437 104 392 133 q 547 76 483 76 "},"΅":{"x_min":142,"x_max":647,"ha":802,"o":"m 330 973 q 344 1019 336 994 q 360 1073 352 1045 q 374 1127 367 1100 q 384 1177 380 1153 l 546 1177 l 546 1162 q 521 1114 536 1141 q 487 1059 505 1087 q 450 1004 469 1031 q 413 955 431 977 l 330 955 l 330 973 m 142 955 q 148 995 142 978 q 166 1022 155 1011 q 192 1036 177 1032 q 223 1041 207 1041 q 254 1036 240 1041 q 281 1022 269 1032 q 299 995 292 1011 q 307 955 307 978 q 299 915 307 931 q 281 888 292 898 q 254 873 269 878 q 223 869 240 869 q 192 873 207 869 q 166 888 177 878 q 148 915 155 898 q 142 955 142 931 m 482 955 q 488 995 482 978 q 507 1022 495 1011 q 533 1036 518 1032 q 565 1041 548 1041 q 595 1036 581 1041 q 621 1022 610 1032 q 640 995 633 1011 q 647 955 647 978 q 640 915 647 931 q 621 888 633 898 q 595 873 610 878 q 565 869 581 869 q 533 873 548 869 q 507 888 518 878 q 488 915 495 898 q 482 955 482 931 "},"Ą":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 m 607 -180 q 620 -118 607 -147 q 657 -65 634 -89 q 709 -24 680 -41 q 771 0 739 -7 l 878 0 q 833 -20 856 -6 q 791 -53 810 -33 q 760 -100 773 -74 q 748 -160 748 -127 q 755 -193 748 -179 q 775 -215 762 -207 q 806 -229 788 -224 q 844 -233 823 -233 q 884 -230 863 -233 q 932 -222 906 -228 l 932 -311 q 905 -321 921 -317 q 872 -327 889 -325 q 840 -332 856 -330 q 813 -334 824 -334 q 659 -297 712 -334 q 607 -180 607 -260 "},"Њ":{"x_min":38.453125,"x_max":1369,"ha":1411,"o":"m 1056 992 l 1056 918 l 999 918 q 943 900 961 918 q 925 835 925 881 l 925 558 l 999 558 q 1169 538 1099 558 q 1283 481 1239 517 q 1348 393 1328 444 q 1369 281 1369 342 q 1346 166 1369 218 q 1277 77 1323 114 q 1159 20 1230 40 q 992 0 1088 0 l 590 0 l 590 73 l 635 73 q 670 79 656 73 q 691 94 683 84 q 702 123 699 105 q 706 165 706 141 l 706 475 l 387 475 l 387 164 q 392 116 387 134 q 408 89 398 99 q 430 76 417 80 q 458 73 443 73 l 503 73 l 503 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 503 992 l 503 918 l 458 918 q 430 915 443 918 q 408 903 417 912 q 392 876 398 893 q 387 828 387 858 l 387 560 l 706 560 l 706 828 q 700 874 706 857 q 686 902 695 892 q 664 915 677 911 q 635 918 651 918 l 590 918 l 590 992 l 1056 992 m 925 82 l 980 82 q 1051 93 1022 82 q 1099 129 1081 105 q 1126 189 1118 153 q 1134 273 1134 225 q 1124 368 1134 329 q 1094 431 1115 407 q 1042 467 1074 456 q 964 478 1010 478 l 925 478 l 925 82 "},"›":{"x_min":90.046875,"x_max":400,"ha":490,"o":"m 400 339 l 187 97 l 90 97 l 230 375 l 90 654 l 187 654 l 400 411 l 400 339 "},"ћ":{"x_min":18.28125,"x_max":889.65625,"ha":926,"o":"m 139 876 l 139 897 q 129 941 139 924 q 104 967 119 958 q 72 979 89 976 q 39 981 54 981 l 23 981 l 23 1055 l 349 1055 l 349 876 l 565 876 l 565 802 l 349 802 l 349 784 q 348 726 349 757 q 344 669 346 695 q 339 608 341 638 l 351 608 q 395 670 372 647 q 445 703 418 692 q 501 717 471 714 q 563 721 530 721 q 659 705 616 721 q 731 657 701 689 q 776 574 760 624 q 792 453 792 523 l 792 172 q 797 120 792 139 q 815 90 803 101 q 844 77 826 80 q 885 73 861 73 l 889 73 l 889 0 l 581 0 l 581 415 q 575 494 581 459 q 556 553 569 529 q 521 590 543 577 q 470 602 500 602 q 412 585 435 602 q 375 537 389 567 q 356 469 362 508 q 349 387 349 430 l 349 164 q 357 117 349 134 q 377 89 364 99 q 408 76 389 80 q 450 73 427 73 l 454 73 l 454 0 l 27 0 l 27 73 l 30 73 q 73 76 54 73 q 108 90 93 80 q 130 119 122 100 q 139 169 139 138 l 139 802 l 18 802 l 18 876 l 139 876 "},"<":{"x_min":90,"x_max":687,"ha":777,"o":"m 90 468 l 90 525 l 687 850 l 687 740 l 238 496 l 687 254 l 687 145 l 90 468 "},"¬":{"x_min":90,"x_max":687,"ha":777,"o":"m 687 546 l 687 198 l 586 198 l 586 446 l 90 446 l 90 546 l 687 546 "},"t":{"x_min":29.546875,"x_max":534,"ha":562,"o":"m 436 97 q 487 101 463 97 q 534 110 512 105 l 534 20 q 504 9 523 15 q 461 -2 485 2 q 405 -10 436 -7 q 337 -14 374 -14 q 253 -2 291 -14 q 188 34 215 8 q 148 102 162 60 q 134 205 134 144 l 134 650 l 29 650 l 29 721 q 109 738 74 721 q 165 779 144 756 q 229 917 208 824 l 344 917 l 344 745 l 521 745 l 521 650 l 344 650 l 344 219 q 366 127 344 156 q 436 97 387 97 "},"Ц":{"x_min":38.453125,"x_max":1090,"ha":1132,"o":"m 1090 -292 l 997 -292 q 987 -159 997 -214 q 956 -68 978 -104 q 901 -16 935 -33 q 819 0 868 0 l 38 0 l 38 73 l 96 73 q 123 76 111 73 q 146 88 136 79 q 162 114 156 97 q 168 158 168 130 l 168 828 q 162 876 168 858 q 147 903 157 893 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 517 992 l 517 918 l 458 918 q 430 915 443 918 q 408 903 417 912 q 392 876 398 893 q 387 828 387 858 l 387 84 l 736 84 l 736 828 q 730 876 736 858 q 715 903 725 893 q 692 915 705 912 q 665 918 679 918 l 606 918 l 606 992 l 1084 992 l 1084 918 l 1026 918 q 999 916 1012 918 q 977 904 987 913 q 961 879 967 895 q 956 835 956 863 l 956 84 l 1090 84 l 1090 -292 "},"ù":{"x_min":36.34375,"x_max":891.4375,"ha":926,"o":"m 614 0 l 584 97 l 577 97 q 532 39 556 61 q 479 6 507 17 q 421 -9 452 -5 q 358 -14 390 -14 q 191 53 249 -14 q 134 260 134 120 l 134 572 q 128 622 134 603 q 111 652 123 641 q 82 667 100 662 q 39 671 64 671 l 36 671 l 36 745 l 344 745 l 344 299 q 349 218 344 254 q 367 157 355 182 q 399 117 379 131 q 450 104 419 104 q 507 118 483 104 q 546 160 531 133 q 568 227 561 188 q 576 315 576 266 l 576 582 q 567 630 576 612 q 546 657 559 647 q 514 668 532 666 q 475 671 496 671 l 471 671 l 471 745 l 787 745 l 787 161 q 794 113 787 130 q 813 87 801 96 q 842 76 825 78 q 879 73 859 73 l 891 73 l 891 0 l 614 0 m 430 842 q 358 889 398 860 q 281 946 318 917 q 214 1004 244 976 q 172 1049 184 1031 l 172 1064 l 389 1064 q 417 1013 400 1040 q 453 958 434 986 q 491 905 471 931 q 525 860 510 879 l 525 842 l 430 842 "},"ï":{"x_min":0,"x_max":465.234375,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m 0 955 q 6 995 0 978 q 24 1022 13 1011 q 50 1036 35 1032 q 81 1041 65 1041 q 112 1036 98 1041 q 139 1022 127 1032 q 157 995 150 1011 q 165 955 165 978 q 157 915 165 931 q 139 888 150 898 q 112 873 127 878 q 81 869 98 869 q 50 873 65 869 q 24 888 35 878 q 6 915 13 898 q 0 955 0 931 m 285 955 q 291 995 285 978 q 310 1022 298 1011 q 336 1036 321 1032 q 368 1041 351 1041 q 398 1036 383 1041 q 424 1022 412 1032 q 442 995 435 1011 q 450 955 450 978 q 442 915 450 931 q 424 888 435 898 q 398 873 412 878 q 368 869 383 869 q 336 873 351 869 q 310 888 321 878 q 291 915 298 898 q 285 955 285 931 "},"Ф":{"x_min":41,"x_max":1139,"ha":1181,"o":"m 691 266 l 731 266 q 822 279 784 266 q 883 322 859 293 q 918 398 907 351 q 929 510 929 444 q 919 611 929 568 q 889 682 910 654 q 833 724 867 710 q 750 737 799 737 l 691 737 l 691 266 m 489 737 l 430 737 q 347 724 381 737 q 291 682 313 710 q 260 611 270 654 q 251 510 251 568 q 262 398 251 444 q 297 322 273 351 q 358 279 321 293 q 448 266 395 266 l 489 266 l 489 737 m 489 186 l 445 186 q 311 198 370 186 q 207 234 252 211 q 131 288 163 257 q 79 357 99 320 q 50 434 59 393 q 41 515 41 474 q 63 639 41 583 q 131 735 85 695 q 248 797 178 775 q 412 820 317 820 l 489 820 l 489 834 q 479 878 489 861 q 455 903 470 895 q 419 915 440 912 q 375 918 398 918 l 356 918 l 356 992 l 823 992 l 823 918 l 805 918 q 761 915 782 918 q 725 903 740 912 q 700 878 710 895 q 691 834 691 861 l 691 820 l 768 820 q 933 797 863 820 q 1048 735 1002 775 q 1116 639 1094 695 q 1139 515 1139 583 q 1129 434 1139 474 q 1100 357 1120 393 q 1049 288 1080 320 q 972 234 1017 257 q 868 198 927 211 q 734 186 809 186 l 691 186 l 691 158 q 700 114 691 130 q 725 88 710 97 q 761 76 740 79 q 805 73 782 73 l 823 73 l 823 0 l 356 0 l 356 73 l 375 73 q 419 76 398 73 q 455 88 440 79 q 479 114 470 97 q 489 158 489 130 l 489 186 "},"Ò":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 340 22 428 -14 q 193 126 251 59 q 106 288 135 193 q 77 498 77 382 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 748 970 661 1007 q 894 867 835 934 q 985 706 954 800 q 1016 496 1016 612 m 310 496 q 323 319 310 397 q 364 187 336 241 q 437 104 392 133 q 547 76 482 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 q 770 674 782 596 q 729 806 757 752 q 657 888 702 860 q 548 916 612 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 m 551 1071 q 479 1118 519 1089 q 402 1175 439 1146 q 335 1233 365 1205 q 293 1278 305 1260 l 293 1293 l 510 1293 q 538 1242 521 1269 q 574 1187 555 1215 q 612 1134 592 1160 q 646 1089 631 1108 l 646 1071 l 551 1071 "},"I":{"x_min":38.453125,"x_max":517.953125,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 "},"˝":{"x_min":128,"x_max":686,"ha":802,"o":"m 128 842 l 128 860 q 158 908 142 882 q 190 961 174 934 q 220 1014 206 988 q 245 1064 235 1040 l 423 1064 l 423 1049 q 402 1021 415 1037 q 372 985 389 1004 q 335 946 355 966 q 296 907 316 926 q 258 871 277 888 q 224 842 239 854 l 128 842 m 392 842 l 392 860 q 422 908 406 882 q 454 961 438 934 q 484 1014 470 988 q 509 1064 498 1040 l 686 1064 l 686 1049 q 665 1021 678 1037 q 635 985 652 1004 q 599 946 618 966 q 560 907 579 926 q 521 871 540 888 q 487 842 503 854 l 392 842 "},"·":{"x_min":97,"x_max":325,"ha":423,"o":"m 97 493 q 105 546 97 524 q 129 580 114 567 q 166 598 145 593 q 211 604 187 604 q 254 598 234 604 q 291 580 275 593 q 315 546 306 567 q 325 493 325 524 q 315 440 325 461 q 291 406 306 419 q 254 387 275 393 q 211 382 234 382 q 166 387 187 382 q 129 406 145 393 q 105 440 114 419 q 97 493 97 461 "},"¿":{"x_min":77,"x_max":713,"ha":764,"o":"m 77 -9 q 94 90 77 46 q 145 171 111 134 q 231 238 179 207 q 352 297 283 268 l 380 424 l 465 424 l 493 253 q 395 197 434 229 q 336 127 357 164 q 305 50 314 91 q 297 -31 297 9 q 303 -92 297 -64 q 322 -139 309 -119 q 356 -170 336 -159 q 405 -181 377 -181 q 458 -167 437 -181 q 492 -129 479 -153 q 511 -74 505 -105 q 517 -6 517 -42 q 595 -12 559 -6 q 657 -31 631 -18 q 698 -61 683 -43 q 713 -104 713 -79 q 695 -167 713 -138 q 641 -218 677 -196 q 549 -252 605 -239 q 416 -265 493 -265 q 281 -247 343 -265 q 173 -197 218 -230 q 102 -117 128 -164 q 77 -9 77 -69 m 540 640 q 531 586 540 608 q 507 552 522 565 q 470 534 491 539 q 426 529 449 529 q 382 534 402 529 q 345 552 361 539 q 321 586 330 565 q 312 640 312 608 q 321 692 312 671 q 345 726 330 713 q 382 745 361 739 q 426 751 402 751 q 470 745 449 751 q 507 726 491 739 q 531 692 522 713 q 540 640 540 671 "},"ſ":{"x_min":9.46875,"x_max":654,"ha":545,"o":"m 9 0 l 9 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 796 q 155 911 139 860 q 207 996 172 961 q 295 1049 242 1031 q 422 1068 349 1068 q 534 1060 489 1068 q 605 1038 578 1052 q 642 1006 631 1024 q 654 966 654 987 q 611 897 654 919 q 483 876 569 876 q 479 912 483 893 q 467 949 475 932 q 446 977 459 966 q 413 988 433 988 q 384 979 396 988 q 364 950 372 970 q 353 898 357 930 q 349 820 349 866 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 514 73 l 514 0 l 9 0 "},"Ђ":{"x_min":13,"x_max":1089,"ha":1145,"o":"m 536 568 q 576 582 553 575 q 628 595 599 589 q 689 604 656 600 q 756 609 721 609 q 899 594 837 609 q 1003 545 960 580 q 1067 453 1045 511 q 1089 308 1089 395 q 1068 159 1089 219 q 1008 64 1047 99 q 911 14 968 29 q 781 0 855 0 l 744 0 l 744 80 l 759 80 q 805 87 785 80 q 839 116 825 94 q 860 179 853 138 q 867 289 867 220 q 855 399 867 357 q 821 462 843 440 q 769 490 800 484 q 703 497 739 497 q 652 494 677 497 q 605 486 627 491 q 566 475 584 481 q 536 464 548 469 l 536 164 q 541 116 536 134 q 556 89 546 99 q 578 76 565 80 q 606 73 591 73 l 664 73 l 664 0 l 185 0 l 185 73 l 243 73 q 272 76 259 73 q 294 89 285 80 q 309 116 304 99 q 315 164 315 134 l 315 907 l 231 907 q 179 900 200 907 q 144 881 158 893 q 125 850 131 868 q 116 809 118 832 l 106 723 l 13 723 l 20 992 l 830 992 l 837 723 l 744 723 l 733 809 q 724 850 731 832 q 705 881 718 868 q 670 900 691 893 q 618 907 649 907 l 536 907 l 536 568 "},"ű":{"x_min":36.34375,"x_max":891.4375,"ha":926,"o":"m 614 0 l 584 97 l 577 97 q 532 39 556 61 q 479 6 507 17 q 421 -9 452 -5 q 358 -14 390 -14 q 191 53 249 -14 q 134 260 134 120 l 134 572 q 128 622 134 603 q 111 652 123 641 q 82 667 100 662 q 39 671 64 671 l 36 671 l 36 745 l 344 745 l 344 299 q 349 218 344 254 q 367 157 355 182 q 399 117 379 131 q 450 104 419 104 q 507 118 483 104 q 546 160 531 133 q 568 227 561 188 q 576 315 576 266 l 576 582 q 567 630 576 612 q 546 657 559 647 q 514 668 532 666 q 475 671 496 671 l 471 671 l 471 745 l 787 745 l 787 161 q 794 113 787 130 q 813 87 801 96 q 842 76 825 78 q 879 73 859 73 l 891 73 l 891 0 l 614 0 m 233 842 l 233 860 q 263 908 247 882 q 295 961 279 934 q 325 1014 311 988 q 350 1064 340 1040 l 528 1064 l 528 1049 q 507 1021 520 1037 q 477 985 494 1004 q 440 946 460 966 q 401 907 421 926 q 363 871 382 888 q 329 842 344 854 l 233 842 m 497 842 l 497 860 q 527 908 511 882 q 559 961 543 934 q 589 1014 575 988 q 614 1064 603 1040 l 791 1064 l 791 1049 q 770 1021 783 1037 q 740 985 757 1004 q 704 946 723 966 q 665 907 684 926 q 626 871 645 888 q 592 842 608 854 l 497 842 "},"Ǽ":{"x_min":-0.390625,"x_max":1335,"ha":1380,"o":"m 861 84 l 1138 84 q 1174 92 1159 84 q 1200 114 1189 100 q 1217 148 1211 128 q 1227 190 1224 167 l 1239 256 l 1335 256 l 1325 0 l 511 0 l 511 73 l 569 73 q 623 97 607 73 q 640 156 640 120 l 640 318 l 320 318 l 262 201 q 245 160 250 180 q 239 128 239 140 q 261 86 239 99 q 323 73 282 73 l 346 73 l 346 0 l 0 0 l 0 73 l 16 73 q 81 100 52 73 q 140 181 109 126 l 530 911 l 438 918 l 438 992 l 1282 992 l 1288 736 l 1191 736 l 1184 801 q 1158 880 1178 852 q 1095 907 1137 907 l 861 907 l 861 560 l 1190 560 l 1190 476 l 861 476 l 861 84 m 626 907 l 365 402 l 640 402 l 640 907 l 626 907 m 757 1089 q 790 1134 771 1108 q 827 1187 808 1160 q 863 1242 846 1215 q 890 1293 879 1269 l 1109 1293 l 1109 1278 q 1066 1233 1096 1260 q 999 1175 1036 1205 q 923 1118 962 1146 q 851 1071 883 1089 l 757 1071 l 757 1089 "},"φ":{"x_min":65,"x_max":964,"ha":1030,"o":"m 964 373 q 863 91 964 187 q 556 -12 762 -3 l 556 -334 l 473 -334 l 473 -12 q 298 17 374 -7 q 170 91 222 43 q 91 210 118 139 q 65 373 65 280 q 165 653 65 558 q 473 757 266 748 l 473 1055 l 556 1055 l 556 757 q 729 727 654 752 q 857 653 805 701 q 936 536 909 606 q 964 373 964 466 m 283 373 q 292 248 283 302 q 323 157 301 194 q 381 100 345 120 q 473 74 418 79 l 473 669 q 381 644 418 664 q 323 587 345 624 q 292 498 301 551 q 283 373 283 445 m 746 373 q 737 497 746 444 q 705 586 727 550 q 647 643 683 622 q 556 668 610 663 l 556 74 q 647 100 611 79 q 706 157 684 120 q 737 248 727 194 q 746 373 746 302 "},";":{"x_min":61.96875,"x_max":325,"ha":408,"o":"m 311 58 q 297 -27 311 14 q 254 -104 283 -68 q 176 -167 224 -139 q 61 -214 129 -195 l 61 -142 q 115 -120 92 -131 q 153 -96 138 -109 q 176 -69 168 -84 q 184 -33 184 -53 q 176 -12 184 -20 q 158 3 169 -3 q 133 19 146 11 q 109 39 120 26 q 90 69 97 51 q 83 115 83 87 q 111 186 83 162 q 182 211 140 211 q 276 170 241 211 q 311 58 311 129 m 97 646 q 105 699 97 677 q 129 733 114 720 q 166 751 145 746 q 211 757 187 757 q 254 751 234 757 q 291 733 275 746 q 315 699 306 720 q 325 646 325 677 q 315 593 325 614 q 291 559 306 572 q 254 540 275 546 q 211 535 234 535 q 166 540 187 535 q 129 559 145 546 q 105 593 114 572 q 97 646 97 614 "},"Ș":{"x_min":41.203125,"x_max":745,"ha":814,"o":"m 366 -14 q 210 3 273 -14 q 110 49 148 21 q 57 111 73 76 q 41 179 41 146 q 54 240 41 215 q 89 280 67 264 q 139 302 111 295 q 198 309 168 309 q 212 204 198 249 q 252 129 227 159 q 312 83 277 99 q 388 68 347 68 q 461 80 429 68 q 515 112 493 91 q 549 160 538 132 q 561 219 561 187 q 546 282 561 254 q 503 333 532 309 q 431 377 474 356 q 329 423 387 399 q 206 485 256 453 q 126 553 156 516 q 82 632 95 590 q 69 726 69 675 q 94 841 69 790 q 166 930 120 893 q 273 986 211 966 q 409 1006 336 1006 q 542 993 486 1006 q 634 959 597 980 q 688 908 670 937 q 705 844 705 878 q 695 799 705 820 q 663 762 684 778 q 609 738 641 746 q 534 729 577 729 q 526 792 534 758 q 501 854 519 825 q 455 902 483 883 q 387 921 427 921 q 334 913 359 921 q 290 888 309 904 q 260 848 271 872 q 250 792 250 824 q 259 737 250 763 q 294 687 269 712 q 364 637 320 662 q 479 584 408 613 q 601 524 550 555 q 683 459 651 494 q 730 382 715 424 q 745 289 745 340 q 718 166 745 222 q 642 70 692 110 q 523 8 592 30 q 366 -14 453 -14 m 272 -289 q 286 -242 278 -268 q 302 -189 294 -216 q 316 -134 309 -161 q 326 -85 322 -108 l 488 -85 l 488 -98 q 463 -147 478 -120 q 429 -202 447 -174 q 392 -257 411 -230 q 355 -307 373 -285 l 272 -307 l 272 -289 "},"Ġ":{"x_min":77,"x_max":1029.375,"ha":1068,"o":"m 587 -14 q 362 22 458 -14 q 203 126 266 59 q 108 288 139 193 q 77 497 77 382 q 110 703 77 609 q 208 864 143 796 q 370 968 273 931 q 594 1006 467 1006 q 746 993 681 1006 q 854 959 811 980 q 920 908 898 937 q 941 844 941 878 q 930 798 941 820 q 895 761 918 777 q 839 735 872 744 q 762 726 806 726 q 751 803 762 768 q 720 864 741 839 q 666 903 699 889 q 590 917 634 917 q 461 889 514 917 q 374 807 407 861 q 325 675 340 754 q 310 497 310 597 q 326 318 310 396 q 377 188 342 241 q 469 107 413 135 q 608 80 526 80 q 659 82 634 80 q 709 89 685 84 l 709 293 q 684 371 709 349 q 610 392 659 392 l 592 392 l 592 466 l 1029 466 l 1029 392 l 1011 392 q 974 387 990 392 q 948 370 958 382 q 933 338 938 358 q 929 288 929 318 l 929 60 q 764 4 847 23 q 587 -14 682 -14 m 449 1198 q 458 1243 449 1224 q 483 1274 467 1262 q 520 1292 499 1286 q 567 1298 541 1298 q 612 1292 590 1298 q 650 1274 634 1286 q 676 1243 666 1262 q 686 1198 686 1224 q 676 1153 686 1172 q 650 1122 666 1134 q 612 1104 634 1110 q 567 1098 590 1098 q 520 1104 541 1098 q 483 1122 499 1110 q 458 1153 467 1134 q 449 1198 449 1172 "},"6":{"x_min":62,"x_max":728,"ha":777,"o":"m 445 923 q 371 899 404 923 q 314 828 338 875 q 276 712 290 781 q 258 556 262 644 q 290 575 272 565 q 332 591 308 584 q 385 603 355 599 q 450 608 414 608 q 564 588 513 608 q 652 531 615 568 q 708 441 688 494 q 728 320 728 388 q 707 184 728 245 q 646 78 687 123 q 546 10 606 34 q 406 -14 486 -14 q 266 14 329 -14 q 157 100 202 42 q 87 247 112 159 q 62 458 62 336 q 86 672 62 573 q 159 846 110 772 q 283 963 208 920 q 458 1006 357 1006 q 572 993 525 1006 q 648 958 619 980 q 690 910 677 937 q 704 852 704 882 q 695 812 704 831 q 666 777 686 792 q 615 753 647 762 q 537 744 583 744 q 533 807 537 776 q 519 865 529 839 q 491 907 509 891 q 445 923 473 923 m 398 523 q 358 517 379 523 q 318 502 337 511 q 282 480 298 492 q 258 456 266 468 q 270 285 258 357 q 303 167 282 213 q 351 99 323 120 q 410 77 379 77 q 495 132 464 77 q 526 306 526 186 q 492 471 526 419 q 398 523 458 523 "},"n":{"x_min":27.78125,"x_max":889.65625,"ha":926,"o":"m 581 0 l 581 456 q 575 536 581 501 q 556 595 569 571 q 521 631 543 618 q 470 643 500 643 q 412 626 435 643 q 375 579 389 608 q 356 510 362 549 q 349 429 349 471 l 349 164 q 357 117 349 134 q 377 89 364 99 q 408 76 389 80 q 450 73 427 73 l 454 73 l 454 0 l 27 0 l 27 73 l 30 73 q 73 76 54 73 q 108 90 93 80 q 130 119 122 100 q 139 169 139 138 l 139 580 q 131 627 139 610 q 111 655 124 645 q 80 668 98 664 q 38 671 61 671 l 34 671 l 34 745 l 326 745 l 344 645 l 351 645 q 395 707 372 684 q 445 743 418 730 q 501 758 471 755 q 563 762 530 762 q 659 746 616 762 q 731 698 701 730 q 776 615 760 665 q 792 494 792 564 l 792 172 q 797 120 792 139 q 815 90 803 101 q 844 77 826 80 q 885 73 861 73 l 889 73 l 889 0 l 581 0 "},"ά":{"x_min":65,"x_max":887.46875,"ha":901,"o":"m 770 0 q 683 9 719 0 q 623 35 647 19 q 586 69 599 50 q 568 108 573 89 l 559 108 q 523 59 543 81 q 478 20 504 36 q 420 -4 452 4 q 347 -14 387 -14 q 226 8 279 -14 q 137 78 173 31 q 83 198 102 125 q 65 370 65 270 q 87 544 65 471 q 149 665 109 617 q 246 735 189 712 q 372 758 302 758 q 446 747 413 758 q 505 717 479 736 q 550 673 531 698 q 582 620 569 648 l 595 620 q 622 682 607 652 q 665 745 637 712 l 798 745 q 785 692 792 725 q 773 621 778 660 q 765 542 768 583 q 762 464 762 501 l 762 194 q 791 103 762 133 q 875 73 821 73 l 887 73 l 887 0 l 770 0 m 408 89 q 476 115 449 89 q 520 187 504 142 q 544 294 537 232 q 551 427 551 356 l 551 479 q 530 560 543 526 q 500 616 517 594 q 462 648 483 637 q 418 658 441 658 q 312 586 345 658 q 279 370 279 513 q 308 159 279 228 q 408 89 338 89 m 368 860 q 382 907 374 881 q 397 960 389 932 q 411 1014 404 987 q 421 1064 417 1041 l 611 1064 l 611 1050 q 584 1001 601 1028 q 548 947 568 974 q 506 892 528 919 q 464 842 484 865 l 368 842 l 368 860 "},"ϊ":{"x_min":41,"x_max":533,"ha":546,"o":"m 339 745 l 339 227 q 361 128 339 159 q 432 97 383 97 q 484 100 457 97 q 533 108 511 104 l 533 15 q 507 6 524 11 q 468 -3 490 0 q 417 -10 445 -7 q 359 -14 389 -14 q 262 -2 305 -14 q 190 33 219 8 q 144 100 160 58 q 129 201 129 141 l 129 745 l 339 745 m 41 955 q 47 995 41 978 q 65 1022 54 1011 q 91 1036 76 1032 q 122 1041 106 1041 q 153 1036 139 1041 q 180 1022 168 1032 q 198 995 191 1011 q 206 955 206 978 q 198 915 206 931 q 180 888 191 898 q 153 873 168 878 q 122 869 139 869 q 91 873 106 869 q 65 888 76 878 q 47 915 54 898 q 41 955 41 931 m 326 955 q 332 995 326 978 q 351 1022 339 1011 q 377 1036 362 1032 q 409 1041 392 1041 q 439 1036 424 1041 q 465 1022 453 1032 q 483 995 476 1011 q 491 955 491 978 q 483 915 491 931 q 465 888 476 898 q 439 873 453 878 q 409 869 424 869 q 377 873 392 869 q 351 888 362 878 q 332 915 339 898 q 326 955 326 931 "},"":{"x_min":0,"x_max":0,"ha":0},"ģ":{"x_min":3,"x_max":772,"ha":778,"o":"m 772 717 q 767 687 772 702 q 751 662 762 672 q 720 644 740 651 q 672 638 701 638 q 668 663 672 652 q 656 681 664 674 q 639 693 649 689 q 619 696 630 696 q 594 692 608 696 q 574 681 581 687 q 600 646 588 666 q 622 603 612 626 q 636 555 631 580 q 642 504 642 530 q 625 408 642 452 q 574 331 608 363 q 486 280 539 298 q 361 262 433 262 q 342 262 353 262 q 319 263 330 262 q 297 264 307 263 q 281 266 286 265 q 263 254 272 261 q 246 238 253 247 q 235 218 239 229 q 230 195 230 207 q 248 161 230 172 q 295 151 266 151 l 464 151 q 583 136 533 151 q 666 94 633 121 q 715 27 699 67 q 731 -61 731 -11 q 706 -176 731 -125 q 632 -261 682 -226 q 506 -315 582 -296 q 327 -334 431 -334 q 83 -284 163 -334 q 3 -140 3 -235 q 51 -26 3 -66 q 190 20 99 13 q 153 39 171 28 q 120 65 135 49 q 97 100 106 80 q 89 144 89 119 q 98 186 89 167 q 123 224 107 206 q 162 258 139 242 q 212 289 185 274 q 156 320 182 300 q 111 366 130 339 q 81 428 92 393 q 71 504 71 462 q 141 694 71 627 q 361 762 212 762 q 453 749 410 762 q 526 719 495 736 q 552 745 538 731 q 583 770 566 759 q 623 789 601 782 q 671 797 644 797 q 715 790 696 797 q 746 773 733 784 q 765 748 759 762 q 772 717 772 733 m 167 -137 q 208 -223 167 -195 q 330 -250 250 -250 q 508 -215 452 -250 q 564 -111 564 -180 q 536 -49 564 -67 q 452 -32 508 -32 l 290 -32 q 247 -35 269 -32 q 208 -51 226 -39 q 178 -83 190 -62 q 167 -137 167 -104 m 260 504 q 265 438 260 468 q 281 388 270 409 q 311 355 293 367 q 357 344 330 344 q 403 355 384 344 q 432 387 421 366 q 447 439 443 409 q 452 506 452 469 q 447 577 452 545 q 431 631 442 608 q 401 666 420 653 q 355 678 383 678 q 310 665 328 678 q 280 629 292 652 q 264 574 269 606 q 260 504 260 542 m 502 1045 q 487 999 495 1024 q 472 945 479 973 q 458 891 464 918 q 447 842 451 865 l 287 842 l 287 856 q 311 904 296 877 q 344 959 327 932 q 382 1014 362 987 q 418 1064 401 1041 l 502 1064 l 502 1045 "},"∂":{"x_min":65,"x_max":724,"ha":789,"o":"m 469 914 q 407 899 434 914 q 362 860 380 883 q 335 807 344 836 q 325 751 325 778 q 254 760 283 751 q 206 782 224 768 q 180 815 188 797 q 172 854 172 834 q 186 915 172 887 q 229 963 201 943 q 298 994 257 983 q 391 1006 339 1006 q 536 979 474 1006 q 640 901 599 952 q 703 778 682 851 q 724 612 724 705 q 722 558 724 590 q 716 487 721 526 q 701 402 711 448 q 675 308 691 357 q 619 180 652 239 q 540 78 585 121 q 437 10 494 35 q 311 -14 380 -14 q 195 6 242 -14 q 119 62 148 27 q 77 141 90 96 q 65 235 65 186 q 74 319 65 273 q 102 410 83 364 q 152 498 122 455 q 225 574 183 541 q 322 626 267 606 q 447 647 377 647 q 559 622 515 647 q 628 551 603 598 l 635 551 q 637 566 636 558 q 639 584 638 575 q 640 601 639 593 q 640 616 640 610 q 629 735 640 680 q 597 829 618 789 q 543 892 576 869 q 469 914 511 914 m 390 80 q 463 109 427 80 q 529 186 499 137 q 582 299 559 235 q 615 432 605 362 q 599 480 609 457 q 575 521 589 503 q 541 548 560 538 q 495 559 521 559 q 428 543 458 559 q 374 500 398 526 q 333 438 351 473 q 305 366 316 403 q 288 292 294 329 q 283 224 283 256 q 311 118 283 157 q 390 80 339 80 "},"κ":{"x_min":23.703125,"x_max":884,"ha":891,"o":"m 451 490 q 536 604 497 556 q 610 685 574 653 q 681 734 645 718 q 757 750 716 750 q 833 726 807 750 q 858 659 858 702 q 857 641 858 651 q 854 622 856 631 q 849 603 852 612 q 844 589 847 595 q 814 608 834 600 q 759 616 793 616 q 722 613 741 616 q 683 600 703 610 q 640 573 662 591 q 592 526 617 556 l 540 462 l 734 181 q 879 73 812 73 l 884 73 l 884 0 l 864 0 q 736 3 788 0 q 647 18 684 6 q 583 55 610 30 q 529 123 555 80 l 419 301 l 349 245 l 349 0 l 139 0 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 498 q 348 452 349 480 q 346 399 347 425 q 343 337 344 369 l 451 490 "},"‡":{"x_min":48.875,"x_max":615.40625,"ha":664,"o":"m 368 151 l 615 190 l 615 29 l 368 64 l 421 -154 l 245 -154 l 295 64 l 48 29 l 48 190 l 295 151 l 232 308 q 263 336 248 317 q 288 381 276 353 q 305 454 300 409 q 288 526 300 499 q 263 568 276 553 q 232 592 248 586 l 295 749 l 48 711 l 48 872 l 295 836 l 245 1055 l 421 1055 l 368 836 l 615 872 l 615 711 l 368 749 l 435 592 q 402 566 417 584 q 377 524 389 551 q 358 452 364 497 q 377 377 364 406 q 402 334 389 349 q 435 308 417 316 l 368 151 "},"ň":{"x_min":27.78125,"x_max":889.65625,"ha":926,"o":"m 581 0 l 581 456 q 575 536 581 501 q 556 595 569 571 q 521 631 543 618 q 470 643 500 643 q 412 626 435 643 q 375 579 389 608 q 356 510 362 549 q 349 429 349 471 l 349 164 q 357 117 349 134 q 377 89 364 99 q 408 76 389 80 q 450 73 427 73 l 454 73 l 454 0 l 27 0 l 27 73 l 30 73 q 73 76 54 73 q 108 90 93 80 q 130 119 122 100 q 139 169 139 138 l 139 580 q 131 627 139 610 q 111 655 124 645 q 80 668 98 664 q 38 671 61 671 l 34 671 l 34 745 l 326 745 l 344 645 l 351 645 q 395 707 372 684 q 445 743 418 730 q 501 758 471 755 q 563 762 530 762 q 659 746 616 762 q 731 698 701 730 q 776 615 760 665 q 792 494 792 564 l 792 172 q 797 120 792 139 q 815 90 803 101 q 844 77 826 80 q 885 73 861 73 l 889 73 l 889 0 l 581 0 m 220 1064 l 316 1064 q 349 1036 330 1052 q 389 1004 369 1021 q 430 970 410 986 q 466 938 450 953 q 501 970 481 953 q 542 1004 521 986 q 583 1036 563 1021 q 617 1064 603 1052 l 713 1064 l 713 1045 q 675 1000 696 1026 q 631 947 653 974 q 590 892 609 919 q 560 842 571 865 l 373 842 q 343 892 362 865 q 302 947 323 919 q 258 1000 280 974 q 220 1045 236 1026 l 220 1064 "},"√":{"x_min":42.421875,"x_max":792,"ha":726,"o":"m 445 -10 l 349 -10 l 155 534 l 42 534 l 42 618 l 247 618 l 405 164 l 700 1135 l 792 1135 l 445 -10 "},"ę":{"x_min":65,"x_max":735,"ha":793,"o":"m 412 671 q 319 614 354 671 q 282 445 285 556 l 522 445 q 516 540 522 497 q 497 611 510 582 q 463 656 483 640 q 412 671 442 671 m 425 -14 q 269 11 337 -14 q 156 86 202 37 q 88 206 111 135 q 65 367 65 277 q 88 539 65 465 q 155 662 111 613 q 263 737 199 712 q 409 762 327 762 q 545 740 485 762 q 648 677 606 719 q 712 572 690 635 q 735 427 735 510 l 735 356 l 279 356 q 294 236 281 286 q 331 153 307 186 q 388 105 354 120 q 465 89 421 89 q 531 98 501 89 q 587 121 562 106 q 630 157 612 137 q 661 202 649 178 q 699 134 699 182 q 682 77 699 104 q 632 30 666 51 q 547 -1 598 10 q 425 -14 496 -14 m 344 -159 q 357 -97 344 -126 q 394 -44 371 -68 q 446 -3 417 -20 q 508 21 476 13 l 615 21 q 570 0 593 14 q 528 -32 547 -12 q 497 -79 510 -53 q 485 -139 485 -106 q 492 -172 485 -158 q 512 -194 499 -186 q 543 -208 525 -203 q 581 -212 560 -212 q 621 -209 600 -212 q 669 -201 643 -207 l 669 -290 q 642 -300 658 -296 q 609 -306 626 -304 q 577 -311 593 -309 q 550 -313 561 -313 q 396 -276 449 -313 q 344 -159 344 -239 "},"į":{"x_min":23.703125,"x_max":465.234375,"ha":489,"o":"m 119 970 q 128 1015 119 996 q 153 1046 137 1034 q 190 1064 169 1058 q 237 1070 212 1070 q 282 1064 261 1070 q 320 1046 304 1058 q 346 1015 337 1034 q 356 970 356 996 q 346 925 356 944 q 320 894 337 906 q 282 876 304 882 q 237 870 261 870 q 190 876 212 870 q 153 894 169 882 q 128 925 137 906 q 119 970 119 944 m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m 98 -180 q 111 -118 98 -147 q 148 -65 125 -89 q 200 -24 171 -41 q 262 0 230 -7 l 369 0 q 324 -20 347 -6 q 282 -53 301 -33 q 251 -100 264 -74 q 239 -160 239 -127 q 246 -193 239 -179 q 266 -215 253 -207 q 297 -229 279 -224 q 335 -233 314 -233 q 375 -230 354 -233 q 423 -222 397 -228 l 423 -311 q 396 -321 412 -317 q 363 -327 380 -325 q 331 -332 347 -330 q 304 -334 315 -334 q 150 -297 203 -334 q 98 -180 98 -260 "},"Τ":{"x_min":13,"x_max":893,"ha":907,"o":"m 563 164 q 568 116 563 134 q 584 89 574 99 q 606 76 593 80 q 634 73 619 73 l 692 73 l 692 0 l 213 0 l 213 73 l 271 73 q 300 76 287 73 q 322 89 313 80 q 337 116 332 99 q 343 164 343 134 l 343 907 l 231 907 q 179 900 200 907 q 144 881 158 893 q 125 850 131 868 q 116 809 118 832 l 106 723 l 13 723 l 20 992 l 886 992 l 893 723 l 800 723 l 789 809 q 780 850 787 832 q 761 881 774 868 q 726 900 747 893 q 674 907 705 907 l 563 907 l 563 164 "},"≈":{"x_min":77,"x_max":702,"ha":779,"o":"m 366 333 q 322 351 341 344 q 288 362 303 358 q 259 368 273 367 q 230 370 245 370 q 191 364 211 370 q 151 346 171 357 q 112 321 131 336 q 77 288 93 306 l 77 395 q 244 469 144 469 q 280 467 263 469 q 316 461 297 465 q 357 448 334 456 q 412 426 380 439 q 456 408 437 415 q 490 396 475 400 q 520 390 506 391 q 548 388 534 388 q 587 394 567 388 q 627 412 607 401 q 666 438 647 423 q 702 470 685 453 l 702 363 q 534 290 635 290 q 497 291 514 290 q 462 298 481 293 q 421 311 444 302 q 366 333 398 319 m 366 565 q 322 583 341 576 q 288 594 303 590 q 259 600 273 599 q 230 602 245 602 q 191 596 211 602 q 151 578 171 589 q 112 553 131 568 q 77 520 93 538 l 77 627 q 244 701 144 701 q 280 699 263 701 q 316 693 297 697 q 357 680 334 688 q 412 658 380 671 q 456 640 437 647 q 490 628 475 632 q 520 622 506 623 q 548 620 534 620 q 587 626 567 620 q 627 644 607 633 q 666 670 647 655 q 702 702 685 685 l 702 595 q 534 522 635 522 q 497 523 514 522 q 462 530 481 525 q 421 543 444 534 q 366 565 398 551 "},"ΐ":{"x_min":14,"x_max":533,"ha":546,"o":"m 339 745 l 339 227 q 361 128 339 159 q 432 97 383 97 q 484 100 457 97 q 533 108 511 104 l 533 15 q 507 6 524 11 q 468 -3 490 0 q 417 -10 445 -7 q 359 -14 389 -14 q 262 -2 305 -14 q 190 33 219 8 q 144 100 160 58 q 129 201 129 141 l 129 745 l 339 745 m 202 973 q 216 1019 208 994 q 232 1073 224 1045 q 246 1127 239 1100 q 256 1177 252 1153 l 418 1177 l 418 1162 q 393 1114 408 1141 q 359 1059 377 1087 q 322 1004 341 1031 q 285 955 303 977 l 202 955 l 202 973 m 14 955 q 20 995 14 978 q 38 1022 27 1011 q 64 1036 49 1032 q 95 1041 79 1041 q 126 1036 112 1041 q 153 1022 141 1032 q 171 995 164 1011 q 179 955 179 978 q 171 915 179 931 q 153 888 164 898 q 126 873 141 878 q 95 869 112 869 q 64 873 79 869 q 38 888 49 878 q 20 915 27 898 q 14 955 14 931 m 354 955 q 360 995 354 978 q 379 1022 367 1011 q 405 1036 390 1032 q 437 1041 420 1041 q 467 1036 453 1041 q 493 1022 482 1032 q 512 995 505 1011 q 519 955 519 978 q 512 915 519 931 q 493 888 505 898 q 467 873 482 878 q 437 869 453 869 q 405 873 420 869 q 379 888 390 878 q 360 915 367 898 q 354 955 354 931 "},"ĸ":{"x_min":23.703125,"x_max":884,"ha":884,"o":"m 884 0 l 864 0 q 736 3 788 0 q 647 18 685 6 q 583 55 610 31 q 529 123 556 80 l 405 318 l 349 276 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 519 q 348 475 349 500 q 346 428 347 451 q 343 375 344 402 l 518 571 q 548 612 541 597 q 555 637 555 627 q 536 665 555 655 q 483 675 518 675 l 483 745 l 833 745 l 833 675 q 739 646 785 675 q 637 557 692 618 l 550 457 l 734 181 q 808 100 771 126 q 879 73 846 73 l 884 73 l 884 0 "},"g":{"x_min":3,"x_max":772,"ha":778,"o":"m 772 717 q 767 687 772 702 q 751 662 762 672 q 720 644 740 651 q 672 638 701 638 q 668 663 672 652 q 656 681 664 674 q 639 693 649 689 q 619 696 630 696 q 594 692 608 696 q 574 681 581 687 q 600 646 588 666 q 622 603 612 626 q 636 555 631 580 q 642 504 642 530 q 625 408 642 452 q 574 331 608 363 q 486 280 539 298 q 361 262 433 262 q 342 262 353 262 q 319 263 330 262 q 297 264 307 263 q 281 266 286 265 q 263 254 272 261 q 246 238 253 247 q 235 218 239 229 q 230 195 230 207 q 248 161 230 172 q 295 151 266 151 l 464 151 q 583 136 533 151 q 666 94 633 121 q 715 27 699 67 q 731 -61 731 -11 q 706 -176 731 -125 q 632 -261 682 -226 q 506 -315 582 -296 q 327 -334 431 -334 q 83 -284 163 -334 q 3 -140 3 -235 q 51 -26 3 -66 q 190 20 99 13 q 153 39 171 28 q 120 65 135 49 q 97 100 106 80 q 89 144 89 119 q 98 186 89 167 q 123 224 107 206 q 162 258 139 242 q 212 289 185 274 q 156 320 182 300 q 111 366 130 339 q 81 428 92 393 q 71 504 71 462 q 141 694 71 627 q 361 762 212 762 q 453 749 410 762 q 526 719 495 736 q 552 745 538 731 q 583 770 566 759 q 623 789 601 782 q 671 797 644 797 q 715 790 696 797 q 746 773 733 784 q 765 748 759 762 q 772 717 772 733 m 167 -137 q 208 -223 167 -195 q 330 -250 250 -250 q 508 -215 452 -250 q 564 -111 564 -180 q 536 -49 564 -67 q 452 -32 508 -32 l 290 -32 q 247 -35 269 -32 q 208 -51 226 -39 q 178 -83 190 -62 q 167 -137 167 -104 m 260 504 q 265 438 260 468 q 281 388 270 409 q 311 355 293 367 q 357 344 330 344 q 403 355 384 344 q 432 387 421 366 q 447 439 443 409 q 452 506 452 469 q 447 577 452 545 q 431 631 442 608 q 401 666 420 653 q 355 678 383 678 q 310 665 328 678 q 280 629 292 652 q 264 574 269 606 q 260 504 260 542 "},"ǿ":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 259 15 330 -14 l 214 -56 l 116 -56 l 185 57 q 96 184 127 106 q 65 374 65 263 q 156 666 65 570 q 427 762 248 762 q 520 753 476 762 q 600 728 563 745 l 644 800 l 741 800 l 670 683 q 756 558 726 634 q 786 374 786 482 m 280 374 q 282 294 280 331 q 290 227 284 258 l 528 614 q 425 673 493 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 m 571 374 q 568 445 571 412 q 562 508 566 478 l 326 124 q 426 73 360 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 m 342 860 q 375 905 356 879 q 412 958 393 931 q 448 1013 431 986 q 475 1064 464 1040 l 694 1064 l 694 1049 q 651 1004 681 1031 q 584 946 621 976 q 508 889 547 917 q 436 842 468 860 l 342 842 l 342 860 "},"²":{"x_min":52,"x_max":498,"ha":555,"o":"m 473 857 q 464 799 473 826 q 433 742 456 772 q 372 677 411 712 q 273 594 333 642 l 160 504 l 381 504 q 423 518 411 504 q 439 550 435 531 l 446 588 l 498 588 l 492 397 l 52 397 l 52 496 l 204 625 q 263 683 239 654 q 300 738 286 711 q 319 792 313 765 q 324 848 324 820 q 309 918 324 893 q 259 943 295 943 q 222 931 236 943 q 200 898 207 918 q 190 854 192 879 q 187 805 187 829 q 142 810 164 805 q 102 825 119 815 q 73 851 84 835 q 62 889 62 866 q 75 935 62 914 q 113 972 88 957 q 175 997 138 988 q 259 1006 212 1006 q 356 995 315 1006 q 422 965 396 984 q 460 918 448 946 q 473 857 473 891 "},"Ã":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 m 639 1203 q 666 1209 654 1203 q 687 1225 678 1215 q 700 1249 695 1235 q 707 1276 705 1262 l 798 1276 q 782 1197 795 1234 q 746 1131 768 1159 q 692 1087 723 1103 q 624 1071 661 1071 q 556 1084 587 1071 q 500 1114 526 1098 q 451 1145 474 1131 q 406 1158 429 1158 q 379 1152 391 1158 q 358 1136 367 1146 q 345 1112 350 1126 q 338 1085 340 1099 l 248 1085 q 263 1164 250 1127 q 300 1230 277 1202 q 354 1274 323 1258 q 422 1291 385 1291 q 490 1277 460 1291 q 546 1247 520 1263 q 595 1216 572 1230 q 639 1203 618 1203 "},"Ј":{"x_min":-54.078125,"x_max":495.96875,"ha":511,"o":"m 495 918 l 437 918 q 409 915 422 918 q 386 903 396 912 q 371 876 377 893 q 365 828 365 858 l 365 -2 q 351 -114 365 -65 q 312 -200 337 -163 q 252 -263 287 -237 q 176 -304 217 -288 q 89 -326 135 -319 q -3 -334 43 -334 l -54 -334 l -54 -253 l -28 -253 q 35 -240 4 -253 q 91 -199 67 -228 q 131 -121 116 -169 q 146 -4 146 -74 l 146 833 q 140 878 146 861 q 125 903 135 895 q 102 915 115 912 q 75 918 89 918 l 17 918 l 17 992 l 495 992 l 495 918 "},"©":{"x_min":77,"x_max":1097,"ha":1174,"o":"m 77 495 q 95 631 77 566 q 146 753 113 696 q 225 857 179 810 q 328 937 272 903 q 450 988 385 970 q 585 1007 515 1007 q 721 988 656 1007 q 843 937 787 970 q 947 857 900 903 q 1027 753 993 810 q 1078 631 1060 696 q 1097 495 1097 566 q 1078 359 1097 424 q 1027 238 1060 294 q 947 134 993 181 q 843 55 900 88 q 721 3 787 21 q 585 -14 656 -14 q 450 3 515 -14 q 328 55 385 21 q 225 134 272 88 q 146 238 179 181 q 95 359 113 294 q 77 495 77 424 m 152 495 q 168 380 152 435 q 212 277 184 325 q 280 189 240 228 q 367 121 319 149 q 471 77 415 93 q 585 61 526 61 q 701 77 646 61 q 805 121 757 93 q 893 189 853 149 q 961 277 932 228 q 1004 380 989 325 q 1020 495 1020 435 q 1004 610 1020 555 q 961 714 989 666 q 893 803 932 763 q 805 871 853 842 q 701 914 757 899 q 585 930 646 930 q 471 914 526 930 q 367 871 415 899 q 280 803 319 842 q 212 714 240 763 q 168 611 184 666 q 152 495 152 555 m 611 247 q 670 255 643 247 q 719 277 697 263 q 756 307 740 290 q 782 341 772 324 q 795 324 790 335 q 801 298 801 313 q 788 259 801 279 q 749 223 775 239 q 684 197 723 207 q 593 187 645 187 q 472 209 523 187 q 385 272 420 231 q 333 370 350 313 q 316 496 316 427 q 334 620 316 564 q 391 717 353 677 q 484 781 429 758 q 612 804 539 804 q 696 796 660 804 q 755 775 731 788 q 791 743 779 761 q 803 704 803 726 q 795 677 803 690 q 775 657 788 665 q 745 644 762 648 q 708 639 727 639 q 702 678 708 659 q 686 712 697 696 q 656 736 674 727 q 609 745 637 745 q 527 729 561 745 q 471 681 492 713 q 439 603 449 649 q 429 496 429 557 q 476 312 429 376 q 611 247 523 247 "},"≥":{"x_min":90,"x_max":687,"ha":777,"o":"m 687 0 l 90 0 l 90 98 l 687 98 l 687 0 m 90 145 l 90 254 l 538 496 l 90 740 l 90 850 l 687 525 l 687 468 l 90 145 "},"Ă":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 m 528 1071 q 432 1090 473 1071 q 363 1140 391 1109 q 321 1210 335 1171 q 306 1289 307 1249 l 397 1289 q 443 1216 409 1238 q 528 1194 476 1194 q 613 1216 579 1194 q 658 1289 647 1238 l 751 1289 q 735 1210 749 1249 q 693 1140 721 1171 q 624 1090 665 1109 q 528 1071 583 1071 "},"ґ":{"x_min":23.703125,"x_max":608,"ha":636,"o":"m 349 652 l 349 164 q 359 116 349 134 q 381 89 368 99 q 411 76 395 80 q 441 73 427 73 l 472 73 l 472 0 l 23 0 l 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 414 745 q 455 750 439 745 q 483 768 472 755 q 501 803 495 781 q 512 857 508 825 l 519 931 l 608 931 l 608 652 l 349 652 "},"ÿ":{"x_min":-0.265625,"x_max":804.234375,"ha":804,"o":"m 804 745 l 804 671 q 767 666 783 671 q 738 649 751 661 q 714 618 725 637 q 693 569 703 599 q 642 428 668 500 q 588 284 615 356 q 535 140 562 212 q 483 0 508 69 q 437 -118 458 -67 q 391 -206 415 -169 q 338 -268 367 -243 q 270 -307 309 -292 q 180 -327 231 -321 q 60 -334 129 -334 l 37 -334 l 37 -253 q 160 -235 109 -253 q 246 -185 211 -217 q 304 -107 281 -152 q 344 -6 327 -61 l 94 604 q 75 635 85 624 q 53 653 65 647 q 28 661 42 659 q 0 662 15 662 l 0 745 l 395 745 l 395 671 q 331 660 355 671 q 308 619 308 650 q 313 592 308 607 q 321 565 317 576 q 347 502 334 536 q 373 433 360 468 q 397 367 385 399 q 417 311 408 335 q 434 263 427 284 q 445 224 441 242 q 452 192 450 207 q 456 164 455 178 q 462 195 458 178 q 471 228 466 212 q 480 257 475 244 q 487 275 485 270 l 579 547 q 584 563 581 554 q 588 582 586 572 q 591 600 590 591 q 592 615 592 609 q 566 659 592 647 q 491 671 539 671 l 491 745 l 804 745 m 181 955 q 187 995 181 978 q 205 1022 194 1011 q 231 1036 216 1032 q 262 1041 246 1041 q 293 1036 279 1041 q 320 1022 308 1032 q 338 995 331 1011 q 346 955 346 978 q 338 915 346 931 q 320 888 331 898 q 293 873 308 878 q 262 869 279 869 q 231 873 246 869 q 205 888 216 878 q 187 915 194 898 q 181 955 181 931 m 466 955 q 472 995 466 978 q 491 1022 479 1011 q 517 1036 502 1032 q 549 1041 532 1041 q 579 1036 564 1041 q 605 1022 593 1032 q 623 995 616 1011 q 631 955 631 978 q 623 915 631 931 q 605 888 616 898 q 579 873 593 878 q 549 869 564 869 q 517 873 532 869 q 491 888 502 878 q 472 915 479 898 q 466 955 466 931 "},"Ł":{"x_min":38.453125,"x_max":863,"ha":908,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 383 l 52 318 l 52 412 l 168 479 l 168 828 q 162 875 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 432 915 445 918 q 410 903 420 912 q 395 878 401 895 q 388 833 389 861 l 388 607 l 588 724 l 588 627 l 388 510 l 388 84 l 647 84 q 723 115 696 84 q 762 205 750 146 l 785 310 l 863 310 l 852 0 l 38 0 "}," ":{"x_min":0,"x_max":0,"ha":423},"∫":{"x_min":0,"x_max":754,"ha":754,"o":"m 193 -334 q 105 -324 142 -334 q 45 -298 69 -315 q 11 -260 22 -282 q 0 -213 0 -238 q 7 -175 0 -193 q 31 -142 14 -156 q 79 -120 49 -128 q 152 -111 108 -111 q 155 -168 152 -142 q 166 -213 159 -194 q 184 -243 173 -232 q 212 -254 195 -254 q 261 -206 240 -254 q 283 -62 283 -159 q 279 41 283 -16 q 272 161 276 100 q 265 282 268 222 q 262 391 262 342 q 263 483 262 436 q 267 575 265 531 q 272 658 270 620 q 277 724 275 697 q 305 870 283 807 q 364 975 327 933 q 452 1039 401 1018 q 566 1061 502 1061 q 706 1029 659 1061 q 754 949 754 998 q 746 910 754 929 q 722 876 739 891 q 674 852 704 861 q 601 843 645 843 q 587 946 601 911 q 542 981 574 981 q 512 972 525 981 q 489 940 499 963 q 475 881 480 918 q 470 789 470 844 q 472 704 470 755 q 478 597 475 654 q 484 480 481 540 q 487 367 487 420 q 486 282 487 325 q 483 200 485 239 q 479 125 481 160 q 475 64 477 91 q 473 21 474 37 q 471 1 472 4 q 387 -247 457 -160 q 193 -334 318 -334 "},"\\":{"x_min":0,"x_max":400,"ha":400,"o":"m 0 1055 l 98 1055 l 400 -168 l 299 -168 l 0 1055 "},"Ì":{"x_min":33,"x_max":517.953125,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 m 291 1071 q 219 1118 259 1089 q 142 1175 179 1146 q 75 1233 105 1205 q 33 1278 45 1260 l 33 1293 l 250 1293 q 278 1242 261 1269 q 314 1187 295 1215 q 352 1134 332 1160 q 386 1089 371 1108 l 386 1071 l 291 1071 "},"ъ":{"x_min":28,"x_max":953,"ha":988,"o":"m 632 745 l 632 665 l 613 665 q 570 661 590 665 q 533 647 549 657 q 509 621 518 637 q 499 580 499 605 l 499 424 l 633 424 q 755 416 697 424 q 857 386 813 408 q 927 323 901 364 q 953 218 953 283 q 933 131 953 171 q 875 62 914 91 q 778 16 837 33 q 640 0 719 0 l 173 0 l 173 73 l 189 73 q 264 96 240 73 q 289 162 289 118 l 289 665 l 208 665 q 176 660 189 665 q 153 641 162 654 q 138 607 144 629 q 129 553 133 585 l 123 508 l 28 508 l 36 745 l 632 745 m 604 80 q 663 88 638 80 q 702 112 687 96 q 724 156 717 129 q 731 222 731 183 q 697 315 731 288 q 598 343 662 343 l 499 343 l 499 80 l 604 80 "},"ς":{"x_min":65,"x_max":680,"ha":704,"o":"m 65 342 q 91 539 65 459 q 162 669 117 619 q 270 740 208 718 q 405 762 333 762 q 523 750 472 762 q 609 719 575 739 q 662 673 644 700 q 680 616 680 646 q 672 572 680 593 q 644 534 664 551 q 589 508 624 518 q 500 498 554 498 q 496 566 500 534 q 481 623 491 599 q 454 662 471 648 q 410 677 437 677 q 355 664 380 677 q 314 617 331 651 q 287 523 296 583 q 277 370 277 464 q 290 289 277 321 q 329 234 303 256 q 394 197 355 212 q 485 169 433 182 q 571 139 536 156 q 629 99 607 122 q 662 47 652 77 q 673 -19 673 18 q 657 -101 673 -60 q 607 -177 641 -141 q 521 -241 573 -213 q 394 -285 468 -270 l 394 -211 q 442 -189 423 -201 q 473 -162 462 -177 q 490 -130 485 -148 q 495 -93 495 -112 q 488 -52 495 -69 q 466 -24 482 -36 q 425 -4 451 -13 q 362 13 400 4 q 219 61 276 33 q 127 130 161 90 q 79 222 93 170 q 65 342 65 275 "},"Ē":{"x_min":38.453125,"x_max":863,"ha":907,"o":"m 388 84 l 666 84 q 702 92 687 84 q 728 114 717 100 q 745 148 739 128 q 755 190 752 167 l 766 256 l 863 256 l 852 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 809 992 l 815 736 l 718 736 l 711 801 q 685 880 705 852 q 622 907 665 907 l 388 907 l 388 560 l 718 560 l 718 476 l 388 476 l 388 84 m 659 1071 l 256 1071 l 256 1180 l 659 1180 l 659 1071 "},"!":{"x_min":144.875,"x_max":386.421875,"ha":530,"o":"m 144 992 l 386 992 l 305 317 l 226 317 l 144 992 m 153 99 q 161 152 153 131 q 185 187 170 174 q 222 205 201 200 q 267 211 243 211 q 310 205 290 211 q 347 187 331 200 q 371 152 362 174 q 381 99 381 131 q 371 47 381 68 q 347 13 362 26 q 310 -5 331 0 q 267 -11 290 -11 q 222 -5 243 -11 q 185 13 201 0 q 161 47 170 26 q 153 99 153 68 "},"ç":{"x_min":65,"x_max":681,"ha":732,"o":"m 409 -14 q 269 5 332 -14 q 160 70 206 25 q 90 189 115 116 q 65 369 65 262 q 91 557 65 481 q 163 677 117 632 q 271 742 208 723 q 405 762 333 762 q 524 750 472 762 q 610 719 575 739 q 663 673 645 700 q 681 616 681 646 q 673 572 681 593 q 645 534 665 551 q 590 508 625 518 q 501 498 555 498 q 496 566 501 534 q 482 623 492 599 q 454 662 472 648 q 410 677 437 677 q 356 662 380 677 q 314 612 332 648 q 288 518 297 577 q 279 370 279 459 q 317 159 279 229 q 444 89 356 89 q 511 98 480 89 q 569 121 543 106 q 614 157 594 137 q 645 202 633 178 q 670 174 662 192 q 679 138 679 157 q 663 85 679 112 q 614 35 647 57 q 531 0 581 13 q 409 -14 480 -14 m 569 -175 q 554 -241 569 -211 q 514 -291 540 -270 q 452 -323 488 -312 q 372 -334 416 -334 q 345 -332 361 -334 q 313 -329 330 -331 q 280 -324 296 -327 q 251 -318 263 -321 l 251 -233 q 301 -241 276 -239 q 345 -244 326 -244 q 407 -230 385 -244 q 430 -180 430 -216 q 422 -147 430 -160 q 400 -126 415 -134 q 367 -115 386 -118 q 326 -110 348 -111 l 355 12 l 434 12 l 420 -47 q 481 -60 454 -50 q 528 -86 509 -70 q 558 -125 547 -102 q 569 -175 569 -148 "},"Й":{"x_min":38.453125,"x_max":1097.859375,"ha":1137,"o":"m 749 685 l 387 220 l 387 164 q 392 116 387 134 q 408 89 398 99 q 430 76 417 80 q 458 73 443 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 517 992 l 517 918 l 458 918 q 430 915 443 918 q 408 903 417 912 q 392 876 398 893 q 387 828 387 858 l 387 339 l 749 805 l 749 828 q 743 876 749 858 q 728 903 738 893 q 705 915 718 912 q 678 918 692 918 l 618 918 l 618 992 l 1097 992 l 1097 918 l 1039 918 q 1012 915 1025 918 q 989 903 999 912 q 974 876 979 893 q 969 828 969 858 l 969 156 q 974 112 969 129 q 990 87 980 96 q 1012 76 1000 79 q 1039 73 1025 73 l 1097 73 l 1097 0 l 618 0 l 618 73 l 678 73 q 705 76 692 73 q 728 89 718 80 q 743 116 738 99 q 749 164 749 134 l 749 685 m 564 1147 q 656 1181 624 1147 q 696 1288 688 1215 l 870 1288 q 852 1206 865 1245 q 806 1137 839 1167 q 716 1088 774 1106 q 564 1071 658 1071 q 413 1088 471 1071 q 322 1137 355 1106 q 276 1206 289 1167 q 259 1288 263 1245 l 432 1288 q 472 1181 440 1215 q 564 1147 505 1147 "},"Б":{"x_min":57.140625,"x_max":863,"ha":904,"o":"m 803 992 l 810 723 l 717 723 l 706 809 q 697 850 704 832 q 678 881 691 868 q 643 900 664 893 q 591 907 622 907 l 405 907 l 405 558 l 493 558 q 663 537 592 558 q 777 480 733 517 q 842 392 822 444 q 863 280 863 341 q 840 166 863 218 q 771 77 817 114 q 653 20 724 40 q 486 0 582 0 l 57 0 l 57 73 l 115 73 q 150 79 136 73 q 171 94 163 84 q 182 123 179 105 q 186 165 186 141 l 186 828 q 180 874 186 857 q 166 902 175 892 q 144 915 157 911 q 115 918 131 918 l 57 918 l 57 992 l 803 992 m 405 82 l 473 82 q 545 93 515 82 q 593 129 574 105 q 619 189 611 153 q 628 273 628 225 q 618 367 628 328 q 588 431 609 406 q 536 466 568 455 q 458 477 504 477 l 405 477 l 405 82 "},"đ":{"x_min":64,"x_max":881.71875,"ha":901,"o":"m 761 876 l 881 876 l 881 802 l 761 802 l 761 170 q 770 120 761 139 q 795 90 779 101 q 832 77 811 80 q 876 73 853 73 l 881 73 l 881 0 l 612 0 l 573 108 l 560 108 q 525 57 545 79 q 479 18 505 34 q 420 -5 453 2 q 347 -14 388 -14 q 226 7 279 -14 q 137 73 173 28 q 82 186 101 117 q 64 349 64 254 q 82 514 64 445 q 137 629 101 584 q 225 696 173 674 q 344 719 277 719 q 415 710 383 719 q 472 687 447 702 q 517 651 497 672 q 551 607 537 631 l 560 607 q 555 683 558 647 q 553 715 554 699 q 551 744 552 730 q 550 770 550 758 q 550 788 550 781 l 550 802 l 335 802 l 335 876 l 550 876 l 550 895 q 540 942 550 924 q 516 968 531 959 q 480 979 501 977 q 437 981 460 981 l 426 981 l 426 1055 l 761 1055 l 761 876 m 407 89 q 475 105 448 89 q 519 154 503 121 q 543 236 536 186 q 550 352 550 285 q 543 465 550 415 q 519 547 536 514 q 475 598 503 581 q 407 615 448 615 q 307 547 337 615 q 278 350 278 478 q 307 154 278 219 q 407 89 337 89 "},"ċ":{"x_min":65,"x_max":681,"ha":732,"o":"m 409 -14 q 269 5 332 -14 q 160 70 206 25 q 90 189 115 116 q 65 369 65 262 q 91 557 65 481 q 163 677 117 632 q 271 742 208 723 q 405 762 333 762 q 524 750 472 762 q 610 719 575 739 q 663 673 645 700 q 681 616 681 646 q 673 572 681 593 q 645 534 665 551 q 590 508 625 518 q 501 498 555 498 q 496 566 501 534 q 482 623 492 599 q 454 662 472 648 q 410 677 437 677 q 356 662 380 677 q 314 612 332 648 q 288 518 297 577 q 279 370 279 459 q 317 159 279 229 q 444 89 356 89 q 511 98 480 89 q 569 121 543 106 q 614 157 594 137 q 645 202 633 178 q 670 174 662 192 q 679 138 679 157 q 663 85 679 112 q 614 35 647 57 q 531 0 581 13 q 409 -14 480 -14 m 284 969 q 293 1014 284 995 q 318 1045 302 1033 q 355 1063 334 1057 q 402 1069 376 1069 q 447 1063 425 1069 q 485 1045 469 1057 q 511 1014 501 1033 q 521 969 521 995 q 511 924 521 943 q 485 893 501 905 q 447 875 469 881 q 402 869 425 869 q 355 875 376 869 q 318 893 334 881 q 293 924 302 905 q 284 969 284 943 "},"Ā":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 m 723 1071 l 320 1071 l 320 1180 l 723 1180 l 723 1071 "},"Ẃ":{"x_min":0.34375,"x_max":1481.578125,"ha":1482,"o":"m 838 982 l 1030 451 q 1053 385 1042 419 q 1072 321 1063 352 q 1088 265 1081 290 q 1098 221 1095 239 q 1110 276 1103 246 q 1123 340 1116 307 q 1138 409 1130 374 q 1154 478 1145 445 l 1227 778 q 1231 797 1229 786 q 1236 818 1234 808 q 1239 838 1238 829 q 1240 852 1240 847 q 1218 903 1240 888 q 1151 918 1197 918 l 1119 918 l 1119 992 l 1481 992 l 1481 918 l 1455 918 q 1419 914 1434 918 q 1391 898 1403 910 q 1369 865 1379 886 q 1350 810 1359 844 l 1134 0 l 976 0 l 743 652 l 543 0 l 371 0 l 117 844 q 102 880 110 866 q 81 903 93 895 q 54 915 69 911 q 18 918 39 918 l 0 918 l 0 992 l 464 992 l 464 918 l 432 918 q 369 902 390 918 q 348 851 348 886 q 353 817 348 840 q 363 776 357 795 l 455 455 q 471 398 463 429 q 487 336 480 367 q 501 275 495 304 q 510 223 507 246 q 530 307 519 268 q 554 387 542 346 l 737 982 l 838 982 m 684 1089 q 717 1134 698 1108 q 754 1187 735 1160 q 790 1242 773 1215 q 817 1293 806 1269 l 1036 1293 l 1036 1278 q 993 1233 1023 1260 q 926 1175 963 1205 q 850 1118 889 1146 q 778 1071 810 1089 l 684 1071 l 684 1089 "},"ø":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 259 15 330 -14 l 214 -56 l 116 -56 l 185 57 q 96 184 127 106 q 65 374 65 263 q 156 666 65 570 q 427 762 248 762 q 520 753 476 762 q 600 728 563 745 l 644 800 l 741 800 l 670 683 q 756 558 726 634 q 786 374 786 482 m 280 374 q 282 294 280 331 q 290 227 284 258 l 528 614 q 425 673 493 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 m 571 374 q 568 445 571 412 q 562 508 566 478 l 326 124 q 426 73 360 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 "},"â":{"x_min":62,"x_max":786.859375,"ha":832,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 265 487 224 l 487 369 l 424 365 q 354 352 383 363 q 309 321 326 341 q 285 273 292 301 q 277 206 277 244 m 401 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 534 749 479 762 q 625 709 588 736 q 679 636 661 681 q 698 526 698 591 l 698 172 q 702 124 698 143 q 716 94 706 105 q 742 78 725 83 q 781 73 758 73 l 786 73 l 786 0 l 528 0 l 499 95 l 487 95 q 443 46 464 67 q 400 12 423 26 q 348 -7 377 -1 q 280 -14 319 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 212 62 154 q 139 379 62 325 q 373 438 217 434 l 487 443 l 487 519 q 484 583 487 554 q 472 633 481 612 q 446 665 464 654 q 401 677 429 677 m 173 860 q 211 905 189 879 q 255 958 233 931 q 296 1013 276 986 q 326 1064 315 1040 l 513 1064 q 543 1013 524 1040 q 584 958 562 986 q 628 905 606 931 q 666 860 649 879 l 666 842 l 570 842 q 536 869 556 853 q 495 901 516 884 q 454 935 474 918 q 419 966 434 952 q 383 935 403 952 q 342 901 363 918 q 302 869 322 884 q 269 842 283 853 l 173 842 l 173 860 "},"}":{"x_min":41.375,"x_max":572.421875,"ha":614,"o":"m 41 -174 l 41 -100 l 95 -100 q 144 -91 125 -100 q 174 -65 163 -82 q 190 -22 185 -47 q 194 35 194 3 l 194 273 q 230 377 194 336 q 347 437 267 417 l 347 449 q 230 507 266 467 q 194 611 194 548 l 194 846 q 190 904 194 879 q 174 947 185 930 q 144 972 163 964 q 95 981 125 981 l 41 981 l 41 1055 l 173 1055 q 350 1002 290 1055 q 411 852 411 949 l 411 613 q 423 550 411 575 q 457 511 436 525 q 509 491 479 497 q 572 485 538 486 l 572 400 q 509 393 538 398 q 457 373 479 387 q 423 334 436 358 q 411 269 411 309 l 411 31 q 395 -53 411 -15 q 350 -118 380 -91 q 276 -159 320 -145 q 173 -174 231 -174 l 41 -174 "},"Δ":{"x_min":68,"x_max":904,"ha":973,"o":"m 904 0 l 68 0 l 68 90 l 393 992 l 591 992 l 904 99 l 904 0 m 689 109 l 510 632 q 471 751 489 694 q 441 860 453 809 q 414 759 431 810 q 376 644 398 709 l 192 109 l 689 109 "},"‰":{"x_min":47,"x_max":1773,"ha":1820,"o":"m 547 698 q 531 572 547 629 q 484 474 515 515 q 406 411 454 433 q 296 389 359 389 q 183 411 230 389 q 105 474 135 433 q 61 572 75 515 q 47 698 47 629 q 61 825 47 768 q 106 922 75 881 q 184 984 136 962 q 298 1006 231 1006 q 407 984 360 1006 q 485 922 454 962 q 531 825 516 881 q 547 698 547 768 m 203 698 q 208 597 203 641 q 224 522 213 553 q 253 475 235 491 q 296 458 271 458 q 340 475 323 458 q 368 522 357 491 q 383 597 379 553 q 388 698 388 641 q 383 798 388 754 q 368 872 379 841 q 341 918 358 902 q 298 934 323 934 q 254 918 272 934 q 225 872 236 902 q 208 798 213 841 q 203 698 203 754 m 440 0 l 332 0 l 813 992 l 920 992 l 440 0 m 1211 295 q 1195 168 1211 225 q 1148 70 1179 111 q 1070 8 1118 30 q 960 -14 1023 -14 q 847 8 894 -14 q 769 70 799 30 q 725 168 739 111 q 711 295 711 225 q 725 422 711 365 q 770 519 739 478 q 848 581 800 559 q 962 603 895 603 q 1071 581 1024 603 q 1149 519 1118 559 q 1195 422 1180 478 q 1211 295 1211 365 m 867 295 q 872 194 867 238 q 888 118 877 149 q 917 71 899 87 q 960 55 935 55 q 1004 71 987 55 q 1032 118 1021 87 q 1047 194 1043 149 q 1052 295 1052 238 q 1047 394 1052 351 q 1032 469 1043 438 q 1005 515 1022 499 q 962 531 987 531 q 918 515 936 531 q 889 469 900 499 q 872 394 877 438 q 867 295 867 351 m 1773 295 q 1757 168 1773 225 q 1710 70 1741 111 q 1633 8 1680 30 q 1523 -14 1586 -14 q 1410 8 1457 -14 q 1332 70 1362 30 q 1287 168 1301 111 q 1273 295 1273 225 q 1287 422 1273 365 q 1332 519 1301 478 q 1410 581 1362 559 q 1524 603 1458 603 q 1633 581 1587 603 q 1711 519 1680 559 q 1757 422 1742 478 q 1773 295 1773 365 m 1429 295 q 1434 194 1429 238 q 1451 118 1439 149 q 1479 71 1462 87 q 1523 55 1497 55 q 1566 71 1549 55 q 1595 118 1584 87 q 1610 194 1606 149 q 1614 295 1614 238 q 1610 394 1614 351 q 1595 469 1606 438 q 1567 515 1584 499 q 1524 531 1550 531 q 1480 515 1498 531 q 1451 469 1462 499 q 1434 394 1439 438 q 1429 295 1429 351 "},"Ä":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 m 297 1184 q 303 1224 297 1207 q 321 1251 310 1240 q 347 1265 332 1261 q 378 1270 362 1270 q 409 1265 395 1270 q 436 1251 424 1261 q 454 1224 447 1240 q 462 1184 462 1207 q 454 1144 462 1160 q 436 1117 447 1127 q 409 1102 424 1107 q 378 1098 395 1098 q 347 1102 362 1098 q 321 1117 332 1107 q 303 1144 310 1127 q 297 1184 297 1160 m 582 1184 q 588 1224 582 1207 q 607 1251 595 1240 q 633 1265 618 1261 q 665 1270 648 1270 q 695 1265 680 1270 q 721 1251 709 1261 q 739 1224 732 1240 q 747 1184 747 1207 q 739 1144 747 1160 q 721 1117 732 1127 q 695 1102 709 1107 q 665 1098 680 1098 q 633 1102 648 1098 q 607 1117 618 1107 q 588 1144 595 1127 q 582 1184 582 1160 "},"ř":{"x_min":27.78125,"x_max":705,"ha":726,"o":"m 491 0 l 27 0 l 27 73 l 31 73 q 75 77 55 73 q 109 91 94 80 q 131 121 123 101 q 139 173 139 141 l 139 576 q 131 625 139 607 q 111 654 124 644 q 80 668 98 664 q 38 671 61 671 l 34 671 l 34 745 l 315 745 l 343 636 l 349 636 q 379 690 363 667 q 418 729 396 714 q 472 753 441 745 q 545 761 503 761 q 666 732 627 761 q 705 648 705 703 q 658 549 705 584 q 528 514 612 514 q 525 564 528 542 q 514 600 522 586 q 493 621 507 614 q 460 629 480 629 q 418 617 436 629 q 389 585 401 605 q 369 541 377 566 q 357 492 361 517 q 351 445 352 468 q 349 406 349 423 l 349 166 q 357 117 349 136 q 377 89 364 99 q 408 76 390 80 q 446 73 426 73 l 491 73 l 491 0 m 124 1064 l 220 1064 q 253 1036 234 1052 q 293 1004 273 1021 q 334 970 314 986 q 370 938 354 953 q 405 970 385 953 q 446 1004 425 986 q 487 1036 467 1021 q 521 1064 507 1052 l 617 1064 l 617 1045 q 579 1000 600 1026 q 535 947 557 974 q 494 892 513 919 q 464 842 475 865 l 277 842 q 247 892 266 865 q 206 947 227 919 q 162 1000 184 974 q 124 1045 140 1026 l 124 1064 "},"—":{"x_min":-7,"x_max":1396,"ha":1389,"o":"m 1396 323 l -7 323 l -7 423 l 1396 423 l 1396 323 "},"N":{"x_min":38.453125,"x_max":1070.859375,"ha":1095,"o":"m 813 0 l 271 765 l 271 164 q 277 116 271 134 q 292 89 283 99 q 315 76 302 80 q 342 73 328 73 l 401 73 l 401 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 347 992 l 837 298 l 837 833 q 831 878 837 861 q 816 903 826 895 q 793 915 806 912 q 766 918 780 918 l 708 918 l 708 992 l 1070 992 l 1070 918 l 1012 918 q 985 915 998 918 q 962 903 972 912 q 947 876 952 893 q 942 828 942 858 l 942 0 l 813 0 "},"⁄":{"x_min":-258,"x_max":345,"ha":86,"o":"m -149 0 l -258 0 l 237 992 l 345 992 l -149 0 "},"2":{"x_min":49,"x_max":713,"ha":777,"o":"m 678 775 q 670 712 678 742 q 647 649 663 681 q 603 580 630 616 q 536 500 576 544 q 442 403 496 456 q 319 284 389 350 l 180 152 l 504 152 q 577 177 546 152 q 619 248 607 202 l 630 291 l 713 291 l 705 0 l 49 0 l 49 143 l 254 352 q 360 471 319 418 q 425 572 401 524 q 458 667 449 620 q 468 768 468 715 q 439 884 468 847 q 359 921 410 921 q 260 860 289 921 q 232 681 232 799 q 159 688 192 681 q 103 712 127 696 q 67 754 80 728 q 54 818 54 780 q 73 890 54 856 q 131 949 93 923 q 226 990 169 975 q 359 1006 283 1006 q 497 990 437 1006 q 596 944 556 974 q 657 871 637 914 q 678 775 678 828 "},"М":{"x_min":38.453125,"x_max":1283.875,"ha":1323,"o":"m 839 0 l 839 73 l 853 73 q 891 76 874 73 q 918 87 908 79 q 935 110 929 95 q 940 151 940 126 l 940 855 l 660 0 l 565 0 l 271 855 l 271 164 q 278 116 271 134 q 299 89 286 99 q 331 76 312 80 q 374 73 350 73 l 383 73 l 383 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 438 992 l 669 320 l 891 992 l 1283 992 l 1283 918 l 1225 918 q 1197 915 1210 918 q 1175 903 1184 912 q 1160 876 1165 893 q 1155 828 1155 858 l 1155 164 q 1160 116 1155 134 q 1175 89 1165 99 q 1197 76 1184 80 q 1225 73 1210 73 l 1283 73 l 1283 0 l 839 0 "},"Ó":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 340 22 428 -14 q 193 126 251 59 q 106 288 135 193 q 77 498 77 382 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 748 970 661 1007 q 894 867 835 934 q 985 706 954 800 q 1016 496 1016 612 m 310 496 q 323 319 310 397 q 364 187 336 241 q 437 104 392 133 q 547 76 482 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 q 770 674 782 596 q 729 806 757 752 q 657 888 702 860 q 548 916 612 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 m 452 1089 q 485 1134 466 1108 q 522 1187 503 1160 q 558 1242 541 1215 q 585 1293 574 1269 l 804 1293 l 804 1278 q 761 1233 791 1260 q 694 1175 731 1205 q 618 1118 657 1146 q 546 1071 578 1089 l 452 1071 l 452 1089 "},"˜":{"x_min":125,"x_max":675,"ha":802,"o":"m 516 974 q 543 980 531 974 q 564 996 555 986 q 577 1020 572 1006 q 584 1047 582 1033 l 675 1047 q 659 968 672 1005 q 623 902 645 930 q 569 858 600 874 q 501 842 538 842 q 433 855 464 842 q 377 885 403 869 q 328 916 351 902 q 283 929 306 929 q 256 923 268 929 q 235 907 244 917 q 222 883 227 897 q 215 856 217 870 l 125 856 q 140 935 127 898 q 177 1001 154 973 q 231 1045 200 1029 q 299 1062 262 1062 q 367 1048 337 1062 q 423 1018 397 1034 q 472 987 449 1001 q 516 974 495 974 "}," ":{"x_min":0,"x_max":0,"ha":695},"ˇ":{"x_min":154,"x_max":647,"ha":802,"o":"m 154 1064 l 250 1064 q 283 1036 264 1052 q 323 1004 303 1021 q 364 970 344 986 q 400 938 384 953 q 435 970 415 953 q 476 1004 455 986 q 517 1036 497 1021 q 551 1064 537 1052 l 647 1064 l 647 1045 q 609 1000 630 1026 q 565 947 587 974 q 524 892 543 919 q 494 842 505 865 l 307 842 q 277 892 296 865 q 236 947 257 919 q 192 1000 214 974 q 154 1045 170 1026 l 154 1064 "},"ų":{"x_min":36.34375,"x_max":891.4375,"ha":926,"o":"m 614 0 l 584 97 l 577 97 q 532 39 556 61 q 479 6 507 17 q 421 -9 452 -5 q 358 -14 390 -14 q 191 53 249 -14 q 134 260 134 120 l 134 572 q 128 622 134 603 q 111 652 123 641 q 82 667 100 662 q 39 671 64 671 l 36 671 l 36 745 l 344 745 l 344 299 q 349 218 344 254 q 367 157 355 182 q 399 117 379 131 q 450 104 419 104 q 507 118 483 104 q 546 160 531 133 q 568 227 561 188 q 576 315 576 266 l 576 582 q 567 630 576 612 q 546 657 559 647 q 514 668 532 666 q 475 671 496 671 l 471 671 l 471 745 l 787 745 l 787 161 q 794 113 787 130 q 813 87 801 96 q 842 76 825 78 q 879 73 859 73 l 891 73 l 891 0 l 614 0 m 451 -180 q 464 -118 451 -147 q 501 -65 478 -89 q 553 -24 524 -41 q 615 0 583 -7 l 722 0 q 677 -20 700 -6 q 635 -53 654 -33 q 604 -100 617 -74 q 592 -160 592 -127 q 599 -193 592 -179 q 619 -215 606 -207 q 650 -229 632 -224 q 688 -233 667 -233 q 728 -230 707 -233 q 776 -222 750 -228 l 776 -311 q 749 -321 765 -317 q 716 -327 733 -325 q 684 -332 700 -330 q 657 -334 668 -334 q 503 -297 556 -334 q 451 -180 451 -260 "},"Ў":{"x_min":0,"x_max":964,"ha":964,"o":"m 964 918 l 937 918 q 903 914 917 918 q 877 897 889 909 q 855 863 866 884 q 832 810 845 842 l 629 287 q 585 184 606 228 q 542 107 565 139 q 491 54 518 75 q 428 21 464 33 q 347 4 393 9 q 241 0 301 0 l 155 0 l 155 80 l 216 80 q 287 87 251 80 q 354 106 322 93 q 409 138 385 119 q 444 183 432 157 l 116 844 q 97 879 106 865 q 77 902 88 893 q 52 914 66 910 q 18 918 38 918 l 0 918 l 0 992 l 476 992 l 476 918 l 426 918 q 370 905 390 918 q 351 861 351 892 q 357 823 351 842 q 375 782 364 804 l 480 558 q 505 506 492 533 q 528 452 517 479 q 548 398 540 424 q 562 348 557 371 q 581 407 571 377 q 607 476 592 437 l 708 754 q 727 813 721 788 q 734 850 734 838 q 712 902 734 886 q 643 918 689 918 l 614 918 l 614 992 l 964 992 l 964 918 m 497 1147 q 589 1181 557 1147 q 629 1288 621 1215 l 803 1288 q 785 1206 798 1245 q 739 1137 772 1167 q 649 1088 707 1106 q 497 1071 591 1071 q 346 1088 404 1071 q 255 1137 288 1106 q 209 1206 222 1167 q 192 1288 196 1245 l 365 1288 q 405 1181 373 1215 q 497 1147 438 1147 "},"Ŭ":{"x_min":22.78125,"x_max":1015.21875,"ha":1038,"o":"m 1015 918 l 955 918 q 928 915 941 918 q 905 903 915 912 q 890 875 895 893 q 885 828 885 858 l 885 286 q 865 160 885 216 q 802 66 845 104 q 694 6 760 27 q 537 -14 628 -14 q 375 3 447 -14 q 254 58 304 20 q 179 156 205 96 q 153 302 153 216 l 153 833 q 147 878 153 861 q 131 903 141 894 q 109 915 121 912 q 82 918 96 918 l 22 918 l 22 992 l 501 992 l 501 918 l 443 918 q 416 915 429 918 q 393 903 403 912 q 378 875 383 893 q 372 828 372 858 l 372 291 q 387 193 372 233 q 428 129 401 153 q 494 94 456 105 q 579 84 531 84 q 662 96 625 84 q 726 133 699 108 q 766 197 752 158 q 780 288 780 235 l 780 833 q 775 878 780 861 q 759 903 769 894 q 737 915 750 912 q 710 918 724 918 l 651 918 l 651 992 l 1015 992 l 1015 918 m 547 1071 q 451 1090 492 1071 q 382 1140 410 1109 q 340 1210 354 1171 q 325 1289 326 1249 l 416 1289 q 462 1216 428 1238 q 547 1194 495 1194 q 632 1216 598 1194 q 677 1289 666 1238 l 770 1289 q 754 1210 768 1249 q 712 1140 740 1171 q 643 1090 684 1109 q 547 1071 602 1071 "},"ĝ":{"x_min":3,"x_max":772,"ha":778,"o":"m 772 717 q 767 687 772 702 q 751 662 762 672 q 720 644 740 651 q 672 638 701 638 q 668 663 672 652 q 656 681 664 674 q 639 693 649 689 q 619 696 630 696 q 594 692 608 696 q 574 681 581 687 q 600 646 588 666 q 622 603 612 626 q 636 555 631 580 q 642 504 642 530 q 625 408 642 452 q 574 331 608 363 q 486 280 539 298 q 361 262 433 262 q 342 262 353 262 q 319 263 330 262 q 297 264 307 263 q 281 266 286 265 q 263 254 272 261 q 246 238 253 247 q 235 218 239 229 q 230 195 230 207 q 248 161 230 172 q 295 151 266 151 l 464 151 q 583 136 533 151 q 666 94 633 121 q 715 27 699 67 q 731 -61 731 -11 q 706 -176 731 -125 q 632 -261 682 -226 q 506 -315 582 -296 q 327 -334 431 -334 q 83 -284 163 -334 q 3 -140 3 -235 q 51 -26 3 -66 q 190 20 99 13 q 153 39 171 28 q 120 65 135 49 q 97 100 106 80 q 89 144 89 119 q 98 186 89 167 q 123 224 107 206 q 162 258 139 242 q 212 289 185 274 q 156 320 182 300 q 111 366 130 339 q 81 428 92 393 q 71 504 71 462 q 141 694 71 627 q 361 762 212 762 q 453 749 410 762 q 526 719 495 736 q 552 745 538 731 q 583 770 566 759 q 623 789 601 782 q 671 797 644 797 q 715 790 696 797 q 746 773 733 784 q 765 748 759 762 q 772 717 772 733 m 167 -137 q 208 -223 167 -195 q 330 -250 250 -250 q 508 -215 452 -250 q 564 -111 564 -180 q 536 -49 564 -67 q 452 -32 508 -32 l 290 -32 q 247 -35 269 -32 q 208 -51 226 -39 q 178 -83 190 -62 q 167 -137 167 -104 m 260 504 q 265 438 260 468 q 281 388 270 409 q 311 355 293 367 q 357 344 330 344 q 403 355 384 344 q 432 387 421 366 q 447 439 443 409 q 452 506 452 469 q 447 577 452 545 q 431 631 442 608 q 401 666 420 653 q 355 678 383 678 q 310 665 328 678 q 280 629 292 652 q 264 574 269 606 q 260 504 260 542 m 115 860 q 153 905 131 879 q 197 958 175 931 q 238 1013 218 986 q 268 1064 257 1040 l 455 1064 q 485 1013 466 1040 q 526 958 504 986 q 570 905 548 931 q 608 860 591 879 l 608 842 l 512 842 q 478 869 498 853 q 437 901 458 884 q 396 935 416 918 q 361 966 376 952 q 325 935 345 952 q 284 901 305 918 q 244 869 264 884 q 211 842 225 853 l 115 842 l 115 860 "},"Ω":{"x_min":61,"x_max":1061,"ha":1122,"o":"m 89 625 q 118 782 89 712 q 206 902 147 852 q 354 979 265 952 q 563 1007 443 1007 q 763 979 676 1007 q 911 902 851 952 q 1002 782 971 852 q 1033 625 1033 712 q 947 386 1033 478 q 693 265 861 295 l 690 148 l 829 148 q 890 153 865 148 q 931 168 915 158 q 958 195 948 179 q 973 234 968 211 l 984 280 l 1061 280 l 1050 0 l 603 0 l 612 335 q 696 363 661 341 q 752 423 730 386 q 782 510 773 460 q 792 625 792 561 q 780 748 792 694 q 740 840 767 802 q 669 897 713 877 q 562 916 625 916 q 453 897 498 916 q 381 840 408 877 q 340 748 353 802 q 327 625 327 694 q 337 510 327 561 q 368 423 347 460 q 424 363 390 386 q 508 335 459 341 l 518 0 l 70 0 l 61 278 l 137 278 l 148 231 q 162 192 153 208 q 188 165 172 176 q 230 150 205 155 q 291 145 255 145 l 431 145 l 427 267 q 174 388 259 296 q 89 625 89 479 "},"s":{"x_min":41.765625,"x_max":623,"ha":678,"o":"m 321 -14 q 192 -1 245 -14 q 105 32 139 10 q 57 83 72 53 q 41 148 41 113 q 54 202 41 182 q 88 234 68 223 q 130 250 108 246 q 171 253 153 253 q 182 175 171 210 q 212 117 193 141 q 259 80 232 93 q 321 67 287 67 q 383 74 357 67 q 425 95 409 82 q 450 126 442 108 q 458 162 458 143 q 450 203 458 185 q 422 237 441 221 q 369 268 402 253 q 287 300 336 283 q 188 342 231 320 q 116 392 145 364 q 71 457 86 421 q 56 540 56 493 q 77 637 56 596 q 138 706 98 678 q 232 747 177 733 q 354 761 287 761 q 466 749 420 761 q 541 720 512 738 q 584 678 570 702 q 597 632 597 655 q 565 560 597 585 q 456 536 532 536 q 425 644 456 605 q 334 682 394 682 q 291 676 311 682 q 255 660 270 671 q 230 633 239 649 q 221 596 221 617 q 229 556 221 573 q 259 522 238 538 q 317 490 281 506 q 411 454 354 473 q 496 417 457 437 q 563 369 535 396 q 607 308 591 342 q 623 230 623 274 q 602 127 623 172 q 544 50 582 81 q 449 2 505 19 q 321 -14 393 -14 "},"?":{"x_min":52,"x_max":688,"ha":764,"o":"m 688 750 q 670 650 688 694 q 618 569 653 606 q 532 502 584 533 q 411 443 480 471 l 383 317 l 298 317 l 271 487 q 368 543 330 511 q 428 613 406 576 q 458 690 450 649 q 466 772 466 731 q 460 833 466 805 q 441 880 454 860 q 407 911 428 900 q 358 922 386 922 q 306 908 327 922 q 272 870 285 894 q 253 814 259 846 q 248 747 248 782 q 169 753 205 747 q 107 771 133 759 q 66 801 81 783 q 52 844 52 820 q 69 908 52 878 q 123 959 87 937 q 215 993 159 980 q 347 1006 271 1006 q 483 988 420 1006 q 591 938 545 971 q 662 858 636 905 q 688 750 688 810 m 226 99 q 234 152 226 131 q 258 187 243 174 q 295 205 274 200 q 340 211 316 211 q 383 205 363 211 q 420 187 404 200 q 444 152 435 174 q 454 99 454 131 q 444 47 454 68 q 420 13 435 26 q 383 -5 404 0 q 340 -11 363 -11 q 295 -5 316 -11 q 258 13 274 0 q 234 47 243 26 q 226 99 226 68 "},"Ņ":{"x_min":38.453125,"x_max":1070.859375,"ha":1095,"o":"m 813 0 l 271 765 l 271 164 q 277 116 271 134 q 292 89 283 99 q 315 76 302 80 q 342 73 328 73 l 401 73 l 401 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 347 992 l 837 298 l 837 833 q 831 878 837 861 q 816 903 826 895 q 793 915 806 912 q 766 918 780 918 l 708 918 l 708 992 l 1070 992 l 1070 918 l 1012 918 q 985 915 998 918 q 962 903 972 912 q 947 876 952 893 q 942 828 942 858 l 942 0 l 813 0 m 439 -289 q 453 -242 445 -268 q 469 -189 461 -216 q 483 -134 476 -161 q 493 -85 489 -108 l 655 -85 l 655 -98 q 630 -147 645 -120 q 596 -202 614 -174 q 559 -257 578 -230 q 522 -307 540 -285 l 439 -307 l 439 -289 "},"Ī":{"x_min":38.453125,"x_max":517.953125,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 m 479 1071 l 76 1071 l 76 1180 l 479 1180 l 479 1071 "},"Μ":{"x_min":38.453125,"x_max":1283.875,"ha":1323,"o":"m 839 0 l 839 73 l 853 73 q 891 76 874 73 q 918 87 908 79 q 935 110 929 95 q 940 151 940 126 l 940 855 l 660 0 l 565 0 l 271 855 l 271 164 q 278 116 271 134 q 299 89 286 99 q 331 76 312 80 q 374 73 350 73 l 383 73 l 383 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 147 903 157 895 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 438 992 l 669 320 l 891 992 l 1283 992 l 1283 918 l 1225 918 q 1197 915 1210 918 q 1175 903 1184 912 q 1160 876 1165 893 q 1155 828 1155 858 l 1155 164 q 1160 116 1155 134 q 1175 89 1165 99 q 1197 76 1184 80 q 1225 73 1210 73 l 1283 73 l 1283 0 l 839 0 "},"•":{"x_min":78,"x_max":478,"ha":555,"o":"m 78 494 q 92 598 78 556 q 134 666 107 641 q 198 703 161 692 q 278 714 234 714 q 355 703 318 714 q 419 666 391 692 q 462 598 446 641 q 478 494 478 556 q 462 390 478 432 q 419 322 446 348 q 355 285 391 296 q 278 275 318 275 q 198 285 234 275 q 134 322 161 296 q 92 390 107 348 q 78 494 78 432 "},"н":{"x_min":23.703125,"x_max":936.296875,"ha":960,"o":"m 821 164 q 830 116 821 134 q 855 89 840 99 q 887 76 869 80 q 920 73 905 73 l 936 73 l 936 0 l 515 0 l 515 73 l 518 73 q 548 76 532 73 q 578 89 564 80 q 600 116 591 99 q 610 164 610 134 l 610 343 l 349 343 l 349 164 q 359 116 349 134 q 381 89 368 99 q 411 76 395 80 q 441 73 427 73 l 444 73 l 444 0 l 23 0 l 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 444 745 l 444 671 l 441 671 q 411 668 427 671 q 381 655 395 664 q 359 628 368 646 q 349 580 349 610 l 349 423 l 610 423 l 610 580 q 600 628 610 610 q 578 655 591 646 q 548 668 564 664 q 518 671 532 671 l 515 671 l 515 745 l 936 745 l 936 671 l 920 671 q 887 668 905 671 q 855 655 869 664 q 830 628 840 645 q 821 580 821 610 l 821 164 "},"(":{"x_min":79,"x_max":511,"ha":555,"o":"m 302 441 q 310 279 302 358 q 342 128 319 199 q 405 -1 365 57 q 511 -104 446 -61 l 511 -193 q 312 -83 395 -146 q 179 58 230 -20 q 103 233 127 137 q 79 441 79 329 q 103 648 79 553 q 179 822 127 743 q 312 963 230 901 q 511 1072 395 1025 l 511 984 q 405 882 446 941 q 342 752 365 823 q 310 603 319 682 q 302 441 302 524 "},"◊":{"x_min":37,"x_max":724,"ha":761,"o":"m 412 0 l 348 0 l 37 494 l 348 992 l 412 992 l 724 496 l 412 0 m 381 864 l 155 496 l 381 122 l 606 496 l 381 864 "},"α":{"x_min":65,"x_max":887.46875,"ha":901,"o":"m 770 0 q 683 9 719 0 q 623 35 647 19 q 586 69 599 50 q 568 108 573 89 l 559 108 q 523 59 543 81 q 478 20 504 36 q 420 -4 452 4 q 347 -14 387 -14 q 226 8 279 -14 q 137 78 173 31 q 83 198 102 125 q 65 370 65 270 q 87 544 65 471 q 149 665 109 617 q 246 735 189 712 q 372 758 302 758 q 446 747 413 758 q 505 717 479 736 q 550 673 531 698 q 582 620 569 648 l 595 620 q 622 682 607 652 q 665 745 637 712 l 798 745 q 785 692 792 725 q 773 621 778 660 q 765 542 768 583 q 762 464 762 501 l 762 194 q 791 103 762 133 q 875 73 821 73 l 887 73 l 887 0 l 770 0 m 408 89 q 476 115 449 89 q 520 187 504 142 q 544 294 537 232 q 551 427 551 356 l 551 479 q 530 560 543 526 q 500 616 517 594 q 462 648 483 637 q 418 658 441 658 q 312 586 345 658 q 279 370 279 513 q 308 159 279 228 q 408 89 338 89 "},"Ħ":{"x_min":24.890625,"x_max":1111.421875,"ha":1137,"o":"m 618 0 l 618 73 l 678 73 q 705 76 692 73 q 728 89 718 80 q 743 116 738 99 q 749 164 749 134 l 749 475 l 387 475 l 387 164 q 392 116 387 134 q 408 89 398 99 q 430 76 417 80 q 458 73 443 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 693 l 24 693 l 24 767 l 168 767 l 168 834 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 517 992 l 517 918 l 458 918 q 430 915 443 918 q 408 903 417 912 q 392 876 398 893 q 387 828 387 858 l 387 767 l 749 767 l 749 828 q 743 876 749 858 q 728 903 738 893 q 705 915 718 912 q 678 918 692 918 l 618 918 l 618 992 l 1097 992 l 1097 918 l 1039 918 q 1012 915 1025 918 q 989 903 999 912 q 974 876 979 893 q 969 828 969 858 l 969 767 l 1111 767 l 1111 693 l 969 693 l 969 156 q 974 112 969 129 q 990 87 980 96 q 1012 76 1000 79 q 1039 73 1025 73 l 1097 73 l 1097 0 l 618 0 m 749 560 l 749 693 l 387 693 l 387 560 l 749 560 "},"м":{"x_min":23.703125,"x_max":1175.25,"ha":1198,"o":"m 23 0 l 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 387 745 l 592 279 l 802 745 l 1175 745 l 1175 671 l 1156 671 q 1113 668 1133 671 q 1076 655 1092 664 q 1052 627 1061 645 q 1043 578 1043 608 l 1043 166 q 1052 117 1043 136 q 1076 89 1061 99 q 1113 76 1092 80 q 1156 73 1133 73 l 1175 73 l 1175 0 l 724 0 l 724 73 l 728 73 q 772 76 752 73 q 809 89 793 80 q 833 117 824 99 q 842 166 842 136 l 842 595 l 833 595 l 563 0 l 499 0 l 237 595 l 227 595 l 227 166 q 237 117 227 136 q 261 89 246 99 q 298 76 277 80 q 341 73 318 73 l 345 73 l 345 0 l 23 0 "},"з":{"x_min":47,"x_max":679,"ha":735,"o":"m 336 63 q 394 74 370 63 q 434 104 419 85 q 457 150 450 124 q 465 206 465 176 q 426 308 465 274 q 304 343 387 343 l 210 343 l 210 432 l 305 432 q 370 442 344 432 q 412 471 396 453 q 435 513 428 489 q 441 563 441 537 q 436 610 441 588 q 420 648 431 632 q 390 673 408 664 q 345 682 372 682 q 292 668 313 682 q 257 631 270 654 q 238 578 244 608 q 232 518 232 549 q 161 525 190 518 q 116 545 133 532 q 92 576 99 558 q 85 617 85 594 q 98 667 85 642 q 143 713 112 693 q 225 747 173 734 q 352 761 276 761 q 480 749 424 761 q 575 713 537 737 q 634 656 614 690 q 654 577 654 622 q 643 515 654 544 q 611 461 632 485 q 560 420 590 438 q 494 393 531 402 l 494 386 q 631 328 583 369 q 679 212 679 287 q 656 119 679 160 q 591 49 634 78 q 484 3 548 19 q 336 -12 420 -12 q 199 0 254 -12 q 110 34 144 13 q 61 84 76 56 q 47 146 47 113 q 79 225 47 196 q 184 253 111 253 q 194 178 184 213 q 223 118 204 143 q 271 78 243 93 q 336 63 300 63 "},"Ґ":{"x_min":38.453125,"x_max":733,"ha":761,"o":"m 724 907 l 388 907 l 388 158 q 394 114 388 130 q 409 88 399 97 q 432 76 418 79 q 459 73 445 73 l 545 73 l 545 0 l 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 503 992 q 566 1000 541 992 q 605 1025 590 1009 q 626 1065 620 1042 q 636 1117 633 1089 l 641 1180 l 733 1180 l 724 907 "},"Û":{"x_min":22.78125,"x_max":1015.21875,"ha":1038,"o":"m 1015 918 l 955 918 q 928 915 941 918 q 905 903 915 912 q 890 875 895 893 q 885 828 885 858 l 885 286 q 865 160 885 216 q 802 66 845 104 q 694 6 760 27 q 537 -14 628 -14 q 375 3 447 -14 q 254 58 304 20 q 179 156 205 96 q 153 302 153 216 l 153 833 q 147 878 153 861 q 131 903 141 894 q 109 915 121 912 q 82 918 96 918 l 22 918 l 22 992 l 501 992 l 501 918 l 443 918 q 416 915 429 918 q 393 903 403 912 q 378 875 383 893 q 372 828 372 858 l 372 291 q 387 193 372 233 q 428 129 401 153 q 494 94 456 105 q 579 84 531 84 q 662 96 625 84 q 726 133 699 108 q 766 197 752 158 q 780 288 780 235 l 780 833 q 775 878 780 861 q 759 903 769 894 q 737 915 750 912 q 710 918 724 918 l 651 918 l 651 992 l 1015 992 l 1015 918 m 308 1089 q 346 1134 324 1108 q 390 1187 368 1160 q 431 1242 411 1215 q 461 1293 450 1269 l 648 1293 q 678 1242 659 1269 q 719 1187 697 1215 q 763 1134 741 1160 q 801 1089 784 1108 l 801 1071 l 705 1071 q 671 1098 691 1082 q 630 1130 651 1113 q 589 1164 609 1147 q 554 1195 569 1181 q 518 1164 538 1181 q 477 1130 498 1147 q 437 1098 457 1113 q 404 1071 418 1082 l 308 1071 l 308 1089 "},"і":{"x_min":23.703125,"x_max":465.234375,"ha":489,"o":"m 119 970 q 128 1015 119 996 q 153 1046 137 1034 q 190 1064 169 1058 q 237 1070 212 1070 q 282 1064 261 1070 q 320 1046 304 1058 q 346 1015 337 1034 q 356 970 356 996 q 346 925 356 944 q 320 894 337 906 q 282 876 304 882 q 237 870 261 870 q 190 876 212 870 q 153 894 169 882 q 128 925 137 906 q 119 970 119 944 m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 "},"V":{"x_min":-0.015625,"x_max":969.609375,"ha":970,"o":"m 969 918 l 902 918 q 885 914 892 918 q 870 899 878 910 q 854 868 863 888 q 836 816 846 848 l 552 0 l 413 0 l 118 851 q 100 884 111 871 q 78 905 90 897 q 54 915 66 912 q 31 918 42 918 l 0 918 l 0 992 l 458 992 l 458 918 l 394 918 q 375 916 384 918 q 357 908 365 914 q 345 894 349 903 q 340 872 340 885 q 344 841 340 859 q 352 812 348 824 l 494 384 q 505 348 499 369 q 516 303 511 326 q 526 258 522 280 q 532 216 530 235 q 540 247 534 227 q 551 291 545 267 q 565 338 558 314 q 579 380 572 361 l 722 803 q 727 820 724 810 q 733 838 730 829 q 737 857 735 848 q 739 871 739 865 q 723 906 739 894 q 683 918 708 918 l 610 918 l 610 992 l 969 992 l 969 918 "},"Ŗ":{"x_min":38.453125,"x_max":987.734375,"ha":982,"o":"m 38 73 l 96 73 q 123 76 111 73 q 146 87 136 79 q 162 112 156 96 q 168 156 168 129 l 168 833 q 162 878 168 861 q 146 903 156 895 q 123 915 136 912 q 96 918 111 918 l 38 918 l 38 992 l 486 992 q 775 926 683 992 q 867 735 867 860 q 850 637 867 680 q 807 562 834 594 q 746 508 780 530 q 677 472 712 486 l 843 187 q 877 136 860 157 q 910 100 894 114 q 945 80 927 86 q 982 73 962 73 l 987 73 l 987 0 l 942 0 q 833 4 879 0 q 751 23 786 9 q 691 61 716 37 q 644 124 666 86 l 479 431 l 387 431 l 387 156 q 392 112 387 129 q 408 87 398 96 q 431 76 418 79 q 458 73 444 73 l 517 73 l 517 0 l 38 0 l 38 73 m 387 512 l 465 512 q 545 524 513 512 q 597 563 577 537 q 625 626 616 588 q 633 716 633 665 q 624 805 633 768 q 594 865 614 842 q 541 899 573 888 q 462 909 508 909 l 387 909 l 387 512 m 373 -289 q 387 -242 379 -268 q 403 -189 395 -216 q 417 -134 410 -161 q 427 -85 423 -108 l 589 -85 l 589 -98 q 564 -147 579 -120 q 530 -202 548 -174 q 493 -257 512 -230 q 456 -307 474 -285 l 373 -307 l 373 -289 "},"@":{"x_min":71,"x_max":1225,"ha":1279,"o":"m 1225 545 q 1199 360 1225 441 q 1134 222 1174 278 q 1042 137 1093 166 q 938 108 990 108 q 834 138 877 108 q 768 238 791 168 l 759 238 q 727 187 745 211 q 685 145 708 163 q 633 118 662 128 q 568 108 605 108 q 485 122 525 108 q 415 165 445 136 q 367 239 385 194 q 350 345 350 284 q 358 425 350 382 q 386 512 367 469 q 435 595 406 555 q 507 666 465 636 q 602 716 548 697 q 723 735 656 735 q 806 722 771 735 q 862 693 841 710 l 921 722 l 954 722 l 896 375 q 893 354 894 367 q 889 328 891 341 q 887 302 888 314 q 886 281 886 289 q 892 234 886 253 q 908 205 898 216 q 929 191 917 195 q 953 188 941 188 q 1008 211 980 188 q 1060 278 1037 234 q 1097 388 1083 322 q 1112 539 1112 454 q 1083 706 1112 634 q 1003 825 1054 777 q 881 897 952 873 q 726 921 810 921 q 596 903 660 921 q 474 849 532 884 q 368 763 416 814 q 283 646 319 711 q 227 501 247 580 q 207 330 207 422 q 243 121 207 207 q 343 -20 280 34 q 489 -100 405 -75 q 666 -125 573 -125 q 776 -115 723 -125 q 878 -89 830 -105 q 967 -51 926 -72 q 1041 -9 1009 -30 l 1075 -61 q 991 -114 1038 -89 q 890 -156 945 -138 q 775 -186 836 -175 q 647 -197 713 -197 q 494 -182 567 -197 q 357 -137 421 -167 q 240 -63 293 -108 q 149 40 187 -19 q 91 174 112 100 q 71 339 71 249 q 93 517 71 432 q 158 674 116 602 q 259 805 199 746 q 393 905 319 863 q 553 969 466 947 q 736 992 639 992 q 948 957 856 992 q 1101 862 1039 922 q 1193 721 1162 802 q 1225 545 1225 639 m 520 331 q 545 224 520 261 q 609 188 569 188 q 661 202 639 188 q 696 239 682 216 q 721 292 711 263 q 736 352 730 321 l 791 635 q 779 651 787 644 q 761 664 771 659 q 740 671 751 669 q 718 673 729 673 q 654 656 683 673 q 604 609 626 638 q 567 544 582 581 q 540 469 551 507 q 525 395 530 431 q 520 331 520 358 "},"ʼ":{"x_min":61.96875,"x_max":311,"ha":389,"o":"m 311 839 q 297 753 311 795 q 254 676 283 712 q 176 613 224 641 q 61 567 129 585 l 61 638 q 115 660 92 649 q 153 684 138 671 q 176 711 168 696 q 184 747 184 727 q 176 769 184 761 q 158 784 169 777 q 133 800 146 792 q 109 820 120 807 q 90 850 97 832 q 83 896 83 868 q 111 967 83 943 q 182 992 140 992 q 276 951 241 992 q 311 839 311 910 "},"℅":{"x_min":47,"x_max":1082,"ha":1129,"o":"m 300 529 q 198 543 245 529 q 117 586 151 557 q 65 659 84 615 q 47 764 47 703 q 65 877 47 831 q 117 949 84 922 q 195 988 150 976 q 293 1000 241 1000 q 363 992 328 1000 q 426 970 399 984 q 472 936 454 955 q 490 892 490 916 q 481 864 490 878 q 457 837 473 849 q 416 819 441 826 q 359 812 391 812 q 356 852 359 831 q 347 889 354 873 q 328 916 340 906 q 298 927 317 927 q 261 921 277 927 q 233 897 245 915 q 215 849 221 880 q 209 768 209 818 q 239 654 209 688 q 333 620 270 620 q 418 637 384 620 q 468 680 452 655 q 483 663 477 675 q 490 634 490 651 q 478 595 490 614 q 442 561 466 576 q 383 537 419 546 q 300 529 348 529 m 735 222 q 755 97 735 140 q 828 55 776 55 q 900 97 879 55 q 921 222 921 139 q 899 344 921 303 q 827 384 877 384 q 755 344 775 384 q 735 222 735 303 m 1082 222 q 1016 44 1082 103 q 827 -14 951 -14 q 719 0 766 -14 q 639 44 671 15 q 589 118 606 74 q 573 222 573 162 q 637 399 573 341 q 829 457 701 457 q 934 442 888 457 q 1014 398 981 427 q 1064 325 1046 369 q 1082 222 1082 281 m 363 0 l 254 0 l 735 992 l 842 992 l 363 0 "},"i":{"x_min":23.703125,"x_max":465.234375,"ha":489,"o":"m 119 970 q 128 1015 119 996 q 153 1046 137 1034 q 190 1064 169 1058 q 237 1070 212 1070 q 282 1064 261 1070 q 320 1046 304 1058 q 346 1015 337 1034 q 356 970 356 996 q 346 925 356 944 q 320 894 337 906 q 282 876 304 882 q 237 870 261 870 q 190 876 212 870 q 153 894 169 882 q 128 925 137 906 q 119 970 119 944 m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 "},"ќ":{"x_min":23.703125,"x_max":892,"ha":892,"o":"m 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 444 745 l 444 671 l 441 671 q 411 668 427 671 q 381 655 395 664 q 359 628 368 645 q 349 580 349 610 l 349 428 q 404 435 383 428 q 441 458 425 442 q 480 508 458 475 q 536 594 501 541 q 580 660 559 631 q 625 710 601 689 q 680 741 649 730 q 751 753 710 753 q 808 745 786 753 q 845 726 831 738 q 865 699 859 715 q 870 668 870 684 q 864 633 870 649 q 846 606 858 618 q 820 588 835 595 q 788 580 805 582 q 766 632 783 612 q 719 651 750 651 q 695 645 707 651 q 669 626 683 639 q 641 593 656 613 q 607 546 626 573 q 575 499 589 519 q 548 464 560 479 q 525 438 536 449 q 502 417 514 427 q 547 407 524 415 q 592 385 570 400 q 634 350 614 371 q 673 297 655 328 l 750 166 q 781 120 766 138 q 812 91 796 101 q 846 77 828 81 q 887 73 864 73 l 892 73 l 892 0 l 833 0 q 730 4 776 0 q 648 22 685 8 q 583 62 611 36 q 530 132 554 88 l 459 263 q 432 309 444 292 q 408 335 420 326 q 382 348 396 345 q 349 351 368 351 l 349 164 q 359 116 349 134 q 381 89 368 99 q 411 76 395 80 q 441 73 427 73 l 444 73 l 444 0 l 23 0 l 23 73 m 340 860 q 373 905 354 879 q 410 958 391 931 q 446 1013 429 986 q 473 1064 462 1040 l 692 1064 l 692 1049 q 649 1004 679 1031 q 582 946 619 976 q 506 889 545 917 q 434 842 466 860 l 340 842 l 340 860 "},"≤":{"x_min":90,"x_max":687,"ha":777,"o":"m 687 0 l 90 0 l 90 98 l 687 98 l 687 0 m 90 468 l 90 525 l 687 850 l 687 740 l 238 496 l 687 254 l 687 145 l 90 468 "},"ё":{"x_min":65,"x_max":735,"ha":793,"o":"m 412 671 q 319 614 354 671 q 282 445 285 556 l 522 445 q 516 540 522 497 q 497 611 510 582 q 463 656 483 640 q 412 671 442 671 m 425 -14 q 269 11 337 -14 q 156 86 202 37 q 88 206 111 135 q 65 367 65 277 q 88 539 65 465 q 155 662 111 613 q 263 737 199 712 q 409 762 327 762 q 545 740 485 762 q 648 677 606 719 q 712 572 690 635 q 735 427 735 510 l 735 356 l 279 356 q 294 236 281 286 q 331 153 307 186 q 388 105 354 120 q 465 89 421 89 q 531 98 501 89 q 587 121 562 106 q 630 157 612 137 q 661 202 649 178 q 699 134 699 182 q 682 77 699 104 q 632 30 666 51 q 547 -1 598 10 q 425 -14 496 -14 m 191 955 q 197 995 191 978 q 215 1022 204 1011 q 241 1036 226 1032 q 272 1041 256 1041 q 303 1036 289 1041 q 330 1022 318 1032 q 348 995 341 1011 q 356 955 356 978 q 348 915 356 931 q 330 888 341 898 q 303 873 318 878 q 272 869 289 869 q 241 873 256 869 q 215 888 226 878 q 197 915 204 898 q 191 955 191 931 m 476 955 q 482 995 476 978 q 501 1022 489 1011 q 527 1036 512 1032 q 559 1041 542 1041 q 589 1036 574 1041 q 615 1022 603 1032 q 633 995 626 1011 q 641 955 641 978 q 633 915 641 931 q 615 888 626 898 q 589 873 603 878 q 559 869 574 869 q 527 873 542 869 q 501 888 512 878 q 482 915 489 898 q 476 955 476 931 "},"υ":{"x_min":37.6875,"x_max":815,"ha":879,"o":"m 458 -14 q 315 7 376 -14 q 213 69 253 29 q 153 165 173 109 q 134 291 134 222 l 134 586 q 127 630 134 613 q 109 656 121 647 q 80 668 98 665 q 37 671 62 671 l 37 745 l 343 745 l 343 291 q 355 198 343 237 q 387 136 366 160 q 440 100 409 112 q 511 89 472 89 q 601 111 563 89 q 664 173 639 133 q 701 268 689 213 q 713 390 713 324 q 698 503 713 456 q 658 580 682 549 q 607 627 634 610 q 556 650 579 643 q 562 691 556 671 q 580 724 568 710 q 610 747 592 739 q 652 756 628 756 q 718 732 688 756 q 769 666 747 709 q 802 562 790 623 q 815 425 815 501 q 808 317 815 371 q 786 214 802 263 q 743 124 770 165 q 677 51 717 82 q 584 3 638 20 q 458 -14 530 -14 "},"ĕ":{"x_min":65,"x_max":735,"ha":793,"o":"m 412 671 q 319 614 354 671 q 282 445 285 556 l 522 445 q 516 540 522 497 q 497 611 510 582 q 463 656 483 640 q 412 671 442 671 m 425 -14 q 269 11 337 -14 q 156 86 202 37 q 88 206 111 135 q 65 367 65 277 q 88 539 65 465 q 155 662 111 613 q 263 737 199 712 q 409 762 327 762 q 545 740 485 762 q 648 677 606 719 q 712 572 690 635 q 735 427 735 510 l 735 356 l 279 356 q 294 236 281 286 q 331 153 307 186 q 388 105 354 120 q 465 89 421 89 q 531 98 501 89 q 587 121 562 106 q 630 157 612 137 q 661 202 649 178 q 699 134 699 182 q 682 77 699 104 q 632 30 666 51 q 547 -1 598 10 q 425 -14 496 -14 m 409 842 q 313 861 354 842 q 244 911 272 880 q 202 981 216 942 q 187 1060 188 1020 l 278 1060 q 324 987 290 1009 q 409 965 357 965 q 494 987 460 965 q 539 1060 528 1009 l 632 1060 q 616 981 630 1020 q 574 911 602 942 q 505 861 546 880 q 409 842 464 842 "},"ffi":{"x_min":26.140625,"x_max":1467.90625,"ha":1492,"o":"m 26 0 l 26 73 l 56 73 q 88 76 71 73 q 120 89 106 80 q 145 116 135 99 q 155 164 155 134 l 155 650 l 31 650 l 31 745 l 155 745 l 155 755 q 224 979 155 904 q 438 1054 293 1054 q 544 1043 503 1054 q 607 1018 585 1033 q 638 984 630 1002 q 647 950 647 966 q 609 883 647 903 q 499 862 571 862 q 497 898 499 879 q 487 935 494 918 q 468 963 480 952 q 437 975 456 975 q 408 966 420 975 q 385 934 395 957 q 371 869 376 910 q 366 765 366 829 l 366 745 l 648 745 l 648 753 q 670 886 648 828 q 738 985 692 945 q 854 1047 784 1026 q 1022 1068 925 1068 q 1167 1059 1109 1068 q 1262 1036 1226 1051 q 1314 997 1298 1020 q 1330 945 1330 975 q 1318 898 1330 919 q 1282 861 1306 876 q 1218 837 1257 846 q 1124 829 1179 829 q 1119 875 1124 848 q 1099 928 1113 903 q 1059 971 1085 953 q 995 988 1034 988 q 893 946 928 988 q 859 811 859 903 l 859 745 l 1352 745 l 1352 164 q 1362 116 1352 134 q 1386 89 1372 99 q 1418 76 1401 80 q 1450 73 1436 73 l 1467 73 l 1467 0 l 1025 0 l 1025 73 l 1042 73 q 1074 76 1057 73 q 1106 89 1092 80 q 1131 116 1121 99 q 1141 164 1141 134 l 1141 650 l 859 650 l 859 164 q 869 116 859 134 q 893 89 879 99 q 925 76 908 80 q 957 73 943 73 l 995 73 l 995 0 l 532 0 l 532 73 l 549 73 q 581 76 564 73 q 613 89 599 80 q 638 116 628 99 q 648 164 648 134 l 648 650 l 366 650 l 366 164 q 376 116 366 134 q 400 89 386 99 q 432 76 415 80 q 464 73 450 73 l 502 73 l 502 0 l 26 0 "},"ż":{"x_min":25,"x_max":694,"ha":735,"o":"m 511 94 q 547 100 532 94 q 572 120 562 106 q 590 155 583 133 q 603 207 597 176 l 611 252 l 694 252 l 687 0 l 25 0 l 25 56 l 435 650 l 232 650 q 204 645 216 650 q 184 630 193 641 q 167 600 175 618 q 152 553 160 581 l 144 520 l 61 520 l 77 745 l 678 745 l 678 685 l 266 94 l 511 94 m 277 969 q 286 1014 277 995 q 311 1045 295 1033 q 348 1063 327 1057 q 395 1069 369 1069 q 440 1063 418 1069 q 478 1045 462 1057 q 504 1014 494 1033 q 514 969 514 995 q 504 924 514 943 q 478 893 494 905 q 440 875 462 881 q 395 869 418 869 q 348 875 369 869 q 311 893 327 881 q 286 924 295 905 q 277 969 277 943 "},"Э":{"x_min":52,"x_max":870,"ha":947,"o":"m 404 1006 q 611 969 524 1006 q 756 866 699 932 q 841 710 813 800 q 870 513 870 620 q 838 294 870 392 q 748 128 807 197 q 602 22 688 59 q 406 -14 516 -14 q 241 3 309 -14 q 131 51 173 21 q 70 119 89 80 q 52 199 52 157 q 89 285 52 253 q 193 316 127 316 q 215 219 199 264 q 257 143 230 175 q 320 93 283 111 q 408 74 358 74 q 505 103 463 74 q 575 182 547 131 q 619 302 604 232 q 636 455 634 372 l 311 455 l 311 539 l 636 539 q 621 700 634 629 q 582 818 609 770 q 514 892 556 866 q 411 917 471 917 q 338 898 369 917 q 288 851 308 880 q 260 787 269 822 q 250 717 250 751 q 179 724 211 717 q 124 747 147 732 q 88 784 101 762 q 76 835 76 806 q 95 899 76 868 q 155 953 115 930 q 258 991 196 977 q 404 1006 319 1006 "},"ő":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 374 q 694 82 786 178 q 423 -14 602 -14 q 273 10 340 -14 q 160 82 207 34 q 89 203 114 130 q 65 374 65 277 q 156 666 65 570 q 427 762 248 762 q 577 738 511 762 q 690 666 643 714 q 761 545 736 618 q 786 374 786 472 m 280 374 q 288 244 280 300 q 313 150 296 188 q 358 92 330 112 q 426 73 386 73 q 494 92 466 73 q 538 150 521 112 q 563 244 556 188 q 571 374 571 300 q 563 505 571 449 q 538 598 555 561 q 492 654 520 635 q 425 673 465 673 q 357 654 385 673 q 312 598 329 635 q 288 505 295 561 q 280 374 280 449 m 200 842 l 200 860 q 230 908 214 882 q 262 961 246 934 q 292 1014 278 988 q 317 1064 307 1040 l 495 1064 l 495 1049 q 474 1021 487 1037 q 444 985 461 1004 q 407 946 427 966 q 368 907 388 926 q 330 871 349 888 q 296 842 311 854 l 200 842 m 464 842 l 464 860 q 494 908 478 882 q 526 961 510 934 q 556 1014 542 988 q 581 1064 570 1040 l 758 1064 l 758 1049 q 737 1021 750 1037 q 707 985 724 1004 q 671 946 690 966 q 632 907 651 926 q 593 871 612 888 q 559 842 575 854 l 464 842 "},"Ŏ":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 340 22 428 -14 q 193 126 251 59 q 106 288 135 193 q 77 498 77 382 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 748 970 661 1007 q 894 867 835 934 q 985 706 954 800 q 1016 496 1016 612 m 310 496 q 323 319 310 397 q 364 187 336 241 q 437 104 392 133 q 547 76 482 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 q 770 674 782 596 q 729 806 757 752 q 657 888 702 860 q 548 916 612 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 m 541 1071 q 445 1090 486 1071 q 376 1140 404 1109 q 334 1210 348 1171 q 319 1289 320 1249 l 410 1289 q 456 1216 422 1238 q 541 1194 489 1194 q 626 1216 592 1194 q 671 1289 660 1238 l 764 1289 q 748 1210 762 1249 q 706 1140 734 1171 q 637 1090 678 1109 q 541 1071 596 1071 "},"ю":{"x_min":23.703125,"x_max":1217,"ha":1282,"o":"m 1217 374 q 1128 82 1217 178 q 868 -14 1039 -14 q 729 8 790 -14 q 623 74 667 30 q 553 186 578 119 q 523 343 527 253 l 349 343 l 349 164 q 359 116 349 134 q 381 89 368 99 q 411 76 395 80 q 441 73 427 73 l 451 73 l 451 0 l 23 0 l 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 451 745 l 451 671 l 441 671 q 411 668 427 671 q 381 655 395 664 q 359 628 368 646 q 349 580 349 610 l 349 423 l 525 423 q 623 678 535 594 q 872 762 710 762 q 1016 738 953 762 q 1125 666 1080 714 q 1193 545 1169 618 q 1217 374 1217 472 m 739 374 q 746 244 739 300 q 768 150 752 188 q 809 92 784 112 q 871 73 834 73 q 932 92 907 73 q 972 150 957 112 q 995 244 988 188 q 1002 374 1002 300 q 972 598 1002 523 q 869 673 942 673 q 808 654 833 673 q 768 598 783 635 q 746 505 752 561 q 739 374 739 449 "},"İ":{"x_min":38.453125,"x_max":517.953125,"ha":557,"o":"m 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 827 q 162 875 168 857 q 147 902 157 892 q 125 915 138 911 q 96 918 112 918 l 38 918 l 38 992 l 517 992 l 517 918 l 459 918 q 431 915 444 918 q 408 902 418 911 q 393 875 399 892 q 388 827 388 857 l 388 164 q 393 116 388 134 q 408 89 399 99 q 431 76 418 80 q 459 73 444 73 l 517 73 l 517 0 l 38 0 m 158 1198 q 167 1243 158 1224 q 192 1274 176 1262 q 229 1292 208 1286 q 276 1298 250 1298 q 321 1292 299 1298 q 359 1274 343 1286 q 385 1243 375 1262 q 395 1198 395 1224 q 385 1153 395 1172 q 359 1122 375 1134 q 321 1104 343 1110 q 276 1098 299 1098 q 229 1104 250 1098 q 192 1122 208 1110 q 167 1153 176 1134 q 158 1198 158 1172 "},"Ě":{"x_min":38.453125,"x_max":863,"ha":907,"o":"m 388 84 l 666 84 q 702 92 687 84 q 728 114 717 100 q 745 148 739 128 q 755 190 752 167 l 766 256 l 863 256 l 852 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 809 992 l 815 736 l 718 736 l 711 801 q 685 880 705 852 q 622 907 665 907 l 388 907 l 388 560 l 718 560 l 718 476 l 388 476 l 388 84 m 211 1293 l 307 1293 q 340 1265 321 1281 q 380 1233 360 1250 q 421 1199 401 1215 q 457 1167 441 1182 q 492 1199 472 1182 q 533 1233 512 1215 q 574 1265 554 1250 q 608 1293 594 1281 l 704 1293 l 704 1274 q 666 1229 687 1255 q 622 1176 644 1203 q 581 1121 600 1148 q 551 1071 562 1094 l 364 1071 q 334 1121 353 1094 q 293 1176 314 1148 q 249 1229 271 1203 q 211 1274 227 1255 l 211 1293 "},"‹":{"x_min":90,"x_max":399.953125,"ha":490,"o":"m 90 411 l 302 654 l 399 654 l 259 375 l 399 97 l 302 97 l 90 339 l 90 411 "},"ķ":{"x_min":23.703125,"x_max":884,"ha":884,"o":"m 884 0 l 864 0 q 736 3 788 0 q 647 18 685 6 q 583 55 610 31 q 529 123 556 80 l 405 318 l 349 276 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 897 q 129 941 139 924 q 104 967 119 958 q 72 979 89 976 q 39 981 54 981 l 23 981 l 23 1055 l 349 1055 l 349 519 q 348 475 349 500 q 346 428 347 451 q 343 375 344 402 l 518 571 q 548 612 541 597 q 555 637 555 627 q 536 665 555 655 q 483 675 518 675 l 483 745 l 833 745 l 833 675 q 739 646 785 675 q 637 557 692 618 l 550 457 l 734 181 q 808 100 771 126 q 879 73 846 73 l 884 73 l 884 0 m 354 -289 q 368 -242 360 -268 q 384 -189 376 -216 q 398 -134 391 -161 q 408 -85 404 -108 l 570 -85 l 570 -98 q 545 -147 560 -120 q 511 -202 529 -174 q 474 -257 493 -230 q 437 -307 455 -285 l 354 -307 l 354 -289 "},"ì":{"x_min":-7,"x_max":465.234375,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 m 251 842 q 179 889 219 860 q 102 946 139 917 q 35 1004 65 976 q -7 1049 5 1031 l -7 1064 l 210 1064 q 238 1013 221 1040 q 274 958 255 986 q 312 905 292 931 q 346 860 331 879 l 346 842 l 251 842 "},"±":{"x_min":90.453125,"x_max":686.609375,"ha":777,"o":"m 686 0 l 90 0 l 90 98 l 686 98 l 686 0 m 437 446 l 437 198 l 338 198 l 338 446 l 90 446 l 90 546 l 338 546 l 338 794 l 437 794 l 437 546 l 686 546 l 686 446 l 437 446 "},"|":{"x_min":338,"x_max":437.703125,"ha":777,"o":"m 437 -334 l 338 -334 l 338 1055 l 437 1055 l 437 -334 "},"§":{"x_min":90,"x_max":703,"ha":756,"o":"m 383 -157 q 253 -141 305 -157 q 170 -99 201 -125 q 126 -42 139 -74 q 114 20 114 -11 q 123 68 114 47 q 148 102 132 88 q 187 123 164 116 q 237 130 210 130 q 247 45 237 84 q 278 -22 258 6 q 330 -66 299 -50 q 401 -82 361 -82 q 506 -45 468 -82 q 543 52 543 -9 q 535 103 543 81 q 501 147 526 125 q 428 197 475 170 q 304 262 382 224 q 205 319 246 290 q 139 380 164 348 q 101 446 113 412 q 90 523 90 481 q 115 607 90 570 q 180 666 140 645 q 138 733 156 691 q 121 831 121 774 q 141 926 121 884 q 198 996 161 968 q 285 1040 234 1025 q 394 1055 335 1055 q 502 1043 455 1055 q 579 1010 548 1031 q 627 960 611 989 q 643 896 643 931 q 609 825 643 854 q 511 797 575 797 q 506 860 511 827 q 486 918 500 892 q 449 962 472 945 q 388 979 425 979 q 295 945 330 979 q 260 848 260 911 q 271 792 260 814 q 303 751 282 769 q 355 718 325 734 q 425 684 386 703 q 551 618 498 649 q 637 554 603 587 q 687 485 671 521 q 703 405 703 450 q 695 355 703 380 q 676 309 688 331 q 648 270 665 287 q 614 241 632 252 q 650 172 637 211 q 663 92 663 133 q 645 -8 663 37 q 592 -87 627 -54 q 505 -138 557 -120 q 383 -157 452 -157 m 567 356 q 559 401 567 380 q 533 443 552 422 q 481 486 514 464 q 397 534 448 509 q 310 576 351 555 q 236 620 270 597 q 219 592 225 608 q 213 559 213 576 q 223 508 213 530 q 255 465 233 485 q 316 423 278 444 q 409 374 354 401 q 488 333 454 351 q 548 296 521 315 q 561 322 556 307 q 567 356 567 337 "},"џ":{"x_min":23.703125,"x_max":908.296875,"ha":932,"o":"m 892 671 q 859 668 877 671 q 827 655 841 664 q 802 628 812 645 q 793 580 793 610 l 793 158 q 802 114 793 130 q 827 88 812 97 q 859 76 842 79 q 892 73 877 73 l 908 73 l 908 0 l 659 0 q 551 -70 589 0 q 512 -292 512 -140 l 421 -292 q 408 -159 421 -214 q 373 -68 395 -104 q 319 -16 351 -33 q 251 0 288 0 l 23 0 l 23 73 l 39 73 q 72 76 54 73 q 104 88 89 79 q 129 114 119 97 q 139 158 139 130 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 444 745 l 444 671 l 441 671 q 411 668 427 671 q 381 655 395 664 q 359 628 368 645 q 349 580 349 610 l 349 79 l 582 79 l 582 580 q 572 628 582 610 q 550 655 563 645 q 520 668 536 664 q 490 671 504 671 l 487 671 l 487 745 l 908 745 l 908 671 l 892 671 "},"љ":{"x_min":0,"x_max":1204,"ha":1239,"o":"m 319 584 q 310 629 319 612 q 287 655 302 646 q 253 668 272 664 q 210 671 233 671 l 192 671 l 192 745 l 910 745 l 910 665 l 892 665 q 849 661 870 665 q 813 648 829 657 q 788 623 797 638 q 778 584 778 607 l 778 424 l 884 424 q 1006 416 948 424 q 1108 386 1064 408 q 1177 323 1151 364 q 1204 218 1204 283 q 1184 131 1204 171 q 1126 62 1165 91 q 1029 16 1088 33 q 891 0 970 0 l 452 0 l 452 73 l 467 73 q 568 154 563 73 l 568 665 l 410 665 q 376 422 397 536 q 328 214 355 308 q 289 107 310 150 q 243 38 268 64 q 186 1 218 12 q 116 -10 155 -10 q 30 15 60 -10 q 0 86 0 40 q 7 127 0 110 q 25 155 14 143 q 50 171 36 166 q 76 177 63 177 q 91 134 76 152 q 134 116 107 116 q 167 120 151 116 q 199 143 182 124 q 233 199 216 161 q 267 302 249 236 q 284 368 275 330 q 301 446 293 406 q 313 522 308 485 q 319 584 319 559 m 855 80 q 914 88 890 80 q 953 112 938 96 q 975 156 968 129 q 982 222 982 183 q 947 315 982 288 q 849 343 913 343 l 778 343 l 778 80 l 855 80 "},"q":{"x_min":64,"x_max":898.671875,"ha":900,"o":"m 412 -334 l 412 -260 l 437 -260 q 480 -257 460 -260 q 516 -245 501 -254 q 540 -219 531 -237 q 550 -173 550 -202 l 550 -72 q 550 -56 550 -66 q 551 -32 550 -45 q 553 -4 552 -19 q 555 24 554 9 q 560 96 558 57 l 551 96 q 517 52 537 72 q 472 17 497 32 q 415 -5 447 2 q 344 -14 383 -14 q 225 8 277 -14 q 137 78 173 31 q 82 199 101 126 q 64 373 64 272 q 82 545 64 473 q 137 665 101 618 q 226 735 173 712 q 347 758 279 758 q 420 749 388 758 q 479 725 453 741 q 525 686 505 709 q 560 635 545 664 l 573 635 l 601 745 l 881 745 l 881 671 l 876 671 q 832 667 853 671 q 795 654 811 664 q 770 624 779 643 q 761 574 761 605 l 761 -173 q 770 -219 761 -202 q 794 -245 779 -237 q 830 -257 809 -254 q 873 -260 850 -260 l 898 -260 l 898 -334 l 412 -334 m 407 654 q 307 584 337 654 q 278 372 278 513 q 307 160 278 232 q 407 88 337 88 q 475 106 448 88 q 519 160 503 125 q 543 248 536 196 q 550 370 550 301 q 543 495 550 442 q 519 584 536 549 q 475 636 503 619 q 407 654 448 654 "},"˳":{"x_min":64,"x_max":398,"ha":463,"o":"m 398 -236 q 385 -301 398 -273 q 349 -348 372 -329 q 296 -377 326 -367 q 231 -387 265 -387 q 165 -377 196 -387 q 112 -348 135 -367 q 76 -301 89 -329 q 64 -236 64 -273 q 76 -171 64 -199 q 112 -123 89 -142 q 165 -94 135 -104 q 231 -85 196 -85 q 296 -94 265 -85 q 349 -123 326 -104 q 385 -171 372 -142 q 398 -236 398 -199 m 313 -236 q 306 -201 313 -215 q 289 -178 300 -187 q 262 -165 277 -169 q 231 -161 247 -161 q 199 -165 214 -161 q 172 -178 184 -169 q 155 -201 161 -187 q 148 -236 148 -215 q 155 -270 148 -256 q 172 -293 161 -284 q 199 -306 184 -302 q 231 -311 214 -311 q 262 -306 247 -311 q 289 -293 277 -302 q 306 -270 300 -284 q 313 -236 313 -256 "},"ή":{"x_min":93.0625,"x_max":809.453125,"ha":913,"o":"m 129 470 q 125 543 129 504 q 117 620 122 582 q 105 691 112 658 q 93 745 99 724 l 276 745 q 300 685 291 716 q 318 617 310 654 l 323 617 q 358 671 339 645 q 404 717 378 697 q 464 749 430 737 q 541 762 497 762 q 648 746 602 762 q 723 697 693 730 q 768 612 753 664 q 783 488 783 560 l 783 -95 q 785 -157 783 -122 q 790 -227 787 -192 q 798 -291 793 -262 q 809 -334 803 -320 l 609 -334 q 592 -292 599 -321 q 580 -228 585 -264 q 574 -155 576 -193 q 572 -87 572 -118 l 572 471 q 543 600 572 557 q 467 643 514 643 q 407 626 431 643 q 368 575 383 608 q 347 495 353 542 q 340 388 340 448 l 340 0 l 129 0 l 129 470 m 390 860 q 404 907 396 881 q 419 960 411 932 q 433 1014 426 987 q 443 1064 439 1041 l 633 1064 l 633 1050 q 606 1001 623 1028 q 570 947 590 974 q 528 892 550 919 q 486 842 506 865 l 390 842 l 390 860 "},"Ж":{"x_min":0,"x_max":1445,"ha":1445,"o":"m 627 833 q 621 878 627 861 q 606 903 616 895 q 583 915 596 912 q 555 918 570 918 l 497 918 l 497 992 l 949 992 l 949 918 l 890 918 q 862 915 875 918 q 839 903 848 912 q 824 875 829 893 q 818 828 818 858 l 818 538 q 857 540 841 538 q 887 546 874 542 q 911 558 901 550 q 933 577 922 566 q 983 647 952 597 q 1051 773 1014 697 q 1109 877 1082 834 q 1164 947 1135 920 q 1226 987 1193 974 q 1302 1000 1260 1000 q 1352 993 1331 1000 q 1386 975 1373 987 q 1405 947 1399 963 q 1412 912 1412 931 q 1393 842 1412 869 q 1343 809 1375 815 q 1334 836 1340 823 q 1319 859 1328 849 q 1297 875 1310 869 q 1266 881 1283 881 q 1227 872 1245 881 q 1194 846 1210 864 q 1160 798 1177 827 q 1121 727 1143 769 q 1080 652 1098 684 q 1047 597 1063 620 q 1016 558 1031 575 q 985 530 1002 542 q 1043 521 1015 530 q 1095 494 1071 511 q 1140 453 1120 477 q 1177 400 1160 429 l 1289 198 q 1325 141 1307 165 q 1359 103 1342 118 q 1396 81 1377 88 q 1436 73 1415 73 l 1445 73 l 1445 0 l 1346 0 q 1255 8 1293 0 q 1190 33 1217 16 q 1144 75 1164 50 q 1107 132 1124 99 l 975 372 q 942 419 958 403 q 907 445 926 436 q 867 456 888 454 q 818 458 845 458 l 818 164 q 824 116 818 134 q 839 89 829 99 q 862 76 848 80 q 890 73 875 73 l 949 73 l 949 0 l 497 0 l 497 73 l 555 73 q 583 76 570 73 q 606 87 596 79 q 621 112 616 96 q 627 156 627 129 l 627 458 q 578 456 599 458 q 537 445 556 454 q 502 419 519 436 q 469 372 486 403 l 337 132 q 300 75 320 99 q 254 33 280 50 q 189 8 227 16 q 98 0 152 0 l 0 0 l 0 73 l 8 73 q 48 81 29 73 q 85 103 67 88 q 119 141 102 118 q 155 198 137 165 l 268 400 q 304 453 284 429 q 349 494 325 477 q 401 521 373 511 q 460 530 429 530 q 428 558 443 542 q 397 597 413 575 q 364 652 381 620 q 323 727 346 684 q 284 798 301 769 q 250 846 267 827 q 217 872 234 864 q 178 881 200 881 q 148 875 161 881 q 125 859 134 869 q 110 836 116 849 q 101 809 104 823 q 51 842 69 815 q 33 912 33 869 q 39 947 33 931 q 58 975 45 963 q 92 993 71 987 q 142 1000 113 1000 q 218 987 185 1000 q 280 947 251 974 q 336 877 309 920 q 393 773 362 834 q 461 647 430 697 q 511 577 492 597 q 533 558 522 566 q 557 546 544 550 q 587 540 570 542 q 627 538 603 538 l 627 833 "},"®":{"x_min":77,"x_max":1097,"ha":1174,"o":"m 323 242 l 342 242 q 367 244 355 242 q 389 251 380 246 q 404 265 399 256 q 410 291 410 275 l 410 698 q 404 724 410 714 q 389 739 399 734 q 367 745 380 744 q 342 747 355 747 l 323 747 l 323 796 l 573 796 q 812 630 812 796 q 801 572 812 597 q 772 528 790 547 q 732 497 755 510 q 686 477 709 485 l 809 279 q 822 260 816 267 q 837 249 828 253 q 858 244 846 245 q 887 242 870 242 l 887 196 l 740 196 l 587 454 l 514 454 l 514 291 q 521 265 515 275 q 535 251 526 256 q 556 244 544 246 q 582 242 568 242 l 601 242 l 601 196 l 323 196 l 323 242 m 514 507 l 572 507 q 634 514 609 507 q 674 536 659 521 q 695 574 689 551 q 702 629 702 597 q 694 681 702 659 q 671 716 687 703 q 630 735 655 729 q 568 741 604 741 l 514 741 l 514 507 m 77 495 q 95 631 77 566 q 146 753 113 696 q 225 857 179 810 q 328 937 272 903 q 450 988 385 970 q 585 1007 515 1007 q 721 988 656 1007 q 843 937 787 970 q 947 857 900 903 q 1027 753 993 810 q 1078 631 1060 696 q 1097 495 1097 566 q 1078 359 1097 424 q 1027 238 1060 294 q 947 134 993 181 q 843 55 900 88 q 721 3 787 21 q 585 -14 656 -14 q 450 3 515 -14 q 328 55 385 21 q 225 134 272 88 q 146 238 179 181 q 95 359 113 294 q 77 495 77 424 m 152 495 q 168 380 152 435 q 212 277 184 325 q 280 189 240 228 q 367 121 319 149 q 471 77 415 93 q 585 61 526 61 q 701 77 646 61 q 805 121 757 93 q 893 189 853 149 q 961 277 932 228 q 1004 380 989 325 q 1020 495 1020 435 q 1004 610 1020 555 q 961 714 989 666 q 893 803 932 763 q 805 871 853 842 q 701 914 757 899 q 585 930 646 930 q 471 914 526 930 q 367 871 415 899 q 280 803 319 842 q 212 714 240 763 q 168 611 184 666 q 152 495 152 555 "},"Н":{"x_min":38.453125,"x_max":1097.859375,"ha":1137,"o":"m 618 0 l 618 73 l 678 73 q 705 76 692 73 q 728 89 718 80 q 743 116 738 99 q 749 164 749 134 l 749 475 l 387 475 l 387 164 q 392 116 387 134 q 408 89 398 99 q 430 76 417 80 q 458 73 443 73 l 517 73 l 517 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 89 137 80 q 162 116 157 99 q 168 164 168 134 l 168 833 q 162 877 168 861 q 146 903 156 894 q 123 915 136 911 q 96 918 111 918 l 38 918 l 38 992 l 517 992 l 517 918 l 458 918 q 430 915 443 918 q 408 902 417 911 q 392 875 398 892 q 387 827 387 857 l 387 560 l 749 560 l 749 827 q 743 875 749 857 q 728 902 738 892 q 705 915 718 911 q 678 918 692 918 l 618 918 l 618 992 l 1097 992 l 1097 918 l 1039 918 q 1012 915 1025 918 q 989 902 999 911 q 974 875 979 892 q 969 827 969 857 l 969 156 q 974 112 969 129 q 990 87 980 96 q 1012 76 1000 79 q 1039 73 1025 73 l 1097 73 l 1097 0 l 618 0 "},"Ε":{"x_min":38.453125,"x_max":863,"ha":907,"o":"m 388 84 l 666 84 q 702 92 687 84 q 728 114 717 100 q 745 148 739 128 q 755 190 752 167 l 766 256 l 863 256 l 852 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 809 992 l 815 736 l 718 736 l 711 801 q 685 880 705 852 q 622 907 665 907 l 388 907 l 388 560 l 718 560 l 718 476 l 388 476 l 388 84 "},"₧":{"x_min":37.734375,"x_max":1195,"ha":1249,"o":"m 37 0 l 37 73 l 56 73 q 100 77 79 73 q 136 91 121 80 q 160 121 151 101 q 170 173 170 141 l 170 823 q 160 872 170 854 q 136 901 151 891 q 99 915 120 911 q 56 918 79 918 l 37 918 l 37 992 l 455 992 q 613 971 545 992 q 724 914 680 951 q 790 823 768 876 q 812 701 812 769 q 790 581 812 639 q 723 478 769 523 q 600 406 676 433 q 414 379 524 379 l 366 379 l 366 166 q 375 117 366 136 q 399 89 384 99 q 436 76 415 80 q 479 73 456 73 l 525 73 l 525 0 l 37 0 m 366 460 l 395 460 q 491 472 451 460 q 557 511 531 484 q 594 584 582 539 q 606 696 606 630 q 595 795 606 754 q 562 861 585 835 q 502 898 539 886 q 412 909 465 909 l 366 909 l 366 460 m 1120 74 q 1162 77 1145 74 q 1195 84 1178 80 l 1195 7 q 1141 -7 1173 -1 q 1060 -14 1109 -14 q 966 -2 1005 -14 q 903 33 927 8 q 867 100 879 58 q 856 201 856 141 l 856 425 l 770 425 l 770 489 q 829 506 800 489 q 882 551 858 523 q 924 613 906 578 q 951 684 942 648 l 1029 684 l 1029 513 l 1182 513 l 1182 425 l 1029 425 l 1029 212 q 1050 107 1029 140 q 1120 74 1071 74 "},"л":{"x_min":0,"x_max":894.296875,"ha":918,"o":"m 319 584 q 310 629 319 612 q 287 655 302 646 q 253 668 272 664 q 210 671 233 671 l 192 671 l 192 745 l 894 745 l 894 671 l 877 671 q 845 668 862 671 q 813 655 827 664 q 788 628 798 645 q 779 580 779 610 l 779 164 q 788 116 779 134 q 813 89 798 99 q 845 76 827 80 q 877 73 862 73 l 894 73 l 894 0 l 459 0 l 459 73 l 475 73 q 506 76 490 73 q 536 89 522 80 q 558 116 549 99 q 568 164 568 134 l 568 665 l 410 665 q 376 422 397 536 q 328 214 355 308 q 289 107 310 150 q 243 38 268 64 q 186 1 218 12 q 116 -10 155 -10 q 30 15 60 -10 q 0 86 0 40 q 7 127 0 110 q 25 155 14 143 q 50 171 36 166 q 76 177 63 177 q 91 134 76 152 q 134 116 107 116 q 167 120 151 116 q 199 143 182 124 q 233 199 216 161 q 267 302 249 236 q 284 368 275 330 q 301 446 293 406 q 313 522 308 485 q 319 584 319 559 "},"σ":{"x_min":65,"x_max":874.703125,"ha":896,"o":"m 794 307 q 770 173 794 233 q 701 72 747 114 q 586 8 655 30 q 425 -14 517 -14 q 276 10 343 -14 q 162 82 210 35 q 90 195 115 128 q 65 347 65 262 q 81 486 65 425 q 129 590 98 546 q 201 663 159 634 q 293 711 243 693 q 400 737 343 729 q 516 745 456 745 l 874 745 l 874 587 l 646 587 q 695 545 669 570 q 743 486 721 520 q 779 407 765 451 q 794 307 794 362 m 279 336 q 289 226 279 275 q 320 142 300 177 q 369 89 340 108 q 437 71 399 71 q 541 130 504 71 q 577 312 577 189 q 571 411 577 367 q 555 488 564 454 q 534 546 545 521 q 513 587 523 571 l 492 587 q 409 574 448 587 q 342 532 370 561 q 296 454 313 502 q 279 336 279 406 "},"θ":{"x_min":65,"x_max":786,"ha":851,"o":"m 786 524 q 763 299 786 399 q 697 129 741 199 q 584 22 652 59 q 426 -14 517 -14 q 262 23 330 -14 q 150 130 194 60 q 85 299 106 199 q 65 525 65 399 q 85 750 65 651 q 150 918 106 850 q 263 1024 194 987 q 427 1061 332 1061 q 585 1024 518 1061 q 697 918 652 987 q 763 750 741 850 q 786 524 786 650 m 426 73 q 489 101 463 73 q 534 184 516 130 q 561 315 552 237 q 571 491 570 392 l 280 491 q 290 315 281 392 q 316 184 298 237 q 362 101 334 130 q 426 73 389 73 m 427 972 q 365 946 391 972 q 320 870 338 919 q 292 746 302 820 q 280 580 282 673 l 571 580 q 560 746 569 673 q 533 870 550 820 q 489 946 515 919 q 427 972 463 972 "}," ":{"x_min":0,"x_max":0,"ha":361},"∑":{"x_min":52,"x_max":968,"ha":1022,"o":"m 763 -154 q 817 -144 796 -154 q 851 -115 838 -133 q 871 -72 864 -97 q 881 -19 878 -48 l 888 22 l 968 22 l 961 -334 l 52 -334 l 52 -226 l 479 330 l 82 855 l 82 992 l 900 992 l 907 733 l 825 733 l 818 793 q 807 841 815 820 q 784 877 799 863 q 746 899 769 892 q 690 907 723 907 l 269 907 l 619 444 l 619 368 l 216 -154 l 763 -154 "},"Ώ":{"x_min":-52,"x_max":1104,"ha":1165,"o":"m 132 625 q 161 782 132 712 q 249 902 190 852 q 397 979 308 952 q 606 1007 486 1007 q 806 979 719 1007 q 954 902 894 952 q 1045 782 1014 852 q 1076 625 1076 712 q 990 386 1076 478 q 736 265 904 295 l 733 148 l 872 148 q 933 153 908 148 q 974 168 958 158 q 1001 195 991 179 q 1016 234 1011 211 l 1027 280 l 1104 280 l 1093 0 l 646 0 l 655 335 q 739 363 704 341 q 795 423 773 386 q 825 510 816 460 q 835 625 835 561 q 823 748 835 694 q 783 840 810 802 q 712 897 756 877 q 605 916 668 916 q 496 897 541 916 q 424 840 451 877 q 383 748 396 802 q 370 625 370 694 q 380 510 370 561 q 411 423 390 460 q 467 363 433 386 q 551 335 502 341 l 561 0 l 113 0 l 104 278 l 180 278 l 191 231 q 205 192 196 208 q 231 165 215 176 q 273 150 248 155 q 334 145 298 145 l 474 145 l 470 267 q 217 388 302 296 q 132 625 132 479 m -52 788 q -37 835 -45 809 q -22 888 -30 861 q -8 943 -15 916 q 1 993 -2 969 l 191 993 l 191 978 q 164 930 181 957 q 128 875 148 903 q 86 820 108 847 q 44 770 64 793 l -52 770 l -52 788 "},"ẃ":{"x_min":-4.40625,"x_max":1190.078125,"ha":1189,"o":"m 686 737 l 821 327 q 846 242 838 277 q 858 181 853 207 l 862 181 q 868 215 865 199 q 876 247 871 230 q 886 284 880 264 q 899 330 891 304 l 960 533 q 970 571 966 550 q 973 603 973 591 q 951 654 973 638 q 881 671 928 671 l 871 671 l 871 745 l 1190 745 l 1190 671 l 1172 671 q 1137 667 1152 671 q 1110 651 1122 662 q 1089 617 1099 639 q 1068 562 1078 596 l 888 0 l 739 0 l 587 461 l 427 0 l 276 0 l 98 597 q 81 633 90 619 q 61 656 72 648 q 34 667 49 664 q 0 671 20 671 l -4 671 l -4 745 l 402 745 l 402 671 l 384 671 q 321 659 342 671 q 300 612 300 647 q 304 584 300 601 q 312 553 308 568 l 363 372 q 376 320 370 347 q 388 269 382 294 q 398 221 393 244 q 405 181 402 199 l 409 181 q 425 253 415 216 q 454 341 436 290 l 595 737 l 686 737 m 539 860 q 572 905 553 879 q 609 958 590 931 q 645 1013 628 986 q 672 1064 661 1040 l 891 1064 l 891 1049 q 848 1004 878 1031 q 781 946 818 976 q 705 889 744 917 q 633 842 665 860 l 539 842 l 539 860 "},"+":{"x_min":90.453125,"x_max":686.609375,"ha":777,"o":"m 437 446 l 437 198 l 338 198 l 338 446 l 90 446 l 90 546 l 338 546 l 338 794 l 437 794 l 437 546 l 686 546 l 686 446 l 437 446 "},"Ë":{"x_min":38.453125,"x_max":863,"ha":907,"o":"m 388 84 l 666 84 q 702 92 687 84 q 728 114 717 100 q 745 148 739 128 q 755 190 752 167 l 766 256 l 863 256 l 852 0 l 38 0 l 38 73 l 96 73 q 124 76 111 73 q 147 87 137 79 q 162 112 157 96 q 168 156 168 129 l 168 828 q 162 876 168 858 q 147 903 157 893 q 125 915 138 912 q 96 918 112 918 l 38 918 l 38 992 l 809 992 l 815 736 l 718 736 l 711 801 q 685 880 705 852 q 622 907 665 907 l 388 907 l 388 560 l 718 560 l 718 476 l 388 476 l 388 84 m 242 1184 q 248 1224 242 1207 q 266 1251 255 1240 q 292 1265 277 1261 q 323 1270 307 1270 q 354 1265 340 1270 q 381 1251 369 1261 q 399 1224 392 1240 q 407 1184 407 1207 q 399 1144 407 1160 q 381 1117 392 1127 q 354 1102 369 1107 q 323 1098 340 1098 q 292 1102 307 1098 q 266 1117 277 1107 q 248 1144 255 1127 q 242 1184 242 1160 m 527 1184 q 533 1224 527 1207 q 552 1251 540 1240 q 578 1265 563 1261 q 610 1270 593 1270 q 640 1265 625 1270 q 666 1251 654 1261 q 684 1224 677 1240 q 692 1184 692 1207 q 684 1144 692 1160 q 666 1117 677 1127 q 640 1102 654 1107 q 610 1098 625 1098 q 578 1102 593 1098 q 552 1117 563 1107 q 533 1144 540 1127 q 527 1184 527 1160 "},"Š":{"x_min":41.203125,"x_max":745,"ha":814,"o":"m 366 -14 q 210 3 273 -14 q 110 49 148 21 q 57 111 73 76 q 41 179 41 146 q 54 240 41 215 q 89 280 67 264 q 139 302 111 295 q 198 309 168 309 q 212 204 198 249 q 252 129 227 159 q 312 83 277 99 q 388 68 347 68 q 461 80 429 68 q 515 112 493 91 q 549 160 538 132 q 561 219 561 187 q 546 282 561 254 q 503 333 532 309 q 431 377 474 356 q 329 423 387 399 q 206 485 256 453 q 126 553 156 516 q 82 632 95 590 q 69 726 69 675 q 94 841 69 790 q 166 930 120 893 q 273 986 211 966 q 409 1006 336 1006 q 542 993 486 1006 q 634 959 597 980 q 688 908 670 937 q 705 844 705 878 q 695 799 705 820 q 663 762 684 778 q 609 738 641 746 q 534 729 577 729 q 526 792 534 758 q 501 854 519 825 q 455 902 483 883 q 387 921 427 921 q 334 913 359 921 q 290 888 309 904 q 260 848 271 872 q 250 792 250 824 q 259 737 250 763 q 294 687 269 712 q 364 637 320 662 q 479 584 408 613 q 601 524 550 555 q 683 459 651 494 q 730 382 715 424 q 745 289 745 340 q 718 166 745 222 q 642 70 692 110 q 523 8 592 30 q 366 -14 453 -14 m 167 1293 l 263 1293 q 296 1265 277 1281 q 336 1233 316 1250 q 377 1199 357 1215 q 413 1167 397 1182 q 448 1199 428 1182 q 489 1233 468 1215 q 530 1265 510 1250 q 564 1293 550 1281 l 660 1293 l 660 1274 q 622 1229 643 1255 q 578 1176 600 1203 q 537 1121 556 1148 q 507 1071 518 1094 l 320 1071 q 290 1121 309 1094 q 249 1176 270 1148 q 205 1229 227 1203 q 167 1274 183 1255 l 167 1293 "}," ":{"x_min":0,"x_max":0,"ha":1389},"ð":{"x_min":65,"x_max":785,"ha":850,"o":"m 785 403 q 693 89 785 192 q 422 -14 601 -14 q 273 8 339 -14 q 161 76 207 30 q 89 191 114 122 q 65 353 65 260 q 87 515 65 446 q 151 629 109 583 q 257 698 194 675 q 400 721 319 721 q 486 710 446 721 q 551 683 525 699 q 534 728 544 706 q 511 772 525 750 q 479 816 498 794 q 433 860 460 838 l 237 760 l 237 850 l 360 914 q 287 948 326 935 q 197 969 247 960 l 197 1057 q 258 1047 222 1054 q 332 1027 294 1039 q 406 1000 370 1015 q 469 969 443 985 l 645 1058 l 645 965 l 547 916 q 644 821 600 875 q 719 702 688 767 q 767 562 750 637 q 785 403 785 487 m 280 352 q 288 231 280 283 q 313 144 296 179 q 358 91 330 109 q 426 73 386 73 q 493 91 466 73 q 538 144 521 109 q 563 231 555 179 q 571 352 571 283 q 563 476 571 423 q 538 563 555 528 q 493 615 521 598 q 425 632 465 632 q 358 615 385 632 q 313 564 330 598 q 288 477 296 530 q 280 352 280 425 "},"щ":{"x_min":23.703125,"x_max":1376,"ha":1403,"o":"m 494 745 l 888 745 l 888 671 l 885 671 q 854 667 871 671 q 825 655 838 664 q 802 628 811 645 q 793 580 793 610 l 793 79 l 1039 79 l 1039 580 q 1030 628 1039 610 q 1007 655 1021 645 q 978 667 994 664 q 948 671 962 671 l 945 671 l 945 745 l 1359 745 l 1359 671 l 1342 671 q 1310 668 1327 671 q 1278 655 1292 664 q 1253 628 1263 645 q 1244 580 1244 610 l 1244 152 q 1252 112 1244 128 q 1274 89 1260 97 q 1305 77 1288 80 q 1343 73 1323 74 l 1376 73 l 1376 -292 l 1279 -292 l 1272 -190 q 1256 -102 1269 -138 q 1226 -43 1244 -65 q 1186 -10 1208 -20 q 1141 0 1164 0 l 23 0 l 23 73 l 39 73 q 72 76 54 73 q 104 88 89 79 q 129 114 119 97 q 139 158 139 130 l 139 580 q 129 628 139 610 q 104 655 119 645 q 72 668 90 664 q 39 671 55 671 l 23 671 l 23 745 l 437 745 l 437 671 l 434 671 q 404 667 420 671 q 375 655 388 664 q 352 628 361 645 q 343 580 343 610 l 343 79 l 589 79 l 589 586 q 579 630 589 614 q 556 656 570 647 q 526 668 542 665 q 497 671 511 671 l 494 671 l 494 745 "},"℮":{"x_min":69,"x_max":789,"ha":860,"o":"m 429 -24 q 273 7 341 -24 q 161 92 206 39 q 92 215 115 146 q 69 359 69 284 q 83 480 69 426 q 124 577 98 534 q 185 651 150 620 q 259 702 219 682 q 343 733 299 723 q 429 743 386 743 q 571 716 506 743 q 685 639 637 689 q 761 518 734 589 q 789 358 789 447 l 227 358 l 227 117 q 264 86 242 101 q 312 60 286 71 q 368 41 338 48 q 429 34 398 34 q 518 45 479 34 q 590 76 558 56 q 648 126 622 96 q 697 193 674 155 l 746 165 q 693 92 721 126 q 628 31 665 58 q 542 -9 590 5 q 429 -24 493 -24 m 632 417 l 632 605 q 599 633 619 618 q 553 659 579 647 q 495 678 527 671 q 428 686 463 686 q 363 679 393 686 q 309 661 334 673 q 264 636 284 650 q 227 606 244 622 l 227 417 l 632 417 "},"Φ":{"x_min":41,"x_max":1139,"ha":1181,"o":"m 691 266 l 731 266 q 822 279 784 266 q 883 322 859 293 q 918 398 907 351 q 929 510 929 444 q 919 611 929 568 q 889 682 910 654 q 833 724 867 710 q 750 737 799 737 l 691 737 l 691 266 m 489 737 l 430 737 q 347 724 381 737 q 291 682 313 710 q 260 611 270 654 q 251 510 251 568 q 262 398 251 444 q 297 322 273 351 q 358 279 321 293 q 448 266 395 266 l 489 266 l 489 737 m 489 186 l 445 186 q 311 198 370 186 q 207 234 252 211 q 131 288 163 257 q 79 357 99 320 q 50 434 59 393 q 41 515 41 474 q 63 639 41 583 q 131 735 85 695 q 248 797 178 775 q 412 820 317 820 l 489 820 l 489 834 q 479 878 489 861 q 455 903 470 895 q 419 915 440 912 q 375 918 398 918 l 356 918 l 356 992 l 823 992 l 823 918 l 805 918 q 761 915 782 918 q 725 903 740 912 q 700 878 710 895 q 691 834 691 861 l 691 820 l 768 820 q 933 797 863 820 q 1048 735 1002 775 q 1116 639 1094 695 q 1139 515 1139 583 q 1129 434 1139 474 q 1100 357 1120 393 q 1049 288 1080 320 q 972 234 1017 257 q 868 198 927 211 q 734 186 809 186 l 691 186 l 691 158 q 700 114 691 130 q 725 88 710 97 q 761 76 740 79 q 805 73 782 73 l 823 73 l 823 0 l 356 0 l 356 73 l 375 73 q 419 76 398 73 q 455 88 440 79 q 479 114 470 97 q 489 158 489 130 l 489 186 "},"ş":{"x_min":41.765625,"x_max":623,"ha":678,"o":"m 321 -14 q 192 -1 245 -14 q 105 32 139 10 q 57 83 72 53 q 41 148 41 113 q 54 202 41 182 q 88 234 68 223 q 130 250 108 246 q 171 253 153 253 q 182 175 171 210 q 212 117 193 141 q 259 80 232 93 q 321 67 287 67 q 383 74 357 67 q 425 95 409 82 q 450 126 442 108 q 458 162 458 143 q 450 203 458 185 q 422 237 441 221 q 369 268 402 253 q 287 300 336 283 q 188 342 231 320 q 116 392 145 364 q 71 457 86 421 q 56 540 56 493 q 77 637 56 596 q 138 706 98 678 q 232 747 177 733 q 354 761 287 761 q 466 749 420 761 q 541 720 512 738 q 584 678 570 702 q 597 632 597 655 q 565 560 597 585 q 456 536 532 536 q 425 644 456 605 q 334 682 394 682 q 291 676 311 682 q 255 660 270 671 q 230 633 239 649 q 221 596 221 617 q 229 556 221 573 q 259 522 238 538 q 317 490 281 506 q 411 454 354 473 q 496 417 457 437 q 563 369 535 396 q 607 308 591 342 q 623 230 623 274 q 602 127 623 172 q 544 50 582 81 q 449 2 505 19 q 321 -14 393 -14 m 496 -175 q 481 -241 496 -211 q 441 -291 467 -270 q 379 -323 415 -312 q 299 -334 343 -334 q 272 -332 288 -334 q 240 -329 257 -331 q 207 -324 223 -327 q 178 -318 190 -321 l 178 -233 q 228 -241 203 -239 q 272 -244 253 -244 q 334 -230 312 -244 q 357 -180 357 -216 q 349 -147 357 -160 q 327 -126 342 -134 q 294 -115 313 -118 q 253 -110 275 -111 l 282 12 l 361 12 l 347 -47 q 408 -60 381 -50 q 455 -86 436 -70 q 485 -125 474 -102 q 496 -175 496 -148 "}," ":{"x_min":0,"x_max":0,"ha":777},"ı":{"x_min":23.703125,"x_max":465.234375,"ha":489,"o":"m 39 73 q 72 76 55 73 q 104 89 90 80 q 129 116 119 99 q 139 164 139 134 l 139 586 q 129 630 139 614 q 104 656 119 647 q 72 668 89 665 q 39 671 54 671 l 23 671 l 23 745 l 349 745 l 349 164 q 359 116 349 134 q 384 89 369 99 q 416 76 398 80 q 448 73 434 73 l 465 73 l 465 0 l 23 0 l 23 73 l 39 73 "},"ä":{"x_min":62,"x_max":786.859375,"ha":832,"o":"m 277 206 q 296 116 277 146 q 356 87 315 87 q 410 99 386 87 q 451 135 434 112 q 477 191 468 158 q 487 265 487 224 l 487 369 l 424 365 q 354 352 383 363 q 309 321 326 341 q 285 273 292 301 q 277 206 277 244 m 401 677 q 356 666 374 677 q 327 634 338 654 q 312 587 316 614 q 308 527 308 559 q 167 548 214 527 q 120 620 120 569 q 143 685 120 658 q 204 729 165 712 q 295 754 243 746 q 406 762 347 762 q 534 749 479 762 q 625 709 588 736 q 679 636 661 681 q 698 526 698 591 l 698 172 q 702 124 698 143 q 716 94 706 105 q 742 78 725 83 q 781 73 758 73 l 786 73 l 786 0 l 528 0 l 499 95 l 487 95 q 443 46 464 67 q 400 12 423 26 q 348 -7 377 -1 q 280 -14 319 -14 q 194 0 234 -14 q 125 41 154 13 q 78 111 95 69 q 62 212 62 154 q 139 379 62 325 q 373 438 217 434 l 487 443 l 487 519 q 484 583 487 554 q 472 633 481 612 q 446 665 464 654 q 401 677 429 677 m 189 955 q 195 995 189 978 q 213 1022 202 1011 q 239 1036 224 1032 q 270 1041 254 1041 q 301 1036 287 1041 q 328 1022 316 1032 q 346 995 339 1011 q 354 955 354 978 q 346 915 354 931 q 328 888 339 898 q 301 873 316 878 q 270 869 287 869 q 239 873 254 869 q 213 888 224 878 q 195 915 202 898 q 189 955 189 931 m 474 955 q 480 995 474 978 q 499 1022 487 1011 q 525 1036 510 1032 q 557 1041 540 1041 q 587 1036 572 1041 q 613 1022 601 1032 q 631 995 624 1011 q 639 955 639 978 q 631 915 639 931 q 613 888 624 898 q 587 873 601 878 q 557 869 572 869 q 525 873 540 869 q 499 888 510 878 q 480 915 487 898 q 474 955 474 931 "},"¹":{"x_min":65.015625,"x_max":479.40625,"ha":555,"o":"m 358 999 l 358 512 q 363 484 358 495 q 377 468 368 474 q 397 461 385 463 q 422 460 409 460 l 479 460 l 479 399 l 87 399 l 87 460 l 157 460 q 182 461 171 460 q 202 468 193 463 q 216 484 211 474 q 221 512 221 495 l 221 906 q 163 844 188 868 q 112 821 137 821 q 78 840 92 821 q 65 889 65 860 q 120 909 90 895 q 193 952 151 923 l 255 999 l 358 999 "},"W":{"x_min":0.34375,"x_max":1481.578125,"ha":1482,"o":"m 838 982 l 1030 451 q 1053 385 1042 419 q 1072 321 1063 352 q 1088 265 1081 290 q 1098 221 1095 239 q 1110 276 1103 246 q 1123 340 1116 307 q 1138 409 1130 374 q 1154 478 1145 445 l 1227 778 q 1231 797 1229 786 q 1236 818 1234 808 q 1239 838 1238 829 q 1240 852 1240 847 q 1218 903 1240 888 q 1151 918 1197 918 l 1119 918 l 1119 992 l 1481 992 l 1481 918 l 1455 918 q 1419 914 1434 918 q 1391 898 1403 910 q 1369 865 1379 886 q 1350 810 1359 844 l 1134 0 l 976 0 l 743 652 l 543 0 l 371 0 l 117 844 q 102 880 110 866 q 81 903 93 895 q 54 915 69 911 q 18 918 39 918 l 0 918 l 0 992 l 464 992 l 464 918 l 432 918 q 369 902 390 918 q 348 851 348 886 q 353 817 348 840 q 363 776 357 795 l 455 455 q 471 398 463 429 q 487 336 480 367 q 501 275 495 304 q 510 223 507 246 q 530 307 519 268 q 554 387 542 346 l 737 982 l 838 982 "},"λ":{"x_min":-0.25,"x_max":787,"ha":791,"o":"m 389 750 q 355 849 373 808 q 317 914 337 889 q 274 951 297 940 q 223 962 251 962 q 183 957 201 962 q 151 943 165 951 q 126 924 137 935 q 106 903 115 913 q 88 934 96 916 q 80 977 80 951 q 90 1016 80 999 q 117 1045 100 1034 q 158 1063 134 1057 q 210 1070 182 1070 q 307 1050 265 1070 q 381 993 348 1031 q 437 899 413 955 q 483 770 462 843 l 610 315 q 652 197 631 244 q 694 123 673 150 q 737 84 715 95 q 780 73 759 73 l 787 73 l 787 0 l 755 0 q 677 7 711 0 q 617 35 643 14 q 569 99 590 57 q 530 208 547 140 q 478 412 497 333 q 458 514 460 491 l 454 514 q 442 472 450 497 q 423 419 434 447 q 401 363 413 391 q 377 312 388 335 l 222 0 l 0 0 l 389 750 "},">":{"x_min":90,"x_max":687,"ha":777,"o":"m 90 145 l 90 254 l 538 496 l 90 740 l 90 850 l 687 525 l 687 468 l 90 145 "},"τ":{"x_min":28,"x_max":687.96875,"ha":732,"o":"m 687 565 l 433 565 q 410 357 418 444 q 403 209 403 271 q 425 125 403 152 q 481 97 447 97 q 537 102 512 97 q 584 114 563 107 l 584 19 q 524 -5 559 3 q 437 -14 488 -14 q 306 35 348 -14 q 265 173 265 84 q 270 258 265 214 q 285 350 275 302 q 308 451 295 398 q 338 565 321 505 l 213 565 q 161 556 183 565 q 127 531 140 547 q 108 493 114 514 q 101 447 101 471 l 28 447 q 45 586 28 529 q 91 678 63 643 q 154 729 119 713 q 222 745 188 745 l 687 745 l 687 565 "},"Ų":{"x_min":22.78125,"x_max":1015.21875,"ha":1038,"o":"m 1015 918 l 955 918 q 928 915 941 918 q 905 903 915 912 q 890 875 895 893 q 885 828 885 858 l 885 286 q 865 160 885 216 q 802 66 845 104 q 694 6 760 27 q 537 -14 628 -14 q 375 3 447 -14 q 254 58 304 20 q 179 156 205 96 q 153 302 153 216 l 153 833 q 147 878 153 861 q 131 903 141 894 q 109 915 121 912 q 82 918 96 918 l 22 918 l 22 992 l 501 992 l 501 918 l 443 918 q 416 915 429 918 q 393 903 403 912 q 378 875 383 893 q 372 828 372 858 l 372 291 q 387 193 372 233 q 428 129 401 153 q 494 94 456 105 q 579 84 531 84 q 662 96 625 84 q 726 133 699 108 q 766 197 752 158 q 780 288 780 235 l 780 833 q 775 878 780 861 q 759 903 769 894 q 737 915 750 912 q 710 918 724 918 l 651 918 l 651 992 l 1015 992 l 1015 918 m 396 -180 q 409 -118 396 -147 q 446 -65 423 -89 q 498 -24 469 -41 q 560 0 528 -7 l 667 0 q 622 -20 645 -6 q 580 -53 599 -33 q 549 -100 562 -74 q 537 -160 537 -127 q 544 -193 537 -179 q 564 -215 551 -207 q 595 -229 577 -224 q 633 -233 612 -233 q 673 -230 652 -233 q 721 -222 695 -228 l 721 -311 q 694 -321 710 -317 q 661 -327 678 -325 q 629 -332 645 -330 q 602 -334 613 -334 q 448 -297 501 -334 q 396 -180 396 -260 "},"Ŵ":{"x_min":0.34375,"x_max":1481.578125,"ha":1482,"o":"m 838 982 l 1030 451 q 1053 385 1042 419 q 1072 321 1063 352 q 1088 265 1081 290 q 1098 221 1095 239 q 1110 276 1103 246 q 1123 340 1116 307 q 1138 409 1130 374 q 1154 478 1145 445 l 1227 778 q 1231 797 1229 786 q 1236 818 1234 808 q 1239 838 1238 829 q 1240 852 1240 847 q 1218 903 1240 888 q 1151 918 1197 918 l 1119 918 l 1119 992 l 1481 992 l 1481 918 l 1455 918 q 1419 914 1434 918 q 1391 898 1403 910 q 1369 865 1379 886 q 1350 810 1359 844 l 1134 0 l 976 0 l 743 652 l 543 0 l 371 0 l 117 844 q 102 880 110 866 q 81 903 93 895 q 54 915 69 911 q 18 918 39 918 l 0 918 l 0 992 l 464 992 l 464 918 l 432 918 q 369 902 390 918 q 348 851 348 886 q 353 817 348 840 q 363 776 357 795 l 455 455 q 471 398 463 429 q 487 336 480 367 q 501 275 495 304 q 510 223 507 246 q 530 307 519 268 q 554 387 542 346 l 737 982 l 838 982 m 537 1089 q 575 1134 553 1108 q 619 1187 597 1160 q 660 1242 640 1215 q 690 1293 679 1269 l 877 1293 q 907 1242 888 1269 q 948 1187 926 1215 q 992 1134 970 1160 q 1030 1089 1013 1108 l 1030 1071 l 934 1071 q 900 1098 920 1082 q 859 1130 880 1113 q 818 1164 838 1147 q 783 1195 798 1181 q 747 1164 767 1181 q 706 1130 727 1147 q 666 1098 686 1113 q 633 1071 647 1082 l 537 1071 l 537 1089 "},"‛":{"x_min":78,"x_max":326.34375,"ha":389,"o":"m 78 839 q 112 951 78 910 q 205 992 146 992 q 277 967 248 992 q 306 896 306 943 q 298 850 306 868 q 279 820 291 832 q 255 800 267 807 q 230 784 242 792 q 211 769 219 777 q 204 747 204 761 q 211 711 204 727 q 235 684 219 696 q 273 660 250 671 q 326 638 295 649 l 326 567 q 211 613 258 585 q 134 676 164 641 q 91 753 105 712 q 78 839 78 795 "},"Ð":{"x_min":38.453125,"x_max":988,"ha":1065,"o":"m 988 514 q 956 305 988 400 q 863 143 925 211 q 709 37 801 75 q 496 0 617 0 l 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 476 l 52 476 l 52 561 l 168 561 l 168 833 q 162 878 168 861 q 147 903 157 894 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 496 992 q 703 961 611 992 q 857 871 794 931 q 954 721 920 811 q 988 514 988 632 m 753 514 q 680 810 753 713 q 466 907 607 907 l 387 907 l 387 561 l 560 561 l 560 476 l 387 476 l 387 86 l 464 86 q 590 115 536 86 q 680 200 644 145 q 735 335 716 256 q 753 514 753 414 "},"Λ":{"x_min":0.390625,"x_max":969.6875,"ha":970,"o":"m 0 73 l 66 73 q 83 77 76 73 q 98 92 91 81 q 114 123 106 103 q 134 175 123 143 l 416 992 l 555 992 l 851 140 q 868 107 857 120 q 890 87 878 94 q 914 76 902 80 q 937 73 926 73 l 969 73 l 969 0 l 511 0 l 511 73 l 574 73 q 594 76 585 73 q 611 83 604 78 q 624 97 619 88 q 629 119 629 106 q 625 150 629 132 q 616 179 621 167 l 474 607 q 464 643 470 622 q 452 688 457 665 q 442 733 447 711 q 436 775 438 756 q 429 744 434 764 q 417 700 424 724 q 403 654 411 677 q 390 611 396 630 l 247 189 q 242 172 245 181 q 236 153 239 162 q 232 135 234 143 q 230 120 230 126 q 246 85 230 97 q 286 73 261 73 l 358 73 l 358 0 l 0 0 l 0 73 "},"·":{"x_min":97,"x_max":325,"ha":423,"o":"m 97 493 q 105 546 97 524 q 129 580 114 567 q 166 598 145 593 q 211 604 187 604 q 254 598 234 604 q 291 580 275 593 q 315 546 306 567 q 325 493 325 524 q 315 440 325 461 q 291 406 306 419 q 254 387 275 393 q 211 382 234 382 q 166 387 187 382 q 129 406 145 393 q 105 440 114 419 q 97 493 97 461 "},"Х":{"x_min":13.71875,"x_max":1003.546875,"ha":1017,"o":"m 727 878 q 720 898 727 890 q 704 910 714 906 q 679 917 693 915 q 649 918 665 918 l 645 918 l 645 992 l 970 992 l 970 918 l 957 918 q 921 913 937 918 q 888 896 904 908 q 856 865 872 884 q 820 818 840 846 l 618 543 l 874 147 q 930 89 901 104 q 985 73 959 73 l 1003 73 l 1003 0 l 545 0 l 545 73 l 551 73 q 635 119 635 73 q 633 134 635 127 q 627 152 632 142 q 613 177 622 162 q 588 215 604 192 l 461 408 l 311 205 q 287 165 298 187 q 275 120 275 142 q 294 85 275 97 q 359 73 313 73 l 364 73 l 364 0 l 13 0 l 13 73 l 22 73 q 66 80 47 73 q 102 100 85 87 q 134 130 118 112 q 167 170 150 148 l 410 487 l 181 844 q 158 877 169 863 q 133 900 147 890 q 102 914 119 909 q 61 918 85 918 l 43 918 l 43 992 l 503 992 l 503 918 l 499 918 q 459 915 475 918 q 433 906 443 912 q 420 893 424 901 q 417 878 417 886 q 427 842 417 863 q 453 796 437 820 l 568 624 l 689 793 q 714 835 701 812 q 727 878 727 859 "},"Υ":{"x_min":0.34375,"x_max":962.5625,"ha":962,"o":"m 228 0 l 228 73 l 293 73 q 324 75 310 73 q 350 86 339 77 q 367 111 361 94 q 374 157 374 128 l 374 351 l 117 844 q 97 879 106 865 q 77 902 88 893 q 52 914 66 910 q 18 918 39 918 l 0 918 l 0 992 l 465 992 l 465 918 l 441 918 q 379 901 399 918 q 358 856 358 884 q 364 817 358 838 q 379 779 371 797 l 482 575 q 518 496 504 530 q 543 430 532 462 q 576 510 557 467 q 618 600 595 553 l 698 766 q 718 817 713 797 q 722 850 722 838 q 699 902 722 886 q 630 918 677 918 l 599 918 l 599 992 l 962 992 l 962 918 l 936 918 q 905 913 918 918 q 882 897 893 909 q 859 863 871 884 q 831 810 847 842 l 595 349 l 595 159 q 601 112 595 129 q 617 86 607 95 q 642 75 628 77 q 672 73 656 73 l 740 73 l 740 0 l 228 0 "},"r":{"x_min":27.78125,"x_max":705,"ha":726,"o":"m 491 0 l 27 0 l 27 73 l 31 73 q 75 77 55 73 q 109 91 94 80 q 131 121 123 101 q 139 173 139 141 l 139 576 q 131 625 139 607 q 111 654 124 644 q 80 668 98 664 q 38 671 61 671 l 34 671 l 34 745 l 315 745 l 343 636 l 349 636 q 379 690 363 667 q 418 729 396 714 q 472 753 441 745 q 545 761 503 761 q 666 732 627 761 q 705 648 705 703 q 658 549 705 584 q 528 514 612 514 q 525 564 528 542 q 514 600 522 586 q 493 621 507 614 q 460 629 480 629 q 418 617 436 629 q 389 585 401 605 q 369 541 377 566 q 357 492 361 517 q 351 445 352 468 q 349 406 349 423 l 349 166 q 357 117 349 136 q 377 89 364 99 q 408 76 390 80 q 446 73 426 73 l 491 73 l 491 0 "},"ж":{"x_min":0,"x_max":1280,"ha":1280,"o":"m 440 73 l 442 73 q 475 76 458 73 q 507 89 493 80 q 532 116 522 99 q 542 164 542 134 l 542 351 q 503 348 520 351 q 473 335 487 345 q 446 309 459 326 q 417 263 433 292 l 347 132 q 297 62 324 88 q 236 22 270 36 q 159 4 202 8 q 58 0 115 0 l 0 0 l 0 73 l 4 73 q 45 77 27 73 q 79 91 63 81 q 110 120 95 101 q 141 166 124 138 l 218 297 q 257 350 236 328 q 299 385 277 371 q 343 407 320 400 q 388 417 366 415 q 366 438 377 427 q 343 464 355 449 q 316 499 331 479 q 284 546 302 519 q 250 593 265 573 q 222 626 235 613 q 196 645 208 639 q 172 651 184 651 q 125 632 141 651 q 103 580 108 612 q 71 588 86 582 q 45 606 56 595 q 27 633 33 618 q 21 668 21 649 q 26 699 21 684 q 46 726 32 715 q 83 745 60 738 q 140 753 105 753 q 211 741 181 753 q 264 710 240 730 q 307 660 287 689 q 351 594 328 631 q 407 508 385 541 q 445 458 429 475 q 482 435 461 442 q 542 428 503 428 l 542 580 q 532 628 542 610 q 507 655 522 645 q 475 668 493 664 q 442 671 458 671 l 440 671 l 440 745 l 833 745 l 833 671 l 830 671 q 800 668 816 671 q 770 655 784 664 q 748 628 756 645 q 739 580 739 610 l 739 428 q 798 435 777 428 q 834 458 819 442 q 873 508 851 475 q 929 594 894 541 q 972 660 952 631 q 1016 710 992 689 q 1069 741 1040 730 q 1139 753 1099 753 q 1197 745 1174 753 q 1234 726 1220 738 q 1253 699 1248 715 q 1259 668 1259 684 q 1252 633 1259 649 q 1234 606 1246 618 q 1208 588 1223 595 q 1177 580 1193 582 q 1155 632 1172 612 q 1107 651 1138 651 q 1083 645 1095 651 q 1058 626 1071 639 q 1029 593 1044 613 q 995 546 1014 573 q 963 499 977 519 q 937 464 950 479 q 914 438 925 449 q 891 417 903 427 q 936 407 914 415 q 981 385 959 400 q 1023 350 1002 371 q 1062 297 1044 328 l 1138 166 q 1170 120 1155 138 q 1200 91 1185 101 q 1234 77 1216 81 q 1275 73 1252 73 l 1280 73 l 1280 0 l 1221 0 q 1121 4 1164 0 q 1043 22 1077 8 q 983 62 1009 36 q 933 132 956 88 l 862 263 q 834 309 847 292 q 807 335 821 326 q 777 348 793 345 q 739 351 761 351 l 739 164 q 748 116 739 134 q 770 89 756 99 q 800 76 784 80 q 830 73 816 73 l 833 73 l 833 0 l 440 0 l 440 73 "},"Ø":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 341 21 429 -14 l 299 -56 l 201 -56 l 265 61 q 123 238 170 127 q 77 498 77 350 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 656 996 606 1007 q 752 967 707 986 l 795 1048 l 892 1048 l 827 927 q 967 752 919 862 q 1016 496 1016 642 m 310 496 q 319 340 310 410 q 350 219 329 271 l 692 858 q 630 901 666 886 q 548 916 594 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 m 782 496 q 773 651 782 583 q 744 773 763 720 l 401 133 q 464 90 428 104 q 547 76 500 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 "},"Ỳ":{"x_min":0.34375,"x_max":962.5625,"ha":962,"o":"m 228 0 l 228 73 l 293 73 q 324 75 310 73 q 350 86 339 77 q 367 111 361 94 q 374 157 374 128 l 374 351 l 117 844 q 97 879 106 865 q 77 902 88 893 q 52 914 66 910 q 18 918 39 918 l 0 918 l 0 992 l 465 992 l 465 918 l 441 918 q 379 901 399 918 q 358 856 358 884 q 364 817 358 838 q 379 779 371 797 l 482 575 q 518 496 504 530 q 543 430 532 462 q 576 510 557 467 q 618 600 595 553 l 698 766 q 718 817 713 797 q 722 850 722 838 q 699 902 722 886 q 630 918 677 918 l 599 918 l 599 992 l 962 992 l 962 918 l 936 918 q 905 913 918 918 q 882 897 893 909 q 859 863 871 884 q 831 810 847 842 l 595 349 l 595 159 q 601 112 595 129 q 617 86 607 95 q 642 75 628 77 q 672 73 656 73 l 740 73 l 740 0 l 228 0 m 521 1071 q 449 1118 489 1089 q 372 1175 409 1146 q 305 1233 335 1205 q 263 1278 275 1260 l 263 1293 l 480 1293 q 508 1242 491 1269 q 544 1187 525 1215 q 582 1134 562 1160 q 616 1089 601 1108 l 616 1071 l 521 1071 "},"÷":{"x_min":90,"x_max":687,"ha":777,"o":"m 311 759 q 316 799 311 782 q 332 825 322 815 q 357 839 343 835 q 388 844 371 844 q 418 839 404 844 q 443 825 432 835 q 459 799 453 815 q 466 759 466 782 q 459 719 466 736 q 443 693 453 703 q 418 678 432 683 q 388 674 404 674 q 333 693 355 674 q 311 759 311 712 m 311 233 q 316 273 311 257 q 332 299 322 290 q 357 314 343 309 q 388 318 371 318 q 418 314 404 318 q 443 299 432 309 q 459 273 453 290 q 466 233 466 257 q 459 194 466 210 q 443 167 453 178 q 418 153 432 157 q 388 149 404 149 q 333 167 355 149 q 311 233 311 186 m 687 446 l 90 446 l 90 546 l 687 546 l 687 446 "},"с":{"x_min":65,"x_max":681,"ha":732,"o":"m 409 -14 q 269 5 332 -14 q 160 70 206 25 q 90 189 115 116 q 65 369 65 262 q 91 557 65 481 q 163 677 117 632 q 271 742 208 723 q 405 762 333 762 q 524 750 472 762 q 610 719 575 739 q 663 673 645 700 q 681 616 681 646 q 673 572 681 593 q 645 534 665 551 q 590 508 625 518 q 501 498 555 498 q 496 566 501 534 q 482 623 492 599 q 454 662 472 648 q 410 677 437 677 q 356 662 380 677 q 314 612 332 648 q 288 518 297 577 q 279 370 279 459 q 317 159 279 229 q 444 89 356 89 q 511 98 480 89 q 569 121 543 106 q 614 157 594 137 q 645 202 633 178 q 670 174 662 192 q 679 138 679 157 q 663 85 679 112 q 614 35 647 57 q 531 0 581 13 q 409 -14 480 -14 "},"h":{"x_min":23.703125,"x_max":889.65625,"ha":926,"o":"m 581 0 l 581 456 q 575 536 581 501 q 556 595 569 571 q 521 631 543 618 q 470 643 500 643 q 412 626 435 643 q 375 579 389 608 q 356 510 362 549 q 349 429 349 471 l 349 164 q 357 117 349 134 q 377 89 364 99 q 408 76 389 79 q 450 73 427 73 l 454 73 l 454 0 l 27 0 l 27 73 l 30 73 q 73 76 54 73 q 108 90 93 80 q 130 119 122 100 q 139 169 139 138 l 139 897 q 129 941 139 924 q 104 967 119 958 q 72 979 89 976 q 39 981 54 981 l 23 981 l 23 1055 l 349 1055 l 349 826 q 348 768 349 799 q 344 710 346 736 q 339 649 341 679 l 351 649 q 395 711 372 688 q 445 744 418 733 q 501 758 471 755 q 563 762 530 762 q 659 746 616 762 q 731 698 701 730 q 776 615 760 665 q 792 494 792 564 l 792 172 q 797 120 792 139 q 815 90 803 101 q 844 77 826 80 q 885 73 861 73 l 889 73 l 889 0 l 581 0 "},"f":{"x_min":26.140625,"x_max":671,"ha":566,"o":"m 26 0 l 26 73 l 56 73 q 88 76 71 73 q 120 89 106 80 q 145 116 135 99 q 155 164 155 134 l 155 650 l 31 650 l 31 745 l 155 745 l 155 796 q 171 911 155 860 q 223 996 188 961 q 311 1049 258 1031 q 438 1068 365 1068 q 550 1060 506 1068 q 622 1038 595 1052 q 659 1006 648 1024 q 671 966 671 987 q 628 897 671 919 q 500 876 586 876 q 496 912 500 893 q 485 949 493 932 q 463 977 476 966 q 430 988 450 988 q 401 979 413 988 q 381 950 389 970 q 370 898 373 930 q 366 820 366 866 l 366 745 l 558 745 l 558 650 l 366 650 l 366 164 q 376 116 366 134 q 400 89 386 99 q 432 76 415 80 q 464 73 450 73 l 530 73 l 530 0 l 26 0 "},"“":{"x_min":78,"x_max":616.34375,"ha":679,"o":"m 368 719 q 381 805 368 763 q 424 882 395 846 q 501 945 454 917 q 616 992 548 973 l 616 920 q 563 898 586 909 q 525 874 540 887 q 501 847 509 862 q 494 811 494 831 q 501 789 494 797 q 520 774 509 781 q 545 758 532 766 q 569 739 557 751 q 588 708 581 727 q 596 662 596 690 q 567 591 596 615 q 495 567 538 567 q 402 607 436 567 q 368 719 368 648 m 78 719 q 91 805 78 763 q 134 882 105 846 q 211 945 164 917 q 326 992 258 973 l 326 920 q 273 898 295 909 q 235 874 250 887 q 211 847 219 862 q 204 811 204 831 q 211 789 204 797 q 230 774 219 781 q 255 758 242 766 q 279 739 267 751 q 298 708 291 727 q 306 662 306 690 q 277 591 306 615 q 205 567 248 567 q 112 607 146 567 q 78 719 78 648 "},"A":{"x_min":5.8125,"x_max":1046.21875,"ha":1046,"o":"m 303 326 l 262 206 q 251 167 257 189 q 245 127 245 144 q 251 103 245 113 q 265 87 256 93 q 285 77 274 80 q 308 73 296 73 l 367 73 l 367 0 l 5 0 l 5 73 l 22 73 q 56 77 41 73 q 84 93 71 82 q 109 124 98 104 q 134 175 121 143 l 435 992 l 625 992 l 916 173 q 937 125 926 144 q 961 94 948 105 q 989 78 975 83 q 1021 73 1004 73 l 1046 73 l 1046 0 l 587 0 l 587 73 l 642 73 q 663 76 652 73 q 682 86 673 80 q 696 103 690 92 q 701 127 701 113 q 697 160 701 144 q 689 187 693 175 l 640 326 l 303 326 m 539 639 q 524 689 532 662 q 508 742 516 715 q 493 796 500 769 q 481 847 486 823 q 467 801 475 826 q 449 749 458 776 q 431 696 440 723 q 414 645 422 670 l 332 411 l 612 411 l 539 639 "},"O":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 340 22 428 -14 q 193 126 251 59 q 106 288 135 193 q 77 498 77 382 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 748 970 661 1007 q 894 867 835 934 q 985 706 954 800 q 1016 496 1016 612 m 310 496 q 323 319 310 397 q 364 187 336 241 q 437 104 392 133 q 547 76 482 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 q 770 674 782 596 q 729 806 757 752 q 657 888 702 860 q 548 916 612 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 "},"Đ":{"x_min":38.453125,"x_max":988,"ha":1065,"o":"m 988 514 q 956 305 988 400 q 863 143 925 211 q 709 37 801 75 q 496 0 617 0 l 38 0 l 38 73 l 96 73 q 125 76 112 73 q 147 89 138 80 q 162 116 157 99 q 168 164 168 134 l 168 476 l 52 476 l 52 561 l 168 561 l 168 833 q 162 878 168 861 q 147 903 157 894 q 124 915 137 912 q 96 918 111 918 l 38 918 l 38 992 l 496 992 q 703 961 611 992 q 857 871 794 931 q 954 721 920 811 q 988 514 988 632 m 753 514 q 680 810 753 713 q 466 907 607 907 l 387 907 l 387 561 l 560 561 l 560 476 l 387 476 l 387 86 l 464 86 q 590 115 536 86 q 680 200 644 145 q 735 335 716 256 q 753 514 753 414 "},"3":{"x_min":39,"x_max":713,"ha":777,"o":"m 338 -14 q 202 0 259 -14 q 109 36 146 13 q 56 89 73 59 q 39 152 39 119 q 48 198 39 178 q 74 233 57 219 q 111 253 90 247 q 157 260 133 260 q 169 183 157 216 q 204 127 182 150 q 258 94 226 105 q 327 82 289 82 q 392 92 361 82 q 447 125 423 101 q 484 187 470 148 q 498 287 498 227 q 484 360 498 327 q 443 417 470 393 q 376 455 416 441 q 284 468 336 468 l 198 468 l 198 555 l 289 555 q 367 569 334 555 q 422 611 400 584 q 454 676 444 638 q 465 759 465 714 q 436 878 465 835 q 350 921 407 921 q 289 902 313 921 q 253 854 266 884 q 235 784 240 823 q 230 705 230 746 q 97 735 144 705 q 50 829 50 765 q 69 898 50 866 q 127 954 89 930 q 223 992 166 978 q 357 1006 281 1006 q 490 991 431 1006 q 591 946 549 976 q 655 875 633 917 q 678 779 678 833 q 661 692 678 732 q 616 622 645 653 q 549 567 588 591 q 465 528 511 544 q 551 504 507 521 q 631 459 595 487 q 689 388 666 430 q 713 285 713 345 q 681 143 713 200 q 597 50 649 85 q 477 0 544 15 q 338 -14 409 -14 "},"Ǿ":{"x_min":77,"x_max":1016,"ha":1093,"o":"m 1016 496 q 985 287 1016 382 q 894 126 954 193 q 747 22 834 59 q 547 -14 660 -14 q 341 21 429 -14 l 299 -56 l 201 -56 l 265 61 q 123 238 170 127 q 77 498 77 350 q 106 707 77 613 q 193 867 135 801 q 340 970 252 934 q 548 1007 429 1007 q 656 996 606 1007 q 752 967 707 986 l 795 1048 l 892 1048 l 827 927 q 967 752 919 862 q 1016 496 1016 642 m 310 496 q 319 340 310 410 q 350 219 329 271 l 692 858 q 630 901 666 886 q 548 916 594 916 q 438 888 483 916 q 364 806 392 860 q 323 674 336 752 q 310 496 310 596 m 782 496 q 773 651 782 583 q 744 773 763 720 l 401 133 q 464 90 428 104 q 547 76 500 76 q 657 104 612 76 q 729 187 702 133 q 770 319 757 241 q 782 496 782 397 m 452 1089 q 485 1134 466 1108 q 522 1187 503 1160 q 558 1242 541 1215 q 585 1293 574 1269 l 804 1293 l 804 1278 q 761 1233 791 1260 q 694 1175 731 1205 q 618 1118 657 1146 q 546 1071 578 1089 l 452 1071 l 452 1089 "},"⅛":{"x_min":31.015625,"x_max":1134,"ha":1167,"o":"m 324 999 l 324 512 q 329 484 324 495 q 343 468 334 474 q 363 461 351 463 q 388 460 375 460 l 445 460 l 445 399 l 53 399 l 53 460 l 123 460 q 148 461 137 460 q 168 468 159 463 q 182 484 177 474 q 187 512 187 495 l 187 906 q 129 844 154 868 q 78 821 103 821 q 44 840 58 821 q 31 889 31 860 q 86 909 56 895 q 159 952 117 923 l 221 999 l 324 999 m 388 0 l 280 0 l 775 992 l 883 992 l 388 0 m 651 152 q 662 202 651 181 q 692 240 673 223 q 738 270 712 257 q 793 294 764 283 q 747 322 769 306 q 709 357 725 337 q 682 402 692 377 q 673 457 673 427 q 685 511 673 484 q 724 559 697 537 q 794 593 751 580 q 900 607 838 607 q 987 597 948 607 q 1053 569 1026 588 q 1095 525 1080 551 q 1110 466 1110 499 q 1100 420 1110 441 q 1074 382 1091 399 q 1036 351 1058 364 q 990 327 1015 337 q 1051 296 1024 312 q 1096 260 1077 280 q 1124 215 1114 240 q 1134 158 1134 190 q 1118 92 1134 122 q 1072 38 1103 61 q 995 2 1041 15 q 887 -10 949 -10 q 784 2 828 -10 q 710 37 739 15 q 665 89 680 59 q 651 152 651 118 m 895 51 q 966 72 940 51 q 992 137 992 93 q 984 176 992 159 q 959 208 975 194 q 919 235 943 222 q 862 261 894 248 q 812 215 832 243 q 792 147 792 187 q 818 78 792 105 q 895 51 844 51 m 961 463 q 957 495 961 480 q 943 521 952 510 q 921 539 935 532 q 891 545 908 545 q 839 525 856 545 q 821 470 821 505 q 829 431 821 447 q 849 401 837 414 q 878 379 862 388 q 910 362 894 370 q 947 400 933 377 q 961 463 961 423 "},"4":{"x_min":18,"x_max":750.453125,"ha":777,"o":"m 606 258 l 606 173 q 615 121 606 141 q 639 91 624 101 q 675 77 654 80 q 719 73 696 73 l 737 73 l 737 0 l 250 0 l 250 73 l 289 73 q 333 77 313 73 q 369 91 354 80 q 394 121 384 101 q 403 173 403 141 l 403 258 l 18 258 l 18 343 l 412 992 l 606 992 l 606 350 l 750 350 l 750 258 l 606 258 m 403 593 q 405 724 403 654 q 412 860 407 795 q 390 815 405 844 q 359 756 376 787 q 326 699 342 726 q 302 660 310 673 l 114 350 l 403 350 l 403 593 "},"Ẁ":{"x_min":0.34375,"x_max":1481.578125,"ha":1482,"o":"m 838 982 l 1030 451 q 1053 385 1042 419 q 1072 321 1063 352 q 1088 265 1081 290 q 1098 221 1095 239 q 1110 276 1103 246 q 1123 340 1116 307 q 1138 409 1130 374 q 1154 478 1145 445 l 1227 778 q 1231 797 1229 786 q 1236 818 1234 808 q 1239 838 1238 829 q 1240 852 1240 847 q 1218 903 1240 888 q 1151 918 1197 918 l 1119 918 l 1119 992 l 1481 992 l 1481 918 l 1455 918 q 1419 914 1434 918 q 1391 898 1403 910 q 1369 865 1379 886 q 1350 810 1359 844 l 1134 0 l 976 0 l 743 652 l 543 0 l 371 0 l 117 844 q 102 880 110 866 q 81 903 93 895 q 54 915 69 911 q 18 918 39 918 l 0 918 l 0 992 l 464 992 l 464 918 l 432 918 q 369 902 390 918 q 348 851 348 886 q 353 817 348 840 q 363 776 357 795 l 455 455 q 471 398 463 429 q 487 336 480 367 q 501 275 495 304 q 510 223 507 246 q 530 307 519 268 q 554 387 542 346 l 737 982 l 838 982 m 781 1071 q 709 1118 749 1089 q 632 1175 669 1146 q 565 1233 595 1205 q 523 1278 535 1260 l 523 1293 l 740 1293 q 768 1242 751 1269 q 804 1187 785 1215 q 842 1134 822 1160 q 876 1089 861 1108 l 876 1071 l 781 1071 "},"Ť":{"x_min":13,"x_max":893,"ha":907,"o":"m 563 164 q 568 116 563 134 q 584 89 574 99 q 606 76 593 80 q 634 73 619 73 l 692 73 l 692 0 l 213 0 l 213 73 l 271 73 q 300 76 287 73 q 322 89 313 80 q 337 116 332 99 q 343 164 343 134 l 343 907 l 231 907 q 179 900 200 907 q 144 881 158 893 q 125 850 131 868 q 116 809 118 832 l 106 723 l 13 723 l 20 992 l 886 992 l 893 723 l 800 723 l 789 809 q 780 850 787 832 q 761 881 774 868 q 726 900 747 893 q 674 907 705 907 l 563 907 l 563 164 m 207 1293 l 303 1293 q 336 1265 317 1281 q 376 1233 356 1250 q 417 1199 397 1215 q 453 1167 437 1182 q 488 1199 468 1182 q 529 1233 508 1215 q 570 1265 550 1250 q 604 1293 590 1281 l 700 1293 l 700 1274 q 662 1229 683 1255 q 618 1176 640 1203 q 577 1121 596 1148 q 547 1071 558 1094 l 360 1071 q 330 1121 349 1094 q 289 1176 310 1148 q 245 1229 267 1203 q 207 1274 223 1255 l 207 1293 "},"ψ":{"x_min":37.6875,"x_max":933,"ha":997,"o":"m 933 434 q 916 281 933 356 q 861 147 899 207 q 761 45 823 87 q 607 -8 698 4 l 607 -334 l 524 -334 l 524 -14 q 358 9 431 -13 q 236 76 285 32 q 160 185 186 120 q 134 334 134 250 l 134 586 q 127 630 134 614 q 109 656 121 647 q 80 668 98 665 q 37 671 62 671 l 37 745 l 343 745 l 343 323 q 385 162 343 220 q 524 92 427 105 l 524 1055 l 607 1055 l 607 91 q 702 119 660 95 q 773 183 744 144 q 817 277 802 223 q 831 396 831 331 q 820 505 831 460 q 790 580 808 551 q 752 627 772 610 q 715 650 732 643 q 720 691 715 671 q 735 724 725 710 q 760 747 745 739 q 796 756 775 756 q 850 730 825 756 q 894 660 876 704 q 922 558 912 616 q 933 434 933 500 "},"ŗ":{"x_min":27.78125,"x_max":705,"ha":726,"o":"m 491 0 l 27 0 l 27 73 l 31 73 q 75 77 55 73 q 109 91 94 80 q 131 121 123 101 q 139 173 139 141 l 139 576 q 131 625 139 607 q 111 654 124 644 q 80 668 98 664 q 38 671 61 671 l 34 671 l 34 745 l 315 745 l 343 636 l 349 636 q 379 690 363 667 q 418 729 396 714 q 472 753 441 745 q 545 761 503 761 q 666 732 627 761 q 705 648 705 703 q 658 549 705 584 q 528 514 612 514 q 525 564 528 542 q 514 600 522 586 q 493 621 507 614 q 460 629 480 629 q 418 617 436 629 q 389 585 401 605 q 369 541 377 566 q 357 492 361 517 q 351 445 352 468 q 349 406 349 423 l 349 166 q 357 117 349 136 q 377 89 364 99 q 408 76 390 80 q 446 73 426 73 l 491 73 l 491 0 m 127 -289 q 141 -242 133 -268 q 157 -189 149 -216 q 171 -134 164 -161 q 181 -85 177 -108 l 343 -85 l 343 -98 q 318 -147 333 -120 q 284 -202 302 -174 q 247 -257 266 -230 q 210 -307 228 -285 l 127 -307 l 127 -289 "}},"cssFontWeight":"bold","ascender":1290,"underlinePosition":-154,"cssFontStyle":"normal","boundingBox":{"yMin":-387,"xMin":-289.125,"yMax":1359,"xMax":1773},"resolution":1000,"original_font_information":{"postscript_name":"DroidSerif-Bold","version_string":"Version 1.00 build 107","vendor_url":"http://www.ascendercorp.com/","full_font_name":"Droid Serif Bold","font_family_name":"Droid Serif","copyright":"Digitized data copyright © 2006, Google Corporation.","description":"","trademark":"Droid is a trademark of Google and may be registered in certain jurisdictions.","designer":"","designer_url":"http://www.ascendercorp.com/typedesigners.html","unique_font_identifier":"Ascender - Droid Serif Bold","license_url":"http://ascendercorp.com/eula10.html","license_description":"This font software is the valuable property of Ascender Corporation and/or its suppliers and its use by you is covered under the terms of a license agreement. This font software is licensed to you by Ascender Corporation for your personal or business use on up to five personal computers. You may not use this font software on more than five personal computers unless you have obtained a license from Ascender to do so. Except as specifically permitted by the license, you may not copy this font software.\n\nIf you have any questions, please review the license agreement you received with this font software, and/or contact Ascender Corporation. \n\nContact Information:\nAscender Corporation\nWeb http://www.ascendercorp.com/","manufacturer_name":"Ascender Corporation","font_sub_family_name":"Bold"},"descender":-328,"familyName":"Droid Serif","lineHeight":1617,"underlineThickness":102} \ No newline at end of file diff --git a/node_modules/three/examples/fonts/droid/droid_serif_regular.typeface.json b/node_modules/three/examples/fonts/droid/droid_serif_regular.typeface.json new file mode 100644 index 0000000..90281d6 --- /dev/null +++ b/node_modules/three/examples/fonts/droid/droid_serif_regular.typeface.json @@ -0,0 +1 @@ +{"glyphs":{"ǻ":{"x_min":69,"x_max":722.203125,"ha":782,"o":"m 323 1166 q 355 1203 338 1182 q 387 1246 371 1224 q 418 1290 403 1268 q 443 1331 432 1311 l 592 1331 l 592 1320 q 554 1283 579 1305 q 498 1236 528 1261 q 435 1190 468 1212 q 375 1153 403 1167 l 323 1153 l 323 1166 m 203 200 q 231 103 203 135 q 316 71 258 71 q 392 84 358 71 q 451 123 427 98 q 488 184 475 148 q 501 263 501 219 l 501 375 l 412 371 q 313 357 353 368 q 249 324 273 345 q 214 271 225 302 q 203 200 203 240 m 372 688 q 307 677 331 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 200 727 166 711 q 280 750 234 743 q 377 758 325 758 q 488 745 441 758 q 568 704 536 732 q 616 630 600 675 q 632 518 632 584 l 632 157 q 636 109 632 128 q 651 79 641 90 q 678 63 661 67 q 718 58 695 58 l 722 58 l 722 0 l 534 0 l 512 118 l 501 118 q 459 65 479 89 q 414 23 438 40 q 358 -4 389 5 q 284 -14 328 -14 q 198 0 238 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 147 371 69 318 q 385 429 226 425 l 501 434 l 501 517 q 497 586 501 554 q 479 640 492 618 q 440 676 465 663 q 372 688 414 688 m 555 961 q 542 896 555 924 q 506 848 529 867 q 453 819 484 829 q 388 810 423 810 q 323 819 353 810 q 270 848 292 829 q 234 896 247 867 q 222 961 222 924 q 234 1026 222 998 q 270 1073 247 1054 q 323 1102 292 1092 q 388 1112 353 1112 q 453 1102 423 1112 q 506 1073 484 1092 q 542 1026 529 1054 q 555 961 555 998 m 479 961 q 472 999 479 983 q 452 1024 464 1015 q 423 1039 440 1034 q 388 1044 407 1044 q 353 1039 369 1044 q 324 1024 337 1034 q 304 999 312 1015 q 297 961 297 983 q 304 922 297 938 q 324 897 312 906 q 353 882 337 887 q 388 877 369 877 q 423 882 407 877 q 452 897 440 887 q 472 922 464 906 q 479 961 479 938 "},"Á":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 m 432 1089 q 464 1134 447 1108 q 496 1187 480 1160 q 527 1242 512 1215 q 552 1293 541 1269 l 701 1293 l 701 1278 q 663 1233 688 1260 q 607 1175 637 1205 q 544 1118 577 1146 q 484 1071 512 1089 l 432 1071 l 432 1089 "},"ĥ":{"x_min":25.203125,"x_max":843.234375,"ha":882,"o":"m 398 58 l 398 0 l 25 0 l 25 58 l 36 58 q 80 61 59 58 q 116 75 101 65 q 140 105 131 86 q 150 158 150 125 l 150 902 q 140 951 150 932 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 25 996 l 25 1055 l 280 1055 l 280 749 q 280 710 280 730 q 278 671 279 689 q 275 631 276 651 l 282 631 q 486 758 344 758 q 591 742 545 758 q 668 693 637 726 q 715 608 699 660 q 732 486 732 557 l 732 157 q 740 105 732 125 q 762 75 748 86 q 796 61 776 65 q 839 58 816 58 l 843 58 l 843 0 l 601 0 l 601 479 q 592 560 601 524 q 566 619 584 595 q 519 656 548 644 q 448 669 490 669 q 373 653 405 669 q 321 607 342 637 q 291 536 301 578 q 280 444 280 494 l 280 151 q 290 102 280 120 q 314 73 299 83 q 351 61 330 64 q 394 58 371 58 l 398 58 m 225 1127 q 260 1172 241 1146 q 300 1225 280 1198 q 336 1280 319 1253 q 364 1331 353 1307 l 495 1331 q 523 1280 506 1307 q 559 1225 540 1253 q 599 1172 579 1198 q 635 1127 618 1146 l 635 1109 l 580 1109 q 500 1166 540 1131 q 429 1233 460 1200 q 358 1166 397 1200 q 279 1109 318 1131 l 225 1109 l 225 1127 "},"Κ":{"x_min":52.421875,"x_max":989,"ha":973,"o":"m 612 771 q 649 817 634 797 q 673 853 664 837 q 685 882 681 869 q 689 904 689 894 q 672 928 689 922 q 620 935 655 935 l 620 992 l 928 992 l 928 935 q 882 925 904 935 q 838 900 860 916 q 792 859 815 883 q 741 804 769 835 l 540 578 l 833 169 q 910 86 873 114 q 986 58 947 58 l 989 58 l 989 0 l 974 0 q 859 5 904 0 q 783 25 814 10 q 730 63 753 39 q 682 124 707 87 l 442 468 l 324 372 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 441 l 612 771 "},"»":{"x_min":90,"x_max":622.75,"ha":714,"o":"m 622 352 l 410 111 l 341 111 l 481 375 l 341 639 l 410 639 l 622 397 l 622 352 m 371 352 l 159 111 l 90 111 l 230 375 l 90 639 l 159 639 l 371 397 l 371 352 "},"∆":{"x_min":43,"x_max":801,"ha":844,"o":"m 801 0 l 43 0 l 43 72 l 368 992 l 488 992 l 801 82 l 801 0 m 647 91 l 468 637 q 428 756 447 699 q 398 864 410 814 q 373 764 388 814 q 335 649 358 714 l 139 91 l 647 91 "},"ў":{"x_min":5,"x_max":785,"ha":785,"o":"m 785 745 l 785 686 l 780 686 q 746 682 760 686 q 719 665 731 677 q 697 632 707 653 q 675 578 687 611 l 463 -5 q 417 -123 439 -72 q 372 -210 396 -174 q 320 -270 348 -247 q 256 -308 292 -294 q 173 -328 220 -323 q 65 -334 126 -334 l 52 -334 l 52 -264 q 174 -244 123 -264 q 262 -187 225 -223 q 323 -101 299 -150 q 365 5 348 -52 l 108 612 q 89 648 98 634 q 69 671 80 662 q 44 683 58 679 q 9 686 29 686 l 5 686 l 5 745 l 338 745 l 338 686 l 334 686 q 271 670 292 686 q 251 619 251 654 q 253 596 251 607 q 262 568 255 584 l 364 320 q 384 269 373 297 q 403 213 394 240 q 420 161 412 185 q 430 119 427 137 l 434 119 q 455 193 442 149 q 486 287 468 237 l 579 558 q 588 590 585 575 q 591 618 591 606 q 568 670 591 654 q 500 686 546 686 l 496 686 l 496 745 l 785 745 m 659 1030 q 638 953 654 987 q 590 893 621 918 q 510 855 558 869 q 394 842 462 842 q 277 854 325 842 q 200 892 229 867 q 156 951 170 916 q 139 1030 142 986 l 254 1030 q 266 969 257 993 q 293 933 276 946 q 335 914 310 920 q 397 909 361 909 q 452 915 427 909 q 495 935 477 922 q 525 972 513 949 q 540 1030 536 995 l 659 1030 "},"ţ":{"x_min":26.203125,"x_max":457.546875,"ha":489,"o":"m 368 55 q 414 57 393 55 q 457 64 435 60 l 457 6 q 434 -1 448 2 q 403 -7 420 -5 q 368 -12 387 -10 q 334 -14 350 -14 q 243 -2 281 -14 q 180 33 204 8 q 143 100 155 58 q 132 201 132 141 l 132 665 l 26 665 l 26 721 q 81 731 51 721 q 134 765 111 741 q 173 826 158 791 q 198 916 187 862 l 262 916 l 262 745 l 444 745 l 444 665 l 262 665 l 262 193 q 291 88 262 122 q 368 55 320 55 m 181 -288 q 203 -188 192 -242 q 223 -85 214 -135 l 344 -85 l 344 -98 q 320 -147 334 -120 q 291 -202 307 -174 q 259 -258 275 -231 q 228 -307 242 -285 l 181 -307 l 181 -288 "},"«":{"x_min":91.25,"x_max":624,"ha":714,"o":"m 91 397 l 303 639 l 373 639 l 233 375 l 373 111 l 303 111 l 91 352 l 91 397 m 342 397 l 554 639 l 624 639 l 484 375 l 624 111 l 554 111 l 342 352 l 342 397 "},"í":{"x_min":31.75,"x_max":432,"ha":444,"o":"m 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 294 745 l 294 158 q 304 105 294 125 q 328 75 313 86 q 364 61 343 65 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 m 163 860 q 195 905 178 879 q 227 958 211 931 q 258 1013 243 986 q 283 1064 272 1040 l 432 1064 l 432 1049 q 394 1004 419 1031 q 338 946 368 976 q 275 889 308 917 q 215 842 243 860 l 163 842 l 163 860 "},"ņ":{"x_min":38.53125,"x_max":857.234375,"ha":896,"o":"m 412 58 l 412 0 l 38 0 l 38 58 l 50 58 q 94 61 73 58 q 130 75 115 65 q 154 105 145 86 q 164 158 164 125 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 271 745 l 289 631 l 296 631 q 341 695 317 670 q 392 733 366 720 q 449 752 419 747 q 513 758 479 758 q 610 742 567 758 q 684 693 653 726 q 730 608 714 660 q 746 486 746 557 l 746 157 q 753 105 746 125 q 775 75 761 86 q 809 61 790 65 q 852 58 829 58 l 857 58 l 857 0 l 615 0 l 615 479 q 606 560 615 524 q 580 619 598 595 q 533 656 562 644 q 462 669 504 669 q 383 650 415 669 q 331 601 351 632 q 303 529 311 570 q 294 444 294 488 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 412 58 m 368 -288 q 390 -188 379 -242 q 410 -85 401 -135 l 531 -85 l 531 -98 q 507 -147 521 -120 q 478 -202 494 -174 q 446 -258 462 -231 q 415 -307 429 -285 l 368 -307 l 368 -288 "},"µ":{"x_min":119.046875,"x_max":796.234375,"ha":855,"o":"m 385 -14 q 285 7 327 -14 q 216 67 244 28 q 221 -39 217 9 q 235 -124 224 -87 q 268 -183 246 -161 q 329 -212 290 -206 q 323 -261 329 -239 q 305 -299 317 -283 q 275 -324 293 -315 q 232 -334 257 -334 q 189 -325 210 -334 q 153 -298 169 -317 q 128 -247 138 -279 q 119 -168 119 -215 q 121 -79 119 -127 q 126 26 123 -31 q 132 155 129 84 q 136 312 135 225 l 136 745 l 266 745 l 266 277 q 273 195 266 232 q 296 130 280 157 q 338 89 312 104 q 405 74 365 74 q 475 91 444 74 q 527 136 506 107 q 561 207 549 166 q 573 299 573 249 l 573 745 l 704 745 l 704 179 q 712 125 704 148 q 732 88 720 103 q 760 65 745 73 q 791 58 776 58 l 796 58 l 796 0 l 720 0 q 631 28 663 0 q 585 111 598 56 l 579 111 q 545 60 563 83 q 503 21 526 37 q 450 -4 479 4 q 385 -14 422 -14 "},"ỳ":{"x_min":5,"x_max":785,"ha":785,"o":"m 785 745 l 785 686 l 780 686 q 746 682 760 686 q 719 665 731 677 q 697 632 707 653 q 675 578 687 611 l 463 -5 q 417 -123 439 -72 q 372 -210 396 -174 q 320 -270 348 -247 q 256 -308 292 -294 q 173 -328 220 -323 q 65 -334 126 -334 l 52 -334 l 52 -264 q 174 -244 123 -264 q 262 -187 225 -223 q 323 -101 299 -150 q 365 5 348 -52 l 108 612 q 89 648 98 634 q 69 671 80 662 q 44 683 58 679 q 9 686 29 686 l 5 686 l 5 745 l 338 745 l 338 686 l 334 686 q 271 670 292 686 q 251 619 251 654 q 253 596 251 607 q 262 568 255 584 l 364 320 q 384 269 373 297 q 403 213 394 240 q 420 161 412 185 q 430 119 427 137 l 434 119 q 455 193 442 149 q 486 287 468 237 l 579 558 q 588 590 585 575 q 591 618 591 606 q 568 670 591 654 q 500 686 546 686 l 496 686 l 496 745 l 785 745 m 467 842 l 414 842 q 353 889 386 860 q 290 946 321 917 q 234 1004 260 976 q 197 1049 209 1031 l 197 1064 l 345 1064 q 371 1013 356 1040 q 401 958 385 986 q 435 905 418 931 q 467 860 452 879 l 467 842 "},"Ι":{"x_min":52.421875,"x_max":456.640625,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 "},"Ύ":{"x_min":-46,"x_max":1042,"ha":1038,"o":"m 391 0 l 391 58 l 423 58 q 466 61 446 58 q 503 73 487 64 q 527 102 518 83 q 537 151 537 120 l 537 413 l 279 860 q 257 893 268 880 q 236 916 247 907 q 211 929 225 925 q 180 933 198 933 l 163 933 l 163 992 l 544 992 l 544 933 l 493 933 q 462 930 474 933 q 443 920 450 926 q 434 906 437 914 q 432 889 432 898 q 440 850 432 869 q 457 815 449 830 l 559 629 q 601 545 584 586 q 629 470 618 503 q 645 504 636 485 q 665 543 654 522 q 688 585 676 563 q 713 629 701 607 l 801 789 q 821 834 815 812 q 827 872 827 855 q 805 918 827 903 q 743 933 783 933 l 702 933 l 702 992 l 1042 992 l 1042 933 l 1025 933 q 997 928 1010 933 q 970 910 984 923 q 942 877 957 898 q 910 825 928 857 l 677 413 l 677 158 q 686 105 677 125 q 710 75 695 86 q 746 61 726 65 q 790 58 767 58 l 823 58 l 823 0 l 391 0 m -46 789 q -29 833 -37 807 q -13 887 -20 859 q 1 942 -5 915 q 11 993 7 970 l 136 993 l 136 978 q 116 935 131 962 q 82 878 102 908 q 39 819 61 848 q 0 771 17 790 l -46 771 l -46 789 "},"ѕ":{"x_min":62,"x_max":566,"ha":627,"o":"m 291 -14 q 196 -4 239 -14 q 124 22 154 4 q 78 69 94 41 q 62 133 62 96 q 71 179 62 161 q 93 209 80 198 q 122 224 106 220 q 149 229 137 229 q 156 160 149 192 q 180 104 163 128 q 223 66 196 80 q 290 52 251 52 q 352 61 325 52 q 397 87 379 70 q 425 127 415 104 q 435 178 435 150 q 427 223 435 204 q 401 258 420 241 q 351 291 383 274 q 272 330 320 308 q 183 375 221 353 q 121 423 145 397 q 84 482 96 449 q 72 560 72 515 q 90 645 72 608 q 143 706 109 681 q 226 744 178 731 q 334 757 274 757 q 421 746 383 757 q 485 719 459 736 q 524 678 511 702 q 537 629 537 655 q 510 568 537 591 q 436 546 484 546 q 409 658 436 618 q 325 698 383 698 q 269 690 292 698 q 231 665 246 681 q 209 628 216 650 q 202 581 202 607 q 211 536 202 555 q 240 500 220 516 q 291 468 260 484 q 367 434 323 453 q 456 389 419 411 q 518 340 494 366 q 554 280 542 313 q 566 203 566 247 q 546 108 566 149 q 490 40 526 68 q 404 0 454 13 q 291 -14 353 -14 "},"Ш":{"x_min":52.421875,"x_max":1446.25,"ha":1499,"o":"m 1173 69 l 1173 833 q 1164 886 1173 866 q 1140 916 1155 905 q 1104 930 1124 926 q 1059 933 1083 933 l 1041 933 l 1041 992 l 1446 992 l 1446 933 l 1427 933 q 1383 930 1404 933 q 1347 916 1362 926 q 1323 886 1332 905 q 1314 833 1314 866 l 1314 152 q 1323 103 1314 122 q 1347 74 1332 84 q 1384 61 1363 64 q 1427 58 1404 58 l 1446 58 l 1446 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 74 134 64 q 174 103 165 84 q 184 152 184 122 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 69 l 678 69 l 678 839 q 670 886 678 867 q 648 915 662 904 q 616 929 634 925 q 578 933 598 933 l 574 933 l 574 992 l 922 992 l 922 933 l 918 933 q 879 929 897 933 q 847 914 860 925 q 826 883 833 903 q 818 833 818 864 l 818 69 l 1173 69 "},"M":{"x_min":52.421875,"x_max":1250.578125,"ha":1303,"o":"m 874 0 l 874 58 l 878 58 q 919 61 901 58 q 949 73 937 64 q 969 100 962 82 q 978 145 977 117 l 978 888 l 663 0 l 588 0 l 268 885 l 268 158 q 275 105 268 125 q 295 75 282 86 q 327 61 308 65 q 369 58 346 58 l 373 58 l 373 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 368 992 l 653 197 l 936 992 l 1250 992 l 1250 933 l 1232 933 q 1188 930 1209 933 q 1152 916 1167 926 q 1127 886 1136 905 q 1119 833 1119 866 l 1119 158 q 1127 105 1119 125 q 1152 75 1136 86 q 1188 61 1167 65 q 1232 58 1209 58 l 1250 58 l 1250 0 l 874 0 "},"Ψ":{"x_min":17.0625,"x_max":1132.9375,"ha":1150,"o":"m 647 415 l 678 415 q 777 429 738 415 q 839 475 816 444 q 870 553 861 506 q 878 666 878 601 l 878 992 l 1132 992 l 1132 933 q 1088 930 1109 933 q 1052 916 1067 926 q 1028 886 1037 905 q 1019 833 1019 866 l 1019 661 q 1013 580 1019 620 q 994 506 1008 541 q 957 441 980 470 q 897 391 933 412 q 810 357 860 369 q 692 346 760 346 l 647 346 l 647 158 q 656 105 647 125 q 680 75 665 86 q 717 61 696 65 q 761 58 738 58 l 779 58 l 779 0 l 374 0 l 374 58 l 393 58 q 437 61 416 58 q 473 75 458 65 q 497 105 488 86 q 507 158 507 125 l 507 346 l 461 346 q 341 357 392 346 q 253 391 290 369 q 193 441 216 412 q 155 506 169 470 q 136 580 141 541 q 131 661 131 620 l 131 833 q 121 886 131 866 q 97 916 112 905 q 61 930 82 926 q 17 933 40 933 l 17 992 l 271 992 l 271 666 q 280 553 271 601 q 311 475 288 506 q 373 429 334 444 q 475 415 413 415 l 507 415 l 507 834 q 497 886 507 867 q 473 916 488 906 q 437 930 458 926 q 393 933 416 933 l 374 933 l 374 992 l 779 992 l 779 933 l 761 933 q 717 930 738 933 q 680 916 696 926 q 656 886 665 906 q 647 834 647 867 l 647 415 "},"ũ":{"x_min":31.984375,"x_max":850.015625,"ha":882,"o":"m 732 151 q 741 102 732 120 q 765 73 750 83 q 802 61 781 64 q 845 58 822 58 l 850 58 l 850 0 l 629 0 l 611 112 l 604 112 q 558 48 583 72 q 504 10 532 24 q 444 -8 475 -3 q 379 -14 413 -14 q 281 1 324 -14 q 209 50 238 17 q 165 135 180 83 q 150 258 150 186 l 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 l 280 264 q 288 184 280 219 q 311 124 295 148 q 356 87 328 99 q 426 74 384 74 q 505 91 472 74 q 559 136 538 107 q 590 207 580 166 q 601 299 601 249 l 601 586 q 591 638 601 618 q 567 669 582 658 q 531 683 552 679 q 487 686 510 686 l 483 686 l 483 745 l 732 745 l 732 151 m 547 932 q 580 938 568 932 q 600 954 593 944 q 610 978 607 965 q 615 1006 613 991 l 678 1006 q 666 944 675 974 q 640 892 657 915 q 596 855 622 869 q 532 842 569 842 q 464 855 495 842 q 408 885 434 869 q 359 916 382 902 q 314 929 337 929 q 281 923 293 929 q 262 907 269 917 q 251 883 255 897 q 246 856 248 870 l 184 856 q 195 917 186 887 q 222 969 204 946 q 267 1006 240 992 q 331 1020 293 1020 q 398 1006 368 1020 q 454 976 428 992 q 503 945 480 959 q 547 932 526 932 "},"ŭ":{"x_min":31.984375,"x_max":850.015625,"ha":882,"o":"m 732 151 q 741 102 732 120 q 765 73 750 83 q 802 61 781 64 q 845 58 822 58 l 850 58 l 850 0 l 629 0 l 611 112 l 604 112 q 558 48 583 72 q 504 10 532 24 q 444 -8 475 -3 q 379 -14 413 -14 q 281 1 324 -14 q 209 50 238 17 q 165 135 180 83 q 150 258 150 186 l 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 l 280 264 q 288 184 280 219 q 311 124 295 148 q 356 87 328 99 q 426 74 384 74 q 505 91 472 74 q 559 136 538 107 q 590 207 580 166 q 601 299 601 249 l 601 586 q 591 638 601 618 q 567 669 582 658 q 531 683 552 679 q 487 686 510 686 l 483 686 l 483 745 l 732 745 l 732 151 m 431 842 q 345 857 382 842 q 285 898 309 872 q 250 958 262 924 q 237 1033 238 993 l 300 1033 q 346 959 312 981 q 431 937 380 937 q 516 959 482 937 q 561 1033 550 981 l 626 1033 q 612 958 624 993 q 576 898 600 924 q 516 857 552 872 q 431 842 480 842 "},"―":{"x_min":-7,"x_max":1396,"ha":1389,"o":"m 1396 331 l -7 331 l -7 414 l 1396 414 l 1396 331 "},"{":{"x_min":69,"x_max":525,"ha":595,"o":"m 433 -178 q 346 -163 384 -178 q 283 -123 309 -149 q 245 -61 258 -98 q 233 21 233 -24 l 233 263 q 220 333 233 305 q 185 377 207 361 q 133 401 163 394 q 69 410 103 408 l 69 469 q 133 477 103 470 q 185 500 163 483 q 220 544 207 517 q 233 614 233 572 l 233 856 q 283 1003 233 951 q 433 1055 334 1055 l 525 1055 l 525 996 l 483 996 q 395 959 421 996 q 369 849 369 922 l 369 612 q 331 498 369 544 q 214 440 292 453 l 214 439 q 332 381 294 425 q 369 267 369 336 l 369 26 q 395 -81 369 -44 q 483 -119 421 -119 l 525 -119 l 525 -178 l 433 -178 "},"¼":{"x_min":32.453125,"x_max":1133.921875,"ha":1167,"o":"m 40 399 l 40 454 l 105 454 q 127 456 117 454 q 145 463 137 457 q 157 478 153 468 q 162 505 162 488 l 162 890 l 32 890 l 32 946 l 102 946 q 135 948 117 946 q 169 956 153 950 q 198 972 185 962 q 217 999 211 982 l 286 999 l 286 498 q 291 470 286 481 q 304 454 296 460 q 322 447 311 449 q 345 445 332 445 l 408 445 l 408 399 l 40 399 m 384 0 l 292 0 l 788 992 l 879 992 l 384 0 m 1001 181 l 1001 107 q 1005 80 1001 90 q 1018 65 1010 70 q 1037 58 1026 59 q 1059 56 1047 56 l 1087 56 l 1087 1 l 780 1 l 780 56 l 819 56 q 840 58 830 56 q 858 65 851 59 q 871 80 866 70 q 876 107 876 90 l 876 181 l 630 181 l 630 218 l 889 601 l 1001 601 l 1001 237 l 1133 237 l 1133 181 l 1001 181 m 876 393 q 878 443 876 415 q 883 496 880 470 q 872 473 878 485 q 862 456 866 462 l 712 237 l 876 237 l 876 393 "},"Ḿ":{"x_min":52.421875,"x_max":1250.578125,"ha":1303,"o":"m 874 0 l 874 58 l 878 58 q 919 61 901 58 q 949 73 937 64 q 969 100 962 82 q 978 145 977 117 l 978 888 l 663 0 l 588 0 l 268 885 l 268 158 q 275 105 268 125 q 295 75 282 86 q 327 61 308 65 q 369 58 346 58 l 373 58 l 373 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 368 992 l 653 197 l 936 992 l 1250 992 l 1250 933 l 1232 933 q 1188 930 1209 933 q 1152 916 1167 926 q 1127 886 1136 905 q 1119 833 1119 866 l 1119 158 q 1127 105 1119 125 q 1152 75 1136 86 q 1188 61 1167 65 q 1232 58 1209 58 l 1250 58 l 1250 0 l 874 0 m 589 1108 q 621 1153 604 1127 q 653 1206 637 1179 q 684 1261 669 1234 q 709 1312 698 1288 l 858 1312 l 858 1297 q 820 1252 845 1279 q 764 1194 794 1224 q 701 1137 734 1165 q 641 1090 669 1108 l 589 1090 l 589 1108 "},"ι":{"x_min":136,"x_max":461.53125,"ha":464,"o":"m 266 745 l 266 193 q 295 88 266 122 q 372 55 324 55 q 418 57 397 55 q 461 64 439 60 l 461 6 q 438 -1 452 2 q 407 -7 424 -5 q 372 -12 391 -10 q 338 -14 354 -14 q 247 -2 285 -14 q 184 33 208 8 q 147 100 159 58 q 136 201 136 141 l 136 745 l 266 745 "},"IJ":{"x_min":52.421875,"x_max":927.640625,"ha":966,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 m 455 -264 l 467 -264 q 547 -252 512 -264 q 606 -210 582 -239 q 642 -131 629 -180 q 655 -9 655 -82 l 655 839 q 645 888 655 870 q 621 917 636 907 q 584 930 605 927 q 541 933 564 933 l 523 933 l 523 992 l 927 992 l 927 933 l 909 933 q 865 930 886 933 q 828 916 844 926 q 804 886 813 905 q 795 833 795 866 l 795 -10 q 770 -166 795 -104 q 703 -265 746 -228 q 603 -318 661 -302 q 478 -334 545 -334 l 455 -334 l 455 -264 "},"Ê":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 324 69 l 592 69 q 649 78 626 69 q 688 103 673 87 q 713 139 704 118 q 725 183 722 160 l 735 243 l 807 243 l 797 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 753 992 l 760 749 l 688 749 l 681 808 q 670 852 678 831 q 648 888 662 873 q 611 913 633 904 q 558 922 589 922 l 324 922 l 324 553 l 660 553 l 660 483 l 324 483 l 324 69 m 237 1089 q 272 1134 253 1108 q 312 1187 292 1160 q 348 1242 331 1215 q 376 1293 365 1269 l 507 1293 q 535 1242 518 1269 q 571 1187 552 1215 q 611 1134 591 1160 q 647 1089 630 1108 l 647 1071 l 592 1071 q 512 1128 552 1093 q 441 1195 472 1162 q 370 1128 409 1162 q 291 1071 330 1093 l 237 1071 l 237 1089 "},"Ά":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 m 98 789 q 114 833 106 807 q 130 887 123 859 q 145 942 138 915 q 155 993 151 970 l 280 993 l 280 978 q 260 935 275 962 q 226 878 246 908 q 183 819 205 848 q 143 771 161 790 l 98 771 l 98 789 "},")":{"x_min":45,"x_max":402,"ha":481,"o":"m 257 439 q 251 603 257 522 q 222 755 244 684 q 158 888 200 827 q 45 992 116 949 l 45 1055 q 208 963 140 1017 q 319 834 276 909 q 381 662 361 759 q 402 439 402 565 q 381 216 402 314 q 319 43 361 118 q 208 -85 276 -31 q 45 -178 140 -140 l 45 -114 q 158 -9 116 -70 q 222 123 200 51 q 251 276 244 195 q 257 439 257 357 "},"ε":{"x_min":75,"x_max":643,"ha":689,"o":"m 228 560 q 259 469 228 505 q 355 429 289 433 q 382 434 367 431 q 410 439 396 437 q 438 442 425 441 q 462 443 451 443 q 502 432 487 443 q 518 396 518 420 q 496 356 518 372 q 438 339 475 339 q 414 340 428 339 q 383 344 399 342 q 353 351 368 347 q 329 359 339 355 q 282 341 304 354 q 244 310 260 329 q 219 266 228 291 q 209 208 209 240 q 256 106 209 139 q 392 73 302 73 q 466 81 432 73 q 528 102 500 89 q 578 133 556 116 q 616 170 600 151 q 634 153 626 166 q 643 123 643 140 q 627 73 643 97 q 576 29 611 48 q 488 -2 542 9 q 356 -14 433 -14 q 230 2 284 -14 q 142 48 177 19 q 91 117 108 77 q 75 202 75 156 q 88 274 75 244 q 123 326 101 304 q 174 362 145 347 q 233 386 202 376 l 233 394 q 176 420 201 404 q 134 459 151 437 q 107 506 117 481 q 98 560 98 532 q 117 644 98 608 q 174 706 136 681 q 265 744 211 731 q 388 757 319 757 q 490 746 446 757 q 561 717 533 735 q 604 675 590 699 q 618 626 618 652 q 590 562 618 582 q 508 543 563 543 q 473 652 508 612 q 367 693 437 693 q 300 682 327 693 q 258 653 273 671 q 235 611 242 636 q 228 560 228 587 "},"э":{"x_min":56,"x_max":605,"ha":682,"o":"m 312 758 q 434 736 380 758 q 526 669 488 715 q 584 551 564 623 q 605 377 605 479 q 582 197 605 271 q 519 75 559 123 q 422 7 478 28 q 299 -14 366 -14 q 178 0 225 -14 q 103 36 131 14 q 66 85 76 58 q 56 135 56 111 q 158 224 56 224 q 166 157 158 188 q 191 103 174 126 q 235 67 208 80 q 301 55 262 55 q 424 125 383 55 q 470 334 464 196 l 162 334 l 162 414 l 470 414 q 454 546 467 493 q 419 630 441 598 q 368 675 398 662 q 305 688 339 688 q 249 677 273 688 q 207 647 224 667 q 181 601 190 627 q 172 541 172 574 q 97 560 124 541 q 71 620 71 578 q 83 668 71 644 q 125 712 96 692 q 200 745 154 732 q 312 758 246 758 "},"ш":{"x_min":31.75,"x_max":1282.578125,"ha":1314,"o":"m 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 74 114 64 q 154 103 145 84 q 164 152 164 122 l 164 593 q 154 642 164 623 q 130 670 145 660 q 93 683 114 680 q 50 686 73 686 l 31 686 l 31 745 l 412 745 l 412 686 l 408 686 q 365 683 385 686 q 328 670 344 680 q 304 642 313 660 q 294 593 294 623 l 294 63 l 596 63 l 596 593 q 586 642 596 623 q 562 670 577 660 q 525 683 546 680 q 482 686 505 686 l 477 686 l 477 745 l 844 745 l 844 686 l 840 686 q 797 683 817 686 q 760 670 776 680 q 736 642 745 660 q 726 593 726 623 l 726 63 l 1020 63 l 1020 593 q 1010 642 1020 623 q 986 670 1001 660 q 949 683 970 680 q 906 686 929 686 l 901 686 l 901 745 l 1282 745 l 1282 686 l 1264 686 q 1221 683 1241 686 q 1184 670 1200 680 q 1160 642 1169 660 q 1151 593 1151 623 l 1151 152 q 1160 103 1151 122 q 1184 74 1169 84 q 1221 61 1200 64 q 1264 58 1241 58 l 1282 58 l 1282 0 l 31 0 "},"Я":{"x_min":-16,"x_max":859.25,"ha":911,"o":"m 586 922 l 519 922 q 410 910 455 922 q 336 871 365 897 q 294 804 307 845 q 280 705 280 762 q 293 617 280 656 q 331 550 305 578 q 396 507 357 522 q 488 493 435 493 l 586 493 l 586 922 m 449 423 l 269 123 q 225 61 246 85 q 176 23 204 37 q 106 5 147 10 q 3 0 66 0 l -16 0 l -16 58 l -11 58 q 29 65 10 58 q 65 85 48 71 q 100 119 83 99 q 134 168 117 140 l 314 451 q 246 484 279 463 q 186 536 212 505 q 143 614 159 568 q 127 723 127 660 q 221 926 127 861 q 495 992 316 992 l 859 992 l 859 933 l 840 933 q 797 930 817 933 q 760 917 776 927 q 736 888 745 907 q 727 839 727 869 l 727 151 q 736 102 727 120 q 760 73 745 83 q 797 61 776 64 q 840 58 817 58 l 859 58 l 859 0 l 455 0 l 455 58 l 472 58 q 516 61 495 58 q 552 73 537 64 q 577 101 568 83 q 586 150 586 120 l 586 423 l 449 423 "},"a":{"x_min":69,"x_max":722.203125,"ha":782,"o":"m 203 200 q 231 103 203 135 q 316 71 258 71 q 392 84 358 71 q 451 123 427 98 q 488 184 475 148 q 501 263 501 219 l 501 375 l 412 371 q 313 357 353 368 q 249 324 273 345 q 214 271 225 302 q 203 200 203 240 m 372 688 q 307 677 331 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 200 727 166 711 q 280 750 234 743 q 377 758 325 758 q 488 745 441 758 q 568 704 536 732 q 616 630 600 675 q 632 518 632 584 l 632 157 q 636 109 632 128 q 651 79 641 90 q 678 63 661 67 q 718 58 695 58 l 722 58 l 722 0 l 534 0 l 512 118 l 501 118 q 459 65 479 89 q 414 23 438 40 q 358 -4 389 5 q 284 -14 328 -14 q 198 0 238 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 147 371 69 318 q 385 429 226 425 l 501 434 l 501 517 q 497 586 501 554 q 479 640 492 618 q 440 676 465 663 q 372 688 414 688 "},"Ę":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 324 69 l 592 69 q 649 78 626 69 q 688 103 673 87 q 713 139 704 118 q 725 183 722 160 l 735 243 l 807 243 l 797 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 753 992 l 760 749 l 688 749 l 681 808 q 670 852 678 831 q 648 888 662 873 q 611 913 633 904 q 558 922 589 922 l 324 922 l 324 553 l 660 553 l 660 483 l 324 483 l 324 69 m 484 -180 q 497 -118 484 -147 q 534 -65 511 -89 q 586 -24 557 -41 q 648 0 616 -7 l 727 0 q 682 -20 705 -6 q 641 -54 659 -34 q 610 -102 622 -75 q 597 -162 597 -129 q 605 -203 597 -186 q 625 -230 612 -220 q 655 -246 638 -241 q 694 -251 673 -251 q 734 -248 712 -251 q 782 -240 756 -245 l 782 -312 q 757 -321 771 -317 q 728 -328 743 -325 q 699 -332 713 -330 q 674 -334 685 -334 q 595 -324 630 -334 q 535 -297 560 -315 q 497 -249 510 -278 q 484 -180 484 -220 "},"Z":{"x_min":50,"x_max":764,"ha":822,"o":"m 742 935 l 219 69 l 569 69 q 622 78 601 69 q 656 103 643 87 q 675 139 669 118 q 685 183 682 160 l 692 243 l 764 243 l 757 0 l 50 0 l 50 55 l 571 922 l 268 922 q 217 913 238 922 q 183 888 196 904 q 164 852 170 873 q 154 808 157 831 l 147 749 l 76 749 l 82 992 l 742 992 l 742 935 "}," ":{"x_min":0,"x_max":0,"ha":231},"k":{"x_min":25.203125,"x_max":814,"ha":813,"o":"m 470 447 l 656 172 q 727 87 691 116 q 809 58 763 58 l 814 58 l 814 0 l 794 0 q 694 3 733 0 q 627 21 655 7 q 575 62 599 35 q 522 135 551 88 l 383 352 l 280 276 l 280 151 q 290 102 280 120 q 314 73 299 83 q 351 61 330 64 q 394 58 371 58 l 398 58 l 398 0 l 25 0 l 25 58 l 36 58 q 80 61 59 58 q 116 75 101 65 q 140 105 131 86 q 150 158 150 125 l 150 902 q 140 951 150 932 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 25 996 l 25 1055 l 280 1055 l 280 519 q 280 471 280 500 q 278 413 279 441 q 275 344 276 380 l 449 534 q 486 578 471 559 q 509 612 500 597 q 521 637 518 626 q 525 658 525 648 q 508 681 525 676 q 457 686 491 686 l 457 745 l 764 745 l 764 686 q 669 652 715 686 q 568 557 622 618 l 470 447 "},"Ù":{"x_min":21.4375,"x_max":975.25,"ha":996,"o":"m 502 -14 q 355 3 420 -14 q 245 58 290 20 q 176 155 200 95 q 153 299 153 214 l 153 839 q 143 888 153 869 q 119 917 134 907 q 82 930 103 927 q 39 933 62 933 l 21 933 l 21 992 l 425 992 l 425 933 l 407 933 q 363 930 384 933 q 326 916 342 926 q 302 885 311 905 q 293 832 293 865 l 293 285 q 310 181 293 224 q 358 112 327 138 q 431 72 389 85 q 525 60 474 60 q 629 77 585 60 q 701 122 672 93 q 744 191 730 151 q 758 279 758 231 l 758 838 q 749 888 758 869 q 724 917 739 906 q 688 930 708 927 q 644 933 667 933 l 626 933 l 626 992 l 975 992 l 975 933 l 956 933 q 912 930 933 933 q 876 916 891 926 q 852 886 861 905 q 843 833 843 866 l 843 283 q 820 158 843 214 q 755 65 798 103 q 649 6 712 26 q 502 -14 585 -14 m 578 1071 l 525 1071 q 464 1118 497 1089 q 401 1175 432 1146 q 345 1233 371 1205 q 308 1278 320 1260 l 308 1293 l 456 1293 q 482 1242 467 1269 q 512 1187 496 1215 q 546 1134 529 1160 q 578 1089 563 1108 l 578 1071 "},"Ů":{"x_min":21.4375,"x_max":975.25,"ha":996,"o":"m 502 -14 q 355 3 420 -14 q 245 58 290 20 q 176 155 200 95 q 153 299 153 214 l 153 839 q 143 888 153 869 q 119 917 134 907 q 82 930 103 927 q 39 933 62 933 l 21 933 l 21 992 l 425 992 l 425 933 l 407 933 q 363 930 384 933 q 326 916 342 926 q 302 885 311 905 q 293 832 293 865 l 293 285 q 310 181 293 224 q 358 112 327 138 q 431 72 389 85 q 525 60 474 60 q 629 77 585 60 q 701 122 672 93 q 744 191 730 151 q 758 279 758 231 l 758 838 q 749 888 758 869 q 724 917 739 906 q 688 930 708 927 q 644 933 667 933 l 626 933 l 626 992 l 975 992 l 975 933 l 956 933 q 912 930 933 933 q 876 916 891 926 q 852 886 861 905 q 843 833 843 866 l 843 283 q 820 158 843 214 q 755 65 798 103 q 649 6 712 26 q 502 -14 585 -14 m 683 1208 q 670 1142 683 1170 q 634 1095 657 1114 q 581 1066 611 1076 q 516 1057 550 1057 q 450 1066 481 1057 q 397 1095 420 1076 q 361 1142 374 1114 q 349 1208 349 1170 q 361 1273 349 1244 q 397 1320 374 1301 q 450 1349 420 1339 q 516 1359 481 1359 q 581 1349 550 1359 q 634 1320 611 1339 q 670 1273 657 1301 q 683 1208 683 1244 m 607 1208 q 600 1246 607 1230 q 580 1271 593 1262 q 551 1286 568 1281 q 516 1291 535 1291 q 480 1286 496 1291 q 451 1271 463 1281 q 431 1246 438 1262 q 424 1208 424 1230 q 431 1169 424 1185 q 451 1144 438 1153 q 480 1129 463 1134 q 516 1124 496 1124 q 551 1129 535 1124 q 580 1144 568 1134 q 600 1169 593 1153 q 607 1208 607 1185 "},"¢":{"x_min":110,"x_max":690,"ha":777,"o":"m 397 121 q 281 152 333 128 q 190 221 228 176 q 131 335 152 267 q 110 501 110 404 q 132 676 110 604 q 193 794 154 748 q 284 862 232 840 q 397 891 337 885 l 397 992 l 455 992 l 455 891 q 539 878 497 887 q 614 852 581 869 q 669 811 648 836 q 690 754 690 786 q 654 686 690 705 q 549 666 619 666 q 543 721 549 695 q 526 767 538 747 q 497 802 515 788 q 455 821 479 817 l 455 198 q 515 202 485 198 q 574 212 546 206 q 626 227 602 219 q 668 242 650 234 l 668 167 q 575 134 630 149 q 455 119 520 120 l 455 0 l 397 0 l 397 121 m 244 502 q 281 302 244 377 q 397 206 318 227 l 397 821 q 335 796 363 815 q 287 739 308 776 q 256 643 267 701 q 244 502 244 585 "},"В":{"x_min":52.421875,"x_max":823,"ha":908,"o":"m 782 743 q 768 661 782 696 q 732 599 755 626 q 677 555 709 573 q 609 524 646 537 l 609 519 q 696 491 656 511 q 763 440 735 471 q 807 365 791 408 q 823 267 823 322 q 734 66 823 133 q 466 0 646 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 424 992 q 693 931 605 992 q 782 743 782 871 m 324 69 l 457 69 q 555 80 515 69 q 620 114 595 90 q 657 177 646 139 q 669 271 669 216 q 659 366 669 326 q 624 432 649 406 q 560 471 600 459 q 459 484 520 484 l 324 484 l 324 69 m 324 554 l 419 554 q 519 564 479 554 q 583 598 559 575 q 617 657 607 621 q 628 743 628 693 q 616 828 628 794 q 580 884 605 863 q 514 914 554 905 q 415 922 473 922 l 324 922 l 324 554 "},"І":{"x_min":52.421875,"x_max":456.640625,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 "},"ē":{"x_min":77,"x_max":673,"ha":743,"o":"m 384 678 q 264 617 306 678 q 214 438 222 556 l 538 438 q 529 536 538 491 q 503 612 521 580 q 456 661 485 644 q 384 678 427 678 m 398 -14 q 263 11 323 -14 q 162 85 203 36 q 98 205 120 134 q 77 366 77 276 q 156 659 77 561 q 384 758 236 758 q 505 736 451 758 q 595 673 558 715 q 653 568 633 631 q 673 423 673 505 l 673 358 l 211 358 q 227 230 213 284 q 266 142 241 176 q 330 91 292 107 q 417 74 368 74 q 484 82 453 74 q 540 104 515 90 q 584 134 565 117 q 615 170 603 151 q 633 153 625 165 q 642 122 642 140 q 627 77 642 101 q 581 33 612 53 q 505 0 551 13 q 398 -14 459 -14 m 581 842 l 178 842 l 178 924 l 581 924 l 581 842 "},"β":{"x_min":136,"x_max":766,"ha":843,"o":"m 136 -334 l 136 785 q 159 914 136 862 q 222 999 182 967 q 317 1045 262 1031 q 435 1060 372 1060 q 653 999 580 1060 q 726 831 726 939 q 718 770 726 798 q 699 718 711 741 q 671 677 687 695 q 639 644 656 659 q 553 593 602 612 l 553 584 q 641 545 602 568 q 707 490 679 523 q 750 411 735 457 q 766 305 766 365 q 745 165 766 225 q 685 65 724 105 q 591 5 646 25 q 466 -14 535 -14 q 346 2 395 -14 q 266 48 297 19 l 266 -334 l 136 -334 m 458 55 q 586 115 541 55 q 631 302 631 175 q 620 399 631 358 q 589 469 610 439 q 540 516 569 498 q 474 546 511 535 q 434 533 456 539 q 387 527 412 527 q 349 538 364 527 q 335 573 335 550 q 353 613 335 598 q 410 627 372 627 q 429 626 418 627 q 450 624 439 625 q 471 620 461 622 q 487 616 480 618 q 566 685 537 633 q 595 820 595 736 q 584 894 595 860 q 553 951 574 927 q 503 988 533 974 q 433 1001 473 1001 q 360 987 391 1001 q 308 949 329 974 q 277 888 287 924 q 266 808 266 853 l 266 139 q 303 107 282 122 q 348 80 323 92 q 400 62 372 68 q 458 55 428 55 "},"≠":{"x_min":90,"x_max":687,"ha":777,"o":"m 393 673 l 432 821 l 513 821 l 473 673 l 687 673 l 687 590 l 453 590 l 403 400 l 687 400 l 687 317 l 382 317 l 344 169 l 262 169 l 301 317 l 90 317 l 90 400 l 322 400 l 372 590 l 90 590 l 90 673 l 393 673 "},"‼":{"x_min":143,"x_max":633,"ha":778,"o":"m 149 992 l 311 992 l 262 279 l 198 279 l 149 992 m 143 84 q 149 129 143 111 q 168 158 156 147 q 196 174 180 169 q 230 179 212 179 q 264 174 248 179 q 291 158 280 169 q 310 129 303 147 q 318 84 318 111 q 310 39 318 57 q 291 10 303 21 q 264 -5 280 0 q 230 -10 248 -10 q 196 -5 212 -10 q 168 10 180 0 q 149 39 156 21 q 143 84 143 57 m 464 992 l 626 992 l 577 279 l 513 279 l 464 992 m 458 84 q 464 129 458 111 q 483 158 471 147 q 511 174 495 169 q 545 179 527 179 q 579 174 563 179 q 606 158 595 169 q 625 129 618 147 q 633 84 633 111 q 625 39 633 57 q 606 10 618 21 q 579 -5 595 0 q 545 -10 563 -10 q 511 -5 527 -10 q 483 10 495 0 q 464 39 471 21 q 458 84 458 57 "},"¥":{"x_min":7,"x_max":770,"ha":777,"o":"m 179 0 l 179 58 l 211 58 q 254 61 234 58 q 290 73 274 64 q 314 101 305 82 q 325 149 323 119 l 325 241 l 131 241 l 131 311 l 325 311 l 325 404 l 131 404 l 131 474 l 298 474 l 110 860 q 91 894 99 880 q 71 917 82 908 q 45 929 59 926 q 11 933 31 933 l 7 933 l 7 992 l 347 992 l 347 933 l 337 933 q 276 920 295 933 q 257 879 257 907 q 263 842 257 863 q 280 798 268 821 l 347 650 q 367 603 357 628 q 385 554 376 578 q 400 508 393 529 q 411 474 407 487 q 420 496 414 481 q 434 527 426 510 q 450 563 441 545 q 465 595 458 581 l 544 764 q 568 831 560 800 q 577 878 577 862 q 557 920 577 906 q 492 933 538 933 l 488 933 l 488 992 l 770 992 l 770 933 l 757 933 q 727 928 740 933 q 703 911 714 924 q 681 878 692 899 q 654 825 669 857 l 487 474 l 660 474 l 660 404 l 465 404 l 465 311 l 660 311 l 660 241 l 465 241 l 465 156 q 474 104 465 124 q 498 75 483 85 q 534 61 514 64 q 579 58 555 58 l 611 58 l 611 0 l 179 0 "},"Ĥ":{"x_min":52.421875,"x_max":1048.578125,"ha":1101,"o":"m 644 0 l 644 58 l 662 58 q 707 61 686 58 q 743 75 727 65 q 767 105 758 86 q 776 158 776 125 l 776 483 l 324 483 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 553 l 776 553 l 776 833 q 767 886 776 866 q 743 916 758 905 q 707 930 727 926 q 662 933 686 933 l 644 933 l 644 992 l 1048 992 l 1048 933 l 1030 933 q 986 930 1007 933 q 950 916 965 926 q 925 886 934 905 q 917 833 917 866 l 917 151 q 926 102 917 120 q 950 73 935 83 q 987 61 966 64 q 1030 58 1007 58 l 1048 58 l 1048 0 l 644 0 m 346 1089 q 381 1134 362 1108 q 421 1187 401 1160 q 457 1242 440 1215 q 485 1293 474 1269 l 616 1293 q 644 1242 627 1269 q 680 1187 661 1215 q 720 1134 700 1160 q 756 1089 739 1108 l 756 1071 l 701 1071 q 621 1128 661 1093 q 550 1195 581 1162 q 479 1128 518 1162 q 400 1071 439 1093 l 346 1071 l 346 1089 "},"U":{"x_min":21.4375,"x_max":975.25,"ha":996,"o":"m 502 -14 q 355 3 420 -14 q 245 58 290 20 q 176 155 200 95 q 153 299 153 214 l 153 839 q 143 888 153 869 q 119 917 134 907 q 82 930 103 927 q 39 933 62 933 l 21 933 l 21 992 l 425 992 l 425 933 l 407 933 q 363 930 384 933 q 326 916 342 926 q 302 885 311 905 q 293 832 293 865 l 293 285 q 310 181 293 224 q 358 112 327 138 q 431 72 389 85 q 525 60 474 60 q 629 77 585 60 q 701 122 672 93 q 744 191 730 151 q 758 279 758 231 l 758 838 q 749 888 758 869 q 724 917 739 906 q 688 930 708 927 q 644 933 667 933 l 626 933 l 626 992 l 975 992 l 975 933 l 956 933 q 912 930 933 933 q 876 916 891 926 q 852 886 861 905 q 843 833 843 866 l 843 283 q 820 158 843 214 q 755 65 798 103 q 649 6 712 26 q 502 -14 585 -14 "},"Ñ":{"x_min":52.421875,"x_max":1020.5625,"ha":1060,"o":"m 789 0 l 268 800 l 268 158 q 277 105 268 125 q 302 75 287 86 q 338 61 317 65 q 382 58 359 58 l 401 58 l 401 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 306 992 l 804 223 l 804 839 q 795 888 804 869 q 770 917 785 907 q 734 930 754 927 q 690 933 713 933 l 671 933 l 671 992 l 1020 992 l 1020 933 l 1002 933 q 958 930 979 933 q 922 916 937 926 q 897 886 906 905 q 889 833 889 866 l 889 0 l 789 0 m 663 1161 q 696 1167 684 1161 q 716 1183 709 1173 q 726 1207 723 1194 q 731 1235 729 1220 l 794 1235 q 782 1173 791 1203 q 756 1121 773 1144 q 712 1084 738 1098 q 648 1071 685 1071 q 580 1084 611 1071 q 524 1114 550 1098 q 475 1145 498 1131 q 430 1158 453 1158 q 397 1152 409 1158 q 378 1136 385 1146 q 367 1112 371 1126 q 362 1085 364 1099 l 300 1085 q 311 1146 302 1116 q 338 1198 320 1175 q 383 1235 356 1221 q 447 1249 409 1249 q 514 1235 484 1249 q 570 1205 544 1221 q 619 1174 596 1188 q 663 1161 642 1161 "},"F":{"x_min":52.421875,"x_max":759,"ha":819,"o":"m 324 922 l 324 521 l 659 521 l 659 451 l 324 451 l 324 157 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 484 58 l 484 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 752 992 l 759 749 l 687 749 l 680 808 q 669 853 677 832 q 646 889 661 873 q 607 913 630 904 q 552 922 584 922 l 324 922 "},"ϑ":{"x_min":11.75,"x_max":820.203125,"ha":839,"o":"m 591 652 q 565 796 583 733 q 524 902 548 859 q 471 969 500 946 q 410 991 442 991 q 332 959 361 991 q 303 873 303 927 q 318 791 303 830 q 365 721 332 752 q 454 672 398 691 q 591 652 509 653 m 727 591 q 729 556 728 576 q 730 514 730 536 q 708 305 730 401 q 642 137 686 208 q 532 26 599 66 q 377 -14 466 -14 q 249 4 302 -14 q 165 54 197 23 q 118 129 132 86 q 104 219 104 171 q 106 279 104 247 q 111 341 108 311 q 117 396 114 370 q 120 438 120 422 q 117 466 120 453 q 107 488 114 479 q 87 501 99 497 q 56 506 75 506 l 11 506 l 11 565 l 105 565 q 177 555 149 565 q 222 530 206 546 q 245 491 238 514 q 251 440 251 468 q 249 389 251 416 q 243 334 246 363 q 237 277 240 306 q 234 219 234 248 q 243 155 234 185 q 270 103 251 125 q 316 68 288 81 q 383 55 345 55 q 547 170 494 55 q 599 514 599 285 q 598 532 599 522 q 598 554 598 543 q 597 574 597 565 q 596 591 597 584 q 396 617 477 593 q 265 678 315 640 q 194 765 215 717 q 173 866 173 814 q 186 943 173 908 q 228 1005 200 979 q 300 1046 257 1031 q 405 1061 344 1061 q 527 1032 473 1061 q 620 949 580 1003 q 685 819 659 895 q 723 650 711 743 l 820 650 l 820 591 l 727 591 "},"Ќ":{"x_min":52.421875,"x_max":952,"ha":973,"o":"m 919 912 q 913 876 919 892 q 898 848 908 860 q 877 829 889 836 q 851 818 865 821 q 843 848 849 834 q 827 873 836 863 q 802 890 817 884 q 770 896 788 896 q 692 857 729 896 q 612 733 655 817 q 574 658 590 690 q 543 600 557 625 q 515 558 528 576 q 486 525 502 539 q 548 515 522 524 q 594 492 575 507 q 630 455 614 477 q 661 404 645 433 l 791 169 q 862 84 824 110 q 947 58 901 58 l 952 58 l 952 0 l 932 0 q 821 5 865 0 q 747 25 777 11 q 696 66 717 40 q 654 132 675 92 l 527 377 q 495 427 511 408 q 458 456 479 446 q 405 469 437 466 q 324 472 373 472 l 324 159 q 333 106 324 126 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 834 324 866 l 324 531 q 377 533 357 531 q 411 540 397 535 q 432 554 424 545 q 450 572 441 562 q 493 646 467 594 q 558 773 519 697 q 611 867 584 826 q 667 938 638 909 q 731 984 697 968 q 806 1000 765 1000 q 858 993 836 1000 q 893 974 880 986 q 912 947 906 963 q 919 912 919 930 m 456 1089 q 488 1134 471 1108 q 520 1187 504 1160 q 551 1242 536 1215 q 576 1293 565 1269 l 725 1293 l 725 1278 q 687 1233 712 1260 q 631 1175 661 1205 q 568 1118 601 1146 q 508 1071 536 1089 l 456 1071 l 456 1089 "},"å":{"x_min":69,"x_max":722.203125,"ha":782,"o":"m 203 200 q 231 103 203 135 q 316 71 258 71 q 392 84 358 71 q 451 123 427 98 q 488 184 475 148 q 501 263 501 219 l 501 375 l 412 371 q 313 357 353 368 q 249 324 273 345 q 214 271 225 302 q 203 200 203 240 m 372 688 q 307 677 331 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 200 727 166 711 q 280 750 234 743 q 377 758 325 758 q 488 745 441 758 q 568 704 536 732 q 616 630 600 675 q 632 518 632 584 l 632 157 q 636 109 632 128 q 651 79 641 90 q 678 63 661 67 q 718 58 695 58 l 722 58 l 722 0 l 534 0 l 512 118 l 501 118 q 459 65 479 89 q 414 23 438 40 q 358 -4 389 5 q 284 -14 328 -14 q 198 0 238 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 147 371 69 318 q 385 429 226 425 l 501 434 l 501 517 q 497 586 501 554 q 479 640 492 618 q 440 676 465 663 q 372 688 414 688 m 556 979 q 543 913 556 941 q 507 866 530 885 q 454 837 484 847 q 389 828 423 828 q 323 837 354 828 q 270 866 293 847 q 234 913 247 885 q 222 979 222 941 q 234 1044 222 1015 q 270 1091 247 1072 q 323 1120 293 1110 q 389 1130 354 1130 q 454 1120 423 1130 q 507 1091 484 1110 q 543 1044 530 1072 q 556 979 556 1015 m 480 979 q 473 1017 480 1001 q 453 1042 466 1033 q 424 1057 441 1052 q 389 1062 408 1062 q 353 1057 369 1062 q 324 1042 336 1052 q 304 1017 311 1033 q 297 979 297 1001 q 304 940 297 956 q 324 915 311 924 q 353 900 336 905 q 389 895 369 895 q 424 900 408 895 q 453 915 441 905 q 473 940 466 924 q 480 979 480 956 "},"Ϋ":{"x_min":-7,"x_max":872,"ha":868,"o":"m 221 0 l 221 58 l 253 58 q 296 61 276 58 q 333 73 317 64 q 357 102 348 83 q 367 151 367 120 l 367 413 l 109 860 q 87 893 98 880 q 66 916 77 907 q 41 929 55 925 q 10 933 28 933 l -7 933 l -7 992 l 374 992 l 374 933 l 323 933 q 292 930 304 933 q 273 920 280 926 q 264 906 267 914 q 262 889 262 898 q 270 850 262 869 q 287 815 279 830 l 389 629 q 431 545 414 586 q 459 470 448 503 q 475 504 466 485 q 495 543 484 522 q 518 585 506 563 q 543 629 531 607 l 631 789 q 651 834 645 812 q 657 872 657 855 q 635 918 657 903 q 573 933 613 933 l 532 933 l 532 992 l 872 992 l 872 933 l 855 933 q 827 928 840 933 q 800 910 814 923 q 772 877 787 898 q 740 825 758 857 l 507 413 l 507 158 q 516 105 507 125 q 540 75 525 86 q 576 61 556 65 q 620 58 597 58 l 653 58 l 653 0 l 221 0 m 243 1185 q 248 1221 243 1206 q 263 1245 253 1236 q 285 1258 272 1254 q 313 1263 298 1263 q 341 1258 328 1263 q 364 1245 354 1254 q 379 1221 373 1236 q 384 1185 384 1206 q 379 1149 384 1163 q 364 1124 373 1134 q 341 1111 354 1115 q 313 1107 328 1107 q 263 1124 283 1107 q 243 1185 243 1142 m 507 1185 q 512 1221 507 1206 q 527 1245 517 1236 q 549 1258 536 1254 q 577 1263 562 1263 q 605 1258 592 1263 q 628 1245 618 1254 q 643 1221 637 1236 q 648 1185 648 1206 q 643 1149 648 1163 q 628 1124 637 1134 q 605 1111 618 1115 q 577 1107 592 1107 q 527 1124 547 1107 q 507 1185 507 1142 "},"0":{"x_min":62,"x_max":715,"ha":777,"o":"m 715 497 q 694 288 715 382 q 634 126 674 193 q 532 22 593 59 q 388 -14 471 -14 q 241 22 303 -14 q 139 126 179 59 q 81 288 100 193 q 62 498 62 383 q 81 707 62 613 q 139 867 100 801 q 241 970 179 934 q 390 1006 303 1006 q 532 970 471 1006 q 634 867 593 934 q 694 707 674 801 q 715 497 715 613 m 206 497 q 215 313 206 394 q 246 177 225 233 q 303 92 268 121 q 388 62 338 62 q 474 92 439 62 q 530 177 509 121 q 561 313 552 233 q 570 497 570 394 q 561 680 570 600 q 530 816 552 761 q 474 900 509 871 q 390 929 440 929 q 304 900 339 929 q 247 816 269 871 q 215 680 225 761 q 206 497 206 600 "},"ō":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 641 81 725 177 q 398 -14 558 -14 q 264 9 323 -14 q 162 81 204 33 q 99 202 121 129 q 77 373 77 275 q 159 663 77 568 q 403 758 241 758 q 537 734 478 758 q 639 663 597 711 q 702 543 680 615 q 725 373 725 471 m 211 374 q 222 236 211 295 q 254 136 232 176 q 313 75 277 96 q 402 55 349 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 q 579 511 590 452 q 547 609 569 570 q 488 668 525 649 q 400 688 452 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 m 599 842 l 196 842 l 196 924 l 599 924 l 599 842 "},"”":{"x_min":41,"x_max":547,"ha":625,"o":"m 269 871 q 256 785 269 827 q 217 708 244 744 q 146 645 189 673 q 41 599 103 617 l 41 657 q 141 710 109 679 q 173 782 173 741 q 165 805 173 795 q 147 821 158 814 q 122 835 135 828 q 98 851 109 842 q 79 874 86 861 q 72 909 72 888 q 98 970 72 949 q 162 992 124 992 q 203 984 184 992 q 237 961 222 976 q 260 923 252 945 q 269 871 269 900 m 547 871 q 534 785 547 827 q 495 708 522 744 q 424 645 467 673 q 319 599 381 617 l 319 657 q 419 710 386 679 q 451 782 451 741 q 443 805 451 795 q 425 821 436 814 q 400 835 413 828 q 376 851 387 842 q 357 874 364 861 q 350 909 350 888 q 375 970 350 949 q 440 992 401 992 q 480 984 461 992 q 514 961 500 976 q 538 923 529 945 q 547 871 547 900 "},"ö":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 641 81 725 177 q 398 -14 558 -14 q 264 9 323 -14 q 162 81 204 33 q 99 202 121 129 q 77 373 77 275 q 159 663 77 568 q 403 758 241 758 q 537 734 478 758 q 639 663 597 711 q 702 543 680 615 q 725 373 725 471 m 211 374 q 222 236 211 295 q 254 136 232 176 q 313 75 277 96 q 402 55 349 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 q 579 511 590 452 q 547 609 569 570 q 488 668 525 649 q 400 688 452 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 m 193 956 q 198 992 193 977 q 213 1016 203 1007 q 235 1029 222 1025 q 263 1034 248 1034 q 291 1029 278 1034 q 314 1016 304 1025 q 329 992 323 1007 q 334 956 334 977 q 329 920 334 934 q 314 895 323 905 q 291 882 304 886 q 263 878 278 878 q 213 895 233 878 q 193 956 193 913 m 457 956 q 462 992 457 977 q 477 1016 467 1007 q 499 1029 486 1025 q 527 1034 512 1034 q 555 1029 542 1034 q 578 1016 568 1025 q 593 992 587 1007 q 598 956 598 977 q 593 920 598 934 q 578 895 587 905 q 555 882 568 886 q 527 878 542 878 q 477 895 497 878 q 457 956 457 913 "},"ć":{"x_min":77,"x_max":629,"ha":684,"o":"m 393 -14 q 265 7 324 -14 q 165 74 207 28 q 100 193 123 121 q 77 367 77 265 q 100 554 77 479 q 165 674 123 629 q 263 739 207 720 q 386 758 320 758 q 472 749 429 758 q 550 723 515 741 q 606 679 584 705 q 628 616 628 652 q 596 548 628 568 q 503 529 565 529 q 498 590 503 561 q 479 641 493 619 q 444 676 466 663 q 386 688 421 688 q 314 673 346 688 q 259 622 282 658 q 224 523 236 585 q 211 368 211 461 q 260 147 211 220 q 421 74 309 74 q 533 102 485 74 q 605 173 581 129 q 622 151 615 164 q 629 118 629 137 q 614 71 629 95 q 569 28 599 47 q 496 -2 540 9 q 393 -14 452 -14 m 316 860 q 348 905 331 879 q 380 958 364 931 q 411 1013 396 986 q 436 1064 425 1040 l 585 1064 l 585 1049 q 547 1004 572 1031 q 491 946 521 976 q 428 889 461 917 q 368 842 396 860 l 316 842 l 316 860 "},"þ":{"x_min":25.203125,"x_max":777,"ha":853,"o":"m 469 669 q 378 651 415 669 q 320 596 342 633 q 290 504 299 559 q 280 373 280 448 q 290 245 280 300 q 321 151 299 189 q 379 94 343 113 q 470 74 415 74 q 549 94 516 74 q 602 151 581 113 q 632 245 623 189 q 642 374 642 301 q 601 595 642 522 q 469 669 561 669 m 777 373 q 758 199 777 272 q 703 78 739 126 q 614 8 667 31 q 493 -14 561 -14 q 420 -5 453 -14 q 361 19 388 3 q 315 58 335 36 q 280 108 295 80 l 275 108 q 278 40 276 72 q 279 13 278 27 q 279 -11 279 0 q 280 -33 280 -24 q 280 -49 280 -43 l 280 -182 q 290 -231 280 -212 q 314 -259 299 -249 q 351 -272 330 -269 q 394 -275 371 -275 l 398 -275 l 398 -334 l 25 -334 l 25 -275 l 36 -275 q 80 -272 59 -275 q 116 -258 101 -268 q 140 -227 131 -247 q 150 -175 150 -207 l 150 902 q 140 951 150 932 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 25 996 l 25 1055 l 280 1055 l 280 800 q 280 745 280 776 q 278 686 279 714 q 275 618 276 653 l 280 618 q 316 676 296 650 q 361 720 335 702 q 420 748 387 738 q 493 758 452 758 q 614 735 561 758 q 703 665 667 712 q 758 545 739 618 q 777 373 777 473 "},"]":{"x_min":51,"x_max":361,"ha":500,"o":"m 51 -178 l 51 -119 l 110 -119 q 155 -115 134 -119 q 191 -101 175 -112 q 215 -71 206 -91 q 224 -19 224 -51 l 224 896 q 215 948 224 928 q 191 978 206 968 q 155 992 175 989 q 110 996 134 996 l 51 996 l 51 1055 l 361 1055 l 361 -178 l 51 -178 "},"А":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 "},"′":{"x_min":79,"x_max":223.46875,"ha":306,"o":"m 79 992 l 223 992 l 182 666 l 119 666 l 79 992 "},"Ы":{"x_min":52.421875,"x_max":1207.25,"ha":1260,"o":"m 484 992 l 484 933 l 438 933 q 394 930 415 933 q 358 918 373 927 q 333 889 342 908 q 324 840 324 871 l 324 549 l 384 549 q 555 528 485 549 q 671 472 626 508 q 736 386 716 436 q 757 275 757 335 q 736 163 757 214 q 673 76 715 113 q 566 20 631 40 q 414 0 502 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 74 134 64 q 174 103 165 84 q 184 152 184 122 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 484 992 m 324 69 l 390 69 q 489 81 448 69 q 554 118 529 93 q 591 180 580 142 q 603 267 603 217 q 589 365 603 324 q 548 431 576 405 q 476 468 520 456 q 369 479 432 479 l 324 479 l 324 69 m 803 0 l 803 58 l 820 58 q 865 61 844 58 q 901 75 885 65 q 925 105 916 86 q 934 158 934 125 l 934 833 q 925 886 934 866 q 901 916 916 905 q 865 930 885 926 q 820 933 844 933 l 803 933 l 803 992 l 1207 992 l 1207 933 l 1188 933 q 1144 930 1165 933 q 1108 916 1123 926 q 1084 886 1093 905 q 1075 833 1075 866 l 1075 158 q 1084 105 1075 125 q 1108 75 1093 86 q 1144 61 1123 65 q 1188 58 1165 58 l 1207 58 l 1207 0 l 803 0 "},"ẁ":{"x_min":1,"x_max":1196,"ha":1197,"o":"m 661 741 l 800 329 q 817 275 808 304 q 834 218 826 246 q 849 164 843 190 q 860 122 856 139 l 864 122 q 883 207 870 156 q 918 325 897 257 l 987 548 q 996 586 993 566 q 1000 618 1000 606 q 977 670 1000 654 q 908 686 955 686 l 898 686 l 898 745 l 1196 745 l 1196 686 l 1178 686 q 1143 682 1158 686 q 1116 666 1128 678 q 1094 633 1104 654 q 1073 578 1084 612 l 894 0 l 783 0 l 617 489 l 592 580 l 395 0 l 286 0 l 104 612 q 87 648 95 634 q 66 671 78 662 q 40 683 55 679 q 5 686 25 686 l 1 686 l 1 745 l 344 745 l 344 686 l 325 686 q 263 674 284 686 q 242 628 242 662 q 246 600 242 616 q 253 568 249 584 l 319 335 q 333 280 326 310 q 347 220 340 250 q 359 165 353 191 q 368 122 364 139 l 372 122 q 381 163 375 139 q 394 213 387 186 q 411 268 402 240 q 429 320 420 295 l 573 741 l 661 741 m 658 842 l 605 842 q 544 889 577 860 q 481 946 512 917 q 425 1004 451 976 q 388 1049 400 1031 l 388 1064 l 536 1064 q 562 1013 547 1040 q 592 958 576 986 q 626 905 609 931 q 658 860 643 879 l 658 842 "},"ĭ":{"x_min":18,"x_max":427.15625,"ha":444,"o":"m 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 294 745 l 294 158 q 304 105 294 125 q 328 75 313 86 q 364 61 343 65 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 m 212 842 q 126 857 163 842 q 66 898 90 872 q 31 958 43 924 q 18 1033 19 993 l 81 1033 q 127 959 93 981 q 212 937 161 937 q 297 959 263 937 q 342 1033 331 981 l 407 1033 q 393 958 405 993 q 357 898 381 924 q 297 857 333 872 q 212 842 261 842 "},"8":{"x_min":64,"x_max":713,"ha":777,"o":"m 64 250 q 79 338 64 300 q 124 406 95 376 q 191 459 152 435 q 275 505 230 483 q 203 553 236 527 q 146 610 169 579 q 109 678 122 641 q 96 758 96 715 q 112 850 96 806 q 165 929 129 895 q 259 985 201 964 q 396 1006 316 1006 q 512 988 461 1006 q 598 938 563 970 q 651 863 633 906 q 670 767 670 819 q 656 688 670 722 q 618 626 642 653 q 559 577 593 599 q 482 534 524 555 q 576 481 534 509 q 649 421 618 453 q 696 350 679 388 q 713 266 713 311 q 689 147 713 200 q 622 59 665 95 q 517 4 578 23 q 379 -14 455 -14 q 242 6 301 -14 q 143 62 183 26 q 84 146 104 98 q 64 250 64 194 m 386 55 q 468 69 431 55 q 531 107 505 82 q 571 165 557 131 q 586 238 586 198 q 573 303 586 273 q 531 361 560 333 q 455 416 502 389 q 342 472 409 443 q 237 381 276 437 q 198 246 198 325 q 210 168 198 203 q 246 108 222 133 q 304 69 269 82 q 386 55 340 55 m 546 769 q 538 830 546 800 q 510 884 529 860 q 462 922 492 908 q 387 936 431 936 q 318 924 349 936 q 268 890 288 912 q 237 838 247 868 q 226 773 226 808 q 238 706 226 736 q 274 653 250 677 q 332 608 297 629 q 414 566 367 587 q 478 605 453 585 q 519 650 504 626 q 540 703 534 674 q 546 769 546 733 "},"R":{"x_min":52.421875,"x_max":920,"ha":911,"o":"m 770 168 q 838 85 805 113 q 915 58 871 58 l 920 58 l 920 0 l 900 0 q 793 4 835 0 q 722 22 751 9 q 672 60 693 36 q 628 123 651 84 l 439 433 l 324 433 l 324 150 q 333 101 324 120 q 358 73 342 83 q 394 61 373 64 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 426 992 q 695 924 607 992 q 784 722 784 857 q 765 624 784 666 q 718 551 747 582 q 652 500 689 520 q 579 467 616 479 l 770 168 m 324 503 l 420 503 q 521 516 480 503 q 585 556 561 529 q 619 624 609 583 q 630 718 630 664 q 618 812 630 773 q 581 875 607 851 q 516 911 556 900 q 417 922 475 922 l 324 922 l 324 503 "},"Ż":{"x_min":50,"x_max":764,"ha":822,"o":"m 742 935 l 219 69 l 569 69 q 622 78 601 69 q 656 103 643 87 q 675 139 669 118 q 685 183 682 160 l 692 243 l 764 243 l 757 0 l 50 0 l 50 55 l 571 922 l 268 922 q 217 913 238 922 q 183 888 196 904 q 164 852 170 873 q 154 808 157 831 l 147 749 l 76 749 l 82 992 l 742 992 l 742 935 m 353 1199 q 359 1240 353 1223 q 376 1266 365 1256 q 401 1280 386 1276 q 432 1285 415 1285 q 463 1280 448 1285 q 488 1266 477 1276 q 505 1240 499 1256 q 512 1199 512 1223 q 505 1158 512 1174 q 488 1132 499 1142 q 463 1117 477 1121 q 432 1113 448 1113 q 401 1117 415 1113 q 376 1132 386 1121 q 359 1158 365 1142 q 353 1199 353 1174 "},"ħ":{"x_min":23.84375,"x_max":843.234375,"ha":882,"o":"m 398 58 l 398 0 l 25 0 l 25 58 l 36 58 q 80 61 59 58 q 116 75 101 65 q 140 106 131 86 q 150 158 150 126 l 150 830 l 23 830 l 23 889 l 150 889 l 150 902 q 140 951 150 933 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 25 996 l 25 1055 l 280 1055 l 280 889 l 518 889 l 518 830 l 280 830 l 280 726 q 280 684 280 706 q 278 645 279 663 q 275 603 276 624 l 282 603 q 486 730 344 730 q 591 714 545 730 q 668 665 637 698 q 715 580 699 632 q 732 458 732 529 l 732 157 q 740 105 732 125 q 762 75 748 86 q 796 61 776 65 q 839 58 816 58 l 843 58 l 843 0 l 601 0 l 601 451 q 592 532 601 496 q 566 591 584 567 q 519 628 548 616 q 448 641 490 641 q 373 625 405 641 q 321 579 342 609 q 291 508 301 550 q 280 416 280 466 l 280 151 q 290 102 280 120 q 314 73 299 83 q 351 61 330 64 q 394 58 371 58 l 398 58 "},"õ":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 641 81 725 177 q 398 -14 558 -14 q 264 9 323 -14 q 162 81 204 33 q 99 202 121 129 q 77 373 77 275 q 159 663 77 568 q 403 758 241 758 q 537 734 478 758 q 639 663 597 711 q 702 543 680 615 q 725 373 725 471 m 211 374 q 222 236 211 295 q 254 136 232 176 q 313 75 277 96 q 402 55 349 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 q 579 511 590 452 q 547 609 569 570 q 488 668 525 649 q 400 688 452 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 m 513 932 q 546 938 534 932 q 566 954 559 944 q 576 978 573 965 q 581 1006 579 991 l 644 1006 q 632 944 641 974 q 606 892 623 915 q 562 855 588 869 q 498 842 535 842 q 430 855 461 842 q 374 885 400 869 q 325 916 348 902 q 280 929 303 929 q 247 923 259 929 q 228 907 235 917 q 217 883 221 897 q 212 856 214 870 l 150 856 q 161 917 152 887 q 188 969 170 946 q 233 1006 206 992 q 297 1020 259 1020 q 364 1006 334 1020 q 420 976 394 992 q 469 945 446 959 q 513 932 492 932 "},"˙":{"x_min":151,"x_max":310,"ha":452,"o":"m 151 970 q 157 1011 151 994 q 174 1037 163 1027 q 199 1051 184 1047 q 230 1056 213 1056 q 261 1051 246 1056 q 286 1037 275 1047 q 303 1011 297 1027 q 310 970 310 994 q 303 929 310 945 q 286 903 297 913 q 261 888 275 892 q 230 884 246 884 q 199 888 213 884 q 174 903 184 892 q 157 929 163 913 q 151 970 151 945 "},"ê":{"x_min":77,"x_max":673,"ha":743,"o":"m 384 678 q 264 617 306 678 q 214 438 222 556 l 538 438 q 529 536 538 491 q 503 612 521 580 q 456 661 485 644 q 384 678 427 678 m 398 -14 q 263 11 323 -14 q 162 85 203 36 q 98 205 120 134 q 77 366 77 276 q 156 659 77 561 q 384 758 236 758 q 505 736 451 758 q 595 673 558 715 q 653 568 633 631 q 673 423 673 505 l 673 358 l 211 358 q 227 230 213 284 q 266 142 241 176 q 330 91 292 107 q 417 74 368 74 q 484 82 453 74 q 540 104 515 90 q 584 134 565 117 q 615 170 603 151 q 633 153 625 165 q 642 122 642 140 q 627 77 642 101 q 581 33 612 53 q 505 0 551 13 q 398 -14 459 -14 m 173 860 q 208 905 189 879 q 248 958 228 931 q 284 1013 267 986 q 312 1064 301 1040 l 443 1064 q 471 1013 454 1040 q 507 958 488 986 q 547 905 527 931 q 583 860 566 879 l 583 842 l 528 842 q 448 899 488 864 q 377 966 408 933 q 306 899 345 933 q 227 842 266 864 l 173 842 l 173 860 "},"″":{"x_min":82.53125,"x_max":485.46875,"ha":567,"o":"m 341 992 l 485 992 l 444 666 l 381 666 l 341 992 m 82 992 l 227 992 l 185 666 l 123 666 l 82 992 "},"„":{"x_min":41,"x_max":547,"ha":625,"o":"m 269 58 q 256 -27 269 14 q 217 -104 244 -68 q 146 -167 189 -139 q 41 -214 103 -195 l 41 -155 q 141 -102 109 -133 q 173 -30 173 -71 q 165 -8 173 -17 q 147 8 158 1 q 122 22 135 15 q 98 38 109 28 q 79 61 86 47 q 72 96 72 75 q 98 157 72 136 q 162 179 124 179 q 203 171 184 179 q 237 148 222 163 q 260 110 252 132 q 269 58 269 87 m 547 58 q 534 -27 547 14 q 495 -104 522 -68 q 424 -167 467 -139 q 319 -214 381 -195 l 319 -155 q 419 -102 386 -133 q 451 -30 451 -71 q 443 -8 451 -17 q 425 8 436 1 q 400 22 413 15 q 376 38 387 28 q 357 61 364 47 q 350 96 350 75 q 375 157 350 136 q 440 179 401 179 q 480 171 461 179 q 514 148 500 163 q 538 110 529 132 q 547 58 547 87 "},"ч":{"x_min":21,"x_max":857.265625,"ha":889,"o":"m 461 0 l 461 58 l 480 58 q 523 61 503 58 q 560 73 544 64 q 584 102 575 83 q 594 151 594 120 l 594 348 q 530 310 560 327 q 468 281 499 293 q 404 262 437 269 q 331 256 371 256 q 249 268 285 256 q 189 304 213 281 q 151 360 164 327 q 139 433 139 393 l 139 591 q 129 640 139 622 q 105 669 120 659 q 68 683 89 679 q 25 686 48 686 l 21 686 l 21 745 l 387 745 l 387 686 l 383 686 q 340 683 360 686 q 303 670 319 680 q 279 642 288 660 q 269 593 269 623 l 269 447 q 297 373 269 399 q 380 347 325 347 q 431 350 407 347 q 481 361 456 354 q 533 380 506 369 q 594 408 561 392 l 594 591 q 584 640 594 622 q 560 669 575 659 q 523 683 544 679 q 480 686 503 686 l 475 686 l 475 745 l 857 745 l 857 686 l 838 686 q 795 683 815 686 q 758 670 774 680 q 734 642 743 660 q 725 593 725 623 l 725 151 q 734 102 725 120 q 758 73 743 83 q 795 61 774 64 q 838 58 815 58 l 857 58 l 857 0 l 461 0 "},"δ":{"x_min":75,"x_max":725,"ha":802,"o":"m 594 307 q 577 401 594 358 q 533 480 560 444 q 471 546 505 517 q 401 599 437 576 q 327 562 363 587 q 264 498 291 538 q 221 404 238 459 q 205 274 205 348 q 218 186 205 226 q 255 117 231 146 q 315 71 280 87 q 395 55 350 55 q 542 120 491 55 q 594 307 594 185 m 305 891 q 315 836 305 860 q 345 788 324 812 q 399 741 365 765 q 479 686 432 717 q 580 614 534 651 q 657 535 625 577 q 707 445 689 494 q 725 337 725 396 q 701 185 725 250 q 635 75 678 120 q 531 8 592 31 q 397 -14 471 -14 q 268 6 327 -14 q 166 66 209 27 q 99 164 123 106 q 75 296 75 221 q 96 422 75 368 q 155 518 118 477 q 244 586 193 559 q 353 632 294 614 q 289 679 319 654 q 238 733 260 704 q 205 794 217 761 q 193 866 193 827 q 211 950 193 914 q 263 1012 230 987 q 343 1050 296 1037 q 444 1063 389 1063 q 545 1050 501 1063 q 616 1019 588 1038 q 660 974 645 999 q 675 923 675 948 q 647 858 675 879 q 572 836 620 836 q 563 901 572 871 q 535 955 553 932 q 490 991 516 978 q 431 1004 464 1004 q 374 996 398 1004 q 335 972 350 988 q 312 936 319 957 q 305 891 305 916 "},"Â":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 m 286 1089 q 321 1134 302 1108 q 361 1187 341 1160 q 397 1242 380 1215 q 425 1293 414 1269 l 556 1293 q 584 1242 567 1269 q 620 1187 601 1215 q 660 1134 640 1160 q 696 1089 679 1108 l 696 1071 l 641 1071 q 561 1128 601 1093 q 490 1195 521 1162 q 419 1128 458 1162 q 340 1071 379 1093 l 286 1071 l 286 1089 "},"Į":{"x_min":52.421875,"x_max":456.640625,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 m 122 -180 q 135 -118 122 -147 q 172 -65 149 -89 q 224 -24 195 -41 q 286 0 254 -7 l 365 0 q 320 -20 343 -6 q 279 -54 297 -34 q 248 -102 260 -75 q 235 -162 235 -129 q 243 -203 235 -186 q 263 -230 250 -220 q 293 -246 276 -241 q 332 -251 311 -251 q 372 -248 350 -251 q 420 -240 394 -245 l 420 -312 q 395 -321 409 -317 q 366 -328 381 -325 q 337 -332 351 -330 q 312 -334 323 -334 q 233 -324 268 -334 q 173 -297 198 -315 q 135 -249 148 -278 q 122 -180 122 -220 "},"ω":{"x_min":77,"x_max":990,"ha":1067,"o":"m 727 -14 q 661 -3 691 -14 q 606 26 630 7 q 564 71 581 45 q 536 128 546 97 l 530 128 q 502 71 520 97 q 460 26 484 45 q 405 -3 436 7 q 339 -14 375 -14 q 230 8 278 -14 q 147 73 182 30 q 95 184 113 117 q 77 338 77 250 q 90 466 77 407 q 127 578 103 526 q 184 675 151 631 q 255 758 216 720 l 313 712 q 271 632 290 672 q 239 546 252 591 q 219 451 226 501 q 211 338 211 400 q 223 216 211 268 q 255 131 235 165 q 303 81 276 97 q 359 65 330 65 q 417 77 393 65 q 458 111 442 88 q 485 164 475 133 q 501 233 496 194 q 490 270 496 249 q 479 314 484 290 q 472 363 475 338 q 469 411 469 388 q 487 494 469 469 q 532 519 505 519 q 579 494 560 519 q 597 411 597 469 q 593 363 597 388 q 585 314 590 338 q 575 270 581 290 q 565 233 570 249 q 581 164 570 194 q 607 111 591 133 q 648 77 624 88 q 706 65 673 65 q 763 81 736 65 q 811 131 790 97 q 843 216 831 165 q 855 338 855 268 q 847 451 855 400 q 827 546 840 501 q 795 632 814 591 q 753 712 777 672 l 811 758 q 882 675 850 720 q 939 578 915 631 q 976 466 963 526 q 990 338 990 407 q 971 184 990 250 q 919 73 953 117 q 836 8 885 30 q 727 -14 788 -14 "},"Ţ":{"x_min":28,"x_max":823,"ha":851,"o":"m 494 158 q 503 105 494 125 q 527 75 512 86 q 564 61 543 65 q 608 58 585 58 l 640 58 l 640 0 l 208 0 l 208 58 l 240 58 q 283 61 263 58 q 320 73 304 64 q 344 102 335 83 q 354 151 354 120 l 354 922 l 221 922 q 170 913 190 922 q 136 888 149 904 q 116 852 122 873 q 107 808 110 831 l 99 749 l 28 749 l 34 992 l 816 992 l 823 749 l 751 749 l 744 808 q 734 852 741 831 q 715 888 728 873 q 681 913 702 904 q 629 922 660 922 l 494 922 l 494 158 m 323 -288 q 345 -188 334 -242 q 365 -85 356 -135 l 486 -85 l 486 -98 q 462 -147 476 -120 q 433 -202 449 -174 q 401 -258 417 -231 q 370 -307 384 -285 l 323 -307 l 323 -288 "},"´":{"x_min":265,"x_max":534,"ha":802,"o":"m 265 860 q 297 905 280 879 q 329 958 313 931 q 360 1013 345 986 q 385 1064 374 1040 l 534 1064 l 534 1049 q 496 1004 521 1031 q 440 946 470 976 q 377 889 410 917 q 317 842 345 860 l 265 842 l 265 860 "},"Ĉ":{"x_min":79,"x_max":806,"ha":853,"o":"m 524 1006 q 648 994 596 1006 q 736 961 701 982 q 788 911 771 940 q 806 850 806 883 q 796 809 806 827 q 771 779 787 791 q 733 759 755 766 q 685 753 711 753 q 676 817 685 785 q 648 874 668 848 q 598 915 629 899 q 522 931 567 931 q 388 902 443 931 q 298 818 333 873 q 248 682 264 763 q 232 496 232 601 q 249 326 232 403 q 300 193 265 249 q 390 108 336 138 q 522 77 445 77 q 612 87 573 77 q 681 113 651 97 q 734 151 711 129 q 774 196 756 172 q 793 175 786 188 q 801 141 801 162 q 783 87 801 115 q 728 37 765 60 q 635 0 691 15 q 501 -14 578 -14 q 318 22 397 -14 q 186 126 239 59 q 106 288 133 193 q 79 497 79 382 q 107 703 79 609 q 192 864 136 796 q 331 968 248 931 q 524 1006 415 1006 m 311 1089 q 346 1134 327 1108 q 386 1187 366 1160 q 422 1242 405 1215 q 450 1293 439 1269 l 581 1293 q 609 1242 592 1269 q 645 1187 626 1215 q 685 1134 665 1160 q 721 1089 704 1108 l 721 1071 l 666 1071 q 586 1128 626 1093 q 515 1195 546 1162 q 444 1128 483 1162 q 365 1071 404 1093 l 311 1071 l 311 1089 "},"И":{"x_min":52.421875,"x_max":1063.265625,"ha":1116,"o":"m 659 0 l 659 58 l 676 58 q 721 61 700 58 q 757 75 741 65 q 781 105 772 86 q 790 158 790 125 l 790 708 l 324 185 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 283 l 790 806 l 790 833 q 781 886 790 866 q 757 916 772 905 q 721 930 741 926 q 676 933 700 933 l 659 933 l 659 992 l 1063 992 l 1063 933 l 1044 933 q 1000 930 1021 933 q 964 916 979 926 q 940 886 949 905 q 931 833 931 866 l 931 151 q 940 102 931 120 q 964 73 949 83 q 1001 61 980 64 q 1044 58 1021 58 l 1063 58 l 1063 0 l 659 0 "},"Љ":{"x_min":0,"x_max":1181,"ha":1235,"o":"m 894 992 l 894 933 l 862 933 q 819 930 839 933 q 782 918 798 927 q 757 891 767 909 q 748 846 748 874 l 748 549 l 808 549 q 979 528 908 549 q 1095 472 1050 508 q 1160 386 1140 436 q 1181 275 1181 335 q 1160 163 1181 214 q 1097 76 1139 113 q 990 20 1055 40 q 838 0 926 0 l 475 0 l 475 58 l 494 58 q 537 61 516 58 q 573 73 557 64 q 598 100 589 82 q 608 145 608 117 l 608 922 l 423 922 q 410 740 419 835 q 389 551 402 645 q 360 370 376 457 q 323 214 343 283 q 283 108 304 151 q 237 38 263 65 q 181 1 212 12 q 111 -10 149 -10 q 27 15 55 -10 q 0 86 0 40 q 16 147 0 122 q 61 171 32 171 q 65 151 61 162 q 77 130 69 139 q 98 113 86 120 q 128 106 111 106 q 165 112 147 106 q 199 138 183 118 q 233 197 216 158 q 267 302 250 236 q 290 400 279 347 q 308 509 300 454 q 323 620 317 565 q 334 725 330 676 q 340 813 338 774 q 343 876 343 852 q 334 907 343 895 q 310 924 325 918 q 274 931 294 930 q 231 933 254 933 l 210 933 l 210 992 l 894 992 m 748 69 l 814 69 q 912 81 872 69 q 978 118 953 93 q 1015 180 1004 142 q 1027 267 1027 217 q 1013 365 1027 324 q 972 431 1000 405 q 899 468 943 456 q 793 479 855 479 l 748 479 l 748 69 "},"р":{"x_min":18.421875,"x_max":777,"ha":853,"o":"m 469 669 q 378 651 415 669 q 320 596 342 633 q 290 504 299 559 q 280 373 280 448 q 290 245 280 300 q 321 151 299 189 q 379 94 343 113 q 470 74 415 74 q 549 94 517 74 q 602 151 581 113 q 632 245 623 189 q 642 374 642 301 q 632 503 642 448 q 602 595 623 559 q 548 650 581 632 q 469 669 515 669 m 777 373 q 758 199 777 272 q 703 78 739 126 q 614 8 667 31 q 493 -14 561 -14 q 420 -5 453 -14 q 361 19 388 3 q 315 58 335 36 q 280 108 295 80 l 275 108 q 278 40 276 72 q 279 14 278 28 q 279 -11 279 0 q 280 -33 280 -24 q 280 -49 280 -43 l 280 -182 q 290 -231 280 -212 q 314 -259 299 -249 q 351 -272 330 -269 q 394 -275 371 -275 l 398 -275 l 398 -334 l 25 -334 l 25 -275 l 36 -275 q 80 -272 59 -275 q 116 -258 101 -268 q 140 -227 131 -247 q 150 -175 150 -207 l 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 18 686 l 18 745 l 261 745 l 275 618 l 280 618 q 316 676 296 650 q 361 720 335 702 q 420 748 387 738 q 493 758 452 758 q 614 735 561 758 q 703 665 667 712 q 758 545 739 618 q 777 373 777 473 "},"Ω":{"x_min":58,"x_max":988,"ha":1046,"o":"m 86 608 q 113 771 86 698 q 194 897 140 845 q 331 978 248 950 q 525 1007 414 1007 q 710 978 630 1007 q 847 897 791 950 q 931 771 903 845 q 960 608 960 698 q 879 359 960 454 q 644 233 798 263 l 641 111 l 774 111 q 829 115 806 111 q 868 131 852 120 q 892 158 883 141 q 905 197 901 174 l 916 243 l 988 243 l 978 0 l 565 0 l 575 291 q 682 322 638 298 q 754 388 726 347 q 793 484 781 428 q 806 610 806 540 q 791 747 806 687 q 742 848 776 807 q 655 910 708 889 q 525 932 602 932 q 393 910 447 932 q 304 848 339 889 q 255 747 270 807 q 239 610 239 687 q 252 484 239 540 q 292 388 265 428 q 363 322 320 347 q 470 291 407 298 l 480 0 l 67 0 l 58 243 l 129 243 l 139 197 q 153 158 144 174 q 177 131 161 141 q 215 115 192 120 q 271 111 238 111 l 404 111 l 401 233 q 166 359 247 263 q 86 608 86 454 "},"т":{"x_min":28,"x_max":732,"ha":760,"o":"m 723 745 l 732 527 l 664 527 l 657 574 q 645 628 652 606 q 627 662 638 650 q 600 681 617 675 q 560 686 584 686 l 446 686 l 446 152 q 456 102 446 121 q 480 74 465 83 q 517 61 496 64 q 560 58 537 58 l 592 58 l 592 0 l 183 0 l 183 58 l 202 58 q 245 61 225 58 q 282 74 266 64 q 306 102 297 83 q 316 152 316 121 l 316 686 l 200 686 q 160 681 176 686 q 133 662 144 675 q 115 628 122 650 q 103 574 108 606 l 95 527 l 28 527 l 36 745 l 723 745 "},"П":{"x_min":52.421875,"x_max":1007.25,"ha":1060,"o":"m 52 992 l 1007 992 l 1007 933 l 988 933 q 944 930 965 933 q 908 916 923 926 q 884 886 893 905 q 875 833 875 866 l 875 151 q 884 102 875 120 q 908 73 893 83 q 945 61 924 64 q 988 58 965 58 l 1007 58 l 1007 0 l 603 0 l 603 58 l 620 58 q 665 61 644 58 q 701 75 685 65 q 725 105 716 86 q 734 158 734 125 l 734 922 l 324 922 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 "},"Ö":{"x_min":78,"x_max":952,"ha":1031,"o":"m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 m 309 1185 q 314 1221 309 1206 q 329 1245 319 1236 q 351 1258 338 1254 q 379 1263 364 1263 q 407 1258 394 1263 q 430 1245 420 1254 q 445 1221 439 1236 q 450 1185 450 1206 q 445 1149 450 1163 q 430 1124 439 1134 q 407 1111 420 1115 q 379 1107 394 1107 q 329 1124 349 1107 q 309 1185 309 1142 m 573 1185 q 578 1221 573 1206 q 593 1245 583 1236 q 615 1258 602 1254 q 643 1263 628 1263 q 671 1258 658 1263 q 694 1245 684 1254 q 709 1221 703 1236 q 714 1185 714 1206 q 709 1149 714 1163 q 694 1124 703 1134 q 671 1111 684 1115 q 643 1107 658 1107 q 593 1124 613 1107 q 573 1185 573 1142 "},"z":{"x_min":58,"x_max":632,"ha":710,"o":"m 471 79 q 512 88 496 79 q 538 113 528 98 q 555 150 549 129 q 566 193 562 170 l 573 225 l 632 225 l 625 0 l 58 0 l 58 55 l 461 665 l 243 665 q 198 658 216 665 q 169 637 180 651 q 150 602 158 623 q 136 553 143 581 l 135 548 l 78 548 l 91 745 l 624 745 l 624 688 l 219 79 l 471 79 "},"™":{"x_min":37,"x_max":1101.828125,"ha":1160,"o":"m 903 512 l 903 566 q 941 572 927 566 q 958 601 956 579 l 958 896 l 811 512 l 766 512 l 618 897 l 618 606 q 633 573 618 580 q 674 566 647 566 l 674 512 l 474 512 l 474 566 l 488 566 q 525 572 509 566 q 543 601 541 578 l 543 902 q 537 921 542 914 q 526 932 533 928 q 508 936 518 935 q 488 937 498 937 l 474 937 l 474 992 l 663 992 l 805 607 l 952 992 l 1101 992 l 1101 937 l 1086 937 q 1065 936 1075 937 q 1048 931 1055 935 q 1037 919 1041 927 q 1034 899 1034 912 l 1034 605 q 1037 584 1034 592 q 1048 573 1041 577 q 1065 567 1055 568 q 1086 566 1075 566 l 1101 566 l 1101 512 l 903 512 m 275 606 q 280 585 275 592 q 291 573 284 577 q 308 567 299 568 q 328 566 318 566 l 350 566 l 350 512 l 124 512 l 124 566 l 148 566 q 168 567 158 566 q 184 572 177 568 q 195 583 191 576 q 200 602 200 590 l 200 937 l 138 937 q 113 933 123 937 q 97 922 103 929 q 87 907 91 916 q 83 888 84 899 l 77 855 l 37 855 l 40 992 l 436 992 l 441 855 l 400 855 l 395 888 q 380 922 392 908 q 339 937 369 937 l 275 937 l 275 606 "},"Θ":{"x_min":78,"x_max":952,"ha":1031,"o":"m 386 630 l 393 604 q 403 577 396 589 q 421 557 409 565 q 450 544 432 548 q 497 540 469 540 l 529 540 q 604 557 579 540 q 636 604 629 574 l 643 630 l 715 630 l 715 379 l 643 379 l 636 406 q 604 453 629 435 q 529 470 579 470 l 497 470 q 450 466 469 470 q 421 453 432 461 q 403 433 409 445 q 393 406 396 421 l 386 379 l 315 379 l 315 630 l 386 630 m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 "},"Ř":{"x_min":52.421875,"x_max":920,"ha":911,"o":"m 770 168 q 838 85 805 113 q 915 58 871 58 l 920 58 l 920 0 l 900 0 q 793 4 835 0 q 722 22 751 9 q 672 60 693 36 q 628 123 651 84 l 439 433 l 324 433 l 324 150 q 333 101 324 120 q 358 73 342 83 q 394 61 373 64 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 426 992 q 695 924 607 992 q 784 722 784 857 q 765 624 784 666 q 718 551 747 582 q 652 500 689 520 q 579 467 616 479 l 770 168 m 324 503 l 420 503 q 521 516 480 503 q 585 556 561 529 q 619 624 609 583 q 630 718 630 664 q 618 812 630 773 q 581 875 607 851 q 516 911 556 900 q 417 922 475 922 l 324 922 l 324 503 m 218 1293 l 272 1293 q 312 1265 291 1280 q 351 1234 332 1251 q 388 1200 370 1217 q 422 1166 406 1183 q 455 1200 437 1183 q 493 1234 473 1217 q 533 1265 513 1251 q 573 1293 554 1280 l 628 1293 l 628 1274 q 592 1229 611 1255 q 552 1176 572 1203 q 516 1121 533 1148 q 488 1071 499 1094 l 357 1071 q 329 1121 346 1094 q 293 1176 312 1148 q 253 1229 273 1203 q 218 1274 234 1255 l 218 1293 "},"Ň":{"x_min":52.421875,"x_max":1020.5625,"ha":1060,"o":"m 789 0 l 268 800 l 268 158 q 277 105 268 125 q 302 75 287 86 q 338 61 317 65 q 382 58 359 58 l 401 58 l 401 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 306 992 l 804 223 l 804 839 q 795 888 804 869 q 770 917 785 907 q 734 930 754 927 q 690 933 713 933 l 671 933 l 671 992 l 1020 992 l 1020 933 l 1002 933 q 958 930 979 933 q 922 916 937 926 q 897 886 906 905 q 889 833 889 866 l 889 0 l 789 0 m 357 1293 l 411 1293 q 451 1265 430 1280 q 490 1234 471 1251 q 527 1200 509 1217 q 561 1166 545 1183 q 594 1200 576 1183 q 632 1234 612 1217 q 672 1265 652 1251 q 712 1293 693 1280 l 767 1293 l 767 1274 q 731 1229 750 1255 q 691 1176 711 1203 q 655 1121 672 1148 q 627 1071 638 1094 l 496 1071 q 468 1121 485 1094 q 432 1176 451 1148 q 392 1229 412 1203 q 357 1274 373 1255 l 357 1293 "},"É":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 324 69 l 592 69 q 649 78 626 69 q 688 103 673 87 q 713 139 704 118 q 725 183 722 160 l 735 243 l 807 243 l 797 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 753 992 l 760 749 l 688 749 l 681 808 q 670 852 678 831 q 648 888 662 873 q 611 913 633 904 q 558 922 589 922 l 324 922 l 324 553 l 660 553 l 660 483 l 324 483 l 324 69 m 369 1089 q 401 1134 384 1108 q 433 1187 417 1160 q 464 1242 449 1215 q 489 1293 478 1269 l 638 1293 l 638 1278 q 600 1233 625 1260 q 544 1175 574 1205 q 481 1118 514 1146 q 421 1071 449 1089 l 369 1071 l 369 1089 "},"и":{"x_min":31.75,"x_max":924.25,"ha":956,"o":"m 924 745 l 924 686 l 905 686 q 862 683 882 686 q 825 670 841 680 q 801 642 810 660 q 792 593 792 623 l 792 151 q 801 102 792 120 q 825 73 810 83 q 862 61 841 64 q 905 58 882 58 l 924 58 l 924 0 l 528 0 l 528 58 l 547 58 q 590 61 570 58 q 627 73 611 64 q 651 102 642 83 q 661 151 661 120 l 661 497 l 294 158 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 31 686 l 31 745 l 427 745 l 427 686 l 408 686 q 365 683 385 686 q 328 670 344 680 q 304 642 313 660 q 294 593 294 623 l 294 245 l 661 587 l 661 591 q 651 640 661 622 q 627 669 642 659 q 590 683 611 679 q 547 686 570 686 l 543 686 l 543 745 l 924 745 "},"³":{"x_min":56,"x_max":487,"ha":555,"o":"m 241 389 q 103 416 150 389 q 56 495 56 444 q 73 544 56 525 q 119 563 90 563 q 126 520 119 542 q 148 482 134 499 q 185 455 163 465 q 238 444 207 444 q 329 473 296 444 q 362 568 362 502 q 326 647 362 618 q 214 677 291 677 l 168 677 l 168 733 l 213 733 q 262 741 240 733 q 302 766 285 750 q 328 804 319 781 q 338 854 338 826 q 319 925 338 901 q 258 950 301 950 q 214 940 232 950 q 186 914 196 930 q 171 875 175 897 q 167 829 167 853 q 124 832 143 829 q 91 841 104 834 q 71 859 78 847 q 64 889 64 871 q 76 935 64 914 q 113 972 89 957 q 174 997 138 988 q 258 1006 210 1006 q 341 996 304 1006 q 406 969 379 986 q 448 925 433 951 q 463 867 463 899 q 451 812 463 836 q 420 769 440 787 q 375 737 401 750 q 321 716 350 724 l 321 709 q 378 696 349 704 q 431 672 407 687 q 471 632 455 656 q 487 569 487 607 q 464 484 487 519 q 405 429 441 450 q 326 398 369 407 q 241 389 283 389 "},"[":{"x_min":139,"x_max":449,"ha":499,"o":"m 139 -178 l 139 1055 l 449 1055 l 449 996 l 388 996 q 344 992 365 996 q 308 978 324 989 q 284 948 292 968 q 275 896 275 928 l 275 -19 q 284 -71 275 -51 q 308 -101 292 -91 q 344 -115 324 -112 q 388 -119 365 -119 l 449 -119 l 449 -178 l 139 -178 "},"ζ":{"x_min":75,"x_max":642,"ha":642,"o":"m 75 283 q 95 456 75 369 q 153 623 115 542 q 245 779 191 705 q 369 915 300 853 q 308 928 339 919 q 244 952 276 938 q 182 986 213 967 q 125 1028 152 1005 l 164 1078 q 214 1041 186 1059 q 276 1008 243 1023 q 346 983 310 993 q 419 969 382 973 q 454 991 435 980 q 494 1011 473 1002 q 536 1026 515 1020 q 578 1032 558 1032 q 625 1020 608 1032 q 642 984 642 1008 q 592 921 642 941 q 436 902 543 902 q 334 763 377 836 q 263 615 291 690 q 223 465 236 540 q 209 319 209 390 q 220 226 209 262 q 254 165 230 189 q 316 126 277 141 q 412 98 355 111 q 487 77 454 89 q 543 46 520 64 q 580 4 567 29 q 593 -54 593 -20 q 580 -127 593 -90 q 541 -194 567 -163 q 475 -248 515 -225 q 381 -282 435 -271 l 381 -212 q 430 -193 410 -204 q 461 -169 450 -183 q 478 -140 473 -156 q 483 -106 483 -124 q 477 -68 483 -84 q 452 -39 470 -52 q 402 -16 434 -26 q 320 4 371 -6 q 215 35 261 15 q 138 89 170 56 q 91 169 107 122 q 75 283 75 217 "},"∏":{"x_min":52.421875,"x_max":1048.578125,"ha":1101,"o":"m 1048 992 l 1048 933 l 1030 933 q 986 930 1007 933 q 950 916 965 926 q 925 886 934 905 q 917 833 917 866 l 917 -182 q 927 -231 918 -212 q 951 -259 936 -249 q 987 -272 967 -269 q 1030 -275 1007 -275 l 1048 -275 l 1048 -334 l 644 -334 l 644 -275 l 662 -275 q 707 -272 686 -275 q 743 -258 727 -268 q 767 -227 758 -247 q 776 -175 776 -207 l 776 922 l 324 922 l 324 -175 q 333 -227 324 -207 q 357 -258 342 -247 q 394 -272 373 -268 q 438 -275 415 -275 l 456 -275 l 456 -334 l 52 -334 l 52 -275 l 70 -275 q 114 -272 93 -275 q 150 -258 135 -268 q 175 -227 166 -247 q 184 -175 184 -207 l 184 839 q 173 888 183 869 q 149 917 164 907 q 113 930 133 927 q 70 933 93 933 l 52 933 l 52 992 l 1048 992 "},"Έ":{"x_min":-46,"x_max":920,"ha":978,"o":"m 437 69 l 705 69 q 762 78 739 69 q 801 103 786 87 q 826 139 817 118 q 838 183 835 160 l 848 243 l 920 243 l 910 0 l 165 0 l 165 58 l 183 58 q 226 61 206 58 q 263 73 247 64 q 287 102 278 83 q 297 151 297 120 l 297 833 q 288 886 297 866 q 263 916 279 905 q 227 930 248 926 q 183 933 206 933 l 165 933 l 165 992 l 866 992 l 873 749 l 801 749 l 794 808 q 783 852 791 831 q 761 888 775 873 q 724 913 746 904 q 671 922 702 922 l 437 922 l 437 553 l 773 553 l 773 483 l 437 483 l 437 69 m -46 789 q -29 833 -37 807 q -13 887 -20 859 q 1 942 -5 915 q 11 993 7 970 l 136 993 l 136 978 q 116 935 131 962 q 82 878 102 908 q 39 819 61 848 q 0 771 17 790 l -46 771 l -46 789 "},"Ρ":{"x_min":52.421875,"x_max":785,"ha":839,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 442 992 q 594 971 530 992 q 701 913 659 951 q 764 822 743 876 q 785 700 785 768 q 765 580 785 637 q 702 479 746 523 q 586 409 657 435 q 412 382 515 382 l 324 382 l 324 150 q 333 101 324 120 q 358 73 342 83 q 394 61 373 64 q 438 58 415 58 l 484 58 l 484 0 l 52 0 m 324 452 l 397 452 q 504 465 459 452 q 576 507 548 478 q 617 583 604 536 q 631 694 631 629 q 619 795 631 752 q 582 866 608 838 q 516 909 557 895 q 417 922 476 922 l 324 922 l 324 452 "},"ğ":{"x_min":32,"x_max":731,"ha":747,"o":"m 731 715 q 726 687 731 700 q 713 664 722 674 q 690 648 704 654 q 657 643 676 643 q 655 658 657 650 q 648 673 653 666 q 634 684 643 680 q 611 688 625 688 q 579 685 593 688 q 551 673 565 681 q 590 604 575 644 q 606 505 606 564 q 590 410 606 453 q 543 334 574 366 q 465 284 512 302 q 355 267 418 267 q 337 267 347 267 q 316 268 326 267 q 297 269 306 268 q 283 271 288 270 q 273 256 278 264 q 264 237 268 248 q 259 214 261 227 q 256 186 256 201 q 262 159 256 169 q 279 143 268 148 q 304 135 289 137 q 335 134 318 134 l 479 134 q 576 118 536 134 q 640 75 615 102 q 677 9 666 47 q 689 -73 689 -29 q 666 -181 689 -133 q 599 -263 644 -230 q 484 -315 554 -297 q 320 -334 415 -334 q 103 -276 175 -334 q 32 -117 32 -219 q 45 -41 32 -74 q 82 13 59 -9 q 136 51 106 36 q 200 72 166 65 q 173 86 186 77 q 149 108 160 96 q 132 138 139 121 q 126 174 126 154 q 148 239 126 212 q 219 292 170 266 q 166 325 189 304 q 126 374 142 346 q 102 434 110 401 q 94 501 94 466 q 110 609 94 561 q 159 689 126 656 q 240 740 191 722 q 355 758 289 758 q 405 754 380 758 q 450 744 429 750 q 487 729 470 737 q 514 712 504 721 q 538 736 524 723 q 568 760 551 749 q 605 779 585 772 q 648 787 625 787 q 685 781 669 787 q 710 765 700 775 q 725 742 720 755 q 731 715 731 729 m 162 -103 q 170 -167 162 -137 q 196 -218 177 -197 q 246 -252 215 -240 q 327 -264 278 -264 q 440 -250 395 -264 q 510 -211 484 -236 q 547 -151 536 -186 q 558 -75 558 -116 q 549 -15 558 -39 q 524 21 541 7 q 484 39 508 34 q 428 45 459 45 l 302 45 q 250 39 276 45 q 206 17 225 33 q 174 -27 186 1 q 162 -103 162 -56 m 224 505 q 254 377 224 417 q 351 336 284 336 q 408 346 385 336 q 447 377 432 356 q 468 430 462 397 q 475 507 475 462 q 446 644 475 600 q 350 688 418 688 q 253 643 282 688 q 224 505 224 598 m 356 842 q 270 857 307 842 q 210 898 234 872 q 175 958 187 924 q 162 1033 163 993 l 225 1033 q 271 959 237 981 q 356 937 305 937 q 441 959 407 937 q 486 1033 475 981 l 551 1033 q 537 958 549 993 q 501 898 525 924 q 441 857 477 872 q 356 842 405 842 "},"ª":{"x_min":49,"x_max":507.359375,"ha":530,"o":"m 169 663 q 188 600 169 618 q 233 583 206 583 q 274 592 256 583 q 305 616 293 600 q 324 653 318 631 q 331 699 331 674 l 331 768 l 289 766 q 232 758 255 765 q 195 737 209 750 q 175 706 181 724 q 169 663 169 687 m 262 943 q 228 936 241 943 q 208 916 215 929 q 198 887 201 904 q 195 852 195 871 q 114 866 142 852 q 86 912 86 880 q 100 952 86 936 q 138 979 114 969 q 195 994 163 989 q 265 999 228 999 q 345 991 311 999 q 401 965 379 983 q 435 920 424 947 q 447 851 447 892 l 447 645 q 460 603 447 615 q 507 592 473 592 l 507 537 l 372 537 l 347 600 l 340 600 q 313 573 328 586 q 281 550 299 560 q 241 534 263 540 q 193 528 219 528 q 87 563 126 528 q 49 669 49 599 q 103 771 49 738 q 272 809 158 804 l 331 812 l 331 851 q 329 888 331 871 q 319 917 326 905 q 299 936 312 929 q 262 943 285 943 "},"ї":{"x_min":22,"x_max":427.75,"ha":444,"o":"m 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 294 745 l 294 158 q 304 105 294 125 q 328 75 313 86 q 364 61 343 65 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 m 22 956 q 27 992 22 977 q 42 1016 32 1007 q 64 1029 51 1025 q 92 1034 77 1034 q 120 1029 107 1034 q 143 1016 133 1025 q 158 992 152 1007 q 163 956 163 977 q 158 920 163 934 q 143 895 152 905 q 120 882 133 886 q 92 878 107 878 q 42 895 62 878 q 22 956 22 913 m 286 956 q 291 992 286 977 q 306 1016 296 1007 q 328 1029 315 1025 q 356 1034 341 1034 q 384 1029 371 1034 q 407 1016 397 1025 q 422 992 416 1007 q 427 956 427 977 q 422 920 427 934 q 407 895 416 905 q 384 882 397 886 q 356 878 371 878 q 306 895 326 878 q 286 956 286 913 "},"T":{"x_min":28,"x_max":823,"ha":851,"o":"m 494 158 q 503 105 494 125 q 527 75 512 86 q 564 61 543 65 q 608 58 585 58 l 640 58 l 640 0 l 208 0 l 208 58 l 240 58 q 283 61 263 58 q 320 73 304 64 q 344 102 335 83 q 354 151 354 120 l 354 922 l 221 922 q 170 913 190 922 q 136 888 149 904 q 116 852 122 873 q 107 808 110 831 l 99 749 l 28 749 l 34 992 l 816 992 l 823 749 l 751 749 l 744 808 q 734 852 741 831 q 715 888 728 873 q 681 913 702 904 q 629 922 660 922 l 494 922 l 494 158 "},"š":{"x_min":62,"x_max":566,"ha":627,"o":"m 291 -14 q 196 -4 239 -14 q 124 22 154 4 q 78 69 94 41 q 62 133 62 96 q 71 179 62 161 q 93 209 80 198 q 122 224 106 220 q 149 229 137 229 q 156 160 149 192 q 180 104 163 128 q 223 66 196 80 q 290 52 251 52 q 352 61 325 52 q 397 87 379 70 q 425 127 415 104 q 435 178 435 150 q 427 223 435 204 q 401 258 420 241 q 351 291 383 274 q 272 330 320 308 q 183 375 221 353 q 121 423 145 397 q 84 482 96 449 q 72 560 72 515 q 90 645 72 608 q 143 706 109 681 q 226 744 178 731 q 334 757 274 757 q 421 746 383 757 q 485 719 459 736 q 524 678 511 702 q 537 629 537 655 q 510 568 537 591 q 436 546 484 546 q 409 658 436 618 q 325 698 383 698 q 269 690 292 698 q 231 665 246 681 q 209 628 216 650 q 202 581 202 607 q 211 536 202 555 q 240 500 220 516 q 291 468 260 484 q 367 434 323 453 q 456 389 419 411 q 518 340 494 366 q 554 280 542 313 q 566 203 566 247 q 546 108 566 149 q 490 40 526 68 q 404 0 454 13 q 291 -14 353 -14 m 115 1064 l 169 1064 q 209 1036 188 1051 q 248 1005 229 1022 q 285 971 267 988 q 319 937 303 954 q 352 971 334 954 q 390 1005 370 988 q 430 1036 410 1022 q 470 1064 451 1051 l 525 1064 l 525 1045 q 489 1000 508 1026 q 449 947 469 974 q 413 892 430 919 q 385 842 396 865 l 254 842 q 226 892 243 865 q 190 947 209 919 q 150 1000 170 974 q 115 1045 131 1026 l 115 1064 "},"є":{"x_min":77,"x_max":629,"ha":684,"o":"m 393 -14 q 265 7 324 -14 q 165 74 207 28 q 100 193 123 121 q 77 367 77 265 q 100 554 77 479 q 165 674 123 629 q 263 739 207 720 q 386 758 320 758 q 472 749 429 758 q 550 723 515 741 q 606 678 584 705 q 628 616 628 652 q 596 548 628 568 q 503 528 565 528 q 498 590 503 561 q 479 641 493 619 q 444 676 466 663 q 386 688 421 688 q 318 675 349 688 q 265 630 287 662 q 229 546 243 599 q 213 413 216 493 l 520 413 l 520 333 l 211 333 q 227 219 214 268 q 266 138 241 170 q 330 90 291 106 q 421 74 368 74 q 533 101 485 74 q 605 171 581 129 q 622 150 615 163 q 629 117 629 136 q 614 70 629 93 q 569 28 599 46 q 496 -2 540 9 q 393 -14 452 -14 "},"Þ":{"x_min":52.421875,"x_max":785,"ha":839,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 470 992 l 470 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 834 324 866 l 324 792 l 442 792 q 701 721 617 792 q 785 514 785 650 q 765 397 785 452 q 702 300 746 341 q 586 234 657 258 q 412 210 515 210 l 324 210 l 324 156 q 333 104 324 124 q 357 75 342 85 q 394 61 373 64 q 438 58 415 58 l 470 58 l 470 0 l 52 0 m 324 280 l 397 280 q 504 291 459 280 q 576 328 548 302 q 617 399 604 355 q 631 509 631 443 q 619 607 631 567 q 582 673 608 648 q 516 711 557 699 q 417 722 476 722 l 324 722 l 324 280 "},"j":{"x_min":-16.84375,"x_max":289,"ha":416,"o":"m 280 745 l 280 -10 q 260 -166 280 -104 q 203 -265 240 -228 q 116 -318 166 -302 q 5 -334 65 -334 l -16 -334 l -16 -264 l -6 -264 q 59 -252 30 -264 q 108 -210 88 -239 q 139 -131 128 -180 q 150 -9 150 -82 l 150 592 q 140 641 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 m 131 969 q 137 1010 131 993 q 153 1036 143 1026 q 178 1050 164 1046 q 209 1055 193 1055 q 240 1050 225 1055 q 265 1036 255 1046 q 282 1010 276 1026 q 289 969 289 993 q 282 928 289 944 q 265 902 276 912 q 240 887 255 891 q 209 883 225 883 q 178 887 193 883 q 153 902 164 891 q 137 928 143 912 q 131 969 131 944 "},"Σ":{"x_min":32,"x_max":782,"ha":840,"o":"m 573 127 q 629 137 606 127 q 667 164 652 147 q 691 206 683 182 q 704 259 700 231 l 710 301 l 782 301 l 775 0 l 32 0 l 32 44 l 320 486 l 63 951 l 63 992 l 714 992 l 721 749 l 649 749 l 642 809 q 632 853 639 832 q 610 888 624 873 q 573 913 595 904 q 520 922 551 922 l 230 922 l 436 552 l 436 531 l 172 127 l 573 127 "},"1":{"x_min":91.09375,"x_max":662.15625,"ha":777,"o":"m 133 0 l 133 58 l 226 58 q 270 61 249 58 q 306 75 291 65 q 330 105 321 86 q 340 158 340 125 l 340 887 q 289 828 313 855 q 244 783 266 802 q 201 753 222 764 q 160 743 181 743 q 110 763 130 743 q 91 817 91 784 q 133 830 112 823 q 178 851 154 838 q 231 881 203 863 q 293 925 259 899 l 391 997 l 480 997 l 480 158 q 489 105 480 125 q 513 75 498 86 q 549 61 529 65 q 594 58 570 58 l 662 58 l 662 0 l 133 0 "},"ϒ":{"x_min":-6.703125,"x_max":905.5,"ha":889,"o":"m 620 58 l 653 58 l 653 0 l 221 0 l 221 58 l 253 58 q 296 61 276 58 q 333 73 317 64 q 357 102 348 83 q 367 151 367 120 l 367 273 q 355 364 367 315 q 325 463 343 412 q 284 562 307 513 q 238 656 261 612 q 195 735 215 700 q 161 793 175 771 q 127 844 145 819 q 89 889 109 870 q 46 921 69 909 q -1 933 23 933 l -6 933 l -6 992 l 63 992 q 145 983 111 992 q 208 954 180 975 q 262 898 237 933 q 315 807 286 862 q 361 712 339 760 q 402 619 383 664 q 436 533 421 574 q 463 457 452 491 q 491 552 476 503 q 524 647 507 601 q 557 737 540 694 q 588 814 573 780 q 639 907 615 871 q 688 964 663 943 q 739 994 712 985 q 796 1002 765 1002 q 878 975 851 1002 q 905 905 905 948 q 900 869 905 886 q 885 841 894 852 q 865 823 876 829 q 841 817 853 817 q 819 868 835 847 q 771 889 803 889 q 737 882 753 889 q 705 857 721 876 q 669 804 688 838 q 628 717 651 770 q 605 662 617 694 q 579 594 592 631 q 552 518 565 558 q 529 440 539 479 q 513 364 519 401 q 507 295 507 327 l 507 158 q 516 105 507 125 q 540 75 525 86 q 576 61 556 65 q 620 58 596 58 "},"ℓ":{"x_min":62,"x_max":615,"ha":695,"o":"m 441 53 q 482 61 463 53 q 515 89 500 70 q 540 138 530 108 q 556 212 550 169 l 615 212 q 591 113 606 156 q 550 42 575 71 q 492 -1 526 13 q 412 -16 458 -16 q 328 -1 365 -16 q 264 42 290 13 q 224 116 238 72 q 210 216 210 159 l 210 345 q 137 323 174 333 q 62 303 99 312 l 62 361 q 138 382 101 371 q 210 405 175 394 l 210 791 q 255 959 210 900 q 402 1018 301 1018 q 531 959 486 1018 q 576 791 576 900 q 558 657 576 717 q 508 550 540 597 q 434 466 477 503 q 340 402 391 430 l 340 219 q 346 152 340 183 q 365 99 352 122 q 396 65 377 77 q 441 53 415 53 m 517 790 q 511 855 517 826 q 493 905 504 885 q 464 937 481 926 q 425 948 447 948 q 382 936 399 948 q 357 902 366 924 q 344 851 347 881 q 340 787 340 822 l 340 470 q 416 522 383 493 q 471 590 449 551 q 506 677 494 628 q 517 790 517 727 "},"ĉ":{"x_min":77,"x_max":629,"ha":684,"o":"m 393 -14 q 265 7 324 -14 q 165 74 207 28 q 100 193 123 121 q 77 367 77 265 q 100 554 77 479 q 165 674 123 629 q 263 739 207 720 q 386 758 320 758 q 472 749 429 758 q 550 723 515 741 q 606 679 584 705 q 628 616 628 652 q 596 548 628 568 q 503 529 565 529 q 498 590 503 561 q 479 641 493 619 q 444 676 466 663 q 386 688 421 688 q 314 673 346 688 q 259 622 282 658 q 224 523 236 585 q 211 368 211 461 q 260 147 211 220 q 421 74 309 74 q 533 102 485 74 q 605 173 581 129 q 622 151 615 164 q 629 118 629 137 q 614 71 629 95 q 569 28 599 47 q 496 -2 540 9 q 393 -14 452 -14 m 188 860 q 223 905 204 879 q 263 958 243 931 q 299 1013 282 986 q 327 1064 316 1040 l 458 1064 q 486 1013 469 1040 q 522 958 503 986 q 562 905 542 931 q 598 860 581 879 l 598 842 l 543 842 q 463 899 503 864 q 392 966 423 933 q 321 899 360 933 q 242 842 281 864 l 188 842 l 188 860 "},"ī":{"x_min":2,"x_max":427.15625,"ha":444,"o":"m 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 294 745 l 294 158 q 304 105 294 125 q 328 75 313 86 q 364 61 343 65 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 m 405 842 l 2 842 l 2 924 l 405 924 l 405 842 "},"О":{"x_min":78,"x_max":952,"ha":1031,"o":"m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 "},"ξ":{"x_min":75,"x_max":622,"ha":653,"o":"m 209 289 q 224 213 209 243 q 268 162 239 183 q 341 126 297 140 q 441 98 384 112 q 515 77 482 89 q 572 46 548 64 q 609 4 596 29 q 622 -54 622 -20 q 609 -127 622 -90 q 570 -194 596 -163 q 503 -248 543 -225 q 409 -282 463 -271 l 409 -209 q 458 -190 438 -201 q 490 -167 478 -180 q 507 -138 501 -153 q 512 -104 512 -122 q 505 -67 512 -83 q 480 -38 498 -51 q 431 -16 462 -26 q 349 4 399 -6 q 240 33 290 15 q 152 81 189 52 q 95 154 116 111 q 75 257 75 197 q 96 364 75 313 q 153 458 117 415 q 241 535 190 501 q 350 592 291 569 l 350 600 q 270 623 309 610 q 201 655 231 637 q 153 698 171 673 q 135 754 135 722 q 148 812 135 784 q 184 864 161 839 q 236 909 206 888 q 299 947 266 930 q 244 957 273 951 q 187 974 216 964 q 132 997 159 984 q 84 1028 106 1011 l 123 1078 q 169 1050 142 1063 q 228 1026 197 1037 q 292 1007 259 1015 q 357 997 325 1000 q 394 1019 373 1008 q 440 1039 415 1030 q 489 1053 464 1048 q 537 1059 514 1059 q 580 1047 567 1059 q 594 1016 594 1036 q 578 981 594 996 q 533 955 562 965 q 461 939 503 944 q 365 934 418 934 q 292 859 318 900 q 265 768 265 819 q 278 722 265 743 q 313 684 291 701 q 362 655 334 667 q 420 636 390 643 q 447 649 432 642 q 477 661 462 656 q 508 669 493 666 q 537 673 524 673 q 580 662 563 673 q 597 632 597 650 q 589 609 597 620 q 567 589 582 598 q 530 576 552 581 q 480 570 509 570 q 466 571 475 570 q 448 573 457 572 q 429 575 438 574 q 414 577 421 576 q 344 536 380 565 q 278 469 308 508 q 229 383 248 430 q 209 289 209 337 "},"Ď":{"x_min":52.421875,"x_max":931,"ha":1010,"o":"m 931 497 q 902 291 931 383 q 817 134 873 199 q 676 34 761 69 q 478 0 591 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 478 992 q 669 959 585 992 q 811 863 753 926 q 900 707 869 799 q 931 497 931 615 m 445 69 q 590 97 528 69 q 694 179 652 125 q 756 313 735 234 q 777 496 777 393 q 694 813 777 703 q 446 922 611 922 l 324 922 l 324 69 l 445 69 m 256 1293 l 310 1293 q 350 1265 329 1280 q 389 1234 370 1251 q 426 1200 408 1217 q 460 1166 444 1183 q 493 1200 475 1183 q 531 1234 511 1217 q 571 1265 551 1251 q 611 1293 592 1280 l 666 1293 l 666 1274 q 630 1229 649 1255 q 590 1176 610 1203 q 554 1121 571 1148 q 526 1071 537 1094 l 395 1071 q 367 1121 384 1094 q 331 1176 350 1148 q 291 1229 311 1203 q 256 1274 272 1255 l 256 1293 "},"&":{"x_min":50,"x_max":1018,"ha":1031,"o":"m 796 0 l 681 122 q 626 68 656 93 q 559 25 595 43 q 478 -3 522 7 q 380 -14 433 -14 q 235 7 297 -14 q 131 66 172 28 q 70 158 90 104 q 50 277 50 211 q 66 380 50 336 q 110 457 82 424 q 181 515 139 490 q 272 561 222 540 q 225 622 245 593 q 192 679 205 650 q 171 737 178 707 q 165 801 165 767 q 179 885 165 847 q 226 949 194 922 q 308 991 258 976 q 427 1006 358 1006 q 540 990 493 1006 q 617 947 587 974 q 659 884 646 920 q 673 808 673 848 q 660 729 673 763 q 619 665 647 694 q 547 610 591 636 q 439 556 503 584 l 692 288 q 707 352 701 320 q 717 415 713 384 q 722 476 721 446 q 724 530 724 505 l 724 585 l 974 585 l 974 526 l 961 526 q 915 523 938 526 q 874 511 893 521 q 839 482 854 501 q 815 432 824 464 q 787 335 803 387 q 747 230 771 282 l 876 92 q 897 75 886 82 q 922 65 908 69 q 957 59 937 61 q 1005 58 977 58 l 1018 58 l 1018 0 l 796 0 m 393 65 q 468 73 433 65 q 533 96 503 82 q 586 131 562 111 q 631 176 611 152 l 324 505 q 266 466 292 487 q 222 416 240 444 q 194 353 204 388 q 184 274 184 318 q 199 184 184 223 q 242 119 214 145 q 308 78 270 92 q 393 65 346 65 m 550 806 q 544 858 550 834 q 522 899 537 882 q 482 926 507 916 q 423 936 458 936 q 328 900 361 936 q 295 805 295 865 q 301 756 295 779 q 318 710 306 733 q 348 663 330 687 q 392 609 366 638 q 463 647 433 627 q 512 690 493 666 q 541 741 532 713 q 550 806 550 770 "},"G":{"x_min":79,"x_max":965.046875,"ha":992,"o":"m 556 -14 q 345 22 435 -14 q 196 126 256 59 q 108 288 137 193 q 79 497 79 382 q 109 703 79 609 q 202 864 140 796 q 354 968 263 931 q 565 1006 445 1006 q 700 994 642 1006 q 795 961 757 982 q 853 911 834 940 q 872 850 872 883 q 861 809 872 827 q 834 779 851 791 q 793 759 817 766 q 743 753 770 753 q 733 817 743 785 q 702 874 724 848 q 645 915 680 899 q 559 931 610 931 q 409 902 471 931 q 307 817 346 873 q 250 680 268 762 q 232 494 232 599 q 251 309 232 390 q 310 173 269 228 q 418 89 352 117 q 579 60 484 60 q 656 64 619 60 q 723 77 694 68 l 723 302 q 714 352 723 333 q 689 380 705 371 q 653 394 674 390 q 609 397 632 397 l 604 397 l 604 456 l 965 456 l 965 397 l 959 397 q 922 394 939 397 q 891 380 904 390 q 871 350 878 370 q 864 297 864 330 l 864 49 q 720 1 794 17 q 556 -14 646 -14 "},"ΰ":{"x_min":25.203125,"x_max":747,"ha":823,"o":"m 426 -14 q 304 5 356 -14 q 218 62 253 25 q 166 154 183 100 q 150 276 150 208 l 150 591 q 139 640 150 622 q 112 669 129 659 q 74 683 95 679 q 29 686 52 686 l 25 686 l 25 745 l 280 745 l 280 288 q 324 129 280 183 q 448 74 368 74 q 554 100 513 74 q 618 170 595 125 q 651 277 642 216 q 660 412 660 339 q 648 515 660 470 q 618 593 637 561 q 575 643 599 624 q 528 669 551 662 q 535 706 528 690 q 552 733 541 722 q 578 750 563 744 q 609 756 593 756 q 671 729 645 756 q 714 658 697 702 q 738 558 730 614 q 747 444 747 502 q 740 328 747 385 q 719 220 734 271 q 681 126 704 169 q 621 52 657 83 q 537 3 585 21 q 426 -14 489 -14 m 197 945 q 216 998 197 982 q 262 1015 235 1015 q 287 1010 275 1015 q 308 998 299 1006 q 322 977 317 989 q 328 945 328 964 q 308 892 328 909 q 262 876 288 876 q 216 892 235 876 q 197 945 197 909 m 493 945 q 511 998 493 982 q 558 1015 530 1015 q 582 1010 570 1015 q 603 998 594 1006 q 617 977 612 989 q 623 945 623 964 q 603 892 623 909 q 558 876 583 876 q 511 892 530 876 q 493 945 493 909 m 361 959 q 377 1004 369 978 q 394 1058 386 1030 q 408 1114 402 1086 q 418 1164 415 1141 l 543 1164 l 543 1150 q 523 1106 538 1133 q 489 1048 509 1079 q 447 990 468 1018 q 407 942 425 961 l 361 942 l 361 959 "},"`":{"x_min":266,"x_max":536,"ha":802,"o":"m 536 842 l 483 842 q 422 889 455 860 q 359 946 390 917 q 303 1004 329 976 q 266 1049 278 1031 l 266 1064 l 414 1064 q 440 1013 425 1040 q 470 958 454 986 q 504 905 487 931 q 536 860 521 879 l 536 842 "},"ŏ":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 641 81 725 177 q 398 -14 558 -14 q 264 9 323 -14 q 162 81 204 33 q 99 202 121 129 q 77 373 77 275 q 159 663 77 568 q 403 758 241 758 q 537 734 478 758 q 639 663 597 711 q 702 543 680 615 q 725 373 725 471 m 211 374 q 222 236 211 295 q 254 136 232 176 q 313 75 277 96 q 402 55 349 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 q 579 511 590 452 q 547 609 569 570 q 488 668 525 649 q 400 688 452 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 m 400 842 q 314 857 351 842 q 254 898 278 872 q 219 958 231 924 q 206 1033 207 993 l 269 1033 q 315 959 281 981 q 400 937 349 937 q 485 959 451 937 q 530 1033 519 981 l 595 1033 q 581 958 593 993 q 545 898 569 924 q 485 857 521 872 q 400 842 449 842 "},"ý":{"x_min":5,"x_max":785,"ha":785,"o":"m 785 745 l 785 686 l 780 686 q 746 682 760 686 q 719 665 731 677 q 697 632 707 653 q 675 578 687 611 l 463 -5 q 417 -123 439 -72 q 372 -210 396 -174 q 320 -270 348 -247 q 256 -308 292 -294 q 173 -328 220 -323 q 65 -334 126 -334 l 52 -334 l 52 -264 q 174 -244 123 -264 q 262 -187 225 -223 q 323 -101 299 -150 q 365 5 348 -52 l 108 612 q 89 648 98 634 q 69 671 80 662 q 44 683 58 679 q 9 686 29 686 l 5 686 l 5 745 l 338 745 l 338 686 l 334 686 q 271 670 292 686 q 251 619 251 654 q 253 596 251 607 q 262 568 255 584 l 364 320 q 384 269 373 297 q 403 213 394 240 q 420 161 412 185 q 430 119 427 137 l 434 119 q 455 193 442 149 q 486 287 468 237 l 579 558 q 588 590 585 575 q 591 618 591 606 q 568 670 591 654 q 500 686 546 686 l 496 686 l 496 745 l 785 745 m 342 860 q 374 905 357 879 q 406 958 390 931 q 437 1013 422 986 q 462 1064 451 1040 l 611 1064 l 611 1049 q 573 1004 598 1031 q 517 946 547 976 q 454 889 487 917 q 394 842 422 860 l 342 842 l 342 860 "},"º":{"x_min":49,"x_max":502,"ha":551,"o":"m 169 765 q 193 629 169 674 q 275 583 216 583 q 357 629 333 583 q 381 765 381 674 q 356 899 381 855 q 274 943 332 943 q 193 899 216 943 q 169 765 169 855 m 502 763 q 444 586 502 644 q 275 528 386 528 q 108 586 168 528 q 49 763 49 645 q 106 941 49 883 q 277 999 164 999 q 371 984 330 999 q 441 940 412 969 q 486 867 470 911 q 502 763 502 823 "},"∞":{"x_min":49,"x_max":933,"ha":982,"o":"m 933 401 q 917 299 933 347 q 873 215 901 251 q 805 157 845 178 q 717 136 766 136 q 592 176 653 136 q 481 306 531 216 q 383 182 439 224 q 266 141 327 141 q 179 159 218 141 q 109 212 139 178 q 64 295 80 246 q 49 406 49 345 q 64 510 49 461 q 108 594 80 558 q 176 650 137 629 q 266 671 216 671 q 329 661 298 671 q 391 632 361 652 q 448 581 421 612 q 499 505 476 550 q 595 626 542 586 q 719 666 649 666 q 806 647 766 666 q 873 594 845 628 q 917 511 901 559 q 933 401 933 462 m 717 583 q 623 538 665 583 q 540 401 582 493 q 620 265 578 311 q 719 220 662 220 q 776 234 751 220 q 820 273 802 248 q 847 331 838 298 q 857 403 857 365 q 847 474 857 441 q 819 531 837 506 q 774 569 800 555 q 717 583 749 583 m 263 224 q 357 269 313 224 q 441 406 400 313 q 360 541 403 496 q 260 587 317 587 q 205 573 230 587 q 162 534 180 559 q 135 475 145 508 q 126 404 126 442 q 134 335 126 368 q 160 278 143 303 q 203 238 177 253 q 263 224 229 224 "},"ź":{"x_min":58,"x_max":632,"ha":710,"o":"m 471 79 q 512 88 496 79 q 538 113 528 98 q 555 150 549 129 q 566 193 562 170 l 573 225 l 632 225 l 625 0 l 58 0 l 58 55 l 461 665 l 243 665 q 198 658 216 665 q 169 637 180 651 q 150 602 158 623 q 136 553 143 581 l 135 548 l 78 548 l 91 745 l 624 745 l 624 688 l 219 79 l 471 79 m 290 860 q 322 905 305 879 q 354 958 338 931 q 385 1013 370 986 q 410 1064 399 1040 l 559 1064 l 559 1049 q 521 1004 546 1031 q 465 946 495 976 q 402 889 435 917 q 342 842 370 860 l 290 842 l 290 860 "},"я":{"x_min":11,"x_max":754.578125,"ha":773,"o":"m 356 686 q 284 674 314 686 q 237 643 255 663 q 211 598 219 623 q 203 544 203 572 q 212 487 203 514 q 238 439 220 459 q 285 407 256 419 q 356 395 314 395 l 492 395 l 492 686 l 356 686 m 261 111 q 229 62 246 83 q 184 28 211 41 q 116 7 157 14 q 11 0 74 0 l 11 58 l 15 58 q 49 63 34 58 q 77 77 64 67 q 103 103 91 87 q 129 141 116 119 l 251 350 q 187 371 219 357 q 128 410 154 386 q 85 468 102 434 q 69 546 69 502 q 85 629 69 592 q 136 692 102 666 q 223 731 170 717 q 350 745 276 745 l 741 745 l 741 686 l 736 686 q 692 683 713 686 q 656 669 672 679 q 632 640 641 659 q 623 591 623 622 l 623 151 q 632 102 623 120 q 656 73 641 83 q 692 61 672 64 q 736 58 713 58 l 754 58 l 754 0 l 359 0 l 359 58 l 378 58 q 421 61 401 58 q 458 73 442 64 q 482 101 473 83 q 492 150 492 120 l 492 325 l 376 325 l 261 111 "},"Ё":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 324 69 l 592 69 q 649 78 626 69 q 688 103 673 87 q 713 139 704 118 q 725 183 722 160 l 735 243 l 807 243 l 797 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 753 992 l 760 749 l 688 749 l 681 808 q 670 852 678 831 q 648 888 662 873 q 611 913 633 904 q 558 922 589 922 l 324 922 l 324 553 l 660 553 l 660 483 l 324 483 l 324 69 m 232 1185 q 237 1221 232 1206 q 252 1245 242 1236 q 274 1258 261 1254 q 302 1263 287 1263 q 330 1258 317 1263 q 353 1245 343 1254 q 368 1221 362 1236 q 373 1185 373 1206 q 368 1149 373 1163 q 353 1124 362 1134 q 330 1111 343 1115 q 302 1107 317 1107 q 252 1124 272 1107 q 232 1185 232 1142 m 496 1185 q 501 1221 496 1206 q 516 1245 506 1236 q 538 1258 525 1254 q 566 1263 551 1263 q 594 1258 581 1263 q 617 1245 607 1254 q 632 1221 626 1236 q 637 1185 637 1206 q 632 1149 637 1163 q 617 1124 626 1134 q 594 1111 607 1115 q 566 1107 581 1107 q 516 1124 536 1107 q 496 1185 496 1142 "},"ń":{"x_min":38.53125,"x_max":857.234375,"ha":896,"o":"m 412 58 l 412 0 l 38 0 l 38 58 l 50 58 q 94 61 73 58 q 130 75 115 65 q 154 105 145 86 q 164 158 164 125 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 271 745 l 289 631 l 296 631 q 341 695 317 670 q 392 733 366 720 q 449 752 419 747 q 513 758 479 758 q 610 742 567 758 q 684 693 653 726 q 730 608 714 660 q 746 486 746 557 l 746 157 q 753 105 746 125 q 775 75 761 86 q 809 61 790 65 q 852 58 829 58 l 857 58 l 857 0 l 615 0 l 615 479 q 606 560 615 524 q 580 619 598 595 q 533 656 562 644 q 462 669 504 669 q 383 650 415 669 q 331 601 351 632 q 303 529 311 570 q 294 444 294 488 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 412 58 m 386 860 q 418 905 401 879 q 450 958 434 931 q 481 1013 466 986 q 506 1064 495 1040 l 655 1064 l 655 1049 q 617 1004 642 1031 q 561 946 591 976 q 498 889 531 917 q 438 842 466 860 l 386 842 l 386 860 "}," ":{"x_min":0,"x_max":0,"ha":347},"Г":{"x_min":52.421875,"x_max":751,"ha":779,"o":"m 484 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 742 992 l 751 749 l 679 749 l 673 797 q 663 850 670 827 q 641 889 656 873 q 600 914 626 905 q 534 922 575 922 l 324 922 l 324 152 q 333 103 324 122 q 358 74 342 84 q 394 61 373 64 q 438 58 415 58 l 484 58 l 484 0 "},"Ь":{"x_min":52.421875,"x_max":785,"ha":839,"o":"m 484 992 l 484 933 l 438 933 q 394 930 415 933 q 358 918 373 927 q 333 889 342 908 q 324 840 324 871 l 324 549 l 412 549 q 583 528 513 549 q 699 472 654 508 q 764 386 744 436 q 785 275 785 335 q 764 163 785 214 q 701 76 743 113 q 594 20 659 40 q 442 0 530 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 74 134 64 q 174 103 165 84 q 184 152 184 122 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 484 992 m 324 66 l 417 66 q 516 78 476 66 q 582 115 557 91 q 619 178 608 140 q 631 266 631 215 q 617 364 631 323 q 576 430 604 405 q 504 468 548 456 q 397 479 459 479 l 324 479 l 324 66 "},"¤":{"x_min":89.234375,"x_max":686.40625,"ha":777,"o":"m 134 497 q 145 577 134 539 q 180 645 157 614 l 89 737 l 147 796 l 237 704 q 307 740 269 727 q 387 753 344 753 q 465 740 428 753 q 534 704 503 727 l 628 797 l 686 737 l 594 645 q 630 577 617 614 q 643 497 643 539 q 630 417 643 455 q 594 348 617 380 l 686 257 l 629 198 l 536 290 q 467 255 504 268 q 387 243 429 243 q 308 255 345 243 q 239 290 270 267 l 147 198 l 89 257 l 179 348 q 145 417 157 380 q 134 497 134 455 m 211 497 q 225 428 211 460 q 263 372 239 396 q 319 333 287 348 q 387 319 350 319 q 457 333 425 319 q 514 372 490 348 q 551 428 537 396 q 565 497 565 460 q 551 567 565 535 q 514 624 537 600 q 457 662 490 648 q 387 676 425 676 q 319 662 350 676 q 263 624 287 648 q 225 567 239 600 q 211 497 211 535 "},"Ĝ":{"x_min":79,"x_max":965.046875,"ha":992,"o":"m 556 -14 q 345 22 435 -14 q 196 126 256 59 q 108 288 137 193 q 79 497 79 382 q 109 703 79 609 q 202 864 140 796 q 354 968 263 931 q 565 1006 445 1006 q 700 994 642 1006 q 795 961 757 982 q 853 911 834 940 q 872 850 872 883 q 861 809 872 827 q 834 779 851 791 q 793 759 817 766 q 743 753 770 753 q 733 817 743 785 q 702 874 724 848 q 645 915 680 899 q 559 931 610 931 q 409 902 471 931 q 307 817 346 873 q 250 680 268 762 q 232 494 232 599 q 251 309 232 390 q 310 173 269 228 q 418 89 352 117 q 579 60 484 60 q 656 64 619 60 q 723 77 694 68 l 723 302 q 714 352 723 333 q 689 380 705 371 q 653 394 674 390 q 609 397 632 397 l 604 397 l 604 456 l 965 456 l 965 397 l 959 397 q 922 394 939 397 q 891 380 904 390 q 871 350 878 370 q 864 297 864 330 l 864 49 q 720 1 794 17 q 556 -14 646 -14 m 342 1089 q 377 1134 358 1108 q 417 1187 397 1160 q 453 1242 436 1215 q 481 1293 470 1269 l 612 1293 q 640 1242 623 1269 q 676 1187 657 1215 q 716 1134 696 1160 q 752 1089 735 1108 l 752 1071 l 697 1071 q 617 1128 657 1093 q 546 1195 577 1162 q 475 1128 514 1162 q 396 1071 435 1093 l 342 1071 l 342 1089 "},"p":{"x_min":18.421875,"x_max":777,"ha":853,"o":"m 469 669 q 378 651 415 669 q 320 596 342 633 q 290 504 299 559 q 280 373 280 448 q 290 245 280 300 q 321 151 299 189 q 379 94 343 113 q 470 74 415 74 q 549 94 517 74 q 602 151 581 113 q 632 245 623 189 q 642 374 642 301 q 632 503 642 448 q 602 595 623 559 q 548 650 581 632 q 469 669 515 669 m 777 373 q 758 199 777 272 q 703 78 739 126 q 614 8 667 31 q 493 -14 561 -14 q 420 -5 453 -14 q 361 19 388 3 q 315 58 335 36 q 280 108 295 80 l 275 108 q 278 40 276 72 q 279 14 278 28 q 279 -11 279 0 q 280 -33 280 -24 q 280 -49 280 -43 l 280 -182 q 290 -231 280 -212 q 314 -259 299 -249 q 351 -272 330 -269 q 394 -275 371 -275 l 398 -275 l 398 -334 l 25 -334 l 25 -275 l 36 -275 q 80 -272 59 -275 q 116 -258 101 -268 q 140 -227 131 -247 q 150 -175 150 -207 l 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 18 686 l 18 745 l 261 745 l 275 618 l 280 618 q 316 676 296 650 q 361 720 335 702 q 420 748 387 738 q 493 758 452 758 q 614 735 561 758 q 703 665 667 712 q 758 545 739 618 q 777 373 777 473 "},"Ю":{"x_min":52.421875,"x_max":1366,"ha":1445,"o":"m 1366 496 q 1338 287 1366 382 q 1258 126 1311 193 q 1127 22 1205 59 q 950 -14 1050 -14 q 769 21 846 -14 q 639 121 691 56 q 561 278 587 186 q 533 483 535 370 l 324 483 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 553 l 534 553 q 568 740 540 656 q 649 883 597 824 q 776 974 701 942 q 951 1007 852 1007 q 1128 970 1051 1007 q 1258 867 1205 934 q 1338 706 1311 800 q 1366 496 1366 612 m 686 497 q 701 312 686 393 q 746 175 715 231 q 828 90 778 119 q 950 60 878 60 q 1072 90 1022 60 q 1153 175 1122 119 q 1198 312 1184 231 q 1212 497 1212 393 q 1198 681 1212 600 q 1153 818 1184 762 q 1072 903 1122 874 q 951 932 1022 932 q 829 903 879 932 q 747 818 778 874 q 701 681 715 762 q 686 497 686 600 "},"ο":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 641 81 725 177 q 398 -14 558 -14 q 264 9 323 -14 q 162 81 204 33 q 99 202 121 129 q 77 373 77 275 q 159 663 77 568 q 403 758 241 758 q 537 734 478 758 q 639 663 597 711 q 702 543 680 615 q 725 373 725 471 m 211 374 q 222 236 211 295 q 254 136 232 176 q 313 75 277 96 q 402 55 349 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 q 579 511 590 452 q 547 609 569 570 q 488 668 525 649 q 400 688 452 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 "},"S":{"x_min":66,"x_max":685,"ha":756,"o":"m 342 -14 q 223 0 275 -14 q 136 39 171 14 q 83 101 101 65 q 66 181 66 137 q 92 249 66 223 q 166 275 118 275 q 179 192 168 231 q 212 121 190 152 q 268 73 234 91 q 349 55 301 55 q 493 100 441 55 q 544 230 544 145 q 533 297 544 267 q 498 351 523 326 q 433 398 473 375 q 333 446 393 421 q 222 502 269 472 q 143 569 175 532 q 97 652 112 606 q 82 754 82 697 q 104 860 82 814 q 168 939 127 907 q 264 989 208 972 q 386 1006 320 1006 q 496 993 448 1006 q 578 958 544 980 q 628 908 611 936 q 646 850 646 880 q 616 782 646 805 q 536 760 587 760 q 529 824 536 792 q 504 880 521 855 q 457 921 486 905 q 386 936 428 936 q 317 925 347 936 q 265 893 286 914 q 233 843 244 873 q 222 778 222 814 q 232 705 222 737 q 268 648 243 674 q 333 600 293 623 q 432 553 373 577 q 539 500 492 528 q 618 438 585 472 q 667 361 650 403 q 685 265 685 318 q 660 147 685 199 q 592 59 636 95 q 484 4 547 23 q 342 -14 420 -14 "},"/":{"x_min":0,"x_max":400,"ha":400,"o":"m 82 -168 l 0 -168 l 319 1055 l 400 1055 l 82 -168 "},"Ŧ":{"x_min":28,"x_max":823,"ha":851,"o":"m 494 524 l 728 524 l 728 454 l 494 454 l 494 157 q 503 105 494 125 q 527 75 512 86 q 564 61 543 65 q 608 58 585 58 l 640 58 l 640 0 l 208 0 l 208 58 l 240 58 q 283 61 263 58 q 320 73 304 64 q 344 101 335 83 q 354 151 354 120 l 354 454 l 122 454 l 122 524 l 354 524 l 354 922 l 221 922 q 170 913 190 922 q 136 888 149 904 q 116 852 122 873 q 107 808 110 831 l 99 749 l 28 749 l 34 992 l 816 992 l 823 749 l 751 749 l 744 808 q 734 852 741 831 q 715 888 728 873 q 681 913 702 904 q 629 922 660 922 l 494 922 l 494 524 "},"ђ":{"x_min":23.84375,"x_max":732,"ha":850,"o":"m 25 0 l 25 58 l 36 58 q 80 61 59 58 q 116 75 101 65 q 140 105 131 86 q 150 157 150 125 l 150 819 l 23 819 l 23 889 l 150 889 l 150 902 q 140 951 150 933 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 25 996 l 25 1055 l 280 1055 l 280 889 l 518 889 l 518 819 l 280 819 l 280 721 q 280 682 280 702 q 278 643 279 661 q 275 603 276 623 l 282 603 q 486 730 344 730 q 591 714 545 730 q 668 665 637 698 q 715 580 699 632 q 732 458 732 529 l 732 -11 q 712 -166 732 -104 q 659 -265 693 -228 q 578 -318 625 -302 q 474 -334 530 -334 l 453 -334 l 453 -264 l 462 -264 q 521 -252 495 -264 q 564 -210 546 -239 q 591 -132 582 -181 q 601 -10 601 -83 l 601 451 q 592 532 601 497 q 566 591 584 567 q 519 628 548 616 q 448 641 490 641 q 373 625 405 641 q 321 579 342 609 q 291 508 301 550 q 280 416 280 466 l 280 151 q 290 102 280 120 q 314 73 299 83 q 351 61 330 64 q 394 58 371 58 l 398 58 l 398 0 l 25 0 "},"y":{"x_min":5,"x_max":785,"ha":785,"o":"m 785 745 l 785 686 l 780 686 q 746 682 760 686 q 719 665 731 677 q 697 632 707 653 q 675 578 687 611 l 463 -5 q 417 -123 439 -72 q 372 -210 396 -174 q 320 -270 348 -247 q 256 -308 292 -294 q 173 -328 220 -323 q 65 -334 126 -334 l 52 -334 l 52 -264 q 174 -244 123 -264 q 262 -187 225 -223 q 323 -101 299 -150 q 365 5 348 -52 l 108 612 q 89 648 98 634 q 69 671 80 662 q 44 683 58 679 q 9 686 29 686 l 5 686 l 5 745 l 338 745 l 338 686 l 334 686 q 271 670 292 686 q 251 619 251 654 q 253 596 251 607 q 262 568 255 584 l 364 320 q 384 269 373 297 q 403 213 394 240 q 420 161 412 185 q 430 119 427 137 l 434 119 q 455 193 442 149 q 486 287 468 237 l 579 558 q 588 590 585 575 q 591 618 591 606 q 568 670 591 654 q 500 686 546 686 l 496 686 l 496 745 l 785 745 "},"Π":{"x_min":52.421875,"x_max":1007.25,"ha":1060,"o":"m 52 992 l 1007 992 l 1007 933 l 988 933 q 944 930 965 933 q 908 916 923 926 q 884 886 893 905 q 875 833 875 866 l 875 151 q 884 102 875 120 q 908 73 893 83 q 945 61 924 64 q 988 58 965 58 l 1007 58 l 1007 0 l 603 0 l 603 58 l 620 58 q 665 61 644 58 q 701 75 685 65 q 725 105 716 86 q 734 158 734 125 l 734 922 l 324 922 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 "},"‗":{"x_min":-7,"x_max":578,"ha":571,"o":"m 578 -115 l -7 -115 l -7 -33 l 578 -33 l 578 -115 m 578 -279 l -7 -279 l -7 -196 l 578 -196 l 578 -279 "},"–":{"x_min":-7,"x_max":702,"ha":695,"o":"m 702 331 l -7 331 l -7 414 l 702 414 l 702 331 "},"ë":{"x_min":77,"x_max":673,"ha":743,"o":"m 384 678 q 264 617 306 678 q 214 438 222 556 l 538 438 q 529 536 538 491 q 503 612 521 580 q 456 661 485 644 q 384 678 427 678 m 398 -14 q 263 11 323 -14 q 162 85 203 36 q 98 205 120 134 q 77 366 77 276 q 156 659 77 561 q 384 758 236 758 q 505 736 451 758 q 595 673 558 715 q 653 568 633 631 q 673 423 673 505 l 673 358 l 211 358 q 227 230 213 284 q 266 142 241 176 q 330 91 292 107 q 417 74 368 74 q 484 82 453 74 q 540 104 515 90 q 584 134 565 117 q 615 170 603 151 q 633 153 625 165 q 642 122 642 140 q 627 77 642 101 q 581 33 612 53 q 505 0 551 13 q 398 -14 459 -14 m 172 956 q 177 992 172 977 q 192 1016 182 1007 q 214 1029 201 1025 q 242 1034 227 1034 q 270 1029 257 1034 q 293 1016 283 1025 q 308 992 302 1007 q 313 956 313 977 q 308 920 313 934 q 293 895 302 905 q 270 882 283 886 q 242 878 257 878 q 192 895 212 878 q 172 956 172 913 m 436 956 q 441 992 436 977 q 456 1016 446 1007 q 478 1029 465 1025 q 506 1034 491 1034 q 534 1029 521 1034 q 557 1016 547 1025 q 572 992 566 1007 q 577 956 577 977 q 572 920 577 934 q 557 895 566 905 q 534 882 547 886 q 506 878 521 878 q 456 895 476 878 q 436 956 436 913 "},"б":{"x_min":77,"x_max":723,"ha":800,"o":"m 77 430 q 82 576 77 507 q 101 704 87 644 q 139 812 115 763 q 200 898 163 862 q 289 958 237 935 q 410 990 341 982 q 499 1001 457 996 q 574 1013 541 1006 q 630 1032 607 1020 q 660 1063 652 1044 l 705 1063 q 683 971 703 1005 q 625 918 663 937 q 532 890 588 899 q 404 873 477 882 q 280 846 326 864 q 209 794 234 828 q 174 704 183 759 q 161 565 164 649 l 166 565 q 198 625 177 597 q 249 674 218 653 q 318 707 279 695 q 404 719 356 719 q 642 626 562 719 q 723 353 723 533 q 703 196 723 264 q 643 80 683 127 q 540 10 602 34 q 395 -14 479 -14 q 157 94 237 -14 q 77 430 77 203 m 588 353 q 578 482 588 427 q 545 574 568 537 q 486 631 522 612 q 394 649 449 649 q 303 631 339 649 q 245 574 266 612 q 216 482 224 537 q 207 353 207 427 q 251 131 207 207 q 394 55 295 55 q 486 74 449 55 q 545 131 522 93 q 578 225 568 169 q 588 353 588 280 "},"ƒ":{"x_min":-56,"x_max":788,"ha":777,"o":"m 617 549 l 434 549 l 326 -12 q 279 -167 307 -105 q 213 -266 251 -229 q 128 -318 175 -302 q 24 -334 81 -334 q 4 -333 15 -334 q -18 -330 -7 -332 q -39 -327 -29 -329 q -56 -323 -49 -325 l -43 -255 q -30 -258 -38 -256 q -14 -261 -23 -259 q 3 -263 -5 -262 q 20 -264 12 -264 q 81 -251 54 -264 q 128 -207 107 -237 q 166 -128 149 -176 q 195 -9 182 -79 l 304 549 l 163 549 l 176 619 l 317 619 l 344 757 q 377 863 356 817 q 430 941 398 909 q 507 989 463 972 q 608 1006 551 1006 q 742 979 697 1006 q 788 908 788 953 q 758 840 788 862 q 672 818 728 818 q 669 868 672 844 q 659 909 667 892 q 637 937 651 927 q 601 947 623 947 q 522 904 550 947 q 478 773 494 861 l 448 619 l 630 619 l 617 549 "},"у":{"x_min":5,"x_max":785,"ha":785,"o":"m 785 745 l 785 686 l 780 686 q 746 682 760 686 q 719 665 731 677 q 697 632 707 653 q 675 578 687 611 l 463 -5 q 417 -123 439 -72 q 372 -210 396 -174 q 320 -270 348 -247 q 256 -308 292 -294 q 173 -328 220 -323 q 65 -334 126 -334 l 52 -334 l 52 -264 q 174 -244 123 -264 q 262 -187 225 -223 q 323 -101 299 -150 q 365 5 348 -52 l 108 612 q 89 648 98 634 q 69 671 80 662 q 44 683 58 679 q 9 686 29 686 l 5 686 l 5 745 l 338 745 l 338 686 l 334 686 q 271 670 292 686 q 251 619 251 654 q 253 596 251 607 q 262 568 255 584 l 364 320 q 384 269 373 297 q 403 213 394 240 q 420 161 412 185 q 430 119 427 137 l 434 119 q 455 193 442 149 q 486 287 468 237 l 579 558 q 588 590 585 575 q 591 618 591 606 q 568 670 591 654 q 500 686 546 686 l 496 686 l 496 745 l 785 745 "},"J":{"x_min":-16,"x_max":456.640625,"ha":496,"o":"m -16 -264 l -3 -264 q 76 -252 41 -264 q 135 -210 111 -239 q 171 -131 158 -180 q 184 -9 184 -82 l 184 839 q 174 888 184 870 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 -10 q 299 -166 324 -104 q 232 -265 275 -228 q 132 -318 190 -302 q 7 -334 74 -334 l -16 -334 l -16 -264 "},"ŷ":{"x_min":5,"x_max":785,"ha":785,"o":"m 785 745 l 785 686 l 780 686 q 746 682 760 686 q 719 665 731 677 q 697 632 707 653 q 675 578 687 611 l 463 -5 q 417 -123 439 -72 q 372 -210 396 -174 q 320 -270 348 -247 q 256 -308 292 -294 q 173 -328 220 -323 q 65 -334 126 -334 l 52 -334 l 52 -264 q 174 -244 123 -264 q 262 -187 225 -223 q 323 -101 299 -150 q 365 5 348 -52 l 108 612 q 89 648 98 634 q 69 671 80 662 q 44 683 58 679 q 9 686 29 686 l 5 686 l 5 745 l 338 745 l 338 686 l 334 686 q 271 670 292 686 q 251 619 251 654 q 253 596 251 607 q 262 568 255 584 l 364 320 q 384 269 373 297 q 403 213 394 240 q 420 161 412 185 q 430 119 427 137 l 434 119 q 455 193 442 149 q 486 287 468 237 l 579 558 q 588 590 585 575 q 591 618 591 606 q 568 670 591 654 q 500 686 546 686 l 496 686 l 496 745 l 785 745 m 205 860 q 240 905 221 879 q 280 958 260 931 q 316 1013 299 986 q 344 1064 333 1040 l 475 1064 q 503 1013 486 1040 q 539 958 520 986 q 579 905 559 931 q 615 860 598 879 l 615 842 l 560 842 q 480 899 520 864 q 409 966 440 933 q 338 899 377 933 q 259 842 298 864 l 205 842 l 205 860 "},"ŕ":{"x_min":46,"x_max":633,"ha":654,"o":"m 447 0 l 46 0 l 46 58 l 50 58 q 94 61 73 58 q 130 75 115 65 q 154 105 145 86 q 164 158 164 125 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 260 745 l 286 606 l 293 606 q 321 665 307 638 q 356 713 335 692 q 407 746 376 734 q 483 758 437 758 q 596 731 559 758 q 633 656 633 705 q 625 616 633 635 q 603 585 618 598 q 563 565 587 572 q 503 558 539 558 q 487 643 503 617 q 430 669 471 669 q 384 654 405 669 q 349 615 364 639 q 323 560 334 591 q 306 495 313 528 q 297 430 300 462 q 294 370 294 397 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 447 58 l 447 0 m 253 860 q 285 905 268 879 q 317 958 301 931 q 348 1013 333 986 q 373 1064 362 1040 l 522 1064 l 522 1049 q 484 1004 509 1031 q 428 946 458 976 q 365 889 398 917 q 305 842 333 860 l 253 842 l 253 860 "},"ώ":{"x_min":77,"x_max":990,"ha":1067,"o":"m 727 -14 q 661 -3 691 -14 q 606 26 630 7 q 564 71 581 45 q 536 128 546 97 l 530 128 q 502 71 520 97 q 460 26 484 45 q 405 -3 436 7 q 339 -14 375 -14 q 230 8 278 -14 q 147 73 182 30 q 95 184 113 117 q 77 338 77 250 q 90 466 77 407 q 127 578 103 526 q 184 675 151 631 q 255 758 216 720 l 313 712 q 271 632 290 672 q 239 546 252 591 q 219 451 226 501 q 211 338 211 400 q 223 216 211 268 q 255 131 235 165 q 303 81 276 97 q 359 65 330 65 q 417 77 393 65 q 458 111 442 88 q 485 164 475 133 q 501 233 496 194 q 490 270 496 249 q 479 314 484 290 q 472 363 475 338 q 469 411 469 388 q 487 494 469 469 q 532 519 505 519 q 579 494 560 519 q 597 411 597 469 q 593 363 597 388 q 585 314 590 338 q 575 270 581 290 q 565 233 570 249 q 581 164 570 194 q 607 111 591 133 q 648 77 624 88 q 706 65 673 65 q 763 81 736 65 q 811 131 790 97 q 843 216 831 165 q 855 338 855 268 q 847 451 855 400 q 827 546 840 501 q 795 632 814 591 q 753 712 777 672 l 811 758 q 882 675 850 720 q 939 578 915 631 q 976 466 963 526 q 990 338 990 407 q 971 184 990 250 q 919 73 953 117 q 836 8 885 30 q 727 -14 788 -14 m 474 860 q 490 904 482 878 q 506 958 499 930 q 521 1013 514 986 q 531 1064 527 1041 l 656 1064 l 656 1049 q 636 1006 651 1033 q 602 949 622 979 q 559 890 581 919 q 519 842 537 861 l 474 842 l 474 860 "},"˘":{"x_min":206,"x_max":595,"ha":802,"o":"m 400 842 q 314 857 351 842 q 254 898 278 872 q 219 958 231 924 q 206 1033 207 993 l 269 1033 q 315 959 281 981 q 400 937 349 937 q 485 959 451 937 q 530 1033 519 981 l 595 1033 q 581 958 593 993 q 545 898 569 924 q 485 857 521 872 q 400 842 449 842 "},"D":{"x_min":52.421875,"x_max":931,"ha":1010,"o":"m 931 497 q 902 291 931 383 q 817 134 873 199 q 676 34 761 69 q 478 0 591 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 478 992 q 669 959 585 992 q 811 863 753 926 q 900 707 869 799 q 931 497 931 615 m 445 69 q 590 97 528 69 q 694 179 652 125 q 756 313 735 234 q 777 496 777 393 q 694 813 777 703 q 446 922 611 922 l 324 922 l 324 69 l 445 69 "},"ł":{"x_min":38.75,"x_max":434.15625,"ha":450,"o":"m 171 463 l 171 902 q 161 951 171 932 q 137 980 152 970 q 100 993 121 990 q 57 996 80 996 l 38 996 l 38 1055 l 301 1055 l 301 539 l 432 614 l 432 533 l 301 459 l 301 158 q 311 105 301 125 q 335 75 320 86 q 371 61 350 65 q 415 58 392 58 l 434 58 l 434 0 l 38 0 l 38 58 l 57 58 q 101 61 80 58 q 137 75 122 65 q 161 105 152 86 q 171 158 171 125 l 171 384 l 53 318 l 53 396 l 171 463 "},"ĺ":{"x_min":18.421875,"x_max":416,"ha":431,"o":"m 36 58 q 80 61 59 58 q 116 75 101 65 q 140 105 131 86 q 150 158 150 125 l 150 902 q 140 951 150 932 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 18 996 l 18 1055 l 280 1055 l 280 158 q 289 105 280 125 q 314 75 298 86 q 350 61 329 65 q 394 58 371 58 l 412 58 l 412 0 l 18 0 l 18 58 l 36 58 m 147 1128 q 179 1173 162 1147 q 211 1226 195 1199 q 242 1281 227 1254 q 267 1332 256 1308 l 416 1332 l 416 1317 q 378 1272 403 1299 q 322 1214 352 1244 q 259 1157 292 1185 q 199 1110 227 1128 l 147 1110 l 147 1128 "},"ц":{"x_min":31.75,"x_max":910,"ha":942,"o":"m 910 -291 l 851 -291 l 844 -190 q 828 -101 841 -137 q 795 -42 815 -64 q 753 -9 776 -19 q 707 0 731 0 l 46 0 l 46 58 l 50 58 q 93 61 73 58 q 130 74 114 64 q 154 103 145 84 q 164 152 164 121 l 164 592 q 154 642 164 623 q 130 670 145 660 q 93 683 114 680 q 50 686 73 686 l 31 686 l 31 745 l 427 745 l 427 686 l 408 686 q 365 683 385 686 q 328 670 344 680 q 304 641 313 660 q 294 592 294 623 l 294 58 l 647 58 l 647 592 q 637 641 647 623 q 613 670 628 660 q 576 683 597 680 q 533 686 556 686 l 515 686 l 515 745 l 909 745 l 909 686 l 891 686 q 848 683 868 686 q 811 670 827 680 q 787 642 796 660 q 778 593 778 623 l 778 155 q 785 109 778 126 q 807 81 793 91 q 838 68 820 71 q 878 63 856 64 l 910 63 l 910 -291 "},"Л":{"x_min":0,"x_max":922.265625,"ha":975,"o":"m 111 -10 q 27 15 55 -10 q 0 86 0 40 q 16 147 0 122 q 61 171 32 171 q 65 151 61 162 q 77 130 69 139 q 98 113 86 120 q 128 106 111 106 q 165 112 147 106 q 199 138 183 118 q 233 197 216 158 q 267 302 250 236 q 290 399 279 347 q 308 508 300 452 q 323 618 317 564 q 334 722 330 673 q 340 811 338 771 q 343 876 343 851 q 334 907 343 895 q 310 924 325 918 q 274 931 294 930 q 231 933 254 933 l 210 933 l 210 992 l 922 992 l 922 933 l 903 933 q 859 930 880 933 q 823 916 838 926 q 799 886 808 905 q 790 833 790 866 l 790 158 q 799 105 790 125 q 823 75 808 86 q 859 61 838 65 q 903 58 880 58 l 922 58 l 922 0 l 518 0 l 518 58 l 536 58 q 580 61 559 58 q 616 75 600 65 q 640 105 631 86 q 649 158 649 125 l 649 922 l 423 922 q 410 740 419 835 q 389 551 402 645 q 360 370 376 457 q 323 214 343 283 q 283 108 304 151 q 237 38 263 65 q 181 1 212 12 q 111 -10 149 -10 "},"$":{"x_min":92,"x_max":679,"ha":777,"o":"m 414 950 q 524 936 479 948 q 597 902 569 923 q 639 854 626 882 q 652 794 652 826 q 622 726 652 749 q 542 704 592 704 q 536 767 542 735 q 517 825 531 798 q 478 869 503 851 q 414 891 453 887 l 414 561 q 528 506 478 534 q 610 448 577 479 q 661 378 644 417 q 679 291 679 340 q 610 129 679 187 q 414 58 541 71 l 414 -109 l 345 -109 l 345 56 q 276 59 311 56 q 209 69 242 62 q 147 87 177 76 q 92 113 117 98 l 92 327 l 150 327 q 164 250 150 287 q 204 184 178 214 q 266 136 230 155 q 345 114 301 117 l 345 458 q 238 516 281 487 q 167 576 194 544 q 128 644 140 607 q 116 726 116 681 q 132 811 116 773 q 177 878 148 850 q 249 923 207 906 q 345 947 292 941 l 345 1055 l 414 1055 l 414 950 m 538 268 q 532 318 538 296 q 510 359 525 340 q 472 395 496 378 q 414 427 449 411 l 414 118 q 506 169 474 129 q 538 268 538 208 m 256 741 q 262 689 256 711 q 279 649 267 666 q 306 617 290 631 q 345 591 323 604 l 345 888 q 306 869 323 882 q 278 836 289 855 q 262 793 267 817 q 256 741 256 769 "},"w":{"x_min":1,"x_max":1196,"ha":1197,"o":"m 661 741 l 800 329 q 817 275 808 304 q 834 218 826 246 q 849 164 843 190 q 860 122 856 139 l 864 122 q 883 207 870 156 q 918 325 897 257 l 987 548 q 996 586 993 566 q 1000 618 1000 606 q 977 670 1000 654 q 908 686 955 686 l 898 686 l 898 745 l 1196 745 l 1196 686 l 1178 686 q 1143 682 1158 686 q 1116 666 1128 678 q 1094 633 1104 654 q 1073 578 1084 612 l 894 0 l 783 0 l 617 489 l 592 580 l 395 0 l 286 0 l 104 612 q 87 648 95 634 q 66 671 78 662 q 40 683 55 679 q 5 686 25 686 l 1 686 l 1 745 l 344 745 l 344 686 l 325 686 q 263 674 284 686 q 242 628 242 662 q 246 600 242 616 q 253 568 249 584 l 319 335 q 333 280 326 310 q 347 220 340 250 q 359 165 353 191 q 368 122 364 139 l 372 122 q 381 163 375 139 q 394 213 387 186 q 411 268 402 240 q 429 320 420 295 l 573 741 l 661 741 "},"о":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 641 81 725 177 q 398 -14 558 -14 q 264 9 323 -14 q 162 81 204 33 q 99 202 121 129 q 77 373 77 275 q 159 663 77 568 q 403 758 241 758 q 537 734 478 758 q 639 663 597 711 q 702 543 680 615 q 725 373 725 471 m 211 374 q 222 236 211 295 q 254 136 232 176 q 313 75 277 96 q 402 55 349 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 q 579 511 590 452 q 547 609 569 570 q 488 668 525 649 q 400 688 452 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 "},"Д":{"x_min":20,"x_max":904,"ha":947,"o":"m 448 922 q 437 779 448 854 q 406 628 425 705 q 360 475 386 552 q 305 327 334 399 q 247 190 277 255 q 189 69 217 124 l 621 69 l 621 922 l 448 922 m 105 69 q 201 281 154 172 q 283 495 247 390 q 342 698 320 601 q 364 876 364 795 q 353 907 364 896 q 326 924 343 918 q 287 931 309 930 q 242 933 265 933 l 238 933 l 238 992 l 877 992 l 877 933 l 859 933 q 822 930 840 933 q 791 918 804 927 q 770 889 778 908 q 762 840 762 871 l 762 169 q 771 117 762 137 q 795 86 780 97 q 831 72 810 75 q 876 69 853 69 l 904 69 l 904 -292 l 832 -292 q 818 -159 832 -214 q 778 -68 804 -104 q 715 -16 752 -33 q 631 0 678 0 l 292 0 q 208 -16 246 0 q 145 -68 171 -33 q 105 -159 119 -104 q 91 -292 91 -214 l 20 -292 l 20 69 l 105 69 "},"Ç":{"x_min":79,"x_max":806,"ha":853,"o":"m 524 1006 q 648 994 596 1006 q 736 961 701 982 q 788 911 771 940 q 806 850 806 883 q 796 809 806 827 q 771 779 787 791 q 733 759 755 766 q 685 753 711 753 q 676 817 685 785 q 648 874 668 848 q 598 915 629 899 q 522 931 567 931 q 388 902 443 931 q 298 818 333 873 q 248 682 264 763 q 232 496 232 601 q 249 326 232 403 q 300 193 265 249 q 390 108 336 138 q 522 77 445 77 q 612 87 573 77 q 681 113 651 97 q 734 151 711 129 q 774 196 756 172 q 793 175 786 188 q 801 141 801 162 q 783 87 801 115 q 728 37 765 60 q 635 0 691 15 q 501 -14 578 -14 q 318 22 397 -14 q 186 126 239 59 q 106 288 133 193 q 79 497 79 382 q 107 703 79 609 q 192 864 136 796 q 331 968 248 931 q 524 1006 415 1006 m 639 -175 q 591 -291 639 -249 q 456 -334 544 -334 q 431 -332 445 -334 q 403 -329 418 -331 q 375 -324 389 -327 q 349 -318 361 -321 l 349 -247 q 398 -256 373 -253 q 441 -258 423 -258 q 503 -237 481 -258 q 525 -180 525 -216 q 496 -119 525 -139 q 424 -95 467 -99 l 453 12 l 518 12 l 504 -47 q 605 -86 572 -53 q 639 -175 639 -120 "},"Ŝ":{"x_min":66,"x_max":685,"ha":756,"o":"m 342 -14 q 223 0 275 -14 q 136 39 171 14 q 83 101 101 65 q 66 181 66 137 q 92 249 66 223 q 166 275 118 275 q 179 192 168 231 q 212 121 190 152 q 268 73 234 91 q 349 55 301 55 q 493 100 441 55 q 544 230 544 145 q 533 297 544 267 q 498 351 523 326 q 433 398 473 375 q 333 446 393 421 q 222 502 269 472 q 143 569 175 532 q 97 652 112 606 q 82 754 82 697 q 104 860 82 814 q 168 939 127 907 q 264 989 208 972 q 386 1006 320 1006 q 496 993 448 1006 q 578 958 544 980 q 628 908 611 936 q 646 850 646 880 q 616 782 646 805 q 536 760 587 760 q 529 824 536 792 q 504 880 521 855 q 457 921 486 905 q 386 936 428 936 q 317 925 347 936 q 265 893 286 914 q 233 843 244 873 q 222 778 222 814 q 232 705 222 737 q 268 648 243 674 q 333 600 293 623 q 432 553 373 577 q 539 500 492 528 q 618 438 585 472 q 667 361 650 403 q 685 265 685 318 q 660 147 685 199 q 592 59 636 95 q 484 4 547 23 q 342 -14 420 -14 m 183 1089 q 218 1134 199 1108 q 258 1187 238 1160 q 294 1242 277 1215 q 322 1293 311 1269 l 453 1293 q 481 1242 464 1269 q 517 1187 498 1215 q 557 1134 537 1160 q 593 1089 576 1108 l 593 1071 l 538 1071 q 458 1128 498 1093 q 387 1195 418 1162 q 316 1128 355 1162 q 237 1071 276 1093 l 183 1071 l 183 1089 "},"C":{"x_min":79,"x_max":806,"ha":853,"o":"m 524 1006 q 648 994 596 1006 q 736 961 701 982 q 788 911 771 940 q 806 850 806 883 q 796 809 806 827 q 771 779 787 791 q 733 759 755 766 q 685 753 711 753 q 676 817 685 785 q 648 874 668 848 q 598 915 629 899 q 522 931 567 931 q 388 902 443 931 q 298 818 333 873 q 248 682 264 763 q 232 496 232 601 q 249 326 232 403 q 300 193 265 249 q 390 108 336 138 q 522 77 445 77 q 612 87 573 77 q 681 113 651 97 q 734 151 711 129 q 774 196 756 172 q 793 175 786 188 q 801 141 801 162 q 783 87 801 115 q 728 37 765 60 q 635 0 691 15 q 501 -14 578 -14 q 318 22 397 -14 q 186 126 239 59 q 106 288 133 193 q 79 497 79 382 q 107 703 79 609 q 192 864 136 796 q 331 968 248 931 q 524 1006 415 1006 "},"Ḁ":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 m 656 -236 q 643 -301 656 -273 q 607 -348 630 -329 q 554 -377 584 -367 q 489 -387 523 -387 q 423 -377 454 -387 q 370 -348 393 -367 q 334 -301 347 -329 q 322 -236 322 -273 q 334 -171 322 -199 q 370 -123 347 -142 q 423 -94 393 -104 q 489 -85 454 -85 q 554 -94 523 -85 q 607 -123 584 -104 q 643 -171 630 -142 q 656 -236 656 -199 m 580 -236 q 573 -197 580 -213 q 553 -172 566 -181 q 524 -157 541 -162 q 489 -152 508 -152 q 453 -157 469 -152 q 424 -172 436 -162 q 404 -197 411 -181 q 397 -236 397 -213 q 404 -274 397 -258 q 424 -299 411 -290 q 453 -314 436 -309 q 489 -319 469 -319 q 524 -314 508 -319 q 553 -299 541 -309 q 573 -274 566 -290 q 580 -236 580 -258 "},"Ĵ":{"x_min":-16,"x_max":459,"ha":496,"o":"m -16 -264 l -3 -264 q 76 -252 41 -264 q 135 -210 111 -239 q 171 -131 158 -180 q 184 -9 184 -82 l 184 839 q 174 888 184 870 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 -10 q 299 -166 324 -104 q 232 -265 275 -228 q 132 -318 190 -302 q 7 -334 74 -334 l -16 -334 l -16 -264 m 49 1089 q 84 1134 65 1108 q 124 1187 104 1160 q 160 1242 143 1215 q 188 1293 177 1269 l 319 1293 q 347 1242 330 1269 q 383 1187 364 1215 q 423 1134 403 1160 q 459 1089 442 1108 l 459 1071 l 404 1071 q 324 1128 364 1093 q 253 1195 284 1162 q 182 1128 221 1162 q 103 1071 142 1093 l 49 1071 l 49 1089 "},"È":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 324 69 l 592 69 q 649 78 626 69 q 688 103 673 87 q 713 139 704 118 q 725 183 722 160 l 735 243 l 807 243 l 797 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 753 992 l 760 749 l 688 749 l 681 808 q 670 852 678 831 q 648 888 662 873 q 611 913 633 904 q 558 922 589 922 l 324 922 l 324 553 l 660 553 l 660 483 l 324 483 l 324 69 m 504 1071 l 451 1071 q 390 1118 423 1089 q 327 1175 358 1146 q 271 1233 297 1205 q 234 1278 246 1260 l 234 1293 l 382 1293 q 408 1242 393 1269 q 438 1187 422 1215 q 472 1134 455 1160 q 504 1089 489 1108 l 504 1071 "},"fi":{"x_min":37.734375,"x_max":902.578125,"ha":921,"o":"m 526 58 q 569 61 549 58 q 606 73 590 64 q 630 101 621 83 q 640 150 640 120 l 640 675 l 300 675 l 300 157 q 310 105 300 125 q 334 75 319 86 q 370 61 349 65 q 414 58 391 58 l 439 58 l 439 0 l 37 0 l 37 58 l 56 58 q 100 61 79 58 q 136 75 121 65 q 160 105 151 86 q 170 157 170 125 l 170 675 l 43 675 l 43 745 l 170 745 l 170 786 q 189 903 170 850 q 250 995 209 956 q 353 1054 291 1033 q 501 1076 416 1076 q 695 1047 630 1076 q 761 966 761 1018 q 751 928 761 945 q 726 899 742 911 q 686 881 709 888 q 634 874 663 874 q 627 920 634 895 q 602 966 619 945 q 554 1003 584 988 q 478 1017 524 1017 q 390 998 425 1017 q 336 946 356 978 q 308 872 316 914 q 300 785 300 830 l 300 745 l 771 745 l 771 158 q 779 105 771 125 q 804 75 788 86 q 840 61 819 65 q 884 58 861 58 l 902 58 l 902 0 l 522 0 l 522 58 l 526 58 "},"X":{"x_min":11,"x_max":905,"ha":917,"o":"m 646 893 q 641 913 646 905 q 625 925 635 921 q 602 931 615 930 q 572 933 588 933 l 568 933 l 568 992 l 872 992 l 872 933 l 859 933 q 822 928 839 933 q 790 912 806 924 q 758 881 775 900 q 722 833 741 862 l 521 543 l 776 132 q 833 74 806 91 q 887 58 860 58 l 905 58 l 905 0 l 529 0 l 529 58 l 537 58 q 620 104 620 58 q 618 119 620 111 q 612 137 616 126 q 598 162 607 147 q 574 200 588 177 l 437 421 l 283 193 q 271 173 277 184 q 259 149 265 162 q 251 125 254 137 q 247 101 247 112 q 269 68 247 78 q 337 58 291 58 l 341 58 l 341 0 l 11 0 l 11 58 l 19 58 q 63 63 44 58 q 98 80 82 68 q 129 109 114 91 q 164 155 145 128 l 396 488 l 166 860 q 110 917 141 900 q 47 933 78 933 l 29 933 l 29 992 l 405 992 l 405 933 l 401 933 q 362 930 377 933 q 337 922 346 927 q 325 909 328 916 q 322 893 322 901 q 323 879 322 886 q 327 863 324 872 q 337 842 330 854 q 355 811 343 829 l 480 609 l 612 808 q 637 853 627 832 q 646 893 646 874 "},"ô":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 641 81 725 177 q 398 -14 558 -14 q 264 9 323 -14 q 162 81 204 33 q 99 202 121 129 q 77 373 77 275 q 159 663 77 568 q 403 758 241 758 q 537 734 478 758 q 639 663 597 711 q 702 543 680 615 q 725 373 725 471 m 211 374 q 222 236 211 295 q 254 136 232 176 q 313 75 277 96 q 402 55 349 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 q 579 511 590 452 q 547 609 569 570 q 488 668 525 649 q 400 688 452 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 m 193 860 q 228 905 209 879 q 268 958 248 931 q 304 1013 287 986 q 332 1064 321 1040 l 463 1064 q 491 1013 474 1040 q 527 958 508 986 q 567 905 547 931 q 603 860 586 879 l 603 842 l 548 842 q 468 899 508 864 q 397 966 428 933 q 326 899 365 933 q 247 842 286 864 l 193 842 l 193 860 "},"Ė":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 324 69 l 592 69 q 649 78 626 69 q 688 103 673 87 q 713 139 704 118 q 725 183 722 160 l 735 243 l 807 243 l 797 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 753 992 l 760 749 l 688 749 l 681 808 q 670 852 678 831 q 648 888 662 873 q 611 913 633 904 q 558 922 589 922 l 324 922 l 324 553 l 660 553 l 660 483 l 324 483 l 324 69 m 367 1180 q 373 1221 367 1204 q 390 1247 379 1237 q 415 1261 400 1257 q 446 1266 429 1266 q 477 1261 462 1266 q 502 1247 491 1257 q 519 1221 513 1237 q 526 1180 526 1204 q 519 1139 526 1155 q 502 1113 513 1123 q 477 1098 491 1102 q 446 1094 462 1094 q 415 1098 429 1094 q 390 1113 400 1102 q 373 1139 379 1123 q 367 1180 367 1155 "},"г":{"x_min":31.75,"x_max":608,"ha":636,"o":"m 608 745 l 608 527 l 549 527 l 541 574 q 529 628 537 606 q 511 662 522 650 q 483 681 499 675 q 441 686 466 686 l 294 686 l 294 152 q 304 102 294 121 q 328 74 313 83 q 365 61 344 64 q 408 58 385 58 l 440 58 l 440 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 31 686 l 31 745 l 608 745 "},"Ŀ":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 358 917 373 927 q 333 888 342 907 q 324 839 324 869 l 324 69 l 599 69 q 652 80 630 69 q 688 109 674 91 q 710 150 703 127 q 721 194 718 172 l 735 299 l 807 299 l 797 0 l 52 0 m 521 533 q 527 574 521 557 q 544 600 533 590 q 569 614 554 610 q 600 619 583 619 q 631 614 616 619 q 656 600 645 610 q 673 574 667 590 q 680 533 680 557 q 673 492 680 508 q 656 466 667 476 q 631 451 645 455 q 600 447 616 447 q 569 451 583 447 q 544 466 554 455 q 527 492 533 476 q 521 533 521 508 "},"х":{"x_min":7,"x_max":796,"ha":803,"o":"m 532 645 q 511 678 532 671 q 458 686 490 686 l 454 686 l 454 745 l 758 745 l 758 686 l 745 686 q 708 683 725 686 q 676 670 692 679 q 643 643 660 660 q 605 597 626 625 l 462 407 l 666 132 q 724 74 696 91 q 777 58 751 58 l 796 58 l 796 0 l 437 0 l 437 58 l 444 58 q 527 104 527 58 q 525 119 527 111 q 517 138 523 127 q 500 163 511 148 q 474 200 490 178 l 382 325 l 285 189 q 272 170 278 181 q 259 147 265 159 q 251 124 254 136 q 247 101 247 112 q 267 68 247 78 q 333 58 287 58 l 337 58 l 337 0 l 7 0 l 7 58 l 19 58 q 63 62 44 58 q 99 76 82 66 q 133 104 116 86 q 171 147 150 121 l 346 373 l 170 612 q 111 667 140 648 q 51 686 82 686 l 33 686 l 33 745 l 385 745 l 385 686 l 381 686 q 342 683 357 686 q 317 674 326 680 q 305 661 309 669 q 302 645 302 654 q 310 617 302 631 q 334 582 319 603 l 426 457 l 498 561 q 523 605 513 584 q 532 645 532 626 "},"ŋ":{"x_min":38.53125,"x_max":746,"ha":882,"o":"m 412 58 l 412 0 l 38 0 l 38 58 l 50 58 q 94 61 73 58 q 130 75 115 65 q 154 105 145 86 q 164 158 164 125 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 271 745 l 289 631 l 296 631 q 341 695 317 670 q 392 733 366 720 q 449 752 419 747 q 513 758 479 758 q 610 742 567 758 q 684 693 653 726 q 730 608 714 660 q 746 486 746 557 l 746 -11 q 727 -166 746 -104 q 673 -265 708 -228 q 592 -318 639 -302 q 488 -334 545 -334 l 467 -334 l 467 -264 l 476 -264 q 535 -252 510 -264 q 579 -210 561 -239 q 605 -132 596 -181 q 615 -10 615 -83 l 615 479 q 606 560 615 525 q 580 619 598 595 q 533 656 562 644 q 462 669 504 669 q 383 650 415 669 q 331 601 351 632 q 303 529 311 570 q 294 444 294 488 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 412 58 "},"Ч":{"x_min":28.734375,"x_max":997.578125,"ha":1050,"o":"m 725 450 q 654 416 688 431 q 584 388 620 400 q 508 370 548 376 q 419 364 468 364 q 226 426 291 364 q 161 615 161 489 l 161 839 q 151 888 161 869 q 127 917 142 907 q 90 930 111 927 q 47 933 70 933 l 28 933 l 28 992 l 433 992 l 433 933 l 415 933 q 371 930 392 933 q 334 916 350 926 q 310 886 319 905 q 301 834 301 866 l 301 618 q 344 494 301 533 q 464 455 388 455 q 530 460 498 455 q 592 474 561 465 q 656 496 624 483 q 725 527 688 510 l 725 834 q 716 886 725 866 q 692 916 707 905 q 656 930 676 926 q 611 933 635 933 l 593 933 l 593 992 l 997 992 l 997 933 l 979 933 q 935 930 956 933 q 899 916 914 926 q 875 886 884 905 q 866 833 866 866 l 866 151 q 875 102 866 120 q 899 73 884 83 q 936 61 915 64 q 979 58 956 58 l 997 58 l 997 0 l 593 0 l 593 58 l 611 58 q 656 61 635 58 q 692 75 676 65 q 716 105 707 86 q 725 157 725 125 l 725 450 "},"ü":{"x_min":31.984375,"x_max":850.015625,"ha":882,"o":"m 732 151 q 741 102 732 120 q 765 73 750 83 q 802 61 781 64 q 845 58 822 58 l 850 58 l 850 0 l 629 0 l 611 112 l 604 112 q 558 48 583 72 q 504 10 532 24 q 444 -8 475 -3 q 379 -14 413 -14 q 281 1 324 -14 q 209 50 238 17 q 165 135 180 83 q 150 258 150 186 l 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 l 280 264 q 288 184 280 219 q 311 124 295 148 q 356 87 328 99 q 426 74 384 74 q 505 91 472 74 q 559 136 538 107 q 590 207 580 166 q 601 299 601 249 l 601 586 q 591 638 601 618 q 567 669 582 658 q 531 683 552 679 q 487 686 510 686 l 483 686 l 483 745 l 732 745 l 732 151 m 236 956 q 241 992 236 977 q 256 1016 246 1007 q 278 1029 265 1025 q 306 1034 291 1034 q 334 1029 321 1034 q 357 1016 347 1025 q 372 992 366 1007 q 377 956 377 977 q 372 920 377 934 q 357 895 366 905 q 334 882 347 886 q 306 878 321 878 q 256 895 276 878 q 236 956 236 913 m 500 956 q 505 992 500 977 q 520 1016 510 1007 q 542 1029 529 1025 q 570 1034 555 1034 q 598 1029 585 1034 q 621 1016 611 1025 q 636 992 630 1007 q 641 956 641 977 q 636 920 641 934 q 621 895 630 905 q 598 882 611 886 q 570 878 585 878 q 520 895 540 878 q 500 956 500 913 "},"ь":{"x_min":31.75,"x_max":750,"ha":827,"o":"m 427 745 l 427 686 l 408 686 q 365 683 385 686 q 328 669 344 679 q 304 640 313 659 q 294 591 294 622 l 294 414 l 429 414 q 551 406 494 414 q 653 377 609 399 q 723 316 697 355 q 750 212 750 276 q 732 127 750 166 q 679 60 714 88 q 589 15 643 31 q 462 0 535 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 31 686 l 31 745 l 427 745 m 438 63 q 518 72 485 63 q 573 100 552 81 q 605 149 595 119 q 615 222 615 179 q 567 325 615 294 q 430 355 519 355 l 294 355 l 294 63 l 438 63 "},"Ÿ":{"x_min":-7,"x_max":872,"ha":868,"o":"m 221 0 l 221 58 l 253 58 q 296 61 276 58 q 333 73 317 64 q 357 102 348 83 q 367 151 367 120 l 367 413 l 109 860 q 87 893 98 880 q 66 916 77 907 q 41 929 55 925 q 10 933 28 933 l -7 933 l -7 992 l 374 992 l 374 933 l 323 933 q 292 930 304 933 q 273 920 280 926 q 264 906 267 914 q 262 889 262 898 q 270 850 262 869 q 287 815 279 830 l 389 629 q 431 545 414 586 q 459 470 448 503 q 475 504 466 485 q 495 543 484 522 q 518 585 506 563 q 543 629 531 607 l 631 789 q 651 834 645 812 q 657 872 657 855 q 635 918 657 903 q 573 933 613 933 l 532 933 l 532 992 l 872 992 l 872 933 l 855 933 q 827 928 840 933 q 800 910 814 923 q 772 877 787 898 q 740 825 758 857 l 507 413 l 507 158 q 516 105 507 125 q 540 75 525 86 q 576 61 556 65 q 620 58 597 58 l 653 58 l 653 0 l 221 0 m 243 1185 q 248 1221 243 1206 q 263 1245 253 1236 q 285 1258 272 1254 q 313 1263 298 1263 q 341 1258 328 1263 q 364 1245 354 1254 q 379 1221 373 1236 q 384 1185 384 1206 q 379 1149 384 1163 q 364 1124 373 1134 q 341 1111 354 1115 q 313 1107 328 1107 q 263 1124 283 1107 q 243 1185 243 1142 m 507 1185 q 512 1221 507 1206 q 527 1245 517 1236 q 549 1258 536 1254 q 577 1263 562 1263 q 605 1258 592 1263 q 628 1245 618 1254 q 643 1221 637 1236 q 648 1185 648 1206 q 643 1149 648 1163 q 628 1124 637 1134 q 605 1111 618 1115 q 577 1107 592 1107 q 527 1124 547 1107 q 507 1185 507 1142 "},"€":{"x_min":57.078125,"x_max":736,"ha":777,"o":"m 528 60 q 590 67 563 60 q 638 85 617 74 q 675 112 659 97 q 703 144 691 127 q 719 128 711 138 q 728 97 728 118 q 715 59 728 78 q 677 23 702 39 q 611 -3 651 7 q 518 -14 572 -14 q 393 6 453 -14 q 285 71 333 26 q 204 188 237 116 q 158 362 171 259 l 57 362 l 57 432 l 152 432 q 150 465 151 447 q 150 496 150 483 l 150 526 l 57 526 l 57 596 l 155 596 q 195 790 164 712 q 273 916 226 869 q 378 983 319 963 q 501 1003 436 1003 q 597 992 554 1003 q 671 962 640 981 q 719 918 702 944 q 736 861 736 892 q 705 794 736 813 q 615 774 674 774 q 608 836 615 807 q 587 887 601 865 q 548 921 572 908 q 490 933 524 933 q 422 918 455 933 q 363 863 389 902 q 318 759 336 824 q 293 596 299 694 l 581 596 l 581 526 l 290 526 l 290 494 q 290 462 290 480 q 291 432 290 444 l 526 432 l 526 362 l 297 362 q 325 232 305 289 q 375 138 345 176 q 443 80 404 99 q 528 60 481 60 "},"в":{"x_min":31.75,"x_max":750,"ha":827,"o":"m 31 745 l 436 745 q 649 698 581 745 q 717 565 717 652 q 705 492 717 523 q 673 440 694 462 q 624 406 653 419 q 559 389 595 393 l 559 382 q 638 364 603 376 q 698 330 673 351 q 736 280 723 309 q 750 211 750 251 q 732 127 750 166 q 679 60 714 88 q 589 15 643 31 q 462 0 535 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 31 686 l 31 745 m 438 63 q 518 72 485 63 q 573 98 552 80 q 605 145 595 116 q 615 215 615 174 q 567 317 615 287 q 430 347 519 347 l 294 347 l 294 63 l 438 63 m 294 681 l 294 417 l 429 417 q 500 426 470 417 q 547 454 529 436 q 573 497 565 472 q 582 551 582 522 q 573 602 582 578 q 547 643 565 626 q 500 671 530 660 q 429 681 471 681 l 294 681 "},"Η":{"x_min":52.421875,"x_max":1048.578125,"ha":1101,"o":"m 644 0 l 644 58 l 662 58 q 707 61 686 58 q 743 75 727 65 q 767 105 758 86 q 776 158 776 125 l 776 483 l 324 483 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 553 l 776 553 l 776 833 q 767 886 776 866 q 743 916 758 905 q 707 930 727 926 q 662 933 686 933 l 644 933 l 644 992 l 1048 992 l 1048 933 l 1030 933 q 986 930 1007 933 q 950 916 965 926 q 925 886 934 905 q 917 833 917 866 l 917 151 q 926 102 917 120 q 950 73 935 83 q 987 61 966 64 q 1030 58 1007 58 l 1048 58 l 1048 0 l 644 0 "},"С":{"x_min":79,"x_max":806,"ha":853,"o":"m 524 1006 q 648 994 596 1006 q 736 961 701 982 q 788 911 771 940 q 806 850 806 883 q 796 809 806 827 q 771 779 787 791 q 733 759 755 766 q 685 753 711 753 q 676 817 685 785 q 648 874 668 848 q 598 915 629 899 q 522 931 567 931 q 388 902 443 931 q 298 818 333 873 q 248 682 264 763 q 232 496 232 601 q 249 326 232 403 q 300 193 265 249 q 390 108 336 138 q 522 77 445 77 q 612 87 573 77 q 681 113 651 97 q 734 151 711 129 q 774 196 756 172 q 793 175 786 188 q 801 141 801 162 q 783 87 801 115 q 728 37 765 60 q 635 0 691 15 q 501 -14 578 -14 q 318 22 397 -14 q 186 126 239 59 q 106 288 133 193 q 79 497 79 382 q 107 703 79 609 q 192 864 136 796 q 331 968 248 931 q 524 1006 415 1006 "},"ß":{"x_min":31.75,"x_max":838,"ha":899,"o":"m 601 52 q 685 83 652 52 q 718 178 718 114 q 713 221 718 201 q 693 259 708 241 q 652 296 678 277 q 583 334 625 314 q 506 377 540 356 q 451 424 473 398 q 418 482 429 450 q 407 559 407 515 q 420 636 407 601 q 462 695 434 671 q 534 734 491 720 q 636 747 577 747 q 626 862 636 814 q 596 941 617 910 q 542 987 575 972 q 462 1001 509 1001 q 389 988 420 1001 q 336 949 357 974 q 305 889 315 924 q 294 809 294 853 l 294 0 l 31 0 l 31 58 l 50 58 q 94 61 73 58 q 130 75 115 65 q 154 105 145 86 q 164 157 164 125 l 164 675 l 51 675 l 51 745 l 164 745 l 164 786 q 187 915 164 862 q 250 999 210 967 q 345 1045 290 1031 q 464 1060 400 1060 q 608 1035 551 1060 q 701 961 666 1010 q 751 842 736 913 q 767 679 766 771 l 665 679 q 556 651 591 679 q 522 567 522 623 q 529 528 522 546 q 552 495 535 511 q 597 464 569 479 q 666 428 625 448 q 752 378 719 404 q 804 322 785 351 q 830 263 823 293 q 838 201 838 232 q 821 108 838 148 q 775 40 805 67 q 701 0 745 13 q 603 -14 658 -14 q 514 -4 554 -14 q 445 22 474 4 q 401 69 417 41 q 386 133 386 96 q 394 179 386 161 q 414 209 402 198 q 440 224 426 220 q 465 229 454 229 q 472 160 465 192 q 495 104 479 128 q 537 66 511 80 q 601 52 563 52 "},"њ":{"x_min":31.75,"x_max":1186,"ha":1263,"o":"m 906 745 l 906 686 l 888 686 q 845 683 865 686 q 808 669 824 679 q 784 640 793 659 q 774 591 774 622 l 774 414 l 867 414 q 988 406 931 414 q 1090 377 1046 399 q 1160 316 1134 355 q 1186 212 1186 276 q 1168 127 1186 166 q 1115 60 1150 88 q 1026 15 1080 31 q 899 0 972 0 l 526 0 l 526 59 l 530 59 q 573 62 553 59 q 610 75 594 65 q 634 103 625 84 q 644 153 644 122 l 644 355 l 294 355 l 294 153 q 304 103 294 122 q 328 75 313 84 q 365 62 344 65 q 408 59 385 59 l 412 59 l 412 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 31 686 l 31 745 l 412 745 l 412 686 l 408 686 q 365 683 385 686 q 328 670 344 680 q 304 642 313 660 q 294 593 294 623 l 294 414 l 644 414 l 644 591 q 634 640 644 622 q 610 669 625 659 q 573 683 594 679 q 530 686 553 686 l 526 686 l 526 745 l 906 745 m 875 63 q 955 72 922 63 q 1009 100 988 81 q 1041 149 1031 119 q 1051 222 1051 179 q 1003 325 1051 294 q 867 355 955 355 l 774 355 l 774 63 l 875 63 "},"Ű":{"x_min":21.4375,"x_max":975.25,"ha":996,"o":"m 502 -14 q 355 3 420 -14 q 245 58 290 20 q 176 155 200 95 q 153 299 153 214 l 153 839 q 143 888 153 869 q 119 917 134 907 q 82 930 103 927 q 39 933 62 933 l 21 933 l 21 992 l 425 992 l 425 933 l 407 933 q 363 930 384 933 q 326 916 342 926 q 302 885 311 905 q 293 832 293 865 l 293 285 q 310 181 293 224 q 358 112 327 138 q 431 72 389 85 q 525 60 474 60 q 629 77 585 60 q 701 122 672 93 q 744 191 730 151 q 758 279 758 231 l 758 838 q 749 888 758 869 q 724 917 739 906 q 688 930 708 927 q 644 933 667 933 l 626 933 l 626 992 l 975 992 l 975 933 l 956 933 q 912 930 933 933 q 876 916 891 926 q 852 886 861 905 q 843 833 843 866 l 843 283 q 820 158 843 214 q 755 65 798 103 q 649 6 712 26 q 502 -14 585 -14 m 311 1071 l 311 1089 q 341 1137 325 1111 q 373 1190 357 1163 q 404 1243 389 1217 q 429 1293 418 1269 l 578 1293 l 578 1278 q 557 1250 570 1266 q 527 1214 544 1233 q 490 1175 510 1195 q 451 1136 471 1155 q 413 1100 431 1117 q 378 1071 394 1083 l 311 1071 m 562 1071 l 562 1089 q 592 1137 576 1111 q 624 1190 608 1163 q 655 1243 640 1217 q 680 1293 669 1269 l 829 1293 l 829 1278 q 808 1250 821 1266 q 778 1214 795 1233 q 741 1175 761 1195 q 702 1136 722 1155 q 664 1100 682 1117 q 629 1071 645 1083 l 562 1071 "},"c":{"x_min":77,"x_max":629,"ha":684,"o":"m 393 -14 q 265 7 324 -14 q 165 74 207 28 q 100 193 123 121 q 77 367 77 265 q 100 554 77 479 q 165 674 123 629 q 263 739 207 720 q 386 758 320 758 q 472 749 429 758 q 550 723 515 741 q 606 679 584 705 q 628 616 628 652 q 596 548 628 568 q 503 529 565 529 q 498 590 503 561 q 479 641 493 619 q 444 676 466 663 q 386 688 421 688 q 314 673 346 688 q 259 622 282 658 q 224 523 236 585 q 211 368 211 461 q 260 147 211 220 q 421 74 309 74 q 533 102 485 74 q 605 173 581 129 q 622 151 615 164 q 629 118 629 137 q 614 71 629 95 q 569 28 599 47 q 496 -2 540 9 q 393 -14 452 -14 "},"¶":{"x_min":56,"x_max":800.25,"ha":857,"o":"m 583 985 l 451 985 l 451 -154 l 234 -154 l 234 -95 l 253 -95 q 297 -92 276 -95 q 333 -78 318 -88 q 357 -48 348 -67 q 367 3 367 -28 l 367 536 l 268 536 q 166 558 207 536 q 101 617 125 580 q 66 704 77 655 q 56 808 56 753 q 67 909 56 863 q 104 987 79 954 q 171 1037 130 1019 q 270 1055 211 1055 l 800 1055 l 800 996 l 781 996 q 737 993 758 996 q 701 979 716 989 q 677 949 686 968 q 668 897 668 929 l 668 4 q 677 -48 668 -28 q 701 -78 686 -67 q 737 -92 716 -88 q 781 -95 758 -95 l 800 -95 l 800 -154 l 583 -154 l 583 985 "},"Ή":{"x_min":-46,"x_max":1158.578125,"ha":1211,"o":"m 754 0 l 754 58 l 772 58 q 817 61 796 58 q 853 75 837 65 q 877 105 868 86 q 886 158 886 125 l 886 483 l 434 483 l 434 158 q 443 105 434 125 q 467 75 452 86 q 504 61 483 65 q 548 58 525 58 l 566 58 l 566 0 l 162 0 l 162 58 l 180 58 q 224 61 203 58 q 260 75 245 65 q 285 105 276 86 q 294 158 294 125 l 294 839 q 284 888 294 869 q 260 917 275 907 q 223 930 244 927 q 180 933 203 933 l 162 933 l 162 992 l 566 992 l 566 933 l 548 933 q 504 930 525 933 q 467 916 483 926 q 443 886 452 905 q 434 833 434 866 l 434 553 l 886 553 l 886 833 q 877 886 886 866 q 853 916 868 905 q 817 930 837 926 q 772 933 796 933 l 754 933 l 754 992 l 1158 992 l 1158 933 l 1140 933 q 1096 930 1117 933 q 1060 916 1075 926 q 1035 886 1044 905 q 1027 833 1027 866 l 1027 151 q 1036 102 1027 120 q 1060 73 1045 83 q 1097 61 1076 64 q 1140 58 1117 58 l 1158 58 l 1158 0 l 754 0 m -46 789 q -29 833 -37 807 q -13 887 -20 859 q 1 942 -5 915 q 11 993 7 970 l 136 993 l 136 978 q 116 935 131 962 q 82 878 102 908 q 39 819 61 848 q 0 771 17 790 l -46 771 l -46 789 "},"Ὅ":{"x_min":-275,"x_max":952,"ha":1031,"o":"m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 m -275 851 q -234 942 -275 904 q -110 1003 -193 981 l -110 960 q -170 930 -151 946 q -190 889 -190 914 q -179 870 -190 876 q -156 858 -169 864 q -133 844 -144 853 q -123 816 -123 835 q -139 778 -123 791 q -188 765 -156 765 q -251 788 -228 765 q -275 851 -275 812 m -51 787 q -34 832 -42 806 q -17 885 -25 857 q -3 940 -9 913 q 6 991 2 968 l 131 991 l 131 977 q 111 933 126 960 q 77 876 97 906 q 35 817 56 846 q -4 770 13 789 l -51 770 l -51 787 "},"γ":{"x_min":0,"x_max":724,"ha":798,"o":"m 149 749 q 203 737 179 749 q 248 698 227 725 q 289 623 269 670 q 330 508 309 577 q 377 343 351 438 q 433 123 402 248 q 500 223 470 166 q 551 339 530 279 q 582 457 571 399 q 593 562 593 515 q 576 634 593 604 q 522 674 559 665 q 545 737 522 717 q 606 758 568 758 q 664 746 641 758 q 700 715 686 734 q 718 672 713 696 q 724 623 724 648 q 711 518 724 573 q 678 406 699 463 q 630 295 658 350 q 572 192 603 241 q 508 103 541 143 q 445 35 476 63 q 447 0 446 18 q 448 -33 448 -16 q 439 -154 448 -99 q 413 -249 430 -209 q 374 -311 397 -289 q 324 -334 351 -334 q 282 -312 296 -334 q 267 -255 267 -291 q 274 -181 267 -217 q 291 -111 281 -144 q 314 -48 301 -78 q 339 6 326 -18 q 294 178 315 96 q 251 334 272 261 q 208 467 229 407 q 167 570 187 527 q 125 636 146 612 q 83 660 104 660 q 54 654 68 660 q 27 641 40 649 l 0 684 q 30 708 13 696 q 67 728 48 719 q 107 743 86 737 q 149 749 128 749 "},"­":{"x_min":35,"x_max":396,"ha":431,"o":"m 35 326 l 35 431 l 396 431 l 396 326 l 35 326 "},":":{"x_min":113,"x_max":288,"ha":399,"o":"m 113 84 q 119 129 113 111 q 138 158 126 147 q 166 174 150 169 q 200 179 182 179 q 234 174 218 179 q 261 158 250 169 q 280 129 273 147 q 288 84 288 111 q 280 39 288 57 q 261 10 273 21 q 234 -5 250 0 q 200 -10 218 -10 q 166 -5 182 -10 q 138 10 150 0 q 119 39 126 21 q 113 84 113 57 m 113 656 q 119 701 113 683 q 138 730 126 719 q 166 746 150 741 q 200 751 182 751 q 234 746 218 751 q 261 730 250 741 q 280 701 273 719 q 288 656 288 683 q 280 612 288 630 q 261 582 273 593 q 234 566 250 571 q 200 562 218 562 q 166 566 182 562 q 138 582 150 571 q 119 612 126 593 q 113 656 113 630 "},"ś":{"x_min":62,"x_max":566,"ha":627,"o":"m 291 -14 q 196 -4 239 -14 q 124 22 154 4 q 78 69 94 41 q 62 133 62 96 q 71 179 62 161 q 93 209 80 198 q 122 224 106 220 q 149 229 137 229 q 156 160 149 192 q 180 104 163 128 q 223 66 196 80 q 290 52 251 52 q 352 61 325 52 q 397 87 379 70 q 425 127 415 104 q 435 178 435 150 q 427 223 435 204 q 401 258 420 241 q 351 291 383 274 q 272 330 320 308 q 183 375 221 353 q 121 423 145 397 q 84 482 96 449 q 72 560 72 515 q 90 645 72 608 q 143 706 109 681 q 226 744 178 731 q 334 757 274 757 q 421 746 383 757 q 485 719 459 736 q 524 678 511 702 q 537 629 537 655 q 510 568 537 591 q 436 546 484 546 q 409 658 436 618 q 325 698 383 698 q 269 690 292 698 q 231 665 246 681 q 209 628 216 650 q 202 581 202 607 q 211 536 202 555 q 240 500 220 516 q 291 468 260 484 q 367 434 323 453 q 456 389 419 411 q 518 340 494 366 q 554 280 542 313 q 566 203 566 247 q 546 108 566 149 q 490 40 526 68 q 404 0 454 13 q 291 -14 353 -14 m 248 860 q 280 905 263 879 q 312 958 296 931 q 343 1013 328 986 q 368 1064 357 1040 l 517 1064 l 517 1049 q 479 1004 504 1031 q 423 946 453 976 q 360 889 393 917 q 300 842 328 860 l 248 842 l 248 860 "}," ":{"x_min":0,"x_max":0,"ha":361},"У":{"x_min":0,"x_max":938,"ha":931,"o":"m 938 933 l 911 933 q 877 929 891 933 q 852 912 863 924 q 830 879 840 900 q 806 825 819 858 l 571 254 q 529 159 549 200 q 489 91 509 119 q 447 45 469 63 q 395 17 424 27 q 328 3 366 7 q 242 0 291 0 l 141 0 l 141 69 l 216 69 q 285 79 252 69 q 347 107 319 88 q 398 150 376 125 q 432 205 420 175 l 116 860 q 97 895 106 881 q 77 917 88 909 q 52 929 66 926 q 18 933 38 933 l 0 933 l 0 992 l 388 992 l 388 933 l 367 933 q 304 917 324 933 q 283 867 283 901 q 286 843 283 855 q 294 815 289 831 l 447 486 q 488 388 471 437 q 517 297 505 339 q 528 339 521 318 q 542 382 534 360 q 559 428 550 404 q 581 481 569 452 l 712 806 q 721 838 718 823 q 724 865 724 854 q 701 917 724 901 q 632 933 678 933 l 603 933 l 603 992 l 938 992 l 938 933 "},"¾":{"x_min":56,"x_max":1133.921875,"ha":1167,"o":"m 241 389 q 103 416 150 389 q 56 495 56 444 q 73 544 56 525 q 119 563 90 563 q 126 520 119 542 q 148 482 134 499 q 185 455 163 465 q 238 444 207 444 q 329 473 296 444 q 362 568 362 502 q 326 647 362 618 q 214 677 291 677 l 168 677 l 168 733 l 213 733 q 262 741 240 733 q 302 766 285 750 q 328 804 319 781 q 338 854 338 826 q 319 925 338 901 q 258 950 301 950 q 214 940 232 950 q 186 914 196 930 q 171 875 175 897 q 167 829 167 853 q 124 832 143 829 q 91 841 104 834 q 71 859 78 847 q 64 889 64 871 q 76 935 64 914 q 113 972 89 957 q 174 997 138 988 q 258 1006 210 1006 q 341 996 304 1006 q 406 969 379 986 q 448 925 433 951 q 463 867 463 899 q 451 812 463 836 q 420 769 440 787 q 375 737 401 750 q 321 716 350 724 l 321 709 q 378 696 349 704 q 431 672 407 687 q 471 632 455 656 q 487 569 487 607 q 464 484 487 519 q 405 429 441 450 q 326 398 369 407 q 241 389 283 389 m 412 0 l 320 0 l 816 992 l 907 992 l 412 0 m 1001 181 l 1001 107 q 1005 80 1001 90 q 1018 65 1010 70 q 1037 58 1026 59 q 1059 56 1047 56 l 1087 56 l 1087 1 l 780 1 l 780 56 l 819 56 q 840 58 830 56 q 858 65 851 59 q 871 80 866 70 q 876 107 876 90 l 876 181 l 630 181 l 630 218 l 889 601 l 1001 601 l 1001 237 l 1133 237 l 1133 181 l 1001 181 m 876 393 q 878 443 876 415 q 883 496 880 470 q 872 473 878 485 q 862 456 866 462 l 712 237 l 876 237 l 876 393 "},"Ί":{"x_min":-46,"x_max":566.640625,"ha":619,"o":"m 162 0 l 162 58 l 180 58 q 224 61 203 58 q 260 75 245 65 q 285 105 276 86 q 294 158 294 125 l 294 833 q 285 886 294 866 q 260 916 276 905 q 224 930 245 926 q 180 933 203 933 l 162 933 l 162 992 l 566 992 l 566 933 l 548 933 q 504 930 525 933 q 467 916 483 926 q 443 886 452 905 q 434 833 434 866 l 434 158 q 443 105 434 125 q 467 75 452 86 q 504 61 483 65 q 548 58 525 58 l 566 58 l 566 0 l 162 0 m -46 789 q -29 833 -37 807 q -13 887 -20 859 q 1 942 -5 915 q 11 993 7 970 l 136 993 l 136 978 q 116 935 131 962 q 82 878 102 908 q 39 819 61 848 q 0 771 17 790 l -46 771 l -46 789 "},"ʼn":{"x_min":0,"x_max":1044.234375,"ha":1083,"o":"m 599 58 l 599 0 l 225 0 l 225 58 l 237 58 q 281 61 260 58 q 317 75 302 65 q 341 105 332 86 q 351 158 351 125 l 351 591 q 341 640 351 622 q 317 669 332 659 q 280 683 301 679 q 237 686 260 686 l 233 686 l 233 745 l 458 745 l 476 631 l 483 631 q 528 695 504 670 q 579 733 553 720 q 636 752 606 747 q 700 758 666 758 q 797 742 754 758 q 871 693 840 726 q 917 608 901 660 q 933 486 933 557 l 933 157 q 940 105 933 125 q 962 75 948 86 q 996 61 977 65 q 1039 58 1016 58 l 1044 58 l 1044 0 l 802 0 l 802 479 q 793 560 802 524 q 767 619 785 595 q 720 656 749 644 q 649 669 691 669 q 570 650 602 669 q 518 601 538 632 q 490 529 498 570 q 481 444 481 488 l 481 151 q 491 102 481 120 q 515 73 500 83 q 552 61 531 64 q 595 58 572 58 l 599 58 m 228 871 q 215 785 228 827 q 176 708 203 744 q 105 645 148 673 q 0 599 62 617 l 0 657 q 100 710 68 679 q 132 782 132 741 q 124 805 132 795 q 106 821 117 814 q 81 835 94 828 q 57 851 68 842 q 38 874 45 861 q 31 909 31 888 q 57 970 31 949 q 121 992 83 992 q 162 984 143 992 q 196 961 181 976 q 219 923 211 945 q 228 871 228 900 "},"Ģ":{"x_min":79,"x_max":965.046875,"ha":992,"o":"m 556 -14 q 345 22 435 -14 q 196 126 256 59 q 108 288 137 193 q 79 497 79 382 q 109 703 79 609 q 202 864 140 796 q 354 968 263 931 q 565 1006 445 1006 q 700 994 642 1006 q 795 961 757 982 q 853 911 834 940 q 872 850 872 883 q 861 809 872 827 q 834 779 851 791 q 793 759 817 766 q 743 753 770 753 q 733 817 743 785 q 702 874 724 848 q 645 915 680 899 q 559 931 610 931 q 409 902 471 931 q 307 817 346 873 q 250 680 268 762 q 232 494 232 599 q 251 309 232 390 q 310 173 269 228 q 418 89 352 117 q 579 60 484 60 q 656 64 619 60 q 723 77 694 68 l 723 302 q 714 352 723 333 q 689 380 705 371 q 653 394 674 390 q 609 397 632 397 l 604 397 l 604 456 l 965 456 l 965 397 l 959 397 q 922 394 939 397 q 891 380 904 390 q 871 350 878 370 q 864 297 864 330 l 864 49 q 720 1 794 17 q 556 -14 646 -14 m 453 -288 q 475 -188 464 -242 q 495 -85 486 -135 l 616 -85 l 616 -98 q 592 -147 606 -120 q 563 -202 579 -174 q 531 -258 547 -231 q 500 -307 514 -285 l 453 -307 l 453 -288 "},"m":{"x_min":38.53125,"x_max":1273.234375,"ha":1312,"o":"m 412 58 l 412 0 l 38 0 l 38 58 l 56 58 q 100 61 80 58 q 134 75 119 65 q 156 105 148 86 q 164 158 164 125 l 164 591 q 155 640 164 622 q 133 669 147 659 q 99 683 119 679 q 56 686 79 686 l 52 686 l 52 745 l 270 745 l 289 631 l 295 631 q 339 695 316 670 q 389 733 362 720 q 443 752 415 747 q 505 758 472 758 q 569 751 539 758 q 626 729 600 744 q 673 690 652 714 q 706 631 693 666 l 718 631 q 763 695 739 670 q 815 733 787 720 q 873 752 842 747 q 935 758 903 758 q 1030 742 988 758 q 1101 693 1072 726 q 1146 608 1130 660 q 1162 486 1162 557 l 1162 157 q 1170 105 1162 125 q 1192 75 1178 86 q 1226 61 1206 65 q 1269 58 1246 58 l 1273 58 l 1273 0 l 1031 0 l 1031 479 q 1023 560 1031 524 q 998 619 1015 595 q 953 656 981 644 q 885 669 925 669 q 813 652 842 669 q 765 607 783 635 q 739 541 747 578 q 731 462 731 504 l 731 157 q 740 105 731 125 q 762 75 748 86 q 796 61 776 65 q 839 58 816 58 l 843 58 l 843 0 l 601 0 l 601 479 q 593 560 601 524 q 568 619 585 595 q 523 656 551 644 q 455 669 495 669 q 379 650 410 669 q 330 601 348 632 q 303 529 311 570 q 294 444 294 488 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 412 58 "},"Е":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 324 69 l 592 69 q 649 78 626 69 q 688 103 673 87 q 713 139 704 118 q 725 183 722 160 l 735 243 l 807 243 l 797 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 753 992 l 760 749 l 688 749 l 681 808 q 670 852 678 831 q 648 888 662 873 q 611 913 633 904 q 558 922 589 922 l 324 922 l 324 553 l 660 553 l 660 483 l 324 483 l 324 69 "},"ž":{"x_min":58,"x_max":632,"ha":710,"o":"m 471 79 q 512 88 496 79 q 538 113 528 98 q 555 150 549 129 q 566 193 562 170 l 573 225 l 632 225 l 625 0 l 58 0 l 58 55 l 461 665 l 243 665 q 198 658 216 665 q 169 637 180 651 q 150 602 158 623 q 136 553 143 581 l 135 548 l 78 548 l 91 745 l 624 745 l 624 688 l 219 79 l 471 79 m 167 1064 l 221 1064 q 261 1036 240 1051 q 300 1005 281 1022 q 337 971 319 988 q 371 937 355 954 q 404 971 386 954 q 442 1005 422 988 q 482 1036 462 1022 q 522 1064 503 1051 l 577 1064 l 577 1045 q 541 1000 560 1026 q 501 947 521 974 q 465 892 482 919 q 437 842 448 865 l 306 842 q 278 892 295 865 q 242 947 261 919 q 202 1000 222 974 q 167 1045 183 1026 l 167 1064 "},"á":{"x_min":69,"x_max":722.203125,"ha":782,"o":"m 203 200 q 231 103 203 135 q 316 71 258 71 q 392 84 358 71 q 451 123 427 98 q 488 184 475 148 q 501 263 501 219 l 501 375 l 412 371 q 313 357 353 368 q 249 324 273 345 q 214 271 225 302 q 203 200 203 240 m 372 688 q 307 677 331 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 200 727 166 711 q 280 750 234 743 q 377 758 325 758 q 488 745 441 758 q 568 704 536 732 q 616 630 600 675 q 632 518 632 584 l 632 157 q 636 109 632 128 q 651 79 641 90 q 678 63 661 67 q 718 58 695 58 l 722 58 l 722 0 l 534 0 l 512 118 l 501 118 q 459 65 479 89 q 414 23 438 40 q 358 -4 389 5 q 284 -14 328 -14 q 198 0 238 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 147 371 69 318 q 385 429 226 425 l 501 434 l 501 517 q 497 586 501 554 q 479 640 492 618 q 440 676 465 663 q 372 688 414 688 m 320 860 q 352 905 335 879 q 384 958 368 931 q 415 1013 400 986 q 440 1064 429 1040 l 589 1064 l 589 1049 q 551 1004 576 1031 q 495 946 525 976 q 432 889 465 917 q 372 842 400 860 l 320 842 l 320 860 "},"×":{"x_min":98.578125,"x_max":676.421875,"ha":777,"o":"m 387 438 l 156 208 l 98 267 l 329 498 l 98 727 l 156 786 l 387 555 l 618 787 l 676 727 l 445 497 l 676 266 l 618 208 l 387 438 "},"п":{"x_min":31.75,"x_max":896.265625,"ha":928,"o":"m 896 745 l 896 686 l 877 686 q 834 683 854 686 q 797 670 813 680 q 773 642 782 660 q 764 593 764 623 l 764 151 q 773 102 764 120 q 797 73 782 83 q 834 61 813 64 q 877 58 854 58 l 896 58 l 896 0 l 515 0 l 515 58 l 519 58 q 562 61 542 58 q 599 73 583 64 q 623 102 614 83 q 633 151 633 120 l 633 681 l 294 681 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 412 58 l 412 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 31 686 l 31 745 l 896 745 "},"Ǻ":{"x_min":0,"x_max":979,"ha":979,"o":"m 657 975 q 633 890 657 923 q 569 839 609 856 l 862 124 q 878 92 870 105 q 898 71 887 79 q 925 61 910 64 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 119 712 58 q 709 140 712 130 q 700 165 706 150 l 645 301 l 280 301 l 227 173 q 218 144 221 158 q 215 120 215 130 q 307 58 215 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 77 75 66 q 108 107 98 88 q 132 156 119 126 l 416 836 q 348 886 374 852 q 323 975 323 921 q 335 1040 323 1012 q 371 1088 348 1069 q 424 1117 394 1107 q 490 1127 455 1127 q 555 1117 524 1127 q 608 1088 585 1107 q 644 1040 631 1069 q 657 975 657 1012 m 534 590 q 495 694 513 645 q 465 788 476 742 q 453 746 459 767 q 438 702 446 725 q 422 655 431 680 q 401 601 412 630 l 311 371 l 616 371 l 534 590 m 581 974 q 574 1013 581 997 q 554 1038 567 1028 q 525 1053 542 1048 q 490 1057 509 1057 q 454 1053 470 1057 q 425 1038 437 1048 q 405 1013 412 1028 q 398 974 398 997 q 405 936 398 952 q 425 911 412 920 q 454 896 437 901 q 490 892 470 892 q 525 896 509 892 q 554 911 542 901 q 574 936 567 920 q 581 974 581 952 m 432 1166 q 463 1203 446 1182 q 496 1246 480 1224 q 527 1290 512 1268 q 552 1331 541 1311 l 701 1331 l 701 1320 q 663 1283 688 1305 q 607 1236 637 1261 q 544 1190 577 1212 q 484 1153 512 1167 l 432 1153 l 432 1166 "},"K":{"x_min":52.421875,"x_max":989,"ha":973,"o":"m 612 771 q 649 817 634 797 q 673 853 664 837 q 685 882 681 869 q 689 904 689 894 q 672 928 689 922 q 620 935 655 935 l 620 992 l 928 992 l 928 935 q 882 925 904 935 q 838 900 860 916 q 792 859 815 883 q 741 804 769 835 l 540 578 l 833 169 q 910 86 873 114 q 986 58 947 58 l 989 58 l 989 0 l 974 0 q 859 5 904 0 q 783 25 814 10 q 730 63 753 39 q 682 124 707 87 l 442 468 l 324 372 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 441 l 612 771 "},"7":{"x_min":82,"x_max":711,"ha":777,"o":"m 264 0 l 592 878 l 226 878 q 145 808 151 878 l 140 739 l 82 739 l 88 990 l 711 990 l 711 949 l 368 0 l 264 0 "},"¨":{"x_min":197,"x_max":602.75,"ha":802,"o":"m 197 956 q 202 992 197 977 q 217 1016 207 1007 q 239 1029 226 1025 q 267 1034 252 1034 q 295 1029 282 1034 q 318 1016 308 1025 q 333 992 327 1007 q 338 956 338 977 q 333 920 338 934 q 318 895 327 905 q 295 882 308 886 q 267 878 282 878 q 217 895 237 878 q 197 956 197 913 m 461 956 q 466 992 461 977 q 481 1016 471 1007 q 503 1029 490 1025 q 531 1034 516 1034 q 559 1029 546 1034 q 582 1016 572 1025 q 597 992 591 1007 q 602 956 602 977 q 597 920 602 934 q 582 895 591 905 q 559 882 572 886 q 531 878 546 878 q 481 895 501 878 q 461 956 461 913 "},"Y":{"x_min":-7,"x_max":872,"ha":868,"o":"m 221 0 l 221 58 l 253 58 q 296 61 276 58 q 333 73 317 64 q 357 102 348 83 q 367 151 367 120 l 367 413 l 109 860 q 87 893 98 880 q 66 916 77 907 q 41 929 55 925 q 10 933 28 933 l -7 933 l -7 992 l 374 992 l 374 933 l 323 933 q 292 930 304 933 q 273 920 280 926 q 264 906 267 914 q 262 889 262 898 q 270 850 262 869 q 287 815 279 830 l 389 629 q 431 545 414 586 q 459 470 448 503 q 475 504 466 485 q 495 543 484 522 q 518 585 506 563 q 543 629 531 607 l 631 789 q 651 834 645 812 q 657 872 657 855 q 635 918 657 903 q 573 933 613 933 l 532 933 l 532 992 l 872 992 l 872 933 l 855 933 q 827 928 840 933 q 800 910 814 923 q 772 877 787 898 q 740 825 758 857 l 507 413 l 507 158 q 516 105 507 125 q 540 75 525 86 q 576 61 556 65 q 620 58 597 58 l 653 58 l 653 0 l 221 0 "},"E":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 324 69 l 592 69 q 649 78 626 69 q 688 103 673 87 q 713 139 704 118 q 725 183 722 160 l 735 243 l 807 243 l 797 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 753 992 l 760 749 l 688 749 l 681 808 q 670 852 678 831 q 648 888 662 873 q 611 913 633 904 q 558 922 589 922 l 324 922 l 324 553 l 660 553 l 660 483 l 324 483 l 324 69 "},"Ô":{"x_min":78,"x_max":952,"ha":1031,"o":"m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 m 312 1089 q 347 1134 328 1108 q 387 1187 367 1160 q 423 1242 406 1215 q 451 1293 440 1269 l 582 1293 q 610 1242 593 1269 q 646 1187 627 1215 q 686 1134 666 1160 q 722 1089 705 1108 l 722 1071 l 667 1071 q 587 1128 627 1093 q 516 1195 547 1162 q 445 1128 484 1162 q 366 1071 405 1093 l 312 1071 l 312 1089 "},"Є":{"x_min":79,"x_max":806,"ha":853,"o":"m 524 1006 q 648 994 596 1006 q 736 961 701 982 q 788 911 771 940 q 806 850 806 883 q 796 809 806 827 q 771 779 787 791 q 733 759 755 766 q 685 753 711 753 q 676 817 685 785 q 648 874 668 848 q 598 915 629 899 q 522 931 567 931 q 393 904 446 931 q 304 827 339 878 q 252 703 270 777 q 232 534 235 629 l 617 534 l 617 464 l 232 464 q 253 307 235 379 q 306 185 271 236 q 395 105 341 133 q 522 77 449 77 q 612 87 573 77 q 681 113 651 97 q 734 151 711 129 q 774 196 756 172 q 793 175 786 188 q 801 141 801 162 q 783 87 801 115 q 728 37 765 60 q 635 0 691 15 q 501 -14 578 -14 q 318 22 397 -14 q 186 126 239 59 q 106 288 133 193 q 79 497 79 382 q 107 703 79 609 q 192 864 136 796 q 331 968 248 931 q 524 1006 415 1006 "},"Ï":{"x_min":49,"x_max":456.640625,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 m 49 1185 q 54 1221 49 1206 q 69 1245 59 1236 q 91 1258 78 1254 q 119 1263 104 1263 q 147 1258 134 1263 q 170 1245 160 1254 q 185 1221 179 1236 q 190 1185 190 1206 q 185 1149 190 1163 q 170 1124 179 1134 q 147 1111 160 1115 q 119 1107 134 1107 q 69 1124 89 1107 q 49 1185 49 1142 m 313 1185 q 318 1221 313 1206 q 333 1245 323 1236 q 355 1258 342 1254 q 383 1263 368 1263 q 411 1258 398 1263 q 434 1245 424 1254 q 449 1221 443 1236 q 454 1185 454 1206 q 449 1149 454 1163 q 434 1124 443 1134 q 411 1111 424 1115 q 383 1107 398 1107 q 333 1124 353 1107 q 313 1185 313 1142 "},"ġ":{"x_min":32,"x_max":731,"ha":747,"o":"m 731 715 q 726 687 731 700 q 713 664 722 674 q 690 648 704 654 q 657 643 676 643 q 655 658 657 650 q 648 673 653 666 q 634 684 643 680 q 611 688 625 688 q 579 685 593 688 q 551 673 565 681 q 590 604 575 644 q 606 505 606 564 q 590 410 606 453 q 543 334 574 366 q 465 284 512 302 q 355 267 418 267 q 337 267 347 267 q 316 268 326 267 q 297 269 306 268 q 283 271 288 270 q 273 256 278 264 q 264 237 268 248 q 259 214 261 227 q 256 186 256 201 q 262 159 256 169 q 279 143 268 148 q 304 135 289 137 q 335 134 318 134 l 479 134 q 576 118 536 134 q 640 75 615 102 q 677 9 666 47 q 689 -73 689 -29 q 666 -181 689 -133 q 599 -263 644 -230 q 484 -315 554 -297 q 320 -334 415 -334 q 103 -276 175 -334 q 32 -117 32 -219 q 45 -41 32 -74 q 82 13 59 -9 q 136 51 106 36 q 200 72 166 65 q 173 86 186 77 q 149 108 160 96 q 132 138 139 121 q 126 174 126 154 q 148 239 126 212 q 219 292 170 266 q 166 325 189 304 q 126 374 142 346 q 102 434 110 401 q 94 501 94 466 q 110 609 94 561 q 159 689 126 656 q 240 740 191 722 q 355 758 289 758 q 405 754 380 758 q 450 744 429 750 q 487 729 470 737 q 514 712 504 721 q 538 736 524 723 q 568 760 551 749 q 605 779 585 772 q 648 787 625 787 q 685 781 669 787 q 710 765 700 775 q 725 742 720 755 q 731 715 731 729 m 162 -103 q 170 -167 162 -137 q 196 -218 177 -197 q 246 -252 215 -240 q 327 -264 278 -264 q 440 -250 395 -264 q 510 -211 484 -236 q 547 -151 536 -186 q 558 -75 558 -116 q 549 -15 558 -39 q 524 21 541 7 q 484 39 508 34 q 428 45 459 45 l 302 45 q 250 39 276 45 q 206 17 225 33 q 174 -27 186 1 q 162 -103 162 -56 m 224 505 q 254 377 224 417 q 351 336 284 336 q 408 346 385 336 q 447 377 432 356 q 468 430 462 397 q 475 507 475 462 q 446 644 475 600 q 350 688 418 688 q 253 643 282 688 q 224 505 224 598 m 276 970 q 282 1011 276 994 q 299 1037 288 1027 q 324 1051 309 1047 q 355 1056 338 1056 q 386 1051 371 1056 q 411 1037 400 1047 q 428 1011 422 1027 q 435 970 435 994 q 428 929 435 945 q 411 903 422 913 q 386 888 400 892 q 355 884 371 884 q 324 888 338 884 q 299 903 309 892 q 282 929 288 913 q 276 970 276 945 "},"έ":{"x_min":75,"x_max":643,"ha":689,"o":"m 228 560 q 259 469 228 505 q 355 429 289 433 q 382 434 367 431 q 410 439 396 437 q 438 442 425 441 q 462 443 451 443 q 502 432 487 443 q 518 396 518 420 q 496 356 518 372 q 438 339 475 339 q 414 340 428 339 q 383 344 399 342 q 353 351 368 347 q 329 359 339 355 q 282 341 304 354 q 244 310 260 329 q 219 266 228 291 q 209 208 209 240 q 256 106 209 139 q 392 73 302 73 q 466 81 432 73 q 528 102 500 89 q 578 133 556 116 q 616 170 600 151 q 634 153 626 166 q 643 123 643 140 q 627 73 643 97 q 576 29 611 48 q 488 -2 542 9 q 356 -14 433 -14 q 230 2 284 -14 q 142 48 177 19 q 91 117 108 77 q 75 202 75 156 q 88 274 75 244 q 123 326 101 304 q 174 362 145 347 q 233 386 202 376 l 233 394 q 176 420 201 404 q 134 459 151 437 q 107 506 117 481 q 98 560 98 532 q 117 644 98 608 q 174 706 136 681 q 265 744 211 731 q 388 757 319 757 q 490 746 446 757 q 561 717 533 735 q 604 675 590 699 q 618 626 618 652 q 590 562 618 582 q 508 543 563 543 q 473 652 508 612 q 367 693 437 693 q 300 682 327 693 q 258 653 273 671 q 235 611 242 636 q 228 560 228 587 m 338 860 q 354 904 346 878 q 370 958 363 930 q 385 1013 378 986 q 395 1064 391 1041 l 520 1064 l 520 1049 q 500 1006 515 1033 q 466 949 486 979 q 423 890 445 919 q 383 842 401 861 l 338 842 l 338 860 "}," ":{"x_min":0,"x_max":0,"ha":463},"ϋ":{"x_min":25.203125,"x_max":747,"ha":823,"o":"m 426 -14 q 304 5 356 -14 q 218 62 253 25 q 166 154 183 100 q 150 276 150 208 l 150 591 q 139 640 150 622 q 112 669 129 659 q 74 683 95 679 q 29 686 52 686 l 25 686 l 25 745 l 280 745 l 280 288 q 324 129 280 183 q 448 74 368 74 q 554 100 513 74 q 618 170 595 125 q 651 277 642 216 q 660 412 660 339 q 648 515 660 470 q 618 593 637 561 q 575 643 599 624 q 528 669 551 662 q 535 706 528 690 q 552 733 541 722 q 578 750 563 744 q 609 756 593 756 q 671 729 645 756 q 714 658 697 702 q 738 558 730 614 q 747 444 747 502 q 740 328 747 385 q 719 220 734 271 q 681 126 704 169 q 621 52 657 83 q 537 3 585 21 q 426 -14 489 -14 m 196 956 q 201 992 196 977 q 216 1016 206 1007 q 238 1029 225 1025 q 266 1034 251 1034 q 294 1029 281 1034 q 317 1016 307 1025 q 332 992 326 1007 q 337 956 337 977 q 332 920 337 934 q 317 895 326 905 q 294 882 307 886 q 266 878 281 878 q 216 895 236 878 q 196 956 196 913 m 460 956 q 465 992 460 977 q 480 1016 470 1007 q 502 1029 489 1025 q 530 1034 515 1034 q 558 1029 545 1034 q 581 1016 571 1025 q 596 992 590 1007 q 601 956 601 977 q 596 920 601 934 q 581 895 590 905 q 558 882 571 886 q 530 878 545 878 q 480 895 500 878 q 460 956 460 913 "},"й":{"x_min":31.75,"x_max":924.25,"ha":956,"o":"m 924 745 l 924 686 l 905 686 q 862 683 882 686 q 825 670 841 680 q 801 642 810 660 q 792 593 792 623 l 792 151 q 801 102 792 120 q 825 73 810 83 q 862 61 841 64 q 905 58 882 58 l 924 58 l 924 0 l 528 0 l 528 58 l 547 58 q 590 61 570 58 q 627 73 611 64 q 651 102 642 83 q 661 151 661 120 l 661 497 l 294 158 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 31 686 l 31 745 l 427 745 l 427 686 l 408 686 q 365 683 385 686 q 328 670 344 680 q 304 642 313 660 q 294 593 294 623 l 294 245 l 661 587 l 661 591 q 651 640 661 622 q 627 669 642 659 q 590 683 611 679 q 547 686 570 686 l 543 686 l 543 745 l 924 745 m 745 1030 q 724 953 740 987 q 676 893 707 918 q 596 855 644 869 q 480 842 548 842 q 363 854 411 842 q 286 892 315 867 q 242 951 256 916 q 225 1030 228 986 l 340 1030 q 352 969 343 993 q 379 933 362 946 q 421 914 396 920 q 483 909 447 909 q 538 915 513 909 q 581 935 563 922 q 611 972 599 949 q 626 1030 622 995 l 745 1030 "},"b":{"x_min":25.203125,"x_max":777,"ha":853,"o":"m 777 373 q 758 199 777 272 q 703 78 739 126 q 614 8 667 31 q 493 -14 561 -14 q 420 -5 453 -14 q 362 19 388 3 q 315 58 335 36 q 280 108 295 80 l 272 108 l 247 0 l 25 0 l 25 58 l 36 58 q 80 61 59 58 q 116 75 101 65 q 140 105 131 86 q 150 158 150 125 l 150 902 q 140 951 150 932 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 25 996 l 25 1055 l 280 1055 l 280 800 q 280 745 280 776 q 278 686 279 714 q 275 618 276 653 l 280 618 q 316 676 296 650 q 361 720 335 702 q 420 748 387 738 q 493 758 452 758 q 614 735 561 758 q 703 665 667 712 q 758 545 739 618 q 777 373 777 473 m 469 669 q 378 651 415 669 q 320 596 342 633 q 290 504 299 559 q 280 373 280 448 q 290 245 280 300 q 321 151 299 189 q 379 94 343 113 q 470 74 415 74 q 549 94 517 74 q 602 151 581 113 q 632 245 623 189 q 642 374 642 301 q 632 503 642 448 q 602 595 623 559 q 548 650 581 632 q 469 669 515 669 "},"ύ":{"x_min":25.203125,"x_max":747,"ha":823,"o":"m 426 -14 q 304 5 356 -14 q 218 62 253 25 q 166 154 183 100 q 150 276 150 208 l 150 591 q 139 640 150 622 q 112 669 129 659 q 74 683 95 679 q 29 686 52 686 l 25 686 l 25 745 l 280 745 l 280 288 q 324 129 280 183 q 448 74 368 74 q 554 100 513 74 q 618 170 595 125 q 651 277 642 216 q 660 412 660 339 q 648 515 660 470 q 618 593 637 561 q 575 643 599 624 q 528 669 551 662 q 535 706 528 690 q 552 733 541 722 q 578 750 563 744 q 609 756 593 756 q 671 729 645 756 q 714 658 697 702 q 738 558 730 614 q 747 444 747 502 q 740 328 747 385 q 719 220 734 271 q 681 126 704 169 q 621 52 657 83 q 537 3 585 21 q 426 -14 489 -14 m 386 860 q 402 904 394 878 q 418 958 411 930 q 433 1013 426 986 q 443 1064 439 1041 l 568 1064 l 568 1049 q 548 1006 563 1033 q 514 949 534 979 q 471 890 493 919 q 431 842 449 861 l 386 842 l 386 860 "},"fl":{"x_min":37.734375,"x_max":901.578125,"ha":935,"o":"m 525 58 q 569 61 548 58 q 605 75 590 65 q 629 106 620 86 q 639 158 639 125 l 639 869 q 629 924 639 898 q 601 969 620 950 q 551 1000 582 989 q 478 1011 521 1011 q 390 993 425 1011 q 336 943 356 974 q 308 871 316 912 q 300 785 300 830 l 300 745 l 513 745 l 513 675 l 300 675 l 300 157 q 310 105 300 125 q 334 75 319 86 q 370 61 349 65 q 414 58 391 58 l 439 58 l 439 0 l 37 0 l 37 58 l 56 58 q 100 61 79 58 q 136 75 121 65 q 160 105 151 86 q 170 157 170 125 l 170 675 l 43 675 l 43 745 l 170 745 l 170 786 q 189 903 170 850 q 250 992 209 955 q 353 1049 291 1029 q 501 1070 416 1070 q 537 1068 518 1070 q 574 1064 556 1066 q 607 1059 592 1062 q 631 1055 622 1057 l 770 1055 l 770 158 q 778 105 770 125 q 803 75 787 86 q 839 61 818 65 q 883 58 860 58 l 901 58 l 901 0 l 521 0 l 521 58 l 525 58 "},"ф":{"x_min":77,"x_max":920,"ha":996,"o":"m 325 -276 q 369 -273 348 -276 q 405 -259 390 -269 q 429 -228 420 -248 q 439 -176 439 -208 l 439 -11 q 286 21 353 -4 q 172 96 219 48 q 101 214 125 145 q 77 373 77 283 q 168 649 77 554 q 439 756 260 743 l 439 902 q 429 951 439 933 q 405 980 420 970 q 368 993 389 990 q 325 996 348 996 l 307 996 l 307 1055 l 569 1055 l 569 756 q 717 722 652 749 q 827 647 782 694 q 896 531 872 599 q 920 373 920 463 q 831 96 920 192 q 569 -11 742 1 l 569 -176 q 579 -228 569 -208 q 603 -259 588 -248 q 639 -273 618 -269 q 683 -276 660 -276 l 702 -276 l 702 -335 l 307 -335 l 307 -276 l 325 -276 m 211 374 q 224 248 211 303 q 262 152 236 192 q 333 89 289 113 q 439 58 376 65 l 439 686 q 333 655 376 679 q 262 593 289 632 q 224 499 236 554 q 211 374 211 445 m 785 374 q 773 499 785 444 q 736 593 762 554 q 669 655 710 632 q 569 686 628 679 l 569 58 q 670 89 629 65 q 737 152 711 113 q 773 248 762 192 q 785 374 785 303 "},"Ŋ":{"x_min":52.421875,"x_max":1062.265625,"ha":1101,"o":"m 930 -10 q 916 -166 930 -104 q 877 -265 903 -228 q 811 -318 850 -302 q 718 -334 771 -334 l 687 -334 l 687 -264 l 706 -264 q 765 -252 739 -264 q 809 -210 791 -240 q 836 -133 826 -181 q 845 -12 845 -84 l 845 0 l 268 814 l 268 158 q 277 105 268 125 q 302 75 287 86 q 338 61 317 65 q 382 58 359 58 l 401 58 l 401 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 306 992 l 845 229 l 845 839 q 836 888 845 869 q 811 917 826 907 q 775 930 795 927 q 731 933 754 933 l 713 933 l 713 992 l 1062 992 l 1062 933 l 1043 933 q 999 930 1020 933 q 963 916 978 926 q 939 886 948 905 q 930 833 930 866 l 930 -10 "},"Ũ":{"x_min":21.4375,"x_max":975.25,"ha":996,"o":"m 502 -14 q 355 3 420 -14 q 245 58 290 20 q 176 155 200 95 q 153 299 153 214 l 153 839 q 143 888 153 869 q 119 917 134 907 q 82 930 103 927 q 39 933 62 933 l 21 933 l 21 992 l 425 992 l 425 933 l 407 933 q 363 930 384 933 q 326 916 342 926 q 302 885 311 905 q 293 832 293 865 l 293 285 q 310 181 293 224 q 358 112 327 138 q 431 72 389 85 q 525 60 474 60 q 629 77 585 60 q 701 122 672 93 q 744 191 730 151 q 758 279 758 231 l 758 838 q 749 888 758 869 q 724 917 739 906 q 688 930 708 927 q 644 933 667 933 l 626 933 l 626 992 l 975 992 l 975 933 l 956 933 q 912 930 933 933 q 876 916 891 926 q 852 886 861 905 q 843 833 843 866 l 843 283 q 820 158 843 214 q 755 65 798 103 q 649 6 712 26 q 502 -14 585 -14 m 630 1161 q 663 1167 651 1161 q 683 1183 676 1173 q 693 1207 690 1194 q 698 1235 696 1220 l 761 1235 q 749 1173 758 1203 q 723 1121 740 1144 q 679 1084 705 1098 q 615 1071 652 1071 q 547 1084 578 1071 q 491 1114 517 1098 q 442 1145 465 1131 q 397 1158 420 1158 q 364 1152 376 1158 q 345 1136 352 1146 q 334 1112 338 1126 q 329 1085 331 1099 l 267 1085 q 278 1146 269 1116 q 305 1198 287 1175 q 350 1235 323 1221 q 414 1249 376 1249 q 481 1235 451 1249 q 537 1205 511 1221 q 586 1174 563 1188 q 630 1161 609 1161 "},"Щ":{"x_min":52.421875,"x_max":1456,"ha":1499,"o":"m 1456 -292 l 1384 -292 q 1330 -72 1384 -144 q 1181 0 1277 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 74 134 64 q 174 103 165 84 q 184 152 184 122 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 69 l 679 69 l 679 839 q 671 886 679 867 q 649 915 663 904 q 617 929 635 925 q 579 933 599 933 l 575 933 l 575 992 l 923 992 l 923 933 l 919 933 q 880 929 898 933 q 848 914 861 925 q 827 883 834 903 q 819 833 819 864 l 819 69 l 1173 69 l 1173 833 q 1164 886 1173 866 q 1140 916 1155 905 q 1104 930 1124 926 q 1059 933 1083 933 l 1041 933 l 1041 992 l 1446 992 l 1446 933 l 1427 933 q 1383 930 1404 933 q 1347 916 1362 926 q 1323 886 1332 905 q 1314 833 1314 866 l 1314 158 q 1323 105 1314 125 q 1347 75 1332 86 q 1383 61 1362 65 q 1428 58 1405 58 l 1456 58 l 1456 -292 "},"L":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 358 917 373 927 q 333 888 342 907 q 324 839 324 869 l 324 69 l 599 69 q 652 80 630 69 q 688 109 674 91 q 710 150 703 127 q 721 194 718 172 l 735 299 l 807 299 l 797 0 l 52 0 "},"ď":{"x_min":77,"x_max":943,"ha":853,"o":"m 703 152 q 712 103 703 122 q 736 74 721 84 q 773 61 752 64 q 816 58 793 58 l 828 58 l 828 0 l 592 0 l 577 124 l 572 124 q 536 67 556 92 q 490 23 516 41 q 432 -4 465 5 q 359 -14 400 -14 q 238 8 291 -14 q 149 78 185 31 q 95 198 113 125 q 77 370 77 270 q 95 544 77 471 q 149 665 113 617 q 238 735 185 712 q 359 758 291 758 q 431 749 399 758 q 490 724 464 740 q 536 685 516 707 q 572 635 557 663 l 580 635 q 576 699 578 669 q 573 750 574 725 q 572 788 572 776 l 572 902 q 562 951 572 932 q 538 980 553 970 q 501 993 522 990 q 458 996 481 996 l 446 996 l 446 1055 l 703 1055 l 703 152 m 383 74 q 473 92 437 74 q 531 147 509 110 q 562 239 553 184 q 572 370 572 295 q 562 498 572 443 q 531 592 553 554 q 473 649 509 629 q 382 669 436 669 q 304 649 336 669 q 251 591 272 629 q 221 497 230 553 q 211 369 211 441 q 251 148 211 221 q 383 74 291 74 m 780 850 q 802 951 791 897 q 822 1055 813 1004 l 943 1055 l 943 1041 q 919 992 933 1019 q 890 937 906 965 q 858 881 874 909 q 827 833 841 854 l 780 833 l 780 850 "},"Ο":{"x_min":78,"x_max":952,"ha":1031,"o":"m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 "},"Ĭ":{"x_min":52.421875,"x_max":456.640625,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 m 254 1071 q 168 1086 205 1071 q 108 1127 132 1101 q 73 1187 85 1153 q 60 1262 61 1222 l 123 1262 q 169 1188 135 1210 q 254 1166 203 1166 q 339 1188 305 1166 q 384 1262 373 1210 l 449 1262 q 435 1187 447 1222 q 399 1127 423 1153 q 339 1086 375 1101 q 254 1071 303 1071 "},"ŧ":{"x_min":26.203125,"x_max":457.546875,"ha":489,"o":"m 368 55 q 414 57 393 55 q 457 64 435 60 l 457 6 q 434 -1 448 2 q 403 -7 420 -5 q 368 -12 387 -10 q 334 -14 350 -14 q 243 -2 281 -14 q 180 33 204 8 q 143 98 155 57 q 132 198 132 139 l 132 399 l 37 399 l 37 469 l 132 469 l 132 665 l 26 665 l 26 721 q 81 731 51 721 q 134 765 111 741 q 173 826 158 791 q 198 916 187 862 l 262 916 l 262 745 l 444 745 l 444 665 l 262 665 l 262 469 l 431 469 l 431 399 l 262 399 l 262 192 q 291 88 262 121 q 368 55 320 55 "},"À":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 m 546 1071 l 493 1071 q 432 1118 465 1089 q 369 1175 400 1146 q 313 1233 339 1205 q 276 1278 288 1260 l 276 1293 l 424 1293 q 450 1242 435 1269 q 480 1187 464 1215 q 514 1134 497 1160 q 546 1089 531 1108 l 546 1071 "},"Ϊ":{"x_min":49,"x_max":456.640625,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 m 49 1185 q 54 1221 49 1206 q 69 1245 59 1236 q 91 1258 78 1254 q 119 1263 104 1263 q 147 1258 134 1263 q 170 1245 160 1254 q 185 1221 179 1236 q 190 1185 190 1206 q 185 1149 190 1163 q 170 1124 179 1134 q 147 1111 160 1115 q 119 1107 134 1107 q 69 1124 89 1107 q 49 1185 49 1142 m 313 1185 q 318 1221 313 1206 q 333 1245 323 1236 q 355 1258 342 1254 q 383 1263 368 1263 q 411 1258 398 1263 q 434 1245 424 1254 q 449 1221 443 1236 q 454 1185 454 1206 q 449 1149 454 1163 q 434 1124 443 1134 q 411 1111 424 1115 q 383 1107 398 1107 q 333 1124 353 1107 q 313 1185 313 1142 "},"ḁ":{"x_min":69,"x_max":722.203125,"ha":782,"o":"m 203 200 q 231 103 203 135 q 316 71 258 71 q 392 84 358 71 q 451 123 427 98 q 488 184 475 148 q 501 263 501 219 l 501 375 l 412 371 q 313 357 353 368 q 249 324 273 345 q 214 271 225 302 q 203 200 203 240 m 372 688 q 307 677 331 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 200 727 166 711 q 280 750 234 743 q 377 758 325 758 q 488 745 441 758 q 568 704 536 732 q 616 630 600 675 q 632 518 632 584 l 632 157 q 636 109 632 128 q 651 79 641 90 q 678 63 661 67 q 718 58 695 58 l 722 58 l 722 0 l 534 0 l 512 118 l 501 118 q 459 65 479 89 q 414 23 438 40 q 358 -4 389 5 q 284 -14 328 -14 q 198 0 238 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 147 371 69 318 q 385 429 226 425 l 501 434 l 501 517 q 497 586 501 554 q 479 640 492 618 q 440 676 465 663 q 372 688 414 688 m 558 -236 q 545 -301 558 -273 q 509 -348 532 -329 q 456 -377 486 -367 q 391 -387 425 -387 q 325 -377 356 -387 q 272 -348 295 -367 q 236 -301 249 -329 q 224 -236 224 -273 q 236 -171 224 -199 q 272 -123 249 -142 q 325 -94 295 -104 q 391 -85 356 -85 q 456 -94 425 -85 q 509 -123 486 -104 q 545 -171 532 -142 q 558 -236 558 -199 m 482 -236 q 475 -197 482 -213 q 455 -172 468 -181 q 426 -157 443 -162 q 391 -152 410 -152 q 355 -157 371 -152 q 326 -172 338 -162 q 306 -197 313 -181 q 299 -236 299 -213 q 306 -274 299 -258 q 326 -299 313 -290 q 355 -314 338 -309 q 391 -319 371 -319 q 426 -314 410 -319 q 455 -299 443 -309 q 475 -274 468 -290 q 482 -236 482 -258 "},"½":{"x_min":32.453125,"x_max":1115,"ha":1167,"o":"m 40 399 l 40 454 l 105 454 q 127 456 117 454 q 145 463 137 457 q 157 478 153 468 q 162 505 162 488 l 162 890 l 32 890 l 32 946 l 102 946 q 135 948 117 946 q 169 956 153 950 q 198 972 185 962 q 217 999 211 982 l 286 999 l 286 498 q 291 470 286 481 q 304 454 296 460 q 322 447 311 449 q 345 445 332 445 l 408 445 l 408 399 l 40 399 m 356 0 l 264 0 l 760 992 l 851 992 l 356 0 m 1098 458 q 1090 397 1098 426 q 1065 340 1083 369 q 1019 281 1047 312 q 947 213 990 251 l 800 87 l 1001 87 q 1045 104 1033 87 q 1062 144 1058 121 l 1067 173 l 1115 173 l 1110 0 l 689 0 l 689 62 l 864 220 q 916 277 895 248 q 949 334 937 305 q 967 391 962 363 q 973 447 973 420 q 968 489 973 470 q 954 523 964 509 q 929 545 944 537 q 891 553 913 553 q 848 543 866 553 q 820 517 831 533 q 805 478 809 500 q 800 432 800 456 q 726 444 753 432 q 700 492 700 455 q 712 538 700 517 q 748 575 724 560 q 808 600 772 591 q 891 609 844 609 q 1043 570 988 609 q 1098 458 1098 532 "},"'":{"x_min":79,"x_max":223.46875,"ha":306,"o":"m 79 992 l 223 992 l 182 666 l 119 666 l 79 992 "},"ij":{"x_min":31.75,"x_max":733,"ha":861,"o":"m 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 294 745 l 294 158 q 304 105 294 125 q 328 75 313 86 q 364 61 343 65 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 m 144 969 q 150 1010 144 993 q 167 1036 156 1026 q 192 1050 177 1046 q 223 1055 206 1055 q 253 1050 239 1055 q 278 1036 268 1046 q 295 1010 289 1026 q 302 969 302 993 q 295 928 302 944 q 278 902 289 912 q 253 887 268 891 q 223 883 239 883 q 192 887 206 883 q 167 902 177 891 q 150 928 156 912 q 144 969 144 944 m 724 745 l 724 -10 q 704 -166 724 -104 q 647 -265 684 -228 q 560 -318 610 -302 q 449 -334 509 -334 l 427 -334 l 427 -264 l 437 -264 q 503 -252 474 -264 q 552 -210 532 -239 q 583 -131 572 -180 q 594 -9 594 -82 l 594 592 q 584 641 594 622 q 560 669 575 659 q 523 683 544 679 q 480 686 503 686 l 475 686 l 475 745 l 724 745 m 575 969 q 581 1010 575 993 q 597 1036 587 1026 q 622 1050 608 1046 q 653 1055 637 1055 q 684 1050 669 1055 q 709 1036 699 1046 q 726 1010 720 1026 q 733 969 733 993 q 726 928 733 944 q 709 902 720 912 q 684 887 699 891 q 653 883 669 883 q 622 887 637 883 q 597 902 608 891 q 581 928 587 912 q 575 969 575 944 "},"Р":{"x_min":52.421875,"x_max":785,"ha":839,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 442 992 q 594 971 530 992 q 701 913 659 951 q 764 822 743 876 q 785 700 785 768 q 765 580 785 637 q 702 479 746 523 q 586 409 657 435 q 412 382 515 382 l 324 382 l 324 150 q 333 101 324 120 q 358 73 342 83 q 394 61 373 64 q 438 58 415 58 l 484 58 l 484 0 l 52 0 m 324 452 l 397 452 q 504 465 459 452 q 576 507 548 478 q 617 583 604 536 q 631 694 631 629 q 619 795 631 752 q 582 866 608 838 q 516 909 557 895 q 417 922 476 922 l 324 922 l 324 452 "},"˛":{"x_min":239,"x_max":537,"ha":695,"o":"m 239 -180 q 252 -118 239 -147 q 289 -65 266 -89 q 341 -24 312 -41 q 403 0 371 -7 l 482 0 q 437 -20 460 -6 q 396 -54 414 -34 q 365 -102 377 -75 q 352 -162 352 -129 q 360 -203 352 -186 q 380 -230 367 -220 q 410 -246 393 -241 q 449 -251 428 -251 q 489 -248 467 -251 q 537 -240 511 -245 l 537 -312 q 512 -321 526 -317 q 483 -328 498 -325 q 454 -332 468 -330 q 429 -334 440 -334 q 350 -324 385 -334 q 290 -297 315 -315 q 252 -249 265 -278 q 239 -180 239 -220 "},"Ć":{"x_min":79,"x_max":806,"ha":853,"o":"m 524 1006 q 648 994 596 1006 q 736 961 701 982 q 788 911 771 940 q 806 850 806 883 q 796 809 806 827 q 771 779 787 791 q 733 759 755 766 q 685 753 711 753 q 676 817 685 785 q 648 874 668 848 q 598 915 629 899 q 522 931 567 931 q 388 902 443 931 q 298 818 333 873 q 248 682 264 763 q 232 496 232 601 q 249 326 232 403 q 300 193 265 249 q 390 108 336 138 q 522 77 445 77 q 612 87 573 77 q 681 113 651 97 q 734 151 711 129 q 774 196 756 172 q 793 175 786 188 q 801 141 801 162 q 783 87 801 115 q 728 37 765 60 q 635 0 691 15 q 501 -14 578 -14 q 318 22 397 -14 q 186 126 239 59 q 106 288 133 193 q 79 497 79 382 q 107 703 79 609 q 192 864 136 796 q 331 968 248 931 q 524 1006 415 1006 m 446 1089 q 478 1134 461 1108 q 510 1187 494 1160 q 541 1242 526 1215 q 566 1293 555 1269 l 715 1293 l 715 1278 q 677 1233 702 1260 q 621 1175 651 1205 q 558 1118 591 1146 q 498 1071 526 1089 l 446 1071 l 446 1089 "},"Т":{"x_min":28,"x_max":823,"ha":851,"o":"m 494 158 q 503 105 494 125 q 527 75 512 86 q 564 61 543 65 q 608 58 585 58 l 640 58 l 640 0 l 208 0 l 208 58 l 240 58 q 283 61 263 58 q 320 73 304 64 q 344 102 335 83 q 354 151 354 120 l 354 922 l 221 922 q 170 913 190 922 q 136 888 149 904 q 116 852 122 873 q 107 808 110 831 l 99 749 l 28 749 l 34 992 l 816 992 l 823 749 l 751 749 l 744 808 q 734 852 741 831 q 715 888 728 873 q 681 913 702 904 q 629 922 660 922 l 494 922 l 494 158 "},"£":{"x_min":67.75,"x_max":736,"ha":777,"o":"m 339 463 q 358 394 349 429 q 366 317 366 358 q 333 213 366 258 q 244 131 299 168 l 247 124 q 300 144 276 138 q 348 150 325 150 q 409 141 376 150 q 475 123 442 133 q 538 105 508 113 q 590 97 569 97 q 635 104 614 97 q 674 123 655 111 q 707 149 692 134 q 736 179 723 163 l 736 89 q 706 53 723 71 q 667 20 689 35 q 616 -4 645 5 q 554 -14 588 -14 q 486 -4 519 -14 q 419 17 453 5 q 350 39 385 29 q 278 49 315 49 q 192 35 232 49 q 107 1 152 22 l 89 -7 l 89 65 l 114 81 q 165 118 139 96 q 210 168 190 140 q 244 232 231 197 q 257 308 257 267 q 246 387 257 348 q 222 463 236 426 l 67 463 l 67 533 l 195 533 q 176 581 186 554 q 159 636 167 607 q 147 695 152 665 q 143 754 143 725 q 162 860 143 813 q 218 939 182 907 q 308 989 255 972 q 426 1006 360 1006 q 540 994 493 1006 q 616 961 587 982 q 658 912 645 940 q 672 850 672 883 q 642 783 672 805 q 562 760 613 760 q 556 824 562 793 q 535 880 550 856 q 492 921 520 905 q 421 936 465 936 q 302 890 340 936 q 265 757 265 844 q 270 693 265 724 q 284 633 275 662 q 301 578 292 604 q 319 533 311 553 l 555 533 l 555 463 l 339 463 "},"ů":{"x_min":31.984375,"x_max":850.015625,"ha":882,"o":"m 732 151 q 741 102 732 120 q 765 73 750 83 q 802 61 781 64 q 845 58 822 58 l 850 58 l 850 0 l 629 0 l 611 112 l 604 112 q 558 48 583 72 q 504 10 532 24 q 444 -8 475 -3 q 379 -14 413 -14 q 281 1 324 -14 q 209 50 238 17 q 165 135 180 83 q 150 258 150 186 l 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 l 280 264 q 288 184 280 219 q 311 124 295 148 q 356 87 328 99 q 426 74 384 74 q 505 91 472 74 q 559 136 538 107 q 590 207 580 166 q 601 299 601 249 l 601 586 q 591 638 601 618 q 567 669 582 658 q 531 683 552 679 q 487 686 510 686 l 483 686 l 483 745 l 732 745 l 732 151 m 590 979 q 577 913 590 941 q 541 866 564 885 q 488 837 518 847 q 423 828 457 828 q 357 837 388 828 q 304 866 327 847 q 268 913 281 885 q 256 979 256 941 q 268 1044 256 1015 q 304 1091 281 1072 q 357 1120 327 1110 q 423 1130 388 1130 q 488 1120 457 1130 q 541 1091 518 1110 q 577 1044 564 1072 q 590 979 590 1015 m 514 979 q 507 1017 514 1001 q 487 1042 500 1033 q 458 1057 475 1052 q 423 1062 442 1062 q 387 1057 403 1062 q 358 1042 370 1052 q 338 1017 345 1033 q 331 979 331 1001 q 338 940 331 956 q 358 915 345 924 q 387 900 370 905 q 423 895 403 895 q 458 900 442 895 q 487 915 475 905 q 507 940 500 924 q 514 979 514 956 "},"Ō":{"x_min":78,"x_max":952,"ha":1031,"o":"m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 m 715 1071 l 312 1071 l 312 1153 l 715 1153 l 715 1071 "},"а":{"x_min":69,"x_max":722.203125,"ha":782,"o":"m 203 200 q 231 103 203 135 q 316 71 258 71 q 392 84 358 71 q 451 123 427 98 q 488 184 475 148 q 501 263 501 219 l 501 375 l 412 371 q 313 357 353 368 q 249 324 273 345 q 214 271 225 302 q 203 200 203 240 m 372 688 q 307 677 331 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 200 727 166 711 q 280 750 234 743 q 377 758 325 758 q 488 745 441 758 q 568 704 536 732 q 616 630 600 675 q 632 518 632 584 l 632 157 q 636 109 632 128 q 651 79 641 90 q 678 63 661 67 q 718 58 695 58 l 722 58 l 722 0 l 534 0 l 512 118 l 501 118 q 459 65 479 89 q 414 23 438 40 q 358 -4 389 5 q 284 -14 328 -14 q 198 0 238 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 147 371 69 318 q 385 429 226 425 l 501 434 l 501 517 q 497 586 501 554 q 479 640 492 618 q 440 676 465 663 q 372 688 414 688 "},"Ğ":{"x_min":79,"x_max":965.046875,"ha":992,"o":"m 556 -14 q 345 22 435 -14 q 196 126 256 59 q 108 288 137 193 q 79 497 79 382 q 109 703 79 609 q 202 864 140 796 q 354 968 263 931 q 565 1006 445 1006 q 700 994 642 1006 q 795 961 757 982 q 853 911 834 940 q 872 850 872 883 q 861 809 872 827 q 834 779 851 791 q 793 759 817 766 q 743 753 770 753 q 733 817 743 785 q 702 874 724 848 q 645 915 680 899 q 559 931 610 931 q 409 902 471 931 q 307 817 346 873 q 250 680 268 762 q 232 494 232 599 q 251 309 232 390 q 310 173 269 228 q 418 89 352 117 q 579 60 484 60 q 656 64 619 60 q 723 77 694 68 l 723 302 q 714 352 723 333 q 689 380 705 371 q 653 394 674 390 q 609 397 632 397 l 604 397 l 604 456 l 965 456 l 965 397 l 959 397 q 922 394 939 397 q 891 380 904 390 q 871 350 878 370 q 864 297 864 330 l 864 49 q 720 1 794 17 q 556 -14 646 -14 m 547 1071 q 461 1086 498 1071 q 401 1127 425 1101 q 366 1187 378 1153 q 353 1262 354 1222 l 416 1262 q 462 1188 428 1210 q 547 1166 496 1166 q 632 1188 598 1166 q 677 1262 666 1210 l 742 1262 q 728 1187 740 1222 q 692 1127 716 1153 q 632 1086 668 1101 q 547 1071 596 1071 "},"v":{"x_min":5,"x_max":800,"ha":804,"o":"m 5 686 l 5 745 l 352 745 l 352 686 l 334 686 q 271 670 292 686 q 251 619 251 654 q 253 596 251 607 q 262 568 256 584 l 356 306 q 374 252 365 281 q 392 194 384 222 q 407 140 401 165 q 417 97 414 114 l 422 97 q 433 134 425 111 q 451 182 441 156 q 471 235 460 208 q 491 287 481 262 l 591 558 q 600 590 597 575 q 604 618 604 606 q 581 670 604 654 q 512 686 558 686 l 502 686 l 502 745 l 800 745 l 800 686 l 783 686 q 748 682 762 686 q 722 665 734 677 q 700 632 711 653 q 677 578 690 611 l 458 0 l 331 0 l 108 612 q 91 648 99 634 q 70 671 82 662 q 44 683 59 679 q 9 686 29 686 l 5 686 "},"Ї":{"x_min":49,"x_max":456.640625,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 m 49 1185 q 54 1221 49 1206 q 69 1245 59 1236 q 91 1258 78 1254 q 119 1263 104 1263 q 147 1258 134 1263 q 170 1245 160 1254 q 185 1221 179 1236 q 190 1185 190 1206 q 185 1149 190 1163 q 170 1124 179 1134 q 147 1111 160 1115 q 119 1107 134 1107 q 69 1124 89 1107 q 49 1185 49 1142 m 313 1185 q 318 1221 313 1206 q 333 1245 323 1236 q 355 1258 342 1254 q 383 1263 368 1263 q 411 1258 398 1263 q 434 1245 424 1254 q 449 1221 443 1236 q 454 1185 454 1206 q 449 1149 454 1163 q 434 1124 443 1134 q 411 1111 424 1115 q 383 1107 398 1107 q 333 1124 353 1107 q 313 1185 313 1142 "},"û":{"x_min":31.984375,"x_max":850.015625,"ha":882,"o":"m 732 151 q 741 102 732 120 q 765 73 750 83 q 802 61 781 64 q 845 58 822 58 l 850 58 l 850 0 l 629 0 l 611 112 l 604 112 q 558 48 583 72 q 504 10 532 24 q 444 -8 475 -3 q 379 -14 413 -14 q 281 1 324 -14 q 209 50 238 17 q 165 135 180 83 q 150 258 150 186 l 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 l 280 264 q 288 184 280 219 q 311 124 295 148 q 356 87 328 99 q 426 74 384 74 q 505 91 472 74 q 559 136 538 107 q 590 207 580 166 q 601 299 601 249 l 601 586 q 591 638 601 618 q 567 669 582 658 q 531 683 552 679 q 487 686 510 686 l 483 686 l 483 745 l 732 745 l 732 151 m 232 860 q 267 905 248 879 q 307 958 287 931 q 343 1013 326 986 q 371 1064 360 1040 l 502 1064 q 530 1013 513 1040 q 566 958 547 986 q 606 905 586 931 q 642 860 625 879 l 642 842 l 587 842 q 507 899 547 864 q 436 966 467 933 q 365 899 404 933 q 286 842 325 864 l 232 842 l 232 860 "},"Ź":{"x_min":50,"x_max":764,"ha":822,"o":"m 742 935 l 219 69 l 569 69 q 622 78 601 69 q 656 103 643 87 q 675 139 669 118 q 685 183 682 160 l 692 243 l 764 243 l 757 0 l 50 0 l 50 55 l 571 922 l 268 922 q 217 913 238 922 q 183 888 196 904 q 164 852 170 873 q 154 808 157 831 l 147 749 l 76 749 l 82 992 l 742 992 l 742 935 m 336 1089 q 368 1134 351 1108 q 400 1187 384 1160 q 431 1242 416 1215 q 456 1293 445 1269 l 605 1293 l 605 1278 q 567 1233 592 1260 q 511 1175 541 1205 q 448 1118 481 1146 q 388 1071 416 1089 l 336 1071 l 336 1089 "},"ˉ":{"x_min":146,"x_max":549,"ha":695,"o":"m 549 842 l 146 842 l 146 924 l 549 924 l 549 842 "},"Ĺ":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 358 917 373 927 q 333 888 342 907 q 324 839 324 869 l 324 69 l 599 69 q 652 80 630 69 q 688 109 674 91 q 710 150 703 127 q 721 194 718 172 l 735 299 l 807 299 l 797 0 l 52 0 m 207 1089 q 239 1134 222 1108 q 271 1187 255 1160 q 302 1242 287 1215 q 327 1293 316 1269 l 476 1293 l 476 1278 q 438 1233 463 1260 q 382 1175 412 1205 q 319 1118 352 1146 q 259 1071 287 1089 l 207 1071 l 207 1089 "},"₤":{"x_min":67.71875,"x_max":736,"ha":777,"o":"m 379 483 q 394 439 387 463 q 407 390 402 415 l 555 390 l 555 320 l 415 320 l 415 315 q 381 218 415 260 q 292 140 348 176 l 296 134 q 349 153 324 147 q 397 159 374 159 q 452 149 423 159 q 509 128 481 140 q 564 106 538 116 q 609 97 590 97 q 648 104 630 97 q 682 123 666 111 q 711 149 698 134 q 736 179 724 163 l 736 89 q 706 53 723 71 q 667 20 689 35 q 616 -4 645 5 q 554 -14 588 -14 q 486 -4 519 -14 q 419 17 453 5 q 350 38 385 28 q 278 48 315 48 q 192 34 232 48 q 107 1 152 21 l 89 -7 l 89 65 l 116 80 q 173 118 144 96 q 224 168 201 139 q 260 231 246 196 q 275 307 275 265 l 275 320 l 67 320 l 67 390 l 265 390 q 252 439 260 415 q 234 483 244 463 l 67 483 l 67 553 l 204 553 q 182 598 193 574 q 162 646 171 621 q 148 698 154 671 q 143 754 143 725 q 162 860 143 814 q 218 939 182 907 q 308 989 255 972 q 426 1006 360 1006 q 540 994 493 1006 q 616 961 587 982 q 658 912 645 940 q 672 850 672 883 q 642 783 672 805 q 562 760 613 760 q 556 824 562 793 q 536 880 551 856 q 496 921 522 905 q 429 936 470 936 q 318 890 354 936 q 283 757 283 844 q 290 696 283 724 q 308 642 297 667 q 330 595 318 617 q 353 553 343 572 l 555 553 l 555 483 l 379 483 "},"Č":{"x_min":79,"x_max":806,"ha":853,"o":"m 524 1006 q 648 994 596 1006 q 736 961 701 982 q 788 911 771 940 q 806 850 806 883 q 796 809 806 827 q 771 779 787 791 q 733 759 755 766 q 685 753 711 753 q 676 817 685 785 q 648 874 668 848 q 598 915 629 899 q 522 931 567 931 q 388 902 443 931 q 298 818 333 873 q 248 682 264 763 q 232 496 232 601 q 249 326 232 403 q 300 193 265 249 q 390 108 336 138 q 522 77 445 77 q 612 87 573 77 q 681 113 651 97 q 734 151 711 129 q 774 196 756 172 q 793 175 786 188 q 801 141 801 162 q 783 87 801 115 q 728 37 765 60 q 635 0 691 15 q 501 -14 578 -14 q 318 22 397 -14 q 186 126 239 59 q 106 288 133 193 q 79 497 79 382 q 107 703 79 609 q 192 864 136 796 q 331 968 248 931 q 524 1006 415 1006 m 295 1293 l 349 1293 q 389 1265 368 1280 q 428 1234 409 1251 q 465 1200 447 1217 q 499 1166 483 1183 q 532 1200 514 1183 q 570 1234 550 1217 q 610 1265 590 1251 q 650 1293 631 1280 l 705 1293 l 705 1274 q 669 1229 688 1255 q 629 1176 649 1203 q 593 1121 610 1148 q 565 1071 576 1094 l 434 1071 q 406 1121 423 1094 q 370 1176 389 1148 q 330 1229 350 1203 q 295 1274 311 1255 l 295 1293 "},"x":{"x_min":7,"x_max":796,"ha":803,"o":"m 532 645 q 511 678 532 671 q 458 686 490 686 l 454 686 l 454 745 l 758 745 l 758 686 l 745 686 q 708 683 725 686 q 676 670 692 679 q 643 643 660 660 q 605 597 626 625 l 462 407 l 666 132 q 724 74 696 91 q 777 58 751 58 l 796 58 l 796 0 l 437 0 l 437 58 l 444 58 q 527 104 527 58 q 525 119 527 111 q 517 138 523 127 q 500 163 511 148 q 474 200 490 178 l 382 325 l 285 189 q 272 170 278 181 q 259 147 265 159 q 251 124 254 136 q 247 101 247 112 q 267 68 247 78 q 333 58 287 58 l 337 58 l 337 0 l 7 0 l 7 58 l 19 58 q 63 62 44 58 q 99 76 82 66 q 133 104 116 86 q 171 147 150 121 l 346 373 l 170 612 q 111 667 140 648 q 51 686 82 686 l 33 686 l 33 745 l 385 745 l 385 686 l 381 686 q 342 683 357 686 q 317 674 326 680 q 305 661 309 669 q 302 645 302 654 q 310 617 302 631 q 334 582 319 603 l 426 457 l 498 561 q 523 605 513 584 q 532 645 532 626 "},"è":{"x_min":77,"x_max":673,"ha":743,"o":"m 384 678 q 264 617 306 678 q 214 438 222 556 l 538 438 q 529 536 538 491 q 503 612 521 580 q 456 661 485 644 q 384 678 427 678 m 398 -14 q 263 11 323 -14 q 162 85 203 36 q 98 205 120 134 q 77 366 77 276 q 156 659 77 561 q 384 758 236 758 q 505 736 451 758 q 595 673 558 715 q 653 568 633 631 q 673 423 673 505 l 673 358 l 211 358 q 227 230 213 284 q 266 142 241 176 q 330 91 292 107 q 417 74 368 74 q 484 82 453 74 q 540 104 515 90 q 584 134 565 117 q 615 170 603 151 q 633 153 625 165 q 642 122 642 140 q 627 77 642 101 q 581 33 612 53 q 505 0 551 13 q 398 -14 459 -14 m 463 842 l 410 842 q 349 889 382 860 q 286 946 317 917 q 230 1004 256 976 q 193 1049 205 1031 l 193 1064 l 341 1064 q 367 1013 352 1040 q 397 958 381 986 q 431 905 414 931 q 463 860 448 879 l 463 842 "},"Ń":{"x_min":52.421875,"x_max":1020.5625,"ha":1060,"o":"m 789 0 l 268 800 l 268 158 q 277 105 268 125 q 302 75 287 86 q 338 61 317 65 q 382 58 359 58 l 401 58 l 401 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 306 992 l 804 223 l 804 839 q 795 888 804 869 q 770 917 785 907 q 734 930 754 927 q 690 933 713 933 l 671 933 l 671 992 l 1020 992 l 1020 933 l 1002 933 q 958 930 979 933 q 922 916 937 926 q 897 886 906 905 q 889 833 889 866 l 889 0 l 789 0 m 479 1089 q 511 1134 494 1108 q 543 1187 527 1160 q 574 1242 559 1215 q 599 1293 588 1269 l 748 1293 l 748 1278 q 710 1233 735 1260 q 654 1175 684 1205 q 591 1118 624 1146 q 531 1071 559 1089 l 479 1071 l 479 1089 "},"ḿ":{"x_min":38.53125,"x_max":1273.234375,"ha":1312,"o":"m 412 58 l 412 0 l 38 0 l 38 58 l 56 58 q 100 61 80 58 q 134 75 119 65 q 156 105 148 86 q 164 158 164 125 l 164 591 q 155 640 164 622 q 133 669 147 659 q 99 683 119 679 q 56 686 79 686 l 52 686 l 52 745 l 270 745 l 289 631 l 295 631 q 339 695 316 670 q 389 733 362 720 q 443 752 415 747 q 505 758 472 758 q 569 751 539 758 q 626 729 600 744 q 673 690 652 714 q 706 631 693 666 l 718 631 q 763 695 739 670 q 815 733 787 720 q 873 752 842 747 q 935 758 903 758 q 1030 742 988 758 q 1101 693 1072 726 q 1146 608 1130 660 q 1162 486 1162 557 l 1162 157 q 1170 105 1162 125 q 1192 75 1178 86 q 1226 61 1206 65 q 1269 58 1246 58 l 1273 58 l 1273 0 l 1031 0 l 1031 479 q 1023 560 1031 524 q 998 619 1015 595 q 953 656 981 644 q 885 669 925 669 q 813 652 842 669 q 765 607 783 635 q 739 541 747 578 q 731 462 731 504 l 731 157 q 740 105 731 125 q 762 75 748 86 q 796 61 776 65 q 839 58 816 58 l 843 58 l 843 0 l 601 0 l 601 479 q 593 560 601 524 q 568 619 585 595 q 523 656 551 644 q 455 669 495 669 q 379 650 410 669 q 330 601 348 632 q 303 529 311 570 q 294 444 294 488 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 412 58 m 602 860 q 634 905 617 879 q 666 958 650 931 q 697 1013 682 986 q 722 1064 711 1040 l 871 1064 l 871 1049 q 833 1004 858 1031 q 777 946 807 976 q 714 889 747 917 q 654 842 682 860 l 602 842 l 602 860 "},"μ":{"x_min":119.046875,"x_max":796.234375,"ha":855,"o":"m 385 -14 q 285 7 327 -14 q 216 67 244 28 q 221 -39 217 9 q 235 -124 224 -87 q 268 -183 246 -161 q 329 -212 290 -206 q 323 -261 329 -239 q 305 -299 317 -283 q 275 -324 293 -315 q 232 -334 257 -334 q 189 -325 210 -334 q 153 -298 169 -317 q 128 -247 138 -279 q 119 -168 119 -215 q 121 -79 119 -127 q 126 26 123 -31 q 132 155 129 84 q 136 312 135 225 l 136 745 l 266 745 l 266 277 q 273 195 266 232 q 296 130 280 157 q 338 89 312 104 q 405 74 365 74 q 475 91 444 74 q 527 136 506 107 q 561 207 549 166 q 573 299 573 249 l 573 745 l 704 745 l 704 179 q 712 125 704 148 q 732 88 720 103 q 760 65 745 73 q 791 58 776 58 l 796 58 l 796 0 l 720 0 q 631 28 663 0 q 585 111 598 56 l 579 111 q 545 60 563 83 q 503 21 526 37 q 450 -4 479 4 q 385 -14 422 -14 "},".":{"x_min":111,"x_max":286,"ha":397,"o":"m 111 84 q 117 129 111 111 q 136 158 124 147 q 164 174 148 169 q 198 179 180 179 q 232 174 216 179 q 259 158 248 169 q 278 129 271 147 q 286 84 286 111 q 278 39 286 57 q 259 10 271 21 q 232 -5 248 0 q 198 -10 216 -10 q 164 -5 180 -10 q 136 10 148 0 q 117 39 124 21 q 111 84 111 57 "},"‘":{"x_min":78,"x_max":306,"ha":347,"o":"m 78 720 q 90 806 78 764 q 129 883 102 847 q 200 946 157 918 q 306 993 244 974 l 306 934 q 205 881 237 912 q 173 809 173 850 q 181 786 173 796 q 199 770 188 777 q 224 756 211 763 q 248 740 237 750 q 267 717 260 731 q 275 682 275 703 q 248 621 275 642 q 184 600 222 600 q 144 607 163 600 q 109 630 124 615 q 86 668 94 646 q 78 720 78 691 "},"π":{"x_min":45,"x_max":818,"ha":875,"o":"m 818 656 l 664 656 q 660 473 662 561 q 658 395 659 435 q 657 318 658 356 q 656 245 656 280 q 656 185 656 211 q 663 126 656 148 q 682 92 670 104 q 708 77 693 80 q 737 73 723 73 q 766 77 752 73 q 793 84 779 80 l 793 20 q 747 -1 776 7 q 687 -11 719 -11 q 632 -1 657 -11 q 589 29 607 8 q 562 82 571 49 q 552 160 552 114 q 554 222 552 186 q 557 298 555 258 q 562 380 559 338 q 568 461 565 422 q 584 656 575 555 l 319 656 l 301 246 q 287 136 298 183 q 256 60 277 90 q 200 14 234 29 q 118 0 167 0 l 60 0 l 60 58 q 109 68 87 58 q 150 104 132 78 q 180 171 168 129 q 200 279 193 214 l 240 656 l 187 656 q 127 631 147 656 q 103 568 108 606 l 45 568 q 53 643 45 610 q 79 698 61 677 q 127 732 97 719 q 198 745 156 745 l 818 745 l 818 656 "},"9":{"x_min":71,"x_max":692,"ha":777,"o":"m 316 60 q 486 163 431 60 q 547 476 540 267 q 512 441 532 457 q 467 410 492 424 q 411 389 442 397 q 344 382 380 382 q 233 399 283 382 q 147 452 183 417 q 90 540 110 487 q 71 664 71 593 q 91 802 71 739 q 149 910 111 864 q 243 980 188 955 q 368 1006 298 1006 q 498 978 439 1006 q 600 894 557 951 q 667 749 643 837 q 692 539 692 661 q 682 396 692 466 q 654 265 673 327 q 604 152 635 203 q 532 63 574 100 q 436 4 491 25 q 315 -16 382 -16 q 217 -5 256 -16 q 155 22 178 5 q 123 60 133 39 q 114 104 114 82 q 126 147 114 130 q 155 171 139 165 q 178 129 164 149 q 212 93 192 109 q 258 69 232 78 q 316 60 283 60 m 375 464 q 436 473 409 464 q 486 498 464 483 q 523 533 507 513 q 548 576 539 554 l 548 579 q 534 737 547 670 q 497 845 520 803 q 440 909 473 888 q 368 929 408 929 q 255 864 295 929 q 215 677 215 800 q 225 580 215 620 q 255 513 235 539 q 305 475 275 487 q 375 464 335 464 "},"l":{"x_min":18.421875,"x_max":412.46875,"ha":431,"o":"m 36 58 q 80 61 59 58 q 116 75 101 65 q 140 105 131 86 q 150 158 150 125 l 150 902 q 140 951 150 932 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 18 996 l 18 1055 l 280 1055 l 280 158 q 289 105 280 125 q 314 75 298 86 q 350 61 329 65 q 394 58 371 58 l 412 58 l 412 0 l 18 0 l 18 58 l 36 58 "},"Ъ":{"x_min":28,"x_max":927,"ha":981,"o":"m 625 992 l 625 933 l 579 933 q 535 930 556 933 q 499 918 514 927 q 474 889 483 908 q 465 840 465 871 l 465 549 l 553 549 q 725 528 653 549 q 841 472 796 508 q 906 386 886 436 q 927 275 927 335 q 906 163 927 214 q 843 76 885 113 q 736 20 801 40 q 584 0 671 0 l 193 0 l 193 58 l 211 58 q 254 61 234 58 q 291 74 275 64 q 315 103 306 84 q 325 152 325 122 l 325 922 l 220 922 q 169 913 190 922 q 135 888 149 904 q 116 852 122 873 q 107 808 110 831 l 99 749 l 28 749 l 34 992 l 625 992 m 465 66 l 558 66 q 658 78 617 66 q 724 115 699 91 q 761 178 750 140 q 773 266 773 215 q 759 364 773 323 q 718 430 746 405 q 645 468 690 456 q 538 479 601 479 l 465 479 l 465 66 "}," ":{"x_min":0,"x_max":0,"ha":139},"Ś":{"x_min":66,"x_max":685,"ha":756,"o":"m 342 -14 q 223 0 275 -14 q 136 39 171 14 q 83 101 101 65 q 66 181 66 137 q 92 249 66 223 q 166 275 118 275 q 179 192 168 231 q 212 121 190 152 q 268 73 234 91 q 349 55 301 55 q 493 100 441 55 q 544 230 544 145 q 533 297 544 267 q 498 351 523 326 q 433 398 473 375 q 333 446 393 421 q 222 502 269 472 q 143 569 175 532 q 97 652 112 606 q 82 754 82 697 q 104 860 82 814 q 168 939 127 907 q 264 989 208 972 q 386 1006 320 1006 q 496 993 448 1006 q 578 958 544 980 q 628 908 611 936 q 646 850 646 880 q 616 782 646 805 q 536 760 587 760 q 529 824 536 792 q 504 880 521 855 q 457 921 486 905 q 386 936 428 936 q 317 925 347 936 q 265 893 286 914 q 233 843 244 873 q 222 778 222 814 q 232 705 222 737 q 268 648 243 674 q 333 600 293 623 q 432 553 373 577 q 539 500 492 528 q 618 438 585 472 q 667 361 650 403 q 685 265 685 318 q 660 147 685 199 q 592 59 636 95 q 484 4 547 23 q 342 -14 420 -14 m 305 1089 q 337 1134 320 1108 q 369 1187 353 1160 q 400 1242 385 1215 q 425 1293 414 1269 l 574 1293 l 574 1278 q 536 1233 561 1260 q 480 1175 510 1205 q 417 1118 450 1146 q 357 1071 385 1089 l 305 1071 l 305 1089 "},"Ü":{"x_min":21.4375,"x_max":975.25,"ha":996,"o":"m 502 -14 q 355 3 420 -14 q 245 58 290 20 q 176 155 200 95 q 153 299 153 214 l 153 839 q 143 888 153 869 q 119 917 134 907 q 82 930 103 927 q 39 933 62 933 l 21 933 l 21 992 l 425 992 l 425 933 l 407 933 q 363 930 384 933 q 326 916 342 926 q 302 885 311 905 q 293 832 293 865 l 293 285 q 310 181 293 224 q 358 112 327 138 q 431 72 389 85 q 525 60 474 60 q 629 77 585 60 q 701 122 672 93 q 744 191 730 151 q 758 279 758 231 l 758 838 q 749 888 758 869 q 724 917 739 906 q 688 930 708 927 q 644 933 667 933 l 626 933 l 626 992 l 975 992 l 975 933 l 956 933 q 912 930 933 933 q 876 916 891 926 q 852 886 861 905 q 843 833 843 866 l 843 283 q 820 158 843 214 q 755 65 798 103 q 649 6 712 26 q 502 -14 585 -14 m 324 1185 q 329 1221 324 1206 q 344 1245 334 1236 q 366 1258 353 1254 q 394 1263 379 1263 q 422 1258 409 1263 q 445 1245 435 1254 q 460 1221 454 1236 q 465 1185 465 1206 q 460 1149 465 1163 q 445 1124 454 1134 q 422 1111 435 1115 q 394 1107 409 1107 q 344 1124 364 1107 q 324 1185 324 1142 m 588 1185 q 593 1221 588 1206 q 608 1245 598 1236 q 630 1258 617 1254 q 658 1263 643 1263 q 686 1258 673 1263 q 709 1245 699 1254 q 724 1221 718 1236 q 729 1185 729 1206 q 724 1149 729 1163 q 709 1124 718 1134 q 686 1111 699 1115 q 658 1107 673 1107 q 608 1124 628 1107 q 588 1185 588 1142 "},"à":{"x_min":69,"x_max":722.203125,"ha":782,"o":"m 203 200 q 231 103 203 135 q 316 71 258 71 q 392 84 358 71 q 451 123 427 98 q 488 184 475 148 q 501 263 501 219 l 501 375 l 412 371 q 313 357 353 368 q 249 324 273 345 q 214 271 225 302 q 203 200 203 240 m 372 688 q 307 677 331 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 200 727 166 711 q 280 750 234 743 q 377 758 325 758 q 488 745 441 758 q 568 704 536 732 q 616 630 600 675 q 632 518 632 584 l 632 157 q 636 109 632 128 q 651 79 641 90 q 678 63 661 67 q 718 58 695 58 l 722 58 l 722 0 l 534 0 l 512 118 l 501 118 q 459 65 479 89 q 414 23 438 40 q 358 -4 389 5 q 284 -14 328 -14 q 198 0 238 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 147 371 69 318 q 385 429 226 425 l 501 434 l 501 517 q 497 586 501 554 q 479 640 492 618 q 440 676 465 663 q 372 688 414 688 m 453 842 l 400 842 q 339 889 372 860 q 276 946 307 917 q 220 1004 246 976 q 183 1049 195 1031 l 183 1064 l 331 1064 q 357 1013 342 1040 q 387 958 371 986 q 421 905 404 931 q 453 860 438 879 l 453 842 "},"η":{"x_min":99.375,"x_max":730.453125,"ha":840,"o":"m 136 470 q 132 543 136 504 q 124 620 129 582 q 112 691 119 658 q 99 745 105 724 l 177 745 q 216 685 200 716 q 243 618 232 654 l 252 618 q 286 671 267 645 q 331 716 306 696 q 390 746 357 735 q 466 758 423 758 q 571 742 526 758 q 645 693 616 726 q 689 608 675 660 q 704 486 704 557 l 704 -97 q 706 -157 704 -123 q 711 -227 708 -192 q 720 -291 715 -262 q 730 -334 725 -320 l 596 -334 q 586 -291 590 -321 q 578 -226 581 -262 q 574 -151 575 -190 q 573 -81 573 -112 l 573 492 q 535 624 573 580 q 435 669 497 669 q 356 650 388 669 q 304 598 324 632 q 275 514 284 564 q 266 404 266 465 l 266 0 l 136 0 l 136 470 "},"ó":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 641 81 725 177 q 398 -14 558 -14 q 264 9 323 -14 q 162 81 204 33 q 99 202 121 129 q 77 373 77 275 q 159 663 77 568 q 403 758 241 758 q 537 734 478 758 q 639 663 597 711 q 702 543 680 615 q 725 373 725 471 m 211 374 q 222 236 211 295 q 254 136 232 176 q 313 75 277 96 q 402 55 349 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 q 579 511 590 452 q 547 609 569 570 q 488 668 525 649 q 400 688 452 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 m 347 860 q 379 905 362 879 q 411 958 395 931 q 442 1013 427 986 q 467 1064 456 1040 l 616 1064 l 616 1049 q 578 1004 603 1031 q 522 946 552 976 q 459 889 492 917 q 399 842 427 860 l 347 842 l 347 860 "},"¦":{"x_min":346,"x_max":428.0625,"ha":777,"o":"m 428 500 l 346 500 l 346 1055 l 428 1055 l 428 500 m 428 -334 l 346 -334 l 346 222 l 428 222 l 428 -334 "},"Ő":{"x_min":78,"x_max":952,"ha":1031,"o":"m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 m 302 1071 l 302 1089 q 332 1137 316 1111 q 364 1190 348 1163 q 395 1243 380 1217 q 420 1293 409 1269 l 569 1293 l 569 1278 q 548 1250 561 1266 q 518 1214 535 1233 q 481 1175 501 1195 q 442 1136 462 1155 q 404 1100 422 1117 q 369 1071 385 1083 l 302 1071 m 553 1071 l 553 1089 q 583 1137 567 1111 q 615 1190 599 1163 q 646 1243 631 1217 q 671 1293 660 1269 l 820 1293 l 820 1278 q 799 1250 812 1266 q 769 1214 786 1233 q 732 1175 752 1195 q 693 1136 713 1155 q 655 1100 673 1117 q 620 1071 636 1083 l 553 1071 "},"Ž":{"x_min":50,"x_max":764,"ha":822,"o":"m 742 935 l 219 69 l 569 69 q 622 78 601 69 q 656 103 643 87 q 675 139 669 118 q 685 183 682 160 l 692 243 l 764 243 l 757 0 l 50 0 l 50 55 l 571 922 l 268 922 q 217 913 238 922 q 183 888 196 904 q 164 852 170 873 q 154 808 157 831 l 147 749 l 76 749 l 82 992 l 742 992 l 742 935 m 217 1293 l 271 1293 q 311 1265 290 1280 q 350 1234 331 1251 q 387 1200 369 1217 q 421 1166 405 1183 q 454 1200 436 1183 q 492 1234 472 1217 q 532 1265 512 1251 q 572 1293 553 1280 l 627 1293 l 627 1274 q 591 1229 610 1255 q 551 1176 571 1203 q 515 1121 532 1148 q 487 1071 498 1094 l 356 1071 q 328 1121 345 1094 q 292 1176 311 1148 q 252 1229 272 1203 q 217 1274 233 1255 l 217 1293 "},"е":{"x_min":77,"x_max":673,"ha":743,"o":"m 384 678 q 264 617 306 678 q 214 438 222 556 l 538 438 q 529 536 538 491 q 503 612 521 580 q 456 661 485 644 q 384 678 427 678 m 398 -14 q 263 11 323 -14 q 162 85 203 36 q 98 205 120 134 q 77 366 77 276 q 156 659 77 561 q 384 758 236 758 q 505 736 451 758 q 595 673 558 715 q 653 568 633 631 q 673 423 673 505 l 673 358 l 211 358 q 227 230 213 284 q 266 142 241 176 q 330 91 292 107 q 417 74 368 74 q 484 82 453 74 q 540 104 515 90 q 584 134 565 117 q 615 170 603 151 q 633 153 625 165 q 642 122 642 140 q 627 77 642 101 q 581 33 612 53 q 505 0 551 13 q 398 -14 459 -14 "},"Î":{"x_min":49,"x_max":459,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 m 49 1089 q 84 1134 65 1108 q 124 1187 104 1160 q 160 1242 143 1215 q 188 1293 177 1269 l 319 1293 q 347 1242 330 1269 q 383 1187 364 1215 q 423 1134 403 1160 q 459 1089 442 1108 l 459 1071 l 404 1071 q 324 1128 364 1093 q 253 1195 284 1162 q 182 1128 221 1162 q 103 1071 142 1093 l 49 1071 l 49 1089 "},"e":{"x_min":77,"x_max":673,"ha":743,"o":"m 384 678 q 264 617 306 678 q 214 438 222 556 l 538 438 q 529 536 538 491 q 503 612 521 580 q 456 661 485 644 q 384 678 427 678 m 398 -14 q 263 11 323 -14 q 162 85 203 36 q 98 205 120 134 q 77 366 77 276 q 156 659 77 561 q 384 758 236 758 q 505 736 451 758 q 595 673 558 715 q 653 568 633 631 q 673 423 673 505 l 673 358 l 211 358 q 227 230 213 284 q 266 142 241 176 q 330 91 292 107 q 417 74 368 74 q 484 82 453 74 q 540 104 515 90 q 584 134 565 117 q 615 170 603 151 q 633 153 625 165 q 642 122 642 140 q 627 77 642 101 q 581 33 612 53 q 505 0 551 13 q 398 -14 459 -14 "},"ό":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 641 81 725 177 q 398 -14 558 -14 q 264 9 323 -14 q 162 81 204 33 q 99 202 121 129 q 77 373 77 275 q 159 663 77 568 q 403 758 241 758 q 537 734 478 758 q 639 663 597 711 q 702 543 680 615 q 725 373 725 471 m 211 374 q 222 236 211 295 q 254 136 232 176 q 313 75 277 96 q 402 55 349 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 q 579 511 590 452 q 547 609 569 570 q 488 668 525 649 q 400 688 452 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 m 352 860 q 368 904 360 878 q 384 958 377 930 q 399 1013 392 986 q 409 1064 405 1041 l 534 1064 l 534 1049 q 514 1006 529 1033 q 480 949 500 979 q 437 890 459 919 q 397 842 415 861 l 352 842 l 352 860 "},"Ĕ":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 324 69 l 592 69 q 649 78 626 69 q 688 103 673 87 q 713 139 704 118 q 725 183 722 160 l 735 243 l 807 243 l 797 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 753 992 l 760 749 l 688 749 l 681 808 q 670 852 678 831 q 648 888 662 873 q 611 913 633 904 q 558 922 589 922 l 324 922 l 324 553 l 660 553 l 660 483 l 324 483 l 324 69 m 433 1071 q 347 1086 384 1071 q 287 1127 311 1101 q 252 1187 264 1153 q 239 1262 240 1222 l 302 1262 q 348 1188 314 1210 q 433 1166 382 1166 q 518 1188 484 1166 q 563 1262 552 1210 l 628 1262 q 614 1187 626 1222 q 578 1127 602 1153 q 518 1086 554 1101 q 433 1071 482 1071 "},"ļ":{"x_min":18.421875,"x_max":412.46875,"ha":431,"o":"m 36 58 q 80 61 59 58 q 116 75 101 65 q 140 105 131 86 q 150 158 150 125 l 150 902 q 140 951 150 932 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 18 996 l 18 1055 l 280 1055 l 280 158 q 289 105 280 125 q 314 75 298 86 q 350 61 329 65 q 394 58 371 58 l 412 58 l 412 0 l 18 0 l 18 58 l 36 58 m 118 -288 q 140 -188 129 -242 q 160 -85 151 -135 l 281 -85 l 281 -98 q 257 -147 271 -120 q 228 -202 244 -174 q 196 -258 212 -231 q 165 -307 179 -285 l 118 -307 l 118 -288 "}," ":{"x_min":0,"x_max":0,"ha":695},"Ѓ":{"x_min":52.421875,"x_max":751,"ha":779,"o":"m 484 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 742 992 l 751 749 l 679 749 l 673 797 q 663 850 670 827 q 641 889 656 873 q 600 914 626 905 q 534 922 575 922 l 324 922 l 324 152 q 333 103 324 122 q 358 74 342 84 q 394 61 373 64 q 438 58 415 58 l 484 58 l 484 0 m 350 1089 q 382 1134 365 1108 q 414 1187 398 1160 q 445 1242 430 1215 q 470 1293 459 1269 l 619 1293 l 619 1278 q 581 1233 606 1260 q 525 1175 555 1205 q 462 1118 495 1146 q 402 1071 430 1089 l 350 1071 l 350 1089 "},"ò":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 641 81 725 177 q 398 -14 558 -14 q 264 9 323 -14 q 162 81 204 33 q 99 202 121 129 q 77 373 77 275 q 159 663 77 568 q 403 758 241 758 q 537 734 478 758 q 639 663 597 711 q 702 543 680 615 q 725 373 725 471 m 211 374 q 222 236 211 295 q 254 136 232 176 q 313 75 277 96 q 402 55 349 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 q 579 511 590 452 q 547 609 569 570 q 488 668 525 649 q 400 688 452 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 m 473 842 l 420 842 q 359 889 392 860 q 296 946 327 917 q 240 1004 266 976 q 203 1049 215 1031 l 203 1064 l 351 1064 q 377 1013 362 1040 q 407 958 391 986 q 441 905 424 931 q 473 860 458 879 l 473 842 "},"ffl":{"x_min":37.734375,"x_max":1371.46875,"ha":1390,"o":"m 995 58 q 1039 61 1018 58 q 1075 75 1060 65 q 1100 106 1091 86 q 1109 158 1109 125 l 1109 869 q 1100 924 1109 898 q 1072 969 1091 950 q 1022 1000 1052 989 q 948 1011 991 1011 q 860 992 894 1011 q 806 941 825 974 q 778 862 786 907 q 770 765 770 817 l 770 745 l 983 745 l 983 675 l 770 675 l 770 157 q 779 105 770 125 q 804 75 788 86 q 840 61 819 65 q 884 58 861 58 l 909 58 l 909 0 l 508 0 l 508 58 l 526 58 q 570 61 549 58 q 606 75 591 65 q 630 105 621 86 q 640 157 640 125 l 640 675 l 300 675 l 300 157 q 310 105 300 125 q 334 75 319 86 q 370 61 349 65 q 414 58 391 58 l 439 58 l 439 0 l 37 0 l 37 58 l 56 58 q 100 61 79 58 q 136 75 121 65 q 160 105 151 86 q 170 157 170 125 l 170 675 l 43 675 l 43 745 l 170 745 l 170 761 q 237 980 170 906 q 426 1055 304 1055 q 510 1048 475 1055 q 567 1030 545 1041 q 599 1001 589 1018 q 609 963 609 984 q 600 929 609 944 q 576 905 592 915 q 540 890 561 895 q 495 885 520 885 q 490 926 495 906 q 475 962 486 946 q 448 987 465 977 q 404 996 430 996 q 354 981 374 996 q 323 937 335 965 q 305 869 310 908 q 300 781 300 830 l 300 745 l 640 745 l 640 761 q 660 892 640 834 q 720 989 680 949 q 824 1049 761 1028 q 972 1070 886 1070 q 1007 1068 988 1070 q 1044 1064 1027 1066 q 1077 1060 1062 1062 q 1100 1055 1092 1057 l 1239 1055 l 1239 158 q 1249 105 1239 125 q 1273 75 1258 86 q 1309 61 1288 65 q 1353 58 1330 58 l 1371 58 l 1371 0 l 990 0 l 990 58 l 995 58 "},"^":{"x_min":71,"x_max":705,"ha":777,"o":"m 363 992 l 411 992 l 705 370 l 611 370 l 386 864 l 164 370 l 71 370 l 363 992 "},"ⁿ":{"x_min":13.71875,"x_max":560.828125,"ha":576,"o":"m 275 591 l 275 536 l 13 536 l 13 591 l 21 591 q 47 593 35 591 q 69 601 59 595 q 83 617 78 607 q 89 645 89 628 l 89 885 q 83 911 89 901 q 68 927 78 921 q 46 934 59 932 q 21 936 34 936 l 18 936 l 18 992 l 190 992 l 201 924 l 205 924 q 235 962 219 947 q 267 985 250 977 q 304 997 284 994 q 344 1000 323 1000 q 454 962 415 1000 q 493 843 493 924 l 493 650 q 497 619 493 631 q 511 601 502 608 q 531 593 520 595 q 556 591 543 591 l 560 591 l 560 536 l 377 536 l 377 830 q 359 914 377 885 q 295 944 341 944 q 252 934 270 944 q 224 906 234 923 q 209 866 213 888 q 204 818 204 843 l 204 645 q 209 617 204 627 q 224 600 215 606 q 246 593 234 595 q 273 591 259 591 l 275 591 "},"к":{"x_min":24.96875,"x_max":841,"ha":855,"o":"m 792 0 q 701 5 739 0 q 635 25 663 10 q 585 64 606 39 q 542 129 563 89 l 474 261 q 443 309 458 291 q 408 338 428 328 q 361 351 388 348 q 294 354 334 354 l 294 149 q 304 101 294 119 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 412 58 l 412 0 l 24 0 l 24 58 l 50 58 q 94 61 73 58 q 130 75 115 65 q 154 105 145 86 q 164 158 164 125 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 24 686 l 24 745 l 412 745 l 412 686 l 408 686 q 365 683 386 686 q 329 671 345 680 q 304 644 313 662 q 294 599 294 627 l 294 424 q 330 425 315 424 q 356 430 345 427 q 376 439 367 434 q 394 453 385 445 q 435 505 411 469 q 495 594 459 541 q 539 660 518 631 q 583 710 560 689 q 634 741 606 730 q 703 753 663 753 q 792 729 762 753 q 823 668 823 706 q 817 633 823 648 q 802 607 812 618 q 781 590 793 597 q 756 580 769 583 q 747 610 753 596 q 731 635 741 624 q 708 652 722 645 q 678 658 695 658 q 615 632 644 658 q 552 552 587 606 q 518 504 533 525 q 490 467 503 483 q 465 439 477 451 q 439 417 452 427 q 496 408 471 416 q 540 384 520 399 q 577 347 560 369 q 608 297 593 325 l 681 169 q 752 84 714 110 q 836 58 790 58 l 841 58 l 841 0 l 792 0 "},"":{"x_min":57,"x_max":1346,"ha":1389,"o":"m 57 823 l 57 1030 l 262 1030 l 262 954 l 132 954 l 132 823 l 57 823 m 1139 954 l 1139 1030 l 1346 1030 l 1346 823 l 1272 823 l 1272 954 l 1139 954 m 57 -260 l 57 -54 l 132 -54 l 132 -186 l 262 -186 l 262 -260 l 57 -260 m 1139 -260 l 1139 -186 l 1272 -186 l 1272 -54 l 1346 -54 l 1346 -260 l 1139 -260 m 875 -260 l 875 -186 l 1060 -186 l 1060 -260 l 875 -260 m 345 -260 l 345 -186 l 528 -186 l 528 -260 l 345 -260 m 345 954 l 345 1030 l 528 1030 l 528 954 l 345 954 m 1346 26 l 1272 26 l 1272 210 l 1346 210 l 1346 26 m 1346 558 l 1272 558 l 1272 742 l 1346 742 l 1346 558 m 610 -260 l 610 -186 l 794 -186 l 794 -260 l 610 -260 m 132 26 l 57 26 l 57 210 l 132 210 l 132 26 m 610 954 l 610 1030 l 794 1030 l 794 954 l 610 954 m 875 954 l 875 1030 l 1060 1030 l 1060 954 l 875 954 m 132 291 l 57 291 l 57 476 l 132 476 l 132 291 m 132 558 l 57 558 l 57 742 l 132 742 l 132 558 m 1346 291 l 1272 291 l 1272 476 l 1346 476 l 1346 291 m 584 429 q 571 345 584 382 q 535 281 559 308 q 477 239 512 254 q 397 225 442 225 q 314 239 349 225 q 255 281 278 254 q 219 345 231 308 q 208 429 208 382 q 219 512 208 475 q 255 577 231 550 q 314 618 278 603 q 397 633 349 633 q 477 618 442 633 q 535 577 512 603 q 571 512 559 550 q 584 429 584 475 m 302 429 q 323 305 302 349 q 397 260 344 260 q 469 305 448 260 q 491 429 491 349 q 486 499 491 468 q 469 552 480 530 q 440 585 458 574 q 397 597 422 597 q 352 585 370 597 q 323 552 334 574 q 307 499 312 530 q 302 429 302 468 m 938 524 q 918 469 938 487 q 867 439 898 450 l 867 437 q 930 402 906 427 q 955 338 955 378 q 795 229 955 229 l 616 229 l 616 258 l 639 258 q 660 264 651 258 q 669 294 669 271 l 669 560 q 660 589 669 581 q 639 596 651 596 l 616 596 l 616 626 l 778 626 q 898 601 858 626 q 938 524 938 576 m 756 263 l 792 263 q 845 280 830 263 q 860 340 860 297 q 846 399 860 380 q 793 418 832 418 l 756 418 l 756 263 m 751 454 l 772 454 q 824 470 809 454 q 838 524 838 486 q 823 576 838 562 q 770 590 807 590 l 751 590 l 751 454 m 1194 596 l 1170 596 q 1151 590 1159 596 q 1143 560 1143 583 l 1143 356 q 1130 293 1143 319 q 1097 253 1118 268 q 1049 231 1077 237 q 994 224 1022 224 l 975 224 l 975 256 l 984 256 q 1010 261 998 256 q 1032 278 1023 266 q 1048 309 1042 289 q 1054 356 1054 328 l 1054 561 q 1045 590 1054 583 q 1026 596 1037 596 l 1003 596 l 1003 626 l 1194 626 l 1194 596 "},"ū":{"x_min":31.984375,"x_max":850.015625,"ha":882,"o":"m 732 151 q 741 102 732 120 q 765 73 750 83 q 802 61 781 64 q 845 58 822 58 l 850 58 l 850 0 l 629 0 l 611 112 l 604 112 q 558 48 583 72 q 504 10 532 24 q 444 -8 475 -3 q 379 -14 413 -14 q 281 1 324 -14 q 209 50 238 17 q 165 135 180 83 q 150 258 150 186 l 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 l 280 264 q 288 184 280 219 q 311 124 295 148 q 356 87 328 99 q 426 74 384 74 q 505 91 472 74 q 559 136 538 107 q 590 207 580 166 q 601 299 601 249 l 601 586 q 591 638 601 618 q 567 669 582 658 q 531 683 552 679 q 487 686 510 686 l 483 686 l 483 745 l 732 745 l 732 151 m 626 842 l 223 842 l 223 924 l 626 924 l 626 842 "},"ˆ":{"x_min":196,"x_max":606,"ha":802,"o":"m 196 860 q 231 905 212 879 q 271 958 251 931 q 307 1013 290 986 q 335 1064 324 1040 l 466 1064 q 494 1013 477 1040 q 530 958 511 986 q 570 905 550 931 q 606 860 589 879 l 606 842 l 551 842 q 471 899 511 864 q 400 966 431 933 q 329 899 368 933 q 250 842 289 864 l 196 842 l 196 860 "},"Ẅ":{"x_min":12,"x_max":1442,"ha":1454,"o":"m 800 983 l 973 380 q 1008 248 993 311 q 1033 136 1024 184 q 1057 241 1043 186 q 1089 364 1070 297 l 1211 793 q 1216 811 1213 801 q 1220 831 1218 821 q 1224 850 1222 842 q 1226 865 1226 859 q 1203 917 1226 901 q 1134 933 1180 933 l 1102 933 l 1102 992 l 1442 992 l 1442 933 l 1415 933 q 1379 929 1395 933 q 1352 913 1364 925 q 1330 881 1340 902 q 1309 825 1319 860 l 1075 0 l 950 0 l 723 778 l 511 0 l 383 0 l 128 860 q 113 896 121 882 q 93 918 104 910 q 66 930 81 926 q 30 933 50 933 l 12 933 l 12 992 l 394 992 l 394 933 l 362 933 q 299 917 320 933 q 279 867 279 901 q 282 843 279 855 q 290 815 286 831 l 417 371 q 450 247 435 308 q 478 136 466 186 q 502 254 488 190 q 534 386 516 319 l 699 983 l 800 983 m 577 1185 q 582 1221 577 1206 q 597 1245 587 1236 q 619 1258 606 1254 q 647 1263 632 1263 q 675 1258 662 1263 q 698 1245 688 1254 q 713 1221 707 1236 q 718 1185 718 1206 q 713 1149 718 1163 q 698 1124 707 1134 q 675 1111 688 1115 q 647 1107 662 1107 q 597 1124 617 1107 q 577 1185 577 1142 m 841 1185 q 846 1221 841 1206 q 861 1245 851 1236 q 883 1258 870 1254 q 911 1263 896 1263 q 939 1258 926 1263 q 962 1245 952 1254 q 977 1221 971 1236 q 982 1185 982 1206 q 977 1149 982 1163 q 962 1124 971 1134 q 939 1111 952 1115 q 911 1107 926 1107 q 861 1124 881 1107 q 841 1185 841 1142 "},"č":{"x_min":77,"x_max":629,"ha":684,"o":"m 393 -14 q 265 7 324 -14 q 165 74 207 28 q 100 193 123 121 q 77 367 77 265 q 100 554 77 479 q 165 674 123 629 q 263 739 207 720 q 386 758 320 758 q 472 749 429 758 q 550 723 515 741 q 606 679 584 705 q 628 616 628 652 q 596 548 628 568 q 503 529 565 529 q 498 590 503 561 q 479 641 493 619 q 444 676 466 663 q 386 688 421 688 q 314 673 346 688 q 259 622 282 658 q 224 523 236 585 q 211 368 211 461 q 260 147 211 220 q 421 74 309 74 q 533 102 485 74 q 605 173 581 129 q 622 151 615 164 q 629 118 629 137 q 614 71 629 95 q 569 28 599 47 q 496 -2 540 9 q 393 -14 452 -14 m 186 1064 l 240 1064 q 280 1036 259 1051 q 319 1005 300 1022 q 356 971 338 988 q 390 937 374 954 q 423 971 405 954 q 461 1005 441 988 q 501 1036 481 1022 q 541 1064 522 1051 l 596 1064 l 596 1045 q 560 1000 579 1026 q 520 947 540 974 q 484 892 501 919 q 456 842 467 865 l 325 842 q 297 892 314 865 q 261 947 280 919 q 221 1000 241 974 q 186 1045 202 1026 l 186 1064 "},"’":{"x_min":41,"x_max":269,"ha":347,"o":"m 269 871 q 256 785 269 827 q 217 708 244 744 q 146 645 189 673 q 41 599 103 617 l 41 657 q 141 710 109 679 q 173 782 173 741 q 165 805 173 795 q 147 821 158 814 q 122 835 135 828 q 98 851 109 842 q 79 874 86 861 q 72 909 72 888 q 98 970 72 949 q 162 992 124 992 q 203 984 184 992 q 237 961 222 976 q 260 923 252 945 q 269 871 269 900 "},"Ν":{"x_min":52.421875,"x_max":1020.5625,"ha":1060,"o":"m 789 0 l 268 800 l 268 158 q 277 105 268 125 q 302 75 287 86 q 338 61 317 65 q 382 58 359 58 l 401 58 l 401 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 306 992 l 804 223 l 804 839 q 795 888 804 869 q 770 917 785 907 q 734 930 754 927 q 690 933 713 933 l 671 933 l 671 992 l 1020 992 l 1020 933 l 1002 933 q 958 930 979 933 q 922 916 937 926 q 897 886 906 905 q 889 833 889 866 l 889 0 l 789 0 "},"-":{"x_min":35,"x_max":396,"ha":431,"o":"m 35 326 l 35 431 l 396 431 l 396 326 l 35 326 "},"Q":{"x_min":78,"x_max":952,"ha":1031,"o":"m 952 496 q 929 309 952 395 q 863 159 907 224 q 755 51 819 94 q 609 -5 691 9 q 632 -122 616 -75 q 676 -197 649 -169 q 737 -237 702 -225 q 814 -249 772 -249 l 837 -249 l 837 -319 l 777 -319 q 667 -304 722 -319 q 568 -254 612 -289 q 493 -159 523 -218 q 456 -11 462 -100 q 289 39 360 0 q 171 146 218 79 q 101 301 124 212 q 78 498 78 390 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 495 q 247 311 231 392 q 296 173 262 229 q 384 87 330 117 q 515 58 438 58 q 647 87 593 58 q 734 173 700 117 q 783 311 768 229 q 798 495 798 392 q 783 680 798 599 q 734 818 768 762 q 647 903 700 873 q 517 932 594 932 q 385 903 439 932 q 296 818 331 873 q 247 680 262 762 q 231 495 231 599 "},"ј":{"x_min":-16.84375,"x_max":289,"ha":416,"o":"m 280 745 l 280 -10 q 260 -166 280 -104 q 203 -265 240 -228 q 116 -318 166 -302 q 5 -334 65 -334 l -16 -334 l -16 -264 l -6 -264 q 59 -252 30 -264 q 108 -210 88 -239 q 139 -131 128 -180 q 150 -9 150 -82 l 150 592 q 140 641 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 m 131 969 q 137 1010 131 993 q 153 1036 143 1026 q 178 1050 164 1046 q 209 1055 193 1055 q 240 1050 225 1055 q 265 1036 255 1046 q 282 1010 276 1026 q 289 969 289 993 q 282 928 289 944 q 265 902 276 912 q 240 887 255 891 q 209 883 225 883 q 178 887 193 883 q 153 902 164 891 q 137 928 143 912 q 131 969 131 944 "},"ě":{"x_min":77,"x_max":673,"ha":743,"o":"m 384 678 q 264 617 306 678 q 214 438 222 556 l 538 438 q 529 536 538 491 q 503 612 521 580 q 456 661 485 644 q 384 678 427 678 m 398 -14 q 263 11 323 -14 q 162 85 203 36 q 98 205 120 134 q 77 366 77 276 q 156 659 77 561 q 384 758 236 758 q 505 736 451 758 q 595 673 558 715 q 653 568 633 631 q 673 423 673 505 l 673 358 l 211 358 q 227 230 213 284 q 266 142 241 176 q 330 91 292 107 q 417 74 368 74 q 484 82 453 74 q 540 104 515 90 q 584 134 565 117 q 615 170 603 151 q 633 153 625 165 q 642 122 642 140 q 627 77 642 101 q 581 33 612 53 q 505 0 551 13 q 398 -14 459 -14 m 177 1064 l 231 1064 q 271 1036 250 1051 q 310 1005 291 1022 q 347 971 329 988 q 381 937 365 954 q 414 971 396 954 q 452 1005 432 988 q 492 1036 472 1022 q 532 1064 513 1051 l 587 1064 l 587 1045 q 551 1000 570 1026 q 511 947 531 974 q 475 892 492 919 q 447 842 458 865 l 316 842 q 288 892 305 865 q 252 947 271 919 q 212 1000 232 974 q 177 1045 193 1026 l 177 1064 "},"œ":{"x_min":77,"x_max":1188,"ha":1257,"o":"m 211 374 q 222 236 211 295 q 255 136 232 176 q 314 75 278 96 q 403 55 351 55 q 491 75 455 55 q 549 134 526 94 q 582 232 571 173 q 593 367 592 290 l 593 386 q 581 518 592 461 q 548 613 570 574 q 489 669 525 651 q 402 688 453 688 q 313 668 349 688 q 254 609 277 649 q 222 511 232 570 q 211 374 211 452 m 900 687 q 779 623 821 687 q 730 436 738 559 l 1053 436 q 1044 538 1053 492 q 1018 618 1036 584 q 971 669 1001 651 q 900 687 942 687 m 914 -14 q 764 21 826 -14 q 662 124 703 56 q 400 -14 581 -14 q 265 9 324 -14 q 163 81 205 33 q 99 202 121 129 q 77 373 77 275 q 159 663 77 568 q 404 758 242 758 q 552 724 489 758 q 658 623 616 691 q 758 724 697 691 q 900 758 818 758 q 1020 736 967 758 q 1111 672 1073 715 q 1168 567 1148 630 q 1188 421 1188 504 l 1188 356 l 727 356 q 740 239 729 291 q 776 150 752 187 q 839 94 800 113 q 933 74 877 74 q 999 82 969 74 q 1055 103 1030 90 q 1099 133 1080 116 q 1130 169 1118 150 q 1148 152 1140 164 q 1157 121 1157 139 q 1142 77 1157 101 q 1097 33 1127 53 q 1021 0 1066 12 q 914 -14 975 -14 "},"#":{"x_min":56,"x_max":721,"ha":777,"o":"m 269 364 l 461 364 l 513 636 l 320 636 l 269 364 m 704 364 l 704 281 l 529 281 l 476 0 l 393 0 l 446 281 l 253 281 l 200 0 l 117 0 l 169 281 l 56 281 l 56 364 l 185 364 l 237 636 l 72 636 l 72 719 l 252 719 l 303 992 l 387 992 l 336 719 l 529 719 l 580 992 l 664 992 l 612 719 l 721 719 l 721 636 l 596 636 l 545 364 l 704 364 "},"Џ":{"x_min":52.421875,"x_max":1007.25,"ha":1060,"o":"m 52 58 l 70 58 q 113 61 93 58 q 150 74 134 64 q 174 103 165 84 q 184 152 184 122 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 69 l 734 69 l 734 833 q 725 886 734 866 q 701 916 716 905 q 665 930 685 926 q 620 933 644 933 l 603 933 l 603 992 l 1007 992 l 1007 933 l 988 933 q 945 930 965 933 q 908 918 924 927 q 884 889 893 908 q 875 840 875 871 l 875 158 q 884 105 875 125 q 908 75 893 86 q 944 61 923 65 q 988 58 965 58 l 1007 58 l 1007 0 l 718 0 q 651 -16 680 0 q 602 -68 622 -33 q 572 -159 582 -104 q 562 -292 562 -214 l 498 -292 q 486 -159 498 -214 q 451 -68 473 -104 q 397 -16 429 -33 q 328 0 366 0 l 52 0 l 52 58 "},"Å":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 m 659 1075 q 646 1009 659 1037 q 610 962 633 981 q 557 933 587 943 q 492 924 526 924 q 426 933 457 924 q 373 962 396 943 q 337 1009 350 981 q 325 1075 325 1037 q 337 1140 325 1111 q 373 1187 350 1168 q 426 1216 396 1206 q 492 1226 457 1226 q 557 1216 526 1226 q 610 1187 587 1206 q 646 1140 633 1168 q 659 1075 659 1111 m 583 1075 q 576 1113 583 1097 q 556 1138 569 1129 q 527 1153 544 1148 q 492 1158 511 1158 q 456 1153 472 1158 q 427 1138 439 1148 q 407 1113 414 1129 q 400 1075 400 1097 q 407 1036 400 1052 q 427 1011 414 1020 q 456 996 439 1001 q 492 991 472 991 q 527 996 511 991 q 556 1011 544 1001 q 576 1036 569 1020 q 583 1075 583 1052 "},"ș":{"x_min":62,"x_max":566,"ha":627,"o":"m 291 -14 q 196 -4 239 -14 q 124 22 154 4 q 78 69 94 41 q 62 133 62 96 q 71 179 62 161 q 93 209 80 198 q 122 224 106 220 q 149 229 137 229 q 156 160 149 192 q 180 104 163 128 q 223 66 196 80 q 290 52 251 52 q 352 61 325 52 q 397 87 379 70 q 425 127 415 104 q 435 178 435 150 q 427 223 435 204 q 401 258 420 241 q 351 291 383 274 q 272 330 320 308 q 183 375 221 353 q 121 423 145 397 q 84 482 96 449 q 72 560 72 515 q 90 645 72 608 q 143 706 109 681 q 226 744 178 731 q 334 757 274 757 q 421 746 383 757 q 485 719 459 736 q 524 678 511 702 q 537 629 537 655 q 510 568 537 591 q 436 546 484 546 q 409 658 436 618 q 325 698 383 698 q 269 690 292 698 q 231 665 246 681 q 209 628 216 650 q 202 581 202 607 q 211 536 202 555 q 240 500 220 516 q 291 468 260 484 q 367 434 323 453 q 456 389 419 411 q 518 340 494 366 q 554 280 542 313 q 566 203 566 247 q 546 108 566 149 q 490 40 526 68 q 404 0 454 13 q 291 -14 353 -14 m 217 -288 q 239 -188 228 -242 q 259 -85 250 -135 l 380 -85 l 380 -98 q 356 -147 370 -120 q 327 -202 343 -174 q 295 -258 311 -231 q 264 -307 278 -285 l 217 -307 l 217 -288 "},"¸":{"x_min":83,"x_max":373,"ha":463,"o":"m 373 -175 q 325 -291 373 -249 q 190 -334 278 -334 q 165 -332 179 -334 q 137 -329 152 -331 q 109 -324 123 -327 q 83 -318 95 -321 l 83 -247 q 132 -256 107 -253 q 175 -258 157 -258 q 237 -237 215 -258 q 259 -180 259 -216 q 230 -119 259 -139 q 158 -95 201 -99 l 187 12 l 252 12 l 238 -47 q 339 -86 306 -53 q 373 -175 373 -120 "},"=":{"x_min":90,"x_max":687,"ha":777,"o":"m 687 400 l 687 317 l 90 317 l 90 400 l 687 400 m 687 673 l 687 590 l 90 590 l 90 673 l 687 673 "},"ρ":{"x_min":122,"x_max":771,"ha":847,"o":"m 771 357 q 750 189 771 260 q 689 73 729 118 q 593 7 650 28 q 463 -14 536 -14 q 348 0 402 -14 q 250 49 294 15 q 252 0 251 30 q 252 -68 252 -30 l 252 -334 l 122 -334 l 122 406 q 140 556 122 491 q 196 667 158 622 q 293 734 235 711 q 433 758 352 758 q 570 731 508 758 q 677 655 632 705 q 746 530 721 604 q 771 357 771 455 m 636 358 q 623 498 636 437 q 585 602 610 559 q 521 666 560 644 q 430 688 482 688 q 344 668 378 688 q 289 612 309 649 q 261 523 269 574 q 252 407 252 471 l 252 138 q 347 78 295 101 q 463 55 398 55 q 533 71 501 55 q 588 123 565 87 q 623 217 610 159 q 636 358 636 274 "},"Ћ":{"x_min":28,"x_max":1124.25,"ha":1145,"o":"m 720 0 l 720 58 l 737 58 q 782 61 761 58 q 818 75 802 65 q 842 105 833 86 q 851 158 851 125 l 851 302 q 837 415 851 372 q 798 483 823 459 q 738 516 773 507 q 661 525 703 525 q 602 522 631 525 q 548 514 573 518 q 502 503 522 509 q 467 492 481 497 l 467 158 q 476 105 467 125 q 500 75 485 86 q 537 61 516 65 q 581 58 558 58 l 599 58 l 599 0 l 181 0 l 181 58 l 213 58 q 256 61 236 58 q 293 73 277 64 q 317 102 308 83 q 327 151 327 120 l 327 922 l 221 922 q 170 913 191 922 q 136 888 149 904 q 116 852 123 873 q 107 808 110 831 l 99 749 l 28 749 l 34 992 l 758 992 l 765 749 l 693 749 l 686 808 q 676 852 683 831 q 657 888 670 873 q 623 913 644 904 q 571 922 602 922 l 467 922 l 467 568 q 506 582 483 575 q 555 595 528 589 q 612 604 581 600 q 676 609 643 609 q 811 594 752 609 q 910 545 870 580 q 971 453 950 511 q 992 308 992 395 l 992 158 q 1001 105 992 125 q 1025 75 1010 86 q 1061 61 1040 65 q 1105 58 1082 58 l 1124 58 l 1124 0 l 720 0 "},"ú":{"x_min":31.984375,"x_max":850.015625,"ha":882,"o":"m 732 151 q 741 102 732 120 q 765 73 750 83 q 802 61 781 64 q 845 58 822 58 l 850 58 l 850 0 l 629 0 l 611 112 l 604 112 q 558 48 583 72 q 504 10 532 24 q 444 -8 475 -3 q 379 -14 413 -14 q 281 1 324 -14 q 209 50 238 17 q 165 135 180 83 q 150 258 150 186 l 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 l 280 264 q 288 184 280 219 q 311 124 295 148 q 356 87 328 99 q 426 74 384 74 q 505 91 472 74 q 559 136 538 107 q 590 207 580 166 q 601 299 601 249 l 601 586 q 591 638 601 618 q 567 669 582 658 q 531 683 552 679 q 487 686 510 686 l 483 686 l 483 745 l 732 745 l 732 151 m 367 860 q 399 905 382 879 q 431 958 415 931 q 462 1013 447 986 q 487 1064 476 1040 l 636 1064 l 636 1049 q 598 1004 623 1031 q 542 946 572 976 q 479 889 512 917 q 419 842 447 860 l 367 842 l 367 860 "},"˚":{"x_min":64,"x_max":398,"ha":463,"o":"m 398 979 q 385 913 398 941 q 349 866 372 885 q 296 837 326 847 q 231 828 265 828 q 165 837 196 828 q 112 866 135 847 q 76 913 89 885 q 64 979 64 941 q 76 1044 64 1015 q 112 1091 89 1072 q 165 1120 135 1110 q 231 1130 196 1130 q 296 1120 265 1130 q 349 1091 326 1110 q 385 1044 372 1072 q 398 979 398 1015 m 322 979 q 315 1017 322 1001 q 295 1042 308 1033 q 266 1057 283 1052 q 231 1062 250 1062 q 195 1057 211 1062 q 166 1042 178 1052 q 146 1017 153 1033 q 139 979 139 1001 q 146 940 139 956 q 166 915 153 924 q 195 900 178 905 q 231 895 211 895 q 266 900 250 895 q 295 915 283 905 q 315 940 308 924 q 322 979 322 956 "},"д":{"x_min":18,"x_max":779,"ha":807,"o":"m 113 58 q 157 153 135 92 q 202 299 179 213 q 219 368 210 328 q 236 451 228 409 q 248 533 243 494 q 254 599 254 573 q 244 644 254 627 q 220 670 235 661 q 183 683 204 680 q 140 686 163 686 l 121 686 l 121 745 l 775 745 l 775 686 l 756 686 q 713 683 733 686 q 676 670 692 680 q 652 641 661 660 q 643 592 643 623 l 643 146 q 659 84 643 104 q 701 58 675 64 l 779 58 l 779 -291 l 720 -291 l 712 -190 q 696 -101 709 -137 q 663 -43 682 -65 q 621 -11 644 -21 q 574 0 598 -1 l 222 0 q 164 -10 188 0 q 122 -43 139 -20 q 96 -102 105 -65 q 83 -190 86 -138 l 76 -291 l 18 -291 l 18 58 l 113 58 m 251 212 q 221 115 233 152 q 195 58 209 78 l 512 58 l 512 686 l 333 686 q 317 557 326 621 q 298 431 308 492 q 276 315 288 371 q 251 212 264 259 "},"¯":{"x_min":-7,"x_max":645,"ha":638,"o":"m 645 1054 l -7 1054 l -7 1137 l 645 1137 l 645 1054 "},"u":{"x_min":31.984375,"x_max":850.015625,"ha":882,"o":"m 732 151 q 741 102 732 120 q 765 73 750 83 q 802 61 781 64 q 845 58 822 58 l 850 58 l 850 0 l 629 0 l 611 112 l 604 112 q 558 48 583 72 q 504 10 532 24 q 444 -8 475 -3 q 379 -14 413 -14 q 281 1 324 -14 q 209 50 238 17 q 165 135 180 83 q 150 258 150 186 l 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 l 280 264 q 288 184 280 219 q 311 124 295 148 q 356 87 328 99 q 426 74 384 74 q 505 91 472 74 q 559 136 538 107 q 590 207 580 166 q 601 299 601 249 l 601 586 q 591 638 601 618 q 567 669 582 658 q 531 683 552 679 q 487 686 510 686 l 483 686 l 483 745 l 732 745 l 732 151 "},"З":{"x_min":62,"x_max":753,"ha":838,"o":"m 379 58 q 468 70 427 58 q 538 108 509 81 q 583 178 567 135 q 599 284 599 221 q 583 364 599 327 q 538 425 568 400 q 463 464 508 450 q 361 478 419 478 l 243 478 l 243 548 l 360 548 q 446 562 407 548 q 515 606 486 577 q 562 674 545 634 q 579 763 579 714 q 569 836 579 804 q 536 891 558 868 q 479 925 514 913 q 394 936 444 936 q 299 919 336 936 q 241 874 262 902 q 212 808 220 845 q 205 729 205 770 q 158 733 180 729 q 120 747 136 737 q 95 775 104 758 q 86 819 86 793 q 105 893 86 859 q 164 952 125 928 q 261 991 203 977 q 394 1006 318 1006 q 527 992 467 1006 q 632 950 588 978 q 700 878 676 921 q 725 773 725 834 q 707 678 725 719 q 659 606 689 636 q 588 555 629 575 q 501 524 548 535 l 501 517 q 584 500 539 513 q 665 462 628 488 q 728 393 703 436 q 753 283 753 349 q 722 145 753 202 q 641 53 692 89 q 522 0 590 17 q 380 -16 455 -16 q 231 0 292 -16 q 132 40 170 15 q 78 95 95 65 q 62 156 62 126 q 93 233 62 207 q 178 259 124 259 q 190 186 178 222 q 226 121 202 150 q 289 76 251 93 q 379 58 326 58 "},"Α":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 "},"⅝":{"x_min":64,"x_max":1089,"ha":1167,"o":"m 263 444 q 310 451 289 444 q 345 475 331 459 q 368 518 360 491 q 376 581 376 544 q 343 669 376 639 q 249 699 310 699 q 176 691 204 699 q 128 674 147 683 l 88 684 l 113 992 l 456 992 l 461 844 l 413 844 l 408 869 q 403 885 406 878 q 395 896 400 891 q 380 902 389 900 q 355 904 371 904 l 165 904 l 150 735 q 198 748 167 742 q 273 755 229 755 q 441 711 382 755 q 501 579 501 668 q 485 501 501 536 q 439 441 469 466 q 363 402 408 416 q 259 389 318 389 q 165 397 202 389 q 105 419 127 405 q 73 451 82 433 q 64 490 64 470 q 68 515 64 502 q 82 537 72 528 q 108 553 92 547 q 146 559 123 559 q 154 515 146 536 q 177 478 162 494 q 215 453 193 462 q 263 444 236 444 m 374 0 l 282 0 l 778 992 l 869 992 l 374 0 m 642 152 q 652 202 642 181 q 681 240 663 223 q 725 270 700 257 q 780 294 751 283 q 735 322 757 306 q 696 357 712 337 q 669 402 679 377 q 660 457 660 427 q 671 511 660 484 q 707 559 682 537 q 772 593 732 580 q 870 607 813 607 q 951 597 915 607 q 1012 569 987 588 q 1051 525 1037 551 q 1065 466 1065 499 q 1055 420 1065 441 q 1029 382 1046 399 q 991 351 1013 364 q 945 327 969 337 q 1005 296 978 312 q 1050 260 1032 280 q 1079 215 1069 240 q 1089 158 1089 190 q 1074 92 1089 122 q 1032 38 1060 61 q 960 2 1003 15 q 861 -10 917 -10 q 765 2 806 -10 q 697 37 724 15 q 655 89 669 59 q 642 152 642 118 m 871 44 q 945 69 918 44 q 973 137 973 93 q 939 212 973 181 q 836 267 904 242 q 783 219 804 250 q 762 147 762 187 q 769 107 762 126 q 790 74 776 89 q 824 52 804 60 q 871 44 844 44 m 949 463 q 944 496 949 480 q 928 524 939 512 q 901 544 917 537 q 863 552 885 552 q 801 529 822 552 q 780 470 780 505 q 789 429 780 447 q 814 397 798 411 q 848 373 829 383 q 888 355 867 363 q 933 397 916 371 q 949 463 949 423 "},"é":{"x_min":77,"x_max":673,"ha":743,"o":"m 384 678 q 264 617 306 678 q 214 438 222 556 l 538 438 q 529 536 538 491 q 503 612 521 580 q 456 661 485 644 q 384 678 427 678 m 398 -14 q 263 11 323 -14 q 162 85 203 36 q 98 205 120 134 q 77 366 77 276 q 156 659 77 561 q 384 758 236 758 q 505 736 451 758 q 595 673 558 715 q 653 568 633 631 q 673 423 673 505 l 673 358 l 211 358 q 227 230 213 284 q 266 142 241 176 q 330 91 292 107 q 417 74 368 74 q 484 82 453 74 q 540 104 515 90 q 584 134 565 117 q 615 170 603 151 q 633 153 625 165 q 642 122 642 140 q 627 77 642 101 q 581 33 612 53 q 505 0 551 13 q 398 -14 459 -14 m 321 860 q 353 905 336 879 q 385 958 369 931 q 416 1013 401 986 q 441 1064 430 1040 l 590 1064 l 590 1049 q 552 1004 577 1031 q 496 946 526 976 q 433 889 466 917 q 373 842 401 860 l 321 842 l 321 860 "},"Ş":{"x_min":66,"x_max":685,"ha":756,"o":"m 342 -14 q 223 0 275 -14 q 136 39 171 14 q 83 101 101 65 q 66 181 66 137 q 92 249 66 223 q 166 275 118 275 q 179 192 168 231 q 212 121 190 152 q 268 73 234 91 q 349 55 301 55 q 493 100 441 55 q 544 230 544 145 q 533 297 544 267 q 498 351 523 326 q 433 398 473 375 q 333 446 393 421 q 222 502 269 472 q 143 569 175 532 q 97 652 112 606 q 82 754 82 697 q 104 860 82 814 q 168 939 127 907 q 264 989 208 972 q 386 1006 320 1006 q 496 993 448 1006 q 578 958 544 980 q 628 908 611 936 q 646 850 646 880 q 616 782 646 805 q 536 760 587 760 q 529 824 536 792 q 504 880 521 855 q 457 921 486 905 q 386 936 428 936 q 317 925 347 936 q 265 893 286 914 q 233 843 244 873 q 222 778 222 814 q 232 705 222 737 q 268 648 243 674 q 333 600 293 623 q 432 553 373 577 q 539 500 492 528 q 618 438 585 472 q 667 361 650 403 q 685 265 685 318 q 660 147 685 199 q 592 59 636 95 q 484 4 547 23 q 342 -14 420 -14 m 506 -175 q 458 -291 506 -249 q 323 -334 411 -334 q 298 -332 312 -334 q 270 -329 285 -331 q 242 -324 256 -327 q 216 -318 228 -321 l 216 -247 q 265 -256 240 -253 q 308 -258 290 -258 q 370 -237 348 -258 q 392 -180 392 -216 q 363 -119 392 -139 q 291 -95 334 -99 l 320 12 l 385 12 l 371 -47 q 472 -86 439 -53 q 506 -175 506 -120 "},"B":{"x_min":52.421875,"x_max":823,"ha":908,"o":"m 782 743 q 768 661 782 696 q 732 599 755 626 q 677 555 709 573 q 609 524 646 537 l 609 519 q 696 491 656 511 q 763 440 735 471 q 807 365 791 408 q 823 267 823 322 q 734 66 823 133 q 466 0 646 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 424 992 q 693 931 605 992 q 782 743 782 871 m 324 69 l 457 69 q 555 80 515 69 q 620 114 595 90 q 657 177 646 139 q 669 271 669 216 q 659 366 669 326 q 624 432 649 406 q 560 471 600 459 q 459 484 520 484 l 324 484 l 324 69 m 324 554 l 419 554 q 519 564 479 554 q 583 598 559 575 q 617 657 607 621 q 628 743 628 693 q 616 828 628 794 q 580 884 605 863 q 514 914 554 905 q 415 922 473 922 l 324 922 l 324 554 "},"…":{"x_min":111,"x_max":1081,"ha":1192,"o":"m 111 84 q 117 129 111 111 q 136 158 124 147 q 164 174 148 169 q 198 179 180 179 q 232 174 216 179 q 259 158 248 169 q 278 129 271 147 q 286 84 286 111 q 278 39 286 57 q 259 10 271 21 q 232 -5 248 0 q 198 -10 216 -10 q 164 -5 180 -10 q 136 10 148 0 q 117 39 124 21 q 111 84 111 57 m 509 84 q 515 129 509 111 q 534 158 522 147 q 562 174 546 169 q 596 179 578 179 q 630 174 614 179 q 657 158 646 169 q 676 129 669 147 q 684 84 684 111 q 676 39 684 57 q 657 10 669 21 q 630 -5 646 0 q 596 -10 614 -10 q 562 -5 578 -10 q 534 10 546 0 q 515 39 522 21 q 509 84 509 57 m 906 84 q 912 129 906 111 q 931 158 919 147 q 959 174 943 169 q 993 179 975 179 q 1027 174 1011 179 q 1054 158 1043 169 q 1073 129 1066 147 q 1081 84 1081 111 q 1073 39 1081 57 q 1054 10 1066 21 q 1027 -5 1043 0 q 993 -10 1011 -10 q 959 -5 975 -10 q 931 10 943 0 q 912 39 919 21 q 906 84 906 57 "},"H":{"x_min":52.421875,"x_max":1048.578125,"ha":1101,"o":"m 644 0 l 644 58 l 662 58 q 707 61 686 58 q 743 75 727 65 q 767 105 758 86 q 776 158 776 125 l 776 483 l 324 483 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 553 l 776 553 l 776 833 q 767 886 776 866 q 743 916 758 905 q 707 930 727 926 q 662 933 686 933 l 644 933 l 644 992 l 1048 992 l 1048 933 l 1030 933 q 986 930 1007 933 q 950 916 965 926 q 925 886 934 905 q 917 833 917 866 l 917 151 q 926 102 917 120 q 950 73 935 83 q 987 61 966 64 q 1030 58 1007 58 l 1048 58 l 1048 0 l 644 0 "},"î":{"x_min":16,"x_max":427.15625,"ha":444,"o":"m 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 294 745 l 294 158 q 304 105 294 125 q 328 75 313 86 q 364 61 343 65 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 m 16 860 q 51 905 32 879 q 91 958 71 931 q 127 1013 110 986 q 155 1064 144 1040 l 286 1064 q 314 1013 297 1040 q 350 958 331 986 q 390 905 370 931 q 426 860 409 879 l 426 842 l 371 842 q 291 899 331 864 q 220 966 251 933 q 149 899 188 933 q 70 842 109 864 l 16 842 l 16 860 "},"ν":{"x_min":0,"x_max":727,"ha":804,"o":"m 727 623 q 713 517 727 573 q 674 402 699 461 q 616 286 649 344 q 544 175 583 228 q 463 78 505 123 q 378 0 421 33 l 308 0 q 264 173 285 89 q 224 330 243 257 q 185 465 204 404 q 147 569 166 525 q 109 637 128 613 q 70 661 90 661 q 47 658 59 661 q 23 647 35 654 l 0 690 q 59 731 25 714 q 133 749 93 749 q 184 737 162 749 q 225 696 206 725 q 262 621 244 668 q 299 505 279 574 q 343 341 320 436 q 398 123 367 246 q 477 223 440 166 q 539 339 513 280 q 581 457 566 399 q 596 562 596 515 q 578 634 596 604 q 524 674 561 665 q 546 737 524 717 q 604 758 568 758 q 664 746 640 758 q 701 715 688 734 q 721 672 715 696 q 727 623 727 648 "},"Ό":{"x_min":-46,"x_max":952,"ha":1031,"o":"m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 m -46 789 q -29 833 -37 807 q -13 887 -20 859 q 1 942 -5 915 q 11 993 7 970 l 136 993 l 136 978 q 116 935 131 962 q 82 878 102 908 q 39 819 61 848 q 0 771 17 790 l -46 771 l -46 789 "},"−":{"x_min":90,"x_max":687,"ha":777,"o":"m 687 455 l 90 455 l 90 538 l 687 538 l 687 455 "},"⅜":{"x_min":64,"x_max":1089,"ha":1167,"o":"m 249 389 q 111 416 158 389 q 64 495 64 444 q 81 544 64 525 q 127 563 98 563 q 134 520 127 542 q 156 482 142 499 q 193 455 171 465 q 246 444 215 444 q 337 473 304 444 q 370 568 370 502 q 334 647 370 618 q 222 677 299 677 l 176 677 l 176 733 l 221 733 q 270 741 248 733 q 310 766 293 750 q 336 804 327 781 q 346 854 346 826 q 327 925 346 901 q 266 950 309 950 q 222 940 240 950 q 194 914 204 930 q 179 875 183 897 q 175 829 175 853 q 132 832 151 829 q 99 841 112 834 q 79 859 86 847 q 72 889 72 871 q 84 935 72 914 q 121 972 97 957 q 182 997 146 988 q 266 1006 218 1006 q 349 996 312 1006 q 414 969 387 986 q 456 925 441 951 q 471 867 471 899 q 459 812 471 836 q 428 769 448 787 q 383 737 409 750 q 329 716 358 724 l 329 709 q 386 696 357 704 q 439 672 415 687 q 479 632 463 656 q 495 569 495 607 q 472 484 495 519 q 413 429 449 450 q 334 398 377 407 q 249 389 291 389 m 370 0 l 278 0 l 774 992 l 865 992 l 370 0 m 642 152 q 652 202 642 181 q 681 240 663 223 q 725 270 700 257 q 780 294 751 283 q 735 322 757 306 q 696 357 712 337 q 669 402 679 377 q 660 457 660 427 q 671 511 660 484 q 707 559 682 537 q 772 593 732 580 q 870 607 813 607 q 951 597 915 607 q 1012 569 987 588 q 1051 525 1037 551 q 1065 466 1065 499 q 1055 420 1065 441 q 1029 382 1046 399 q 991 351 1013 364 q 945 327 969 337 q 1005 296 978 312 q 1050 260 1032 280 q 1079 215 1069 240 q 1089 158 1089 190 q 1074 92 1089 122 q 1032 38 1060 61 q 960 2 1003 15 q 861 -10 917 -10 q 765 2 806 -10 q 697 37 724 15 q 655 89 669 59 q 642 152 642 118 m 871 44 q 945 69 918 44 q 973 137 973 93 q 939 212 973 181 q 836 267 904 242 q 783 219 804 250 q 762 147 762 187 q 769 107 762 126 q 790 74 776 89 q 824 52 804 60 q 871 44 844 44 m 949 463 q 944 496 949 480 q 928 524 939 512 q 901 544 917 537 q 863 552 885 552 q 801 529 822 552 q 780 470 780 505 q 789 429 780 447 q 814 397 798 411 q 848 373 829 383 q 888 355 867 363 q 933 397 916 371 q 949 463 949 423 "},"ǰ":{"x_min":-16.84375,"x_max":401,"ha":416,"o":"m 280 745 l 280 -10 q 260 -166 280 -104 q 203 -265 240 -228 q 116 -318 166 -302 q 5 -334 65 -334 l -16 -334 l -16 -264 l -6 -264 q 59 -252 30 -264 q 108 -210 88 -239 q 139 -131 128 -180 q 150 -9 150 -82 l 150 592 q 140 641 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 m -9 1064 l 45 1064 q 85 1036 64 1051 q 124 1005 105 1022 q 161 971 143 988 q 195 937 179 954 q 228 971 210 954 q 266 1005 246 988 q 306 1036 286 1022 q 346 1064 327 1051 l 401 1064 l 401 1045 q 365 1000 384 1026 q 325 947 345 974 q 289 892 306 919 q 261 842 272 865 l 130 842 q 102 892 119 865 q 66 947 85 919 q 26 1000 46 974 q -9 1045 7 1026 l -9 1064 "},"ā":{"x_min":69,"x_max":722.203125,"ha":782,"o":"m 203 200 q 231 103 203 135 q 316 71 258 71 q 392 84 358 71 q 451 123 427 98 q 488 184 475 148 q 501 263 501 219 l 501 375 l 412 371 q 313 357 353 368 q 249 324 273 345 q 214 271 225 302 q 203 200 203 240 m 372 688 q 307 677 331 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 200 727 166 711 q 280 750 234 743 q 377 758 325 758 q 488 745 441 758 q 568 704 536 732 q 616 630 600 675 q 632 518 632 584 l 632 157 q 636 109 632 128 q 651 79 641 90 q 678 63 661 67 q 718 58 695 58 l 722 58 l 722 0 l 534 0 l 512 118 l 501 118 q 459 65 479 89 q 414 23 438 40 q 358 -4 389 5 q 284 -14 328 -14 q 198 0 238 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 147 371 69 318 q 385 429 226 425 l 501 434 l 501 517 q 497 586 501 554 q 479 640 492 618 q 440 676 465 663 q 372 688 414 688 m 578 842 l 175 842 l 175 924 l 578 924 l 578 842 "},"ĵ":{"x_min":-16.84375,"x_max":395,"ha":416,"o":"m 280 745 l 280 -10 q 260 -166 280 -104 q 203 -265 240 -228 q 116 -318 166 -302 q 5 -334 65 -334 l -16 -334 l -16 -264 l -6 -264 q 59 -252 30 -264 q 108 -210 88 -239 q 139 -131 128 -180 q 150 -9 150 -82 l 150 592 q 140 641 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 m -15 860 q 20 905 1 879 q 60 958 40 931 q 96 1013 79 986 q 124 1064 113 1040 l 255 1064 q 283 1013 266 1040 q 319 958 300 986 q 359 905 339 931 q 395 860 378 879 l 395 842 l 340 842 q 260 899 300 864 q 189 966 220 933 q 118 899 157 933 q 39 842 78 864 l -15 842 l -15 860 "},"Ĩ":{"x_min":8,"x_max":502,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 m 371 1161 q 404 1167 392 1161 q 424 1183 417 1173 q 434 1207 431 1194 q 439 1235 437 1220 l 502 1235 q 490 1173 499 1203 q 464 1121 481 1144 q 420 1084 446 1098 q 356 1071 393 1071 q 288 1084 319 1071 q 232 1114 258 1098 q 183 1145 206 1131 q 138 1158 161 1158 q 105 1152 117 1158 q 86 1136 93 1146 q 75 1112 79 1126 q 70 1085 72 1099 l 8 1085 q 19 1146 10 1116 q 46 1198 28 1175 q 91 1235 64 1221 q 155 1249 117 1249 q 222 1235 192 1249 q 278 1205 252 1221 q 327 1174 304 1188 q 371 1161 350 1161 "},"*":{"x_min":57,"x_max":629,"ha":695,"o":"m 57 859 l 105 969 l 319 834 l 283 1055 l 404 1055 l 365 836 l 580 966 l 629 858 l 394 790 l 629 722 l 580 615 l 365 744 l 404 525 l 283 525 l 317 744 l 105 612 l 57 720 l 290 790 l 57 859 "},"ă":{"x_min":69,"x_max":722.203125,"ha":782,"o":"m 203 200 q 231 103 203 135 q 316 71 258 71 q 392 84 358 71 q 451 123 427 98 q 488 184 475 148 q 501 263 501 219 l 501 375 l 412 371 q 313 357 353 368 q 249 324 273 345 q 214 271 225 302 q 203 200 203 240 m 372 688 q 307 677 331 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 200 727 166 711 q 280 750 234 743 q 377 758 325 758 q 488 745 441 758 q 568 704 536 732 q 616 630 600 675 q 632 518 632 584 l 632 157 q 636 109 632 128 q 651 79 641 90 q 678 63 661 67 q 718 58 695 58 l 722 58 l 722 0 l 534 0 l 512 118 l 501 118 q 459 65 479 89 q 414 23 438 40 q 358 -4 389 5 q 284 -14 328 -14 q 198 0 238 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 147 371 69 318 q 385 429 226 425 l 501 434 l 501 517 q 497 586 501 554 q 479 640 492 618 q 440 676 465 663 q 372 688 414 688 m 382 842 q 296 857 333 842 q 236 898 260 872 q 201 958 213 924 q 188 1033 189 993 l 251 1033 q 297 959 263 981 q 382 937 331 937 q 467 959 433 937 q 512 1033 501 981 l 577 1033 q 563 958 575 993 q 527 898 551 924 q 467 857 503 872 q 382 842 431 842 "},"Χ":{"x_min":11,"x_max":905,"ha":917,"o":"m 646 893 q 641 913 646 905 q 625 925 635 921 q 602 931 615 930 q 572 933 588 933 l 568 933 l 568 992 l 872 992 l 872 933 l 859 933 q 822 928 839 933 q 790 912 806 924 q 758 881 775 900 q 722 833 741 862 l 521 543 l 776 132 q 833 74 806 91 q 887 58 860 58 l 905 58 l 905 0 l 529 0 l 529 58 l 537 58 q 620 104 620 58 q 618 119 620 111 q 612 137 616 126 q 598 162 607 147 q 574 200 588 177 l 437 421 l 283 193 q 271 173 277 184 q 259 149 265 162 q 251 125 254 137 q 247 101 247 112 q 269 68 247 78 q 337 58 291 58 l 341 58 l 341 0 l 11 0 l 11 58 l 19 58 q 63 63 44 58 q 98 80 82 68 q 129 109 114 91 q 164 155 145 128 l 396 488 l 166 860 q 110 917 141 900 q 47 933 78 933 l 29 933 l 29 992 l 405 992 l 405 933 l 401 933 q 362 930 377 933 q 337 922 346 927 q 325 909 328 916 q 322 893 322 901 q 323 879 322 886 q 327 863 324 872 q 337 842 330 854 q 355 811 343 829 l 480 609 l 612 808 q 637 853 627 832 q 646 893 646 874 "},"†":{"x_min":49,"x_max":574,"ha":623,"o":"m 393 523 q 366 331 379 438 q 348 117 356 240 q 340 -154 340 -6 l 282 -154 q 274 115 282 -7 q 257 330 266 239 q 232 523 245 436 l 282 680 l 49 641 l 49 761 l 282 725 l 245 1055 l 379 1055 l 340 725 l 574 761 l 574 641 l 340 680 l 393 523 "},"°":{"x_min":66,"x_max":487,"ha":555,"o":"m 66 780 q 82 863 66 824 q 127 930 99 901 q 194 975 156 958 q 276 992 232 992 q 358 975 320 992 q 425 930 396 958 q 470 863 453 901 q 487 780 487 824 q 470 698 487 737 q 425 632 453 660 q 358 587 396 603 q 276 571 320 571 q 194 587 232 571 q 127 632 156 603 q 82 698 99 660 q 66 780 66 737 m 148 780 q 157 731 148 755 q 185 690 167 708 q 226 663 202 673 q 276 653 249 653 q 326 663 303 653 q 367 690 350 673 q 395 731 385 708 q 404 780 404 755 q 395 831 404 808 q 367 872 385 854 q 326 899 350 889 q 276 909 303 909 q 226 899 249 909 q 185 872 202 889 q 157 831 167 854 q 148 780 148 808 "},"Ξ":{"x_min":58,"x_max":805,"ha":863,"o":"m 798 0 l 64 0 l 58 273 l 129 273 l 135 231 q 144 191 138 210 q 164 158 151 172 q 199 135 178 144 q 252 127 221 127 l 610 127 q 663 135 641 127 q 698 158 684 144 q 718 191 711 172 q 727 231 724 210 l 733 273 l 805 273 l 798 0 m 763 735 l 691 735 l 685 777 q 676 816 682 798 q 655 849 669 835 q 620 872 642 863 q 568 880 599 880 l 293 880 q 240 872 262 880 q 205 849 219 863 q 185 816 192 835 q 176 777 179 798 l 170 735 l 99 735 l 106 992 l 756 992 l 763 735 m 282 643 l 289 616 q 299 589 293 601 q 317 569 305 578 q 348 557 329 561 q 395 553 367 553 l 465 553 q 541 570 516 553 q 573 616 567 587 l 580 643 l 652 643 l 652 379 l 580 379 l 573 403 q 541 445 567 429 q 465 461 516 461 l 395 461 q 348 457 367 461 q 317 445 329 453 q 299 427 305 438 q 289 403 293 416 l 282 379 l 211 379 l 211 643 l 282 643 "},"Ķ":{"x_min":52.421875,"x_max":989,"ha":973,"o":"m 612 771 q 649 817 634 797 q 673 853 664 837 q 685 882 681 869 q 689 904 689 894 q 672 928 689 922 q 620 935 655 935 l 620 992 l 928 992 l 928 935 q 882 925 904 935 q 838 900 860 916 q 792 859 815 883 q 741 804 769 835 l 540 578 l 833 169 q 910 86 873 114 q 986 58 947 58 l 989 58 l 989 0 l 974 0 q 859 5 904 0 q 783 25 814 10 q 730 63 753 39 q 682 124 707 87 l 442 468 l 324 372 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 441 l 612 771 m 422 -288 q 444 -188 433 -242 q 464 -85 455 -135 l 585 -85 l 585 -98 q 561 -147 575 -120 q 532 -202 548 -174 q 500 -258 516 -231 q 469 -307 483 -285 l 422 -307 l 422 -288 "},"ŵ":{"x_min":1,"x_max":1196,"ha":1197,"o":"m 661 741 l 800 329 q 817 275 808 304 q 834 218 826 246 q 849 164 843 190 q 860 122 856 139 l 864 122 q 883 207 870 156 q 918 325 897 257 l 987 548 q 996 586 993 566 q 1000 618 1000 606 q 977 670 1000 654 q 908 686 955 686 l 898 686 l 898 745 l 1196 745 l 1196 686 l 1178 686 q 1143 682 1158 686 q 1116 666 1128 678 q 1094 633 1104 654 q 1073 578 1084 612 l 894 0 l 783 0 l 617 489 l 592 580 l 395 0 l 286 0 l 104 612 q 87 648 95 634 q 66 671 78 662 q 40 683 55 679 q 5 686 25 686 l 1 686 l 1 745 l 344 745 l 344 686 l 325 686 q 263 674 284 686 q 242 628 242 662 q 246 600 242 616 q 253 568 249 584 l 319 335 q 333 280 326 310 q 347 220 340 250 q 359 165 353 191 q 368 122 364 139 l 372 122 q 381 163 375 139 q 394 213 387 186 q 411 268 402 240 q 429 320 420 295 l 573 741 l 661 741 m 387 860 q 422 905 403 879 q 462 958 442 931 q 498 1013 481 986 q 526 1064 515 1040 l 657 1064 q 685 1013 668 1040 q 721 958 702 986 q 761 905 741 931 q 797 860 780 879 l 797 842 l 742 842 q 662 899 702 864 q 591 966 622 933 q 520 899 559 933 q 441 842 480 864 l 387 842 l 387 860 "},"΄":{"x_min":342,"x_max":524,"ha":802,"o":"m 342 860 q 358 904 350 878 q 374 958 367 930 q 389 1013 382 986 q 399 1064 395 1041 l 524 1064 l 524 1049 q 504 1006 519 1033 q 470 949 490 979 q 427 890 449 919 q 387 842 405 861 l 342 842 l 342 860 "},"ǽ":{"x_min":69,"x_max":1099,"ha":1168,"o":"m 203 202 q 231 106 203 138 q 317 74 259 74 q 394 88 360 74 q 453 126 429 101 q 490 186 477 151 q 504 265 504 222 l 504 348 l 504 366 l 504 377 l 414 373 q 314 358 354 370 q 249 325 274 346 q 214 273 225 304 q 203 202 203 243 m 811 683 q 690 621 732 683 q 641 439 649 558 l 964 439 q 955 538 964 493 q 929 616 947 583 q 882 665 912 648 q 811 683 853 683 m 829 -14 q 657 26 728 -14 q 548 147 587 67 q 512 86 535 115 q 456 34 489 57 q 380 0 423 12 q 286 -14 337 -14 q 199 0 239 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 148 371 69 318 q 387 429 227 425 l 504 434 l 504 517 q 499 586 504 554 q 482 640 495 618 q 442 676 468 663 q 373 688 416 688 q 307 677 332 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 201 727 166 711 q 281 750 235 743 q 379 758 327 758 q 512 738 458 758 q 597 673 566 718 q 811 758 674 758 q 931 736 878 758 q 1022 673 984 715 q 1079 569 1059 631 q 1099 423 1099 506 l 1099 359 l 638 359 q 653 231 640 285 q 692 143 666 178 q 758 93 718 109 q 852 76 797 76 q 911 84 882 76 q 963 104 939 91 q 1008 134 988 117 q 1041 172 1028 152 q 1059 154 1051 167 q 1068 124 1068 141 q 1053 78 1068 102 q 1008 33 1038 54 q 934 0 978 13 q 829 -14 889 -14 m 518 860 q 550 905 533 879 q 582 958 566 931 q 613 1013 598 986 q 638 1064 627 1040 l 787 1064 l 787 1049 q 749 1004 774 1031 q 693 946 723 976 q 630 889 663 917 q 570 842 598 860 l 518 842 l 518 860 "},"Β":{"x_min":52.421875,"x_max":823,"ha":908,"o":"m 782 743 q 768 661 782 696 q 732 599 755 626 q 677 555 709 573 q 609 524 646 537 l 609 519 q 696 491 656 511 q 763 440 735 471 q 807 365 791 408 q 823 267 823 322 q 734 66 823 133 q 466 0 646 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 424 992 q 693 931 605 992 q 782 743 782 871 m 324 69 l 457 69 q 555 80 515 69 q 620 114 595 90 q 657 177 646 139 q 669 271 669 216 q 659 366 669 326 q 624 432 649 406 q 560 471 600 459 q 459 484 520 484 l 324 484 l 324 69 m 324 554 l 419 554 q 519 564 479 554 q 583 598 559 575 q 617 657 607 621 q 628 743 628 693 q 616 828 628 794 q 580 884 605 863 q 514 914 554 905 q 415 922 473 922 l 324 922 l 324 554 "},"Ļ":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 358 917 373 927 q 333 888 342 907 q 324 839 324 869 l 324 69 l 599 69 q 652 80 630 69 q 688 109 674 91 q 710 150 703 127 q 721 194 718 172 l 735 299 l 807 299 l 797 0 l 52 0 m 361 -288 q 383 -188 372 -242 q 403 -85 394 -135 l 524 -85 l 524 -98 q 500 -147 514 -120 q 471 -202 487 -174 q 439 -258 455 -231 q 408 -307 422 -285 l 361 -307 l 361 -288 "},"Õ":{"x_min":78,"x_max":952,"ha":1031,"o":"m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 m 622 1161 q 655 1167 643 1161 q 675 1183 668 1173 q 685 1207 682 1194 q 690 1235 688 1220 l 753 1235 q 741 1173 750 1203 q 715 1121 732 1144 q 671 1084 697 1098 q 607 1071 644 1071 q 539 1084 570 1071 q 483 1114 509 1098 q 434 1145 457 1131 q 389 1158 412 1158 q 356 1152 368 1158 q 337 1136 344 1146 q 326 1112 330 1126 q 321 1085 323 1099 l 259 1085 q 270 1146 261 1116 q 297 1198 279 1175 q 342 1235 315 1221 q 406 1249 368 1249 q 473 1235 443 1249 q 529 1205 503 1221 q 578 1174 555 1188 q 622 1161 601 1161 "},"№":{"x_min":38.75,"x_max":1363,"ha":1425,"o":"m 718 0 l 242 800 l 242 158 q 251 105 242 125 q 276 75 260 86 q 312 61 291 65 q 356 58 333 58 l 374 58 l 374 0 l 38 0 l 38 58 l 57 58 q 101 61 80 58 q 137 75 122 65 q 161 105 152 86 q 171 158 171 125 l 171 839 q 161 888 171 869 q 137 917 152 907 q 100 930 121 927 q 57 933 80 933 l 38 933 l 38 992 l 281 992 l 732 223 l 732 839 q 722 888 732 869 q 698 917 713 907 q 661 930 682 927 q 618 933 641 933 l 600 933 l 600 992 l 935 992 l 935 933 l 917 933 q 873 930 894 933 q 837 916 852 926 q 813 886 822 905 q 804 833 804 866 l 804 0 l 718 0 m 1029 422 q 1053 288 1029 333 q 1135 243 1076 243 q 1217 288 1193 243 q 1242 422 1242 333 q 1217 554 1242 510 q 1134 597 1193 597 q 1053 554 1076 597 q 1029 422 1029 510 m 1363 421 q 1305 243 1363 301 q 1135 185 1247 185 q 968 243 1028 185 q 909 421 909 302 q 966 598 909 540 q 1138 656 1024 656 q 1231 641 1190 656 q 1302 597 1273 626 q 1347 524 1331 568 q 1363 421 1363 480 m 956 0 l 956 104 l 1318 104 l 1318 0 l 956 0 "},"χ":{"x_min":-5,"x_max":742,"ha":733,"o":"m 140 -334 l -5 -334 l 316 244 l 205 540 q 184 590 195 566 q 162 631 174 613 q 135 659 149 649 q 103 669 120 669 q 85 668 95 669 q 65 664 75 666 q 46 658 55 661 q 30 651 36 655 l 4 695 q 64 733 31 718 q 140 749 98 749 q 192 738 170 749 q 229 705 213 727 q 258 653 246 684 q 284 580 271 622 l 365 336 l 566 745 l 701 745 l 423 212 l 543 -122 q 563 -173 552 -149 q 586 -214 573 -196 q 613 -242 598 -232 q 645 -253 628 -253 q 662 -252 653 -253 q 683 -247 672 -250 q 702 -241 693 -245 q 718 -235 712 -238 l 742 -278 q 682 -315 714 -301 q 608 -330 650 -330 q 556 -319 577 -330 q 518 -287 534 -308 q 489 -235 501 -266 q 464 -162 476 -203 l 375 119 l 140 -334 "},"ί":{"x_min":136,"x_max":461.53125,"ha":464,"o":"m 266 745 l 266 193 q 295 88 266 122 q 372 55 324 55 q 418 57 397 55 q 461 64 439 60 l 461 6 q 438 -1 452 2 q 407 -7 424 -5 q 372 -12 391 -10 q 338 -14 354 -14 q 247 -2 285 -14 q 184 33 208 8 q 147 100 159 58 q 136 201 136 141 l 136 745 l 266 745 m 144 860 q 160 904 152 878 q 176 958 169 930 q 191 1013 184 986 q 201 1064 197 1041 l 326 1064 l 326 1049 q 306 1006 321 1033 q 272 949 292 979 q 229 890 251 919 q 189 842 207 861 l 144 842 l 144 860 "},"Ζ":{"x_min":50,"x_max":764,"ha":822,"o":"m 742 935 l 219 69 l 569 69 q 622 78 601 69 q 656 103 643 87 q 675 139 669 118 q 685 183 682 160 l 692 243 l 764 243 l 757 0 l 50 0 l 50 55 l 571 922 l 268 922 q 217 913 238 922 q 183 888 196 904 q 164 852 170 873 q 154 808 157 831 l 147 749 l 76 749 l 82 992 l 742 992 l 742 935 "},"Ľ":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 358 917 373 927 q 333 888 342 907 q 324 839 324 869 l 324 69 l 599 69 q 652 80 630 69 q 688 109 674 91 q 710 150 703 127 q 721 194 718 172 l 735 299 l 807 299 l 797 0 l 52 0 m 586 787 q 608 888 597 834 q 628 992 619 941 l 749 992 l 749 978 q 725 929 739 956 q 696 874 712 902 q 664 818 680 846 q 633 770 647 791 l 586 770 l 586 787 "},"ť":{"x_min":26.203125,"x_max":524,"ha":489,"o":"m 368 55 q 414 57 393 55 q 457 64 435 60 l 457 6 q 434 -1 448 2 q 403 -7 420 -5 q 368 -12 387 -10 q 334 -14 350 -14 q 243 -2 281 -14 q 180 33 204 8 q 143 100 155 58 q 132 201 132 141 l 132 665 l 26 665 l 26 721 q 81 731 51 721 q 134 765 111 741 q 173 826 158 791 q 198 916 187 862 l 262 916 l 262 745 l 444 745 l 444 665 l 262 665 l 262 193 q 291 88 262 122 q 368 55 320 55 m 361 850 q 383 951 372 897 q 403 1055 394 1004 l 524 1055 l 524 1041 q 500 992 514 1019 q 471 937 487 965 q 439 881 455 909 q 408 833 422 854 l 361 833 l 361 850 "},"5":{"x_min":77,"x_max":675,"ha":777,"o":"m 331 62 q 410 74 374 62 q 473 114 447 86 q 515 187 500 141 q 530 298 530 232 q 515 395 530 354 q 472 463 500 436 q 406 504 445 490 q 319 517 367 517 q 257 514 283 517 q 211 507 231 511 q 176 497 191 503 q 149 486 162 492 l 116 496 l 160 990 l 624 990 l 631 780 l 572 780 l 567 821 q 561 847 565 836 q 549 864 557 857 q 527 875 541 871 q 492 878 513 878 l 223 878 l 196 571 q 257 586 217 579 q 358 594 296 594 q 483 575 425 594 q 584 520 541 557 q 650 429 626 484 q 675 301 675 374 q 652 172 675 230 q 586 72 629 114 q 481 8 543 31 q 339 -14 418 -14 q 211 -1 262 -14 q 131 32 161 12 q 89 76 101 52 q 77 123 77 100 q 98 182 77 161 q 164 204 119 204 q 174 148 164 173 q 206 103 185 122 q 258 73 226 84 q 331 62 289 62 "},"o":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 641 81 725 177 q 398 -14 558 -14 q 264 9 323 -14 q 162 81 204 33 q 99 202 121 129 q 77 373 77 275 q 159 663 77 568 q 403 758 241 758 q 537 734 478 758 q 639 663 597 711 q 702 543 680 615 q 725 373 725 471 m 211 374 q 222 236 211 295 q 254 136 232 176 q 313 75 277 96 q 402 55 349 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 q 579 511 590 452 q 547 609 569 570 q 488 668 525 649 q 400 688 452 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 "},"Ѕ":{"x_min":66,"x_max":685,"ha":756,"o":"m 342 -14 q 223 0 275 -14 q 136 39 171 14 q 83 101 101 65 q 66 181 66 137 q 92 249 66 223 q 166 275 118 275 q 179 192 168 231 q 212 121 190 152 q 268 73 234 91 q 349 55 301 55 q 493 100 441 55 q 544 230 544 145 q 533 297 544 267 q 498 351 523 326 q 433 398 473 375 q 333 446 393 421 q 222 502 269 472 q 143 569 175 532 q 97 652 112 606 q 82 754 82 697 q 104 860 82 814 q 168 939 127 907 q 264 989 208 972 q 386 1006 320 1006 q 496 993 448 1006 q 578 958 544 980 q 628 908 611 936 q 646 850 646 880 q 616 782 646 805 q 536 760 587 760 q 529 824 536 792 q 504 880 521 855 q 457 921 486 905 q 386 936 428 936 q 317 925 347 936 q 265 893 286 914 q 233 843 244 873 q 222 778 222 814 q 232 705 222 737 q 268 648 243 674 q 333 600 293 623 q 432 553 373 577 q 539 500 492 528 q 618 438 585 472 q 667 361 650 403 q 685 265 685 318 q 660 147 685 199 q 592 59 636 95 q 484 4 547 23 q 342 -14 420 -14 "},"�":{"x_min":56.828125,"x_max":1330.53125,"ha":1389,"o":"m 693 1055 l 1330 419 l 693 -216 l 56 419 l 693 1055 m 958 581 q 937 668 958 630 q 881 732 917 706 q 794 772 844 758 q 686 786 745 786 q 580 775 624 786 q 506 748 536 765 q 463 707 477 731 q 450 657 450 684 q 461 622 450 637 q 494 598 473 607 q 543 583 515 588 q 606 579 572 579 q 611 633 606 607 q 626 677 615 658 q 653 708 636 697 q 695 719 670 719 q 734 710 718 719 q 761 685 751 701 q 776 648 772 670 q 781 598 781 625 q 774 533 781 566 q 750 471 768 501 q 702 415 732 441 q 625 371 672 390 l 646 234 l 715 234 l 736 336 q 833 383 792 359 q 902 437 875 408 q 944 501 930 466 q 958 581 958 537 m 588 61 q 595 18 588 35 q 614 -8 602 1 q 643 -23 626 -19 q 677 -28 659 -28 q 713 -23 696 -28 q 742 -8 730 -19 q 762 18 755 1 q 770 61 770 35 q 762 103 770 86 q 742 130 755 120 q 713 145 730 141 q 677 150 696 150 q 643 145 659 150 q 614 130 626 141 q 595 103 602 120 q 588 61 588 86 "},"d":{"x_min":77,"x_max":828.46875,"ha":853,"o":"m 703 152 q 712 103 703 122 q 736 74 721 84 q 773 61 752 64 q 816 58 793 58 l 828 58 l 828 0 l 592 0 l 577 124 l 572 124 q 536 67 556 92 q 490 23 516 41 q 432 -4 465 5 q 359 -14 400 -14 q 238 8 291 -14 q 149 78 185 31 q 95 198 113 125 q 77 370 77 270 q 95 544 77 471 q 149 665 113 617 q 238 735 185 712 q 359 758 291 758 q 431 749 399 758 q 490 724 464 740 q 536 685 516 707 q 572 635 557 663 l 580 635 q 576 699 578 669 q 573 750 574 725 q 572 788 572 776 l 572 902 q 562 951 572 932 q 538 980 553 970 q 501 993 522 990 q 458 996 481 996 l 446 996 l 446 1055 l 703 1055 l 703 152 m 383 74 q 473 92 437 74 q 531 147 509 110 q 562 239 553 184 q 572 370 572 295 q 562 498 572 443 q 531 592 553 554 q 473 649 509 629 q 382 669 436 669 q 304 649 336 669 q 251 591 272 629 q 221 497 230 553 q 211 369 211 441 q 251 148 211 221 q 383 74 291 74 "},",":{"x_min":41,"x_max":269,"ha":347,"o":"m 269 58 q 256 -27 269 14 q 217 -104 244 -68 q 146 -167 189 -139 q 41 -214 103 -195 l 41 -155 q 141 -102 109 -133 q 173 -30 173 -71 q 165 -7 173 -17 q 147 8 158 1 q 122 22 135 15 q 98 38 109 29 q 79 61 86 48 q 72 96 72 75 q 98 157 72 136 q 162 179 124 179 q 203 171 184 179 q 237 148 222 163 q 260 110 252 132 q 269 58 269 87 "},"\"":{"x_min":82.53125,"x_max":485.46875,"ha":567,"o":"m 341 992 l 485 992 l 444 666 l 381 666 l 341 992 m 82 992 l 227 992 l 185 666 l 123 666 l 82 992 "},"ľ":{"x_min":18.421875,"x_max":520,"ha":431,"o":"m 36 58 q 80 61 59 58 q 116 75 101 65 q 140 105 131 86 q 150 158 150 125 l 150 902 q 140 951 150 932 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 18 996 l 18 1055 l 280 1055 l 280 158 q 289 105 280 125 q 314 75 298 86 q 350 61 329 65 q 394 58 371 58 l 412 58 l 412 0 l 18 0 l 18 58 l 36 58 m 357 850 q 379 951 368 897 q 399 1055 390 1004 l 520 1055 l 520 1041 q 496 992 510 1019 q 467 937 483 965 q 435 881 451 909 q 404 833 418 854 l 357 833 l 357 850 "},"ė":{"x_min":77,"x_max":673,"ha":743,"o":"m 384 678 q 264 617 306 678 q 214 438 222 556 l 538 438 q 529 536 538 491 q 503 612 521 580 q 456 661 485 644 q 384 678 427 678 m 398 -14 q 263 11 323 -14 q 162 85 203 36 q 98 205 120 134 q 77 366 77 276 q 156 659 77 561 q 384 758 236 758 q 505 736 451 758 q 595 673 558 715 q 653 568 633 631 q 673 423 673 505 l 673 358 l 211 358 q 227 230 213 284 q 266 142 241 176 q 330 91 292 107 q 417 74 368 74 q 484 82 453 74 q 540 104 515 90 q 584 134 565 117 q 615 170 603 151 q 633 153 625 165 q 642 122 642 140 q 627 77 642 101 q 581 33 612 53 q 505 0 551 13 q 398 -14 459 -14 m 303 970 q 309 1011 303 994 q 326 1037 315 1027 q 351 1051 336 1047 q 382 1056 365 1056 q 413 1051 398 1056 q 438 1037 427 1047 q 455 1011 449 1027 q 462 970 462 994 q 455 929 462 945 q 438 903 449 913 q 413 888 427 892 q 382 884 398 884 q 351 888 365 884 q 326 903 336 892 q 309 929 315 913 q 303 970 303 945 "},"Í":{"x_min":52.421875,"x_max":456.640625,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 m 183 1089 q 215 1134 198 1108 q 247 1187 231 1160 q 278 1242 263 1215 q 303 1293 292 1269 l 452 1293 l 452 1278 q 414 1233 439 1260 q 358 1175 388 1205 q 295 1118 328 1146 q 235 1071 263 1089 l 183 1071 l 183 1089 "},"Ú":{"x_min":21.4375,"x_max":975.25,"ha":996,"o":"m 502 -14 q 355 3 420 -14 q 245 58 290 20 q 176 155 200 95 q 153 299 153 214 l 153 839 q 143 888 153 869 q 119 917 134 907 q 82 930 103 927 q 39 933 62 933 l 21 933 l 21 992 l 425 992 l 425 933 l 407 933 q 363 930 384 933 q 326 916 342 926 q 302 885 311 905 q 293 832 293 865 l 293 285 q 310 181 293 224 q 358 112 327 138 q 431 72 389 85 q 525 60 474 60 q 629 77 585 60 q 701 122 672 93 q 744 191 730 151 q 758 279 758 231 l 758 838 q 749 888 758 869 q 724 917 739 906 q 688 930 708 927 q 644 933 667 933 l 626 933 l 626 992 l 975 992 l 975 933 l 956 933 q 912 930 933 933 q 876 916 891 926 q 852 886 861 905 q 843 833 843 866 l 843 283 q 820 158 843 214 q 755 65 798 103 q 649 6 712 26 q 502 -14 585 -14 m 441 1089 q 473 1134 456 1108 q 505 1187 489 1160 q 536 1242 521 1215 q 561 1293 550 1269 l 710 1293 l 710 1278 q 672 1233 697 1260 q 616 1175 646 1205 q 553 1118 586 1146 q 493 1071 521 1089 l 441 1071 l 441 1089 "}," ":{"x_min":0,"x_max":0,"ha":278},"Ŷ":{"x_min":-7,"x_max":872,"ha":868,"o":"m 221 0 l 221 58 l 253 58 q 296 61 276 58 q 333 73 317 64 q 357 102 348 83 q 367 151 367 120 l 367 413 l 109 860 q 87 893 98 880 q 66 916 77 907 q 41 929 55 925 q 10 933 28 933 l -7 933 l -7 992 l 374 992 l 374 933 l 323 933 q 292 930 304 933 q 273 920 280 926 q 264 906 267 914 q 262 889 262 898 q 270 850 262 869 q 287 815 279 830 l 389 629 q 431 545 414 586 q 459 470 448 503 q 475 504 466 485 q 495 543 484 522 q 518 585 506 563 q 543 629 531 607 l 631 789 q 651 834 645 812 q 657 872 657 855 q 635 918 657 903 q 573 933 613 933 l 532 933 l 532 992 l 872 992 l 872 933 l 855 933 q 827 928 840 933 q 800 910 814 923 q 772 877 787 898 q 740 825 758 857 l 507 413 l 507 158 q 516 105 507 125 q 540 75 525 86 q 576 61 556 65 q 620 58 597 58 l 653 58 l 653 0 l 221 0 m 232 1089 q 267 1134 248 1108 q 307 1187 287 1160 q 343 1242 326 1215 q 371 1293 360 1269 l 502 1293 q 530 1242 513 1269 q 566 1187 547 1215 q 606 1134 586 1160 q 642 1089 625 1108 l 642 1071 l 587 1071 q 507 1128 547 1093 q 436 1195 467 1162 q 365 1128 404 1162 q 286 1071 325 1093 l 232 1071 l 232 1089 "},"Ý":{"x_min":-7,"x_max":872,"ha":868,"o":"m 221 0 l 221 58 l 253 58 q 296 61 276 58 q 333 73 317 64 q 357 102 348 83 q 367 151 367 120 l 367 413 l 109 860 q 87 893 98 880 q 66 916 77 907 q 41 929 55 925 q 10 933 28 933 l -7 933 l -7 992 l 374 992 l 374 933 l 323 933 q 292 930 304 933 q 273 920 280 926 q 264 906 267 914 q 262 889 262 898 q 270 850 262 869 q 287 815 279 830 l 389 629 q 431 545 414 586 q 459 470 448 503 q 475 504 466 485 q 495 543 484 522 q 518 585 506 563 q 543 629 531 607 l 631 789 q 651 834 645 812 q 657 872 657 855 q 635 918 657 903 q 573 933 613 933 l 532 933 l 532 992 l 872 992 l 872 933 l 855 933 q 827 928 840 933 q 800 910 814 923 q 772 877 787 898 q 740 825 758 857 l 507 413 l 507 158 q 516 105 507 125 q 540 75 525 86 q 576 61 556 65 q 620 58 597 58 l 653 58 l 653 0 l 221 0 m 384 1089 q 416 1134 399 1108 q 448 1187 432 1160 q 479 1242 464 1215 q 504 1293 493 1269 l 653 1293 l 653 1278 q 615 1233 640 1260 q 559 1175 589 1205 q 496 1118 529 1146 q 436 1071 464 1089 l 384 1071 l 384 1089 "},"ŝ":{"x_min":62,"x_max":566,"ha":627,"o":"m 291 -14 q 196 -4 239 -14 q 124 22 154 4 q 78 69 94 41 q 62 133 62 96 q 71 179 62 161 q 93 209 80 198 q 122 224 106 220 q 149 229 137 229 q 156 160 149 192 q 180 104 163 128 q 223 66 196 80 q 290 52 251 52 q 352 61 325 52 q 397 87 379 70 q 425 127 415 104 q 435 178 435 150 q 427 223 435 204 q 401 258 420 241 q 351 291 383 274 q 272 330 320 308 q 183 375 221 353 q 121 423 145 397 q 84 482 96 449 q 72 560 72 515 q 90 645 72 608 q 143 706 109 681 q 226 744 178 731 q 334 757 274 757 q 421 746 383 757 q 485 719 459 736 q 524 678 511 702 q 537 629 537 655 q 510 568 537 591 q 436 546 484 546 q 409 658 436 618 q 325 698 383 698 q 269 690 292 698 q 231 665 246 681 q 209 628 216 650 q 202 581 202 607 q 211 536 202 555 q 240 500 220 516 q 291 468 260 484 q 367 434 323 453 q 456 389 419 411 q 518 340 494 366 q 554 280 542 313 q 566 203 566 247 q 546 108 566 149 q 490 40 526 68 q 404 0 454 13 q 291 -14 353 -14 m 128 860 q 163 905 144 879 q 203 958 183 931 q 239 1013 222 986 q 267 1064 256 1040 l 398 1064 q 426 1013 409 1040 q 462 958 443 986 q 502 905 482 931 q 538 860 521 879 l 538 842 l 483 842 q 403 899 443 864 q 332 966 363 933 q 261 899 300 933 q 182 842 221 864 l 128 842 l 128 860 "}," ":{"x_min":0,"x_max":0,"ha":1389},"ą":{"x_min":69,"x_max":722.203125,"ha":782,"o":"m 203 200 q 231 103 203 135 q 316 71 258 71 q 392 84 358 71 q 451 123 427 98 q 488 184 475 148 q 501 263 501 219 l 501 375 l 412 371 q 313 357 353 368 q 249 324 273 345 q 214 271 225 302 q 203 200 203 240 m 372 688 q 307 677 331 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 200 727 166 711 q 280 750 234 743 q 377 758 325 758 q 488 745 441 758 q 568 704 536 732 q 616 630 600 675 q 632 518 632 584 l 632 157 q 636 109 632 128 q 651 79 641 90 q 678 63 661 67 q 718 58 695 58 l 722 58 l 722 0 l 534 0 l 512 118 l 501 118 q 459 65 479 89 q 414 23 438 40 q 358 -4 389 5 q 284 -14 328 -14 q 198 0 238 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 147 371 69 318 q 385 429 226 425 l 501 434 l 501 517 q 497 586 501 554 q 479 640 492 618 q 440 676 465 663 q 372 688 414 688 m 372 -180 q 385 -118 372 -147 q 422 -65 399 -89 q 474 -24 445 -41 q 536 0 504 -7 l 615 0 q 570 -20 593 -6 q 529 -54 547 -34 q 498 -102 510 -75 q 485 -162 485 -129 q 493 -203 485 -186 q 513 -230 500 -220 q 543 -246 526 -241 q 582 -251 561 -251 q 622 -248 600 -251 q 670 -240 644 -245 l 670 -312 q 645 -321 659 -317 q 616 -328 631 -325 q 587 -332 601 -330 q 562 -334 573 -334 q 483 -324 518 -334 q 423 -297 448 -315 q 385 -249 398 -278 q 372 -180 372 -220 "},"​":{"x_min":0,"x_max":0,"ha":0},"ã":{"x_min":69,"x_max":722.203125,"ha":782,"o":"m 203 200 q 231 103 203 135 q 316 71 258 71 q 392 84 358 71 q 451 123 427 98 q 488 184 475 148 q 501 263 501 219 l 501 375 l 412 371 q 313 357 353 368 q 249 324 273 345 q 214 271 225 302 q 203 200 203 240 m 372 688 q 307 677 331 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 200 727 166 711 q 280 750 234 743 q 377 758 325 758 q 488 745 441 758 q 568 704 536 732 q 616 630 600 675 q 632 518 632 584 l 632 157 q 636 109 632 128 q 651 79 641 90 q 678 63 661 67 q 718 58 695 58 l 722 58 l 722 0 l 534 0 l 512 118 l 501 118 q 459 65 479 89 q 414 23 438 40 q 358 -4 389 5 q 284 -14 328 -14 q 198 0 238 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 147 371 69 318 q 385 429 226 425 l 501 434 l 501 517 q 497 586 501 554 q 479 640 492 618 q 440 676 465 663 q 372 688 414 688 m 503 932 q 536 938 524 932 q 556 954 549 944 q 566 978 563 965 q 571 1006 569 991 l 634 1006 q 622 944 631 974 q 596 892 613 915 q 552 855 578 869 q 488 842 525 842 q 420 855 451 842 q 364 885 390 869 q 315 916 338 902 q 270 929 293 929 q 237 923 249 929 q 218 907 225 917 q 207 883 211 897 q 202 856 204 870 l 140 856 q 151 917 142 887 q 178 969 160 946 q 223 1006 196 992 q 287 1020 249 1020 q 354 1006 324 1020 q 410 976 384 992 q 459 945 436 959 q 503 932 482 932 "},"æ":{"x_min":69,"x_max":1099,"ha":1168,"o":"m 203 202 q 231 106 203 138 q 317 74 259 74 q 394 88 360 74 q 453 126 429 101 q 490 186 477 151 q 504 265 504 222 l 504 348 l 504 366 l 504 377 l 414 373 q 314 358 354 370 q 249 325 274 346 q 214 273 225 304 q 203 202 203 243 m 811 683 q 690 621 732 683 q 641 439 649 558 l 964 439 q 955 538 964 493 q 929 616 947 583 q 882 665 912 648 q 811 683 853 683 m 829 -14 q 657 26 728 -14 q 548 147 587 67 q 512 86 535 115 q 456 34 489 57 q 380 0 423 12 q 286 -14 337 -14 q 199 0 239 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 148 371 69 318 q 387 429 227 425 l 504 434 l 504 517 q 499 586 504 554 q 482 640 495 618 q 442 676 468 663 q 373 688 416 688 q 307 677 332 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 201 727 166 711 q 281 750 235 743 q 379 758 327 758 q 512 738 458 758 q 597 673 566 718 q 811 758 674 758 q 931 736 878 758 q 1022 673 984 715 q 1079 569 1059 631 q 1099 423 1099 506 l 1099 359 l 638 359 q 653 231 640 285 q 692 143 666 178 q 758 93 718 109 q 852 76 797 76 q 911 84 882 76 q 963 104 939 91 q 1008 134 988 117 q 1041 172 1028 152 q 1059 154 1051 167 q 1068 124 1068 141 q 1053 78 1068 102 q 1008 33 1038 54 q 934 0 978 13 q 829 -14 889 -14 "},"ĩ":{"x_min":-31,"x_max":463,"ha":444,"o":"m 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 294 745 l 294 158 q 304 105 294 125 q 328 75 313 86 q 364 61 343 65 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 m 332 932 q 365 938 353 932 q 385 954 378 944 q 395 978 392 965 q 400 1006 398 991 l 463 1006 q 451 944 460 974 q 425 892 442 915 q 381 855 407 869 q 317 842 354 842 q 249 855 280 842 q 193 885 219 869 q 144 916 167 902 q 99 929 122 929 q 66 923 78 929 q 47 907 54 917 q 36 883 40 897 q 31 856 33 870 l -31 856 q -19 917 -28 887 q 7 969 -10 946 q 52 1006 25 992 q 116 1020 78 1020 q 183 1006 153 1020 q 239 976 213 992 q 288 945 265 959 q 332 932 311 932 "},"~":{"x_min":77,"x_max":701,"ha":779,"o":"m 526 374 q 484 382 505 374 q 441 403 462 390 q 400 432 419 416 q 365 461 381 447 q 335 489 350 475 q 305 512 320 502 q 276 528 291 522 q 245 534 261 534 q 185 495 205 534 q 158 374 165 456 l 77 374 q 89 460 81 417 q 116 538 98 504 q 168 595 135 573 q 251 617 200 617 q 297 608 274 617 q 342 585 320 599 q 383 555 364 572 q 419 525 402 539 q 448 499 434 511 q 476 477 462 486 q 504 461 490 467 q 532 456 518 456 q 589 497 571 456 q 617 617 608 539 l 701 617 q 686 530 696 573 q 657 452 677 486 q 607 395 638 417 q 526 374 575 374 "},"ŀ":{"x_min":18.421875,"x_max":552,"ha":514,"o":"m 36 58 q 80 61 59 58 q 116 75 101 65 q 140 105 131 86 q 150 158 150 125 l 150 902 q 140 951 150 932 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 18 996 l 18 1055 l 280 1055 l 280 158 q 289 105 280 125 q 314 75 298 86 q 350 61 329 65 q 394 58 371 58 l 412 58 l 412 0 l 18 0 l 18 58 l 36 58 m 393 457 q 399 498 393 481 q 416 524 405 514 q 441 538 426 534 q 472 543 455 543 q 503 538 488 543 q 528 524 517 534 q 545 498 539 514 q 552 457 552 481 q 545 416 552 432 q 528 390 539 400 q 503 375 517 379 q 472 371 488 371 q 441 375 455 371 q 416 390 426 379 q 399 416 405 400 q 393 457 393 432 "},"Ċ":{"x_min":79,"x_max":806,"ha":853,"o":"m 524 1006 q 648 994 596 1006 q 736 961 701 982 q 788 911 771 940 q 806 850 806 883 q 796 809 806 827 q 771 779 787 791 q 733 759 755 766 q 685 753 711 753 q 676 817 685 785 q 648 874 668 848 q 598 915 629 899 q 522 931 567 931 q 388 902 443 931 q 298 818 333 873 q 248 682 264 763 q 232 496 232 601 q 249 326 232 403 q 300 193 265 249 q 390 108 336 138 q 522 77 445 77 q 612 87 573 77 q 681 113 651 97 q 734 151 711 129 q 774 196 756 172 q 793 175 786 188 q 801 141 801 162 q 783 87 801 115 q 728 37 765 60 q 635 0 691 15 q 501 -14 578 -14 q 318 22 397 -14 q 186 126 239 59 q 106 288 133 193 q 79 497 79 382 q 107 703 79 609 q 192 864 136 796 q 331 968 248 931 q 524 1006 415 1006 m 441 1199 q 447 1240 441 1223 q 464 1266 453 1256 q 489 1280 474 1276 q 520 1285 503 1285 q 551 1280 536 1285 q 576 1266 565 1276 q 593 1240 587 1256 q 600 1199 600 1223 q 593 1158 600 1174 q 576 1132 587 1142 q 551 1117 565 1121 q 520 1113 536 1113 q 489 1117 503 1113 q 464 1132 474 1121 q 447 1158 453 1142 q 441 1199 441 1174 "},"¡":{"x_min":143,"x_max":318,"ha":463,"o":"m 311 -249 l 149 -249 l 198 464 l 262 464 l 311 -249 m 318 658 q 311 613 318 631 q 292 584 304 595 q 264 568 280 573 q 230 564 248 564 q 196 568 212 564 q 169 584 180 573 q 150 613 157 595 q 143 658 143 631 q 150 703 143 685 q 169 732 157 721 q 196 748 180 743 q 230 753 212 753 q 264 748 248 753 q 292 732 280 743 q 311 703 304 721 q 318 658 318 685 "},"ẅ":{"x_min":1,"x_max":1196,"ha":1197,"o":"m 661 741 l 800 329 q 817 275 808 304 q 834 218 826 246 q 849 164 843 190 q 860 122 856 139 l 864 122 q 883 207 870 156 q 918 325 897 257 l 987 548 q 996 586 993 566 q 1000 618 1000 606 q 977 670 1000 654 q 908 686 955 686 l 898 686 l 898 745 l 1196 745 l 1196 686 l 1178 686 q 1143 682 1158 686 q 1116 666 1128 678 q 1094 633 1104 654 q 1073 578 1084 612 l 894 0 l 783 0 l 617 489 l 592 580 l 395 0 l 286 0 l 104 612 q 87 648 95 634 q 66 671 78 662 q 40 683 55 679 q 5 686 25 686 l 1 686 l 1 745 l 344 745 l 344 686 l 325 686 q 263 674 284 686 q 242 628 242 662 q 246 600 242 616 q 253 568 249 584 l 319 335 q 333 280 326 310 q 347 220 340 250 q 359 165 353 191 q 368 122 364 139 l 372 122 q 381 163 375 139 q 394 213 387 186 q 411 268 402 240 q 429 320 420 295 l 573 741 l 661 741 m 403 956 q 408 992 403 977 q 423 1016 413 1007 q 445 1029 432 1025 q 473 1034 458 1034 q 501 1029 488 1034 q 524 1016 514 1025 q 539 992 533 1007 q 544 956 544 977 q 539 920 544 934 q 524 895 533 905 q 501 882 514 886 q 473 878 488 878 q 423 895 443 878 q 403 956 403 913 m 667 956 q 672 992 667 977 q 687 1016 677 1007 q 709 1029 696 1025 q 737 1034 722 1034 q 765 1029 752 1034 q 788 1016 778 1025 q 803 992 797 1007 q 808 956 808 977 q 803 920 808 934 q 788 895 797 905 q 765 882 778 886 q 737 878 752 878 q 687 895 707 878 q 667 956 667 913 "},"К":{"x_min":52.421875,"x_max":952,"ha":973,"o":"m 919 912 q 913 876 919 892 q 898 848 908 860 q 877 829 889 836 q 851 818 865 821 q 843 848 849 834 q 827 873 836 863 q 802 890 817 884 q 770 896 788 896 q 692 857 729 896 q 612 733 655 817 q 574 658 590 690 q 543 600 557 625 q 515 558 528 576 q 486 525 502 539 q 548 515 522 524 q 594 492 575 507 q 630 455 614 477 q 661 404 645 433 l 791 169 q 862 84 824 110 q 947 58 901 58 l 952 58 l 952 0 l 932 0 q 821 5 865 0 q 747 25 777 11 q 696 66 717 40 q 654 132 675 92 l 527 377 q 495 427 511 408 q 458 456 479 446 q 405 469 437 466 q 324 472 373 472 l 324 159 q 333 106 324 126 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 834 324 866 l 324 531 q 377 533 357 531 q 411 540 397 535 q 432 554 424 545 q 450 572 441 562 q 493 646 467 594 q 558 773 519 697 q 611 867 584 826 q 667 938 638 909 q 731 984 697 968 q 806 1000 765 1000 q 858 993 836 1000 q 893 974 880 986 q 912 947 906 963 q 919 912 919 930 "},"Γ":{"x_min":52.421875,"x_max":751,"ha":779,"o":"m 484 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 742 992 l 751 749 l 679 749 l 673 797 q 663 850 670 827 q 641 889 656 873 q 600 914 626 905 q 534 922 575 922 l 324 922 l 324 152 q 333 103 324 122 q 358 74 342 84 q 394 61 373 64 q 438 58 415 58 l 484 58 l 484 0 "},"P":{"x_min":52.421875,"x_max":785,"ha":839,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 442 992 q 594 971 530 992 q 701 913 659 951 q 764 822 743 876 q 785 700 785 768 q 765 580 785 637 q 702 479 746 523 q 586 409 657 435 q 412 382 515 382 l 324 382 l 324 150 q 333 101 324 120 q 358 73 342 83 q 394 61 373 64 q 438 58 415 58 l 484 58 l 484 0 l 52 0 m 324 452 l 397 452 q 504 465 459 452 q 576 507 548 478 q 617 583 604 536 q 631 694 631 629 q 619 795 631 752 q 582 866 608 838 q 516 909 557 895 q 417 922 476 922 l 324 922 l 324 452 "},"%":{"x_min":62,"x_max":1183,"ha":1245,"o":"m 518 698 q 503 572 518 629 q 461 474 489 515 q 389 411 432 433 q 290 389 347 389 q 187 411 230 389 q 116 474 144 433 q 75 572 88 515 q 62 698 62 629 q 75 825 62 768 q 116 922 88 881 q 187 984 144 962 q 291 1006 230 1006 q 390 984 348 1006 q 461 922 433 962 q 503 825 489 881 q 518 698 518 768 m 188 699 q 193 605 188 646 q 211 535 198 564 q 242 492 223 506 q 290 477 262 477 q 338 492 319 477 q 369 535 358 506 q 386 605 381 564 q 391 699 391 646 q 386 791 391 751 q 369 860 381 832 q 339 903 358 888 q 292 917 320 917 q 243 903 263 917 q 211 860 223 888 q 193 791 198 832 q 188 699 188 751 m 1183 295 q 1168 168 1183 225 q 1126 70 1154 111 q 1054 8 1097 30 q 955 -14 1012 -14 q 851 8 895 -14 q 780 70 808 30 q 740 168 753 111 q 727 295 727 225 q 740 422 727 365 q 781 519 753 478 q 852 581 809 559 q 956 603 895 603 q 1055 581 1013 603 q 1126 519 1098 559 q 1168 422 1154 478 q 1183 295 1183 365 m 853 296 q 858 202 853 243 q 876 132 863 161 q 907 89 888 103 q 956 74 927 74 q 1004 89 984 74 q 1035 132 1023 103 q 1051 202 1046 161 q 1056 296 1056 243 q 1051 388 1056 348 q 1035 457 1046 429 q 1004 500 1023 485 q 957 514 985 514 q 908 500 928 514 q 876 457 889 485 q 858 388 863 429 q 853 296 853 348 m 417 0 l 326 0 l 822 992 l 913 992 l 417 0 "},"ϖ":{"x_min":44.40625,"x_max":1245.96875,"ha":1291,"o":"m 848 -14 q 781 -3 812 -14 q 726 26 751 7 q 684 72 702 45 q 656 129 666 98 l 651 129 q 623 72 640 98 q 580 26 605 45 q 525 -3 556 7 q 459 -14 495 -14 q 350 4 399 -14 q 267 63 301 22 q 215 167 233 103 q 197 324 197 232 q 224 504 197 420 q 295 656 251 587 l 209 656 q 158 647 178 656 q 125 621 137 637 q 107 583 112 605 q 102 538 102 562 l 44 538 q 57 641 44 601 q 93 703 70 681 q 150 735 116 725 q 223 745 183 745 l 1080 745 q 1131 754 1111 745 q 1164 779 1152 763 q 1182 817 1177 795 q 1187 863 1187 838 l 1245 863 q 1233 759 1245 799 q 1196 697 1220 718 q 1140 666 1173 676 q 1066 656 1106 656 l 1012 656 q 1083 504 1056 587 q 1111 324 1111 421 q 1092 167 1111 232 q 1040 63 1074 103 q 957 4 1005 22 q 848 -14 908 -14 m 397 656 q 348 504 365 585 q 331 322 331 424 q 343 199 331 248 q 375 120 355 149 q 423 78 396 90 q 480 65 450 65 q 538 76 513 65 q 579 106 562 86 q 606 153 596 126 q 622 215 616 181 q 610 248 616 229 q 600 288 605 267 q 592 332 595 309 q 589 375 589 354 q 607 448 589 426 q 653 471 626 471 q 699 448 681 471 q 717 375 717 426 q 714 332 717 354 q 706 288 710 309 q 695 248 701 267 q 685 215 690 229 q 701 153 690 181 q 728 106 711 126 q 769 76 745 86 q 827 65 794 65 q 884 78 857 65 q 931 120 911 90 q 964 199 952 149 q 976 322 976 248 q 958 504 976 424 q 910 656 940 585 l 397 656 "},"_":{"x_min":-7,"x_max":645,"ha":638,"o":"m 645 -197 l -7 -197 l -7 -115 l 645 -115 l 645 -197 "},"ñ":{"x_min":38.53125,"x_max":857.234375,"ha":896,"o":"m 412 58 l 412 0 l 38 0 l 38 58 l 50 58 q 94 61 73 58 q 130 75 115 65 q 154 105 145 86 q 164 158 164 125 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 271 745 l 289 631 l 296 631 q 341 695 317 670 q 392 733 366 720 q 449 752 419 747 q 513 758 479 758 q 610 742 567 758 q 684 693 653 726 q 730 608 714 660 q 746 486 746 557 l 746 157 q 753 105 746 125 q 775 75 761 86 q 809 61 790 65 q 852 58 829 58 l 857 58 l 857 0 l 615 0 l 615 479 q 606 560 615 524 q 580 619 598 595 q 533 656 562 644 q 462 669 504 669 q 383 650 415 669 q 331 601 351 632 q 303 529 311 570 q 294 444 294 488 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 412 58 m 570 932 q 603 938 591 932 q 623 954 616 944 q 633 978 630 965 q 638 1006 636 991 l 701 1006 q 689 944 698 974 q 663 892 680 915 q 619 855 645 869 q 555 842 592 842 q 487 855 518 842 q 431 885 457 869 q 382 916 405 902 q 337 929 360 929 q 304 923 316 929 q 285 907 292 917 q 274 883 278 897 q 269 856 271 870 l 207 856 q 218 917 209 887 q 245 969 227 946 q 290 1006 263 992 q 354 1020 316 1020 q 421 1006 391 1020 q 477 976 451 992 q 526 945 503 959 q 570 932 549 932 "},"Ŕ":{"x_min":52.421875,"x_max":920,"ha":911,"o":"m 770 168 q 838 85 805 113 q 915 58 871 58 l 920 58 l 920 0 l 900 0 q 793 4 835 0 q 722 22 751 9 q 672 60 693 36 q 628 123 651 84 l 439 433 l 324 433 l 324 150 q 333 101 324 120 q 358 73 342 83 q 394 61 373 64 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 426 992 q 695 924 607 992 q 784 722 784 857 q 765 624 784 666 q 718 551 747 582 q 652 500 689 520 q 579 467 616 479 l 770 168 m 324 503 l 420 503 q 521 516 480 503 q 585 556 561 529 q 619 624 609 583 q 630 718 630 664 q 618 812 630 773 q 581 875 607 851 q 516 911 556 900 q 417 922 475 922 l 324 922 l 324 503 m 355 1089 q 387 1134 370 1108 q 419 1187 403 1160 q 450 1242 435 1215 q 475 1293 464 1269 l 624 1293 l 624 1278 q 586 1233 611 1260 q 530 1175 560 1205 q 467 1118 500 1146 q 407 1071 435 1089 l 355 1071 l 355 1089 "},"‚":{"x_min":41,"x_max":269,"ha":347,"o":"m 269 58 q 256 -27 269 14 q 217 -104 244 -68 q 146 -167 189 -139 q 41 -214 103 -195 l 41 -155 q 141 -102 109 -133 q 173 -30 173 -71 q 165 -7 173 -17 q 147 8 158 1 q 122 22 135 15 q 98 38 109 29 q 79 61 86 48 q 72 96 72 75 q 98 157 72 136 q 162 179 124 179 q 203 171 184 179 q 237 148 222 163 q 260 110 252 132 q 269 58 269 87 "},"⅞":{"x_min":80,"x_max":1089,"ha":1167,"o":"m 190 399 l 419 904 l 181 904 q 148 895 158 904 q 135 864 137 885 l 130 819 l 80 819 l 84 992 l 500 992 l 500 925 l 280 399 l 190 399 m 314 0 l 222 0 l 718 992 l 809 992 l 314 0 m 642 152 q 652 202 642 181 q 681 240 663 223 q 725 270 700 257 q 780 294 751 283 q 735 322 757 306 q 696 357 712 337 q 669 402 679 377 q 660 457 660 427 q 671 511 660 484 q 707 559 682 537 q 772 593 732 580 q 870 607 813 607 q 951 597 915 607 q 1012 569 987 588 q 1051 525 1037 551 q 1065 466 1065 499 q 1055 420 1065 441 q 1029 382 1046 399 q 991 351 1013 364 q 945 327 969 337 q 1005 296 978 312 q 1050 260 1032 280 q 1079 215 1069 240 q 1089 158 1089 190 q 1074 92 1089 122 q 1032 38 1060 61 q 960 2 1003 15 q 861 -10 917 -10 q 765 2 806 -10 q 697 37 724 15 q 655 89 669 59 q 642 152 642 118 m 871 44 q 945 69 918 44 q 973 137 973 93 q 939 212 973 181 q 836 267 904 242 q 783 219 804 250 q 762 147 762 187 q 769 107 762 126 q 790 74 776 89 q 824 52 804 60 q 871 44 844 44 m 949 463 q 944 496 949 480 q 928 524 939 512 q 901 544 917 537 q 863 552 885 552 q 801 529 822 552 q 780 470 780 505 q 789 429 780 447 q 814 397 798 411 q 848 373 829 383 q 888 355 867 363 q 933 397 916 371 q 949 463 949 423 "},"Æ":{"x_min":0,"x_max":1263,"ha":1321,"o":"m 780 69 l 1048 69 q 1105 78 1081 69 q 1144 103 1128 87 q 1168 139 1159 118 q 1181 183 1177 160 l 1191 243 l 1263 243 l 1252 0 l 508 0 l 508 58 l 526 58 q 569 61 549 58 q 605 73 589 64 q 629 102 620 83 q 640 151 639 121 l 640 332 l 321 332 l 244 186 q 227 144 232 164 q 222 112 222 125 q 244 71 222 84 q 306 58 265 58 l 337 58 l 337 0 l 0 0 l 0 58 l 22 58 q 87 84 59 58 q 146 166 116 109 l 547 926 l 438 933 l 438 992 l 1209 992 l 1216 749 l 1144 749 l 1136 808 q 1126 852 1133 831 q 1104 887 1118 872 q 1067 912 1089 903 q 1014 922 1045 922 l 780 922 l 780 553 l 1116 553 l 1116 483 l 780 483 l 780 69 m 620 922 q 575 828 603 884 q 512 703 547 771 q 437 558 478 635 q 356 402 397 481 l 640 402 l 640 922 l 620 922 "},"₣":{"x_min":60.75,"x_max":727,"ha":777,"o":"m 60 0 l 60 58 l 79 58 q 122 61 102 58 q 159 73 143 64 q 183 101 174 82 q 193 149 193 119 l 193 248 l 64 248 l 64 318 l 193 318 l 193 839 q 183 888 193 869 q 159 917 174 907 q 122 930 143 927 q 79 933 102 933 l 60 933 l 60 992 l 720 992 l 727 749 l 655 749 l 647 808 q 637 853 645 832 q 615 889 630 873 q 578 913 601 904 q 525 922 556 922 l 333 922 l 333 521 l 644 521 l 644 451 l 333 451 l 333 318 l 527 318 l 527 248 l 333 248 l 333 155 q 342 104 333 124 q 366 75 351 85 q 403 61 382 64 q 447 58 424 58 l 493 58 l 493 0 l 60 0 "},"Ū":{"x_min":21.4375,"x_max":975.25,"ha":996,"o":"m 502 -14 q 355 3 420 -14 q 245 58 290 20 q 176 155 200 95 q 153 299 153 214 l 153 839 q 143 888 153 869 q 119 917 134 907 q 82 930 103 927 q 39 933 62 933 l 21 933 l 21 992 l 425 992 l 425 933 l 407 933 q 363 930 384 933 q 326 916 342 926 q 302 885 311 905 q 293 832 293 865 l 293 285 q 310 181 293 224 q 358 112 327 138 q 431 72 389 85 q 525 60 474 60 q 629 77 585 60 q 701 122 672 93 q 744 191 730 151 q 758 279 758 231 l 758 838 q 749 888 758 869 q 724 917 739 906 q 688 930 708 927 q 644 933 667 933 l 626 933 l 626 992 l 975 992 l 975 933 l 956 933 q 912 930 933 933 q 876 916 891 926 q 852 886 861 905 q 843 833 843 866 l 843 283 q 820 158 843 214 q 755 65 798 103 q 649 6 712 26 q 502 -14 585 -14 m 725 1071 l 322 1071 l 322 1153 l 725 1153 l 725 1071 "},"ы":{"x_min":31.75,"x_max":1102.015625,"ha":1148,"o":"m 427 745 l 427 686 l 408 686 q 365 683 385 686 q 328 669 344 679 q 304 640 313 659 q 294 591 294 622 l 294 414 l 387 414 q 510 406 452 414 q 612 377 568 399 q 682 316 656 355 q 709 212 709 276 q 691 127 709 166 q 637 60 673 88 q 548 15 602 31 q 421 0 494 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 31 686 l 31 745 l 427 745 m 397 63 q 477 72 444 63 q 532 100 511 81 q 564 149 554 119 q 574 222 574 179 q 525 325 574 294 q 388 355 477 355 l 294 355 l 294 63 l 397 63 m 1102 745 l 1102 686 l 1097 686 q 1054 683 1074 686 q 1017 670 1033 680 q 993 642 1002 660 q 984 593 984 623 l 984 151 q 993 102 984 120 q 1017 73 1002 83 q 1054 61 1033 64 q 1097 58 1074 58 l 1102 58 l 1102 0 l 735 0 l 735 58 l 739 58 q 783 61 762 58 q 819 73 803 64 q 843 102 834 83 q 853 151 853 120 l 853 591 q 843 640 853 622 q 819 669 834 659 q 783 683 803 679 q 739 686 762 686 l 735 686 l 735 745 l 1102 745 "},"ѓ":{"x_min":31.75,"x_max":608,"ha":636,"o":"m 608 745 l 608 527 l 549 527 l 541 574 q 529 628 537 606 q 511 662 522 650 q 483 681 499 675 q 441 686 466 686 l 294 686 l 294 152 q 304 102 294 121 q 328 74 313 83 q 365 61 344 64 q 408 58 385 58 l 440 58 l 440 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 31 686 l 31 745 l 608 745 m 239 860 q 271 905 254 879 q 303 958 287 931 q 334 1013 319 986 q 359 1064 348 1040 l 508 1064 l 508 1049 q 470 1004 495 1031 q 414 946 444 976 q 351 889 384 917 q 291 842 319 860 l 239 842 l 239 860 "},"Œ":{"x_min":78,"x_max":1274,"ha":1332,"o":"m 792 69 l 1060 69 q 1116 78 1093 69 q 1155 103 1139 87 q 1179 139 1170 118 q 1191 183 1188 160 l 1202 243 l 1274 243 l 1264 0 l 658 0 q 626 -5 644 -3 q 589 -10 608 -8 q 550 -12 569 -11 q 515 -14 531 -14 q 322 22 404 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 552 1006 533 1007 q 591 1003 572 1005 q 628 998 610 1001 q 660 992 646 995 l 1220 992 l 1227 749 l 1155 749 l 1148 808 q 1137 852 1145 831 q 1115 888 1130 873 q 1078 913 1100 904 q 1025 922 1056 922 l 792 922 l 792 553 l 1127 553 l 1127 483 l 792 483 l 792 69 m 515 60 q 590 66 556 60 q 652 81 624 72 l 652 908 q 590 926 624 920 q 516 932 557 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 "},"΅":{"x_min":187,"x_max":613,"ha":802,"o":"m 187 945 q 206 998 187 982 q 252 1015 225 1015 q 277 1010 265 1015 q 298 998 289 1006 q 312 977 307 989 q 318 945 318 964 q 298 892 318 909 q 252 876 278 876 q 206 892 225 876 q 187 945 187 909 m 483 945 q 501 998 483 982 q 548 1015 520 1015 q 572 1010 560 1015 q 593 998 584 1006 q 607 977 602 989 q 613 945 613 964 q 593 892 613 909 q 548 876 573 876 q 501 892 520 876 q 483 945 483 909 m 351 959 q 367 1004 359 978 q 384 1058 376 1030 q 398 1114 392 1086 q 408 1164 405 1141 l 533 1164 l 533 1150 q 513 1106 528 1133 q 479 1048 499 1079 q 437 990 458 1018 q 397 942 415 961 l 351 942 l 351 959 "},"Ą":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 m 633 -180 q 646 -118 633 -147 q 683 -65 660 -89 q 735 -24 706 -41 q 797 0 765 -7 l 876 0 q 831 -20 854 -6 q 790 -54 808 -34 q 759 -102 771 -75 q 746 -162 746 -129 q 754 -203 746 -186 q 774 -230 761 -220 q 804 -246 787 -241 q 843 -251 822 -251 q 883 -248 861 -251 q 931 -240 905 -245 l 931 -312 q 906 -321 920 -317 q 877 -328 892 -325 q 848 -332 862 -330 q 823 -334 834 -334 q 744 -324 779 -334 q 684 -297 709 -315 q 646 -249 659 -278 q 633 -180 633 -220 "},"Њ":{"x_min":52.421875,"x_max":1294,"ha":1348,"o":"m 992 992 l 992 933 l 975 933 q 932 930 952 933 q 895 918 911 927 q 870 891 880 909 q 861 846 861 874 l 861 548 l 921 548 q 1092 528 1021 548 q 1208 472 1163 508 q 1273 386 1253 436 q 1294 275 1294 335 q 1273 163 1294 214 q 1210 76 1252 113 q 1103 20 1168 40 q 951 0 1039 0 l 588 0 l 588 58 l 607 58 q 650 61 629 58 q 686 73 670 64 q 711 100 702 82 q 721 145 721 117 l 721 483 l 324 483 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 553 l 721 553 l 721 833 q 711 886 721 866 q 687 916 702 905 q 651 930 672 926 q 607 933 630 933 l 588 933 l 588 992 l 992 992 m 861 69 l 927 69 q 1025 81 985 69 q 1091 118 1066 94 q 1128 181 1117 143 q 1140 269 1140 218 q 1126 368 1140 327 q 1085 434 1113 408 q 1012 472 1056 460 q 906 483 968 483 l 861 483 l 861 69 "},"›":{"x_min":92,"x_max":373.75,"ha":463,"o":"m 373 352 l 161 111 l 92 111 l 232 375 l 92 639 l 161 639 l 373 397 l 373 352 "},"ћ":{"x_min":23.84375,"x_max":843.234375,"ha":882,"o":"m 398 58 l 398 0 l 25 0 l 25 58 l 36 58 q 80 61 59 58 q 116 75 101 65 q 140 106 131 86 q 150 158 150 126 l 150 830 l 23 830 l 23 889 l 150 889 l 150 902 q 140 951 150 933 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 25 996 l 25 1055 l 280 1055 l 280 889 l 518 889 l 518 830 l 280 830 l 280 726 q 280 684 280 706 q 278 645 279 663 q 275 603 276 624 l 282 603 q 486 730 344 730 q 591 714 545 730 q 668 665 637 698 q 715 580 699 632 q 732 458 732 529 l 732 157 q 740 105 732 125 q 762 75 748 86 q 796 61 776 65 q 839 58 816 58 l 843 58 l 843 0 l 601 0 l 601 451 q 592 532 601 496 q 566 591 584 567 q 519 628 548 616 q 448 641 490 641 q 373 625 405 641 q 321 579 342 609 q 291 508 301 550 q 280 416 280 466 l 280 151 q 290 102 280 120 q 314 73 299 83 q 351 61 330 64 q 394 58 371 58 l 398 58 "},"<":{"x_min":90,"x_max":687,"ha":777,"o":"m 90 471 l 90 520 l 687 841 l 687 748 l 219 495 l 687 244 l 687 152 l 90 471 "},"¬":{"x_min":90,"x_max":687,"ha":777,"o":"m 687 538 l 687 171 l 604 171 l 604 455 l 90 455 l 90 538 l 687 538 "},"t":{"x_min":26.203125,"x_max":457.546875,"ha":489,"o":"m 368 55 q 414 57 393 55 q 457 64 435 60 l 457 6 q 434 -1 448 2 q 403 -7 420 -5 q 368 -12 387 -10 q 334 -14 350 -14 q 243 -2 281 -14 q 180 33 204 8 q 143 100 155 58 q 132 201 132 141 l 132 665 l 26 665 l 26 721 q 81 731 51 721 q 134 765 111 741 q 173 826 158 791 q 198 916 187 862 l 262 916 l 262 745 l 444 745 l 444 665 l 262 665 l 262 193 q 291 88 262 122 q 368 55 320 55 "},"Ц":{"x_min":52.421875,"x_max":1017,"ha":1060,"o":"m 945 -292 q 931 -159 945 -214 q 889 -68 916 -104 q 823 -16 862 -33 q 733 0 783 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 74 134 64 q 174 103 165 84 q 184 152 184 122 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 69 l 734 69 l 734 833 q 725 886 734 866 q 701 916 716 905 q 665 930 685 926 q 620 933 644 933 l 603 933 l 603 992 l 1007 992 l 1007 933 l 988 933 q 945 930 965 933 q 908 918 924 927 q 884 889 893 908 q 875 840 875 871 l 875 158 q 884 105 875 125 q 908 75 893 86 q 944 61 923 65 q 989 58 966 58 l 1017 58 l 1017 -292 l 945 -292 "},"ù":{"x_min":31.984375,"x_max":850.015625,"ha":882,"o":"m 732 151 q 741 102 732 120 q 765 73 750 83 q 802 61 781 64 q 845 58 822 58 l 850 58 l 850 0 l 629 0 l 611 112 l 604 112 q 558 48 583 72 q 504 10 532 24 q 444 -8 475 -3 q 379 -14 413 -14 q 281 1 324 -14 q 209 50 238 17 q 165 135 180 83 q 150 258 150 186 l 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 l 280 264 q 288 184 280 219 q 311 124 295 148 q 356 87 328 99 q 426 74 384 74 q 505 91 472 74 q 559 136 538 107 q 590 207 580 166 q 601 299 601 249 l 601 586 q 591 638 601 618 q 567 669 582 658 q 531 683 552 679 q 487 686 510 686 l 483 686 l 483 745 l 732 745 l 732 151 m 483 842 l 430 842 q 369 889 402 860 q 306 946 337 917 q 250 1004 276 976 q 213 1049 225 1031 l 213 1064 l 361 1064 q 387 1013 372 1040 q 417 958 401 986 q 451 905 434 931 q 483 860 468 879 l 483 842 "},"ï":{"x_min":13,"x_max":427.15625,"ha":444,"o":"m 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 294 745 l 294 158 q 304 105 294 125 q 328 75 313 86 q 364 61 343 65 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 m 13 956 q 18 992 13 977 q 33 1016 23 1007 q 55 1029 42 1025 q 83 1034 68 1034 q 111 1029 98 1034 q 134 1016 124 1025 q 149 992 143 1007 q 154 956 154 977 q 149 920 154 934 q 134 895 143 905 q 111 882 124 886 q 83 878 98 878 q 33 895 53 878 q 13 956 13 913 m 277 956 q 282 992 277 977 q 297 1016 287 1007 q 319 1029 306 1025 q 347 1034 332 1034 q 375 1029 362 1034 q 398 1016 388 1025 q 413 992 407 1007 q 418 956 418 977 q 413 920 418 934 q 398 895 407 905 q 375 882 388 886 q 347 878 362 878 q 297 895 317 878 q 277 956 277 913 "},"Ф":{"x_min":46,"x_max":1015,"ha":1065,"o":"m 604 255 l 634 255 q 738 270 695 255 q 808 317 781 286 q 848 397 835 349 q 861 510 861 445 q 850 612 861 568 q 814 688 838 657 q 750 735 789 719 q 654 750 710 750 l 604 750 l 604 255 m 331 0 l 331 58 l 350 58 q 394 61 373 58 q 430 75 415 65 q 454 105 445 86 q 464 158 464 125 l 464 186 l 417 186 q 295 198 349 186 q 199 234 240 211 q 128 288 157 257 q 81 357 99 320 q 54 434 62 393 q 46 515 46 474 q 66 639 46 583 q 129 735 86 695 q 235 797 171 775 q 387 820 299 820 l 464 820 l 464 834 q 454 886 464 866 q 430 916 445 905 q 394 930 415 926 q 350 933 373 933 l 331 933 l 331 992 l 735 992 l 735 933 l 718 933 q 673 930 694 933 q 637 916 653 926 q 613 886 622 905 q 604 834 604 866 l 604 820 l 679 820 q 828 797 765 820 q 933 735 891 775 q 994 639 974 695 q 1015 515 1015 583 q 1006 434 1015 474 q 980 357 998 393 q 933 288 962 320 q 864 234 905 257 q 770 198 823 211 q 649 186 717 186 l 604 186 l 604 158 q 613 105 604 125 q 637 75 622 86 q 673 61 653 65 q 718 58 694 58 l 735 58 l 735 0 l 331 0 m 464 750 l 411 750 q 313 735 353 750 q 248 688 273 719 q 211 612 222 657 q 199 510 199 568 q 212 397 199 445 q 254 317 226 349 q 326 270 282 286 q 432 255 370 255 l 464 255 l 464 750 "},"Ò":{"x_min":78,"x_max":952,"ha":1031,"o":"m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 m 584 1071 l 531 1071 q 470 1118 503 1089 q 407 1175 438 1146 q 351 1233 377 1205 q 314 1278 326 1260 l 314 1293 l 462 1293 q 488 1242 473 1269 q 518 1187 502 1215 q 552 1134 535 1160 q 584 1089 569 1108 l 584 1071 "},"I":{"x_min":52.421875,"x_max":456.640625,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 "},"˝":{"x_min":142,"x_max":660,"ha":802,"o":"m 142 842 l 142 860 q 172 908 156 882 q 204 961 188 934 q 235 1014 220 988 q 260 1064 249 1040 l 409 1064 l 409 1049 q 388 1021 401 1037 q 358 985 375 1004 q 321 946 341 966 q 282 907 302 926 q 244 871 262 888 q 209 842 225 854 l 142 842 m 393 842 l 393 860 q 423 908 407 882 q 455 961 439 934 q 486 1014 471 988 q 511 1064 500 1040 l 660 1064 l 660 1049 q 639 1021 652 1037 q 609 985 626 1004 q 572 946 592 966 q 533 907 553 926 q 495 871 513 888 q 460 842 476 854 l 393 842 "},"·":{"x_min":113,"x_max":288,"ha":397,"o":"m 113 494 q 119 540 113 521 q 138 569 126 558 q 166 584 150 580 q 200 589 182 589 q 234 584 218 589 q 261 569 250 580 q 280 540 273 558 q 288 494 288 521 q 280 449 288 467 q 261 420 273 431 q 234 404 250 409 q 200 400 218 400 q 166 404 182 400 q 138 420 150 409 q 119 449 126 431 q 113 494 113 467 "},"¿":{"x_min":71,"x_max":635,"ha":695,"o":"m 367 462 l 426 462 l 426 251 q 321 194 363 227 q 253 125 278 162 q 216 47 227 87 q 205 -35 205 6 q 214 -100 205 -71 q 242 -150 223 -129 q 290 -183 261 -171 q 360 -194 319 -194 q 434 -180 404 -194 q 482 -141 464 -166 q 509 -85 501 -117 q 517 -17 517 -53 q 564 -22 543 -17 q 601 -39 586 -28 q 626 -68 617 -51 q 635 -107 635 -84 q 619 -169 635 -140 q 572 -218 604 -197 q 491 -251 540 -239 q 375 -264 442 -264 q 254 -247 309 -264 q 157 -197 198 -230 q 94 -118 117 -165 q 71 -12 71 -72 q 90 91 71 44 q 148 177 110 138 q 241 247 186 215 q 367 305 296 278 l 367 462 m 472 656 q 465 611 472 629 q 446 582 458 593 q 418 566 434 571 q 384 562 402 562 q 350 566 366 562 q 323 582 334 571 q 304 611 311 593 q 297 656 297 629 q 304 701 297 683 q 323 730 311 719 q 350 746 334 741 q 384 751 366 751 q 418 746 402 751 q 446 730 434 741 q 465 701 458 719 q 472 656 472 683 "},"ſ":{"x_min":18.421875,"x_max":590,"ha":493,"o":"m 18 0 l 18 58 l 36 58 q 80 61 59 58 q 116 75 101 65 q 140 105 131 86 q 150 158 150 125 l 150 814 q 166 924 150 876 q 216 1004 183 971 q 293 1053 248 1036 q 396 1070 339 1070 q 487 1063 450 1070 q 547 1045 524 1056 q 580 1016 570 1033 q 590 978 590 1000 q 558 920 590 940 q 476 900 526 900 q 471 941 476 921 q 456 977 467 961 q 428 1002 446 992 q 384 1011 411 1011 q 303 965 325 1011 q 280 831 280 919 l 280 158 q 289 106 280 125 q 314 75 298 86 q 350 61 329 65 q 394 58 371 58 l 447 58 l 447 0 l 18 0 "},"Ђ":{"x_min":28,"x_max":991,"ha":1061,"o":"m 991 308 q 973 159 991 219 q 920 64 955 99 q 837 14 886 29 q 724 0 787 0 l 692 0 l 692 65 l 712 65 q 771 76 745 65 q 814 115 797 87 q 841 188 832 142 q 850 302 850 234 q 836 415 850 372 q 797 483 822 459 q 737 516 772 507 q 660 525 702 525 q 601 522 630 525 q 547 514 572 518 q 501 503 521 509 q 466 492 480 497 l 466 158 q 475 105 466 125 q 499 75 484 86 q 536 61 515 65 q 580 58 557 58 l 598 58 l 598 0 l 180 0 l 180 58 l 212 58 q 255 61 235 58 q 292 73 276 64 q 316 102 307 83 q 326 151 326 120 l 326 922 l 221 922 q 169 913 190 922 q 136 888 149 904 q 116 852 122 873 q 107 808 110 831 l 99 749 l 28 749 l 34 992 l 758 992 l 765 749 l 693 749 l 686 808 q 676 852 683 831 q 657 888 670 873 q 623 913 644 904 q 570 922 602 922 l 466 922 l 466 568 q 505 582 482 575 q 554 595 527 589 q 611 604 580 600 q 675 609 642 609 q 810 594 751 609 q 909 545 869 580 q 970 453 949 511 q 991 308 991 395 "},"ű":{"x_min":31.984375,"x_max":850.015625,"ha":882,"o":"m 732 151 q 741 102 732 120 q 765 73 750 83 q 802 61 781 64 q 845 58 822 58 l 850 58 l 850 0 l 629 0 l 611 112 l 604 112 q 558 48 583 72 q 504 10 532 24 q 444 -8 475 -3 q 379 -14 413 -14 q 281 1 324 -14 q 209 50 238 17 q 165 135 180 83 q 150 258 150 186 l 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 l 280 264 q 288 184 280 219 q 311 124 295 148 q 356 87 328 99 q 426 74 384 74 q 505 91 472 74 q 559 136 538 107 q 590 207 580 166 q 601 299 601 249 l 601 586 q 591 638 601 618 q 567 669 582 658 q 531 683 552 679 q 487 686 510 686 l 483 686 l 483 745 l 732 745 l 732 151 m 229 842 l 229 860 q 259 908 243 882 q 291 961 275 934 q 322 1014 307 988 q 347 1064 336 1040 l 496 1064 l 496 1049 q 475 1021 488 1037 q 445 985 462 1004 q 408 946 428 966 q 369 907 389 926 q 331 871 349 888 q 296 842 312 854 l 229 842 m 480 842 l 480 860 q 510 908 494 882 q 542 961 526 934 q 573 1014 558 988 q 598 1064 587 1040 l 747 1064 l 747 1049 q 726 1021 739 1037 q 696 985 713 1004 q 659 946 679 966 q 620 907 640 926 q 582 871 600 888 q 547 842 563 854 l 480 842 "},"Ǽ":{"x_min":0,"x_max":1263,"ha":1321,"o":"m 780 69 l 1048 69 q 1105 78 1081 69 q 1144 103 1128 87 q 1168 139 1159 118 q 1181 183 1177 160 l 1191 243 l 1263 243 l 1252 0 l 508 0 l 508 58 l 526 58 q 569 61 549 58 q 605 73 589 64 q 629 102 620 83 q 640 151 639 121 l 640 332 l 321 332 l 244 186 q 227 144 232 164 q 222 112 222 125 q 244 71 222 84 q 306 58 265 58 l 337 58 l 337 0 l 0 0 l 0 58 l 22 58 q 87 84 59 58 q 146 166 116 109 l 547 926 l 438 933 l 438 992 l 1209 992 l 1216 749 l 1144 749 l 1136 808 q 1126 852 1133 831 q 1104 887 1118 872 q 1067 912 1089 903 q 1014 922 1045 922 l 780 922 l 780 553 l 1116 553 l 1116 483 l 780 483 l 780 69 m 620 922 q 575 828 603 884 q 512 703 547 771 q 437 558 478 635 q 356 402 397 481 l 640 402 l 640 922 l 620 922 m 728 1089 q 760 1134 743 1108 q 792 1187 776 1160 q 823 1242 808 1215 q 848 1293 837 1269 l 997 1293 l 997 1278 q 959 1233 984 1260 q 903 1175 933 1205 q 840 1118 873 1146 q 780 1071 808 1089 l 728 1071 l 728 1089 "},"φ":{"x_min":77,"x_max":892,"ha":968,"o":"m 892 373 q 798 92 892 188 q 526 -12 705 -3 l 526 -334 l 443 -334 l 443 -12 q 289 18 356 -7 q 174 92 221 44 q 102 210 127 140 q 77 373 77 280 q 169 653 77 558 q 443 757 262 748 l 443 1055 l 526 1055 l 526 757 q 679 726 611 752 q 794 652 746 700 q 866 535 841 605 q 892 373 892 466 m 211 374 q 224 245 211 301 q 264 149 236 188 q 335 86 291 109 q 443 57 379 63 l 443 687 q 335 660 379 682 q 264 598 291 637 q 224 503 236 559 q 211 374 211 447 m 757 374 q 744 502 757 446 q 704 597 731 558 q 632 658 677 636 q 526 686 588 680 l 526 57 q 633 86 589 63 q 705 149 677 109 q 744 245 732 188 q 757 374 757 301 "},";":{"x_min":41,"x_max":269,"ha":347,"o":"m 269 58 q 256 -27 269 14 q 217 -104 244 -68 q 146 -167 189 -139 q 41 -214 103 -195 l 41 -155 q 141 -102 109 -133 q 173 -30 173 -71 q 165 -7 173 -17 q 147 8 158 1 q 122 22 135 15 q 98 38 109 29 q 79 61 86 48 q 72 96 72 75 q 98 157 72 136 q 162 179 124 179 q 203 171 184 179 q 237 148 222 163 q 260 110 252 132 q 269 58 269 87 m 88 656 q 94 701 88 683 q 113 730 101 719 q 141 746 125 741 q 175 751 157 751 q 209 746 193 751 q 236 730 225 741 q 255 701 248 719 q 263 656 263 683 q 255 612 263 630 q 236 582 248 593 q 209 566 225 571 q 175 562 193 562 q 141 566 157 562 q 113 582 125 571 q 94 612 101 593 q 88 656 88 630 "},"Ș":{"x_min":66,"x_max":685,"ha":756,"o":"m 342 -14 q 223 0 275 -14 q 136 39 171 14 q 83 101 101 65 q 66 181 66 137 q 92 249 66 223 q 166 275 118 275 q 179 192 168 231 q 212 121 190 152 q 268 73 234 91 q 349 55 301 55 q 493 100 441 55 q 544 230 544 145 q 533 297 544 267 q 498 351 523 326 q 433 398 473 375 q 333 446 393 421 q 222 502 269 472 q 143 569 175 532 q 97 652 112 606 q 82 754 82 697 q 104 860 82 814 q 168 939 127 907 q 264 989 208 972 q 386 1006 320 1006 q 496 993 448 1006 q 578 958 544 980 q 628 908 611 936 q 646 850 646 880 q 616 782 646 805 q 536 760 587 760 q 529 824 536 792 q 504 880 521 855 q 457 921 486 905 q 386 936 428 936 q 317 925 347 936 q 265 893 286 914 q 233 843 244 873 q 222 778 222 814 q 232 705 222 737 q 268 648 243 674 q 333 600 293 623 q 432 553 373 577 q 539 500 492 528 q 618 438 585 472 q 667 361 650 403 q 685 265 685 318 q 660 147 685 199 q 592 59 636 95 q 484 4 547 23 q 342 -14 420 -14 m 283 -288 q 305 -188 294 -242 q 325 -85 316 -135 l 446 -85 l 446 -98 q 422 -147 436 -120 q 393 -202 409 -174 q 361 -258 377 -231 q 330 -307 344 -285 l 283 -307 l 283 -288 "},"Ġ":{"x_min":79,"x_max":965.046875,"ha":992,"o":"m 556 -14 q 345 22 435 -14 q 196 126 256 59 q 108 288 137 193 q 79 497 79 382 q 109 703 79 609 q 202 864 140 796 q 354 968 263 931 q 565 1006 445 1006 q 700 994 642 1006 q 795 961 757 982 q 853 911 834 940 q 872 850 872 883 q 861 809 872 827 q 834 779 851 791 q 793 759 817 766 q 743 753 770 753 q 733 817 743 785 q 702 874 724 848 q 645 915 680 899 q 559 931 610 931 q 409 902 471 931 q 307 817 346 873 q 250 680 268 762 q 232 494 232 599 q 251 309 232 390 q 310 173 269 228 q 418 89 352 117 q 579 60 484 60 q 656 64 619 60 q 723 77 694 68 l 723 302 q 714 352 723 333 q 689 380 705 371 q 653 394 674 390 q 609 397 632 397 l 604 397 l 604 456 l 965 456 l 965 397 l 959 397 q 922 394 939 397 q 891 380 904 390 q 871 350 878 370 q 864 297 864 330 l 864 49 q 720 1 794 17 q 556 -14 646 -14 m 480 1199 q 486 1240 480 1223 q 503 1266 492 1256 q 528 1280 513 1276 q 559 1285 542 1285 q 590 1280 575 1285 q 615 1266 604 1276 q 632 1240 626 1256 q 639 1199 639 1223 q 632 1158 639 1174 q 615 1132 626 1142 q 590 1117 604 1121 q 559 1113 575 1113 q 528 1117 542 1113 q 503 1132 513 1121 q 486 1158 492 1142 q 480 1199 480 1174 "},"6":{"x_min":85,"x_max":706,"ha":777,"o":"m 447 936 q 288 834 342 936 q 226 530 234 732 q 264 557 243 544 q 309 580 285 571 q 363 596 334 590 q 426 603 392 603 q 541 583 490 603 q 630 526 593 563 q 686 437 666 490 q 706 317 706 384 q 685 183 706 244 q 627 78 665 122 q 533 10 589 34 q 407 -14 478 -14 q 279 14 338 -14 q 176 105 220 43 q 109 265 133 167 q 85 499 85 362 q 94 628 85 565 q 124 748 104 691 q 173 851 144 804 q 244 933 203 899 q 335 987 284 968 q 447 1006 386 1006 q 549 993 505 1006 q 620 961 592 981 q 663 914 649 940 q 677 860 677 888 q 649 798 677 820 q 570 777 622 777 q 564 839 570 810 q 542 890 557 868 q 504 924 527 912 q 447 936 481 936 m 399 533 q 346 526 371 533 q 298 508 321 519 q 258 482 276 497 q 225 453 239 467 q 240 274 226 348 q 277 153 253 200 q 335 84 301 106 q 411 62 369 62 q 526 120 486 62 q 565 305 565 179 q 522 479 565 424 q 399 533 480 533 "},"n":{"x_min":38.53125,"x_max":857.234375,"ha":896,"o":"m 412 58 l 412 0 l 38 0 l 38 58 l 50 58 q 94 61 73 58 q 130 75 115 65 q 154 105 145 86 q 164 158 164 125 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 271 745 l 289 631 l 296 631 q 341 695 317 670 q 392 733 366 720 q 449 752 419 747 q 513 758 479 758 q 610 742 567 758 q 684 693 653 726 q 730 608 714 660 q 746 486 746 557 l 746 157 q 753 105 746 125 q 775 75 761 86 q 809 61 790 65 q 852 58 829 58 l 857 58 l 857 0 l 615 0 l 615 479 q 606 560 615 524 q 580 619 598 595 q 533 656 562 644 q 462 669 504 669 q 383 650 415 669 q 331 601 351 632 q 303 529 311 570 q 294 444 294 488 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 412 58 "},"ά":{"x_min":77,"x_max":827.46875,"ha":848,"o":"m 710 0 q 652 12 676 0 q 612 43 628 24 q 588 86 597 62 q 576 134 579 110 l 571 134 q 535 75 555 102 q 490 28 515 48 q 431 -2 464 8 q 358 -14 399 -14 q 237 8 290 -14 q 149 78 185 31 q 95 198 113 125 q 77 370 77 270 q 98 544 77 471 q 159 665 120 617 q 255 735 199 712 q 379 758 311 758 q 452 747 420 758 q 510 717 485 736 q 555 671 536 698 q 587 612 573 644 l 596 612 q 625 684 607 648 q 664 745 643 719 l 738 745 q 725 691 732 724 q 713 620 718 658 q 705 543 708 582 q 702 470 702 504 l 702 187 q 731 91 702 125 q 815 58 761 58 l 827 58 l 827 0 l 710 0 m 383 74 q 473 101 437 74 q 531 176 509 128 q 562 288 552 224 q 571 427 571 352 l 571 481 q 544 566 561 531 q 504 624 527 602 q 454 658 481 647 q 397 669 426 669 q 256 593 300 669 q 211 367 211 517 q 251 147 211 220 q 383 74 291 74 m 359 860 q 375 904 367 878 q 391 958 384 930 q 406 1013 399 986 q 416 1064 412 1041 l 541 1064 l 541 1049 q 521 1006 536 1033 q 487 949 507 979 q 444 890 466 919 q 404 842 422 861 l 359 842 l 359 860 "},"ϊ":{"x_min":4,"x_max":461.53125,"ha":464,"o":"m 266 745 l 266 193 q 295 88 266 122 q 372 55 324 55 q 418 57 397 55 q 461 64 439 60 l 461 6 q 438 -1 452 2 q 407 -7 424 -5 q 372 -12 391 -10 q 338 -14 354 -14 q 247 -2 285 -14 q 184 33 208 8 q 147 100 159 58 q 136 201 136 141 l 136 745 l 266 745 m 4 956 q 9 992 4 977 q 24 1016 14 1007 q 46 1029 33 1025 q 74 1034 59 1034 q 102 1029 89 1034 q 125 1016 115 1025 q 140 992 134 1007 q 145 956 145 977 q 140 920 145 934 q 125 895 134 905 q 102 882 115 886 q 74 878 89 878 q 24 895 44 878 q 4 956 4 913 m 268 956 q 273 992 268 977 q 288 1016 278 1007 q 310 1029 297 1025 q 338 1034 323 1034 q 366 1029 353 1034 q 389 1016 379 1025 q 404 992 398 1007 q 409 956 409 977 q 404 920 409 934 q 389 895 398 905 q 366 882 379 886 q 338 878 353 878 q 288 895 308 878 q 268 956 268 913 "},"":{"x_min":0,"x_max":0,"ha":0},"ģ":{"x_min":32,"x_max":731,"ha":747,"o":"m 731 715 q 726 687 731 700 q 713 664 722 674 q 690 648 704 654 q 657 643 676 643 q 655 658 657 650 q 648 673 653 666 q 634 684 643 680 q 611 688 625 688 q 579 685 593 688 q 551 673 565 681 q 590 604 575 644 q 606 505 606 564 q 590 410 606 453 q 543 334 574 366 q 465 284 512 302 q 355 267 418 267 q 337 267 347 267 q 316 268 326 267 q 297 269 306 268 q 283 271 288 270 q 273 256 278 264 q 264 237 268 248 q 259 214 261 227 q 256 186 256 201 q 262 159 256 169 q 279 143 268 148 q 304 135 289 137 q 335 134 318 134 l 479 134 q 576 118 536 134 q 640 75 615 102 q 677 9 666 47 q 689 -73 689 -29 q 666 -181 689 -133 q 599 -263 644 -230 q 484 -315 554 -297 q 320 -334 415 -334 q 103 -276 175 -334 q 32 -117 32 -219 q 45 -41 32 -74 q 82 13 59 -9 q 136 51 106 36 q 200 72 166 65 q 173 86 186 77 q 149 108 160 96 q 132 138 139 121 q 126 174 126 154 q 148 239 126 212 q 219 292 170 266 q 166 325 189 304 q 126 374 142 346 q 102 434 110 401 q 94 501 94 466 q 110 609 94 561 q 159 689 126 656 q 240 740 191 722 q 355 758 289 758 q 405 754 380 758 q 450 744 429 750 q 487 729 470 737 q 514 712 504 721 q 538 736 524 723 q 568 760 551 749 q 605 779 585 772 q 648 787 625 787 q 685 781 669 787 q 710 765 700 775 q 725 742 720 755 q 731 715 731 729 m 162 -103 q 170 -167 162 -137 q 196 -218 177 -197 q 246 -252 215 -240 q 327 -264 278 -264 q 440 -250 395 -264 q 510 -211 484 -236 q 547 -151 536 -186 q 558 -75 558 -116 q 549 -15 558 -39 q 524 21 541 7 q 484 39 508 34 q 428 45 459 45 l 302 45 q 250 39 276 45 q 206 17 225 33 q 174 -27 186 1 q 162 -103 162 -56 m 224 505 q 254 377 224 417 q 351 336 284 336 q 408 346 385 336 q 447 377 432 356 q 468 430 462 397 q 475 507 475 462 q 446 644 475 600 q 350 688 418 688 q 253 643 282 688 q 224 505 224 598 m 462 1045 q 439 945 450 999 q 419 842 428 892 l 299 842 l 299 856 q 322 904 308 877 q 351 960 335 932 q 383 1015 367 988 q 414 1064 400 1042 l 462 1064 l 462 1045 "},"∂":{"x_min":47,"x_max":634,"ha":692,"o":"m 376 929 q 314 918 339 929 q 271 889 288 907 q 246 847 254 871 q 238 797 238 823 q 167 815 192 797 q 143 871 143 832 q 156 924 143 900 q 194 967 169 949 q 258 995 220 985 q 344 1006 295 1006 q 468 979 414 1006 q 559 904 522 953 q 614 787 595 856 q 634 633 634 718 q 626 492 634 562 q 604 357 619 423 q 552 201 584 271 q 478 84 521 132 q 382 11 435 36 q 266 -14 329 -14 q 163 6 205 -14 q 95 61 121 26 q 58 140 69 95 q 47 233 47 184 q 55 316 47 271 q 80 407 63 361 q 124 494 97 452 q 188 570 150 537 q 274 622 225 602 q 384 642 323 642 q 486 618 442 642 q 557 546 530 594 l 562 546 q 563 560 563 551 q 564 577 564 568 q 564 596 564 587 q 564 611 564 605 q 551 737 564 679 q 514 838 538 795 q 455 905 490 881 q 376 929 420 929 m 309 60 q 393 91 354 60 q 462 175 432 123 q 514 295 493 227 q 543 436 535 362 q 525 489 538 464 q 495 533 513 515 q 454 562 477 551 q 405 572 431 572 q 335 555 366 572 q 279 509 304 538 q 237 443 255 480 q 208 366 220 406 q 190 287 196 326 q 185 214 185 248 q 216 102 185 144 q 309 60 247 60 "},"κ":{"x_min":25.203125,"x_max":814.078125,"ha":842,"o":"m 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 25 686 l 25 745 l 280 745 l 280 519 q 280 467 280 500 q 278 399 279 433 q 275 317 276 360 q 373 463 329 399 q 453 575 416 527 q 520 657 489 623 q 580 711 551 690 q 636 741 608 732 q 694 751 664 751 q 771 731 745 751 q 798 684 798 712 q 793 658 798 672 q 783 635 789 645 q 754 654 773 645 q 705 662 736 662 q 652 656 677 662 q 605 638 628 650 q 561 605 582 625 q 515 555 539 584 l 465 494 l 656 180 q 727 90 691 120 q 810 60 763 60 l 814 60 l 814 0 l 794 0 q 694 3 734 0 q 625 21 654 7 q 573 63 597 35 q 522 141 550 92 l 386 383 l 280 229 l 280 0 l 150 0 l 150 591 "},"‡":{"x_min":49,"x_max":574,"ha":623,"o":"m 340 150 l 574 190 l 574 70 l 340 106 l 379 -154 l 245 -154 l 282 106 l 49 70 l 49 190 l 282 150 l 232 308 q 257 336 244 317 q 276 381 267 353 q 291 454 286 409 q 276 526 286 499 q 257 568 267 554 q 232 592 244 586 l 282 750 l 49 711 l 49 831 l 282 794 l 245 1055 l 379 1055 l 340 794 l 574 831 l 574 711 l 340 750 l 393 592 q 367 566 379 584 q 346 524 357 551 q 330 452 336 497 q 346 377 336 406 q 367 334 357 349 q 393 308 379 316 l 340 150 "},"ň":{"x_min":38.53125,"x_max":857.234375,"ha":896,"o":"m 412 58 l 412 0 l 38 0 l 38 58 l 50 58 q 94 61 73 58 q 130 75 115 65 q 154 105 145 86 q 164 158 164 125 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 271 745 l 289 631 l 296 631 q 341 695 317 670 q 392 733 366 720 q 449 752 419 747 q 513 758 479 758 q 610 742 567 758 q 684 693 653 726 q 730 608 714 660 q 746 486 746 557 l 746 157 q 753 105 746 125 q 775 75 761 86 q 809 61 790 65 q 852 58 829 58 l 857 58 l 857 0 l 615 0 l 615 479 q 606 560 615 524 q 580 619 598 595 q 533 656 562 644 q 462 669 504 669 q 383 650 415 669 q 331 601 351 632 q 303 529 311 570 q 294 444 294 488 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 412 58 m 254 1064 l 308 1064 q 348 1036 327 1051 q 387 1005 368 1022 q 424 971 406 988 q 458 937 442 954 q 491 971 473 954 q 529 1005 509 988 q 569 1036 549 1022 q 609 1064 590 1051 l 664 1064 l 664 1045 q 628 1000 647 1026 q 588 947 608 974 q 552 892 569 919 q 524 842 535 865 l 393 842 q 365 892 382 865 q 329 947 348 919 q 289 1000 309 974 q 254 1045 270 1026 l 254 1064 "},"√":{"x_min":45,"x_max":788,"ha":726,"o":"m 438 -10 l 355 -10 l 158 544 l 45 544 l 45 612 l 237 612 l 406 130 l 713 1137 l 788 1137 l 438 -10 "},"ę":{"x_min":77,"x_max":673,"ha":743,"o":"m 384 678 q 264 617 306 678 q 214 438 222 556 l 538 438 q 529 536 538 491 q 503 612 521 580 q 456 661 485 644 q 384 678 427 678 m 398 -14 q 263 11 323 -14 q 162 85 203 36 q 98 205 120 134 q 77 366 77 276 q 156 659 77 561 q 384 758 236 758 q 505 736 451 758 q 595 673 558 715 q 653 568 633 631 q 673 423 673 505 l 673 358 l 211 358 q 227 230 213 284 q 266 142 241 176 q 330 91 292 107 q 417 74 368 74 q 484 82 453 74 q 540 104 515 90 q 584 134 565 117 q 615 170 603 151 q 633 153 625 165 q 642 122 642 140 q 627 77 642 101 q 581 33 612 53 q 505 0 551 13 q 398 -14 459 -14 m 319 -159 q 332 -97 319 -126 q 369 -44 346 -68 q 421 -3 392 -20 q 483 21 451 13 l 562 21 q 517 0 540 14 q 476 -33 494 -13 q 445 -81 457 -54 q 432 -141 432 -108 q 440 -182 432 -165 q 460 -209 447 -199 q 490 -225 473 -220 q 529 -230 508 -230 q 569 -227 547 -230 q 617 -219 591 -224 l 617 -291 q 592 -300 606 -296 q 563 -307 578 -304 q 534 -311 548 -309 q 509 -313 520 -313 q 430 -303 465 -313 q 370 -276 395 -294 q 332 -228 345 -257 q 319 -159 319 -199 "},"į":{"x_min":31.75,"x_max":427.15625,"ha":444,"o":"m 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 294 745 l 294 158 q 304 105 294 125 q 328 75 313 86 q 364 61 343 65 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 m 144 969 q 150 1010 144 993 q 167 1036 156 1026 q 192 1050 177 1046 q 223 1055 206 1055 q 253 1050 239 1055 q 278 1036 268 1046 q 295 1010 289 1026 q 302 969 302 993 q 295 928 302 944 q 278 902 289 912 q 253 887 268 891 q 223 883 239 883 q 192 887 206 883 q 167 902 177 891 q 150 928 156 912 q 144 969 144 944 m 71 -180 q 84 -118 71 -147 q 121 -65 98 -89 q 173 -24 144 -41 q 235 0 203 -7 l 314 0 q 269 -20 292 -6 q 228 -54 246 -34 q 197 -102 209 -75 q 184 -162 184 -129 q 192 -203 184 -186 q 212 -230 199 -220 q 242 -246 225 -241 q 281 -251 260 -251 q 321 -248 299 -251 q 369 -240 343 -245 l 369 -312 q 344 -321 358 -317 q 315 -328 330 -325 q 286 -332 300 -330 q 261 -334 272 -334 q 182 -324 217 -334 q 122 -297 147 -315 q 84 -249 97 -278 q 71 -180 71 -220 "},"Τ":{"x_min":28,"x_max":823,"ha":851,"o":"m 494 158 q 503 105 494 125 q 527 75 512 86 q 564 61 543 65 q 608 58 585 58 l 640 58 l 640 0 l 208 0 l 208 58 l 240 58 q 283 61 263 58 q 320 73 304 64 q 344 102 335 83 q 354 151 354 120 l 354 922 l 221 922 q 170 913 190 922 q 136 888 149 904 q 116 852 122 873 q 107 808 110 831 l 99 749 l 28 749 l 34 992 l 816 992 l 823 749 l 751 749 l 744 808 q 734 852 741 831 q 715 888 728 873 q 681 913 702 904 q 629 922 660 922 l 494 922 l 494 158 "},"≈":{"x_min":77,"x_max":701,"ha":779,"o":"m 526 522 q 484 530 505 522 q 441 551 462 538 q 400 579 419 564 q 365 609 381 595 q 335 636 350 623 q 305 660 320 650 q 276 676 291 670 q 245 682 261 682 q 185 643 205 682 q 158 522 165 603 l 77 522 q 89 608 81 565 q 116 686 98 652 q 168 743 135 721 q 251 765 200 765 q 297 756 274 765 q 342 733 320 747 q 383 704 364 720 q 419 673 402 688 q 448 647 434 659 q 476 625 462 634 q 504 609 490 615 q 532 604 518 604 q 589 645 571 604 q 617 765 608 687 l 701 765 q 686 678 696 721 q 657 600 677 634 q 607 543 638 565 q 526 522 575 522 m 526 226 q 484 234 505 226 q 441 255 462 242 q 400 284 419 268 q 365 313 381 299 q 335 341 350 327 q 305 364 320 354 q 276 380 291 374 q 245 386 261 386 q 185 347 205 386 q 158 226 165 308 l 77 226 q 89 312 81 269 q 116 390 98 356 q 168 447 135 425 q 251 469 200 469 q 297 460 274 469 q 342 437 320 451 q 383 407 364 424 q 419 377 402 391 q 448 351 434 363 q 476 329 462 338 q 504 313 490 319 q 532 308 518 308 q 589 349 571 308 q 617 469 608 391 l 701 469 q 686 382 696 425 q 657 304 677 338 q 607 247 638 269 q 526 226 575 226 "},"ΐ":{"x_min":4,"x_max":461.53125,"ha":464,"o":"m 266 745 l 266 193 q 295 88 266 122 q 372 55 324 55 q 418 57 397 55 q 461 64 439 60 l 461 6 q 438 -1 452 2 q 407 -7 424 -5 q 372 -12 391 -10 q 338 -14 354 -14 q 247 -2 285 -14 q 184 33 208 8 q 147 100 159 58 q 136 201 136 141 l 136 745 l 266 745 m 4 945 q 23 998 4 982 q 69 1015 42 1015 q 94 1010 82 1015 q 115 998 106 1006 q 129 977 124 989 q 135 945 135 964 q 115 892 135 909 q 69 876 95 876 q 23 892 42 876 q 4 945 4 909 m 300 945 q 318 998 300 982 q 365 1015 337 1015 q 389 1010 377 1015 q 410 998 401 1006 q 424 977 419 989 q 430 945 430 964 q 410 892 430 909 q 365 876 390 876 q 318 892 337 876 q 300 945 300 909 m 168 959 q 184 1004 176 978 q 201 1058 193 1030 q 215 1114 209 1086 q 225 1164 222 1141 l 350 1164 l 350 1150 q 330 1106 345 1133 q 296 1048 316 1079 q 254 990 275 1018 q 214 942 232 961 l 168 942 l 168 959 "},"ĸ":{"x_min":25.203125,"x_max":814,"ha":813,"o":"m 470 447 l 656 172 q 727 87 691 116 q 809 58 763 58 l 814 58 l 814 0 l 794 0 q 694 3 733 0 q 627 21 655 7 q 575 62 599 35 q 522 135 551 88 l 383 352 l 280 276 l 280 151 q 290 102 280 120 q 314 73 299 83 q 351 61 330 64 q 394 58 371 58 l 398 58 l 398 0 l 25 0 l 25 58 l 36 58 q 80 61 59 58 q 116 75 101 65 q 140 105 131 86 q 150 158 150 125 l 150 592 q 140 641 150 622 q 116 670 131 660 q 79 683 100 680 q 36 686 59 686 l 25 686 l 25 745 l 280 745 l 280 519 q 280 471 280 500 q 278 413 279 441 q 275 344 276 380 l 449 534 q 486 578 471 559 q 509 612 500 597 q 521 637 518 626 q 525 658 525 648 q 508 681 525 676 q 457 686 491 686 l 457 745 l 764 745 l 764 686 q 669 652 715 686 q 568 557 622 618 l 470 447 "},"g":{"x_min":32,"x_max":731,"ha":747,"o":"m 731 715 q 726 687 731 700 q 713 664 722 674 q 690 648 704 654 q 657 643 676 643 q 655 658 657 650 q 648 673 653 666 q 634 684 643 680 q 611 688 625 688 q 579 685 593 688 q 551 673 565 681 q 590 604 575 644 q 606 505 606 564 q 590 410 606 453 q 543 334 574 366 q 465 284 512 302 q 355 267 418 267 q 337 267 347 267 q 316 268 326 267 q 297 269 306 268 q 283 271 288 270 q 273 256 278 264 q 264 237 268 248 q 259 214 261 227 q 256 186 256 201 q 262 159 256 169 q 279 143 268 148 q 304 135 289 137 q 335 134 318 134 l 479 134 q 576 118 536 134 q 640 75 615 102 q 677 9 666 47 q 689 -73 689 -29 q 666 -181 689 -133 q 599 -263 644 -230 q 484 -315 554 -297 q 320 -334 415 -334 q 103 -276 175 -334 q 32 -117 32 -219 q 45 -41 32 -74 q 82 13 59 -9 q 136 51 106 36 q 200 72 166 65 q 173 86 186 77 q 149 108 160 96 q 132 138 139 121 q 126 174 126 154 q 148 239 126 212 q 219 292 170 266 q 166 325 189 304 q 126 374 142 346 q 102 434 110 401 q 94 501 94 466 q 110 609 94 561 q 159 689 126 656 q 240 740 191 722 q 355 758 289 758 q 405 754 380 758 q 450 744 429 750 q 487 729 470 737 q 514 712 504 721 q 538 736 524 723 q 568 760 551 749 q 605 779 585 772 q 648 787 625 787 q 685 781 669 787 q 710 765 700 775 q 725 742 720 755 q 731 715 731 729 m 162 -103 q 170 -167 162 -137 q 196 -218 177 -197 q 246 -252 215 -240 q 327 -264 278 -264 q 440 -250 395 -264 q 510 -211 484 -236 q 547 -151 536 -186 q 558 -75 558 -116 q 549 -15 558 -39 q 524 21 541 7 q 484 39 508 34 q 428 45 459 45 l 302 45 q 250 39 276 45 q 206 17 225 33 q 174 -27 186 1 q 162 -103 162 -56 m 224 505 q 254 377 224 417 q 351 336 284 336 q 408 346 385 336 q 447 377 432 356 q 468 430 462 397 q 475 507 475 462 q 446 644 475 600 q 350 688 418 688 q 253 643 282 688 q 224 505 224 598 "},"ǿ":{"x_min":77,"x_max":725,"ha":802,"o":"m 630 671 q 700 550 676 625 q 725 373 725 476 q 641 81 725 177 q 398 -14 558 -14 q 308 -4 350 -14 q 232 24 266 5 l 182 -56 l 100 -56 l 175 66 q 102 190 127 114 q 77 373 77 266 q 159 663 77 568 q 403 758 241 758 q 496 747 453 758 q 575 715 539 736 l 628 800 l 708 800 l 630 671 m 211 374 q 218 258 211 309 q 239 167 225 206 l 526 638 q 400 688 480 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 m 590 374 q 565 569 590 495 l 280 100 q 332 66 301 78 q 402 55 362 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 m 320 860 q 352 905 335 879 q 384 958 368 931 q 415 1013 400 986 q 440 1064 429 1040 l 589 1064 l 589 1049 q 551 1004 576 1031 q 495 946 525 976 q 432 889 465 917 q 372 842 400 860 l 320 842 l 320 860 "},"²":{"x_min":58,"x_max":484,"ha":555,"o":"m 467 855 q 459 794 467 823 q 434 737 452 766 q 388 678 416 709 q 316 610 359 648 l 169 484 l 370 484 q 414 501 402 484 q 431 541 427 518 l 436 570 l 484 570 l 479 397 l 58 397 l 58 459 l 233 617 q 285 674 264 645 q 318 731 306 702 q 336 788 331 760 q 342 844 342 817 q 337 886 342 867 q 323 920 333 906 q 298 942 313 934 q 260 950 282 950 q 217 940 235 950 q 189 914 200 930 q 174 875 178 897 q 169 829 169 853 q 95 841 122 829 q 69 889 69 852 q 81 935 69 914 q 117 972 93 957 q 177 997 141 988 q 260 1006 213 1006 q 412 967 357 1006 q 467 855 467 929 "},"Ã":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 m 606 1161 q 639 1167 627 1161 q 659 1183 652 1173 q 669 1207 666 1194 q 674 1235 672 1220 l 737 1235 q 725 1173 734 1203 q 699 1121 716 1144 q 655 1084 681 1098 q 591 1071 628 1071 q 523 1084 554 1071 q 467 1114 493 1098 q 418 1145 441 1131 q 373 1158 396 1158 q 340 1152 352 1158 q 321 1136 328 1146 q 310 1112 314 1126 q 305 1085 307 1099 l 243 1085 q 254 1146 245 1116 q 281 1198 263 1175 q 326 1235 299 1221 q 390 1249 352 1249 q 457 1235 427 1249 q 513 1205 487 1221 q 562 1174 539 1188 q 606 1161 585 1161 "},"Ј":{"x_min":-16,"x_max":456.640625,"ha":496,"o":"m -16 -264 l -3 -264 q 76 -252 41 -264 q 135 -210 111 -239 q 171 -131 158 -180 q 184 -9 184 -82 l 184 839 q 174 888 184 870 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 -10 q 299 -166 324 -104 q 232 -265 275 -228 q 132 -318 190 -302 q 7 -334 74 -334 l -16 -334 l -16 -264 "},"©":{"x_min":77,"x_max":1097,"ha":1174,"o":"m 611 247 q 670 255 643 247 q 719 277 697 263 q 756 307 741 290 q 782 341 772 324 q 796 324 790 335 q 802 298 802 313 q 788 259 802 279 q 749 223 775 239 q 684 197 723 207 q 593 187 645 187 q 472 209 524 187 q 385 272 420 231 q 333 370 350 313 q 316 496 316 427 q 334 620 316 564 q 391 717 353 677 q 484 781 429 758 q 612 804 539 804 q 696 796 660 804 q 755 774 731 788 q 791 743 779 761 q 803 704 803 725 q 795 677 803 689 q 775 656 788 664 q 745 643 762 648 q 708 639 727 639 q 703 677 708 658 q 686 711 698 696 q 656 735 675 726 q 610 745 637 745 q 527 728 561 745 q 471 680 492 712 q 439 602 449 648 q 429 496 429 556 q 476 312 429 376 q 611 247 523 247 m 77 495 q 95 631 77 566 q 146 753 113 696 q 225 857 179 810 q 328 937 272 903 q 450 988 385 970 q 585 1007 515 1007 q 721 988 656 1007 q 843 937 787 970 q 947 857 900 903 q 1027 753 993 810 q 1078 631 1060 696 q 1097 495 1097 566 q 1078 359 1097 424 q 1027 238 1060 294 q 947 134 993 181 q 843 55 900 88 q 721 3 787 21 q 585 -14 656 -14 q 450 3 515 -14 q 328 55 385 21 q 225 134 272 88 q 146 238 179 181 q 95 359 113 294 q 77 495 77 424 m 152 495 q 168 380 152 436 q 212 277 184 325 q 280 189 240 228 q 367 121 319 149 q 471 77 416 93 q 586 61 526 61 q 702 77 646 61 q 806 121 757 93 q 893 189 854 149 q 961 277 933 228 q 1005 380 989 325 q 1021 495 1021 436 q 1005 611 1021 555 q 961 715 989 666 q 893 803 933 764 q 806 871 854 843 q 702 915 757 899 q 586 931 646 931 q 471 915 526 931 q 367 871 416 899 q 280 803 319 843 q 212 715 240 764 q 168 611 184 666 q 152 495 152 556 "},"≥":{"x_min":90,"x_max":687,"ha":777,"o":"m 90 152 l 90 244 l 557 495 l 90 748 l 90 841 l 687 520 l 687 471 l 90 152 m 687 0 l 90 0 l 90 82 l 687 82 l 687 0 "},"Ă":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 m 486 1071 q 400 1086 437 1071 q 340 1127 364 1101 q 305 1187 317 1153 q 292 1262 293 1222 l 355 1262 q 401 1188 367 1210 q 486 1166 435 1166 q 571 1188 537 1166 q 616 1262 605 1210 l 681 1262 q 667 1187 679 1222 q 631 1127 655 1153 q 571 1086 607 1101 q 486 1071 535 1071 "},"ґ":{"x_min":31.75,"x_max":581,"ha":618,"o":"m 294 682 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 440 58 l 440 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 31 686 l 31 745 l 415 745 q 456 750 439 745 q 484 768 473 755 q 502 803 495 781 q 515 857 510 825 l 522 903 l 581 903 l 581 682 l 294 682 "},"ÿ":{"x_min":5,"x_max":785,"ha":785,"o":"m 785 745 l 785 686 l 780 686 q 746 682 760 686 q 719 665 731 677 q 697 632 707 653 q 675 578 687 611 l 463 -5 q 417 -123 439 -72 q 372 -210 396 -174 q 320 -270 348 -247 q 256 -308 292 -294 q 173 -328 220 -323 q 65 -334 126 -334 l 52 -334 l 52 -264 q 174 -244 123 -264 q 262 -187 225 -223 q 323 -101 299 -150 q 365 5 348 -52 l 108 612 q 89 648 98 634 q 69 671 80 662 q 44 683 58 679 q 9 686 29 686 l 5 686 l 5 745 l 338 745 l 338 686 l 334 686 q 271 670 292 686 q 251 619 251 654 q 253 596 251 607 q 262 568 255 584 l 364 320 q 384 269 373 297 q 403 213 394 240 q 420 161 412 185 q 430 119 427 137 l 434 119 q 455 193 442 149 q 486 287 468 237 l 579 558 q 588 590 585 575 q 591 618 591 606 q 568 670 591 654 q 500 686 546 686 l 496 686 l 496 745 l 785 745 m 217 956 q 222 992 217 977 q 237 1016 227 1007 q 259 1029 246 1025 q 287 1034 272 1034 q 315 1029 302 1034 q 338 1016 328 1025 q 353 992 347 1007 q 358 956 358 977 q 353 920 358 934 q 338 895 347 905 q 315 882 328 886 q 287 878 302 878 q 237 895 257 878 q 217 956 217 913 m 481 956 q 486 992 481 977 q 501 1016 491 1007 q 523 1029 510 1025 q 551 1034 536 1034 q 579 1029 566 1034 q 602 1016 592 1025 q 617 992 611 1007 q 622 956 622 977 q 617 920 622 934 q 602 895 611 905 q 579 882 592 886 q 551 878 566 878 q 501 895 521 878 q 481 956 481 913 "},"Ł":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 52 396 l 184 472 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 358 917 373 927 q 333 888 342 907 q 324 839 324 869 l 324 552 l 541 679 l 541 598 l 324 473 l 324 69 l 599 69 q 652 80 630 69 q 688 109 674 91 q 710 150 703 127 q 721 194 718 172 l 735 299 l 807 299 l 797 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 393 l 52 318 l 52 396 "}," ":{"x_min":0,"x_max":0,"ha":393},"∫":{"x_min":28,"x_max":713,"ha":749,"o":"m 183 -334 q 64 -306 101 -334 q 28 -231 28 -278 q 53 -173 28 -193 q 129 -153 78 -153 q 130 -194 129 -174 q 139 -230 132 -214 q 161 -255 146 -245 q 203 -264 176 -264 q 277 -214 251 -264 q 302 -62 302 -164 q 302 23 302 -24 q 301 123 302 70 q 300 232 300 175 q 300 345 300 288 q 300 420 300 380 q 301 503 300 461 q 303 586 302 545 q 305 663 304 627 q 307 728 306 699 q 308 774 308 757 q 330 891 312 838 q 378 982 348 944 q 451 1041 409 1020 q 548 1063 494 1063 q 672 1039 631 1063 q 713 970 713 1015 q 687 913 713 933 q 611 893 661 893 q 609 934 611 914 q 601 970 608 954 q 579 995 594 985 q 538 1004 564 1004 q 437 800 437 1004 q 438 736 437 773 q 438 656 438 698 q 439 571 438 614 q 439 488 439 527 q 440 418 439 450 q 440 369 440 387 q 440 302 440 341 q 439 223 439 264 q 437 139 438 181 q 435 60 436 97 q 433 -3 434 24 q 432 -43 432 -30 q 409 -160 428 -107 q 357 -252 390 -214 q 281 -312 325 -291 q 183 -334 237 -334 "},"\\":{"x_min":0,"x_max":400,"ha":400,"o":"m 0 1055 l 80 1055 l 400 -168 l 317 -168 l 0 1055 "},"Ì":{"x_min":51,"x_max":456.640625,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 m 321 1071 l 268 1071 q 207 1118 240 1089 q 144 1175 175 1146 q 88 1233 114 1205 q 51 1278 63 1260 l 51 1293 l 199 1293 q 225 1242 210 1269 q 255 1187 239 1215 q 289 1134 272 1160 q 321 1089 306 1108 l 321 1071 "},"ъ":{"x_min":41,"x_max":901,"ha":978,"o":"m 591 745 l 591 692 l 573 692 q 530 688 550 692 q 493 674 509 685 q 469 645 478 664 q 459 595 459 626 l 459 414 l 580 414 q 702 406 644 414 q 804 377 760 399 q 874 316 848 355 q 901 212 901 276 q 883 127 901 166 q 830 60 865 88 q 740 15 794 31 q 613 0 686 0 l 197 0 l 197 58 l 215 58 q 258 61 238 58 q 295 74 279 64 q 319 102 310 83 q 329 152 329 121 l 329 686 l 208 686 q 166 681 183 686 q 137 662 149 675 q 119 628 126 650 q 106 574 112 606 l 99 527 l 41 527 l 49 745 l 591 745 m 589 63 q 670 72 637 63 q 725 100 703 81 q 756 149 746 119 q 766 222 766 179 q 718 325 766 294 q 581 355 670 355 l 459 355 l 459 63 l 589 63 "},"ς":{"x_min":77,"x_max":628,"ha":657,"o":"m 211 372 q 223 266 211 307 q 260 199 234 225 q 325 157 285 173 q 423 126 365 141 q 497 101 463 115 q 553 68 530 88 q 590 22 577 49 q 603 -42 603 -4 q 590 -122 603 -84 q 551 -192 577 -160 q 484 -247 525 -224 q 390 -282 444 -271 l 390 -209 q 439 -187 419 -199 q 471 -159 459 -174 q 488 -126 482 -144 q 493 -84 493 -107 q 486 -42 493 -58 q 461 -12 479 -25 q 412 9 443 0 q 330 31 380 19 q 224 69 271 46 q 144 130 177 92 q 94 224 111 168 q 77 356 77 279 q 101 538 77 462 q 166 663 125 614 q 265 734 208 711 q 386 758 321 758 q 478 749 434 758 q 556 723 522 741 q 608 678 589 705 q 628 616 628 652 q 596 548 628 568 q 503 528 565 528 q 498 590 503 561 q 479 641 493 619 q 444 676 466 663 q 386 688 421 688 q 316 670 347 688 q 260 612 284 651 q 224 513 237 573 q 211 372 211 454 "},"Ē":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 324 69 l 592 69 q 649 78 626 69 q 688 103 673 87 q 713 139 704 118 q 725 183 722 160 l 735 243 l 807 243 l 797 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 753 992 l 760 749 l 688 749 l 681 808 q 670 852 678 831 q 648 888 662 873 q 611 913 633 904 q 558 922 589 922 l 324 922 l 324 553 l 660 553 l 660 483 l 324 483 l 324 69 m 643 1071 l 240 1071 l 240 1153 l 643 1153 l 643 1071 "},"!":{"x_min":143,"x_max":318,"ha":463,"o":"m 149 992 l 311 992 l 262 279 l 198 279 l 149 992 m 143 84 q 149 129 143 111 q 168 158 156 147 q 196 174 180 169 q 230 179 212 179 q 264 174 248 179 q 291 158 280 169 q 310 129 303 147 q 318 84 318 111 q 310 39 318 57 q 291 10 303 21 q 264 -5 280 0 q 230 -10 248 -10 q 196 -5 212 -10 q 168 10 180 0 q 149 39 156 21 q 143 84 143 57 "},"ç":{"x_min":77,"x_max":629,"ha":684,"o":"m 393 -14 q 265 7 324 -14 q 165 74 207 28 q 100 193 123 121 q 77 367 77 265 q 100 554 77 479 q 165 674 123 629 q 263 739 207 720 q 386 758 320 758 q 472 749 429 758 q 550 723 515 741 q 606 679 584 705 q 628 616 628 652 q 596 548 628 568 q 503 529 565 529 q 498 590 503 561 q 479 641 493 619 q 444 676 466 663 q 386 688 421 688 q 314 673 346 688 q 259 622 282 658 q 224 523 236 585 q 211 368 211 461 q 260 147 211 220 q 421 74 309 74 q 533 102 485 74 q 605 173 581 129 q 622 151 615 164 q 629 118 629 137 q 614 71 629 95 q 569 28 599 47 q 496 -2 540 9 q 393 -14 452 -14 m 531 -175 q 483 -291 531 -249 q 348 -334 436 -334 q 323 -332 337 -334 q 295 -329 310 -331 q 267 -324 281 -327 q 241 -318 253 -321 l 241 -247 q 290 -256 265 -253 q 333 -258 315 -258 q 395 -237 373 -258 q 417 -180 417 -216 q 388 -119 417 -139 q 316 -95 359 -99 l 345 12 l 410 12 l 396 -47 q 497 -86 464 -53 q 531 -175 531 -120 "},"Й":{"x_min":52.421875,"x_max":1063.265625,"ha":1116,"o":"m 659 0 l 659 58 l 676 58 q 721 61 700 58 q 757 75 741 65 q 781 105 772 86 q 790 158 790 125 l 790 708 l 324 185 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 283 l 790 806 l 790 833 q 781 886 790 866 q 757 916 772 905 q 721 930 741 926 q 676 933 700 933 l 659 933 l 659 992 l 1063 992 l 1063 933 l 1044 933 q 1000 930 1021 933 q 964 916 979 926 q 940 886 949 905 q 931 833 931 866 l 931 151 q 940 102 931 120 q 964 73 949 83 q 1001 61 980 64 q 1044 58 1021 58 l 1063 58 l 1063 0 l 659 0 m 818 1259 q 797 1182 813 1216 q 749 1122 780 1147 q 669 1084 717 1098 q 553 1071 621 1071 q 436 1083 484 1071 q 359 1121 388 1096 q 315 1180 329 1145 q 298 1259 301 1215 l 413 1259 q 425 1198 416 1222 q 452 1162 435 1175 q 494 1143 469 1149 q 556 1138 520 1138 q 611 1144 586 1138 q 654 1164 636 1151 q 684 1201 672 1178 q 699 1259 695 1224 l 818 1259 "},"Б":{"x_min":52.421875,"x_max":785,"ha":839,"o":"m 722 992 l 729 749 l 657 749 l 649 808 q 640 852 646 831 q 620 888 634 873 q 586 913 607 904 q 534 922 565 922 l 324 922 l 324 549 l 412 549 q 583 528 513 549 q 699 472 654 508 q 764 386 744 436 q 785 275 785 335 q 764 163 785 214 q 701 76 743 113 q 594 20 659 40 q 442 0 530 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 74 134 64 q 174 103 165 84 q 184 152 184 122 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 722 992 m 324 66 l 417 66 q 516 78 476 66 q 582 115 557 91 q 619 178 608 140 q 631 266 631 215 q 617 364 631 323 q 576 430 604 405 q 504 468 548 456 q 397 479 459 479 l 324 479 l 324 66 "},"đ":{"x_min":77,"x_max":829.828125,"ha":853,"o":"m 703 889 l 829 889 l 829 830 l 703 830 l 703 153 q 712 103 703 122 q 736 74 721 85 q 773 61 752 64 q 816 58 793 58 l 828 58 l 828 0 l 592 0 l 577 124 l 572 124 q 536 67 556 92 q 490 23 516 41 q 432 -4 465 5 q 359 -14 400 -14 q 238 7 291 -14 q 149 74 185 29 q 95 190 113 120 q 77 356 77 260 q 95 523 77 453 q 149 640 113 594 q 238 707 185 685 q 359 730 291 730 q 431 721 399 730 q 490 696 464 712 q 536 657 516 679 q 572 607 557 635 l 580 607 q 576 674 578 643 q 573 728 574 701 q 572 770 572 756 l 572 830 l 334 830 l 334 889 l 572 889 l 572 902 q 562 951 572 933 q 538 979 553 969 q 501 993 522 989 q 458 996 481 996 l 446 996 l 446 1055 l 703 1055 l 703 889 m 383 74 q 473 92 437 74 q 531 144 509 109 q 562 232 553 179 q 572 356 572 285 q 562 478 572 425 q 531 568 553 531 q 473 622 509 604 q 382 641 436 641 q 251 567 291 641 q 211 354 211 494 q 251 144 211 214 q 383 74 291 74 "},"ċ":{"x_min":77,"x_max":629,"ha":684,"o":"m 393 -14 q 265 7 324 -14 q 165 74 207 28 q 100 193 123 121 q 77 367 77 265 q 100 554 77 479 q 165 674 123 629 q 263 739 207 720 q 386 758 320 758 q 472 749 429 758 q 550 723 515 741 q 606 679 584 705 q 628 616 628 652 q 596 548 628 568 q 503 529 565 529 q 498 590 503 561 q 479 641 493 619 q 444 676 466 663 q 386 688 421 688 q 314 673 346 688 q 259 622 282 658 q 224 523 236 585 q 211 368 211 461 q 260 147 211 220 q 421 74 309 74 q 533 102 485 74 q 605 173 581 129 q 622 151 615 164 q 629 118 629 137 q 614 71 629 95 q 569 28 599 47 q 496 -2 540 9 q 393 -14 452 -14 m 314 970 q 320 1011 314 994 q 337 1037 326 1027 q 362 1051 347 1047 q 393 1056 376 1056 q 424 1051 409 1056 q 449 1037 438 1047 q 466 1011 460 1027 q 473 970 473 994 q 466 929 473 945 q 449 903 460 913 q 424 888 438 892 q 393 884 409 884 q 362 888 376 884 q 337 903 347 892 q 320 929 326 913 q 314 970 314 945 "},"Ā":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 m 688 1071 l 285 1071 l 285 1153 l 688 1153 l 688 1071 "},"Ẃ":{"x_min":12,"x_max":1442,"ha":1454,"o":"m 800 983 l 973 380 q 1008 248 993 311 q 1033 136 1024 184 q 1057 241 1043 186 q 1089 364 1070 297 l 1211 793 q 1216 811 1213 801 q 1220 831 1218 821 q 1224 850 1222 842 q 1226 865 1226 859 q 1203 917 1226 901 q 1134 933 1180 933 l 1102 933 l 1102 992 l 1442 992 l 1442 933 l 1415 933 q 1379 929 1395 933 q 1352 913 1364 925 q 1330 881 1340 902 q 1309 825 1319 860 l 1075 0 l 950 0 l 723 778 l 511 0 l 383 0 l 128 860 q 113 896 121 882 q 93 918 104 910 q 66 930 81 926 q 30 933 50 933 l 12 933 l 12 992 l 394 992 l 394 933 l 362 933 q 299 917 320 933 q 279 867 279 901 q 282 843 279 855 q 290 815 286 831 l 417 371 q 450 247 435 308 q 478 136 466 186 q 502 254 488 190 q 534 386 516 319 l 699 983 l 800 983 m 728 1089 q 760 1134 743 1108 q 792 1187 776 1160 q 823 1242 808 1215 q 848 1293 837 1269 l 997 1293 l 997 1278 q 959 1233 984 1260 q 903 1175 933 1205 q 840 1118 873 1146 q 780 1071 808 1089 l 728 1071 l 728 1089 "},"ø":{"x_min":77,"x_max":725,"ha":802,"o":"m 630 671 q 700 550 676 625 q 725 373 725 476 q 641 81 725 177 q 398 -14 558 -14 q 308 -4 350 -14 q 232 24 266 5 l 182 -56 l 100 -56 l 175 66 q 102 190 127 114 q 77 373 77 266 q 159 663 77 568 q 403 758 241 758 q 496 747 453 758 q 575 715 539 736 l 628 800 l 708 800 l 630 671 m 211 374 q 218 258 211 309 q 239 167 225 206 l 526 638 q 400 688 480 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 m 590 374 q 565 569 590 495 l 280 100 q 332 66 301 78 q 402 55 362 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 "},"â":{"x_min":69,"x_max":722.203125,"ha":782,"o":"m 203 200 q 231 103 203 135 q 316 71 258 71 q 392 84 358 71 q 451 123 427 98 q 488 184 475 148 q 501 263 501 219 l 501 375 l 412 371 q 313 357 353 368 q 249 324 273 345 q 214 271 225 302 q 203 200 203 240 m 372 688 q 307 677 331 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 200 727 166 711 q 280 750 234 743 q 377 758 325 758 q 488 745 441 758 q 568 704 536 732 q 616 630 600 675 q 632 518 632 584 l 632 157 q 636 109 632 128 q 651 79 641 90 q 678 63 661 67 q 718 58 695 58 l 722 58 l 722 0 l 534 0 l 512 118 l 501 118 q 459 65 479 89 q 414 23 438 40 q 358 -4 389 5 q 284 -14 328 -14 q 198 0 238 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 147 371 69 318 q 385 429 226 425 l 501 434 l 501 517 q 497 586 501 554 q 479 640 492 618 q 440 676 465 663 q 372 688 414 688 m 177 860 q 212 905 193 879 q 252 958 232 931 q 288 1013 271 986 q 316 1064 305 1040 l 447 1064 q 475 1013 458 1040 q 511 958 492 986 q 551 905 531 931 q 587 860 570 879 l 587 842 l 532 842 q 452 899 492 864 q 381 966 412 933 q 310 899 349 933 q 231 842 270 864 l 177 842 l 177 860 "},"}":{"x_min":69,"x_max":525,"ha":595,"o":"m 69 -119 l 110 -119 q 198 -81 172 -119 q 224 26 224 -44 l 224 267 q 261 381 224 336 q 378 439 298 425 l 378 440 q 263 498 301 453 q 224 612 224 544 l 224 849 q 198 959 224 922 q 110 996 172 996 l 69 996 l 69 1055 l 161 1055 q 310 1003 259 1055 q 361 856 361 951 l 361 614 q 373 544 361 572 q 408 500 386 517 q 460 477 430 483 q 525 469 490 470 l 525 410 q 460 401 490 408 q 408 377 430 394 q 373 333 386 361 q 361 263 361 305 l 361 21 q 348 -61 361 -24 q 310 -123 335 -98 q 247 -163 284 -149 q 161 -178 210 -178 l 69 -178 l 69 -119 "},"Δ":{"x_min":43,"x_max":801,"ha":844,"o":"m 801 0 l 43 0 l 43 72 l 368 992 l 488 992 l 801 82 l 801 0 m 647 91 l 468 637 q 428 756 447 699 q 398 864 410 814 q 373 764 388 814 q 335 649 358 714 l 139 91 l 647 91 "},"‰":{"x_min":62,"x_max":1731,"ha":1793,"o":"m 518 698 q 503 572 518 629 q 461 474 489 515 q 389 411 432 433 q 290 389 347 389 q 187 411 230 389 q 116 474 144 433 q 75 572 88 515 q 62 698 62 629 q 75 825 62 768 q 116 922 88 881 q 187 984 144 962 q 291 1006 230 1006 q 390 984 348 1006 q 461 922 433 962 q 503 825 489 881 q 518 698 518 768 m 188 699 q 193 605 188 646 q 211 535 198 564 q 242 492 223 506 q 290 477 262 477 q 338 492 319 477 q 369 535 358 506 q 386 605 381 564 q 391 699 391 646 q 386 791 391 751 q 369 860 381 832 q 339 903 358 888 q 292 917 320 917 q 243 903 263 917 q 211 860 223 888 q 193 791 198 832 q 188 699 188 751 m 1182 295 q 1167 168 1182 225 q 1125 70 1153 111 q 1053 8 1096 30 q 954 -14 1011 -14 q 850 8 894 -14 q 779 70 807 30 q 739 168 752 111 q 726 295 726 225 q 739 422 726 365 q 780 519 752 478 q 851 581 808 559 q 955 603 894 603 q 1054 581 1012 603 q 1125 519 1097 559 q 1167 422 1153 478 q 1182 295 1182 365 m 852 296 q 857 202 852 243 q 875 132 862 161 q 906 89 887 103 q 955 74 926 74 q 1003 89 983 74 q 1034 132 1022 103 q 1050 202 1045 161 q 1055 296 1055 243 q 1050 388 1055 348 q 1034 457 1045 429 q 1003 500 1022 485 q 956 514 984 514 q 907 500 927 514 q 875 457 888 485 q 857 388 862 429 q 852 296 852 348 m 417 0 l 326 0 l 822 992 l 913 992 l 417 0 m 1731 295 q 1716 168 1731 225 q 1674 70 1702 111 q 1602 8 1645 30 q 1503 -14 1560 -14 q 1399 8 1443 -14 q 1328 70 1356 30 q 1288 168 1301 111 q 1275 295 1275 225 q 1288 422 1275 365 q 1329 519 1301 478 q 1400 581 1357 559 q 1504 603 1443 603 q 1603 581 1561 603 q 1674 519 1646 559 q 1716 422 1702 478 q 1731 295 1731 365 m 1401 296 q 1406 202 1401 243 q 1424 132 1411 161 q 1455 89 1436 103 q 1504 74 1475 74 q 1552 89 1532 74 q 1583 132 1571 103 q 1599 202 1594 161 q 1604 296 1604 243 q 1599 388 1604 348 q 1583 457 1594 429 q 1552 500 1571 485 q 1505 514 1533 514 q 1456 500 1476 514 q 1424 457 1437 485 q 1406 388 1411 429 q 1401 296 1401 348 "},"Ä":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 m 288 1185 q 293 1221 288 1206 q 308 1245 298 1236 q 330 1258 317 1254 q 358 1263 343 1263 q 386 1258 373 1263 q 409 1245 399 1254 q 424 1221 418 1236 q 429 1185 429 1206 q 424 1149 429 1163 q 409 1124 418 1134 q 386 1111 399 1115 q 358 1107 373 1107 q 308 1124 328 1107 q 288 1185 288 1142 m 552 1185 q 557 1221 552 1206 q 572 1245 562 1236 q 594 1258 581 1254 q 622 1263 607 1263 q 650 1258 637 1263 q 673 1245 663 1254 q 688 1221 682 1236 q 693 1185 693 1206 q 688 1149 693 1163 q 673 1124 682 1134 q 650 1111 663 1115 q 622 1107 637 1107 q 572 1124 592 1107 q 552 1185 552 1142 "},"ř":{"x_min":46,"x_max":633,"ha":654,"o":"m 447 0 l 46 0 l 46 58 l 50 58 q 94 61 73 58 q 130 75 115 65 q 154 105 145 86 q 164 158 164 125 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 260 745 l 286 606 l 293 606 q 321 665 307 638 q 356 713 335 692 q 407 746 376 734 q 483 758 437 758 q 596 731 559 758 q 633 656 633 705 q 625 616 633 635 q 603 585 618 598 q 563 565 587 572 q 503 558 539 558 q 487 643 503 617 q 430 669 471 669 q 384 654 405 669 q 349 615 364 639 q 323 560 334 591 q 306 495 313 528 q 297 430 300 462 q 294 370 294 397 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 447 58 l 447 0 m 105 1064 l 159 1064 q 199 1036 178 1051 q 238 1005 219 1022 q 275 971 257 988 q 309 937 293 954 q 342 971 324 954 q 380 1005 360 988 q 420 1036 400 1022 q 460 1064 441 1051 l 515 1064 l 515 1045 q 479 1000 498 1026 q 439 947 459 974 q 403 892 420 919 q 375 842 386 865 l 244 842 q 216 892 233 865 q 180 947 199 919 q 140 1000 160 974 q 105 1045 121 1026 l 105 1064 "},"—":{"x_min":-7,"x_max":1396,"ha":1389,"o":"m 1396 331 l -7 331 l -7 414 l 1396 414 l 1396 331 "},"N":{"x_min":52.421875,"x_max":1020.5625,"ha":1060,"o":"m 789 0 l 268 800 l 268 158 q 277 105 268 125 q 302 75 287 86 q 338 61 317 65 q 382 58 359 58 l 401 58 l 401 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 306 992 l 804 223 l 804 839 q 795 888 804 869 q 770 917 785 907 q 734 930 754 927 q 690 933 713 933 l 671 933 l 671 992 l 1020 992 l 1020 933 l 1002 933 q 958 930 979 933 q 922 916 937 926 q 897 886 906 905 q 889 833 889 866 l 889 0 l 789 0 "},"⁄":{"x_min":-250,"x_max":337,"ha":86,"o":"m -157 0 l -250 0 l 246 992 l 337 992 l -157 0 "},"2":{"x_min":71,"x_max":675,"ha":777,"o":"m 640 774 q 624 679 640 725 q 579 584 608 632 q 506 483 549 535 q 408 371 463 431 l 174 111 l 494 111 q 546 120 525 111 q 579 143 566 128 q 599 175 592 157 q 611 214 606 194 l 616 240 l 675 240 l 668 0 l 71 0 l 71 101 l 302 369 q 395 485 358 434 q 456 581 433 536 q 489 669 479 626 q 499 760 499 712 q 491 832 499 800 q 465 888 482 864 q 421 924 448 911 q 358 936 394 936 q 281 919 311 936 q 235 874 252 902 q 212 808 218 845 q 206 729 206 770 q 159 733 181 729 q 121 747 137 737 q 96 775 105 758 q 87 819 87 792 q 104 893 87 859 q 155 953 121 927 q 240 992 189 978 q 358 1006 291 1006 q 476 989 424 1006 q 564 942 528 972 q 620 869 601 912 q 640 774 640 826 "},"М":{"x_min":52.421875,"x_max":1250.578125,"ha":1303,"o":"m 874 0 l 874 58 l 878 58 q 919 61 901 58 q 949 73 937 64 q 969 100 962 82 q 978 145 977 117 l 978 888 l 663 0 l 588 0 l 268 885 l 268 158 q 275 105 268 125 q 295 75 282 86 q 327 61 308 65 q 369 58 346 58 l 373 58 l 373 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 368 992 l 653 197 l 936 992 l 1250 992 l 1250 933 l 1232 933 q 1188 930 1209 933 q 1152 916 1167 926 q 1127 886 1136 905 q 1119 833 1119 866 l 1119 158 q 1127 105 1119 125 q 1152 75 1136 86 q 1188 61 1167 65 q 1232 58 1209 58 l 1250 58 l 1250 0 l 874 0 "},"Ó":{"x_min":78,"x_max":952,"ha":1031,"o":"m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 m 440 1089 q 472 1134 455 1108 q 504 1187 488 1160 q 535 1242 520 1215 q 560 1293 549 1269 l 709 1293 l 709 1278 q 671 1233 696 1260 q 615 1175 645 1205 q 552 1118 585 1146 q 492 1071 520 1089 l 440 1071 l 440 1089 "},"˜":{"x_min":153,"x_max":647,"ha":802,"o":"m 516 932 q 549 938 537 932 q 569 954 562 944 q 579 978 576 965 q 584 1006 582 991 l 647 1006 q 635 944 644 974 q 609 892 626 915 q 565 855 591 869 q 501 842 538 842 q 433 855 464 842 q 377 885 403 869 q 328 916 351 902 q 283 929 306 929 q 250 923 262 929 q 231 907 238 917 q 220 883 224 897 q 215 856 217 870 l 153 856 q 164 917 155 887 q 191 969 173 946 q 236 1006 209 992 q 300 1020 262 1020 q 367 1006 337 1020 q 423 976 397 992 q 472 945 449 959 q 516 932 495 932 "}," ":{"x_min":0,"x_max":0,"ha":695},"ˇ":{"x_min":196,"x_max":606,"ha":802,"o":"m 196 1064 l 250 1064 q 290 1036 269 1051 q 329 1005 310 1022 q 366 971 348 988 q 400 937 384 954 q 433 971 415 954 q 471 1005 451 988 q 511 1036 491 1022 q 551 1064 532 1051 l 606 1064 l 606 1045 q 570 1000 589 1026 q 530 947 550 974 q 494 892 511 919 q 466 842 477 865 l 335 842 q 307 892 324 865 q 271 947 290 919 q 231 1000 251 974 q 196 1045 212 1026 l 196 1064 "},"ų":{"x_min":31.984375,"x_max":850.015625,"ha":882,"o":"m 732 151 q 741 102 732 120 q 765 73 750 83 q 802 61 781 64 q 845 58 822 58 l 850 58 l 850 0 l 629 0 l 611 112 l 604 112 q 558 48 583 72 q 504 10 532 24 q 444 -8 475 -3 q 379 -14 413 -14 q 281 1 324 -14 q 209 50 238 17 q 165 135 180 83 q 150 258 150 186 l 150 591 q 140 640 150 622 q 116 669 131 659 q 79 683 100 679 q 36 686 59 686 l 31 686 l 31 745 l 280 745 l 280 264 q 288 184 280 219 q 311 124 295 148 q 356 87 328 99 q 426 74 384 74 q 505 91 472 74 q 559 136 538 107 q 590 207 580 166 q 601 299 601 249 l 601 586 q 591 638 601 618 q 567 669 582 658 q 531 683 552 679 q 487 686 510 686 l 483 686 l 483 745 l 732 745 l 732 151 m 469 -180 q 482 -118 469 -147 q 519 -65 496 -89 q 571 -24 542 -41 q 633 0 601 -7 l 712 0 q 667 -20 690 -6 q 626 -54 644 -34 q 595 -102 607 -75 q 582 -162 582 -129 q 590 -203 582 -186 q 610 -230 597 -220 q 640 -246 623 -241 q 679 -251 658 -251 q 719 -248 697 -251 q 767 -240 741 -245 l 767 -312 q 742 -321 756 -317 q 713 -328 728 -325 q 684 -332 698 -330 q 659 -334 670 -334 q 580 -324 615 -334 q 520 -297 545 -315 q 482 -249 495 -278 q 469 -180 469 -220 "},"Ў":{"x_min":0,"x_max":938,"ha":931,"o":"m 938 933 l 911 933 q 877 929 891 933 q 852 912 863 924 q 830 879 840 900 q 806 825 819 858 l 571 254 q 529 159 549 200 q 489 91 509 119 q 447 45 469 63 q 395 17 424 27 q 328 3 366 7 q 242 0 291 0 l 141 0 l 141 69 l 216 69 q 285 79 252 69 q 347 107 319 88 q 398 150 376 125 q 432 205 420 175 l 116 860 q 97 895 106 881 q 77 917 88 909 q 52 929 66 926 q 18 933 38 933 l 0 933 l 0 992 l 388 992 l 388 933 l 367 933 q 304 917 324 933 q 283 867 283 901 q 286 843 283 855 q 294 815 289 831 l 447 486 q 488 388 471 437 q 517 297 505 339 q 528 339 521 318 q 542 382 534 360 q 559 428 550 404 q 581 481 569 452 l 712 806 q 721 838 718 823 q 724 865 724 854 q 701 917 724 901 q 632 933 678 933 l 603 933 l 603 992 l 938 992 l 938 933 m 740 1259 q 719 1182 735 1216 q 671 1122 702 1147 q 591 1084 639 1098 q 475 1071 543 1071 q 358 1083 406 1071 q 281 1121 310 1096 q 237 1180 251 1145 q 220 1259 223 1215 l 335 1259 q 347 1198 338 1222 q 374 1162 357 1175 q 416 1143 391 1149 q 478 1138 442 1138 q 533 1144 508 1138 q 576 1164 558 1151 q 606 1201 594 1178 q 621 1259 617 1224 l 740 1259 "},"Ŭ":{"x_min":21.4375,"x_max":975.25,"ha":996,"o":"m 502 -14 q 355 3 420 -14 q 245 58 290 20 q 176 155 200 95 q 153 299 153 214 l 153 839 q 143 888 153 869 q 119 917 134 907 q 82 930 103 927 q 39 933 62 933 l 21 933 l 21 992 l 425 992 l 425 933 l 407 933 q 363 930 384 933 q 326 916 342 926 q 302 885 311 905 q 293 832 293 865 l 293 285 q 310 181 293 224 q 358 112 327 138 q 431 72 389 85 q 525 60 474 60 q 629 77 585 60 q 701 122 672 93 q 744 191 730 151 q 758 279 758 231 l 758 838 q 749 888 758 869 q 724 917 739 906 q 688 930 708 927 q 644 933 667 933 l 626 933 l 626 992 l 975 992 l 975 933 l 956 933 q 912 930 933 933 q 876 916 891 926 q 852 886 861 905 q 843 833 843 866 l 843 283 q 820 158 843 214 q 755 65 798 103 q 649 6 712 26 q 502 -14 585 -14 m 515 1071 q 429 1086 466 1071 q 369 1127 393 1101 q 334 1187 346 1153 q 321 1262 322 1222 l 384 1262 q 430 1188 396 1210 q 515 1166 464 1166 q 600 1188 566 1166 q 645 1262 634 1210 l 710 1262 q 696 1187 708 1222 q 660 1127 684 1153 q 600 1086 636 1101 q 515 1071 564 1071 "},"ĝ":{"x_min":32,"x_max":731,"ha":747,"o":"m 731 715 q 726 687 731 700 q 713 664 722 674 q 690 648 704 654 q 657 643 676 643 q 655 658 657 650 q 648 673 653 666 q 634 684 643 680 q 611 688 625 688 q 579 685 593 688 q 551 673 565 681 q 590 604 575 644 q 606 505 606 564 q 590 410 606 453 q 543 334 574 366 q 465 284 512 302 q 355 267 418 267 q 337 267 347 267 q 316 268 326 267 q 297 269 306 268 q 283 271 288 270 q 273 256 278 264 q 264 237 268 248 q 259 214 261 227 q 256 186 256 201 q 262 159 256 169 q 279 143 268 148 q 304 135 289 137 q 335 134 318 134 l 479 134 q 576 118 536 134 q 640 75 615 102 q 677 9 666 47 q 689 -73 689 -29 q 666 -181 689 -133 q 599 -263 644 -230 q 484 -315 554 -297 q 320 -334 415 -334 q 103 -276 175 -334 q 32 -117 32 -219 q 45 -41 32 -74 q 82 13 59 -9 q 136 51 106 36 q 200 72 166 65 q 173 86 186 77 q 149 108 160 96 q 132 138 139 121 q 126 174 126 154 q 148 239 126 212 q 219 292 170 266 q 166 325 189 304 q 126 374 142 346 q 102 434 110 401 q 94 501 94 466 q 110 609 94 561 q 159 689 126 656 q 240 740 191 722 q 355 758 289 758 q 405 754 380 758 q 450 744 429 750 q 487 729 470 737 q 514 712 504 721 q 538 736 524 723 q 568 760 551 749 q 605 779 585 772 q 648 787 625 787 q 685 781 669 787 q 710 765 700 775 q 725 742 720 755 q 731 715 731 729 m 162 -103 q 170 -167 162 -137 q 196 -218 177 -197 q 246 -252 215 -240 q 327 -264 278 -264 q 440 -250 395 -264 q 510 -211 484 -236 q 547 -151 536 -186 q 558 -75 558 -116 q 549 -15 558 -39 q 524 21 541 7 q 484 39 508 34 q 428 45 459 45 l 302 45 q 250 39 276 45 q 206 17 225 33 q 174 -27 186 1 q 162 -103 162 -56 m 224 505 q 254 377 224 417 q 351 336 284 336 q 408 346 385 336 q 447 377 432 356 q 468 430 462 397 q 475 507 475 462 q 446 644 475 600 q 350 688 418 688 q 253 643 282 688 q 224 505 224 598 m 157 860 q 192 905 173 879 q 232 958 212 931 q 268 1013 251 986 q 296 1064 285 1040 l 427 1064 q 455 1013 438 1040 q 491 958 472 986 q 531 905 511 931 q 567 860 550 879 l 567 842 l 512 842 q 432 899 472 864 q 361 966 392 933 q 290 899 329 933 q 211 842 250 864 l 157 842 l 157 860 "},"Ω":{"x_min":58,"x_max":988,"ha":1046,"o":"m 86 608 q 113 771 86 698 q 194 897 140 845 q 331 978 248 950 q 525 1007 414 1007 q 710 978 630 1007 q 847 897 791 950 q 931 771 903 845 q 960 608 960 698 q 879 359 960 454 q 644 233 798 263 l 641 111 l 774 111 q 829 115 806 111 q 868 131 852 120 q 892 158 883 141 q 905 197 901 174 l 916 243 l 988 243 l 978 0 l 565 0 l 575 291 q 682 322 638 298 q 754 388 726 347 q 793 484 781 428 q 806 610 806 540 q 791 747 806 687 q 742 848 776 807 q 655 910 708 889 q 525 932 602 932 q 393 910 447 932 q 304 848 339 889 q 255 747 270 807 q 239 610 239 687 q 252 484 239 540 q 292 388 265 428 q 363 322 320 347 q 470 291 407 298 l 480 0 l 67 0 l 58 243 l 129 243 l 139 197 q 153 158 144 174 q 177 131 161 141 q 215 115 192 120 q 271 111 238 111 l 404 111 l 401 233 q 166 359 247 263 q 86 608 86 454 "},"s":{"x_min":62,"x_max":566,"ha":627,"o":"m 291 -14 q 196 -4 239 -14 q 124 22 154 4 q 78 69 94 41 q 62 133 62 96 q 71 179 62 161 q 93 209 80 198 q 122 224 106 220 q 149 229 137 229 q 156 160 149 192 q 180 104 163 128 q 223 66 196 80 q 290 52 251 52 q 352 61 325 52 q 397 87 379 70 q 425 127 415 104 q 435 178 435 150 q 427 223 435 204 q 401 258 420 241 q 351 291 383 274 q 272 330 320 308 q 183 375 221 353 q 121 423 145 397 q 84 482 96 449 q 72 560 72 515 q 90 645 72 608 q 143 706 109 681 q 226 744 178 731 q 334 757 274 757 q 421 746 383 757 q 485 719 459 736 q 524 678 511 702 q 537 629 537 655 q 510 568 537 591 q 436 546 484 546 q 409 658 436 618 q 325 698 383 698 q 269 690 292 698 q 231 665 246 681 q 209 628 216 650 q 202 581 202 607 q 211 536 202 555 q 240 500 220 516 q 291 468 260 484 q 367 434 323 453 q 456 389 419 411 q 518 340 494 366 q 554 280 542 313 q 566 203 566 247 q 546 108 566 149 q 490 40 526 68 q 404 0 454 13 q 291 -14 353 -14 "},"?":{"x_min":60,"x_max":624,"ha":695,"o":"m 327 279 l 269 279 l 269 489 q 373 546 331 514 q 441 616 416 578 q 478 695 467 654 q 489 777 489 736 q 480 842 489 813 q 452 893 471 872 q 404 925 433 913 q 334 936 375 936 q 260 922 290 936 q 212 883 230 908 q 185 827 193 859 q 177 759 177 795 q 130 764 151 759 q 93 781 108 770 q 68 810 77 793 q 60 849 60 826 q 75 911 60 882 q 122 960 90 939 q 203 994 154 982 q 319 1006 252 1006 q 440 989 385 1006 q 537 939 496 972 q 600 860 577 907 q 624 754 624 813 q 604 650 624 697 q 546 564 584 603 q 453 494 508 526 q 327 435 398 462 l 327 279 m 223 84 q 229 129 223 111 q 248 158 236 147 q 276 174 260 169 q 310 179 292 179 q 344 174 328 179 q 371 158 360 169 q 390 129 383 147 q 398 84 398 111 q 390 39 398 57 q 371 10 383 21 q 344 -5 360 0 q 310 -10 328 -10 q 276 -5 292 -10 q 248 10 260 0 q 229 39 236 21 q 223 84 223 57 "},"Ņ":{"x_min":52.421875,"x_max":1020.5625,"ha":1060,"o":"m 789 0 l 268 800 l 268 158 q 277 105 268 125 q 302 75 287 86 q 338 61 317 65 q 382 58 359 58 l 401 58 l 401 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 306 992 l 804 223 l 804 839 q 795 888 804 869 q 770 917 785 907 q 734 930 754 927 q 690 933 713 933 l 671 933 l 671 992 l 1020 992 l 1020 933 l 1002 933 q 958 930 979 933 q 922 916 937 926 q 897 886 906 905 q 889 833 889 866 l 889 0 l 789 0 m 462 -288 q 484 -188 473 -242 q 504 -85 495 -135 l 625 -85 l 625 -98 q 601 -147 615 -120 q 572 -202 588 -174 q 540 -258 556 -231 q 509 -307 523 -285 l 462 -307 l 462 -288 "},"Ī":{"x_min":52.421875,"x_max":456.640625,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 m 456 1071 l 53 1071 l 53 1153 l 456 1153 l 456 1071 "},"Μ":{"x_min":52.421875,"x_max":1250.578125,"ha":1303,"o":"m 874 0 l 874 58 l 878 58 q 919 61 901 58 q 949 73 937 64 q 969 100 962 82 q 978 145 977 117 l 978 888 l 663 0 l 588 0 l 268 885 l 268 158 q 275 105 268 125 q 295 75 282 86 q 327 61 308 65 q 369 58 346 58 l 373 58 l 373 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 368 992 l 653 197 l 936 992 l 1250 992 l 1250 933 l 1232 933 q 1188 930 1209 933 q 1152 916 1167 926 q 1127 886 1136 905 q 1119 833 1119 866 l 1119 158 q 1127 105 1119 125 q 1152 75 1136 86 q 1188 61 1167 65 q 1232 58 1209 58 l 1250 58 l 1250 0 l 874 0 "},"•":{"x_min":68,"x_max":435,"ha":503,"o":"m 68 494 q 81 590 68 551 q 120 652 95 628 q 178 685 144 675 q 251 696 212 696 q 323 685 289 696 q 381 652 356 675 q 420 590 406 628 q 435 494 435 551 q 420 399 435 437 q 381 337 406 360 q 323 303 356 313 q 251 293 289 293 q 178 303 212 293 q 120 337 144 313 q 81 399 95 360 q 68 494 68 437 "},"н":{"x_min":31.75,"x_max":924.25,"ha":956,"o":"m 924 745 l 924 686 l 905 686 q 862 683 882 686 q 825 670 841 680 q 801 642 810 660 q 792 593 792 623 l 792 151 q 801 102 792 120 q 825 73 810 83 q 862 61 841 64 q 905 58 882 58 l 924 58 l 924 0 l 543 0 l 543 59 l 547 59 q 590 62 570 59 q 627 75 611 65 q 651 103 642 84 q 661 153 661 122 l 661 355 l 294 355 l 294 153 q 304 103 294 122 q 328 75 313 84 q 365 62 344 65 q 408 59 385 59 l 412 59 l 412 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 31 686 l 31 745 l 412 745 l 412 686 l 408 686 q 365 683 385 686 q 328 670 344 680 q 304 642 313 660 q 294 593 294 623 l 294 414 l 661 414 l 661 591 q 651 640 661 622 q 627 669 642 659 q 590 683 611 679 q 547 686 570 686 l 543 686 l 543 745 l 924 745 "},"(":{"x_min":79,"x_max":436,"ha":481,"o":"m 223 439 q 229 276 223 357 q 258 123 236 195 q 322 -9 279 51 q 436 -114 364 -70 l 436 -178 q 272 -85 340 -140 q 161 43 204 -31 q 98 216 118 118 q 79 439 79 314 q 98 662 79 565 q 161 834 118 759 q 272 963 204 909 q 436 1055 340 1017 l 436 992 q 322 888 364 949 q 258 755 279 827 q 229 603 236 684 q 223 439 223 522 "},"◊":{"x_min":41,"x_max":720,"ha":761,"o":"m 408 0 l 352 0 l 41 494 l 352 992 l 408 992 l 720 496 l 408 0 m 381 888 l 141 496 l 381 99 l 619 496 l 381 888 "},"α":{"x_min":77,"x_max":827.46875,"ha":848,"o":"m 710 0 q 652 12 676 0 q 612 43 628 24 q 588 86 597 62 q 576 134 579 110 l 571 134 q 535 75 555 102 q 490 28 515 48 q 431 -2 464 8 q 358 -14 399 -14 q 237 8 290 -14 q 149 78 185 31 q 95 198 113 125 q 77 370 77 270 q 98 544 77 471 q 159 665 120 617 q 255 735 199 712 q 379 758 311 758 q 452 747 420 758 q 510 717 485 736 q 555 671 536 698 q 587 612 573 644 l 596 612 q 625 684 607 648 q 664 745 643 719 l 738 745 q 725 691 732 724 q 713 620 718 658 q 705 543 708 582 q 702 470 702 504 l 702 187 q 731 91 702 125 q 815 58 761 58 l 827 58 l 827 0 l 710 0 m 383 74 q 473 101 437 74 q 531 176 509 128 q 562 288 552 224 q 571 427 571 352 l 571 481 q 544 566 561 531 q 504 624 527 602 q 454 658 481 647 q 397 669 426 669 q 256 593 300 669 q 211 367 211 517 q 251 147 211 220 q 383 74 291 74 "},"Ħ":{"x_min":52.421875,"x_max":1048.578125,"ha":1101,"o":"m 917 691 l 917 151 q 926 101 917 120 q 950 73 935 83 q 987 61 966 64 q 1030 58 1007 58 l 1048 58 l 1048 0 l 644 0 l 644 58 l 662 58 q 707 61 686 58 q 743 75 727 65 q 767 105 758 86 q 776 158 776 125 l 776 483 l 324 483 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 157 184 125 l 184 691 l 52 691 l 52 761 l 184 761 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 761 l 776 761 l 776 833 q 767 886 776 866 q 743 916 758 905 q 707 930 727 926 q 662 933 686 933 l 644 933 l 644 992 l 1048 992 l 1048 933 l 1030 933 q 986 930 1007 933 q 950 916 965 926 q 925 886 934 905 q 917 833 917 866 l 917 761 l 1048 761 l 1048 691 l 917 691 m 776 553 l 776 691 l 324 691 l 324 553 l 776 553 "},"м":{"x_min":31.75,"x_max":1061.25,"ha":1093,"o":"m 1061 0 l 680 0 l 680 58 l 684 58 q 727 61 707 58 q 764 73 748 64 q 788 102 779 83 q 798 151 798 120 l 798 596 l 787 596 l 539 0 l 475 0 l 232 596 l 222 596 l 222 151 q 231 102 222 120 q 256 73 240 83 q 292 61 271 64 q 336 58 313 58 l 340 58 l 340 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 31 686 l 31 745 l 312 745 l 540 183 l 777 745 l 1061 745 l 1061 686 l 1042 686 q 999 683 1019 686 q 962 670 978 680 q 938 642 947 660 q 929 593 929 623 l 929 151 q 938 102 929 120 q 962 73 947 83 q 999 61 978 64 q 1042 58 1019 58 l 1061 58 l 1061 0 "},"з":{"x_min":56,"x_max":603,"ha":679,"o":"m 311 52 q 429 95 391 52 q 468 213 468 138 q 425 316 468 283 q 306 348 382 348 l 177 348 l 177 428 l 308 428 q 369 438 343 428 q 413 467 396 449 q 439 509 431 484 q 448 560 448 533 q 441 612 448 588 q 420 654 435 636 q 381 682 406 672 q 323 693 357 693 q 216 653 253 693 q 179 543 179 613 q 97 563 124 543 q 70 626 70 582 q 84 675 70 651 q 130 717 99 699 q 210 746 162 735 q 325 757 258 757 q 431 744 384 757 q 511 708 478 731 q 561 650 544 684 q 579 574 579 616 q 568 511 579 540 q 540 459 558 482 q 495 419 521 436 q 438 392 470 402 l 438 385 q 505 362 474 376 q 556 327 535 348 q 590 278 578 306 q 603 213 603 250 q 586 124 603 165 q 532 52 569 83 q 440 3 496 21 q 304 -14 384 -14 q 182 0 230 -14 q 105 36 133 14 q 66 85 77 58 q 56 135 56 111 q 158 224 56 224 q 167 156 158 188 q 196 101 177 125 q 244 65 215 78 q 311 52 272 52 "},"Ґ":{"x_min":52.421875,"x_max":720,"ha":756,"o":"m 711 922 l 324 922 l 324 152 q 333 103 324 122 q 358 74 342 84 q 394 61 373 64 q 438 58 415 58 l 484 58 l 484 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 503 992 q 569 1000 543 992 q 610 1025 595 1008 q 632 1064 624 1041 q 642 1117 639 1088 l 648 1165 l 720 1165 l 711 922 "},"Û":{"x_min":21.4375,"x_max":975.25,"ha":996,"o":"m 502 -14 q 355 3 420 -14 q 245 58 290 20 q 176 155 200 95 q 153 299 153 214 l 153 839 q 143 888 153 869 q 119 917 134 907 q 82 930 103 927 q 39 933 62 933 l 21 933 l 21 992 l 425 992 l 425 933 l 407 933 q 363 930 384 933 q 326 916 342 926 q 302 885 311 905 q 293 832 293 865 l 293 285 q 310 181 293 224 q 358 112 327 138 q 431 72 389 85 q 525 60 474 60 q 629 77 585 60 q 701 122 672 93 q 744 191 730 151 q 758 279 758 231 l 758 838 q 749 888 758 869 q 724 917 739 906 q 688 930 708 927 q 644 933 667 933 l 626 933 l 626 992 l 975 992 l 975 933 l 956 933 q 912 930 933 933 q 876 916 891 926 q 852 886 861 905 q 843 833 843 866 l 843 283 q 820 158 843 214 q 755 65 798 103 q 649 6 712 26 q 502 -14 585 -14 m 319 1089 q 354 1134 335 1108 q 394 1187 374 1160 q 430 1242 413 1215 q 458 1293 447 1269 l 589 1293 q 617 1242 600 1269 q 653 1187 634 1215 q 693 1134 673 1160 q 729 1089 712 1108 l 729 1071 l 674 1071 q 594 1128 634 1093 q 523 1195 554 1162 q 452 1128 491 1162 q 373 1071 412 1093 l 319 1071 l 319 1089 "},"і":{"x_min":31.75,"x_max":427.15625,"ha":444,"o":"m 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 294 745 l 294 158 q 304 105 294 125 q 328 75 313 86 q 364 61 343 65 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 m 144 969 q 150 1010 144 993 q 167 1036 156 1026 q 192 1050 177 1046 q 223 1055 206 1055 q 253 1050 239 1055 q 278 1036 268 1046 q 295 1010 289 1026 q 302 969 302 993 q 295 928 302 944 q 278 902 289 912 q 253 887 268 891 q 223 883 239 883 q 192 887 206 883 q 167 902 177 891 q 150 928 156 912 q 144 969 144 944 "},"V":{"x_min":0,"x_max":937,"ha":937,"o":"m 416 0 l 116 860 q 100 896 109 882 q 80 918 91 910 q 53 930 68 926 q 18 933 38 933 l 0 933 l 0 992 l 381 992 l 381 933 l 349 933 q 287 917 307 933 q 266 867 266 901 q 269 843 266 855 q 278 815 272 831 l 430 364 q 466 244 451 302 q 492 136 481 186 q 518 242 503 186 q 556 364 533 299 l 709 806 q 718 838 715 823 q 722 865 722 854 q 699 917 722 901 q 630 933 676 933 l 598 933 l 598 992 l 937 992 l 937 933 l 910 933 q 875 929 890 933 q 849 913 861 925 q 827 880 837 901 q 805 825 816 859 l 518 0 l 416 0 "},"Ŗ":{"x_min":52.421875,"x_max":920,"ha":911,"o":"m 770 168 q 838 85 805 113 q 915 58 871 58 l 920 58 l 920 0 l 900 0 q 793 4 835 0 q 722 22 751 9 q 672 60 693 36 q 628 123 651 84 l 439 433 l 324 433 l 324 150 q 333 101 324 120 q 358 73 342 83 q 394 61 373 64 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 426 992 q 695 924 607 992 q 784 722 784 857 q 765 624 784 666 q 718 551 747 582 q 652 500 689 520 q 579 467 616 479 l 770 168 m 324 503 l 420 503 q 521 516 480 503 q 585 556 561 529 q 619 624 609 583 q 630 718 630 664 q 618 812 630 773 q 581 875 607 851 q 516 911 556 900 q 417 922 475 922 l 324 922 l 324 503 m 368 -288 q 390 -188 379 -242 q 410 -85 401 -135 l 531 -85 l 531 -98 q 507 -147 521 -120 q 478 -202 494 -174 q 446 -258 462 -231 q 415 -307 429 -285 l 368 -307 l 368 -288 "},"@":{"x_min":90,"x_max":1206,"ha":1279,"o":"m 1206 544 q 1181 363 1206 444 q 1117 225 1157 282 q 1029 137 1078 168 q 933 107 981 107 q 830 140 871 107 q 769 232 789 173 l 762 232 q 729 182 747 205 q 689 142 711 159 q 638 116 666 125 q 574 107 610 107 q 494 121 532 107 q 427 164 456 135 q 381 238 398 193 q 364 343 364 282 q 372 424 364 381 q 398 510 380 467 q 445 593 416 553 q 512 664 473 634 q 603 714 551 695 q 717 733 654 733 q 794 720 762 733 q 848 691 827 708 l 903 721 l 937 721 l 866 357 q 861 323 864 340 q 858 292 859 309 q 856 261 856 276 q 864 218 856 236 q 882 187 871 199 q 909 169 894 175 q 941 163 924 163 q 1004 188 972 163 q 1062 261 1036 213 q 1104 379 1087 309 q 1121 539 1121 449 q 1092 703 1121 632 q 1010 822 1062 774 q 886 894 959 870 q 727 919 814 919 q 594 900 659 919 q 470 844 528 881 q 362 754 412 807 q 276 633 312 701 q 220 482 240 565 q 199 305 199 400 q 233 108 199 189 q 322 -25 266 26 q 454 -100 379 -77 q 613 -124 529 -124 q 721 -114 670 -124 q 816 -88 772 -104 q 898 -51 861 -72 q 966 -9 936 -30 l 998 -59 q 921 -109 964 -85 q 828 -153 878 -134 q 721 -185 779 -173 q 600 -197 664 -197 q 394 -166 488 -197 q 233 -72 300 -135 q 127 83 165 -10 q 90 302 90 176 q 111 490 90 401 q 173 656 132 579 q 270 794 213 732 q 400 900 328 857 q 556 968 471 944 q 735 992 640 992 q 940 957 852 992 q 1087 862 1028 922 q 1176 720 1146 802 q 1206 544 1206 639 m 492 312 q 522 200 492 237 q 598 163 551 163 q 659 179 633 163 q 703 220 685 195 q 731 277 720 245 q 748 342 742 309 l 801 633 q 770 664 792 653 q 723 676 748 676 q 648 657 682 676 q 589 608 614 639 q 545 540 564 578 q 515 460 527 501 q 498 381 503 420 q 492 312 492 343 "},"ʼ":{"x_min":41,"x_max":269,"ha":347,"o":"m 269 871 q 256 785 269 827 q 217 708 244 744 q 146 645 189 673 q 41 599 103 617 l 41 657 q 141 710 109 679 q 173 782 173 741 q 165 805 173 795 q 147 821 158 814 q 122 835 135 828 q 98 851 109 842 q 79 874 86 861 q 72 909 72 888 q 98 970 72 949 q 162 992 124 992 q 203 984 184 992 q 237 961 222 976 q 260 923 252 945 q 269 871 269 900 "},"℅":{"x_min":56,"x_max":994,"ha":1050,"o":"m 316 0 l 225 0 l 720 992 l 811 992 l 316 0 m 666 223 q 688 111 666 149 q 767 74 710 74 q 845 111 822 74 q 867 223 867 149 q 844 332 867 296 q 765 368 821 368 q 688 332 710 368 q 666 223 666 296 m 994 222 q 935 44 994 103 q 765 -14 877 -14 q 670 0 712 -14 q 599 44 628 15 q 555 118 570 74 q 540 222 540 162 q 597 399 540 341 q 769 457 654 457 q 863 442 821 457 q 933 398 904 427 q 978 325 962 369 q 994 222 994 281 m 285 529 q 192 543 234 529 q 120 586 150 557 q 72 659 89 615 q 56 764 56 703 q 72 877 56 831 q 119 949 89 922 q 190 988 149 976 q 279 1000 231 1000 q 342 993 310 1000 q 399 974 373 986 q 440 944 424 962 q 456 902 456 926 q 448 871 456 887 q 426 842 441 855 q 391 821 412 829 q 341 814 369 814 q 338 847 341 830 q 328 879 335 865 q 308 902 321 893 q 276 911 295 911 q 237 906 254 911 q 207 883 220 900 q 188 837 195 866 q 182 760 182 808 q 211 651 182 685 q 302 617 241 617 q 385 634 353 617 q 435 676 418 651 q 449 661 443 671 q 456 634 456 651 q 445 597 456 617 q 413 562 434 577 q 360 538 392 547 q 285 529 327 529 "},"i":{"x_min":31.75,"x_max":427.15625,"ha":444,"o":"m 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 294 745 l 294 158 q 304 105 294 125 q 328 75 313 86 q 364 61 343 65 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 m 144 969 q 150 1010 144 993 q 167 1036 156 1026 q 192 1050 177 1046 q 223 1055 206 1055 q 253 1050 239 1055 q 278 1036 268 1046 q 295 1010 289 1026 q 302 969 302 993 q 295 928 302 944 q 278 902 289 912 q 253 887 268 891 q 223 883 239 883 q 192 887 206 883 q 167 902 177 891 q 150 928 156 912 q 144 969 144 944 "},"ќ":{"x_min":11.96875,"x_max":828,"ha":840,"o":"m 779 0 q 688 5 726 0 q 622 25 650 10 q 572 64 593 39 q 529 129 550 89 l 461 261 q 430 309 445 291 q 395 338 415 328 q 348 351 375 348 q 281 354 321 354 l 281 149 q 291 101 281 119 q 315 73 300 83 q 352 61 331 64 q 395 58 372 58 l 399 58 l 399 0 l 11 0 l 11 58 l 37 58 q 81 61 60 58 q 117 75 102 65 q 141 105 132 86 q 151 158 151 125 l 151 591 q 141 640 151 622 q 117 669 132 659 q 80 683 101 679 q 37 686 60 686 l 11 686 l 11 745 l 399 745 l 399 686 l 395 686 q 352 683 373 686 q 316 671 332 680 q 291 644 300 662 q 281 599 281 627 l 281 424 q 317 425 302 424 q 343 430 332 427 q 363 439 354 434 q 381 453 372 445 q 422 505 398 469 q 482 594 446 541 q 526 660 505 631 q 570 710 547 689 q 621 741 593 730 q 690 753 650 753 q 779 729 749 753 q 810 668 810 706 q 804 633 810 648 q 789 607 799 618 q 768 590 780 597 q 743 580 756 583 q 734 610 740 596 q 718 635 728 624 q 695 652 709 645 q 665 658 682 658 q 602 632 631 658 q 539 552 574 606 q 505 504 520 525 q 477 467 490 483 q 452 439 464 451 q 426 417 439 427 q 483 408 458 416 q 527 384 507 399 q 564 347 547 369 q 595 297 580 325 l 668 169 q 739 84 701 110 q 823 58 777 58 l 828 58 l 828 0 l 779 0 m 353 860 q 385 905 368 879 q 417 958 401 931 q 448 1013 433 986 q 473 1064 462 1040 l 622 1064 l 622 1049 q 584 1004 609 1031 q 528 946 558 976 q 465 889 498 917 q 405 842 433 860 l 353 842 l 353 860 "},"≤":{"x_min":90,"x_max":687,"ha":777,"o":"m 90 471 l 90 520 l 687 841 l 687 748 l 219 495 l 687 244 l 687 152 l 90 471 m 687 0 l 90 0 l 90 82 l 687 82 l 687 0 "},"ё":{"x_min":77,"x_max":673,"ha":743,"o":"m 384 678 q 264 617 306 678 q 214 438 222 556 l 538 438 q 529 536 538 491 q 503 612 521 580 q 456 661 485 644 q 384 678 427 678 m 398 -14 q 263 11 323 -14 q 162 85 203 36 q 98 205 120 134 q 77 366 77 276 q 156 659 77 561 q 384 758 236 758 q 505 736 451 758 q 595 673 558 715 q 653 568 633 631 q 673 423 673 505 l 673 358 l 211 358 q 227 230 213 284 q 266 142 241 176 q 330 91 292 107 q 417 74 368 74 q 484 82 453 74 q 540 104 515 90 q 584 134 565 117 q 615 170 603 151 q 633 153 625 165 q 642 122 642 140 q 627 77 642 101 q 581 33 612 53 q 505 0 551 13 q 398 -14 459 -14 m 172 956 q 177 992 172 977 q 192 1016 182 1007 q 214 1029 201 1025 q 242 1034 227 1034 q 270 1029 257 1034 q 293 1016 283 1025 q 308 992 302 1007 q 313 956 313 977 q 308 920 313 934 q 293 895 302 905 q 270 882 283 886 q 242 878 257 878 q 192 895 212 878 q 172 956 172 913 m 436 956 q 441 992 436 977 q 456 1016 446 1007 q 478 1029 465 1025 q 506 1034 491 1034 q 534 1029 521 1034 q 557 1016 547 1025 q 572 992 566 1007 q 577 956 577 977 q 572 920 577 934 q 557 895 566 905 q 534 882 547 886 q 506 878 521 878 q 456 895 476 878 q 436 956 436 913 "},"υ":{"x_min":25.203125,"x_max":747,"ha":823,"o":"m 426 -14 q 304 5 356 -14 q 218 62 253 25 q 166 154 183 100 q 150 276 150 208 l 150 591 q 139 640 150 622 q 112 669 129 659 q 74 683 95 679 q 29 686 52 686 l 25 686 l 25 745 l 280 745 l 280 288 q 324 129 280 183 q 448 74 368 74 q 554 100 513 74 q 618 170 595 125 q 651 277 642 216 q 660 412 660 339 q 648 515 660 470 q 618 593 637 561 q 575 643 599 624 q 528 669 551 662 q 535 706 528 690 q 552 733 541 722 q 578 750 563 744 q 609 756 593 756 q 671 729 645 756 q 714 658 697 702 q 738 558 730 614 q 747 444 747 502 q 740 328 747 385 q 719 220 734 271 q 681 126 704 169 q 621 52 657 83 q 537 3 585 21 q 426 -14 489 -14 "},"ĕ":{"x_min":77,"x_max":673,"ha":743,"o":"m 384 678 q 264 617 306 678 q 214 438 222 556 l 538 438 q 529 536 538 491 q 503 612 521 580 q 456 661 485 644 q 384 678 427 678 m 398 -14 q 263 11 323 -14 q 162 85 203 36 q 98 205 120 134 q 77 366 77 276 q 156 659 77 561 q 384 758 236 758 q 505 736 451 758 q 595 673 558 715 q 653 568 633 631 q 673 423 673 505 l 673 358 l 211 358 q 227 230 213 284 q 266 142 241 176 q 330 91 292 107 q 417 74 368 74 q 484 82 453 74 q 540 104 515 90 q 584 134 565 117 q 615 170 603 151 q 633 153 625 165 q 642 122 642 140 q 627 77 642 101 q 581 33 612 53 q 505 0 551 13 q 398 -14 459 -14 m 385 842 q 299 857 336 842 q 239 898 263 872 q 204 958 216 924 q 191 1033 192 993 l 254 1033 q 300 959 266 981 q 385 937 334 937 q 470 959 436 937 q 515 1033 504 981 l 580 1033 q 566 958 578 993 q 530 898 554 924 q 470 857 506 872 q 385 842 434 842 "},"ffi":{"x_min":37.734375,"x_max":1373.46875,"ha":1392,"o":"m 997 58 q 1040 61 1020 58 q 1077 73 1061 64 q 1101 101 1092 83 q 1111 150 1111 120 l 1111 675 l 771 675 l 771 157 q 780 105 771 125 q 805 75 789 86 q 841 61 820 65 q 885 58 862 58 l 910 58 l 910 0 l 509 0 l 509 58 l 527 58 q 571 61 550 58 q 607 75 592 65 q 631 105 622 86 q 641 157 641 125 l 641 675 l 300 675 l 300 157 q 310 105 300 125 q 334 75 319 86 q 370 61 349 65 q 414 58 391 58 l 439 58 l 439 0 l 37 0 l 37 58 l 56 58 q 100 61 79 58 q 136 75 121 65 q 160 105 151 86 q 170 157 170 125 l 170 675 l 43 675 l 43 745 l 170 745 l 170 761 q 237 980 170 906 q 426 1055 304 1055 q 511 1048 476 1055 q 568 1030 546 1041 q 600 1001 590 1018 q 610 963 610 984 q 601 929 610 944 q 577 905 593 915 q 541 890 562 895 q 496 885 521 885 q 491 926 496 906 q 476 962 487 946 q 448 987 466 977 q 404 996 431 996 q 355 981 375 996 q 323 937 335 965 q 305 869 311 908 q 300 781 300 830 l 300 745 l 641 745 l 641 755 q 660 890 641 830 q 721 991 680 950 q 824 1054 762 1032 q 972 1076 887 1076 q 1166 1047 1101 1076 q 1232 966 1232 1018 q 1222 928 1232 945 q 1196 899 1213 911 q 1156 881 1179 888 q 1105 874 1133 874 q 1097 920 1105 895 q 1072 966 1090 945 q 1024 1003 1055 988 q 949 1017 994 1017 q 861 997 895 1017 q 807 942 826 977 q 779 859 787 907 q 771 756 771 811 l 771 745 l 1241 745 l 1241 158 q 1251 105 1241 125 q 1275 75 1260 86 q 1311 61 1290 65 q 1355 58 1332 58 l 1373 58 l 1373 0 l 993 0 l 993 58 l 997 58 "},"ż":{"x_min":58,"x_max":632,"ha":710,"o":"m 471 79 q 512 88 496 79 q 538 113 528 98 q 555 150 549 129 q 566 193 562 170 l 573 225 l 632 225 l 625 0 l 58 0 l 58 55 l 461 665 l 243 665 q 198 658 216 665 q 169 637 180 651 q 150 602 158 623 q 136 553 143 581 l 135 548 l 78 548 l 91 745 l 624 745 l 624 688 l 219 79 l 471 79 m 290 970 q 296 1011 290 994 q 313 1037 302 1027 q 338 1051 323 1047 q 369 1056 352 1056 q 400 1051 385 1056 q 425 1037 414 1047 q 442 1011 436 1027 q 449 970 449 994 q 442 929 449 945 q 425 903 436 913 q 400 888 414 892 q 369 884 385 884 q 338 888 352 884 q 313 903 323 892 q 296 929 302 913 q 290 970 290 945 "},"Э":{"x_min":62,"x_max":772,"ha":851,"o":"m 359 -14 q 217 1 274 -14 q 125 41 160 17 q 76 96 91 66 q 62 156 62 126 q 93 233 62 207 q 178 259 124 259 q 188 187 178 222 q 221 123 199 152 q 278 78 243 95 q 362 60 313 60 q 472 91 425 60 q 551 176 519 122 q 599 305 582 230 q 618 465 615 379 l 234 465 l 234 535 l 618 535 q 601 704 615 630 q 558 828 586 777 q 485 905 529 878 q 377 931 440 931 q 296 915 331 931 q 238 873 261 899 q 202 812 214 846 q 189 742 189 778 q 107 764 138 742 q 76 829 76 786 q 94 896 76 864 q 150 952 113 928 q 245 991 188 976 q 379 1006 302 1006 q 545 973 472 1006 q 668 878 618 941 q 745 720 718 814 q 772 503 772 626 q 744 290 772 386 q 664 127 717 195 q 535 22 611 59 q 359 -14 458 -14 "},"ő":{"x_min":77,"x_max":725,"ha":802,"o":"m 725 373 q 641 81 725 177 q 398 -14 558 -14 q 264 9 323 -14 q 162 81 204 33 q 99 202 121 129 q 77 373 77 275 q 159 663 77 568 q 403 758 241 758 q 537 734 478 758 q 639 663 597 711 q 702 543 680 615 q 725 373 725 471 m 211 374 q 222 236 211 295 q 254 136 232 176 q 313 75 277 96 q 402 55 349 55 q 489 75 454 55 q 548 136 525 96 q 580 236 570 176 q 590 374 590 295 q 579 511 590 452 q 547 609 569 570 q 488 668 525 649 q 400 688 452 688 q 312 668 348 688 q 254 609 276 649 q 222 511 232 570 q 211 374 211 452 m 189 842 l 189 860 q 219 908 203 882 q 251 961 235 934 q 282 1014 267 988 q 307 1064 296 1040 l 456 1064 l 456 1049 q 435 1021 448 1037 q 405 985 422 1004 q 368 946 388 966 q 329 907 349 926 q 291 871 309 888 q 256 842 272 854 l 189 842 m 440 842 l 440 860 q 470 908 454 882 q 502 961 486 934 q 533 1014 518 988 q 558 1064 547 1040 l 707 1064 l 707 1049 q 686 1021 699 1037 q 656 985 673 1004 q 619 946 639 966 q 580 907 600 926 q 542 871 560 888 q 507 842 523 854 l 440 842 "},"Ŏ":{"x_min":78,"x_max":952,"ha":1031,"o":"m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 m 515 1071 q 429 1086 466 1071 q 369 1127 393 1101 q 334 1187 346 1153 q 321 1262 322 1222 l 384 1262 q 430 1188 396 1210 q 515 1166 464 1166 q 600 1188 566 1166 q 645 1262 634 1210 l 710 1262 q 696 1187 708 1222 q 660 1127 684 1153 q 600 1086 636 1101 q 515 1071 564 1071 "},"ю":{"x_min":31.75,"x_max":1117,"ha":1193,"o":"m 1117 373 q 1037 81 1117 177 q 804 -14 957 -14 q 678 8 734 -14 q 583 75 622 30 q 521 189 543 121 q 496 355 498 257 l 294 355 l 294 153 q 304 102 294 121 q 328 74 313 83 q 365 61 344 64 q 408 58 385 58 l 412 58 l 412 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 31 686 l 31 745 l 412 745 l 412 686 l 408 686 q 365 683 385 686 q 328 670 344 680 q 304 642 313 660 q 294 593 294 623 l 294 414 l 496 414 q 583 672 504 587 q 808 758 662 758 q 937 734 880 758 q 1034 663 994 711 q 1095 543 1074 615 q 1117 373 1117 471 m 630 374 q 640 236 630 295 q 670 136 649 176 q 724 75 691 96 q 807 55 758 55 q 888 75 855 55 q 943 136 922 96 q 972 236 963 176 q 982 374 982 295 q 972 511 982 452 q 942 609 963 570 q 887 668 921 649 q 805 688 853 688 q 723 668 757 688 q 669 609 690 649 q 640 511 649 570 q 630 374 630 452 "},"İ":{"x_min":52.421875,"x_max":456.640625,"ha":510,"o":"m 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 m 175 1199 q 181 1240 175 1223 q 198 1266 187 1256 q 223 1280 208 1276 q 254 1285 237 1285 q 285 1280 270 1285 q 310 1266 299 1276 q 327 1240 321 1256 q 334 1199 334 1223 q 327 1158 334 1174 q 310 1132 321 1142 q 285 1117 299 1121 q 254 1113 270 1113 q 223 1117 237 1113 q 198 1132 208 1121 q 181 1158 187 1142 q 175 1199 175 1174 "},"Ě":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 324 69 l 592 69 q 649 78 626 69 q 688 103 673 87 q 713 139 704 118 q 725 183 722 160 l 735 243 l 807 243 l 797 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 753 992 l 760 749 l 688 749 l 681 808 q 670 852 678 831 q 648 888 662 873 q 611 913 633 904 q 558 922 589 922 l 324 922 l 324 553 l 660 553 l 660 483 l 324 483 l 324 69 m 225 1293 l 279 1293 q 319 1265 298 1280 q 358 1234 339 1251 q 395 1200 377 1217 q 429 1166 413 1183 q 462 1200 444 1183 q 500 1234 480 1217 q 540 1265 520 1251 q 580 1293 561 1280 l 635 1293 l 635 1274 q 599 1229 618 1255 q 559 1176 579 1203 q 523 1121 540 1148 q 495 1071 506 1094 l 364 1071 q 336 1121 353 1094 q 300 1176 319 1148 q 260 1229 280 1203 q 225 1274 241 1255 l 225 1293 "},"‹":{"x_min":91.25,"x_max":373,"ha":463,"o":"m 91 397 l 303 639 l 373 639 l 233 375 l 373 111 l 303 111 l 91 352 l 91 397 "},"ķ":{"x_min":25.203125,"x_max":814,"ha":813,"o":"m 470 447 l 656 172 q 727 87 691 116 q 809 58 763 58 l 814 58 l 814 0 l 794 0 q 694 3 733 0 q 627 21 655 7 q 575 62 599 35 q 522 135 551 88 l 383 352 l 280 276 l 280 151 q 290 102 280 120 q 314 73 299 83 q 351 61 330 64 q 394 58 371 58 l 398 58 l 398 0 l 25 0 l 25 58 l 36 58 q 80 61 59 58 q 116 75 101 65 q 140 105 131 86 q 150 158 150 125 l 150 902 q 140 951 150 932 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 25 996 l 25 1055 l 280 1055 l 280 519 q 280 471 280 500 q 278 413 279 441 q 275 344 276 380 l 449 534 q 486 578 471 559 q 509 612 500 597 q 521 637 518 626 q 525 658 525 648 q 508 681 525 676 q 457 686 491 686 l 457 745 l 764 745 l 764 686 q 669 652 715 686 q 568 557 622 618 l 470 447 m 342 -288 q 364 -188 353 -242 q 384 -85 375 -135 l 505 -85 l 505 -98 q 481 -147 495 -120 q 452 -202 468 -174 q 420 -258 436 -231 q 389 -307 403 -285 l 342 -307 l 342 -288 "},"ì":{"x_min":26,"x_max":427.15625,"ha":444,"o":"m 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 294 745 l 294 158 q 304 105 294 125 q 328 75 313 86 q 364 61 343 65 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 m 296 842 l 243 842 q 182 889 215 860 q 119 946 150 917 q 63 1004 89 976 q 26 1049 38 1031 l 26 1064 l 174 1064 q 200 1013 185 1040 q 230 958 214 986 q 264 905 247 931 q 296 860 281 879 l 296 842 "},"±":{"x_min":90,"x_max":685,"ha":777,"o":"m 428 455 l 428 199 l 346 199 l 346 455 l 90 455 l 90 538 l 346 538 l 346 794 l 428 794 l 428 538 l 685 538 l 685 455 l 428 455 m 685 0 l 90 0 l 90 82 l 685 82 l 685 0 "},"|":{"x_min":346,"x_max":428.0625,"ha":777,"o":"m 428 -334 l 346 -334 l 346 1055 l 428 1055 l 428 -334 "},"§":{"x_min":109,"x_max":685,"ha":756,"o":"m 405 539 q 312 585 355 562 q 232 637 268 608 q 207 604 217 623 q 197 558 197 585 q 207 508 197 530 q 239 464 216 486 q 301 421 262 443 q 400 369 340 398 q 482 327 442 348 q 556 276 523 305 q 575 312 568 292 q 583 355 583 332 q 576 400 583 379 q 550 442 569 421 q 496 487 531 464 q 405 539 461 511 m 387 -88 q 514 -51 472 -88 q 556 48 556 -14 q 549 102 556 79 q 516 147 541 124 q 442 197 490 170 q 312 265 394 225 q 219 320 257 292 q 155 379 180 348 q 120 446 131 410 q 109 523 109 482 q 132 614 109 575 q 191 678 155 653 q 152 746 165 709 q 140 834 140 784 q 159 928 140 887 q 212 997 178 969 q 293 1040 246 1025 q 395 1055 340 1055 q 494 1043 452 1055 q 565 1010 537 1031 q 607 961 593 989 q 621 899 621 932 q 594 834 621 854 q 522 814 567 814 q 515 877 522 847 q 493 932 509 908 q 451 971 477 956 q 389 985 426 985 q 282 951 320 985 q 243 850 243 916 q 257 789 243 814 q 298 744 271 764 q 366 705 326 724 q 458 661 406 686 q 560 604 517 632 q 630 544 603 575 q 671 479 658 513 q 685 404 685 444 q 677 354 685 379 q 659 306 670 329 q 632 264 647 284 q 601 227 617 244 q 632 166 620 200 q 644 90 644 132 q 628 -10 644 35 q 581 -88 613 -55 q 498 -139 549 -121 q 377 -158 448 -158 q 280 -147 324 -158 q 205 -115 237 -136 q 157 -65 174 -95 q 141 4 141 -35 q 150 51 141 32 q 172 81 159 69 q 201 96 185 92 q 228 101 216 101 q 237 30 228 64 q 266 -30 246 -4 q 315 -72 285 -56 q 387 -88 345 -88 "},"џ":{"x_min":31.75,"x_max":909.578125,"ha":942,"o":"m 909 0 l 613 0 q 552 -16 575 0 q 517 -68 529 -33 q 501 -159 504 -104 q 497 -291 497 -214 l 439 -291 q 433 -159 439 -214 q 412 -68 427 -104 q 373 -16 398 -33 q 311 0 348 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 74 114 64 q 154 103 145 84 q 164 152 164 122 l 164 593 q 154 642 164 623 q 130 670 145 660 q 93 683 114 680 q 50 686 73 686 l 31 686 l 31 745 l 427 745 l 427 686 l 408 686 q 365 683 385 686 q 328 670 344 680 q 304 642 313 660 q 294 593 294 623 l 294 63 l 647 63 l 647 593 q 637 642 647 623 q 613 670 628 660 q 576 683 597 680 q 533 686 556 686 l 515 686 l 515 745 l 909 745 l 909 686 l 891 686 q 848 683 868 686 q 811 670 827 680 q 787 642 796 660 q 778 593 778 623 l 778 151 q 787 102 778 120 q 811 73 796 83 q 848 61 827 64 q 891 58 868 58 l 909 58 l 909 0 "},"љ":{"x_min":0,"x_max":1111,"ha":1188,"o":"m 319 600 q 309 644 319 628 q 285 671 300 661 q 248 683 269 680 q 205 686 228 686 l 186 686 l 186 745 l 830 745 l 830 686 l 811 686 q 768 683 788 686 q 731 669 747 679 q 707 640 716 659 q 697 591 697 622 l 697 414 l 790 414 q 912 406 855 414 q 1014 377 970 399 q 1084 316 1058 355 q 1111 212 1111 276 q 1093 127 1111 166 q 1040 60 1075 88 q 950 15 1004 31 q 823 0 896 0 l 434 0 l 434 58 l 453 58 q 496 61 476 58 q 533 74 517 64 q 557 102 548 83 q 567 152 567 121 l 567 686 l 398 686 q 382 558 391 622 q 363 434 373 494 q 341 318 353 373 q 316 216 329 263 q 277 109 297 152 q 234 39 258 65 q 179 1 210 12 q 111 -10 149 -10 q 27 15 55 -10 q 0 86 0 40 q 16 147 0 122 q 60 171 32 171 q 65 151 60 162 q 77 130 69 139 q 98 113 86 120 q 128 106 111 106 q 165 112 148 106 q 199 138 182 118 q 233 197 216 158 q 267 302 249 236 q 284 371 275 330 q 301 453 293 411 q 313 534 308 495 q 319 600 319 573 m 799 58 q 879 66 846 58 q 934 94 913 75 q 966 144 956 113 q 976 217 976 174 q 927 319 976 289 q 790 350 879 350 l 697 350 l 697 58 l 799 58 "},"q":{"x_min":77,"x_max":828.46875,"ha":853,"o":"m 828 -334 l 412 -334 l 412 -275 l 458 -275 q 502 -272 481 -275 q 538 -258 523 -268 q 562 -227 553 -247 q 572 -175 572 -207 l 572 -55 q 572 -1 572 -32 q 574 57 573 29 q 577 124 576 90 l 572 124 q 536 67 556 92 q 490 23 516 41 q 432 -4 465 5 q 359 -14 400 -14 q 238 8 291 -14 q 149 78 185 31 q 95 198 113 125 q 77 370 77 270 q 95 544 77 471 q 149 665 113 617 q 238 735 185 712 q 359 758 291 758 q 431 749 399 758 q 490 724 464 740 q 536 685 516 707 q 572 635 557 663 l 580 635 l 605 745 l 828 745 l 828 686 l 816 686 q 772 683 793 686 q 736 669 751 679 q 712 638 721 658 q 703 586 703 618 l 703 -180 q 712 -229 703 -211 q 736 -258 721 -248 q 773 -272 752 -268 q 816 -275 793 -275 l 828 -275 l 828 -334 m 383 74 q 473 92 437 74 q 531 147 509 110 q 562 239 553 184 q 572 370 572 295 q 562 498 572 443 q 531 592 553 554 q 473 649 509 629 q 382 669 436 669 q 304 649 336 669 q 251 591 272 629 q 221 497 230 553 q 211 369 211 441 q 251 148 211 221 q 383 74 291 74 "},"˳":{"x_min":64,"x_max":398,"ha":463,"o":"m 398 -236 q 385 -301 398 -273 q 349 -348 372 -329 q 296 -377 326 -367 q 231 -387 265 -387 q 165 -377 196 -387 q 112 -348 135 -367 q 76 -301 89 -329 q 64 -236 64 -273 q 76 -171 64 -199 q 112 -123 89 -142 q 165 -94 135 -104 q 231 -85 196 -85 q 296 -94 265 -85 q 349 -123 326 -104 q 385 -171 372 -142 q 398 -236 398 -199 m 322 -236 q 315 -197 322 -213 q 295 -172 308 -181 q 266 -157 283 -162 q 231 -152 250 -152 q 195 -157 211 -152 q 166 -172 178 -162 q 146 -197 153 -181 q 139 -236 139 -213 q 146 -274 139 -258 q 166 -299 153 -290 q 195 -314 178 -309 q 231 -319 211 -319 q 266 -314 250 -319 q 295 -299 283 -309 q 315 -274 308 -290 q 322 -236 322 -258 "},"ή":{"x_min":99.375,"x_max":730.453125,"ha":840,"o":"m 136 470 q 132 543 136 504 q 124 620 129 582 q 112 691 119 658 q 99 745 105 724 l 177 745 q 216 685 200 716 q 243 618 232 654 l 252 618 q 286 671 267 645 q 331 716 306 696 q 390 746 357 735 q 466 758 423 758 q 571 742 526 758 q 645 693 616 726 q 689 608 675 660 q 704 486 704 557 l 704 -97 q 706 -157 704 -123 q 711 -227 708 -192 q 720 -291 715 -262 q 730 -334 725 -320 l 596 -334 q 586 -291 590 -321 q 578 -226 581 -262 q 574 -151 575 -190 q 573 -81 573 -112 l 573 492 q 535 624 573 580 q 435 669 497 669 q 356 650 388 669 q 304 598 324 632 q 275 514 284 564 q 266 404 266 465 l 266 0 l 136 0 l 136 470 m 395 860 q 411 904 403 878 q 427 958 420 930 q 442 1013 435 986 q 452 1064 448 1041 l 577 1064 l 577 1049 q 557 1006 572 1033 q 523 949 543 979 q 480 890 502 919 q 440 842 458 861 l 395 842 l 395 860 "},"Ж":{"x_min":0,"x_max":1360,"ha":1360,"o":"m 615 839 q 605 888 615 869 q 581 917 596 907 q 544 930 565 927 q 501 933 524 933 l 497 933 l 497 992 l 873 992 l 873 933 l 869 933 q 825 930 846 933 q 788 916 804 926 q 764 886 773 905 q 755 834 755 866 l 755 531 q 800 533 782 531 q 829 540 817 535 q 849 554 841 545 q 867 572 858 562 q 909 646 884 594 q 973 773 935 697 q 1025 867 999 826 q 1080 938 1051 909 q 1143 984 1109 968 q 1216 1000 1176 1000 q 1267 993 1246 1000 q 1302 974 1289 986 q 1321 947 1315 963 q 1327 912 1327 930 q 1321 876 1327 892 q 1306 848 1316 860 q 1285 829 1297 836 q 1260 818 1273 821 q 1251 853 1257 836 q 1236 881 1245 869 q 1212 901 1226 894 q 1180 908 1198 908 q 1104 867 1140 908 q 1026 739 1068 826 q 988 662 1005 695 q 958 603 972 628 q 931 559 944 577 q 902 525 918 540 q 964 515 938 524 q 1009 492 990 507 q 1044 455 1029 477 q 1074 404 1059 433 l 1202 169 q 1272 84 1234 110 q 1356 58 1310 58 l 1360 58 l 1360 0 l 1340 0 q 1232 5 1275 0 q 1159 25 1188 11 q 1109 66 1130 40 q 1068 132 1088 92 l 943 377 q 913 427 927 408 q 881 456 900 446 q 832 469 862 466 q 755 472 803 472 l 755 159 q 764 106 755 126 q 788 75 773 86 q 825 61 804 65 q 869 58 846 58 l 873 58 l 873 0 l 497 0 l 497 58 l 501 58 q 544 61 524 58 q 581 74 565 64 q 605 102 596 83 q 615 152 615 121 l 615 472 q 536 469 566 472 q 487 456 506 466 q 453 427 467 446 q 423 377 439 408 l 296 132 q 254 66 275 92 q 204 25 233 40 q 130 5 174 11 q 19 0 86 0 l 0 0 l 0 58 l 4 58 q 89 84 50 58 q 159 169 127 110 l 290 404 q 320 455 305 433 q 356 492 336 477 q 402 515 376 507 q 465 525 428 524 q 435 559 448 540 q 408 603 422 577 q 377 662 393 628 q 338 739 360 695 q 259 867 296 826 q 181 908 222 908 q 148 901 163 908 q 124 881 134 894 q 108 853 114 869 q 99 818 102 836 q 74 829 86 821 q 53 848 62 836 q 38 876 43 860 q 33 912 33 892 q 39 947 33 930 q 58 974 45 963 q 93 993 71 986 q 145 1000 115 1000 q 220 984 186 1000 q 283 938 254 968 q 339 867 313 909 q 393 773 366 826 q 457 646 431 697 q 501 572 483 594 q 518 554 509 562 q 539 540 527 545 q 569 533 551 535 q 615 531 587 531 l 615 839 "},"®":{"x_min":77,"x_max":1097,"ha":1174,"o":"m 323 255 l 342 255 q 367 256 355 255 q 389 263 380 258 q 403 277 398 267 q 410 301 409 286 l 410 690 q 403 715 409 705 q 389 729 398 724 q 367 735 380 734 q 342 737 355 737 l 323 737 l 323 796 l 573 796 q 812 627 812 796 q 801 568 812 593 q 772 523 790 542 q 732 492 755 505 q 686 472 709 479 l 809 288 q 822 271 816 278 q 837 261 828 265 q 858 256 846 257 q 887 255 870 255 l 887 196 l 740 196 l 587 448 l 514 448 l 514 299 q 521 276 515 284 q 535 262 526 267 q 556 256 544 258 q 582 255 568 255 l 601 255 l 601 196 l 323 196 l 323 255 m 514 507 l 571 507 q 632 514 607 507 q 670 535 656 521 q 691 571 685 549 q 698 623 698 593 q 690 673 698 653 q 668 707 683 694 q 627 725 652 719 q 567 731 602 731 l 514 731 l 514 507 m 77 495 q 95 631 77 566 q 146 753 113 696 q 225 857 179 810 q 328 937 272 903 q 450 988 385 970 q 585 1007 515 1007 q 721 988 656 1007 q 843 937 787 970 q 947 857 900 903 q 1027 753 993 810 q 1078 631 1060 696 q 1097 495 1097 566 q 1078 359 1097 424 q 1027 238 1060 294 q 947 134 993 181 q 843 55 900 88 q 721 3 787 21 q 585 -14 656 -14 q 450 3 515 -14 q 328 55 385 21 q 225 134 272 88 q 146 238 179 181 q 95 359 113 294 q 77 495 77 424 m 152 495 q 168 380 152 436 q 212 277 184 325 q 280 189 240 228 q 367 121 319 149 q 471 77 416 93 q 586 61 526 61 q 702 77 646 61 q 806 121 757 93 q 893 189 854 149 q 961 277 933 228 q 1005 380 989 325 q 1021 495 1021 436 q 1005 611 1021 555 q 961 715 989 666 q 893 803 933 764 q 806 871 854 843 q 702 915 757 899 q 586 931 646 931 q 471 915 526 931 q 367 871 416 899 q 280 803 319 843 q 212 715 240 764 q 168 611 184 666 q 152 495 152 556 "},"Н":{"x_min":52.421875,"x_max":1048.578125,"ha":1101,"o":"m 644 0 l 644 58 l 662 58 q 707 61 686 58 q 743 75 727 65 q 767 105 758 86 q 776 158 776 125 l 776 483 l 324 483 l 324 158 q 333 105 324 125 q 357 75 342 86 q 394 61 373 65 q 438 58 415 58 l 456 58 l 456 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 158 184 125 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 456 992 l 456 933 l 438 933 q 394 930 415 933 q 357 916 373 926 q 333 886 342 905 q 324 833 324 866 l 324 553 l 776 553 l 776 833 q 767 886 776 866 q 743 916 758 905 q 707 930 727 926 q 662 933 686 933 l 644 933 l 644 992 l 1048 992 l 1048 933 l 1030 933 q 986 930 1007 933 q 950 916 965 926 q 925 886 934 905 q 917 833 917 866 l 917 151 q 926 102 917 120 q 950 73 935 83 q 987 61 966 64 q 1030 58 1007 58 l 1048 58 l 1048 0 l 644 0 "},"Ε":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 324 69 l 592 69 q 649 78 626 69 q 688 103 673 87 q 713 139 704 118 q 725 183 722 160 l 735 243 l 807 243 l 797 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 753 992 l 760 749 l 688 749 l 681 808 q 670 852 678 831 q 648 888 662 873 q 611 913 633 904 q 558 922 589 922 l 324 922 l 324 553 l 660 553 l 660 483 l 324 483 l 324 69 "},"₧":{"x_min":37,"x_max":1083,"ha":1137,"o":"m 37 0 l 37 58 l 55 58 q 100 61 79 58 q 136 75 120 65 q 160 105 151 86 q 170 158 170 125 l 170 839 q 160 888 170 869 q 135 917 151 907 q 99 930 120 927 q 55 933 78 933 l 37 933 l 37 992 l 385 992 q 537 971 473 992 q 644 913 602 951 q 707 822 686 876 q 728 700 728 768 q 708 580 728 637 q 645 479 689 523 q 530 409 601 435 q 355 382 458 382 l 310 382 l 310 150 q 319 101 310 120 q 344 73 328 83 q 380 61 359 64 q 424 58 401 58 l 469 58 l 469 0 l 37 0 m 310 452 l 341 452 q 447 465 403 452 q 519 507 491 478 q 561 583 548 537 q 574 696 574 630 q 562 797 574 754 q 525 869 551 840 q 460 911 500 897 q 362 925 420 925 l 310 925 l 310 452 m 1018 60 q 1054 63 1040 60 q 1083 70 1067 66 l 1083 8 q 1038 -7 1065 -1 q 971 -14 1011 -14 q 891 -2 924 -14 q 838 33 859 8 q 809 99 818 58 q 800 200 800 140 l 800 438 l 694 438 l 694 487 q 749 497 719 487 q 803 532 779 508 q 849 594 831 558 q 879 684 866 629 l 940 684 l 940 513 l 1070 513 l 1070 438 l 940 438 l 940 197 q 959 93 940 126 q 1018 60 977 60 "},"л":{"x_min":0,"x_max":840.25,"ha":872,"o":"m 319 600 q 309 644 319 628 q 285 671 300 661 q 248 683 269 680 q 205 686 228 686 l 186 686 l 186 745 l 840 745 l 840 686 l 821 686 q 778 683 798 686 q 741 670 757 680 q 717 642 726 660 q 708 593 708 623 l 708 151 q 717 102 708 120 q 741 73 726 83 q 778 61 757 64 q 821 58 798 58 l 840 58 l 840 0 l 459 0 l 459 58 l 463 58 q 506 61 486 58 q 543 74 527 64 q 567 102 558 83 q 577 152 577 121 l 577 686 l 398 686 q 382 558 391 622 q 363 434 373 494 q 341 318 353 373 q 316 216 329 263 q 277 109 297 152 q 234 39 258 65 q 179 1 210 12 q 111 -10 149 -10 q 27 15 55 -10 q 0 86 0 40 q 16 147 0 122 q 60 171 32 171 q 65 151 60 162 q 77 130 69 139 q 98 113 86 120 q 128 106 111 106 q 165 112 148 106 q 199 138 182 118 q 233 197 216 158 q 267 302 249 236 q 284 371 275 330 q 301 453 293 411 q 313 534 308 495 q 319 600 319 573 "},"σ":{"x_min":77,"x_max":823,"ha":839,"o":"m 743 355 q 658 80 743 174 q 405 -14 574 -14 q 269 10 330 -14 q 166 82 209 35 q 100 195 123 128 q 77 347 77 262 q 94 486 77 425 q 143 590 112 546 q 215 663 173 634 q 306 711 257 693 q 409 737 355 729 q 518 745 463 745 l 823 745 l 823 656 l 608 656 q 650 604 627 636 q 694 533 673 572 q 729 448 715 494 q 743 355 743 403 m 207 347 q 222 229 207 283 q 262 137 236 175 q 329 76 289 98 q 419 55 368 55 q 559 124 510 55 q 608 322 608 193 q 599 433 608 380 q 578 529 591 485 q 550 605 565 573 q 522 656 535 638 l 494 656 q 391 642 442 656 q 299 593 339 628 q 233 498 258 558 q 207 347 207 439 "},"θ":{"x_min":77,"x_max":727,"ha":804,"o":"m 727 524 q 707 299 727 399 q 646 129 687 199 q 544 22 605 59 q 402 -14 483 -14 q 255 23 316 -14 q 153 130 193 60 q 95 299 114 199 q 77 525 77 399 q 95 750 77 651 q 154 918 114 850 q 256 1024 194 987 q 404 1061 318 1061 q 545 1024 485 1061 q 646 918 606 987 q 707 750 687 850 q 727 524 727 650 m 402 55 q 486 85 451 55 q 546 174 522 116 q 581 315 569 232 q 596 497 594 398 l 207 497 q 221 315 209 398 q 256 174 232 232 q 317 85 280 116 q 402 55 353 55 m 404 991 q 320 963 356 991 q 260 880 284 934 q 223 747 236 825 q 207 567 210 668 l 594 567 q 580 747 592 668 q 544 880 567 825 q 485 963 520 934 q 404 991 451 991 "}," ":{"x_min":0,"x_max":0,"ha":361},"∑":{"x_min":54,"x_max":902,"ha":960,"o":"m 693 -205 q 749 -195 726 -205 q 787 -168 772 -186 q 811 -126 802 -150 q 824 -74 820 -102 l 830 -32 l 902 -32 l 895 -334 l 54 -334 l 54 -266 l 440 316 l 85 937 l 85 992 l 834 992 l 841 749 l 769 749 l 761 809 q 751 853 758 832 q 729 888 744 873 q 692 913 714 904 q 639 922 670 922 l 253 922 l 556 399 l 556 349 l 190 -205 l 693 -205 "},"Ώ":{"x_min":-46,"x_max":988,"ha":1046,"o":"m 86 608 q 113 771 86 698 q 194 897 140 845 q 331 978 248 950 q 525 1007 414 1007 q 710 978 630 1007 q 847 897 791 950 q 931 771 903 845 q 960 608 960 698 q 879 359 960 454 q 644 233 798 263 l 641 111 l 774 111 q 829 115 806 111 q 868 131 852 120 q 892 158 883 141 q 905 197 901 174 l 916 243 l 988 243 l 978 0 l 565 0 l 575 291 q 682 322 638 298 q 754 388 726 347 q 793 484 781 428 q 806 610 806 540 q 791 747 806 687 q 742 848 776 807 q 655 910 708 889 q 525 932 602 932 q 393 910 447 932 q 304 848 339 889 q 255 747 270 807 q 239 610 239 687 q 252 484 239 540 q 292 388 265 428 q 363 322 320 347 q 470 291 407 298 l 480 0 l 67 0 l 58 243 l 129 243 l 139 197 q 153 158 144 174 q 177 131 161 141 q 215 115 192 120 q 271 111 238 111 l 404 111 l 401 233 q 166 359 247 263 q 86 608 86 454 m -46 789 q -29 833 -37 807 q -13 887 -20 859 q 1 942 -5 915 q 11 993 7 970 l 136 993 l 136 978 q 116 935 131 962 q 82 878 102 908 q 39 819 61 848 q 0 771 17 790 l -46 771 l -46 789 "},"ẃ":{"x_min":1,"x_max":1196,"ha":1197,"o":"m 661 741 l 800 329 q 817 275 808 304 q 834 218 826 246 q 849 164 843 190 q 860 122 856 139 l 864 122 q 883 207 870 156 q 918 325 897 257 l 987 548 q 996 586 993 566 q 1000 618 1000 606 q 977 670 1000 654 q 908 686 955 686 l 898 686 l 898 745 l 1196 745 l 1196 686 l 1178 686 q 1143 682 1158 686 q 1116 666 1128 678 q 1094 633 1104 654 q 1073 578 1084 612 l 894 0 l 783 0 l 617 489 l 592 580 l 395 0 l 286 0 l 104 612 q 87 648 95 634 q 66 671 78 662 q 40 683 55 679 q 5 686 25 686 l 1 686 l 1 745 l 344 745 l 344 686 l 325 686 q 263 674 284 686 q 242 628 242 662 q 246 600 242 616 q 253 568 249 584 l 319 335 q 333 280 326 310 q 347 220 340 250 q 359 165 353 191 q 368 122 364 139 l 372 122 q 381 163 375 139 q 394 213 387 186 q 411 268 402 240 q 429 320 420 295 l 573 741 l 661 741 m 539 860 q 571 905 554 879 q 603 958 587 931 q 634 1013 619 986 q 659 1064 648 1040 l 808 1064 l 808 1049 q 770 1004 795 1031 q 714 946 744 976 q 651 889 684 917 q 591 842 619 860 l 539 842 l 539 860 "},"+":{"x_min":90,"x_max":685,"ha":777,"o":"m 428 455 l 428 199 l 346 199 l 346 455 l 90 455 l 90 538 l 346 538 l 346 794 l 428 794 l 428 538 l 685 538 l 685 455 l 428 455 "},"Ë":{"x_min":52.421875,"x_max":807,"ha":865,"o":"m 324 69 l 592 69 q 649 78 626 69 q 688 103 673 87 q 713 139 704 118 q 725 183 722 160 l 735 243 l 807 243 l 797 0 l 52 0 l 52 58 l 70 58 q 113 61 93 58 q 150 73 134 64 q 174 102 165 83 q 184 151 184 120 l 184 833 q 175 886 184 866 q 150 916 166 905 q 114 930 135 926 q 70 933 93 933 l 52 933 l 52 992 l 753 992 l 760 749 l 688 749 l 681 808 q 670 852 678 831 q 648 888 662 873 q 611 913 633 904 q 558 922 589 922 l 324 922 l 324 553 l 660 553 l 660 483 l 324 483 l 324 69 m 232 1185 q 237 1221 232 1206 q 252 1245 242 1236 q 274 1258 261 1254 q 302 1263 287 1263 q 330 1258 317 1263 q 353 1245 343 1254 q 368 1221 362 1236 q 373 1185 373 1206 q 368 1149 373 1163 q 353 1124 362 1134 q 330 1111 343 1115 q 302 1107 317 1107 q 252 1124 272 1107 q 232 1185 232 1142 m 496 1185 q 501 1221 496 1206 q 516 1245 506 1236 q 538 1258 525 1254 q 566 1263 551 1263 q 594 1258 581 1263 q 617 1245 607 1254 q 632 1221 626 1236 q 637 1185 637 1206 q 632 1149 637 1163 q 617 1124 626 1134 q 594 1111 607 1115 q 566 1107 581 1107 q 516 1124 536 1107 q 496 1185 496 1142 "},"Š":{"x_min":66,"x_max":685,"ha":756,"o":"m 342 -14 q 223 0 275 -14 q 136 39 171 14 q 83 101 101 65 q 66 181 66 137 q 92 249 66 223 q 166 275 118 275 q 179 192 168 231 q 212 121 190 152 q 268 73 234 91 q 349 55 301 55 q 493 100 441 55 q 544 230 544 145 q 533 297 544 267 q 498 351 523 326 q 433 398 473 375 q 333 446 393 421 q 222 502 269 472 q 143 569 175 532 q 97 652 112 606 q 82 754 82 697 q 104 860 82 814 q 168 939 127 907 q 264 989 208 972 q 386 1006 320 1006 q 496 993 448 1006 q 578 958 544 980 q 628 908 611 936 q 646 850 646 880 q 616 782 646 805 q 536 760 587 760 q 529 824 536 792 q 504 880 521 855 q 457 921 486 905 q 386 936 428 936 q 317 925 347 936 q 265 893 286 914 q 233 843 244 873 q 222 778 222 814 q 232 705 222 737 q 268 648 243 674 q 333 600 293 623 q 432 553 373 577 q 539 500 492 528 q 618 438 585 472 q 667 361 650 403 q 685 265 685 318 q 660 147 685 199 q 592 59 636 95 q 484 4 547 23 q 342 -14 420 -14 m 178 1293 l 232 1293 q 272 1265 251 1280 q 311 1234 292 1251 q 348 1200 330 1217 q 382 1166 366 1183 q 415 1200 397 1183 q 453 1234 433 1217 q 493 1265 473 1251 q 533 1293 514 1280 l 588 1293 l 588 1274 q 552 1229 571 1255 q 512 1176 532 1203 q 476 1121 493 1148 q 448 1071 459 1094 l 317 1071 q 289 1121 306 1094 q 253 1176 272 1148 q 213 1229 233 1203 q 178 1274 194 1255 l 178 1293 "}," ":{"x_min":0,"x_max":0,"ha":1389},"ð":{"x_min":77,"x_max":725,"ha":802,"o":"m 209 1057 q 333 1016 272 1041 q 449 954 394 991 l 628 1059 l 628 979 l 505 909 q 594 816 554 869 q 664 700 635 764 q 709 562 693 636 q 725 404 725 487 q 641 89 725 192 q 398 -14 558 -14 q 264 8 323 -14 q 162 74 204 30 q 99 187 121 119 q 77 345 77 254 q 159 614 77 526 q 403 703 241 703 q 488 693 449 703 q 562 667 527 683 q 511 764 548 713 q 422 861 475 815 l 249 763 l 249 840 l 365 907 q 292 946 331 928 q 209 977 252 964 l 209 1057 m 211 346 q 222 220 211 274 q 254 129 232 165 q 313 73 277 92 q 402 55 349 55 q 489 73 454 55 q 548 129 525 92 q 580 220 570 165 q 590 346 590 274 q 579 471 590 418 q 547 562 569 525 q 488 615 525 598 q 400 633 452 633 q 312 615 348 633 q 254 562 276 598 q 222 471 232 525 q 211 346 211 418 "},"щ":{"x_min":31.75,"x_max":1283,"ha":1314,"o":"m 1224 -291 l 1217 -190 q 1200 -101 1213 -137 q 1168 -42 1187 -64 q 1127 -9 1149 -19 q 1081 0 1104 0 l 31 0 l 31 58 l 50 58 q 93 61 73 58 q 130 74 114 64 q 154 103 145 84 q 164 152 164 122 l 164 593 q 154 642 164 623 q 130 670 145 660 q 93 683 114 680 q 50 686 73 686 l 31 686 l 31 745 l 412 745 l 412 686 l 408 686 q 365 683 385 686 q 328 670 344 680 q 304 642 313 660 q 294 593 294 623 l 294 63 l 596 63 l 596 593 q 586 642 596 623 q 562 670 577 660 q 525 683 546 680 q 482 686 505 686 l 477 686 l 477 745 l 844 745 l 844 686 l 840 686 q 797 683 817 686 q 760 670 776 680 q 736 642 745 660 q 726 593 726 623 l 726 63 l 1020 63 l 1020 593 q 1010 642 1020 623 q 986 670 1001 660 q 949 683 970 680 q 906 686 929 686 l 901 686 l 901 745 l 1282 745 l 1282 686 l 1264 686 q 1221 683 1241 686 q 1184 670 1200 680 q 1160 642 1169 660 q 1151 593 1151 623 l 1151 143 q 1159 103 1151 118 q 1181 79 1167 88 q 1213 67 1195 71 q 1251 63 1231 64 l 1283 63 l 1283 -291 l 1224 -291 "},"℮":{"x_min":69,"x_max":789,"ha":860,"o":"m 429 -24 q 273 7 341 -24 q 161 92 206 39 q 92 215 115 146 q 69 359 69 284 q 83 480 69 426 q 124 577 98 534 q 185 651 150 620 q 259 702 219 682 q 343 733 299 723 q 429 743 386 743 q 571 716 506 743 q 685 639 637 689 q 761 518 734 589 q 789 358 789 447 l 227 358 l 227 117 q 263 86 241 101 q 311 60 285 71 q 367 41 337 48 q 428 34 397 34 q 518 45 479 34 q 589 76 558 56 q 648 126 621 96 q 697 193 674 155 l 746 165 q 693 92 721 126 q 628 31 665 58 q 542 -9 590 5 q 429 -24 493 -24 m 630 417 l 630 604 q 598 631 618 617 q 552 657 578 646 q 494 677 525 669 q 426 684 462 684 q 362 678 392 684 q 308 660 333 671 q 263 635 283 649 q 227 605 243 621 l 227 417 l 630 417 "},"Φ":{"x_min":46,"x_max":1015,"ha":1065,"o":"m 604 255 l 634 255 q 738 270 695 255 q 808 317 781 286 q 848 397 835 349 q 861 510 861 445 q 850 612 861 568 q 814 688 838 657 q 750 735 789 719 q 654 750 710 750 l 604 750 l 604 255 m 331 0 l 331 58 l 350 58 q 394 61 373 58 q 430 75 415 65 q 454 105 445 86 q 464 158 464 125 l 464 186 l 417 186 q 295 198 349 186 q 199 234 240 211 q 128 288 157 257 q 81 357 99 320 q 54 434 62 393 q 46 515 46 474 q 66 639 46 583 q 129 735 86 695 q 235 797 171 775 q 387 820 299 820 l 464 820 l 464 834 q 454 886 464 866 q 430 916 445 905 q 394 930 415 926 q 350 933 373 933 l 331 933 l 331 992 l 735 992 l 735 933 l 718 933 q 673 930 694 933 q 637 916 653 926 q 613 886 622 905 q 604 834 604 866 l 604 820 l 679 820 q 828 797 765 820 q 933 735 891 775 q 994 639 974 695 q 1015 515 1015 583 q 1006 434 1015 474 q 980 357 998 393 q 933 288 962 320 q 864 234 905 257 q 770 198 823 211 q 649 186 717 186 l 604 186 l 604 158 q 613 105 604 125 q 637 75 622 86 q 673 61 653 65 q 718 58 694 58 l 735 58 l 735 0 l 331 0 m 464 750 l 411 750 q 313 735 353 750 q 248 688 273 719 q 211 612 222 657 q 199 510 199 568 q 212 397 199 445 q 254 317 226 349 q 326 270 282 286 q 432 255 370 255 l 464 255 l 464 750 "},"ş":{"x_min":62,"x_max":566,"ha":627,"o":"m 291 -14 q 196 -4 239 -14 q 124 22 154 4 q 78 69 94 41 q 62 133 62 96 q 71 179 62 161 q 93 209 80 198 q 122 224 106 220 q 149 229 137 229 q 156 160 149 192 q 180 104 163 128 q 223 66 196 80 q 290 52 251 52 q 352 61 325 52 q 397 87 379 70 q 425 127 415 104 q 435 178 435 150 q 427 223 435 204 q 401 258 420 241 q 351 291 383 274 q 272 330 320 308 q 183 375 221 353 q 121 423 145 397 q 84 482 96 449 q 72 560 72 515 q 90 645 72 608 q 143 706 109 681 q 226 744 178 731 q 334 757 274 757 q 421 746 383 757 q 485 719 459 736 q 524 678 511 702 q 537 629 537 655 q 510 568 537 591 q 436 546 484 546 q 409 658 436 618 q 325 698 383 698 q 269 690 292 698 q 231 665 246 681 q 209 628 216 650 q 202 581 202 607 q 211 536 202 555 q 240 500 220 516 q 291 468 260 484 q 367 434 323 453 q 456 389 419 411 q 518 340 494 366 q 554 280 542 313 q 566 203 566 247 q 546 108 566 149 q 490 40 526 68 q 404 0 454 13 q 291 -14 353 -14 m 457 -175 q 409 -291 457 -249 q 274 -334 362 -334 q 249 -332 263 -334 q 221 -329 236 -331 q 193 -324 207 -327 q 167 -318 179 -321 l 167 -247 q 216 -256 191 -253 q 259 -258 241 -258 q 321 -237 299 -258 q 343 -180 343 -216 q 314 -119 343 -139 q 242 -95 285 -99 l 271 12 l 336 12 l 322 -47 q 423 -86 390 -53 q 457 -175 457 -120 "}," ":{"x_min":0,"x_max":0,"ha":777},"ı":{"x_min":31.75,"x_max":427.15625,"ha":444,"o":"m 50 58 q 93 61 73 58 q 130 73 114 64 q 154 102 145 83 q 164 151 164 120 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 294 745 l 294 158 q 304 105 294 125 q 328 75 313 86 q 364 61 343 65 q 408 58 385 58 l 427 58 l 427 0 l 31 0 l 31 58 l 50 58 "},"ä":{"x_min":69,"x_max":722.203125,"ha":782,"o":"m 203 200 q 231 103 203 135 q 316 71 258 71 q 392 84 358 71 q 451 123 427 98 q 488 184 475 148 q 501 263 501 219 l 501 375 l 412 371 q 313 357 353 368 q 249 324 273 345 q 214 271 225 302 q 203 200 203 240 m 372 688 q 307 677 331 688 q 268 646 282 666 q 249 598 254 625 q 245 538 245 570 q 157 557 187 538 q 127 625 127 577 q 146 686 127 661 q 200 727 166 711 q 280 750 234 743 q 377 758 325 758 q 488 745 441 758 q 568 704 536 732 q 616 630 600 675 q 632 518 632 584 l 632 157 q 636 109 632 128 q 651 79 641 90 q 678 63 661 67 q 718 58 695 58 l 722 58 l 722 0 l 534 0 l 512 118 l 501 118 q 459 65 479 89 q 414 23 438 40 q 358 -4 389 5 q 284 -14 328 -14 q 198 0 238 -14 q 130 39 159 12 q 85 109 101 67 q 69 207 69 150 q 147 371 69 318 q 385 429 226 425 l 501 434 l 501 517 q 497 586 501 554 q 479 640 492 618 q 440 676 465 663 q 372 688 414 688 m 175 956 q 180 992 175 977 q 195 1016 185 1007 q 217 1029 204 1025 q 245 1034 230 1034 q 273 1029 260 1034 q 296 1016 286 1025 q 311 992 305 1007 q 316 956 316 977 q 311 920 316 934 q 296 895 305 905 q 273 882 286 886 q 245 878 260 878 q 195 895 215 878 q 175 956 175 913 m 439 956 q 444 992 439 977 q 459 1016 449 1007 q 481 1029 468 1025 q 509 1034 494 1034 q 537 1029 524 1034 q 560 1016 550 1025 q 575 992 569 1007 q 580 956 580 977 q 575 920 580 934 q 560 895 569 905 q 537 882 550 886 q 509 878 524 878 q 459 895 479 878 q 439 956 439 913 "},"¹":{"x_min":90.453125,"x_max":466.890625,"ha":555,"o":"m 98 399 l 98 454 l 163 454 q 185 456 175 454 q 203 463 195 457 q 215 478 211 468 q 220 505 220 488 l 220 890 l 90 890 l 90 946 l 160 946 q 193 948 175 946 q 227 956 211 950 q 256 972 243 962 q 275 999 269 982 l 344 999 l 344 498 q 349 470 344 481 q 362 454 354 460 q 380 447 369 449 q 403 445 390 445 l 466 445 l 466 399 l 98 399 "},"W":{"x_min":12,"x_max":1442,"ha":1454,"o":"m 800 983 l 973 380 q 1008 248 993 311 q 1033 136 1024 184 q 1057 241 1043 186 q 1089 364 1070 297 l 1211 793 q 1216 811 1213 801 q 1220 831 1218 821 q 1224 850 1222 842 q 1226 865 1226 859 q 1203 917 1226 901 q 1134 933 1180 933 l 1102 933 l 1102 992 l 1442 992 l 1442 933 l 1415 933 q 1379 929 1395 933 q 1352 913 1364 925 q 1330 881 1340 902 q 1309 825 1319 860 l 1075 0 l 950 0 l 723 778 l 511 0 l 383 0 l 128 860 q 113 896 121 882 q 93 918 104 910 q 66 930 81 926 q 30 933 50 933 l 12 933 l 12 992 l 394 992 l 394 933 l 362 933 q 299 917 320 933 q 279 867 279 901 q 282 843 279 855 q 290 815 286 831 l 417 371 q 450 247 435 308 q 478 136 466 186 q 502 254 488 190 q 534 386 516 319 l 699 983 l 800 983 "},"λ":{"x_min":11,"x_max":739,"ha":743,"o":"m 378 714 q 340 848 360 796 q 297 929 320 900 q 250 970 275 959 q 198 981 226 981 q 130 963 159 981 q 84 925 101 946 q 67 948 73 933 q 61 982 61 963 q 69 1016 61 1000 q 95 1044 77 1031 q 138 1063 112 1056 q 199 1070 164 1070 q 276 1057 242 1070 q 338 1015 310 1044 q 389 936 366 985 q 430 814 412 887 l 553 327 q 594 204 572 255 q 639 121 616 154 q 686 73 663 88 q 731 58 710 58 l 739 58 l 739 0 l 706 0 q 632 7 663 0 q 578 36 602 14 q 535 99 554 58 q 496 208 516 140 q 464 331 478 270 q 439 443 450 392 q 423 528 429 493 q 416 575 417 563 l 412 575 q 400 530 409 558 q 379 472 391 502 q 354 411 368 441 q 330 358 341 381 l 154 0 l 11 0 l 378 714 "},">":{"x_min":90,"x_max":687,"ha":777,"o":"m 90 152 l 90 244 l 557 495 l 90 748 l 90 841 l 687 520 l 687 471 l 90 152 "},"τ":{"x_min":45,"x_max":660,"ha":686,"o":"m 660 656 l 420 656 q 380 393 394 510 q 366 200 366 276 q 375 136 366 163 q 396 94 383 110 q 428 70 410 77 q 467 62 446 62 q 520 68 493 62 q 572 84 548 74 l 572 20 q 545 5 559 12 q 514 -4 531 0 q 477 -11 497 -9 q 429 -14 456 -14 q 284 36 333 -14 q 236 179 236 87 q 244 279 236 225 q 266 392 252 332 q 299 517 280 451 q 339 656 318 584 l 209 656 q 158 647 179 656 q 125 621 137 637 q 108 583 113 605 q 103 538 103 562 l 45 538 q 57 641 45 601 q 94 703 70 681 q 150 735 117 725 q 224 745 184 745 l 660 745 l 660 656 "},"Ų":{"x_min":21.4375,"x_max":975.25,"ha":996,"o":"m 502 -14 q 355 3 420 -14 q 245 58 290 20 q 176 155 200 95 q 153 299 153 214 l 153 839 q 143 888 153 869 q 119 917 134 907 q 82 930 103 927 q 39 933 62 933 l 21 933 l 21 992 l 425 992 l 425 933 l 407 933 q 363 930 384 933 q 326 916 342 926 q 302 885 311 905 q 293 832 293 865 l 293 285 q 310 181 293 224 q 358 112 327 138 q 431 72 389 85 q 525 60 474 60 q 629 77 585 60 q 701 122 672 93 q 744 191 730 151 q 758 279 758 231 l 758 838 q 749 888 758 869 q 724 917 739 906 q 688 930 708 927 q 644 933 667 933 l 626 933 l 626 992 l 975 992 l 975 933 l 956 933 q 912 930 933 933 q 876 916 891 926 q 852 886 861 905 q 843 833 843 866 l 843 283 q 820 158 843 214 q 755 65 798 103 q 649 6 712 26 q 502 -14 585 -14 m 379 -180 q 392 -118 379 -147 q 429 -65 406 -89 q 481 -24 452 -41 q 543 0 511 -7 l 622 0 q 577 -20 600 -6 q 536 -54 554 -34 q 505 -102 517 -75 q 492 -162 492 -129 q 500 -203 492 -186 q 520 -230 507 -220 q 550 -246 533 -241 q 589 -251 568 -251 q 629 -248 607 -251 q 677 -240 651 -245 l 677 -312 q 652 -321 666 -317 q 623 -328 638 -325 q 594 -332 608 -330 q 569 -334 580 -334 q 490 -324 525 -334 q 430 -297 455 -315 q 392 -249 405 -278 q 379 -180 379 -220 "},"Ŵ":{"x_min":12,"x_max":1442,"ha":1454,"o":"m 800 983 l 973 380 q 1008 248 993 311 q 1033 136 1024 184 q 1057 241 1043 186 q 1089 364 1070 297 l 1211 793 q 1216 811 1213 801 q 1220 831 1218 821 q 1224 850 1222 842 q 1226 865 1226 859 q 1203 917 1226 901 q 1134 933 1180 933 l 1102 933 l 1102 992 l 1442 992 l 1442 933 l 1415 933 q 1379 929 1395 933 q 1352 913 1364 925 q 1330 881 1340 902 q 1309 825 1319 860 l 1075 0 l 950 0 l 723 778 l 511 0 l 383 0 l 128 860 q 113 896 121 882 q 93 918 104 910 q 66 930 81 926 q 30 933 50 933 l 12 933 l 12 992 l 394 992 l 394 933 l 362 933 q 299 917 320 933 q 279 867 279 901 q 282 843 279 855 q 290 815 286 831 l 417 371 q 450 247 435 308 q 478 136 466 186 q 502 254 488 190 q 534 386 516 319 l 699 983 l 800 983 m 568 1089 q 603 1134 584 1108 q 643 1187 623 1160 q 679 1242 662 1215 q 707 1293 696 1269 l 838 1293 q 866 1242 849 1269 q 902 1187 883 1215 q 942 1134 922 1160 q 978 1089 961 1108 l 978 1071 l 923 1071 q 843 1128 883 1093 q 772 1195 803 1162 q 701 1128 740 1162 q 622 1071 661 1093 l 568 1071 l 568 1089 "},"‛":{"x_min":78,"x_max":306,"ha":347,"o":"m 78 871 q 86 923 78 900 q 109 961 94 945 q 144 984 124 976 q 184 992 163 992 q 248 970 222 992 q 275 909 275 949 q 267 874 275 888 q 248 851 260 861 q 224 835 237 842 q 199 821 211 828 q 181 805 188 814 q 173 782 173 795 q 205 710 173 741 q 306 657 237 679 l 306 599 q 200 645 244 617 q 129 708 157 673 q 90 785 102 744 q 78 871 78 827 "},"Ð":{"x_min":52.421875,"x_max":931,"ha":1010,"o":"m 52 553 l 184 553 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 478 992 q 669 959 585 992 q 811 863 753 926 q 900 707 869 799 q 931 497 931 615 q 902 291 931 383 q 817 134 873 199 q 676 34 761 69 q 478 0 590 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 157 184 125 l 184 483 l 52 483 l 52 553 m 445 69 q 590 97 528 69 q 694 179 652 125 q 756 313 735 234 q 777 496 777 393 q 756 679 777 599 q 694 813 735 759 q 591 894 653 867 q 446 922 528 922 l 324 922 l 324 553 l 561 553 l 561 483 l 324 483 l 324 69 l 445 69 "},"Λ":{"x_min":1,"x_max":938,"ha":937,"o":"m 521 992 l 821 131 q 837 96 828 110 q 857 73 846 81 q 884 61 869 64 q 920 58 900 58 l 938 58 l 938 0 l 556 0 l 556 58 l 588 58 q 671 124 671 58 q 668 148 671 136 q 660 176 666 160 l 508 632 q 471 749 487 693 q 445 856 456 805 q 418 751 434 805 q 381 632 403 697 l 228 185 q 219 153 223 169 q 215 125 215 137 q 239 74 215 90 q 308 58 262 58 l 340 58 l 340 0 l 1 0 l 1 58 l 27 58 q 62 62 47 58 q 89 78 77 66 q 111 111 101 90 q 133 166 121 132 l 420 992 l 521 992 "},"·":{"x_min":100,"x_max":272,"ha":372,"o":"m 100 490 q 106 534 100 516 q 125 563 113 552 q 152 579 136 574 q 186 585 167 585 q 219 579 203 585 q 246 563 235 574 q 265 534 258 552 q 272 490 272 516 q 265 447 272 465 q 246 418 258 430 q 219 401 235 406 q 186 396 203 396 q 152 401 167 396 q 125 418 136 406 q 106 447 113 430 q 100 490 100 465 "},"Х":{"x_min":11,"x_max":905,"ha":917,"o":"m 646 893 q 641 913 646 905 q 625 925 635 921 q 602 931 615 930 q 572 933 588 933 l 568 933 l 568 992 l 872 992 l 872 933 l 859 933 q 822 928 839 933 q 790 912 806 924 q 758 881 775 900 q 722 833 741 862 l 521 543 l 776 132 q 833 74 806 91 q 887 58 860 58 l 905 58 l 905 0 l 529 0 l 529 58 l 537 58 q 620 104 620 58 q 618 119 620 111 q 612 137 616 126 q 598 162 607 147 q 574 200 588 177 l 437 421 l 283 193 q 271 173 277 184 q 259 149 265 162 q 251 125 254 137 q 247 101 247 112 q 269 68 247 78 q 337 58 291 58 l 341 58 l 341 0 l 11 0 l 11 58 l 19 58 q 63 63 44 58 q 98 80 82 68 q 129 109 114 91 q 164 155 145 128 l 396 488 l 166 860 q 110 917 141 900 q 47 933 78 933 l 29 933 l 29 992 l 405 992 l 405 933 l 401 933 q 362 930 377 933 q 337 922 346 927 q 325 909 328 916 q 322 893 322 901 q 323 879 322 886 q 327 863 324 872 q 337 842 330 854 q 355 811 343 829 l 480 609 l 612 808 q 637 853 627 832 q 646 893 646 874 "},"Υ":{"x_min":-7,"x_max":872,"ha":868,"o":"m 221 0 l 221 58 l 253 58 q 296 61 276 58 q 333 73 317 64 q 357 102 348 83 q 367 151 367 120 l 367 413 l 109 860 q 87 893 98 880 q 66 916 77 907 q 41 929 55 925 q 10 933 28 933 l -7 933 l -7 992 l 374 992 l 374 933 l 323 933 q 292 930 304 933 q 273 920 280 926 q 264 906 267 914 q 262 889 262 898 q 270 850 262 869 q 287 815 279 830 l 389 629 q 431 545 414 586 q 459 470 448 503 q 475 504 466 485 q 495 543 484 522 q 518 585 506 563 q 543 629 531 607 l 631 789 q 651 834 645 812 q 657 872 657 855 q 635 918 657 903 q 573 933 613 933 l 532 933 l 532 992 l 872 992 l 872 933 l 855 933 q 827 928 840 933 q 800 910 814 923 q 772 877 787 898 q 740 825 758 857 l 507 413 l 507 158 q 516 105 507 125 q 540 75 525 86 q 576 61 556 65 q 620 58 597 58 l 653 58 l 653 0 l 221 0 "},"r":{"x_min":46,"x_max":633,"ha":654,"o":"m 447 0 l 46 0 l 46 58 l 50 58 q 94 61 73 58 q 130 75 115 65 q 154 105 145 86 q 164 158 164 125 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 260 745 l 286 606 l 293 606 q 321 665 307 638 q 356 713 335 692 q 407 746 376 734 q 483 758 437 758 q 596 731 559 758 q 633 656 633 705 q 625 616 633 635 q 603 585 618 598 q 563 565 587 572 q 503 558 539 558 q 487 643 503 617 q 430 669 471 669 q 384 654 405 669 q 349 615 364 639 q 323 560 334 591 q 306 495 313 528 q 297 430 300 462 q 294 370 294 397 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 447 58 l 447 0 "},"ж":{"x_min":4,"x_max":1218,"ha":1222,"o":"m 550 591 q 541 640 550 622 q 519 669 533 659 q 487 683 505 679 q 450 686 469 686 l 444 686 l 444 745 l 785 745 l 785 686 l 781 686 q 743 683 761 686 q 711 671 724 680 q 689 644 697 662 q 680 599 680 627 l 680 424 q 714 425 700 424 q 738 430 728 427 q 756 439 748 434 q 772 453 764 445 q 813 505 789 469 q 872 594 836 541 q 915 660 895 631 q 958 710 936 689 q 1009 741 980 730 q 1076 753 1037 753 q 1164 729 1134 753 q 1194 668 1194 706 q 1188 633 1194 649 q 1174 607 1183 618 q 1153 590 1165 597 q 1128 580 1141 583 q 1120 610 1126 596 q 1105 635 1114 624 q 1082 652 1095 646 q 1052 658 1069 658 q 1020 652 1035 658 q 990 632 1005 645 q 960 599 976 619 q 928 552 945 579 q 894 504 909 525 q 867 467 880 483 q 842 439 854 451 q 817 417 831 427 q 924 384 881 414 q 997 297 967 354 l 1069 169 q 1134 84 1100 111 q 1214 58 1167 58 l 1218 58 l 1218 0 l 1169 0 q 1082 5 1117 0 q 1021 25 1047 10 q 976 64 996 39 q 936 129 957 89 l 869 261 q 837 309 853 291 q 798 338 820 328 q 748 351 776 348 q 680 354 719 354 l 680 149 q 689 101 680 119 q 711 73 697 83 q 743 61 724 64 q 781 58 761 58 l 785 58 l 785 0 l 444 0 l 444 58 l 450 58 q 488 61 470 58 q 520 75 506 65 q 541 105 533 85 q 550 156 550 124 l 550 354 q 481 351 510 354 q 429 338 451 348 q 389 309 406 328 q 356 261 372 291 l 288 129 q 248 64 267 89 q 203 25 229 39 q 141 5 177 10 q 52 0 105 0 l 4 0 l 4 58 l 8 58 q 89 84 54 58 q 155 169 123 111 l 227 297 q 302 384 259 354 q 410 417 345 414 q 385 439 397 427 q 360 467 373 451 q 332 504 347 483 q 298 552 317 525 q 265 599 280 579 q 235 632 250 619 q 205 652 220 645 q 172 658 190 658 q 141 652 155 658 q 118 635 128 646 q 103 610 109 624 q 94 580 97 596 q 69 590 81 583 q 47 607 57 597 q 33 633 38 618 q 28 668 28 649 q 58 729 28 706 q 147 753 88 753 q 216 741 187 753 q 267 710 244 730 q 311 660 290 689 q 355 594 331 631 q 415 505 391 541 q 457 453 439 469 q 473 439 465 445 q 491 430 481 434 q 515 425 501 427 q 550 424 529 424 l 550 591 "},"Ø":{"x_min":78,"x_max":952,"ha":1031,"o":"m 789 918 q 910 745 869 852 q 952 496 952 637 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 398 -2 452 -14 q 299 32 344 9 l 251 -56 l 169 -56 l 240 71 q 118 246 158 137 q 78 498 78 355 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 631 993 578 1007 q 729 956 684 980 l 781 1048 l 861 1048 l 789 918 m 231 497 q 247 311 231 391 q 297 174 262 231 l 685 876 q 517 932 621 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 m 798 497 q 782 681 798 601 q 733 818 767 761 l 345 114 q 515 60 410 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 "},"Ỳ":{"x_min":-7,"x_max":872,"ha":868,"o":"m 221 0 l 221 58 l 253 58 q 296 61 276 58 q 333 73 317 64 q 357 102 348 83 q 367 151 367 120 l 367 413 l 109 860 q 87 893 98 880 q 66 916 77 907 q 41 929 55 925 q 10 933 28 933 l -7 933 l -7 992 l 374 992 l 374 933 l 323 933 q 292 930 304 933 q 273 920 280 926 q 264 906 267 914 q 262 889 262 898 q 270 850 262 869 q 287 815 279 830 l 389 629 q 431 545 414 586 q 459 470 448 503 q 475 504 466 485 q 495 543 484 522 q 518 585 506 563 q 543 629 531 607 l 631 789 q 651 834 645 812 q 657 872 657 855 q 635 918 657 903 q 573 933 613 933 l 532 933 l 532 992 l 872 992 l 872 933 l 855 933 q 827 928 840 933 q 800 910 814 923 q 772 877 787 898 q 740 825 758 857 l 507 413 l 507 158 q 516 105 507 125 q 540 75 525 86 q 576 61 556 65 q 620 58 597 58 l 653 58 l 653 0 l 221 0 m 505 1071 l 452 1071 q 391 1118 424 1089 q 328 1175 359 1146 q 272 1233 298 1205 q 235 1278 247 1260 l 235 1293 l 383 1293 q 409 1242 394 1269 q 439 1187 423 1215 q 473 1134 456 1160 q 505 1089 490 1108 l 505 1071 "},"÷":{"x_min":90,"x_max":687,"ha":777,"o":"m 687 455 l 90 455 l 90 538 l 687 538 l 687 455 m 318 759 q 323 795 318 780 q 338 819 328 810 q 360 832 347 828 q 388 836 373 836 q 416 832 403 836 q 439 819 429 828 q 454 795 449 810 q 460 759 460 780 q 454 723 460 738 q 439 699 449 708 q 416 686 429 690 q 388 683 403 683 q 360 686 373 683 q 338 699 347 690 q 323 723 328 708 q 318 759 318 738 m 318 233 q 323 270 318 255 q 338 293 328 284 q 360 306 347 302 q 388 310 373 310 q 416 306 403 310 q 439 293 429 302 q 454 270 449 284 q 460 233 460 255 q 454 197 460 212 q 439 173 449 182 q 416 161 429 165 q 388 157 403 157 q 338 173 358 157 q 318 233 318 190 "},"с":{"x_min":77,"x_max":629,"ha":684,"o":"m 393 -14 q 265 7 324 -14 q 165 74 207 28 q 100 193 123 121 q 77 367 77 265 q 100 554 77 479 q 165 674 123 629 q 263 739 207 720 q 386 758 320 758 q 472 749 429 758 q 550 723 515 741 q 606 679 584 705 q 628 616 628 652 q 596 548 628 568 q 503 529 565 529 q 498 590 503 561 q 479 641 493 619 q 444 676 466 663 q 386 688 421 688 q 314 673 346 688 q 259 622 282 658 q 224 523 236 585 q 211 368 211 461 q 260 147 211 220 q 421 74 309 74 q 533 102 485 74 q 605 173 581 129 q 622 151 615 164 q 629 118 629 137 q 614 71 629 95 q 569 28 599 47 q 496 -2 540 9 q 393 -14 452 -14 "},"h":{"x_min":25.203125,"x_max":843.234375,"ha":882,"o":"m 398 58 l 398 0 l 25 0 l 25 58 l 36 58 q 80 61 59 58 q 116 75 101 65 q 140 105 131 86 q 150 158 150 125 l 150 902 q 140 951 150 932 q 116 980 131 970 q 79 993 100 990 q 36 996 59 996 l 25 996 l 25 1055 l 280 1055 l 280 749 q 280 710 280 730 q 278 671 279 689 q 275 631 276 651 l 282 631 q 486 758 344 758 q 591 742 545 758 q 668 693 637 726 q 715 608 699 660 q 732 486 732 557 l 732 157 q 740 105 732 125 q 762 75 748 86 q 796 61 776 65 q 839 58 816 58 l 843 58 l 843 0 l 601 0 l 601 479 q 592 560 601 524 q 566 619 584 595 q 519 656 548 644 q 448 669 490 669 q 373 653 405 669 q 321 607 342 637 q 291 536 301 578 q 280 444 280 494 l 280 151 q 290 102 280 120 q 314 73 299 83 q 351 61 330 64 q 394 58 371 58 l 398 58 "},"f":{"x_min":37.734375,"x_max":610,"ha":513,"o":"m 467 58 l 467 0 l 37 0 l 37 58 l 56 58 q 100 61 79 58 q 136 75 121 65 q 160 105 151 86 q 170 157 170 125 l 170 675 l 43 675 l 43 745 l 170 745 l 170 814 q 186 924 170 876 q 235 1004 203 971 q 313 1053 267 1036 q 415 1070 358 1070 q 506 1063 469 1070 q 566 1045 544 1056 q 599 1016 589 1033 q 610 978 610 1000 q 601 944 610 959 q 577 920 593 930 q 541 905 562 910 q 496 900 521 900 q 491 941 496 921 q 476 977 487 961 q 448 1002 466 992 q 404 1011 431 1011 q 355 999 375 1011 q 323 964 335 988 q 305 907 311 941 q 300 828 300 873 l 300 745 l 496 745 l 496 675 l 300 675 l 300 157 q 310 105 300 125 q 334 75 319 86 q 370 61 349 65 q 414 58 391 58 l 467 58 "},"“":{"x_min":78,"x_max":583,"ha":625,"o":"m 355 720 q 367 806 355 764 q 406 883 379 847 q 477 946 434 918 q 583 993 521 974 l 583 934 q 482 881 514 912 q 450 809 450 850 q 458 786 450 796 q 476 770 465 777 q 501 756 488 763 q 525 740 514 750 q 544 717 537 731 q 552 682 552 703 q 526 621 552 642 q 461 600 500 600 q 421 607 440 600 q 387 630 401 615 q 363 668 372 646 q 355 720 355 691 m 78 720 q 90 806 78 764 q 129 883 102 847 q 200 946 157 918 q 306 993 244 974 l 306 934 q 205 881 237 912 q 173 809 173 850 q 181 786 173 796 q 199 770 188 777 q 224 756 211 763 q 248 740 237 750 q 267 717 260 731 q 275 682 275 703 q 248 621 275 642 q 184 600 222 600 q 144 607 163 600 q 109 630 124 615 q 86 668 94 646 q 78 720 78 691 "},"A":{"x_min":0,"x_max":979,"ha":979,"o":"m 281 332 l 227 186 q 218 153 221 169 q 215 126 215 137 q 237 74 215 90 q 307 58 260 58 l 339 58 l 339 0 l 0 0 l 0 58 l 26 58 q 61 62 46 58 q 86 79 75 67 q 108 112 98 91 q 132 166 119 133 l 440 992 l 548 992 l 862 132 q 878 96 870 110 q 898 73 887 82 q 925 61 910 65 q 960 58 940 58 l 979 58 l 979 0 l 597 0 l 597 58 l 629 58 q 712 124 712 58 q 709 148 712 136 q 700 176 706 160 l 645 332 l 281 332 m 534 644 q 494 760 512 706 q 465 864 476 814 q 453 816 460 839 q 439 768 447 792 q 423 717 432 743 q 401 657 413 690 l 307 402 l 619 402 l 534 644 "},"O":{"x_min":78,"x_max":952,"ha":1031,"o":"m 952 496 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 322 22 405 -14 q 186 126 240 59 q 105 288 132 193 q 78 498 78 382 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 702 970 622 1007 q 839 867 783 934 q 923 706 895 800 q 952 496 952 612 m 231 497 q 247 312 231 393 q 296 175 262 231 q 384 90 330 119 q 515 60 438 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 q 783 681 798 600 q 734 818 768 762 q 647 903 700 874 q 517 932 594 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 "},"Đ":{"x_min":52.421875,"x_max":931,"ha":1010,"o":"m 52 553 l 184 553 l 184 839 q 174 888 184 869 q 150 917 165 907 q 113 930 134 927 q 70 933 93 933 l 52 933 l 52 992 l 478 992 q 669 959 585 992 q 811 863 753 926 q 900 707 869 799 q 931 497 931 615 q 902 291 931 383 q 817 134 873 199 q 676 34 761 69 q 478 0 590 0 l 52 0 l 52 58 l 70 58 q 114 61 93 58 q 150 75 135 65 q 175 105 166 86 q 184 157 184 125 l 184 483 l 52 483 l 52 553 m 445 69 q 590 97 528 69 q 694 179 652 125 q 756 313 735 234 q 777 496 777 393 q 756 679 777 599 q 694 813 735 759 q 591 894 653 867 q 446 922 528 922 l 324 922 l 324 553 l 561 553 l 561 483 l 324 483 l 324 69 l 445 69 "},"3":{"x_min":81,"x_max":696,"ha":777,"o":"m 344 62 q 423 74 386 62 q 489 112 460 85 q 534 181 517 138 q 551 287 551 224 q 534 366 551 331 q 484 427 516 402 q 405 466 451 452 q 300 480 358 480 l 256 480 l 256 550 l 299 550 q 384 565 345 550 q 453 608 424 580 q 499 675 482 636 q 516 764 516 715 q 508 837 516 805 q 482 891 500 869 q 436 925 464 913 q 368 936 408 936 q 291 919 321 936 q 245 874 262 902 q 222 808 228 845 q 216 730 216 771 q 169 734 191 730 q 131 748 147 738 q 106 776 115 759 q 97 819 97 793 q 114 894 97 859 q 166 953 131 928 q 251 992 200 978 q 369 1006 302 1006 q 488 991 435 1006 q 580 948 542 976 q 639 879 618 920 q 661 785 661 838 q 644 697 661 738 q 598 623 627 656 q 527 565 568 589 q 439 530 487 542 q 493 521 464 528 q 551 502 523 515 q 606 472 580 490 q 652 427 632 453 q 684 365 672 400 q 696 284 696 330 q 681 184 696 228 q 640 106 666 139 q 579 50 613 73 q 505 13 544 27 q 424 -7 466 -1 q 343 -14 383 -14 q 225 -1 274 -14 q 143 32 175 11 q 96 81 111 53 q 81 140 81 110 q 104 206 81 182 q 168 230 128 230 q 180 162 168 193 q 214 109 192 132 q 269 75 236 87 q 344 62 302 62 "},"Ǿ":{"x_min":78,"x_max":952,"ha":1031,"o":"m 789 918 q 910 745 869 852 q 952 496 952 637 q 923 287 952 382 q 839 126 895 193 q 702 22 783 59 q 515 -14 620 -14 q 398 -2 452 -14 q 299 32 344 9 l 251 -56 l 169 -56 l 240 71 q 118 246 158 137 q 78 498 78 355 q 105 707 78 613 q 186 867 132 801 q 323 970 240 934 q 517 1007 406 1007 q 631 993 578 1007 q 729 956 684 980 l 781 1048 l 861 1048 l 789 918 m 231 497 q 247 311 231 391 q 297 174 262 231 l 685 876 q 517 932 621 932 q 385 903 439 932 q 296 818 331 874 q 247 681 262 762 q 231 497 231 600 m 798 497 q 782 681 798 601 q 733 818 767 761 l 345 114 q 515 60 410 60 q 647 90 593 60 q 734 175 700 119 q 783 312 768 231 q 798 497 798 393 m 440 1089 q 472 1134 455 1108 q 504 1187 488 1160 q 535 1242 520 1215 q 560 1293 549 1269 l 709 1293 l 709 1278 q 671 1233 696 1260 q 615 1175 645 1205 q 552 1118 585 1146 q 492 1071 520 1089 l 440 1071 l 440 1089 "},"⅛":{"x_min":56.453125,"x_max":1088,"ha":1167,"o":"m 64 399 l 64 454 l 129 454 q 151 456 141 454 q 169 463 161 457 q 181 478 177 468 q 186 505 186 488 l 186 890 l 56 890 l 56 946 l 126 946 q 159 948 141 946 q 193 956 177 950 q 222 972 209 962 q 241 999 235 982 l 310 999 l 310 498 q 315 470 310 481 q 328 454 320 460 q 346 447 335 449 q 369 445 356 445 l 432 445 l 432 399 l 64 399 m 366 0 l 274 0 l 770 992 l 861 992 l 366 0 m 641 152 q 651 202 641 181 q 680 240 662 223 q 724 270 699 257 q 779 294 750 283 q 734 322 756 306 q 695 357 711 337 q 668 402 678 377 q 659 457 659 427 q 670 511 659 484 q 706 559 681 537 q 771 593 731 580 q 869 607 812 607 q 950 597 914 607 q 1011 569 986 588 q 1050 525 1036 551 q 1064 466 1064 499 q 1054 420 1064 441 q 1028 382 1045 399 q 990 351 1012 364 q 944 327 968 337 q 1004 296 977 312 q 1049 260 1031 280 q 1078 215 1068 240 q 1088 158 1088 190 q 1073 92 1088 122 q 1031 38 1059 61 q 959 2 1002 15 q 860 -10 916 -10 q 764 2 805 -10 q 696 37 723 15 q 654 89 668 59 q 641 152 641 118 m 870 44 q 944 69 917 44 q 972 137 972 93 q 938 212 972 181 q 835 267 903 242 q 782 219 803 250 q 761 147 761 187 q 768 107 761 126 q 789 74 775 89 q 823 52 803 60 q 870 44 843 44 m 948 463 q 943 496 948 480 q 927 524 938 512 q 900 544 916 537 q 862 552 884 552 q 800 529 821 552 q 779 470 779 505 q 788 429 779 447 q 813 397 797 411 q 847 373 828 383 q 887 355 866 363 q 932 397 915 371 q 948 463 948 423 "},"4":{"x_min":24,"x_max":757.265625,"ha":777,"o":"m 585 273 l 585 158 q 594 106 585 125 q 618 75 603 86 q 654 61 633 65 q 698 58 675 58 l 717 58 l 717 0 l 298 0 l 298 58 l 338 58 q 382 61 361 58 q 418 75 403 65 q 442 106 433 86 q 452 158 452 125 l 452 273 l 24 273 l 24 330 l 453 992 l 585 992 l 585 350 l 757 350 l 757 273 l 585 273 m 452 607 q 452 674 452 637 q 454 749 453 711 q 457 824 455 787 q 461 895 458 862 q 447 869 456 885 q 427 833 439 853 q 404 792 416 814 q 379 750 391 770 q 355 711 366 729 q 336 681 344 693 l 123 350 l 452 350 l 452 607 "},"Ẁ":{"x_min":12,"x_max":1442,"ha":1454,"o":"m 800 983 l 973 380 q 1008 248 993 311 q 1033 136 1024 184 q 1057 241 1043 186 q 1089 364 1070 297 l 1211 793 q 1216 811 1213 801 q 1220 831 1218 821 q 1224 850 1222 842 q 1226 865 1226 859 q 1203 917 1226 901 q 1134 933 1180 933 l 1102 933 l 1102 992 l 1442 992 l 1442 933 l 1415 933 q 1379 929 1395 933 q 1352 913 1364 925 q 1330 881 1340 902 q 1309 825 1319 860 l 1075 0 l 950 0 l 723 778 l 511 0 l 383 0 l 128 860 q 113 896 121 882 q 93 918 104 910 q 66 930 81 926 q 30 933 50 933 l 12 933 l 12 992 l 394 992 l 394 933 l 362 933 q 299 917 320 933 q 279 867 279 901 q 282 843 279 855 q 290 815 286 831 l 417 371 q 450 247 435 308 q 478 136 466 186 q 502 254 488 190 q 534 386 516 319 l 699 983 l 800 983 m 836 1071 l 783 1071 q 722 1118 755 1089 q 659 1175 690 1146 q 603 1233 629 1205 q 566 1278 578 1260 l 566 1293 l 714 1293 q 740 1242 725 1269 q 770 1187 754 1215 q 804 1134 787 1160 q 836 1089 821 1108 l 836 1071 "},"Ť":{"x_min":28,"x_max":823,"ha":851,"o":"m 494 158 q 503 105 494 125 q 527 75 512 86 q 564 61 543 65 q 608 58 585 58 l 640 58 l 640 0 l 208 0 l 208 58 l 240 58 q 283 61 263 58 q 320 73 304 64 q 344 102 335 83 q 354 151 354 120 l 354 922 l 221 922 q 170 913 190 922 q 136 888 149 904 q 116 852 122 873 q 107 808 110 831 l 99 749 l 28 749 l 34 992 l 816 992 l 823 749 l 751 749 l 744 808 q 734 852 741 831 q 715 888 728 873 q 681 913 702 904 q 629 922 660 922 l 494 922 l 494 158 m 220 1293 l 274 1293 q 314 1265 293 1280 q 353 1234 334 1251 q 390 1200 372 1217 q 424 1166 408 1183 q 457 1200 439 1183 q 495 1234 475 1217 q 535 1265 515 1251 q 575 1293 556 1280 l 630 1293 l 630 1274 q 594 1229 613 1255 q 554 1176 574 1203 q 518 1121 535 1148 q 490 1071 501 1094 l 359 1071 q 331 1121 348 1094 q 295 1176 314 1148 q 255 1229 275 1203 q 220 1274 236 1255 l 220 1293 "},"ψ":{"x_min":25.203125,"x_max":888,"ha":964,"o":"m 569 77 q 679 114 634 86 q 753 184 725 142 q 794 282 782 226 q 807 401 807 337 q 798 503 807 459 q 774 580 789 548 q 736 634 758 613 q 687 669 714 656 q 694 705 687 689 q 712 731 700 721 q 737 747 723 742 q 768 753 752 753 q 855 675 823 753 q 888 441 888 597 q 881 335 888 387 q 860 236 875 283 q 821 148 845 189 q 761 74 796 106 q 678 21 726 43 q 569 -8 631 0 l 569 -334 l 486 -334 l 486 -14 q 337 6 401 -13 q 232 64 274 26 q 170 155 191 101 q 150 276 150 208 l 150 591 q 139 640 150 622 q 112 669 129 659 q 74 683 95 679 q 29 686 52 686 l 25 686 l 25 745 l 280 745 l 280 288 q 333 135 280 189 q 486 74 386 80 l 486 1055 l 569 1055 l 569 77 "},"ŗ":{"x_min":46,"x_max":633,"ha":654,"o":"m 447 0 l 46 0 l 46 58 l 50 58 q 94 61 73 58 q 130 75 115 65 q 154 105 145 86 q 164 158 164 125 l 164 591 q 154 640 164 622 q 130 669 145 659 q 93 683 114 679 q 50 686 73 686 l 46 686 l 46 745 l 260 745 l 286 606 l 293 606 q 321 665 307 638 q 356 713 335 692 q 407 746 376 734 q 483 758 437 758 q 596 731 559 758 q 633 656 633 705 q 625 616 633 635 q 603 585 618 598 q 563 565 587 572 q 503 558 539 558 q 487 643 503 617 q 430 669 471 669 q 384 654 405 669 q 349 615 364 639 q 323 560 334 591 q 306 495 313 528 q 297 430 300 462 q 294 370 294 397 l 294 151 q 304 102 294 120 q 328 73 313 83 q 365 61 344 64 q 408 58 385 58 l 447 58 l 447 0 m 128 -288 q 150 -188 139 -242 q 170 -85 161 -135 l 291 -85 l 291 -98 q 267 -147 281 -120 q 238 -202 254 -174 q 206 -258 222 -231 q 175 -307 189 -285 l 128 -307 l 128 -288 "}},"cssFontWeight":"normal","ascender":1290,"underlinePosition":-154,"cssFontStyle":"normal","boundingBox":{"yMin":-387,"xMin":-275,"yMax":1359,"xMax":1731},"resolution":1000,"original_font_information":{"postscript_name":"DroidSerif","version_string":"Version 1.00 build 107","vendor_url":"http://www.ascendercorp.com/","full_font_name":"Droid Serif","font_family_name":"Droid Serif","copyright":"Digitized data copyright © 2006, Google Corporation.","description":"","trademark":"Droid is a trademark of Google and may be registered in certain jurisdictions.","designer":"","designer_url":"http://www.ascendercorp.com/typedesigners.html","unique_font_identifier":"Ascender - Droid Serif","license_url":"http://ascendercorp.com/eula10.html","license_description":"This font software is the valuable property of Ascender Corporation and/or its suppliers and its use by you is covered under the terms of a license agreement. This font software is licensed to you by Ascender Corporation for your personal or business use on up to five personal computers. You may not use this font software on more than five personal computers unless you have obtained a license from Ascender to do so. Except as specifically permitted by the license, you may not copy this font software.\n\nIf you have any questions, please review the license agreement you received with this font software, and/or contact Ascender Corporation. \n\nContact Information:\nAscender Corporation\nWeb http://www.ascendercorp.com/","manufacturer_name":"Ascender Corporation","font_sub_family_name":"Regular"},"descender":-328,"familyName":"Droid Serif","lineHeight":1617,"underlineThickness":102} \ No newline at end of file diff --git a/node_modules/three/examples/fonts/gentilis_bold.typeface.json b/node_modules/three/examples/fonts/gentilis_bold.typeface.json new file mode 100644 index 0000000..1097138 --- /dev/null +++ b/node_modules/three/examples/fonts/gentilis_bold.typeface.json @@ -0,0 +1 @@ +{"glyphs":{"ợ":{"x_min":44,"x_max":818,"ha":817,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 818 706 q 774 611 818 663 q 637 509 730 559 q 672 425 660 471 q 685 329 685 380 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 138 543 93 494 q 243 621 182 592 q 378 651 305 651 q 498 629 444 651 q 592 568 552 607 q 630 613 621 591 q 640 652 640 635 q 627 689 640 671 q 595 722 614 706 l 772 802 q 804 761 791 787 q 818 706 818 734 m 481 -184 q 473 -230 481 -209 q 450 -268 464 -252 q 416 -294 436 -285 q 375 -304 397 -304 q 315 -283 336 -304 q 294 -221 294 -262 q 303 -174 294 -196 q 327 -136 312 -152 q 361 -111 341 -120 q 401 -102 380 -102 q 460 -122 439 -102 q 481 -184 481 -143 "},"Ẩ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 658 962 q 640 938 650 949 q 619 922 630 927 l 428 1032 l 239 922 q 218 938 227 927 q 198 962 208 949 l 387 1183 l 470 1183 l 658 962 m 562 1392 q 551 1359 562 1374 q 522 1332 539 1345 q 490 1308 506 1319 q 465 1285 473 1297 q 461 1260 457 1273 q 488 1230 464 1247 q 474 1223 483 1226 q 457 1217 466 1220 q 439 1212 448 1214 q 426 1209 431 1210 q 366 1245 381 1229 q 355 1275 351 1261 q 376 1301 359 1289 q 412 1327 393 1314 q 446 1353 431 1339 q 460 1383 460 1366 q 453 1414 460 1405 q 431 1424 445 1424 q 408 1414 417 1424 q 399 1392 399 1404 q 407 1373 399 1384 q 363 1358 390 1366 q 304 1348 336 1351 l 296 1355 q 294 1369 294 1361 q 308 1408 294 1389 q 342 1443 321 1427 q 393 1467 364 1458 q 453 1477 422 1477 q 503 1470 482 1477 q 537 1451 524 1463 q 556 1424 550 1440 q 562 1392 562 1409 "},"ǻ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 398 842 q 385 892 398 875 q 356 910 371 910 q 331 904 341 910 q 314 889 321 898 q 303 868 306 880 q 299 844 299 856 q 313 795 299 812 q 342 779 327 779 q 384 797 369 779 q 398 842 398 815 m 490 870 q 476 802 490 834 q 440 747 463 770 q 388 710 417 724 q 328 697 359 697 q 279 705 301 697 q 241 729 257 713 q 216 767 225 745 q 207 816 207 789 q 221 884 207 852 q 257 940 234 916 q 309 978 279 964 q 370 992 338 992 q 419 982 397 992 q 457 957 442 973 q 482 919 473 941 q 490 870 490 897 m 308 1003 q 294 1007 302 1004 q 276 1015 285 1011 q 260 1024 267 1020 q 249 1032 253 1029 l 392 1323 q 422 1319 400 1322 q 470 1312 444 1316 q 517 1304 495 1308 q 547 1297 539 1299 l 567 1261 l 308 1003 "},"ʉ":{"x_min":22.25,"x_max":776.453125,"ha":800,"o":"m 743 275 l 672 275 l 672 192 q 672 158 672 171 q 675 134 673 144 q 679 120 676 125 q 687 111 682 114 q 710 109 695 106 q 759 127 724 112 l 776 76 q 721 43 751 60 q 662 11 691 26 q 612 -11 634 -2 q 582 -20 590 -20 q 558 -15 570 -20 q 537 1 547 -11 q 520 35 528 13 q 509 92 513 57 q 433 33 466 55 q 372 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 275 l 37 275 l 22 289 q 27 304 23 295 q 35 322 31 313 q 43 341 39 332 l 51 356 l 105 356 l 105 467 q 103 518 105 500 q 95 545 102 536 q 70 558 87 554 q 22 565 54 561 l 22 612 q 85 618 56 614 q 138 625 113 621 q 190 636 164 630 q 244 651 215 642 l 268 619 l 268 356 l 509 356 l 509 467 q 506 516 509 498 q 495 545 504 535 q 468 559 486 555 q 419 565 450 563 l 419 612 q 542 628 487 618 q 646 651 597 638 l 672 619 l 672 356 l 757 356 l 772 338 l 743 275 m 346 97 q 377 100 361 97 q 414 112 394 103 q 457 137 434 122 q 509 177 481 153 l 509 275 l 268 275 l 268 232 q 273 163 268 190 q 288 122 278 137 q 313 102 298 107 q 346 97 327 97 "},"Ổ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 661 962 q 643 938 653 949 q 622 922 634 927 l 432 1032 l 242 922 q 221 938 231 927 q 202 962 211 949 l 391 1183 l 474 1183 l 661 962 m 566 1392 q 554 1359 566 1374 q 526 1332 542 1345 q 493 1308 509 1319 q 469 1285 477 1297 q 464 1260 461 1273 q 491 1230 467 1247 q 478 1223 486 1226 q 460 1217 469 1220 q 442 1212 451 1214 q 429 1209 434 1210 q 370 1245 385 1229 q 359 1275 355 1261 q 379 1301 363 1289 q 415 1327 396 1314 q 449 1353 434 1339 q 464 1383 464 1366 q 456 1414 464 1405 q 434 1424 448 1424 q 412 1414 420 1424 q 403 1392 403 1404 q 410 1373 403 1384 q 366 1358 393 1366 q 307 1348 339 1351 l 300 1355 q 298 1369 298 1361 q 311 1408 298 1389 q 346 1443 324 1427 q 396 1467 368 1458 q 456 1477 425 1477 q 506 1470 486 1477 q 540 1451 527 1463 q 560 1424 554 1440 q 566 1392 566 1409 "},"Ừ":{"x_min":29.078125,"x_max":1016.078125,"ha":1016,"o":"m 1016 944 q 1003 893 1016 920 q 963 839 990 867 q 895 783 936 811 q 797 728 853 755 l 797 355 q 772 197 797 266 q 702 79 747 127 q 596 5 657 30 q 461 -20 535 -20 q 330 0 392 -20 q 222 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 340 146 315 180 q 405 95 365 112 q 503 78 445 78 q 585 99 552 78 q 639 157 618 121 q 668 240 659 193 q 678 337 678 287 l 678 763 q 655 783 678 771 q 585 805 633 795 l 585 855 l 830 855 q 837 873 835 864 q 838 889 838 882 q 825 926 838 909 q 794 959 813 944 l 970 1040 q 1002 998 989 1025 q 1016 944 1016 972 m 617 962 q 597 938 607 949 q 576 922 588 927 l 251 1080 l 258 1123 q 278 1139 263 1128 q 311 1162 293 1150 q 345 1183 329 1173 q 369 1198 362 1193 l 617 962 "},"̂":{"x_min":-583.953125,"x_max":-119.375,"ha":0,"o":"m -119 750 q -137 723 -127 737 q -158 705 -147 710 l -349 856 l -538 705 q -562 723 -550 710 q -583 750 -574 737 l -394 1013 l -301 1013 l -119 750 "},"Á":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 339 922 q 315 941 328 927 q 293 967 303 954 l 541 1198 q 575 1178 556 1189 q 612 1157 594 1167 q 642 1137 629 1146 q 661 1122 656 1127 l 668 1086 l 339 922 "},"ṑ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 674 886 q 667 866 672 879 q 656 840 662 854 q 644 815 650 826 q 636 797 639 803 l 118 797 l 96 818 q 103 838 99 826 q 114 864 108 850 q 126 889 120 877 q 134 908 131 901 l 653 908 l 674 886 m 488 980 q 476 971 484 976 q 460 962 469 966 q 444 954 452 957 q 430 949 436 951 l 170 1204 l 190 1242 q 218 1248 197 1244 q 263 1257 239 1252 q 310 1265 288 1261 q 340 1269 332 1268 l 488 980 "},"Ȯ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 525 1050 q 517 1003 525 1024 q 494 965 508 981 q 461 939 480 949 q 419 930 441 930 q 359 951 380 930 q 338 1012 338 972 q 347 1059 338 1037 q 371 1097 356 1081 q 405 1122 385 1113 q 445 1132 424 1132 q 504 1111 483 1132 q 525 1050 525 1091 "},"ĥ":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 388 q 534 457 539 430 q 521 499 530 483 q 497 521 511 515 q 462 528 482 528 q 381 503 423 528 q 285 433 339 479 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 859 q 120 904 122 888 q 110 928 118 920 q 83 941 101 937 q 33 949 65 945 l 33 996 q 101 1007 70 1002 q 156 1019 131 1013 q 206 1033 182 1025 q 255 1051 230 1040 l 285 1023 l 285 530 q 431 622 363 594 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 m 640 1132 q 622 1108 632 1119 q 601 1091 613 1097 l 411 1202 l 221 1091 q 200 1108 210 1097 q 181 1132 190 1119 l 370 1352 l 453 1352 l 640 1132 "},"»":{"x_min":84.78125,"x_max":670.765625,"ha":715,"o":"m 670 289 l 400 1 l 361 31 l 497 314 l 361 598 l 400 629 l 670 339 l 670 289 m 393 289 l 124 1 l 85 31 l 221 314 l 84 598 l 124 629 l 394 339 l 393 289 "},"Ḻ":{"x_min":29.078125,"x_max":691.46875,"ha":707,"o":"m 691 205 q 685 144 688 176 q 677 83 681 112 q 670 32 673 54 q 663 0 666 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 131 q 297 109 292 119 q 317 94 303 100 q 356 84 332 87 q 418 81 380 81 l 494 81 q 547 88 525 81 q 584 112 568 95 q 614 156 601 129 q 641 223 627 183 l 691 205 m 649 -137 q 641 -157 647 -145 q 630 -183 636 -170 q 619 -208 624 -197 q 611 -227 613 -220 l 92 -227 l 71 -205 q 78 -185 73 -197 q 88 -159 82 -173 q 100 -134 94 -146 q 109 -116 105 -122 l 627 -116 l 649 -137 "},"∆":{"x_min":29.84375,"x_max":803.015625,"ha":847,"o":"m 784 0 l 45 0 l 29 40 q 142 341 88 195 q 189 468 165 402 q 237 597 214 534 q 281 717 261 660 q 318 818 302 774 q 391 859 353 841 q 468 893 429 877 q 512 778 487 842 q 564 645 537 715 q 619 504 591 576 q 674 365 647 432 q 803 40 736 207 l 784 0 m 592 132 q 514 333 552 233 q 479 422 497 376 q 443 514 461 468 q 407 604 425 560 q 375 686 390 648 q 342 597 360 644 l 307 503 q 274 411 290 456 q 242 323 257 365 q 171 132 206 226 q 165 112 166 119 q 171 102 164 105 q 195 98 178 99 q 245 98 212 98 l 517 98 q 568 98 550 98 q 593 102 585 99 q 598 112 600 105 q 592 132 597 119 "},"ṟ":{"x_min":-88.84375,"x_max":597.515625,"ha":617,"o":"m 593 621 q 597 604 597 618 q 594 568 597 589 q 585 521 591 547 q 574 471 580 496 q 561 426 568 447 q 549 393 554 405 l 499 393 q 491 444 497 420 q 476 487 485 469 q 454 515 467 504 q 424 526 440 526 q 395 520 411 526 q 361 501 379 515 q 324 459 343 486 q 284 387 305 432 l 284 90 q 313 69 284 80 q 404 49 341 59 l 404 0 l 32 0 l 32 49 q 122 90 122 69 l 122 450 q 120 487 122 472 q 117 512 119 503 q 112 527 115 522 q 106 536 109 533 q 96 544 101 541 q 83 549 91 547 q 63 552 75 551 q 32 554 51 553 l 32 602 q 97 612 69 607 q 148 622 124 617 q 194 634 172 627 q 246 651 217 641 l 274 622 l 283 524 q 324 573 301 550 q 374 614 347 596 q 428 641 400 631 q 486 651 457 651 q 540 643 512 651 q 593 621 568 635 m 489 -137 q 481 -157 486 -145 q 470 -183 476 -170 q 459 -208 464 -197 q 451 -227 453 -220 l -67 -227 l -88 -205 q -82 -185 -86 -197 q -71 -159 -77 -173 q -59 -134 -65 -146 q -50 -116 -54 -122 l 467 -116 l 489 -137 "},"ỹ":{"x_min":-42.046875,"x_max":696.53125,"ha":705,"o":"m 696 581 q 663 572 676 576 q 642 563 650 568 q 629 551 634 558 q 621 535 625 545 l 395 -50 q 332 -178 366 -125 q 260 -266 298 -232 q 181 -317 222 -301 q 96 -334 139 -334 q 45 -329 70 -334 q 1 -317 20 -324 q -30 -302 -18 -310 q -42 -287 -42 -293 q -30 -264 -42 -281 q -3 -227 -18 -247 q 29 -190 12 -207 q 57 -165 46 -172 q 125 -192 91 -187 q 185 -188 160 -197 q 239 -149 210 -179 q 291 -62 267 -120 l 311 -15 l 84 535 q 59 563 76 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 275 574 289 578 q 255 565 261 570 q 249 553 248 560 q 255 535 250 546 l 394 194 l 527 535 q 532 552 531 545 q 528 564 533 559 q 510 573 523 569 q 474 581 497 577 l 474 631 l 696 631 l 696 581 m 636 933 q 606 873 623 905 q 566 811 588 840 q 516 764 543 783 q 457 745 489 745 q 402 756 428 745 q 350 780 375 767 q 300 804 325 793 q 250 816 276 816 q 222 810 234 816 q 199 795 210 805 q 176 771 187 786 q 153 738 165 756 l 102 756 q 131 817 114 784 q 171 879 149 850 q 221 927 193 908 q 279 947 248 947 q 338 935 310 947 q 392 911 366 924 q 440 887 417 898 q 485 876 463 876 q 538 894 516 876 q 583 954 560 913 l 636 933 "},"«":{"x_min":44.078125,"x_max":630.0625,"ha":715,"o":"m 44 291 l 44 315 q 44 331 44 324 q 45 340 44 339 l 314 629 l 353 598 l 347 586 q 332 554 341 574 q 310 508 322 534 q 284 456 297 483 q 259 404 271 430 q 238 359 247 379 q 222 328 228 340 q 217 316 217 316 l 354 31 l 314 1 l 44 291 m 320 291 l 320 315 q 321 331 320 324 q 322 340 321 339 l 590 629 l 629 598 l 623 586 q 608 554 617 574 q 586 508 598 534 q 560 456 573 483 q 535 404 548 430 q 514 359 523 379 q 498 328 504 340 q 493 316 493 316 l 630 31 l 590 1 l 320 291 "},"ử":{"x_min":22.9375,"x_max":940,"ha":940,"o":"m 940 706 q 924 650 940 680 q 876 590 908 621 q 792 528 843 559 q 672 469 741 497 l 672 192 q 672 157 672 171 q 675 134 673 144 q 679 120 676 125 q 687 111 682 114 q 710 109 695 106 q 759 127 724 112 l 776 76 q 721 43 751 59 q 662 11 691 26 q 612 -11 634 -2 q 582 -20 590 -20 q 558 -15 570 -20 q 537 1 547 -11 q 520 35 528 13 q 509 92 513 57 q 433 33 466 55 q 372 0 399 11 q 321 -16 344 -12 q 276 -20 298 -20 q 214 -11 244 -20 q 159 20 183 -2 q 119 84 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 630 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 313 102 298 107 q 346 97 327 97 q 377 100 361 97 q 414 112 394 103 q 457 137 434 122 q 509 177 481 153 l 509 467 q 506 516 509 497 q 495 544 504 534 q 468 558 486 554 q 419 564 450 562 l 419 611 q 542 628 487 617 q 646 650 597 638 l 672 619 l 671 540 q 716 569 698 554 q 743 599 733 585 q 757 627 753 614 q 762 651 762 640 q 749 688 762 671 q 718 722 737 706 l 894 802 q 926 761 913 787 q 940 706 940 734 m 524 904 q 513 871 524 885 q 484 844 501 856 q 452 820 468 831 q 427 797 435 809 q 423 772 419 785 q 450 742 426 759 q 436 735 445 738 q 419 728 428 731 q 401 723 410 725 q 388 721 393 721 q 328 756 343 740 q 317 787 313 773 q 338 813 321 801 q 374 838 355 826 q 408 864 393 851 q 422 894 422 878 q 415 926 422 917 q 393 936 407 936 q 370 925 379 936 q 361 904 361 915 q 369 885 361 896 q 325 870 352 877 q 266 860 298 863 l 258 867 q 256 881 256 873 q 270 920 256 900 q 304 954 283 939 q 355 979 326 970 q 415 989 384 989 q 465 982 444 989 q 499 963 486 975 q 518 936 512 951 q 524 904 524 921 "},"í":{"x_min":43,"x_max":432.03125,"ha":417,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 m 172 705 q 158 709 166 705 q 141 717 149 713 q 125 726 132 721 q 113 734 118 730 l 257 1025 q 287 1021 265 1024 q 334 1014 309 1018 q 381 1005 359 1010 q 411 999 404 1001 l 432 962 l 172 705 "},"ʠ":{"x_min":44,"x_max":947.5,"ha":762,"o":"m 361 109 q 396 113 380 109 q 430 127 413 118 q 464 150 446 136 q 501 182 481 164 l 501 474 q 473 509 489 494 q 439 537 458 525 q 401 554 421 548 q 363 561 382 561 q 306 551 334 561 q 256 518 278 542 q 220 452 234 494 q 207 347 207 411 q 220 245 207 290 q 255 170 234 201 q 305 124 277 140 q 361 109 333 109 m 947 956 q 932 932 947 949 q 897 897 918 915 q 854 862 876 879 q 816 837 832 845 q 802 880 810 860 q 785 915 794 900 q 763 938 775 930 q 735 947 750 947 q 707 936 720 947 q 684 902 693 926 q 669 837 674 877 q 664 734 664 796 l 664 -234 q 668 -245 664 -239 q 682 -256 672 -250 q 709 -266 692 -261 q 752 -276 727 -271 l 752 -326 l 385 -326 l 385 -276 q 475 -256 449 -266 q 501 -234 501 -245 l 501 92 q 447 41 471 62 q 398 6 422 20 q 345 -13 373 -7 q 282 -20 317 -20 q 200 2 242 -20 q 123 67 158 25 q 66 170 88 110 q 44 306 44 231 q 58 411 44 366 q 96 491 73 457 q 147 550 119 525 q 198 592 174 574 q 237 615 215 604 q 283 634 259 626 q 330 646 306 642 q 373 651 353 651 q 435 643 405 651 q 501 608 465 635 l 501 697 q 507 787 501 747 q 527 859 514 827 q 560 919 541 892 q 604 970 579 946 q 643 1002 621 987 q 688 1027 665 1017 q 734 1044 711 1038 q 778 1051 757 1051 q 840 1040 809 1051 q 894 1013 870 1029 q 932 982 918 998 q 947 956 947 966 "},"ǜ":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 627 859 q 619 813 627 834 q 596 775 610 791 q 562 749 581 758 q 520 740 542 740 q 461 761 481 740 q 440 822 440 782 q 449 869 440 847 q 472 907 458 891 q 506 932 487 923 q 546 942 525 942 q 606 921 584 942 q 627 859 627 901 m 341 859 q 333 813 341 834 q 310 775 324 791 q 276 749 296 758 q 235 740 257 740 q 175 761 196 740 q 154 822 154 782 q 163 869 154 847 q 186 907 172 891 q 220 932 201 923 q 260 942 240 942 q 320 921 299 942 q 341 859 341 901 m 500 985 q 488 976 496 981 q 473 967 481 972 q 456 960 464 963 q 442 954 448 956 l 183 1210 l 202 1248 q 230 1254 209 1250 q 276 1262 251 1258 q 322 1270 300 1267 q 352 1274 344 1273 l 500 985 "},"ṥ":{"x_min":52.03125,"x_max":530,"ha":582,"o":"m 530 192 q 515 109 530 144 q 477 51 500 75 q 424 13 454 28 q 365 -7 395 0 q 308 -17 335 -15 q 260 -20 280 -20 q 213 -16 239 -20 q 161 -7 188 -13 q 109 7 135 -1 q 61 29 83 17 q 53 53 56 31 q 52 105 51 75 q 55 169 52 136 q 66 227 58 202 l 120 220 q 143 155 127 184 q 180 105 158 126 q 228 74 202 85 q 284 63 255 63 q 357 80 333 63 q 381 138 381 98 q 367 187 381 166 q 330 227 353 209 q 278 262 307 246 q 218 294 249 277 q 161 325 189 308 q 110 364 133 343 q 74 411 88 385 q 60 469 60 437 q 80 545 60 511 q 135 602 101 579 q 212 638 169 625 q 301 651 255 651 q 360 647 331 651 q 417 636 390 643 q 467 620 444 630 q 506 598 490 611 q 507 576 510 595 q 498 532 505 556 q 483 485 492 508 q 466 451 474 462 l 419 457 q 371 548 402 516 q 294 580 339 580 q 231 561 253 580 q 209 514 209 542 q 219 475 209 492 q 250 443 230 458 q 299 413 270 428 q 364 379 328 398 q 423 347 393 364 q 476 308 452 330 q 515 258 500 286 q 530 192 530 230 m 250 705 q 235 709 244 705 q 218 717 227 713 q 202 726 209 721 q 191 734 195 730 l 334 1025 q 364 1021 342 1024 q 411 1014 386 1018 q 459 1005 436 1010 q 489 999 481 1001 l 509 962 l 250 705 m 338 1119 q 330 1072 338 1094 q 307 1035 321 1051 q 273 1009 293 1018 q 232 999 254 999 q 172 1020 193 999 q 151 1082 151 1041 q 160 1129 151 1107 q 184 1167 169 1150 q 218 1192 198 1183 q 258 1201 237 1201 q 317 1181 296 1201 q 338 1119 338 1161 "},"µ":{"x_min":31.265625,"x_max":786.875,"ha":790,"o":"m 786 65 q 741 35 767 51 q 688 7 714 20 q 637 -12 662 -4 q 595 -21 612 -21 q 563 -10 577 -21 q 539 16 549 0 q 523 57 529 34 q 515 108 517 81 q 421 9 464 39 q 337 -21 379 -21 q 271 4 307 -21 q 201 72 234 29 l 201 58 q 211 -54 201 -3 q 237 -146 221 -105 q 274 -218 253 -187 q 314 -270 294 -249 q 280 -283 304 -273 q 228 -304 255 -292 q 177 -325 200 -315 q 145 -339 153 -334 l 114 -314 l 114 470 q 112 512 114 497 q 104 537 111 528 q 80 550 97 546 q 31 558 63 555 l 31 606 q 143 622 92 611 q 245 651 194 632 l 249 646 q 259 637 253 642 q 269 626 264 632 q 277 617 274 620 l 277 258 q 287 202 277 228 q 312 156 297 175 q 346 126 328 137 q 380 115 365 115 q 407 118 393 115 q 436 130 420 121 q 471 159 451 140 q 514 207 490 177 l 514 507 q 511 533 514 518 q 505 563 509 548 q 497 591 501 578 q 488 610 493 604 q 529 618 506 613 q 575 627 552 622 q 621 639 598 633 q 663 651 644 644 l 687 619 q 684 601 686 610 q 681 579 683 592 q 679 551 680 567 q 677 514 677 535 l 677 202 q 678 150 677 170 q 683 118 679 130 q 691 102 686 106 q 703 97 696 97 q 732 101 718 97 q 769 116 747 105 l 786 65 "},"ỳ":{"x_min":-42.046875,"x_max":696.53125,"ha":705,"o":"m 696 581 q 663 572 676 576 q 642 563 650 568 q 629 551 634 558 q 621 535 625 545 l 395 -50 q 332 -178 366 -125 q 260 -266 298 -232 q 181 -317 222 -301 q 96 -334 139 -334 q 45 -329 70 -334 q 1 -317 20 -324 q -30 -302 -18 -310 q -42 -287 -42 -293 q -30 -264 -42 -281 q -3 -227 -18 -247 q 29 -190 12 -207 q 57 -165 46 -172 q 125 -192 91 -187 q 185 -188 160 -197 q 239 -149 210 -179 q 291 -62 267 -120 l 311 -15 l 84 535 q 59 563 76 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 275 574 289 578 q 255 565 261 570 q 249 553 248 560 q 255 535 250 546 l 394 194 l 527 535 q 532 552 531 545 q 528 564 533 559 q 510 573 523 569 q 474 581 497 577 l 474 631 l 696 631 l 696 581 m 478 736 q 466 727 474 732 q 450 718 459 722 q 434 710 442 713 q 419 705 425 707 l 160 960 l 180 998 q 208 1004 187 1000 q 253 1013 229 1008 q 300 1020 278 1017 q 330 1025 322 1024 l 478 736 "},"Ḟ":{"x_min":29.15625,"x_max":659.234375,"ha":705,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 633 855 l 659 833 q 655 788 658 815 q 649 734 653 762 q 641 681 645 706 q 632 644 636 656 l 580 644 q 564 740 578 707 q 524 774 550 774 l 291 774 l 291 499 l 540 499 l 564 475 q 550 450 558 463 q 533 426 542 437 q 516 404 524 414 q 501 389 507 395 q 479 406 491 399 q 452 418 467 413 q 416 424 437 422 q 367 427 396 427 l 291 427 l 291 90 q 297 82 291 86 q 315 72 302 77 q 350 61 328 67 q 405 49 372 55 l 405 0 l 29 0 m 437 1050 q 428 1003 437 1024 q 405 965 420 981 q 372 939 391 949 q 331 930 352 930 q 270 951 291 930 q 250 1012 250 972 q 258 1059 250 1037 q 282 1097 267 1081 q 316 1122 297 1113 q 356 1132 335 1132 q 416 1111 394 1132 q 437 1050 437 1091 "},"M":{"x_min":35.953125,"x_max":1125.84375,"ha":1176,"o":"m 1107 805 q 1067 800 1090 805 q 1020 786 1045 795 l 1027 90 q 1052 70 1027 82 q 1125 49 1077 59 l 1125 0 l 771 0 l 771 49 q 844 70 817 59 q 871 90 871 81 l 866 642 l 578 0 l 514 0 l 232 641 l 227 90 q 249 70 227 82 q 320 49 271 59 l 320 0 l 35 0 l 35 49 q 105 70 82 59 q 128 90 128 81 l 135 781 q 87 800 111 795 q 42 805 62 805 l 42 855 l 277 855 q 289 852 284 855 q 300 844 295 850 q 311 827 305 838 q 325 798 317 816 l 575 231 l 829 798 q 844 829 838 818 q 855 846 850 840 q 866 853 861 852 q 877 855 871 855 l 1107 855 l 1107 805 "},"Ḏ":{"x_min":20.265625,"x_max":828,"ha":884,"o":"m 828 458 q 810 306 828 373 q 763 188 793 240 q 693 102 733 137 q 608 43 653 66 q 514 10 562 21 q 419 0 465 0 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 784 l 29 771 l 20 834 q 99 849 53 842 q 195 863 145 857 q 296 871 246 868 q 391 875 347 875 q 577 846 495 875 q 714 765 658 818 q 798 634 769 711 q 828 458 828 556 m 343 803 q 318 802 331 803 q 292 802 305 802 l 292 113 q 293 104 292 108 q 300 90 295 96 q 317 81 305 85 q 347 75 328 77 q 394 73 366 73 q 449 81 420 73 q 506 109 477 90 q 559 157 534 128 q 603 226 585 186 q 634 317 622 266 q 646 432 646 368 q 626 591 646 522 q 568 707 606 660 q 473 778 530 754 q 343 803 417 803 m 689 -137 q 681 -157 687 -145 q 670 -183 676 -170 q 659 -208 664 -197 q 651 -227 653 -220 l 132 -227 l 111 -205 q 118 -185 113 -197 q 128 -159 122 -173 q 140 -134 134 -146 q 149 -116 145 -122 l 667 -116 l 689 -137 "},"ũ":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 658 933 q 628 873 646 905 q 588 811 611 840 q 538 764 566 783 q 480 745 511 745 q 424 756 451 745 q 373 780 398 767 q 323 804 347 793 q 272 816 298 816 q 244 810 257 816 q 221 795 232 805 q 199 771 210 786 q 175 738 187 756 l 124 756 q 154 817 137 784 q 193 879 171 850 q 243 927 216 908 q 301 947 270 947 q 361 935 333 947 q 414 911 389 924 q 463 887 440 898 q 507 876 486 876 q 560 894 538 876 q 606 954 583 913 l 658 933 "},"ŭ":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 632 927 q 584 833 611 872 q 526 769 557 794 q 461 732 495 744 q 392 721 427 721 q 320 732 355 721 q 254 769 285 744 q 197 833 223 794 q 150 927 170 872 q 161 940 154 933 q 174 953 167 947 q 188 965 181 960 q 201 973 196 970 q 241 919 218 941 q 289 881 264 896 q 341 858 315 865 q 389 851 367 851 q 440 858 413 851 q 492 880 466 865 q 540 918 517 895 q 580 973 563 941 q 593 965 586 970 q 608 953 600 960 q 621 940 615 947 q 632 927 628 933 "},"{":{"x_min":58.1875,"x_max":470.046875,"ha":487,"o":"m 470 1032 q 383 955 417 999 q 350 859 350 910 q 354 795 350 823 q 364 742 358 768 q 373 688 369 716 q 378 625 378 661 q 368 569 378 597 q 340 518 358 542 q 298 474 322 494 q 245 442 274 454 q 345 383 313 430 q 378 260 378 336 q 373 193 378 224 q 364 132 369 161 q 354 76 358 104 q 350 18 350 48 q 354 -31 350 -9 q 371 -74 358 -54 q 405 -113 383 -95 q 463 -152 427 -132 l 437 -214 q 326 -167 375 -190 q 243 -113 277 -143 q 193 -47 210 -84 q 176 38 176 -10 q 180 103 176 74 q 190 159 184 131 q 199 217 195 187 q 204 285 204 247 q 180 363 204 340 q 113 387 156 387 l 99 387 q 92 386 95 387 q 84 385 88 386 q 69 382 79 384 l 58 439 q 169 497 134 460 q 204 585 204 534 q 199 649 204 622 q 190 702 195 676 q 180 754 184 727 q 176 820 176 782 q 196 904 176 865 q 252 975 216 943 q 337 1035 288 1008 q 442 1085 385 1061 l 470 1032 "},"¼":{"x_min":47.84375,"x_max":826.015625,"ha":865,"o":"m 209 2 q 190 -5 201 -2 q 166 -10 179 -8 q 141 -15 153 -13 q 120 -20 129 -18 l 103 0 l 707 816 q 725 822 714 819 q 749 828 736 825 q 773 833 761 831 q 792 838 785 836 l 809 819 l 209 2 m 826 145 q 807 124 817 135 q 787 109 796 114 l 767 109 l 767 44 q 777 35 767 40 q 819 25 787 31 l 819 0 l 595 0 l 595 25 q 636 31 621 28 q 661 37 652 34 q 672 42 669 40 q 676 48 676 45 l 676 109 l 493 109 l 477 121 l 663 379 q 683 385 671 382 l 706 392 q 730 399 719 396 q 749 405 741 402 l 767 391 l 767 156 l 815 156 l 826 145 m 59 432 l 59 460 q 109 467 90 463 q 140 474 129 471 q 157 482 152 478 q 162 490 162 486 l 162 727 q 161 747 162 740 q 155 759 160 754 q 147 762 152 761 q 130 763 141 764 q 101 761 119 763 q 58 754 83 759 l 47 782 q 90 792 64 785 q 146 807 117 799 q 200 824 174 816 q 240 838 226 832 l 258 823 l 258 490 q 262 482 258 486 q 276 475 266 479 q 305 467 287 471 q 352 460 323 463 l 352 432 l 59 432 m 676 318 l 553 156 l 676 156 l 676 318 "},"Ḿ":{"x_min":35.953125,"x_max":1125.84375,"ha":1176,"o":"m 1107 805 q 1067 800 1090 805 q 1020 786 1045 795 l 1027 90 q 1052 70 1027 82 q 1125 49 1077 59 l 1125 0 l 771 0 l 771 49 q 844 70 817 59 q 871 90 871 81 l 866 642 l 578 0 l 514 0 l 232 641 l 227 90 q 249 70 227 82 q 320 49 271 59 l 320 0 l 35 0 l 35 49 q 105 70 82 59 q 128 90 128 81 l 135 781 q 87 800 111 795 q 42 805 62 805 l 42 855 l 277 855 q 289 852 284 855 q 300 844 295 850 q 311 827 305 838 q 325 798 317 816 l 575 231 l 829 798 q 844 829 838 818 q 855 846 850 840 q 866 853 861 852 q 877 855 871 855 l 1107 855 l 1107 805 m 491 922 q 466 941 479 927 q 444 967 454 954 l 692 1198 q 727 1178 708 1189 q 763 1157 746 1167 q 794 1137 780 1146 q 813 1122 807 1127 l 819 1086 l 491 922 "},"IJ":{"x_min":42.09375,"x_max":877,"ha":919,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 m 877 805 q 807 784 830 795 q 783 763 783 772 l 783 123 q 768 -4 783 49 q 730 -96 753 -57 q 678 -162 706 -135 q 622 -211 649 -189 q 581 -239 604 -226 q 534 -262 559 -252 q 485 -278 510 -272 q 437 -284 460 -284 q 377 -276 406 -284 q 325 -259 348 -269 q 288 -238 302 -249 q 274 -219 274 -227 q 288 -195 274 -212 q 321 -161 302 -178 q 359 -128 340 -143 q 388 -110 378 -114 q 458 -156 426 -143 q 516 -170 490 -170 q 551 -161 534 -170 q 582 -127 568 -153 q 604 -53 596 -101 q 613 75 613 -5 l 613 763 q 609 772 613 767 q 590 782 604 776 q 552 793 576 787 q 486 805 527 799 l 486 855 l 877 855 l 877 805 "},"Ê":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 592 962 q 574 938 584 949 q 553 922 564 927 l 362 1032 l 173 922 q 152 938 162 927 q 132 962 142 949 l 322 1183 l 404 1183 l 592 962 "},")":{"x_min":18,"x_max":390,"ha":461,"o":"m 390 448 q 366 237 390 337 q 299 52 343 137 q 194 -100 256 -33 q 54 -214 131 -167 l 18 -163 q 94 -65 58 -122 q 156 65 129 -8 q 198 229 182 139 q 214 429 214 320 q 201 617 214 528 q 164 784 188 707 q 102 924 139 861 q 18 1033 66 987 l 54 1084 q 201 974 138 1039 q 306 829 264 910 q 369 652 348 748 q 390 448 390 556 "},"Ṽ":{"x_min":8.8125,"x_max":900.6875,"ha":923,"o":"m 900 805 q 828 788 854 796 q 795 760 802 779 l 540 55 q 519 28 535 41 q 485 6 504 16 q 445 -9 465 -3 q 408 -20 424 -15 l 99 760 q 71 789 92 778 q 8 805 51 800 l 8 855 l 354 855 l 354 805 q 282 791 300 801 q 272 762 265 781 l 493 194 l 694 760 q 695 777 697 770 q 682 789 693 784 q 654 798 672 794 q 608 805 636 802 l 608 855 l 900 855 l 900 805 m 728 1123 q 698 1063 716 1096 q 658 1001 680 1030 q 608 954 636 973 q 550 935 581 935 q 494 946 520 935 q 442 970 467 957 q 393 994 417 983 q 342 1005 368 1005 q 314 1000 326 1005 q 291 985 302 994 q 268 961 280 975 q 245 928 257 946 l 194 946 q 224 1007 206 974 q 263 1069 241 1040 q 313 1117 286 1098 q 371 1137 340 1137 q 431 1126 402 1137 q 484 1102 459 1115 q 533 1078 510 1089 q 577 1067 556 1067 q 630 1085 608 1067 q 676 1144 653 1104 l 728 1123 "},"a":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 "},"Ɲ":{"x_min":-219.828125,"x_max":894.59375,"ha":922,"o":"m 801 -20 q 696 4 735 -15 q 638 49 657 24 l 224 624 l 224 89 q 220 4 224 43 q 209 -67 217 -34 q 185 -130 200 -101 q 146 -185 170 -159 q 108 -220 130 -202 q 60 -252 86 -237 q 6 -275 35 -266 q -50 -284 -21 -284 q -110 -277 -80 -284 q -165 -261 -141 -271 q -204 -240 -189 -252 q -219 -219 -219 -229 q -213 -206 -219 -216 q -195 -186 -206 -197 q -172 -162 -185 -174 q -146 -138 -158 -149 q -122 -119 -133 -127 q -105 -108 -111 -110 q -41 -156 -74 -142 q 22 -170 -8 -170 q 96 -115 71 -170 q 122 49 122 -60 l 122 755 q 76 788 100 775 q 29 805 52 801 l 29 855 l 219 855 q 235 853 229 855 q 248 846 242 851 q 263 830 255 840 q 284 802 271 819 l 699 226 l 699 763 q 694 773 699 767 q 679 784 690 779 q 651 795 669 790 q 606 805 633 801 l 606 855 l 894 855 l 894 805 q 823 785 845 798 q 801 763 801 772 l 801 -20 "},"Z":{"x_min":35.265625,"x_max":708.0625,"ha":757,"o":"m 708 239 q 705 184 706 217 q 703 117 704 151 q 701 51 702 83 q 699 0 700 19 l 59 0 l 35 35 l 491 767 l 226 767 q 202 755 215 767 q 175 722 188 743 q 150 672 162 701 q 130 608 138 643 l 71 621 l 96 865 q 130 859 115 861 q 160 855 145 856 q 190 855 174 855 l 678 855 l 701 821 l 248 88 l 557 88 q 583 98 571 88 q 605 129 594 108 q 626 181 615 150 q 650 254 637 212 l 708 239 "},"":{"x_min":44,"x_max":981.09375,"ha":761,"o":"m 355 109 q 426 127 393 109 q 500 183 460 146 l 500 474 q 471 509 488 494 q 436 537 455 525 q 397 554 417 548 q 357 561 376 561 q 298 548 325 561 q 250 509 270 535 q 218 441 230 483 q 207 342 207 399 q 219 241 207 284 q 253 168 232 197 q 301 123 274 138 q 355 109 328 109 m 500 94 q 443 41 469 63 q 390 6 416 20 q 337 -13 364 -7 q 277 -20 309 -20 q 195 2 237 -20 q 120 65 154 24 q 65 166 87 106 q 44 301 44 226 q 58 407 44 360 q 96 490 73 454 q 147 551 119 526 q 198 592 174 576 q 239 615 217 604 q 284 634 261 625 q 330 646 307 642 q 373 651 353 651 q 412 648 393 651 q 450 637 430 645 q 491 615 470 629 q 537 576 512 600 q 572 595 554 584 q 607 615 590 605 q 638 635 624 625 q 658 651 651 644 l 684 625 q 673 586 677 608 q 666 542 669 568 q 663 486 663 516 l 663 -97 q 680 -214 663 -175 q 738 -254 697 -254 q 768 -245 755 -254 q 789 -224 781 -237 q 802 -197 797 -211 q 806 -169 806 -182 q 797 -142 806 -154 q 813 -131 802 -137 q 841 -120 825 -125 q 876 -109 857 -114 q 911 -100 894 -104 q 941 -93 928 -95 q 962 -91 955 -91 l 981 -129 q 960 -192 981 -157 q 900 -259 939 -228 q 808 -312 862 -291 q 688 -334 754 -334 q 599 -318 635 -334 q 541 -275 563 -302 q 509 -214 519 -248 q 500 -143 500 -180 l 500 94 "},"k":{"x_min":33,"x_max":771.28125,"ha":766,"o":"m 33 0 l 33 49 q 99 69 77 61 q 122 90 122 78 l 122 858 q 118 906 122 889 q 106 932 115 923 q 79 943 97 940 q 33 949 62 945 l 33 996 q 153 1018 98 1006 q 255 1051 209 1030 l 285 1023 l 285 361 l 463 521 q 492 553 485 541 q 493 571 498 565 q 475 579 489 578 q 444 581 462 581 l 444 631 l 747 631 l 747 581 q 687 567 717 578 q 628 534 658 556 l 422 378 l 667 100 q 686 83 677 90 q 706 74 695 77 q 732 70 718 71 q 767 71 747 70 l 771 22 q 726 12 751 17 q 678 2 701 7 q 635 -4 654 -1 q 610 -7 617 -7 q 562 1 582 -7 q 527 28 542 9 l 285 350 l 285 90 q 287 81 285 85 q 297 72 289 77 q 319 63 304 68 q 359 49 334 57 l 359 0 l 33 0 "},"Ù":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 599 962 q 580 938 590 949 q 558 922 570 927 l 233 1080 l 240 1123 q 260 1139 245 1128 q 294 1162 276 1150 q 328 1183 311 1173 q 352 1198 344 1193 l 599 962 "},"Ů":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 518 1059 q 505 1109 518 1092 q 476 1127 491 1127 q 451 1121 462 1127 q 434 1106 441 1115 q 423 1085 427 1097 q 419 1061 419 1073 q 433 1013 419 1029 q 462 996 447 996 q 504 1014 489 996 q 518 1059 518 1032 m 610 1087 q 597 1019 610 1051 q 560 964 583 987 q 508 927 538 941 q 448 914 479 914 q 399 922 421 914 q 361 946 377 930 q 336 984 345 962 q 327 1033 327 1006 q 341 1101 327 1070 q 377 1157 354 1133 q 429 1195 399 1181 q 490 1209 458 1209 q 540 1199 517 1209 q 578 1174 562 1190 q 602 1136 593 1158 q 610 1087 610 1114 "},"¢":{"x_min":60,"x_max":642.140625,"ha":703,"o":"m 209 417 q 218 335 209 372 q 245 272 228 299 q 285 226 262 245 q 338 198 309 208 l 338 637 q 288 615 312 631 q 247 572 265 599 q 219 507 230 546 q 209 417 209 469 m 419 4 q 391 -14 406 -6 q 359 -28 375 -22 l 338 -6 l 338 87 q 241 113 290 92 q 151 174 191 135 q 85 269 110 214 q 60 397 60 325 q 79 510 60 457 q 135 605 99 563 q 223 677 172 647 q 338 720 274 707 l 338 812 q 353 823 347 818 q 366 831 360 827 q 378 838 371 835 q 396 844 385 841 l 419 824 l 419 730 q 430 731 424 730 q 442 731 435 731 q 493 727 464 731 q 550 716 522 723 q 602 699 579 709 q 637 677 625 690 q 632 649 638 669 q 618 605 627 629 q 599 562 609 582 q 583 532 589 541 l 539 544 q 524 568 534 554 q 499 596 513 582 q 464 621 484 610 q 419 639 444 633 l 419 187 q 457 193 438 188 q 497 209 476 197 q 543 240 518 220 q 600 290 568 260 l 642 242 q 578 176 607 203 q 521 132 548 149 q 469 105 494 115 q 419 91 444 95 l 419 4 "},"Ɂ":{"x_min":17,"x_max":644,"ha":675,"o":"m 145 0 l 145 49 q 228 69 204 59 q 253 90 253 79 l 253 274 q 268 357 253 322 q 309 419 284 392 q 361 467 333 445 q 413 510 389 488 q 454 559 438 533 q 470 622 470 586 q 459 695 470 664 q 429 747 448 727 q 382 779 410 768 q 321 789 355 789 q 270 777 292 788 q 232 749 248 767 q 209 707 217 731 q 201 657 201 683 q 203 626 201 641 q 212 599 205 611 q 179 587 201 593 q 130 577 156 582 q 79 568 104 571 q 40 563 54 564 l 21 583 q 18 601 20 588 q 17 624 17 614 q 41 717 17 672 q 111 797 65 762 q 222 854 156 833 q 369 875 287 875 q 492 859 440 875 q 577 814 544 843 q 627 745 611 785 q 644 657 644 705 q 627 574 644 607 q 586 516 611 540 q 533 472 562 491 q 480 432 504 453 q 439 385 455 411 q 423 318 423 358 l 423 90 q 448 69 423 80 q 529 49 473 59 l 529 0 l 145 0 "},"ē":{"x_min":44,"x_max":659.234375,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 659 886 q 652 866 657 879 q 640 840 647 854 q 629 815 634 826 q 621 797 623 803 l 103 797 l 81 818 q 88 838 83 826 q 99 864 92 850 q 110 889 105 877 q 119 908 115 901 l 637 908 l 659 886 "},"Ẹ":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 456 -184 q 448 -230 456 -209 q 425 -268 439 -252 q 391 -294 411 -285 q 350 -304 372 -304 q 290 -283 311 -304 q 269 -221 269 -262 q 278 -174 269 -196 q 302 -136 287 -152 q 336 -111 316 -120 q 376 -102 355 -102 q 435 -122 414 -102 q 456 -184 456 -143 "},"≠":{"x_min":35.953125,"x_max":594.796875,"ha":631,"o":"m 472 532 l 573 532 l 594 510 q 588 492 592 502 q 579 470 584 481 q 570 449 575 459 q 564 434 566 439 l 411 434 l 343 328 l 573 328 l 594 306 q 588 288 592 298 q 579 266 584 277 q 570 245 575 255 q 564 230 566 236 l 281 230 l 200 101 q 179 91 193 96 q 149 82 165 86 q 117 73 132 77 q 93 67 101 69 l 71 96 l 156 230 l 57 230 l 35 251 q 41 269 37 259 q 50 290 45 279 q 59 311 54 301 q 67 328 63 321 l 218 328 l 285 434 l 57 434 l 35 455 q 41 473 37 462 q 50 494 45 483 q 59 515 54 505 q 67 532 63 525 l 347 532 l 427 658 q 451 669 437 664 q 479 678 465 674 q 509 685 494 682 q 533 692 523 689 l 558 665 l 472 532 "},"¥":{"x_min":-55.046875,"x_max":724.484375,"ha":703,"o":"m 155 0 l 155 49 q 206 62 185 55 q 238 75 226 69 q 255 87 250 82 q 261 98 261 93 l 261 263 l 65 263 l 50 279 q 55 292 52 283 q 61 311 58 301 q 68 329 65 321 q 73 344 71 338 l 261 344 l 261 358 q 210 462 237 410 q 157 561 184 514 q 103 649 130 608 q 53 721 77 690 q 40 735 47 729 q 22 745 34 741 q -6 752 11 749 q -52 754 -23 754 l -55 804 q -9 810 -35 806 q 42 816 16 813 q 91 820 68 818 q 128 823 114 823 q 166 814 147 823 q 197 791 185 806 q 245 722 222 757 q 292 648 269 687 q 338 565 315 608 q 384 473 360 522 l 516 722 q 509 750 526 740 q 441 767 493 760 l 441 817 l 724 817 l 724 767 q 655 749 678 758 q 624 722 633 739 l 431 356 l 431 344 l 612 344 l 629 328 l 603 263 l 431 263 l 431 98 q 436 88 431 94 q 453 75 441 82 q 486 62 465 69 q 538 49 506 55 l 538 0 l 155 0 "},"Ƚ":{"x_min":21.625,"x_max":691.46875,"ha":707,"o":"m 691 205 q 685 144 688 176 q 677 83 681 112 q 670 32 673 54 q 663 0 666 10 l 29 0 l 29 49 q 98 70 75 59 q 122 91 122 81 l 122 364 l 36 364 l 21 380 q 26 393 22 384 q 32 412 29 402 q 38 430 35 422 q 44 445 41 439 l 122 445 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 445 l 492 445 l 509 429 l 485 364 l 292 364 l 292 131 q 297 109 292 119 q 317 94 303 100 q 356 84 332 87 q 418 81 380 81 l 494 81 q 547 88 525 81 q 584 112 568 95 q 614 156 601 129 q 641 223 627 183 l 691 205 "},"Ĥ":{"x_min":29.078125,"x_max":907.59375,"ha":949,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 488 l 644 488 l 644 763 q 621 783 644 771 q 551 805 599 795 l 551 855 l 907 855 l 907 805 q 837 784 861 795 q 814 763 814 772 l 814 90 q 836 70 814 82 q 907 49 858 59 l 907 0 l 551 0 l 551 49 q 620 70 597 59 q 644 90 644 81 l 644 407 l 292 407 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 697 962 q 679 938 689 949 q 657 922 669 927 l 467 1032 l 278 922 q 256 938 266 927 q 237 962 246 949 l 426 1183 l 509 1183 l 697 962 "},"U":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 "},"Ñ":{"x_min":29.078125,"x_max":894.59375,"ha":922,"o":"m 29 0 l 29 49 q 100 68 78 55 q 122 90 122 81 l 122 755 q 29 805 77 797 l 29 855 l 219 855 q 235 853 229 855 q 248 846 242 851 q 263 830 255 840 q 284 802 271 819 l 699 226 l 699 763 q 694 773 699 767 q 679 784 690 779 q 651 795 669 790 q 606 805 633 801 l 606 855 l 894 855 l 894 805 q 823 785 845 798 q 801 763 801 772 l 801 -20 q 696 5 735 -14 q 638 50 657 25 l 224 624 l 224 90 q 228 81 224 86 q 244 69 233 75 q 273 58 255 63 q 317 49 291 52 l 317 0 l 29 0 m 728 1123 q 698 1063 716 1096 q 658 1001 680 1030 q 608 954 636 973 q 550 935 581 935 q 494 946 520 935 q 442 970 467 957 q 393 994 417 983 q 342 1005 368 1005 q 314 1000 326 1005 q 291 985 302 994 q 268 961 280 975 q 245 928 257 946 l 194 946 q 224 1007 206 974 q 263 1069 241 1040 q 313 1117 286 1098 q 371 1137 340 1137 q 431 1126 402 1137 q 484 1102 459 1115 q 533 1078 510 1089 q 577 1067 556 1067 q 630 1085 608 1067 q 676 1144 653 1104 l 728 1123 "},"F":{"x_min":29.15625,"x_max":659.234375,"ha":705,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 633 855 l 659 833 q 655 788 658 815 q 649 734 653 762 q 641 681 645 706 q 632 644 636 656 l 580 644 q 564 740 578 707 q 524 774 550 774 l 291 774 l 291 499 l 540 499 l 564 475 q 550 450 558 463 q 533 426 542 437 q 516 404 524 414 q 501 389 507 395 q 479 406 491 399 q 452 418 467 413 q 416 424 437 422 q 367 427 396 427 l 291 427 l 291 90 q 297 82 291 86 q 315 72 302 77 q 350 61 328 67 q 405 49 372 55 l 405 0 l 29 0 "},"ả":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 482 904 q 471 871 482 885 q 442 844 459 856 q 410 820 426 831 q 385 797 393 809 q 381 772 377 785 q 408 742 384 759 q 394 735 403 738 q 377 728 386 731 q 359 723 368 725 q 346 721 351 721 q 286 756 301 740 q 275 787 271 773 q 296 813 279 801 q 332 838 313 826 q 366 864 351 851 q 380 894 380 878 q 373 926 380 917 q 351 936 365 936 q 328 925 337 936 q 319 904 319 915 q 327 885 319 896 q 283 870 310 877 q 224 860 256 863 l 216 867 q 214 881 214 873 q 227 920 214 900 q 262 954 241 939 q 313 979 284 970 q 373 989 342 989 q 423 982 402 989 q 457 963 444 975 q 476 936 470 951 q 482 904 482 921 "},"ʔ":{"x_min":30,"x_max":638,"ha":655,"o":"m 135 0 l 135 49 q 220 69 194 59 q 246 90 246 79 l 246 346 q 262 439 246 398 q 304 515 279 480 q 358 579 328 549 q 411 641 387 609 q 453 706 436 672 q 470 783 470 740 q 457 858 470 824 q 425 915 445 892 q 377 951 404 938 q 320 964 350 964 q 276 952 296 964 q 240 922 256 941 q 216 879 225 903 q 208 828 208 854 q 210 806 208 818 q 216 784 212 793 q 181 770 201 776 q 139 758 161 763 q 94 749 116 753 q 50 742 71 744 l 32 763 q 30 777 30 768 q 30 791 30 785 q 56 889 30 842 q 128 972 82 936 q 237 1030 174 1009 q 373 1052 300 1052 q 488 1035 438 1052 q 571 987 538 1018 q 621 914 604 956 q 638 819 638 871 q 621 732 638 769 q 578 664 604 695 q 523 606 553 633 q 468 548 493 578 q 425 479 442 517 q 409 392 409 442 l 409 90 q 436 69 409 80 q 518 49 463 59 l 518 0 l 135 0 "},"ờ":{"x_min":44,"x_max":818,"ha":817,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 818 706 q 774 611 818 663 q 637 509 730 559 q 672 425 660 471 q 685 329 685 380 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 138 543 93 494 q 243 621 182 592 q 378 651 305 651 q 498 629 444 651 q 592 568 552 607 q 630 613 621 591 q 640 652 640 635 q 627 689 640 671 q 595 722 614 706 l 772 802 q 804 761 791 787 q 818 706 818 734 m 497 736 q 486 727 493 732 q 470 718 478 722 q 453 710 461 713 q 439 705 445 707 l 180 960 l 200 998 q 227 1004 206 1000 q 273 1013 248 1008 q 319 1020 297 1017 q 349 1025 341 1024 l 497 736 "},"̿":{"x_min":-698.5625,"x_max":51.546875,"ha":0,"o":"m 51 1064 q 44 1044 49 1056 q 33 1020 39 1033 q 22 996 27 1007 q 14 980 16 986 l -676 980 l -698 1001 q -691 1020 -696 1009 q -680 1044 -687 1032 q -669 1067 -674 1056 q -660 1086 -663 1079 l 29 1086 l 51 1064 m 51 881 q 44 861 49 873 q 33 837 39 850 q 22 813 27 824 q 14 797 16 803 l -676 797 l -698 818 q -691 837 -696 826 q -680 861 -687 849 q -669 884 -674 873 q -660 903 -663 896 l 29 903 l 51 881 "},"å":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 398 842 q 385 892 398 875 q 356 910 371 910 q 331 904 341 910 q 314 889 321 898 q 303 868 306 880 q 299 844 299 856 q 313 795 299 812 q 342 779 327 779 q 384 797 369 779 q 398 842 398 815 m 490 870 q 476 802 490 834 q 440 747 463 770 q 388 710 417 724 q 328 697 359 697 q 279 705 301 697 q 241 729 257 713 q 216 767 225 745 q 207 816 207 789 q 221 884 207 852 q 257 940 234 916 q 309 978 279 964 q 370 992 338 992 q 419 982 397 992 q 457 957 442 973 q 482 919 473 941 q 490 870 490 897 "},"0":{"x_min":41,"x_max":662,"ha":703,"o":"m 485 383 q 474 545 485 476 q 444 659 463 614 q 399 727 425 705 q 343 750 374 750 q 289 733 312 750 q 250 678 265 716 q 226 582 234 641 q 219 437 219 522 q 255 159 219 251 q 359 68 291 68 q 414 84 391 68 q 454 139 438 101 q 477 237 469 177 q 485 383 485 297 m 662 408 q 638 243 662 321 q 573 106 615 165 q 472 14 530 48 q 343 -20 414 -20 q 216 14 272 -20 q 121 106 161 48 q 61 243 82 165 q 41 408 41 321 q 63 574 41 496 q 126 710 85 652 q 227 803 168 769 q 359 838 286 838 q 488 804 431 838 q 583 711 544 770 q 641 575 621 653 q 662 408 662 496 "},"ɋ":{"x_min":44,"x_max":981.09375,"ha":761,"o":"m 355 109 q 426 127 393 109 q 500 183 460 146 l 500 474 q 471 509 488 494 q 436 537 455 525 q 397 554 417 548 q 357 561 376 561 q 298 548 325 561 q 250 509 270 535 q 218 441 230 483 q 207 342 207 399 q 219 241 207 284 q 253 168 232 197 q 301 123 274 138 q 355 109 328 109 m 500 94 q 443 41 469 63 q 390 6 416 20 q 337 -13 364 -7 q 277 -20 309 -20 q 195 2 237 -20 q 120 65 154 24 q 65 166 87 106 q 44 301 44 226 q 58 407 44 360 q 96 490 73 454 q 147 551 119 526 q 198 592 174 576 q 239 615 217 604 q 284 634 261 625 q 330 646 307 642 q 373 651 353 651 q 412 648 393 651 q 450 637 430 645 q 491 615 470 629 q 537 576 512 600 q 572 595 554 584 q 607 615 590 605 q 638 635 624 625 q 658 651 651 644 l 684 625 q 673 586 677 608 q 666 542 669 568 q 663 486 663 516 l 663 -97 q 680 -214 663 -175 q 738 -254 697 -254 q 768 -245 755 -254 q 789 -224 781 -237 q 802 -197 797 -211 q 806 -169 806 -182 q 797 -142 806 -154 q 813 -131 802 -137 q 841 -120 825 -125 q 876 -109 857 -114 q 911 -100 894 -104 q 941 -93 928 -95 q 962 -91 955 -91 l 981 -129 q 960 -192 981 -157 q 900 -259 939 -228 q 808 -312 862 -291 q 688 -334 754 -334 q 599 -318 635 -334 q 541 -275 563 -302 q 509 -214 519 -248 q 500 -143 500 -180 l 500 94 "},"ō":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 674 886 q 667 866 672 879 q 656 840 662 854 q 644 815 650 826 q 636 797 639 803 l 118 797 l 96 818 q 103 838 99 826 q 114 864 108 850 q 126 889 120 877 q 134 908 131 901 l 653 908 l 674 886 "},"”":{"x_min":49.171875,"x_max":633,"ha":687,"o":"m 308 844 q 294 769 308 807 q 259 695 281 730 q 206 630 236 660 q 144 579 177 600 l 100 612 q 140 687 124 645 q 157 773 157 729 q 131 834 157 810 q 60 859 106 858 l 49 910 q 66 923 53 916 q 99 939 80 931 q 139 955 117 947 q 180 969 160 963 q 215 979 199 975 q 239 981 231 982 q 291 922 274 956 q 308 844 308 889 m 633 844 q 619 769 633 807 q 584 695 606 730 q 532 630 561 660 q 470 579 502 600 l 426 612 q 466 687 450 645 q 483 773 483 729 q 457 834 483 810 q 386 859 432 858 l 375 910 q 392 923 379 916 q 424 939 406 931 q 464 955 442 947 q 505 969 485 963 q 541 979 525 975 q 565 981 557 982 q 616 922 600 956 q 633 844 633 889 "},"ḕ":{"x_min":44,"x_max":659.234375,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 659 886 q 652 866 657 879 q 640 840 647 854 q 629 815 634 826 q 621 797 623 803 l 103 797 l 81 818 q 88 838 83 826 q 99 864 92 850 q 110 889 105 877 q 119 908 115 901 l 637 908 l 659 886 m 472 980 q 461 971 468 976 q 445 962 453 966 q 428 954 436 957 q 414 949 420 951 l 155 1204 l 174 1242 q 202 1248 181 1244 q 248 1257 223 1252 q 294 1265 272 1261 q 324 1269 316 1268 l 472 980 "},"ö":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 615 859 q 606 813 615 834 q 583 775 598 791 q 549 749 569 758 q 508 740 530 740 q 448 761 469 740 q 428 822 428 782 q 437 869 428 847 q 460 907 446 891 q 494 932 475 923 q 534 942 513 942 q 593 921 572 942 q 615 859 615 901 m 329 859 q 320 813 329 834 q 298 775 312 791 q 264 749 283 758 q 223 740 245 740 q 163 761 183 740 q 142 822 142 782 q 151 869 142 847 q 174 907 160 891 q 208 932 189 923 q 248 942 228 942 q 308 921 287 942 q 329 859 329 901 "},"ẉ":{"x_min":8.8125,"x_max":986.8125,"ha":996,"o":"m 986 581 q 955 572 967 576 q 936 563 944 567 q 925 553 929 559 q 918 539 921 547 l 769 40 q 752 14 765 25 q 724 -2 739 4 q 694 -13 709 -9 q 671 -20 680 -17 l 498 376 l 360 40 q 343 14 355 24 q 316 -3 330 3 q 288 -14 302 -10 q 265 -20 274 -17 l 82 539 q 60 562 78 551 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 270 573 286 578 q 247 563 254 569 q 239 551 240 557 q 241 539 239 545 l 343 219 l 505 631 l 557 631 l 727 219 l 825 539 q 827 553 828 546 q 821 564 827 559 q 802 573 815 569 q 766 581 789 577 l 766 631 l 986 631 l 986 581 m 595 -184 q 587 -230 595 -209 q 564 -268 578 -252 q 530 -294 550 -285 q 489 -304 511 -304 q 429 -283 450 -304 q 408 -221 408 -262 q 417 -174 408 -196 q 441 -136 426 -152 q 475 -111 455 -120 q 515 -102 494 -102 q 574 -122 553 -102 q 595 -184 595 -143 "},"Ȧ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 522 1050 q 514 1003 522 1024 q 491 965 505 981 q 457 939 477 949 q 416 930 438 930 q 356 951 377 930 q 335 1012 335 972 q 344 1059 335 1037 q 367 1097 353 1081 q 401 1122 382 1113 q 442 1132 421 1132 q 501 1111 480 1132 q 522 1050 522 1091 "},"ć":{"x_min":44,"x_max":605.796875,"ha":633,"o":"m 605 129 q 524 49 561 79 q 453 4 487 20 q 388 -15 419 -11 q 325 -20 357 -20 q 219 2 270 -20 q 129 65 168 24 q 67 166 90 106 q 44 301 44 226 q 71 438 44 374 q 146 548 98 501 q 262 623 195 596 q 410 651 329 651 q 460 647 432 651 q 516 636 489 643 q 566 619 543 629 q 600 597 588 609 q 598 578 601 591 q 591 547 596 564 q 581 509 587 529 q 569 472 575 490 q 556 440 563 454 q 546 420 550 426 l 501 426 q 446 529 478 493 q 359 566 413 566 q 302 552 329 566 q 253 509 274 538 q 219 433 232 480 q 207 322 207 387 q 220 225 207 268 q 258 154 234 183 q 315 109 282 125 q 384 94 348 94 q 421 96 403 94 q 459 106 438 98 q 507 130 481 115 q 569 172 533 146 l 605 129 m 305 705 q 291 709 299 705 q 273 717 282 713 q 258 726 265 721 q 246 734 250 730 l 389 1025 q 420 1021 398 1024 q 467 1014 442 1018 q 514 1005 492 1010 q 544 999 537 1001 l 564 962 l 305 705 "},"þ":{"x_min":33,"x_max":733,"ha":777,"o":"m 580 291 q 567 399 580 353 q 533 476 554 445 q 484 521 512 506 q 428 536 457 536 q 403 533 415 536 q 373 522 390 530 q 336 499 357 514 q 285 460 314 484 l 285 155 q 346 122 319 134 q 393 102 372 109 q 433 94 415 96 q 468 92 451 92 q 516 106 495 92 q 551 147 537 121 q 572 210 565 174 q 580 291 580 247 m 733 343 q 721 255 733 299 q 690 170 709 211 q 644 95 670 129 q 588 34 617 60 q 526 -5 558 9 q 465 -20 495 -20 q 428 -16 447 -20 q 387 -4 409 -12 q 339 18 365 4 q 285 52 314 32 l 285 -234 q 310 -255 285 -245 q 399 -276 335 -266 l 399 -326 l 33 -326 l 33 -276 q 99 -255 77 -265 q 122 -234 122 -245 l 122 861 q 118 906 122 890 q 106 931 115 923 q 78 942 96 939 q 33 949 61 945 l 33 996 q 101 1007 71 1001 q 157 1019 131 1013 q 206 1033 183 1025 q 255 1051 230 1041 l 285 1022 l 285 540 q 355 594 323 573 q 415 629 388 616 q 466 646 443 641 q 509 651 489 651 q 595 631 555 651 q 667 572 636 611 q 715 476 697 533 q 733 343 733 419 "},"]":{"x_min":16.75,"x_max":383,"ha":468,"o":"m 45 -227 l 18 -204 q 22 -184 19 -195 q 28 -162 25 -172 q 35 -142 32 -151 q 41 -129 39 -133 l 227 -129 l 227 987 l 45 987 l 16 1011 q 21 1028 18 1018 q 28 1049 24 1038 q 35 1069 31 1060 q 41 1085 39 1078 l 383 1085 l 383 -227 l 45 -227 "},"Ǒ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 476 939 l 383 939 l 200 1196 q 218 1224 208 1210 q 239 1243 227 1237 l 430 1095 l 619 1243 q 642 1224 630 1237 q 664 1196 655 1210 l 476 939 "},"ẁ":{"x_min":8.8125,"x_max":986.8125,"ha":996,"o":"m 986 581 q 955 572 967 576 q 936 563 944 567 q 925 553 929 559 q 918 539 921 547 l 769 40 q 752 14 765 25 q 724 -2 739 4 q 694 -13 709 -9 q 671 -20 680 -17 l 498 376 l 360 40 q 343 14 355 24 q 316 -3 330 3 q 288 -14 302 -10 q 265 -20 274 -17 l 82 539 q 60 562 78 551 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 270 573 286 578 q 247 563 254 569 q 239 551 240 557 q 241 539 239 545 l 343 219 l 505 631 l 557 631 l 727 219 l 825 539 q 827 553 828 546 q 821 564 827 559 q 802 573 815 569 q 766 581 789 577 l 766 631 l 986 631 l 986 581 m 625 736 q 613 727 621 732 q 597 718 606 722 q 581 710 589 713 q 567 705 573 707 l 307 960 l 327 998 q 355 1004 334 1000 q 400 1013 376 1008 q 447 1020 425 1017 q 477 1025 469 1024 l 625 736 "},"Ȟ":{"x_min":29.078125,"x_max":907.59375,"ha":949,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 488 l 644 488 l 644 763 q 621 783 644 771 q 551 805 599 795 l 551 855 l 907 855 l 907 805 q 837 784 861 795 q 814 763 814 772 l 814 90 q 836 70 814 82 q 907 49 858 59 l 907 0 l 551 0 l 551 49 q 620 70 597 59 q 644 90 644 81 l 644 407 l 292 407 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 514 939 l 421 939 l 237 1162 q 256 1186 246 1175 q 278 1204 266 1197 l 470 1076 l 657 1204 q 679 1186 669 1197 q 697 1162 689 1175 l 514 939 "},"ệ":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 449 -184 q 440 -230 449 -209 q 418 -268 432 -252 q 384 -294 403 -285 q 343 -304 365 -304 q 283 -283 303 -304 q 262 -221 262 -262 q 271 -174 262 -196 q 294 -136 280 -152 q 328 -111 309 -120 q 369 -102 348 -102 q 428 -122 407 -102 q 449 -184 449 -143 m 593 750 q 575 723 585 737 q 554 705 565 710 l 363 856 l 174 705 q 150 723 162 710 q 128 750 138 737 l 318 1013 l 411 1013 l 593 750 "},"ĭ":{"x_min":-27.125,"x_max":454.40625,"ha":417,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 m 454 927 q 406 833 434 872 q 348 769 379 794 q 283 732 317 744 q 215 721 249 721 q 142 732 177 721 q 76 769 107 744 q 19 833 46 794 q -27 927 -6 872 q -16 940 -23 933 q -3 953 -10 947 q 11 965 4 960 q 23 973 18 970 q 63 919 40 941 q 112 881 86 896 q 163 858 137 865 q 212 851 189 851 q 262 858 236 851 q 314 880 288 865 q 362 918 339 895 q 402 973 385 941 q 416 965 408 970 q 430 953 423 960 q 443 940 437 947 q 454 927 450 933 "},"8":{"x_min":54,"x_max":648,"ha":702,"o":"m 242 644 q 253 599 242 618 q 285 564 265 579 q 331 535 305 548 q 388 510 358 522 q 447 636 447 571 q 437 695 447 671 q 412 733 428 718 q 377 753 397 747 q 335 759 357 759 q 295 749 313 759 q 266 724 278 740 q 248 688 254 708 q 242 644 242 667 m 474 209 q 461 277 474 248 q 426 328 448 306 q 375 365 404 349 q 316 395 347 381 q 277 353 294 374 q 250 311 261 332 q 234 265 239 289 q 229 213 229 241 q 239 150 229 178 q 268 102 250 122 q 310 73 287 83 q 359 63 334 63 q 408 74 386 63 q 444 106 430 86 q 466 153 459 126 q 474 209 474 179 m 648 239 q 623 139 648 186 q 557 56 599 92 q 458 0 515 21 q 336 -20 401 -20 q 214 -2 267 -20 q 126 45 161 15 q 72 113 90 74 q 54 193 54 151 q 67 262 54 228 q 105 325 81 295 q 164 381 130 355 q 239 429 198 407 q 182 459 209 443 q 134 498 155 475 q 101 550 113 520 q 89 620 89 580 q 110 707 89 667 q 168 776 131 747 q 254 821 205 805 q 361 838 304 838 q 473 824 425 838 q 552 787 520 810 q 599 730 583 763 q 615 657 615 696 q 603 606 615 631 q 572 559 592 582 q 526 516 553 537 q 468 475 499 496 q 535 439 503 459 q 593 391 568 418 q 633 325 618 363 q 648 239 648 288 "},"Ữ":{"x_min":29.078125,"x_max":1016.078125,"ha":1016,"o":"m 1016 944 q 1003 893 1016 920 q 963 839 990 867 q 895 783 936 811 q 797 728 853 755 l 797 355 q 772 197 797 266 q 702 79 747 127 q 596 5 657 30 q 461 -20 535 -20 q 330 0 392 -20 q 222 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 340 146 315 180 q 405 95 365 112 q 503 78 445 78 q 585 99 552 78 q 639 157 618 121 q 668 240 659 193 q 678 337 678 287 l 678 763 q 655 783 678 771 q 585 805 633 795 l 585 855 l 830 855 q 837 873 835 864 q 838 889 838 882 q 825 926 838 909 q 794 959 813 944 l 970 1040 q 1002 998 989 1025 q 1016 944 1016 972 m 754 1123 q 724 1063 741 1096 q 684 1001 706 1030 q 634 954 661 973 q 575 935 607 935 q 520 946 546 935 q 468 970 493 957 q 418 994 443 983 q 368 1005 394 1005 q 340 1000 352 1005 q 317 985 328 994 q 294 961 305 975 q 271 928 283 946 l 220 946 q 249 1007 232 974 q 289 1069 267 1040 q 339 1117 311 1098 q 397 1137 366 1137 q 456 1126 428 1137 q 510 1102 484 1115 q 558 1078 535 1089 q 603 1067 581 1067 q 656 1085 634 1067 q 701 1144 678 1104 l 754 1123 "},"R":{"x_min":20.265625,"x_max":843.71875,"ha":840,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 784 q 74 778 97 781 q 29 771 50 775 l 20 834 q 176 862 92 849 q 358 875 261 875 q 515 859 451 875 q 621 815 580 843 q 681 750 662 788 q 700 669 700 712 q 686 583 700 622 q 647 512 672 544 q 587 457 622 481 q 510 420 552 434 l 724 124 q 745 101 735 110 q 766 88 754 92 q 794 82 778 83 q 833 84 810 82 l 843 34 q 793 19 821 27 q 738 4 765 11 q 687 -5 710 -1 q 651 -10 664 -10 q 612 1 631 -10 q 584 27 594 12 l 390 397 q 376 396 383 396 l 363 396 q 328 398 346 396 q 292 404 310 400 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 329 803 q 310 802 320 803 q 292 802 301 802 l 292 479 q 323 475 310 475 q 352 474 337 474 q 486 520 443 474 q 529 648 529 566 q 519 708 529 679 q 487 757 510 736 q 426 790 464 778 q 329 803 387 803 "},"Ḇ":{"x_min":20.265625,"x_max":766,"ha":835,"o":"m 766 241 q 741 136 766 183 q 672 57 717 90 q 562 7 626 25 q 415 -10 497 -10 q 378 -9 400 -10 q 330 -8 356 -9 q 275 -7 303 -7 q 219 -5 246 -6 q 83 0 155 -2 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 790 q 72 784 96 787 q 29 777 48 780 l 20 834 q 92 848 50 841 q 179 861 133 856 q 271 871 225 867 q 358 875 318 875 q 498 862 437 875 q 602 826 559 849 q 668 768 645 802 q 691 691 691 734 q 651 566 691 618 q 536 490 612 514 q 629 459 586 482 q 701 404 671 437 q 749 329 732 371 q 766 241 766 288 m 383 433 q 331 430 352 433 q 292 424 311 427 l 292 86 q 295 77 292 81 q 339 66 315 69 q 390 63 363 63 q 538 107 488 63 q 588 228 588 151 q 578 302 588 265 q 544 367 568 338 q 481 415 520 397 q 383 433 442 433 m 316 803 l 304 803 q 292 802 298 803 l 292 502 l 304 502 q 414 515 372 502 q 479 551 455 529 q 510 601 502 573 q 519 658 519 629 q 509 719 519 692 q 475 764 499 746 q 412 793 451 783 q 316 803 373 803 m 681 -137 q 674 -157 679 -145 q 663 -183 669 -170 q 651 -208 657 -197 q 643 -227 646 -220 l 125 -227 l 103 -205 q 110 -185 105 -197 q 121 -159 115 -173 q 132 -134 127 -146 q 141 -116 138 -122 l 659 -116 l 681 -137 "},"Ż":{"x_min":35.265625,"x_max":708.0625,"ha":757,"o":"m 708 239 q 705 184 706 217 q 703 117 704 151 q 701 51 702 83 q 699 0 700 19 l 59 0 l 35 35 l 491 767 l 226 767 q 202 755 215 767 q 175 722 188 743 q 150 672 162 701 q 130 608 138 643 l 71 621 l 96 865 q 130 859 115 861 q 160 855 145 856 q 190 855 174 855 l 678 855 l 701 821 l 248 88 l 557 88 q 583 98 571 88 q 605 129 594 108 q 626 181 615 150 q 650 254 637 212 l 708 239 m 485 1050 q 477 1003 485 1024 q 454 965 468 981 q 421 939 440 949 q 379 930 401 930 q 319 951 340 930 q 298 1012 298 972 q 307 1059 298 1037 q 331 1097 316 1081 q 365 1122 345 1113 q 405 1132 384 1132 q 464 1111 443 1132 q 485 1050 485 1091 "},"ḝ":{"x_min":44,"x_max":628,"ha":672,"o":"m 491 -155 q 472 -203 491 -180 q 421 -247 454 -227 q 344 -281 389 -267 q 246 -301 299 -295 l 221 -252 q 305 -224 280 -244 q 331 -182 331 -204 q 315 -149 331 -159 q 269 -137 299 -139 l 271 -134 q 279 -117 273 -131 q 295 -73 285 -103 q 313 -20 303 -53 q 216 2 262 -17 q 127 67 165 25 q 66 168 88 109 q 44 299 44 227 q 78 464 44 391 q 183 587 113 536 q 223 611 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 478 597 528 q 628 373 628 428 q 610 358 621 366 q 585 343 598 350 q 557 328 571 335 q 532 318 543 322 l 212 318 q 225 228 213 269 q 258 157 237 187 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 623 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -14 433 -7 l 398 -14 l 380 -60 q 462 -93 433 -69 q 491 -155 491 -116 m 604 927 q 556 833 583 872 q 498 769 529 794 q 433 732 467 744 q 364 721 399 721 q 292 732 327 721 q 226 769 257 744 q 169 833 196 794 q 122 927 143 872 q 133 940 126 933 q 146 953 139 947 q 161 965 153 960 q 173 973 168 970 q 213 919 190 941 q 262 881 236 896 q 313 858 287 865 q 362 851 339 851 q 412 858 385 851 q 464 880 438 865 q 512 918 489 895 q 552 973 535 941 q 565 965 558 970 q 580 953 573 960 q 593 940 587 947 q 604 927 600 933 m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 467 236 499 q 214 394 218 434 l 440 394 q 460 399 455 394 q 466 418 466 404 q 460 464 466 438 q 441 514 455 490 q 404 553 427 537 q 346 570 381 570 "},"õ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 646 933 q 616 873 634 905 q 576 811 598 840 q 526 764 554 783 q 467 745 499 745 q 412 756 438 745 q 360 780 385 767 q 310 804 335 793 q 260 816 286 816 q 232 810 244 816 q 209 795 220 805 q 186 771 198 786 q 163 738 175 756 l 112 756 q 142 817 124 784 q 181 879 159 850 q 231 927 204 908 q 289 947 258 947 q 348 935 320 947 q 402 911 377 924 q 451 887 427 898 q 495 876 474 876 q 548 894 526 876 q 594 954 571 913 l 646 933 "},"ẘ":{"x_min":8.8125,"x_max":986.8125,"ha":996,"o":"m 986 581 q 955 572 967 576 q 936 563 944 567 q 925 553 929 559 q 918 539 921 547 l 769 40 q 752 14 765 25 q 724 -2 739 4 q 694 -13 709 -9 q 671 -20 680 -17 l 498 376 l 360 40 q 343 14 355 24 q 316 -3 330 3 q 288 -14 302 -10 q 265 -20 274 -17 l 82 539 q 60 562 78 551 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 270 573 286 578 q 247 563 254 569 q 239 551 240 557 q 241 539 239 545 l 343 219 l 505 631 l 557 631 l 727 219 l 825 539 q 827 553 828 546 q 821 564 827 559 q 802 573 815 569 q 766 581 789 577 l 766 631 l 986 631 l 986 581 m 565 842 q 551 892 565 875 q 522 910 538 910 q 498 904 508 910 q 480 889 487 898 q 470 868 473 880 q 466 844 466 856 q 480 795 466 812 q 509 779 494 779 q 550 797 536 779 q 565 842 565 815 m 657 870 q 643 802 657 834 q 607 747 630 770 q 555 710 584 724 q 495 697 526 697 q 446 705 468 697 q 408 729 423 713 q 383 767 392 745 q 374 816 374 789 q 387 884 374 852 q 423 940 401 916 q 475 978 446 964 q 537 992 505 992 q 586 982 564 992 q 624 957 609 973 q 648 919 640 941 q 657 870 657 897 "},"ẫ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 579 750 q 561 723 571 737 q 539 705 551 710 l 349 856 l 160 705 q 136 723 148 710 q 114 750 124 737 l 303 1013 l 396 1013 l 579 750 m 616 1254 q 586 1193 604 1226 q 546 1132 569 1161 q 496 1085 524 1104 q 438 1065 469 1065 q 382 1076 408 1065 q 330 1101 356 1088 q 281 1125 305 1114 q 230 1136 256 1136 q 202 1131 215 1136 q 179 1116 190 1126 q 157 1092 168 1106 q 133 1058 145 1077 l 82 1077 q 112 1138 94 1105 q 151 1200 129 1171 q 201 1248 174 1229 q 259 1267 228 1267 q 319 1256 290 1267 q 372 1232 347 1245 q 421 1207 398 1219 q 465 1196 444 1196 q 518 1215 496 1196 q 564 1274 541 1234 l 616 1254 "},"Ṡ":{"x_min":69.75,"x_max":656,"ha":712,"o":"m 656 255 q 646 193 656 225 q 619 130 637 161 q 573 72 601 100 q 508 24 545 45 q 423 -7 470 4 q 318 -20 376 -20 q 262 -15 294 -20 q 198 -2 231 -10 q 134 18 165 6 q 79 46 102 30 q 73 59 75 47 q 70 89 71 71 q 69 130 69 107 q 71 176 70 152 q 76 221 73 199 q 84 260 79 243 l 132 257 q 169 184 147 217 q 220 127 192 150 q 279 90 247 103 q 345 77 311 77 q 404 85 376 77 q 454 111 433 94 q 489 152 476 127 q 503 209 503 177 q 484 281 503 251 q 436 334 466 311 q 368 377 406 358 q 289 414 329 396 q 211 454 249 433 q 142 502 172 474 q 94 565 112 529 q 76 651 76 601 q 93 722 76 683 q 149 794 111 761 q 245 851 186 828 q 386 875 304 875 q 457 870 422 875 q 523 857 493 865 q 577 837 554 849 q 613 812 600 826 q 614 800 616 809 q 608 778 613 790 q 597 750 604 765 q 582 721 590 735 q 567 697 575 708 q 554 681 560 686 l 510 685 q 475 739 495 717 q 435 773 456 760 q 392 791 414 786 q 351 797 370 797 q 294 788 318 797 q 254 764 270 779 q 232 730 239 749 q 225 693 225 712 q 243 636 225 661 q 292 590 262 611 q 361 550 322 569 q 440 510 399 531 q 519 466 481 490 q 588 413 558 443 q 637 344 618 383 q 656 255 656 306 m 456 1050 q 447 1003 456 1024 q 424 965 439 981 q 391 939 410 949 q 350 930 371 930 q 289 951 310 930 q 269 1012 269 972 q 277 1059 269 1037 q 301 1097 286 1081 q 335 1122 316 1113 q 375 1132 354 1132 q 435 1111 413 1132 q 456 1050 456 1091 "},"ǝ":{"x_min":43,"x_max":630,"ha":674,"o":"m 326 61 q 423 109 393 61 q 460 258 454 157 l 251 258 q 218 242 230 258 q 207 199 207 226 q 216 141 207 167 q 241 98 225 116 q 279 70 257 80 q 326 61 301 61 m 630 339 q 604 190 630 259 q 532 71 579 121 q 489 33 513 50 q 436 4 464 16 q 378 -13 408 -7 q 318 -20 348 -20 q 205 -3 255 -20 q 118 44 154 13 q 62 115 82 74 q 43 205 43 157 q 49 252 43 232 q 67 288 55 272 q 90 299 77 292 q 118 312 103 305 q 146 324 132 318 q 173 335 160 330 l 461 335 q 442 424 457 386 q 403 486 426 461 q 350 523 379 511 q 289 536 320 536 q 250 533 271 536 q 204 522 229 530 q 150 499 179 514 q 87 458 121 483 q 77 466 83 460 q 67 479 72 472 q 58 492 62 485 q 52 501 54 498 q 129 573 93 544 q 200 620 165 602 q 270 644 234 637 q 344 651 305 651 q 452 630 400 651 q 543 570 504 610 q 606 472 583 531 q 630 339 630 414 "},"˙":{"x_min":42,"x_max":229,"ha":271,"o":"m 229 859 q 220 813 229 834 q 197 775 212 791 q 163 749 182 758 q 122 740 144 740 q 62 761 82 740 q 42 822 42 782 q 50 869 42 847 q 74 907 59 891 q 107 932 88 923 q 148 942 127 942 q 207 921 186 942 q 229 859 229 901 "},"ê":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 593 750 q 575 723 585 737 q 554 705 565 710 l 363 856 l 174 705 q 150 723 162 710 q 128 750 138 737 l 318 1013 l 411 1013 l 593 750 "},"„":{"x_min":49.171875,"x_max":634,"ha":692,"o":"m 308 24 q 294 -50 308 -12 q 259 -124 281 -89 q 206 -189 236 -159 q 144 -241 177 -219 l 100 -207 q 140 -132 124 -174 q 157 -46 157 -90 q 131 15 157 -9 q 60 40 106 39 l 49 91 q 66 104 53 96 q 99 119 80 111 q 139 136 117 127 q 180 150 160 144 q 215 159 199 156 q 239 162 231 163 q 291 103 274 136 q 308 24 308 69 m 634 24 q 620 -50 634 -12 q 585 -124 607 -89 q 533 -189 562 -159 q 471 -241 503 -219 l 427 -207 q 467 -132 451 -174 q 484 -46 484 -90 q 458 15 484 -9 q 387 40 433 39 l 376 91 q 393 104 380 96 q 425 119 407 111 q 465 136 443 127 q 506 150 486 144 q 542 159 526 156 q 566 162 558 163 q 617 103 601 136 q 634 24 634 69 "},"Â":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 658 962 q 640 938 650 949 q 619 922 630 927 l 428 1032 l 239 922 q 218 938 227 927 q 198 962 208 949 l 387 1183 l 470 1183 l 658 962 "},"´":{"x_min":137,"x_max":455.765625,"ha":443,"o":"m 196 705 q 181 709 189 705 q 164 717 172 713 q 148 726 155 721 q 137 734 141 730 l 280 1025 q 310 1020 288 1024 q 358 1013 333 1017 q 405 1005 383 1009 q 434 999 427 1001 l 455 962 l 196 705 "},"Ɛ":{"x_min":44,"x_max":686.71875,"ha":730,"o":"m 686 143 q 605 69 646 100 q 521 18 564 38 q 433 -10 479 -1 q 336 -20 387 -20 q 202 1 258 -20 q 112 54 147 22 q 60 125 76 87 q 44 197 44 163 q 56 273 44 236 q 90 339 69 309 q 140 393 112 369 q 200 430 168 416 q 101 500 135 453 q 67 613 67 546 q 102 725 67 672 q 198 815 137 778 q 299 858 242 842 q 419 875 357 875 q 492 870 456 875 q 562 857 528 866 q 625 835 596 849 q 676 804 655 822 q 662 771 671 790 q 643 731 653 751 q 623 692 633 711 q 605 660 612 673 l 556 671 q 524 715 542 694 q 485 751 507 735 q 439 775 464 766 q 383 785 413 785 q 322 774 351 785 q 271 746 293 764 q 236 701 249 727 q 223 641 223 674 q 236 587 223 613 q 279 539 249 560 q 359 503 310 517 q 479 486 408 488 l 479 417 q 360 396 410 412 q 277 354 309 379 q 229 299 244 330 q 214 238 214 269 q 226 182 214 208 q 262 137 239 156 q 320 106 286 118 q 399 95 355 95 q 458 99 429 95 q 517 113 487 103 q 580 142 547 124 q 650 190 613 161 l 686 143 "},"ỏ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 512 904 q 500 871 512 885 q 472 844 488 856 q 440 820 456 831 q 415 797 423 809 q 410 772 407 785 q 437 742 414 759 q 424 735 433 738 q 407 728 416 731 q 389 723 397 725 q 376 721 380 721 q 316 756 331 740 q 305 787 301 773 q 326 813 309 801 q 361 838 342 826 q 395 864 380 851 q 410 894 410 878 q 402 926 410 917 q 380 936 395 936 q 358 925 367 936 q 349 904 349 915 q 357 885 349 896 q 313 870 340 877 q 254 860 285 863 l 246 867 q 244 881 244 873 q 257 920 244 900 q 292 954 271 939 q 343 979 314 970 q 403 989 372 989 q 453 982 432 989 q 487 963 474 975 q 506 936 500 951 q 512 904 512 921 "},"ʃ":{"x_min":-182.015625,"x_max":555.921875,"ha":393,"o":"m 321 60 q 305 -56 321 -5 q 266 -147 290 -108 q 214 -217 242 -187 q 158 -268 185 -246 q 117 -294 139 -282 q 72 -315 96 -306 q 25 -329 49 -324 q -18 -334 2 -334 q -84 -324 -54 -334 q -136 -302 -114 -315 q -170 -277 -158 -290 q -182 -260 -182 -265 q -175 -247 -182 -256 q -157 -227 -168 -238 q -133 -203 -146 -216 q -107 -180 -120 -191 q -83 -161 -94 -169 q -65 -149 -72 -153 q -38 -175 -54 -163 q -5 -196 -22 -187 q 28 -211 11 -206 q 58 -217 45 -217 q 93 -208 77 -217 q 123 -179 110 -200 q 143 -122 136 -158 q 151 -33 151 -87 q 145 83 151 19 q 132 213 140 146 q 114 348 123 280 q 96 478 105 416 q 83 595 88 541 q 78 688 78 649 q 89 795 78 749 q 120 877 101 841 q 164 939 139 912 q 216 988 189 966 q 257 1015 235 1003 q 303 1034 280 1026 q 347 1046 326 1042 q 382 1051 368 1051 q 446 1042 415 1051 q 501 1024 477 1034 q 541 1002 526 1013 q 555 985 555 992 q 549 970 555 981 q 532 947 543 960 q 510 921 522 935 q 485 895 497 907 q 462 875 473 883 q 444 865 451 867 q 417 896 432 881 q 387 921 402 910 q 357 939 372 933 q 329 946 342 946 q 298 936 313 946 q 272 907 283 927 q 254 854 261 887 q 248 777 248 822 q 253 662 248 724 q 266 534 258 600 q 284 400 275 468 q 302 270 293 333 q 315 154 310 208 q 321 60 321 99 "},"Ĉ":{"x_min":37,"x_max":726.484375,"ha":775,"o":"m 726 143 q 641 68 683 99 q 557 17 598 37 q 476 -11 516 -2 q 397 -20 436 -20 q 264 8 329 -20 q 148 90 199 36 q 67 221 98 144 q 37 397 37 299 q 70 594 37 506 q 162 745 103 682 q 299 841 220 807 q 468 875 377 875 q 541 869 505 875 q 609 854 577 864 q 669 833 642 845 q 713 806 695 821 q 713 794 716 804 q 704 770 710 784 q 689 739 698 755 q 672 707 681 722 q 655 679 663 692 q 642 662 647 667 l 598 671 q 519 758 563 731 q 421 785 474 785 q 374 777 398 785 q 325 753 349 770 q 280 708 301 736 q 243 641 259 681 q 218 547 227 601 q 209 422 209 493 q 231 273 209 335 q 290 170 254 211 q 372 111 327 130 q 461 92 417 92 q 505 96 480 92 q 559 111 529 100 q 622 141 588 122 q 691 189 655 159 q 700 180 694 186 q 710 165 705 173 q 720 152 715 158 q 726 143 724 145 m 661 962 q 643 938 653 949 q 621 922 633 927 l 431 1032 l 242 922 q 220 938 230 927 q 201 962 210 949 l 390 1183 l 473 1183 l 661 962 "},"Ɋ":{"x_min":34,"x_max":1087,"ha":926,"o":"m 404 112 q 457 122 431 112 q 507 150 483 133 q 557 191 532 168 q 606 240 581 214 l 606 669 q 572 711 591 692 q 530 743 553 730 q 481 765 506 757 q 429 773 456 773 q 348 751 389 773 q 273 688 307 730 q 218 581 239 645 q 197 432 197 518 q 215 299 197 358 q 263 198 234 240 q 330 134 293 156 q 404 112 367 112 m 606 139 q 476 19 541 59 q 331 -20 411 -20 q 223 8 276 -20 q 128 91 170 36 q 60 224 86 145 q 34 405 34 303 q 45 506 34 458 q 76 595 57 554 q 120 672 95 637 q 170 735 144 707 q 221 783 196 763 q 264 816 245 803 q 360 859 311 844 q 454 875 409 875 q 500 872 476 875 q 550 860 524 869 q 604 835 577 851 q 659 792 631 819 q 691 813 675 802 q 722 835 708 824 q 749 856 737 846 q 767 874 761 866 l 801 843 q 788 789 793 819 q 779 729 783 764 q 776 654 776 695 l 776 -66 q 778 -154 776 -119 q 788 -212 781 -190 q 809 -244 796 -235 q 845 -254 823 -254 q 874 -246 862 -254 q 895 -226 887 -238 q 908 -199 904 -213 q 913 -171 913 -185 q 906 -143 913 -158 q 915 -134 906 -140 q 939 -123 924 -129 q 973 -112 954 -118 q 1010 -102 992 -106 q 1044 -94 1028 -97 q 1069 -91 1059 -91 l 1087 -128 q 1063 -197 1087 -161 q 1001 -264 1040 -233 q 907 -314 961 -294 q 794 -334 854 -334 q 718 -321 752 -334 q 658 -284 683 -309 q 619 -222 633 -259 q 606 -133 606 -184 l 606 139 "},"Ờ":{"x_min":37,"x_max":857.4375,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 857 944 q 819 855 857 904 q 700 760 781 807 q 783 613 755 697 q 812 439 812 530 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 552 858 502 875 q 642 813 601 842 q 672 854 664 834 q 679 889 679 874 q 667 926 679 908 q 636 959 654 944 l 812 1040 q 844 998 830 1025 q 857 944 857 972 m 556 962 q 536 938 546 949 q 515 922 526 927 l 190 1080 l 197 1123 q 217 1139 202 1128 q 250 1162 232 1150 q 284 1183 268 1173 q 308 1198 301 1193 l 556 962 "},"Ω":{"x_min":44.25,"x_max":872.09375,"ha":943,"o":"m 71 0 l 44 23 q 46 66 44 39 q 52 122 49 92 q 59 180 55 151 q 68 230 63 208 l 118 230 q 129 180 124 201 q 142 143 135 158 q 159 122 149 129 q 184 115 169 115 l 323 115 q 210 217 257 167 q 133 314 163 267 q 89 408 103 362 q 75 501 75 454 q 86 590 75 545 q 120 677 98 635 q 177 754 143 718 q 257 817 212 790 q 360 859 302 844 q 486 875 417 875 q 640 849 572 875 q 756 778 708 824 q 829 665 804 731 q 855 516 855 599 q 837 417 855 465 q 785 320 819 369 q 703 221 751 271 q 592 115 654 170 l 744 115 q 767 121 758 115 q 784 141 777 127 q 800 178 792 155 q 821 233 808 200 l 872 220 q 868 170 870 200 q 861 107 865 140 q 854 46 857 75 q 847 0 850 17 l 501 0 l 501 115 q 564 206 537 166 q 611 279 591 247 q 644 340 631 312 q 666 395 657 368 q 677 450 674 422 q 681 511 681 478 q 665 625 681 573 q 621 714 649 676 q 552 772 592 751 q 463 794 512 794 q 396 780 426 794 q 342 745 366 767 q 300 694 318 723 q 272 635 283 665 q 255 574 260 604 q 250 519 250 544 q 252 454 250 483 q 261 397 254 424 q 279 341 267 369 q 311 279 292 312 q 359 206 331 247 q 427 115 388 166 l 427 0 l 71 0 "},"ȧ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 442 859 q 434 813 442 834 q 411 775 425 791 q 377 749 397 758 q 336 740 358 740 q 276 761 297 740 q 255 822 255 782 q 264 869 255 847 q 287 907 273 891 q 321 932 302 923 q 362 942 341 942 q 421 921 400 942 q 442 859 442 901 "},"Ö":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 668 1050 q 660 1003 668 1024 q 637 965 651 981 q 603 939 622 949 q 562 930 583 930 q 502 951 522 930 q 481 1012 481 972 q 490 1059 481 1037 q 514 1097 499 1081 q 547 1122 528 1113 q 588 1132 566 1132 q 647 1111 626 1132 q 668 1050 668 1091 m 382 1050 q 374 1003 382 1024 q 351 965 365 981 q 318 939 337 949 q 276 930 298 930 q 216 951 237 930 q 195 1012 195 972 q 204 1059 195 1037 q 228 1097 213 1081 q 262 1122 242 1113 q 302 1132 281 1132 q 361 1111 340 1132 q 382 1050 382 1091 "},"ḏ":{"x_min":44,"x_max":773.8125,"ha":779,"o":"m 773 77 q 710 38 742 56 q 651 8 678 21 q 602 -12 623 -5 q 572 -20 581 -20 q 510 98 523 -20 q 452 44 478 66 q 401 7 426 22 q 349 -13 376 -6 q 292 -20 323 -20 q 202 2 246 -20 q 122 65 157 24 q 65 166 87 106 q 44 301 44 226 q 68 432 44 369 q 135 544 92 495 q 240 621 179 592 q 373 651 300 651 q 436 643 405 651 q 505 610 468 636 l 505 843 q 503 902 505 880 q 494 936 502 924 q 467 952 486 948 q 412 960 448 957 l 412 1006 q 546 1026 486 1014 q 642 1051 606 1039 l 668 1025 l 668 203 q 669 163 668 179 q 671 136 670 146 q 676 120 673 126 q 683 112 679 115 q 692 109 687 110 q 704 109 697 108 q 724 114 712 110 q 754 127 736 118 l 773 77 m 505 182 l 505 478 q 444 539 480 517 q 362 561 408 561 q 300 548 328 561 q 251 507 272 535 q 218 438 230 480 q 207 337 207 396 q 220 241 207 283 q 255 169 234 199 q 305 124 277 140 q 360 109 332 109 q 431 127 397 109 q 505 182 465 146 m 667 -137 q 660 -157 665 -145 q 649 -183 655 -170 q 637 -208 642 -197 q 629 -227 632 -220 l 111 -227 l 89 -205 q 96 -185 91 -197 q 107 -159 101 -173 q 118 -134 113 -146 q 127 -116 124 -122 l 645 -116 l 667 -137 "},"z":{"x_min":41.375,"x_max":607.015625,"ha":650,"o":"m 598 224 q 597 189 598 209 q 597 147 597 169 q 596 102 596 125 q 594 59 595 79 q 592 23 593 39 q 590 0 591 8 l 59 0 l 41 30 l 400 550 l 223 550 q 167 516 193 550 q 124 407 141 482 l 75 421 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 592 631 l 607 601 l 246 81 l 479 81 q 500 91 491 81 q 517 122 510 102 q 533 170 525 142 q 550 235 541 199 l 598 224 "},"Ḅ":{"x_min":20.265625,"x_max":766,"ha":835,"o":"m 766 241 q 741 136 766 183 q 672 57 717 90 q 562 7 626 25 q 415 -10 497 -10 q 378 -9 400 -10 q 330 -8 356 -9 q 275 -7 303 -7 q 219 -5 246 -6 q 83 0 155 -2 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 790 q 72 784 96 787 q 29 777 48 780 l 20 834 q 92 848 50 841 q 179 861 133 856 q 271 871 225 867 q 358 875 318 875 q 498 862 437 875 q 602 826 559 849 q 668 768 645 802 q 691 691 691 734 q 651 566 691 618 q 536 490 612 514 q 629 459 586 482 q 701 404 671 437 q 749 329 732 371 q 766 241 766 288 m 383 433 q 331 430 352 433 q 292 424 311 427 l 292 86 q 295 77 292 81 q 339 66 315 69 q 390 63 363 63 q 538 107 488 63 q 588 228 588 151 q 578 302 588 265 q 544 367 568 338 q 481 415 520 397 q 383 433 442 433 m 316 803 l 304 803 q 292 802 298 803 l 292 502 l 304 502 q 414 515 372 502 q 479 551 455 529 q 510 601 502 573 q 519 658 519 629 q 509 719 519 692 q 475 764 499 746 q 412 793 451 783 q 316 803 373 803 m 485 -184 q 477 -230 485 -209 q 454 -268 468 -252 q 421 -294 440 -285 q 379 -304 401 -304 q 319 -283 340 -304 q 298 -221 298 -262 q 307 -174 298 -196 q 331 -136 316 -152 q 365 -111 345 -120 q 405 -102 384 -102 q 464 -122 443 -102 q 485 -184 485 -143 "},"™":{"x_min":30.53125,"x_max":807.015625,"ha":838,"o":"m 113 547 l 113 571 q 147 581 139 576 q 156 589 156 585 l 156 819 l 86 819 q 70 807 78 819 q 51 768 63 796 l 30 774 q 32 792 31 781 q 35 815 33 803 q 38 838 36 827 q 42 855 40 848 l 341 855 l 352 847 q 350 830 351 840 q 348 809 349 820 q 345 787 347 797 q 341 769 343 776 l 320 769 q 311 805 315 791 q 296 819 308 819 l 229 819 l 229 589 q 237 581 229 585 q 271 571 245 576 l 271 547 l 113 547 m 798 830 q 782 829 792 830 q 764 824 773 827 l 767 586 q 776 578 767 582 q 807 571 786 574 l 807 547 l 660 547 l 660 571 q 690 578 679 574 q 701 586 701 582 l 698 770 l 581 547 l 553 547 l 438 770 l 436 586 q 444 578 436 582 q 473 571 453 574 l 473 547 l 357 547 l 357 571 q 385 578 376 574 q 395 586 395 582 l 397 822 q 377 828 387 827 q 359 830 367 830 l 359 855 l 457 855 q 466 851 462 855 q 477 833 471 847 l 579 636 l 683 833 q 694 851 690 848 q 703 855 698 855 l 798 855 l 798 830 "},"ặ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 426 -184 q 418 -230 426 -209 q 395 -268 409 -252 q 362 -294 381 -285 q 320 -304 342 -304 q 260 -283 281 -304 q 239 -221 239 -262 q 248 -174 239 -196 q 272 -136 257 -152 q 306 -111 286 -120 q 346 -102 325 -102 q 405 -122 384 -102 q 426 -184 426 -143 m 590 927 q 542 833 569 872 q 484 769 515 794 q 419 732 453 744 q 350 721 385 721 q 278 732 313 721 q 212 769 243 744 q 155 833 181 794 q 108 927 128 872 q 119 940 112 933 q 132 953 125 947 q 146 965 139 960 q 159 973 153 970 q 199 919 176 941 q 247 881 222 896 q 299 858 273 865 q 347 851 325 851 q 398 858 371 851 q 449 880 424 865 q 498 918 475 895 q 538 973 521 941 q 551 965 544 970 q 565 953 558 960 q 579 940 573 947 q 590 927 585 933 "},"Ř":{"x_min":20.265625,"x_max":843.71875,"ha":840,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 784 q 74 778 97 781 q 29 771 50 775 l 20 834 q 176 862 92 849 q 358 875 261 875 q 515 859 451 875 q 621 815 580 843 q 681 750 662 788 q 700 669 700 712 q 686 583 700 622 q 647 512 672 544 q 587 457 622 481 q 510 420 552 434 l 724 124 q 745 101 735 110 q 766 88 754 92 q 794 82 778 83 q 833 84 810 82 l 843 34 q 793 19 821 27 q 738 4 765 11 q 687 -5 710 -1 q 651 -10 664 -10 q 612 1 631 -10 q 584 27 594 12 l 390 397 q 376 396 383 396 l 363 396 q 328 398 346 396 q 292 404 310 400 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 329 803 q 310 802 320 803 q 292 802 301 802 l 292 479 q 323 475 310 475 q 352 474 337 474 q 486 520 443 474 q 529 648 529 566 q 519 708 529 679 q 487 757 510 736 q 426 790 464 778 q 329 803 387 803 m 425 939 l 333 939 l 148 1162 q 167 1186 158 1175 q 189 1204 177 1197 l 381 1076 l 569 1204 q 590 1186 580 1197 q 608 1162 600 1175 l 425 939 "},"Ň":{"x_min":29.078125,"x_max":894.59375,"ha":922,"o":"m 29 0 l 29 49 q 100 68 78 55 q 122 90 122 81 l 122 755 q 29 805 77 797 l 29 855 l 219 855 q 235 853 229 855 q 248 846 242 851 q 263 830 255 840 q 284 802 271 819 l 699 226 l 699 763 q 694 773 699 767 q 679 784 690 779 q 651 795 669 790 q 606 805 633 801 l 606 855 l 894 855 l 894 805 q 823 785 845 798 q 801 763 801 772 l 801 -20 q 696 5 735 -14 q 638 50 657 25 l 224 624 l 224 90 q 228 81 224 86 q 244 69 233 75 q 273 58 255 63 q 317 49 291 52 l 317 0 l 29 0 m 507 939 l 415 939 l 230 1162 q 249 1186 240 1175 q 271 1204 259 1197 l 463 1076 l 651 1204 q 672 1186 662 1197 q 690 1162 682 1175 l 507 939 "},"ừ":{"x_min":22.9375,"x_max":940,"ha":940,"o":"m 940 706 q 924 650 940 680 q 876 590 908 621 q 792 528 843 559 q 672 469 741 497 l 672 192 q 672 157 672 171 q 675 134 673 144 q 679 120 676 125 q 687 111 682 114 q 710 109 695 106 q 759 127 724 112 l 776 76 q 721 43 751 59 q 662 11 691 26 q 612 -11 634 -2 q 582 -20 590 -20 q 558 -15 570 -20 q 537 1 547 -11 q 520 35 528 13 q 509 92 513 57 q 433 33 466 55 q 372 0 399 11 q 321 -16 344 -12 q 276 -20 298 -20 q 214 -11 244 -20 q 159 20 183 -2 q 119 84 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 630 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 313 102 298 107 q 346 97 327 97 q 377 100 361 97 q 414 112 394 103 q 457 137 434 122 q 509 177 481 153 l 509 467 q 506 516 509 497 q 495 544 504 534 q 468 558 486 554 q 419 564 450 562 l 419 611 q 542 628 487 617 q 646 650 597 638 l 672 619 l 671 540 q 716 569 698 554 q 743 599 733 585 q 757 627 753 614 q 762 651 762 640 q 749 688 762 671 q 718 722 737 706 l 894 802 q 926 761 913 787 q 940 706 940 734 m 500 736 q 488 727 496 732 q 473 718 481 722 q 456 710 464 713 q 442 705 448 707 l 183 960 l 202 998 q 230 1004 209 1000 q 276 1013 251 1008 q 322 1020 300 1017 q 352 1025 344 1024 l 500 736 "},"Ợ":{"x_min":37,"x_max":857.4375,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 857 944 q 819 855 857 904 q 700 760 781 807 q 783 613 755 697 q 812 439 812 530 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 552 858 502 875 q 642 813 601 842 q 672 854 664 834 q 679 889 679 874 q 667 926 679 908 q 636 959 654 944 l 812 1040 q 844 998 830 1025 q 857 944 857 972 m 519 -184 q 510 -230 519 -209 q 487 -268 502 -252 q 454 -294 473 -285 q 413 -304 434 -304 q 352 -283 373 -304 q 332 -221 332 -262 q 341 -174 332 -196 q 364 -136 349 -152 q 398 -111 379 -120 q 438 -102 417 -102 q 498 -122 477 -102 q 519 -184 519 -143 "},"ƴ":{"x_min":-44.078125,"x_max":984.78125,"ha":705,"o":"m 316 581 q 275 574 289 578 q 255 566 261 571 q 249 553 248 561 q 255 535 250 546 l 392 194 l 545 615 q 617 761 577 704 q 697 849 656 817 q 777 893 737 881 q 850 905 817 905 q 894 900 870 905 q 938 888 918 895 q 971 873 958 881 q 984 859 984 865 q 974 838 984 854 q 948 801 963 821 q 915 763 933 782 q 885 736 898 744 q 835 759 859 753 q 796 766 811 766 q 710 730 746 766 q 644 618 673 695 l 390 -62 q 322 -196 360 -143 q 244 -279 284 -248 q 164 -321 204 -309 q 91 -334 124 -334 q 47 -329 71 -334 q 3 -318 23 -325 q -30 -303 -16 -312 q -44 -287 -44 -295 q -33 -266 -44 -282 q -7 -230 -23 -249 q 24 -192 7 -210 q 54 -166 41 -174 q 105 -189 81 -183 q 144 -196 129 -196 q 185 -190 165 -196 q 224 -169 205 -184 q 260 -128 243 -153 q 293 -61 278 -102 l 311 -16 l 84 535 q 60 564 78 554 q 8 581 42 574 l 8 631 l 316 631 l 316 581 "},"É":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 274 922 q 249 941 262 927 q 227 967 237 954 l 475 1198 q 510 1178 491 1189 q 546 1157 529 1167 q 577 1137 563 1146 q 596 1122 590 1127 l 602 1086 l 274 922 "},"ṅ":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 399 q 535 461 539 436 q 523 500 531 485 q 501 521 515 515 q 467 528 488 528 q 433 523 451 528 q 393 508 415 519 q 344 479 371 498 q 285 433 317 461 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 467 q 120 509 122 493 q 111 533 119 524 q 85 546 103 542 q 33 554 67 550 l 33 602 q 93 610 65 605 q 147 620 121 615 q 197 634 173 626 q 246 651 221 641 l 274 622 l 282 524 q 430 621 361 592 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 m 504 859 q 496 813 504 834 q 473 775 487 791 q 440 749 459 758 q 398 740 420 740 q 338 761 359 740 q 317 822 317 782 q 326 869 317 847 q 350 907 335 891 q 384 932 364 923 q 424 942 403 942 q 483 921 462 942 q 504 859 504 901 "},"³":{"x_min":34.140625,"x_max":436,"ha":482,"o":"m 436 575 q 420 510 436 540 q 375 457 404 480 q 306 421 346 434 q 218 408 266 408 q 176 412 199 408 q 128 424 152 416 q 79 446 104 433 q 34 476 55 459 l 53 526 q 132 486 96 499 q 203 474 167 474 q 273 498 246 474 q 300 567 300 522 q 291 612 300 594 q 269 640 283 630 q 240 654 256 650 q 208 658 224 658 l 197 658 q 189 658 193 658 q 181 657 185 658 q 169 656 176 656 l 161 699 q 223 721 201 708 q 257 748 246 734 q 270 776 268 761 q 273 802 273 790 q 260 849 273 830 q 219 869 248 869 q 196 864 207 869 q 179 851 186 859 q 170 830 172 842 q 172 805 167 818 q 149 795 162 799 q 121 786 136 791 q 91 780 106 782 q 64 776 76 777 l 47 801 q 62 839 47 818 q 103 879 76 860 q 166 910 129 897 q 246 923 202 923 q 320 913 289 923 q 371 887 351 903 q 399 851 390 871 q 408 810 408 830 q 401 778 408 794 q 382 748 395 762 q 352 722 370 733 q 312 704 334 710 q 364 690 341 701 q 403 662 387 679 q 427 622 419 644 q 436 575 436 600 "},"Ṧ":{"x_min":69.75,"x_max":656,"ha":712,"o":"m 656 255 q 646 193 656 225 q 619 130 637 161 q 573 72 601 100 q 508 24 545 45 q 423 -7 470 4 q 318 -20 376 -20 q 262 -15 294 -20 q 198 -2 231 -10 q 134 18 165 6 q 79 46 102 30 q 73 59 75 47 q 70 89 71 71 q 69 130 69 107 q 71 176 70 152 q 76 221 73 199 q 84 260 79 243 l 132 257 q 169 184 147 217 q 220 127 192 150 q 279 90 247 103 q 345 77 311 77 q 404 85 376 77 q 454 111 433 94 q 489 152 476 127 q 503 209 503 177 q 484 281 503 251 q 436 334 466 311 q 368 377 406 358 q 289 414 329 396 q 211 454 249 433 q 142 502 172 474 q 94 565 112 529 q 76 651 76 601 q 93 722 76 683 q 149 794 111 761 q 245 851 186 828 q 386 875 304 875 q 457 870 422 875 q 523 857 493 865 q 577 837 554 849 q 613 812 600 826 q 614 800 616 809 q 608 778 613 790 q 597 750 604 765 q 582 721 590 735 q 567 697 575 708 q 554 681 560 686 l 510 685 q 475 739 495 717 q 435 773 456 760 q 392 791 414 786 q 351 797 370 797 q 294 788 318 797 q 254 764 270 779 q 232 730 239 749 q 225 693 225 712 q 243 636 225 661 q 292 590 262 611 q 361 550 322 569 q 440 510 399 531 q 519 466 481 490 q 588 413 558 443 q 637 344 618 383 q 656 255 656 306 m 409 939 l 316 939 l 132 1162 q 151 1186 141 1175 q 172 1204 161 1197 l 364 1076 l 552 1204 q 574 1186 564 1197 q 592 1162 583 1175 l 409 939 m 456 1282 q 447 1235 456 1257 q 424 1197 439 1214 q 391 1172 410 1181 q 350 1162 371 1162 q 289 1183 310 1162 q 269 1245 269 1204 q 277 1292 269 1270 q 301 1330 286 1313 q 335 1355 316 1346 q 375 1364 354 1364 q 435 1344 413 1364 q 456 1282 456 1323 "},"ṗ":{"x_min":33,"x_max":733,"ha":777,"o":"m 580 289 q 566 401 580 354 q 530 477 552 447 q 479 521 508 507 q 422 536 451 536 q 398 533 410 536 q 371 522 386 530 q 335 499 356 514 q 285 460 314 484 l 285 155 q 347 121 320 134 q 393 103 373 109 q 429 95 413 97 q 462 94 445 94 q 510 106 488 94 q 547 144 531 119 q 571 205 563 169 q 580 289 580 242 m 733 339 q 721 250 733 294 q 689 167 709 207 q 642 92 669 127 q 587 33 616 58 q 527 -5 557 8 q 468 -20 496 -20 q 429 -15 449 -20 q 387 -2 409 -11 q 339 21 365 6 q 285 56 314 35 l 285 -234 q 310 -255 285 -245 q 399 -276 335 -266 l 399 -326 l 33 -326 l 33 -276 q 99 -255 77 -265 q 122 -234 122 -245 l 122 467 q 119 508 122 492 q 109 534 117 524 q 83 548 101 544 q 33 554 65 553 l 33 602 q 100 611 71 606 q 152 622 128 616 q 198 634 176 627 q 246 651 220 641 l 274 622 l 281 539 q 350 593 318 572 q 410 628 383 615 q 461 645 438 640 q 504 651 484 651 q 592 632 550 651 q 665 575 633 613 q 714 477 696 536 q 733 339 733 419 m 475 859 q 466 813 475 834 q 443 775 458 791 q 410 749 429 758 q 369 740 390 740 q 308 761 329 740 q 288 822 288 782 q 296 869 288 847 q 320 907 305 891 q 354 932 335 923 q 394 942 373 942 q 454 921 432 942 q 475 859 475 901 "},"[":{"x_min":85,"x_max":451.9375,"ha":469,"o":"m 451 -154 q 447 -170 450 -160 q 440 -191 443 -180 q 433 -211 437 -202 q 426 -227 429 -220 l 85 -227 l 85 1085 l 422 1085 l 450 1062 q 445 1043 449 1054 q 439 1020 442 1031 q 432 1000 435 1009 q 426 987 428 991 l 241 987 l 241 -129 l 422 -129 l 451 -154 "},"Ǹ":{"x_min":29.078125,"x_max":894.59375,"ha":922,"o":"m 29 0 l 29 49 q 100 68 78 55 q 122 90 122 81 l 122 755 q 29 805 77 797 l 29 855 l 219 855 q 235 853 229 855 q 248 846 242 851 q 263 830 255 840 q 284 802 271 819 l 699 226 l 699 763 q 694 773 699 767 q 679 784 690 779 q 651 795 669 790 q 606 805 633 801 l 606 855 l 894 855 l 894 805 q 823 785 845 798 q 801 763 801 772 l 801 -20 q 696 5 735 -14 q 638 50 657 25 l 224 624 l 224 90 q 228 81 224 86 q 244 69 233 75 q 273 58 255 63 q 317 49 291 52 l 317 0 l 29 0 m 591 962 q 572 938 581 949 q 550 922 562 927 l 225 1080 l 232 1123 q 252 1139 237 1128 q 285 1162 267 1150 q 320 1183 303 1173 q 343 1198 336 1193 l 591 962 "},"Ḗ":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 659 1075 q 652 1055 657 1068 q 640 1029 647 1043 q 629 1004 634 1016 q 621 986 623 992 l 103 986 l 81 1007 q 88 1027 83 1015 q 99 1053 92 1039 q 110 1078 105 1066 q 119 1097 115 1090 l 637 1097 l 659 1075 m 274 1139 q 249 1158 262 1144 q 227 1184 237 1171 l 475 1415 q 510 1395 491 1406 q 546 1374 529 1384 q 577 1354 563 1363 q 596 1339 590 1344 l 602 1303 l 274 1139 "},"∏":{"x_min":28.40625,"x_max":874.28125,"ha":916,"o":"m 28 0 l 28 49 q 98 70 74 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 28 805 77 795 l 28 855 l 874 855 l 874 805 q 803 784 827 795 q 780 763 780 772 l 780 90 q 802 70 780 82 q 874 49 824 59 l 874 0 l 517 0 l 517 49 q 586 70 563 59 q 610 90 610 81 l 610 731 q 602 747 610 739 q 580 762 595 755 q 545 773 566 769 q 497 778 524 778 l 394 778 q 349 772 368 777 q 317 762 329 768 q 298 747 304 755 q 292 731 292 739 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 28 0 "},"Ḥ":{"x_min":29.078125,"x_max":907.59375,"ha":949,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 488 l 644 488 l 644 763 q 621 783 644 771 q 551 805 599 795 l 551 855 l 907 855 l 907 805 q 837 784 861 795 q 814 763 814 772 l 814 90 q 836 70 814 82 q 907 49 858 59 l 907 0 l 551 0 l 551 49 q 620 70 597 59 q 644 90 644 81 l 644 407 l 292 407 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 561 -184 q 552 -230 561 -209 q 529 -268 544 -252 q 496 -294 515 -285 q 455 -304 476 -304 q 395 -283 415 -304 q 374 -221 374 -262 q 383 -174 374 -196 q 406 -136 391 -152 q 440 -111 421 -120 q 481 -102 459 -102 q 540 -122 519 -102 q 561 -184 561 -143 "},"ḥ":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 388 q 534 457 539 430 q 521 499 530 483 q 497 521 511 515 q 462 528 482 528 q 381 503 423 528 q 285 433 339 479 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 859 q 120 904 122 888 q 110 928 118 920 q 83 941 101 937 q 33 949 65 945 l 33 996 q 101 1007 70 1002 q 156 1019 131 1013 q 206 1033 182 1025 q 255 1051 230 1040 l 285 1023 l 285 530 q 431 622 363 594 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 m 504 -184 q 496 -230 504 -209 q 473 -268 487 -252 q 440 -294 459 -285 q 398 -304 420 -304 q 338 -283 359 -304 q 317 -221 317 -262 q 326 -174 317 -196 q 350 -136 335 -152 q 384 -111 364 -120 q 424 -102 403 -102 q 483 -122 462 -102 q 504 -184 504 -143 "},"ˋ":{"x_min":0,"x_max":317.40625,"ha":317,"o":"m 317 736 q 305 727 313 732 q 289 718 298 722 q 273 710 281 713 q 259 705 265 707 l 0 960 l 19 998 q 47 1004 26 1000 q 92 1013 68 1008 q 139 1020 117 1017 q 169 1025 161 1024 l 317 736 "},"ğ":{"x_min":10,"x_max":716.828125,"ha":718,"o":"m 453 406 q 443 471 453 441 q 417 524 434 501 q 373 559 399 546 q 312 573 347 573 q 278 565 295 573 q 246 541 260 557 q 223 502 232 526 q 214 446 214 478 q 222 382 214 412 q 247 329 230 352 q 291 294 264 307 q 354 281 317 281 q 391 288 373 281 q 423 312 409 296 q 444 351 436 327 q 453 406 453 374 m 377 -28 q 316 -18 344 -24 q 262 -7 287 -13 q 213 -46 231 -29 q 186 -77 195 -63 q 175 -102 177 -91 q 173 -123 173 -113 q 189 -166 173 -146 q 235 -203 206 -187 q 304 -227 264 -218 q 390 -237 343 -237 q 459 -227 430 -237 q 507 -200 488 -217 q 536 -161 527 -183 q 546 -116 546 -140 q 539 -90 546 -103 q 515 -66 533 -77 q 463 -44 497 -54 q 377 -28 430 -34 m 609 434 q 585 339 609 382 q 524 265 562 296 q 434 217 485 234 q 327 200 383 200 l 320 200 q 287 161 294 176 q 280 143 280 147 q 284 131 280 136 q 304 119 288 125 q 350 107 319 113 q 434 94 381 101 q 565 70 513 84 q 648 35 617 55 q 691 -11 679 15 q 704 -71 704 -37 q 689 -134 704 -102 q 649 -196 674 -166 q 588 -250 623 -225 q 513 -294 554 -275 q 429 -323 473 -313 q 342 -334 385 -334 q 268 -329 307 -334 q 193 -315 230 -325 q 123 -291 156 -306 q 64 -256 90 -277 q 24 -209 39 -235 q 10 -150 10 -182 q 17 -115 10 -133 q 43 -78 24 -98 q 95 -34 62 -58 q 180 17 128 -11 q 103 83 103 48 q 109 103 103 90 q 130 132 116 116 q 169 169 145 149 q 226 212 192 189 q 157 241 188 223 q 104 284 126 259 q 70 341 82 309 q 58 408 58 372 q 82 502 58 457 q 147 579 106 546 q 242 631 188 612 q 354 651 295 651 q 442 638 401 651 q 515 603 482 625 q 622 625 574 610 q 697 651 670 640 l 716 625 q 710 608 714 618 q 700 587 705 598 q 690 566 695 577 q 678 547 684 556 q 631 541 655 543 q 579 537 607 538 q 601 487 593 513 q 609 434 609 462 m 596 927 q 549 833 576 872 q 491 769 522 794 q 425 732 459 744 q 357 721 392 721 q 285 732 320 721 q 219 769 250 744 q 162 833 188 794 q 115 927 135 872 q 125 940 119 933 q 139 953 132 947 q 153 965 146 960 q 166 973 160 970 q 206 919 183 941 q 254 881 229 896 q 306 858 280 865 q 354 851 332 851 q 404 858 378 851 q 456 880 431 865 q 505 918 482 895 q 545 973 528 941 q 558 965 551 970 q 572 953 565 960 q 586 940 579 947 q 596 927 592 933 "},"Ở":{"x_min":37,"x_max":857.4375,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 857 944 q 819 855 857 904 q 700 760 781 807 q 783 613 755 697 q 812 439 812 530 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 552 858 502 875 q 642 813 601 842 q 672 854 664 834 q 679 889 679 874 q 667 926 679 908 q 636 959 654 944 l 812 1040 q 844 998 830 1025 q 857 944 857 972 m 559 1121 q 547 1088 559 1102 q 519 1061 535 1073 q 486 1037 503 1048 q 462 1014 470 1026 q 457 989 454 1002 q 484 959 461 976 q 471 952 480 955 q 453 945 463 948 q 436 940 444 942 q 422 938 427 938 q 363 973 378 957 q 352 1004 348 990 q 373 1030 356 1018 q 408 1055 389 1043 q 442 1081 427 1068 q 457 1111 457 1095 q 449 1143 457 1134 q 427 1153 441 1153 q 405 1142 414 1153 q 396 1121 396 1132 q 403 1102 396 1113 q 359 1087 387 1094 q 300 1077 332 1080 l 293 1084 q 291 1098 291 1090 q 304 1137 291 1117 q 339 1171 317 1156 q 390 1196 361 1187 q 450 1206 418 1206 q 500 1199 479 1206 q 534 1180 520 1192 q 553 1153 547 1168 q 559 1121 559 1138 "},"Ṙ":{"x_min":20.265625,"x_max":843.71875,"ha":840,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 784 q 74 778 97 781 q 29 771 50 775 l 20 834 q 176 862 92 849 q 358 875 261 875 q 515 859 451 875 q 621 815 580 843 q 681 750 662 788 q 700 669 700 712 q 686 583 700 622 q 647 512 672 544 q 587 457 622 481 q 510 420 552 434 l 724 124 q 745 101 735 110 q 766 88 754 92 q 794 82 778 83 q 833 84 810 82 l 843 34 q 793 19 821 27 q 738 4 765 11 q 687 -5 710 -1 q 651 -10 664 -10 q 612 1 631 -10 q 584 27 594 12 l 390 397 q 376 396 383 396 l 363 396 q 328 398 346 396 q 292 404 310 400 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 329 803 q 310 802 320 803 q 292 802 301 802 l 292 479 q 323 475 310 475 q 352 474 337 474 q 486 520 443 474 q 529 648 529 566 q 519 708 529 679 q 487 757 510 736 q 426 790 464 778 q 329 803 387 803 m 472 1050 q 463 1003 472 1024 q 441 965 455 981 q 407 939 426 949 q 366 930 388 930 q 306 951 326 930 q 285 1012 285 972 q 294 1059 285 1037 q 317 1097 303 1081 q 351 1122 332 1113 q 392 1132 371 1132 q 451 1111 430 1132 q 472 1050 472 1091 "},"ª":{"x_min":28,"x_max":374.109375,"ha":383,"o":"m 374 543 q 313 507 342 522 q 261 492 283 492 q 244 504 252 492 q 232 549 236 516 q 166 504 197 516 q 110 492 134 492 q 82 497 97 492 q 55 510 67 501 q 35 533 43 519 q 28 570 28 548 q 35 611 28 591 q 58 648 42 631 q 98 679 73 665 q 158 700 123 693 l 230 715 l 230 723 q 228 760 230 744 q 223 787 227 776 q 209 803 218 798 q 183 809 199 809 q 163 806 173 809 q 148 797 154 803 q 139 782 142 791 q 140 760 136 773 q 127 752 140 757 q 96 743 113 747 q 63 735 79 738 q 42 733 47 732 l 35 751 q 63 794 43 774 q 108 827 83 813 q 163 848 134 840 q 221 856 192 856 q 263 850 245 856 q 293 831 281 845 q 311 794 305 817 q 318 735 318 771 l 318 602 q 320 574 318 583 q 328 561 323 566 q 339 561 331 559 q 365 570 346 562 l 374 543 m 29 397 l 29 457 l 353 457 l 353 397 l 29 397 m 230 590 l 230 679 l 195 672 q 140 644 160 663 q 121 596 121 625 q 124 575 121 583 q 132 563 127 567 q 143 556 137 558 q 154 554 149 554 q 186 561 168 554 q 230 590 203 569 "},"T":{"x_min":1.765625,"x_max":780.8125,"ha":806,"o":"m 203 0 l 203 49 q 254 62 234 55 q 287 75 275 69 q 304 87 299 82 q 309 98 309 93 l 309 774 l 136 774 q 117 766 126 774 q 98 742 108 759 q 77 698 89 725 q 51 631 66 670 l 1 649 q 6 697 3 669 q 13 754 9 724 q 21 810 17 783 q 28 855 25 837 l 755 855 l 780 833 q 777 791 780 815 q 771 739 775 766 q 763 685 767 712 q 755 638 759 659 l 704 638 q 692 694 697 669 q 683 737 688 720 q 669 764 677 754 q 646 774 660 774 l 479 774 l 479 98 q 483 88 479 94 q 500 76 488 82 q 533 62 512 69 q 585 49 554 55 l 585 0 l 203 0 "},"š":{"x_min":52.03125,"x_max":530,"ha":582,"o":"m 530 192 q 515 109 530 144 q 477 51 500 75 q 424 13 454 28 q 365 -7 395 0 q 308 -17 335 -15 q 260 -20 280 -20 q 213 -16 239 -20 q 161 -7 188 -13 q 109 7 135 -1 q 61 29 83 17 q 53 53 56 31 q 52 105 51 75 q 55 169 52 136 q 66 227 58 202 l 120 220 q 143 155 127 184 q 180 105 158 126 q 228 74 202 85 q 284 63 255 63 q 357 80 333 63 q 381 138 381 98 q 367 187 381 166 q 330 227 353 209 q 278 262 307 246 q 218 294 249 277 q 161 325 189 308 q 110 364 133 343 q 74 411 88 385 q 60 469 60 437 q 80 545 60 511 q 135 602 101 579 q 212 638 169 625 q 301 651 255 651 q 360 647 331 651 q 417 636 390 643 q 467 620 444 630 q 506 598 490 611 q 507 576 510 595 q 498 532 505 556 q 483 485 492 508 q 466 451 474 462 l 419 457 q 371 548 402 516 q 294 580 339 580 q 231 561 253 580 q 209 514 209 542 q 219 475 209 492 q 250 443 230 458 q 299 413 270 428 q 364 379 328 398 q 423 347 393 364 q 476 308 452 330 q 515 258 500 286 q 530 192 530 230 m 334 722 l 241 722 l 58 979 q 76 1007 66 993 q 97 1026 86 1020 l 288 878 l 477 1026 q 501 1007 489 1020 q 522 979 513 993 l 334 722 "},"":{"x_min":30.515625,"x_max":454.40625,"ha":485,"o":"m 454 246 q 448 229 452 239 q 441 208 445 219 q 434 187 438 197 l 429 171 l 52 171 l 30 193 l 35 210 q 42 231 38 220 q 49 252 46 242 q 56 269 53 262 l 432 269 l 454 246 m 454 432 q 448 415 452 425 q 441 394 445 405 q 434 373 438 383 q 429 358 431 364 l 52 358 l 30 379 l 35 396 q 42 417 38 406 q 49 438 46 428 q 56 455 53 448 l 432 455 l 454 432 "},"Þ":{"x_min":28.40625,"x_max":737,"ha":787,"o":"m 28 0 l 28 49 q 98 70 74 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 28 805 77 795 l 28 855 l 405 855 l 405 805 q 348 793 371 799 q 314 783 326 788 q 296 773 301 778 q 292 763 292 768 l 292 694 q 339 696 315 695 q 386 697 363 697 q 530 681 465 697 q 640 635 594 665 q 711 560 686 604 q 737 457 737 515 q 724 370 737 410 q 689 300 711 331 q 638 245 667 269 q 577 206 609 221 q 512 182 545 190 q 449 175 479 175 q 388 180 418 175 q 335 195 358 185 l 314 266 q 363 249 342 252 q 408 246 385 246 q 466 256 437 246 q 516 289 494 267 q 552 346 538 311 q 566 429 566 381 q 550 513 566 477 q 505 574 534 550 q 436 611 476 598 q 348 624 396 624 q 292 622 321 624 l 292 90 q 296 82 292 86 q 313 71 300 77 q 348 61 325 66 q 405 49 370 55 l 405 0 l 28 0 "},"j":{"x_min":-195.1875,"x_max":320,"ha":401,"o":"m 292 72 q 278 -59 292 -5 q 242 -150 264 -113 q 192 -213 220 -188 q 137 -260 165 -239 q 97 -288 119 -275 q 51 -311 74 -301 q 5 -327 27 -321 q -36 -334 -17 -334 q -91 -327 -62 -334 q -142 -310 -119 -320 q -180 -290 -165 -300 q -195 -271 -195 -279 q -180 -245 -195 -262 q -146 -211 -166 -228 q -108 -180 -127 -194 q -78 -161 -88 -166 q -52 -185 -67 -174 q -20 -202 -36 -195 q 12 -213 -3 -209 q 40 -217 27 -217 q 74 -207 58 -217 q 102 -170 90 -197 q 121 -95 114 -143 q 129 29 129 -47 l 129 439 q 128 495 129 474 q 119 527 127 516 q 93 545 111 539 q 39 554 74 550 l 39 602 q 102 612 75 606 q 152 622 129 617 q 197 635 175 628 q 246 651 219 642 l 292 651 l 292 72 m 320 855 q 311 813 320 832 q 287 780 303 794 q 251 759 272 766 q 206 752 231 752 q 170 756 187 752 q 140 770 153 760 q 120 793 127 779 q 113 827 113 807 q 121 869 113 850 q 146 901 130 888 q 182 922 161 915 q 227 930 203 930 q 262 925 245 930 q 291 912 279 921 q 312 888 304 902 q 320 855 320 874 "},"1":{"x_min":83.84375,"x_max":620.5625,"ha":703,"o":"m 104 0 l 104 56 q 193 70 157 62 q 249 86 228 77 q 279 102 270 94 q 288 117 288 109 l 288 616 q 285 658 288 644 q 275 683 283 673 q 261 690 271 687 q 230 692 250 692 q 179 687 210 691 q 103 673 148 683 l 83 728 q 130 740 102 732 q 191 759 159 749 q 256 781 222 769 q 321 804 290 793 q 378 826 352 816 q 421 844 404 836 l 451 815 l 451 117 q 458 102 451 110 q 484 86 465 94 q 536 70 503 78 q 620 56 569 62 l 620 0 l 104 0 "},"ɣ":{"x_min":8.796875,"x_max":697.0625,"ha":706,"o":"m 404 -180 q 401 -151 404 -165 q 392 -117 399 -136 q 374 -72 385 -98 q 345 -10 363 -47 q 313 -72 326 -46 q 292 -118 300 -99 q 280 -151 284 -138 q 277 -175 277 -165 q 296 -227 277 -210 q 341 -244 315 -244 q 385 -226 367 -244 q 404 -180 404 -208 m 697 581 q 664 572 676 576 q 643 562 651 567 q 631 551 636 557 q 622 535 627 544 l 436 169 l 481 78 q 516 7 502 37 q 539 -48 530 -22 q 551 -97 547 -73 q 556 -148 556 -121 q 542 -212 556 -179 q 501 -272 528 -245 q 436 -316 475 -299 q 348 -334 397 -334 q 278 -322 310 -334 q 224 -292 247 -311 q 189 -247 202 -272 q 177 -192 177 -221 q 180 -154 177 -173 q 191 -113 183 -136 q 213 -62 199 -91 q 246 6 226 -33 l 293 95 l 78 535 q 56 563 70 552 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 275 574 289 578 q 254 565 260 570 q 249 552 248 559 q 255 535 250 545 l 384 272 l 521 535 q 525 551 526 544 q 517 564 525 559 q 495 573 510 569 q 454 581 479 577 l 454 631 l 697 631 l 697 581 "},"ɩ":{"x_min":38.796875,"x_max":468.328125,"ha":454,"o":"m 468 107 q 387 44 422 68 q 325 5 352 19 q 278 -14 298 -9 q 243 -20 258 -20 q 154 22 180 -20 q 129 153 129 64 l 129 439 q 127 498 129 477 q 116 531 125 520 q 89 547 107 543 q 38 554 71 551 l 38 602 q 94 611 65 606 q 150 622 122 616 q 202 635 177 628 q 247 651 227 642 l 292 651 l 292 248 q 293 175 292 202 q 299 133 294 148 q 313 114 304 118 q 337 110 321 110 q 377 121 348 110 q 451 164 407 133 l 468 107 "},"Ǜ":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 705 1050 q 697 1003 705 1024 q 673 965 688 981 q 639 939 659 949 q 598 930 620 930 q 539 951 559 930 q 518 1012 518 972 q 527 1059 518 1037 q 550 1097 536 1081 q 584 1122 565 1113 q 624 1132 603 1132 q 684 1111 662 1132 q 705 1050 705 1091 m 419 1050 q 411 1003 419 1024 q 388 965 402 981 q 354 939 374 949 q 313 930 335 930 q 253 951 274 930 q 232 1012 232 972 q 241 1059 232 1037 q 264 1097 250 1081 q 298 1122 279 1113 q 338 1132 318 1132 q 398 1111 377 1132 q 419 1050 419 1091 m 599 1185 q 580 1161 590 1172 q 558 1144 570 1149 l 233 1303 l 240 1345 q 260 1362 245 1351 q 294 1384 276 1373 q 328 1406 311 1396 q 352 1420 344 1416 l 599 1185 "},"ǒ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 422 722 l 329 722 l 146 979 q 164 1007 154 993 q 185 1026 174 1020 l 377 878 l 565 1026 q 589 1007 577 1020 q 611 979 601 993 l 422 722 "},"ĉ":{"x_min":44,"x_max":605.796875,"ha":633,"o":"m 605 129 q 524 49 561 79 q 453 4 487 20 q 388 -15 419 -11 q 325 -20 357 -20 q 219 2 270 -20 q 129 65 168 24 q 67 166 90 106 q 44 301 44 226 q 71 438 44 374 q 146 548 98 501 q 262 623 195 596 q 410 651 329 651 q 460 647 432 651 q 516 636 489 643 q 566 619 543 629 q 600 597 588 609 q 598 578 601 591 q 591 547 596 564 q 581 509 587 529 q 569 472 575 490 q 556 440 563 454 q 546 420 550 426 l 501 426 q 446 529 478 493 q 359 566 413 566 q 302 552 329 566 q 253 509 274 538 q 219 433 232 480 q 207 322 207 387 q 220 225 207 268 q 258 154 234 183 q 315 109 282 125 q 384 94 348 94 q 421 96 403 94 q 459 106 438 98 q 507 130 481 115 q 569 172 533 146 l 605 129 m 576 750 q 558 723 568 737 q 537 705 548 710 l 346 856 l 157 705 q 133 723 145 710 q 111 750 121 737 l 301 1013 l 394 1013 l 576 750 "},"Ɔ":{"x_min":27,"x_max":726,"ha":770,"o":"m 726 460 q 695 264 726 352 q 610 113 664 176 q 480 14 555 49 q 315 -20 405 -20 q 186 0 240 -20 q 98 50 132 19 q 47 119 63 81 q 31 196 31 158 q 33 226 31 210 q 39 258 35 242 q 52 290 44 274 q 71 318 60 305 q 109 336 86 326 q 155 355 131 345 q 199 372 178 364 q 232 383 220 379 l 256 330 q 225 306 237 318 q 206 279 213 293 q 197 248 199 264 q 195 212 195 231 q 206 163 195 187 q 238 120 218 139 q 288 89 259 101 q 351 78 316 78 q 427 94 390 78 q 492 151 464 111 q 537 261 520 192 q 554 434 554 330 q 530 588 554 524 q 470 691 507 651 q 386 750 433 731 q 290 769 339 769 q 249 765 272 769 q 198 752 226 762 q 136 726 170 743 q 61 682 102 709 q 52 690 58 683 q 42 704 47 697 q 32 719 37 712 q 27 728 28 726 q 118 800 72 771 q 207 845 163 828 q 289 868 250 862 q 363 875 329 875 q 499 847 434 875 q 615 766 565 819 q 695 635 665 712 q 726 460 726 558 "},"ī":{"x_min":6.09375,"x_max":434.734375,"ha":417,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 m 434 886 q 427 866 432 879 q 416 840 422 854 q 404 815 410 826 q 396 797 399 803 l 27 797 l 6 818 q 12 838 8 826 q 23 864 17 850 q 35 889 29 877 q 44 908 40 901 l 413 908 l 434 886 "},"Ď":{"x_min":20.265625,"x_max":828,"ha":884,"o":"m 828 458 q 810 306 828 373 q 763 188 793 240 q 693 102 733 137 q 608 43 653 66 q 514 10 562 21 q 419 0 465 0 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 784 l 29 771 l 20 834 q 99 849 53 842 q 195 863 145 857 q 296 871 246 868 q 391 875 347 875 q 577 846 495 875 q 714 765 658 818 q 798 634 769 711 q 828 458 828 556 m 343 803 q 318 802 331 803 q 292 802 305 802 l 292 113 q 293 104 292 108 q 300 90 295 96 q 317 81 305 85 q 347 75 328 77 q 394 73 366 73 q 449 81 420 73 q 506 109 477 90 q 559 157 534 128 q 603 226 585 186 q 634 317 622 266 q 646 432 646 368 q 626 591 646 522 q 568 707 606 660 q 473 778 530 754 q 343 803 417 803 m 446 939 l 354 939 l 169 1162 q 188 1186 179 1175 q 210 1204 198 1197 l 402 1076 l 590 1204 q 611 1186 601 1197 q 629 1162 621 1175 l 446 939 "},"&":{"x_min":44,"x_max":959.375,"ha":963,"o":"m 337 766 q 346 693 337 731 q 373 615 355 655 q 426 657 405 634 q 460 702 448 679 q 478 749 473 725 q 484 794 484 772 q 461 868 484 841 q 408 896 439 896 q 376 885 390 896 q 354 858 363 875 q 341 816 345 840 q 337 766 337 792 m 388 78 q 462 89 427 78 q 530 120 498 101 q 465 186 498 151 q 400 261 432 222 q 338 343 368 301 q 283 428 309 385 q 233 342 247 385 q 220 253 220 300 q 234 172 220 206 q 273 118 249 139 q 328 87 298 97 q 388 78 358 78 m 959 507 q 941 484 951 496 q 920 459 930 471 q 900 437 910 447 q 882 421 890 427 q 827 442 856 432 q 775 454 798 452 q 793 414 789 434 q 798 368 798 393 q 777 272 798 323 q 719 172 756 221 q 747 148 733 160 q 773 126 760 137 q 845 89 808 97 q 918 90 883 82 l 928 40 q 867 16 899 28 q 806 -2 835 5 q 757 -15 778 -10 q 728 -20 736 -20 q 677 1 711 -20 q 597 59 642 22 q 481 1 544 22 q 348 -20 417 -20 q 220 -3 276 -20 q 124 45 164 13 q 64 126 85 78 q 44 238 44 175 q 89 382 44 310 q 232 526 134 454 q 196 628 209 577 q 184 727 184 678 q 205 829 184 782 q 262 910 226 875 q 347 963 298 944 q 450 983 395 983 q 538 969 501 983 q 598 932 575 955 q 633 878 622 909 q 645 816 645 848 q 627 744 645 780 q 579 673 609 707 q 512 607 550 638 q 434 550 474 575 l 413 536 q 464 459 436 498 q 521 382 491 420 q 583 310 552 345 q 647 242 615 274 q 667 291 660 267 q 675 340 675 316 q 666 391 675 368 q 642 430 657 414 q 609 454 628 446 q 571 463 590 463 l 551 486 q 562 498 554 490 q 578 513 569 505 q 595 527 586 521 q 611 537 605 534 l 938 537 l 959 507 "},"ṻ":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 687 886 q 679 866 685 879 q 668 840 674 854 q 657 815 662 826 q 649 797 651 803 l 130 797 l 109 818 q 115 838 111 826 q 126 864 120 850 q 138 889 132 877 q 147 908 143 901 l 665 908 l 687 886 m 627 1104 q 619 1057 627 1079 q 596 1019 610 1035 q 562 993 581 1003 q 520 984 542 984 q 461 1005 481 984 q 440 1066 440 1026 q 449 1113 440 1091 q 472 1151 458 1135 q 506 1177 487 1167 q 546 1186 525 1186 q 606 1165 584 1186 q 627 1104 627 1145 m 341 1104 q 333 1057 341 1079 q 310 1019 324 1035 q 276 993 296 1003 q 235 984 257 984 q 175 1005 196 984 q 154 1066 154 1026 q 163 1113 154 1091 q 186 1151 172 1135 q 220 1177 201 1167 q 260 1186 240 1186 q 320 1165 299 1186 q 341 1104 341 1145 "},"G":{"x_min":37,"x_max":807.78125,"ha":836,"o":"m 743 805 q 743 793 746 802 q 734 769 740 783 q 718 739 728 756 q 700 708 709 723 q 682 682 691 693 q 667 665 673 670 l 624 674 q 579 729 602 707 q 532 765 557 752 q 481 784 508 778 q 426 790 455 790 q 386 783 409 790 q 339 760 363 776 q 292 716 315 743 q 250 650 268 689 q 220 556 232 610 q 209 432 209 502 q 230 276 209 341 q 286 169 251 211 q 365 107 321 127 q 458 87 410 87 q 525 93 496 87 q 579 112 555 100 l 579 318 q 576 333 579 326 q 562 347 573 340 q 529 361 551 354 q 469 374 507 367 l 469 424 l 807 424 l 807 374 q 755 349 769 365 q 742 318 742 334 l 742 114 q 647 47 691 73 q 566 6 604 21 q 494 -14 528 -8 q 429 -20 460 -20 q 331 -8 379 -20 q 240 25 283 2 q 159 82 196 47 q 94 163 121 116 q 52 267 67 209 q 37 394 37 325 q 72 596 37 507 q 172 747 108 685 q 322 842 236 809 q 510 875 409 875 q 563 870 532 875 q 626 856 594 865 q 690 834 659 847 q 743 805 721 821 "},"`":{"x_min":-11.53125,"x_max":306.5625,"ha":443,"o":"m 306 736 q 295 727 302 732 q 279 718 287 723 q 262 710 270 713 q 248 705 254 707 l -11 960 l 8 998 q 36 1003 15 999 q 82 1012 57 1008 q 128 1020 106 1016 q 158 1025 150 1024 l 306 736 "},"ỗ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 609 750 q 591 723 600 737 q 569 705 581 710 l 379 856 l 189 705 q 166 723 178 710 q 144 750 153 737 l 333 1013 l 426 1013 l 609 750 m 646 1254 q 616 1193 634 1226 q 576 1132 598 1161 q 526 1085 554 1104 q 467 1065 499 1065 q 412 1076 438 1065 q 360 1101 385 1088 q 310 1125 335 1114 q 260 1136 286 1136 q 232 1131 244 1136 q 209 1116 220 1126 q 186 1092 198 1106 q 163 1058 175 1077 l 112 1077 q 142 1138 124 1105 q 181 1200 159 1171 q 231 1248 204 1229 q 289 1267 258 1267 q 348 1256 320 1267 q 402 1232 377 1245 q 451 1207 427 1219 q 495 1196 474 1196 q 548 1215 526 1196 q 594 1274 571 1234 l 646 1254 "},"Ễ":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 592 962 q 574 938 584 949 q 553 922 564 927 l 362 1032 l 173 922 q 152 938 162 927 q 132 962 142 949 l 322 1183 l 404 1183 l 592 962 m 630 1395 q 600 1334 618 1367 q 560 1273 583 1301 q 511 1225 538 1244 q 452 1206 483 1206 q 396 1217 423 1206 q 345 1241 370 1228 q 295 1265 320 1254 q 244 1276 270 1276 q 217 1271 229 1276 q 193 1256 204 1266 q 171 1232 182 1246 q 147 1199 160 1218 l 96 1218 q 126 1279 109 1246 q 166 1341 143 1312 q 215 1389 188 1369 q 274 1408 242 1408 q 333 1397 305 1408 q 386 1373 361 1386 q 435 1349 412 1360 q 480 1338 458 1338 q 533 1357 510 1338 q 578 1415 555 1375 l 630 1395 "},"ằ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 590 927 q 542 833 569 872 q 484 769 515 794 q 419 732 453 744 q 350 721 385 721 q 278 732 313 721 q 212 769 243 744 q 155 833 181 794 q 108 927 128 872 q 119 940 112 933 q 132 953 125 947 q 146 965 139 960 q 159 973 153 970 q 199 919 176 941 q 247 881 222 896 q 299 858 273 865 q 347 851 325 851 q 398 858 371 851 q 449 880 424 865 q 498 918 475 895 q 538 973 521 941 q 551 965 544 970 q 565 953 558 960 q 579 940 573 947 q 590 927 585 933 m 458 968 q 446 960 454 964 q 431 950 439 955 q 414 943 422 946 q 400 937 406 939 l 141 1193 l 160 1231 q 188 1237 167 1233 q 233 1245 209 1241 q 280 1253 258 1250 q 310 1257 302 1256 l 458 968 "},"ŏ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 619 927 q 572 833 599 872 q 514 769 545 794 q 448 732 482 744 q 380 721 415 721 q 308 732 343 721 q 242 769 273 744 q 185 833 211 794 q 138 927 158 872 q 148 940 142 933 q 162 953 155 947 q 176 965 169 960 q 189 973 183 970 q 229 919 206 941 q 277 881 252 896 q 329 858 303 865 q 377 851 355 851 q 427 858 401 851 q 479 880 454 865 q 528 918 505 895 q 568 973 551 941 q 581 965 574 970 q 595 953 588 960 q 609 940 602 947 q 619 927 615 933 "},"Ả":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 562 1121 q 551 1088 562 1102 q 522 1061 539 1073 q 490 1037 506 1048 q 465 1014 473 1026 q 461 989 457 1002 q 488 959 464 976 q 474 952 483 955 q 457 945 466 948 q 439 940 448 942 q 426 938 431 938 q 366 973 381 957 q 355 1004 351 990 q 376 1030 359 1018 q 412 1055 393 1043 q 446 1081 431 1068 q 460 1111 460 1095 q 453 1143 460 1134 q 431 1153 445 1153 q 408 1142 417 1153 q 399 1121 399 1132 q 407 1102 399 1113 q 363 1087 390 1094 q 304 1077 336 1080 l 296 1084 q 294 1098 294 1090 q 308 1137 294 1117 q 342 1171 321 1156 q 393 1196 364 1187 q 453 1206 422 1206 q 503 1199 482 1206 q 537 1180 524 1192 q 556 1153 550 1168 q 562 1121 562 1138 "},"ý":{"x_min":-42.046875,"x_max":696.53125,"ha":705,"o":"m 696 581 q 663 572 676 576 q 642 563 650 568 q 629 551 634 558 q 621 535 625 545 l 395 -50 q 332 -178 366 -125 q 260 -266 298 -232 q 181 -317 222 -301 q 96 -334 139 -334 q 45 -329 70 -334 q 1 -317 20 -324 q -30 -302 -18 -310 q -42 -287 -42 -293 q -30 -264 -42 -281 q -3 -227 -18 -247 q 29 -190 12 -207 q 57 -165 46 -172 q 125 -192 91 -187 q 185 -188 160 -197 q 239 -149 210 -179 q 291 -62 267 -120 l 311 -15 l 84 535 q 59 563 76 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 275 574 289 578 q 255 565 261 570 q 249 553 248 560 q 255 535 250 546 l 394 194 l 527 535 q 532 552 531 545 q 528 564 533 559 q 510 573 523 569 q 474 581 497 577 l 474 631 l 696 631 l 696 581 m 328 705 q 313 709 322 705 q 296 717 305 713 q 280 726 287 721 q 269 734 273 730 l 412 1025 q 442 1021 420 1024 q 489 1014 464 1018 q 537 1005 514 1010 q 567 999 559 1001 l 587 962 l 328 705 "},"º":{"x_min":24,"x_max":366,"ha":390,"o":"m 274 664 q 268 719 274 692 q 252 766 263 745 q 225 799 241 787 q 189 812 210 812 q 155 802 169 812 q 132 775 141 792 q 120 734 124 758 q 116 681 116 710 q 122 626 116 653 q 141 580 129 600 q 167 548 152 560 q 200 537 183 537 q 257 571 240 537 q 274 664 274 606 m 31 397 l 31 457 l 359 457 l 359 397 l 31 397 m 366 680 q 351 611 366 645 q 312 551 336 577 q 254 508 287 524 q 187 492 222 492 q 119 505 149 492 q 68 541 89 518 q 35 597 47 565 q 24 666 24 628 q 37 735 24 701 q 73 796 50 770 q 129 840 97 823 q 202 857 162 857 q 269 843 239 857 q 320 805 299 829 q 354 749 342 781 q 366 680 366 716 "},"∞":{"x_min":44,"x_max":895,"ha":940,"o":"m 248 299 q 278 301 264 299 q 309 312 293 304 q 344 333 325 320 q 388 369 363 347 q 355 408 373 388 q 316 443 336 427 q 276 468 296 458 q 235 479 255 479 q 197 471 212 479 q 172 451 181 463 q 159 424 163 438 q 155 396 155 409 q 161 363 155 381 q 179 332 167 346 q 208 308 191 318 q 248 299 226 299 m 690 485 q 659 480 674 485 q 627 468 644 476 q 590 445 610 459 q 547 412 571 432 q 581 374 562 393 q 621 339 600 355 q 662 314 641 324 q 703 305 683 305 q 741 312 726 305 q 766 332 756 320 q 779 359 775 345 q 784 387 784 374 q 777 419 784 402 q 759 451 771 436 q 730 475 747 465 q 690 485 712 485 m 288 594 q 353 583 322 594 q 410 555 383 572 q 459 516 436 537 q 500 471 482 494 q 568 528 537 505 q 627 566 600 551 q 680 587 654 581 q 732 594 705 594 q 795 581 766 594 q 847 547 825 569 q 882 492 869 524 q 895 420 895 460 q 874 337 895 378 q 820 263 854 295 q 742 210 786 230 q 649 190 697 190 q 584 200 614 190 q 526 228 553 211 q 475 267 499 246 q 433 312 452 289 q 361 251 392 275 q 305 214 330 227 q 255 195 279 200 q 206 190 232 190 q 142 202 172 190 q 91 236 113 214 q 56 291 69 259 q 44 363 44 323 q 64 447 44 406 q 117 521 84 488 q 196 573 151 553 q 288 594 240 594 "},"ź":{"x_min":41.375,"x_max":607.015625,"ha":650,"o":"m 598 224 q 597 189 598 209 q 597 147 597 169 q 596 102 596 125 q 594 59 595 79 q 592 23 593 39 q 590 0 591 8 l 59 0 l 41 30 l 400 550 l 223 550 q 167 516 193 550 q 124 407 141 482 l 75 421 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 592 631 l 607 601 l 246 81 l 479 81 q 500 91 491 81 q 517 122 510 102 q 533 170 525 142 q 550 235 541 199 l 598 224 m 303 705 q 289 709 297 705 q 271 717 280 713 q 256 726 263 721 q 244 734 248 730 l 387 1025 q 418 1021 396 1024 q 465 1014 440 1018 q 512 1005 490 1010 q 542 999 535 1001 l 562 962 l 303 705 "},"Ư":{"x_min":29.078125,"x_max":1016.078125,"ha":1016,"o":"m 1016 944 q 1003 893 1016 920 q 963 839 990 867 q 895 783 936 811 q 797 728 853 755 l 797 355 q 772 197 797 266 q 702 79 747 127 q 596 5 657 30 q 461 -20 535 -20 q 330 0 392 -20 q 222 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 340 146 315 180 q 405 95 365 112 q 503 78 445 78 q 585 99 552 78 q 639 157 618 121 q 668 240 659 193 q 678 337 678 287 l 678 763 q 655 783 678 771 q 585 805 633 795 l 585 855 l 830 855 q 837 873 835 864 q 838 889 838 882 q 825 926 838 909 q 794 959 813 944 l 970 1040 q 1002 998 989 1025 q 1016 944 1016 972 "},"͟":{"x_min":-486.96875,"x_max":486.96875,"ha":0,"o":"m 486 -407 q 479 -427 484 -414 q 468 -453 474 -439 q 457 -478 463 -467 q 449 -497 452 -490 l -465 -497 l -486 -475 q -480 -455 -485 -467 q -469 -429 -475 -443 q -458 -404 -463 -416 q -448 -386 -452 -392 l 465 -386 l 486 -407 "},"ń":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 399 q 535 461 539 436 q 523 500 531 485 q 501 521 515 515 q 467 528 488 528 q 433 523 451 528 q 393 508 415 519 q 344 479 371 498 q 285 433 317 461 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 467 q 120 509 122 493 q 111 533 119 524 q 85 546 103 542 q 33 554 67 550 l 33 602 q 93 610 65 605 q 147 620 121 615 q 197 634 173 626 q 246 651 221 641 l 274 622 l 282 524 q 430 621 361 592 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 m 370 705 q 356 709 364 705 q 339 717 347 713 q 323 726 330 721 q 311 734 316 730 l 455 1025 q 485 1021 463 1024 q 532 1014 507 1018 q 579 1005 557 1010 q 609 999 602 1001 l 630 962 l 370 705 "},"Ḵ":{"x_min":29.078125,"x_max":857.640625,"ha":859,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 446 l 544 745 q 566 774 559 763 q 569 791 572 785 q 550 800 565 797 q 509 805 535 803 l 509 855 l 814 855 l 814 805 q 777 800 792 802 q 750 792 762 797 q 729 781 738 788 q 709 763 719 774 l 418 458 l 745 111 q 767 92 755 99 q 792 84 778 86 q 820 82 805 81 q 852 84 835 82 l 857 34 q 813 20 837 28 q 764 6 789 13 q 717 -5 740 0 q 679 -10 695 -10 q 644 -3 659 -10 q 615 19 629 2 l 292 423 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 731 -137 q 724 -157 729 -145 q 713 -183 719 -170 q 701 -208 707 -197 q 693 -227 696 -220 l 175 -227 l 153 -205 q 160 -185 156 -197 q 171 -159 165 -173 q 183 -134 177 -146 q 191 -116 188 -122 l 710 -116 l 731 -137 "},"":{"x_min":8.8125,"x_max":900.6875,"ha":923,"o":"m 8 49 q 81 66 54 58 q 113 94 107 75 l 368 799 q 388 826 373 814 q 422 848 403 839 q 463 864 442 858 q 500 875 484 870 l 809 94 q 837 65 816 76 q 900 49 857 54 l 900 0 l 554 0 l 554 49 q 626 63 609 53 q 636 92 643 73 l 415 661 l 215 94 q 213 77 211 84 q 226 65 216 70 q 255 56 236 60 q 301 49 273 52 l 301 0 l 8 0 l 8 49 "},"ḹ":{"x_min":-68.5,"x_max":509.34375,"ha":417,"o":"m 36 0 l 36 49 q 83 59 65 54 q 113 69 102 64 q 127 80 123 74 q 132 90 132 85 l 132 858 q 128 905 132 888 q 115 931 125 922 q 88 942 106 939 q 43 949 71 945 l 43 996 q 106 1006 76 1001 q 161 1017 135 1011 q 213 1032 187 1023 q 265 1051 239 1040 l 295 1023 l 295 90 q 299 80 295 85 q 315 69 304 75 q 345 59 326 64 q 391 49 364 54 l 391 0 l 36 0 m 306 -184 q 298 -230 306 -209 q 275 -268 289 -252 q 241 -294 261 -285 q 200 -304 222 -304 q 140 -283 161 -304 q 119 -221 119 -262 q 128 -174 119 -196 q 152 -136 137 -152 q 186 -111 166 -120 q 226 -102 205 -102 q 285 -122 264 -102 q 306 -184 306 -143 m 509 1292 q 502 1272 507 1285 q 491 1246 497 1260 q 479 1221 484 1233 q 471 1203 474 1209 l -46 1203 l -68 1224 q -61 1244 -66 1232 q -50 1270 -56 1256 q -39 1295 -44 1283 q -30 1314 -33 1307 l 487 1314 l 509 1292 "},"¤":{"x_min":68.109375,"x_max":635.546875,"ha":703,"o":"m 248 514 q 215 464 226 492 q 204 407 204 436 q 214 352 204 379 q 246 304 225 326 q 297 270 269 281 q 352 260 324 260 q 408 270 381 260 q 456 303 434 281 q 489 352 478 325 q 500 408 500 379 q 488 464 500 437 q 455 514 477 492 q 407 546 434 535 q 352 557 381 557 q 297 546 324 557 q 248 514 269 535 m 577 124 l 484 216 q 421 186 455 196 q 352 176 388 176 q 283 186 316 176 q 218 218 249 196 l 124 123 l 95 125 q 80 151 88 136 q 68 180 73 165 l 162 274 q 131 338 141 304 q 121 406 121 371 q 131 475 121 441 q 162 540 141 510 l 68 636 l 70 665 q 96 679 82 672 q 125 692 110 686 l 219 597 q 352 642 280 642 q 420 631 387 642 q 483 598 453 620 l 577 692 l 607 692 l 633 634 l 540 541 q 573 475 562 510 q 584 406 584 441 q 573 337 584 371 q 541 273 562 304 l 634 180 l 635 150 l 577 124 "},"Ǣ":{"x_min":0.234375,"x_max":1091.9375,"ha":1122,"o":"m 515 757 q 510 768 515 765 q 498 770 505 772 q 484 763 491 769 q 472 746 477 757 l 371 498 l 515 498 l 515 757 m 1091 205 q 1084 144 1088 176 q 1077 83 1081 112 q 1070 32 1073 54 q 1064 0 1066 10 l 423 0 l 423 49 q 492 70 469 58 q 515 90 515 81 l 515 423 l 342 423 l 209 95 q 216 65 200 75 q 282 49 232 55 l 282 0 l 0 0 l 0 49 q 66 65 42 55 q 98 95 89 76 l 362 748 q 364 767 367 760 q 348 782 361 775 q 314 793 336 788 q 258 805 291 799 l 258 855 l 1022 855 l 1047 833 q 1043 788 1045 815 q 1037 734 1041 762 q 1028 681 1033 706 q 1019 644 1024 656 l 968 644 q 952 740 965 707 q 912 774 939 774 l 685 774 l 685 498 l 954 498 l 977 474 q 964 452 971 464 q 947 426 956 439 q 930 402 938 413 q 915 385 922 391 q 891 402 905 395 q 865 414 878 409 q 843 420 852 418 q 831 423 833 423 l 685 423 l 685 124 q 690 106 685 114 q 710 92 695 98 q 753 84 725 87 q 825 81 780 81 l 889 81 q 943 88 921 81 q 983 112 965 95 q 1014 156 1000 129 q 1042 223 1028 183 l 1091 205 m 952 1075 q 945 1055 950 1068 q 933 1029 940 1043 q 922 1004 927 1016 q 914 986 916 992 l 396 986 l 374 1007 q 381 1027 376 1015 q 392 1053 385 1039 q 403 1078 398 1066 q 412 1097 408 1090 l 930 1097 l 952 1075 "},"Ɨ":{"x_min":21.734375,"x_max":420.296875,"ha":454,"o":"m 395 407 l 305 407 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 407 l 36 407 l 21 423 q 26 436 23 427 q 32 455 29 445 q 39 473 35 465 q 44 488 42 482 l 135 488 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 488 l 403 488 l 420 472 l 395 407 "},"Ĝ":{"x_min":37,"x_max":807.78125,"ha":836,"o":"m 743 805 q 743 793 746 802 q 734 769 740 783 q 718 739 728 756 q 700 708 709 723 q 682 682 691 693 q 667 665 673 670 l 624 674 q 579 729 602 707 q 532 765 557 752 q 481 784 508 778 q 426 790 455 790 q 386 783 409 790 q 339 760 363 776 q 292 716 315 743 q 250 650 268 689 q 220 556 232 610 q 209 432 209 502 q 230 276 209 341 q 286 169 251 211 q 365 107 321 127 q 458 87 410 87 q 525 93 496 87 q 579 112 555 100 l 579 318 q 576 333 579 326 q 562 347 573 340 q 529 361 551 354 q 469 374 507 367 l 469 424 l 807 424 l 807 374 q 755 349 769 365 q 742 318 742 334 l 742 114 q 647 47 691 73 q 566 6 604 21 q 494 -14 528 -8 q 429 -20 460 -20 q 331 -8 379 -20 q 240 25 283 2 q 159 82 196 47 q 94 163 121 116 q 52 267 67 209 q 37 394 37 325 q 72 596 37 507 q 172 747 108 685 q 322 842 236 809 q 510 875 409 875 q 563 870 532 875 q 626 856 594 865 q 690 834 659 847 q 743 805 721 821 m 674 962 q 656 938 666 949 q 635 922 647 927 l 444 1032 l 255 922 q 234 938 244 927 q 215 962 224 949 l 404 1183 l 486 1183 l 674 962 "},"p":{"x_min":33,"x_max":733,"ha":777,"o":"m 580 289 q 566 401 580 354 q 530 477 552 447 q 479 521 508 507 q 422 536 451 536 q 398 533 410 536 q 371 522 386 530 q 335 499 356 514 q 285 460 314 484 l 285 155 q 347 121 320 134 q 393 103 373 109 q 429 95 413 97 q 462 94 445 94 q 510 106 488 94 q 547 144 531 119 q 571 205 563 169 q 580 289 580 242 m 733 339 q 721 250 733 294 q 689 167 709 207 q 642 92 669 127 q 587 33 616 58 q 527 -5 557 8 q 468 -20 496 -20 q 429 -15 449 -20 q 387 -2 409 -11 q 339 21 365 6 q 285 56 314 35 l 285 -234 q 310 -255 285 -245 q 399 -276 335 -266 l 399 -326 l 33 -326 l 33 -276 q 99 -255 77 -265 q 122 -234 122 -245 l 122 467 q 119 508 122 492 q 109 534 117 524 q 83 548 101 544 q 33 554 65 553 l 33 602 q 100 611 71 606 q 152 622 128 616 q 198 634 176 627 q 246 651 220 641 l 274 622 l 281 539 q 350 593 318 572 q 410 628 383 615 q 461 645 438 640 q 504 651 484 651 q 592 632 550 651 q 665 575 633 613 q 714 477 696 536 q 733 339 733 419 "},"S":{"x_min":69.75,"x_max":656,"ha":712,"o":"m 656 255 q 646 193 656 225 q 619 130 637 161 q 573 72 601 100 q 508 24 545 45 q 423 -7 470 4 q 318 -20 376 -20 q 262 -15 294 -20 q 198 -2 231 -10 q 134 18 165 6 q 79 46 102 30 q 73 59 75 47 q 70 89 71 71 q 69 130 69 107 q 71 176 70 152 q 76 221 73 199 q 84 260 79 243 l 132 257 q 169 184 147 217 q 220 127 192 150 q 279 90 247 103 q 345 77 311 77 q 404 85 376 77 q 454 111 433 94 q 489 152 476 127 q 503 209 503 177 q 484 281 503 251 q 436 334 466 311 q 368 377 406 358 q 289 414 329 396 q 211 454 249 433 q 142 502 172 474 q 94 565 112 529 q 76 651 76 601 q 93 722 76 683 q 149 794 111 761 q 245 851 186 828 q 386 875 304 875 q 457 870 422 875 q 523 857 493 865 q 577 837 554 849 q 613 812 600 826 q 614 800 616 809 q 608 778 613 790 q 597 750 604 765 q 582 721 590 735 q 567 697 575 708 q 554 681 560 686 l 510 685 q 475 739 495 717 q 435 773 456 760 q 392 791 414 786 q 351 797 370 797 q 294 788 318 797 q 254 764 270 779 q 232 730 239 749 q 225 693 225 712 q 243 636 225 661 q 292 590 262 611 q 361 550 322 569 q 440 510 399 531 q 519 466 481 490 q 588 413 558 443 q 637 344 618 383 q 656 255 656 306 "},"ễ":{"x_min":44,"x_max":630.734375,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 593 750 q 575 723 585 737 q 554 705 565 710 l 363 856 l 174 705 q 150 723 162 710 q 128 750 138 737 l 318 1013 l 411 1013 l 593 750 m 630 1254 q 600 1193 618 1226 q 560 1132 583 1161 q 511 1085 538 1104 q 452 1065 483 1065 q 396 1076 423 1065 q 345 1101 370 1088 q 295 1125 320 1114 q 244 1136 270 1136 q 217 1131 229 1136 q 193 1116 204 1126 q 171 1092 182 1106 q 147 1058 160 1077 l 96 1077 q 126 1138 109 1105 q 166 1200 143 1171 q 215 1248 188 1229 q 274 1267 242 1267 q 333 1256 305 1267 q 386 1232 361 1245 q 435 1207 412 1219 q 480 1196 458 1196 q 533 1215 510 1196 q 578 1274 555 1234 l 630 1254 "},"/":{"x_min":23.734375,"x_max":637.53125,"ha":661,"o":"m 164 -187 q 142 -198 157 -192 q 110 -209 127 -203 q 77 -219 93 -214 q 53 -227 61 -224 l 23 -205 l 499 1047 q 522 1058 507 1053 q 552 1069 537 1063 q 582 1078 568 1074 q 607 1085 597 1082 l 637 1065 l 164 -187 "},"ⱡ":{"x_min":32.5,"x_max":450.515625,"ha":482,"o":"m 421 393 l 323 393 l 323 90 q 327 80 323 85 q 343 69 332 75 q 373 59 354 64 q 419 49 391 54 l 419 0 l 63 0 l 63 49 q 111 59 92 54 q 141 69 130 64 q 155 79 151 74 q 160 90 160 85 l 160 393 l 47 393 l 32 407 q 37 423 33 413 q 45 443 41 433 q 54 464 50 454 q 61 480 58 474 l 160 480 l 160 570 l 47 570 l 32 584 q 37 600 33 590 q 45 620 41 610 q 54 641 50 631 q 61 657 58 651 l 160 657 l 160 858 q 156 906 160 889 q 143 931 153 923 q 116 943 133 939 q 70 949 98 946 l 70 996 q 133 1006 103 1001 q 189 1017 162 1011 q 241 1032 215 1023 q 293 1051 266 1040 l 323 1023 l 323 657 l 435 657 l 450 640 l 421 570 l 323 570 l 323 480 l 435 480 l 450 463 l 421 393 "},"Ọ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 525 -184 q 517 -230 525 -209 q 494 -268 508 -252 q 461 -294 480 -285 q 419 -304 441 -304 q 359 -283 380 -304 q 338 -221 338 -262 q 347 -174 338 -196 q 371 -136 356 -152 q 405 -111 385 -120 q 445 -102 424 -102 q 504 -122 483 -102 q 525 -184 525 -143 "},"̨":{"x_min":-508,"x_max":-184.875,"ha":0,"o":"m -184 -203 q -224 -238 -201 -221 q -274 -270 -247 -256 q -329 -292 -300 -284 q -387 -301 -358 -301 q -427 -296 -406 -301 q -466 -280 -448 -291 q -496 -250 -484 -269 q -508 -202 -508 -231 q -453 -82 -508 -141 q -288 29 -399 -23 l -233 16 q -290 -37 -268 -13 q -325 -81 -313 -61 q -343 -120 -338 -102 q -349 -154 -349 -137 q -333 -191 -349 -179 q -296 -203 -317 -203 q -256 -193 -279 -203 q -205 -157 -234 -183 l -184 -203 "},"̋":{"x_min":-507.984375,"x_max":-50.1875,"ha":0,"o":"m -448 705 q -477 716 -460 707 q -507 733 -494 725 l -403 1020 q -378 1016 -395 1018 q -344 1012 -362 1015 q -310 1008 -326 1010 q -287 1003 -294 1005 l -267 965 l -448 705 m -231 705 q -260 716 -242 707 q -290 733 -277 725 l -186 1020 q -161 1016 -178 1018 q -127 1012 -145 1015 q -93 1008 -109 1010 q -69 1003 -77 1005 l -50 965 l -231 705 "},"y":{"x_min":-42.046875,"x_max":696.53125,"ha":705,"o":"m 696 581 q 663 572 676 576 q 642 563 650 568 q 629 551 634 558 q 621 535 625 545 l 395 -50 q 332 -178 366 -125 q 260 -266 298 -232 q 181 -317 222 -301 q 96 -334 139 -334 q 45 -329 70 -334 q 1 -317 20 -324 q -30 -302 -18 -310 q -42 -287 -42 -293 q -30 -264 -42 -281 q -3 -227 -18 -247 q 29 -190 12 -207 q 57 -165 46 -172 q 125 -192 91 -187 q 185 -188 160 -197 q 239 -149 210 -179 q 291 -62 267 -120 l 311 -15 l 84 535 q 59 563 76 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 275 574 289 578 q 255 565 261 570 q 249 553 248 560 q 255 535 250 546 l 394 194 l 527 535 q 532 552 531 545 q 528 564 533 559 q 510 573 523 569 q 474 581 497 577 l 474 631 l 696 631 l 696 581 "},"Π":{"x_min":28.40625,"x_max":874.28125,"ha":916,"o":"m 28 0 l 28 49 q 98 70 74 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 28 805 77 795 l 28 855 l 874 855 l 874 805 q 803 784 827 795 q 780 763 780 772 l 780 90 q 802 70 780 82 q 874 49 824 59 l 874 0 l 517 0 l 517 49 q 586 70 563 59 q 610 90 610 81 l 610 731 q 602 747 610 739 q 580 762 595 755 q 545 773 566 769 q 497 778 524 778 l 394 778 q 349 772 368 777 q 317 762 329 768 q 298 747 304 755 q 292 731 292 739 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 28 0 "},"ˊ":{"x_min":0,"x_max":318.09375,"ha":319,"o":"m 59 705 q 44 709 52 705 q 27 717 35 713 q 11 726 18 721 q 0 734 4 730 l 143 1025 q 173 1021 151 1024 q 220 1014 195 1018 q 267 1005 245 1010 q 297 999 290 1001 l 318 962 l 59 705 "},"Ḧ":{"x_min":29.078125,"x_max":907.59375,"ha":949,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 488 l 644 488 l 644 763 q 621 783 644 771 q 551 805 599 795 l 551 855 l 907 855 l 907 805 q 837 784 861 795 q 814 763 814 772 l 814 90 q 836 70 814 82 q 907 49 858 59 l 907 0 l 551 0 l 551 49 q 620 70 597 59 q 644 90 644 81 l 644 407 l 292 407 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 704 1050 q 695 1003 704 1024 q 672 965 687 981 q 638 939 658 949 q 597 930 619 930 q 537 951 558 930 q 517 1012 517 972 q 526 1059 517 1037 q 549 1097 534 1081 q 583 1122 564 1113 q 623 1132 602 1132 q 682 1111 661 1132 q 704 1050 704 1091 m 418 1050 q 409 1003 418 1024 q 386 965 401 981 q 353 939 372 949 q 312 930 333 930 q 252 951 272 930 q 231 1012 231 972 q 240 1059 231 1037 q 263 1097 248 1081 q 297 1122 278 1113 q 337 1132 316 1132 q 397 1111 376 1132 q 418 1050 418 1091 "},"–":{"x_min":35.953125,"x_max":636.171875,"ha":671,"o":"m 636 376 q 630 357 634 368 q 621 335 626 346 q 612 314 616 324 q 604 299 607 304 l 57 299 l 35 320 q 41 338 37 328 q 50 359 45 349 q 59 380 54 370 q 67 397 63 390 l 614 397 l 636 376 "},"ë":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 599 859 q 591 813 599 834 q 568 775 582 791 q 534 749 553 758 q 493 740 514 740 q 433 761 453 740 q 412 822 412 782 q 421 869 412 847 q 445 907 430 891 q 478 932 459 923 q 518 942 497 942 q 578 921 556 942 q 599 859 599 901 m 313 859 q 305 813 313 834 q 282 775 296 791 q 248 749 268 758 q 207 740 229 740 q 147 761 168 740 q 126 822 126 782 q 135 869 126 847 q 159 907 144 891 q 193 932 173 923 q 232 942 212 942 q 292 921 271 942 q 313 859 313 901 "},"ƒ":{"x_min":-213.484375,"x_max":587.71875,"ha":447,"o":"m 587 985 q 574 956 587 974 q 542 921 560 938 q 505 889 523 903 q 477 869 487 874 q 412 928 443 910 q 361 947 381 947 q 323 933 340 947 q 294 888 306 919 q 277 804 283 857 q 271 674 271 752 l 271 631 l 441 631 l 465 606 q 450 584 459 597 q 432 558 441 571 q 413 536 422 546 q 397 523 404 525 q 353 539 382 531 q 271 547 323 547 l 271 66 q 257 -60 271 -7 q 221 -150 243 -112 q 172 -214 199 -188 q 118 -262 145 -241 q 77 -289 99 -276 q 32 -312 55 -302 q -13 -328 9 -322 q -56 -334 -35 -334 q -112 -326 -83 -334 q -162 -309 -140 -319 q -199 -289 -185 -299 q -213 -271 -213 -278 q -200 -248 -213 -264 q -168 -215 -187 -233 q -130 -183 -150 -198 q -96 -161 -110 -167 q -35 -204 -68 -191 q 22 -217 -3 -217 q 57 -207 41 -217 q 83 -171 72 -198 q 101 -96 95 -144 q 108 30 108 -48 l 108 547 l 27 547 l 8 571 l 61 631 l 108 631 l 108 652 q 116 759 108 712 q 140 842 125 806 q 177 906 156 878 q 223 958 198 934 q 273 997 246 980 q 326 1026 300 1015 q 378 1044 353 1038 q 423 1051 403 1051 q 483 1042 454 1051 q 535 1024 512 1034 q 573 1002 559 1013 q 587 985 587 991 "},"ȟ":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 388 q 534 457 539 430 q 521 499 530 483 q 497 521 511 515 q 462 528 482 528 q 381 503 423 528 q 285 433 339 479 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 859 q 120 904 122 888 q 110 928 118 920 q 83 941 101 937 q 33 949 65 945 l 33 996 q 101 1007 70 1002 q 156 1019 131 1013 q 206 1033 182 1025 q 255 1051 230 1040 l 285 1023 l 285 530 q 431 622 363 594 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 m 458 1108 l 365 1108 l 181 1331 q 200 1356 190 1345 q 221 1373 210 1367 l 413 1246 l 601 1373 q 622 1356 613 1367 q 640 1331 632 1345 l 458 1108 "},"Ẏ":{"x_min":-0.46875,"x_max":828.078125,"ha":851,"o":"m 233 0 l 233 49 q 284 62 264 55 q 317 75 305 69 q 334 87 329 81 q 340 98 340 93 l 340 358 q 285 470 315 412 q 223 581 254 527 q 162 681 192 635 q 108 759 132 727 q 95 773 102 766 q 77 783 89 779 q 48 789 66 787 q 2 792 30 792 l 0 841 q 44 848 19 844 q 95 854 70 851 q 142 858 120 856 q 178 861 164 861 q 216 852 197 861 q 247 829 235 844 q 299 752 272 795 q 355 660 327 709 q 410 560 383 611 q 461 460 437 509 l 619 760 q 613 788 630 778 q 544 805 596 798 l 544 855 l 828 855 l 828 805 q 759 787 781 796 q 727 760 737 777 l 510 354 l 510 98 q 514 88 510 94 q 531 76 519 82 q 564 62 543 69 q 617 49 585 55 l 617 0 l 233 0 m 518 1050 q 510 1003 518 1024 q 487 965 501 981 q 453 939 472 949 q 412 930 434 930 q 352 951 373 930 q 331 1012 331 972 q 340 1059 331 1037 q 363 1097 349 1081 q 397 1122 378 1113 q 438 1132 417 1132 q 497 1111 476 1132 q 518 1050 518 1091 "},"J":{"x_min":-180.109375,"x_max":422.59375,"ha":465,"o":"m 422 805 q 352 784 376 795 q 329 763 329 772 l 329 123 q 314 -4 329 49 q 275 -96 299 -57 q 223 -162 252 -135 q 168 -211 195 -189 q 127 -239 150 -226 q 80 -262 104 -252 q 30 -278 55 -272 q -17 -284 5 -284 q -77 -276 -47 -284 q -128 -259 -106 -269 q -165 -238 -151 -249 q -180 -219 -180 -227 q -165 -195 -180 -212 q -132 -161 -151 -178 q -94 -128 -113 -143 q -66 -110 -75 -114 q 4 -156 -28 -143 q 62 -170 36 -170 q 96 -161 79 -170 q 128 -127 114 -153 q 150 -53 142 -101 q 159 75 159 -5 l 159 763 q 154 772 159 767 q 136 782 150 776 q 97 793 122 787 q 32 805 72 799 l 32 855 l 422 855 l 422 805 "},"ŷ":{"x_min":-42.046875,"x_max":696.53125,"ha":705,"o":"m 696 581 q 663 572 676 576 q 642 563 650 568 q 629 551 634 558 q 621 535 625 545 l 395 -50 q 332 -178 366 -125 q 260 -266 298 -232 q 181 -317 222 -301 q 96 -334 139 -334 q 45 -329 70 -334 q 1 -317 20 -324 q -30 -302 -18 -310 q -42 -287 -42 -293 q -30 -264 -42 -281 q -3 -227 -18 -247 q 29 -190 12 -207 q 57 -165 46 -172 q 125 -192 91 -187 q 185 -188 160 -197 q 239 -149 210 -179 q 291 -62 267 -120 l 311 -15 l 84 535 q 59 563 76 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 275 574 289 578 q 255 565 261 570 q 249 553 248 560 q 255 535 250 546 l 394 194 l 527 535 q 532 552 531 545 q 528 564 533 559 q 510 573 523 569 q 474 581 497 577 l 474 631 l 696 631 l 696 581 m 598 750 q 580 723 590 737 q 559 705 571 710 l 368 856 l 179 705 q 155 723 168 710 q 134 750 143 737 l 323 1013 l 416 1013 l 598 750 "},"ŕ":{"x_min":32.5625,"x_max":597.515625,"ha":617,"o":"m 593 621 q 597 604 597 618 q 594 568 597 589 q 585 521 591 547 q 574 471 580 496 q 561 426 568 447 q 549 393 554 405 l 499 393 q 491 444 497 420 q 476 487 485 469 q 454 515 467 504 q 424 526 440 526 q 395 520 411 526 q 361 501 379 515 q 324 459 343 486 q 284 387 305 432 l 284 90 q 313 69 284 80 q 404 49 341 59 l 404 0 l 32 0 l 32 49 q 122 90 122 69 l 122 450 q 120 487 122 472 q 117 512 119 503 q 112 527 115 522 q 106 536 109 533 q 96 544 101 541 q 83 549 91 547 q 63 552 75 551 q 32 554 51 553 l 32 602 q 97 612 69 607 q 148 622 124 617 q 194 634 172 627 q 246 651 217 641 l 274 622 l 283 524 q 324 573 301 550 q 374 614 347 596 q 428 641 400 631 q 486 651 457 651 q 540 643 512 651 q 593 621 568 635 m 300 705 q 285 709 294 705 q 268 717 277 713 q 252 726 259 721 q 241 734 245 730 l 384 1025 q 414 1021 392 1024 q 461 1014 436 1018 q 509 1005 486 1010 q 539 999 531 1001 l 559 962 l 300 705 "},"ṝ":{"x_min":32.5625,"x_max":636.859375,"ha":617,"o":"m 593 621 q 597 604 597 618 q 594 568 597 589 q 585 521 591 547 q 574 471 580 496 q 561 426 568 447 q 549 393 554 405 l 499 393 q 491 444 497 420 q 476 487 485 469 q 454 515 467 504 q 424 526 440 526 q 395 520 411 526 q 361 501 379 515 q 324 459 343 486 q 284 387 305 432 l 284 90 q 313 69 284 80 q 404 49 341 59 l 404 0 l 32 0 l 32 49 q 122 90 122 69 l 122 450 q 120 487 122 472 q 117 512 119 503 q 112 527 115 522 q 106 536 109 533 q 96 544 101 541 q 83 549 91 547 q 63 552 75 551 q 32 554 51 553 l 32 602 q 97 612 69 607 q 148 622 124 617 q 194 634 172 627 q 246 651 217 641 l 274 622 l 283 524 q 324 573 301 550 q 374 614 347 596 q 428 641 400 631 q 486 651 457 651 q 540 643 512 651 q 593 621 568 635 m 293 -184 q 284 -230 293 -209 q 262 -268 276 -252 q 228 -294 247 -285 q 187 -304 209 -304 q 127 -283 147 -304 q 106 -221 106 -262 q 115 -174 106 -196 q 138 -136 124 -152 q 172 -111 153 -120 q 213 -102 192 -102 q 272 -122 251 -102 q 293 -184 293 -143 m 636 886 q 629 866 634 879 q 618 840 624 854 q 607 815 612 826 q 598 797 601 803 l 80 797 l 59 818 q 65 838 61 826 q 76 864 70 850 q 88 889 82 877 q 96 908 93 901 l 615 908 l 636 886 "},"˘":{"x_min":6.78125,"x_max":488.328125,"ha":495,"o":"m 488 927 q 440 833 467 872 q 382 769 413 794 q 317 732 351 744 q 248 721 283 721 q 176 732 211 721 q 110 769 141 744 q 53 833 80 794 q 6 927 27 872 q 17 940 10 933 q 30 953 23 947 q 45 965 37 960 q 58 973 52 970 q 98 919 75 941 q 146 881 120 896 q 197 858 171 865 q 246 851 223 851 q 296 858 269 851 q 348 880 322 865 q 397 918 374 895 q 437 973 420 941 q 450 965 443 970 q 464 953 457 960 q 478 940 472 947 q 488 927 484 933 "},"ẋ":{"x_min":8.8125,"x_max":714.84375,"ha":724,"o":"m 381 0 l 381 50 q 412 53 398 51 q 433 61 425 56 q 439 78 440 67 q 425 106 438 88 l 326 244 l 219 106 q 206 78 206 89 q 215 62 206 68 q 239 54 224 56 q 270 50 254 51 l 270 0 l 8 0 l 8 49 q 51 59 33 53 q 82 73 69 65 q 103 91 94 82 q 120 110 112 100 l 277 312 l 126 522 q 108 544 117 534 q 87 562 99 554 q 58 574 75 569 q 16 581 41 578 l 16 631 l 352 631 l 352 581 q 318 575 330 578 q 300 566 305 572 q 299 550 295 560 q 314 524 302 540 l 389 417 l 472 524 q 488 550 484 540 q 487 566 492 560 q 470 575 482 572 q 436 581 457 578 l 436 631 l 695 631 l 695 581 q 648 574 667 578 q 615 562 629 569 q 592 544 602 554 q 572 522 581 534 l 438 350 l 611 110 q 627 91 618 100 q 648 73 636 81 q 676 59 659 65 q 714 50 692 52 l 714 0 l 381 0 m 454 859 q 446 813 454 834 q 423 775 437 791 q 389 749 409 758 q 348 740 370 740 q 288 761 309 740 q 267 822 267 782 q 276 869 267 847 q 300 907 285 891 q 334 932 314 923 q 374 942 353 942 q 433 921 412 942 q 454 859 454 901 "},"D":{"x_min":20.265625,"x_max":828,"ha":884,"o":"m 828 458 q 810 306 828 373 q 763 188 793 240 q 693 102 733 137 q 608 43 653 66 q 514 10 562 21 q 419 0 465 0 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 784 l 29 771 l 20 834 q 99 849 53 842 q 195 863 145 857 q 296 871 246 868 q 391 875 347 875 q 577 846 495 875 q 714 765 658 818 q 798 634 769 711 q 828 458 828 556 m 343 803 q 318 802 331 803 q 292 802 305 802 l 292 113 q 293 104 292 108 q 300 90 295 96 q 317 81 305 85 q 347 75 328 77 q 394 73 366 73 q 449 81 420 73 q 506 109 477 90 q 559 157 534 128 q 603 226 585 186 q 634 317 622 266 q 646 432 646 368 q 626 591 646 522 q 568 707 606 660 q 473 778 530 754 q 343 803 417 803 "},"ĺ":{"x_min":36,"x_max":452.375,"ha":417,"o":"m 36 0 l 36 49 q 83 59 65 54 q 113 69 102 64 q 127 80 123 74 q 132 90 132 85 l 132 858 q 128 905 132 888 q 115 931 125 922 q 88 942 106 939 q 43 949 71 945 l 43 996 q 106 1006 76 1001 q 161 1017 135 1011 q 213 1032 187 1023 q 265 1051 239 1040 l 295 1023 l 295 90 q 299 80 295 85 q 315 69 304 75 q 345 59 326 64 q 391 49 364 54 l 391 0 l 36 0 m 124 1139 q 100 1158 112 1144 q 78 1184 87 1171 l 325 1415 q 360 1395 341 1406 q 396 1374 379 1384 q 427 1354 413 1363 q 446 1339 440 1344 l 452 1303 l 124 1139 "},"ł":{"x_min":24.03125,"x_max":427.046875,"ha":441,"o":"m 47 0 l 47 49 q 95 59 76 54 q 125 69 114 64 q 139 80 135 74 q 144 90 144 85 l 144 418 l 41 347 l 24 361 q 28 386 25 372 q 36 415 32 400 q 45 442 40 429 q 54 464 50 455 l 144 526 l 144 864 q 140 911 144 894 q 127 937 137 928 q 100 948 117 945 q 54 955 82 951 l 54 1002 q 117 1012 87 1007 q 173 1023 146 1017 q 225 1038 199 1029 q 277 1057 250 1046 l 307 1028 l 307 639 l 410 712 l 427 696 q 421 671 425 685 q 413 643 418 657 q 404 616 409 629 q 395 594 399 603 l 307 532 l 307 90 q 311 80 307 85 q 327 69 316 75 q 357 59 338 64 q 403 49 375 54 l 403 0 l 47 0 "},"":{"x_min":86.8125,"x_max":293,"ha":393,"o":"m 236 472 q 219 466 230 469 q 196 462 208 464 q 170 459 183 460 q 150 458 158 458 l 86 1014 q 105 1022 91 1016 q 135 1033 118 1027 q 172 1045 153 1039 q 209 1057 191 1052 q 239 1067 226 1063 q 257 1072 252 1071 l 293 1051 l 236 472 "},"$":{"x_min":52.171875,"x_max":645,"ha":702,"o":"m 193 645 q 201 606 193 623 q 226 576 210 589 q 262 551 241 562 q 309 529 283 540 l 309 740 q 259 729 281 738 q 223 708 238 721 q 200 679 208 695 q 193 645 193 662 m 503 215 q 494 262 503 241 q 470 300 486 283 q 435 330 455 316 q 390 354 414 343 l 390 93 q 432 106 412 97 q 468 130 452 115 q 493 166 484 145 q 503 215 503 187 m 390 -86 q 363 -105 377 -97 q 331 -118 348 -113 l 309 -98 l 309 -6 q 184 17 251 -4 q 59 75 118 38 q 54 89 56 77 q 52 120 52 102 q 52 160 51 138 q 54 204 53 182 q 58 245 56 225 q 64 276 61 264 l 114 274 q 149 209 130 239 q 193 156 169 179 q 245 118 217 133 q 309 95 274 102 l 309 386 q 218 419 263 402 q 136 462 172 436 q 78 523 100 487 q 56 613 56 559 q 68 676 56 642 q 110 739 80 709 q 187 792 139 770 q 309 820 236 814 l 309 909 q 324 919 318 915 q 337 927 331 924 q 350 933 343 930 q 367 939 356 936 l 390 919 l 390 822 q 460 813 425 820 q 526 797 495 807 q 580 776 556 788 q 616 752 604 764 q 615 727 620 747 q 600 682 610 706 q 579 636 591 658 q 559 605 568 614 l 512 611 q 460 689 489 658 q 390 733 430 719 l 390 500 q 480 464 435 483 q 563 416 526 445 q 622 348 599 388 q 645 251 645 308 q 630 169 645 210 q 585 92 616 128 q 506 32 555 57 q 390 -1 458 6 l 390 -86 "},"w":{"x_min":8.8125,"x_max":986.8125,"ha":996,"o":"m 986 581 q 955 572 967 576 q 936 563 944 567 q 925 553 929 559 q 918 539 921 547 l 769 40 q 752 14 765 25 q 724 -2 739 4 q 694 -13 709 -9 q 671 -20 680 -17 l 498 376 l 360 40 q 343 14 355 24 q 316 -3 330 3 q 288 -14 302 -10 q 265 -20 274 -17 l 82 539 q 60 562 78 551 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 270 573 286 578 q 247 563 254 569 q 239 551 240 557 q 241 539 239 545 l 343 219 l 505 631 l 557 631 l 727 219 l 825 539 q 827 553 828 546 q 821 564 827 559 q 802 573 815 569 q 766 581 789 577 l 766 631 l 986 631 l 986 581 "},"":{"x_min":21.625,"x_max":691.46875,"ha":707,"o":"m 691 205 q 685 144 688 176 q 677 83 681 112 q 670 32 673 54 q 663 0 666 10 l 29 0 l 29 49 q 98 70 75 59 q 122 91 122 81 l 122 364 l 36 364 l 21 380 q 26 393 22 384 q 32 412 29 402 q 38 430 35 422 q 44 445 41 439 l 122 445 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 445 l 492 445 l 509 429 l 485 364 l 292 364 l 292 131 q 297 109 292 119 q 317 94 303 100 q 356 84 332 87 q 418 81 380 81 l 494 81 q 547 88 525 81 q 584 112 568 95 q 614 156 601 129 q 641 223 627 183 l 691 205 "},"Ç":{"x_min":37,"x_max":726.078125,"ha":775,"o":"m 545 -155 q 526 -204 545 -180 q 475 -247 508 -227 q 398 -281 443 -267 q 300 -301 353 -295 l 275 -252 q 359 -224 334 -244 q 385 -182 385 -204 q 369 -149 385 -159 q 323 -136 353 -139 l 325 -134 q 333 -117 328 -131 q 349 -73 339 -102 q 368 -18 357 -52 q 263 8 315 -14 q 148 90 199 36 q 67 221 98 143 q 37 397 37 299 q 70 594 37 506 q 162 745 103 682 q 299 841 220 807 q 468 875 377 875 q 541 869 505 875 q 609 854 577 864 q 669 833 642 845 q 713 806 695 821 q 713 794 716 804 q 704 770 710 784 q 689 739 698 755 q 672 707 681 722 q 655 679 663 692 q 642 662 647 667 l 598 671 q 519 758 563 731 q 421 785 474 785 q 374 777 398 785 q 325 753 349 770 q 280 708 301 736 q 243 641 259 681 q 218 547 227 601 q 209 422 209 492 q 231 273 209 335 q 290 170 254 210 q 371 110 326 130 q 461 91 416 91 q 504 95 479 91 q 558 110 529 99 q 621 140 588 122 q 690 189 654 159 q 699 179 694 186 q 710 165 705 172 q 719 151 715 157 q 726 143 724 145 q 640 67 682 98 q 557 16 598 36 q 475 -11 515 -2 q 451 -15 463 -14 l 434 -60 q 516 -93 487 -69 q 545 -155 545 -116 "},"Ŝ":{"x_min":69.75,"x_max":656,"ha":712,"o":"m 656 255 q 646 193 656 225 q 619 130 637 161 q 573 72 601 100 q 508 24 545 45 q 423 -7 470 4 q 318 -20 376 -20 q 262 -15 294 -20 q 198 -2 231 -10 q 134 18 165 6 q 79 46 102 30 q 73 59 75 47 q 70 89 71 71 q 69 130 69 107 q 71 176 70 152 q 76 221 73 199 q 84 260 79 243 l 132 257 q 169 184 147 217 q 220 127 192 150 q 279 90 247 103 q 345 77 311 77 q 404 85 376 77 q 454 111 433 94 q 489 152 476 127 q 503 209 503 177 q 484 281 503 251 q 436 334 466 311 q 368 377 406 358 q 289 414 329 396 q 211 454 249 433 q 142 502 172 474 q 94 565 112 529 q 76 651 76 601 q 93 722 76 683 q 149 794 111 761 q 245 851 186 828 q 386 875 304 875 q 457 870 422 875 q 523 857 493 865 q 577 837 554 849 q 613 812 600 826 q 614 800 616 809 q 608 778 613 790 q 597 750 604 765 q 582 721 590 735 q 567 697 575 708 q 554 681 560 686 l 510 685 q 475 739 495 717 q 435 773 456 760 q 392 791 414 786 q 351 797 370 797 q 294 788 318 797 q 254 764 270 779 q 232 730 239 749 q 225 693 225 712 q 243 636 225 661 q 292 590 262 611 q 361 550 322 569 q 440 510 399 531 q 519 466 481 490 q 588 413 558 443 q 637 344 618 383 q 656 255 656 306 m 592 962 q 574 938 583 949 q 552 922 564 927 l 362 1032 l 172 922 q 151 938 161 927 q 132 962 141 949 l 321 1183 l 404 1183 l 592 962 "},"C":{"x_min":37,"x_max":726.484375,"ha":775,"o":"m 726 143 q 641 68 683 99 q 557 17 598 37 q 476 -11 516 -2 q 397 -20 436 -20 q 264 8 329 -20 q 148 90 199 36 q 67 221 98 144 q 37 397 37 299 q 70 594 37 506 q 162 745 103 682 q 299 841 220 807 q 468 875 377 875 q 541 869 505 875 q 609 854 577 864 q 669 833 642 845 q 713 806 695 821 q 713 794 716 804 q 704 770 710 784 q 689 739 698 755 q 672 707 681 722 q 655 679 663 692 q 642 662 647 667 l 598 671 q 519 758 563 731 q 421 785 474 785 q 374 777 398 785 q 325 753 349 770 q 280 708 301 736 q 243 641 259 681 q 218 547 227 601 q 209 422 209 493 q 231 273 209 335 q 290 170 254 211 q 372 111 327 130 q 461 92 417 92 q 505 96 480 92 q 559 111 529 100 q 622 141 588 122 q 691 189 655 159 q 700 180 694 186 q 710 165 705 173 q 720 152 715 158 q 726 143 724 145 "},"Ḯ":{"x_min":-16.296875,"x_max":459.15625,"ha":454,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 m 456 1050 q 448 1003 456 1024 q 425 965 439 981 q 391 939 410 949 q 349 930 371 930 q 290 951 310 930 q 269 1012 269 972 q 278 1059 269 1037 q 302 1097 287 1081 q 335 1122 316 1113 q 375 1132 354 1132 q 435 1111 413 1132 q 456 1050 456 1091 m 170 1050 q 162 1003 170 1024 q 139 965 153 981 q 105 939 125 949 q 64 930 86 930 q 4 951 25 930 q -16 1012 -16 972 q -7 1059 -16 1037 q 16 1097 1 1081 q 50 1122 30 1113 q 89 1132 69 1132 q 149 1111 128 1132 q 170 1050 170 1091 m 130 1144 q 106 1163 119 1149 q 84 1189 94 1177 l 332 1420 q 366 1401 347 1412 q 403 1379 385 1389 q 434 1359 420 1368 q 453 1344 447 1349 l 459 1309 l 130 1144 "},"̉":{"x_min":-485.15625,"x_max":-217,"ha":0,"o":"m -217 904 q -228 871 -217 885 q -257 844 -240 856 q -289 820 -273 831 q -314 797 -306 809 q -318 772 -322 785 q -291 742 -315 759 q -305 735 -296 738 q -322 728 -313 731 q -340 723 -331 725 q -353 721 -348 721 q -413 756 -398 740 q -424 787 -428 773 q -403 813 -420 801 q -367 838 -386 826 q -333 864 -348 851 q -319 894 -319 878 q -326 926 -319 917 q -348 936 -334 936 q -371 925 -362 936 q -380 904 -380 915 q -372 885 -380 896 q -416 870 -389 877 q -475 860 -443 863 l -483 867 q -485 881 -485 873 q -471 920 -485 900 q -437 954 -458 939 q -386 979 -415 970 q -326 989 -357 989 q -276 982 -297 989 q -242 963 -255 975 q -223 936 -229 951 q -217 904 -217 921 "},"ɫ":{"x_min":0.171875,"x_max":534.15625,"ha":534,"o":"m 534 617 q 504 556 521 589 q 464 495 486 524 q 414 447 441 467 q 356 428 387 428 l 349 428 l 349 90 q 353 80 349 85 q 369 69 358 75 q 399 59 380 64 q 445 49 417 54 l 445 0 l 89 0 l 89 49 q 137 59 118 54 q 167 69 156 64 q 181 79 177 74 q 186 90 186 85 l 186 492 q 167 497 176 495 q 148 499 158 499 q 120 493 133 499 q 96 479 108 488 q 74 454 85 469 q 51 421 63 440 l 0 440 q 30 501 12 467 q 70 563 47 534 q 119 611 92 592 q 177 631 146 631 q 181 631 179 631 q 186 631 183 631 l 186 858 q 182 906 186 889 q 169 931 179 922 q 142 942 159 939 q 96 949 124 946 l 96 996 q 159 1006 129 1001 q 215 1017 188 1011 q 267 1032 241 1023 q 319 1051 292 1040 l 349 1023 l 349 566 q 384 560 367 560 q 436 579 414 560 q 482 638 459 597 l 534 617 "},"Ẻ":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 497 1121 q 485 1088 497 1102 q 457 1061 473 1073 q 424 1037 440 1048 q 400 1014 408 1026 q 395 989 391 1002 q 422 959 398 976 q 409 952 417 955 q 391 945 400 948 q 373 940 382 942 q 360 938 365 938 q 300 973 315 957 q 290 1004 285 990 q 310 1030 294 1018 q 346 1055 327 1043 q 380 1081 365 1068 q 395 1111 395 1095 q 387 1143 395 1134 q 365 1153 379 1153 q 342 1142 351 1153 q 334 1121 334 1132 q 341 1102 334 1113 q 297 1087 324 1094 q 238 1077 270 1080 l 231 1084 q 229 1098 229 1090 q 242 1137 229 1117 q 277 1171 255 1156 q 327 1196 298 1187 q 387 1206 356 1206 q 437 1199 416 1206 q 471 1180 458 1192 q 491 1153 484 1168 q 497 1121 497 1138 "},"È":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 493 962 q 474 938 484 949 q 453 922 464 927 l 128 1080 l 134 1123 q 154 1139 139 1128 q 188 1162 170 1150 q 222 1183 206 1173 q 246 1198 238 1193 l 493 962 "},"fi":{"x_min":25.296875,"x_max":856.203125,"ha":889,"o":"m 514 0 l 514 49 q 581 70 559 59 q 603 90 603 81 l 603 439 q 602 495 603 474 q 593 528 601 517 q 567 546 586 540 q 514 555 549 551 l 514 602 q 624 622 572 610 q 722 651 676 634 l 766 651 l 766 90 q 786 70 766 82 q 856 49 806 59 l 856 0 l 514 0 m 792 855 q 783 813 792 832 q 759 780 774 794 q 723 759 743 766 q 677 752 702 752 q 642 756 658 752 q 612 770 625 760 q 592 793 599 779 q 585 827 585 807 q 593 869 585 850 q 617 901 602 888 q 653 922 633 915 q 698 930 674 930 q 733 925 716 930 q 763 912 750 921 q 784 888 776 902 q 792 855 792 874 m 604 985 q 597 968 604 978 q 580 945 591 957 q 557 921 570 933 q 532 899 545 909 q 509 881 520 889 q 492 870 498 873 q 429 928 459 910 q 376 946 398 946 q 343 935 359 946 q 315 895 327 924 q 295 817 302 867 q 288 689 288 767 l 288 631 l 456 631 l 481 606 q 466 582 475 595 q 448 558 457 569 q 430 536 439 546 q 415 522 421 527 q 371 538 399 530 q 288 546 342 546 l 288 89 q 294 81 288 85 q 316 72 300 77 q 358 62 332 68 q 425 49 384 57 l 425 0 l 35 0 l 35 49 q 103 69 82 57 q 125 89 125 81 l 125 546 l 44 546 l 25 570 l 78 631 l 125 631 l 125 652 q 132 752 125 707 q 155 835 140 798 q 191 902 169 872 q 239 958 212 932 q 291 999 264 982 q 344 1028 318 1017 q 395 1045 370 1040 q 440 1051 420 1051 q 500 1042 471 1051 q 552 1024 530 1034 q 589 1002 575 1013 q 604 985 604 992 "},"":{"x_min":0,"x_max":317.40625,"ha":317,"o":"m 317 736 q 305 727 313 732 q 289 718 298 722 q 273 710 281 713 q 259 705 265 707 l 0 960 l 19 998 q 47 1004 26 1000 q 92 1013 68 1008 q 139 1020 117 1017 q 169 1025 161 1024 l 317 736 "},"X":{"x_min":16.28125,"x_max":859.3125,"ha":875,"o":"m 497 0 l 497 50 q 545 57 526 52 q 571 67 563 61 q 578 83 579 74 q 568 106 577 93 l 408 339 l 254 106 q 241 82 244 92 q 246 65 239 72 q 271 55 253 59 q 321 50 290 52 l 321 0 l 16 0 l 16 50 q 90 66 60 53 q 139 106 121 79 l 349 426 l 128 748 q 109 772 118 762 q 87 788 99 781 q 60 797 75 794 q 23 805 45 801 l 23 855 l 389 855 l 389 805 q 314 788 332 799 q 317 748 297 777 l 457 542 l 587 748 q 598 773 596 763 q 592 789 600 783 q 567 799 585 796 q 518 805 549 802 l 518 855 l 826 855 l 826 805 q 782 798 801 802 q 748 787 763 794 q 721 771 733 781 q 701 748 710 762 l 516 458 l 756 106 q 776 82 767 92 q 798 66 786 73 q 824 56 809 60 q 859 50 839 52 l 859 0 l 497 0 "},"ô":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 609 750 q 591 723 600 737 q 569 705 581 710 l 379 856 l 189 705 q 166 723 178 710 q 144 750 153 737 l 333 1013 l 426 1013 l 609 750 "},"ṹ":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 658 933 q 628 873 646 905 q 588 811 611 840 q 538 764 566 783 q 480 745 511 745 q 424 756 451 745 q 373 780 398 767 q 323 804 347 793 q 272 816 298 816 q 244 810 257 816 q 221 795 232 805 q 199 771 210 786 q 175 738 187 756 l 124 756 q 154 817 137 784 q 193 879 171 850 q 243 927 216 908 q 301 947 270 947 q 361 935 333 947 q 414 911 389 924 q 463 887 440 898 q 507 876 486 876 q 560 894 538 876 q 606 954 583 913 l 658 933 m 356 969 q 342 973 350 970 q 324 982 333 977 q 308 990 316 986 q 297 998 301 995 l 440 1289 q 471 1285 448 1288 q 518 1278 493 1282 q 565 1270 543 1274 q 595 1263 588 1265 l 615 1227 l 356 969 "},"":{"x_min":37,"x_max":563,"ha":607,"o":"m 101 0 l 101 49 q 186 69 160 59 q 212 90 212 79 l 212 175 q 225 241 212 214 q 259 287 239 267 q 303 324 279 307 q 347 358 327 340 q 381 397 367 375 q 395 449 395 418 q 386 503 395 480 q 362 541 377 526 q 329 563 348 556 q 290 571 310 571 q 260 564 275 571 q 234 546 246 558 q 216 517 223 534 q 209 478 209 499 q 211 456 209 469 q 219 434 213 444 q 185 421 206 427 q 142 408 165 414 q 97 399 120 403 q 58 393 75 394 l 40 413 q 37 428 38 421 q 37 441 37 436 q 60 526 37 488 q 125 592 84 564 q 221 635 166 620 q 339 651 276 651 q 436 638 394 651 q 506 605 478 626 q 548 554 534 583 q 563 490 563 524 q 549 427 563 453 q 513 382 535 402 q 468 345 492 362 q 423 310 444 328 q 387 268 401 291 q 374 212 374 245 l 374 90 q 401 69 374 80 q 483 49 428 59 l 483 0 l 101 0 "},"Ė":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 456 1050 q 448 1003 456 1024 q 425 965 439 981 q 391 939 411 949 q 350 930 372 930 q 290 951 311 930 q 269 1012 269 972 q 278 1059 269 1037 q 302 1097 287 1081 q 336 1122 316 1113 q 376 1132 355 1132 q 435 1111 414 1132 q 456 1050 456 1091 "},"ấ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 579 750 q 561 723 571 737 q 539 705 551 710 l 349 856 l 160 705 q 136 723 148 710 q 114 750 124 737 l 303 1013 l 396 1013 l 579 750 m 308 1025 q 294 1030 302 1026 q 276 1038 285 1033 q 260 1047 267 1042 q 249 1054 253 1051 l 392 1345 q 422 1342 400 1345 q 470 1334 444 1339 q 517 1326 495 1330 q 547 1320 539 1322 l 567 1283 l 308 1025 "},"ŋ":{"x_min":33,"x_max":702,"ha":780,"o":"m 702 75 q 691 -45 702 4 q 660 -133 680 -95 q 612 -198 640 -170 q 552 -252 585 -226 q 510 -281 534 -266 q 459 -307 486 -296 q 402 -326 432 -319 q 340 -334 372 -334 q 271 -325 305 -334 q 211 -305 237 -317 q 167 -280 184 -293 q 150 -256 150 -266 q 166 -230 150 -248 q 204 -192 182 -212 q 249 -156 227 -173 q 282 -135 271 -139 q 317 -169 298 -153 q 355 -197 336 -185 q 392 -216 374 -209 q 425 -224 410 -224 q 457 -216 438 -224 q 495 -183 477 -209 q 526 -109 513 -158 q 539 24 539 -59 l 539 398 q 535 460 539 436 q 523 500 531 485 q 501 520 515 514 q 467 527 488 527 q 433 522 451 527 q 393 508 415 518 q 344 479 371 497 q 285 433 317 461 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 467 q 119 511 122 495 q 109 535 117 527 q 82 547 100 544 q 33 554 64 550 l 33 603 q 85 608 56 604 q 143 619 114 613 q 200 634 173 626 q 246 652 227 642 l 275 623 l 282 525 q 430 621 361 592 q 552 651 499 651 q 612 639 585 651 q 660 607 640 628 q 690 556 679 586 q 702 487 702 525 l 702 75 "},"Ỵ":{"x_min":-0.46875,"x_max":828.078125,"ha":851,"o":"m 233 0 l 233 49 q 284 62 264 55 q 317 75 305 69 q 334 87 329 81 q 340 98 340 93 l 340 358 q 285 470 315 412 q 223 581 254 527 q 162 681 192 635 q 108 759 132 727 q 95 773 102 766 q 77 783 89 779 q 48 789 66 787 q 2 792 30 792 l 0 841 q 44 848 19 844 q 95 854 70 851 q 142 858 120 856 q 178 861 164 861 q 216 852 197 861 q 247 829 235 844 q 299 752 272 795 q 355 660 327 709 q 410 560 383 611 q 461 460 437 509 l 619 760 q 613 788 630 778 q 544 805 596 798 l 544 855 l 828 855 l 828 805 q 759 787 781 796 q 727 760 737 777 l 510 354 l 510 98 q 514 88 510 94 q 531 76 519 82 q 564 62 543 69 q 617 49 585 55 l 617 0 l 233 0 m 518 -184 q 510 -230 518 -209 q 487 -268 501 -252 q 453 -294 472 -285 q 412 -304 434 -304 q 352 -283 373 -304 q 331 -221 331 -262 q 340 -174 331 -196 q 363 -136 349 -152 q 397 -111 378 -120 q 438 -102 417 -102 q 497 -122 476 -102 q 518 -184 518 -143 "},"":{"x_min":21.625,"x_max":691.46875,"ha":707,"o":"m 691 205 q 685 144 688 176 q 677 83 681 112 q 670 32 673 54 q 663 0 666 10 l 29 0 l 29 49 q 98 70 75 59 q 122 91 122 81 l 122 297 l 36 297 l 21 313 q 26 326 22 317 q 32 345 29 335 q 38 363 35 355 q 44 378 41 372 l 122 378 l 122 458 l 36 458 l 21 474 q 26 487 22 478 q 32 506 29 496 q 38 524 35 516 q 44 539 41 533 l 122 539 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 539 l 492 539 l 509 523 l 485 458 l 292 458 l 292 378 l 492 378 l 509 362 l 485 297 l 292 297 l 292 131 q 297 109 292 119 q 317 94 303 100 q 356 84 332 87 q 418 81 380 81 l 494 81 q 547 88 525 81 q 584 112 568 95 q 614 156 601 129 q 641 223 627 183 l 691 205 "},"ṇ":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 399 q 535 461 539 436 q 523 500 531 485 q 501 521 515 515 q 467 528 488 528 q 433 523 451 528 q 393 508 415 519 q 344 479 371 498 q 285 433 317 461 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 467 q 120 509 122 493 q 111 533 119 524 q 85 546 103 542 q 33 554 67 550 l 33 602 q 93 610 65 605 q 147 620 121 615 q 197 634 173 626 q 246 651 221 641 l 274 622 l 282 524 q 430 621 361 592 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 m 504 -184 q 496 -230 504 -209 q 473 -268 487 -252 q 440 -294 459 -285 q 398 -304 420 -304 q 338 -283 359 -304 q 317 -221 317 -262 q 326 -174 317 -196 q 350 -136 335 -152 q 384 -111 364 -120 q 424 -102 403 -102 q 483 -122 462 -102 q 504 -184 504 -143 "},"Ǟ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 665 1050 q 657 1003 665 1024 q 633 965 648 981 q 599 939 619 949 q 558 930 580 930 q 498 951 519 930 q 478 1012 478 972 q 487 1059 478 1037 q 510 1097 496 1081 q 544 1122 525 1113 q 584 1132 563 1132 q 644 1111 622 1132 q 665 1050 665 1091 m 379 1050 q 371 1003 379 1024 q 348 965 362 981 q 314 939 334 949 q 273 930 295 930 q 213 951 234 930 q 192 1012 192 972 q 201 1059 192 1037 q 224 1097 210 1081 q 258 1122 239 1113 q 298 1132 278 1132 q 358 1111 337 1132 q 379 1050 379 1091 m 725 1298 q 717 1278 722 1290 q 706 1252 712 1265 q 695 1226 700 1238 q 687 1208 689 1214 l 168 1208 l 147 1230 q 153 1250 149 1237 q 164 1275 158 1262 q 176 1300 170 1288 q 185 1319 181 1312 l 703 1319 l 725 1298 "},"ü":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 627 859 q 619 813 627 834 q 596 775 610 791 q 562 749 581 758 q 520 740 542 740 q 461 761 481 740 q 440 822 440 782 q 449 869 440 847 q 472 907 458 891 q 506 932 487 923 q 546 942 525 942 q 606 921 584 942 q 627 859 627 901 m 341 859 q 333 813 341 834 q 310 775 324 791 q 276 749 296 758 q 235 740 257 740 q 175 761 196 740 q 154 822 154 782 q 163 869 154 847 q 186 907 172 891 q 220 932 201 923 q 260 942 240 942 q 320 921 299 942 q 341 859 341 901 "},"Ÿ":{"x_min":-0.46875,"x_max":828.078125,"ha":851,"o":"m 233 0 l 233 49 q 284 62 264 55 q 317 75 305 69 q 334 87 329 81 q 340 98 340 93 l 340 358 q 285 470 315 412 q 223 581 254 527 q 162 681 192 635 q 108 759 132 727 q 95 773 102 766 q 77 783 89 779 q 48 789 66 787 q 2 792 30 792 l 0 841 q 44 848 19 844 q 95 854 70 851 q 142 858 120 856 q 178 861 164 861 q 216 852 197 861 q 247 829 235 844 q 299 752 272 795 q 355 660 327 709 q 410 560 383 611 q 461 460 437 509 l 619 760 q 613 788 630 778 q 544 805 596 798 l 544 855 l 828 855 l 828 805 q 759 787 781 796 q 727 760 737 777 l 510 354 l 510 98 q 514 88 510 94 q 531 76 519 82 q 564 62 543 69 q 617 49 585 55 l 617 0 l 233 0 m 661 1050 q 653 1003 661 1024 q 629 965 644 981 q 595 939 615 949 q 554 930 576 930 q 494 951 515 930 q 474 1012 474 972 q 483 1059 474 1037 q 506 1097 492 1081 q 540 1122 521 1113 q 580 1132 559 1132 q 640 1111 618 1132 q 661 1050 661 1091 m 375 1050 q 367 1003 375 1024 q 344 965 358 981 q 310 939 329 949 q 269 930 291 930 q 209 951 230 930 q 188 1012 188 972 q 197 1059 188 1037 q 220 1097 206 1081 q 254 1122 235 1113 q 294 1132 274 1132 q 354 1111 333 1132 q 375 1050 375 1091 "},"€":{"x_min":11.53125,"x_max":672.03125,"ha":703,"o":"m 464 297 l 260 297 q 289 191 269 233 q 333 124 308 149 q 386 87 358 98 q 442 77 415 77 q 480 80 461 77 q 521 94 499 83 q 571 123 543 104 q 632 173 598 142 q 651 151 642 164 q 668 128 660 139 q 591 53 627 82 q 521 7 555 24 q 456 -14 488 -8 q 394 -20 425 -20 q 290 0 340 -20 q 199 59 240 20 q 129 158 158 99 q 88 297 100 218 l 31 297 l 11 319 q 15 332 12 324 q 21 348 18 340 q 26 364 23 357 q 31 378 29 372 l 81 378 l 81 396 q 83 456 81 426 l 51 456 l 31 478 q 35 491 33 483 q 41 507 38 499 q 46 523 44 516 q 51 537 49 531 l 93 537 q 140 669 108 613 q 218 763 171 726 q 324 819 264 801 q 455 838 383 838 q 520 832 489 838 q 579 817 551 827 q 630 796 607 808 q 670 769 653 784 q 670 758 673 767 q 661 736 667 749 q 646 707 655 722 q 629 677 638 691 q 612 652 620 663 q 599 635 604 640 l 555 644 q 489 721 524 695 q 402 748 453 748 q 360 739 382 748 q 318 708 338 731 q 283 644 299 686 q 259 537 267 603 l 505 537 l 527 516 l 505 456 l 253 456 q 252 431 252 443 l 252 378 l 464 378 l 486 357 l 464 297 "},"ß":{"x_min":32.484375,"x_max":838,"ha":874,"o":"m 838 192 q 821 110 838 148 q 771 42 804 71 q 688 -3 738 13 q 570 -20 638 -20 q 511 -14 543 -20 q 451 -1 479 -9 q 403 14 423 6 q 378 29 383 23 q 373 49 374 33 q 370 84 371 64 q 370 128 370 105 q 373 171 371 151 q 377 207 374 192 q 383 227 380 223 l 438 219 q 460 151 445 180 q 496 102 476 122 q 541 72 517 82 q 592 63 566 63 q 662 82 636 63 q 689 142 689 102 q 675 198 689 174 q 640 241 662 222 q 590 275 618 260 q 534 307 563 291 q 477 339 504 322 q 427 378 449 356 q 392 428 405 399 q 379 494 379 456 q 395 563 379 536 q 435 609 411 590 q 489 641 460 627 q 542 671 517 655 q 582 707 566 686 q 599 760 599 727 q 586 837 599 802 q 551 897 574 872 q 496 937 529 923 q 424 951 464 951 q 369 939 394 951 q 325 898 344 928 q 295 815 306 868 q 285 678 285 762 l 285 0 l 32 0 l 32 49 q 100 69 78 57 q 122 89 122 81 l 122 641 q 137 780 122 722 q 177 878 153 838 q 231 944 202 918 q 286 988 260 970 q 379 1033 326 1015 q 488 1051 431 1051 q 604 1028 553 1051 q 690 972 655 1006 q 744 893 725 937 q 763 806 763 850 q 745 716 763 751 q 702 658 728 680 q 646 621 676 636 q 590 594 616 607 q 547 565 564 581 q 530 522 530 549 q 552 469 530 491 q 609 429 575 447 q 684 391 644 410 q 758 345 723 371 q 815 282 792 319 q 838 192 838 245 "},"ǩ":{"x_min":33,"x_max":771.28125,"ha":766,"o":"m 33 0 l 33 49 q 99 69 77 61 q 122 90 122 78 l 122 858 q 118 906 122 889 q 106 932 115 923 q 79 943 97 940 q 33 949 62 945 l 33 996 q 153 1018 98 1006 q 255 1051 209 1030 l 285 1023 l 285 361 l 463 521 q 492 553 485 541 q 493 571 498 565 q 475 579 489 578 q 444 581 462 581 l 444 631 l 747 631 l 747 581 q 687 567 717 578 q 628 534 658 556 l 422 378 l 667 100 q 686 83 677 90 q 706 74 695 77 q 732 70 718 71 q 767 71 747 70 l 771 22 q 726 12 751 17 q 678 2 701 7 q 635 -4 654 -1 q 610 -7 617 -7 q 562 1 582 -7 q 527 28 542 9 l 285 350 l 285 90 q 287 81 285 85 q 297 72 289 77 q 319 63 304 68 q 359 49 334 57 l 359 0 l 33 0 m 448 1108 l 355 1108 l 170 1331 q 190 1356 180 1345 q 211 1373 200 1367 l 403 1246 l 591 1373 q 612 1356 602 1367 q 630 1331 622 1345 l 448 1108 "},"Ể":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 592 962 q 574 938 584 949 q 553 922 564 927 l 362 1032 l 173 922 q 152 938 162 927 q 132 962 142 949 l 322 1183 l 404 1183 l 592 962 m 497 1392 q 485 1359 497 1374 q 457 1332 473 1345 q 424 1308 440 1319 q 400 1285 408 1297 q 395 1260 391 1273 q 422 1230 398 1247 q 409 1223 417 1226 q 391 1217 400 1220 q 373 1212 382 1214 q 360 1209 365 1210 q 300 1245 315 1229 q 290 1275 285 1261 q 310 1301 294 1289 q 346 1327 327 1314 q 380 1353 365 1339 q 395 1383 395 1366 q 387 1414 395 1405 q 365 1424 379 1424 q 342 1414 351 1424 q 334 1392 334 1404 q 341 1373 334 1384 q 297 1358 324 1366 q 238 1348 270 1351 l 231 1355 q 229 1369 229 1361 q 242 1408 229 1389 q 277 1443 255 1427 q 327 1467 298 1458 q 387 1477 356 1477 q 437 1470 416 1477 q 471 1451 458 1463 q 491 1424 484 1440 q 497 1392 497 1409 "},"ǵ":{"x_min":10,"x_max":716.828125,"ha":718,"o":"m 453 406 q 443 471 453 441 q 417 524 434 501 q 373 559 399 546 q 312 573 347 573 q 278 565 295 573 q 246 541 260 557 q 223 502 232 526 q 214 446 214 478 q 222 382 214 412 q 247 329 230 352 q 291 294 264 307 q 354 281 317 281 q 391 288 373 281 q 423 312 409 296 q 444 351 436 327 q 453 406 453 374 m 377 -28 q 316 -18 344 -24 q 262 -7 287 -13 q 213 -46 231 -29 q 186 -77 195 -63 q 175 -102 177 -91 q 173 -123 173 -113 q 189 -166 173 -146 q 235 -203 206 -187 q 304 -227 264 -218 q 390 -237 343 -237 q 459 -227 430 -237 q 507 -200 488 -217 q 536 -161 527 -183 q 546 -116 546 -140 q 539 -90 546 -103 q 515 -66 533 -77 q 463 -44 497 -54 q 377 -28 430 -34 m 609 434 q 585 339 609 382 q 524 265 562 296 q 434 217 485 234 q 327 200 383 200 l 320 200 q 287 161 294 176 q 280 143 280 147 q 284 131 280 136 q 304 119 288 125 q 350 107 319 113 q 434 94 381 101 q 565 70 513 84 q 648 35 617 55 q 691 -11 679 15 q 704 -71 704 -37 q 689 -134 704 -102 q 649 -196 674 -166 q 588 -250 623 -225 q 513 -294 554 -275 q 429 -323 473 -313 q 342 -334 385 -334 q 268 -329 307 -334 q 193 -315 230 -325 q 123 -291 156 -306 q 64 -256 90 -277 q 24 -209 39 -235 q 10 -150 10 -182 q 17 -115 10 -133 q 43 -78 24 -98 q 95 -34 62 -58 q 180 17 128 -11 q 103 83 103 48 q 109 103 103 90 q 130 132 116 116 q 169 169 145 149 q 226 212 192 189 q 157 241 188 223 q 104 284 126 259 q 70 341 82 309 q 58 408 58 372 q 82 502 58 457 q 147 579 106 546 q 242 631 188 612 q 354 651 295 651 q 442 638 401 651 q 515 603 482 625 q 622 625 574 610 q 697 651 670 640 l 716 625 q 710 608 714 618 q 700 587 705 598 q 690 566 695 577 q 678 547 684 556 q 631 541 655 543 q 579 537 607 538 q 601 487 593 513 q 609 434 609 462 m 315 705 q 300 709 309 705 q 283 717 292 713 q 267 726 274 721 q 256 734 260 730 l 399 1025 q 429 1021 407 1024 q 476 1014 451 1018 q 524 1005 501 1010 q 554 999 546 1001 l 574 962 l 315 705 "},"":{"x_min":32.5,"x_max":450.515625,"ha":482,"o":"m 421 393 l 323 393 l 323 90 q 327 80 323 85 q 343 69 332 75 q 373 59 354 64 q 419 49 391 54 l 419 0 l 63 0 l 63 49 q 111 59 92 54 q 141 69 130 64 q 155 79 151 74 q 160 90 160 85 l 160 393 l 47 393 l 32 407 q 37 423 33 413 q 45 443 41 433 q 54 464 50 454 q 61 480 58 474 l 160 480 l 160 570 l 47 570 l 32 584 q 37 600 33 590 q 45 620 41 610 q 54 641 50 631 q 61 657 58 651 l 160 657 l 160 858 q 156 906 160 889 q 143 931 153 923 q 116 943 133 939 q 70 949 98 946 l 70 996 q 133 1006 103 1001 q 189 1017 162 1011 q 241 1032 215 1023 q 293 1051 266 1040 l 323 1023 l 323 657 l 435 657 l 450 640 l 421 570 l 323 570 l 323 480 l 435 480 l 450 463 l 421 393 "},"ẳ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 590 927 q 542 833 569 872 q 484 769 515 794 q 419 732 453 744 q 350 721 385 721 q 278 732 313 721 q 212 769 243 744 q 155 833 181 794 q 108 927 128 872 q 119 940 112 933 q 132 953 125 947 q 146 965 139 960 q 159 973 153 970 q 199 919 176 941 q 247 881 222 896 q 299 858 273 865 q 347 851 325 851 q 398 858 371 851 q 449 880 424 865 q 498 918 475 895 q 538 973 521 941 q 551 965 544 970 q 565 953 558 960 q 579 940 573 947 q 590 927 585 933 m 482 1136 q 471 1103 482 1118 q 442 1076 459 1089 q 410 1053 426 1064 q 385 1029 393 1041 q 381 1004 377 1018 q 408 974 384 991 q 394 967 403 971 q 377 961 386 964 q 359 956 368 958 q 346 953 351 954 q 286 989 301 973 q 275 1019 271 1005 q 296 1046 279 1033 q 332 1071 313 1058 q 366 1097 351 1083 q 380 1127 380 1111 q 373 1159 380 1149 q 351 1168 365 1168 q 328 1158 337 1168 q 319 1136 319 1148 q 327 1117 319 1128 q 283 1103 310 1110 q 224 1092 256 1096 l 216 1100 q 214 1113 214 1106 q 227 1152 214 1133 q 262 1187 241 1172 q 313 1212 284 1202 q 373 1221 342 1221 q 423 1214 402 1221 q 457 1196 444 1208 q 476 1169 470 1184 q 482 1136 482 1153 "},"Ű":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 359 922 q 330 933 347 924 q 300 950 314 942 l 404 1237 q 429 1233 413 1235 q 464 1229 446 1232 q 498 1225 482 1227 q 520 1220 514 1222 l 541 1182 l 359 922 m 577 922 q 548 933 565 924 q 518 950 531 942 l 621 1237 q 646 1233 630 1235 q 681 1229 663 1232 q 715 1225 699 1227 q 738 1220 731 1222 l 758 1182 l 577 922 "},"c":{"x_min":44,"x_max":605.796875,"ha":633,"o":"m 605 129 q 524 49 561 79 q 453 4 487 20 q 388 -15 419 -11 q 325 -20 357 -20 q 219 2 270 -20 q 129 65 168 24 q 67 166 90 106 q 44 301 44 226 q 71 438 44 374 q 146 548 98 501 q 262 623 195 596 q 410 651 329 651 q 460 647 432 651 q 516 636 489 643 q 566 619 543 629 q 600 597 588 609 q 598 578 601 591 q 591 547 596 564 q 581 509 587 529 q 569 472 575 490 q 556 440 563 454 q 546 420 550 426 l 501 426 q 446 529 478 493 q 359 566 413 566 q 302 552 329 566 q 253 509 274 538 q 219 433 232 480 q 207 322 207 387 q 220 225 207 268 q 258 154 234 183 q 315 109 282 125 q 384 94 348 94 q 421 96 403 94 q 459 106 438 98 q 507 130 481 115 q 569 172 533 146 l 605 129 "},"¶":{"x_min":24,"x_max":792.609375,"ha":842,"o":"m 588 775 q 534 785 562 781 l 534 -78 q 543 -91 534 -85 q 560 -99 553 -96 q 578 -91 568 -96 q 588 -78 588 -85 l 588 775 m 422 429 l 422 796 q 397 797 409 796 q 377 797 386 797 q 313 786 345 797 q 257 754 282 775 q 217 703 232 733 q 202 635 202 673 q 212 562 202 599 q 246 495 223 525 q 305 447 269 466 q 392 429 341 429 l 422 429 m 326 -170 l 326 -120 q 397 -99 373 -110 q 421 -78 421 -87 l 421 356 q 395 353 409 354 q 362 352 381 352 q 228 368 290 352 q 120 418 166 385 q 49 500 75 451 q 24 612 24 548 q 48 718 24 670 q 116 801 72 766 q 224 855 161 836 q 365 875 287 875 q 404 874 380 875 q 458 871 429 873 q 521 868 488 870 q 587 865 554 867 q 749 855 663 860 l 792 855 l 792 805 q 722 783 746 795 q 699 762 699 772 l 699 -78 q 721 -99 699 -87 q 792 -120 743 -110 l 792 -170 l 326 -170 "},"Ụ":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 562 -184 q 554 -230 562 -209 q 531 -268 545 -252 q 497 -294 517 -285 q 456 -304 478 -304 q 396 -283 417 -304 q 375 -221 375 -262 q 384 -174 375 -196 q 407 -136 393 -152 q 441 -111 422 -120 q 482 -102 461 -102 q 541 -122 520 -102 q 562 -184 562 -143 "},"":{"x_min":28.3125,"x_max":902.6875,"ha":939,"o":"m 509 78 q 590 99 557 78 q 645 157 624 121 q 674 240 665 193 q 684 337 684 287 l 684 407 l 298 407 l 298 345 q 309 230 298 280 q 345 146 320 180 q 411 95 371 112 q 509 78 451 78 m 895 805 q 826 784 849 795 q 803 763 803 772 l 803 488 l 885 488 l 902 472 l 875 407 l 803 407 l 803 355 q 778 196 803 266 q 708 78 753 127 q 602 5 663 30 q 467 -20 541 -20 q 336 0 398 -20 q 228 58 274 18 q 154 158 181 97 q 128 301 128 218 l 128 407 l 43 407 l 28 423 q 33 436 29 427 q 40 455 36 445 q 47 473 43 465 q 53 488 51 482 l 128 488 l 128 763 q 105 783 128 771 q 34 805 83 795 l 34 855 l 390 855 l 390 805 q 321 784 344 795 q 298 763 298 772 l 298 488 l 684 488 l 684 763 q 661 783 684 771 q 590 805 639 795 l 590 855 l 895 855 l 895 805 "},"­":{"x_min":35.953125,"x_max":457.796875,"ha":494,"o":"m 457 376 q 451 357 455 368 q 442 335 447 346 q 433 314 438 324 q 426 299 429 304 l 57 299 l 35 320 q 41 338 37 328 q 50 359 45 349 q 59 380 54 370 q 67 397 63 390 l 435 397 l 457 376 "},"Ṑ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 728 1075 q 721 1055 726 1068 q 710 1029 716 1043 q 698 1004 703 1016 q 690 986 693 992 l 172 986 l 150 1007 q 157 1027 152 1015 q 168 1053 162 1039 q 179 1078 174 1066 q 188 1097 185 1090 l 706 1097 l 728 1075 m 562 1179 q 543 1155 553 1166 q 522 1139 533 1144 l 197 1297 l 204 1340 q 224 1356 208 1345 q 257 1379 239 1367 q 291 1400 275 1390 q 315 1415 307 1411 l 562 1179 "},"ȳ":{"x_min":-42.046875,"x_max":696.53125,"ha":705,"o":"m 696 581 q 663 572 676 576 q 642 563 650 568 q 629 551 634 558 q 621 535 625 545 l 395 -50 q 332 -178 366 -125 q 260 -266 298 -232 q 181 -317 222 -301 q 96 -334 139 -334 q 45 -329 70 -334 q 1 -317 20 -324 q -30 -302 -18 -310 q -42 -287 -42 -293 q -30 -264 -42 -281 q -3 -227 -18 -247 q 29 -190 12 -207 q 57 -165 46 -172 q 125 -192 91 -187 q 185 -188 160 -197 q 239 -149 210 -179 q 291 -62 267 -120 l 311 -15 l 84 535 q 59 563 76 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 275 574 289 578 q 255 565 261 570 q 249 553 248 560 q 255 535 250 546 l 394 194 l 527 535 q 532 552 531 545 q 528 564 533 559 q 510 573 523 569 q 474 581 497 577 l 474 631 l 696 631 l 696 581 m 664 886 q 657 866 662 879 q 646 840 652 854 q 634 815 640 826 q 626 797 629 803 l 108 797 l 86 818 q 93 838 88 826 q 104 864 98 850 q 115 889 110 877 q 124 908 121 901 l 642 908 l 664 886 "},"Ẓ":{"x_min":35.265625,"x_max":708.0625,"ha":757,"o":"m 708 239 q 705 184 706 217 q 703 117 704 151 q 701 51 702 83 q 699 0 700 19 l 59 0 l 35 35 l 491 767 l 226 767 q 202 755 215 767 q 175 722 188 743 q 150 672 162 701 q 130 608 138 643 l 71 621 l 96 865 q 130 859 115 861 q 160 855 145 856 q 190 855 174 855 l 678 855 l 701 821 l 248 88 l 557 88 q 583 98 571 88 q 605 129 594 108 q 626 181 615 150 q 650 254 637 212 l 708 239 m 471 -184 q 463 -230 471 -209 q 440 -268 454 -252 q 406 -294 426 -285 q 365 -304 387 -304 q 305 -283 326 -304 q 284 -221 284 -262 q 293 -174 284 -196 q 317 -136 302 -152 q 351 -111 331 -120 q 391 -102 370 -102 q 450 -122 429 -102 q 471 -184 471 -143 "},"ḳ":{"x_min":33,"x_max":771.28125,"ha":766,"o":"m 33 0 l 33 49 q 99 69 77 61 q 122 90 122 78 l 122 858 q 118 906 122 889 q 106 932 115 923 q 79 943 97 940 q 33 949 62 945 l 33 996 q 153 1018 98 1006 q 255 1051 209 1030 l 285 1023 l 285 361 l 463 521 q 492 553 485 541 q 493 571 498 565 q 475 579 489 578 q 444 581 462 581 l 444 631 l 747 631 l 747 581 q 687 567 717 578 q 628 534 658 556 l 422 378 l 667 100 q 686 83 677 90 q 706 74 695 77 q 732 70 718 71 q 767 71 747 70 l 771 22 q 726 12 751 17 q 678 2 701 7 q 635 -4 654 -1 q 610 -7 617 -7 q 562 1 582 -7 q 527 28 542 9 l 285 350 l 285 90 q 287 81 285 85 q 297 72 289 77 q 319 63 304 68 q 359 49 334 57 l 359 0 l 33 0 m 494 -184 q 486 -230 494 -209 q 463 -268 477 -252 q 429 -294 449 -285 q 388 -304 410 -304 q 328 -283 349 -304 q 307 -221 307 -262 q 316 -174 307 -196 q 340 -136 325 -152 q 374 -111 354 -120 q 414 -102 393 -102 q 473 -122 452 -102 q 494 -184 494 -143 "},":":{"x_min":89,"x_max":311,"ha":374,"o":"m 311 559 q 301 510 311 532 q 274 473 291 488 q 235 450 258 458 q 187 443 212 443 q 149 448 167 443 q 118 464 131 453 q 96 492 104 475 q 89 534 89 510 q 99 583 89 561 q 126 619 109 604 q 166 642 143 634 q 213 651 189 651 q 250 645 232 651 q 281 628 267 640 q 302 600 294 617 q 311 559 311 583 m 311 89 q 301 40 311 62 q 274 3 291 18 q 235 -19 258 -11 q 187 -27 212 -27 q 149 -21 167 -27 q 118 -5 131 -16 q 96 22 104 5 q 89 64 89 40 q 99 113 89 91 q 126 149 109 134 q 166 172 143 164 q 213 181 189 181 q 250 175 232 181 q 281 158 267 170 q 302 130 294 147 q 311 89 311 113 "},"ś":{"x_min":52.03125,"x_max":530,"ha":582,"o":"m 530 192 q 515 109 530 144 q 477 51 500 75 q 424 13 454 28 q 365 -7 395 0 q 308 -17 335 -15 q 260 -20 280 -20 q 213 -16 239 -20 q 161 -7 188 -13 q 109 7 135 -1 q 61 29 83 17 q 53 53 56 31 q 52 105 51 75 q 55 169 52 136 q 66 227 58 202 l 120 220 q 143 155 127 184 q 180 105 158 126 q 228 74 202 85 q 284 63 255 63 q 357 80 333 63 q 381 138 381 98 q 367 187 381 166 q 330 227 353 209 q 278 262 307 246 q 218 294 249 277 q 161 325 189 308 q 110 364 133 343 q 74 411 88 385 q 60 469 60 437 q 80 545 60 511 q 135 602 101 579 q 212 638 169 625 q 301 651 255 651 q 360 647 331 651 q 417 636 390 643 q 467 620 444 630 q 506 598 490 611 q 507 576 510 595 q 498 532 505 556 q 483 485 492 508 q 466 451 474 462 l 419 457 q 371 548 402 516 q 294 580 339 580 q 231 561 253 580 q 209 514 209 542 q 219 475 209 492 q 250 443 230 458 q 299 413 270 428 q 364 379 328 398 q 423 347 393 364 q 476 308 452 330 q 515 258 500 286 q 530 192 530 230 m 250 705 q 235 709 244 705 q 218 717 227 713 q 202 726 209 721 q 191 734 195 730 l 334 1025 q 364 1021 342 1024 q 411 1014 386 1018 q 459 1005 436 1010 q 489 999 481 1001 l 509 962 l 250 705 "},"͞":{"x_min":-486.96875,"x_max":486.96875,"ha":0,"o":"m 486 1194 q 479 1174 484 1187 q 468 1148 474 1162 q 457 1123 463 1134 q 449 1105 452 1111 l -465 1105 l -486 1126 q -480 1146 -485 1134 q -469 1172 -475 1158 q -458 1197 -463 1185 q -448 1216 -452 1209 l 465 1216 l 486 1194 "},"ẇ":{"x_min":8.8125,"x_max":986.8125,"ha":996,"o":"m 986 581 q 955 572 967 576 q 936 563 944 567 q 925 553 929 559 q 918 539 921 547 l 769 40 q 752 14 765 25 q 724 -2 739 4 q 694 -13 709 -9 q 671 -20 680 -17 l 498 376 l 360 40 q 343 14 355 24 q 316 -3 330 3 q 288 -14 302 -10 q 265 -20 274 -17 l 82 539 q 60 562 78 551 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 270 573 286 578 q 247 563 254 569 q 239 551 240 557 q 241 539 239 545 l 343 219 l 505 631 l 557 631 l 727 219 l 825 539 q 827 553 828 546 q 821 564 827 559 q 802 573 815 569 q 766 581 789 577 l 766 631 l 986 631 l 986 581 m 609 859 q 600 813 609 834 q 578 775 592 791 q 544 749 563 758 q 503 740 525 740 q 443 761 463 740 q 422 822 422 782 q 431 869 422 847 q 454 907 440 891 q 488 932 469 923 q 529 942 508 942 q 588 921 567 942 q 609 859 609 901 "}," ":{"x_min":0,"x_max":0,"ha":346},"¾":{"x_min":36.515625,"x_max":826.015625,"ha":865,"o":"m 209 2 q 190 -5 201 -2 q 166 -10 179 -8 q 141 -15 153 -13 q 120 -20 129 -18 l 103 0 l 707 816 q 725 822 714 819 q 749 828 736 825 q 773 833 761 831 q 792 838 785 836 l 809 819 l 209 2 m 826 145 q 807 124 817 135 q 787 109 796 114 l 767 109 l 767 44 q 777 35 767 40 q 819 25 787 31 l 819 0 l 595 0 l 595 25 q 636 31 621 28 q 661 37 652 34 q 672 42 669 40 q 676 48 676 45 l 676 109 l 493 109 l 477 121 l 663 379 q 683 385 671 382 l 707 392 q 730 399 719 396 q 750 405 741 402 l 767 391 l 767 156 l 815 156 l 826 145 m 363 556 q 350 504 363 529 q 314 462 337 480 q 258 433 290 444 q 187 423 225 423 q 152 426 171 423 q 113 436 133 429 q 73 453 93 443 q 36 478 54 463 l 52 509 q 117 478 88 487 q 174 470 146 470 q 208 474 192 470 q 235 488 223 478 q 254 512 247 497 q 261 548 261 527 q 252 586 261 571 q 231 610 244 601 q 204 624 219 620 q 177 628 190 628 l 169 628 q 162 627 165 628 q 155 626 159 627 q 146 625 152 626 l 139 656 q 192 673 172 663 q 222 695 211 683 q 235 717 232 706 q 239 738 239 728 q 227 778 239 761 q 186 796 215 796 q 168 792 177 796 q 154 781 160 788 q 147 765 148 774 q 148 745 145 755 q 107 730 133 737 q 60 722 82 724 l 47 743 q 59 772 47 756 q 92 802 71 788 q 143 825 114 816 q 209 835 173 835 q 269 827 244 835 q 309 806 293 819 q 332 777 325 793 q 340 744 340 761 q 334 719 340 732 q 317 695 328 707 q 291 674 306 684 q 258 660 276 665 q 301 649 282 658 q 334 626 320 640 q 355 594 348 612 q 363 556 363 576 m 676 318 l 554 156 l 676 156 l 676 318 "},"m":{"x_min":32.484375,"x_max":1157.625,"ha":1173,"o":"m 820 0 l 820 49 q 860 61 844 55 q 884 72 875 67 q 895 81 892 77 q 899 90 899 86 l 899 408 q 894 475 899 449 q 881 512 890 500 q 859 529 873 525 q 827 534 846 534 q 758 512 798 534 q 674 449 718 491 l 674 90 q 677 81 674 86 q 689 72 680 77 q 716 62 699 67 q 759 49 733 56 l 759 0 l 431 0 l 431 49 q 471 61 456 55 q 495 72 487 67 q 507 81 504 77 q 511 90 511 86 l 511 408 q 507 475 511 449 q 496 512 504 500 q 476 529 488 525 q 444 534 463 534 q 374 513 413 534 q 285 449 335 493 l 285 90 q 305 69 285 80 q 369 49 325 58 l 369 0 l 32 0 l 32 49 q 99 70 77 61 q 122 90 122 79 l 122 467 q 120 509 122 494 q 110 534 118 525 q 83 546 101 542 q 32 554 65 550 l 32 602 q 96 610 67 606 q 150 621 124 615 q 198 635 175 627 q 246 651 221 642 l 274 622 l 282 538 q 352 593 320 571 q 413 628 384 615 q 467 645 441 640 q 517 651 493 651 q 575 642 550 651 q 618 620 600 634 q 646 588 635 606 q 661 547 657 569 l 663 538 q 734 593 701 571 q 795 627 766 614 q 850 645 824 640 q 901 651 876 651 q 962 641 933 651 q 1014 612 992 632 q 1049 558 1036 591 q 1062 477 1062 524 l 1062 90 q 1083 72 1062 81 q 1157 49 1104 63 l 1157 0 l 820 0 "},"Ị":{"x_min":42.09375,"x_max":398.59375,"ha":454,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 m 313 -184 q 305 -230 313 -209 q 282 -268 296 -252 q 248 -294 268 -285 q 207 -304 229 -304 q 147 -283 168 -304 q 126 -221 126 -262 q 135 -174 126 -196 q 159 -136 144 -152 q 193 -111 173 -120 q 233 -102 212 -102 q 292 -122 271 -102 q 313 -184 313 -143 "},"ž":{"x_min":41.375,"x_max":607.015625,"ha":650,"o":"m 598 224 q 597 189 598 209 q 597 147 597 169 q 596 102 596 125 q 594 59 595 79 q 592 23 593 39 q 590 0 591 8 l 59 0 l 41 30 l 400 550 l 223 550 q 167 516 193 550 q 124 407 141 482 l 75 421 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 592 631 l 607 601 l 246 81 l 479 81 q 500 91 491 81 q 517 122 510 102 q 533 170 525 142 q 550 235 541 199 l 598 224 m 387 722 l 295 722 l 111 979 q 129 1007 120 993 q 151 1026 139 1020 l 342 878 l 531 1026 q 554 1007 542 1020 q 576 979 567 993 l 387 722 "},"ớ":{"x_min":44,"x_max":818,"ha":817,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 818 706 q 774 611 818 663 q 637 509 730 559 q 672 425 660 471 q 685 329 685 380 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 138 543 93 494 q 243 621 182 592 q 378 651 305 651 q 498 629 444 651 q 592 568 552 607 q 630 613 621 591 q 640 652 640 635 q 627 689 640 671 q 595 722 614 706 l 772 802 q 804 761 791 787 q 818 706 818 734 m 347 705 q 333 709 341 705 q 316 717 324 713 q 300 726 307 721 q 288 734 293 730 l 432 1025 q 462 1021 440 1024 q 509 1014 484 1018 q 556 1005 534 1010 q 586 999 579 1001 l 607 962 l 347 705 "},"á":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 308 705 q 294 709 302 705 q 276 717 285 713 q 260 726 267 721 q 249 734 253 730 l 392 1025 q 422 1021 400 1024 q 470 1014 444 1018 q 517 1005 495 1010 q 547 999 539 1001 l 567 962 l 308 705 "},"×":{"x_min":56.296875,"x_max":528.328125,"ha":585,"o":"m 56 213 l 223 381 l 56 549 l 56 572 q 74 580 63 575 q 97 589 85 584 q 120 598 109 594 q 139 604 131 601 l 292 450 l 444 604 q 463 598 452 601 q 487 589 475 594 q 510 580 499 584 q 528 572 521 575 l 528 549 l 360 381 l 528 213 l 528 190 q 510 182 521 187 q 486 173 498 178 q 463 164 474 168 q 446 159 452 160 l 292 312 l 139 159 q 121 164 132 160 q 98 173 110 168 q 74 182 86 178 q 56 190 63 187 l 56 213 "},"ḍ":{"x_min":44,"x_max":773.8125,"ha":779,"o":"m 773 77 q 710 38 742 56 q 651 8 678 21 q 602 -12 623 -5 q 572 -20 581 -20 q 510 98 523 -20 q 452 44 478 66 q 401 7 426 22 q 349 -13 376 -6 q 292 -20 323 -20 q 202 2 246 -20 q 122 65 157 24 q 65 166 87 106 q 44 301 44 226 q 68 432 44 369 q 135 544 92 495 q 240 621 179 592 q 373 651 300 651 q 436 643 405 651 q 505 610 468 636 l 505 843 q 503 902 505 880 q 494 936 502 924 q 467 952 486 948 q 412 960 448 957 l 412 1006 q 546 1026 486 1014 q 642 1051 606 1039 l 668 1025 l 668 203 q 669 163 668 179 q 671 136 670 146 q 676 120 673 126 q 683 112 679 115 q 692 109 687 110 q 704 109 697 108 q 724 114 712 110 q 754 127 736 118 l 773 77 m 505 182 l 505 478 q 444 539 480 517 q 362 561 408 561 q 300 548 328 561 q 251 507 272 535 q 218 438 230 480 q 207 337 207 396 q 220 241 207 283 q 255 169 234 199 q 305 124 277 140 q 360 109 332 109 q 431 127 397 109 q 505 182 465 146 m 471 -184 q 463 -230 471 -209 q 440 -268 454 -252 q 406 -294 426 -285 q 365 -304 387 -304 q 305 -283 326 -304 q 284 -221 284 -262 q 293 -174 284 -196 q 317 -136 302 -152 q 351 -111 331 -120 q 391 -102 370 -102 q 450 -122 429 -102 q 471 -184 471 -143 "},"Ǻ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 478 1059 q 465 1109 478 1092 q 436 1127 451 1127 q 411 1121 422 1127 q 394 1106 401 1115 q 383 1085 387 1097 q 379 1061 379 1073 q 393 1013 379 1029 q 422 996 407 996 q 464 1014 449 996 q 478 1059 478 1032 m 570 1087 q 557 1019 570 1051 q 520 964 543 987 q 468 927 497 941 q 408 914 439 914 q 359 922 381 914 q 321 946 337 930 q 296 984 305 962 q 287 1033 287 1006 q 301 1101 287 1070 q 337 1157 314 1133 q 389 1195 359 1181 q 450 1209 418 1209 q 500 1199 477 1209 q 538 1174 522 1190 q 562 1136 553 1158 q 570 1087 570 1114 m 339 1220 q 315 1239 328 1225 q 293 1265 303 1253 l 541 1496 q 575 1477 556 1488 q 612 1455 594 1465 q 642 1435 629 1444 q 661 1420 656 1425 l 668 1385 l 339 1220 "},"K":{"x_min":29.078125,"x_max":857.640625,"ha":859,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 446 l 544 745 q 566 774 559 763 q 569 791 572 785 q 550 800 565 797 q 509 805 535 803 l 509 855 l 814 855 l 814 805 q 777 800 792 802 q 750 792 762 797 q 729 781 738 788 q 709 763 719 774 l 418 458 l 745 111 q 767 92 755 99 q 792 84 778 86 q 820 82 805 81 q 852 84 835 82 l 857 34 q 813 20 837 28 q 764 6 789 13 q 717 -5 740 0 q 679 -10 695 -10 q 644 -3 659 -10 q 615 19 629 2 l 292 423 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 "},"7":{"x_min":65.78125,"x_max":651.09375,"ha":703,"o":"m 651 791 q 589 643 619 718 q 530 497 558 569 q 476 358 501 425 q 428 230 450 290 q 388 121 406 171 q 359 35 370 71 q 328 19 347 27 q 288 3 309 11 q 246 -9 267 -3 q 208 -20 225 -15 l 175 7 q 280 199 234 111 q 365 368 326 287 q 440 528 404 449 q 512 694 475 607 l 209 694 q 188 691 199 694 q 165 679 177 689 q 139 646 153 668 q 111 585 126 624 l 65 602 q 71 648 67 618 q 80 710 75 678 q 90 772 85 743 q 99 817 95 802 l 628 817 l 651 791 "},"̈":{"x_min":-586,"x_max":-113,"ha":0,"o":"m -113 859 q -121 813 -113 834 q -144 775 -130 791 q -178 749 -159 758 q -219 740 -198 740 q -279 761 -259 740 q -300 822 -300 782 q -291 869 -300 847 q -267 907 -282 891 q -234 932 -253 923 q -193 942 -215 942 q -134 921 -155 942 q -113 859 -113 901 m -399 859 q -407 813 -399 834 q -430 775 -416 791 q -463 749 -444 758 q -505 740 -483 740 q -565 761 -544 740 q -586 822 -586 782 q -577 869 -586 847 q -553 907 -568 891 q -519 932 -539 923 q -479 942 -500 942 q -420 921 -441 942 q -399 859 -399 901 "},"¨":{"x_min":35,"x_max":508,"ha":543,"o":"m 508 859 q 499 813 508 834 q 476 775 491 791 q 442 749 461 758 q 401 740 423 740 q 341 761 361 740 q 321 822 321 782 q 329 869 321 847 q 353 907 338 891 q 386 932 367 923 q 427 942 406 942 q 486 921 465 942 q 508 859 508 901 m 222 859 q 213 813 222 834 q 190 775 205 791 q 157 749 176 758 q 115 740 137 740 q 55 761 76 740 q 35 822 35 782 q 43 869 35 847 q 67 907 52 891 q 101 932 81 923 q 141 942 120 942 q 200 921 179 942 q 222 859 222 901 "},"Y":{"x_min":-0.46875,"x_max":828.078125,"ha":851,"o":"m 233 0 l 233 49 q 284 62 264 55 q 317 75 305 69 q 334 87 329 81 q 340 98 340 93 l 340 358 q 285 470 315 412 q 223 581 254 527 q 162 681 192 635 q 108 759 132 727 q 95 773 102 766 q 77 783 89 779 q 48 789 66 787 q 2 792 30 792 l 0 841 q 44 848 19 844 q 95 854 70 851 q 142 858 120 856 q 178 861 164 861 q 216 852 197 861 q 247 829 235 844 q 299 752 272 795 q 355 660 327 709 q 410 560 383 611 q 461 460 437 509 l 619 760 q 613 788 630 778 q 544 805 596 798 l 544 855 l 828 855 l 828 805 q 759 787 781 796 q 727 760 737 777 l 510 354 l 510 98 q 514 88 510 94 q 531 76 519 82 q 564 62 543 69 q 617 49 585 55 l 617 0 l 233 0 "},"E":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 "},"Ô":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 661 962 q 643 938 653 949 q 622 922 634 927 l 432 1032 l 242 922 q 221 938 231 927 q 202 962 211 949 l 391 1183 l 474 1183 l 661 962 "},"ổ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 609 750 q 591 723 600 737 q 569 705 581 710 l 379 856 l 189 705 q 166 723 178 710 q 144 750 153 737 l 333 1013 l 426 1013 l 609 750 m 512 1224 q 500 1192 512 1206 q 472 1164 488 1177 q 440 1141 456 1152 q 415 1118 423 1130 q 410 1093 407 1106 q 437 1062 414 1079 q 424 1056 433 1059 q 407 1049 416 1052 q 389 1044 397 1046 q 376 1041 380 1042 q 316 1077 331 1061 q 305 1107 301 1094 q 326 1134 309 1121 q 361 1159 342 1146 q 395 1185 380 1172 q 410 1215 410 1199 q 402 1247 410 1237 q 380 1256 395 1256 q 358 1246 367 1256 q 349 1224 349 1236 q 357 1205 349 1216 q 313 1191 340 1198 q 254 1180 285 1184 l 246 1188 q 244 1201 244 1194 q 257 1240 244 1221 q 292 1275 271 1260 q 343 1300 314 1290 q 403 1309 372 1309 q 453 1303 432 1309 q 487 1284 474 1296 q 506 1257 500 1272 q 512 1224 512 1241 "},"Ï":{"x_min":-16.296875,"x_max":456.703125,"ha":454,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 m 456 1050 q 448 1003 456 1024 q 425 965 439 981 q 391 939 410 949 q 349 930 371 930 q 290 951 310 930 q 269 1012 269 972 q 278 1059 269 1037 q 302 1097 287 1081 q 335 1122 316 1113 q 375 1132 354 1132 q 435 1111 413 1132 q 456 1050 456 1091 m 170 1050 q 162 1003 170 1024 q 139 965 153 981 q 105 939 125 949 q 64 930 86 930 q 4 951 25 930 q -16 1012 -16 972 q -7 1059 -16 1037 q 16 1097 1 1081 q 50 1122 30 1113 q 89 1132 69 1132 q 149 1111 128 1132 q 170 1050 170 1091 "},"ġ":{"x_min":10,"x_max":716.828125,"ha":718,"o":"m 453 406 q 443 471 453 441 q 417 524 434 501 q 373 559 399 546 q 312 573 347 573 q 278 565 295 573 q 246 541 260 557 q 223 502 232 526 q 214 446 214 478 q 222 382 214 412 q 247 329 230 352 q 291 294 264 307 q 354 281 317 281 q 391 288 373 281 q 423 312 409 296 q 444 351 436 327 q 453 406 453 374 m 377 -28 q 316 -18 344 -24 q 262 -7 287 -13 q 213 -46 231 -29 q 186 -77 195 -63 q 175 -102 177 -91 q 173 -123 173 -113 q 189 -166 173 -146 q 235 -203 206 -187 q 304 -227 264 -218 q 390 -237 343 -237 q 459 -227 430 -237 q 507 -200 488 -217 q 536 -161 527 -183 q 546 -116 546 -140 q 539 -90 546 -103 q 515 -66 533 -77 q 463 -44 497 -54 q 377 -28 430 -34 m 609 434 q 585 339 609 382 q 524 265 562 296 q 434 217 485 234 q 327 200 383 200 l 320 200 q 287 161 294 176 q 280 143 280 147 q 284 131 280 136 q 304 119 288 125 q 350 107 319 113 q 434 94 381 101 q 565 70 513 84 q 648 35 617 55 q 691 -11 679 15 q 704 -71 704 -37 q 689 -134 704 -102 q 649 -196 674 -166 q 588 -250 623 -225 q 513 -294 554 -275 q 429 -323 473 -313 q 342 -334 385 -334 q 268 -329 307 -334 q 193 -315 230 -325 q 123 -291 156 -306 q 64 -256 90 -277 q 24 -209 39 -235 q 10 -150 10 -182 q 17 -115 10 -133 q 43 -78 24 -98 q 95 -34 62 -58 q 180 17 128 -11 q 103 83 103 48 q 109 103 103 90 q 130 132 116 116 q 169 169 145 149 q 226 212 192 189 q 157 241 188 223 q 104 284 126 259 q 70 341 82 309 q 58 408 58 372 q 82 502 58 457 q 147 579 106 546 q 242 631 188 612 q 354 651 295 651 q 442 638 401 651 q 515 603 482 625 q 622 625 574 610 q 697 651 670 640 l 716 625 q 710 608 714 618 q 700 587 705 598 q 690 566 695 577 q 678 547 684 556 q 631 541 655 543 q 579 537 607 538 q 601 487 593 513 q 609 434 609 462 m 449 859 q 440 813 449 834 q 418 775 432 791 q 384 749 403 758 q 343 740 365 740 q 283 761 303 740 q 262 822 262 782 q 271 869 262 847 q 294 907 280 891 q 328 932 309 923 q 369 942 348 942 q 428 921 407 942 q 449 859 449 901 "},"Ẳ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 670 1144 q 622 1050 649 1089 q 564 986 595 1011 q 499 949 533 961 q 430 938 465 938 q 358 949 393 938 q 292 986 323 961 q 235 1050 261 1011 q 188 1144 208 1089 q 199 1157 192 1150 q 212 1170 205 1164 q 226 1182 219 1177 q 239 1190 233 1187 q 279 1136 256 1158 q 327 1098 302 1113 q 379 1075 353 1082 q 427 1068 405 1068 q 478 1075 451 1068 q 530 1097 504 1082 q 578 1135 555 1112 q 618 1190 601 1158 q 631 1182 624 1187 q 646 1170 638 1177 q 659 1157 653 1164 q 670 1144 666 1150 m 562 1353 q 551 1320 562 1335 q 522 1293 539 1306 q 490 1270 506 1281 q 465 1246 473 1258 q 461 1221 457 1235 q 488 1191 464 1208 q 474 1184 483 1188 q 457 1178 466 1181 q 439 1173 448 1175 q 426 1170 431 1171 q 366 1206 381 1190 q 355 1236 351 1222 q 376 1263 359 1250 q 412 1288 393 1275 q 446 1314 431 1300 q 460 1344 460 1328 q 453 1376 460 1366 q 431 1385 445 1385 q 408 1375 417 1385 q 399 1353 399 1365 q 407 1334 399 1345 q 363 1320 390 1327 q 304 1309 336 1313 l 296 1317 q 294 1330 294 1323 q 308 1369 294 1350 q 342 1404 321 1389 q 393 1429 364 1419 q 453 1438 422 1438 q 503 1431 482 1438 q 537 1413 524 1425 q 556 1386 550 1401 q 562 1353 562 1370 "},"ứ":{"x_min":22.9375,"x_max":940,"ha":940,"o":"m 940 706 q 924 650 940 680 q 876 590 908 621 q 792 528 843 559 q 672 469 741 497 l 672 192 q 672 157 672 171 q 675 134 673 144 q 679 120 676 125 q 687 111 682 114 q 710 109 695 106 q 759 127 724 112 l 776 76 q 721 43 751 59 q 662 11 691 26 q 612 -11 634 -2 q 582 -20 590 -20 q 558 -15 570 -20 q 537 1 547 -11 q 520 35 528 13 q 509 92 513 57 q 433 33 466 55 q 372 0 399 11 q 321 -16 344 -12 q 276 -20 298 -20 q 214 -11 244 -20 q 159 20 183 -2 q 119 84 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 630 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 313 102 298 107 q 346 97 327 97 q 377 100 361 97 q 414 112 394 103 q 457 137 434 122 q 509 177 481 153 l 509 467 q 506 516 509 497 q 495 544 504 534 q 468 558 486 554 q 419 564 450 562 l 419 611 q 542 628 487 617 q 646 650 597 638 l 672 619 l 671 540 q 716 569 698 554 q 743 599 733 585 q 757 627 753 614 q 762 651 762 640 q 749 688 762 671 q 718 722 737 706 l 894 802 q 926 761 913 787 q 940 706 940 734 m 350 705 q 336 709 344 705 q 318 717 327 713 q 302 726 309 721 q 291 734 295 730 l 434 1025 q 464 1021 442 1024 q 512 1014 486 1018 q 559 1005 537 1010 q 589 999 581 1001 l 609 962 l 350 705 "},"ẑ":{"x_min":41.375,"x_max":607.015625,"ha":650,"o":"m 598 224 q 597 189 598 209 q 597 147 597 169 q 596 102 596 125 q 594 59 595 79 q 592 23 593 39 q 590 0 591 8 l 59 0 l 41 30 l 400 550 l 223 550 q 167 516 193 550 q 124 407 141 482 l 75 421 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 592 631 l 607 601 l 246 81 l 479 81 q 500 91 491 81 q 517 122 510 102 q 533 170 525 142 q 550 235 541 199 l 598 224 m 574 750 q 556 723 566 737 q 535 705 546 710 l 344 856 l 155 705 q 131 723 143 710 q 109 750 119 737 l 299 1013 l 392 1013 l 574 750 "},"Ɖ":{"x_min":18.90625,"x_max":828,"ha":884,"o":"m 828 458 q 810 306 828 373 q 763 188 793 240 q 693 102 733 137 q 608 43 653 66 q 514 10 562 21 q 419 0 465 0 l 29 0 l 29 49 q 98 70 75 58 q 122 90 122 81 l 122 417 l 33 417 l 18 433 q 23 446 20 437 q 29 465 26 455 q 36 483 33 475 q 41 498 39 492 l 122 498 l 122 784 l 29 771 l 20 834 q 99 849 53 842 q 195 863 145 857 q 296 871 246 868 q 391 875 347 875 q 577 846 495 875 q 714 765 658 818 q 798 634 769 711 q 828 458 828 556 m 343 803 q 318 802 331 803 q 292 802 305 802 l 292 498 l 455 498 l 472 482 l 447 417 l 292 417 l 292 113 q 293 104 292 108 q 300 90 295 96 q 317 81 305 85 q 347 75 328 77 q 394 73 366 73 q 449 81 420 73 q 506 109 477 90 q 559 157 534 128 q 603 226 585 186 q 634 317 622 266 q 646 432 646 368 q 626 591 646 522 q 568 707 606 660 q 473 778 530 754 q 343 803 417 803 "},"Ấ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 658 962 q 640 938 650 949 q 619 922 630 927 l 428 1032 l 239 922 q 218 938 227 927 q 198 962 208 949 l 387 1183 l 470 1183 l 658 962 m 339 1193 q 315 1212 328 1198 q 293 1238 303 1225 l 541 1469 q 575 1450 556 1461 q 612 1428 594 1438 q 642 1408 629 1417 q 661 1393 656 1398 l 668 1358 l 339 1193 "},"ể":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 593 750 q 575 723 585 737 q 554 705 565 710 l 363 856 l 174 705 q 150 723 162 710 q 128 750 138 737 l 318 1013 l 411 1013 l 593 750 m 497 1224 q 485 1192 497 1206 q 457 1164 473 1177 q 424 1141 440 1152 q 400 1118 408 1130 q 395 1093 391 1106 q 422 1062 398 1079 q 409 1056 417 1059 q 391 1049 400 1052 q 373 1044 382 1046 q 360 1041 365 1042 q 300 1077 315 1061 q 290 1107 285 1094 q 310 1134 294 1121 q 346 1159 327 1146 q 380 1185 365 1172 q 395 1215 395 1199 q 387 1247 395 1237 q 365 1256 379 1256 q 342 1246 351 1256 q 334 1224 334 1236 q 341 1205 334 1216 q 297 1191 324 1198 q 238 1180 270 1184 l 231 1188 q 229 1201 229 1194 q 242 1240 229 1221 q 277 1275 255 1260 q 327 1300 298 1290 q 387 1309 356 1309 q 437 1303 416 1309 q 471 1284 458 1296 q 491 1257 484 1272 q 497 1224 497 1241 "},"Ḕ":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 659 1075 q 652 1055 657 1068 q 640 1029 647 1043 q 629 1004 634 1016 q 621 986 623 992 l 103 986 l 81 1007 q 88 1027 83 1015 q 99 1053 92 1039 q 110 1078 105 1066 q 119 1097 115 1090 l 637 1097 l 659 1075 m 493 1179 q 474 1155 484 1166 q 453 1139 464 1144 l 128 1297 l 134 1340 q 154 1356 139 1345 q 188 1379 170 1367 q 222 1400 206 1390 q 246 1415 238 1411 l 493 1179 "},"b":{"x_min":2.25,"x_max":695,"ha":746,"o":"m 545 282 q 533 397 545 349 q 501 475 521 445 q 453 520 480 506 q 394 534 425 534 q 334 517 371 534 q 248 459 297 501 l 248 148 q 343 106 302 119 q 404 94 385 94 q 466 108 440 94 q 510 149 492 123 q 536 208 528 174 q 545 282 545 242 m 695 343 q 680 262 695 304 q 641 179 666 219 q 582 103 616 139 q 508 39 547 66 q 425 -4 469 11 q 338 -20 381 -20 q 291 -13 320 -20 q 229 4 263 -7 q 158 31 196 15 q 85 65 121 47 l 85 858 q 82 906 85 889 q 71 932 80 923 q 46 943 62 940 q 2 949 30 945 l 2 996 q 62 1007 34 1002 q 116 1018 90 1012 q 167 1033 142 1025 q 218 1051 192 1040 q 225 1043 220 1048 q 235 1034 230 1039 q 248 1023 241 1029 l 247 543 q 314 593 281 572 q 377 626 347 613 q 433 645 407 639 q 478 651 458 651 q 568 629 528 651 q 636 567 608 607 q 679 471 664 527 q 695 343 695 414 "},"̃":{"x_min":-631.421875,"x_max":-97.671875,"ha":0,"o":"m -97 933 q -127 873 -109 905 q -167 811 -145 840 q -217 764 -189 783 q -276 745 -244 745 q -331 756 -305 745 q -383 780 -358 767 q -433 804 -408 793 q -483 816 -457 816 q -511 810 -499 816 q -534 795 -523 805 q -557 771 -545 786 q -580 738 -568 756 l -631 756 q -601 817 -619 784 q -562 879 -584 850 q -512 927 -539 908 q -454 947 -485 947 q -395 935 -423 947 q -341 911 -366 924 q -292 887 -316 898 q -248 876 -269 876 q -195 894 -217 876 q -149 954 -172 913 l -97 933 "},"fl":{"x_min":25.296875,"x_max":862.984375,"ha":889,"o":"m 506 0 l 506 49 q 554 59 535 54 q 584 69 573 64 q 598 80 594 74 q 603 90 603 85 l 603 858 q 597 914 603 897 q 574 938 591 931 q 552 916 564 927 q 528 896 540 905 q 507 879 517 887 q 491 870 498 872 q 428 928 459 910 q 376 946 398 946 q 343 935 359 946 q 315 895 327 924 q 295 817 302 867 q 288 689 288 767 l 288 631 l 456 631 l 481 606 q 466 582 475 594 q 448 557 457 569 q 430 536 439 546 q 415 522 421 527 q 371 538 399 530 q 288 546 342 546 l 288 89 q 294 81 288 85 q 316 72 300 77 q 358 62 332 68 q 425 49 384 56 l 425 0 l 35 0 l 35 49 q 103 69 82 57 q 125 89 125 81 l 125 546 l 44 546 l 25 570 l 78 631 l 125 631 l 125 652 q 132 752 125 707 q 155 835 140 798 q 191 902 169 872 q 239 958 212 932 q 291 999 264 982 q 344 1028 318 1017 q 395 1045 370 1040 q 440 1051 420 1051 q 482 1046 461 1051 q 521 1036 502 1042 q 555 1022 540 1030 q 582 1007 571 1015 q 661 1025 624 1015 q 736 1051 698 1035 l 766 1023 l 766 90 q 770 80 766 85 q 786 69 775 75 q 816 59 797 64 q 862 49 835 54 l 862 0 l 506 0 "},"Ḡ":{"x_min":37,"x_max":807.78125,"ha":836,"o":"m 743 805 q 743 793 746 802 q 734 769 740 783 q 718 739 728 756 q 700 708 709 723 q 682 682 691 693 q 667 665 673 670 l 624 674 q 579 729 602 707 q 532 765 557 752 q 481 784 508 778 q 426 790 455 790 q 386 783 409 790 q 339 760 363 776 q 292 716 315 743 q 250 650 268 689 q 220 556 232 610 q 209 432 209 502 q 230 276 209 341 q 286 169 251 211 q 365 107 321 127 q 458 87 410 87 q 525 93 496 87 q 579 112 555 100 l 579 318 q 576 333 579 326 q 562 347 573 340 q 529 361 551 354 q 469 374 507 367 l 469 424 l 807 424 l 807 374 q 755 349 769 365 q 742 318 742 334 l 742 114 q 647 47 691 73 q 566 6 604 21 q 494 -14 528 -8 q 429 -20 460 -20 q 331 -8 379 -20 q 240 25 283 2 q 159 82 196 47 q 94 163 121 116 q 52 267 67 209 q 37 394 37 325 q 72 596 37 507 q 172 747 108 685 q 322 842 236 809 q 510 875 409 875 q 563 870 532 875 q 626 856 594 865 q 690 834 659 847 q 743 805 721 821 m 741 1075 q 734 1055 739 1068 q 722 1029 729 1043 q 711 1004 716 1016 q 703 986 706 992 l 185 986 l 163 1007 q 170 1027 165 1015 q 181 1053 174 1039 q 192 1078 187 1066 q 201 1097 198 1090 l 719 1097 l 741 1075 "},"ȭ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 646 933 q 616 873 634 905 q 576 811 598 840 q 526 764 554 783 q 467 745 499 745 q 412 756 438 745 q 360 780 385 767 q 310 804 335 793 q 260 816 286 816 q 232 810 244 816 q 209 795 220 805 q 186 771 198 786 q 163 738 175 756 l 112 756 q 142 817 124 784 q 181 879 159 850 q 231 927 204 908 q 289 947 258 947 q 348 935 320 947 q 402 911 377 924 q 451 887 427 898 q 495 876 474 876 q 548 894 526 876 q 594 954 571 913 l 646 933 m 680 1151 q 673 1131 678 1143 q 662 1105 668 1118 q 651 1079 656 1091 q 642 1061 645 1067 l 124 1061 l 103 1083 q 109 1103 105 1090 q 120 1128 114 1115 q 132 1153 126 1141 q 141 1172 137 1165 l 659 1172 l 680 1151 "},"Ŋ":{"x_min":29,"x_max":814,"ha":903,"o":"m 814 188 q 801 61 814 117 q 766 -40 789 5 q 708 -125 742 -86 q 633 -200 675 -164 q 590 -230 614 -215 q 537 -256 566 -245 q 475 -275 508 -268 q 407 -283 442 -283 q 342 -274 377 -283 q 278 -254 308 -266 q 228 -228 248 -242 q 208 -204 208 -215 q 216 -190 208 -200 q 237 -168 224 -181 q 265 -142 249 -156 q 295 -116 281 -128 q 322 -95 310 -104 q 342 -83 335 -86 q 380 -118 361 -102 q 420 -146 399 -134 q 462 -166 440 -159 q 507 -174 483 -174 q 561 -154 536 -174 q 605 -94 587 -135 q 633 6 623 -54 q 644 152 644 68 l 644 591 q 638 669 644 639 q 622 716 633 699 q 593 738 611 732 q 550 745 575 745 q 505 737 530 745 q 448 710 480 730 q 377 656 416 690 q 292 568 338 622 l 292 90 q 316 70 292 82 q 390 49 340 59 l 390 0 l 29 0 l 29 49 q 98 70 74 59 q 122 90 122 81 l 122 678 q 120 721 122 704 q 111 747 119 737 q 85 762 103 757 q 33 771 67 767 l 33 820 q 86 828 56 823 q 148 841 117 834 q 209 857 180 848 q 263 875 239 865 l 292 846 l 292 695 q 394 783 347 748 q 483 838 441 818 q 562 866 525 858 q 637 875 600 875 q 697 866 666 875 q 754 833 728 857 q 797 769 780 810 q 814 665 814 729 l 814 188 "},"Ǔ":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 516 939 l 423 939 l 238 1162 q 258 1186 248 1175 q 279 1204 267 1197 l 471 1076 l 659 1204 q 680 1186 670 1197 q 698 1162 690 1175 l 516 939 "},"Ũ":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 736 1123 q 706 1063 724 1096 q 666 1001 689 1030 q 616 954 644 973 q 558 935 589 935 q 502 946 529 935 q 451 970 476 957 q 401 994 425 983 q 350 1005 376 1005 q 322 1000 335 1005 q 299 985 310 994 q 277 961 288 975 q 253 928 265 946 l 202 946 q 232 1007 215 974 q 271 1069 249 1040 q 321 1117 294 1098 q 379 1137 348 1137 q 439 1126 411 1137 q 492 1102 467 1115 q 541 1078 518 1089 q 585 1067 564 1067 q 638 1085 616 1067 q 684 1144 661 1104 l 736 1123 "},"L":{"x_min":29.078125,"x_max":691.46875,"ha":707,"o":"m 691 205 q 685 144 688 176 q 677 83 681 112 q 670 32 673 54 q 663 0 666 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 131 q 297 109 292 119 q 317 94 303 100 q 356 84 332 87 q 418 81 380 81 l 494 81 q 547 88 525 81 q 584 112 568 95 q 614 156 601 129 q 641 223 627 183 l 691 205 "},"Ẋ":{"x_min":16.28125,"x_max":859.3125,"ha":875,"o":"m 497 0 l 497 50 q 545 57 526 52 q 571 67 563 61 q 578 83 579 74 q 568 106 577 93 l 408 339 l 254 106 q 241 82 244 92 q 246 65 239 72 q 271 55 253 59 q 321 50 290 52 l 321 0 l 16 0 l 16 50 q 90 66 60 53 q 139 106 121 79 l 349 426 l 128 748 q 109 772 118 762 q 87 788 99 781 q 60 797 75 794 q 23 805 45 801 l 23 855 l 389 855 l 389 805 q 314 788 332 799 q 317 748 297 777 l 457 542 l 587 748 q 598 773 596 763 q 592 789 600 783 q 567 799 585 796 q 518 805 549 802 l 518 855 l 826 855 l 826 805 q 782 798 801 802 q 748 787 763 794 q 721 771 733 781 q 701 748 710 762 l 516 458 l 756 106 q 776 82 767 92 q 798 66 786 73 q 824 56 809 60 q 859 50 839 52 l 859 0 l 497 0 m 530 1050 q 522 1003 530 1024 q 499 965 513 981 q 465 939 485 949 q 424 930 446 930 q 364 951 385 930 q 343 1012 343 972 q 352 1059 343 1037 q 376 1097 361 1081 q 410 1122 390 1113 q 450 1132 429 1132 q 509 1111 488 1132 q 530 1050 530 1091 "},"Ɫ":{"x_min":-58.40625,"x_max":691.46875,"ha":707,"o":"m 691 205 q 685 144 688 176 q 677 83 681 112 q 670 32 673 54 q 663 0 666 10 l 29 0 l 29 49 q 98 70 75 58 q 122 90 122 81 l 122 420 q 105 423 113 422 q 89 425 97 425 q 61 419 73 425 q 38 404 49 414 q 15 380 27 395 q -7 347 4 365 l -58 365 q -29 422 -46 393 q 8 475 -12 452 q 56 515 30 499 q 113 531 82 531 l 122 531 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 466 q 325 460 308 460 q 378 479 355 460 q 423 538 400 498 l 475 517 q 446 460 463 489 q 408 408 430 432 q 360 369 386 384 q 302 354 334 354 l 292 354 l 292 131 q 297 109 292 119 q 317 94 303 100 q 356 84 332 87 q 418 81 380 81 l 494 81 q 547 88 525 81 q 584 112 568 95 q 614 156 601 129 q 641 223 627 183 l 691 205 "},"ṯ":{"x_min":-37.296875,"x_max":540.546875,"ha":514,"o":"m 499 105 q 346 10 409 40 q 248 -20 284 -20 q 192 -8 219 -20 q 147 25 166 2 q 116 83 128 48 q 105 165 105 118 l 105 546 l 22 546 l 3 570 l 56 631 l 105 631 l 105 772 l 242 874 l 268 851 l 268 631 l 474 631 l 499 606 q 484 582 493 594 q 465 557 474 569 q 446 536 455 546 q 430 522 437 527 q 410 530 422 526 q 381 538 397 534 q 349 543 366 541 q 313 546 331 546 l 268 546 l 268 228 q 272 170 268 194 q 283 131 276 146 q 302 110 291 116 q 325 104 312 104 q 351 106 337 104 q 381 114 364 108 q 419 129 398 119 q 469 154 440 139 l 499 105 m 540 -137 q 533 -157 538 -145 q 522 -183 528 -170 q 510 -208 516 -197 q 502 -227 505 -220 l -15 -227 l -37 -205 q -30 -185 -35 -197 q -19 -159 -25 -173 q -8 -134 -13 -146 q 0 -116 -2 -122 l 518 -116 l 540 -137 "},"Ĭ":{"x_min":-20.34375,"x_max":461.1875,"ha":454,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 m 461 1144 q 413 1050 440 1089 q 355 986 386 1011 q 290 949 324 961 q 221 938 256 938 q 149 949 184 938 q 83 986 114 961 q 26 1050 52 1011 q -20 1144 0 1089 q -9 1157 -16 1150 q 3 1170 -3 1164 q 17 1182 10 1177 q 30 1190 25 1187 q 70 1136 47 1158 q 119 1098 93 1113 q 170 1075 144 1082 q 219 1068 196 1068 q 269 1075 242 1068 q 321 1097 295 1082 q 369 1135 346 1112 q 409 1190 392 1158 q 422 1182 415 1187 q 437 1170 429 1177 q 450 1157 444 1164 q 461 1144 457 1150 "},"À":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 559 962 q 540 938 550 949 q 518 922 530 927 l 193 1080 l 200 1123 q 220 1139 205 1128 q 253 1162 236 1150 q 288 1183 271 1173 q 311 1198 304 1193 l 559 962 "},"̊":{"x_min":-491,"x_max":-208,"ha":0,"o":"m -300 842 q -313 892 -300 875 q -342 910 -326 910 q -367 904 -356 910 q -384 889 -377 898 q -395 868 -391 880 q -399 844 -399 856 q -385 795 -399 812 q -355 779 -371 779 q -314 797 -328 779 q -300 842 -300 815 m -208 870 q -221 802 -208 834 q -257 747 -235 770 q -309 710 -280 724 q -370 697 -338 697 q -419 705 -396 697 q -457 729 -441 713 q -482 767 -473 745 q -491 816 -491 789 q -477 884 -491 852 q -441 940 -463 916 q -389 978 -419 964 q -328 992 -360 992 q -278 982 -300 992 q -240 957 -256 973 q -216 919 -224 941 q -208 870 -208 897 "},"‑":{"x_min":35.953125,"x_max":457.796875,"ha":494,"o":"m 457 376 q 451 357 455 368 q 442 335 447 346 q 433 314 438 324 q 426 299 429 304 l 57 299 l 35 320 q 41 338 37 328 q 50 359 45 349 q 59 380 54 370 q 67 397 63 390 l 435 397 l 457 376 "},"½":{"x_min":47.84375,"x_max":819.09375,"ha":865,"o":"m 59 432 l 59 460 q 109 467 90 463 q 140 474 129 471 q 157 482 152 478 q 162 490 162 486 l 162 727 q 161 747 162 740 q 155 759 160 754 q 147 762 152 761 q 130 763 141 764 q 101 761 119 763 q 58 754 83 759 l 47 782 q 90 792 64 785 q 146 807 117 799 q 200 824 174 816 q 240 838 226 832 l 258 823 l 258 490 q 262 482 258 486 q 276 475 266 479 q 305 467 287 471 q 352 460 323 463 l 352 432 l 59 432 m 210 2 q 190 -5 202 -2 q 167 -10 179 -8 q 142 -15 154 -13 q 121 -20 130 -18 l 104 0 l 708 816 q 725 822 714 819 q 749 828 737 825 q 773 833 762 831 q 793 838 785 836 l 810 819 l 210 2 m 813 0 l 503 0 l 491 24 q 602 136 559 91 q 670 212 645 181 q 704 263 695 242 q 714 301 714 283 q 700 346 714 329 q 655 363 687 363 q 628 357 640 363 q 611 343 617 352 q 602 322 604 334 q 602 299 600 311 q 584 292 596 295 q 561 286 573 289 q 536 281 548 283 q 515 278 524 279 l 502 300 q 516 335 502 317 q 555 368 530 353 q 612 392 579 383 q 681 402 644 402 q 777 381 742 402 q 813 319 813 360 q 802 275 813 297 q 766 224 791 253 q 699 155 741 195 q 596 58 658 115 l 747 58 q 768 67 760 58 q 780 89 776 77 q 787 121 785 103 l 819 114 l 813 0 "},"ḟ":{"x_min":25.296875,"x_max":604.046875,"ha":472,"o":"m 604 985 q 597 968 604 978 q 580 945 591 957 q 557 921 570 933 q 532 899 545 909 q 509 881 520 889 q 492 870 498 873 q 429 928 459 910 q 376 946 398 946 q 343 935 359 946 q 315 895 327 924 q 295 817 302 867 q 288 689 288 767 l 288 631 l 456 631 l 481 606 q 466 582 475 594 q 448 557 457 569 q 430 536 439 546 q 415 522 421 527 q 371 538 399 530 q 288 546 342 546 l 288 89 q 294 81 288 85 q 316 72 300 77 q 358 62 332 68 q 425 49 384 56 l 425 0 l 35 0 l 35 49 q 103 69 82 57 q 125 89 125 81 l 125 546 l 44 546 l 25 570 l 78 631 l 125 631 l 125 652 q 132 752 125 707 q 155 835 140 798 q 191 902 169 872 q 239 958 212 932 q 291 999 264 982 q 344 1028 318 1017 q 395 1045 370 1040 q 440 1051 420 1051 q 500 1042 471 1051 q 552 1024 530 1034 q 589 1002 575 1013 q 604 985 604 992 m 418 1219 q 410 1172 418 1194 q 387 1134 401 1151 q 353 1109 373 1118 q 312 1099 334 1099 q 252 1120 273 1099 q 231 1182 231 1141 q 240 1229 231 1207 q 264 1267 249 1250 q 298 1292 278 1283 q 338 1301 317 1301 q 397 1281 376 1301 q 418 1219 418 1260 "},"'":{"x_min":93.59375,"x_max":284.859375,"ha":378,"o":"m 235 565 q 219 559 229 562 q 195 555 208 557 q 170 552 182 553 q 149 551 158 551 l 93 946 q 110 954 98 949 q 139 965 123 959 q 172 978 154 972 q 205 989 189 984 q 233 998 221 995 q 250 1004 245 1002 l 284 984 l 235 565 "},"ij":{"x_min":43,"x_max":737.109375,"ha":817,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 m 321 855 q 312 813 321 832 q 288 780 303 794 q 252 759 272 766 q 206 752 231 752 q 171 756 187 752 q 141 770 154 760 q 121 793 128 779 q 114 827 114 807 q 122 869 114 850 q 146 901 131 888 q 182 922 162 915 q 227 930 203 930 q 262 925 245 930 q 292 912 279 921 q 313 888 305 902 q 321 855 321 874 m 709 72 q 695 -59 709 -5 q 659 -150 681 -113 q 609 -213 637 -188 q 554 -260 582 -239 q 514 -288 536 -275 q 468 -311 491 -301 q 422 -327 445 -321 q 380 -334 399 -334 q 326 -327 354 -334 q 274 -310 297 -320 q 236 -290 251 -300 q 221 -271 221 -279 q 236 -245 221 -262 q 270 -211 251 -228 q 309 -180 289 -194 q 338 -161 328 -166 q 365 -185 349 -174 q 396 -202 380 -195 q 429 -213 413 -209 q 457 -217 445 -217 q 491 -207 475 -217 q 519 -170 507 -197 q 538 -95 531 -143 q 546 29 546 -47 l 546 439 q 545 495 546 474 q 536 527 544 516 q 510 545 528 539 q 456 554 491 550 l 456 602 q 519 612 492 606 q 569 622 546 617 q 614 635 592 628 q 663 651 636 642 l 709 651 l 709 72 m 737 855 q 728 813 737 832 q 704 780 720 794 q 668 759 689 766 q 623 752 648 752 q 587 756 604 752 q 557 770 570 760 q 537 793 545 779 q 530 827 530 807 q 538 869 530 850 q 563 901 547 888 q 599 922 578 915 q 644 930 620 930 q 679 925 662 930 q 708 912 696 921 q 729 888 721 902 q 737 855 737 874 "},"Ḷ":{"x_min":29.078125,"x_max":691.46875,"ha":707,"o":"m 691 205 q 685 144 688 176 q 677 83 681 112 q 670 32 673 54 q 663 0 666 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 131 q 297 109 292 119 q 317 94 303 100 q 356 84 332 87 q 418 81 380 81 l 494 81 q 547 88 525 81 q 584 112 568 95 q 614 156 601 129 q 641 223 627 183 l 691 205 m 453 -184 q 444 -230 453 -209 q 422 -268 436 -252 q 388 -294 407 -285 q 347 -304 369 -304 q 287 -283 307 -304 q 266 -221 266 -262 q 275 -174 266 -196 q 298 -136 284 -152 q 332 -111 313 -120 q 373 -102 352 -102 q 432 -122 411 -102 q 453 -184 453 -143 "},"˛":{"x_min":41,"x_max":364.140625,"ha":359,"o":"m 364 -203 q 324 -238 347 -221 q 274 -270 301 -256 q 219 -292 248 -284 q 161 -301 190 -301 q 121 -296 142 -301 q 82 -280 100 -291 q 52 -250 64 -269 q 41 -202 41 -231 q 95 -82 41 -141 q 260 29 149 -23 l 315 16 q 258 -37 280 -13 q 223 -81 235 -61 q 205 -120 210 -102 q 200 -154 200 -137 q 215 -191 200 -179 q 252 -203 231 -203 q 292 -193 269 -203 q 343 -157 314 -183 l 364 -203 "},"ɵ":{"x_min":44,"x_max":685,"ha":729,"o":"m 218 274 q 237 188 222 226 q 272 122 251 149 q 317 79 292 94 q 371 65 343 65 q 434 78 408 65 q 478 117 461 91 q 503 182 495 143 q 514 274 511 221 l 218 274 m 511 355 q 492 440 505 401 q 458 506 478 479 q 413 550 439 534 q 359 566 388 566 q 294 551 321 566 q 251 508 268 536 q 226 442 234 481 q 216 355 218 403 l 511 355 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 "},"ɛ":{"x_min":44,"x_max":587.65625,"ha":613,"o":"m 587 129 q 504 54 543 83 q 430 8 465 24 q 362 -13 395 -7 q 298 -20 329 -20 q 193 -8 240 -20 q 113 24 146 3 q 61 78 79 46 q 44 150 44 110 q 58 205 44 179 q 95 252 73 231 q 143 288 117 272 q 192 312 169 303 q 100 364 134 331 q 66 453 66 398 q 75 504 66 480 q 100 547 84 527 q 137 582 116 566 q 181 611 158 598 q 270 642 224 634 q 362 651 317 651 q 414 647 386 651 q 471 636 443 643 q 523 619 499 629 q 560 597 546 609 q 556 567 561 589 q 542 521 550 546 q 525 475 534 497 q 510 444 516 454 l 462 451 q 447 492 455 471 q 423 531 438 513 q 383 559 407 548 q 323 570 359 570 q 279 562 298 570 q 247 542 260 555 q 228 512 234 529 q 222 474 222 494 q 262 398 222 428 q 396 359 303 368 l 403 305 q 327 292 361 302 q 267 268 292 283 q 229 234 243 254 q 216 189 216 214 q 250 120 216 147 q 343 93 284 93 q 383 95 362 93 q 429 105 405 97 q 484 129 454 114 q 551 173 515 145 l 587 129 "},"ǔ":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 434 722 l 341 722 l 158 979 q 176 1007 166 993 q 198 1026 186 1020 l 389 878 l 577 1026 q 601 1007 589 1020 q 623 979 613 993 l 434 722 "},"ṏ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 646 933 q 616 873 634 905 q 576 811 598 840 q 526 764 554 783 q 467 745 499 745 q 412 756 438 745 q 360 780 385 767 q 310 804 335 793 q 260 816 286 816 q 232 810 244 816 q 209 795 220 805 q 186 771 198 786 q 163 738 175 756 l 112 756 q 142 817 124 784 q 181 879 159 850 q 231 927 204 908 q 289 947 258 947 q 348 935 320 947 q 402 911 377 924 q 451 887 427 898 q 495 876 474 876 q 548 894 526 876 q 594 954 571 913 l 646 933 m 621 1124 q 613 1077 621 1099 q 589 1039 604 1056 q 555 1013 575 1023 q 514 1004 536 1004 q 454 1025 475 1004 q 434 1087 434 1046 q 443 1133 434 1112 q 466 1171 452 1155 q 500 1197 481 1188 q 540 1206 519 1206 q 600 1186 578 1206 q 621 1124 621 1165 m 335 1124 q 327 1077 335 1099 q 304 1039 318 1056 q 270 1013 289 1023 q 229 1004 251 1004 q 169 1025 190 1004 q 148 1087 148 1046 q 157 1133 148 1112 q 180 1171 166 1155 q 214 1197 195 1188 q 254 1206 234 1206 q 314 1186 293 1206 q 335 1124 335 1165 "},"Ć":{"x_min":37,"x_max":726.484375,"ha":775,"o":"m 726 143 q 641 68 683 99 q 557 17 598 37 q 476 -11 516 -2 q 397 -20 436 -20 q 264 8 329 -20 q 148 90 199 36 q 67 221 98 144 q 37 397 37 299 q 70 594 37 506 q 162 745 103 682 q 299 841 220 807 q 468 875 377 875 q 541 869 505 875 q 609 854 577 864 q 669 833 642 845 q 713 806 695 821 q 713 794 716 804 q 704 770 710 784 q 689 739 698 755 q 672 707 681 722 q 655 679 663 692 q 642 662 647 667 l 598 671 q 519 758 563 731 q 421 785 474 785 q 374 777 398 785 q 325 753 349 770 q 280 708 301 736 q 243 641 259 681 q 218 547 227 601 q 209 422 209 493 q 231 273 209 335 q 290 170 254 211 q 372 111 327 130 q 461 92 417 92 q 505 96 480 92 q 559 111 529 100 q 622 141 588 122 q 691 189 655 159 q 700 180 694 186 q 710 165 705 173 q 720 152 715 158 q 726 143 724 145 m 342 922 q 318 941 330 927 q 296 967 305 954 l 543 1198 q 578 1178 559 1189 q 614 1157 597 1167 q 645 1137 632 1146 q 664 1122 659 1127 l 670 1086 l 342 922 "},"ẓ":{"x_min":41.375,"x_max":607.015625,"ha":650,"o":"m 598 224 q 597 189 598 209 q 597 147 597 169 q 596 102 596 125 q 594 59 595 79 q 592 23 593 39 q 590 0 591 8 l 59 0 l 41 30 l 400 550 l 223 550 q 167 516 193 550 q 124 407 141 482 l 75 421 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 592 631 l 607 601 l 246 81 l 479 81 q 500 91 491 81 q 517 122 510 102 q 533 170 525 142 q 550 235 541 199 l 598 224 m 417 -184 q 408 -230 417 -209 q 386 -268 400 -252 q 352 -294 371 -285 q 311 -304 333 -304 q 251 -283 271 -304 q 230 -221 230 -262 q 239 -174 230 -196 q 262 -136 248 -152 q 296 -111 277 -120 q 337 -102 316 -102 q 396 -122 375 -102 q 417 -184 417 -143 "},"£":{"x_min":28.078125,"x_max":669.765625,"ha":703,"o":"m 488 353 l 309 353 q 292 209 311 272 q 235 93 273 146 q 288 97 266 96 q 328 97 310 97 q 360 96 345 97 q 390 94 374 95 q 423 93 405 93 q 466 93 441 93 q 520 100 498 94 q 560 120 542 106 q 591 159 577 134 q 620 224 606 184 l 669 207 q 662 146 667 178 q 653 84 658 113 q 644 32 648 55 q 637 0 639 9 q 561 -19 606 -17 q 462 -16 515 -21 q 352 -4 409 -11 q 240 7 294 3 q 139 5 186 10 q 58 -20 92 0 l 33 28 q 69 60 53 45 q 96 92 85 74 q 115 132 108 110 q 126 184 123 154 q 129 256 130 215 q 126 353 129 297 l 47 353 l 28 375 q 32 388 29 380 q 39 404 36 396 q 47 421 43 413 q 53 435 51 429 l 121 435 q 141 598 119 524 q 203 725 162 672 q 305 808 245 778 q 441 838 365 838 q 481 836 459 838 q 529 830 503 835 q 583 815 554 825 q 644 790 612 806 q 642 761 643 779 q 639 722 641 743 q 635 678 637 701 q 629 636 632 656 q 623 600 626 616 q 618 575 620 584 l 565 575 q 519 707 556 659 q 422 756 483 756 q 392 753 408 756 q 360 740 375 750 q 331 708 345 729 q 309 652 317 687 q 297 563 300 616 q 302 435 295 510 l 493 435 l 515 414 l 488 353 "},"ẹ":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 449 -184 q 440 -230 449 -209 q 418 -268 432 -252 q 384 -294 403 -285 q 343 -304 365 -304 q 283 -283 303 -304 q 262 -221 262 -262 q 271 -174 262 -196 q 294 -136 280 -152 q 328 -111 309 -120 q 369 -102 348 -102 q 428 -122 407 -102 q 449 -184 449 -143 "},"ů":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 440 842 q 427 892 440 875 q 398 910 413 910 q 373 904 384 910 q 356 889 363 898 q 345 868 349 880 q 341 844 341 856 q 355 795 341 812 q 384 779 369 779 q 426 797 411 779 q 440 842 440 815 m 532 870 q 519 802 532 834 q 482 747 505 770 q 430 710 460 724 q 370 697 401 697 q 321 705 343 697 q 283 729 299 713 q 258 767 267 745 q 249 816 249 789 q 263 884 249 852 q 299 940 276 916 q 351 978 321 964 q 412 992 380 992 q 462 982 439 992 q 500 957 484 973 q 524 919 515 941 q 532 870 532 897 "},"Ō":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 728 1075 q 721 1055 726 1068 q 710 1029 716 1043 q 698 1004 703 1016 q 690 986 693 992 l 172 986 l 150 1007 q 157 1027 152 1015 q 168 1053 162 1039 q 179 1078 174 1066 q 188 1097 185 1090 l 706 1097 l 728 1075 "},"Ṻ":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 765 1075 q 757 1055 763 1068 q 746 1029 752 1043 q 735 1004 740 1016 q 727 986 729 992 l 208 986 l 187 1007 q 193 1027 189 1015 q 204 1053 198 1039 q 216 1078 210 1066 q 225 1097 221 1090 l 743 1097 l 765 1075 m 705 1267 q 697 1220 705 1241 q 673 1182 688 1198 q 639 1156 659 1166 q 598 1147 620 1147 q 539 1168 559 1147 q 518 1229 518 1189 q 527 1276 518 1254 q 550 1314 536 1298 q 584 1339 565 1330 q 624 1349 603 1349 q 684 1328 662 1349 q 705 1267 705 1308 m 419 1267 q 411 1220 419 1241 q 388 1182 402 1198 q 354 1156 374 1166 q 313 1147 335 1147 q 253 1168 274 1147 q 232 1229 232 1189 q 241 1276 232 1254 q 264 1314 250 1298 q 298 1339 279 1330 q 338 1349 318 1349 q 398 1328 377 1349 q 419 1267 419 1308 "},"Ǵ":{"x_min":37,"x_max":807.78125,"ha":836,"o":"m 743 805 q 743 793 746 802 q 734 769 740 783 q 718 739 728 756 q 700 708 709 723 q 682 682 691 693 q 667 665 673 670 l 624 674 q 579 729 602 707 q 532 765 557 752 q 481 784 508 778 q 426 790 455 790 q 386 783 409 790 q 339 760 363 776 q 292 716 315 743 q 250 650 268 689 q 220 556 232 610 q 209 432 209 502 q 230 276 209 341 q 286 169 251 211 q 365 107 321 127 q 458 87 410 87 q 525 93 496 87 q 579 112 555 100 l 579 318 q 576 333 579 326 q 562 347 573 340 q 529 361 551 354 q 469 374 507 367 l 469 424 l 807 424 l 807 374 q 755 349 769 365 q 742 318 742 334 l 742 114 q 647 47 691 73 q 566 6 604 21 q 494 -14 528 -8 q 429 -20 460 -20 q 331 -8 379 -20 q 240 25 283 2 q 159 82 196 47 q 94 163 121 116 q 52 267 67 209 q 37 394 37 325 q 72 596 37 507 q 172 747 108 685 q 322 842 236 809 q 510 875 409 875 q 563 870 532 875 q 626 856 594 865 q 690 834 659 847 q 743 805 721 821 m 356 922 q 332 941 344 927 q 309 967 319 954 l 557 1198 q 592 1178 573 1189 q 628 1157 611 1167 q 659 1137 645 1146 q 678 1122 672 1127 l 684 1086 l 356 922 "},"Ğ":{"x_min":37,"x_max":807.78125,"ha":836,"o":"m 743 805 q 743 793 746 802 q 734 769 740 783 q 718 739 728 756 q 700 708 709 723 q 682 682 691 693 q 667 665 673 670 l 624 674 q 579 729 602 707 q 532 765 557 752 q 481 784 508 778 q 426 790 455 790 q 386 783 409 790 q 339 760 363 776 q 292 716 315 743 q 250 650 268 689 q 220 556 232 610 q 209 432 209 502 q 230 276 209 341 q 286 169 251 211 q 365 107 321 127 q 458 87 410 87 q 525 93 496 87 q 579 112 555 100 l 579 318 q 576 333 579 326 q 562 347 573 340 q 529 361 551 354 q 469 374 507 367 l 469 424 l 807 424 l 807 374 q 755 349 769 365 q 742 318 742 334 l 742 114 q 647 47 691 73 q 566 6 604 21 q 494 -14 528 -8 q 429 -20 460 -20 q 331 -8 379 -20 q 240 25 283 2 q 159 82 196 47 q 94 163 121 116 q 52 267 67 209 q 37 394 37 325 q 72 596 37 507 q 172 747 108 685 q 322 842 236 809 q 510 875 409 875 q 563 870 532 875 q 626 856 594 865 q 690 834 659 847 q 743 805 721 821 m 686 1144 q 638 1050 666 1089 q 580 986 611 1011 q 515 949 549 961 q 446 938 481 938 q 374 949 409 938 q 308 986 339 961 q 251 1050 278 1011 q 204 1144 225 1089 q 215 1157 208 1150 q 228 1170 221 1164 q 243 1182 236 1177 q 255 1190 250 1187 q 295 1136 272 1158 q 344 1098 318 1113 q 395 1075 369 1082 q 444 1068 421 1068 q 494 1075 467 1068 q 546 1097 520 1082 q 594 1135 571 1112 q 634 1190 617 1158 q 648 1182 640 1187 q 662 1170 655 1177 q 675 1157 669 1164 q 686 1144 682 1150 "},"v":{"x_min":8.8125,"x_max":696.53125,"ha":705,"o":"m 696 581 q 664 572 676 576 q 645 563 652 568 q 634 551 638 558 q 626 535 630 544 l 434 55 q 416 28 428 41 q 387 6 403 16 q 352 -9 370 -3 q 318 -20 334 -15 l 78 535 q 56 563 71 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 274 574 289 578 q 251 565 259 570 q 244 553 244 560 q 249 535 244 546 l 395 194 l 532 535 q 536 552 536 545 q 531 564 537 559 q 513 573 526 569 q 477 581 500 577 l 477 631 l 696 631 l 696 581 "},"û":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 621 750 q 603 723 613 737 q 581 705 593 710 l 391 856 l 202 705 q 178 723 190 710 q 156 750 166 737 l 345 1013 l 438 1013 l 621 750 "},"Ẑ":{"x_min":35.265625,"x_max":708.0625,"ha":757,"o":"m 708 239 q 705 184 706 217 q 703 117 704 151 q 701 51 702 83 q 699 0 700 19 l 59 0 l 35 35 l 491 767 l 226 767 q 202 755 215 767 q 175 722 188 743 q 150 672 162 701 q 130 608 138 643 l 71 621 l 96 865 q 130 859 115 861 q 160 855 145 856 q 190 855 174 855 l 678 855 l 701 821 l 248 88 l 557 88 q 583 98 571 88 q 605 129 594 108 q 626 181 615 150 q 650 254 637 212 l 708 239 m 621 962 q 603 938 613 949 q 582 922 594 927 l 392 1032 l 202 922 q 181 938 191 927 q 162 962 171 949 l 351 1183 l 434 1183 l 621 962 "},"Ź":{"x_min":35.265625,"x_max":708.0625,"ha":757,"o":"m 708 239 q 705 184 706 217 q 703 117 704 151 q 701 51 702 83 q 699 0 700 19 l 59 0 l 35 35 l 491 767 l 226 767 q 202 755 215 767 q 175 722 188 743 q 150 672 162 701 q 130 608 138 643 l 71 621 l 96 865 q 130 859 115 861 q 160 855 145 856 q 190 855 174 855 l 678 855 l 701 821 l 248 88 l 557 88 q 583 98 571 88 q 605 129 594 108 q 626 181 615 150 q 650 254 637 212 l 708 239 m 303 922 q 279 941 291 927 q 257 967 266 954 l 504 1198 q 539 1178 520 1189 q 575 1157 558 1167 q 606 1137 592 1146 q 625 1122 619 1127 l 631 1086 l 303 922 "},"":{"x_min":58,"x_max":280,"ha":331,"o":"m 280 488 q 270 439 280 461 q 243 402 260 417 q 204 379 227 387 q 156 372 181 372 q 118 377 136 372 q 87 393 100 382 q 65 421 73 404 q 58 463 58 439 q 68 512 58 490 q 95 548 78 533 q 135 571 112 563 q 182 580 158 580 q 219 574 201 580 q 250 557 236 569 q 271 529 263 546 q 280 488 280 512 m 280 160 q 270 111 280 133 q 243 74 260 89 q 204 51 227 59 q 156 44 181 44 q 118 49 136 44 q 87 65 100 54 q 65 93 73 76 q 58 135 58 111 q 68 184 58 162 q 95 220 78 205 q 135 243 112 235 q 182 252 158 252 q 219 246 201 252 q 250 229 236 241 q 271 201 263 218 q 280 160 280 184 "},"Ṁ":{"x_min":35.953125,"x_max":1125.84375,"ha":1176,"o":"m 1107 805 q 1067 800 1090 805 q 1020 786 1045 795 l 1027 90 q 1052 70 1027 82 q 1125 49 1077 59 l 1125 0 l 771 0 l 771 49 q 844 70 817 59 q 871 90 871 81 l 866 642 l 578 0 l 514 0 l 232 641 l 227 90 q 249 70 227 82 q 320 49 271 59 l 320 0 l 35 0 l 35 49 q 105 70 82 59 q 128 90 128 81 l 135 781 q 87 800 111 795 q 42 805 62 805 l 42 855 l 277 855 q 289 852 284 855 q 300 844 295 850 q 311 827 305 838 q 325 798 317 816 l 575 231 l 829 798 q 844 829 838 818 q 855 846 850 840 q 866 853 861 852 q 877 855 871 855 l 1107 855 l 1107 805 m 673 1050 q 665 1003 673 1024 q 642 965 656 981 q 608 939 628 949 q 567 930 589 930 q 507 951 528 930 q 486 1012 486 972 q 495 1059 486 1037 q 519 1097 504 1081 q 553 1122 533 1113 q 593 1132 572 1132 q 652 1111 631 1132 q 673 1050 673 1091 "},"ˉ":{"x_min":53.578125,"x_max":631.421875,"ha":685,"o":"m 631 886 q 624 866 629 879 q 613 840 619 854 q 601 815 607 826 q 593 797 596 803 l 75 797 l 53 818 q 60 838 55 826 q 71 864 65 850 q 82 889 77 877 q 91 908 88 901 l 609 908 l 631 886 "},"ḻ":{"x_min":-75.28125,"x_max":502.5625,"ha":417,"o":"m 36 0 l 36 49 q 83 59 65 54 q 113 69 102 64 q 127 80 123 74 q 132 90 132 85 l 132 858 q 128 905 132 888 q 115 931 125 922 q 88 942 106 939 q 43 949 71 945 l 43 996 q 106 1006 76 1001 q 161 1017 135 1011 q 213 1032 187 1023 q 265 1051 239 1040 l 295 1023 l 295 90 q 299 80 295 85 q 315 69 304 75 q 345 59 326 64 q 391 49 364 54 l 391 0 l 36 0 m 502 -137 q 495 -157 500 -145 q 484 -183 490 -170 q 472 -208 478 -197 q 464 -227 467 -220 l -53 -227 l -75 -205 q -68 -185 -73 -197 q -57 -159 -63 -173 q -46 -134 -51 -146 q -37 -116 -40 -122 l 480 -116 l 502 -137 "},"ɔ":{"x_min":42,"x_max":619,"ha":663,"o":"m 619 331 q 594 195 619 259 q 527 83 570 131 q 425 7 484 35 q 298 -20 366 -20 q 195 -5 242 -20 q 114 36 148 9 q 60 98 79 62 q 42 177 42 134 q 50 232 42 207 q 73 272 59 257 q 110 283 86 276 q 158 297 133 290 q 207 310 184 304 q 244 319 231 316 l 264 272 q 231 228 245 255 q 218 173 218 202 q 225 131 218 150 q 246 96 232 111 q 279 72 260 81 q 320 64 298 64 q 375 78 350 64 q 418 124 401 93 q 446 201 436 154 q 456 311 456 247 q 439 411 456 368 q 397 481 423 453 q 339 522 371 508 q 273 536 306 536 q 234 533 253 536 q 194 523 215 531 q 148 500 173 515 q 91 460 123 485 q 81 468 87 462 q 70 481 76 474 q 60 494 64 487 q 54 503 55 500 q 123 575 89 546 q 191 621 157 604 q 260 644 226 638 q 332 651 295 651 q 439 629 387 651 q 530 566 490 607 q 594 466 570 525 q 619 331 619 407 "},"Ĺ":{"x_min":29.078125,"x_max":691.46875,"ha":707,"o":"m 691 205 q 685 144 688 176 q 677 83 681 112 q 670 32 673 54 q 663 0 666 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 131 q 297 109 292 119 q 317 94 303 100 q 356 84 332 87 q 418 81 380 81 l 494 81 q 547 88 525 81 q 584 112 568 95 q 614 156 601 129 q 641 223 627 183 l 691 205 m 248 922 q 224 941 236 927 q 202 967 211 954 l 449 1198 q 484 1178 465 1189 q 520 1157 503 1167 q 551 1137 537 1146 q 570 1122 564 1127 l 576 1086 l 248 922 "},"ỵ":{"x_min":-42.046875,"x_max":696.53125,"ha":705,"o":"m 696 581 q 663 572 676 576 q 642 563 650 568 q 629 551 634 558 q 621 535 625 545 l 395 -50 q 332 -178 366 -125 q 260 -266 298 -232 q 181 -317 222 -301 q 96 -334 139 -334 q 45 -329 70 -334 q 1 -317 20 -324 q -30 -302 -18 -310 q -42 -287 -42 -293 q -30 -264 -42 -281 q -3 -227 -18 -247 q 29 -190 12 -207 q 57 -165 46 -172 q 125 -192 91 -187 q 185 -188 160 -197 q 239 -149 210 -179 q 291 -62 267 -120 l 311 -15 l 84 535 q 59 563 76 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 275 574 289 578 q 255 565 261 570 q 249 553 248 560 q 255 535 250 546 l 394 194 l 527 535 q 532 552 531 545 q 528 564 533 559 q 510 573 523 569 q 474 581 497 577 l 474 631 l 696 631 l 696 581 m 646 -184 q 637 -230 646 -209 q 614 -268 629 -252 q 581 -294 600 -285 q 539 -304 561 -304 q 479 -283 500 -304 q 459 -221 459 -262 q 467 -174 459 -196 q 491 -136 476 -152 q 525 -111 505 -120 q 565 -102 544 -102 q 624 -122 603 -102 q 646 -184 646 -143 "},"":{"x_min":93.59375,"x_max":293,"ha":387,"o":"m 239 443 q 223 437 233 440 q 199 433 212 435 q 174 430 186 431 q 153 429 162 429 l 93 946 q 111 954 98 949 q 140 965 124 959 q 175 977 157 971 q 210 989 193 984 q 239 999 227 995 q 257 1004 252 1003 l 293 983 l 239 443 "},"ḇ":{"x_min":2.25,"x_max":695,"ha":746,"o":"m 545 282 q 533 397 545 349 q 501 475 521 445 q 453 520 480 506 q 394 534 425 534 q 334 517 371 534 q 248 459 297 501 l 248 148 q 343 106 302 119 q 404 94 385 94 q 466 108 440 94 q 510 149 492 123 q 536 208 528 174 q 545 282 545 242 m 695 343 q 680 262 695 304 q 641 179 666 219 q 582 103 616 139 q 508 39 547 66 q 425 -4 469 11 q 338 -20 381 -20 q 291 -13 320 -20 q 229 4 263 -7 q 158 31 196 15 q 85 65 121 47 l 85 858 q 82 906 85 889 q 71 932 80 923 q 46 943 62 940 q 2 949 30 945 l 2 996 q 62 1007 34 1002 q 116 1018 90 1012 q 167 1033 142 1025 q 218 1051 192 1040 q 225 1043 220 1048 q 235 1034 230 1039 q 248 1023 241 1029 l 247 543 q 314 593 281 572 q 377 626 347 613 q 433 645 407 639 q 478 651 458 651 q 568 629 528 651 q 636 567 608 607 q 679 471 664 527 q 695 343 695 414 m 636 -137 q 629 -157 634 -145 q 618 -183 624 -170 q 607 -208 612 -197 q 598 -227 601 -220 l 80 -227 l 59 -205 q 65 -185 61 -197 q 76 -159 70 -173 q 88 -134 82 -146 q 96 -116 93 -122 l 615 -116 l 636 -137 "},"Č":{"x_min":37,"x_max":726.484375,"ha":775,"o":"m 726 143 q 641 68 683 99 q 557 17 598 37 q 476 -11 516 -2 q 397 -20 436 -20 q 264 8 329 -20 q 148 90 199 36 q 67 221 98 144 q 37 397 37 299 q 70 594 37 506 q 162 745 103 682 q 299 841 220 807 q 468 875 377 875 q 541 869 505 875 q 609 854 577 864 q 669 833 642 845 q 713 806 695 821 q 713 794 716 804 q 704 770 710 784 q 689 739 698 755 q 672 707 681 722 q 655 679 663 692 q 642 662 647 667 l 598 671 q 519 758 563 731 q 421 785 474 785 q 374 777 398 785 q 325 753 349 770 q 280 708 301 736 q 243 641 259 681 q 218 547 227 601 q 209 422 209 493 q 231 273 209 335 q 290 170 254 211 q 372 111 327 130 q 461 92 417 92 q 505 96 480 92 q 559 111 529 100 q 622 141 588 122 q 691 189 655 159 q 700 180 694 186 q 710 165 705 173 q 720 152 715 158 q 726 143 724 145 m 478 939 l 385 939 l 201 1162 q 220 1186 210 1175 q 242 1204 230 1197 l 434 1076 l 621 1204 q 643 1186 633 1197 q 661 1162 653 1175 l 478 939 "},"x":{"x_min":8.8125,"x_max":714.84375,"ha":724,"o":"m 381 0 l 381 50 q 412 53 398 51 q 433 61 425 56 q 439 78 440 67 q 425 106 438 88 l 326 244 l 219 106 q 206 78 206 89 q 215 62 206 68 q 239 54 224 56 q 270 50 254 51 l 270 0 l 8 0 l 8 49 q 51 59 33 53 q 82 73 69 65 q 103 91 94 82 q 120 110 112 100 l 277 312 l 126 522 q 108 544 117 534 q 87 562 99 554 q 58 574 75 569 q 16 581 41 578 l 16 631 l 352 631 l 352 581 q 318 575 330 578 q 300 566 305 572 q 299 550 295 560 q 314 524 302 540 l 389 417 l 472 524 q 488 550 484 540 q 487 566 492 560 q 470 575 482 572 q 436 581 457 578 l 436 631 l 695 631 l 695 581 q 648 574 667 578 q 615 562 629 569 q 592 544 602 554 q 572 522 581 534 l 438 350 l 611 110 q 627 91 618 100 q 648 73 636 81 q 676 59 659 65 q 714 50 692 52 l 714 0 l 381 0 "},"è":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 472 736 q 461 727 468 732 q 445 718 453 722 q 428 710 436 713 q 414 705 420 707 l 155 960 l 174 998 q 202 1004 181 1000 q 248 1013 223 1008 q 294 1020 272 1017 q 324 1025 316 1024 l 472 736 "},"Ń":{"x_min":29.078125,"x_max":894.59375,"ha":922,"o":"m 29 0 l 29 49 q 100 68 78 55 q 122 90 122 81 l 122 755 q 29 805 77 797 l 29 855 l 219 855 q 235 853 229 855 q 248 846 242 851 q 263 830 255 840 q 284 802 271 819 l 699 226 l 699 763 q 694 773 699 767 q 679 784 690 779 q 651 795 669 790 q 606 805 633 801 l 606 855 l 894 855 l 894 805 q 823 785 845 798 q 801 763 801 772 l 801 -20 q 696 5 735 -14 q 638 50 657 25 l 224 624 l 224 90 q 228 81 224 86 q 244 69 233 75 q 273 58 255 63 q 317 49 291 52 l 317 0 l 29 0 m 371 922 q 347 941 360 927 q 325 967 335 954 l 573 1198 q 607 1178 588 1189 q 643 1157 626 1167 q 674 1137 661 1146 q 693 1122 688 1127 l 699 1086 l 371 922 "},"ḿ":{"x_min":32.484375,"x_max":1157.625,"ha":1172,"o":"m 820 0 l 820 49 q 860 61 844 55 q 884 72 875 67 q 895 81 892 77 q 899 90 899 86 l 899 408 q 894 475 899 449 q 881 512 890 500 q 859 529 873 525 q 827 534 846 534 q 758 512 798 534 q 674 449 718 491 l 674 90 q 677 81 674 86 q 689 72 680 77 q 716 62 699 67 q 759 49 733 56 l 759 0 l 431 0 l 431 49 q 471 61 456 55 q 495 72 487 67 q 507 81 504 77 q 511 90 511 86 l 511 408 q 507 475 511 449 q 496 512 504 500 q 476 529 488 525 q 444 534 463 534 q 374 513 413 534 q 285 449 335 493 l 285 90 q 305 69 285 80 q 369 49 325 58 l 369 0 l 32 0 l 32 49 q 99 70 77 61 q 122 90 122 79 l 122 467 q 120 509 122 494 q 110 534 118 525 q 83 546 101 542 q 32 554 65 550 l 32 602 q 96 610 67 606 q 150 621 124 615 q 198 635 175 627 q 246 651 221 642 l 274 622 l 282 538 q 352 593 320 571 q 413 628 384 615 q 467 645 441 640 q 517 651 493 651 q 575 642 550 651 q 618 620 600 634 q 646 588 635 606 q 661 547 657 569 l 663 538 q 734 593 701 571 q 795 627 766 614 q 850 645 824 640 q 901 651 876 651 q 962 641 933 651 q 1014 612 992 632 q 1049 558 1036 591 q 1062 477 1062 524 l 1062 90 q 1083 72 1062 81 q 1157 49 1104 63 l 1157 0 l 820 0 m 553 705 q 538 709 547 705 q 521 717 530 713 q 505 726 512 721 q 494 734 498 730 l 637 1025 q 667 1021 645 1024 q 714 1014 689 1018 q 762 1005 739 1010 q 792 999 784 1001 l 812 962 l 553 705 "},"Ṇ":{"x_min":29.078125,"x_max":894.59375,"ha":922,"o":"m 29 0 l 29 49 q 100 68 78 55 q 122 90 122 81 l 122 755 q 29 805 77 797 l 29 855 l 219 855 q 235 853 229 855 q 248 846 242 851 q 263 830 255 840 q 284 802 271 819 l 699 226 l 699 763 q 694 773 699 767 q 679 784 690 779 q 651 795 669 790 q 606 805 633 801 l 606 855 l 894 855 l 894 805 q 823 785 845 798 q 801 763 801 772 l 801 -20 q 696 5 735 -14 q 638 50 657 25 l 224 624 l 224 90 q 228 81 224 86 q 244 69 233 75 q 273 58 255 63 q 317 49 291 52 l 317 0 l 29 0 m 554 -184 q 545 -230 554 -209 q 523 -268 537 -252 q 489 -294 508 -285 q 448 -304 470 -304 q 388 -283 408 -304 q 367 -221 367 -262 q 376 -174 367 -196 q 399 -136 385 -152 q 433 -111 414 -120 q 474 -102 453 -102 q 533 -122 512 -102 q 554 -184 554 -143 "},".":{"x_min":89,"x_max":311,"ha":374,"o":"m 311 89 q 301 40 311 62 q 274 3 291 18 q 235 -19 258 -11 q 187 -27 212 -27 q 149 -21 167 -27 q 118 -5 131 -16 q 96 22 104 5 q 89 64 89 40 q 99 113 89 91 q 126 149 109 134 q 166 172 143 164 q 213 181 189 181 q 250 175 232 181 q 281 158 267 170 q 302 130 294 147 q 311 89 311 113 "},"Ẉ":{"x_min":13.5625,"x_max":1174.6875,"ha":1181,"o":"m 1174 805 q 1125 793 1144 799 q 1093 783 1105 788 q 1077 773 1082 778 q 1071 763 1072 768 l 916 40 q 901 15 912 26 q 873 -2 889 5 q 843 -13 858 -9 q 817 -20 827 -17 l 585 595 l 391 40 q 374 15 386 26 q 346 -1 362 5 q 314 -12 330 -8 q 283 -20 297 -17 l 107 758 q 82 785 103 774 q 13 805 61 796 l 13 855 l 345 855 l 345 805 q 293 797 311 802 q 267 785 275 791 q 258 772 259 779 q 258 758 257 765 l 374 261 l 572 855 l 640 855 l 867 261 l 976 763 q 970 777 978 771 q 948 788 963 783 q 914 797 934 793 q 872 805 895 801 l 872 855 l 1174 855 l 1174 805 m 687 -184 q 678 -230 687 -209 q 656 -268 670 -252 q 622 -294 641 -285 q 581 -304 603 -304 q 521 -283 541 -304 q 500 -221 500 -262 q 509 -174 500 -196 q 532 -136 518 -152 q 566 -111 547 -120 q 607 -102 586 -102 q 666 -122 645 -102 q 687 -184 687 -143 "},"ṣ":{"x_min":52.03125,"x_max":530,"ha":582,"o":"m 530 192 q 515 109 530 144 q 477 51 500 75 q 424 13 454 28 q 365 -7 395 0 q 308 -17 335 -15 q 260 -20 280 -20 q 213 -16 239 -20 q 161 -7 188 -13 q 109 7 135 -1 q 61 29 83 17 q 53 53 56 31 q 52 105 51 75 q 55 169 52 136 q 66 227 58 202 l 120 220 q 143 155 127 184 q 180 105 158 126 q 228 74 202 85 q 284 63 255 63 q 357 80 333 63 q 381 138 381 98 q 367 187 381 166 q 330 227 353 209 q 278 262 307 246 q 218 294 249 277 q 161 325 189 308 q 110 364 133 343 q 74 411 88 385 q 60 469 60 437 q 80 545 60 511 q 135 602 101 579 q 212 638 169 625 q 301 651 255 651 q 360 647 331 651 q 417 636 390 643 q 467 620 444 630 q 506 598 490 611 q 507 576 510 595 q 498 532 505 556 q 483 485 492 508 q 466 451 474 462 l 419 457 q 371 548 402 516 q 294 580 339 580 q 231 561 253 580 q 209 514 209 542 q 219 475 209 492 q 250 443 230 458 q 299 413 270 428 q 364 379 328 398 q 423 347 393 364 q 476 308 452 330 q 515 258 500 286 q 530 192 530 230 m 384 -184 q 375 -230 384 -209 q 352 -268 367 -252 q 319 -294 338 -285 q 278 -304 299 -304 q 217 -283 238 -304 q 197 -221 197 -262 q 206 -174 197 -196 q 229 -136 214 -152 q 263 -111 244 -120 q 304 -102 282 -102 q 363 -122 342 -102 q 384 -184 384 -143 "},"Ǎ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 476 939 l 383 939 l 198 1162 q 218 1186 208 1175 q 239 1204 227 1197 l 431 1076 l 619 1204 q 640 1186 630 1197 q 658 1162 650 1175 l 476 939 "},"ʊ":{"x_min":43,"x_max":660,"ha":701,"o":"m 660 581 q 584 559 616 570 q 558 549 570 555 q 538 539 546 544 q 528 528 530 534 q 531 517 525 522 q 622 411 591 465 q 653 289 653 358 q 645 222 653 258 q 623 152 638 187 q 583 87 607 118 q 524 32 558 55 q 445 -5 490 8 q 343 -20 399 -20 q 209 3 266 -20 q 115 66 152 26 q 60 157 78 105 q 43 266 43 209 q 75 401 43 342 q 170 517 108 461 q 174 528 176 523 q 164 539 171 534 q 144 550 156 545 q 118 560 132 555 q 43 581 87 571 l 43 631 l 298 631 l 315 548 q 261 498 282 523 q 229 443 241 473 q 212 374 217 412 q 208 285 208 336 q 219 200 208 240 q 250 130 230 160 q 299 82 271 100 q 361 65 327 65 q 421 81 395 65 q 464 124 447 97 q 491 187 482 151 q 500 260 500 222 q 494 355 500 311 q 475 436 489 399 q 441 500 462 472 q 387 548 419 528 l 406 631 l 660 631 l 660 581 "},"‘":{"x_min":49,"x_max":307.828125,"ha":359,"o":"m 307 651 q 290 638 303 645 q 257 622 276 630 q 217 606 239 614 q 176 592 196 598 q 141 582 157 586 q 117 580 125 579 q 65 639 82 605 q 49 717 49 672 q 62 792 49 754 q 97 866 75 831 q 150 931 120 901 q 212 983 180 961 l 256 949 q 216 874 232 916 q 200 788 200 833 q 225 727 200 751 q 296 702 250 703 l 307 651 "},"π":{"x_min":-4.09375,"x_max":753.390625,"ha":751,"o":"m 734 74 q 668 29 698 47 q 613 0 637 10 q 570 -16 589 -11 q 536 -21 551 -21 q 457 28 482 -21 q 432 170 432 77 q 440 293 432 213 q 462 481 448 373 q 377 483 419 482 q 288 486 335 484 q 279 341 282 412 q 276 213 276 270 q 277 128 276 165 q 285 54 279 91 q 265 43 279 49 q 232 29 250 37 q 192 14 213 22 q 151 0 171 6 q 114 -13 131 -7 q 87 -22 97 -19 q 81 -15 85 -19 q 73 -5 77 -10 q 63 7 68 1 q 95 56 81 33 q 121 105 109 79 q 142 163 132 131 q 160 240 151 195 q 175 345 168 285 q 190 487 183 405 l 162 487 q 124 485 141 487 q 91 479 107 483 q 59 466 75 474 q 24 444 43 457 l -4 484 q 39 539 16 513 q 85 586 62 566 q 132 619 109 607 q 181 631 156 631 l 625 631 q 678 633 654 631 q 724 651 703 636 l 753 616 q 713 563 733 588 q 671 519 692 538 q 629 490 650 501 q 588 479 608 479 l 554 479 q 546 384 548 428 q 545 309 545 340 q 561 147 545 197 q 610 97 578 97 q 653 101 630 97 q 714 120 676 105 l 734 74 "},"∅":{"x_min":44.265625,"x_max":871.71875,"ha":916,"o":"m 750 426 q 732 543 750 488 q 684 643 715 598 l 307 132 q 378 95 340 108 q 458 82 416 82 q 571 109 518 82 q 664 183 625 136 q 727 292 704 230 q 750 426 750 355 m 166 426 q 182 309 166 364 q 230 209 199 254 l 608 722 q 537 759 575 745 q 457 773 499 773 q 344 745 397 773 q 251 671 291 718 q 189 561 212 624 q 166 426 166 497 m 54 427 q 68 546 54 489 q 109 653 83 603 q 172 743 135 702 q 254 813 209 784 q 350 859 299 843 q 457 875 402 875 q 571 856 517 875 q 671 805 624 838 l 731 886 q 758 898 742 892 q 791 908 774 903 q 822 917 807 913 q 847 924 837 921 l 871 896 l 751 733 q 832 594 802 673 q 862 427 862 516 q 830 253 862 334 q 743 111 798 171 q 614 15 688 50 q 458 -20 541 -20 q 345 -2 399 -20 q 245 47 291 15 l 191 -25 q 172 -36 185 -30 q 141 -49 158 -43 q 105 -61 124 -55 q 68 -70 87 -66 l 44 -42 l 165 119 q 83 259 113 181 q 54 427 54 337 "},"Ỏ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 566 1121 q 554 1088 566 1102 q 526 1061 542 1073 q 493 1037 509 1048 q 469 1014 477 1026 q 464 989 461 1002 q 491 959 467 976 q 478 952 486 955 q 460 945 469 948 q 442 940 451 942 q 429 938 434 938 q 370 973 385 957 q 359 1004 355 990 q 379 1030 363 1018 q 415 1055 396 1043 q 449 1081 434 1068 q 464 1111 464 1095 q 456 1143 464 1134 q 434 1153 448 1153 q 412 1142 420 1153 q 403 1121 403 1132 q 410 1102 403 1113 q 366 1087 393 1094 q 307 1077 339 1080 l 300 1084 q 298 1098 298 1090 q 311 1137 298 1117 q 346 1171 324 1156 q 396 1196 368 1187 q 456 1206 425 1206 q 506 1199 486 1206 q 540 1180 527 1192 q 560 1153 554 1168 q 566 1121 566 1138 "},"Ớ":{"x_min":37,"x_max":857.4375,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 857 944 q 819 855 857 904 q 700 760 781 807 q 783 613 755 697 q 812 439 812 530 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 552 858 502 875 q 642 813 601 842 q 672 854 664 834 q 679 889 679 874 q 667 926 679 908 q 636 959 654 944 l 812 1040 q 844 998 830 1025 q 857 944 857 972 m 336 922 q 312 941 324 927 q 290 967 299 954 l 537 1198 q 572 1178 553 1189 q 608 1157 591 1167 q 639 1137 626 1146 q 658 1122 653 1127 l 664 1086 l 336 922 "},"Ṗ":{"x_min":20.265625,"x_max":737,"ha":787,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 785 q 72 778 96 782 q 29 771 49 775 l 20 834 q 101 850 56 843 q 194 863 146 858 q 292 871 243 868 q 386 875 341 875 q 529 859 465 875 q 640 813 594 843 q 711 738 686 782 q 737 635 737 693 q 724 548 737 588 q 689 478 711 509 q 638 423 667 447 q 577 384 609 399 q 512 360 545 368 q 449 353 479 353 q 388 358 418 353 q 335 373 358 363 l 314 444 q 363 427 342 431 q 408 424 385 424 q 466 434 437 424 q 516 467 494 445 q 552 524 538 489 q 566 607 566 558 q 550 691 566 655 q 505 753 534 728 q 436 790 476 777 q 348 803 396 803 q 320 802 334 803 q 292 802 306 802 l 292 90 q 296 82 292 86 q 313 71 300 77 q 348 61 325 66 q 405 49 370 55 l 405 0 l 29 0 m 471 1050 q 463 1003 471 1024 q 440 965 454 981 q 406 939 426 949 q 365 930 387 930 q 305 951 326 930 q 284 1012 284 972 q 293 1059 284 1037 q 317 1097 302 1081 q 351 1122 331 1113 q 391 1132 370 1132 q 450 1111 429 1132 q 471 1050 471 1091 "},"9":{"x_min":58,"x_max":651,"ha":703,"o":"m 346 387 q 418 407 385 387 q 477 457 451 427 q 463 607 475 549 q 432 696 451 664 q 391 740 414 728 q 346 752 369 752 q 257 706 289 752 q 226 581 226 661 q 238 486 226 524 q 269 427 251 449 q 308 395 287 404 q 346 387 329 387 m 651 496 q 619 303 651 392 q 523 145 587 214 q 363 31 459 76 q 139 -29 267 -14 l 122 31 q 281 87 216 54 q 385 162 345 120 q 446 254 426 204 q 473 361 466 304 q 394 306 437 326 q 302 287 350 287 q 197 307 243 287 q 120 362 151 327 q 73 442 89 396 q 58 539 58 488 q 68 608 58 573 q 97 677 78 644 q 143 740 116 711 q 204 791 170 769 q 278 825 238 812 q 363 838 318 838 q 478 818 426 838 q 570 756 531 798 q 629 650 608 715 q 651 496 651 586 "},"Ṟ":{"x_min":20.265625,"x_max":843.71875,"ha":840,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 784 q 74 778 97 781 q 29 771 50 775 l 20 834 q 176 862 92 849 q 358 875 261 875 q 515 859 451 875 q 621 815 580 843 q 681 750 662 788 q 700 669 700 712 q 686 583 700 622 q 647 512 672 544 q 587 457 622 481 q 510 420 552 434 l 724 124 q 745 101 735 110 q 766 88 754 92 q 794 82 778 83 q 833 84 810 82 l 843 34 q 793 19 821 27 q 738 4 765 11 q 687 -5 710 -1 q 651 -10 664 -10 q 612 1 631 -10 q 584 27 594 12 l 390 397 q 376 396 383 396 l 363 396 q 328 398 346 396 q 292 404 310 400 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 329 803 q 310 802 320 803 q 292 802 301 802 l 292 479 q 323 475 310 475 q 352 474 337 474 q 486 520 443 474 q 529 648 529 566 q 519 708 529 679 q 487 757 510 736 q 426 790 464 778 q 329 803 387 803 m 668 -137 q 660 -157 666 -145 q 649 -183 655 -170 q 638 -208 643 -197 q 630 -227 632 -220 l 111 -227 l 90 -205 q 96 -185 92 -197 q 107 -159 101 -173 q 119 -134 113 -146 q 128 -116 124 -122 l 646 -116 l 668 -137 "},"l":{"x_min":36,"x_max":391.984375,"ha":417,"o":"m 36 0 l 36 49 q 83 59 65 54 q 113 69 102 64 q 127 80 123 74 q 132 90 132 85 l 132 858 q 128 905 132 888 q 115 931 125 922 q 88 942 106 939 q 43 949 71 945 l 43 996 q 106 1006 76 1001 q 161 1017 135 1011 q 213 1032 187 1023 q 265 1051 239 1040 l 295 1023 l 295 90 q 299 80 295 85 q 315 69 304 75 q 345 59 326 64 q 391 49 364 54 l 391 0 l 36 0 "},"Ẫ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 658 962 q 640 938 650 949 q 619 922 630 927 l 428 1032 l 239 922 q 218 938 227 927 q 198 962 208 949 l 387 1183 l 470 1183 l 658 962 m 696 1395 q 666 1334 684 1367 q 626 1273 649 1301 q 576 1225 604 1244 q 518 1206 549 1206 q 462 1217 489 1206 q 411 1241 436 1228 q 361 1265 385 1254 q 310 1276 336 1276 q 282 1271 295 1276 q 259 1256 270 1266 q 237 1232 248 1246 q 213 1199 225 1218 l 162 1218 q 192 1279 174 1246 q 231 1341 209 1312 q 281 1389 254 1369 q 339 1408 308 1408 q 399 1397 370 1408 q 452 1373 427 1386 q 501 1349 478 1360 q 545 1338 524 1338 q 598 1357 576 1338 q 644 1415 621 1375 l 696 1395 "},"Ȭ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 699 1123 q 670 1063 687 1096 q 630 1001 652 1030 q 580 954 607 973 q 521 935 552 935 q 465 946 492 935 q 414 970 439 957 q 364 994 389 983 q 314 1005 339 1005 q 286 1000 298 1005 q 262 985 274 994 q 240 961 251 975 q 217 928 229 946 l 166 946 q 195 1007 178 974 q 235 1069 212 1040 q 284 1117 257 1098 q 343 1137 311 1137 q 402 1126 374 1137 q 456 1102 430 1115 q 504 1078 481 1089 q 549 1067 527 1067 q 602 1085 579 1067 q 647 1144 624 1104 l 699 1123 m 728 1318 q 721 1298 726 1311 q 710 1272 716 1286 q 698 1246 703 1258 q 690 1228 693 1234 l 172 1228 l 150 1250 q 157 1270 152 1258 q 168 1295 162 1282 q 179 1321 174 1309 q 188 1339 185 1333 l 706 1339 l 728 1318 "},"Ü":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 705 1050 q 697 1003 705 1024 q 673 965 688 981 q 639 939 659 949 q 598 930 620 930 q 539 951 559 930 q 518 1012 518 972 q 527 1059 518 1037 q 550 1097 536 1081 q 584 1122 565 1113 q 624 1132 603 1132 q 684 1111 662 1132 q 705 1050 705 1091 m 419 1050 q 411 1003 419 1024 q 388 965 402 981 q 354 939 374 949 q 313 930 335 930 q 253 951 274 930 q 232 1012 232 972 q 241 1059 232 1037 q 264 1097 250 1081 q 298 1122 279 1113 q 338 1132 318 1132 q 398 1111 377 1132 q 419 1050 419 1091 "},"à":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 458 736 q 446 727 454 732 q 431 718 439 722 q 414 710 422 713 q 400 705 406 707 l 141 960 l 160 998 q 188 1004 167 1000 q 233 1013 209 1008 q 280 1020 258 1017 q 310 1025 302 1024 l 458 736 "},"Ś":{"x_min":69.75,"x_max":656,"ha":712,"o":"m 656 255 q 646 193 656 225 q 619 130 637 161 q 573 72 601 100 q 508 24 545 45 q 423 -7 470 4 q 318 -20 376 -20 q 262 -15 294 -20 q 198 -2 231 -10 q 134 18 165 6 q 79 46 102 30 q 73 59 75 47 q 70 89 71 71 q 69 130 69 107 q 71 176 70 152 q 76 221 73 199 q 84 260 79 243 l 132 257 q 169 184 147 217 q 220 127 192 150 q 279 90 247 103 q 345 77 311 77 q 404 85 376 77 q 454 111 433 94 q 489 152 476 127 q 503 209 503 177 q 484 281 503 251 q 436 334 466 311 q 368 377 406 358 q 289 414 329 396 q 211 454 249 433 q 142 502 172 474 q 94 565 112 529 q 76 651 76 601 q 93 722 76 683 q 149 794 111 761 q 245 851 186 828 q 386 875 304 875 q 457 870 422 875 q 523 857 493 865 q 577 837 554 849 q 613 812 600 826 q 614 800 616 809 q 608 778 613 790 q 597 750 604 765 q 582 721 590 735 q 567 697 575 708 q 554 681 560 686 l 510 685 q 475 739 495 717 q 435 773 456 760 q 392 791 414 786 q 351 797 370 797 q 294 788 318 797 q 254 764 270 779 q 232 730 239 749 q 225 693 225 712 q 243 636 225 661 q 292 590 262 611 q 361 550 322 569 q 440 510 399 531 q 519 466 481 490 q 588 413 558 443 q 637 344 618 383 q 656 255 656 306 m 273 922 q 249 941 261 927 q 227 967 236 954 l 474 1198 q 509 1178 490 1189 q 545 1157 528 1167 q 576 1137 562 1146 q 595 1122 590 1127 l 601 1086 l 273 922 "},"ó":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 338 705 q 323 709 332 705 q 306 717 315 713 q 290 726 297 721 q 279 734 283 730 l 422 1025 q 452 1021 430 1024 q 499 1014 474 1018 q 547 1005 524 1010 q 577 999 569 1001 l 597 962 l 338 705 "},"ǟ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 585 859 q 577 813 585 834 q 553 775 568 791 q 519 749 539 758 q 478 740 500 740 q 418 761 439 740 q 398 822 398 782 q 407 869 398 847 q 430 907 416 891 q 464 932 445 923 q 504 942 483 942 q 564 921 542 942 q 585 859 585 901 m 299 859 q 291 813 299 834 q 268 775 282 791 q 234 749 254 758 q 193 740 215 740 q 133 761 154 740 q 112 822 112 782 q 121 869 112 847 q 144 907 130 891 q 178 932 159 923 q 218 942 198 942 q 278 921 257 942 q 299 859 299 901 m 645 1136 q 637 1116 642 1129 q 626 1090 632 1103 q 615 1064 620 1076 q 607 1046 609 1052 l 88 1046 l 67 1068 q 73 1088 69 1075 q 84 1113 78 1100 q 96 1138 90 1126 q 105 1157 101 1150 l 623 1157 l 645 1136 "},"ẍ":{"x_min":8.8125,"x_max":714.84375,"ha":724,"o":"m 381 0 l 381 50 q 412 53 398 51 q 433 61 425 56 q 439 78 440 67 q 425 106 438 88 l 326 244 l 219 106 q 206 78 206 89 q 215 62 206 68 q 239 54 224 56 q 270 50 254 51 l 270 0 l 8 0 l 8 49 q 51 59 33 53 q 82 73 69 65 q 103 91 94 82 q 120 110 112 100 l 277 312 l 126 522 q 108 544 117 534 q 87 562 99 554 q 58 574 75 569 q 16 581 41 578 l 16 631 l 352 631 l 352 581 q 318 575 330 578 q 300 566 305 572 q 299 550 295 560 q 314 524 302 540 l 389 417 l 472 524 q 488 550 484 540 q 487 566 492 560 q 470 575 482 572 q 436 581 457 578 l 436 631 l 695 631 l 695 581 q 648 574 667 578 q 615 562 629 569 q 592 544 602 554 q 572 522 581 534 l 438 350 l 611 110 q 627 91 618 100 q 648 73 636 81 q 676 59 659 65 q 714 50 692 52 l 714 0 l 381 0 m 597 859 q 589 813 597 834 q 566 775 580 791 q 532 749 551 758 q 491 740 512 740 q 431 761 451 740 q 410 822 410 782 q 419 869 410 847 q 443 907 428 891 q 476 932 457 923 q 516 942 495 942 q 576 921 554 942 q 597 859 597 901 m 311 859 q 303 813 311 834 q 280 775 294 791 q 246 749 266 758 q 205 740 227 740 q 145 761 166 740 q 124 822 124 782 q 133 869 124 847 q 157 907 142 891 q 191 932 171 923 q 230 942 210 942 q 290 921 269 942 q 311 859 311 901 "},"¦":{"x_min":108,"x_max":231,"ha":318,"o":"m 231 526 q 212 514 224 520 q 186 503 199 509 q 159 492 172 497 l 138 485 l 108 506 l 108 1095 q 153 1117 127 1106 q 201 1133 180 1127 l 231 1113 l 231 526 m 231 -234 q 212 -246 224 -240 q 186 -257 199 -251 q 159 -267 172 -262 q 138 -275 146 -272 l 108 -254 l 108 327 q 129 339 118 333 q 154 349 141 344 q 178 359 166 355 q 201 367 191 363 l 231 345 l 231 -234 "},"Ʃ":{"x_min":30.515625,"x_max":715.53125,"ha":760,"o":"m 715 264 q 711 199 714 237 q 706 123 709 161 q 701 51 704 85 q 697 0 699 18 l 56 0 l 30 34 l 311 415 l 44 821 l 44 855 l 542 855 q 613 856 580 855 q 687 865 646 857 l 689 630 l 631 617 q 607 697 619 667 q 583 741 594 726 q 560 761 571 757 q 539 766 550 766 l 260 766 l 461 456 l 223 131 l 556 131 q 592 137 577 131 q 616 160 606 143 q 637 204 627 176 q 659 278 647 233 l 715 264 "},"̛":{"x_min":-220.21875,"x_max":88,"ha":88,"o":"m 88 706 q 71 648 88 679 q 18 585 54 617 q -72 521 -17 553 q -203 461 -127 489 l -220 523 q -154 555 -180 538 q -115 590 -129 572 q -95 623 -100 607 q -90 651 -90 639 q -102 688 -90 671 q -134 722 -115 706 l 42 802 q 74 760 61 787 q 88 706 88 734 "},"Ẕ":{"x_min":35.265625,"x_max":708.0625,"ha":757,"o":"m 708 239 q 705 184 706 217 q 703 117 704 151 q 701 51 702 83 q 699 0 700 19 l 59 0 l 35 35 l 491 767 l 226 767 q 202 755 215 767 q 175 722 188 743 q 150 672 162 701 q 130 608 138 643 l 71 621 l 96 865 q 130 859 115 861 q 160 855 145 856 q 190 855 174 855 l 678 855 l 701 821 l 248 88 l 557 88 q 583 98 571 88 q 605 129 594 108 q 626 181 615 150 q 650 254 637 212 l 708 239 m 667 -137 q 660 -157 665 -145 q 649 -183 655 -170 q 637 -208 642 -197 q 629 -227 632 -220 l 111 -227 l 89 -205 q 96 -185 91 -197 q 107 -159 101 -173 q 118 -134 113 -146 q 127 -116 124 -122 l 645 -116 l 667 -137 "},"Ỷ":{"x_min":-0.46875,"x_max":828.078125,"ha":851,"o":"m 233 0 l 233 49 q 284 62 264 55 q 317 75 305 69 q 334 87 329 81 q 340 98 340 93 l 340 358 q 285 470 315 412 q 223 581 254 527 q 162 681 192 635 q 108 759 132 727 q 95 773 102 766 q 77 783 89 779 q 48 789 66 787 q 2 792 30 792 l 0 841 q 44 848 19 844 q 95 854 70 851 q 142 858 120 856 q 178 861 164 861 q 216 852 197 861 q 247 829 235 844 q 299 752 272 795 q 355 660 327 709 q 410 560 383 611 q 461 460 437 509 l 619 760 q 613 788 630 778 q 544 805 596 798 l 544 855 l 828 855 l 828 805 q 759 787 781 796 q 727 760 737 777 l 510 354 l 510 98 q 514 88 510 94 q 531 76 519 82 q 564 62 543 69 q 617 49 585 55 l 617 0 l 233 0 m 558 1121 q 546 1088 558 1102 q 518 1061 535 1073 q 486 1037 502 1048 q 461 1014 469 1026 q 456 989 453 1002 q 484 959 460 976 q 470 952 479 955 q 453 945 462 948 q 435 940 444 942 q 422 938 427 938 q 362 973 377 957 q 351 1004 347 990 q 372 1030 355 1018 q 408 1055 389 1043 q 441 1081 427 1068 q 456 1111 456 1095 q 449 1143 456 1134 q 427 1153 441 1153 q 404 1142 413 1153 q 395 1121 395 1132 q 403 1102 395 1113 q 359 1087 386 1094 q 300 1077 332 1080 l 292 1084 q 290 1098 290 1090 q 303 1137 290 1117 q 338 1171 317 1156 q 389 1196 360 1187 q 449 1206 418 1206 q 499 1199 478 1206 q 533 1180 520 1192 q 552 1153 546 1168 q 558 1121 558 1138 "},"Ő":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 322 922 q 294 933 311 924 q 263 950 277 942 l 368 1237 q 393 1233 376 1235 q 427 1229 409 1232 q 461 1225 445 1227 q 484 1220 477 1222 l 504 1182 l 322 922 m 540 922 q 511 933 529 924 q 481 950 494 942 l 585 1237 q 610 1233 593 1235 q 644 1229 626 1232 q 678 1225 662 1227 q 701 1220 694 1222 l 721 1182 l 540 922 "},"ṭ":{"x_min":3.265625,"x_max":499.28125,"ha":514,"o":"m 499 105 q 346 10 409 40 q 248 -20 284 -20 q 192 -8 219 -20 q 147 25 166 2 q 116 83 128 48 q 105 165 105 118 l 105 546 l 22 546 l 3 570 l 56 631 l 105 631 l 105 772 l 242 874 l 268 851 l 268 631 l 474 631 l 499 606 q 484 582 493 594 q 465 557 474 569 q 446 536 455 546 q 430 522 437 527 q 410 530 422 526 q 381 538 397 534 q 349 543 366 541 q 313 546 331 546 l 268 546 l 268 228 q 272 170 268 194 q 283 131 276 146 q 302 110 291 116 q 325 104 312 104 q 351 106 337 104 q 381 114 364 108 q 419 129 398 119 q 469 154 440 139 l 499 105 m 344 -184 q 336 -230 344 -209 q 313 -268 327 -252 q 279 -294 299 -285 q 238 -304 260 -304 q 178 -283 199 -304 q 157 -221 157 -262 q 166 -174 157 -196 q 190 -136 175 -152 q 224 -111 204 -120 q 264 -102 243 -102 q 323 -122 302 -102 q 344 -184 344 -143 "},"Ṕ":{"x_min":20.265625,"x_max":737,"ha":787,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 785 q 72 778 96 782 q 29 771 49 775 l 20 834 q 101 850 56 843 q 194 863 146 858 q 292 871 243 868 q 386 875 341 875 q 529 859 465 875 q 640 813 594 843 q 711 738 686 782 q 737 635 737 693 q 724 548 737 588 q 689 478 711 509 q 638 423 667 447 q 577 384 609 399 q 512 360 545 368 q 449 353 479 353 q 388 358 418 353 q 335 373 358 363 l 314 444 q 363 427 342 431 q 408 424 385 424 q 466 434 437 424 q 516 467 494 445 q 552 524 538 489 q 566 607 566 558 q 550 691 566 655 q 505 753 534 728 q 436 790 476 777 q 348 803 396 803 q 320 802 334 803 q 292 802 306 802 l 292 90 q 296 82 292 86 q 313 71 300 77 q 348 61 325 66 q 405 49 370 55 l 405 0 l 29 0 m 288 922 q 264 941 277 927 q 242 967 252 954 l 490 1198 q 524 1178 505 1189 q 561 1157 543 1167 q 592 1137 578 1146 q 611 1122 605 1127 l 617 1086 l 288 922 "},"Ž":{"x_min":35.265625,"x_max":708.0625,"ha":757,"o":"m 708 239 q 705 184 706 217 q 703 117 704 151 q 701 51 702 83 q 699 0 700 19 l 59 0 l 35 35 l 491 767 l 226 767 q 202 755 215 767 q 175 722 188 743 q 150 672 162 701 q 130 608 138 643 l 71 621 l 96 865 q 130 859 115 861 q 160 855 145 856 q 190 855 174 855 l 678 855 l 701 821 l 248 88 l 557 88 q 583 98 571 88 q 605 129 594 108 q 626 181 615 150 q 650 254 637 212 l 708 239 m 439 939 l 346 939 l 162 1162 q 181 1186 171 1175 q 202 1204 191 1197 l 394 1076 l 582 1204 q 603 1186 594 1197 q 621 1162 613 1175 l 439 939 "},"ƪ":{"x_min":10,"x_max":740.765625,"ha":541,"o":"m 208 823 q 247 831 230 823 q 279 852 265 840 q 270 902 275 880 q 256 941 265 925 q 236 966 248 957 q 209 976 225 976 q 187 970 198 976 q 166 955 176 965 q 151 931 157 945 q 146 899 146 917 q 162 843 146 863 q 208 823 178 823 m 10 864 q 26 931 10 897 q 74 991 42 964 q 151 1034 105 1017 q 254 1051 196 1051 q 347 1031 309 1051 q 409 979 385 1011 q 443 904 432 946 q 454 818 454 862 q 447 608 454 715 q 433 398 441 501 q 419 196 425 294 q 413 14 413 99 q 418 -119 413 -66 q 434 -201 423 -171 q 461 -242 445 -230 q 499 -254 477 -254 q 534 -242 518 -254 q 557 -213 549 -230 q 566 -177 566 -196 q 558 -143 567 -157 q 566 -136 557 -141 q 592 -125 576 -131 q 628 -113 608 -119 q 666 -101 647 -106 q 700 -93 684 -96 q 722 -91 715 -91 l 740 -128 q 722 -198 742 -161 q 664 -264 701 -234 q 573 -314 626 -294 q 455 -334 519 -334 q 363 -312 403 -334 q 297 -252 323 -291 q 256 -156 270 -213 q 243 -26 243 -99 q 249 174 243 73 q 263 373 255 276 q 277 559 271 470 q 284 726 284 649 l 283 754 q 228 720 256 731 q 170 710 199 710 q 53 750 96 710 q 10 864 10 790 "},"Î":{"x_min":-10.171875,"x_max":449.65625,"ha":454,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 m 449 962 q 431 938 441 949 q 410 922 421 927 l 219 1032 l 30 922 q 9 938 19 927 q -10 962 0 949 l 179 1183 l 261 1183 l 449 962 "},"e":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 "},"Ề":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 592 962 q 574 938 584 949 q 553 922 564 927 l 362 1032 l 173 922 q 152 938 162 927 q 132 962 142 949 l 322 1183 l 404 1183 l 592 962 m 493 1234 q 474 1209 484 1221 q 453 1193 464 1198 l 128 1352 l 134 1394 q 154 1411 139 1400 q 188 1433 170 1421 q 222 1455 206 1444 q 246 1469 238 1465 l 493 1234 "},"Ĕ":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 604 1144 q 556 1050 583 1089 q 498 986 529 1011 q 433 949 467 961 q 364 938 399 938 q 292 949 327 938 q 226 986 257 961 q 169 1050 196 1011 q 122 1144 143 1089 q 133 1157 126 1150 q 146 1170 139 1164 q 161 1182 153 1177 q 173 1190 168 1187 q 213 1136 190 1158 q 262 1098 236 1113 q 313 1075 287 1082 q 362 1068 339 1068 q 412 1075 385 1068 q 464 1097 438 1082 q 512 1135 489 1112 q 552 1190 535 1158 q 565 1182 558 1187 q 580 1170 573 1177 q 593 1157 587 1164 q 604 1144 600 1150 "},"ị":{"x_min":43,"x_max":385.203125,"ha":417,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 m 321 855 q 312 813 321 832 q 288 780 303 794 q 252 759 272 766 q 206 752 231 752 q 171 756 187 752 q 141 770 154 760 q 121 793 128 779 q 114 827 114 807 q 122 869 114 850 q 146 901 131 888 q 182 922 162 915 q 227 930 203 930 q 262 925 245 930 q 292 912 279 921 q 313 888 305 902 q 321 855 321 874 m 306 -184 q 298 -230 306 -209 q 275 -268 289 -252 q 241 -294 261 -285 q 200 -304 222 -304 q 140 -283 161 -304 q 119 -221 119 -262 q 128 -174 119 -196 q 152 -136 137 -152 q 186 -111 166 -120 q 226 -102 205 -102 q 285 -122 264 -102 q 306 -184 306 -143 "},"Ṃ":{"x_min":35.953125,"x_max":1125.84375,"ha":1176,"o":"m 1107 805 q 1067 800 1090 805 q 1020 786 1045 795 l 1027 90 q 1052 70 1027 82 q 1125 49 1077 59 l 1125 0 l 771 0 l 771 49 q 844 70 817 59 q 871 90 871 81 l 866 642 l 578 0 l 514 0 l 232 641 l 227 90 q 249 70 227 82 q 320 49 271 59 l 320 0 l 35 0 l 35 49 q 105 70 82 59 q 128 90 128 81 l 135 781 q 87 800 111 795 q 42 805 62 805 l 42 855 l 277 855 q 289 852 284 855 q 300 844 295 850 q 311 827 305 838 q 325 798 317 816 l 575 231 l 829 798 q 844 829 838 818 q 855 846 850 840 q 866 853 861 852 q 877 855 871 855 l 1107 855 l 1107 805 m 673 -184 q 665 -230 673 -209 q 642 -268 656 -252 q 608 -294 628 -285 q 567 -304 589 -304 q 507 -283 528 -304 q 486 -221 486 -262 q 495 -174 486 -196 q 519 -136 504 -152 q 553 -111 533 -120 q 593 -102 572 -102 q 652 -122 631 -102 q 673 -184 673 -143 "},"◌":{"x_min":50.859375,"x_max":672.125,"ha":723,"o":"m 330 588 q 339 611 330 602 q 361 621 348 621 q 384 611 375 621 q 394 588 394 602 q 384 565 394 574 q 361 556 375 556 q 339 565 348 556 q 330 588 330 574 m 330 31 q 339 54 330 45 q 361 64 348 64 q 384 54 375 64 q 394 31 394 45 q 384 9 394 18 q 361 0 375 0 q 339 9 348 0 q 330 31 330 18 m 438 579 q 450 594 442 589 q 467 600 458 600 q 490 589 481 600 q 500 566 500 579 q 489 544 500 553 q 467 535 479 535 q 445 545 454 535 q 436 568 436 555 q 438 579 436 573 m 225 64 q 238 79 229 74 q 256 85 248 85 q 278 74 269 85 q 288 52 288 64 q 277 30 288 39 q 255 21 267 21 q 232 31 241 21 q 223 52 223 41 q 223 58 223 56 q 225 64 224 61 m 535 530 q 558 540 546 540 q 580 530 571 540 q 590 507 590 521 q 580 484 590 493 q 558 475 571 475 q 536 485 545 475 q 527 507 527 495 q 535 530 527 520 m 141 135 q 163 146 151 146 q 187 136 177 146 q 197 113 197 127 q 187 90 197 100 q 164 81 178 81 q 141 90 151 81 q 132 113 132 100 q 141 135 132 126 m 606 447 q 612 449 609 448 q 618 450 615 450 q 640 440 630 450 q 651 417 651 431 q 641 395 651 405 q 617 385 632 385 q 596 394 605 385 q 587 416 587 403 q 592 434 587 426 q 606 447 597 443 m 91 233 q 104 236 97 236 q 127 227 118 236 q 137 204 137 218 q 127 181 137 191 q 104 171 118 171 q 81 180 91 171 q 72 204 72 190 q 77 221 72 214 q 91 233 82 229 m 639 343 q 662 333 653 343 q 672 310 672 324 q 662 288 672 297 q 640 279 653 279 l 637 279 q 616 288 625 279 q 607 309 607 297 q 617 332 607 323 q 639 343 627 341 m 82 342 q 105 332 95 342 q 115 311 115 323 q 105 287 115 297 q 83 278 95 278 l 82 278 q 59 287 68 278 q 50 310 50 297 q 60 332 50 323 q 82 342 69 342 m 630 233 q 645 221 640 229 q 651 204 651 213 q 641 181 651 190 q 618 172 631 172 q 594 181 602 172 q 586 204 586 191 q 596 227 586 219 q 619 236 606 236 q 630 233 625 236 m 116 447 q 131 434 125 443 q 137 416 137 425 q 126 393 137 402 q 103 385 116 385 q 80 395 89 385 q 72 417 72 405 q 81 440 72 431 q 103 450 91 450 q 109 449 107 450 q 116 447 112 448 m 581 137 q 591 114 591 127 q 581 91 591 101 q 558 82 572 82 q 535 91 544 82 q 526 114 526 101 q 534 136 526 127 q 557 146 543 146 q 581 137 570 146 m 186 530 q 197 508 197 521 q 188 484 197 493 q 164 476 179 476 q 141 485 151 476 q 132 506 132 494 q 141 530 132 520 q 164 540 151 540 q 186 530 177 540 m 497 65 q 499 59 498 62 q 500 53 500 56 q 490 31 500 41 q 467 21 481 21 q 445 30 455 21 q 435 54 435 39 q 443 75 435 65 q 465 86 452 86 q 483 80 474 86 q 497 65 492 75 m 284 580 q 287 567 287 574 q 278 544 287 554 q 256 535 270 535 q 233 544 243 535 q 223 567 223 553 q 232 589 223 579 q 256 600 242 600 q 272 594 265 600 q 284 580 280 589 "},"ò":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 488 736 q 476 727 484 732 q 460 718 469 722 q 444 710 452 713 q 430 705 436 707 l 170 960 l 190 998 q 218 1004 197 1000 q 263 1013 239 1008 q 310 1020 288 1017 q 340 1025 332 1024 l 488 736 "},"^":{"x_min":67.828125,"x_max":615.140625,"ha":684,"o":"m 615 430 q 582 404 598 414 q 543 383 566 393 l 518 401 l 326 891 l 156 430 q 139 416 149 423 q 120 403 130 409 q 100 391 109 396 q 83 383 90 386 l 67 401 l 286 991 q 306 1007 294 999 q 330 1024 318 1016 q 354 1039 342 1032 q 376 1051 366 1046 l 615 430 "},"∙":{"x_min":34,"x_max":250,"ha":284,"o":"m 250 480 q 240 433 250 453 q 214 398 230 412 q 176 376 198 383 q 129 369 154 369 q 92 374 110 369 q 62 389 75 379 q 41 416 49 400 q 34 457 34 433 q 43 503 34 482 q 70 538 53 524 q 108 561 86 553 q 154 569 130 569 q 190 563 173 569 q 220 547 207 558 q 241 520 233 537 q 250 480 250 503 "},"ǘ":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 627 859 q 619 813 627 834 q 596 775 610 791 q 562 749 581 758 q 520 740 542 740 q 461 761 481 740 q 440 822 440 782 q 449 869 440 847 q 472 907 458 891 q 506 932 487 923 q 546 942 525 942 q 606 921 584 942 q 627 859 627 901 m 341 859 q 333 813 341 834 q 310 775 324 791 q 276 749 296 758 q 235 740 257 740 q 175 761 196 740 q 154 822 154 782 q 163 869 154 847 q 186 907 172 891 q 220 932 201 923 q 260 942 240 942 q 320 921 299 942 q 341 859 341 901 m 350 954 q 336 959 344 955 q 318 967 327 962 q 302 975 309 971 q 291 983 295 980 l 434 1274 q 464 1270 442 1273 q 512 1263 486 1267 q 559 1255 537 1259 q 589 1248 581 1250 l 609 1212 l 350 954 "},"ṉ":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 399 q 535 461 539 436 q 523 500 531 485 q 501 521 515 515 q 467 528 488 528 q 433 523 451 528 q 393 508 415 519 q 344 479 371 498 q 285 433 317 461 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 467 q 120 509 122 493 q 111 533 119 524 q 85 546 103 542 q 33 554 67 550 l 33 602 q 93 610 65 605 q 147 620 121 615 q 197 634 173 626 q 246 651 221 641 l 274 622 l 282 524 q 430 621 361 592 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 m 700 -137 q 693 -157 698 -145 q 682 -183 688 -170 q 670 -208 676 -197 q 662 -227 665 -220 l 144 -227 l 122 -205 q 129 -185 124 -197 q 140 -159 134 -173 q 151 -134 146 -146 q 160 -116 157 -122 l 678 -116 l 700 -137 "},"ū":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 687 886 q 679 866 685 879 q 668 840 674 854 q 657 815 662 826 q 649 797 651 803 l 130 797 l 109 818 q 115 838 111 826 q 126 864 120 850 q 138 889 132 877 q 147 908 143 901 l 665 908 l 687 886 "},"ˆ":{"x_min":12.890625,"x_max":478.140625,"ha":497,"o":"m 478 750 q 460 723 470 737 q 438 705 450 710 l 247 856 l 59 705 q 34 723 47 710 q 12 750 22 737 l 202 1013 l 295 1013 l 478 750 "},"Ẅ":{"x_min":13.5625,"x_max":1174.6875,"ha":1181,"o":"m 1174 805 q 1125 793 1144 799 q 1093 783 1105 788 q 1077 773 1082 778 q 1071 763 1072 768 l 916 40 q 901 15 912 26 q 873 -2 889 5 q 843 -13 858 -9 q 817 -20 827 -17 l 585 595 l 391 40 q 374 15 386 26 q 346 -1 362 5 q 314 -12 330 -8 q 283 -20 297 -17 l 107 758 q 82 785 103 774 q 13 805 61 796 l 13 855 l 345 855 l 345 805 q 293 797 311 802 q 267 785 275 791 q 258 772 259 779 q 258 758 257 765 l 374 261 l 572 855 l 640 855 l 867 261 l 976 763 q 970 777 978 771 q 948 788 963 783 q 914 797 934 793 q 872 805 895 801 l 872 855 l 1174 855 l 1174 805 m 830 1050 q 821 1003 830 1024 q 798 965 813 981 q 764 939 784 949 q 723 930 745 930 q 663 951 684 930 q 643 1012 643 972 q 652 1059 643 1037 q 675 1097 661 1081 q 709 1122 690 1113 q 749 1132 728 1132 q 808 1111 787 1132 q 830 1050 830 1091 m 544 1050 q 535 1003 544 1024 q 513 965 527 981 q 479 939 498 949 q 438 930 460 930 q 378 951 398 930 q 357 1012 357 972 q 366 1059 357 1037 q 389 1097 375 1081 q 423 1122 404 1113 q 463 1132 443 1132 q 523 1111 502 1132 q 544 1050 544 1091 "},"ȷ":{"x_min":-195.1875,"x_max":292,"ha":400,"o":"m 292 72 q 278 -59 292 -5 q 242 -150 264 -113 q 192 -213 220 -188 q 137 -260 165 -239 q 97 -288 119 -275 q 51 -311 74 -301 q 5 -327 27 -321 q -36 -334 -17 -334 q -91 -327 -62 -334 q -142 -310 -119 -320 q -180 -290 -165 -300 q -195 -271 -195 -279 q -180 -245 -195 -262 q -146 -211 -166 -228 q -108 -180 -127 -194 q -78 -161 -88 -166 q -52 -185 -67 -174 q -20 -202 -36 -195 q 12 -213 -3 -209 q 40 -217 27 -217 q 74 -207 58 -217 q 102 -170 90 -197 q 121 -95 114 -143 q 129 29 129 -47 l 129 439 q 128 495 129 474 q 119 527 127 516 q 93 545 111 539 q 39 554 74 550 l 39 602 q 102 612 75 606 q 152 622 129 617 q 197 635 175 628 q 246 651 219 642 l 292 651 l 292 72 "},"č":{"x_min":44,"x_max":605.796875,"ha":633,"o":"m 605 129 q 524 49 561 79 q 453 4 487 20 q 388 -15 419 -11 q 325 -20 357 -20 q 219 2 270 -20 q 129 65 168 24 q 67 166 90 106 q 44 301 44 226 q 71 438 44 374 q 146 548 98 501 q 262 623 195 596 q 410 651 329 651 q 460 647 432 651 q 516 636 489 643 q 566 619 543 629 q 600 597 588 609 q 598 578 601 591 q 591 547 596 564 q 581 509 587 529 q 569 472 575 490 q 556 440 563 454 q 546 420 550 426 l 501 426 q 446 529 478 493 q 359 566 413 566 q 302 552 329 566 q 253 509 274 538 q 219 433 232 480 q 207 322 207 387 q 220 225 207 268 q 258 154 234 183 q 315 109 282 125 q 384 94 348 94 q 421 96 403 94 q 459 106 438 98 q 507 130 481 115 q 569 172 533 146 l 605 129 m 389 722 l 297 722 l 113 979 q 131 1007 122 993 q 153 1026 141 1020 l 344 878 l 533 1026 q 556 1007 544 1020 q 578 979 569 993 l 389 722 "},"’":{"x_min":49.171875,"x_max":308,"ha":360,"o":"m 308 844 q 294 769 308 807 q 259 695 281 730 q 206 630 236 660 q 144 579 177 600 l 100 612 q 140 687 124 645 q 157 773 157 729 q 131 834 157 810 q 60 859 106 858 l 49 910 q 66 923 53 916 q 99 939 80 931 q 139 955 117 947 q 180 969 160 963 q 215 979 199 975 q 239 981 231 982 q 291 922 274 956 q 308 844 308 889 "},"-":{"x_min":35.953125,"x_max":457.796875,"ha":494,"o":"m 457 376 q 451 357 455 368 q 442 335 447 346 q 433 314 438 324 q 426 299 429 304 l 57 299 l 35 320 q 41 338 37 328 q 50 359 45 349 q 59 380 54 370 q 67 397 63 390 l 435 397 l 457 376 "},"Q":{"x_min":37,"x_max":960.609375,"ha":864,"o":"m 641 426 q 624 561 641 496 q 577 677 607 626 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 434 209 517 q 226 292 209 358 q 275 176 244 225 q 347 99 306 127 q 435 71 388 71 q 517 92 479 71 q 582 158 555 114 q 625 270 609 203 q 641 426 641 337 m 960 -84 q 925 -139 944 -114 q 888 -182 907 -164 q 854 -211 870 -201 q 828 -222 838 -222 q 764 -211 796 -222 q 701 -183 733 -201 q 637 -144 668 -166 q 573 -100 605 -122 q 508 -55 540 -77 q 444 -18 476 -34 q 424 -19 435 -19 q 405 -20 414 -20 q 253 15 321 -20 q 137 111 185 51 q 63 249 89 171 q 37 415 37 328 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 739 670 801 q 788 600 764 678 q 812 438 812 521 q 793 305 812 370 q 742 186 775 241 q 663 87 708 131 q 563 17 618 44 q 637 -14 601 3 q 705 -48 672 -32 q 770 -76 738 -65 q 832 -88 801 -88 q 849 -86 840 -88 q 868 -79 857 -84 q 892 -64 878 -74 q 927 -40 907 -55 l 960 -84 "},"ě":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 406 722 l 314 722 l 130 979 q 148 1007 139 993 q 170 1026 158 1020 l 361 878 l 550 1026 q 573 1007 561 1020 q 595 979 585 993 l 406 722 "},"œ":{"x_min":44,"x_max":1075,"ha":1119,"o":"m 805 570 q 712 524 747 570 q 668 394 676 478 l 895 394 q 916 399 910 394 q 922 418 922 404 q 917 462 922 436 q 901 512 913 488 q 865 553 888 536 q 805 570 843 570 m 506 308 q 494 409 506 362 q 461 491 482 456 q 411 545 440 526 q 348 565 382 565 q 285 548 311 565 q 242 499 259 531 q 217 424 225 468 q 209 326 209 380 q 222 225 209 272 q 257 141 235 177 q 308 85 279 106 q 368 65 337 65 q 430 82 404 65 q 473 133 456 100 q 498 209 490 165 q 506 308 506 254 m 1075 373 q 1057 358 1068 366 q 1033 342 1046 350 q 1008 327 1021 334 q 984 317 994 321 l 667 317 q 680 229 669 270 q 713 158 692 188 q 766 111 734 128 q 838 95 797 95 q 876 97 857 95 q 919 109 896 100 q 970 134 942 118 q 1033 175 997 149 q 1043 167 1037 173 q 1054 154 1049 161 q 1063 141 1059 147 q 1069 132 1067 135 q 986 52 1024 82 q 914 6 949 22 q 847 -14 880 -9 q 778 -20 814 -20 q 667 9 721 -20 q 572 93 612 39 q 467 10 527 41 q 337 -20 406 -20 q 219 4 273 -20 q 127 71 166 28 q 66 173 88 114 q 44 301 44 232 q 55 389 44 346 q 87 471 66 432 q 137 543 107 510 q 203 600 166 576 q 282 637 240 623 q 372 651 325 651 q 499 623 441 651 q 596 547 556 596 q 654 596 621 574 q 729 634 684 617 q 824 651 773 651 q 910 638 872 651 q 975 604 947 625 q 1022 555 1003 583 q 1052 496 1041 527 q 1069 433 1064 465 q 1075 373 1075 402 "},"Ộ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 525 -184 q 517 -230 525 -209 q 494 -268 508 -252 q 461 -294 480 -285 q 419 -304 441 -304 q 359 -283 380 -304 q 338 -221 338 -262 q 347 -174 338 -196 q 371 -136 356 -152 q 405 -111 385 -120 q 445 -102 424 -102 q 504 -122 483 -102 q 525 -184 525 -143 m 661 962 q 643 938 653 949 q 622 922 634 927 l 432 1032 l 242 922 q 221 938 231 927 q 202 962 211 949 l 391 1183 l 474 1183 l 661 962 "},"ṩ":{"x_min":52.03125,"x_max":530,"ha":582,"o":"m 530 192 q 515 109 530 144 q 477 51 500 75 q 424 13 454 28 q 365 -7 395 0 q 308 -17 335 -15 q 260 -20 280 -20 q 213 -16 239 -20 q 161 -7 188 -13 q 109 7 135 -1 q 61 29 83 17 q 53 53 56 31 q 52 105 51 75 q 55 169 52 136 q 66 227 58 202 l 120 220 q 143 155 127 184 q 180 105 158 126 q 228 74 202 85 q 284 63 255 63 q 357 80 333 63 q 381 138 381 98 q 367 187 381 166 q 330 227 353 209 q 278 262 307 246 q 218 294 249 277 q 161 325 189 308 q 110 364 133 343 q 74 411 88 385 q 60 469 60 437 q 80 545 60 511 q 135 602 101 579 q 212 638 169 625 q 301 651 255 651 q 360 647 331 651 q 417 636 390 643 q 467 620 444 630 q 506 598 490 611 q 507 576 510 595 q 498 532 505 556 q 483 485 492 508 q 466 451 474 462 l 419 457 q 371 548 402 516 q 294 580 339 580 q 231 561 253 580 q 209 514 209 542 q 219 475 209 492 q 250 443 230 458 q 299 413 270 428 q 364 379 328 398 q 423 347 393 364 q 476 308 452 330 q 515 258 500 286 q 530 192 530 230 m 384 -184 q 375 -230 384 -209 q 352 -268 367 -252 q 319 -294 338 -285 q 278 -304 299 -304 q 217 -283 238 -304 q 197 -221 197 -262 q 206 -174 197 -196 q 229 -136 214 -152 q 263 -111 244 -120 q 304 -102 282 -102 q 363 -122 342 -102 q 384 -184 384 -143 m 384 859 q 375 813 384 834 q 352 775 367 791 q 319 749 338 758 q 278 740 299 740 q 217 761 238 740 q 197 822 197 782 q 206 869 197 847 q 229 907 214 891 q 263 932 244 923 q 304 942 282 942 q 363 921 342 942 q 384 859 384 901 "},"Ậ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 522 -184 q 514 -230 522 -209 q 491 -268 505 -252 q 457 -294 477 -285 q 416 -304 438 -304 q 356 -283 377 -304 q 335 -221 335 -262 q 344 -174 335 -196 q 367 -136 353 -152 q 401 -111 382 -120 q 442 -102 421 -102 q 501 -122 480 -102 q 522 -184 522 -143 m 658 962 q 640 938 650 949 q 619 922 630 927 l 428 1032 l 239 922 q 218 938 227 927 q 198 962 208 949 l 387 1183 l 470 1183 l 658 962 "},"":{"x_min":30.515625,"x_max":230.59375,"ha":231,"o":"m 230 0 l 230 -200 l 204 -200 l 204 -26 l 30 -26 l 30 0 l 230 0 "},"#":{"x_min":48.828125,"x_max":706.703125,"ha":703,"o":"m 585 662 l 689 662 l 706 645 q 701 626 705 637 q 692 602 697 614 q 682 580 687 591 q 675 564 678 569 l 557 564 l 513 410 l 617 410 l 632 391 q 627 373 631 385 q 619 350 623 362 q 610 328 614 339 q 603 312 606 318 l 485 312 l 429 115 q 412 106 423 110 q 390 98 402 102 q 367 92 379 95 q 346 86 355 88 l 328 99 l 389 312 l 271 312 l 215 115 q 198 106 208 110 q 177 98 188 102 l 153 92 q 133 86 142 88 l 115 99 l 176 312 l 63 312 l 48 328 q 53 346 50 335 q 62 369 57 357 q 71 392 67 380 q 79 410 75 403 l 204 410 l 248 564 l 137 564 l 120 580 q 126 598 122 587 q 135 621 130 609 q 144 644 140 633 q 151 662 149 655 l 276 662 l 329 848 q 347 857 337 853 q 369 864 358 861 q 391 869 381 867 q 409 876 402 872 l 429 861 l 371 662 l 489 662 l 542 848 q 560 857 550 853 q 582 864 571 861 q 604 869 594 867 q 623 876 615 872 l 642 861 l 585 662 m 299 410 l 417 410 l 461 564 l 343 564 l 299 410 "},"Ǧ":{"x_min":37,"x_max":807.78125,"ha":836,"o":"m 743 805 q 743 793 746 802 q 734 769 740 783 q 718 739 728 756 q 700 708 709 723 q 682 682 691 693 q 667 665 673 670 l 624 674 q 579 729 602 707 q 532 765 557 752 q 481 784 508 778 q 426 790 455 790 q 386 783 409 790 q 339 760 363 776 q 292 716 315 743 q 250 650 268 689 q 220 556 232 610 q 209 432 209 502 q 230 276 209 341 q 286 169 251 211 q 365 107 321 127 q 458 87 410 87 q 525 93 496 87 q 579 112 555 100 l 579 318 q 576 333 579 326 q 562 347 573 340 q 529 361 551 354 q 469 374 507 367 l 469 424 l 807 424 l 807 374 q 755 349 769 365 q 742 318 742 334 l 742 114 q 647 47 691 73 q 566 6 604 21 q 494 -14 528 -8 q 429 -20 460 -20 q 331 -8 379 -20 q 240 25 283 2 q 159 82 196 47 q 94 163 121 116 q 52 267 67 209 q 37 394 37 325 q 72 596 37 507 q 172 747 108 685 q 322 842 236 809 q 510 875 409 875 q 563 870 532 875 q 626 856 594 865 q 690 834 659 847 q 743 805 721 821 m 492 939 l 399 939 l 215 1162 q 234 1186 224 1175 q 255 1204 244 1197 l 447 1076 l 635 1204 q 656 1186 647 1197 q 674 1162 666 1175 l 492 939 "},"ɂ":{"x_min":37,"x_max":563,"ha":607,"o":"m 101 0 l 101 49 q 186 69 160 59 q 212 90 212 79 l 212 175 q 225 241 212 214 q 259 287 239 267 q 303 324 279 307 q 347 358 327 340 q 381 397 367 375 q 395 449 395 418 q 386 503 395 480 q 362 541 377 526 q 329 563 348 556 q 290 571 310 571 q 260 564 275 571 q 234 546 246 558 q 216 517 223 534 q 209 478 209 499 q 211 456 209 469 q 219 434 213 444 q 185 421 206 427 q 142 408 165 414 q 97 399 120 403 q 58 393 75 394 l 40 413 q 37 428 38 421 q 37 441 37 436 q 60 526 37 488 q 125 592 84 564 q 221 635 166 620 q 339 651 276 651 q 436 638 394 651 q 506 605 478 626 q 548 554 534 583 q 563 490 563 524 q 549 427 563 453 q 513 382 535 402 q 468 345 492 362 q 423 310 444 328 q 387 268 401 291 q 374 212 374 245 l 374 90 q 401 69 374 80 q 483 49 428 59 l 483 0 l 101 0 "},"ꞌ":{"x_min":93.59375,"x_max":293,"ha":387,"o":"m 239 443 q 223 437 233 440 q 199 433 212 435 q 174 430 186 431 q 153 429 162 429 l 93 946 q 111 954 98 949 q 140 965 124 959 q 175 977 157 971 q 210 989 193 984 q 239 999 227 995 q 257 1004 252 1003 l 293 983 l 239 443 "},"Ⱡ":{"x_min":21.625,"x_max":691.46875,"ha":707,"o":"m 691 205 q 685 144 688 176 q 677 83 681 112 q 670 32 673 54 q 663 0 666 10 l 29 0 l 29 49 q 98 70 75 59 q 122 91 122 81 l 122 297 l 36 297 l 21 313 q 26 326 22 317 q 32 345 29 335 q 38 363 35 355 q 44 378 41 372 l 122 378 l 122 458 l 36 458 l 21 474 q 26 487 22 478 q 32 506 29 496 q 38 524 35 516 q 44 539 41 533 l 122 539 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 539 l 492 539 l 509 523 l 485 458 l 292 458 l 292 378 l 492 378 l 509 362 l 485 297 l 292 297 l 292 131 q 297 109 292 119 q 317 94 303 100 q 356 84 332 87 q 418 81 380 81 l 494 81 q 547 88 525 81 q 584 112 568 95 q 614 156 601 129 q 641 223 627 183 l 691 205 "},"Ɵ":{"x_min":37,"x_max":812,"ha":864,"o":"m 637 488 q 611 602 630 548 q 562 697 592 657 q 494 762 533 738 q 409 787 455 787 q 329 766 364 787 q 268 708 294 746 q 228 614 243 670 q 210 488 214 558 l 637 488 m 209 407 q 231 274 212 335 q 280 168 250 213 q 350 97 311 123 q 434 72 390 72 q 514 92 478 72 q 578 154 551 113 q 622 259 606 196 q 640 407 637 322 l 209 407 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 "},"Å":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 478 1059 q 465 1109 478 1092 q 436 1127 451 1127 q 411 1121 422 1127 q 394 1106 401 1115 q 383 1085 387 1097 q 379 1061 379 1073 q 393 1013 379 1029 q 422 996 407 996 q 464 1014 449 996 q 478 1059 478 1032 m 570 1087 q 557 1019 570 1051 q 520 964 543 987 q 468 927 497 941 q 408 914 439 914 q 359 922 381 914 q 321 946 337 930 q 296 984 305 962 q 287 1033 287 1006 q 301 1101 287 1070 q 337 1157 314 1133 q 389 1195 359 1181 q 450 1209 418 1209 q 500 1199 477 1209 q 538 1174 522 1190 q 562 1136 553 1158 q 570 1087 570 1114 "},"Ȫ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 668 1050 q 660 1003 668 1024 q 637 965 651 981 q 603 939 622 949 q 562 930 583 930 q 502 951 522 930 q 481 1012 481 972 q 490 1059 481 1037 q 514 1097 499 1081 q 547 1122 528 1113 q 588 1132 566 1132 q 647 1111 626 1132 q 668 1050 668 1091 m 382 1050 q 374 1003 382 1024 q 351 965 365 981 q 318 939 337 949 q 276 930 298 930 q 216 951 237 930 q 195 1012 195 972 q 204 1059 195 1037 q 228 1097 213 1081 q 262 1122 242 1113 q 302 1132 281 1132 q 361 1111 340 1132 q 382 1050 382 1091 m 728 1298 q 721 1278 726 1290 q 710 1252 716 1265 q 698 1226 703 1238 q 690 1208 693 1214 l 172 1208 l 150 1230 q 157 1250 152 1237 q 168 1275 162 1262 q 179 1300 174 1288 q 188 1319 185 1312 l 706 1319 l 728 1298 "},"ǎ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 392 722 l 299 722 l 116 979 q 134 1007 124 993 q 156 1026 144 1020 l 347 878 l 535 1026 q 559 1007 547 1020 q 581 979 571 993 l 392 722 "},"¸":{"x_min":38.125,"x_max":308,"ha":318,"o":"m 308 -155 q 289 -203 308 -180 q 238 -247 271 -227 q 161 -281 206 -267 q 63 -301 116 -295 l 38 -252 q 122 -223 97 -243 q 148 -182 148 -203 q 132 -149 148 -159 q 86 -136 116 -139 l 88 -133 q 96 -116 91 -131 q 113 -73 102 -102 q 140 10 123 -43 l 223 8 l 197 -59 q 279 -92 250 -69 q 308 -155 308 -116 "},"=":{"x_min":35.953125,"x_max":594.796875,"ha":631,"o":"m 594 306 q 588 288 592 298 q 579 266 584 277 q 570 245 575 255 q 564 230 566 236 l 57 230 l 35 251 q 41 269 37 259 q 50 290 45 279 q 59 311 54 301 q 67 328 63 321 l 573 328 l 594 306 m 594 510 q 588 492 592 502 q 579 470 584 481 q 570 449 575 459 q 564 434 566 439 l 57 434 l 35 455 q 41 473 37 462 q 50 494 45 483 q 59 515 54 505 q 67 532 63 525 l 573 532 l 594 510 "},"ạ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 426 -184 q 418 -230 426 -209 q 395 -268 409 -252 q 362 -294 381 -285 q 320 -304 342 -304 q 260 -283 281 -304 q 239 -221 239 -262 q 248 -174 239 -196 q 272 -136 257 -152 q 306 -111 286 -120 q 346 -102 325 -102 q 405 -122 384 -102 q 426 -184 426 -143 "},"Ǖ":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 705 1050 q 697 1003 705 1024 q 673 965 688 981 q 639 939 659 949 q 598 930 620 930 q 539 951 559 930 q 518 1012 518 972 q 527 1059 518 1037 q 550 1097 536 1081 q 584 1122 565 1113 q 624 1132 603 1132 q 684 1111 662 1132 q 705 1050 705 1091 m 419 1050 q 411 1003 419 1024 q 388 965 402 981 q 354 939 374 949 q 313 930 335 930 q 253 951 274 930 q 232 1012 232 972 q 241 1059 232 1037 q 264 1097 250 1081 q 298 1122 279 1113 q 338 1132 318 1132 q 398 1111 377 1132 q 419 1050 419 1091 m 765 1298 q 757 1278 763 1290 q 746 1252 752 1265 q 735 1226 740 1238 q 727 1208 729 1214 l 208 1208 l 187 1230 q 193 1250 189 1237 q 204 1275 198 1262 q 216 1300 210 1288 q 225 1319 221 1312 l 743 1319 l 765 1298 "},"ú":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 350 705 q 336 709 344 705 q 318 717 327 713 q 302 726 309 721 q 291 734 295 730 l 434 1025 q 464 1021 442 1024 q 512 1014 486 1018 q 559 1005 537 1010 q 589 999 581 1001 l 609 962 l 350 705 "},"˚":{"x_min":33,"x_max":315,"ha":347,"o":"m 223 842 q 209 892 223 875 q 180 910 195 910 q 156 904 166 910 q 138 889 145 898 q 128 868 131 880 q 125 844 125 856 q 138 795 125 812 q 167 779 151 779 q 208 797 193 779 q 223 842 223 815 m 315 870 q 301 802 315 834 q 265 747 287 770 q 213 710 242 724 q 152 697 183 697 q 104 705 126 697 q 66 729 81 713 q 41 767 50 745 q 33 816 33 789 q 46 884 33 852 q 82 940 60 916 q 133 978 104 964 q 194 992 162 992 q 244 982 222 992 q 282 957 266 973 q 306 919 298 941 q 315 870 315 897 "},"¯":{"x_min":53.578125,"x_max":631.421875,"ha":685,"o":"m 631 886 q 624 866 629 879 q 613 840 619 854 q 601 815 607 826 q 593 797 596 803 l 75 797 l 53 818 q 60 838 55 826 q 71 864 65 850 q 82 889 77 877 q 91 908 88 901 l 609 908 l 631 886 "},"u":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 "},"ṛ":{"x_min":32.5625,"x_max":597.515625,"ha":617,"o":"m 593 621 q 597 604 597 618 q 594 568 597 589 q 585 521 591 547 q 574 471 580 496 q 561 426 568 447 q 549 393 554 405 l 499 393 q 491 444 497 420 q 476 487 485 469 q 454 515 467 504 q 424 526 440 526 q 395 520 411 526 q 361 501 379 515 q 324 459 343 486 q 284 387 305 432 l 284 90 q 313 69 284 80 q 404 49 341 59 l 404 0 l 32 0 l 32 49 q 122 90 122 69 l 122 450 q 120 487 122 472 q 117 512 119 503 q 112 527 115 522 q 106 536 109 533 q 96 544 101 541 q 83 549 91 547 q 63 552 75 551 q 32 554 51 553 l 32 602 q 97 612 69 607 q 148 622 124 617 q 194 634 172 627 q 246 651 217 641 l 274 622 l 283 524 q 324 573 301 550 q 374 614 347 596 q 428 641 400 631 q 486 651 457 651 q 540 643 512 651 q 593 621 568 635 m 293 -184 q 284 -230 293 -209 q 262 -268 276 -252 q 228 -294 247 -285 q 187 -304 209 -304 q 127 -283 147 -304 q 106 -221 106 -262 q 115 -174 106 -196 q 138 -136 124 -152 q 172 -111 153 -120 q 213 -102 192 -102 q 272 -122 251 -102 q 293 -184 293 -143 "},"":{"x_min":0,"x_max":318.09375,"ha":319,"o":"m 59 705 q 44 709 52 705 q 27 717 35 713 q 11 726 18 721 q 0 734 4 730 l 143 1025 q 173 1021 151 1024 q 220 1014 195 1018 q 267 1005 245 1010 q 297 999 290 1001 l 318 962 l 59 705 "},"ẻ":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 497 904 q 485 871 497 885 q 457 844 473 856 q 424 820 440 831 q 400 797 408 809 q 395 772 391 785 q 422 742 398 759 q 409 735 417 738 q 391 728 400 731 q 373 723 382 725 q 360 721 365 721 q 300 756 315 740 q 290 787 285 773 q 310 813 294 801 q 346 838 327 826 q 380 864 365 851 q 395 894 395 878 q 387 926 395 917 q 365 936 379 936 q 342 925 351 936 q 334 904 334 915 q 341 885 334 896 q 297 870 324 877 q 238 860 270 863 l 231 867 q 229 881 229 873 q 242 920 229 900 q 277 954 255 939 q 327 979 298 970 q 387 989 356 989 q 437 982 416 989 q 471 963 458 975 q 491 936 484 951 q 497 904 497 921 "},"Ṏ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 699 1123 q 670 1063 687 1096 q 630 1001 652 1030 q 580 954 607 973 q 521 935 552 935 q 465 946 492 935 q 414 970 439 957 q 364 994 389 983 q 314 1005 339 1005 q 286 1000 298 1005 q 262 985 274 994 q 240 961 251 975 q 217 928 229 946 l 166 946 q 195 1007 178 974 q 235 1069 212 1040 q 284 1117 257 1098 q 343 1137 311 1137 q 402 1126 374 1137 q 456 1102 430 1115 q 504 1078 481 1089 q 549 1067 527 1067 q 602 1085 579 1067 q 647 1144 624 1104 l 699 1123 m 668 1292 q 660 1246 668 1267 q 637 1208 651 1224 q 603 1182 622 1191 q 562 1172 583 1172 q 502 1193 522 1172 q 481 1255 481 1214 q 490 1302 481 1280 q 514 1340 499 1323 q 547 1365 528 1356 q 588 1374 566 1374 q 647 1354 626 1374 q 668 1292 668 1334 m 382 1292 q 374 1246 382 1267 q 351 1208 365 1224 q 318 1182 337 1191 q 276 1172 298 1172 q 216 1193 237 1172 q 195 1255 195 1214 q 204 1302 195 1280 q 228 1340 213 1323 q 262 1365 242 1356 q 302 1374 281 1374 q 361 1354 340 1374 q 382 1292 382 1334 "},"ẗ":{"x_min":3.265625,"x_max":499.28125,"ha":514,"o":"m 499 105 q 346 10 409 40 q 248 -20 284 -20 q 192 -8 219 -20 q 147 25 166 2 q 116 83 128 48 q 105 165 105 118 l 105 546 l 22 546 l 3 570 l 56 631 l 105 631 l 105 772 l 242 874 l 268 851 l 268 631 l 474 631 l 499 606 q 484 582 493 594 q 465 557 474 569 q 446 536 455 546 q 430 522 437 527 q 410 530 422 526 q 381 538 397 534 q 349 543 366 541 q 313 546 331 546 l 268 546 l 268 228 q 272 170 268 194 q 283 131 276 146 q 302 110 291 116 q 325 104 312 104 q 351 106 337 104 q 381 114 364 108 q 419 129 398 119 q 469 154 440 139 l 499 105 m 487 1043 q 479 996 487 1018 q 456 958 470 974 q 422 932 441 942 q 381 923 402 923 q 321 944 341 923 q 300 1005 300 965 q 309 1052 300 1030 q 333 1090 318 1074 q 366 1115 347 1106 q 406 1125 385 1125 q 466 1104 445 1125 q 487 1043 487 1084 m 201 1043 q 193 996 201 1018 q 170 958 184 974 q 136 932 156 942 q 95 923 117 923 q 35 944 56 923 q 14 1005 14 965 q 23 1052 14 1030 q 47 1090 32 1074 q 81 1115 61 1106 q 120 1125 100 1125 q 180 1104 159 1125 q 201 1043 201 1084 "},"ẵ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 590 927 q 542 833 569 872 q 484 769 515 794 q 419 732 453 744 q 350 721 385 721 q 278 732 313 721 q 212 769 243 744 q 155 833 181 794 q 108 927 128 872 q 119 940 112 933 q 132 953 125 947 q 146 965 139 960 q 159 973 153 970 q 199 919 176 941 q 247 881 222 896 q 299 858 273 865 q 347 851 325 851 q 398 858 371 851 q 449 880 424 865 q 498 918 475 895 q 538 973 521 941 q 551 965 544 970 q 565 953 558 960 q 579 940 573 947 q 590 927 585 933 m 616 1166 q 586 1105 604 1138 q 546 1044 569 1073 q 496 996 524 1016 q 438 977 469 977 q 382 988 408 977 q 330 1013 356 999 q 281 1037 305 1026 q 230 1048 256 1048 q 202 1043 215 1048 q 179 1028 190 1038 q 157 1004 168 1018 q 133 970 145 989 l 82 989 q 112 1050 94 1017 q 151 1112 129 1083 q 201 1160 174 1141 q 259 1179 228 1179 q 319 1168 290 1179 q 372 1144 347 1157 q 421 1119 398 1130 q 465 1108 444 1108 q 518 1127 496 1108 q 564 1186 541 1146 l 616 1166 "},"ữ":{"x_min":22.9375,"x_max":940,"ha":940,"o":"m 940 706 q 924 650 940 680 q 876 590 908 621 q 792 528 843 559 q 672 469 741 497 l 672 192 q 672 157 672 171 q 675 134 673 144 q 679 120 676 125 q 687 111 682 114 q 710 109 695 106 q 759 127 724 112 l 776 76 q 721 43 751 59 q 662 11 691 26 q 612 -11 634 -2 q 582 -20 590 -20 q 558 -15 570 -20 q 537 1 547 -11 q 520 35 528 13 q 509 92 513 57 q 433 33 466 55 q 372 0 399 11 q 321 -16 344 -12 q 276 -20 298 -20 q 214 -11 244 -20 q 159 20 183 -2 q 119 84 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 630 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 313 102 298 107 q 346 97 327 97 q 377 100 361 97 q 414 112 394 103 q 457 137 434 122 q 509 177 481 153 l 509 467 q 506 516 509 497 q 495 544 504 534 q 468 558 486 554 q 419 564 450 562 l 419 611 q 542 628 487 617 q 646 650 597 638 l 672 619 l 671 540 q 716 569 698 554 q 743 599 733 585 q 757 627 753 614 q 762 651 762 640 q 749 688 762 671 q 718 722 737 706 l 894 802 q 926 761 913 787 q 940 706 940 734 m 658 933 q 628 873 646 905 q 588 811 611 840 q 538 764 566 783 q 480 745 511 745 q 424 756 451 745 q 373 780 398 767 q 323 804 347 793 q 272 816 298 816 q 244 810 257 816 q 221 795 232 805 q 199 771 210 786 q 175 738 187 756 l 124 756 q 154 817 137 784 q 193 879 171 850 q 243 927 216 908 q 301 947 270 947 q 361 935 333 947 q 414 911 389 924 q 463 887 440 898 q 507 876 486 876 q 560 894 538 876 q 606 954 583 913 l 658 933 "},"ɗ":{"x_min":44,"x_max":951.5,"ha":779,"o":"m 951 956 q 938 934 951 949 q 906 901 925 919 q 864 866 887 884 q 820 838 840 849 q 802 895 812 874 q 781 928 792 916 q 760 942 771 939 q 739 946 749 946 q 704 932 718 946 q 682 891 690 919 q 671 820 674 863 q 668 714 668 776 l 668 202 q 669 163 668 179 q 672 138 670 148 q 676 123 674 128 q 683 112 679 117 q 690 107 686 109 q 701 108 694 106 q 721 114 709 109 q 754 126 734 118 l 773 77 q 710 38 742 56 q 651 7 678 20 q 602 -13 623 -6 q 572 -21 581 -21 q 552 -15 562 -21 q 534 4 542 -9 q 520 40 526 17 q 510 98 514 64 q 453 44 478 66 q 402 7 427 22 q 350 -13 377 -6 q 292 -20 324 -20 q 202 2 246 -20 q 122 65 157 24 q 65 166 87 106 q 44 301 44 226 q 68 434 44 371 q 137 545 93 497 q 241 622 181 594 q 373 651 302 651 q 436 644 404 651 q 505 612 468 638 l 505 707 q 511 791 505 753 q 531 861 518 829 q 563 919 544 892 q 608 970 583 946 q 647 1002 626 987 q 691 1027 668 1017 q 736 1044 713 1038 q 782 1051 760 1051 q 847 1039 816 1051 q 900 1013 877 1028 q 937 982 924 998 q 951 956 951 966 m 505 182 l 505 479 q 446 539 480 517 q 362 561 411 561 q 300 547 328 561 q 251 507 272 534 q 218 437 230 479 q 207 337 207 395 q 220 241 207 283 q 255 169 234 199 q 305 124 277 140 q 360 109 332 109 q 431 127 398 109 q 505 182 465 146 "},"é":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 322 705 q 308 709 316 705 q 290 717 299 713 q 275 726 282 721 q 263 734 267 730 l 406 1025 q 437 1021 415 1024 q 484 1014 459 1018 q 531 1005 509 1010 q 561 999 554 1001 l 581 962 l 322 705 "},"ḃ":{"x_min":2.25,"x_max":695,"ha":746,"o":"m 562 859 q 553 813 562 834 q 530 775 545 791 q 497 749 516 758 q 455 740 477 740 q 395 761 416 740 q 375 822 375 782 q 383 869 375 847 q 407 907 392 891 q 441 932 421 923 q 481 942 460 942 q 540 921 519 942 q 562 859 562 901 m 545 282 q 533 397 545 349 q 501 475 521 445 q 453 520 480 506 q 394 534 425 534 q 334 517 371 534 q 248 459 297 501 l 248 148 q 343 106 302 119 q 404 94 385 94 q 466 108 440 94 q 510 149 492 123 q 536 208 528 174 q 545 282 545 242 m 695 343 q 680 262 695 304 q 641 179 666 219 q 582 103 616 139 q 508 39 547 66 q 425 -4 469 11 q 338 -20 381 -20 q 291 -13 320 -20 q 229 4 263 -7 q 158 31 196 15 q 85 65 121 47 l 85 858 q 82 906 85 889 q 71 931 80 923 q 46 942 62 940 q 2 949 30 945 l 2 996 q 62 1007 34 1002 q 116 1018 90 1012 q 167 1032 142 1025 q 218 1051 192 1040 q 225 1043 220 1048 q 235 1034 230 1039 q 248 1023 241 1029 l 247 543 q 314 593 281 572 q 377 626 347 613 q 433 645 407 639 q 478 651 458 651 q 568 629 528 651 q 636 567 608 607 q 679 471 664 527 q 695 343 695 414 "},"B":{"x_min":20.265625,"x_max":766,"ha":835,"o":"m 766 241 q 741 136 766 183 q 672 57 717 90 q 562 7 626 25 q 415 -10 497 -10 q 378 -9 400 -10 q 330 -8 356 -9 q 275 -7 303 -7 q 219 -5 246 -6 q 83 0 155 -2 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 790 q 72 784 96 787 q 29 777 48 780 l 20 834 q 92 848 50 841 q 179 861 133 856 q 271 871 225 867 q 358 875 318 875 q 498 862 437 875 q 602 826 559 849 q 668 768 645 802 q 691 691 691 734 q 651 566 691 618 q 536 490 612 514 q 629 459 586 482 q 701 404 671 437 q 749 329 732 371 q 766 241 766 288 m 383 433 q 331 430 352 433 q 292 424 311 427 l 292 86 q 295 77 292 81 q 339 66 315 69 q 390 63 363 63 q 538 107 488 63 q 588 228 588 151 q 578 302 588 265 q 544 367 568 338 q 481 415 520 397 q 383 433 442 433 m 316 803 l 304 803 q 292 802 298 803 l 292 502 l 304 502 q 414 515 372 502 q 479 551 455 529 q 510 601 502 573 q 519 658 519 629 q 509 719 519 692 q 475 764 499 746 q 412 793 451 783 q 316 803 373 803 "},"…":{"x_min":89,"x_max":1074,"ha":1137,"o":"m 1074 89 q 1064 40 1074 62 q 1037 3 1054 18 q 998 -19 1021 -11 q 950 -27 975 -27 q 912 -21 930 -27 q 881 -5 894 -16 q 859 22 867 5 q 852 64 852 40 q 862 113 852 91 q 889 149 872 134 q 929 172 906 164 q 976 181 952 181 q 1013 175 995 181 q 1044 158 1030 170 q 1065 130 1057 147 q 1074 89 1074 113 m 692 89 q 682 40 692 62 q 655 3 672 18 q 616 -19 639 -11 q 568 -27 593 -27 q 530 -21 548 -27 q 499 -5 512 -16 q 477 22 485 5 q 470 64 470 40 q 480 113 470 91 q 507 149 490 134 q 547 172 524 164 q 594 181 570 181 q 631 175 613 181 q 662 158 648 170 q 683 130 675 147 q 692 89 692 113 m 311 89 q 301 40 311 62 q 274 3 291 18 q 235 -19 258 -11 q 187 -27 212 -27 q 149 -21 167 -27 q 118 -5 131 -16 q 96 22 104 5 q 89 64 89 40 q 99 113 89 91 q 126 149 109 134 q 166 172 143 164 q 213 181 189 181 q 250 175 232 181 q 281 158 267 170 q 302 130 294 147 q 311 89 311 113 "},"Ủ":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 602 1121 q 591 1088 602 1102 q 562 1061 579 1073 q 530 1037 546 1048 q 505 1014 513 1026 q 501 989 497 1002 q 528 959 504 976 q 514 952 523 955 q 497 945 506 948 q 479 940 488 942 q 466 938 471 938 q 406 973 421 957 q 395 1004 391 990 q 416 1030 399 1018 q 452 1055 433 1043 q 486 1081 471 1068 q 500 1111 500 1095 q 493 1143 500 1134 q 471 1153 485 1153 q 448 1142 457 1153 q 439 1121 439 1132 q 447 1102 439 1113 q 403 1087 430 1094 q 344 1077 376 1080 l 336 1084 q 334 1098 334 1090 q 348 1137 334 1117 q 382 1171 361 1156 q 433 1196 404 1187 q 493 1206 462 1206 q 543 1199 522 1206 q 577 1180 564 1192 q 596 1153 590 1168 q 602 1121 602 1138 "},"H":{"x_min":29.078125,"x_max":907.59375,"ha":949,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 488 l 644 488 l 644 763 q 621 783 644 771 q 551 805 599 795 l 551 855 l 907 855 l 907 805 q 837 784 861 795 q 814 763 814 772 l 814 90 q 836 70 814 82 q 907 49 858 59 l 907 0 l 551 0 l 551 49 q 620 70 597 59 q 644 90 644 81 l 644 407 l 292 407 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 "},"î":{"x_min":-21.03125,"x_max":443.546875,"ha":417,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 m 443 750 q 425 723 435 737 q 404 705 415 710 l 213 856 l 24 705 q 0 723 12 710 q -21 750 -11 737 l 168 1013 l 261 1013 l 443 750 "},"ư":{"x_min":22.9375,"x_max":940,"ha":940,"o":"m 940 706 q 924 650 940 680 q 876 590 908 621 q 792 528 843 559 q 672 469 741 497 l 672 192 q 672 157 672 171 q 675 134 673 144 q 679 120 676 125 q 687 111 682 114 q 710 109 695 106 q 759 127 724 112 l 776 76 q 721 43 751 59 q 662 11 691 26 q 612 -11 634 -2 q 582 -20 590 -20 q 558 -15 570 -20 q 537 1 547 -11 q 520 35 528 13 q 509 92 513 57 q 433 33 466 55 q 372 0 399 11 q 321 -16 344 -12 q 276 -20 298 -20 q 214 -11 244 -20 q 159 20 183 -2 q 119 84 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 630 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 313 102 298 107 q 346 97 327 97 q 377 100 361 97 q 414 112 394 103 q 457 137 434 122 q 509 177 481 153 l 509 467 q 506 516 509 497 q 495 544 504 534 q 468 558 486 554 q 419 564 450 562 l 419 611 q 542 628 487 617 q 646 650 597 638 l 672 619 l 671 540 q 716 569 698 554 q 743 599 733 585 q 757 627 753 614 q 762 651 762 640 q 749 688 762 671 q 718 722 737 706 l 894 802 q 926 761 913 787 q 940 706 940 734 "},"−":{"x_min":35.953125,"x_max":549.359375,"ha":585,"o":"m 549 409 q 543 391 547 401 q 534 369 539 380 q 525 348 529 358 q 518 333 520 338 l 57 333 l 35 354 q 41 372 37 361 q 50 393 45 382 q 59 414 54 404 q 67 431 63 424 l 526 431 l 549 409 "},"ɓ":{"x_min":85,"x_max":695,"ha":746,"o":"m 541 292 q 528 406 541 360 q 496 480 516 452 q 447 521 475 508 q 390 534 420 534 q 331 517 366 534 q 248 459 297 501 l 248 148 q 344 106 302 119 q 410 94 386 94 q 469 110 444 94 q 510 153 494 126 q 533 217 526 181 q 541 292 541 253 m 695 343 q 680 262 695 304 q 641 179 666 219 q 583 103 617 139 q 510 39 549 66 q 428 -4 471 11 q 343 -20 386 -20 q 295 -13 324 -20 q 232 4 266 -7 q 159 31 197 15 q 85 65 121 47 l 85 567 q 92 708 85 649 q 116 813 99 768 q 157 892 132 857 q 216 958 181 926 q 261 992 235 975 q 317 1022 287 1008 q 380 1043 347 1035 q 444 1051 413 1051 q 519 1039 482 1051 q 583 1011 555 1027 q 629 979 612 995 q 646 954 646 962 q 633 928 646 945 q 600 892 619 910 q 563 859 582 874 q 535 839 545 844 q 503 875 520 857 q 465 910 485 894 q 422 935 444 925 q 376 946 400 946 q 331 933 354 946 q 290 884 308 920 q 259 788 271 849 q 248 629 248 726 l 247 543 q 313 593 281 572 q 374 626 345 613 q 428 645 403 639 q 472 651 453 651 q 562 631 521 651 q 632 571 603 611 q 678 475 662 532 q 695 343 695 417 "},"ḧ":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 388 q 534 457 539 430 q 521 499 530 483 q 497 521 511 515 q 462 528 482 528 q 381 503 423 528 q 285 433 339 479 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 859 q 120 904 122 888 q 110 928 118 920 q 83 941 101 937 q 33 949 65 945 l 33 996 q 101 1007 70 1002 q 156 1019 131 1013 q 206 1033 182 1025 q 255 1051 230 1040 l 285 1023 l 285 530 q 431 622 363 594 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 m 647 1219 q 639 1172 647 1194 q 616 1134 630 1151 q 582 1109 601 1118 q 541 1099 562 1099 q 481 1120 501 1099 q 460 1182 460 1141 q 469 1229 460 1207 q 493 1267 478 1250 q 526 1292 507 1283 q 567 1301 545 1301 q 626 1281 605 1301 q 647 1219 647 1260 m 361 1219 q 353 1172 361 1194 q 330 1134 344 1151 q 297 1109 316 1118 q 255 1099 277 1099 q 195 1120 216 1099 q 174 1182 174 1141 q 183 1229 174 1207 q 207 1267 192 1250 q 241 1292 221 1283 q 281 1301 260 1301 q 340 1281 319 1301 q 361 1219 361 1260 "},"ā":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 645 886 q 637 866 642 879 q 626 840 632 854 q 615 815 620 826 q 607 797 609 803 l 88 797 l 67 818 q 73 838 69 826 q 84 864 78 850 q 96 889 90 877 q 105 908 101 901 l 623 908 l 645 886 "},"Ṥ":{"x_min":69.75,"x_max":656,"ha":712,"o":"m 656 255 q 646 193 656 225 q 619 130 637 161 q 573 72 601 100 q 508 24 545 45 q 423 -7 470 4 q 318 -20 376 -20 q 262 -15 294 -20 q 198 -2 231 -10 q 134 18 165 6 q 79 46 102 30 q 73 59 75 47 q 70 89 71 71 q 69 130 69 107 q 71 176 70 152 q 76 221 73 199 q 84 260 79 243 l 132 257 q 169 184 147 217 q 220 127 192 150 q 279 90 247 103 q 345 77 311 77 q 404 85 376 77 q 454 111 433 94 q 489 152 476 127 q 503 209 503 177 q 484 281 503 251 q 436 334 466 311 q 368 377 406 358 q 289 414 329 396 q 211 454 249 433 q 142 502 172 474 q 94 565 112 529 q 76 651 76 601 q 93 722 76 683 q 149 794 111 761 q 245 851 186 828 q 386 875 304 875 q 457 870 422 875 q 523 857 493 865 q 577 837 554 849 q 613 812 600 826 q 614 800 616 809 q 608 778 613 790 q 597 750 604 765 q 582 721 590 735 q 567 697 575 708 q 554 681 560 686 l 510 685 q 475 739 495 717 q 435 773 456 760 q 392 791 414 786 q 351 797 370 797 q 294 788 318 797 q 254 764 270 779 q 232 730 239 749 q 225 693 225 712 q 243 636 225 661 q 292 590 262 611 q 361 550 322 569 q 440 510 399 531 q 519 466 481 490 q 588 413 558 443 q 637 344 618 383 q 656 255 656 306 m 273 922 q 249 941 261 927 q 227 967 236 954 l 474 1198 q 509 1178 490 1189 q 545 1157 528 1167 q 576 1137 562 1146 q 595 1122 590 1127 l 601 1086 l 273 922 m 440 1282 q 432 1235 440 1257 q 409 1197 423 1214 q 375 1172 394 1181 q 334 1162 356 1162 q 274 1183 295 1162 q 253 1245 253 1204 q 262 1292 253 1270 q 285 1330 271 1313 q 319 1355 300 1346 q 360 1364 339 1364 q 419 1344 398 1364 q 440 1282 440 1323 "},"Ĩ":{"x_min":-46.109375,"x_max":487.640625,"ha":454,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 m 487 1123 q 457 1063 475 1096 q 417 1001 440 1030 q 367 954 395 973 q 309 935 340 935 q 253 946 280 935 q 202 970 227 957 q 152 994 177 983 q 101 1005 127 1005 q 73 1000 86 1005 q 50 985 61 994 q 28 961 39 975 q 4 928 16 946 l -46 946 q -16 1007 -33 974 q 23 1069 0 1040 q 72 1117 45 1098 q 130 1137 99 1137 q 190 1126 162 1137 q 243 1102 218 1115 q 292 1078 269 1089 q 337 1067 315 1067 q 389 1085 367 1067 q 435 1144 412 1104 l 487 1123 "},"*":{"x_min":37.984375,"x_max":577.84375,"ha":615,"o":"m 339 827 l 486 952 q 506 938 493 947 q 534 917 520 928 q 560 896 548 906 q 577 880 572 885 l 571 842 l 374 770 l 556 705 q 553 680 555 697 q 549 647 551 664 q 543 613 546 629 q 538 590 540 598 l 502 577 l 342 710 l 376 522 q 354 511 368 518 q 322 498 339 505 q 290 486 305 492 q 268 480 276 481 l 238 503 l 274 710 l 128 585 q 108 600 121 590 q 81 621 94 610 q 54 642 67 632 q 37 657 42 652 l 43 695 l 241 767 l 59 832 q 61 857 59 841 q 66 891 63 873 q 71 924 68 908 q 76 947 74 940 l 111 961 l 272 826 l 238 1016 q 261 1026 246 1020 q 292 1039 276 1033 q 324 1051 309 1046 q 346 1059 339 1056 l 376 1034 l 339 827 "},"ă":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 590 927 q 542 833 569 872 q 484 769 515 794 q 419 732 453 744 q 350 721 385 721 q 278 732 313 721 q 212 769 243 744 q 155 833 181 794 q 108 927 128 872 q 119 940 112 933 q 132 953 125 947 q 146 965 139 960 q 159 973 153 970 q 199 919 176 941 q 247 881 222 896 q 299 858 273 865 q 347 851 325 851 q 398 858 371 851 q 449 880 424 865 q 498 918 475 895 q 538 973 521 941 q 551 965 544 970 q 565 953 558 960 q 579 940 573 947 q 590 927 585 933 "},"†":{"x_min":37.171875,"x_max":645.546875,"ha":683,"o":"m 645 754 q 629 720 640 742 q 606 674 619 698 q 580 627 593 649 q 559 591 567 604 q 515 614 537 604 q 472 631 494 624 q 427 643 450 639 q 378 650 404 648 q 393 555 381 603 q 427 461 405 506 q 390 318 403 386 q 378 185 378 250 q 385 106 377 145 q 411 25 392 66 q 389 12 405 20 q 354 -2 373 4 q 317 -17 334 -10 q 291 -27 299 -24 l 266 -8 q 281 40 274 15 q 292 90 287 65 q 299 140 297 116 q 302 185 302 164 q 288 319 301 252 q 251 461 276 386 q 285 555 273 506 q 301 650 297 604 q 178 630 237 645 q 59 591 119 616 l 37 626 q 52 659 41 637 q 76 705 63 681 q 102 752 89 729 q 123 788 115 775 q 165 766 145 776 q 207 749 186 756 q 252 737 229 742 q 301 730 275 732 q 283 830 297 784 q 241 923 268 875 q 276 943 254 931 q 324 967 299 955 q 370 989 348 978 q 404 1004 392 999 l 438 982 q 398 856 412 920 q 379 730 383 793 q 503 749 442 735 q 623 788 563 763 l 645 754 "},"°":{"x_min":78,"x_max":420,"ha":497,"o":"m 317 674 q 312 707 317 691 q 300 734 308 722 q 281 753 292 746 q 255 760 270 760 q 227 754 241 760 q 203 737 214 748 q 187 711 193 726 q 181 677 181 696 q 185 645 181 660 q 197 618 189 630 q 216 599 205 606 q 242 592 227 592 q 269 597 256 592 q 293 613 283 602 q 310 639 304 623 q 317 674 317 655 m 420 712 q 402 626 420 665 q 355 557 384 586 q 290 512 326 528 q 220 496 255 496 q 163 507 189 496 q 118 538 137 519 q 88 583 99 557 q 78 639 78 610 q 95 725 78 686 q 141 794 113 765 q 205 839 170 823 q 277 856 241 856 q 332 844 306 856 q 378 813 358 832 q 408 767 397 793 q 420 712 420 741 "},"Ʌ":{"x_min":8.8125,"x_max":900.6875,"ha":923,"o":"m 8 49 q 81 66 54 58 q 113 94 107 75 l 368 799 q 388 826 373 814 q 422 848 403 839 q 463 864 442 858 q 500 875 484 870 l 809 94 q 837 65 816 76 q 900 49 857 54 l 900 0 l 554 0 l 554 49 q 626 63 609 53 q 636 92 643 73 l 415 661 l 215 94 q 213 77 211 84 q 226 65 216 70 q 255 56 236 60 q 301 49 273 52 l 301 0 l 8 0 l 8 49 "},"ồ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 609 750 q 591 723 600 737 q 569 705 581 710 l 379 856 l 189 705 q 166 723 178 710 q 144 750 153 737 l 333 1013 l 426 1013 l 609 750 m 488 1056 q 476 1048 484 1052 q 460 1039 469 1043 q 444 1031 452 1034 q 430 1025 436 1027 l 170 1281 l 190 1319 q 218 1325 197 1321 q 263 1333 239 1329 q 310 1341 288 1338 q 340 1345 332 1345 l 488 1056 "},"ŵ":{"x_min":8.8125,"x_max":986.8125,"ha":996,"o":"m 986 581 q 955 572 967 576 q 936 563 944 567 q 925 553 929 559 q 918 539 921 547 l 769 40 q 752 14 765 25 q 724 -2 739 4 q 694 -13 709 -9 q 671 -20 680 -17 l 498 376 l 360 40 q 343 14 355 24 q 316 -3 330 3 q 288 -14 302 -10 q 265 -20 274 -17 l 82 539 q 60 562 78 551 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 270 573 286 578 q 247 563 254 569 q 239 551 240 557 q 241 539 239 545 l 343 219 l 505 631 l 557 631 l 727 219 l 825 539 q 827 553 828 546 q 821 564 827 559 q 802 573 815 569 q 766 581 789 577 l 766 631 l 986 631 l 986 581 m 746 750 q 728 723 737 737 q 706 705 718 710 l 516 856 l 326 705 q 303 723 315 710 q 281 750 290 737 l 470 1013 l 563 1013 l 746 750 "},"ǽ":{"x_min":44,"x_max":974,"ha":1018,"o":"m 974 373 q 956 358 967 366 q 932 342 945 350 q 907 327 920 334 q 883 317 893 321 l 581 317 q 581 308 581 314 l 581 299 q 591 231 581 267 q 621 165 601 196 q 671 115 641 135 q 740 95 701 95 q 782 98 761 95 q 826 111 803 102 q 875 136 848 120 q 933 175 901 151 q 942 167 937 173 q 953 154 948 161 q 962 141 958 147 q 968 132 966 135 q 893 58 927 87 q 825 11 859 28 q 758 -12 792 -5 q 682 -20 723 -20 q 621 -10 652 -20 q 560 17 590 0 q 505 62 531 36 q 460 123 479 89 q 396 57 430 85 q 330 13 363 30 q 263 -11 296 -3 q 198 -20 229 -20 q 146 -11 174 -20 q 96 14 119 -3 q 58 63 73 33 q 44 136 44 93 q 59 213 44 176 q 106 281 74 249 q 188 337 138 312 q 308 378 239 361 q 360 386 327 383 q 428 391 393 389 l 428 444 q 406 534 428 505 q 341 562 385 562 q 304 556 324 562 q 270 537 285 549 q 247 507 255 525 q 245 468 239 490 q 235 458 246 464 q 207 445 224 451 q 168 432 189 439 q 127 422 147 426 q 92 416 107 418 q 71 415 77 414 l 57 449 q 95 514 71 485 q 149 565 119 543 q 213 603 179 588 q 280 630 246 619 q 344 645 313 640 q 398 651 375 651 q 486 634 449 651 q 546 580 523 617 q 593 613 569 600 q 640 635 616 627 q 688 647 665 643 q 731 651 711 651 q 836 627 791 651 q 912 565 882 604 q 958 476 943 527 q 974 373 974 426 m 436 179 q 430 211 432 194 q 428 247 428 229 l 428 314 q 383 311 404 312 q 356 309 363 310 q 285 285 313 299 q 241 252 257 270 q 218 215 225 235 q 212 175 212 196 q 218 139 212 154 q 234 115 224 124 q 256 102 245 106 q 279 98 268 98 q 313 102 295 98 q 351 116 331 106 q 392 140 371 125 q 436 179 414 156 m 712 573 q 677 567 696 573 q 640 542 658 561 q 607 488 622 523 q 586 394 592 452 l 795 394 q 815 399 809 394 q 821 418 821 404 q 813 482 821 454 q 791 531 805 511 q 756 562 776 551 q 712 573 736 573 m 489 705 q 475 709 483 705 q 457 717 466 713 q 441 726 448 721 q 430 734 434 730 l 573 1025 q 603 1021 581 1024 q 651 1014 625 1018 q 698 1005 676 1010 q 728 999 720 1001 l 748 962 l 489 705 "},"Ḱ":{"x_min":29.078125,"x_max":857.640625,"ha":859,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 446 l 544 745 q 566 774 559 763 q 569 791 572 785 q 550 800 565 797 q 509 805 535 803 l 509 855 l 814 855 l 814 805 q 777 800 792 802 q 750 792 762 797 q 729 781 738 788 q 709 763 719 774 l 418 458 l 745 111 q 767 92 755 99 q 792 84 778 86 q 820 82 805 81 q 852 84 835 82 l 857 34 q 813 20 837 28 q 764 6 789 13 q 717 -5 740 0 q 679 -10 695 -10 q 644 -3 659 -10 q 615 19 629 2 l 292 423 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 337 922 q 313 941 325 927 q 290 967 300 954 l 538 1198 q 573 1178 554 1189 q 609 1157 592 1167 q 640 1137 626 1146 q 659 1122 653 1127 l 665 1086 l 337 922 "},"Õ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 699 1123 q 670 1063 687 1096 q 630 1001 652 1030 q 580 954 607 973 q 521 935 552 935 q 465 946 492 935 q 414 970 439 957 q 364 994 389 983 q 314 1005 339 1005 q 286 1000 298 1005 q 262 985 274 994 q 240 961 251 975 q 217 928 229 946 l 166 946 q 195 1007 178 974 q 235 1069 212 1040 q 284 1117 257 1098 q 343 1137 311 1137 q 402 1126 374 1137 q 456 1102 430 1115 q 504 1078 481 1089 q 549 1067 527 1067 q 602 1085 579 1067 q 647 1144 624 1104 l 699 1123 "},"ẏ":{"x_min":-42.046875,"x_max":696.53125,"ha":705,"o":"m 696 581 q 663 572 676 576 q 642 563 650 568 q 629 551 634 558 q 621 535 625 545 l 395 -50 q 332 -178 366 -125 q 260 -266 298 -232 q 181 -317 222 -301 q 96 -334 139 -334 q 45 -329 70 -334 q 1 -317 20 -324 q -30 -302 -18 -310 q -42 -287 -42 -293 q -30 -264 -42 -281 q -3 -227 -18 -247 q 29 -190 12 -207 q 57 -165 46 -172 q 125 -192 91 -187 q 185 -188 160 -197 q 239 -149 210 -179 q 291 -62 267 -120 l 311 -15 l 84 535 q 59 563 76 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 275 574 289 578 q 255 565 261 570 q 249 553 248 560 q 255 535 250 546 l 394 194 l 527 535 q 532 552 531 545 q 528 564 533 559 q 510 573 523 569 q 474 581 497 577 l 474 631 l 696 631 l 696 581 m 462 859 q 453 813 462 834 q 430 775 445 791 q 397 749 416 758 q 356 740 377 740 q 295 761 316 740 q 275 822 275 782 q 284 869 275 847 q 307 907 292 891 q 341 932 322 923 q 382 942 360 942 q 441 921 420 942 q 462 859 462 901 "},"꞊":{"x_min":30.515625,"x_max":454.40625,"ha":485,"o":"m 454 246 q 448 229 452 239 q 441 208 445 219 q 434 187 438 197 l 429 171 l 52 171 l 30 193 l 35 210 q 42 231 38 220 q 49 252 46 242 q 56 269 53 262 l 432 269 l 454 246 m 454 432 q 448 415 452 425 q 441 394 445 405 q 434 373 438 383 q 429 358 431 364 l 52 358 l 30 379 l 35 396 q 42 417 38 406 q 49 438 46 428 q 56 455 53 448 l 432 455 l 454 432 "},"ḵ":{"x_min":33,"x_max":771.28125,"ha":766,"o":"m 33 0 l 33 49 q 99 69 77 61 q 122 90 122 78 l 122 858 q 118 906 122 889 q 106 932 115 923 q 79 943 97 940 q 33 949 62 945 l 33 996 q 153 1018 98 1006 q 255 1051 209 1030 l 285 1023 l 285 361 l 463 521 q 492 553 485 541 q 493 571 498 565 q 475 579 489 578 q 444 581 462 581 l 444 631 l 747 631 l 747 581 q 687 567 717 578 q 628 534 658 556 l 422 378 l 667 100 q 686 83 677 90 q 706 74 695 77 q 732 70 718 71 q 767 71 747 70 l 771 22 q 726 12 751 17 q 678 2 701 7 q 635 -4 654 -1 q 610 -7 617 -7 q 562 1 582 -7 q 527 28 542 9 l 285 350 l 285 90 q 287 81 285 85 q 297 72 289 77 q 319 63 304 68 q 359 49 334 57 l 359 0 l 33 0 m 690 -137 q 683 -157 688 -145 q 672 -183 678 -170 q 660 -208 666 -197 q 652 -227 655 -220 l 134 -227 l 112 -205 q 119 -185 114 -197 q 130 -159 124 -173 q 141 -134 136 -146 q 150 -116 147 -122 l 668 -116 l 690 -137 "},"5":{"x_min":52.421875,"x_max":623,"ha":703,"o":"m 623 278 q 605 165 623 219 q 549 70 587 111 q 454 4 511 28 q 318 -20 396 -20 q 252 -13 287 -20 q 183 7 217 -6 q 115 40 148 20 q 52 88 81 61 l 86 149 q 153 108 122 124 q 211 83 184 93 q 260 71 238 74 q 303 68 283 68 q 365 81 337 68 q 414 119 394 95 q 446 177 434 143 q 458 248 458 210 q 446 330 458 294 q 412 389 434 365 q 360 426 390 413 q 293 439 330 439 q 199 422 238 439 q 124 379 160 406 l 92 401 q 101 460 96 426 q 113 531 107 493 q 124 610 118 569 q 135 688 130 650 q 143 759 139 726 q 148 817 146 793 l 504 817 q 539 818 524 817 q 565 823 554 820 q 587 829 577 825 l 612 804 q 592 777 604 793 q 566 744 580 760 q 540 713 553 727 q 519 694 527 700 l 226 694 q 222 648 225 674 q 215 597 219 623 q 207 549 211 572 q 200 511 203 526 q 268 531 231 524 q 349 539 306 539 q 468 516 417 539 q 554 458 520 494 q 605 374 588 421 q 623 278 623 327 "},"o":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 "},"̆":{"x_min":-590.046875,"x_max":-108.515625,"ha":0,"o":"m -108 927 q -155 833 -128 872 q -214 769 -183 794 q -279 732 -245 744 q -347 721 -313 721 q -420 732 -385 721 q -485 769 -455 744 q -543 833 -516 794 q -590 927 -569 872 q -579 940 -585 933 q -565 953 -573 947 q -551 965 -558 960 q -539 973 -544 970 q -499 919 -522 941 q -450 881 -476 896 q -399 858 -425 865 q -350 851 -373 851 q -300 858 -326 851 q -248 880 -274 865 q -200 918 -223 895 q -160 973 -177 941 q -146 965 -153 970 q -132 953 -139 960 q -119 940 -125 947 q -108 927 -112 933 "},"Ẍ":{"x_min":16.28125,"x_max":859.3125,"ha":875,"o":"m 497 0 l 497 50 q 545 57 526 52 q 571 67 563 61 q 578 83 579 74 q 568 106 577 93 l 408 339 l 254 106 q 241 82 244 92 q 246 65 239 72 q 271 55 253 59 q 321 50 290 52 l 321 0 l 16 0 l 16 50 q 90 66 60 53 q 139 106 121 79 l 349 426 l 128 748 q 109 772 118 762 q 87 788 99 781 q 60 797 75 794 q 23 805 45 801 l 23 855 l 389 855 l 389 805 q 314 788 332 799 q 317 748 297 777 l 457 542 l 587 748 q 598 773 596 763 q 592 789 600 783 q 567 799 585 796 q 518 805 549 802 l 518 855 l 826 855 l 826 805 q 782 798 801 802 q 748 787 763 794 q 721 771 733 781 q 701 748 710 762 l 516 458 l 756 106 q 776 82 767 92 q 798 66 786 73 q 824 56 809 60 q 859 50 839 52 l 859 0 l 497 0 m 673 1050 q 665 1003 673 1024 q 642 965 656 981 q 608 939 627 949 q 566 930 588 930 q 507 951 527 930 q 486 1012 486 972 q 495 1059 486 1037 q 519 1097 504 1081 q 552 1122 533 1113 q 592 1132 571 1132 q 652 1111 630 1132 q 673 1050 673 1091 m 387 1050 q 379 1003 387 1024 q 356 965 370 981 q 322 939 342 949 q 281 930 303 930 q 221 951 242 930 q 200 1012 200 972 q 209 1059 200 1037 q 233 1097 218 1081 q 267 1122 247 1113 q 306 1132 286 1132 q 366 1111 345 1132 q 387 1050 387 1091 "},"Ǐ":{"x_min":-10.171875,"x_max":449.65625,"ha":454,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 m 267 939 l 174 939 l -10 1162 q 9 1186 0 1175 q 30 1204 19 1197 l 222 1076 l 410 1204 q 431 1186 421 1197 q 449 1162 441 1175 l 267 939 "},"̧":{"x_min":-475.875,"x_max":-206,"ha":0,"o":"m -206 -155 q -224 -203 -206 -180 q -275 -247 -242 -227 q -352 -281 -307 -267 q -450 -301 -397 -295 l -475 -252 q -391 -223 -416 -243 q -366 -182 -366 -203 q -381 -149 -366 -159 q -427 -136 -397 -139 l -425 -133 q -417 -116 -422 -131 q -400 -73 -411 -102 q -373 10 -390 -43 l -290 8 l -316 -59 q -234 -92 -263 -69 q -206 -155 -206 -116 "},"d":{"x_min":44,"x_max":773.8125,"ha":779,"o":"m 773 77 q 710 38 742 56 q 651 8 678 21 q 602 -12 623 -5 q 572 -20 581 -20 q 510 98 523 -20 q 452 44 478 66 q 401 7 426 22 q 349 -13 376 -6 q 292 -20 323 -20 q 202 2 246 -20 q 122 65 157 24 q 65 166 87 106 q 44 301 44 226 q 68 432 44 369 q 135 544 92 495 q 240 621 179 592 q 373 651 300 651 q 436 643 405 651 q 505 610 468 636 l 505 843 q 503 902 505 880 q 494 936 502 924 q 467 952 486 948 q 412 960 448 957 l 412 1006 q 546 1026 486 1014 q 642 1051 606 1039 l 668 1025 l 668 203 q 669 163 668 179 q 671 136 670 146 q 676 120 673 126 q 683 112 679 115 q 692 109 687 110 q 704 109 697 108 q 724 114 712 110 q 754 127 736 118 l 773 77 m 505 182 l 505 478 q 444 539 480 517 q 362 561 408 561 q 300 548 328 561 q 251 507 272 535 q 218 438 230 480 q 207 337 207 396 q 220 241 207 283 q 255 169 234 199 q 305 124 277 140 q 360 109 332 109 q 431 127 397 109 q 505 182 465 146 "},",":{"x_min":59.234375,"x_max":325,"ha":374,"o":"m 325 47 q 309 -31 325 10 q 267 -115 293 -73 q 204 -194 240 -156 q 127 -258 168 -231 l 81 -224 q 141 -132 119 -179 q 163 -25 163 -84 q 156 4 163 -10 q 138 30 150 19 q 109 47 126 41 q 70 52 91 53 l 59 104 q 76 117 63 110 q 107 132 89 125 q 148 148 126 140 q 190 162 169 156 q 230 172 211 169 q 259 176 248 176 q 308 130 292 160 q 325 47 325 101 "},"Ꞌ":{"x_min":86.8125,"x_max":293,"ha":393,"o":"m 236 472 q 219 466 230 469 q 196 462 208 464 q 170 459 183 460 q 150 458 158 458 l 86 1014 q 105 1022 91 1016 q 135 1033 118 1027 q 172 1045 153 1039 q 209 1057 191 1052 q 239 1067 226 1063 q 257 1072 252 1071 l 293 1051 l 236 472 "},"\"":{"x_min":93.59375,"x_max":558.171875,"ha":651,"o":"m 235 565 q 219 559 229 562 q 195 555 208 557 q 170 552 182 553 q 149 551 158 551 l 93 946 q 110 954 98 949 q 139 965 123 959 q 172 978 154 972 q 205 989 189 984 q 233 998 221 995 q 250 1004 245 1002 l 284 984 l 235 565 m 508 565 q 492 559 503 562 q 468 555 481 557 q 443 552 455 553 q 423 551 431 551 l 366 946 q 397 960 374 951 q 445 978 419 969 q 493 995 471 987 q 523 1004 516 1002 l 558 984 l 508 565 "},"ė":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 456 859 q 448 813 456 834 q 425 775 439 791 q 391 749 411 758 q 350 740 372 740 q 290 761 311 740 q 269 822 269 782 q 278 869 269 847 q 302 907 287 891 q 336 932 316 923 q 376 942 355 942 q 435 921 414 942 q 456 859 456 901 "},"ề":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 593 750 q 575 723 585 737 q 554 705 565 710 l 363 856 l 174 705 q 150 723 162 710 q 128 750 138 737 l 318 1013 l 411 1013 l 593 750 m 472 1056 q 461 1048 468 1052 q 445 1039 453 1043 q 428 1031 436 1034 q 414 1025 420 1027 l 155 1281 l 174 1319 q 202 1325 181 1321 q 248 1333 223 1329 q 294 1341 272 1338 q 324 1345 316 1345 l 472 1056 "},"Í":{"x_min":42.09375,"x_max":459.15625,"ha":454,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 m 130 922 q 106 941 119 927 q 84 967 94 954 l 332 1198 q 366 1178 347 1189 q 403 1157 385 1167 q 434 1137 420 1146 q 453 1122 447 1127 l 459 1086 l 130 922 "},"Ú":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 379 922 q 355 941 368 927 q 333 967 343 954 l 581 1198 q 615 1178 596 1189 q 652 1157 634 1167 q 682 1137 669 1146 q 701 1122 696 1127 l 708 1086 l 379 922 "},"Ơ":{"x_min":37,"x_max":857.4375,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 857 944 q 819 855 857 904 q 700 760 781 807 q 783 613 755 697 q 812 439 812 530 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 552 858 502 875 q 642 813 601 842 q 672 854 664 834 q 679 889 679 874 q 667 926 679 908 q 636 959 654 944 l 812 1040 q 844 998 830 1025 q 857 944 857 972 "},"Ŷ":{"x_min":-0.46875,"x_max":828.078125,"ha":851,"o":"m 233 0 l 233 49 q 284 62 264 55 q 317 75 305 69 q 334 87 329 81 q 340 98 340 93 l 340 358 q 285 470 315 412 q 223 581 254 527 q 162 681 192 635 q 108 759 132 727 q 95 773 102 766 q 77 783 89 779 q 48 789 66 787 q 2 792 30 792 l 0 841 q 44 848 19 844 q 95 854 70 851 q 142 858 120 856 q 178 861 164 861 q 216 852 197 861 q 247 829 235 844 q 299 752 272 795 q 355 660 327 709 q 410 560 383 611 q 461 460 437 509 l 619 760 q 613 788 630 778 q 544 805 596 798 l 544 855 l 828 855 l 828 805 q 759 787 781 796 q 727 760 737 777 l 510 354 l 510 98 q 514 88 510 94 q 531 76 519 82 q 564 62 543 69 q 617 49 585 55 l 617 0 l 233 0 m 654 962 q 636 938 646 949 q 615 922 626 927 l 424 1032 l 235 922 q 213 938 223 927 q 194 962 204 949 l 383 1183 l 466 1183 l 654 962 "},"Ẇ":{"x_min":13.5625,"x_max":1174.6875,"ha":1181,"o":"m 1174 805 q 1125 793 1144 799 q 1093 783 1105 788 q 1077 773 1082 778 q 1071 763 1072 768 l 916 40 q 901 15 912 26 q 873 -2 889 5 q 843 -13 858 -9 q 817 -20 827 -17 l 585 595 l 391 40 q 374 15 386 26 q 346 -1 362 5 q 314 -12 330 -8 q 283 -20 297 -17 l 107 758 q 82 785 103 774 q 13 805 61 796 l 13 855 l 345 855 l 345 805 q 293 797 311 802 q 267 785 275 791 q 258 772 259 779 q 258 758 257 765 l 374 261 l 572 855 l 640 855 l 867 261 l 976 763 q 970 777 978 771 q 948 788 963 783 q 914 797 934 793 q 872 805 895 801 l 872 855 l 1174 855 l 1174 805 m 687 1050 q 678 1003 687 1024 q 656 965 670 981 q 622 939 641 949 q 581 930 603 930 q 521 951 541 930 q 500 1012 500 972 q 509 1059 500 1037 q 532 1097 518 1081 q 566 1122 547 1113 q 607 1132 586 1132 q 666 1111 645 1132 q 687 1050 687 1091 "},"Ự":{"x_min":29.078125,"x_max":1016.078125,"ha":1016,"o":"m 1016 944 q 1003 893 1016 920 q 963 839 990 867 q 895 783 936 811 q 797 728 853 755 l 797 355 q 772 197 797 266 q 702 79 747 127 q 596 5 657 30 q 461 -20 535 -20 q 330 0 392 -20 q 222 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 340 146 315 180 q 405 95 365 112 q 503 78 445 78 q 585 99 552 78 q 639 157 618 121 q 668 240 659 193 q 678 337 678 287 l 678 763 q 655 783 678 771 q 585 805 633 795 l 585 855 l 830 855 q 837 873 835 864 q 838 889 838 882 q 825 926 838 909 q 794 959 813 944 l 970 1040 q 1002 998 989 1025 q 1016 944 1016 972 m 580 -184 q 571 -230 580 -209 q 548 -268 563 -252 q 515 -294 534 -285 q 474 -304 495 -304 q 413 -283 434 -304 q 393 -221 393 -262 q 402 -174 393 -196 q 425 -136 410 -152 q 459 -111 440 -120 q 500 -102 478 -102 q 559 -122 538 -102 q 580 -184 580 -143 "},"Ý":{"x_min":-0.46875,"x_max":828.078125,"ha":851,"o":"m 233 0 l 233 49 q 284 62 264 55 q 317 75 305 69 q 334 87 329 81 q 340 98 340 93 l 340 358 q 285 470 315 412 q 223 581 254 527 q 162 681 192 635 q 108 759 132 727 q 95 773 102 766 q 77 783 89 779 q 48 789 66 787 q 2 792 30 792 l 0 841 q 44 848 19 844 q 95 854 70 851 q 142 858 120 856 q 178 861 164 861 q 216 852 197 861 q 247 829 235 844 q 299 752 272 795 q 355 660 327 709 q 410 560 383 611 q 461 460 437 509 l 619 760 q 613 788 630 778 q 544 805 596 798 l 544 855 l 828 855 l 828 805 q 759 787 781 796 q 727 760 737 777 l 510 354 l 510 98 q 514 88 510 94 q 531 76 519 82 q 564 62 543 69 q 617 49 585 55 l 617 0 l 233 0 m 335 922 q 311 941 324 927 q 289 967 299 954 l 537 1198 q 571 1178 552 1189 q 608 1157 590 1167 q 638 1137 625 1146 q 657 1122 652 1127 l 663 1086 l 335 922 "},"ŝ":{"x_min":52.03125,"x_max":530,"ha":582,"o":"m 530 192 q 515 109 530 144 q 477 51 500 75 q 424 13 454 28 q 365 -7 395 0 q 308 -17 335 -15 q 260 -20 280 -20 q 213 -16 239 -20 q 161 -7 188 -13 q 109 7 135 -1 q 61 29 83 17 q 53 53 56 31 q 52 105 51 75 q 55 169 52 136 q 66 227 58 202 l 120 220 q 143 155 127 184 q 180 105 158 126 q 228 74 202 85 q 284 63 255 63 q 357 80 333 63 q 381 138 381 98 q 367 187 381 166 q 330 227 353 209 q 278 262 307 246 q 218 294 249 277 q 161 325 189 308 q 110 364 133 343 q 74 411 88 385 q 60 469 60 437 q 80 545 60 511 q 135 602 101 579 q 212 638 169 625 q 301 651 255 651 q 360 647 331 651 q 417 636 390 643 q 467 620 444 630 q 506 598 490 611 q 507 576 510 595 q 498 532 505 556 q 483 485 492 508 q 466 451 474 462 l 419 457 q 371 548 402 516 q 294 580 339 580 q 231 561 253 580 q 209 514 209 542 q 219 475 209 492 q 250 443 230 458 q 299 413 270 428 q 364 379 328 398 q 423 347 393 364 q 476 308 452 330 q 515 258 500 286 q 530 192 530 230 m 520 750 q 502 723 512 737 q 481 705 493 710 l 290 856 l 101 705 q 78 723 90 710 q 56 750 65 737 l 245 1013 l 338 1013 l 520 750 "},"ǧ":{"x_min":10,"x_max":716.828125,"ha":718,"o":"m 453 406 q 443 471 453 441 q 417 524 434 501 q 373 559 399 546 q 312 573 347 573 q 278 565 295 573 q 246 541 260 557 q 223 502 232 526 q 214 446 214 478 q 222 382 214 412 q 247 329 230 352 q 291 294 264 307 q 354 281 317 281 q 391 288 373 281 q 423 312 409 296 q 444 351 436 327 q 453 406 453 374 m 377 -28 q 316 -18 344 -24 q 262 -7 287 -13 q 213 -46 231 -29 q 186 -77 195 -63 q 175 -102 177 -91 q 173 -123 173 -113 q 189 -166 173 -146 q 235 -203 206 -187 q 304 -227 264 -218 q 390 -237 343 -237 q 459 -227 430 -237 q 507 -200 488 -217 q 536 -161 527 -183 q 546 -116 546 -140 q 539 -90 546 -103 q 515 -66 533 -77 q 463 -44 497 -54 q 377 -28 430 -34 m 609 434 q 585 339 609 382 q 524 265 562 296 q 434 217 485 234 q 327 200 383 200 l 320 200 q 287 161 294 176 q 280 143 280 147 q 284 131 280 136 q 304 119 288 125 q 350 107 319 113 q 434 94 381 101 q 565 70 513 84 q 648 35 617 55 q 691 -11 679 15 q 704 -71 704 -37 q 689 -134 704 -102 q 649 -196 674 -166 q 588 -250 623 -225 q 513 -294 554 -275 q 429 -323 473 -313 q 342 -334 385 -334 q 268 -329 307 -334 q 193 -315 230 -325 q 123 -291 156 -306 q 64 -256 90 -277 q 24 -209 39 -235 q 10 -150 10 -182 q 17 -115 10 -133 q 43 -78 24 -98 q 95 -34 62 -58 q 180 17 128 -11 q 103 83 103 48 q 109 103 103 90 q 130 132 116 116 q 169 169 145 149 q 226 212 192 189 q 157 241 188 223 q 104 284 126 259 q 70 341 82 309 q 58 408 58 372 q 82 502 58 457 q 147 579 106 546 q 242 631 188 612 q 354 651 295 651 q 442 638 401 651 q 515 603 482 625 q 622 625 574 610 q 697 651 670 640 l 716 625 q 710 608 714 618 q 700 587 705 598 q 690 566 695 577 q 678 547 684 556 q 631 541 655 543 q 579 537 607 538 q 601 487 593 513 q 609 434 609 462 m 399 722 l 306 722 l 123 979 q 141 1007 131 993 q 162 1026 151 1020 l 354 878 l 542 1026 q 566 1007 554 1020 q 588 979 578 993 l 399 722 "},"ȫ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 615 859 q 606 813 615 834 q 583 775 598 791 q 549 749 569 758 q 508 740 530 740 q 448 761 469 740 q 428 822 428 782 q 437 869 428 847 q 460 907 446 891 q 494 932 475 923 q 534 942 513 942 q 593 921 572 942 q 615 859 615 901 m 329 859 q 320 813 329 834 q 298 775 312 791 q 264 749 283 758 q 223 740 245 740 q 163 761 183 740 q 142 822 142 782 q 151 869 142 847 q 174 907 160 891 q 208 932 189 923 q 248 942 228 942 q 308 921 287 942 q 329 859 329 901 m 674 1136 q 667 1116 672 1129 q 656 1090 662 1103 q 644 1064 650 1076 q 636 1046 639 1052 l 118 1046 l 96 1068 q 103 1088 99 1075 q 114 1113 108 1100 q 126 1138 120 1126 q 134 1157 131 1150 l 653 1157 l 674 1136 "},"ṕ":{"x_min":33,"x_max":733,"ha":777,"o":"m 580 289 q 566 401 580 354 q 530 477 552 447 q 479 521 508 507 q 422 536 451 536 q 398 533 410 536 q 371 522 386 530 q 335 499 356 514 q 285 460 314 484 l 285 155 q 347 121 320 134 q 393 103 373 109 q 429 95 413 97 q 462 94 445 94 q 510 106 488 94 q 547 144 531 119 q 571 205 563 169 q 580 289 580 242 m 733 339 q 721 250 733 294 q 689 167 709 207 q 642 92 669 127 q 587 33 616 58 q 527 -5 557 8 q 468 -20 496 -20 q 429 -15 449 -20 q 387 -2 409 -11 q 339 21 365 6 q 285 56 314 35 l 285 -234 q 310 -255 285 -245 q 399 -276 335 -266 l 399 -326 l 33 -326 l 33 -276 q 99 -255 77 -265 q 122 -234 122 -245 l 122 467 q 119 508 122 492 q 109 534 117 524 q 83 548 101 544 q 33 554 65 553 l 33 602 q 100 611 71 606 q 152 622 128 616 q 198 634 176 627 q 246 651 220 641 l 274 622 l 281 539 q 350 593 318 572 q 410 628 383 615 q 461 645 438 640 q 504 651 484 651 q 592 632 550 651 q 665 575 633 613 q 714 477 696 536 q 733 339 733 419 m 341 705 q 326 709 335 705 q 309 717 318 713 q 293 726 300 721 q 282 734 286 730 l 425 1025 q 455 1021 433 1024 q 502 1014 477 1018 q 550 1005 527 1010 q 579 999 572 1001 l 600 962 l 341 705 "},"Ắ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 670 1144 q 622 1050 649 1089 q 564 986 595 1011 q 499 949 533 961 q 430 938 465 938 q 358 949 393 938 q 292 986 323 961 q 235 1050 261 1011 q 188 1144 208 1089 q 199 1157 192 1150 q 212 1170 205 1164 q 226 1182 219 1177 q 239 1190 233 1187 q 279 1136 256 1158 q 327 1098 302 1113 q 379 1075 353 1082 q 427 1068 405 1068 q 478 1075 451 1068 q 530 1097 504 1082 q 578 1135 555 1112 q 618 1190 601 1158 q 631 1182 624 1187 q 646 1170 638 1177 q 659 1157 653 1164 q 670 1144 666 1150 m 339 1154 q 315 1173 328 1160 q 293 1200 303 1187 l 541 1430 q 575 1411 556 1422 q 612 1389 594 1400 q 642 1369 629 1379 q 661 1354 656 1360 l 668 1319 l 339 1154 "},"ã":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 616 933 q 586 873 604 905 q 546 811 569 840 q 496 764 524 783 q 438 745 469 745 q 382 756 408 745 q 330 780 356 767 q 281 804 305 793 q 230 816 256 816 q 202 810 215 816 q 179 795 190 805 q 157 771 168 786 q 133 738 145 756 l 82 756 q 112 817 94 784 q 151 879 129 850 q 201 927 174 908 q 259 947 228 947 q 319 935 290 947 q 372 911 347 924 q 421 887 398 898 q 465 876 444 876 q 518 894 496 876 q 564 954 541 913 l 616 933 "},"Ɗ":{"x_min":16,"x_max":1019,"ha":1076,"o":"m 746 721 q 704 757 728 742 q 649 782 681 772 q 577 797 618 792 q 484 803 536 802 l 484 125 q 497 92 484 106 q 586 73 521 73 q 667 93 624 73 q 749 157 711 113 q 812 268 787 201 q 838 432 838 336 q 833 517 838 478 q 818 592 828 557 q 789 659 807 628 q 746 721 772 691 m 16 659 q 44 751 16 711 q 134 819 73 791 q 292 860 196 846 q 522 875 388 875 q 627 871 580 875 q 714 861 675 868 q 783 842 752 853 q 840 815 814 831 q 923 745 889 784 q 979 660 958 706 q 1009 563 1000 614 q 1019 458 1019 512 q 1001 306 1019 373 q 953 188 983 240 q 884 102 924 137 q 800 43 844 66 q 710 10 756 21 q 621 0 664 0 l 220 0 l 220 49 q 290 70 266 59 q 314 90 314 81 l 314 790 q 212 751 246 777 q 178 687 178 725 q 188 639 178 663 q 229 600 199 616 q 206 585 225 595 q 163 563 187 574 q 116 542 140 552 q 78 529 92 532 q 50 553 62 538 q 30 585 38 567 q 19 622 22 603 q 16 659 16 641 "},"æ":{"x_min":44,"x_max":974,"ha":1018,"o":"m 974 373 q 956 358 967 366 q 932 342 945 350 q 907 327 920 334 q 883 317 893 321 l 581 317 q 581 308 581 314 l 581 299 q 591 231 581 267 q 621 165 601 196 q 671 115 641 135 q 740 95 701 95 q 782 98 761 95 q 826 111 803 102 q 875 136 848 120 q 933 175 901 151 q 942 167 937 173 q 953 154 948 161 q 962 141 958 147 q 968 132 966 135 q 893 58 927 87 q 825 11 859 28 q 758 -12 792 -5 q 682 -20 723 -20 q 621 -10 652 -20 q 560 17 590 0 q 505 62 531 36 q 460 123 479 89 q 396 57 430 85 q 330 13 363 30 q 263 -11 296 -3 q 198 -20 229 -20 q 146 -11 174 -20 q 96 14 119 -3 q 58 63 73 33 q 44 136 44 93 q 59 213 44 176 q 106 281 74 249 q 188 337 138 312 q 308 378 239 361 q 360 386 327 383 q 428 391 393 389 l 428 444 q 406 534 428 505 q 341 562 385 562 q 304 556 324 562 q 270 537 285 549 q 247 507 255 525 q 245 468 239 490 q 235 458 246 464 q 207 445 224 451 q 168 432 189 439 q 127 422 147 426 q 92 416 107 418 q 71 415 77 414 l 57 449 q 95 514 71 485 q 149 565 119 543 q 213 603 179 588 q 280 630 246 619 q 344 645 313 640 q 398 651 375 651 q 486 634 449 651 q 546 580 523 617 q 593 613 569 600 q 640 635 616 627 q 688 647 665 643 q 731 651 711 651 q 836 627 791 651 q 912 565 882 604 q 958 476 943 527 q 974 373 974 426 m 436 179 q 430 211 432 194 q 428 247 428 229 l 428 314 q 383 311 404 312 q 356 309 363 310 q 285 285 313 299 q 241 252 257 270 q 218 215 225 235 q 212 175 212 196 q 218 139 212 154 q 234 115 224 124 q 256 102 245 106 q 279 98 268 98 q 313 102 295 98 q 351 116 331 106 q 392 140 371 125 q 436 179 414 156 m 712 573 q 677 567 696 573 q 640 542 658 561 q 607 488 622 523 q 586 394 592 452 l 795 394 q 815 399 809 394 q 821 418 821 404 q 813 482 821 454 q 791 531 805 511 q 756 562 776 551 q 712 573 736 573 "},"ĩ":{"x_min":-52.890625,"x_max":480.859375,"ha":417,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 m 480 933 q 451 873 468 905 q 411 811 433 840 q 361 764 388 783 q 302 745 333 745 q 246 756 273 745 q 195 780 220 767 q 145 804 170 793 q 94 816 120 816 q 67 810 79 816 q 43 795 54 805 q 21 771 32 786 q -2 738 10 756 l -52 756 q -23 817 -40 784 q 16 879 -6 850 q 65 927 38 908 q 124 947 92 947 q 183 935 155 947 q 237 911 211 924 q 285 887 262 898 q 330 876 308 876 q 383 894 360 876 q 428 954 405 913 l 480 933 "},"~":{"x_min":33.234375,"x_max":644.3125,"ha":678,"o":"m 644 525 q 608 456 630 492 q 559 391 586 421 q 502 343 533 362 q 438 324 471 324 q 378 341 410 324 q 313 378 346 358 q 248 415 280 398 q 187 433 216 433 q 125 406 153 433 q 69 322 97 379 l 33 340 q 69 409 47 373 q 118 475 91 445 q 175 523 145 504 q 238 543 206 543 q 302 525 269 543 q 367 488 335 508 q 431 451 400 468 q 489 434 461 434 q 550 460 521 434 q 608 542 579 486 l 644 525 "},"Ċ":{"x_min":37,"x_max":726.484375,"ha":775,"o":"m 726 143 q 641 68 683 99 q 557 17 598 37 q 476 -11 516 -2 q 397 -20 436 -20 q 264 8 329 -20 q 148 90 199 36 q 67 221 98 144 q 37 397 37 299 q 70 594 37 506 q 162 745 103 682 q 299 841 220 807 q 468 875 377 875 q 541 869 505 875 q 609 854 577 864 q 669 833 642 845 q 713 806 695 821 q 713 794 716 804 q 704 770 710 784 q 689 739 698 755 q 672 707 681 722 q 655 679 663 692 q 642 662 647 667 l 598 671 q 519 758 563 731 q 421 785 474 785 q 374 777 398 785 q 325 753 349 770 q 280 708 301 736 q 243 641 259 681 q 218 547 227 601 q 209 422 209 493 q 231 273 209 335 q 290 170 254 211 q 372 111 327 130 q 461 92 417 92 q 505 96 480 92 q 559 111 529 100 q 622 141 588 122 q 691 189 655 159 q 700 180 694 186 q 710 165 705 173 q 720 152 715 158 q 726 143 724 145 m 525 1050 q 516 1003 525 1024 q 494 965 508 981 q 460 939 479 949 q 419 930 441 930 q 359 951 379 930 q 338 1012 338 972 q 347 1059 338 1037 q 370 1097 356 1081 q 404 1122 385 1113 q 445 1132 424 1132 q 504 1111 483 1132 q 525 1050 525 1091 "},"¡":{"x_min":100,"x_max":322,"ha":429,"o":"m 307 -304 q 270 -323 293 -312 q 225 -345 248 -334 q 180 -366 202 -356 q 146 -380 159 -375 l 111 -358 l 165 345 q 198 360 178 354 q 236 371 219 366 l 255 357 l 307 -304 m 322 559 q 311 511 322 533 q 284 474 301 489 q 244 451 267 459 q 197 443 222 443 q 161 448 178 443 q 129 465 143 453 q 108 493 116 476 q 100 535 100 510 q 109 584 100 562 q 136 620 119 605 q 175 643 152 635 q 224 651 198 651 q 261 645 243 651 q 293 629 279 640 q 314 601 306 618 q 322 559 322 583 "},"ẅ":{"x_min":8.8125,"x_max":986.8125,"ha":996,"o":"m 986 581 q 955 572 967 576 q 936 563 944 567 q 925 553 929 559 q 918 539 921 547 l 769 40 q 752 14 765 25 q 724 -2 739 4 q 694 -13 709 -9 q 671 -20 680 -17 l 498 376 l 360 40 q 343 14 355 24 q 316 -3 330 3 q 288 -14 302 -10 q 265 -20 274 -17 l 82 539 q 60 562 78 551 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 270 573 286 578 q 247 563 254 569 q 239 551 240 557 q 241 539 239 545 l 343 219 l 505 631 l 557 631 l 727 219 l 825 539 q 827 553 828 546 q 821 564 827 559 q 802 573 815 569 q 766 581 789 577 l 766 631 l 986 631 l 986 581 m 752 859 q 743 813 752 834 q 720 775 735 791 q 686 749 706 758 q 645 740 667 740 q 585 761 606 740 q 565 822 565 782 q 574 869 565 847 q 597 907 583 891 q 631 932 612 923 q 671 942 650 942 q 730 921 709 942 q 752 859 752 901 m 466 859 q 457 813 466 834 q 435 775 449 791 q 401 749 420 758 q 360 740 382 740 q 300 761 320 740 q 279 822 279 782 q 288 869 279 847 q 311 907 297 891 q 345 932 326 923 q 385 942 365 942 q 445 921 424 942 q 466 859 466 901 "},"ậ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 426 -184 q 418 -230 426 -209 q 395 -268 409 -252 q 362 -294 381 -285 q 320 -304 342 -304 q 260 -283 281 -304 q 239 -221 239 -262 q 248 -174 239 -196 q 272 -136 257 -152 q 306 -111 286 -120 q 346 -102 325 -102 q 405 -122 384 -102 q 426 -184 426 -143 m 579 750 q 561 723 571 737 q 539 705 551 710 l 349 856 l 160 705 q 136 723 148 710 q 114 750 124 737 l 303 1013 l 396 1013 l 579 750 "},"ǡ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 442 859 q 434 813 442 834 q 411 775 425 791 q 377 749 397 758 q 336 740 358 740 q 276 761 297 740 q 255 822 255 782 q 264 869 255 847 q 287 907 273 891 q 321 932 302 923 q 362 942 341 942 q 421 921 400 942 q 442 859 442 901 m 645 1131 q 637 1110 642 1123 q 626 1084 632 1098 q 615 1059 620 1071 q 607 1041 609 1047 l 88 1041 l 67 1062 q 73 1082 69 1070 q 84 1108 78 1094 q 96 1133 90 1121 q 105 1152 101 1145 l 623 1152 l 645 1131 "},"ṁ":{"x_min":32.484375,"x_max":1157.625,"ha":1172,"o":"m 820 0 l 820 49 q 860 61 844 55 q 884 72 875 67 q 895 81 892 77 q 899 90 899 86 l 899 408 q 894 475 899 449 q 881 512 890 500 q 859 529 873 525 q 827 534 846 534 q 758 512 798 534 q 674 449 718 491 l 674 90 q 677 81 674 86 q 689 72 680 77 q 716 62 699 67 q 759 49 733 56 l 759 0 l 431 0 l 431 49 q 471 61 456 55 q 495 72 487 67 q 507 81 504 77 q 511 90 511 86 l 511 408 q 507 475 511 449 q 496 512 504 500 q 476 529 488 525 q 444 534 463 534 q 374 513 413 534 q 285 449 335 493 l 285 90 q 305 69 285 80 q 369 49 325 58 l 369 0 l 32 0 l 32 49 q 99 70 77 61 q 122 90 122 79 l 122 467 q 120 509 122 494 q 110 534 118 525 q 83 546 101 542 q 32 554 65 550 l 32 602 q 96 610 67 606 q 150 621 124 615 q 198 635 175 627 q 246 651 221 642 l 274 622 l 282 538 q 352 593 320 571 q 413 628 384 615 q 467 645 441 640 q 517 651 493 651 q 575 642 550 651 q 618 620 600 634 q 646 588 635 606 q 661 547 657 569 l 663 538 q 734 593 701 571 q 795 627 766 614 q 850 645 824 640 q 901 651 876 651 q 962 641 933 651 q 1014 612 992 632 q 1049 558 1036 591 q 1062 477 1062 524 l 1062 90 q 1083 72 1062 81 q 1157 49 1104 63 l 1157 0 l 820 0 m 687 859 q 678 813 687 834 q 656 775 670 791 q 622 749 641 758 q 581 740 603 740 q 521 761 541 740 q 500 822 500 782 q 509 869 500 847 q 532 907 518 891 q 566 932 547 923 q 607 942 586 942 q 666 921 645 942 q 687 859 687 901 "},"Ử":{"x_min":29.078125,"x_max":1016.078125,"ha":1016,"o":"m 1016 944 q 1003 893 1016 920 q 963 839 990 867 q 895 783 936 811 q 797 728 853 755 l 797 355 q 772 197 797 266 q 702 79 747 127 q 596 5 657 30 q 461 -20 535 -20 q 330 0 392 -20 q 222 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 340 146 315 180 q 405 95 365 112 q 503 78 445 78 q 585 99 552 78 q 639 157 618 121 q 668 240 659 193 q 678 337 678 287 l 678 763 q 655 783 678 771 q 585 805 633 795 l 585 855 l 830 855 q 837 873 835 864 q 838 889 838 882 q 825 926 838 909 q 794 959 813 944 l 970 1040 q 1002 998 989 1025 q 1016 944 1016 972 m 620 1121 q 608 1088 620 1102 q 580 1061 596 1073 q 547 1037 564 1048 q 523 1014 531 1026 q 518 989 515 1002 q 545 959 522 976 q 532 952 541 955 q 514 945 524 948 q 497 940 505 942 q 484 938 488 938 q 424 973 439 957 q 413 1004 409 990 q 434 1030 417 1018 q 469 1055 450 1043 q 503 1081 488 1068 q 518 1111 518 1095 q 510 1143 518 1134 q 488 1153 503 1153 q 466 1142 475 1153 q 457 1121 457 1132 q 465 1102 457 1113 q 420 1087 448 1094 q 361 1077 393 1080 l 354 1084 q 352 1098 352 1090 q 365 1137 352 1117 q 400 1171 378 1156 q 451 1196 422 1187 q 511 1206 479 1206 q 561 1199 540 1206 q 595 1180 581 1192 q 614 1153 608 1168 q 620 1121 620 1138 "},"P":{"x_min":20.265625,"x_max":737,"ha":787,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 785 q 72 778 96 782 q 29 771 49 775 l 20 834 q 101 850 56 843 q 194 863 146 858 q 292 871 243 868 q 386 875 341 875 q 529 859 465 875 q 640 813 594 843 q 711 738 686 782 q 737 635 737 693 q 724 548 737 588 q 689 478 711 509 q 638 423 667 447 q 577 384 609 399 q 512 360 545 368 q 449 353 479 353 q 388 358 418 353 q 335 373 358 363 l 314 444 q 363 427 342 431 q 408 424 385 424 q 466 434 437 424 q 516 467 494 445 q 552 524 538 489 q 566 607 566 558 q 550 691 566 655 q 505 753 534 728 q 436 790 476 777 q 348 803 396 803 q 320 802 334 803 q 292 802 306 802 l 292 90 q 296 82 292 86 q 313 71 300 77 q 348 61 325 66 q 405 49 370 55 l 405 0 l 29 0 "},"%":{"x_min":37,"x_max":975,"ha":1011,"o":"m 836 196 q 812 343 836 295 q 752 390 788 390 q 699 352 718 390 q 681 226 681 314 q 702 77 681 125 q 764 30 723 30 q 817 68 799 30 q 836 196 836 107 m 975 210 q 958 120 975 162 q 912 47 941 78 q 842 -2 882 15 q 752 -21 801 -21 q 664 -2 703 -21 q 598 47 626 15 q 556 120 571 78 q 542 210 542 162 q 557 300 542 258 q 602 373 573 342 q 672 423 631 405 q 764 442 713 442 q 853 423 814 442 q 919 374 893 405 q 960 300 946 342 q 975 210 975 258 m 253 4 q 232 -3 246 0 q 204 -9 219 -6 q 175 -15 189 -12 q 152 -21 161 -18 l 136 0 l 755 813 q 775 820 762 816 q 803 827 788 824 q 832 833 818 830 q 853 838 845 836 l 871 817 l 253 4 m 331 595 q 324 681 331 644 q 306 741 318 717 q 280 777 295 765 q 247 789 265 789 q 194 751 213 789 q 176 624 176 713 q 196 476 176 523 q 258 428 217 428 q 312 467 293 428 q 331 595 331 506 m 470 608 q 453 519 470 561 q 407 446 436 477 q 337 396 377 414 q 247 378 296 378 q 159 396 198 378 q 93 446 121 414 q 51 519 66 477 q 37 608 37 561 q 52 698 37 656 q 96 771 68 740 q 166 821 125 803 q 258 840 207 840 q 348 821 308 840 q 414 772 387 803 q 455 698 441 740 q 470 608 470 656 "},"Ʒ":{"x_min":61.140625,"x_max":695,"ha":751,"o":"m 695 295 q 680 205 695 247 q 639 129 665 163 q 578 66 613 94 q 503 20 543 39 q 419 -8 463 1 q 333 -19 375 -19 q 224 -6 274 -19 q 138 24 175 6 q 81 62 102 42 q 61 94 61 81 q 70 118 61 101 q 96 154 80 134 q 129 191 111 174 q 165 217 147 209 q 203 159 181 185 q 251 115 225 133 q 303 87 276 97 q 359 78 331 78 q 494 126 446 78 q 542 260 542 174 q 528 336 542 301 q 492 396 515 370 q 437 435 469 421 q 369 450 406 450 q 339 448 353 450 q 311 443 325 447 q 282 433 297 439 q 249 416 267 426 l 225 401 l 223 403 q 216 411 220 406 q 206 422 211 416 q 197 433 202 428 q 191 442 193 439 l 190 444 l 190 445 l 190 445 l 448 767 l 226 767 q 200 753 214 767 q 174 718 187 740 q 151 668 162 697 q 133 608 139 639 l 74 621 l 99 865 q 128 859 114 861 q 159 855 143 856 q 194 855 175 855 l 635 855 l 657 820 l 434 540 q 453 542 444 541 q 470 544 462 544 q 559 527 518 544 q 630 478 600 510 q 678 401 661 447 q 695 295 695 354 "},"_":{"x_min":35.953125,"x_max":635.5,"ha":671,"o":"m 635 -109 q 629 -127 633 -117 q 620 -149 625 -138 q 611 -170 615 -161 q 604 -186 607 -180 l 57 -186 l 35 -164 q 41 -147 37 -157 q 50 -125 45 -136 q 59 -104 54 -115 q 67 -88 63 -94 l 613 -88 l 635 -109 "},"ñ":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 399 q 535 461 539 436 q 523 500 531 485 q 501 521 515 515 q 467 528 488 528 q 433 523 451 528 q 393 508 415 519 q 344 479 371 498 q 285 433 317 461 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 467 q 120 509 122 493 q 111 533 119 524 q 85 546 103 542 q 33 554 67 550 l 33 602 q 93 610 65 605 q 147 620 121 615 q 197 634 173 626 q 246 651 221 641 l 274 622 l 282 524 q 430 621 361 592 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 m 678 933 q 649 873 666 905 q 609 811 631 840 q 559 764 586 783 q 500 745 531 745 q 444 756 471 745 q 393 780 418 767 q 343 804 368 793 q 292 816 318 816 q 265 810 277 816 q 241 795 252 805 q 219 771 230 786 q 196 738 208 756 l 145 756 q 174 817 157 784 q 214 879 191 850 q 263 927 236 908 q 322 947 290 947 q 381 935 353 947 q 435 911 409 924 q 483 887 460 898 q 528 876 506 876 q 581 894 558 876 q 626 954 603 913 l 678 933 "},"Ŕ":{"x_min":20.265625,"x_max":843.71875,"ha":840,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 784 q 74 778 97 781 q 29 771 50 775 l 20 834 q 176 862 92 849 q 358 875 261 875 q 515 859 451 875 q 621 815 580 843 q 681 750 662 788 q 700 669 700 712 q 686 583 700 622 q 647 512 672 544 q 587 457 622 481 q 510 420 552 434 l 724 124 q 745 101 735 110 q 766 88 754 92 q 794 82 778 83 q 833 84 810 82 l 843 34 q 793 19 821 27 q 738 4 765 11 q 687 -5 710 -1 q 651 -10 664 -10 q 612 1 631 -10 q 584 27 594 12 l 390 397 q 376 396 383 396 l 363 396 q 328 398 346 396 q 292 404 310 400 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 329 803 q 310 802 320 803 q 292 802 301 802 l 292 479 q 323 475 310 475 q 352 474 337 474 q 486 520 443 474 q 529 648 529 566 q 519 708 529 679 q 487 757 510 736 q 426 790 464 778 q 329 803 387 803 m 289 922 q 265 941 278 927 q 243 967 252 954 l 491 1198 q 525 1178 506 1189 q 561 1157 544 1167 q 592 1137 579 1146 q 611 1122 606 1127 l 617 1086 l 289 922 "},"‚":{"x_min":49.171875,"x_max":308,"ha":360,"o":"m 308 24 q 294 -50 308 -12 q 259 -124 281 -89 q 206 -189 236 -159 q 144 -241 177 -219 l 100 -207 q 140 -132 124 -174 q 157 -46 157 -90 q 131 15 157 -9 q 60 40 106 39 l 49 91 q 66 104 53 96 q 99 119 80 111 q 139 136 117 127 q 180 150 160 144 q 215 159 199 156 q 239 162 231 163 q 291 103 274 136 q 308 24 308 69 "},"Æ":{"x_min":0.234375,"x_max":1091.9375,"ha":1122,"o":"m 515 757 q 510 768 515 765 q 498 770 505 772 q 484 763 491 769 q 472 746 477 757 l 371 498 l 515 498 l 515 757 m 1091 205 q 1084 144 1088 176 q 1077 83 1081 112 q 1070 32 1073 54 q 1064 0 1066 10 l 423 0 l 423 49 q 492 70 469 58 q 515 90 515 81 l 515 423 l 342 423 l 209 95 q 216 65 200 75 q 282 49 232 55 l 282 0 l 0 0 l 0 49 q 66 65 42 55 q 98 95 89 76 l 362 748 q 364 767 367 760 q 348 782 361 775 q 314 793 336 788 q 258 805 291 799 l 258 855 l 1022 855 l 1047 833 q 1043 788 1045 815 q 1037 734 1041 762 q 1028 681 1033 706 q 1019 644 1024 656 l 968 644 q 952 740 965 707 q 912 774 939 774 l 685 774 l 685 498 l 954 498 l 977 474 q 964 452 971 464 q 947 426 956 439 q 930 402 938 413 q 915 385 922 391 q 891 402 905 395 q 865 414 878 409 q 843 420 852 418 q 831 423 833 423 l 685 423 l 685 124 q 690 106 685 114 q 710 92 695 98 q 753 84 725 87 q 825 81 780 81 l 889 81 q 943 88 921 81 q 983 112 965 95 q 1014 156 1000 129 q 1042 223 1028 183 l 1091 205 "},"ṍ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 646 933 q 616 873 634 905 q 576 811 598 840 q 526 764 554 783 q 467 745 499 745 q 412 756 438 745 q 360 780 385 767 q 310 804 335 793 q 260 816 286 816 q 232 810 244 816 q 209 795 220 805 q 186 771 198 786 q 163 738 175 756 l 112 756 q 142 817 124 784 q 181 879 159 850 q 231 927 204 908 q 289 947 258 947 q 348 935 320 947 q 402 911 377 924 q 451 887 427 898 q 495 876 474 876 q 548 894 526 876 q 594 954 571 913 l 646 933 m 344 969 q 329 973 338 970 q 312 982 321 977 q 296 990 303 986 q 285 998 289 995 l 428 1289 q 458 1285 436 1288 q 505 1278 480 1282 q 553 1270 531 1274 q 583 1263 575 1265 l 603 1227 l 344 969 "},"Ṯ":{"x_min":1.765625,"x_max":780.8125,"ha":806,"o":"m 203 0 l 203 49 q 254 62 234 55 q 287 75 275 69 q 304 87 299 82 q 309 98 309 93 l 309 774 l 136 774 q 117 766 126 774 q 98 742 108 759 q 77 698 89 725 q 51 631 66 670 l 1 649 q 6 697 3 669 q 13 754 9 724 q 21 810 17 783 q 28 855 25 837 l 755 855 l 780 833 q 777 791 780 815 q 771 739 775 766 q 763 685 767 712 q 755 638 759 659 l 704 638 q 692 694 697 669 q 683 737 688 720 q 669 764 677 754 q 646 774 660 774 l 479 774 l 479 98 q 483 88 479 94 q 500 76 488 82 q 533 62 512 69 q 585 49 554 55 l 585 0 l 203 0 m 679 -137 q 672 -157 677 -145 q 661 -183 667 -170 q 649 -208 655 -197 q 641 -227 644 -220 l 123 -227 l 101 -205 q 108 -185 103 -197 q 119 -159 113 -173 q 130 -134 125 -146 q 139 -116 136 -122 l 657 -116 l 679 -137 "},"Ū":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 765 1075 q 757 1055 763 1068 q 746 1029 752 1043 q 735 1004 740 1016 q 727 986 729 992 l 208 986 l 187 1007 q 193 1027 189 1015 q 204 1053 198 1039 q 216 1078 210 1066 q 225 1097 221 1090 l 743 1097 l 765 1075 "},"Œ":{"x_min":37,"x_max":1138.46875,"ha":1171,"o":"m 435 71 q 478 73 460 71 q 512 80 497 75 q 541 91 528 84 q 569 108 554 98 l 569 724 q 495 772 537 756 q 409 788 453 788 q 323 763 361 788 q 260 694 286 739 q 222 583 235 648 q 209 435 209 518 q 226 292 209 359 q 274 177 244 226 q 346 99 305 128 q 435 71 387 71 m 1138 206 q 1132 145 1135 177 q 1124 84 1128 113 q 1117 32 1120 55 q 1110 0 1113 10 l 596 0 q 537 -3 560 0 q 495 -10 514 -6 q 455 -17 475 -14 q 405 -20 435 -20 q 252 15 320 -20 q 136 112 184 51 q 62 251 88 172 q 37 415 37 329 q 67 590 37 507 q 152 737 98 674 q 281 837 207 800 q 444 875 356 875 q 491 872 471 875 q 528 865 511 869 q 563 858 545 861 q 602 855 580 855 l 1067 855 l 1094 833 q 1090 788 1093 815 q 1083 734 1087 762 q 1075 681 1079 706 q 1066 644 1070 656 l 1016 644 q 999 739 1012 707 q 960 772 985 772 l 739 772 l 739 499 l 1001 499 l 1024 475 q 1011 452 1019 465 q 995 426 1003 439 q 978 402 986 413 q 962 386 969 392 q 940 403 951 396 q 912 415 928 410 q 877 421 897 419 q 827 424 856 424 l 739 424 l 739 125 q 742 107 739 115 q 760 93 746 99 q 799 85 773 88 q 870 82 825 82 l 937 82 q 990 89 968 82 q 1029 113 1013 96 q 1060 157 1046 130 q 1088 224 1074 184 l 1138 206 "},"Ạ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 522 -184 q 514 -230 522 -209 q 491 -268 505 -252 q 457 -294 477 -285 q 416 -304 438 -304 q 356 -283 377 -304 q 335 -221 335 -262 q 344 -174 335 -196 q 367 -136 353 -152 q 401 -111 382 -120 q 442 -102 421 -102 q 501 -122 480 -102 q 522 -184 522 -143 "},"Ƴ":{"x_min":0.5,"x_max":982,"ha":987,"o":"m 236 0 l 236 49 q 287 62 267 55 q 320 75 308 69 q 337 87 332 81 q 343 98 343 93 l 343 354 q 287 466 318 409 q 225 578 256 524 q 163 679 193 632 q 109 759 133 726 q 96 773 103 766 q 78 783 89 779 q 49 789 66 787 q 3 792 31 792 l 0 841 q 45 848 20 844 q 96 854 71 851 q 143 858 121 856 q 179 861 165 861 q 219 852 201 861 q 248 829 237 843 q 301 753 273 797 q 357 661 329 710 q 413 561 386 612 q 464 461 440 509 l 611 745 q 648 804 628 777 q 693 851 668 831 q 749 882 718 871 q 822 894 781 894 q 889 882 859 894 q 939 849 919 869 q 971 802 960 829 q 982 745 982 775 q 980 722 982 735 q 977 697 979 709 q 972 676 975 685 q 969 662 970 666 q 946 641 965 653 q 902 617 926 629 q 854 595 878 604 q 821 583 831 585 l 804 623 q 815 643 809 631 q 826 665 821 654 q 834 689 831 677 q 838 714 838 702 q 822 764 838 745 q 781 783 807 783 q 736 761 755 783 q 701 711 717 740 l 513 357 l 513 98 q 517 88 513 94 q 534 75 522 82 q 567 62 546 69 q 620 49 588 55 l 620 0 l 236 0 "},"ṡ":{"x_min":52.03125,"x_max":530,"ha":582,"o":"m 530 192 q 515 109 530 144 q 477 51 500 75 q 424 13 454 28 q 365 -7 395 0 q 308 -17 335 -15 q 260 -20 280 -20 q 213 -16 239 -20 q 161 -7 188 -13 q 109 7 135 -1 q 61 29 83 17 q 53 53 56 31 q 52 105 51 75 q 55 169 52 136 q 66 227 58 202 l 120 220 q 143 155 127 184 q 180 105 158 126 q 228 74 202 85 q 284 63 255 63 q 357 80 333 63 q 381 138 381 98 q 367 187 381 166 q 330 227 353 209 q 278 262 307 246 q 218 294 249 277 q 161 325 189 308 q 110 364 133 343 q 74 411 88 385 q 60 469 60 437 q 80 545 60 511 q 135 602 101 579 q 212 638 169 625 q 301 651 255 651 q 360 647 331 651 q 417 636 390 643 q 467 620 444 630 q 506 598 490 611 q 507 576 510 595 q 498 532 505 556 q 483 485 492 508 q 466 451 474 462 l 419 457 q 371 548 402 516 q 294 580 339 580 q 231 561 253 580 q 209 514 209 542 q 219 475 209 492 q 250 443 230 458 q 299 413 270 428 q 364 379 328 398 q 423 347 393 364 q 476 308 452 330 q 515 258 500 286 q 530 192 530 230 m 384 859 q 375 813 384 834 q 352 775 367 791 q 319 749 338 758 q 278 740 299 740 q 217 761 238 740 q 197 822 197 782 q 206 869 197 847 q 229 907 214 891 q 263 932 244 923 q 304 942 282 942 q 363 921 342 942 q 384 859 384 901 "},"ỷ":{"x_min":-42.046875,"x_max":696.53125,"ha":705,"o":"m 696 581 q 663 572 676 576 q 642 563 650 568 q 629 551 634 558 q 621 535 625 545 l 395 -50 q 332 -178 366 -125 q 260 -266 298 -232 q 181 -317 222 -301 q 96 -334 139 -334 q 45 -329 70 -334 q 1 -317 20 -324 q -30 -302 -18 -310 q -42 -287 -42 -293 q -30 -264 -42 -281 q -3 -227 -18 -247 q 29 -190 12 -207 q 57 -165 46 -172 q 125 -192 91 -187 q 185 -188 160 -197 q 239 -149 210 -179 q 291 -62 267 -120 l 311 -15 l 84 535 q 59 563 76 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 275 574 289 578 q 255 565 261 570 q 249 553 248 560 q 255 535 250 546 l 394 194 l 527 535 q 532 552 531 545 q 528 564 533 559 q 510 573 523 569 q 474 581 497 577 l 474 631 l 696 631 l 696 581 m 502 904 q 490 871 502 885 q 462 844 478 856 q 429 820 446 831 q 405 797 413 809 q 400 772 397 785 q 427 742 404 759 q 414 735 423 738 q 396 728 406 731 q 379 723 387 725 q 366 721 370 721 q 306 756 321 740 q 295 787 291 773 q 316 813 299 801 q 351 838 332 826 q 385 864 370 851 q 400 894 400 878 q 392 926 400 917 q 370 936 385 936 q 348 925 357 936 q 339 904 339 915 q 347 885 339 896 q 302 870 330 877 q 243 860 275 863 l 236 867 q 234 881 234 873 q 247 920 234 900 q 282 954 260 939 q 333 979 304 970 q 393 989 361 989 q 443 982 422 989 q 477 963 463 975 q 496 936 490 951 q 502 904 502 921 "},"›":{"x_min":84.78125,"x_max":394.046875,"ha":439,"o":"m 393 289 l 124 1 l 85 31 l 221 314 l 84 598 l 124 629 l 394 339 l 393 289 "},"<":{"x_min":35.953125,"x_max":594.796875,"ha":631,"o":"m 594 225 q 561 193 579 211 q 522 163 543 175 l 57 330 l 35 356 l 37 364 l 41 376 l 48 399 q 51 410 49 405 q 54 421 53 416 q 55 425 55 423 q 57 429 56 427 l 61 439 l 573 624 l 594 602 q 589 582 592 594 q 582 557 586 571 q 575 532 579 544 q 570 514 572 520 l 211 385 l 578 254 l 594 225 "},"¬":{"x_min":51.25,"x_max":645,"ha":703,"o":"m 645 157 q 628 145 638 152 q 607 133 617 139 q 585 121 596 126 q 566 113 574 115 l 545 135 l 545 333 l 73 333 l 51 354 q 57 371 53 361 q 65 392 60 381 q 74 412 70 402 q 82 429 79 422 l 620 429 l 645 409 l 645 157 "},"t":{"x_min":3.265625,"x_max":499.28125,"ha":514,"o":"m 499 105 q 346 10 409 40 q 248 -20 284 -20 q 192 -8 219 -20 q 147 25 166 2 q 116 83 128 48 q 105 165 105 118 l 105 546 l 22 546 l 3 570 l 56 631 l 105 631 l 105 772 l 242 874 l 268 851 l 268 631 l 474 631 l 499 606 q 484 582 493 594 q 465 557 474 569 q 446 536 455 546 q 430 522 437 527 q 410 530 422 526 q 381 538 397 534 q 349 543 366 541 q 313 546 331 546 l 268 546 l 268 228 q 272 170 268 194 q 283 131 276 146 q 302 110 291 116 q 325 104 312 104 q 351 106 337 104 q 381 114 364 108 q 419 129 398 119 q 469 154 440 139 l 499 105 "},"ù":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 500 736 q 488 727 496 732 q 473 718 481 722 q 456 710 464 713 q 442 705 448 707 l 183 960 l 202 998 q 230 1004 209 1000 q 276 1013 251 1008 q 322 1020 300 1017 q 352 1025 344 1024 l 500 736 "},"Ȳ":{"x_min":-0.46875,"x_max":828.078125,"ha":851,"o":"m 233 0 l 233 49 q 284 62 264 55 q 317 75 305 69 q 334 87 329 81 q 340 98 340 93 l 340 358 q 285 470 315 412 q 223 581 254 527 q 162 681 192 635 q 108 759 132 727 q 95 773 102 766 q 77 783 89 779 q 48 789 66 787 q 2 792 30 792 l 0 841 q 44 848 19 844 q 95 854 70 851 q 142 858 120 856 q 178 861 164 861 q 216 852 197 861 q 247 829 235 844 q 299 752 272 795 q 355 660 327 709 q 410 560 383 611 q 461 460 437 509 l 619 760 q 613 788 630 778 q 544 805 596 798 l 544 855 l 828 855 l 828 805 q 759 787 781 796 q 727 760 737 777 l 510 354 l 510 98 q 514 88 510 94 q 531 76 519 82 q 564 62 543 69 q 617 49 585 55 l 617 0 l 233 0 m 720 1075 q 713 1055 718 1068 q 702 1029 708 1043 q 691 1004 696 1016 q 682 986 685 992 l 164 986 l 143 1007 q 149 1027 145 1015 q 160 1053 154 1039 q 172 1078 166 1066 q 181 1097 177 1090 l 699 1097 l 720 1075 "},"ï":{"x_min":-23.078125,"x_max":449.921875,"ha":417,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 m 449 859 q 441 813 449 834 q 418 775 432 791 q 384 749 403 758 q 343 740 364 740 q 283 761 303 740 q 262 822 262 782 q 271 869 262 847 q 295 907 280 891 q 328 932 309 923 q 369 942 347 942 q 428 921 407 942 q 449 859 449 901 m 163 859 q 155 813 163 834 q 132 775 146 791 q 98 749 118 758 q 57 740 79 740 q -2 761 18 740 q -23 822 -23 782 q -14 869 -23 847 q 9 907 -5 891 q 43 932 23 923 q 83 942 62 942 q 142 921 121 942 q 163 859 163 901 "},"Ò":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 562 962 q 543 938 553 949 q 522 922 533 927 l 197 1080 l 204 1123 q 224 1139 208 1128 q 257 1162 239 1150 q 291 1183 275 1173 q 315 1198 307 1193 l 562 962 "},"":{"x_min":-58.40625,"x_max":691.46875,"ha":707,"o":"m 691 205 q 685 144 688 176 q 677 83 681 112 q 670 32 673 54 q 663 0 666 10 l 29 0 l 29 49 q 98 70 75 58 q 122 90 122 81 l 122 420 q 105 423 113 422 q 89 425 97 425 q 61 419 73 425 q 38 404 49 414 q 15 380 27 395 q -7 347 4 365 l -58 365 q -29 422 -46 393 q 8 475 -12 452 q 56 515 30 499 q 113 531 82 531 l 122 531 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 466 q 325 460 308 460 q 378 479 355 460 q 423 538 400 498 l 475 517 q 446 460 463 489 q 408 408 430 432 q 360 369 386 384 q 302 354 334 354 l 292 354 l 292 131 q 297 109 292 119 q 317 94 303 100 q 356 84 332 87 q 418 81 380 81 l 494 81 q 547 88 525 81 q 584 112 568 95 q 614 156 601 129 q 641 223 627 183 l 691 205 "},"ầ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 579 750 q 561 723 571 737 q 539 705 551 710 l 349 856 l 160 705 q 136 723 148 710 q 114 750 124 737 l 303 1013 l 396 1013 l 579 750 m 458 1056 q 446 1048 454 1052 q 431 1039 439 1043 q 414 1031 422 1034 q 400 1025 406 1027 l 141 1281 l 160 1319 q 188 1325 167 1321 q 233 1333 209 1329 q 280 1341 258 1338 q 310 1345 302 1345 l 458 1056 "},"Ṫ":{"x_min":1.765625,"x_max":780.8125,"ha":806,"o":"m 203 0 l 203 49 q 254 62 234 55 q 287 75 275 69 q 304 87 299 82 q 309 98 309 93 l 309 774 l 136 774 q 117 766 126 774 q 98 742 108 759 q 77 698 89 725 q 51 631 66 670 l 1 649 q 6 697 3 669 q 13 754 9 724 q 21 810 17 783 q 28 855 25 837 l 755 855 l 780 833 q 777 791 780 815 q 771 739 775 766 q 763 685 767 712 q 755 638 759 659 l 704 638 q 692 694 697 669 q 683 737 688 720 q 669 764 677 754 q 646 774 660 774 l 479 774 l 479 98 q 483 88 479 94 q 500 76 488 82 q 533 62 512 69 q 585 49 554 55 l 585 0 l 203 0 m 483 1050 q 475 1003 483 1024 q 452 965 466 981 q 419 939 438 949 q 377 930 399 930 q 317 951 338 930 q 296 1012 296 972 q 305 1059 296 1037 q 329 1097 314 1081 q 363 1122 343 1113 q 403 1132 382 1132 q 462 1111 441 1132 q 483 1050 483 1091 "},"Ồ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 661 962 q 643 938 653 949 q 622 922 634 927 l 432 1032 l 242 922 q 221 938 231 927 q 202 962 211 949 l 391 1183 l 474 1183 l 661 962 m 562 1234 q 543 1209 553 1221 q 522 1193 533 1198 l 197 1352 l 204 1394 q 224 1411 208 1400 q 257 1433 239 1421 q 291 1455 275 1444 q 315 1469 307 1465 l 562 1234 "},"I":{"x_min":42.09375,"x_max":398.59375,"ha":454,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 "},"˝":{"x_min":33.90625,"x_max":491.71875,"ha":521,"o":"m 92 705 q 64 716 81 707 q 33 733 47 725 l 138 1020 q 163 1016 146 1018 q 197 1012 179 1015 q 231 1008 215 1010 q 254 1003 247 1005 l 274 965 l 92 705 m 309 705 q 281 716 298 707 q 250 733 264 725 l 355 1020 q 380 1016 363 1018 q 414 1012 396 1015 q 448 1008 432 1010 q 471 1003 464 1005 l 491 965 l 309 705 "},"ə":{"x_min":43,"x_max":630,"ha":674,"o":"m 326 61 q 423 109 393 61 q 460 258 454 157 l 251 258 q 218 242 230 258 q 207 199 207 226 q 216 141 207 167 q 241 98 225 116 q 279 70 257 80 q 326 61 301 61 m 630 339 q 604 190 630 259 q 532 71 579 121 q 489 33 513 50 q 436 4 464 16 q 378 -13 408 -7 q 318 -20 348 -20 q 205 -3 255 -20 q 118 44 154 13 q 62 115 82 74 q 43 205 43 157 q 49 252 43 232 q 67 288 55 272 q 90 299 77 292 q 118 312 103 305 q 146 324 132 318 q 173 335 160 330 l 461 335 q 442 424 457 386 q 403 486 426 461 q 350 523 379 511 q 289 536 320 536 q 250 533 271 536 q 204 522 229 530 q 150 499 179 514 q 87 458 121 483 q 77 466 83 460 q 67 479 72 472 q 58 492 62 485 q 52 501 54 498 q 129 573 93 544 q 200 620 165 602 q 270 644 234 637 q 344 651 305 651 q 452 630 400 651 q 543 570 504 610 q 606 472 583 531 q 630 339 630 414 "},"·":{"x_min":34,"x_max":250,"ha":284,"o":"m 250 480 q 240 433 250 453 q 214 398 230 412 q 176 376 198 383 q 129 369 154 369 q 92 374 110 369 q 62 389 75 379 q 41 416 49 400 q 34 457 34 433 q 43 503 34 482 q 70 538 53 524 q 108 561 86 553 q 154 569 130 569 q 190 563 173 569 q 220 547 207 558 q 241 520 233 537 q 250 480 250 503 "},"Ṝ":{"x_min":20.265625,"x_max":843.71875,"ha":840,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 784 q 74 778 97 781 q 29 771 50 775 l 20 834 q 176 862 92 849 q 358 875 261 875 q 515 859 451 875 q 621 815 580 843 q 681 750 662 788 q 700 669 700 712 q 686 583 700 622 q 647 512 672 544 q 587 457 622 481 q 510 420 552 434 l 724 124 q 745 101 735 110 q 766 88 754 92 q 794 82 778 83 q 833 84 810 82 l 843 34 q 793 19 821 27 q 738 4 765 11 q 687 -5 710 -1 q 651 -10 664 -10 q 612 1 631 -10 q 584 27 594 12 l 390 397 q 376 396 383 396 l 363 396 q 328 398 346 396 q 292 404 310 400 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 329 803 q 310 802 320 803 q 292 802 301 802 l 292 479 q 323 475 310 475 q 352 474 337 474 q 486 520 443 474 q 529 648 529 566 q 519 708 529 679 q 487 757 510 736 q 426 790 464 778 q 329 803 387 803 m 472 -184 q 463 -230 472 -209 q 441 -268 455 -252 q 407 -294 426 -285 q 366 -304 388 -304 q 306 -283 326 -304 q 285 -221 285 -262 q 294 -174 285 -196 q 317 -136 303 -152 q 351 -111 332 -120 q 392 -102 371 -102 q 451 -122 430 -102 q 472 -184 472 -143 m 674 1075 q 667 1055 672 1068 q 656 1029 662 1043 q 644 1004 650 1016 q 636 986 639 992 l 118 986 l 96 1007 q 103 1027 99 1015 q 114 1053 108 1039 q 126 1078 120 1066 q 134 1097 131 1090 l 653 1097 l 674 1075 "},"ẕ":{"x_min":35.265625,"x_max":613.109375,"ha":650,"o":"m 598 224 q 597 189 598 209 q 597 147 597 169 q 596 102 596 125 q 594 59 595 79 q 592 23 593 39 q 590 0 591 8 l 59 0 l 41 30 l 400 550 l 223 550 q 167 516 193 550 q 124 407 141 482 l 75 421 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 592 631 l 607 601 l 246 81 l 479 81 q 500 91 491 81 q 517 122 510 102 q 533 170 525 142 q 550 235 541 199 l 598 224 m 613 -137 q 605 -157 611 -145 q 594 -183 600 -170 q 583 -208 588 -197 q 575 -227 577 -220 l 56 -227 l 35 -205 q 42 -185 37 -197 q 52 -159 46 -173 q 64 -134 59 -146 q 73 -116 69 -122 l 591 -116 l 613 -137 "},"¿":{"x_min":44,"x_max":588,"ha":632,"o":"m 293 344 q 323 360 305 353 q 359 372 340 366 l 381 353 l 387 279 q 377 203 389 240 q 348 131 366 166 q 308 61 330 96 q 267 -5 286 27 q 235 -71 248 -38 q 223 -135 223 -103 q 250 -259 223 -219 q 324 -300 277 -300 q 356 -291 341 -300 q 384 -266 372 -282 q 403 -229 396 -251 q 411 -180 411 -207 q 408 -158 411 -171 q 402 -136 405 -146 q 434 -123 413 -130 q 478 -111 455 -117 q 525 -100 502 -105 q 563 -95 548 -96 l 586 -120 q 588 -137 588 -126 l 588 -153 q 562 -243 588 -201 q 494 -314 537 -284 q 395 -362 451 -345 q 276 -380 338 -380 q 176 -364 220 -380 q 104 -320 133 -348 q 59 -253 74 -292 q 44 -166 44 -213 q 61 -73 44 -115 q 105 4 78 -32 q 162 73 131 40 q 220 138 193 105 q 266 204 247 170 q 289 279 286 239 l 293 344 m 442 559 q 431 511 442 533 q 404 474 421 489 q 364 451 387 459 q 317 443 342 443 q 280 448 298 443 q 249 465 263 453 q 228 493 236 476 q 220 535 220 510 q 229 584 220 562 q 256 620 239 605 q 295 643 273 635 q 343 651 318 651 q 381 645 363 651 q 412 629 399 640 q 434 601 426 618 q 442 559 442 583 "},"Ứ":{"x_min":29.078125,"x_max":1016.078125,"ha":1016,"o":"m 1016 944 q 1003 893 1016 920 q 963 839 990 867 q 895 783 936 811 q 797 728 853 755 l 797 355 q 772 197 797 266 q 702 79 747 127 q 596 5 657 30 q 461 -20 535 -20 q 330 0 392 -20 q 222 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 340 146 315 180 q 405 95 365 112 q 503 78 445 78 q 585 99 552 78 q 639 157 618 121 q 668 240 659 193 q 678 337 678 287 l 678 763 q 655 783 678 771 q 585 805 633 795 l 585 855 l 830 855 q 837 873 835 864 q 838 889 838 882 q 825 926 838 909 q 794 959 813 944 l 970 1040 q 1002 998 989 1025 q 1016 944 1016 972 m 397 922 q 373 941 385 927 q 351 967 360 954 l 598 1198 q 633 1178 614 1189 q 669 1157 652 1167 q 700 1137 687 1146 q 719 1122 714 1127 l 725 1086 l 397 922 "},"ű":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 281 705 q 252 716 269 707 q 222 733 236 725 l 326 1020 q 351 1016 335 1018 q 386 1012 368 1015 q 420 1008 404 1010 q 442 1003 436 1005 l 463 965 l 281 705 m 499 705 q 470 716 487 707 q 440 733 453 725 l 543 1020 q 568 1016 552 1018 q 603 1012 585 1015 q 637 1008 621 1010 q 660 1003 653 1005 l 680 965 l 499 705 "},"ɖ":{"x_min":44,"x_max":987.109375,"ha":773,"o":"m 361 109 q 431 127 398 109 q 506 182 465 146 l 506 478 q 444 539 480 517 q 363 561 408 561 q 300 548 329 561 q 251 507 272 535 q 218 438 230 480 q 207 337 207 396 q 220 241 207 283 q 255 169 234 199 q 305 124 277 140 q 361 109 333 109 m 669 -97 q 686 -214 669 -175 q 744 -254 703 -254 q 778 -242 763 -254 q 802 -212 793 -230 q 811 -176 810 -195 q 804 -142 812 -157 q 812 -134 803 -139 q 835 -123 820 -129 q 869 -111 850 -117 q 907 -100 888 -105 q 942 -93 926 -95 q 968 -91 958 -91 l 987 -129 q 966 -192 987 -157 q 907 -259 945 -227 q 814 -312 869 -290 q 694 -334 760 -334 q 605 -318 641 -334 q 547 -275 569 -302 q 515 -214 525 -248 q 506 -143 506 -180 l 506 93 q 450 41 476 62 q 400 6 425 20 q 349 -13 375 -7 q 292 -20 323 -20 q 202 2 247 -20 q 122 65 158 24 q 65 166 87 106 q 44 301 44 226 q 68 432 44 369 q 136 544 92 495 q 240 621 179 592 q 374 651 301 651 q 437 643 406 651 q 506 610 469 636 l 506 843 q 504 902 506 880 q 495 936 503 924 q 468 952 487 948 q 413 960 449 957 l 413 1006 q 548 1026 488 1014 q 643 1051 607 1039 l 669 1025 l 669 -97 "},"Ṹ":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 736 1123 q 706 1063 724 1096 q 666 1001 689 1030 q 616 954 644 973 q 558 935 589 935 q 502 946 529 935 q 451 970 476 957 q 401 994 425 983 q 350 1005 376 1005 q 322 1000 335 1005 q 299 985 310 994 q 277 961 288 975 q 253 928 265 946 l 202 946 q 232 1007 215 974 q 271 1069 249 1040 q 321 1117 294 1098 q 379 1137 348 1137 q 439 1126 411 1137 q 492 1102 467 1115 q 541 1078 518 1089 q 585 1067 564 1067 q 638 1085 616 1067 q 684 1144 661 1104 l 736 1123 m 379 1164 q 355 1183 368 1170 q 333 1210 343 1197 l 581 1440 q 615 1421 596 1432 q 652 1399 634 1410 q 682 1379 669 1389 q 701 1364 696 1370 l 708 1329 l 379 1164 "},"Ḍ":{"x_min":20.265625,"x_max":828,"ha":884,"o":"m 828 458 q 810 306 828 373 q 763 188 793 240 q 693 102 733 137 q 608 43 653 66 q 514 10 562 21 q 419 0 465 0 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 784 l 29 771 l 20 834 q 99 849 53 842 q 195 863 145 857 q 296 871 246 868 q 391 875 347 875 q 577 846 495 875 q 714 765 658 818 q 798 634 769 711 q 828 458 828 556 m 343 803 q 318 802 331 803 q 292 802 305 802 l 292 113 q 293 104 292 108 q 300 90 295 96 q 317 81 305 85 q 347 75 328 77 q 394 73 366 73 q 449 81 420 73 q 506 109 477 90 q 559 157 534 128 q 603 226 585 186 q 634 317 622 266 q 646 432 646 368 q 626 591 646 522 q 568 707 606 660 q 473 778 530 754 q 343 803 417 803 m 493 -184 q 484 -230 493 -209 q 462 -268 476 -252 q 428 -294 447 -285 q 387 -304 409 -304 q 327 -283 347 -304 q 306 -221 306 -262 q 315 -174 306 -196 q 338 -136 324 -152 q 372 -111 353 -120 q 413 -102 392 -102 q 472 -122 451 -102 q 493 -184 493 -143 "},"Ǽ":{"x_min":0.234375,"x_max":1091.9375,"ha":1122,"o":"m 515 757 q 510 768 515 765 q 498 770 505 772 q 484 763 491 769 q 472 746 477 757 l 371 498 l 515 498 l 515 757 m 1091 205 q 1084 144 1088 176 q 1077 83 1081 112 q 1070 32 1073 54 q 1064 0 1066 10 l 423 0 l 423 49 q 492 70 469 58 q 515 90 515 81 l 515 423 l 342 423 l 209 95 q 216 65 200 75 q 282 49 232 55 l 282 0 l 0 0 l 0 49 q 66 65 42 55 q 98 95 89 76 l 362 748 q 364 767 367 760 q 348 782 361 775 q 314 793 336 788 q 258 805 291 799 l 258 855 l 1022 855 l 1047 833 q 1043 788 1045 815 q 1037 734 1041 762 q 1028 681 1033 706 q 1019 644 1024 656 l 968 644 q 952 740 965 707 q 912 774 939 774 l 685 774 l 685 498 l 954 498 l 977 474 q 964 452 971 464 q 947 426 956 439 q 930 402 938 413 q 915 385 922 391 q 891 402 905 395 q 865 414 878 409 q 843 420 852 418 q 831 423 833 423 l 685 423 l 685 124 q 690 106 685 114 q 710 92 695 98 q 753 84 725 87 q 825 81 780 81 l 889 81 q 943 88 921 81 q 983 112 965 95 q 1014 156 1000 129 q 1042 223 1028 183 l 1091 205 m 567 922 q 542 941 555 927 q 520 967 530 954 l 768 1198 q 803 1178 784 1189 q 839 1157 822 1167 q 870 1137 856 1146 q 889 1122 883 1127 l 895 1086 l 567 922 "},";":{"x_min":59.234375,"x_max":325,"ha":374,"o":"m 325 47 q 309 -31 325 10 q 267 -115 293 -73 q 204 -194 240 -156 q 127 -258 168 -231 l 81 -224 q 141 -132 119 -179 q 163 -25 163 -84 q 156 4 163 -10 q 138 30 150 19 q 109 47 126 41 q 70 52 91 53 l 59 104 q 76 117 63 110 q 107 132 89 125 q 148 148 126 140 q 190 162 169 156 q 230 172 211 169 q 259 176 248 176 q 308 130 292 160 q 325 47 325 101 m 311 559 q 301 510 311 532 q 274 474 291 489 q 235 451 258 459 q 187 443 212 443 q 149 448 167 443 q 118 465 131 453 q 96 493 104 476 q 89 535 89 510 q 99 583 89 561 q 126 620 109 605 q 166 643 143 635 q 213 651 189 651 q 250 646 232 651 q 281 629 267 640 q 302 601 294 618 q 311 559 311 583 "},"Ġ":{"x_min":37,"x_max":807.78125,"ha":836,"o":"m 743 805 q 743 793 746 802 q 734 769 740 783 q 718 739 728 756 q 700 708 709 723 q 682 682 691 693 q 667 665 673 670 l 624 674 q 579 729 602 707 q 532 765 557 752 q 481 784 508 778 q 426 790 455 790 q 386 783 409 790 q 339 760 363 776 q 292 716 315 743 q 250 650 268 689 q 220 556 232 610 q 209 432 209 502 q 230 276 209 341 q 286 169 251 211 q 365 107 321 127 q 458 87 410 87 q 525 93 496 87 q 579 112 555 100 l 579 318 q 576 333 579 326 q 562 347 573 340 q 529 361 551 354 q 469 374 507 367 l 469 424 l 807 424 l 807 374 q 755 349 769 365 q 742 318 742 334 l 742 114 q 647 47 691 73 q 566 6 604 21 q 494 -14 528 -8 q 429 -20 460 -20 q 331 -8 379 -20 q 240 25 283 2 q 159 82 196 47 q 94 163 121 116 q 52 267 67 209 q 37 394 37 325 q 72 596 37 507 q 172 747 108 685 q 322 842 236 809 q 510 875 409 875 q 563 870 532 875 q 626 856 594 865 q 690 834 659 847 q 743 805 721 821 m 538 1050 q 530 1003 538 1024 q 507 965 521 981 q 473 939 493 949 q 432 930 454 930 q 372 951 393 930 q 351 1012 351 972 q 360 1059 351 1037 q 384 1097 369 1081 q 418 1122 398 1113 q 458 1132 437 1132 q 517 1111 496 1132 q 538 1050 538 1091 "},"6":{"x_min":64,"x_max":659,"ha":703,"o":"m 369 437 q 305 417 340 437 q 239 363 271 398 q 250 226 239 283 q 282 134 262 170 q 330 83 302 99 q 389 67 357 67 q 438 81 419 67 q 469 120 458 96 q 486 174 481 144 q 491 236 491 204 q 480 338 491 299 q 451 399 469 378 q 412 429 434 421 q 369 437 391 437 m 659 279 q 650 212 659 247 q 626 145 642 178 q 587 82 610 112 q 531 29 563 52 q 459 -6 499 7 q 373 -20 420 -20 q 252 4 309 -20 q 154 74 196 29 q 88 181 112 118 q 64 320 64 244 q 96 504 64 416 q 193 662 129 592 q 353 780 257 732 q 574 847 448 829 l 593 786 q 451 736 511 768 q 349 661 391 704 q 282 568 307 618 q 248 461 258 517 q 334 514 290 496 q 413 532 377 532 q 516 513 470 532 q 594 461 562 494 q 642 381 625 427 q 659 279 659 334 "},"n":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 399 q 535 461 539 436 q 523 500 531 485 q 501 521 515 515 q 467 528 488 528 q 433 523 451 528 q 393 508 415 519 q 344 479 371 498 q 285 433 317 461 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 467 q 120 509 122 493 q 111 533 119 524 q 85 546 103 542 q 33 554 67 550 l 33 602 q 93 610 65 605 q 147 620 121 615 q 197 634 173 626 q 246 651 221 641 l 274 622 l 282 524 q 430 621 361 592 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 "},"ʌ":{"x_min":13.5625,"x_max":701.28125,"ha":711,"o":"m 13 49 q 45 58 33 54 q 64 67 57 62 q 75 79 71 72 q 83 95 79 86 l 275 575 q 294 602 281 590 q 322 624 306 615 q 357 640 339 634 q 392 651 375 646 l 631 95 q 640 79 635 86 q 653 67 645 72 q 672 57 661 61 q 701 49 684 53 l 701 0 l 394 0 l 394 49 q 435 56 420 52 q 458 65 451 60 q 465 77 465 70 q 460 95 465 84 l 315 436 l 177 95 q 172 78 173 85 q 178 66 172 71 q 196 57 183 61 q 232 49 209 53 l 232 0 l 13 0 l 13 49 "},"Ṉ":{"x_min":29.078125,"x_max":894.59375,"ha":922,"o":"m 29 0 l 29 49 q 100 68 78 55 q 122 90 122 81 l 122 755 q 29 805 77 797 l 29 855 l 219 855 q 235 853 229 855 q 248 846 242 851 q 263 830 255 840 q 284 802 271 819 l 699 226 l 699 763 q 694 773 699 767 q 679 784 690 779 q 651 795 669 790 q 606 805 633 801 l 606 855 l 894 855 l 894 805 q 823 785 845 798 q 801 763 801 772 l 801 -20 q 696 5 735 -14 q 638 50 657 25 l 224 624 l 224 90 q 228 81 224 86 q 244 69 233 75 q 273 58 255 63 q 317 49 291 52 l 317 0 l 29 0 m 750 -137 q 742 -157 748 -145 q 731 -183 737 -170 q 720 -208 725 -197 q 712 -227 714 -220 l 193 -227 l 172 -205 q 179 -185 174 -197 q 189 -159 183 -173 q 201 -134 196 -146 q 210 -116 206 -122 l 728 -116 l 750 -137 "},"ḯ":{"x_min":-23.078125,"x_max":449.921875,"ha":417,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 m 449 859 q 441 813 449 834 q 418 775 432 791 q 384 749 403 758 q 343 740 364 740 q 283 761 303 740 q 262 822 262 782 q 271 869 262 847 q 295 907 280 891 q 328 932 309 923 q 369 942 347 942 q 428 921 407 942 q 449 859 449 901 m 163 859 q 155 813 163 834 q 132 775 146 791 q 98 749 118 758 q 57 740 79 740 q -2 761 18 740 q -23 822 -23 782 q -14 869 -23 847 q 9 907 -5 891 q 43 932 23 923 q 83 942 62 942 q 142 921 121 942 q 163 859 163 901 m 172 954 q 158 959 166 955 q 141 967 149 962 q 125 975 132 971 q 113 983 118 980 l 257 1274 q 287 1270 265 1273 q 334 1263 309 1267 q 381 1255 359 1259 q 411 1248 404 1250 l 432 1212 l 172 954 "},"ụ":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 484 -184 q 476 -230 484 -209 q 453 -268 467 -252 q 419 -294 439 -285 q 378 -304 400 -304 q 318 -283 339 -304 q 297 -221 297 -262 q 306 -174 297 -196 q 329 -136 315 -152 q 363 -111 344 -120 q 404 -102 383 -102 q 463 -122 442 -102 q 484 -184 484 -143 "},"Ẵ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 695 1398 q 666 1337 683 1370 q 626 1275 649 1304 q 576 1227 603 1246 q 518 1208 549 1208 q 462 1219 489 1208 q 410 1244 436 1230 q 360 1268 385 1257 q 310 1280 335 1280 q 282 1274 295 1280 q 258 1260 269 1269 q 236 1235 247 1250 q 213 1202 225 1221 l 162 1221 q 191 1282 174 1248 q 231 1344 209 1315 q 281 1392 254 1373 q 339 1412 308 1412 q 398 1400 370 1412 q 452 1376 426 1389 q 500 1351 477 1362 q 545 1340 523 1340 q 598 1359 575 1340 q 644 1419 621 1378 l 695 1398 m 670 1144 q 622 1050 649 1089 q 564 986 595 1011 q 499 949 533 961 q 430 938 465 938 q 358 949 393 938 q 292 986 323 961 q 235 1050 261 1011 q 188 1144 208 1089 q 199 1157 192 1150 q 212 1170 205 1164 q 226 1182 219 1177 q 239 1190 233 1187 q 279 1136 256 1158 q 327 1098 302 1113 q 379 1075 353 1082 q 427 1068 405 1068 q 478 1075 451 1068 q 530 1097 504 1082 q 578 1135 555 1112 q 618 1190 601 1158 q 631 1182 624 1187 q 646 1170 638 1177 q 659 1157 653 1164 q 670 1144 666 1150 "},"Ǩ":{"x_min":29.078125,"x_max":857.640625,"ha":859,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 446 l 544 745 q 566 774 559 763 q 569 791 572 785 q 550 800 565 797 q 509 805 535 803 l 509 855 l 814 855 l 814 805 q 777 800 792 802 q 750 792 762 797 q 729 781 738 788 q 709 763 719 774 l 418 458 l 745 111 q 767 92 755 99 q 792 84 778 86 q 820 82 805 81 q 852 84 835 82 l 857 34 q 813 20 837 28 q 764 6 789 13 q 717 -5 740 0 q 679 -10 695 -10 q 644 -3 659 -10 q 615 19 629 2 l 292 423 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 473 939 l 380 939 l 196 1162 q 215 1186 205 1175 q 236 1204 225 1197 l 428 1076 l 616 1204 q 637 1186 628 1197 q 655 1162 647 1175 l 473 939 "},"ḡ":{"x_min":10,"x_max":716.828125,"ha":718,"o":"m 453 406 q 443 471 453 441 q 417 524 434 501 q 373 559 399 546 q 312 573 347 573 q 278 565 295 573 q 246 541 260 557 q 223 502 232 526 q 214 446 214 478 q 222 382 214 412 q 247 329 230 352 q 291 294 264 307 q 354 281 317 281 q 391 288 373 281 q 423 312 409 296 q 444 351 436 327 q 453 406 453 374 m 377 -28 q 316 -18 344 -24 q 262 -7 287 -13 q 213 -46 231 -29 q 186 -77 195 -63 q 175 -102 177 -91 q 173 -123 173 -113 q 189 -166 173 -146 q 235 -203 206 -187 q 304 -227 264 -218 q 390 -237 343 -237 q 459 -227 430 -237 q 507 -200 488 -217 q 536 -161 527 -183 q 546 -116 546 -140 q 539 -90 546 -103 q 515 -66 533 -77 q 463 -44 497 -54 q 377 -28 430 -34 m 609 434 q 585 339 609 382 q 524 265 562 296 q 434 217 485 234 q 327 200 383 200 l 320 200 q 287 161 294 176 q 280 143 280 147 q 284 131 280 136 q 304 119 288 125 q 350 107 319 113 q 434 94 381 101 q 565 70 513 84 q 648 35 617 55 q 691 -11 679 15 q 704 -71 704 -37 q 689 -134 704 -102 q 649 -196 674 -166 q 588 -250 623 -225 q 513 -294 554 -275 q 429 -323 473 -313 q 342 -334 385 -334 q 268 -329 307 -334 q 193 -315 230 -325 q 123 -291 156 -306 q 64 -256 90 -277 q 24 -209 39 -235 q 10 -150 10 -182 q 17 -115 10 -133 q 43 -78 24 -98 q 95 -34 62 -58 q 180 17 128 -11 q 103 83 103 48 q 109 103 103 90 q 130 132 116 116 q 169 169 145 149 q 226 212 192 189 q 157 241 188 223 q 104 284 126 259 q 70 341 82 309 q 58 408 58 372 q 82 502 58 457 q 147 579 106 546 q 242 631 188 612 q 354 651 295 651 q 442 638 401 651 q 515 603 482 625 q 622 625 574 610 q 697 651 670 640 l 716 625 q 710 608 714 618 q 700 587 705 598 q 690 566 695 577 q 678 547 684 556 q 631 541 655 543 q 579 537 607 538 q 601 487 593 513 q 609 434 609 462 m 651 886 q 644 866 649 879 q 633 840 639 854 q 621 815 627 826 q 613 797 616 803 l 95 797 l 73 818 q 80 838 75 826 q 91 864 85 850 q 103 889 97 877 q 111 908 108 901 l 630 908 l 651 886 "},"∂":{"x_min":44,"x_max":671,"ha":715,"o":"m 502 397 q 471 466 491 435 q 428 517 451 496 q 379 550 404 538 q 332 562 354 562 q 276 544 299 562 q 238 495 253 527 q 216 419 223 464 q 209 321 209 375 q 222 220 209 267 q 256 139 235 174 q 304 85 277 105 q 358 65 331 65 q 423 87 396 65 q 468 150 450 109 q 493 253 485 192 q 502 390 502 313 l 502 397 m 671 489 q 655 309 671 386 q 612 174 639 231 q 552 80 586 118 q 483 20 519 43 q 411 -10 447 -1 q 346 -20 375 -20 q 220 4 276 -20 q 125 71 164 28 q 65 173 86 114 q 44 301 44 232 q 67 431 44 368 q 130 544 90 495 q 225 622 170 593 q 343 652 280 652 q 382 645 361 652 q 425 627 404 639 q 467 600 447 616 q 502 566 487 585 q 476 719 498 659 q 425 815 455 780 q 363 863 395 849 q 307 877 331 877 q 258 872 280 877 q 214 859 236 868 q 168 832 192 849 q 117 792 145 816 l 81 820 l 181 947 q 256 972 221 963 q 325 981 291 981 q 403 973 362 981 q 482 945 443 965 q 554 889 520 924 q 614 800 588 854 q 655 669 640 745 q 671 489 671 592 "},"‡":{"x_min":37.171875,"x_max":645.828125,"ha":683,"o":"m 645 754 q 629 720 640 742 q 606 674 619 698 q 580 627 593 649 q 559 591 567 604 q 515 613 537 603 q 473 630 494 622 q 429 642 452 637 q 380 649 406 647 q 395 571 384 609 q 429 488 407 533 q 397 405 409 445 q 382 327 386 365 q 624 385 506 335 l 645 351 q 630 317 641 339 q 606 271 619 295 q 580 224 593 247 q 559 188 567 201 q 516 209 537 199 q 474 226 495 218 q 429 238 452 233 q 380 246 406 243 q 385 192 381 216 q 397 145 390 168 q 415 101 405 123 q 439 54 426 79 q 404 34 426 46 q 356 9 381 21 q 310 -12 332 -1 q 277 -27 288 -22 l 242 -5 q 284 119 268 58 q 303 247 299 180 q 179 227 239 241 q 59 188 119 212 l 37 223 q 52 256 41 234 q 76 302 63 278 q 102 349 89 327 q 123 385 115 372 q 166 363 145 373 q 208 346 187 353 q 252 334 229 339 q 301 327 275 329 q 284 405 296 365 q 252 488 273 445 q 286 571 274 533 q 302 650 298 609 q 179 630 238 645 q 59 591 119 615 l 37 626 q 53 659 42 637 q 76 705 63 681 q 102 752 89 729 q 123 788 115 775 q 209 748 167 762 q 302 730 250 734 q 295 783 299 759 q 282 831 290 808 q 264 876 274 854 q 242 923 254 898 q 277 943 255 931 q 325 967 300 955 q 371 989 349 978 q 405 1004 393 999 l 439 982 q 401 857 416 919 q 381 730 385 795 q 503 749 444 735 q 623 788 563 763 l 645 754 "},"ň":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 399 q 535 461 539 436 q 523 500 531 485 q 501 521 515 515 q 467 528 488 528 q 433 523 451 528 q 393 508 415 519 q 344 479 371 498 q 285 433 317 461 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 467 q 120 509 122 493 q 111 533 119 524 q 85 546 103 542 q 33 554 67 550 l 33 602 q 93 610 65 605 q 147 620 121 615 q 197 634 173 626 q 246 651 221 641 l 274 622 l 282 524 q 430 621 361 592 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 m 455 722 l 362 722 l 179 979 q 197 1007 187 993 q 218 1026 206 1020 l 409 878 l 598 1026 q 621 1007 609 1020 q 643 979 634 993 l 455 722 "},"√":{"x_min":3.390625,"x_max":885.765625,"ha":856,"o":"m 885 963 q 879 943 883 955 q 872 918 876 931 q 864 894 868 905 q 857 876 859 882 l 736 876 l 517 60 q 491 31 511 45 q 448 7 472 17 q 404 -10 425 -3 q 374 -20 383 -17 l 112 537 l 25 537 l 3 560 q 9 578 5 567 q 18 600 13 588 q 27 622 23 612 q 35 640 32 633 l 221 641 l 448 161 l 676 985 l 864 985 l 885 963 "},"ố":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 609 750 q 591 723 600 737 q 569 705 581 710 l 379 856 l 189 705 q 166 723 178 710 q 144 750 153 737 l 333 1013 l 426 1013 l 609 750 m 338 1025 q 323 1030 332 1026 q 306 1038 315 1033 q 290 1047 297 1042 q 279 1054 283 1051 l 422 1345 q 452 1342 430 1345 q 499 1334 474 1339 q 547 1326 524 1330 q 577 1320 569 1322 l 597 1283 l 338 1025 "},"Ặ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 522 -184 q 514 -230 522 -209 q 491 -268 505 -252 q 457 -294 477 -285 q 416 -304 438 -304 q 356 -283 377 -304 q 335 -221 335 -262 q 344 -174 335 -196 q 367 -136 353 -152 q 401 -111 382 -120 q 442 -102 421 -102 q 501 -122 480 -102 q 522 -184 522 -143 m 670 1144 q 622 1050 649 1089 q 564 986 595 1011 q 499 949 533 961 q 430 938 465 938 q 358 949 393 938 q 292 986 323 961 q 235 1050 261 1011 q 188 1144 208 1089 q 199 1157 192 1150 q 212 1170 205 1164 q 226 1182 219 1177 q 239 1190 233 1187 q 279 1136 256 1158 q 327 1098 302 1113 q 379 1075 353 1082 q 427 1068 405 1068 q 478 1075 451 1068 q 530 1097 504 1082 q 578 1135 555 1112 q 618 1190 601 1158 q 631 1182 624 1187 q 646 1170 638 1177 q 659 1157 653 1164 q 670 1144 666 1150 "},"Ế":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 592 962 q 574 938 584 949 q 553 922 564 927 l 362 1032 l 173 922 q 152 938 162 927 q 132 962 142 949 l 322 1183 l 404 1183 l 592 962 m 274 1193 q 249 1212 262 1198 q 227 1238 237 1225 l 475 1469 q 510 1450 491 1461 q 546 1428 529 1438 q 577 1408 563 1417 q 596 1393 590 1398 l 602 1358 l 274 1193 "},"ṫ":{"x_min":3.265625,"x_max":499.28125,"ha":514,"o":"m 499 105 q 346 10 409 40 q 248 -20 284 -20 q 192 -8 219 -20 q 147 25 166 2 q 116 83 128 48 q 105 165 105 118 l 105 546 l 22 546 l 3 570 l 56 631 l 105 631 l 105 772 l 242 874 l 268 851 l 268 631 l 474 631 l 499 606 q 484 582 493 594 q 465 557 474 569 q 446 536 455 546 q 430 522 437 527 q 410 530 422 526 q 381 538 397 534 q 349 543 366 541 q 313 546 331 546 l 268 546 l 268 228 q 272 170 268 194 q 283 131 276 146 q 302 110 291 116 q 325 104 312 104 q 351 106 337 104 q 381 114 364 108 q 419 129 398 119 q 469 154 440 139 l 499 105 m 344 1043 q 336 996 344 1018 q 313 958 327 974 q 279 932 299 942 q 238 923 260 923 q 178 944 199 923 q 157 1005 157 965 q 166 1052 157 1030 q 190 1090 175 1074 q 224 1115 204 1106 q 264 1125 243 1125 q 323 1104 302 1125 q 344 1043 344 1084 "},"ắ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 590 927 q 542 833 569 872 q 484 769 515 794 q 419 732 453 744 q 350 721 385 721 q 278 732 313 721 q 212 769 243 744 q 155 833 181 794 q 108 927 128 872 q 119 940 112 933 q 132 953 125 947 q 146 965 139 960 q 159 973 153 970 q 199 919 176 941 q 247 881 222 896 q 299 858 273 865 q 347 851 325 851 q 398 858 371 851 q 449 880 424 865 q 498 918 475 895 q 538 973 521 941 q 551 965 544 970 q 565 953 558 960 q 579 940 573 947 q 590 927 585 933 m 308 937 q 294 942 302 938 q 276 950 285 945 q 260 958 267 954 q 249 966 253 963 l 392 1257 q 422 1253 400 1256 q 470 1246 444 1250 q 517 1238 495 1242 q 547 1231 539 1233 l 567 1195 l 308 937 "},"Ṅ":{"x_min":29.078125,"x_max":894.59375,"ha":922,"o":"m 29 0 l 29 49 q 100 68 78 55 q 122 90 122 81 l 122 755 q 29 805 77 797 l 29 855 l 219 855 q 235 853 229 855 q 248 846 242 851 q 263 830 255 840 q 284 802 271 819 l 699 226 l 699 763 q 694 773 699 767 q 679 784 690 779 q 651 795 669 790 q 606 805 633 801 l 606 855 l 894 855 l 894 805 q 823 785 845 798 q 801 763 801 772 l 801 -20 q 696 5 735 -14 q 638 50 657 25 l 224 624 l 224 90 q 228 81 224 86 q 244 69 233 75 q 273 58 255 63 q 317 49 291 52 l 317 0 l 29 0 m 554 1050 q 545 1003 554 1024 q 523 965 537 981 q 489 939 508 949 q 448 930 470 930 q 388 951 408 930 q 367 1012 367 972 q 376 1059 367 1037 q 399 1097 385 1081 q 433 1122 414 1113 q 474 1132 453 1132 q 533 1111 512 1132 q 554 1050 554 1091 "},"≈":{"x_min":35.265625,"x_max":595.484375,"ha":631,"o":"m 595 313 q 557 263 578 285 q 513 226 536 241 q 464 202 489 210 q 416 194 440 194 q 359 204 387 194 q 304 227 331 215 q 248 250 276 239 q 193 261 221 261 q 136 242 162 261 q 81 192 111 224 l 35 244 q 115 332 69 299 q 209 365 161 365 q 270 354 240 365 q 329 331 301 343 q 383 308 358 319 q 430 298 408 298 q 462 303 446 298 q 492 319 478 309 q 520 341 507 328 q 543 367 533 353 l 595 313 m 595 515 q 557 465 578 487 q 513 428 536 443 q 464 404 489 412 q 416 396 440 396 q 359 406 387 396 q 304 429 331 416 q 248 451 276 441 q 193 462 221 462 q 136 444 162 462 q 81 393 111 426 l 35 446 q 115 534 69 501 q 209 567 161 567 q 270 556 240 567 q 329 534 301 546 q 383 511 358 521 q 430 501 408 501 q 462 506 446 501 q 492 521 478 512 q 520 543 507 531 q 543 570 533 555 l 595 515 "},"g":{"x_min":10,"x_max":716.828125,"ha":718,"o":"m 453 406 q 443 471 453 441 q 417 524 434 501 q 373 559 399 546 q 312 573 347 573 q 278 565 295 573 q 246 541 260 557 q 223 502 232 526 q 214 446 214 478 q 222 382 214 412 q 247 329 230 352 q 291 294 264 307 q 354 281 317 281 q 391 288 373 281 q 423 312 409 296 q 444 351 436 327 q 453 406 453 374 m 377 -28 q 316 -18 344 -24 q 262 -7 287 -13 q 213 -46 231 -29 q 186 -77 195 -63 q 175 -102 177 -91 q 173 -123 173 -113 q 189 -166 173 -146 q 235 -203 206 -187 q 304 -227 264 -218 q 390 -237 343 -237 q 459 -227 430 -237 q 507 -200 488 -217 q 536 -161 527 -183 q 546 -116 546 -140 q 539 -90 546 -103 q 515 -66 533 -77 q 463 -44 497 -54 q 377 -28 430 -34 m 609 434 q 585 339 609 382 q 524 265 562 296 q 434 217 485 234 q 327 200 383 200 l 320 200 q 287 161 294 176 q 280 143 280 147 q 284 131 280 136 q 304 119 288 125 q 350 107 319 113 q 434 94 381 101 q 565 70 513 84 q 648 35 617 55 q 691 -11 679 15 q 704 -71 704 -37 q 689 -134 704 -102 q 649 -196 674 -166 q 588 -250 623 -225 q 513 -294 554 -275 q 429 -323 473 -313 q 342 -334 385 -334 q 268 -329 307 -334 q 193 -315 230 -325 q 123 -291 156 -306 q 64 -256 90 -277 q 24 -209 39 -235 q 10 -150 10 -182 q 17 -115 10 -133 q 43 -78 24 -98 q 95 -34 62 -58 q 180 17 128 -11 q 103 83 103 48 q 109 103 103 90 q 130 132 116 116 q 169 169 145 149 q 226 212 192 189 q 157 241 188 223 q 104 284 126 259 q 70 341 82 309 q 58 408 58 372 q 82 502 58 457 q 147 579 106 546 q 242 631 188 612 q 354 651 295 651 q 442 638 401 651 q 515 603 482 625 q 622 625 574 610 q 697 651 670 640 l 716 625 q 710 608 714 618 q 700 587 705 598 q 690 566 695 577 q 678 547 684 556 q 631 541 655 543 q 579 537 607 538 q 601 487 593 513 q 609 434 609 462 "},"ǿ":{"x_min":44,"x_max":685,"ha":729,"o":"m 515 298 q 509 360 515 328 q 496 417 503 392 l 269 126 q 316 82 290 100 q 370 65 343 65 q 439 80 411 65 q 483 125 466 96 q 507 199 500 155 q 515 298 515 242 m 214 320 q 218 263 214 292 q 231 211 223 234 l 459 505 q 413 549 440 532 q 358 566 387 566 q 288 547 316 566 q 244 495 261 528 q 220 417 227 463 q 214 320 214 372 m 676 646 l 605 555 q 663 454 642 512 q 685 329 685 395 q 672 240 685 283 q 638 158 660 197 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 264 -8 306 -20 q 188 22 222 3 l 178 9 q 159 -2 172 4 q 129 -15 145 -9 q 98 -27 113 -22 q 72 -36 82 -33 l 54 -15 l 124 75 q 66 176 88 117 q 44 301 44 234 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 464 639 423 651 q 539 608 505 627 l 549 620 q 571 633 558 626 q 599 646 585 640 q 629 659 614 653 q 655 667 644 664 l 676 646 m 330 705 q 316 709 324 705 q 299 717 307 713 q 283 726 290 721 q 271 734 276 730 l 415 1025 q 445 1021 423 1024 q 492 1014 467 1018 q 539 1005 517 1010 q 569 999 562 1001 l 590 962 l 330 705 "},"²":{"x_min":38.171875,"x_max":441.78125,"ha":482,"o":"m 435 421 l 51 421 l 38 450 q 173 590 121 534 q 253 685 224 647 q 292 748 282 723 q 302 795 302 774 q 288 849 302 830 q 239 869 274 869 q 192 846 205 869 q 184 793 178 824 q 161 785 176 789 q 128 778 146 781 q 94 771 111 774 q 66 767 77 768 l 50 795 q 68 839 50 816 q 116 880 85 861 q 187 911 146 899 q 272 923 227 923 q 339 916 309 923 q 390 896 369 910 q 423 864 411 883 q 435 820 435 845 q 430 784 435 801 q 414 746 425 766 q 385 703 403 727 q 338 651 366 680 q 271 584 310 621 q 182 499 233 547 l 353 499 q 378 511 369 499 q 393 538 388 523 q 401 578 399 555 l 441 570 l 435 421 "},"́":{"x_min":-466.625,"x_max":-148.53125,"ha":0,"o":"m -407 705 q -422 709 -413 705 q -439 717 -430 713 q -455 726 -448 721 q -466 734 -462 730 l -323 1025 q -293 1021 -315 1024 q -246 1014 -271 1018 q -198 1005 -221 1010 q -168 999 -176 1001 l -148 962 l -407 705 "},"ḣ":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 388 q 534 457 539 430 q 521 499 530 483 q 497 521 511 515 q 462 528 482 528 q 381 503 423 528 q 285 433 339 479 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 859 q 120 904 122 888 q 110 928 118 920 q 83 941 101 937 q 33 949 65 945 l 33 996 q 101 1007 70 1002 q 156 1019 131 1013 q 206 1033 182 1025 q 255 1051 230 1040 l 285 1023 l 285 530 q 431 622 363 594 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 m 504 1219 q 496 1172 504 1194 q 473 1134 487 1151 q 440 1109 459 1118 q 398 1099 420 1099 q 338 1120 359 1099 q 317 1182 317 1141 q 326 1229 317 1207 q 350 1267 335 1250 q 384 1292 364 1283 q 424 1301 403 1301 q 483 1281 462 1301 q 504 1219 504 1260 "},"ḉ":{"x_min":44,"x_max":606.125,"ha":633,"o":"m 482 -155 q 463 -204 482 -180 q 412 -247 445 -227 q 335 -281 380 -267 q 237 -301 290 -295 l 212 -252 q 296 -224 271 -244 q 322 -182 322 -204 q 306 -149 322 -159 q 260 -137 290 -139 l 262 -134 q 270 -117 264 -131 q 286 -73 276 -103 q 305 -20 294 -53 q 220 1 260 -15 q 129 64 169 23 q 67 165 90 106 q 44 300 44 225 q 71 437 44 374 q 146 548 98 501 q 262 623 195 596 q 410 651 329 651 q 460 647 432 651 q 516 636 489 643 q 566 619 543 629 q 600 597 588 609 q 598 578 601 591 q 591 547 596 564 q 581 509 587 529 q 569 472 575 490 q 556 440 563 454 q 546 420 550 426 l 501 426 q 446 529 478 493 q 359 566 413 566 q 302 552 329 566 q 253 509 274 538 q 219 433 232 479 q 207 321 207 387 q 220 225 207 267 q 258 153 234 182 q 315 108 283 124 q 384 93 348 93 q 421 95 403 93 q 460 106 439 97 q 507 129 481 114 q 569 171 533 145 l 606 128 q 524 48 562 78 q 453 3 487 19 q 388 -16 420 -11 l 388 -16 l 371 -60 q 453 -93 424 -70 q 482 -155 482 -116 m 305 704 q 291 709 299 705 q 274 717 282 713 q 258 726 265 721 q 246 734 250 730 l 389 1025 q 420 1021 398 1024 q 467 1014 442 1018 q 514 1005 492 1010 q 544 999 537 1001 l 564 962 l 305 704 "},"Ã":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 696 1123 q 666 1063 684 1096 q 626 1001 649 1030 q 576 954 604 973 q 518 935 549 935 q 462 946 489 935 q 411 970 436 957 q 361 994 385 983 q 310 1005 336 1005 q 282 1000 295 1005 q 259 985 270 994 q 237 961 248 975 q 213 928 225 946 l 162 946 q 192 1007 174 974 q 231 1069 209 1040 q 281 1117 254 1098 q 339 1137 308 1137 q 399 1126 370 1137 q 452 1102 427 1115 q 501 1078 478 1089 q 545 1067 524 1067 q 598 1085 576 1067 q 644 1144 621 1104 l 696 1123 "},"ˀ":{"x_min":12,"x_max":420,"ha":423,"o":"m 154 551 l 154 628 q 165 684 154 659 q 193 729 176 708 q 229 768 210 750 q 265 806 248 787 q 293 847 282 826 q 305 896 305 869 q 297 940 305 921 q 278 970 290 958 q 248 988 265 982 q 211 995 232 995 q 183 988 197 995 q 158 972 169 982 q 140 948 147 962 q 134 919 134 934 q 135 906 134 912 q 139 895 137 900 q 117 887 131 891 q 85 880 102 883 q 52 873 68 876 q 25 869 36 870 l 12 881 q 12 888 12 885 l 12 895 q 30 956 12 927 q 79 1005 48 984 q 152 1038 110 1026 q 242 1051 194 1051 q 319 1040 286 1051 q 374 1011 352 1030 q 408 968 397 992 q 420 914 420 943 q 408 861 420 884 q 380 820 397 838 q 344 784 363 801 q 308 749 325 767 q 280 708 291 730 q 269 656 269 685 l 269 551 l 154 551 "},"̄":{"x_min":-638.203125,"x_max":-60.359375,"ha":0,"o":"m -60 886 q -67 866 -62 879 q -78 840 -72 854 q -90 815 -84 826 q -98 797 -95 803 l -616 797 l -638 818 q -631 838 -636 826 q -620 864 -626 850 q -609 889 -614 877 q -600 908 -603 901 l -82 908 l -60 886 "},"Ṍ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 699 1123 q 670 1063 687 1096 q 630 1001 652 1030 q 580 954 607 973 q 521 935 552 935 q 465 946 492 935 q 414 970 439 957 q 364 994 389 983 q 314 1005 339 1005 q 286 1000 298 1005 q 262 985 274 994 q 240 961 251 975 q 217 928 229 946 l 166 946 q 195 1007 178 974 q 235 1069 212 1040 q 284 1117 257 1098 q 343 1137 311 1137 q 402 1126 374 1137 q 456 1102 430 1115 q 504 1078 481 1089 q 549 1067 527 1067 q 602 1085 579 1067 q 647 1144 624 1104 l 699 1123 m 343 1164 q 319 1183 331 1170 q 297 1210 306 1197 l 544 1440 q 579 1421 560 1432 q 615 1399 598 1410 q 646 1379 632 1389 q 665 1364 659 1370 l 671 1329 l 343 1164 "},"©":{"x_min":58,"x_max":957,"ha":1015,"o":"m 724 280 q 657 217 688 241 q 598 180 626 193 q 544 163 570 167 q 491 159 518 159 q 399 177 444 159 q 320 232 355 196 q 265 319 286 268 q 245 433 245 369 q 268 552 245 497 q 334 650 292 608 q 433 715 376 691 q 559 740 491 740 q 604 735 581 740 q 649 724 628 731 q 687 708 670 717 q 715 689 705 699 q 711 663 717 683 q 698 619 706 642 q 681 574 690 595 q 666 545 672 553 l 630 551 q 614 595 623 574 q 592 633 605 617 q 561 660 579 650 q 519 670 544 670 q 466 657 491 670 q 421 619 441 645 q 391 552 402 593 q 380 454 380 511 q 394 370 380 408 q 432 306 409 332 q 485 266 455 280 q 544 253 514 253 q 574 255 560 253 q 606 263 589 257 q 644 283 622 270 q 693 316 665 295 q 699 310 694 316 q 709 298 704 304 q 719 285 714 291 q 724 280 723 280 m 876 452 q 848 603 876 532 q 772 727 821 674 q 655 810 722 779 q 506 841 587 841 q 359 810 426 841 q 242 727 292 779 q 166 603 193 674 q 139 452 139 532 q 166 300 139 371 q 242 176 193 228 q 359 92 292 123 q 506 62 426 62 q 655 92 587 62 q 772 176 722 123 q 848 300 821 228 q 876 452 876 371 m 957 452 q 941 326 957 386 q 898 213 926 266 q 829 118 869 161 q 739 44 789 74 q 630 -3 689 13 q 506 -20 571 -20 q 383 -3 441 -20 q 275 44 325 13 q 185 118 225 74 q 116 213 144 161 q 73 326 88 266 q 58 452 58 386 q 91 635 58 549 q 185 784 125 720 q 327 885 245 848 q 506 922 409 922 q 630 905 571 922 q 739 857 689 888 q 829 784 789 827 q 898 689 869 741 q 941 577 926 637 q 957 452 957 517 "},"≥":{"x_min":35.953125,"x_max":594.796875,"ha":631,"o":"m 594 184 q 588 166 592 176 q 579 144 584 155 q 570 123 575 133 q 564 108 566 114 l 57 108 l 35 129 q 41 147 37 137 q 50 168 45 157 q 59 188 54 178 q 67 206 63 199 l 573 206 l 594 184 m 35 638 q 70 670 50 652 q 107 701 89 688 l 573 534 l 594 507 q 584 465 590 488 q 569 424 577 443 l 57 240 l 35 262 q 41 281 37 268 q 47 306 44 293 q 55 331 51 319 q 61 349 59 342 l 417 477 l 52 608 l 35 638 "},"ẙ":{"x_min":-42.046875,"x_max":696.53125,"ha":705,"o":"m 696 581 q 663 572 676 576 q 642 563 650 568 q 629 551 634 558 q 621 535 625 545 l 395 -50 q 332 -178 366 -125 q 260 -266 298 -232 q 181 -317 222 -301 q 96 -334 139 -334 q 45 -329 70 -334 q 1 -317 20 -324 q -30 -302 -18 -310 q -42 -287 -42 -293 q -30 -264 -42 -281 q -3 -227 -18 -247 q 29 -190 12 -207 q 57 -165 46 -172 q 125 -192 91 -187 q 185 -188 160 -197 q 239 -149 210 -179 q 291 -62 267 -120 l 311 -15 l 84 535 q 59 563 76 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 275 574 289 578 q 255 565 261 570 q 249 553 248 560 q 255 535 250 546 l 394 194 l 527 535 q 532 552 531 545 q 528 564 533 559 q 510 573 523 569 q 474 581 497 577 l 474 631 l 696 631 l 696 581 m 418 842 q 404 892 418 875 q 375 910 391 910 q 351 904 361 910 q 333 889 340 898 q 322 868 326 880 q 319 844 319 856 q 333 795 319 812 q 362 779 346 779 q 403 797 389 779 q 418 842 418 815 m 510 870 q 496 802 510 834 q 460 747 483 770 q 408 710 437 724 q 348 697 379 697 q 299 705 321 697 q 260 729 276 713 q 236 767 244 745 q 227 816 227 789 q 240 884 227 852 q 276 940 254 916 q 328 978 299 964 q 390 992 358 992 q 439 982 417 992 q 477 957 462 973 q 501 919 493 941 q 510 870 510 897 "},"Ă":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 670 1144 q 622 1050 649 1089 q 564 986 595 1011 q 499 949 533 961 q 430 938 465 938 q 358 949 393 938 q 292 986 323 961 q 235 1050 261 1011 q 188 1144 208 1089 q 199 1157 192 1150 q 212 1170 205 1164 q 226 1182 219 1177 q 239 1190 233 1187 q 279 1136 256 1158 q 327 1098 302 1113 q 379 1075 353 1082 q 427 1068 405 1068 q 478 1075 451 1068 q 530 1097 504 1082 q 578 1135 555 1112 q 618 1190 601 1158 q 631 1182 624 1187 q 646 1170 638 1177 q 659 1157 653 1164 q 670 1144 666 1150 "},"ǖ":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 627 859 q 619 813 627 834 q 596 775 610 791 q 562 749 581 758 q 520 740 542 740 q 461 761 481 740 q 440 822 440 782 q 449 869 440 847 q 472 907 458 891 q 506 932 487 923 q 546 942 525 942 q 606 921 584 942 q 627 859 627 901 m 341 859 q 333 813 341 834 q 310 775 324 791 q 276 749 296 758 q 235 740 257 740 q 175 761 196 740 q 154 822 154 782 q 163 869 154 847 q 186 907 172 891 q 220 932 201 923 q 260 942 240 942 q 320 921 299 942 q 341 859 341 901 m 687 1136 q 679 1116 685 1129 q 668 1090 674 1103 q 657 1064 662 1076 q 649 1046 651 1052 l 130 1046 l 109 1068 q 115 1088 111 1075 q 126 1113 120 1100 q 138 1138 132 1126 q 147 1157 143 1150 l 665 1157 l 687 1136 "},"ǹ":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 399 q 535 461 539 436 q 523 500 531 485 q 501 521 515 515 q 467 528 488 528 q 433 523 451 528 q 393 508 415 519 q 344 479 371 498 q 285 433 317 461 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 467 q 120 509 122 493 q 111 533 119 524 q 85 546 103 542 q 33 554 67 550 l 33 602 q 93 610 65 605 q 147 620 121 615 q 197 634 173 626 q 246 651 221 641 l 274 622 l 282 524 q 430 621 361 592 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 m 520 736 q 509 727 516 732 q 493 718 501 722 q 476 710 484 713 q 462 705 468 707 l 203 960 l 223 998 q 250 1004 229 1000 q 296 1013 271 1008 q 342 1020 320 1017 q 373 1025 364 1024 l 520 736 "},"ÿ":{"x_min":-42.046875,"x_max":696.53125,"ha":705,"o":"m 696 581 q 663 572 676 576 q 642 563 650 568 q 629 551 634 558 q 621 535 625 545 l 395 -50 q 332 -178 366 -125 q 260 -266 298 -232 q 181 -317 222 -301 q 96 -334 139 -334 q 45 -329 70 -334 q 1 -317 20 -324 q -30 -302 -18 -310 q -42 -287 -42 -293 q -30 -264 -42 -281 q -3 -227 -18 -247 q 29 -190 12 -207 q 57 -165 46 -172 q 125 -192 91 -187 q 185 -188 160 -197 q 239 -149 210 -179 q 291 -62 267 -120 l 311 -15 l 84 535 q 59 563 76 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 275 574 289 578 q 255 565 261 570 q 249 553 248 560 q 255 535 250 546 l 394 194 l 527 535 q 532 552 531 545 q 528 564 533 559 q 510 573 523 569 q 474 581 497 577 l 474 631 l 696 631 l 696 581 m 605 859 q 596 813 605 834 q 573 775 588 791 q 539 749 559 758 q 498 740 520 740 q 438 761 459 740 q 418 822 418 782 q 427 869 418 847 q 450 907 435 891 q 484 932 465 923 q 524 942 503 942 q 583 921 562 942 q 605 859 605 901 m 319 859 q 310 813 319 834 q 287 775 302 791 q 254 749 273 758 q 213 740 234 740 q 152 761 173 740 q 132 822 132 782 q 141 869 132 847 q 164 907 149 891 q 198 932 179 923 q 238 942 217 942 q 298 921 277 942 q 319 859 319 901 "},"Ḹ":{"x_min":29.078125,"x_max":691.46875,"ha":707,"o":"m 691 205 q 685 144 688 176 q 677 83 681 112 q 670 32 673 54 q 663 0 666 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 131 q 297 109 292 119 q 317 94 303 100 q 356 84 332 87 q 418 81 380 81 l 494 81 q 547 88 525 81 q 584 112 568 95 q 614 156 601 129 q 641 223 627 183 l 691 205 m 453 -184 q 444 -230 453 -209 q 422 -268 436 -252 q 388 -294 407 -285 q 347 -304 369 -304 q 287 -283 307 -304 q 266 -221 266 -262 q 275 -174 266 -196 q 298 -136 284 -152 q 332 -111 313 -120 q 373 -102 352 -102 q 432 -122 411 -102 q 453 -184 453 -143 m 633 1075 q 626 1055 631 1068 q 615 1029 621 1043 q 603 1004 609 1016 q 595 986 598 992 l 77 986 l 55 1007 q 62 1027 57 1015 q 73 1053 67 1039 q 84 1078 79 1066 q 93 1097 90 1090 l 611 1097 l 633 1075 "},"Ł":{"x_min":16.875,"x_max":691.46875,"ha":707,"o":"m 691 205 q 685 144 688 176 q 677 83 681 112 q 670 32 673 54 q 663 0 666 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 318 l 35 275 l 16 290 q 21 313 18 300 q 29 338 25 325 q 38 361 33 350 q 46 377 42 371 l 122 415 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 500 l 485 598 l 502 581 q 497 559 500 571 q 490 536 494 547 q 481 514 485 524 q 471 496 476 503 l 292 405 l 292 131 q 297 109 292 119 q 317 94 303 100 q 356 84 332 87 q 418 81 380 81 l 494 81 q 547 88 525 81 q 584 112 568 95 q 614 156 601 129 q 641 223 627 183 l 691 205 "},"∫":{"x_min":-180.4375,"x_max":574.765625,"ha":427,"o":"m 574 980 q 562 954 574 972 q 532 918 549 937 q 495 883 514 900 q 463 860 476 866 q 401 927 430 907 q 352 947 371 947 q 324 939 338 947 q 299 909 310 931 q 281 849 288 888 q 275 749 275 811 q 277 651 275 707 q 283 530 279 594 q 290 398 286 466 q 297 264 294 329 q 303 140 301 198 q 306 36 306 81 q 290 -68 306 -21 q 251 -153 274 -115 q 199 -219 227 -190 q 147 -266 171 -247 q 106 -294 128 -281 q 61 -315 84 -306 q 17 -329 39 -324 q -22 -334 -3 -334 q -79 -326 -50 -334 q -129 -309 -107 -319 q -166 -288 -152 -299 q -180 -267 -180 -276 q -167 -243 -180 -258 q -135 -210 -153 -227 q -96 -178 -116 -193 q -63 -155 -76 -162 q -37 -180 -52 -169 q -5 -200 -22 -191 q 26 -212 10 -208 q 55 -217 42 -217 q 89 -206 73 -217 q 115 -171 105 -196 q 132 -103 126 -145 q 139 5 139 -60 q 136 97 139 42 q 130 217 134 153 q 123 350 127 281 q 116 483 119 419 q 110 605 112 548 q 108 702 108 662 q 118 799 108 756 q 147 878 129 843 q 190 940 165 913 q 243 988 215 967 q 327 1035 285 1020 q 405 1051 370 1051 q 469 1042 438 1051 q 523 1022 500 1034 q 560 998 546 1010 q 574 980 574 986 "},"\\":{"x_min":27.125,"x_max":623.96875,"ha":651,"o":"m 595 -227 q 572 -219 587 -224 q 541 -209 557 -214 q 512 -198 526 -203 q 492 -187 498 -192 l 27 1065 l 57 1085 q 81 1078 67 1082 q 109 1069 94 1074 q 136 1058 123 1063 q 159 1047 149 1053 l 623 -205 l 595 -227 "},"Ì":{"x_min":-14.921875,"x_max":398.59375,"ha":454,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 m 350 962 q 331 938 341 949 q 309 922 321 927 l -14 1080 l -8 1123 q 11 1139 -3 1128 q 45 1162 27 1150 q 79 1183 63 1173 q 103 1198 95 1193 l 350 962 "},"Ȱ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 525 1050 q 517 1003 525 1024 q 494 965 508 981 q 461 939 480 949 q 419 930 441 930 q 359 951 380 930 q 338 1012 338 972 q 347 1059 338 1037 q 371 1097 356 1081 q 405 1122 385 1113 q 445 1132 424 1132 q 504 1111 483 1132 q 525 1050 525 1091 m 728 1292 q 721 1272 726 1285 q 710 1246 716 1260 q 698 1221 703 1233 q 690 1203 693 1209 l 172 1203 l 150 1224 q 157 1244 152 1232 q 168 1270 162 1256 q 179 1295 174 1283 q 188 1314 185 1307 l 706 1314 l 728 1292 "},"Ḳ":{"x_min":29.078125,"x_max":857.640625,"ha":859,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 446 l 544 745 q 566 774 559 763 q 569 791 572 785 q 550 800 565 797 q 509 805 535 803 l 509 855 l 814 855 l 814 805 q 777 800 792 802 q 750 792 762 797 q 729 781 738 788 q 709 763 719 774 l 418 458 l 745 111 q 767 92 755 99 q 792 84 778 86 q 820 82 805 81 q 852 84 835 82 l 857 34 q 813 20 837 28 q 764 6 789 13 q 717 -5 740 0 q 679 -10 695 -10 q 644 -3 659 -10 q 615 19 629 2 l 292 423 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 536 -184 q 527 -230 536 -209 q 504 -268 519 -252 q 471 -294 490 -285 q 430 -304 451 -304 q 369 -283 390 -304 q 349 -221 349 -262 q 358 -174 349 -196 q 381 -136 366 -152 q 415 -111 396 -120 q 455 -102 434 -102 q 515 -122 494 -102 q 536 -184 536 -143 "},"ḗ":{"x_min":44,"x_max":659.234375,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 659 886 q 652 866 657 879 q 640 840 647 854 q 629 815 634 826 q 621 797 623 803 l 103 797 l 81 818 q 88 838 83 826 q 99 864 92 850 q 110 889 105 877 q 119 908 115 901 l 637 908 l 659 886 m 322 949 q 308 953 316 949 q 290 961 299 957 q 275 970 282 966 q 263 978 267 974 l 406 1269 q 437 1265 415 1268 q 484 1258 459 1262 q 531 1249 509 1254 q 561 1243 554 1245 l 581 1206 l 322 949 "},"ṙ":{"x_min":32.5625,"x_max":597.515625,"ha":617,"o":"m 593 621 q 597 604 597 618 q 594 568 597 589 q 585 521 591 547 q 574 471 580 496 q 561 426 568 447 q 549 393 554 405 l 499 393 q 491 444 497 420 q 476 487 485 469 q 454 515 467 504 q 424 526 440 526 q 395 520 411 526 q 361 501 379 515 q 324 459 343 486 q 284 387 305 432 l 284 90 q 313 69 284 80 q 404 49 341 59 l 404 0 l 32 0 l 32 49 q 122 90 122 69 l 122 450 q 120 487 122 472 q 117 512 119 503 q 112 527 115 522 q 106 536 109 533 q 96 544 101 541 q 83 549 91 547 q 63 552 75 551 q 32 554 51 553 l 32 602 q 97 612 69 607 q 148 622 124 617 q 194 634 172 627 q 246 651 217 641 l 274 622 l 283 524 q 324 573 301 550 q 374 614 347 596 q 428 641 400 631 q 486 651 457 651 q 540 643 512 651 q 593 621 568 635 m 434 859 q 425 813 434 834 q 403 775 417 791 q 369 749 388 758 q 328 740 350 740 q 268 761 288 740 q 247 822 247 782 q 256 869 247 847 q 279 907 265 891 q 313 932 294 923 q 354 942 333 942 q 413 921 392 942 q 434 859 434 901 "},"Ḋ":{"x_min":20.265625,"x_max":828,"ha":884,"o":"m 828 458 q 810 306 828 373 q 763 188 793 240 q 693 102 733 137 q 608 43 653 66 q 514 10 562 21 q 419 0 465 0 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 784 l 29 771 l 20 834 q 99 849 53 842 q 195 863 145 857 q 296 871 246 868 q 391 875 347 875 q 577 846 495 875 q 714 765 658 818 q 798 634 769 711 q 828 458 828 556 m 343 803 q 318 802 331 803 q 292 802 305 802 l 292 113 q 293 104 292 108 q 300 90 295 96 q 317 81 305 85 q 347 75 328 77 q 394 73 366 73 q 449 81 420 73 q 506 109 477 90 q 559 157 534 128 q 603 226 585 186 q 634 317 622 266 q 646 432 646 368 q 626 591 646 522 q 568 707 606 660 q 473 778 530 754 q 343 803 417 803 m 493 1050 q 484 1003 493 1024 q 462 965 476 981 q 428 939 447 949 q 387 930 409 930 q 327 951 347 930 q 306 1012 306 972 q 315 1059 306 1037 q 338 1097 324 1081 q 372 1122 353 1113 q 413 1132 392 1132 q 472 1111 451 1132 q 493 1050 493 1091 "},"Ē":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 659 1075 q 652 1055 657 1068 q 640 1029 647 1043 q 629 1004 634 1016 q 621 986 623 992 l 103 986 l 81 1007 q 88 1027 83 1015 q 99 1053 92 1039 q 110 1078 105 1066 q 119 1097 115 1090 l 637 1097 l 659 1075 "},"!":{"x_min":101,"x_max":323,"ha":429,"o":"m 323 89 q 313 40 323 62 q 286 3 303 18 q 246 -19 269 -11 q 199 -27 224 -27 q 161 -21 178 -27 q 130 -5 143 -16 q 108 22 116 5 q 101 64 101 40 q 111 113 101 91 q 138 149 121 134 q 178 172 155 164 q 225 181 200 181 q 261 175 243 181 q 292 158 279 170 q 314 130 306 147 q 323 89 323 113 m 255 279 q 222 264 242 270 q 185 253 202 258 l 165 267 l 113 928 q 150 947 128 936 q 195 969 172 958 q 240 989 219 980 q 275 1004 261 999 l 309 982 l 255 279 "},"ç":{"x_min":44,"x_max":606.125,"ha":633,"o":"m 482 -155 q 463 -204 482 -180 q 412 -247 445 -227 q 335 -281 380 -267 q 237 -301 290 -295 l 212 -252 q 296 -224 271 -244 q 322 -182 322 -204 q 306 -149 322 -159 q 260 -137 290 -139 l 262 -134 q 270 -117 264 -131 q 286 -73 276 -103 q 305 -20 294 -53 q 220 1 260 -15 q 129 64 169 23 q 67 165 90 106 q 44 300 44 225 q 71 437 44 374 q 146 548 98 501 q 262 623 195 596 q 410 651 329 651 q 460 647 432 651 q 516 636 489 643 q 566 619 543 629 q 600 597 588 609 q 598 578 601 591 q 591 547 596 564 q 581 509 587 529 q 569 472 575 490 q 556 440 563 454 q 546 420 550 426 l 501 426 q 446 529 478 493 q 359 566 413 566 q 302 552 329 566 q 253 509 274 538 q 219 433 232 479 q 207 321 207 387 q 220 225 207 267 q 258 153 234 182 q 315 108 283 124 q 384 93 348 93 q 421 95 403 93 q 460 106 439 97 q 507 129 481 114 q 569 171 533 145 l 606 128 q 524 48 562 78 q 453 3 487 19 q 388 -16 420 -11 l 388 -16 l 371 -60 q 453 -93 424 -70 q 482 -155 482 -116 "},"ǯ":{"x_min":14.375,"x_max":625,"ha":662,"o":"m 625 -22 q 610 -112 625 -71 q 571 -188 596 -153 q 512 -249 546 -222 q 440 -295 478 -277 q 360 -324 402 -314 q 279 -334 319 -334 q 173 -318 221 -334 q 88 -282 124 -303 q 34 -238 53 -260 q 14 -199 14 -215 q 31 -176 14 -192 q 72 -143 48 -159 q 119 -112 95 -126 q 158 -96 143 -98 q 225 -202 188 -165 q 316 -240 263 -240 q 371 -229 345 -240 q 418 -197 398 -218 q 450 -142 438 -175 q 462 -62 462 -108 q 452 25 462 -17 q 419 99 442 67 q 360 150 397 132 q 270 168 324 169 q 213 160 244 168 q 147 141 182 153 q 142 150 145 144 q 134 164 138 157 q 127 177 131 171 q 124 186 124 183 l 407 550 l 204 550 q 148 516 174 550 q 105 407 122 482 l 56 421 l 73 642 q 100 635 87 637 q 128 632 114 633 q 158 631 142 631 l 593 631 l 608 601 l 333 241 q 347 243 339 242 q 361 244 356 244 q 461 226 413 242 q 545 178 509 210 q 603 95 582 145 q 625 -22 625 45 m 366 722 l 273 722 l 88 944 q 108 969 98 958 q 129 987 118 980 l 321 859 l 509 987 q 530 969 520 980 q 548 944 540 958 l 366 722 "},"Ǡ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 522 1050 q 514 1003 522 1024 q 491 965 505 981 q 457 939 477 949 q 416 930 438 930 q 356 951 377 930 q 335 1012 335 972 q 344 1059 335 1037 q 367 1097 353 1081 q 401 1122 382 1113 q 442 1132 421 1132 q 501 1111 480 1132 q 522 1050 522 1091 m 725 1292 q 717 1272 722 1285 q 706 1246 712 1260 q 695 1221 700 1233 q 687 1203 689 1209 l 168 1203 l 147 1224 q 153 1244 149 1232 q 164 1270 158 1256 q 176 1295 170 1283 q 185 1314 181 1307 l 703 1314 l 725 1292 "},"Ȩ":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 498 -155 q 480 -204 498 -180 q 429 -247 461 -227 q 351 -281 396 -267 q 253 -301 306 -295 l 228 -252 q 313 -224 287 -244 q 338 -182 338 -204 q 322 -149 338 -159 q 277 -136 307 -139 l 279 -134 q 287 -117 281 -131 q 303 -73 293 -103 q 327 0 312 -46 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 411 0 l 387 -60 q 469 -93 440 -69 q 498 -155 498 -116 "},"̣":{"x_min":-443,"x_max":-256,"ha":0,"o":"m -256 -184 q -264 -230 -256 -209 q -287 -268 -273 -252 q -320 -294 -301 -285 q -362 -304 -340 -304 q -422 -283 -401 -304 q -443 -221 -443 -262 q -434 -174 -443 -196 q -410 -136 -425 -152 q -376 -111 -396 -120 q -336 -102 -357 -102 q -277 -122 -298 -102 q -256 -184 -256 -143 "},"đ":{"x_min":44,"x_max":780.59375,"ha":779,"o":"m 773 77 q 710 39 742 56 q 651 8 678 21 q 602 -12 623 -5 q 572 -20 581 -20 q 510 98 523 -20 q 452 44 478 66 q 401 7 426 22 q 349 -13 376 -6 q 292 -20 323 -20 q 202 2 246 -20 q 122 65 157 24 q 65 166 87 106 q 44 301 44 226 q 68 432 44 369 q 135 544 92 495 q 240 621 179 592 q 373 651 300 651 q 436 643 405 651 q 505 610 468 636 l 505 756 l 308 756 l 293 770 q 297 785 294 776 q 304 803 300 794 q 311 822 307 813 q 317 837 315 831 l 505 837 l 505 853 q 503 907 505 887 q 492 937 501 927 q 464 953 483 948 q 412 960 445 957 l 412 1006 q 546 1026 486 1014 q 642 1051 606 1039 l 668 1025 l 668 837 l 765 837 l 780 820 l 756 756 l 668 756 l 668 203 q 669 163 668 179 q 671 136 670 146 q 676 121 673 126 q 683 112 679 115 q 692 109 687 110 q 704 109 697 108 q 724 114 712 110 q 754 127 736 119 l 773 77 m 505 182 l 505 478 q 444 539 480 517 q 362 561 408 561 q 300 548 328 561 q 251 507 272 535 q 218 438 230 480 q 207 337 207 396 q 220 241 207 283 q 255 169 234 199 q 305 124 277 140 q 360 109 332 109 q 431 127 397 109 q 505 182 465 146 "},"ċ":{"x_min":44,"x_max":605.796875,"ha":633,"o":"m 605 129 q 524 49 561 79 q 453 4 487 20 q 388 -15 419 -11 q 325 -20 357 -20 q 219 2 270 -20 q 129 65 168 24 q 67 166 90 106 q 44 301 44 226 q 71 438 44 374 q 146 548 98 501 q 262 623 195 596 q 410 651 329 651 q 460 647 432 651 q 516 636 489 643 q 566 619 543 629 q 600 597 588 609 q 598 578 601 591 q 591 547 596 564 q 581 509 587 529 q 569 472 575 490 q 556 440 563 454 q 546 420 550 426 l 501 426 q 446 529 478 493 q 359 566 413 566 q 302 552 329 566 q 253 509 274 538 q 219 433 232 480 q 207 322 207 387 q 220 225 207 268 q 258 154 234 183 q 315 109 282 125 q 384 94 348 94 q 421 96 403 94 q 459 106 438 98 q 507 130 481 115 q 569 172 533 146 l 605 129 m 439 859 q 431 813 439 834 q 408 775 422 791 q 374 749 394 758 q 333 740 355 740 q 273 761 294 740 q 252 822 252 782 q 261 869 252 847 q 285 907 270 891 q 319 932 299 923 q 359 942 338 942 q 418 921 397 942 q 439 859 439 901 "},"Ā":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 725 1075 q 717 1055 722 1068 q 706 1029 712 1043 q 695 1004 700 1016 q 687 986 689 992 l 168 986 l 147 1007 q 153 1027 149 1015 q 164 1053 158 1039 q 176 1078 170 1066 q 185 1097 181 1090 l 703 1097 l 725 1075 "},"Ẃ":{"x_min":13.5625,"x_max":1174.6875,"ha":1181,"o":"m 1174 805 q 1125 793 1144 799 q 1093 783 1105 788 q 1077 773 1082 778 q 1071 763 1072 768 l 916 40 q 901 15 912 26 q 873 -2 889 5 q 843 -13 858 -9 q 817 -20 827 -17 l 585 595 l 391 40 q 374 15 386 26 q 346 -1 362 5 q 314 -12 330 -8 q 283 -20 297 -17 l 107 758 q 82 785 103 774 q 13 805 61 796 l 13 855 l 345 855 l 345 805 q 293 797 311 802 q 267 785 275 791 q 258 772 259 779 q 258 758 257 765 l 374 261 l 572 855 l 640 855 l 867 261 l 976 763 q 970 777 978 771 q 948 788 963 783 q 914 797 934 793 q 872 805 895 801 l 872 855 l 1174 855 l 1174 805 m 504 922 q 480 941 493 927 q 458 967 467 954 l 706 1198 q 740 1178 721 1189 q 776 1157 759 1167 q 807 1137 794 1146 q 826 1122 821 1127 l 832 1086 l 504 922 "},"ø":{"x_min":44,"x_max":685,"ha":729,"o":"m 515 298 q 509 360 515 328 q 496 417 503 392 l 269 126 q 316 82 290 100 q 370 65 343 65 q 439 80 411 65 q 483 125 466 96 q 507 199 500 155 q 515 298 515 242 m 214 320 q 218 263 214 292 q 231 211 223 234 l 459 505 q 413 549 440 532 q 358 566 387 566 q 288 547 316 566 q 244 495 261 528 q 220 417 227 463 q 214 320 214 372 m 676 646 l 605 555 q 663 454 642 512 q 685 329 685 395 q 672 240 685 283 q 638 158 660 197 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 264 -8 306 -20 q 188 22 222 3 l 178 9 q 159 -2 172 4 q 129 -15 145 -9 q 98 -27 113 -22 q 72 -36 82 -33 l 54 -15 l 124 75 q 66 176 88 117 q 44 301 44 234 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 464 639 423 651 q 539 608 505 627 l 549 620 q 571 633 558 626 q 599 646 585 640 q 629 659 614 653 q 655 667 644 664 l 676 646 "},"â":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 579 750 q 561 723 571 737 q 539 705 551 710 l 349 856 l 160 705 q 136 723 148 710 q 114 750 124 737 l 303 1013 l 396 1013 l 579 750 "},"}":{"x_min":16.625,"x_max":428.828125,"ha":486,"o":"m 428 431 q 317 373 352 410 q 283 285 283 337 q 287 221 283 248 q 296 168 291 194 q 305 116 301 143 q 310 51 310 88 q 289 -33 310 4 q 233 -104 269 -71 q 149 -163 197 -136 q 44 -214 100 -190 l 16 -161 q 102 -83 69 -127 q 136 12 136 -39 q 131 75 136 47 q 122 128 127 102 q 113 182 117 154 q 109 245 109 209 q 118 301 109 274 q 146 352 128 328 q 188 396 164 376 q 241 427 212 415 q 140 487 172 440 q 109 610 109 534 q 113 677 109 646 q 122 737 117 709 q 131 793 127 766 q 136 851 136 821 q 131 902 136 879 q 114 945 127 925 q 80 984 102 965 q 23 1022 58 1002 l 49 1084 q 160 1037 111 1061 q 242 984 208 1013 q 292 918 275 955 q 310 832 310 881 q 305 767 310 796 q 296 710 301 739 q 287 652 291 682 q 283 585 283 623 q 306 507 283 530 q 373 484 330 484 l 386 484 q 394 484 391 484 q 402 485 398 484 q 417 488 407 486 l 428 431 "},"‰":{"x_min":37,"x_max":1453,"ha":1488,"o":"m 1314 196 q 1307 282 1314 246 q 1290 343 1301 319 q 1264 378 1279 367 q 1231 390 1249 390 q 1178 352 1197 390 q 1159 226 1159 314 q 1180 77 1159 125 q 1242 30 1201 30 q 1295 68 1277 30 q 1314 196 1314 107 m 1453 210 q 1436 120 1453 162 q 1390 47 1420 78 q 1320 -2 1361 15 q 1231 -21 1280 -21 q 1143 -2 1182 -21 q 1076 47 1104 15 q 1034 120 1049 78 q 1020 210 1020 162 q 1035 299 1020 257 q 1080 372 1051 341 q 1150 422 1109 404 q 1242 441 1191 441 q 1331 422 1292 441 q 1397 373 1371 404 q 1438 299 1424 342 q 1453 210 1453 257 m 836 196 q 812 343 836 295 q 752 390 788 390 q 699 352 718 390 q 681 226 681 314 q 702 77 681 125 q 764 30 723 30 q 817 68 799 30 q 836 196 836 107 m 975 210 q 958 120 975 162 q 912 47 941 78 q 842 -2 882 15 q 752 -21 801 -21 q 664 -2 703 -21 q 598 47 626 15 q 556 120 571 78 q 542 210 542 162 q 557 299 542 257 q 602 372 573 341 q 672 422 631 404 q 764 441 713 441 q 853 422 814 441 q 919 373 893 404 q 960 299 946 342 q 975 210 975 257 m 253 4 q 232 -3 246 0 q 204 -10 219 -7 q 175 -16 189 -13 q 152 -21 161 -18 l 136 0 l 755 813 q 775 820 762 816 q 803 827 788 824 q 832 833 818 830 q 853 838 845 836 l 871 817 l 253 4 m 331 595 q 324 681 331 644 q 306 741 318 717 q 280 777 295 765 q 247 789 265 789 q 194 751 213 789 q 176 624 176 713 q 196 476 176 523 q 258 428 217 428 q 312 467 293 428 q 331 595 331 506 m 470 608 q 453 519 470 561 q 407 445 436 477 q 337 395 377 414 q 247 377 296 377 q 159 395 198 377 q 93 445 121 414 q 51 519 66 477 q 37 608 37 561 q 52 698 37 656 q 96 771 68 740 q 166 821 125 803 q 258 840 207 840 q 348 821 308 840 q 414 772 387 803 q 455 698 441 740 q 470 608 470 656 "},"Ä":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 665 1050 q 657 1003 665 1024 q 633 965 648 981 q 599 939 619 949 q 558 930 580 930 q 498 951 519 930 q 478 1012 478 972 q 487 1059 478 1037 q 510 1097 496 1081 q 544 1122 525 1113 q 584 1132 563 1132 q 644 1111 622 1132 q 665 1050 665 1091 m 379 1050 q 371 1003 379 1024 q 348 965 362 981 q 314 939 334 949 q 273 930 295 930 q 213 951 234 930 q 192 1012 192 972 q 201 1059 192 1037 q 224 1097 210 1081 q 258 1122 239 1113 q 298 1132 278 1132 q 358 1111 337 1132 q 379 1050 379 1091 "},"ř":{"x_min":32.5625,"x_max":597.515625,"ha":617,"o":"m 593 621 q 597 604 597 618 q 594 568 597 589 q 585 521 591 547 q 574 471 580 496 q 561 426 568 447 q 549 393 554 405 l 499 393 q 491 444 497 420 q 476 487 485 469 q 454 515 467 504 q 424 526 440 526 q 395 520 411 526 q 361 501 379 515 q 324 459 343 486 q 284 387 305 432 l 284 90 q 313 69 284 80 q 404 49 341 59 l 404 0 l 32 0 l 32 49 q 122 90 122 69 l 122 450 q 120 487 122 472 q 117 512 119 503 q 112 527 115 522 q 106 536 109 533 q 96 544 101 541 q 83 549 91 547 q 63 552 75 551 q 32 554 51 553 l 32 602 q 97 612 69 607 q 148 622 124 617 q 194 634 172 627 q 246 651 217 641 l 274 622 l 283 524 q 324 573 301 550 q 374 614 347 596 q 428 641 400 631 q 486 651 457 651 q 540 643 512 651 q 593 621 568 635 m 384 722 l 291 722 l 108 979 q 126 1007 116 993 q 147 1026 136 1020 l 339 878 l 527 1026 q 551 1007 539 1020 q 573 979 563 993 l 384 722 "},"Ṣ":{"x_min":69.75,"x_max":656,"ha":712,"o":"m 656 255 q 646 193 656 225 q 619 130 637 161 q 573 72 601 100 q 508 24 545 45 q 423 -7 470 4 q 318 -20 376 -20 q 262 -15 294 -20 q 198 -2 231 -10 q 134 18 165 6 q 79 46 102 30 q 73 59 75 47 q 70 89 71 71 q 69 130 69 107 q 71 176 70 152 q 76 221 73 199 q 84 260 79 243 l 132 257 q 169 184 147 217 q 220 127 192 150 q 279 90 247 103 q 345 77 311 77 q 404 85 376 77 q 454 111 433 94 q 489 152 476 127 q 503 209 503 177 q 484 281 503 251 q 436 334 466 311 q 368 377 406 358 q 289 414 329 396 q 211 454 249 433 q 142 502 172 474 q 94 565 112 529 q 76 651 76 601 q 93 722 76 683 q 149 794 111 761 q 245 851 186 828 q 386 875 304 875 q 457 870 422 875 q 523 857 493 865 q 577 837 554 849 q 613 812 600 826 q 614 800 616 809 q 608 778 613 790 q 597 750 604 765 q 582 721 590 735 q 567 697 575 708 q 554 681 560 686 l 510 685 q 475 739 495 717 q 435 773 456 760 q 392 791 414 786 q 351 797 370 797 q 294 788 318 797 q 254 764 270 779 q 232 730 239 749 q 225 693 225 712 q 243 636 225 661 q 292 590 262 611 q 361 550 322 569 q 440 510 399 531 q 519 466 481 490 q 588 413 558 443 q 637 344 618 383 q 656 255 656 306 m 456 -184 q 447 -230 456 -209 q 424 -268 439 -252 q 391 -294 410 -285 q 350 -304 371 -304 q 289 -283 310 -304 q 269 -221 269 -262 q 277 -174 269 -196 q 301 -136 286 -152 q 335 -111 316 -120 q 375 -102 354 -102 q 435 -122 413 -102 q 456 -184 456 -143 "},"—":{"x_min":35.953125,"x_max":1079.734375,"ha":1116,"o":"m 1079 376 q 1073 357 1077 368 q 1064 335 1069 346 q 1055 314 1060 324 q 1048 299 1051 304 l 57 299 l 35 320 q 41 338 37 328 q 50 359 45 349 q 59 380 54 370 q 67 397 63 390 l 1058 397 l 1079 376 "},"N":{"x_min":29.078125,"x_max":894.59375,"ha":922,"o":"m 29 0 l 29 49 q 100 68 78 55 q 122 90 122 81 l 122 755 q 29 805 77 797 l 29 855 l 219 855 q 235 853 229 855 q 248 846 242 851 q 263 830 255 840 q 284 802 271 819 l 699 226 l 699 763 q 694 773 699 767 q 679 784 690 779 q 651 795 669 790 q 606 805 633 801 l 606 855 l 894 855 l 894 805 q 823 785 845 798 q 801 763 801 772 l 801 -20 q 696 5 735 -14 q 638 50 657 25 l 224 624 l 224 90 q 228 81 224 86 q 244 69 233 75 q 273 58 255 63 q 317 49 291 52 l 317 0 l 29 0 "},"Ṿ":{"x_min":8.8125,"x_max":900.6875,"ha":923,"o":"m 900 805 q 828 788 854 796 q 795 760 802 779 l 540 55 q 519 28 535 41 q 485 6 504 16 q 445 -9 465 -3 q 408 -20 424 -15 l 99 760 q 71 789 92 778 q 8 805 51 800 l 8 855 l 354 855 l 354 805 q 282 791 300 801 q 272 762 265 781 l 493 194 l 694 760 q 695 777 697 770 q 682 789 693 784 q 654 798 672 794 q 608 805 636 802 l 608 855 l 900 855 l 900 805 m 547 -184 q 539 -230 547 -209 q 516 -268 530 -252 q 482 -294 502 -285 q 441 -304 463 -304 q 381 -283 402 -304 q 360 -221 360 -262 q 369 -174 360 -196 q 392 -136 378 -152 q 426 -111 407 -120 q 467 -102 446 -102 q 526 -122 505 -102 q 547 -184 547 -143 "},"⁄":{"x_min":103.765625,"x_max":809.796875,"ha":865,"o":"m 209 2 q 190 -4 201 -1 q 166 -10 179 -7 q 141 -15 153 -13 q 120 -20 129 -17 l 103 0 l 707 816 q 725 822 714 819 q 749 828 736 825 q 773 833 761 831 q 792 838 785 836 l 809 819 l 209 2 "},"2":{"x_min":55.984375,"x_max":628,"ha":702,"o":"m 618 0 l 75 0 l 55 50 q 195 215 135 143 q 298 343 255 287 q 371 441 342 399 q 416 516 399 483 q 440 576 433 549 q 448 626 448 602 q 441 680 448 655 q 423 723 435 705 q 390 751 410 741 q 342 762 370 762 q 294 749 314 762 q 262 717 274 737 q 245 673 249 698 q 245 623 241 648 q 215 610 234 617 q 176 597 197 603 q 134 586 155 591 q 98 580 113 581 l 74 626 q 99 698 74 661 q 167 767 124 736 q 267 817 210 797 q 388 838 324 838 q 483 827 440 838 q 556 794 526 816 q 602 740 586 772 q 619 666 619 709 q 610 605 619 635 q 583 541 602 575 q 534 466 564 506 q 462 375 505 426 q 362 261 419 324 q 233 118 306 198 l 504 118 q 525 123 515 118 q 541 139 534 129 q 553 160 548 148 q 562 185 558 172 q 573 253 570 215 l 628 240 l 618 0 "},"Ó":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 343 922 q 319 941 331 927 q 297 967 306 954 l 544 1198 q 579 1178 560 1189 q 615 1157 598 1167 q 646 1137 632 1146 q 665 1122 659 1127 l 671 1086 l 343 922 "},"˜":{"x_min":12.203125,"x_max":545.96875,"ha":558,"o":"m 545 933 q 516 873 533 905 q 476 811 498 840 q 426 764 453 783 q 367 745 398 745 q 311 756 338 745 q 260 780 285 767 q 210 804 235 793 q 160 816 185 816 q 132 810 144 816 q 108 795 120 805 q 86 771 97 786 q 63 738 75 756 l 12 756 q 41 817 24 784 q 81 879 59 850 q 130 927 103 908 q 189 947 158 947 q 248 935 220 947 q 302 911 276 924 q 350 887 327 898 q 395 876 373 876 q 448 894 425 876 q 493 954 470 913 l 545 933 "},"ˇ":{"x_min":18.984375,"x_max":483.578125,"ha":497,"o":"m 295 722 l 202 722 l 18 979 q 36 1007 27 993 q 58 1026 46 1020 l 249 878 l 438 1026 q 461 1007 449 1020 q 483 979 474 993 l 295 722 "},"":{"x_min":0,"x_max":200.078125,"ha":231,"o":"m 200 0 l 200 -26 l 26 -26 l 26 -200 l 0 -200 l 0 0 l 200 0 "},"Ŭ":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 710 1144 q 662 1050 689 1089 q 604 986 635 1011 q 539 949 573 961 q 470 938 505 938 q 398 949 433 938 q 332 986 363 961 q 275 1050 301 1011 q 228 1144 248 1089 q 239 1157 232 1150 q 252 1170 245 1164 q 266 1182 259 1177 q 279 1190 274 1187 q 319 1136 296 1158 q 367 1098 342 1113 q 419 1075 393 1082 q 467 1068 445 1068 q 518 1075 491 1068 q 570 1097 544 1082 q 618 1135 595 1112 q 658 1190 641 1158 q 671 1182 664 1187 q 686 1170 678 1177 q 699 1157 693 1164 q 710 1144 706 1150 "},"̌":{"x_min":-577.171875,"x_max":-112.578125,"ha":0,"o":"m -301 722 l -394 722 l -577 979 q -559 1007 -569 993 q -537 1026 -549 1020 l -346 878 l -158 1026 q -134 1007 -146 1020 q -112 979 -122 993 l -301 722 "},"ĝ":{"x_min":10,"x_max":716.828125,"ha":718,"o":"m 453 406 q 443 471 453 441 q 417 524 434 501 q 373 559 399 546 q 312 573 347 573 q 278 565 295 573 q 246 541 260 557 q 223 502 232 526 q 214 446 214 478 q 222 382 214 412 q 247 329 230 352 q 291 294 264 307 q 354 281 317 281 q 391 288 373 281 q 423 312 409 296 q 444 351 436 327 q 453 406 453 374 m 377 -28 q 316 -18 344 -24 q 262 -7 287 -13 q 213 -46 231 -29 q 186 -77 195 -63 q 175 -102 177 -91 q 173 -123 173 -113 q 189 -166 173 -146 q 235 -203 206 -187 q 304 -227 264 -218 q 390 -237 343 -237 q 459 -227 430 -237 q 507 -200 488 -217 q 536 -161 527 -183 q 546 -116 546 -140 q 539 -90 546 -103 q 515 -66 533 -77 q 463 -44 497 -54 q 377 -28 430 -34 m 609 434 q 585 339 609 382 q 524 265 562 296 q 434 217 485 234 q 327 200 383 200 l 320 200 q 287 161 294 176 q 280 143 280 147 q 284 131 280 136 q 304 119 288 125 q 350 107 319 113 q 434 94 381 101 q 565 70 513 84 q 648 35 617 55 q 691 -11 679 15 q 704 -71 704 -37 q 689 -134 704 -102 q 649 -196 674 -166 q 588 -250 623 -225 q 513 -294 554 -275 q 429 -323 473 -313 q 342 -334 385 -334 q 268 -329 307 -334 q 193 -315 230 -325 q 123 -291 156 -306 q 64 -256 90 -277 q 24 -209 39 -235 q 10 -150 10 -182 q 17 -115 10 -133 q 43 -78 24 -98 q 95 -34 62 -58 q 180 17 128 -11 q 103 83 103 48 q 109 103 103 90 q 130 132 116 116 q 169 169 145 149 q 226 212 192 189 q 157 241 188 223 q 104 284 126 259 q 70 341 82 309 q 58 408 58 372 q 82 502 58 457 q 147 579 106 546 q 242 631 188 612 q 354 651 295 651 q 442 638 401 651 q 515 603 482 625 q 622 625 574 610 q 697 651 670 640 l 716 625 q 710 608 714 618 q 700 587 705 598 q 690 566 695 577 q 678 547 684 556 q 631 541 655 543 q 579 537 607 538 q 601 487 593 513 q 609 434 609 462 m 585 750 q 568 723 577 737 q 546 705 558 710 l 356 856 l 166 705 q 143 723 155 710 q 121 750 130 737 l 310 1013 l 403 1013 l 585 750 "},"Ω":{"x_min":44.25,"x_max":872.09375,"ha":943,"o":"m 71 0 l 44 23 q 46 66 44 39 q 52 122 49 92 q 59 180 55 151 q 68 230 63 208 l 118 230 q 129 180 124 201 q 142 143 135 158 q 159 122 149 129 q 184 115 169 115 l 323 115 q 210 217 257 167 q 133 314 163 267 q 89 408 103 362 q 75 501 75 454 q 86 590 75 545 q 120 677 98 635 q 177 754 143 718 q 257 817 212 790 q 360 859 302 844 q 486 875 417 875 q 640 849 572 875 q 756 778 708 824 q 829 665 804 731 q 855 516 855 599 q 837 417 855 465 q 785 320 819 369 q 703 221 751 271 q 592 115 654 170 l 744 115 q 767 121 758 115 q 784 141 777 127 q 800 178 792 155 q 821 233 808 200 l 872 220 q 868 170 870 200 q 861 107 865 140 q 854 46 857 75 q 847 0 850 17 l 501 0 l 501 115 q 564 206 537 166 q 611 279 591 247 q 644 340 631 312 q 666 395 657 368 q 677 450 674 422 q 681 511 681 478 q 665 625 681 573 q 621 714 649 676 q 552 772 592 751 q 463 794 512 794 q 396 780 426 794 q 342 745 366 767 q 300 694 318 723 q 272 635 283 665 q 255 574 260 604 q 250 519 250 544 q 252 454 250 483 q 261 397 254 424 q 279 341 267 369 q 311 279 292 312 q 359 206 331 247 q 427 115 388 166 l 427 0 l 71 0 "},"s":{"x_min":52.03125,"x_max":530,"ha":582,"o":"m 530 192 q 515 109 530 144 q 477 51 500 75 q 424 13 454 28 q 365 -7 395 0 q 308 -17 335 -15 q 260 -20 280 -20 q 213 -16 239 -20 q 161 -7 188 -13 q 109 7 135 -1 q 61 29 83 17 q 53 53 56 31 q 52 105 51 75 q 55 169 52 136 q 66 227 58 202 l 120 220 q 143 155 127 184 q 180 105 158 126 q 228 74 202 85 q 284 63 255 63 q 357 80 333 63 q 381 138 381 98 q 367 187 381 166 q 330 227 353 209 q 278 262 307 246 q 218 294 249 277 q 161 325 189 308 q 110 364 133 343 q 74 411 88 385 q 60 469 60 437 q 80 545 60 511 q 135 602 101 579 q 212 638 169 625 q 301 651 255 651 q 360 647 331 651 q 417 636 390 643 q 467 620 444 630 q 506 598 490 611 q 507 576 510 595 q 498 532 505 556 q 483 485 492 508 q 466 451 474 462 l 419 457 q 371 548 402 516 q 294 580 339 580 q 231 561 253 580 q 209 514 209 542 q 219 475 209 492 q 250 443 230 458 q 299 413 270 428 q 364 379 328 398 q 423 347 393 364 q 476 308 452 330 q 515 258 500 286 q 530 192 530 230 "},"ǚ":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 627 859 q 619 813 627 834 q 596 775 610 791 q 562 749 581 758 q 520 740 542 740 q 461 761 481 740 q 440 822 440 782 q 449 869 440 847 q 472 907 458 891 q 506 932 487 923 q 546 942 525 942 q 606 921 584 942 q 627 859 627 901 m 341 859 q 333 813 341 834 q 310 775 324 791 q 276 749 296 758 q 235 740 257 740 q 175 761 196 740 q 154 822 154 782 q 163 869 154 847 q 186 907 172 891 q 220 932 201 923 q 260 942 240 942 q 320 921 299 942 q 341 859 341 901 m 434 971 l 341 971 l 158 1229 q 176 1256 166 1243 q 198 1275 186 1270 l 389 1127 l 577 1275 q 601 1256 589 1270 q 623 1229 613 1243 l 434 971 "},"̀":{"x_min":-503.234375,"x_max":-185.828125,"ha":0,"o":"m -185 736 q -197 727 -189 732 q -213 718 -204 722 q -229 710 -221 713 q -244 705 -238 707 l -503 960 l -483 998 q -455 1004 -476 1000 q -410 1013 -434 1008 q -363 1020 -385 1017 q -333 1025 -341 1024 l -185 736 "},"?":{"x_min":44,"x_max":587,"ha":632,"o":"m 587 790 q 569 697 587 739 q 526 619 552 656 q 469 550 500 583 q 411 485 438 518 q 365 419 384 453 q 344 344 346 384 l 339 279 q 309 263 327 270 q 273 251 291 257 l 251 270 l 246 344 q 255 420 243 383 q 285 493 266 458 q 324 562 303 528 q 365 629 346 596 q 397 695 384 662 q 410 759 410 727 q 382 883 410 843 q 307 924 355 924 q 275 915 290 924 q 248 890 259 906 q 229 853 236 875 q 222 804 222 831 q 224 782 222 795 q 230 760 226 770 q 198 748 219 755 q 153 735 177 741 q 107 725 130 730 q 69 719 84 720 l 45 744 q 44 761 44 750 l 44 777 q 69 866 44 824 q 137 938 94 907 q 237 986 180 968 q 355 1004 293 1004 q 454 988 411 1004 q 527 944 498 972 q 571 877 556 916 q 587 790 587 837 m 412 89 q 402 40 412 62 q 375 3 392 18 q 336 -19 359 -11 q 288 -27 313 -27 q 250 -21 268 -27 q 219 -5 232 -16 q 197 22 205 5 q 190 64 190 40 q 200 113 190 91 q 227 149 210 134 q 267 172 244 164 q 314 181 290 181 q 351 175 333 181 q 382 158 368 170 q 403 130 395 147 q 412 89 412 113 "},"ỡ":{"x_min":44,"x_max":818,"ha":817,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 818 706 q 774 611 818 663 q 637 509 730 559 q 672 425 660 471 q 685 329 685 380 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 138 543 93 494 q 243 621 182 592 q 378 651 305 651 q 498 629 444 651 q 592 568 552 607 q 630 613 621 591 q 640 652 640 635 q 627 689 640 671 q 595 722 614 706 l 772 802 q 804 761 791 787 q 818 706 818 734 m 655 933 q 625 873 643 905 q 585 811 608 840 q 536 764 563 783 q 477 745 508 745 q 421 756 448 745 q 370 780 395 767 q 320 804 345 793 q 269 816 295 816 q 242 810 254 816 q 218 795 229 805 q 196 771 207 786 q 172 738 185 756 l 122 756 q 151 817 134 784 q 191 879 168 850 q 240 927 213 908 q 299 947 267 947 q 358 935 330 947 q 412 911 386 924 q 460 887 437 898 q 505 876 483 876 q 558 894 535 876 q 603 954 580 913 l 655 933 "},"Ī":{"x_min":12.875,"x_max":441.515625,"ha":454,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 m 441 1103 q 434 1083 439 1096 q 423 1057 429 1071 q 411 1032 417 1044 q 403 1014 406 1020 l 34 1014 l 12 1035 q 19 1055 14 1043 q 30 1081 24 1067 q 42 1106 36 1094 q 50 1125 47 1118 l 419 1125 l 441 1103 "},"•":{"x_min":47.46875,"x_max":337.75,"ha":386,"o":"m 337 448 q 325 373 337 407 q 292 315 314 339 q 241 277 271 291 q 176 264 212 264 q 119 275 143 264 q 79 306 95 286 q 55 354 63 327 q 47 415 47 382 q 60 489 47 455 q 94 548 72 523 q 145 586 115 572 q 209 600 174 600 q 264 588 240 600 q 304 557 288 577 q 329 509 320 537 q 337 448 337 482 "},"(":{"x_min":72,"x_max":444,"ha":461,"o":"m 407 -214 q 259 -104 322 -169 q 155 41 197 -40 q 92 218 113 122 q 72 422 72 314 q 95 633 72 533 q 162 819 118 734 q 267 971 205 903 q 407 1085 330 1038 l 444 1034 q 367 936 403 993 q 305 805 332 879 q 263 641 279 732 q 248 441 248 549 q 260 253 248 342 q 297 86 273 163 q 359 -53 322 9 q 444 -163 395 -116 l 407 -214 "},"◊":{"x_min":0.671875,"x_max":501.203125,"ha":502,"o":"m 122 477 l 122 477 l 280 172 l 379 393 l 379 394 l 222 700 l 122 477 m 0 424 l 185 816 q 206 831 191 822 q 238 849 221 840 q 269 866 255 859 q 292 878 284 874 l 501 447 l 316 56 q 295 41 309 50 q 263 23 280 32 q 231 6 246 13 q 209 -5 217 -1 l 0 424 "},"Ỗ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 661 962 q 643 938 653 949 q 622 922 634 927 l 432 1032 l 242 922 q 221 938 231 927 q 202 962 211 949 l 391 1183 l 474 1183 l 661 962 m 699 1395 q 670 1334 687 1367 q 630 1273 652 1301 q 580 1225 607 1244 q 521 1206 552 1206 q 465 1217 492 1206 q 414 1241 439 1228 q 364 1265 389 1254 q 314 1276 339 1276 q 286 1271 298 1276 q 262 1256 274 1266 q 240 1232 251 1246 q 217 1199 229 1218 l 166 1218 q 195 1279 178 1246 q 235 1341 212 1312 q 284 1389 257 1369 q 343 1408 311 1408 q 402 1397 374 1408 q 456 1373 430 1386 q 504 1349 481 1360 q 549 1338 527 1338 q 602 1357 579 1338 q 647 1415 624 1375 l 699 1395 "},"ḅ":{"x_min":2.25,"x_max":695,"ha":746,"o":"m 545 282 q 533 397 545 349 q 501 475 521 445 q 453 520 480 506 q 394 534 425 534 q 334 517 371 534 q 248 459 297 501 l 248 148 q 343 106 302 119 q 404 94 385 94 q 466 108 440 94 q 510 149 492 123 q 536 208 528 174 q 545 282 545 242 m 695 343 q 680 262 695 304 q 641 179 666 219 q 582 103 616 139 q 508 39 547 66 q 425 -4 469 11 q 338 -20 381 -20 q 291 -13 320 -20 q 229 4 263 -7 q 158 31 196 15 q 85 65 121 47 l 85 858 q 82 906 85 889 q 71 932 80 923 q 46 943 62 940 q 2 949 30 945 l 2 996 q 62 1007 34 1002 q 116 1018 90 1012 q 167 1033 142 1025 q 218 1051 192 1040 q 225 1043 220 1048 q 235 1034 230 1039 q 248 1023 241 1029 l 247 543 q 314 593 281 572 q 377 626 347 613 q 433 645 407 639 q 478 651 458 651 q 568 629 528 651 q 636 567 608 607 q 679 471 664 527 q 695 343 695 414 m 441 -184 q 432 -230 441 -209 q 409 -268 424 -252 q 376 -294 395 -285 q 335 -304 356 -304 q 274 -283 295 -304 q 254 -221 254 -262 q 263 -174 254 -196 q 286 -136 271 -152 q 320 -111 301 -120 q 360 -102 339 -102 q 420 -122 399 -102 q 441 -184 441 -143 "},"Û":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 698 962 q 680 938 690 949 q 659 922 670 927 l 468 1032 l 279 922 q 258 938 267 927 q 238 962 248 949 l 427 1183 l 510 1183 l 698 962 "},"Ầ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 658 962 q 640 938 650 949 q 619 922 630 927 l 428 1032 l 239 922 q 218 938 227 927 q 198 962 208 949 l 387 1183 l 470 1183 l 658 962 m 559 1234 q 540 1209 550 1221 q 518 1193 530 1198 l 193 1352 l 200 1394 q 220 1411 205 1400 q 253 1433 236 1421 q 288 1455 271 1444 q 311 1469 304 1465 l 559 1234 "},"V":{"x_min":8.8125,"x_max":900.6875,"ha":923,"o":"m 900 805 q 828 788 854 796 q 795 760 802 779 l 540 55 q 519 28 535 41 q 485 6 504 16 q 445 -9 465 -3 q 408 -20 424 -15 l 99 760 q 71 789 92 778 q 8 805 51 800 l 8 855 l 354 855 l 354 805 q 282 791 300 801 q 272 762 265 781 l 493 194 l 694 760 q 695 777 697 770 q 682 789 693 784 q 654 798 672 794 q 608 805 636 802 l 608 855 l 900 855 l 900 805 "},"Ỹ":{"x_min":-0.46875,"x_max":828.078125,"ha":851,"o":"m 233 0 l 233 49 q 284 62 264 55 q 317 75 305 69 q 334 87 329 81 q 340 98 340 93 l 340 358 q 285 470 315 412 q 223 581 254 527 q 162 681 192 635 q 108 759 132 727 q 95 773 102 766 q 77 783 89 779 q 48 789 66 787 q 2 792 30 792 l 0 841 q 44 848 19 844 q 95 854 70 851 q 142 858 120 856 q 178 861 164 861 q 216 852 197 861 q 247 829 235 844 q 299 752 272 795 q 355 660 327 709 q 410 560 383 611 q 461 460 437 509 l 619 760 q 613 788 630 778 q 544 805 596 798 l 544 855 l 828 855 l 828 805 q 759 787 781 796 q 727 760 737 777 l 510 354 l 510 98 q 514 88 510 94 q 531 76 519 82 q 564 62 543 69 q 617 49 585 55 l 617 0 l 233 0 m 692 1123 q 662 1063 680 1096 q 622 1001 644 1030 q 572 954 600 973 q 514 935 545 935 q 458 946 484 935 q 406 970 432 957 q 357 994 381 983 q 306 1005 332 1005 q 278 1000 290 1005 q 255 985 266 994 q 232 961 244 975 q 209 928 221 946 l 158 946 q 188 1007 170 974 q 227 1069 205 1040 q 277 1117 250 1098 q 335 1137 304 1137 q 395 1126 366 1137 q 448 1102 423 1115 q 497 1078 474 1089 q 541 1067 520 1067 q 594 1085 572 1067 q 640 1144 617 1104 l 692 1123 "},"ṿ":{"x_min":8.8125,"x_max":696.53125,"ha":705,"o":"m 696 581 q 664 572 676 576 q 645 563 652 568 q 634 551 638 558 q 626 535 630 544 l 434 55 q 416 28 428 41 q 387 6 403 16 q 352 -9 370 -3 q 318 -20 334 -15 l 78 535 q 56 563 71 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 274 574 289 578 q 251 565 259 570 q 244 553 244 560 q 249 535 244 546 l 395 194 l 532 535 q 536 552 536 545 q 531 564 537 559 q 513 573 526 569 q 477 581 500 577 l 477 631 l 696 631 l 696 581 m 453 -184 q 444 -230 453 -209 q 422 -268 436 -252 q 388 -294 407 -285 q 347 -304 369 -304 q 287 -283 307 -304 q 266 -221 266 -262 q 275 -174 266 -196 q 298 -136 284 -152 q 332 -111 313 -120 q 373 -102 352 -102 q 432 -122 411 -102 q 453 -184 453 -143 "},"̱":{"x_min":-638.203125,"x_max":-60.359375,"ha":0,"o":"m -60 -137 q -67 -157 -62 -145 q -78 -183 -72 -170 q -90 -208 -84 -197 q -98 -227 -95 -220 l -616 -227 l -638 -205 q -631 -185 -636 -197 q -620 -159 -626 -173 q -609 -134 -614 -146 q -600 -116 -603 -122 l -82 -116 l -60 -137 "},"@":{"x_min":57,"x_max":1160,"ha":1218,"o":"m 708 495 q 674 543 693 525 q 622 561 655 561 q 532 502 563 561 q 501 317 501 443 q 510 219 501 259 q 535 155 519 180 q 568 119 550 130 q 605 109 587 109 q 629 112 618 109 q 652 124 641 115 q 676 149 663 134 q 708 190 689 165 l 708 495 m 1160 388 q 1146 278 1160 330 q 1109 180 1132 225 q 1053 97 1085 134 q 983 34 1021 60 q 906 -5 946 8 q 825 -20 865 -20 q 787 -14 804 -20 q 755 3 769 -9 q 729 37 740 15 q 712 89 718 58 q 663 36 684 57 q 623 2 642 14 q 584 -15 604 -10 q 537 -20 564 -20 q 467 -1 502 -20 q 403 56 431 17 q 356 155 374 95 q 338 296 338 215 q 346 381 338 339 q 372 464 355 424 q 415 537 390 503 q 473 597 441 571 q 546 636 506 622 q 633 651 586 651 q 662 648 649 651 q 689 639 676 646 q 717 621 703 633 q 748 589 731 608 q 813 616 785 602 q 870 651 840 629 l 891 630 q 881 581 885 606 q 874 531 877 559 q 871 475 871 503 l 871 193 q 880 131 871 152 q 919 110 889 110 q 955 125 935 110 q 990 171 974 141 q 1017 246 1007 201 q 1028 347 1028 290 q 999 550 1028 463 q 919 693 971 636 q 795 779 867 751 q 635 808 723 808 q 452 771 532 808 q 318 673 372 735 q 237 529 264 611 q 210 355 210 447 q 245 130 210 227 q 342 -32 281 33 q 486 -130 403 -97 q 663 -163 569 -163 q 785 -151 728 -163 q 888 -121 842 -139 q 970 -83 935 -103 q 1025 -45 1005 -63 l 1057 -104 q 994 -163 1033 -132 q 902 -219 955 -194 q 780 -262 848 -245 q 629 -280 712 -280 q 398 -239 503 -280 q 217 -121 293 -198 q 99 65 141 -45 q 57 315 57 175 q 78 474 57 397 q 138 619 99 551 q 232 743 177 686 q 354 839 287 799 q 499 902 421 880 q 662 925 577 925 q 864 892 772 925 q 1021 792 955 859 q 1123 624 1087 725 q 1160 388 1160 524 "},"ʼ":{"x_min":44.34375,"x_max":298.03125,"ha":345,"o":"m 298 876 q 285 806 297 840 q 252 743 272 772 q 203 688 231 713 q 142 642 174 663 l 97 675 q 121 705 110 690 q 141 735 133 720 q 155 768 150 750 q 161 808 161 786 q 133 872 161 847 q 54 898 104 897 l 44 948 q 61 961 48 953 q 91 976 74 968 q 129 991 109 983 q 169 1004 150 998 q 203 1013 188 1010 q 226 1015 218 1016 q 282 956 265 991 q 298 876 298 920 "},"i":{"x_min":43,"x_max":385.203125,"ha":417,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 m 321 855 q 312 813 321 832 q 288 780 303 794 q 252 759 272 766 q 206 752 231 752 q 171 756 187 752 q 141 770 154 760 q 121 793 128 779 q 114 827 114 807 q 122 869 114 850 q 146 901 131 888 q 182 922 162 915 q 227 930 203 930 q 262 925 245 930 q 292 912 279 921 q 313 888 305 902 q 321 855 321 874 "},"ȯ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 472 859 q 463 813 472 834 q 441 775 455 791 q 407 749 426 758 q 366 740 388 740 q 306 761 326 740 q 285 822 285 782 q 294 869 285 847 q 317 907 303 891 q 351 932 332 923 q 392 942 371 942 q 451 921 430 942 q 472 859 472 901 "},"≤":{"x_min":35.953125,"x_max":594.796875,"ha":631,"o":"m 594 184 q 588 166 592 176 q 579 144 584 155 q 570 123 575 133 q 564 108 566 114 l 57 108 l 35 129 q 41 147 37 137 q 50 168 45 157 q 59 188 54 178 q 67 206 63 199 l 573 206 l 594 184 m 594 302 q 561 271 579 288 q 522 240 543 253 l 57 406 q 52 412 56 408 q 45 422 48 417 l 35 434 q 47 476 40 454 q 61 515 54 498 l 573 701 l 594 678 q 589 659 592 671 q 582 634 586 647 q 575 609 579 621 q 570 591 572 597 l 212 462 l 578 332 l 594 302 "},"ẽ":{"x_min":44,"x_max":630.734375,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 630 933 q 600 873 618 905 q 560 811 583 840 q 511 764 538 783 q 452 745 483 745 q 396 756 423 745 q 345 780 370 767 q 295 804 320 793 q 244 816 270 816 q 217 810 229 816 q 193 795 204 805 q 171 771 182 786 q 147 738 160 756 l 96 756 q 126 817 109 784 q 166 879 143 850 q 215 927 188 908 q 274 947 242 947 q 333 935 305 947 q 386 911 361 924 q 435 887 412 898 q 480 876 458 876 q 533 894 510 876 q 578 954 555 913 l 630 933 "},"ĕ":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 604 927 q 556 833 583 872 q 498 769 529 794 q 433 732 467 744 q 364 721 399 721 q 292 732 327 721 q 226 769 257 744 q 169 833 196 794 q 122 927 143 872 q 133 940 126 933 q 146 953 139 947 q 161 965 153 960 q 173 973 168 970 q 213 919 190 941 q 262 881 236 896 q 313 858 287 865 q 362 851 339 851 q 412 858 385 851 q 464 880 438 865 q 512 918 489 895 q 552 973 535 941 q 565 965 558 970 q 580 953 573 960 q 593 940 587 947 q 604 927 600 933 "},"ṧ":{"x_min":52.03125,"x_max":530,"ha":582,"o":"m 530 192 q 515 109 530 144 q 477 51 500 75 q 424 13 454 28 q 365 -7 395 0 q 308 -17 335 -15 q 260 -20 280 -20 q 213 -16 239 -20 q 161 -7 188 -13 q 109 7 135 -1 q 61 29 83 17 q 53 53 56 31 q 52 105 51 75 q 55 169 52 136 q 66 227 58 202 l 120 220 q 143 155 127 184 q 180 105 158 126 q 228 74 202 85 q 284 63 255 63 q 357 80 333 63 q 381 138 381 98 q 367 187 381 166 q 330 227 353 209 q 278 262 307 246 q 218 294 249 277 q 161 325 189 308 q 110 364 133 343 q 74 411 88 385 q 60 469 60 437 q 80 545 60 511 q 135 602 101 579 q 212 638 169 625 q 301 651 255 651 q 360 647 331 651 q 417 636 390 643 q 467 620 444 630 q 506 598 490 611 q 507 576 510 595 q 498 532 505 556 q 483 485 492 508 q 466 451 474 462 l 419 457 q 371 548 402 516 q 294 580 339 580 q 231 561 253 580 q 209 514 209 542 q 219 475 209 492 q 250 443 230 458 q 299 413 270 428 q 364 379 328 398 q 423 347 393 364 q 476 308 452 330 q 515 258 500 286 q 530 192 530 230 m 334 722 l 241 722 l 58 979 q 76 1007 66 993 q 97 1026 86 1020 l 288 878 l 477 1026 q 501 1007 489 1020 q 522 979 513 993 l 334 722 m 384 1133 q 375 1086 384 1108 q 352 1048 367 1064 q 319 1022 338 1032 q 278 1013 299 1013 q 217 1034 238 1013 q 197 1096 197 1055 q 206 1142 197 1121 q 229 1180 214 1164 q 263 1206 244 1197 q 304 1215 282 1215 q 363 1194 342 1215 q 384 1133 384 1174 "},"Ỉ":{"x_min":42.09375,"x_max":398.59375,"ha":454,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 m 354 1121 q 342 1088 354 1102 q 313 1061 330 1073 q 281 1037 297 1048 q 256 1014 265 1026 q 252 989 248 1002 q 279 959 255 976 q 266 952 274 955 q 248 945 257 948 q 230 940 239 942 q 217 938 222 938 q 157 973 172 957 q 146 1004 142 990 q 167 1030 151 1018 q 203 1055 184 1043 q 237 1081 222 1068 q 252 1111 252 1095 q 244 1143 252 1134 q 222 1153 236 1153 q 199 1142 208 1153 q 191 1121 191 1132 q 198 1102 191 1113 q 154 1087 181 1094 q 95 1077 127 1080 l 87 1084 q 85 1098 85 1090 q 99 1137 85 1117 q 134 1171 112 1156 q 184 1196 155 1187 q 244 1206 213 1206 q 294 1199 273 1206 q 328 1180 315 1192 q 347 1153 341 1168 q 354 1121 354 1138 "},"ż":{"x_min":41.375,"x_max":607.015625,"ha":650,"o":"m 598 224 q 597 189 598 209 q 597 147 597 169 q 596 102 596 125 q 594 59 595 79 q 592 23 593 39 q 590 0 591 8 l 59 0 l 41 30 l 400 550 l 223 550 q 167 516 193 550 q 124 407 141 482 l 75 421 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 592 631 l 607 601 l 246 81 l 479 81 q 500 91 491 81 q 517 122 510 102 q 533 170 525 142 q 550 235 541 199 l 598 224 m 437 859 q 429 813 437 834 q 406 775 420 791 q 372 749 392 758 q 331 740 353 740 q 271 761 292 740 q 250 822 250 782 q 259 869 250 847 q 283 907 268 891 q 317 932 297 923 q 357 942 336 942 q 416 921 395 942 q 437 859 437 901 "},"Ƙ":{"x_min":29.078125,"x_max":883,"ha":893,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 291 447 l 522 747 q 616 832 566 804 q 730 861 667 861 q 790 850 762 861 q 838 820 818 840 q 871 770 859 800 q 883 699 883 739 q 881 679 883 690 q 878 656 880 668 q 873 633 876 644 q 869 614 871 622 q 850 599 867 609 q 810 578 833 589 q 763 558 787 568 q 723 545 739 549 l 700 579 q 712 604 706 590 q 723 631 719 617 q 730 658 727 644 q 734 681 734 671 q 721 730 733 717 q 689 744 708 744 q 654 731 670 744 q 625 702 638 718 l 418 457 l 745 111 q 768 92 756 98 q 793 83 780 85 q 820 81 805 80 q 853 84 835 82 l 858 34 q 814 20 838 28 q 765 6 789 13 q 718 -5 740 0 q 679 -10 695 -10 q 644 -3 660 -10 q 615 19 629 2 l 292 423 l 292 90 q 314 70 292 82 q 385 49 336 58 l 385 0 l 29 0 "},"ő":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 269 705 q 240 716 257 707 q 210 733 223 725 l 314 1020 q 339 1016 322 1018 q 374 1012 356 1015 q 407 1008 392 1010 q 430 1003 423 1005 l 451 965 l 269 705 m 486 705 q 458 716 475 707 q 427 733 440 725 l 531 1020 q 556 1016 539 1018 q 591 1012 573 1015 q 624 1008 609 1010 q 648 1003 640 1005 l 668 965 l 486 705 "},"":{"x_min":12,"x_max":420,"ha":423,"o":"m 154 551 l 154 628 q 165 684 154 659 q 193 729 176 708 q 229 768 210 750 q 265 806 248 787 q 293 847 282 826 q 305 896 305 869 q 297 940 305 921 q 278 970 290 958 q 248 988 265 982 q 211 995 232 995 q 183 988 197 995 q 158 972 169 982 q 140 948 147 962 q 134 919 134 934 q 135 906 134 912 q 139 895 137 900 q 117 887 131 891 q 85 880 102 883 q 52 873 68 876 q 25 869 36 870 l 12 881 q 12 888 12 885 l 12 895 q 30 956 12 927 q 79 1005 48 984 q 152 1038 110 1026 q 242 1051 194 1051 q 319 1040 286 1051 q 374 1011 352 1030 q 408 968 397 992 q 420 914 420 943 q 408 861 420 884 q 380 820 397 838 q 344 784 363 801 q 308 749 325 767 q 280 708 291 730 q 269 656 269 685 l 269 551 l 154 551 "},"ự":{"x_min":22.9375,"x_max":940,"ha":940,"o":"m 940 706 q 924 650 940 680 q 876 590 908 621 q 792 528 843 559 q 672 469 741 497 l 672 192 q 672 157 672 171 q 675 134 673 144 q 679 120 676 125 q 687 111 682 114 q 710 109 695 106 q 759 127 724 112 l 776 76 q 721 43 751 59 q 662 11 691 26 q 612 -11 634 -2 q 582 -20 590 -20 q 558 -15 570 -20 q 537 1 547 -11 q 520 35 528 13 q 509 92 513 57 q 433 33 466 55 q 372 0 399 11 q 321 -16 344 -12 q 276 -20 298 -20 q 214 -11 244 -20 q 159 20 183 -2 q 119 84 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 630 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 313 102 298 107 q 346 97 327 97 q 377 100 361 97 q 414 112 394 103 q 457 137 434 122 q 509 177 481 153 l 509 467 q 506 516 509 497 q 495 544 504 534 q 468 558 486 554 q 419 564 450 562 l 419 611 q 542 628 487 617 q 646 650 597 638 l 672 619 l 671 540 q 716 569 698 554 q 743 599 733 585 q 757 627 753 614 q 762 651 762 640 q 749 688 762 671 q 718 722 737 706 l 894 802 q 926 761 913 787 q 940 706 940 734 m 484 -184 q 476 -230 484 -209 q 453 -268 467 -252 q 419 -294 439 -285 q 378 -304 400 -304 q 318 -283 339 -304 q 297 -221 297 -262 q 306 -174 297 -196 q 329 -136 315 -152 q 363 -111 344 -120 q 404 -102 383 -102 q 463 -122 442 -102 q 484 -184 484 -143 "},"Ŏ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 673 1144 q 625 1050 653 1089 q 567 986 598 1011 q 502 949 536 961 q 434 938 468 938 q 361 949 396 938 q 296 986 326 961 q 238 1050 265 1011 q 191 1144 212 1089 q 202 1157 196 1150 q 216 1170 208 1164 q 230 1182 223 1177 q 242 1190 237 1187 q 282 1136 259 1158 q 331 1098 305 1113 q 382 1075 356 1082 q 431 1068 408 1068 q 481 1075 455 1068 q 533 1097 507 1082 q 581 1135 558 1112 q 621 1190 604 1158 q 635 1182 628 1187 q 649 1170 642 1177 q 662 1157 656 1164 q 673 1144 669 1150 "},"ȱ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 472 859 q 463 813 472 834 q 441 775 455 791 q 407 749 426 758 q 366 740 388 740 q 306 761 326 740 q 285 822 285 782 q 294 869 285 847 q 317 907 303 891 q 351 932 332 923 q 392 942 371 942 q 451 921 430 942 q 472 859 472 901 m 674 1131 q 667 1110 672 1123 q 656 1084 662 1098 q 644 1059 650 1071 q 636 1041 639 1047 l 118 1041 l 96 1062 q 103 1082 99 1070 q 114 1108 108 1094 q 126 1133 120 1121 q 134 1152 131 1145 l 653 1152 l 674 1131 "},"ẩ":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 579 750 q 561 723 571 737 q 539 705 551 710 l 349 856 l 160 705 q 136 723 148 710 q 114 750 124 737 l 303 1013 l 396 1013 l 579 750 m 482 1224 q 471 1192 482 1206 q 442 1164 459 1177 q 410 1141 426 1152 q 385 1118 393 1130 q 381 1093 377 1106 q 408 1062 384 1079 q 394 1056 403 1059 q 377 1049 386 1052 q 359 1044 368 1046 q 346 1041 351 1042 q 286 1077 301 1061 q 275 1107 271 1094 q 296 1134 279 1121 q 332 1159 313 1146 q 366 1185 351 1172 q 380 1215 380 1199 q 373 1247 380 1237 q 351 1256 365 1256 q 328 1246 337 1256 q 319 1224 319 1236 q 327 1205 319 1216 q 283 1191 310 1198 q 224 1180 256 1184 l 216 1188 q 214 1201 214 1194 q 227 1240 214 1221 q 262 1275 241 1260 q 313 1300 284 1290 q 373 1309 342 1309 q 423 1303 402 1309 q 457 1284 444 1296 q 476 1257 470 1272 q 482 1224 482 1241 "},"İ":{"x_min":42.09375,"x_max":398.59375,"ha":454,"o":"m 42 0 l 42 49 q 111 70 88 59 q 135 90 135 81 l 135 763 q 112 783 135 771 q 42 805 90 795 l 42 855 l 398 855 l 398 805 q 328 784 352 795 q 305 763 305 772 l 305 90 q 327 70 305 82 q 398 49 349 59 l 398 0 l 42 0 m 313 1050 q 305 1003 313 1024 q 282 965 296 981 q 248 939 268 949 q 207 930 229 930 q 147 951 168 930 q 126 1012 126 972 q 135 1059 126 1037 q 159 1097 144 1081 q 193 1122 173 1113 q 233 1132 212 1132 q 292 1111 271 1132 q 313 1050 313 1091 "},"Ě":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 410 939 l 317 939 l 132 1162 q 152 1186 142 1175 q 173 1204 162 1197 l 365 1076 l 553 1204 q 574 1186 564 1197 q 592 1162 584 1175 l 410 939 "},"Ố":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 661 962 q 643 938 653 949 q 622 922 634 927 l 432 1032 l 242 922 q 221 938 231 927 q 202 962 211 949 l 391 1183 l 474 1183 l 661 962 m 343 1193 q 319 1212 331 1198 q 297 1238 306 1225 l 544 1469 q 579 1450 560 1461 q 615 1428 598 1438 q 646 1408 632 1417 q 665 1393 659 1398 l 671 1358 l 343 1193 "},"ǣ":{"x_min":44,"x_max":974,"ha":1018,"o":"m 974 373 q 956 358 967 366 q 932 342 945 350 q 907 327 920 334 q 883 317 893 321 l 581 317 q 581 308 581 314 l 581 299 q 591 231 581 267 q 621 165 601 196 q 671 115 641 135 q 740 95 701 95 q 782 98 761 95 q 826 111 803 102 q 875 136 848 120 q 933 175 901 151 q 942 167 937 173 q 953 154 948 161 q 962 141 958 147 q 968 132 966 135 q 893 58 927 87 q 825 11 859 28 q 758 -12 792 -5 q 682 -20 723 -20 q 621 -10 652 -20 q 560 17 590 0 q 505 62 531 36 q 460 123 479 89 q 396 57 430 85 q 330 13 363 30 q 263 -11 296 -3 q 198 -20 229 -20 q 146 -11 174 -20 q 96 14 119 -3 q 58 63 73 33 q 44 136 44 93 q 59 213 44 176 q 106 281 74 249 q 188 337 138 312 q 308 378 239 361 q 360 386 327 383 q 428 391 393 389 l 428 444 q 406 534 428 505 q 341 562 385 562 q 304 556 324 562 q 270 537 285 549 q 247 507 255 525 q 245 468 239 490 q 235 458 246 464 q 207 445 224 451 q 168 432 189 439 q 127 422 147 426 q 92 416 107 418 q 71 415 77 414 l 57 449 q 95 514 71 485 q 149 565 119 543 q 213 603 179 588 q 280 630 246 619 q 344 645 313 640 q 398 651 375 651 q 486 634 449 651 q 546 580 523 617 q 593 613 569 600 q 640 635 616 627 q 688 647 665 643 q 731 651 711 651 q 836 627 791 651 q 912 565 882 604 q 958 476 943 527 q 974 373 974 426 m 436 179 q 430 211 432 194 q 428 247 428 229 l 428 314 q 383 311 404 312 q 356 309 363 310 q 285 285 313 299 q 241 252 257 270 q 218 215 225 235 q 212 175 212 196 q 218 139 212 154 q 234 115 224 124 q 256 102 245 106 q 279 98 268 98 q 313 102 295 98 q 351 116 331 106 q 392 140 371 125 q 436 179 414 156 m 712 573 q 677 567 696 573 q 640 542 658 561 q 607 488 622 523 q 586 394 592 452 l 795 394 q 815 399 809 394 q 821 418 821 404 q 813 482 821 454 q 791 531 805 511 q 756 562 776 551 q 712 573 736 573 m 826 886 q 818 866 824 879 q 807 840 813 854 q 796 815 801 826 q 788 797 790 803 l 269 797 l 248 818 q 255 838 250 826 q 265 864 259 850 q 277 889 271 877 q 286 908 282 901 l 804 908 l 826 886 "},"Ʉ":{"x_min":28.3125,"x_max":902.6875,"ha":939,"o":"m 509 78 q 590 99 557 78 q 645 157 624 121 q 674 240 665 193 q 684 337 684 287 l 684 407 l 298 407 l 298 345 q 309 230 298 280 q 345 146 320 180 q 411 95 371 112 q 509 78 451 78 m 895 805 q 826 784 849 795 q 803 763 803 772 l 803 488 l 885 488 l 902 472 l 875 407 l 803 407 l 803 355 q 778 196 803 266 q 708 78 753 127 q 602 5 663 30 q 467 -20 541 -20 q 336 0 398 -20 q 228 58 274 18 q 154 158 181 97 q 128 301 128 218 l 128 407 l 43 407 l 28 423 q 33 436 29 427 q 40 455 36 445 q 47 473 43 465 q 53 488 51 482 l 128 488 l 128 763 q 105 783 128 771 q 34 805 83 795 l 34 855 l 390 855 l 390 805 q 321 784 344 795 q 298 763 298 772 l 298 488 l 684 488 l 684 763 q 661 783 684 771 q 590 805 639 795 l 590 855 l 895 855 l 895 805 "},"Ṛ":{"x_min":20.265625,"x_max":843.71875,"ha":840,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 784 q 74 778 97 781 q 29 771 50 775 l 20 834 q 176 862 92 849 q 358 875 261 875 q 515 859 451 875 q 621 815 580 843 q 681 750 662 788 q 700 669 700 712 q 686 583 700 622 q 647 512 672 544 q 587 457 622 481 q 510 420 552 434 l 724 124 q 745 101 735 110 q 766 88 754 92 q 794 82 778 83 q 833 84 810 82 l 843 34 q 793 19 821 27 q 738 4 765 11 q 687 -5 710 -1 q 651 -10 664 -10 q 612 1 631 -10 q 584 27 594 12 l 390 397 q 376 396 383 396 l 363 396 q 328 398 346 396 q 292 404 310 400 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 329 803 q 310 802 320 803 q 292 802 301 802 l 292 479 q 323 475 310 475 q 352 474 337 474 q 486 520 443 474 q 529 648 529 566 q 519 708 529 679 q 487 757 510 736 q 426 790 464 778 q 329 803 387 803 m 472 -184 q 463 -230 472 -209 q 441 -268 455 -252 q 407 -294 426 -285 q 366 -304 388 -304 q 306 -283 326 -304 q 285 -221 285 -262 q 294 -174 285 -196 q 317 -136 303 -152 q 351 -111 332 -120 q 392 -102 371 -102 q 451 -122 430 -102 q 472 -184 472 -143 "},"ḷ":{"x_min":36,"x_max":391.984375,"ha":417,"o":"m 36 0 l 36 49 q 83 59 65 54 q 113 69 102 64 q 127 80 123 74 q 132 90 132 85 l 132 858 q 128 905 132 888 q 115 931 125 922 q 88 942 106 939 q 43 949 71 945 l 43 996 q 106 1006 76 1001 q 161 1017 135 1011 q 213 1032 187 1023 q 265 1051 239 1040 l 295 1023 l 295 90 q 299 80 295 85 q 315 69 304 75 q 345 59 326 64 q 391 49 364 54 l 391 0 l 36 0 m 306 -184 q 298 -230 306 -209 q 275 -268 289 -252 q 241 -294 261 -285 q 200 -304 222 -304 q 140 -283 161 -304 q 119 -221 119 -262 q 128 -174 119 -196 q 152 -136 137 -152 q 186 -111 166 -120 q 226 -102 205 -102 q 285 -122 264 -102 q 306 -184 306 -143 "},"Ǚ":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 705 1050 q 697 1003 705 1024 q 673 965 688 981 q 639 939 659 949 q 598 930 620 930 q 539 951 559 930 q 518 1012 518 972 q 527 1059 518 1037 q 550 1097 536 1081 q 584 1122 565 1113 q 624 1132 603 1132 q 684 1111 662 1132 q 705 1050 705 1091 m 419 1050 q 411 1003 419 1024 q 388 965 402 981 q 354 939 374 949 q 313 930 335 930 q 253 951 274 930 q 232 1012 232 972 q 241 1059 232 1037 q 264 1097 250 1081 q 298 1122 279 1113 q 338 1132 318 1132 q 398 1111 377 1132 q 419 1050 419 1091 m 516 1161 l 423 1161 l 238 1384 q 258 1409 248 1398 q 279 1426 267 1420 l 471 1298 l 659 1426 q 680 1409 670 1420 q 698 1384 690 1398 l 516 1161 "},"‹":{"x_min":44.078125,"x_max":354.03125,"ha":439,"o":"m 314 1 l 44 291 l 44 315 q 44 331 44 324 q 45 340 44 339 l 314 629 l 353 598 l 347 586 q 332 554 341 574 q 310 508 322 534 q 284 456 297 483 q 259 404 271 430 q 238 359 247 379 q 222 328 228 340 q 217 316 217 316 l 354 31 l 314 1 "},"ủ":{"x_min":22.9375,"x_max":775.453125,"ha":782,"o":"m 775 76 q 720 43 750 59 q 661 11 690 26 q 611 -11 633 -2 q 581 -20 589 -20 q 557 -15 569 -20 q 536 1 546 -11 q 519 35 527 13 q 508 92 512 57 q 432 33 466 55 q 371 0 399 11 q 321 -16 344 -12 q 277 -20 298 -20 q 214 -11 245 -20 q 159 21 183 -2 q 119 85 134 44 q 105 189 105 125 l 105 467 q 103 517 105 499 q 95 544 102 535 q 70 557 87 554 q 22 564 54 560 l 22 611 q 85 617 56 614 q 138 625 113 621 q 190 636 164 629 q 244 651 215 642 l 268 619 l 268 231 q 273 163 268 189 q 288 122 278 137 q 312 102 298 107 q 346 97 327 97 q 377 100 360 97 q 413 112 393 103 q 456 137 433 122 q 508 177 480 153 l 508 467 q 505 516 508 497 q 494 544 503 534 q 467 558 485 554 q 418 564 449 562 l 418 611 q 541 628 486 617 q 645 651 596 638 l 671 619 l 671 192 q 671 157 671 171 q 674 134 672 144 q 678 120 675 125 q 686 111 681 114 q 709 109 694 106 q 758 127 723 112 l 775 76 m 524 904 q 513 871 524 885 q 484 844 501 856 q 452 820 468 831 q 427 797 435 809 q 423 772 419 785 q 450 742 426 759 q 436 735 445 738 q 419 728 428 731 q 401 723 410 725 q 388 721 393 721 q 328 756 343 740 q 317 787 313 773 q 338 813 321 801 q 374 838 355 826 q 408 864 393 851 q 422 894 422 878 q 415 926 422 917 q 393 936 407 936 q 370 925 379 936 q 361 904 361 915 q 369 885 361 896 q 325 870 352 877 q 266 860 298 863 l 258 867 q 256 881 256 873 q 270 920 256 900 q 304 954 283 939 q 355 979 326 970 q 415 989 384 989 q 465 982 444 989 q 499 963 486 975 q 518 936 512 951 q 524 904 524 921 "},"Ằ":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 m 670 1144 q 622 1050 649 1089 q 564 986 595 1011 q 499 949 533 961 q 430 938 465 938 q 358 949 393 938 q 292 986 323 961 q 235 1050 261 1011 q 188 1144 208 1089 q 199 1157 192 1150 q 212 1170 205 1164 q 226 1182 219 1177 q 239 1190 233 1187 q 279 1136 256 1158 q 327 1098 302 1113 q 379 1075 353 1082 q 427 1068 405 1068 q 478 1075 451 1068 q 530 1097 504 1082 q 578 1135 555 1112 q 618 1190 601 1158 q 631 1182 624 1187 q 646 1170 638 1177 q 659 1157 653 1164 q 670 1144 666 1150 m 559 1195 q 540 1171 550 1182 q 518 1154 530 1160 l 193 1313 l 200 1356 q 220 1372 205 1361 q 253 1394 236 1383 q 288 1416 271 1406 q 311 1430 304 1426 l 559 1195 "},"ʒ":{"x_min":14.375,"x_max":625,"ha":662,"o":"m 625 -22 q 610 -112 625 -71 q 571 -188 596 -153 q 512 -249 546 -222 q 440 -295 478 -277 q 360 -324 402 -314 q 279 -334 319 -334 q 173 -318 221 -334 q 88 -282 124 -303 q 34 -238 53 -260 q 14 -199 14 -215 q 31 -176 14 -192 q 72 -143 48 -159 q 119 -112 95 -126 q 158 -96 143 -98 q 225 -202 188 -165 q 316 -240 263 -240 q 371 -229 345 -240 q 418 -197 398 -218 q 450 -142 438 -175 q 462 -62 462 -108 q 452 25 462 -17 q 419 99 442 67 q 360 150 397 132 q 270 168 324 169 q 213 160 244 168 q 147 141 182 153 q 142 150 145 144 q 134 164 138 157 q 127 177 131 171 q 124 186 124 183 l 407 550 l 204 550 q 148 516 174 550 q 105 407 122 482 l 56 421 l 73 642 q 100 635 87 637 q 128 632 114 633 q 158 631 142 631 l 593 631 l 608 601 l 333 241 q 347 243 339 242 q 361 244 356 244 q 461 226 413 242 q 545 178 509 210 q 603 95 582 145 q 625 -22 625 45 "},"Ḣ":{"x_min":29.078125,"x_max":907.59375,"ha":949,"o":"m 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 488 l 644 488 l 644 763 q 621 783 644 771 q 551 805 599 795 l 551 855 l 907 855 l 907 805 q 837 784 861 795 q 814 763 814 772 l 814 90 q 836 70 814 82 q 907 49 858 59 l 907 0 l 551 0 l 551 49 q 620 70 597 59 q 644 90 644 81 l 644 407 l 292 407 l 292 90 q 314 70 292 82 q 385 49 336 59 l 385 0 l 29 0 m 561 1050 q 552 1003 561 1024 q 529 965 544 981 q 496 939 515 949 q 455 930 476 930 q 395 951 415 930 q 374 1012 374 972 q 383 1059 374 1037 q 406 1097 391 1081 q 440 1122 421 1113 q 481 1132 459 1132 q 540 1111 519 1132 q 561 1050 561 1091 "},"ì":{"x_min":5.4375,"x_max":385.203125,"ha":417,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 m 322 736 q 311 727 318 732 q 295 718 303 722 q 278 710 286 713 q 264 705 270 707 l 5 960 l 25 998 q 52 1004 31 1000 q 98 1013 73 1008 q 144 1020 122 1017 q 174 1025 166 1024 l 322 736 "},"±":{"x_min":35.953125,"x_max":549.359375,"ha":570,"o":"m 343 240 q 326 233 336 237 q 305 225 316 229 q 284 218 295 221 q 266 214 274 215 l 245 234 l 245 421 l 57 421 l 36 442 q 41 459 38 449 q 50 480 45 469 q 59 501 55 491 q 67 518 63 511 l 245 518 l 245 699 l 261 705 q 282 712 271 708 q 303 719 292 716 q 321 725 313 722 l 343 703 l 343 518 l 526 518 l 549 496 q 543 479 547 489 q 534 457 539 468 q 525 436 529 446 q 517 421 520 426 l 343 421 l 343 240 m 549 151 q 543 133 547 144 q 534 111 539 122 q 525 90 529 100 q 518 75 520 80 l 57 75 l 35 96 q 41 114 37 103 q 50 135 45 124 q 59 156 54 146 q 67 173 63 166 l 526 173 l 549 151 "},"|":{"x_min":112,"x_max":227,"ha":319,"o":"m 227 -234 q 209 -246 220 -240 q 186 -257 198 -251 q 161 -267 173 -262 q 141 -275 149 -272 l 112 -254 l 112 1095 q 154 1117 130 1106 q 197 1133 178 1127 l 227 1113 l 227 -234 "},"§":{"x_min":71,"x_max":623,"ha":694,"o":"m 396 379 q 427 363 411 371 q 458 346 443 355 q 473 376 468 360 q 479 409 479 392 q 467 469 479 443 q 433 517 456 495 q 375 561 410 539 q 291 609 339 583 q 269 621 280 615 q 246 634 258 627 q 223 599 232 618 q 215 561 215 579 q 225 509 215 531 q 259 466 236 486 q 315 425 281 446 q 396 379 350 404 m 623 454 q 601 352 623 396 q 548 277 580 307 q 573 237 564 259 q 583 188 583 215 q 568 106 583 140 q 530 49 553 72 q 478 12 507 26 q 419 -8 448 -1 q 361 -17 389 -15 q 314 -20 334 -20 q 267 -16 292 -20 q 215 -6 242 -13 q 163 9 189 0 q 114 31 136 18 q 109 43 111 32 q 106 70 107 53 q 105 107 105 87 q 107 150 105 128 q 111 192 108 171 q 119 229 114 213 l 173 222 q 196 156 181 186 q 233 106 212 127 q 282 73 255 85 q 338 62 308 62 q 410 78 387 62 q 434 135 434 95 q 417 184 434 163 q 375 223 401 205 q 318 257 349 241 q 255 289 286 273 q 190 328 222 306 q 130 379 157 350 q 87 445 104 408 q 71 528 71 481 q 78 574 71 551 q 98 619 85 597 q 129 659 111 640 q 167 692 146 677 q 128 741 143 715 q 113 799 113 767 q 133 874 113 841 q 188 930 154 907 q 265 965 222 953 q 354 977 308 977 q 413 973 384 977 q 470 962 443 969 q 520 945 497 955 q 558 923 542 935 q 560 900 562 920 q 551 857 557 881 q 536 810 545 833 q 519 775 527 786 l 472 781 q 424 873 455 841 q 347 906 392 906 q 284 889 306 906 q 262 841 262 872 q 274 801 262 819 q 308 768 286 784 q 362 737 331 753 q 432 700 394 720 q 499 661 465 682 q 561 610 533 640 q 605 543 588 581 q 623 454 623 505 "},"ȩ":{"x_min":44,"x_max":628,"ha":672,"o":"m 491 -155 q 472 -203 491 -180 q 421 -247 454 -227 q 344 -281 389 -267 q 246 -301 299 -295 l 221 -252 q 305 -224 280 -244 q 331 -182 331 -204 q 315 -149 331 -159 q 269 -137 299 -139 l 271 -134 q 279 -117 273 -131 q 295 -73 285 -103 q 313 -20 303 -53 q 216 2 262 -17 q 127 67 165 25 q 66 168 88 109 q 44 299 44 227 q 78 464 44 391 q 183 587 113 536 q 223 611 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 478 597 528 q 628 373 628 428 q 610 358 621 366 q 585 343 598 350 q 557 328 571 335 q 532 318 543 322 l 212 318 q 225 228 213 269 q 258 157 237 187 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 623 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -14 433 -7 l 398 -14 l 380 -60 q 462 -93 433 -69 q 491 -155 491 -116 m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 467 236 499 q 214 394 218 434 l 440 394 q 460 399 455 394 q 466 418 466 404 q 460 464 466 438 q 441 514 455 490 q 404 553 427 537 q 346 570 381 570 "},"ɨ":{"x_min":18.0625,"x_max":408.9375,"ha":417,"o":"m 321 855 q 312 813 321 832 q 288 780 303 794 q 251 759 272 766 q 206 752 230 752 q 170 756 187 752 q 141 770 154 760 q 121 793 128 779 q 114 827 114 807 q 122 869 114 850 q 146 901 131 888 q 182 922 162 915 q 227 930 203 930 q 262 925 245 930 q 292 912 279 921 q 313 888 305 902 q 321 855 321 874 m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 274 l 33 274 l 18 288 q 23 303 19 294 q 31 321 26 312 q 40 340 35 331 q 47 355 44 349 l 132 355 l 132 439 q 131 495 132 473 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 355 l 394 355 l 408 338 l 380 274 l 295 274 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 "},"ˍ":{"x_min":53.578125,"x_max":631.421875,"ha":685,"o":"m 631 -49 q 624 -69 629 -56 q 613 -95 619 -81 q 601 -120 607 -109 q 593 -139 596 -132 l 75 -139 l 53 -117 q 60 -97 55 -109 q 71 -71 65 -85 q 82 -46 77 -58 q 91 -28 88 -34 l 609 -28 l 631 -49 "},"":{"x_min":34,"x_max":1087,"ha":926,"o":"m 404 112 q 457 122 431 112 q 507 150 483 133 q 557 191 532 168 q 606 240 581 214 l 606 669 q 572 711 591 692 q 530 743 553 730 q 481 765 506 757 q 429 773 456 773 q 348 751 389 773 q 273 688 307 730 q 218 581 239 645 q 197 432 197 518 q 215 299 197 358 q 263 198 234 240 q 330 134 293 156 q 404 112 367 112 m 606 139 q 476 19 541 59 q 331 -20 411 -20 q 223 8 276 -20 q 128 91 170 36 q 60 224 86 145 q 34 405 34 303 q 45 506 34 458 q 76 595 57 554 q 120 672 95 637 q 170 735 144 707 q 221 783 196 763 q 264 816 245 803 q 360 859 311 844 q 454 875 409 875 q 500 872 476 875 q 550 860 524 869 q 604 835 577 851 q 659 792 631 819 q 691 813 675 802 q 722 835 708 824 q 749 856 737 846 q 767 874 761 866 l 801 843 q 788 789 793 819 q 779 729 783 764 q 776 654 776 695 l 776 -66 q 778 -154 776 -119 q 788 -212 781 -190 q 809 -244 796 -235 q 845 -254 823 -254 q 874 -246 862 -254 q 895 -226 887 -238 q 908 -199 904 -213 q 913 -171 913 -185 q 906 -143 913 -158 q 915 -134 906 -140 q 939 -123 924 -129 q 973 -112 954 -118 q 1010 -102 992 -106 q 1044 -94 1028 -97 q 1069 -91 1059 -91 l 1087 -128 q 1063 -197 1087 -161 q 1001 -264 1040 -233 q 907 -314 961 -294 q 794 -334 854 -334 q 718 -321 752 -334 q 658 -284 683 -309 q 619 -222 633 -259 q 606 -133 606 -184 l 606 139 "},"q":{"x_min":44,"x_max":752.859375,"ha":762,"o":"m 356 109 q 427 127 393 109 q 501 183 460 146 l 501 474 q 472 509 489 494 q 437 537 456 525 q 397 554 418 548 q 358 561 377 561 q 298 548 325 561 q 250 509 270 535 q 218 441 230 483 q 207 342 207 399 q 219 241 207 284 q 253 168 232 197 q 301 123 274 138 q 356 109 328 109 m 385 -326 l 385 -276 q 475 -256 449 -266 q 501 -234 501 -245 l 501 94 q 443 41 470 63 q 391 6 417 20 q 337 -13 365 -7 q 277 -20 310 -20 q 196 2 237 -20 q 121 65 154 24 q 65 166 87 106 q 44 301 44 226 q 58 407 44 360 q 96 490 73 454 q 147 551 119 526 q 198 592 174 576 q 239 615 217 604 q 284 634 261 625 q 330 646 307 642 q 374 651 353 651 q 412 648 393 651 q 450 637 431 645 q 492 615 470 629 q 538 576 513 600 q 573 595 554 584 q 608 615 591 605 q 639 635 625 625 q 659 651 652 644 l 685 625 q 674 579 678 604 q 667 529 670 557 q 664 471 664 501 l 664 -234 q 668 -245 664 -239 q 682 -256 672 -250 q 709 -266 692 -261 q 752 -276 727 -271 l 752 -326 l 385 -326 "},"ɑ":{"x_min":44,"x_max":741.125,"ha":746,"o":"m 741 78 q 680 40 711 58 q 621 9 648 22 q 571 -12 593 -4 q 539 -20 549 -20 q 496 5 512 -20 q 476 92 481 30 q 421 38 446 60 q 372 4 396 17 q 324 -14 348 -8 q 274 -20 300 -20 q 190 0 231 -20 q 116 62 148 21 q 63 161 83 102 q 44 298 44 221 q 53 380 44 338 q 82 461 63 422 q 129 535 101 500 q 192 595 157 569 q 272 636 228 621 q 366 651 316 651 q 403 647 386 651 q 438 637 421 644 q 474 615 456 629 q 511 581 491 602 q 569 611 538 594 q 629 651 600 629 l 656 625 q 646 576 650 602 q 639 526 642 554 q 636 470 636 498 l 636 213 q 638 146 636 172 q 647 114 640 120 q 671 109 654 107 q 722 127 687 112 q 725 120 722 128 q 731 103 728 112 q 741 78 735 91 m 473 182 l 473 477 q 424 538 456 515 q 355 561 392 561 q 301 550 328 561 q 253 513 274 539 q 219 445 232 487 q 207 339 207 403 q 219 238 207 282 q 250 166 231 195 q 294 123 270 138 q 343 109 319 109 q 369 112 356 109 q 397 123 382 115 q 431 145 412 131 q 473 182 449 159 "},"ộ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 472 -184 q 463 -230 472 -209 q 441 -268 455 -252 q 407 -294 426 -285 q 366 -304 388 -304 q 306 -283 326 -304 q 285 -221 285 -262 q 294 -174 285 -196 q 317 -136 303 -152 q 351 -111 332 -120 q 392 -102 371 -102 q 451 -122 430 -102 q 472 -184 472 -143 m 609 750 q 591 723 600 737 q 569 705 581 710 l 379 856 l 189 705 q 166 723 178 710 q 144 750 153 737 l 333 1013 l 426 1013 l 609 750 "},"®":{"x_min":13,"x_max":482,"ha":495,"o":"m 482 735 q 464 639 482 684 q 415 561 446 595 q 340 509 383 528 q 246 490 297 490 q 153 509 196 490 q 79 561 110 528 q 30 639 48 595 q 13 735 13 684 q 30 830 13 785 q 79 908 48 874 q 153 960 110 941 q 246 980 196 980 q 340 960 297 980 q 415 908 383 941 q 464 830 446 874 q 482 735 482 785 m 432 735 q 418 810 432 775 q 379 872 404 846 q 321 914 355 899 q 246 930 287 930 q 173 914 206 930 q 115 872 139 899 q 76 810 90 846 q 63 735 63 775 q 76 658 63 694 q 115 597 90 623 q 173 555 139 570 q 246 540 206 540 q 321 555 287 540 q 379 597 355 570 q 418 658 404 623 q 432 735 432 694 m 139 599 l 139 615 q 167 627 167 621 l 167 847 q 153 845 160 845 q 141 843 147 844 l 138 866 q 184 874 158 871 q 238 877 209 877 q 289 871 267 877 q 323 858 310 866 q 342 836 336 849 q 349 811 349 824 q 281 729 349 748 l 345 636 q 356 627 350 629 q 377 626 362 624 l 379 610 q 363 606 372 608 q 345 601 354 603 q 329 598 336 599 q 317 596 321 596 q 306 599 311 596 q 298 607 301 603 l 238 723 l 232 723 q 224 724 228 723 q 216 725 220 724 l 216 627 q 220 621 216 624 q 241 615 225 618 l 241 599 l 139 599 m 230 851 l 223 851 q 216 851 219 851 l 216 752 q 222 752 219 752 l 230 752 q 279 765 265 752 q 293 805 293 779 q 277 838 293 824 q 230 851 262 851 "},"Ṭ":{"x_min":1.765625,"x_max":780.8125,"ha":806,"o":"m 203 0 l 203 49 q 254 62 234 55 q 287 75 275 69 q 304 87 299 82 q 309 98 309 93 l 309 774 l 136 774 q 117 766 126 774 q 98 742 108 759 q 77 698 89 725 q 51 631 66 670 l 1 649 q 6 697 3 669 q 13 754 9 724 q 21 810 17 783 q 28 855 25 837 l 755 855 l 780 833 q 777 791 780 815 q 771 739 775 766 q 763 685 767 712 q 755 638 759 659 l 704 638 q 692 694 697 669 q 683 737 688 720 q 669 764 677 754 q 646 774 660 774 l 479 774 l 479 98 q 483 88 479 94 q 500 76 488 82 q 533 62 512 69 q 585 49 554 55 l 585 0 l 203 0 m 483 -184 q 475 -230 483 -209 q 452 -268 466 -252 q 419 -294 438 -285 q 377 -304 399 -304 q 317 -283 338 -304 q 296 -221 296 -262 q 305 -174 296 -196 q 329 -136 314 -152 q 363 -111 343 -120 q 403 -102 382 -102 q 462 -122 441 -102 q 483 -184 483 -143 "},"ṓ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 674 886 q 667 866 672 879 q 656 840 662 854 q 644 815 650 826 q 636 797 639 803 l 118 797 l 96 818 q 103 838 99 826 q 114 864 108 850 q 126 889 120 877 q 134 908 131 901 l 653 908 l 674 886 m 338 949 q 323 953 332 949 q 306 961 315 957 q 290 970 297 966 q 279 978 283 974 l 422 1269 q 452 1265 430 1268 q 499 1258 474 1262 q 547 1249 524 1254 q 577 1243 569 1245 l 597 1206 l 338 949 "},"ḱ":{"x_min":33,"x_max":771.28125,"ha":766,"o":"m 33 0 l 33 49 q 99 69 77 61 q 122 90 122 78 l 122 858 q 118 906 122 889 q 106 932 115 923 q 79 943 97 940 q 33 949 62 945 l 33 996 q 153 1018 98 1006 q 255 1051 209 1030 l 285 1023 l 285 361 l 463 521 q 492 553 485 541 q 493 571 498 565 q 475 579 489 578 q 444 581 462 581 l 444 631 l 747 631 l 747 581 q 687 567 717 578 q 628 534 658 556 l 422 378 l 667 100 q 686 83 677 90 q 706 74 695 77 q 732 70 718 71 q 767 71 747 70 l 771 22 q 726 12 751 17 q 678 2 701 7 q 635 -4 654 -1 q 610 -7 617 -7 q 562 1 582 -7 q 527 28 542 9 l 285 350 l 285 90 q 287 81 285 85 q 297 72 289 77 q 319 63 304 68 q 359 49 334 57 l 359 0 l 33 0 m 311 1091 q 287 1110 300 1097 q 265 1137 275 1124 l 513 1367 q 548 1348 529 1359 q 584 1326 567 1337 q 615 1306 601 1316 q 634 1291 628 1297 l 640 1256 l 311 1091 "},"ọ":{"x_min":44,"x_max":685,"ha":729,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 685 329 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 137 543 93 494 q 243 621 182 592 q 378 651 305 651 q 504 626 447 651 q 601 559 560 602 q 663 457 641 516 q 685 329 685 398 m 472 -184 q 463 -230 472 -209 q 441 -268 455 -252 q 407 -294 426 -285 q 366 -304 388 -304 q 306 -283 326 -304 q 285 -221 285 -262 q 294 -174 285 -196 q 317 -136 303 -152 q 351 -111 332 -120 q 392 -102 371 -102 q 451 -122 430 -102 q 472 -184 472 -143 "},"ẖ":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 388 q 534 457 539 430 q 521 499 530 483 q 497 521 511 515 q 462 528 482 528 q 381 503 423 528 q 285 433 339 479 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 859 q 120 904 122 888 q 110 928 118 920 q 83 941 101 937 q 33 949 65 945 l 33 996 q 101 1007 70 1002 q 156 1019 131 1013 q 206 1033 182 1025 q 255 1051 230 1040 l 285 1023 l 285 530 q 431 622 363 594 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 m 700 -137 q 693 -157 698 -145 q 682 -183 688 -170 q 670 -208 676 -197 q 662 -227 665 -220 l 144 -227 l 122 -205 q 129 -185 124 -197 q 140 -159 134 -173 q 151 -134 146 -146 q 160 -116 157 -122 l 678 -116 l 700 -137 "},"ế":{"x_min":44,"x_max":628,"ha":672,"o":"m 346 570 q 291 557 314 570 q 252 522 268 545 q 227 466 236 499 q 214 393 218 433 l 440 393 q 460 398 455 393 q 466 417 466 403 q 460 464 466 437 q 441 513 455 490 q 404 553 427 537 q 346 570 381 570 m 628 372 q 610 357 621 365 q 585 342 598 349 q 557 327 571 334 q 532 317 543 321 l 212 317 q 225 227 213 268 q 258 156 237 186 q 311 110 280 127 q 382 94 342 94 q 423 96 403 94 q 466 107 443 98 q 519 132 490 116 q 588 176 548 148 q 598 167 592 174 q 609 154 604 161 q 618 141 614 147 q 624 132 622 135 q 539 55 577 85 q 468 8 502 25 q 400 -13 434 -7 q 325 -20 366 -20 q 216 3 267 -20 q 127 68 165 26 q 66 169 88 110 q 44 299 44 228 q 78 464 44 392 q 183 587 113 536 q 223 612 201 600 q 269 632 245 623 q 319 645 293 640 q 370 651 345 651 q 485 627 437 651 q 565 566 534 604 q 612 477 597 528 q 628 372 628 427 m 593 750 q 575 723 585 737 q 554 705 565 710 l 363 856 l 174 705 q 150 723 162 710 q 128 750 138 737 l 318 1013 l 411 1013 l 593 750 m 322 1025 q 308 1030 316 1026 q 290 1038 299 1033 q 275 1047 282 1042 q 263 1054 267 1051 l 406 1345 q 437 1342 415 1345 q 484 1334 459 1339 q 531 1326 509 1330 q 561 1320 554 1322 l 581 1283 l 322 1025 "}," ":{"x_min":0,"x_max":0,"ha":346},"Ḉ":{"x_min":37,"x_max":726.078125,"ha":775,"o":"m 545 -155 q 526 -204 545 -180 q 475 -247 508 -227 q 398 -281 443 -267 q 300 -301 353 -295 l 275 -252 q 359 -224 334 -244 q 385 -182 385 -204 q 369 -149 385 -159 q 323 -136 353 -139 l 325 -134 q 333 -117 328 -131 q 349 -73 339 -102 q 368 -18 357 -52 q 263 8 315 -14 q 148 90 199 36 q 67 221 98 143 q 37 397 37 299 q 70 594 37 506 q 162 745 103 682 q 299 841 220 807 q 468 875 377 875 q 541 869 505 875 q 609 854 577 864 q 669 833 642 845 q 713 806 695 821 q 713 794 716 804 q 704 770 710 784 q 689 739 698 755 q 672 707 681 722 q 655 679 663 692 q 642 662 647 667 l 598 671 q 519 758 563 731 q 421 785 474 785 q 374 777 398 785 q 325 753 349 770 q 280 708 301 736 q 243 641 259 681 q 218 547 227 601 q 209 422 209 492 q 231 273 209 335 q 290 170 254 210 q 371 110 326 130 q 461 91 416 91 q 504 95 479 91 q 558 110 529 99 q 621 140 588 122 q 690 189 654 159 q 699 179 694 186 q 710 165 705 172 q 719 151 715 157 q 726 143 724 145 q 640 67 682 98 q 557 16 598 36 q 475 -11 515 -2 q 451 -15 463 -14 l 434 -60 q 516 -93 487 -69 q 545 -155 545 -116 m 342 921 q 318 940 331 927 q 296 967 305 954 l 544 1198 q 578 1178 559 1189 q 614 1156 597 1167 q 645 1136 632 1146 q 664 1122 659 1127 l 670 1086 l 342 921 "},"∑":{"x_min":30.515625,"x_max":715.53125,"ha":760,"o":"m 715 264 q 711 199 714 237 q 706 123 709 161 q 701 51 704 85 q 697 0 699 18 l 56 0 l 30 34 l 311 415 l 44 821 l 44 855 l 542 855 q 613 856 580 855 q 687 865 646 857 l 689 630 l 631 617 q 607 697 619 667 q 583 741 594 726 q 560 761 571 757 q 539 766 550 766 l 260 766 l 461 456 l 223 131 l 556 131 q 592 137 577 131 q 616 160 606 143 q 637 204 627 176 q 659 278 647 233 l 715 264 "},"ẃ":{"x_min":8.8125,"x_max":986.8125,"ha":996,"o":"m 986 581 q 955 572 967 576 q 936 563 944 567 q 925 553 929 559 q 918 539 921 547 l 769 40 q 752 14 765 25 q 724 -2 739 4 q 694 -13 709 -9 q 671 -20 680 -17 l 498 376 l 360 40 q 343 14 355 24 q 316 -3 330 3 q 288 -14 302 -10 q 265 -20 274 -17 l 82 539 q 60 562 78 551 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 270 573 286 578 q 247 563 254 569 q 239 551 240 557 q 241 539 239 545 l 343 219 l 505 631 l 557 631 l 727 219 l 825 539 q 827 553 828 546 q 821 564 827 559 q 802 573 815 569 q 766 581 789 577 l 766 631 l 986 631 l 986 581 m 475 705 q 460 709 469 705 q 443 717 452 713 q 427 726 434 721 q 416 734 420 730 l 559 1025 q 589 1021 567 1024 q 636 1014 611 1018 q 684 1005 661 1010 q 714 999 706 1001 l 734 962 l 475 705 "},"+":{"x_min":36.109375,"x_max":549.171875,"ha":585,"o":"m 343 152 q 326 145 336 149 q 305 137 316 140 q 284 130 295 133 q 266 126 274 127 l 245 146 l 245 333 l 57 333 l 36 354 q 41 371 38 361 q 50 392 45 381 q 59 413 55 403 q 67 430 63 423 l 245 430 l 245 611 l 261 617 q 282 624 271 620 q 303 631 292 628 q 321 637 313 634 l 343 615 l 343 430 l 526 430 l 549 408 q 543 391 547 401 q 534 369 539 380 q 525 348 529 358 q 517 333 520 338 l 343 333 l 343 152 "},"ḋ":{"x_min":44,"x_max":773.8125,"ha":779,"o":"m 773 77 q 710 38 742 56 q 651 8 678 21 q 602 -12 623 -5 q 572 -20 581 -20 q 510 98 523 -20 q 452 44 478 66 q 401 7 426 22 q 349 -13 376 -6 q 292 -20 323 -20 q 202 2 246 -20 q 122 65 157 24 q 65 166 87 106 q 44 301 44 226 q 68 432 44 369 q 135 544 92 495 q 240 621 179 592 q 373 651 300 651 q 436 643 405 651 q 505 610 468 636 l 505 843 q 503 902 505 880 q 494 936 502 924 q 467 952 486 948 q 412 960 448 957 l 412 1006 q 546 1026 486 1014 q 642 1051 606 1039 l 668 1025 l 668 203 q 669 163 668 179 q 671 136 670 146 q 676 120 673 126 q 683 112 679 115 q 692 109 687 110 q 704 109 697 108 q 724 114 712 110 q 754 127 736 118 l 773 77 m 505 182 l 505 478 q 444 539 480 517 q 362 561 408 561 q 300 548 328 561 q 251 507 272 535 q 218 438 230 480 q 207 337 207 396 q 220 241 207 283 q 255 169 234 199 q 305 124 277 140 q 360 109 332 109 q 431 127 397 109 q 505 182 465 146 m 328 859 q 320 813 328 834 q 297 775 311 791 q 263 749 283 758 q 222 740 244 740 q 162 761 183 740 q 141 822 141 782 q 150 869 141 847 q 173 907 159 891 q 207 932 188 923 q 248 942 227 942 q 307 921 286 942 q 328 859 328 901 "},"Ṓ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 m 728 1075 q 721 1055 726 1068 q 710 1029 716 1043 q 698 1004 703 1016 q 690 986 693 992 l 172 986 l 150 1007 q 157 1027 152 1015 q 168 1053 162 1039 q 179 1078 174 1066 q 188 1097 185 1090 l 706 1097 l 728 1075 m 343 1139 q 319 1158 331 1144 q 297 1184 306 1171 l 544 1415 q 579 1395 560 1406 q 615 1374 598 1384 q 646 1354 632 1363 q 665 1339 659 1344 l 671 1303 l 343 1139 "},"˗":{"x_min":35.953125,"x_max":457.796875,"ha":494,"o":"m 457 376 q 451 357 455 368 q 442 335 447 346 q 433 314 438 324 q 426 299 429 304 l 57 299 l 35 320 q 41 338 37 328 q 50 359 45 349 q 59 380 54 370 q 67 397 63 390 l 435 397 l 457 376 "},"Ë":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 599 1050 q 591 1003 599 1024 q 568 965 582 981 q 534 939 553 949 q 493 930 514 930 q 433 951 453 930 q 412 1012 412 972 q 421 1059 412 1037 q 445 1097 430 1081 q 478 1122 459 1113 q 518 1132 497 1132 q 578 1111 556 1132 q 599 1050 599 1091 m 313 1050 q 305 1003 313 1024 q 282 965 296 981 q 248 939 268 949 q 207 930 229 930 q 147 951 168 930 q 126 1012 126 972 q 135 1059 126 1037 q 159 1097 144 1081 q 193 1122 173 1113 q 232 1132 212 1132 q 292 1111 271 1132 q 313 1050 313 1091 "},"Š":{"x_min":69.75,"x_max":656,"ha":712,"o":"m 656 255 q 646 193 656 225 q 619 130 637 161 q 573 72 601 100 q 508 24 545 45 q 423 -7 470 4 q 318 -20 376 -20 q 262 -15 294 -20 q 198 -2 231 -10 q 134 18 165 6 q 79 46 102 30 q 73 59 75 47 q 70 89 71 71 q 69 130 69 107 q 71 176 70 152 q 76 221 73 199 q 84 260 79 243 l 132 257 q 169 184 147 217 q 220 127 192 150 q 279 90 247 103 q 345 77 311 77 q 404 85 376 77 q 454 111 433 94 q 489 152 476 127 q 503 209 503 177 q 484 281 503 251 q 436 334 466 311 q 368 377 406 358 q 289 414 329 396 q 211 454 249 433 q 142 502 172 474 q 94 565 112 529 q 76 651 76 601 q 93 722 76 683 q 149 794 111 761 q 245 851 186 828 q 386 875 304 875 q 457 870 422 875 q 523 857 493 865 q 577 837 554 849 q 613 812 600 826 q 614 800 616 809 q 608 778 613 790 q 597 750 604 765 q 582 721 590 735 q 567 697 575 708 q 554 681 560 686 l 510 685 q 475 739 495 717 q 435 773 456 760 q 392 791 414 786 q 351 797 370 797 q 294 788 318 797 q 254 764 270 779 q 232 730 239 749 q 225 693 225 712 q 243 636 225 661 q 292 590 262 611 q 361 550 322 569 q 440 510 399 531 q 519 466 481 490 q 588 413 558 443 q 637 344 618 383 q 656 255 656 306 m 409 939 l 316 939 l 132 1162 q 151 1186 141 1175 q 172 1204 161 1197 l 364 1076 l 552 1204 q 574 1186 564 1197 q 592 1162 583 1175 l 409 939 "},"ƙ":{"x_min":32.484375,"x_max":771.28125,"ha":766,"o":"m 771 22 q 727 12 751 17 q 681 2 703 7 q 640 -4 658 -1 q 615 -7 622 -7 q 565 1 587 -7 q 527 28 542 9 l 285 347 l 285 90 q 287 81 285 85 q 297 72 289 77 q 319 63 304 68 q 359 49 334 57 l 359 0 l 32 0 l 32 49 q 99 69 77 61 q 122 90 122 78 l 122 607 q 134 746 122 688 q 168 847 146 804 q 220 922 189 890 q 291 984 251 954 q 336 1012 311 999 q 387 1033 360 1024 q 440 1046 413 1041 q 489 1051 466 1051 q 561 1039 525 1051 q 627 1011 598 1027 q 676 980 657 996 q 695 956 695 964 q 681 929 695 946 q 648 892 666 911 q 610 857 629 873 q 581 838 591 842 q 548 877 567 857 q 508 911 529 896 q 464 936 487 927 q 420 946 441 946 q 371 934 395 946 q 328 889 347 922 q 297 799 309 857 q 285 649 285 741 l 285 360 l 463 521 q 491 552 484 540 q 495 570 498 563 q 479 579 491 576 q 449 581 467 581 l 449 631 l 747 631 l 747 581 q 687 567 717 578 q 628 534 657 557 l 422 378 l 667 100 q 686 83 677 90 q 706 74 695 77 q 732 70 718 71 q 767 71 747 70 l 771 22 "},"ṽ":{"x_min":8.8125,"x_max":696.53125,"ha":705,"o":"m 696 581 q 664 572 676 576 q 645 563 652 568 q 634 551 638 558 q 626 535 630 544 l 434 55 q 416 28 428 41 q 387 6 403 16 q 352 -9 370 -3 q 318 -20 334 -15 l 78 535 q 56 563 71 553 q 8 581 42 574 l 8 631 l 316 631 l 316 581 q 274 574 289 578 q 251 565 259 570 q 244 553 244 560 q 249 535 244 546 l 395 194 l 532 535 q 536 552 536 545 q 531 564 537 559 q 513 573 526 569 q 477 581 500 577 l 477 631 l 696 631 l 696 581 m 641 933 q 611 873 629 905 q 571 811 594 840 q 521 764 549 783 q 463 745 494 745 q 407 756 434 745 q 356 780 381 767 q 306 804 330 793 q 255 816 281 816 q 227 810 240 816 q 204 795 215 805 q 182 771 193 786 q 158 738 170 756 l 107 756 q 137 817 120 784 q 177 879 154 850 q 226 927 199 908 q 284 947 253 947 q 344 935 316 947 q 397 911 372 924 q 446 887 423 898 q 491 876 469 876 q 543 894 521 876 q 589 954 566 913 l 641 933 "},"ở":{"x_min":44,"x_max":818,"ha":817,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 818 706 q 774 611 818 663 q 637 509 730 559 q 672 425 660 471 q 685 329 685 380 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 138 543 93 494 q 243 621 182 592 q 378 651 305 651 q 498 629 444 651 q 592 568 552 607 q 630 613 621 591 q 640 652 640 635 q 627 689 640 671 q 595 722 614 706 l 772 802 q 804 761 791 787 q 818 706 818 734 m 522 904 q 510 871 522 885 q 482 844 498 856 q 449 820 465 831 q 425 797 433 809 q 420 772 416 785 q 447 742 423 759 q 434 735 442 738 q 416 728 425 731 q 398 723 407 725 q 385 721 390 721 q 326 756 340 740 q 315 787 311 773 q 335 813 319 801 q 371 838 352 826 q 405 864 390 851 q 420 894 420 878 q 412 926 420 917 q 390 936 404 936 q 368 925 376 936 q 359 904 359 915 q 366 885 359 896 q 322 870 349 877 q 263 860 295 863 l 256 867 q 254 881 254 873 q 267 920 254 900 q 302 954 280 939 q 352 979 323 970 q 412 989 381 989 q 462 982 442 989 q 496 963 483 975 q 516 936 510 951 q 522 904 522 921 "},"ð":{"x_min":44,"x_max":665.75,"ha":709,"o":"m 501 414 q 470 478 490 451 q 427 524 451 506 q 379 551 404 542 q 331 561 354 561 q 240 500 270 561 q 210 330 210 439 q 222 229 210 277 q 255 144 234 180 q 302 86 275 107 q 358 65 329 65 q 422 83 395 65 q 466 141 449 102 q 492 240 484 180 q 501 383 501 300 l 501 414 m 664 411 q 649 271 664 333 q 609 161 634 209 q 551 78 584 112 q 484 22 519 44 q 415 -9 449 0 q 351 -20 380 -20 q 222 4 279 -20 q 125 71 165 28 q 65 173 86 114 q 44 301 44 232 q 54 389 44 346 q 83 471 64 432 q 129 543 102 510 q 189 600 155 576 q 260 637 222 623 q 342 651 299 651 q 420 634 384 651 q 483 589 455 618 q 447 687 470 642 q 382 777 424 731 l 239 718 q 216 720 226 719 q 196 721 205 720 q 176 725 186 722 q 154 730 166 727 l 147 760 l 325 835 q 238 878 287 863 q 129 885 188 893 l 121 933 l 303 997 q 341 971 321 984 q 379 943 360 957 q 415 915 397 929 q 446 888 432 901 l 573 940 q 624 934 605 937 q 661 925 643 931 l 665 897 l 503 830 q 627 627 590 732 q 664 411 664 522 "},"Ỡ":{"x_min":37,"x_max":857.4375,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 857 944 q 819 855 857 904 q 700 760 781 807 q 783 613 755 697 q 812 439 812 530 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 552 858 502 875 q 642 813 601 842 q 672 854 664 834 q 679 889 679 874 q 667 926 679 908 q 636 959 654 944 l 812 1040 q 844 998 830 1025 q 857 944 857 972 m 693 1123 q 663 1063 680 1096 q 623 1001 645 1030 q 573 954 600 973 q 514 935 545 935 q 459 946 485 935 q 407 970 432 957 q 357 994 382 983 q 307 1005 333 1005 q 279 1000 291 1005 q 256 985 267 994 q 233 961 244 975 q 210 928 222 946 l 159 946 q 188 1007 171 974 q 228 1069 206 1040 q 278 1117 250 1098 q 336 1137 305 1137 q 395 1126 367 1137 q 449 1102 423 1115 q 497 1078 474 1089 q 542 1067 520 1067 q 595 1085 573 1067 q 640 1144 617 1104 l 693 1123 "},"Ḝ":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 498 -155 q 480 -204 498 -180 q 429 -247 461 -227 q 351 -281 396 -267 q 253 -301 306 -295 l 228 -252 q 313 -224 287 -244 q 338 -182 338 -204 q 322 -149 338 -159 q 277 -136 307 -139 l 279 -134 q 287 -117 281 -131 q 303 -73 293 -103 q 327 0 312 -46 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 411 0 l 387 -60 q 469 -93 440 -69 q 498 -155 498 -116 m 604 1144 q 556 1050 583 1089 q 498 986 529 1011 q 433 949 467 961 q 364 938 399 938 q 292 949 327 938 q 226 986 257 961 q 169 1050 196 1011 q 122 1144 143 1089 q 133 1157 126 1150 q 146 1170 139 1164 q 161 1182 153 1177 q 173 1190 168 1187 q 213 1136 190 1158 q 262 1098 236 1113 q 313 1075 287 1082 q 362 1068 339 1068 q 412 1075 385 1068 q 464 1097 438 1082 q 512 1135 489 1112 q 552 1190 535 1158 q 565 1182 558 1187 q 580 1170 573 1177 q 593 1157 587 1164 q 604 1144 600 1150 "},"ı":{"x_min":43,"x_max":385.203125,"ha":417,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 "},"ƚ":{"x_min":32.5,"x_max":450.515625,"ha":482,"o":"m 421 489 l 323 489 l 323 90 q 327 80 323 85 q 343 69 332 75 q 373 59 354 64 q 419 49 391 54 l 419 0 l 63 0 l 63 49 q 111 59 92 54 q 141 69 130 64 q 155 80 151 74 q 160 90 160 85 l 160 489 l 47 489 l 32 503 q 37 518 33 509 q 45 536 41 527 q 54 555 50 546 q 61 570 58 564 l 160 570 l 160 858 q 156 905 160 888 q 143 931 153 922 q 116 942 133 939 q 70 949 98 945 l 70 996 q 133 1006 103 1001 q 189 1017 162 1011 q 241 1032 215 1023 q 293 1051 266 1040 l 323 1023 l 323 570 l 435 570 l 450 553 l 421 489 "},"ä":{"x_min":44,"x_max":688.765625,"ha":694,"o":"m 279 98 q 306 101 291 98 q 337 112 320 104 q 375 133 354 120 q 422 169 396 147 l 422 319 q 353 306 381 312 q 306 292 325 299 q 275 278 287 286 q 255 262 264 271 q 226 224 237 244 q 216 175 216 204 q 222 137 216 152 q 238 113 228 122 q 259 101 248 105 q 279 98 270 98 m 688 76 q 629 39 660 56 q 571 8 598 21 q 520 -12 543 -5 q 486 -20 498 -20 q 443 8 460 -20 q 423 87 426 37 q 361 36 392 57 q 301 3 330 15 q 246 -14 273 -9 q 198 -20 220 -20 q 142 -10 170 -20 q 93 18 115 0 q 57 67 71 38 q 44 136 44 97 q 60 214 44 182 q 102 272 77 247 q 139 303 118 288 q 196 333 161 318 q 286 360 232 347 q 422 386 340 373 l 422 466 q 417 505 422 487 q 403 535 413 523 q 376 555 393 548 q 333 563 359 563 q 301 556 317 563 q 272 539 285 550 q 253 512 260 528 q 248 476 246 496 q 237 466 249 472 q 208 453 226 459 q 169 440 190 447 q 128 429 148 434 q 93 422 108 425 q 72 421 77 420 l 57 458 q 109 534 74 499 q 190 595 143 569 q 292 636 237 621 q 404 651 348 651 q 485 638 451 651 q 541 604 519 626 q 574 552 563 582 q 585 488 585 522 l 585 161 q 592 121 585 133 q 612 109 599 109 q 621 109 616 109 q 634 112 627 110 q 650 118 641 114 q 673 127 660 121 l 688 76 m 585 859 q 577 813 585 834 q 553 775 568 791 q 519 749 539 758 q 478 740 500 740 q 418 761 439 740 q 398 822 398 782 q 407 869 398 847 q 430 907 416 891 q 464 932 445 923 q 504 942 483 942 q 564 921 542 942 q 585 859 585 901 m 299 859 q 291 813 299 834 q 268 775 282 791 q 234 749 254 758 q 193 740 215 740 q 133 761 154 740 q 112 822 112 782 q 121 869 112 847 q 144 907 130 891 q 178 932 159 923 q 218 942 198 942 q 278 921 257 942 q 299 859 299 901 "},"Ǯ":{"x_min":61.140625,"x_max":695,"ha":751,"o":"m 695 295 q 680 205 695 247 q 639 129 665 163 q 578 66 613 94 q 503 20 543 39 q 419 -8 463 1 q 333 -19 375 -19 q 224 -6 274 -19 q 138 24 175 6 q 81 62 102 42 q 61 94 61 81 q 70 118 61 101 q 96 154 80 134 q 129 191 111 174 q 165 217 147 209 q 203 159 181 185 q 251 115 225 133 q 303 87 276 97 q 359 78 331 78 q 494 126 446 78 q 542 260 542 174 q 528 336 542 301 q 492 396 515 370 q 437 435 469 421 q 369 450 406 450 q 339 448 353 450 q 311 443 325 447 q 282 433 297 439 q 249 416 267 426 l 225 401 l 223 403 q 216 411 220 406 q 206 422 211 416 q 197 433 202 428 q 191 442 193 439 l 190 444 l 190 445 l 190 445 l 448 767 l 226 767 q 200 753 214 767 q 174 718 187 740 q 151 668 162 697 q 133 608 139 639 l 74 621 l 99 865 q 128 859 114 861 q 159 855 143 856 q 194 855 175 855 l 635 855 l 657 820 l 434 540 q 453 542 444 541 q 470 544 462 544 q 559 527 518 544 q 630 478 600 510 q 678 401 661 447 q 695 295 695 354 m 421 939 l 328 939 l 145 1196 q 163 1224 153 1210 q 184 1243 172 1237 l 375 1095 l 564 1243 q 588 1224 575 1237 q 609 1196 600 1210 l 421 939 "},"¹":{"x_min":58.671875,"x_max":434.90625,"ha":482,"o":"m 73 421 l 73 461 q 134 470 110 465 q 171 479 157 474 q 189 489 184 484 q 195 498 195 494 l 195 784 q 193 809 195 800 q 186 824 192 818 q 177 828 183 826 q 157 829 170 829 q 124 826 144 828 q 72 817 103 824 l 58 857 q 112 870 79 861 q 183 889 146 879 q 251 910 219 899 q 301 927 284 920 l 323 910 l 323 498 q 327 489 323 494 q 343 479 331 484 q 376 470 354 474 q 434 461 398 465 l 434 421 l 73 421 "},"W":{"x_min":13.5625,"x_max":1174.6875,"ha":1181,"o":"m 1174 805 q 1125 793 1144 799 q 1093 783 1105 788 q 1077 773 1082 778 q 1071 763 1072 768 l 916 40 q 901 15 912 26 q 873 -2 889 5 q 843 -13 858 -9 q 817 -20 827 -17 l 585 595 l 391 40 q 374 15 386 26 q 346 -1 362 5 q 314 -12 330 -8 q 283 -20 297 -17 l 107 758 q 82 785 103 774 q 13 805 61 796 l 13 855 l 345 855 l 345 805 q 293 797 311 802 q 267 785 275 791 q 258 772 259 779 q 258 758 257 765 l 374 261 l 572 855 l 640 855 l 867 261 l 976 763 q 970 777 978 771 q 948 788 963 783 q 914 797 934 793 q 872 805 895 801 l 872 855 l 1174 855 l 1174 805 "},"ỉ":{"x_min":43,"x_max":385.203125,"ha":417,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 m 347 904 q 335 871 347 885 q 307 844 323 856 q 274 820 290 831 q 250 797 258 809 q 245 772 241 785 q 272 742 248 759 q 259 735 267 738 q 241 728 250 731 q 223 723 232 725 q 210 721 215 721 q 151 756 165 740 q 140 787 136 773 q 160 813 144 801 q 196 838 177 826 q 230 864 215 851 q 245 894 245 878 q 237 926 245 917 q 215 936 229 936 q 193 925 201 936 q 184 904 184 915 q 191 885 184 896 q 147 870 174 877 q 88 860 120 863 l 81 867 q 79 881 79 873 q 92 920 79 900 q 127 954 105 939 q 177 979 148 970 q 237 989 206 989 q 287 982 267 989 q 321 963 308 975 q 341 936 335 951 q 347 904 347 921 "},"ɲ":{"x_min":-203.1875,"x_max":790.515625,"ha":806,"o":"m 447 0 l 447 49 q 517 71 497 62 q 538 90 538 81 l 538 399 q 534 461 538 436 q 522 500 530 485 q 500 521 514 515 q 466 528 486 528 q 431 523 449 528 q 391 508 413 519 q 342 479 369 498 q 284 433 316 461 l 284 70 q 269 -58 284 -5 q 233 -151 255 -112 q 182 -215 210 -189 q 128 -262 155 -241 q 87 -290 110 -277 q 39 -313 64 -303 q -7 -328 15 -323 q -47 -334 -30 -334 q -98 -327 -70 -334 q -148 -311 -125 -321 q -187 -291 -171 -302 q -203 -271 -203 -280 q -189 -246 -203 -262 q -156 -213 -175 -230 q -117 -182 -137 -196 q -86 -161 -98 -167 q -62 -183 -77 -172 q -32 -200 -48 -193 q 0 -212 -16 -208 q 31 -217 17 -217 q 63 -208 47 -217 q 91 -174 78 -200 q 112 -100 104 -148 q 121 29 121 -51 l 121 467 q 118 510 121 494 q 108 535 116 526 q 81 547 99 543 q 30 554 63 551 l 30 602 q 83 609 53 604 q 142 620 112 614 q 199 634 171 626 q 244 651 226 642 l 273 622 l 280 524 q 428 621 357 592 q 551 651 498 651 q 615 638 587 651 q 663 602 644 625 q 691 547 682 579 q 701 477 701 515 l 701 90 q 705 81 701 86 q 719 72 709 77 q 746 62 729 67 q 790 49 764 56 l 790 0 l 447 0 "},">":{"x_min":35.953125,"x_max":594.796875,"ha":631,"o":"m 594 430 q 589 410 592 421 q 582 388 586 399 q 575 366 579 377 q 569 347 571 355 l 57 163 l 35 185 q 41 204 37 192 q 47 229 44 216 q 55 254 51 242 q 61 272 59 266 l 417 401 l 52 532 l 35 562 q 70 593 50 575 q 107 624 89 611 l 573 457 l 594 430 "},"Ệ":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 456 -184 q 448 -230 456 -209 q 425 -268 439 -252 q 391 -294 411 -285 q 350 -304 372 -304 q 290 -283 311 -304 q 269 -221 269 -262 q 278 -174 269 -196 q 302 -136 287 -152 q 336 -111 316 -120 q 376 -102 355 -102 q 435 -122 414 -102 q 456 -184 456 -143 m 592 962 q 574 938 584 949 q 553 922 564 927 l 362 1032 l 173 922 q 152 938 162 927 q 132 962 142 949 l 322 1183 l 404 1183 l 592 962 "},"Ḃ":{"x_min":20.265625,"x_max":766,"ha":835,"o":"m 766 241 q 741 136 766 183 q 672 57 717 90 q 562 7 626 25 q 415 -10 497 -10 q 378 -9 400 -10 q 330 -8 356 -9 q 275 -7 303 -7 q 219 -5 246 -6 q 83 0 155 -2 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 790 q 72 784 96 787 q 29 777 48 780 l 20 834 q 92 848 50 841 q 179 861 133 856 q 271 871 225 867 q 358 875 318 875 q 498 862 437 875 q 602 826 559 849 q 668 768 645 802 q 691 691 691 734 q 651 566 691 618 q 536 490 612 514 q 629 459 586 482 q 701 404 671 437 q 749 329 732 371 q 766 241 766 288 m 383 433 q 331 430 352 433 q 292 424 311 427 l 292 86 q 295 77 292 81 q 339 66 315 69 q 390 63 363 63 q 538 107 488 63 q 588 228 588 151 q 578 302 588 265 q 544 367 568 338 q 481 415 520 397 q 383 433 442 433 m 316 803 l 304 803 q 292 802 298 803 l 292 502 l 304 502 q 414 515 372 502 q 479 551 455 529 q 510 601 502 573 q 519 658 519 629 q 509 719 519 692 q 475 764 499 746 q 412 793 451 783 q 316 803 373 803 m 485 1050 q 477 1003 485 1024 q 454 965 468 981 q 421 939 440 949 q 379 930 401 930 q 319 951 340 930 q 298 1012 298 972 q 307 1059 298 1037 q 331 1097 316 1081 q 365 1122 345 1113 q 405 1132 384 1132 q 464 1111 443 1132 q 485 1050 485 1091 "},"Ŵ":{"x_min":13.5625,"x_max":1174.6875,"ha":1181,"o":"m 1174 805 q 1125 793 1144 799 q 1093 783 1105 788 q 1077 773 1082 778 q 1071 763 1072 768 l 916 40 q 901 15 912 26 q 873 -2 889 5 q 843 -13 858 -9 q 817 -20 827 -17 l 585 595 l 391 40 q 374 15 386 26 q 346 -1 362 5 q 314 -12 330 -8 q 283 -20 297 -17 l 107 758 q 82 785 103 774 q 13 805 61 796 l 13 855 l 345 855 l 345 805 q 293 797 311 802 q 267 785 275 791 q 258 772 259 779 q 258 758 257 765 l 374 261 l 572 855 l 640 855 l 867 261 l 976 763 q 970 777 978 771 q 948 788 963 783 q 914 797 934 793 q 872 805 895 801 l 872 855 l 1174 855 l 1174 805 m 823 962 q 805 938 815 949 q 784 922 795 927 l 593 1032 l 404 922 q 382 938 392 927 q 363 962 373 949 l 552 1183 l 635 1183 l 823 962 "},"Ð":{"x_min":18.90625,"x_max":828,"ha":884,"o":"m 828 458 q 810 306 828 373 q 763 188 793 240 q 693 102 733 137 q 608 43 653 66 q 514 10 562 21 q 419 0 465 0 l 29 0 l 29 49 q 98 70 75 58 q 122 90 122 81 l 122 417 l 33 417 l 18 433 q 23 446 20 437 q 29 465 26 455 q 36 483 33 475 q 41 498 39 492 l 122 498 l 122 784 l 29 771 l 20 834 q 99 849 53 842 q 195 863 145 857 q 296 871 246 868 q 391 875 347 875 q 577 846 495 875 q 714 765 658 818 q 798 634 769 711 q 828 458 828 556 m 343 803 q 318 802 331 803 q 292 802 305 802 l 292 498 l 455 498 l 472 482 l 447 417 l 292 417 l 292 113 q 293 104 292 108 q 300 90 295 96 q 317 81 305 85 q 347 75 328 77 q 394 73 366 73 q 449 81 420 73 q 506 109 477 90 q 559 157 534 128 q 603 226 585 186 q 634 317 622 266 q 646 432 646 368 q 626 591 646 522 q 568 707 606 660 q 473 778 530 754 q 343 803 417 803 "},"r":{"x_min":32.5625,"x_max":597.515625,"ha":617,"o":"m 593 621 q 597 604 597 618 q 594 568 597 589 q 585 521 591 547 q 574 471 580 496 q 561 426 568 447 q 549 393 554 405 l 499 393 q 491 444 497 420 q 476 487 485 469 q 454 515 467 504 q 424 526 440 526 q 395 520 411 526 q 361 501 379 515 q 324 459 343 486 q 284 387 305 432 l 284 90 q 313 69 284 80 q 404 49 341 59 l 404 0 l 32 0 l 32 49 q 122 90 122 69 l 122 450 q 120 487 122 472 q 117 512 119 503 q 112 527 115 522 q 106 536 109 533 q 96 544 101 541 q 83 549 91 547 q 63 552 75 551 q 32 554 51 553 l 32 602 q 97 612 69 607 q 148 622 124 617 q 194 634 172 627 q 246 651 217 641 l 274 622 l 283 524 q 324 573 301 550 q 374 614 347 596 q 428 641 400 631 q 486 651 457 651 q 540 643 512 651 q 593 621 568 635 "},"Ø":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 633 516 641 473 q 612 600 626 560 l 289 156 q 355 94 318 116 q 434 72 392 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 209 434 q 216 340 209 386 q 237 256 224 295 l 561 700 q 493 763 531 740 q 409 787 454 787 q 322 762 360 787 q 259 693 285 738 q 221 583 234 648 q 209 434 209 517 m 715 741 q 787 601 763 680 q 812 438 812 522 q 797 319 812 377 q 755 210 782 261 q 691 117 728 159 q 608 44 654 74 q 512 -3 563 13 q 405 -20 460 -20 q 298 -3 348 -20 q 208 43 248 12 l 175 -1 q 154 -11 169 -6 q 122 -22 139 -17 q 89 -31 105 -27 q 64 -36 73 -34 l 43 -11 l 133 113 q 62 251 87 174 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 279 837 205 800 q 444 875 354 875 q 552 858 503 875 q 642 813 601 842 l 674 857 q 698 868 684 862 q 728 878 712 873 q 759 886 744 883 q 784 891 774 889 l 806 865 l 715 741 "},"ǐ":{"x_min":-19,"x_max":445.59375,"ha":417,"o":"m 43 0 l 43 49 q 110 70 88 59 q 132 90 132 81 l 132 439 q 131 495 132 474 q 122 528 130 516 q 96 545 115 540 q 43 554 78 551 l 43 602 q 153 622 101 610 q 251 651 205 634 l 295 651 l 295 90 q 315 70 295 82 q 385 49 335 59 l 385 0 l 43 0 m 257 722 l 164 722 l -19 979 q -1 1007 -10 993 q 20 1026 8 1020 l 211 878 l 400 1026 q 423 1007 411 1020 q 445 979 436 993 l 257 722 "},"Ỳ":{"x_min":-0.46875,"x_max":828.078125,"ha":851,"o":"m 233 0 l 233 49 q 284 62 264 55 q 317 75 305 69 q 334 87 329 81 q 340 98 340 93 l 340 358 q 285 470 315 412 q 223 581 254 527 q 162 681 192 635 q 108 759 132 727 q 95 773 102 766 q 77 783 89 779 q 48 789 66 787 q 2 792 30 792 l 0 841 q 44 848 19 844 q 95 854 70 851 q 142 858 120 856 q 178 861 164 861 q 216 852 197 861 q 247 829 235 844 q 299 752 272 795 q 355 660 327 709 q 410 560 383 611 q 461 460 437 509 l 619 760 q 613 788 630 778 q 544 805 596 798 l 544 855 l 828 855 l 828 805 q 759 787 781 796 q 727 760 737 777 l 510 354 l 510 98 q 514 88 510 94 q 531 76 519 82 q 564 62 543 69 q 617 49 585 55 l 617 0 l 233 0 m 555 962 q 536 938 545 949 q 514 922 526 927 l 189 1080 l 196 1123 q 216 1139 201 1128 q 249 1162 231 1150 q 284 1183 267 1173 q 307 1198 300 1193 l 555 962 "},"Ẽ":{"x_min":29.15625,"x_max":697.890625,"ha":730,"o":"m 697 205 q 691 144 695 176 q 684 83 688 112 q 676 32 680 54 q 670 0 672 10 l 29 0 l 29 49 q 98 70 75 59 q 122 90 122 81 l 122 763 q 100 783 122 771 q 29 805 78 795 l 29 855 l 626 855 l 653 833 q 649 788 652 815 q 642 734 647 762 q 634 681 638 706 q 626 644 630 656 l 575 644 q 558 740 571 707 q 519 774 544 774 l 291 774 l 291 499 l 561 499 l 583 475 q 570 453 578 465 q 554 428 562 440 q 537 405 545 416 q 521 389 529 395 q 499 406 511 399 q 472 418 487 413 q 436 424 457 422 q 387 427 415 427 l 291 427 l 291 124 q 296 106 291 114 q 316 92 301 98 q 358 84 330 87 q 430 81 385 81 l 497 81 q 550 88 528 81 q 589 112 572 95 q 620 156 606 129 q 648 223 634 183 l 697 205 m 630 1123 q 600 1063 618 1096 q 560 1001 583 1030 q 511 954 538 973 q 452 935 483 935 q 396 946 423 935 q 345 970 370 957 q 295 994 320 983 q 244 1005 270 1005 q 217 1000 229 1005 q 193 985 204 994 q 171 961 182 975 q 147 928 160 946 l 96 946 q 126 1007 109 974 q 166 1069 143 1040 q 215 1117 188 1098 q 274 1137 242 1137 q 333 1126 305 1137 q 386 1102 361 1115 q 435 1078 412 1089 q 480 1067 458 1067 q 533 1085 510 1067 q 578 1144 555 1104 l 630 1123 "},"÷":{"x_min":35.953125,"x_max":549.359375,"ha":585,"o":"m 365 220 q 358 183 365 200 q 341 152 352 165 q 315 131 330 139 q 283 124 300 124 q 238 141 252 124 q 225 192 225 159 q 231 229 225 211 q 249 259 237 246 q 274 279 260 272 q 306 287 289 287 q 365 220 365 287 m 365 573 q 358 536 365 553 q 341 505 352 519 q 315 484 330 492 q 283 477 300 477 q 238 494 252 477 q 225 544 225 512 q 231 581 225 564 q 249 612 237 599 q 274 632 260 625 q 306 640 289 640 q 365 573 365 640 m 549 408 q 543 391 547 401 q 534 369 539 380 q 525 348 529 358 q 518 333 520 338 l 57 333 l 35 354 q 41 371 37 361 q 50 392 45 381 q 59 413 54 403 q 67 430 63 423 l 526 430 l 549 408 "},"h":{"x_min":33,"x_max":792.21875,"ha":807,"o":"m 449 0 l 449 49 q 518 71 498 62 q 539 90 539 81 l 539 388 q 534 457 539 430 q 521 499 530 483 q 497 521 511 515 q 462 528 482 528 q 381 503 423 528 q 285 433 339 479 l 285 90 q 308 69 285 80 q 375 49 331 59 l 375 0 l 33 0 l 33 49 q 99 70 77 61 q 122 90 122 79 l 122 859 q 120 904 122 888 q 110 928 118 920 q 83 941 101 937 q 33 949 65 945 l 33 996 q 101 1007 70 1002 q 156 1019 131 1013 q 206 1033 182 1025 q 255 1051 230 1040 l 285 1023 l 285 530 q 431 622 363 594 q 552 651 499 651 q 608 641 581 651 q 656 612 635 632 q 689 558 676 591 q 702 477 702 524 l 702 90 q 706 81 702 86 q 720 72 710 77 q 748 62 730 67 q 792 49 765 56 l 792 0 l 449 0 "},"ṃ":{"x_min":32.484375,"x_max":1157.625,"ha":1172,"o":"m 820 0 l 820 49 q 860 61 844 55 q 884 72 875 67 q 895 81 892 77 q 899 90 899 86 l 899 408 q 894 475 899 449 q 881 512 890 500 q 859 529 873 525 q 827 534 846 534 q 758 512 798 534 q 674 449 718 491 l 674 90 q 677 81 674 86 q 689 72 680 77 q 716 62 699 67 q 759 49 733 56 l 759 0 l 431 0 l 431 49 q 471 61 456 55 q 495 72 487 67 q 507 81 504 77 q 511 90 511 86 l 511 408 q 507 475 511 449 q 496 512 504 500 q 476 529 488 525 q 444 534 463 534 q 374 513 413 534 q 285 449 335 493 l 285 90 q 305 69 285 80 q 369 49 325 58 l 369 0 l 32 0 l 32 49 q 99 70 77 61 q 122 90 122 79 l 122 467 q 120 509 122 494 q 110 534 118 525 q 83 546 101 542 q 32 554 65 550 l 32 602 q 96 610 67 606 q 150 621 124 615 q 198 635 175 627 q 246 651 221 642 l 274 622 l 282 538 q 352 593 320 571 q 413 628 384 615 q 467 645 441 640 q 517 651 493 651 q 575 642 550 651 q 618 620 600 634 q 646 588 635 606 q 661 547 657 569 l 663 538 q 734 593 701 571 q 795 627 766 614 q 850 645 824 640 q 901 651 876 651 q 962 641 933 651 q 1014 612 992 632 q 1049 558 1036 591 q 1062 477 1062 524 l 1062 90 q 1083 72 1062 81 q 1157 49 1104 63 l 1157 0 l 820 0 m 687 -184 q 678 -230 687 -209 q 656 -268 670 -252 q 622 -294 641 -285 q 581 -304 603 -304 q 521 -283 541 -304 q 500 -221 500 -262 q 509 -174 500 -196 q 532 -136 518 -152 q 566 -111 547 -120 q 607 -102 586 -102 q 666 -122 645 -102 q 687 -184 687 -143 "},"f":{"x_min":25.296875,"x_max":604.046875,"ha":472,"o":"m 604 985 q 597 968 604 978 q 580 945 591 957 q 557 921 570 933 q 532 899 545 909 q 509 881 520 889 q 492 870 498 873 q 429 928 459 910 q 376 946 398 946 q 343 935 359 946 q 315 895 327 924 q 295 817 302 867 q 288 689 288 767 l 288 631 l 456 631 l 481 606 q 466 582 475 594 q 448 557 457 569 q 430 536 439 546 q 415 522 421 527 q 371 538 399 530 q 288 546 342 546 l 288 89 q 294 81 288 85 q 316 72 300 77 q 358 62 332 68 q 425 49 384 56 l 425 0 l 35 0 l 35 49 q 103 69 82 57 q 125 89 125 81 l 125 546 l 44 546 l 25 570 l 78 631 l 125 631 l 125 652 q 132 752 125 707 q 155 835 140 798 q 191 902 169 872 q 239 958 212 932 q 291 999 264 982 q 344 1028 318 1017 q 395 1045 370 1040 q 440 1051 420 1051 q 500 1042 471 1051 q 552 1024 530 1034 q 589 1002 575 1013 q 604 985 604 992 "},"“":{"x_min":52,"x_max":636.828125,"ha":686,"o":"m 310 651 q 293 638 306 645 q 260 622 279 630 q 220 606 242 614 q 179 592 199 598 q 144 582 160 586 q 120 580 128 579 q 68 639 85 605 q 52 717 52 672 q 65 792 52 754 q 100 866 78 831 q 153 931 123 901 q 215 983 183 961 l 259 949 q 218 874 234 916 q 203 788 203 833 q 228 727 203 751 q 300 702 253 703 l 310 651 m 636 651 q 619 638 632 645 q 586 622 605 630 q 546 606 568 614 q 505 592 525 598 q 470 582 486 586 q 446 580 454 579 q 394 639 411 605 q 378 717 378 672 q 391 792 378 754 q 426 866 404 831 q 479 931 449 901 q 541 983 508 961 l 585 949 q 544 874 560 916 q 529 788 529 833 q 553 727 529 751 q 625 702 578 703 l 636 651 "},"Ǘ":{"x_min":29.078125,"x_max":889.59375,"ha":928,"o":"m 889 805 q 819 784 843 795 q 796 763 796 772 l 796 355 q 771 197 796 266 q 701 79 746 127 q 595 5 657 30 q 461 -20 534 -20 q 329 0 391 -20 q 221 58 268 18 q 148 158 175 98 q 122 301 122 218 l 122 763 q 99 783 122 771 q 29 805 77 795 l 29 855 l 385 855 l 385 805 q 315 784 339 795 q 292 763 292 772 l 292 345 q 303 230 292 280 q 339 146 314 180 q 405 95 364 112 q 503 78 445 78 q 584 99 551 78 q 638 157 617 121 q 667 240 658 193 q 677 337 677 287 l 677 763 q 654 783 677 771 q 584 805 632 795 l 584 855 l 889 855 l 889 805 m 705 1050 q 697 1003 705 1024 q 673 965 688 981 q 639 939 659 949 q 598 930 620 930 q 539 951 559 930 q 518 1012 518 972 q 527 1059 518 1037 q 550 1097 536 1081 q 584 1122 565 1113 q 624 1132 603 1132 q 684 1111 662 1132 q 705 1050 705 1091 m 419 1050 q 411 1003 419 1024 q 388 965 402 981 q 354 939 374 949 q 313 930 335 930 q 253 951 274 930 q 232 1012 232 972 q 241 1059 232 1037 q 264 1097 250 1081 q 298 1122 279 1113 q 338 1132 318 1132 q 398 1111 377 1132 q 419 1050 419 1091 m 379 1144 q 355 1163 368 1149 q 333 1189 343 1177 l 581 1420 q 615 1401 596 1412 q 652 1379 634 1389 q 682 1359 669 1368 q 701 1344 696 1349 l 708 1309 l 379 1144 "},"̇":{"x_min":-443,"x_max":-256,"ha":0,"o":"m -256 859 q -264 813 -256 834 q -287 775 -273 791 q -320 749 -301 758 q -362 740 -340 740 q -422 761 -401 740 q -443 822 -443 782 q -434 869 -443 847 q -410 907 -425 891 q -376 932 -396 923 q -336 942 -357 942 q -277 921 -298 942 q -256 859 -256 901 "},"A":{"x_min":0,"x_max":858.625,"ha":873,"o":"m 506 373 l 394 688 l 293 373 l 506 373 m 265 292 l 200 95 q 217 65 193 74 q 296 49 240 55 l 296 0 l 0 0 l 0 49 q 70 66 46 57 q 102 95 95 75 l 339 818 q 374 843 355 831 q 412 864 392 855 q 452 880 432 873 q 489 893 472 887 l 774 95 q 783 78 777 86 q 798 65 788 71 q 822 56 807 60 q 858 49 836 52 l 858 0 l 521 0 l 521 49 q 593 63 574 52 q 604 95 611 73 l 535 292 l 265 292 "},"Ɓ":{"x_min":16,"x_max":957,"ha":1027,"o":"m 663 765 q 639 781 653 774 q 606 792 626 788 q 556 799 586 797 q 484 803 526 802 l 484 502 l 496 502 q 607 515 565 502 q 672 551 649 529 q 702 601 695 573 q 710 658 710 629 q 698 718 710 691 q 663 765 687 744 m 575 430 q 527 427 549 430 q 484 421 504 424 l 484 90 q 489 80 484 87 q 581 63 528 63 q 729 107 679 63 q 780 228 780 151 q 770 302 780 265 q 736 366 760 338 q 673 412 712 395 q 575 430 634 430 m 16 659 q 44 749 16 709 q 131 817 72 789 q 280 860 190 845 q 496 875 371 875 q 601 871 554 875 q 687 861 649 868 q 756 843 726 854 q 810 816 786 832 q 861 763 841 795 q 882 691 882 730 q 843 568 882 618 q 727 490 805 517 q 821 457 779 480 q 893 402 864 435 q 940 329 923 370 q 957 241 957 288 q 933 137 957 183 q 864 57 909 90 q 753 7 818 25 q 606 -10 688 -10 q 568 -9 591 -10 q 519 -8 545 -9 q 463 -7 493 -7 q 406 -5 434 -6 q 265 0 339 -2 l 220 0 l 220 49 q 290 70 266 59 q 314 90 314 81 l 314 790 q 221 753 255 778 q 188 687 188 728 q 203 634 188 658 q 239 600 218 609 q 217 585 237 596 q 171 563 197 575 q 118 542 144 552 q 78 529 92 532 q 54 547 66 535 q 34 577 43 560 q 21 616 26 595 q 16 659 16 637 "},"Ṩ":{"x_min":69.75,"x_max":656,"ha":712,"o":"m 656 255 q 646 193 656 225 q 619 130 637 161 q 573 72 601 100 q 508 24 545 45 q 423 -7 470 4 q 318 -20 376 -20 q 262 -15 294 -20 q 198 -2 231 -10 q 134 18 165 6 q 79 46 102 30 q 73 59 75 47 q 70 89 71 71 q 69 130 69 107 q 71 176 70 152 q 76 221 73 199 q 84 260 79 243 l 132 257 q 169 184 147 217 q 220 127 192 150 q 279 90 247 103 q 345 77 311 77 q 404 85 376 77 q 454 111 433 94 q 489 152 476 127 q 503 209 503 177 q 484 281 503 251 q 436 334 466 311 q 368 377 406 358 q 289 414 329 396 q 211 454 249 433 q 142 502 172 474 q 94 565 112 529 q 76 651 76 601 q 93 722 76 683 q 149 794 111 761 q 245 851 186 828 q 386 875 304 875 q 457 870 422 875 q 523 857 493 865 q 577 837 554 849 q 613 812 600 826 q 614 800 616 809 q 608 778 613 790 q 597 750 604 765 q 582 721 590 735 q 567 697 575 708 q 554 681 560 686 l 510 685 q 475 739 495 717 q 435 773 456 760 q 392 791 414 786 q 351 797 370 797 q 294 788 318 797 q 254 764 270 779 q 232 730 239 749 q 225 693 225 712 q 243 636 225 661 q 292 590 262 611 q 361 550 322 569 q 440 510 399 531 q 519 466 481 490 q 588 413 558 443 q 637 344 618 383 q 656 255 656 306 m 456 -184 q 447 -230 456 -209 q 424 -268 439 -252 q 391 -294 410 -285 q 350 -304 371 -304 q 289 -283 310 -304 q 269 -221 269 -262 q 277 -174 269 -196 q 301 -136 286 -152 q 335 -111 316 -120 q 375 -102 354 -102 q 435 -122 413 -102 q 456 -184 456 -143 m 456 1050 q 447 1003 456 1024 q 424 965 439 981 q 391 939 410 949 q 350 930 371 930 q 289 951 310 930 q 269 1012 269 972 q 277 1059 269 1037 q 301 1097 286 1081 q 335 1122 316 1113 q 375 1132 354 1132 q 435 1111 413 1132 q 456 1050 456 1091 "},"O":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 624 562 641 496 q 577 677 607 627 q 504 757 546 727 q 409 787 461 787 q 323 762 360 787 q 260 693 285 738 q 221 583 234 648 q 209 435 209 517 q 226 292 209 359 q 275 177 244 226 q 347 100 306 128 q 435 72 388 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 812 439 q 797 319 812 377 q 755 210 782 262 q 691 117 728 159 q 608 44 654 74 q 511 -3 563 13 q 405 -20 460 -20 q 251 15 319 -20 q 135 112 182 51 q 62 251 87 172 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 280 837 205 800 q 444 875 355 875 q 602 838 534 875 q 717 740 670 801 q 788 600 764 679 q 812 439 812 521 "},"Đ":{"x_min":18.90625,"x_max":828,"ha":884,"o":"m 828 458 q 810 306 828 373 q 763 188 793 240 q 693 102 733 137 q 608 43 653 66 q 514 10 562 21 q 419 0 465 0 l 29 0 l 29 49 q 98 70 75 58 q 122 90 122 81 l 122 417 l 33 417 l 18 433 q 23 446 20 437 q 29 465 26 455 q 36 483 33 475 q 41 498 39 492 l 122 498 l 122 784 l 29 771 l 20 834 q 99 849 53 842 q 195 863 145 857 q 296 871 246 868 q 391 875 347 875 q 577 846 495 875 q 714 765 658 818 q 798 634 769 711 q 828 458 828 556 m 343 803 q 318 802 331 803 q 292 802 305 802 l 292 498 l 455 498 l 472 482 l 447 417 l 292 417 l 292 113 q 293 104 292 108 q 300 90 295 96 q 317 81 305 85 q 347 75 328 77 q 394 73 366 73 q 449 81 420 73 q 506 109 477 90 q 559 157 534 128 q 603 226 585 186 q 634 317 622 266 q 646 432 646 368 q 626 591 646 522 q 568 707 606 660 q 473 778 530 754 q 343 803 417 803 "},"3":{"x_min":52.28125,"x_max":621,"ha":703,"o":"m 621 258 q 599 150 621 201 q 536 62 577 100 q 438 2 495 24 q 312 -20 381 -20 q 253 -13 285 -20 q 185 6 220 -7 q 117 41 151 20 q 52 91 82 62 l 80 157 q 138 118 110 134 q 191 92 166 102 q 242 78 217 82 q 293 74 267 74 q 353 84 324 74 q 401 115 381 94 q 434 167 422 135 q 447 242 447 198 q 432 320 447 288 q 395 371 417 352 q 346 399 372 391 q 298 408 321 408 l 283 408 q 271 407 277 408 q 259 406 266 406 q 242 403 252 405 l 230 464 q 323 501 288 480 q 377 546 358 522 q 402 593 396 569 q 408 637 408 616 q 403 683 408 661 q 387 723 398 705 q 358 751 376 740 q 315 762 340 762 q 281 753 296 762 q 255 729 265 744 q 241 693 245 714 q 244 650 238 673 q 212 634 230 641 q 174 620 194 627 q 134 609 154 614 q 94 603 113 604 l 71 644 q 92 707 71 673 q 150 769 112 740 q 239 818 187 798 q 353 838 291 838 q 459 821 415 838 q 529 778 502 805 q 569 718 556 751 q 582 650 582 684 q 571 597 582 624 q 542 547 561 571 q 496 503 523 523 q 438 473 470 484 q 513 451 479 469 q 570 403 547 432 q 607 337 594 374 q 621 258 621 300 "},"Ǿ":{"x_min":37,"x_max":812,"ha":864,"o":"m 641 427 q 633 516 641 473 q 612 600 626 560 l 289 156 q 355 94 318 116 q 434 72 392 72 q 517 93 479 72 q 582 159 555 115 q 625 270 609 204 q 641 427 641 337 m 209 434 q 216 340 209 386 q 237 256 224 295 l 561 700 q 493 763 531 740 q 409 787 454 787 q 322 762 360 787 q 259 693 285 738 q 221 583 234 648 q 209 434 209 517 m 715 741 q 787 601 763 680 q 812 438 812 522 q 797 319 812 377 q 755 210 782 261 q 691 117 728 159 q 608 44 654 74 q 512 -3 563 13 q 405 -20 460 -20 q 298 -3 348 -20 q 208 43 248 12 l 175 -1 q 154 -11 169 -6 q 122 -22 139 -17 q 89 -31 105 -27 q 64 -36 73 -34 l 43 -11 l 133 113 q 62 251 87 174 q 37 415 37 329 q 67 590 37 507 q 151 737 97 674 q 279 837 205 800 q 444 875 354 875 q 552 858 503 875 q 642 813 601 842 l 674 857 q 698 868 684 862 q 728 878 712 873 q 759 886 744 883 q 784 891 774 889 l 806 865 l 715 741 m 335 922 q 311 941 324 927 q 289 967 299 954 l 537 1198 q 571 1178 552 1189 q 608 1157 590 1167 q 638 1137 625 1146 q 657 1122 652 1127 l 663 1086 l 335 922 "},"4":{"x_min":37.703125,"x_max":649.484375,"ha":703,"o":"m 387 664 l 170 322 l 387 322 l 387 664 m 649 301 q 615 259 635 279 q 580 227 595 238 l 543 227 l 543 90 q 547 80 543 85 q 561 71 551 76 q 591 60 572 66 q 637 49 609 55 l 637 0 l 244 0 l 244 49 q 316 63 288 56 q 359 75 344 69 q 381 86 375 81 q 387 98 387 92 l 387 227 l 65 227 l 37 254 l 363 791 q 399 803 380 796 q 439 817 419 810 q 479 831 460 824 q 513 844 498 838 l 543 815 l 543 322 l 631 322 l 649 301 "},"Ǝ":{"x_min":39.34375,"x_max":697.890625,"ha":739,"o":"m 66 0 l 39 22 q 42 51 40 33 q 48 91 44 70 q 55 136 51 113 q 64 179 60 158 q 72 216 68 200 q 78 241 75 232 l 129 241 q 133 181 130 210 q 140 129 135 152 q 153 94 145 107 q 173 81 161 81 l 299 81 q 369 83 342 81 q 411 92 396 86 q 430 107 425 97 q 435 130 435 117 l 435 424 l 297 424 q 261 422 282 424 q 219 419 240 421 q 180 415 198 417 q 150 410 161 413 l 132 429 q 148 453 138 438 q 169 483 158 468 q 191 511 181 498 q 210 530 202 524 q 232 514 220 520 q 259 505 244 508 q 295 501 274 502 q 344 501 316 501 l 435 501 l 435 774 l 285 774 q 233 769 254 774 q 196 752 212 765 q 168 716 181 740 q 141 652 155 691 l 92 669 q 98 727 94 698 q 104 781 101 757 q 111 825 108 806 q 118 855 115 844 l 697 855 l 697 805 q 628 784 651 795 q 604 764 604 773 l 604 91 q 627 71 604 83 q 697 49 649 59 l 697 0 l 66 0 "},"Ẁ":{"x_min":13.5625,"x_max":1174.6875,"ha":1181,"o":"m 1174 805 q 1125 793 1144 799 q 1093 783 1105 788 q 1077 773 1082 778 q 1071 763 1072 768 l 916 40 q 901 15 912 26 q 873 -2 889 5 q 843 -13 858 -9 q 817 -20 827 -17 l 585 595 l 391 40 q 374 15 386 26 q 346 -1 362 5 q 314 -12 330 -8 q 283 -20 297 -17 l 107 758 q 82 785 103 774 q 13 805 61 796 l 13 855 l 345 855 l 345 805 q 293 797 311 802 q 267 785 275 791 q 258 772 259 779 q 258 758 257 765 l 374 261 l 572 855 l 640 855 l 867 261 l 976 763 q 970 777 978 771 q 948 788 963 783 q 914 797 934 793 q 872 805 895 801 l 872 855 l 1174 855 l 1174 805 m 724 962 q 705 938 714 949 q 683 922 695 927 l 358 1080 l 365 1123 q 385 1139 370 1128 q 418 1162 400 1150 q 453 1183 436 1173 q 476 1198 469 1193 l 724 962 "},"Ť":{"x_min":1.765625,"x_max":780.8125,"ha":806,"o":"m 203 0 l 203 49 q 254 62 234 55 q 287 75 275 69 q 304 87 299 82 q 309 98 309 93 l 309 774 l 136 774 q 117 766 126 774 q 98 742 108 759 q 77 698 89 725 q 51 631 66 670 l 1 649 q 6 697 3 669 q 13 754 9 724 q 21 810 17 783 q 28 855 25 837 l 755 855 l 780 833 q 777 791 780 815 q 771 739 775 766 q 763 685 767 712 q 755 638 759 659 l 704 638 q 692 694 697 669 q 683 737 688 720 q 669 764 677 754 q 646 774 660 774 l 479 774 l 479 98 q 483 88 479 94 q 500 76 488 82 q 533 62 512 69 q 585 49 554 55 l 585 0 l 203 0 m 437 939 l 344 939 l 160 1162 q 179 1186 169 1175 q 200 1204 189 1197 l 392 1076 l 580 1204 q 601 1186 592 1197 q 619 1162 611 1175 l 437 939 "},"ơ":{"x_min":44,"x_max":818,"ha":819,"o":"m 514 298 q 502 400 514 352 q 471 485 491 448 q 422 544 451 522 q 358 566 393 566 q 289 547 316 566 q 245 495 261 528 q 222 418 228 463 q 216 320 216 373 q 228 220 216 267 q 262 139 241 174 q 311 84 283 104 q 371 65 339 65 q 438 80 411 65 q 482 125 465 96 q 506 199 499 155 q 514 298 514 242 m 818 706 q 774 611 818 663 q 637 509 730 559 q 672 425 660 471 q 685 329 685 380 q 672 240 685 283 q 638 158 660 196 q 585 86 616 119 q 518 30 555 53 q 439 -6 481 6 q 351 -20 396 -20 q 225 4 282 -20 q 128 71 168 28 q 66 173 88 114 q 44 301 44 232 q 68 431 44 368 q 138 543 93 494 q 243 621 182 592 q 378 651 305 651 q 498 629 444 651 q 592 568 552 607 q 630 613 621 591 q 640 652 640 635 q 627 689 640 671 q 595 722 614 706 l 772 802 q 804 761 791 787 q 818 706 818 734 "},"꞉":{"x_min":58,"x_max":280,"ha":331,"o":"m 280 488 q 270 439 280 461 q 243 402 260 417 q 204 379 227 387 q 156 372 181 372 q 118 377 136 372 q 87 393 100 382 q 65 421 73 404 q 58 463 58 439 q 68 512 58 490 q 95 548 78 533 q 135 571 112 563 q 182 580 158 580 q 219 574 201 580 q 250 557 236 569 q 271 529 263 546 q 280 488 280 512 m 280 160 q 270 111 280 133 q 243 74 260 89 q 204 51 227 59 q 156 44 181 44 q 118 49 136 44 q 87 65 100 54 q 65 93 73 76 q 58 135 58 111 q 68 184 58 162 q 95 220 78 205 q 135 243 112 235 q 182 252 158 252 q 219 246 201 252 q 250 229 236 241 q 271 201 263 218 q 280 160 280 184 "}},"cssFontWeight":"bold","ascender":1214,"underlinePosition":-250,"cssFontStyle":"normal","boundingBox":{"yMin":-497,"xMin":-698.5625,"yMax":1496.453125,"xMax":1453},"resolution":1000,"original_font_information":{"postscript_name":"Gentilis-Bold","version_string":"Version 1.100","vendor_url":"http://scripts.sil.org/","full_font_name":"Gentilis Bold","font_family_name":"Gentilis","copyright":"Copyright (c) SIL International, 2003-2008.","description":"","trademark":"Gentium is a trademark of SIL International.","designer":"J. Victor Gaultney and Annie Olsen","designer_url":"http://www.sil.org/~gaultney","unique_font_identifier":"SIL International:Gentilis Bold:2-3-108","license_url":"http://scripts.sil.org/OFL","license_description":"Copyright (c) 2003-2008, SIL International (http://www.sil.org/) with Reserved Font Names \"Gentium\" and \"SIL\".\r\n\r\nThis Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL\r\n\r\n\r\n-----------------------------------------------------------\r\nSIL OPEN FONT LICENSE Version 1.1 - 26 February 2007\r\n-----------------------------------------------------------\r\n\r\nPREAMBLE\r\nThe goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.\r\n\r\nThe OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.\r\n\r\nDEFINITIONS\r\n\"Font Software\" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.\r\n\r\n\"Reserved Font Name\" refers to any names specified as such after the copyright statement(s).\r\n\r\n\"Original Version\" refers to the collection of Font Software components as distributed by the Copyright Holder(s).\r\n\r\n\"Modified Version\" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.\r\n\r\n\"Author\" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.\r\n\r\nPERMISSION & CONDITIONS\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:\r\n\r\n1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.\r\n\r\n2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.\r\n\r\n3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.\r\n\r\n4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.\r\n\r\n5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.\r\n\r\nTERMINATION\r\nThis license becomes null and void if any of the above conditions are not met.\r\n\r\nDISCLAIMER\r\nTHE FONT SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.","manufacturer_name":"SIL International","font_sub_family_name":"Bold"},"descender":-394,"familyName":"Gentilis","lineHeight":1607,"underlineThickness":100} \ No newline at end of file diff --git a/node_modules/three/examples/fonts/gentilis_regular.typeface.json b/node_modules/three/examples/fonts/gentilis_regular.typeface.json new file mode 100644 index 0000000..606e52d --- /dev/null +++ b/node_modules/three/examples/fonts/gentilis_regular.typeface.json @@ -0,0 +1 @@ +{"glyphs":{"ợ":{"x_min":54,"x_max":746,"ha":746,"o":"m 539 308 q 521 410 539 362 q 475 495 503 458 q 412 554 448 532 q 342 576 377 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 225 134 197 170 q 289 76 254 97 q 355 55 323 55 q 437 72 403 55 q 494 124 472 90 q 528 203 517 157 q 539 308 539 250 m 746 707 q 738 670 746 690 q 713 626 731 649 q 665 577 695 602 q 590 527 635 551 q 630 436 616 486 q 644 329 644 386 q 632 240 644 283 q 600 158 620 197 q 551 86 580 119 q 489 30 523 53 q 416 -6 454 6 q 336 -20 377 -20 q 219 4 271 -20 q 130 71 167 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 206 600 172 576 q 280 637 241 623 q 362 651 320 651 q 474 628 424 651 q 561 564 525 605 q 613 611 597 588 q 629 652 629 634 q 618 689 629 671 q 589 722 608 707 l 710 777 q 736 744 726 762 q 746 707 746 726 m 431 -189 q 425 -225 431 -208 q 408 -254 418 -242 q 383 -274 397 -267 q 352 -282 369 -282 q 308 -265 321 -282 q 295 -217 295 -248 q 301 -181 295 -198 q 318 -151 307 -164 q 343 -132 329 -139 q 373 -125 357 -125 q 431 -189 431 -125 "},"Ẩ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 620 957 q 607 938 612 944 q 591 927 602 932 l 405 1068 l 221 927 q 212 932 216 929 q 205 938 208 935 q 199 946 202 941 q 191 957 196 951 l 370 1167 l 442 1167 l 620 957 m 520 1392 q 508 1359 520 1374 q 478 1331 495 1344 q 445 1306 461 1318 q 422 1281 429 1294 q 421 1255 414 1269 q 456 1225 427 1242 q 435 1217 446 1218 q 414 1214 424 1215 q 369 1241 384 1229 q 351 1265 354 1254 q 355 1285 348 1275 q 373 1304 361 1294 q 398 1321 384 1313 q 425 1340 413 1330 q 446 1360 437 1349 q 454 1382 454 1370 q 441 1421 454 1408 q 409 1434 428 1434 q 390 1430 399 1434 q 376 1420 382 1426 q 366 1407 370 1414 q 363 1392 363 1399 q 364 1385 363 1388 q 368 1378 366 1381 q 354 1373 363 1376 q 336 1369 346 1371 q 317 1365 326 1367 q 301 1363 307 1363 l 293 1370 l 293 1379 q 306 1411 293 1395 q 339 1439 319 1426 q 383 1459 359 1451 q 431 1467 408 1467 q 497 1446 474 1467 q 520 1392 520 1426 "},"ǻ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 390 843 q 386 874 390 859 q 375 900 382 889 q 356 918 367 911 q 332 925 346 925 q 305 919 318 925 q 282 903 292 913 q 266 877 273 892 q 260 844 260 862 q 264 814 260 828 q 276 788 268 799 q 294 770 283 777 q 319 764 305 764 q 345 769 332 764 q 368 784 358 774 q 384 808 378 794 q 390 843 390 823 m 451 871 q 438 807 451 836 q 404 757 425 778 q 356 723 382 735 q 304 712 330 712 q 262 720 281 712 q 229 742 243 728 q 207 775 215 756 q 199 816 199 794 q 213 880 199 851 q 247 931 226 910 q 294 965 268 953 q 346 977 320 977 q 387 968 368 977 q 421 945 407 960 q 443 911 435 930 q 451 871 451 892 m 296 1008 q 274 1015 284 1010 q 257 1027 265 1021 l 416 1308 q 437 1306 424 1307 q 465 1302 451 1304 q 493 1297 480 1300 q 514 1292 507 1294 l 530 1266 l 296 1008 "},"ʉ":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 320 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 281 l 217 281 l 217 226 q 224 146 217 178 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 m 692 281 l 621 281 l 621 172 q 624 103 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 42 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 20 186 -2 q 128 84 141 44 q 115 189 115 125 l 115 281 l 43 281 l 27 295 q 34 318 30 306 q 43 342 37 331 l 115 342 l 115 481 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 612 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 342 l 519 342 l 519 481 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 342 l 692 342 l 707 325 l 692 281 "},"Ổ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 631 957 q 618 938 623 944 q 602 927 613 932 l 416 1068 l 232 927 q 223 932 227 929 q 216 938 219 935 q 210 946 213 941 q 202 957 206 951 l 381 1167 l 453 1167 l 631 957 m 531 1392 q 518 1359 531 1374 q 489 1331 506 1344 q 456 1306 472 1318 q 433 1281 440 1294 q 432 1255 425 1269 q 467 1225 438 1242 q 446 1217 457 1218 q 425 1214 435 1215 q 380 1241 394 1229 q 362 1265 365 1254 q 366 1285 359 1275 q 384 1304 372 1294 q 409 1321 395 1313 q 436 1340 424 1330 q 456 1360 448 1349 q 465 1382 465 1370 q 452 1421 465 1408 q 420 1434 439 1434 q 401 1430 409 1434 q 386 1420 393 1426 q 377 1407 380 1414 q 374 1392 374 1399 q 375 1385 374 1388 q 379 1378 377 1381 q 365 1373 374 1376 q 347 1369 357 1371 q 328 1365 337 1367 q 311 1363 318 1363 l 304 1370 l 304 1379 q 317 1411 304 1395 q 350 1439 330 1426 q 394 1459 370 1451 q 442 1467 418 1467 q 508 1446 485 1467 q 531 1392 531 1426 "},"Ừ":{"x_min":33.65625,"x_max":950.125,"ha":950,"o":"m 950 944 q 941 904 950 927 q 912 856 933 881 q 855 802 891 830 q 767 749 820 775 l 767 355 q 745 196 767 266 q 682 79 723 127 q 583 5 642 30 q 451 -20 525 -20 q 323 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 376 76 332 95 q 478 58 420 58 q 564 81 526 58 q 627 142 601 104 q 665 229 652 180 q 679 327 679 277 l 679 783 q 654 804 679 791 q 580 825 629 816 l 580 855 l 821 855 q 833 889 833 873 q 823 926 833 909 q 794 959 813 944 l 914 1014 q 940 981 930 999 q 950 944 950 963 m 579 957 q 564 938 569 944 q 548 927 559 931 l 230 1092 l 236 1122 q 251 1134 240 1128 q 274 1148 261 1141 q 297 1162 286 1156 q 316 1173 309 1168 l 579 957 "},"̂":{"x_min":-563.609375,"x_max":-134.28125,"ha":0,"o":"m -134 740 q -147 721 -142 727 q -163 710 -151 715 l -349 891 l -533 710 q -542 715 -538 712 q -549 721 -545 718 q -555 729 -552 724 q -563 740 -558 734 l -384 998 l -311 998 l -134 740 "},"Á":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 316 927 q 300 938 305 931 q 286 957 295 944 l 548 1173 q 567 1162 555 1168 q 590 1148 578 1156 q 613 1134 602 1141 q 628 1122 623 1128 l 634 1092 l 316 927 "},"ṑ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 598 868 q 594 851 597 861 q 586 831 590 841 q 578 812 582 822 q 572 797 575 803 l 155 797 l 140 813 q 145 830 141 821 q 152 850 148 840 q 160 869 156 859 q 168 885 164 878 l 583 885 l 598 868 m 440 975 q 422 962 431 967 q 402 954 413 957 l 163 1210 l 178 1237 q 198 1242 185 1239 q 226 1247 211 1244 q 255 1251 240 1250 q 277 1254 269 1253 l 440 975 "},"Ȯ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 485 1045 q 479 1009 485 1026 q 462 980 473 992 q 437 960 452 967 q 406 953 423 953 q 362 969 375 953 q 349 1018 349 986 q 355 1053 349 1036 q 372 1083 361 1070 q 397 1102 383 1095 q 427 1110 411 1110 q 485 1045 485 1110 "},"ĥ":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 543 496 549 470 q 528 537 538 522 q 500 557 517 552 q 462 563 484 563 q 411 550 438 563 q 353 514 383 538 q 293 455 324 491 q 234 372 263 419 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 880 q 129 924 132 908 q 117 949 127 940 q 88 961 107 958 q 37 969 69 965 l 37 996 q 88 1007 65 1002 q 132 1019 112 1013 q 170 1033 152 1025 q 208 1051 189 1040 l 234 1027 l 233 463 q 298 541 262 507 q 370 600 334 576 q 440 638 406 625 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 m 605 1127 q 592 1108 597 1114 q 576 1096 588 1102 l 390 1237 l 206 1096 q 197 1102 201 1099 q 190 1108 193 1104 q 184 1116 187 1111 q 176 1127 181 1121 l 355 1336 l 427 1336 l 605 1127 "},"»":{"x_min":94.953125,"x_max":619.890625,"ha":674,"o":"m 619 291 l 375 12 l 345 32 l 502 316 l 346 598 l 375 619 l 618 341 l 619 291 m 368 291 l 124 12 l 94 32 l 251 316 l 95 598 l 124 619 l 367 341 l 368 291 "},"Ḻ":{"x_min":33.65625,"x_max":640.484375,"ha":661,"o":"m 640 165 q 626 63 635 106 q 612 0 618 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 111 q 246 89 241 99 q 266 74 252 80 q 305 64 281 67 q 367 61 329 61 l 464 61 q 516 64 495 61 q 554 79 538 67 q 583 114 570 91 q 611 177 597 137 l 640 165 m 566 -155 q 561 -172 564 -162 q 554 -192 558 -182 q 546 -211 550 -201 q 539 -227 542 -220 l 122 -227 l 107 -210 q 112 -193 109 -202 q 120 -173 115 -183 q 128 -154 124 -164 q 135 -139 132 -145 l 551 -139 l 566 -155 "},"∆":{"x_min":40.015625,"x_max":741.96875,"ha":796,"o":"m 597 112 q 512 335 554 226 q 475 432 494 382 q 437 531 456 482 q 402 626 419 581 q 370 711 385 672 q 337 619 355 668 q 301 520 320 570 q 265 421 283 470 q 230 326 247 371 q 151 112 191 219 q 145 92 146 99 q 151 82 144 85 q 175 78 158 79 q 225 78 192 78 l 522 78 q 573 78 555 78 q 597 82 590 79 q 603 92 604 85 q 597 112 602 99 m 727 0 l 50 0 l 40 34 q 157 347 101 196 q 206 480 181 412 q 255 613 231 548 q 299 736 278 678 q 336 838 320 794 q 374 869 352 855 q 415 893 397 883 q 456 779 432 842 q 505 646 479 716 q 559 504 532 576 q 613 364 587 431 q 741 34 675 204 l 727 0 "},"ṟ":{"x_min":-46.125,"x_max":528.015625,"ha":550,"o":"m 522 625 q 528 602 528 621 q 522 556 527 582 q 509 503 517 530 q 493 458 501 476 l 463 458 q 452 504 459 485 q 435 534 444 523 q 413 550 425 545 q 388 556 401 556 q 353 543 373 556 q 312 504 333 530 q 270 435 291 477 q 234 336 250 393 l 234 70 q 259 49 234 60 q 348 29 284 38 l 348 0 l 37 0 l 37 29 q 106 49 81 39 q 132 70 132 59 l 132 465 q 130 502 132 487 q 127 527 129 518 q 122 542 125 537 q 116 551 119 547 q 105 559 111 556 q 90 564 100 562 q 68 567 81 566 q 37 569 56 568 l 37 596 q 123 620 81 608 q 200 651 166 632 l 224 627 l 233 473 q 272 543 250 510 q 318 599 293 575 q 369 637 342 623 q 425 651 396 651 q 472 645 446 651 q 522 625 497 640 m 412 -155 q 407 -172 411 -162 q 400 -192 404 -182 q 392 -211 396 -201 q 385 -227 388 -220 l -31 -227 l -46 -210 q -41 -193 -44 -202 q -33 -173 -37 -183 q -25 -154 -29 -164 q -18 -139 -21 -145 l 397 -139 l 412 -155 "},"ỹ":{"x_min":-31.875,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 369 -55 q 306 -184 341 -130 q 233 -272 271 -237 q 158 -322 196 -306 q 86 -339 120 -339 q 38 -335 60 -339 q 1 -327 16 -332 q -23 -315 -14 -322 q -31 -303 -31 -309 q -23 -286 -31 -298 q -3 -259 -15 -274 q 22 -231 8 -245 q 47 -211 36 -218 q 112 -231 80 -230 q 169 -223 144 -233 q 198 -204 181 -219 q 230 -168 214 -189 q 263 -118 247 -146 q 291 -62 279 -91 l 311 -15 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 123 l 522 555 q 523 573 525 565 q 511 585 520 580 q 485 594 502 590 q 444 601 469 597 l 444 631 l 670 631 l 670 601 m 590 912 q 561 857 578 884 q 523 808 544 830 q 478 773 503 787 q 427 760 454 760 q 382 771 404 760 q 341 798 361 783 q 300 825 320 813 q 261 837 280 837 q 211 814 234 837 q 164 755 189 792 l 128 768 q 157 823 140 796 q 194 873 173 851 q 239 908 215 894 q 290 922 263 922 q 339 910 316 922 q 382 883 362 898 q 421 856 402 868 q 455 845 439 845 q 506 866 481 845 q 554 928 531 888 l 590 912 "},"«":{"x_min":54.265625,"x_max":579.203125,"ha":674,"o":"m 54 291 l 54 315 q 54 332 54 324 q 55 341 54 339 l 299 619 l 327 598 l 320 586 q 303 554 314 574 q 278 508 292 534 q 248 457 263 483 q 220 405 233 430 q 195 360 206 379 q 177 328 184 340 q 171 316 170 316 l 328 32 l 299 12 l 54 291 m 305 291 l 305 315 q 305 332 305 324 q 306 341 305 339 l 550 619 l 578 598 l 571 586 q 554 554 564 574 q 529 508 543 534 q 499 457 514 483 q 471 405 484 430 q 446 360 457 379 q 428 328 435 340 q 422 316 421 316 l 579 32 l 550 12 l 305 291 "},"ử":{"x_min":27.515625,"x_max":851,"ha":851,"o":"m 851 707 q 840 662 851 688 q 803 608 830 637 q 733 549 777 579 q 621 491 688 519 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 683 71 l 725 55 q 676 25 699 39 q 634 1 653 11 q 599 -14 614 -8 q 576 -20 584 -20 q 537 11 552 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 20 186 -2 q 128 84 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 609 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 531 519 513 q 502 559 512 549 q 473 574 492 570 q 424 579 455 578 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 625 l 620 538 q 672 568 650 553 q 707 599 693 584 q 727 627 721 614 q 734 652 734 641 q 723 689 734 671 q 694 722 713 707 l 815 777 q 841 744 831 762 q 851 707 851 726 m 483 904 q 471 871 483 886 q 441 843 458 856 q 409 817 425 829 q 385 793 393 806 q 384 767 378 780 q 419 736 391 753 q 398 728 409 730 q 377 726 388 727 q 332 753 347 740 q 315 776 318 765 q 318 797 312 787 q 336 815 325 806 q 362 833 348 824 q 388 851 376 842 q 409 871 401 861 q 417 894 417 882 q 405 933 417 920 q 372 946 392 946 q 354 942 362 946 q 339 932 345 938 q 330 918 333 926 q 326 903 326 911 q 328 896 326 900 q 332 889 330 893 q 318 885 326 887 q 299 880 309 882 q 280 877 290 878 q 264 874 271 875 l 256 882 l 256 891 q 269 922 256 907 q 302 950 282 938 q 347 971 322 963 q 395 979 371 979 q 460 958 437 979 q 483 904 483 938 "},"í":{"x_min":47.046875,"x_max":398.109375,"ha":376,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 m 164 710 q 142 717 151 712 q 125 729 132 722 l 284 1010 q 305 1007 292 1009 q 333 1003 318 1005 q 361 999 347 1001 q 382 994 375 996 l 398 967 l 164 710 "},"ʠ":{"x_min":54,"x_max":876.25,"ha":716,"o":"m 505 494 q 441 554 482 533 q 352 576 401 576 q 279 560 314 576 q 216 512 244 544 q 172 433 189 480 q 156 322 156 385 q 172 217 156 264 q 214 137 189 170 q 271 85 240 103 q 330 68 302 68 q 375 77 353 68 q 419 102 397 86 q 462 137 441 117 q 505 177 484 156 l 505 494 m 876 965 q 866 949 876 959 q 843 927 856 938 q 814 906 829 916 q 790 892 800 896 q 761 930 775 915 q 734 953 748 944 q 710 964 721 961 q 689 968 698 968 q 652 957 667 968 q 626 920 636 946 q 611 853 616 895 q 607 750 607 811 l 607 -254 q 628 -276 607 -265 q 701 -296 649 -287 l 701 -326 l 389 -326 l 389 -296 q 479 -276 453 -287 q 505 -254 505 -266 l 505 112 q 454 56 479 81 q 402 15 429 32 q 346 -10 375 -1 q 281 -20 316 -20 q 203 2 243 -20 q 130 65 163 24 q 75 166 96 106 q 54 301 54 226 q 72 411 54 360 q 119 500 91 461 q 178 566 146 539 q 233 606 209 593 q 309 639 271 627 q 373 651 347 651 q 436 643 405 651 q 505 608 468 635 l 505 712 q 510 811 505 770 q 528 885 516 853 q 560 941 541 916 q 606 988 579 965 q 677 1035 640 1019 q 741 1051 715 1051 q 795 1039 771 1051 q 838 1014 820 1028 q 866 985 856 999 q 876 965 876 971 "},"ǜ":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 572 854 q 566 818 572 835 q 550 789 560 801 q 525 769 539 776 q 494 762 511 762 q 450 778 463 762 q 436 826 436 795 q 443 862 436 845 q 460 892 449 879 q 484 911 470 904 q 515 919 498 919 q 572 854 572 919 m 301 854 q 295 818 301 835 q 279 789 289 801 q 254 769 268 776 q 223 762 240 762 q 179 778 192 762 q 165 826 165 795 q 172 862 165 845 q 189 892 178 879 q 213 911 199 904 q 244 919 227 919 q 301 854 301 919 m 446 975 q 429 962 438 967 q 408 954 420 957 l 170 1210 l 185 1237 q 205 1242 191 1239 q 232 1247 218 1244 q 261 1251 247 1250 q 284 1254 276 1253 l 446 975 "},"ṥ":{"x_min":64.5,"x_max":474.078125,"ha":536,"o":"m 474 192 q 460 109 474 144 q 425 51 446 75 q 377 13 403 28 q 325 -7 350 0 q 276 -17 299 -15 q 241 -20 254 -20 q 163 -7 208 -20 q 72 29 117 4 q 65 51 67 31 q 64 97 63 71 q 68 150 65 123 q 77 192 72 176 l 106 185 q 120 131 107 156 q 157 88 134 106 q 209 58 179 69 q 275 48 239 48 q 319 55 299 48 q 354 77 340 63 q 377 111 369 91 q 386 154 386 130 q 371 202 386 181 q 333 240 356 223 q 279 273 309 258 q 218 304 249 288 q 163 335 189 319 q 116 371 137 351 q 83 417 96 392 q 71 474 71 442 q 87 549 71 516 q 132 604 104 582 q 196 639 160 627 q 271 651 233 651 q 317 647 292 651 q 367 636 343 643 q 414 620 392 629 q 449 598 435 611 q 450 580 453 594 q 440 549 447 566 q 426 517 434 532 q 415 497 419 502 l 389 502 q 321 570 356 551 q 254 590 287 590 q 214 582 231 590 q 184 563 196 575 q 165 537 171 551 q 159 508 159 522 q 171 469 159 486 q 205 437 184 452 q 253 408 226 421 q 308 379 280 394 q 367 347 337 364 q 420 308 396 330 q 459 258 444 286 q 474 192 474 230 m 240 710 q 218 717 227 712 q 201 729 208 722 l 360 1010 q 381 1007 368 1009 q 409 1003 394 1005 q 437 999 423 1001 q 458 994 451 996 l 474 967 l 240 710 m 337 1098 q 331 1063 337 1079 q 314 1033 325 1046 q 289 1013 304 1021 q 258 1006 275 1006 q 214 1023 228 1006 q 201 1071 201 1040 q 207 1106 201 1090 q 224 1136 213 1123 q 249 1156 235 1148 q 279 1163 263 1163 q 337 1098 337 1163 "},"µ":{"x_min":41.515625,"x_max":736.125,"ha":750,"o":"m 736 55 q 694 29 715 42 q 652 4 672 15 q 614 -13 631 -6 q 585 -21 597 -21 q 560 -9 571 -21 q 543 21 550 2 q 533 67 537 41 q 529 122 529 92 q 422 14 474 50 q 332 -21 371 -21 q 253 6 292 -21 q 185 82 214 34 l 185 78 q 192 -55 184 3 q 213 -159 199 -114 q 243 -237 226 -205 q 278 -290 261 -269 q 251 -300 268 -294 q 215 -314 234 -307 q 180 -328 196 -321 q 155 -339 163 -334 l 129 -319 l 129 495 q 127 537 129 522 q 117 560 125 552 q 91 572 108 568 q 41 579 73 575 l 41 606 q 90 615 67 611 q 131 624 112 619 q 169 635 151 629 q 205 651 187 641 l 207 647 q 215 639 211 644 q 223 630 219 635 q 231 621 228 625 l 231 248 q 239 196 231 224 q 264 145 248 169 q 303 105 280 121 q 354 89 326 89 q 392 92 373 89 q 433 106 411 95 q 478 138 454 118 q 529 194 501 159 l 529 507 q 526 533 529 518 q 520 563 524 548 q 512 591 516 578 q 503 610 508 604 q 564 628 533 618 q 622 651 595 639 l 641 624 q 635 582 639 606 q 631 514 632 557 l 631 181 q 637 92 631 118 q 657 67 643 67 q 689 72 672 67 q 729 86 706 77 l 736 55 "},"ỳ":{"x_min":-31.875,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 369 -55 q 306 -184 341 -130 q 233 -272 271 -237 q 158 -322 196 -306 q 86 -339 120 -339 q 38 -335 60 -339 q 1 -327 16 -332 q -23 -315 -14 -322 q -31 -303 -31 -309 q -23 -286 -31 -298 q -3 -259 -15 -274 q 22 -231 8 -245 q 47 -211 36 -218 q 112 -231 80 -230 q 169 -223 144 -233 q 198 -204 181 -219 q 230 -168 214 -189 q 263 -118 247 -146 q 291 -62 279 -91 l 311 -15 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 123 l 522 555 q 523 573 525 565 q 511 585 520 580 q 485 594 502 590 q 444 601 469 597 l 444 631 l 670 631 l 670 601 m 436 731 q 419 718 427 722 q 398 710 410 713 l 160 965 l 174 993 q 194 998 181 995 q 222 1003 208 1000 q 251 1007 237 1005 q 274 1010 265 1009 l 436 731 "},"Ḟ":{"x_min":33.65625,"x_max":608.59375,"ha":664,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 587 855 l 608 838 q 605 799 607 820 q 598 757 602 778 q 590 717 595 736 q 582 685 586 698 l 550 685 q 545 737 548 716 q 534 771 541 758 q 517 788 527 783 q 494 794 507 794 l 241 794 l 241 499 l 494 499 l 514 480 q 500 459 508 470 q 483 438 491 448 q 465 418 474 427 q 450 404 457 410 q 428 421 440 414 q 402 433 417 428 q 366 439 386 437 q 316 442 345 442 l 241 442 l 241 70 q 267 52 241 62 q 359 29 293 42 l 359 0 l 33 0 m 389 1045 q 382 1009 389 1026 q 366 980 376 992 q 341 960 355 967 q 310 953 327 953 q 266 969 279 953 q 253 1018 253 986 q 259 1053 253 1036 q 276 1083 265 1070 q 301 1102 287 1095 q 331 1110 314 1110 q 389 1045 389 1110 "},"M":{"x_min":40.6875,"x_max":1064.8125,"ha":1120,"o":"m 1051 825 q 1007 819 1031 825 q 959 801 983 812 l 966 70 q 991 50 966 62 q 1064 29 1015 38 l 1064 0 l 756 0 l 756 29 q 831 49 802 38 q 861 70 861 61 l 855 705 l 558 0 l 524 0 l 223 700 l 217 70 q 241 50 217 62 q 315 29 266 38 l 315 0 l 40 0 l 40 29 q 113 49 87 38 q 139 70 139 61 l 145 798 q 93 819 120 813 q 47 825 67 825 l 47 855 l 241 855 q 252 852 248 855 q 262 844 257 850 q 271 827 266 838 q 284 798 276 816 l 554 185 l 813 798 q 828 829 822 818 q 837 846 833 841 q 846 853 842 852 q 857 855 851 855 l 1051 855 l 1051 825 "},"Ḏ":{"x_min":27.5625,"x_max":761,"ha":823,"o":"m 307 818 q 241 816 273 818 l 241 104 q 248 80 241 89 q 284 62 257 68 q 364 57 311 57 q 460 79 411 57 q 551 148 510 102 q 619 265 593 195 q 646 432 646 336 q 623 593 646 522 q 558 715 601 665 q 451 791 515 765 q 307 818 388 818 m 761 458 q 743 306 761 373 q 697 188 726 240 q 629 102 668 137 q 548 43 591 66 q 462 10 506 21 q 378 0 418 0 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 805 q 80 799 104 802 q 33 792 56 795 l 27 834 q 96 849 57 842 q 178 863 135 857 q 266 871 222 868 q 350 875 310 875 q 521 846 445 875 q 650 765 596 818 q 732 634 703 711 q 761 458 761 556 m 602 -155 q 597 -172 600 -162 q 590 -192 594 -182 q 582 -211 585 -201 q 575 -227 578 -220 l 158 -227 l 143 -210 q 148 -193 145 -202 q 155 -173 151 -183 q 164 -154 160 -164 q 171 -139 168 -145 l 587 -139 l 602 -155 "},"ũ":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 600 912 q 571 857 588 884 q 534 808 554 830 q 489 773 513 787 q 438 760 464 760 q 393 771 414 760 q 351 798 371 783 q 310 825 330 813 q 271 837 290 837 q 221 814 244 837 q 174 755 199 792 l 138 768 q 167 823 150 796 q 204 873 183 851 q 249 908 225 894 q 300 922 274 922 q 349 910 326 922 q 392 883 372 898 q 431 856 413 868 q 465 845 449 845 q 516 866 491 845 q 564 928 541 888 l 600 912 "},"ŭ":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 590 922 q 544 829 569 867 q 490 768 518 792 q 432 735 462 745 q 371 725 401 725 q 306 735 337 725 q 247 768 275 745 q 194 829 219 792 q 149 922 169 867 q 165 941 157 934 q 185 953 173 947 q 224 887 202 914 q 270 845 246 861 q 320 822 295 829 q 368 815 345 815 q 418 822 392 815 q 468 845 444 829 q 515 887 493 861 q 554 953 537 914 q 573 941 565 947 q 590 922 581 934 "},"{":{"x_min":69.578125,"x_max":440.796875,"ha":467,"o":"m 440 1053 q 391 1015 414 1036 q 351 969 368 994 q 325 914 334 943 q 316 848 316 884 q 320 784 316 809 q 330 737 324 759 q 339 690 335 715 q 344 625 344 665 q 335 569 344 597 q 311 518 327 542 q 273 474 295 494 q 222 442 250 454 q 279 421 255 436 q 316 382 302 406 q 337 329 331 359 q 344 260 344 298 q 339 191 344 220 q 330 138 335 163 q 320 87 324 112 q 316 28 316 62 q 321 -37 316 -8 q 339 -89 326 -66 q 375 -132 352 -112 q 434 -172 398 -152 l 418 -214 q 320 -165 361 -190 q 253 -108 279 -140 q 215 -38 227 -77 q 203 48 203 0 q 207 114 203 88 q 217 164 211 140 q 226 216 222 188 q 231 285 231 243 q 203 369 231 340 q 125 397 176 397 l 110 397 q 103 396 106 397 q 95 395 100 396 q 81 393 91 394 l 69 429 q 190 492 149 450 q 231 585 231 534 q 228 631 231 612 q 223 667 226 651 q 217 697 220 683 q 210 726 213 711 q 205 762 207 742 q 203 810 203 782 q 218 896 203 855 q 262 970 233 936 q 331 1033 290 1004 q 423 1085 372 1061 l 440 1053 "},"¼":{"x_min":54.28125,"x_max":759.546875,"ha":814,"o":"m 644 332 l 507 153 l 644 153 l 644 332 m 759 142 q 744 124 751 132 q 729 111 737 116 l 708 111 l 708 39 q 709 34 708 36 q 715 30 710 32 q 730 25 720 27 q 755 19 739 22 l 755 0 l 569 0 l 569 19 q 608 26 593 23 q 631 31 623 29 q 641 37 639 34 q 644 42 644 39 l 644 111 l 455 111 l 442 121 l 632 381 q 665 393 648 387 q 694 405 682 399 l 708 393 l 708 153 l 749 153 l 759 142 m 66 432 l 66 455 q 114 461 95 458 q 144 469 133 465 q 158 477 154 473 q 163 484 163 481 l 163 732 q 162 753 163 746 q 156 764 161 760 q 148 768 153 766 q 131 769 142 769 q 104 766 121 768 q 62 760 87 764 l 54 782 q 92 793 69 786 q 138 807 115 800 q 183 823 162 815 q 217 838 205 831 l 231 826 l 231 484 q 234 477 231 481 q 247 469 237 473 q 274 461 256 465 q 320 455 292 458 l 320 432 l 66 432 m 214 2 q 184 -10 198 -5 q 151 -20 169 -15 l 134 0 l 651 816 q 680 828 664 821 q 711 838 696 834 l 727 819 l 214 2 "},"Ḿ":{"x_min":40.6875,"x_max":1064.8125,"ha":1120,"o":"m 1051 825 q 1007 819 1031 825 q 959 801 983 812 l 966 70 q 991 50 966 62 q 1064 29 1015 38 l 1064 0 l 756 0 l 756 29 q 831 49 802 38 q 861 70 861 61 l 855 705 l 558 0 l 524 0 l 223 700 l 217 70 q 241 50 217 62 q 315 29 266 38 l 315 0 l 40 0 l 40 29 q 113 49 87 38 q 139 70 139 61 l 145 798 q 93 819 120 813 q 47 825 67 825 l 47 855 l 241 855 q 252 852 248 855 q 262 844 257 850 q 271 827 266 838 q 284 798 276 816 l 554 185 l 813 798 q 828 829 822 818 q 837 846 833 841 q 846 853 842 852 q 857 855 851 855 l 1051 855 l 1051 825 m 463 927 q 446 938 451 931 q 432 957 441 944 l 695 1173 q 713 1162 701 1168 q 737 1148 725 1156 q 759 1134 749 1141 q 775 1122 769 1128 l 781 1092 l 463 927 "},"IJ":{"x_min":47.65625,"x_max":790.046875,"ha":838,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 m 790 825 q 717 804 743 816 q 691 783 691 793 l 691 139 q 680 4 691 58 q 650 -86 669 -49 q 607 -149 631 -124 q 556 -195 582 -173 q 515 -222 537 -210 q 471 -241 493 -233 q 429 -253 449 -249 q 396 -258 409 -258 q 355 -251 375 -258 q 319 -236 335 -245 q 294 -219 303 -228 q 284 -204 284 -210 q 293 -188 284 -198 q 314 -168 301 -178 q 339 -148 326 -158 q 362 -136 353 -139 q 396 -156 381 -148 q 422 -168 410 -164 q 446 -173 434 -172 q 470 -175 457 -175 q 507 -163 487 -175 q 544 -122 527 -151 q 571 -41 561 -92 q 582 89 582 10 l 582 783 q 577 792 582 787 q 557 802 571 797 q 516 813 542 808 q 450 825 491 819 l 450 855 l 790 855 l 790 825 "},"Ê":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 554 957 q 541 938 546 944 q 525 927 537 932 l 339 1068 l 156 927 q 146 932 150 929 q 140 938 143 935 q 133 946 137 941 q 125 957 130 951 l 304 1167 l 377 1167 l 554 957 "},")":{"x_min":27.65625,"x_max":359,"ha":440,"o":"m 359 450 q 336 234 359 338 q 273 42 314 129 q 175 -111 233 -45 q 48 -214 118 -177 l 27 -183 q 110 -87 71 -146 q 179 51 149 -27 q 226 225 209 129 q 244 430 244 321 q 229 622 244 528 q 188 798 215 716 q 120 946 160 880 q 27 1054 79 1012 l 48 1085 q 183 986 125 1050 q 280 840 241 923 q 339 657 319 756 q 359 450 359 557 "},"Ṽ":{"x_min":13.5625,"x_max":874.90625,"ha":903,"o":"m 874 825 q 802 808 828 817 q 769 781 776 800 l 510 40 q 491 14 504 25 q 462 -2 478 4 q 432 -13 446 -9 q 408 -20 417 -17 l 109 781 q 79 809 103 798 q 13 825 56 820 l 13 855 l 308 855 l 308 825 q 234 811 254 821 q 221 782 214 802 l 461 138 l 689 781 q 672 809 696 800 q 592 825 648 819 l 592 855 l 874 855 l 874 825 m 682 1103 q 653 1047 670 1075 q 615 998 636 1020 q 570 963 594 977 q 519 950 545 950 q 474 961 495 950 q 432 988 453 973 q 392 1015 412 1003 q 352 1027 372 1027 q 303 1005 325 1027 q 255 945 280 982 l 219 958 q 248 1013 231 986 q 286 1063 265 1041 q 331 1098 307 1084 q 381 1112 355 1112 q 430 1100 407 1112 q 474 1073 453 1088 q 512 1046 494 1058 q 547 1035 531 1035 q 597 1056 573 1035 q 645 1118 622 1078 l 682 1103 "},"a":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 "},"Ɲ":{"x_min":-166.421875,"x_max":867.34375,"ha":901,"o":"m 769 -20 q 716 -6 735 -16 q 689 14 697 2 l 213 673 l 213 139 q 206 4 213 58 q 185 -86 199 -49 q 151 -149 171 -124 q 105 -195 132 -173 q 64 -221 87 -209 q 20 -241 42 -232 q -21 -253 -1 -249 q -54 -258 -41 -258 q -95 -251 -74 -258 q -131 -236 -115 -245 q -156 -219 -146 -228 q -166 -204 -166 -210 q -157 -188 -166 -198 q -136 -168 -148 -178 q -110 -148 -124 -158 q -87 -136 -97 -139 q -54 -156 -68 -148 q -28 -168 -40 -164 q -4 -173 -15 -172 q 19 -175 6 -175 q 57 -163 37 -175 q 93 -122 77 -151 q 121 -41 110 -92 q 132 89 132 10 l 132 779 q 84 810 108 800 q 33 825 60 821 l 33 855 l 177 855 q 194 853 187 855 q 206 846 200 851 q 221 830 213 840 q 242 802 229 819 l 688 187 l 688 783 q 665 805 688 791 q 589 825 643 818 l 589 855 l 867 855 l 867 825 q 793 806 818 819 q 769 783 769 793 l 769 -20 "},"Z":{"x_min":40.015625,"x_max":672.125,"ha":726,"o":"m 672 198 q 669 150 670 177 q 667 97 668 124 q 665 45 666 70 q 663 0 664 19 l 59 0 l 40 30 l 522 787 l 210 787 q 187 779 200 787 q 162 755 174 772 q 139 714 149 739 q 120 653 128 688 l 82 661 l 101 865 q 135 859 120 861 q 165 855 150 856 q 195 855 179 855 l 648 855 l 665 825 l 187 68 l 541 68 q 567 74 556 68 q 589 96 579 80 q 611 139 600 112 q 634 208 621 166 l 672 198 "},"":{"x_min":54,"x_max":885,"ha":715,"o":"m 330 68 q 375 77 353 68 q 419 102 397 86 q 462 137 441 117 q 505 177 484 156 l 505 494 q 441 554 482 533 q 352 576 401 576 q 279 560 314 576 q 216 512 244 544 q 172 433 189 480 q 156 322 156 385 q 172 217 156 264 q 214 137 189 170 q 271 85 240 103 q 330 68 302 68 m 505 112 q 454 57 479 81 q 402 15 429 32 q 345 -10 375 -1 q 281 -20 316 -20 q 203 2 243 -20 q 130 65 163 24 q 75 166 96 106 q 54 301 54 226 q 73 411 54 360 q 119 500 92 461 q 178 566 146 539 q 233 606 209 593 q 309 639 271 628 q 373 651 347 651 q 410 648 391 651 q 447 639 428 646 q 486 620 466 632 q 530 587 507 608 q 551 602 540 594 q 572 619 562 610 q 591 636 582 627 q 607 651 600 644 l 628 630 q 617 589 621 611 q 610 543 613 569 q 607 486 607 516 l 607 -112 q 625 -232 607 -190 q 693 -275 644 -275 q 722 -268 708 -275 q 745 -252 735 -262 q 760 -230 755 -243 q 766 -205 766 -218 q 757 -178 766 -190 q 778 -162 763 -171 q 810 -147 793 -154 q 844 -136 827 -140 q 871 -133 861 -132 l 885 -161 q 865 -220 885 -188 q 812 -277 846 -251 q 735 -321 779 -303 q 643 -339 691 -339 q 575 -323 601 -339 q 532 -283 548 -308 q 511 -224 517 -257 q 505 -153 505 -190 l 505 112 "},"k":{"x_min":37.046875,"x_max":694.515625,"ha":695,"o":"m 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 878 q 128 926 132 909 q 114 952 124 943 q 84 963 103 960 q 37 969 66 966 l 37 996 q 129 1018 83 1006 q 208 1051 174 1031 l 234 1027 l 234 359 l 442 542 q 470 573 465 561 q 468 591 474 585 q 446 599 461 597 q 413 601 431 601 l 413 631 l 670 631 l 670 601 q 615 590 640 598 q 562 559 590 582 l 330 374 l 586 75 q 605 57 595 64 q 628 45 615 50 q 655 40 640 41 q 690 41 670 39 l 694 12 q 655 3 674 7 q 619 -1 636 0 q 589 -5 602 -4 q 569 -7 576 -7 q 523 1 541 -7 q 491 28 506 9 l 234 353 l 234 70 q 236 61 234 65 q 246 52 238 56 q 268 42 253 48 q 308 29 283 37 l 308 0 l 37 0 "},"Ù":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 579 957 q 564 938 569 944 q 548 927 559 931 l 230 1092 l 236 1122 q 251 1134 240 1128 q 274 1148 261 1141 q 297 1162 286 1156 q 316 1173 309 1168 l 579 957 "},"Ů":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 524 1060 q 520 1091 524 1076 q 508 1117 516 1106 q 490 1135 501 1128 q 466 1142 479 1142 q 439 1136 451 1142 q 416 1120 426 1130 q 400 1094 406 1109 q 394 1061 394 1079 q 398 1031 394 1045 q 410 1005 402 1016 q 428 987 417 994 q 452 981 439 981 q 479 986 466 981 q 502 1001 491 991 q 518 1026 512 1011 q 524 1060 524 1040 m 585 1088 q 572 1024 585 1053 q 537 974 559 995 q 490 940 516 952 q 438 929 464 929 q 396 937 415 929 q 362 959 376 945 q 341 992 349 973 q 333 1033 333 1011 q 346 1097 333 1068 q 380 1148 359 1127 q 427 1182 401 1170 q 480 1194 454 1194 q 521 1185 502 1194 q 554 1162 540 1177 q 577 1128 569 1147 q 585 1088 585 1109 "},"¢":{"x_min":71,"x_max":585.78125,"ha":652,"o":"m 174 417 q 185 331 174 370 q 216 263 196 292 q 263 215 236 234 q 322 186 290 195 l 322 654 q 264 631 291 648 q 217 585 238 614 q 185 514 197 556 q 174 417 174 473 m 383 -5 q 372 -14 376 -11 q 363 -19 367 -17 q 352 -23 358 -21 q 338 -28 347 -25 l 322 -11 l 322 87 q 228 110 273 89 q 148 170 183 131 q 92 266 113 209 q 71 397 71 323 q 89 509 71 456 q 141 604 108 562 q 220 675 174 646 q 322 719 267 705 l 322 822 q 335 832 331 829 q 342 836 339 835 q 350 839 345 838 q 365 844 355 841 l 383 829 l 383 730 q 399 731 391 730 q 416 731 407 731 q 462 727 438 731 q 507 716 485 723 q 546 699 528 709 q 576 677 564 690 q 574 654 577 669 q 564 623 570 639 q 551 592 558 607 q 537 568 543 576 l 513 574 q 497 598 507 585 q 470 622 486 611 q 433 643 454 634 q 383 656 411 652 l 383 177 q 417 179 401 177 q 453 189 433 180 q 497 215 472 197 q 559 264 522 233 l 585 237 q 523 169 551 196 q 471 125 495 142 q 426 100 447 108 q 383 89 404 92 l 383 -5 "},"Ɂ":{"x_min":27,"x_max":604,"ha":645,"o":"m 156 0 l 156 29 q 241 49 215 39 q 268 70 268 59 l 268 268 q 284 354 268 317 q 326 421 301 391 q 381 475 352 450 q 436 525 410 500 q 478 576 461 549 q 495 637 495 603 q 443 764 495 721 q 301 807 392 807 q 237 794 266 807 q 188 760 208 781 q 156 714 168 740 q 145 661 145 688 q 147 633 145 646 q 156 608 149 621 q 107 592 134 597 q 50 583 80 586 l 31 603 q 28 619 30 608 q 27 639 27 629 q 53 730 27 686 q 123 805 79 773 q 227 855 168 836 q 354 875 286 875 q 460 860 413 875 q 539 819 507 845 q 587 753 570 792 q 604 668 604 715 q 587 582 604 617 q 545 520 570 547 q 490 472 519 494 q 435 428 461 451 q 393 376 410 404 q 377 308 377 348 l 377 70 q 404 49 377 60 q 488 29 432 38 l 488 0 l 156 0 "},"ē":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 581 868 q 577 851 580 861 q 569 831 573 841 q 561 812 565 822 q 555 797 558 803 l 138 797 l 123 813 q 128 830 124 821 q 135 850 131 840 q 143 869 139 859 q 151 885 147 878 l 566 885 l 581 868 "},"Ẹ":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 408 -189 q 402 -225 408 -208 q 385 -254 396 -242 q 361 -274 375 -267 q 329 -282 346 -282 q 286 -265 299 -282 q 272 -217 272 -248 q 278 -181 272 -198 q 295 -151 284 -164 q 320 -132 306 -139 q 350 -125 334 -125 q 408 -189 408 -125 "},"≠":{"x_min":41.375,"x_max":568.34375,"ha":610,"o":"m 442 519 l 551 519 l 568 501 q 558 471 564 488 q 548 444 552 455 l 395 444 l 314 316 l 551 316 l 568 298 q 558 269 564 284 q 548 241 552 253 l 267 241 l 179 101 q 161 91 173 96 q 136 82 149 86 q 109 73 122 77 q 88 67 96 69 l 71 90 l 165 241 l 58 241 l 41 259 q 50 287 44 273 q 62 316 56 302 l 212 316 l 293 444 l 58 444 l 41 461 q 50 490 44 474 q 62 519 56 506 l 339 519 l 427 658 q 472 678 446 670 q 518 692 497 686 l 537 669 l 442 519 "},"¥":{"x_min":-45.734375,"x_max":677.046875,"ha":652,"o":"m 159 0 l 159 29 q 246 55 221 42 q 271 78 271 68 l 271 296 l 86 296 l 71 313 q 78 335 74 323 q 86 358 82 347 l 271 358 l 271 393 q 221 493 247 443 q 169 588 195 542 q 117 673 142 634 q 68 742 91 713 q 54 756 62 750 q 34 768 47 763 q 4 776 22 773 q -43 780 -14 780 l -45 808 q 34 818 -5 814 q 102 823 74 823 q 155 796 133 823 q 203 729 180 764 q 248 656 226 694 q 292 576 270 618 q 338 485 314 534 l 483 742 q 477 770 493 760 q 408 787 460 780 l 408 817 l 677 817 l 677 787 q 605 769 630 778 q 571 742 580 759 l 380 392 l 380 358 l 563 358 l 580 342 l 563 296 l 380 296 l 380 78 q 385 68 380 74 q 404 55 391 62 q 439 42 417 48 q 492 29 460 35 l 492 0 l 159 0 "},"Ƚ":{"x_min":29.59375,"x_max":640.484375,"ha":661,"o":"m 640 165 q 626 63 635 106 q 612 0 618 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 364 l 44 364 l 29 380 q 36 402 32 391 q 44 425 40 414 l 132 425 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 425 l 403 425 l 420 409 l 403 364 l 241 364 l 241 111 q 246 89 241 98 q 266 74 252 80 q 305 64 281 67 q 367 61 329 61 l 464 61 q 516 64 495 61 q 554 79 538 67 q 583 114 570 91 q 611 177 597 137 l 640 165 "},"Ĥ":{"x_min":33.65625,"x_max":861.34375,"ha":908,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 478 l 654 478 l 654 783 q 629 804 654 791 q 555 825 604 816 l 555 855 l 861 855 l 861 825 q 789 804 815 816 q 763 783 763 793 l 763 70 q 787 50 763 62 q 861 29 812 38 l 861 0 l 555 0 l 555 29 q 627 49 601 38 q 654 70 654 61 l 654 417 l 241 417 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 661 957 q 649 938 653 944 q 632 927 644 932 l 446 1068 l 263 927 q 253 932 257 929 q 247 938 250 935 q 240 946 244 941 q 232 957 237 951 l 411 1167 l 484 1167 l 661 957 "},"U":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 "},"Ñ":{"x_min":33.65625,"x_max":867.34375,"ha":901,"o":"m 33 0 l 33 29 q 107 48 83 35 q 132 70 132 61 l 132 779 q 84 811 109 800 q 33 825 60 821 l 33 855 l 177 855 q 194 853 187 855 q 207 846 200 851 q 221 830 214 840 q 242 802 229 819 l 688 187 l 688 783 q 665 805 688 791 q 589 825 643 818 l 589 855 l 867 855 l 867 825 q 793 806 818 819 q 769 783 769 793 l 769 -20 q 716 -6 735 -15 q 689 14 697 3 l 213 673 l 213 70 q 235 49 213 62 q 311 29 258 36 l 311 0 l 33 0 m 682 1103 q 653 1047 670 1075 q 615 998 636 1020 q 570 963 594 977 q 519 950 545 950 q 474 961 495 950 q 432 988 453 973 q 392 1015 412 1003 q 352 1027 372 1027 q 303 1005 325 1027 q 255 945 280 982 l 219 958 q 248 1013 231 986 q 286 1063 265 1041 q 331 1098 307 1084 q 381 1112 355 1112 q 430 1100 407 1112 q 474 1073 453 1088 q 512 1046 494 1058 q 547 1035 531 1035 q 597 1056 573 1035 q 645 1118 622 1078 l 682 1103 "},"F":{"x_min":33.65625,"x_max":608.59375,"ha":664,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 587 855 l 608 838 q 605 799 607 820 q 598 757 602 778 q 590 717 595 736 q 582 685 586 698 l 550 685 q 545 737 548 716 q 534 771 541 758 q 517 788 527 783 q 494 794 507 794 l 241 794 l 241 499 l 494 499 l 514 480 q 500 459 508 470 q 483 438 491 448 q 465 418 474 427 q 450 404 457 410 q 428 421 440 414 q 402 433 417 428 q 366 439 386 437 q 316 442 345 442 l 241 442 l 241 70 q 267 52 241 62 q 359 29 293 42 l 359 0 l 33 0 "},"ả":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 439 904 q 427 871 439 886 q 397 843 414 856 q 364 817 380 829 q 341 793 349 806 q 340 767 334 780 q 375 736 347 753 q 354 728 365 730 q 333 726 344 727 q 288 753 303 740 q 271 776 274 765 q 274 797 268 787 q 292 815 280 806 q 318 833 304 824 q 344 851 332 842 q 365 871 356 861 q 373 894 373 882 q 361 933 373 920 q 328 946 348 946 q 309 942 318 946 q 295 932 301 938 q 285 918 289 926 q 282 903 282 911 q 284 896 282 900 q 287 889 285 893 q 274 885 282 887 q 255 880 265 882 q 236 877 246 878 q 220 874 227 875 l 212 882 l 212 891 q 225 922 212 907 q 258 950 238 938 q 302 971 278 963 q 351 979 327 979 q 416 958 393 979 q 439 904 439 938 "},"ʔ":{"x_min":41,"x_max":577,"ha":604,"o":"m 135 0 l 135 29 q 251 70 251 49 l 251 336 q 267 432 251 388 q 309 513 284 475 q 363 585 333 551 q 416 652 392 619 q 458 720 441 685 q 475 793 475 755 q 461 870 475 835 q 422 932 447 906 q 365 972 398 957 q 294 987 332 987 q 241 973 267 987 q 196 939 216 960 q 164 891 176 917 q 152 838 152 864 q 154 818 152 828 q 160 799 156 808 q 114 782 138 787 q 60 773 91 776 l 42 793 q 41 804 41 799 l 41 816 q 66 906 41 863 q 135 981 92 949 q 233 1032 178 1013 q 347 1051 288 1051 q 442 1033 399 1051 q 514 984 484 1015 q 560 912 544 954 q 577 823 577 871 q 560 733 577 773 q 518 659 543 693 q 465 594 494 625 q 411 530 435 563 q 369 460 386 497 q 353 376 353 423 l 353 70 q 382 49 353 60 q 468 29 412 38 l 468 0 l 135 0 "},"ờ":{"x_min":54,"x_max":746,"ha":746,"o":"m 539 308 q 521 410 539 362 q 475 495 503 458 q 412 554 448 532 q 342 576 377 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 225 134 197 170 q 289 76 254 97 q 355 55 323 55 q 437 72 403 55 q 494 124 472 90 q 528 203 517 157 q 539 308 539 250 m 746 707 q 738 670 746 690 q 713 626 731 649 q 665 577 695 602 q 590 527 635 551 q 630 436 616 486 q 644 329 644 386 q 632 240 644 283 q 600 158 620 197 q 551 86 580 119 q 489 30 523 53 q 416 -6 454 6 q 336 -20 377 -20 q 219 4 271 -20 q 130 71 167 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 206 600 172 576 q 280 637 241 623 q 362 651 320 651 q 474 628 424 651 q 561 564 525 605 q 613 611 597 588 q 629 652 629 634 q 618 689 629 671 q 589 722 608 707 l 710 777 q 736 744 726 762 q 746 707 746 726 m 440 731 q 422 718 431 722 q 402 710 413 713 l 163 965 l 178 993 q 198 998 185 995 q 226 1003 211 1000 q 255 1007 240 1005 q 277 1010 269 1009 l 440 731 "},"̿":{"x_min":-697.21875,"x_max":43.40625,"ha":0,"o":"m 43 1051 q 38 1034 42 1044 q 31 1014 35 1024 q 23 995 27 1005 q 16 980 19 986 l -682 980 l -697 996 q -692 1013 -695 1004 q -685 1033 -689 1023 q -676 1052 -680 1042 q -669 1068 -672 1061 l 28 1068 l 43 1051 m 43 868 q 38 851 42 861 q 31 831 35 841 q 23 812 27 822 q 16 797 19 803 l -682 797 l -697 813 q -692 830 -695 821 q -685 850 -689 840 q -676 869 -680 859 q -669 885 -672 878 l 28 885 l 43 868 "},"å":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 390 843 q 386 874 390 859 q 375 900 382 889 q 356 918 367 911 q 332 925 346 925 q 305 919 318 925 q 282 903 292 913 q 266 877 273 892 q 260 844 260 862 q 264 814 260 828 q 276 788 268 799 q 294 770 283 777 q 319 764 305 764 q 345 769 332 764 q 368 784 358 774 q 384 808 378 794 q 390 843 390 823 m 451 871 q 438 807 451 836 q 404 757 425 778 q 356 723 382 735 q 304 712 330 712 q 262 720 281 712 q 229 742 243 728 q 207 775 215 756 q 199 816 199 794 q 213 880 199 851 q 247 931 226 910 q 294 965 268 953 q 346 977 320 977 q 387 968 368 977 q 421 945 407 960 q 443 911 435 930 q 451 871 451 892 "},"0":{"x_min":52,"x_max":600,"ha":652,"o":"m 489 383 q 474 547 489 476 q 435 664 459 617 q 379 735 411 711 q 312 760 347 760 q 250 741 278 760 q 203 683 222 722 q 173 583 184 644 q 163 437 163 522 q 176 273 163 344 q 213 154 190 202 q 269 82 236 106 q 339 58 301 58 q 402 76 374 58 q 449 134 430 95 q 478 236 468 174 q 489 383 489 297 m 600 408 q 579 243 600 321 q 521 106 558 165 q 430 14 483 48 q 312 -20 377 -20 q 199 14 248 -20 q 118 106 150 48 q 68 243 85 165 q 52 408 52 321 q 73 574 52 496 q 131 710 94 652 q 222 803 169 769 q 339 838 274 838 q 452 804 403 838 q 533 711 501 770 q 583 575 566 653 q 600 408 600 496 "},"ɋ":{"x_min":54,"x_max":885,"ha":715,"o":"m 330 68 q 375 77 353 68 q 419 102 397 86 q 462 137 441 117 q 505 177 484 156 l 505 494 q 441 554 482 533 q 352 576 401 576 q 279 560 314 576 q 216 512 244 544 q 172 433 189 480 q 156 322 156 385 q 172 217 156 264 q 214 137 189 170 q 271 85 240 103 q 330 68 302 68 m 505 112 q 454 57 479 81 q 402 15 429 32 q 345 -10 375 -1 q 281 -20 316 -20 q 203 2 243 -20 q 130 65 163 24 q 75 166 96 106 q 54 301 54 226 q 73 411 54 360 q 119 500 92 461 q 178 566 146 539 q 233 606 209 593 q 309 639 271 628 q 373 651 347 651 q 410 648 391 651 q 447 639 428 646 q 486 620 466 632 q 530 587 507 608 q 551 602 540 594 q 572 619 562 610 q 591 636 582 627 q 607 651 600 644 l 628 630 q 617 589 621 611 q 610 543 613 569 q 607 486 607 516 l 607 -112 q 625 -232 607 -190 q 693 -275 644 -275 q 722 -268 708 -275 q 745 -252 735 -262 q 760 -230 755 -243 q 766 -205 766 -218 q 757 -178 766 -190 q 778 -162 763 -171 q 810 -147 793 -154 q 844 -136 827 -140 q 871 -133 861 -132 l 885 -161 q 865 -220 885 -188 q 812 -277 846 -251 q 735 -321 779 -303 q 643 -339 691 -339 q 575 -323 601 -339 q 532 -283 548 -308 q 511 -224 517 -257 q 505 -153 505 -190 l 505 112 "},"ō":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 598 868 q 594 851 597 861 q 586 831 590 841 q 578 812 582 822 q 572 797 575 803 l 155 797 l 140 813 q 145 830 141 821 q 152 850 148 840 q 160 869 156 859 q 168 885 164 878 l 583 885 l 598 868 "},"”":{"x_min":59.875,"x_max":542,"ha":606,"o":"m 256 878 q 246 821 256 852 q 220 760 237 790 q 177 701 202 729 q 119 653 152 673 l 89 676 q 114 709 103 690 q 132 747 124 728 q 142 784 139 766 q 146 816 146 802 q 127 869 146 846 q 70 894 109 892 l 59 924 q 85 943 65 933 q 128 963 105 954 q 174 980 152 973 q 209 986 197 986 q 243 941 231 964 q 256 878 256 917 m 542 878 q 532 821 542 852 q 505 760 523 790 q 462 701 488 729 q 405 653 437 673 l 376 676 q 400 709 390 690 q 418 747 411 728 q 429 784 425 766 q 433 816 433 802 q 414 869 433 846 q 356 894 395 892 l 345 924 q 370 943 350 933 q 414 963 390 954 q 460 980 437 973 q 495 986 483 986 q 529 941 517 964 q 542 878 542 917 "},"ḕ":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 581 868 q 577 851 580 861 q 569 831 573 841 q 561 812 565 822 q 555 797 558 803 l 138 797 l 123 813 q 128 830 124 821 q 135 850 131 840 q 143 869 139 859 q 151 885 147 878 l 566 885 l 581 868 m 423 975 q 405 962 414 967 q 385 954 396 957 l 146 1210 l 161 1237 q 181 1242 168 1239 q 209 1247 194 1244 q 238 1251 223 1250 q 260 1254 252 1253 l 423 975 "},"ö":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 566 854 q 560 818 566 835 q 543 789 553 801 q 518 769 532 776 q 487 762 504 762 q 443 778 456 762 q 430 826 430 795 q 436 862 430 845 q 453 892 442 879 q 478 911 464 904 q 508 919 492 919 q 566 854 566 919 m 295 854 q 289 818 295 835 q 272 789 282 801 q 247 769 261 776 q 216 762 233 762 q 172 778 185 762 q 159 826 159 795 q 165 862 159 845 q 182 892 171 879 q 207 911 193 904 q 237 919 221 919 q 295 854 295 919 "},"ẉ":{"x_min":13.5625,"x_max":966.46875,"ha":981,"o":"m 966 601 q 933 592 945 597 q 913 583 921 588 q 903 573 906 579 q 898 559 900 567 l 748 40 q 732 14 744 25 q 706 -2 720 4 q 678 -13 692 -9 q 655 -20 664 -17 l 494 439 l 355 40 q 338 14 349 24 q 314 -3 327 3 q 287 -14 300 -10 q 265 -20 274 -17 l 87 559 q 13 601 81 586 l 13 631 l 275 631 l 275 601 q 223 594 242 598 q 197 583 205 589 q 188 572 189 578 q 190 559 188 565 l 318 129 l 484 631 l 531 631 l 708 129 l 825 559 q 811 584 829 575 q 746 601 792 594 l 746 631 l 966 631 l 966 601 m 563 -189 q 557 -225 563 -208 q 540 -254 551 -242 q 515 -274 530 -267 q 484 -282 501 -282 q 440 -265 453 -282 q 427 -217 427 -248 q 433 -181 427 -198 q 450 -151 439 -164 q 475 -132 461 -139 q 505 -125 489 -125 q 563 -189 563 -125 "},"Ȧ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 474 1045 q 468 1009 474 1026 q 451 980 462 992 q 426 960 441 967 q 395 953 412 953 q 351 969 365 953 q 338 1018 338 986 q 344 1053 338 1036 q 361 1083 350 1070 q 386 1102 372 1095 q 416 1110 400 1110 q 474 1045 474 1110 "},"ć":{"x_min":54,"x_max":569.71875,"ha":607,"o":"m 569 129 q 492 47 525 76 q 430 2 458 17 q 374 -16 401 -12 q 315 -20 347 -20 q 218 2 265 -20 q 134 65 171 24 q 76 166 98 106 q 54 301 54 226 q 80 438 54 374 q 154 548 107 501 q 263 623 200 596 q 400 651 326 651 q 445 647 422 651 q 490 636 469 643 q 530 619 512 629 q 559 597 548 609 q 557 574 560 588 q 548 542 554 559 q 534 510 541 525 q 520 485 527 495 l 495 492 q 478 519 490 504 q 446 546 465 533 q 400 567 427 559 q 339 576 373 576 q 270 560 303 576 q 211 512 237 544 q 171 433 186 480 q 156 322 156 385 q 173 217 156 264 q 219 137 190 170 q 285 85 248 103 q 364 68 323 68 q 399 69 383 68 q 435 80 415 71 q 479 106 454 89 q 543 156 505 124 l 569 129 m 303 710 q 281 717 290 712 q 264 729 271 722 l 423 1010 q 444 1007 431 1009 q 472 1003 457 1005 q 500 999 486 1001 q 521 994 514 996 l 537 967 l 303 710 "},"þ":{"x_min":37.046875,"x_max":682,"ha":736,"o":"m 590 276 q 576 397 590 343 q 539 488 562 450 q 485 546 516 526 q 422 566 455 566 q 390 558 410 566 q 345 533 370 551 q 292 486 320 515 q 234 413 263 456 l 234 144 q 333 82 286 103 q 427 61 381 61 q 496 79 466 61 q 547 128 526 97 q 579 197 568 158 q 590 276 590 235 m 682 333 q 671 253 682 294 q 641 172 660 211 q 596 97 622 133 q 537 36 570 62 q 467 -4 504 10 q 388 -20 429 -20 q 361 -16 377 -20 q 324 -4 344 -12 q 280 17 303 4 q 234 50 257 30 l 234 -254 q 259 -276 234 -265 q 349 -296 285 -287 l 349 -326 l 37 -326 l 37 -296 q 106 -276 81 -285 q 132 -254 132 -266 l 132 878 q 127 926 132 909 q 113 951 123 943 q 84 963 102 960 q 37 969 65 966 l 37 996 q 126 1017 85 1006 q 208 1051 168 1029 l 234 1027 l 233 496 q 302 567 268 538 q 366 615 336 596 q 422 642 396 634 q 468 651 448 651 q 553 629 514 651 q 621 566 593 607 q 666 466 650 525 q 682 333 682 407 "},"]":{"x_min":27.4375,"x_max":332,"ha":428,"o":"m 51 -227 l 28 -207 q 35 -174 30 -191 q 45 -149 41 -157 l 237 -149 l 237 1007 l 51 1007 l 27 1024 q 35 1056 29 1039 q 45 1085 41 1073 l 332 1085 l 332 -227 l 51 -227 "},"Ǒ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 453 943 l 381 943 l 202 1185 q 210 1196 206 1191 q 216 1204 213 1201 q 223 1210 219 1208 q 232 1217 227 1213 l 419 1046 l 602 1217 q 618 1204 613 1210 q 631 1185 623 1198 l 453 943 "},"ẁ":{"x_min":13.5625,"x_max":966.46875,"ha":981,"o":"m 966 601 q 933 592 945 597 q 913 583 921 588 q 903 573 906 579 q 898 559 900 567 l 748 40 q 732 14 744 25 q 706 -2 720 4 q 678 -13 692 -9 q 655 -20 664 -17 l 494 439 l 355 40 q 338 14 349 24 q 314 -3 327 3 q 287 -14 300 -10 q 265 -20 274 -17 l 87 559 q 13 601 81 586 l 13 631 l 275 631 l 275 601 q 223 594 242 598 q 197 583 205 589 q 188 572 189 578 q 190 559 188 565 l 318 129 l 484 631 l 531 631 l 708 129 l 825 559 q 811 584 829 575 q 746 601 792 594 l 746 631 l 966 631 l 966 601 m 585 731 q 568 718 577 722 q 548 710 559 713 l 309 965 l 324 993 q 344 998 330 995 q 372 1003 357 1000 q 400 1007 386 1005 q 423 1010 415 1009 l 585 731 "},"Ȟ":{"x_min":33.65625,"x_max":861.34375,"ha":908,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 478 l 654 478 l 654 783 q 629 804 654 791 q 555 825 604 816 l 555 855 l 861 855 l 861 825 q 789 804 815 816 q 763 783 763 793 l 763 70 q 787 50 763 62 q 861 29 812 38 l 861 0 l 555 0 l 555 29 q 627 49 601 38 q 654 70 654 61 l 654 417 l 241 417 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 484 943 l 411 943 l 232 1151 q 240 1162 237 1157 q 247 1170 244 1167 q 253 1176 250 1174 q 263 1183 257 1179 l 449 1039 l 632 1183 q 649 1170 644 1176 q 661 1151 653 1164 l 484 943 "},"ệ":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 407 -189 q 401 -225 407 -208 q 384 -254 395 -242 q 359 -274 374 -267 q 328 -282 345 -282 q 284 -265 297 -282 q 271 -217 271 -248 q 277 -181 271 -198 q 294 -151 283 -164 q 319 -132 305 -139 q 349 -125 333 -125 q 407 -189 407 -125 m 560 740 q 547 721 552 727 q 531 710 542 715 l 345 891 l 161 710 q 152 715 155 712 q 145 721 148 718 q 139 729 142 724 q 130 740 135 734 l 309 998 l 382 998 l 560 740 "},"ĭ":{"x_min":-27.125,"x_max":413.71875,"ha":376,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 m 413 922 q 367 829 393 867 q 314 768 342 792 q 255 735 286 745 q 194 725 225 725 q 130 735 161 725 q 70 768 99 745 q 17 829 42 792 q -27 922 -6 867 q -10 941 -18 934 q 8 953 -2 947 q 47 887 25 914 q 94 845 69 861 q 144 822 118 829 q 191 815 169 815 q 241 822 215 815 q 292 845 267 829 q 339 887 317 861 q 377 953 361 914 q 397 941 389 947 q 413 922 405 934 "},"8":{"x_min":64,"x_max":588,"ha":652,"o":"m 186 644 q 200 592 186 614 q 239 553 215 570 q 295 521 264 535 q 361 491 327 506 q 431 563 410 527 q 452 636 452 599 q 441 697 452 671 q 411 740 430 723 q 365 765 393 757 q 305 774 338 774 q 252 762 274 774 q 215 732 230 750 q 193 690 201 713 q 186 644 186 667 m 479 210 q 463 286 479 254 q 421 341 447 318 q 362 381 395 364 q 294 414 329 398 q 239 367 262 390 q 201 321 216 345 q 180 271 187 297 q 173 214 173 244 q 184 148 173 178 q 217 95 195 117 q 269 60 239 73 q 339 48 300 48 q 403 62 376 48 q 446 99 429 76 q 471 151 463 122 q 479 210 479 180 m 588 239 q 565 139 588 186 q 504 56 543 92 q 414 0 465 21 q 306 -20 363 -20 q 202 -2 247 -20 q 127 45 158 15 q 79 113 95 74 q 64 193 64 151 q 76 264 64 230 q 112 329 89 298 q 168 387 135 360 q 242 437 201 414 q 187 466 213 450 q 141 504 161 483 q 110 554 121 526 q 99 620 99 582 q 117 707 99 667 q 168 776 136 747 q 245 821 201 805 q 340 838 289 838 q 431 824 391 838 q 498 787 470 810 q 539 730 525 763 q 554 657 554 696 q 543 603 554 629 q 514 554 533 578 q 471 509 496 531 q 415 466 445 488 q 480 430 449 450 q 535 383 512 410 q 573 321 559 356 q 588 239 588 285 "},"Ữ":{"x_min":33.65625,"x_max":950.125,"ha":950,"o":"m 950 944 q 941 904 950 927 q 912 856 933 881 q 855 802 891 830 q 767 749 820 775 l 767 355 q 745 196 767 266 q 682 79 723 127 q 583 5 642 30 q 451 -20 525 -20 q 323 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 376 76 332 95 q 478 58 420 58 q 564 81 526 58 q 627 142 601 104 q 665 229 652 180 q 679 327 679 277 l 679 783 q 654 804 679 791 q 580 825 629 816 l 580 855 l 821 855 q 833 889 833 873 q 823 926 833 909 q 794 959 813 944 l 914 1014 q 940 981 930 999 q 950 944 950 963 m 690 1103 q 661 1047 678 1075 q 623 998 644 1020 q 578 963 602 977 q 527 950 554 950 q 482 961 503 950 q 440 988 461 973 q 400 1015 420 1003 q 360 1027 380 1027 q 311 1005 333 1027 q 263 945 288 982 l 227 958 q 256 1013 240 986 q 294 1063 273 1041 q 339 1098 315 1084 q 389 1112 363 1112 q 438 1100 415 1112 q 482 1073 461 1088 q 520 1046 502 1058 q 555 1035 539 1035 q 605 1056 581 1035 q 653 1118 630 1078 l 690 1103 "},"R":{"x_min":27.5625,"x_max":771.921875,"ha":779,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 806 q 83 799 108 803 q 33 792 58 795 l 27 834 q 91 849 59 842 q 159 862 124 856 q 233 871 195 868 q 317 875 272 875 q 454 859 396 875 q 551 815 512 843 q 609 750 590 788 q 628 669 628 712 q 614 580 628 620 q 574 510 600 541 q 514 458 549 480 q 436 423 478 436 l 642 93 q 664 70 652 78 q 690 56 676 61 q 723 52 705 52 q 764 53 741 51 l 771 24 q 686 0 727 9 q 620 -10 646 -10 q 581 1 600 -10 q 553 27 563 12 l 348 408 q 331 406 339 406 l 312 406 q 277 408 295 406 q 241 414 259 410 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 293 818 q 241 816 267 818 l 241 468 q 272 464 259 465 q 301 464 286 464 q 465 511 408 464 q 523 648 523 558 q 509 716 523 685 q 468 770 496 748 q 396 805 440 792 q 293 818 353 818 "},"Ḇ":{"x_min":27.5625,"x_max":689,"ha":764,"o":"m 280 818 q 261 817 270 818 q 241 817 251 817 l 241 492 l 264 492 q 389 507 341 492 q 463 546 437 522 q 499 599 490 569 q 509 658 509 629 q 497 721 509 692 q 460 772 486 750 q 389 805 433 793 q 280 818 346 818 m 352 441 q 292 437 320 441 q 241 430 265 434 l 241 70 q 247 59 241 64 q 273 53 258 55 q 304 49 288 51 q 335 47 319 48 q 364 47 350 47 q 452 59 413 47 q 520 94 491 72 q 563 148 548 116 q 578 218 578 180 q 564 294 578 255 q 524 366 551 334 q 454 420 496 399 q 352 441 411 441 m 689 241 q 666 137 689 183 q 602 57 643 90 q 504 7 561 25 q 378 -10 447 -10 q 343 -9 364 -10 q 298 -8 322 -9 q 250 -7 275 -7 q 201 -5 224 -6 q 83 0 144 -2 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 807 q 81 800 106 803 q 33 792 56 796 l 27 834 q 88 848 54 841 q 162 861 123 856 q 241 871 201 867 q 318 875 281 875 q 440 862 385 875 q 534 826 495 849 q 593 768 572 802 q 614 692 614 734 q 579 566 614 619 q 484 491 544 514 q 565 460 528 482 q 630 405 602 437 q 673 330 657 372 q 689 241 689 288 m 587 -155 q 582 -172 585 -162 q 575 -192 579 -182 q 567 -211 571 -201 q 560 -227 563 -220 l 143 -227 l 128 -210 q 133 -193 130 -202 q 141 -173 137 -183 q 149 -154 145 -164 q 156 -139 153 -145 l 572 -139 l 587 -155 "},"Ż":{"x_min":40.015625,"x_max":672.125,"ha":726,"o":"m 672 198 q 669 150 670 177 q 667 97 668 124 q 665 45 666 70 q 663 0 664 19 l 59 0 l 40 30 l 522 787 l 210 787 q 187 779 200 787 q 162 755 174 772 q 139 714 149 739 q 120 653 128 688 l 82 661 l 101 865 q 135 859 120 861 q 165 855 150 856 q 195 855 179 855 l 648 855 l 665 825 l 187 68 l 541 68 q 567 74 556 68 q 589 96 579 80 q 611 139 600 112 q 634 208 621 166 l 672 198 m 444 1045 q 438 1009 444 1026 q 421 980 432 992 q 397 960 411 967 q 365 953 382 953 q 321 969 335 953 q 308 1018 308 986 q 314 1053 308 1036 q 331 1083 320 1070 q 356 1102 342 1095 q 386 1110 370 1110 q 444 1045 444 1110 "},"ḝ":{"x_min":54,"x_max":587,"ha":641,"o":"m 451 -155 q 439 -203 451 -180 q 401 -245 427 -226 q 337 -278 376 -264 q 241 -301 297 -292 l 226 -267 q 286 -252 262 -261 q 327 -232 311 -243 q 349 -209 342 -221 q 357 -186 357 -197 q 339 -154 357 -163 q 279 -141 321 -145 q 286 -122 281 -139 q 300 -77 291 -108 q 319 -20 308 -55 l 315 -20 q 215 2 262 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 203 597 168 573 q 237 617 218 607 q 276 634 256 627 q 316 646 296 642 q 355 651 336 651 q 433 638 399 651 q 494 605 468 626 q 537 557 519 585 q 566 499 555 530 q 582 437 577 469 q 587 377 587 405 q 554 352 574 363 q 512 332 534 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 356 68 310 68 q 397 70 377 68 q 440 82 417 73 q 492 110 463 92 q 558 160 520 129 q 573 146 566 155 q 583 132 579 137 q 503 52 537 82 q 439 6 469 22 q 379 -15 408 -10 q 374 -16 376 -15 l 356 -70 q 390 -80 373 -74 q 421 -97 408 -87 q 442 -121 434 -107 q 451 -155 451 -136 m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 450 393 q 470 398 465 393 q 476 417 476 403 q 470 463 476 435 q 450 517 465 490 q 407 561 435 543 q 336 580 380 580 m 566 922 q 520 829 545 867 q 466 768 495 792 q 408 735 438 745 q 347 725 377 725 q 282 735 314 725 q 223 768 251 745 q 170 829 195 792 q 125 922 145 867 q 141 941 133 934 q 161 953 149 947 q 200 887 178 914 q 246 845 222 861 q 296 822 271 829 q 344 815 322 815 q 394 822 368 815 q 445 845 420 829 q 492 887 470 861 q 530 953 514 914 q 550 941 541 947 q 566 922 558 934 "},"õ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 594 912 q 564 857 581 884 q 527 808 548 830 q 482 773 506 787 q 431 760 457 760 q 386 771 407 760 q 344 798 364 783 q 304 825 324 813 q 264 837 284 837 q 215 814 237 837 q 167 755 192 792 l 131 768 q 160 823 143 796 q 198 873 177 851 q 243 908 219 894 q 293 922 267 922 q 342 910 319 922 q 385 883 365 898 q 424 856 406 868 q 459 845 442 845 q 509 866 484 845 q 557 928 534 888 l 594 912 "},"ẘ":{"x_min":13.5625,"x_max":966.46875,"ha":981,"o":"m 966 601 q 933 592 945 597 q 913 583 921 588 q 903 573 906 579 q 898 559 900 567 l 748 40 q 732 14 744 25 q 706 -2 720 4 q 678 -13 692 -9 q 655 -20 664 -17 l 494 439 l 355 40 q 338 14 349 24 q 314 -3 327 3 q 287 -14 300 -10 q 265 -20 274 -17 l 87 559 q 13 601 81 586 l 13 631 l 275 631 l 275 601 q 223 594 242 598 q 197 583 205 589 q 188 572 189 578 q 190 559 188 565 l 318 129 l 484 631 l 531 631 l 708 129 l 825 559 q 811 584 829 575 q 746 601 792 594 l 746 631 l 966 631 l 966 601 m 573 843 q 569 874 573 859 q 558 900 565 889 q 540 918 550 911 q 515 925 529 925 q 488 919 501 925 q 465 903 475 913 q 450 877 456 892 q 443 844 443 862 q 448 814 443 828 q 459 788 452 799 q 477 770 466 777 q 502 764 488 764 q 528 769 515 764 q 551 784 541 774 q 567 808 561 794 q 573 843 573 823 m 634 871 q 621 807 634 836 q 587 757 608 778 q 539 723 565 735 q 487 712 513 712 q 445 720 464 712 q 412 742 426 728 q 390 775 398 756 q 382 816 382 794 q 396 880 382 851 q 430 931 409 910 q 477 965 451 953 q 529 977 503 977 q 570 968 551 977 q 604 945 590 960 q 626 911 618 930 q 634 871 634 892 "},"ẫ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 539 740 q 526 721 531 727 q 510 710 522 715 l 324 891 l 141 710 q 131 715 135 712 q 125 721 128 718 q 118 729 122 724 q 110 740 115 734 l 289 998 l 362 998 l 539 740 m 556 1217 q 527 1162 544 1189 q 490 1113 510 1135 q 444 1078 469 1092 q 394 1065 420 1065 q 348 1077 370 1065 q 307 1103 327 1089 q 266 1130 286 1118 q 227 1142 246 1142 q 177 1120 200 1142 q 130 1060 155 1098 l 94 1073 q 123 1129 106 1101 q 160 1178 139 1156 q 205 1213 181 1200 q 256 1227 229 1227 q 305 1215 282 1227 q 348 1188 328 1203 q 387 1162 368 1174 q 421 1150 405 1150 q 472 1171 447 1150 q 520 1233 497 1193 l 556 1217 "},"Ṡ":{"x_min":79.515625,"x_max":600,"ha":661,"o":"m 600 255 q 591 193 600 225 q 567 130 583 161 q 525 72 550 99 q 467 24 501 45 q 391 -7 433 4 q 298 -20 349 -20 q 249 -15 276 -20 q 195 -2 223 -10 q 140 18 167 6 q 89 46 112 30 q 81 69 84 48 q 79 116 79 89 q 81 172 79 144 q 89 219 83 201 l 116 216 q 155 147 132 176 q 207 98 179 117 q 268 70 235 79 q 336 61 301 61 q 397 73 366 61 q 452 107 428 86 q 492 158 476 129 q 508 219 508 187 q 489 290 508 261 q 441 343 471 320 q 374 385 412 366 q 297 421 336 403 q 219 460 257 440 q 152 508 181 480 q 104 570 122 535 q 86 655 86 606 q 92 701 86 676 q 111 750 98 725 q 146 797 125 774 q 198 837 168 820 q 267 864 228 854 q 356 875 307 875 q 417 870 387 875 q 475 857 448 865 q 523 837 502 849 q 557 812 545 826 q 558 796 562 808 q 544 770 553 784 q 524 743 535 756 q 505 722 513 729 l 480 726 q 440 763 461 748 q 398 789 420 779 q 356 802 377 798 q 316 807 335 807 q 251 795 278 807 q 207 766 224 783 q 182 728 190 749 q 174 687 174 706 q 192 631 174 655 q 240 585 210 606 q 308 546 270 565 q 387 508 346 528 q 465 465 427 488 q 533 412 503 442 q 581 344 563 382 q 600 255 600 306 m 407 1045 q 401 1009 407 1026 q 384 980 395 992 q 359 960 374 967 q 328 953 345 953 q 284 969 297 953 q 271 1018 271 986 q 277 1053 271 1036 q 294 1083 283 1070 q 319 1102 305 1095 q 349 1110 333 1110 q 407 1045 407 1110 "},"ǝ":{"x_min":47,"x_max":577,"ha":631,"o":"m 301 51 q 422 103 379 51 q 474 258 465 156 l 201 258 q 168 242 180 258 q 156 199 156 226 q 168 140 156 167 q 202 93 181 113 q 249 62 223 73 q 301 51 275 51 m 577 329 q 550 180 577 249 q 477 61 523 111 q 390 0 438 19 q 282 -20 343 -20 q 190 -4 233 -20 q 115 40 147 11 q 65 106 83 68 q 47 189 47 144 q 53 239 47 216 q 71 276 59 261 q 115 298 91 287 q 163 319 139 309 l 475 319 q 456 419 473 374 q 412 494 440 463 q 347 542 385 525 q 269 559 310 559 q 231 556 250 559 q 190 545 212 553 q 140 522 167 537 q 78 481 113 506 q 62 495 69 485 q 52 510 56 505 q 128 581 93 554 q 195 624 163 609 q 256 645 226 640 q 317 651 286 651 q 414 628 367 651 q 497 565 460 606 q 555 464 533 524 q 577 329 577 404 "},"˙":{"x_min":68,"x_max":204,"ha":271,"o":"m 204 854 q 197 818 204 835 q 181 789 191 801 q 156 769 170 776 q 125 762 142 762 q 81 778 94 762 q 68 826 68 795 q 74 862 68 845 q 91 892 80 879 q 115 911 102 904 q 146 919 129 919 q 204 854 204 919 "},"ê":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 560 740 q 547 721 552 727 q 531 710 542 715 l 345 891 l 161 710 q 152 715 155 712 q 145 721 148 718 q 139 729 142 724 q 130 740 135 734 l 309 998 l 382 998 l 560 740 "},"„":{"x_min":59.875,"x_max":542,"ha":624,"o":"m 256 41 q 246 -15 256 15 q 220 -76 237 -46 q 177 -135 202 -107 q 119 -184 152 -162 l 89 -160 q 114 -127 103 -146 q 132 -89 124 -108 q 142 -52 139 -70 q 146 -20 146 -34 q 127 32 146 9 q 70 57 109 55 l 59 87 q 85 106 65 96 q 128 126 105 117 q 174 143 152 136 q 209 149 197 149 q 243 104 231 127 q 256 41 256 80 m 542 41 q 532 -15 542 15 q 505 -76 523 -46 q 462 -135 488 -107 q 405 -184 437 -162 l 376 -160 q 400 -127 390 -146 q 418 -89 411 -108 q 429 -52 425 -70 q 433 -20 433 -34 q 414 32 433 9 q 356 57 395 55 l 345 87 q 370 106 350 96 q 414 126 390 117 q 460 143 437 136 q 495 149 483 149 q 529 104 517 127 q 542 41 542 80 "},"Â":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 620 957 q 607 938 612 944 q 591 927 602 932 l 405 1068 l 221 927 q 212 932 216 929 q 205 938 208 935 q 199 946 202 941 q 191 957 196 951 l 370 1167 l 442 1167 l 620 957 "},"´":{"x_min":147.171875,"x_max":419.8125,"ha":443,"o":"m 185 710 q 164 717 173 712 q 147 729 155 722 l 305 1010 q 327 1007 314 1009 q 355 1003 341 1005 q 383 998 370 1001 q 404 994 396 996 l 419 967 l 185 710 "},"Ɛ":{"x_min":54,"x_max":653.34375,"ha":707,"o":"m 653 145 q 572 67 611 98 q 491 16 533 35 q 406 -11 450 -3 q 310 -20 361 -20 q 199 0 247 -20 q 119 52 152 20 q 70 120 87 83 q 54 192 54 158 q 67 268 54 231 q 103 336 81 305 q 154 392 125 368 q 215 430 183 416 q 113 499 150 453 q 77 613 77 546 q 109 725 77 672 q 203 815 142 778 q 295 858 247 842 q 399 875 344 875 q 534 857 472 875 q 640 804 596 840 q 613 761 629 781 q 579 722 597 741 l 550 727 q 508 759 528 745 q 465 782 488 772 q 418 795 443 791 q 363 800 393 800 q 291 787 325 800 q 230 753 256 774 q 187 701 203 731 q 172 635 172 671 q 182 581 172 608 q 222 532 193 554 q 301 495 251 510 q 428 478 351 481 l 428 427 q 308 402 358 422 q 225 356 258 383 q 178 296 193 328 q 163 233 163 263 q 178 166 163 196 q 222 113 194 135 q 287 77 250 90 q 368 65 325 65 q 429 68 401 65 q 485 84 457 72 q 547 117 514 96 q 624 175 580 139 l 653 145 "},"ỏ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 477 904 q 464 871 477 886 q 435 843 452 856 q 402 817 418 829 q 378 793 386 806 q 377 767 371 780 q 412 736 384 753 q 392 728 403 730 q 371 726 381 727 q 326 753 340 740 q 308 776 311 765 q 311 797 305 787 q 329 815 318 806 q 355 833 341 824 q 382 851 369 842 q 402 871 394 861 q 411 894 411 882 q 398 933 411 920 q 365 946 385 946 q 347 942 355 946 q 332 932 338 938 q 323 918 326 926 q 319 903 319 911 q 321 896 319 900 q 325 889 323 893 q 311 885 319 887 q 293 880 302 882 q 273 877 283 878 q 257 874 264 875 l 250 882 l 250 891 q 263 922 250 907 q 295 950 275 938 q 340 971 315 963 q 388 979 364 979 q 454 958 431 979 q 477 904 477 938 "},"ʃ":{"x_min":-176.328125,"x_max":485.5,"ha":342,"o":"m 265 44 q 254 -70 265 -21 q 224 -156 243 -119 q 181 -222 206 -194 q 130 -271 157 -249 q 89 -297 111 -285 q 43 -319 67 -310 q -4 -333 19 -328 q -48 -339 -27 -339 q -92 -331 -69 -339 q -133 -315 -114 -324 q -164 -295 -151 -305 q -176 -280 -176 -285 q -166 -263 -176 -274 q -143 -241 -156 -253 q -114 -219 -129 -230 q -90 -204 -100 -209 q -65 -222 -79 -214 q -37 -235 -52 -230 q -8 -243 -23 -240 q 18 -247 5 -247 q 73 -233 48 -247 q 116 -193 98 -220 q 145 -127 134 -167 q 156 -33 156 -87 q 150 84 156 20 q 137 216 145 148 q 119 353 128 284 q 101 486 110 422 q 88 605 93 550 q 83 699 83 659 q 91 806 83 761 q 115 884 100 851 q 152 942 130 917 q 202 988 174 966 q 242 1015 220 1003 q 285 1034 263 1026 q 325 1046 306 1042 q 358 1051 345 1051 q 401 1042 379 1051 q 442 1024 423 1034 q 473 1002 461 1013 q 485 985 485 991 q 475 969 485 980 q 452 947 465 958 q 424 925 438 935 q 399 910 409 915 q 366 935 383 924 q 334 952 349 945 q 306 962 319 959 q 284 966 292 966 q 249 953 266 966 q 220 917 233 940 q 200 857 208 893 q 192 776 192 822 q 197 661 192 724 q 210 529 202 597 q 228 392 219 461 q 246 258 237 322 q 259 139 254 194 q 265 44 265 84 "},"Ĉ":{"x_min":48,"x_max":690.84375,"ha":745,"o":"m 690 143 q 607 65 647 96 q 531 15 568 34 q 458 -11 494 -3 q 387 -20 422 -20 q 263 8 324 -20 q 155 90 203 36 q 77 221 106 144 q 48 397 48 299 q 80 594 48 506 q 169 744 113 682 q 300 841 226 807 q 458 875 375 875 q 587 855 532 875 q 677 806 642 835 q 675 793 682 803 q 659 770 669 783 q 636 744 648 757 q 616 723 625 731 l 593 727 q 511 779 558 759 q 401 800 463 800 q 351 791 378 800 q 296 764 323 783 q 242 716 268 746 q 196 645 216 687 q 164 548 176 603 q 153 422 153 492 q 179 264 153 332 q 246 151 205 196 q 337 83 287 106 q 436 61 388 61 q 532 86 473 61 q 665 173 591 111 q 672 167 669 172 q 679 158 676 163 q 686 149 683 153 q 690 143 688 145 m 630 957 q 617 938 622 944 q 601 927 613 932 l 415 1068 l 231 927 q 222 932 226 929 q 216 938 219 935 q 209 946 212 941 q 201 957 206 951 l 380 1167 l 453 1167 l 630 957 "},"Ɋ":{"x_min":45,"x_max":985,"ha":834,"o":"m 369 72 q 426 85 396 72 q 487 120 456 99 q 548 170 518 142 q 606 225 578 197 l 606 671 q 533 753 579 724 q 429 783 488 783 q 367 772 399 783 q 303 742 334 762 q 243 693 271 722 q 193 624 214 663 q 159 537 172 585 q 147 432 147 489 q 166 289 147 355 q 217 174 185 223 q 288 99 248 126 q 369 72 328 72 m 606 152 q 542 79 574 112 q 478 25 511 47 q 409 -8 445 3 q 331 -20 372 -20 q 268 -7 301 -20 q 204 29 236 5 q 143 90 172 54 q 92 174 114 127 q 57 279 70 222 q 45 405 45 337 q 57 506 45 458 q 89 595 69 554 q 133 672 108 637 q 185 735 158 707 q 235 783 211 763 q 280 816 260 803 q 327 841 303 830 q 375 859 352 851 q 418 871 398 867 q 455 875 439 875 q 496 872 476 875 q 538 861 517 869 q 582 837 559 852 q 630 796 605 821 q 652 813 641 804 q 674 833 664 823 q 693 854 684 844 q 711 874 703 865 l 740 848 q 727 792 732 823 q 718 731 722 766 q 715 654 715 695 l 715 -72 q 717 -162 715 -124 q 727 -226 719 -201 q 750 -263 735 -251 q 794 -275 766 -275 q 822 -269 809 -275 q 845 -254 835 -264 q 861 -233 855 -245 q 867 -207 867 -221 q 860 -179 867 -194 q 872 -166 860 -173 q 901 -150 884 -158 q 938 -138 919 -143 q 972 -133 957 -133 l 985 -159 q 963 -224 985 -192 q 907 -282 941 -256 q 829 -323 872 -307 q 743 -339 786 -339 q 672 -323 699 -339 q 631 -278 646 -307 q 611 -207 616 -249 q 606 -113 606 -166 l 606 152 "},"Ờ":{"x_min":48,"x_max":828,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 410 797 448 797 q 301 771 349 797 q 221 698 254 746 q 170 584 188 651 q 153 434 153 517 q 173 290 153 358 q 229 171 194 223 q 310 90 264 120 q 410 61 357 61 q 513 84 466 61 q 594 153 560 107 q 648 268 629 200 q 667 426 667 337 m 828 944 q 820 906 828 927 q 794 861 812 885 q 745 812 776 837 q 667 761 714 786 q 745 614 719 698 q 772 439 772 529 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 390 -20 467 -20 q 245 15 309 -20 q 137 112 181 51 q 71 251 94 172 q 48 415 48 329 q 77 590 48 507 q 159 737 107 674 q 280 837 210 800 q 429 875 349 875 q 542 853 492 875 q 634 796 593 832 q 693 846 675 821 q 711 889 711 871 q 700 926 711 908 q 671 959 690 944 l 792 1014 q 818 981 808 999 q 828 944 828 963 m 537 957 q 522 938 527 944 q 506 927 517 931 l 188 1092 l 193 1122 q 209 1134 198 1128 q 231 1148 219 1141 q 255 1162 244 1156 q 274 1173 267 1168 l 537 957 "},"Ω":{"x_min":54.984375,"x_max":798,"ha":879,"o":"m 76 0 l 54 18 q 57 55 55 34 q 61 99 58 77 q 67 145 63 122 q 76 190 71 168 l 106 190 q 117 140 111 161 q 129 103 122 118 q 147 82 136 89 q 171 75 157 75 l 320 75 q 200 185 247 132 q 125 290 153 239 q 86 394 97 342 q 75 501 75 446 q 86 590 75 545 q 119 677 97 635 q 173 755 141 719 q 248 817 205 790 q 342 859 290 844 q 455 875 394 875 q 592 849 530 875 q 699 778 654 824 q 768 665 743 731 q 794 517 794 599 q 777 402 794 456 q 728 295 761 348 q 646 188 695 242 q 534 75 598 134 l 690 75 q 713 81 704 75 q 730 101 722 87 q 746 138 738 115 q 767 193 754 160 l 798 180 q 794 136 796 160 q 788 88 791 112 q 782 40 785 64 q 775 0 778 17 l 475 0 l 475 74 q 545 166 514 126 q 599 242 576 207 q 639 307 623 276 q 666 368 655 337 q 680 430 676 398 q 685 501 685 462 q 669 619 685 563 q 621 719 653 675 q 542 788 589 762 q 433 814 495 814 q 350 798 387 814 q 286 757 313 782 q 239 699 258 731 q 207 632 219 666 q 189 566 195 598 q 184 508 184 533 q 186 434 184 468 q 197 370 189 400 q 219 308 205 339 q 257 242 234 277 q 313 166 280 207 q 391 74 346 126 l 391 0 l 76 0 "},"ȧ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 393 854 q 387 818 393 835 q 371 789 381 801 q 346 769 360 776 q 314 762 331 762 q 271 778 284 762 q 257 826 257 795 q 263 862 257 845 q 280 892 270 879 q 305 911 291 904 q 336 919 319 919 q 393 854 393 919 "},"Ö":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 620 1045 q 614 1009 620 1026 q 597 980 608 992 q 572 960 587 967 q 541 953 558 953 q 497 969 510 953 q 484 1018 484 986 q 490 1053 484 1036 q 507 1083 496 1070 q 532 1102 518 1095 q 562 1110 546 1110 q 620 1045 620 1110 m 349 1045 q 343 1009 349 1026 q 326 980 337 992 q 301 960 316 967 q 270 953 287 953 q 226 969 239 953 q 213 1018 213 986 q 219 1053 213 1036 q 236 1083 225 1070 q 261 1102 247 1095 q 291 1110 275 1110 q 349 1045 349 1110 "},"ḏ":{"x_min":54,"x_max":712.796875,"ha":722,"o":"m 712 57 q 657 21 681 36 q 615 -2 633 7 q 584 -15 597 -11 q 561 -20 571 -20 q 525 10 539 -20 q 506 114 510 41 q 454 58 480 83 q 402 16 429 33 q 346 -10 375 -1 q 281 -20 316 -20 q 203 2 243 -20 q 130 65 163 24 q 75 166 96 106 q 54 301 54 226 q 64 381 54 339 q 94 461 75 422 q 142 534 114 499 q 206 595 171 568 q 283 636 241 621 q 373 651 325 651 q 436 643 405 651 q 505 608 468 635 l 505 863 q 502 923 505 901 q 491 957 500 945 q 462 973 481 968 q 406 980 442 977 l 406 1006 q 506 1026 462 1014 q 585 1051 550 1039 l 607 1030 l 607 172 q 608 131 607 148 q 611 103 609 114 q 615 84 613 91 q 622 72 618 76 q 645 67 628 64 q 703 86 663 70 l 712 57 m 505 177 l 505 494 q 441 554 482 533 q 352 576 401 576 q 273 560 309 576 q 211 512 237 544 q 170 433 185 480 q 156 322 156 385 q 172 217 156 264 q 214 137 189 170 q 271 85 240 103 q 330 68 302 68 q 375 77 353 68 q 419 102 397 86 q 462 137 441 117 q 505 177 484 156 m 585 -155 q 580 -172 583 -162 q 573 -192 577 -182 q 565 -211 569 -201 q 558 -227 561 -220 l 141 -227 l 126 -210 q 131 -193 128 -202 q 139 -173 134 -183 q 147 -154 143 -164 q 154 -139 151 -145 l 570 -139 l 585 -155 "},"z":{"x_min":51.546875,"x_max":562.25,"ha":614,"o":"m 562 168 q 561 122 562 146 q 559 74 560 97 q 557 31 558 51 q 554 0 556 12 l 69 0 l 51 30 l 427 570 l 193 570 q 171 565 182 570 q 149 550 160 561 q 129 519 139 539 q 113 468 120 499 l 80 476 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 545 631 l 560 601 l 183 61 l 469 61 q 500 87 486 61 q 530 174 514 113 l 562 168 "},"Ḅ":{"x_min":27.5625,"x_max":689,"ha":764,"o":"m 280 818 q 261 817 270 818 q 241 817 251 817 l 241 492 l 264 492 q 389 507 341 492 q 463 546 437 522 q 499 599 490 569 q 509 658 509 629 q 497 721 509 692 q 460 772 486 750 q 389 805 433 793 q 280 818 346 818 m 352 441 q 292 437 320 441 q 241 430 265 434 l 241 70 q 247 59 241 64 q 273 53 258 55 q 304 49 288 51 q 335 47 319 48 q 364 47 350 47 q 452 59 413 47 q 520 94 491 72 q 563 148 548 116 q 578 218 578 180 q 564 294 578 255 q 524 366 551 334 q 454 420 496 399 q 352 441 411 441 m 689 241 q 666 137 689 183 q 602 57 643 90 q 504 7 561 25 q 378 -10 447 -10 q 343 -9 364 -10 q 298 -8 322 -9 q 250 -7 275 -7 q 201 -5 224 -6 q 83 0 144 -2 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 807 q 81 800 106 803 q 33 792 56 796 l 27 834 q 88 848 54 841 q 162 861 123 856 q 241 871 201 867 q 318 875 281 875 q 440 862 385 875 q 534 826 495 849 q 593 768 572 802 q 614 692 614 734 q 579 566 614 619 q 484 491 544 514 q 565 460 528 482 q 630 405 602 437 q 673 330 657 372 q 689 241 689 288 m 426 -189 q 420 -225 426 -208 q 403 -254 414 -242 q 378 -274 393 -267 q 347 -282 364 -282 q 303 -265 316 -282 q 290 -217 290 -248 q 296 -181 290 -198 q 313 -151 302 -164 q 338 -132 324 -139 q 368 -125 352 -125 q 426 -189 426 -125 "},"™":{"x_min":39.984375,"x_max":735.3125,"ha":776,"o":"m 117 547 l 117 563 q 149 573 141 568 q 158 581 158 577 l 158 827 l 83 827 q 75 825 79 827 q 69 819 72 823 q 62 806 66 814 q 52 783 58 797 l 39 787 q 40 802 39 793 q 42 821 41 811 q 45 841 44 831 q 48 855 47 850 l 314 855 l 322 848 q 321 833 321 842 q 319 815 320 824 q 317 797 318 805 q 314 783 316 789 l 302 783 q 293 815 297 804 q 278 827 289 827 l 207 827 l 207 581 q 214 573 207 578 q 247 563 221 568 l 247 547 l 117 547 m 729 838 q 698 832 715 838 l 700 578 q 708 571 700 575 q 735 563 717 566 l 735 547 l 616 547 l 616 563 q 643 571 633 566 q 654 578 654 575 l 651 787 l 542 547 l 523 547 l 413 786 l 411 578 q 419 571 411 575 q 445 563 427 566 l 445 547 l 340 547 l 340 563 q 366 571 358 566 q 375 578 375 575 l 377 831 q 359 836 368 835 q 343 838 350 838 l 343 855 l 421 855 q 428 851 426 855 q 437 833 431 847 l 538 621 l 636 833 q 644 851 642 848 q 653 855 647 855 l 729 855 l 729 838 "},"ặ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 380 -189 q 374 -225 380 -208 q 357 -254 368 -242 q 332 -274 346 -267 q 301 -282 318 -282 q 257 -265 270 -282 q 244 -217 244 -248 q 250 -181 244 -198 q 267 -151 256 -164 q 292 -132 278 -139 q 322 -125 306 -125 q 380 -189 380 -125 m 545 922 q 500 829 525 867 q 446 768 474 792 q 387 735 418 745 q 326 725 357 725 q 262 735 293 725 q 203 768 231 745 q 150 829 174 792 q 105 922 125 867 q 121 941 113 934 q 141 953 129 947 q 180 887 158 914 q 226 845 202 861 q 276 822 250 829 q 324 815 301 815 q 374 822 347 815 q 424 845 400 829 q 471 887 449 861 q 510 953 493 914 q 529 941 521 947 q 545 922 537 934 "},"Ř":{"x_min":27.5625,"x_max":771.921875,"ha":779,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 806 q 83 799 108 803 q 33 792 58 795 l 27 834 q 91 849 59 842 q 159 862 124 856 q 233 871 195 868 q 317 875 272 875 q 454 859 396 875 q 551 815 512 843 q 609 750 590 788 q 628 669 628 712 q 614 580 628 620 q 574 510 600 541 q 514 458 549 480 q 436 423 478 436 l 642 93 q 664 70 652 78 q 690 56 676 61 q 723 52 705 52 q 764 53 741 51 l 771 24 q 686 0 727 9 q 620 -10 646 -10 q 581 1 600 -10 q 553 27 563 12 l 348 408 q 331 406 339 406 l 312 406 q 277 408 295 406 q 241 414 259 410 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 293 818 q 241 816 267 818 l 241 468 q 272 464 259 465 q 301 464 286 464 q 465 511 408 464 q 523 648 523 558 q 509 716 523 685 q 468 770 496 748 q 396 805 440 792 q 293 818 353 818 m 389 943 l 316 943 l 137 1151 q 145 1162 142 1157 q 152 1170 149 1167 q 159 1176 155 1174 q 168 1183 162 1179 l 354 1039 l 537 1183 q 554 1170 549 1176 q 567 1151 558 1164 l 389 943 "},"Ň":{"x_min":33.65625,"x_max":867.34375,"ha":901,"o":"m 33 0 l 33 29 q 107 48 83 35 q 132 70 132 61 l 132 779 q 84 811 109 800 q 33 825 60 821 l 33 855 l 177 855 q 194 853 187 855 q 207 846 200 851 q 221 830 214 840 q 242 802 229 819 l 688 187 l 688 783 q 665 805 688 791 q 589 825 643 818 l 589 855 l 867 855 l 867 825 q 793 806 818 819 q 769 783 769 793 l 769 -20 q 716 -6 735 -15 q 689 14 697 3 l 213 673 l 213 70 q 235 49 213 62 q 311 29 258 36 l 311 0 l 33 0 m 487 943 l 415 943 l 236 1151 q 244 1162 240 1157 q 250 1170 247 1167 q 257 1176 253 1174 q 266 1183 261 1179 l 453 1039 l 636 1183 q 652 1170 647 1176 q 665 1151 657 1164 l 487 943 "},"ừ":{"x_min":27.515625,"x_max":851,"ha":851,"o":"m 851 707 q 840 662 851 688 q 803 608 830 637 q 733 549 777 579 q 621 491 688 519 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 683 71 l 725 55 q 676 25 699 39 q 634 1 653 11 q 599 -14 614 -8 q 576 -20 584 -20 q 537 11 552 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 20 186 -2 q 128 84 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 609 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 531 519 513 q 502 559 512 549 q 473 574 492 570 q 424 579 455 578 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 625 l 620 538 q 672 568 650 553 q 707 599 693 584 q 727 627 721 614 q 734 652 734 641 q 723 689 734 671 q 694 722 713 707 l 815 777 q 841 744 831 762 q 851 707 851 726 m 446 731 q 429 718 438 722 q 408 710 420 713 l 170 965 l 185 993 q 205 998 191 995 q 232 1003 218 1000 q 261 1007 247 1005 q 284 1010 276 1009 l 446 731 "},"Ợ":{"x_min":48,"x_max":828,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 410 797 448 797 q 301 771 349 797 q 221 698 254 746 q 170 584 188 651 q 153 434 153 517 q 173 290 153 358 q 229 171 194 223 q 310 90 264 120 q 410 61 357 61 q 513 84 466 61 q 594 153 560 107 q 648 268 629 200 q 667 426 667 337 m 828 944 q 820 906 828 927 q 794 861 812 885 q 745 812 776 837 q 667 761 714 786 q 745 614 719 698 q 772 439 772 529 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 390 -20 467 -20 q 245 15 309 -20 q 137 112 181 51 q 71 251 94 172 q 48 415 48 329 q 77 590 48 507 q 159 737 107 674 q 280 837 210 800 q 429 875 349 875 q 542 853 492 875 q 634 796 593 832 q 693 846 675 821 q 711 889 711 871 q 700 926 711 908 q 671 959 690 944 l 792 1014 q 818 981 808 999 q 828 944 828 963 m 485 -189 q 479 -225 485 -208 q 462 -254 473 -242 q 437 -274 452 -267 q 406 -282 423 -282 q 362 -265 375 -282 q 349 -217 349 -248 q 355 -181 349 -198 q 372 -151 361 -164 q 397 -132 383 -139 q 427 -125 411 -125 q 485 -189 485 -125 "},"ƴ":{"x_min":-31.875,"x_max":936.625,"ha":685,"o":"m 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 123 l 537 599 q 603 733 567 680 q 678 818 640 786 q 755 862 717 849 q 826 875 793 875 q 867 871 847 875 q 902 863 887 868 q 927 852 917 858 q 936 839 936 845 q 929 823 936 835 q 910 797 921 811 q 884 770 898 783 q 857 748 870 756 q 831 761 843 756 q 809 767 819 765 q 789 769 798 769 l 773 769 q 730 757 752 769 q 687 724 708 745 q 646 670 666 702 q 612 598 627 639 l 366 -62 q 300 -196 337 -143 q 225 -281 264 -250 q 149 -326 187 -313 q 78 -339 111 -339 q 37 -335 57 -339 q 2 -327 17 -332 q -22 -316 -12 -322 q -31 -303 -31 -309 q -24 -287 -31 -299 q -5 -261 -16 -275 q 20 -233 6 -247 q 47 -212 33 -220 q 95 -231 73 -229 q 131 -234 116 -234 q 174 -222 152 -234 q 219 -188 197 -210 q 261 -134 241 -166 q 296 -61 280 -102 l 311 -19 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 "},"É":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 250 927 q 234 938 239 931 q 220 957 229 944 l 482 1173 q 501 1162 489 1168 q 524 1148 512 1156 q 547 1134 537 1141 q 562 1122 557 1128 l 569 1092 l 250 927 "},"ṅ":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 544 496 549 470 q 529 537 539 522 q 502 557 519 552 q 462 563 486 563 q 415 552 441 563 q 360 520 389 542 q 298 461 330 497 q 234 372 266 425 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 59 l 132 482 q 129 524 132 508 q 118 548 127 540 q 90 561 109 557 q 37 570 71 565 l 37 597 q 122 618 83 604 q 199 651 161 632 l 223 627 l 231 458 q 296 539 260 503 q 369 599 332 575 q 440 637 406 624 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 m 459 854 q 453 818 459 835 q 436 789 447 801 q 412 769 426 776 q 380 762 397 762 q 336 778 350 762 q 323 826 323 795 q 329 862 323 845 q 346 892 335 879 q 371 911 357 904 q 401 919 385 919 q 459 854 459 919 "},"³":{"x_min":25.5,"x_max":397,"ha":456,"o":"m 397 575 q 383 510 397 540 q 344 457 370 480 q 282 421 319 434 q 199 408 245 408 q 112 423 156 408 q 25 475 68 439 l 41 502 q 81 480 62 489 q 117 465 100 470 q 151 458 134 460 q 186 456 168 456 q 275 482 241 456 q 309 561 309 509 q 298 613 309 592 q 271 646 288 633 q 234 664 254 659 q 194 670 214 670 l 184 670 q 178 670 181 670 q 172 669 176 669 q 161 667 169 668 l 155 698 q 223 721 197 709 q 261 748 248 734 q 278 776 274 761 q 282 802 282 790 q 277 830 282 816 q 263 854 273 843 q 238 871 254 865 q 201 878 223 878 q 147 861 166 878 q 134 816 129 844 q 97 805 119 808 q 55 800 75 801 l 42 812 q 57 849 42 829 q 98 884 73 868 q 158 912 124 901 q 229 923 191 923 q 292 913 265 923 q 335 887 318 903 q 361 851 353 871 q 370 810 370 830 q 363 779 370 794 q 343 749 356 763 q 312 723 330 735 q 270 704 293 711 q 320 690 297 701 q 361 662 344 679 q 387 622 377 644 q 397 575 397 600 "},"Ṧ":{"x_min":79.515625,"x_max":600,"ha":661,"o":"m 600 255 q 591 193 600 225 q 567 130 583 161 q 525 72 550 99 q 467 24 501 45 q 391 -7 433 4 q 298 -20 349 -20 q 249 -15 276 -20 q 195 -2 223 -10 q 140 18 167 6 q 89 46 112 30 q 81 69 84 48 q 79 116 79 89 q 81 172 79 144 q 89 219 83 201 l 116 216 q 155 147 132 176 q 207 98 179 117 q 268 70 235 79 q 336 61 301 61 q 397 73 366 61 q 452 107 428 86 q 492 158 476 129 q 508 219 508 187 q 489 290 508 261 q 441 343 471 320 q 374 385 412 366 q 297 421 336 403 q 219 460 257 440 q 152 508 181 480 q 104 570 122 535 q 86 655 86 606 q 92 701 86 676 q 111 750 98 725 q 146 797 125 774 q 198 837 168 820 q 267 864 228 854 q 356 875 307 875 q 417 870 387 875 q 475 857 448 865 q 523 837 502 849 q 557 812 545 826 q 558 796 562 808 q 544 770 553 784 q 524 743 535 756 q 505 722 513 729 l 480 726 q 440 763 461 748 q 398 789 420 779 q 356 802 377 798 q 316 807 335 807 q 251 795 278 807 q 207 766 224 783 q 182 728 190 749 q 174 687 174 706 q 192 631 174 655 q 240 585 210 606 q 308 546 270 565 q 387 508 346 528 q 465 465 427 488 q 533 412 503 442 q 581 344 563 382 q 600 255 600 306 m 375 943 l 303 943 l 124 1151 q 132 1162 128 1157 q 138 1170 135 1167 q 145 1176 141 1174 q 154 1183 149 1179 l 341 1039 l 524 1183 q 540 1170 535 1176 q 553 1151 545 1164 l 375 943 m 407 1262 q 401 1226 407 1243 q 384 1197 395 1209 q 359 1177 374 1184 q 328 1170 345 1170 q 284 1186 297 1170 q 271 1235 271 1203 q 277 1270 271 1253 q 294 1300 283 1287 q 319 1319 305 1312 q 349 1327 333 1327 q 407 1262 407 1327 "},"ṗ":{"x_min":37.046875,"x_max":682,"ha":736,"o":"m 590 288 q 576 398 590 347 q 539 486 562 449 q 485 544 516 523 q 422 566 455 566 q 390 558 410 566 q 345 533 370 551 q 292 486 320 515 q 234 413 263 456 l 234 144 q 290 106 264 121 q 339 83 316 91 q 382 71 362 74 q 421 68 402 68 q 488 82 457 68 q 541 124 519 96 q 577 193 564 152 q 590 288 590 234 m 682 333 q 671 253 682 294 q 643 172 661 211 q 601 97 626 133 q 548 36 577 62 q 487 -4 519 10 q 422 -20 455 -20 q 332 2 382 -20 q 234 66 282 24 l 234 -254 q 259 -276 234 -265 q 348 -296 284 -287 l 348 -326 l 37 -326 l 37 -296 q 106 -276 81 -286 q 132 -254 132 -266 l 132 481 q 129 522 132 506 q 116 549 126 539 q 88 563 106 558 q 37 569 69 567 l 37 596 q 81 606 60 601 q 121 619 102 612 q 160 633 141 625 q 200 651 180 641 l 223 627 l 230 492 q 298 563 263 533 q 363 612 332 593 q 421 641 394 632 q 468 651 448 651 q 553 629 514 651 q 621 566 593 607 q 666 466 650 525 q 682 333 682 407 m 427 854 q 420 818 427 835 q 404 789 414 801 q 379 769 393 776 q 348 762 365 762 q 304 778 317 762 q 291 826 291 795 q 297 862 291 845 q 314 892 303 879 q 339 911 325 904 q 369 919 352 919 q 427 854 427 919 "},"[":{"x_min":95,"x_max":400.25,"ha":428,"o":"m 400 -168 q 391 -198 396 -182 q 380 -227 386 -215 l 95 -227 l 95 1085 l 376 1085 l 398 1067 q 390 1032 395 1050 q 380 1007 384 1015 l 190 1007 l 190 -149 l 376 -149 l 400 -168 "},"Ǹ":{"x_min":33.65625,"x_max":867.34375,"ha":901,"o":"m 33 0 l 33 29 q 107 48 83 35 q 132 70 132 61 l 132 779 q 84 811 109 800 q 33 825 60 821 l 33 855 l 177 855 q 194 853 187 855 q 207 846 200 851 q 221 830 214 840 q 242 802 229 819 l 688 187 l 688 783 q 665 805 688 791 q 589 825 643 818 l 589 855 l 867 855 l 867 825 q 793 806 818 819 q 769 783 769 793 l 769 -20 q 716 -6 735 -15 q 689 14 697 3 l 213 673 l 213 70 q 235 49 213 62 q 311 29 258 36 l 311 0 l 33 0 m 571 957 q 556 938 561 944 q 540 927 551 931 l 222 1092 l 227 1122 q 243 1134 232 1128 q 265 1148 253 1141 q 289 1162 278 1156 q 308 1173 301 1168 l 571 957 "},"Ḗ":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 576 1058 q 571 1041 575 1051 q 564 1021 568 1031 q 556 1002 560 1012 q 550 987 552 993 l 132 987 l 118 1003 q 122 1020 119 1011 q 130 1040 126 1030 q 138 1059 134 1049 q 145 1075 142 1068 l 561 1075 l 576 1058 m 250 1144 q 234 1155 239 1148 q 220 1174 229 1161 l 482 1390 q 501 1379 489 1385 q 524 1365 512 1373 q 547 1352 537 1358 q 562 1339 557 1345 l 569 1309 l 250 1144 "},"∏":{"x_min":32.984375,"x_max":828.015625,"ha":875,"o":"m 32 0 l 32 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 106 804 132 791 q 32 825 81 816 l 32 855 l 828 855 l 828 825 q 755 804 781 816 q 729 783 729 793 l 729 70 q 753 50 729 62 q 828 29 778 38 l 828 0 l 521 0 l 521 29 q 593 49 567 38 q 620 70 620 61 l 620 751 q 610 767 620 759 q 584 782 601 775 q 540 793 566 789 q 481 798 514 798 l 368 798 q 313 792 337 797 q 273 782 289 788 q 249 767 257 775 q 241 751 241 759 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 32 0 "},"Ḥ":{"x_min":33.65625,"x_max":861.34375,"ha":908,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 478 l 654 478 l 654 783 q 629 804 654 791 q 555 825 604 816 l 555 855 l 861 855 l 861 825 q 789 804 815 816 q 763 783 763 793 l 763 70 q 787 50 763 62 q 861 29 812 38 l 861 0 l 555 0 l 555 29 q 627 49 601 38 q 654 70 654 61 l 654 417 l 241 417 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 515 -189 q 509 -225 515 -208 q 493 -254 503 -242 q 468 -274 482 -267 q 437 -282 454 -282 q 393 -265 406 -282 q 379 -217 379 -248 q 386 -181 379 -198 q 403 -151 392 -164 q 427 -132 413 -139 q 458 -125 441 -125 q 515 -189 515 -125 "},"ḥ":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 543 496 549 470 q 528 537 538 522 q 500 557 517 552 q 462 563 484 563 q 411 550 438 563 q 353 514 383 538 q 293 455 324 491 q 234 372 263 419 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 880 q 129 924 132 908 q 117 949 127 940 q 88 961 107 958 q 37 969 69 965 l 37 996 q 88 1007 65 1002 q 132 1019 112 1013 q 170 1033 152 1025 q 208 1051 189 1040 l 234 1027 l 233 463 q 298 541 262 507 q 370 600 334 576 q 440 638 406 625 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 m 459 -189 q 453 -225 459 -208 q 436 -254 447 -242 q 412 -274 426 -267 q 380 -282 397 -282 q 336 -265 350 -282 q 323 -217 323 -248 q 329 -181 323 -198 q 346 -151 335 -164 q 371 -132 357 -139 q 401 -125 385 -125 q 459 -189 459 -125 "},"ˋ":{"x_min":0,"x_max":276.703125,"ha":277,"o":"m 276 731 q 259 718 267 722 q 238 710 250 713 l 0 965 l 14 993 q 34 998 21 995 q 62 1003 48 1000 q 91 1007 77 1005 q 113 1010 105 1009 l 276 731 "},"ğ":{"x_min":20,"x_max":670.8125,"ha":678,"o":"m 468 406 q 456 474 468 442 q 420 531 444 507 q 362 569 397 555 q 282 583 327 583 q 244 574 265 583 q 205 548 224 565 q 175 505 187 531 q 163 446 163 479 q 174 378 163 410 q 208 322 185 346 q 265 284 230 298 q 348 271 300 271 q 389 279 368 271 q 428 305 411 287 q 456 347 445 322 q 468 406 468 372 m 351 -2 q 303 3 325 0 q 263 10 282 6 q 186 -36 214 -15 q 143 -74 157 -57 q 125 -104 129 -90 q 122 -128 122 -118 q 140 -182 122 -157 q 191 -226 159 -208 q 265 -256 223 -245 q 353 -268 307 -268 q 436 -255 399 -268 q 500 -222 473 -243 q 541 -171 526 -200 q 556 -106 556 -141 q 547 -71 556 -87 q 515 -42 538 -55 q 452 -19 492 -29 q 351 -2 412 -9 m 563 434 q 539 339 563 382 q 478 265 516 296 q 392 217 440 234 q 294 200 343 200 l 291 200 q 246 154 259 172 q 234 132 234 136 q 241 116 234 124 q 268 102 248 109 q 321 87 287 94 q 408 74 355 80 q 530 50 482 66 q 607 12 578 33 q 646 -33 635 -8 q 658 -81 658 -57 q 643 -152 658 -118 q 605 -214 629 -185 q 547 -265 580 -242 q 476 -305 514 -288 q 397 -330 438 -321 q 316 -339 356 -339 q 250 -334 284 -339 q 183 -320 216 -330 q 120 -296 150 -311 q 68 -261 91 -282 q 33 -214 46 -240 q 20 -155 20 -188 q 26 -118 20 -137 q 52 -76 32 -98 q 107 -28 72 -54 q 201 28 142 -2 q 140 63 157 44 q 123 103 123 83 q 126 118 123 109 q 140 140 129 127 q 170 170 150 153 q 220 209 189 187 q 158 236 186 218 q 110 280 130 254 q 79 337 90 305 q 68 408 68 370 q 90 502 68 457 q 149 579 112 546 q 232 631 185 612 q 329 651 279 651 q 405 639 369 651 q 470 606 440 627 q 533 615 505 610 q 585 627 562 621 q 625 639 607 633 q 657 651 643 645 l 670 630 q 655 595 662 611 q 632 562 647 579 q 581 555 606 558 q 525 551 556 552 q 553 496 543 525 q 563 434 563 467 m 559 922 q 513 829 539 867 q 460 768 488 792 q 401 735 432 745 q 340 725 370 725 q 276 735 307 725 q 216 768 244 745 q 163 829 188 792 q 118 922 139 867 q 134 941 126 934 q 154 953 143 947 q 193 887 171 914 q 240 845 215 861 q 289 822 264 829 q 337 815 315 815 q 387 822 361 815 q 438 845 413 829 q 485 887 463 861 q 523 953 507 914 q 543 941 535 947 q 559 922 551 934 "},"Ở":{"x_min":48,"x_max":828,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 410 797 448 797 q 301 771 349 797 q 221 698 254 746 q 170 584 188 651 q 153 434 153 517 q 173 290 153 358 q 229 171 194 223 q 310 90 264 120 q 410 61 357 61 q 513 84 466 61 q 594 153 560 107 q 648 268 629 200 q 667 426 667 337 m 828 944 q 820 906 828 927 q 794 861 812 885 q 745 812 776 837 q 667 761 714 786 q 745 614 719 698 q 772 439 772 529 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 390 -20 467 -20 q 245 15 309 -20 q 137 112 181 51 q 71 251 94 172 q 48 415 48 329 q 77 590 48 507 q 159 737 107 674 q 280 837 210 800 q 429 875 349 875 q 542 853 492 875 q 634 796 593 832 q 693 846 675 821 q 711 889 711 871 q 700 926 711 908 q 671 959 690 944 l 792 1014 q 818 981 808 999 q 828 944 828 963 m 531 1121 q 518 1088 531 1103 q 489 1060 506 1073 q 456 1034 472 1046 q 433 1010 440 1023 q 432 984 425 997 q 467 953 438 970 q 446 945 457 947 q 425 943 435 944 q 380 970 394 957 q 362 993 365 982 q 366 1014 359 1004 q 384 1032 372 1023 q 409 1050 395 1041 q 436 1068 424 1059 q 456 1088 448 1078 q 465 1111 465 1099 q 452 1150 465 1137 q 420 1163 439 1163 q 401 1159 409 1163 q 386 1149 393 1155 q 377 1135 380 1143 q 374 1120 374 1128 q 375 1113 374 1117 q 379 1106 377 1110 q 365 1102 374 1104 q 347 1097 357 1099 q 328 1094 337 1095 q 311 1091 318 1092 l 304 1099 l 304 1108 q 317 1139 304 1124 q 350 1167 330 1155 q 394 1188 370 1180 q 442 1196 418 1196 q 508 1175 485 1196 q 531 1121 531 1155 "},"Ṙ":{"x_min":27.5625,"x_max":771.921875,"ha":779,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 806 q 83 799 108 803 q 33 792 58 795 l 27 834 q 91 849 59 842 q 159 862 124 856 q 233 871 195 868 q 317 875 272 875 q 454 859 396 875 q 551 815 512 843 q 609 750 590 788 q 628 669 628 712 q 614 580 628 620 q 574 510 600 541 q 514 458 549 480 q 436 423 478 436 l 642 93 q 664 70 652 78 q 690 56 676 61 q 723 52 705 52 q 764 53 741 51 l 771 24 q 686 0 727 9 q 620 -10 646 -10 q 581 1 600 -10 q 553 27 563 12 l 348 408 q 331 406 339 406 l 312 406 q 277 408 295 406 q 241 414 259 410 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 293 818 q 241 816 267 818 l 241 468 q 272 464 259 465 q 301 464 286 464 q 465 511 408 464 q 523 648 523 558 q 509 716 523 685 q 468 770 496 748 q 396 805 440 792 q 293 818 353 818 m 420 1045 q 414 1009 420 1026 q 398 980 408 992 q 373 960 387 967 q 342 953 359 953 q 298 969 311 953 q 284 1018 284 986 q 291 1053 284 1036 q 308 1083 297 1070 q 332 1102 318 1095 q 363 1110 346 1110 q 420 1045 420 1110 "},"ª":{"x_min":33,"x_max":348.484375,"ha":355,"o":"m 348 520 q 296 491 317 499 q 264 482 275 482 q 245 495 255 482 q 231 538 235 509 q 166 495 198 508 q 112 482 135 482 q 84 486 98 482 q 59 499 70 490 q 40 523 47 508 q 33 559 33 537 q 65 633 33 601 q 166 685 97 666 l 229 701 l 229 712 q 226 749 229 733 q 218 776 224 765 q 200 793 212 787 q 170 799 188 799 q 149 794 160 799 q 130 781 138 789 q 118 760 122 772 q 120 734 115 748 q 112 727 121 731 q 90 720 102 723 q 66 715 78 717 q 49 715 54 714 l 44 729 q 65 769 47 750 q 108 804 84 789 q 159 829 133 820 q 202 838 184 838 q 243 831 226 838 q 271 808 260 824 q 286 767 281 792 q 291 704 291 741 l 291 571 q 293 543 291 552 q 301 530 296 535 q 314 529 304 528 q 344 537 325 530 l 348 520 m 34 397 l 34 447 l 328 447 l 328 397 l 34 397 m 229 569 l 229 672 l 199 665 q 150 647 169 657 q 119 626 130 637 q 103 602 107 615 q 99 575 99 589 q 102 552 99 560 q 111 538 106 543 q 123 531 117 533 q 134 529 129 529 q 179 538 155 529 q 229 569 203 548 "},"T":{"x_min":6.34375,"x_max":734.5625,"ha":765,"o":"m 207 0 l 207 29 q 260 42 238 35 q 294 55 281 48 q 313 67 307 61 q 319 78 319 73 l 319 794 l 116 794 q 97 790 106 794 q 80 774 89 786 q 61 738 72 762 q 35 675 50 714 l 6 688 q 15 773 9 728 q 28 855 21 819 l 714 855 l 734 838 q 727 762 733 803 q 714 678 722 721 l 683 678 q 671 731 676 709 q 659 767 666 753 q 644 787 653 781 q 620 794 634 794 l 428 794 l 428 78 q 452 55 428 69 q 539 29 476 42 l 539 0 l 207 0 "},"š":{"x_min":54.25,"x_max":483.578125,"ha":536,"o":"m 474 192 q 460 109 474 144 q 425 51 446 75 q 377 13 403 28 q 325 -7 350 0 q 276 -17 299 -15 q 241 -20 254 -20 q 163 -7 208 -20 q 72 29 117 4 q 65 51 67 31 q 64 97 63 71 q 68 150 65 123 q 77 192 72 176 l 106 185 q 120 131 107 156 q 157 88 134 106 q 209 58 179 69 q 275 48 239 48 q 319 55 299 48 q 354 77 340 63 q 377 111 369 91 q 386 154 386 130 q 371 202 386 181 q 333 240 356 223 q 279 273 309 258 q 218 304 249 288 q 163 335 189 319 q 116 371 137 351 q 83 417 96 392 q 71 474 71 442 q 87 549 71 516 q 132 604 104 582 q 196 639 160 627 q 271 651 233 651 q 317 647 292 651 q 367 636 343 643 q 414 620 392 629 q 449 598 435 611 q 450 580 453 594 q 440 549 447 566 q 426 517 434 532 q 415 497 419 502 l 389 502 q 321 570 356 551 q 254 590 287 590 q 214 582 231 590 q 184 563 196 575 q 165 537 171 551 q 159 508 159 522 q 171 469 159 486 q 205 437 184 452 q 253 408 226 421 q 308 379 280 394 q 367 347 337 364 q 420 308 396 330 q 459 258 444 286 q 474 192 474 230 m 305 726 l 233 726 l 54 968 q 62 979 59 974 q 68 987 65 984 q 75 993 71 991 q 84 1000 79 996 l 271 829 l 454 1000 q 470 987 465 993 q 483 968 475 981 l 305 726 "},"":{"x_min":40.6875,"x_max":418.46875,"ha":459,"o":"m 418 247 q 408 215 415 232 q 398 186 402 198 l 57 186 l 40 204 q 49 234 44 217 q 61 264 55 250 l 401 264 l 418 247 m 418 422 q 408 391 415 409 l 398 363 l 57 363 l 40 380 q 49 410 44 393 q 61 440 55 427 l 401 440 l 418 422 "},"Þ":{"x_min":32.984375,"x_max":666,"ha":726,"o":"m 32 0 l 32 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 106 804 132 791 q 32 825 81 816 l 32 855 l 359 855 l 359 825 q 302 814 325 819 q 265 803 278 808 q 246 793 251 798 q 241 783 241 788 l 241 688 q 346 692 283 692 q 478 676 419 692 q 578 630 537 660 q 643 555 620 599 q 666 451 666 510 q 652 366 666 405 q 617 297 639 327 q 566 245 595 267 q 507 208 538 223 q 445 187 476 194 q 388 180 414 180 q 329 185 357 180 q 279 202 302 190 l 263 250 q 318 234 292 237 q 368 231 344 231 q 433 243 399 231 q 495 279 467 255 q 542 339 524 303 q 561 424 561 376 q 541 520 561 480 q 486 585 521 560 q 405 623 451 611 q 307 635 359 635 q 241 633 273 635 l 241 70 q 246 61 241 66 q 265 51 251 56 q 301 40 278 46 q 359 29 324 35 l 359 0 l 32 0 "},"j":{"x_min":-149.234375,"x_max":261,"ha":359,"o":"m 241 67 q 231 -65 241 -10 q 203 -158 221 -119 q 162 -223 186 -196 q 111 -271 139 -249 q 73 -297 93 -285 q 32 -319 52 -310 q -5 -333 12 -328 q -36 -339 -23 -339 q -77 -333 -57 -339 q -113 -321 -97 -328 q -139 -305 -129 -313 q -149 -291 -149 -297 q -139 -275 -149 -285 q -116 -253 -129 -264 q -87 -231 -102 -241 q -63 -216 -73 -221 q -18 -241 -41 -235 q 30 -247 4 -247 q 69 -234 50 -247 q 104 -190 88 -221 q 129 -106 120 -159 q 139 29 139 -52 l 139 454 q 137 510 139 489 q 126 542 135 531 q 98 560 117 554 q 44 569 79 565 l 44 596 q 94 607 72 601 q 136 620 116 613 q 175 634 156 626 q 215 651 194 642 l 241 651 l 241 67 m 261 854 q 254 818 261 835 q 238 789 248 801 q 213 769 227 776 q 183 762 199 762 q 138 778 152 762 q 125 826 125 795 q 131 862 125 845 q 148 892 137 879 q 172 911 158 904 q 203 919 187 919 q 261 854 261 919 "},"1":{"x_min":93.84375,"x_max":569.546875,"ha":652,"o":"m 114 0 l 114 35 q 203 49 167 42 q 259 65 238 57 q 289 81 280 73 q 298 96 298 89 l 298 637 q 295 679 298 664 q 285 703 293 694 q 270 710 281 707 q 237 712 258 713 q 184 707 216 711 q 108 694 152 703 l 93 728 q 161 751 122 736 q 240 781 200 765 q 316 815 280 798 q 374 844 352 831 l 400 820 l 400 96 q 407 82 400 90 q 433 66 414 74 q 485 50 452 58 q 569 35 518 42 l 569 0 l 114 0 "},"ɣ":{"x_min":13.796875,"x_max":670.875,"ha":685,"o":"m 334 28 q 296 -50 311 -17 q 272 -106 281 -83 q 260 -144 263 -128 q 257 -170 257 -159 q 264 -217 257 -198 q 283 -247 271 -236 q 308 -263 294 -259 q 336 -268 322 -268 q 361 -261 349 -268 q 384 -245 374 -255 q 401 -220 395 -234 q 408 -191 408 -206 q 405 -155 408 -172 q 396 -119 403 -139 q 379 -72 390 -99 q 350 -5 368 -46 l 334 28 m 670 601 q 637 592 650 597 q 617 583 625 588 q 605 571 609 578 q 596 555 601 565 l 394 149 l 430 72 q 463 0 449 32 q 485 -56 476 -30 q 498 -107 494 -82 q 502 -159 502 -131 q 491 -215 502 -184 q 460 -274 481 -246 q 406 -320 438 -301 q 327 -339 373 -339 q 271 -328 297 -339 q 224 -298 244 -317 q 193 -252 205 -279 q 182 -192 182 -225 q 184 -157 182 -175 q 194 -116 187 -138 q 214 -63 202 -93 q 247 6 227 -33 l 297 108 l 89 555 q 64 583 81 573 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 233 594 249 598 q 209 585 217 590 q 200 573 200 580 q 204 555 199 565 l 356 230 l 515 555 q 518 572 520 565 q 509 584 517 579 q 485 594 501 590 q 444 601 469 597 l 444 631 l 670 631 l 670 601 "},"ɩ":{"x_min":33.375,"x_max":405.984375,"ha":392,"o":"m 405 91 q 341 37 371 59 q 287 3 312 15 q 244 -14 263 -9 q 212 -20 225 -20 q 170 -10 186 -20 q 145 18 154 -1 q 132 67 135 37 q 129 137 129 97 l 129 454 q 127 510 129 489 q 117 543 126 531 q 89 560 109 555 q 33 569 70 566 l 33 596 q 78 606 54 600 q 124 619 101 612 q 169 634 148 626 q 207 651 190 642 l 231 651 l 231 205 q 233 133 231 159 q 240 93 235 106 q 256 75 246 79 q 281 72 265 72 q 319 83 288 72 q 395 126 351 95 l 405 91 "},"Ǜ":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 662 1045 q 656 1009 662 1026 q 639 980 650 992 q 614 960 629 967 q 583 953 600 953 q 539 969 552 953 q 526 1018 526 986 q 532 1053 526 1036 q 549 1083 538 1070 q 574 1102 560 1095 q 604 1110 588 1110 q 662 1045 662 1110 m 391 1045 q 385 1009 391 1026 q 368 980 379 992 q 343 960 358 967 q 312 953 329 953 q 268 969 281 953 q 255 1018 255 986 q 261 1053 255 1036 q 278 1083 267 1070 q 303 1102 289 1095 q 333 1110 317 1110 q 391 1045 391 1110 m 579 1174 q 564 1155 569 1161 q 548 1144 559 1148 l 230 1309 l 236 1339 q 251 1352 240 1345 q 274 1365 261 1358 q 297 1379 286 1373 q 316 1390 309 1385 l 579 1174 "},"ǒ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 399 726 l 326 726 l 147 968 q 155 979 152 974 q 162 987 159 984 q 169 993 165 991 q 178 1000 172 996 l 364 829 l 548 1000 q 564 987 559 993 q 577 968 569 981 l 399 726 "},"ĉ":{"x_min":54,"x_max":569.71875,"ha":607,"o":"m 569 129 q 492 47 525 76 q 430 2 458 17 q 374 -16 401 -12 q 315 -20 347 -20 q 218 2 265 -20 q 134 65 171 24 q 76 166 98 106 q 54 301 54 226 q 80 438 54 374 q 154 548 107 501 q 263 623 200 596 q 400 651 326 651 q 445 647 422 651 q 490 636 469 643 q 530 619 512 629 q 559 597 548 609 q 557 574 560 588 q 548 542 554 559 q 534 510 541 525 q 520 485 527 495 l 495 492 q 478 519 490 504 q 446 546 465 533 q 400 567 427 559 q 339 576 373 576 q 270 560 303 576 q 211 512 237 544 q 171 433 186 480 q 156 322 156 385 q 173 217 156 264 q 219 137 190 170 q 285 85 248 103 q 364 68 323 68 q 399 69 383 68 q 435 80 415 71 q 479 106 454 89 q 543 156 505 124 l 569 129 m 546 740 q 533 721 538 727 q 517 710 529 715 l 331 891 l 147 710 q 138 715 142 712 q 131 721 134 718 q 125 729 128 724 q 117 740 122 734 l 296 998 l 368 998 l 546 740 "},"Ɔ":{"x_min":41,"x_max":691,"ha":745,"o":"m 691 460 q 662 264 691 352 q 581 113 633 176 q 459 14 530 49 q 305 -20 389 -20 q 189 -1 239 -20 q 106 48 140 17 q 57 114 73 78 q 41 186 41 151 q 49 241 41 214 q 81 293 58 267 q 113 308 96 301 q 146 322 129 315 q 178 334 163 328 q 205 343 192 339 l 220 310 q 189 287 201 298 q 170 263 177 276 q 161 236 163 251 q 159 203 159 222 q 171 152 159 178 q 207 106 184 127 q 263 71 230 85 q 336 58 296 58 q 429 77 384 58 q 509 140 474 96 q 564 256 543 184 q 586 434 586 329 q 559 592 586 525 q 492 706 533 660 q 400 774 450 751 q 301 797 350 797 q 260 792 282 797 q 209 778 237 788 q 146 749 180 767 q 71 702 112 731 q 64 708 68 704 q 57 717 60 712 q 51 726 53 722 q 47 733 48 731 q 132 806 92 778 q 209 849 172 834 q 280 869 246 864 q 348 875 313 875 q 473 847 412 875 q 583 766 535 819 q 661 635 631 712 q 691 460 691 558 "},"ī":{"x_min":25.09375,"x_max":375.0625,"ha":376,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 m 375 868 q 370 851 373 861 q 362 831 366 841 q 355 812 358 822 q 348 797 351 803 l 40 797 l 25 813 q 29 830 26 821 q 37 850 33 840 q 45 869 41 859 q 52 885 49 878 l 360 885 l 375 868 "},"Ď":{"x_min":27.5625,"x_max":761,"ha":823,"o":"m 307 818 q 241 816 273 818 l 241 104 q 248 80 241 89 q 284 62 257 68 q 364 57 311 57 q 460 79 411 57 q 551 148 510 102 q 619 265 593 195 q 646 432 646 336 q 623 593 646 522 q 558 715 601 665 q 451 791 515 765 q 307 818 388 818 m 761 458 q 743 306 761 373 q 697 188 726 240 q 629 102 668 137 q 548 43 591 66 q 462 10 506 21 q 378 0 418 0 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 805 q 80 799 104 802 q 33 792 56 795 l 27 834 q 96 849 57 842 q 178 863 135 857 q 266 871 222 868 q 350 875 310 875 q 521 846 445 875 q 650 765 596 818 q 732 634 703 711 q 761 458 761 556 m 409 943 l 337 943 l 158 1151 q 166 1162 162 1157 q 172 1170 169 1167 q 179 1176 175 1174 q 188 1183 183 1179 l 375 1039 l 558 1183 q 574 1170 569 1176 q 587 1151 579 1164 l 409 943 "},"&":{"x_min":54,"x_max":912.4375,"ha":926,"o":"m 301 766 q 312 684 301 727 q 344 596 324 641 q 420 648 390 622 q 466 699 449 674 q 488 748 482 724 q 495 794 495 771 q 488 839 495 818 q 470 876 482 860 q 440 901 458 892 q 399 911 422 911 q 356 898 374 911 q 325 865 337 885 q 307 819 313 845 q 301 766 301 792 m 357 57 q 463 75 415 57 q 550 124 511 93 q 480 200 516 159 q 410 286 444 241 q 344 379 376 331 q 288 476 313 427 q 229 419 253 446 q 191 363 206 391 q 170 308 176 336 q 164 253 164 281 q 180 168 164 205 q 223 107 196 132 q 285 69 250 82 q 357 57 320 57 m 912 507 q 878 472 895 486 q 845 447 862 458 q 817 458 833 453 q 785 466 801 462 q 755 472 770 470 q 728 475 740 474 q 740 452 736 462 q 747 429 744 441 q 750 402 749 417 q 751 368 751 388 q 729 266 751 320 q 670 162 708 213 q 756 86 717 117 q 812 57 782 64 q 881 60 841 50 l 887 30 q 787 -7 828 5 q 732 -20 747 -20 q 680 7 717 -20 q 594 81 643 34 q 476 8 541 36 q 337 -20 411 -20 q 222 -3 274 -20 q 132 45 169 13 q 74 126 95 78 q 54 239 54 175 q 67 316 54 277 q 106 394 81 355 q 170 470 132 433 q 257 542 208 507 q 226 637 238 590 q 215 728 215 683 q 233 830 215 783 q 282 911 251 876 q 352 964 312 945 q 434 984 392 984 q 507 970 478 984 q 555 933 537 956 q 581 879 573 909 q 589 816 589 849 q 544 683 589 745 q 419 571 500 621 q 395 555 406 562 q 372 539 383 547 q 425 451 396 495 q 488 364 455 407 q 556 282 521 322 q 625 206 591 241 q 657 275 646 240 q 669 340 669 309 q 659 393 669 368 q 634 437 650 419 q 599 467 619 456 q 560 478 580 478 l 545 497 q 567 516 553 506 q 595 532 582 526 l 896 532 l 912 507 "},"ṻ":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 605 868 q 600 851 604 861 q 593 831 597 841 q 585 812 589 822 q 579 797 581 803 l 162 797 l 147 813 q 151 830 148 821 q 159 850 155 840 q 167 869 163 859 q 174 885 171 878 l 590 885 l 605 868 m 572 1098 q 566 1063 572 1079 q 550 1033 560 1046 q 525 1013 539 1021 q 494 1006 511 1006 q 450 1023 463 1006 q 436 1071 436 1040 q 443 1106 436 1090 q 460 1136 449 1123 q 484 1156 470 1148 q 515 1163 498 1163 q 572 1098 572 1163 m 301 1098 q 295 1063 301 1079 q 279 1033 289 1046 q 254 1013 268 1021 q 223 1006 240 1006 q 179 1023 192 1006 q 165 1071 165 1040 q 172 1106 165 1090 q 189 1136 178 1123 q 213 1156 199 1148 q 244 1163 227 1163 q 301 1098 301 1163 "},"G":{"x_min":47,"x_max":777.203125,"ha":810,"o":"m 707 805 q 705 792 711 802 q 688 770 699 782 q 663 746 677 757 q 641 726 650 734 l 619 730 q 573 765 596 751 q 523 786 549 778 q 467 796 497 793 q 405 800 438 800 q 362 792 388 800 q 309 767 337 784 q 253 721 281 749 q 202 652 225 693 q 165 556 179 611 q 152 431 152 502 q 177 267 152 337 q 243 152 202 197 q 334 83 283 106 q 437 61 385 61 q 528 70 487 61 q 604 98 570 80 l 604 328 q 597 343 604 336 q 575 357 591 350 q 532 370 559 364 q 464 384 505 377 l 464 413 l 777 413 l 777 384 q 722 359 738 375 q 706 328 706 344 l 706 104 q 615 38 655 63 q 542 1 576 14 q 479 -15 509 -11 q 419 -20 449 -20 q 284 5 350 -20 q 164 82 217 30 q 79 212 112 134 q 47 394 47 289 q 82 596 47 507 q 180 747 118 685 q 324 842 241 809 q 499 875 406 875 q 549 870 522 875 q 603 856 575 865 q 658 834 631 847 q 707 805 685 821 "},"`":{"x_min":20.34375,"x_max":297.0625,"ha":443,"o":"m 297 731 q 280 719 290 725 q 259 710 270 713 l 20 965 l 35 993 q 55 997 42 995 q 83 1002 68 999 q 111 1007 97 1005 q 134 1010 126 1009 l 297 731 "},"ỗ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 577 740 q 564 721 569 727 q 548 710 559 715 l 362 891 l 178 710 q 169 715 172 712 q 162 721 165 718 q 155 729 159 724 q 147 740 152 734 l 326 998 l 399 998 l 577 740 m 594 1217 q 564 1162 581 1189 q 527 1113 548 1135 q 482 1078 506 1092 q 431 1065 457 1065 q 386 1077 407 1065 q 344 1103 364 1089 q 304 1130 324 1118 q 264 1142 284 1142 q 215 1120 237 1142 q 167 1060 192 1098 l 131 1073 q 160 1129 143 1101 q 198 1178 177 1156 q 243 1213 219 1200 q 293 1227 267 1227 q 342 1215 319 1227 q 385 1188 365 1203 q 424 1162 406 1174 q 459 1150 442 1150 q 509 1171 484 1150 q 557 1233 534 1193 l 594 1217 "},"Ễ":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 554 957 q 541 938 546 944 q 525 927 537 932 l 339 1068 l 156 927 q 146 932 150 929 q 140 938 143 935 q 133 946 137 941 q 125 957 130 951 l 304 1167 l 377 1167 l 554 957 m 571 1374 q 542 1319 559 1346 q 504 1270 525 1292 q 459 1234 484 1248 q 408 1221 435 1221 q 363 1233 385 1221 q 322 1259 342 1245 q 281 1286 301 1274 q 242 1298 261 1298 q 192 1276 215 1298 q 145 1216 170 1254 l 109 1229 q 138 1285 121 1257 q 175 1334 154 1312 q 220 1369 196 1356 q 271 1383 244 1383 q 320 1371 297 1383 q 363 1344 343 1359 q 402 1318 383 1330 q 436 1306 420 1306 q 487 1327 462 1306 q 535 1389 512 1349 l 571 1374 "},"ằ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 545 922 q 500 829 525 867 q 446 768 474 792 q 387 735 418 745 q 326 725 357 725 q 262 735 293 725 q 203 768 231 745 q 150 829 174 792 q 105 922 125 867 q 121 941 113 934 q 141 953 129 947 q 180 887 158 914 q 226 845 202 861 q 276 822 250 829 q 324 815 301 815 q 374 822 347 815 q 424 845 400 829 q 471 887 449 861 q 510 953 493 914 q 529 941 521 947 q 545 922 537 934 m 402 948 q 385 935 394 939 q 364 927 376 930 l 126 1182 l 141 1210 q 161 1215 147 1212 q 188 1220 174 1217 q 217 1224 203 1222 q 240 1227 231 1226 l 402 948 "},"ŏ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 583 922 q 537 829 562 867 q 483 768 512 792 q 425 735 455 745 q 364 725 394 725 q 299 735 330 725 q 240 768 268 745 q 187 829 212 792 q 142 922 162 867 q 158 941 150 934 q 178 953 166 947 q 217 887 195 914 q 263 845 239 861 q 313 822 288 829 q 361 815 339 815 q 411 822 385 815 q 462 845 437 829 q 509 887 486 861 q 547 953 531 914 q 567 941 558 947 q 583 922 575 934 "},"Ả":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 520 1121 q 508 1088 520 1103 q 478 1060 495 1073 q 445 1034 461 1046 q 422 1010 429 1023 q 421 984 414 997 q 456 953 427 970 q 435 945 446 947 q 414 943 424 944 q 369 970 384 957 q 351 993 354 982 q 355 1014 348 1004 q 373 1032 361 1023 q 398 1050 384 1041 q 425 1068 413 1059 q 446 1088 437 1078 q 454 1111 454 1099 q 441 1150 454 1137 q 409 1163 428 1163 q 390 1159 399 1163 q 376 1149 382 1155 q 366 1135 370 1143 q 363 1120 363 1128 q 364 1113 363 1117 q 368 1106 366 1110 q 354 1102 363 1104 q 336 1097 346 1099 q 317 1094 326 1095 q 301 1091 307 1092 l 293 1099 l 293 1108 q 306 1139 293 1124 q 339 1167 319 1155 q 383 1188 359 1180 q 431 1196 408 1196 q 497 1175 474 1196 q 520 1121 520 1155 "},"ý":{"x_min":-31.875,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 369 -55 q 306 -184 341 -130 q 233 -272 271 -237 q 158 -322 196 -306 q 86 -339 120 -339 q 38 -335 60 -339 q 1 -327 16 -332 q -23 -315 -14 -322 q -31 -303 -31 -309 q -23 -286 -31 -298 q -3 -259 -15 -274 q 22 -231 8 -245 q 47 -211 36 -218 q 112 -231 80 -230 q 169 -223 144 -233 q 198 -204 181 -219 q 230 -168 214 -189 q 263 -118 247 -146 q 291 -62 279 -91 l 311 -15 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 123 l 522 555 q 523 573 525 565 q 511 585 520 580 q 485 594 502 590 q 444 601 469 597 l 444 631 l 670 631 l 670 601 m 330 710 q 308 717 318 712 q 291 729 299 722 l 450 1010 q 471 1007 458 1009 q 499 1003 484 1005 q 527 999 514 1001 q 548 994 541 996 l 564 967 l 330 710 "},"º":{"x_min":33,"x_max":358,"ha":392,"o":"m 294 656 q 285 710 294 684 q 261 755 276 736 q 226 786 246 774 q 184 798 206 798 q 148 787 164 798 q 120 759 132 777 q 103 716 109 740 q 97 662 97 691 q 106 608 97 634 q 131 563 115 582 q 166 532 146 544 q 206 521 185 521 q 240 531 224 521 q 268 559 256 541 q 287 602 280 578 q 294 656 294 627 m 41 397 l 41 447 l 350 447 l 350 397 l 41 397 m 358 666 q 342 598 358 632 q 303 539 327 565 q 247 497 278 513 q 184 482 216 482 q 122 494 150 482 q 74 530 94 507 q 43 584 54 553 q 33 653 33 615 q 46 721 33 688 q 83 780 60 755 q 139 822 107 806 q 206 838 170 838 q 267 825 239 838 q 315 789 294 812 q 346 735 335 766 q 358 666 358 703 "},"∞":{"x_min":54,"x_max":864,"ha":918,"o":"m 232 288 q 272 291 255 288 q 308 303 290 294 q 349 329 327 312 q 401 374 371 346 q 371 412 388 392 q 333 447 354 432 q 286 473 312 463 q 229 483 260 483 q 177 474 197 483 q 147 450 158 464 q 132 420 136 436 q 129 391 129 404 q 135 360 129 377 q 154 326 141 342 q 187 299 167 310 q 232 288 206 288 m 685 494 q 644 489 663 494 q 605 475 625 485 q 564 449 586 465 q 513 407 542 432 q 544 369 527 389 q 584 335 562 350 q 632 309 605 319 q 688 300 658 300 q 740 309 720 300 q 770 333 759 318 q 785 363 781 347 q 789 391 789 379 q 782 423 789 405 q 763 456 776 440 q 730 483 750 472 q 685 494 711 494 m 278 573 q 342 562 313 573 q 398 533 372 551 q 444 493 423 515 q 482 448 465 471 q 554 507 522 484 q 615 546 586 531 q 669 566 643 560 q 722 573 695 573 q 774 561 748 573 q 819 528 799 549 q 851 480 839 508 q 864 419 864 452 q 845 343 864 380 q 796 276 827 305 q 724 228 764 246 q 639 210 684 210 q 574 220 604 210 q 518 249 544 231 q 470 289 492 266 q 431 333 448 311 q 355 270 387 294 q 297 233 324 246 q 247 214 271 219 q 195 210 222 210 q 143 221 169 210 q 98 254 118 233 q 66 302 78 274 q 54 363 54 330 q 72 439 54 402 q 121 506 90 477 q 193 554 153 536 q 278 573 233 573 "},"ź":{"x_min":51.546875,"x_max":562.25,"ha":614,"o":"m 562 168 q 561 122 562 146 q 559 74 560 97 q 557 31 558 51 q 554 0 556 12 l 69 0 l 51 30 l 427 570 l 193 570 q 171 565 182 570 q 149 550 160 561 q 129 519 139 539 q 113 468 120 499 l 80 476 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 545 631 l 560 601 l 183 61 l 469 61 q 500 87 486 61 q 530 174 514 113 l 562 168 m 296 710 q 274 717 284 712 q 257 729 265 722 l 416 1010 q 437 1007 424 1009 q 465 1003 451 1005 q 493 999 480 1001 q 514 994 507 996 l 530 967 l 296 710 "},"Ư":{"x_min":33.65625,"x_max":950.125,"ha":950,"o":"m 950 944 q 941 904 950 927 q 912 856 933 881 q 855 802 891 830 q 767 749 820 775 l 767 355 q 745 196 767 266 q 682 79 723 127 q 583 5 642 30 q 451 -20 525 -20 q 323 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 376 76 332 95 q 478 58 420 58 q 564 81 526 58 q 627 142 601 104 q 665 229 652 180 q 679 327 679 277 l 679 783 q 654 804 679 791 q 580 825 629 816 l 580 855 l 821 855 q 833 889 833 873 q 823 926 833 909 q 794 959 813 944 l 914 1014 q 940 981 930 999 q 950 944 950 963 "},"͟":{"x_min":-442.875,"x_max":442.875,"ha":0,"o":"m 442 -420 q 438 -437 441 -427 q 430 -457 434 -447 q 422 -476 426 -466 q 416 -492 419 -485 l -427 -492 l -442 -475 q -438 -458 -441 -467 q -430 -438 -434 -448 q -422 -419 -426 -429 q -415 -404 -418 -410 l 427 -404 l 442 -420 "},"ń":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 544 496 549 470 q 529 537 539 522 q 502 557 519 552 q 462 563 486 563 q 415 552 441 563 q 360 520 389 542 q 298 461 330 497 q 234 372 266 425 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 59 l 132 482 q 129 524 132 508 q 118 548 127 540 q 90 561 109 557 q 37 570 71 565 l 37 597 q 122 618 83 604 q 199 651 161 632 l 223 627 l 231 458 q 296 539 260 503 q 369 599 332 575 q 440 637 406 624 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 m 362 710 q 340 717 349 712 q 323 729 330 722 l 482 1010 q 503 1007 490 1009 q 531 1003 516 1005 q 559 999 545 1001 q 580 994 573 996 l 596 967 l 362 710 "},"Ḵ":{"x_min":33.65625,"x_max":796.46875,"ha":803,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 438 l 518 765 q 538 794 534 783 q 535 811 542 805 q 511 820 528 817 q 468 825 494 823 l 468 855 l 753 855 l 753 825 q 714 820 731 823 q 683 813 697 817 q 659 802 670 808 q 637 783 647 795 l 340 455 l 668 85 q 694 64 680 72 q 724 54 708 57 q 757 51 740 51 q 791 53 774 51 l 796 24 q 716 0 756 11 q 643 -10 675 -10 q 608 -3 623 -10 q 579 19 593 2 l 241 433 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 644 -155 q 639 -172 642 -162 q 632 -192 636 -182 q 624 -211 628 -201 q 617 -227 620 -220 l 200 -227 l 185 -210 q 190 -193 187 -202 q 198 -173 193 -183 q 206 -154 202 -164 q 213 -139 210 -145 l 629 -139 l 644 -155 "},"":{"x_min":13.5625,"x_max":874.90625,"ha":903,"o":"m 13 29 q 85 46 59 37 q 118 73 111 54 l 378 814 q 397 840 383 829 q 425 857 410 850 q 456 868 441 864 q 480 875 471 872 l 778 73 q 808 45 785 56 q 874 29 832 34 l 874 0 l 579 0 l 579 29 q 654 43 634 33 q 666 72 674 52 l 427 716 l 199 73 q 216 45 191 54 q 295 29 240 35 l 295 0 l 13 0 l 13 29 "},"ḹ":{"x_min":-29.171875,"x_max":429.3125,"ha":376,"o":"m 40 0 l 40 29 q 89 38 69 33 q 120 49 108 44 q 136 59 131 54 q 142 70 142 65 l 142 878 q 137 926 142 909 q 123 951 133 943 q 93 963 112 960 q 47 969 75 966 l 47 996 q 136 1017 95 1006 q 219 1051 177 1029 l 244 1027 l 244 70 q 267 49 244 60 q 345 29 290 38 l 345 0 l 40 0 m 261 -189 q 255 -225 261 -208 q 238 -254 249 -242 q 213 -274 228 -267 q 182 -282 199 -282 q 138 -265 152 -282 q 125 -217 125 -248 q 131 -181 125 -198 q 148 -151 137 -164 q 173 -132 159 -139 q 203 -125 187 -125 q 261 -189 261 -125 m 429 1275 q 424 1258 427 1268 q 417 1238 421 1248 q 409 1219 413 1229 q 402 1204 405 1210 l -14 1204 l -29 1220 q -24 1237 -27 1228 q -16 1257 -21 1247 q -8 1276 -12 1267 q -1 1292 -4 1285 l 414 1292 l 429 1275 "},"¤":{"x_min":107.296875,"x_max":545.015625,"ha":652,"o":"m 245 488 q 220 450 228 471 q 212 407 212 429 q 220 364 212 385 q 245 327 228 344 q 284 302 262 310 q 326 294 305 294 q 369 302 348 294 q 407 327 390 310 q 432 365 424 344 q 441 408 441 386 q 432 450 441 429 q 407 488 424 471 q 369 513 390 505 q 326 522 348 522 q 284 513 305 522 q 245 488 262 505 m 500 190 l 428 261 q 379 237 405 245 q 326 230 353 230 q 273 237 299 230 q 224 261 247 245 l 151 189 l 128 190 q 117 210 122 199 q 107 232 112 221 l 180 305 q 155 353 163 327 q 148 406 148 379 q 155 460 148 434 q 180 510 163 487 l 107 583 l 109 605 q 129 616 118 611 q 151 627 140 622 l 223 553 q 272 578 246 570 q 326 587 299 587 q 379 578 353 587 q 428 553 405 570 l 500 626 l 523 626 l 543 581 l 471 510 q 496 460 487 487 q 505 406 505 434 q 496 353 505 379 q 472 304 488 327 l 544 233 l 545 210 l 500 190 "},"Ǣ":{"x_min":0.0625,"x_max":1042.296875,"ha":1082,"o":"m 525 779 q 518 789 525 786 q 503 792 512 793 q 485 785 494 791 q 472 767 476 779 l 365 499 l 525 499 l 525 779 m 1042 165 q 1027 63 1036 106 q 1013 0 1018 19 l 428 0 l 428 29 q 499 49 474 38 q 525 70 525 61 l 525 442 l 342 442 l 193 75 q 205 45 184 55 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 72 46 46 37 q 107 75 98 55 l 387 768 q 384 788 392 780 q 360 802 377 795 q 317 814 343 808 q 258 825 291 819 l 258 855 l 975 855 l 996 838 q 992 799 994 820 q 986 757 990 778 q 977 717 982 736 q 968 685 973 698 l 937 685 q 932 737 936 716 q 921 771 928 758 q 904 788 914 783 q 882 794 895 794 l 634 794 l 634 499 l 908 499 l 927 480 q 913 459 920 470 q 897 438 905 448 q 880 418 889 427 q 864 404 872 410 q 842 421 854 414 q 815 433 831 428 q 779 439 800 437 q 729 442 758 442 l 634 442 l 634 104 q 639 86 634 94 q 659 72 644 78 q 702 64 674 67 q 774 61 729 61 l 861 61 q 915 64 893 61 q 953 79 937 67 q 983 114 970 91 q 1011 177 997 137 l 1042 165 m 862 1058 q 857 1041 861 1051 q 850 1021 854 1031 q 842 1002 846 1012 q 836 987 838 993 l 419 987 l 404 1003 q 408 1020 405 1011 q 416 1040 412 1030 q 424 1059 420 1049 q 432 1075 428 1068 l 847 1075 l 862 1058 "},"Ɨ":{"x_min":32.75,"x_max":370.296875,"ha":414,"o":"m 353 417 l 255 417 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 417 l 47 417 l 32 433 q 39 455 36 443 q 47 478 43 467 l 146 478 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 478 l 353 478 l 370 462 l 353 417 "},"Ĝ":{"x_min":47,"x_max":777.203125,"ha":810,"o":"m 707 805 q 705 792 711 802 q 688 770 699 782 q 663 746 677 757 q 641 726 650 734 l 619 730 q 573 765 596 751 q 523 786 549 778 q 467 796 497 793 q 405 800 438 800 q 362 792 388 800 q 309 767 337 784 q 253 721 281 749 q 202 652 225 693 q 165 556 179 611 q 152 431 152 502 q 177 267 152 337 q 243 152 202 197 q 334 83 283 106 q 437 61 385 61 q 528 70 487 61 q 604 98 570 80 l 604 328 q 597 343 604 336 q 575 357 591 350 q 532 370 559 364 q 464 384 505 377 l 464 413 l 777 413 l 777 384 q 722 359 738 375 q 706 328 706 344 l 706 104 q 615 38 655 63 q 542 1 576 14 q 479 -15 509 -11 q 419 -20 449 -20 q 284 5 350 -20 q 164 82 217 30 q 79 212 112 134 q 47 394 47 289 q 82 596 47 507 q 180 747 118 685 q 324 842 241 809 q 499 875 406 875 q 549 870 522 875 q 603 856 575 865 q 658 834 631 847 q 707 805 685 821 m 648 957 q 635 938 640 944 q 619 927 630 932 l 433 1068 l 249 927 q 240 932 244 929 q 233 938 236 935 q 227 946 230 941 q 219 957 223 951 l 398 1167 l 470 1167 l 648 957 "},"p":{"x_min":37.046875,"x_max":682,"ha":736,"o":"m 590 288 q 576 398 590 347 q 539 486 562 449 q 485 544 516 523 q 422 566 455 566 q 390 558 410 566 q 345 533 370 551 q 292 486 320 515 q 234 413 263 456 l 234 144 q 290 106 264 121 q 339 83 316 91 q 382 71 362 74 q 421 68 402 68 q 488 82 457 68 q 541 124 519 96 q 577 193 564 152 q 590 288 590 234 m 682 333 q 671 253 682 294 q 643 172 661 211 q 601 97 626 133 q 548 36 577 62 q 487 -4 519 10 q 422 -20 455 -20 q 332 2 382 -20 q 234 66 282 24 l 234 -254 q 259 -276 234 -265 q 348 -296 284 -287 l 348 -326 l 37 -326 l 37 -296 q 106 -276 81 -286 q 132 -254 132 -266 l 132 481 q 129 522 132 506 q 116 549 126 539 q 88 563 106 558 q 37 569 69 567 l 37 596 q 81 606 60 601 q 121 619 102 612 q 160 633 141 625 q 200 651 180 641 l 223 627 l 230 492 q 298 563 263 533 q 363 612 332 593 q 421 641 394 632 q 468 651 448 651 q 553 629 514 651 q 621 566 593 607 q 666 466 650 525 q 682 333 682 407 "},"S":{"x_min":79.515625,"x_max":600,"ha":661,"o":"m 600 255 q 591 193 600 225 q 567 130 583 161 q 525 72 550 99 q 467 24 501 45 q 391 -7 433 4 q 298 -20 349 -20 q 249 -15 276 -20 q 195 -2 223 -10 q 140 18 167 6 q 89 46 112 30 q 81 69 84 48 q 79 116 79 89 q 81 172 79 144 q 89 219 83 201 l 116 216 q 155 147 132 176 q 207 98 179 117 q 268 70 235 79 q 336 61 301 61 q 397 73 366 61 q 452 107 428 86 q 492 158 476 129 q 508 219 508 187 q 489 290 508 261 q 441 343 471 320 q 374 385 412 366 q 297 421 336 403 q 219 460 257 440 q 152 508 181 480 q 104 570 122 535 q 86 655 86 606 q 92 701 86 676 q 111 750 98 725 q 146 797 125 774 q 198 837 168 820 q 267 864 228 854 q 356 875 307 875 q 417 870 387 875 q 475 857 448 865 q 523 837 502 849 q 557 812 545 826 q 558 796 562 808 q 544 770 553 784 q 524 743 535 756 q 505 722 513 729 l 480 726 q 440 763 461 748 q 398 789 420 779 q 356 802 377 798 q 316 807 335 807 q 251 795 278 807 q 207 766 224 783 q 182 728 190 749 q 174 687 174 706 q 192 631 174 655 q 240 585 210 606 q 308 546 270 565 q 387 508 346 528 q 465 465 427 488 q 533 412 503 442 q 581 344 563 382 q 600 255 600 306 "},"ễ":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 560 740 q 547 721 552 727 q 531 710 542 715 l 345 891 l 161 710 q 152 715 155 712 q 145 721 148 718 q 139 729 142 724 q 130 740 135 734 l 309 998 l 382 998 l 560 740 m 577 1217 q 548 1162 564 1189 q 510 1113 531 1135 q 465 1078 489 1092 q 414 1065 440 1065 q 369 1077 390 1065 q 327 1103 347 1089 q 287 1130 307 1118 q 247 1142 267 1142 q 198 1120 220 1142 q 150 1060 175 1098 l 114 1073 q 143 1129 126 1101 q 181 1178 160 1156 q 226 1213 202 1200 q 276 1227 250 1227 q 325 1215 302 1227 q 368 1188 348 1203 q 407 1162 389 1174 q 442 1150 425 1150 q 492 1171 467 1150 q 540 1233 517 1193 l 577 1217 "},"/":{"x_min":33.234375,"x_max":616.5,"ha":652,"o":"m 143 -192 q 125 -202 136 -197 q 102 -211 114 -207 q 78 -220 90 -216 q 58 -227 66 -224 l 33 -210 l 508 1051 q 549 1071 526 1063 q 591 1085 571 1079 l 616 1070 l 143 -192 "},"ⱡ":{"x_min":47.5625,"x_max":396.4375,"ha":444,"o":"m 381 434 l 273 434 l 273 70 q 296 49 273 60 q 374 29 319 38 l 374 0 l 69 0 l 69 29 q 118 38 98 33 q 149 49 137 44 q 165 59 160 54 q 171 70 171 65 l 171 434 l 62 434 l 47 448 q 54 471 50 459 q 62 495 57 484 l 171 495 l 171 570 l 62 570 l 47 584 q 54 607 50 595 q 62 631 57 620 l 171 631 l 171 878 q 166 926 171 909 q 152 951 162 943 q 122 963 141 960 q 76 969 104 966 l 76 996 q 165 1017 124 1006 q 248 1051 206 1029 l 273 1027 l 273 631 l 381 631 l 396 614 l 381 570 l 273 570 l 273 495 l 381 495 l 396 478 l 381 434 "},"Ọ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 485 -189 q 479 -225 485 -208 q 462 -254 473 -242 q 437 -274 452 -267 q 406 -282 423 -282 q 362 -265 375 -282 q 349 -217 349 -248 q 355 -181 349 -198 q 372 -151 361 -164 q 397 -132 383 -139 q 427 -125 411 -125 q 485 -189 485 -125 "},"̨":{"x_min":-478,"x_max":-220.4375,"ha":0,"o":"m -220 -202 q -254 -238 -234 -221 q -293 -270 -273 -256 q -334 -292 -314 -284 q -371 -301 -354 -301 q -410 -296 -391 -301 q -444 -282 -429 -292 q -468 -252 -459 -271 q -478 -202 -478 -233 q -424 -83 -478 -141 q -268 29 -371 -25 l -238 16 q -316 -42 -286 -13 q -362 -95 -346 -70 q -384 -141 -379 -120 q -390 -179 -390 -162 q -373 -216 -390 -204 q -331 -228 -357 -228 q -289 -215 -314 -228 q -236 -177 -265 -203 l -220 -202 "},"̋":{"x_min":-488.328125,"x_max":-75.96875,"ha":0,"o":"m -449 710 q -467 716 -461 712 q -488 728 -474 720 l -368 1010 q -349 1006 -360 1008 q -327 1002 -338 1005 q -305 998 -316 1000 q -288 993 -295 995 l -273 965 l -449 710 m -252 710 q -271 716 -265 712 q -290 728 -278 720 l -171 1010 q -152 1006 -163 1008 q -130 1002 -141 1005 q -108 998 -119 1000 q -90 993 -98 995 l -75 965 l -252 710 "},"y":{"x_min":-31.875,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 369 -55 q 306 -184 341 -130 q 233 -272 271 -237 q 158 -322 196 -306 q 86 -339 120 -339 q 38 -335 60 -339 q 1 -327 16 -332 q -23 -315 -14 -322 q -31 -303 -31 -309 q -23 -286 -31 -298 q -3 -259 -15 -274 q 22 -231 8 -245 q 47 -211 36 -218 q 112 -231 80 -230 q 169 -223 144 -233 q 198 -204 181 -219 q 230 -168 214 -189 q 263 -118 247 -146 q 291 -62 279 -91 l 311 -15 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 123 l 522 555 q 523 573 525 565 q 511 585 520 580 q 485 594 502 590 q 444 601 469 597 l 444 631 l 670 631 l 670 601 "},"Π":{"x_min":32.984375,"x_max":828.015625,"ha":875,"o":"m 32 0 l 32 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 106 804 132 791 q 32 825 81 816 l 32 855 l 828 855 l 828 825 q 755 804 781 816 q 729 783 729 793 l 729 70 q 753 50 729 62 q 828 29 778 38 l 828 0 l 521 0 l 521 29 q 593 49 567 38 q 620 70 620 61 l 620 751 q 610 767 620 759 q 584 782 601 775 q 540 793 566 789 q 481 798 514 798 l 368 798 q 313 792 337 797 q 273 782 289 788 q 249 767 257 775 q 241 751 241 759 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 32 0 "},"ˊ":{"x_min":0,"x_max":272.640625,"ha":273,"o":"m 38 710 q 16 717 26 712 q 0 729 7 722 l 158 1010 q 180 1007 166 1009 q 207 1003 193 1005 q 236 999 222 1001 q 257 994 249 996 l 272 967 l 38 710 "},"Ḧ":{"x_min":33.65625,"x_max":861.34375,"ha":908,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 478 l 654 478 l 654 783 q 629 804 654 791 q 555 825 604 816 l 555 855 l 861 855 l 861 825 q 789 804 815 816 q 763 783 763 793 l 763 70 q 787 50 763 62 q 861 29 812 38 l 861 0 l 555 0 l 555 29 q 627 49 601 38 q 654 70 654 61 l 654 417 l 241 417 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 650 1045 q 644 1009 650 1026 q 628 980 638 992 q 603 960 617 967 q 572 953 589 953 q 528 969 541 953 q 514 1018 514 986 q 521 1053 514 1036 q 538 1083 527 1070 q 562 1102 548 1095 q 593 1110 576 1110 q 650 1045 650 1110 m 379 1045 q 373 1009 379 1026 q 357 980 367 992 q 332 960 346 967 q 301 953 318 953 q 257 969 270 953 q 243 1018 243 986 q 250 1053 243 1036 q 267 1083 256 1070 q 291 1102 277 1095 q 322 1110 305 1110 q 379 1045 379 1110 "},"–":{"x_min":41.375,"x_max":610.40625,"ha":652,"o":"m 610 370 q 601 338 607 355 q 590 309 596 320 l 58 309 l 41 325 q 50 356 44 340 q 62 387 56 373 l 594 387 l 610 370 "},"ë":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 549 854 q 543 818 549 835 q 526 789 536 801 q 501 769 515 776 q 470 762 487 762 q 426 778 439 762 q 413 826 413 795 q 419 862 413 845 q 436 892 425 879 q 461 911 447 904 q 491 919 475 919 q 549 854 549 919 m 278 854 q 272 818 278 835 q 255 789 265 801 q 230 769 244 776 q 199 762 216 762 q 155 778 168 762 q 142 826 142 795 q 148 862 142 845 q 165 892 154 879 q 190 911 176 904 q 220 919 204 919 q 278 854 278 919 "},"ƒ":{"x_min":-169.578125,"x_max":537.734375,"ha":402,"o":"m 537 986 q 527 970 537 980 q 504 947 518 959 q 476 925 490 936 q 451 911 461 915 q 417 935 434 925 q 385 953 400 946 q 357 964 370 960 q 336 968 344 968 q 298 955 318 968 q 260 912 277 943 q 232 827 243 881 q 221 689 221 773 l 221 631 l 395 631 l 414 611 q 400 591 408 601 q 381 570 391 580 q 363 553 372 560 q 347 543 353 545 q 302 559 331 551 q 221 567 273 567 l 221 66 q 210 -68 221 -12 q 181 -163 199 -124 q 137 -228 162 -202 q 86 -275 113 -254 q 46 -302 67 -290 q 7 -322 26 -313 q -29 -334 -12 -330 q -59 -339 -46 -339 q -99 -333 -80 -339 q -134 -320 -119 -328 q -160 -304 -150 -312 q -169 -291 -169 -296 q -160 -275 -169 -286 q -137 -253 -150 -264 q -108 -231 -123 -241 q -84 -216 -94 -221 q -59 -232 -70 -226 q -36 -241 -47 -238 q -14 -245 -25 -244 q 9 -247 -3 -247 q 47 -235 28 -247 q 82 -192 67 -223 q 108 -107 98 -160 q 118 30 118 -53 l 118 567 l 27 567 l 13 586 l 66 631 l 118 631 l 118 652 q 129 786 118 731 q 158 878 140 841 q 202 941 177 916 q 254 988 227 967 q 293 1015 272 1003 q 336 1034 315 1026 q 376 1046 357 1042 q 408 1051 395 1051 q 451 1042 429 1051 q 493 1024 474 1034 q 525 1003 512 1013 q 537 986 537 992 "},"ȟ":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 543 496 549 470 q 528 537 538 522 q 500 557 517 552 q 462 563 484 563 q 411 550 438 563 q 353 514 383 538 q 293 455 324 491 q 234 372 263 419 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 880 q 129 924 132 908 q 117 949 127 940 q 88 961 107 958 q 37 969 69 965 l 37 996 q 88 1007 65 1002 q 132 1019 112 1013 q 170 1033 152 1025 q 208 1051 189 1040 l 234 1027 l 233 463 q 298 541 262 507 q 370 600 334 576 q 440 638 406 625 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 m 427 1112 l 355 1112 l 176 1320 q 184 1332 181 1327 q 190 1340 187 1337 q 197 1346 193 1343 q 206 1352 201 1349 l 393 1209 l 576 1352 q 592 1340 588 1346 q 605 1320 597 1334 l 427 1112 "},"Ẏ":{"x_min":-0.390625,"x_max":797.6875,"ha":825,"o":"m 243 0 l 243 29 q 330 55 305 42 q 355 78 355 68 l 355 364 q 298 478 329 419 q 232 594 266 538 q 168 699 199 651 q 113 780 137 748 q 99 794 107 788 q 79 806 91 801 q 49 814 67 811 q 2 818 30 818 l 0 847 q 79 856 39 852 q 148 861 119 861 q 201 834 179 861 q 255 757 226 802 q 313 663 284 713 q 370 562 342 614 q 422 461 398 509 l 604 780 q 597 808 614 797 q 529 825 581 818 l 529 855 l 797 855 l 797 825 q 726 807 750 816 q 691 780 701 797 l 464 366 l 464 77 q 469 68 464 73 q 488 55 475 62 q 523 42 501 48 q 576 29 544 35 l 576 0 l 243 0 m 477 1045 q 471 1009 477 1026 q 455 980 465 992 q 430 960 444 967 q 399 953 416 953 q 355 969 368 953 q 341 1018 341 986 q 348 1053 341 1036 q 365 1083 354 1070 q 389 1102 375 1095 q 420 1110 403 1110 q 477 1045 477 1110 "},"J":{"x_min":-129.421875,"x_max":376.328125,"ha":424,"o":"m 376 825 q 304 804 330 816 q 278 783 278 793 l 278 139 q 266 4 278 58 q 236 -86 255 -49 q 193 -149 218 -124 q 142 -195 169 -173 q 102 -222 124 -210 q 57 -241 80 -233 q 15 -253 35 -249 q -17 -258 -4 -258 q -58 -251 -37 -258 q -94 -236 -78 -245 q -119 -219 -109 -228 q -129 -204 -129 -210 q -120 -188 -129 -198 q -99 -168 -111 -178 q -73 -148 -87 -158 q -50 -136 -60 -139 q -17 -156 -31 -148 q 8 -168 -3 -164 q 32 -173 21 -172 q 56 -175 43 -175 q 94 -163 74 -175 q 130 -122 114 -151 q 158 -41 147 -92 q 169 89 169 10 l 169 783 q 163 792 169 787 q 143 802 158 797 q 103 813 128 808 q 36 825 77 819 l 36 855 l 376 855 l 376 825 "},"ŷ":{"x_min":-31.875,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 369 -55 q 306 -184 341 -130 q 233 -272 271 -237 q 158 -322 196 -306 q 86 -339 120 -339 q 38 -335 60 -339 q 1 -327 16 -332 q -23 -315 -14 -322 q -31 -303 -31 -309 q -23 -286 -31 -298 q -3 -259 -15 -274 q 22 -231 8 -245 q 47 -211 36 -218 q 112 -231 80 -230 q 169 -223 144 -233 q 198 -204 181 -219 q 230 -168 214 -189 q 263 -118 247 -146 q 291 -62 279 -91 l 311 -15 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 123 l 522 555 q 523 573 525 565 q 511 585 520 580 q 485 594 502 590 q 444 601 469 597 l 444 631 l 670 631 l 670 601 m 573 740 q 560 721 565 727 q 544 710 556 715 l 358 891 l 174 710 q 165 715 169 712 q 159 721 162 718 q 152 729 155 724 q 144 740 149 734 l 323 998 l 396 998 l 573 740 "},"ŕ":{"x_min":37.046875,"x_max":528.015625,"ha":550,"o":"m 522 625 q 528 602 528 621 q 522 556 527 582 q 509 503 517 530 q 493 458 501 476 l 463 458 q 452 504 459 485 q 435 534 444 523 q 413 550 425 545 q 388 556 401 556 q 353 543 373 556 q 312 504 333 530 q 270 435 291 477 q 234 336 250 393 l 234 70 q 259 49 234 60 q 348 29 284 38 l 348 0 l 37 0 l 37 29 q 106 49 81 39 q 132 70 132 59 l 132 465 q 130 502 132 487 q 127 527 129 518 q 122 542 125 537 q 116 551 119 547 q 105 559 111 556 q 90 564 100 562 q 68 567 81 566 q 37 569 56 568 l 37 596 q 123 620 81 608 q 200 651 166 632 l 224 627 l 233 473 q 272 543 250 510 q 318 599 293 575 q 369 637 342 623 q 425 651 396 651 q 472 645 446 651 q 522 625 497 640 m 276 710 q 254 717 263 712 q 237 729 244 722 l 396 1010 q 417 1007 404 1009 q 445 1003 430 1005 q 473 999 459 1001 q 494 994 486 996 l 510 967 l 276 710 "},"ṝ":{"x_min":37.046875,"x_max":541.21875,"ha":550,"o":"m 522 625 q 528 602 528 621 q 522 556 527 582 q 509 503 517 530 q 493 458 501 476 l 463 458 q 452 504 459 485 q 435 534 444 523 q 413 550 425 545 q 388 556 401 556 q 353 543 373 556 q 312 504 333 530 q 270 435 291 477 q 234 336 250 393 l 234 70 q 259 49 234 60 q 348 29 284 38 l 348 0 l 37 0 l 37 29 q 106 49 81 39 q 132 70 132 59 l 132 465 q 130 502 132 487 q 127 527 129 518 q 122 542 125 537 q 116 551 119 547 q 105 559 111 556 q 90 564 100 562 q 68 567 81 566 q 37 569 56 568 l 37 596 q 123 620 81 608 q 200 651 166 632 l 224 627 l 233 473 q 272 543 250 510 q 318 599 293 575 q 369 637 342 623 q 425 651 396 651 q 472 645 446 651 q 522 625 497 640 m 251 -189 q 245 -225 251 -208 q 228 -254 239 -242 q 203 -274 218 -267 q 172 -282 189 -282 q 128 -265 141 -282 q 115 -217 115 -248 q 121 -181 115 -198 q 138 -151 127 -164 q 163 -132 149 -139 q 193 -125 177 -125 q 251 -189 251 -125 m 541 868 q 536 851 539 861 q 529 831 533 841 q 521 812 524 822 q 514 797 517 803 l 97 797 l 82 813 q 87 830 84 821 q 94 850 90 840 q 103 869 99 859 q 110 885 107 878 l 526 885 l 541 868 "},"˘":{"x_min":27.125,"x_max":467.96875,"ha":495,"o":"m 467 922 q 422 829 447 867 q 368 768 396 792 q 309 735 340 745 q 248 725 279 725 q 184 735 215 725 q 125 768 153 745 q 72 829 96 792 q 27 922 47 867 q 43 941 35 934 q 63 953 51 947 q 102 887 80 914 q 148 845 124 861 q 198 822 172 829 q 246 815 223 815 q 296 822 269 815 q 346 845 322 829 q 393 887 371 861 q 432 953 415 914 q 451 941 443 947 q 467 922 459 934 "},"ẋ":{"x_min":13.5625,"x_max":689.078125,"ha":699,"o":"m 416 0 l 416 29 q 448 33 433 30 q 471 41 463 35 q 480 59 480 48 q 466 88 480 70 l 332 271 l 204 88 q 193 59 191 70 q 208 41 196 48 q 237 33 219 35 q 270 29 254 30 l 270 0 l 13 0 l 13 29 q 59 39 40 33 q 91 54 78 45 q 114 72 105 62 q 130 92 123 82 l 295 322 l 136 540 q 118 563 127 553 q 97 581 109 574 q 66 594 84 589 q 21 602 48 599 l 21 631 l 305 631 l 305 602 q 269 596 284 599 q 246 586 254 592 q 239 569 238 579 q 252 542 240 558 l 362 391 l 466 542 q 480 569 478 558 q 474 586 481 580 q 452 596 467 593 q 416 602 437 599 l 416 631 l 674 631 l 674 602 q 589 581 619 597 q 541 540 559 566 l 399 340 l 580 92 q 598 72 588 82 q 620 54 607 62 q 649 38 632 45 q 689 29 666 31 l 689 0 l 416 0 m 419 854 q 413 818 419 835 q 396 789 407 801 q 372 769 386 776 q 340 762 357 762 q 296 778 310 762 q 283 826 283 795 q 289 862 283 845 q 306 892 295 879 q 331 911 317 904 q 361 919 345 919 q 419 854 419 919 "},"D":{"x_min":27.5625,"x_max":761,"ha":823,"o":"m 307 818 q 241 816 273 818 l 241 104 q 248 80 241 89 q 284 62 257 68 q 364 57 311 57 q 460 79 411 57 q 551 148 510 102 q 619 265 593 195 q 646 432 646 336 q 623 593 646 522 q 558 715 601 665 q 451 791 515 765 q 307 818 388 818 m 761 458 q 743 306 761 373 q 697 188 726 240 q 629 102 668 137 q 548 43 591 66 q 462 10 506 21 q 378 0 418 0 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 805 q 80 799 104 802 q 33 792 56 795 l 27 834 q 96 849 57 842 q 178 863 135 857 q 266 871 222 868 q 350 875 310 875 q 521 846 445 875 q 650 765 596 818 q 732 634 703 711 q 761 458 761 556 "},"ĺ":{"x_min":40.265625,"x_max":421.84375,"ha":376,"o":"m 40 0 l 40 29 q 89 38 69 33 q 120 49 108 44 q 136 59 131 54 q 142 70 142 65 l 142 878 q 137 926 142 909 q 123 951 133 943 q 93 963 112 960 q 47 969 75 966 l 47 996 q 136 1017 95 1006 q 219 1051 177 1029 l 244 1027 l 244 70 q 267 49 244 60 q 345 29 290 38 l 345 0 l 40 0 m 103 1144 q 87 1155 92 1148 q 73 1174 82 1161 l 335 1390 q 354 1379 342 1385 q 377 1365 365 1373 q 400 1352 389 1358 q 415 1339 410 1345 l 421 1309 l 103 1144 "},"ł":{"x_min":36.421875,"x_max":366.296875,"ha":390,"o":"m 47 0 l 47 29 q 96 38 76 33 q 127 49 115 44 q 143 59 138 54 q 149 70 149 65 l 149 459 l 52 391 l 36 402 q 39 417 37 411 q 42 428 40 422 q 46 442 43 433 q 55 465 49 450 l 149 530 l 149 878 q 144 926 149 909 q 130 951 140 943 q 100 963 119 960 q 54 969 82 966 l 54 996 q 143 1017 102 1006 q 226 1051 184 1029 l 251 1027 l 251 600 l 350 670 l 366 659 q 362 641 364 648 q 358 628 360 634 q 354 616 356 623 q 346 598 351 609 l 251 530 l 251 70 q 274 49 251 60 q 352 29 297 38 l 352 0 l 47 0 "},"":{"x_min":91.5625,"x_max":242.125,"ha":347,"o":"m 202 477 q 189 471 197 474 q 172 467 181 469 q 154 464 164 465 q 137 463 145 463 l 91 1031 q 115 1042 99 1036 q 149 1055 131 1048 q 182 1065 166 1061 q 206 1072 198 1070 l 242 1054 l 202 477 "},"$":{"x_min":59.6875,"x_max":585,"ha":652,"o":"m 153 649 q 163 604 153 624 q 193 569 174 585 q 238 541 212 554 q 293 517 263 529 l 293 756 q 227 745 253 755 q 183 720 200 735 q 160 686 167 705 q 153 649 153 668 m 493 219 q 482 276 493 251 q 452 319 471 300 q 407 352 433 337 q 354 378 382 366 l 354 76 q 406 92 381 80 q 450 122 431 103 q 481 165 469 141 q 493 219 493 190 m 354 -96 q 343 -105 347 -102 q 334 -110 339 -108 q 324 -114 330 -112 q 311 -118 319 -115 l 293 -103 l 293 -6 q 232 -1 260 -6 q 178 10 204 2 q 125 32 151 19 q 69 65 99 46 q 62 87 64 68 q 59 132 59 107 q 61 184 59 158 q 69 230 63 211 l 98 228 q 181 121 130 158 q 293 77 231 85 l 293 402 q 210 434 251 417 q 138 475 170 451 q 86 533 106 500 q 67 618 67 567 q 78 679 67 646 q 115 741 89 712 q 185 791 142 770 q 293 820 228 813 l 293 920 q 306 928 302 925 q 314 932 310 930 q 321 935 317 934 q 336 939 326 936 l 354 924 l 354 823 q 414 818 385 822 q 469 806 444 814 q 516 786 495 797 q 550 762 536 775 q 548 745 554 757 q 534 718 543 732 q 513 689 524 703 q 493 666 501 675 l 466 672 q 410 722 439 703 q 354 749 382 741 l 354 493 q 437 458 396 477 q 511 412 479 439 q 564 347 544 384 q 585 255 585 309 q 570 173 585 215 q 526 95 555 130 q 454 32 497 59 q 354 -2 411 6 l 354 -96 "},"w":{"x_min":13.5625,"x_max":966.46875,"ha":981,"o":"m 966 601 q 933 592 945 597 q 913 583 921 588 q 903 573 906 579 q 898 559 900 567 l 748 40 q 732 14 744 25 q 706 -2 720 4 q 678 -13 692 -9 q 655 -20 664 -17 l 494 439 l 355 40 q 338 14 349 24 q 314 -3 327 3 q 287 -14 300 -10 q 265 -20 274 -17 l 87 559 q 13 601 81 586 l 13 631 l 275 631 l 275 601 q 223 594 242 598 q 197 583 205 589 q 188 572 189 578 q 190 559 188 565 l 318 129 l 484 631 l 531 631 l 708 129 l 825 559 q 811 584 829 575 q 746 601 792 594 l 746 631 l 966 631 l 966 601 "},"":{"x_min":29.59375,"x_max":640.484375,"ha":661,"o":"m 640 165 q 626 63 635 106 q 612 0 618 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 364 l 44 364 l 29 380 q 36 402 32 391 q 44 425 40 414 l 132 425 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 425 l 403 425 l 420 409 l 403 364 l 241 364 l 241 111 q 246 89 241 98 q 266 74 252 80 q 305 64 281 67 q 367 61 329 61 l 464 61 q 516 64 495 61 q 554 79 538 67 q 583 114 570 91 q 611 177 597 137 l 640 165 "},"Ç":{"x_min":47,"x_max":690.40625,"ha":745,"o":"m 508 -155 q 496 -203 508 -180 q 458 -245 484 -226 q 394 -278 433 -264 q 298 -301 354 -292 l 283 -267 q 343 -252 319 -261 q 384 -232 368 -243 q 406 -209 399 -221 q 414 -187 414 -197 q 396 -154 414 -164 q 336 -141 378 -145 q 343 -122 338 -139 q 357 -77 348 -108 q 376 -20 365 -55 q 262 8 319 -17 q 154 90 202 36 q 76 221 106 143 q 47 397 47 299 q 79 594 47 506 q 168 744 112 682 q 299 841 225 807 q 457 875 374 875 q 586 855 531 875 q 676 806 641 835 q 674 793 681 803 q 658 770 668 783 q 635 744 647 757 q 615 723 624 731 l 592 727 q 510 779 557 759 q 400 800 462 800 q 350 791 377 800 q 295 764 322 783 q 241 716 267 746 q 195 645 215 687 q 163 548 175 603 q 152 422 152 492 q 178 264 152 332 q 245 151 204 196 q 337 83 286 106 q 436 61 387 61 q 531 86 472 61 q 665 173 590 111 q 672 167 668 172 q 679 158 676 163 q 685 149 682 153 q 690 143 688 145 q 607 65 647 96 q 530 14 567 33 q 457 -12 493 -4 q 430 -16 444 -14 l 413 -70 q 447 -81 430 -74 q 478 -97 465 -87 q 499 -122 491 -107 q 508 -155 508 -136 "},"Ŝ":{"x_min":79.515625,"x_max":600,"ha":661,"o":"m 600 255 q 591 193 600 225 q 567 130 583 161 q 525 72 550 99 q 467 24 501 45 q 391 -7 433 4 q 298 -20 349 -20 q 249 -15 276 -20 q 195 -2 223 -10 q 140 18 167 6 q 89 46 112 30 q 81 69 84 48 q 79 116 79 89 q 81 172 79 144 q 89 219 83 201 l 116 216 q 155 147 132 176 q 207 98 179 117 q 268 70 235 79 q 336 61 301 61 q 397 73 366 61 q 452 107 428 86 q 492 158 476 129 q 508 219 508 187 q 489 290 508 261 q 441 343 471 320 q 374 385 412 366 q 297 421 336 403 q 219 460 257 440 q 152 508 181 480 q 104 570 122 535 q 86 655 86 606 q 92 701 86 676 q 111 750 98 725 q 146 797 125 774 q 198 837 168 820 q 267 864 228 854 q 356 875 307 875 q 417 870 387 875 q 475 857 448 865 q 523 837 502 849 q 557 812 545 826 q 558 796 562 808 q 544 770 553 784 q 524 743 535 756 q 505 722 513 729 l 480 726 q 440 763 461 748 q 398 789 420 779 q 356 802 377 798 q 316 807 335 807 q 251 795 278 807 q 207 766 224 783 q 182 728 190 749 q 174 687 174 706 q 192 631 174 655 q 240 585 210 606 q 308 546 270 565 q 387 508 346 528 q 465 465 427 488 q 533 412 503 442 q 581 344 563 382 q 600 255 600 306 m 553 957 q 540 938 545 944 q 524 927 535 932 l 338 1068 l 154 927 q 145 932 149 929 q 138 938 141 935 q 132 946 135 941 q 124 957 128 951 l 303 1167 l 375 1167 l 553 957 "},"C":{"x_min":48,"x_max":690.84375,"ha":745,"o":"m 690 143 q 607 65 647 96 q 531 15 568 34 q 458 -11 494 -3 q 387 -20 422 -20 q 263 8 324 -20 q 155 90 203 36 q 77 221 106 144 q 48 397 48 299 q 80 594 48 506 q 169 744 113 682 q 300 841 226 807 q 458 875 375 875 q 587 855 532 875 q 677 806 642 835 q 675 793 682 803 q 659 770 669 783 q 636 744 648 757 q 616 723 625 731 l 593 727 q 511 779 558 759 q 401 800 463 800 q 351 791 378 800 q 296 764 323 783 q 242 716 268 746 q 196 645 216 687 q 164 548 176 603 q 153 422 153 492 q 179 264 153 332 q 246 151 205 196 q 337 83 287 106 q 436 61 388 61 q 532 86 473 61 q 665 173 591 111 q 672 167 669 172 q 679 158 676 163 q 686 149 683 153 q 690 143 688 145 "},"Ḯ":{"x_min":-3.640625,"x_max":428.625,"ha":414,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 m 403 1045 q 397 1009 403 1026 q 380 980 391 992 q 355 960 370 967 q 324 953 341 953 q 280 969 293 953 q 267 1018 267 986 q 273 1053 267 1036 q 290 1083 279 1070 q 315 1102 301 1095 q 345 1110 329 1110 q 403 1045 403 1110 m 132 1045 q 126 1009 132 1026 q 109 980 120 992 q 84 960 99 967 q 53 953 70 953 q 9 969 22 953 q -3 1018 -3 986 q 2 1053 -3 1036 q 19 1083 8 1070 q 44 1102 30 1095 q 74 1110 58 1110 q 132 1045 132 1110 m 110 1144 q 93 1155 99 1148 q 80 1174 88 1161 l 342 1390 q 360 1379 349 1385 q 384 1365 372 1373 q 406 1352 396 1358 q 422 1339 417 1345 l 428 1309 l 110 1144 "},"̉":{"x_min":-464,"x_max":-237,"ha":0,"o":"m -237 904 q -249 871 -237 886 q -279 843 -262 856 q -311 817 -295 829 q -335 793 -327 806 q -336 767 -342 780 q -301 736 -329 753 q -321 728 -311 730 q -343 726 -332 727 q -388 753 -373 740 q -405 776 -402 765 q -402 797 -408 787 q -384 815 -395 806 q -358 833 -372 824 q -332 851 -344 842 q -311 871 -319 861 q -303 894 -303 882 q -315 933 -303 920 q -348 946 -328 946 q -366 942 -358 946 q -381 932 -375 938 q -390 918 -387 926 q -394 903 -394 911 q -392 896 -394 900 q -388 889 -390 893 q -402 885 -394 887 q -421 880 -411 882 q -440 877 -430 878 q -456 874 -449 875 l -464 882 l -464 891 q -451 922 -464 907 q -418 950 -438 938 q -373 971 -398 963 q -325 979 -349 979 q -260 958 -283 979 q -237 904 -237 938 "},"ɫ":{"x_min":-0.40625,"x_max":462.40625,"ha":463,"o":"m 462 604 q 433 549 450 577 q 395 500 416 522 q 350 465 374 479 q 299 452 326 452 q 282 454 290 452 l 282 70 q 305 49 282 60 q 383 29 328 38 l 383 0 l 78 0 l 78 29 q 127 39 107 33 q 158 49 146 44 q 174 59 169 54 q 180 70 180 65 l 180 512 q 155 524 167 519 q 132 529 144 529 q 83 506 105 529 q 35 446 60 484 l 0 460 q 28 515 11 488 q 66 565 45 543 q 111 600 87 586 q 161 614 135 614 q 180 611 170 614 l 180 879 q 175 926 180 909 q 161 951 171 943 q 131 963 150 960 q 85 969 113 966 l 85 996 q 174 1017 133 1006 q 257 1051 215 1029 l 282 1027 l 282 555 q 305 542 294 547 q 327 537 316 537 q 377 558 353 537 q 425 620 402 580 l 462 604 "},"Ẻ":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 454 1121 q 442 1088 454 1103 q 412 1060 429 1073 q 379 1034 395 1046 q 356 1010 363 1023 q 355 984 349 997 q 390 953 361 970 q 369 945 380 947 q 348 943 358 944 q 303 970 318 957 q 286 993 289 982 q 289 1014 282 1004 q 307 1032 295 1023 q 333 1050 318 1041 q 359 1068 347 1059 q 380 1088 371 1078 q 388 1111 388 1099 q 375 1150 388 1137 q 343 1163 363 1163 q 324 1159 333 1163 q 310 1149 316 1155 q 300 1135 304 1143 q 297 1120 297 1128 q 299 1113 297 1117 q 302 1106 300 1110 q 289 1102 297 1104 q 270 1097 280 1099 q 251 1094 260 1095 q 235 1091 241 1092 l 227 1099 l 227 1108 q 240 1139 227 1124 q 273 1167 253 1155 q 317 1188 293 1180 q 366 1196 342 1196 q 431 1175 408 1196 q 454 1121 454 1155 "},"È":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 460 957 q 445 938 451 944 q 430 927 440 931 l 111 1092 l 117 1122 q 132 1134 122 1128 q 155 1148 143 1141 q 179 1162 167 1156 q 198 1173 190 1168 l 460 957 "},"fi":{"x_min":30.875,"x_max":770.984375,"ha":808,"o":"m 554 985 q 544 969 554 980 q 521 947 535 958 q 493 925 507 935 q 468 910 478 915 q 435 935 452 924 q 403 952 419 945 q 375 962 388 959 q 353 966 362 966 q 315 954 335 966 q 278 911 295 942 q 249 826 261 880 q 238 689 238 773 l 238 631 l 412 631 l 432 611 q 417 591 426 602 q 399 571 408 580 q 381 553 389 561 q 366 543 372 545 q 321 559 350 551 q 238 567 292 567 l 238 69 q 245 61 238 65 q 269 52 252 57 q 312 42 286 48 q 379 29 339 36 l 379 0 l 41 0 l 41 29 q 111 49 87 37 q 136 69 136 61 l 136 567 l 45 567 l 30 585 l 83 631 l 136 631 l 136 652 q 146 786 136 731 q 176 878 157 841 q 219 941 195 916 q 271 988 244 967 q 311 1015 289 1003 q 354 1034 332 1026 q 395 1046 375 1042 q 427 1051 414 1051 q 470 1042 448 1051 q 511 1024 493 1034 q 542 1002 530 1013 q 554 985 554 991 m 479 0 l 479 29 q 549 49 525 38 q 574 70 574 61 l 574 454 q 572 510 574 488 q 562 543 571 531 q 534 560 553 555 q 479 569 515 566 l 479 596 q 523 606 500 600 q 569 619 546 612 q 614 634 593 626 q 652 651 635 642 l 676 651 l 676 70 q 698 50 676 62 q 770 29 721 38 l 770 0 l 479 0 m 696 854 q 689 818 696 835 q 673 789 683 801 q 648 769 662 776 q 617 762 634 762 q 573 778 586 762 q 560 826 560 795 q 566 862 560 845 q 583 892 572 879 q 608 911 594 904 q 638 919 622 919 q 696 854 696 919 "},"":{"x_min":0,"x_max":276.703125,"ha":277,"o":"m 276 731 q 259 718 267 722 q 238 710 250 713 l 0 965 l 14 993 q 34 998 21 995 q 62 1003 48 1000 q 91 1007 77 1005 q 113 1010 105 1009 l 276 731 "},"X":{"x_min":21.03125,"x_max":833.53125,"ha":855,"o":"m 527 0 l 527 29 q 575 36 557 31 q 602 46 594 40 q 609 62 610 53 q 598 86 608 72 l 409 363 l 238 86 q 241 44 219 56 q 326 29 263 33 l 326 0 l 21 0 l 21 29 q 96 44 65 32 q 144 86 127 57 l 359 437 l 133 768 q 113 793 123 783 q 92 809 104 802 q 65 818 80 815 q 27 826 50 822 l 27 855 l 333 855 l 333 826 q 258 809 276 820 q 261 768 240 798 l 428 522 l 581 768 q 590 794 591 784 q 577 810 588 804 q 544 820 565 817 q 493 826 523 823 l 493 855 l 800 855 l 800 826 q 756 819 775 823 q 722 809 737 815 q 696 793 707 802 q 676 768 685 783 l 478 449 l 726 86 q 747 61 736 71 q 770 45 757 52 q 798 35 782 39 q 833 29 813 31 l 833 0 l 527 0 "},"ô":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 577 740 q 564 721 569 727 q 548 710 559 715 l 362 891 l 178 710 q 169 715 172 712 q 162 721 165 718 q 155 729 159 724 q 147 740 152 734 l 326 998 l 399 998 l 577 740 "},"ṹ":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 600 912 q 571 857 588 884 q 534 808 554 830 q 489 773 513 787 q 438 760 464 760 q 393 771 414 760 q 351 798 371 783 q 310 825 330 813 q 271 837 290 837 q 221 814 244 837 q 174 755 199 792 l 138 768 q 167 823 150 796 q 204 873 183 851 q 249 908 225 894 q 300 922 274 922 q 349 910 326 922 q 392 883 372 898 q 431 856 413 868 q 465 845 449 845 q 516 866 491 845 q 564 928 541 888 l 600 912 m 340 954 q 318 961 328 956 q 301 973 309 967 l 460 1254 q 481 1251 468 1253 q 509 1248 495 1250 q 537 1243 524 1246 q 558 1238 551 1240 l 574 1212 l 340 954 "},"":{"x_min":48,"x_max":502,"ha":556,"o":"m 101 0 l 101 29 q 217 70 217 49 l 217 180 q 230 247 217 219 q 264 296 244 274 q 308 335 284 318 q 352 369 332 352 q 386 407 372 387 q 400 454 400 427 q 388 510 400 485 q 357 552 376 535 q 313 578 338 569 q 260 587 288 587 q 217 578 236 587 q 185 554 198 569 q 165 519 172 539 q 159 479 159 500 q 161 459 159 469 q 167 439 163 449 q 121 422 145 428 q 67 414 98 417 l 49 434 q 48 445 48 439 l 48 456 q 71 535 48 499 q 131 596 94 570 q 217 636 169 622 q 313 651 264 651 q 390 638 355 651 q 450 602 425 625 q 488 549 474 580 q 502 484 502 519 q 488 422 502 448 q 454 376 474 396 q 410 340 434 356 q 366 304 386 323 q 332 263 346 286 q 319 206 319 240 l 319 70 q 348 49 319 60 q 434 29 378 38 l 434 0 l 101 0 "},"Ė":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 408 1045 q 402 1009 408 1026 q 385 980 396 992 q 361 960 375 967 q 329 953 346 953 q 286 969 299 953 q 272 1018 272 986 q 278 1053 272 1036 q 295 1083 284 1070 q 320 1102 306 1095 q 350 1110 334 1110 q 408 1045 408 1110 "},"ấ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 539 740 q 526 721 531 727 q 510 710 522 715 l 324 891 l 141 710 q 131 715 135 712 q 125 721 128 718 q 118 729 122 724 q 110 740 115 734 l 289 998 l 362 998 l 539 740 m 296 1015 q 274 1022 284 1017 q 257 1034 265 1028 l 416 1315 q 437 1312 424 1314 q 465 1309 451 1311 q 493 1304 480 1307 q 514 1299 507 1301 l 530 1273 l 296 1015 "},"ŋ":{"x_min":37.046875,"x_max":651,"ha":760,"o":"m 651 59 q 638 -73 651 -19 q 605 -165 625 -128 q 558 -228 584 -203 q 504 -275 532 -254 q 463 -303 486 -291 q 417 -322 440 -314 q 373 -334 394 -330 q 340 -339 353 -339 q 290 -332 317 -339 q 240 -315 263 -325 q 201 -293 216 -305 q 185 -272 185 -282 q 195 -255 185 -266 q 219 -233 205 -245 q 248 -211 233 -222 q 272 -196 263 -201 q 313 -226 292 -215 q 353 -245 334 -238 q 388 -255 372 -252 q 415 -258 405 -258 q 457 -245 434 -258 q 501 -201 481 -232 q 535 -114 521 -169 q 549 23 549 -60 l 549 429 q 544 496 549 470 q 529 536 539 521 q 502 556 519 551 q 462 562 485 562 q 415 552 441 562 q 359 519 388 542 q 297 461 329 497 q 233 372 265 425 l 233 70 q 258 49 233 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 481 q 129 523 132 508 q 118 548 127 539 q 90 560 109 556 q 37 569 71 564 l 37 597 q 122 618 83 604 q 200 652 161 632 l 224 628 l 230 458 q 296 539 260 504 q 368 599 332 575 q 439 637 405 624 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 59 "},"Ỵ":{"x_min":-0.390625,"x_max":797.6875,"ha":825,"o":"m 243 0 l 243 29 q 330 55 305 42 q 355 78 355 68 l 355 364 q 298 478 329 419 q 232 594 266 538 q 168 699 199 651 q 113 780 137 748 q 99 794 107 788 q 79 806 91 801 q 49 814 67 811 q 2 818 30 818 l 0 847 q 79 856 39 852 q 148 861 119 861 q 201 834 179 861 q 255 757 226 802 q 313 663 284 713 q 370 562 342 614 q 422 461 398 509 l 604 780 q 597 808 614 797 q 529 825 581 818 l 529 855 l 797 855 l 797 825 q 726 807 750 816 q 691 780 701 797 l 464 366 l 464 77 q 469 68 464 73 q 488 55 475 62 q 523 42 501 48 q 576 29 544 35 l 576 0 l 243 0 m 477 -189 q 471 -225 477 -208 q 455 -254 465 -242 q 430 -274 444 -267 q 399 -282 416 -282 q 355 -265 368 -282 q 341 -217 341 -248 q 348 -181 341 -198 q 365 -151 354 -164 q 389 -132 375 -139 q 420 -125 403 -125 q 477 -189 477 -125 "},"":{"x_min":29.59375,"x_max":640.484375,"ha":661,"o":"m 640 165 q 626 63 635 106 q 612 0 618 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 60 l 132 296 l 44 296 l 29 312 q 36 334 32 323 q 44 357 40 346 l 132 357 l 132 432 l 44 432 l 29 448 q 36 470 32 459 q 44 493 40 482 l 132 493 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 493 l 403 493 l 420 477 l 403 432 l 241 432 l 241 357 l 403 357 l 420 341 l 403 296 l 241 296 l 241 111 q 246 89 241 98 q 266 74 252 80 q 305 64 281 67 q 367 61 329 61 l 464 61 q 516 64 495 61 q 554 79 538 67 q 583 114 570 91 q 611 177 597 137 l 640 165 "},"ṇ":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 544 496 549 470 q 529 537 539 522 q 502 557 519 552 q 462 563 486 563 q 415 552 441 563 q 360 520 389 542 q 298 461 330 497 q 234 372 266 425 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 59 l 132 482 q 129 524 132 508 q 118 548 127 540 q 90 561 109 557 q 37 570 71 565 l 37 597 q 122 618 83 604 q 199 651 161 632 l 223 627 l 231 458 q 296 539 260 503 q 369 599 332 575 q 440 637 406 624 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 m 459 -189 q 453 -225 459 -208 q 436 -254 447 -242 q 412 -274 426 -267 q 380 -282 397 -282 q 336 -265 350 -282 q 323 -217 323 -248 q 329 -181 323 -198 q 346 -151 335 -164 q 371 -132 357 -139 q 401 -125 385 -125 q 459 -189 459 -125 "},"Ǟ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 609 1045 q 603 1009 609 1026 q 586 980 597 992 q 561 960 576 967 q 530 953 547 953 q 486 969 500 953 q 473 1018 473 986 q 479 1053 473 1036 q 496 1083 485 1070 q 521 1102 507 1095 q 551 1110 535 1110 q 609 1045 609 1110 m 338 1045 q 332 1009 338 1026 q 315 980 326 992 q 290 960 305 967 q 259 953 276 953 q 215 969 229 953 q 202 1018 202 986 q 208 1053 202 1036 q 225 1083 214 1070 q 250 1102 236 1095 q 280 1110 264 1110 q 338 1045 338 1110 m 642 1275 q 637 1258 640 1268 q 630 1238 634 1248 q 622 1219 626 1229 q 615 1204 618 1210 l 198 1204 l 183 1220 q 188 1237 185 1228 q 196 1257 191 1247 q 204 1276 200 1267 q 211 1292 208 1285 l 627 1292 l 642 1275 "},"ü":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 572 854 q 566 818 572 835 q 550 789 560 801 q 525 769 539 776 q 494 762 511 762 q 450 778 463 762 q 436 826 436 795 q 443 862 436 845 q 460 892 449 879 q 484 911 470 904 q 515 919 498 919 q 572 854 572 919 m 301 854 q 295 818 301 835 q 279 789 289 801 q 254 769 268 776 q 223 762 240 762 q 179 778 192 762 q 165 826 165 795 q 172 862 165 845 q 189 892 178 879 q 213 911 199 904 q 244 919 227 919 q 301 854 301 919 "},"Ÿ":{"x_min":-0.390625,"x_max":797.6875,"ha":825,"o":"m 243 0 l 243 29 q 330 55 305 42 q 355 78 355 68 l 355 364 q 298 478 329 419 q 232 594 266 538 q 168 699 199 651 q 113 780 137 748 q 99 794 107 788 q 79 806 91 801 q 49 814 67 811 q 2 818 30 818 l 0 847 q 79 856 39 852 q 148 861 119 861 q 201 834 179 861 q 255 757 226 802 q 313 663 284 713 q 370 562 342 614 q 422 461 398 509 l 604 780 q 597 808 614 797 q 529 825 581 818 l 529 855 l 797 855 l 797 825 q 726 807 750 816 q 691 780 701 797 l 464 366 l 464 77 q 469 68 464 73 q 488 55 475 62 q 523 42 501 48 q 576 29 544 35 l 576 0 l 243 0 m 612 1045 q 606 1009 612 1026 q 590 980 600 992 q 565 960 579 967 q 534 953 551 953 q 490 969 503 953 q 476 1018 476 986 q 483 1053 476 1036 q 500 1083 489 1070 q 524 1102 510 1095 q 555 1110 538 1110 q 612 1045 612 1110 m 341 1045 q 335 1009 341 1026 q 319 980 329 992 q 294 960 308 967 q 263 953 280 953 q 219 969 232 953 q 205 1018 205 986 q 212 1053 205 1036 q 229 1083 218 1070 q 253 1102 239 1095 q 284 1110 267 1110 q 341 1045 341 1110 "},"€":{"x_min":16.28125,"x_max":627.359375,"ha":652,"o":"m 423 317 l 201 317 q 229 197 209 246 q 276 118 248 148 q 337 74 303 88 q 406 61 370 61 q 447 66 427 61 q 490 85 467 72 q 540 120 513 98 q 602 173 567 142 q 609 167 605 172 q 616 158 613 163 q 622 149 619 153 q 627 143 625 145 q 553 65 586 96 q 489 15 520 34 q 426 -11 458 -3 q 358 -20 395 -20 q 261 0 307 -20 q 181 61 216 20 q 122 166 145 102 q 93 317 99 230 l 31 317 l 16 333 q 23 355 19 344 q 31 378 27 367 l 91 378 l 91 380 q 95 466 91 425 l 51 466 l 36 482 q 43 504 40 493 q 51 527 47 516 l 103 527 q 147 661 118 603 q 218 759 176 719 q 313 818 260 798 q 429 838 366 838 q 489 832 463 838 q 538 817 516 827 q 578 796 560 808 q 614 769 596 784 q 612 756 618 766 q 595 733 606 746 q 573 707 585 720 q 553 686 561 694 l 529 690 q 497 719 512 706 q 464 742 482 732 q 424 757 446 752 q 372 763 402 763 q 323 752 349 763 q 274 716 297 742 q 231 643 250 689 q 203 527 212 598 l 444 527 l 461 511 l 444 466 l 198 466 q 197 436 197 451 q 196 405 196 421 l 196 378 l 423 378 l 440 362 l 423 317 "},"ß":{"x_min":37.046875,"x_max":724,"ha":785,"o":"m 724 192 q 711 114 724 152 q 670 46 698 76 q 599 -1 642 16 q 494 -20 555 -20 q 448 -14 475 -20 q 393 -2 420 -9 q 344 14 366 5 q 318 32 323 24 q 315 47 316 35 q 314 75 314 59 q 315 110 314 92 q 317 145 315 128 q 321 175 319 162 q 328 192 324 187 l 354 183 q 376 121 359 147 q 416 79 393 95 q 468 55 440 62 q 521 48 495 48 q 566 55 545 48 q 602 75 587 62 q 627 106 618 88 q 636 147 636 125 q 622 208 636 182 q 587 254 609 234 q 538 291 566 274 q 482 322 511 307 q 425 353 452 337 q 376 389 397 369 q 341 434 354 409 q 328 494 328 459 q 344 568 328 539 q 386 616 361 597 q 440 647 411 634 q 494 674 469 660 q 536 708 519 688 q 553 760 553 728 q 543 831 553 795 q 513 897 534 867 q 461 946 493 927 q 383 966 428 966 q 323 954 350 966 q 275 911 295 942 q 244 826 255 879 q 234 688 234 772 l 234 0 l 37 0 l 37 29 q 107 49 83 37 q 132 69 132 61 l 132 651 q 143 787 132 732 q 172 880 154 842 q 215 942 191 917 q 266 988 239 966 q 348 1034 303 1018 q 442 1051 394 1051 q 541 1026 501 1051 q 608 966 582 1002 q 644 886 633 929 q 656 806 656 844 q 638 716 656 751 q 595 658 621 680 q 539 621 569 636 q 483 594 509 607 q 440 565 457 581 q 423 522 423 549 q 435 483 423 499 q 470 452 448 466 q 518 425 491 438 q 573 396 545 411 q 628 364 601 381 q 676 321 655 346 q 711 266 698 297 q 724 192 724 234 "},"ǩ":{"x_min":37.046875,"x_max":694.515625,"ha":695,"o":"m 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 878 q 128 926 132 909 q 114 952 124 943 q 84 963 103 960 q 37 969 66 966 l 37 996 q 129 1018 83 1006 q 208 1051 174 1031 l 234 1027 l 234 359 l 442 542 q 470 573 465 561 q 468 591 474 585 q 446 599 461 597 q 413 601 431 601 l 413 631 l 670 631 l 670 601 q 615 590 640 598 q 562 559 590 582 l 330 374 l 586 75 q 605 57 595 64 q 628 45 615 50 q 655 40 640 41 q 690 41 670 39 l 694 12 q 655 3 674 7 q 619 -1 636 0 q 589 -5 602 -4 q 569 -7 576 -7 q 523 1 541 -7 q 491 28 506 9 l 234 353 l 234 70 q 236 61 234 65 q 246 52 238 56 q 268 42 253 48 q 308 29 283 37 l 308 0 l 37 0 m 402 1112 l 329 1112 l 150 1320 q 158 1332 155 1327 q 165 1340 162 1337 q 171 1346 168 1343 q 181 1352 175 1349 l 367 1209 l 550 1352 q 567 1340 562 1346 q 579 1320 571 1334 l 402 1112 "},"Ể":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 554 957 q 541 938 546 944 q 525 927 537 932 l 339 1068 l 156 927 q 146 932 150 929 q 140 938 143 935 q 133 946 137 941 q 125 957 130 951 l 304 1167 l 377 1167 l 554 957 m 454 1392 q 442 1359 454 1374 q 412 1331 429 1344 q 379 1306 395 1318 q 356 1281 363 1294 q 355 1255 349 1269 q 390 1225 361 1242 q 369 1217 380 1218 q 348 1214 358 1215 q 303 1241 318 1229 q 286 1265 289 1254 q 289 1285 282 1275 q 307 1304 295 1294 q 333 1321 318 1313 q 359 1340 347 1330 q 380 1360 371 1349 q 388 1382 388 1370 q 375 1421 388 1408 q 343 1434 363 1434 q 324 1430 333 1434 q 310 1420 316 1426 q 300 1407 304 1414 q 297 1392 297 1399 q 299 1385 297 1388 q 302 1378 300 1381 q 289 1373 297 1376 q 270 1369 280 1371 q 251 1365 260 1367 q 235 1363 241 1363 l 227 1370 l 227 1379 q 240 1411 227 1395 q 273 1439 253 1426 q 317 1459 293 1451 q 366 1467 342 1467 q 431 1446 408 1467 q 454 1392 454 1426 "},"ǵ":{"x_min":20,"x_max":670.8125,"ha":678,"o":"m 468 406 q 456 474 468 442 q 420 531 444 507 q 362 569 397 555 q 282 583 327 583 q 244 574 265 583 q 205 548 224 565 q 175 505 187 531 q 163 446 163 479 q 174 378 163 410 q 208 322 185 346 q 265 284 230 298 q 348 271 300 271 q 389 279 368 271 q 428 305 411 287 q 456 347 445 322 q 468 406 468 372 m 351 -2 q 303 3 325 0 q 263 10 282 6 q 186 -36 214 -15 q 143 -74 157 -57 q 125 -104 129 -90 q 122 -128 122 -118 q 140 -182 122 -157 q 191 -226 159 -208 q 265 -256 223 -245 q 353 -268 307 -268 q 436 -255 399 -268 q 500 -222 473 -243 q 541 -171 526 -200 q 556 -106 556 -141 q 547 -71 556 -87 q 515 -42 538 -55 q 452 -19 492 -29 q 351 -2 412 -9 m 563 434 q 539 339 563 382 q 478 265 516 296 q 392 217 440 234 q 294 200 343 200 l 291 200 q 246 154 259 172 q 234 132 234 136 q 241 116 234 124 q 268 102 248 109 q 321 87 287 94 q 408 74 355 80 q 530 50 482 66 q 607 12 578 33 q 646 -33 635 -8 q 658 -81 658 -57 q 643 -152 658 -118 q 605 -214 629 -185 q 547 -265 580 -242 q 476 -305 514 -288 q 397 -330 438 -321 q 316 -339 356 -339 q 250 -334 284 -339 q 183 -320 216 -330 q 120 -296 150 -311 q 68 -261 91 -282 q 33 -214 46 -240 q 20 -155 20 -188 q 26 -118 20 -137 q 52 -76 32 -98 q 107 -28 72 -54 q 201 28 142 -2 q 140 63 157 44 q 123 103 123 83 q 126 118 123 109 q 140 140 129 127 q 170 170 150 153 q 220 209 189 187 q 158 236 186 218 q 110 280 130 254 q 79 337 90 305 q 68 408 68 370 q 90 502 68 457 q 149 579 112 546 q 232 631 185 612 q 329 651 279 651 q 405 639 369 651 q 470 606 440 627 q 533 615 505 610 q 585 627 562 621 q 625 639 607 633 q 657 651 643 645 l 670 630 q 655 595 662 611 q 632 562 647 579 q 581 555 606 558 q 525 551 556 552 q 553 496 543 525 q 563 434 563 467 m 309 710 q 288 717 297 712 q 271 729 278 722 l 430 1010 q 451 1007 438 1009 q 479 1003 464 1005 q 507 999 493 1001 q 528 994 520 996 l 543 967 l 309 710 "},"":{"x_min":47.5625,"x_max":396.4375,"ha":444,"o":"m 381 434 l 273 434 l 273 70 q 296 49 273 60 q 374 29 319 38 l 374 0 l 69 0 l 69 29 q 118 38 98 33 q 149 49 137 44 q 165 59 160 54 q 171 70 171 65 l 171 434 l 62 434 l 47 448 q 54 471 50 459 q 62 495 57 484 l 171 495 l 171 570 l 62 570 l 47 584 q 54 607 50 595 q 62 631 57 620 l 171 631 l 171 878 q 166 926 171 909 q 152 951 162 943 q 122 963 141 960 q 76 969 104 966 l 76 996 q 165 1017 124 1006 q 248 1051 206 1029 l 273 1027 l 273 631 l 381 631 l 396 614 l 381 570 l 273 570 l 273 495 l 381 495 l 396 478 l 381 434 "},"ẳ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 545 922 q 500 829 525 867 q 446 768 474 792 q 387 735 418 745 q 326 725 357 725 q 262 735 293 725 q 203 768 231 745 q 150 829 174 792 q 105 922 125 867 q 121 941 113 934 q 141 953 129 947 q 180 887 158 914 q 226 845 202 861 q 276 822 250 829 q 324 815 301 815 q 374 822 347 815 q 424 845 400 829 q 471 887 449 861 q 510 953 493 914 q 529 941 521 947 q 545 922 537 934 m 439 1121 q 427 1088 439 1103 q 397 1060 414 1073 q 364 1034 380 1046 q 341 1010 349 1023 q 340 984 334 997 q 375 953 347 970 q 354 945 365 947 q 333 943 344 944 q 288 970 303 957 q 271 993 274 982 q 274 1014 268 1004 q 292 1032 280 1023 q 318 1050 304 1041 q 344 1068 332 1059 q 365 1088 356 1078 q 373 1111 373 1099 q 361 1150 373 1137 q 328 1163 348 1163 q 309 1159 318 1163 q 295 1149 301 1155 q 285 1135 289 1143 q 282 1120 282 1128 q 284 1113 282 1117 q 287 1106 285 1110 q 274 1102 282 1104 q 255 1097 265 1099 q 236 1094 246 1095 q 220 1091 227 1092 l 212 1099 l 212 1108 q 225 1139 212 1124 q 258 1167 238 1155 q 302 1188 278 1180 q 351 1196 327 1196 q 416 1175 393 1196 q 439 1121 439 1155 "},"Ű":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 348 927 q 330 933 337 929 q 309 945 323 937 l 429 1227 q 448 1223 437 1225 q 471 1219 459 1222 q 492 1215 482 1217 q 510 1210 503 1212 l 524 1182 l 348 927 m 545 927 q 526 933 533 929 q 507 945 519 937 l 626 1227 q 645 1223 634 1225 q 667 1219 656 1222 q 689 1215 678 1217 q 707 1210 699 1212 l 722 1182 l 545 927 "},"c":{"x_min":54,"x_max":569.71875,"ha":607,"o":"m 569 129 q 492 47 525 76 q 430 2 458 17 q 374 -16 401 -12 q 315 -20 347 -20 q 218 2 265 -20 q 134 65 171 24 q 76 166 98 106 q 54 301 54 226 q 80 438 54 374 q 154 548 107 501 q 263 623 200 596 q 400 651 326 651 q 445 647 422 651 q 490 636 469 643 q 530 619 512 629 q 559 597 548 609 q 557 574 560 588 q 548 542 554 559 q 534 510 541 525 q 520 485 527 495 l 495 492 q 478 519 490 504 q 446 546 465 533 q 400 567 427 559 q 339 576 373 576 q 270 560 303 576 q 211 512 237 544 q 171 433 186 480 q 156 322 156 385 q 173 217 156 264 q 219 137 190 170 q 285 85 248 103 q 364 68 323 68 q 399 69 383 68 q 435 80 415 71 q 479 106 454 89 q 543 156 505 124 l 569 129 "},"¶":{"x_min":33,"x_max":715.03125,"ha":769,"o":"m 300 -170 l 300 -140 q 373 -119 347 -131 q 400 -98 400 -108 l 400 361 q 374 358 388 359 q 341 357 359 357 q 222 372 278 357 q 124 421 166 388 q 57 501 81 453 q 33 612 33 548 q 55 718 33 670 q 119 801 78 766 q 218 855 161 836 q 344 875 275 875 q 380 874 359 875 q 427 871 402 873 q 480 868 453 870 q 534 865 508 867 q 666 855 597 860 l 715 855 l 715 826 q 642 804 668 816 q 616 783 616 793 l 616 -98 q 640 -119 616 -107 q 715 -140 665 -131 l 715 -170 l 300 -170 m 401 414 l 401 814 q 331 818 359 818 q 257 803 291 818 q 198 765 223 789 q 159 707 173 740 q 146 636 146 674 q 158 560 146 599 q 199 488 171 521 q 269 435 226 456 q 371 414 311 414 l 401 414 m 536 786 q 509 794 522 790 l 482 800 l 482 -98 q 491 -111 482 -105 q 508 -119 501 -117 q 526 -111 516 -117 q 536 -98 536 -105 l 536 786 "},"Ụ":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 527 -189 q 521 -225 527 -208 q 504 -254 515 -242 q 479 -274 494 -267 q 448 -282 465 -282 q 404 -265 417 -282 q 391 -217 391 -248 q 397 -181 391 -198 q 414 -151 403 -164 q 439 -132 425 -139 q 469 -125 453 -125 q 527 -189 527 -125 "},"":{"x_min":29.59375,"x_max":871.125,"ha":908,"o":"m 478 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 417 l 241 417 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 478 l 854 478 l 871 462 l 854 417 l 766 417 l 766 355 q 744 196 766 266 q 681 78 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 97 q 132 301 132 218 l 132 417 l 44 417 l 29 433 q 36 455 32 444 q 44 478 40 467 l 132 478 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 478 l 678 478 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 "},"­":{"x_min":41.375,"x_max":426.609375,"ha":468,"o":"m 426 370 q 416 338 422 355 q 405 309 411 320 l 58 309 l 41 325 q 50 356 44 340 q 62 387 56 373 l 409 387 l 426 370 "},"Ṑ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 653 1058 q 648 1041 651 1051 q 640 1021 644 1031 q 633 1002 636 1012 q 626 987 629 993 l 209 987 l 194 1003 q 199 1020 196 1011 q 206 1040 202 1030 q 214 1059 210 1049 q 222 1075 219 1068 l 638 1075 l 653 1058 m 537 1174 q 522 1155 527 1161 q 506 1144 517 1148 l 188 1309 l 193 1339 q 209 1352 198 1345 q 231 1365 219 1358 q 255 1379 244 1373 q 274 1390 267 1385 l 537 1174 "},"ȳ":{"x_min":-31.875,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 369 -55 q 306 -184 341 -130 q 233 -272 271 -237 q 158 -322 196 -306 q 86 -339 120 -339 q 38 -335 60 -339 q 1 -327 16 -332 q -23 -315 -14 -322 q -31 -303 -31 -309 q -23 -286 -31 -298 q -3 -259 -15 -274 q 22 -231 8 -245 q 47 -211 36 -218 q 112 -231 80 -230 q 169 -223 144 -233 q 198 -204 181 -219 q 230 -168 214 -189 q 263 -118 247 -146 q 291 -62 279 -91 l 311 -15 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 123 l 522 555 q 523 573 525 565 q 511 585 520 580 q 485 594 502 590 q 444 601 469 597 l 444 631 l 670 631 l 670 601 m 595 868 q 590 851 594 861 q 583 831 587 841 q 575 812 579 822 q 569 797 571 803 l 151 797 l 137 813 q 141 830 138 821 q 149 850 145 840 q 157 869 153 859 q 164 885 161 878 l 580 885 l 595 868 "},"Ẓ":{"x_min":40.015625,"x_max":672.125,"ha":726,"o":"m 672 198 q 669 150 670 177 q 667 97 668 124 q 665 45 666 70 q 663 0 664 19 l 59 0 l 40 30 l 522 787 l 210 787 q 187 779 200 787 q 162 755 174 772 q 139 714 149 739 q 120 653 128 688 l 82 661 l 101 865 q 135 859 120 861 q 165 855 150 856 q 195 855 179 855 l 648 855 l 665 825 l 187 68 l 541 68 q 567 74 556 68 q 589 96 579 80 q 611 139 600 112 q 634 208 621 166 l 672 198 m 431 -189 q 425 -225 431 -208 q 408 -254 418 -242 q 383 -274 397 -267 q 352 -282 369 -282 q 308 -265 321 -282 q 295 -217 295 -248 q 301 -181 295 -198 q 318 -151 307 -164 q 343 -132 329 -139 q 373 -125 357 -125 q 431 -189 431 -125 "},"ḳ":{"x_min":37.046875,"x_max":694.515625,"ha":695,"o":"m 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 878 q 128 926 132 909 q 114 952 124 943 q 84 963 103 960 q 37 969 66 966 l 37 996 q 129 1018 83 1006 q 208 1051 174 1031 l 234 1027 l 234 359 l 442 542 q 470 573 465 561 q 468 591 474 585 q 446 599 461 597 q 413 601 431 601 l 413 631 l 670 631 l 670 601 q 615 590 640 598 q 562 559 590 582 l 330 374 l 586 75 q 605 57 595 64 q 628 45 615 50 q 655 40 640 41 q 690 41 670 39 l 694 12 q 655 3 674 7 q 619 -1 636 0 q 589 -5 602 -4 q 569 -7 576 -7 q 523 1 541 -7 q 491 28 506 9 l 234 353 l 234 70 q 236 61 234 65 q 246 52 238 56 q 268 42 253 48 q 308 29 283 37 l 308 0 l 37 0 m 433 -189 q 427 -225 433 -208 q 411 -254 421 -242 q 386 -274 400 -267 q 354 -282 371 -282 q 311 -265 324 -282 q 297 -217 297 -248 q 303 -181 297 -198 q 320 -151 310 -164 q 345 -132 331 -139 q 376 -125 359 -125 q 433 -189 433 -125 "},":":{"x_min":89,"x_max":250,"ha":318,"o":"m 250 83 q 242 39 250 59 q 223 4 235 19 q 193 -18 210 -10 q 156 -27 176 -27 q 104 -7 120 -27 q 89 48 89 12 q 96 91 89 71 q 116 127 103 111 q 146 151 129 142 q 183 160 164 160 q 233 140 216 160 q 250 83 250 120 m 250 575 q 242 531 250 551 q 223 496 235 511 q 193 473 210 481 q 156 464 176 464 q 104 484 120 464 q 89 540 89 504 q 96 583 89 563 q 116 618 103 603 q 146 642 129 634 q 183 651 164 651 q 233 631 216 651 q 250 575 250 611 "},"ś":{"x_min":64.5,"x_max":474.078125,"ha":536,"o":"m 474 192 q 460 109 474 144 q 425 51 446 75 q 377 13 403 28 q 325 -7 350 0 q 276 -17 299 -15 q 241 -20 254 -20 q 163 -7 208 -20 q 72 29 117 4 q 65 51 67 31 q 64 97 63 71 q 68 150 65 123 q 77 192 72 176 l 106 185 q 120 131 107 156 q 157 88 134 106 q 209 58 179 69 q 275 48 239 48 q 319 55 299 48 q 354 77 340 63 q 377 111 369 91 q 386 154 386 130 q 371 202 386 181 q 333 240 356 223 q 279 273 309 258 q 218 304 249 288 q 163 335 189 319 q 116 371 137 351 q 83 417 96 392 q 71 474 71 442 q 87 549 71 516 q 132 604 104 582 q 196 639 160 627 q 271 651 233 651 q 317 647 292 651 q 367 636 343 643 q 414 620 392 629 q 449 598 435 611 q 450 580 453 594 q 440 549 447 566 q 426 517 434 532 q 415 497 419 502 l 389 502 q 321 570 356 551 q 254 590 287 590 q 214 582 231 590 q 184 563 196 575 q 165 537 171 551 q 159 508 159 522 q 171 469 159 486 q 205 437 184 452 q 253 408 226 421 q 308 379 280 394 q 367 347 337 364 q 420 308 396 330 q 459 258 444 286 q 474 192 474 230 m 240 710 q 218 717 227 712 q 201 729 208 722 l 360 1010 q 381 1007 368 1009 q 409 1003 394 1005 q 437 999 423 1001 q 458 994 451 996 l 474 967 l 240 710 "},"͞":{"x_min":-442.875,"x_max":442.875,"ha":0,"o":"m 442 1187 q 438 1170 441 1180 q 430 1150 434 1160 q 422 1131 426 1141 q 416 1116 419 1122 l -427 1116 l -442 1132 q -438 1149 -441 1140 q -430 1169 -434 1159 q -422 1188 -426 1178 q -415 1204 -418 1197 l 427 1204 l 442 1187 "},"ẇ":{"x_min":13.5625,"x_max":966.46875,"ha":981,"o":"m 966 601 q 933 592 945 597 q 913 583 921 588 q 903 573 906 579 q 898 559 900 567 l 748 40 q 732 14 744 25 q 706 -2 720 4 q 678 -13 692 -9 q 655 -20 664 -17 l 494 439 l 355 40 q 338 14 349 24 q 314 -3 327 3 q 287 -14 300 -10 q 265 -20 274 -17 l 87 559 q 13 601 81 586 l 13 631 l 275 631 l 275 601 q 223 594 242 598 q 197 583 205 589 q 188 572 189 578 q 190 559 188 565 l 318 129 l 484 631 l 531 631 l 708 129 l 825 559 q 811 584 829 575 q 746 601 792 594 l 746 631 l 966 631 l 966 601 m 576 854 q 570 818 576 835 q 554 789 564 801 q 529 769 543 776 q 498 762 515 762 q 454 778 467 762 q 440 826 440 795 q 447 862 440 845 q 464 892 453 879 q 488 911 474 904 q 519 919 502 919 q 576 854 576 919 "}," ":{"x_min":0,"x_max":0,"ha":306},"¾":{"x_min":54.796875,"x_max":759.546875,"ha":814,"o":"m 214 2 q 184 -10 198 -5 q 151 -20 169 -15 l 134 0 l 651 815 q 680 827 664 821 q 711 837 696 834 l 728 818 l 214 2 m 759 142 q 744 124 751 132 q 729 111 737 116 l 708 111 l 708 39 q 709 34 708 36 q 715 30 710 32 q 730 25 720 27 q 755 19 739 22 l 755 0 l 569 0 l 569 19 q 608 26 593 23 q 631 31 623 29 q 641 37 639 34 q 644 42 644 39 l 644 111 l 455 111 l 442 121 l 632 381 q 665 393 648 387 q 694 405 682 399 l 708 393 l 708 153 l 749 153 l 759 142 m 353 559 q 342 507 353 531 q 310 465 331 483 q 260 436 290 447 q 193 426 231 426 q 124 438 159 426 q 54 479 89 451 l 67 501 q 128 471 102 479 q 183 464 155 464 q 255 485 228 464 q 282 548 282 507 q 273 590 282 573 q 251 616 264 606 q 222 631 238 627 q 190 636 205 636 l 182 636 q 177 635 179 636 q 172 634 175 635 q 163 633 169 634 l 158 658 q 212 676 192 666 q 243 698 232 686 q 256 720 253 709 q 260 741 260 731 q 256 763 260 752 q 245 782 252 774 q 225 796 237 791 q 195 802 212 802 q 152 788 167 802 q 141 752 137 774 q 112 744 129 747 q 78 739 95 740 l 68 749 q 80 778 68 763 q 113 807 92 794 q 160 829 133 821 q 217 838 187 838 q 268 830 246 838 q 303 809 290 822 q 324 780 317 796 q 331 747 331 764 q 309 698 331 723 q 250 662 288 674 q 291 651 272 660 q 323 628 309 642 q 345 597 337 615 q 353 559 353 579 m 644 333 l 508 153 l 644 153 l 644 333 "},"m":{"x_min":37.046875,"x_max":1095.640625,"ha":1115,"o":"m 803 0 l 803 29 q 875 51 852 42 q 898 70 898 61 l 898 429 q 893 498 898 470 q 880 541 889 525 q 856 563 870 557 q 821 570 841 570 q 774 557 799 570 q 722 521 749 544 q 669 464 696 498 q 617 388 642 430 l 617 70 q 638 51 617 61 q 712 29 659 42 l 712 0 l 420 0 l 420 29 q 492 51 469 42 q 515 70 515 61 l 515 429 q 510 498 515 470 q 497 541 506 525 q 474 563 488 557 q 438 570 459 570 q 341 522 392 570 q 234 388 291 475 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 59 l 132 482 q 129 525 132 509 q 117 549 127 540 q 88 561 107 557 q 37 570 69 565 l 37 597 q 84 606 62 601 q 125 619 106 612 q 163 634 145 626 q 199 651 181 642 l 223 627 l 231 471 q 292 550 261 516 q 354 606 323 583 q 413 639 385 628 q 466 651 441 651 q 526 643 498 651 q 573 616 553 635 q 605 567 593 598 q 617 491 617 537 l 616 477 q 675 552 645 520 q 736 606 706 584 q 795 639 766 628 q 849 651 824 651 q 909 642 881 651 q 956 615 936 633 q 988 568 976 596 q 1000 502 1000 540 l 1000 70 q 1021 51 1000 61 q 1095 29 1042 42 l 1095 0 l 803 0 "},"Ị":{"x_min":47.65625,"x_max":353.34375,"ha":414,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 m 268 -189 q 262 -225 268 -208 q 245 -254 256 -242 q 220 -274 235 -267 q 189 -282 206 -282 q 145 -265 158 -282 q 132 -217 132 -248 q 138 -181 132 -198 q 155 -151 144 -164 q 180 -132 166 -139 q 210 -125 194 -125 q 268 -189 268 -125 "},"ž":{"x_min":51.546875,"x_max":562.25,"ha":614,"o":"m 562 168 q 561 122 562 146 q 559 74 560 97 q 557 31 558 51 q 554 0 556 12 l 69 0 l 51 30 l 427 570 l 193 570 q 171 565 182 570 q 149 550 160 561 q 129 519 139 539 q 113 468 120 499 l 80 476 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 545 631 l 560 601 l 183 61 l 469 61 q 500 87 486 61 q 530 174 514 113 l 562 168 m 362 726 l 289 726 l 110 968 q 118 979 115 974 q 125 987 122 984 q 131 993 128 991 q 141 1000 135 996 l 327 829 l 510 1000 q 526 987 522 993 q 539 968 531 981 l 362 726 "},"ớ":{"x_min":54,"x_max":746,"ha":746,"o":"m 539 308 q 521 410 539 362 q 475 495 503 458 q 412 554 448 532 q 342 576 377 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 225 134 197 170 q 289 76 254 97 q 355 55 323 55 q 437 72 403 55 q 494 124 472 90 q 528 203 517 157 q 539 308 539 250 m 746 707 q 738 670 746 690 q 713 626 731 649 q 665 577 695 602 q 590 527 635 551 q 630 436 616 486 q 644 329 644 386 q 632 240 644 283 q 600 158 620 197 q 551 86 580 119 q 489 30 523 53 q 416 -6 454 6 q 336 -20 377 -20 q 219 4 271 -20 q 130 71 167 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 206 600 172 576 q 280 637 241 623 q 362 651 320 651 q 474 628 424 651 q 561 564 525 605 q 613 611 597 588 q 629 652 629 634 q 618 689 629 671 q 589 722 608 707 l 710 777 q 736 744 726 762 q 746 707 746 726 m 333 710 q 311 717 321 712 q 295 729 302 722 l 453 1010 q 475 1007 461 1009 q 502 1003 488 1005 q 531 999 517 1001 q 552 994 544 996 l 567 967 l 333 710 "},"á":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 296 710 q 274 717 284 712 q 257 729 265 722 l 416 1010 q 437 1007 424 1009 q 465 1003 451 1005 q 493 999 480 1001 q 514 994 507 996 l 530 967 l 296 710 "},"×":{"x_min":63.078125,"x_max":505.953125,"ha":570,"o":"m 63 213 l 231 381 l 64 547 l 63 570 q 94 582 77 577 q 126 592 111 588 l 284 433 l 442 592 q 474 582 457 588 q 505 570 491 577 l 505 547 l 337 380 l 505 213 l 505 190 q 474 178 492 184 q 443 169 455 172 l 284 327 l 126 169 q 94 178 113 172 q 63 190 76 184 l 63 213 "},"ḍ":{"x_min":54,"x_max":712.796875,"ha":722,"o":"m 712 57 q 657 21 681 36 q 615 -2 633 7 q 584 -15 597 -11 q 561 -20 571 -20 q 525 10 539 -20 q 506 114 510 41 q 454 58 480 83 q 402 16 429 33 q 346 -10 375 -1 q 281 -20 316 -20 q 203 2 243 -20 q 130 65 163 24 q 75 166 96 106 q 54 301 54 226 q 64 381 54 339 q 94 461 75 422 q 142 534 114 499 q 206 595 171 568 q 283 636 241 621 q 373 651 325 651 q 436 643 405 651 q 505 608 468 635 l 505 863 q 502 923 505 901 q 491 957 500 945 q 462 973 481 968 q 406 980 442 977 l 406 1006 q 506 1026 462 1014 q 585 1051 550 1039 l 607 1030 l 607 172 q 608 131 607 148 q 611 103 609 114 q 615 84 613 91 q 622 72 618 76 q 645 67 628 64 q 703 86 663 70 l 712 57 m 505 177 l 505 494 q 441 554 482 533 q 352 576 401 576 q 273 560 309 576 q 211 512 237 544 q 170 433 185 480 q 156 322 156 385 q 172 217 156 264 q 214 137 189 170 q 271 85 240 103 q 330 68 302 68 q 375 77 353 68 q 419 102 397 86 q 462 137 441 117 q 505 177 484 156 m 424 -189 q 418 -225 424 -208 q 401 -254 412 -242 q 376 -274 391 -267 q 345 -282 362 -282 q 301 -265 314 -282 q 288 -217 288 -248 q 294 -181 288 -198 q 311 -151 300 -164 q 336 -132 322 -139 q 366 -125 350 -125 q 424 -189 424 -125 "},"Ǻ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 471 1060 q 467 1091 471 1076 q 455 1117 463 1106 q 437 1135 448 1128 q 413 1142 426 1142 q 386 1136 399 1142 q 363 1120 373 1130 q 347 1094 353 1109 q 341 1061 341 1079 q 345 1031 341 1045 q 357 1005 349 1016 q 375 987 364 994 q 399 981 386 981 q 426 986 413 981 q 449 1001 439 991 q 465 1026 459 1011 q 471 1060 471 1040 m 532 1088 q 519 1024 532 1053 q 484 974 506 995 q 437 940 463 952 q 385 929 411 929 q 343 937 362 929 q 310 959 323 945 q 288 992 296 973 q 280 1033 280 1011 q 293 1097 280 1068 q 327 1148 306 1127 q 375 1182 348 1170 q 427 1194 401 1194 q 468 1185 449 1194 q 502 1162 487 1177 q 524 1128 516 1147 q 532 1088 532 1109 m 316 1225 q 300 1236 305 1230 q 286 1256 295 1243 l 548 1471 q 567 1460 555 1467 q 590 1447 578 1454 q 613 1433 602 1440 q 628 1421 623 1426 l 634 1390 l 316 1225 "},"K":{"x_min":33.65625,"x_max":796.46875,"ha":803,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 438 l 518 765 q 538 794 534 783 q 535 811 542 805 q 511 820 528 817 q 468 825 494 823 l 468 855 l 753 855 l 753 825 q 714 820 731 823 q 683 813 697 817 q 659 802 670 808 q 637 783 647 795 l 340 455 l 668 85 q 694 64 680 72 q 724 54 708 57 q 757 51 740 51 q 791 53 774 51 l 796 24 q 716 0 756 11 q 643 -10 675 -10 q 608 -3 623 -10 q 579 19 593 2 l 241 433 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 "},"7":{"x_min":70.53125,"x_max":600.234375,"ha":652,"o":"m 600 791 q 537 643 569 718 q 475 496 505 568 q 417 355 444 423 q 365 226 389 287 q 323 116 342 166 q 293 30 304 66 q 243 1 269 13 q 183 -20 217 -11 l 155 2 q 261 200 214 106 q 347 382 307 294 q 423 556 387 471 q 497 729 459 642 l 189 729 q 169 728 179 729 q 149 719 160 727 q 127 690 139 710 q 101 630 115 669 l 70 642 q 75 682 72 658 q 83 730 79 705 q 91 778 87 755 q 99 817 95 802 l 577 817 l 600 791 "},"̈":{"x_min":-553,"x_max":-146,"ha":0,"o":"m -146 854 q -152 818 -146 835 q -168 789 -158 801 q -193 769 -179 776 q -224 762 -207 762 q -268 778 -255 762 q -282 826 -282 795 q -275 862 -282 845 q -258 892 -269 879 q -234 911 -248 904 q -203 919 -220 919 q -146 854 -146 919 m -417 854 q -423 818 -417 835 q -439 789 -429 801 q -464 769 -450 776 q -495 762 -478 762 q -539 778 -526 762 q -553 826 -553 795 q -546 862 -553 845 q -529 892 -540 879 q -505 911 -519 904 q -474 919 -491 919 q -417 854 -417 919 "},"¨":{"x_min":68,"x_max":474,"ha":543,"o":"m 474 854 q 467 818 474 835 q 451 789 461 801 q 426 769 440 776 q 395 762 412 762 q 351 778 364 762 q 338 826 338 795 q 344 862 338 845 q 361 892 350 879 q 385 911 372 904 q 416 919 399 919 q 474 854 474 919 m 204 854 q 197 818 204 835 q 181 789 191 801 q 156 769 170 776 q 125 762 142 762 q 81 778 94 762 q 68 826 68 795 q 74 862 68 845 q 91 892 80 879 q 115 911 102 904 q 146 919 129 919 q 204 854 204 919 "},"Y":{"x_min":-0.390625,"x_max":797.6875,"ha":825,"o":"m 243 0 l 243 29 q 330 55 305 42 q 355 78 355 68 l 355 364 q 298 478 329 419 q 232 594 266 538 q 168 699 199 651 q 113 780 137 748 q 99 794 107 788 q 79 806 91 801 q 49 814 67 811 q 2 818 30 818 l 0 847 q 79 856 39 852 q 148 861 119 861 q 201 834 179 861 q 255 757 226 802 q 313 663 284 713 q 370 562 342 614 q 422 461 398 509 l 604 780 q 597 808 614 797 q 529 825 581 818 l 529 855 l 797 855 l 797 825 q 726 807 750 816 q 691 780 701 797 l 464 366 l 464 77 q 469 68 464 73 q 488 55 475 62 q 523 42 501 48 q 576 29 544 35 l 576 0 l 243 0 "},"E":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 "},"Ô":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 631 957 q 618 938 623 944 q 602 927 613 932 l 416 1068 l 232 927 q 223 932 227 929 q 216 938 219 935 q 210 946 213 941 q 202 957 206 951 l 381 1167 l 453 1167 l 631 957 "},"ổ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 577 740 q 564 721 569 727 q 548 710 559 715 l 362 891 l 178 710 q 169 715 172 712 q 162 721 165 718 q 155 729 159 724 q 147 740 152 734 l 326 998 l 399 998 l 577 740 m 477 1209 q 464 1176 477 1191 q 435 1148 452 1161 q 402 1123 418 1134 q 378 1098 386 1111 q 377 1072 371 1086 q 412 1042 384 1059 q 392 1033 403 1035 q 371 1031 381 1032 q 326 1058 340 1046 q 308 1081 311 1071 q 311 1102 305 1092 q 329 1120 318 1111 q 355 1138 341 1130 q 382 1157 369 1147 q 402 1177 394 1166 q 411 1199 411 1187 q 398 1238 411 1225 q 365 1251 385 1251 q 347 1247 355 1251 q 332 1237 338 1243 q 323 1224 326 1231 q 319 1209 319 1216 q 321 1202 319 1205 q 325 1194 323 1198 q 311 1190 319 1192 q 293 1186 302 1188 q 273 1182 283 1184 q 257 1179 264 1180 l 250 1187 l 250 1196 q 263 1228 250 1212 q 295 1256 275 1243 q 340 1276 315 1268 q 388 1284 364 1284 q 454 1263 431 1284 q 477 1209 477 1243 "},"Ï":{"x_min":-3.640625,"x_max":403.359375,"ha":414,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 m 403 1045 q 397 1009 403 1026 q 380 980 391 992 q 355 960 370 967 q 324 953 341 953 q 280 969 293 953 q 267 1018 267 986 q 273 1053 267 1036 q 290 1083 279 1070 q 315 1102 301 1095 q 345 1110 329 1110 q 403 1045 403 1110 m 132 1045 q 126 1009 132 1026 q 109 980 120 992 q 84 960 99 967 q 53 953 70 953 q 9 969 22 953 q -3 1018 -3 986 q 2 1053 -3 1036 q 19 1083 8 1070 q 44 1102 30 1095 q 74 1110 58 1110 q 132 1045 132 1110 "},"ġ":{"x_min":20,"x_max":670.8125,"ha":678,"o":"m 468 406 q 456 474 468 442 q 420 531 444 507 q 362 569 397 555 q 282 583 327 583 q 244 574 265 583 q 205 548 224 565 q 175 505 187 531 q 163 446 163 479 q 174 378 163 410 q 208 322 185 346 q 265 284 230 298 q 348 271 300 271 q 389 279 368 271 q 428 305 411 287 q 456 347 445 322 q 468 406 468 372 m 351 -2 q 303 3 325 0 q 263 10 282 6 q 186 -36 214 -15 q 143 -74 157 -57 q 125 -104 129 -90 q 122 -128 122 -118 q 140 -182 122 -157 q 191 -226 159 -208 q 265 -256 223 -245 q 353 -268 307 -268 q 436 -255 399 -268 q 500 -222 473 -243 q 541 -171 526 -200 q 556 -106 556 -141 q 547 -71 556 -87 q 515 -42 538 -55 q 452 -19 492 -29 q 351 -2 412 -9 m 563 434 q 539 339 563 382 q 478 265 516 296 q 392 217 440 234 q 294 200 343 200 l 291 200 q 246 154 259 172 q 234 132 234 136 q 241 116 234 124 q 268 102 248 109 q 321 87 287 94 q 408 74 355 80 q 530 50 482 66 q 607 12 578 33 q 646 -33 635 -8 q 658 -81 658 -57 q 643 -152 658 -118 q 605 -214 629 -185 q 547 -265 580 -242 q 476 -305 514 -288 q 397 -330 438 -321 q 316 -339 356 -339 q 250 -334 284 -339 q 183 -320 216 -330 q 120 -296 150 -311 q 68 -261 91 -282 q 33 -214 46 -240 q 20 -155 20 -188 q 26 -118 20 -137 q 52 -76 32 -98 q 107 -28 72 -54 q 201 28 142 -2 q 140 63 157 44 q 123 103 123 83 q 126 118 123 109 q 140 140 129 127 q 170 170 150 153 q 220 209 189 187 q 158 236 186 218 q 110 280 130 254 q 79 337 90 305 q 68 408 68 370 q 90 502 68 457 q 149 579 112 546 q 232 631 185 612 q 329 651 279 651 q 405 639 369 651 q 470 606 440 627 q 533 615 505 610 q 585 627 562 621 q 625 639 607 633 q 657 651 643 645 l 670 630 q 655 595 662 611 q 632 562 647 579 q 581 555 606 558 q 525 551 556 552 q 553 496 543 525 q 563 434 563 467 m 407 854 q 401 818 407 835 q 384 789 395 801 q 359 769 374 776 q 328 762 345 762 q 284 778 297 762 q 271 826 271 795 q 277 862 271 845 q 294 892 283 879 q 319 911 305 904 q 349 919 333 919 q 407 854 407 919 "},"Ẳ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 626 1139 q 580 1046 606 1084 q 527 985 555 1009 q 468 952 499 962 q 407 942 438 942 q 343 952 374 942 q 283 985 311 962 q 230 1046 255 1009 q 185 1139 206 1084 q 202 1158 193 1151 q 221 1170 210 1164 q 260 1104 238 1131 q 307 1062 282 1078 q 357 1039 331 1046 q 404 1032 382 1032 q 454 1039 428 1032 q 505 1062 480 1046 q 552 1104 530 1078 q 590 1170 574 1131 q 610 1158 602 1164 q 626 1139 618 1151 m 520 1338 q 508 1305 520 1320 q 478 1277 495 1290 q 445 1251 461 1263 q 422 1227 429 1240 q 421 1201 414 1215 q 456 1170 427 1187 q 435 1162 446 1164 q 414 1160 424 1161 q 369 1187 384 1174 q 351 1210 354 1200 q 355 1231 348 1221 q 373 1249 361 1240 q 398 1267 384 1258 q 425 1285 413 1276 q 446 1305 437 1295 q 454 1328 454 1316 q 441 1367 454 1354 q 409 1380 428 1380 q 390 1376 399 1380 q 376 1366 382 1372 q 366 1352 370 1360 q 363 1338 363 1345 q 364 1330 363 1334 q 368 1323 366 1327 q 354 1319 363 1321 q 336 1314 346 1316 q 317 1311 326 1312 q 301 1308 307 1309 l 293 1316 l 293 1325 q 306 1357 293 1341 q 339 1384 319 1372 q 383 1405 359 1397 q 431 1413 408 1413 q 497 1392 474 1413 q 520 1338 520 1372 "},"ứ":{"x_min":27.515625,"x_max":851,"ha":851,"o":"m 851 707 q 840 662 851 688 q 803 608 830 637 q 733 549 777 579 q 621 491 688 519 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 683 71 l 725 55 q 676 25 699 39 q 634 1 653 11 q 599 -14 614 -8 q 576 -20 584 -20 q 537 11 552 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 20 186 -2 q 128 84 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 609 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 531 519 513 q 502 559 512 549 q 473 574 492 570 q 424 579 455 578 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 625 l 620 538 q 672 568 650 553 q 707 599 693 584 q 727 627 721 614 q 734 652 734 641 q 723 689 734 671 q 694 722 713 707 l 815 777 q 841 744 831 762 q 851 707 851 726 m 340 710 q 318 717 328 712 q 301 729 309 722 l 460 1010 q 481 1007 468 1009 q 509 1003 495 1005 q 537 999 524 1001 q 558 994 551 996 l 574 967 l 340 710 "},"ẑ":{"x_min":51.546875,"x_max":562.25,"ha":614,"o":"m 562 168 q 561 122 562 146 q 559 74 560 97 q 557 31 558 51 q 554 0 556 12 l 69 0 l 51 30 l 427 570 l 193 570 q 171 565 182 570 q 149 550 160 561 q 129 519 139 539 q 113 468 120 499 l 80 476 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 545 631 l 560 601 l 183 61 l 469 61 q 500 87 486 61 q 530 174 514 113 l 562 168 m 539 740 q 526 721 531 727 q 510 710 522 715 l 324 891 l 141 710 q 131 715 135 712 q 125 721 128 718 q 118 729 122 724 q 110 740 115 734 l 289 998 l 362 998 l 539 740 "},"Ɖ":{"x_min":18.0625,"x_max":761,"ha":823,"o":"m 761 458 q 743 306 761 373 q 697 188 726 240 q 629 102 668 137 q 548 43 591 66 q 462 10 506 21 q 378 0 418 0 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 417 l 32 417 l 18 433 q 25 455 21 444 q 32 478 28 467 l 132 478 l 132 805 q 80 798 104 802 q 33 792 56 795 l 27 834 q 96 849 57 842 q 178 863 135 857 q 266 871 222 868 q 350 875 310 875 q 521 846 445 875 q 650 765 596 818 q 732 634 703 711 q 761 458 761 556 m 307 818 q 241 816 273 818 l 241 478 l 416 478 l 433 462 l 416 417 l 241 417 l 241 104 q 248 80 241 89 q 284 62 257 68 q 364 57 311 57 q 460 79 411 57 q 551 148 510 102 q 619 265 593 195 q 646 432 646 336 q 623 593 646 522 q 558 715 601 665 q 451 791 515 765 q 307 818 388 818 "},"Ấ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 620 957 q 607 938 612 944 q 591 927 602 932 l 405 1068 l 221 927 q 212 932 216 929 q 205 938 208 935 q 199 946 202 941 q 191 957 196 951 l 370 1167 l 442 1167 l 620 957 m 316 1198 q 300 1209 305 1203 q 286 1228 295 1216 l 548 1444 q 567 1433 555 1440 q 590 1420 578 1427 q 613 1406 602 1413 q 628 1394 623 1399 l 634 1363 l 316 1198 "},"ể":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 560 740 q 547 721 552 727 q 531 710 542 715 l 345 891 l 161 710 q 152 715 155 712 q 145 721 148 718 q 139 729 142 724 q 130 740 135 734 l 309 998 l 382 998 l 560 740 m 460 1209 q 447 1176 460 1191 q 418 1148 435 1161 q 385 1123 401 1134 q 361 1098 369 1111 q 360 1072 354 1086 q 395 1042 367 1059 q 375 1033 386 1035 q 354 1031 364 1032 q 309 1058 323 1046 q 291 1081 294 1071 q 294 1102 288 1092 q 312 1120 301 1111 q 338 1138 324 1130 q 365 1157 352 1147 q 385 1177 377 1166 q 394 1199 394 1187 q 381 1238 394 1225 q 348 1251 368 1251 q 330 1247 338 1251 q 315 1237 321 1243 q 306 1224 309 1231 q 302 1209 302 1216 q 304 1202 302 1205 q 308 1194 306 1198 q 294 1190 302 1192 q 276 1186 285 1188 q 256 1182 266 1184 q 240 1179 247 1180 l 233 1187 l 233 1196 q 246 1228 233 1212 q 278 1256 258 1243 q 323 1276 298 1268 q 371 1284 347 1284 q 437 1263 414 1284 q 460 1209 460 1243 "},"Ḕ":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 576 1058 q 571 1041 575 1051 q 564 1021 568 1031 q 556 1002 560 1012 q 550 987 552 993 l 132 987 l 118 1003 q 122 1020 119 1011 q 130 1040 126 1030 q 138 1059 134 1049 q 145 1075 142 1068 l 561 1075 l 576 1058 m 460 1174 q 445 1155 451 1161 q 430 1144 440 1148 l 111 1309 l 117 1339 q 132 1352 122 1345 q 155 1365 143 1358 q 179 1379 167 1373 q 198 1390 190 1385 l 460 1174 "},"b":{"x_min":6.828125,"x_max":644,"ha":705,"o":"m 644 333 q 633 253 644 294 q 604 172 623 211 q 555 97 584 133 q 491 36 527 62 q 411 -4 454 10 q 317 -20 368 -20 q 282 -14 305 -20 q 230 2 259 -8 q 166 29 200 13 q 95 65 131 45 l 95 878 q 91 926 95 910 q 78 952 88 943 q 51 963 69 960 q 6 969 34 966 l 6 996 q 92 1018 51 1007 q 171 1051 133 1029 l 178 1044 q 186 1036 182 1040 q 197 1027 191 1032 l 196 493 q 264 563 230 533 q 328 612 297 593 q 385 641 359 632 q 431 651 412 651 q 516 629 477 651 q 584 566 555 607 q 628 466 612 525 q 644 333 644 407 m 552 276 q 538 396 552 344 q 500 485 524 449 q 447 540 477 521 q 384 559 416 559 q 352 551 372 559 q 307 528 332 544 q 253 483 282 511 q 197 413 225 455 l 197 137 q 252 103 224 117 q 305 82 280 90 q 351 71 330 74 q 384 68 372 68 q 456 85 425 68 q 509 133 487 103 q 541 200 530 162 q 552 276 552 237 "},"̃":{"x_min":-580.5625,"x_max":-118.015625,"ha":0,"o":"m -118 912 q -147 857 -130 884 q -184 808 -164 830 q -229 773 -205 787 q -280 760 -254 760 q -325 771 -304 760 q -367 798 -347 783 q -407 825 -387 813 q -447 837 -427 837 q -497 814 -474 837 q -544 755 -519 792 l -580 768 q -551 823 -568 796 q -514 873 -535 851 q -468 908 -493 894 q -418 922 -444 922 q -369 910 -392 922 q -326 883 -346 898 q -287 856 -305 868 q -252 845 -269 845 q -202 866 -227 845 q -154 928 -177 888 l -118 912 "},"fl":{"x_min":30.875,"x_max":777.734375,"ha":808,"o":"m 472 0 l 472 29 q 521 38 501 33 q 552 49 540 44 q 568 59 563 54 q 574 70 574 65 l 574 878 q 569 926 574 909 q 555 951 565 942 q 535 960 546 957 q 520 947 528 953 q 492 925 507 935 q 467 910 478 915 q 435 935 451 924 q 403 952 418 945 q 374 962 388 959 q 352 966 361 966 q 315 954 335 966 q 278 911 295 942 q 249 826 260 880 q 238 689 238 773 l 238 631 l 412 631 l 432 611 q 417 591 426 602 q 399 571 408 580 q 381 553 389 561 q 366 543 372 545 q 321 559 350 551 q 238 567 292 567 l 238 69 q 245 61 238 65 q 269 52 252 57 q 312 42 286 48 q 379 29 339 36 l 379 0 l 41 0 l 41 29 q 111 49 87 37 q 136 69 136 61 l 136 567 l 45 567 l 30 585 l 83 631 l 136 631 l 136 652 q 146 786 136 731 q 176 878 157 841 q 219 941 194 916 q 270 988 243 967 q 310 1015 289 1003 q 353 1034 332 1026 q 394 1046 375 1042 q 426 1051 413 1051 q 470 1042 447 1051 q 510 1023 492 1034 q 535 1008 524 1016 q 569 1017 552 1013 q 651 1051 609 1029 l 676 1027 l 676 70 q 699 49 676 60 q 777 29 722 38 l 777 0 l 472 0 "},"Ḡ":{"x_min":47,"x_max":777.203125,"ha":810,"o":"m 707 805 q 705 792 711 802 q 688 770 699 782 q 663 746 677 757 q 641 726 650 734 l 619 730 q 573 765 596 751 q 523 786 549 778 q 467 796 497 793 q 405 800 438 800 q 362 792 388 800 q 309 767 337 784 q 253 721 281 749 q 202 652 225 693 q 165 556 179 611 q 152 431 152 502 q 177 267 152 337 q 243 152 202 197 q 334 83 283 106 q 437 61 385 61 q 528 70 487 61 q 604 98 570 80 l 604 328 q 597 343 604 336 q 575 357 591 350 q 532 370 559 364 q 464 384 505 377 l 464 413 l 777 413 l 777 384 q 722 359 738 375 q 706 328 706 344 l 706 104 q 615 38 655 63 q 542 1 576 14 q 479 -15 509 -11 q 419 -20 449 -20 q 284 5 350 -20 q 164 82 217 30 q 79 212 112 134 q 47 394 47 289 q 82 596 47 507 q 180 747 118 685 q 324 842 241 809 q 499 875 406 875 q 549 870 522 875 q 603 856 575 865 q 658 834 631 847 q 707 805 685 821 m 670 1058 q 665 1041 668 1051 q 657 1021 661 1031 q 650 1002 653 1012 q 643 987 646 993 l 226 987 l 211 1003 q 216 1020 212 1011 q 223 1040 219 1030 q 231 1059 227 1049 q 239 1075 236 1068 l 655 1075 l 670 1058 "},"ȭ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 594 912 q 564 857 581 884 q 527 808 548 830 q 482 773 506 787 q 431 760 457 760 q 386 771 407 760 q 344 798 364 783 q 304 825 324 813 q 264 837 284 837 q 215 814 237 837 q 167 755 192 792 l 131 768 q 160 823 143 796 q 198 873 177 851 q 243 908 219 894 q 293 922 267 922 q 342 910 319 922 q 385 883 365 898 q 424 856 406 868 q 459 845 442 845 q 509 866 484 845 q 557 928 534 888 l 594 912 m 598 1112 q 594 1095 597 1105 q 586 1076 590 1085 q 578 1056 582 1066 q 572 1041 575 1047 l 155 1041 l 140 1058 q 145 1075 141 1065 q 152 1094 148 1084 q 160 1113 156 1104 q 168 1129 164 1122 l 583 1129 l 598 1112 "},"Ŋ":{"x_min":32.984375,"x_max":763,"ha":838,"o":"m 763 187 q 748 58 763 117 q 709 -47 733 0 q 653 -132 684 -95 q 586 -195 621 -169 q 544 -221 568 -209 q 494 -241 521 -232 q 442 -253 468 -249 q 391 -258 415 -258 q 331 -250 361 -258 q 277 -231 302 -243 q 238 -207 253 -220 q 223 -184 223 -195 q 234 -167 223 -178 q 259 -145 245 -156 q 290 -123 274 -133 q 316 -109 306 -113 q 355 -140 334 -127 q 397 -162 376 -153 q 439 -174 418 -170 q 476 -179 459 -179 q 540 -158 508 -179 q 597 -97 572 -138 q 638 5 622 -56 q 654 151 654 67 l 654 591 q 645 683 654 647 q 622 741 637 719 q 586 771 607 762 q 540 780 565 780 q 482 768 513 780 q 415 726 451 756 q 336 642 379 695 q 241 507 293 590 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 32 0 l 32 29 q 105 49 79 38 q 132 70 132 61 l 132 698 q 129 741 132 725 q 118 768 127 758 q 90 783 109 778 q 37 791 71 788 l 37 820 q 131 842 83 829 q 217 875 180 856 l 241 851 l 240 629 q 339 748 292 701 q 429 823 386 795 q 510 863 471 851 q 585 875 549 875 q 646 866 615 875 q 703 833 677 857 q 746 769 729 810 q 763 665 763 729 l 763 187 "},"Ǔ":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 495 943 l 423 943 l 244 1151 q 252 1162 248 1157 q 258 1170 255 1167 q 265 1176 261 1174 q 274 1183 269 1179 l 461 1039 l 644 1183 q 660 1170 655 1176 q 673 1151 665 1164 l 495 943 "},"Ũ":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 690 1103 q 661 1047 678 1075 q 623 998 644 1020 q 578 963 602 977 q 527 950 554 950 q 482 961 503 950 q 440 988 461 973 q 400 1015 420 1003 q 360 1027 380 1027 q 311 1005 333 1027 q 263 945 288 982 l 227 958 q 256 1013 240 986 q 294 1063 273 1041 q 339 1098 315 1084 q 389 1112 363 1112 q 438 1100 415 1112 q 482 1073 461 1088 q 520 1046 502 1058 q 555 1035 539 1035 q 605 1056 581 1035 q 653 1118 630 1078 l 690 1103 "},"L":{"x_min":33.65625,"x_max":640.484375,"ha":661,"o":"m 640 165 q 626 63 635 106 q 612 0 618 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 111 q 246 89 241 99 q 266 74 252 80 q 305 64 281 67 q 367 61 329 61 l 464 61 q 516 64 495 61 q 554 79 538 67 q 583 114 570 91 q 611 177 597 137 l 640 165 "},"Ẋ":{"x_min":21.03125,"x_max":833.53125,"ha":855,"o":"m 527 0 l 527 29 q 575 36 557 31 q 602 46 594 40 q 609 62 610 53 q 598 86 608 72 l 409 363 l 238 86 q 241 44 219 56 q 326 29 263 33 l 326 0 l 21 0 l 21 29 q 96 44 65 32 q 144 86 127 57 l 359 437 l 133 768 q 113 793 123 783 q 92 809 104 802 q 65 818 80 815 q 27 826 50 822 l 27 855 l 333 855 l 333 826 q 258 809 276 820 q 261 768 240 798 l 428 522 l 581 768 q 590 794 591 784 q 577 810 588 804 q 544 820 565 817 q 493 826 523 823 l 493 855 l 800 855 l 800 826 q 756 819 775 823 q 722 809 737 815 q 696 793 707 802 q 676 768 685 783 l 478 449 l 726 86 q 747 61 736 71 q 770 45 757 52 q 798 35 782 39 q 833 29 813 31 l 833 0 l 527 0 m 495 1045 q 489 1009 495 1026 q 472 980 483 992 q 447 960 462 967 q 416 953 433 953 q 372 969 386 953 q 359 1018 359 986 q 365 1053 359 1036 q 382 1083 371 1070 q 407 1102 393 1095 q 437 1110 421 1110 q 495 1045 495 1110 "},"Ɫ":{"x_min":-40.9375,"x_max":640.484375,"ha":661,"o":"m 640 165 q 626 63 635 106 q 612 0 618 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 400 q 111 409 121 406 q 91 413 101 413 q 42 390 64 413 q -5 330 20 368 l -40 344 q -12 399 -28 372 q 25 449 4 427 q 70 484 46 470 q 121 498 94 498 q 126 497 123 498 q 132 497 128 497 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 440 q 264 426 253 431 q 287 421 276 421 q 337 442 312 421 q 385 504 362 464 l 422 488 q 392 433 409 461 q 355 384 375 406 q 310 349 334 363 q 259 336 285 336 q 241 338 249 336 l 241 111 q 246 89 241 98 q 266 74 252 80 q 305 64 281 67 q 367 61 329 61 l 464 61 q 516 64 495 61 q 554 79 538 67 q 583 114 570 91 q 611 177 597 137 l 640 165 "},"ṯ":{"x_min":6.78125,"x_max":465.265625,"ha":478,"o":"m 458 79 q 392 36 425 55 q 330 5 360 17 q 276 -13 301 -7 q 233 -20 250 -20 q 188 -11 209 -20 q 150 17 166 -2 q 124 70 134 37 q 115 150 115 102 l 115 567 l 27 567 l 13 585 l 66 631 l 115 631 l 115 797 l 195 868 l 217 851 l 217 631 l 438 631 l 458 611 q 443 591 452 602 q 424 571 434 580 q 405 553 415 561 q 389 543 396 545 q 340 559 373 551 q 252 567 307 567 l 217 567 l 217 208 q 220 140 217 167 q 233 97 224 113 q 256 74 242 81 q 290 68 269 68 q 349 77 313 68 q 438 114 385 86 l 458 79 m 465 -155 q 460 -172 463 -162 q 453 -192 457 -182 q 445 -211 448 -201 q 438 -227 441 -220 l 21 -227 l 6 -210 q 11 -193 8 -202 q 18 -173 14 -183 q 27 -154 23 -164 q 34 -139 31 -145 l 450 -139 l 465 -155 "},"Ĭ":{"x_min":-20.34375,"x_max":420.5,"ha":414,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 m 420 1139 q 374 1046 400 1084 q 321 985 349 1009 q 262 952 292 962 q 201 942 231 942 q 137 952 168 942 q 77 985 105 962 q 24 1046 49 1009 q -20 1139 0 1084 q -4 1158 -12 1151 q 15 1170 4 1164 q 54 1104 32 1131 q 101 1062 76 1078 q 150 1039 125 1046 q 198 1032 176 1032 q 248 1039 222 1032 q 299 1062 274 1046 q 346 1104 324 1078 q 384 1170 368 1131 q 404 1158 396 1164 q 420 1139 412 1151 "},"À":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 526 957 q 511 938 516 944 q 495 927 506 931 l 177 1092 l 183 1122 q 198 1134 187 1128 q 221 1148 208 1141 q 244 1162 233 1156 q 263 1173 256 1168 l 526 957 "},"̊":{"x_min":-475,"x_max":-223,"ha":0,"o":"m -284 843 q -288 874 -284 859 q -299 900 -292 889 q -317 918 -307 911 q -342 925 -328 925 q -369 919 -356 925 q -391 903 -382 913 q -407 877 -401 892 q -414 844 -414 862 q -409 814 -414 828 q -398 788 -405 799 q -380 770 -390 777 q -355 764 -369 764 q -329 769 -342 764 q -306 784 -316 774 q -290 808 -296 794 q -284 843 -284 823 m -223 871 q -236 807 -223 836 q -270 757 -249 778 q -318 723 -292 735 q -370 712 -344 712 q -412 720 -393 712 q -445 742 -431 728 q -467 775 -459 756 q -475 816 -475 794 q -461 880 -475 851 q -427 931 -448 910 q -380 965 -406 953 q -328 977 -354 977 q -287 968 -306 977 q -253 945 -267 960 q -231 911 -239 930 q -223 871 -223 892 "},"‑":{"x_min":41.375,"x_max":426.609375,"ha":468,"o":"m 426 370 q 416 338 422 355 q 405 309 411 320 l 58 309 l 41 325 q 50 356 44 340 q 62 387 56 373 l 409 387 l 426 370 "},"½":{"x_min":54.484375,"x_max":759.421875,"ha":814,"o":"m 66 432 l 66 455 q 114 461 95 458 q 144 469 133 465 q 158 477 154 473 q 163 484 163 481 l 163 732 q 162 753 163 746 q 156 764 161 760 q 148 768 154 766 q 132 769 142 769 q 104 766 121 768 q 62 760 87 764 l 54 782 q 92 793 70 786 q 138 807 115 800 q 183 823 162 815 q 217 838 205 831 l 231 826 l 231 484 q 234 477 231 481 q 247 469 237 473 q 274 461 256 465 q 320 455 292 458 l 320 432 l 66 432 m 214 2 q 184 -10 198 -5 q 151 -20 169 -15 l 134 0 l 651 816 q 680 828 664 821 q 711 838 696 834 l 728 819 l 214 2 m 754 0 l 479 0 l 468 23 q 578 135 536 90 q 644 210 620 180 q 676 261 668 241 q 685 300 685 281 q 669 348 685 330 q 614 366 653 366 q 588 360 600 366 q 567 346 575 355 q 554 326 558 337 q 549 303 549 315 q 521 293 535 297 q 489 288 506 289 l 479 297 q 492 333 479 314 q 528 367 506 351 q 579 392 550 382 q 640 402 609 402 q 685 396 665 402 q 721 379 706 391 q 745 350 737 368 q 754 309 754 333 q 743 265 754 288 q 709 214 733 243 q 646 144 685 184 q 548 45 607 103 l 696 45 q 717 53 709 45 q 728 70 724 61 q 735 97 733 82 l 759 93 l 754 0 "},"ḟ":{"x_min":30.875,"x_max":554.734375,"ha":432,"o":"m 554 985 q 544 969 554 980 q 521 947 535 958 q 493 925 507 935 q 468 910 478 915 q 435 935 452 924 q 403 952 419 945 q 375 962 388 959 q 353 966 362 966 q 315 954 335 966 q 278 911 295 942 q 249 826 261 880 q 238 689 238 773 l 238 631 l 412 631 l 432 611 q 417 591 426 602 q 399 571 408 580 q 381 553 389 561 q 366 543 372 545 q 321 559 350 551 q 238 567 292 567 l 238 69 q 245 61 238 65 q 269 52 252 57 q 312 42 286 48 q 379 29 339 36 l 379 0 l 41 0 l 41 29 q 111 49 87 37 q 136 69 136 61 l 136 567 l 45 567 l 30 585 l 83 631 l 136 631 l 136 652 q 146 786 136 731 q 176 878 157 841 q 219 941 195 916 q 271 988 244 967 q 311 1015 289 1003 q 354 1034 332 1026 q 395 1046 375 1042 q 427 1051 414 1051 q 470 1042 448 1051 q 511 1024 493 1034 q 542 1002 530 1013 q 554 985 554 991 m 353 1215 q 347 1179 353 1196 q 330 1150 340 1162 q 305 1130 319 1137 q 274 1122 291 1122 q 230 1139 243 1122 q 217 1187 217 1156 q 223 1223 217 1206 q 240 1252 229 1240 q 265 1272 251 1265 q 295 1279 279 1279 q 353 1215 353 1279 "},"'":{"x_min":108.515625,"x_max":238.734375,"ha":347,"o":"m 209 565 q 196 559 204 562 q 179 555 188 557 q 161 552 170 553 q 144 551 152 551 l 108 967 q 130 977 115 971 q 159 988 144 982 q 188 998 174 993 q 209 1004 202 1002 l 238 989 l 209 565 "},"ij":{"x_min":47.046875,"x_max":637.40625,"ha":736,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 m 264 854 q 257 818 264 835 q 241 789 251 801 q 216 769 230 776 q 185 762 202 762 q 141 778 154 762 q 128 826 128 795 q 134 862 128 845 q 151 892 140 879 q 176 911 162 904 q 206 919 190 919 q 264 854 264 919 m 617 67 q 607 -65 617 -10 q 580 -158 597 -119 q 539 -223 563 -196 q 488 -271 515 -249 q 449 -297 469 -285 q 408 -319 429 -310 q 370 -333 388 -328 q 339 -339 352 -339 q 298 -333 318 -339 q 262 -321 278 -328 q 237 -305 246 -313 q 227 -291 227 -297 q 237 -275 227 -285 q 260 -253 246 -264 q 288 -231 273 -241 q 313 -216 303 -221 q 358 -241 335 -235 q 406 -247 381 -247 q 445 -234 426 -247 q 480 -190 465 -221 q 505 -106 496 -159 q 515 29 515 -52 l 515 454 q 513 510 515 489 q 503 542 512 531 q 475 560 494 554 q 420 569 455 565 l 420 596 q 470 607 448 601 q 513 620 493 613 q 551 634 533 626 q 592 651 570 642 l 617 651 l 617 67 m 637 854 q 631 818 637 835 q 614 789 625 801 q 589 769 604 776 q 559 762 575 762 q 515 778 528 762 q 501 826 501 795 q 507 862 501 845 q 524 892 513 879 q 549 911 535 904 q 579 919 563 919 q 637 854 637 919 "},"Ḷ":{"x_min":33.65625,"x_max":640.484375,"ha":661,"o":"m 640 165 q 626 63 635 106 q 612 0 618 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 111 q 246 89 241 99 q 266 74 252 80 q 305 64 281 67 q 367 61 329 61 l 464 61 q 516 64 495 61 q 554 79 538 67 q 583 114 570 91 q 611 177 597 137 l 640 165 m 405 -189 q 399 -225 405 -208 q 382 -254 393 -242 q 357 -274 372 -267 q 326 -282 343 -282 q 282 -265 295 -282 q 269 -217 269 -248 q 275 -181 269 -198 q 292 -151 281 -164 q 317 -132 303 -139 q 347 -125 331 -125 q 405 -189 405 -125 "},"˛":{"x_min":68,"x_max":325.5625,"ha":359,"o":"m 325 -202 q 291 -238 311 -221 q 252 -270 272 -256 q 211 -292 231 -284 q 174 -301 191 -301 q 135 -296 154 -301 q 101 -282 116 -292 q 77 -252 86 -271 q 68 -202 68 -233 q 121 -83 68 -141 q 277 29 174 -25 l 307 16 q 229 -42 259 -13 q 183 -95 199 -70 q 161 -141 166 -120 q 156 -179 156 -162 q 172 -216 156 -204 q 214 -228 188 -228 q 256 -215 231 -228 q 309 -177 280 -203 l 325 -202 "},"ɵ":{"x_min":54,"x_max":645,"ha":699,"o":"m 162 281 q 189 192 168 233 q 237 120 209 151 q 295 72 264 90 q 355 55 327 55 q 434 70 400 55 q 490 116 467 86 q 525 187 512 145 q 540 281 537 229 l 162 281 m 539 342 q 514 432 533 390 q 467 506 494 474 q 408 557 440 538 q 343 576 375 576 q 260 558 294 576 q 203 509 225 540 q 171 434 182 477 q 159 342 161 392 l 539 342 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 "},"ɛ":{"x_min":54,"x_max":561.765625,"ha":593,"o":"m 561 129 q 480 47 517 77 q 410 2 443 18 q 347 -16 377 -12 q 288 -20 317 -20 q 187 -7 231 -20 q 114 28 144 5 q 69 82 84 51 q 54 150 54 113 q 65 205 54 179 q 95 252 77 231 q 136 290 113 274 q 183 316 159 306 q 104 369 132 336 q 77 458 77 402 q 85 500 77 479 q 106 540 93 521 q 139 576 120 559 q 181 606 158 593 q 217 625 197 617 q 260 639 238 634 q 306 647 282 644 q 352 651 329 651 q 400 647 375 651 q 448 636 426 643 q 491 619 471 629 q 524 597 510 609 q 522 574 525 589 q 512 542 518 559 q 499 510 506 526 q 487 486 492 495 l 461 492 q 443 522 455 507 q 410 551 430 538 q 361 574 390 565 q 297 583 333 583 q 245 574 268 583 q 205 551 221 565 q 179 518 188 536 q 171 479 171 499 q 177 438 171 458 q 203 400 183 417 q 261 370 223 383 q 360 354 298 358 l 367 318 q 276 301 314 314 q 212 267 237 287 q 176 225 187 248 q 165 179 164 202 q 176 137 165 157 q 207 100 187 117 q 257 74 228 84 q 323 65 286 65 q 362 67 342 65 q 408 78 383 69 q 464 106 432 87 q 535 157 495 124 l 561 129 "},"ǔ":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 406 726 l 333 726 l 154 968 q 162 979 159 974 q 169 987 166 984 q 175 993 172 991 q 185 1000 179 996 l 371 829 l 554 1000 q 571 987 566 993 q 583 968 575 981 l 406 726 "},"ṏ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 594 912 q 564 857 581 884 q 527 808 548 830 q 482 773 506 787 q 431 760 457 760 q 386 771 407 760 q 344 798 364 783 q 304 825 324 813 q 264 837 284 837 q 215 814 237 837 q 167 755 192 792 l 131 768 q 160 823 143 796 q 198 873 177 851 q 243 908 219 894 q 293 922 267 922 q 342 910 319 922 q 385 883 365 898 q 424 856 406 868 q 459 845 442 845 q 509 866 484 845 q 557 928 534 888 l 594 912 m 566 1098 q 560 1063 566 1079 q 543 1033 553 1046 q 518 1013 532 1021 q 487 1006 504 1006 q 443 1023 456 1006 q 430 1071 430 1040 q 436 1106 430 1090 q 453 1136 442 1123 q 478 1156 464 1148 q 508 1163 492 1163 q 566 1098 566 1163 m 295 1098 q 289 1063 295 1079 q 272 1033 282 1046 q 247 1013 261 1021 q 216 1006 233 1006 q 172 1023 185 1006 q 159 1071 159 1040 q 165 1106 159 1090 q 182 1136 171 1123 q 207 1156 193 1148 q 237 1163 221 1163 q 295 1098 295 1163 "},"Ć":{"x_min":48,"x_max":690.84375,"ha":745,"o":"m 690 143 q 607 65 647 96 q 531 15 568 34 q 458 -11 494 -3 q 387 -20 422 -20 q 263 8 324 -20 q 155 90 203 36 q 77 221 106 144 q 48 397 48 299 q 80 594 48 506 q 169 744 113 682 q 300 841 226 807 q 458 875 375 875 q 587 855 532 875 q 677 806 642 835 q 675 793 682 803 q 659 770 669 783 q 636 744 648 757 q 616 723 625 731 l 593 727 q 511 779 558 759 q 401 800 463 800 q 351 791 378 800 q 296 764 323 783 q 242 716 268 746 q 196 645 216 687 q 164 548 176 603 q 153 422 153 492 q 179 264 153 332 q 246 151 205 196 q 337 83 287 106 q 436 61 388 61 q 532 86 473 61 q 665 173 591 111 q 672 167 669 172 q 679 158 676 163 q 686 149 683 153 q 690 143 688 145 m 326 927 q 310 938 315 931 q 296 957 305 944 l 558 1173 q 577 1162 565 1168 q 600 1148 588 1156 q 623 1134 613 1141 q 638 1122 633 1128 l 644 1092 l 326 927 "},"ẓ":{"x_min":51.546875,"x_max":562.25,"ha":614,"o":"m 562 168 q 561 122 562 146 q 559 74 560 97 q 557 31 558 51 q 554 0 556 12 l 69 0 l 51 30 l 427 570 l 193 570 q 171 565 182 570 q 149 550 160 561 q 129 519 139 539 q 113 468 120 499 l 80 476 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 545 631 l 560 601 l 183 61 l 469 61 q 500 87 486 61 q 530 174 514 113 l 562 168 m 374 -189 q 368 -225 374 -208 q 352 -254 362 -242 q 327 -274 341 -267 q 295 -282 312 -282 q 252 -265 265 -282 q 238 -217 238 -248 q 244 -181 238 -198 q 261 -151 251 -164 q 286 -132 272 -139 q 317 -125 300 -125 q 374 -189 374 -125 "},"£":{"x_min":43.765625,"x_max":609.328125,"ha":652,"o":"m 417 363 l 253 363 q 249 274 255 316 q 233 193 244 231 q 208 124 223 156 q 175 67 192 92 q 229 71 205 70 q 272 71 253 72 q 309 70 292 71 q 344 68 326 70 q 382 67 362 67 q 426 67 401 67 q 480 72 458 68 q 520 86 502 75 q 551 121 537 98 q 580 183 565 143 l 609 171 q 602 115 606 142 q 595 66 599 89 q 587 26 591 43 q 581 0 584 9 q 509 -19 551 -17 q 421 -16 468 -21 q 324 -4 374 -12 q 226 6 274 3 q 135 5 178 10 q 59 -20 92 0 l 43 12 q 81 44 64 29 q 108 76 97 59 q 127 116 120 93 q 138 172 135 139 q 141 252 142 205 q 136 363 140 298 l 58 363 l 43 380 q 50 402 47 390 q 58 425 54 414 l 132 425 q 142 598 127 521 q 192 728 157 674 q 283 809 227 781 q 416 838 339 838 q 450 836 434 838 q 486 830 467 835 q 528 816 505 825 q 584 790 552 806 q 580 747 583 773 q 574 696 577 722 q 566 647 570 670 q 557 610 561 623 l 525 610 q 475 733 516 695 q 366 771 434 771 q 330 767 348 771 q 296 751 312 763 q 267 716 280 739 q 247 655 254 694 q 239 560 240 617 q 247 425 238 503 l 417 425 l 434 409 l 417 363 "},"ẹ":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 407 -189 q 401 -225 407 -208 q 384 -254 395 -242 q 359 -274 374 -267 q 328 -282 345 -282 q 284 -265 297 -282 q 271 -217 271 -248 q 277 -181 271 -198 q 294 -151 283 -164 q 319 -132 305 -139 q 349 -125 333 -125 q 407 -189 407 -125 "},"ů":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 434 843 q 430 874 434 859 q 419 900 426 889 q 401 918 411 911 q 376 925 390 925 q 349 919 362 925 q 326 903 336 913 q 311 877 317 892 q 304 844 304 862 q 308 814 304 828 q 320 788 313 799 q 338 770 327 777 q 363 764 349 764 q 389 769 376 764 q 412 784 402 774 q 428 808 422 794 q 434 843 434 823 m 495 871 q 482 807 495 836 q 448 757 469 778 q 400 723 426 735 q 348 712 374 712 q 306 720 325 712 q 273 742 287 728 q 251 775 259 756 q 243 816 243 794 q 257 880 243 851 q 291 931 270 910 q 338 965 312 953 q 390 977 364 977 q 431 968 412 977 q 465 945 451 960 q 487 911 479 930 q 495 871 495 892 "},"Ō":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 653 1058 q 648 1041 651 1051 q 640 1021 644 1031 q 633 1002 636 1012 q 626 987 629 993 l 209 987 l 194 1003 q 199 1020 196 1011 q 206 1040 202 1030 q 214 1059 210 1049 q 222 1075 219 1068 l 638 1075 l 653 1058 "},"Ṻ":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 695 1058 q 690 1041 693 1051 q 682 1021 687 1031 q 675 1002 678 1012 q 668 987 671 993 l 251 987 l 236 1003 q 241 1020 238 1011 q 248 1040 244 1030 q 257 1059 252 1049 q 264 1075 261 1068 l 680 1075 l 695 1058 m 662 1262 q 656 1226 662 1243 q 639 1197 650 1209 q 614 1177 629 1184 q 583 1170 600 1170 q 539 1186 552 1170 q 526 1235 526 1203 q 532 1270 526 1253 q 549 1300 538 1287 q 574 1319 560 1312 q 604 1327 588 1327 q 662 1262 662 1327 m 391 1262 q 385 1226 391 1243 q 368 1197 379 1209 q 343 1177 358 1184 q 312 1170 329 1170 q 268 1186 281 1170 q 255 1235 255 1203 q 261 1270 255 1253 q 278 1300 267 1287 q 303 1319 289 1312 q 333 1327 317 1327 q 391 1262 391 1327 "},"Ǵ":{"x_min":47,"x_max":777.203125,"ha":810,"o":"m 707 805 q 705 792 711 802 q 688 770 699 782 q 663 746 677 757 q 641 726 650 734 l 619 730 q 573 765 596 751 q 523 786 549 778 q 467 796 497 793 q 405 800 438 800 q 362 792 388 800 q 309 767 337 784 q 253 721 281 749 q 202 652 225 693 q 165 556 179 611 q 152 431 152 502 q 177 267 152 337 q 243 152 202 197 q 334 83 283 106 q 437 61 385 61 q 528 70 487 61 q 604 98 570 80 l 604 328 q 597 343 604 336 q 575 357 591 350 q 532 370 559 364 q 464 384 505 377 l 464 413 l 777 413 l 777 384 q 722 359 738 375 q 706 328 706 344 l 706 104 q 615 38 655 63 q 542 1 576 14 q 479 -15 509 -11 q 419 -20 449 -20 q 284 5 350 -20 q 164 82 217 30 q 79 212 112 134 q 47 394 47 289 q 82 596 47 507 q 180 747 118 685 q 324 842 241 809 q 499 875 406 875 q 549 870 522 875 q 603 856 575 865 q 658 834 631 847 q 707 805 685 821 m 344 927 q 327 938 333 931 q 314 957 322 944 l 576 1173 q 594 1162 583 1168 q 618 1148 606 1156 q 640 1134 630 1141 q 656 1122 651 1128 l 662 1092 l 344 927 "},"Ğ":{"x_min":47,"x_max":777.203125,"ha":810,"o":"m 707 805 q 705 792 711 802 q 688 770 699 782 q 663 746 677 757 q 641 726 650 734 l 619 730 q 573 765 596 751 q 523 786 549 778 q 467 796 497 793 q 405 800 438 800 q 362 792 388 800 q 309 767 337 784 q 253 721 281 749 q 202 652 225 693 q 165 556 179 611 q 152 431 152 502 q 177 267 152 337 q 243 152 202 197 q 334 83 283 106 q 437 61 385 61 q 528 70 487 61 q 604 98 570 80 l 604 328 q 597 343 604 336 q 575 357 591 350 q 532 370 559 364 q 464 384 505 377 l 464 413 l 777 413 l 777 384 q 722 359 738 375 q 706 328 706 344 l 706 104 q 615 38 655 63 q 542 1 576 14 q 479 -15 509 -11 q 419 -20 449 -20 q 284 5 350 -20 q 164 82 217 30 q 79 212 112 134 q 47 394 47 289 q 82 596 47 507 q 180 747 118 685 q 324 842 241 809 q 499 875 406 875 q 549 870 522 875 q 603 856 575 865 q 658 834 631 847 q 707 805 685 821 m 654 1139 q 608 1046 634 1084 q 555 985 583 1009 q 496 952 526 962 q 435 942 465 942 q 370 952 402 942 q 311 985 339 962 q 258 1046 283 1009 q 213 1139 233 1084 q 229 1158 221 1151 q 249 1170 238 1164 q 288 1104 266 1131 q 335 1062 310 1078 q 384 1039 359 1046 q 432 1032 410 1032 q 482 1039 456 1032 q 533 1062 508 1046 q 580 1104 558 1078 q 618 1170 602 1131 q 638 1158 630 1164 q 654 1139 646 1151 "},"v":{"x_min":13.5625,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 404 40 q 386 14 398 25 q 361 -2 375 4 q 334 -13 347 -9 q 312 -20 321 -17 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 121 l 522 555 q 524 573 525 565 q 515 585 523 580 q 492 594 507 590 q 451 601 476 597 l 451 631 l 670 631 l 670 601 "},"û":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 583 740 q 571 721 575 727 q 554 710 566 715 l 368 891 l 185 710 q 175 715 179 712 q 169 721 172 718 q 162 729 166 724 q 154 740 159 734 l 333 998 l 406 998 l 583 740 "},"Ẑ":{"x_min":40.015625,"x_max":672.125,"ha":726,"o":"m 672 198 q 669 150 670 177 q 667 97 668 124 q 665 45 666 70 q 663 0 664 19 l 59 0 l 40 30 l 522 787 l 210 787 q 187 779 200 787 q 162 755 174 772 q 139 714 149 739 q 120 653 128 688 l 82 661 l 101 865 q 135 859 120 861 q 165 855 150 856 q 195 855 179 855 l 648 855 l 665 825 l 187 68 l 541 68 q 567 74 556 68 q 589 96 579 80 q 611 139 600 112 q 634 208 621 166 l 672 198 m 590 957 q 577 938 582 944 q 561 927 573 932 l 375 1068 l 191 927 q 182 932 186 929 q 175 938 179 935 q 169 946 172 941 q 161 957 166 951 l 340 1167 l 413 1167 l 590 957 "},"Ź":{"x_min":40.015625,"x_max":672.125,"ha":726,"o":"m 672 198 q 669 150 670 177 q 667 97 668 124 q 665 45 666 70 q 663 0 664 19 l 59 0 l 40 30 l 522 787 l 210 787 q 187 779 200 787 q 162 755 174 772 q 139 714 149 739 q 120 653 128 688 l 82 661 l 101 865 q 135 859 120 861 q 165 855 150 856 q 195 855 179 855 l 648 855 l 665 825 l 187 68 l 541 68 q 567 74 556 68 q 589 96 579 80 q 611 139 600 112 q 634 208 621 166 l 672 198 m 286 927 q 270 938 275 931 q 256 957 265 944 l 518 1173 q 537 1162 525 1168 q 560 1148 548 1156 q 583 1134 573 1141 q 598 1122 593 1128 l 604 1092 l 286 927 "},"":{"x_min":68,"x_max":229,"ha":290,"o":"m 229 493 q 221 449 229 469 q 202 414 214 429 q 172 391 189 399 q 135 383 155 383 q 83 402 99 383 q 68 458 68 422 q 75 501 68 481 q 95 537 82 521 q 125 561 108 552 q 162 570 143 570 q 212 550 195 570 q 229 493 229 530 m 229 164 q 221 120 229 140 q 202 85 214 100 q 172 62 189 70 q 135 54 155 54 q 83 73 99 54 q 68 129 68 93 q 75 172 68 152 q 95 208 82 192 q 125 232 108 223 q 162 241 143 241 q 212 221 195 241 q 229 164 229 201 "},"Ṁ":{"x_min":40.6875,"x_max":1064.8125,"ha":1120,"o":"m 1051 825 q 1007 819 1031 825 q 959 801 983 812 l 966 70 q 991 50 966 62 q 1064 29 1015 38 l 1064 0 l 756 0 l 756 29 q 831 49 802 38 q 861 70 861 61 l 855 705 l 558 0 l 524 0 l 223 700 l 217 70 q 241 50 217 62 q 315 29 266 38 l 315 0 l 40 0 l 40 29 q 113 49 87 38 q 139 70 139 61 l 145 798 q 93 819 120 813 q 47 825 67 825 l 47 855 l 241 855 q 252 852 248 855 q 262 844 257 850 q 271 827 266 838 q 284 798 276 816 l 554 185 l 813 798 q 828 829 822 818 q 837 846 833 841 q 846 853 842 852 q 857 855 851 855 l 1051 855 l 1051 825 m 621 1045 q 614 1009 621 1026 q 598 980 608 992 q 573 960 587 967 q 542 953 559 953 q 498 969 511 953 q 485 1018 485 986 q 491 1053 485 1036 q 508 1083 497 1070 q 532 1102 519 1095 q 563 1110 546 1110 q 621 1045 621 1110 "},"ˉ":{"x_min":113.265625,"x_max":571.734375,"ha":685,"o":"m 571 868 q 567 851 570 861 q 559 831 563 841 q 551 812 555 822 q 545 797 548 803 l 128 797 l 113 813 q 118 830 114 821 q 125 850 121 840 q 133 869 129 859 q 141 885 137 878 l 556 885 l 571 868 "},"ḻ":{"x_min":-35.953125,"x_max":422.53125,"ha":376,"o":"m 40 0 l 40 29 q 89 38 69 33 q 120 49 108 44 q 136 59 131 54 q 142 70 142 65 l 142 878 q 137 926 142 909 q 123 951 133 943 q 93 963 112 960 q 47 969 75 966 l 47 996 q 136 1017 95 1006 q 219 1051 177 1029 l 244 1027 l 244 70 q 267 49 244 60 q 345 29 290 38 l 345 0 l 40 0 m 422 -155 q 417 -172 421 -162 q 410 -192 414 -182 q 402 -211 406 -201 q 396 -227 398 -220 l -21 -227 l -35 -210 q -31 -193 -34 -202 q -23 -173 -27 -183 q -15 -154 -19 -164 q -8 -139 -11 -145 l 407 -139 l 422 -155 "},"ɔ":{"x_min":45,"x_max":573,"ha":627,"o":"m 573 329 q 549 192 573 256 q 484 81 525 129 q 388 7 444 34 q 270 -20 333 -20 q 181 -5 222 -20 q 109 36 139 9 q 62 100 79 63 q 45 181 45 137 q 51 222 45 203 q 72 257 57 242 q 126 274 97 265 q 181 289 155 283 l 195 257 q 179 240 186 248 q 168 222 172 232 q 162 202 164 213 q 160 177 160 192 q 171 131 160 154 q 202 91 183 108 q 246 62 221 73 q 298 51 271 51 q 368 67 336 51 q 422 116 399 83 q 458 196 445 148 q 471 308 471 244 q 454 412 471 365 q 409 491 437 458 q 343 541 380 523 q 266 559 306 559 q 227 556 246 559 q 186 545 208 553 q 137 522 164 537 q 76 481 111 506 q 60 495 67 485 q 50 510 53 505 q 126 581 91 554 q 192 624 161 609 q 254 645 224 640 q 315 651 284 651 q 411 628 364 651 q 493 565 457 606 q 551 464 529 524 q 573 329 573 404 "},"Ĺ":{"x_min":33.65625,"x_max":640.484375,"ha":661,"o":"m 640 165 q 626 63 635 106 q 612 0 618 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 111 q 246 89 241 99 q 266 74 252 80 q 305 64 281 67 q 367 61 329 61 l 464 61 q 516 64 495 61 q 554 79 538 67 q 583 114 570 91 q 611 177 597 137 l 640 165 m 227 927 q 210 938 215 931 q 196 957 205 944 l 459 1173 q 477 1162 465 1168 q 501 1148 489 1156 q 523 1134 513 1141 q 539 1122 533 1128 l 545 1092 l 227 927 "},"ỵ":{"x_min":-31.875,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 369 -55 q 306 -184 341 -130 q 233 -272 271 -237 q 158 -322 196 -306 q 86 -339 120 -339 q 38 -335 60 -339 q 1 -327 16 -332 q -23 -315 -14 -322 q -31 -303 -31 -309 q -23 -286 -31 -298 q -3 -259 -15 -274 q 22 -231 8 -245 q 47 -211 36 -218 q 112 -231 80 -230 q 169 -223 144 -233 q 198 -204 181 -219 q 230 -168 214 -189 q 263 -118 247 -146 q 291 -62 279 -91 l 311 -15 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 123 l 522 555 q 523 573 525 565 q 511 585 520 580 q 485 594 502 590 q 444 601 469 597 l 444 631 l 670 631 l 670 601 m 590 -189 q 584 -225 590 -208 q 567 -254 578 -242 q 542 -274 557 -267 q 511 -282 528 -282 q 467 -265 481 -282 q 454 -217 454 -248 q 460 -181 454 -198 q 477 -151 466 -164 q 502 -132 488 -139 q 532 -125 516 -125 q 590 -189 590 -125 "},"":{"x_min":98.34375,"x_max":242.125,"ha":340,"o":"m 206 443 q 192 437 200 440 q 176 433 185 435 q 158 430 167 431 q 141 429 149 429 l 98 963 q 121 974 105 968 q 152 987 136 980 q 184 997 169 993 q 206 1004 198 1002 l 242 986 l 206 443 "},"ḇ":{"x_min":6.828125,"x_max":644,"ha":705,"o":"m 644 333 q 633 253 644 294 q 604 172 623 211 q 555 97 584 133 q 491 36 527 62 q 411 -4 454 10 q 317 -20 368 -20 q 282 -14 305 -20 q 230 2 259 -8 q 166 29 200 13 q 95 65 131 45 l 95 878 q 91 926 95 910 q 78 952 88 943 q 51 963 69 960 q 6 969 34 966 l 6 996 q 92 1018 51 1007 q 171 1051 133 1029 l 178 1044 q 186 1036 182 1040 q 197 1027 191 1032 l 196 493 q 264 563 230 533 q 328 612 297 593 q 385 641 359 632 q 431 651 412 651 q 516 629 477 651 q 584 566 555 607 q 628 466 612 525 q 644 333 644 407 m 552 276 q 538 396 552 344 q 500 485 524 449 q 447 540 477 521 q 384 559 416 559 q 352 551 372 559 q 307 528 332 544 q 253 483 282 511 q 197 413 225 455 l 197 137 q 252 103 224 117 q 305 82 280 90 q 351 71 330 74 q 384 68 372 68 q 456 85 425 68 q 509 133 487 103 q 541 200 530 162 q 552 276 552 237 m 554 -155 q 549 -172 552 -162 q 541 -192 545 -182 q 534 -211 537 -201 q 527 -227 530 -220 l 110 -227 l 95 -210 q 100 -193 96 -202 q 107 -173 103 -183 q 115 -154 111 -164 q 123 -139 120 -145 l 539 -139 l 554 -155 "},"Č":{"x_min":48,"x_max":690.84375,"ha":745,"o":"m 690 143 q 607 65 647 96 q 531 15 568 34 q 458 -11 494 -3 q 387 -20 422 -20 q 263 8 324 -20 q 155 90 203 36 q 77 221 106 144 q 48 397 48 299 q 80 594 48 506 q 169 744 113 682 q 300 841 226 807 q 458 875 375 875 q 587 855 532 875 q 677 806 642 835 q 675 793 682 803 q 659 770 669 783 q 636 744 648 757 q 616 723 625 731 l 593 727 q 511 779 558 759 q 401 800 463 800 q 351 791 378 800 q 296 764 323 783 q 242 716 268 746 q 196 645 216 687 q 164 548 176 603 q 153 422 153 492 q 179 264 153 332 q 246 151 205 196 q 337 83 287 106 q 436 61 388 61 q 532 86 473 61 q 665 173 591 111 q 672 167 669 172 q 679 158 676 163 q 686 149 683 153 q 690 143 688 145 m 453 943 l 380 943 l 201 1151 q 209 1162 206 1157 q 216 1170 212 1167 q 222 1176 219 1174 q 231 1183 226 1179 l 418 1039 l 601 1183 q 617 1170 613 1176 q 630 1151 622 1164 l 453 943 "},"x":{"x_min":13.5625,"x_max":689.078125,"ha":699,"o":"m 416 0 l 416 29 q 448 33 433 30 q 471 41 463 35 q 480 59 480 48 q 466 88 480 70 l 332 271 l 204 88 q 193 59 191 70 q 208 41 196 48 q 237 33 219 35 q 270 29 254 30 l 270 0 l 13 0 l 13 29 q 59 39 40 33 q 91 54 78 45 q 114 72 105 62 q 130 92 123 82 l 295 322 l 136 540 q 118 563 127 553 q 97 581 109 574 q 66 594 84 589 q 21 602 48 599 l 21 631 l 305 631 l 305 602 q 269 596 284 599 q 246 586 254 592 q 239 569 238 579 q 252 542 240 558 l 362 391 l 466 542 q 480 569 478 558 q 474 586 481 580 q 452 596 467 593 q 416 602 437 599 l 416 631 l 674 631 l 674 602 q 589 581 619 597 q 541 540 559 566 l 399 340 l 580 92 q 598 72 588 82 q 620 54 607 62 q 649 38 632 45 q 689 29 666 31 l 689 0 l 416 0 "},"è":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 423 731 q 405 718 414 722 q 385 710 396 713 l 146 965 l 161 993 q 181 998 168 995 q 209 1003 194 1000 q 238 1007 223 1005 q 260 1010 252 1009 l 423 731 "},"Ń":{"x_min":33.65625,"x_max":867.34375,"ha":901,"o":"m 33 0 l 33 29 q 107 48 83 35 q 132 70 132 61 l 132 779 q 84 811 109 800 q 33 825 60 821 l 33 855 l 177 855 q 194 853 187 855 q 207 846 200 851 q 221 830 214 840 q 242 802 229 819 l 688 187 l 688 783 q 665 805 688 791 q 589 825 643 818 l 589 855 l 867 855 l 867 825 q 793 806 818 819 q 769 783 769 793 l 769 -20 q 716 -6 735 -15 q 689 14 697 3 l 213 673 l 213 70 q 235 49 213 62 q 311 29 258 36 l 311 0 l 33 0 m 361 927 q 344 938 349 931 q 330 957 339 944 l 593 1173 q 611 1162 600 1168 q 635 1148 623 1156 q 657 1134 647 1141 q 673 1122 668 1128 l 679 1092 l 361 927 "},"ḿ":{"x_min":37.046875,"x_max":1095.640625,"ha":1116,"o":"m 803 0 l 803 29 q 875 51 852 42 q 898 70 898 61 l 898 429 q 893 498 898 470 q 880 541 889 525 q 856 563 870 557 q 821 570 841 570 q 774 557 799 570 q 722 521 749 544 q 669 464 696 498 q 617 388 642 430 l 617 70 q 638 51 617 61 q 712 29 659 42 l 712 0 l 420 0 l 420 29 q 492 51 469 42 q 515 70 515 61 l 515 429 q 510 498 515 470 q 497 541 506 525 q 474 563 488 557 q 438 570 459 570 q 341 522 392 570 q 234 388 291 475 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 59 l 132 482 q 129 525 132 509 q 117 549 127 540 q 88 561 107 557 q 37 570 69 565 l 37 597 q 84 606 62 601 q 125 619 106 612 q 163 634 145 626 q 199 651 181 642 l 223 627 l 231 471 q 292 550 261 516 q 354 606 323 583 q 413 639 385 628 q 466 651 441 651 q 526 643 498 651 q 573 616 553 635 q 605 567 593 598 q 617 491 617 537 l 616 477 q 675 552 645 520 q 736 606 706 584 q 795 639 766 628 q 849 651 824 651 q 909 642 881 651 q 956 615 936 633 q 988 568 976 596 q 1000 502 1000 540 l 1000 70 q 1021 51 1000 61 q 1095 29 1042 42 l 1095 0 l 803 0 m 537 710 q 515 717 524 712 q 498 729 505 722 l 657 1010 q 678 1007 665 1009 q 706 1003 691 1005 q 734 999 720 1001 q 755 994 748 996 l 771 967 l 537 710 "},"Ṇ":{"x_min":33.65625,"x_max":867.34375,"ha":901,"o":"m 33 0 l 33 29 q 107 48 83 35 q 132 70 132 61 l 132 779 q 84 811 109 800 q 33 825 60 821 l 33 855 l 177 855 q 194 853 187 855 q 207 846 200 851 q 221 830 214 840 q 242 802 229 819 l 688 187 l 688 783 q 665 805 688 791 q 589 825 643 818 l 589 855 l 867 855 l 867 825 q 793 806 818 819 q 769 783 769 793 l 769 -20 q 716 -6 735 -15 q 689 14 697 3 l 213 673 l 213 70 q 235 49 213 62 q 311 29 258 36 l 311 0 l 33 0 m 519 -189 q 513 -225 519 -208 q 496 -254 507 -242 q 471 -274 485 -267 q 440 -282 457 -282 q 396 -265 409 -282 q 383 -217 383 -248 q 389 -181 383 -198 q 406 -151 395 -164 q 431 -132 417 -139 q 461 -125 445 -125 q 519 -189 519 -125 "},".":{"x_min":89,"x_max":250,"ha":318,"o":"m 250 83 q 242 39 250 59 q 223 4 235 19 q 193 -18 210 -10 q 156 -27 176 -27 q 104 -7 120 -27 q 89 48 89 12 q 96 91 89 71 q 116 127 103 111 q 146 151 129 142 q 183 160 164 160 q 233 140 216 160 q 250 83 250 120 "},"Ẉ":{"x_min":13.5625,"x_max":1154.328125,"ha":1181,"o":"m 1154 825 q 1104 814 1124 819 q 1073 803 1085 808 q 1057 793 1062 798 q 1051 783 1051 789 l 895 40 q 881 15 892 26 q 855 -2 870 5 q 826 -13 841 -9 q 801 -20 811 -17 l 580 640 l 385 40 q 369 15 381 26 q 343 -1 358 5 q 313 -12 328 -8 q 283 -20 297 -17 l 107 778 q 82 806 103 795 q 13 825 61 817 l 13 855 l 304 855 l 304 825 q 252 817 271 822 q 223 806 233 812 q 212 792 214 800 q 212 778 210 785 l 347 169 l 567 855 l 604 855 l 844 169 l 971 783 q 965 798 972 791 q 943 808 957 804 q 909 817 929 813 q 866 825 889 821 l 866 855 l 1154 855 l 1154 825 m 652 -189 q 646 -225 652 -208 q 629 -254 640 -242 q 604 -274 618 -267 q 573 -282 590 -282 q 529 -265 542 -282 q 516 -217 516 -248 q 522 -181 516 -198 q 539 -151 528 -164 q 564 -132 550 -139 q 594 -125 578 -125 q 652 -189 652 -125 "},"ṣ":{"x_min":64.5,"x_max":474,"ha":536,"o":"m 474 192 q 460 109 474 144 q 425 51 446 75 q 377 13 403 28 q 325 -7 350 0 q 276 -17 299 -15 q 241 -20 254 -20 q 163 -7 208 -20 q 72 29 117 4 q 65 51 67 31 q 64 97 63 71 q 68 150 65 123 q 77 192 72 176 l 106 185 q 120 131 107 156 q 157 88 134 106 q 209 58 179 69 q 275 48 239 48 q 319 55 299 48 q 354 77 340 63 q 377 111 369 91 q 386 154 386 130 q 371 202 386 181 q 333 240 356 223 q 279 273 309 258 q 218 304 249 288 q 163 335 189 319 q 116 371 137 351 q 83 417 96 392 q 71 474 71 442 q 87 549 71 516 q 132 604 104 582 q 196 639 160 627 q 271 651 233 651 q 317 647 292 651 q 367 636 343 643 q 414 620 392 629 q 449 598 435 611 q 450 580 453 594 q 440 549 447 566 q 426 517 434 532 q 415 497 419 502 l 389 502 q 321 570 356 551 q 254 590 287 590 q 214 582 231 590 q 184 563 196 575 q 165 537 171 551 q 159 508 159 522 q 171 469 159 486 q 205 437 184 452 q 253 408 226 421 q 308 379 280 394 q 367 347 337 364 q 420 308 396 330 q 459 258 444 286 q 474 192 474 230 m 337 -189 q 331 -225 337 -208 q 314 -254 325 -242 q 289 -274 304 -267 q 258 -282 275 -282 q 214 -265 228 -282 q 201 -217 201 -248 q 207 -181 201 -198 q 224 -151 213 -164 q 249 -132 235 -139 q 279 -125 263 -125 q 337 -189 337 -125 "},"Ǎ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 442 943 l 370 943 l 191 1151 q 199 1162 196 1157 q 205 1170 202 1167 q 212 1176 208 1174 q 221 1183 216 1179 l 408 1039 l 591 1183 q 607 1170 602 1176 q 620 1151 612 1164 l 442 943 "},"ʊ":{"x_min":40.828125,"x_max":617.3125,"ha":659,"o":"m 617 601 q 543 580 574 590 q 518 570 530 575 q 499 559 507 565 q 489 548 491 554 q 492 538 486 542 q 543 483 522 511 q 575 424 563 454 q 593 361 588 393 q 599 294 599 329 q 590 227 599 262 q 566 156 582 191 q 527 89 550 121 q 471 33 503 57 q 401 -5 440 9 q 315 -20 362 -20 q 195 4 245 -20 q 113 68 145 28 q 66 161 81 108 q 51 270 51 213 q 75 414 51 346 q 163 538 100 481 q 167 548 169 543 q 157 560 165 554 q 138 570 150 565 q 114 580 127 576 q 40 601 83 591 l 40 631 l 275 631 l 287 568 q 230 516 255 544 q 187 455 205 488 q 161 381 170 422 q 153 290 153 341 q 168 203 153 245 q 211 127 184 160 q 273 74 238 94 q 348 55 309 55 q 417 74 387 55 q 467 123 447 93 q 497 189 487 153 q 507 260 507 225 q 497 358 507 311 q 470 446 488 406 q 427 517 452 486 q 369 568 401 549 l 382 631 l 617 631 l 617 601 "},"‘":{"x_min":62,"x_max":259.5,"ha":318,"o":"m 259 712 q 233 693 253 704 q 189 672 213 681 q 144 656 166 662 q 109 651 121 650 q 74 694 86 671 q 62 757 62 717 q 71 814 62 784 q 97 875 80 845 q 141 934 115 906 q 199 983 167 961 l 228 959 q 203 925 214 944 q 185 888 193 907 q 175 851 178 869 q 172 818 172 833 q 190 766 172 788 q 248 742 208 744 l 259 712 "},"π":{"x_min":13.453125,"x_max":718.125,"ha":731,"o":"m 709 74 q 649 26 674 45 q 603 -2 623 8 q 567 -16 583 -12 q 536 -21 551 -21 q 495 -6 512 -21 q 465 33 477 7 q 447 97 453 59 q 442 181 442 134 q 443 233 442 202 q 447 307 444 264 q 454 405 450 350 q 465 532 458 460 q 370 534 416 532 q 268 537 324 535 q 259 374 262 459 q 256 203 256 290 q 257 112 256 154 q 263 33 259 70 q 233 19 253 27 q 191 4 214 11 q 145 -10 168 -3 q 107 -22 122 -17 q 102 -15 105 -19 q 96 -7 99 -11 q 88 2 92 -3 q 119 51 106 28 q 143 101 133 74 q 161 164 153 128 q 175 250 168 199 q 188 371 182 301 q 202 538 194 441 l 167 538 q 128 536 145 538 q 95 530 111 534 q 63 517 79 525 q 29 495 48 508 l 13 519 q 52 563 33 543 q 90 599 71 584 q 129 622 109 614 q 170 631 149 631 l 600 631 q 653 633 629 631 q 699 651 678 636 l 718 631 q 647 556 682 582 q 579 530 611 530 l 535 530 q 527 419 529 475 q 525 310 525 363 q 528 204 525 248 q 538 131 531 160 q 557 90 546 103 q 584 77 569 77 q 604 78 594 77 q 626 82 614 79 q 655 90 638 85 q 694 104 671 95 l 709 74 "},"∅":{"x_min":54,"x_max":862,"ha":916,"o":"m 774 426 q 752 561 774 498 q 692 675 731 625 l 277 121 q 361 71 316 88 q 458 54 407 54 q 581 83 523 54 q 681 163 638 112 q 749 282 724 214 q 774 426 774 350 m 142 426 q 163 291 142 354 q 223 177 184 227 l 637 732 q 553 782 598 764 q 457 800 508 800 q 334 770 392 800 q 234 690 277 741 q 166 571 191 639 q 142 426 142 502 m 54 427 q 68 546 54 489 q 109 653 83 603 q 172 743 135 702 q 254 813 209 784 q 351 859 299 843 q 458 875 402 875 q 579 854 521 875 q 685 796 636 833 l 756 891 q 798 910 775 902 q 842 924 821 918 l 862 901 l 743 743 q 830 600 798 681 q 862 427 862 520 q 830 253 862 334 q 743 111 798 171 q 614 15 688 50 q 458 -20 541 -20 q 336 0 394 -20 q 230 58 279 21 l 160 -35 q 143 -45 154 -40 q 119 -55 132 -50 q 93 -63 106 -59 q 73 -70 81 -67 l 54 -47 l 172 110 q 85 253 117 172 q 54 427 54 334 "},"Ỏ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 531 1121 q 518 1088 531 1103 q 489 1060 506 1073 q 456 1034 472 1046 q 433 1010 440 1023 q 432 984 425 997 q 467 953 438 970 q 446 945 457 947 q 425 943 435 944 q 380 970 394 957 q 362 993 365 982 q 366 1014 359 1004 q 384 1032 372 1023 q 409 1050 395 1041 q 436 1068 424 1059 q 456 1088 448 1078 q 465 1111 465 1099 q 452 1150 465 1137 q 420 1163 439 1163 q 401 1159 409 1163 q 386 1149 393 1155 q 377 1135 380 1143 q 374 1120 374 1128 q 375 1113 374 1117 q 379 1106 377 1110 q 365 1102 374 1104 q 347 1097 357 1099 q 328 1094 337 1095 q 311 1091 318 1092 l 304 1099 l 304 1108 q 317 1139 304 1124 q 350 1167 330 1155 q 394 1188 370 1180 q 442 1196 418 1196 q 508 1175 485 1196 q 531 1121 531 1155 "},"Ớ":{"x_min":48,"x_max":828,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 410 797 448 797 q 301 771 349 797 q 221 698 254 746 q 170 584 188 651 q 153 434 153 517 q 173 290 153 358 q 229 171 194 223 q 310 90 264 120 q 410 61 357 61 q 513 84 466 61 q 594 153 560 107 q 648 268 629 200 q 667 426 667 337 m 828 944 q 820 906 828 927 q 794 861 812 885 q 745 812 776 837 q 667 761 714 786 q 745 614 719 698 q 772 439 772 529 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 390 -20 467 -20 q 245 15 309 -20 q 137 112 181 51 q 71 251 94 172 q 48 415 48 329 q 77 590 48 507 q 159 737 107 674 q 280 837 210 800 q 429 875 349 875 q 542 853 492 875 q 634 796 593 832 q 693 846 675 821 q 711 889 711 871 q 700 926 711 908 q 671 959 690 944 l 792 1014 q 818 981 808 999 q 828 944 828 963 m 327 927 q 310 938 316 931 q 297 957 305 944 l 559 1173 q 577 1162 566 1168 q 601 1148 589 1156 q 623 1134 613 1141 q 639 1122 634 1128 l 645 1092 l 327 927 "},"Ṗ":{"x_min":27.5625,"x_max":666,"ha":726,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 807 q 82 800 106 803 q 33 792 57 796 l 27 834 q 98 850 60 843 q 178 863 136 858 q 261 871 219 868 q 345 875 304 875 q 478 859 419 875 q 578 813 537 843 q 643 738 620 782 q 666 634 666 693 q 652 549 666 588 q 617 480 639 510 q 566 428 595 450 q 507 391 538 406 q 445 370 476 377 q 388 363 414 363 q 279 383 324 363 l 263 434 q 318 417 292 421 q 368 414 344 414 q 433 426 399 414 q 495 462 467 438 q 542 523 524 487 q 561 607 561 559 q 541 702 561 662 q 486 768 521 742 q 405 805 451 793 q 307 818 359 818 q 273 817 290 818 q 241 817 257 817 l 241 70 q 246 61 241 66 q 265 51 251 57 q 301 40 278 46 q 359 29 324 35 l 359 0 l 33 0 m 414 1045 q 408 1009 414 1026 q 392 980 402 992 q 367 960 381 967 q 335 953 352 953 q 292 969 305 953 q 278 1018 278 986 q 284 1053 278 1036 q 301 1083 291 1070 q 326 1102 312 1095 q 357 1110 340 1110 q 414 1045 414 1110 "},"9":{"x_min":68,"x_max":590,"ha":652,"o":"m 326 377 q 412 403 373 377 q 481 471 452 429 q 463 612 479 555 q 424 703 447 669 q 371 751 400 737 q 315 766 342 766 q 254 752 281 766 q 208 713 226 738 q 179 654 189 688 q 170 580 170 620 q 185 478 170 518 q 223 416 200 439 q 274 385 246 393 q 326 377 301 377 m 590 495 q 562 304 590 392 q 477 147 534 215 q 333 33 420 79 q 128 -29 246 -12 l 116 11 q 272 70 206 33 q 381 155 337 106 q 447 263 424 203 q 478 391 471 323 q 438 354 459 371 q 392 326 416 337 q 344 308 369 314 q 297 302 320 302 q 200 319 242 302 q 128 369 158 337 q 83 444 99 401 q 68 539 68 488 q 77 608 68 572 q 103 677 86 644 q 145 739 120 710 q 200 790 170 768 q 267 824 231 811 q 343 837 303 837 q 435 817 390 837 q 514 756 479 797 q 569 649 548 714 q 590 495 590 585 "},"Ṟ":{"x_min":27.5625,"x_max":771.921875,"ha":779,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 806 q 83 799 108 803 q 33 792 58 795 l 27 834 q 91 849 59 842 q 159 862 124 856 q 233 871 195 868 q 317 875 272 875 q 454 859 396 875 q 551 815 512 843 q 609 750 590 788 q 628 669 628 712 q 614 580 628 620 q 574 510 600 541 q 514 458 549 480 q 436 423 478 436 l 642 93 q 664 70 652 78 q 690 56 676 61 q 723 52 705 52 q 764 53 741 51 l 771 24 q 686 0 727 9 q 620 -10 646 -10 q 581 1 600 -10 q 553 27 563 12 l 348 408 q 331 406 339 406 l 312 406 q 277 408 295 406 q 241 414 259 410 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 293 818 q 241 816 267 818 l 241 468 q 272 464 259 465 q 301 464 286 464 q 465 511 408 464 q 523 648 523 558 q 509 716 523 685 q 468 770 496 748 q 396 805 440 792 q 293 818 353 818 m 581 -155 q 577 -172 580 -162 q 569 -192 573 -182 q 561 -211 565 -201 q 555 -227 558 -220 l 138 -227 l 123 -210 q 128 -193 124 -202 q 135 -173 131 -183 q 143 -154 139 -164 q 151 -139 147 -145 l 566 -139 l 581 -155 "},"l":{"x_min":40.265625,"x_max":345.734375,"ha":376,"o":"m 40 0 l 40 29 q 89 38 69 33 q 120 49 108 44 q 136 59 131 54 q 142 70 142 65 l 142 878 q 137 926 142 909 q 123 951 133 943 q 93 963 112 960 q 47 969 75 966 l 47 996 q 136 1017 95 1006 q 219 1051 177 1029 l 244 1027 l 244 70 q 267 49 244 60 q 345 29 290 38 l 345 0 l 40 0 "},"Ẫ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 620 957 q 607 938 612 944 q 591 927 602 932 l 405 1068 l 221 927 q 212 932 216 929 q 205 938 208 935 q 199 946 202 941 q 191 957 196 951 l 370 1167 l 442 1167 l 620 957 m 637 1374 q 608 1319 625 1346 q 570 1270 591 1292 q 525 1234 550 1248 q 474 1221 501 1221 q 429 1233 451 1221 q 387 1259 408 1245 q 347 1286 367 1274 q 307 1298 327 1298 q 258 1276 280 1298 q 210 1216 236 1254 l 174 1229 q 203 1285 187 1257 q 241 1334 220 1312 q 286 1369 262 1356 q 337 1383 310 1383 q 385 1371 362 1383 q 429 1344 408 1359 q 467 1318 449 1330 q 502 1306 486 1306 q 553 1327 528 1306 q 600 1389 577 1349 l 637 1374 "},"Ȭ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 648 1103 q 619 1047 636 1075 q 581 998 602 1020 q 536 963 560 977 q 485 950 512 950 q 440 961 461 950 q 398 988 419 973 q 358 1015 378 1003 q 318 1027 338 1027 q 269 1005 291 1027 q 221 945 246 982 l 185 958 q 214 1013 198 986 q 252 1063 231 1041 q 297 1098 273 1084 q 347 1112 321 1112 q 396 1100 373 1112 q 440 1073 419 1088 q 478 1046 460 1058 q 513 1035 497 1035 q 563 1056 539 1035 q 611 1118 588 1078 l 648 1103 m 653 1275 q 648 1258 651 1268 q 640 1238 644 1248 q 633 1219 636 1229 q 626 1204 629 1210 l 209 1204 l 194 1220 q 199 1237 196 1228 q 206 1257 202 1247 q 214 1276 210 1267 q 222 1292 219 1285 l 638 1292 l 653 1275 "},"Ü":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 662 1045 q 656 1009 662 1026 q 639 980 650 992 q 614 960 629 967 q 583 953 600 953 q 539 969 552 953 q 526 1018 526 986 q 532 1053 526 1036 q 549 1083 538 1070 q 574 1102 560 1095 q 604 1110 588 1110 q 662 1045 662 1110 m 391 1045 q 385 1009 391 1026 q 368 980 379 992 q 343 960 358 967 q 312 953 329 953 q 268 969 281 953 q 255 1018 255 986 q 261 1053 255 1036 q 278 1083 267 1070 q 303 1102 289 1095 q 333 1110 317 1110 q 391 1045 391 1110 "},"à":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 402 731 q 385 718 394 722 q 364 710 376 713 l 126 965 l 141 993 q 161 998 147 995 q 188 1003 174 1000 q 217 1007 203 1005 q 240 1010 231 1009 l 402 731 "},"Ś":{"x_min":79.515625,"x_max":600,"ha":661,"o":"m 600 255 q 591 193 600 225 q 567 130 583 161 q 525 72 550 99 q 467 24 501 45 q 391 -7 433 4 q 298 -20 349 -20 q 249 -15 276 -20 q 195 -2 223 -10 q 140 18 167 6 q 89 46 112 30 q 81 69 84 48 q 79 116 79 89 q 81 172 79 144 q 89 219 83 201 l 116 216 q 155 147 132 176 q 207 98 179 117 q 268 70 235 79 q 336 61 301 61 q 397 73 366 61 q 452 107 428 86 q 492 158 476 129 q 508 219 508 187 q 489 290 508 261 q 441 343 471 320 q 374 385 412 366 q 297 421 336 403 q 219 460 257 440 q 152 508 181 480 q 104 570 122 535 q 86 655 86 606 q 92 701 86 676 q 111 750 98 725 q 146 797 125 774 q 198 837 168 820 q 267 864 228 854 q 356 875 307 875 q 417 870 387 875 q 475 857 448 865 q 523 837 502 849 q 557 812 545 826 q 558 796 562 808 q 544 770 553 784 q 524 743 535 756 q 505 722 513 729 l 480 726 q 440 763 461 748 q 398 789 420 779 q 356 802 377 798 q 316 807 335 807 q 251 795 278 807 q 207 766 224 783 q 182 728 190 749 q 174 687 174 706 q 192 631 174 655 q 240 585 210 606 q 308 546 270 565 q 387 508 346 528 q 465 465 427 488 q 533 412 503 442 q 581 344 563 382 q 600 255 600 306 m 249 927 q 232 938 238 931 q 219 957 227 944 l 481 1173 q 499 1162 488 1168 q 523 1148 511 1156 q 545 1134 535 1141 q 561 1122 556 1128 l 567 1092 l 249 927 "},"ó":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 333 710 q 311 717 321 712 q 295 729 302 722 l 453 1010 q 475 1007 461 1009 q 502 1003 488 1005 q 531 999 517 1001 q 552 994 544 996 l 567 967 l 333 710 "},"ǟ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 528 854 q 522 818 528 835 q 506 789 516 801 q 481 769 495 776 q 449 762 466 762 q 406 778 419 762 q 392 826 392 795 q 398 862 392 845 q 415 892 405 879 q 440 911 426 904 q 471 919 454 919 q 528 854 528 919 m 257 854 q 251 818 257 835 q 235 789 245 801 q 210 769 224 776 q 178 762 195 762 q 135 778 148 762 q 121 826 121 795 q 127 862 121 845 q 144 892 134 879 q 169 911 155 904 q 200 919 183 919 q 257 854 257 919 m 561 1112 q 556 1095 560 1105 q 549 1076 553 1085 q 541 1056 545 1066 q 535 1041 537 1047 l 118 1041 l 103 1058 q 107 1075 104 1065 q 115 1094 111 1084 q 123 1113 119 1104 q 130 1129 127 1122 l 546 1129 l 561 1112 "},"ẍ":{"x_min":13.5625,"x_max":689.078125,"ha":699,"o":"m 416 0 l 416 29 q 448 33 433 30 q 471 41 463 35 q 480 59 480 48 q 466 88 480 70 l 332 271 l 204 88 q 193 59 191 70 q 208 41 196 48 q 237 33 219 35 q 270 29 254 30 l 270 0 l 13 0 l 13 29 q 59 39 40 33 q 91 54 78 45 q 114 72 105 62 q 130 92 123 82 l 295 322 l 136 540 q 118 563 127 553 q 97 581 109 574 q 66 594 84 589 q 21 602 48 599 l 21 631 l 305 631 l 305 602 q 269 596 284 599 q 246 586 254 592 q 239 569 238 579 q 252 542 240 558 l 362 391 l 466 542 q 480 569 478 558 q 474 586 481 580 q 452 596 467 593 q 416 602 437 599 l 416 631 l 674 631 l 674 602 q 589 581 619 597 q 541 540 559 566 l 399 340 l 580 92 q 598 72 588 82 q 620 54 607 62 q 649 38 632 45 q 689 29 666 31 l 689 0 l 416 0 m 554 854 q 548 818 554 835 q 531 789 542 801 q 507 769 521 776 q 475 762 492 762 q 431 778 445 762 q 418 826 418 795 q 424 862 418 845 q 441 892 430 879 q 466 911 452 904 q 496 919 480 919 q 554 854 554 919 m 283 854 q 277 818 283 835 q 260 789 271 801 q 236 769 250 776 q 204 762 221 762 q 160 778 174 762 q 147 826 147 795 q 153 862 147 845 q 170 892 159 879 q 195 911 181 904 q 225 919 209 919 q 283 854 283 919 "},"¦":{"x_min":118,"x_max":221,"ha":318,"o":"m 221 -239 q 204 -250 214 -245 q 183 -260 194 -255 q 162 -268 172 -264 q 143 -275 151 -272 l 118 -259 l 118 332 q 156 352 137 343 q 195 367 174 360 l 221 350 l 221 -239 m 221 520 q 204 510 214 515 q 183 500 194 504 q 162 492 172 496 q 143 485 151 488 l 118 500 l 118 1099 q 156 1119 137 1111 q 195 1133 174 1127 l 221 1118 l 221 520 "},"Ʃ":{"x_min":40.015625,"x_max":684.328125,"ha":722,"o":"m 684 234 q 680 173 682 206 q 675 107 678 140 l 670 46 q 666 0 668 18 l 61 0 l 40 29 l 336 430 l 54 825 l 54 855 l 511 855 q 582 856 549 855 q 655 865 615 857 l 658 660 l 620 652 q 596 729 608 702 q 572 769 583 756 q 550 783 560 781 q 529 786 539 786 l 210 786 l 442 456 l 173 95 l 548 95 q 582 101 569 95 q 607 124 596 107 q 626 168 617 140 q 648 242 636 197 l 684 234 "},"̛":{"x_min":-219.578125,"x_max":48,"ha":47,"o":"m 48 707 q 36 660 48 687 q -4 603 24 633 q -82 541 -32 572 q -207 482 -131 510 l -219 524 q -151 556 -179 538 q -104 590 -122 573 q -77 624 -85 608 q -69 652 -69 640 q -79 689 -69 671 q -108 722 -89 707 l 12 777 q 38 744 28 762 q 48 707 48 726 "},"Ẕ":{"x_min":40.015625,"x_max":672.125,"ha":726,"o":"m 672 198 q 669 150 670 177 q 667 97 668 124 q 665 45 666 70 q 663 0 664 19 l 59 0 l 40 30 l 522 787 l 210 787 q 187 779 200 787 q 162 755 174 772 q 139 714 149 739 q 120 653 128 688 l 82 661 l 101 865 q 135 859 120 861 q 165 855 150 856 q 195 855 179 855 l 648 855 l 665 825 l 187 68 l 541 68 q 567 74 556 68 q 589 96 579 80 q 611 139 600 112 q 634 208 621 166 l 672 198 m 592 -155 q 587 -172 590 -162 q 579 -192 583 -182 q 572 -211 575 -201 q 565 -227 568 -220 l 148 -227 l 133 -210 q 138 -193 134 -202 q 145 -173 141 -183 q 153 -154 149 -164 q 161 -139 158 -145 l 577 -139 l 592 -155 "},"Ỷ":{"x_min":-0.390625,"x_max":797.6875,"ha":825,"o":"m 243 0 l 243 29 q 330 55 305 42 q 355 78 355 68 l 355 364 q 298 478 329 419 q 232 594 266 538 q 168 699 199 651 q 113 780 137 748 q 99 794 107 788 q 79 806 91 801 q 49 814 67 811 q 2 818 30 818 l 0 847 q 79 856 39 852 q 148 861 119 861 q 201 834 179 861 q 255 757 226 802 q 313 663 284 713 q 370 562 342 614 q 422 461 398 509 l 604 780 q 597 808 614 797 q 529 825 581 818 l 529 855 l 797 855 l 797 825 q 726 807 750 816 q 691 780 701 797 l 464 366 l 464 77 q 469 68 464 73 q 488 55 475 62 q 523 42 501 48 q 576 29 544 35 l 576 0 l 243 0 m 523 1121 q 511 1088 523 1103 q 481 1060 498 1073 q 449 1034 465 1046 q 425 1010 433 1023 q 424 984 418 997 q 459 953 431 970 q 438 945 449 947 q 417 943 428 944 q 372 970 387 957 q 355 993 358 982 q 358 1014 352 1004 q 376 1032 365 1023 q 402 1050 388 1041 q 428 1068 416 1059 q 449 1088 441 1078 q 457 1111 457 1099 q 445 1150 457 1137 q 412 1163 432 1163 q 394 1159 402 1163 q 379 1149 385 1155 q 370 1135 373 1143 q 366 1120 366 1128 q 368 1113 366 1117 q 372 1106 370 1110 q 358 1102 366 1104 q 339 1097 349 1099 q 320 1094 330 1095 q 304 1091 311 1092 l 296 1099 l 296 1108 q 309 1139 296 1124 q 342 1167 322 1155 q 387 1188 362 1180 q 435 1196 411 1196 q 500 1175 477 1196 q 523 1121 523 1155 "},"Ő":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 306 927 q 288 933 295 929 q 267 945 281 937 l 387 1227 q 406 1223 395 1225 q 428 1219 417 1222 q 450 1215 440 1217 q 467 1210 461 1212 l 482 1182 l 306 927 m 503 927 q 484 933 491 929 q 465 945 477 937 l 584 1227 q 603 1223 592 1225 q 625 1219 614 1222 q 647 1215 636 1217 q 665 1210 657 1212 l 680 1182 l 503 927 "},"ṭ":{"x_min":13.265625,"x_max":458.453125,"ha":478,"o":"m 458 79 q 392 36 425 55 q 330 5 360 17 q 276 -13 301 -7 q 233 -20 250 -20 q 188 -11 209 -20 q 150 17 166 -2 q 124 70 134 37 q 115 150 115 102 l 115 567 l 27 567 l 13 585 l 66 631 l 115 631 l 115 797 l 195 868 l 217 851 l 217 631 l 438 631 l 458 611 q 443 591 452 602 q 424 571 434 580 q 405 553 415 561 q 389 543 396 545 q 340 559 373 551 q 252 567 307 567 l 217 567 l 217 208 q 220 140 217 167 q 233 97 224 113 q 256 74 242 81 q 290 68 269 68 q 349 77 313 68 q 438 114 385 86 l 458 79 m 304 -189 q 298 -225 304 -208 q 281 -254 292 -242 q 256 -274 271 -267 q 225 -282 242 -282 q 181 -265 194 -282 q 168 -217 168 -248 q 174 -181 168 -198 q 191 -151 180 -164 q 216 -132 202 -139 q 246 -125 230 -125 q 304 -189 304 -125 "},"Ṕ":{"x_min":27.5625,"x_max":666,"ha":726,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 807 q 82 800 106 803 q 33 792 57 796 l 27 834 q 98 850 60 843 q 178 863 136 858 q 261 871 219 868 q 345 875 304 875 q 478 859 419 875 q 578 813 537 843 q 643 738 620 782 q 666 634 666 693 q 652 549 666 588 q 617 480 639 510 q 566 428 595 450 q 507 391 538 406 q 445 370 476 377 q 388 363 414 363 q 279 383 324 363 l 263 434 q 318 417 292 421 q 368 414 344 414 q 433 426 399 414 q 495 462 467 438 q 542 523 524 487 q 561 607 561 559 q 541 702 561 662 q 486 768 521 742 q 405 805 451 793 q 307 818 359 818 q 273 817 290 818 q 241 817 257 817 l 241 70 q 246 61 241 66 q 265 51 251 57 q 301 40 278 46 q 359 29 324 35 l 359 0 l 33 0 m 257 927 q 240 938 245 931 q 226 957 235 944 l 489 1173 q 507 1162 495 1168 q 531 1148 518 1156 q 553 1134 543 1141 q 569 1122 563 1128 l 575 1092 l 257 927 "},"Ž":{"x_min":40.015625,"x_max":672.125,"ha":726,"o":"m 672 198 q 669 150 670 177 q 667 97 668 124 q 665 45 666 70 q 663 0 664 19 l 59 0 l 40 30 l 522 787 l 210 787 q 187 779 200 787 q 162 755 174 772 q 139 714 149 739 q 120 653 128 688 l 82 661 l 101 865 q 135 859 120 861 q 165 855 150 856 q 195 855 179 855 l 648 855 l 665 825 l 187 68 l 541 68 q 567 74 556 68 q 589 96 579 80 q 611 139 600 112 q 634 208 621 166 l 672 198 m 413 943 l 340 943 l 161 1151 q 169 1162 166 1157 q 175 1170 172 1167 q 182 1176 179 1174 q 191 1183 186 1179 l 378 1039 l 561 1183 q 577 1170 573 1176 q 590 1151 582 1164 l 413 943 "},"ƪ":{"x_min":20,"x_max":663.4375,"ha":479,"o":"m 182 823 q 211 828 198 823 q 235 840 224 833 q 255 857 246 848 q 270 875 263 867 q 178 987 249 987 q 150 980 163 987 q 126 961 136 973 q 110 935 116 950 q 105 905 105 920 q 111 871 105 886 q 128 845 117 856 q 153 829 139 835 q 182 823 167 823 m 20 869 q 35 931 20 899 q 79 990 51 963 q 145 1033 107 1016 q 228 1051 183 1051 q 300 1031 270 1051 q 349 979 329 1011 q 377 904 368 946 q 387 818 387 862 q 382 608 387 715 q 371 397 377 501 q 360 196 365 294 q 356 13 356 98 q 364 -122 356 -67 q 387 -211 372 -178 q 424 -260 402 -245 q 472 -275 445 -275 q 508 -265 492 -275 q 533 -241 524 -256 q 544 -210 543 -227 q 537 -179 546 -193 q 549 -168 535 -176 q 581 -151 562 -159 q 620 -137 600 -143 q 650 -133 640 -131 l 663 -159 q 646 -216 665 -185 q 595 -275 627 -247 q 519 -320 562 -302 q 429 -339 476 -339 q 348 -317 383 -339 q 291 -255 314 -295 q 258 -157 269 -214 q 247 -26 247 -99 q 251 178 247 73 q 262 386 256 283 q 273 588 268 489 q 278 777 278 688 q 277 790 278 784 q 277 804 277 797 q 212 755 246 770 q 144 741 178 741 q 91 750 114 741 q 52 777 68 760 q 28 818 36 795 q 20 869 20 842 "},"Î":{"x_min":-14.921875,"x_max":414.40625,"ha":414,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 m 414 957 q 401 938 406 944 q 385 927 396 932 l 199 1068 l 15 927 q 6 932 10 929 q 0 938 2 935 q -6 946 -3 941 q -14 957 -10 951 l 164 1167 l 236 1167 l 414 957 "},"e":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 "},"Ề":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 554 957 q 541 938 546 944 q 525 927 537 932 l 339 1068 l 156 927 q 146 932 150 929 q 140 938 143 935 q 133 946 137 941 q 125 957 130 951 l 304 1167 l 377 1167 l 554 957 m 460 1228 q 445 1209 451 1216 q 430 1198 440 1203 l 111 1363 l 117 1394 q 132 1406 122 1399 q 155 1420 143 1413 q 179 1433 167 1427 q 198 1444 190 1440 l 460 1228 "},"Ĕ":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 560 1139 q 515 1046 540 1084 q 461 985 489 1009 q 402 952 433 962 q 341 942 372 942 q 277 952 308 942 q 218 985 246 962 q 165 1046 189 1009 q 120 1139 140 1084 q 136 1158 128 1151 q 155 1170 144 1164 q 194 1104 172 1131 q 241 1062 217 1078 q 291 1039 265 1046 q 339 1032 316 1032 q 388 1039 362 1032 q 439 1062 415 1046 q 486 1104 464 1078 q 524 1170 508 1131 q 544 1158 536 1164 q 560 1139 552 1151 "},"ị":{"x_min":47.046875,"x_max":338.953125,"ha":376,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 m 264 854 q 257 818 264 835 q 241 789 251 801 q 216 769 230 776 q 185 762 202 762 q 141 778 154 762 q 128 826 128 795 q 134 862 128 845 q 151 892 140 879 q 176 911 162 904 q 206 919 190 919 q 264 854 264 919 m 261 -189 q 255 -225 261 -208 q 238 -254 249 -242 q 213 -274 228 -267 q 182 -282 199 -282 q 138 -265 152 -282 q 125 -217 125 -248 q 131 -181 125 -198 q 148 -151 137 -164 q 173 -132 159 -139 q 203 -125 187 -125 q 261 -189 261 -125 "},"Ṃ":{"x_min":40.6875,"x_max":1064.8125,"ha":1120,"o":"m 1051 825 q 1007 819 1031 825 q 959 801 983 812 l 966 70 q 991 50 966 62 q 1064 29 1015 38 l 1064 0 l 756 0 l 756 29 q 831 49 802 38 q 861 70 861 61 l 855 705 l 558 0 l 524 0 l 223 700 l 217 70 q 241 50 217 62 q 315 29 266 38 l 315 0 l 40 0 l 40 29 q 113 49 87 38 q 139 70 139 61 l 145 798 q 93 819 120 813 q 47 825 67 825 l 47 855 l 241 855 q 252 852 248 855 q 262 844 257 850 q 271 827 266 838 q 284 798 276 816 l 554 185 l 813 798 q 828 829 822 818 q 837 846 833 841 q 846 853 842 852 q 857 855 851 855 l 1051 855 l 1051 825 m 621 -189 q 614 -225 621 -208 q 598 -254 608 -242 q 573 -274 587 -267 q 542 -282 559 -282 q 498 -265 511 -282 q 485 -217 485 -248 q 491 -181 485 -198 q 508 -151 497 -164 q 532 -132 519 -139 q 563 -125 546 -125 q 621 -189 621 -125 "},"◌":{"x_min":50.859375,"x_max":672.125,"ha":723,"o":"m 330 588 q 339 611 330 602 q 361 621 348 621 q 384 611 375 621 q 394 588 394 602 q 384 565 394 574 q 361 556 375 556 q 339 565 348 556 q 330 588 330 574 m 330 31 q 339 54 330 45 q 361 64 348 64 q 384 54 375 64 q 394 31 394 45 q 384 9 394 18 q 361 0 375 0 q 339 9 348 0 q 330 31 330 18 m 438 579 q 450 594 442 589 q 467 600 458 600 q 490 589 481 600 q 500 566 500 579 q 489 544 500 553 q 467 535 479 535 q 445 545 454 535 q 436 568 436 555 q 438 579 436 573 m 225 64 q 238 79 229 74 q 256 85 248 85 q 278 74 269 85 q 288 52 288 64 q 277 30 288 39 q 255 21 267 21 q 232 31 241 21 q 223 52 223 41 q 223 58 223 56 q 225 64 224 61 m 535 530 q 558 540 546 540 q 580 530 571 540 q 590 507 590 521 q 580 484 590 493 q 558 475 571 475 q 536 485 545 475 q 527 507 527 495 q 535 530 527 520 m 141 135 q 163 146 151 146 q 187 136 177 146 q 197 113 197 127 q 187 90 197 100 q 164 81 178 81 q 141 90 151 81 q 132 113 132 100 q 141 135 132 126 m 606 447 q 612 449 609 448 q 618 450 615 450 q 640 440 630 450 q 651 417 651 431 q 641 395 651 405 q 617 385 632 385 q 596 394 605 385 q 587 416 587 403 q 592 434 587 426 q 606 447 597 443 m 91 233 q 104 236 97 236 q 127 227 118 236 q 137 204 137 218 q 127 181 137 191 q 104 171 118 171 q 81 180 91 171 q 72 204 72 190 q 77 221 72 214 q 91 233 82 229 m 639 343 q 662 333 653 343 q 672 310 672 324 q 662 288 672 297 q 640 279 653 279 l 637 279 q 616 288 625 279 q 607 309 607 297 q 617 332 607 323 q 639 343 627 341 m 82 342 q 105 332 95 342 q 115 311 115 323 q 105 287 115 297 q 83 278 95 278 l 82 278 q 59 287 68 278 q 50 310 50 297 q 60 332 50 323 q 82 342 69 342 m 630 233 q 645 221 640 229 q 651 204 651 213 q 641 181 651 190 q 618 172 631 172 q 594 181 602 172 q 586 204 586 191 q 596 227 586 219 q 619 236 606 236 q 630 233 625 236 m 116 447 q 131 434 125 443 q 137 416 137 425 q 126 393 137 402 q 103 385 116 385 q 80 395 89 385 q 72 417 72 405 q 81 440 72 431 q 103 450 91 450 q 109 449 107 450 q 116 447 112 448 m 581 137 q 591 114 591 127 q 581 91 591 101 q 558 82 572 82 q 535 91 544 82 q 526 114 526 101 q 534 136 526 127 q 557 146 543 146 q 581 137 570 146 m 186 530 q 197 508 197 521 q 188 484 197 493 q 164 476 179 476 q 141 485 151 476 q 132 506 132 494 q 141 530 132 520 q 164 540 151 540 q 186 530 177 540 m 497 65 q 499 59 498 62 q 500 53 500 56 q 490 31 500 41 q 467 21 481 21 q 445 30 455 21 q 435 54 435 39 q 443 75 435 65 q 465 86 452 86 q 483 80 474 86 q 497 65 492 75 m 284 580 q 287 567 287 574 q 278 544 287 554 q 256 535 270 535 q 233 544 243 535 q 223 567 223 553 q 232 589 223 579 q 256 600 242 600 q 272 594 265 600 q 284 580 280 589 "},"ò":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 440 731 q 422 718 431 722 q 402 710 413 713 l 163 965 l 178 993 q 198 998 185 995 q 226 1003 211 1000 q 255 1007 240 1005 q 277 1010 269 1009 l 440 731 "},"^":{"x_min":67.828125,"x_max":615.140625,"ha":684,"o":"m 615 430 q 582 404 598 414 q 543 383 566 393 l 518 401 l 326 891 l 156 430 q 139 416 149 423 q 120 403 130 409 q 100 391 109 396 q 83 383 90 386 l 67 401 l 286 991 q 306 1007 294 999 q 330 1024 318 1016 q 354 1039 342 1032 q 376 1051 366 1046 l 615 430 "},"∙":{"x_min":34,"x_max":170,"ha":203,"o":"m 170 488 q 163 452 170 469 q 147 423 157 435 q 122 403 136 410 q 91 396 108 396 q 47 412 60 396 q 34 460 34 429 q 40 496 34 479 q 57 526 46 513 q 81 545 68 538 q 112 553 95 553 q 170 488 170 553 "},"ǘ":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 572 854 q 566 818 572 835 q 550 789 560 801 q 525 769 539 776 q 494 762 511 762 q 450 778 463 762 q 436 826 436 795 q 443 862 436 845 q 460 892 449 879 q 484 911 470 904 q 515 919 498 919 q 572 854 572 919 m 301 854 q 295 818 301 835 q 279 789 289 801 q 254 769 268 776 q 223 762 240 762 q 179 778 192 762 q 165 826 165 795 q 172 862 165 845 q 189 892 178 879 q 213 911 199 904 q 244 919 227 919 q 301 854 301 919 m 340 954 q 318 961 328 956 q 301 973 309 967 l 460 1254 q 481 1251 468 1253 q 509 1248 495 1250 q 537 1243 524 1246 q 558 1238 551 1240 l 574 1212 l 340 954 "},"ṉ":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 544 496 549 470 q 529 537 539 522 q 502 557 519 552 q 462 563 486 563 q 415 552 441 563 q 360 520 389 542 q 298 461 330 497 q 234 372 266 425 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 59 l 132 482 q 129 524 132 508 q 118 548 127 540 q 90 561 109 557 q 37 570 71 565 l 37 597 q 122 618 83 604 q 199 651 161 632 l 223 627 l 231 458 q 296 539 260 503 q 369 599 332 575 q 440 637 406 624 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 m 620 -155 q 615 -172 619 -162 q 608 -192 612 -182 q 600 -211 604 -201 q 594 -227 596 -220 l 177 -227 l 162 -210 q 166 -193 163 -202 q 174 -173 170 -183 q 182 -154 178 -164 q 189 -139 186 -145 l 605 -139 l 620 -155 "},"ū":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 605 868 q 600 851 604 861 q 593 831 597 841 q 585 812 589 822 q 579 797 581 803 l 162 797 l 147 813 q 151 830 148 821 q 159 850 155 840 q 167 869 163 859 q 174 885 171 878 l 590 885 l 605 868 "},"ˆ":{"x_min":33.234375,"x_max":462.546875,"ha":497,"o":"m 462 740 q 449 721 454 727 q 433 710 444 715 l 247 891 l 63 710 q 54 715 58 712 q 47 721 50 718 q 41 729 44 724 q 33 740 37 734 l 212 998 l 284 998 l 462 740 "},"Ẅ":{"x_min":13.5625,"x_max":1154.328125,"ha":1181,"o":"m 1154 825 q 1104 814 1124 819 q 1073 803 1085 808 q 1057 793 1062 798 q 1051 783 1051 789 l 895 40 q 881 15 892 26 q 855 -2 870 5 q 826 -13 841 -9 q 801 -20 811 -17 l 580 640 l 385 40 q 369 15 381 26 q 343 -1 358 5 q 313 -12 328 -8 q 283 -20 297 -17 l 107 778 q 82 806 103 795 q 13 825 61 817 l 13 855 l 304 855 l 304 825 q 252 817 271 822 q 223 806 233 812 q 212 792 214 800 q 212 778 210 785 l 347 169 l 567 855 l 604 855 l 844 169 l 971 783 q 965 798 972 791 q 943 808 957 804 q 909 817 929 813 q 866 825 889 821 l 866 855 l 1154 855 l 1154 825 m 787 1045 q 781 1009 787 1026 q 764 980 775 992 q 739 960 753 967 q 708 953 725 953 q 664 969 677 953 q 651 1018 651 986 q 657 1053 651 1036 q 674 1083 663 1070 q 699 1102 685 1095 q 729 1110 713 1110 q 787 1045 787 1110 m 516 1045 q 510 1009 516 1026 q 493 980 504 992 q 468 960 482 967 q 437 953 454 953 q 393 969 406 953 q 380 1018 380 986 q 386 1053 380 1036 q 403 1083 392 1070 q 428 1102 414 1095 q 458 1110 442 1110 q 516 1045 516 1110 "},"ȷ":{"x_min":-149.234375,"x_max":241,"ha":359,"o":"m 241 67 q 231 -65 241 -10 q 203 -158 221 -119 q 162 -223 186 -196 q 111 -271 139 -249 q 73 -297 93 -285 q 32 -319 52 -310 q -5 -333 12 -328 q -36 -339 -23 -339 q -77 -333 -57 -339 q -113 -321 -97 -328 q -139 -305 -129 -313 q -149 -291 -149 -297 q -139 -275 -149 -285 q -116 -253 -129 -264 q -87 -231 -102 -241 q -63 -216 -73 -221 q -18 -241 -41 -235 q 30 -247 4 -247 q 69 -234 50 -247 q 104 -190 88 -221 q 129 -106 120 -159 q 139 29 139 -52 l 139 454 q 137 510 139 489 q 126 542 135 531 q 98 560 117 554 q 44 569 79 565 l 44 596 q 94 607 72 601 q 136 620 116 613 q 175 634 156 626 q 215 651 194 642 l 241 651 l 241 67 "},"č":{"x_min":54,"x_max":569.71875,"ha":607,"o":"m 569 129 q 492 47 525 76 q 430 2 458 17 q 374 -16 401 -12 q 315 -20 347 -20 q 218 2 265 -20 q 134 65 171 24 q 76 166 98 106 q 54 301 54 226 q 80 438 54 374 q 154 548 107 501 q 263 623 200 596 q 400 651 326 651 q 445 647 422 651 q 490 636 469 643 q 530 619 512 629 q 559 597 548 609 q 557 574 560 588 q 548 542 554 559 q 534 510 541 525 q 520 485 527 495 l 495 492 q 478 519 490 504 q 446 546 465 533 q 400 567 427 559 q 339 576 373 576 q 270 560 303 576 q 211 512 237 544 q 171 433 186 480 q 156 322 156 385 q 173 217 156 264 q 219 137 190 170 q 285 85 248 103 q 364 68 323 68 q 399 69 383 68 q 435 80 415 71 q 479 106 454 89 q 543 156 505 124 l 569 129 m 368 726 l 296 726 l 117 968 q 125 979 122 974 q 131 987 128 984 q 138 993 134 991 q 147 1000 142 996 l 334 829 l 517 1000 q 533 987 529 993 q 546 968 538 981 l 368 726 "},"’":{"x_min":59.875,"x_max":256,"ha":318,"o":"m 256 878 q 246 821 256 852 q 220 760 237 790 q 177 701 202 729 q 119 653 152 673 l 89 676 q 114 709 103 690 q 132 747 124 728 q 142 784 139 766 q 146 816 146 802 q 127 869 146 846 q 70 894 109 892 l 59 924 q 85 943 65 933 q 128 963 105 954 q 174 980 152 973 q 209 986 197 986 q 243 941 231 964 q 256 878 256 917 "},"-":{"x_min":41.375,"x_max":426.609375,"ha":468,"o":"m 426 370 q 416 338 422 355 q 405 309 411 320 l 58 309 l 41 325 q 50 356 44 340 q 62 387 56 373 l 409 387 l 426 370 "},"Q":{"x_min":47,"x_max":869.4375,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 869 -79 q 836 -132 853 -109 q 802 -172 819 -156 q 772 -198 786 -189 q 747 -207 757 -207 q 664 -186 705 -207 q 582 -135 623 -165 q 501 -74 541 -106 q 420 -18 461 -41 q 389 -20 404 -20 q 252 14 315 -20 q 143 108 188 49 q 72 246 97 167 q 47 415 47 325 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 438 772 521 q 752 299 772 367 q 700 176 733 232 q 619 76 666 119 q 518 8 573 32 q 580 -28 549 -8 q 641 -66 611 -48 q 698 -96 670 -84 q 751 -109 726 -109 q 768 -106 759 -109 q 789 -97 777 -103 q 815 -81 800 -91 q 851 -56 830 -71 l 869 -79 "},"ě":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 382 726 l 309 726 l 130 968 q 139 979 135 974 q 145 987 142 984 q 152 993 148 991 q 161 1000 155 996 l 347 829 l 531 1000 q 547 987 542 993 q 560 968 552 981 l 382 726 "},"œ":{"x_min":54,"x_max":1047,"ha":1101,"o":"m 802 580 q 742 566 770 580 q 692 527 714 552 q 655 469 670 503 q 635 394 641 435 l 907 394 q 928 399 922 394 q 934 418 934 404 q 928 464 934 436 q 909 517 923 491 q 869 561 895 542 q 802 580 844 580 m 527 308 q 509 410 527 362 q 463 495 492 459 q 397 554 434 532 q 322 575 361 575 q 255 556 285 575 q 203 502 225 536 q 169 421 181 468 q 158 320 158 374 q 176 218 158 266 q 223 133 194 169 q 289 75 253 96 q 363 53 326 53 q 429 73 399 53 q 481 126 459 92 q 515 207 503 160 q 527 308 527 253 m 1047 378 q 1013 352 1033 364 q 971 332 992 340 l 631 332 q 645 231 631 279 q 684 148 659 184 q 744 91 709 112 q 823 70 779 70 q 860 72 842 70 q 901 83 879 74 q 951 111 923 93 q 1016 160 978 129 q 1032 147 1025 156 q 1042 133 1038 138 q 962 53 997 83 q 899 6 928 22 q 841 -14 869 -9 q 782 -20 814 -20 q 716 -10 748 -20 q 656 18 685 0 q 604 63 628 36 q 564 125 581 90 q 514 66 542 93 q 456 20 487 39 q 391 -9 425 1 q 322 -20 357 -20 q 215 4 264 -20 q 130 71 166 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 97 471 77 432 q 147 543 118 510 q 209 600 175 576 q 283 637 244 623 q 362 651 322 651 q 433 640 399 651 q 496 612 466 630 q 548 567 525 594 q 589 509 572 541 q 628 557 606 535 q 675 596 649 579 q 709 616 690 606 q 748 634 728 626 q 787 646 767 642 q 822 651 806 651 q 896 638 864 651 q 954 605 929 626 q 997 557 979 585 q 1026 499 1015 530 q 1041 437 1036 469 q 1047 378 1047 406 "},"Ộ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 485 -189 q 479 -225 485 -208 q 462 -254 473 -242 q 437 -274 452 -267 q 406 -282 423 -282 q 362 -265 375 -282 q 349 -217 349 -248 q 355 -181 349 -198 q 372 -151 361 -164 q 397 -132 383 -139 q 427 -125 411 -125 q 485 -189 485 -125 m 631 957 q 618 938 623 944 q 602 927 613 932 l 416 1068 l 232 927 q 223 932 227 929 q 216 938 219 935 q 210 946 213 941 q 202 957 206 951 l 381 1167 l 453 1167 l 631 957 "},"ṩ":{"x_min":64.5,"x_max":474,"ha":536,"o":"m 474 192 q 460 109 474 144 q 425 51 446 75 q 377 13 403 28 q 325 -7 350 0 q 276 -17 299 -15 q 241 -20 254 -20 q 163 -7 208 -20 q 72 29 117 4 q 65 51 67 31 q 64 97 63 71 q 68 150 65 123 q 77 192 72 176 l 106 185 q 120 131 107 156 q 157 88 134 106 q 209 58 179 69 q 275 48 239 48 q 319 55 299 48 q 354 77 340 63 q 377 111 369 91 q 386 154 386 130 q 371 202 386 181 q 333 240 356 223 q 279 273 309 258 q 218 304 249 288 q 163 335 189 319 q 116 371 137 351 q 83 417 96 392 q 71 474 71 442 q 87 549 71 516 q 132 604 104 582 q 196 639 160 627 q 271 651 233 651 q 317 647 292 651 q 367 636 343 643 q 414 620 392 629 q 449 598 435 611 q 450 580 453 594 q 440 549 447 566 q 426 517 434 532 q 415 497 419 502 l 389 502 q 321 570 356 551 q 254 590 287 590 q 214 582 231 590 q 184 563 196 575 q 165 537 171 551 q 159 508 159 522 q 171 469 159 486 q 205 437 184 452 q 253 408 226 421 q 308 379 280 394 q 367 347 337 364 q 420 308 396 330 q 459 258 444 286 q 474 192 474 230 m 337 -189 q 331 -225 337 -208 q 314 -254 325 -242 q 289 -274 304 -267 q 258 -282 275 -282 q 214 -265 228 -282 q 201 -217 201 -248 q 207 -181 201 -198 q 224 -151 213 -164 q 249 -132 235 -139 q 279 -125 263 -125 q 337 -189 337 -125 m 337 854 q 331 818 337 835 q 314 789 325 801 q 289 769 304 776 q 258 762 275 762 q 214 778 228 762 q 201 826 201 795 q 207 862 201 845 q 224 892 213 879 q 249 911 235 904 q 279 919 263 919 q 337 854 337 919 "},"Ậ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 474 -189 q 468 -225 474 -208 q 451 -254 462 -242 q 426 -274 441 -267 q 395 -282 412 -282 q 351 -265 365 -282 q 338 -217 338 -248 q 344 -181 338 -198 q 361 -151 350 -164 q 386 -132 372 -139 q 416 -125 400 -125 q 474 -189 474 -125 m 620 957 q 607 938 612 944 q 591 927 602 932 l 405 1068 l 221 927 q 212 932 216 929 q 205 938 208 935 q 199 946 202 941 q 191 957 196 951 l 370 1167 l 442 1167 l 620 957 "},"":{"x_min":30.515625,"x_max":230.59375,"ha":231,"o":"m 230 0 l 230 -200 l 204 -200 l 204 -26 l 30 -26 l 30 0 l 230 0 "},"#":{"x_min":59,"x_max":666.015625,"ha":652,"o":"m 270 400 l 398 400 l 448 574 l 320 574 l 270 400 m 546 652 l 649 652 l 666 635 q 656 602 662 620 q 644 574 650 585 l 524 574 l 474 400 l 577 400 l 592 381 q 583 350 588 368 q 573 322 578 333 l 452 322 l 393 115 q 364 98 381 105 q 330 86 348 92 l 313 99 l 376 322 l 248 322 l 189 115 q 161 98 177 105 q 128 86 145 92 l 110 99 l 173 322 l 73 322 l 59 338 q 67 369 62 352 q 79 400 73 386 l 196 400 l 245 574 l 147 574 l 130 590 q 140 621 134 605 q 151 652 146 638 l 267 652 l 324 848 q 354 864 339 859 q 383 876 368 869 l 403 861 l 343 652 l 470 652 l 526 848 q 557 864 541 859 q 588 876 572 869 l 606 861 l 546 652 "},"Ǧ":{"x_min":47,"x_max":777.203125,"ha":810,"o":"m 707 805 q 705 792 711 802 q 688 770 699 782 q 663 746 677 757 q 641 726 650 734 l 619 730 q 573 765 596 751 q 523 786 549 778 q 467 796 497 793 q 405 800 438 800 q 362 792 388 800 q 309 767 337 784 q 253 721 281 749 q 202 652 225 693 q 165 556 179 611 q 152 431 152 502 q 177 267 152 337 q 243 152 202 197 q 334 83 283 106 q 437 61 385 61 q 528 70 487 61 q 604 98 570 80 l 604 328 q 597 343 604 336 q 575 357 591 350 q 532 370 559 364 q 464 384 505 377 l 464 413 l 777 413 l 777 384 q 722 359 738 375 q 706 328 706 344 l 706 104 q 615 38 655 63 q 542 1 576 14 q 479 -15 509 -11 q 419 -20 449 -20 q 284 5 350 -20 q 164 82 217 30 q 79 212 112 134 q 47 394 47 289 q 82 596 47 507 q 180 747 118 685 q 324 842 241 809 q 499 875 406 875 q 549 870 522 875 q 603 856 575 865 q 658 834 631 847 q 707 805 685 821 m 470 943 l 398 943 l 219 1151 q 227 1162 223 1157 q 233 1170 230 1167 q 240 1176 236 1174 q 249 1183 244 1179 l 436 1039 l 619 1183 q 635 1170 630 1176 q 648 1151 640 1164 l 470 943 "},"ɂ":{"x_min":48,"x_max":502,"ha":556,"o":"m 101 0 l 101 29 q 217 70 217 49 l 217 180 q 230 247 217 219 q 264 296 244 274 q 308 335 284 318 q 352 369 332 352 q 386 407 372 387 q 400 454 400 427 q 388 510 400 485 q 357 552 376 535 q 313 578 338 569 q 260 587 288 587 q 217 578 236 587 q 185 554 198 569 q 165 519 172 539 q 159 479 159 500 q 161 459 159 469 q 167 439 163 449 q 121 422 145 428 q 67 414 98 417 l 49 434 q 48 445 48 439 l 48 456 q 71 535 48 499 q 131 596 94 570 q 217 636 169 622 q 313 651 264 651 q 390 638 355 651 q 450 602 425 625 q 488 549 474 580 q 502 484 502 519 q 488 422 502 448 q 454 376 474 396 q 410 340 434 356 q 366 304 386 323 q 332 263 346 286 q 319 206 319 240 l 319 70 q 348 49 319 60 q 434 29 378 38 l 434 0 l 101 0 "},"ꞌ":{"x_min":98.34375,"x_max":242.125,"ha":340,"o":"m 206 443 q 192 437 200 440 q 176 433 185 435 q 158 430 167 431 q 141 429 149 429 l 98 963 q 121 974 105 968 q 152 987 136 980 q 184 997 169 993 q 206 1004 198 1002 l 242 986 l 206 443 "},"Ⱡ":{"x_min":29.59375,"x_max":640.484375,"ha":661,"o":"m 640 165 q 626 63 635 106 q 612 0 618 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 60 l 132 296 l 44 296 l 29 312 q 36 334 32 323 q 44 357 40 346 l 132 357 l 132 432 l 44 432 l 29 448 q 36 470 32 459 q 44 493 40 482 l 132 493 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 493 l 403 493 l 420 477 l 403 432 l 241 432 l 241 357 l 403 357 l 420 341 l 403 296 l 241 296 l 241 111 q 246 89 241 98 q 266 74 252 80 q 305 64 281 67 q 367 61 329 61 l 464 61 q 516 64 495 61 q 554 79 538 67 q 583 114 570 91 q 611 177 597 137 l 640 165 "},"Ɵ":{"x_min":47,"x_max":772,"ha":834,"o":"m 664 478 q 636 598 657 541 q 582 700 615 656 q 505 770 549 744 q 409 797 461 797 q 307 774 352 797 q 229 710 261 752 q 176 610 196 669 q 153 478 157 551 l 664 478 m 152 417 q 176 279 154 343 q 232 165 197 214 q 312 89 267 117 q 409 61 358 61 q 511 83 465 61 q 591 151 558 106 q 645 263 625 196 q 666 417 664 329 l 152 417 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 "},"Å":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 471 1060 q 467 1091 471 1076 q 455 1117 463 1106 q 437 1135 448 1128 q 413 1142 426 1142 q 386 1136 399 1142 q 363 1120 373 1130 q 347 1094 353 1109 q 341 1061 341 1079 q 345 1031 341 1045 q 357 1005 349 1016 q 375 987 364 994 q 399 981 386 981 q 426 986 413 981 q 449 1001 439 991 q 465 1026 459 1011 q 471 1060 471 1040 m 532 1088 q 519 1024 532 1053 q 484 974 506 995 q 437 940 463 952 q 385 929 411 929 q 343 937 362 929 q 310 959 323 945 q 288 992 296 973 q 280 1033 280 1011 q 293 1097 280 1068 q 327 1148 306 1127 q 375 1182 348 1170 q 427 1194 401 1194 q 468 1185 449 1194 q 502 1162 487 1177 q 524 1128 516 1147 q 532 1088 532 1109 "},"Ȫ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 620 1045 q 614 1009 620 1026 q 597 980 608 992 q 572 960 587 967 q 541 953 558 953 q 497 969 510 953 q 484 1018 484 986 q 490 1053 484 1036 q 507 1083 496 1070 q 532 1102 518 1095 q 562 1110 546 1110 q 620 1045 620 1110 m 349 1045 q 343 1009 349 1026 q 326 980 337 992 q 301 960 316 967 q 270 953 287 953 q 226 969 239 953 q 213 1018 213 986 q 219 1053 213 1036 q 236 1083 225 1070 q 261 1102 247 1095 q 291 1110 275 1110 q 349 1045 349 1110 m 653 1275 q 648 1258 651 1268 q 640 1238 644 1248 q 633 1219 636 1229 q 626 1204 629 1210 l 209 1204 l 194 1220 q 199 1237 196 1228 q 206 1257 202 1247 q 214 1276 210 1267 q 222 1292 219 1285 l 638 1292 l 653 1275 "},"ǎ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 362 726 l 289 726 l 110 968 q 118 979 115 974 q 125 987 122 984 q 131 993 128 991 q 141 1000 135 996 l 327 829 l 510 1000 q 526 987 522 993 q 539 968 531 981 l 362 726 "},"¸":{"x_min":52.78125,"x_max":277,"ha":318,"o":"m 277 -155 q 265 -203 277 -180 q 227 -245 253 -226 q 163 -278 202 -264 q 67 -301 123 -292 l 52 -267 q 112 -252 88 -261 q 153 -232 137 -243 q 175 -209 168 -221 q 183 -186 183 -197 q 165 -154 183 -163 q 105 -141 147 -145 q 112 -122 107 -139 q 127 -77 117 -108 q 155 10 136 -47 l 208 8 l 181 -70 q 216 -80 199 -74 q 247 -97 234 -87 q 268 -121 260 -107 q 277 -155 277 -136 "},"=":{"x_min":41.375,"x_max":568.34375,"ha":610,"o":"m 568 298 q 558 269 564 284 q 548 241 552 253 l 58 241 l 41 259 q 50 287 44 273 q 62 316 56 302 l 551 316 l 568 298 m 568 501 q 558 471 564 488 q 548 444 552 455 l 58 444 l 41 461 q 50 490 44 474 q 62 519 56 506 l 551 519 l 568 501 "},"ạ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 380 -189 q 374 -225 380 -208 q 357 -254 368 -242 q 332 -274 346 -267 q 301 -282 318 -282 q 257 -265 270 -282 q 244 -217 244 -248 q 250 -181 244 -198 q 267 -151 256 -164 q 292 -132 278 -139 q 322 -125 306 -125 q 380 -189 380 -125 "},"Ǖ":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 662 1045 q 656 1009 662 1026 q 639 980 650 992 q 614 960 629 967 q 583 953 600 953 q 539 969 552 953 q 526 1018 526 986 q 532 1053 526 1036 q 549 1083 538 1070 q 574 1102 560 1095 q 604 1110 588 1110 q 662 1045 662 1110 m 391 1045 q 385 1009 391 1026 q 368 980 379 992 q 343 960 358 967 q 312 953 329 953 q 268 969 281 953 q 255 1018 255 986 q 261 1053 255 1036 q 278 1083 267 1070 q 303 1102 289 1095 q 333 1110 317 1110 q 391 1045 391 1110 m 695 1275 q 690 1258 693 1268 q 682 1238 687 1248 q 675 1219 678 1229 q 668 1204 671 1210 l 251 1204 l 236 1220 q 241 1237 238 1228 q 248 1257 244 1247 q 257 1276 252 1267 q 264 1292 261 1285 l 680 1292 l 695 1275 "},"ú":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 340 710 q 318 717 328 712 q 301 729 309 722 l 460 1010 q 481 1007 468 1009 q 509 1003 495 1005 q 537 999 524 1001 q 558 994 551 996 l 574 967 l 340 710 "},"˚":{"x_min":47,"x_max":300,"ha":347,"o":"m 239 843 q 234 874 239 859 q 223 900 230 889 q 204 918 215 911 q 180 925 193 925 q 153 919 166 925 q 130 903 140 913 q 114 877 120 892 q 108 844 108 862 q 112 814 108 828 q 123 788 116 799 q 142 770 131 777 q 166 764 153 764 q 193 769 180 764 q 216 784 206 774 q 232 808 226 794 q 239 843 239 823 m 300 871 q 286 807 300 836 q 252 757 273 778 q 204 723 230 735 q 152 712 178 712 q 109 720 129 712 q 76 742 90 728 q 54 775 62 756 q 47 816 47 794 q 60 880 47 851 q 94 931 73 910 q 141 965 115 953 q 194 977 168 977 q 235 968 216 977 q 269 945 255 960 q 291 911 283 930 q 300 871 300 892 "},"¯":{"x_min":113.265625,"x_max":571.734375,"ha":685,"o":"m 571 868 q 567 851 570 861 q 559 831 563 841 q 551 812 555 822 q 545 797 548 803 l 128 797 l 113 813 q 118 830 114 821 q 125 850 121 840 q 133 869 129 859 q 141 885 137 878 l 556 885 l 571 868 "},"u":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 "},"ṛ":{"x_min":37.046875,"x_max":528.015625,"ha":550,"o":"m 522 625 q 528 602 528 621 q 522 556 527 582 q 509 503 517 530 q 493 458 501 476 l 463 458 q 452 504 459 485 q 435 534 444 523 q 413 550 425 545 q 388 556 401 556 q 353 543 373 556 q 312 504 333 530 q 270 435 291 477 q 234 336 250 393 l 234 70 q 259 49 234 60 q 348 29 284 38 l 348 0 l 37 0 l 37 29 q 106 49 81 39 q 132 70 132 59 l 132 465 q 130 502 132 487 q 127 527 129 518 q 122 542 125 537 q 116 551 119 547 q 105 559 111 556 q 90 564 100 562 q 68 567 81 566 q 37 569 56 568 l 37 596 q 123 620 81 608 q 200 651 166 632 l 224 627 l 233 473 q 272 543 250 510 q 318 599 293 575 q 369 637 342 623 q 425 651 396 651 q 472 645 446 651 q 522 625 497 640 m 251 -189 q 245 -225 251 -208 q 228 -254 239 -242 q 203 -274 218 -267 q 172 -282 189 -282 q 128 -265 141 -282 q 115 -217 115 -248 q 121 -181 115 -198 q 138 -151 127 -164 q 163 -132 149 -139 q 193 -125 177 -125 q 251 -189 251 -125 "},"":{"x_min":0,"x_max":272.640625,"ha":273,"o":"m 38 710 q 16 717 26 712 q 0 729 7 722 l 158 1010 q 180 1007 166 1009 q 207 1003 193 1005 q 236 999 222 1001 q 257 994 249 996 l 272 967 l 38 710 "},"ẻ":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 460 904 q 447 871 460 886 q 418 843 435 856 q 385 817 401 829 q 361 793 369 806 q 360 767 354 780 q 395 736 367 753 q 375 728 386 730 q 354 726 364 727 q 309 753 323 740 q 291 776 294 765 q 294 797 288 787 q 312 815 301 806 q 338 833 324 824 q 365 851 352 842 q 385 871 377 861 q 394 894 394 882 q 381 933 394 920 q 348 946 368 946 q 330 942 338 946 q 315 932 321 938 q 306 918 309 926 q 302 903 302 911 q 304 896 302 900 q 308 889 306 893 q 294 885 302 887 q 276 880 285 882 q 256 877 266 878 q 240 874 247 875 l 233 882 l 233 891 q 246 922 233 907 q 278 950 258 938 q 323 971 298 963 q 371 979 347 979 q 437 958 414 979 q 460 904 460 938 "},"Ṏ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 648 1103 q 619 1047 636 1075 q 581 998 602 1020 q 536 963 560 977 q 485 950 512 950 q 440 961 461 950 q 398 988 419 973 q 358 1015 378 1003 q 318 1027 338 1027 q 269 1005 291 1027 q 221 945 246 982 l 185 958 q 214 1013 198 986 q 252 1063 231 1041 q 297 1098 273 1084 q 347 1112 321 1112 q 396 1100 373 1112 q 440 1073 419 1088 q 478 1046 460 1058 q 513 1035 497 1035 q 563 1056 539 1035 q 611 1118 588 1078 l 648 1103 m 620 1262 q 614 1226 620 1243 q 597 1197 608 1209 q 572 1177 587 1184 q 541 1170 558 1170 q 497 1186 510 1170 q 484 1235 484 1203 q 490 1270 484 1253 q 507 1300 496 1287 q 532 1319 518 1312 q 562 1327 546 1327 q 620 1262 620 1327 m 349 1262 q 343 1226 349 1243 q 326 1197 337 1209 q 301 1177 316 1184 q 270 1170 287 1170 q 226 1186 239 1170 q 213 1235 213 1203 q 219 1270 213 1253 q 236 1300 225 1287 q 261 1319 247 1312 q 291 1327 275 1327 q 349 1262 349 1327 "},"ẗ":{"x_min":13.265625,"x_max":458.453125,"ha":478,"o":"m 458 79 q 392 36 425 55 q 330 5 360 17 q 276 -13 301 -7 q 233 -20 250 -20 q 188 -11 209 -20 q 150 17 166 -2 q 124 70 134 37 q 115 150 115 102 l 115 567 l 27 567 l 13 585 l 66 631 l 115 631 l 115 797 l 195 868 l 217 851 l 217 631 l 438 631 l 458 611 q 443 591 452 602 q 424 571 434 580 q 405 553 415 561 q 389 543 396 545 q 340 559 373 551 q 252 567 307 567 l 217 567 l 217 208 q 220 140 217 167 q 233 97 224 113 q 256 74 242 81 q 290 68 269 68 q 349 77 313 68 q 438 114 385 86 l 458 79 m 439 1037 q 433 1001 439 1018 q 416 972 427 985 q 391 952 406 960 q 360 945 377 945 q 316 962 329 945 q 303 1010 303 978 q 309 1045 303 1029 q 326 1075 315 1062 q 351 1095 337 1087 q 381 1102 365 1102 q 439 1037 439 1102 m 168 1037 q 162 1001 168 1018 q 145 972 156 985 q 120 952 135 960 q 89 945 106 945 q 45 962 58 945 q 32 1010 32 978 q 38 1045 32 1029 q 55 1075 44 1062 q 80 1095 66 1087 q 110 1102 94 1102 q 168 1037 168 1102 "},"ẵ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 545 922 q 500 829 525 867 q 446 768 474 792 q 387 735 418 745 q 326 725 357 725 q 262 735 293 725 q 203 768 231 745 q 150 829 174 792 q 105 922 125 867 q 121 941 113 934 q 141 953 129 947 q 180 887 158 914 q 226 845 202 861 q 276 822 250 829 q 324 815 301 815 q 374 822 347 815 q 424 845 400 829 q 471 887 449 861 q 510 953 493 914 q 529 941 521 947 q 545 922 537 934 m 556 1129 q 527 1074 544 1101 q 490 1025 510 1047 q 444 990 469 1004 q 394 977 420 977 q 348 988 370 977 q 307 1015 327 1000 q 266 1042 286 1030 q 227 1054 246 1054 q 177 1032 200 1054 q 130 972 155 1009 l 94 985 q 123 1040 106 1013 q 160 1090 139 1068 q 205 1125 181 1111 q 256 1139 229 1139 q 305 1127 282 1139 q 348 1100 328 1115 q 387 1073 368 1085 q 421 1062 405 1062 q 472 1083 447 1062 q 520 1145 497 1105 l 556 1129 "},"ữ":{"x_min":27.515625,"x_max":851,"ha":851,"o":"m 851 707 q 840 662 851 688 q 803 608 830 637 q 733 549 777 579 q 621 491 688 519 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 683 71 l 725 55 q 676 25 699 39 q 634 1 653 11 q 599 -14 614 -8 q 576 -20 584 -20 q 537 11 552 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 20 186 -2 q 128 84 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 609 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 531 519 513 q 502 559 512 549 q 473 574 492 570 q 424 579 455 578 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 625 l 620 538 q 672 568 650 553 q 707 599 693 584 q 727 627 721 614 q 734 652 734 641 q 723 689 734 671 q 694 722 713 707 l 815 777 q 841 744 831 762 q 851 707 851 726 m 600 912 q 571 857 588 884 q 534 808 554 830 q 489 773 513 787 q 438 760 464 760 q 393 771 414 760 q 351 798 371 783 q 310 825 330 813 q 271 837 290 837 q 221 814 244 837 q 174 755 199 792 l 138 768 q 167 823 150 796 q 204 873 183 851 q 249 908 225 894 q 300 922 274 922 q 349 910 326 922 q 392 883 372 898 q 431 856 413 868 q 465 845 449 845 q 516 866 491 845 q 564 928 541 888 l 600 912 "},"ɗ":{"x_min":54,"x_max":876.25,"ha":722,"o":"m 876 964 q 866 948 876 959 q 843 927 856 938 q 814 905 829 915 q 790 891 800 896 q 761 929 775 914 q 734 951 748 943 q 710 962 721 959 q 689 966 698 966 q 652 955 667 966 q 626 919 636 944 q 611 852 616 894 q 607 749 607 811 l 607 172 q 608 131 607 148 q 611 103 609 114 q 615 84 613 91 q 622 71 618 76 q 645 67 628 64 q 703 86 663 70 l 712 56 q 657 21 681 35 q 615 -2 633 6 q 584 -16 597 -12 q 561 -21 571 -21 q 525 9 539 -21 q 506 114 510 40 q 454 58 480 83 q 402 16 429 33 q 346 -10 375 -1 q 281 -20 316 -20 q 203 2 243 -20 q 130 65 163 24 q 75 166 96 106 q 54 301 54 226 q 64 381 54 339 q 94 461 75 422 q 142 534 114 499 q 206 595 171 568 q 283 636 241 621 q 373 651 325 651 q 436 643 405 651 q 505 608 468 635 l 505 712 q 510 811 505 770 q 528 885 516 853 q 560 941 541 916 q 606 988 579 965 q 677 1035 640 1019 q 741 1051 715 1051 q 795 1039 771 1051 q 838 1013 820 1028 q 866 985 856 999 q 876 964 876 970 m 505 177 l 505 494 q 441 554 482 533 q 352 576 401 576 q 273 560 309 576 q 211 512 237 544 q 170 433 185 480 q 156 322 156 385 q 172 217 156 264 q 214 137 189 170 q 271 85 240 103 q 330 68 302 68 q 375 77 353 68 q 419 102 397 86 q 462 137 441 117 q 505 177 484 156 "},"é":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 316 710 q 295 717 304 712 q 278 729 285 722 l 436 1010 q 458 1007 444 1009 q 485 1003 471 1005 q 514 999 500 1001 q 535 994 527 996 l 550 967 l 316 710 "},"ḃ":{"x_min":6.828125,"x_max":644,"ha":705,"o":"m 644 333 q 633 253 644 294 q 604 172 623 211 q 555 97 584 133 q 491 36 527 62 q 411 -4 454 10 q 317 -20 368 -20 q 282 -14 305 -20 q 230 2 259 -8 q 166 29 200 13 q 95 65 131 45 l 95 878 q 91 926 95 910 q 78 952 88 943 q 51 963 69 960 q 6 969 34 966 l 6 996 q 92 1018 51 1007 q 171 1051 133 1029 l 178 1044 q 186 1036 182 1040 q 197 1027 191 1032 l 196 493 q 264 563 230 533 q 328 612 297 593 q 385 641 359 632 q 431 651 412 651 q 516 629 477 651 q 584 566 555 607 q 628 466 612 525 q 644 333 644 407 m 552 276 q 538 396 552 344 q 500 485 524 449 q 447 540 477 521 q 384 559 416 559 q 352 551 372 559 q 307 528 332 544 q 253 483 282 511 q 197 413 225 455 l 197 137 q 252 103 224 117 q 305 82 280 90 q 351 71 330 74 q 384 68 372 68 q 456 85 425 68 q 509 133 487 103 q 541 200 530 162 q 552 276 552 237 m 468 854 q 462 818 468 835 q 445 789 456 801 q 420 769 435 776 q 389 762 406 762 q 345 778 358 762 q 332 826 332 795 q 338 862 332 845 q 355 892 344 879 q 380 911 366 904 q 410 919 394 919 q 468 854 468 919 "},"B":{"x_min":27.5625,"x_max":689,"ha":764,"o":"m 280 818 q 261 817 270 818 q 241 817 251 817 l 241 492 l 264 492 q 389 507 341 492 q 463 546 437 522 q 499 599 490 569 q 509 658 509 629 q 497 721 509 692 q 460 772 486 750 q 389 805 433 793 q 280 818 346 818 m 352 441 q 292 437 320 441 q 241 430 265 434 l 241 70 q 247 59 241 64 q 273 53 258 55 q 304 49 288 51 q 335 47 319 48 q 364 47 350 47 q 452 59 413 47 q 520 94 491 72 q 563 148 548 116 q 578 218 578 180 q 564 294 578 255 q 524 366 551 334 q 454 420 496 399 q 352 441 411 441 m 689 241 q 666 137 689 183 q 602 57 643 90 q 504 7 561 25 q 378 -10 447 -10 q 343 -9 364 -10 q 298 -8 322 -9 q 250 -7 275 -7 q 201 -5 224 -6 q 83 0 144 -2 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 807 q 81 800 106 803 q 33 792 56 796 l 27 834 q 88 848 54 841 q 162 861 123 856 q 241 871 201 867 q 318 875 281 875 q 440 862 385 875 q 534 826 495 849 q 593 768 572 802 q 614 692 614 734 q 579 566 614 619 q 484 491 544 514 q 565 460 528 482 q 630 405 602 437 q 673 330 657 372 q 689 241 689 288 "},"…":{"x_min":89,"x_max":860.40625,"ha":929,"o":"m 250 83 q 242 39 250 59 q 223 4 235 19 q 193 -18 210 -10 q 156 -27 176 -27 q 104 -7 120 -27 q 89 48 89 12 q 96 91 89 71 q 116 127 103 111 q 146 151 129 142 q 183 160 164 160 q 233 140 216 160 q 250 83 250 120 m 555 83 q 548 39 555 59 q 528 4 541 19 q 498 -18 515 -10 q 461 -27 481 -27 q 409 -7 425 -27 q 394 48 394 12 q 401 91 394 71 q 421 127 409 111 q 452 151 434 142 q 488 160 469 160 q 538 140 522 160 q 555 83 555 120 m 860 83 q 853 39 860 59 q 833 4 846 19 q 803 -18 821 -10 q 767 -27 786 -27 q 714 -7 730 -27 q 699 48 699 12 q 706 91 699 71 q 727 127 714 111 q 757 151 740 142 q 793 160 774 160 q 843 140 827 160 q 860 83 860 120 "},"Ủ":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 573 1121 q 560 1088 573 1103 q 531 1060 548 1073 q 498 1034 514 1046 q 475 1010 482 1023 q 474 984 467 997 q 509 953 480 970 q 488 945 499 947 q 467 943 477 944 q 422 970 436 957 q 404 993 407 982 q 408 1014 401 1004 q 426 1032 414 1023 q 451 1050 437 1041 q 478 1068 466 1059 q 498 1088 490 1078 q 507 1111 507 1099 q 494 1150 507 1137 q 462 1163 481 1163 q 443 1159 452 1163 q 429 1149 435 1155 q 419 1135 422 1143 q 416 1120 416 1128 q 417 1113 416 1117 q 421 1106 419 1110 q 407 1102 416 1104 q 389 1097 399 1099 q 370 1094 379 1095 q 353 1091 360 1092 l 346 1099 l 346 1108 q 359 1139 346 1124 q 392 1167 372 1155 q 436 1188 412 1180 q 484 1196 460 1196 q 550 1175 527 1196 q 573 1121 573 1155 "},"H":{"x_min":33.65625,"x_max":861.34375,"ha":908,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 478 l 654 478 l 654 783 q 629 804 654 791 q 555 825 604 816 l 555 855 l 861 855 l 861 825 q 789 804 815 816 q 763 783 763 793 l 763 70 q 787 50 763 62 q 861 29 812 38 l 861 0 l 555 0 l 555 29 q 627 49 601 38 q 654 70 654 61 l 654 417 l 241 417 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 "},"î":{"x_min":-21.703125,"x_max":407.625,"ha":376,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 m 407 740 q 394 721 399 727 q 378 710 389 715 l 192 891 l 8 710 q 0 715 3 712 q -7 721 -4 718 q -13 729 -10 724 q -21 740 -16 734 l 157 998 l 229 998 l 407 740 "},"ư":{"x_min":27.515625,"x_max":851,"ha":851,"o":"m 851 707 q 840 662 851 688 q 803 608 830 637 q 733 549 777 579 q 621 491 688 519 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 683 71 l 725 55 q 676 25 699 39 q 634 1 653 11 q 599 -14 614 -8 q 576 -20 584 -20 q 537 11 552 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 20 186 -2 q 128 84 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 609 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 531 519 513 q 502 559 512 549 q 473 574 492 570 q 424 579 455 578 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 625 l 620 538 q 672 568 650 553 q 707 599 693 584 q 727 627 721 614 q 734 652 734 641 q 723 689 734 671 q 694 722 713 707 l 815 777 q 841 744 831 762 q 851 707 851 726 "},"−":{"x_min":41.375,"x_max":527.65625,"ha":570,"o":"m 527 402 q 518 372 524 389 q 507 344 512 355 l 58 344 l 41 360 q 50 389 44 374 q 62 419 56 405 l 511 419 l 527 402 "},"ɓ":{"x_min":95,"x_max":644,"ha":705,"o":"m 552 276 q 538 396 552 344 q 500 485 524 449 q 447 540 477 521 q 384 559 416 559 q 352 551 372 559 q 307 528 332 544 q 253 483 282 511 q 197 413 225 455 l 197 137 q 252 103 224 117 q 305 82 280 90 q 351 71 330 74 q 384 68 372 68 q 456 85 425 68 q 509 133 487 103 q 541 200 530 162 q 552 276 552 237 m 644 333 q 633 253 644 294 q 604 172 623 211 q 555 97 584 133 q 491 36 527 62 q 411 -4 454 10 q 317 -20 368 -20 q 282 -14 305 -20 q 230 2 259 -8 q 166 29 200 13 q 95 65 131 45 l 95 597 q 106 742 95 681 q 139 847 118 802 q 190 926 160 893 q 257 988 220 959 q 298 1015 275 1003 q 343 1034 321 1026 q 386 1046 366 1042 q 419 1051 406 1051 q 478 1039 449 1051 q 530 1013 507 1028 q 565 984 552 998 q 579 963 579 969 q 569 947 579 957 q 546 924 559 936 q 518 903 532 913 q 493 888 503 893 q 426 944 464 923 q 347 966 387 966 q 299 950 325 966 q 250 896 272 934 q 212 795 227 858 q 197 634 197 731 l 196 493 q 264 563 230 533 q 328 612 297 593 q 385 641 359 632 q 431 651 412 651 q 516 629 477 651 q 584 566 555 607 q 628 466 612 525 q 644 333 644 407 "},"ḧ":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 543 496 549 470 q 528 537 538 522 q 500 557 517 552 q 462 563 484 563 q 411 550 438 563 q 353 514 383 538 q 293 455 324 491 q 234 372 263 419 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 880 q 129 924 132 908 q 117 949 127 940 q 88 961 107 958 q 37 969 69 965 l 37 996 q 88 1007 65 1002 q 132 1019 112 1013 q 170 1033 152 1025 q 208 1051 189 1040 l 234 1027 l 233 463 q 298 541 262 507 q 370 600 334 576 q 440 638 406 625 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 m 594 1215 q 588 1179 594 1196 q 571 1150 582 1162 q 547 1130 561 1137 q 515 1122 532 1122 q 471 1139 485 1122 q 458 1187 458 1156 q 464 1223 458 1206 q 481 1252 470 1240 q 506 1272 492 1265 q 536 1279 520 1279 q 594 1215 594 1279 m 323 1215 q 317 1179 323 1196 q 300 1150 311 1162 q 276 1130 290 1137 q 244 1122 261 1122 q 200 1139 214 1122 q 187 1187 187 1156 q 193 1223 187 1206 q 210 1252 199 1240 q 235 1272 221 1265 q 265 1279 249 1279 q 323 1215 323 1279 "},"ā":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 561 868 q 556 851 560 861 q 549 831 553 841 q 541 812 545 822 q 535 797 537 803 l 118 797 l 103 813 q 107 830 104 821 q 115 850 111 840 q 123 869 119 859 q 130 885 127 878 l 546 885 l 561 868 "},"Ṥ":{"x_min":79.515625,"x_max":600,"ha":661,"o":"m 600 255 q 591 193 600 225 q 567 130 583 161 q 525 72 550 99 q 467 24 501 45 q 391 -7 433 4 q 298 -20 349 -20 q 249 -15 276 -20 q 195 -2 223 -10 q 140 18 167 6 q 89 46 112 30 q 81 69 84 48 q 79 116 79 89 q 81 172 79 144 q 89 219 83 201 l 116 216 q 155 147 132 176 q 207 98 179 117 q 268 70 235 79 q 336 61 301 61 q 397 73 366 61 q 452 107 428 86 q 492 158 476 129 q 508 219 508 187 q 489 290 508 261 q 441 343 471 320 q 374 385 412 366 q 297 421 336 403 q 219 460 257 440 q 152 508 181 480 q 104 570 122 535 q 86 655 86 606 q 92 701 86 676 q 111 750 98 725 q 146 797 125 774 q 198 837 168 820 q 267 864 228 854 q 356 875 307 875 q 417 870 387 875 q 475 857 448 865 q 523 837 502 849 q 557 812 545 826 q 558 796 562 808 q 544 770 553 784 q 524 743 535 756 q 505 722 513 729 l 480 726 q 440 763 461 748 q 398 789 420 779 q 356 802 377 798 q 316 807 335 807 q 251 795 278 807 q 207 766 224 783 q 182 728 190 749 q 174 687 174 706 q 192 631 174 655 q 240 585 210 606 q 308 546 270 565 q 387 508 346 528 q 465 465 427 488 q 533 412 503 442 q 581 344 563 382 q 600 255 600 306 m 249 927 q 232 938 238 931 q 219 957 227 944 l 481 1173 q 499 1162 488 1168 q 523 1148 511 1156 q 545 1134 535 1141 q 561 1122 556 1128 l 567 1092 l 249 927 m 407 1262 q 401 1226 407 1243 q 384 1197 395 1209 q 359 1177 374 1184 q 328 1170 345 1170 q 284 1186 297 1170 q 271 1235 271 1203 q 277 1270 271 1253 q 294 1300 283 1287 q 319 1319 305 1312 q 349 1327 333 1327 q 407 1262 407 1327 "},"Ĩ":{"x_min":-31.203125,"x_max":431.34375,"ha":414,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 m 431 1103 q 402 1047 419 1075 q 364 998 385 1020 q 319 963 343 977 q 268 950 295 950 q 223 961 244 950 q 181 988 202 973 q 141 1015 161 1003 q 101 1027 121 1027 q 52 1005 74 1027 q 4 945 29 982 l -31 958 q -2 1013 -18 986 q 35 1063 14 1041 q 80 1098 56 1084 q 130 1112 104 1112 q 179 1100 156 1112 q 223 1073 202 1088 q 261 1046 243 1058 q 296 1035 280 1035 q 346 1056 322 1035 q 394 1118 371 1078 l 431 1103 "},"*":{"x_min":47.46875,"x_max":573.78125,"ha":621,"o":"m 331 805 l 508 938 q 542 917 522 929 q 572 893 561 904 l 573 865 l 352 770 l 556 682 q 554 642 555 665 q 548 604 554 619 l 523 588 l 332 732 l 358 512 q 341 503 350 508 q 323 494 333 498 q 304 486 313 489 q 287 481 295 482 l 261 493 l 289 732 l 112 599 q 95 609 105 603 q 77 621 86 615 q 61 633 69 627 q 48 644 53 639 l 47 673 l 268 768 l 63 856 q 64 874 64 864 q 65 896 65 885 q 67 916 66 907 q 71 933 69 926 l 95 949 l 288 805 l 262 1026 q 279 1035 269 1030 q 298 1044 288 1040 q 318 1053 308 1049 q 335 1059 327 1056 l 359 1044 l 331 805 "},"ă":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 545 922 q 500 829 525 867 q 446 768 474 792 q 387 735 418 745 q 326 725 357 725 q 262 735 293 725 q 203 768 231 745 q 150 829 174 792 q 105 922 125 867 q 121 941 113 934 q 141 953 129 947 q 180 887 158 914 q 226 845 202 861 q 276 822 250 829 q 324 815 301 815 q 374 822 347 815 q 424 845 400 829 q 471 887 449 861 q 510 953 493 914 q 529 941 521 947 q 545 922 537 934 "},"†":{"x_min":48.078125,"x_max":615.296875,"ha":663,"o":"m 615 729 q 591 676 605 705 q 559 622 576 647 q 466 645 513 638 q 362 656 419 652 q 368 558 362 608 q 387 461 374 508 q 368 310 373 386 q 362 169 363 234 q 364 85 361 130 q 371 0 367 40 q 341 -15 358 -10 q 307 -27 324 -21 l 288 -12 q 295 80 292 32 q 298 169 298 128 q 291 311 296 236 q 272 461 286 386 q 290 558 285 508 q 297 656 295 609 q 236 651 265 654 q 180 645 208 649 q 123 635 151 641 q 65 622 95 629 l 48 651 q 72 703 57 674 q 103 757 86 732 q 195 734 149 741 q 297 724 241 726 q 287 841 295 785 q 262 948 280 898 q 316 979 288 965 q 368 1004 345 994 l 397 987 q 373 856 382 923 q 363 725 365 789 q 423 728 394 726 q 481 735 453 731 q 539 745 510 739 q 598 758 567 750 l 615 729 "},"°":{"x_min":95,"x_max":402,"ha":497,"o":"m 328 674 q 322 712 328 694 q 308 744 317 730 q 286 766 299 758 q 256 775 272 775 q 224 768 239 775 q 196 748 208 761 q 177 717 184 735 q 170 677 170 699 q 174 639 170 657 q 188 607 179 621 q 210 585 197 594 q 240 577 224 577 q 272 583 257 577 q 300 602 288 589 q 320 633 313 615 q 328 674 328 651 m 402 709 q 385 631 402 667 q 343 570 369 596 q 286 529 317 544 q 223 515 254 515 q 171 525 195 515 q 130 553 147 535 q 104 593 113 570 q 95 643 95 616 q 110 720 95 685 q 152 782 126 756 q 210 823 178 808 q 273 838 242 838 q 323 827 300 838 q 364 799 347 816 q 391 758 381 781 q 402 709 402 734 "},"Ʌ":{"x_min":13.5625,"x_max":874.90625,"ha":903,"o":"m 13 29 q 85 46 59 37 q 118 73 111 54 l 378 814 q 397 840 383 829 q 425 857 410 850 q 456 868 441 864 q 480 875 471 872 l 778 73 q 808 45 785 56 q 874 29 832 34 l 874 0 l 579 0 l 579 29 q 654 43 634 33 q 666 72 674 52 l 427 716 l 199 73 q 216 45 191 54 q 295 29 240 35 l 295 0 l 13 0 l 13 29 "},"ồ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 577 740 q 564 721 569 727 q 548 710 559 715 l 362 891 l 178 710 q 169 715 172 712 q 162 721 165 718 q 155 729 159 724 q 147 740 152 734 l 326 998 l 399 998 l 577 740 m 440 1036 q 422 1023 431 1028 q 402 1015 413 1018 l 163 1271 l 178 1298 q 198 1303 185 1300 q 226 1308 211 1305 q 255 1312 240 1311 q 277 1315 269 1314 l 440 1036 "},"ŵ":{"x_min":13.5625,"x_max":966.46875,"ha":981,"o":"m 966 601 q 933 592 945 597 q 913 583 921 588 q 903 573 906 579 q 898 559 900 567 l 748 40 q 732 14 744 25 q 706 -2 720 4 q 678 -13 692 -9 q 655 -20 664 -17 l 494 439 l 355 40 q 338 14 349 24 q 314 -3 327 3 q 287 -14 300 -10 q 265 -20 274 -17 l 87 559 q 13 601 81 586 l 13 631 l 275 631 l 275 601 q 223 594 242 598 q 197 583 205 589 q 188 572 189 578 q 190 559 188 565 l 318 129 l 484 631 l 531 631 l 708 129 l 825 559 q 811 584 829 575 q 746 601 792 594 l 746 631 l 966 631 l 966 601 m 723 740 q 710 721 714 727 q 693 710 705 715 l 508 891 l 324 710 q 315 715 318 712 q 308 721 311 718 q 301 729 305 724 q 293 740 298 734 l 472 998 l 545 998 l 723 740 "},"ǽ":{"x_min":54,"x_max":907,"ha":961,"o":"m 907 378 q 873 352 893 364 q 831 332 852 340 l 526 332 q 525 308 525 320 l 525 283 q 535 206 525 244 q 566 137 546 168 q 616 88 586 107 q 683 70 645 70 q 724 72 704 70 q 765 83 743 74 q 813 111 787 93 q 876 160 840 129 q 891 147 885 156 q 901 133 898 138 q 826 54 860 84 q 762 7 792 24 q 701 -14 731 -8 q 640 -20 672 -20 q 581 -10 610 -20 q 527 17 552 -1 q 481 61 502 35 q 446 121 460 87 q 383 59 417 86 q 314 15 348 33 q 250 -11 280 -2 q 198 -20 219 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 69 203 54 166 q 117 272 85 240 q 198 330 149 304 q 314 375 247 356 q 364 385 336 381 q 423 391 393 388 l 423 449 q 418 499 423 475 q 403 542 414 524 q 371 571 391 560 q 317 583 350 583 q 270 573 295 583 q 226 546 245 563 q 197 506 207 528 q 198 458 188 483 q 185 444 200 452 q 151 431 171 437 q 111 421 131 424 q 83 420 91 418 l 73 445 q 93 497 77 471 q 134 546 109 523 q 188 588 158 568 q 249 621 218 607 q 310 643 280 635 q 363 651 340 651 q 457 626 423 651 q 508 553 492 602 q 554 599 529 580 q 603 629 578 618 q 651 645 628 640 q 694 651 675 651 q 767 639 736 651 q 823 607 799 627 q 862 560 846 587 q 889 503 879 533 q 902 440 898 472 q 907 378 907 408 m 432 165 q 425 205 427 184 q 423 247 423 225 l 423 329 q 382 325 400 327 q 356 320 365 323 q 209 253 254 295 q 165 155 165 211 q 173 111 165 128 q 192 85 181 95 q 217 72 204 75 q 238 68 229 68 q 280 74 256 68 q 328 92 303 80 q 380 122 354 104 q 432 165 407 141 m 674 583 q 638 575 658 583 q 597 547 617 568 q 558 489 576 526 q 532 394 540 452 l 768 394 q 788 399 782 394 q 794 418 794 404 q 787 480 794 450 q 766 532 780 510 q 729 569 751 555 q 674 583 706 583 m 471 710 q 449 717 459 712 q 432 729 440 722 l 591 1010 q 612 1007 599 1009 q 640 1003 626 1005 q 668 999 655 1001 q 689 994 682 996 l 705 967 l 471 710 "},"Ḱ":{"x_min":33.65625,"x_max":796.46875,"ha":803,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 438 l 518 765 q 538 794 534 783 q 535 811 542 805 q 511 820 528 817 q 468 825 494 823 l 468 855 l 753 855 l 753 825 q 714 820 731 823 q 683 813 697 817 q 659 802 670 808 q 637 783 647 795 l 340 455 l 668 85 q 694 64 680 72 q 724 54 708 57 q 757 51 740 51 q 791 53 774 51 l 796 24 q 716 0 756 11 q 643 -10 675 -10 q 608 -3 623 -10 q 579 19 593 2 l 241 433 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 310 927 q 294 938 299 931 q 280 957 288 944 l 542 1173 q 560 1162 549 1168 q 584 1148 572 1156 q 607 1134 596 1141 q 622 1122 617 1128 l 628 1092 l 310 927 "},"Õ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 648 1103 q 619 1047 636 1075 q 581 998 602 1020 q 536 963 560 977 q 485 950 512 950 q 440 961 461 950 q 398 988 419 973 q 358 1015 378 1003 q 318 1027 338 1027 q 269 1005 291 1027 q 221 945 246 982 l 185 958 q 214 1013 198 986 q 252 1063 231 1041 q 297 1098 273 1084 q 347 1112 321 1112 q 396 1100 373 1112 q 440 1073 419 1088 q 478 1046 460 1058 q 513 1035 497 1035 q 563 1056 539 1035 q 611 1118 588 1078 l 648 1103 "},"ẏ":{"x_min":-31.875,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 369 -55 q 306 -184 341 -130 q 233 -272 271 -237 q 158 -322 196 -306 q 86 -339 120 -339 q 38 -335 60 -339 q 1 -327 16 -332 q -23 -315 -14 -322 q -31 -303 -31 -309 q -23 -286 -31 -298 q -3 -259 -15 -274 q 22 -231 8 -245 q 47 -211 36 -218 q 112 -231 80 -230 q 169 -223 144 -233 q 198 -204 181 -219 q 230 -168 214 -189 q 263 -118 247 -146 q 291 -62 279 -91 l 311 -15 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 123 l 522 555 q 523 573 525 565 q 511 585 520 580 q 485 594 502 590 q 444 601 469 597 l 444 631 l 670 631 l 670 601 m 427 854 q 421 818 427 835 q 404 789 415 801 q 380 769 394 776 q 348 762 365 762 q 305 778 318 762 q 291 826 291 795 q 297 862 291 845 q 314 892 303 879 q 339 911 325 904 q 369 919 353 919 q 427 854 427 919 "},"꞊":{"x_min":40.6875,"x_max":418.46875,"ha":459,"o":"m 418 247 q 408 215 415 232 q 398 186 402 198 l 57 186 l 40 204 q 49 234 44 217 q 61 264 55 250 l 401 264 l 418 247 m 418 422 q 408 391 415 409 l 398 363 l 57 363 l 40 380 q 49 410 44 393 q 61 440 55 427 l 401 440 l 418 422 "},"ḵ":{"x_min":37.046875,"x_max":694.515625,"ha":695,"o":"m 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 878 q 128 926 132 909 q 114 952 124 943 q 84 963 103 960 q 37 969 66 966 l 37 996 q 129 1018 83 1006 q 208 1051 174 1031 l 234 1027 l 234 359 l 442 542 q 470 573 465 561 q 468 591 474 585 q 446 599 461 597 q 413 601 431 601 l 413 631 l 670 631 l 670 601 q 615 590 640 598 q 562 559 590 582 l 330 374 l 586 75 q 605 57 595 64 q 628 45 615 50 q 655 40 640 41 q 690 41 670 39 l 694 12 q 655 3 674 7 q 619 -1 636 0 q 589 -5 602 -4 q 569 -7 576 -7 q 523 1 541 -7 q 491 28 506 9 l 234 353 l 234 70 q 236 61 234 65 q 246 52 238 56 q 268 42 253 48 q 308 29 283 37 l 308 0 l 37 0 m 594 -155 q 590 -172 593 -162 q 582 -192 586 -182 q 574 -211 578 -201 q 568 -227 571 -220 l 151 -227 l 136 -210 q 141 -193 137 -202 q 148 -173 144 -183 q 156 -154 152 -164 q 164 -139 160 -145 l 579 -139 l 594 -155 "},"5":{"x_min":52.421875,"x_max":567,"ha":652,"o":"m 567 278 q 548 165 567 219 q 496 70 530 111 q 411 4 462 28 q 297 -20 361 -20 q 173 3 234 -20 q 52 81 111 26 l 76 126 q 141 86 112 101 q 196 62 171 71 q 242 51 221 54 q 283 48 263 48 q 359 64 327 48 q 414 109 392 81 q 447 174 436 138 q 458 248 458 210 q 446 332 458 294 q 412 397 435 370 q 355 439 390 424 q 272 454 320 454 q 240 450 258 454 q 201 440 221 447 q 161 423 181 433 q 124 399 141 413 l 92 422 q 101 478 96 446 q 113 546 107 511 q 124 620 118 582 q 135 693 130 658 q 143 761 139 729 q 148 817 146 793 l 443 817 q 478 818 463 817 q 504 823 493 820 q 526 829 516 825 l 545 809 q 528 786 538 798 q 508 764 518 774 q 488 744 498 753 q 470 729 478 735 l 207 729 q 202 678 206 709 q 195 615 199 647 q 186 554 190 583 q 178 511 181 526 q 242 524 205 519 q 313 529 278 529 q 422 508 375 529 q 501 453 469 487 q 550 373 533 418 q 567 278 567 327 "},"o":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 "},"̆":{"x_min":-569.703125,"x_max":-128.859375,"ha":0,"o":"m -128 922 q -174 829 -149 867 q -228 768 -200 792 q -286 735 -256 745 q -347 725 -317 725 q -412 735 -381 725 q -471 768 -443 745 q -524 829 -499 792 q -569 922 -549 867 q -553 941 -561 934 q -533 953 -545 947 q -494 887 -516 914 q -448 845 -472 861 q -398 822 -423 829 q -350 815 -373 815 q -300 822 -326 815 q -249 845 -274 829 q -203 887 -225 861 q -164 953 -181 914 q -145 941 -153 947 q -128 922 -137 934 "},"Ẍ":{"x_min":21.03125,"x_max":833.53125,"ha":855,"o":"m 527 0 l 527 29 q 575 36 557 31 q 602 46 594 40 q 609 62 610 53 q 598 86 608 72 l 409 363 l 238 86 q 241 44 219 56 q 326 29 263 33 l 326 0 l 21 0 l 21 29 q 96 44 65 32 q 144 86 127 57 l 359 437 l 133 768 q 113 793 123 783 q 92 809 104 802 q 65 818 80 815 q 27 826 50 822 l 27 855 l 333 855 l 333 826 q 258 809 276 820 q 261 768 240 798 l 428 522 l 581 768 q 590 794 591 784 q 577 810 588 804 q 544 820 565 817 q 493 826 523 823 l 493 855 l 800 855 l 800 826 q 756 819 775 823 q 722 809 737 815 q 696 793 707 802 q 676 768 685 783 l 478 449 l 726 86 q 747 61 736 71 q 770 45 757 52 q 798 35 782 39 q 833 29 813 31 l 833 0 l 527 0 m 630 1045 q 624 1009 630 1026 q 607 980 618 992 q 582 960 597 967 q 551 953 568 953 q 507 969 521 953 q 494 1018 494 986 q 500 1053 494 1036 q 517 1083 506 1070 q 542 1102 528 1095 q 572 1110 556 1110 q 630 1045 630 1110 m 359 1045 q 353 1009 359 1026 q 336 980 347 992 q 311 960 326 967 q 280 953 297 953 q 236 969 250 953 q 223 1018 223 986 q 229 1053 223 1036 q 246 1083 235 1070 q 271 1102 257 1095 q 301 1110 285 1110 q 359 1045 359 1110 "},"Ǐ":{"x_min":-14.921875,"x_max":414.40625,"ha":414,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 m 236 943 l 164 943 l -14 1151 q -6 1162 -10 1157 q 0 1170 -3 1167 q 6 1176 2 1174 q 15 1183 10 1179 l 202 1039 l 385 1183 q 401 1170 396 1176 q 414 1151 406 1164 l 236 943 "},"̧":{"x_min":-460.21875,"x_max":-236,"ha":0,"o":"m -236 -155 q -247 -203 -236 -180 q -285 -245 -259 -226 q -349 -278 -310 -264 q -445 -301 -389 -292 l -460 -267 q -400 -252 -424 -261 q -359 -232 -375 -243 q -337 -209 -344 -221 q -330 -186 -330 -197 q -347 -154 -330 -163 q -407 -141 -365 -145 q -400 -122 -405 -139 q -385 -77 -395 -108 q -357 10 -376 -47 l -304 8 l -331 -70 q -296 -80 -313 -74 q -265 -97 -278 -87 q -244 -121 -252 -107 q -236 -155 -236 -136 "},"d":{"x_min":54,"x_max":712.796875,"ha":722,"o":"m 712 57 q 657 21 681 36 q 615 -2 633 7 q 584 -15 597 -11 q 561 -20 571 -20 q 525 10 539 -20 q 506 114 510 41 q 454 58 480 83 q 402 16 429 33 q 346 -10 375 -1 q 281 -20 316 -20 q 203 2 243 -20 q 130 65 163 24 q 75 166 96 106 q 54 301 54 226 q 64 381 54 339 q 94 461 75 422 q 142 534 114 499 q 206 595 171 568 q 283 636 241 621 q 373 651 325 651 q 436 643 405 651 q 505 608 468 635 l 505 863 q 502 923 505 901 q 491 957 500 945 q 462 973 481 968 q 406 980 442 977 l 406 1006 q 506 1026 462 1014 q 585 1051 550 1039 l 607 1030 l 607 172 q 608 131 607 148 q 611 103 609 114 q 615 84 613 91 q 622 72 618 76 q 645 67 628 64 q 703 86 663 70 l 712 57 m 505 177 l 505 494 q 441 554 482 533 q 352 576 401 576 q 273 560 309 576 q 211 512 237 544 q 170 433 185 480 q 156 322 156 385 q 172 217 156 264 q 214 137 189 170 q 271 85 240 103 q 330 68 302 68 q 375 77 353 68 q 419 102 397 86 q 462 137 441 117 q 505 177 484 156 "},",":{"x_min":59.40625,"x_max":264,"ha":318,"o":"m 264 47 q 253 -12 264 20 q 223 -80 243 -45 q 175 -147 203 -114 q 112 -207 147 -180 l 81 -183 q 114 -141 100 -161 q 136 -99 127 -120 q 148 -53 144 -77 q 153 0 153 -29 q 133 47 153 29 q 70 62 113 64 l 59 94 q 85 112 65 102 q 128 133 104 123 q 174 149 151 142 q 209 155 197 155 q 252 112 241 139 q 264 47 264 86 "},"Ꞌ":{"x_min":91.5625,"x_max":242.125,"ha":347,"o":"m 202 477 q 189 471 197 474 q 172 467 181 469 q 154 464 164 465 q 137 463 145 463 l 91 1031 q 115 1042 99 1036 q 149 1055 131 1048 q 182 1065 166 1061 q 206 1072 198 1070 l 242 1054 l 202 477 "},"\"":{"x_min":108.515625,"x_max":482.21875,"ha":590,"o":"m 209 565 q 196 559 204 562 q 179 555 188 557 q 161 552 170 553 q 144 551 152 551 l 108 967 q 130 977 115 971 q 159 988 144 982 q 188 998 174 993 q 209 1004 202 1002 l 238 989 l 209 565 m 453 565 q 439 559 447 562 q 422 555 432 557 q 404 552 413 553 q 387 551 395 551 l 351 967 q 372 977 358 971 q 402 988 386 982 q 431 998 417 993 q 453 1004 445 1002 l 482 989 l 453 565 "},"ė":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 414 854 q 408 818 414 835 q 391 789 401 801 q 366 769 380 776 q 335 762 352 762 q 291 778 304 762 q 278 826 278 795 q 284 862 278 845 q 301 892 290 879 q 326 911 312 904 q 356 919 340 919 q 414 854 414 919 "},"ề":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 560 740 q 547 721 552 727 q 531 710 542 715 l 345 891 l 161 710 q 152 715 155 712 q 145 721 148 718 q 139 729 142 724 q 130 740 135 734 l 309 998 l 382 998 l 560 740 m 423 1036 q 405 1023 414 1028 q 385 1015 396 1018 l 146 1271 l 161 1298 q 181 1303 168 1300 q 209 1308 194 1305 q 238 1312 223 1311 q 260 1315 252 1314 l 423 1036 "},"Í":{"x_min":47.65625,"x_max":428.625,"ha":414,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 m 110 927 q 93 938 99 931 q 80 957 88 944 l 342 1173 q 360 1162 349 1168 q 384 1148 372 1156 q 406 1134 396 1141 q 422 1122 417 1128 l 428 1092 l 110 927 "},"Ú":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 369 927 q 353 938 358 931 q 339 957 347 944 l 601 1173 q 619 1162 608 1168 q 643 1148 631 1156 q 666 1134 655 1141 q 681 1122 676 1128 l 687 1092 l 369 927 "},"Ơ":{"x_min":48,"x_max":828,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 410 797 448 797 q 301 771 349 797 q 221 698 254 746 q 170 584 188 651 q 153 434 153 517 q 173 290 153 358 q 229 171 194 223 q 310 90 264 120 q 410 61 357 61 q 513 84 466 61 q 594 153 560 107 q 648 268 629 200 q 667 426 667 337 m 828 944 q 820 906 828 927 q 794 861 812 885 q 745 812 776 837 q 667 761 714 786 q 745 614 719 698 q 772 439 772 529 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 390 -20 467 -20 q 245 15 309 -20 q 137 112 181 51 q 71 251 94 172 q 48 415 48 329 q 77 590 48 507 q 159 737 107 674 q 280 837 210 800 q 429 875 349 875 q 542 853 492 875 q 634 796 593 832 q 693 846 675 821 q 711 889 711 871 q 700 926 711 908 q 671 959 690 944 l 792 1014 q 818 981 808 999 q 828 944 828 963 "},"Ŷ":{"x_min":-0.390625,"x_max":797.6875,"ha":825,"o":"m 243 0 l 243 29 q 330 55 305 42 q 355 78 355 68 l 355 364 q 298 478 329 419 q 232 594 266 538 q 168 699 199 651 q 113 780 137 748 q 99 794 107 788 q 79 806 91 801 q 49 814 67 811 q 2 818 30 818 l 0 847 q 79 856 39 852 q 148 861 119 861 q 201 834 179 861 q 255 757 226 802 q 313 663 284 713 q 370 562 342 614 q 422 461 398 509 l 604 780 q 597 808 614 797 q 529 825 581 818 l 529 855 l 797 855 l 797 825 q 726 807 750 816 q 691 780 701 797 l 464 366 l 464 77 q 469 68 464 73 q 488 55 475 62 q 523 42 501 48 q 576 29 544 35 l 576 0 l 243 0 m 623 957 q 611 938 615 944 q 594 927 606 932 l 408 1068 l 225 927 q 216 932 219 929 q 209 938 212 935 q 202 946 206 941 q 194 957 199 951 l 373 1167 l 446 1167 l 623 957 "},"Ẇ":{"x_min":13.5625,"x_max":1154.328125,"ha":1181,"o":"m 1154 825 q 1104 814 1124 819 q 1073 803 1085 808 q 1057 793 1062 798 q 1051 783 1051 789 l 895 40 q 881 15 892 26 q 855 -2 870 5 q 826 -13 841 -9 q 801 -20 811 -17 l 580 640 l 385 40 q 369 15 381 26 q 343 -1 358 5 q 313 -12 328 -8 q 283 -20 297 -17 l 107 778 q 82 806 103 795 q 13 825 61 817 l 13 855 l 304 855 l 304 825 q 252 817 271 822 q 223 806 233 812 q 212 792 214 800 q 212 778 210 785 l 347 169 l 567 855 l 604 855 l 844 169 l 971 783 q 965 798 972 791 q 943 808 957 804 q 909 817 929 813 q 866 825 889 821 l 866 855 l 1154 855 l 1154 825 m 652 1045 q 646 1009 652 1026 q 629 980 640 992 q 604 960 618 967 q 573 953 590 953 q 529 969 542 953 q 516 1018 516 986 q 522 1053 516 1036 q 539 1083 528 1070 q 564 1102 550 1095 q 594 1110 578 1110 q 652 1045 652 1110 "},"Ự":{"x_min":33.65625,"x_max":950.125,"ha":950,"o":"m 950 944 q 941 904 950 927 q 912 856 933 881 q 855 802 891 830 q 767 749 820 775 l 767 355 q 745 196 767 266 q 682 79 723 127 q 583 5 642 30 q 451 -20 525 -20 q 323 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 376 76 332 95 q 478 58 420 58 q 564 81 526 58 q 627 142 601 104 q 665 229 652 180 q 679 327 679 277 l 679 783 q 654 804 679 791 q 580 825 629 816 l 580 855 l 821 855 q 833 889 833 873 q 823 926 833 909 q 794 959 813 944 l 914 1014 q 940 981 930 999 q 950 944 950 963 m 527 -189 q 521 -225 527 -208 q 504 -254 515 -242 q 479 -274 494 -267 q 448 -282 465 -282 q 404 -265 417 -282 q 391 -217 391 -248 q 397 -181 391 -198 q 414 -151 403 -164 q 439 -132 425 -139 q 469 -125 453 -125 q 527 -189 527 -125 "},"Ý":{"x_min":-0.390625,"x_max":797.6875,"ha":825,"o":"m 243 0 l 243 29 q 330 55 305 42 q 355 78 355 68 l 355 364 q 298 478 329 419 q 232 594 266 538 q 168 699 199 651 q 113 780 137 748 q 99 794 107 788 q 79 806 91 801 q 49 814 67 811 q 2 818 30 818 l 0 847 q 79 856 39 852 q 148 861 119 861 q 201 834 179 861 q 255 757 226 802 q 313 663 284 713 q 370 562 342 614 q 422 461 398 509 l 604 780 q 597 808 614 797 q 529 825 581 818 l 529 855 l 797 855 l 797 825 q 726 807 750 816 q 691 780 701 797 l 464 366 l 464 77 q 469 68 464 73 q 488 55 475 62 q 523 42 501 48 q 576 29 544 35 l 576 0 l 243 0 m 320 927 q 303 938 308 931 q 289 957 298 944 l 552 1173 q 570 1162 558 1168 q 594 1148 581 1156 q 616 1134 606 1141 q 632 1122 626 1128 l 638 1092 l 320 927 "},"ŝ":{"x_min":54.25,"x_max":483.578125,"ha":536,"o":"m 474 192 q 460 109 474 144 q 425 51 446 75 q 377 13 403 28 q 325 -7 350 0 q 276 -17 299 -15 q 241 -20 254 -20 q 163 -7 208 -20 q 72 29 117 4 q 65 51 67 31 q 64 97 63 71 q 68 150 65 123 q 77 192 72 176 l 106 185 q 120 131 107 156 q 157 88 134 106 q 209 58 179 69 q 275 48 239 48 q 319 55 299 48 q 354 77 340 63 q 377 111 369 91 q 386 154 386 130 q 371 202 386 181 q 333 240 356 223 q 279 273 309 258 q 218 304 249 288 q 163 335 189 319 q 116 371 137 351 q 83 417 96 392 q 71 474 71 442 q 87 549 71 516 q 132 604 104 582 q 196 639 160 627 q 271 651 233 651 q 317 647 292 651 q 367 636 343 643 q 414 620 392 629 q 449 598 435 611 q 450 580 453 594 q 440 549 447 566 q 426 517 434 532 q 415 497 419 502 l 389 502 q 321 570 356 551 q 254 590 287 590 q 214 582 231 590 q 184 563 196 575 q 165 537 171 551 q 159 508 159 522 q 171 469 159 486 q 205 437 184 452 q 253 408 226 421 q 308 379 280 394 q 367 347 337 364 q 420 308 396 330 q 459 258 444 286 q 474 192 474 230 m 483 740 q 470 721 475 727 q 454 710 465 715 l 268 891 l 84 710 q 75 715 79 712 q 68 721 71 718 q 62 729 65 724 q 54 740 59 734 l 233 998 l 305 998 l 483 740 "},"ǧ":{"x_min":20,"x_max":670.8125,"ha":678,"o":"m 468 406 q 456 474 468 442 q 420 531 444 507 q 362 569 397 555 q 282 583 327 583 q 244 574 265 583 q 205 548 224 565 q 175 505 187 531 q 163 446 163 479 q 174 378 163 410 q 208 322 185 346 q 265 284 230 298 q 348 271 300 271 q 389 279 368 271 q 428 305 411 287 q 456 347 445 322 q 468 406 468 372 m 351 -2 q 303 3 325 0 q 263 10 282 6 q 186 -36 214 -15 q 143 -74 157 -57 q 125 -104 129 -90 q 122 -128 122 -118 q 140 -182 122 -157 q 191 -226 159 -208 q 265 -256 223 -245 q 353 -268 307 -268 q 436 -255 399 -268 q 500 -222 473 -243 q 541 -171 526 -200 q 556 -106 556 -141 q 547 -71 556 -87 q 515 -42 538 -55 q 452 -19 492 -29 q 351 -2 412 -9 m 563 434 q 539 339 563 382 q 478 265 516 296 q 392 217 440 234 q 294 200 343 200 l 291 200 q 246 154 259 172 q 234 132 234 136 q 241 116 234 124 q 268 102 248 109 q 321 87 287 94 q 408 74 355 80 q 530 50 482 66 q 607 12 578 33 q 646 -33 635 -8 q 658 -81 658 -57 q 643 -152 658 -118 q 605 -214 629 -185 q 547 -265 580 -242 q 476 -305 514 -288 q 397 -330 438 -321 q 316 -339 356 -339 q 250 -334 284 -339 q 183 -320 216 -330 q 120 -296 150 -311 q 68 -261 91 -282 q 33 -214 46 -240 q 20 -155 20 -188 q 26 -118 20 -137 q 52 -76 32 -98 q 107 -28 72 -54 q 201 28 142 -2 q 140 63 157 44 q 123 103 123 83 q 126 118 123 109 q 140 140 129 127 q 170 170 150 153 q 220 209 189 187 q 158 236 186 218 q 110 280 130 254 q 79 337 90 305 q 68 408 68 370 q 90 502 68 457 q 149 579 112 546 q 232 631 185 612 q 329 651 279 651 q 405 639 369 651 q 470 606 440 627 q 533 615 505 610 q 585 627 562 621 q 625 639 607 633 q 657 651 643 645 l 670 630 q 655 595 662 611 q 632 562 647 579 q 581 555 606 558 q 525 551 556 552 q 553 496 543 525 q 563 434 563 467 m 375 726 l 303 726 l 124 968 q 132 979 128 974 q 138 987 135 984 q 145 993 141 991 q 154 1000 149 996 l 341 829 l 524 1000 q 540 987 535 993 q 553 968 545 981 l 375 726 "},"ȫ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 566 854 q 560 818 566 835 q 543 789 553 801 q 518 769 532 776 q 487 762 504 762 q 443 778 456 762 q 430 826 430 795 q 436 862 430 845 q 453 892 442 879 q 478 911 464 904 q 508 919 492 919 q 566 854 566 919 m 295 854 q 289 818 295 835 q 272 789 282 801 q 247 769 261 776 q 216 762 233 762 q 172 778 185 762 q 159 826 159 795 q 165 862 159 845 q 182 892 171 879 q 207 911 193 904 q 237 919 221 919 q 295 854 295 919 m 598 1112 q 594 1095 597 1105 q 586 1076 590 1085 q 578 1056 582 1066 q 572 1041 575 1047 l 155 1041 l 140 1058 q 145 1075 141 1065 q 152 1094 148 1084 q 160 1113 156 1104 q 168 1129 164 1122 l 583 1129 l 598 1112 "},"ṕ":{"x_min":37.046875,"x_max":682,"ha":736,"o":"m 590 288 q 576 398 590 347 q 539 486 562 449 q 485 544 516 523 q 422 566 455 566 q 390 558 410 566 q 345 533 370 551 q 292 486 320 515 q 234 413 263 456 l 234 144 q 290 106 264 121 q 339 83 316 91 q 382 71 362 74 q 421 68 402 68 q 488 82 457 68 q 541 124 519 96 q 577 193 564 152 q 590 288 590 234 m 682 333 q 671 253 682 294 q 643 172 661 211 q 601 97 626 133 q 548 36 577 62 q 487 -4 519 10 q 422 -20 455 -20 q 332 2 382 -20 q 234 66 282 24 l 234 -254 q 259 -276 234 -265 q 348 -296 284 -287 l 348 -326 l 37 -326 l 37 -296 q 106 -276 81 -286 q 132 -254 132 -266 l 132 481 q 129 522 132 506 q 116 549 126 539 q 88 563 106 558 q 37 569 69 567 l 37 596 q 81 606 60 601 q 121 619 102 612 q 160 633 141 625 q 200 651 180 641 l 223 627 l 230 492 q 298 563 263 533 q 363 612 332 593 q 421 641 394 632 q 468 651 448 651 q 553 629 514 651 q 621 566 593 607 q 666 466 650 525 q 682 333 682 407 m 329 710 q 307 717 317 712 q 290 729 298 722 l 449 1010 q 471 1007 457 1009 q 498 1003 484 1005 q 526 999 513 1001 q 548 994 540 996 l 563 967 l 329 710 "},"Ắ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 626 1139 q 580 1046 606 1084 q 527 985 555 1009 q 468 952 499 962 q 407 942 438 942 q 343 952 374 942 q 283 985 311 962 q 230 1046 255 1009 q 185 1139 206 1084 q 202 1158 193 1151 q 221 1170 210 1164 q 260 1104 238 1131 q 307 1062 282 1078 q 357 1039 331 1046 q 404 1032 382 1032 q 454 1039 428 1032 q 505 1062 480 1046 q 552 1104 530 1078 q 590 1170 574 1131 q 610 1158 602 1164 q 626 1139 618 1151 m 316 1144 q 300 1155 305 1148 q 286 1174 295 1161 l 548 1390 q 567 1379 555 1385 q 590 1365 578 1373 q 613 1352 602 1358 q 628 1339 623 1345 l 634 1309 l 316 1144 "},"ã":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 556 912 q 527 857 544 884 q 490 808 510 830 q 444 773 469 787 q 394 760 420 760 q 348 771 370 760 q 307 798 327 783 q 266 825 286 813 q 227 837 246 837 q 177 814 200 837 q 130 755 155 792 l 94 768 q 123 823 106 796 q 160 873 139 851 q 205 908 181 894 q 256 922 229 922 q 305 910 282 922 q 348 883 328 898 q 387 856 368 868 q 421 845 405 845 q 472 866 447 845 q 520 928 497 888 l 556 912 "},"Ɗ":{"x_min":20,"x_max":917,"ha":979,"o":"m 680 748 q 629 781 655 767 q 570 802 603 794 q 495 814 537 810 q 397 818 453 818 l 397 104 q 403 80 397 89 q 440 62 413 68 q 520 57 467 57 q 616 79 566 57 q 707 148 666 102 q 775 265 749 195 q 802 432 802 336 q 795 523 802 478 q 773 609 788 568 q 735 686 758 650 q 680 748 712 721 m 20 680 q 51 769 20 732 q 138 829 82 806 q 273 863 194 852 q 445 875 351 875 q 544 871 500 875 q 623 861 588 868 q 688 842 659 853 q 742 815 716 831 q 824 745 790 784 q 878 660 857 706 q 907 564 898 615 q 917 458 917 512 q 899 306 917 373 q 853 188 882 240 q 785 102 824 137 q 704 43 747 66 q 618 10 662 21 q 534 0 574 0 l 189 0 l 189 29 q 261 49 235 38 q 288 70 288 61 l 288 813 q 169 774 207 802 q 131 703 131 746 q 143 659 131 678 q 177 631 156 640 q 165 619 175 627 q 139 604 154 612 q 108 590 124 597 q 77 581 91 583 q 36 617 52 591 q 20 680 20 643 "},"æ":{"x_min":54,"x_max":907,"ha":961,"o":"m 907 378 q 873 352 893 364 q 831 332 852 340 l 526 332 q 525 308 525 320 l 525 283 q 535 206 525 244 q 566 137 546 168 q 616 88 586 107 q 683 70 645 70 q 724 72 704 70 q 765 83 743 74 q 813 111 787 93 q 876 160 840 129 q 891 147 885 156 q 901 133 898 138 q 826 54 860 84 q 762 7 792 24 q 701 -14 731 -8 q 640 -20 672 -20 q 581 -10 610 -20 q 527 17 552 -1 q 481 61 502 35 q 446 121 460 87 q 383 59 417 86 q 314 15 348 33 q 250 -11 280 -2 q 198 -20 219 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 69 203 54 166 q 117 272 85 240 q 198 330 149 304 q 314 375 247 356 q 364 385 336 381 q 423 391 393 388 l 423 449 q 418 499 423 475 q 403 542 414 524 q 371 571 391 560 q 317 583 350 583 q 270 573 295 583 q 226 546 245 563 q 197 506 207 528 q 198 458 188 483 q 185 444 200 452 q 151 431 171 437 q 111 421 131 424 q 83 420 91 418 l 73 445 q 93 497 77 471 q 134 546 109 523 q 188 588 158 568 q 249 621 218 607 q 310 643 280 635 q 363 651 340 651 q 457 626 423 651 q 508 553 492 602 q 554 599 529 580 q 603 629 578 618 q 651 645 628 640 q 694 651 675 651 q 767 639 736 651 q 823 607 799 627 q 862 560 846 587 q 889 503 879 533 q 902 440 898 472 q 907 378 907 408 m 432 165 q 425 205 427 184 q 423 247 423 225 l 423 329 q 382 325 400 327 q 356 320 365 323 q 209 253 254 295 q 165 155 165 211 q 173 111 165 128 q 192 85 181 95 q 217 72 204 75 q 238 68 229 68 q 280 74 256 68 q 328 92 303 80 q 380 122 354 104 q 432 165 407 141 m 674 583 q 638 575 658 583 q 597 547 617 568 q 558 489 576 526 q 532 394 540 452 l 768 394 q 788 399 782 394 q 794 418 794 404 q 787 480 794 450 q 766 532 780 510 q 729 569 751 555 q 674 583 706 583 "},"ĩ":{"x_min":-37.984375,"x_max":424.5625,"ha":376,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 m 424 912 q 395 857 412 884 q 357 808 378 830 q 312 773 337 787 q 261 760 288 760 q 216 771 238 760 q 174 798 195 783 q 134 825 154 813 q 94 837 114 837 q 45 814 67 837 q -2 755 23 792 l -37 768 q -9 823 -25 796 q 28 873 7 851 q 73 908 49 894 q 124 922 97 922 q 172 910 149 922 q 216 883 196 898 q 255 856 236 868 q 289 845 273 845 q 340 866 315 845 q 387 928 364 888 l 424 912 "},"~":{"x_min":33.234375,"x_max":644.3125,"ha":678,"o":"m 644 525 q 608 456 630 492 q 559 391 586 421 q 502 343 533 362 q 438 324 471 324 q 378 341 410 324 q 313 378 346 358 q 248 415 280 398 q 187 433 216 433 q 125 406 153 433 q 69 322 97 379 l 33 340 q 69 409 47 373 q 118 475 91 445 q 175 523 145 504 q 238 543 206 543 q 302 525 269 543 q 367 488 335 508 q 431 451 400 468 q 489 434 461 434 q 550 460 521 434 q 608 542 579 486 l 644 525 "},"Ċ":{"x_min":48,"x_max":690.84375,"ha":745,"o":"m 690 143 q 607 65 647 96 q 531 15 568 34 q 458 -11 494 -3 q 387 -20 422 -20 q 263 8 324 -20 q 155 90 203 36 q 77 221 106 144 q 48 397 48 299 q 80 594 48 506 q 169 744 113 682 q 300 841 226 807 q 458 875 375 875 q 587 855 532 875 q 677 806 642 835 q 675 793 682 803 q 659 770 669 783 q 636 744 648 757 q 616 723 625 731 l 593 727 q 511 779 558 759 q 401 800 463 800 q 351 791 378 800 q 296 764 323 783 q 242 716 268 746 q 196 645 216 687 q 164 548 176 603 q 153 422 153 492 q 179 264 153 332 q 246 151 205 196 q 337 83 287 106 q 436 61 388 61 q 532 86 473 61 q 665 173 591 111 q 672 167 669 172 q 679 158 676 163 q 686 149 683 153 q 690 143 688 145 m 484 1045 q 478 1009 484 1026 q 461 980 472 992 q 437 960 451 967 q 405 953 422 953 q 361 969 375 953 q 348 1018 348 986 q 354 1053 348 1036 q 371 1083 360 1070 q 396 1102 382 1095 q 426 1110 410 1110 q 484 1045 484 1110 "},"¡":{"x_min":104,"x_max":265,"ha":378,"o":"m 251 -327 q 197 -359 225 -344 q 145 -383 168 -374 l 116 -368 l 148 359 q 172 375 162 370 q 200 386 182 380 l 218 373 l 251 -327 m 265 575 q 257 532 265 552 q 237 496 250 512 q 207 472 224 481 q 171 464 190 464 q 120 484 137 464 q 104 542 104 504 q 111 585 104 565 q 130 620 118 605 q 160 643 143 635 q 198 652 178 652 q 249 631 233 652 q 265 575 265 611 "},"ẅ":{"x_min":13.5625,"x_max":966.46875,"ha":981,"o":"m 966 601 q 933 592 945 597 q 913 583 921 588 q 903 573 906 579 q 898 559 900 567 l 748 40 q 732 14 744 25 q 706 -2 720 4 q 678 -13 692 -9 q 655 -20 664 -17 l 494 439 l 355 40 q 338 14 349 24 q 314 -3 327 3 q 287 -14 300 -10 q 265 -20 274 -17 l 87 559 q 13 601 81 586 l 13 631 l 275 631 l 275 601 q 223 594 242 598 q 197 583 205 589 q 188 572 189 578 q 190 559 188 565 l 318 129 l 484 631 l 531 631 l 708 129 l 825 559 q 811 584 829 575 q 746 601 792 594 l 746 631 l 966 631 l 966 601 m 711 854 q 705 818 711 835 q 689 789 699 801 q 664 769 678 776 q 633 762 650 762 q 589 778 602 762 q 575 826 575 795 q 582 862 575 845 q 599 892 588 879 q 623 911 609 904 q 654 919 637 919 q 711 854 711 919 m 440 854 q 434 818 440 835 q 418 789 428 801 q 393 769 407 776 q 362 762 379 762 q 318 778 331 762 q 304 826 304 795 q 311 862 304 845 q 328 892 317 879 q 352 911 338 904 q 383 919 366 919 q 440 854 440 919 "},"ậ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 380 -189 q 374 -225 380 -208 q 357 -254 368 -242 q 332 -274 346 -267 q 301 -282 318 -282 q 257 -265 270 -282 q 244 -217 244 -248 q 250 -181 244 -198 q 267 -151 256 -164 q 292 -132 278 -139 q 322 -125 306 -125 q 380 -189 380 -125 m 539 740 q 526 721 531 727 q 510 710 522 715 l 324 891 l 141 710 q 131 715 135 712 q 125 721 128 718 q 118 729 122 724 q 110 740 115 734 l 289 998 l 362 998 l 539 740 "},"ǡ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 393 854 q 387 818 393 835 q 371 789 381 801 q 346 769 360 776 q 314 762 331 762 q 271 778 284 762 q 257 826 257 795 q 263 862 257 845 q 280 892 270 879 q 305 911 291 904 q 336 919 319 919 q 393 854 393 919 m 561 1112 q 556 1095 560 1105 q 549 1076 553 1085 q 541 1056 545 1066 q 535 1041 537 1047 l 118 1041 l 103 1058 q 107 1075 104 1065 q 115 1094 111 1084 q 123 1113 119 1104 q 130 1129 127 1122 l 546 1129 l 561 1112 "},"ṁ":{"x_min":37.046875,"x_max":1095.640625,"ha":1116,"o":"m 803 0 l 803 29 q 875 51 852 42 q 898 70 898 61 l 898 429 q 893 498 898 470 q 880 541 889 525 q 856 563 870 557 q 821 570 841 570 q 774 557 799 570 q 722 521 749 544 q 669 464 696 498 q 617 388 642 430 l 617 70 q 638 51 617 61 q 712 29 659 42 l 712 0 l 420 0 l 420 29 q 492 51 469 42 q 515 70 515 61 l 515 429 q 510 498 515 470 q 497 541 506 525 q 474 563 488 557 q 438 570 459 570 q 341 522 392 570 q 234 388 291 475 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 59 l 132 482 q 129 525 132 509 q 117 549 127 540 q 88 561 107 557 q 37 570 69 565 l 37 597 q 84 606 62 601 q 125 619 106 612 q 163 634 145 626 q 199 651 181 642 l 223 627 l 231 471 q 292 550 261 516 q 354 606 323 583 q 413 639 385 628 q 466 651 441 651 q 526 643 498 651 q 573 616 553 635 q 605 567 593 598 q 617 491 617 537 l 616 477 q 675 552 645 520 q 736 606 706 584 q 795 639 766 628 q 849 651 824 651 q 909 642 881 651 q 956 615 936 633 q 988 568 976 596 q 1000 502 1000 540 l 1000 70 q 1021 51 1000 61 q 1095 29 1042 42 l 1095 0 l 803 0 m 634 854 q 628 818 634 835 q 611 789 622 801 q 587 769 601 776 q 555 762 572 762 q 511 778 525 762 q 498 826 498 795 q 504 862 498 845 q 521 892 510 879 q 546 911 532 904 q 576 919 560 919 q 634 854 634 919 "},"Ử":{"x_min":33.65625,"x_max":950.125,"ha":950,"o":"m 950 944 q 941 904 950 927 q 912 856 933 881 q 855 802 891 830 q 767 749 820 775 l 767 355 q 745 196 767 266 q 682 79 723 127 q 583 5 642 30 q 451 -20 525 -20 q 323 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 376 76 332 95 q 478 58 420 58 q 564 81 526 58 q 627 142 601 104 q 665 229 652 180 q 679 327 679 277 l 679 783 q 654 804 679 791 q 580 825 629 816 l 580 855 l 821 855 q 833 889 833 873 q 823 926 833 909 q 794 959 813 944 l 914 1014 q 940 981 930 999 q 950 944 950 963 m 573 1121 q 560 1088 573 1103 q 531 1060 548 1073 q 498 1034 514 1046 q 475 1010 482 1023 q 474 984 467 997 q 509 953 480 970 q 488 945 499 947 q 467 943 477 944 q 422 970 436 957 q 404 993 407 982 q 408 1014 401 1004 q 426 1032 414 1023 q 451 1050 437 1041 q 478 1068 466 1059 q 498 1088 490 1078 q 507 1111 507 1099 q 494 1150 507 1137 q 462 1163 481 1163 q 443 1159 452 1163 q 429 1149 435 1155 q 419 1135 422 1143 q 416 1120 416 1128 q 417 1113 416 1117 q 421 1106 419 1110 q 407 1102 416 1104 q 389 1097 399 1099 q 370 1094 379 1095 q 353 1091 360 1092 l 346 1099 l 346 1108 q 359 1139 346 1124 q 392 1167 372 1155 q 436 1188 412 1180 q 484 1196 460 1196 q 550 1175 527 1196 q 573 1121 573 1155 "},"P":{"x_min":27.5625,"x_max":666,"ha":726,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 807 q 82 800 106 803 q 33 792 57 796 l 27 834 q 98 850 60 843 q 178 863 136 858 q 261 871 219 868 q 345 875 304 875 q 478 859 419 875 q 578 813 537 843 q 643 738 620 782 q 666 634 666 693 q 652 549 666 588 q 617 480 639 510 q 566 428 595 450 q 507 391 538 406 q 445 370 476 377 q 388 363 414 363 q 279 383 324 363 l 263 434 q 318 417 292 421 q 368 414 344 414 q 433 426 399 414 q 495 462 467 438 q 542 523 524 487 q 561 607 561 559 q 541 702 561 662 q 486 768 521 742 q 405 805 451 793 q 307 818 359 818 q 273 817 290 818 q 241 817 257 817 l 241 70 q 246 61 241 66 q 265 51 251 57 q 301 40 278 46 q 359 29 324 35 l 359 0 l 33 0 "},"%":{"x_min":52,"x_max":907,"ha":959,"o":"m 810 195 q 801 278 810 243 q 778 337 793 313 q 746 371 764 360 q 708 383 727 383 q 678 373 693 383 q 652 343 664 363 q 634 294 641 323 q 627 224 627 264 q 634 139 627 175 q 655 80 641 103 q 686 45 668 57 q 726 34 704 34 q 758 44 743 34 q 784 74 773 54 q 803 125 796 95 q 810 195 810 155 m 907 209 q 890 121 907 162 q 847 48 874 79 q 783 -1 820 16 q 708 -20 747 -20 q 635 -1 669 -20 q 578 48 602 16 q 541 121 555 79 q 528 209 528 162 q 544 298 528 256 q 588 370 561 339 q 652 420 616 402 q 726 438 688 438 q 800 420 767 438 q 857 371 833 402 q 894 298 881 340 q 907 209 907 257 m 242 11 q 224 1 236 6 q 199 -7 212 -3 q 172 -16 185 -12 q 151 -23 159 -20 l 134 0 l 715 805 q 759 825 734 817 q 805 839 784 833 l 825 816 l 242 11 m 334 595 q 325 678 334 643 q 302 737 317 714 q 270 771 288 760 q 232 783 251 783 q 202 773 217 783 q 176 743 188 763 q 157 694 164 723 q 150 624 150 664 q 157 539 150 575 q 178 479 164 503 q 210 444 191 456 q 250 433 228 433 q 282 443 266 433 q 308 473 297 453 q 327 524 320 494 q 334 595 334 554 m 432 608 q 415 519 432 561 q 372 446 399 477 q 308 396 344 414 q 232 378 272 378 q 159 396 192 378 q 102 446 126 414 q 65 519 78 477 q 52 608 52 561 q 68 696 52 655 q 111 769 84 738 q 175 818 139 800 q 250 837 211 837 q 324 819 291 837 q 381 769 357 801 q 418 697 405 738 q 432 608 432 655 "},"Ʒ":{"x_min":63.53125,"x_max":662,"ha":723,"o":"m 662 294 q 634 164 662 222 q 561 65 606 106 q 455 2 515 24 q 330 -20 395 -20 q 223 -4 272 -20 q 138 30 174 10 q 83 71 102 50 q 63 103 63 92 q 73 119 63 107 q 96 143 82 130 q 127 166 111 155 q 157 179 143 177 q 194 132 172 154 q 243 95 216 111 q 299 70 270 79 q 357 61 328 61 q 437 72 399 61 q 501 108 474 84 q 544 170 528 132 q 560 259 560 208 q 546 338 560 300 q 507 404 532 376 q 444 451 481 433 q 361 469 408 469 q 304 459 331 469 q 244 435 277 450 l 211 418 l 210 419 q 198 432 205 423 q 188 446 191 441 l 187 447 l 187 448 l 188 449 l 467 787 l 208 787 q 185 777 197 787 q 160 751 172 768 q 137 709 148 734 q 120 653 127 684 l 81 661 l 102 865 q 128 859 116 861 q 154 855 141 856 q 183 855 167 855 l 607 855 l 624 825 l 388 533 q 410 536 399 535 q 432 538 421 538 q 517 522 476 538 q 591 475 559 506 q 642 399 623 445 q 662 294 662 354 "},"_":{"x_min":41.375,"x_max":608.359375,"ha":652,"o":"m 608 -105 q 599 -137 604 -120 q 588 -167 594 -154 l 58 -167 l 41 -148 q 50 -118 44 -135 q 62 -89 56 -102 l 592 -89 l 608 -105 "},"ñ":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 544 496 549 470 q 529 537 539 522 q 502 557 519 552 q 462 563 486 563 q 415 552 441 563 q 360 520 389 542 q 298 461 330 497 q 234 372 266 425 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 59 l 132 482 q 129 524 132 508 q 118 548 127 540 q 90 561 109 557 q 37 570 71 565 l 37 597 q 122 618 83 604 q 199 651 161 632 l 223 627 l 231 458 q 296 539 260 503 q 369 599 332 575 q 440 637 406 624 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 m 622 912 q 593 857 610 884 q 555 808 576 830 q 510 773 535 787 q 459 760 486 760 q 414 771 436 760 q 373 798 393 783 q 332 825 352 813 q 293 837 312 837 q 243 814 265 837 q 196 755 221 792 l 160 768 q 188 823 172 796 q 226 873 205 851 q 271 908 247 894 q 322 922 295 922 q 370 910 347 922 q 414 883 394 898 q 453 856 434 868 q 487 845 471 845 q 538 866 513 845 q 585 928 562 888 l 622 912 "},"Ŕ":{"x_min":27.5625,"x_max":771.921875,"ha":779,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 806 q 83 799 108 803 q 33 792 58 795 l 27 834 q 91 849 59 842 q 159 862 124 856 q 233 871 195 868 q 317 875 272 875 q 454 859 396 875 q 551 815 512 843 q 609 750 590 788 q 628 669 628 712 q 614 580 628 620 q 574 510 600 541 q 514 458 549 480 q 436 423 478 436 l 642 93 q 664 70 652 78 q 690 56 676 61 q 723 52 705 52 q 764 53 741 51 l 771 24 q 686 0 727 9 q 620 -10 646 -10 q 581 1 600 -10 q 553 27 563 12 l 348 408 q 331 406 339 406 l 312 406 q 277 408 295 406 q 241 414 259 410 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 293 818 q 241 816 267 818 l 241 468 q 272 464 259 465 q 301 464 286 464 q 465 511 408 464 q 523 648 523 558 q 509 716 523 685 q 468 770 496 748 q 396 805 440 792 q 293 818 353 818 m 263 927 q 246 938 251 931 q 232 957 241 944 l 495 1173 q 513 1162 501 1168 q 537 1148 524 1156 q 559 1134 549 1141 q 575 1122 569 1128 l 581 1092 l 263 927 "},"‚":{"x_min":59.875,"x_max":256,"ha":318,"o":"m 256 41 q 246 -15 256 15 q 220 -76 237 -46 q 177 -135 202 -107 q 119 -184 152 -162 l 89 -160 q 114 -127 103 -146 q 132 -89 124 -108 q 142 -52 139 -70 q 146 -20 146 -34 q 127 32 146 9 q 70 57 109 55 l 59 87 q 85 106 65 96 q 128 126 105 117 q 174 143 152 136 q 209 149 197 149 q 243 104 231 127 q 256 41 256 80 "},"Æ":{"x_min":0.0625,"x_max":1042.296875,"ha":1082,"o":"m 525 779 q 518 789 525 786 q 503 792 512 793 q 485 785 494 791 q 472 767 476 779 l 365 499 l 525 499 l 525 779 m 1042 165 q 1027 63 1036 106 q 1013 0 1018 19 l 428 0 l 428 29 q 499 49 474 38 q 525 70 525 61 l 525 442 l 342 442 l 193 75 q 205 45 184 55 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 72 46 46 37 q 107 75 98 55 l 387 768 q 384 788 392 780 q 360 802 377 795 q 317 814 343 808 q 258 825 291 819 l 258 855 l 975 855 l 996 838 q 992 799 994 820 q 986 757 990 778 q 977 717 982 736 q 968 685 973 698 l 937 685 q 932 737 936 716 q 921 771 928 758 q 904 788 914 783 q 882 794 895 794 l 634 794 l 634 499 l 908 499 l 927 480 q 913 459 920 470 q 897 438 905 448 q 880 418 889 427 q 864 404 872 410 q 842 421 854 414 q 815 433 831 428 q 779 439 800 437 q 729 442 758 442 l 634 442 l 634 104 q 639 86 634 94 q 659 72 644 78 q 702 64 674 67 q 774 61 729 61 l 861 61 q 915 64 893 61 q 953 79 937 67 q 983 114 970 91 q 1011 177 997 137 l 1042 165 "},"ṍ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 594 912 q 564 857 581 884 q 527 808 548 830 q 482 773 506 787 q 431 760 457 760 q 386 771 407 760 q 344 798 364 783 q 304 825 324 813 q 264 837 284 837 q 215 814 237 837 q 167 755 192 792 l 131 768 q 160 823 143 796 q 198 873 177 851 q 243 908 219 894 q 293 922 267 922 q 342 910 319 922 q 385 883 365 898 q 424 856 406 868 q 459 845 442 845 q 509 866 484 845 q 557 928 534 888 l 594 912 m 333 954 q 311 961 321 956 q 295 973 302 967 l 453 1254 q 475 1251 461 1253 q 502 1248 488 1250 q 531 1243 517 1246 q 552 1238 544 1240 l 567 1212 l 333 954 "},"Ṯ":{"x_min":6.34375,"x_max":734.5625,"ha":765,"o":"m 207 0 l 207 29 q 260 42 238 35 q 294 55 281 48 q 313 67 307 61 q 319 78 319 73 l 319 794 l 116 794 q 97 790 106 794 q 80 774 89 786 q 61 738 72 762 q 35 675 50 714 l 6 688 q 15 773 9 728 q 28 855 21 819 l 714 855 l 734 838 q 727 762 733 803 q 714 678 722 721 l 683 678 q 671 731 676 709 q 659 767 666 753 q 644 787 653 781 q 620 794 634 794 l 428 794 l 428 78 q 452 55 428 69 q 539 29 476 42 l 539 0 l 207 0 m 599 -155 q 594 -172 598 -162 q 587 -192 591 -182 q 579 -211 583 -201 q 573 -227 575 -220 l 155 -227 l 141 -210 q 145 -193 142 -202 q 153 -173 149 -183 q 161 -154 157 -164 q 168 -139 165 -145 l 584 -139 l 599 -155 "},"Ū":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 695 1058 q 690 1041 693 1051 q 682 1021 687 1031 q 675 1002 678 1012 q 668 987 671 993 l 251 987 l 236 1003 q 241 1020 238 1011 q 248 1040 244 1030 q 257 1059 252 1049 q 264 1075 261 1068 l 680 1075 l 695 1058 "},"Œ":{"x_min":48,"x_max":1068.125,"ha":1108,"o":"m 409 61 q 460 62 436 61 q 504 66 484 63 q 543 76 525 69 q 579 94 562 82 l 579 745 q 500 785 543 773 q 409 798 457 798 q 301 772 349 798 q 221 699 253 746 q 170 584 188 652 q 153 434 153 517 q 173 291 153 358 q 229 171 194 223 q 310 90 264 120 q 409 61 357 61 m 1068 165 q 1054 63 1062 106 q 1040 0 1045 19 l 596 0 q 535 -3 560 0 q 487 -10 509 -6 q 442 -17 464 -14 q 390 -20 420 -20 q 245 15 308 -20 q 137 112 181 51 q 71 251 94 172 q 48 415 48 329 q 77 590 48 507 q 159 737 107 674 q 280 837 210 800 q 429 875 349 875 q 476 872 456 875 q 515 865 496 869 q 553 858 533 861 q 600 855 573 855 l 1001 855 l 1022 837 q 1018 799 1020 820 q 1012 757 1016 778 q 1004 717 1008 736 q 995 685 999 698 l 964 685 q 958 737 962 716 q 947 770 954 757 q 931 787 940 782 q 908 793 921 793 l 689 793 l 689 498 l 934 498 l 954 479 q 939 459 948 469 q 923 438 931 448 q 906 420 914 429 q 891 406 898 412 q 869 423 881 416 q 842 435 857 430 q 806 441 827 439 q 756 444 785 444 l 689 444 l 689 104 q 689 86 689 94 q 699 72 690 78 q 732 64 709 67 q 800 61 755 61 l 887 61 q 940 64 918 61 q 979 79 963 67 q 1010 114 996 91 q 1038 177 1024 137 l 1068 165 "},"Ạ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 474 -189 q 468 -225 474 -208 q 451 -254 462 -242 q 426 -274 441 -267 q 395 -282 412 -282 q 351 -265 365 -282 q 338 -217 338 -248 q 344 -181 338 -198 q 361 -151 350 -164 q 386 -132 372 -139 q 416 -125 400 -125 q 474 -189 474 -125 "},"Ƴ":{"x_min":-0.390625,"x_max":942,"ha":941,"o":"m 243 0 l 243 29 q 330 55 305 42 q 355 78 355 68 l 355 364 q 298 478 329 419 q 232 594 266 538 q 168 699 199 651 q 113 780 137 748 q 99 794 107 788 q 79 806 91 801 q 49 814 67 811 q 2 818 30 818 l 0 846 q 79 856 39 852 q 148 861 119 861 q 201 834 179 861 q 255 757 226 802 q 313 663 284 713 q 370 562 342 614 q 422 461 398 509 l 584 746 q 622 804 602 777 q 665 852 641 831 q 720 884 689 872 q 791 895 750 895 q 851 883 823 895 q 898 850 878 871 q 930 803 918 830 q 942 746 942 776 q 939 717 942 733 q 934 693 937 702 q 914 675 930 685 q 879 658 899 666 q 841 644 860 650 q 812 634 822 637 l 799 654 q 816 689 809 672 q 823 730 823 706 q 818 762 823 747 q 806 789 814 777 q 785 807 797 801 q 755 814 772 814 q 708 792 729 814 q 671 742 687 771 l 464 366 l 464 78 q 469 68 464 73 q 488 55 475 62 q 523 42 501 48 q 576 29 544 35 l 576 0 l 243 0 "},"ṡ":{"x_min":64.5,"x_max":474,"ha":536,"o":"m 474 192 q 460 109 474 144 q 425 51 446 75 q 377 13 403 28 q 325 -7 350 0 q 276 -17 299 -15 q 241 -20 254 -20 q 163 -7 208 -20 q 72 29 117 4 q 65 51 67 31 q 64 97 63 71 q 68 150 65 123 q 77 192 72 176 l 106 185 q 120 131 107 156 q 157 88 134 106 q 209 58 179 69 q 275 48 239 48 q 319 55 299 48 q 354 77 340 63 q 377 111 369 91 q 386 154 386 130 q 371 202 386 181 q 333 240 356 223 q 279 273 309 258 q 218 304 249 288 q 163 335 189 319 q 116 371 137 351 q 83 417 96 392 q 71 474 71 442 q 87 549 71 516 q 132 604 104 582 q 196 639 160 627 q 271 651 233 651 q 317 647 292 651 q 367 636 343 643 q 414 620 392 629 q 449 598 435 611 q 450 580 453 594 q 440 549 447 566 q 426 517 434 532 q 415 497 419 502 l 389 502 q 321 570 356 551 q 254 590 287 590 q 214 582 231 590 q 184 563 196 575 q 165 537 171 551 q 159 508 159 522 q 171 469 159 486 q 205 437 184 452 q 253 408 226 421 q 308 379 280 394 q 367 347 337 364 q 420 308 396 330 q 459 258 444 286 q 474 192 474 230 m 337 854 q 331 818 337 835 q 314 789 325 801 q 289 769 304 776 q 258 762 275 762 q 214 778 228 762 q 201 826 201 795 q 207 862 201 845 q 224 892 213 879 q 249 911 235 904 q 279 919 263 919 q 337 854 337 919 "},"ỷ":{"x_min":-31.875,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 369 -55 q 306 -184 341 -130 q 233 -272 271 -237 q 158 -322 196 -306 q 86 -339 120 -339 q 38 -335 60 -339 q 1 -327 16 -332 q -23 -315 -14 -322 q -31 -303 -31 -309 q -23 -286 -31 -298 q -3 -259 -15 -274 q 22 -231 8 -245 q 47 -211 36 -218 q 112 -231 80 -230 q 169 -223 144 -233 q 198 -204 181 -219 q 230 -168 214 -189 q 263 -118 247 -146 q 291 -62 279 -91 l 311 -15 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 123 l 522 555 q 523 573 525 565 q 511 585 520 580 q 485 594 502 590 q 444 601 469 597 l 444 631 l 670 631 l 670 601 m 473 904 q 461 871 473 886 q 431 843 448 856 q 398 817 414 829 q 375 793 382 806 q 374 767 368 780 q 409 736 380 753 q 388 728 399 730 q 367 726 377 727 q 322 753 337 740 q 305 776 308 765 q 308 797 301 787 q 326 815 314 806 q 352 833 337 824 q 378 851 366 842 q 399 871 390 861 q 407 894 407 882 q 394 933 407 920 q 362 946 382 946 q 343 942 352 946 q 329 932 335 938 q 319 918 323 926 q 316 903 316 911 q 318 896 316 900 q 321 889 319 893 q 308 885 316 887 q 289 880 299 882 q 270 877 279 878 q 254 874 260 875 l 246 882 l 246 891 q 259 922 246 907 q 292 950 272 938 q 336 971 312 963 q 385 979 361 979 q 450 958 427 979 q 473 904 473 938 "},"›":{"x_min":94.953125,"x_max":368.953125,"ha":423,"o":"m 368 291 l 124 12 l 94 32 l 251 316 l 95 598 l 124 619 l 367 341 l 368 291 "},"<":{"x_min":41.375,"x_max":568.34375,"ha":610,"o":"m 568 218 q 555 206 560 211 q 542 196 549 201 q 529 185 536 190 q 511 174 521 180 l 58 343 l 41 359 q 41 361 41 361 q 42 363 42 362 l 44 369 q 45 375 44 371 l 47 384 l 49 389 q 50 394 50 391 q 52 398 50 396 l 53 403 l 57 416 l 61 424 l 62 426 l 551 610 l 568 593 q 563 576 566 585 q 558 558 561 567 q 553 540 556 548 q 548 525 550 531 l 172 385 l 556 243 l 568 218 "},"¬":{"x_min":41.359375,"x_max":604,"ha":652,"o":"m 604 157 q 576 137 590 147 q 545 123 562 128 l 529 139 l 529 343 l 58 343 l 41 359 q 50 389 44 372 q 62 419 56 405 l 584 419 l 604 404 l 604 157 "},"t":{"x_min":13.265625,"x_max":458.453125,"ha":478,"o":"m 458 79 q 392 36 425 55 q 330 5 360 17 q 276 -13 301 -7 q 233 -20 250 -20 q 188 -11 209 -20 q 150 17 166 -2 q 124 70 134 37 q 115 150 115 102 l 115 567 l 27 567 l 13 585 l 66 631 l 115 631 l 115 797 l 195 868 l 217 851 l 217 631 l 438 631 l 458 611 q 443 591 452 602 q 424 571 434 580 q 405 553 415 561 q 389 543 396 545 q 340 559 373 551 q 252 567 307 567 l 217 567 l 217 208 q 220 140 217 167 q 233 97 224 113 q 256 74 242 81 q 290 68 269 68 q 349 77 313 68 q 438 114 385 86 l 458 79 "},"ù":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 446 731 q 429 718 438 722 q 408 710 420 713 l 170 965 l 185 993 q 205 998 191 995 q 232 1003 218 1000 q 261 1007 247 1005 q 284 1010 276 1009 l 446 731 "},"Ȳ":{"x_min":-0.390625,"x_max":797.6875,"ha":825,"o":"m 243 0 l 243 29 q 330 55 305 42 q 355 78 355 68 l 355 364 q 298 478 329 419 q 232 594 266 538 q 168 699 199 651 q 113 780 137 748 q 99 794 107 788 q 79 806 91 801 q 49 814 67 811 q 2 818 30 818 l 0 847 q 79 856 39 852 q 148 861 119 861 q 201 834 179 861 q 255 757 226 802 q 313 663 284 713 q 370 562 342 614 q 422 461 398 509 l 604 780 q 597 808 614 797 q 529 825 581 818 l 529 855 l 797 855 l 797 825 q 726 807 750 816 q 691 780 701 797 l 464 366 l 464 77 q 469 68 464 73 q 488 55 475 62 q 523 42 501 48 q 576 29 544 35 l 576 0 l 243 0 m 645 1058 q 640 1041 644 1051 q 633 1021 637 1031 q 625 1002 629 1012 q 619 987 621 993 l 202 987 l 187 1003 q 191 1020 188 1011 q 199 1040 195 1030 q 207 1059 203 1049 q 215 1075 211 1068 l 630 1075 l 645 1058 "},"ï":{"x_min":-10.421875,"x_max":396.578125,"ha":376,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 m 396 854 q 390 818 396 835 q 373 789 384 801 q 348 769 363 776 q 317 762 334 762 q 273 778 287 762 q 260 826 260 795 q 266 862 260 845 q 283 892 272 879 q 308 911 294 904 q 338 919 322 919 q 396 854 396 919 m 125 854 q 119 818 125 835 q 102 789 113 801 q 77 769 92 776 q 46 762 63 762 q 2 778 16 762 q -10 826 -10 795 q -4 862 -10 845 q 12 892 1 879 q 37 911 23 904 q 67 919 51 919 q 125 854 125 919 "},"Ò":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 537 957 q 522 938 527 944 q 506 927 517 931 l 188 1092 l 193 1122 q 209 1134 198 1128 q 231 1148 219 1141 q 255 1162 244 1156 q 274 1173 267 1168 l 537 957 "},"":{"x_min":-40.9375,"x_max":640.484375,"ha":661,"o":"m 640 165 q 626 63 635 106 q 612 0 618 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 400 q 111 409 121 406 q 91 413 101 413 q 42 390 64 413 q -5 330 20 368 l -40 344 q -12 399 -28 372 q 25 449 4 427 q 70 484 46 470 q 121 498 94 498 q 126 497 123 498 q 132 497 128 497 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 440 q 264 426 253 431 q 287 421 276 421 q 337 442 312 421 q 385 504 362 464 l 422 488 q 392 433 409 461 q 355 384 375 406 q 310 349 334 363 q 259 336 285 336 q 241 338 249 336 l 241 111 q 246 89 241 98 q 266 74 252 80 q 305 64 281 67 q 367 61 329 61 l 464 61 q 516 64 495 61 q 554 79 538 67 q 583 114 570 91 q 611 177 597 137 l 640 165 "},"ầ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 539 740 q 526 721 531 727 q 510 710 522 715 l 324 891 l 141 710 q 131 715 135 712 q 125 721 128 718 q 118 729 122 724 q 110 740 115 734 l 289 998 l 362 998 l 539 740 m 402 1036 q 385 1023 394 1028 q 364 1015 376 1018 l 126 1271 l 141 1298 q 161 1303 147 1300 q 188 1308 174 1305 q 217 1312 203 1311 q 240 1315 231 1314 l 402 1036 "},"Ṫ":{"x_min":6.34375,"x_max":734.5625,"ha":765,"o":"m 207 0 l 207 29 q 260 42 238 35 q 294 55 281 48 q 313 67 307 61 q 319 78 319 73 l 319 794 l 116 794 q 97 790 106 794 q 80 774 89 786 q 61 738 72 762 q 35 675 50 714 l 6 688 q 15 773 9 728 q 28 855 21 819 l 714 855 l 734 838 q 727 762 733 803 q 714 678 722 721 l 683 678 q 671 731 676 709 q 659 767 666 753 q 644 787 653 781 q 620 794 634 794 l 428 794 l 428 78 q 452 55 428 69 q 539 29 476 42 l 539 0 l 207 0 m 438 1045 q 432 1009 438 1026 q 415 980 426 992 q 391 960 405 967 q 359 953 376 953 q 315 969 329 953 q 302 1018 302 986 q 308 1053 302 1036 q 325 1083 314 1070 q 350 1102 336 1095 q 380 1110 364 1110 q 438 1045 438 1110 "},"Ồ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 631 957 q 618 938 623 944 q 602 927 613 932 l 416 1068 l 232 927 q 223 932 227 929 q 216 938 219 935 q 210 946 213 941 q 202 957 206 951 l 381 1167 l 453 1167 l 631 957 m 537 1228 q 522 1209 527 1216 q 506 1198 517 1203 l 188 1363 l 193 1394 q 209 1406 198 1399 q 231 1420 219 1413 q 255 1433 244 1427 q 274 1444 267 1440 l 537 1228 "},"I":{"x_min":47.65625,"x_max":353.34375,"ha":414,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 "},"˝":{"x_min":54.265625,"x_max":466.625,"ha":521,"o":"m 92 710 q 74 716 81 712 q 54 728 67 720 l 173 1010 q 192 1006 181 1008 q 215 1002 204 1005 q 237 998 226 1000 q 254 993 247 995 l 269 965 l 92 710 m 290 710 q 270 716 277 712 q 251 728 263 720 l 370 1010 q 389 1006 379 1008 q 412 1002 400 1005 q 433 998 423 1000 q 451 993 444 995 l 466 965 l 290 710 "},"ə":{"x_min":47,"x_max":577,"ha":631,"o":"m 301 51 q 422 103 379 51 q 474 258 465 156 l 201 258 q 168 242 180 258 q 156 199 156 226 q 168 140 156 167 q 202 93 181 113 q 249 62 223 73 q 301 51 275 51 m 577 329 q 550 180 577 249 q 477 61 523 111 q 390 0 438 19 q 282 -20 343 -20 q 190 -4 233 -20 q 115 40 147 11 q 65 106 83 68 q 47 189 47 144 q 53 239 47 216 q 71 276 59 261 q 115 298 91 287 q 163 319 139 309 l 475 319 q 456 419 473 374 q 412 494 440 463 q 347 542 385 525 q 269 559 310 559 q 231 556 250 559 q 190 545 212 553 q 140 522 167 537 q 78 481 113 506 q 62 495 69 485 q 52 510 56 505 q 128 581 93 554 q 195 624 163 609 q 256 645 226 640 q 317 651 286 651 q 414 628 367 651 q 497 565 460 606 q 555 464 533 524 q 577 329 577 404 "},"·":{"x_min":34,"x_max":170,"ha":203,"o":"m 170 488 q 163 452 170 469 q 147 423 157 435 q 122 403 136 410 q 91 396 108 396 q 47 412 60 396 q 34 460 34 429 q 40 496 34 479 q 57 526 46 513 q 81 545 68 538 q 112 553 95 553 q 170 488 170 553 "},"Ṝ":{"x_min":27.5625,"x_max":771.921875,"ha":779,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 806 q 83 799 108 803 q 33 792 58 795 l 27 834 q 91 849 59 842 q 159 862 124 856 q 233 871 195 868 q 317 875 272 875 q 454 859 396 875 q 551 815 512 843 q 609 750 590 788 q 628 669 628 712 q 614 580 628 620 q 574 510 600 541 q 514 458 549 480 q 436 423 478 436 l 642 93 q 664 70 652 78 q 690 56 676 61 q 723 52 705 52 q 764 53 741 51 l 771 24 q 686 0 727 9 q 620 -10 646 -10 q 581 1 600 -10 q 553 27 563 12 l 348 408 q 331 406 339 406 l 312 406 q 277 408 295 406 q 241 414 259 410 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 293 818 q 241 816 267 818 l 241 468 q 272 464 259 465 q 301 464 286 464 q 465 511 408 464 q 523 648 523 558 q 509 716 523 685 q 468 770 496 748 q 396 805 440 792 q 293 818 353 818 m 420 -189 q 414 -225 420 -208 q 398 -254 408 -242 q 373 -274 387 -267 q 342 -282 359 -282 q 298 -265 311 -282 q 284 -217 284 -248 q 291 -181 284 -198 q 308 -151 297 -164 q 332 -132 318 -139 q 363 -125 346 -125 q 420 -189 420 -125 m 588 1058 q 583 1041 587 1051 q 576 1021 580 1031 q 568 1002 572 1012 q 562 987 564 993 l 145 987 l 130 1003 q 134 1020 131 1011 q 142 1040 138 1030 q 150 1059 146 1049 q 158 1075 154 1068 l 573 1075 l 588 1058 "},"ẕ":{"x_min":51.546875,"x_max":562.25,"ha":614,"o":"m 562 168 q 561 122 562 146 q 559 74 560 97 q 557 31 558 51 q 554 0 556 12 l 69 0 l 51 30 l 427 570 l 193 570 q 171 565 182 570 q 149 550 160 561 q 129 519 139 539 q 113 468 120 499 l 80 476 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 545 631 l 560 601 l 183 61 l 469 61 q 500 87 486 61 q 530 174 514 113 l 562 168 m 535 -155 q 531 -172 534 -162 q 523 -192 527 -182 q 515 -211 519 -201 q 509 -227 512 -220 l 92 -227 l 77 -210 q 82 -193 78 -202 q 89 -173 85 -183 q 97 -154 93 -164 q 105 -139 101 -145 l 520 -139 l 535 -155 "},"¿":{"x_min":54,"x_max":547,"ha":601,"o":"m 287 359 q 308 376 298 370 q 336 387 319 382 l 353 374 l 358 294 q 347 218 360 256 q 312 142 334 180 q 266 69 291 105 q 218 -1 240 33 q 181 -69 196 -36 q 167 -135 167 -103 q 204 -267 167 -220 q 314 -315 242 -315 q 360 -303 338 -315 q 399 -273 382 -292 q 426 -230 416 -255 q 436 -180 436 -206 q 433 -160 436 -169 q 426 -141 430 -150 q 473 -122 449 -128 q 527 -114 496 -116 l 545 -135 q 547 -146 547 -141 l 547 -157 q 523 -246 547 -205 q 460 -316 500 -286 q 369 -362 420 -345 q 260 -379 317 -379 q 171 -363 210 -379 q 107 -319 133 -347 q 67 -252 81 -291 q 54 -166 54 -213 q 69 -74 54 -115 q 110 1 85 -33 q 163 69 134 37 q 217 136 191 102 q 261 208 243 170 q 283 294 279 247 l 287 359 m 397 575 q 389 532 397 552 q 368 496 382 512 q 338 472 355 481 q 302 464 321 464 q 251 483 267 464 q 236 541 236 503 q 243 584 236 564 q 262 619 250 604 q 292 642 275 634 q 328 651 309 651 q 380 631 364 651 q 397 575 397 611 "},"Ứ":{"x_min":33.65625,"x_max":950.125,"ha":950,"o":"m 950 944 q 941 904 950 927 q 912 856 933 881 q 855 802 891 830 q 767 749 820 775 l 767 355 q 745 196 767 266 q 682 79 723 127 q 583 5 642 30 q 451 -20 525 -20 q 323 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 376 76 332 95 q 478 58 420 58 q 564 81 526 58 q 627 142 601 104 q 665 229 652 180 q 679 327 679 277 l 679 783 q 654 804 679 791 q 580 825 629 816 l 580 855 l 821 855 q 833 889 833 873 q 823 926 833 909 q 794 959 813 944 l 914 1014 q 940 981 930 999 q 950 944 950 963 m 369 927 q 353 938 358 931 q 339 957 347 944 l 601 1173 q 619 1162 608 1168 q 643 1148 631 1156 q 666 1134 655 1141 q 681 1122 676 1128 l 687 1092 l 369 927 "},"ű":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 259 710 q 240 716 247 712 q 220 728 234 720 l 339 1010 q 359 1006 347 1008 q 381 1002 370 1005 q 403 998 392 1000 q 420 993 413 995 l 435 965 l 259 710 m 456 710 q 436 716 443 712 q 417 728 430 720 l 537 1010 q 556 1006 545 1008 q 578 1002 567 1005 q 599 998 589 1000 q 617 993 610 995 l 632 965 l 456 710 "},"ɖ":{"x_min":54,"x_max":883.90625,"ha":699,"o":"m 330 68 q 375 77 353 68 q 419 102 397 86 q 462 137 441 117 q 505 177 484 156 l 505 494 q 441 554 482 533 q 352 576 401 576 q 273 560 309 576 q 211 512 237 544 q 170 433 185 480 q 156 322 156 385 q 172 217 156 264 q 214 137 189 170 q 271 85 240 103 q 330 68 302 68 m 607 -112 q 625 -232 607 -190 q 693 -275 644 -275 q 728 -265 712 -275 q 754 -241 744 -256 q 765 -210 763 -227 q 758 -179 767 -193 q 769 -168 756 -176 q 802 -151 783 -159 q 840 -137 821 -143 q 870 -133 860 -131 l 883 -159 q 867 -216 885 -185 q 815 -275 848 -247 q 737 -320 781 -302 q 642 -339 692 -339 q 575 -323 601 -339 q 532 -283 548 -308 q 511 -224 517 -257 q 505 -153 505 -190 l 505 112 q 454 57 479 81 q 402 15 429 32 q 345 -10 375 -1 q 281 -20 316 -20 q 203 2 243 -20 q 130 65 163 24 q 75 166 96 106 q 54 301 54 226 q 64 381 54 339 q 94 461 75 422 q 142 534 114 499 q 206 595 171 568 q 283 636 241 621 q 373 651 325 651 q 436 643 405 651 q 505 608 468 635 l 505 863 q 503 923 505 901 q 492 957 501 945 q 463 973 483 968 q 408 980 443 977 l 408 1006 q 507 1026 463 1014 q 585 1051 550 1039 l 607 1030 l 607 -112 "},"Ṹ":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 690 1103 q 661 1047 678 1075 q 623 998 644 1020 q 578 963 602 977 q 527 950 554 950 q 482 961 503 950 q 440 988 461 973 q 400 1015 420 1003 q 360 1027 380 1027 q 311 1005 333 1027 q 263 945 288 982 l 227 958 q 256 1013 240 986 q 294 1063 273 1041 q 339 1098 315 1084 q 389 1112 363 1112 q 438 1100 415 1112 q 482 1073 461 1088 q 520 1046 502 1058 q 555 1035 539 1035 q 605 1056 581 1035 q 653 1118 630 1078 l 690 1103 m 369 1144 q 353 1155 358 1148 q 339 1174 347 1161 l 601 1390 q 619 1379 608 1385 q 643 1365 631 1373 q 666 1352 655 1358 q 681 1339 676 1345 l 687 1309 l 369 1144 "},"Ḍ":{"x_min":27.5625,"x_max":761,"ha":823,"o":"m 307 818 q 241 816 273 818 l 241 104 q 248 80 241 89 q 284 62 257 68 q 364 57 311 57 q 460 79 411 57 q 551 148 510 102 q 619 265 593 195 q 646 432 646 336 q 623 593 646 522 q 558 715 601 665 q 451 791 515 765 q 307 818 388 818 m 761 458 q 743 306 761 373 q 697 188 726 240 q 629 102 668 137 q 548 43 591 66 q 462 10 506 21 q 378 0 418 0 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 805 q 80 799 104 802 q 33 792 56 795 l 27 834 q 96 849 57 842 q 178 863 135 857 q 266 871 222 868 q 350 875 310 875 q 521 846 445 875 q 650 765 596 818 q 732 634 703 711 q 761 458 761 556 m 441 -189 q 435 -225 441 -208 q 418 -254 429 -242 q 393 -274 408 -267 q 362 -282 379 -282 q 318 -265 331 -282 q 305 -217 305 -248 q 311 -181 305 -198 q 328 -151 317 -164 q 353 -132 339 -139 q 383 -125 367 -125 q 441 -189 441 -125 "},"Ǽ":{"x_min":0.0625,"x_max":1042.296875,"ha":1082,"o":"m 525 779 q 518 789 525 786 q 503 792 512 793 q 485 785 494 791 q 472 767 476 779 l 365 499 l 525 499 l 525 779 m 1042 165 q 1027 63 1036 106 q 1013 0 1018 19 l 428 0 l 428 29 q 499 49 474 38 q 525 70 525 61 l 525 442 l 342 442 l 193 75 q 205 45 184 55 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 72 46 46 37 q 107 75 98 55 l 387 768 q 384 788 392 780 q 360 802 377 795 q 317 814 343 808 q 258 825 291 819 l 258 855 l 975 855 l 996 838 q 992 799 994 820 q 986 757 990 778 q 977 717 982 736 q 968 685 973 698 l 937 685 q 932 737 936 716 q 921 771 928 758 q 904 788 914 783 q 882 794 895 794 l 634 794 l 634 499 l 908 499 l 927 480 q 913 459 920 470 q 897 438 905 448 q 880 418 889 427 q 864 404 872 410 q 842 421 854 414 q 815 433 831 428 q 779 439 800 437 q 729 442 758 442 l 634 442 l 634 104 q 639 86 634 94 q 659 72 644 78 q 702 64 674 67 q 774 61 729 61 l 861 61 q 915 64 893 61 q 953 79 937 67 q 983 114 970 91 q 1011 177 997 137 l 1042 165 m 537 927 q 520 938 525 931 q 506 957 515 944 l 769 1173 q 787 1162 775 1168 q 811 1148 798 1156 q 833 1134 823 1141 q 849 1122 843 1128 l 855 1092 l 537 927 "},";":{"x_min":59.40625,"x_max":264,"ha":318,"o":"m 264 47 q 253 -12 264 20 q 223 -80 243 -45 q 175 -147 203 -114 q 112 -207 147 -180 l 81 -183 q 114 -141 100 -161 q 136 -99 127 -120 q 148 -53 144 -77 q 153 0 153 -29 q 133 47 153 29 q 70 62 113 64 l 59 94 q 85 112 65 102 q 128 133 104 123 q 174 149 151 142 q 209 155 197 155 q 252 112 241 139 q 264 47 264 86 m 250 575 q 242 531 250 551 q 223 496 235 511 q 193 473 210 481 q 156 464 176 464 q 104 484 120 464 q 89 540 89 504 q 96 583 89 563 q 116 618 103 603 q 146 642 129 634 q 183 651 164 651 q 233 631 216 651 q 250 575 250 611 "},"Ġ":{"x_min":47,"x_max":777.203125,"ha":810,"o":"m 707 805 q 705 792 711 802 q 688 770 699 782 q 663 746 677 757 q 641 726 650 734 l 619 730 q 573 765 596 751 q 523 786 549 778 q 467 796 497 793 q 405 800 438 800 q 362 792 388 800 q 309 767 337 784 q 253 721 281 749 q 202 652 225 693 q 165 556 179 611 q 152 431 152 502 q 177 267 152 337 q 243 152 202 197 q 334 83 283 106 q 437 61 385 61 q 528 70 487 61 q 604 98 570 80 l 604 328 q 597 343 604 336 q 575 357 591 350 q 532 370 559 364 q 464 384 505 377 l 464 413 l 777 413 l 777 384 q 722 359 738 375 q 706 328 706 344 l 706 104 q 615 38 655 63 q 542 1 576 14 q 479 -15 509 -11 q 419 -20 449 -20 q 284 5 350 -20 q 164 82 217 30 q 79 212 112 134 q 47 394 47 289 q 82 596 47 507 q 180 747 118 685 q 324 842 241 809 q 499 875 406 875 q 549 870 522 875 q 603 856 575 865 q 658 834 631 847 q 707 805 685 821 m 502 1045 q 496 1009 502 1026 q 479 980 490 992 q 454 960 469 967 q 423 953 440 953 q 379 969 392 953 q 366 1018 366 986 q 372 1053 366 1036 q 389 1083 378 1070 q 414 1102 400 1095 q 444 1110 428 1110 q 502 1045 502 1110 "},"6":{"x_min":75,"x_max":598,"ha":652,"o":"m 339 447 q 263 427 305 447 q 184 363 221 408 q 197 223 184 282 q 234 126 210 165 q 293 69 259 88 q 370 51 328 51 q 430 68 406 51 q 469 112 454 85 q 489 171 483 139 q 496 235 496 204 q 480 340 496 299 q 442 405 465 381 q 392 437 419 428 q 339 447 364 447 m 598 279 q 590 213 598 247 q 569 145 583 178 q 533 82 554 112 q 483 29 511 52 q 420 -6 455 7 q 343 -20 385 -20 q 239 4 288 -20 q 153 74 190 29 q 96 181 117 118 q 75 320 75 244 q 102 504 75 416 q 187 662 130 592 q 330 781 244 733 q 535 847 417 830 l 548 807 q 406 751 468 788 q 299 666 343 714 q 227 559 255 617 q 190 440 200 501 q 238 479 213 463 q 286 504 263 494 q 330 517 309 513 q 367 522 351 522 q 465 505 422 522 q 537 456 507 488 q 582 380 566 425 q 598 279 598 335 "},"n":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 544 496 549 470 q 529 537 539 522 q 502 557 519 552 q 462 563 486 563 q 415 552 441 563 q 360 520 389 542 q 298 461 330 497 q 234 372 266 425 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 59 l 132 482 q 129 524 132 508 q 118 548 127 540 q 90 561 109 557 q 37 570 71 565 l 37 597 q 122 618 83 604 q 199 651 161 632 l 223 627 l 231 458 q 296 539 260 503 q 369 599 332 575 q 440 637 406 624 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 "},"ʌ":{"x_min":13.5625,"x_max":670.765625,"ha":685,"o":"m 13 29 q 46 37 33 33 q 67 47 59 42 q 80 58 75 52 q 88 75 84 65 l 280 590 q 297 616 286 605 q 322 633 309 626 q 349 644 336 640 q 371 651 362 648 l 595 75 q 619 46 601 56 q 670 29 636 36 l 670 0 l 408 0 l 408 29 q 452 35 435 32 q 477 44 468 39 q 488 56 486 49 q 485 75 489 64 l 318 509 l 162 75 q 159 57 158 65 q 168 45 160 50 q 192 36 177 40 q 232 29 207 33 l 232 0 l 13 0 l 13 29 "},"Ṉ":{"x_min":33.65625,"x_max":867.34375,"ha":901,"o":"m 33 0 l 33 29 q 107 48 83 35 q 132 70 132 61 l 132 779 q 84 811 109 800 q 33 825 60 821 l 33 855 l 177 855 q 194 853 187 855 q 207 846 200 851 q 221 830 214 840 q 242 802 229 819 l 688 187 l 688 783 q 665 805 688 791 q 589 825 643 818 l 589 855 l 867 855 l 867 825 q 793 806 818 819 q 769 783 769 793 l 769 -20 q 716 -6 735 -15 q 689 14 697 3 l 213 673 l 213 70 q 235 49 213 62 q 311 29 258 36 l 311 0 l 33 0 m 680 -155 q 675 -172 678 -162 q 668 -192 672 -182 q 660 -211 663 -201 q 653 -227 656 -220 l 236 -227 l 221 -210 q 226 -193 223 -202 q 233 -173 229 -183 q 242 -154 238 -164 q 249 -139 246 -145 l 665 -139 l 680 -155 "},"ḯ":{"x_min":-10.421875,"x_max":398.109375,"ha":376,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 m 396 854 q 390 818 396 835 q 373 789 384 801 q 348 769 363 776 q 317 762 334 762 q 273 778 287 762 q 260 826 260 795 q 266 862 260 845 q 283 892 272 879 q 308 911 294 904 q 338 919 322 919 q 396 854 396 919 m 125 854 q 119 818 125 835 q 102 789 113 801 q 77 769 92 776 q 46 762 63 762 q 2 778 16 762 q -10 826 -10 795 q -4 862 -10 845 q 12 892 1 879 q 37 911 23 904 q 67 919 51 919 q 125 854 125 919 m 164 954 q 142 961 151 956 q 125 973 132 967 l 284 1254 q 305 1251 292 1253 q 333 1248 318 1250 q 361 1243 347 1246 q 382 1238 375 1240 l 398 1212 l 164 954 "},"ụ":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 437 -189 q 431 -225 437 -208 q 415 -254 425 -242 q 390 -274 404 -267 q 359 -282 376 -282 q 315 -265 328 -282 q 301 -217 301 -248 q 308 -181 301 -198 q 325 -151 314 -164 q 349 -132 335 -139 q 380 -125 363 -125 q 437 -189 437 -125 "},"Ẵ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 637 1367 q 608 1312 625 1339 q 570 1263 591 1284 q 525 1227 550 1241 q 474 1214 501 1214 q 429 1225 451 1214 q 387 1252 408 1237 q 347 1279 367 1267 q 307 1291 327 1291 q 258 1268 280 1291 q 210 1208 236 1246 l 174 1222 q 203 1277 187 1250 q 241 1327 220 1305 q 286 1362 262 1348 q 337 1376 310 1376 q 385 1364 362 1376 q 429 1337 408 1352 q 467 1310 449 1322 q 502 1299 486 1299 q 553 1320 528 1299 q 600 1383 577 1342 l 637 1367 m 626 1139 q 580 1046 606 1084 q 527 986 555 1009 q 468 952 499 962 q 407 942 438 942 q 343 952 374 942 q 283 986 311 962 q 230 1046 255 1009 q 185 1139 206 1084 q 202 1157 193 1151 q 221 1169 210 1164 q 260 1104 238 1131 q 307 1062 282 1078 q 357 1039 331 1046 q 404 1032 382 1032 q 454 1039 428 1032 q 505 1062 480 1046 q 552 1104 530 1078 q 590 1169 574 1131 q 610 1157 602 1164 q 626 1139 618 1151 "},"Ǩ":{"x_min":33.65625,"x_max":796.46875,"ha":803,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 438 l 518 765 q 538 794 534 783 q 535 811 542 805 q 511 820 528 817 q 468 825 494 823 l 468 855 l 753 855 l 753 825 q 714 820 731 823 q 683 813 697 817 q 659 802 670 808 q 637 783 647 795 l 340 455 l 668 85 q 694 64 680 72 q 724 54 708 57 q 757 51 740 51 q 791 53 774 51 l 796 24 q 716 0 756 11 q 643 -10 675 -10 q 608 -3 623 -10 q 579 19 593 2 l 241 433 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 436 943 l 364 943 l 185 1151 q 193 1162 189 1157 q 199 1170 196 1167 q 206 1176 202 1174 q 215 1183 210 1179 l 402 1039 l 585 1183 q 601 1170 596 1176 q 614 1151 606 1164 l 436 943 "},"ḡ":{"x_min":20,"x_max":670.8125,"ha":678,"o":"m 468 406 q 456 474 468 442 q 420 531 444 507 q 362 569 397 555 q 282 583 327 583 q 244 574 265 583 q 205 548 224 565 q 175 505 187 531 q 163 446 163 479 q 174 378 163 410 q 208 322 185 346 q 265 284 230 298 q 348 271 300 271 q 389 279 368 271 q 428 305 411 287 q 456 347 445 322 q 468 406 468 372 m 351 -2 q 303 3 325 0 q 263 10 282 6 q 186 -36 214 -15 q 143 -74 157 -57 q 125 -104 129 -90 q 122 -128 122 -118 q 140 -182 122 -157 q 191 -226 159 -208 q 265 -256 223 -245 q 353 -268 307 -268 q 436 -255 399 -268 q 500 -222 473 -243 q 541 -171 526 -200 q 556 -106 556 -141 q 547 -71 556 -87 q 515 -42 538 -55 q 452 -19 492 -29 q 351 -2 412 -9 m 563 434 q 539 339 563 382 q 478 265 516 296 q 392 217 440 234 q 294 200 343 200 l 291 200 q 246 154 259 172 q 234 132 234 136 q 241 116 234 124 q 268 102 248 109 q 321 87 287 94 q 408 74 355 80 q 530 50 482 66 q 607 12 578 33 q 646 -33 635 -8 q 658 -81 658 -57 q 643 -152 658 -118 q 605 -214 629 -185 q 547 -265 580 -242 q 476 -305 514 -288 q 397 -330 438 -321 q 316 -339 356 -339 q 250 -334 284 -339 q 183 -320 216 -330 q 120 -296 150 -311 q 68 -261 91 -282 q 33 -214 46 -240 q 20 -155 20 -188 q 26 -118 20 -137 q 52 -76 32 -98 q 107 -28 72 -54 q 201 28 142 -2 q 140 63 157 44 q 123 103 123 83 q 126 118 123 109 q 140 140 129 127 q 170 170 150 153 q 220 209 189 187 q 158 236 186 218 q 110 280 130 254 q 79 337 90 305 q 68 408 68 370 q 90 502 68 457 q 149 579 112 546 q 232 631 185 612 q 329 651 279 651 q 405 639 369 651 q 470 606 440 627 q 533 615 505 610 q 585 627 562 621 q 625 639 607 633 q 657 651 643 645 l 670 630 q 655 595 662 611 q 632 562 647 579 q 581 555 606 558 q 525 551 556 552 q 553 496 543 525 q 563 434 563 467 m 575 868 q 570 851 573 861 q 562 831 566 841 q 555 812 558 822 q 548 797 551 803 l 131 797 l 116 813 q 121 830 118 821 q 128 850 124 840 q 136 869 132 859 q 144 885 141 878 l 560 885 l 575 868 "},"∂":{"x_min":54,"x_max":641,"ha":695,"o":"m 533 398 q 499 468 522 435 q 446 525 475 501 q 384 563 416 549 q 322 577 351 577 q 251 557 282 577 q 199 503 220 537 q 168 422 179 469 q 158 321 158 375 q 176 219 158 267 q 221 134 194 170 q 281 76 249 97 q 343 55 314 55 q 417 78 382 55 q 477 146 452 102 q 518 251 503 189 q 533 390 533 313 l 533 398 m 641 489 q 625 309 641 386 q 584 174 610 231 q 527 80 559 118 q 460 20 494 43 q 394 -10 426 -1 q 336 -20 362 -20 q 217 4 270 -20 q 129 71 165 28 q 73 173 92 114 q 54 301 54 232 q 78 431 54 368 q 143 544 102 495 q 236 622 183 593 q 343 652 288 652 q 389 641 363 652 q 442 615 416 631 q 493 578 469 599 q 533 535 517 557 q 507 705 529 636 q 451 817 484 774 q 377 878 417 859 q 297 897 336 897 q 258 894 277 897 q 219 885 240 892 q 176 864 199 878 q 122 827 153 850 l 92 850 l 172 947 q 246 972 211 963 q 315 981 281 981 q 392 973 353 981 q 467 945 431 965 q 534 889 503 924 q 590 800 566 854 q 627 669 613 745 q 641 489 641 592 "},"‡":{"x_min":47.734375,"x_max":614.9375,"ha":663,"o":"m 614 729 q 590 676 605 705 q 559 622 576 647 q 466 644 512 637 q 363 656 420 652 q 369 574 364 613 q 388 488 375 534 q 370 402 376 443 q 364 321 365 360 q 424 325 395 322 q 481 331 452 327 q 538 341 509 335 q 597 354 567 347 l 614 325 q 590 273 605 302 q 559 218 576 244 q 467 239 513 230 q 363 252 420 248 q 371 133 363 186 q 398 28 379 80 q 343 -2 372 11 q 292 -27 315 -17 l 263 -10 q 288 119 279 54 q 298 252 296 183 q 237 247 266 250 q 180 240 209 244 q 123 230 152 236 q 64 218 95 225 l 47 247 q 71 300 57 271 q 103 354 86 329 q 195 331 148 338 q 298 321 241 323 q 290 402 296 360 q 273 488 285 444 q 291 574 286 535 q 298 656 296 613 q 180 644 235 652 q 64 622 125 635 l 47 651 q 71 703 57 674 q 103 757 86 732 q 195 734 148 741 q 298 724 241 726 q 287 842 296 788 q 263 948 279 897 q 317 979 289 965 q 369 1004 346 994 l 398 987 q 376 858 385 923 q 364 725 367 792 q 481 735 426 727 q 597 758 536 742 l 614 729 "},"ň":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 544 496 549 470 q 529 537 539 522 q 502 557 519 552 q 462 563 486 563 q 415 552 441 563 q 360 520 389 542 q 298 461 330 497 q 234 372 266 425 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 59 l 132 482 q 129 524 132 508 q 118 548 127 540 q 90 561 109 557 q 37 570 71 565 l 37 597 q 122 618 83 604 q 199 651 161 632 l 223 627 l 231 458 q 296 539 260 503 q 369 599 332 575 q 440 637 406 624 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 m 427 726 l 355 726 l 176 968 q 184 979 181 974 q 190 987 187 984 q 197 993 193 991 q 206 1000 201 996 l 393 829 l 576 1000 q 592 987 588 993 q 605 968 597 981 l 427 726 "},"√":{"x_min":14.25,"x_max":839.640625,"ha":820,"o":"m 839 968 q 830 936 836 953 q 819 907 824 919 l 718 907 l 485 40 q 467 14 479 25 q 442 -2 456 4 q 416 -13 429 -9 q 394 -20 402 -17 l 124 552 l 31 552 l 14 570 q 23 600 17 584 q 35 630 29 616 l 200 631 l 440 127 l 676 985 l 822 985 l 839 968 "},"ố":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 577 740 q 564 721 569 727 q 548 710 559 715 l 362 891 l 178 710 q 169 715 172 712 q 162 721 165 718 q 155 729 159 724 q 147 740 152 734 l 326 998 l 399 998 l 577 740 m 333 1015 q 311 1022 321 1017 q 295 1034 302 1028 l 453 1315 q 475 1312 461 1314 q 502 1309 488 1311 q 531 1304 517 1307 q 552 1299 544 1301 l 567 1273 l 333 1015 "},"Ặ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 474 -189 q 468 -225 474 -208 q 451 -254 462 -242 q 426 -274 441 -267 q 395 -282 412 -282 q 351 -265 365 -282 q 338 -217 338 -248 q 344 -181 338 -198 q 361 -151 350 -164 q 386 -132 372 -139 q 416 -125 400 -125 q 474 -189 474 -125 m 626 1139 q 580 1046 606 1084 q 527 985 555 1009 q 468 952 499 962 q 407 942 438 942 q 343 952 374 942 q 283 985 311 962 q 230 1046 255 1009 q 185 1139 206 1084 q 202 1158 193 1151 q 221 1170 210 1164 q 260 1104 238 1131 q 307 1062 282 1078 q 357 1039 331 1046 q 404 1032 382 1032 q 454 1039 428 1032 q 505 1062 480 1046 q 552 1104 530 1078 q 590 1170 574 1131 q 610 1158 602 1164 q 626 1139 618 1151 "},"Ế":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 554 957 q 541 938 546 944 q 525 927 537 932 l 339 1068 l 156 927 q 146 932 150 929 q 140 938 143 935 q 133 946 137 941 q 125 957 130 951 l 304 1167 l 377 1167 l 554 957 m 250 1198 q 234 1209 239 1203 q 220 1228 229 1216 l 482 1444 q 501 1433 489 1440 q 524 1420 512 1427 q 547 1406 537 1413 q 562 1394 557 1399 l 569 1363 l 250 1198 "},"ṫ":{"x_min":13.265625,"x_max":458.453125,"ha":478,"o":"m 458 79 q 392 36 425 55 q 330 5 360 17 q 276 -13 301 -7 q 233 -20 250 -20 q 188 -11 209 -20 q 150 17 166 -2 q 124 70 134 37 q 115 150 115 102 l 115 567 l 27 567 l 13 585 l 66 631 l 115 631 l 115 797 l 195 868 l 217 851 l 217 631 l 438 631 l 458 611 q 443 591 452 602 q 424 571 434 580 q 405 553 415 561 q 389 543 396 545 q 340 559 373 551 q 252 567 307 567 l 217 567 l 217 208 q 220 140 217 167 q 233 97 224 113 q 256 74 242 81 q 290 68 269 68 q 349 77 313 68 q 438 114 385 86 l 458 79 m 304 1037 q 298 1001 304 1018 q 281 972 292 985 q 256 952 271 960 q 225 945 242 945 q 181 962 194 945 q 168 1010 168 978 q 174 1045 168 1029 q 191 1075 180 1062 q 216 1095 202 1087 q 246 1102 230 1102 q 304 1037 304 1102 "},"ắ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 545 922 q 500 829 525 867 q 446 768 474 792 q 387 735 418 745 q 326 725 357 725 q 262 735 293 725 q 203 768 231 745 q 150 829 174 792 q 105 922 125 867 q 121 941 113 934 q 141 953 129 947 q 180 887 158 914 q 226 845 202 861 q 276 822 250 829 q 324 815 301 815 q 374 822 347 815 q 424 845 400 829 q 471 887 449 861 q 510 953 493 914 q 529 941 521 947 q 545 922 537 934 m 296 927 q 274 934 284 929 q 257 946 265 939 l 416 1227 q 437 1224 424 1226 q 465 1220 451 1222 q 493 1216 480 1218 q 514 1211 507 1213 l 530 1184 l 296 927 "},"Ṅ":{"x_min":33.65625,"x_max":867.34375,"ha":901,"o":"m 33 0 l 33 29 q 107 48 83 35 q 132 70 132 61 l 132 779 q 84 811 109 800 q 33 825 60 821 l 33 855 l 177 855 q 194 853 187 855 q 207 846 200 851 q 221 830 214 840 q 242 802 229 819 l 688 187 l 688 783 q 665 805 688 791 q 589 825 643 818 l 589 855 l 867 855 l 867 825 q 793 806 818 819 q 769 783 769 793 l 769 -20 q 716 -6 735 -15 q 689 14 697 3 l 213 673 l 213 70 q 235 49 213 62 q 311 29 258 36 l 311 0 l 33 0 m 519 1045 q 513 1009 519 1026 q 496 980 507 992 q 471 960 485 967 q 440 953 457 953 q 396 969 409 953 q 383 1018 383 986 q 389 1053 383 1036 q 406 1083 395 1070 q 431 1102 417 1095 q 461 1110 445 1110 q 519 1045 519 1110 "},"≈":{"x_min":37.984375,"x_max":571.734375,"ha":610,"o":"m 571 328 q 407 219 503 219 q 351 229 379 219 q 296 252 323 240 q 241 275 268 264 q 186 286 213 286 q 129 267 154 286 q 73 217 103 249 l 37 254 q 202 365 105 365 q 262 354 232 365 q 321 331 293 343 q 374 308 349 319 q 421 298 400 298 q 453 303 437 298 q 483 319 469 309 q 511 341 498 328 q 535 367 524 353 l 571 328 m 571 505 q 407 396 503 396 q 351 406 379 396 q 296 429 323 416 q 241 451 268 441 q 186 462 213 462 q 129 444 154 462 q 73 393 103 426 l 37 430 q 202 541 105 541 q 262 530 232 541 q 321 508 293 520 q 374 485 349 495 q 421 475 400 475 q 453 480 437 475 q 483 496 469 486 q 511 518 498 505 q 535 545 524 530 l 571 505 "},"g":{"x_min":20,"x_max":670.8125,"ha":678,"o":"m 468 406 q 456 474 468 442 q 420 531 444 507 q 362 569 397 555 q 282 583 327 583 q 244 574 265 583 q 205 548 224 565 q 175 505 187 531 q 163 446 163 479 q 174 378 163 410 q 208 322 185 346 q 265 284 230 298 q 348 271 300 271 q 389 279 368 271 q 428 305 411 287 q 456 347 445 322 q 468 406 468 372 m 351 -2 q 303 3 325 0 q 263 10 282 6 q 186 -36 214 -15 q 143 -74 157 -57 q 125 -104 129 -90 q 122 -128 122 -118 q 140 -182 122 -157 q 191 -226 159 -208 q 265 -256 223 -245 q 353 -268 307 -268 q 436 -255 399 -268 q 500 -222 473 -243 q 541 -171 526 -200 q 556 -106 556 -141 q 547 -71 556 -87 q 515 -42 538 -55 q 452 -19 492 -29 q 351 -2 412 -9 m 563 434 q 539 339 563 382 q 478 265 516 296 q 392 217 440 234 q 294 200 343 200 l 291 200 q 246 154 259 172 q 234 132 234 136 q 241 116 234 124 q 268 102 248 109 q 321 87 287 94 q 408 74 355 80 q 530 50 482 66 q 607 12 578 33 q 646 -33 635 -8 q 658 -81 658 -57 q 643 -152 658 -118 q 605 -214 629 -185 q 547 -265 580 -242 q 476 -305 514 -288 q 397 -330 438 -321 q 316 -339 356 -339 q 250 -334 284 -339 q 183 -320 216 -330 q 120 -296 150 -311 q 68 -261 91 -282 q 33 -214 46 -240 q 20 -155 20 -188 q 26 -118 20 -137 q 52 -76 32 -98 q 107 -28 72 -54 q 201 28 142 -2 q 140 63 157 44 q 123 103 123 83 q 126 118 123 109 q 140 140 129 127 q 170 170 150 153 q 220 209 189 187 q 158 236 186 218 q 110 280 130 254 q 79 337 90 305 q 68 408 68 370 q 90 502 68 457 q 149 579 112 546 q 232 631 185 612 q 329 651 279 651 q 405 639 369 651 q 470 606 440 627 q 533 615 505 610 q 585 627 562 621 q 625 639 607 633 q 657 651 643 645 l 670 630 q 655 595 662 611 q 632 562 647 579 q 581 555 606 558 q 525 551 556 552 q 553 496 543 525 q 563 434 563 467 "},"ǿ":{"x_min":54,"x_max":645,"ha":699,"o":"m 541 308 q 530 387 541 349 q 501 458 519 426 l 241 115 q 298 70 269 86 q 355 55 328 55 q 438 72 404 55 q 496 124 473 90 q 530 204 519 157 q 541 308 541 250 m 158 320 q 169 241 158 279 q 199 171 180 204 l 459 515 q 403 560 433 544 q 343 576 373 576 q 256 556 291 576 q 199 502 221 536 q 167 421 176 468 q 158 320 158 374 m 642 644 l 572 552 q 626 452 607 509 q 645 328 645 396 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 249 -7 289 -20 q 176 29 209 5 l 164 12 q 146 0 157 7 q 123 -14 135 -7 q 98 -27 110 -21 q 78 -36 86 -33 l 59 -14 l 126 75 q 72 175 91 118 q 54 300 54 233 q 65 389 54 345 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 362 651 320 651 q 450 637 409 651 q 523 600 490 624 l 538 619 q 557 632 546 625 q 578 646 567 639 q 600 658 589 653 q 620 667 611 664 l 642 644 m 326 710 q 305 717 314 712 q 288 729 295 722 l 446 1010 q 468 1007 455 1009 q 496 1003 481 1005 q 524 999 510 1001 q 545 994 537 996 l 560 967 l 326 710 "},"²":{"x_min":40.390625,"x_max":403.78125,"ha":457,"o":"m 397 421 l 53 421 l 40 450 q 138 549 96 506 q 210 626 180 592 q 260 684 240 659 q 290 729 279 709 q 306 764 302 748 q 311 796 311 780 q 290 856 311 834 q 222 878 270 878 q 188 871 203 878 q 163 853 174 864 q 146 828 152 842 q 140 800 140 814 q 105 787 124 792 q 65 780 87 782 l 53 792 q 69 836 53 813 q 114 878 86 859 q 179 910 142 897 q 254 923 215 923 q 312 916 285 923 q 357 895 338 909 q 386 859 376 880 q 397 807 397 837 q 384 752 397 780 q 341 688 371 725 q 262 600 311 651 q 139 477 213 550 l 325 477 q 350 487 340 477 q 365 509 359 497 q 373 542 371 523 l 403 537 l 397 421 "},"́":{"x_min":-436.09375,"x_max":-163.453125,"ha":0,"o":"m -397 710 q -419 717 -409 712 q -436 729 -428 722 l -277 1010 q -256 1007 -269 1009 q -228 1003 -242 1005 q -200 999 -213 1001 q -179 994 -186 996 l -163 967 l -397 710 "},"ḣ":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 543 496 549 470 q 528 537 538 522 q 500 557 517 552 q 462 563 484 563 q 411 550 438 563 q 353 514 383 538 q 293 455 324 491 q 234 372 263 419 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 880 q 129 924 132 908 q 117 949 127 940 q 88 961 107 958 q 37 969 69 965 l 37 996 q 88 1007 65 1002 q 132 1019 112 1013 q 170 1033 152 1025 q 208 1051 189 1040 l 234 1027 l 233 463 q 298 541 262 507 q 370 600 334 576 q 440 638 406 625 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 m 459 1215 q 453 1179 459 1196 q 436 1150 447 1162 q 412 1130 426 1137 q 380 1122 397 1122 q 336 1139 350 1122 q 323 1187 323 1156 q 329 1223 323 1206 q 346 1252 335 1240 q 371 1272 357 1265 q 401 1279 385 1279 q 459 1215 459 1279 "},"ḉ":{"x_min":54,"x_max":569.421875,"ha":607,"o":"m 444 -155 q 432 -203 444 -180 q 394 -245 420 -226 q 330 -278 369 -264 q 234 -301 290 -292 l 219 -267 q 279 -252 255 -261 q 320 -232 304 -243 q 342 -209 335 -221 q 350 -187 350 -197 q 332 -154 350 -164 q 273 -141 315 -145 q 279 -122 274 -139 q 294 -77 284 -108 q 313 -20 301 -55 q 218 1 264 -19 q 134 65 171 23 q 76 166 98 106 q 54 301 54 225 q 80 438 54 374 q 154 548 107 501 q 263 623 200 596 q 400 651 326 651 q 445 647 422 651 q 490 636 469 643 q 530 619 512 629 q 559 597 548 609 q 557 574 560 588 q 548 542 554 559 q 534 510 541 525 q 520 485 527 495 l 495 492 q 478 519 490 504 q 446 546 465 533 q 400 567 427 559 q 339 576 373 576 q 270 560 303 576 q 211 512 237 544 q 171 432 186 480 q 156 321 156 385 q 173 217 156 264 q 219 136 190 170 q 285 85 248 103 q 363 67 323 67 q 399 69 382 67 q 434 79 415 71 q 479 106 454 88 q 542 156 505 123 l 569 128 q 491 47 525 76 q 429 2 458 17 q 374 -16 401 -12 q 366 -17 370 -17 l 349 -70 q 383 -81 366 -74 q 414 -97 401 -87 q 435 -122 427 -107 q 444 -155 444 -136 m 303 710 q 281 717 290 712 q 264 729 271 723 l 423 1010 q 444 1007 431 1009 q 472 1003 457 1005 q 500 999 486 1001 q 521 994 514 996 l 537 967 l 303 710 "},"Ã":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 637 1103 q 608 1047 625 1075 q 570 998 591 1020 q 525 963 550 977 q 474 950 501 950 q 429 961 451 950 q 387 988 408 973 q 347 1015 367 1003 q 307 1027 327 1027 q 258 1005 280 1027 q 210 945 236 982 l 174 958 q 203 1013 187 986 q 241 1063 220 1041 q 286 1098 262 1084 q 337 1112 310 1112 q 385 1100 362 1112 q 429 1073 408 1088 q 467 1046 449 1058 q 502 1035 486 1035 q 553 1056 528 1035 q 600 1118 577 1078 l 637 1103 "},"ˀ":{"x_min":21,"x_max":410,"ha":422,"o":"m 169 551 l 169 622 q 180 680 169 654 q 209 728 191 706 q 247 771 227 751 q 284 812 266 792 q 313 852 302 832 q 325 896 325 872 q 315 941 325 921 q 289 975 305 961 q 251 997 272 990 q 205 1005 229 1005 q 172 998 189 1005 q 143 980 156 991 q 121 954 129 969 q 113 923 113 939 q 114 911 113 917 q 118 899 116 905 q 79 889 102 893 q 34 884 56 886 l 21 896 q 21 903 21 899 l 21 910 q 38 964 21 938 q 87 1009 56 990 q 158 1039 118 1028 q 242 1051 198 1051 q 312 1040 281 1051 q 365 1011 344 1030 q 398 968 386 992 q 410 914 410 943 q 398 860 410 884 q 369 816 387 836 q 332 777 351 796 q 294 739 312 759 q 265 696 276 719 q 254 646 254 674 l 254 551 l 169 551 "},"̄":{"x_min":-578.53125,"x_max":-120.046875,"ha":0,"o":"m -120 868 q -124 851 -121 861 q -132 831 -128 841 q -140 812 -136 822 q -146 797 -143 803 l -563 797 l -578 813 q -573 830 -577 821 q -566 850 -570 840 q -558 869 -562 859 q -550 885 -554 878 l -134 885 l -120 868 "},"Ṍ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 648 1103 q 619 1047 636 1075 q 581 998 602 1020 q 536 963 560 977 q 485 950 512 950 q 440 961 461 950 q 398 988 419 973 q 358 1015 378 1003 q 318 1027 338 1027 q 269 1005 291 1027 q 221 945 246 982 l 185 958 q 214 1013 198 986 q 252 1063 231 1041 q 297 1098 273 1084 q 347 1112 321 1112 q 396 1100 373 1112 q 440 1073 419 1088 q 478 1046 460 1058 q 513 1035 497 1035 q 563 1056 539 1035 q 611 1118 588 1078 l 648 1103 m 327 1144 q 310 1155 316 1148 q 297 1174 305 1161 l 559 1390 q 577 1379 566 1385 q 601 1365 589 1373 q 623 1352 613 1358 q 639 1339 634 1345 l 645 1309 l 327 1144 "},"©":{"x_min":68,"x_max":922,"ha":990,"o":"m 690 250 q 632 201 659 221 q 579 169 604 181 q 528 152 553 157 q 479 147 503 147 q 393 164 435 147 q 317 215 350 182 q 263 297 284 249 q 243 408 243 346 q 265 531 243 476 q 327 626 288 587 q 418 686 366 665 q 528 708 470 708 q 617 695 579 708 q 681 666 655 683 q 679 655 684 664 q 668 635 675 646 q 652 614 661 624 q 638 599 644 604 l 621 602 q 567 637 597 621 q 495 654 536 654 q 444 643 473 654 q 391 606 416 632 q 348 535 365 579 q 331 425 331 491 q 351 330 331 371 q 401 262 371 289 q 465 220 431 234 q 528 207 500 207 q 557 209 543 207 q 589 219 572 212 q 626 238 606 226 q 671 269 646 250 q 682 260 677 267 q 690 250 686 252 m 864 428 q 836 579 864 508 q 759 703 809 650 q 642 786 710 755 q 494 817 575 817 q 346 786 414 817 q 230 703 279 755 q 153 579 180 650 q 126 428 126 508 q 153 276 126 347 q 230 152 180 204 q 346 68 279 99 q 494 38 414 38 q 642 68 575 38 q 759 152 710 99 q 836 276 809 204 q 864 428 864 347 m 922 428 q 907 309 922 366 q 866 202 892 251 q 801 111 839 152 q 715 41 762 70 q 611 -4 667 11 q 494 -20 556 -20 q 323 15 401 -20 q 188 111 245 50 q 99 253 131 171 q 68 428 68 335 q 99 602 68 520 q 188 744 131 683 q 323 839 245 804 q 494 875 401 875 q 611 859 556 875 q 715 813 667 843 q 801 744 762 784 q 866 653 839 703 q 907 546 892 603 q 922 428 922 489 "},"≥":{"x_min":41.375,"x_max":568.34375,"ha":610,"o":"m 568 192 q 558 163 564 178 q 548 135 552 147 l 58 135 l 41 153 q 50 181 44 167 q 62 210 56 196 l 551 210 l 568 192 m 41 646 q 71 669 56 659 q 98 691 86 680 l 552 521 l 568 505 q 559 470 564 489 q 547 436 554 452 l 58 254 l 41 271 q 46 287 43 278 q 51 305 48 296 q 56 323 54 315 q 62 338 59 332 l 436 478 l 52 620 l 41 646 "},"ẙ":{"x_min":-31.875,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 369 -55 q 306 -184 341 -130 q 233 -272 271 -237 q 158 -322 196 -306 q 86 -339 120 -339 q 38 -335 60 -339 q 1 -327 16 -332 q -23 -315 -14 -322 q -31 -303 -31 -309 q -23 -286 -31 -298 q -3 -259 -15 -274 q 22 -231 8 -245 q 47 -211 36 -218 q 112 -231 80 -230 q 169 -223 144 -233 q 198 -204 181 -219 q 230 -168 214 -189 q 263 -118 247 -146 q 291 -62 279 -91 l 311 -15 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 123 l 522 555 q 523 573 525 565 q 511 585 520 580 q 485 594 502 590 q 444 601 469 597 l 444 631 l 670 631 l 670 601 m 424 843 q 420 874 424 859 q 409 900 416 889 q 390 918 401 911 q 366 925 380 925 q 339 919 352 925 q 316 903 326 913 q 300 877 306 892 q 294 844 294 862 q 298 814 294 828 q 310 788 302 799 q 328 770 317 777 q 352 764 339 764 q 379 769 366 764 q 402 784 392 774 q 418 808 412 794 q 424 843 424 823 m 485 871 q 472 807 485 836 q 437 757 459 778 q 390 723 416 735 q 338 712 364 712 q 296 720 315 712 q 263 742 277 728 q 241 775 249 756 q 233 816 233 794 q 246 880 233 851 q 281 931 260 910 q 328 965 302 953 q 380 977 354 977 q 421 968 402 977 q 455 945 441 960 q 477 911 469 930 q 485 871 485 892 "},"Ă":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 626 1139 q 580 1046 606 1084 q 527 985 555 1009 q 468 952 499 962 q 407 942 438 942 q 343 952 374 942 q 283 985 311 962 q 230 1046 255 1009 q 185 1139 206 1084 q 202 1158 193 1151 q 221 1170 210 1164 q 260 1104 238 1131 q 307 1062 282 1078 q 357 1039 331 1046 q 404 1032 382 1032 q 454 1039 428 1032 q 505 1062 480 1046 q 552 1104 530 1078 q 590 1170 574 1131 q 610 1158 602 1164 q 626 1139 618 1151 "},"ǖ":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 572 854 q 566 818 572 835 q 550 789 560 801 q 525 769 539 776 q 494 762 511 762 q 450 778 463 762 q 436 826 436 795 q 443 862 436 845 q 460 892 449 879 q 484 911 470 904 q 515 919 498 919 q 572 854 572 919 m 301 854 q 295 818 301 835 q 279 789 289 801 q 254 769 268 776 q 223 762 240 762 q 179 778 192 762 q 165 826 165 795 q 172 862 165 845 q 189 892 178 879 q 213 911 199 904 q 244 919 227 919 q 301 854 301 919 m 605 1112 q 600 1095 604 1105 q 593 1076 597 1085 q 585 1056 589 1066 q 579 1041 581 1047 l 162 1041 l 147 1058 q 151 1075 148 1065 q 159 1094 155 1084 q 167 1113 163 1104 q 174 1129 171 1122 l 590 1129 l 605 1112 "},"ǹ":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 544 496 549 470 q 529 537 539 522 q 502 557 519 552 q 462 563 486 563 q 415 552 441 563 q 360 520 389 542 q 298 461 330 497 q 234 372 266 425 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 59 l 132 482 q 129 524 132 508 q 118 548 127 540 q 90 561 109 557 q 37 570 71 565 l 37 597 q 122 618 83 604 q 199 651 161 632 l 223 627 l 231 458 q 296 539 260 503 q 369 599 332 575 q 440 637 406 624 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 m 468 731 q 451 718 459 722 q 430 710 442 713 l 191 965 l 206 993 q 226 998 213 995 q 254 1003 240 1000 q 283 1007 269 1005 q 305 1010 297 1009 l 468 731 "},"ÿ":{"x_min":-31.875,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 369 -55 q 306 -184 341 -130 q 233 -272 271 -237 q 158 -322 196 -306 q 86 -339 120 -339 q 38 -335 60 -339 q 1 -327 16 -332 q -23 -315 -14 -322 q -31 -303 -31 -309 q -23 -286 -31 -298 q -3 -259 -15 -274 q 22 -231 8 -245 q 47 -211 36 -218 q 112 -231 80 -230 q 169 -223 144 -233 q 198 -204 181 -219 q 230 -168 214 -189 q 263 -118 247 -146 q 291 -62 279 -91 l 311 -15 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 123 l 522 555 q 523 573 525 565 q 511 585 520 580 q 485 594 502 590 q 444 601 469 597 l 444 631 l 670 631 l 670 601 m 562 854 q 556 818 562 835 q 539 789 550 801 q 515 769 529 776 q 483 762 500 762 q 440 778 453 762 q 426 826 426 795 q 432 862 426 845 q 449 892 438 879 q 474 911 460 904 q 504 919 488 919 q 562 854 562 919 m 291 854 q 285 818 291 835 q 268 789 279 801 q 244 769 258 776 q 212 762 229 762 q 169 778 182 762 q 155 826 155 795 q 161 862 155 845 q 178 892 167 879 q 203 911 189 904 q 233 919 217 919 q 291 854 291 919 "},"Ḹ":{"x_min":33.65625,"x_max":640.484375,"ha":661,"o":"m 640 165 q 626 63 635 106 q 612 0 618 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 111 q 246 89 241 99 q 266 74 252 80 q 305 64 281 67 q 367 61 329 61 l 464 61 q 516 64 495 61 q 554 79 538 67 q 583 114 570 91 q 611 177 597 137 l 640 165 m 405 -189 q 399 -225 405 -208 q 382 -254 393 -242 q 357 -274 372 -267 q 326 -282 343 -282 q 282 -265 295 -282 q 269 -217 269 -248 q 275 -181 269 -198 q 292 -151 281 -164 q 317 -132 303 -139 q 347 -125 331 -125 q 405 -189 405 -125 m 552 1058 q 548 1041 551 1051 q 540 1021 544 1031 q 532 1002 536 1012 q 526 987 529 993 l 109 987 l 94 1003 q 99 1020 95 1011 q 106 1040 102 1030 q 114 1059 110 1049 q 122 1075 118 1068 l 537 1075 l 552 1058 "},"Ł":{"x_min":27.5625,"x_max":640.484375,"ha":661,"o":"m 640 165 q 626 63 635 106 q 612 0 618 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 361 l 45 318 l 27 333 q 33 348 29 339 q 42 365 37 356 q 52 382 47 374 q 62 393 58 389 l 132 428 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 483 l 429 578 l 447 561 q 431 531 441 549 q 411 502 420 514 l 241 416 l 241 111 q 246 89 241 99 q 266 74 252 80 q 305 64 281 67 q 367 61 329 61 l 464 61 q 516 64 495 61 q 554 79 538 67 q 583 114 570 91 q 611 177 597 137 l 640 165 "},"∫":{"x_min":-139.921875,"x_max":493.25,"ha":376,"o":"m 493 965 q 483 949 493 959 q 460 927 473 938 q 431 906 446 916 q 407 892 417 896 q 378 930 392 915 q 351 953 365 944 q 327 964 338 961 q 306 968 315 968 q 269 957 284 968 q 243 920 253 946 q 228 853 233 895 q 224 750 224 812 q 226 650 224 708 q 232 526 228 592 q 241 390 236 460 q 249 253 245 320 q 255 125 253 185 q 258 20 258 65 q 245 -84 258 -38 q 214 -165 233 -130 q 170 -226 194 -200 q 121 -271 145 -252 q 82 -297 103 -285 q 42 -319 62 -310 q 3 -333 22 -328 q -27 -339 -14 -339 q -68 -333 -48 -339 q -104 -321 -88 -328 q -130 -305 -120 -313 q -139 -291 -139 -297 q -130 -275 -139 -285 q -106 -253 -120 -264 q -78 -231 -93 -241 q -53 -216 -63 -221 q -9 -241 -32 -235 q 39 -247 14 -247 q 77 -235 58 -247 q 113 -196 97 -224 q 138 -120 128 -168 q 149 0 149 -72 q 146 93 149 37 q 140 216 144 150 q 132 352 136 282 q 123 490 127 423 q 117 614 119 556 q 115 712 115 672 q 121 812 115 770 q 141 885 128 853 q 175 941 155 916 q 222 988 196 965 q 294 1035 257 1019 q 358 1051 332 1051 q 412 1039 388 1051 q 455 1014 437 1028 q 483 985 473 999 q 493 965 493 971 "},"\\":{"x_min":37.296875,"x_max":613.796875,"ha":652,"o":"m 590 -227 q 571 -220 581 -224 q 549 -211 560 -216 q 528 -202 538 -207 q 512 -192 518 -197 l 37 1070 l 62 1085 q 139 1051 101 1074 l 613 -210 l 590 -227 "},"Ì":{"x_min":-28.484375,"x_max":353.34375,"ha":414,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 m 320 957 q 305 938 310 944 q 289 927 300 931 l -28 1092 l -23 1122 q -7 1134 -18 1128 q 14 1148 2 1141 q 38 1162 27 1156 q 57 1173 50 1168 l 320 957 "},"Ȱ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 485 1045 q 479 1009 485 1026 q 462 980 473 992 q 437 960 452 967 q 406 953 423 953 q 362 969 375 953 q 349 1018 349 986 q 355 1053 349 1036 q 372 1083 361 1070 q 397 1102 383 1095 q 427 1110 411 1110 q 485 1045 485 1110 m 653 1275 q 648 1258 651 1268 q 640 1238 644 1248 q 633 1219 636 1229 q 626 1204 629 1210 l 209 1204 l 194 1220 q 199 1237 196 1228 q 206 1257 202 1247 q 214 1276 210 1267 q 222 1292 219 1285 l 638 1292 l 653 1275 "},"Ḳ":{"x_min":33.65625,"x_max":796.46875,"ha":803,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 438 l 518 765 q 538 794 534 783 q 535 811 542 805 q 511 820 528 817 q 468 825 494 823 l 468 855 l 753 855 l 753 825 q 714 820 731 823 q 683 813 697 817 q 659 802 670 808 q 637 783 647 795 l 340 455 l 668 85 q 694 64 680 72 q 724 54 708 57 q 757 51 740 51 q 791 53 774 51 l 796 24 q 716 0 756 11 q 643 -10 675 -10 q 608 -3 623 -10 q 579 19 593 2 l 241 433 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 483 -189 q 477 -225 483 -208 q 460 -254 471 -242 q 435 -274 450 -267 q 404 -282 421 -282 q 360 -265 373 -282 q 347 -217 347 -248 q 353 -181 347 -198 q 370 -151 359 -164 q 395 -132 381 -139 q 425 -125 409 -125 q 483 -189 483 -125 "},"ḗ":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 581 868 q 577 851 580 861 q 569 831 573 841 q 561 812 565 822 q 555 797 558 803 l 138 797 l 123 813 q 128 830 124 821 q 135 850 131 840 q 143 869 139 859 q 151 885 147 878 l 566 885 l 581 868 m 316 954 q 295 961 304 956 q 278 973 285 967 l 436 1254 q 458 1251 444 1253 q 485 1248 471 1250 q 514 1243 500 1246 q 535 1238 527 1240 l 550 1212 l 316 954 "},"ṙ":{"x_min":37.046875,"x_max":528.015625,"ha":550,"o":"m 522 625 q 528 602 528 621 q 522 556 527 582 q 509 503 517 530 q 493 458 501 476 l 463 458 q 452 504 459 485 q 435 534 444 523 q 413 550 425 545 q 388 556 401 556 q 353 543 373 556 q 312 504 333 530 q 270 435 291 477 q 234 336 250 393 l 234 70 q 259 49 234 60 q 348 29 284 38 l 348 0 l 37 0 l 37 29 q 106 49 81 39 q 132 70 132 59 l 132 465 q 130 502 132 487 q 127 527 129 518 q 122 542 125 537 q 116 551 119 547 q 105 559 111 556 q 90 564 100 562 q 68 567 81 566 q 37 569 56 568 l 37 596 q 123 620 81 608 q 200 651 166 632 l 224 627 l 233 473 q 272 543 250 510 q 318 599 293 575 q 369 637 342 623 q 425 651 396 651 q 472 645 446 651 q 522 625 497 640 m 373 854 q 367 818 373 835 q 350 789 361 801 q 325 769 340 776 q 294 762 311 762 q 250 778 264 762 q 237 826 237 795 q 243 862 237 845 q 260 892 249 879 q 285 911 271 904 q 315 919 299 919 q 373 854 373 919 "},"Ḋ":{"x_min":27.5625,"x_max":761,"ha":823,"o":"m 307 818 q 241 816 273 818 l 241 104 q 248 80 241 89 q 284 62 257 68 q 364 57 311 57 q 460 79 411 57 q 551 148 510 102 q 619 265 593 195 q 646 432 646 336 q 623 593 646 522 q 558 715 601 665 q 451 791 515 765 q 307 818 388 818 m 761 458 q 743 306 761 373 q 697 188 726 240 q 629 102 668 137 q 548 43 591 66 q 462 10 506 21 q 378 0 418 0 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 805 q 80 799 104 802 q 33 792 56 795 l 27 834 q 96 849 57 842 q 178 863 135 857 q 266 871 222 868 q 350 875 310 875 q 521 846 445 875 q 650 765 596 818 q 732 634 703 711 q 761 458 761 556 m 441 1045 q 435 1009 441 1026 q 418 980 429 992 q 393 960 408 967 q 362 953 379 953 q 318 969 331 953 q 305 1018 305 986 q 311 1053 305 1036 q 328 1083 317 1070 q 353 1102 339 1095 q 383 1110 367 1110 q 441 1045 441 1110 "},"Ē":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 576 1058 q 571 1041 575 1051 q 564 1021 568 1031 q 556 1002 560 1012 q 550 987 552 993 l 132 987 l 118 1003 q 122 1020 119 1011 q 130 1040 126 1030 q 138 1059 134 1049 q 145 1075 142 1068 l 561 1075 l 576 1058 "},"!":{"x_min":103,"x_max":264,"ha":378,"o":"m 264 83 q 256 39 264 59 q 237 4 249 19 q 207 -18 224 -10 q 170 -27 190 -27 q 118 -7 134 -27 q 103 48 103 12 q 110 91 103 71 q 130 127 117 111 q 160 151 143 142 q 197 160 178 160 q 247 140 230 160 q 264 83 264 120 m 221 264 q 198 248 208 254 q 170 237 187 243 l 151 251 l 119 948 q 173 979 145 965 q 225 1004 202 994 l 254 987 l 221 264 "},"ç":{"x_min":54,"x_max":569.421875,"ha":607,"o":"m 444 -155 q 432 -203 444 -180 q 394 -245 420 -226 q 330 -278 369 -264 q 234 -301 290 -292 l 219 -267 q 279 -252 255 -261 q 320 -232 304 -243 q 342 -209 335 -221 q 350 -187 350 -197 q 332 -154 350 -164 q 273 -141 315 -145 q 279 -122 274 -139 q 294 -77 284 -108 q 313 -20 301 -55 q 218 1 264 -19 q 134 65 171 23 q 76 166 98 106 q 54 301 54 225 q 80 438 54 374 q 154 548 107 501 q 263 623 200 596 q 400 651 326 651 q 445 647 422 651 q 490 636 469 643 q 530 619 512 629 q 559 597 548 609 q 557 574 560 588 q 548 542 554 559 q 534 510 541 525 q 520 485 527 495 l 495 492 q 478 519 490 504 q 446 546 465 533 q 400 567 427 559 q 339 576 373 576 q 270 560 303 576 q 211 512 237 544 q 171 432 186 480 q 156 321 156 385 q 173 217 156 264 q 219 136 190 170 q 285 85 248 103 q 363 67 323 67 q 399 69 382 67 q 434 79 415 71 q 479 106 454 88 q 542 156 505 123 l 569 128 q 491 47 525 76 q 429 2 458 17 q 374 -16 401 -12 q 366 -17 370 -17 l 349 -70 q 383 -81 366 -74 q 414 -97 401 -87 q 435 -122 427 -107 q 444 -155 444 -136 "},"ǯ":{"x_min":26.015625,"x_max":577,"ha":624,"o":"m 577 -17 q 548 -148 577 -89 q 475 -249 520 -207 q 372 -315 429 -292 q 259 -339 316 -339 q 168 -326 211 -339 q 94 -295 125 -313 q 44 -258 62 -277 q 26 -228 26 -240 q 35 -214 26 -224 q 59 -194 45 -204 q 89 -174 73 -183 q 120 -162 106 -164 q 199 -240 159 -213 q 285 -268 240 -268 q 361 -253 326 -268 q 421 -212 395 -239 q 460 -144 446 -184 q 475 -52 475 -103 q 460 36 475 -6 q 416 113 445 80 q 345 167 387 147 q 250 186 304 187 q 195 181 222 186 q 142 167 169 176 q 129 180 137 170 q 118 196 121 191 l 408 570 l 177 570 q 155 565 167 570 q 134 550 144 561 q 114 519 123 539 q 98 468 105 499 l 65 476 l 78 642 q 105 635 92 637 q 130 632 117 633 q 159 631 144 631 l 529 631 l 546 601 l 276 252 q 299 254 288 253 q 321 255 310 255 q 422 235 375 253 q 503 182 468 216 q 557 97 537 147 q 577 -17 577 47 m 337 726 l 265 726 l 86 934 q 94 945 90 940 q 100 953 97 950 q 107 959 103 957 q 116 966 111 962 l 303 822 l 486 966 q 502 953 497 959 q 515 934 507 947 l 337 726 "},"Ǡ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 474 1045 q 468 1009 474 1026 q 451 980 462 992 q 426 960 441 967 q 395 953 412 953 q 351 969 365 953 q 338 1018 338 986 q 344 1053 338 1036 q 361 1083 350 1070 q 386 1102 372 1095 q 416 1110 400 1110 q 474 1045 474 1110 m 642 1275 q 637 1258 640 1268 q 630 1238 634 1248 q 622 1219 626 1229 q 615 1204 618 1210 l 198 1204 l 183 1220 q 188 1237 185 1228 q 196 1257 191 1247 q 204 1276 200 1267 q 211 1292 208 1285 l 627 1292 l 642 1275 "},"Ȩ":{"x_min":33.65625,"x_max":646.609375,"ha":689,"o":"m 452 -155 q 440 -203 452 -180 q 403 -245 428 -226 q 338 -278 378 -264 q 244 -301 299 -292 l 229 -267 q 288 -252 264 -261 q 328 -232 313 -243 q 350 -209 343 -221 q 358 -187 358 -197 q 340 -154 358 -164 q 281 -141 323 -145 q 287 -122 282 -139 q 302 -77 292 -108 q 327 0 311 -50 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 378 61 334 61 l 466 61 q 519 64 497 61 q 558 79 541 67 q 589 114 575 91 q 617 177 603 137 l 646 165 q 632 63 641 107 q 618 0 624 19 l 380 0 l 357 -70 q 391 -81 374 -74 q 422 -97 409 -87 q 443 -122 435 -107 q 452 -155 452 -136 "},"̣":{"x_min":-417,"x_max":-281,"ha":0,"o":"m -281 -189 q -287 -225 -281 -208 q -303 -254 -293 -242 q -328 -274 -314 -267 q -359 -282 -342 -282 q -403 -265 -390 -282 q -417 -217 -417 -248 q -410 -181 -417 -198 q -393 -151 -404 -164 q -369 -132 -383 -139 q -338 -125 -355 -125 q -281 -189 -281 -125 "},"đ":{"x_min":54,"x_max":720.9375,"ha":722,"o":"m 712 56 q 657 21 681 35 q 615 -2 633 6 q 584 -16 597 -12 q 561 -21 571 -21 q 525 9 539 -21 q 506 114 510 40 q 454 58 480 83 q 402 16 429 33 q 346 -10 375 -1 q 281 -20 316 -20 q 203 2 243 -20 q 130 65 163 24 q 75 166 96 106 q 54 301 54 226 q 64 381 54 339 q 94 461 75 422 q 142 534 114 499 q 206 595 171 568 q 283 636 241 621 q 373 651 325 651 q 436 643 405 651 q 505 608 468 635 l 505 773 l 315 773 l 299 787 q 306 810 302 798 q 315 834 309 823 l 505 834 l 505 863 q 502 922 505 900 q 491 956 500 944 q 462 972 481 968 q 406 980 442 977 l 406 1006 q 506 1026 462 1014 q 585 1051 550 1039 l 607 1030 l 607 834 l 705 834 l 720 817 l 705 773 l 607 773 l 607 172 q 608 131 607 148 q 611 103 609 114 q 615 84 613 91 q 622 71 618 76 q 645 67 628 64 q 703 86 663 70 l 712 56 m 505 177 l 505 494 q 441 554 482 533 q 352 576 401 576 q 273 560 309 576 q 211 512 237 544 q 170 433 185 480 q 156 322 156 385 q 172 217 156 264 q 214 137 189 170 q 271 85 240 103 q 330 68 302 68 q 375 77 353 68 q 419 102 397 86 q 462 137 441 117 q 505 177 484 156 "},"ċ":{"x_min":54,"x_max":569.71875,"ha":607,"o":"m 569 129 q 492 47 525 76 q 430 2 458 17 q 374 -16 401 -12 q 315 -20 347 -20 q 218 2 265 -20 q 134 65 171 24 q 76 166 98 106 q 54 301 54 226 q 80 438 54 374 q 154 548 107 501 q 263 623 200 596 q 400 651 326 651 q 445 647 422 651 q 490 636 469 643 q 530 619 512 629 q 559 597 548 609 q 557 574 560 588 q 548 542 554 559 q 534 510 541 525 q 520 485 527 495 l 495 492 q 478 519 490 504 q 446 546 465 533 q 400 567 427 559 q 339 576 373 576 q 270 560 303 576 q 211 512 237 544 q 171 433 186 480 q 156 322 156 385 q 173 217 156 264 q 219 137 190 170 q 285 85 248 103 q 364 68 323 68 q 399 69 383 68 q 435 80 415 71 q 479 106 454 89 q 543 156 505 124 l 569 129 m 400 854 q 394 818 400 835 q 377 789 388 801 q 353 769 367 776 q 321 762 338 762 q 277 778 291 762 q 264 826 264 795 q 270 862 264 845 q 287 892 276 879 q 312 911 298 904 q 342 919 326 919 q 400 854 400 919 "},"Ā":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 642 1058 q 637 1041 640 1051 q 630 1021 634 1031 q 622 1002 626 1012 q 615 987 618 993 l 198 987 l 183 1003 q 188 1020 185 1011 q 196 1040 191 1030 q 204 1059 200 1049 q 211 1075 208 1068 l 627 1075 l 642 1058 "},"Ẃ":{"x_min":13.5625,"x_max":1154.328125,"ha":1181,"o":"m 1154 825 q 1104 814 1124 819 q 1073 803 1085 808 q 1057 793 1062 798 q 1051 783 1051 789 l 895 40 q 881 15 892 26 q 855 -2 870 5 q 826 -13 841 -9 q 801 -20 811 -17 l 580 640 l 385 40 q 369 15 381 26 q 343 -1 358 5 q 313 -12 328 -8 q 283 -20 297 -17 l 107 778 q 82 806 103 795 q 13 825 61 817 l 13 855 l 304 855 l 304 825 q 252 817 271 822 q 223 806 233 812 q 212 792 214 800 q 212 778 210 785 l 347 169 l 567 855 l 604 855 l 844 169 l 971 783 q 965 798 972 791 q 943 808 957 804 q 909 817 929 813 q 866 825 889 821 l 866 855 l 1154 855 l 1154 825 m 494 927 q 477 938 482 931 q 463 957 472 944 l 726 1173 q 744 1162 733 1168 q 768 1148 756 1156 q 790 1134 780 1141 q 806 1122 800 1128 l 812 1092 l 494 927 "},"ø":{"x_min":54,"x_max":645,"ha":699,"o":"m 541 308 q 530 387 541 349 q 501 458 519 426 l 241 115 q 298 70 269 86 q 355 55 328 55 q 438 72 404 55 q 496 124 473 90 q 530 204 519 157 q 541 308 541 250 m 158 320 q 169 241 158 279 q 199 171 180 204 l 459 515 q 403 560 433 544 q 343 576 373 576 q 256 556 291 576 q 199 502 221 536 q 167 421 176 468 q 158 320 158 374 m 642 644 l 572 552 q 626 452 607 509 q 645 328 645 396 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 249 -7 289 -20 q 176 29 209 5 l 164 12 q 146 0 157 7 q 123 -14 135 -7 q 98 -27 110 -21 q 78 -36 86 -33 l 59 -14 l 126 75 q 72 175 91 118 q 54 300 54 233 q 65 389 54 345 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 362 651 320 651 q 450 637 409 651 q 523 600 490 624 l 538 619 q 557 632 546 625 q 578 646 567 639 q 600 658 589 653 q 620 667 611 664 l 642 644 "},"â":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 539 740 q 526 721 531 727 q 510 710 522 715 l 324 891 l 141 710 q 131 715 135 712 q 125 721 128 718 q 118 729 122 724 q 110 740 115 734 l 289 998 l 362 998 l 539 740 "},"}":{"x_min":26.203125,"x_max":399.421875,"ha":467,"o":"m 399 441 q 278 379 318 420 q 238 285 238 338 q 240 238 238 258 q 244 203 242 219 q 251 174 247 188 q 257 145 254 161 q 262 109 260 129 q 264 62 264 89 q 248 -24 264 15 q 204 -98 233 -64 q 135 -162 176 -133 q 44 -214 94 -190 l 26 -180 q 75 -143 52 -164 q 115 -97 98 -123 q 141 -42 132 -72 q 151 23 151 -11 q 147 87 151 62 q 138 134 143 112 q 129 181 133 156 q 125 247 125 207 q 133 302 125 275 q 157 353 141 329 q 195 396 173 376 q 247 427 218 415 q 189 449 213 434 q 151 488 166 465 q 131 542 137 511 q 125 611 125 573 q 129 680 125 651 q 138 733 133 708 q 147 783 143 758 q 151 842 151 808 q 145 909 151 880 q 127 961 140 938 q 91 1004 114 985 q 32 1043 68 1023 l 48 1085 q 146 1037 105 1062 q 213 980 187 1011 q 251 911 239 949 q 264 823 264 872 q 260 757 264 783 q 251 706 256 730 q 242 655 246 682 q 238 586 238 627 q 265 502 238 531 q 343 474 292 474 l 356 474 q 364 474 360 474 q 372 475 367 475 l 387 479 l 399 441 "},"‰":{"x_min":52,"x_max":1356,"ha":1408,"o":"m 1257 196 q 1248 278 1257 243 q 1226 337 1239 313 q 1194 371 1212 360 q 1156 383 1175 383 q 1126 373 1141 383 q 1099 343 1111 363 q 1080 294 1087 324 q 1073 225 1073 265 q 1080 140 1073 176 q 1101 81 1088 104 q 1133 46 1114 58 q 1173 35 1152 35 q 1205 45 1190 35 q 1232 75 1220 55 q 1250 126 1243 95 q 1257 196 1257 156 m 1356 209 q 1339 120 1356 162 q 1296 47 1323 78 q 1232 -2 1269 15 q 1157 -21 1196 -21 q 1083 -2 1116 -21 q 1025 47 1049 15 q 988 120 1001 78 q 975 209 975 162 q 991 298 975 256 q 1035 371 1008 339 q 1099 420 1063 402 q 1173 439 1135 439 q 1248 421 1214 439 q 1305 371 1281 403 q 1342 298 1329 340 q 1356 209 1356 257 m 810 196 q 801 278 810 243 q 778 337 793 313 q 746 371 764 360 q 708 383 727 383 q 678 373 693 383 q 652 343 664 363 q 634 294 641 324 q 627 225 627 265 q 634 140 627 176 q 655 81 641 104 q 686 46 668 58 q 726 35 704 35 q 758 45 743 35 q 784 75 773 55 q 803 126 796 95 q 810 196 810 156 m 907 209 q 890 120 907 162 q 847 47 874 78 q 783 -2 820 15 q 708 -21 747 -21 q 635 -2 669 -21 q 578 47 602 15 q 541 120 555 78 q 528 209 528 162 q 544 298 528 256 q 588 371 561 339 q 652 420 616 402 q 726 439 688 439 q 800 421 767 439 q 857 371 833 403 q 894 298 881 340 q 907 209 907 257 m 242 10 q 224 0 236 5 q 199 -8 212 -4 q 172 -17 185 -13 q 151 -24 159 -21 l 134 0 l 715 805 q 759 825 734 817 q 805 839 784 833 l 825 816 l 242 10 m 334 595 q 325 678 334 643 q 302 736 317 713 q 270 770 288 759 q 232 782 251 782 q 202 772 217 782 q 176 742 188 762 q 157 693 164 723 q 150 624 150 664 q 157 539 150 575 q 178 480 164 503 q 210 445 191 457 q 250 434 228 434 q 282 444 266 434 q 308 474 297 454 q 327 525 320 494 q 334 595 334 555 m 432 608 q 415 519 432 561 q 372 446 399 477 q 308 396 344 414 q 232 378 272 378 q 159 396 192 378 q 102 446 126 414 q 65 519 78 477 q 52 608 52 561 q 68 697 52 655 q 111 770 84 738 q 175 819 139 801 q 250 838 211 838 q 324 820 291 838 q 381 770 357 802 q 418 697 405 739 q 432 608 432 656 "},"Ä":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 609 1045 q 603 1009 609 1026 q 586 980 597 992 q 561 960 576 967 q 530 953 547 953 q 486 969 500 953 q 473 1018 473 986 q 479 1053 473 1036 q 496 1083 485 1070 q 521 1102 507 1095 q 551 1110 535 1110 q 609 1045 609 1110 m 338 1045 q 332 1009 338 1026 q 315 980 326 992 q 290 960 305 967 q 259 953 276 953 q 215 969 229 953 q 202 1018 202 986 q 208 1053 202 1036 q 225 1083 214 1070 q 250 1102 236 1095 q 280 1110 264 1110 q 338 1045 338 1110 "},"ř":{"x_min":37.046875,"x_max":528.015625,"ha":550,"o":"m 522 625 q 528 602 528 621 q 522 556 527 582 q 509 503 517 530 q 493 458 501 476 l 463 458 q 452 504 459 485 q 435 534 444 523 q 413 550 425 545 q 388 556 401 556 q 353 543 373 556 q 312 504 333 530 q 270 435 291 477 q 234 336 250 393 l 234 70 q 259 49 234 60 q 348 29 284 38 l 348 0 l 37 0 l 37 29 q 106 49 81 39 q 132 70 132 59 l 132 465 q 130 502 132 487 q 127 527 129 518 q 122 542 125 537 q 116 551 119 547 q 105 559 111 556 q 90 564 100 562 q 68 567 81 566 q 37 569 56 568 l 37 596 q 123 620 81 608 q 200 651 166 632 l 224 627 l 233 473 q 272 543 250 510 q 318 599 293 575 q 369 637 342 623 q 425 651 396 651 q 472 645 446 651 q 522 625 497 640 m 341 726 l 269 726 l 90 968 q 98 979 94 974 q 104 987 101 984 q 111 993 107 991 q 120 1000 115 996 l 307 829 l 490 1000 q 506 987 501 993 q 519 968 511 981 l 341 726 "},"Ṣ":{"x_min":79.515625,"x_max":600,"ha":661,"o":"m 600 255 q 591 193 600 225 q 567 130 583 161 q 525 72 550 99 q 467 24 501 45 q 391 -7 433 4 q 298 -20 349 -20 q 249 -15 276 -20 q 195 -2 223 -10 q 140 18 167 6 q 89 46 112 30 q 81 69 84 48 q 79 116 79 89 q 81 172 79 144 q 89 219 83 201 l 116 216 q 155 147 132 176 q 207 98 179 117 q 268 70 235 79 q 336 61 301 61 q 397 73 366 61 q 452 107 428 86 q 492 158 476 129 q 508 219 508 187 q 489 290 508 261 q 441 343 471 320 q 374 385 412 366 q 297 421 336 403 q 219 460 257 440 q 152 508 181 480 q 104 570 122 535 q 86 655 86 606 q 92 701 86 676 q 111 750 98 725 q 146 797 125 774 q 198 837 168 820 q 267 864 228 854 q 356 875 307 875 q 417 870 387 875 q 475 857 448 865 q 523 837 502 849 q 557 812 545 826 q 558 796 562 808 q 544 770 553 784 q 524 743 535 756 q 505 722 513 729 l 480 726 q 440 763 461 748 q 398 789 420 779 q 356 802 377 798 q 316 807 335 807 q 251 795 278 807 q 207 766 224 783 q 182 728 190 749 q 174 687 174 706 q 192 631 174 655 q 240 585 210 606 q 308 546 270 565 q 387 508 346 528 q 465 465 427 488 q 533 412 503 442 q 581 344 563 382 q 600 255 600 306 m 407 -189 q 401 -225 407 -208 q 384 -254 395 -242 q 359 -274 374 -267 q 328 -282 345 -282 q 284 -265 297 -282 q 271 -217 271 -248 q 277 -181 271 -198 q 294 -151 283 -164 q 319 -132 305 -139 q 349 -125 333 -125 q 407 -189 407 -125 "},"—":{"x_min":41.375,"x_max":1022.765625,"ha":1064,"o":"m 1022 370 q 1013 338 1019 355 q 1002 309 1007 320 l 58 309 l 41 325 q 50 356 44 340 q 62 387 56 373 l 1006 387 l 1022 370 "},"N":{"x_min":33.65625,"x_max":867.34375,"ha":901,"o":"m 33 0 l 33 29 q 107 48 83 35 q 132 70 132 61 l 132 779 q 84 811 109 800 q 33 825 60 821 l 33 855 l 177 855 q 194 853 187 855 q 207 846 200 851 q 221 830 214 840 q 242 802 229 819 l 688 187 l 688 783 q 665 805 688 791 q 589 825 643 818 l 589 855 l 867 855 l 867 825 q 793 806 818 819 q 769 783 769 793 l 769 -20 q 716 -6 735 -15 q 689 14 697 3 l 213 673 l 213 70 q 235 49 213 62 q 311 29 258 36 l 311 0 l 33 0 "},"Ṿ":{"x_min":13.5625,"x_max":874.90625,"ha":903,"o":"m 874 825 q 802 808 828 817 q 769 781 776 800 l 510 40 q 491 14 504 25 q 462 -2 478 4 q 432 -13 446 -9 q 408 -20 417 -17 l 109 781 q 79 809 103 798 q 13 825 56 820 l 13 855 l 308 855 l 308 825 q 234 811 254 821 q 221 782 214 802 l 461 138 l 689 781 q 672 809 696 800 q 592 825 648 819 l 592 855 l 874 855 l 874 825 m 512 -189 q 506 -225 512 -208 q 489 -254 500 -242 q 464 -274 479 -267 q 433 -282 450 -282 q 389 -265 403 -282 q 376 -217 376 -248 q 382 -181 376 -198 q 399 -151 388 -164 q 424 -132 410 -139 q 454 -125 438 -125 q 512 -189 512 -125 "},"⁄":{"x_min":134.28125,"x_max":728.40625,"ha":814,"o":"m 214 2 q 184 -10 198 -5 q 151 -20 169 -15 l 134 0 l 651 816 q 680 828 664 821 q 711 838 696 834 l 728 819 l 214 2 "},"2":{"x_min":66.421875,"x_max":567,"ha":652,"o":"m 557 0 l 86 0 l 66 50 q 207 215 147 143 q 309 343 267 287 q 380 440 352 398 q 424 514 408 481 q 446 574 440 547 q 453 627 453 601 q 445 685 453 658 q 421 733 438 713 q 379 765 405 753 q 316 777 353 777 q 265 763 288 777 q 225 729 242 749 q 199 683 208 708 q 189 633 189 657 q 169 622 178 627 q 150 612 160 616 q 129 605 141 608 q 103 600 118 602 l 84 621 q 108 694 84 656 q 171 764 132 732 q 260 817 210 796 q 362 838 310 838 q 439 826 403 838 q 501 791 474 814 q 542 731 527 768 q 558 645 558 695 q 549 584 558 615 q 521 518 540 554 q 473 441 503 483 q 402 346 444 398 q 305 228 359 293 q 180 82 250 163 l 463 82 q 484 87 475 82 q 500 100 493 92 q 512 119 507 109 q 521 142 517 130 q 532 202 529 168 l 567 194 l 557 0 "},"Ó":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 327 927 q 310 938 316 931 q 297 957 305 944 l 559 1173 q 577 1162 566 1168 q 601 1148 589 1156 q 623 1134 613 1141 q 639 1122 634 1128 l 645 1092 l 327 927 "},"˜":{"x_min":47.46875,"x_max":510.03125,"ha":558,"o":"m 510 912 q 480 857 497 884 q 443 808 463 830 q 398 773 422 787 q 347 760 373 760 q 302 771 323 760 q 260 798 280 783 q 220 825 240 813 q 180 837 200 837 q 130 814 153 837 q 83 755 108 792 l 47 768 q 76 823 59 796 q 113 873 92 851 q 159 908 134 894 q 209 922 183 922 q 258 910 235 922 q 301 883 281 898 q 340 856 322 868 q 375 845 358 845 q 425 866 400 845 q 473 928 450 888 l 510 912 "},"ˇ":{"x_min":33.90625,"x_max":463.21875,"ha":497,"o":"m 285 726 l 212 726 l 33 968 q 42 979 38 974 q 48 987 45 984 q 55 993 51 991 q 64 1000 59 996 l 250 829 l 434 1000 q 450 987 445 993 q 463 968 455 981 l 285 726 "},"":{"x_min":0,"x_max":200.078125,"ha":231,"o":"m 200 0 l 200 -26 l 26 -26 l 26 -200 l 0 -200 l 0 0 l 200 0 "},"Ŭ":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 679 1139 q 633 1046 659 1084 q 580 985 608 1009 q 521 952 552 962 q 460 942 491 942 q 396 952 427 942 q 336 985 364 962 q 283 1046 308 1009 q 238 1139 259 1084 q 255 1158 246 1151 q 274 1170 263 1164 q 313 1104 291 1131 q 360 1062 335 1078 q 409 1039 384 1046 q 457 1032 435 1032 q 507 1039 481 1032 q 558 1062 533 1046 q 605 1104 583 1078 q 643 1170 627 1131 q 663 1158 655 1164 q 679 1139 671 1151 "},"̌":{"x_min":-563.609375,"x_max":-134.28125,"ha":0,"o":"m -311 726 l -384 726 l -563 968 q -555 979 -558 974 q -549 987 -552 984 q -542 993 -545 991 q -533 1000 -538 996 l -346 829 l -163 1000 q -147 987 -151 993 q -134 968 -142 981 l -311 726 "},"ĝ":{"x_min":20,"x_max":670.8125,"ha":678,"o":"m 468 406 q 456 474 468 442 q 420 531 444 507 q 362 569 397 555 q 282 583 327 583 q 244 574 265 583 q 205 548 224 565 q 175 505 187 531 q 163 446 163 479 q 174 378 163 410 q 208 322 185 346 q 265 284 230 298 q 348 271 300 271 q 389 279 368 271 q 428 305 411 287 q 456 347 445 322 q 468 406 468 372 m 351 -2 q 303 3 325 0 q 263 10 282 6 q 186 -36 214 -15 q 143 -74 157 -57 q 125 -104 129 -90 q 122 -128 122 -118 q 140 -182 122 -157 q 191 -226 159 -208 q 265 -256 223 -245 q 353 -268 307 -268 q 436 -255 399 -268 q 500 -222 473 -243 q 541 -171 526 -200 q 556 -106 556 -141 q 547 -71 556 -87 q 515 -42 538 -55 q 452 -19 492 -29 q 351 -2 412 -9 m 563 434 q 539 339 563 382 q 478 265 516 296 q 392 217 440 234 q 294 200 343 200 l 291 200 q 246 154 259 172 q 234 132 234 136 q 241 116 234 124 q 268 102 248 109 q 321 87 287 94 q 408 74 355 80 q 530 50 482 66 q 607 12 578 33 q 646 -33 635 -8 q 658 -81 658 -57 q 643 -152 658 -118 q 605 -214 629 -185 q 547 -265 580 -242 q 476 -305 514 -288 q 397 -330 438 -321 q 316 -339 356 -339 q 250 -334 284 -339 q 183 -320 216 -330 q 120 -296 150 -311 q 68 -261 91 -282 q 33 -214 46 -240 q 20 -155 20 -188 q 26 -118 20 -137 q 52 -76 32 -98 q 107 -28 72 -54 q 201 28 142 -2 q 140 63 157 44 q 123 103 123 83 q 126 118 123 109 q 140 140 129 127 q 170 170 150 153 q 220 209 189 187 q 158 236 186 218 q 110 280 130 254 q 79 337 90 305 q 68 408 68 370 q 90 502 68 457 q 149 579 112 546 q 232 631 185 612 q 329 651 279 651 q 405 639 369 651 q 470 606 440 627 q 533 615 505 610 q 585 627 562 621 q 625 639 607 633 q 657 651 643 645 l 670 630 q 655 595 662 611 q 632 562 647 579 q 581 555 606 558 q 525 551 556 552 q 553 496 543 525 q 563 434 563 467 m 553 740 q 540 721 545 727 q 524 710 535 715 l 338 891 l 154 710 q 145 715 149 712 q 138 721 141 718 q 132 729 135 724 q 124 740 128 734 l 303 998 l 375 998 l 553 740 "},"Ω":{"x_min":54.984375,"x_max":798,"ha":879,"o":"m 76 0 l 54 18 q 57 55 55 34 q 61 99 58 77 q 67 145 63 122 q 76 190 71 168 l 106 190 q 117 140 111 161 q 129 103 122 118 q 147 82 136 89 q 171 75 157 75 l 320 75 q 200 185 247 132 q 125 290 153 239 q 86 394 97 342 q 75 501 75 446 q 86 590 75 545 q 119 677 97 635 q 173 755 141 719 q 248 817 205 790 q 342 859 290 844 q 455 875 394 875 q 592 849 530 875 q 699 778 654 824 q 768 665 743 731 q 794 517 794 599 q 777 402 794 456 q 728 295 761 348 q 646 188 695 242 q 534 75 598 134 l 690 75 q 713 81 704 75 q 730 101 722 87 q 746 138 738 115 q 767 193 754 160 l 798 180 q 794 136 796 160 q 788 88 791 112 q 782 40 785 64 q 775 0 778 17 l 475 0 l 475 74 q 545 166 514 126 q 599 242 576 207 q 639 307 623 276 q 666 368 655 337 q 680 430 676 398 q 685 501 685 462 q 669 619 685 563 q 621 719 653 675 q 542 788 589 762 q 433 814 495 814 q 350 798 387 814 q 286 757 313 782 q 239 699 258 731 q 207 632 219 666 q 189 566 195 598 q 184 508 184 533 q 186 434 184 468 q 197 370 189 400 q 219 308 205 339 q 257 242 234 277 q 313 166 280 207 q 391 74 346 126 l 391 0 l 76 0 "},"s":{"x_min":64.5,"x_max":474,"ha":536,"o":"m 474 192 q 460 109 474 144 q 425 51 446 75 q 377 13 403 28 q 325 -7 350 0 q 276 -17 299 -15 q 241 -20 254 -20 q 163 -7 208 -20 q 72 29 117 4 q 65 51 67 31 q 64 97 63 71 q 68 150 65 123 q 77 192 72 176 l 106 185 q 120 131 107 156 q 157 88 134 106 q 209 58 179 69 q 275 48 239 48 q 319 55 299 48 q 354 77 340 63 q 377 111 369 91 q 386 154 386 130 q 371 202 386 181 q 333 240 356 223 q 279 273 309 258 q 218 304 249 288 q 163 335 189 319 q 116 371 137 351 q 83 417 96 392 q 71 474 71 442 q 87 549 71 516 q 132 604 104 582 q 196 639 160 627 q 271 651 233 651 q 317 647 292 651 q 367 636 343 643 q 414 620 392 629 q 449 598 435 611 q 450 580 453 594 q 440 549 447 566 q 426 517 434 532 q 415 497 419 502 l 389 502 q 321 570 356 551 q 254 590 287 590 q 214 582 231 590 q 184 563 196 575 q 165 537 171 551 q 159 508 159 522 q 171 469 159 486 q 205 437 184 452 q 253 408 226 421 q 308 379 280 394 q 367 347 337 364 q 420 308 396 330 q 459 258 444 286 q 474 192 474 230 "},"ǚ":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 572 854 q 566 818 572 835 q 550 789 560 801 q 525 769 539 776 q 494 762 511 762 q 450 778 463 762 q 436 826 436 795 q 443 862 436 845 q 460 892 449 879 q 484 911 470 904 q 515 919 498 919 q 572 854 572 919 m 301 854 q 295 818 301 835 q 279 789 289 801 q 254 769 268 776 q 223 762 240 762 q 179 778 192 762 q 165 826 165 795 q 172 862 165 845 q 189 892 178 879 q 213 911 199 904 q 244 919 227 919 q 301 854 301 919 m 406 970 l 333 970 l 154 1212 q 162 1223 159 1219 q 169 1231 166 1228 q 175 1238 172 1235 q 185 1244 179 1240 l 371 1073 l 554 1244 q 571 1231 566 1238 q 583 1212 575 1225 l 406 970 "},"̀":{"x_min":-493.0625,"x_max":-216.359375,"ha":0,"o":"m -216 731 q -233 718 -225 722 q -254 710 -242 713 l -493 965 l -478 993 q -458 998 -471 995 q -430 1003 -444 1000 q -401 1007 -415 1005 q -379 1010 -387 1009 l -216 731 "},"?":{"x_min":54,"x_max":547,"ha":602,"o":"m 547 790 q 531 698 547 739 q 490 622 515 658 q 437 555 466 587 q 383 489 409 523 q 339 416 358 454 q 318 329 321 377 l 313 264 q 291 248 301 254 q 262 236 281 241 l 245 250 l 240 329 q 251 406 237 367 q 286 481 265 444 q 334 554 308 518 q 383 625 361 591 q 421 693 406 660 q 436 759 436 727 q 397 891 436 844 q 287 939 359 939 q 240 927 263 939 q 201 898 218 916 q 174 855 184 880 q 165 804 165 831 q 167 785 165 795 q 173 765 169 774 q 127 748 151 753 q 73 739 104 743 l 55 759 q 54 770 54 765 l 54 782 q 77 870 54 829 q 140 941 100 911 q 231 987 180 970 q 340 1004 283 1004 q 428 988 390 1004 q 493 944 467 972 q 533 877 519 916 q 547 790 547 837 m 365 83 q 357 39 365 59 q 338 4 350 19 q 308 -18 325 -10 q 271 -27 291 -27 q 219 -7 235 -27 q 204 48 204 12 q 211 91 204 71 q 231 127 218 111 q 261 151 244 142 q 298 160 279 160 q 348 140 331 160 q 365 83 365 120 "},"ỡ":{"x_min":54,"x_max":746,"ha":746,"o":"m 539 308 q 521 410 539 362 q 475 495 503 458 q 412 554 448 532 q 342 576 377 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 225 134 197 170 q 289 76 254 97 q 355 55 323 55 q 437 72 403 55 q 494 124 472 90 q 528 203 517 157 q 539 308 539 250 m 746 707 q 738 670 746 690 q 713 626 731 649 q 665 577 695 602 q 590 527 635 551 q 630 436 616 486 q 644 329 644 386 q 632 240 644 283 q 600 158 620 197 q 551 86 580 119 q 489 30 523 53 q 416 -6 454 6 q 336 -20 377 -20 q 219 4 271 -20 q 130 71 167 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 206 600 172 576 q 280 637 241 623 q 362 651 320 651 q 474 628 424 651 q 561 564 525 605 q 613 611 597 588 q 629 652 629 634 q 618 689 629 671 q 589 722 608 707 l 710 777 q 736 744 726 762 q 746 707 746 726 m 594 912 q 564 857 581 884 q 527 808 548 830 q 482 773 506 787 q 431 760 457 760 q 386 771 407 760 q 344 798 364 783 q 304 825 324 813 q 264 837 284 837 q 215 814 237 837 q 167 755 192 792 l 131 768 q 160 823 143 796 q 198 873 177 851 q 243 908 219 894 q 293 922 267 922 q 342 910 319 922 q 385 883 365 898 q 424 856 406 868 q 459 845 442 845 q 509 866 484 845 q 557 928 534 888 l 594 912 "},"Ī":{"x_min":31.875,"x_max":381.84375,"ha":414,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 m 381 1085 q 377 1068 380 1078 q 369 1048 373 1058 q 361 1029 365 1039 q 355 1014 358 1020 l 46 1014 l 31 1030 q 36 1047 33 1038 q 44 1067 40 1057 q 52 1086 48 1076 q 59 1102 56 1095 l 366 1102 l 381 1085 "},"•":{"x_min":47.46875,"x_max":337.75,"ha":386,"o":"m 337 448 q 325 373 337 407 q 292 315 314 339 q 241 277 271 291 q 176 264 212 264 q 119 275 143 264 q 79 306 95 286 q 55 354 63 327 q 47 415 47 382 q 60 489 47 455 q 94 548 72 523 q 145 586 115 572 q 209 600 174 600 q 264 588 240 600 q 304 557 288 577 q 329 509 320 537 q 337 448 337 482 "},"(":{"x_min":82,"x_max":413.359375,"ha":440,"o":"m 391 -214 q 257 -115 315 -178 q 160 31 199 -51 q 101 214 121 114 q 82 422 82 314 q 103 637 82 533 q 166 828 125 741 q 264 982 207 916 q 391 1085 321 1048 l 413 1054 q 329 958 369 1017 q 261 819 290 898 q 214 645 231 741 q 197 441 197 549 q 211 248 197 342 q 253 72 225 154 q 321 -74 281 -9 q 413 -183 361 -140 l 391 -214 "},"◊":{"x_min":0.671875,"x_max":460.515625,"ha":461,"o":"m 86 447 l 86 447 l 244 141 l 374 424 l 373 425 l 217 731 l 86 447 m 0 425 l 186 816 q 202 829 193 822 q 220 842 210 836 q 239 854 230 848 q 256 863 248 859 l 460 447 l 274 57 q 258 44 267 51 q 239 31 249 37 q 220 19 229 25 q 204 11 211 14 l 0 425 "},"Ỗ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 631 957 q 618 938 623 944 q 602 927 613 932 l 416 1068 l 232 927 q 223 932 227 929 q 216 938 219 935 q 210 946 213 941 q 202 957 206 951 l 381 1167 l 453 1167 l 631 957 m 648 1374 q 619 1319 636 1346 q 581 1270 602 1292 q 536 1234 560 1248 q 485 1221 512 1221 q 440 1233 461 1221 q 398 1259 419 1245 q 358 1286 378 1274 q 318 1298 338 1298 q 269 1276 291 1298 q 221 1216 246 1254 l 185 1229 q 214 1285 198 1257 q 252 1334 231 1312 q 297 1369 273 1356 q 347 1383 321 1383 q 396 1371 373 1383 q 440 1344 419 1359 q 478 1318 460 1330 q 513 1306 497 1306 q 563 1327 539 1306 q 611 1389 588 1349 l 648 1374 "},"ḅ":{"x_min":6.828125,"x_max":644,"ha":705,"o":"m 644 333 q 633 253 644 294 q 604 172 623 211 q 555 97 584 133 q 491 36 527 62 q 411 -4 454 10 q 317 -20 368 -20 q 282 -14 305 -20 q 230 2 259 -8 q 166 29 200 13 q 95 65 131 45 l 95 878 q 91 926 95 910 q 78 952 88 943 q 51 963 69 960 q 6 969 34 966 l 6 996 q 92 1018 51 1007 q 171 1051 133 1029 l 178 1044 q 186 1036 182 1040 q 197 1027 191 1032 l 196 493 q 264 563 230 533 q 328 612 297 593 q 385 641 359 632 q 431 651 412 651 q 516 629 477 651 q 584 566 555 607 q 628 466 612 525 q 644 333 644 407 m 552 276 q 538 396 552 344 q 500 485 524 449 q 447 540 477 521 q 384 559 416 559 q 352 551 372 559 q 307 528 332 544 q 253 483 282 511 q 197 413 225 455 l 197 137 q 252 103 224 117 q 305 82 280 90 q 351 71 330 74 q 384 68 372 68 q 456 85 425 68 q 509 133 487 103 q 541 200 530 162 q 552 276 552 237 m 393 -189 q 387 -225 393 -208 q 370 -254 380 -242 q 345 -274 359 -267 q 314 -282 331 -282 q 270 -265 283 -282 q 257 -217 257 -248 q 263 -181 257 -198 q 280 -151 269 -164 q 305 -132 291 -139 q 335 -125 319 -125 q 393 -189 393 -125 "},"Û":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 673 957 q 660 938 665 944 q 644 927 655 932 l 458 1068 l 274 927 q 265 932 269 929 q 258 938 261 935 q 252 946 255 941 q 244 957 248 951 l 423 1167 l 495 1167 l 673 957 "},"Ầ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 620 957 q 607 938 612 944 q 591 927 602 932 l 405 1068 l 221 927 q 212 932 216 929 q 205 938 208 935 q 199 946 202 941 q 191 957 196 951 l 370 1167 l 442 1167 l 620 957 m 526 1228 q 511 1209 516 1216 q 495 1198 506 1203 l 177 1363 l 183 1394 q 198 1406 187 1399 q 221 1420 208 1413 q 244 1433 233 1427 q 263 1444 256 1440 l 526 1228 "},"V":{"x_min":13.5625,"x_max":874.90625,"ha":903,"o":"m 874 825 q 802 808 828 817 q 769 781 776 800 l 510 40 q 491 14 504 25 q 462 -2 478 4 q 432 -13 446 -9 q 408 -20 417 -17 l 109 781 q 79 809 103 798 q 13 825 56 820 l 13 855 l 308 855 l 308 825 q 234 811 254 821 q 221 782 214 802 l 461 138 l 689 781 q 672 809 696 800 q 592 825 648 819 l 592 855 l 874 855 l 874 825 "},"Ỹ":{"x_min":-0.390625,"x_max":797.6875,"ha":825,"o":"m 243 0 l 243 29 q 330 55 305 42 q 355 78 355 68 l 355 364 q 298 478 329 419 q 232 594 266 538 q 168 699 199 651 q 113 780 137 748 q 99 794 107 788 q 79 806 91 801 q 49 814 67 811 q 2 818 30 818 l 0 847 q 79 856 39 852 q 148 861 119 861 q 201 834 179 861 q 255 757 226 802 q 313 663 284 713 q 370 562 342 614 q 422 461 398 509 l 604 780 q 597 808 614 797 q 529 825 581 818 l 529 855 l 797 855 l 797 825 q 726 807 750 816 q 691 780 701 797 l 464 366 l 464 77 q 469 68 464 73 q 488 55 475 62 q 523 42 501 48 q 576 29 544 35 l 576 0 l 243 0 m 640 1103 q 611 1047 628 1075 q 574 998 594 1020 q 529 963 553 977 q 478 950 504 950 q 433 961 454 950 q 391 988 411 973 q 350 1015 371 1003 q 311 1027 330 1027 q 261 1005 284 1027 q 214 945 239 982 l 178 958 q 207 1013 190 986 q 244 1063 223 1041 q 289 1098 265 1084 q 340 1112 314 1112 q 389 1100 366 1112 q 432 1073 412 1088 q 471 1046 453 1058 q 505 1035 489 1035 q 556 1056 531 1035 q 604 1118 581 1078 l 640 1103 "},"ṿ":{"x_min":13.5625,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 404 40 q 386 14 398 25 q 361 -2 375 4 q 334 -13 347 -9 q 312 -20 321 -17 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 121 l 522 555 q 524 573 525 565 q 515 585 523 580 q 492 594 507 590 q 451 601 476 597 l 451 631 l 670 631 l 670 601 m 418 -189 q 412 -225 418 -208 q 395 -254 406 -242 q 370 -274 384 -267 q 339 -282 356 -282 q 295 -265 308 -282 q 282 -217 282 -248 q 288 -181 282 -198 q 305 -151 294 -164 q 330 -132 316 -139 q 360 -125 344 -125 q 418 -189 418 -125 "},"̱":{"x_min":-578.53125,"x_max":-120.046875,"ha":0,"o":"m -120 -155 q -124 -172 -121 -162 q -132 -192 -128 -182 q -140 -211 -136 -201 q -146 -227 -143 -220 l -563 -227 l -578 -210 q -573 -193 -577 -202 q -566 -173 -570 -183 q -558 -154 -562 -164 q -550 -139 -554 -145 l -134 -139 l -120 -155 "},"@":{"x_min":47,"x_max":1073,"ha":1120,"o":"m 688 495 q 645 554 669 533 q 582 576 622 576 q 514 560 544 576 q 460 512 483 544 q 426 433 438 480 q 414 322 414 385 q 427 217 414 264 q 463 137 441 170 q 510 85 484 103 q 559 68 536 68 q 584 72 572 68 q 611 88 597 76 q 643 119 625 99 q 688 169 662 139 l 688 495 m 1073 372 q 1059 261 1073 313 q 1023 166 1046 209 q 971 88 1001 123 q 910 29 942 53 q 846 -7 878 5 q 784 -20 813 -20 q 753 -12 768 -20 q 726 9 738 -5 q 705 50 714 25 q 692 110 696 74 q 642 46 664 71 q 601 6 621 21 q 559 -14 580 -8 q 511 -20 538 -20 q 441 2 476 -20 q 377 65 405 24 q 330 166 348 106 q 312 301 312 226 q 321 381 312 339 q 347 461 330 422 q 391 534 365 499 q 449 595 417 568 q 520 636 481 621 q 603 651 559 651 q 631 648 618 651 q 657 639 644 646 q 684 620 669 632 q 715 588 698 608 q 751 614 733 599 q 789 651 770 629 l 810 630 q 800 588 804 611 q 793 543 796 568 q 790 490 790 518 l 790 193 q 810 103 790 132 q 862 74 830 74 q 902 95 879 74 q 944 153 924 116 q 978 240 964 190 q 992 347 992 290 q 962 550 992 461 q 881 699 933 639 q 758 791 829 759 q 600 823 686 823 q 470 805 530 823 q 359 756 410 787 q 270 681 309 724 q 204 585 231 637 q 163 475 177 533 q 149 355 149 416 q 166 202 149 273 q 214 72 183 131 q 288 -31 245 14 q 382 -108 331 -77 q 492 -156 434 -140 q 612 -173 550 -173 q 723 -161 668 -173 q 824 -131 778 -149 q 907 -93 871 -113 q 964 -55 944 -73 l 982 -92 q 919 -147 958 -118 q 829 -199 880 -175 q 714 -238 778 -222 q 578 -254 651 -254 q 364 -214 462 -254 q 196 -99 266 -174 q 86 79 125 -25 q 47 315 47 185 q 67 465 47 392 q 126 604 88 539 q 217 725 164 670 q 334 819 270 779 q 472 881 398 859 q 626 904 546 904 q 809 869 727 904 q 950 768 891 835 q 1041 601 1009 701 q 1073 372 1073 502 "},"ʼ":{"x_min":53.59375,"x_max":252.5,"ha":310,"o":"m 252 900 q 218 807 248 853 q 122 719 188 760 l 95 741 q 139 794 124 767 q 156 852 153 821 q 152 887 157 870 q 136 915 147 903 q 106 935 124 927 q 61 942 87 942 l 53 971 q 76 986 59 978 q 117 1001 94 994 q 159 1012 139 1007 q 191 1015 180 1016 q 222 995 209 1007 q 241 967 234 982 q 250 935 248 952 q 252 900 253 917 "},"i":{"x_min":47.046875,"x_max":338.953125,"ha":376,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 m 264 854 q 257 818 264 835 q 241 789 251 801 q 216 769 230 776 q 185 762 202 762 q 141 778 154 762 q 128 826 128 795 q 134 862 128 845 q 151 892 140 879 q 176 911 162 904 q 206 919 190 919 q 264 854 264 919 "},"ȯ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 431 854 q 425 818 431 835 q 408 789 418 801 q 383 769 397 776 q 352 762 369 762 q 308 778 321 762 q 295 826 295 795 q 301 862 295 845 q 318 892 307 879 q 343 911 329 904 q 373 919 357 919 q 431 854 431 919 "},"≤":{"x_min":41.375,"x_max":568.34375,"ha":610,"o":"m 568 299 q 555 287 560 292 q 542 276 549 282 q 529 266 536 271 q 511 254 521 261 l 58 424 q 48 434 52 431 q 43 440 45 438 q 42 443 42 442 l 42 444 q 50 476 45 460 q 62 507 54 492 l 551 691 l 568 674 q 563 657 566 666 q 558 639 561 648 q 553 621 556 629 q 548 606 550 612 l 172 466 l 556 324 l 568 299 m 568 192 q 558 163 564 178 q 548 135 552 147 l 58 135 l 41 153 q 50 181 44 167 q 62 210 56 196 l 551 210 l 568 192 "},"ẽ":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 577 912 q 548 857 564 884 q 510 808 531 830 q 465 773 489 787 q 414 760 440 760 q 369 771 390 760 q 327 798 347 783 q 287 825 307 813 q 247 837 267 837 q 198 814 220 837 q 150 755 175 792 l 114 768 q 143 823 126 796 q 181 873 160 851 q 226 908 202 894 q 276 922 250 922 q 325 910 302 922 q 368 883 348 898 q 407 856 389 868 q 442 845 425 845 q 492 866 467 845 q 540 928 517 888 l 577 912 "},"ĕ":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 566 922 q 520 829 545 867 q 466 768 495 792 q 408 735 438 745 q 347 725 377 725 q 282 735 314 725 q 223 768 251 745 q 170 829 195 792 q 125 922 145 867 q 141 941 133 934 q 161 953 149 947 q 200 887 178 914 q 246 845 222 861 q 296 822 271 829 q 344 815 322 815 q 394 822 368 815 q 445 845 420 829 q 492 887 470 861 q 530 953 514 914 q 550 941 541 947 q 566 922 558 934 "},"ṧ":{"x_min":54.25,"x_max":483.578125,"ha":536,"o":"m 474 192 q 460 109 474 144 q 425 51 446 75 q 377 13 403 28 q 325 -7 350 0 q 276 -17 299 -15 q 241 -20 254 -20 q 163 -7 208 -20 q 72 29 117 4 q 65 51 67 31 q 64 97 63 71 q 68 150 65 123 q 77 192 72 176 l 106 185 q 120 131 107 156 q 157 88 134 106 q 209 58 179 69 q 275 48 239 48 q 319 55 299 48 q 354 77 340 63 q 377 111 369 91 q 386 154 386 130 q 371 202 386 181 q 333 240 356 223 q 279 273 309 258 q 218 304 249 288 q 163 335 189 319 q 116 371 137 351 q 83 417 96 392 q 71 474 71 442 q 87 549 71 516 q 132 604 104 582 q 196 639 160 627 q 271 651 233 651 q 317 647 292 651 q 367 636 343 643 q 414 620 392 629 q 449 598 435 611 q 450 580 453 594 q 440 549 447 566 q 426 517 434 532 q 415 497 419 502 l 389 502 q 321 570 356 551 q 254 590 287 590 q 214 582 231 590 q 184 563 196 575 q 165 537 171 551 q 159 508 159 522 q 171 469 159 486 q 205 437 184 452 q 253 408 226 421 q 308 379 280 394 q 367 347 337 364 q 420 308 396 330 q 459 258 444 286 q 474 192 474 230 m 305 726 l 233 726 l 54 968 q 62 979 59 974 q 68 987 65 984 q 75 993 71 991 q 84 1000 79 996 l 271 829 l 454 1000 q 470 987 465 993 q 483 968 475 981 l 305 726 m 337 1071 q 331 1035 337 1052 q 314 1006 325 1018 q 289 986 304 993 q 258 979 275 979 q 214 995 228 979 q 201 1044 201 1012 q 207 1079 201 1062 q 224 1109 213 1096 q 249 1128 235 1121 q 279 1136 263 1136 q 337 1071 337 1136 "},"Ỉ":{"x_min":47.65625,"x_max":353.34375,"ha":414,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 m 314 1121 q 301 1088 314 1103 q 272 1060 289 1073 q 239 1034 255 1046 q 216 1010 223 1023 q 215 984 208 997 q 250 953 221 970 q 229 945 240 947 q 208 943 218 944 q 163 970 177 957 q 145 993 148 982 q 149 1014 142 1004 q 167 1032 155 1023 q 192 1050 178 1041 q 219 1068 207 1059 q 239 1088 231 1078 q 248 1111 248 1099 q 235 1150 248 1137 q 203 1163 222 1163 q 184 1159 192 1163 q 169 1149 176 1155 q 160 1135 163 1143 q 157 1120 157 1128 q 158 1113 157 1117 q 162 1106 160 1110 q 148 1102 157 1104 q 130 1097 140 1099 q 111 1094 120 1095 q 94 1091 101 1092 l 87 1099 l 87 1108 q 100 1139 87 1124 q 133 1167 113 1155 q 177 1188 153 1180 q 225 1196 201 1196 q 291 1175 268 1196 q 314 1121 314 1155 "},"ż":{"x_min":51.546875,"x_max":562.25,"ha":614,"o":"m 562 168 q 561 122 562 146 q 559 74 560 97 q 557 31 558 51 q 554 0 556 12 l 69 0 l 51 30 l 427 570 l 193 570 q 171 565 182 570 q 149 550 160 561 q 129 519 139 539 q 113 468 120 499 l 80 476 l 92 642 q 120 635 107 637 q 145 632 132 633 q 174 631 158 631 l 545 631 l 560 601 l 183 61 l 469 61 q 500 87 486 61 q 530 174 514 113 l 562 168 m 393 854 q 387 818 393 835 q 371 789 381 801 q 346 769 360 776 q 314 762 331 762 q 271 778 284 762 q 257 826 257 795 q 263 862 257 845 q 280 892 270 879 q 305 911 291 904 q 336 919 319 919 q 393 854 393 919 "},"Ƙ":{"x_min":33.65625,"x_max":837,"ha":857,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 240 438 l 486 747 q 578 832 531 804 q 678 861 625 861 q 739 852 710 861 q 789 825 767 843 q 824 778 811 807 q 837 708 837 749 q 829 638 837 677 q 813 625 826 633 q 782 608 800 616 q 743 591 763 599 q 707 579 723 583 l 694 599 q 713 652 707 628 q 718 695 718 676 q 697 758 716 737 q 650 780 679 780 q 622 773 636 780 q 595 756 608 767 q 569 732 582 746 q 545 706 557 719 l 339 455 l 668 85 q 694 64 680 72 q 724 54 708 57 q 757 51 740 51 q 791 53 774 51 l 796 24 q 716 0 756 11 q 643 -10 675 -10 q 608 -3 623 -10 q 579 19 593 2 l 241 432 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 "},"ő":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 252 710 q 233 716 240 712 q 213 728 227 720 l 333 1010 q 352 1006 341 1008 q 374 1002 363 1005 q 396 998 385 1000 q 413 993 406 995 l 428 965 l 252 710 m 449 710 q 429 716 436 712 q 411 728 423 720 l 530 1010 q 549 1006 538 1008 q 571 1002 560 1005 q 593 998 582 1000 q 611 993 603 995 l 625 965 l 449 710 "},"":{"x_min":21,"x_max":410,"ha":422,"o":"m 169 551 l 169 622 q 180 680 169 654 q 209 728 191 706 q 247 771 227 751 q 284 812 266 792 q 313 852 302 832 q 325 896 325 872 q 315 941 325 921 q 289 975 305 961 q 251 997 272 990 q 205 1005 229 1005 q 172 998 189 1005 q 143 980 156 991 q 121 954 129 969 q 113 923 113 939 q 114 911 113 917 q 118 899 116 905 q 79 889 102 893 q 34 884 56 886 l 21 896 q 21 903 21 899 l 21 910 q 38 964 21 938 q 87 1009 56 990 q 158 1039 118 1028 q 242 1051 198 1051 q 312 1040 281 1051 q 365 1011 344 1030 q 398 968 386 992 q 410 914 410 943 q 398 860 410 884 q 369 816 387 836 q 332 777 351 796 q 294 739 312 759 q 265 696 276 719 q 254 646 254 674 l 254 551 l 169 551 "},"ự":{"x_min":27.515625,"x_max":851,"ha":851,"o":"m 851 707 q 840 662 851 688 q 803 608 830 637 q 733 549 777 579 q 621 491 688 519 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 683 71 l 725 55 q 676 25 699 39 q 634 1 653 11 q 599 -14 614 -8 q 576 -20 584 -20 q 537 11 552 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 20 186 -2 q 128 84 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 609 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 531 519 513 q 502 559 512 549 q 473 574 492 570 q 424 579 455 578 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 625 l 620 538 q 672 568 650 553 q 707 599 693 584 q 727 627 721 614 q 734 652 734 641 q 723 689 734 671 q 694 722 713 707 l 815 777 q 841 744 831 762 q 851 707 851 726 m 437 -189 q 431 -225 437 -208 q 415 -254 425 -242 q 390 -274 404 -267 q 359 -282 376 -282 q 315 -265 328 -282 q 301 -217 301 -248 q 308 -181 301 -198 q 325 -151 314 -164 q 349 -132 335 -139 q 380 -125 363 -125 q 437 -189 437 -125 "},"Ŏ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 637 1139 q 591 1046 617 1084 q 538 985 566 1009 q 479 952 510 962 q 418 942 448 942 q 354 952 385 942 q 294 985 322 962 q 241 1046 266 1009 q 196 1139 217 1084 q 212 1158 204 1151 q 232 1170 221 1164 q 271 1104 249 1131 q 318 1062 293 1078 q 367 1039 342 1046 q 415 1032 393 1032 q 465 1039 439 1032 q 516 1062 491 1046 q 563 1104 541 1078 q 601 1170 585 1131 q 621 1158 613 1164 q 637 1139 629 1151 "},"ȱ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 431 854 q 425 818 431 835 q 408 789 418 801 q 383 769 397 776 q 352 762 369 762 q 308 778 321 762 q 295 826 295 795 q 301 862 295 845 q 318 892 307 879 q 343 911 329 904 q 373 919 357 919 q 431 854 431 919 m 598 1112 q 594 1095 597 1105 q 586 1076 590 1085 q 578 1056 582 1066 q 572 1041 575 1047 l 155 1041 l 140 1058 q 145 1075 141 1065 q 152 1094 148 1084 q 160 1113 156 1104 q 168 1129 164 1122 l 583 1129 l 598 1112 "},"ẩ":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 539 740 q 526 721 531 727 q 510 710 522 715 l 324 891 l 141 710 q 131 715 135 712 q 125 721 128 718 q 118 729 122 724 q 110 740 115 734 l 289 998 l 362 998 l 539 740 m 439 1209 q 427 1176 439 1191 q 397 1148 414 1161 q 364 1123 380 1134 q 341 1098 349 1111 q 340 1072 334 1086 q 375 1042 347 1059 q 354 1033 365 1035 q 333 1031 344 1032 q 288 1058 303 1046 q 271 1081 274 1071 q 274 1102 268 1092 q 292 1120 280 1111 q 318 1138 304 1130 q 344 1157 332 1147 q 365 1177 356 1166 q 373 1199 373 1187 q 361 1238 373 1225 q 328 1251 348 1251 q 309 1247 318 1251 q 295 1237 301 1243 q 285 1224 289 1231 q 282 1209 282 1216 q 284 1202 282 1205 q 287 1194 285 1198 q 274 1190 282 1192 q 255 1186 265 1188 q 236 1182 246 1184 q 220 1179 227 1180 l 212 1187 l 212 1196 q 225 1228 212 1212 q 258 1256 238 1243 q 302 1276 278 1268 q 351 1284 327 1284 q 416 1263 393 1284 q 439 1209 439 1243 "},"İ":{"x_min":47.65625,"x_max":353.34375,"ha":414,"o":"m 47 0 l 47 29 q 119 49 93 38 q 146 70 146 61 l 146 783 q 121 804 146 791 q 47 825 96 816 l 47 855 l 353 855 l 353 825 q 281 804 307 816 q 255 783 255 793 l 255 70 q 279 50 255 62 q 353 29 304 38 l 353 0 l 47 0 m 268 1045 q 262 1009 268 1026 q 245 980 256 992 q 220 960 235 967 q 189 953 206 953 q 145 969 158 953 q 132 1018 132 986 q 138 1053 132 1036 q 155 1083 144 1070 q 180 1102 166 1095 q 210 1110 194 1110 q 268 1045 268 1110 "},"Ě":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 377 943 l 304 943 l 125 1151 q 133 1162 130 1157 q 140 1170 137 1167 q 146 1176 143 1174 q 156 1183 150 1179 l 342 1039 l 525 1183 q 541 1170 537 1176 q 554 1151 546 1164 l 377 943 "},"Ố":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 631 957 q 618 938 623 944 q 602 927 613 932 l 416 1068 l 232 927 q 223 932 227 929 q 216 938 219 935 q 210 946 213 941 q 202 957 206 951 l 381 1167 l 453 1167 l 631 957 m 327 1198 q 310 1209 316 1203 q 297 1228 305 1216 l 559 1444 q 577 1433 566 1440 q 601 1420 589 1427 q 623 1406 613 1413 q 639 1394 634 1399 l 645 1363 l 327 1198 "},"ǣ":{"x_min":54,"x_max":907,"ha":961,"o":"m 907 378 q 873 352 893 364 q 831 332 852 340 l 526 332 q 525 308 525 320 l 525 283 q 535 206 525 244 q 566 137 546 168 q 616 88 586 107 q 683 70 645 70 q 724 72 704 70 q 765 83 743 74 q 813 111 787 93 q 876 160 840 129 q 891 147 885 156 q 901 133 898 138 q 826 54 860 84 q 762 7 792 24 q 701 -14 731 -8 q 640 -20 672 -20 q 581 -10 610 -20 q 527 17 552 -1 q 481 61 502 35 q 446 121 460 87 q 383 59 417 86 q 314 15 348 33 q 250 -11 280 -2 q 198 -20 219 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 69 203 54 166 q 117 272 85 240 q 198 330 149 304 q 314 375 247 356 q 364 385 336 381 q 423 391 393 388 l 423 449 q 418 499 423 475 q 403 542 414 524 q 371 571 391 560 q 317 583 350 583 q 270 573 295 583 q 226 546 245 563 q 197 506 207 528 q 198 458 188 483 q 185 444 200 452 q 151 431 171 437 q 111 421 131 424 q 83 420 91 418 l 73 445 q 93 497 77 471 q 134 546 109 523 q 188 588 158 568 q 249 621 218 607 q 310 643 280 635 q 363 651 340 651 q 457 626 423 651 q 508 553 492 602 q 554 599 529 580 q 603 629 578 618 q 651 645 628 640 q 694 651 675 651 q 767 639 736 651 q 823 607 799 627 q 862 560 846 587 q 889 503 879 533 q 902 440 898 472 q 907 378 907 408 m 432 165 q 425 205 427 184 q 423 247 423 225 l 423 329 q 382 325 400 327 q 356 320 365 323 q 209 253 254 295 q 165 155 165 211 q 173 111 165 128 q 192 85 181 95 q 217 72 204 75 q 238 68 229 68 q 280 74 256 68 q 328 92 303 80 q 380 122 354 104 q 432 165 407 141 m 674 583 q 638 575 658 583 q 597 547 617 568 q 558 489 576 526 q 532 394 540 452 l 768 394 q 788 399 782 394 q 794 418 794 404 q 787 480 794 450 q 766 532 780 510 q 729 569 751 555 q 674 583 706 583 m 736 868 q 731 851 735 861 q 724 831 728 841 q 716 812 720 822 q 710 797 712 803 l 292 797 l 278 813 q 282 830 279 821 q 290 850 286 840 q 298 869 294 859 q 305 885 302 878 l 721 885 l 736 868 "},"Ʉ":{"x_min":29.59375,"x_max":871.125,"ha":908,"o":"m 478 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 417 l 241 417 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 478 l 854 478 l 871 462 l 854 417 l 766 417 l 766 355 q 744 196 766 266 q 681 78 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 97 q 132 301 132 218 l 132 417 l 44 417 l 29 433 q 36 455 32 444 q 44 478 40 467 l 132 478 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 478 l 678 478 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 "},"Ṛ":{"x_min":27.5625,"x_max":771.921875,"ha":779,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 806 q 83 799 108 803 q 33 792 58 795 l 27 834 q 91 849 59 842 q 159 862 124 856 q 233 871 195 868 q 317 875 272 875 q 454 859 396 875 q 551 815 512 843 q 609 750 590 788 q 628 669 628 712 q 614 580 628 620 q 574 510 600 541 q 514 458 549 480 q 436 423 478 436 l 642 93 q 664 70 652 78 q 690 56 676 61 q 723 52 705 52 q 764 53 741 51 l 771 24 q 686 0 727 9 q 620 -10 646 -10 q 581 1 600 -10 q 553 27 563 12 l 348 408 q 331 406 339 406 l 312 406 q 277 408 295 406 q 241 414 259 410 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 293 818 q 241 816 267 818 l 241 468 q 272 464 259 465 q 301 464 286 464 q 465 511 408 464 q 523 648 523 558 q 509 716 523 685 q 468 770 496 748 q 396 805 440 792 q 293 818 353 818 m 420 -189 q 414 -225 420 -208 q 398 -254 408 -242 q 373 -274 387 -267 q 342 -282 359 -282 q 298 -265 311 -282 q 284 -217 284 -248 q 291 -181 284 -198 q 308 -151 297 -164 q 332 -132 318 -139 q 363 -125 346 -125 q 420 -189 420 -125 "},"ḷ":{"x_min":40.265625,"x_max":345.734375,"ha":376,"o":"m 40 0 l 40 29 q 89 38 69 33 q 120 49 108 44 q 136 59 131 54 q 142 70 142 65 l 142 878 q 137 926 142 909 q 123 951 133 943 q 93 963 112 960 q 47 969 75 966 l 47 996 q 136 1017 95 1006 q 219 1051 177 1029 l 244 1027 l 244 70 q 267 49 244 60 q 345 29 290 38 l 345 0 l 40 0 m 261 -189 q 255 -225 261 -208 q 238 -254 249 -242 q 213 -274 228 -267 q 182 -282 199 -282 q 138 -265 152 -282 q 125 -217 125 -248 q 131 -181 125 -198 q 148 -151 137 -164 q 173 -132 159 -139 q 203 -125 187 -125 q 261 -189 261 -125 "},"Ǚ":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 662 1045 q 656 1009 662 1026 q 639 980 650 992 q 614 960 629 967 q 583 953 600 953 q 539 969 552 953 q 526 1018 526 986 q 532 1053 526 1036 q 549 1083 538 1070 q 574 1102 560 1095 q 604 1110 588 1110 q 662 1045 662 1110 m 391 1045 q 385 1009 391 1026 q 368 980 379 992 q 343 960 358 967 q 312 953 329 953 q 268 969 281 953 q 255 1018 255 986 q 261 1053 255 1036 q 278 1083 267 1070 q 303 1102 289 1095 q 333 1110 317 1110 q 391 1045 391 1110 m 495 1160 l 423 1160 l 244 1368 q 252 1379 248 1374 q 258 1387 255 1384 q 265 1393 261 1391 q 274 1400 269 1396 l 461 1256 l 644 1400 q 660 1387 655 1393 q 673 1368 665 1381 l 495 1160 "},"‹":{"x_min":54.265625,"x_max":328.265625,"ha":423,"o":"m 299 12 l 54 291 l 54 315 q 54 332 54 324 q 55 341 54 339 l 299 619 l 327 598 l 320 586 q 303 554 314 574 q 278 508 292 534 q 248 457 263 483 q 220 405 233 430 q 195 360 206 379 q 177 328 184 340 q 171 316 170 316 l 328 32 l 299 12 "},"ủ":{"x_min":27.515625,"x_max":725.4375,"ha":736,"o":"m 725 55 q 677 25 700 39 q 634 1 654 11 q 599 -14 614 -8 q 576 -20 584 -20 q 538 11 553 -20 q 519 112 523 43 q 441 44 476 70 q 377 4 406 18 q 323 -14 347 -9 q 276 -20 298 -20 q 215 -11 244 -20 q 163 21 186 -2 q 128 85 141 44 q 115 189 115 125 l 115 482 q 112 532 115 514 q 102 559 110 550 q 76 572 93 568 q 27 579 58 575 l 27 606 q 73 613 51 608 q 114 622 94 617 q 155 635 134 627 q 197 651 175 642 l 217 624 l 217 226 q 224 147 217 179 q 244 96 231 115 q 277 69 257 77 q 320 61 296 61 q 365 67 342 61 q 412 87 388 73 q 462 123 436 101 q 519 177 489 145 l 519 482 q 515 530 519 512 q 502 559 512 549 q 473 573 492 569 q 424 579 455 577 l 424 606 q 517 625 472 612 q 600 651 562 638 l 621 624 l 621 172 q 624 104 621 130 q 636 70 627 77 q 664 68 644 65 q 718 86 684 71 l 725 55 m 483 904 q 471 871 483 886 q 441 843 458 856 q 409 817 425 829 q 385 793 393 806 q 384 767 378 780 q 419 736 391 753 q 398 728 409 730 q 377 726 388 727 q 332 753 347 740 q 315 776 318 765 q 318 797 312 787 q 336 815 325 806 q 362 833 348 824 q 388 851 376 842 q 409 871 401 861 q 417 894 417 882 q 405 933 417 920 q 372 946 392 946 q 354 942 362 946 q 339 932 345 938 q 330 918 333 926 q 326 903 326 911 q 328 896 326 900 q 332 889 330 893 q 318 885 326 887 q 299 880 309 882 q 280 877 290 878 q 264 874 271 875 l 256 882 l 256 891 q 269 922 256 907 q 302 950 282 938 q 347 971 322 963 q 395 979 371 979 q 460 958 437 979 q 483 904 483 938 "},"Ằ":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 m 626 1139 q 580 1046 606 1084 q 527 985 555 1009 q 468 952 499 962 q 407 942 438 942 q 343 952 374 942 q 283 985 311 962 q 230 1046 255 1009 q 185 1139 206 1084 q 202 1158 193 1151 q 221 1170 210 1164 q 260 1104 238 1131 q 307 1062 282 1078 q 357 1039 331 1046 q 404 1032 382 1032 q 454 1039 428 1032 q 505 1062 480 1046 q 552 1104 530 1078 q 590 1170 574 1131 q 610 1158 602 1164 q 626 1139 618 1151 m 526 1174 q 511 1155 516 1161 q 495 1144 506 1148 l 177 1309 l 183 1339 q 198 1352 187 1345 q 221 1365 208 1358 q 244 1379 233 1373 q 263 1390 256 1385 l 526 1174 "},"ʒ":{"x_min":26.015625,"x_max":577,"ha":624,"o":"m 577 -17 q 548 -148 577 -89 q 475 -249 520 -207 q 372 -315 429 -292 q 259 -339 316 -339 q 168 -326 211 -339 q 94 -295 125 -313 q 44 -258 62 -277 q 26 -228 26 -240 q 35 -214 26 -224 q 59 -194 45 -204 q 89 -174 73 -183 q 120 -162 106 -164 q 199 -240 159 -213 q 285 -268 240 -268 q 361 -253 326 -268 q 421 -212 395 -239 q 460 -144 446 -184 q 475 -52 475 -103 q 460 36 475 -6 q 416 113 445 80 q 345 167 387 147 q 250 186 304 187 q 195 181 222 186 q 142 167 169 176 q 129 180 137 170 q 118 196 121 191 l 408 570 l 177 570 q 155 565 167 570 q 134 550 144 561 q 114 519 123 539 q 98 468 105 499 l 65 476 l 78 642 q 105 635 92 637 q 130 632 117 633 q 159 631 144 631 l 529 631 l 546 601 l 276 252 q 299 254 288 253 q 321 255 310 255 q 422 235 375 253 q 503 182 468 216 q 557 97 537 147 q 577 -17 577 47 "},"Ḣ":{"x_min":33.65625,"x_max":861.34375,"ha":908,"o":"m 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 478 l 654 478 l 654 783 q 629 804 654 791 q 555 825 604 816 l 555 855 l 861 855 l 861 825 q 789 804 815 816 q 763 783 763 793 l 763 70 q 787 50 763 62 q 861 29 812 38 l 861 0 l 555 0 l 555 29 q 627 49 601 38 q 654 70 654 61 l 654 417 l 241 417 l 241 70 q 265 50 241 62 q 339 29 289 38 l 339 0 l 33 0 m 515 1045 q 509 1009 515 1026 q 493 980 503 992 q 468 960 482 967 q 437 953 454 953 q 393 969 406 953 q 379 1018 379 986 q 386 1053 379 1036 q 403 1083 392 1070 q 427 1102 413 1095 q 458 1110 441 1110 q 515 1045 515 1110 "},"ì":{"x_min":-6.09375,"x_max":338.953125,"ha":376,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 m 270 731 q 252 718 261 722 q 232 710 244 713 l -6 965 l 8 993 q 28 998 15 995 q 56 1003 42 1000 q 85 1007 71 1005 q 107 1010 99 1009 l 270 731 "},"±":{"x_min":41.375,"x_max":528.140625,"ha":570,"o":"m 527 146 q 518 116 524 133 q 507 88 512 99 l 58 88 l 41 104 q 50 133 44 118 q 62 163 56 149 l 511 163 l 527 146 m 324 248 q 294 235 310 241 q 262 227 277 230 l 246 242 l 246 432 l 58 432 l 41 448 q 51 477 45 462 q 62 507 56 493 l 246 507 l 246 692 q 275 702 258 696 q 307 712 292 708 l 324 695 l 324 507 l 511 507 l 528 490 q 518 460 524 477 q 507 432 513 443 l 324 432 l 324 248 "},"|":{"x_min":122,"x_max":217,"ha":318,"o":"m 217 -239 q 183 -260 204 -250 q 145 -275 162 -269 l 122 -259 l 122 1099 q 156 1119 141 1111 q 192 1133 172 1127 l 217 1118 l 217 -239 "},"§":{"x_min":81,"x_max":570,"ha":651,"o":"m 364 358 q 400 340 382 349 q 435 320 418 330 q 469 355 456 334 q 482 402 482 377 q 469 459 482 434 q 431 509 456 484 q 366 557 405 533 q 274 609 327 581 q 244 627 258 617 q 216 645 230 636 q 195 631 204 641 q 180 608 186 621 q 172 581 175 595 q 169 557 169 568 q 180 502 169 526 q 215 456 192 478 q 276 411 239 434 q 364 358 313 387 m 570 445 q 563 389 570 415 q 546 342 557 363 q 521 304 535 321 q 492 277 507 288 q 520 234 509 258 q 531 178 531 210 q 517 97 531 130 q 482 42 503 64 q 434 7 460 20 q 381 -11 407 -5 q 333 -18 356 -17 q 297 -20 311 -20 q 261 -15 281 -20 q 219 -4 241 -11 q 173 13 197 2 q 128 35 150 23 q 121 57 123 37 q 120 103 119 77 q 125 156 121 130 q 132 198 128 183 l 162 191 q 176 136 163 162 q 213 90 190 110 q 266 57 235 69 q 331 46 296 46 q 411 69 380 46 q 443 140 443 92 q 428 187 443 167 q 389 222 413 206 q 335 252 365 238 q 274 284 305 267 q 194 333 230 308 q 133 386 158 358 q 94 448 108 414 q 81 525 81 482 q 88 574 81 550 q 109 618 96 597 q 140 655 122 639 q 176 684 157 672 q 139 743 152 711 q 127 814 127 775 q 143 887 127 856 q 188 937 160 917 q 253 967 217 958 q 328 977 289 977 q 374 972 349 977 q 424 959 400 967 q 471 940 449 951 q 506 918 493 930 q 507 899 510 913 q 498 868 504 885 q 484 836 491 851 q 472 816 476 821 l 446 821 q 378 893 413 870 q 310 916 343 916 q 240 896 265 916 q 215 841 215 877 q 224 798 215 817 q 252 760 233 778 q 299 724 271 742 q 364 684 327 705 q 447 635 409 658 q 512 585 484 612 q 554 525 539 558 q 570 445 570 492 "},"ȩ":{"x_min":54,"x_max":587,"ha":641,"o":"m 451 -155 q 439 -203 451 -180 q 401 -245 427 -226 q 337 -278 376 -264 q 241 -301 297 -292 l 226 -267 q 286 -252 262 -261 q 327 -232 311 -243 q 349 -209 342 -221 q 357 -186 357 -197 q 339 -154 357 -163 q 279 -141 321 -145 q 286 -122 281 -139 q 300 -77 291 -108 q 319 -20 308 -55 l 315 -20 q 215 2 262 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 203 597 168 573 q 237 617 218 607 q 276 634 256 627 q 316 646 296 642 q 355 651 336 651 q 433 638 399 651 q 494 605 468 626 q 537 557 519 585 q 566 499 555 530 q 582 437 577 469 q 587 377 587 405 q 554 352 574 363 q 512 332 534 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 356 68 310 68 q 397 70 377 68 q 440 82 417 73 q 492 110 463 92 q 558 160 520 129 q 573 146 566 155 q 583 132 579 137 q 503 52 537 82 q 439 6 469 22 q 379 -15 408 -10 q 374 -16 376 -15 l 356 -70 q 390 -80 373 -74 q 421 -97 408 -87 q 442 -121 434 -107 q 451 -155 451 -136 m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 450 393 q 470 398 465 393 q 476 417 476 403 q 470 463 476 435 q 450 517 465 490 q 407 561 435 543 q 336 580 380 580 "},"ɨ":{"x_min":31.453125,"x_max":353.875,"ha":376,"o":"m 264 854 q 257 818 264 835 q 241 789 251 801 q 216 769 230 776 q 185 762 202 762 q 141 778 154 762 q 128 826 128 795 q 134 862 128 845 q 151 892 140 879 q 176 911 162 904 q 206 919 190 919 q 264 854 264 919 m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 60 l 142 281 l 47 281 l 31 295 q 38 318 34 306 q 47 342 41 331 l 142 342 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 342 l 338 342 l 353 325 l 338 281 l 244 281 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 "},"ˍ":{"x_min":113.265625,"x_max":571.734375,"ha":685,"o":"m 571 -66 q 567 -83 570 -73 q 559 -103 563 -93 q 551 -122 555 -113 q 545 -138 548 -132 l 128 -138 l 113 -121 q 118 -104 114 -113 q 125 -85 121 -94 q 133 -66 129 -75 q 141 -50 137 -57 l 556 -50 l 571 -66 "},"":{"x_min":45,"x_max":985,"ha":834,"o":"m 369 72 q 426 85 396 72 q 487 120 456 99 q 548 170 518 142 q 606 225 578 197 l 606 671 q 533 753 579 724 q 429 783 488 783 q 367 772 399 783 q 303 742 334 762 q 243 693 271 722 q 193 624 214 663 q 159 537 172 585 q 147 432 147 489 q 166 289 147 355 q 217 174 185 223 q 288 99 248 126 q 369 72 328 72 m 606 152 q 542 79 574 112 q 478 25 511 47 q 409 -8 445 3 q 331 -20 372 -20 q 268 -7 301 -20 q 204 29 236 5 q 143 90 172 54 q 92 174 114 127 q 57 279 70 222 q 45 405 45 337 q 57 506 45 458 q 89 595 69 554 q 133 672 108 637 q 185 735 158 707 q 235 783 211 763 q 280 816 260 803 q 327 841 303 830 q 375 859 352 851 q 418 871 398 867 q 455 875 439 875 q 496 872 476 875 q 538 861 517 869 q 582 837 559 852 q 630 796 605 821 q 652 813 641 804 q 674 833 664 823 q 693 854 684 844 q 711 874 703 865 l 740 848 q 727 792 732 823 q 718 731 722 766 q 715 654 715 695 l 715 -72 q 717 -162 715 -124 q 727 -226 719 -201 q 750 -263 735 -251 q 794 -275 766 -275 q 822 -269 809 -275 q 845 -254 835 -264 q 861 -233 855 -245 q 867 -207 867 -221 q 860 -179 867 -194 q 872 -166 860 -173 q 901 -150 884 -158 q 938 -138 919 -143 q 972 -133 957 -133 l 985 -159 q 963 -224 985 -192 q 907 -282 941 -256 q 829 -323 872 -307 q 743 -339 786 -339 q 672 -323 699 -339 q 631 -278 646 -307 q 611 -207 616 -249 q 606 -113 606 -166 l 606 152 "},"q":{"x_min":54,"x_max":701.265625,"ha":716,"o":"m 330 68 q 375 77 353 68 q 419 102 397 86 q 462 137 441 117 q 505 177 484 156 l 505 494 q 441 554 482 533 q 352 576 401 576 q 279 560 314 576 q 216 512 244 544 q 172 433 189 480 q 156 322 156 385 q 172 217 156 264 q 214 137 189 170 q 271 85 240 103 q 330 68 302 68 m 389 -326 l 389 -296 q 479 -276 453 -287 q 505 -254 505 -266 l 505 112 q 454 56 479 81 q 402 15 429 32 q 346 -10 375 -1 q 281 -20 316 -20 q 203 2 243 -20 q 130 65 163 24 q 75 166 96 106 q 54 301 54 226 q 73 411 54 360 q 119 500 92 461 q 178 566 146 539 q 233 606 209 593 q 309 639 271 627 q 373 651 347 651 q 410 648 391 651 q 447 639 428 646 q 486 620 466 632 q 530 587 507 608 q 551 602 540 594 q 572 619 562 610 q 591 636 582 627 q 607 651 600 644 l 628 630 q 617 589 621 611 q 610 543 613 569 q 607 486 607 516 l 607 -254 q 628 -276 607 -265 q 701 -296 649 -287 l 701 -326 l 389 -326 "},"ɑ":{"x_min":54,"x_max":684.453125,"ha":694,"o":"m 684 57 q 584 -1 625 17 q 534 -20 544 -20 q 493 9 506 -20 q 479 110 481 38 q 426 49 450 74 q 378 8 402 24 q 328 -13 354 -6 q 274 -20 303 -20 q 198 2 237 -20 q 126 65 159 24 q 74 166 94 106 q 54 301 54 226 q 64 381 54 339 q 93 461 74 422 q 139 534 112 499 q 202 595 167 568 q 278 636 236 621 q 366 651 319 651 q 400 648 384 651 q 431 639 415 646 q 464 620 447 632 q 503 587 481 607 q 541 613 522 598 q 581 651 560 628 l 600 630 q 590 588 594 611 q 583 543 586 568 q 580 490 580 518 l 580 172 q 583 106 580 131 q 591 74 586 80 q 619 68 597 65 q 676 87 641 72 q 677 83 676 88 q 680 72 679 78 q 684 57 682 65 m 478 173 l 478 494 q 425 554 456 533 q 345 576 393 576 q 267 560 302 576 q 207 512 232 544 q 169 433 183 480 q 156 322 156 385 q 171 217 156 264 q 211 137 187 170 q 265 85 235 103 q 323 68 294 68 q 391 93 355 68 q 478 173 426 119 "},"ộ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 431 -189 q 425 -225 431 -208 q 408 -254 418 -242 q 383 -274 397 -267 q 352 -282 369 -282 q 308 -265 321 -282 q 295 -217 295 -248 q 301 -181 295 -198 q 318 -151 307 -164 q 343 -132 329 -139 q 373 -125 357 -125 q 431 -189 431 -125 m 577 740 q 564 721 569 727 q 548 710 559 715 l 362 891 l 178 710 q 169 715 172 712 q 162 721 165 718 q 155 729 159 724 q 147 740 152 734 l 326 998 l 399 998 l 577 740 "},"®":{"x_min":24,"x_max":472,"ha":495,"o":"m 472 735 q 455 644 472 686 q 408 569 438 601 q 337 519 378 537 q 246 501 295 501 q 157 519 198 501 q 87 569 116 537 q 40 644 57 601 q 24 735 24 686 q 40 826 24 784 q 87 901 57 869 q 157 951 116 933 q 246 970 198 970 q 337 951 295 970 q 408 901 378 933 q 455 826 438 869 q 472 735 472 784 m 432 735 q 418 811 432 775 q 379 873 404 846 q 321 914 355 899 q 246 930 287 930 q 173 914 206 930 q 115 873 139 899 q 76 811 90 846 q 63 735 63 775 q 76 659 63 694 q 115 597 90 624 q 173 556 139 571 q 246 541 206 541 q 321 556 287 541 q 379 597 355 571 q 418 659 404 624 q 432 735 432 694 m 145 602 l 145 614 q 175 627 175 620 l 175 848 l 145 844 l 143 863 q 185 872 163 868 q 235 876 206 876 q 311 857 285 876 q 338 811 338 839 q 319 759 338 779 q 270 730 300 738 l 340 633 q 353 624 345 626 q 375 623 360 622 l 377 609 q 349 601 363 605 q 327 597 334 597 q 314 602 320 597 q 305 610 308 606 l 234 726 l 233 726 q 212 728 222 726 l 212 627 q 241 614 212 620 l 241 602 l 145 602 m 227 851 l 219 851 q 212 851 216 851 l 212 752 q 220 750 217 750 l 230 750 q 281 765 265 750 q 297 805 297 779 q 281 838 297 824 q 227 851 266 851 "},"Ṭ":{"x_min":6.34375,"x_max":734.5625,"ha":765,"o":"m 207 0 l 207 29 q 260 42 238 35 q 294 55 281 48 q 313 67 307 61 q 319 78 319 73 l 319 794 l 116 794 q 97 790 106 794 q 80 774 89 786 q 61 738 72 762 q 35 675 50 714 l 6 688 q 15 773 9 728 q 28 855 21 819 l 714 855 l 734 838 q 727 762 733 803 q 714 678 722 721 l 683 678 q 671 731 676 709 q 659 767 666 753 q 644 787 653 781 q 620 794 634 794 l 428 794 l 428 78 q 452 55 428 69 q 539 29 476 42 l 539 0 l 207 0 m 438 -189 q 432 -225 438 -208 q 415 -254 426 -242 q 391 -274 405 -267 q 359 -282 376 -282 q 315 -265 329 -282 q 302 -217 302 -248 q 308 -181 302 -198 q 325 -151 314 -164 q 350 -132 336 -139 q 380 -125 364 -125 q 438 -189 438 -125 "},"ṓ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 598 868 q 594 851 597 861 q 586 831 590 841 q 578 812 582 822 q 572 797 575 803 l 155 797 l 140 813 q 145 830 141 821 q 152 850 148 840 q 160 869 156 859 q 168 885 164 878 l 583 885 l 598 868 m 333 954 q 311 961 321 956 q 295 973 302 967 l 453 1254 q 475 1251 461 1253 q 502 1248 488 1250 q 531 1243 517 1246 q 552 1238 544 1240 l 567 1212 l 333 954 "},"ḱ":{"x_min":37.046875,"x_max":694.515625,"ha":695,"o":"m 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 878 q 128 926 132 909 q 114 952 124 943 q 84 963 103 960 q 37 969 66 966 l 37 996 q 129 1018 83 1006 q 208 1051 174 1031 l 234 1027 l 234 359 l 442 542 q 470 573 465 561 q 468 591 474 585 q 446 599 461 597 q 413 601 431 601 l 413 631 l 670 631 l 670 601 q 615 590 640 598 q 562 559 590 582 l 330 374 l 586 75 q 605 57 595 64 q 628 45 615 50 q 655 40 640 41 q 690 41 670 39 l 694 12 q 655 3 674 7 q 619 -1 636 0 q 589 -5 602 -4 q 569 -7 576 -7 q 523 1 541 -7 q 491 28 506 9 l 234 353 l 234 70 q 236 61 234 65 q 246 52 238 56 q 268 42 253 48 q 308 29 283 37 l 308 0 l 37 0 m 276 1096 q 259 1107 264 1101 q 245 1127 254 1114 l 508 1342 q 526 1332 514 1338 q 550 1318 537 1325 q 572 1304 562 1311 q 588 1292 582 1297 l 594 1261 l 276 1096 "},"ọ":{"x_min":54,"x_max":645,"ha":699,"o":"m 540 308 q 522 410 540 362 q 476 495 504 458 q 413 554 448 532 q 343 576 378 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 226 134 197 170 q 289 76 254 97 q 355 55 324 55 q 438 72 403 55 q 495 124 473 90 q 529 203 518 157 q 540 308 540 250 m 645 329 q 633 240 645 283 q 601 158 621 196 q 552 86 581 119 q 489 30 524 53 q 416 -6 455 6 q 336 -20 378 -20 q 220 4 272 -20 q 131 71 168 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 207 600 172 576 q 281 637 241 623 q 363 651 320 651 q 478 626 426 651 q 567 559 530 602 q 624 457 604 516 q 645 329 645 398 m 431 -189 q 425 -225 431 -208 q 408 -254 418 -242 q 383 -274 397 -267 q 352 -282 369 -282 q 308 -265 321 -282 q 295 -217 295 -248 q 301 -181 295 -198 q 318 -151 307 -164 q 343 -132 329 -139 q 373 -125 357 -125 q 431 -189 431 -125 "},"ẖ":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 543 496 549 470 q 528 537 538 522 q 500 557 517 552 q 462 563 484 563 q 411 550 438 563 q 353 514 383 538 q 293 455 324 491 q 234 372 263 419 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 880 q 129 924 132 908 q 117 949 127 940 q 88 961 107 958 q 37 969 69 965 l 37 996 q 88 1007 65 1002 q 132 1019 112 1013 q 170 1033 152 1025 q 208 1051 189 1040 l 234 1027 l 233 463 q 298 541 262 507 q 370 600 334 576 q 440 638 406 625 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 m 620 -155 q 615 -172 619 -162 q 608 -192 612 -182 q 600 -211 604 -201 q 594 -227 596 -220 l 177 -227 l 162 -210 q 166 -193 163 -202 q 174 -173 170 -183 q 182 -154 178 -164 q 189 -139 186 -145 l 605 -139 l 620 -155 "},"ế":{"x_min":54,"x_max":588,"ha":642,"o":"m 336 580 q 271 566 301 580 q 219 527 242 552 q 181 468 196 503 q 160 393 166 434 l 451 393 q 471 398 466 393 q 477 417 477 403 q 471 463 477 435 q 451 517 466 490 q 408 561 436 543 q 336 580 381 580 m 588 377 q 555 352 575 363 q 513 332 535 340 l 156 332 q 170 231 156 279 q 210 147 184 183 q 273 89 236 111 q 357 68 310 68 q 398 70 378 68 q 441 82 418 73 q 492 110 464 92 q 558 160 520 129 q 574 146 567 155 q 584 132 580 137 q 504 52 538 82 q 439 6 469 22 q 379 -14 409 -9 q 315 -20 350 -20 q 216 2 263 -20 q 132 65 168 24 q 75 164 96 106 q 54 294 54 222 q 64 383 54 339 q 93 467 74 428 q 140 539 113 506 q 204 597 168 573 q 237 617 219 607 q 276 634 256 627 q 317 646 297 642 q 355 651 337 651 q 434 638 399 651 q 494 605 469 626 q 538 557 520 585 q 567 499 556 530 q 583 437 578 469 q 588 377 588 405 m 560 740 q 547 721 552 727 q 531 710 542 715 l 345 891 l 161 710 q 152 715 155 712 q 145 721 148 718 q 139 729 142 724 q 130 740 135 734 l 309 998 l 382 998 l 560 740 m 316 1015 q 295 1022 304 1017 q 278 1034 285 1028 l 436 1315 q 458 1312 444 1314 q 485 1309 471 1311 q 514 1304 500 1307 q 535 1299 527 1301 l 550 1273 l 316 1015 "}," ":{"x_min":0,"x_max":0,"ha":306},"Ḉ":{"x_min":47,"x_max":690.40625,"ha":745,"o":"m 508 -155 q 496 -203 508 -180 q 458 -245 484 -226 q 394 -278 433 -264 q 298 -301 354 -292 l 283 -267 q 343 -252 319 -261 q 384 -232 368 -243 q 406 -209 399 -221 q 414 -187 414 -197 q 396 -154 414 -163 q 336 -141 378 -145 q 343 -122 338 -139 q 357 -77 348 -108 q 376 -20 365 -55 q 262 8 319 -17 q 154 90 202 36 q 76 221 106 143 q 47 397 47 299 q 79 594 47 506 q 168 744 112 682 q 299 841 225 807 q 457 875 374 875 q 586 855 531 875 q 676 806 641 835 q 674 793 681 803 q 658 770 668 783 q 635 744 647 757 q 615 723 624 731 l 592 727 q 510 779 557 759 q 400 800 462 800 q 350 791 377 800 q 295 764 322 783 q 241 716 267 746 q 195 645 215 687 q 163 548 175 603 q 152 422 152 492 q 178 264 152 332 q 245 151 204 196 q 337 83 286 106 q 436 61 387 61 q 531 86 472 61 q 665 173 590 111 q 672 167 668 172 q 679 158 676 163 q 685 149 682 153 q 690 143 688 145 q 607 65 647 96 q 530 14 567 33 q 457 -12 493 -4 q 430 -16 444 -14 l 413 -70 q 447 -81 430 -74 q 478 -97 465 -87 q 499 -122 491 -107 q 508 -155 508 -136 m 326 927 q 310 938 315 932 q 296 958 305 945 l 558 1173 q 577 1162 565 1168 q 600 1148 588 1156 q 623 1135 613 1141 q 638 1122 633 1128 l 644 1092 l 326 927 "},"∑":{"x_min":40.015625,"x_max":684.328125,"ha":722,"o":"m 684 234 q 680 173 682 206 q 675 107 678 140 l 670 46 q 666 0 668 18 l 61 0 l 40 29 l 336 430 l 54 825 l 54 855 l 511 855 q 582 856 549 855 q 655 865 615 857 l 658 660 l 620 652 q 596 729 608 702 q 572 769 583 756 q 550 783 560 781 q 529 786 539 786 l 210 786 l 442 456 l 173 95 l 548 95 q 582 101 569 95 q 607 124 596 107 q 626 168 617 140 q 648 242 636 197 l 684 234 "},"ẃ":{"x_min":13.5625,"x_max":966.46875,"ha":981,"o":"m 966 601 q 933 592 945 597 q 913 583 921 588 q 903 573 906 579 q 898 559 900 567 l 748 40 q 732 14 744 25 q 706 -2 720 4 q 678 -13 692 -9 q 655 -20 664 -17 l 494 439 l 355 40 q 338 14 349 24 q 314 -3 327 3 q 287 -14 300 -10 q 265 -20 274 -17 l 87 559 q 13 601 81 586 l 13 631 l 275 631 l 275 601 q 223 594 242 598 q 197 583 205 589 q 188 572 189 578 q 190 559 188 565 l 318 129 l 484 631 l 531 631 l 708 129 l 825 559 q 811 584 829 575 q 746 601 792 594 l 746 631 l 966 631 l 966 601 m 479 710 q 457 717 467 712 q 440 729 448 722 l 599 1010 q 620 1007 607 1009 q 648 1003 634 1005 q 676 999 663 1001 q 697 994 690 996 l 713 967 l 479 710 "},"+":{"x_min":41.859375,"x_max":528.140625,"ha":570,"o":"m 324 160 q 294 147 310 153 q 262 139 277 142 l 246 153 l 246 344 l 58 344 l 41 360 q 51 389 45 374 q 62 419 56 405 l 246 419 l 246 604 q 275 614 258 608 q 307 624 292 620 l 324 608 l 324 419 l 511 419 l 528 402 q 518 372 524 389 q 507 344 513 355 l 324 344 l 324 160 "},"ḋ":{"x_min":54,"x_max":712.796875,"ha":722,"o":"m 712 57 q 657 21 681 36 q 615 -2 633 7 q 584 -15 597 -11 q 561 -20 571 -20 q 525 10 539 -20 q 506 114 510 41 q 454 58 480 83 q 402 16 429 33 q 346 -10 375 -1 q 281 -20 316 -20 q 203 2 243 -20 q 130 65 163 24 q 75 166 96 106 q 54 301 54 226 q 64 381 54 339 q 94 461 75 422 q 142 534 114 499 q 206 595 171 568 q 283 636 241 621 q 373 651 325 651 q 436 643 405 651 q 505 608 468 635 l 505 863 q 502 923 505 901 q 491 957 500 945 q 462 973 481 968 q 406 980 442 977 l 406 1006 q 506 1026 462 1014 q 585 1051 550 1039 l 607 1030 l 607 172 q 608 131 607 148 q 611 103 609 114 q 615 84 613 91 q 622 72 618 76 q 645 67 628 64 q 703 86 663 70 l 712 57 m 505 177 l 505 494 q 441 554 482 533 q 352 576 401 576 q 273 560 309 576 q 211 512 237 544 q 170 433 185 480 q 156 322 156 385 q 172 217 156 264 q 214 137 189 170 q 271 85 240 103 q 330 68 302 68 q 375 77 353 68 q 419 102 397 86 q 462 137 441 117 q 505 177 484 156 m 295 854 q 289 818 295 835 q 272 789 283 801 q 247 769 262 776 q 216 762 233 762 q 172 778 186 762 q 159 826 159 795 q 165 862 159 845 q 182 892 171 879 q 207 911 193 904 q 237 919 221 919 q 295 854 295 919 "},"Ṓ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 m 653 1058 q 648 1041 651 1051 q 640 1021 644 1031 q 633 1002 636 1012 q 626 987 629 993 l 209 987 l 194 1003 q 199 1020 196 1011 q 206 1040 202 1030 q 214 1059 210 1049 q 222 1075 219 1068 l 638 1075 l 653 1058 m 327 1144 q 310 1155 316 1148 q 297 1174 305 1161 l 559 1390 q 577 1379 566 1385 q 601 1365 589 1373 q 623 1352 613 1358 q 639 1339 634 1345 l 645 1309 l 327 1144 "},"˗":{"x_min":41.375,"x_max":426.609375,"ha":468,"o":"m 426 370 q 416 338 422 355 q 405 309 411 320 l 58 309 l 41 325 q 50 356 44 340 q 62 387 56 373 l 409 387 l 426 370 "},"Ë":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 543 1045 q 537 1009 543 1026 q 520 980 531 992 q 496 960 510 967 q 464 953 481 953 q 421 969 434 953 q 407 1018 407 986 q 413 1053 407 1036 q 430 1083 419 1070 q 455 1102 441 1095 q 485 1110 469 1110 q 543 1045 543 1110 m 272 1045 q 266 1009 272 1026 q 249 980 260 992 q 225 960 239 967 q 193 953 210 953 q 150 969 163 953 q 136 1018 136 986 q 142 1053 136 1036 q 159 1083 148 1070 q 184 1102 170 1095 q 214 1110 198 1110 q 272 1045 272 1110 "},"Š":{"x_min":79.515625,"x_max":600,"ha":661,"o":"m 600 255 q 591 193 600 225 q 567 130 583 161 q 525 72 550 99 q 467 24 501 45 q 391 -7 433 4 q 298 -20 349 -20 q 249 -15 276 -20 q 195 -2 223 -10 q 140 18 167 6 q 89 46 112 30 q 81 69 84 48 q 79 116 79 89 q 81 172 79 144 q 89 219 83 201 l 116 216 q 155 147 132 176 q 207 98 179 117 q 268 70 235 79 q 336 61 301 61 q 397 73 366 61 q 452 107 428 86 q 492 158 476 129 q 508 219 508 187 q 489 290 508 261 q 441 343 471 320 q 374 385 412 366 q 297 421 336 403 q 219 460 257 440 q 152 508 181 480 q 104 570 122 535 q 86 655 86 606 q 92 701 86 676 q 111 750 98 725 q 146 797 125 774 q 198 837 168 820 q 267 864 228 854 q 356 875 307 875 q 417 870 387 875 q 475 857 448 865 q 523 837 502 849 q 557 812 545 826 q 558 796 562 808 q 544 770 553 784 q 524 743 535 756 q 505 722 513 729 l 480 726 q 440 763 461 748 q 398 789 420 779 q 356 802 377 798 q 316 807 335 807 q 251 795 278 807 q 207 766 224 783 q 182 728 190 749 q 174 687 174 706 q 192 631 174 655 q 240 585 210 606 q 308 546 270 565 q 387 508 346 528 q 465 465 427 488 q 533 412 503 442 q 581 344 563 382 q 600 255 600 306 m 375 943 l 303 943 l 124 1151 q 132 1162 128 1157 q 138 1170 135 1167 q 145 1176 141 1174 q 154 1183 149 1179 l 341 1039 l 524 1183 q 540 1170 535 1176 q 553 1151 545 1164 l 375 943 "},"ƙ":{"x_min":37.046875,"x_max":694.515625,"ha":695,"o":"m 694 12 q 655 3 674 7 q 619 -1 636 0 q 589 -5 602 -4 q 569 -7 576 -7 q 523 1 541 -7 q 491 28 506 9 l 234 354 l 234 70 q 236 61 234 65 q 246 52 238 56 q 268 42 253 48 q 308 29 283 37 l 308 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 607 q 144 747 132 688 q 177 850 156 806 q 228 926 198 894 q 295 989 258 959 q 338 1016 315 1004 q 383 1035 361 1027 q 425 1047 405 1043 q 459 1051 445 1051 q 515 1039 486 1051 q 565 1013 543 1028 q 602 984 588 998 q 616 963 616 969 q 606 947 616 957 q 583 924 596 936 q 555 902 569 913 q 530 888 540 892 q 462 944 499 923 q 384 966 426 966 q 336 950 362 966 q 287 896 310 934 q 249 795 264 859 q 234 635 234 731 l 234 359 l 442 542 q 470 573 465 561 q 468 591 474 585 q 446 599 461 597 q 413 601 431 601 l 413 631 l 670 631 l 670 601 q 615 590 640 598 q 562 559 590 582 l 330 374 l 586 75 q 605 57 595 64 q 628 45 615 50 q 655 40 640 41 q 690 41 670 39 l 694 12 "},"ṽ":{"x_min":13.5625,"x_max":670.765625,"ha":685,"o":"m 670 601 q 637 593 650 597 q 616 583 624 588 q 603 572 608 578 q 596 555 599 565 l 404 40 q 386 14 398 25 q 361 -2 375 4 q 334 -13 347 -9 q 312 -20 321 -17 l 88 555 q 65 584 82 574 q 13 601 47 594 l 13 631 l 275 631 l 275 601 q 232 595 248 598 q 206 586 215 591 q 196 574 197 581 q 198 555 194 566 l 365 121 l 522 555 q 524 573 525 565 q 515 585 523 580 q 492 594 507 590 q 451 601 476 597 l 451 631 l 670 631 l 670 601 m 594 912 q 565 857 582 884 q 528 808 548 830 q 482 773 507 787 q 432 760 458 760 q 386 771 408 760 q 345 798 365 783 q 304 825 324 813 q 265 837 284 837 q 215 814 238 837 q 168 755 193 792 l 132 768 q 161 823 144 796 q 198 873 177 851 q 243 908 219 894 q 294 922 267 922 q 343 910 320 922 q 386 883 366 898 q 425 856 406 868 q 459 845 443 845 q 510 866 485 845 q 558 928 535 888 l 594 912 "},"ở":{"x_min":54,"x_max":746,"ha":746,"o":"m 539 308 q 521 410 539 362 q 475 495 503 458 q 412 554 448 532 q 342 576 377 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 225 134 197 170 q 289 76 254 97 q 355 55 323 55 q 437 72 403 55 q 494 124 472 90 q 528 203 517 157 q 539 308 539 250 m 746 707 q 738 670 746 690 q 713 626 731 649 q 665 577 695 602 q 590 527 635 551 q 630 436 616 486 q 644 329 644 386 q 632 240 644 283 q 600 158 620 197 q 551 86 580 119 q 489 30 523 53 q 416 -6 454 6 q 336 -20 377 -20 q 219 4 271 -20 q 130 71 167 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 206 600 172 576 q 280 637 241 623 q 362 651 320 651 q 474 628 424 651 q 561 564 525 605 q 613 611 597 588 q 629 652 629 634 q 618 689 629 671 q 589 722 608 707 l 710 777 q 736 744 726 762 q 746 707 746 726 m 477 904 q 464 871 477 886 q 435 843 452 856 q 402 817 418 829 q 378 793 386 806 q 377 767 371 780 q 412 736 384 753 q 392 728 403 730 q 371 726 381 727 q 326 753 340 740 q 308 776 311 765 q 311 797 305 787 q 329 815 318 806 q 355 833 341 824 q 382 851 369 842 q 402 871 394 861 q 411 894 411 882 q 398 933 411 920 q 365 946 385 946 q 347 942 355 946 q 332 932 338 938 q 323 918 326 926 q 319 903 319 911 q 321 896 319 900 q 325 889 323 893 q 311 885 319 887 q 293 880 302 882 q 273 877 283 878 q 257 874 264 875 l 250 882 l 250 891 q 263 922 250 907 q 295 950 275 938 q 340 971 315 963 q 388 979 364 979 q 454 958 431 979 q 477 904 477 938 "},"ð":{"x_min":54,"x_max":634,"ha":692,"o":"m 532 397 q 495 468 519 435 q 443 525 472 501 q 382 562 414 549 q 321 576 350 576 q 251 556 281 576 q 200 502 220 536 q 169 421 180 468 q 159 320 159 375 q 176 219 159 267 q 221 134 194 170 q 281 76 248 97 q 342 55 313 55 q 414 73 380 55 q 474 131 448 92 q 516 230 500 170 q 532 373 532 290 q 532 385 532 379 q 532 397 532 391 m 634 401 q 619 261 634 323 q 579 152 604 199 q 523 73 555 106 q 458 19 492 40 q 393 -10 425 -1 q 336 -20 361 -20 q 217 4 269 -20 q 128 71 165 28 q 73 173 92 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 143 543 115 510 q 202 600 170 576 q 270 637 234 623 q 342 651 306 651 q 385 644 363 651 q 428 625 406 637 q 470 597 450 613 q 508 562 490 580 q 454 686 488 631 q 372 790 421 741 l 219 724 q 200 726 206 725 q 187 727 193 726 q 175 730 182 728 q 158 736 169 732 l 151 761 l 323 836 q 285 866 305 852 q 243 888 265 879 q 196 901 220 897 q 142 900 171 904 l 138 928 l 275 977 q 408 873 351 926 l 549 934 q 574 930 566 932 q 588 928 583 929 q 599 924 594 926 q 613 920 604 922 l 617 896 l 456 826 q 536 723 503 775 q 592 616 570 670 q 623 509 613 563 q 634 401 634 454 "},"Ỡ":{"x_min":48,"x_max":828,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 410 797 448 797 q 301 771 349 797 q 221 698 254 746 q 170 584 188 651 q 153 434 153 517 q 173 290 153 358 q 229 171 194 223 q 310 90 264 120 q 410 61 357 61 q 513 84 466 61 q 594 153 560 107 q 648 268 629 200 q 667 426 667 337 m 828 944 q 820 906 828 927 q 794 861 812 885 q 745 812 776 837 q 667 761 714 786 q 745 614 719 698 q 772 439 772 529 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 390 -20 467 -20 q 245 15 309 -20 q 137 112 181 51 q 71 251 94 172 q 48 415 48 329 q 77 590 48 507 q 159 737 107 674 q 280 837 210 800 q 429 875 349 875 q 542 853 492 875 q 634 796 593 832 q 693 846 675 821 q 711 889 711 871 q 700 926 711 908 q 671 959 690 944 l 792 1014 q 818 981 808 999 q 828 944 828 963 m 648 1103 q 619 1047 636 1075 q 581 998 602 1020 q 536 963 560 977 q 485 950 512 950 q 440 961 461 950 q 398 988 419 973 q 358 1015 378 1003 q 318 1027 338 1027 q 269 1005 291 1027 q 221 945 246 982 l 185 958 q 214 1013 198 986 q 252 1063 231 1041 q 297 1098 273 1084 q 347 1112 321 1112 q 396 1100 373 1112 q 440 1073 419 1088 q 478 1046 460 1058 q 513 1035 497 1035 q 563 1056 539 1035 q 611 1118 588 1078 l 648 1103 "},"Ḝ":{"x_min":33.65625,"x_max":646.609375,"ha":689,"o":"m 452 -155 q 440 -203 452 -180 q 403 -245 428 -226 q 338 -278 378 -264 q 244 -301 299 -292 l 229 -267 q 288 -252 264 -261 q 328 -232 313 -243 q 350 -209 343 -221 q 358 -187 358 -197 q 340 -154 358 -164 q 281 -141 323 -145 q 287 -122 282 -139 q 302 -77 292 -108 q 327 0 311 -50 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 378 61 334 61 l 466 61 q 519 64 497 61 q 558 79 541 67 q 589 114 575 91 q 617 177 603 137 l 646 165 q 632 63 641 107 q 618 0 624 19 l 380 0 l 357 -70 q 391 -81 374 -74 q 422 -97 409 -87 q 443 -122 435 -107 q 452 -155 452 -136 m 560 1139 q 515 1046 540 1084 q 461 985 489 1009 q 402 952 433 962 q 341 942 372 942 q 277 952 308 942 q 218 985 246 962 q 165 1046 189 1009 q 120 1139 140 1084 q 136 1158 128 1151 q 155 1170 144 1164 q 194 1104 172 1131 q 241 1062 217 1078 q 291 1039 265 1046 q 339 1032 316 1032 q 388 1039 362 1032 q 439 1062 415 1046 q 486 1104 464 1078 q 524 1170 508 1131 q 544 1158 536 1164 q 560 1139 552 1151 "},"ı":{"x_min":47.046875,"x_max":338.953125,"ha":376,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 "},"ƚ":{"x_min":47.5625,"x_max":396.4375,"ha":444,"o":"m 381 502 l 273 502 l 273 70 q 296 49 273 60 q 374 29 319 38 l 374 0 l 69 0 l 69 29 q 118 39 98 33 q 149 49 137 44 q 165 59 160 54 q 171 70 171 65 l 171 502 l 62 502 l 47 516 q 54 539 50 527 q 62 563 57 552 l 171 563 l 171 878 q 166 926 171 909 q 152 951 162 943 q 122 963 141 960 q 76 969 104 966 l 76 996 q 165 1017 124 1006 q 248 1051 206 1029 l 273 1027 l 273 563 l 381 563 l 396 546 l 381 502 "},"ä":{"x_min":54,"x_max":628.765625,"ha":638,"o":"m 238 68 q 325 88 279 68 q 423 154 371 109 l 423 329 q 328 311 365 320 q 267 293 291 302 q 229 274 243 284 q 204 252 215 264 q 175 210 186 234 q 165 155 165 187 q 173 111 165 128 q 192 84 181 94 q 217 71 204 74 q 238 68 229 68 m 628 55 q 533 -2 571 15 q 476 -20 495 -20 q 439 11 454 -20 q 423 97 424 42 q 361 44 392 66 q 302 7 331 22 q 246 -13 272 -6 q 198 -20 220 -20 q 148 -11 174 -20 q 101 13 122 -3 q 67 59 81 31 q 54 126 54 87 q 72 212 54 177 q 115 272 90 246 q 152 302 131 288 q 207 330 172 317 q 293 356 241 344 q 423 380 344 368 l 423 475 q 417 518 423 498 q 399 553 412 538 q 364 575 386 568 q 309 583 342 583 q 266 575 287 582 q 229 556 245 568 q 205 527 214 544 q 198 490 196 511 q 184 476 199 484 q 150 462 170 469 q 110 453 130 456 q 83 452 91 450 l 73 478 q 121 543 89 512 q 194 598 153 574 q 280 636 235 622 q 369 651 326 651 q 484 612 444 651 q 525 503 525 573 l 525 120 q 532 80 525 92 q 552 68 539 68 q 576 71 561 68 q 618 86 591 74 l 628 55 m 528 854 q 522 818 528 835 q 506 789 516 801 q 481 769 495 776 q 449 762 466 762 q 406 778 419 762 q 392 826 392 795 q 398 862 392 845 q 415 892 405 879 q 440 911 426 904 q 471 919 454 919 q 528 854 528 919 m 257 854 q 251 818 257 835 q 235 789 245 801 q 210 769 224 776 q 178 762 195 762 q 135 778 148 762 q 121 826 121 795 q 127 862 121 845 q 144 892 134 879 q 169 911 155 904 q 200 919 183 919 q 257 854 257 919 "},"Ǯ":{"x_min":63.53125,"x_max":662,"ha":723,"o":"m 662 294 q 634 164 662 222 q 561 65 606 106 q 455 2 515 24 q 330 -20 395 -20 q 223 -4 272 -20 q 138 30 174 10 q 83 71 102 50 q 63 103 63 92 q 73 119 63 107 q 96 143 82 130 q 127 166 111 155 q 157 179 143 177 q 194 132 172 154 q 243 95 216 111 q 299 70 270 79 q 357 61 328 61 q 437 72 399 61 q 501 108 474 84 q 544 170 528 132 q 560 259 560 208 q 546 338 560 300 q 507 404 532 376 q 444 451 481 433 q 361 469 408 469 q 304 459 331 469 q 244 435 277 450 l 211 418 l 210 419 q 198 432 205 423 q 188 446 191 441 l 187 447 l 187 448 l 188 449 l 467 787 l 208 787 q 185 777 197 787 q 160 751 172 768 q 137 709 148 734 q 120 653 127 684 l 81 661 l 102 865 q 128 859 116 861 q 154 855 141 856 q 183 855 167 855 l 607 855 l 624 825 l 388 533 q 410 536 399 535 q 432 538 421 538 q 517 522 476 538 q 591 475 559 506 q 642 399 623 445 q 662 294 662 354 m 399 943 l 326 943 l 147 1185 q 155 1196 152 1191 q 162 1204 159 1201 q 169 1210 165 1208 q 178 1217 172 1213 l 364 1046 l 548 1217 q 564 1204 559 1210 q 577 1185 569 1198 l 399 943 "},"¹":{"x_min":65.671875,"x_max":398.90625,"ha":456,"o":"m 80 421 l 80 449 q 141 457 117 453 q 178 467 164 462 q 196 476 191 471 q 202 486 202 481 l 202 796 q 200 821 202 812 q 193 836 199 830 q 183 840 190 838 q 163 841 176 841 q 128 838 149 840 q 75 830 107 836 l 65 857 q 113 871 85 862 q 171 890 142 880 q 227 909 201 899 q 269 927 253 919 l 287 912 l 287 486 q 291 477 287 481 q 307 467 295 472 q 340 457 318 462 q 398 449 362 453 l 398 421 l 80 421 "},"W":{"x_min":13.5625,"x_max":1154.328125,"ha":1181,"o":"m 1154 825 q 1104 814 1124 819 q 1073 803 1085 808 q 1057 793 1062 798 q 1051 783 1051 789 l 895 40 q 881 15 892 26 q 855 -2 870 5 q 826 -13 841 -9 q 801 -20 811 -17 l 580 640 l 385 40 q 369 15 381 26 q 343 -1 358 5 q 313 -12 328 -8 q 283 -20 297 -17 l 107 778 q 82 806 103 795 q 13 825 61 817 l 13 855 l 304 855 l 304 825 q 252 817 271 822 q 223 806 233 812 q 212 792 214 800 q 212 778 210 785 l 347 169 l 567 855 l 604 855 l 844 169 l 971 783 q 965 798 972 791 q 943 808 957 804 q 909 817 929 813 q 866 825 889 821 l 866 855 l 1154 855 l 1154 825 "},"ỉ":{"x_min":47.046875,"x_max":338.953125,"ha":376,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 m 307 904 q 295 871 307 886 q 265 843 282 856 q 232 817 248 829 q 209 793 216 806 q 208 767 201 780 q 243 736 214 753 q 222 728 233 730 q 201 726 211 727 q 156 753 171 740 q 138 776 141 765 q 142 797 135 787 q 160 815 148 806 q 186 833 171 824 q 212 851 200 842 q 233 871 224 861 q 241 894 241 882 q 228 933 241 920 q 196 946 215 946 q 177 942 186 946 q 163 932 169 938 q 153 918 157 926 q 150 903 150 911 q 151 896 150 900 q 155 889 153 893 q 141 885 150 887 q 123 880 133 882 q 104 877 113 878 q 88 874 94 875 l 80 882 l 80 891 q 93 922 80 907 q 126 950 106 938 q 170 971 146 963 q 218 979 195 979 q 284 958 261 979 q 307 904 307 938 "},"ɲ":{"x_min":-163.25,"x_max":739.953125,"ha":760,"o":"m 448 0 l 448 29 q 520 51 497 42 q 543 70 543 61 l 543 429 q 538 496 543 470 q 523 537 534 522 q 497 557 513 552 q 456 563 480 563 q 409 552 435 563 q 353 520 383 542 q 291 461 323 497 q 227 372 259 425 l 227 59 q 216 -73 227 -19 q 186 -165 205 -128 q 143 -228 167 -203 q 91 -275 118 -254 q 52 -303 73 -291 q 9 -322 30 -314 q -30 -334 -12 -330 q -62 -339 -49 -339 q -94 -334 -77 -339 q -126 -322 -111 -329 q -152 -307 -142 -315 q -163 -292 -163 -298 q -153 -275 -163 -286 q -130 -253 -143 -265 q -101 -231 -116 -242 q -77 -216 -86 -221 q -51 -234 -64 -228 q -27 -243 -38 -240 q -5 -247 -16 -246 q 12 -247 4 -247 q 52 -236 32 -247 q 88 -195 72 -225 q 114 -113 104 -166 q 125 23 125 -60 l 125 482 q 122 524 125 508 q 111 548 120 540 q 83 561 102 557 q 30 570 64 565 l 30 597 q 116 618 76 604 q 193 651 156 632 l 216 627 l 223 458 q 288 539 252 503 q 361 599 324 575 q 433 637 399 624 q 494 651 468 651 q 551 642 524 651 q 599 615 578 633 q 632 568 619 596 q 645 502 645 540 l 645 70 q 665 51 645 61 q 739 29 686 42 l 739 0 l 448 0 "},">":{"x_min":41.375,"x_max":568.34375,"ha":610,"o":"m 568 424 q 559 391 564 411 q 547 355 553 371 l 58 174 l 41 190 q 46 206 43 197 q 51 224 48 215 q 56 242 54 234 q 62 257 59 251 l 436 397 l 52 539 l 41 565 q 71 588 56 578 q 98 610 86 599 l 552 440 l 568 424 "},"Ệ":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 408 -189 q 402 -225 408 -208 q 385 -254 396 -242 q 361 -274 375 -267 q 329 -282 346 -282 q 286 -265 299 -282 q 272 -217 272 -248 q 278 -181 272 -198 q 295 -151 284 -164 q 320 -132 306 -139 q 350 -125 334 -125 q 408 -189 408 -125 m 554 957 q 541 938 546 944 q 525 927 537 932 l 339 1068 l 156 927 q 146 932 150 929 q 140 938 143 935 q 133 946 137 941 q 125 957 130 951 l 304 1167 l 377 1167 l 554 957 "},"Ḃ":{"x_min":27.5625,"x_max":689,"ha":764,"o":"m 280 818 q 261 817 270 818 q 241 817 251 817 l 241 492 l 264 492 q 389 507 341 492 q 463 546 437 522 q 499 599 490 569 q 509 658 509 629 q 497 721 509 692 q 460 772 486 750 q 389 805 433 793 q 280 818 346 818 m 352 441 q 292 437 320 441 q 241 430 265 434 l 241 70 q 247 59 241 64 q 273 53 258 55 q 304 49 288 51 q 335 47 319 48 q 364 47 350 47 q 452 59 413 47 q 520 94 491 72 q 563 148 548 116 q 578 218 578 180 q 564 294 578 255 q 524 366 551 334 q 454 420 496 399 q 352 441 411 441 m 689 241 q 666 137 689 183 q 602 57 643 90 q 504 7 561 25 q 378 -10 447 -10 q 343 -9 364 -10 q 298 -8 322 -9 q 250 -7 275 -7 q 201 -5 224 -6 q 83 0 144 -2 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 807 q 81 800 106 803 q 33 792 56 796 l 27 834 q 88 848 54 841 q 162 861 123 856 q 241 871 201 867 q 318 875 281 875 q 440 862 385 875 q 534 826 495 849 q 593 768 572 802 q 614 692 614 734 q 579 566 614 619 q 484 491 544 514 q 565 460 528 482 q 630 405 602 437 q 673 330 657 372 q 689 241 689 288 m 426 1045 q 420 1009 426 1026 q 403 980 414 992 q 378 960 393 967 q 347 953 364 953 q 303 969 316 953 q 290 1018 290 986 q 296 1053 290 1036 q 313 1083 302 1070 q 338 1102 324 1095 q 368 1110 352 1110 q 426 1045 426 1110 "},"Ŵ":{"x_min":13.5625,"x_max":1154.328125,"ha":1181,"o":"m 1154 825 q 1104 814 1124 819 q 1073 803 1085 808 q 1057 793 1062 798 q 1051 783 1051 789 l 895 40 q 881 15 892 26 q 855 -2 870 5 q 826 -13 841 -9 q 801 -20 811 -17 l 580 640 l 385 40 q 369 15 381 26 q 343 -1 358 5 q 313 -12 328 -8 q 283 -20 297 -17 l 107 778 q 82 806 103 795 q 13 825 61 817 l 13 855 l 304 855 l 304 825 q 252 817 271 822 q 223 806 233 812 q 212 792 214 800 q 212 778 210 785 l 347 169 l 567 855 l 604 855 l 844 169 l 971 783 q 965 798 972 791 q 943 808 957 804 q 909 817 929 813 q 866 825 889 821 l 866 855 l 1154 855 l 1154 825 m 798 957 q 785 938 790 944 q 769 927 780 932 l 583 1068 l 399 927 q 390 932 394 929 q 383 938 386 935 q 377 946 380 941 q 368 957 373 951 l 548 1167 l 620 1167 l 798 957 "},"Ð":{"x_min":18.0625,"x_max":761,"ha":823,"o":"m 761 458 q 743 306 761 373 q 697 188 726 240 q 629 102 668 137 q 548 43 591 66 q 462 10 506 21 q 378 0 418 0 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 417 l 32 417 l 18 433 q 25 455 21 444 q 32 478 28 467 l 132 478 l 132 805 q 80 798 104 802 q 33 792 56 795 l 27 834 q 96 849 57 842 q 178 863 135 857 q 266 871 222 868 q 350 875 310 875 q 521 846 445 875 q 650 765 596 818 q 732 634 703 711 q 761 458 761 556 m 307 818 q 241 816 273 818 l 241 478 l 416 478 l 433 462 l 416 417 l 241 417 l 241 104 q 248 80 241 89 q 284 62 257 68 q 364 57 311 57 q 460 79 411 57 q 551 148 510 102 q 619 265 593 195 q 646 432 646 336 q 623 593 646 522 q 558 715 601 665 q 451 791 515 765 q 307 818 388 818 "},"r":{"x_min":37.046875,"x_max":528.015625,"ha":550,"o":"m 522 625 q 528 602 528 621 q 522 556 527 582 q 509 503 517 530 q 493 458 501 476 l 463 458 q 452 504 459 485 q 435 534 444 523 q 413 550 425 545 q 388 556 401 556 q 353 543 373 556 q 312 504 333 530 q 270 435 291 477 q 234 336 250 393 l 234 70 q 259 49 234 60 q 348 29 284 38 l 348 0 l 37 0 l 37 29 q 106 49 81 39 q 132 70 132 59 l 132 465 q 130 502 132 487 q 127 527 129 518 q 122 542 125 537 q 116 551 119 547 q 105 559 111 556 q 90 564 100 562 q 68 567 81 566 q 37 569 56 568 l 37 596 q 123 620 81 608 q 200 651 166 632 l 224 627 l 233 473 q 272 543 250 510 q 318 599 293 575 q 369 637 342 623 q 425 651 396 651 q 472 645 446 651 q 522 625 497 640 "},"Ø":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 653 544 667 487 q 613 650 639 601 l 255 137 q 327 81 288 101 q 409 61 366 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 152 434 q 166 313 152 371 q 206 208 180 255 l 565 721 q 494 776 534 756 q 409 797 455 797 q 301 771 348 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 m 680 745 q 749 603 726 683 q 772 438 772 523 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 466 -20 q 281 -1 330 -20 q 193 50 233 17 l 157 -1 q 139 -11 150 -6 q 115 -21 128 -16 q 90 -29 102 -25 q 69 -36 78 -33 l 51 -14 l 137 109 q 70 249 93 170 q 47 414 47 328 q 76 590 47 507 q 158 737 106 674 q 279 837 210 800 q 429 875 349 875 q 537 856 488 875 q 625 805 585 837 l 662 857 q 704 877 680 868 q 748 891 727 885 l 767 868 l 680 745 "},"ǐ":{"x_min":-21.703125,"x_max":407.625,"ha":376,"o":"m 47 0 l 47 29 q 117 49 93 38 q 142 70 142 61 l 142 454 q 140 510 142 488 q 130 543 139 531 q 102 560 121 555 q 47 569 83 566 l 47 596 q 91 606 68 600 q 137 619 114 612 q 182 634 161 626 q 220 651 203 642 l 244 651 l 244 70 q 266 50 244 62 q 338 29 289 38 l 338 0 l 47 0 m 229 726 l 157 726 l -21 968 q -13 979 -16 974 q -7 987 -10 984 q 0 993 -4 991 q 8 1000 3 996 l 195 829 l 378 1000 q 394 987 389 993 q 407 968 399 981 l 229 726 "},"Ỳ":{"x_min":-0.390625,"x_max":797.6875,"ha":825,"o":"m 243 0 l 243 29 q 330 55 305 42 q 355 78 355 68 l 355 364 q 298 478 329 419 q 232 594 266 538 q 168 699 199 651 q 113 780 137 748 q 99 794 107 788 q 79 806 91 801 q 49 814 67 811 q 2 818 30 818 l 0 847 q 79 856 39 852 q 148 861 119 861 q 201 834 179 861 q 255 757 226 802 q 313 663 284 713 q 370 562 342 614 q 422 461 398 509 l 604 780 q 597 808 614 797 q 529 825 581 818 l 529 855 l 797 855 l 797 825 q 726 807 750 816 q 691 780 701 797 l 464 366 l 464 77 q 469 68 464 73 q 488 55 475 62 q 523 42 501 48 q 576 29 544 35 l 576 0 l 243 0 m 529 957 q 515 938 520 944 q 499 927 510 931 l 181 1092 l 186 1122 q 201 1134 191 1128 q 224 1148 212 1141 q 248 1162 236 1156 q 267 1173 259 1168 l 529 957 "},"Ẽ":{"x_min":33.65625,"x_max":647.265625,"ha":689,"o":"m 647 165 q 633 63 641 107 q 619 0 624 19 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 580 855 l 603 838 q 599 799 601 820 q 592 757 596 778 q 583 717 588 736 q 575 685 579 698 l 544 685 q 539 737 543 716 q 527 771 534 758 q 511 788 521 783 q 489 794 501 794 l 241 794 l 241 499 l 515 499 l 533 480 q 520 459 527 470 q 503 438 512 448 q 486 418 495 427 q 470 404 478 410 q 448 421 460 414 q 421 433 437 428 q 385 439 406 437 q 336 442 365 442 l 241 442 l 241 104 q 245 86 241 94 q 265 72 250 78 q 307 64 280 67 q 379 61 334 61 l 466 61 q 520 64 498 61 q 559 79 542 67 q 589 114 576 91 q 618 177 603 137 l 647 165 m 571 1103 q 542 1047 559 1075 q 504 998 525 1020 q 459 963 484 977 q 408 950 435 950 q 363 961 385 950 q 322 988 342 973 q 281 1015 301 1003 q 242 1027 261 1027 q 192 1005 215 1027 q 145 945 170 982 l 109 958 q 138 1013 121 986 q 175 1063 154 1041 q 220 1098 196 1084 q 271 1112 244 1112 q 320 1100 297 1112 q 363 1073 343 1088 q 402 1046 383 1058 q 436 1035 420 1035 q 487 1056 462 1035 q 535 1118 512 1078 l 571 1103 "},"÷":{"x_min":41.375,"x_max":527.65625,"ha":570,"o":"m 339 230 q 334 202 339 215 q 321 178 329 188 q 300 162 312 168 q 276 157 289 157 q 241 170 252 157 q 231 209 231 184 q 235 237 231 223 q 249 260 240 250 q 269 276 257 270 q 293 282 280 282 q 339 230 339 282 m 339 555 q 334 527 339 540 q 321 503 329 513 q 300 487 312 493 q 276 482 289 482 q 241 495 252 482 q 231 534 231 509 q 235 562 231 548 q 249 585 240 575 q 269 601 257 595 q 293 607 280 607 q 339 555 339 607 m 527 402 q 518 372 524 389 q 507 344 512 355 l 58 344 l 41 360 q 50 389 44 374 q 62 419 56 405 l 511 419 l 527 402 "},"h":{"x_min":37.046875,"x_max":745.953125,"ha":766,"o":"m 454 0 l 454 29 q 525 51 502 42 q 549 70 549 61 l 549 429 q 543 496 549 470 q 528 537 538 522 q 500 557 517 552 q 462 563 484 563 q 411 550 438 563 q 353 514 383 538 q 293 455 324 491 q 234 372 263 419 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 58 l 132 880 q 129 924 132 908 q 117 949 127 940 q 88 961 107 958 q 37 969 69 965 l 37 996 q 88 1007 65 1002 q 132 1019 112 1013 q 170 1033 152 1025 q 208 1051 189 1040 l 234 1027 l 233 463 q 298 541 262 507 q 370 600 334 576 q 440 638 406 625 q 501 651 474 651 q 557 642 530 651 q 605 615 584 633 q 638 568 625 596 q 651 502 651 540 l 651 70 q 671 51 651 61 q 745 29 692 42 l 745 0 l 454 0 "},"ṃ":{"x_min":37.046875,"x_max":1095.640625,"ha":1116,"o":"m 803 0 l 803 29 q 875 51 852 42 q 898 70 898 61 l 898 429 q 893 498 898 470 q 880 541 889 525 q 856 563 870 557 q 821 570 841 570 q 774 557 799 570 q 722 521 749 544 q 669 464 696 498 q 617 388 642 430 l 617 70 q 638 51 617 61 q 712 29 659 42 l 712 0 l 420 0 l 420 29 q 492 51 469 42 q 515 70 515 61 l 515 429 q 510 498 515 470 q 497 541 506 525 q 474 563 488 557 q 438 570 459 570 q 341 522 392 570 q 234 388 291 475 l 234 70 q 259 49 234 60 q 328 29 284 38 l 328 0 l 37 0 l 37 29 q 106 49 81 40 q 132 70 132 59 l 132 482 q 129 525 132 509 q 117 549 127 540 q 88 561 107 557 q 37 570 69 565 l 37 597 q 84 606 62 601 q 125 619 106 612 q 163 634 145 626 q 199 651 181 642 l 223 627 l 231 471 q 292 550 261 516 q 354 606 323 583 q 413 639 385 628 q 466 651 441 651 q 526 643 498 651 q 573 616 553 635 q 605 567 593 598 q 617 491 617 537 l 616 477 q 675 552 645 520 q 736 606 706 584 q 795 639 766 628 q 849 651 824 651 q 909 642 881 651 q 956 615 936 633 q 988 568 976 596 q 1000 502 1000 540 l 1000 70 q 1021 51 1000 61 q 1095 29 1042 42 l 1095 0 l 803 0 m 634 -189 q 628 -225 634 -208 q 611 -254 622 -242 q 587 -274 601 -267 q 555 -282 572 -282 q 511 -265 525 -282 q 498 -217 498 -248 q 504 -181 498 -198 q 521 -151 510 -164 q 546 -132 532 -139 q 576 -125 560 -125 q 634 -189 634 -125 "},"f":{"x_min":30.875,"x_max":554.734375,"ha":432,"o":"m 554 985 q 544 969 554 980 q 521 947 535 958 q 493 925 507 935 q 468 910 478 915 q 435 935 452 924 q 403 952 419 945 q 375 962 388 959 q 353 966 362 966 q 315 954 335 966 q 278 911 295 942 q 249 826 261 880 q 238 689 238 773 l 238 631 l 412 631 l 432 611 q 417 591 426 602 q 399 571 408 580 q 381 553 389 561 q 366 543 372 545 q 321 559 350 551 q 238 567 292 567 l 238 69 q 245 61 238 65 q 269 52 252 57 q 312 42 286 48 q 379 29 339 36 l 379 0 l 41 0 l 41 29 q 111 49 87 37 q 136 69 136 61 l 136 567 l 45 567 l 30 585 l 83 631 l 136 631 l 136 652 q 146 786 136 731 q 176 878 157 841 q 219 941 195 916 q 271 988 244 967 q 311 1015 289 1003 q 354 1034 332 1026 q 395 1046 375 1042 q 427 1051 414 1051 q 470 1042 448 1051 q 511 1024 493 1034 q 542 1002 530 1013 q 554 985 554 991 "},"“":{"x_min":62,"x_max":546.484375,"ha":606,"o":"m 259 712 q 233 693 253 704 q 189 672 213 681 q 144 656 166 662 q 109 651 121 650 q 74 694 86 671 q 62 757 62 717 q 71 814 62 784 q 97 875 80 845 q 141 934 115 906 q 199 983 167 961 l 228 959 q 203 925 214 944 q 185 888 193 907 q 175 851 178 869 q 172 818 172 833 q 190 766 172 788 q 248 742 208 744 l 259 712 m 546 712 q 520 693 540 704 q 476 672 500 681 q 431 656 453 662 q 396 651 408 650 q 376 671 385 660 q 361 694 368 681 q 352 722 355 706 q 349 757 349 738 q 358 814 349 784 q 384 875 367 845 q 428 934 402 906 q 486 983 454 961 l 515 959 q 490 925 501 944 q 472 888 480 907 q 462 851 465 869 q 459 818 459 833 q 477 766 459 788 q 534 742 495 744 l 546 712 "},"Ǘ":{"x_min":33.65625,"x_max":864.34375,"ha":908,"o":"m 864 825 q 792 804 818 816 q 766 783 766 793 l 766 355 q 744 197 766 266 q 681 79 722 127 q 582 5 641 30 q 451 -20 524 -20 q 322 0 381 -20 q 221 58 264 18 q 155 158 179 98 q 132 301 132 218 l 132 783 q 107 804 132 791 q 33 825 82 816 l 33 855 l 339 855 l 339 825 q 267 804 293 816 q 241 783 241 793 l 241 335 q 256 218 241 270 q 301 131 271 167 q 375 76 331 95 q 478 58 419 58 q 563 81 526 58 q 626 142 600 104 q 664 229 651 180 q 678 327 678 277 l 678 783 q 653 804 678 791 q 579 825 628 816 l 579 855 l 864 855 l 864 825 m 662 1045 q 656 1009 662 1026 q 639 980 650 992 q 614 960 629 967 q 583 953 600 953 q 539 969 552 953 q 526 1018 526 986 q 532 1053 526 1036 q 549 1083 538 1070 q 574 1102 560 1095 q 604 1110 588 1110 q 662 1045 662 1110 m 391 1045 q 385 1009 391 1026 q 368 980 379 992 q 343 960 358 967 q 312 953 329 953 q 268 969 281 953 q 255 1018 255 986 q 261 1053 255 1036 q 278 1083 267 1070 q 303 1102 289 1095 q 333 1110 317 1110 q 391 1045 391 1110 m 369 1144 q 353 1155 358 1148 q 339 1174 347 1161 l 601 1390 q 619 1379 608 1385 q 643 1365 631 1373 q 666 1352 655 1358 q 681 1339 676 1345 l 687 1309 l 369 1144 "},"̇":{"x_min":-417,"x_max":-281,"ha":0,"o":"m -281 854 q -287 818 -281 835 q -303 789 -293 801 q -328 769 -314 776 q -359 762 -342 762 q -403 778 -390 762 q -417 826 -417 795 q -410 862 -417 845 q -393 892 -404 879 q -369 911 -383 904 q -338 919 -355 919 q -281 854 -281 919 "},"A":{"x_min":0,"x_max":812.515625,"ha":827,"o":"m 514 363 l 394 711 l 278 363 l 514 363 m 258 302 l 183 75 q 201 44 176 54 q 282 29 226 35 l 282 0 l 0 0 l 0 29 q 73 46 46 37 q 107 75 100 54 l 359 838 q 398 869 375 855 q 438 893 421 883 l 723 75 q 733 58 727 65 q 749 45 739 50 q 775 35 759 40 q 812 29 790 31 l 812 0 l 526 0 l 526 29 q 599 42 579 32 q 612 75 619 52 l 535 302 l 258 302 "},"Ɓ":{"x_min":20,"x_max":845,"ha":920,"o":"m 613 770 q 577 792 596 783 q 533 806 558 801 q 475 814 508 812 q 397 818 442 817 l 397 492 l 420 492 q 545 507 497 492 q 619 546 592 522 q 654 599 645 569 q 664 658 664 629 q 650 721 664 691 q 613 770 637 750 m 508 440 q 448 437 476 440 q 397 431 421 434 l 397 70 q 403 59 397 64 q 429 53 414 55 q 460 49 444 51 q 491 47 475 48 q 520 47 506 47 q 608 59 569 47 q 676 94 647 72 q 719 148 704 116 q 734 218 734 180 q 720 294 734 255 q 680 366 707 334 q 610 419 652 398 q 508 440 567 440 m 20 680 q 46 760 20 724 q 121 821 72 796 q 240 861 170 847 q 399 875 311 875 q 502 871 457 875 q 585 861 548 868 q 650 843 622 854 q 703 816 679 832 q 752 763 734 795 q 770 692 770 730 q 735 566 770 619 q 640 491 700 514 q 721 460 684 482 q 786 405 758 437 q 829 330 813 372 q 845 241 845 288 q 822 137 845 183 q 758 57 799 90 q 660 7 717 25 q 534 -10 603 -10 q 499 -9 520 -10 q 454 -8 478 -9 q 406 -7 431 -7 q 357 -5 380 -6 q 239 0 300 -2 l 189 0 l 189 29 q 261 49 235 38 q 288 70 288 61 l 288 813 q 223 799 252 808 q 174 777 194 790 q 142 744 153 763 q 131 702 131 726 q 143 659 131 678 q 177 630 156 640 q 165 619 175 626 q 139 604 154 611 q 108 589 124 596 q 77 580 91 583 q 36 616 52 591 q 20 680 20 642 "},"Ṩ":{"x_min":79.515625,"x_max":600,"ha":661,"o":"m 600 255 q 591 193 600 225 q 567 130 583 161 q 525 72 550 99 q 467 24 501 45 q 391 -7 433 4 q 298 -20 349 -20 q 249 -15 276 -20 q 195 -2 223 -10 q 140 18 167 6 q 89 46 112 30 q 81 69 84 48 q 79 116 79 89 q 81 172 79 144 q 89 219 83 201 l 116 216 q 155 147 132 176 q 207 98 179 117 q 268 70 235 79 q 336 61 301 61 q 397 73 366 61 q 452 107 428 86 q 492 158 476 129 q 508 219 508 187 q 489 290 508 261 q 441 343 471 320 q 374 385 412 366 q 297 421 336 403 q 219 460 257 440 q 152 508 181 480 q 104 570 122 535 q 86 655 86 606 q 92 701 86 676 q 111 750 98 725 q 146 797 125 774 q 198 837 168 820 q 267 864 228 854 q 356 875 307 875 q 417 870 387 875 q 475 857 448 865 q 523 837 502 849 q 557 812 545 826 q 558 796 562 808 q 544 770 553 784 q 524 743 535 756 q 505 722 513 729 l 480 726 q 440 763 461 748 q 398 789 420 779 q 356 802 377 798 q 316 807 335 807 q 251 795 278 807 q 207 766 224 783 q 182 728 190 749 q 174 687 174 706 q 192 631 174 655 q 240 585 210 606 q 308 546 270 565 q 387 508 346 528 q 465 465 427 488 q 533 412 503 442 q 581 344 563 382 q 600 255 600 306 m 407 -189 q 401 -225 407 -208 q 384 -254 395 -242 q 359 -274 374 -267 q 328 -282 345 -282 q 284 -265 297 -282 q 271 -217 271 -248 q 277 -181 271 -198 q 294 -151 283 -164 q 319 -132 305 -139 q 349 -125 333 -125 q 407 -189 407 -125 m 407 1045 q 401 1009 407 1026 q 384 980 395 992 q 359 960 374 967 q 328 953 345 953 q 284 969 297 953 q 271 1018 271 986 q 277 1053 271 1036 q 294 1083 283 1070 q 319 1102 305 1095 q 349 1110 333 1110 q 407 1045 407 1110 "},"O":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 658 519 667 473 q 634 606 650 565 q 596 682 618 647 q 544 742 573 716 q 482 782 516 767 q 409 797 448 797 q 301 771 349 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 q 172 290 152 358 q 228 171 193 223 q 310 90 263 120 q 409 61 357 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 772 439 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 467 -20 q 244 15 308 -20 q 136 112 180 51 q 70 251 93 172 q 47 415 47 329 q 76 590 47 507 q 158 737 106 674 q 279 837 209 800 q 429 875 349 875 q 577 838 513 875 q 684 740 640 801 q 749 600 727 679 q 772 439 772 521 "},"Đ":{"x_min":18.0625,"x_max":761,"ha":823,"o":"m 761 458 q 743 306 761 373 q 697 188 726 240 q 629 102 668 137 q 548 43 591 66 q 462 10 506 21 q 378 0 418 0 l 33 0 l 33 29 q 105 49 79 38 q 132 70 132 61 l 132 417 l 32 417 l 18 433 q 25 455 21 444 q 32 478 28 467 l 132 478 l 132 805 q 80 798 104 802 q 33 792 56 795 l 27 834 q 96 849 57 842 q 178 863 135 857 q 266 871 222 868 q 350 875 310 875 q 521 846 445 875 q 650 765 596 818 q 732 634 703 711 q 761 458 761 556 m 307 818 q 241 816 273 818 l 241 478 l 416 478 l 433 462 l 416 417 l 241 417 l 241 104 q 248 80 241 89 q 284 62 257 68 q 364 57 311 57 q 460 79 411 57 q 551 148 510 102 q 619 265 593 195 q 646 432 646 336 q 623 593 646 522 q 558 715 601 665 q 451 791 515 765 q 307 818 388 818 "},"3":{"x_min":46.109375,"x_max":560,"ha":652,"o":"m 560 258 q 541 150 560 201 q 487 62 523 100 q 398 2 451 24 q 275 -20 345 -20 q 221 -15 248 -20 q 164 1 193 -10 q 106 32 135 13 q 46 81 76 52 l 69 126 q 125 88 99 103 q 173 64 150 73 q 218 51 195 55 q 266 48 240 48 q 341 61 307 48 q 400 98 375 74 q 437 158 424 123 q 451 236 451 193 q 434 322 451 287 q 394 380 418 358 q 338 413 369 403 q 277 423 307 423 l 263 423 q 255 422 259 423 q 246 420 251 421 q 231 418 241 420 l 222 458 q 321 498 284 475 q 379 544 359 520 q 405 592 399 568 q 412 637 412 616 q 404 685 412 661 q 382 730 397 710 q 344 764 367 751 q 288 777 321 777 q 240 767 261 777 q 204 741 218 758 q 184 704 190 725 q 182 660 178 683 q 138 642 159 648 q 88 633 117 635 l 70 654 q 91 715 70 683 q 147 774 112 747 q 229 820 182 802 q 327 838 275 838 q 414 821 378 838 q 474 778 450 805 q 509 718 498 751 q 521 650 521 684 q 510 599 521 624 q 482 551 500 574 q 436 508 463 528 q 376 473 409 488 q 448 450 415 469 q 506 402 482 431 q 545 337 531 374 q 560 258 560 300 "},"Ǿ":{"x_min":47,"x_max":772,"ha":834,"o":"m 667 426 q 653 544 667 487 q 613 650 639 601 l 255 137 q 327 81 288 101 q 409 61 366 61 q 513 84 465 61 q 594 153 560 107 q 647 268 628 200 q 667 426 667 337 m 152 434 q 166 313 152 371 q 206 208 180 255 l 565 721 q 494 776 534 756 q 409 797 455 797 q 301 771 348 797 q 220 698 253 746 q 169 584 187 651 q 152 434 152 517 m 680 745 q 749 603 726 683 q 772 438 772 523 q 741 263 772 346 q 658 117 710 180 q 536 17 605 54 q 389 -20 466 -20 q 281 -1 330 -20 q 193 50 233 17 l 157 -1 q 139 -11 150 -6 q 115 -21 128 -16 q 90 -29 102 -25 q 69 -36 78 -33 l 51 -14 l 137 109 q 70 249 93 170 q 47 414 47 328 q 76 590 47 507 q 158 737 106 674 q 279 837 210 800 q 429 875 349 875 q 537 856 488 875 q 625 805 585 837 l 662 857 q 704 877 680 868 q 748 891 727 885 l 767 868 l 680 745 m 320 927 q 303 938 308 931 q 289 957 298 944 l 552 1173 q 570 1162 558 1168 q 594 1148 581 1156 q 616 1134 606 1141 q 632 1122 626 1128 l 638 1092 l 320 927 "},"4":{"x_min":37.53125,"x_max":593.046875,"ha":652,"o":"m 397 705 l 144 312 l 397 312 l 397 705 m 593 291 q 566 259 578 269 q 539 237 555 248 l 492 237 l 492 70 q 496 60 492 65 q 510 51 500 56 q 540 40 521 46 q 586 29 558 35 l 586 0 l 254 0 l 254 29 q 326 43 298 36 q 369 55 354 49 q 391 66 385 60 q 397 77 397 71 l 397 237 l 59 237 l 37 259 l 373 795 q 424 820 402 808 q 466 844 447 833 l 492 820 l 492 312 l 575 312 l 593 291 "},"Ǝ":{"x_min":43.90625,"x_max":647.34375,"ha":689,"o":"m 66 0 l 43 16 q 48 62 44 33 q 58 120 52 90 q 69 175 63 149 q 78 214 74 202 l 109 214 q 113 155 110 183 q 122 106 117 127 q 136 73 128 85 q 157 61 145 61 l 303 61 q 373 63 347 61 q 415 72 400 66 q 435 87 430 77 q 440 110 440 96 l 440 444 l 297 444 q 263 442 281 444 q 226 439 244 441 q 192 435 208 437 q 165 430 176 433 l 147 449 q 160 469 153 458 q 177 491 168 480 q 194 510 185 501 q 210 524 202 519 q 232 509 220 514 q 259 503 243 505 q 294 501 274 501 l 440 501 l 440 794 l 275 794 q 221 790 243 794 q 182 775 199 787 q 152 740 166 763 q 123 677 138 716 l 94 689 q 108 791 99 747 q 122 855 117 835 l 647 855 l 647 825 q 575 805 601 816 q 549 784 549 793 l 549 71 q 573 50 549 63 q 647 29 598 38 l 647 0 l 66 0 "},"Ẁ":{"x_min":13.5625,"x_max":1154.328125,"ha":1181,"o":"m 1154 825 q 1104 814 1124 819 q 1073 803 1085 808 q 1057 793 1062 798 q 1051 783 1051 789 l 895 40 q 881 15 892 26 q 855 -2 870 5 q 826 -13 841 -9 q 801 -20 811 -17 l 580 640 l 385 40 q 369 15 381 26 q 343 -1 358 5 q 313 -12 328 -8 q 283 -20 297 -17 l 107 778 q 82 806 103 795 q 13 825 61 817 l 13 855 l 304 855 l 304 825 q 252 817 271 822 q 223 806 233 812 q 212 792 214 800 q 212 778 210 785 l 347 169 l 567 855 l 604 855 l 844 169 l 971 783 q 965 798 972 791 q 943 808 957 804 q 909 817 929 813 q 866 825 889 821 l 866 855 l 1154 855 l 1154 825 m 704 957 q 689 938 694 944 q 673 927 684 931 l 355 1092 l 360 1122 q 376 1134 365 1128 q 398 1148 386 1141 q 422 1162 411 1156 q 441 1173 434 1168 l 704 957 "},"Ť":{"x_min":6.34375,"x_max":734.5625,"ha":765,"o":"m 207 0 l 207 29 q 260 42 238 35 q 294 55 281 48 q 313 67 307 61 q 319 78 319 73 l 319 794 l 116 794 q 97 790 106 794 q 80 774 89 786 q 61 738 72 762 q 35 675 50 714 l 6 688 q 15 773 9 728 q 28 855 21 819 l 714 855 l 734 838 q 727 762 733 803 q 714 678 722 721 l 683 678 q 671 731 676 709 q 659 767 666 753 q 644 787 653 781 q 620 794 634 794 l 428 794 l 428 78 q 452 55 428 69 q 539 29 476 42 l 539 0 l 207 0 m 406 943 l 334 943 l 155 1151 q 163 1162 160 1157 q 169 1170 166 1167 q 176 1176 172 1174 q 185 1183 180 1179 l 372 1039 l 555 1183 q 571 1170 567 1176 q 584 1151 576 1164 l 406 943 "},"ơ":{"x_min":54,"x_max":746,"ha":747,"o":"m 539 308 q 521 410 539 362 q 475 495 503 458 q 412 554 448 532 q 342 576 377 576 q 256 556 291 576 q 199 502 220 536 q 168 421 178 468 q 159 320 159 375 q 178 219 159 267 q 225 134 197 170 q 289 76 254 97 q 355 55 323 55 q 437 72 403 55 q 494 124 472 90 q 528 203 517 157 q 539 308 539 250 m 746 707 q 738 670 746 690 q 713 626 731 649 q 665 577 695 602 q 590 527 635 551 q 630 436 616 486 q 644 329 644 386 q 632 240 644 283 q 600 158 620 197 q 551 86 580 119 q 489 30 523 53 q 416 -6 454 6 q 336 -20 377 -20 q 219 4 271 -20 q 130 71 167 28 q 74 173 94 114 q 54 301 54 232 q 65 389 54 346 q 96 471 76 432 q 144 543 116 510 q 206 600 172 576 q 280 637 241 623 q 362 651 320 651 q 474 628 424 651 q 561 564 525 605 q 613 611 597 588 q 629 652 629 634 q 618 689 629 671 q 589 722 608 707 l 710 777 q 736 744 726 762 q 746 707 746 726 "},"꞉":{"x_min":68,"x_max":229,"ha":290,"o":"m 229 493 q 221 449 229 469 q 202 414 214 429 q 172 391 189 399 q 135 383 155 383 q 83 402 99 383 q 68 458 68 422 q 75 501 68 481 q 95 537 82 521 q 125 561 108 552 q 162 570 143 570 q 212 550 195 570 q 229 493 229 530 m 229 164 q 221 120 229 140 q 202 85 214 100 q 172 62 189 70 q 135 54 155 54 q 83 73 99 54 q 68 129 68 93 q 75 172 68 152 q 95 208 82 192 q 125 232 108 223 q 162 241 143 241 q 212 221 195 241 q 229 164 229 201 "}},"cssFontWeight":"normal","ascender":1214,"underlinePosition":-250,"cssFontStyle":"normal","boundingBox":{"yMin":-492,"xMin":-697.21875,"yMax":1471.453125,"xMax":1356},"resolution":1000,"original_font_information":{"postscript_name":"Gentilis-Regular","version_string":"Version 1.100","vendor_url":"http://scripts.sil.org/","full_font_name":"Gentilis","font_family_name":"Gentilis","copyright":"Copyright (c) SIL International, 2003-2008.","description":"","trademark":"Gentium is a trademark of SIL International.","designer":"J. Victor Gaultney and Annie Olsen","designer_url":"http://www.sil.org/~gaultney","unique_font_identifier":"SIL International:Gentilis:2-3-108","license_url":"http://scripts.sil.org/OFL","license_description":"Copyright (c) 2003-2008, SIL International (http://www.sil.org/) with Reserved Font Names \"Gentium\" and \"SIL\".\r\n\r\nThis Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL\r\n\r\n\r\n-----------------------------------------------------------\r\nSIL OPEN FONT LICENSE Version 1.1 - 26 February 2007\r\n-----------------------------------------------------------\r\n\r\nPREAMBLE\r\nThe goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.\r\n\r\nThe OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.\r\n\r\nDEFINITIONS\r\n\"Font Software\" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.\r\n\r\n\"Reserved Font Name\" refers to any names specified as such after the copyright statement(s).\r\n\r\n\"Original Version\" refers to the collection of Font Software components as distributed by the Copyright Holder(s).\r\n\r\n\"Modified Version\" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.\r\n\r\n\"Author\" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.\r\n\r\nPERMISSION & CONDITIONS\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:\r\n\r\n1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.\r\n\r\n2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.\r\n\r\n3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.\r\n\r\n4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.\r\n\r\n5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.\r\n\r\nTERMINATION\r\nThis license becomes null and void if any of the above conditions are not met.\r\n\r\nDISCLAIMER\r\nTHE FONT SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.","manufacturer_name":"SIL International","font_sub_family_name":"Regular"},"descender":-394,"familyName":"Gentilis","lineHeight":1607,"underlineThickness":100} \ No newline at end of file diff --git a/node_modules/three/examples/fonts/helvetiker_bold.typeface.json b/node_modules/three/examples/fonts/helvetiker_bold.typeface.json new file mode 100644 index 0000000..872ce44 --- /dev/null +++ b/node_modules/three/examples/fonts/helvetiker_bold.typeface.json @@ -0,0 +1 @@ +{"glyphs":{"ο":{"x_min":0,"x_max":764,"ha":863,"o":"m 380 -25 q 105 87 211 -25 q 0 372 0 200 q 104 660 0 545 q 380 775 209 775 q 658 659 552 775 q 764 372 764 544 q 658 87 764 200 q 380 -25 552 -25 m 379 142 q 515 216 466 142 q 557 373 557 280 q 515 530 557 465 q 379 607 466 607 q 245 530 294 607 q 204 373 204 465 q 245 218 204 283 q 379 142 294 142 "},"S":{"x_min":0,"x_max":826,"ha":915,"o":"m 826 306 q 701 55 826 148 q 423 -29 587 -29 q 138 60 255 -29 q 0 318 13 154 l 208 318 q 288 192 216 238 q 437 152 352 152 q 559 181 506 152 q 623 282 623 217 q 466 411 623 372 q 176 487 197 478 q 18 719 18 557 q 136 958 18 869 q 399 1040 244 1040 q 670 956 561 1040 q 791 713 791 864 l 591 713 q 526 826 583 786 q 393 866 469 866 q 277 838 326 866 q 218 742 218 804 q 374 617 218 655 q 667 542 646 552 q 826 306 826 471 "},"¦":{"x_min":0,"x_max":143,"ha":240,"o":"m 143 462 l 0 462 l 0 984 l 143 984 l 143 462 m 143 -242 l 0 -242 l 0 280 l 143 280 l 143 -242 "},"/":{"x_min":196.109375,"x_max":632.5625,"ha":828,"o":"m 632 1040 l 289 -128 l 196 -128 l 538 1040 l 632 1040 "},"Τ":{"x_min":-0.609375,"x_max":808,"ha":878,"o":"m 808 831 l 508 831 l 508 0 l 298 0 l 298 831 l 0 831 l 0 1013 l 808 1013 l 808 831 "},"y":{"x_min":0,"x_max":738.890625,"ha":828,"o":"m 738 749 l 444 -107 q 361 -238 413 -199 q 213 -277 308 -277 q 156 -275 176 -277 q 120 -271 131 -271 l 120 -110 q 147 -113 134 -111 q 179 -116 161 -116 q 247 -91 226 -116 q 269 -17 269 -67 q 206 173 269 -4 q 84 515 162 301 q 0 749 41 632 l 218 749 l 376 207 l 529 749 l 738 749 "},"Π":{"x_min":0,"x_max":809,"ha":922,"o":"m 809 0 l 598 0 l 598 836 l 208 836 l 208 0 l 0 0 l 0 1012 l 809 1012 l 809 0 "},"ΐ":{"x_min":-162,"x_max":364,"ha":364,"o":"m 364 810 l 235 810 l 235 952 l 364 952 l 364 810 m 301 1064 l 86 810 l -12 810 l 123 1064 l 301 1064 m -33 810 l -162 810 l -162 952 l -33 952 l -33 810 m 200 0 l 0 0 l 0 748 l 200 748 l 200 0 "},"g":{"x_min":0,"x_max":724,"ha":839,"o":"m 724 48 q 637 -223 724 -142 q 357 -304 551 -304 q 140 -253 226 -304 q 23 -72 36 -192 l 243 -72 q 290 -127 255 -110 q 368 -144 324 -144 q 504 -82 470 -144 q 530 71 530 -38 l 530 105 q 441 25 496 51 q 319 0 386 0 q 79 115 166 0 q 0 377 0 219 q 77 647 0 534 q 317 775 166 775 q 534 656 456 775 l 534 748 l 724 748 l 724 48 m 368 167 q 492 237 447 167 q 530 382 530 297 q 490 529 530 466 q 364 603 444 603 q 240 532 284 603 q 201 386 201 471 q 240 239 201 300 q 368 167 286 167 "},"²":{"x_min":0,"x_max":463,"ha":560,"o":"m 463 791 q 365 627 463 706 q 151 483 258 555 l 455 483 l 455 382 l 0 382 q 84 565 0 488 q 244 672 97 576 q 331 784 331 727 q 299 850 331 824 q 228 876 268 876 q 159 848 187 876 q 132 762 132 820 l 10 762 q 78 924 10 866 q 228 976 137 976 q 392 925 322 976 q 463 791 463 874 "},"–":{"x_min":0,"x_max":704.171875,"ha":801,"o":"m 704 297 l 0 297 l 0 450 l 704 450 l 704 297 "},"Κ":{"x_min":0,"x_max":899.671875,"ha":969,"o":"m 899 0 l 646 0 l 316 462 l 208 355 l 208 0 l 0 0 l 0 1013 l 208 1013 l 208 596 l 603 1013 l 863 1013 l 460 603 l 899 0 "},"ƒ":{"x_min":-46,"x_max":440,"ha":525,"o":"m 440 609 l 316 609 l 149 -277 l -46 -277 l 121 609 l 14 609 l 14 749 l 121 749 q 159 949 121 894 q 344 1019 208 1019 l 440 1015 l 440 855 l 377 855 q 326 841 338 855 q 314 797 314 827 q 314 773 314 786 q 314 749 314 761 l 440 749 l 440 609 "},"e":{"x_min":0,"x_max":708,"ha":808,"o":"m 708 321 l 207 321 q 254 186 207 236 q 362 141 298 141 q 501 227 453 141 l 700 227 q 566 36 662 104 q 362 -26 477 -26 q 112 72 213 -26 q 0 369 0 182 q 95 683 0 573 q 358 793 191 793 q 619 677 531 793 q 708 321 708 561 m 501 453 q 460 571 501 531 q 353 612 420 612 q 247 570 287 612 q 207 453 207 529 l 501 453 "},"ό":{"x_min":0,"x_max":764,"ha":863,"o":"m 380 -25 q 105 87 211 -25 q 0 372 0 200 q 104 660 0 545 q 380 775 209 775 q 658 659 552 775 q 764 372 764 544 q 658 87 764 200 q 380 -25 552 -25 m 379 142 q 515 216 466 142 q 557 373 557 280 q 515 530 557 465 q 379 607 466 607 q 245 530 294 607 q 204 373 204 465 q 245 218 204 283 q 379 142 294 142 m 593 1039 l 391 823 l 293 823 l 415 1039 l 593 1039 "},"J":{"x_min":0,"x_max":649,"ha":760,"o":"m 649 294 q 573 48 649 125 q 327 -29 497 -29 q 61 82 136 -29 q 0 375 0 173 l 200 375 l 199 309 q 219 194 199 230 q 321 145 249 145 q 418 193 390 145 q 441 307 441 232 l 441 1013 l 649 1013 l 649 294 "},"»":{"x_min":-0.234375,"x_max":526,"ha":624,"o":"m 526 286 l 297 87 l 296 250 l 437 373 l 297 495 l 297 660 l 526 461 l 526 286 m 229 286 l 0 87 l 0 250 l 140 373 l 0 495 l 0 660 l 229 461 l 229 286 "},"©":{"x_min":3,"x_max":1007,"ha":1104,"o":"m 507 -6 q 129 153 269 -6 q 3 506 3 298 q 127 857 3 713 q 502 1017 266 1017 q 880 855 740 1017 q 1007 502 1007 711 q 882 152 1007 295 q 507 -6 743 -6 m 502 934 q 184 800 302 934 q 79 505 79 680 q 184 210 79 331 q 501 76 302 76 q 819 210 701 76 q 925 507 925 331 q 820 800 925 682 q 502 934 704 934 m 758 410 q 676 255 748 313 q 506 197 605 197 q 298 291 374 197 q 229 499 229 377 q 297 713 229 624 q 494 811 372 811 q 666 760 593 811 q 752 616 739 710 l 621 616 q 587 688 621 658 q 509 719 554 719 q 404 658 441 719 q 368 511 368 598 q 403 362 368 427 q 498 298 438 298 q 624 410 606 298 l 758 410 "},"ώ":{"x_min":0,"x_max":945,"ha":1051,"o":"m 566 528 l 372 528 l 372 323 q 372 298 372 311 q 373 271 372 285 q 360 183 373 211 q 292 142 342 142 q 219 222 243 142 q 203 365 203 279 q 241 565 203 461 q 334 748 273 650 l 130 748 q 36 552 68 650 q 0 337 0 444 q 69 96 0 204 q 276 -29 149 -29 q 390 0 337 -29 q 470 78 444 28 q 551 0 495 30 q 668 -29 608 -29 q 874 96 793 -29 q 945 337 945 205 q 910 547 945 444 q 814 748 876 650 l 610 748 q 703 565 671 650 q 742 365 742 462 q 718 189 742 237 q 651 142 694 142 q 577 190 597 142 q 565 289 565 221 l 565 323 l 566 528 m 718 1039 l 516 823 l 417 823 l 540 1039 l 718 1039 "},"^":{"x_min":197.21875,"x_max":630.5625,"ha":828,"o":"m 630 836 l 536 836 l 413 987 l 294 836 l 197 836 l 331 1090 l 493 1090 l 630 836 "},"«":{"x_min":0,"x_max":526.546875,"ha":624,"o":"m 526 87 l 297 286 l 297 461 l 526 660 l 526 495 l 385 373 l 526 250 l 526 87 m 229 87 l 0 286 l 0 461 l 229 660 l 229 495 l 88 373 l 229 250 l 229 87 "},"D":{"x_min":0,"x_max":864,"ha":968,"o":"m 400 1013 q 736 874 608 1013 q 864 523 864 735 q 717 146 864 293 q 340 0 570 0 l 0 0 l 0 1013 l 400 1013 m 398 837 l 206 837 l 206 182 l 372 182 q 584 276 507 182 q 657 504 657 365 q 594 727 657 632 q 398 837 522 837 "},"∙":{"x_min":0,"x_max":207,"ha":304,"o":"m 207 528 l 0 528 l 0 735 l 207 735 l 207 528 "},"ÿ":{"x_min":0,"x_max":47,"ha":125,"o":"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 "},"w":{"x_min":0,"x_max":1056.953125,"ha":1150,"o":"m 1056 749 l 848 0 l 647 0 l 527 536 l 412 0 l 211 0 l 0 749 l 202 749 l 325 226 l 429 748 l 633 748 l 740 229 l 864 749 l 1056 749 "},"$":{"x_min":0,"x_max":704,"ha":800,"o":"m 682 693 l 495 693 q 468 782 491 749 q 391 831 441 824 l 391 579 q 633 462 562 534 q 704 259 704 389 q 616 57 704 136 q 391 -22 528 -22 l 391 -156 l 308 -156 l 308 -22 q 76 69 152 -7 q 0 300 0 147 l 183 300 q 215 191 190 230 q 308 128 245 143 l 308 414 q 84 505 157 432 q 12 700 12 578 q 89 902 12 824 q 308 981 166 981 l 308 1069 l 391 1069 l 391 981 q 595 905 521 981 q 682 693 670 829 m 308 599 l 308 831 q 228 796 256 831 q 200 712 200 762 q 225 642 200 668 q 308 599 251 617 m 391 128 q 476 174 449 140 q 504 258 504 207 q 391 388 504 354 l 391 128 "},"\\":{"x_min":-0.03125,"x_max":434.765625,"ha":532,"o":"m 434 -128 l 341 -128 l 0 1039 l 91 1040 l 434 -128 "},"µ":{"x_min":0,"x_max":647,"ha":754,"o":"m 647 0 l 478 0 l 478 68 q 412 9 448 30 q 330 -11 375 -11 q 261 3 296 -11 q 199 43 226 18 l 199 -277 l 0 -277 l 0 749 l 199 749 l 199 358 q 216 221 199 267 q 322 151 244 151 q 435 240 410 151 q 448 401 448 283 l 448 749 l 647 749 l 647 0 "},"Ι":{"x_min":42,"x_max":250,"ha":413,"o":"m 250 0 l 42 0 l 42 1013 l 250 1013 l 250 0 "},"Ύ":{"x_min":0,"x_max":1211.15625,"ha":1289,"o":"m 1211 1012 l 907 376 l 907 0 l 697 0 l 697 376 l 374 1012 l 583 1012 l 802 576 l 1001 1012 l 1211 1012 m 313 1035 l 98 780 l 0 780 l 136 1035 l 313 1035 "},"’":{"x_min":0,"x_max":192,"ha":289,"o":"m 192 834 q 137 692 192 751 q 0 626 83 634 l 0 697 q 101 831 101 723 l 0 831 l 0 1013 l 192 1013 l 192 834 "},"Ν":{"x_min":0,"x_max":833,"ha":946,"o":"m 833 0 l 617 0 l 206 696 l 206 0 l 0 0 l 0 1013 l 216 1013 l 629 315 l 629 1013 l 833 1013 l 833 0 "},"-":{"x_min":27.78125,"x_max":413.890625,"ha":525,"o":"m 413 279 l 27 279 l 27 468 l 413 468 l 413 279 "},"Q":{"x_min":0,"x_max":995.59375,"ha":1096,"o":"m 995 49 l 885 -70 l 762 42 q 641 -12 709 4 q 497 -29 572 -29 q 135 123 271 -29 q 0 504 0 276 q 131 881 0 731 q 497 1040 270 1040 q 859 883 719 1040 q 994 506 994 731 q 966 321 994 413 q 884 152 938 229 l 995 49 m 730 299 q 767 395 755 344 q 779 504 779 446 q 713 743 779 644 q 505 857 638 857 q 284 745 366 857 q 210 501 210 644 q 279 265 210 361 q 492 157 357 157 q 615 181 557 157 l 508 287 l 620 405 l 730 299 "},"ς":{"x_min":0,"x_max":731.78125,"ha":768,"o":"m 731 448 l 547 448 q 485 571 531 533 q 369 610 440 610 q 245 537 292 610 q 204 394 204 473 q 322 186 204 238 q 540 133 430 159 q 659 -15 659 98 q 643 -141 659 -80 q 595 -278 627 -202 l 423 -278 q 458 -186 448 -215 q 474 -88 474 -133 q 352 0 474 -27 q 123 80 181 38 q 0 382 0 170 q 98 660 0 549 q 367 777 202 777 q 622 683 513 777 q 731 448 731 589 "},"M":{"x_min":0,"x_max":1019,"ha":1135,"o":"m 1019 0 l 823 0 l 823 819 l 618 0 l 402 0 l 194 818 l 194 0 l 0 0 l 0 1013 l 309 1012 l 510 241 l 707 1013 l 1019 1013 l 1019 0 "},"Ψ":{"x_min":0,"x_max":995,"ha":1085,"o":"m 995 698 q 924 340 995 437 q 590 200 841 227 l 590 0 l 404 0 l 404 200 q 70 340 152 227 q 0 698 0 437 l 0 1013 l 188 1013 l 188 694 q 212 472 188 525 q 404 383 254 383 l 404 1013 l 590 1013 l 590 383 q 781 472 740 383 q 807 694 807 525 l 807 1013 l 995 1013 l 995 698 "},"C":{"x_min":0,"x_max":970.828125,"ha":1043,"o":"m 970 345 q 802 70 933 169 q 490 -29 672 -29 q 130 130 268 -29 q 0 506 0 281 q 134 885 0 737 q 502 1040 275 1040 q 802 939 668 1040 q 965 679 936 838 l 745 679 q 649 809 716 761 q 495 857 582 857 q 283 747 361 857 q 214 508 214 648 q 282 267 214 367 q 493 154 359 154 q 651 204 584 154 q 752 345 718 255 l 970 345 "},"!":{"x_min":0,"x_max":204,"ha":307,"o":"m 204 739 q 182 515 204 686 q 152 282 167 398 l 52 282 q 13 589 27 473 q 0 739 0 704 l 0 1013 l 204 1013 l 204 739 m 204 0 l 0 0 l 0 203 l 204 203 l 204 0 "},"{":{"x_min":0,"x_max":501.390625,"ha":599,"o":"m 501 -285 q 229 -209 301 -285 q 176 -35 176 -155 q 182 47 176 -8 q 189 126 189 103 q 156 245 189 209 q 0 294 112 294 l 0 438 q 154 485 111 438 q 189 603 189 522 q 186 666 189 636 q 176 783 176 772 q 231 945 176 894 q 501 1015 306 1015 l 501 872 q 370 833 408 872 q 340 737 340 801 q 342 677 340 705 q 353 569 353 579 q 326 451 353 496 q 207 366 291 393 q 327 289 294 346 q 353 164 353 246 q 348 79 353 132 q 344 17 344 26 q 372 -95 344 -58 q 501 -141 408 -141 l 501 -285 "},"X":{"x_min":0,"x_max":894.453125,"ha":999,"o":"m 894 0 l 654 0 l 445 351 l 238 0 l 0 0 l 316 516 l 0 1013 l 238 1013 l 445 659 l 652 1013 l 894 1013 l 577 519 l 894 0 "},"#":{"x_min":0,"x_max":1019.453125,"ha":1117,"o":"m 1019 722 l 969 582 l 776 581 l 717 417 l 919 417 l 868 279 l 668 278 l 566 -6 l 413 -5 l 516 279 l 348 279 l 247 -6 l 94 -6 l 196 278 l 0 279 l 49 417 l 245 417 l 304 581 l 98 582 l 150 722 l 354 721 l 455 1006 l 606 1006 l 507 721 l 673 722 l 776 1006 l 927 1006 l 826 721 l 1019 722 m 627 581 l 454 581 l 394 417 l 567 417 l 627 581 "},"ι":{"x_min":42,"x_max":242,"ha":389,"o":"m 242 0 l 42 0 l 42 749 l 242 749 l 242 0 "},"Ά":{"x_min":0,"x_max":995.828125,"ha":1072,"o":"m 313 1035 l 98 780 l 0 780 l 136 1035 l 313 1035 m 995 0 l 776 0 l 708 208 l 315 208 l 247 0 l 29 0 l 390 1012 l 629 1012 l 995 0 m 652 376 l 509 809 l 369 376 l 652 376 "},")":{"x_min":0,"x_max":389,"ha":486,"o":"m 389 357 q 319 14 389 187 q 145 -293 259 -134 l 0 -293 q 139 22 90 -142 q 189 358 189 187 q 139 689 189 525 q 0 1013 90 853 l 145 1013 q 319 703 258 857 q 389 357 389 528 "},"ε":{"x_min":16.671875,"x_max":652.78125,"ha":742,"o":"m 652 259 q 565 49 652 123 q 340 -25 479 -25 q 102 39 188 -25 q 16 197 16 104 q 45 299 16 249 q 134 390 75 348 q 58 456 86 419 q 25 552 25 502 q 120 717 25 653 q 322 776 208 776 q 537 710 456 776 q 625 508 625 639 l 445 508 q 415 585 445 563 q 327 608 386 608 q 254 590 293 608 q 215 544 215 573 q 252 469 215 490 q 336 453 280 453 q 369 455 347 453 q 400 456 391 456 l 400 308 l 329 308 q 247 291 280 308 q 204 223 204 269 q 255 154 204 172 q 345 143 286 143 q 426 174 398 143 q 454 259 454 206 l 652 259 "},"Δ":{"x_min":0,"x_max":981.953125,"ha":1057,"o":"m 981 0 l 0 0 l 386 1013 l 594 1013 l 981 0 m 715 175 l 490 765 l 266 175 l 715 175 "},"}":{"x_min":0,"x_max":500,"ha":597,"o":"m 500 294 q 348 246 390 294 q 315 128 315 209 q 320 42 315 101 q 326 -48 326 -17 q 270 -214 326 -161 q 0 -285 196 -285 l 0 -141 q 126 -97 90 -141 q 154 8 154 -64 q 150 91 154 37 q 146 157 146 145 q 172 281 146 235 q 294 366 206 339 q 173 451 208 390 q 146 576 146 500 q 150 655 146 603 q 154 731 154 708 q 126 831 154 799 q 0 872 90 872 l 0 1015 q 270 944 196 1015 q 326 777 326 891 q 322 707 326 747 q 313 593 313 612 q 347 482 313 518 q 500 438 390 438 l 500 294 "},"‰":{"x_min":0,"x_max":1681,"ha":1775,"o":"m 861 484 q 1048 404 979 484 q 1111 228 1111 332 q 1048 51 1111 123 q 859 -29 979 -29 q 672 50 740 -29 q 610 227 610 122 q 672 403 610 331 q 861 484 741 484 m 861 120 q 939 151 911 120 q 967 226 967 183 q 942 299 967 270 q 861 333 912 333 q 783 301 811 333 q 756 226 756 269 q 783 151 756 182 q 861 120 810 120 m 904 984 l 316 -28 l 205 -29 l 793 983 l 904 984 m 250 984 q 436 904 366 984 q 499 730 499 832 q 436 552 499 626 q 248 472 366 472 q 62 552 132 472 q 0 728 0 624 q 62 903 0 831 q 250 984 132 984 m 249 835 q 169 801 198 835 q 140 725 140 768 q 167 652 140 683 q 247 621 195 621 q 327 654 298 621 q 357 730 357 687 q 329 803 357 772 q 249 835 301 835 m 1430 484 q 1618 404 1548 484 q 1681 228 1681 332 q 1618 51 1681 123 q 1429 -29 1548 -29 q 1241 50 1309 -29 q 1179 227 1179 122 q 1241 403 1179 331 q 1430 484 1311 484 m 1431 120 q 1509 151 1481 120 q 1537 226 1537 183 q 1511 299 1537 270 q 1431 333 1482 333 q 1352 301 1380 333 q 1325 226 1325 269 q 1352 151 1325 182 q 1431 120 1379 120 "},"a":{"x_min":0,"x_max":700,"ha":786,"o":"m 700 0 l 488 0 q 465 93 469 45 q 365 5 427 37 q 233 -26 303 -26 q 65 37 130 -26 q 0 205 0 101 q 120 409 0 355 q 343 452 168 431 q 465 522 465 468 q 424 588 465 565 q 337 611 384 611 q 250 581 285 611 q 215 503 215 552 l 26 503 q 113 707 26 633 q 328 775 194 775 q 538 723 444 775 q 657 554 657 659 l 657 137 q 666 73 657 101 q 700 33 675 45 l 700 0 m 465 297 l 465 367 q 299 322 358 340 q 193 217 193 287 q 223 150 193 174 q 298 127 254 127 q 417 175 370 127 q 465 297 465 224 "},"—":{"x_min":0,"x_max":941.671875,"ha":1039,"o":"m 941 297 l 0 297 l 0 450 l 941 450 l 941 297 "},"=":{"x_min":29.171875,"x_max":798.609375,"ha":828,"o":"m 798 502 l 29 502 l 29 635 l 798 635 l 798 502 m 798 204 l 29 204 l 29 339 l 798 339 l 798 204 "},"N":{"x_min":0,"x_max":833,"ha":949,"o":"m 833 0 l 617 0 l 206 695 l 206 0 l 0 0 l 0 1013 l 216 1013 l 629 315 l 629 1013 l 833 1013 l 833 0 "},"ρ":{"x_min":0,"x_max":722,"ha":810,"o":"m 364 -17 q 271 0 313 -17 q 194 48 230 16 l 194 -278 l 0 -278 l 0 370 q 87 656 0 548 q 358 775 183 775 q 626 655 524 775 q 722 372 722 541 q 621 95 722 208 q 364 -17 520 -17 m 360 607 q 237 529 280 607 q 201 377 201 463 q 234 229 201 292 q 355 147 277 147 q 467 210 419 147 q 515 374 515 273 q 471 537 515 468 q 360 607 428 607 "},"2":{"x_min":64,"x_max":764,"ha":828,"o":"m 764 685 q 675 452 764 541 q 484 325 637 415 q 307 168 357 250 l 754 168 l 754 0 l 64 0 q 193 301 64 175 q 433 480 202 311 q 564 673 564 576 q 519 780 564 737 q 416 824 475 824 q 318 780 358 824 q 262 633 270 730 l 80 633 q 184 903 80 807 q 415 988 276 988 q 654 907 552 988 q 764 685 764 819 "},"¯":{"x_min":0,"x_max":775,"ha":771,"o":"m 775 958 l 0 958 l 0 1111 l 775 1111 l 775 958 "},"Z":{"x_min":0,"x_max":804.171875,"ha":906,"o":"m 804 836 l 251 182 l 793 182 l 793 0 l 0 0 l 0 176 l 551 830 l 11 830 l 11 1013 l 804 1013 l 804 836 "},"u":{"x_min":0,"x_max":668,"ha":782,"o":"m 668 0 l 474 0 l 474 89 q 363 9 425 37 q 233 -19 301 -19 q 61 53 123 -19 q 0 239 0 126 l 0 749 l 199 749 l 199 296 q 225 193 199 233 q 316 146 257 146 q 424 193 380 146 q 469 304 469 240 l 469 749 l 668 749 l 668 0 "},"k":{"x_min":0,"x_max":688.890625,"ha":771,"o":"m 688 0 l 450 0 l 270 316 l 196 237 l 196 0 l 0 0 l 0 1013 l 196 1013 l 196 483 l 433 748 l 675 748 l 413 469 l 688 0 "},"Η":{"x_min":0,"x_max":837,"ha":950,"o":"m 837 0 l 627 0 l 627 450 l 210 450 l 210 0 l 0 0 l 0 1013 l 210 1013 l 210 635 l 627 635 l 627 1013 l 837 1013 l 837 0 "},"Α":{"x_min":0,"x_max":966.671875,"ha":1043,"o":"m 966 0 l 747 0 l 679 208 l 286 208 l 218 0 l 0 0 l 361 1013 l 600 1013 l 966 0 m 623 376 l 480 809 l 340 376 l 623 376 "},"s":{"x_min":0,"x_max":681,"ha":775,"o":"m 681 229 q 568 33 681 105 q 340 -29 471 -29 q 107 39 202 -29 q 0 245 0 114 l 201 245 q 252 155 201 189 q 358 128 295 128 q 436 144 401 128 q 482 205 482 166 q 363 284 482 255 q 143 348 181 329 q 25 533 25 408 q 129 716 25 647 q 340 778 220 778 q 554 710 465 778 q 658 522 643 643 l 463 522 q 419 596 458 570 q 327 622 380 622 q 255 606 290 622 q 221 556 221 590 q 339 473 221 506 q 561 404 528 420 q 681 229 681 344 "},"B":{"x_min":0,"x_max":835,"ha":938,"o":"m 674 547 q 791 450 747 518 q 835 304 835 383 q 718 75 835 158 q 461 0 612 0 l 0 0 l 0 1013 l 477 1013 q 697 951 609 1013 q 797 754 797 880 q 765 630 797 686 q 674 547 734 575 m 438 621 q 538 646 495 621 q 590 730 590 676 q 537 814 590 785 q 436 838 494 838 l 199 838 l 199 621 l 438 621 m 445 182 q 561 211 513 182 q 618 311 618 247 q 565 410 618 375 q 444 446 512 446 l 199 446 l 199 182 l 445 182 "},"…":{"x_min":0,"x_max":819,"ha":963,"o":"m 206 0 l 0 0 l 0 207 l 206 207 l 206 0 m 512 0 l 306 0 l 306 207 l 512 207 l 512 0 m 819 0 l 613 0 l 613 207 l 819 207 l 819 0 "},"?":{"x_min":1,"x_max":687,"ha":785,"o":"m 687 734 q 621 563 687 634 q 501 454 560 508 q 436 293 436 386 l 251 293 l 251 391 q 363 557 251 462 q 476 724 476 653 q 432 827 476 788 q 332 866 389 866 q 238 827 275 866 q 195 699 195 781 l 1 699 q 110 955 1 861 q 352 1040 210 1040 q 582 963 489 1040 q 687 734 687 878 m 446 0 l 243 0 l 243 203 l 446 203 l 446 0 "},"H":{"x_min":0,"x_max":838,"ha":953,"o":"m 838 0 l 628 0 l 628 450 l 210 450 l 210 0 l 0 0 l 0 1013 l 210 1013 l 210 635 l 628 635 l 628 1013 l 838 1013 l 838 0 "},"ν":{"x_min":0,"x_max":740.28125,"ha":828,"o":"m 740 749 l 473 0 l 266 0 l 0 749 l 222 749 l 373 211 l 529 749 l 740 749 "},"c":{"x_min":0,"x_max":751.390625,"ha":828,"o":"m 751 282 q 625 58 725 142 q 384 -26 526 -26 q 107 84 215 -26 q 0 366 0 195 q 98 651 0 536 q 370 774 204 774 q 616 700 518 774 q 751 486 715 626 l 536 486 q 477 570 516 538 q 380 607 434 607 q 248 533 298 607 q 204 378 204 466 q 242 219 204 285 q 377 139 290 139 q 483 179 438 139 q 543 282 527 220 l 751 282 "},"¶":{"x_min":0,"x_max":566.671875,"ha":678,"o":"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 "},"β":{"x_min":0,"x_max":703,"ha":789,"o":"m 510 539 q 651 429 600 501 q 703 262 703 357 q 617 53 703 136 q 404 -29 532 -29 q 199 51 279 -29 l 199 -278 l 0 -278 l 0 627 q 77 911 0 812 q 343 1021 163 1021 q 551 957 464 1021 q 649 769 649 886 q 613 638 649 697 q 510 539 577 579 m 344 136 q 452 181 408 136 q 497 291 497 227 q 435 409 497 369 q 299 444 381 444 l 299 600 q 407 634 363 600 q 452 731 452 669 q 417 820 452 784 q 329 857 382 857 q 217 775 246 857 q 199 622 199 725 l 199 393 q 221 226 199 284 q 344 136 254 136 "},"Μ":{"x_min":0,"x_max":1019,"ha":1132,"o":"m 1019 0 l 823 0 l 823 818 l 617 0 l 402 0 l 194 818 l 194 0 l 0 0 l 0 1013 l 309 1013 l 509 241 l 708 1013 l 1019 1013 l 1019 0 "},"Ό":{"x_min":0.15625,"x_max":1174,"ha":1271,"o":"m 676 -29 q 312 127 451 -29 q 179 505 179 277 q 311 883 179 733 q 676 1040 449 1040 q 1040 883 901 1040 q 1174 505 1174 733 q 1041 127 1174 277 q 676 -29 903 -29 m 676 154 q 890 266 811 154 q 961 506 961 366 q 891 745 961 648 q 676 857 812 857 q 462 747 541 857 q 392 506 392 648 q 461 266 392 365 q 676 154 540 154 m 314 1034 l 98 779 l 0 779 l 136 1034 l 314 1034 "},"Ή":{"x_min":0,"x_max":1248,"ha":1361,"o":"m 1248 0 l 1038 0 l 1038 450 l 621 450 l 621 0 l 411 0 l 411 1012 l 621 1012 l 621 635 l 1038 635 l 1038 1012 l 1248 1012 l 1248 0 m 313 1035 l 98 780 l 0 780 l 136 1035 l 313 1035 "},"•":{"x_min":-27.78125,"x_max":691.671875,"ha":775,"o":"m 691 508 q 588 252 691 358 q 331 147 486 147 q 77 251 183 147 q -27 508 -27 355 q 75 761 -27 655 q 331 868 179 868 q 585 763 479 868 q 691 508 691 658 "},"¥":{"x_min":0,"x_max":836,"ha":931,"o":"m 195 625 l 0 1013 l 208 1013 l 427 576 l 626 1013 l 836 1013 l 650 625 l 777 625 l 777 472 l 578 472 l 538 389 l 777 389 l 777 236 l 532 236 l 532 0 l 322 0 l 322 236 l 79 236 l 79 389 l 315 389 l 273 472 l 79 472 l 79 625 l 195 625 "},"(":{"x_min":0,"x_max":388.890625,"ha":486,"o":"m 388 -293 l 243 -293 q 70 14 130 -134 q 0 357 0 189 q 69 703 0 526 q 243 1013 129 856 l 388 1013 q 248 695 297 860 q 200 358 200 530 q 248 24 200 187 q 388 -293 297 -138 "},"U":{"x_min":0,"x_max":813,"ha":926,"o":"m 813 362 q 697 79 813 187 q 405 -29 582 -29 q 114 78 229 -29 q 0 362 0 186 l 0 1013 l 210 1013 l 210 387 q 260 226 210 291 q 408 154 315 154 q 554 226 500 154 q 603 387 603 291 l 603 1013 l 813 1013 l 813 362 "},"γ":{"x_min":0.0625,"x_max":729.234375,"ha":815,"o":"m 729 749 l 457 37 l 457 -278 l 257 -278 l 257 37 q 218 155 243 95 q 170 275 194 215 l 0 749 l 207 749 l 363 284 l 522 749 l 729 749 "},"α":{"x_min":-1,"x_max":722,"ha":835,"o":"m 722 0 l 531 0 l 530 101 q 433 8 491 41 q 304 -25 375 -25 q 72 104 157 -25 q -1 372 -1 216 q 72 643 -1 530 q 308 775 158 775 q 433 744 375 775 q 528 656 491 713 l 528 749 l 722 749 l 722 0 m 361 601 q 233 527 277 601 q 196 375 196 464 q 232 224 196 288 q 358 144 277 144 q 487 217 441 144 q 528 370 528 281 q 489 523 528 457 q 361 601 443 601 "},"F":{"x_min":0,"x_max":706.953125,"ha":778,"o":"m 706 837 l 206 837 l 206 606 l 645 606 l 645 431 l 206 431 l 206 0 l 0 0 l 0 1013 l 706 1013 l 706 837 "},"­":{"x_min":0,"x_max":704.171875,"ha":801,"o":"m 704 297 l 0 297 l 0 450 l 704 450 l 704 297 "},":":{"x_min":0,"x_max":207,"ha":304,"o":"m 207 528 l 0 528 l 0 735 l 207 735 l 207 528 m 207 0 l 0 0 l 0 207 l 207 207 l 207 0 "},"Χ":{"x_min":0,"x_max":894.453125,"ha":978,"o":"m 894 0 l 654 0 l 445 351 l 238 0 l 0 0 l 316 516 l 0 1013 l 238 1013 l 445 660 l 652 1013 l 894 1013 l 577 519 l 894 0 "},"*":{"x_min":115,"x_max":713,"ha":828,"o":"m 713 740 l 518 688 l 651 525 l 531 438 l 412 612 l 290 439 l 173 523 l 308 688 l 115 741 l 159 880 l 342 816 l 343 1013 l 482 1013 l 481 816 l 664 880 l 713 740 "},"†":{"x_min":0,"x_max":809,"ha":894,"o":"m 509 804 l 809 804 l 809 621 l 509 621 l 509 0 l 299 0 l 299 621 l 0 621 l 0 804 l 299 804 l 299 1011 l 509 1011 l 509 804 "},"°":{"x_min":-1,"x_max":363,"ha":460,"o":"m 181 808 q 46 862 94 808 q -1 992 -1 917 q 44 1118 -1 1066 q 181 1175 96 1175 q 317 1118 265 1175 q 363 991 363 1066 q 315 862 363 917 q 181 808 267 808 m 181 908 q 240 933 218 908 q 263 992 263 958 q 242 1051 263 1027 q 181 1075 221 1075 q 120 1050 142 1075 q 99 991 99 1026 q 120 933 99 958 q 181 908 142 908 "},"V":{"x_min":0,"x_max":895.828125,"ha":997,"o":"m 895 1013 l 550 0 l 347 0 l 0 1013 l 231 1013 l 447 256 l 666 1013 l 895 1013 "},"Ξ":{"x_min":0,"x_max":751.390625,"ha":800,"o":"m 733 826 l 5 826 l 5 1012 l 733 1012 l 733 826 m 681 432 l 65 432 l 65 617 l 681 617 l 681 432 m 751 0 l 0 0 l 0 183 l 751 183 l 751 0 "}," ":{"x_min":0,"x_max":0,"ha":853},"Ϋ":{"x_min":-0.21875,"x_max":836.171875,"ha":914,"o":"m 610 1046 l 454 1046 l 454 1215 l 610 1215 l 610 1046 m 369 1046 l 212 1046 l 212 1215 l 369 1215 l 369 1046 m 836 1012 l 532 376 l 532 0 l 322 0 l 322 376 l 0 1012 l 208 1012 l 427 576 l 626 1012 l 836 1012 "},"0":{"x_min":51,"x_max":779,"ha":828,"o":"m 415 -26 q 142 129 242 -26 q 51 476 51 271 q 141 825 51 683 q 415 984 242 984 q 687 825 585 984 q 779 476 779 682 q 688 131 779 271 q 415 -26 587 -26 m 415 137 q 529 242 485 137 q 568 477 568 338 q 530 713 568 619 q 415 821 488 821 q 303 718 344 821 q 262 477 262 616 q 301 237 262 337 q 415 137 341 137 "},"”":{"x_min":0,"x_max":469,"ha":567,"o":"m 192 834 q 137 692 192 751 q 0 626 83 634 l 0 697 q 101 831 101 723 l 0 831 l 0 1013 l 192 1013 l 192 834 m 469 834 q 414 692 469 751 q 277 626 360 634 l 277 697 q 379 831 379 723 l 277 831 l 277 1013 l 469 1013 l 469 834 "},"@":{"x_min":0,"x_max":1276,"ha":1374,"o":"m 1115 -52 q 895 -170 1015 -130 q 647 -211 776 -211 q 158 -34 334 -211 q 0 360 0 123 q 179 810 0 621 q 698 1019 377 1019 q 1138 859 981 1019 q 1276 514 1276 720 q 1173 210 1276 335 q 884 75 1062 75 q 784 90 810 75 q 737 186 749 112 q 647 104 698 133 q 532 75 596 75 q 360 144 420 75 q 308 308 308 205 q 398 568 308 451 q 638 696 497 696 q 731 671 690 696 q 805 604 772 647 l 840 673 l 964 673 q 886 373 915 490 q 856 239 856 257 q 876 201 856 214 q 920 188 895 188 q 1084 284 1019 188 q 1150 511 1150 380 q 1051 779 1150 672 q 715 905 934 905 q 272 734 439 905 q 121 363 121 580 q 250 41 121 170 q 647 -103 394 -103 q 863 -67 751 -103 q 1061 26 975 -32 l 1115 -52 m 769 483 q 770 500 770 489 q 733 567 770 539 q 651 596 695 596 q 508 504 566 596 q 457 322 457 422 q 483 215 457 256 q 561 175 509 175 q 671 221 625 175 q 733 333 718 268 l 769 483 "},"Ί":{"x_min":0,"x_max":619,"ha":732,"o":"m 313 1035 l 98 780 l 0 780 l 136 1035 l 313 1035 m 619 0 l 411 0 l 411 1012 l 619 1012 l 619 0 "},"i":{"x_min":14,"x_max":214,"ha":326,"o":"m 214 830 l 14 830 l 14 1013 l 214 1013 l 214 830 m 214 0 l 14 0 l 14 748 l 214 748 l 214 0 "},"Β":{"x_min":0,"x_max":835,"ha":961,"o":"m 675 547 q 791 450 747 518 q 835 304 835 383 q 718 75 835 158 q 461 0 612 0 l 0 0 l 0 1013 l 477 1013 q 697 951 609 1013 q 797 754 797 880 q 766 630 797 686 q 675 547 734 575 m 439 621 q 539 646 496 621 q 590 730 590 676 q 537 814 590 785 q 436 838 494 838 l 199 838 l 199 621 l 439 621 m 445 182 q 561 211 513 182 q 618 311 618 247 q 565 410 618 375 q 444 446 512 446 l 199 446 l 199 182 l 445 182 "},"υ":{"x_min":0,"x_max":656,"ha":767,"o":"m 656 416 q 568 55 656 145 q 326 -25 490 -25 q 59 97 137 -25 q 0 369 0 191 l 0 749 l 200 749 l 200 369 q 216 222 200 268 q 326 142 245 142 q 440 247 411 142 q 456 422 456 304 l 456 749 l 656 749 l 656 416 "},"]":{"x_min":0,"x_max":349,"ha":446,"o":"m 349 -300 l 0 -300 l 0 -154 l 163 -154 l 163 866 l 0 866 l 0 1013 l 349 1013 l 349 -300 "},"m":{"x_min":0,"x_max":1065,"ha":1174,"o":"m 1065 0 l 866 0 l 866 483 q 836 564 866 532 q 759 596 807 596 q 663 555 700 596 q 627 454 627 514 l 627 0 l 433 0 l 433 481 q 403 563 433 531 q 323 596 374 596 q 231 554 265 596 q 197 453 197 513 l 197 0 l 0 0 l 0 748 l 189 748 l 189 665 q 279 745 226 715 q 392 775 333 775 q 509 744 455 775 q 606 659 563 713 q 695 744 640 713 q 814 775 749 775 q 992 702 920 775 q 1065 523 1065 630 l 1065 0 "},"χ":{"x_min":0,"x_max":759.71875,"ha":847,"o":"m 759 -299 l 548 -299 l 379 66 l 215 -299 l 0 -299 l 261 233 l 13 749 l 230 749 l 379 400 l 527 749 l 738 749 l 500 238 l 759 -299 "},"8":{"x_min":57,"x_max":770,"ha":828,"o":"m 625 516 q 733 416 697 477 q 770 284 770 355 q 675 69 770 161 q 415 -29 574 -29 q 145 65 244 -29 q 57 273 57 150 q 93 413 57 350 q 204 516 130 477 q 112 609 142 556 q 83 718 83 662 q 177 905 83 824 q 414 986 272 986 q 650 904 555 986 q 745 715 745 822 q 716 608 745 658 q 625 516 688 558 m 414 590 q 516 624 479 590 q 553 706 553 659 q 516 791 553 755 q 414 828 480 828 q 311 792 348 828 q 275 706 275 757 q 310 624 275 658 q 414 590 345 590 m 413 135 q 527 179 487 135 q 564 279 564 218 q 525 386 564 341 q 411 436 482 436 q 298 387 341 436 q 261 282 261 344 q 300 178 261 222 q 413 135 340 135 "},"ί":{"x_min":42,"x_max":371.171875,"ha":389,"o":"m 242 0 l 42 0 l 42 748 l 242 748 l 242 0 m 371 1039 l 169 823 l 71 823 l 193 1039 l 371 1039 "},"Ζ":{"x_min":0,"x_max":804.171875,"ha":886,"o":"m 804 835 l 251 182 l 793 182 l 793 0 l 0 0 l 0 176 l 551 829 l 11 829 l 11 1012 l 804 1012 l 804 835 "},"R":{"x_min":0,"x_max":836.109375,"ha":947,"o":"m 836 0 l 608 0 q 588 53 596 20 q 581 144 581 86 q 581 179 581 162 q 581 215 581 197 q 553 345 581 306 q 428 393 518 393 l 208 393 l 208 0 l 0 0 l 0 1013 l 491 1013 q 720 944 630 1013 q 819 734 819 869 q 778 584 819 654 q 664 485 738 513 q 757 415 727 463 q 794 231 794 358 l 794 170 q 800 84 794 116 q 836 31 806 51 l 836 0 m 462 838 l 208 838 l 208 572 l 452 572 q 562 604 517 572 q 612 704 612 640 q 568 801 612 765 q 462 838 525 838 "},"o":{"x_min":0,"x_max":764,"ha":871,"o":"m 380 -26 q 105 86 211 -26 q 0 371 0 199 q 104 660 0 545 q 380 775 209 775 q 658 659 552 775 q 764 371 764 544 q 658 86 764 199 q 380 -26 552 -26 m 379 141 q 515 216 466 141 q 557 373 557 280 q 515 530 557 465 q 379 607 466 607 q 245 530 294 607 q 204 373 204 465 q 245 217 204 282 q 379 141 294 141 "},"5":{"x_min":59,"x_max":767,"ha":828,"o":"m 767 319 q 644 59 767 158 q 382 -29 533 -29 q 158 43 247 -29 q 59 264 59 123 l 252 264 q 295 165 252 201 q 400 129 339 129 q 512 172 466 129 q 564 308 564 220 q 514 437 564 387 q 398 488 464 488 q 329 472 361 488 q 271 420 297 456 l 93 428 l 157 958 l 722 958 l 722 790 l 295 790 l 271 593 q 348 635 306 621 q 431 649 389 649 q 663 551 560 649 q 767 319 767 453 "},"7":{"x_min":65.28125,"x_max":762.5,"ha":828,"o":"m 762 808 q 521 435 604 626 q 409 0 438 244 l 205 0 q 313 422 227 234 q 548 789 387 583 l 65 789 l 65 958 l 762 958 l 762 808 "},"K":{"x_min":0,"x_max":900,"ha":996,"o":"m 900 0 l 647 0 l 316 462 l 208 355 l 208 0 l 0 0 l 0 1013 l 208 1013 l 208 595 l 604 1013 l 863 1013 l 461 603 l 900 0 "},",":{"x_min":0,"x_max":206,"ha":303,"o":"m 206 5 q 150 -151 206 -88 q 0 -238 94 -213 l 0 -159 q 84 -100 56 -137 q 111 -2 111 -62 l 0 -2 l 0 205 l 206 205 l 206 5 "},"d":{"x_min":0,"x_max":722,"ha":836,"o":"m 722 0 l 530 0 l 530 101 q 303 -26 449 -26 q 72 103 155 -26 q 0 373 0 214 q 72 642 0 528 q 305 775 156 775 q 433 743 373 775 q 530 656 492 712 l 530 1013 l 722 1013 l 722 0 m 361 600 q 234 523 280 600 q 196 372 196 458 q 233 220 196 286 q 358 143 278 143 q 489 216 442 143 q 530 369 530 280 q 491 522 530 456 q 361 600 443 600 "},"¨":{"x_min":212,"x_max":609,"ha":933,"o":"m 609 1046 l 453 1046 l 453 1216 l 609 1216 l 609 1046 m 369 1046 l 212 1046 l 212 1216 l 369 1216 l 369 1046 "},"E":{"x_min":0,"x_max":761.109375,"ha":824,"o":"m 761 0 l 0 0 l 0 1013 l 734 1013 l 734 837 l 206 837 l 206 621 l 690 621 l 690 446 l 206 446 l 206 186 l 761 186 l 761 0 "},"Y":{"x_min":0,"x_max":836,"ha":931,"o":"m 836 1013 l 532 376 l 532 0 l 322 0 l 322 376 l 0 1013 l 208 1013 l 427 576 l 626 1013 l 836 1013 "},"\"":{"x_min":0,"x_max":357,"ha":454,"o":"m 357 604 l 225 604 l 225 988 l 357 988 l 357 604 m 132 604 l 0 604 l 0 988 l 132 988 l 132 604 "},"‹":{"x_min":35.984375,"x_max":791.671875,"ha":828,"o":"m 791 17 l 36 352 l 35 487 l 791 823 l 791 672 l 229 421 l 791 168 l 791 17 "},"„":{"x_min":0,"x_max":483,"ha":588,"o":"m 206 5 q 150 -151 206 -88 q 0 -238 94 -213 l 0 -159 q 84 -100 56 -137 q 111 -2 111 -62 l 0 -2 l 0 205 l 206 205 l 206 5 m 483 5 q 427 -151 483 -88 q 277 -238 371 -213 l 277 -159 q 361 -100 334 -137 q 388 -2 388 -62 l 277 -2 l 277 205 l 483 205 l 483 5 "},"δ":{"x_min":6,"x_max":732,"ha":835,"o":"m 732 352 q 630 76 732 177 q 354 -25 529 -25 q 101 74 197 -25 q 6 333 6 174 q 89 581 6 480 q 323 690 178 690 q 66 864 201 787 l 66 1013 l 669 1013 l 669 856 l 348 856 q 532 729 461 789 q 673 566 625 651 q 732 352 732 465 m 419 551 q 259 496 321 551 q 198 344 198 441 q 238 208 198 267 q 357 140 283 140 q 484 203 437 140 q 526 344 526 260 q 499 466 526 410 q 419 551 473 521 "},"έ":{"x_min":16.671875,"x_max":652.78125,"ha":742,"o":"m 652 259 q 565 49 652 123 q 340 -25 479 -25 q 102 39 188 -25 q 16 197 16 104 q 45 299 16 250 q 134 390 75 348 q 58 456 86 419 q 25 552 25 502 q 120 717 25 653 q 322 776 208 776 q 537 710 456 776 q 625 508 625 639 l 445 508 q 415 585 445 563 q 327 608 386 608 q 254 590 293 608 q 215 544 215 573 q 252 469 215 490 q 336 453 280 453 q 369 455 347 453 q 400 456 391 456 l 400 308 l 329 308 q 247 291 280 308 q 204 223 204 269 q 255 154 204 172 q 345 143 286 143 q 426 174 398 143 q 454 259 454 206 l 652 259 m 579 1039 l 377 823 l 279 823 l 401 1039 l 579 1039 "},"ω":{"x_min":0,"x_max":945,"ha":1051,"o":"m 565 323 l 565 289 q 577 190 565 221 q 651 142 597 142 q 718 189 694 142 q 742 365 742 237 q 703 565 742 462 q 610 749 671 650 l 814 749 q 910 547 876 650 q 945 337 945 444 q 874 96 945 205 q 668 -29 793 -29 q 551 0 608 -29 q 470 78 495 30 q 390 0 444 28 q 276 -29 337 -29 q 69 96 149 -29 q 0 337 0 204 q 36 553 0 444 q 130 749 68 650 l 334 749 q 241 565 273 650 q 203 365 203 461 q 219 222 203 279 q 292 142 243 142 q 360 183 342 142 q 373 271 373 211 q 372 298 372 285 q 372 323 372 311 l 372 528 l 566 528 l 565 323 "},"´":{"x_min":0,"x_max":132,"ha":299,"o":"m 132 604 l 0 604 l 0 988 l 132 988 l 132 604 "},"±":{"x_min":29,"x_max":798,"ha":828,"o":"m 798 480 l 484 480 l 484 254 l 344 254 l 344 480 l 29 480 l 29 615 l 344 615 l 344 842 l 484 842 l 484 615 l 798 615 l 798 480 m 798 0 l 29 0 l 29 136 l 798 136 l 798 0 "},"|":{"x_min":0,"x_max":143,"ha":240,"o":"m 143 462 l 0 462 l 0 984 l 143 984 l 143 462 m 143 -242 l 0 -242 l 0 280 l 143 280 l 143 -242 "},"ϋ":{"x_min":0,"x_max":656,"ha":767,"o":"m 535 810 l 406 810 l 406 952 l 535 952 l 535 810 m 271 810 l 142 810 l 142 952 l 271 952 l 271 810 m 656 417 q 568 55 656 146 q 326 -25 490 -25 q 59 97 137 -25 q 0 369 0 192 l 0 748 l 200 748 l 200 369 q 216 222 200 268 q 326 142 245 142 q 440 247 411 142 q 456 422 456 304 l 456 748 l 656 748 l 656 417 "},"§":{"x_min":0,"x_max":633,"ha":731,"o":"m 633 469 q 601 356 633 406 q 512 274 569 305 q 570 197 548 242 q 593 105 593 152 q 501 -76 593 -5 q 301 -142 416 -142 q 122 -82 193 -142 q 43 108 43 -15 l 212 108 q 251 27 220 53 q 321 1 283 1 q 389 23 360 1 q 419 83 419 46 q 310 194 419 139 q 108 297 111 295 q 0 476 0 372 q 33 584 0 537 q 120 659 62 626 q 72 720 91 686 q 53 790 53 755 q 133 978 53 908 q 312 1042 207 1042 q 483 984 412 1042 q 574 807 562 921 l 409 807 q 379 875 409 851 q 307 900 349 900 q 244 881 270 900 q 218 829 218 862 q 324 731 218 781 q 524 636 506 647 q 633 469 633 565 m 419 334 q 473 411 473 372 q 451 459 473 436 q 390 502 430 481 l 209 595 q 167 557 182 577 q 153 520 153 537 q 187 461 153 491 q 263 413 212 440 l 419 334 "},"b":{"x_min":0,"x_max":722,"ha":822,"o":"m 416 -26 q 289 6 346 -26 q 192 101 232 39 l 192 0 l 0 0 l 0 1013 l 192 1013 l 192 656 q 286 743 226 712 q 415 775 346 775 q 649 644 564 775 q 722 374 722 533 q 649 106 722 218 q 416 -26 565 -26 m 361 600 q 232 524 279 600 q 192 371 192 459 q 229 221 192 284 q 357 145 275 145 q 487 221 441 145 q 526 374 526 285 q 488 523 526 460 q 361 600 442 600 "},"q":{"x_min":0,"x_max":722,"ha":833,"o":"m 722 -298 l 530 -298 l 530 97 q 306 -25 449 -25 q 73 104 159 -25 q 0 372 0 216 q 72 643 0 529 q 305 775 156 775 q 430 742 371 775 q 530 654 488 709 l 530 750 l 722 750 l 722 -298 m 360 601 q 234 527 278 601 q 197 378 197 466 q 233 225 197 291 q 357 144 277 144 q 488 217 441 144 q 530 370 530 282 q 491 523 530 459 q 360 601 443 601 "},"Ω":{"x_min":-0.03125,"x_max":1008.53125,"ha":1108,"o":"m 1008 0 l 589 0 l 589 199 q 717 368 670 265 q 764 580 764 471 q 698 778 764 706 q 504 855 629 855 q 311 773 380 855 q 243 563 243 691 q 289 360 243 458 q 419 199 336 262 l 419 0 l 0 0 l 0 176 l 202 176 q 77 355 123 251 q 32 569 32 459 q 165 908 32 776 q 505 1040 298 1040 q 844 912 711 1040 q 977 578 977 785 q 931 362 977 467 q 805 176 886 256 l 1008 176 l 1008 0 "},"ύ":{"x_min":0,"x_max":656,"ha":767,"o":"m 656 417 q 568 55 656 146 q 326 -25 490 -25 q 59 97 137 -25 q 0 369 0 192 l 0 748 l 200 748 l 201 369 q 218 222 201 269 q 326 142 245 142 q 440 247 411 142 q 456 422 456 304 l 456 748 l 656 748 l 656 417 m 579 1039 l 378 823 l 279 823 l 401 1039 l 579 1039 "},"z":{"x_min":0,"x_max":663.890625,"ha":753,"o":"m 663 0 l 0 0 l 0 154 l 411 591 l 25 591 l 25 749 l 650 749 l 650 584 l 245 165 l 663 165 l 663 0 "},"™":{"x_min":0,"x_max":951,"ha":1063,"o":"m 405 921 l 255 921 l 255 506 l 149 506 l 149 921 l 0 921 l 0 1013 l 405 1013 l 405 921 m 951 506 l 852 506 l 852 916 l 750 506 l 643 506 l 539 915 l 539 506 l 442 506 l 442 1013 l 595 1012 l 695 625 l 794 1013 l 951 1013 l 951 506 "},"ή":{"x_min":0,"x_max":669,"ha":779,"o":"m 669 -278 l 469 -278 l 469 390 q 448 526 469 473 q 348 606 417 606 q 244 553 288 606 q 201 441 201 501 l 201 0 l 0 0 l 0 749 l 201 749 l 201 665 q 301 744 244 715 q 423 774 359 774 q 606 685 538 774 q 669 484 669 603 l 669 -278 m 495 1039 l 293 823 l 195 823 l 317 1039 l 495 1039 "},"Θ":{"x_min":0,"x_max":993,"ha":1092,"o":"m 497 -29 q 133 127 272 -29 q 0 505 0 277 q 133 883 0 733 q 497 1040 272 1040 q 861 883 722 1040 q 993 505 993 733 q 861 127 993 277 q 497 -29 722 -29 m 497 154 q 711 266 631 154 q 782 506 782 367 q 712 746 782 648 q 497 858 634 858 q 281 746 361 858 q 211 506 211 648 q 280 266 211 365 q 497 154 359 154 m 676 430 l 316 430 l 316 593 l 676 593 l 676 430 "},"®":{"x_min":3,"x_max":1007,"ha":1104,"o":"m 507 -6 q 129 153 269 -6 q 3 506 3 298 q 127 857 3 713 q 502 1017 266 1017 q 880 855 740 1017 q 1007 502 1007 711 q 882 152 1007 295 q 507 -6 743 -6 m 502 934 q 184 800 302 934 q 79 505 79 680 q 184 210 79 331 q 501 76 302 76 q 819 210 701 76 q 925 507 925 331 q 820 800 925 682 q 502 934 704 934 m 782 190 l 639 190 q 627 225 632 202 q 623 285 623 248 l 623 326 q 603 411 623 384 q 527 439 584 439 l 388 439 l 388 190 l 257 190 l 257 829 l 566 829 q 709 787 654 829 q 772 654 772 740 q 746 559 772 604 q 675 497 720 514 q 735 451 714 483 q 756 341 756 419 l 756 299 q 760 244 756 265 q 782 212 764 223 l 782 190 m 546 718 l 388 718 l 388 552 l 541 552 q 612 572 584 552 q 641 635 641 593 q 614 695 641 672 q 546 718 587 718 "},"~":{"x_min":0,"x_max":851,"ha":949,"o":"m 851 968 q 795 750 851 831 q 599 656 730 656 q 406 744 506 656 q 259 832 305 832 q 162 775 193 832 q 139 656 139 730 l 0 656 q 58 871 0 787 q 251 968 124 968 q 442 879 341 968 q 596 791 544 791 q 691 849 663 791 q 712 968 712 892 l 851 968 "},"Ε":{"x_min":0,"x_max":761.546875,"ha":824,"o":"m 761 0 l 0 0 l 0 1012 l 735 1012 l 735 836 l 206 836 l 206 621 l 690 621 l 690 446 l 206 446 l 206 186 l 761 186 l 761 0 "},"³":{"x_min":0,"x_max":467,"ha":564,"o":"m 467 555 q 393 413 467 466 q 229 365 325 365 q 70 413 134 365 q 0 565 0 467 l 123 565 q 163 484 131 512 q 229 461 190 461 q 299 486 269 461 q 329 553 329 512 q 281 627 329 607 q 187 641 248 641 l 187 722 q 268 737 237 722 q 312 804 312 758 q 285 859 312 837 q 224 882 259 882 q 165 858 189 882 q 135 783 140 834 l 12 783 q 86 930 20 878 q 230 976 145 976 q 379 931 314 976 q 444 813 444 887 q 423 744 444 773 q 365 695 402 716 q 439 640 412 676 q 467 555 467 605 "},"[":{"x_min":0,"x_max":347.21875,"ha":444,"o":"m 347 -300 l 0 -300 l 0 1013 l 347 1013 l 347 866 l 188 866 l 188 -154 l 347 -154 l 347 -300 "},"L":{"x_min":0,"x_max":704.171875,"ha":763,"o":"m 704 0 l 0 0 l 0 1013 l 208 1013 l 208 186 l 704 186 l 704 0 "},"σ":{"x_min":0,"x_max":851.3125,"ha":940,"o":"m 851 594 l 712 594 q 761 369 761 485 q 658 83 761 191 q 379 -25 555 -25 q 104 87 208 -25 q 0 372 0 200 q 103 659 0 544 q 378 775 207 775 q 464 762 407 775 q 549 750 521 750 l 851 750 l 851 594 m 379 142 q 515 216 466 142 q 557 373 557 280 q 515 530 557 465 q 379 608 465 608 q 244 530 293 608 q 203 373 203 465 q 244 218 203 283 q 379 142 293 142 "},"ζ":{"x_min":0,"x_max":622,"ha":701,"o":"m 622 -32 q 604 -158 622 -98 q 551 -278 587 -218 l 373 -278 q 426 -180 406 -229 q 446 -80 446 -131 q 421 -22 446 -37 q 354 -8 397 -8 q 316 -9 341 -8 q 280 -11 291 -11 q 75 69 150 -11 q 0 283 0 150 q 87 596 0 437 q 291 856 162 730 l 47 856 l 47 1013 l 592 1013 l 592 904 q 317 660 422 800 q 197 318 197 497 q 306 141 197 169 q 510 123 408 131 q 622 -32 622 102 "},"θ":{"x_min":0,"x_max":714,"ha":817,"o":"m 357 1022 q 633 833 534 1022 q 714 486 714 679 q 634 148 714 288 q 354 -25 536 -25 q 79 147 175 -25 q 0 481 0 288 q 79 831 0 679 q 357 1022 177 1022 m 510 590 q 475 763 510 687 q 351 862 430 862 q 233 763 272 862 q 204 590 204 689 l 510 590 m 510 440 l 204 440 q 233 251 204 337 q 355 131 274 131 q 478 248 434 131 q 510 440 510 337 "},"Ο":{"x_min":0,"x_max":995,"ha":1092,"o":"m 497 -29 q 133 127 272 -29 q 0 505 0 277 q 132 883 0 733 q 497 1040 270 1040 q 861 883 722 1040 q 995 505 995 733 q 862 127 995 277 q 497 -29 724 -29 m 497 154 q 711 266 632 154 q 781 506 781 365 q 711 745 781 647 q 497 857 632 857 q 283 747 361 857 q 213 506 213 647 q 282 266 213 365 q 497 154 361 154 "},"Γ":{"x_min":0,"x_max":703.84375,"ha":742,"o":"m 703 836 l 208 836 l 208 0 l 0 0 l 0 1012 l 703 1012 l 703 836 "}," ":{"x_min":0,"x_max":0,"ha":375},"%":{"x_min":0,"x_max":1111,"ha":1213,"o":"m 861 484 q 1048 404 979 484 q 1111 228 1111 332 q 1048 51 1111 123 q 859 -29 979 -29 q 672 50 740 -29 q 610 227 610 122 q 672 403 610 331 q 861 484 741 484 m 861 120 q 939 151 911 120 q 967 226 967 183 q 942 299 967 270 q 861 333 912 333 q 783 301 811 333 q 756 226 756 269 q 783 151 756 182 q 861 120 810 120 m 904 984 l 316 -28 l 205 -29 l 793 983 l 904 984 m 250 984 q 436 904 366 984 q 499 730 499 832 q 436 552 499 626 q 248 472 366 472 q 62 552 132 472 q 0 728 0 624 q 62 903 0 831 q 250 984 132 984 m 249 835 q 169 801 198 835 q 140 725 140 768 q 167 652 140 683 q 247 621 195 621 q 327 654 298 621 q 357 730 357 687 q 329 803 357 772 q 249 835 301 835 "},"P":{"x_min":0,"x_max":771,"ha":838,"o":"m 208 361 l 208 0 l 0 0 l 0 1013 l 450 1013 q 682 919 593 1013 q 771 682 771 826 q 687 452 771 544 q 466 361 604 361 l 208 361 m 421 837 l 208 837 l 208 544 l 410 544 q 525 579 480 544 q 571 683 571 615 q 527 792 571 747 q 421 837 484 837 "},"Έ":{"x_min":0,"x_max":1172.546875,"ha":1235,"o":"m 1172 0 l 411 0 l 411 1012 l 1146 1012 l 1146 836 l 617 836 l 617 621 l 1101 621 l 1101 446 l 617 446 l 617 186 l 1172 186 l 1172 0 m 313 1035 l 98 780 l 0 780 l 136 1035 l 313 1035 "},"Ώ":{"x_min":0.4375,"x_max":1189.546875,"ha":1289,"o":"m 1189 0 l 770 0 l 770 199 q 897 369 849 263 q 945 580 945 474 q 879 778 945 706 q 685 855 810 855 q 492 773 561 855 q 424 563 424 691 q 470 360 424 458 q 600 199 517 262 l 600 0 l 180 0 l 180 176 l 383 176 q 258 355 304 251 q 213 569 213 459 q 346 908 213 776 q 686 1040 479 1040 q 1025 912 892 1040 q 1158 578 1158 785 q 1112 362 1158 467 q 986 176 1067 256 l 1189 176 l 1189 0 m 314 1092 l 99 837 l 0 837 l 136 1092 l 314 1092 "},"_":{"x_min":61.109375,"x_max":766.671875,"ha":828,"o":"m 766 -333 l 61 -333 l 61 -190 l 766 -190 l 766 -333 "},"Ϊ":{"x_min":-56,"x_max":342,"ha":503,"o":"m 342 1046 l 186 1046 l 186 1215 l 342 1215 l 342 1046 m 101 1046 l -56 1046 l -56 1215 l 101 1215 l 101 1046 m 249 0 l 41 0 l 41 1012 l 249 1012 l 249 0 "},"+":{"x_min":43,"x_max":784,"ha":828,"o":"m 784 353 l 483 353 l 483 0 l 343 0 l 343 353 l 43 353 l 43 489 l 343 489 l 343 840 l 483 840 l 483 489 l 784 489 l 784 353 "},"½":{"x_min":0,"x_max":1090,"ha":1188,"o":"m 1090 380 q 992 230 1090 301 q 779 101 886 165 q 822 94 784 95 q 924 93 859 93 l 951 93 l 973 93 l 992 93 l 1009 93 q 1046 93 1027 93 q 1085 93 1066 93 l 1085 0 l 650 0 l 654 38 q 815 233 665 137 q 965 376 965 330 q 936 436 965 412 q 869 461 908 461 q 806 435 831 461 q 774 354 780 409 l 659 354 q 724 505 659 451 q 870 554 783 554 q 1024 506 958 554 q 1090 380 1090 459 m 868 998 l 268 -28 l 154 -27 l 757 999 l 868 998 m 272 422 l 147 422 l 147 799 l 0 799 l 0 875 q 126 900 91 875 q 170 973 162 926 l 272 973 l 272 422 "},"Ρ":{"x_min":0,"x_max":771,"ha":838,"o":"m 208 361 l 208 0 l 0 0 l 0 1012 l 450 1012 q 682 919 593 1012 q 771 681 771 826 q 687 452 771 544 q 466 361 604 361 l 208 361 m 422 836 l 209 836 l 209 544 l 410 544 q 525 579 480 544 q 571 683 571 614 q 527 791 571 747 q 422 836 484 836 "},"'":{"x_min":0,"x_max":192,"ha":289,"o":"m 192 834 q 137 692 192 751 q 0 626 82 632 l 0 697 q 101 830 101 726 l 0 830 l 0 1013 l 192 1013 l 192 834 "},"ª":{"x_min":0,"x_max":350,"ha":393,"o":"m 350 625 l 245 625 q 237 648 241 636 q 233 672 233 661 q 117 611 192 611 q 33 643 66 611 q 0 727 0 675 q 116 846 0 828 q 233 886 233 864 q 211 919 233 907 q 168 931 190 931 q 108 877 108 931 l 14 877 q 56 977 14 942 q 165 1013 98 1013 q 270 987 224 1013 q 329 903 329 955 l 329 694 q 332 661 329 675 q 350 641 336 648 l 350 625 m 233 774 l 233 809 q 151 786 180 796 q 97 733 97 768 q 111 700 97 712 q 149 689 126 689 q 210 713 187 689 q 233 774 233 737 "},"΅":{"x_min":57,"x_max":584,"ha":753,"o":"m 584 810 l 455 810 l 455 952 l 584 952 l 584 810 m 521 1064 l 305 810 l 207 810 l 343 1064 l 521 1064 m 186 810 l 57 810 l 57 952 l 186 952 l 186 810 "},"T":{"x_min":0,"x_max":809,"ha":894,"o":"m 809 831 l 509 831 l 509 0 l 299 0 l 299 831 l 0 831 l 0 1013 l 809 1013 l 809 831 "},"Φ":{"x_min":0,"x_max":949,"ha":1032,"o":"m 566 0 l 385 0 l 385 121 q 111 230 222 121 q 0 508 0 340 q 112 775 0 669 q 385 892 219 875 l 385 1013 l 566 1013 l 566 892 q 836 776 732 875 q 949 507 949 671 q 838 231 949 341 q 566 121 728 121 l 566 0 m 566 285 q 701 352 650 285 q 753 508 753 419 q 703 658 753 597 q 566 729 653 720 l 566 285 m 385 285 l 385 729 q 245 661 297 717 q 193 516 193 604 q 246 356 193 427 q 385 285 300 285 "},"j":{"x_min":-45.828125,"x_max":242,"ha":361,"o":"m 242 830 l 42 830 l 42 1013 l 242 1013 l 242 830 m 242 -119 q 180 -267 242 -221 q 20 -308 127 -308 l -45 -308 l -45 -140 l -24 -140 q 25 -130 8 -140 q 42 -88 42 -120 l 42 748 l 242 748 l 242 -119 "},"Σ":{"x_min":0,"x_max":772.21875,"ha":849,"o":"m 772 0 l 0 0 l 0 140 l 368 526 l 18 862 l 18 1012 l 740 1012 l 740 836 l 315 836 l 619 523 l 298 175 l 772 175 l 772 0 "},"1":{"x_min":197.609375,"x_max":628,"ha":828,"o":"m 628 0 l 434 0 l 434 674 l 197 674 l 197 810 q 373 837 318 810 q 468 984 450 876 l 628 984 l 628 0 "},"›":{"x_min":36.109375,"x_max":792,"ha":828,"o":"m 792 352 l 36 17 l 36 168 l 594 420 l 36 672 l 36 823 l 792 487 l 792 352 "},"<":{"x_min":35.984375,"x_max":791.671875,"ha":828,"o":"m 791 17 l 36 352 l 35 487 l 791 823 l 791 672 l 229 421 l 791 168 l 791 17 "},"£":{"x_min":0,"x_max":716.546875,"ha":814,"o":"m 716 38 q 603 -9 658 5 q 502 -24 548 -24 q 398 -10 451 -24 q 239 25 266 25 q 161 12 200 25 q 77 -29 122 0 l 0 113 q 110 211 81 174 q 151 315 151 259 q 117 440 151 365 l 0 440 l 0 515 l 73 515 q 35 610 52 560 q 15 710 15 671 q 119 910 15 831 q 349 984 216 984 q 570 910 480 984 q 693 668 674 826 l 501 668 q 455 791 501 746 q 353 830 414 830 q 256 795 298 830 q 215 705 215 760 q 249 583 215 655 q 283 515 266 548 l 479 515 l 479 440 l 309 440 q 316 394 313 413 q 319 355 319 374 q 287 241 319 291 q 188 135 263 205 q 262 160 225 152 q 332 168 298 168 q 455 151 368 168 q 523 143 500 143 q 588 152 558 143 q 654 189 617 162 l 716 38 "},"t":{"x_min":0,"x_max":412,"ha":511,"o":"m 412 -6 q 349 -8 391 -6 q 287 -11 307 -11 q 137 38 177 -11 q 97 203 97 87 l 97 609 l 0 609 l 0 749 l 97 749 l 97 951 l 297 951 l 297 749 l 412 749 l 412 609 l 297 609 l 297 191 q 315 152 297 162 q 366 143 334 143 q 389 143 378 143 q 412 143 400 143 l 412 -6 "},"¬":{"x_min":0,"x_max":704,"ha":801,"o":"m 704 93 l 551 93 l 551 297 l 0 297 l 0 450 l 704 450 l 704 93 "},"λ":{"x_min":0,"x_max":701.390625,"ha":775,"o":"m 701 0 l 491 0 l 345 444 l 195 0 l 0 0 l 238 697 l 131 1013 l 334 1013 l 701 0 "},"W":{"x_min":0,"x_max":1291.671875,"ha":1399,"o":"m 1291 1013 l 1002 0 l 802 0 l 645 777 l 490 0 l 288 0 l 0 1013 l 215 1013 l 388 298 l 534 1012 l 757 1013 l 904 299 l 1076 1013 l 1291 1013 "},">":{"x_min":36.109375,"x_max":792,"ha":828,"o":"m 792 352 l 36 17 l 36 168 l 594 420 l 36 672 l 36 823 l 792 487 l 792 352 "},"v":{"x_min":0,"x_max":740.28125,"ha":828,"o":"m 740 749 l 473 0 l 266 0 l 0 749 l 222 749 l 373 211 l 529 749 l 740 749 "},"τ":{"x_min":0.28125,"x_max":618.734375,"ha":699,"o":"m 618 593 l 409 593 l 409 0 l 210 0 l 210 593 l 0 593 l 0 749 l 618 749 l 618 593 "},"ξ":{"x_min":0,"x_max":640,"ha":715,"o":"m 640 -14 q 619 -157 640 -84 q 563 -299 599 -230 l 399 -299 q 442 -194 433 -223 q 468 -85 468 -126 q 440 -25 468 -41 q 368 -10 412 -10 q 333 -11 355 -10 q 302 -13 311 -13 q 91 60 179 -13 q 0 259 0 138 q 56 426 0 354 q 201 530 109 493 q 106 594 144 553 q 65 699 65 642 q 94 787 65 747 q 169 856 123 828 l 22 856 l 22 1013 l 597 1013 l 597 856 l 497 857 q 345 840 398 857 q 257 736 257 812 q 366 614 257 642 q 552 602 416 602 l 552 446 l 513 446 q 313 425 379 446 q 199 284 199 389 q 312 162 199 184 q 524 136 418 148 q 640 -14 640 105 "},"&":{"x_min":-1,"x_max":910.109375,"ha":1007,"o":"m 910 -1 l 676 -1 l 607 83 q 291 -47 439 -47 q 50 100 135 -47 q -1 273 -1 190 q 51 431 -1 357 q 218 568 104 505 q 151 661 169 629 q 120 769 120 717 q 201 951 120 885 q 382 1013 276 1013 q 555 957 485 1013 q 635 789 635 894 q 584 644 635 709 q 468 539 548 597 l 615 359 q 664 527 654 440 l 844 527 q 725 223 824 359 l 910 -1 m 461 787 q 436 848 461 826 q 381 870 412 870 q 325 849 349 870 q 301 792 301 829 q 324 719 301 757 q 372 660 335 703 q 430 714 405 680 q 461 787 461 753 m 500 214 l 318 441 q 198 286 198 363 q 225 204 198 248 q 347 135 268 135 q 425 153 388 135 q 500 214 462 172 "},"Λ":{"x_min":0,"x_max":894.453125,"ha":974,"o":"m 894 0 l 666 0 l 447 757 l 225 0 l 0 0 l 344 1013 l 547 1013 l 894 0 "},"I":{"x_min":41,"x_max":249,"ha":365,"o":"m 249 0 l 41 0 l 41 1013 l 249 1013 l 249 0 "},"G":{"x_min":0,"x_max":971,"ha":1057,"o":"m 971 -1 l 829 -1 l 805 118 q 479 -29 670 -29 q 126 133 261 -29 q 0 509 0 286 q 130 884 0 737 q 493 1040 268 1040 q 790 948 659 1040 q 961 698 920 857 l 736 698 q 643 813 709 769 q 500 857 578 857 q 285 746 364 857 q 213 504 213 644 q 285 263 213 361 q 505 154 365 154 q 667 217 598 154 q 761 374 736 280 l 548 374 l 548 548 l 971 548 l 971 -1 "},"ΰ":{"x_min":0,"x_max":655,"ha":767,"o":"m 583 810 l 454 810 l 454 952 l 583 952 l 583 810 m 186 810 l 57 809 l 57 952 l 186 952 l 186 810 m 516 1039 l 315 823 l 216 823 l 338 1039 l 516 1039 m 655 417 q 567 55 655 146 q 326 -25 489 -25 q 59 97 137 -25 q 0 369 0 192 l 0 748 l 200 748 l 201 369 q 218 222 201 269 q 326 142 245 142 q 439 247 410 142 q 455 422 455 304 l 455 748 l 655 748 l 655 417 "},"`":{"x_min":0,"x_max":190,"ha":288,"o":"m 190 654 l 0 654 l 0 830 q 55 970 0 909 q 190 1040 110 1031 l 190 969 q 111 922 134 952 q 88 836 88 892 l 190 836 l 190 654 "},"·":{"x_min":0,"x_max":207,"ha":304,"o":"m 207 528 l 0 528 l 0 735 l 207 735 l 207 528 "},"Υ":{"x_min":-0.21875,"x_max":836.171875,"ha":914,"o":"m 836 1013 l 532 376 l 532 0 l 322 0 l 322 376 l 0 1013 l 208 1013 l 427 576 l 626 1013 l 836 1013 "},"r":{"x_min":0,"x_max":431.9375,"ha":513,"o":"m 431 564 q 269 536 320 564 q 200 395 200 498 l 200 0 l 0 0 l 0 748 l 183 748 l 183 618 q 285 731 224 694 q 431 768 345 768 l 431 564 "},"x":{"x_min":0,"x_max":738.890625,"ha":826,"o":"m 738 0 l 504 0 l 366 238 l 230 0 l 0 0 l 252 382 l 11 749 l 238 749 l 372 522 l 502 749 l 725 749 l 488 384 l 738 0 "},"μ":{"x_min":0,"x_max":647,"ha":754,"o":"m 647 0 l 477 0 l 477 68 q 411 9 448 30 q 330 -11 374 -11 q 261 3 295 -11 q 199 43 226 18 l 199 -278 l 0 -278 l 0 749 l 199 749 l 199 358 q 216 222 199 268 q 322 152 244 152 q 435 240 410 152 q 448 401 448 283 l 448 749 l 647 749 l 647 0 "},"h":{"x_min":0,"x_max":669,"ha":782,"o":"m 669 0 l 469 0 l 469 390 q 449 526 469 472 q 353 607 420 607 q 248 554 295 607 q 201 441 201 501 l 201 0 l 0 0 l 0 1013 l 201 1013 l 201 665 q 303 743 245 715 q 425 772 362 772 q 609 684 542 772 q 669 484 669 605 l 669 0 "},".":{"x_min":0,"x_max":206,"ha":303,"o":"m 206 0 l 0 0 l 0 207 l 206 207 l 206 0 "},"φ":{"x_min":-1,"x_max":921,"ha":990,"o":"m 542 -278 l 367 -278 l 367 -22 q 99 92 200 -22 q -1 376 -1 206 q 72 627 -1 520 q 288 769 151 742 l 288 581 q 222 495 243 550 q 202 378 202 439 q 240 228 202 291 q 367 145 285 157 l 367 776 l 515 776 q 807 667 694 776 q 921 379 921 558 q 815 93 921 209 q 542 -22 709 -22 l 542 -278 m 542 145 q 672 225 625 145 q 713 381 713 291 q 671 536 713 470 q 542 611 624 611 l 542 145 "},";":{"x_min":0,"x_max":208,"ha":306,"o":"m 208 528 l 0 528 l 0 735 l 208 735 l 208 528 m 208 6 q 152 -151 208 -89 q 0 -238 96 -212 l 0 -158 q 87 -100 61 -136 q 113 0 113 -65 l 0 0 l 0 207 l 208 207 l 208 6 "},"f":{"x_min":0,"x_max":424,"ha":525,"o":"m 424 609 l 300 609 l 300 0 l 107 0 l 107 609 l 0 609 l 0 749 l 107 749 q 145 949 107 894 q 328 1019 193 1019 l 424 1015 l 424 855 l 362 855 q 312 841 324 855 q 300 797 300 827 q 300 773 300 786 q 300 749 300 761 l 424 749 l 424 609 "},"“":{"x_min":0,"x_max":468,"ha":567,"o":"m 190 631 l 0 631 l 0 807 q 55 947 0 885 q 190 1017 110 1010 l 190 947 q 88 813 88 921 l 190 813 l 190 631 m 468 631 l 278 631 l 278 807 q 333 947 278 885 q 468 1017 388 1010 l 468 947 q 366 813 366 921 l 468 813 l 468 631 "},"A":{"x_min":0,"x_max":966.671875,"ha":1069,"o":"m 966 0 l 747 0 l 679 208 l 286 208 l 218 0 l 0 0 l 361 1013 l 600 1013 l 966 0 m 623 376 l 480 810 l 340 376 l 623 376 "},"6":{"x_min":57,"x_max":771,"ha":828,"o":"m 744 734 l 544 734 q 500 802 533 776 q 425 828 466 828 q 315 769 359 828 q 264 571 264 701 q 451 638 343 638 q 691 537 602 638 q 771 315 771 449 q 683 79 771 176 q 420 -29 586 -29 q 134 123 227 -29 q 57 455 57 250 q 184 865 57 721 q 452 988 293 988 q 657 916 570 988 q 744 734 744 845 m 426 128 q 538 178 498 128 q 578 300 578 229 q 538 422 578 372 q 415 479 493 479 q 303 430 342 479 q 264 313 264 381 q 308 184 264 240 q 426 128 352 128 "},"‘":{"x_min":0,"x_max":190,"ha":289,"o":"m 190 631 l 0 631 l 0 807 q 55 947 0 885 q 190 1017 110 1010 l 190 947 q 88 813 88 921 l 190 813 l 190 631 "},"ϊ":{"x_min":-55,"x_max":337,"ha":389,"o":"m 337 810 l 208 810 l 208 952 l 337 952 l 337 810 m 74 810 l -55 810 l -55 952 l 74 952 l 74 810 m 242 0 l 42 0 l 42 748 l 242 748 l 242 0 "},"π":{"x_min":0.5,"x_max":838.890625,"ha":938,"o":"m 838 593 l 750 593 l 750 0 l 549 0 l 549 593 l 287 593 l 287 0 l 88 0 l 88 593 l 0 593 l 0 749 l 838 749 l 838 593 "},"ά":{"x_min":-1,"x_max":722,"ha":835,"o":"m 722 0 l 531 0 l 530 101 q 433 8 491 41 q 304 -25 375 -25 q 72 104 157 -25 q -1 372 -1 216 q 72 643 -1 530 q 308 775 158 775 q 433 744 375 775 q 528 656 491 713 l 528 749 l 722 749 l 722 0 m 361 601 q 233 527 277 601 q 196 375 196 464 q 232 224 196 288 q 358 144 277 144 q 487 217 441 144 q 528 370 528 281 q 489 523 528 457 q 361 601 443 601 m 579 1039 l 377 823 l 279 823 l 401 1039 l 579 1039 "},"O":{"x_min":0,"x_max":994,"ha":1094,"o":"m 497 -29 q 133 127 272 -29 q 0 505 0 277 q 131 883 0 733 q 497 1040 270 1040 q 860 883 721 1040 q 994 505 994 733 q 862 127 994 277 q 497 -29 723 -29 m 497 154 q 710 266 631 154 q 780 506 780 365 q 710 745 780 647 q 497 857 631 857 q 283 747 361 857 q 213 506 213 647 q 282 266 213 365 q 497 154 361 154 "},"n":{"x_min":0,"x_max":669,"ha":782,"o":"m 669 0 l 469 0 l 469 452 q 442 553 469 513 q 352 601 412 601 q 245 553 290 601 q 200 441 200 505 l 200 0 l 0 0 l 0 748 l 194 748 l 194 659 q 289 744 230 713 q 416 775 349 775 q 600 700 531 775 q 669 509 669 626 l 669 0 "},"3":{"x_min":61,"x_max":767,"ha":828,"o":"m 767 290 q 653 51 767 143 q 402 -32 548 -32 q 168 48 262 -32 q 61 300 61 140 l 250 300 q 298 173 250 219 q 405 132 343 132 q 514 169 471 132 q 563 282 563 211 q 491 405 563 369 q 343 432 439 432 l 343 568 q 472 592 425 568 q 534 701 534 626 q 493 793 534 758 q 398 829 453 829 q 306 789 344 829 q 268 669 268 749 l 80 669 q 182 909 80 823 q 410 986 274 986 q 633 916 540 986 q 735 719 735 840 q 703 608 735 656 q 615 522 672 561 q 727 427 687 486 q 767 290 767 369 "},"9":{"x_min":58,"x_max":769,"ha":828,"o":"m 769 492 q 646 90 769 232 q 384 -33 539 -33 q 187 35 271 -33 q 83 224 98 107 l 282 224 q 323 154 286 182 q 404 127 359 127 q 513 182 471 127 q 563 384 563 248 q 475 335 532 355 q 372 315 418 315 q 137 416 224 315 q 58 642 58 507 q 144 877 58 781 q 407 984 239 984 q 694 827 602 984 q 769 492 769 699 m 416 476 q 525 521 488 476 q 563 632 563 566 q 521 764 563 709 q 403 826 474 826 q 297 773 337 826 q 258 649 258 720 q 295 530 258 577 q 416 476 339 476 "},"l":{"x_min":41,"x_max":240,"ha":363,"o":"m 240 0 l 41 0 l 41 1013 l 240 1013 l 240 0 "},"¤":{"x_min":40.265625,"x_max":727.203125,"ha":825,"o":"m 727 792 l 594 659 q 620 552 620 609 q 598 459 620 504 l 725 331 l 620 224 l 491 352 q 382 331 443 331 q 273 352 322 331 l 144 224 l 40 330 l 167 459 q 147 552 147 501 q 172 658 147 608 l 40 794 l 147 898 l 283 759 q 383 776 330 776 q 482 759 434 776 l 620 898 l 727 792 m 383 644 q 308 617 334 644 q 283 551 283 590 q 309 489 283 517 q 381 462 335 462 q 456 488 430 462 q 482 554 482 515 q 455 616 482 588 q 383 644 429 644 "},"κ":{"x_min":0,"x_max":691.84375,"ha":779,"o":"m 691 0 l 479 0 l 284 343 l 196 252 l 196 0 l 0 0 l 0 749 l 196 749 l 196 490 l 440 749 l 677 749 l 416 479 l 691 0 "},"4":{"x_min":53,"x_max":775.21875,"ha":828,"o":"m 775 213 l 660 213 l 660 0 l 470 0 l 470 213 l 53 213 l 53 384 l 416 958 l 660 958 l 660 370 l 775 370 l 775 213 m 474 364 l 474 786 l 204 363 l 474 364 "},"p":{"x_min":0,"x_max":722,"ha":824,"o":"m 415 -26 q 287 4 346 -26 q 192 92 228 34 l 192 -298 l 0 -298 l 0 750 l 192 750 l 192 647 q 289 740 230 706 q 416 775 347 775 q 649 645 566 775 q 722 375 722 534 q 649 106 722 218 q 415 -26 564 -26 m 363 603 q 232 529 278 603 q 192 375 192 465 q 230 222 192 286 q 360 146 276 146 q 487 221 441 146 q 526 371 526 285 q 488 523 526 458 q 363 603 443 603 "},"‡":{"x_min":0,"x_max":809,"ha":894,"o":"m 299 621 l 0 621 l 0 804 l 299 804 l 299 1011 l 509 1011 l 509 804 l 809 804 l 809 621 l 509 621 l 509 387 l 809 387 l 809 205 l 509 205 l 509 0 l 299 0 l 299 205 l 0 205 l 0 387 l 299 387 l 299 621 "},"ψ":{"x_min":0,"x_max":875,"ha":979,"o":"m 522 142 q 657 274 620 163 q 671 352 671 316 l 671 748 l 875 748 l 875 402 q 806 134 875 240 q 525 -22 719 -1 l 525 -278 l 349 -278 l 349 -22 q 65 135 152 -1 q 0 402 0 238 l 0 748 l 204 748 l 204 352 q 231 240 204 295 q 353 142 272 159 l 353 922 l 524 922 l 522 142 "},"η":{"x_min":0,"x_max":669,"ha":779,"o":"m 669 -278 l 469 -278 l 469 390 q 448 526 469 473 q 348 606 417 606 q 244 553 288 606 q 201 441 201 501 l 201 0 l 0 0 l 0 749 l 201 749 l 201 665 q 301 744 244 715 q 423 774 359 774 q 606 685 538 774 q 669 484 669 603 l 669 -278 "}},"cssFontWeight":"bold","ascender":1216,"underlinePosition":-100,"cssFontStyle":"normal","boundingBox":{"yMin":-333,"xMin":-162,"yMax":1216,"xMax":1681},"resolution":1000,"original_font_information":{"postscript_name":"Helvetiker-Bold","version_string":"Version 1.00 2004 initial release","vendor_url":"http://www.magenta.gr","full_font_name":"Helvetiker Bold","font_family_name":"Helvetiker","copyright":"Copyright (c) Magenta ltd, 2004.","description":"","trademark":"","designer":"","designer_url":"","unique_font_identifier":"Magenta ltd:Helvetiker Bold:22-10-104","license_url":"http://www.ellak.gr/fonts/MgOpen/license.html","license_description":"Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license (\"Fonts\") and associated documentation files (the \"Font Software\"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \r\n\r\nThe above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\r\n\r\nThe Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word \"MgOpen\", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\r\n\r\nThis License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the \"MgOpen\" name.\r\n\r\nThe Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \r\n\r\nTHE FONT SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.","manufacturer_name":"Magenta ltd","font_sub_family_name":"Bold"},"descender":-334,"familyName":"Helvetiker","lineHeight":1549,"underlineThickness":50} \ No newline at end of file diff --git a/node_modules/three/examples/fonts/helvetiker_regular.typeface.json b/node_modules/three/examples/fonts/helvetiker_regular.typeface.json new file mode 100644 index 0000000..d19293b --- /dev/null +++ b/node_modules/three/examples/fonts/helvetiker_regular.typeface.json @@ -0,0 +1 @@ +{"glyphs":{"ο":{"x_min":0,"x_max":712,"ha":815,"o":"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 "},"S":{"x_min":0,"x_max":788,"ha":890,"o":"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 "},"¦":{"x_min":343,"x_max":449,"ha":792,"o":"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"/":{"x_min":183.25,"x_max":608.328125,"ha":792,"o":"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 "},"Τ":{"x_min":-0.4375,"x_max":777.453125,"ha":839,"o":"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 "},"y":{"x_min":0,"x_max":684.78125,"ha":771,"o":"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 "},"Π":{"x_min":0,"x_max":803,"ha":917,"o":"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 "},"ΐ":{"x_min":-111,"x_max":339,"ha":361,"o":"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 "},"g":{"x_min":0,"x_max":686,"ha":838,"o":"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 "},"²":{"x_min":0,"x_max":442,"ha":539,"o":"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 "},"–":{"x_min":0,"x_max":705.5625,"ha":803,"o":"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},"Κ":{"x_min":0,"x_max":819.5625,"ha":893,"o":"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},"ƒ":{"x_min":-46.265625,"x_max":392,"ha":513,"o":"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 "},"e":{"x_min":0,"x_max":714,"ha":813,"o":"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 "},"ό":{"x_min":0,"x_max":712,"ha":815,"o":"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 "},"J":{"x_min":0,"x_max":588,"ha":699,"o":"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 "},"»":{"x_min":-1,"x_max":503,"ha":601,"o":"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 "},"©":{"x_min":-3,"x_max":1008,"ha":1106,"o":"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 "},"ώ":{"x_min":0,"x_max":922,"ha":1030,"o":"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 "},"^":{"x_min":193.0625,"x_max":598.609375,"ha":792,"o":"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 "},"«":{"x_min":0,"x_max":507.203125,"ha":604,"o":"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 "},"D":{"x_min":0,"x_max":828,"ha":935,"o":"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 "},"∙":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},"ÿ":{"x_min":0,"x_max":47,"ha":125,"o":"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 "},"w":{"x_min":0,"x_max":1009.71875,"ha":1100,"o":"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 "},"$":{"x_min":0,"x_max":700,"ha":793,"o":"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 "},"\\":{"x_min":-0.015625,"x_max":425.0625,"ha":522,"o":"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 "},"µ":{"x_min":0,"x_max":697.21875,"ha":747,"o":"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 "},"Ι":{"x_min":42,"x_max":181,"ha":297,"o":"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 "},"Ύ":{"x_min":0,"x_max":1144.5,"ha":1214,"o":"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"’":{"x_min":0,"x_max":139,"ha":236,"o":"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},"Ν":{"x_min":0,"x_max":801,"ha":915,"o":"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 "},"-":{"x_min":8.71875,"x_max":350.390625,"ha":478,"o":"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 "},"Q":{"x_min":0,"x_max":968,"ha":1072,"o":"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 "},"ς":{"x_min":1,"x_max":676.28125,"ha":740,"o":"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 "},"M":{"x_min":0,"x_max":954,"ha":1067,"o":"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 "},"Ψ":{"x_min":0,"x_max":1006,"ha":1094,"o":"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 "},"C":{"x_min":0,"x_max":886,"ha":944,"o":"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 "},"!":{"x_min":0,"x_max":138,"ha":236,"o":"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 "},"{":{"x_min":0,"x_max":480.5625,"ha":578,"o":"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 "},"X":{"x_min":-0.015625,"x_max":854.15625,"ha":940,"o":"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 "},"#":{"x_min":0,"x_max":963.890625,"ha":1061,"o":"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 "},"ι":{"x_min":42,"x_max":284,"ha":361,"o":"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 "},"Ά":{"x_min":0,"x_max":906.953125,"ha":982,"o":"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},")":{"x_min":0,"x_max":318,"ha":415,"o":"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 "},"ε":{"x_min":0,"x_max":634.71875,"ha":714,"o":"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 "},"Δ":{"x_min":0,"x_max":952.78125,"ha":1028,"o":"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 "},"}":{"x_min":0,"x_max":481,"ha":578,"o":"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 "},"‰":{"x_min":-3,"x_max":1672,"ha":1821,"o":"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 "},"a":{"x_min":0,"x_max":698.609375,"ha":794,"o":"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 "},"—":{"x_min":0,"x_max":941.671875,"ha":1039,"o":"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 "},"=":{"x_min":8.71875,"x_max":780.953125,"ha":792,"o":"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 "},"N":{"x_min":0,"x_max":801,"ha":914,"o":"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 "},"ρ":{"x_min":0,"x_max":712,"ha":797,"o":"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 "},"2":{"x_min":59,"x_max":731,"ha":792,"o":"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 "},"¯":{"x_min":0,"x_max":941.671875,"ha":938,"o":"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 "},"Z":{"x_min":0,"x_max":779,"ha":849,"o":"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 "},"u":{"x_min":0,"x_max":617,"ha":729,"o":"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 "},"k":{"x_min":0,"x_max":612.484375,"ha":697,"o":"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 "},"Η":{"x_min":0,"x_max":803,"ha":917,"o":"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},"Α":{"x_min":0,"x_max":906.953125,"ha":985,"o":"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},"s":{"x_min":0,"x_max":604,"ha":697,"o":"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 "},"B":{"x_min":0,"x_max":778,"ha":876,"o":"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 "},"…":{"x_min":0,"x_max":614,"ha":708,"o":"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 "},"?":{"x_min":0,"x_max":607,"ha":704,"o":"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 "},"H":{"x_min":0,"x_max":803,"ha":915,"o":"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},"ν":{"x_min":0,"x_max":675,"ha":761,"o":"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 "},"c":{"x_min":1,"x_max":701.390625,"ha":775,"o":"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 "},"¶":{"x_min":0,"x_max":566.671875,"ha":678,"o":"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 "},"β":{"x_min":0,"x_max":660,"ha":745,"o":"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 "},"Μ":{"x_min":0,"x_max":954,"ha":1068,"o":"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 "},"Ό":{"x_min":0.109375,"x_max":1120,"ha":1217,"o":"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"Ή":{"x_min":0,"x_max":1158,"ha":1275,"o":"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"•":{"x_min":0,"x_max":663.890625,"ha":775,"o":"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 "},"¥":{"x_min":0.1875,"x_max":819.546875,"ha":886,"o":"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 "},"(":{"x_min":0,"x_max":318.0625,"ha":415,"o":"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 "},"U":{"x_min":0,"x_max":796,"ha":904,"o":"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 "},"γ":{"x_min":0.5,"x_max":744.953125,"ha":822,"o":"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 "},"α":{"x_min":0,"x_max":765.5625,"ha":809,"o":"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 "},"F":{"x_min":0,"x_max":683.328125,"ha":717,"o":"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 "},"­":{"x_min":0,"x_max":705.5625,"ha":803,"o":"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},":":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},"Χ":{"x_min":0,"x_max":854.171875,"ha":935,"o":"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 "},"*":{"x_min":116,"x_max":674,"ha":792,"o":"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 "},"†":{"x_min":0,"x_max":777,"ha":835,"o":"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 "},"°":{"x_min":0,"x_max":347,"ha":444,"o":"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 "},"V":{"x_min":0,"x_max":862.71875,"ha":940,"o":"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 "},"Ξ":{"x_min":0,"x_max":734.71875,"ha":763,"o":"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 "}," ":{"x_min":0,"x_max":0,"ha":853},"Ϋ":{"x_min":0.328125,"x_max":819.515625,"ha":889,"o":"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 "},"0":{"x_min":73,"x_max":715,"ha":792,"o":"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 "},"”":{"x_min":0,"x_max":347,"ha":454,"o":"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 "},"@":{"x_min":0,"x_max":1260,"ha":1357,"o":"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 "},"Ί":{"x_min":0,"x_max":499,"ha":613,"o":"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 "},"i":{"x_min":14,"x_max":136,"ha":275,"o":"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 "},"Β":{"x_min":0,"x_max":778,"ha":877,"o":"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 "},"υ":{"x_min":0,"x_max":617,"ha":725,"o":"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 "},"]":{"x_min":0,"x_max":275,"ha":372,"o":"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 "},"m":{"x_min":0,"x_max":1019,"ha":1128,"o":"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 "},"χ":{"x_min":8.328125,"x_max":780.5625,"ha":815,"o":"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 "},"8":{"x_min":55,"x_max":736,"ha":792,"o":"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 "},"ί":{"x_min":42,"x_max":326.71875,"ha":361,"o":"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 "},"Ζ":{"x_min":0,"x_max":779.171875,"ha":850,"o":"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 "},"R":{"x_min":0,"x_max":781.953125,"ha":907,"o":"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 "},"o":{"x_min":0,"x_max":713,"ha":821,"o":"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 "},"5":{"x_min":54.171875,"x_max":738,"ha":792,"o":"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 "},"7":{"x_min":58.71875,"x_max":730.953125,"ha":792,"o":"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 "},"K":{"x_min":0,"x_max":819.46875,"ha":906,"o":"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},",":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 "},"d":{"x_min":0,"x_max":683,"ha":796,"o":"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 "},"¨":{"x_min":-109,"x_max":247,"ha":232,"o":"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 "},"E":{"x_min":0,"x_max":736.109375,"ha":789,"o":"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"Y":{"x_min":0,"x_max":820,"ha":886,"o":"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 "},"\"":{"x_min":0,"x_max":299,"ha":396,"o":"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"‹":{"x_min":17.984375,"x_max":773.609375,"ha":792,"o":"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"„":{"x_min":0,"x_max":364,"ha":467,"o":"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 "},"δ":{"x_min":1,"x_max":710,"ha":810,"o":"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 "},"έ":{"x_min":0,"x_max":634.71875,"ha":714,"o":"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 "},"ω":{"x_min":0,"x_max":922,"ha":1031,"o":"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 "},"´":{"x_min":0,"x_max":96,"ha":251,"o":"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"±":{"x_min":11,"x_max":781,"ha":792,"o":"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 "},"|":{"x_min":343,"x_max":449,"ha":792,"o":"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"ϋ":{"x_min":0,"x_max":617,"ha":725,"o":"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 "},"§":{"x_min":0,"x_max":593,"ha":690,"o":"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 "},"b":{"x_min":0,"x_max":685,"ha":783,"o":"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 "},"q":{"x_min":0,"x_max":683,"ha":876,"o":"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 "},"Ω":{"x_min":-0.171875,"x_max":969.5625,"ha":1068,"o":"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 "},"ύ":{"x_min":0,"x_max":617,"ha":725,"o":"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 "},"z":{"x_min":-0.015625,"x_max":613.890625,"ha":697,"o":"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 "},"™":{"x_min":0,"x_max":894,"ha":1000,"o":"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 "},"ή":{"x_min":0.78125,"x_max":697,"ha":810,"o":"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 "},"Θ":{"x_min":0,"x_max":960,"ha":1056,"o":"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 "},"®":{"x_min":-3,"x_max":1008,"ha":1106,"o":"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 "},"~":{"x_min":0,"x_max":833,"ha":931,"o":"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 "},"Ε":{"x_min":0,"x_max":736.21875,"ha":778,"o":"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"³":{"x_min":0,"x_max":450,"ha":547,"o":"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 "},"[":{"x_min":0,"x_max":273.609375,"ha":371,"o":"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 "},"L":{"x_min":0,"x_max":645.828125,"ha":696,"o":"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 "},"σ":{"x_min":0,"x_max":803.390625,"ha":894,"o":"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 "},"ζ":{"x_min":0,"x_max":573,"ha":642,"o":"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 "},"θ":{"x_min":0,"x_max":674,"ha":778,"o":"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 "},"Ο":{"x_min":0,"x_max":958,"ha":1054,"o":"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 "},"Γ":{"x_min":0,"x_max":705.28125,"ha":749,"o":"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 "}," ":{"x_min":0,"x_max":0,"ha":375},"%":{"x_min":-3,"x_max":1089,"ha":1186,"o":"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 "},"P":{"x_min":0,"x_max":726,"ha":806,"o":"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 "},"Έ":{"x_min":0,"x_max":1078.21875,"ha":1118,"o":"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"Ώ":{"x_min":0.125,"x_max":1136.546875,"ha":1235,"o":"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 "},"_":{"x_min":0,"x_max":705.5625,"ha":803,"o":"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 "},"Ϊ":{"x_min":-110,"x_max":246,"ha":275,"o":"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 "},"+":{"x_min":23,"x_max":768,"ha":792,"o":"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 "},"½":{"x_min":0,"x_max":1050,"ha":1149,"o":"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 "},"Ρ":{"x_min":0,"x_max":720,"ha":783,"o":"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 "},"'":{"x_min":0,"x_max":139,"ha":236,"o":"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},"ª":{"x_min":0,"x_max":350,"ha":397,"o":"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 "},"΅":{"x_min":0,"x_max":450,"ha":553,"o":"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 "},"T":{"x_min":0,"x_max":777,"ha":835,"o":"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 "},"Φ":{"x_min":0,"x_max":915,"ha":997,"o":"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 "},"⁋":{"x_min":0,"x_max":0,"ha":694},"j":{"x_min":-77.78125,"x_max":167,"ha":349,"o":"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 "},"Σ":{"x_min":0,"x_max":756.953125,"ha":819,"o":"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 "},"1":{"x_min":215.671875,"x_max":574,"ha":792,"o":"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 "},"›":{"x_min":18.0625,"x_max":774,"ha":792,"o":"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"<":{"x_min":17.984375,"x_max":773.609375,"ha":792,"o":"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"£":{"x_min":0,"x_max":704.484375,"ha":801,"o":"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 "},"t":{"x_min":0,"x_max":367,"ha":458,"o":"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 "},"¬":{"x_min":0,"x_max":706,"ha":803,"o":"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 "},"λ":{"x_min":0,"x_max":750,"ha":803,"o":"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 "},"W":{"x_min":0,"x_max":1263.890625,"ha":1351,"o":"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 "},">":{"x_min":18.0625,"x_max":774,"ha":792,"o":"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"v":{"x_min":0,"x_max":675.15625,"ha":761,"o":"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 "},"τ":{"x_min":0.28125,"x_max":644.5,"ha":703,"o":"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 "},"ξ":{"x_min":0,"x_max":624.9375,"ha":699,"o":"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 "},"&":{"x_min":-3,"x_max":894.25,"ha":992,"o":"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 "},"Λ":{"x_min":0,"x_max":862.5,"ha":942,"o":"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 "},"I":{"x_min":41,"x_max":180,"ha":293,"o":"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 "},"G":{"x_min":0,"x_max":921,"ha":1011,"o":"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 "},"ΰ":{"x_min":0,"x_max":617,"ha":725,"o":"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 "},"`":{"x_min":0,"x_max":138.890625,"ha":236,"o":"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 "},"·":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},"Υ":{"x_min":0.328125,"x_max":819.515625,"ha":889,"o":"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 "},"r":{"x_min":0,"x_max":355.5625,"ha":432,"o":"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 "},"x":{"x_min":0,"x_max":675,"ha":764,"o":"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 "},"μ":{"x_min":0,"x_max":696.609375,"ha":747,"o":"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 "},"h":{"x_min":0,"x_max":615,"ha":724,"o":"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 "},".":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},"φ":{"x_min":-2,"x_max":878,"ha":974,"o":"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 "},";":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 "},"f":{"x_min":0,"x_max":378,"ha":472,"o":"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 "},"“":{"x_min":1,"x_max":348.21875,"ha":454,"o":"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 "},"A":{"x_min":0.03125,"x_max":906.953125,"ha":1008,"o":"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 "},"6":{"x_min":53,"x_max":739,"ha":792,"o":"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 "},"‘":{"x_min":1,"x_max":139.890625,"ha":236,"o":"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 "},"ϊ":{"x_min":-70,"x_max":283,"ha":361,"o":"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 "},"π":{"x_min":-0.21875,"x_max":773.21875,"ha":857,"o":"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 "},"ά":{"x_min":0,"x_max":765.5625,"ha":809,"o":"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 "},"O":{"x_min":0,"x_max":958,"ha":1057,"o":"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 "},"n":{"x_min":0,"x_max":615,"ha":724,"o":"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 "},"3":{"x_min":54,"x_max":737,"ha":792,"o":"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 "},"9":{"x_min":53,"x_max":739,"ha":792,"o":"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 "},"l":{"x_min":41,"x_max":166,"ha":279,"o":"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 "},"¤":{"x_min":40.09375,"x_max":728.796875,"ha":825,"o":"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 "},"κ":{"x_min":0,"x_max":632.328125,"ha":679,"o":"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 "},"4":{"x_min":48,"x_max":742.453125,"ha":792,"o":"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 "},"p":{"x_min":0,"x_max":685,"ha":786,"o":"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 "},"‡":{"x_min":0,"x_max":777,"ha":835,"o":"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 "},"ψ":{"x_min":0,"x_max":808,"ha":907,"o":"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 "},"η":{"x_min":0.78125,"x_max":697,"ha":810,"o":"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 "}},"cssFontWeight":"normal","ascender":1189,"underlinePosition":-100,"cssFontStyle":"normal","boundingBox":{"yMin":-334,"xMin":-111,"yMax":1189,"xMax":1672},"resolution":1000,"original_font_information":{"postscript_name":"Helvetiker-Regular","version_string":"Version 1.00 2004 initial release","vendor_url":"http://www.magenta.gr/","full_font_name":"Helvetiker","font_family_name":"Helvetiker","copyright":"Copyright (c) Μagenta ltd, 2004","description":"","trademark":"","designer":"","designer_url":"","unique_font_identifier":"Μagenta ltd:Helvetiker:22-10-104","license_url":"http://www.ellak.gr/fonts/MgOpen/license.html","license_description":"Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license (\"Fonts\") and associated documentation files (the \"Font Software\"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \r\n\r\nThe above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\r\n\r\nThe Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word \"MgOpen\", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\r\n\r\nThis License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the \"MgOpen\" name.\r\n\r\nThe Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \r\n\r\nTHE FONT SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.","manufacturer_name":"Μagenta ltd","font_sub_family_name":"Regular"},"descender":-334,"familyName":"Helvetiker","lineHeight":1522,"underlineThickness":50} \ No newline at end of file diff --git a/node_modules/three/examples/fonts/optimer_bold.typeface.json b/node_modules/three/examples/fonts/optimer_bold.typeface.json new file mode 100644 index 0000000..080aac4 --- /dev/null +++ b/node_modules/three/examples/fonts/optimer_bold.typeface.json @@ -0,0 +1 @@ +{"glyphs":{"ο":{"x_min":30,"x_max":741,"ha":774,"o":"m 395 683 q 645 587 550 683 q 741 337 741 492 q 646 79 741 173 q 385 -15 552 -15 q 127 78 225 -15 q 30 333 30 172 q 129 590 30 498 q 395 683 228 683 m 269 174 q 305 85 275 119 q 386 52 335 52 q 464 85 436 52 q 503 172 491 119 q 510 237 506 194 q 515 336 515 279 q 510 431 515 391 q 503 494 506 472 q 464 581 491 548 q 385 615 436 615 q 291 563 315 615 q 261 459 267 512 q 256 333 256 407 q 269 174 256 248 "},"S":{"x_min":55,"x_max":687,"ha":742,"o":"m 95 251 l 116 251 q 188 116 145 158 q 322 75 231 75 q 438 113 385 75 q 491 211 491 151 q 382 350 491 294 q 168 461 273 407 q 55 664 55 539 q 159 875 55 801 q 409 949 264 949 q 653 891 535 949 q 622 805 635 848 q 598 712 609 762 l 583 712 q 509 818 559 779 q 391 857 459 857 q 283 827 328 857 q 238 738 238 797 q 349 609 238 666 q 570 497 461 551 q 687 295 687 416 q 570 62 687 143 q 292 -18 453 -18 q 171 -8 229 -18 q 55 26 113 1 q 72 116 64 68 q 95 251 80 165 "},"/":{"x_min":-32.953125,"x_max":420,"ha":383,"o":"m 339 1023 l 420 1024 l 47 -126 l -32 -126 l 339 1023 "},"Τ":{"x_min":8,"x_max":738,"ha":749,"o":"m 493 818 q 490 723 493 790 q 487 652 487 656 q 490 427 487 529 q 498 201 494 326 q 503 0 503 77 q 438 2 482 0 q 374 5 395 5 q 317 3 351 5 q 244 0 284 1 q 252 266 244 88 q 261 476 261 444 q 258 670 261 533 q 255 818 255 808 q 158 815 188 818 q 8 801 128 813 l 12 872 l 8 932 q 198 927 70 932 q 373 922 327 922 q 572 927 445 922 q 738 932 700 932 l 733 870 l 738 801 q 493 818 614 818 "},"ϕ":{"x_min":32,"x_max":997,"ha":1028,"o":"m 418 -6 q 146 79 261 -6 q 32 322 32 165 q 143 560 32 474 q 418 664 254 646 q 411 819 418 715 q 404 978 404 923 q 483 970 445 970 q 622 977 556 970 q 616 829 622 938 q 611 664 611 719 q 882 573 768 664 q 997 328 997 483 q 886 90 997 171 q 611 -6 776 9 q 616 -197 611 -68 q 622 -374 622 -326 l 544 -365 q 471 -366 503 -365 q 404 -373 438 -368 q 411 -183 404 -315 q 418 -6 418 -51 m 611 328 l 611 61 q 742 147 704 72 q 780 328 780 222 q 741 510 780 433 q 612 601 703 588 l 611 328 m 418 601 q 287 510 326 588 q 249 328 249 433 q 286 147 249 223 q 416 61 324 72 l 418 328 l 418 601 "},"y":{"x_min":0,"x_max":669.453125,"ha":653,"o":"m 269 -16 l 76 481 q 37 579 58 529 q 0 667 16 629 q 66 664 22 667 q 134 661 111 661 q 201 664 154 661 q 251 667 248 667 q 308 465 277 561 q 380 256 338 368 l 452 463 q 482 562 462 493 q 512 667 502 631 l 577 661 q 623 664 593 661 q 669 667 654 667 q 438 139 536 375 q 244 -373 341 -97 q 165 -368 206 -368 q 132 -368 145 -368 q 86 -373 119 -368 q 145 -277 119 -323 q 195 -176 170 -230 l 269 -16 "},"≈":{"x_min":118.0625,"x_max":1019.453125,"ha":1139,"o":"m 1019 527 q 894 458 956 483 q 766 433 831 433 q 570 477 698 433 q 373 522 443 522 q 238 489 297 522 q 118 417 179 457 l 118 563 q 254 632 187 607 q 391 658 320 658 q 577 614 450 658 q 761 571 704 571 q 886 596 826 571 q 1019 671 945 622 l 1019 527 m 1019 251 q 892 182 952 207 q 766 158 831 158 q 568 202 697 158 q 373 246 440 246 q 251 219 308 246 q 118 140 194 192 l 118 286 q 252 358 187 331 q 387 385 318 385 q 575 339 447 385 q 761 294 704 294 q 886 321 825 294 q 1019 397 947 348 l 1019 251 "},"Π":{"x_min":91,"x_max":957,"ha":1049,"o":"m 105 284 l 105 461 q 102 651 105 534 q 99 784 99 768 l 91 932 q 210 926 129 932 q 331 921 290 921 l 711 921 q 833 926 751 921 q 957 932 915 932 q 948 692 957 857 q 939 465 939 527 q 942 221 939 315 q 957 0 945 127 l 829 5 q 756 2 808 5 q 698 0 703 0 q 707 63 704 33 q 710 130 710 93 l 713 504 l 710 813 l 515 818 l 336 813 q 333 643 336 762 q 331 516 331 523 l 336 130 q 345 0 336 59 q 278 2 322 0 q 215 5 234 5 l 91 0 q 98 146 91 40 q 105 284 105 252 "},"ΐ":{"x_min":-147,"x_max":552,"ha":396,"o":"m 92 126 l 92 543 l 80 666 q 139 661 105 663 q 197 658 173 658 q 265 660 239 658 q 315 666 292 663 q 305 586 308 616 q 302 523 302 557 l 302 113 q 303 72 302 88 q 315 0 305 56 l 196 4 l 82 0 q 88 67 85 30 q 92 126 92 104 m -65 961 q -7 935 -31 961 q 17 877 17 909 q -8 820 17 844 q -65 797 -33 797 q -121 820 -96 797 q -147 879 -147 844 q -123 935 -147 910 q -65 961 -99 961 m 275 1017 q 316 998 298 1017 q 334 957 334 980 q 321 919 334 935 q 283 886 307 903 l 94 755 l 36 755 l 182 950 q 225 998 204 980 q 275 1017 247 1017 m 470 961 q 528 935 504 961 q 552 877 552 910 q 528 820 552 844 q 471 797 504 797 q 413 820 438 797 q 388 879 388 844 q 412 936 388 912 q 470 961 436 961 "},"g":{"x_min":23,"x_max":714.671875,"ha":700,"o":"m 213 272 q 93 331 142 278 q 45 456 45 384 q 128 623 45 563 q 322 683 211 683 l 382 683 l 534 664 l 606 660 q 666 662 641 660 q 714 666 692 665 l 714 585 l 581 589 q 623 543 610 570 q 637 477 637 515 q 541 300 637 353 q 310 248 446 248 q 258 236 281 248 q 236 199 236 225 q 386 142 236 150 q 623 102 536 134 q 711 -68 711 71 q 591 -296 711 -218 q 313 -374 471 -374 q 111 -326 199 -374 q 23 -175 23 -279 q 63 -64 23 -110 q 171 -7 104 -19 l 171 0 q 103 39 130 7 q 76 112 76 70 q 117 201 76 163 q 213 251 159 239 l 213 272 m 169 -143 q 221 -255 169 -215 q 351 -295 274 -295 q 483 -254 427 -295 q 540 -139 540 -214 q 524 -81 540 -107 q 472 -40 508 -54 q 383 -19 437 -25 q 269 -13 330 -13 l 239 -12 q 169 -143 169 -54 m 332 304 q 411 351 392 304 q 431 472 431 399 q 413 581 431 536 q 341 626 395 626 q 267 578 287 626 q 247 466 247 530 q 262 350 247 396 q 332 304 277 304 "},"²":{"x_min":22,"x_max":465.0625,"ha":494,"o":"m 22 401 q 156 502 102 456 q 248 607 210 548 q 287 742 287 667 q 267 825 287 802 q 216 848 248 848 q 146 816 167 848 q 110 725 126 785 l 102 725 l 30 800 q 245 901 116 901 q 385 864 327 901 q 444 751 444 827 q 411 643 444 681 q 201 471 378 604 l 284 471 q 387 473 314 471 q 465 476 459 476 q 456 413 456 439 q 459 383 456 401 q 465 354 462 365 q 331 356 412 354 q 249 358 251 358 l 27 354 l 22 401 "},"Κ":{"x_min":90,"x_max":892.78125,"ha":856,"o":"m 334 716 l 334 515 l 569 787 q 635 866 619 845 q 682 932 651 886 l 767 926 q 817 929 784 926 q 870 932 851 932 q 687 746 790 851 q 503 554 585 641 l 623 377 q 892 0 753 179 l 753 5 q 664 2 727 5 q 595 0 600 0 q 484 190 545 98 q 334 404 424 281 l 334 193 q 348 0 334 94 q 270 2 325 0 q 212 5 215 5 l 90 0 q 99 236 90 69 q 108 461 108 402 q 103 623 108 515 q 99 787 99 731 l 90 932 q 157 927 113 932 q 219 922 201 922 q 282 925 252 922 q 342 932 312 927 q 338 831 342 907 q 334 716 334 755 "},"ë":{"x_min":41,"x_max":684.046875,"ha":729,"o":"m 482 98 q 566 112 532 98 q 643 160 600 126 l 661 151 q 643 96 652 125 q 628 40 634 66 q 521 -1 577 11 q 403 -15 466 -15 q 141 79 241 -15 q 41 336 41 173 q 137 586 41 490 q 386 683 234 683 q 608 601 532 683 q 684 373 684 520 l 684 332 l 267 332 q 325 165 267 232 q 482 98 383 98 m 233 976 q 300 948 272 976 q 328 878 328 920 q 303 811 328 839 q 236 784 278 784 q 166 811 194 784 q 138 878 138 838 q 166 947 138 918 q 233 976 194 976 m 493 976 q 560 948 532 976 q 588 878 588 920 q 562 811 588 838 q 496 784 536 784 q 427 811 455 784 q 399 878 399 838 q 426 946 399 917 q 493 976 454 976 m 478 411 q 481 444 481 422 q 459 566 481 513 q 377 620 438 620 q 292 562 318 620 q 267 437 267 505 l 267 411 l 478 411 "},"e":{"x_min":43,"x_max":686.046875,"ha":729,"o":"m 484 95 q 566 110 531 95 q 644 161 601 125 l 662 154 q 640 84 647 105 q 629 40 634 62 q 522 -1 577 11 q 404 -15 468 -15 q 141 77 240 -15 q 43 336 43 170 q 138 585 43 488 q 387 683 234 683 q 609 602 533 683 q 686 375 686 522 l 684 332 l 269 332 q 326 162 269 230 q 484 95 384 95 m 480 411 l 482 444 q 459 567 482 513 q 379 622 437 622 q 293 565 318 622 q 269 438 269 509 l 269 411 l 480 411 "},"ό":{"x_min":30,"x_max":741,"ha":774,"o":"m 395 683 q 645 587 550 683 q 741 337 741 492 q 646 79 741 173 q 385 -15 552 -15 q 127 78 225 -15 q 30 333 30 172 q 129 590 30 498 q 395 683 228 683 m 538 953 q 591 1001 571 986 q 639 1017 611 1017 q 692 994 671 1017 q 713 943 713 972 q 694 897 713 915 q 643 863 675 878 l 420 755 l 352 755 l 538 953 m 269 174 q 305 85 275 119 q 386 52 335 52 q 464 85 436 52 q 503 172 491 119 q 510 237 506 194 q 515 336 515 279 q 510 431 515 391 q 503 494 506 472 q 464 581 491 548 q 385 615 436 615 q 291 563 315 615 q 261 459 267 512 q 256 333 256 407 q 269 174 256 248 "},"J":{"x_min":-37,"x_max":356,"ha":447,"o":"m 214 926 q 293 929 237 926 q 356 932 349 932 q 349 680 356 857 q 342 450 342 502 q 344 314 342 411 q 346 213 346 218 l 346 105 q 249 -128 346 -36 q 10 -221 153 -221 l -24 -216 l -37 -143 l 13 -145 q 97 -94 76 -145 q 118 28 118 -44 l 118 219 q 110 619 118 352 q 103 931 103 886 l 214 926 "},"»":{"x_min":54.5625,"x_max":587.890625,"ha":629,"o":"m 187 330 l 54 604 l 110 656 l 339 333 l 110 9 l 54 66 l 187 330 m 437 330 l 304 604 l 358 656 l 587 333 l 358 9 l 304 66 l 437 330 "},"©":{"x_min":72,"x_max":1064,"ha":1138,"o":"m 1064 486 q 918 139 1064 285 q 570 -6 772 -6 q 220 139 369 -6 q 72 488 72 285 q 219 836 72 688 q 568 985 367 985 q 916 836 769 985 q 1064 486 1064 687 m 155 490 q 276 199 155 323 q 566 75 398 75 q 858 197 734 75 q 982 487 982 319 q 861 781 982 659 q 567 904 740 904 q 276 781 398 904 q 155 490 155 658 m 683 597 q 649 666 683 637 q 573 696 616 696 q 470 636 501 696 q 439 499 439 577 q 468 354 439 421 q 563 288 497 288 q 687 397 664 288 l 815 397 q 735 247 805 303 q 570 191 666 191 q 374 273 448 191 q 301 481 301 356 q 371 696 301 604 q 559 788 441 788 q 726 737 655 788 q 808 597 796 686 l 683 597 "},"ώ":{"x_min":30,"x_max":1059,"ha":1093,"o":"m 335 -15 q 111 79 192 -15 q 30 320 30 173 q 72 504 30 420 q 192 666 114 588 q 297 661 237 661 q 347 663 319 661 q 390 666 374 665 q 247 280 247 498 q 269 123 247 194 q 358 52 291 52 q 421 86 399 52 q 443 165 443 121 l 443 291 q 441 415 443 379 q 435 512 440 451 q 511 505 499 505 q 544 505 522 505 q 608 508 579 505 q 657 512 636 511 q 648 402 652 465 q 644 289 644 340 q 644 237 644 258 q 650 165 644 215 q 669 85 650 119 q 730 52 688 52 q 821 122 798 52 q 844 279 844 192 q 807 481 844 386 q 700 666 771 576 q 746 662 724 663 q 793 661 767 661 q 846 663 812 661 q 898 666 881 666 q 1016 508 974 594 q 1059 322 1059 422 q 974 83 1059 182 q 753 -15 890 -15 q 630 13 685 -15 q 545 100 575 41 q 459 14 516 44 q 335 -15 402 -15 m 684 953 q 737 1001 717 986 q 786 1017 757 1017 q 838 994 817 1017 q 859 943 859 972 q 840 897 859 915 q 790 863 821 878 l 567 755 l 498 755 l 684 953 "},"≥":{"x_min":170.828125,"x_max":965,"ha":1139,"o":"m 965 571 l 965 455 l 173 199 l 173 338 l 732 514 l 173 690 l 173 830 l 965 571 m 965 132 l 965 0 l 170 0 l 170 132 l 965 132 "},"^":{"x_min":-3,"x_max":425,"ha":438,"o":"m 148 1003 l 270 1003 l 425 755 l 357 755 l 210 878 l 62 755 l -3 755 l 148 1003 "},"«":{"x_min":40.28125,"x_max":575,"ha":629,"o":"m 193 336 l 326 62 l 272 9 l 40 333 l 272 656 l 325 599 l 193 336 m 443 336 l 575 62 l 520 9 l 288 333 l 520 656 l 575 599 l 443 336 "},"D":{"x_min":87,"x_max":987,"ha":1032,"o":"m 104 221 l 104 465 q 100 742 104 650 q 89 932 97 834 l 216 929 l 283 929 l 442 929 q 532 929 488 929 q 622 929 576 929 q 894 797 802 912 q 987 496 987 682 q 832 110 987 221 q 389 -1 677 -1 l 201 -1 l 87 -1 q 98 119 93 60 q 104 221 104 178 m 415 89 q 659 192 580 89 q 738 468 738 296 q 663 746 738 653 q 407 839 588 839 l 334 839 l 330 605 l 334 98 q 374 91 353 94 q 415 89 394 89 "},"w":{"x_min":6.9375,"x_max":1048.625,"ha":1042,"o":"m 302 6 q 270 5 281 6 q 215 0 258 4 l 6 667 q 77 663 33 667 q 129 659 120 659 q 197 663 154 659 q 248 667 240 667 q 359 238 293 457 l 440 505 l 484 667 q 540 663 502 667 q 580 659 577 659 q 637 663 598 659 q 677 667 676 667 q 712 520 695 586 q 748 383 729 454 l 790 238 l 855 475 q 875 555 862 501 q 899 667 888 609 q 939 662 917 665 q 973 659 961 659 q 1017 662 998 659 q 1048 667 1036 665 l 956 423 l 812 0 q 759 4 776 3 q 727 6 743 6 q 678 3 712 6 q 643 0 644 0 l 562 288 l 522 423 q 391 0 455 221 q 336 4 354 3 q 302 6 318 6 "},"$":{"x_min":43,"x_max":697,"ha":749,"o":"m 43 79 q 104 254 76 165 l 128 254 q 202 128 150 177 q 331 79 254 79 l 331 365 q 108 474 168 409 q 49 623 49 539 q 130 807 49 737 q 331 889 211 878 q 322 1010 331 949 q 344 1006 329 1008 q 371 1002 360 1004 q 393 1004 382 1004 q 417 1010 403 1005 q 410 955 412 983 q 409 892 409 926 q 555 868 502 880 q 662 823 607 855 q 601 665 626 746 l 570 665 q 409 817 538 789 l 409 554 q 637 445 577 511 q 697 289 697 379 q 615 91 697 168 q 409 0 534 15 l 409 -62 q 409 -97 409 -84 q 411 -136 410 -109 l 368 -133 l 325 -136 q 328 -69 328 -112 q 331 0 329 -26 q 43 79 173 0 m 331 817 q 243 778 278 817 q 209 686 209 739 q 245 615 209 644 q 331 577 282 586 l 331 817 m 534 212 q 499 299 534 267 q 405 347 464 330 l 405 78 q 497 123 461 89 q 534 212 534 157 "},"‧":{"x_min":105,"x_max":343,"ha":447,"o":"m 223 654 q 306 617 270 654 q 343 533 343 581 q 306 451 343 486 q 223 417 270 417 q 139 450 174 417 q 105 534 105 483 q 139 619 105 584 q 223 654 174 654 "},"\\":{"x_min":-31.953125,"x_max":422,"ha":383,"o":"m -31 1024 l 49 1024 l 422 -126 l 338 -126 l -31 1024 "},"Ι":{"x_min":94,"x_max":354,"ha":447,"o":"m 111 402 q 107 716 111 609 q 94 932 103 822 q 161 925 124 929 q 220 922 198 922 q 292 927 245 922 q 353 931 339 932 q 340 716 343 819 q 337 465 337 613 q 340 221 337 326 q 354 0 344 116 q 273 2 330 0 q 214 5 216 5 l 95 0 q 107 199 103 88 q 111 402 111 311 "},"Ύ":{"x_min":-28,"x_max":1295.609375,"ha":1247,"o":"m 635 650 q 566 772 622 672 q 469 931 509 872 l 591 926 q 683 929 619 926 q 755 931 748 931 q 844 740 803 825 q 941 554 885 656 q 1040 730 991 636 q 1135 931 1088 825 l 1210 926 q 1252 929 1224 926 q 1295 931 1280 931 q 1142 689 1213 812 q 997 420 1072 566 l 1001 143 l 1007 0 l 913 5 l 755 0 q 761 138 755 50 q 768 237 768 226 l 768 402 l 635 650 m 158 953 q 211 1001 191 986 q 259 1017 231 1017 q 312 994 291 1017 q 333 943 333 972 q 314 897 333 916 q 264 863 295 878 l 40 755 l -28 755 l 158 953 "},"’":{"x_min":70.828125,"x_max":337.5,"ha":374,"o":"m 70 528 l 151 848 q 183 919 158 889 q 244 949 208 949 q 310 924 283 949 q 337 862 337 900 q 331 829 337 845 q 316 797 326 813 l 111 511 l 70 528 "},"Ν":{"x_min":86,"x_max":930.453125,"ha":1010,"o":"m 101 444 q 97 645 101 523 q 94 787 94 768 l 90 931 l 177 926 l 268 934 q 526 623 395 775 q 792 327 657 470 l 792 584 q 787 766 792 643 q 782 931 782 888 q 825 927 811 929 q 854 926 838 926 q 890 927 876 926 q 930 934 904 929 q 919 838 923 889 q 915 738 915 788 q 913 461 915 600 q 911 184 912 322 q 913 106 911 147 q 920 0 915 66 q 876 4 901 2 q 838 6 851 6 q 794 4 812 6 q 756 0 777 2 q 495 309 631 151 q 220 618 359 466 l 220 241 l 227 0 q 194 4 213 1 q 159 6 175 6 q 119 4 134 6 q 86 0 103 2 q 97 208 94 105 q 101 444 101 311 "},"-":{"x_min":58.71875,"x_max":386.5,"ha":447,"o":"m 65 334 q 62 383 65 352 q 58 422 58 415 l 386 422 l 379 333 l 386 247 l 58 247 q 62 296 58 265 q 65 334 65 327 "},"Q":{"x_min":40,"x_max":1098.328125,"ha":1129,"o":"m 40 456 q 190 819 40 689 q 577 949 340 949 q 945 829 804 949 q 1086 486 1086 709 q 1004 185 1086 313 q 759 10 922 56 l 883 -72 q 1098 -182 979 -129 l 1098 -200 q 1005 -241 1053 -216 q 906 -294 956 -265 q 737 -160 824 -226 q 533 -13 649 -94 q 174 110 308 -13 q 40 456 40 233 m 562 72 q 773 193 706 72 q 840 472 840 315 q 773 741 840 623 q 566 860 706 860 q 354 741 421 860 q 287 465 287 622 q 353 192 287 312 q 562 72 420 72 "},"ς":{"x_min":48,"x_max":647,"ha":689,"o":"m 421 600 q 306 538 350 600 q 263 404 263 477 q 357 244 263 304 q 532 151 445 197 q 627 -17 627 88 q 527 -214 627 -140 q 302 -288 427 -288 q 291 -198 302 -247 q 318 -203 296 -198 q 353 -207 341 -207 q 440 -176 402 -207 q 484 -95 478 -145 q 324 60 484 -17 q 106 179 164 139 q 48 353 48 219 q 153 590 48 500 q 409 681 259 681 q 527 666 470 681 q 647 623 584 651 q 616 532 626 561 q 597 465 606 504 l 559 465 q 513 563 546 526 q 421 600 479 600 "},"M":{"x_min":32,"x_max":1165,"ha":1217,"o":"m 105 465 l 168 932 q 211 927 190 929 q 261 926 231 926 q 309 929 277 926 q 358 932 341 932 q 441 709 409 790 q 503 559 473 629 q 608 316 533 488 l 778 690 q 872 932 834 808 q 919 929 887 932 q 966 926 951 926 q 1027 929 1006 926 q 1059 932 1048 932 l 1105 473 q 1130 240 1117 354 q 1165 0 1144 127 q 1095 3 1140 0 q 1041 6 1051 6 q 969 3 1015 6 q 915 0 924 0 q 895 291 915 142 l 865 616 q 731 317 802 480 q 597 0 661 153 l 551 0 l 500 0 q 409 218 465 87 q 317 426 352 349 q 236 605 282 504 l 196 229 q 185 108 190 173 q 180 0 180 44 q 134 3 165 0 q 100 6 102 6 q 60 4 77 6 q 32 0 43 1 q 105 465 77 258 "},"Ψ":{"x_min":84,"x_max":1097.890625,"ha":1185,"o":"m 307 708 q 307 639 307 686 q 307 569 307 593 q 342 407 307 462 q 478 353 377 353 l 480 484 q 472 735 480 568 q 464 932 464 903 q 530 925 494 929 q 587 922 566 922 q 658 927 612 922 q 719 931 705 932 q 712 777 719 877 q 706 666 706 677 l 702 353 q 800 378 761 353 q 853 457 839 404 q 871 582 868 511 q 875 670 875 652 q 868 811 875 720 q 861 931 861 901 q 926 927 881 931 q 984 922 970 922 q 1039 926 1002 922 q 1097 930 1077 930 q 1093 869 1094 904 q 1092 801 1092 834 l 1092 738 l 1092 687 l 1092 610 q 992 354 1092 432 q 702 261 892 277 q 710 126 702 219 q 719 0 719 33 q 646 3 691 0 q 591 6 601 6 q 516 3 562 6 q 464 0 470 0 q 472 134 464 40 q 480 261 480 229 q 188 358 287 261 q 90 651 90 455 l 90 804 l 90 820 q 84 930 90 881 q 139 926 102 930 q 196 922 177 922 q 257 927 219 922 q 322 931 295 931 q 311 813 316 876 q 307 708 307 750 "},"C":{"x_min":43,"x_max":891.84375,"ha":900,"o":"m 587 856 q 363 744 442 856 q 285 479 285 632 q 361 202 285 322 q 586 82 437 82 q 740 108 668 82 q 855 194 812 135 l 877 184 q 861 120 868 152 q 846 45 854 88 q 710 -2 786 12 q 555 -18 634 -18 q 184 109 326 -18 q 43 464 43 236 q 190 819 43 690 q 569 949 338 949 q 723 932 652 949 q 891 876 793 915 q 866 793 879 840 q 846 710 852 746 l 827 710 q 734 818 799 781 q 587 856 669 856 "},"œ":{"x_min":36,"x_max":1154.0625,"ha":1197,"o":"m 387 -15 q 131 79 227 -15 q 36 334 36 173 q 131 586 36 490 q 383 683 226 683 q 630 606 515 683 q 735 664 677 645 q 859 683 792 683 q 1076 600 999 683 q 1154 377 1154 517 l 1152 332 l 736 332 q 793 165 736 232 q 951 98 851 98 q 1111 160 1042 98 l 1127 151 q 1111 101 1116 119 q 1094 40 1105 83 q 990 -1 1049 11 q 870 -15 931 -15 q 735 2 794 -15 q 628 68 676 20 q 521 4 584 23 q 387 -15 458 -15 m 949 411 l 949 445 q 921 580 949 541 q 844 620 893 620 q 756 557 777 620 q 736 411 736 494 l 949 411 m 276 171 q 315 80 286 115 q 395 45 344 45 q 453 62 424 45 q 498 115 481 79 q 520 204 514 151 q 526 329 526 257 q 516 475 526 408 q 476 577 506 542 q 394 612 445 612 q 294 552 327 612 q 271 470 279 520 q 264 329 264 420 q 266 244 264 269 q 276 171 268 219 "},"!":{"x_min":103,"x_max":341,"ha":444,"o":"m 222 221 q 306 187 271 221 q 341 104 341 154 q 306 19 341 54 q 222 -15 271 -15 q 138 19 173 -15 q 103 103 103 53 q 137 186 103 151 q 222 221 172 221 m 113 818 q 142 910 113 872 q 224 949 171 949 q 304 921 274 949 q 334 847 334 894 q 325 741 334 796 q 306 628 317 687 l 276 462 q 253 296 259 369 l 193 296 q 113 818 153 557 "},"ç":{"x_min":36,"x_max":622,"ha":660,"o":"m 423 600 q 306 528 346 600 q 267 373 267 457 q 313 176 267 265 q 459 88 359 88 q 542 99 500 88 q 612 133 584 111 l 622 126 l 590 19 q 502 -6 551 1 q 406 -15 453 -15 q 141 76 247 -15 q 36 325 36 168 q 140 583 36 485 q 408 681 245 681 q 622 637 519 681 q 590 459 602 550 l 565 459 q 519 561 555 522 q 423 600 483 600 m 175 -203 q 276 -231 251 -226 q 332 -236 301 -236 q 381 -223 361 -236 q 402 -184 402 -211 q 384 -144 402 -161 q 341 -128 366 -128 q 319 -130 328 -128 q 301 -135 310 -132 l 301 2 l 358 2 l 358 -77 l 418 -75 q 496 -108 465 -80 q 527 -183 527 -136 q 487 -274 527 -239 q 388 -310 448 -310 q 268 -299 326 -310 q 151 -265 211 -289 l 175 -203 "},"{":{"x_min":104,"x_max":587.328125,"ha":683,"o":"m 587 844 l 540 844 q 468 821 487 844 q 446 785 449 798 q 443 752 443 773 l 443 712 l 443 552 q 416 424 443 464 q 304 353 390 383 q 413 287 383 335 q 443 155 443 238 l 443 -5 q 465 -105 443 -74 q 555 -136 488 -136 l 587 -136 l 587 -277 l 481 -275 q 343 -234 396 -268 q 280 -122 289 -200 l 280 -50 l 280 116 q 246 238 280 194 q 137 283 212 283 l 104 283 l 104 422 q 240 458 201 422 q 280 588 280 494 l 280 756 l 280 831 q 355 951 292 919 q 517 983 417 983 l 587 983 l 587 844 "},"X":{"x_min":-1.390625,"x_max":801.390625,"ha":782,"o":"m 169 241 l 301 436 l 15 932 q 94 929 38 932 q 155 926 150 926 q 235 929 179 926 q 298 932 291 932 q 314 893 308 907 q 358 802 320 880 l 445 638 q 547 805 513 748 q 613 932 581 862 q 655 929 627 932 q 698 926 683 926 q 740 929 712 926 q 783 932 768 932 q 685 800 709 833 q 616 701 661 766 l 502 531 l 801 0 q 713 2 776 0 q 647 5 651 5 l 516 0 l 470 108 l 356 326 q 265 174 316 263 q 170 0 215 84 q 118 3 154 0 q 77 6 81 6 q 31 4 52 6 q -1 0 11 1 l 169 241 "},"ô":{"x_min":32,"x_max":743,"ha":775,"o":"m 395 683 q 647 588 551 683 q 743 337 743 494 q 648 79 743 173 q 387 -15 554 -15 q 129 78 227 -15 q 32 333 32 172 q 130 590 32 497 q 395 683 229 683 m 325 1003 l 450 1003 l 601 755 l 534 755 l 387 878 l 238 755 l 174 755 l 325 1003 m 269 174 q 307 85 277 120 q 387 50 337 50 q 466 84 437 50 q 500 156 494 119 q 511 215 507 194 q 517 335 517 271 q 511 450 517 395 q 500 509 507 471 q 466 582 494 548 q 387 616 439 616 q 294 564 319 616 q 263 459 269 513 q 258 333 258 406 q 260 244 258 270 q 269 174 262 217 "},"#":{"x_min":30,"x_max":1019,"ha":1049,"o":"m 619 974 l 522 698 l 684 698 l 781 974 l 930 975 l 831 698 l 1019 699 l 970 564 l 783 563 l 725 403 l 920 403 l 873 271 l 678 271 l 579 -5 l 432 -5 l 530 271 l 367 271 l 270 -5 l 121 -5 l 220 270 l 30 271 l 79 403 l 268 403 l 326 563 l 127 564 l 174 699 l 374 698 l 472 975 l 619 974 m 414 402 l 582 402 l 639 563 l 470 563 l 414 402 "},"ι":{"x_min":80,"x_max":314.71875,"ha":396,"o":"m 91 126 l 91 543 l 80 667 q 139 661 105 664 q 196 658 173 658 q 264 661 238 658 q 314 666 291 663 q 304 587 307 616 q 301 523 301 558 l 301 113 q 302 72 301 88 q 314 0 304 56 l 195 4 l 81 0 q 87 67 84 30 q 91 126 91 104 "},"Ά":{"x_min":-28,"x_max":983.109375,"ha":963,"o":"m 242 322 q 326 529 276 400 q 411 751 377 659 q 484 948 445 843 l 553 944 l 623 948 q 805 450 717 684 q 983 0 892 215 l 849 4 l 713 0 l 684 91 l 630 259 q 531 261 581 259 q 433 264 481 262 l 335 259 q 245 0 295 134 l 155 4 l 103 0 l 242 322 m 158 953 q 211 1001 191 986 q 259 1017 231 1017 q 312 994 291 1017 q 333 943 333 972 q 314 897 333 916 q 265 863 295 878 l 40 755 l -28 755 l 158 953 m 487 368 l 597 368 q 549 509 573 446 q 488 662 526 572 q 376 370 428 519 l 487 368 "},")":{"x_min":72.21875,"x_max":383,"ha":449,"o":"m 227 366 q 191 656 227 521 q 76 906 156 792 l 120 949 q 317 691 252 826 q 383 382 383 555 q 317 63 383 201 q 115 -201 252 -75 l 72 -158 q 191 81 156 -48 q 227 366 227 211 "},"ε":{"x_min":55,"x_max":599,"ha":657,"o":"m 512 502 q 472 579 502 548 q 396 611 442 611 q 323 577 352 611 q 295 499 295 544 q 317 429 295 460 q 377 394 340 399 l 449 394 l 449 373 q 449 336 449 349 q 449 316 449 323 q 413 319 438 319 q 322 281 362 319 q 283 195 283 244 q 323 101 283 144 q 412 59 363 59 q 498 88 461 59 q 571 167 535 117 l 599 155 q 593 130 595 144 q 592 104 592 115 q 592 82 592 90 q 599 53 592 74 q 351 -15 485 -15 q 145 30 236 -15 q 55 176 55 75 q 105 289 55 244 q 232 360 155 335 q 127 421 166 385 q 88 516 88 456 q 165 643 88 603 q 340 683 243 683 q 592 612 479 683 q 565 556 576 583 q 551 502 554 530 l 512 502 "},"Δ":{"x_min":11,"x_max":958.328125,"ha":972,"o":"m 490 926 q 531 928 509 926 q 566 932 554 930 q 690 599 633 746 q 815 296 747 452 q 958 0 884 140 q 720 3 879 0 q 481 8 562 8 q 247 3 404 8 q 11 0 90 0 q 234 470 126 223 q 415 932 342 716 q 448 928 429 930 q 490 926 468 926 m 314 373 q 217 127 262 259 q 425 118 314 118 q 542 122 468 118 q 636 127 616 127 q 598 232 616 184 q 538 391 580 280 l 433 645 l 314 373 "},"â":{"x_min":44,"x_max":706.78125,"ha":706,"o":"m 237 -15 q 98 35 153 -15 q 44 169 44 86 q 212 352 44 301 q 401 421 380 403 q 410 439 410 432 q 373 539 410 502 q 275 577 337 577 q 140 511 185 577 l 135 511 l 115 585 q 230 657 164 632 q 365 683 296 683 q 543 623 479 683 q 608 452 608 564 l 604 213 q 604 166 604 184 q 608 123 604 148 q 625 87 612 99 q 658 76 638 76 q 679 80 666 76 q 702 90 691 84 l 706 40 q 643 1 676 14 q 566 -15 610 -10 q 482 5 520 -15 q 421 64 443 25 q 237 -15 351 -15 m 291 1003 l 413 1003 l 566 755 l 501 755 l 350 878 l 203 755 l 138 755 l 291 1003 m 240 200 q 261 128 240 158 q 321 99 282 99 q 388 131 367 99 q 410 211 410 164 l 410 352 q 287 302 335 338 q 240 200 240 267 "},"}":{"x_min":93,"x_max":579,"ha":683,"o":"m 126 983 q 323 955 243 983 q 403 831 403 927 l 403 756 l 403 588 q 423 478 403 512 q 473 434 443 444 q 539 423 504 424 q 579 422 574 422 l 579 283 q 442 249 481 283 q 403 116 403 216 l 403 -50 q 373 -204 403 -147 q 284 -267 343 -260 q 179 -275 225 -274 q 93 -277 133 -277 l 93 -137 q 201 -121 163 -137 q 240 -43 240 -105 l 240 -4 l 240 155 q 269 285 240 241 q 380 353 298 328 q 268 421 296 378 q 240 553 240 463 l 240 713 q 227 805 240 771 q 166 844 215 838 l 93 844 l 93 983 l 126 983 "},"‰":{"x_min":28,"x_max":1618,"ha":1647,"o":"m 265 910 q 434 844 369 910 q 500 672 500 779 q 435 496 500 562 q 258 431 370 431 q 91 498 154 431 q 28 669 28 565 q 93 843 28 776 q 265 910 158 910 m 831 1015 l 917 1014 l 272 -125 l 184 -125 l 831 1015 m 850 463 q 1020 401 955 463 q 1085 230 1085 339 q 1023 51 1085 117 q 846 -15 961 -15 q 678 51 743 -15 q 613 222 613 118 q 676 398 613 333 q 850 463 739 463 m 1383 463 q 1554 400 1490 463 q 1618 229 1618 337 q 1556 51 1618 117 q 1378 -15 1494 -15 q 1209 51 1274 -15 q 1144 222 1144 118 q 1209 396 1144 329 q 1383 463 1274 463 m 780 112 q 798 57 780 83 q 847 31 817 31 q 895 59 874 31 q 916 114 916 87 q 922 222 922 162 q 922 275 922 248 q 915 338 917 312 q 896 389 912 364 q 848 414 880 414 q 813 404 828 414 q 792 375 797 394 q 777 312 781 347 q 773 241 773 276 l 773 222 q 773 183 773 201 q 780 112 774 165 m 196 561 q 214 505 196 532 q 261 478 232 478 q 297 489 280 478 q 323 525 314 501 q 335 586 332 548 q 339 669 339 625 q 337 723 339 697 q 332 780 336 749 q 311 836 327 811 q 264 861 296 861 q 204 820 222 861 q 191 752 194 786 q 188 669 188 719 q 196 561 188 615 m 1315 112 q 1333 56 1315 82 q 1381 31 1351 31 q 1417 42 1402 31 q 1442 76 1433 53 q 1454 138 1451 100 q 1458 222 1458 176 q 1458 275 1458 248 q 1449 344 1453 312 q 1426 395 1445 376 q 1383 414 1408 414 q 1327 379 1338 414 q 1311 301 1315 344 q 1307 222 1307 258 q 1308 164 1307 190 q 1315 112 1309 139 "},"Ä":{"x_min":-28,"x_max":848.390625,"ha":829,"o":"m 109 323 q 187 512 148 413 q 274 740 225 611 q 350 948 323 870 l 420 945 l 492 948 q 666 463 583 687 q 848 0 749 240 l 718 2 l 579 0 l 551 91 l 497 259 q 399 261 448 259 q 300 264 349 262 l 202 259 l 113 0 q 74 2 95 2 q 42 2 53 2 l 21 2 l -28 0 l 109 323 m 284 1242 q 351 1214 323 1242 q 380 1148 380 1187 q 353 1079 380 1108 q 286 1050 327 1050 q 216 1077 245 1050 q 187 1148 187 1105 q 215 1214 187 1187 q 284 1242 243 1242 m 543 1242 q 611 1215 583 1242 q 639 1148 639 1189 q 613 1078 639 1107 q 546 1050 587 1050 q 478 1077 507 1050 q 449 1148 449 1105 q 476 1214 449 1186 q 543 1242 504 1242 m 352 368 l 462 368 q 414 511 437 450 q 350 662 390 571 q 243 370 296 516 l 352 368 "},"a":{"x_min":47,"x_max":708.15625,"ha":706,"o":"m 237 -15 q 100 35 154 -15 q 47 169 47 86 q 213 352 47 301 q 403 422 380 404 q 410 440 410 433 q 373 541 410 504 q 273 579 337 579 q 197 561 232 579 q 140 509 162 544 l 135 509 l 114 585 q 364 683 218 683 q 541 624 478 683 q 604 452 604 566 l 604 214 q 604 169 604 191 q 606 119 604 148 q 656 76 616 76 q 677 79 665 76 q 702 89 690 83 l 708 40 q 563 -11 644 -11 q 479 7 516 -11 q 421 64 441 26 q 339 4 387 23 q 237 -15 291 -15 m 240 198 q 261 127 240 158 q 322 97 282 97 q 388 131 367 97 q 410 212 410 165 l 410 351 q 287 301 334 337 q 240 198 240 266 "},"—":{"x_min":226.390625,"x_max":1138.890625,"ha":1365,"o":"m 226 421 l 1138 421 l 1138 278 l 226 278 l 226 421 "},"=":{"x_min":169.4375,"x_max":968.0625,"ha":1138,"o":"m 968 615 l 968 484 l 169 484 l 169 615 l 968 615 m 968 329 l 968 196 l 169 196 l 169 329 l 968 329 "},"N":{"x_min":86,"x_max":930.453125,"ha":1010,"o":"m 101 444 q 97 645 101 523 q 94 787 94 768 l 90 931 l 177 926 l 268 934 q 526 623 395 775 q 792 327 657 470 l 792 584 q 787 766 792 643 q 782 931 782 888 q 825 927 811 929 q 854 926 838 926 q 890 927 876 926 q 930 934 904 929 q 919 838 923 889 q 915 738 915 788 q 913 461 915 600 q 911 184 912 322 q 913 106 911 147 q 920 0 915 66 q 876 4 901 2 q 838 6 851 6 q 794 4 812 6 q 756 0 777 2 q 495 309 631 151 q 220 618 359 466 l 220 241 l 227 0 q 194 4 213 1 q 159 6 175 6 q 119 4 134 6 q 86 0 103 2 q 97 208 94 105 q 101 444 101 311 "},"ρ":{"x_min":48,"x_max":759,"ha":793,"o":"m 160 -366 q 48 -374 109 -366 q 52 -291 48 -343 q 56 -223 56 -239 l 56 169 l 48 314 q 139 585 48 488 q 403 683 231 683 q 661 589 563 683 q 759 336 759 495 q 681 89 759 194 q 465 -15 603 -15 q 266 65 346 -15 l 264 -208 q 265 -268 264 -241 q 275 -373 267 -295 q 197 -367 220 -368 q 160 -366 173 -366 m 275 347 q 284 196 275 264 q 324 109 295 142 q 404 77 352 77 q 494 120 473 77 q 522 212 514 164 q 531 347 531 260 q 526 431 531 388 q 517 511 522 473 q 483 582 512 549 q 401 615 453 615 q 309 566 340 615 q 279 452 279 517 q 275 372 275 412 l 275 347 "},"2":{"x_min":33,"x_max":706.625,"ha":749,"o":"m 33 75 q 236 249 152 168 q 379 431 321 330 q 438 652 438 533 q 413 772 438 723 q 325 822 389 822 q 220 767 251 822 q 170 616 189 712 l 155 616 q 44 743 107 691 q 189 867 105 823 q 373 911 273 911 q 586 847 500 911 q 673 658 673 783 q 619 480 673 548 q 304 196 566 411 l 430 195 l 553 195 l 706 201 q 689 94 689 148 q 696 38 689 66 q 706 0 703 11 q 514 3 630 0 q 380 7 399 7 q 181 3 302 7 q 44 0 60 0 l 33 75 "},"ü":{"x_min":75,"x_max":722,"ha":808,"o":"m 292 -15 q 142 41 202 -15 q 83 188 83 98 l 83 337 q 79 508 83 394 q 75 666 75 623 q 134 660 108 662 q 185 658 160 658 q 240 660 209 658 q 300 666 271 663 q 290 454 290 569 l 290 384 l 290 279 q 316 146 290 181 q 394 111 343 111 q 467 147 441 111 q 501 234 493 184 l 501 330 q 498 498 501 385 q 495 666 495 610 q 554 660 518 663 q 613 658 589 658 q 671 660 640 658 q 722 666 701 663 q 717 479 722 598 q 712 326 712 359 q 717 156 712 270 q 722 1 722 43 l 617 4 l 511 1 l 511 96 q 410 15 468 46 q 292 -15 353 -15 m 273 976 q 338 948 310 976 q 366 878 366 920 q 339 811 366 839 q 274 784 313 784 q 205 811 234 784 q 176 878 176 839 q 204 947 176 918 q 273 976 232 976 m 531 976 q 599 948 571 976 q 627 878 627 920 q 599 812 627 841 q 533 784 572 784 q 464 811 495 784 q 434 878 434 839 q 462 947 434 918 q 531 976 490 976 "},"Z":{"x_min":25,"x_max":831.953125,"ha":831,"o":"m 25 54 q 186 311 81 142 q 354 582 291 480 q 495 813 418 685 l 294 813 q 98 801 186 813 l 105 852 q 98 932 105 894 l 444 926 q 657 928 509 926 q 815 931 805 931 l 815 903 q 573 517 695 715 q 331 119 451 320 l 566 119 q 706 122 654 119 q 831 136 758 125 q 826 43 826 96 l 827 0 q 606 3 761 0 q 443 6 451 6 q 203 3 370 6 q 25 0 36 0 l 25 54 "},"u":{"x_min":75,"x_max":722,"ha":808,"o":"m 292 -15 q 141 41 200 -15 q 83 189 83 97 l 83 336 q 79 508 83 393 q 75 667 75 624 q 140 659 109 662 q 185 656 171 656 q 251 661 218 656 q 299 666 285 665 l 290 454 l 290 382 l 290 279 q 316 147 290 182 q 393 112 343 112 q 464 146 441 112 q 497 234 488 181 l 501 331 q 497 498 501 387 q 493 667 493 610 q 563 659 531 662 q 612 656 594 656 q 672 661 640 656 q 722 666 703 665 q 716 495 722 609 q 711 326 711 381 q 716 163 711 272 q 722 1 722 55 l 616 4 l 511 1 l 511 94 q 411 15 470 45 q 292 -15 353 -15 "},"k":{"x_min":80,"x_max":732.765625,"ha":756,"o":"m 93 550 q 86 827 93 648 q 80 1024 80 1005 q 184 1018 125 1018 q 307 1023 252 1018 q 301 812 307 959 q 296 602 296 665 l 296 389 q 424 511 368 445 q 545 666 481 576 q 595 665 562 666 q 645 663 628 663 l 709 666 l 714 656 l 628 576 l 475 425 q 636 154 543 304 l 732 0 q 661 3 706 0 q 607 6 616 6 q 537 3 580 6 q 487 0 494 0 q 386 174 441 83 q 296 329 332 266 q 299 141 296 273 q 302 0 302 9 l 191 4 l 80 0 q 86 320 80 113 q 93 550 93 526 "},"Η":{"x_min":91,"x_max":955,"ha":1049,"o":"m 105 286 l 105 459 q 101 650 105 533 q 98 784 98 766 l 91 932 q 156 926 125 929 q 214 923 187 923 q 277 926 241 923 q 344 931 314 929 q 339 818 344 894 q 334 713 334 741 l 334 563 l 514 561 l 710 561 l 710 712 q 707 812 710 778 q 697 932 705 846 q 764 926 727 929 q 828 923 800 923 q 889 926 854 923 q 955 931 924 929 q 948 690 955 856 q 941 465 941 523 q 948 225 941 391 q 955 0 955 58 l 828 5 q 764 2 807 5 q 698 0 721 0 q 707 99 704 47 q 710 202 710 152 l 710 444 q 595 447 665 444 q 514 451 525 451 q 411 447 475 451 q 334 444 346 444 l 334 202 q 339 97 334 167 q 344 0 344 26 q 270 2 323 0 q 214 5 218 5 l 91 0 q 98 146 91 40 q 105 286 105 252 "},"Α":{"x_min":-29.171875,"x_max":850,"ha":829,"o":"m 109 322 q 193 530 143 400 q 278 751 244 660 q 351 949 312 843 l 420 944 l 490 949 q 672 450 584 685 q 850 0 759 215 l 716 4 l 580 0 l 551 91 l 497 259 q 398 261 448 259 q 300 264 348 262 l 202 259 q 112 0 162 134 l 22 4 l -29 0 l 109 322 m 354 368 l 464 368 q 416 509 440 446 q 355 662 393 572 q 243 370 295 519 l 354 368 "},"ß":{"x_min":84,"x_max":776,"ha":811,"o":"m 198 4 l 84 1 q 87 120 84 45 q 91 212 91 195 l 91 352 l 91 651 q 167 928 91 832 q 420 1024 243 1024 q 603 985 522 1024 q 684 854 684 946 q 607 713 684 786 q 530 601 530 640 q 543 563 530 583 q 574 533 556 543 l 688 447 q 776 275 776 379 q 690 67 776 150 q 478 -15 605 -15 q 373 8 428 -15 l 403 161 l 417 161 q 461 88 435 113 q 535 64 488 64 q 600 91 574 64 q 626 157 626 118 q 504 316 626 219 q 377 476 383 413 q 459 650 377 547 q 542 822 542 754 q 511 908 542 873 q 428 943 481 943 q 327 892 361 943 q 294 770 294 841 q 296 495 294 602 q 301 238 298 387 q 304 1 304 88 l 198 4 "},"é":{"x_min":41,"x_max":684.046875,"ha":729,"o":"m 482 98 q 566 112 532 98 q 643 160 600 126 l 661 151 q 643 96 652 125 q 628 40 634 66 q 521 -1 577 11 q 403 -15 466 -15 q 141 79 241 -15 q 41 336 41 173 q 137 586 41 490 q 386 683 234 683 q 608 601 532 683 q 684 373 684 520 l 684 332 l 267 332 q 325 165 267 232 q 482 98 383 98 m 409 951 q 459 1000 436 983 q 511 1017 481 1017 q 563 994 542 1017 q 585 943 585 971 q 565 895 585 915 q 515 861 545 875 l 292 754 l 223 754 l 409 951 m 478 411 q 481 444 481 422 q 459 566 481 513 q 377 620 438 620 q 292 562 318 620 q 267 437 267 505 l 267 411 l 478 411 "},"s":{"x_min":43,"x_max":543,"ha":583,"o":"m 95 197 q 155 95 115 133 q 256 57 195 57 q 338 77 300 57 q 376 140 376 98 q 213 259 376 195 q 51 456 51 323 q 129 623 51 563 q 319 683 208 683 q 411 671 366 683 q 515 638 455 660 l 464 485 l 450 485 q 397 575 433 542 q 303 608 362 608 q 234 588 264 608 q 205 530 205 569 q 374 417 205 478 q 543 227 543 356 q 464 48 543 112 q 266 -15 386 -15 q 148 -6 201 -15 q 43 26 95 3 l 76 197 l 95 197 "},"B":{"x_min":91,"x_max":773,"ha":815,"o":"m 109 208 l 109 465 q 105 714 109 605 q 91 932 102 823 l 250 929 l 417 929 q 655 881 560 929 q 751 707 751 834 q 692 566 751 618 q 542 503 634 515 l 542 491 q 704 431 636 491 q 773 276 773 372 q 678 69 773 138 q 438 0 584 0 l 250 4 q 152 2 211 4 q 91 0 92 0 q 103 104 97 51 q 109 208 109 158 m 519 698 q 479 803 519 763 q 374 844 440 844 l 335 839 q 331 687 331 766 l 331 540 q 466 578 413 540 q 519 698 519 617 m 380 87 q 490 137 450 87 q 531 258 531 187 q 484 392 531 338 q 360 446 437 446 l 331 446 l 331 276 l 335 91 l 380 87 "},"…":{"x_min":93,"x_max":1053,"ha":1182,"o":"m 195 191 q 268 160 236 191 q 300 88 300 129 q 268 16 300 46 q 195 -13 237 -13 q 123 16 154 -13 q 93 88 93 45 q 123 160 93 129 q 195 191 154 191 m 575 191 q 647 160 615 191 q 679 88 679 129 q 647 16 679 46 q 575 -13 616 -13 q 501 16 532 -13 q 471 88 471 45 q 501 160 471 129 q 575 191 532 191 m 948 191 q 1021 160 989 191 q 1053 88 1053 129 q 1021 16 1053 46 q 948 -13 990 -13 q 876 16 907 -13 q 846 88 846 45 q 876 160 846 129 q 948 191 907 191 "},"?":{"x_min":93,"x_max":539,"ha":597,"o":"m 295 221 q 377 186 340 221 q 414 104 414 152 q 378 23 414 61 q 295 -15 343 -15 q 210 19 245 -15 q 175 103 175 53 q 211 183 175 146 q 295 221 247 221 m 433 288 q 378 277 411 280 q 339 275 344 275 q 201 329 261 275 q 142 459 142 383 q 238 620 142 530 q 335 777 335 709 q 310 838 335 812 q 252 864 286 864 q 175 838 211 864 q 119 775 138 813 l 101 777 q 93 891 101 843 q 294 949 181 949 q 467 890 395 949 q 539 730 539 832 q 429 554 539 644 q 320 407 320 464 q 338 363 320 378 q 386 349 357 349 q 421 353 403 349 q 448 358 439 357 l 433 288 "},"H":{"x_min":91,"x_max":957,"ha":1049,"o":"m 105 284 l 105 461 q 101 651 105 534 q 98 787 98 768 l 91 932 q 153 927 107 932 q 222 922 200 922 q 288 926 252 922 q 345 932 324 930 q 336 827 339 886 q 334 712 334 769 l 334 564 l 515 560 l 710 564 l 710 712 q 699 932 710 833 q 767 927 721 932 q 829 922 813 922 q 895 927 851 922 q 956 932 940 932 q 943 702 947 829 q 939 461 939 576 q 942 217 939 306 q 957 0 945 128 q 883 3 930 0 q 829 6 837 6 q 755 3 804 6 q 698 0 706 0 q 707 97 704 35 q 710 201 710 158 l 710 445 q 599 447 676 445 q 515 450 522 450 l 334 445 l 334 201 q 336 88 334 120 q 345 0 338 56 q 278 2 322 0 q 215 5 234 5 q 153 2 194 5 q 91 0 111 0 q 98 146 91 40 q 105 284 105 252 "},"ν":{"x_min":9,"x_max":658,"ha":694,"o":"m 470 438 q 463 504 470 477 q 422 642 457 532 q 641 671 528 660 q 658 582 658 626 q 614 412 658 494 l 541 270 q 462 107 487 161 q 417 0 438 53 q 374 3 403 0 q 331 8 345 8 q 289 3 317 8 q 246 0 261 0 q 165 236 209 110 q 85 458 121 361 q 9 667 49 555 q 72 661 40 664 q 128 659 103 659 q 184 661 152 659 q 245 666 217 664 q 403 184 300 449 q 454 328 438 275 q 470 438 470 381 "},"î":{"x_min":-15,"x_max":413,"ha":396,"o":"m 93 126 l 93 543 q 87 602 93 558 q 82 666 82 645 q 141 661 111 664 q 198 659 172 659 q 255 661 223 659 q 316 666 287 664 q 311 621 315 658 q 303 544 307 584 l 303 319 q 305 144 303 212 q 316 0 307 76 l 196 2 l 81 0 q 93 126 93 66 m 136 1003 l 258 1003 l 413 755 l 345 755 l 198 878 l 50 755 l -15 755 l 136 1003 "},"c":{"x_min":36,"x_max":623.109375,"ha":660,"o":"m 421 600 q 306 530 344 600 q 268 376 268 461 q 313 177 268 266 q 459 88 359 88 q 539 99 498 88 q 608 135 580 111 l 617 126 l 587 21 q 500 -5 546 3 q 404 -15 454 -15 q 140 76 245 -15 q 36 324 36 168 q 140 583 36 484 q 406 683 245 683 q 623 638 514 683 q 607 570 617 620 q 587 462 596 520 l 562 462 q 515 561 550 522 q 421 600 480 600 "},"¶":{"x_min":18,"x_max":531,"ha":590,"o":"m 298 968 l 531 968 l 531 910 l 473 910 l 473 4 l 415 4 l 415 910 l 305 910 l 305 4 l 247 4 l 247 558 q 99 601 163 558 q 27 690 36 645 q 18 744 18 734 q 90 896 18 824 q 298 968 163 968 "},"β":{"x_min":82,"x_max":753,"ha":828,"o":"m 91 -115 q 86 188 91 -19 q 82 493 82 397 q 85 654 82 597 q 102 796 88 711 q 205 951 115 882 q 421 1021 294 1021 q 626 953 540 1021 q 713 770 713 886 q 671 634 713 690 q 553 542 629 579 q 700 438 647 506 q 753 273 753 369 q 680 68 753 152 q 490 -15 608 -15 q 390 0 435 -15 q 298 50 345 16 l 298 -105 l 306 -371 q 246 -365 278 -368 q 192 -362 214 -362 q 138 -365 169 -362 q 82 -370 108 -368 q 86 -238 82 -327 q 91 -115 91 -148 m 372 572 q 474 623 445 572 q 503 757 503 674 q 484 897 503 839 q 403 956 466 956 q 332 908 354 956 q 305 807 310 861 q 299 683 300 752 q 298 551 298 613 l 298 269 q 320 131 298 188 q 412 75 343 75 q 501 135 477 75 q 525 273 525 195 q 496 431 525 377 q 372 486 467 486 l 372 572 "},"Μ":{"x_min":32,"x_max":1165,"ha":1217,"o":"m 105 465 l 168 932 q 211 927 190 929 q 261 926 231 926 q 309 929 277 926 q 358 932 341 932 q 441 709 409 790 q 503 559 473 629 q 608 316 533 488 l 778 690 q 872 932 834 808 q 919 929 887 932 q 966 926 951 926 q 1027 929 1006 926 q 1059 932 1048 932 l 1105 473 q 1130 240 1117 354 q 1165 0 1144 127 q 1095 3 1140 0 q 1041 6 1051 6 q 969 3 1015 6 q 915 0 924 0 q 895 291 915 142 l 865 616 q 731 317 802 480 q 597 0 661 153 l 551 0 l 500 0 q 409 218 465 87 q 317 426 352 349 q 236 605 282 504 l 196 229 q 185 108 190 173 q 180 0 180 44 q 134 3 165 0 q 100 6 102 6 q 60 4 77 6 q 32 0 43 1 q 105 465 77 258 "},"Ό":{"x_min":-28,"x_max":1364,"ha":1407,"o":"m 855 949 q 1223 829 1082 949 q 1364 486 1364 710 q 1220 114 1364 244 q 830 -15 1076 -15 q 454 107 591 -15 q 318 465 318 229 q 466 823 318 697 q 855 949 615 949 m 158 953 q 211 1001 191 986 q 259 1017 231 1017 q 312 994 291 1017 q 333 943 333 972 q 314 897 333 916 q 265 863 295 878 l 40 755 l -28 755 l 158 953 m 840 73 q 1051 194 984 73 q 1118 472 1118 315 q 1051 742 1118 624 q 844 860 984 860 q 631 742 698 860 q 565 465 565 624 q 631 193 565 313 q 840 73 698 73 "},"Ή":{"x_min":-28,"x_max":1333.109375,"ha":1424,"o":"m 482 284 l 482 460 q 478 651 482 534 q 474 787 474 768 l 468 931 q 530 927 484 931 q 599 922 577 922 q 665 926 629 922 q 722 931 701 930 q 713 827 716 886 q 711 711 711 769 l 711 563 l 891 560 l 1086 564 l 1086 712 q 1075 931 1086 833 q 1143 927 1097 931 q 1205 922 1190 922 q 1272 927 1227 922 q 1333 931 1316 931 q 1319 702 1323 829 q 1315 460 1315 576 q 1318 217 1315 306 q 1333 0 1321 128 q 1260 3 1306 0 q 1205 6 1213 6 q 1131 3 1180 6 q 1074 0 1083 0 q 1083 97 1080 35 q 1086 201 1086 158 l 1086 444 q 975 447 1052 444 q 891 450 898 450 l 711 444 l 711 201 q 713 88 711 120 q 722 0 715 56 q 655 2 699 0 q 592 5 611 5 q 530 2 571 5 q 468 0 488 0 q 475 146 468 40 q 482 284 482 252 m 158 953 q 211 1001 191 986 q 259 1017 231 1017 q 312 994 291 1017 q 333 943 333 972 q 314 897 333 916 q 265 863 295 878 l 40 755 l -28 755 l 158 953 "},"•":{"x_min":215.28125,"x_max":805.5625,"ha":1024,"o":"m 512 803 q 718 714 631 803 q 805 505 805 626 q 719 299 805 387 q 512 212 633 212 q 301 298 387 212 q 215 505 215 384 q 303 714 215 626 q 512 803 391 803 "},"¥":{"x_min":8,"x_max":752,"ha":764,"o":"m 38 252 l 38 336 l 160 332 l 277 332 l 277 417 q 140 413 225 417 q 38 410 55 410 l 38 494 q 131 486 87 486 l 228 486 l 143 644 q 87 751 114 704 q 8 888 60 799 q 82 884 34 888 q 138 881 130 881 q 213 884 167 881 q 265 888 258 888 q 433 529 349 696 q 524 707 478 613 q 608 888 571 802 q 640 888 624 888 q 674 888 657 888 l 752 888 q 602 642 653 729 q 516 486 551 554 l 722 494 l 722 410 q 583 413 668 410 q 485 417 497 417 l 485 331 l 722 336 l 722 252 q 604 255 690 252 q 485 258 518 258 q 490 123 485 213 q 495 0 495 33 l 386 5 q 316 2 364 5 q 264 0 268 0 q 274 126 271 59 q 277 258 277 194 q 140 255 235 258 q 38 252 45 252 "},"(":{"x_min":91,"x_max":403.5,"ha":449,"o":"m 249 479 l 249 379 l 249 277 q 287 54 249 161 q 402 -158 326 -53 l 356 -201 q 158 57 225 -80 q 91 365 91 195 q 158 683 91 541 q 359 949 225 825 l 403 906 q 288 701 328 808 q 249 479 249 594 "},"U":{"x_min":82,"x_max":910,"ha":999,"o":"m 211 926 q 275 929 232 926 q 338 932 318 932 q 325 681 329 826 q 321 421 321 536 q 373 175 321 241 q 521 110 425 110 q 678 161 611 110 q 755 278 746 212 q 768 419 765 344 q 771 547 771 494 q 754 931 771 761 l 812 926 l 910 932 q 903 769 910 882 q 896 615 896 655 l 896 480 q 896 427 896 462 q 896 375 896 391 q 793 82 896 180 q 494 -15 691 -15 q 211 55 323 -15 q 100 286 100 126 q 91 616 100 383 q 82 932 82 850 q 154 929 102 932 q 211 926 207 926 "},"γ":{"x_min":0,"x_max":713.890625,"ha":700,"o":"m 523 199 q 486 87 498 128 q 474 -62 474 47 q 477 -246 474 -135 q 481 -374 481 -357 q 407 -366 442 -368 q 326 -365 373 -365 l 250 -370 q 258 -204 250 -315 q 267 -72 267 -93 q 246 138 267 52 q 189 344 225 224 q 130 512 154 463 q 50 561 105 561 q 25 558 38 561 q 0 553 11 555 l 0 635 q 79 669 38 656 q 159 683 119 683 q 329 593 293 683 q 433 233 365 503 q 519 456 482 349 q 576 666 555 562 l 644 663 l 713 666 q 633 490 665 572 q 523 199 601 408 "},"α":{"x_min":30,"x_max":827.21875,"ha":878,"o":"m 669 665 l 749 662 l 827 665 q 763 499 782 551 q 720 377 743 447 l 818 0 q 763 6 792 2 q 717 10 733 10 q 662 5 692 10 q 615 0 632 1 l 594 101 q 361 -15 501 -15 q 120 83 210 -15 q 30 334 30 182 q 123 583 30 484 q 368 683 217 683 q 515 647 449 683 q 633 547 582 612 q 651 601 640 563 q 669 665 662 638 m 383 614 q 313 588 343 614 q 276 523 283 562 q 260 434 265 484 q 256 333 256 385 q 269 174 256 249 q 305 87 275 122 q 385 52 335 52 q 509 144 473 52 q 546 340 546 236 q 522 504 546 428 q 455 597 498 580 q 383 614 411 614 "},"F":{"x_min":91,"x_max":645.15625,"ha":686,"o":"m 109 465 q 105 710 109 620 q 91 932 102 800 l 357 926 q 520 929 406 926 q 645 932 635 932 l 638 871 q 645 810 638 844 q 524 815 607 810 q 415 820 442 820 l 339 820 q 337 663 339 778 q 335 546 335 548 l 634 557 l 629 494 l 634 431 q 462 437 573 431 q 335 443 350 443 l 335 236 q 337 106 335 149 q 348 0 339 62 l 219 2 l 91 0 q 105 209 102 102 q 109 465 109 316 "},"­":{"x_min":0,"x_max":683.328125,"ha":683,"o":"m 0 421 l 683 421 l 683 278 l 0 278 l 0 421 "},":":{"x_min":105,"x_max":343,"ha":447,"o":"m 223 221 q 307 185 272 221 q 343 103 343 150 q 306 19 343 54 q 223 -15 270 -15 q 139 18 174 -15 q 105 103 105 51 q 139 186 105 151 q 223 221 174 221 m 223 654 q 306 617 270 654 q 343 532 343 581 q 306 450 343 485 q 223 416 270 416 q 139 449 174 416 q 105 534 105 482 q 139 619 105 584 q 223 654 174 654 "},"Χ":{"x_min":-1.390625,"x_max":801.390625,"ha":782,"o":"m 169 241 l 301 436 l 15 932 q 94 929 38 932 q 155 926 150 926 q 235 929 179 926 q 298 932 291 932 q 314 893 308 907 q 358 802 320 880 l 445 638 q 547 805 513 748 q 613 932 581 862 q 655 929 627 932 q 698 926 683 926 q 740 929 712 926 q 783 932 768 932 q 685 800 709 833 q 616 701 661 766 l 502 531 l 801 0 q 713 2 776 0 q 647 5 651 5 l 516 0 l 470 108 l 356 326 q 265 174 316 263 q 170 0 215 84 q 118 3 154 0 q 77 6 81 6 q 31 4 52 6 q -1 0 11 1 l 169 241 "},"*":{"x_min":91,"x_max":588,"ha":683,"o":"m 154 520 q 128 571 139 550 q 91 634 117 593 q 186 665 139 650 q 284 698 234 680 q 190 734 242 716 q 91 765 139 751 q 154 879 125 816 l 310 750 l 298 808 l 275 949 l 339 947 l 405 948 l 368 745 l 525 879 q 588 765 553 822 q 398 698 499 737 q 490 664 441 680 q 588 634 539 648 q 557 581 574 612 q 525 520 540 551 l 370 650 q 389 528 381 580 q 404 443 397 476 l 337 446 l 273 446 l 310 650 l 154 520 "},"°":{"x_min":165,"x_max":519,"ha":683,"o":"m 165 913 q 221 1032 165 980 q 351 1084 278 1084 q 469 1040 420 1084 q 519 926 519 996 q 464 804 519 853 q 335 755 409 755 q 214 799 264 755 q 165 913 165 844 m 241 905 q 268 832 241 863 q 338 801 295 801 q 414 837 388 801 q 441 927 441 874 q 416 1009 441 977 q 345 1042 392 1042 q 281 1018 310 1042 q 247 962 253 994 q 241 905 241 930 "},"V":{"x_min":-19.4375,"x_max":856.953125,"ha":818,"o":"m 255 230 l -19 932 q 61 929 4 932 q 120 926 117 926 l 247 932 q 298 768 270 840 l 476 296 l 646 770 q 673 852 662 812 q 692 932 685 891 l 766 926 q 812 929 781 926 q 856 932 843 932 q 752 706 801 819 l 566 231 q 488 0 520 123 q 445 4 463 2 q 413 6 427 6 q 368 3 397 6 q 336 0 340 0 q 304 97 322 46 q 255 230 286 147 "},"Ξ":{"x_min":58.328125,"x_max":816.671875,"ha":876,"o":"m 438 190 q 653 193 518 190 q 816 197 788 197 q 812 124 812 160 l 812 99 q 812 51 812 74 q 816 0 812 27 q 629 4 754 0 q 438 8 504 8 q 248 4 375 8 q 58 0 122 0 l 63 98 l 58 197 q 281 193 145 197 q 438 190 418 190 m 438 747 q 258 743 379 747 q 77 739 137 739 q 84 804 83 784 q 84 834 84 823 q 77 932 84 879 q 267 927 140 932 q 438 922 394 922 q 626 927 500 922 q 797 932 752 932 l 793 835 l 797 739 q 619 743 738 739 q 438 747 500 747 m 708 467 l 713 375 q 577 379 669 375 q 438 383 486 383 q 300 379 391 383 q 162 375 208 375 q 165 418 163 397 q 168 468 168 440 q 165 523 168 484 q 162 567 162 562 q 438 554 300 554 q 713 566 577 554 l 708 467 "}," ":{"x_min":0,"x_max":0,"ha":375},"Ϋ":{"x_min":-32,"x_max":797,"ha":747,"o":"m 133 650 q 52 795 94 720 q -32 931 11 869 l 91 928 l 256 932 q 365 700 329 773 q 441 554 401 627 q 541 731 491 634 q 636 932 590 827 l 711 928 l 797 932 q 644 689 714 812 q 498 420 573 566 l 502 143 l 509 0 l 413 5 l 256 0 q 261 118 256 38 q 267 236 267 197 l 267 402 l 133 650 m 242 1242 q 309 1215 281 1242 q 337 1148 337 1189 q 311 1078 337 1107 q 243 1050 285 1050 q 173 1078 203 1050 q 144 1148 144 1107 q 173 1214 144 1186 q 242 1242 202 1242 m 502 1242 q 571 1214 542 1242 q 600 1148 600 1187 q 572 1078 600 1107 q 505 1050 545 1050 q 435 1077 463 1050 q 408 1148 408 1105 q 435 1214 408 1186 q 502 1242 463 1242 "},"0":{"x_min":34,"x_max":709,"ha":749,"o":"m 367 -19 q 104 104 175 -19 q 34 436 34 228 q 109 777 34 644 q 377 910 184 910 q 640 785 572 910 q 709 443 709 660 q 635 108 709 236 q 367 -19 561 -19 m 260 447 q 261 330 260 382 q 269 213 262 279 q 296 101 276 147 q 374 56 316 56 q 453 108 430 56 q 477 221 477 160 q 480 287 478 254 q 483 458 483 365 q 480 590 483 543 q 477 665 478 637 q 452 779 477 727 q 372 832 428 832 q 281 765 299 832 q 263 598 263 698 q 261 505 263 561 q 260 447 260 448 "},"”":{"x_min":72.21875,"x_max":615.28125,"ha":654,"o":"m 72 528 l 152 848 q 183 920 159 891 q 245 949 206 949 q 311 926 286 949 q 337 861 337 903 q 315 797 337 827 l 112 511 l 72 528 m 351 528 l 430 848 q 462 919 437 889 q 525 949 487 949 q 588 925 562 949 q 615 864 615 901 q 609 829 615 845 q 594 797 604 813 l 391 511 l 351 528 "},"@":{"x_min":59,"x_max":1305,"ha":1365,"o":"m 581 72 q 418 131 475 72 q 362 298 362 191 q 455 554 362 437 q 684 672 548 672 q 771 650 734 672 q 843 586 808 629 l 877 653 l 998 653 l 897 254 l 893 229 q 912 193 893 205 q 957 181 931 181 q 1119 290 1056 181 q 1183 504 1183 399 q 1060 772 1183 668 q 771 877 937 877 q 354 735 526 877 q 183 353 183 594 q 327 20 183 140 q 689 -100 471 -100 q 898 -66 792 -100 q 1092 25 1004 -33 l 1143 -51 q 689 -204 945 -204 q 244 -54 429 -204 q 59 348 59 94 q 261 804 59 621 q 739 988 464 988 q 1134 856 964 988 q 1305 505 1305 725 q 1195 206 1305 340 q 920 72 1085 72 l 895 72 q 818 90 846 72 q 777 180 791 108 q 691 99 739 127 q 581 72 643 72 m 693 578 q 552 487 600 578 q 505 294 505 397 q 532 207 505 245 q 606 169 560 169 q 712 212 668 169 q 772 322 756 256 l 808 466 q 773 546 804 515 q 693 578 742 578 "},"Ί":{"x_min":-28,"x_max":728,"ha":822,"o":"m 485 402 q 481 715 485 609 q 468 931 477 822 q 535 925 498 929 q 594 922 572 922 q 666 927 620 922 q 727 931 713 931 q 714 716 717 819 q 711 465 711 613 q 714 221 711 326 q 728 0 718 116 q 647 2 704 0 q 588 5 590 5 l 469 0 q 481 199 477 88 q 485 402 485 310 m 157 953 q 210 1001 190 986 q 258 1017 230 1017 q 311 994 290 1017 q 332 943 332 972 q 313 897 332 916 q 264 863 294 878 l 40 755 l -28 755 l 157 953 "},"ö":{"x_min":32,"x_max":743,"ha":775,"o":"m 395 683 q 647 588 551 683 q 743 337 743 494 q 648 79 743 173 q 387 -15 554 -15 q 129 78 227 -15 q 32 333 32 172 q 130 590 32 497 q 395 683 229 683 m 257 976 q 324 948 296 976 q 352 878 352 920 q 325 811 352 839 q 258 784 299 784 q 190 811 221 784 q 160 878 160 839 q 188 947 160 918 q 257 976 217 976 m 517 976 q 585 948 557 976 q 613 878 613 920 q 586 811 613 839 q 519 784 560 784 q 450 811 479 784 q 421 878 421 839 q 449 947 421 918 q 517 976 478 976 m 269 174 q 307 85 277 120 q 387 50 337 50 q 466 84 437 50 q 500 156 494 119 q 511 215 507 194 q 517 335 517 271 q 511 450 517 395 q 500 509 507 471 q 466 582 494 548 q 387 616 439 616 q 294 564 319 616 q 263 459 269 513 q 258 333 258 406 q 260 244 258 270 q 269 174 262 217 "},"i":{"x_min":80,"x_max":314.71875,"ha":396,"o":"m 196 1014 q 273 980 240 1014 q 307 902 307 947 q 274 825 307 858 q 196 793 241 793 q 118 824 151 793 q 85 902 85 856 q 118 980 85 947 q 196 1014 151 1014 m 91 127 l 91 543 l 80 666 q 140 660 109 663 q 196 658 171 658 q 253 660 223 658 q 314 666 284 663 l 301 545 l 301 319 q 302 145 301 206 q 312 0 304 84 l 194 4 l 81 0 q 88 64 85 33 q 91 127 91 95 "},"Β":{"x_min":91,"x_max":773,"ha":815,"o":"m 109 208 l 109 465 q 105 714 109 605 q 91 932 102 823 l 250 929 l 417 929 q 655 881 560 929 q 751 707 751 834 q 692 566 751 618 q 542 503 634 515 l 542 491 q 704 431 636 491 q 773 276 773 372 q 678 69 773 138 q 438 0 584 0 l 250 4 q 152 2 211 4 q 91 0 92 0 q 103 104 97 51 q 109 208 109 158 m 519 698 q 479 803 519 763 q 374 844 440 844 l 335 839 q 331 687 331 766 l 331 540 q 466 578 413 540 q 519 698 519 617 m 380 87 q 490 137 450 87 q 531 258 531 187 q 484 392 531 338 q 360 446 437 446 l 331 446 l 331 276 l 335 91 l 380 87 "},"≤":{"x_min":170.984375,"x_max":962.28125,"ha":1139,"o":"m 960 690 l 403 514 l 960 338 l 960 200 l 171 455 l 170 572 l 960 830 l 960 690 m 962 132 l 962 0 l 171 0 l 171 132 l 962 132 "},"υ":{"x_min":82,"x_max":765,"ha":843,"o":"m 765 416 q 663 115 765 245 q 401 -15 562 -15 q 162 56 243 -15 q 82 284 82 128 l 86 479 q 84 590 86 523 q 82 666 82 656 q 145 663 99 666 q 195 661 191 661 q 263 663 216 661 q 311 666 309 666 q 295 477 301 566 q 290 294 290 387 q 310 122 290 193 q 402 52 330 52 q 515 146 487 52 q 544 351 544 240 q 525 502 544 433 q 469 656 507 570 q 580 659 528 656 q 684 673 632 662 q 743 548 721 614 q 765 416 765 482 "},"]":{"x_min":76,"x_max":385.71875,"ha":454,"o":"m 80 -129 l 76 -85 l 227 -88 q 231 134 227 -14 q 235 356 235 282 q 231 605 235 438 q 227 855 227 771 l 164 855 l 76 855 l 80 885 q 80 908 80 896 q 76 931 77 925 l 230 926 l 385 933 l 373 566 l 373 359 l 373 199 l 383 -164 l 227 -157 q 141 -160 195 -157 q 76 -164 86 -164 l 80 -129 "},"m":{"x_min":80,"x_max":1135,"ha":1217,"o":"m 91 329 q 85 517 91 394 q 80 667 80 640 l 184 662 l 293 666 l 293 571 q 392 651 334 619 q 511 683 450 683 q 628 653 579 683 q 700 559 676 623 q 791 651 733 620 q 921 683 849 683 q 1068 624 1011 683 q 1125 477 1125 566 l 1125 331 q 1130 158 1125 274 q 1135 0 1135 41 q 1070 2 1116 0 q 1019 5 1024 5 q 954 2 999 5 q 905 0 909 0 q 910 155 905 51 q 915 298 915 259 l 915 385 q 896 506 915 458 q 818 554 877 554 q 755 528 779 554 q 719 460 730 502 q 712 381 714 426 q 710 319 710 335 q 715 153 710 265 q 720 0 720 41 q 656 3 694 0 q 608 6 617 6 q 544 3 585 6 q 496 0 504 0 q 501 155 496 51 q 506 298 506 259 l 506 385 q 487 505 506 456 q 409 554 469 554 q 346 528 370 554 q 310 460 321 502 q 303 381 305 426 q 301 319 301 335 q 306 153 301 265 q 311 0 311 41 q 243 3 284 0 q 195 6 202 6 q 128 3 170 6 q 80 0 86 0 q 85 163 80 53 q 91 329 91 273 "},"χ":{"x_min":15.28125,"x_max":730.5625,"ha":731,"o":"m 569 380 l 472 204 l 545 31 q 631 -159 586 -62 q 729 -368 676 -255 l 600 -363 q 475 -371 537 -363 q 404 -147 438 -259 l 350 1 l 268 -155 q 218 -260 242 -204 q 176 -371 194 -316 q 105 -363 143 -363 q 16 -371 62 -363 q 97 -240 52 -319 q 197 -66 141 -162 l 298 111 l 168 423 q 130 509 148 466 q 63 568 101 563 l 15 564 l 15 638 q 166 683 83 683 q 286 628 252 683 q 367 445 320 573 l 422 318 l 499 479 q 572 665 544 582 l 634 662 q 697 665 674 662 q 730 668 719 668 l 569 380 "},"8":{"x_min":34,"x_max":710,"ha":749,"o":"m 511 492 q 654 412 598 471 q 710 266 710 352 q 607 53 710 128 q 360 -21 504 -21 q 131 50 229 -21 q 34 248 34 122 q 88 406 34 341 q 235 492 143 471 l 235 502 q 117 568 164 516 q 71 689 71 620 q 165 855 71 802 q 382 908 259 908 q 584 857 498 908 q 671 696 671 806 q 628 574 671 621 q 511 502 586 526 l 511 492 m 373 528 q 456 573 432 528 q 481 684 481 618 q 458 792 481 748 q 376 836 435 836 q 290 791 316 836 q 264 683 264 747 q 291 575 264 622 q 373 528 318 528 m 369 55 q 464 117 439 55 q 489 259 489 180 q 465 396 489 335 q 379 457 441 457 q 285 393 314 457 q 256 256 256 329 q 278 114 256 174 q 369 55 301 55 "},"ί":{"x_min":80,"x_max":478.609375,"ha":396,"o":"m 91 126 l 91 543 l 80 666 q 139 660 105 663 q 196 658 173 658 q 264 660 238 658 q 314 666 291 663 q 304 586 307 616 q 301 523 301 557 l 301 113 q 302 72 301 88 q 314 0 304 56 l 195 4 l 81 0 q 87 67 84 30 q 91 126 91 104 m 303 953 q 357 1001 337 986 q 406 1017 377 1017 q 457 994 437 1017 q 478 943 478 972 q 459 897 478 915 q 410 863 441 878 l 187 755 l 118 755 l 303 953 "},"Ζ":{"x_min":25,"x_max":831.953125,"ha":831,"o":"m 25 54 q 186 311 81 142 q 354 582 291 480 q 495 813 418 685 l 294 813 q 98 801 186 813 l 105 852 q 98 932 105 894 l 444 926 q 657 928 509 926 q 815 931 805 931 l 815 903 q 573 517 695 715 q 331 119 451 320 l 566 119 q 706 122 654 119 q 831 136 758 125 q 826 43 826 96 l 827 0 q 606 3 761 0 q 443 6 451 6 q 203 3 370 6 q 25 0 36 0 l 25 54 "},"R":{"x_min":87,"x_max":860.609375,"ha":836,"o":"m 106 398 q 96 663 106 486 q 87 931 87 841 l 182 927 q 295 932 207 927 q 420 938 382 938 q 699 874 625 938 q 773 697 773 811 q 713 538 773 603 q 560 465 654 474 q 701 235 627 350 q 860 0 775 120 l 753 5 l 578 0 q 469 202 531 100 q 320 438 408 304 l 320 258 q 322 114 320 154 q 331 0 324 75 q 261 3 304 0 q 211 6 217 6 q 140 3 184 6 q 87 0 95 0 q 96 198 87 65 q 106 398 106 331 m 544 689 q 505 805 544 760 q 397 850 467 850 l 324 850 l 320 696 l 320 506 q 483 548 422 506 q 544 689 544 590 "},"×":{"x_min":183.828125,"x_max":970.171875,"ha":1139,"o":"m 577 501 l 877 800 l 970 706 l 670 408 l 970 106 l 876 13 l 577 314 l 277 13 l 184 106 l 483 408 l 183 706 l 277 800 l 577 501 "},"o":{"x_min":30,"x_max":741,"ha":774,"o":"m 395 683 q 645 587 550 683 q 741 337 741 492 q 646 79 741 173 q 385 -15 552 -15 q 127 78 225 -15 q 30 333 30 172 q 129 590 30 498 q 395 683 228 683 m 269 174 q 305 85 275 119 q 386 52 335 52 q 464 85 436 52 q 503 172 491 119 q 510 237 506 194 q 515 336 515 279 q 510 431 515 391 q 503 494 506 472 q 464 581 491 548 q 385 615 436 615 q 291 563 315 615 q 261 459 267 512 q 256 333 256 407 q 269 174 256 248 "},"5":{"x_min":46,"x_max":670,"ha":749,"o":"m 284 60 q 397 118 360 60 q 434 258 434 176 q 404 391 434 333 q 307 450 375 450 q 183 388 238 450 l 118 422 q 128 525 126 467 q 131 606 131 583 q 126 749 131 684 q 108 878 121 814 l 118 888 q 268 883 173 888 q 387 878 362 878 q 635 888 519 878 l 630 793 q 636 696 630 739 q 479 702 579 696 q 365 709 378 709 l 225 709 q 213 501 213 608 q 399 548 301 548 q 591 480 513 548 q 670 300 670 413 q 559 59 670 139 q 280 -21 449 -21 q 156 -7 222 -21 q 46 32 90 5 q 94 133 74 84 q 131 238 115 182 l 152 237 q 180 109 152 158 q 284 60 208 60 "},"7":{"x_min":96,"x_max":760,"ha":749,"o":"m 333 343 l 549 689 q 439 693 511 689 q 329 697 366 697 q 221 694 272 697 q 98 689 171 691 q 105 755 104 734 q 105 787 105 775 q 102 844 105 808 q 98 888 98 881 l 401 883 l 741 887 l 760 849 q 312 0 491 452 l 216 0 l 105 0 l 96 18 q 229 187 177 119 q 333 343 280 255 "},"K":{"x_min":90,"x_max":892.78125,"ha":856,"o":"m 334 716 l 334 515 l 569 787 q 635 866 619 845 q 682 932 651 886 l 767 926 q 817 929 784 926 q 870 932 851 932 q 687 746 790 851 q 503 554 585 641 l 623 377 q 892 0 753 179 l 753 5 q 664 2 727 5 q 595 0 600 0 q 484 190 545 98 q 334 404 424 281 l 334 193 q 348 0 334 94 q 270 2 325 0 q 212 5 215 5 l 90 0 q 99 236 90 69 q 108 461 108 402 q 103 623 108 515 q 99 787 99 731 l 90 932 q 157 927 113 932 q 219 922 201 922 q 282 925 252 922 q 342 932 312 927 q 338 831 342 907 q 334 716 334 755 "},",":{"x_min":25,"x_max":319.4375,"ha":375,"o":"m 109 121 q 146 203 119 168 q 218 238 173 238 q 289 208 259 238 q 319 136 319 178 q 313 101 319 118 q 294 64 306 85 l 62 -253 l 25 -238 l 109 121 "},"d":{"x_min":54,"x_max":744,"ha":825,"o":"m 318 -15 q 115 84 177 -15 q 54 336 54 184 q 124 583 54 483 q 336 683 194 683 q 525 584 451 683 l 525 738 l 518 1024 q 581 1016 554 1019 q 630 1013 609 1013 q 678 1015 653 1013 q 744 1023 703 1018 q 740 900 744 983 q 736 775 736 816 q 738 403 736 627 q 740 176 740 179 l 744 0 q 680 3 721 0 q 630 6 638 6 q 568 3 608 6 q 520 0 528 0 q 523 39 522 16 q 525 85 525 62 q 430 8 477 32 q 318 -15 383 -15 m 396 587 q 328 562 355 587 q 289 499 300 538 q 273 409 277 460 q 269 316 269 358 q 295 158 269 227 q 396 89 321 89 q 501 167 473 89 q 530 338 530 245 q 503 511 530 435 q 396 587 477 587 "},"¨":{"x_min":65.28125,"x_max":609.71875,"ha":654,"o":"m 251 613 q 218 541 243 570 q 154 512 194 512 q 90 537 116 512 q 65 601 65 563 q 87 665 65 634 l 291 949 l 331 933 l 251 613 m 530 613 q 498 542 525 573 q 433 512 472 512 q 371 536 397 512 q 345 598 345 560 q 366 665 345 633 l 570 949 l 609 933 l 530 613 "},"E":{"x_min":90,"x_max":644.15625,"ha":703,"o":"m 108 222 l 108 465 q 104 710 108 620 q 91 932 101 800 l 357 926 q 520 929 405 926 q 644 932 634 932 q 640 903 641 916 q 638 872 638 890 q 639 848 638 857 q 644 810 640 840 q 530 815 606 810 q 414 820 453 820 l 338 820 l 334 545 l 634 557 q 630 527 631 541 q 628 494 628 514 l 633 431 q 459 437 571 431 q 334 444 347 444 l 334 296 q 336 190 334 264 q 338 113 338 115 q 638 129 489 113 l 634 63 l 638 0 q 433 3 562 0 q 278 7 305 7 q 169 3 235 7 q 90 0 102 0 q 102 114 96 54 q 108 222 108 175 "},"Y":{"x_min":-30,"x_max":797,"ha":747,"o":"m 136 650 q 67 772 123 672 q -30 932 10 872 l 92 926 q 184 929 120 926 q 256 931 249 931 q 345 740 304 825 q 442 554 386 656 q 541 730 492 636 q 637 931 589 825 l 712 926 q 753 929 726 926 q 797 931 781 931 q 644 689 714 812 q 498 420 573 566 l 502 143 l 508 0 l 414 5 l 256 0 q 262 138 256 50 q 269 237 269 226 l 269 402 l 136 650 "},"\"":{"x_min":53,"x_max":399,"ha":451,"o":"m 181 958 l 181 586 l 53 586 l 53 958 l 181 958 m 399 958 l 399 586 l 271 586 l 271 958 l 399 958 "},"ê":{"x_min":41,"x_max":684.046875,"ha":729,"o":"m 482 98 q 566 112 532 98 q 643 160 600 126 l 661 151 q 643 96 652 125 q 628 40 634 66 q 521 -1 577 11 q 403 -15 466 -15 q 141 79 241 -15 q 41 336 41 173 q 137 586 41 490 q 386 683 234 683 q 608 601 532 683 q 684 373 684 520 l 684 332 l 267 332 q 325 165 267 232 q 482 98 383 98 m 302 1001 l 426 1001 l 577 754 l 512 754 l 364 876 l 216 754 l 149 754 l 302 1001 m 478 411 q 481 444 481 422 q 459 566 481 513 q 377 620 438 620 q 292 562 318 620 q 267 437 267 505 l 267 411 l 478 411 "},"δ":{"x_min":30,"x_max":688,"ha":719,"o":"m 543 794 q 498 889 531 854 q 407 924 465 924 q 329 895 362 924 q 296 822 296 867 q 393 671 296 739 q 585 539 490 603 q 688 308 688 444 q 600 71 688 157 q 359 -15 513 -15 q 119 70 209 -15 q 30 305 30 155 q 88 503 30 419 q 256 614 147 586 q 130 696 178 650 q 82 812 82 743 q 173 968 82 916 q 374 1021 263 1021 q 629 946 510 1021 q 606 875 617 912 q 582 788 596 839 l 543 794 m 269 163 q 296 83 276 114 q 360 52 317 52 q 435 95 414 52 q 462 204 456 139 l 462 306 l 462 407 q 438 513 462 464 q 363 561 415 561 q 298 529 321 561 q 269 449 274 496 q 260 382 263 421 q 258 306 258 343 q 260 227 258 249 q 269 163 262 206 "},"έ":{"x_min":55,"x_max":667.5,"ha":657,"o":"m 512 501 q 472 579 502 548 q 396 611 442 611 q 323 577 352 611 q 295 498 295 544 q 316 429 295 458 q 375 394 337 399 l 450 394 l 450 373 q 450 336 450 349 q 450 316 450 323 q 414 319 438 319 q 322 280 361 319 q 283 194 283 242 q 323 101 283 144 q 413 59 363 59 q 498 88 461 59 q 572 167 536 117 l 600 155 q 594 130 596 144 q 593 104 593 115 q 593 82 593 90 q 600 53 593 74 q 351 -15 486 -15 q 145 30 236 -15 q 55 176 55 75 q 105 289 55 244 q 233 360 156 335 q 127 421 167 385 q 88 516 88 456 q 165 643 88 603 q 340 683 243 683 q 593 612 480 683 q 565 556 576 583 q 551 501 555 530 l 512 501 m 492 955 q 545 1003 525 988 q 595 1019 566 1019 q 646 996 625 1019 q 667 945 667 974 q 648 899 667 917 q 600 865 630 880 l 375 757 l 306 757 l 492 955 "},"ω":{"x_min":30,"x_max":1059,"ha":1093,"o":"m 335 -15 q 111 79 192 -15 q 30 321 30 173 q 72 505 30 421 q 192 667 114 589 q 297 661 237 661 q 347 663 319 661 q 390 667 374 665 q 247 281 247 499 q 269 123 247 195 q 358 52 291 52 q 421 86 399 52 q 443 165 443 121 l 443 291 q 441 415 443 379 q 435 512 440 451 q 510 505 499 505 q 544 505 522 505 q 608 508 579 505 q 657 512 636 511 q 648 402 652 465 q 644 289 644 340 q 644 237 644 258 q 650 165 644 215 q 669 85 650 119 q 730 52 688 52 q 821 122 798 52 q 844 279 844 192 q 807 481 844 386 q 700 666 771 576 q 746 662 724 663 q 793 661 767 661 q 846 664 812 661 q 898 667 881 667 q 1016 508 974 595 q 1059 322 1059 422 q 974 83 1059 182 q 753 -15 890 -15 q 630 13 685 -15 q 545 100 575 41 q 459 14 516 44 q 335 -15 402 -15 "},"´":{"x_min":70.828125,"x_max":337.5,"ha":374,"o":"m 70 528 l 151 848 q 183 919 158 889 q 244 949 208 949 q 310 924 283 949 q 337 862 337 900 q 331 829 337 845 q 316 797 326 813 l 111 511 l 70 528 "},"±":{"x_min":169,"x_max":969,"ha":1139,"o":"m 636 815 l 636 597 l 969 597 l 969 465 l 636 465 l 636 246 l 501 246 l 501 465 l 169 465 l 169 597 l 501 597 l 501 815 l 636 815 m 969 132 l 969 0 l 169 0 l 169 132 l 969 132 "},"|":{"x_min":272,"x_max":411,"ha":683,"o":"m 411 956 l 411 447 l 272 447 l 272 956 l 411 956 m 411 272 l 411 -233 l 272 -233 l 272 272 l 411 272 "},"ϋ":{"x_min":82,"x_max":765,"ha":843,"o":"m 765 415 q 663 114 765 244 q 401 -15 562 -15 q 162 56 243 -15 q 82 284 82 127 l 86 478 q 84 589 86 523 q 82 666 82 656 q 145 663 99 666 q 195 661 191 661 q 263 663 216 661 q 311 666 309 666 q 295 476 301 566 q 290 294 290 387 q 310 122 290 193 q 402 52 330 52 q 515 146 487 52 q 544 351 544 240 q 525 502 544 433 q 469 657 507 570 q 580 659 528 657 q 684 672 632 662 q 743 547 721 613 q 765 415 765 482 m 262 975 q 329 947 301 975 q 357 879 357 919 q 331 811 357 840 q 265 783 305 783 q 195 810 226 783 q 165 879 165 838 q 192 947 165 919 q 262 975 220 975 m 522 975 q 589 947 561 975 q 617 879 617 919 q 591 811 617 840 q 525 783 565 783 q 456 811 486 783 q 427 879 427 840 q 454 947 427 919 q 522 975 482 975 "},"§":{"x_min":61,"x_max":685,"ha":743,"o":"m 118 39 l 136 38 q 207 -72 149 -32 q 341 -113 265 -113 q 441 -84 398 -113 q 485 -1 485 -56 q 378 121 485 73 q 170 213 272 169 q 61 386 61 277 q 95 495 61 437 q 175 584 129 554 q 133 649 148 615 q 118 721 118 683 q 206 887 118 825 q 406 949 295 949 q 531 937 479 949 q 630 895 583 926 q 598 826 613 860 q 570 754 583 791 l 558 754 q 499 848 548 812 q 388 884 451 884 q 300 858 340 884 q 261 785 261 832 q 366 672 261 717 q 575 583 472 626 q 685 414 685 519 q 657 302 685 354 q 580 216 630 250 q 622 149 602 197 q 643 68 643 101 q 545 -116 643 -51 q 322 -182 447 -182 q 197 -171 255 -182 q 86 -135 138 -161 q 118 39 106 -38 m 197 478 q 310 346 197 400 q 521 249 423 293 q 546 312 546 274 q 433 432 546 379 q 224 528 320 485 q 197 478 201 508 "},"b":{"x_min":79,"x_max":772,"ha":825,"o":"m 89 647 q 84 844 89 712 q 79 1024 79 977 q 136 1018 105 1021 q 192 1015 167 1015 q 249 1018 217 1015 q 306 1023 280 1020 l 299 724 l 299 578 q 389 656 339 630 q 505 683 439 683 q 704 581 637 683 q 772 340 772 479 q 694 88 772 191 q 470 -15 617 -15 q 340 15 400 -15 q 237 104 280 45 q 202 74 215 87 q 136 1 190 62 l 79 1 q 84 357 79 132 q 89 647 89 583 m 430 586 q 318 512 346 586 q 291 338 291 438 q 316 162 291 238 q 424 86 342 86 q 528 159 503 86 q 554 331 554 233 q 531 510 554 434 q 430 586 508 586 "},"q":{"x_min":51,"x_max":741,"ha":825,"o":"m 331 -15 q 121 81 191 -15 q 51 323 51 177 q 117 576 51 469 q 323 683 184 683 q 523 580 446 683 l 523 605 q 516 666 523 631 q 586 660 568 661 q 627 659 604 659 q 741 666 675 659 q 738 416 741 561 q 732 125 735 271 q 730 -124 730 -19 q 735 -246 730 -164 q 741 -371 741 -328 q 687 -363 718 -366 q 628 -361 656 -361 q 563 -363 581 -361 q 514 -372 545 -365 l 523 -58 l 523 85 q 437 10 482 35 q 331 -15 392 -15 m 386 81 q 484 135 452 81 q 523 261 516 189 l 523 300 q 523 351 523 330 q 523 392 523 372 q 490 518 523 460 q 393 576 458 576 q 290 502 314 576 q 266 327 266 429 q 288 155 266 229 q 386 81 310 81 "},"Ω":{"x_min":36,"x_max":1174.890625,"ha":1211,"o":"m 1173 129 q 1170 103 1170 116 q 1170 83 1170 90 l 1170 70 q 1170 36 1170 52 q 1174 0 1170 19 l 953 4 l 715 0 l 715 103 q 848 251 813 162 q 883 473 883 340 q 815 741 883 623 q 607 860 747 860 q 396 738 461 860 q 331 457 331 616 q 369 245 331 339 q 496 102 407 152 l 496 0 l 256 4 l 36 0 l 38 80 l 36 129 q 264 113 151 113 q 128 258 172 167 q 85 464 85 350 q 235 821 85 693 q 622 949 386 949 q 988 830 846 949 q 1130 491 1130 712 q 1082 272 1130 363 q 928 112 1034 180 q 1173 129 1049 112 "},"ύ":{"x_min":82,"x_max":765,"ha":843,"o":"m 765 415 q 663 114 765 244 q 400 -15 561 -15 q 162 56 242 -15 q 82 284 82 128 l 86 479 q 84 590 86 523 q 82 666 82 656 q 145 663 99 666 q 195 661 191 661 q 263 663 216 661 q 311 666 309 666 q 295 477 301 566 q 290 294 290 387 q 310 122 290 193 q 402 52 330 52 q 515 146 487 52 q 544 351 544 240 q 525 502 544 433 q 469 656 507 570 q 580 659 528 656 q 684 672 632 662 q 743 547 721 613 q 765 415 765 482 m 548 953 q 601 1001 581 986 q 651 1017 621 1017 q 702 994 681 1017 q 723 943 723 972 q 704 897 723 916 q 655 863 685 878 l 431 755 l 362 755 l 548 953 "},"Ö":{"x_min":40,"x_max":1087,"ha":1129,"o":"m 577 949 q 946 829 805 949 q 1087 486 1087 710 q 942 115 1087 246 q 552 -15 798 -15 q 176 107 313 -15 q 40 465 40 229 q 188 823 40 697 q 577 949 337 949 m 434 1242 q 501 1215 473 1242 q 529 1148 529 1189 q 502 1079 529 1108 q 435 1050 476 1050 q 366 1079 396 1050 q 337 1148 337 1109 q 366 1214 337 1186 q 434 1242 395 1242 m 693 1242 q 761 1215 733 1242 q 789 1148 789 1189 q 762 1079 789 1108 q 695 1050 736 1050 q 627 1079 655 1050 q 600 1148 600 1108 q 627 1214 600 1186 q 693 1242 655 1242 m 562 71 q 774 194 706 71 q 843 470 843 318 q 774 742 843 623 q 563 861 706 861 q 353 741 420 861 q 287 465 287 622 q 354 191 287 312 q 562 71 421 71 "},"z":{"x_min":19.4375,"x_max":640.28125,"ha":664,"o":"m 19 75 q 118 216 33 94 q 257 415 204 337 q 359 567 311 493 l 255 568 q 151 562 205 568 q 65 552 97 556 l 68 608 l 65 667 l 337 660 q 507 663 404 660 q 627 666 611 666 l 627 588 q 515 441 573 519 q 399 276 458 362 q 280 98 340 190 l 375 96 q 506 101 418 96 q 640 107 595 107 q 638 76 638 93 q 637 51 637 59 l 637 34 l 640 0 q 459 3 568 0 q 333 7 351 7 q 147 3 259 7 q 19 0 36 0 l 19 75 "},"™":{"x_min":136,"x_max":964,"ha":1138,"o":"m 461 975 l 461 900 l 350 900 l 350 610 l 249 610 l 249 900 l 136 900 l 136 975 l 461 975 m 666 974 l 751 751 l 833 974 l 964 975 l 964 610 l 874 610 l 874 882 l 772 610 l 730 610 l 625 881 l 625 610 l 535 610 l 535 975 l 666 974 "},"ή":{"x_min":80,"x_max":727,"ha":808,"o":"m 91 339 q 85 512 91 391 q 80 667 80 632 q 137 661 125 662 q 180 661 149 661 q 244 663 199 661 q 293 666 290 666 l 293 568 q 391 651 338 622 q 511 681 443 681 q 660 622 602 681 q 719 471 719 564 l 719 327 l 719 -50 q 723 -219 719 -107 q 727 -374 727 -332 q 618 -365 670 -365 q 502 -373 562 -365 l 512 16 l 512 251 l 512 368 q 491 499 512 446 q 408 552 471 552 q 319 488 342 552 q 302 419 305 457 q 299 330 299 382 q 304 148 299 264 q 309 0 309 33 q 243 3 278 0 q 195 6 207 6 q 127 3 163 6 q 80 0 92 0 q 85 188 80 65 q 91 339 91 311 m 552 953 q 605 1001 585 986 q 654 1017 625 1017 q 706 994 685 1017 q 727 943 727 972 q 708 897 727 916 q 658 863 689 878 l 435 756 l 366 756 l 552 953 "},"Θ":{"x_min":40,"x_max":1087,"ha":1129,"o":"m 51 585 q 235 855 85 761 q 577 949 385 949 q 944 829 802 949 q 1087 487 1087 710 q 941 116 1087 247 q 552 -15 796 -15 q 176 107 313 -15 q 40 465 40 229 q 41 510 40 492 q 51 585 42 528 m 559 73 q 771 194 703 73 q 840 472 840 315 q 773 742 840 624 q 566 860 706 860 q 353 742 420 860 q 287 465 287 624 q 353 193 287 314 q 559 73 419 73 m 566 525 q 678 528 610 525 q 755 532 745 532 l 754 539 l 754 472 l 754 403 l 755 407 l 563 414 l 373 407 l 373 469 l 373 531 q 484 528 416 531 q 566 525 553 525 "},"®":{"x_min":72,"x_max":1065,"ha":1138,"o":"m 1065 488 q 917 139 1065 285 q 567 -6 770 -6 q 219 139 366 -6 q 72 488 72 285 q 219 836 72 688 q 567 985 367 985 q 917 839 770 985 q 1065 488 1065 693 m 155 488 q 276 197 155 320 q 566 75 398 75 q 858 197 734 75 q 983 487 983 320 q 860 780 983 656 q 567 904 738 904 q 277 780 399 904 q 155 488 155 656 m 577 774 q 741 740 670 774 q 812 625 812 707 q 778 527 812 569 q 692 468 745 484 l 811 223 l 666 222 l 561 447 l 497 447 l 497 223 l 361 223 l 361 774 l 577 774 m 497 528 l 562 528 q 641 546 609 528 q 673 608 673 564 q 655 660 673 638 q 607 685 638 682 q 555 691 584 691 l 497 691 l 497 528 "},"É":{"x_min":90,"x_max":644.15625,"ha":703,"o":"m 108 223 l 108 465 q 104 713 108 622 q 91 933 101 804 l 357 929 l 644 933 l 640 872 l 644 811 q 530 816 606 811 q 415 822 453 822 l 340 822 q 337 663 340 774 q 334 545 334 551 l 634 557 q 631 521 634 546 q 628 493 628 496 q 630 458 628 477 q 634 429 633 440 q 476 436 587 429 q 334 444 365 444 l 334 294 q 335 203 334 249 q 340 111 336 156 q 483 114 419 111 q 640 128 546 118 q 634 65 634 100 q 635 37 634 47 q 640 0 635 27 q 427 3 556 0 q 280 7 298 7 q 169 3 242 7 q 90 0 95 0 q 102 117 97 59 q 108 223 108 175 m 410 1222 q 465 1272 445 1257 q 515 1288 485 1288 q 566 1265 545 1288 q 587 1215 587 1243 q 568 1169 587 1189 q 519 1133 549 1148 l 294 1025 l 225 1025 l 410 1222 "},"~":{"x_min":266,"x_max":1091,"ha":1367,"o":"m 1091 938 q 1033 721 1091 807 q 847 636 975 636 q 661 720 757 636 q 518 805 564 805 q 427 756 453 805 q 402 636 402 708 l 266 636 q 327 849 266 761 q 510 938 388 938 q 696 853 599 938 q 846 768 793 768 q 933 815 911 768 q 956 938 956 863 l 1091 938 "},"Ε":{"x_min":90,"x_max":644.15625,"ha":703,"o":"m 108 222 l 108 465 q 104 710 108 620 q 91 932 101 800 l 357 926 q 520 929 405 926 q 644 932 634 932 q 640 903 641 916 q 638 872 638 890 q 639 848 638 857 q 644 810 640 840 q 530 815 606 810 q 414 820 453 820 l 338 820 l 334 545 l 634 557 q 630 527 631 541 q 628 494 628 514 l 633 431 q 459 437 571 431 q 334 444 347 444 l 334 296 q 336 190 334 264 q 338 113 338 115 q 638 129 489 113 l 634 63 l 638 0 q 433 3 562 0 q 278 7 305 7 q 169 3 235 7 q 90 0 102 0 q 102 114 96 54 q 108 222 108 175 "},"³":{"x_min":18,"x_max":448,"ha":494,"o":"m 242 899 q 370 867 315 899 q 425 770 425 836 q 399 699 425 730 q 301 645 373 667 q 403 605 359 642 q 448 512 448 569 q 375 384 448 426 q 210 342 303 342 q 108 352 152 342 q 18 391 65 362 q 88 505 60 451 l 98 505 q 119 420 98 452 q 191 388 141 388 q 263 421 237 388 q 290 501 290 454 q 262 580 290 549 q 186 612 235 612 l 151 612 l 151 660 l 181 658 q 259 684 228 658 q 290 759 290 710 q 268 828 290 800 q 207 856 246 856 q 141 821 163 856 q 119 742 119 787 l 110 736 q 26 815 75 777 q 120 876 53 854 q 242 899 187 899 "},"[":{"x_min":104,"x_max":415.109375,"ha":454,"o":"m 409 883 l 415 852 l 261 855 l 257 541 q 261 212 257 433 q 266 -86 266 -8 l 327 -88 l 415 -88 l 409 -117 q 415 -162 409 -142 l 261 -157 l 104 -164 q 110 154 104 -50 q 117 383 117 359 q 110 703 117 496 q 104 933 104 909 q 194 929 138 933 q 258 926 249 926 q 347 929 284 926 q 415 933 410 933 q 409 883 409 911 "},"L":{"x_min":91,"x_max":639.609375,"ha":650,"o":"m 109 465 q 105 710 109 620 q 91 932 102 800 l 216 927 l 350 931 q 337 618 337 783 l 337 296 q 337 201 337 249 q 341 113 337 153 q 639 129 491 113 l 635 63 l 639 0 q 434 3 563 0 q 279 7 306 7 q 170 3 236 7 q 91 0 103 0 q 105 209 102 102 q 109 465 109 316 "},"σ":{"x_min":30,"x_max":832,"ha":826,"o":"m 679 557 q 730 451 724 495 q 738 384 736 407 q 741 339 741 361 q 738 277 741 295 q 726 190 736 259 q 617 53 716 121 q 385 -15 518 -15 q 126 78 223 -15 q 30 336 30 172 q 127 588 30 494 q 384 683 224 683 q 536 671 432 683 q 677 660 639 660 q 765 663 705 660 q 831 666 825 666 q 827 611 827 637 l 827 594 l 832 552 l 702 557 l 679 557 m 256 333 q 269 174 256 248 q 304 88 275 124 q 381 52 332 52 q 475 104 443 52 q 508 221 508 156 q 512 258 509 235 q 515 323 515 282 q 512 411 515 370 q 508 444 509 427 q 479 563 508 511 q 389 615 450 615 q 299 565 327 615 q 263 450 271 516 q 256 333 256 384 "},"ζ":{"x_min":64,"x_max":667,"ha":656,"o":"m 231 360 l 231 340 l 231 314 q 343 192 231 217 q 554 162 448 176 q 667 24 667 133 q 628 -103 667 -42 q 525 -221 589 -164 l 458 -181 q 505 -114 493 -134 q 521 -63 516 -95 q 375 13 521 -6 q 146 71 229 33 q 64 260 64 110 q 123 495 64 382 q 257 692 182 608 q 467 905 333 776 q 278 903 353 905 q 122 893 204 901 l 126 958 l 122 1024 q 255 1019 166 1024 q 389 1015 344 1015 q 511 1019 429 1015 q 635 1024 593 1024 l 630 978 l 634 934 q 433 764 520 848 q 288 578 346 680 q 231 360 231 476 "},"θ":{"x_min":34,"x_max":710,"ha":749,"o":"m 710 450 q 636 110 710 240 q 367 -19 562 -19 q 104 103 175 -19 q 34 434 34 226 q 106 774 34 641 q 368 908 178 908 q 637 785 565 908 q 710 450 710 662 m 370 416 q 305 413 351 416 q 255 410 259 410 q 257 322 255 371 q 266 208 259 273 q 292 96 272 143 q 370 49 312 49 q 429 72 406 49 q 463 135 452 96 q 479 263 474 192 q 484 410 484 335 q 418 413 464 410 q 370 416 372 416 m 484 601 q 464 769 484 698 q 372 840 445 840 q 277 759 300 840 q 255 560 255 679 l 255 492 l 372 488 l 488 492 l 484 601 "},"Ο":{"x_min":40,"x_max":1086,"ha":1129,"o":"m 577 949 q 945 829 804 949 q 1086 486 1086 710 q 942 114 1086 244 q 552 -15 798 -15 q 176 107 313 -15 q 40 465 40 229 q 188 823 40 697 q 577 949 337 949 m 562 73 q 773 194 706 73 q 840 472 840 315 q 773 742 840 624 q 566 860 706 860 q 353 742 420 860 q 287 465 287 624 q 353 193 287 313 q 562 73 420 73 "},"Γ":{"x_min":91,"x_max":639.609375,"ha":650,"o":"m 232 926 l 449 926 l 639 932 l 635 866 l 639 802 q 485 815 548 812 q 341 819 423 819 q 338 769 339 805 q 337 681 337 734 l 337 635 l 337 312 q 339 138 337 195 q 351 0 341 81 l 216 4 l 91 0 q 100 238 91 70 q 109 465 109 406 q 105 713 109 613 q 91 932 102 813 q 161 929 114 932 q 232 926 209 926 "}," ":{"x_min":0,"x_max":0,"ha":375},"%":{"x_min":28,"x_max":1085,"ha":1122,"o":"m 265 910 q 434 844 369 910 q 500 672 500 779 q 435 496 500 562 q 258 431 370 431 q 91 498 154 431 q 28 669 28 565 q 93 843 28 776 q 265 910 158 910 m 831 1015 l 917 1014 l 272 -125 l 184 -125 l 831 1015 m 849 463 q 1020 401 955 463 q 1085 230 1085 339 q 1023 51 1085 117 q 845 -15 961 -15 q 677 51 742 -15 q 612 222 612 118 q 675 398 612 333 q 849 463 738 463 m 196 561 q 214 505 196 532 q 261 478 232 478 q 297 489 280 478 q 323 525 314 501 q 335 586 332 548 q 339 669 339 625 q 337 723 339 697 q 332 780 336 749 q 311 836 327 811 q 264 861 296 861 q 204 820 222 861 q 191 752 194 786 q 188 669 188 719 q 196 561 188 615 m 779 112 q 797 57 779 83 q 847 31 816 31 q 895 59 873 31 q 916 114 916 87 q 922 222 922 162 q 922 275 922 248 q 915 338 917 312 q 896 389 912 364 q 848 414 880 414 q 812 404 827 414 q 791 375 797 394 q 776 312 780 347 q 772 241 772 276 l 772 222 q 772 183 772 201 q 779 112 773 165 "},"P":{"x_min":91,"x_max":765,"ha":801,"o":"m 334 201 q 335 129 334 148 q 348 0 336 110 q 272 3 317 0 q 219 6 226 6 q 143 3 189 6 q 91 0 97 0 q 104 212 100 112 q 108 462 108 313 q 99 725 108 549 q 91 933 91 900 q 161 929 111 933 q 215 925 211 925 l 395 933 l 445 933 q 677 876 590 933 q 765 681 765 819 q 691 486 765 565 q 544 400 618 408 q 423 390 470 391 q 334 389 375 389 l 334 201 m 536 669 q 498 788 536 741 q 390 836 461 836 l 334 836 l 334 694 l 334 486 q 485 529 435 486 q 536 669 536 572 "},"Ώ":{"x_min":-28,"x_max":1452.5625,"ha":1489,"o":"m 1451 129 q 1448 104 1448 117 q 1448 83 1448 90 l 1448 70 q 1448 36 1448 52 q 1452 0 1448 19 l 1231 4 l 993 0 l 993 103 q 1126 251 1091 162 q 1161 473 1161 340 q 1092 741 1161 623 q 884 860 1024 860 q 673 738 738 860 q 608 457 608 616 q 646 245 608 339 q 774 102 684 152 l 774 0 l 534 4 l 314 0 l 316 80 l 313 129 q 542 113 429 113 q 405 258 449 167 q 362 464 362 350 q 512 821 362 693 q 899 949 663 949 q 1266 830 1124 949 q 1408 491 1408 712 q 1360 272 1408 363 q 1206 112 1312 180 q 1451 129 1327 112 m 158 953 q 211 1001 191 986 q 259 1017 231 1017 q 312 994 291 1017 q 333 943 333 972 q 314 897 333 916 q 265 863 295 878 l 40 755 l -28 755 l 158 953 "},"Έ":{"x_min":-28,"x_max":1020.609375,"ha":1078,"o":"m 485 222 l 485 465 q 481 710 485 620 q 467 931 478 800 l 733 926 q 896 929 781 926 q 1020 932 1010 932 q 1016 903 1017 916 q 1015 872 1015 890 q 1015 848 1015 857 q 1020 810 1016 839 q 906 815 983 810 q 791 820 830 820 l 715 820 l 711 544 l 1010 556 q 1006 527 1008 540 q 1005 493 1005 513 l 1009 430 q 836 436 948 430 q 711 443 724 443 l 711 296 q 713 189 711 264 q 715 113 715 115 q 1015 129 865 113 l 1010 63 l 1015 0 q 810 3 938 0 q 655 7 681 7 q 545 3 612 7 q 466 0 478 0 q 478 114 472 54 q 485 222 485 175 m 158 953 q 212 1001 191 986 q 260 1017 232 1017 q 313 994 292 1017 q 334 943 334 972 q 315 897 334 916 q 265 863 296 878 l 40 755 l -28 755 l 158 953 "},"_":{"x_min":0,"x_max":683.328125,"ha":683,"o":"m 683 -184 l 683 -322 l 0 -322 l 0 -184 l 683 -184 "},"Ϊ":{"x_min":-1,"x_max":450,"ha":449,"o":"m 110 402 q 103 709 110 511 q 97 932 97 908 q 161 926 130 929 q 220 923 192 923 q 287 927 242 923 q 351 931 331 931 q 343 688 351 859 q 336 465 336 516 q 343 221 336 391 q 351 0 351 51 q 283 2 330 0 q 212 5 236 5 l 97 0 q 103 233 97 83 q 110 402 110 383 m 93 1242 q 160 1215 132 1242 q 188 1148 188 1189 q 162 1078 188 1107 q 97 1050 136 1050 q 28 1079 57 1050 q -1 1148 -1 1108 q 26 1214 -1 1186 q 93 1242 54 1242 m 352 1242 q 421 1214 393 1242 q 450 1148 450 1187 q 423 1079 450 1108 q 356 1050 397 1050 q 286 1078 316 1050 q 257 1148 257 1107 q 286 1214 257 1186 q 352 1242 315 1242 "},"+":{"x_min":169,"x_max":968,"ha":1138,"o":"m 636 813 l 636 473 l 968 473 l 968 340 l 636 340 l 636 0 l 501 0 l 501 340 l 169 340 l 169 473 l 501 473 l 501 813 l 636 813 "},"½":{"x_min":68,"x_max":1145.765625,"ha":1171,"o":"m 207 481 l 207 736 l 207 808 q 150 784 180 798 q 103 763 120 770 l 68 813 q 195 860 131 834 q 331 918 259 886 l 348 909 q 346 744 348 844 q 344 644 344 645 l 345 650 l 345 505 l 345 511 q 345 458 345 480 q 349 391 345 437 l 299 394 q 247 392 281 394 q 198 391 213 391 l 207 481 m 844 1014 l 928 1014 l 326 -124 l 243 -124 l 844 1014 m 721 42 q 908 194 839 122 q 977 365 977 266 q 962 434 977 408 q 905 460 947 460 q 840 427 864 460 q 805 345 816 395 l 795 345 q 768 379 789 358 q 727 418 747 400 q 822 487 773 465 q 936 510 870 510 q 1068 474 1012 510 q 1124 365 1124 439 q 1035 209 1124 271 q 890 110 947 147 l 970 109 q 1070 111 999 109 q 1145 114 1140 114 q 1134 48 1134 80 q 1138 23 1134 37 q 1144 0 1143 9 l 1006 3 l 729 3 l 721 42 "},"Ρ":{"x_min":91,"x_max":765,"ha":801,"o":"m 334 201 q 335 129 334 148 q 348 0 336 110 q 272 3 317 0 q 219 6 226 6 q 143 3 189 6 q 91 0 97 0 q 104 212 100 112 q 108 462 108 313 q 99 725 108 549 q 91 933 91 900 q 161 929 111 933 q 215 925 211 925 l 395 933 l 445 933 q 677 876 590 933 q 765 681 765 819 q 691 486 765 565 q 544 400 618 408 q 423 390 470 391 q 334 389 375 389 l 334 201 m 536 669 q 498 788 536 741 q 390 836 461 836 l 334 836 l 334 694 l 334 486 q 485 529 435 486 q 536 669 536 572 "},"'":{"x_min":72.21875,"x_max":337.5,"ha":375,"o":"m 72 528 l 152 848 q 184 919 159 889 q 245 949 209 949 q 311 923 284 949 q 337 861 337 898 q 315 797 337 827 l 112 511 l 72 528 "},"T":{"x_min":8,"x_max":738,"ha":749,"o":"m 493 818 q 490 723 493 790 q 487 652 487 656 q 490 427 487 529 q 498 201 494 326 q 503 0 503 77 q 438 2 482 0 q 374 5 395 5 q 317 3 351 5 q 244 0 284 1 q 252 266 244 88 q 261 476 261 444 q 258 670 261 533 q 255 818 255 808 q 158 815 188 818 q 8 801 128 813 l 12 872 l 8 932 q 198 927 70 932 q 373 922 327 922 q 572 927 445 922 q 738 932 700 932 l 733 870 l 738 801 q 493 818 614 818 "},"Φ":{"x_min":36,"x_max":1093,"ha":1129,"o":"m 445 960 q 513 952 484 955 q 566 950 543 950 q 634 954 599 950 q 683 960 669 958 q 676 909 680 943 q 672 858 672 876 l 751 851 q 998 732 904 829 q 1093 484 1093 634 q 980 206 1093 301 q 672 72 867 112 q 673 31 672 44 q 683 -26 674 19 q 619 -20 653 -23 q 566 -17 585 -17 q 500 -20 535 -17 q 445 -26 465 -24 q 453 17 449 -5 q 458 72 458 40 l 380 82 q 133 205 231 103 q 36 454 36 307 q 150 732 36 636 q 458 858 265 828 q 452 911 458 879 q 445 960 447 943 m 668 700 l 668 467 l 668 234 l 672 171 q 817 266 774 182 q 861 468 861 351 q 817 666 861 583 q 669 764 773 750 l 668 700 m 419 755 q 301 654 336 739 q 267 469 267 570 q 309 267 267 351 q 455 171 351 183 l 458 234 l 462 424 l 458 700 l 458 764 l 419 755 "},"j":{"x_min":-62,"x_max":313,"ha":396,"o":"m 196 660 q 235 660 215 660 q 307 666 254 661 l 306 490 q 309 182 306 369 q 313 -31 313 -4 q 217 -278 313 -195 q -49 -361 121 -361 l -62 -305 q 59 -240 24 -305 q 95 -81 95 -175 l 95 255 q 89 459 95 322 q 84 666 84 597 q 196 660 143 660 m 195 1014 q 272 980 239 1014 q 306 902 306 947 q 273 825 306 858 q 195 793 240 793 q 117 824 150 793 q 84 902 84 856 q 117 980 84 947 q 195 1014 150 1014 "},"Σ":{"x_min":18.0625,"x_max":801.390625,"ha":843,"o":"m 747 865 l 751 804 q 641 808 715 804 q 527 813 568 813 l 369 813 q 481 664 427 733 q 594 519 534 594 q 402 315 496 419 l 304 203 l 544 203 q 672 208 586 203 q 801 214 758 214 l 794 112 q 801 0 794 59 l 456 4 l 18 0 l 18 57 q 261 330 138 181 l 365 461 q 222 657 298 559 q 55 865 147 755 l 55 932 q 243 928 118 932 q 431 924 368 924 q 630 928 511 924 q 751 932 750 932 l 747 865 "},"1":{"x_min":55,"x_max":502,"ha":749,"o":"m 276 616 q 273 680 276 637 q 271 747 271 723 q 197 713 223 726 q 112 666 172 700 l 55 754 q 471 940 291 848 l 498 927 l 492 454 l 493 465 l 493 202 l 493 216 q 497 102 493 178 q 502 0 502 26 l 383 6 q 314 3 362 6 q 264 0 266 0 q 270 359 264 127 q 276 616 276 591 "},"ä":{"x_min":44,"x_max":706.78125,"ha":706,"o":"m 236 -15 q 98 35 153 -15 q 44 169 44 86 q 212 352 44 301 q 401 421 380 403 q 410 439 410 432 q 373 539 410 502 q 275 577 337 577 q 140 511 185 577 l 135 511 l 115 585 q 230 657 164 632 q 365 683 296 683 q 543 623 479 683 q 608 452 608 564 l 604 213 q 604 166 604 184 q 608 123 604 148 q 625 87 612 99 q 658 76 638 76 q 679 80 666 76 q 702 90 691 84 l 706 40 q 643 1 676 14 q 563 -15 610 -10 q 480 5 518 -15 q 419 64 442 25 q 236 -15 350 -15 m 221 976 q 289 948 261 976 q 317 878 317 920 q 290 811 317 839 q 223 784 264 784 q 155 811 186 784 q 125 878 125 839 q 154 946 125 917 q 221 976 183 976 m 481 976 q 549 948 521 976 q 577 878 577 920 q 550 811 577 839 q 483 784 524 784 q 414 812 444 784 q 385 878 385 841 q 412 946 385 917 q 481 976 440 976 m 240 200 q 261 128 240 158 q 321 99 282 99 q 388 131 367 99 q 410 211 410 164 l 410 352 q 287 302 335 338 q 240 200 240 267 "},"<":{"x_min":175,"x_max":959.75,"ha":1138,"o":"m 959 650 l 362 406 l 959 162 l 959 17 l 175 340 l 175 471 l 959 796 l 959 650 "},"£":{"x_min":48,"x_max":734.109375,"ha":749,"o":"m 56 88 q 52 142 56 117 q 48 181 49 167 q 138 198 100 181 q 185 254 177 215 q 193 315 193 292 l 191 429 l 153 429 q 99 425 128 429 q 56 421 70 421 l 61 467 l 56 512 q 113 506 81 508 q 184 504 145 504 q 172 598 172 552 q 259 829 172 748 q 499 910 346 910 q 734 848 623 910 q 710 778 718 809 q 691 695 702 747 l 658 695 q 613 795 645 758 q 523 833 581 833 q 417 787 455 833 q 379 671 379 741 q 384 582 379 637 q 391 504 390 527 l 463 504 l 480 504 q 519 504 500 504 q 598 512 538 505 l 593 466 l 598 422 l 493 429 l 391 429 q 343 288 382 340 q 219 184 303 236 l 542 189 l 724 195 q 716 146 720 174 q 711 98 711 117 q 713 62 711 78 q 724 0 716 45 q 557 3 667 0 q 391 8 448 8 q 220 3 334 8 q 48 0 106 0 q 52 46 49 16 q 56 88 56 77 "},"¹":{"x_min":66,"x_max":360,"ha":494,"o":"m 212 726 l 212 802 q 158 781 187 795 q 102 755 129 768 l 66 808 q 206 857 157 838 q 342 919 256 876 l 356 910 l 356 627 l 356 638 l 356 477 l 356 484 q 356 429 356 451 q 360 354 356 408 l 307 358 l 202 354 q 210 520 209 418 q 212 634 212 623 l 212 726 "},"t":{"x_min":9,"x_max":468.71875,"ha":463,"o":"m 9 584 l 10 627 l 10 671 q 54 667 25 668 q 102 667 84 667 l 102 687 l 102 704 q 95 823 102 765 q 192 859 147 839 q 298 914 237 880 l 327 914 q 319 853 323 890 q 315 791 315 816 l 315 667 l 344 667 q 433 670 387 667 l 430 629 l 430 582 l 309 584 l 309 226 q 322 107 309 149 q 393 65 335 65 q 468 72 427 65 l 463 9 q 381 -11 425 -4 q 292 -18 336 -18 q 145 25 196 -18 q 95 165 95 69 q 98 410 95 260 q 102 583 102 559 l 9 584 "},"λ":{"x_min":22.609375,"x_max":662.890625,"ha":686,"o":"m 550 0 l 433 0 q 394 177 417 79 q 360 323 372 275 q 318 490 349 372 q 234 238 269 359 q 179 0 199 116 l 103 0 l 22 0 q 109 214 69 109 q 182 416 149 318 q 264 662 215 514 q 214 834 247 760 q 111 909 180 909 q 80 903 99 909 q 51 895 61 898 l 32 964 q 121 1008 76 993 q 215 1024 167 1024 q 384 925 342 1024 q 458 718 426 826 l 529 459 l 662 0 l 550 0 "},"ù":{"x_min":75,"x_max":722,"ha":808,"o":"m 474 757 l 249 865 q 198 900 216 883 q 181 946 181 917 q 203 998 181 977 q 256 1019 225 1019 q 303 1003 282 1019 q 356 955 324 987 l 542 757 l 474 757 m 292 -15 q 142 41 202 -15 q 83 189 83 98 l 83 337 q 79 509 83 394 q 75 668 75 624 q 134 661 108 663 q 185 659 160 659 q 240 662 209 659 q 300 668 271 665 q 290 455 290 570 l 290 384 l 290 279 q 316 146 290 181 q 394 111 343 111 q 467 147 441 111 q 501 234 493 184 l 501 330 q 499 488 501 415 q 495 668 497 562 q 554 662 518 665 q 613 659 589 659 q 671 662 640 659 q 722 668 701 665 q 717 505 722 625 q 712 326 712 386 q 717 156 712 270 q 722 1 722 43 l 617 4 l 511 1 l 511 96 q 410 15 468 46 q 292 -15 353 -15 "},"W":{"x_min":-8.328125,"x_max":1325,"ha":1326,"o":"m -8 932 q 67 929 13 932 q 125 926 120 926 q 190 929 147 926 q 255 932 233 932 q 300 737 277 829 q 357 519 323 644 q 419 298 391 394 q 504 548 455 403 q 576 759 554 693 q 633 932 598 825 l 711 926 q 756 929 726 926 q 802 932 787 932 q 859 729 836 807 q 913 557 881 651 q 998 297 944 462 q 1166 932 1094 604 l 1248 926 q 1298 929 1280 926 q 1325 932 1316 932 l 1230 643 l 1019 0 q 972 4 983 4 q 937 5 962 5 q 884 2 904 5 q 855 0 865 0 q 793 200 831 80 q 740 363 754 319 l 652 623 q 543 325 594 476 q 441 0 493 175 q 393 3 423 0 q 359 6 363 6 q 308 4 330 6 q 272 0 286 1 q 184 320 222 191 q 107 576 147 450 q -8 932 68 703 "},"ï":{"x_min":-26,"x_max":422,"ha":396,"o":"m 93 126 l 93 542 q 87 601 93 557 q 82 666 82 645 q 141 660 111 663 q 198 658 172 658 q 255 661 223 658 q 316 666 287 663 q 311 621 315 658 q 303 544 307 584 l 303 319 l 303 115 l 315 0 l 195 2 l 81 0 q 93 126 93 66 m 68 976 q 134 947 107 976 q 162 878 162 918 q 136 811 162 839 q 71 784 111 784 q 2 811 31 784 q -26 878 -26 838 q 1 946 -26 917 q 68 976 29 976 m 327 976 q 394 948 366 976 q 422 878 422 920 q 396 811 422 838 q 329 784 370 784 q 260 811 288 784 q 232 878 232 838 q 260 947 232 918 q 327 976 288 976 "},">":{"x_min":174.984375,"x_max":961,"ha":1138,"o":"m 961 472 l 961 340 l 175 17 l 175 162 l 773 406 l 174 650 l 174 796 l 961 472 "},"v":{"x_min":0,"x_max":669.453125,"ha":667,"o":"m 0 667 q 75 663 26 667 q 131 659 123 659 q 202 663 156 659 q 255 667 247 667 l 293 528 l 387 223 q 526 667 473 447 l 595 659 q 637 663 611 659 q 669 667 663 667 q 541 343 602 505 q 418 0 480 181 q 368 4 395 2 q 330 6 341 6 q 279 3 311 6 q 244 0 248 0 q 129 340 184 186 q 0 667 73 494 "},"τ":{"x_min":9,"x_max":654.84375,"ha":661,"o":"m 446 557 l 445 521 l 445 108 q 456 0 445 55 l 338 4 l 225 0 q 234 69 231 40 q 237 125 237 98 l 237 320 l 237 516 l 237 557 q 59 459 115 557 l 24 459 q 20 516 24 490 q 9 581 17 543 q 122 641 59 625 q 263 658 185 658 l 440 656 q 654 667 556 656 q 649 610 649 641 q 654 554 649 580 q 525 555 603 554 q 446 557 447 557 "},"û":{"x_min":75,"x_max":722,"ha":808,"o":"m 339 1004 l 463 1004 l 616 757 l 549 757 l 400 879 l 254 757 l 186 757 l 339 1004 m 292 -15 q 142 41 202 -15 q 83 189 83 98 l 83 337 q 79 509 83 394 q 75 668 75 625 q 134 662 108 664 q 185 660 160 660 q 240 662 209 660 q 300 668 271 665 q 290 455 290 570 l 290 384 l 290 279 q 316 146 290 181 q 394 111 343 111 q 467 147 441 111 q 501 234 493 184 l 501 330 q 499 488 501 415 q 495 668 497 562 q 554 662 518 665 q 613 660 589 660 q 671 662 640 660 q 722 668 701 665 q 717 505 722 625 q 712 326 712 386 q 717 156 712 270 q 722 1 722 43 l 617 4 l 511 1 l 511 96 q 410 15 468 46 q 292 -15 353 -15 "},"ξ":{"x_min":53,"x_max":675,"ha":675,"o":"m 559 813 q 508 904 534 873 q 432 936 482 936 q 335 887 372 936 q 299 776 299 838 q 372 648 299 683 q 550 614 446 614 l 546 569 l 546 525 l 455 528 q 320 498 379 528 q 251 432 261 469 q 240 386 241 396 q 239 360 239 376 q 240 322 239 335 q 244 304 241 310 q 363 205 258 226 q 569 165 469 183 q 675 25 675 130 q 647 -83 675 -27 q 536 -221 619 -139 l 468 -181 q 514 -114 498 -141 q 531 -55 531 -88 q 380 23 531 -5 q 141 98 229 53 q 53 287 53 143 q 113 467 53 390 q 274 586 173 544 q 144 666 196 615 q 92 790 92 716 q 180 962 92 901 q 389 1024 269 1024 q 515 1009 455 1024 q 640 963 575 994 q 620 886 632 936 q 604 809 608 836 l 559 813 "},"&":{"x_min":50,"x_max":948.609375,"ha":974,"o":"m 316 -18 q 128 44 206 -18 q 50 215 50 107 q 115 388 50 315 q 281 502 180 462 q 216 609 243 547 q 190 723 190 670 q 266 877 190 823 q 446 932 342 932 q 604 889 537 932 q 672 761 672 847 q 621 631 672 687 q 495 541 571 576 q 709 295 593 412 q 786 421 751 348 q 845 567 822 494 q 880 517 861 538 q 934 463 899 495 q 851 336 888 387 q 761 233 813 285 q 856 123 811 174 q 948 26 902 71 l 948 1 q 860 7 887 6 q 817 8 833 8 q 756 6 779 8 q 690 1 734 5 l 612 92 q 469 11 545 40 q 316 -18 394 -18 m 232 284 q 284 160 232 214 q 408 106 337 106 q 484 118 449 106 q 562 155 519 130 q 421 323 469 264 q 330 443 373 382 q 258 373 284 411 q 232 284 232 336 m 547 759 q 522 831 547 802 q 453 860 498 860 q 419 854 435 860 q 379 823 394 850 q 365 769 365 797 q 383 697 365 740 q 449 597 402 654 q 520 668 493 627 q 547 759 547 709 "},"Λ":{"x_min":-19.4375,"x_max":856.953125,"ha":836,"o":"m 583 700 l 856 0 q 781 3 823 0 q 723 6 740 6 q 645 3 688 6 q 587 0 602 0 q 563 90 579 43 q 538 163 547 137 l 359 637 l 189 161 q 142 0 163 87 l 72 5 q 35 4 48 5 q -19 0 23 4 q 25 92 -2 33 q 83 226 52 151 l 272 698 q 311 810 290 747 q 348 932 331 873 q 394 927 379 929 q 423 926 409 926 q 474 929 456 926 q 501 932 491 932 q 583 700 536 819 "},"I":{"x_min":94,"x_max":354,"ha":447,"o":"m 111 402 q 107 716 111 609 q 94 932 103 822 q 161 925 124 929 q 220 922 198 922 q 292 927 245 922 q 353 931 339 932 q 340 716 343 819 q 337 465 337 613 q 340 221 337 326 q 354 0 344 116 q 273 2 330 0 q 214 5 216 5 l 95 0 q 107 199 103 88 q 111 402 111 311 "},"G":{"x_min":43,"x_max":948,"ha":1015,"o":"m 552 -15 q 183 110 324 -15 q 43 461 43 236 q 195 823 43 693 q 583 954 347 954 q 763 932 679 954 q 929 865 848 911 q 879 697 895 784 l 862 697 q 749 816 818 772 q 595 860 680 860 q 390 769 471 860 q 300 608 309 679 q 289 513 291 536 q 287 469 287 490 q 289 404 287 426 q 294 375 292 382 q 389 167 310 250 q 590 84 468 84 q 713 100 651 84 q 699 430 713 272 q 824 423 768 423 q 948 431 886 423 q 942 323 948 395 q 937 214 937 251 q 939 118 937 185 q 942 47 942 51 q 746 1 839 17 q 552 -15 652 -15 "},"ΰ":{"x_min":39,"x_max":768,"ha":843,"o":"m 768 415 q 666 114 768 244 q 404 -15 565 -15 q 165 56 246 -15 q 85 284 85 127 l 89 478 q 87 589 89 523 q 85 666 85 656 q 148 663 102 666 q 198 661 194 661 q 266 663 219 661 q 314 666 312 666 q 298 476 304 566 q 293 294 293 387 q 313 122 293 193 q 405 52 333 52 q 518 146 490 52 q 547 351 547 240 q 528 502 547 433 q 472 656 510 570 q 583 659 531 656 q 687 672 636 662 q 746 547 725 613 q 768 415 768 481 m 121 961 q 179 935 155 961 q 203 877 203 910 q 179 820 203 844 q 121 797 155 797 q 64 820 89 797 q 39 879 39 844 q 62 935 39 910 q 121 961 86 961 m 462 1017 q 504 998 486 1017 q 522 957 522 980 q 508 919 522 935 q 470 886 494 903 l 282 755 l 224 755 l 368 950 q 413 998 391 979 q 462 1017 434 1017 m 657 961 q 713 935 688 961 q 739 877 739 910 q 715 820 739 844 q 658 797 691 797 q 600 820 625 797 q 575 879 575 844 q 599 936 575 912 q 657 961 623 961 "},"`":{"x_min":65.671875,"x_max":330.9375,"ha":375,"o":"m 251 613 q 217 540 240 569 q 153 512 193 512 q 92 537 118 512 q 65 598 65 562 q 87 665 65 634 l 292 949 l 330 933 l 251 613 "},"Υ":{"x_min":-30,"x_max":797,"ha":747,"o":"m 136 650 q 67 772 123 672 q -30 932 10 872 l 92 926 q 184 929 120 926 q 256 931 249 931 q 345 740 304 825 q 442 554 386 656 q 541 730 492 636 q 637 931 589 825 l 712 926 q 753 929 726 926 q 797 931 781 931 q 644 689 714 812 q 498 420 573 566 l 502 143 l 508 0 l 414 5 l 256 0 q 262 138 256 50 q 269 237 269 226 l 269 402 l 136 650 "},"r":{"x_min":80,"x_max":505,"ha":521,"o":"m 91 326 q 85 495 91 381 q 80 666 80 609 l 181 661 q 246 663 201 661 q 297 666 291 666 q 283 592 287 630 q 280 504 280 554 l 288 504 q 357 632 311 581 q 474 683 403 683 l 505 683 q 495 571 498 631 q 492 457 492 511 q 448 477 471 468 q 406 486 424 486 q 320 439 343 486 q 298 323 298 392 q 300 147 298 208 q 311 0 302 85 q 247 3 288 0 q 195 6 206 6 q 130 3 171 6 q 80 0 88 0 q 85 162 80 53 q 91 326 91 270 "},"x":{"x_min":-4.5625,"x_max":646.828125,"ha":644,"o":"m 155 0 l 84 5 q 28 4 46 5 q -4 0 6 0 q 110 148 55 75 q 223 307 164 222 l 113 498 l 7 667 q 86 663 38 667 q 141 659 134 659 q 215 663 169 659 q 271 667 262 667 l 366 473 q 419 555 398 521 q 481 667 439 590 l 553 659 q 601 663 571 659 q 637 667 631 667 q 537 542 580 598 q 419 384 494 486 l 537 177 q 646 0 588 88 q 571 3 620 0 q 516 6 523 6 q 441 3 489 6 q 385 0 392 0 l 276 218 l 155 0 "},"è":{"x_min":41,"x_max":684.046875,"ha":729,"o":"m 482 98 q 566 112 532 98 q 643 160 600 126 l 661 151 q 643 96 652 125 q 628 40 634 66 q 521 -1 577 11 q 403 -15 466 -15 q 141 79 241 -15 q 41 336 41 173 q 137 586 41 490 q 386 683 234 683 q 608 601 532 683 q 684 373 684 520 l 684 332 l 267 332 q 325 165 267 232 q 482 98 383 98 m 436 754 l 211 862 q 162 896 181 877 q 143 946 143 915 q 165 996 143 976 q 217 1017 186 1017 q 274 996 250 1017 q 320 952 298 975 l 508 754 l 436 754 m 478 411 q 481 444 481 422 q 459 566 481 513 q 377 620 438 620 q 292 562 318 620 q 267 437 267 505 l 267 411 l 478 411 "},"μ":{"x_min":79,"x_max":729,"ha":808,"o":"m 717 322 q 723 136 717 256 q 729 0 729 15 l 629 5 q 564 2 609 5 q 518 0 519 0 l 518 81 q 448 4 479 23 q 384 -15 417 -15 q 333 -4 352 -15 q 288 25 313 7 l 288 34 l 287 -57 l 288 -190 l 287 -180 q 292 -278 287 -212 q 297 -368 297 -344 q 221 -361 240 -361 q 189 -361 201 -361 q 150 -361 168 -361 q 79 -368 131 -362 q 86 -277 83 -323 q 90 -187 90 -231 l 90 116 q 90 303 90 177 q 90 491 90 428 q 86 593 90 530 q 82 667 82 655 q 190 659 139 659 q 255 663 214 659 q 305 666 296 666 q 301 506 305 613 q 297 360 297 398 l 297 260 q 315 142 297 189 q 396 95 334 95 q 486 153 466 95 q 507 299 507 211 q 503 517 507 385 q 500 667 500 650 q 619 659 566 659 q 683 663 645 659 q 729 666 722 666 q 723 465 729 594 q 717 322 717 336 "},"÷":{"x_min":169,"x_max":969,"ha":1139,"o":"m 669 667 q 638 597 669 626 q 566 568 608 568 q 497 597 526 568 q 468 669 468 626 q 497 739 468 710 q 567 769 526 769 q 639 739 610 769 q 669 667 669 710 m 969 474 l 969 342 l 169 342 l 169 474 l 969 474 m 669 144 q 638 73 669 103 q 568 44 608 44 q 497 73 526 44 q 468 142 468 102 q 498 214 468 184 q 568 244 528 244 q 639 216 610 244 q 669 144 669 188 "},"h":{"x_min":80,"x_max":729,"ha":808,"o":"m 509 683 q 660 626 601 683 q 719 477 719 570 l 719 403 l 719 246 q 720 109 719 148 q 729 0 722 70 q 665 2 709 0 q 617 5 620 5 q 551 2 598 5 q 501 0 505 0 q 510 147 508 73 q 513 333 513 221 l 509 426 q 482 516 503 482 q 411 551 461 551 q 356 534 380 551 q 322 489 332 517 q 306 428 312 462 q 301 331 301 394 q 304 166 301 277 q 308 0 308 55 q 244 3 284 0 q 194 6 204 6 q 129 3 171 6 q 80 0 88 0 q 85 255 80 84 q 91 513 91 426 q 85 769 91 598 q 80 1024 80 940 l 180 1018 l 197 1018 q 308 1023 259 1018 q 304 902 308 976 q 301 815 301 827 l 301 583 q 509 683 379 683 "},".":{"x_min":68,"x_max":306,"ha":375,"o":"m 187 221 q 268 186 230 221 q 306 104 306 151 q 270 23 306 61 q 187 -15 235 -15 q 102 18 137 -15 q 68 103 68 51 q 102 186 68 151 q 187 221 137 221 "},"φ":{"x_min":32,"x_max":1012,"ha":1044,"o":"m 418 388 q 477 605 418 528 q 671 683 537 683 q 913 589 814 683 q 1012 352 1012 495 q 902 94 1012 180 q 612 -7 793 9 q 617 -198 612 -69 q 622 -374 622 -326 l 544 -365 q 471 -366 503 -365 q 404 -373 438 -368 q 411 -183 404 -315 q 418 -5 418 -51 q 359 1 377 0 q 320 8 341 2 q 112 118 193 29 q 32 334 32 206 q 123 568 32 488 q 374 669 215 648 q 381 643 376 656 q 393 612 386 629 q 278 504 311 576 q 246 329 246 431 q 285 142 246 223 q 418 61 325 61 l 418 276 l 418 388 m 612 61 q 707 88 670 66 q 763 157 743 109 q 788 255 782 205 q 794 377 794 305 q 791 450 794 416 q 779 528 788 484 q 748 593 770 572 q 696 614 725 614 q 631 564 650 614 q 612 459 612 515 l 612 276 l 612 61 "},";":{"x_min":51.390625,"x_max":347,"ha":447,"o":"m 226 654 q 310 619 274 654 q 347 534 347 584 q 312 450 347 485 q 227 416 277 416 q 142 449 177 416 q 108 534 108 482 q 142 619 108 584 q 226 654 177 654 m 134 120 q 172 203 145 170 q 244 237 200 237 q 313 207 284 237 q 343 137 343 178 q 337 100 343 116 q 319 63 331 84 l 88 -254 l 51 -238 l 134 120 "},"f":{"x_min":8,"x_max":463.5625,"ha":425,"o":"m 381 1024 q 433 1019 413 1024 q 463 1010 453 1012 q 443 934 456 987 q 419 826 430 880 l 412 826 q 362 862 384 850 q 310 874 339 874 q 233 812 233 874 q 258 729 233 773 q 300 658 284 685 l 317 658 q 354 658 336 658 q 428 665 372 659 l 425 669 l 425 641 q 425 607 425 625 q 425 576 425 590 l 356 583 l 306 583 l 306 273 q 308 166 306 200 q 323 0 310 133 q 258 3 299 0 q 209 6 217 6 q 144 3 185 6 q 92 0 102 0 q 102 127 99 51 q 105 272 105 203 l 105 580 l 56 583 l 8 583 l 9 622 l 9 665 q 52 659 29 660 q 105 658 74 658 q 183 904 105 784 q 381 1024 262 1024 "},"“":{"x_min":65.28125,"x_max":609.71875,"ha":654,"o":"m 251 613 q 218 541 243 570 q 154 512 194 512 q 90 537 116 512 q 65 601 65 563 q 87 665 65 634 l 291 949 l 331 933 l 251 613 m 530 613 q 498 542 525 573 q 433 512 472 512 q 371 536 397 512 q 345 598 345 560 q 366 665 345 633 l 570 949 l 609 933 l 530 613 "},"A":{"x_min":-29.171875,"x_max":850,"ha":829,"o":"m 109 322 q 193 530 143 400 q 278 751 244 660 q 351 949 312 843 l 420 944 l 490 949 q 672 450 584 685 q 850 0 759 215 l 716 4 l 580 0 l 551 91 l 497 259 q 398 261 448 259 q 300 264 348 262 l 202 259 q 112 0 162 134 l 22 4 l -29 0 l 109 322 m 354 368 l 464 368 q 416 509 440 446 q 355 662 393 572 q 243 370 295 519 l 354 368 "},"6":{"x_min":40,"x_max":716,"ha":749,"o":"m 463 545 q 646 475 576 545 q 716 293 716 405 q 628 65 716 150 q 398 -19 541 -19 q 133 84 226 -19 q 40 362 40 187 q 160 750 40 590 q 501 911 280 911 q 582 903 544 911 q 670 879 620 895 q 658 812 663 845 q 652 748 652 779 l 643 747 q 579 804 612 784 q 502 825 546 825 q 330 716 383 825 q 278 475 278 608 q 359 528 309 511 q 463 545 409 545 m 383 449 q 297 393 317 449 q 278 257 278 337 q 296 113 278 174 q 381 52 315 52 q 469 110 449 52 q 490 256 490 169 q 469 393 490 337 q 383 449 449 449 "},"‘":{"x_min":68.0625,"x_max":331.9375,"ha":374,"o":"m 251 613 q 218 540 241 569 q 151 512 194 512 q 92 537 116 512 q 68 599 68 563 q 75 632 68 612 q 90 663 81 652 l 293 949 l 331 935 l 251 613 "},"ϊ":{"x_min":-28,"x_max":423,"ha":396,"o":"m 91 126 l 91 543 l 80 666 q 139 661 105 663 q 196 658 173 658 q 264 660 238 658 q 314 666 290 663 q 304 586 307 616 q 301 523 301 557 l 301 113 q 302 72 301 88 q 314 0 304 56 l 195 4 l 81 0 q 87 67 84 30 q 91 126 91 104 m 68 975 q 136 947 108 975 q 164 879 164 919 q 138 811 164 840 q 72 783 112 783 q 2 810 33 783 q -28 879 -28 838 q 0 947 -28 919 q 68 975 27 975 m 328 975 q 395 947 367 975 q 423 879 423 919 q 397 811 423 840 q 331 783 371 783 q 261 810 292 783 q 231 879 231 838 q 258 947 231 919 q 328 975 286 975 "},"π":{"x_min":19,"x_max":957.890625,"ha":965,"o":"m 802 521 l 802 108 l 812 0 l 696 4 l 582 0 q 585 61 582 19 q 589 125 589 102 l 594 320 l 589 557 l 504 563 l 421 557 l 421 520 l 421 108 q 432 0 421 55 l 314 4 l 200 0 q 209 64 206 37 q 213 115 213 91 l 213 315 l 213 514 l 213 557 q 129 531 165 557 q 68 461 93 505 l 33 461 q 31 510 33 497 q 19 603 30 523 q 136 645 75 634 q 273 657 196 657 l 531 657 l 792 657 l 957 667 l 955 612 l 957 552 l 803 557 l 802 521 "},"ά":{"x_min":30,"x_max":827.21875,"ha":878,"o":"m 669 665 l 749 662 l 827 665 q 763 499 782 551 q 720 377 743 447 l 818 0 q 763 6 792 2 q 717 10 733 10 q 662 5 692 10 q 615 0 632 1 l 594 101 q 361 -15 501 -15 q 120 83 210 -15 q 30 334 30 182 q 123 583 30 484 q 368 683 217 683 q 515 647 449 683 q 633 547 582 612 q 651 601 640 563 q 669 665 662 638 m 523 952 q 576 1001 556 986 q 625 1017 596 1017 q 677 994 656 1017 q 698 943 698 972 q 679 896 698 915 q 629 862 660 877 l 406 754 l 337 754 l 523 952 m 383 614 q 313 588 343 614 q 276 523 283 562 q 260 434 265 484 q 256 333 256 385 q 269 174 256 249 q 305 87 275 122 q 385 52 335 52 q 509 144 473 52 q 546 340 546 236 q 522 504 546 428 q 455 597 498 580 q 383 614 411 614 "},"O":{"x_min":40,"x_max":1086,"ha":1129,"o":"m 577 949 q 945 829 804 949 q 1086 486 1086 710 q 942 114 1086 244 q 552 -15 798 -15 q 176 107 313 -15 q 40 465 40 229 q 188 823 40 697 q 577 949 337 949 m 562 73 q 773 194 706 73 q 840 472 840 315 q 773 742 840 624 q 566 860 706 860 q 353 742 420 860 q 287 465 287 624 q 353 193 287 313 q 562 73 420 73 "},"n":{"x_min":80,"x_max":727,"ha":808,"o":"m 91 338 q 85 512 91 391 q 80 667 80 632 q 137 661 125 662 q 180 661 149 661 q 249 661 215 661 q 293 666 279 665 l 293 568 q 391 648 333 616 q 508 681 449 681 q 659 624 600 681 q 719 475 719 567 l 719 329 q 723 172 719 287 q 727 0 727 58 q 673 2 709 0 q 617 5 637 5 q 552 2 598 5 q 502 0 506 0 q 507 175 502 58 q 512 333 512 291 l 512 358 q 508 426 512 393 q 483 514 508 476 q 411 552 459 552 q 355 534 379 552 q 318 487 331 517 q 302 419 305 457 q 299 330 299 382 q 304 148 299 264 q 309 0 309 33 q 244 3 285 0 q 195 6 203 6 q 128 3 170 6 q 80 0 86 0 q 85 188 80 65 q 91 338 91 311 "},"3":{"x_min":30,"x_max":680,"ha":749,"o":"m 365 908 q 561 853 479 908 q 643 691 643 799 q 593 565 643 612 q 457 485 544 517 l 457 476 q 617 410 555 463 q 680 260 680 356 q 573 50 680 122 q 318 -21 466 -21 q 30 58 155 -21 q 90 161 67 120 q 137 250 113 202 l 154 250 q 185 109 154 167 q 292 51 216 51 q 404 109 367 51 q 442 245 442 167 q 397 376 442 327 q 271 425 353 425 l 231 425 l 231 505 l 268 504 q 392 549 345 504 q 439 670 439 594 q 408 785 439 738 q 313 833 377 833 q 213 776 244 833 q 183 644 183 719 l 170 634 q 121 690 145 665 q 43 767 97 716 q 179 874 94 840 q 365 908 265 908 "},"9":{"x_min":30,"x_max":705,"ha":749,"o":"m 281 343 q 98 414 167 343 q 30 601 30 486 q 121 827 30 744 q 359 911 213 911 q 618 801 532 911 q 705 515 705 692 q 583 135 705 291 q 243 -21 461 -21 q 158 -12 193 -21 q 74 9 123 -4 q 87 74 82 42 q 92 140 92 106 l 102 143 q 163 84 127 105 q 243 64 199 64 q 414 172 362 64 q 467 414 467 280 q 386 359 435 376 q 281 343 337 343 m 360 440 q 446 495 426 440 q 467 630 467 551 q 447 775 467 714 q 361 837 427 837 q 274 778 293 837 q 256 631 256 720 q 276 496 256 553 q 360 440 296 440 "},"l":{"x_min":86,"x_max":316,"ha":407,"o":"m 99 501 q 95 701 99 579 q 92 843 92 823 l 86 1024 q 154 1016 125 1019 q 201 1013 183 1013 q 265 1018 232 1013 q 316 1023 297 1022 q 309 719 316 915 q 303 501 303 523 l 307 180 l 316 0 q 263 5 309 1 q 201 10 218 10 q 138 6 169 10 q 86 0 108 2 q 92 292 86 104 q 99 501 99 480 "},"κ":{"x_min":80,"x_max":732.765625,"ha":756,"o":"m 184 659 q 306 667 239 659 l 301 509 l 295 461 l 295 389 q 422 510 367 447 q 545 667 478 573 l 618 667 l 709 667 l 714 657 l 628 576 l 475 425 q 552 292 510 364 q 636 154 595 220 l 732 0 q 661 3 706 0 q 607 6 616 6 q 536 3 579 6 q 486 0 493 0 q 386 174 440 83 q 295 329 331 266 l 295 249 q 298 106 295 206 q 301 0 301 6 l 190 4 l 80 0 q 85 127 80 43 q 91 255 91 212 q 85 461 91 323 q 80 666 80 598 l 184 659 "},"4":{"x_min":43,"x_max":708.265625,"ha":749,"o":"m 706 383 l 701 299 q 704 248 701 271 q 708 211 706 225 q 592 221 650 221 l 592 176 q 594 83 592 127 q 606 0 597 40 q 540 3 579 0 q 497 6 501 6 q 433 3 473 6 q 384 0 393 0 q 393 104 390 44 q 396 219 396 165 l 309 221 q 169 216 262 221 q 43 212 76 212 l 44 296 l 44 379 q 174 568 113 477 q 287 738 235 658 q 396 909 338 818 q 503 902 444 902 q 553 902 527 902 q 606 909 589 907 q 599 720 606 843 q 592 534 592 596 l 592 370 q 650 375 614 370 q 706 383 686 380 m 396 370 l 396 752 l 141 370 l 396 370 "},"p":{"x_min":82,"x_max":772,"ha":825,"o":"m 502 683 q 704 574 636 683 q 772 322 772 466 q 701 82 772 179 q 491 -15 630 -15 q 302 85 371 -15 l 302 -71 l 309 -385 q 249 -379 278 -382 q 196 -376 221 -376 q 139 -379 171 -376 q 82 -384 108 -381 q 87 -252 82 -341 q 92 -131 92 -162 l 88 487 l 82 666 q 195 659 141 659 q 235 660 216 659 q 307 666 254 661 q 302 580 302 618 q 391 656 343 630 q 502 683 440 683 m 430 79 q 472 86 453 79 q 515 122 491 94 q 548 204 539 151 q 557 337 557 258 q 532 503 557 431 q 430 576 507 576 q 324 501 350 576 q 298 327 298 427 q 323 152 298 226 q 430 79 349 79 "},"ψ":{"x_min":59,"x_max":1025,"ha":1064,"o":"m 1025 437 q 919 131 1025 249 q 625 -7 813 13 q 630 -190 625 -68 q 636 -374 636 -312 l 558 -365 q 483 -366 516 -365 q 418 -373 451 -368 q 424 -159 418 -297 q 431 -5 431 -22 q 374 0 401 -2 q 271 20 348 2 q 127 124 195 37 q 59 331 59 211 l 60 484 l 59 666 l 168 663 l 277 666 q 269 506 277 619 q 261 358 261 392 q 293 144 261 228 q 431 51 325 60 l 431 253 q 424 572 431 367 q 418 800 418 777 l 536 795 l 636 798 q 630 650 636 748 q 625 501 625 551 l 625 254 l 625 51 q 767 146 726 51 q 808 359 808 241 q 798 498 808 440 q 762 650 788 556 q 867 654 821 650 q 980 666 913 658 q 1025 437 1025 552 "},"Ü":{"x_min":82,"x_max":910,"ha":997,"o":"m 210 927 l 338 931 q 329 643 338 836 q 321 421 321 451 q 360 197 321 284 q 521 110 400 110 q 678 162 609 110 q 756 279 747 214 q 768 420 765 344 q 771 548 771 495 q 756 931 771 755 l 814 927 l 910 931 q 903 770 910 883 q 896 616 896 657 l 896 480 l 896 375 q 794 81 896 178 q 493 -15 692 -15 q 210 56 321 -15 q 100 287 100 128 q 91 619 100 386 q 82 931 82 852 l 210 927 m 394 1242 q 461 1215 433 1242 q 489 1148 489 1189 q 463 1078 489 1107 q 396 1050 437 1050 q 327 1078 355 1050 q 299 1148 299 1107 q 326 1214 299 1186 q 394 1242 354 1242 m 654 1242 q 721 1214 694 1242 q 749 1148 749 1187 q 724 1079 749 1108 q 658 1050 699 1050 q 588 1077 617 1050 q 559 1148 559 1105 q 587 1214 559 1187 q 654 1242 615 1242 "},"à":{"x_min":44,"x_max":706.78125,"ha":706,"o":"m 237 -15 q 98 35 153 -15 q 44 169 44 86 q 212 352 44 301 q 401 421 380 403 q 410 439 410 432 q 373 539 410 502 q 275 577 337 577 q 140 511 185 577 l 135 511 l 115 585 q 230 657 164 632 q 365 683 296 683 q 543 623 479 683 q 608 452 608 564 l 604 213 q 604 166 604 184 q 608 123 604 148 q 625 87 612 99 q 658 76 638 76 q 679 80 666 76 q 702 90 691 84 l 706 40 q 643 1 676 14 q 563 -15 610 -10 q 481 5 520 -15 q 421 64 441 26 q 237 -15 351 -15 m 425 755 l 201 863 q 145 902 159 883 q 131 944 131 921 q 153 996 131 975 q 206 1017 175 1017 q 253 1002 232 1017 q 309 953 273 987 l 494 755 l 425 755 m 240 200 q 261 128 240 158 q 321 99 282 99 q 388 131 367 99 q 410 211 410 164 l 410 352 q 287 302 335 338 q 240 200 240 267 "},"η":{"x_min":80,"x_max":727,"ha":808,"o":"m 91 339 q 85 512 91 391 q 80 667 80 632 q 137 661 125 662 q 180 661 149 661 q 244 663 199 661 q 293 666 290 666 l 293 568 q 391 651 338 622 q 511 681 443 681 q 660 622 602 681 q 719 471 719 564 l 719 328 l 719 -49 q 723 -219 719 -106 q 727 -373 727 -332 q 618 -365 670 -365 q 502 -373 562 -365 l 512 16 l 512 251 l 512 368 q 491 499 512 446 q 408 552 471 552 q 319 488 342 552 q 302 419 305 457 q 299 330 299 382 q 304 148 299 264 q 309 0 309 33 q 243 3 278 0 q 195 6 207 6 q 127 3 163 6 q 80 0 92 0 q 85 188 80 65 q 91 339 91 311 "}},"cssFontWeight":"bold","ascender":1288,"underlinePosition":-133,"cssFontStyle":"normal","boundingBox":{"yMin":-385,"xMin":-147,"yMax":1288,"xMax":1618},"resolution":1000,"original_font_information":{"postscript_name":"Optimer-Bold","version_string":"Version 1.00 2004 initial release","vendor_url":"http://www.magenta.gr/","full_font_name":"Optimer Bold","font_family_name":"Optimer","copyright":"Copyright (c) Magenta Ltd., 2004.","description":"","trademark":"","designer":"","designer_url":"","unique_font_identifier":"Magenta Ltd.:Optimer Bold:22-10-104","license_url":"http://www.ellak.gr/fonts/MgOpen/license.html","license_description":"Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license (\"Fonts\") and associated documentation files (the \"Font Software\"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \r\n\r\nThe above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\r\n\r\nThe Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word \"MgOpen\", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\r\n\r\nThis License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the \"MgOpen\" name.\r\n\r\nThe Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \r\n\r\nTHE FONT SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.","manufacturer_name":"Magenta Ltd.","font_sub_family_name":"Bold"},"descender":-385,"familyName":"Optimer","lineHeight":1672,"underlineThickness":20} \ No newline at end of file diff --git a/node_modules/three/examples/fonts/optimer_regular.typeface.json b/node_modules/three/examples/fonts/optimer_regular.typeface.json new file mode 100644 index 0000000..1ab4d30 --- /dev/null +++ b/node_modules/three/examples/fonts/optimer_regular.typeface.json @@ -0,0 +1 @@ +{"glyphs":{"ο":{"x_min":41,"x_max":710,"ha":753,"o":"m 371 -15 q 131 78 222 -15 q 41 322 41 172 q 133 573 41 474 q 378 672 225 672 q 619 574 528 672 q 710 326 710 477 q 617 80 710 175 q 371 -15 525 -15 m 377 619 q 226 530 272 619 q 180 327 180 441 q 227 125 180 216 q 375 35 274 35 q 524 123 478 35 q 570 326 570 211 q 524 529 570 440 q 377 619 479 619 "},"S":{"x_min":50,"x_max":639,"ha":699,"o":"m 88 208 q 179 88 122 131 q 318 46 237 46 q 457 98 397 46 q 518 227 518 150 q 401 400 518 336 q 184 498 293 448 q 68 688 68 566 q 156 880 68 811 q 370 950 244 950 q 480 936 430 950 q 597 891 530 922 q 570 822 583 858 q 553 756 558 786 l 539 756 q 354 897 502 897 q 231 855 282 897 q 181 742 181 813 q 298 580 181 640 q 519 483 408 531 q 639 286 639 413 q 538 68 639 152 q 301 -15 438 -15 q 166 2 229 -15 q 50 59 104 19 q 68 135 62 104 q 75 205 75 166 l 88 208 "},"/":{"x_min":-36.03125,"x_max":404.15625,"ha":383,"o":"m -36 -125 l 340 1025 l 404 1024 l 28 -126 l -36 -125 "},"Τ":{"x_min":11,"x_max":713,"ha":725,"o":"m 11 839 l 15 884 l 11 932 q 194 927 72 932 q 361 922 316 922 q 544 927 421 922 q 713 932 668 932 q 707 883 707 911 q 707 861 707 870 q 713 834 707 852 q 609 850 666 843 q 504 857 552 857 l 428 857 q 426 767 428 830 q 424 701 424 704 l 428 220 q 442 0 428 122 q 362 8 401 3 q 323 5 344 8 q 282 0 301 2 q 289 132 282 40 q 296 259 296 225 l 296 683 l 296 857 q 11 839 164 857 "},"ϕ":{"x_min":41,"x_max":960,"ha":1006,"o":"m 441 -10 q 162 76 283 -10 q 41 316 41 163 q 162 562 41 470 q 441 654 283 654 q 434 838 441 719 q 427 971 427 957 q 464 965 443 968 q 503 962 485 962 q 540 965 519 962 q 578 970 560 968 q 563 654 563 824 q 839 567 719 654 q 960 324 960 481 q 841 79 960 169 q 563 -10 722 -10 q 570 -201 563 -68 q 578 -371 578 -334 q 505 -362 539 -362 q 465 -365 483 -362 q 427 -372 446 -368 q 434 -161 427 -297 q 441 -10 441 -26 m 563 39 q 757 118 690 39 q 824 330 824 198 q 750 523 824 445 q 564 601 677 601 l 563 319 l 563 39 m 441 319 l 441 601 q 253 523 326 601 q 180 330 180 446 q 245 117 180 195 q 439 39 310 39 l 441 319 "},"y":{"x_min":4.171875,"x_max":665.28125,"ha":664,"o":"m 4 654 l 86 647 l 165 654 q 202 536 188 577 q 241 431 215 495 l 363 129 l 473 413 q 552 654 519 537 q 606 647 583 647 q 665 654 633 647 q 416 125 531 388 q 223 -372 301 -137 l 187 -366 q 141 -366 163 -366 q 112 -372 122 -370 l 290 -22 q 4 654 170 294 "},"≈":{"x_min":118.0625,"x_max":1019.453125,"ha":1139,"o":"m 765 442 q 564 487 700 442 q 376 533 429 533 q 250 506 298 533 q 118 427 202 480 l 118 501 q 245 572 180 545 q 376 600 311 600 q 574 553 438 600 q 765 507 709 507 q 888 534 829 507 q 1019 614 947 562 l 1019 538 q 892 467 954 493 q 765 442 830 442 m 759 214 q 568 260 702 214 q 376 307 433 307 q 236 272 300 307 q 118 202 173 238 l 118 277 q 247 346 181 320 q 380 372 312 372 q 570 326 445 372 q 765 281 695 281 q 883 306 830 281 q 1019 388 936 331 l 1019 313 q 894 240 959 266 q 759 214 829 214 "},"Π":{"x_min":108,"x_max":927.453125,"ha":1036,"o":"m 432 846 l 263 846 q 260 634 263 781 q 257 475 257 486 q 262 236 257 395 q 268 0 268 77 q 229 3 255 0 q 188 8 202 8 q 149 3 177 8 q 108 0 121 0 q 117 239 108 70 q 126 465 126 408 q 122 711 126 620 q 108 932 119 803 q 285 926 166 932 q 464 921 405 921 q 695 926 541 921 q 927 932 849 932 q 915 793 921 871 q 909 659 909 716 l 909 504 q 917 245 909 427 q 926 0 926 62 q 887 4 913 0 q 847 8 860 8 q 810 5 827 8 q 768 0 792 2 q 773 259 768 94 q 778 469 778 423 l 778 731 l 773 846 l 432 846 "},"ΐ":{"x_min":-41,"x_max":384,"ha":342,"o":"m 105 333 l 105 520 q 104 566 105 544 q 97 654 103 588 q 141 647 131 648 q 166 647 152 647 q 234 654 196 647 q 225 555 226 599 q 224 437 224 510 l 224 406 q 229 194 224 337 q 234 0 234 51 q 202 3 217 1 q 166 5 186 5 q 128 3 149 5 q 97 0 108 1 q 101 165 97 51 q 105 333 105 279 m 18 865 q 61 846 43 865 q 80 804 80 828 q 61 761 80 779 q 18 743 43 743 q -22 761 -4 743 q -41 804 -41 779 q -22 846 -41 828 q 18 865 -4 865 m 172 929 q 189 969 179 956 q 225 982 199 982 q 256 971 243 982 q 270 941 270 961 q 257 904 270 919 l 149 743 l 117 743 l 172 929 m 324 865 q 366 846 348 865 q 384 804 384 828 q 366 761 384 779 q 324 743 348 743 q 281 761 298 743 q 265 804 265 779 q 281 846 265 828 q 324 865 298 865 "},"g":{"x_min":32,"x_max":672,"ha":688,"o":"m 81 123 q 112 201 81 169 q 193 252 144 233 l 193 262 q 97 329 130 277 q 64 447 64 380 q 141 610 64 549 q 323 672 218 672 q 421 661 357 672 q 500 650 486 651 l 672 654 l 672 582 q 599 592 635 587 q 537 597 563 597 q 607 458 607 548 q 527 294 607 356 q 342 232 447 232 q 291 235 319 232 q 255 239 262 239 q 208 220 228 239 q 188 173 188 201 q 221 120 188 136 q 296 104 254 104 l 427 104 q 603 56 534 104 q 672 -93 672 9 q 560 -299 672 -226 q 309 -372 448 -372 q 115 -327 199 -372 q 32 -183 32 -283 q 76 -62 32 -110 q 193 8 121 -13 q 112 51 143 25 q 81 123 81 77 m 332 278 q 439 332 401 278 q 478 457 478 386 q 441 575 478 525 q 338 625 404 625 q 232 570 271 625 q 194 447 194 515 q 230 328 194 379 q 332 278 266 278 m 337 -316 q 491 -270 423 -316 q 559 -141 559 -224 q 500 -29 559 -62 q 353 3 441 3 q 199 -36 263 3 q 136 -162 136 -76 q 195 -277 136 -238 q 337 -316 255 -316 "},"²":{"x_min":15.28125,"x_max":412.5,"ha":496,"o":"m 297 744 q 270 830 297 795 q 197 866 244 866 q 120 837 149 866 q 83 761 90 808 l 76 759 q 54 802 68 780 q 31 837 40 824 q 210 901 108 901 q 334 862 278 901 q 390 758 390 824 q 282 568 390 656 q 111 428 174 479 l 293 428 q 350 431 316 428 q 412 439 384 434 l 406 397 l 412 356 l 304 361 l 111 361 l 15 355 l 15 378 q 220 567 144 484 q 297 744 297 651 "},"Κ":{"x_min":108,"x_max":856.625,"ha":821,"o":"m 255 314 q 261 132 255 250 q 268 0 268 13 q 229 4 255 0 q 188 8 202 8 q 148 4 174 8 q 108 0 121 0 q 117 239 108 70 q 126 465 126 408 q 122 712 126 621 q 108 932 119 803 q 153 928 124 932 q 188 925 183 925 q 231 928 203 925 q 267 932 259 932 l 255 671 l 255 499 q 480 693 375 586 q 687 932 585 800 q 732 932 710 932 q 777 932 753 932 l 837 932 q 606 727 720 830 q 389 522 493 623 q 525 358 465 426 q 666 202 586 290 q 856 0 747 115 l 746 0 q 692 -1 716 0 q 644 -8 669 -2 q 571 92 610 44 q 477 204 532 140 l 255 459 l 255 314 "},"ë":{"x_min":40,"x_max":646.9375,"ha":681,"o":"m 406 42 q 602 130 523 42 l 621 130 q 613 93 617 112 q 609 47 609 73 q 496 0 558 14 q 369 -15 435 -15 q 130 73 220 -15 q 40 311 40 162 q 126 562 40 456 q 355 669 212 669 q 564 590 481 669 q 646 386 646 512 l 644 331 q 438 333 562 331 q 313 335 315 335 l 179 331 q 235 127 179 212 q 406 42 291 42 m 219 929 q 271 906 249 929 q 294 854 294 884 q 273 800 294 822 q 221 778 252 778 q 166 800 190 778 q 143 854 143 822 q 165 906 143 884 q 219 929 187 929 m 460 929 q 513 906 492 929 q 534 854 534 884 q 513 799 534 820 q 461 778 493 778 q 407 800 429 778 q 385 854 385 822 q 407 906 385 884 q 460 929 429 929 m 513 392 l 513 437 q 470 563 513 509 q 356 618 427 618 q 233 552 271 618 q 183 390 195 487 l 513 392 "},"e":{"x_min":41,"x_max":645.15625,"ha":681,"o":"m 406 42 q 602 130 523 42 l 618 125 q 611 86 614 104 q 609 44 609 67 q 497 0 561 14 q 370 -15 434 -15 q 130 73 220 -15 q 41 311 41 161 q 127 563 41 455 q 356 672 214 672 q 563 592 482 672 q 645 385 645 512 l 643 331 l 313 335 l 179 331 q 235 126 179 210 q 406 42 291 42 m 511 392 l 513 436 q 470 563 513 509 q 356 618 427 618 q 230 553 268 618 q 179 388 191 488 l 511 392 "},"ό":{"x_min":41,"x_max":710,"ha":753,"o":"m 371 -15 q 131 78 222 -15 q 41 322 41 172 q 133 573 41 474 q 378 672 225 672 q 619 574 528 672 q 710 326 710 477 q 617 80 710 175 q 371 -15 525 -15 m 524 943 q 558 974 542 964 q 595 985 574 985 q 632 969 618 985 q 646 932 646 954 q 632 897 646 911 q 591 866 618 883 l 390 743 l 341 743 l 524 943 m 377 619 q 226 530 272 619 q 180 327 180 441 q 227 125 180 216 q 375 35 274 35 q 524 123 478 35 q 570 326 570 211 q 524 529 570 440 q 377 619 479 619 "},"J":{"x_min":-71,"x_max":277,"ha":385,"o":"m 118 -40 q 131 62 128 9 q 135 184 135 115 q 132 462 135 325 q 127 690 130 598 q 111 932 123 782 q 159 928 129 932 q 193 925 189 925 q 238 927 221 925 q 277 932 256 929 q 268 665 277 843 q 260 457 260 487 l 260 165 q 260 107 260 147 q 260 48 260 68 q 169 -155 260 -88 q -62 -222 79 -222 l -71 -180 q 50 -134 1 -166 q 118 -40 100 -102 "},"»":{"x_min":43,"x_max":543,"ha":607,"o":"m 196 322 l 43 607 l 81 645 l 303 322 l 81 0 l 43 37 l 196 322 m 436 322 l 283 607 l 322 645 l 543 322 l 322 0 l 283 37 l 436 322 "},"©":{"x_min":80,"x_max":1058,"ha":1139,"o":"m 816 905 q 992 726 927 841 q 1058 481 1058 611 q 912 138 1058 283 q 567 -6 766 -6 q 225 139 370 -6 q 80 481 80 284 q 224 826 80 681 q 569 971 368 971 q 816 905 698 971 m 569 918 q 263 788 392 918 q 134 481 134 659 q 261 175 134 306 q 566 45 389 45 q 872 174 741 45 q 1004 478 1004 304 q 947 699 1004 596 q 787 859 890 801 q 569 918 684 918 m 570 724 q 441 652 483 724 q 399 490 399 581 q 438 320 399 396 q 560 245 478 245 q 664 278 621 245 q 723 370 707 311 l 798 370 q 720 232 788 283 q 561 181 653 181 q 379 268 446 181 q 313 476 313 355 q 380 694 313 604 q 571 785 447 785 q 717 738 656 785 q 793 610 779 691 l 715 610 q 664 692 705 660 q 570 724 624 724 "},"ώ":{"x_min":39.71875,"x_max":1028.9375,"ha":1068,"o":"m 534 528 l 596 528 l 594 305 q 616 117 594 193 q 722 42 638 42 q 850 118 811 42 q 888 293 888 194 q 829 502 888 409 q 664 654 769 594 l 717 648 q 805 654 766 648 q 967 510 905 606 q 1028 304 1028 413 q 948 81 1028 177 q 744 -15 867 -15 q 622 16 678 -15 q 534 104 566 47 q 445 16 500 48 q 323 -15 389 -15 q 118 83 196 -15 q 39 311 39 182 q 100 511 39 419 q 262 654 161 604 q 303 650 278 651 q 349 648 327 648 l 402 654 q 238 501 296 593 q 179 291 179 409 q 218 116 179 191 q 348 42 257 42 q 419 68 390 42 q 461 138 448 94 q 472 216 469 175 q 475 303 475 257 q 472 420 475 353 q 469 529 470 486 l 534 528 m 681 943 q 714 974 699 964 q 751 985 730 985 q 788 969 774 985 q 802 932 802 954 q 787 896 802 912 q 746 866 773 880 l 547 743 l 498 743 l 681 943 "},"≥":{"x_min":176.1875,"x_max":963,"ha":1139,"o":"m 963 462 l 176 196 l 176 266 l 850 491 l 176 718 l 176 788 l 963 522 l 963 462 m 963 26 l 176 26 l 176 93 l 963 93 l 963 26 "},"^":{"x_min":0,"x_max":390,"ha":403,"o":"m 150 978 l 239 978 l 390 743 l 344 743 l 195 875 l 49 743 l 0 743 l 150 978 "},"«":{"x_min":48,"x_max":549.390625,"ha":607,"o":"m 152 326 l 309 42 l 268 3 l 48 326 l 268 649 l 309 611 l 152 326 m 394 326 l 549 42 l 509 3 l 288 326 l 509 649 l 549 611 l 394 326 "},"D":{"x_min":108,"x_max":991,"ha":1043,"o":"m 126 465 q 117 704 126 536 q 108 931 108 872 l 210 929 q 350 934 251 929 q 477 939 449 939 q 579 936 553 939 q 709 917 605 934 q 902 775 814 900 q 991 483 991 650 q 852 130 991 261 q 491 0 713 0 l 378 0 l 228 7 l 203 7 q 148 4 173 7 q 108 0 123 1 q 117 239 108 70 q 126 465 126 408 m 402 64 q 724 168 609 64 q 840 479 840 273 q 730 774 840 671 q 428 878 621 878 q 345 873 400 878 q 262 869 289 869 l 255 497 l 255 376 l 262 76 q 332 68 292 72 q 402 64 373 64 "},"w":{"x_min":4.171875,"x_max":1052.78125,"ha":1047,"o":"m 4 655 q 55 648 41 648 q 86 647 69 647 q 165 654 120 647 q 190 540 176 587 q 238 394 204 492 l 329 141 q 498 654 419 386 q 551 647 526 647 q 609 654 577 647 q 637 544 620 601 q 677 420 654 487 l 770 135 l 872 413 q 911 532 893 472 q 944 654 930 592 q 979 647 970 648 q 1000 647 988 647 q 1052 654 1022 647 q 961 457 1002 555 q 871 235 919 359 q 782 0 824 110 q 755 3 772 0 q 733 6 738 6 q 708 3 724 6 q 686 0 692 0 q 650 127 667 72 q 611 239 632 183 l 518 494 q 432 258 475 382 q 348 0 390 134 q 325 3 336 1 q 297 5 313 5 q 269 3 284 5 q 245 0 254 1 q 162 244 200 140 q 86 447 125 347 q 4 655 47 546 "},"$":{"x_min":89,"x_max":666,"ha":749,"o":"m 139 186 l 146 186 q 213 91 165 119 q 342 50 261 63 l 342 416 q 142 515 196 458 q 89 648 89 573 q 164 819 89 752 q 342 886 239 886 q 330 985 342 936 l 359 979 l 404 984 q 400 924 401 945 q 399 886 399 904 q 510 874 457 886 q 605 834 562 862 q 582 788 592 808 q 555 729 572 768 l 547 729 q 495 810 535 783 q 399 837 455 837 l 399 520 q 610 419 554 479 q 666 277 666 359 q 588 87 666 164 q 399 0 511 9 l 399 -32 q 399 -63 399 -48 q 405 -125 400 -78 l 368 -121 l 329 -125 l 342 0 q 210 13 273 0 q 98 58 147 27 l 139 186 m 342 836 q 237 787 278 826 q 196 686 196 748 q 237 588 196 626 q 342 537 279 551 l 342 836 m 553 231 q 513 337 553 300 q 399 402 473 375 l 399 51 q 512 113 471 66 q 553 231 553 159 "},"‧":{"x_min":134,"x_max":309,"ha":446,"o":"m 222 636 q 284 611 259 636 q 309 548 309 586 q 284 486 309 512 q 222 461 260 461 q 160 486 186 461 q 134 548 134 511 q 159 610 134 584 q 222 636 185 636 "},"\\":{"x_min":-36,"x_max":403.140625,"ha":383,"o":"m -36 1025 l 28 1025 l 403 -125 l 340 -125 l -36 1025 "},"Ι":{"x_min":109,"x_max":271,"ha":385,"o":"m 127 465 q 123 711 127 620 q 109 932 120 803 q 154 927 129 929 q 190 925 179 925 q 238 928 209 925 q 271 931 266 931 q 263 788 271 887 q 256 659 256 690 l 256 448 l 256 283 q 263 135 256 238 q 271 0 271 31 q 231 3 258 0 q 190 8 204 8 q 151 5 172 8 q 109 0 129 2 q 118 239 109 70 q 127 465 127 408 "},"Ύ":{"x_min":-1,"x_max":1204.5625,"ha":1165,"o":"m 758 177 l 758 386 q 651 570 717 458 q 543 750 585 681 q 431 931 501 819 q 483 928 449 931 q 522 925 518 925 q 572 927 550 925 q 606 931 593 930 q 666 800 633 866 q 735 676 699 734 l 849 475 q 968 688 910 575 q 1086 931 1027 801 l 1142 926 q 1174 927 1160 926 q 1204 931 1187 929 q 1014 627 1099 769 l 891 415 l 891 240 q 894 101 891 198 q 897 0 897 5 q 860 4 885 1 q 820 6 835 6 q 778 4 793 6 q 743 0 763 2 q 753 88 748 36 q 758 177 758 140 m 182 943 q 215 974 200 964 q 252 985 231 985 q 289 969 274 985 q 305 932 305 954 q 290 896 305 911 q 248 866 275 882 l 48 743 l -1 743 l 182 943 "},"’":{"x_min":90.28125,"x_max":305.5625,"ha":374,"o":"m 169 859 q 197 923 177 894 q 250 953 218 953 q 288 939 272 953 q 305 902 305 925 q 295 857 305 882 q 269 811 284 833 l 120 568 l 90 576 l 169 859 "},"Ν":{"x_min":98,"x_max":911.890625,"ha":1011,"o":"m 112 230 q 114 486 112 315 q 117 741 117 656 l 117 950 l 166 950 q 326 766 239 865 q 468 606 413 667 q 610 451 524 544 l 821 227 l 821 604 q 816 765 821 685 q 803 931 812 845 l 855 927 l 911 931 q 901 831 906 884 q 897 741 897 779 q 894 413 897 619 q 892 165 892 207 l 892 -15 l 849 -15 q 730 125 796 50 q 589 281 664 201 l 193 702 l 193 330 q 212 -1 193 169 l 149 2 l 98 -1 q 108 125 105 79 q 112 230 112 170 "},"-":{"x_min":58.328125,"x_max":388.890625,"ha":449,"o":"m 58 390 l 388 390 l 388 273 l 58 273 l 58 390 "},"Q":{"x_min":51,"x_max":1074.609375,"ha":1119,"o":"m 566 -14 q 194 113 338 -14 q 51 465 51 241 q 192 820 51 690 q 559 950 333 950 q 892 853 754 950 q 1047 654 1031 756 q 1065 525 1062 551 q 1068 462 1068 499 q 1065 405 1068 429 q 1050 305 1062 381 q 960 144 1038 229 q 748 6 881 59 l 930 -112 q 1004 -161 963 -136 q 1074 -200 1045 -186 q 1008 -228 1035 -214 q 951 -267 980 -243 q 876 -208 912 -234 q 803 -154 841 -182 l 606 -14 l 566 -14 m 202 468 q 290 163 202 283 q 559 43 379 43 q 826 163 738 43 q 915 468 915 284 q 825 770 915 651 q 559 889 735 889 q 348 826 429 889 q 225 638 267 763 q 202 468 202 552 "},"ς":{"x_min":44,"x_max":613.453125,"ha":644,"o":"m 305 -206 q 350 -218 325 -218 q 447 -177 407 -218 q 487 -79 487 -136 q 376 55 487 4 q 159 156 266 106 q 44 365 44 231 q 143 585 44 499 q 380 672 242 672 q 506 658 448 672 q 613 616 564 645 q 587 500 595 559 l 562 500 q 501 586 549 557 q 391 616 453 616 q 233 551 296 616 q 170 393 170 486 q 216 271 170 320 q 339 196 263 223 l 467 149 q 569 76 531 119 q 608 -27 608 34 q 522 -206 608 -136 q 321 -293 437 -276 l 305 -206 "},"M":{"x_min":55,"x_max":1165,"ha":1238,"o":"m 190 950 l 243 950 q 331 772 291 851 q 412 612 370 693 q 504 436 454 532 l 626 214 q 742 435 671 298 q 882 711 813 572 q 1001 950 952 850 l 1052 950 q 1082 649 1067 791 q 1118 341 1098 508 q 1165 0 1139 174 q 1121 8 1139 5 q 1088 11 1103 11 q 1049 6 1071 11 q 1008 0 1027 2 q 998 226 1008 109 q 974 461 989 343 q 944 695 959 579 l 748 312 q 610 0 665 152 l 594 1 l 576 0 q 227 685 402 364 l 188 307 q 172 128 175 179 q 168 0 168 77 q 138 4 157 1 q 110 6 118 6 q 81 4 93 6 q 55 0 68 2 q 121 333 89 168 q 171 652 152 498 q 190 950 190 805 "},"Ψ":{"x_min":73,"x_max":995.609375,"ha":1071,"o":"m 609 0 q 561 5 585 2 q 532 8 536 8 q 494 5 515 8 q 456 0 474 2 q 463 151 456 45 q 470 297 470 258 q 180 383 287 297 q 73 650 73 469 l 73 817 l 73 932 q 139 925 110 925 q 180 928 155 925 q 212 931 206 931 q 200 818 204 861 q 197 723 197 774 l 197 688 l 197 638 q 268 438 197 508 q 472 368 340 368 l 473 481 q 464 736 473 566 q 456 932 456 905 q 499 927 481 929 q 532 925 518 925 q 577 927 557 925 q 609 931 596 930 q 601 635 609 841 q 594 368 594 429 l 645 372 q 816 465 765 372 q 868 691 868 559 q 861 829 868 740 q 855 932 855 919 q 896 927 878 929 q 924 925 913 925 q 971 927 955 925 q 995 931 987 930 l 994 839 l 994 675 q 894 388 994 480 q 594 297 794 297 q 601 142 594 249 q 609 0 609 35 "},"C":{"x_min":51,"x_max":881.5625,"ha":913,"o":"m 828 737 q 552 889 733 889 q 295 768 383 889 q 207 469 207 647 q 299 177 207 305 q 551 50 391 50 q 710 86 637 50 q 855 189 783 122 l 870 183 q 858 122 862 147 q 855 69 855 97 q 521 -15 699 -15 q 180 116 309 -15 q 51 462 51 248 q 189 820 51 690 q 556 950 327 950 q 719 930 638 950 q 881 875 799 911 q 857 809 867 843 q 845 737 847 775 l 828 737 "},"œ":{"x_min":39,"x_max":1195.9375,"ha":1226,"o":"m 359 -15 q 125 76 212 -15 q 39 318 39 167 q 125 571 39 470 q 362 672 212 672 q 514 640 441 672 q 641 551 588 608 q 897 672 741 672 q 1110 593 1024 672 q 1195 390 1195 515 l 1193 331 q 1022 332 1108 331 q 851 334 935 333 l 708 331 q 765 124 708 206 q 944 42 822 42 q 1145 130 1068 42 l 1162 130 q 1155 85 1158 110 q 1151 47 1152 60 q 1036 0 1100 14 q 904 -15 973 -15 q 754 12 819 -15 q 641 106 689 40 q 514 14 584 44 q 359 -15 444 -15 m 376 625 q 224 534 270 625 q 179 328 179 443 q 224 124 179 215 q 369 34 269 34 q 521 127 470 34 q 573 328 573 221 q 526 534 573 443 q 376 625 480 625 m 1061 392 l 1061 423 q 1017 561 1061 504 q 894 618 973 618 q 756 549 805 618 q 708 390 708 480 l 1061 392 "},"!":{"x_min":136,"x_max":312,"ha":449,"o":"m 223 156 q 285 130 259 156 q 312 68 312 105 q 285 8 312 32 q 223 -15 259 -15 q 161 9 187 -15 q 136 68 136 33 q 160 130 136 105 q 223 156 185 156 m 150 752 l 144 841 q 161 919 144 888 q 223 950 178 950 q 282 925 260 950 q 304 863 304 901 q 299 808 304 845 q 295 752 295 770 l 246 250 q 223 250 238 250 q 199 250 206 250 l 150 752 "},"ç":{"x_min":34,"x_max":614.5625,"ha":644,"o":"m 607 119 l 592 41 q 490 -2 549 10 q 363 -15 431 -15 q 130 80 227 -15 q 34 313 34 175 q 132 576 34 480 q 397 672 231 672 q 511 659 456 672 q 614 617 565 647 q 597 558 604 587 q 584 492 589 528 l 570 492 q 507 587 547 553 q 406 622 467 622 q 234 534 293 622 q 176 329 176 447 q 238 126 176 211 q 414 42 300 42 q 592 124 521 42 l 607 119 m 202 -212 q 350 -246 273 -246 q 414 -232 388 -246 q 440 -186 440 -219 q 421 -142 440 -158 q 373 -126 402 -126 l 323 -126 l 323 0 l 367 0 l 367 -77 l 404 -73 q 495 -102 457 -73 q 533 -183 533 -132 q 494 -270 533 -237 q 402 -303 456 -303 q 286 -294 335 -303 q 184 -261 238 -286 l 202 -212 "},"{":{"x_min":116,"x_max":567.390625,"ha":683,"o":"m 491 909 q 421 874 445 909 q 397 792 397 839 l 397 744 l 397 583 q 368 434 397 493 q 263 354 339 376 q 367 272 338 332 q 397 125 397 212 l 397 -35 q 414 -149 397 -108 q 471 -197 431 -191 q 529 -204 511 -204 q 567 -204 548 -204 l 567 -276 q 387 -239 459 -276 q 315 -105 315 -203 l 315 -28 l 315 132 q 296 244 315 194 q 240 303 277 294 q 176 314 204 312 q 116 317 148 317 l 116 389 q 270 429 225 389 q 315 576 315 469 l 315 737 q 348 918 315 870 q 450 977 381 966 q 567 983 503 983 l 567 912 l 491 909 "},"X":{"x_min":0,"x_max":739,"ha":739,"o":"m 200 285 l 318 456 q 18 932 159 718 q 63 929 33 932 q 109 926 94 926 q 168 929 147 926 q 198 932 188 932 q 296 743 244 841 q 391 568 348 644 l 489 726 q 597 932 548 825 q 627 927 614 929 q 661 926 641 926 q 693 929 671 926 q 728 932 715 932 q 616 781 673 862 q 524 652 558 700 l 427 512 q 523 347 480 419 q 614 197 566 275 q 739 0 662 119 q 686 3 719 0 q 647 6 652 6 q 595 4 618 6 q 558 0 572 1 q 459 197 512 97 q 353 398 405 298 l 265 249 q 174 96 193 130 q 127 0 155 62 q 89 3 113 0 q 62 6 65 6 q 26 4 43 6 q 0 0 9 1 l 200 285 "},"ô":{"x_min":40,"x_max":712,"ha":753,"o":"m 371 -15 q 131 79 223 -15 q 40 322 40 173 q 133 572 40 473 q 380 672 227 672 q 621 575 530 672 q 712 327 712 479 q 619 80 712 175 q 371 -15 527 -15 m 332 978 l 421 978 l 572 743 l 525 743 l 376 875 l 229 743 l 180 743 l 332 978 m 377 622 q 227 532 274 622 q 180 327 180 442 q 227 125 180 216 q 375 35 274 35 q 524 124 478 35 q 570 327 570 214 q 524 531 570 441 q 377 622 479 622 "},"#":{"x_min":78,"x_max":972.4375,"ha":1050,"o":"m 497 647 l 675 647 l 791 969 l 877 968 l 761 647 l 972 647 l 948 576 l 736 576 l 671 390 l 896 390 l 873 319 l 644 319 l 531 0 l 446 0 l 559 319 l 382 319 l 266 0 l 182 0 l 294 319 l 78 319 l 102 390 l 320 390 l 386 576 l 151 576 l 176 647 l 410 647 l 526 969 l 610 969 l 497 647 m 472 576 l 407 390 l 587 390 l 650 576 l 472 576 "},"ι":{"x_min":96,"x_max":233.5,"ha":342,"o":"m 104 333 l 104 521 q 103 567 104 545 q 96 655 102 589 q 141 648 130 648 q 165 647 151 647 q 233 654 196 647 q 224 555 226 599 q 223 437 223 511 l 223 406 q 228 194 223 337 q 233 0 233 51 q 201 3 216 1 q 165 5 185 5 q 127 3 148 5 q 96 0 107 1 q 100 165 96 51 q 104 333 104 279 "},"Ά":{"x_min":12,"x_max":910.609375,"ha":896,"o":"m 328 639 l 458 950 q 489 944 464 947 q 522 950 507 944 q 655 613 602 745 q 770 331 709 480 q 910 0 832 181 q 859 3 891 0 q 823 6 827 6 q 772 4 795 6 q 735 0 749 1 q 672 195 692 135 q 613 353 652 255 l 449 358 l 285 353 l 233 205 q 173 0 194 94 l 116 5 q 76 2 91 5 q 55 0 62 0 q 146 211 101 105 q 229 404 192 317 q 328 639 266 490 m 195 943 q 228 974 213 964 q 265 985 244 985 q 302 969 287 985 q 318 932 318 954 q 303 896 318 911 q 261 866 288 882 l 61 743 l 12 743 l 195 943 m 450 419 l 585 425 l 451 761 l 318 425 l 450 419 "},")":{"x_min":65.671875,"x_max":332,"ha":449,"o":"m 332 376 q 271 81 332 217 q 96 -183 211 -54 q 65 -151 83 -164 q 193 104 155 -16 q 232 386 232 226 q 191 661 232 533 q 65 918 150 789 q 96 950 87 933 q 273 681 215 816 q 332 376 332 545 "},"ε":{"x_min":53,"x_max":567,"ha":628,"o":"m 506 516 q 433 591 467 566 q 353 616 400 616 q 261 580 298 616 q 225 492 225 545 q 268 406 225 437 q 372 375 311 375 l 418 375 l 417 349 l 417 310 l 343 317 q 236 282 280 317 q 193 183 193 247 q 238 77 193 117 q 352 38 284 38 q 460 66 410 38 q 543 144 510 94 q 553 99 547 121 q 567 54 558 76 q 452 2 515 19 q 321 -15 388 -15 q 134 31 216 -15 q 53 175 53 78 q 95 286 53 246 q 214 355 137 326 q 127 408 162 370 q 93 497 93 445 q 165 625 93 579 q 323 672 237 672 q 430 654 378 672 q 541 604 481 637 q 522 564 529 584 q 506 516 514 545 "},"Δ":{"x_min":0,"x_max":899,"ha":899,"o":"m 899 0 q 701 5 833 0 q 501 11 569 11 q 251 5 418 11 q 0 0 84 0 q 225 473 126 251 q 407 932 323 696 q 432 929 415 932 q 457 926 448 926 q 482 927 471 926 q 505 932 493 929 q 691 449 601 664 q 899 0 782 234 m 281 429 q 158 90 212 259 q 290 84 201 90 q 423 79 379 79 l 456 79 q 587 81 550 79 q 692 90 625 83 l 651 188 l 576 383 l 422 778 l 281 429 "},"â":{"x_min":43,"x_max":655.5,"ha":649,"o":"m 234 -15 q 98 33 153 -15 q 43 162 43 82 q 106 303 43 273 q 303 364 169 333 q 444 448 437 395 q 403 568 444 521 q 288 616 362 616 q 191 587 233 616 q 124 507 149 559 l 95 520 l 104 591 q 202 651 144 631 q 323 672 261 672 q 500 622 444 672 q 557 455 557 573 l 557 133 q 567 69 557 84 q 618 54 577 54 q 655 58 643 54 l 655 26 q 594 5 626 14 q 537 -6 562 -3 q 438 85 453 -6 q 342 10 388 35 q 234 -15 296 -15 m 279 978 l 368 978 l 522 743 l 471 743 l 323 875 l 176 743 l 126 743 l 279 978 m 176 186 q 204 98 176 133 q 284 64 232 64 q 390 107 342 64 q 438 212 438 151 l 438 345 q 239 293 303 319 q 176 186 176 268 "},"}":{"x_min":114,"x_max":567,"ha":683,"o":"m 369 576 q 405 438 369 487 q 527 389 441 389 l 567 389 l 567 317 q 415 278 461 317 q 369 132 369 239 l 369 -28 q 319 -229 369 -182 q 114 -276 270 -276 l 114 -204 q 252 -172 218 -204 q 286 -83 286 -141 l 286 -35 l 286 125 q 314 271 286 212 q 418 354 342 329 q 311 435 337 382 q 286 584 286 488 l 286 745 q 268 860 286 818 q 191 913 251 903 l 114 913 l 114 983 l 186 982 q 287 960 242 982 q 346 900 331 938 q 365 822 362 862 q 369 737 369 783 l 369 576 "},"‰":{"x_min":28,"x_max":1511,"ha":1536,"o":"m 799 0 q 647 62 708 0 q 586 218 586 124 q 647 372 586 309 q 799 436 709 436 q 949 373 888 436 q 1011 223 1011 311 q 995 130 1011 176 q 918 35 972 70 q 799 0 865 0 m 1298 0 q 1146 62 1206 0 q 1087 218 1087 124 q 1148 372 1087 308 q 1299 436 1209 436 q 1449 373 1388 436 q 1511 223 1511 311 q 1494 130 1511 169 q 1418 34 1472 69 q 1298 0 1365 0 m 241 448 q 89 510 150 448 q 28 663 28 573 q 89 820 28 755 q 241 885 151 885 q 391 823 329 885 q 453 672 453 761 q 434 580 453 620 q 359 483 412 518 q 241 448 307 448 m 863 1015 l 227 -125 l 158 -125 l 793 1015 l 863 1015 m 897 260 q 872 353 897 310 q 798 397 847 397 q 718 340 737 397 q 700 202 700 283 q 719 86 700 133 q 798 40 738 40 q 866 73 840 40 q 892 149 892 106 q 895 206 894 169 q 897 260 897 242 m 339 684 q 319 797 339 750 q 244 845 300 845 q 161 784 182 845 q 141 645 141 723 q 165 540 141 590 q 237 490 189 490 q 303 524 278 490 q 334 598 329 558 q 339 684 339 638 m 1397 260 q 1373 356 1397 315 q 1297 397 1349 397 q 1218 340 1237 397 q 1200 202 1200 283 q 1219 87 1200 134 q 1297 40 1238 40 q 1366 73 1340 40 q 1392 149 1392 106 q 1395 206 1394 169 q 1397 260 1397 242 "},"Ä":{"x_min":-16,"x_max":839.5625,"ha":826,"o":"m 258 638 l 389 951 q 420 945 395 948 q 453 951 438 945 q 570 651 500 826 q 688 360 640 477 q 839 0 736 242 q 788 3 820 0 q 752 6 756 6 q 702 3 728 6 q 665 0 675 0 q 599 204 615 158 q 542 357 584 251 l 378 357 l 214 357 l 161 207 q 130 109 147 170 q 102 0 113 47 l 45 5 q 20 4 29 5 q -16 0 10 4 q 72 203 29 105 q 169 427 115 301 q 258 638 222 552 m 293 1208 q 345 1186 325 1208 q 366 1133 366 1164 q 345 1080 366 1102 q 293 1058 324 1058 q 239 1080 261 1058 q 217 1133 217 1102 q 239 1185 217 1163 q 293 1208 261 1208 m 535 1208 q 587 1186 565 1208 q 609 1133 609 1164 q 587 1080 609 1103 q 535 1058 565 1058 q 481 1080 503 1058 q 459 1133 459 1102 q 481 1185 459 1163 q 535 1208 503 1208 m 378 421 l 515 425 l 381 762 l 247 425 l 378 421 "},"a":{"x_min":44,"x_max":653.734375,"ha":647,"o":"m 233 -15 q 99 33 154 -15 q 44 162 44 82 q 105 302 44 273 q 302 363 167 331 q 444 448 437 395 q 401 567 444 519 q 287 615 359 615 q 190 587 231 615 q 124 508 149 560 l 95 519 l 103 591 q 204 651 148 631 q 323 672 260 672 q 499 623 443 672 q 555 457 555 574 l 555 132 q 566 70 555 86 q 616 55 578 55 l 653 55 l 653 26 q 594 4 624 15 q 536 -6 564 -6 q 468 15 492 -6 q 436 83 445 38 q 341 9 387 34 q 233 -15 294 -15 m 175 185 q 204 99 175 135 q 282 63 234 63 q 389 106 343 63 q 436 211 436 150 l 436 344 q 239 294 304 320 q 175 185 175 268 "},"—":{"x_min":226.390625,"x_max":1138.890625,"ha":1367,"o":"m 226 375 l 1138 375 l 1138 292 l 226 292 l 226 375 "},"=":{"x_min":169.4375,"x_max":969.453125,"ha":1139,"o":"m 969 499 l 169 499 l 169 564 l 969 564 l 969 499 m 969 248 l 169 248 l 169 315 l 969 315 l 969 248 "},"N":{"x_min":98,"x_max":911.890625,"ha":1011,"o":"m 112 230 q 114 486 112 315 q 117 741 117 656 l 117 950 l 166 950 q 326 766 239 865 q 468 606 413 667 q 610 451 524 544 l 821 227 l 821 604 q 816 765 821 685 q 803 931 812 845 l 855 927 l 911 931 q 901 831 906 884 q 897 741 897 779 q 894 413 897 619 q 892 165 892 207 l 892 -15 l 849 -15 q 730 125 796 50 q 589 281 664 201 l 193 702 l 193 330 q 212 -1 193 169 l 149 2 l 98 -1 q 108 125 105 79 q 112 230 112 170 "},"ρ":{"x_min":65,"x_max":711,"ha":758,"o":"m 191 -99 q 195 -235 191 -145 q 199 -371 199 -325 q 161 -367 169 -367 q 134 -366 153 -366 q 96 -368 116 -366 q 65 -372 76 -370 q 70 -190 65 -311 q 76 -8 76 -69 q 73 166 76 67 q 70 329 71 265 q 148 578 70 484 q 380 672 226 672 q 617 573 524 672 q 711 329 711 474 q 625 84 711 184 q 396 -15 539 -15 q 285 7 334 -15 q 191 78 236 30 l 191 -99 m 377 619 q 231 533 271 619 q 191 327 191 447 q 241 103 191 169 q 376 38 292 38 q 525 125 479 38 q 571 326 571 212 q 525 529 571 440 q 377 619 480 619 "},"2":{"x_min":22,"x_max":622,"ha":749,"o":"m 449 648 q 410 789 449 727 q 298 851 371 851 q 173 802 219 851 q 128 676 128 753 l 118 673 q 84 740 100 712 q 47 799 69 768 q 313 911 158 911 q 507 844 426 911 q 589 667 589 777 q 527 479 589 555 q 315 258 466 404 l 169 118 l 442 118 q 531 123 485 118 q 622 136 576 129 q 617 102 619 117 q 616 68 616 87 q 617 37 616 54 q 622 0 619 20 q 438 4 562 0 q 252 8 315 8 q 142 7 195 8 q 22 0 88 6 l 22 40 q 234 238 155 158 q 380 430 312 319 q 449 648 449 541 "},"ü":{"x_min":90,"x_max":664,"ha":754,"o":"m 653 498 q 653 329 653 443 q 653 158 653 215 q 664 0 653 82 q 631 3 647 1 q 598 5 616 5 q 563 3 583 5 q 533 0 544 1 l 538 118 q 440 18 494 52 q 312 -15 385 -15 q 148 50 201 -15 q 96 229 96 115 l 96 354 l 96 516 l 90 655 q 120 650 103 651 q 158 648 136 648 q 192 650 175 648 q 227 656 210 651 q 220 446 227 592 q 213 247 213 300 q 247 115 213 163 q 362 68 281 68 q 477 113 428 68 q 531 217 525 159 q 538 340 538 274 q 533 520 538 394 q 528 655 528 647 q 558 650 542 651 q 596 648 574 648 q 629 650 612 648 q 663 656 646 651 q 653 498 653 574 m 253 929 q 307 906 285 929 q 330 854 330 884 q 309 800 330 822 q 257 778 288 778 q 202 800 225 778 q 180 854 180 823 q 200 906 180 884 q 253 929 221 929 m 498 929 q 549 906 527 929 q 572 854 572 884 q 551 799 572 820 q 499 778 531 778 q 444 800 466 778 q 422 854 422 822 q 444 906 422 884 q 498 929 466 929 "},"Z":{"x_min":6.9375,"x_max":801.390625,"ha":828,"o":"m 6 36 q 222 324 112 176 q 425 605 333 473 l 597 857 l 433 857 q 59 836 247 857 l 65 883 l 59 932 q 262 927 134 932 q 427 922 390 922 q 622 927 491 922 q 801 932 754 932 l 801 904 q 594 629 709 785 q 399 361 479 473 q 201 77 319 249 l 427 77 q 581 82 520 77 q 801 103 643 87 l 797 68 l 795 54 l 797 34 l 801 0 q 504 4 683 0 q 325 8 326 8 q 166 4 272 8 q 6 0 61 0 l 6 36 "},"u":{"x_min":90,"x_max":662.21875,"ha":754,"o":"m 653 497 l 653 156 q 654 83 653 122 q 661 -1 656 44 q 623 3 632 2 q 596 4 615 4 q 572 3 581 4 q 533 -1 563 2 l 536 117 q 439 18 491 51 q 313 -15 386 -15 q 147 48 199 -15 q 96 227 96 112 l 96 352 l 96 516 l 90 654 q 158 647 125 647 q 189 648 178 647 q 226 654 200 650 q 220 450 226 586 q 215 246 215 314 q 248 114 215 163 q 361 66 281 66 q 473 112 426 66 q 527 225 520 158 q 536 340 536 282 q 531 497 536 393 q 527 654 527 601 q 572 647 563 647 q 595 647 581 647 q 626 648 616 647 q 662 654 637 650 l 653 497 "},"k":{"x_min":97,"x_max":677.5625,"ha":683,"o":"m 104 656 q 100 873 104 741 q 97 1025 97 1005 q 164 1018 134 1018 q 231 1025 196 1018 q 227 825 231 962 q 223 622 223 687 l 223 377 l 245 377 q 507 654 391 506 q 563 647 538 647 q 616 647 589 647 q 648 652 638 651 l 349 398 l 548 165 q 608 93 577 127 q 677 19 638 59 l 677 0 q 628 3 659 0 q 591 6 597 6 q 544 3 567 6 q 510 0 520 0 q 438 101 473 54 q 360 197 402 148 l 269 308 l 252 324 l 223 326 q 227 164 223 272 q 231 0 231 55 q 200 4 215 2 q 164 5 185 5 q 127 3 146 5 q 97 0 108 1 q 100 386 97 151 q 104 656 104 620 "},"Η":{"x_min":109,"x_max":928.453125,"ha":1039,"o":"m 257 317 q 262 142 257 253 q 267 0 267 30 q 226 3 253 0 q 188 8 200 8 q 147 3 174 8 q 109 0 121 0 q 116 243 109 72 q 124 465 124 415 q 116 710 124 540 q 109 932 109 880 q 152 929 121 932 q 188 926 183 926 q 231 929 200 926 q 267 932 262 932 q 262 719 267 854 q 257 547 257 584 q 406 544 301 547 q 517 541 511 541 q 666 544 562 541 q 777 547 770 547 q 773 786 777 641 q 769 932 769 930 q 813 929 781 932 q 849 926 845 926 q 893 929 861 926 q 928 932 924 932 q 914 795 920 866 q 909 659 909 723 l 909 505 q 918 252 909 420 q 927 0 927 84 q 887 4 913 0 q 848 8 861 8 q 811 5 829 8 q 769 0 793 2 q 773 103 769 41 q 777 176 777 166 l 777 317 l 777 465 q 604 466 692 465 q 430 469 517 467 l 257 465 l 257 317 "},"Α":{"x_min":-15.28125,"x_max":838.890625,"ha":825,"o":"m 257 639 l 387 950 q 402 945 395 947 q 417 944 409 944 q 452 950 437 944 q 576 629 536 733 q 686 359 617 526 q 838 0 755 192 q 789 3 820 0 q 751 6 758 6 q 700 4 723 6 q 663 0 677 1 q 600 199 622 137 q 543 353 579 260 l 377 358 l 215 353 l 162 205 q 130 110 145 160 q 101 0 115 59 l 44 5 q 6 2 20 5 q -15 0 -8 0 q 76 211 30 105 q 158 404 121 318 q 257 639 195 490 m 378 419 l 513 425 l 379 761 l 246 425 l 378 419 "},"ß":{"x_min":94,"x_max":726,"ha":765,"o":"m 107 431 l 107 611 l 107 761 q 200 948 118 872 q 395 1025 283 1025 q 543 979 478 1025 q 608 852 608 933 q 530 709 608 783 q 453 586 453 636 q 589 457 453 547 q 726 259 726 368 q 648 64 726 143 q 453 -15 570 -15 q 379 -6 418 -15 q 309 15 339 1 l 334 128 l 348 127 q 405 70 368 91 q 485 49 442 49 q 583 92 544 49 q 622 193 622 135 q 484 365 622 280 q 347 525 347 450 q 433 667 347 561 q 520 838 520 773 q 483 939 520 899 q 386 979 446 979 q 269 924 313 979 q 226 795 226 870 l 226 629 l 226 344 q 229 141 226 265 q 233 1 233 18 q 196 4 219 1 q 166 8 173 8 q 123 5 142 8 q 94 1 105 2 q 100 250 94 91 q 107 431 107 409 "},"é":{"x_min":40,"x_max":646.9375,"ha":681,"o":"m 406 42 q 602 130 523 42 l 621 130 q 613 93 617 112 q 609 47 609 73 q 496 0 558 14 q 369 -15 435 -15 q 130 73 220 -15 q 40 311 40 162 q 126 562 40 456 q 355 669 212 669 q 564 590 481 669 q 646 386 646 512 l 644 331 q 438 333 562 331 q 313 335 315 335 l 179 331 q 235 127 179 212 q 406 42 291 42 m 406 945 q 440 976 424 966 q 477 986 455 986 q 528 934 528 986 q 513 895 528 912 q 471 866 498 879 l 272 743 l 222 743 l 406 945 m 513 392 l 513 437 q 470 563 513 509 q 356 618 427 618 q 233 552 271 618 q 183 390 195 487 l 513 392 "},"s":{"x_min":68,"x_max":531,"ha":593,"o":"m 117 161 q 172 69 130 102 q 276 36 214 36 q 378 67 333 36 q 424 152 424 98 q 334 260 424 224 q 168 320 251 290 q 79 460 79 366 q 147 612 79 552 q 310 672 216 672 q 400 660 355 672 q 500 627 446 649 l 461 508 l 448 508 q 401 587 433 561 q 314 614 369 614 q 223 584 262 614 q 185 505 185 555 q 358 375 185 427 q 531 197 531 322 q 450 39 531 93 q 259 -15 369 -15 q 68 23 162 -15 l 103 161 l 117 161 "},"B":{"x_min":109,"x_max":751,"ha":801,"o":"m 127 559 q 109 931 127 759 l 203 929 q 338 932 244 929 q 438 935 432 935 q 629 883 549 935 q 709 726 709 832 q 638 579 709 633 q 464 504 567 524 q 673 438 595 490 q 751 268 751 387 q 639 66 751 133 q 382 0 528 0 l 232 6 q 162 3 211 6 q 109 0 113 0 q 118 287 109 86 q 127 559 127 488 m 256 257 l 256 149 l 261 61 l 337 57 q 526 108 450 57 q 602 266 602 159 q 523 428 602 386 q 312 471 444 471 l 256 471 l 256 257 m 569 706 q 507 834 569 788 q 361 879 446 879 l 261 875 q 252 709 252 798 l 252 522 q 476 558 384 522 q 569 706 569 595 "},"…":{"x_min":119,"x_max":1005,"ha":1160,"o":"m 191 130 q 244 108 223 130 q 266 55 266 87 q 244 5 266 25 q 191 -15 223 -15 q 139 4 160 -15 q 119 55 119 23 q 139 108 119 87 q 191 130 159 130 m 560 130 q 612 108 591 130 q 634 55 634 87 q 612 5 634 25 q 560 -15 591 -15 q 507 4 528 -15 q 487 55 487 23 q 507 109 487 88 q 560 130 528 130 m 930 130 q 983 108 962 130 q 1005 55 1005 87 q 983 5 1005 25 q 930 -15 962 -15 q 878 4 899 -15 q 858 55 858 23 q 878 108 858 87 q 930 130 898 130 "},"?":{"x_min":128,"x_max":520,"ha":601,"o":"m 307 156 q 367 130 342 156 q 392 68 392 105 q 367 7 392 30 q 307 -15 343 -15 q 244 8 269 -15 q 220 68 220 32 q 244 130 220 105 q 307 156 269 156 m 329 250 q 214 290 261 250 q 168 399 168 331 q 287 595 168 479 q 406 776 406 712 q 371 858 406 823 q 292 894 337 894 q 207 867 243 894 q 162 794 171 840 l 150 794 q 142 835 146 822 q 128 894 139 849 q 210 936 165 922 q 305 950 255 950 q 457 893 394 950 q 520 748 520 837 q 398 550 520 657 q 276 370 276 443 q 293 316 276 337 q 343 296 310 296 q 397 302 372 296 l 383 256 q 357 251 365 252 q 329 250 348 250 "},"H":{"x_min":108,"x_max":927.453125,"ha":1036,"o":"m 258 318 q 263 143 258 255 q 268 0 268 30 q 229 3 255 0 q 188 8 202 8 q 148 3 174 8 q 108 0 121 0 q 117 239 108 70 q 126 465 126 408 q 122 711 126 620 q 108 932 119 803 q 153 928 124 932 q 188 925 183 925 q 231 928 204 925 q 268 932 259 932 q 263 719 268 854 q 258 547 258 584 l 517 543 l 777 547 q 773 786 777 641 q 769 932 769 930 q 814 928 785 932 q 848 925 842 925 q 894 928 864 925 q 927 932 923 932 q 914 798 919 868 q 909 659 909 729 l 909 448 l 909 283 q 916 135 909 238 q 924 0 924 31 q 885 4 911 0 q 846 8 860 8 q 807 4 832 8 q 769 0 781 0 q 773 101 769 37 q 777 177 777 164 l 777 318 l 777 468 q 604 468 720 468 q 431 468 489 468 l 258 468 l 258 318 "},"ν":{"x_min":0,"x_max":632,"ha":654,"o":"m 319 8 q 296 5 309 8 q 272 0 283 2 q 200 206 234 120 q 0 654 165 291 q 84 647 45 647 q 113 647 98 647 q 168 654 127 648 q 252 402 204 529 l 360 131 q 469 358 440 267 q 499 520 499 448 q 492 579 499 543 q 477 641 486 615 q 552 649 527 645 q 613 661 576 652 q 628 611 625 623 q 632 576 632 598 q 621 501 632 536 q 560 373 611 466 q 461 190 509 280 q 372 0 412 99 q 345 3 363 0 q 319 8 327 8 "},"î":{"x_min":-25,"x_max":365.328125,"ha":340,"o":"m 104 144 l 104 522 l 97 655 q 138 650 113 651 q 167 649 162 649 q 233 655 206 649 q 225 506 225 581 q 229 254 225 423 q 233 0 233 84 q 201 3 216 1 q 164 5 186 5 q 127 3 146 5 q 97 0 108 1 l 104 144 m 125 978 l 214 978 l 365 743 l 319 743 l 170 875 l 24 743 l -25 743 l 125 978 "},"c":{"x_min":36,"x_max":613.78125,"ha":644,"o":"m 606 119 l 594 41 q 493 -3 548 7 q 365 -15 438 -15 q 131 79 227 -15 q 36 312 36 173 q 134 576 36 480 q 399 672 233 672 q 513 658 459 672 q 613 616 566 645 q 586 492 597 563 l 571 492 q 510 586 550 553 q 406 619 470 619 q 235 532 294 619 q 176 327 176 445 q 237 125 176 209 q 415 42 299 42 q 594 122 520 42 l 606 119 "},"¶":{"x_min":18,"x_max":531,"ha":590,"o":"m 298 968 l 531 968 l 531 910 l 473 910 l 473 4 l 415 4 l 415 910 l 305 910 l 305 4 l 247 4 l 247 558 q 99 602 163 558 q 27 690 36 645 q 18 744 18 734 q 90 896 18 824 q 298 968 163 968 "},"β":{"x_min":96,"x_max":737.671875,"ha":779,"o":"m 160 -365 q 129 -367 151 -365 q 96 -369 107 -369 q 100 -253 96 -325 q 104 -169 104 -182 l 104 101 l 104 565 q 168 898 104 771 q 419 1025 232 1025 q 605 960 525 1025 q 686 787 686 895 q 641 641 686 705 q 522 548 597 577 q 682 454 626 515 q 737 290 737 394 q 648 73 737 162 q 431 -15 559 -15 q 324 3 372 -15 q 226 61 276 22 q 224 -44 226 19 q 223 -110 223 -107 l 230 -369 q 193 -367 220 -369 q 160 -365 166 -365 m 356 564 q 507 618 458 564 q 557 779 557 673 q 520 917 557 859 q 407 975 483 975 q 279 906 323 975 q 234 752 234 838 q 232 613 234 701 q 230 506 230 524 l 226 355 l 230 230 q 275 94 230 147 q 406 41 321 41 q 552 116 504 41 q 600 297 600 192 q 550 443 600 386 q 412 499 500 499 q 361 497 384 499 q 327 493 337 494 l 329 516 l 329 565 l 356 564 "},"Μ":{"x_min":55,"x_max":1165,"ha":1238,"o":"m 190 950 l 243 950 q 331 772 291 851 q 412 612 370 693 q 504 436 454 532 l 626 214 q 742 435 671 298 q 882 711 813 572 q 1001 950 952 850 l 1052 950 q 1082 649 1067 791 q 1118 341 1098 508 q 1165 0 1139 174 q 1121 8 1139 5 q 1088 11 1103 11 q 1049 6 1071 11 q 1008 0 1027 2 q 998 226 1008 109 q 974 461 989 343 q 944 695 959 579 l 748 312 q 610 0 665 152 l 594 1 l 576 0 q 227 685 402 364 l 188 307 q 172 128 175 179 q 168 0 168 77 q 138 4 157 1 q 110 6 118 6 q 81 4 93 6 q 55 0 68 2 q 121 333 89 168 q 171 652 152 498 q 190 950 190 805 "},"Ό":{"x_min":-1,"x_max":1305,"ha":1356,"o":"m 288 465 q 429 820 288 690 q 796 950 570 950 q 1129 853 991 950 q 1284 654 1268 757 q 1302 525 1299 551 q 1305 462 1305 500 q 1302 402 1305 426 q 1284 277 1299 379 q 1131 80 1268 175 q 797 -15 993 -15 q 684 -10 733 -15 q 541 29 635 -5 q 367 186 447 64 q 288 465 288 308 m 182 943 q 215 974 200 964 q 251 985 230 985 q 289 969 274 985 q 304 932 304 954 q 290 896 304 911 q 247 866 275 882 l 48 743 l -1 743 l 182 943 m 439 468 q 527 162 439 282 q 796 42 616 42 q 1063 162 975 42 q 1152 468 1152 283 q 1062 770 1152 651 q 796 889 972 889 q 585 826 666 889 q 462 639 504 764 q 439 468 439 552 "},"Ή":{"x_min":-1.390625,"x_max":1233.046875,"ha":1341,"o":"m 564 316 q 569 142 564 254 q 574 0 574 30 q 535 4 561 0 q 494 8 508 8 q 454 4 480 8 q 414 0 427 0 q 423 239 414 70 q 432 465 432 408 q 428 711 432 620 q 414 931 425 802 q 459 928 430 931 q 494 924 489 924 q 537 928 510 924 q 574 931 565 931 q 569 719 574 854 q 564 547 564 584 l 823 543 l 1083 547 q 1078 786 1083 641 q 1074 931 1074 930 q 1119 928 1091 931 q 1153 924 1148 924 q 1199 928 1170 924 q 1233 931 1228 931 q 1221 798 1226 868 q 1217 659 1217 729 l 1215 448 l 1217 283 q 1225 135 1217 238 q 1233 0 1233 31 q 1194 4 1220 0 q 1154 8 1167 8 q 1113 4 1140 8 q 1075 0 1087 0 q 1078 100 1075 37 q 1082 176 1082 163 l 1083 316 l 1083 465 q 910 466 1026 465 q 737 468 795 468 l 564 465 l 564 316 m 181 943 q 215 974 200 964 q 251 985 230 985 q 288 969 273 985 q 304 932 304 954 q 289 896 304 911 q 247 866 275 882 l 47 743 l -1 743 l 181 943 "},"•":{"x_min":204.171875,"x_max":795.828125,"ha":1003,"o":"m 501 789 q 709 702 622 789 q 795 493 795 615 q 709 286 795 372 q 501 201 623 201 q 290 286 377 201 q 204 493 204 371 q 226 605 204 550 q 312 725 248 661 q 501 789 376 789 "},"¥":{"x_min":32,"x_max":699,"ha":750,"o":"m 313 278 q 176 273 268 278 q 50 268 83 268 l 50 335 q 147 332 82 335 q 246 329 213 329 l 313 329 l 313 436 l 176 436 l 50 432 l 50 495 q 182 492 90 495 q 281 490 275 490 l 126 743 l 32 888 l 91 883 l 191 887 q 225 814 208 845 q 287 699 241 783 l 397 512 q 477 653 433 570 q 592 887 521 736 l 643 883 l 699 887 l 625 773 l 554 655 l 454 490 q 593 492 496 490 q 697 495 690 495 l 697 431 l 434 436 l 434 330 l 572 329 q 636 332 595 329 q 697 335 678 335 l 697 268 l 568 278 l 434 278 q 434 143 434 208 q 442 0 435 77 l 365 5 l 299 0 q 310 131 307 54 q 313 278 313 208 "},"(":{"x_min":114,"x_max":380.5625,"ha":449,"o":"m 114 388 q 175 684 114 545 q 351 950 237 822 q 380 918 361 933 q 253 660 291 782 q 215 379 215 538 q 256 103 215 231 q 380 -151 297 -25 q 351 -183 361 -167 q 173 84 232 -50 q 114 388 114 219 "},"U":{"x_min":101,"x_max":919.0625,"ha":1015,"o":"m 181 926 q 228 929 195 926 q 263 932 262 932 q 251 804 255 853 q 248 697 248 755 l 248 457 q 315 134 248 212 q 515 57 382 57 q 733 129 654 57 q 813 334 813 201 l 813 458 l 813 655 q 810 797 813 733 q 798 931 807 862 q 827 927 813 929 q 859 926 841 926 q 888 929 868 926 q 919 932 907 932 q 905 779 909 853 q 902 600 902 705 l 902 366 q 793 81 902 178 q 492 -15 685 -15 q 211 66 307 -15 q 116 323 116 147 l 116 425 l 116 698 q 109 826 116 759 q 101 931 103 893 q 138 927 120 929 q 181 926 156 926 "},"γ":{"x_min":-12,"x_max":701,"ha":681,"o":"m 642 647 q 701 654 669 647 q 593 440 633 520 q 502 247 553 359 l 411 48 l 411 -90 q 415 -238 411 -138 q 419 -372 419 -337 l 372 -366 q 282 -372 325 -366 q 287 -195 282 -313 q 292 -33 292 -76 q 260 192 292 47 q 170 460 229 338 q 39 583 111 583 l -12 579 l -10 608 l -12 638 q 43 662 14 653 q 101 672 71 672 q 279 554 234 672 q 398 143 324 437 q 496 393 439 244 q 590 654 553 541 q 615 648 607 650 q 642 647 623 647 "},"α":{"x_min":41,"x_max":827.109375,"ha":846,"o":"m 705 352 q 803 -1 763 155 l 739 1 l 673 -1 l 632 172 q 521 36 593 87 q 356 -15 448 -15 q 129 81 217 -15 q 41 316 41 177 q 130 569 41 467 q 368 672 220 672 q 537 622 464 672 q 659 486 610 573 q 711 654 691 569 l 770 650 l 827 654 q 763 505 792 576 q 705 352 734 434 m 377 619 q 226 530 272 619 q 181 326 181 442 q 223 124 181 214 q 367 34 265 34 q 528 137 480 34 q 601 323 577 240 q 527 531 578 444 q 377 619 475 619 "},"F":{"x_min":108,"x_max":613.5625,"ha":671,"o":"m 258 316 q 263 142 258 254 q 268 0 268 30 q 229 3 255 0 q 188 8 202 8 q 148 3 174 8 q 108 0 121 0 q 117 239 108 70 q 126 465 126 408 q 122 711 126 620 q 108 932 119 802 l 358 928 l 613 931 l 610 886 l 613 836 q 505 855 549 851 q 388 860 460 860 l 260 860 l 258 671 l 258 528 l 398 528 q 587 541 480 528 l 584 497 l 587 451 l 394 463 l 258 463 l 258 316 "},"­":{"x_min":0,"x_max":683.328125,"ha":683,"o":"m 0 374 l 683 374 l 683 289 l 0 289 l 0 374 "},":":{"x_min":134,"x_max":309,"ha":446,"o":"m 222 636 q 284 611 259 636 q 309 548 309 586 q 284 486 309 512 q 222 461 260 461 q 160 486 186 461 q 134 548 134 511 q 159 610 134 584 q 222 636 185 636 m 221 156 q 283 131 257 156 q 309 69 309 107 q 284 8 309 32 q 221 -15 259 -15 q 159 9 185 -15 q 134 69 134 33 q 159 131 134 107 q 221 156 185 156 "},"Χ":{"x_min":0,"x_max":739,"ha":739,"o":"m 200 285 l 318 456 q 18 932 159 718 q 63 929 33 932 q 109 926 94 926 q 168 929 147 926 q 198 932 188 932 q 296 743 244 841 q 391 568 348 644 l 489 726 q 597 932 548 825 q 627 927 614 929 q 661 926 641 926 q 693 929 671 926 q 728 932 715 932 q 616 781 673 862 q 524 652 558 700 l 427 512 q 523 347 480 419 q 614 197 566 275 q 739 0 662 119 q 686 3 719 0 q 647 6 652 6 q 595 4 618 6 q 558 0 572 1 q 459 197 512 97 q 353 398 405 298 l 265 249 q 174 96 193 130 q 127 0 155 62 q 89 3 113 0 q 62 6 65 6 q 26 4 43 6 q 0 0 9 1 l 200 285 "},"*":{"x_min":94,"x_max":580,"ha":675,"o":"m 336 940 q 367 944 349 940 q 389 948 385 948 q 368 850 375 902 q 362 747 362 799 q 522 873 442 800 q 548 812 539 829 q 580 778 556 796 q 386 702 485 750 q 476 661 427 680 q 575 629 524 643 q 521 535 539 587 q 441 604 478 573 q 362 661 403 634 q 369 564 362 615 q 391 459 377 513 q 360 463 379 459 q 336 467 340 467 q 306 463 325 467 q 282 459 288 459 q 304 568 296 522 q 313 661 313 615 q 152 535 221 602 q 128 589 138 569 q 97 630 117 608 q 185 661 140 643 q 287 704 231 679 q 189 746 234 728 q 94 777 145 763 q 125 818 113 795 q 150 873 137 841 q 227 805 184 839 q 313 747 269 771 q 309 810 313 784 q 282 950 305 836 q 310 942 297 945 q 336 940 324 940 "},"°":{"x_min":176,"x_max":508,"ha":683,"o":"m 176 889 q 228 1010 176 961 q 355 1060 280 1060 q 460 1011 413 1060 q 508 904 508 962 q 455 785 508 839 q 337 731 402 731 q 222 776 269 731 q 176 889 176 821 m 241 880 q 266 805 241 836 q 336 775 292 775 q 413 811 386 775 q 441 899 441 847 q 417 985 441 952 q 343 1018 393 1018 q 281 995 307 1018 q 247 940 254 973 q 241 880 241 906 "},"V":{"x_min":0,"x_max":852.78125,"ha":853,"o":"m 190 477 l 74 759 l 0 932 l 83 926 q 134 929 98 926 q 173 931 170 931 q 206 829 187 884 q 248 704 224 773 l 308 548 l 454 153 l 586 502 q 729 931 666 713 l 790 927 l 852 931 q 643 467 748 720 q 470 0 538 215 q 445 4 457 1 q 418 6 432 6 q 384 3 399 6 q 366 0 368 0 q 279 256 331 123 q 190 477 226 389 "},"Ξ":{"x_min":58.328125,"x_max":818.0625,"ha":878,"o":"m 437 821 q 258 817 377 821 q 77 813 138 813 q 84 851 83 838 q 84 872 84 864 q 77 932 84 900 q 256 928 137 932 q 437 924 376 924 q 618 928 497 924 q 797 932 738 932 l 791 872 q 794 842 791 861 q 797 813 797 822 q 619 817 738 813 q 437 821 500 821 m 470 430 q 335 425 440 430 q 183 421 230 421 q 187 456 186 433 q 188 481 188 480 q 183 543 188 515 q 304 538 215 543 q 437 533 394 533 q 572 538 481 533 q 694 543 662 543 l 687 482 l 694 421 q 572 425 650 421 q 470 430 494 430 m 437 8 q 250 4 376 8 q 58 0 123 0 l 63 63 l 58 129 q 268 124 134 129 q 437 119 401 119 q 636 124 502 119 q 818 129 769 129 l 813 63 l 818 0 q 627 4 754 0 q 437 8 501 8 "}," ":{"x_min":0,"x_max":0,"ha":375},"Ϋ":{"x_min":-26,"x_max":746,"ha":708,"o":"m 299 177 l 299 387 q 190 577 235 501 q 87 747 146 652 q -26 931 29 841 q 23 929 -13 931 q 65 926 61 926 q 110 929 78 926 q 146 931 143 931 q 208 800 175 866 q 278 676 241 734 l 391 475 q 627 931 519 693 l 683 927 q 721 929 701 927 q 746 931 741 931 q 652 786 702 866 q 557 627 602 705 l 432 415 l 432 241 q 435 97 432 184 q 439 0 439 10 q 395 4 414 2 q 361 6 376 6 q 320 4 336 6 q 286 0 304 2 q 294 88 290 36 q 299 177 299 141 m 233 1208 q 286 1187 265 1208 q 307 1133 307 1166 q 285 1080 307 1103 q 233 1058 263 1058 q 179 1080 202 1058 q 157 1133 157 1103 q 179 1186 157 1164 q 233 1208 202 1208 m 475 1208 q 528 1186 506 1208 q 550 1133 550 1164 q 528 1080 550 1103 q 475 1058 506 1058 q 422 1080 444 1058 q 400 1133 400 1102 q 421 1186 400 1164 q 475 1208 443 1208 "},"0":{"x_min":48,"x_max":699,"ha":749,"o":"m 372 909 q 621 773 544 909 q 699 451 699 637 q 627 116 699 252 q 372 -19 556 -19 q 120 114 193 -19 q 48 444 48 247 q 120 774 48 639 q 372 909 193 909 m 187 365 q 226 137 187 238 q 373 37 266 37 q 457 62 421 37 q 519 142 494 88 q 552 271 545 196 q 559 455 559 346 q 526 736 559 622 q 371 851 493 851 q 245 783 280 851 q 198 647 210 716 q 187 444 187 577 l 187 365 "},"”":{"x_min":104.171875,"x_max":570.828125,"ha":625,"o":"m 184 858 q 211 924 193 898 q 265 951 230 951 q 320 903 316 951 q 310 856 320 881 q 283 812 300 831 l 136 568 l 104 576 l 184 858 m 433 858 q 468 928 452 905 q 516 951 483 951 q 555 938 540 951 q 570 903 570 926 q 561 859 570 881 q 536 812 552 837 l 387 568 l 355 576 l 433 858 "},"@":{"x_min":78,"x_max":1289,"ha":1367,"o":"m 906 640 l 970 640 l 876 266 l 864 203 q 886 157 864 172 q 940 142 908 142 q 1136 262 1062 142 q 1211 513 1211 383 q 1067 801 1211 693 q 735 909 923 909 q 324 753 495 909 q 154 362 154 598 q 301 1 154 135 q 679 -132 448 -132 q 904 -99 791 -132 q 1105 -6 1016 -67 l 1129 -43 q 923 -150 1033 -113 q 694 -188 812 -188 q 258 -43 439 -188 q 78 350 78 100 q 273 791 78 614 q 737 969 469 969 q 1122 843 955 969 q 1289 507 1289 717 q 1187 214 1289 346 q 930 82 1086 82 q 835 103 879 82 q 792 170 792 124 l 792 203 q 709 116 762 150 q 595 82 655 82 q 439 139 493 82 q 386 302 386 197 q 471 553 386 441 q 692 665 556 665 q 797 639 754 665 q 864 556 840 613 l 906 640 m 849 477 q 796 572 835 535 q 701 609 758 609 q 529 511 592 609 q 467 297 467 413 q 503 184 467 230 q 605 139 540 139 q 733 188 679 139 q 807 313 787 238 l 849 477 "},"Ί":{"x_min":-1.390625,"x_max":580.0625,"ha":690,"o":"m 433 465 q 429 711 433 620 q 414 931 426 802 q 461 927 435 929 q 498 925 487 925 q 546 928 517 925 q 580 931 575 931 q 572 788 580 887 q 564 659 564 690 l 562 448 l 564 283 q 572 135 564 238 q 580 0 580 31 q 539 4 567 0 q 498 8 512 8 q 457 5 480 8 q 414 0 435 2 q 423 239 414 70 q 433 465 433 408 m 181 943 q 215 974 200 964 q 251 985 230 985 q 288 969 273 985 q 304 932 304 954 q 289 896 304 911 q 247 866 275 882 l 47 743 l -1 743 l 181 943 "},"ö":{"x_min":40,"x_max":712,"ha":753,"o":"m 371 -15 q 131 79 223 -15 q 40 322 40 173 q 133 572 40 473 q 380 672 227 672 q 621 575 530 672 q 712 327 712 479 q 619 80 712 175 q 371 -15 527 -15 m 253 929 q 307 906 285 929 q 330 854 330 884 q 309 800 330 822 q 257 778 288 778 q 202 800 225 778 q 180 854 180 823 q 200 906 180 884 q 253 929 221 929 m 498 929 q 549 906 527 929 q 572 854 572 884 q 551 799 572 820 q 499 778 531 778 q 444 800 466 778 q 422 854 422 822 q 444 906 422 884 q 498 929 466 929 m 377 622 q 227 532 274 622 q 180 327 180 442 q 227 125 180 216 q 375 35 274 35 q 524 124 478 35 q 570 327 570 214 q 524 531 570 441 q 377 622 479 622 "},"i":{"x_min":91.765625,"x_max":244,"ha":342,"o":"m 100 144 l 100 520 l 93 654 q 161 648 130 648 q 194 649 182 648 q 229 654 207 650 q 221 579 224 616 q 219 505 219 543 q 224 240 219 417 q 229 0 229 63 q 197 3 212 1 q 161 5 181 5 q 116 2 131 5 q 91 0 100 0 l 100 144 m 168 963 q 223 940 202 963 q 244 881 244 917 q 222 831 244 849 q 168 813 200 813 q 115 833 137 813 q 93 885 93 853 q 113 941 93 919 q 168 963 134 963 "},"Β":{"x_min":109,"x_max":751,"ha":801,"o":"m 127 559 q 109 931 127 759 l 203 929 q 338 932 244 929 q 438 935 432 935 q 629 883 549 935 q 709 726 709 832 q 638 579 709 633 q 464 504 567 524 q 673 438 595 490 q 751 268 751 387 q 639 66 751 133 q 382 0 528 0 l 232 6 q 162 3 211 6 q 109 0 113 0 q 118 287 109 86 q 127 559 127 488 m 256 257 l 256 149 l 261 61 l 337 57 q 526 108 450 57 q 602 266 602 159 q 523 428 602 386 q 312 471 444 471 l 256 471 l 256 257 m 569 706 q 507 834 569 788 q 361 879 446 879 l 261 875 q 252 709 252 798 l 252 522 q 476 558 384 522 q 569 706 569 595 "},"≤":{"x_min":176,"x_max":962.703125,"ha":1139,"o":"m 288 491 l 962 266 l 962 196 l 176 462 l 176 521 l 962 788 l 962 718 l 288 491 m 962 26 l 176 26 l 176 93 l 962 93 l 962 26 "},"υ":{"x_min":79,"x_max":703,"ha":774,"o":"m 703 397 q 596 110 703 236 q 332 -15 489 -15 q 145 54 211 -15 q 79 244 79 123 l 83 430 q 81 542 83 486 q 79 654 80 598 l 146 650 l 217 654 q 209 503 217 608 q 202 366 202 398 l 202 261 q 240 105 202 168 q 369 43 279 43 q 523 133 476 43 q 571 341 571 223 q 548 493 571 418 q 488 645 526 568 q 550 648 529 645 q 627 659 571 650 q 703 397 703 538 "},"]":{"x_min":83,"x_max":332,"ha":449,"o":"m 209 -154 l 83 -158 l 85 -129 l 85 -98 q 183 -104 128 -104 l 229 -104 l 232 386 l 232 880 l 185 880 q 134 877 162 880 q 83 872 107 874 l 85 903 l 85 932 l 205 929 l 332 929 q 326 852 332 909 q 321 766 321 794 l 321 455 l 321 2 l 332 -158 l 209 -154 "},"m":{"x_min":91,"x_max":1075,"ha":1167,"o":"m 101 155 l 101 494 q 98 568 101 529 q 91 654 96 606 q 155 647 123 647 l 221 654 l 216 537 q 317 638 261 604 q 450 672 373 672 q 629 547 581 672 q 733 639 677 606 q 860 672 789 672 q 1018 606 968 672 q 1069 429 1069 540 l 1069 298 l 1069 136 l 1075 0 q 1038 3 1063 0 q 1006 6 1013 6 q 968 3 992 6 q 938 0 943 0 q 944 203 938 68 q 950 406 950 338 q 918 536 950 486 q 810 587 887 587 q 699 540 745 587 q 648 452 653 493 q 642 376 643 410 q 641 326 641 342 l 641 314 q 644 132 641 258 q 647 0 647 6 q 607 4 621 2 q 581 5 593 5 q 542 2 570 5 q 514 0 515 0 q 519 168 514 55 q 524 321 524 280 l 524 406 q 490 534 524 482 q 383 587 457 587 q 273 541 314 587 q 223 436 231 496 q 216 314 216 376 q 219 133 216 244 q 222 0 222 22 q 183 3 207 0 q 154 6 159 6 q 117 4 134 6 q 91 0 100 1 l 101 155 "},"χ":{"x_min":-1,"x_max":725.390625,"ha":713,"o":"m 500 426 q 554 536 528 476 q 607 654 580 595 l 675 650 l 725 652 q 623 507 672 586 q 519 330 573 427 l 444 197 q 575 -85 507 55 q 719 -371 643 -227 q 665 -371 701 -371 q 611 -371 629 -371 l 560 -371 q 444 -115 497 -230 q 358 72 392 -1 l 255 -95 q 178 -237 208 -174 q 125 -371 147 -299 l 62 -371 l 0 -371 q 125 -192 68 -278 q 240 -5 182 -106 l 324 136 l 201 402 q 146 519 174 460 q 43 587 103 587 l -1 584 l -1 638 q 128 672 57 672 q 222 627 181 672 q 292 522 264 583 l 359 374 l 411 260 l 500 426 "},"8":{"x_min":59,"x_max":689,"ha":749,"o":"m 110 696 q 187 853 110 797 q 370 909 264 909 q 558 854 480 909 q 636 694 636 800 q 589 575 636 621 q 467 510 543 529 l 467 499 q 630 413 572 475 q 689 247 689 351 q 597 51 689 120 q 374 -18 505 -18 q 149 48 239 -18 q 59 247 59 115 q 118 414 59 347 q 281 499 178 480 l 281 510 q 157 570 205 521 q 110 696 110 619 m 371 531 q 472 577 437 531 q 507 693 507 624 q 470 810 507 764 q 366 856 433 856 q 271 807 305 856 q 238 693 238 758 q 271 578 238 625 q 371 531 305 531 m 373 31 q 505 97 461 31 q 550 255 550 164 q 506 415 550 348 q 373 482 462 482 q 239 416 283 482 q 195 255 195 351 q 240 96 195 162 q 373 31 285 31 "},"ί":{"x_min":96,"x_max":429.34375,"ha":342,"o":"m 104 333 l 104 520 q 103 566 104 544 q 96 654 102 588 q 141 647 130 648 q 165 647 151 647 q 233 654 196 647 q 224 555 226 599 q 223 437 223 511 l 223 406 q 228 194 223 337 q 233 0 233 51 q 201 3 216 1 q 165 5 185 5 q 127 3 148 5 q 96 0 107 1 q 100 165 96 51 q 104 333 104 279 m 308 943 q 341 974 326 964 q 377 985 357 985 q 415 969 401 985 q 429 932 429 954 q 414 896 429 912 q 373 866 400 880 l 174 743 l 125 743 l 308 943 "},"Ζ":{"x_min":6.9375,"x_max":801.390625,"ha":828,"o":"m 6 36 q 222 324 112 176 q 425 605 333 473 l 597 857 l 433 857 q 59 836 247 857 l 65 883 l 59 932 q 262 927 134 932 q 427 922 390 922 q 622 927 491 922 q 801 932 754 932 l 801 904 q 594 629 709 785 q 399 361 479 473 q 201 77 319 249 l 427 77 q 581 82 520 77 q 801 103 643 87 l 797 68 l 795 54 l 797 34 l 801 0 q 504 4 683 0 q 325 8 326 8 q 166 4 272 8 q 6 0 61 0 l 6 36 "},"R":{"x_min":109,"x_max":806.234375,"ha":785,"o":"m 261 0 q 223 3 248 0 q 185 8 198 8 q 148 5 168 8 q 109 0 127 2 q 118 306 109 90 q 127 598 127 523 q 122 761 127 672 q 109 931 117 849 l 203 929 l 409 935 q 618 882 529 935 q 708 719 708 830 q 634 559 708 615 q 442 473 560 503 q 620 240 533 355 q 806 0 708 124 l 732 5 l 610 0 q 449 240 529 127 q 283 455 369 353 l 251 455 l 251 307 q 256 138 251 245 q 261 0 261 31 m 570 699 q 504 835 570 791 q 344 879 439 879 l 261 875 q 253 772 255 834 q 251 701 251 709 l 251 504 q 479 542 388 504 q 570 699 570 581 "},"×":{"x_min":203.984375,"x_max":938.015625,"ha":1139,"o":"m 892 775 l 938 729 l 616 406 l 938 86 l 892 38 l 571 361 l 247 38 l 203 86 l 525 407 l 204 729 l 247 775 l 570 453 l 892 775 "},"o":{"x_min":41,"x_max":710,"ha":753,"o":"m 371 -15 q 131 78 222 -15 q 41 322 41 172 q 133 573 41 474 q 378 672 225 672 q 619 574 528 672 q 710 326 710 477 q 617 80 710 175 q 371 -15 525 -15 m 377 619 q 226 530 272 619 q 180 327 180 441 q 227 125 180 216 q 375 35 274 35 q 524 123 478 35 q 570 326 570 211 q 524 529 570 440 q 377 619 479 619 "},"5":{"x_min":75,"x_max":654,"ha":749,"o":"m 116 201 q 176 77 131 120 q 303 35 221 35 q 454 98 396 35 q 512 255 512 161 q 457 407 512 346 q 313 469 403 469 q 170 417 227 469 l 150 428 l 158 526 q 158 662 158 570 q 158 801 158 754 l 147 888 l 383 879 l 412 879 q 628 887 520 879 q 624 848 626 870 q 622 818 622 826 l 626 760 l 425 761 l 227 761 q 221 631 227 717 q 216 500 216 544 q 375 536 296 536 q 572 465 491 536 q 654 279 654 394 q 550 60 654 139 q 304 -18 447 -18 q 179 -6 231 -18 q 75 34 127 4 q 101 201 87 118 l 116 201 "},"7":{"x_min":122.609375,"x_max":729.5625,"ha":749,"o":"m 461 553 l 586 770 l 362 770 q 129 755 232 770 q 133 786 132 769 q 135 820 135 804 q 128 888 135 853 l 408 883 l 729 887 l 729 871 q 463 429 582 641 q 251 0 344 216 l 194 8 q 153 5 169 8 q 122 0 137 2 q 214 146 179 91 q 333 339 249 201 q 461 553 417 477 "},"K":{"x_min":108,"x_max":856.625,"ha":821,"o":"m 255 314 q 261 132 255 250 q 268 0 268 13 q 229 4 255 0 q 188 8 202 8 q 148 4 174 8 q 108 0 121 0 q 117 239 108 70 q 126 465 126 408 q 122 712 126 621 q 108 932 119 803 q 153 928 124 932 q 188 925 183 925 q 231 928 203 925 q 267 932 259 932 l 255 671 l 255 499 q 480 693 375 586 q 687 932 585 800 q 732 932 710 932 q 777 932 753 932 l 837 932 q 606 727 720 830 q 389 522 493 623 q 525 358 465 426 q 666 202 586 290 q 856 0 747 115 l 746 0 q 692 -1 716 0 q 644 -8 669 -2 q 571 92 610 44 q 477 204 532 140 l 255 459 l 255 314 "},",":{"x_min":40.28125,"x_max":272.21875,"ha":374,"o":"m 131 75 q 160 147 144 120 q 213 175 176 175 q 272 119 272 175 q 259 67 272 91 q 231 18 245 43 l 73 -243 l 40 -231 l 131 75 "},"d":{"x_min":55,"x_max":676,"ha":758,"o":"m 668 762 l 672 137 l 676 -1 q 638 3 653 1 q 611 5 623 5 q 574 2 597 5 q 547 -1 551 -1 l 557 119 q 336 -15 484 -15 q 127 86 200 -15 q 55 330 55 187 q 127 569 55 467 q 332 672 199 672 q 457 643 402 672 q 551 556 513 615 l 551 756 l 551 789 l 551 818 q 542 1025 551 927 q 609 1018 576 1018 q 639 1019 628 1018 q 675 1025 651 1020 l 668 762 m 374 57 q 515 139 473 57 q 557 332 557 222 q 513 522 557 437 q 374 607 470 607 q 236 522 278 607 q 194 332 194 438 q 235 141 194 225 q 374 57 277 57 "},"¨":{"x_min":83.71875,"x_max":550.390625,"ha":625,"o":"m 471 659 q 441 593 458 618 q 389 568 424 568 q 350 579 365 568 q 335 613 335 591 q 346 660 335 633 q 371 706 358 687 l 519 950 l 550 940 l 471 659 m 221 659 q 192 593 211 618 q 137 568 174 568 q 83 613 83 568 q 93 658 83 637 q 119 706 103 680 l 268 950 l 300 940 l 221 659 "},"E":{"x_min":108,"x_max":613.5625,"ha":686,"o":"m 126 465 q 122 711 126 620 q 108 932 119 802 l 353 928 l 610 931 l 606 884 l 610 836 q 508 853 562 847 q 408 860 453 860 l 260 860 l 258 671 l 258 528 l 398 528 q 587 541 480 528 l 584 497 l 587 451 l 394 463 l 258 463 l 258 316 l 264 73 q 456 76 380 73 q 613 94 531 80 l 610 47 l 613 0 l 358 4 l 108 0 q 117 239 108 70 q 126 465 126 408 "},"Y":{"x_min":-28,"x_max":746,"ha":707,"o":"m 297 177 l 297 386 q 191 570 256 458 q 84 750 125 682 q -28 932 42 819 q 24 928 -9 932 q 63 925 59 925 q 112 927 91 925 q 146 932 134 930 q 207 800 174 866 q 275 676 239 735 l 389 475 q 509 688 451 575 q 627 932 567 801 l 683 926 q 715 927 701 926 q 746 932 729 929 q 555 627 640 769 l 432 415 l 432 240 q 435 101 432 198 q 438 0 438 5 q 401 4 426 1 q 361 6 376 6 q 319 4 334 6 q 284 0 304 2 q 292 88 288 36 q 297 177 297 140 "},"\"":{"x_min":64,"x_max":315,"ha":379,"o":"m 133 587 l 64 587 l 64 957 l 133 957 l 133 587 m 315 587 l 247 587 l 247 957 l 315 957 l 315 587 "},"ê":{"x_min":40,"x_max":646.9375,"ha":681,"o":"m 406 42 q 602 130 523 42 l 621 130 q 613 93 617 112 q 609 47 609 73 q 496 0 558 14 q 369 -15 435 -15 q 130 73 220 -15 q 40 311 40 162 q 126 562 40 456 q 355 669 212 669 q 564 590 481 669 q 646 386 646 512 l 644 331 q 438 333 562 331 q 314 335 315 335 l 179 331 q 235 127 179 212 q 406 42 291 42 m 296 978 l 386 978 l 537 743 l 488 743 l 340 875 l 193 743 l 143 743 l 296 978 m 513 392 l 513 437 q 470 563 513 509 q 356 618 427 618 q 233 552 271 618 q 183 390 195 487 l 513 392 "},"δ":{"x_min":41,"x_max":670,"ha":710,"o":"m 102 840 q 185 981 102 937 q 375 1025 268 1025 q 497 1010 436 1025 q 621 968 559 995 q 595 876 604 923 q 500 947 547 923 q 393 972 453 972 q 280 937 328 972 q 233 840 233 902 q 272 742 233 794 q 434 627 312 691 q 613 504 556 563 q 670 305 670 445 q 581 75 670 165 q 350 -15 492 -15 q 125 73 210 -15 q 41 305 41 162 q 113 526 41 430 q 306 622 186 622 q 145 726 189 674 q 102 840 102 779 m 356 576 q 221 492 261 576 q 181 302 181 409 q 223 118 181 203 q 356 34 265 34 q 490 116 450 34 q 530 307 530 198 q 489 492 530 409 q 356 576 449 576 "},"έ":{"x_min":53,"x_max":598.828125,"ha":628,"o":"m 506 516 q 433 591 467 566 q 353 616 400 616 q 261 580 298 616 q 225 492 225 545 q 268 406 225 437 q 372 375 311 375 l 418 375 l 417 352 l 417 313 l 343 317 q 237 282 281 317 q 193 185 193 247 q 238 78 193 118 q 352 38 284 38 q 460 66 410 38 q 543 144 510 94 q 553 99 547 121 q 567 54 558 76 q 452 2 515 19 q 321 -15 388 -15 q 134 31 216 -15 q 53 176 53 78 q 96 286 53 246 q 214 355 139 326 q 127 408 162 370 q 93 497 93 445 q 165 625 93 579 q 323 672 237 672 q 430 654 378 672 q 541 604 481 637 q 522 564 529 584 q 506 516 514 545 m 476 944 q 510 975 494 965 q 547 986 526 986 q 584 970 569 986 q 598 933 598 954 q 584 898 598 912 q 541 867 569 884 l 342 744 l 293 744 l 476 944 "},"ω":{"x_min":39.71875,"x_max":1028.9375,"ha":1068,"o":"m 535 526 l 596 528 l 594 305 q 616 117 594 193 q 722 42 638 42 q 850 118 811 42 q 888 293 888 194 q 829 502 888 409 q 664 654 769 594 l 717 648 q 805 654 766 648 q 967 510 905 606 q 1028 304 1028 413 q 948 81 1028 177 q 744 -15 867 -15 q 622 16 678 -15 q 534 104 566 47 q 445 16 500 48 q 323 -15 389 -15 q 118 83 196 -15 q 39 311 39 182 q 100 511 39 419 q 262 654 161 604 q 303 650 278 651 q 349 648 327 648 l 402 654 q 238 501 296 593 q 179 291 179 409 q 218 116 179 191 q 348 42 257 42 q 419 68 390 42 q 461 137 448 94 q 472 216 469 175 q 475 303 475 257 q 472 419 475 353 q 469 528 470 485 l 535 526 "},"´":{"x_min":90.28125,"x_max":305.5625,"ha":374,"o":"m 169 859 q 197 923 177 894 q 250 953 218 953 q 288 939 272 953 q 305 902 305 925 q 295 857 305 882 q 269 811 284 833 l 120 568 l 90 576 l 169 859 "},"±":{"x_min":169,"x_max":969,"ha":1139,"o":"m 602 549 l 969 549 l 969 482 l 602 482 l 602 247 l 534 247 l 534 482 l 169 482 l 169 549 l 534 549 l 534 779 l 602 779 l 602 549 m 969 33 l 169 33 l 169 100 l 969 100 l 969 33 "},"|":{"x_min":305,"x_max":376,"ha":683,"o":"m 376 448 l 305 448 l 305 956 l 376 956 l 376 448 m 376 -233 l 305 -233 l 305 272 l 376 272 l 376 -233 "},"ϋ":{"x_min":79,"x_max":703,"ha":774,"o":"m 703 395 q 595 110 703 236 q 332 -15 488 -15 q 145 54 211 -15 q 79 244 79 123 l 83 429 q 81 542 83 486 q 79 654 80 598 l 146 650 l 217 654 q 209 502 217 608 q 202 365 202 397 l 202 261 q 240 105 202 168 q 369 43 279 43 q 523 132 476 43 q 571 340 571 222 q 548 493 571 418 q 488 645 526 568 q 550 647 529 645 q 627 658 571 650 q 703 395 703 537 m 227 928 q 281 907 259 928 q 304 853 304 886 q 283 800 304 822 q 230 778 262 778 q 175 800 197 778 q 153 853 153 822 q 174 906 153 884 q 227 928 195 928 m 469 928 q 523 906 501 928 q 545 853 545 884 q 524 799 545 821 q 472 778 504 778 q 418 800 440 778 q 396 853 396 822 q 416 905 396 883 q 469 928 437 928 "},"§":{"x_min":64,"x_max":620,"ha":675,"o":"m 114 36 l 128 36 q 198 -76 148 -33 q 319 -120 247 -120 q 430 -78 384 -120 q 476 27 476 -37 q 369 169 476 116 q 170 252 269 210 q 64 419 64 312 q 91 522 64 476 q 171 609 119 568 q 122 739 122 669 q 195 896 122 837 q 369 956 268 956 q 473 940 422 956 q 576 894 523 925 q 559 864 568 882 q 521 775 551 846 l 508 775 q 445 871 483 839 q 343 903 407 903 q 251 867 289 903 q 213 777 213 832 q 318 644 213 694 q 514 563 415 604 q 620 408 620 507 q 592 299 620 348 q 515 213 565 251 q 560 143 544 179 q 576 65 576 108 q 494 -112 576 -46 q 298 -178 412 -178 q 179 -163 239 -178 q 76 -119 120 -148 q 97 -42 86 -89 q 114 36 108 4 m 138 479 q 257 340 138 396 q 478 238 376 285 q 524 285 508 261 q 541 342 541 310 q 384 490 541 423 q 197 587 228 556 q 156 532 175 563 q 138 479 138 501 "},"b":{"x_min":78,"x_max":703,"ha":758,"o":"m 152 1018 q 219 1025 181 1018 q 212 916 214 966 q 210 788 210 866 l 210 755 l 210 555 q 419 672 283 672 q 629 569 555 672 q 703 322 703 466 q 630 79 703 173 q 414 -15 558 -15 q 296 8 350 -15 q 193 79 242 31 q 160 49 175 64 q 120 -1 145 33 l 78 -1 q 87 106 82 43 q 92 213 92 169 l 92 545 q 88 784 92 625 q 85 1025 85 944 q 152 1018 119 1018 m 383 605 q 243 520 285 605 q 202 323 202 435 q 245 133 202 218 q 383 48 288 48 q 522 132 480 48 q 564 326 564 217 q 522 519 564 434 q 383 605 480 605 "},"q":{"x_min":54,"x_max":675,"ha":758,"o":"m 608 -368 q 579 -368 591 -368 q 540 -373 567 -369 q 549 -213 548 -312 q 551 -101 551 -115 l 551 99 q 339 -15 476 -15 q 130 82 207 -15 q 54 316 54 180 q 125 564 54 456 q 333 672 197 672 q 464 636 407 672 q 557 535 520 601 q 546 655 557 594 q 586 649 576 650 q 611 648 597 648 q 674 655 640 648 l 671 433 q 669 163 671 298 q 666 -106 668 27 l 675 -373 q 643 -369 658 -370 q 608 -368 627 -368 m 373 48 q 515 134 473 48 q 557 331 557 220 q 511 514 557 433 q 372 596 466 596 q 234 512 276 596 q 193 322 193 429 q 236 133 193 218 q 373 48 279 48 "},"Ω":{"x_min":8,"x_max":1119.125,"ha":1129,"o":"m 449 0 q 318 4 410 0 q 223 8 227 8 l 10 0 l 13 47 q 11 74 13 59 q 8 95 9 88 q 119 88 69 90 q 249 86 169 86 q 103 261 152 170 q 55 473 55 352 q 200 822 55 694 q 567 950 345 950 q 931 823 791 950 q 1072 473 1072 697 q 1025 261 1072 350 q 878 86 978 173 q 992 91 902 86 q 1119 96 1083 96 l 1114 33 l 1117 0 l 906 8 q 778 4 867 8 q 682 0 688 0 l 682 72 q 864 215 807 122 q 921 451 921 309 q 834 764 921 639 q 565 889 747 889 q 296 767 384 889 q 209 454 209 645 q 268 217 209 319 q 449 72 327 115 l 449 0 "},"ύ":{"x_min":79,"x_max":703,"ha":774,"o":"m 703 395 q 595 110 703 236 q 332 -15 488 -15 q 145 54 211 -15 q 79 244 79 123 l 83 429 q 81 541 83 484 q 79 652 80 597 l 146 648 l 217 652 q 209 502 217 606 q 202 365 202 397 l 202 261 q 240 105 202 168 q 369 43 279 43 q 523 132 476 43 q 571 340 571 222 q 548 491 571 416 q 488 644 526 566 q 550 646 529 644 q 627 656 571 648 q 703 395 703 536 m 499 941 q 532 972 517 962 q 568 983 547 983 q 606 967 592 983 q 620 930 620 952 q 605 894 620 910 q 564 865 590 878 l 365 741 l 316 741 l 499 941 "},"Ö":{"x_min":51,"x_max":1069,"ha":1121,"o":"m 51 465 q 191 819 51 688 q 559 950 332 950 q 891 852 750 950 q 1046 659 1031 755 q 1065 535 1062 562 q 1069 462 1069 508 q 1066 395 1069 416 q 1047 275 1063 373 q 894 80 1031 176 q 562 -15 756 -15 q 451 -8 503 -15 q 304 31 399 -2 q 130 187 209 65 q 51 465 51 308 m 439 1208 q 491 1186 470 1208 q 513 1133 513 1164 q 491 1080 513 1103 q 439 1058 470 1058 q 385 1080 409 1058 q 362 1133 362 1102 q 384 1186 362 1164 q 439 1208 407 1208 m 682 1208 q 735 1186 713 1208 q 757 1133 757 1164 q 735 1080 757 1103 q 682 1058 713 1058 q 628 1079 650 1058 q 607 1133 607 1101 q 628 1186 607 1164 q 682 1208 650 1208 m 204 469 q 292 162 204 283 q 559 42 380 42 q 827 162 739 42 q 916 469 916 283 q 825 767 916 648 q 559 887 735 887 q 349 825 430 887 q 226 638 267 763 q 204 469 204 558 "},"z":{"x_min":15.28125,"x_max":606.9375,"ha":647,"o":"m 15 29 q 164 224 88 124 q 302 416 240 323 l 418 586 l 270 586 q 181 581 218 586 q 62 565 145 577 l 68 609 l 62 654 q 181 648 115 650 q 330 646 248 646 l 363 646 l 393 646 q 606 654 500 646 l 606 626 q 453 428 545 549 q 317 246 361 306 q 194 68 273 185 l 343 68 q 456 72 400 68 q 594 86 513 77 l 588 42 l 594 0 l 280 8 q 148 4 237 8 q 15 0 59 0 l 15 29 "},"™":{"x_min":176,"x_max":918,"ha":1139,"o":"m 463 930 l 346 930 l 346 614 l 293 614 l 293 930 l 176 930 l 176 969 l 463 969 l 463 930 m 736 690 l 840 968 l 918 969 l 918 614 l 871 614 l 871 927 l 752 614 l 719 614 l 594 930 l 594 614 l 548 614 l 548 969 l 625 969 l 736 690 "},"ή":{"x_min":91,"x_max":662,"ha":754,"o":"m 594 -365 q 557 -366 577 -365 q 526 -369 537 -368 q 531 -189 526 -310 q 537 -7 537 -68 l 537 406 q 503 536 537 485 q 391 587 469 587 q 255 508 290 587 q 220 315 220 430 q 222 133 220 259 q 224 1 224 8 l 158 6 l 91 1 l 101 156 l 101 495 q 97 584 101 527 q 93 655 93 640 q 119 650 105 652 q 155 648 134 648 q 185 650 175 648 q 221 655 195 651 l 220 538 q 321 637 265 602 q 452 672 378 672 q 604 603 552 672 q 656 430 656 535 l 656 329 l 656 -186 q 659 -293 656 -227 q 662 -370 662 -359 q 630 -366 645 -368 q 594 -365 614 -365 m 481 944 q 515 975 499 965 q 552 986 531 986 q 589 970 575 986 q 603 933 603 955 q 589 898 603 912 q 547 868 575 884 l 348 744 l 298 744 l 481 944 "},"Θ":{"x_min":51,"x_max":1068,"ha":1119,"o":"m 51 465 q 193 820 51 690 q 562 950 335 950 q 893 852 755 950 q 1047 653 1031 755 q 1065 525 1062 551 q 1068 462 1068 500 q 1065 402 1068 426 q 1047 280 1062 379 q 892 83 1033 182 q 560 -15 751 -15 q 435 -7 480 -15 q 299 32 390 0 q 130 187 209 65 q 51 465 51 308 m 202 468 q 290 163 202 283 q 559 43 379 43 q 826 163 738 43 q 915 468 915 283 q 826 770 915 652 q 559 889 738 889 q 254 720 306 889 q 202 468 202 552 m 560 507 q 683 510 608 507 q 768 514 758 514 l 765 465 l 765 429 q 648 432 730 429 q 558 435 566 435 q 440 432 523 435 q 351 429 357 429 l 353 470 l 353 514 q 474 510 400 514 q 560 507 549 507 "},"®":{"x_min":80,"x_max":1058,"ha":1139,"o":"m 816 905 q 992 726 927 841 q 1058 481 1058 611 q 912 138 1058 283 q 567 -6 766 -6 q 225 139 370 -6 q 80 481 80 284 q 224 826 80 681 q 569 971 368 971 q 816 905 698 971 m 569 918 q 263 788 392 918 q 134 481 134 659 q 261 175 134 306 q 566 45 389 45 q 872 174 741 45 q 1004 478 1004 304 q 947 699 1004 596 q 787 859 890 801 q 569 918 684 918 m 815 619 q 776 521 815 562 q 681 468 738 480 l 809 209 l 709 208 l 592 456 l 462 457 l 462 209 l 376 209 l 376 771 l 581 771 q 745 737 676 771 q 815 619 815 704 m 462 714 l 462 513 l 566 513 q 682 532 635 513 q 729 611 729 551 q 681 692 729 671 q 564 714 634 714 l 462 714 "},"É":{"x_min":109,"x_max":614.5625,"ha":685,"o":"m 124 465 q 116 710 124 540 q 109 932 109 880 l 353 929 l 610 929 q 607 904 607 918 q 607 884 607 891 l 610 838 q 407 860 506 860 l 259 860 l 257 670 l 257 530 l 397 530 q 586 542 492 530 q 584 518 584 530 q 584 499 584 506 q 586 450 584 465 q 487 458 542 454 q 393 463 432 463 l 257 463 l 257 318 l 262 74 q 452 77 381 74 q 614 94 524 80 l 613 47 l 614 0 l 356 0 l 109 0 q 116 243 109 72 q 124 465 124 415 m 426 1225 q 461 1255 445 1244 q 499 1267 478 1267 q 536 1251 522 1267 q 549 1212 549 1236 q 533 1176 549 1192 q 492 1147 517 1160 l 292 1024 l 242 1024 l 426 1225 "},"~":{"x_min":284,"x_max":1080,"ha":1368,"o":"m 850 650 q 667 750 761 650 q 511 850 573 850 q 396 793 431 850 q 362 650 362 737 l 284 650 q 339 846 284 768 q 508 924 395 924 q 697 824 606 924 q 853 725 788 725 q 969 779 936 725 q 1002 924 1002 834 l 1080 924 q 1023 727 1080 805 q 850 650 966 650 "},"Ε":{"x_min":108,"x_max":613.5625,"ha":686,"o":"m 126 465 q 122 711 126 620 q 108 932 119 802 l 353 928 l 610 931 l 606 884 l 610 836 q 508 853 562 847 q 408 860 453 860 l 260 860 l 258 671 l 258 528 l 398 528 q 587 541 480 528 l 584 497 l 587 451 l 394 463 l 258 463 l 258 316 l 264 73 q 456 76 380 73 q 613 94 531 80 l 610 47 l 613 0 l 358 4 l 108 0 q 117 239 108 70 q 126 465 126 408 "},"³":{"x_min":48,"x_max":424,"ha":496,"o":"m 159 636 l 156 663 q 178 661 167 661 q 200 661 189 661 q 280 690 248 661 q 312 767 312 719 q 212 869 312 869 q 143 846 168 869 q 107 781 117 823 l 102 779 q 84 812 93 795 q 66 845 75 830 q 134 886 98 871 q 212 901 171 901 q 341 873 284 901 q 398 778 398 845 q 355 691 398 724 q 252 643 313 658 q 373 610 322 643 q 424 509 424 577 q 353 385 424 427 q 196 343 283 343 q 48 373 117 343 q 57 422 52 391 q 66 469 63 454 l 75 469 q 120 399 88 425 q 199 374 153 374 q 294 409 254 374 q 334 499 334 444 q 299 588 334 553 q 207 623 264 623 q 179 620 193 623 q 156 617 166 618 l 159 636 "},"[":{"x_min":116,"x_max":364.609375,"ha":449,"o":"m 127 2 l 127 386 l 127 769 l 116 932 l 235 929 l 364 929 l 363 908 l 363 872 q 263 880 313 880 l 216 880 l 216 387 l 216 -105 l 264 -105 q 329 -102 308 -105 q 364 -98 351 -99 l 363 -123 l 363 -158 l 237 -154 l 116 -158 q 121 -81 116 -138 q 127 2 127 -24 "},"L":{"x_min":108,"x_max":627.453125,"ha":629,"o":"m 126 465 q 122 712 126 621 q 108 932 119 803 q 149 930 126 932 q 188 926 173 927 q 233 929 202 926 q 268 932 265 932 q 263 797 268 883 q 258 684 258 711 q 261 332 258 577 q 264 73 264 86 l 402 73 q 512 78 458 73 q 627 94 566 84 l 624 47 l 627 0 l 358 4 l 108 0 q 117 239 108 70 q 126 465 126 408 "},"σ":{"x_min":41,"x_max":802.109375,"ha":806,"o":"m 625 644 l 802 651 l 797 611 l 802 566 l 626 573 q 690 464 671 527 q 710 327 710 402 q 616 81 710 177 q 371 -15 522 -15 q 131 78 222 -15 q 41 322 41 172 q 131 572 41 472 q 371 672 221 672 q 439 665 403 672 q 508 653 475 659 q 569 645 541 646 q 625 644 597 644 m 376 619 q 226 530 272 619 q 181 326 181 442 q 224 124 181 213 q 369 35 268 35 q 522 123 474 35 q 570 326 570 211 q 524 529 570 440 q 376 619 479 619 "},"ζ":{"x_min":75,"x_max":675,"ha":683,"o":"m 642 987 l 642 949 q 425 760 524 860 q 260 545 326 661 q 194 303 194 428 q 194 278 194 289 q 202 215 194 267 q 335 141 210 163 q 558 116 447 128 q 675 -7 675 91 q 643 -109 675 -65 q 544 -232 612 -154 l 500 -205 q 565 -113 555 -131 q 576 -66 576 -94 q 552 -20 576 -37 q 292 22 509 2 q 75 240 75 41 q 143 487 75 357 q 297 719 212 616 q 508 949 383 821 l 359 949 q 252 945 301 949 q 130 933 204 941 l 134 977 l 130 1025 q 272 1021 186 1025 q 372 1018 358 1018 q 526 1021 429 1018 q 643 1025 623 1025 l 642 987 "},"θ":{"x_min":48,"x_max":699,"ha":749,"o":"m 375 909 q 621 773 544 909 q 699 456 699 638 q 627 118 699 255 q 372 -19 556 -19 q 120 114 193 -19 q 48 444 48 247 q 122 773 48 638 q 375 909 196 909 m 184 383 q 221 136 184 242 q 374 31 259 31 q 534 137 505 31 q 564 424 564 244 l 408 428 l 184 423 l 184 383 m 371 858 q 257 804 300 858 q 196 673 214 751 q 186 581 189 630 q 184 483 184 532 l 322 478 q 461 480 364 478 q 564 483 558 483 q 528 747 564 637 q 371 858 493 858 "},"Ο":{"x_min":51,"x_max":1068,"ha":1119,"o":"m 51 465 q 192 820 51 690 q 559 950 333 950 q 892 853 754 950 q 1047 654 1031 757 q 1065 525 1062 551 q 1068 462 1068 500 q 1065 402 1068 426 q 1047 277 1062 379 q 894 80 1031 175 q 560 -15 756 -15 q 447 -10 496 -15 q 304 29 398 -5 q 130 186 210 64 q 51 465 51 308 m 202 468 q 290 162 202 282 q 559 42 379 42 q 826 162 738 42 q 915 468 915 283 q 825 770 915 651 q 559 889 735 889 q 348 826 429 889 q 225 639 267 764 q 202 468 202 552 "},"Γ":{"x_min":108,"x_max":627.453125,"ha":629,"o":"m 448 932 l 627 932 q 623 902 624 921 q 621 874 621 883 l 627 836 q 402 863 512 863 l 264 863 q 261 586 264 779 q 258 379 258 393 q 263 181 258 313 q 268 0 268 48 l 187 5 l 108 0 q 121 209 117 106 q 126 427 126 311 q 117 686 126 504 q 108 932 108 869 l 448 932 "}," ":{"x_min":0,"x_max":0,"ha":375},"%":{"x_min":28,"x_max":1011,"ha":1032,"o":"m 799 0 q 647 62 708 0 q 586 218 586 124 q 647 372 586 309 q 799 436 709 436 q 949 373 888 436 q 1011 223 1011 311 q 995 130 1011 176 q 918 35 972 70 q 799 0 865 0 m 863 1015 l 227 -125 l 158 -125 l 793 1015 l 863 1015 m 241 451 q 89 513 150 451 q 28 668 28 576 q 89 823 28 759 q 241 888 150 888 q 391 825 330 888 q 453 673 453 762 q 434 581 453 623 q 359 486 412 521 q 241 451 307 451 m 897 260 q 872 353 897 310 q 798 397 847 397 q 718 340 737 397 q 700 202 700 283 q 719 86 700 133 q 798 40 738 40 q 866 73 840 40 q 892 149 892 106 q 895 206 894 169 q 897 260 897 242 m 339 689 q 312 812 339 775 q 240 849 285 849 q 160 788 179 849 q 141 648 141 728 q 164 541 141 590 q 240 493 188 493 q 307 527 281 493 q 334 602 334 561 q 339 689 339 641 "},"P":{"x_min":109,"x_max":722,"ha":736,"o":"m 127 559 q 109 931 127 759 l 231 927 q 337 931 270 927 q 416 935 403 935 q 632 874 543 935 q 722 694 722 814 q 616 493 722 564 q 371 422 510 422 l 252 422 q 257 200 252 348 q 262 0 262 52 q 224 3 249 0 q 185 8 199 8 q 147 5 168 8 q 109 0 127 2 q 118 287 109 85 q 127 559 127 488 m 576 684 q 515 826 576 773 q 364 879 455 879 l 262 875 q 254 781 257 827 q 252 688 252 735 l 252 476 q 507 530 439 476 q 576 684 576 584 "},"Ώ":{"x_min":-1,"x_max":1355.953125,"ha":1365,"o":"m 685 0 q 555 4 646 0 q 460 8 464 8 l 247 0 l 250 47 q 248 74 250 59 q 244 95 246 88 q 355 88 305 90 q 486 86 405 86 q 340 261 389 170 q 292 473 292 352 q 437 822 292 694 q 804 950 582 950 q 1168 823 1028 950 q 1309 473 1309 697 q 1262 261 1309 350 q 1115 86 1215 173 q 1229 91 1139 86 q 1355 96 1319 96 l 1351 33 l 1354 0 l 1143 8 q 1014 4 1104 8 q 918 0 924 0 l 918 72 q 1100 215 1043 122 q 1158 451 1158 309 q 1071 764 1158 639 q 802 889 984 889 q 533 767 621 889 q 446 454 446 645 q 505 217 446 319 q 685 72 564 115 l 685 0 m 182 943 q 215 974 200 964 q 251 985 230 985 q 289 969 274 985 q 304 932 304 954 q 290 896 304 911 q 247 866 275 882 l 48 743 l -1 743 l 182 943 "},"Έ":{"x_min":-1.390625,"x_max":920.015625,"ha":992,"o":"m 432 465 q 428 711 432 620 q 414 932 425 802 l 660 928 l 917 932 l 912 884 l 917 836 q 814 853 868 847 q 714 860 760 860 l 567 860 l 564 671 l 564 528 l 704 528 q 893 541 786 528 l 890 497 l 893 451 l 700 462 l 564 462 l 564 317 l 570 74 q 762 77 686 74 q 920 94 838 80 l 917 47 l 920 0 l 664 4 l 414 0 q 423 239 414 70 q 432 465 432 408 m 181 943 q 215 974 200 964 q 251 985 230 985 q 288 969 273 985 q 304 932 304 954 q 289 896 304 911 q 247 866 275 882 l 47 743 l -1 743 l 181 943 "},"_":{"x_min":0,"x_max":683.328125,"ha":683,"o":"m 683 -322 l 0 -322 l 0 -256 l 683 -256 l 683 -322 "},"Ϊ":{"x_min":-3,"x_max":388,"ha":386,"o":"m 126 465 q 118 710 126 540 q 111 932 111 880 q 156 929 123 932 q 192 926 190 926 q 238 929 205 926 q 276 932 271 932 q 265 697 276 863 q 255 465 255 530 q 265 230 255 397 q 276 0 276 63 q 233 3 260 0 q 192 8 205 8 q 153 5 176 8 q 111 0 131 2 q 118 243 111 72 q 126 465 126 415 m 73 1208 q 124 1186 102 1208 q 146 1133 146 1164 q 123 1081 146 1105 q 73 1058 101 1058 q 19 1080 42 1058 q -3 1133 -3 1103 q 19 1185 -3 1163 q 73 1208 41 1208 m 313 1208 q 366 1186 344 1208 q 388 1133 388 1164 q 365 1080 388 1103 q 313 1058 342 1058 q 260 1080 283 1058 q 238 1133 238 1103 q 260 1185 238 1163 q 313 1208 282 1208 "},"+":{"x_min":169,"x_max":970,"ha":1139,"o":"m 603 441 l 970 441 l 970 374 l 603 374 l 603 0 l 536 0 l 536 374 l 169 374 l 169 441 l 536 441 l 536 816 l 603 816 l 603 441 "},"½":{"x_min":83,"x_max":1094.125,"ha":1172,"o":"m 250 743 l 245 836 q 181 804 205 818 q 120 768 156 791 q 104 788 117 775 q 83 808 91 801 q 200 851 141 825 q 327 913 259 877 l 336 911 q 331 724 336 850 q 326 551 326 598 l 326 391 q 301 394 319 391 q 280 397 283 397 q 254 394 271 397 q 233 391 238 391 q 246 551 242 473 q 250 743 250 629 m 859 1015 l 929 1015 l 312 -124 l 243 -124 l 859 1015 m 982 363 q 959 443 982 413 q 887 478 936 473 q 821 458 852 478 q 784 407 790 439 l 778 377 l 773 376 q 728 448 753 416 q 899 513 801 513 q 1019 476 967 513 q 1072 374 1072 439 q 955 189 1072 285 q 806 67 838 93 l 978 67 q 1094 79 1039 67 q 1090 63 1092 76 q 1088 41 1088 49 q 1094 3 1088 18 q 981 3 1056 3 q 867 3 906 3 q 791 3 842 3 q 714 3 739 3 l 714 25 q 913 198 844 125 q 982 363 982 270 "},"Ρ":{"x_min":109,"x_max":722,"ha":736,"o":"m 127 559 q 109 931 127 759 l 231 927 q 337 931 270 927 q 416 935 403 935 q 632 874 543 935 q 722 694 722 814 q 616 493 722 564 q 371 422 510 422 l 252 422 q 257 200 252 348 q 262 0 262 52 q 224 3 249 0 q 185 8 199 8 q 147 5 168 8 q 109 0 127 2 q 118 287 109 85 q 127 559 127 488 m 576 684 q 515 826 576 773 q 364 879 455 879 l 262 875 q 254 781 257 827 q 252 688 252 735 l 252 476 q 507 530 439 476 q 576 684 576 584 "},"'":{"x_min":88.890625,"x_max":306.9375,"ha":374,"o":"m 169 858 q 196 923 177 896 q 250 951 215 951 q 289 937 272 951 q 306 903 306 923 q 295 858 306 883 q 269 812 284 833 l 122 568 l 88 576 l 169 858 "},"T":{"x_min":11,"x_max":713,"ha":725,"o":"m 11 839 l 15 884 l 11 932 q 194 927 72 932 q 361 922 316 922 q 544 927 421 922 q 713 932 668 932 q 707 883 707 911 q 707 861 707 870 q 713 834 707 852 q 609 850 666 843 q 504 857 552 857 l 428 857 q 426 767 428 830 q 424 701 424 704 l 428 220 q 442 0 428 122 q 362 8 401 3 q 323 5 344 8 q 282 0 301 2 q 289 132 282 40 q 296 259 296 225 l 296 683 l 296 857 q 11 839 164 857 "},"Φ":{"x_min":50,"x_max":1068,"ha":1119,"o":"m 637 -25 q 559 -15 591 -15 q 527 -17 544 -15 q 483 -25 509 -19 l 487 68 q 181 179 313 68 q 50 465 50 291 q 172 744 50 647 q 487 865 295 842 l 483 958 q 522 952 502 955 q 559 950 543 950 q 596 952 576 950 q 637 958 616 955 l 631 865 q 942 758 816 865 q 1068 465 1068 651 q 944 184 1068 286 q 631 68 820 83 l 637 -25 m 501 502 q 497 677 501 570 q 494 800 494 784 q 278 698 354 786 q 203 466 203 611 q 282 231 203 331 q 494 132 361 132 q 497 363 494 225 q 501 502 501 501 m 915 466 q 839 706 915 612 q 626 800 764 800 q 622 636 626 738 q 618 470 618 533 q 622 301 618 408 q 626 132 626 194 q 839 226 764 132 q 915 466 915 320 "},"j":{"x_min":-55,"x_max":248,"ha":342,"o":"m 113 391 q 106 543 113 444 q 100 654 100 641 q 144 648 135 648 q 167 648 153 648 q 202 649 189 648 q 241 654 214 650 q 237 507 241 595 q 234 405 234 419 l 234 -13 l 234 -109 q 154 -303 234 -234 q -55 -372 74 -372 l -55 -333 q 78 -267 44 -323 q 113 -103 113 -212 l 113 -26 l 113 391 m 171 963 q 226 940 205 963 q 248 881 248 917 q 226 831 248 849 q 171 813 204 813 q 116 833 139 813 q 94 885 94 853 q 115 941 94 919 q 171 963 136 963 "},"Σ":{"x_min":44.4375,"x_max":790.28125,"ha":825,"o":"m 729 883 l 733 835 q 272 855 519 855 q 544 500 391 691 q 372 312 446 399 q 219 119 297 224 l 455 119 q 638 124 522 119 q 790 129 755 129 l 784 86 l 783 68 l 784 42 q 785 25 784 33 q 790 0 786 17 q 558 4 694 0 q 416 8 422 8 q 230 4 350 8 q 44 0 111 0 l 44 50 q 169 182 105 109 q 307 344 232 255 l 406 468 q 242 689 314 594 q 76 899 170 785 l 76 932 q 231 929 123 932 q 345 926 340 926 q 568 929 412 926 q 733 932 723 932 l 729 883 "},"1":{"x_min":72,"x_max":472,"ha":749,"o":"m 334 626 q 331 722 334 655 q 329 793 329 788 q 228 737 278 765 q 133 673 177 709 q 102 713 124 688 q 72 743 80 737 q 274 827 177 780 q 458 935 372 875 l 472 929 q 463 552 472 804 q 455 259 455 300 l 459 0 q 421 5 441 2 q 384 8 401 8 q 349 5 367 8 q 312 0 330 2 q 329 289 324 133 q 334 626 334 445 "},"ä":{"x_min":43,"x_max":655.5,"ha":649,"o":"m 234 -15 q 98 33 153 -15 q 43 162 43 82 q 106 303 43 273 q 303 364 169 333 q 444 448 437 395 q 403 568 444 521 q 288 616 362 616 q 191 587 233 616 q 124 507 149 559 l 95 520 l 104 591 q 202 651 144 631 q 323 672 261 672 q 500 622 444 672 q 557 455 557 573 l 557 133 q 567 69 557 84 q 618 54 577 54 q 655 58 643 54 l 655 26 q 594 5 626 14 q 537 -6 562 -3 q 438 85 453 -6 q 342 10 388 35 q 234 -15 296 -15 m 203 929 q 254 906 232 929 q 277 854 277 884 q 256 799 277 820 q 204 778 236 778 q 149 800 173 778 q 126 854 126 822 q 148 906 126 884 q 203 929 170 929 m 444 929 q 498 906 476 929 q 521 854 521 884 q 500 800 521 822 q 447 778 479 778 q 392 800 415 778 q 370 854 370 823 q 392 906 370 884 q 444 929 414 929 m 176 186 q 204 98 176 133 q 284 64 232 64 q 390 107 342 64 q 438 212 438 151 l 438 345 q 239 293 303 319 q 176 186 176 268 "},"<":{"x_min":176,"x_max":961.109375,"ha":1139,"o":"m 279 406 l 960 130 l 961 56 l 176 379 l 176 432 l 960 756 l 960 682 l 279 406 "},"£":{"x_min":65,"x_max":728.890625,"ha":749,"o":"m 67 47 l 65 98 l 116 101 q 203 168 176 112 q 231 292 231 224 q 227 375 231 330 q 221 444 223 420 q 139 441 171 444 q 76 432 107 439 l 78 479 l 76 503 q 105 495 92 498 q 134 493 117 493 l 219 493 q 212 550 214 522 q 209 609 209 578 q 304 825 209 742 q 537 909 399 909 q 633 896 592 909 q 723 864 673 884 q 666 731 694 809 l 656 731 q 605 825 641 791 q 512 859 570 859 q 383 796 427 859 q 340 646 340 734 l 345 493 l 366 493 q 523 502 450 493 l 521 466 l 526 434 q 438 441 493 439 q 345 444 383 444 l 345 378 q 310 238 345 302 q 213 107 275 173 q 527 113 421 107 q 728 134 633 119 l 721 66 q 728 0 721 34 q 542 3 666 0 q 358 8 419 8 q 176 3 285 8 q 65 0 67 0 l 67 47 "},"¹":{"x_min":82,"x_max":347,"ha":496,"o":"m 255 731 l 255 833 l 123 759 q 104 780 120 763 q 82 801 87 797 q 208 850 148 822 q 337 917 269 878 l 347 912 q 341 721 347 848 q 336 529 336 593 l 336 356 q 311 358 327 356 q 289 361 295 361 q 264 358 280 361 q 242 356 248 356 q 251 498 247 407 q 255 731 255 590 "},"t":{"x_min":18,"x_max":415.21875,"ha":425,"o":"m 18 586 l 22 630 l 18 654 q 133 643 80 643 q 131 732 133 669 q 129 799 129 796 q 199 827 163 811 q 263 863 234 843 q 252 758 255 811 q 250 643 250 705 q 334 645 310 643 q 401 654 358 647 l 398 618 l 401 586 q 248 594 323 594 l 243 258 l 243 162 q 272 76 243 109 q 353 43 301 43 q 387 44 369 43 q 415 48 405 46 l 415 4 q 349 -10 378 -5 q 290 -15 319 -15 q 174 18 221 -15 q 123 118 128 51 l 123 200 l 129 387 l 133 594 q 84 592 113 594 q 18 586 55 590 "},"λ":{"x_min":2.78125,"x_max":652.78125,"ha":657,"o":"m 302 670 q 227 871 262 803 q 111 940 193 940 q 78 937 94 940 q 20 924 62 934 l 20 978 q 96 1012 59 1000 q 170 1025 133 1025 q 329 947 287 1025 q 427 692 372 869 q 538 340 481 515 q 652 1 594 166 l 579 5 l 504 0 q 336 573 423 305 q 218 301 272 438 q 111 0 163 163 l 61 6 q 27 3 48 6 q 2 0 5 0 q 302 670 165 329 "},"ù":{"x_min":90,"x_max":664,"ha":754,"o":"m 653 498 q 653 329 653 443 q 653 158 653 215 q 664 0 653 81 q 631 3 647 1 q 598 5 616 5 q 563 3 583 5 q 533 0 544 1 l 538 118 q 440 18 494 52 q 312 -15 385 -15 q 148 50 201 -15 q 96 229 96 115 l 96 354 l 96 516 l 90 655 q 120 650 103 651 q 158 648 136 648 q 192 650 175 648 q 227 655 210 651 q 220 445 227 591 q 213 247 213 299 q 247 115 213 163 q 362 68 281 68 q 477 113 428 68 q 531 217 525 159 q 538 340 538 274 q 533 520 538 394 q 528 655 528 647 q 561 650 548 651 q 596 648 574 648 q 663 655 628 648 q 653 498 653 573 m 445 743 l 244 866 q 205 896 223 877 q 187 934 187 915 q 202 970 187 955 q 238 986 217 986 q 277 973 256 986 q 309 945 298 961 l 496 743 l 445 743 "},"W":{"x_min":0,"x_max":1306.953125,"ha":1307,"o":"m 0 932 q 47 927 31 929 q 76 926 62 926 q 121 929 88 926 q 155 931 154 931 q 262 547 200 750 l 380 171 q 470 437 415 272 q 552 693 525 602 q 619 931 580 784 l 672 926 q 700 928 684 926 q 726 931 716 930 q 825 604 787 727 q 883 419 862 482 q 969 171 904 357 l 1087 522 q 1143 720 1120 623 q 1187 931 1166 816 q 1221 929 1197 931 q 1247 926 1245 926 q 1280 928 1262 926 q 1306 931 1298 930 q 1131 467 1218 716 q 990 0 1045 217 q 963 4 980 1 q 937 7 947 7 q 904 3 925 7 q 880 0 883 0 q 761 385 831 184 l 641 733 l 491 287 q 402 0 438 133 q 370 3 391 0 q 344 7 350 7 q 315 4 327 7 q 287 0 302 2 q 206 296 252 142 q 122 568 161 450 q 0 932 83 686 "},"ï":{"x_min":-25,"x_max":365.328125,"ha":340,"o":"m 104 144 l 104 522 l 97 655 q 138 650 113 651 q 167 648 162 648 q 233 655 206 648 q 225 506 225 581 q 229 254 225 423 q 233 0 233 84 q 201 3 216 1 q 164 5 186 5 q 128 3 143 5 q 97 0 113 1 l 104 144 m 50 929 q 102 906 80 929 q 125 854 125 884 q 104 799 125 820 q 52 778 84 778 q -2 800 19 778 q -25 854 -25 822 q -4 906 -25 884 q 50 929 16 929 m 290 929 q 343 906 320 929 q 365 854 365 884 q 345 799 365 820 q 294 778 324 778 q 238 800 260 778 q 216 854 216 822 q 237 906 216 884 q 290 929 258 929 "},">":{"x_min":176.390625,"x_max":963,"ha":1139,"o":"m 963 379 l 176 56 l 176 130 l 858 406 l 176 682 l 176 756 l 962 432 l 963 379 "},"v":{"x_min":0,"x_max":658.328125,"ha":654,"o":"m 0 655 q 54 648 38 648 q 86 647 69 647 q 113 647 100 647 q 168 654 127 648 q 252 402 204 529 l 358 134 l 470 436 q 543 654 508 533 q 570 650 554 651 q 600 648 586 648 q 636 648 618 648 q 658 654 652 652 q 506 340 577 502 q 372 0 436 177 q 347 5 362 2 q 319 8 333 8 q 296 5 309 8 q 272 0 283 2 q 200 206 234 120 q 0 655 165 292 "},"τ":{"x_min":30,"x_max":677,"ha":701,"o":"m 423 573 l 419 303 q 423 146 419 250 q 428 0 428 42 q 394 4 410 2 q 359 5 378 5 q 333 4 343 5 q 289 0 323 4 l 298 194 l 294 573 q 156 553 207 573 q 57 472 105 534 q 30 559 49 522 q 149 626 82 609 q 307 644 216 644 l 510 644 q 604 647 545 644 q 677 651 664 651 l 671 610 q 677 566 671 586 q 527 569 618 566 q 423 573 436 573 "},"û":{"x_min":90,"x_max":664,"ha":754,"o":"m 653 498 q 653 328 653 442 q 653 158 653 215 q 664 0 653 81 q 631 3 647 1 q 598 5 616 5 q 563 3 583 5 q 533 0 544 1 l 538 118 q 440 18 494 52 q 312 -15 385 -15 q 148 50 201 -15 q 96 229 96 115 l 96 354 l 96 516 l 90 655 q 120 650 103 651 q 158 648 136 648 q 192 649 175 648 q 227 655 210 651 q 220 445 227 591 q 213 247 213 299 q 247 115 213 163 q 362 68 281 68 q 477 113 428 68 q 531 217 525 159 q 538 340 538 274 q 533 520 538 394 q 528 655 528 647 q 558 650 542 651 q 596 648 574 648 q 629 649 612 648 q 663 655 646 651 q 653 498 653 573 m 332 978 l 421 978 l 572 743 l 525 743 l 376 875 l 227 743 l 180 743 l 332 978 "},"ξ":{"x_min":64,"x_max":654,"ha":656,"o":"m 562 861 q 502 941 539 911 q 414 972 465 972 q 299 917 342 972 q 256 788 256 862 q 312 650 256 701 q 458 599 369 599 l 526 599 l 524 563 l 524 528 q 480 533 503 532 q 427 535 457 535 q 271 494 337 535 q 197 408 205 454 q 187 347 188 361 q 186 326 186 333 q 186 294 186 300 q 190 282 187 287 q 238 200 201 229 q 335 153 276 171 l 494 118 q 610 73 567 100 q 654 -13 654 46 q 628 -103 654 -60 q 511 -238 602 -146 l 466 -210 q 541 -121 530 -139 q 553 -75 553 -103 q 393 16 553 -18 q 149 92 234 50 q 64 276 64 133 q 130 462 64 379 q 299 575 197 544 q 175 652 222 600 q 128 780 128 704 q 213 954 128 883 q 405 1025 298 1025 q 507 1009 458 1025 q 609 965 555 994 q 585 914 600 945 q 562 861 571 883 "},"&":{"x_min":76,"x_max":917.671875,"ha":975,"o":"m 360 -18 q 160 41 245 -18 q 76 211 76 101 q 137 382 76 315 q 314 515 199 448 q 249 618 273 569 q 225 722 225 668 q 287 872 225 812 q 441 932 349 932 q 581 891 520 932 q 643 777 643 851 q 588 640 643 701 q 453 532 533 579 q 568 390 509 459 q 690 253 627 321 q 815 530 792 379 l 829 530 l 887 466 q 814 327 856 396 q 727 209 772 259 q 807 115 760 169 q 917 0 853 61 q 855 1 896 0 q 791 2 813 2 l 739 0 l 649 110 q 515 15 586 48 q 360 -18 445 -18 m 341 475 q 234 380 267 419 q 201 273 201 340 q 258 125 201 190 q 401 61 316 61 q 508 86 458 61 q 606 154 559 111 l 341 475 m 547 770 q 524 854 547 823 q 454 886 502 886 q 363 851 402 886 q 325 769 325 817 q 344 685 325 718 q 422 575 363 652 q 514 661 481 615 q 547 770 547 708 "},"Λ":{"x_min":0,"x_max":852.78125,"ha":853,"o":"m 662 452 l 778 172 l 852 0 l 769 5 q 734 4 747 5 q 679 0 722 4 q 647 102 661 55 q 605 226 633 148 l 547 383 l 401 777 l 266 429 q 191 213 226 319 q 125 0 157 108 l 62 2 l 0 0 q 205 459 95 191 q 380 932 315 726 q 404 927 393 929 q 431 926 416 926 q 459 929 441 926 q 487 932 477 932 q 548 743 511 850 q 662 452 586 637 "},"I":{"x_min":109,"x_max":271,"ha":385,"o":"m 127 465 q 123 711 127 620 q 109 932 120 803 q 154 927 129 929 q 190 925 179 925 q 238 928 209 925 q 271 931 266 931 q 263 788 271 887 q 256 659 256 690 l 256 448 l 256 283 q 263 135 256 238 q 271 0 271 31 q 231 3 258 0 q 190 8 204 8 q 151 5 172 8 q 109 0 129 2 q 118 239 109 70 q 127 465 127 408 "},"G":{"x_min":51,"x_max":942,"ha":1001,"o":"m 581 -15 q 198 107 345 -15 q 51 459 51 229 q 196 815 51 680 q 566 950 342 950 q 755 929 659 950 q 930 869 852 909 q 906 802 916 836 q 895 737 897 769 l 874 737 q 739 855 808 818 q 571 893 670 893 q 305 770 406 893 q 204 479 204 647 q 298 168 204 291 q 577 46 393 46 q 689 56 640 46 q 790 94 738 66 q 794 184 790 123 q 798 251 798 246 q 794 337 798 280 q 790 423 790 394 q 830 417 821 418 q 863 416 838 416 q 901 419 880 416 q 941 425 923 422 l 936 236 q 939 121 936 201 q 942 37 942 41 q 757 -1 843 11 q 581 -15 672 -15 "},"ΰ":{"x_min":79,"x_max":703,"ha":774,"o":"m 703 395 q 595 110 703 236 q 332 -15 488 -15 q 145 54 211 -15 q 79 244 79 123 l 83 430 q 81 542 83 486 q 79 654 80 598 l 146 650 l 217 654 q 209 502 217 608 q 202 365 202 397 l 202 261 q 240 105 202 168 q 369 43 279 43 q 523 132 476 43 q 571 340 571 222 q 548 493 571 418 q 488 645 526 568 q 550 647 529 645 q 627 658 571 650 q 703 395 703 537 m 209 865 q 250 846 232 865 q 269 804 269 828 q 251 761 269 780 q 209 743 234 743 q 166 761 184 743 q 148 804 148 779 q 166 846 148 828 q 209 865 184 865 m 361 929 q 378 969 368 956 q 414 982 388 982 q 458 941 458 982 q 446 904 458 919 l 338 743 l 306 743 l 361 929 m 513 865 q 555 846 537 865 q 573 804 573 828 q 555 761 573 779 q 513 743 537 743 q 470 761 487 743 q 454 804 454 779 q 470 846 454 828 q 513 865 487 865 "},"`":{"x_min":86.5,"x_max":303.171875,"ha":374,"o":"m 222 659 q 194 595 214 622 q 140 568 175 568 q 86 613 86 568 q 96 660 86 636 q 122 706 107 684 l 271 950 l 303 940 l 222 659 "},"Υ":{"x_min":-28,"x_max":746,"ha":707,"o":"m 297 177 l 297 386 q 191 570 256 458 q 84 750 125 682 q -28 932 42 819 q 24 928 -9 932 q 63 925 59 925 q 112 927 91 925 q 146 932 134 930 q 207 800 174 866 q 275 676 239 735 l 389 475 q 509 688 451 575 q 627 932 567 801 l 683 926 q 715 927 701 926 q 746 932 729 929 q 555 627 640 769 l 432 415 l 432 240 q 435 101 432 198 q 438 0 438 5 q 401 4 426 1 q 361 6 376 6 q 319 4 334 6 q 284 0 304 2 q 292 88 288 36 q 297 177 297 140 "},"r":{"x_min":89,"x_max":465.390625,"ha":488,"o":"m 99 120 l 99 400 l 99 433 q 91 654 99 548 q 125 648 114 650 q 162 647 136 647 q 232 654 195 647 q 223 588 226 626 q 220 516 220 550 q 313 628 264 589 q 437 668 362 668 l 465 668 l 459 604 l 465 537 q 427 544 448 541 q 383 551 407 548 q 256 482 292 551 q 220 312 220 413 q 222 131 220 256 q 225 0 225 6 l 157 6 l 89 0 l 99 120 "},"x":{"x_min":1,"x_max":635,"ha":632,"o":"m 264 316 l 158 461 q 78 563 120 508 q 5 655 36 619 q 97 647 51 647 q 141 649 120 647 q 177 654 162 651 q 249 538 214 592 q 334 415 284 484 q 420 533 377 473 q 501 654 464 592 q 523 650 508 652 q 550 647 539 648 q 616 654 582 647 l 371 365 q 477 210 434 267 q 635 0 519 152 q 587 3 616 0 q 551 6 558 6 q 501 4 523 6 q 465 0 479 1 q 380 140 407 98 q 295 264 352 183 q 172 84 194 117 q 123 0 151 51 l 66 5 q 33 2 55 5 q 1 0 10 0 q 131 154 63 72 q 264 316 199 236 "},"è":{"x_min":40,"x_max":646.9375,"ha":681,"o":"m 407 42 q 602 130 523 42 l 621 130 q 613 93 617 112 q 609 47 609 73 q 496 0 558 14 q 369 -15 435 -15 q 130 73 220 -15 q 40 311 40 162 q 126 562 40 456 q 355 669 212 669 q 564 590 481 669 q 646 386 646 512 l 644 331 q 438 333 562 331 q 313 335 315 335 l 179 331 q 235 127 179 212 q 407 42 291 42 m 407 743 l 208 866 q 166 895 183 880 q 149 934 149 911 q 167 967 149 949 q 202 986 185 986 q 243 969 220 986 q 273 945 266 952 l 457 743 l 407 743 m 513 392 l 513 437 q 470 563 513 509 q 356 618 427 618 q 233 552 271 618 q 183 390 195 487 l 513 392 "},"μ":{"x_min":84,"x_max":669.109375,"ha":754,"o":"m 331 -15 q 265 -7 292 -15 q 210 19 238 0 l 208 -128 q 211 -266 208 -178 q 214 -373 214 -354 q 183 -369 198 -370 q 150 -368 168 -368 q 114 -370 133 -368 q 84 -373 95 -372 q 89 -165 84 -304 q 94 43 94 -26 q 89 363 94 149 q 84 655 84 578 q 150 647 118 647 q 219 654 180 647 q 213 495 219 601 q 208 334 208 390 q 232 155 208 227 q 339 75 256 83 q 471 112 419 75 q 531 212 523 150 q 539 332 539 273 q 536 518 539 388 q 533 655 533 648 q 600 647 568 647 q 669 654 629 647 q 660 477 662 566 q 658 257 658 389 q 660 113 658 171 q 669 -1 662 55 l 602 4 l 537 -1 l 539 106 q 449 17 502 50 q 331 -15 397 -15 "},"÷":{"x_min":169,"x_max":969,"ha":1139,"o":"m 641 643 q 618 593 641 615 q 566 571 596 571 q 518 592 538 571 q 498 643 498 613 q 518 692 498 670 q 567 715 539 715 q 610 703 579 715 q 641 643 641 691 m 969 374 l 169 374 l 169 441 l 969 441 l 969 374 m 641 170 q 619 120 641 141 q 570 100 598 100 q 519 120 540 100 q 498 170 498 141 q 518 221 498 199 q 568 243 538 243 q 604 235 584 243 q 632 214 624 227 q 641 170 641 201 "},"h":{"x_min":92,"x_max":665,"ha":758,"o":"m 102 136 l 102 859 q 100 934 102 894 q 94 1025 98 975 q 136 1018 126 1019 q 158 1018 146 1018 q 226 1025 188 1018 q 222 957 223 1001 q 221 888 221 913 l 221 868 l 221 543 q 322 637 264 602 q 450 672 380 672 q 608 606 558 672 q 659 429 659 541 l 659 298 l 659 136 l 665 0 q 633 3 648 1 q 597 5 617 5 q 560 3 580 5 q 529 0 540 1 q 534 202 529 68 q 540 405 540 337 q 503 533 540 481 q 394 586 467 586 q 256 508 291 586 q 221 313 221 430 q 224 133 221 244 q 227 0 227 22 q 188 3 211 0 q 161 6 164 6 q 123 4 137 6 q 92 0 108 2 l 102 136 "},".":{"x_min":100,"x_max":274,"ha":374,"o":"m 187 156 q 248 130 223 156 q 274 68 274 105 q 248 8 274 32 q 187 -15 223 -15 q 125 8 150 -15 q 100 68 100 32 q 125 130 100 105 q 187 156 150 156 "},"φ":{"x_min":39,"x_max":965,"ha":1006,"o":"m 578 -371 q 505 -362 539 -362 q 465 -365 483 -362 q 427 -372 446 -368 q 433 -163 427 -298 q 440 -11 440 -29 q 156 76 274 -11 q 39 327 39 163 q 145 571 39 486 q 410 656 252 656 q 412 635 411 645 q 413 615 413 625 q 235 516 292 580 q 179 327 179 451 q 247 118 179 197 q 442 39 316 39 l 444 197 l 444 311 q 444 400 444 340 q 444 491 444 461 q 514 619 452 570 q 657 668 577 668 q 879 568 794 668 q 965 332 965 469 q 850 84 965 169 q 563 -14 735 0 q 570 -203 563 -71 q 578 -371 578 -334 m 826 347 q 794 534 826 451 q 677 617 763 617 q 592 572 621 617 q 563 470 563 527 l 559 350 l 563 39 q 759 126 693 39 q 826 347 826 213 "},";":{"x_min":72.609375,"x_max":312,"ha":446,"o":"m 224 636 q 287 611 262 636 q 312 548 312 586 q 287 486 312 511 q 224 461 262 461 q 162 486 188 461 q 137 548 137 512 q 162 611 137 586 q 224 636 187 636 m 164 75 q 198 157 182 140 q 244 175 214 175 q 304 119 304 175 q 296 75 304 93 q 262 18 287 56 l 103 -243 l 72 -231 l 164 75 "},"f":{"x_min":12,"x_max":432.546875,"ha":397,"o":"m 127 324 l 127 597 q 66 595 92 597 q 12 588 39 594 l 14 626 l 12 654 q 79 648 38 649 q 127 647 121 647 q 192 901 127 777 q 378 1025 257 1025 q 409 1022 400 1025 q 432 1015 418 1019 l 415 896 q 371 911 395 905 q 325 918 347 918 q 252 886 278 918 q 227 805 227 855 q 235 713 227 760 q 246 647 243 665 q 330 650 276 647 q 396 654 384 654 q 391 642 393 647 q 389 633 389 637 l 388 622 l 389 610 q 396 589 389 609 q 323 595 357 594 q 246 597 289 597 l 246 366 q 250 183 246 305 q 254 0 254 60 q 213 3 238 0 q 183 6 187 6 q 144 4 161 6 q 116 0 127 1 q 121 160 116 52 q 127 324 127 269 "},"“":{"x_min":83.71875,"x_max":550.390625,"ha":625,"o":"m 471 659 q 441 593 458 618 q 389 568 424 568 q 350 579 365 568 q 335 613 335 591 q 346 660 335 633 q 371 706 358 687 l 519 950 l 550 940 l 471 659 m 221 659 q 192 593 211 618 q 137 568 174 568 q 83 613 83 568 q 93 658 83 637 q 119 706 103 680 l 268 950 l 300 940 l 221 659 "},"A":{"x_min":-15.28125,"x_max":838.890625,"ha":825,"o":"m 257 639 l 387 950 q 402 945 395 947 q 417 944 409 944 q 452 950 437 944 q 576 629 536 733 q 686 359 617 526 q 838 0 755 192 q 789 3 820 0 q 751 6 758 6 q 700 4 723 6 q 663 0 677 1 q 600 199 622 137 q 543 353 579 260 l 377 358 l 215 353 l 162 205 q 130 110 145 160 q 101 0 115 59 l 44 5 q 6 2 20 5 q -15 0 -8 0 q 76 211 30 105 q 158 404 121 318 q 257 639 195 490 m 378 419 l 513 425 l 379 761 l 246 425 l 378 419 "},"6":{"x_min":64,"x_max":692,"ha":749,"o":"m 464 859 q 267 730 324 859 q 210 442 210 602 q 315 514 262 488 q 431 540 367 540 q 618 462 545 540 q 692 270 692 385 q 604 65 692 145 q 390 -15 516 -15 q 142 93 221 -15 q 64 377 64 201 q 167 745 64 581 q 462 909 270 909 q 524 905 501 909 q 579 890 547 902 l 574 827 q 521 851 547 844 q 464 859 495 859 m 554 258 q 510 409 554 347 q 380 471 466 471 q 255 409 300 471 q 210 264 210 348 q 253 105 210 172 q 384 39 297 39 q 485 73 441 39 q 540 148 529 108 q 552 206 551 187 q 554 258 554 225 "},"‘":{"x_min":86.5,"x_max":303.171875,"ha":374,"o":"m 224 659 q 193 594 212 620 q 140 568 174 568 q 86 615 86 568 q 98 660 86 633 q 122 708 110 687 l 271 951 l 303 942 l 224 659 "},"ϊ":{"x_min":-29,"x_max":362,"ha":342,"o":"m 104 333 l 104 520 q 103 566 104 544 q 96 654 102 588 q 140 647 130 648 q 165 647 151 647 q 232 654 195 647 q 224 555 225 599 q 223 437 223 511 l 223 406 q 228 194 223 337 q 233 0 233 51 q 201 3 216 1 q 165 5 185 5 q 127 3 148 5 q 96 0 107 1 q 100 165 96 51 q 104 333 104 279 m 45 928 q 99 907 77 928 q 122 853 122 886 q 101 800 122 822 q 48 778 80 778 q -6 800 15 778 q -29 853 -29 822 q -7 906 -29 884 q 45 928 13 928 m 286 928 q 340 906 318 928 q 362 853 362 884 q 341 799 362 821 q 289 778 321 778 q 235 800 257 778 q 213 853 213 822 q 233 905 213 883 q 286 928 254 928 "},"π":{"x_min":19,"x_max":957,"ha":989,"o":"m 702 5 l 635 0 q 639 114 635 44 q 643 196 643 185 l 643 575 l 508 575 l 373 575 l 369 284 q 373 143 369 236 q 377 0 377 50 q 345 3 360 1 q 309 5 329 5 q 271 3 292 5 q 239 0 250 1 l 248 196 l 243 575 q 130 553 171 575 q 43 472 89 532 q 19 559 35 519 q 139 627 71 611 q 305 644 207 644 l 658 644 l 852 644 l 957 651 l 951 610 l 957 566 l 769 575 l 765 310 q 769 154 765 257 q 773 0 773 51 q 739 3 755 1 q 702 5 724 5 "},"ά":{"x_min":41,"x_max":827.109375,"ha":846,"o":"m 705 352 q 803 -1 763 155 l 739 1 l 673 -1 l 632 172 q 521 36 593 87 q 356 -15 448 -15 q 129 81 217 -15 q 41 316 41 177 q 130 569 41 467 q 368 672 220 672 q 537 622 464 672 q 659 486 610 573 q 711 654 691 569 l 770 650 l 827 654 q 763 505 792 576 q 705 352 734 434 m 518 943 q 552 974 536 964 q 589 985 568 985 q 626 969 611 985 q 641 932 641 953 q 627 897 641 911 q 585 866 613 883 l 384 743 l 335 743 l 518 943 m 377 619 q 226 530 272 619 q 181 326 181 442 q 223 124 181 214 q 367 34 265 34 q 528 137 480 34 q 601 323 577 240 q 527 531 578 444 q 377 619 475 619 "},"O":{"x_min":51,"x_max":1068,"ha":1119,"o":"m 51 465 q 192 820 51 690 q 559 950 333 950 q 892 853 754 950 q 1047 654 1031 757 q 1065 525 1062 551 q 1068 462 1068 500 q 1065 402 1068 426 q 1047 277 1062 379 q 894 80 1031 175 q 560 -15 756 -15 q 447 -10 496 -15 q 304 29 398 -5 q 130 186 210 64 q 51 465 51 308 m 202 468 q 290 162 202 282 q 559 42 379 42 q 826 162 738 42 q 915 468 915 283 q 825 770 915 651 q 559 889 735 889 q 348 826 429 889 q 225 639 267 764 q 202 468 202 552 "},"n":{"x_min":89,"x_max":661,"ha":754,"o":"m 99 155 l 99 495 q 97 569 99 530 q 91 655 95 608 q 153 648 122 648 l 219 656 l 218 539 q 319 635 260 599 q 451 672 378 672 q 591 624 528 672 q 654 501 654 576 l 654 299 l 654 136 l 661 0 q 629 3 644 1 q 593 5 613 5 q 556 3 576 5 q 525 0 536 1 q 530 222 525 80 q 535 406 535 364 q 501 536 535 485 q 389 587 467 587 q 253 508 288 587 q 218 313 218 430 q 220 132 218 258 q 222 0 222 6 q 184 3 208 0 q 155 6 159 6 q 117 3 141 6 q 89 0 93 0 l 99 155 "},"3":{"x_min":75,"x_max":644,"ha":749,"o":"m 241 465 l 238 512 l 294 510 q 424 554 375 510 q 474 680 474 599 q 434 805 474 754 q 322 856 394 856 q 220 818 257 856 q 164 711 183 780 l 153 706 q 127 767 136 747 q 99 819 118 788 q 220 886 162 863 q 348 909 278 909 q 526 857 450 909 q 603 706 603 805 q 542 564 603 617 q 383 479 482 511 q 567 423 490 479 q 644 262 644 366 q 542 55 644 129 q 302 -18 441 -18 q 183 -6 240 -18 q 75 32 127 5 q 99 189 91 116 l 113 188 q 182 73 136 115 q 302 31 229 31 q 448 92 392 31 q 505 246 505 154 q 451 389 505 333 q 312 446 398 446 q 238 435 279 446 l 241 465 "},"9":{"x_min":57,"x_max":688,"ha":749,"o":"m 261 38 q 475 166 405 38 q 546 451 546 295 q 442 378 494 403 q 325 354 389 354 q 132 428 208 354 q 57 617 57 502 q 148 828 57 748 q 372 909 240 909 q 612 801 536 909 q 688 520 688 693 q 574 143 688 305 q 252 -18 461 -18 q 186 -14 211 -18 q 127 0 161 -11 l 113 90 q 180 51 143 64 q 261 38 218 38 m 372 419 q 501 482 457 419 q 546 634 546 545 q 504 790 546 725 q 373 855 462 855 q 238 791 284 855 q 193 637 193 727 q 238 482 193 545 q 372 419 284 419 "},"l":{"x_min":100,"x_max":237.5,"ha":342,"o":"m 107 118 l 107 881 q 104 965 107 915 q 101 1025 101 1016 q 169 1018 138 1018 q 237 1025 203 1018 q 228 872 230 948 q 226 684 226 797 l 226 512 l 232 111 l 237 0 q 205 3 220 1 q 169 5 189 5 q 131 3 152 5 q 100 0 111 1 l 107 118 "},"κ":{"x_min":97,"x_max":677.5625,"ha":683,"o":"m 104 365 q 100 531 104 428 q 97 655 97 634 q 164 647 134 647 q 231 654 196 647 q 227 516 231 608 q 223 377 223 425 l 258 377 q 386 498 323 431 q 528 654 449 565 q 588 647 563 647 q 640 647 613 647 q 672 652 662 651 l 358 387 l 548 165 q 608 93 577 127 q 677 19 638 59 l 677 0 q 628 3 659 0 q 591 6 596 6 q 544 3 567 6 q 510 0 520 0 q 437 100 477 47 q 360 196 398 153 l 269 308 l 252 323 l 223 326 q 227 163 223 274 q 231 0 231 52 l 164 5 l 97 0 q 100 208 97 77 q 104 365 104 339 "},"4":{"x_min":39,"x_max":691.78125,"ha":749,"o":"m 453 252 l 177 257 l 39 253 l 39 291 q 204 522 111 392 q 345 721 297 653 q 475 906 394 789 l 527 906 l 581 906 q 575 805 581 872 q 569 705 569 739 l 569 343 l 598 343 q 644 344 620 343 q 690 350 667 345 l 683 297 q 686 270 683 287 q 691 244 689 254 q 568 253 629 253 l 568 137 l 569 0 l 505 6 l 437 0 q 450 120 447 51 q 453 252 453 190 m 453 767 l 344 626 q 230 465 298 562 q 144 343 162 368 l 453 343 l 453 767 "},"p":{"x_min":83,"x_max":702,"ha":758,"o":"m 91 -106 q 89 202 91 47 q 87 513 88 358 l 83 655 q 109 650 95 652 q 146 648 124 648 q 177 650 165 648 q 213 655 188 651 q 202 535 202 591 q 297 637 246 602 q 425 672 349 672 q 630 567 558 672 q 702 322 702 463 q 629 84 702 183 q 423 -15 556 -15 q 210 99 287 -15 l 210 -101 q 214 -244 210 -148 q 219 -373 219 -340 q 185 -369 201 -370 q 151 -368 170 -368 q 130 -368 138 -368 q 83 -373 123 -368 q 87 -240 83 -329 q 91 -106 91 -151 m 384 596 q 245 514 289 596 q 202 328 202 433 q 244 134 202 220 q 383 48 286 48 q 520 131 478 48 q 563 322 563 215 q 519 509 563 423 q 384 596 475 596 "},"ψ":{"x_min":78,"x_max":1002,"ha":1038,"o":"m 78 294 l 82 477 l 82 654 l 145 650 l 215 654 q 209 517 215 605 q 203 421 203 430 l 203 341 q 264 117 203 197 q 465 38 325 38 l 468 260 q 461 535 468 342 q 455 786 455 729 q 496 779 479 782 q 526 776 513 776 q 566 780 545 776 q 600 786 587 784 q 591 496 600 690 q 583 270 583 302 l 587 38 q 791 132 715 38 q 867 357 867 227 q 824 641 867 506 q 885 645 857 641 q 960 656 912 648 q 1002 419 1002 544 q 891 118 1002 231 q 587 -13 780 5 l 591 -221 l 600 -372 q 561 -365 578 -367 q 526 -363 543 -363 q 491 -366 511 -363 q 455 -372 471 -369 q 461 -162 455 -302 q 468 -13 468 -22 q 194 64 310 -13 q 78 294 78 142 "},"Ü":{"x_min":101,"x_max":919.0625,"ha":1015,"o":"m 182 927 l 262 931 q 250 805 253 854 q 247 697 247 757 l 247 457 q 314 136 247 212 q 516 60 381 60 q 733 130 654 60 q 813 336 813 201 l 813 458 l 813 657 q 799 931 813 802 l 859 927 l 919 931 q 905 770 909 863 q 901 600 901 677 l 901 366 q 792 82 901 179 q 491 -15 684 -15 q 211 66 307 -15 q 116 325 116 148 l 116 426 l 116 698 q 112 805 116 757 q 101 931 109 854 l 182 927 m 410 1208 q 462 1186 442 1208 q 483 1133 483 1164 q 460 1081 483 1105 q 410 1058 438 1058 q 356 1080 379 1058 q 334 1133 334 1103 q 356 1185 334 1163 q 410 1208 378 1208 m 650 1208 q 704 1187 682 1208 q 727 1133 727 1166 q 704 1080 727 1103 q 650 1058 681 1058 q 598 1078 620 1058 q 576 1133 576 1099 q 598 1185 576 1163 q 650 1208 620 1208 "},"à":{"x_min":43,"x_max":655.5,"ha":649,"o":"m 234 -15 q 98 33 153 -15 q 43 162 43 82 q 106 303 43 273 q 303 364 169 333 q 444 448 437 395 q 403 568 444 521 q 288 616 362 616 q 191 587 233 616 q 124 507 149 559 l 95 520 l 104 591 q 202 651 144 631 q 323 672 261 672 q 500 622 444 672 q 557 455 557 573 l 557 133 q 567 69 557 84 q 618 54 577 54 q 655 58 643 54 l 655 26 q 594 5 626 14 q 537 -6 562 -3 q 438 85 453 -6 q 342 10 388 35 q 234 -15 296 -15 m 392 743 l 191 866 q 152 896 170 877 q 133 934 133 915 q 148 970 133 955 q 186 986 163 986 q 222 972 200 986 q 254 945 245 958 l 442 743 l 392 743 m 176 186 q 204 98 176 133 q 284 64 232 64 q 390 107 342 64 q 438 212 438 151 l 438 345 q 239 293 303 319 q 176 186 176 268 "},"η":{"x_min":91,"x_max":662,"ha":754,"o":"m 594 -365 q 557 -366 577 -365 q 526 -369 537 -368 q 531 -189 526 -310 q 537 -7 537 -68 l 537 406 q 503 536 537 485 q 391 587 469 587 q 255 508 290 587 q 220 315 220 430 q 222 133 220 259 q 224 1 224 8 l 158 6 l 91 1 l 101 156 l 101 495 q 97 584 101 527 q 93 655 93 640 q 119 650 105 652 q 155 648 134 648 q 185 650 175 648 q 221 655 195 651 l 220 538 q 321 637 265 602 q 452 672 378 672 q 604 603 552 672 q 656 430 656 535 l 656 329 l 656 -186 q 659 -293 656 -227 q 662 -370 662 -359 q 630 -366 645 -368 q 594 -365 614 -365 "}},"cssFontWeight":"normal","ascender":1267,"underlinePosition":-133,"cssFontStyle":"normal","boundingBox":{"yMin":-373.75,"xMin":-71,"yMax":1267,"xMax":1511},"resolution":1000,"original_font_information":{"postscript_name":"Optimer-Regular","version_string":"Version 1.00 2004 initial release","vendor_url":"http://www.magenta.gr/","full_font_name":"Optimer","font_family_name":"Optimer","copyright":"Copyright (c) Magenta Ltd., 2004","description":"","trademark":"","designer":"","designer_url":"","unique_font_identifier":"Magenta Ltd.:Optimer:22-10-104","license_url":"http://www.ellak.gr/fonts/MgOpen/license.html","license_description":"Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license (\"Fonts\") and associated documentation files (the \"Font Software\"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \r\n\r\nThe above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\r\n\r\nThe Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word \"MgOpen\", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\r\n\r\nThis License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the \"MgOpen\" name.\r\n\r\nThe Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \r\n\r\nTHE FONT SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.","manufacturer_name":"Magenta Ltd.","font_sub_family_name":"Regular"},"descender":-374,"familyName":"Optimer","lineHeight":1640,"underlineThickness":20} \ No newline at end of file diff --git a/node_modules/three/examples/fonts/ttf/README.md b/node_modules/three/examples/fonts/ttf/README.md new file mode 100644 index 0000000..35a4ce3 --- /dev/null +++ b/node_modules/three/examples/fonts/ttf/README.md @@ -0,0 +1,9 @@ +# Kenney Fonts + +## Source + +https://www.kenney.nl/assets/kenney-fonts + +## License + +CC0 1.0 Universal (CC0 1.0) Public Domain Dedication (https://creativecommons.org/publicdomain/zero/1.0/) diff --git a/node_modules/three/examples/fonts/ttf/kenpixel.ttf b/node_modules/three/examples/fonts/ttf/kenpixel.ttf new file mode 100644 index 0000000..e3dc57e Binary files /dev/null and b/node_modules/three/examples/fonts/ttf/kenpixel.ttf differ diff --git a/node_modules/three/examples/jsm/Addons.js b/node_modules/three/examples/jsm/Addons.js new file mode 100644 index 0000000..506ffa1 --- /dev/null +++ b/node_modules/three/examples/jsm/Addons.js @@ -0,0 +1,295 @@ +export * from './animation/AnimationClipCreator.js'; +export * from './animation/CCDIKSolver.js'; +export * from './animation/MMDAnimationHelper.js'; +export * from './animation/MMDPhysics.js'; + +export * from './cameras/CinematicCamera.js'; + +export { default as WebGL } from './capabilities/WebGL.js'; + +export * from './controls/ArcballControls.js'; +export * from './controls/DragControls.js'; +export * from './controls/FirstPersonControls.js'; +export * from './controls/FlyControls.js'; +export * from './controls/MapControls.js'; +export * from './controls/OrbitControls.js'; +export * from './controls/PointerLockControls.js'; +export * from './controls/TrackballControls.js'; +export * from './controls/TransformControls.js'; + +export * from './csm/CSM.js'; +export * from './csm/CSMFrustum.js'; +export * from './csm/CSMHelper.js'; +export * from './csm/CSMShader.js'; + +export * as Curves from './curves/CurveExtras.js'; +export * from './curves/NURBSCurve.js'; +export * from './curves/NURBSSurface.js'; +export * from './curves/NURBSVolume.js'; +export * as NURBSUtils from './curves/NURBSUtils.js'; + +export * from './effects/AnaglyphEffect.js'; +export * from './effects/AsciiEffect.js'; +export * from './effects/OutlineEffect.js'; +export * from './effects/ParallaxBarrierEffect.js'; +export * from './effects/PeppersGhostEffect.js'; +export * from './effects/StereoEffect.js'; + +export * from './environments/DebugEnvironment.js'; +export * from './environments/RoomEnvironment.js'; + +export * from './exporters/DRACOExporter.js'; +export * from './exporters/EXRExporter.js'; +export * from './exporters/GLTFExporter.js'; +export * from './exporters/KTX2Exporter.js'; +export * from './exporters/MMDExporter.js'; +export * from './exporters/OBJExporter.js'; +export * from './exporters/PLYExporter.js'; +export * from './exporters/STLExporter.js'; +export * from './exporters/USDZExporter.js'; + +export * from './geometries/BoxLineGeometry.js'; +export * from './geometries/ConvexGeometry.js'; +export * from './geometries/DecalGeometry.js'; +export * from './geometries/ParametricGeometries.js'; +export * from './geometries/ParametricGeometry.js'; +export * from './geometries/RoundedBoxGeometry.js'; +export * from './geometries/TeapotGeometry.js'; +export * from './geometries/TextGeometry.js'; + +export * from './helpers/LightProbeHelper.js'; +export * from './helpers/OctreeHelper.js'; +export * from './helpers/PositionalAudioHelper.js'; +export * from './helpers/RectAreaLightHelper.js'; +export * from './helpers/TextureHelper.js'; +export * from './helpers/VertexNormalsHelper.js'; +export * from './helpers/VertexTangentsHelper.js'; +export * from './helpers/ViewHelper.js'; + +export * from './interactive/HTMLMesh.js'; +export * from './interactive/InteractiveGroup.js'; +export * from './interactive/SelectionBox.js'; +export * from './interactive/SelectionHelper.js'; + +export { default as IESSpotLight } from './lights/IESSpotLight.js'; +export * from './lights/LightProbeGenerator.js'; +export * from './lights/RectAreaLightUniformsLib.js'; + +export * from './lines/Line2.js'; +export * from './lines/LineGeometry.js'; +export * from './lines/LineMaterial.js'; +export * from './lines/LineSegments2.js'; +export * from './lines/LineSegmentsGeometry.js'; +export * from './lines/Wireframe.js'; +export * from './lines/WireframeGeometry2.js'; + +export * from './loaders/3DMLoader.js'; +export * from './loaders/3MFLoader.js'; +export * from './loaders/AMFLoader.js'; +export * from './loaders/BVHLoader.js'; +export * from './loaders/ColladaLoader.js'; +export * from './loaders/DDSLoader.js'; +export * from './loaders/DRACOLoader.js'; +export * from './loaders/EXRLoader.js'; +export * from './loaders/FBXLoader.js'; +export * from './loaders/FontLoader.js'; +export * from './loaders/GCodeLoader.js'; +export * from './loaders/GLTFLoader.js'; +export * from './loaders/HDRCubeTextureLoader.js'; +export * from './loaders/IESLoader.js'; +export * from './loaders/KMZLoader.js'; +export * from './loaders/KTX2Loader.js'; +export * from './loaders/KTXLoader.js'; +export * from './loaders/LDrawLoader.js'; +export * from './loaders/LUT3dlLoader.js'; +export * from './loaders/LUTCubeLoader.js'; +export * from './loaders/LWOLoader.js'; +export * from './loaders/LogLuvLoader.js'; +export * from './loaders/LottieLoader.js'; +export * from './loaders/MD2Loader.js'; +export * from './loaders/MDDLoader.js'; +export * from './loaders/MMDLoader.js'; +export * from './loaders/MTLLoader.js'; +export * from './loaders/NRRDLoader.js'; +export * from './loaders/OBJLoader.js'; +export * from './loaders/PCDLoader.js'; +export * from './loaders/PDBLoader.js'; +export * from './loaders/PLYLoader.js'; +export * from './loaders/PVRLoader.js'; +export * from './loaders/RGBELoader.js'; +export * from './loaders/RGBMLoader.js'; +export * from './loaders/STLLoader.js'; +export * from './loaders/SVGLoader.js'; +export * from './loaders/TDSLoader.js'; +export * from './loaders/TGALoader.js'; +export * from './loaders/TIFFLoader.js'; +export * from './loaders/TTFLoader.js'; +export * from './loaders/TiltLoader.js'; +export * from './loaders/USDZLoader.js'; +export * from './loaders/VOXLoader.js'; +export * from './loaders/VRMLLoader.js'; +export * from './loaders/VTKLoader.js'; +export * from './loaders/XYZLoader.js'; + +export * from './materials/MeshGouraudMaterial.js'; + +export * from './math/Capsule.js'; +export * from './math/ColorConverter.js'; +export * from './math/ConvexHull.js'; +export * from './math/ImprovedNoise.js'; +export * from './math/Lut.js'; +export * from './math/MeshSurfaceSampler.js'; +export * from './math/OBB.js'; +export * from './math/Octree.js'; +export * from './math/SimplexNoise.js'; + +export * from './misc/ConvexObjectBreaker.js'; +export * from './misc/GPUComputationRenderer.js'; +export * from './misc/Gyroscope.js'; +export * from './misc/MD2Character.js'; +export * from './misc/MD2CharacterComplex.js'; +export * from './misc/MorphAnimMesh.js'; +export * from './misc/MorphBlendMesh.js'; +export * from './misc/ProgressiveLightMap.js'; +export * from './misc/RollerCoaster.js'; +export * from './misc/Timer.js'; +export * from './misc/TubePainter.js'; +export * from './misc/Volume.js'; +export * from './misc/VolumeSlice.js'; + +export * from './modifiers/CurveModifier.js'; +export * from './modifiers/EdgeSplitModifier.js'; +export * from './modifiers/SimplifyModifier.js'; +export * from './modifiers/TessellateModifier.js'; + +export * from './objects/GroundedSkybox.js'; +export * from './objects/Lensflare.js'; +export * from './objects/MarchingCubes.js'; +export * from './objects/Reflector.js'; +export * from './objects/ReflectorForSSRPass.js'; +export * from './objects/Refractor.js'; +export * from './objects/ShadowMesh.js'; +export * from './objects/Sky.js'; +export * from './objects/Water.js'; +export { Water as Water2 } from './objects/Water2.js'; + +export * from './physics/AmmoPhysics.js'; +export * from './physics/RapierPhysics.js'; + +export * from './postprocessing/AfterimagePass.js'; +export * from './postprocessing/BloomPass.js'; +export * from './postprocessing/BokehPass.js'; +export * from './postprocessing/ClearPass.js'; +export * from './postprocessing/CubeTexturePass.js'; +export * from './postprocessing/DotScreenPass.js'; +export * from './postprocessing/EffectComposer.js'; +export * from './postprocessing/FilmPass.js'; +export * from './postprocessing/GlitchPass.js'; +export * from './postprocessing/GTAOPass.js'; +export * from './postprocessing/HalftonePass.js'; +export * from './postprocessing/LUTPass.js'; +export * from './postprocessing/MaskPass.js'; +export * from './postprocessing/OutlinePass.js'; +export * from './postprocessing/OutputPass.js'; +export * from './postprocessing/Pass.js'; +export * from './postprocessing/RenderPass.js'; +export * from './postprocessing/RenderPixelatedPass.js'; +export * from './postprocessing/SAOPass.js'; +export * from './postprocessing/SMAAPass.js'; +export * from './postprocessing/SSAARenderPass.js'; +export * from './postprocessing/SSAOPass.js'; +export * from './postprocessing/SSRPass.js'; +export * from './postprocessing/SavePass.js'; +export * from './postprocessing/ShaderPass.js'; +export * from './postprocessing/TAARenderPass.js'; +export * from './postprocessing/TexturePass.js'; +export * from './postprocessing/UnrealBloomPass.js'; + +export * from './renderers/CSS2DRenderer.js'; +export * from './renderers/CSS3DRenderer.js'; +export * from './renderers/Projector.js'; +export * from './renderers/SVGRenderer.js'; + +export * from './shaders/ACESFilmicToneMappingShader.js'; +export * from './shaders/AfterimageShader.js'; +export * from './shaders/BasicShader.js'; +export * from './shaders/BleachBypassShader.js'; +export * from './shaders/BlendShader.js'; +export * from './shaders/BokehShader.js'; +export { BokehShader as BokehShader2 } from './shaders/BokehShader2.js'; +export * from './shaders/BrightnessContrastShader.js'; +export * from './shaders/ColorCorrectionShader.js'; +export * from './shaders/ColorifyShader.js'; +export * from './shaders/ConvolutionShader.js'; +export * from './shaders/CopyShader.js'; +export * from './shaders/DOFMipMapShader.js'; +export * from './shaders/DepthLimitedBlurShader.js'; +export * from './shaders/DigitalGlitch.js'; +export * from './shaders/DotScreenShader.js'; +export * from './shaders/ExposureShader.js'; +export * from './shaders/FXAAShader.js'; +export * from './shaders/FilmShader.js'; +export * from './shaders/FocusShader.js'; +export * from './shaders/FreiChenShader.js'; +export * from './shaders/GammaCorrectionShader.js'; +export * from './shaders/GodRaysShader.js'; +export * from './shaders/GTAOShader.js'; +export * from './shaders/HalftoneShader.js'; +export * from './shaders/HorizontalBlurShader.js'; +export * from './shaders/HorizontalTiltShiftShader.js'; +export * from './shaders/HueSaturationShader.js'; +export * from './shaders/KaleidoShader.js'; +export * from './shaders/LuminosityHighPassShader.js'; +export * from './shaders/LuminosityShader.js'; +export * from './shaders/MMDToonShader.js'; +export * from './shaders/MirrorShader.js'; +export * from './shaders/NormalMapShader.js'; +export * from './shaders/OutputShader.js'; +export * from './shaders/RGBShiftShader.js'; +export * from './shaders/SAOShader.js'; +export * from './shaders/SMAAShader.js'; +export * from './shaders/SSAOShader.js'; +export * from './shaders/SSRShader.js'; +export * from './shaders/SepiaShader.js'; +export * from './shaders/SobelOperatorShader.js'; +export * from './shaders/SubsurfaceScatteringShader.js'; +export * from './shaders/TechnicolorShader.js'; +export * from './shaders/ToonShader.js'; +export * from './shaders/TriangleBlurShader.js'; +export * from './shaders/UnpackDepthRGBAShader.js'; +export * from './shaders/VelocityShader.js'; +export * from './shaders/VerticalBlurShader.js'; +export * from './shaders/VerticalTiltShiftShader.js'; +export * from './shaders/VignetteShader.js'; +export * from './shaders/VolumeShader.js'; +export * from './shaders/WaterRefractionShader.js'; + +export * from './textures/FlakesTexture.js'; + +export * as BufferGeometryUtils from './utils/BufferGeometryUtils.js'; +export * as CameraUtils from './utils/CameraUtils.js'; +export * from './utils/GPUStatsPanel.js'; +export * as GeometryCompressionUtils from './utils/GeometryCompressionUtils.js'; +export * as GeometryUtils from './utils/GeometryUtils.js'; +export * from './utils/LDrawUtils.js'; +export * from './utils/PackedPhongMaterial.js'; +export * as SceneUtils from './utils/SceneUtils.js'; +export * from './utils/ShadowMapViewer.js'; +export * as SkeletonUtils from './utils/SkeletonUtils.js'; +export * as SortUtils from './utils/SortUtils.js'; +export * from './utils/TextureUtils.js'; +export * from './utils/UVsDebug.js'; +export * from './utils/WorkerPool.js'; + +export * from './webxr/ARButton.js'; +export * from './webxr/OculusHandModel.js'; +export * from './webxr/OculusHandPointerModel.js'; +export * from './webxr/Text2D.js'; +export * from './webxr/VRButton.js'; +export * from './webxr/XRButton.js'; +export * from './webxr/XRControllerModelFactory.js'; +export * from './webxr/XREstimatedLight.js'; +export * from './webxr/XRHandMeshModel.js'; +export * from './webxr/XRHandModelFactory.js'; +export * from './webxr/XRHandPrimitiveModel.js'; +export * from './webxr/XRPlanes.js'; diff --git a/node_modules/three/examples/jsm/animation/AnimationClipCreator.js b/node_modules/three/examples/jsm/animation/AnimationClipCreator.js new file mode 100644 index 0000000..cf9ee6b --- /dev/null +++ b/node_modules/three/examples/jsm/animation/AnimationClipCreator.js @@ -0,0 +1,116 @@ +import { + AnimationClip, + BooleanKeyframeTrack, + ColorKeyframeTrack, + NumberKeyframeTrack, + Vector3, + VectorKeyframeTrack +} from 'three'; + +class AnimationClipCreator { + + static CreateRotationAnimation( period, axis = 'x' ) { + + const times = [ 0, period ], values = [ 0, 360 ]; + + const trackName = '.rotation[' + axis + ']'; + + const track = new NumberKeyframeTrack( trackName, times, values ); + + return new AnimationClip( null, period, [ track ] ); + + } + + static CreateScaleAxisAnimation( period, axis = 'x' ) { + + const times = [ 0, period ], values = [ 0, 1 ]; + + const trackName = '.scale[' + axis + ']'; + + const track = new NumberKeyframeTrack( trackName, times, values ); + + return new AnimationClip( null, period, [ track ] ); + + } + + static CreateShakeAnimation( duration, shakeScale ) { + + const times = [], values = [], tmp = new Vector3(); + + for ( let i = 0; i < duration * 10; i ++ ) { + + times.push( i / 10 ); + + tmp.set( Math.random() * 2.0 - 1.0, Math.random() * 2.0 - 1.0, Math.random() * 2.0 - 1.0 ). + multiply( shakeScale ). + toArray( values, values.length ); + + } + + const trackName = '.position'; + + const track = new VectorKeyframeTrack( trackName, times, values ); + + return new AnimationClip( null, duration, [ track ] ); + + } + + static CreatePulsationAnimation( duration, pulseScale ) { + + const times = [], values = [], tmp = new Vector3(); + + for ( let i = 0; i < duration * 10; i ++ ) { + + times.push( i / 10 ); + + const scaleFactor = Math.random() * pulseScale; + tmp.set( scaleFactor, scaleFactor, scaleFactor ). + toArray( values, values.length ); + + } + + const trackName = '.scale'; + + const track = new VectorKeyframeTrack( trackName, times, values ); + + return new AnimationClip( null, duration, [ track ] ); + + } + + static CreateVisibilityAnimation( duration ) { + + const times = [ 0, duration / 2, duration ], values = [ true, false, true ]; + + const trackName = '.visible'; + + const track = new BooleanKeyframeTrack( trackName, times, values ); + + return new AnimationClip( null, duration, [ track ] ); + + } + + static CreateMaterialColorAnimation( duration, colors ) { + + const times = [], values = [], + timeStep = duration / colors.length; + + for ( let i = 0; i < colors.length; i ++ ) { + + times.push( i * timeStep ); + + const color = colors[ i ]; + values.push( color.r, color.g, color.b ); + + } + + const trackName = '.material.color'; + + const track = new ColorKeyframeTrack( trackName, times, values ); + + return new AnimationClip( null, duration, [ track ] ); + + } + +} + +export { AnimationClipCreator }; diff --git a/node_modules/three/examples/jsm/animation/CCDIKSolver.js b/node_modules/three/examples/jsm/animation/CCDIKSolver.js new file mode 100644 index 0000000..4a0ae53 --- /dev/null +++ b/node_modules/three/examples/jsm/animation/CCDIKSolver.js @@ -0,0 +1,484 @@ +import { + BufferAttribute, + BufferGeometry, + Color, + Line, + LineBasicMaterial, + Matrix4, + Mesh, + MeshBasicMaterial, + Object3D, + Quaternion, + SphereGeometry, + Vector3 +} from 'three'; + +const _q = new Quaternion(); +const _targetPos = new Vector3(); +const _targetVec = new Vector3(); +const _effectorPos = new Vector3(); +const _effectorVec = new Vector3(); +const _linkPos = new Vector3(); +const _invLinkQ = new Quaternion(); +const _linkScale = new Vector3(); +const _axis = new Vector3(); +const _vector = new Vector3(); +const _matrix = new Matrix4(); + + +/** + * CCD Algorithm + * - https://sites.google.com/site/auraliusproject/ccd-algorithm + * + * // ik parameter example + * // + * // target, effector, index in links are bone index in skeleton.bones. + * // the bones relation should be + * // <-- parent child --> + * // links[ n ], links[ n - 1 ], ..., links[ 0 ], effector + * iks = [ { + * target: 1, + * effector: 2, + * links: [ { index: 5, limitation: new Vector3( 1, 0, 0 ) }, { index: 4, enabled: false }, { index : 3 } ], + * iteration: 10, + * minAngle: 0.0, + * maxAngle: 1.0, + * } ]; + */ + +class CCDIKSolver { + + /** + * @param {THREE.SkinnedMesh} mesh + * @param {Array} iks + */ + constructor( mesh, iks = [] ) { + + this.mesh = mesh; + this.iks = iks; + + this._valid(); + + } + + /** + * Update all IK bones. + * + * @return {CCDIKSolver} + */ + update() { + + const iks = this.iks; + + for ( let i = 0, il = iks.length; i < il; i ++ ) { + + this.updateOne( iks[ i ] ); + + } + + return this; + + } + + /** + * Update one IK bone + * + * @param {Object} ik parameter + * @return {CCDIKSolver} + */ + updateOne( ik ) { + + const bones = this.mesh.skeleton.bones; + + // for reference overhead reduction in loop + const math = Math; + + const effector = bones[ ik.effector ]; + const target = bones[ ik.target ]; + + // don't use getWorldPosition() here for the performance + // because it calls updateMatrixWorld( true ) inside. + _targetPos.setFromMatrixPosition( target.matrixWorld ); + + const links = ik.links; + const iteration = ik.iteration !== undefined ? ik.iteration : 1; + + for ( let i = 0; i < iteration; i ++ ) { + + let rotated = false; + + for ( let j = 0, jl = links.length; j < jl; j ++ ) { + + const link = bones[ links[ j ].index ]; + + // skip this link and following links. + // this skip is used for MMD performance optimization. + if ( links[ j ].enabled === false ) break; + + const limitation = links[ j ].limitation; + const rotationMin = links[ j ].rotationMin; + const rotationMax = links[ j ].rotationMax; + + // don't use getWorldPosition/Quaternion() here for the performance + // because they call updateMatrixWorld( true ) inside. + link.matrixWorld.decompose( _linkPos, _invLinkQ, _linkScale ); + _invLinkQ.invert(); + _effectorPos.setFromMatrixPosition( effector.matrixWorld ); + + // work in link world + _effectorVec.subVectors( _effectorPos, _linkPos ); + _effectorVec.applyQuaternion( _invLinkQ ); + _effectorVec.normalize(); + + _targetVec.subVectors( _targetPos, _linkPos ); + _targetVec.applyQuaternion( _invLinkQ ); + _targetVec.normalize(); + + let angle = _targetVec.dot( _effectorVec ); + + if ( angle > 1.0 ) { + + angle = 1.0; + + } else if ( angle < - 1.0 ) { + + angle = - 1.0; + + } + + angle = math.acos( angle ); + + // skip if changing angle is too small to prevent vibration of bone + if ( angle < 1e-5 ) continue; + + if ( ik.minAngle !== undefined && angle < ik.minAngle ) { + + angle = ik.minAngle; + + } + + if ( ik.maxAngle !== undefined && angle > ik.maxAngle ) { + + angle = ik.maxAngle; + + } + + _axis.crossVectors( _effectorVec, _targetVec ); + _axis.normalize(); + + _q.setFromAxisAngle( _axis, angle ); + link.quaternion.multiply( _q ); + + // TODO: re-consider the limitation specification + if ( limitation !== undefined ) { + + let c = link.quaternion.w; + + if ( c > 1.0 ) c = 1.0; + + const c2 = math.sqrt( 1 - c * c ); + link.quaternion.set( limitation.x * c2, + limitation.y * c2, + limitation.z * c2, + c ); + + } + + if ( rotationMin !== undefined ) { + + link.rotation.setFromVector3( _vector.setFromEuler( link.rotation ).max( rotationMin ) ); + + } + + if ( rotationMax !== undefined ) { + + link.rotation.setFromVector3( _vector.setFromEuler( link.rotation ).min( rotationMax ) ); + + } + + link.updateMatrixWorld( true ); + + rotated = true; + + } + + if ( ! rotated ) break; + + } + + return this; + + } + + /** + * Creates Helper + * + * @param {number} sphereSize + * @return {CCDIKHelper} + */ + createHelper( sphereSize ) { + + return new CCDIKHelper( this.mesh, this.iks, sphereSize ); + + } + + // private methods + + _valid() { + + const iks = this.iks; + const bones = this.mesh.skeleton.bones; + + for ( let i = 0, il = iks.length; i < il; i ++ ) { + + const ik = iks[ i ]; + const effector = bones[ ik.effector ]; + const links = ik.links; + let link0, link1; + + link0 = effector; + + for ( let j = 0, jl = links.length; j < jl; j ++ ) { + + link1 = bones[ links[ j ].index ]; + + if ( link0.parent !== link1 ) { + + console.warn( 'THREE.CCDIKSolver: bone ' + link0.name + ' is not the child of bone ' + link1.name ); + + } + + link0 = link1; + + } + + } + + } + +} + +function getPosition( bone, matrixWorldInv ) { + + return _vector + .setFromMatrixPosition( bone.matrixWorld ) + .applyMatrix4( matrixWorldInv ); + +} + +function setPositionOfBoneToAttributeArray( array, index, bone, matrixWorldInv ) { + + const v = getPosition( bone, matrixWorldInv ); + + array[ index * 3 + 0 ] = v.x; + array[ index * 3 + 1 ] = v.y; + array[ index * 3 + 2 ] = v.z; + +} + +/** + * Visualize IK bones + * + * @param {SkinnedMesh} mesh + * @param {Array} iks + * @param {number} sphereSize + */ +class CCDIKHelper extends Object3D { + + constructor( mesh, iks = [], sphereSize = 0.25 ) { + + super(); + + this.root = mesh; + this.iks = iks; + + this.matrix.copy( mesh.matrixWorld ); + this.matrixAutoUpdate = false; + + this.sphereGeometry = new SphereGeometry( sphereSize, 16, 8 ); + + this.targetSphereMaterial = new MeshBasicMaterial( { + color: new Color( 0xff8888 ), + depthTest: false, + depthWrite: false, + transparent: true + } ); + + this.effectorSphereMaterial = new MeshBasicMaterial( { + color: new Color( 0x88ff88 ), + depthTest: false, + depthWrite: false, + transparent: true + } ); + + this.linkSphereMaterial = new MeshBasicMaterial( { + color: new Color( 0x8888ff ), + depthTest: false, + depthWrite: false, + transparent: true + } ); + + this.lineMaterial = new LineBasicMaterial( { + color: new Color( 0xff0000 ), + depthTest: false, + depthWrite: false, + transparent: true + } ); + + this._init(); + + } + + /** + * Updates IK bones visualization. + */ + updateMatrixWorld( force ) { + + const mesh = this.root; + + if ( this.visible ) { + + let offset = 0; + + const iks = this.iks; + const bones = mesh.skeleton.bones; + + _matrix.copy( mesh.matrixWorld ).invert(); + + for ( let i = 0, il = iks.length; i < il; i ++ ) { + + const ik = iks[ i ]; + + const targetBone = bones[ ik.target ]; + const effectorBone = bones[ ik.effector ]; + + const targetMesh = this.children[ offset ++ ]; + const effectorMesh = this.children[ offset ++ ]; + + targetMesh.position.copy( getPosition( targetBone, _matrix ) ); + effectorMesh.position.copy( getPosition( effectorBone, _matrix ) ); + + for ( let j = 0, jl = ik.links.length; j < jl; j ++ ) { + + const link = ik.links[ j ]; + const linkBone = bones[ link.index ]; + + const linkMesh = this.children[ offset ++ ]; + + linkMesh.position.copy( getPosition( linkBone, _matrix ) ); + + } + + const line = this.children[ offset ++ ]; + const array = line.geometry.attributes.position.array; + + setPositionOfBoneToAttributeArray( array, 0, targetBone, _matrix ); + setPositionOfBoneToAttributeArray( array, 1, effectorBone, _matrix ); + + for ( let j = 0, jl = ik.links.length; j < jl; j ++ ) { + + const link = ik.links[ j ]; + const linkBone = bones[ link.index ]; + setPositionOfBoneToAttributeArray( array, j + 2, linkBone, _matrix ); + + } + + line.geometry.attributes.position.needsUpdate = true; + + } + + } + + this.matrix.copy( mesh.matrixWorld ); + + super.updateMatrixWorld( force ); + + } + + /** + * Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app. + */ + dispose() { + + this.sphereGeometry.dispose(); + + this.targetSphereMaterial.dispose(); + this.effectorSphereMaterial.dispose(); + this.linkSphereMaterial.dispose(); + this.lineMaterial.dispose(); + + const children = this.children; + + for ( let i = 0; i < children.length; i ++ ) { + + const child = children[ i ]; + + if ( child.isLine ) child.geometry.dispose(); + + } + + } + + // private method + + _init() { + + const scope = this; + const iks = this.iks; + + function createLineGeometry( ik ) { + + const geometry = new BufferGeometry(); + const vertices = new Float32Array( ( 2 + ik.links.length ) * 3 ); + geometry.setAttribute( 'position', new BufferAttribute( vertices, 3 ) ); + + return geometry; + + } + + function createTargetMesh() { + + return new Mesh( scope.sphereGeometry, scope.targetSphereMaterial ); + + } + + function createEffectorMesh() { + + return new Mesh( scope.sphereGeometry, scope.effectorSphereMaterial ); + + } + + function createLinkMesh() { + + return new Mesh( scope.sphereGeometry, scope.linkSphereMaterial ); + + } + + function createLine( ik ) { + + return new Line( createLineGeometry( ik ), scope.lineMaterial ); + + } + + for ( let i = 0, il = iks.length; i < il; i ++ ) { + + const ik = iks[ i ]; + + this.add( createTargetMesh() ); + this.add( createEffectorMesh() ); + + for ( let j = 0, jl = ik.links.length; j < jl; j ++ ) { + + this.add( createLinkMesh() ); + + } + + this.add( createLine( ik ) ); + + } + + } + +} + +export { CCDIKSolver, CCDIKHelper }; diff --git a/node_modules/three/examples/jsm/animation/MMDAnimationHelper.js b/node_modules/three/examples/jsm/animation/MMDAnimationHelper.js new file mode 100644 index 0000000..b24dea1 --- /dev/null +++ b/node_modules/three/examples/jsm/animation/MMDAnimationHelper.js @@ -0,0 +1,1207 @@ +import { + AnimationMixer, + Object3D, + Quaternion, + Vector3 +} from 'three'; +import { CCDIKSolver } from '../animation/CCDIKSolver.js'; +import { MMDPhysics } from '../animation/MMDPhysics.js'; + +/** + * MMDAnimationHelper handles animation of MMD assets loaded by MMDLoader + * with MMD special features as IK, Grant, and Physics. + * + * Dependencies + * - ammo.js https://github.com/kripken/ammo.js + * - MMDPhysics + * - CCDIKSolver + * + * TODO + * - more precise grant skinning support. + */ +class MMDAnimationHelper { + + /** + * @param {Object} params - (optional) + * @param {boolean} params.sync - Whether animation durations of added objects are synched. Default is true. + * @param {Number} params.afterglow - Default is 0.0. + * @param {boolean} params.resetPhysicsOnLoop - Default is true. + */ + constructor( params = {} ) { + + this.meshes = []; + + this.camera = null; + this.cameraTarget = new Object3D(); + this.cameraTarget.name = 'target'; + + this.audio = null; + this.audioManager = null; + + this.objects = new WeakMap(); + + this.configuration = { + sync: params.sync !== undefined ? params.sync : true, + afterglow: params.afterglow !== undefined ? params.afterglow : 0.0, + resetPhysicsOnLoop: params.resetPhysicsOnLoop !== undefined ? params.resetPhysicsOnLoop : true, + pmxAnimation: params.pmxAnimation !== undefined ? params.pmxAnimation : false + }; + + this.enabled = { + animation: true, + ik: true, + grant: true, + physics: true, + cameraAnimation: true + }; + + this.onBeforePhysics = function ( /* mesh */ ) {}; + + // experimental + this.sharedPhysics = false; + this.masterPhysics = null; + + } + + /** + * Adds an Three.js Object to helper and setups animation. + * The anmation durations of added objects are synched + * if this.configuration.sync is true. + * + * @param {THREE.SkinnedMesh|THREE.Camera|THREE.Audio} object + * @param {Object} params - (optional) + * @param {THREE.AnimationClip|Array} params.animation - Only for THREE.SkinnedMesh and THREE.Camera. Default is undefined. + * @param {boolean} params.physics - Only for THREE.SkinnedMesh. Default is true. + * @param {Integer} params.warmup - Only for THREE.SkinnedMesh and physics is true. Default is 60. + * @param {Number} params.unitStep - Only for THREE.SkinnedMesh and physics is true. Default is 1 / 65. + * @param {Integer} params.maxStepNum - Only for THREE.SkinnedMesh and physics is true. Default is 3. + * @param {Vector3} params.gravity - Only for THREE.SkinnedMesh and physics is true. Default ( 0, - 9.8 * 10, 0 ). + * @param {Number} params.delayTime - Only for THREE.Audio. Default is 0.0. + * @return {MMDAnimationHelper} + */ + add( object, params = {} ) { + + if ( object.isSkinnedMesh ) { + + this._addMesh( object, params ); + + } else if ( object.isCamera ) { + + this._setupCamera( object, params ); + + } else if ( object.type === 'Audio' ) { + + this._setupAudio( object, params ); + + } else { + + throw new Error( 'THREE.MMDAnimationHelper.add: ' + + 'accepts only ' + + 'THREE.SkinnedMesh or ' + + 'THREE.Camera or ' + + 'THREE.Audio instance.' ); + + } + + if ( this.configuration.sync ) this._syncDuration(); + + return this; + + } + + /** + * Removes an Three.js Object from helper. + * + * @param {THREE.SkinnedMesh|THREE.Camera|THREE.Audio} object + * @return {MMDAnimationHelper} + */ + remove( object ) { + + if ( object.isSkinnedMesh ) { + + this._removeMesh( object ); + + } else if ( object.isCamera ) { + + this._clearCamera( object ); + + } else if ( object.type === 'Audio' ) { + + this._clearAudio( object ); + + } else { + + throw new Error( 'THREE.MMDAnimationHelper.remove: ' + + 'accepts only ' + + 'THREE.SkinnedMesh or ' + + 'THREE.Camera or ' + + 'THREE.Audio instance.' ); + + } + + if ( this.configuration.sync ) this._syncDuration(); + + return this; + + } + + /** + * Updates the animation. + * + * @param {Number} delta + * @return {MMDAnimationHelper} + */ + update( delta ) { + + if ( this.audioManager !== null ) this.audioManager.control( delta ); + + for ( let i = 0; i < this.meshes.length; i ++ ) { + + this._animateMesh( this.meshes[ i ], delta ); + + } + + if ( this.sharedPhysics ) this._updateSharedPhysics( delta ); + + if ( this.camera !== null ) this._animateCamera( this.camera, delta ); + + return this; + + } + + /** + * Changes the pose of SkinnedMesh as VPD specifies. + * + * @param {THREE.SkinnedMesh} mesh + * @param {Object} vpd - VPD content parsed MMDParser + * @param {Object} params - (optional) + * @param {boolean} params.resetPose - Default is true. + * @param {boolean} params.ik - Default is true. + * @param {boolean} params.grant - Default is true. + * @return {MMDAnimationHelper} + */ + pose( mesh, vpd, params = {} ) { + + if ( params.resetPose !== false ) mesh.pose(); + + const bones = mesh.skeleton.bones; + const boneParams = vpd.bones; + + const boneNameDictionary = {}; + + for ( let i = 0, il = bones.length; i < il; i ++ ) { + + boneNameDictionary[ bones[ i ].name ] = i; + + } + + const vector = new Vector3(); + const quaternion = new Quaternion(); + + for ( let i = 0, il = boneParams.length; i < il; i ++ ) { + + const boneParam = boneParams[ i ]; + const boneIndex = boneNameDictionary[ boneParam.name ]; + + if ( boneIndex === undefined ) continue; + + const bone = bones[ boneIndex ]; + bone.position.add( vector.fromArray( boneParam.translation ) ); + bone.quaternion.multiply( quaternion.fromArray( boneParam.quaternion ) ); + + } + + mesh.updateMatrixWorld( true ); + + // PMX animation system special path + if ( this.configuration.pmxAnimation && + mesh.geometry.userData.MMD && mesh.geometry.userData.MMD.format === 'pmx' ) { + + const sortedBonesData = this._sortBoneDataArray( mesh.geometry.userData.MMD.bones.slice() ); + const ikSolver = params.ik !== false ? this._createCCDIKSolver( mesh ) : null; + const grantSolver = params.grant !== false ? this.createGrantSolver( mesh ) : null; + this._animatePMXMesh( mesh, sortedBonesData, ikSolver, grantSolver ); + + } else { + + if ( params.ik !== false ) { + + this._createCCDIKSolver( mesh ).update(); + + } + + if ( params.grant !== false ) { + + this.createGrantSolver( mesh ).update(); + + } + + } + + return this; + + } + + /** + * Enabes/Disables an animation feature. + * + * @param {string} key + * @param {boolean} enabled + * @return {MMDAnimationHelper} + */ + enable( key, enabled ) { + + if ( this.enabled[ key ] === undefined ) { + + throw new Error( 'THREE.MMDAnimationHelper.enable: ' + + 'unknown key ' + key ); + + } + + this.enabled[ key ] = enabled; + + if ( key === 'physics' ) { + + for ( let i = 0, il = this.meshes.length; i < il; i ++ ) { + + this._optimizeIK( this.meshes[ i ], enabled ); + + } + + } + + return this; + + } + + /** + * Creates an GrantSolver instance. + * + * @param {THREE.SkinnedMesh} mesh + * @return {GrantSolver} + */ + createGrantSolver( mesh ) { + + return new GrantSolver( mesh, mesh.geometry.userData.MMD.grants ); + + } + + // private methods + + _addMesh( mesh, params ) { + + if ( this.meshes.indexOf( mesh ) >= 0 ) { + + throw new Error( 'THREE.MMDAnimationHelper._addMesh: ' + + 'SkinnedMesh \'' + mesh.name + '\' has already been added.' ); + + } + + this.meshes.push( mesh ); + this.objects.set( mesh, { looped: false } ); + + this._setupMeshAnimation( mesh, params.animation ); + + if ( params.physics !== false ) { + + this._setupMeshPhysics( mesh, params ); + + } + + return this; + + } + + _setupCamera( camera, params ) { + + if ( this.camera === camera ) { + + throw new Error( 'THREE.MMDAnimationHelper._setupCamera: ' + + 'Camera \'' + camera.name + '\' has already been set.' ); + + } + + if ( this.camera ) this.clearCamera( this.camera ); + + this.camera = camera; + + camera.add( this.cameraTarget ); + + this.objects.set( camera, {} ); + + if ( params.animation !== undefined ) { + + this._setupCameraAnimation( camera, params.animation ); + + } + + return this; + + } + + _setupAudio( audio, params ) { + + if ( this.audio === audio ) { + + throw new Error( 'THREE.MMDAnimationHelper._setupAudio: ' + + 'Audio \'' + audio.name + '\' has already been set.' ); + + } + + if ( this.audio ) this.clearAudio( this.audio ); + + this.audio = audio; + this.audioManager = new AudioManager( audio, params ); + + this.objects.set( this.audioManager, { + duration: this.audioManager.duration + } ); + + return this; + + } + + _removeMesh( mesh ) { + + let found = false; + let writeIndex = 0; + + for ( let i = 0, il = this.meshes.length; i < il; i ++ ) { + + if ( this.meshes[ i ] === mesh ) { + + this.objects.delete( mesh ); + found = true; + + continue; + + } + + this.meshes[ writeIndex ++ ] = this.meshes[ i ]; + + } + + if ( ! found ) { + + throw new Error( 'THREE.MMDAnimationHelper._removeMesh: ' + + 'SkinnedMesh \'' + mesh.name + '\' has not been added yet.' ); + + } + + this.meshes.length = writeIndex; + + return this; + + } + + _clearCamera( camera ) { + + if ( camera !== this.camera ) { + + throw new Error( 'THREE.MMDAnimationHelper._clearCamera: ' + + 'Camera \'' + camera.name + '\' has not been set yet.' ); + + } + + this.camera.remove( this.cameraTarget ); + + this.objects.delete( this.camera ); + this.camera = null; + + return this; + + } + + _clearAudio( audio ) { + + if ( audio !== this.audio ) { + + throw new Error( 'THREE.MMDAnimationHelper._clearAudio: ' + + 'Audio \'' + audio.name + '\' has not been set yet.' ); + + } + + this.objects.delete( this.audioManager ); + + this.audio = null; + this.audioManager = null; + + return this; + + } + + _setupMeshAnimation( mesh, animation ) { + + const objects = this.objects.get( mesh ); + + if ( animation !== undefined ) { + + const animations = Array.isArray( animation ) + ? animation : [ animation ]; + + objects.mixer = new AnimationMixer( mesh ); + + for ( let i = 0, il = animations.length; i < il; i ++ ) { + + objects.mixer.clipAction( animations[ i ] ).play(); + + } + + // TODO: find a workaround not to access ._clip looking like a private property + objects.mixer.addEventListener( 'loop', function ( event ) { + + const tracks = event.action._clip.tracks; + + if ( tracks.length > 0 && tracks[ 0 ].name.slice( 0, 6 ) !== '.bones' ) return; + + objects.looped = true; + + } ); + + } + + objects.ikSolver = this._createCCDIKSolver( mesh ); + objects.grantSolver = this.createGrantSolver( mesh ); + + return this; + + } + + _setupCameraAnimation( camera, animation ) { + + const animations = Array.isArray( animation ) + ? animation : [ animation ]; + + const objects = this.objects.get( camera ); + + objects.mixer = new AnimationMixer( camera ); + + for ( let i = 0, il = animations.length; i < il; i ++ ) { + + objects.mixer.clipAction( animations[ i ] ).play(); + + } + + } + + _setupMeshPhysics( mesh, params ) { + + const objects = this.objects.get( mesh ); + + // shared physics is experimental + + if ( params.world === undefined && this.sharedPhysics ) { + + const masterPhysics = this._getMasterPhysics(); + + if ( masterPhysics !== null ) world = masterPhysics.world; // eslint-disable-line no-undef + + } + + objects.physics = this._createMMDPhysics( mesh, params ); + + if ( objects.mixer && params.animationWarmup !== false ) { + + this._animateMesh( mesh, 0 ); + objects.physics.reset(); + + } + + objects.physics.warmup( params.warmup !== undefined ? params.warmup : 60 ); + + this._optimizeIK( mesh, true ); + + } + + _animateMesh( mesh, delta ) { + + const objects = this.objects.get( mesh ); + + const mixer = objects.mixer; + const ikSolver = objects.ikSolver; + const grantSolver = objects.grantSolver; + const physics = objects.physics; + const looped = objects.looped; + + if ( mixer && this.enabled.animation ) { + + // alternate solution to save/restore bones but less performant? + //mesh.pose(); + //this._updatePropertyMixersBuffer( mesh ); + + this._restoreBones( mesh ); + + mixer.update( delta ); + + this._saveBones( mesh ); + + // PMX animation system special path + if ( this.configuration.pmxAnimation && + mesh.geometry.userData.MMD && mesh.geometry.userData.MMD.format === 'pmx' ) { + + if ( ! objects.sortedBonesData ) objects.sortedBonesData = this._sortBoneDataArray( mesh.geometry.userData.MMD.bones.slice() ); + + this._animatePMXMesh( + mesh, + objects.sortedBonesData, + ikSolver && this.enabled.ik ? ikSolver : null, + grantSolver && this.enabled.grant ? grantSolver : null + ); + + } else { + + if ( ikSolver && this.enabled.ik ) { + + mesh.updateMatrixWorld( true ); + ikSolver.update(); + + } + + if ( grantSolver && this.enabled.grant ) { + + grantSolver.update(); + + } + + } + + } + + if ( looped === true && this.enabled.physics ) { + + if ( physics && this.configuration.resetPhysicsOnLoop ) physics.reset(); + + objects.looped = false; + + } + + if ( physics && this.enabled.physics && ! this.sharedPhysics ) { + + this.onBeforePhysics( mesh ); + physics.update( delta ); + + } + + } + + // Sort bones in order by 1. transformationClass and 2. bone index. + // In PMX animation system, bone transformations should be processed + // in this order. + _sortBoneDataArray( boneDataArray ) { + + return boneDataArray.sort( function ( a, b ) { + + if ( a.transformationClass !== b.transformationClass ) { + + return a.transformationClass - b.transformationClass; + + } else { + + return a.index - b.index; + + } + + } ); + + } + + // PMX Animation system is a bit too complex and doesn't great match to + // Three.js Animation system. This method attempts to simulate it as much as + // possible but doesn't perfectly simulate. + // This method is more costly than the regular one so + // you are recommended to set constructor parameter "pmxAnimation: true" + // only if your PMX model animation doesn't work well. + // If you need better method you would be required to write your own. + _animatePMXMesh( mesh, sortedBonesData, ikSolver, grantSolver ) { + + _quaternionIndex = 0; + _grantResultMap.clear(); + + for ( let i = 0, il = sortedBonesData.length; i < il; i ++ ) { + + updateOne( mesh, sortedBonesData[ i ].index, ikSolver, grantSolver ); + + } + + mesh.updateMatrixWorld( true ); + return this; + + } + + _animateCamera( camera, delta ) { + + const mixer = this.objects.get( camera ).mixer; + + if ( mixer && this.enabled.cameraAnimation ) { + + mixer.update( delta ); + + camera.updateProjectionMatrix(); + + camera.up.set( 0, 1, 0 ); + camera.up.applyQuaternion( camera.quaternion ); + camera.lookAt( this.cameraTarget.position ); + + } + + } + + _optimizeIK( mesh, physicsEnabled ) { + + const iks = mesh.geometry.userData.MMD.iks; + const bones = mesh.geometry.userData.MMD.bones; + + for ( let i = 0, il = iks.length; i < il; i ++ ) { + + const ik = iks[ i ]; + const links = ik.links; + + for ( let j = 0, jl = links.length; j < jl; j ++ ) { + + const link = links[ j ]; + + if ( physicsEnabled === true ) { + + // disable IK of the bone the corresponding rigidBody type of which is 1 or 2 + // because its rotation will be overriden by physics + link.enabled = bones[ link.index ].rigidBodyType > 0 ? false : true; + + } else { + + link.enabled = true; + + } + + } + + } + + } + + _createCCDIKSolver( mesh ) { + + if ( CCDIKSolver === undefined ) { + + throw new Error( 'THREE.MMDAnimationHelper: Import CCDIKSolver.' ); + + } + + return new CCDIKSolver( mesh, mesh.geometry.userData.MMD.iks ); + + } + + _createMMDPhysics( mesh, params ) { + + if ( MMDPhysics === undefined ) { + + throw new Error( 'THREE.MMDPhysics: Import MMDPhysics.' ); + + } + + return new MMDPhysics( + mesh, + mesh.geometry.userData.MMD.rigidBodies, + mesh.geometry.userData.MMD.constraints, + params ); + + } + + /* + * Detects the longest duration and then sets it to them to sync. + * TODO: Not to access private properties ( ._actions and ._clip ) + */ + _syncDuration() { + + let max = 0.0; + + const objects = this.objects; + const meshes = this.meshes; + const camera = this.camera; + const audioManager = this.audioManager; + + // get the longest duration + + for ( let i = 0, il = meshes.length; i < il; i ++ ) { + + const mixer = this.objects.get( meshes[ i ] ).mixer; + + if ( mixer === undefined ) continue; + + for ( let j = 0; j < mixer._actions.length; j ++ ) { + + const clip = mixer._actions[ j ]._clip; + + if ( ! objects.has( clip ) ) { + + objects.set( clip, { + duration: clip.duration + } ); + + } + + max = Math.max( max, objects.get( clip ).duration ); + + } + + } + + if ( camera !== null ) { + + const mixer = this.objects.get( camera ).mixer; + + if ( mixer !== undefined ) { + + for ( let i = 0, il = mixer._actions.length; i < il; i ++ ) { + + const clip = mixer._actions[ i ]._clip; + + if ( ! objects.has( clip ) ) { + + objects.set( clip, { + duration: clip.duration + } ); + + } + + max = Math.max( max, objects.get( clip ).duration ); + + } + + } + + } + + if ( audioManager !== null ) { + + max = Math.max( max, objects.get( audioManager ).duration ); + + } + + max += this.configuration.afterglow; + + // update the duration + + for ( let i = 0, il = this.meshes.length; i < il; i ++ ) { + + const mixer = this.objects.get( this.meshes[ i ] ).mixer; + + if ( mixer === undefined ) continue; + + for ( let j = 0, jl = mixer._actions.length; j < jl; j ++ ) { + + mixer._actions[ j ]._clip.duration = max; + + } + + } + + if ( camera !== null ) { + + const mixer = this.objects.get( camera ).mixer; + + if ( mixer !== undefined ) { + + for ( let i = 0, il = mixer._actions.length; i < il; i ++ ) { + + mixer._actions[ i ]._clip.duration = max; + + } + + } + + } + + if ( audioManager !== null ) { + + audioManager.duration = max; + + } + + } + + // workaround + + _updatePropertyMixersBuffer( mesh ) { + + const mixer = this.objects.get( mesh ).mixer; + + const propertyMixers = mixer._bindings; + const accuIndex = mixer._accuIndex; + + for ( let i = 0, il = propertyMixers.length; i < il; i ++ ) { + + const propertyMixer = propertyMixers[ i ]; + const buffer = propertyMixer.buffer; + const stride = propertyMixer.valueSize; + const offset = ( accuIndex + 1 ) * stride; + + propertyMixer.binding.getValue( buffer, offset ); + + } + + } + + /* + * Avoiding these two issues by restore/save bones before/after mixer animation. + * + * 1. PropertyMixer used by AnimationMixer holds cache value in .buffer. + * Calculating IK, Grant, and Physics after mixer animation can break + * the cache coherency. + * + * 2. Applying Grant two or more times without reset the posing breaks model. + */ + _saveBones( mesh ) { + + const objects = this.objects.get( mesh ); + + const bones = mesh.skeleton.bones; + + let backupBones = objects.backupBones; + + if ( backupBones === undefined ) { + + backupBones = new Float32Array( bones.length * 7 ); + objects.backupBones = backupBones; + + } + + for ( let i = 0, il = bones.length; i < il; i ++ ) { + + const bone = bones[ i ]; + bone.position.toArray( backupBones, i * 7 ); + bone.quaternion.toArray( backupBones, i * 7 + 3 ); + + } + + } + + _restoreBones( mesh ) { + + const objects = this.objects.get( mesh ); + + const backupBones = objects.backupBones; + + if ( backupBones === undefined ) return; + + const bones = mesh.skeleton.bones; + + for ( let i = 0, il = bones.length; i < il; i ++ ) { + + const bone = bones[ i ]; + bone.position.fromArray( backupBones, i * 7 ); + bone.quaternion.fromArray( backupBones, i * 7 + 3 ); + + } + + } + + // experimental + + _getMasterPhysics() { + + if ( this.masterPhysics !== null ) return this.masterPhysics; + + for ( let i = 0, il = this.meshes.length; i < il; i ++ ) { + + const physics = this.meshes[ i ].physics; + + if ( physics !== undefined && physics !== null ) { + + this.masterPhysics = physics; + return this.masterPhysics; + + } + + } + + return null; + + } + + _updateSharedPhysics( delta ) { + + if ( this.meshes.length === 0 || ! this.enabled.physics || ! this.sharedPhysics ) return; + + const physics = this._getMasterPhysics(); + + if ( physics === null ) return; + + for ( let i = 0, il = this.meshes.length; i < il; i ++ ) { + + const p = this.meshes[ i ].physics; + + if ( p !== null && p !== undefined ) { + + p.updateRigidBodies(); + + } + + } + + physics.stepSimulation( delta ); + + for ( let i = 0, il = this.meshes.length; i < il; i ++ ) { + + const p = this.meshes[ i ].physics; + + if ( p !== null && p !== undefined ) { + + p.updateBones(); + + } + + } + + } + +} + +// Keep working quaternions for less GC +const _quaternions = []; +let _quaternionIndex = 0; + +function getQuaternion() { + + if ( _quaternionIndex >= _quaternions.length ) { + + _quaternions.push( new Quaternion() ); + + } + + return _quaternions[ _quaternionIndex ++ ]; + +} + +// Save rotation whose grant and IK are already applied +// used by grant children +const _grantResultMap = new Map(); + +function updateOne( mesh, boneIndex, ikSolver, grantSolver ) { + + const bones = mesh.skeleton.bones; + const bonesData = mesh.geometry.userData.MMD.bones; + const boneData = bonesData[ boneIndex ]; + const bone = bones[ boneIndex ]; + + // Return if already updated by being referred as a grant parent. + if ( _grantResultMap.has( boneIndex ) ) return; + + const quaternion = getQuaternion(); + + // Initialize grant result here to prevent infinite loop. + // If it's referred before updating with actual result later + // result without applyting IK or grant is gotten + // but better than composing of infinite loop. + _grantResultMap.set( boneIndex, quaternion.copy( bone.quaternion ) ); + + // @TODO: Support global grant and grant position + if ( grantSolver && boneData.grant && + ! boneData.grant.isLocal && boneData.grant.affectRotation ) { + + const parentIndex = boneData.grant.parentIndex; + const ratio = boneData.grant.ratio; + + if ( ! _grantResultMap.has( parentIndex ) ) { + + updateOne( mesh, parentIndex, ikSolver, grantSolver ); + + } + + grantSolver.addGrantRotation( bone, _grantResultMap.get( parentIndex ), ratio ); + + } + + if ( ikSolver && boneData.ik ) { + + // @TODO: Updating world matrices every time solving an IK bone is + // costly. Optimize if possible. + mesh.updateMatrixWorld( true ); + ikSolver.updateOne( boneData.ik ); + + // No confident, but it seems the grant results with ik links should be updated? + const links = boneData.ik.links; + + for ( let i = 0, il = links.length; i < il; i ++ ) { + + const link = links[ i ]; + + if ( link.enabled === false ) continue; + + const linkIndex = link.index; + + if ( _grantResultMap.has( linkIndex ) ) { + + _grantResultMap.set( linkIndex, _grantResultMap.get( linkIndex ).copy( bones[ linkIndex ].quaternion ) ); + + } + + } + + } + + // Update with the actual result here + quaternion.copy( bone.quaternion ); + +} + +// + +class AudioManager { + + /** + * @param {THREE.Audio} audio + * @param {Object} params - (optional) + * @param {Nuumber} params.delayTime + */ + constructor( audio, params = {} ) { + + this.audio = audio; + + this.elapsedTime = 0.0; + this.currentTime = 0.0; + this.delayTime = params.delayTime !== undefined + ? params.delayTime : 0.0; + + this.audioDuration = this.audio.buffer.duration; + this.duration = this.audioDuration + this.delayTime; + + } + + /** + * @param {Number} delta + * @return {AudioManager} + */ + control( delta ) { + + this.elapsed += delta; + this.currentTime += delta; + + if ( this._shouldStopAudio() ) this.audio.stop(); + if ( this._shouldStartAudio() ) this.audio.play(); + + return this; + + } + + // private methods + + _shouldStartAudio() { + + if ( this.audio.isPlaying ) return false; + + while ( this.currentTime >= this.duration ) { + + this.currentTime -= this.duration; + + } + + if ( this.currentTime < this.delayTime ) return false; + + // 'duration' can be bigger than 'audioDuration + delayTime' because of sync configuration + if ( ( this.currentTime - this.delayTime ) > this.audioDuration ) return false; + + return true; + + } + + _shouldStopAudio() { + + return this.audio.isPlaying && + this.currentTime >= this.duration; + + } + +} + +const _q = new Quaternion(); + +/** + * Solver for Grant (Fuyo in Japanese. I just google translated because + * Fuyo may be MMD specific term and may not be common word in 3D CG terms.) + * Grant propagates a bone's transform to other bones transforms even if + * they are not children. + * @param {THREE.SkinnedMesh} mesh + * @param {Array} grants + */ +class GrantSolver { + + constructor( mesh, grants = [] ) { + + this.mesh = mesh; + this.grants = grants; + + } + + /** + * Solve all the grant bones + * @return {GrantSolver} + */ + update() { + + const grants = this.grants; + + for ( let i = 0, il = grants.length; i < il; i ++ ) { + + this.updateOne( grants[ i ] ); + + } + + return this; + + } + + /** + * Solve a grant bone + * @param {Object} grant - grant parameter + * @return {GrantSolver} + */ + updateOne( grant ) { + + const bones = this.mesh.skeleton.bones; + const bone = bones[ grant.index ]; + const parentBone = bones[ grant.parentIndex ]; + + if ( grant.isLocal ) { + + // TODO: implement + if ( grant.affectPosition ) { + + } + + // TODO: implement + if ( grant.affectRotation ) { + + } + + } else { + + // TODO: implement + if ( grant.affectPosition ) { + + } + + if ( grant.affectRotation ) { + + this.addGrantRotation( bone, parentBone.quaternion, grant.ratio ); + + } + + } + + return this; + + } + + addGrantRotation( bone, q, ratio ) { + + _q.set( 0, 0, 0, 1 ); + _q.slerp( q, ratio ); + bone.quaternion.multiply( _q ); + + return this; + + } + +} + +export { MMDAnimationHelper }; diff --git a/node_modules/three/examples/jsm/animation/MMDPhysics.js b/node_modules/three/examples/jsm/animation/MMDPhysics.js new file mode 100644 index 0000000..0570901 --- /dev/null +++ b/node_modules/three/examples/jsm/animation/MMDPhysics.js @@ -0,0 +1,1406 @@ +import { + Bone, + BoxGeometry, + CapsuleGeometry, + Color, + Euler, + Matrix4, + Mesh, + MeshBasicMaterial, + Object3D, + Quaternion, + SphereGeometry, + Vector3 +} from 'three'; + +/** + * Dependencies + * - Ammo.js https://github.com/kripken/ammo.js + * + * MMDPhysics calculates physics with Ammo(Bullet based JavaScript Physics engine) + * for MMD model loaded by MMDLoader. + * + * TODO + * - Physics in Worker + */ + +/* global Ammo */ + +class MMDPhysics { + + /** + * @param {THREE.SkinnedMesh} mesh + * @param {Array} rigidBodyParams + * @param {Array} (optional) constraintParams + * @param {Object} params - (optional) + * @param {Number} params.unitStep - Default is 1 / 65. + * @param {Integer} params.maxStepNum - Default is 3. + * @param {Vector3} params.gravity - Default is ( 0, - 9.8 * 10, 0 ) + */ + constructor( mesh, rigidBodyParams, constraintParams = [], params = {} ) { + + if ( typeof Ammo === 'undefined' ) { + + throw new Error( 'THREE.MMDPhysics: Import ammo.js https://github.com/kripken/ammo.js' ); + + } + + this.manager = new ResourceManager(); + + this.mesh = mesh; + + /* + * I don't know why but 1/60 unitStep easily breaks models + * so I set it 1/65 so far. + * Don't set too small unitStep because + * the smaller unitStep can make the performance worse. + */ + this.unitStep = ( params.unitStep !== undefined ) ? params.unitStep : 1 / 65; + this.maxStepNum = ( params.maxStepNum !== undefined ) ? params.maxStepNum : 3; + this.gravity = new Vector3( 0, - 9.8 * 10, 0 ); + + if ( params.gravity !== undefined ) this.gravity.copy( params.gravity ); + + this.world = params.world !== undefined ? params.world : null; // experimental + + this.bodies = []; + this.constraints = []; + + this._init( mesh, rigidBodyParams, constraintParams ); + + } + + /** + * Advances Physics calculation and updates bones. + * + * @param {Number} delta - time in second + * @return {MMDPhysics} + */ + update( delta ) { + + const manager = this.manager; + const mesh = this.mesh; + + // rigid bodies and constrains are for + // mesh's world scale (1, 1, 1). + // Convert to (1, 1, 1) if it isn't. + + let isNonDefaultScale = false; + + const position = manager.allocThreeVector3(); + const quaternion = manager.allocThreeQuaternion(); + const scale = manager.allocThreeVector3(); + + mesh.matrixWorld.decompose( position, quaternion, scale ); + + if ( scale.x !== 1 || scale.y !== 1 || scale.z !== 1 ) { + + isNonDefaultScale = true; + + } + + let parent; + + if ( isNonDefaultScale ) { + + parent = mesh.parent; + + if ( parent !== null ) mesh.parent = null; + + scale.copy( this.mesh.scale ); + + mesh.scale.set( 1, 1, 1 ); + mesh.updateMatrixWorld( true ); + + } + + // calculate physics and update bones + + this._updateRigidBodies(); + this._stepSimulation( delta ); + this._updateBones(); + + // restore mesh if converted above + + if ( isNonDefaultScale ) { + + if ( parent !== null ) mesh.parent = parent; + + mesh.scale.copy( scale ); + + } + + manager.freeThreeVector3( scale ); + manager.freeThreeQuaternion( quaternion ); + manager.freeThreeVector3( position ); + + return this; + + } + + /** + * Resets rigid bodies transorm to current bone's. + * + * @return {MMDPhysics} + */ + reset() { + + for ( let i = 0, il = this.bodies.length; i < il; i ++ ) { + + this.bodies[ i ].reset(); + + } + + return this; + + } + + /** + * Warm ups Rigid bodies. Calculates cycles steps. + * + * @param {Integer} cycles + * @return {MMDPhysics} + */ + warmup( cycles ) { + + for ( let i = 0; i < cycles; i ++ ) { + + this.update( 1 / 60 ); + + } + + return this; + + } + + /** + * Sets gravity. + * + * @param {Vector3} gravity + * @return {MMDPhysicsHelper} + */ + setGravity( gravity ) { + + this.world.setGravity( new Ammo.btVector3( gravity.x, gravity.y, gravity.z ) ); + this.gravity.copy( gravity ); + + return this; + + } + + /** + * Creates MMDPhysicsHelper + * + * @return {MMDPhysicsHelper} + */ + createHelper() { + + return new MMDPhysicsHelper( this.mesh, this ); + + } + + // private methods + + _init( mesh, rigidBodyParams, constraintParams ) { + + const manager = this.manager; + + // rigid body/constraint parameters are for + // mesh's default world transform as position(0, 0, 0), + // quaternion(0, 0, 0, 1) and scale(0, 0, 0) + + const parent = mesh.parent; + + if ( parent !== null ) mesh.parent = null; + + const currentPosition = manager.allocThreeVector3(); + const currentQuaternion = manager.allocThreeQuaternion(); + const currentScale = manager.allocThreeVector3(); + + currentPosition.copy( mesh.position ); + currentQuaternion.copy( mesh.quaternion ); + currentScale.copy( mesh.scale ); + + mesh.position.set( 0, 0, 0 ); + mesh.quaternion.set( 0, 0, 0, 1 ); + mesh.scale.set( 1, 1, 1 ); + + mesh.updateMatrixWorld( true ); + + if ( this.world === null ) { + + this.world = this._createWorld(); + this.setGravity( this.gravity ); + + } + + this._initRigidBodies( rigidBodyParams ); + this._initConstraints( constraintParams ); + + if ( parent !== null ) mesh.parent = parent; + + mesh.position.copy( currentPosition ); + mesh.quaternion.copy( currentQuaternion ); + mesh.scale.copy( currentScale ); + + mesh.updateMatrixWorld( true ); + + this.reset(); + + manager.freeThreeVector3( currentPosition ); + manager.freeThreeQuaternion( currentQuaternion ); + manager.freeThreeVector3( currentScale ); + + } + + _createWorld() { + + const config = new Ammo.btDefaultCollisionConfiguration(); + const dispatcher = new Ammo.btCollisionDispatcher( config ); + const cache = new Ammo.btDbvtBroadphase(); + const solver = new Ammo.btSequentialImpulseConstraintSolver(); + const world = new Ammo.btDiscreteDynamicsWorld( dispatcher, cache, solver, config ); + return world; + + } + + _initRigidBodies( rigidBodies ) { + + for ( let i = 0, il = rigidBodies.length; i < il; i ++ ) { + + this.bodies.push( new RigidBody( + this.mesh, this.world, rigidBodies[ i ], this.manager ) ); + + } + + } + + _initConstraints( constraints ) { + + for ( let i = 0, il = constraints.length; i < il; i ++ ) { + + const params = constraints[ i ]; + const bodyA = this.bodies[ params.rigidBodyIndex1 ]; + const bodyB = this.bodies[ params.rigidBodyIndex2 ]; + this.constraints.push( new Constraint( this.mesh, this.world, bodyA, bodyB, params, this.manager ) ); + + } + + } + + _stepSimulation( delta ) { + + const unitStep = this.unitStep; + let stepTime = delta; + let maxStepNum = ( ( delta / unitStep ) | 0 ) + 1; + + if ( stepTime < unitStep ) { + + stepTime = unitStep; + maxStepNum = 1; + + } + + if ( maxStepNum > this.maxStepNum ) { + + maxStepNum = this.maxStepNum; + + } + + this.world.stepSimulation( stepTime, maxStepNum, unitStep ); + + } + + _updateRigidBodies() { + + for ( let i = 0, il = this.bodies.length; i < il; i ++ ) { + + this.bodies[ i ].updateFromBone(); + + } + + } + + _updateBones() { + + for ( let i = 0, il = this.bodies.length; i < il; i ++ ) { + + this.bodies[ i ].updateBone(); + + } + + } + +} + +/** + * This manager's responsibilies are + * + * 1. manage Ammo.js and Three.js object resources and + * improve the performance and the memory consumption by + * reusing objects. + * + * 2. provide simple Ammo object operations. + */ +class ResourceManager { + + constructor() { + + // for Three.js + this.threeVector3s = []; + this.threeMatrix4s = []; + this.threeQuaternions = []; + this.threeEulers = []; + + // for Ammo.js + this.transforms = []; + this.quaternions = []; + this.vector3s = []; + + } + + allocThreeVector3() { + + return ( this.threeVector3s.length > 0 ) + ? this.threeVector3s.pop() + : new Vector3(); + + } + + freeThreeVector3( v ) { + + this.threeVector3s.push( v ); + + } + + allocThreeMatrix4() { + + return ( this.threeMatrix4s.length > 0 ) + ? this.threeMatrix4s.pop() + : new Matrix4(); + + } + + freeThreeMatrix4( m ) { + + this.threeMatrix4s.push( m ); + + } + + allocThreeQuaternion() { + + return ( this.threeQuaternions.length > 0 ) + ? this.threeQuaternions.pop() + : new Quaternion(); + + } + + freeThreeQuaternion( q ) { + + this.threeQuaternions.push( q ); + + } + + allocThreeEuler() { + + return ( this.threeEulers.length > 0 ) + ? this.threeEulers.pop() + : new Euler(); + + } + + freeThreeEuler( e ) { + + this.threeEulers.push( e ); + + } + + allocTransform() { + + return ( this.transforms.length > 0 ) + ? this.transforms.pop() + : new Ammo.btTransform(); + + } + + freeTransform( t ) { + + this.transforms.push( t ); + + } + + allocQuaternion() { + + return ( this.quaternions.length > 0 ) + ? this.quaternions.pop() + : new Ammo.btQuaternion(); + + } + + freeQuaternion( q ) { + + this.quaternions.push( q ); + + } + + allocVector3() { + + return ( this.vector3s.length > 0 ) + ? this.vector3s.pop() + : new Ammo.btVector3(); + + } + + freeVector3( v ) { + + this.vector3s.push( v ); + + } + + setIdentity( t ) { + + t.setIdentity(); + + } + + getBasis( t ) { + + var q = this.allocQuaternion(); + t.getBasis().getRotation( q ); + return q; + + } + + getBasisAsMatrix3( t ) { + + var q = this.getBasis( t ); + var m = this.quaternionToMatrix3( q ); + this.freeQuaternion( q ); + return m; + + } + + getOrigin( t ) { + + return t.getOrigin(); + + } + + setOrigin( t, v ) { + + t.getOrigin().setValue( v.x(), v.y(), v.z() ); + + } + + copyOrigin( t1, t2 ) { + + var o = t2.getOrigin(); + this.setOrigin( t1, o ); + + } + + setBasis( t, q ) { + + t.setRotation( q ); + + } + + setBasisFromMatrix3( t, m ) { + + var q = this.matrix3ToQuaternion( m ); + this.setBasis( t, q ); + this.freeQuaternion( q ); + + } + + setOriginFromArray3( t, a ) { + + t.getOrigin().setValue( a[ 0 ], a[ 1 ], a[ 2 ] ); + + } + + setOriginFromThreeVector3( t, v ) { + + t.getOrigin().setValue( v.x, v.y, v.z ); + + } + + setBasisFromArray3( t, a ) { + + var thQ = this.allocThreeQuaternion(); + var thE = this.allocThreeEuler(); + thE.set( a[ 0 ], a[ 1 ], a[ 2 ] ); + this.setBasisFromThreeQuaternion( t, thQ.setFromEuler( thE ) ); + + this.freeThreeEuler( thE ); + this.freeThreeQuaternion( thQ ); + + } + + setBasisFromThreeQuaternion( t, a ) { + + var q = this.allocQuaternion(); + + q.setX( a.x ); + q.setY( a.y ); + q.setZ( a.z ); + q.setW( a.w ); + this.setBasis( t, q ); + + this.freeQuaternion( q ); + + } + + multiplyTransforms( t1, t2 ) { + + var t = this.allocTransform(); + this.setIdentity( t ); + + var m1 = this.getBasisAsMatrix3( t1 ); + var m2 = this.getBasisAsMatrix3( t2 ); + + var o1 = this.getOrigin( t1 ); + var o2 = this.getOrigin( t2 ); + + var v1 = this.multiplyMatrix3ByVector3( m1, o2 ); + var v2 = this.addVector3( v1, o1 ); + this.setOrigin( t, v2 ); + + var m3 = this.multiplyMatrices3( m1, m2 ); + this.setBasisFromMatrix3( t, m3 ); + + this.freeVector3( v1 ); + this.freeVector3( v2 ); + + return t; + + } + + inverseTransform( t ) { + + var t2 = this.allocTransform(); + + var m1 = this.getBasisAsMatrix3( t ); + var o = this.getOrigin( t ); + + var m2 = this.transposeMatrix3( m1 ); + var v1 = this.negativeVector3( o ); + var v2 = this.multiplyMatrix3ByVector3( m2, v1 ); + + this.setOrigin( t2, v2 ); + this.setBasisFromMatrix3( t2, m2 ); + + this.freeVector3( v1 ); + this.freeVector3( v2 ); + + return t2; + + } + + multiplyMatrices3( m1, m2 ) { + + var m3 = []; + + var v10 = this.rowOfMatrix3( m1, 0 ); + var v11 = this.rowOfMatrix3( m1, 1 ); + var v12 = this.rowOfMatrix3( m1, 2 ); + + var v20 = this.columnOfMatrix3( m2, 0 ); + var v21 = this.columnOfMatrix3( m2, 1 ); + var v22 = this.columnOfMatrix3( m2, 2 ); + + m3[ 0 ] = this.dotVectors3( v10, v20 ); + m3[ 1 ] = this.dotVectors3( v10, v21 ); + m3[ 2 ] = this.dotVectors3( v10, v22 ); + m3[ 3 ] = this.dotVectors3( v11, v20 ); + m3[ 4 ] = this.dotVectors3( v11, v21 ); + m3[ 5 ] = this.dotVectors3( v11, v22 ); + m3[ 6 ] = this.dotVectors3( v12, v20 ); + m3[ 7 ] = this.dotVectors3( v12, v21 ); + m3[ 8 ] = this.dotVectors3( v12, v22 ); + + this.freeVector3( v10 ); + this.freeVector3( v11 ); + this.freeVector3( v12 ); + this.freeVector3( v20 ); + this.freeVector3( v21 ); + this.freeVector3( v22 ); + + return m3; + + } + + addVector3( v1, v2 ) { + + var v = this.allocVector3(); + v.setValue( v1.x() + v2.x(), v1.y() + v2.y(), v1.z() + v2.z() ); + return v; + + } + + dotVectors3( v1, v2 ) { + + return v1.x() * v2.x() + v1.y() * v2.y() + v1.z() * v2.z(); + + } + + rowOfMatrix3( m, i ) { + + var v = this.allocVector3(); + v.setValue( m[ i * 3 + 0 ], m[ i * 3 + 1 ], m[ i * 3 + 2 ] ); + return v; + + } + + columnOfMatrix3( m, i ) { + + var v = this.allocVector3(); + v.setValue( m[ i + 0 ], m[ i + 3 ], m[ i + 6 ] ); + return v; + + } + + negativeVector3( v ) { + + var v2 = this.allocVector3(); + v2.setValue( - v.x(), - v.y(), - v.z() ); + return v2; + + } + + multiplyMatrix3ByVector3( m, v ) { + + var v4 = this.allocVector3(); + + var v0 = this.rowOfMatrix3( m, 0 ); + var v1 = this.rowOfMatrix3( m, 1 ); + var v2 = this.rowOfMatrix3( m, 2 ); + var x = this.dotVectors3( v0, v ); + var y = this.dotVectors3( v1, v ); + var z = this.dotVectors3( v2, v ); + + v4.setValue( x, y, z ); + + this.freeVector3( v0 ); + this.freeVector3( v1 ); + this.freeVector3( v2 ); + + return v4; + + } + + transposeMatrix3( m ) { + + var m2 = []; + m2[ 0 ] = m[ 0 ]; + m2[ 1 ] = m[ 3 ]; + m2[ 2 ] = m[ 6 ]; + m2[ 3 ] = m[ 1 ]; + m2[ 4 ] = m[ 4 ]; + m2[ 5 ] = m[ 7 ]; + m2[ 6 ] = m[ 2 ]; + m2[ 7 ] = m[ 5 ]; + m2[ 8 ] = m[ 8 ]; + return m2; + + } + + quaternionToMatrix3( q ) { + + var m = []; + + var x = q.x(); + var y = q.y(); + var z = q.z(); + var w = q.w(); + + var xx = x * x; + var yy = y * y; + var zz = z * z; + + var xy = x * y; + var yz = y * z; + var zx = z * x; + + var xw = x * w; + var yw = y * w; + var zw = z * w; + + m[ 0 ] = 1 - 2 * ( yy + zz ); + m[ 1 ] = 2 * ( xy - zw ); + m[ 2 ] = 2 * ( zx + yw ); + m[ 3 ] = 2 * ( xy + zw ); + m[ 4 ] = 1 - 2 * ( zz + xx ); + m[ 5 ] = 2 * ( yz - xw ); + m[ 6 ] = 2 * ( zx - yw ); + m[ 7 ] = 2 * ( yz + xw ); + m[ 8 ] = 1 - 2 * ( xx + yy ); + + return m; + + } + + matrix3ToQuaternion( m ) { + + var t = m[ 0 ] + m[ 4 ] + m[ 8 ]; + var s, x, y, z, w; + + if ( t > 0 ) { + + s = Math.sqrt( t + 1.0 ) * 2; + w = 0.25 * s; + x = ( m[ 7 ] - m[ 5 ] ) / s; + y = ( m[ 2 ] - m[ 6 ] ) / s; + z = ( m[ 3 ] - m[ 1 ] ) / s; + + } else if ( ( m[ 0 ] > m[ 4 ] ) && ( m[ 0 ] > m[ 8 ] ) ) { + + s = Math.sqrt( 1.0 + m[ 0 ] - m[ 4 ] - m[ 8 ] ) * 2; + w = ( m[ 7 ] - m[ 5 ] ) / s; + x = 0.25 * s; + y = ( m[ 1 ] + m[ 3 ] ) / s; + z = ( m[ 2 ] + m[ 6 ] ) / s; + + } else if ( m[ 4 ] > m[ 8 ] ) { + + s = Math.sqrt( 1.0 + m[ 4 ] - m[ 0 ] - m[ 8 ] ) * 2; + w = ( m[ 2 ] - m[ 6 ] ) / s; + x = ( m[ 1 ] + m[ 3 ] ) / s; + y = 0.25 * s; + z = ( m[ 5 ] + m[ 7 ] ) / s; + + } else { + + s = Math.sqrt( 1.0 + m[ 8 ] - m[ 0 ] - m[ 4 ] ) * 2; + w = ( m[ 3 ] - m[ 1 ] ) / s; + x = ( m[ 2 ] + m[ 6 ] ) / s; + y = ( m[ 5 ] + m[ 7 ] ) / s; + z = 0.25 * s; + + } + + var q = this.allocQuaternion(); + q.setX( x ); + q.setY( y ); + q.setZ( z ); + q.setW( w ); + return q; + + } + +} + +/** + * @param {THREE.SkinnedMesh} mesh + * @param {Ammo.btDiscreteDynamicsWorld} world + * @param {Object} params + * @param {ResourceManager} manager + */ +class RigidBody { + + constructor( mesh, world, params, manager ) { + + this.mesh = mesh; + this.world = world; + this.params = params; + this.manager = manager; + + this.body = null; + this.bone = null; + this.boneOffsetForm = null; + this.boneOffsetFormInverse = null; + + this._init(); + + } + + /** + * Resets rigid body transform to the current bone's. + * + * @return {RigidBody} + */ + reset() { + + this._setTransformFromBone(); + return this; + + } + + /** + * Updates rigid body's transform from the current bone. + * + * @return {RidigBody} + */ + updateFromBone() { + + if ( this.params.boneIndex !== - 1 && this.params.type === 0 ) { + + this._setTransformFromBone(); + + } + + return this; + + } + + /** + * Updates bone from the current ridid body's transform. + * + * @return {RidigBody} + */ + updateBone() { + + if ( this.params.type === 0 || this.params.boneIndex === - 1 ) { + + return this; + + } + + this._updateBoneRotation(); + + if ( this.params.type === 1 ) { + + this._updateBonePosition(); + + } + + this.bone.updateMatrixWorld( true ); + + if ( this.params.type === 2 ) { + + this._setPositionFromBone(); + + } + + return this; + + } + + // private methods + + _init() { + + function generateShape( p ) { + + switch ( p.shapeType ) { + + case 0: + return new Ammo.btSphereShape( p.width ); + + case 1: + return new Ammo.btBoxShape( new Ammo.btVector3( p.width, p.height, p.depth ) ); + + case 2: + return new Ammo.btCapsuleShape( p.width, p.height ); + + default: + throw new Error( 'unknown shape type ' + p.shapeType ); + + } + + } + + const manager = this.manager; + const params = this.params; + const bones = this.mesh.skeleton.bones; + const bone = ( params.boneIndex === - 1 ) + ? new Bone() + : bones[ params.boneIndex ]; + + const shape = generateShape( params ); + const weight = ( params.type === 0 ) ? 0 : params.weight; + const localInertia = manager.allocVector3(); + localInertia.setValue( 0, 0, 0 ); + + if ( weight !== 0 ) { + + shape.calculateLocalInertia( weight, localInertia ); + + } + + const boneOffsetForm = manager.allocTransform(); + manager.setIdentity( boneOffsetForm ); + manager.setOriginFromArray3( boneOffsetForm, params.position ); + manager.setBasisFromArray3( boneOffsetForm, params.rotation ); + + const vector = manager.allocThreeVector3(); + const boneForm = manager.allocTransform(); + manager.setIdentity( boneForm ); + manager.setOriginFromThreeVector3( boneForm, bone.getWorldPosition( vector ) ); + + const form = manager.multiplyTransforms( boneForm, boneOffsetForm ); + const state = new Ammo.btDefaultMotionState( form ); + + const info = new Ammo.btRigidBodyConstructionInfo( weight, state, shape, localInertia ); + info.set_m_friction( params.friction ); + info.set_m_restitution( params.restitution ); + + const body = new Ammo.btRigidBody( info ); + + if ( params.type === 0 ) { + + body.setCollisionFlags( body.getCollisionFlags() | 2 ); + + /* + * It'd be better to comment out this line though in general I should call this method + * because I'm not sure why but physics will be more like MMD's + * if I comment out. + */ + body.setActivationState( 4 ); + + } + + body.setDamping( params.positionDamping, params.rotationDamping ); + body.setSleepingThresholds( 0, 0 ); + + this.world.addRigidBody( body, 1 << params.groupIndex, params.groupTarget ); + + this.body = body; + this.bone = bone; + this.boneOffsetForm = boneOffsetForm; + this.boneOffsetFormInverse = manager.inverseTransform( boneOffsetForm ); + + manager.freeVector3( localInertia ); + manager.freeTransform( form ); + manager.freeTransform( boneForm ); + manager.freeThreeVector3( vector ); + + } + + _getBoneTransform() { + + const manager = this.manager; + const p = manager.allocThreeVector3(); + const q = manager.allocThreeQuaternion(); + const s = manager.allocThreeVector3(); + + this.bone.matrixWorld.decompose( p, q, s ); + + const tr = manager.allocTransform(); + manager.setOriginFromThreeVector3( tr, p ); + manager.setBasisFromThreeQuaternion( tr, q ); + + const form = manager.multiplyTransforms( tr, this.boneOffsetForm ); + + manager.freeTransform( tr ); + manager.freeThreeVector3( s ); + manager.freeThreeQuaternion( q ); + manager.freeThreeVector3( p ); + + return form; + + } + + _getWorldTransformForBone() { + + const manager = this.manager; + const tr = this.body.getCenterOfMassTransform(); + return manager.multiplyTransforms( tr, this.boneOffsetFormInverse ); + + } + + _setTransformFromBone() { + + const manager = this.manager; + const form = this._getBoneTransform(); + + // TODO: check the most appropriate way to set + //this.body.setWorldTransform( form ); + this.body.setCenterOfMassTransform( form ); + this.body.getMotionState().setWorldTransform( form ); + + manager.freeTransform( form ); + + } + + _setPositionFromBone() { + + const manager = this.manager; + const form = this._getBoneTransform(); + + const tr = manager.allocTransform(); + this.body.getMotionState().getWorldTransform( tr ); + manager.copyOrigin( tr, form ); + + // TODO: check the most appropriate way to set + //this.body.setWorldTransform( tr ); + this.body.setCenterOfMassTransform( tr ); + this.body.getMotionState().setWorldTransform( tr ); + + manager.freeTransform( tr ); + manager.freeTransform( form ); + + } + + _updateBoneRotation() { + + const manager = this.manager; + + const tr = this._getWorldTransformForBone(); + const q = manager.getBasis( tr ); + + const thQ = manager.allocThreeQuaternion(); + const thQ2 = manager.allocThreeQuaternion(); + const thQ3 = manager.allocThreeQuaternion(); + + thQ.set( q.x(), q.y(), q.z(), q.w() ); + thQ2.setFromRotationMatrix( this.bone.matrixWorld ); + thQ2.conjugate(); + thQ2.multiply( thQ ); + + //this.bone.quaternion.multiply( thQ2 ); + + thQ3.setFromRotationMatrix( this.bone.matrix ); + + // Renormalizing quaternion here because repeatedly transforming + // quaternion continuously accumulates floating point error and + // can end up being overflow. See #15335 + this.bone.quaternion.copy( thQ2.multiply( thQ3 ).normalize() ); + + manager.freeThreeQuaternion( thQ ); + manager.freeThreeQuaternion( thQ2 ); + manager.freeThreeQuaternion( thQ3 ); + + manager.freeQuaternion( q ); + manager.freeTransform( tr ); + + } + + _updateBonePosition() { + + const manager = this.manager; + + const tr = this._getWorldTransformForBone(); + + const thV = manager.allocThreeVector3(); + + const o = manager.getOrigin( tr ); + thV.set( o.x(), o.y(), o.z() ); + + if ( this.bone.parent ) { + + this.bone.parent.worldToLocal( thV ); + + } + + this.bone.position.copy( thV ); + + manager.freeThreeVector3( thV ); + + manager.freeTransform( tr ); + + } + +} + +// + +class Constraint { + + /** + * @param {THREE.SkinnedMesh} mesh + * @param {Ammo.btDiscreteDynamicsWorld} world + * @param {RigidBody} bodyA + * @param {RigidBody} bodyB + * @param {Object} params + * @param {ResourceManager} manager + */ + constructor( mesh, world, bodyA, bodyB, params, manager ) { + + this.mesh = mesh; + this.world = world; + this.bodyA = bodyA; + this.bodyB = bodyB; + this.params = params; + this.manager = manager; + + this.constraint = null; + + this._init(); + + } + + // private method + + _init() { + + const manager = this.manager; + const params = this.params; + const bodyA = this.bodyA; + const bodyB = this.bodyB; + + const form = manager.allocTransform(); + manager.setIdentity( form ); + manager.setOriginFromArray3( form, params.position ); + manager.setBasisFromArray3( form, params.rotation ); + + const formA = manager.allocTransform(); + const formB = manager.allocTransform(); + + bodyA.body.getMotionState().getWorldTransform( formA ); + bodyB.body.getMotionState().getWorldTransform( formB ); + + const formInverseA = manager.inverseTransform( formA ); + const formInverseB = manager.inverseTransform( formB ); + + const formA2 = manager.multiplyTransforms( formInverseA, form ); + const formB2 = manager.multiplyTransforms( formInverseB, form ); + + const constraint = new Ammo.btGeneric6DofSpringConstraint( bodyA.body, bodyB.body, formA2, formB2, true ); + + const lll = manager.allocVector3(); + const lul = manager.allocVector3(); + const all = manager.allocVector3(); + const aul = manager.allocVector3(); + + lll.setValue( params.translationLimitation1[ 0 ], + params.translationLimitation1[ 1 ], + params.translationLimitation1[ 2 ] ); + lul.setValue( params.translationLimitation2[ 0 ], + params.translationLimitation2[ 1 ], + params.translationLimitation2[ 2 ] ); + all.setValue( params.rotationLimitation1[ 0 ], + params.rotationLimitation1[ 1 ], + params.rotationLimitation1[ 2 ] ); + aul.setValue( params.rotationLimitation2[ 0 ], + params.rotationLimitation2[ 1 ], + params.rotationLimitation2[ 2 ] ); + + constraint.setLinearLowerLimit( lll ); + constraint.setLinearUpperLimit( lul ); + constraint.setAngularLowerLimit( all ); + constraint.setAngularUpperLimit( aul ); + + for ( let i = 0; i < 3; i ++ ) { + + if ( params.springPosition[ i ] !== 0 ) { + + constraint.enableSpring( i, true ); + constraint.setStiffness( i, params.springPosition[ i ] ); + + } + + } + + for ( let i = 0; i < 3; i ++ ) { + + if ( params.springRotation[ i ] !== 0 ) { + + constraint.enableSpring( i + 3, true ); + constraint.setStiffness( i + 3, params.springRotation[ i ] ); + + } + + } + + /* + * Currently(10/31/2016) official ammo.js doesn't support + * btGeneric6DofSpringConstraint.setParam method. + * You need custom ammo.js (add the method into idl) if you wanna use. + * By setting this parameter, physics will be more like MMD's + */ + if ( constraint.setParam !== undefined ) { + + for ( let i = 0; i < 6; i ++ ) { + + constraint.setParam( 2, 0.475, i ); + + } + + } + + this.world.addConstraint( constraint, true ); + this.constraint = constraint; + + manager.freeTransform( form ); + manager.freeTransform( formA ); + manager.freeTransform( formB ); + manager.freeTransform( formInverseA ); + manager.freeTransform( formInverseB ); + manager.freeTransform( formA2 ); + manager.freeTransform( formB2 ); + manager.freeVector3( lll ); + manager.freeVector3( lul ); + manager.freeVector3( all ); + manager.freeVector3( aul ); + + } + +} + +// + +const _position = new Vector3(); +const _quaternion = new Quaternion(); +const _scale = new Vector3(); +const _matrixWorldInv = new Matrix4(); + +class MMDPhysicsHelper extends Object3D { + + /** + * Visualize Rigid bodies + * + * @param {THREE.SkinnedMesh} mesh + * @param {Physics} physics + */ + constructor( mesh, physics ) { + + super(); + + this.root = mesh; + this.physics = physics; + + this.matrix.copy( mesh.matrixWorld ); + this.matrixAutoUpdate = false; + + this.materials = []; + + this.materials.push( + new MeshBasicMaterial( { + color: new Color( 0xff8888 ), + wireframe: true, + depthTest: false, + depthWrite: false, + opacity: 0.25, + transparent: true + } ) + ); + + this.materials.push( + new MeshBasicMaterial( { + color: new Color( 0x88ff88 ), + wireframe: true, + depthTest: false, + depthWrite: false, + opacity: 0.25, + transparent: true + } ) + ); + + this.materials.push( + new MeshBasicMaterial( { + color: new Color( 0x8888ff ), + wireframe: true, + depthTest: false, + depthWrite: false, + opacity: 0.25, + transparent: true + } ) + ); + + this._init(); + + } + + + /** + * Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app. + */ + dispose() { + + const materials = this.materials; + const children = this.children; + + for ( let i = 0; i < materials.length; i ++ ) { + + materials[ i ].dispose(); + + } + + for ( let i = 0; i < children.length; i ++ ) { + + const child = children[ i ]; + + if ( child.isMesh ) child.geometry.dispose(); + + } + + } + + /** + * Updates Rigid Bodies visualization. + */ + updateMatrixWorld( force ) { + + var mesh = this.root; + + if ( this.visible ) { + + var bodies = this.physics.bodies; + + _matrixWorldInv + .copy( mesh.matrixWorld ) + .decompose( _position, _quaternion, _scale ) + .compose( _position, _quaternion, _scale.set( 1, 1, 1 ) ) + .invert(); + + for ( var i = 0, il = bodies.length; i < il; i ++ ) { + + var body = bodies[ i ].body; + var child = this.children[ i ]; + + var tr = body.getCenterOfMassTransform(); + var origin = tr.getOrigin(); + var rotation = tr.getRotation(); + + child.position + .set( origin.x(), origin.y(), origin.z() ) + .applyMatrix4( _matrixWorldInv ); + + child.quaternion + .setFromRotationMatrix( _matrixWorldInv ) + .multiply( + _quaternion.set( rotation.x(), rotation.y(), rotation.z(), rotation.w() ) + ); + + } + + } + + this.matrix + .copy( mesh.matrixWorld ) + .decompose( _position, _quaternion, _scale ) + .compose( _position, _quaternion, _scale.set( 1, 1, 1 ) ); + + super.updateMatrixWorld( force ); + + } + + // private method + + _init() { + + var bodies = this.physics.bodies; + + function createGeometry( param ) { + + switch ( param.shapeType ) { + + case 0: + return new SphereGeometry( param.width, 16, 8 ); + + case 1: + return new BoxGeometry( param.width * 2, param.height * 2, param.depth * 2, 8, 8, 8 ); + + case 2: + return new CapsuleGeometry( param.width, param.height, 8, 16 ); + + default: + return null; + + } + + } + + for ( var i = 0, il = bodies.length; i < il; i ++ ) { + + var param = bodies[ i ].params; + this.add( new Mesh( createGeometry( param ), this.materials[ param.type ] ) ); + + } + + } + +} + +export { MMDPhysics }; diff --git a/node_modules/three/examples/jsm/cameras/CinematicCamera.js b/node_modules/three/examples/jsm/cameras/CinematicCamera.js new file mode 100644 index 0000000..bbfd6e0 --- /dev/null +++ b/node_modules/three/examples/jsm/cameras/CinematicCamera.js @@ -0,0 +1,208 @@ +import { + Mesh, + OrthographicCamera, + PerspectiveCamera, + PlaneGeometry, + Scene, + ShaderMaterial, + UniformsUtils, + WebGLRenderTarget +} from 'three'; + +import { BokehShader, BokehDepthShader } from '../shaders/BokehShader2.js'; + +class CinematicCamera extends PerspectiveCamera { + + constructor( fov, aspect, near, far ) { + + super( fov, aspect, near, far ); + + this.type = 'CinematicCamera'; + + this.postprocessing = { enabled: true }; + this.shaderSettings = { + rings: 3, + samples: 4 + }; + + const depthShader = BokehDepthShader; + + this.materialDepth = new ShaderMaterial( { + uniforms: depthShader.uniforms, + vertexShader: depthShader.vertexShader, + fragmentShader: depthShader.fragmentShader + } ); + + this.materialDepth.uniforms[ 'mNear' ].value = near; + this.materialDepth.uniforms[ 'mFar' ].value = far; + + // In case of cinematicCamera, having a default lens set is important + this.setLens(); + + this.initPostProcessing(); + + } + + // providing fnumber and coc(Circle of Confusion) as extra arguments + // In case of cinematicCamera, having a default lens set is important + // if fnumber and coc are not provided, cinematicCamera tries to act as a basic PerspectiveCamera + setLens( focalLength = 35, filmGauge = 35, fNumber = 8, coc = 0.019 ) { + + this.filmGauge = filmGauge; + + this.setFocalLength( focalLength ); + + this.fNumber = fNumber; + this.coc = coc; + + // fNumber is focalLength by aperture + this.aperture = focalLength / this.fNumber; + + // hyperFocal is required to calculate depthOfField when a lens tries to focus at a distance with given fNumber and focalLength + this.hyperFocal = ( focalLength * focalLength ) / ( this.aperture * this.coc ); + + } + + linearize( depth ) { + + const zfar = this.far; + const znear = this.near; + return - zfar * znear / ( depth * ( zfar - znear ) - zfar ); + + } + + smoothstep( near, far, depth ) { + + const x = this.saturate( ( depth - near ) / ( far - near ) ); + return x * x * ( 3 - 2 * x ); + + } + + saturate( x ) { + + return Math.max( 0, Math.min( 1, x ) ); + + } + + // function for focusing at a distance from the camera + focusAt( focusDistance = 20 ) { + + const focalLength = this.getFocalLength(); + + // distance from the camera (normal to frustrum) to focus on + this.focus = focusDistance; + + // the nearest point from the camera which is in focus (unused) + this.nearPoint = ( this.hyperFocal * this.focus ) / ( this.hyperFocal + ( this.focus - focalLength ) ); + + // the farthest point from the camera which is in focus (unused) + this.farPoint = ( this.hyperFocal * this.focus ) / ( this.hyperFocal - ( this.focus - focalLength ) ); + + // the gap or width of the space in which is everything is in focus (unused) + this.depthOfField = this.farPoint - this.nearPoint; + + // Considering minimum distance of focus for a standard lens (unused) + if ( this.depthOfField < 0 ) this.depthOfField = 0; + + this.sdistance = this.smoothstep( this.near, this.far, this.focus ); + + this.ldistance = this.linearize( 1 - this.sdistance ); + + this.postprocessing.bokeh_uniforms[ 'focalDepth' ].value = this.ldistance; + + } + + initPostProcessing() { + + if ( this.postprocessing.enabled ) { + + this.postprocessing.scene = new Scene(); + + this.postprocessing.camera = new OrthographicCamera( window.innerWidth / - 2, window.innerWidth / 2, window.innerHeight / 2, window.innerHeight / - 2, - 10000, 10000 ); + + this.postprocessing.scene.add( this.postprocessing.camera ); + + this.postprocessing.rtTextureDepth = new WebGLRenderTarget( window.innerWidth, window.innerHeight ); + this.postprocessing.rtTextureColor = new WebGLRenderTarget( window.innerWidth, window.innerHeight ); + + const bokeh_shader = BokehShader; + + this.postprocessing.bokeh_uniforms = UniformsUtils.clone( bokeh_shader.uniforms ); + + this.postprocessing.bokeh_uniforms[ 'tColor' ].value = this.postprocessing.rtTextureColor.texture; + this.postprocessing.bokeh_uniforms[ 'tDepth' ].value = this.postprocessing.rtTextureDepth.texture; + + this.postprocessing.bokeh_uniforms[ 'manualdof' ].value = 0; + this.postprocessing.bokeh_uniforms[ 'shaderFocus' ].value = 0; + + this.postprocessing.bokeh_uniforms[ 'fstop' ].value = 2.8; + + this.postprocessing.bokeh_uniforms[ 'showFocus' ].value = 1; + + this.postprocessing.bokeh_uniforms[ 'focalDepth' ].value = 0.1; + + //console.log( this.postprocessing.bokeh_uniforms[ "focalDepth" ].value ); + + this.postprocessing.bokeh_uniforms[ 'znear' ].value = this.near; + this.postprocessing.bokeh_uniforms[ 'zfar' ].value = this.near; + + + this.postprocessing.bokeh_uniforms[ 'textureWidth' ].value = window.innerWidth; + + this.postprocessing.bokeh_uniforms[ 'textureHeight' ].value = window.innerHeight; + + this.postprocessing.materialBokeh = new ShaderMaterial( { + uniforms: this.postprocessing.bokeh_uniforms, + vertexShader: bokeh_shader.vertexShader, + fragmentShader: bokeh_shader.fragmentShader, + defines: { + RINGS: this.shaderSettings.rings, + SAMPLES: this.shaderSettings.samples, + DEPTH_PACKING: 1 + } + } ); + + this.postprocessing.quad = new Mesh( new PlaneGeometry( window.innerWidth, window.innerHeight ), this.postprocessing.materialBokeh ); + this.postprocessing.quad.position.z = - 500; + this.postprocessing.scene.add( this.postprocessing.quad ); + + } + + } + + renderCinematic( scene, renderer ) { + + if ( this.postprocessing.enabled ) { + + const currentRenderTarget = renderer.getRenderTarget(); + + renderer.clear(); + + // Render scene into texture + + scene.overrideMaterial = null; + renderer.setRenderTarget( this.postprocessing.rtTextureColor ); + renderer.clear(); + renderer.render( scene, this ); + + // Render depth into texture + + scene.overrideMaterial = this.materialDepth; + renderer.setRenderTarget( this.postprocessing.rtTextureDepth ); + renderer.clear(); + renderer.render( scene, this ); + + // Render bokeh composite + + renderer.setRenderTarget( null ); + renderer.render( this.postprocessing.scene, this.postprocessing.camera ); + + renderer.setRenderTarget( currentRenderTarget ); + + } + + } + +} + +export { CinematicCamera }; diff --git a/node_modules/three/examples/jsm/capabilities/WebGL.js b/node_modules/three/examples/jsm/capabilities/WebGL.js new file mode 100644 index 0000000..2abf261 --- /dev/null +++ b/node_modules/three/examples/jsm/capabilities/WebGL.js @@ -0,0 +1,108 @@ +class WebGL { + + static isWebGLAvailable() { + + try { + + const canvas = document.createElement( 'canvas' ); + return !! ( window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ) ); + + } catch ( e ) { + + return false; + + } + + } + + static isWebGL2Available() { + + try { + + const canvas = document.createElement( 'canvas' ); + return !! ( window.WebGL2RenderingContext && canvas.getContext( 'webgl2' ) ); + + } catch ( e ) { + + return false; + + } + + } + + static isColorSpaceAvailable( colorSpace ) { + + try { + + const canvas = document.createElement( 'canvas' ); + const ctx = window.WebGL2RenderingContext && canvas.getContext( 'webgl2' ); + ctx.drawingBufferColorSpace = colorSpace; + return ctx.drawingBufferColorSpace === colorSpace; // deepscan-disable-line SAME_OPERAND_VALUE + + } catch ( e ) { + + return false; + + } + + } + + static getWebGLErrorMessage() { + + return this.getErrorMessage( 1 ); + + } + + static getWebGL2ErrorMessage() { + + return this.getErrorMessage( 2 ); + + } + + static getErrorMessage( version ) { + + const names = { + 1: 'WebGL', + 2: 'WebGL 2' + }; + + const contexts = { + 1: window.WebGLRenderingContext, + 2: window.WebGL2RenderingContext + }; + + let message = 'Your $0 does not seem to support $1'; + + const element = document.createElement( 'div' ); + element.id = 'webglmessage'; + element.style.fontFamily = 'monospace'; + element.style.fontSize = '13px'; + element.style.fontWeight = 'normal'; + element.style.textAlign = 'center'; + element.style.background = '#fff'; + element.style.color = '#000'; + element.style.padding = '1.5em'; + element.style.width = '400px'; + element.style.margin = '5em auto 0'; + + if ( contexts[ version ] ) { + + message = message.replace( '$0', 'graphics card' ); + + } else { + + message = message.replace( '$0', 'browser' ); + + } + + message = message.replace( '$1', names[ version ] ); + + element.innerHTML = message; + + return element; + + } + +} + +export default WebGL; diff --git a/node_modules/three/examples/jsm/capabilities/WebGPU.js b/node_modules/three/examples/jsm/capabilities/WebGPU.js new file mode 100644 index 0000000..53397f4 --- /dev/null +++ b/node_modules/three/examples/jsm/capabilities/WebGPU.js @@ -0,0 +1,57 @@ +if ( self.GPUShaderStage === undefined ) { + + self.GPUShaderStage = { VERTEX: 1, FRAGMENT: 2, COMPUTE: 4 }; + +} + +// statics + +let isAvailable = navigator.gpu !== undefined; + + +if ( typeof window !== 'undefined' && isAvailable ) { + + isAvailable = await navigator.gpu.requestAdapter(); + +} + +class WebGPU { + + static isAvailable() { + + return Boolean( isAvailable ); + + } + + static getStaticAdapter() { + + return isAvailable; + + } + + static getErrorMessage() { + + const message = 'Your browser does not support WebGPU yet'; + + const element = document.createElement( 'div' ); + element.id = 'webgpumessage'; + element.style.fontFamily = 'monospace'; + element.style.fontSize = '13px'; + element.style.fontWeight = 'normal'; + element.style.textAlign = 'center'; + element.style.background = '#fff'; + element.style.color = '#000'; + element.style.padding = '1.5em'; + element.style.maxWidth = '400px'; + element.style.margin = '5em auto 0'; + + element.innerHTML = message; + + return element; + + } + +} + + +export default WebGPU; diff --git a/node_modules/three/examples/jsm/controls/ArcballControls.js b/node_modules/three/examples/jsm/controls/ArcballControls.js new file mode 100644 index 0000000..b6b3696 --- /dev/null +++ b/node_modules/three/examples/jsm/controls/ArcballControls.js @@ -0,0 +1,3224 @@ +import { + GridHelper, + EllipseCurve, + BufferGeometry, + Line, + LineBasicMaterial, + Raycaster, + Group, + Box3, + Sphere, + Quaternion, + Vector2, + Vector3, + Matrix4, + MathUtils, + EventDispatcher +} from 'three'; + +//trackball state +const STATE = { + + IDLE: Symbol(), + ROTATE: Symbol(), + PAN: Symbol(), + SCALE: Symbol(), + FOV: Symbol(), + FOCUS: Symbol(), + ZROTATE: Symbol(), + TOUCH_MULTI: Symbol(), + ANIMATION_FOCUS: Symbol(), + ANIMATION_ROTATE: Symbol() + +}; + +const INPUT = { + + NONE: Symbol(), + ONE_FINGER: Symbol(), + ONE_FINGER_SWITCHED: Symbol(), + TWO_FINGER: Symbol(), + MULT_FINGER: Symbol(), + CURSOR: Symbol() + +}; + +//cursor center coordinates +const _center = { + + x: 0, + y: 0 + +}; + +//transformation matrices for gizmos and camera +const _transformation = { + + camera: new Matrix4(), + gizmos: new Matrix4() + +}; + +//events +const _changeEvent = { type: 'change' }; +const _startEvent = { type: 'start' }; +const _endEvent = { type: 'end' }; + +const _raycaster = new Raycaster(); +const _offset = new Vector3(); + +const _gizmoMatrixStateTemp = new Matrix4(); +const _cameraMatrixStateTemp = new Matrix4(); +const _scalePointTemp = new Vector3(); +/** + * + * @param {Camera} camera Virtual camera used in the scene + * @param {HTMLElement} domElement Renderer's dom element + * @param {Scene} scene The scene to be rendered + */ +class ArcballControls extends EventDispatcher { + + constructor( camera, domElement, scene = null ) { + + super(); + this.camera = null; + this.domElement = domElement; + this.scene = scene; + this.target = new Vector3(); + this._currentTarget = new Vector3(); + this.radiusFactor = 0.67; + + this.mouseActions = []; + this._mouseOp = null; + + + //global vectors and matrices that are used in some operations to avoid creating new objects every time (e.g. every time cursor moves) + this._v2_1 = new Vector2(); + this._v3_1 = new Vector3(); + this._v3_2 = new Vector3(); + + this._m4_1 = new Matrix4(); + this._m4_2 = new Matrix4(); + + this._quat = new Quaternion(); + + //transformation matrices + this._translationMatrix = new Matrix4(); //matrix for translation operation + this._rotationMatrix = new Matrix4(); //matrix for rotation operation + this._scaleMatrix = new Matrix4(); //matrix for scaling operation + + this._rotationAxis = new Vector3(); //axis for rotate operation + + + //camera state + this._cameraMatrixState = new Matrix4(); + this._cameraProjectionState = new Matrix4(); + + this._fovState = 1; + this._upState = new Vector3(); + this._zoomState = 1; + this._nearPos = 0; + this._farPos = 0; + + this._gizmoMatrixState = new Matrix4(); + + //initial values + this._up0 = new Vector3(); + this._zoom0 = 1; + this._fov0 = 0; + this._initialNear = 0; + this._nearPos0 = 0; + this._initialFar = 0; + this._farPos0 = 0; + this._cameraMatrixState0 = new Matrix4(); + this._gizmoMatrixState0 = new Matrix4(); + + //pointers array + this._button = - 1; + this._touchStart = []; + this._touchCurrent = []; + this._input = INPUT.NONE; + + //two fingers touch interaction + this._switchSensibility = 32; //minimum movement to be performed to fire single pan start after the second finger has been released + this._startFingerDistance = 0; //distance between two fingers + this._currentFingerDistance = 0; + this._startFingerRotation = 0; //amount of rotation performed with two fingers + this._currentFingerRotation = 0; + + //double tap + this._devPxRatio = 0; + this._downValid = true; + this._nclicks = 0; + this._downEvents = []; + this._downStart = 0; //pointerDown time + this._clickStart = 0; //first click time + this._maxDownTime = 250; + this._maxInterval = 300; + this._posThreshold = 24; + this._movementThreshold = 24; + + //cursor positions + this._currentCursorPosition = new Vector3(); + this._startCursorPosition = new Vector3(); + + //grid + this._grid = null; //grid to be visualized during pan operation + this._gridPosition = new Vector3(); + + //gizmos + this._gizmos = new Group(); + this._curvePts = 128; + + + //animations + this._timeStart = - 1; //initial time + this._animationId = - 1; + + //focus animation + this.focusAnimationTime = 500; //duration of focus animation in ms + + //rotate animation + this._timePrev = 0; //time at which previous rotate operation has been detected + this._timeCurrent = 0; //time at which current rotate operation has been detected + this._anglePrev = 0; //angle of previous rotation + this._angleCurrent = 0; //angle of current rotation + this._cursorPosPrev = new Vector3(); //cursor position when previous rotate operation has been detected + this._cursorPosCurr = new Vector3();//cursor position when current rotate operation has been detected + this._wPrev = 0; //angular velocity of the previous rotate operation + this._wCurr = 0; //angular velocity of the current rotate operation + + + //parameters + this.adjustNearFar = false; + this.scaleFactor = 1.1; //zoom/distance multiplier + this.dampingFactor = 25; + this.wMax = 20; //maximum angular velocity allowed + this.enableAnimations = true; //if animations should be performed + this.enableGrid = false; //if grid should be showed during pan operation + this.cursorZoom = false; //if wheel zoom should be cursor centered + this.minFov = 5; + this.maxFov = 90; + this.rotateSpeed = 1; + + this.enabled = true; + this.enablePan = true; + this.enableRotate = true; + this.enableZoom = true; + this.enableGizmos = true; + + this.minDistance = 0; + this.maxDistance = Infinity; + this.minZoom = 0; + this.maxZoom = Infinity; + + //trackball parameters + this._tbRadius = 1; + + //FSA + this._state = STATE.IDLE; + + this.setCamera( camera ); + + if ( this.scene != null ) { + + this.scene.add( this._gizmos ); + + } + + this.domElement.style.touchAction = 'none'; + this._devPxRatio = window.devicePixelRatio; + + this.initializeMouseActions(); + + this._onContextMenu = onContextMenu.bind( this ); + this._onWheel = onWheel.bind( this ); + this._onPointerUp = onPointerUp.bind( this ); + this._onPointerMove = onPointerMove.bind( this ); + this._onPointerDown = onPointerDown.bind( this ); + this._onPointerCancel = onPointerCancel.bind( this ); + this._onWindowResize = onWindowResize.bind( this ); + + this.domElement.addEventListener( 'contextmenu', this._onContextMenu ); + this.domElement.addEventListener( 'wheel', this._onWheel ); + this.domElement.addEventListener( 'pointerdown', this._onPointerDown ); + this.domElement.addEventListener( 'pointercancel', this._onPointerCancel ); + + window.addEventListener( 'resize', this._onWindowResize ); + + } + + onSinglePanStart( event, operation ) { + + if ( this.enabled ) { + + this.dispatchEvent( _startEvent ); + + this.setCenter( event.clientX, event.clientY ); + + switch ( operation ) { + + case 'PAN': + + if ( ! this.enablePan ) { + + return; + + } + + if ( this._animationId != - 1 ) { + + cancelAnimationFrame( this._animationId ); + this._animationId = - 1; + this._timeStart = - 1; + + this.activateGizmos( false ); + this.dispatchEvent( _changeEvent ); + + } + + this.updateTbState( STATE.PAN, true ); + this._startCursorPosition.copy( this.unprojectOnTbPlane( this.camera, _center.x, _center.y, this.domElement ) ); + if ( this.enableGrid ) { + + this.drawGrid(); + this.dispatchEvent( _changeEvent ); + + } + + break; + + case 'ROTATE': + + if ( ! this.enableRotate ) { + + return; + + } + + if ( this._animationId != - 1 ) { + + cancelAnimationFrame( this._animationId ); + this._animationId = - 1; + this._timeStart = - 1; + + } + + this.updateTbState( STATE.ROTATE, true ); + this._startCursorPosition.copy( this.unprojectOnTbSurface( this.camera, _center.x, _center.y, this.domElement, this._tbRadius ) ); + this.activateGizmos( true ); + if ( this.enableAnimations ) { + + this._timePrev = this._timeCurrent = performance.now(); + this._angleCurrent = this._anglePrev = 0; + this._cursorPosPrev.copy( this._startCursorPosition ); + this._cursorPosCurr.copy( this._cursorPosPrev ); + this._wCurr = 0; + this._wPrev = this._wCurr; + + } + + this.dispatchEvent( _changeEvent ); + break; + + case 'FOV': + + if ( ! this.camera.isPerspectiveCamera || ! this.enableZoom ) { + + return; + + } + + if ( this._animationId != - 1 ) { + + cancelAnimationFrame( this._animationId ); + this._animationId = - 1; + this._timeStart = - 1; + + this.activateGizmos( false ); + this.dispatchEvent( _changeEvent ); + + } + + this.updateTbState( STATE.FOV, true ); + this._startCursorPosition.setY( this.getCursorNDC( _center.x, _center.y, this.domElement ).y * 0.5 ); + this._currentCursorPosition.copy( this._startCursorPosition ); + break; + + case 'ZOOM': + + if ( ! this.enableZoom ) { + + return; + + } + + if ( this._animationId != - 1 ) { + + cancelAnimationFrame( this._animationId ); + this._animationId = - 1; + this._timeStart = - 1; + + this.activateGizmos( false ); + this.dispatchEvent( _changeEvent ); + + } + + this.updateTbState( STATE.SCALE, true ); + this._startCursorPosition.setY( this.getCursorNDC( _center.x, _center.y, this.domElement ).y * 0.5 ); + this._currentCursorPosition.copy( this._startCursorPosition ); + break; + + } + + } + + } + + onSinglePanMove( event, opState ) { + + if ( this.enabled ) { + + const restart = opState != this._state; + this.setCenter( event.clientX, event.clientY ); + + switch ( opState ) { + + case STATE.PAN: + + if ( this.enablePan ) { + + if ( restart ) { + + //switch to pan operation + + this.dispatchEvent( _endEvent ); + this.dispatchEvent( _startEvent ); + + this.updateTbState( opState, true ); + this._startCursorPosition.copy( this.unprojectOnTbPlane( this.camera, _center.x, _center.y, this.domElement ) ); + if ( this.enableGrid ) { + + this.drawGrid(); + + } + + this.activateGizmos( false ); + + } else { + + //continue with pan operation + this._currentCursorPosition.copy( this.unprojectOnTbPlane( this.camera, _center.x, _center.y, this.domElement ) ); + this.applyTransformMatrix( this.pan( this._startCursorPosition, this._currentCursorPosition ) ); + + } + + } + + break; + + case STATE.ROTATE: + + if ( this.enableRotate ) { + + if ( restart ) { + + //switch to rotate operation + + this.dispatchEvent( _endEvent ); + this.dispatchEvent( _startEvent ); + + this.updateTbState( opState, true ); + this._startCursorPosition.copy( this.unprojectOnTbSurface( this.camera, _center.x, _center.y, this.domElement, this._tbRadius ) ); + + if ( this.enableGrid ) { + + this.disposeGrid(); + + } + + this.activateGizmos( true ); + + } else { + + //continue with rotate operation + this._currentCursorPosition.copy( this.unprojectOnTbSurface( this.camera, _center.x, _center.y, this.domElement, this._tbRadius ) ); + + const distance = this._startCursorPosition.distanceTo( this._currentCursorPosition ); + const angle = this._startCursorPosition.angleTo( this._currentCursorPosition ); + const amount = Math.max( distance / this._tbRadius, angle ) * this.rotateSpeed; //effective rotation angle + + this.applyTransformMatrix( this.rotate( this.calculateRotationAxis( this._startCursorPosition, this._currentCursorPosition ), amount ) ); + + if ( this.enableAnimations ) { + + this._timePrev = this._timeCurrent; + this._timeCurrent = performance.now(); + this._anglePrev = this._angleCurrent; + this._angleCurrent = amount; + this._cursorPosPrev.copy( this._cursorPosCurr ); + this._cursorPosCurr.copy( this._currentCursorPosition ); + this._wPrev = this._wCurr; + this._wCurr = this.calculateAngularSpeed( this._anglePrev, this._angleCurrent, this._timePrev, this._timeCurrent ); + + } + + } + + } + + break; + + case STATE.SCALE: + + if ( this.enableZoom ) { + + if ( restart ) { + + //switch to zoom operation + + this.dispatchEvent( _endEvent ); + this.dispatchEvent( _startEvent ); + + this.updateTbState( opState, true ); + this._startCursorPosition.setY( this.getCursorNDC( _center.x, _center.y, this.domElement ).y * 0.5 ); + this._currentCursorPosition.copy( this._startCursorPosition ); + + if ( this.enableGrid ) { + + this.disposeGrid(); + + } + + this.activateGizmos( false ); + + } else { + + //continue with zoom operation + const screenNotches = 8; //how many wheel notches corresponds to a full screen pan + this._currentCursorPosition.setY( this.getCursorNDC( _center.x, _center.y, this.domElement ).y * 0.5 ); + + const movement = this._currentCursorPosition.y - this._startCursorPosition.y; + + let size = 1; + + if ( movement < 0 ) { + + size = 1 / ( Math.pow( this.scaleFactor, - movement * screenNotches ) ); + + } else if ( movement > 0 ) { + + size = Math.pow( this.scaleFactor, movement * screenNotches ); + + } + + this._v3_1.setFromMatrixPosition( this._gizmoMatrixState ); + + this.applyTransformMatrix( this.scale( size, this._v3_1 ) ); + + } + + } + + break; + + case STATE.FOV: + + if ( this.enableZoom && this.camera.isPerspectiveCamera ) { + + if ( restart ) { + + //switch to fov operation + + this.dispatchEvent( _endEvent ); + this.dispatchEvent( _startEvent ); + + this.updateTbState( opState, true ); + this._startCursorPosition.setY( this.getCursorNDC( _center.x, _center.y, this.domElement ).y * 0.5 ); + this._currentCursorPosition.copy( this._startCursorPosition ); + + if ( this.enableGrid ) { + + this.disposeGrid(); + + } + + this.activateGizmos( false ); + + } else { + + //continue with fov operation + const screenNotches = 8; //how many wheel notches corresponds to a full screen pan + this._currentCursorPosition.setY( this.getCursorNDC( _center.x, _center.y, this.domElement ).y * 0.5 ); + + const movement = this._currentCursorPosition.y - this._startCursorPosition.y; + + let size = 1; + + if ( movement < 0 ) { + + size = 1 / ( Math.pow( this.scaleFactor, - movement * screenNotches ) ); + + } else if ( movement > 0 ) { + + size = Math.pow( this.scaleFactor, movement * screenNotches ); + + } + + this._v3_1.setFromMatrixPosition( this._cameraMatrixState ); + const x = this._v3_1.distanceTo( this._gizmos.position ); + let xNew = x / size; //distance between camera and gizmos if scale(size, scalepoint) would be performed + + //check min and max distance + xNew = MathUtils.clamp( xNew, this.minDistance, this.maxDistance ); + + const y = x * Math.tan( MathUtils.DEG2RAD * this._fovState * 0.5 ); + + //calculate new fov + let newFov = MathUtils.RAD2DEG * ( Math.atan( y / xNew ) * 2 ); + + //check min and max fov + newFov = MathUtils.clamp( newFov, this.minFov, this.maxFov ); + + const newDistance = y / Math.tan( MathUtils.DEG2RAD * ( newFov / 2 ) ); + size = x / newDistance; + this._v3_2.setFromMatrixPosition( this._gizmoMatrixState ); + + this.setFov( newFov ); + this.applyTransformMatrix( this.scale( size, this._v3_2, false ) ); + + //adjusting distance + _offset.copy( this._gizmos.position ).sub( this.camera.position ).normalize().multiplyScalar( newDistance / x ); + this._m4_1.makeTranslation( _offset.x, _offset.y, _offset.z ); + + } + + } + + break; + + } + + this.dispatchEvent( _changeEvent ); + + } + + } + + onSinglePanEnd() { + + if ( this._state == STATE.ROTATE ) { + + + if ( ! this.enableRotate ) { + + return; + + } + + if ( this.enableAnimations ) { + + //perform rotation animation + const deltaTime = ( performance.now() - this._timeCurrent ); + if ( deltaTime < 120 ) { + + const w = Math.abs( ( this._wPrev + this._wCurr ) / 2 ); + + const self = this; + this._animationId = window.requestAnimationFrame( function ( t ) { + + self.updateTbState( STATE.ANIMATION_ROTATE, true ); + const rotationAxis = self.calculateRotationAxis( self._cursorPosPrev, self._cursorPosCurr ); + + self.onRotationAnim( t, rotationAxis, Math.min( w, self.wMax ) ); + + } ); + + } else { + + //cursor has been standing still for over 120 ms since last movement + this.updateTbState( STATE.IDLE, false ); + this.activateGizmos( false ); + this.dispatchEvent( _changeEvent ); + + } + + } else { + + this.updateTbState( STATE.IDLE, false ); + this.activateGizmos( false ); + this.dispatchEvent( _changeEvent ); + + } + + } else if ( this._state == STATE.PAN || this._state == STATE.IDLE ) { + + this.updateTbState( STATE.IDLE, false ); + + if ( this.enableGrid ) { + + this.disposeGrid(); + + } + + this.activateGizmos( false ); + this.dispatchEvent( _changeEvent ); + + + } + + this.dispatchEvent( _endEvent ); + + } + + onDoubleTap( event ) { + + if ( this.enabled && this.enablePan && this.scene != null ) { + + this.dispatchEvent( _startEvent ); + + this.setCenter( event.clientX, event.clientY ); + const hitP = this.unprojectOnObj( this.getCursorNDC( _center.x, _center.y, this.domElement ), this.camera ); + + if ( hitP != null && this.enableAnimations ) { + + const self = this; + if ( this._animationId != - 1 ) { + + window.cancelAnimationFrame( this._animationId ); + + } + + this._timeStart = - 1; + this._animationId = window.requestAnimationFrame( function ( t ) { + + self.updateTbState( STATE.ANIMATION_FOCUS, true ); + self.onFocusAnim( t, hitP, self._cameraMatrixState, self._gizmoMatrixState ); + + } ); + + } else if ( hitP != null && ! this.enableAnimations ) { + + this.updateTbState( STATE.FOCUS, true ); + this.focus( hitP, this.scaleFactor ); + this.updateTbState( STATE.IDLE, false ); + this.dispatchEvent( _changeEvent ); + + } + + } + + this.dispatchEvent( _endEvent ); + + } + + onDoublePanStart() { + + if ( this.enabled && this.enablePan ) { + + this.dispatchEvent( _startEvent ); + + this.updateTbState( STATE.PAN, true ); + + this.setCenter( ( this._touchCurrent[ 0 ].clientX + this._touchCurrent[ 1 ].clientX ) / 2, ( this._touchCurrent[ 0 ].clientY + this._touchCurrent[ 1 ].clientY ) / 2 ); + this._startCursorPosition.copy( this.unprojectOnTbPlane( this.camera, _center.x, _center.y, this.domElement, true ) ); + this._currentCursorPosition.copy( this._startCursorPosition ); + + this.activateGizmos( false ); + + } + + } + + onDoublePanMove() { + + if ( this.enabled && this.enablePan ) { + + this.setCenter( ( this._touchCurrent[ 0 ].clientX + this._touchCurrent[ 1 ].clientX ) / 2, ( this._touchCurrent[ 0 ].clientY + this._touchCurrent[ 1 ].clientY ) / 2 ); + + if ( this._state != STATE.PAN ) { + + this.updateTbState( STATE.PAN, true ); + this._startCursorPosition.copy( this._currentCursorPosition ); + + } + + this._currentCursorPosition.copy( this.unprojectOnTbPlane( this.camera, _center.x, _center.y, this.domElement, true ) ); + this.applyTransformMatrix( this.pan( this._startCursorPosition, this._currentCursorPosition, true ) ); + this.dispatchEvent( _changeEvent ); + + } + + } + + onDoublePanEnd() { + + this.updateTbState( STATE.IDLE, false ); + this.dispatchEvent( _endEvent ); + + } + + onRotateStart() { + + if ( this.enabled && this.enableRotate ) { + + this.dispatchEvent( _startEvent ); + + this.updateTbState( STATE.ZROTATE, true ); + + //this._startFingerRotation = event.rotation; + + this._startFingerRotation = this.getAngle( this._touchCurrent[ 1 ], this._touchCurrent[ 0 ] ) + this.getAngle( this._touchStart[ 1 ], this._touchStart[ 0 ] ); + this._currentFingerRotation = this._startFingerRotation; + + this.camera.getWorldDirection( this._rotationAxis ); //rotation axis + + if ( ! this.enablePan && ! this.enableZoom ) { + + this.activateGizmos( true ); + + } + + } + + } + + onRotateMove() { + + if ( this.enabled && this.enableRotate ) { + + this.setCenter( ( this._touchCurrent[ 0 ].clientX + this._touchCurrent[ 1 ].clientX ) / 2, ( this._touchCurrent[ 0 ].clientY + this._touchCurrent[ 1 ].clientY ) / 2 ); + let rotationPoint; + + if ( this._state != STATE.ZROTATE ) { + + this.updateTbState( STATE.ZROTATE, true ); + this._startFingerRotation = this._currentFingerRotation; + + } + + //this._currentFingerRotation = event.rotation; + this._currentFingerRotation = this.getAngle( this._touchCurrent[ 1 ], this._touchCurrent[ 0 ] ) + this.getAngle( this._touchStart[ 1 ], this._touchStart[ 0 ] ); + + if ( ! this.enablePan ) { + + rotationPoint = new Vector3().setFromMatrixPosition( this._gizmoMatrixState ); + + } else { + + this._v3_2.setFromMatrixPosition( this._gizmoMatrixState ); + rotationPoint = this.unprojectOnTbPlane( this.camera, _center.x, _center.y, this.domElement ).applyQuaternion( this.camera.quaternion ).multiplyScalar( 1 / this.camera.zoom ).add( this._v3_2 ); + + } + + const amount = MathUtils.DEG2RAD * ( this._startFingerRotation - this._currentFingerRotation ); + + this.applyTransformMatrix( this.zRotate( rotationPoint, amount ) ); + this.dispatchEvent( _changeEvent ); + + } + + } + + onRotateEnd() { + + this.updateTbState( STATE.IDLE, false ); + this.activateGizmos( false ); + this.dispatchEvent( _endEvent ); + + } + + onPinchStart() { + + if ( this.enabled && this.enableZoom ) { + + this.dispatchEvent( _startEvent ); + this.updateTbState( STATE.SCALE, true ); + + this._startFingerDistance = this.calculatePointersDistance( this._touchCurrent[ 0 ], this._touchCurrent[ 1 ] ); + this._currentFingerDistance = this._startFingerDistance; + + this.activateGizmos( false ); + + } + + } + + onPinchMove() { + + if ( this.enabled && this.enableZoom ) { + + this.setCenter( ( this._touchCurrent[ 0 ].clientX + this._touchCurrent[ 1 ].clientX ) / 2, ( this._touchCurrent[ 0 ].clientY + this._touchCurrent[ 1 ].clientY ) / 2 ); + const minDistance = 12; //minimum distance between fingers (in css pixels) + + if ( this._state != STATE.SCALE ) { + + this._startFingerDistance = this._currentFingerDistance; + this.updateTbState( STATE.SCALE, true ); + + } + + this._currentFingerDistance = Math.max( this.calculatePointersDistance( this._touchCurrent[ 0 ], this._touchCurrent[ 1 ] ), minDistance * this._devPxRatio ); + const amount = this._currentFingerDistance / this._startFingerDistance; + + let scalePoint; + + if ( ! this.enablePan ) { + + scalePoint = this._gizmos.position; + + } else { + + if ( this.camera.isOrthographicCamera ) { + + scalePoint = this.unprojectOnTbPlane( this.camera, _center.x, _center.y, this.domElement ) + .applyQuaternion( this.camera.quaternion ) + .multiplyScalar( 1 / this.camera.zoom ) + .add( this._gizmos.position ); + + } else if ( this.camera.isPerspectiveCamera ) { + + scalePoint = this.unprojectOnTbPlane( this.camera, _center.x, _center.y, this.domElement ) + .applyQuaternion( this.camera.quaternion ) + .add( this._gizmos.position ); + + } + + } + + this.applyTransformMatrix( this.scale( amount, scalePoint ) ); + this.dispatchEvent( _changeEvent ); + + } + + } + + onPinchEnd() { + + this.updateTbState( STATE.IDLE, false ); + this.dispatchEvent( _endEvent ); + + } + + onTriplePanStart() { + + if ( this.enabled && this.enableZoom ) { + + this.dispatchEvent( _startEvent ); + + this.updateTbState( STATE.SCALE, true ); + + //const center = event.center; + let clientX = 0; + let clientY = 0; + const nFingers = this._touchCurrent.length; + + for ( let i = 0; i < nFingers; i ++ ) { + + clientX += this._touchCurrent[ i ].clientX; + clientY += this._touchCurrent[ i ].clientY; + + } + + this.setCenter( clientX / nFingers, clientY / nFingers ); + + this._startCursorPosition.setY( this.getCursorNDC( _center.x, _center.y, this.domElement ).y * 0.5 ); + this._currentCursorPosition.copy( this._startCursorPosition ); + + } + + } + + onTriplePanMove() { + + if ( this.enabled && this.enableZoom ) { + + // fov / 2 + // |\ + // | \ + // | \ + // x | \ + // | \ + // | \ + // | _ _ _\ + // y + + //const center = event.center; + let clientX = 0; + let clientY = 0; + const nFingers = this._touchCurrent.length; + + for ( let i = 0; i < nFingers; i ++ ) { + + clientX += this._touchCurrent[ i ].clientX; + clientY += this._touchCurrent[ i ].clientY; + + } + + this.setCenter( clientX / nFingers, clientY / nFingers ); + + const screenNotches = 8; //how many wheel notches corresponds to a full screen pan + this._currentCursorPosition.setY( this.getCursorNDC( _center.x, _center.y, this.domElement ).y * 0.5 ); + + const movement = this._currentCursorPosition.y - this._startCursorPosition.y; + + let size = 1; + + if ( movement < 0 ) { + + size = 1 / ( Math.pow( this.scaleFactor, - movement * screenNotches ) ); + + } else if ( movement > 0 ) { + + size = Math.pow( this.scaleFactor, movement * screenNotches ); + + } + + this._v3_1.setFromMatrixPosition( this._cameraMatrixState ); + const x = this._v3_1.distanceTo( this._gizmos.position ); + let xNew = x / size; //distance between camera and gizmos if scale(size, scalepoint) would be performed + + //check min and max distance + xNew = MathUtils.clamp( xNew, this.minDistance, this.maxDistance ); + + const y = x * Math.tan( MathUtils.DEG2RAD * this._fovState * 0.5 ); + + //calculate new fov + let newFov = MathUtils.RAD2DEG * ( Math.atan( y / xNew ) * 2 ); + + //check min and max fov + newFov = MathUtils.clamp( newFov, this.minFov, this.maxFov ); + + const newDistance = y / Math.tan( MathUtils.DEG2RAD * ( newFov / 2 ) ); + size = x / newDistance; + this._v3_2.setFromMatrixPosition( this._gizmoMatrixState ); + + this.setFov( newFov ); + this.applyTransformMatrix( this.scale( size, this._v3_2, false ) ); + + //adjusting distance + _offset.copy( this._gizmos.position ).sub( this.camera.position ).normalize().multiplyScalar( newDistance / x ); + this._m4_1.makeTranslation( _offset.x, _offset.y, _offset.z ); + + this.dispatchEvent( _changeEvent ); + + } + + } + + onTriplePanEnd() { + + this.updateTbState( STATE.IDLE, false ); + this.dispatchEvent( _endEvent ); + //this.dispatchEvent( _changeEvent ); + + } + + /** + * Set _center's x/y coordinates + * @param {Number} clientX + * @param {Number} clientY + */ + setCenter( clientX, clientY ) { + + _center.x = clientX; + _center.y = clientY; + + } + + /** + * Set default mouse actions + */ + initializeMouseActions() { + + this.setMouseAction( 'PAN', 0, 'CTRL' ); + this.setMouseAction( 'PAN', 2 ); + + this.setMouseAction( 'ROTATE', 0 ); + + this.setMouseAction( 'ZOOM', 'WHEEL' ); + this.setMouseAction( 'ZOOM', 1 ); + + this.setMouseAction( 'FOV', 'WHEEL', 'SHIFT' ); + this.setMouseAction( 'FOV', 1, 'SHIFT' ); + + + } + + /** + * Compare two mouse actions + * @param {Object} action1 + * @param {Object} action2 + * @returns {Boolean} True if action1 and action 2 are the same mouse action, false otherwise + */ + compareMouseAction( action1, action2 ) { + + if ( action1.operation == action2.operation ) { + + if ( action1.mouse == action2.mouse && action1.key == action2.key ) { + + return true; + + } else { + + return false; + + } + + } else { + + return false; + + } + + } + + /** + * Set a new mouse action by specifying the operation to be performed and a mouse/key combination. In case of conflict, replaces the existing one + * @param {String} operation The operation to be performed ('PAN', 'ROTATE', 'ZOOM', 'FOV) + * @param {*} mouse A mouse button (0, 1, 2) or 'WHEEL' for wheel notches + * @param {*} key The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed + * @returns {Boolean} True if the mouse action has been successfully added, false otherwise + */ + setMouseAction( operation, mouse, key = null ) { + + const operationInput = [ 'PAN', 'ROTATE', 'ZOOM', 'FOV' ]; + const mouseInput = [ 0, 1, 2, 'WHEEL' ]; + const keyInput = [ 'CTRL', 'SHIFT', null ]; + let state; + + if ( ! operationInput.includes( operation ) || ! mouseInput.includes( mouse ) || ! keyInput.includes( key ) ) { + + //invalid parameters + return false; + + } + + if ( mouse == 'WHEEL' ) { + + if ( operation != 'ZOOM' && operation != 'FOV' ) { + + //cannot associate 2D operation to 1D input + return false; + + } + + } + + switch ( operation ) { + + case 'PAN': + + state = STATE.PAN; + break; + + case 'ROTATE': + + state = STATE.ROTATE; + break; + + case 'ZOOM': + + state = STATE.SCALE; + break; + + case 'FOV': + + state = STATE.FOV; + break; + + } + + const action = { + + operation: operation, + mouse: mouse, + key: key, + state: state + + }; + + for ( let i = 0; i < this.mouseActions.length; i ++ ) { + + if ( this.mouseActions[ i ].mouse == action.mouse && this.mouseActions[ i ].key == action.key ) { + + this.mouseActions.splice( i, 1, action ); + return true; + + } + + } + + this.mouseActions.push( action ); + return true; + + } + + /** + * Remove a mouse action by specifying its mouse/key combination + * @param {*} mouse A mouse button (0, 1, 2) or 'WHEEL' for wheel notches + * @param {*} key The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed + * @returns {Boolean} True if the operation has been succesfully removed, false otherwise + */ + unsetMouseAction( mouse, key = null ) { + + for ( let i = 0; i < this.mouseActions.length; i ++ ) { + + if ( this.mouseActions[ i ].mouse == mouse && this.mouseActions[ i ].key == key ) { + + this.mouseActions.splice( i, 1 ); + return true; + + } + + } + + return false; + + } + + /** + * Return the operation associated to a mouse/keyboard combination + * @param {*} mouse A mouse button (0, 1, 2) or 'WHEEL' for wheel notches + * @param {*} key The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed + * @returns The operation if it has been found, null otherwise + */ + getOpFromAction( mouse, key ) { + + let action; + + for ( let i = 0; i < this.mouseActions.length; i ++ ) { + + action = this.mouseActions[ i ]; + if ( action.mouse == mouse && action.key == key ) { + + return action.operation; + + } + + } + + if ( key != null ) { + + for ( let i = 0; i < this.mouseActions.length; i ++ ) { + + action = this.mouseActions[ i ]; + if ( action.mouse == mouse && action.key == null ) { + + return action.operation; + + } + + } + + } + + return null; + + } + + /** + * Get the operation associated to mouse and key combination and returns the corresponding FSA state + * @param {Number} mouse Mouse button + * @param {String} key Keyboard modifier + * @returns The FSA state obtained from the operation associated to mouse/keyboard combination + */ + getOpStateFromAction( mouse, key ) { + + let action; + + for ( let i = 0; i < this.mouseActions.length; i ++ ) { + + action = this.mouseActions[ i ]; + if ( action.mouse == mouse && action.key == key ) { + + return action.state; + + } + + } + + if ( key != null ) { + + for ( let i = 0; i < this.mouseActions.length; i ++ ) { + + action = this.mouseActions[ i ]; + if ( action.mouse == mouse && action.key == null ) { + + return action.state; + + } + + } + + } + + return null; + + } + + /** + * Calculate the angle between two pointers + * @param {PointerEvent} p1 + * @param {PointerEvent} p2 + * @returns {Number} The angle between two pointers in degrees + */ + getAngle( p1, p2 ) { + + return Math.atan2( p2.clientY - p1.clientY, p2.clientX - p1.clientX ) * 180 / Math.PI; + + } + + /** + * Update a PointerEvent inside current pointerevents array + * @param {PointerEvent} event + */ + updateTouchEvent( event ) { + + for ( let i = 0; i < this._touchCurrent.length; i ++ ) { + + if ( this._touchCurrent[ i ].pointerId == event.pointerId ) { + + this._touchCurrent.splice( i, 1, event ); + break; + + } + + } + + } + + /** + * Apply a transformation matrix, to the camera and gizmos + * @param {Object} transformation Object containing matrices to apply to camera and gizmos + */ + applyTransformMatrix( transformation ) { + + if ( transformation.camera != null ) { + + this._m4_1.copy( this._cameraMatrixState ).premultiply( transformation.camera ); + this._m4_1.decompose( this.camera.position, this.camera.quaternion, this.camera.scale ); + this.camera.updateMatrix(); + + //update camera up vector + if ( this._state == STATE.ROTATE || this._state == STATE.ZROTATE || this._state == STATE.ANIMATION_ROTATE ) { + + this.camera.up.copy( this._upState ).applyQuaternion( this.camera.quaternion ); + + } + + } + + if ( transformation.gizmos != null ) { + + this._m4_1.copy( this._gizmoMatrixState ).premultiply( transformation.gizmos ); + this._m4_1.decompose( this._gizmos.position, this._gizmos.quaternion, this._gizmos.scale ); + this._gizmos.updateMatrix(); + + } + + if ( this._state == STATE.SCALE || this._state == STATE.FOCUS || this._state == STATE.ANIMATION_FOCUS ) { + + this._tbRadius = this.calculateTbRadius( this.camera ); + + if ( this.adjustNearFar ) { + + const cameraDistance = this.camera.position.distanceTo( this._gizmos.position ); + + const bb = new Box3(); + bb.setFromObject( this._gizmos ); + const sphere = new Sphere(); + bb.getBoundingSphere( sphere ); + + const adjustedNearPosition = Math.max( this._nearPos0, sphere.radius + sphere.center.length() ); + const regularNearPosition = cameraDistance - this._initialNear; + + const minNearPos = Math.min( adjustedNearPosition, regularNearPosition ); + this.camera.near = cameraDistance - minNearPos; + + + const adjustedFarPosition = Math.min( this._farPos0, - sphere.radius + sphere.center.length() ); + const regularFarPosition = cameraDistance - this._initialFar; + + const minFarPos = Math.min( adjustedFarPosition, regularFarPosition ); + this.camera.far = cameraDistance - minFarPos; + + this.camera.updateProjectionMatrix(); + + } else { + + let update = false; + + if ( this.camera.near != this._initialNear ) { + + this.camera.near = this._initialNear; + update = true; + + } + + if ( this.camera.far != this._initialFar ) { + + this.camera.far = this._initialFar; + update = true; + + } + + if ( update ) { + + this.camera.updateProjectionMatrix(); + + } + + } + + } + + } + + /** + * Calculate the angular speed + * @param {Number} p0 Position at t0 + * @param {Number} p1 Position at t1 + * @param {Number} t0 Initial time in milliseconds + * @param {Number} t1 Ending time in milliseconds + */ + calculateAngularSpeed( p0, p1, t0, t1 ) { + + const s = p1 - p0; + const t = ( t1 - t0 ) / 1000; + if ( t == 0 ) { + + return 0; + + } + + return s / t; + + } + + /** + * Calculate the distance between two pointers + * @param {PointerEvent} p0 The first pointer + * @param {PointerEvent} p1 The second pointer + * @returns {number} The distance between the two pointers + */ + calculatePointersDistance( p0, p1 ) { + + return Math.sqrt( Math.pow( p1.clientX - p0.clientX, 2 ) + Math.pow( p1.clientY - p0.clientY, 2 ) ); + + } + + /** + * Calculate the rotation axis as the vector perpendicular between two vectors + * @param {Vector3} vec1 The first vector + * @param {Vector3} vec2 The second vector + * @returns {Vector3} The normalized rotation axis + */ + calculateRotationAxis( vec1, vec2 ) { + + this._rotationMatrix.extractRotation( this._cameraMatrixState ); + this._quat.setFromRotationMatrix( this._rotationMatrix ); + + this._rotationAxis.crossVectors( vec1, vec2 ).applyQuaternion( this._quat ); + return this._rotationAxis.normalize().clone(); + + } + + /** + * Calculate the trackball radius so that gizmo's diamater will be 2/3 of the minimum side of the camera frustum + * @param {Camera} camera + * @returns {Number} The trackball radius + */ + calculateTbRadius( camera ) { + + const distance = camera.position.distanceTo( this._gizmos.position ); + + if ( camera.type == 'PerspectiveCamera' ) { + + const halfFovV = MathUtils.DEG2RAD * camera.fov * 0.5; //vertical fov/2 in radians + const halfFovH = Math.atan( ( camera.aspect ) * Math.tan( halfFovV ) ); //horizontal fov/2 in radians + return Math.tan( Math.min( halfFovV, halfFovH ) ) * distance * this.radiusFactor; + + } else if ( camera.type == 'OrthographicCamera' ) { + + return Math.min( camera.top, camera.right ) * this.radiusFactor; + + } + + } + + /** + * Focus operation consist of positioning the point of interest in front of the camera and a slightly zoom in + * @param {Vector3} point The point of interest + * @param {Number} size Scale factor + * @param {Number} amount Amount of operation to be completed (used for focus animations, default is complete full operation) + */ + focus( point, size, amount = 1 ) { + + //move center of camera (along with gizmos) towards point of interest + _offset.copy( point ).sub( this._gizmos.position ).multiplyScalar( amount ); + this._translationMatrix.makeTranslation( _offset.x, _offset.y, _offset.z ); + + _gizmoMatrixStateTemp.copy( this._gizmoMatrixState ); + this._gizmoMatrixState.premultiply( this._translationMatrix ); + this._gizmoMatrixState.decompose( this._gizmos.position, this._gizmos.quaternion, this._gizmos.scale ); + + _cameraMatrixStateTemp.copy( this._cameraMatrixState ); + this._cameraMatrixState.premultiply( this._translationMatrix ); + this._cameraMatrixState.decompose( this.camera.position, this.camera.quaternion, this.camera.scale ); + + //apply zoom + if ( this.enableZoom ) { + + this.applyTransformMatrix( this.scale( size, this._gizmos.position ) ); + + } + + this._gizmoMatrixState.copy( _gizmoMatrixStateTemp ); + this._cameraMatrixState.copy( _cameraMatrixStateTemp ); + + } + + /** + * Draw a grid and add it to the scene + */ + drawGrid() { + + if ( this.scene != null ) { + + const color = 0x888888; + const multiplier = 3; + let size, divisions, maxLength, tick; + + if ( this.camera.isOrthographicCamera ) { + + const width = this.camera.right - this.camera.left; + const height = this.camera.bottom - this.camera.top; + + maxLength = Math.max( width, height ); + tick = maxLength / 20; + + size = maxLength / this.camera.zoom * multiplier; + divisions = size / tick * this.camera.zoom; + + } else if ( this.camera.isPerspectiveCamera ) { + + const distance = this.camera.position.distanceTo( this._gizmos.position ); + const halfFovV = MathUtils.DEG2RAD * this.camera.fov * 0.5; + const halfFovH = Math.atan( ( this.camera.aspect ) * Math.tan( halfFovV ) ); + + maxLength = Math.tan( Math.max( halfFovV, halfFovH ) ) * distance * 2; + tick = maxLength / 20; + + size = maxLength * multiplier; + divisions = size / tick; + + } + + if ( this._grid == null ) { + + this._grid = new GridHelper( size, divisions, color, color ); + this._grid.position.copy( this._gizmos.position ); + this._gridPosition.copy( this._grid.position ); + this._grid.quaternion.copy( this.camera.quaternion ); + this._grid.rotateX( Math.PI * 0.5 ); + + this.scene.add( this._grid ); + + } + + } + + } + + /** + * Remove all listeners, stop animations and clean scene + */ + dispose() { + + if ( this._animationId != - 1 ) { + + window.cancelAnimationFrame( this._animationId ); + + } + + this.domElement.removeEventListener( 'pointerdown', this._onPointerDown ); + this.domElement.removeEventListener( 'pointercancel', this._onPointerCancel ); + this.domElement.removeEventListener( 'wheel', this._onWheel ); + this.domElement.removeEventListener( 'contextmenu', this._onContextMenu ); + + window.removeEventListener( 'pointermove', this._onPointerMove ); + window.removeEventListener( 'pointerup', this._onPointerUp ); + + window.removeEventListener( 'resize', this._onWindowResize ); + + if ( this.scene !== null ) this.scene.remove( this._gizmos ); + this.disposeGrid(); + + } + + /** + * remove the grid from the scene + */ + disposeGrid() { + + if ( this._grid != null && this.scene != null ) { + + this.scene.remove( this._grid ); + this._grid = null; + + } + + } + + /** + * Compute the easing out cubic function for ease out effect in animation + * @param {Number} t The absolute progress of the animation in the bound of 0 (beginning of the) and 1 (ending of animation) + * @returns {Number} Result of easing out cubic at time t + */ + easeOutCubic( t ) { + + return 1 - Math.pow( 1 - t, 3 ); + + } + + /** + * Make rotation gizmos more or less visible + * @param {Boolean} isActive If true, make gizmos more visible + */ + activateGizmos( isActive ) { + + const gizmoX = this._gizmos.children[ 0 ]; + const gizmoY = this._gizmos.children[ 1 ]; + const gizmoZ = this._gizmos.children[ 2 ]; + + if ( isActive ) { + + gizmoX.material.setValues( { opacity: 1 } ); + gizmoY.material.setValues( { opacity: 1 } ); + gizmoZ.material.setValues( { opacity: 1 } ); + + } else { + + gizmoX.material.setValues( { opacity: 0.6 } ); + gizmoY.material.setValues( { opacity: 0.6 } ); + gizmoZ.material.setValues( { opacity: 0.6 } ); + + } + + } + + /** + * Calculate the cursor position in NDC + * @param {number} x Cursor horizontal coordinate within the canvas + * @param {number} y Cursor vertical coordinate within the canvas + * @param {HTMLElement} canvas The canvas where the renderer draws its output + * @returns {Vector2} Cursor normalized position inside the canvas + */ + getCursorNDC( cursorX, cursorY, canvas ) { + + const canvasRect = canvas.getBoundingClientRect(); + this._v2_1.setX( ( ( cursorX - canvasRect.left ) / canvasRect.width ) * 2 - 1 ); + this._v2_1.setY( ( ( canvasRect.bottom - cursorY ) / canvasRect.height ) * 2 - 1 ); + return this._v2_1.clone(); + + } + + /** + * Calculate the cursor position inside the canvas x/y coordinates with the origin being in the center of the canvas + * @param {Number} x Cursor horizontal coordinate within the canvas + * @param {Number} y Cursor vertical coordinate within the canvas + * @param {HTMLElement} canvas The canvas where the renderer draws its output + * @returns {Vector2} Cursor position inside the canvas + */ + getCursorPosition( cursorX, cursorY, canvas ) { + + this._v2_1.copy( this.getCursorNDC( cursorX, cursorY, canvas ) ); + this._v2_1.x *= ( this.camera.right - this.camera.left ) * 0.5; + this._v2_1.y *= ( this.camera.top - this.camera.bottom ) * 0.5; + return this._v2_1.clone(); + + } + + /** + * Set the camera to be controlled + * @param {Camera} camera The virtual camera to be controlled + */ + setCamera( camera ) { + + camera.lookAt( this.target ); + camera.updateMatrix(); + + //setting state + if ( camera.type == 'PerspectiveCamera' ) { + + this._fov0 = camera.fov; + this._fovState = camera.fov; + + } + + this._cameraMatrixState0.copy( camera.matrix ); + this._cameraMatrixState.copy( this._cameraMatrixState0 ); + this._cameraProjectionState.copy( camera.projectionMatrix ); + this._zoom0 = camera.zoom; + this._zoomState = this._zoom0; + + this._initialNear = camera.near; + this._nearPos0 = camera.position.distanceTo( this.target ) - camera.near; + this._nearPos = this._initialNear; + + this._initialFar = camera.far; + this._farPos0 = camera.position.distanceTo( this.target ) - camera.far; + this._farPos = this._initialFar; + + this._up0.copy( camera.up ); + this._upState.copy( camera.up ); + + this.camera = camera; + this.camera.updateProjectionMatrix(); + + //making gizmos + this._tbRadius = this.calculateTbRadius( camera ); + this.makeGizmos( this.target, this._tbRadius ); + + } + + /** + * Set gizmos visibility + * @param {Boolean} value Value of gizmos visibility + */ + setGizmosVisible( value ) { + + this._gizmos.visible = value; + this.dispatchEvent( _changeEvent ); + + } + + /** + * Set gizmos radius factor and redraws gizmos + * @param {Float} value Value of radius factor + */ + setTbRadius( value ) { + + this.radiusFactor = value; + this._tbRadius = this.calculateTbRadius( this.camera ); + + const curve = new EllipseCurve( 0, 0, this._tbRadius, this._tbRadius ); + const points = curve.getPoints( this._curvePts ); + const curveGeometry = new BufferGeometry().setFromPoints( points ); + + + for ( const gizmo in this._gizmos.children ) { + + this._gizmos.children[ gizmo ].geometry = curveGeometry; + + } + + this.dispatchEvent( _changeEvent ); + + } + + /** + * Creates the rotation gizmos matching trackball center and radius + * @param {Vector3} tbCenter The trackball center + * @param {number} tbRadius The trackball radius + */ + makeGizmos( tbCenter, tbRadius ) { + + const curve = new EllipseCurve( 0, 0, tbRadius, tbRadius ); + const points = curve.getPoints( this._curvePts ); + + //geometry + const curveGeometry = new BufferGeometry().setFromPoints( points ); + + //material + const curveMaterialX = new LineBasicMaterial( { color: 0xff8080, fog: false, transparent: true, opacity: 0.6 } ); + const curveMaterialY = new LineBasicMaterial( { color: 0x80ff80, fog: false, transparent: true, opacity: 0.6 } ); + const curveMaterialZ = new LineBasicMaterial( { color: 0x8080ff, fog: false, transparent: true, opacity: 0.6 } ); + + //line + const gizmoX = new Line( curveGeometry, curveMaterialX ); + const gizmoY = new Line( curveGeometry, curveMaterialY ); + const gizmoZ = new Line( curveGeometry, curveMaterialZ ); + + const rotation = Math.PI * 0.5; + gizmoX.rotation.x = rotation; + gizmoY.rotation.y = rotation; + + + //setting state + this._gizmoMatrixState0.identity().setPosition( tbCenter ); + this._gizmoMatrixState.copy( this._gizmoMatrixState0 ); + + if ( this.camera.zoom !== 1 ) { + + //adapt gizmos size to camera zoom + const size = 1 / this.camera.zoom; + this._scaleMatrix.makeScale( size, size, size ); + this._translationMatrix.makeTranslation( - tbCenter.x, - tbCenter.y, - tbCenter.z ); + + this._gizmoMatrixState.premultiply( this._translationMatrix ).premultiply( this._scaleMatrix ); + this._translationMatrix.makeTranslation( tbCenter.x, tbCenter.y, tbCenter.z ); + this._gizmoMatrixState.premultiply( this._translationMatrix ); + + } + + this._gizmoMatrixState.decompose( this._gizmos.position, this._gizmos.quaternion, this._gizmos.scale ); + + // + + this._gizmos.traverse( function ( object ) { + + if ( object.isLine ) { + + object.geometry.dispose(); + object.material.dispose(); + + } + + } ); + + this._gizmos.clear(); + + // + + this._gizmos.add( gizmoX ); + this._gizmos.add( gizmoY ); + this._gizmos.add( gizmoZ ); + + } + + /** + * Perform animation for focus operation + * @param {Number} time Instant in which this function is called as performance.now() + * @param {Vector3} point Point of interest for focus operation + * @param {Matrix4} cameraMatrix Camera matrix + * @param {Matrix4} gizmoMatrix Gizmos matrix + */ + onFocusAnim( time, point, cameraMatrix, gizmoMatrix ) { + + if ( this._timeStart == - 1 ) { + + //animation start + this._timeStart = time; + + } + + if ( this._state == STATE.ANIMATION_FOCUS ) { + + const deltaTime = time - this._timeStart; + const animTime = deltaTime / this.focusAnimationTime; + + this._gizmoMatrixState.copy( gizmoMatrix ); + + if ( animTime >= 1 ) { + + //animation end + + this._gizmoMatrixState.decompose( this._gizmos.position, this._gizmos.quaternion, this._gizmos.scale ); + + this.focus( point, this.scaleFactor ); + + this._timeStart = - 1; + this.updateTbState( STATE.IDLE, false ); + this.activateGizmos( false ); + + this.dispatchEvent( _changeEvent ); + + } else { + + const amount = this.easeOutCubic( animTime ); + const size = ( ( 1 - amount ) + ( this.scaleFactor * amount ) ); + + this._gizmoMatrixState.decompose( this._gizmos.position, this._gizmos.quaternion, this._gizmos.scale ); + this.focus( point, size, amount ); + + this.dispatchEvent( _changeEvent ); + const self = this; + this._animationId = window.requestAnimationFrame( function ( t ) { + + self.onFocusAnim( t, point, cameraMatrix, gizmoMatrix.clone() ); + + } ); + + } + + } else { + + //interrupt animation + + this._animationId = - 1; + this._timeStart = - 1; + + } + + } + + /** + * Perform animation for rotation operation + * @param {Number} time Instant in which this function is called as performance.now() + * @param {Vector3} rotationAxis Rotation axis + * @param {number} w0 Initial angular velocity + */ + onRotationAnim( time, rotationAxis, w0 ) { + + if ( this._timeStart == - 1 ) { + + //animation start + this._anglePrev = 0; + this._angleCurrent = 0; + this._timeStart = time; + + } + + if ( this._state == STATE.ANIMATION_ROTATE ) { + + //w = w0 + alpha * t + const deltaTime = ( time - this._timeStart ) / 1000; + const w = w0 + ( ( - this.dampingFactor ) * deltaTime ); + + if ( w > 0 ) { + + //tetha = 0.5 * alpha * t^2 + w0 * t + tetha0 + this._angleCurrent = 0.5 * ( - this.dampingFactor ) * Math.pow( deltaTime, 2 ) + w0 * deltaTime + 0; + this.applyTransformMatrix( this.rotate( rotationAxis, this._angleCurrent ) ); + this.dispatchEvent( _changeEvent ); + const self = this; + this._animationId = window.requestAnimationFrame( function ( t ) { + + self.onRotationAnim( t, rotationAxis, w0 ); + + } ); + + } else { + + this._animationId = - 1; + this._timeStart = - 1; + + this.updateTbState( STATE.IDLE, false ); + this.activateGizmos( false ); + + this.dispatchEvent( _changeEvent ); + + } + + } else { + + //interrupt animation + + this._animationId = - 1; + this._timeStart = - 1; + + if ( this._state != STATE.ROTATE ) { + + this.activateGizmos( false ); + this.dispatchEvent( _changeEvent ); + + } + + } + + } + + + /** + * Perform pan operation moving camera between two points + * @param {Vector3} p0 Initial point + * @param {Vector3} p1 Ending point + * @param {Boolean} adjust If movement should be adjusted considering camera distance (Perspective only) + */ + pan( p0, p1, adjust = false ) { + + const movement = p0.clone().sub( p1 ); + + if ( this.camera.isOrthographicCamera ) { + + //adjust movement amount + movement.multiplyScalar( 1 / this.camera.zoom ); + + } else if ( this.camera.isPerspectiveCamera && adjust ) { + + //adjust movement amount + this._v3_1.setFromMatrixPosition( this._cameraMatrixState0 ); //camera's initial position + this._v3_2.setFromMatrixPosition( this._gizmoMatrixState0 ); //gizmo's initial position + const distanceFactor = this._v3_1.distanceTo( this._v3_2 ) / this.camera.position.distanceTo( this._gizmos.position ); + movement.multiplyScalar( 1 / distanceFactor ); + + } + + this._v3_1.set( movement.x, movement.y, 0 ).applyQuaternion( this.camera.quaternion ); + + this._m4_1.makeTranslation( this._v3_1.x, this._v3_1.y, this._v3_1.z ); + + this.setTransformationMatrices( this._m4_1, this._m4_1 ); + return _transformation; + + } + + /** + * Reset trackball + */ + reset() { + + this.camera.zoom = this._zoom0; + + if ( this.camera.isPerspectiveCamera ) { + + this.camera.fov = this._fov0; + + } + + this.camera.near = this._nearPos; + this.camera.far = this._farPos; + this._cameraMatrixState.copy( this._cameraMatrixState0 ); + this._cameraMatrixState.decompose( this.camera.position, this.camera.quaternion, this.camera.scale ); + this.camera.up.copy( this._up0 ); + + this.camera.updateMatrix(); + this.camera.updateProjectionMatrix(); + + this._gizmoMatrixState.copy( this._gizmoMatrixState0 ); + this._gizmoMatrixState0.decompose( this._gizmos.position, this._gizmos.quaternion, this._gizmos.scale ); + this._gizmos.updateMatrix(); + + this._tbRadius = this.calculateTbRadius( this.camera ); + this.makeGizmos( this._gizmos.position, this._tbRadius ); + + this.camera.lookAt( this._gizmos.position ); + + this.updateTbState( STATE.IDLE, false ); + + this.dispatchEvent( _changeEvent ); + + } + + /** + * Rotate the camera around an axis passing by trackball's center + * @param {Vector3} axis Rotation axis + * @param {number} angle Angle in radians + * @returns {Object} Object with 'camera' field containing transformation matrix resulting from the operation to be applied to the camera + */ + rotate( axis, angle ) { + + const point = this._gizmos.position; //rotation center + this._translationMatrix.makeTranslation( - point.x, - point.y, - point.z ); + this._rotationMatrix.makeRotationAxis( axis, - angle ); + + //rotate camera + this._m4_1.makeTranslation( point.x, point.y, point.z ); + this._m4_1.multiply( this._rotationMatrix ); + this._m4_1.multiply( this._translationMatrix ); + + this.setTransformationMatrices( this._m4_1 ); + + return _transformation; + + } + + copyState() { + + let state; + if ( this.camera.isOrthographicCamera ) { + + state = JSON.stringify( { arcballState: { + + cameraFar: this.camera.far, + cameraMatrix: this.camera.matrix, + cameraNear: this.camera.near, + cameraUp: this.camera.up, + cameraZoom: this.camera.zoom, + gizmoMatrix: this._gizmos.matrix + + } } ); + + } else if ( this.camera.isPerspectiveCamera ) { + + state = JSON.stringify( { arcballState: { + cameraFar: this.camera.far, + cameraFov: this.camera.fov, + cameraMatrix: this.camera.matrix, + cameraNear: this.camera.near, + cameraUp: this.camera.up, + cameraZoom: this.camera.zoom, + gizmoMatrix: this._gizmos.matrix + + } } ); + + } + + navigator.clipboard.writeText( state ); + + } + + pasteState() { + + const self = this; + navigator.clipboard.readText().then( function resolved( value ) { + + self.setStateFromJSON( value ); + + } ); + + } + + /** + * Save the current state of the control. This can later be recover with .reset + */ + saveState() { + + this._cameraMatrixState0.copy( this.camera.matrix ); + this._gizmoMatrixState0.copy( this._gizmos.matrix ); + this._nearPos = this.camera.near; + this._farPos = this.camera.far; + this._zoom0 = this.camera.zoom; + this._up0.copy( this.camera.up ); + + if ( this.camera.isPerspectiveCamera ) { + + this._fov0 = this.camera.fov; + + } + + } + + /** + * Perform uniform scale operation around a given point + * @param {Number} size Scale factor + * @param {Vector3} point Point around which scale + * @param {Boolean} scaleGizmos If gizmos should be scaled (Perspective only) + * @returns {Object} Object with 'camera' and 'gizmo' fields containing transformation matrices resulting from the operation to be applied to the camera and gizmos + */ + scale( size, point, scaleGizmos = true ) { + + _scalePointTemp.copy( point ); + let sizeInverse = 1 / size; + + if ( this.camera.isOrthographicCamera ) { + + //camera zoom + this.camera.zoom = this._zoomState; + this.camera.zoom *= size; + + //check min and max zoom + if ( this.camera.zoom > this.maxZoom ) { + + this.camera.zoom = this.maxZoom; + sizeInverse = this._zoomState / this.maxZoom; + + } else if ( this.camera.zoom < this.minZoom ) { + + this.camera.zoom = this.minZoom; + sizeInverse = this._zoomState / this.minZoom; + + } + + this.camera.updateProjectionMatrix(); + + this._v3_1.setFromMatrixPosition( this._gizmoMatrixState ); //gizmos position + + //scale gizmos so they appear in the same spot having the same dimension + this._scaleMatrix.makeScale( sizeInverse, sizeInverse, sizeInverse ); + this._translationMatrix.makeTranslation( - this._v3_1.x, - this._v3_1.y, - this._v3_1.z ); + + this._m4_2.makeTranslation( this._v3_1.x, this._v3_1.y, this._v3_1.z ).multiply( this._scaleMatrix ); + this._m4_2.multiply( this._translationMatrix ); + + + //move camera and gizmos to obtain pinch effect + _scalePointTemp.sub( this._v3_1 ); + + const amount = _scalePointTemp.clone().multiplyScalar( sizeInverse ); + _scalePointTemp.sub( amount ); + + this._m4_1.makeTranslation( _scalePointTemp.x, _scalePointTemp.y, _scalePointTemp.z ); + this._m4_2.premultiply( this._m4_1 ); + + this.setTransformationMatrices( this._m4_1, this._m4_2 ); + return _transformation; + + } else if ( this.camera.isPerspectiveCamera ) { + + this._v3_1.setFromMatrixPosition( this._cameraMatrixState ); + this._v3_2.setFromMatrixPosition( this._gizmoMatrixState ); + + //move camera + let distance = this._v3_1.distanceTo( _scalePointTemp ); + let amount = distance - ( distance * sizeInverse ); + + //check min and max distance + const newDistance = distance - amount; + if ( newDistance < this.minDistance ) { + + sizeInverse = this.minDistance / distance; + amount = distance - ( distance * sizeInverse ); + + } else if ( newDistance > this.maxDistance ) { + + sizeInverse = this.maxDistance / distance; + amount = distance - ( distance * sizeInverse ); + + } + + _offset.copy( _scalePointTemp ).sub( this._v3_1 ).normalize().multiplyScalar( amount ); + + this._m4_1.makeTranslation( _offset.x, _offset.y, _offset.z ); + + + if ( scaleGizmos ) { + + //scale gizmos so they appear in the same spot having the same dimension + const pos = this._v3_2; + + distance = pos.distanceTo( _scalePointTemp ); + amount = distance - ( distance * sizeInverse ); + _offset.copy( _scalePointTemp ).sub( this._v3_2 ).normalize().multiplyScalar( amount ); + + this._translationMatrix.makeTranslation( pos.x, pos.y, pos.z ); + this._scaleMatrix.makeScale( sizeInverse, sizeInverse, sizeInverse ); + + this._m4_2.makeTranslation( _offset.x, _offset.y, _offset.z ).multiply( this._translationMatrix ); + this._m4_2.multiply( this._scaleMatrix ); + + this._translationMatrix.makeTranslation( - pos.x, - pos.y, - pos.z ); + + this._m4_2.multiply( this._translationMatrix ); + this.setTransformationMatrices( this._m4_1, this._m4_2 ); + + + } else { + + this.setTransformationMatrices( this._m4_1 ); + + } + + return _transformation; + + } + + } + + /** + * Set camera fov + * @param {Number} value fov to be setted + */ + setFov( value ) { + + if ( this.camera.isPerspectiveCamera ) { + + this.camera.fov = MathUtils.clamp( value, this.minFov, this.maxFov ); + this.camera.updateProjectionMatrix(); + + } + + } + + /** + * Set values in transformation object + * @param {Matrix4} camera Transformation to be applied to the camera + * @param {Matrix4} gizmos Transformation to be applied to gizmos + */ + setTransformationMatrices( camera = null, gizmos = null ) { + + if ( camera != null ) { + + if ( _transformation.camera != null ) { + + _transformation.camera.copy( camera ); + + } else { + + _transformation.camera = camera.clone(); + + } + + } else { + + _transformation.camera = null; + + } + + if ( gizmos != null ) { + + if ( _transformation.gizmos != null ) { + + _transformation.gizmos.copy( gizmos ); + + } else { + + _transformation.gizmos = gizmos.clone(); + + } + + } else { + + _transformation.gizmos = null; + + } + + } + + /** + * Rotate camera around its direction axis passing by a given point by a given angle + * @param {Vector3} point The point where the rotation axis is passing trough + * @param {Number} angle Angle in radians + * @returns The computed transormation matix + */ + zRotate( point, angle ) { + + this._rotationMatrix.makeRotationAxis( this._rotationAxis, angle ); + this._translationMatrix.makeTranslation( - point.x, - point.y, - point.z ); + + this._m4_1.makeTranslation( point.x, point.y, point.z ); + this._m4_1.multiply( this._rotationMatrix ); + this._m4_1.multiply( this._translationMatrix ); + + this._v3_1.setFromMatrixPosition( this._gizmoMatrixState ).sub( point ); //vector from rotation center to gizmos position + this._v3_2.copy( this._v3_1 ).applyAxisAngle( this._rotationAxis, angle ); //apply rotation + this._v3_2.sub( this._v3_1 ); + + this._m4_2.makeTranslation( this._v3_2.x, this._v3_2.y, this._v3_2.z ); + + this.setTransformationMatrices( this._m4_1, this._m4_2 ); + return _transformation; + + } + + + getRaycaster() { + + return _raycaster; + + } + + + /** + * Unproject the cursor on the 3D object surface + * @param {Vector2} cursor Cursor coordinates in NDC + * @param {Camera} camera Virtual camera + * @returns {Vector3} The point of intersection with the model, if exist, null otherwise + */ + unprojectOnObj( cursor, camera ) { + + const raycaster = this.getRaycaster(); + raycaster.near = camera.near; + raycaster.far = camera.far; + raycaster.setFromCamera( cursor, camera ); + + const intersect = raycaster.intersectObjects( this.scene.children, true ); + + for ( let i = 0; i < intersect.length; i ++ ) { + + if ( intersect[ i ].object.uuid != this._gizmos.uuid && intersect[ i ].face != null ) { + + return intersect[ i ].point.clone(); + + } + + } + + return null; + + } + + /** + * Unproject the cursor on the trackball surface + * @param {Camera} camera The virtual camera + * @param {Number} cursorX Cursor horizontal coordinate on screen + * @param {Number} cursorY Cursor vertical coordinate on screen + * @param {HTMLElement} canvas The canvas where the renderer draws its output + * @param {number} tbRadius The trackball radius + * @returns {Vector3} The unprojected point on the trackball surface + */ + unprojectOnTbSurface( camera, cursorX, cursorY, canvas, tbRadius ) { + + if ( camera.type == 'OrthographicCamera' ) { + + this._v2_1.copy( this.getCursorPosition( cursorX, cursorY, canvas ) ); + this._v3_1.set( this._v2_1.x, this._v2_1.y, 0 ); + + const x2 = Math.pow( this._v2_1.x, 2 ); + const y2 = Math.pow( this._v2_1.y, 2 ); + const r2 = Math.pow( this._tbRadius, 2 ); + + if ( x2 + y2 <= r2 * 0.5 ) { + + //intersection with sphere + this._v3_1.setZ( Math.sqrt( r2 - ( x2 + y2 ) ) ); + + } else { + + //intersection with hyperboloid + this._v3_1.setZ( ( r2 * 0.5 ) / ( Math.sqrt( x2 + y2 ) ) ); + + } + + return this._v3_1; + + } else if ( camera.type == 'PerspectiveCamera' ) { + + //unproject cursor on the near plane + this._v2_1.copy( this.getCursorNDC( cursorX, cursorY, canvas ) ); + + this._v3_1.set( this._v2_1.x, this._v2_1.y, - 1 ); + this._v3_1.applyMatrix4( camera.projectionMatrixInverse ); + + const rayDir = this._v3_1.clone().normalize(); //unprojected ray direction + const cameraGizmoDistance = camera.position.distanceTo( this._gizmos.position ); + const radius2 = Math.pow( tbRadius, 2 ); + + // camera + // |\ + // | \ + // | \ + // h | \ + // | \ + // | \ + // _ _ | _ _ _\ _ _ near plane + // l + + const h = this._v3_1.z; + const l = Math.sqrt( Math.pow( this._v3_1.x, 2 ) + Math.pow( this._v3_1.y, 2 ) ); + + if ( l == 0 ) { + + //ray aligned with camera + rayDir.set( this._v3_1.x, this._v3_1.y, tbRadius ); + return rayDir; + + } + + const m = h / l; + const q = cameraGizmoDistance; + + /* + * calculate intersection point between unprojected ray and trackball surface + *|y = m * x + q + *|x^2 + y^2 = r^2 + * + * (m^2 + 1) * x^2 + (2 * m * q) * x + q^2 - r^2 = 0 + */ + let a = Math.pow( m, 2 ) + 1; + let b = 2 * m * q; + let c = Math.pow( q, 2 ) - radius2; + let delta = Math.pow( b, 2 ) - ( 4 * a * c ); + + if ( delta >= 0 ) { + + //intersection with sphere + this._v2_1.setX( ( - b - Math.sqrt( delta ) ) / ( 2 * a ) ); + this._v2_1.setY( m * this._v2_1.x + q ); + + const angle = MathUtils.RAD2DEG * this._v2_1.angle(); + + if ( angle >= 45 ) { + + //if angle between intersection point and X' axis is >= 45°, return that point + //otherwise, calculate intersection point with hyperboloid + + const rayLength = Math.sqrt( Math.pow( this._v2_1.x, 2 ) + Math.pow( ( cameraGizmoDistance - this._v2_1.y ), 2 ) ); + rayDir.multiplyScalar( rayLength ); + rayDir.z += cameraGizmoDistance; + return rayDir; + + } + + } + + //intersection with hyperboloid + /* + *|y = m * x + q + *|y = (1 / x) * (r^2 / 2) + * + * m * x^2 + q * x - r^2 / 2 = 0 + */ + + a = m; + b = q; + c = - radius2 * 0.5; + delta = Math.pow( b, 2 ) - ( 4 * a * c ); + this._v2_1.setX( ( - b - Math.sqrt( delta ) ) / ( 2 * a ) ); + this._v2_1.setY( m * this._v2_1.x + q ); + + const rayLength = Math.sqrt( Math.pow( this._v2_1.x, 2 ) + Math.pow( ( cameraGizmoDistance - this._v2_1.y ), 2 ) ); + + rayDir.multiplyScalar( rayLength ); + rayDir.z += cameraGizmoDistance; + return rayDir; + + } + + } + + + /** + * Unproject the cursor on the plane passing through the center of the trackball orthogonal to the camera + * @param {Camera} camera The virtual camera + * @param {Number} cursorX Cursor horizontal coordinate on screen + * @param {Number} cursorY Cursor vertical coordinate on screen + * @param {HTMLElement} canvas The canvas where the renderer draws its output + * @param {Boolean} initialDistance If initial distance between camera and gizmos should be used for calculations instead of current (Perspective only) + * @returns {Vector3} The unprojected point on the trackball plane + */ + unprojectOnTbPlane( camera, cursorX, cursorY, canvas, initialDistance = false ) { + + if ( camera.type == 'OrthographicCamera' ) { + + this._v2_1.copy( this.getCursorPosition( cursorX, cursorY, canvas ) ); + this._v3_1.set( this._v2_1.x, this._v2_1.y, 0 ); + + return this._v3_1.clone(); + + } else if ( camera.type == 'PerspectiveCamera' ) { + + this._v2_1.copy( this.getCursorNDC( cursorX, cursorY, canvas ) ); + + //unproject cursor on the near plane + this._v3_1.set( this._v2_1.x, this._v2_1.y, - 1 ); + this._v3_1.applyMatrix4( camera.projectionMatrixInverse ); + + const rayDir = this._v3_1.clone().normalize(); //unprojected ray direction + + // camera + // |\ + // | \ + // | \ + // h | \ + // | \ + // | \ + // _ _ | _ _ _\ _ _ near plane + // l + + const h = this._v3_1.z; + const l = Math.sqrt( Math.pow( this._v3_1.x, 2 ) + Math.pow( this._v3_1.y, 2 ) ); + let cameraGizmoDistance; + + if ( initialDistance ) { + + cameraGizmoDistance = this._v3_1.setFromMatrixPosition( this._cameraMatrixState0 ).distanceTo( this._v3_2.setFromMatrixPosition( this._gizmoMatrixState0 ) ); + + } else { + + cameraGizmoDistance = camera.position.distanceTo( this._gizmos.position ); + + } + + /* + * calculate intersection point between unprojected ray and the plane + *|y = mx + q + *|y = 0 + * + * x = -q/m + */ + if ( l == 0 ) { + + //ray aligned with camera + rayDir.set( 0, 0, 0 ); + return rayDir; + + } + + const m = h / l; + const q = cameraGizmoDistance; + const x = - q / m; + + const rayLength = Math.sqrt( Math.pow( q, 2 ) + Math.pow( x, 2 ) ); + rayDir.multiplyScalar( rayLength ); + rayDir.z = 0; + return rayDir; + + } + + } + + /** + * Update camera and gizmos state + */ + updateMatrixState() { + + //update camera and gizmos state + this._cameraMatrixState.copy( this.camera.matrix ); + this._gizmoMatrixState.copy( this._gizmos.matrix ); + + if ( this.camera.isOrthographicCamera ) { + + this._cameraProjectionState.copy( this.camera.projectionMatrix ); + this.camera.updateProjectionMatrix(); + this._zoomState = this.camera.zoom; + + } else if ( this.camera.isPerspectiveCamera ) { + + this._fovState = this.camera.fov; + + } + + } + + /** + * Update the trackball FSA + * @param {STATE} newState New state of the FSA + * @param {Boolean} updateMatrices If matriices state should be updated + */ + updateTbState( newState, updateMatrices ) { + + this._state = newState; + if ( updateMatrices ) { + + this.updateMatrixState(); + + } + + } + + update() { + + const EPS = 0.000001; + + if ( this.target.equals( this._currentTarget ) === false ) { + + this._gizmos.position.copy( this.target ); //for correct radius calculation + this._tbRadius = this.calculateTbRadius( this.camera ); + this.makeGizmos( this.target, this._tbRadius ); + this._currentTarget.copy( this.target ); + + } + + //check min/max parameters + if ( this.camera.isOrthographicCamera ) { + + //check zoom + if ( this.camera.zoom > this.maxZoom || this.camera.zoom < this.minZoom ) { + + const newZoom = MathUtils.clamp( this.camera.zoom, this.minZoom, this.maxZoom ); + this.applyTransformMatrix( this.scale( newZoom / this.camera.zoom, this._gizmos.position, true ) ); + + } + + } else if ( this.camera.isPerspectiveCamera ) { + + //check distance + const distance = this.camera.position.distanceTo( this._gizmos.position ); + + if ( distance > this.maxDistance + EPS || distance < this.minDistance - EPS ) { + + const newDistance = MathUtils.clamp( distance, this.minDistance, this.maxDistance ); + this.applyTransformMatrix( this.scale( newDistance / distance, this._gizmos.position ) ); + this.updateMatrixState(); + + } + + //check fov + if ( this.camera.fov < this.minFov || this.camera.fov > this.maxFov ) { + + this.camera.fov = MathUtils.clamp( this.camera.fov, this.minFov, this.maxFov ); + this.camera.updateProjectionMatrix(); + + } + + const oldRadius = this._tbRadius; + this._tbRadius = this.calculateTbRadius( this.camera ); + + if ( oldRadius < this._tbRadius - EPS || oldRadius > this._tbRadius + EPS ) { + + const scale = ( this._gizmos.scale.x + this._gizmos.scale.y + this._gizmos.scale.z ) / 3; + const newRadius = this._tbRadius / scale; + const curve = new EllipseCurve( 0, 0, newRadius, newRadius ); + const points = curve.getPoints( this._curvePts ); + const curveGeometry = new BufferGeometry().setFromPoints( points ); + + for ( const gizmo in this._gizmos.children ) { + + this._gizmos.children[ gizmo ].geometry = curveGeometry; + + } + + } + + } + + this.camera.lookAt( this._gizmos.position ); + + } + + setStateFromJSON( json ) { + + const state = JSON.parse( json ); + + if ( state.arcballState != undefined ) { + + this._cameraMatrixState.fromArray( state.arcballState.cameraMatrix.elements ); + this._cameraMatrixState.decompose( this.camera.position, this.camera.quaternion, this.camera.scale ); + + this.camera.up.copy( state.arcballState.cameraUp ); + this.camera.near = state.arcballState.cameraNear; + this.camera.far = state.arcballState.cameraFar; + + this.camera.zoom = state.arcballState.cameraZoom; + + if ( this.camera.isPerspectiveCamera ) { + + this.camera.fov = state.arcballState.cameraFov; + + } + + this._gizmoMatrixState.fromArray( state.arcballState.gizmoMatrix.elements ); + this._gizmoMatrixState.decompose( this._gizmos.position, this._gizmos.quaternion, this._gizmos.scale ); + + this.camera.updateMatrix(); + this.camera.updateProjectionMatrix(); + + this._gizmos.updateMatrix(); + + this._tbRadius = this.calculateTbRadius( this.camera ); + const gizmoTmp = new Matrix4().copy( this._gizmoMatrixState0 ); + this.makeGizmos( this._gizmos.position, this._tbRadius ); + this._gizmoMatrixState0.copy( gizmoTmp ); + + this.camera.lookAt( this._gizmos.position ); + this.updateTbState( STATE.IDLE, false ); + + this.dispatchEvent( _changeEvent ); + + } + + } + +} + +//listeners + +function onWindowResize() { + + const scale = ( this._gizmos.scale.x + this._gizmos.scale.y + this._gizmos.scale.z ) / 3; + this._tbRadius = this.calculateTbRadius( this.camera ); + + const newRadius = this._tbRadius / scale; + const curve = new EllipseCurve( 0, 0, newRadius, newRadius ); + const points = curve.getPoints( this._curvePts ); + const curveGeometry = new BufferGeometry().setFromPoints( points ); + + + for ( const gizmo in this._gizmos.children ) { + + this._gizmos.children[ gizmo ].geometry = curveGeometry; + + } + + this.dispatchEvent( _changeEvent ); + +} + +function onContextMenu( event ) { + + if ( ! this.enabled ) { + + return; + + } + + for ( let i = 0; i < this.mouseActions.length; i ++ ) { + + if ( this.mouseActions[ i ].mouse == 2 ) { + + //prevent only if button 2 is actually used + event.preventDefault(); + break; + + } + + } + +} + +function onPointerCancel() { + + this._touchStart.splice( 0, this._touchStart.length ); + this._touchCurrent.splice( 0, this._touchCurrent.length ); + this._input = INPUT.NONE; + +} + +function onPointerDown( event ) { + + if ( event.button == 0 && event.isPrimary ) { + + this._downValid = true; + this._downEvents.push( event ); + this._downStart = performance.now(); + + } else { + + this._downValid = false; + + } + + if ( event.pointerType == 'touch' && this._input != INPUT.CURSOR ) { + + this._touchStart.push( event ); + this._touchCurrent.push( event ); + + switch ( this._input ) { + + case INPUT.NONE: + + //singleStart + this._input = INPUT.ONE_FINGER; + this.onSinglePanStart( event, 'ROTATE' ); + + window.addEventListener( 'pointermove', this._onPointerMove ); + window.addEventListener( 'pointerup', this._onPointerUp ); + + break; + + case INPUT.ONE_FINGER: + case INPUT.ONE_FINGER_SWITCHED: + + //doubleStart + this._input = INPUT.TWO_FINGER; + + this.onRotateStart(); + this.onPinchStart(); + this.onDoublePanStart(); + + break; + + case INPUT.TWO_FINGER: + + //multipleStart + this._input = INPUT.MULT_FINGER; + this.onTriplePanStart( event ); + break; + + } + + } else if ( event.pointerType != 'touch' && this._input == INPUT.NONE ) { + + let modifier = null; + + if ( event.ctrlKey || event.metaKey ) { + + modifier = 'CTRL'; + + } else if ( event.shiftKey ) { + + modifier = 'SHIFT'; + + } + + this._mouseOp = this.getOpFromAction( event.button, modifier ); + if ( this._mouseOp != null ) { + + window.addEventListener( 'pointermove', this._onPointerMove ); + window.addEventListener( 'pointerup', this._onPointerUp ); + + //singleStart + this._input = INPUT.CURSOR; + this._button = event.button; + this.onSinglePanStart( event, this._mouseOp ); + + } + + } + +} + +function onPointerMove( event ) { + + if ( event.pointerType == 'touch' && this._input != INPUT.CURSOR ) { + + switch ( this._input ) { + + case INPUT.ONE_FINGER: + + //singleMove + this.updateTouchEvent( event ); + + this.onSinglePanMove( event, STATE.ROTATE ); + break; + + case INPUT.ONE_FINGER_SWITCHED: + + const movement = this.calculatePointersDistance( this._touchCurrent[ 0 ], event ) * this._devPxRatio; + + if ( movement >= this._switchSensibility ) { + + //singleMove + this._input = INPUT.ONE_FINGER; + this.updateTouchEvent( event ); + + this.onSinglePanStart( event, 'ROTATE' ); + break; + + } + + break; + + case INPUT.TWO_FINGER: + + //rotate/pan/pinchMove + this.updateTouchEvent( event ); + + this.onRotateMove(); + this.onPinchMove(); + this.onDoublePanMove(); + + break; + + case INPUT.MULT_FINGER: + + //multMove + this.updateTouchEvent( event ); + + this.onTriplePanMove( event ); + break; + + } + + } else if ( event.pointerType != 'touch' && this._input == INPUT.CURSOR ) { + + let modifier = null; + + if ( event.ctrlKey || event.metaKey ) { + + modifier = 'CTRL'; + + } else if ( event.shiftKey ) { + + modifier = 'SHIFT'; + + } + + const mouseOpState = this.getOpStateFromAction( this._button, modifier ); + + if ( mouseOpState != null ) { + + this.onSinglePanMove( event, mouseOpState ); + + } + + } + + //checkDistance + if ( this._downValid ) { + + const movement = this.calculatePointersDistance( this._downEvents[ this._downEvents.length - 1 ], event ) * this._devPxRatio; + if ( movement > this._movementThreshold ) { + + this._downValid = false; + + } + + } + +} + +function onPointerUp( event ) { + + if ( event.pointerType == 'touch' && this._input != INPUT.CURSOR ) { + + const nTouch = this._touchCurrent.length; + + for ( let i = 0; i < nTouch; i ++ ) { + + if ( this._touchCurrent[ i ].pointerId == event.pointerId ) { + + this._touchCurrent.splice( i, 1 ); + this._touchStart.splice( i, 1 ); + break; + + } + + } + + switch ( this._input ) { + + case INPUT.ONE_FINGER: + case INPUT.ONE_FINGER_SWITCHED: + + //singleEnd + window.removeEventListener( 'pointermove', this._onPointerMove ); + window.removeEventListener( 'pointerup', this._onPointerUp ); + + this._input = INPUT.NONE; + this.onSinglePanEnd(); + + break; + + case INPUT.TWO_FINGER: + + //doubleEnd + this.onDoublePanEnd( event ); + this.onPinchEnd( event ); + this.onRotateEnd( event ); + + //switching to singleStart + this._input = INPUT.ONE_FINGER_SWITCHED; + + break; + + case INPUT.MULT_FINGER: + + if ( this._touchCurrent.length == 0 ) { + + window.removeEventListener( 'pointermove', this._onPointerMove ); + window.removeEventListener( 'pointerup', this._onPointerUp ); + + //multCancel + this._input = INPUT.NONE; + this.onTriplePanEnd(); + + } + + break; + + } + + } else if ( event.pointerType != 'touch' && this._input == INPUT.CURSOR ) { + + window.removeEventListener( 'pointermove', this._onPointerMove ); + window.removeEventListener( 'pointerup', this._onPointerUp ); + + this._input = INPUT.NONE; + this.onSinglePanEnd(); + this._button = - 1; + + } + + if ( event.isPrimary ) { + + if ( this._downValid ) { + + const downTime = event.timeStamp - this._downEvents[ this._downEvents.length - 1 ].timeStamp; + + if ( downTime <= this._maxDownTime ) { + + if ( this._nclicks == 0 ) { + + //first valid click detected + this._nclicks = 1; + this._clickStart = performance.now(); + + } else { + + const clickInterval = event.timeStamp - this._clickStart; + const movement = this.calculatePointersDistance( this._downEvents[ 1 ], this._downEvents[ 0 ] ) * this._devPxRatio; + + if ( clickInterval <= this._maxInterval && movement <= this._posThreshold ) { + + //second valid click detected + //fire double tap and reset values + this._nclicks = 0; + this._downEvents.splice( 0, this._downEvents.length ); + this.onDoubleTap( event ); + + } else { + + //new 'first click' + this._nclicks = 1; + this._downEvents.shift(); + this._clickStart = performance.now(); + + } + + } + + } else { + + this._downValid = false; + this._nclicks = 0; + this._downEvents.splice( 0, this._downEvents.length ); + + } + + } else { + + this._nclicks = 0; + this._downEvents.splice( 0, this._downEvents.length ); + + } + + } + +} + +function onWheel( event ) { + + if ( this.enabled && this.enableZoom ) { + + let modifier = null; + + if ( event.ctrlKey || event.metaKey ) { + + modifier = 'CTRL'; + + } else if ( event.shiftKey ) { + + modifier = 'SHIFT'; + + } + + const mouseOp = this.getOpFromAction( 'WHEEL', modifier ); + + if ( mouseOp != null ) { + + event.preventDefault(); + this.dispatchEvent( _startEvent ); + + const notchDeltaY = 125; //distance of one notch of mouse wheel + let sgn = event.deltaY / notchDeltaY; + + let size = 1; + + if ( sgn > 0 ) { + + size = 1 / this.scaleFactor; + + } else if ( sgn < 0 ) { + + size = this.scaleFactor; + + } + + switch ( mouseOp ) { + + case 'ZOOM': + + this.updateTbState( STATE.SCALE, true ); + + if ( sgn > 0 ) { + + size = 1 / ( Math.pow( this.scaleFactor, sgn ) ); + + } else if ( sgn < 0 ) { + + size = Math.pow( this.scaleFactor, - sgn ); + + } + + if ( this.cursorZoom && this.enablePan ) { + + let scalePoint; + + if ( this.camera.isOrthographicCamera ) { + + scalePoint = this.unprojectOnTbPlane( this.camera, event.clientX, event.clientY, this.domElement ).applyQuaternion( this.camera.quaternion ).multiplyScalar( 1 / this.camera.zoom ).add( this._gizmos.position ); + + } else if ( this.camera.isPerspectiveCamera ) { + + scalePoint = this.unprojectOnTbPlane( this.camera, event.clientX, event.clientY, this.domElement ).applyQuaternion( this.camera.quaternion ).add( this._gizmos.position ); + + } + + this.applyTransformMatrix( this.scale( size, scalePoint ) ); + + } else { + + this.applyTransformMatrix( this.scale( size, this._gizmos.position ) ); + + } + + if ( this._grid != null ) { + + this.disposeGrid(); + this.drawGrid(); + + } + + this.updateTbState( STATE.IDLE, false ); + + this.dispatchEvent( _changeEvent ); + this.dispatchEvent( _endEvent ); + + break; + + case 'FOV': + + if ( this.camera.isPerspectiveCamera ) { + + this.updateTbState( STATE.FOV, true ); + + + //Vertigo effect + + // fov / 2 + // |\ + // | \ + // | \ + // x | \ + // | \ + // | \ + // | _ _ _\ + // y + + //check for iOs shift shortcut + if ( event.deltaX != 0 ) { + + sgn = event.deltaX / notchDeltaY; + + size = 1; + + if ( sgn > 0 ) { + + size = 1 / ( Math.pow( this.scaleFactor, sgn ) ); + + } else if ( sgn < 0 ) { + + size = Math.pow( this.scaleFactor, - sgn ); + + } + + } + + this._v3_1.setFromMatrixPosition( this._cameraMatrixState ); + const x = this._v3_1.distanceTo( this._gizmos.position ); + let xNew = x / size; //distance between camera and gizmos if scale(size, scalepoint) would be performed + + //check min and max distance + xNew = MathUtils.clamp( xNew, this.minDistance, this.maxDistance ); + + const y = x * Math.tan( MathUtils.DEG2RAD * this.camera.fov * 0.5 ); + + //calculate new fov + let newFov = MathUtils.RAD2DEG * ( Math.atan( y / xNew ) * 2 ); + + //check min and max fov + if ( newFov > this.maxFov ) { + + newFov = this.maxFov; + + } else if ( newFov < this.minFov ) { + + newFov = this.minFov; + + } + + const newDistance = y / Math.tan( MathUtils.DEG2RAD * ( newFov / 2 ) ); + size = x / newDistance; + + this.setFov( newFov ); + this.applyTransformMatrix( this.scale( size, this._gizmos.position, false ) ); + + } + + if ( this._grid != null ) { + + this.disposeGrid(); + this.drawGrid(); + + } + + this.updateTbState( STATE.IDLE, false ); + + this.dispatchEvent( _changeEvent ); + this.dispatchEvent( _endEvent ); + + break; + + } + + } + + } + +} + +export { ArcballControls }; diff --git a/node_modules/three/examples/jsm/controls/DragControls.js b/node_modules/three/examples/jsm/controls/DragControls.js new file mode 100644 index 0000000..0987d57 --- /dev/null +++ b/node_modules/three/examples/jsm/controls/DragControls.js @@ -0,0 +1,282 @@ +import { + EventDispatcher, + Matrix4, + Plane, + Raycaster, + Vector2, + Vector3 +} from 'three'; + +const _plane = new Plane(); +const _raycaster = new Raycaster(); + +const _pointer = new Vector2(); +const _offset = new Vector3(); +const _diff = new Vector2(); +const _previousPointer = new Vector2(); +const _intersection = new Vector3(); +const _worldPosition = new Vector3(); +const _inverseMatrix = new Matrix4(); + +const _up = new Vector3(); +const _right = new Vector3(); + +class DragControls extends EventDispatcher { + + constructor( _objects, _camera, _domElement ) { + + super(); + + _domElement.style.touchAction = 'none'; // disable touch scroll + + let _selected = null, _hovered = null; + + const _intersections = []; + + this.mode = 'translate'; + + this.rotateSpeed = 1; + + // + + const scope = this; + + function activate() { + + _domElement.addEventListener( 'pointermove', onPointerMove ); + _domElement.addEventListener( 'pointerdown', onPointerDown ); + _domElement.addEventListener( 'pointerup', onPointerCancel ); + _domElement.addEventListener( 'pointerleave', onPointerCancel ); + + } + + function deactivate() { + + _domElement.removeEventListener( 'pointermove', onPointerMove ); + _domElement.removeEventListener( 'pointerdown', onPointerDown ); + _domElement.removeEventListener( 'pointerup', onPointerCancel ); + _domElement.removeEventListener( 'pointerleave', onPointerCancel ); + + _domElement.style.cursor = ''; + + } + + function dispose() { + + deactivate(); + + } + + function getObjects() { + + return _objects; + + } + + function setObjects( objects ) { + + _objects = objects; + + } + + function getRaycaster() { + + return _raycaster; + + } + + function onPointerMove( event ) { + + if ( scope.enabled === false ) return; + + updatePointer( event ); + + _raycaster.setFromCamera( _pointer, _camera ); + + if ( _selected ) { + + if ( scope.mode === 'translate' ) { + + if ( _raycaster.ray.intersectPlane( _plane, _intersection ) ) { + + _selected.position.copy( _intersection.sub( _offset ).applyMatrix4( _inverseMatrix ) ); + + } + + } else if ( scope.mode === 'rotate' ) { + + _diff.subVectors( _pointer, _previousPointer ).multiplyScalar( scope.rotateSpeed ); + _selected.rotateOnWorldAxis( _up, _diff.x ); + _selected.rotateOnWorldAxis( _right.normalize(), - _diff.y ); + + } + + scope.dispatchEvent( { type: 'drag', object: _selected } ); + + _previousPointer.copy( _pointer ); + + } else { + + // hover support + + if ( event.pointerType === 'mouse' || event.pointerType === 'pen' ) { + + _intersections.length = 0; + + _raycaster.setFromCamera( _pointer, _camera ); + _raycaster.intersectObjects( _objects, scope.recursive, _intersections ); + + if ( _intersections.length > 0 ) { + + const object = _intersections[ 0 ].object; + + _plane.setFromNormalAndCoplanarPoint( _camera.getWorldDirection( _plane.normal ), _worldPosition.setFromMatrixPosition( object.matrixWorld ) ); + + if ( _hovered !== object && _hovered !== null ) { + + scope.dispatchEvent( { type: 'hoveroff', object: _hovered } ); + + _domElement.style.cursor = 'auto'; + _hovered = null; + + } + + if ( _hovered !== object ) { + + scope.dispatchEvent( { type: 'hoveron', object: object } ); + + _domElement.style.cursor = 'pointer'; + _hovered = object; + + } + + } else { + + if ( _hovered !== null ) { + + scope.dispatchEvent( { type: 'hoveroff', object: _hovered } ); + + _domElement.style.cursor = 'auto'; + _hovered = null; + + } + + } + + } + + } + + _previousPointer.copy( _pointer ); + + } + + function onPointerDown( event ) { + + if ( scope.enabled === false ) return; + + updatePointer( event ); + + _intersections.length = 0; + + _raycaster.setFromCamera( _pointer, _camera ); + _raycaster.intersectObjects( _objects, scope.recursive, _intersections ); + + if ( _intersections.length > 0 ) { + + if ( scope.transformGroup === true ) { + + // look for the outermost group in the object's upper hierarchy + + _selected = findGroup( _intersections[ 0 ].object ); + + } else { + + _selected = _intersections[ 0 ].object; + + } + + _plane.setFromNormalAndCoplanarPoint( _camera.getWorldDirection( _plane.normal ), _worldPosition.setFromMatrixPosition( _selected.matrixWorld ) ); + + if ( _raycaster.ray.intersectPlane( _plane, _intersection ) ) { + + if ( scope.mode === 'translate' ) { + + _inverseMatrix.copy( _selected.parent.matrixWorld ).invert(); + _offset.copy( _intersection ).sub( _worldPosition.setFromMatrixPosition( _selected.matrixWorld ) ); + + } else if ( scope.mode === 'rotate' ) { + + // the controls only support Y+ up + _up.set( 0, 1, 0 ).applyQuaternion( _camera.quaternion ).normalize(); + _right.set( 1, 0, 0 ).applyQuaternion( _camera.quaternion ).normalize(); + + } + + } + + _domElement.style.cursor = 'move'; + + scope.dispatchEvent( { type: 'dragstart', object: _selected } ); + + } + + _previousPointer.copy( _pointer ); + + } + + function onPointerCancel() { + + if ( scope.enabled === false ) return; + + if ( _selected ) { + + scope.dispatchEvent( { type: 'dragend', object: _selected } ); + + _selected = null; + + } + + _domElement.style.cursor = _hovered ? 'pointer' : 'auto'; + + } + + function updatePointer( event ) { + + const rect = _domElement.getBoundingClientRect(); + + _pointer.x = ( event.clientX - rect.left ) / rect.width * 2 - 1; + _pointer.y = - ( event.clientY - rect.top ) / rect.height * 2 + 1; + + } + + function findGroup( obj, group = null ) { + + if ( obj.isGroup ) group = obj; + + if ( obj.parent === null ) return group; + + return findGroup( obj.parent, group ); + + } + + activate(); + + // API + + this.enabled = true; + this.recursive = true; + this.transformGroup = false; + + this.activate = activate; + this.deactivate = deactivate; + this.dispose = dispose; + this.getObjects = getObjects; + this.getRaycaster = getRaycaster; + this.setObjects = setObjects; + + } + +} + +export { DragControls }; diff --git a/node_modules/three/examples/jsm/controls/FirstPersonControls.js b/node_modules/three/examples/jsm/controls/FirstPersonControls.js new file mode 100644 index 0000000..0d03421 --- /dev/null +++ b/node_modules/three/examples/jsm/controls/FirstPersonControls.js @@ -0,0 +1,325 @@ +import { + MathUtils, + Spherical, + Vector3 +} from 'three'; + +const _lookDirection = new Vector3(); +const _spherical = new Spherical(); +const _target = new Vector3(); + +class FirstPersonControls { + + constructor( object, domElement ) { + + this.object = object; + this.domElement = domElement; + + // API + + this.enabled = true; + + this.movementSpeed = 1.0; + this.lookSpeed = 0.005; + + this.lookVertical = true; + this.autoForward = false; + + this.activeLook = true; + + this.heightSpeed = false; + this.heightCoef = 1.0; + this.heightMin = 0.0; + this.heightMax = 1.0; + + this.constrainVertical = false; + this.verticalMin = 0; + this.verticalMax = Math.PI; + + this.mouseDragOn = false; + + // internals + + this.autoSpeedFactor = 0.0; + + this.pointerX = 0; + this.pointerY = 0; + + this.moveForward = false; + this.moveBackward = false; + this.moveLeft = false; + this.moveRight = false; + + this.viewHalfX = 0; + this.viewHalfY = 0; + + // private variables + + let lat = 0; + let lon = 0; + + // + + this.handleResize = function () { + + if ( this.domElement === document ) { + + this.viewHalfX = window.innerWidth / 2; + this.viewHalfY = window.innerHeight / 2; + + } else { + + this.viewHalfX = this.domElement.offsetWidth / 2; + this.viewHalfY = this.domElement.offsetHeight / 2; + + } + + }; + + this.onPointerDown = function ( event ) { + + if ( this.domElement !== document ) { + + this.domElement.focus(); + + } + + if ( this.activeLook ) { + + switch ( event.button ) { + + case 0: this.moveForward = true; break; + case 2: this.moveBackward = true; break; + + } + + } + + this.mouseDragOn = true; + + }; + + this.onPointerUp = function ( event ) { + + if ( this.activeLook ) { + + switch ( event.button ) { + + case 0: this.moveForward = false; break; + case 2: this.moveBackward = false; break; + + } + + } + + this.mouseDragOn = false; + + }; + + this.onPointerMove = function ( event ) { + + if ( this.domElement === document ) { + + this.pointerX = event.pageX - this.viewHalfX; + this.pointerY = event.pageY - this.viewHalfY; + + } else { + + this.pointerX = event.pageX - this.domElement.offsetLeft - this.viewHalfX; + this.pointerY = event.pageY - this.domElement.offsetTop - this.viewHalfY; + + } + + }; + + this.onKeyDown = function ( event ) { + + switch ( event.code ) { + + case 'ArrowUp': + case 'KeyW': this.moveForward = true; break; + + case 'ArrowLeft': + case 'KeyA': this.moveLeft = true; break; + + case 'ArrowDown': + case 'KeyS': this.moveBackward = true; break; + + case 'ArrowRight': + case 'KeyD': this.moveRight = true; break; + + case 'KeyR': this.moveUp = true; break; + case 'KeyF': this.moveDown = true; break; + + } + + }; + + this.onKeyUp = function ( event ) { + + switch ( event.code ) { + + case 'ArrowUp': + case 'KeyW': this.moveForward = false; break; + + case 'ArrowLeft': + case 'KeyA': this.moveLeft = false; break; + + case 'ArrowDown': + case 'KeyS': this.moveBackward = false; break; + + case 'ArrowRight': + case 'KeyD': this.moveRight = false; break; + + case 'KeyR': this.moveUp = false; break; + case 'KeyF': this.moveDown = false; break; + + } + + }; + + this.lookAt = function ( x, y, z ) { + + if ( x.isVector3 ) { + + _target.copy( x ); + + } else { + + _target.set( x, y, z ); + + } + + this.object.lookAt( _target ); + + setOrientation( this ); + + return this; + + }; + + this.update = function () { + + const targetPosition = new Vector3(); + + return function update( delta ) { + + if ( this.enabled === false ) return; + + if ( this.heightSpeed ) { + + const y = MathUtils.clamp( this.object.position.y, this.heightMin, this.heightMax ); + const heightDelta = y - this.heightMin; + + this.autoSpeedFactor = delta * ( heightDelta * this.heightCoef ); + + } else { + + this.autoSpeedFactor = 0.0; + + } + + const actualMoveSpeed = delta * this.movementSpeed; + + if ( this.moveForward || ( this.autoForward && ! this.moveBackward ) ) this.object.translateZ( - ( actualMoveSpeed + this.autoSpeedFactor ) ); + if ( this.moveBackward ) this.object.translateZ( actualMoveSpeed ); + + if ( this.moveLeft ) this.object.translateX( - actualMoveSpeed ); + if ( this.moveRight ) this.object.translateX( actualMoveSpeed ); + + if ( this.moveUp ) this.object.translateY( actualMoveSpeed ); + if ( this.moveDown ) this.object.translateY( - actualMoveSpeed ); + + let actualLookSpeed = delta * this.lookSpeed; + + if ( ! this.activeLook ) { + + actualLookSpeed = 0; + + } + + let verticalLookRatio = 1; + + if ( this.constrainVertical ) { + + verticalLookRatio = Math.PI / ( this.verticalMax - this.verticalMin ); + + } + + lon -= this.pointerX * actualLookSpeed; + if ( this.lookVertical ) lat -= this.pointerY * actualLookSpeed * verticalLookRatio; + + lat = Math.max( - 85, Math.min( 85, lat ) ); + + let phi = MathUtils.degToRad( 90 - lat ); + const theta = MathUtils.degToRad( lon ); + + if ( this.constrainVertical ) { + + phi = MathUtils.mapLinear( phi, 0, Math.PI, this.verticalMin, this.verticalMax ); + + } + + const position = this.object.position; + + targetPosition.setFromSphericalCoords( 1, phi, theta ).add( position ); + + this.object.lookAt( targetPosition ); + + }; + + }(); + + this.dispose = function () { + + this.domElement.removeEventListener( 'contextmenu', contextmenu ); + this.domElement.removeEventListener( 'pointerdown', _onPointerDown ); + this.domElement.removeEventListener( 'pointermove', _onPointerMove ); + this.domElement.removeEventListener( 'pointerup', _onPointerUp ); + + window.removeEventListener( 'keydown', _onKeyDown ); + window.removeEventListener( 'keyup', _onKeyUp ); + + }; + + const _onPointerMove = this.onPointerMove.bind( this ); + const _onPointerDown = this.onPointerDown.bind( this ); + const _onPointerUp = this.onPointerUp.bind( this ); + const _onKeyDown = this.onKeyDown.bind( this ); + const _onKeyUp = this.onKeyUp.bind( this ); + + this.domElement.addEventListener( 'contextmenu', contextmenu ); + this.domElement.addEventListener( 'pointerdown', _onPointerDown ); + this.domElement.addEventListener( 'pointermove', _onPointerMove ); + this.domElement.addEventListener( 'pointerup', _onPointerUp ); + + window.addEventListener( 'keydown', _onKeyDown ); + window.addEventListener( 'keyup', _onKeyUp ); + + function setOrientation( controls ) { + + const quaternion = controls.object.quaternion; + + _lookDirection.set( 0, 0, - 1 ).applyQuaternion( quaternion ); + _spherical.setFromVector3( _lookDirection ); + + lat = 90 - MathUtils.radToDeg( _spherical.phi ); + lon = MathUtils.radToDeg( _spherical.theta ); + + } + + this.handleResize(); + + setOrientation( this ); + + } + +} + +function contextmenu( event ) { + + event.preventDefault(); + +} + +export { FirstPersonControls }; diff --git a/node_modules/three/examples/jsm/controls/FlyControls.js b/node_modules/three/examples/jsm/controls/FlyControls.js new file mode 100644 index 0000000..5026bde --- /dev/null +++ b/node_modules/three/examples/jsm/controls/FlyControls.js @@ -0,0 +1,326 @@ +import { + EventDispatcher, + Quaternion, + Vector3 +} from 'three'; + +const _changeEvent = { type: 'change' }; + +class FlyControls extends EventDispatcher { + + constructor( object, domElement ) { + + super(); + + this.object = object; + this.domElement = domElement; + + // API + + // Set to false to disable this control + this.enabled = true; + + this.movementSpeed = 1.0; + this.rollSpeed = 0.005; + + this.dragToLook = false; + this.autoForward = false; + + // disable default target object behavior + + // internals + + const scope = this; + + const EPS = 0.000001; + + const lastQuaternion = new Quaternion(); + const lastPosition = new Vector3(); + + this.tmpQuaternion = new Quaternion(); + + this.status = 0; + + this.moveState = { up: 0, down: 0, left: 0, right: 0, forward: 0, back: 0, pitchUp: 0, pitchDown: 0, yawLeft: 0, yawRight: 0, rollLeft: 0, rollRight: 0 }; + this.moveVector = new Vector3( 0, 0, 0 ); + this.rotationVector = new Vector3( 0, 0, 0 ); + + this.keydown = function ( event ) { + + if ( event.altKey || this.enabled === false ) { + + return; + + } + + switch ( event.code ) { + + case 'ShiftLeft': + case 'ShiftRight': this.movementSpeedMultiplier = .1; break; + + case 'KeyW': this.moveState.forward = 1; break; + case 'KeyS': this.moveState.back = 1; break; + + case 'KeyA': this.moveState.left = 1; break; + case 'KeyD': this.moveState.right = 1; break; + + case 'KeyR': this.moveState.up = 1; break; + case 'KeyF': this.moveState.down = 1; break; + + case 'ArrowUp': this.moveState.pitchUp = 1; break; + case 'ArrowDown': this.moveState.pitchDown = 1; break; + + case 'ArrowLeft': this.moveState.yawLeft = 1; break; + case 'ArrowRight': this.moveState.yawRight = 1; break; + + case 'KeyQ': this.moveState.rollLeft = 1; break; + case 'KeyE': this.moveState.rollRight = 1; break; + + } + + this.updateMovementVector(); + this.updateRotationVector(); + + }; + + this.keyup = function ( event ) { + + if ( this.enabled === false ) return; + + switch ( event.code ) { + + case 'ShiftLeft': + case 'ShiftRight': this.movementSpeedMultiplier = 1; break; + + case 'KeyW': this.moveState.forward = 0; break; + case 'KeyS': this.moveState.back = 0; break; + + case 'KeyA': this.moveState.left = 0; break; + case 'KeyD': this.moveState.right = 0; break; + + case 'KeyR': this.moveState.up = 0; break; + case 'KeyF': this.moveState.down = 0; break; + + case 'ArrowUp': this.moveState.pitchUp = 0; break; + case 'ArrowDown': this.moveState.pitchDown = 0; break; + + case 'ArrowLeft': this.moveState.yawLeft = 0; break; + case 'ArrowRight': this.moveState.yawRight = 0; break; + + case 'KeyQ': this.moveState.rollLeft = 0; break; + case 'KeyE': this.moveState.rollRight = 0; break; + + } + + this.updateMovementVector(); + this.updateRotationVector(); + + }; + + this.pointerdown = function ( event ) { + + if ( this.enabled === false ) return; + + if ( this.dragToLook ) { + + this.status ++; + + } else { + + switch ( event.button ) { + + case 0: this.moveState.forward = 1; break; + case 2: this.moveState.back = 1; break; + + } + + this.updateMovementVector(); + + } + + }; + + this.pointermove = function ( event ) { + + if ( this.enabled === false ) return; + + if ( ! this.dragToLook || this.status > 0 ) { + + const container = this.getContainerDimensions(); + const halfWidth = container.size[ 0 ] / 2; + const halfHeight = container.size[ 1 ] / 2; + + this.moveState.yawLeft = - ( ( event.pageX - container.offset[ 0 ] ) - halfWidth ) / halfWidth; + this.moveState.pitchDown = ( ( event.pageY - container.offset[ 1 ] ) - halfHeight ) / halfHeight; + + this.updateRotationVector(); + + } + + }; + + this.pointerup = function ( event ) { + + if ( this.enabled === false ) return; + + if ( this.dragToLook ) { + + this.status --; + + this.moveState.yawLeft = this.moveState.pitchDown = 0; + + } else { + + switch ( event.button ) { + + case 0: this.moveState.forward = 0; break; + case 2: this.moveState.back = 0; break; + + } + + this.updateMovementVector(); + + } + + this.updateRotationVector(); + + }; + + this.pointercancel = function () { + + if ( this.enabled === false ) return; + + if ( this.dragToLook ) { + + this.status = 0; + + this.moveState.yawLeft = this.moveState.pitchDown = 0; + + } else { + + this.moveState.forward = 0; + this.moveState.back = 0; + + this.updateMovementVector(); + + } + + this.updateRotationVector(); + + }; + + this.contextMenu = function ( event ) { + + if ( this.enabled === false ) return; + + event.preventDefault(); + + }; + + this.update = function ( delta ) { + + if ( this.enabled === false ) return; + + const moveMult = delta * scope.movementSpeed; + const rotMult = delta * scope.rollSpeed; + + scope.object.translateX( scope.moveVector.x * moveMult ); + scope.object.translateY( scope.moveVector.y * moveMult ); + scope.object.translateZ( scope.moveVector.z * moveMult ); + + scope.tmpQuaternion.set( scope.rotationVector.x * rotMult, scope.rotationVector.y * rotMult, scope.rotationVector.z * rotMult, 1 ).normalize(); + scope.object.quaternion.multiply( scope.tmpQuaternion ); + + if ( + lastPosition.distanceToSquared( scope.object.position ) > EPS || + 8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS + ) { + + scope.dispatchEvent( _changeEvent ); + lastQuaternion.copy( scope.object.quaternion ); + lastPosition.copy( scope.object.position ); + + } + + }; + + this.updateMovementVector = function () { + + const forward = ( this.moveState.forward || ( this.autoForward && ! this.moveState.back ) ) ? 1 : 0; + + this.moveVector.x = ( - this.moveState.left + this.moveState.right ); + this.moveVector.y = ( - this.moveState.down + this.moveState.up ); + this.moveVector.z = ( - forward + this.moveState.back ); + + //console.log( 'move:', [ this.moveVector.x, this.moveVector.y, this.moveVector.z ] ); + + }; + + this.updateRotationVector = function () { + + this.rotationVector.x = ( - this.moveState.pitchDown + this.moveState.pitchUp ); + this.rotationVector.y = ( - this.moveState.yawRight + this.moveState.yawLeft ); + this.rotationVector.z = ( - this.moveState.rollRight + this.moveState.rollLeft ); + + //console.log( 'rotate:', [ this.rotationVector.x, this.rotationVector.y, this.rotationVector.z ] ); + + }; + + this.getContainerDimensions = function () { + + if ( this.domElement != document ) { + + return { + size: [ this.domElement.offsetWidth, this.domElement.offsetHeight ], + offset: [ this.domElement.offsetLeft, this.domElement.offsetTop ] + }; + + } else { + + return { + size: [ window.innerWidth, window.innerHeight ], + offset: [ 0, 0 ] + }; + + } + + }; + + this.dispose = function () { + + this.domElement.removeEventListener( 'contextmenu', _contextmenu ); + this.domElement.removeEventListener( 'pointerdown', _pointerdown ); + this.domElement.removeEventListener( 'pointermove', _pointermove ); + this.domElement.removeEventListener( 'pointerup', _pointerup ); + this.domElement.removeEventListener( 'pointercancel', _pointercancel ); + + window.removeEventListener( 'keydown', _keydown ); + window.removeEventListener( 'keyup', _keyup ); + + }; + + const _contextmenu = this.contextMenu.bind( this ); + const _pointermove = this.pointermove.bind( this ); + const _pointerdown = this.pointerdown.bind( this ); + const _pointerup = this.pointerup.bind( this ); + const _pointercancel = this.pointercancel.bind( this ); + const _keydown = this.keydown.bind( this ); + const _keyup = this.keyup.bind( this ); + + this.domElement.addEventListener( 'contextmenu', _contextmenu ); + this.domElement.addEventListener( 'pointerdown', _pointerdown ); + this.domElement.addEventListener( 'pointermove', _pointermove ); + this.domElement.addEventListener( 'pointerup', _pointerup ); + this.domElement.addEventListener( 'pointercancel', _pointercancel ); + + window.addEventListener( 'keydown', _keydown ); + window.addEventListener( 'keyup', _keyup ); + + this.updateMovementVector(); + this.updateRotationVector(); + + } + +} + +export { FlyControls }; diff --git a/node_modules/three/examples/jsm/controls/MapControls.js b/node_modules/three/examples/jsm/controls/MapControls.js new file mode 100644 index 0000000..5667905 --- /dev/null +++ b/node_modules/three/examples/jsm/controls/MapControls.js @@ -0,0 +1,28 @@ +import { MOUSE, TOUCH } from 'three'; + +import { OrbitControls } from './OrbitControls.js'; + +// MapControls performs orbiting, dollying (zooming), and panning. +// Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default). +// +// Orbit - right mouse, or left mouse + ctrl/meta/shiftKey / touch: two-finger rotate +// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish +// Pan - left mouse, or arrow keys / touch: one-finger move + +class MapControls extends OrbitControls { + + constructor( object, domElement ) { + + super( object, domElement ); + + this.screenSpacePanning = false; // pan orthogonal to world-space direction camera.up + + this.mouseButtons = { LEFT: MOUSE.PAN, MIDDLE: MOUSE.DOLLY, RIGHT: MOUSE.ROTATE }; + + this.touches = { ONE: TOUCH.PAN, TWO: TOUCH.DOLLY_ROTATE }; + + } + +} + +export { MapControls }; diff --git a/node_modules/three/examples/jsm/controls/OrbitControls.js b/node_modules/three/examples/jsm/controls/OrbitControls.js new file mode 100644 index 0000000..d21c1eb --- /dev/null +++ b/node_modules/three/examples/jsm/controls/OrbitControls.js @@ -0,0 +1,1532 @@ +import { + EventDispatcher, + MOUSE, + Quaternion, + Spherical, + TOUCH, + Vector2, + Vector3, + Plane, + Ray, + MathUtils +} from 'three'; + +// OrbitControls performs orbiting, dollying (zooming), and panning. +// Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default). +// +// Orbit - left mouse / touch: one-finger move +// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish +// Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move + +const _changeEvent = { type: 'change' }; +const _startEvent = { type: 'start' }; +const _endEvent = { type: 'end' }; +const _ray = new Ray(); +const _plane = new Plane(); +const TILT_LIMIT = Math.cos( 70 * MathUtils.DEG2RAD ); + +class OrbitControls extends EventDispatcher { + + constructor( object, domElement ) { + + super(); + + this.object = object; + this.domElement = domElement; + this.domElement.style.touchAction = 'none'; // disable touch scroll + + // Set to false to disable this control + this.enabled = true; + + // "target" sets the location of focus, where the object orbits around + this.target = new Vector3(); + + // Sets the 3D cursor (similar to Blender), from which the maxTargetRadius takes effect + this.cursor = new Vector3(); + + // How far you can dolly in and out ( PerspectiveCamera only ) + this.minDistance = 0; + this.maxDistance = Infinity; + + // How far you can zoom in and out ( OrthographicCamera only ) + this.minZoom = 0; + this.maxZoom = Infinity; + + // Limit camera target within a spherical area around the cursor + this.minTargetRadius = 0; + this.maxTargetRadius = Infinity; + + // How far you can orbit vertically, upper and lower limits. + // Range is 0 to Math.PI radians. + this.minPolarAngle = 0; // radians + this.maxPolarAngle = Math.PI; // radians + + // How far you can orbit horizontally, upper and lower limits. + // If set, the interval [ min, max ] must be a sub-interval of [ - 2 PI, 2 PI ], with ( max - min < 2 PI ) + this.minAzimuthAngle = - Infinity; // radians + this.maxAzimuthAngle = Infinity; // radians + + // Set to true to enable damping (inertia) + // If damping is enabled, you must call controls.update() in your animation loop + this.enableDamping = false; + this.dampingFactor = 0.05; + + // This option actually enables dollying in and out; left as "zoom" for backwards compatibility. + // Set to false to disable zooming + this.enableZoom = true; + this.zoomSpeed = 1.0; + + // Set to false to disable rotating + this.enableRotate = true; + this.rotateSpeed = 1.0; + + // Set to false to disable panning + this.enablePan = true; + this.panSpeed = 1.0; + this.screenSpacePanning = true; // if false, pan orthogonal to world-space direction camera.up + this.keyPanSpeed = 7.0; // pixels moved per arrow key push + this.zoomToCursor = false; + + // Set to true to automatically rotate around the target + // If auto-rotate is enabled, you must call controls.update() in your animation loop + this.autoRotate = false; + this.autoRotateSpeed = 2.0; // 30 seconds per orbit when fps is 60 + + // The four arrow keys + this.keys = { LEFT: 'ArrowLeft', UP: 'ArrowUp', RIGHT: 'ArrowRight', BOTTOM: 'ArrowDown' }; + + // Mouse buttons + this.mouseButtons = { LEFT: MOUSE.ROTATE, MIDDLE: MOUSE.DOLLY, RIGHT: MOUSE.PAN }; + + // Touch fingers + this.touches = { ONE: TOUCH.ROTATE, TWO: TOUCH.DOLLY_PAN }; + + // for reset + this.target0 = this.target.clone(); + this.position0 = this.object.position.clone(); + this.zoom0 = this.object.zoom; + + // the target DOM element for key events + this._domElementKeyEvents = null; + + // + // public methods + // + + this.getPolarAngle = function () { + + return spherical.phi; + + }; + + this.getAzimuthalAngle = function () { + + return spherical.theta; + + }; + + this.getDistance = function () { + + return this.object.position.distanceTo( this.target ); + + }; + + this.listenToKeyEvents = function ( domElement ) { + + domElement.addEventListener( 'keydown', onKeyDown ); + this._domElementKeyEvents = domElement; + + }; + + this.stopListenToKeyEvents = function () { + + this._domElementKeyEvents.removeEventListener( 'keydown', onKeyDown ); + this._domElementKeyEvents = null; + + }; + + this.saveState = function () { + + scope.target0.copy( scope.target ); + scope.position0.copy( scope.object.position ); + scope.zoom0 = scope.object.zoom; + + }; + + this.reset = function () { + + scope.target.copy( scope.target0 ); + scope.object.position.copy( scope.position0 ); + scope.object.zoom = scope.zoom0; + + scope.object.updateProjectionMatrix(); + scope.dispatchEvent( _changeEvent ); + + scope.update(); + + state = STATE.NONE; + + }; + + // this method is exposed, but perhaps it would be better if we can make it private... + this.update = function () { + + const offset = new Vector3(); + + // so camera.up is the orbit axis + const quat = new Quaternion().setFromUnitVectors( object.up, new Vector3( 0, 1, 0 ) ); + const quatInverse = quat.clone().invert(); + + const lastPosition = new Vector3(); + const lastQuaternion = new Quaternion(); + const lastTargetPosition = new Vector3(); + + const twoPI = 2 * Math.PI; + + return function update( deltaTime = null ) { + + const position = scope.object.position; + + offset.copy( position ).sub( scope.target ); + + // rotate offset to "y-axis-is-up" space + offset.applyQuaternion( quat ); + + // angle from z-axis around y-axis + spherical.setFromVector3( offset ); + + if ( scope.autoRotate && state === STATE.NONE ) { + + rotateLeft( getAutoRotationAngle( deltaTime ) ); + + } + + if ( scope.enableDamping ) { + + spherical.theta += sphericalDelta.theta * scope.dampingFactor; + spherical.phi += sphericalDelta.phi * scope.dampingFactor; + + } else { + + spherical.theta += sphericalDelta.theta; + spherical.phi += sphericalDelta.phi; + + } + + // restrict theta to be between desired limits + + let min = scope.minAzimuthAngle; + let max = scope.maxAzimuthAngle; + + if ( isFinite( min ) && isFinite( max ) ) { + + if ( min < - Math.PI ) min += twoPI; else if ( min > Math.PI ) min -= twoPI; + + if ( max < - Math.PI ) max += twoPI; else if ( max > Math.PI ) max -= twoPI; + + if ( min <= max ) { + + spherical.theta = Math.max( min, Math.min( max, spherical.theta ) ); + + } else { + + spherical.theta = ( spherical.theta > ( min + max ) / 2 ) ? + Math.max( min, spherical.theta ) : + Math.min( max, spherical.theta ); + + } + + } + + // restrict phi to be between desired limits + spherical.phi = Math.max( scope.minPolarAngle, Math.min( scope.maxPolarAngle, spherical.phi ) ); + + spherical.makeSafe(); + + + // move target to panned location + + if ( scope.enableDamping === true ) { + + scope.target.addScaledVector( panOffset, scope.dampingFactor ); + + } else { + + scope.target.add( panOffset ); + + } + + // Limit the target distance from the cursor to create a sphere around the center of interest + scope.target.sub( scope.cursor ); + scope.target.clampLength( scope.minTargetRadius, scope.maxTargetRadius ); + scope.target.add( scope.cursor ); + + let zoomChanged = false; + // adjust the camera position based on zoom only if we're not zooming to the cursor or if it's an ortho camera + // we adjust zoom later in these cases + if ( scope.zoomToCursor && performCursorZoom || scope.object.isOrthographicCamera ) { + + spherical.radius = clampDistance( spherical.radius ); + + } else { + + const prevRadius = spherical.radius; + spherical.radius = clampDistance( spherical.radius * scale ); + zoomChanged = prevRadius != spherical.radius; + + } + + offset.setFromSpherical( spherical ); + + // rotate offset back to "camera-up-vector-is-up" space + offset.applyQuaternion( quatInverse ); + + position.copy( scope.target ).add( offset ); + + scope.object.lookAt( scope.target ); + + if ( scope.enableDamping === true ) { + + sphericalDelta.theta *= ( 1 - scope.dampingFactor ); + sphericalDelta.phi *= ( 1 - scope.dampingFactor ); + + panOffset.multiplyScalar( 1 - scope.dampingFactor ); + + } else { + + sphericalDelta.set( 0, 0, 0 ); + + panOffset.set( 0, 0, 0 ); + + } + + // adjust camera position + if ( scope.zoomToCursor && performCursorZoom ) { + + let newRadius = null; + if ( scope.object.isPerspectiveCamera ) { + + // move the camera down the pointer ray + // this method avoids floating point error + const prevRadius = offset.length(); + newRadius = clampDistance( prevRadius * scale ); + + const radiusDelta = prevRadius - newRadius; + scope.object.position.addScaledVector( dollyDirection, radiusDelta ); + scope.object.updateMatrixWorld(); + + zoomChanged = !! radiusDelta; + + } else if ( scope.object.isOrthographicCamera ) { + + // adjust the ortho camera position based on zoom changes + const mouseBefore = new Vector3( mouse.x, mouse.y, 0 ); + mouseBefore.unproject( scope.object ); + + const prevZoom = scope.object.zoom; + scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom / scale ) ); + scope.object.updateProjectionMatrix(); + + zoomChanged = prevZoom !== scope.object.zoom; + + const mouseAfter = new Vector3( mouse.x, mouse.y, 0 ); + mouseAfter.unproject( scope.object ); + + scope.object.position.sub( mouseAfter ).add( mouseBefore ); + scope.object.updateMatrixWorld(); + + newRadius = offset.length(); + + } else { + + console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.' ); + scope.zoomToCursor = false; + + } + + // handle the placement of the target + if ( newRadius !== null ) { + + if ( this.screenSpacePanning ) { + + // position the orbit target in front of the new camera position + scope.target.set( 0, 0, - 1 ) + .transformDirection( scope.object.matrix ) + .multiplyScalar( newRadius ) + .add( scope.object.position ); + + } else { + + // get the ray and translation plane to compute target + _ray.origin.copy( scope.object.position ); + _ray.direction.set( 0, 0, - 1 ).transformDirection( scope.object.matrix ); + + // if the camera is 20 degrees above the horizon then don't adjust the focus target to avoid + // extremely large values + if ( Math.abs( scope.object.up.dot( _ray.direction ) ) < TILT_LIMIT ) { + + object.lookAt( scope.target ); + + } else { + + _plane.setFromNormalAndCoplanarPoint( scope.object.up, scope.target ); + _ray.intersectPlane( _plane, scope.target ); + + } + + } + + } + + } else if ( scope.object.isOrthographicCamera ) { + + const prevZoom = scope.object.zoom; + scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom / scale ) ); + + if ( prevZoom !== scope.object.zoom ) { + + scope.object.updateProjectionMatrix(); + zoomChanged = true; + + } + + } + + scale = 1; + performCursorZoom = false; + + // update condition is: + // min(camera displacement, camera rotation in radians)^2 > EPS + // using small-angle approximation cos(x/2) = 1 - x^2 / 8 + + if ( zoomChanged || + lastPosition.distanceToSquared( scope.object.position ) > EPS || + 8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS || + lastTargetPosition.distanceToSquared( scope.target ) > EPS ) { + + scope.dispatchEvent( _changeEvent ); + + lastPosition.copy( scope.object.position ); + lastQuaternion.copy( scope.object.quaternion ); + lastTargetPosition.copy( scope.target ); + + return true; + + } + + return false; + + }; + + }(); + + this.dispose = function () { + + scope.domElement.removeEventListener( 'contextmenu', onContextMenu ); + + scope.domElement.removeEventListener( 'pointerdown', onPointerDown ); + scope.domElement.removeEventListener( 'pointercancel', onPointerUp ); + scope.domElement.removeEventListener( 'wheel', onMouseWheel ); + + scope.domElement.removeEventListener( 'pointermove', onPointerMove ); + scope.domElement.removeEventListener( 'pointerup', onPointerUp ); + + const document = scope.domElement.getRootNode(); // offscreen canvas compatibility + + document.removeEventListener( 'keydown', interceptControlDown, { capture: true } ); + + if ( scope._domElementKeyEvents !== null ) { + + scope._domElementKeyEvents.removeEventListener( 'keydown', onKeyDown ); + scope._domElementKeyEvents = null; + + } + + //scope.dispatchEvent( { type: 'dispose' } ); // should this be added here? + + }; + + // + // internals + // + + const scope = this; + + const STATE = { + NONE: - 1, + ROTATE: 0, + DOLLY: 1, + PAN: 2, + TOUCH_ROTATE: 3, + TOUCH_PAN: 4, + TOUCH_DOLLY_PAN: 5, + TOUCH_DOLLY_ROTATE: 6 + }; + + let state = STATE.NONE; + + const EPS = 0.000001; + + // current position in spherical coordinates + const spherical = new Spherical(); + const sphericalDelta = new Spherical(); + + let scale = 1; + const panOffset = new Vector3(); + + const rotateStart = new Vector2(); + const rotateEnd = new Vector2(); + const rotateDelta = new Vector2(); + + const panStart = new Vector2(); + const panEnd = new Vector2(); + const panDelta = new Vector2(); + + const dollyStart = new Vector2(); + const dollyEnd = new Vector2(); + const dollyDelta = new Vector2(); + + const dollyDirection = new Vector3(); + const mouse = new Vector2(); + let performCursorZoom = false; + + const pointers = []; + const pointerPositions = {}; + + let controlActive = false; + + function getAutoRotationAngle( deltaTime ) { + + if ( deltaTime !== null ) { + + return ( 2 * Math.PI / 60 * scope.autoRotateSpeed ) * deltaTime; + + } else { + + return 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed; + + } + + } + + function getZoomScale( delta ) { + + const normalizedDelta = Math.abs( delta * 0.01 ); + return Math.pow( 0.95, scope.zoomSpeed * normalizedDelta ); + + } + + function rotateLeft( angle ) { + + sphericalDelta.theta -= angle; + + } + + function rotateUp( angle ) { + + sphericalDelta.phi -= angle; + + } + + const panLeft = function () { + + const v = new Vector3(); + + return function panLeft( distance, objectMatrix ) { + + v.setFromMatrixColumn( objectMatrix, 0 ); // get X column of objectMatrix + v.multiplyScalar( - distance ); + + panOffset.add( v ); + + }; + + }(); + + const panUp = function () { + + const v = new Vector3(); + + return function panUp( distance, objectMatrix ) { + + if ( scope.screenSpacePanning === true ) { + + v.setFromMatrixColumn( objectMatrix, 1 ); + + } else { + + v.setFromMatrixColumn( objectMatrix, 0 ); + v.crossVectors( scope.object.up, v ); + + } + + v.multiplyScalar( distance ); + + panOffset.add( v ); + + }; + + }(); + + // deltaX and deltaY are in pixels; right and down are positive + const pan = function () { + + const offset = new Vector3(); + + return function pan( deltaX, deltaY ) { + + const element = scope.domElement; + + if ( scope.object.isPerspectiveCamera ) { + + // perspective + const position = scope.object.position; + offset.copy( position ).sub( scope.target ); + let targetDistance = offset.length(); + + // half of the fov is center to top of screen + targetDistance *= Math.tan( ( scope.object.fov / 2 ) * Math.PI / 180.0 ); + + // we use only clientHeight here so aspect ratio does not distort speed + panLeft( 2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix ); + panUp( 2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix ); + + } else if ( scope.object.isOrthographicCamera ) { + + // orthographic + panLeft( deltaX * ( scope.object.right - scope.object.left ) / scope.object.zoom / element.clientWidth, scope.object.matrix ); + panUp( deltaY * ( scope.object.top - scope.object.bottom ) / scope.object.zoom / element.clientHeight, scope.object.matrix ); + + } else { + + // camera neither orthographic nor perspective + console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.' ); + scope.enablePan = false; + + } + + }; + + }(); + + function dollyOut( dollyScale ) { + + if ( scope.object.isPerspectiveCamera || scope.object.isOrthographicCamera ) { + + scale /= dollyScale; + + } else { + + console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' ); + scope.enableZoom = false; + + } + + } + + function dollyIn( dollyScale ) { + + if ( scope.object.isPerspectiveCamera || scope.object.isOrthographicCamera ) { + + scale *= dollyScale; + + } else { + + console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' ); + scope.enableZoom = false; + + } + + } + + function updateZoomParameters( x, y ) { + + if ( ! scope.zoomToCursor ) { + + return; + + } + + performCursorZoom = true; + + const rect = scope.domElement.getBoundingClientRect(); + const dx = x - rect.left; + const dy = y - rect.top; + const w = rect.width; + const h = rect.height; + + mouse.x = ( dx / w ) * 2 - 1; + mouse.y = - ( dy / h ) * 2 + 1; + + dollyDirection.set( mouse.x, mouse.y, 1 ).unproject( scope.object ).sub( scope.object.position ).normalize(); + + } + + function clampDistance( dist ) { + + return Math.max( scope.minDistance, Math.min( scope.maxDistance, dist ) ); + + } + + // + // event callbacks - update the object state + // + + function handleMouseDownRotate( event ) { + + rotateStart.set( event.clientX, event.clientY ); + + } + + function handleMouseDownDolly( event ) { + + updateZoomParameters( event.clientX, event.clientX ); + dollyStart.set( event.clientX, event.clientY ); + + } + + function handleMouseDownPan( event ) { + + panStart.set( event.clientX, event.clientY ); + + } + + function handleMouseMoveRotate( event ) { + + rotateEnd.set( event.clientX, event.clientY ); + + rotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed ); + + const element = scope.domElement; + + rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height + + rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight ); + + rotateStart.copy( rotateEnd ); + + scope.update(); + + } + + function handleMouseMoveDolly( event ) { + + dollyEnd.set( event.clientX, event.clientY ); + + dollyDelta.subVectors( dollyEnd, dollyStart ); + + if ( dollyDelta.y > 0 ) { + + dollyOut( getZoomScale( dollyDelta.y ) ); + + } else if ( dollyDelta.y < 0 ) { + + dollyIn( getZoomScale( dollyDelta.y ) ); + + } + + dollyStart.copy( dollyEnd ); + + scope.update(); + + } + + function handleMouseMovePan( event ) { + + panEnd.set( event.clientX, event.clientY ); + + panDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed ); + + pan( panDelta.x, panDelta.y ); + + panStart.copy( panEnd ); + + scope.update(); + + } + + function handleMouseWheel( event ) { + + updateZoomParameters( event.clientX, event.clientY ); + + if ( event.deltaY < 0 ) { + + dollyIn( getZoomScale( event.deltaY ) ); + + } else if ( event.deltaY > 0 ) { + + dollyOut( getZoomScale( event.deltaY ) ); + + } + + scope.update(); + + } + + function handleKeyDown( event ) { + + let needsUpdate = false; + + switch ( event.code ) { + + case scope.keys.UP: + + if ( event.ctrlKey || event.metaKey || event.shiftKey ) { + + rotateUp( 2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight ); + + } else { + + pan( 0, scope.keyPanSpeed ); + + } + + needsUpdate = true; + break; + + case scope.keys.BOTTOM: + + if ( event.ctrlKey || event.metaKey || event.shiftKey ) { + + rotateUp( - 2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight ); + + } else { + + pan( 0, - scope.keyPanSpeed ); + + } + + needsUpdate = true; + break; + + case scope.keys.LEFT: + + if ( event.ctrlKey || event.metaKey || event.shiftKey ) { + + rotateLeft( 2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight ); + + } else { + + pan( scope.keyPanSpeed, 0 ); + + } + + needsUpdate = true; + break; + + case scope.keys.RIGHT: + + if ( event.ctrlKey || event.metaKey || event.shiftKey ) { + + rotateLeft( - 2 * Math.PI * scope.rotateSpeed / scope.domElement.clientHeight ); + + } else { + + pan( - scope.keyPanSpeed, 0 ); + + } + + needsUpdate = true; + break; + + } + + if ( needsUpdate ) { + + // prevent the browser from scrolling on cursor keys + event.preventDefault(); + + scope.update(); + + } + + + } + + function handleTouchStartRotate( event ) { + + if ( pointers.length === 1 ) { + + rotateStart.set( event.pageX, event.pageY ); + + } else { + + const position = getSecondPointerPosition( event ); + + const x = 0.5 * ( event.pageX + position.x ); + const y = 0.5 * ( event.pageY + position.y ); + + rotateStart.set( x, y ); + + } + + } + + function handleTouchStartPan( event ) { + + if ( pointers.length === 1 ) { + + panStart.set( event.pageX, event.pageY ); + + } else { + + const position = getSecondPointerPosition( event ); + + const x = 0.5 * ( event.pageX + position.x ); + const y = 0.5 * ( event.pageY + position.y ); + + panStart.set( x, y ); + + } + + } + + function handleTouchStartDolly( event ) { + + const position = getSecondPointerPosition( event ); + + const dx = event.pageX - position.x; + const dy = event.pageY - position.y; + + const distance = Math.sqrt( dx * dx + dy * dy ); + + dollyStart.set( 0, distance ); + + } + + function handleTouchStartDollyPan( event ) { + + if ( scope.enableZoom ) handleTouchStartDolly( event ); + + if ( scope.enablePan ) handleTouchStartPan( event ); + + } + + function handleTouchStartDollyRotate( event ) { + + if ( scope.enableZoom ) handleTouchStartDolly( event ); + + if ( scope.enableRotate ) handleTouchStartRotate( event ); + + } + + function handleTouchMoveRotate( event ) { + + if ( pointers.length == 1 ) { + + rotateEnd.set( event.pageX, event.pageY ); + + } else { + + const position = getSecondPointerPosition( event ); + + const x = 0.5 * ( event.pageX + position.x ); + const y = 0.5 * ( event.pageY + position.y ); + + rotateEnd.set( x, y ); + + } + + rotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed ); + + const element = scope.domElement; + + rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height + + rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight ); + + rotateStart.copy( rotateEnd ); + + } + + function handleTouchMovePan( event ) { + + if ( pointers.length === 1 ) { + + panEnd.set( event.pageX, event.pageY ); + + } else { + + const position = getSecondPointerPosition( event ); + + const x = 0.5 * ( event.pageX + position.x ); + const y = 0.5 * ( event.pageY + position.y ); + + panEnd.set( x, y ); + + } + + panDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed ); + + pan( panDelta.x, panDelta.y ); + + panStart.copy( panEnd ); + + } + + function handleTouchMoveDolly( event ) { + + const position = getSecondPointerPosition( event ); + + const dx = event.pageX - position.x; + const dy = event.pageY - position.y; + + const distance = Math.sqrt( dx * dx + dy * dy ); + + dollyEnd.set( 0, distance ); + + dollyDelta.set( 0, Math.pow( dollyEnd.y / dollyStart.y, scope.zoomSpeed ) ); + + dollyOut( dollyDelta.y ); + + dollyStart.copy( dollyEnd ); + + const centerX = ( event.pageX + position.x ) * 0.5; + const centerY = ( event.pageY + position.y ) * 0.5; + + updateZoomParameters( centerX, centerY ); + + } + + function handleTouchMoveDollyPan( event ) { + + if ( scope.enableZoom ) handleTouchMoveDolly( event ); + + if ( scope.enablePan ) handleTouchMovePan( event ); + + } + + function handleTouchMoveDollyRotate( event ) { + + if ( scope.enableZoom ) handleTouchMoveDolly( event ); + + if ( scope.enableRotate ) handleTouchMoveRotate( event ); + + } + + // + // event handlers - FSM: listen for events and reset state + // + + function onPointerDown( event ) { + + if ( scope.enabled === false ) return; + + if ( pointers.length === 0 ) { + + scope.domElement.setPointerCapture( event.pointerId ); + + scope.domElement.addEventListener( 'pointermove', onPointerMove ); + scope.domElement.addEventListener( 'pointerup', onPointerUp ); + + } + + // + + if ( isTrackingPointer( event ) ) return; + + // + + addPointer( event ); + + if ( event.pointerType === 'touch' ) { + + onTouchStart( event ); + + } else { + + onMouseDown( event ); + + } + + } + + function onPointerMove( event ) { + + if ( scope.enabled === false ) return; + + if ( event.pointerType === 'touch' ) { + + onTouchMove( event ); + + } else { + + onMouseMove( event ); + + } + + } + + function onPointerUp( event ) { + + removePointer( event ); + + switch ( pointers.length ) { + + case 0: + + scope.domElement.releasePointerCapture( event.pointerId ); + + scope.domElement.removeEventListener( 'pointermove', onPointerMove ); + scope.domElement.removeEventListener( 'pointerup', onPointerUp ); + + scope.dispatchEvent( _endEvent ); + + state = STATE.NONE; + + break; + + case 1: + + const pointerId = pointers[ 0 ]; + const position = pointerPositions[ pointerId ]; + + // minimal placeholder event - allows state correction on pointer-up + onTouchStart( { pointerId: pointerId, pageX: position.x, pageY: position.y } ); + + break; + + } + + } + + function onMouseDown( event ) { + + let mouseAction; + + switch ( event.button ) { + + case 0: + + mouseAction = scope.mouseButtons.LEFT; + break; + + case 1: + + mouseAction = scope.mouseButtons.MIDDLE; + break; + + case 2: + + mouseAction = scope.mouseButtons.RIGHT; + break; + + default: + + mouseAction = - 1; + + } + + switch ( mouseAction ) { + + case MOUSE.DOLLY: + + if ( scope.enableZoom === false ) return; + + handleMouseDownDolly( event ); + + state = STATE.DOLLY; + + break; + + case MOUSE.ROTATE: + + if ( event.ctrlKey || event.metaKey || event.shiftKey ) { + + if ( scope.enablePan === false ) return; + + handleMouseDownPan( event ); + + state = STATE.PAN; + + } else { + + if ( scope.enableRotate === false ) return; + + handleMouseDownRotate( event ); + + state = STATE.ROTATE; + + } + + break; + + case MOUSE.PAN: + + if ( event.ctrlKey || event.metaKey || event.shiftKey ) { + + if ( scope.enableRotate === false ) return; + + handleMouseDownRotate( event ); + + state = STATE.ROTATE; + + } else { + + if ( scope.enablePan === false ) return; + + handleMouseDownPan( event ); + + state = STATE.PAN; + + } + + break; + + default: + + state = STATE.NONE; + + } + + if ( state !== STATE.NONE ) { + + scope.dispatchEvent( _startEvent ); + + } + + } + + function onMouseMove( event ) { + + switch ( state ) { + + case STATE.ROTATE: + + if ( scope.enableRotate === false ) return; + + handleMouseMoveRotate( event ); + + break; + + case STATE.DOLLY: + + if ( scope.enableZoom === false ) return; + + handleMouseMoveDolly( event ); + + break; + + case STATE.PAN: + + if ( scope.enablePan === false ) return; + + handleMouseMovePan( event ); + + break; + + } + + } + + function onMouseWheel( event ) { + + if ( scope.enabled === false || scope.enableZoom === false || state !== STATE.NONE ) return; + + event.preventDefault(); + + scope.dispatchEvent( _startEvent ); + + handleMouseWheel( customWheelEvent( event ) ); + + scope.dispatchEvent( _endEvent ); + + } + + function customWheelEvent( event ) { + + const mode = event.deltaMode; + + // minimal wheel event altered to meet delta-zoom demand + const newEvent = { + clientX: event.clientX, + clientY: event.clientY, + deltaY: event.deltaY, + }; + + switch ( mode ) { + + case 1: // LINE_MODE + newEvent.deltaY *= 16; + break; + + case 2: // PAGE_MODE + newEvent.deltaY *= 100; + break; + + } + + // detect if event was triggered by pinching + if ( event.ctrlKey && ! controlActive ) { + + newEvent.deltaY *= 10; + + } + + return newEvent; + + } + + function interceptControlDown( event ) { + + if ( event.key === 'Control' ) { + + controlActive = true; + + + const document = scope.domElement.getRootNode(); // offscreen canvas compatibility + + document.addEventListener( 'keyup', interceptControlUp, { passive: true, capture: true } ); + + } + + } + + function interceptControlUp( event ) { + + if ( event.key === 'Control' ) { + + controlActive = false; + + + const document = scope.domElement.getRootNode(); // offscreen canvas compatibility + + document.removeEventListener( 'keyup', interceptControlUp, { passive: true, capture: true } ); + + } + + } + + function onKeyDown( event ) { + + if ( scope.enabled === false || scope.enablePan === false ) return; + + handleKeyDown( event ); + + } + + function onTouchStart( event ) { + + trackPointer( event ); + + switch ( pointers.length ) { + + case 1: + + switch ( scope.touches.ONE ) { + + case TOUCH.ROTATE: + + if ( scope.enableRotate === false ) return; + + handleTouchStartRotate( event ); + + state = STATE.TOUCH_ROTATE; + + break; + + case TOUCH.PAN: + + if ( scope.enablePan === false ) return; + + handleTouchStartPan( event ); + + state = STATE.TOUCH_PAN; + + break; + + default: + + state = STATE.NONE; + + } + + break; + + case 2: + + switch ( scope.touches.TWO ) { + + case TOUCH.DOLLY_PAN: + + if ( scope.enableZoom === false && scope.enablePan === false ) return; + + handleTouchStartDollyPan( event ); + + state = STATE.TOUCH_DOLLY_PAN; + + break; + + case TOUCH.DOLLY_ROTATE: + + if ( scope.enableZoom === false && scope.enableRotate === false ) return; + + handleTouchStartDollyRotate( event ); + + state = STATE.TOUCH_DOLLY_ROTATE; + + break; + + default: + + state = STATE.NONE; + + } + + break; + + default: + + state = STATE.NONE; + + } + + if ( state !== STATE.NONE ) { + + scope.dispatchEvent( _startEvent ); + + } + + } + + function onTouchMove( event ) { + + trackPointer( event ); + + switch ( state ) { + + case STATE.TOUCH_ROTATE: + + if ( scope.enableRotate === false ) return; + + handleTouchMoveRotate( event ); + + scope.update(); + + break; + + case STATE.TOUCH_PAN: + + if ( scope.enablePan === false ) return; + + handleTouchMovePan( event ); + + scope.update(); + + break; + + case STATE.TOUCH_DOLLY_PAN: + + if ( scope.enableZoom === false && scope.enablePan === false ) return; + + handleTouchMoveDollyPan( event ); + + scope.update(); + + break; + + case STATE.TOUCH_DOLLY_ROTATE: + + if ( scope.enableZoom === false && scope.enableRotate === false ) return; + + handleTouchMoveDollyRotate( event ); + + scope.update(); + + break; + + default: + + state = STATE.NONE; + + } + + } + + function onContextMenu( event ) { + + if ( scope.enabled === false ) return; + + event.preventDefault(); + + } + + function addPointer( event ) { + + pointers.push( event.pointerId ); + + } + + function removePointer( event ) { + + delete pointerPositions[ event.pointerId ]; + + for ( let i = 0; i < pointers.length; i ++ ) { + + if ( pointers[ i ] == event.pointerId ) { + + pointers.splice( i, 1 ); + return; + + } + + } + + } + + function isTrackingPointer( event ) { + + for ( let i = 0; i < pointers.length; i ++ ) { + + if ( pointers[ i ] == event.pointerId ) return true; + + } + + return false; + + } + + function trackPointer( event ) { + + let position = pointerPositions[ event.pointerId ]; + + if ( position === undefined ) { + + position = new Vector2(); + pointerPositions[ event.pointerId ] = position; + + } + + position.set( event.pageX, event.pageY ); + + } + + function getSecondPointerPosition( event ) { + + const pointerId = ( event.pointerId === pointers[ 0 ] ) ? pointers[ 1 ] : pointers[ 0 ]; + + return pointerPositions[ pointerId ]; + + } + + // + + scope.domElement.addEventListener( 'contextmenu', onContextMenu ); + + scope.domElement.addEventListener( 'pointerdown', onPointerDown ); + scope.domElement.addEventListener( 'pointercancel', onPointerUp ); + scope.domElement.addEventListener( 'wheel', onMouseWheel, { passive: false } ); + + const document = scope.domElement.getRootNode(); // offscreen canvas compatibility + + document.addEventListener( 'keydown', interceptControlDown, { passive: true, capture: true } ); + + // force an update at start + + this.update(); + + } + +} + +export { OrbitControls }; diff --git a/node_modules/three/examples/jsm/controls/PointerLockControls.js b/node_modules/three/examples/jsm/controls/PointerLockControls.js new file mode 100644 index 0000000..1d2856d --- /dev/null +++ b/node_modules/three/examples/jsm/controls/PointerLockControls.js @@ -0,0 +1,162 @@ +import { + Euler, + EventDispatcher, + Vector3 +} from 'three'; + +const _euler = new Euler( 0, 0, 0, 'YXZ' ); +const _vector = new Vector3(); + +const _changeEvent = { type: 'change' }; +const _lockEvent = { type: 'lock' }; +const _unlockEvent = { type: 'unlock' }; + +const _PI_2 = Math.PI / 2; + +class PointerLockControls extends EventDispatcher { + + constructor( camera, domElement ) { + + super(); + + this.camera = camera; + this.domElement = domElement; + + this.isLocked = false; + + // Set to constrain the pitch of the camera + // Range is 0 to Math.PI radians + this.minPolarAngle = 0; // radians + this.maxPolarAngle = Math.PI; // radians + + this.pointerSpeed = 1.0; + + this._onMouseMove = onMouseMove.bind( this ); + this._onPointerlockChange = onPointerlockChange.bind( this ); + this._onPointerlockError = onPointerlockError.bind( this ); + + this.connect(); + + } + + connect() { + + this.domElement.ownerDocument.addEventListener( 'mousemove', this._onMouseMove ); + this.domElement.ownerDocument.addEventListener( 'pointerlockchange', this._onPointerlockChange ); + this.domElement.ownerDocument.addEventListener( 'pointerlockerror', this._onPointerlockError ); + + } + + disconnect() { + + this.domElement.ownerDocument.removeEventListener( 'mousemove', this._onMouseMove ); + this.domElement.ownerDocument.removeEventListener( 'pointerlockchange', this._onPointerlockChange ); + this.domElement.ownerDocument.removeEventListener( 'pointerlockerror', this._onPointerlockError ); + + } + + dispose() { + + this.disconnect(); + + } + + getObject() { // retaining this method for backward compatibility + + return this.camera; + + } + + getDirection( v ) { + + return v.set( 0, 0, - 1 ).applyQuaternion( this.camera.quaternion ); + + } + + moveForward( distance ) { + + // move forward parallel to the xz-plane + // assumes camera.up is y-up + + const camera = this.camera; + + _vector.setFromMatrixColumn( camera.matrix, 0 ); + + _vector.crossVectors( camera.up, _vector ); + + camera.position.addScaledVector( _vector, distance ); + + } + + moveRight( distance ) { + + const camera = this.camera; + + _vector.setFromMatrixColumn( camera.matrix, 0 ); + + camera.position.addScaledVector( _vector, distance ); + + } + + lock() { + + this.domElement.requestPointerLock(); + + } + + unlock() { + + this.domElement.ownerDocument.exitPointerLock(); + + } + +} + +// event listeners + +function onMouseMove( event ) { + + if ( this.isLocked === false ) return; + + const movementX = event.movementX || event.mozMovementX || event.webkitMovementX || 0; + const movementY = event.movementY || event.mozMovementY || event.webkitMovementY || 0; + + const camera = this.camera; + _euler.setFromQuaternion( camera.quaternion ); + + _euler.y -= movementX * 0.002 * this.pointerSpeed; + _euler.x -= movementY * 0.002 * this.pointerSpeed; + + _euler.x = Math.max( _PI_2 - this.maxPolarAngle, Math.min( _PI_2 - this.minPolarAngle, _euler.x ) ); + + camera.quaternion.setFromEuler( _euler ); + + this.dispatchEvent( _changeEvent ); + +} + +function onPointerlockChange() { + + if ( this.domElement.ownerDocument.pointerLockElement === this.domElement ) { + + this.dispatchEvent( _lockEvent ); + + this.isLocked = true; + + } else { + + this.dispatchEvent( _unlockEvent ); + + this.isLocked = false; + + } + +} + +function onPointerlockError() { + + console.error( 'THREE.PointerLockControls: Unable to use Pointer Lock API' ); + +} + +export { PointerLockControls }; diff --git a/node_modules/three/examples/jsm/controls/TrackballControls.js b/node_modules/three/examples/jsm/controls/TrackballControls.js new file mode 100644 index 0000000..c4f1114 --- /dev/null +++ b/node_modules/three/examples/jsm/controls/TrackballControls.js @@ -0,0 +1,828 @@ +import { + EventDispatcher, + MathUtils, + MOUSE, + Quaternion, + Vector2, + Vector3 +} from 'three'; + +const _changeEvent = { type: 'change' }; +const _startEvent = { type: 'start' }; +const _endEvent = { type: 'end' }; + +class TrackballControls extends EventDispatcher { + + constructor( object, domElement ) { + + super(); + + const scope = this; + const STATE = { NONE: - 1, ROTATE: 0, ZOOM: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_ZOOM_PAN: 4 }; + + this.object = object; + this.domElement = domElement; + this.domElement.style.touchAction = 'none'; // disable touch scroll + + // API + + this.enabled = true; + + this.screen = { left: 0, top: 0, width: 0, height: 0 }; + + this.rotateSpeed = 1.0; + this.zoomSpeed = 1.2; + this.panSpeed = 0.3; + + this.noRotate = false; + this.noZoom = false; + this.noPan = false; + + this.staticMoving = false; + this.dynamicDampingFactor = 0.2; + + this.minDistance = 0; + this.maxDistance = Infinity; + + this.minZoom = 0; + this.maxZoom = Infinity; + + this.keys = [ 'KeyA' /*A*/, 'KeyS' /*S*/, 'KeyD' /*D*/ ]; + + this.mouseButtons = { LEFT: MOUSE.ROTATE, MIDDLE: MOUSE.DOLLY, RIGHT: MOUSE.PAN }; + + // internals + + this.target = new Vector3(); + + const EPS = 0.000001; + + const lastPosition = new Vector3(); + let lastZoom = 1; + + let _state = STATE.NONE, + _keyState = STATE.NONE, + + _touchZoomDistanceStart = 0, + _touchZoomDistanceEnd = 0, + + _lastAngle = 0; + + const _eye = new Vector3(), + + _movePrev = new Vector2(), + _moveCurr = new Vector2(), + + _lastAxis = new Vector3(), + + _zoomStart = new Vector2(), + _zoomEnd = new Vector2(), + + _panStart = new Vector2(), + _panEnd = new Vector2(), + + _pointers = [], + _pointerPositions = {}; + + // for reset + + this.target0 = this.target.clone(); + this.position0 = this.object.position.clone(); + this.up0 = this.object.up.clone(); + this.zoom0 = this.object.zoom; + + // methods + + this.handleResize = function () { + + const box = scope.domElement.getBoundingClientRect(); + // adjustments come from similar code in the jquery offset() function + const d = scope.domElement.ownerDocument.documentElement; + scope.screen.left = box.left + window.pageXOffset - d.clientLeft; + scope.screen.top = box.top + window.pageYOffset - d.clientTop; + scope.screen.width = box.width; + scope.screen.height = box.height; + + }; + + const getMouseOnScreen = ( function () { + + const vector = new Vector2(); + + return function getMouseOnScreen( pageX, pageY ) { + + vector.set( + ( pageX - scope.screen.left ) / scope.screen.width, + ( pageY - scope.screen.top ) / scope.screen.height + ); + + return vector; + + }; + + }() ); + + const getMouseOnCircle = ( function () { + + const vector = new Vector2(); + + return function getMouseOnCircle( pageX, pageY ) { + + vector.set( + ( ( pageX - scope.screen.width * 0.5 - scope.screen.left ) / ( scope.screen.width * 0.5 ) ), + ( ( scope.screen.height + 2 * ( scope.screen.top - pageY ) ) / scope.screen.width ) // screen.width intentional + ); + + return vector; + + }; + + }() ); + + this.rotateCamera = ( function () { + + const axis = new Vector3(), + quaternion = new Quaternion(), + eyeDirection = new Vector3(), + objectUpDirection = new Vector3(), + objectSidewaysDirection = new Vector3(), + moveDirection = new Vector3(); + + return function rotateCamera() { + + moveDirection.set( _moveCurr.x - _movePrev.x, _moveCurr.y - _movePrev.y, 0 ); + let angle = moveDirection.length(); + + if ( angle ) { + + _eye.copy( scope.object.position ).sub( scope.target ); + + eyeDirection.copy( _eye ).normalize(); + objectUpDirection.copy( scope.object.up ).normalize(); + objectSidewaysDirection.crossVectors( objectUpDirection, eyeDirection ).normalize(); + + objectUpDirection.setLength( _moveCurr.y - _movePrev.y ); + objectSidewaysDirection.setLength( _moveCurr.x - _movePrev.x ); + + moveDirection.copy( objectUpDirection.add( objectSidewaysDirection ) ); + + axis.crossVectors( moveDirection, _eye ).normalize(); + + angle *= scope.rotateSpeed; + quaternion.setFromAxisAngle( axis, angle ); + + _eye.applyQuaternion( quaternion ); + scope.object.up.applyQuaternion( quaternion ); + + _lastAxis.copy( axis ); + _lastAngle = angle; + + } else if ( ! scope.staticMoving && _lastAngle ) { + + _lastAngle *= Math.sqrt( 1.0 - scope.dynamicDampingFactor ); + _eye.copy( scope.object.position ).sub( scope.target ); + quaternion.setFromAxisAngle( _lastAxis, _lastAngle ); + _eye.applyQuaternion( quaternion ); + scope.object.up.applyQuaternion( quaternion ); + + } + + _movePrev.copy( _moveCurr ); + + }; + + }() ); + + + this.zoomCamera = function () { + + let factor; + + if ( _state === STATE.TOUCH_ZOOM_PAN ) { + + factor = _touchZoomDistanceStart / _touchZoomDistanceEnd; + _touchZoomDistanceStart = _touchZoomDistanceEnd; + + if ( scope.object.isPerspectiveCamera ) { + + _eye.multiplyScalar( factor ); + + } else if ( scope.object.isOrthographicCamera ) { + + scope.object.zoom = MathUtils.clamp( scope.object.zoom / factor, scope.minZoom, scope.maxZoom ); + + if ( lastZoom !== scope.object.zoom ) { + + scope.object.updateProjectionMatrix(); + + } + + } else { + + console.warn( 'THREE.TrackballControls: Unsupported camera type' ); + + } + + } else { + + factor = 1.0 + ( _zoomEnd.y - _zoomStart.y ) * scope.zoomSpeed; + + if ( factor !== 1.0 && factor > 0.0 ) { + + if ( scope.object.isPerspectiveCamera ) { + + _eye.multiplyScalar( factor ); + + } else if ( scope.object.isOrthographicCamera ) { + + scope.object.zoom = MathUtils.clamp( scope.object.zoom / factor, scope.minZoom, scope.maxZoom ); + + if ( lastZoom !== scope.object.zoom ) { + + scope.object.updateProjectionMatrix(); + + } + + } else { + + console.warn( 'THREE.TrackballControls: Unsupported camera type' ); + + } + + } + + if ( scope.staticMoving ) { + + _zoomStart.copy( _zoomEnd ); + + } else { + + _zoomStart.y += ( _zoomEnd.y - _zoomStart.y ) * this.dynamicDampingFactor; + + } + + } + + }; + + this.panCamera = ( function () { + + const mouseChange = new Vector2(), + objectUp = new Vector3(), + pan = new Vector3(); + + return function panCamera() { + + mouseChange.copy( _panEnd ).sub( _panStart ); + + if ( mouseChange.lengthSq() ) { + + if ( scope.object.isOrthographicCamera ) { + + const scale_x = ( scope.object.right - scope.object.left ) / scope.object.zoom / scope.domElement.clientWidth; + const scale_y = ( scope.object.top - scope.object.bottom ) / scope.object.zoom / scope.domElement.clientWidth; + + mouseChange.x *= scale_x; + mouseChange.y *= scale_y; + + } + + mouseChange.multiplyScalar( _eye.length() * scope.panSpeed ); + + pan.copy( _eye ).cross( scope.object.up ).setLength( mouseChange.x ); + pan.add( objectUp.copy( scope.object.up ).setLength( mouseChange.y ) ); + + scope.object.position.add( pan ); + scope.target.add( pan ); + + if ( scope.staticMoving ) { + + _panStart.copy( _panEnd ); + + } else { + + _panStart.add( mouseChange.subVectors( _panEnd, _panStart ).multiplyScalar( scope.dynamicDampingFactor ) ); + + } + + } + + }; + + }() ); + + this.checkDistances = function () { + + if ( ! scope.noZoom || ! scope.noPan ) { + + if ( _eye.lengthSq() > scope.maxDistance * scope.maxDistance ) { + + scope.object.position.addVectors( scope.target, _eye.setLength( scope.maxDistance ) ); + _zoomStart.copy( _zoomEnd ); + + } + + if ( _eye.lengthSq() < scope.minDistance * scope.minDistance ) { + + scope.object.position.addVectors( scope.target, _eye.setLength( scope.minDistance ) ); + _zoomStart.copy( _zoomEnd ); + + } + + } + + }; + + this.update = function () { + + _eye.subVectors( scope.object.position, scope.target ); + + if ( ! scope.noRotate ) { + + scope.rotateCamera(); + + } + + if ( ! scope.noZoom ) { + + scope.zoomCamera(); + + } + + if ( ! scope.noPan ) { + + scope.panCamera(); + + } + + scope.object.position.addVectors( scope.target, _eye ); + + if ( scope.object.isPerspectiveCamera ) { + + scope.checkDistances(); + + scope.object.lookAt( scope.target ); + + if ( lastPosition.distanceToSquared( scope.object.position ) > EPS ) { + + scope.dispatchEvent( _changeEvent ); + + lastPosition.copy( scope.object.position ); + + } + + } else if ( scope.object.isOrthographicCamera ) { + + scope.object.lookAt( scope.target ); + + if ( lastPosition.distanceToSquared( scope.object.position ) > EPS || lastZoom !== scope.object.zoom ) { + + scope.dispatchEvent( _changeEvent ); + + lastPosition.copy( scope.object.position ); + lastZoom = scope.object.zoom; + + } + + } else { + + console.warn( 'THREE.TrackballControls: Unsupported camera type' ); + + } + + }; + + this.reset = function () { + + _state = STATE.NONE; + _keyState = STATE.NONE; + + scope.target.copy( scope.target0 ); + scope.object.position.copy( scope.position0 ); + scope.object.up.copy( scope.up0 ); + scope.object.zoom = scope.zoom0; + + scope.object.updateProjectionMatrix(); + + _eye.subVectors( scope.object.position, scope.target ); + + scope.object.lookAt( scope.target ); + + scope.dispatchEvent( _changeEvent ); + + lastPosition.copy( scope.object.position ); + lastZoom = scope.object.zoom; + + }; + + // listeners + + function onPointerDown( event ) { + + if ( scope.enabled === false ) return; + + if ( _pointers.length === 0 ) { + + scope.domElement.setPointerCapture( event.pointerId ); + + scope.domElement.addEventListener( 'pointermove', onPointerMove ); + scope.domElement.addEventListener( 'pointerup', onPointerUp ); + + } + + // + + addPointer( event ); + + if ( event.pointerType === 'touch' ) { + + onTouchStart( event ); + + } else { + + onMouseDown( event ); + + } + + } + + function onPointerMove( event ) { + + if ( scope.enabled === false ) return; + + if ( event.pointerType === 'touch' ) { + + onTouchMove( event ); + + } else { + + onMouseMove( event ); + + } + + } + + function onPointerUp( event ) { + + if ( scope.enabled === false ) return; + + if ( event.pointerType === 'touch' ) { + + onTouchEnd( event ); + + } else { + + onMouseUp(); + + } + + // + + removePointer( event ); + + if ( _pointers.length === 0 ) { + + scope.domElement.releasePointerCapture( event.pointerId ); + + scope.domElement.removeEventListener( 'pointermove', onPointerMove ); + scope.domElement.removeEventListener( 'pointerup', onPointerUp ); + + } + + + } + + function onPointerCancel( event ) { + + removePointer( event ); + + } + + function keydown( event ) { + + if ( scope.enabled === false ) return; + + window.removeEventListener( 'keydown', keydown ); + + if ( _keyState !== STATE.NONE ) { + + return; + + } else if ( event.code === scope.keys[ STATE.ROTATE ] && ! scope.noRotate ) { + + _keyState = STATE.ROTATE; + + } else if ( event.code === scope.keys[ STATE.ZOOM ] && ! scope.noZoom ) { + + _keyState = STATE.ZOOM; + + } else if ( event.code === scope.keys[ STATE.PAN ] && ! scope.noPan ) { + + _keyState = STATE.PAN; + + } + + } + + function keyup() { + + if ( scope.enabled === false ) return; + + _keyState = STATE.NONE; + + window.addEventListener( 'keydown', keydown ); + + } + + function onMouseDown( event ) { + + if ( _state === STATE.NONE ) { + + switch ( event.button ) { + + case scope.mouseButtons.LEFT: + _state = STATE.ROTATE; + break; + + case scope.mouseButtons.MIDDLE: + _state = STATE.ZOOM; + break; + + case scope.mouseButtons.RIGHT: + _state = STATE.PAN; + break; + + } + + } + + const state = ( _keyState !== STATE.NONE ) ? _keyState : _state; + + if ( state === STATE.ROTATE && ! scope.noRotate ) { + + _moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) ); + _movePrev.copy( _moveCurr ); + + } else if ( state === STATE.ZOOM && ! scope.noZoom ) { + + _zoomStart.copy( getMouseOnScreen( event.pageX, event.pageY ) ); + _zoomEnd.copy( _zoomStart ); + + } else if ( state === STATE.PAN && ! scope.noPan ) { + + _panStart.copy( getMouseOnScreen( event.pageX, event.pageY ) ); + _panEnd.copy( _panStart ); + + } + + scope.dispatchEvent( _startEvent ); + + } + + function onMouseMove( event ) { + + const state = ( _keyState !== STATE.NONE ) ? _keyState : _state; + + if ( state === STATE.ROTATE && ! scope.noRotate ) { + + _movePrev.copy( _moveCurr ); + _moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) ); + + } else if ( state === STATE.ZOOM && ! scope.noZoom ) { + + _zoomEnd.copy( getMouseOnScreen( event.pageX, event.pageY ) ); + + } else if ( state === STATE.PAN && ! scope.noPan ) { + + _panEnd.copy( getMouseOnScreen( event.pageX, event.pageY ) ); + + } + + } + + function onMouseUp() { + + _state = STATE.NONE; + + scope.dispatchEvent( _endEvent ); + + } + + function onMouseWheel( event ) { + + if ( scope.enabled === false ) return; + + if ( scope.noZoom === true ) return; + + event.preventDefault(); + + switch ( event.deltaMode ) { + + case 2: + // Zoom in pages + _zoomStart.y -= event.deltaY * 0.025; + break; + + case 1: + // Zoom in lines + _zoomStart.y -= event.deltaY * 0.01; + break; + + default: + // undefined, 0, assume pixels + _zoomStart.y -= event.deltaY * 0.00025; + break; + + } + + scope.dispatchEvent( _startEvent ); + scope.dispatchEvent( _endEvent ); + + } + + function onTouchStart( event ) { + + trackPointer( event ); + + switch ( _pointers.length ) { + + case 1: + _state = STATE.TOUCH_ROTATE; + _moveCurr.copy( getMouseOnCircle( _pointers[ 0 ].pageX, _pointers[ 0 ].pageY ) ); + _movePrev.copy( _moveCurr ); + break; + + default: // 2 or more + _state = STATE.TOUCH_ZOOM_PAN; + const dx = _pointers[ 0 ].pageX - _pointers[ 1 ].pageX; + const dy = _pointers[ 0 ].pageY - _pointers[ 1 ].pageY; + _touchZoomDistanceEnd = _touchZoomDistanceStart = Math.sqrt( dx * dx + dy * dy ); + + const x = ( _pointers[ 0 ].pageX + _pointers[ 1 ].pageX ) / 2; + const y = ( _pointers[ 0 ].pageY + _pointers[ 1 ].pageY ) / 2; + _panStart.copy( getMouseOnScreen( x, y ) ); + _panEnd.copy( _panStart ); + break; + + } + + scope.dispatchEvent( _startEvent ); + + } + + function onTouchMove( event ) { + + trackPointer( event ); + + switch ( _pointers.length ) { + + case 1: + _movePrev.copy( _moveCurr ); + _moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) ); + break; + + default: // 2 or more + + const position = getSecondPointerPosition( event ); + + const dx = event.pageX - position.x; + const dy = event.pageY - position.y; + _touchZoomDistanceEnd = Math.sqrt( dx * dx + dy * dy ); + + const x = ( event.pageX + position.x ) / 2; + const y = ( event.pageY + position.y ) / 2; + _panEnd.copy( getMouseOnScreen( x, y ) ); + break; + + } + + } + + function onTouchEnd( event ) { + + switch ( _pointers.length ) { + + case 0: + _state = STATE.NONE; + break; + + case 1: + _state = STATE.TOUCH_ROTATE; + _moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) ); + _movePrev.copy( _moveCurr ); + break; + + case 2: + _state = STATE.TOUCH_ZOOM_PAN; + + for ( let i = 0; i < _pointers.length; i ++ ) { + + if ( _pointers[ i ].pointerId !== event.pointerId ) { + + const position = _pointerPositions[ _pointers[ i ].pointerId ]; + _moveCurr.copy( getMouseOnCircle( position.x, position.y ) ); + _movePrev.copy( _moveCurr ); + break; + + } + + } + + break; + + } + + scope.dispatchEvent( _endEvent ); + + } + + function contextmenu( event ) { + + if ( scope.enabled === false ) return; + + event.preventDefault(); + + } + + function addPointer( event ) { + + _pointers.push( event ); + + } + + function removePointer( event ) { + + delete _pointerPositions[ event.pointerId ]; + + for ( let i = 0; i < _pointers.length; i ++ ) { + + if ( _pointers[ i ].pointerId == event.pointerId ) { + + _pointers.splice( i, 1 ); + return; + + } + + } + + } + + function trackPointer( event ) { + + let position = _pointerPositions[ event.pointerId ]; + + if ( position === undefined ) { + + position = new Vector2(); + _pointerPositions[ event.pointerId ] = position; + + } + + position.set( event.pageX, event.pageY ); + + } + + function getSecondPointerPosition( event ) { + + const pointer = ( event.pointerId === _pointers[ 0 ].pointerId ) ? _pointers[ 1 ] : _pointers[ 0 ]; + + return _pointerPositions[ pointer.pointerId ]; + + } + + this.dispose = function () { + + scope.domElement.removeEventListener( 'contextmenu', contextmenu ); + + scope.domElement.removeEventListener( 'pointerdown', onPointerDown ); + scope.domElement.removeEventListener( 'pointercancel', onPointerCancel ); + scope.domElement.removeEventListener( 'wheel', onMouseWheel ); + + scope.domElement.removeEventListener( 'pointermove', onPointerMove ); + scope.domElement.removeEventListener( 'pointerup', onPointerUp ); + + window.removeEventListener( 'keydown', keydown ); + window.removeEventListener( 'keyup', keyup ); + + }; + + this.domElement.addEventListener( 'contextmenu', contextmenu ); + + this.domElement.addEventListener( 'pointerdown', onPointerDown ); + this.domElement.addEventListener( 'pointercancel', onPointerCancel ); + this.domElement.addEventListener( 'wheel', onMouseWheel, { passive: false } ); + + + window.addEventListener( 'keydown', keydown ); + window.addEventListener( 'keyup', keyup ); + + this.handleResize(); + + // force an update at start + this.update(); + + } + +} + +export { TrackballControls }; diff --git a/node_modules/three/examples/jsm/controls/TransformControls.js b/node_modules/three/examples/jsm/controls/TransformControls.js new file mode 100644 index 0000000..0f7460d --- /dev/null +++ b/node_modules/three/examples/jsm/controls/TransformControls.js @@ -0,0 +1,1573 @@ +import { + BoxGeometry, + BufferGeometry, + CylinderGeometry, + DoubleSide, + Euler, + Float32BufferAttribute, + Line, + LineBasicMaterial, + Matrix4, + Mesh, + MeshBasicMaterial, + Object3D, + OctahedronGeometry, + PlaneGeometry, + Quaternion, + Raycaster, + SphereGeometry, + TorusGeometry, + Vector3 +} from 'three'; + +const _raycaster = new Raycaster(); + +const _tempVector = new Vector3(); +const _tempVector2 = new Vector3(); +const _tempQuaternion = new Quaternion(); +const _unit = { + X: new Vector3( 1, 0, 0 ), + Y: new Vector3( 0, 1, 0 ), + Z: new Vector3( 0, 0, 1 ) +}; + +const _changeEvent = { type: 'change' }; +const _mouseDownEvent = { type: 'mouseDown' }; +const _mouseUpEvent = { type: 'mouseUp', mode: null }; +const _objectChangeEvent = { type: 'objectChange' }; + +class TransformControls extends Object3D { + + constructor( camera, domElement ) { + + super(); + + if ( domElement === undefined ) { + + console.warn( 'THREE.TransformControls: The second parameter "domElement" is now mandatory.' ); + domElement = document; + + } + + this.isTransformControls = true; + + this.visible = false; + this.domElement = domElement; + this.domElement.style.touchAction = 'none'; // disable touch scroll + + const _gizmo = new TransformControlsGizmo(); + this._gizmo = _gizmo; + this.add( _gizmo ); + + const _plane = new TransformControlsPlane(); + this._plane = _plane; + this.add( _plane ); + + const scope = this; + + // Defined getter, setter and store for a property + function defineProperty( propName, defaultValue ) { + + let propValue = defaultValue; + + Object.defineProperty( scope, propName, { + + get: function () { + + return propValue !== undefined ? propValue : defaultValue; + + }, + + set: function ( value ) { + + if ( propValue !== value ) { + + propValue = value; + _plane[ propName ] = value; + _gizmo[ propName ] = value; + + scope.dispatchEvent( { type: propName + '-changed', value: value } ); + scope.dispatchEvent( _changeEvent ); + + } + + } + + } ); + + scope[ propName ] = defaultValue; + _plane[ propName ] = defaultValue; + _gizmo[ propName ] = defaultValue; + + } + + // Define properties with getters/setter + // Setting the defined property will automatically trigger change event + // Defined properties are passed down to gizmo and plane + + defineProperty( 'camera', camera ); + defineProperty( 'object', undefined ); + defineProperty( 'enabled', true ); + defineProperty( 'axis', null ); + defineProperty( 'mode', 'translate' ); + defineProperty( 'translationSnap', null ); + defineProperty( 'rotationSnap', null ); + defineProperty( 'scaleSnap', null ); + defineProperty( 'space', 'world' ); + defineProperty( 'size', 1 ); + defineProperty( 'dragging', false ); + defineProperty( 'showX', true ); + defineProperty( 'showY', true ); + defineProperty( 'showZ', true ); + + // Reusable utility variables + + const worldPosition = new Vector3(); + const worldPositionStart = new Vector3(); + const worldQuaternion = new Quaternion(); + const worldQuaternionStart = new Quaternion(); + const cameraPosition = new Vector3(); + const cameraQuaternion = new Quaternion(); + const pointStart = new Vector3(); + const pointEnd = new Vector3(); + const rotationAxis = new Vector3(); + const rotationAngle = 0; + const eye = new Vector3(); + + // TODO: remove properties unused in plane and gizmo + + defineProperty( 'worldPosition', worldPosition ); + defineProperty( 'worldPositionStart', worldPositionStart ); + defineProperty( 'worldQuaternion', worldQuaternion ); + defineProperty( 'worldQuaternionStart', worldQuaternionStart ); + defineProperty( 'cameraPosition', cameraPosition ); + defineProperty( 'cameraQuaternion', cameraQuaternion ); + defineProperty( 'pointStart', pointStart ); + defineProperty( 'pointEnd', pointEnd ); + defineProperty( 'rotationAxis', rotationAxis ); + defineProperty( 'rotationAngle', rotationAngle ); + defineProperty( 'eye', eye ); + + this._offset = new Vector3(); + this._startNorm = new Vector3(); + this._endNorm = new Vector3(); + this._cameraScale = new Vector3(); + + this._parentPosition = new Vector3(); + this._parentQuaternion = new Quaternion(); + this._parentQuaternionInv = new Quaternion(); + this._parentScale = new Vector3(); + + this._worldScaleStart = new Vector3(); + this._worldQuaternionInv = new Quaternion(); + this._worldScale = new Vector3(); + + this._positionStart = new Vector3(); + this._quaternionStart = new Quaternion(); + this._scaleStart = new Vector3(); + + this._getPointer = getPointer.bind( this ); + this._onPointerDown = onPointerDown.bind( this ); + this._onPointerHover = onPointerHover.bind( this ); + this._onPointerMove = onPointerMove.bind( this ); + this._onPointerUp = onPointerUp.bind( this ); + + this.domElement.addEventListener( 'pointerdown', this._onPointerDown ); + this.domElement.addEventListener( 'pointermove', this._onPointerHover ); + this.domElement.addEventListener( 'pointerup', this._onPointerUp ); + + } + + // updateMatrixWorld updates key transformation variables + updateMatrixWorld( force ) { + + if ( this.object !== undefined ) { + + this.object.updateMatrixWorld(); + + if ( this.object.parent === null ) { + + console.error( 'TransformControls: The attached 3D object must be a part of the scene graph.' ); + + } else { + + this.object.parent.matrixWorld.decompose( this._parentPosition, this._parentQuaternion, this._parentScale ); + + } + + this.object.matrixWorld.decompose( this.worldPosition, this.worldQuaternion, this._worldScale ); + + this._parentQuaternionInv.copy( this._parentQuaternion ).invert(); + this._worldQuaternionInv.copy( this.worldQuaternion ).invert(); + + } + + this.camera.updateMatrixWorld(); + this.camera.matrixWorld.decompose( this.cameraPosition, this.cameraQuaternion, this._cameraScale ); + + if ( this.camera.isOrthographicCamera ) { + + this.camera.getWorldDirection( this.eye ).negate(); + + } else { + + this.eye.copy( this.cameraPosition ).sub( this.worldPosition ).normalize(); + + } + + super.updateMatrixWorld( force ); + + } + + pointerHover( pointer ) { + + if ( this.object === undefined || this.dragging === true ) return; + + if ( pointer !== null ) _raycaster.setFromCamera( pointer, this.camera ); + + const intersect = intersectObjectWithRay( this._gizmo.picker[ this.mode ], _raycaster ); + + if ( intersect ) { + + this.axis = intersect.object.name; + + } else { + + this.axis = null; + + } + + } + + pointerDown( pointer ) { + + if ( this.object === undefined || this.dragging === true || ( pointer != null && pointer.button !== 0 ) ) return; + + if ( this.axis !== null ) { + + if ( pointer !== null ) _raycaster.setFromCamera( pointer, this.camera ); + + const planeIntersect = intersectObjectWithRay( this._plane, _raycaster, true ); + + if ( planeIntersect ) { + + this.object.updateMatrixWorld(); + this.object.parent.updateMatrixWorld(); + + this._positionStart.copy( this.object.position ); + this._quaternionStart.copy( this.object.quaternion ); + this._scaleStart.copy( this.object.scale ); + + this.object.matrixWorld.decompose( this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart ); + + this.pointStart.copy( planeIntersect.point ).sub( this.worldPositionStart ); + + } + + this.dragging = true; + _mouseDownEvent.mode = this.mode; + this.dispatchEvent( _mouseDownEvent ); + + } + + } + + pointerMove( pointer ) { + + const axis = this.axis; + const mode = this.mode; + const object = this.object; + let space = this.space; + + if ( mode === 'scale' ) { + + space = 'local'; + + } else if ( axis === 'E' || axis === 'XYZE' || axis === 'XYZ' ) { + + space = 'world'; + + } + + if ( object === undefined || axis === null || this.dragging === false || ( pointer !== null && pointer.button !== - 1 ) ) return; + + if ( pointer !== null ) _raycaster.setFromCamera( pointer, this.camera ); + + const planeIntersect = intersectObjectWithRay( this._plane, _raycaster, true ); + + if ( ! planeIntersect ) return; + + this.pointEnd.copy( planeIntersect.point ).sub( this.worldPositionStart ); + + if ( mode === 'translate' ) { + + // Apply translate + + this._offset.copy( this.pointEnd ).sub( this.pointStart ); + + if ( space === 'local' && axis !== 'XYZ' ) { + + this._offset.applyQuaternion( this._worldQuaternionInv ); + + } + + if ( axis.indexOf( 'X' ) === - 1 ) this._offset.x = 0; + if ( axis.indexOf( 'Y' ) === - 1 ) this._offset.y = 0; + if ( axis.indexOf( 'Z' ) === - 1 ) this._offset.z = 0; + + if ( space === 'local' && axis !== 'XYZ' ) { + + this._offset.applyQuaternion( this._quaternionStart ).divide( this._parentScale ); + + } else { + + this._offset.applyQuaternion( this._parentQuaternionInv ).divide( this._parentScale ); + + } + + object.position.copy( this._offset ).add( this._positionStart ); + + // Apply translation snap + + if ( this.translationSnap ) { + + if ( space === 'local' ) { + + object.position.applyQuaternion( _tempQuaternion.copy( this._quaternionStart ).invert() ); + + if ( axis.search( 'X' ) !== - 1 ) { + + object.position.x = Math.round( object.position.x / this.translationSnap ) * this.translationSnap; + + } + + if ( axis.search( 'Y' ) !== - 1 ) { + + object.position.y = Math.round( object.position.y / this.translationSnap ) * this.translationSnap; + + } + + if ( axis.search( 'Z' ) !== - 1 ) { + + object.position.z = Math.round( object.position.z / this.translationSnap ) * this.translationSnap; + + } + + object.position.applyQuaternion( this._quaternionStart ); + + } + + if ( space === 'world' ) { + + if ( object.parent ) { + + object.position.add( _tempVector.setFromMatrixPosition( object.parent.matrixWorld ) ); + + } + + if ( axis.search( 'X' ) !== - 1 ) { + + object.position.x = Math.round( object.position.x / this.translationSnap ) * this.translationSnap; + + } + + if ( axis.search( 'Y' ) !== - 1 ) { + + object.position.y = Math.round( object.position.y / this.translationSnap ) * this.translationSnap; + + } + + if ( axis.search( 'Z' ) !== - 1 ) { + + object.position.z = Math.round( object.position.z / this.translationSnap ) * this.translationSnap; + + } + + if ( object.parent ) { + + object.position.sub( _tempVector.setFromMatrixPosition( object.parent.matrixWorld ) ); + + } + + } + + } + + } else if ( mode === 'scale' ) { + + if ( axis.search( 'XYZ' ) !== - 1 ) { + + let d = this.pointEnd.length() / this.pointStart.length(); + + if ( this.pointEnd.dot( this.pointStart ) < 0 ) d *= - 1; + + _tempVector2.set( d, d, d ); + + } else { + + _tempVector.copy( this.pointStart ); + _tempVector2.copy( this.pointEnd ); + + _tempVector.applyQuaternion( this._worldQuaternionInv ); + _tempVector2.applyQuaternion( this._worldQuaternionInv ); + + _tempVector2.divide( _tempVector ); + + if ( axis.search( 'X' ) === - 1 ) { + + _tempVector2.x = 1; + + } + + if ( axis.search( 'Y' ) === - 1 ) { + + _tempVector2.y = 1; + + } + + if ( axis.search( 'Z' ) === - 1 ) { + + _tempVector2.z = 1; + + } + + } + + // Apply scale + + object.scale.copy( this._scaleStart ).multiply( _tempVector2 ); + + if ( this.scaleSnap ) { + + if ( axis.search( 'X' ) !== - 1 ) { + + object.scale.x = Math.round( object.scale.x / this.scaleSnap ) * this.scaleSnap || this.scaleSnap; + + } + + if ( axis.search( 'Y' ) !== - 1 ) { + + object.scale.y = Math.round( object.scale.y / this.scaleSnap ) * this.scaleSnap || this.scaleSnap; + + } + + if ( axis.search( 'Z' ) !== - 1 ) { + + object.scale.z = Math.round( object.scale.z / this.scaleSnap ) * this.scaleSnap || this.scaleSnap; + + } + + } + + } else if ( mode === 'rotate' ) { + + this._offset.copy( this.pointEnd ).sub( this.pointStart ); + + const ROTATION_SPEED = 20 / this.worldPosition.distanceTo( _tempVector.setFromMatrixPosition( this.camera.matrixWorld ) ); + + let _inPlaneRotation = false; + + if ( axis === 'XYZE' ) { + + this.rotationAxis.copy( this._offset ).cross( this.eye ).normalize(); + this.rotationAngle = this._offset.dot( _tempVector.copy( this.rotationAxis ).cross( this.eye ) ) * ROTATION_SPEED; + + } else if ( axis === 'X' || axis === 'Y' || axis === 'Z' ) { + + this.rotationAxis.copy( _unit[ axis ] ); + + _tempVector.copy( _unit[ axis ] ); + + if ( space === 'local' ) { + + _tempVector.applyQuaternion( this.worldQuaternion ); + + } + + _tempVector.cross( this.eye ); + + // When _tempVector is 0 after cross with this.eye the vectors are parallel and should use in-plane rotation logic. + if ( _tempVector.length() === 0 ) { + + _inPlaneRotation = true; + + } else { + + this.rotationAngle = this._offset.dot( _tempVector.normalize() ) * ROTATION_SPEED; + + } + + + } + + if ( axis === 'E' || _inPlaneRotation ) { + + this.rotationAxis.copy( this.eye ); + this.rotationAngle = this.pointEnd.angleTo( this.pointStart ); + + this._startNorm.copy( this.pointStart ).normalize(); + this._endNorm.copy( this.pointEnd ).normalize(); + + this.rotationAngle *= ( this._endNorm.cross( this._startNorm ).dot( this.eye ) < 0 ? 1 : - 1 ); + + } + + // Apply rotation snap + + if ( this.rotationSnap ) this.rotationAngle = Math.round( this.rotationAngle / this.rotationSnap ) * this.rotationSnap; + + // Apply rotate + if ( space === 'local' && axis !== 'E' && axis !== 'XYZE' ) { + + object.quaternion.copy( this._quaternionStart ); + object.quaternion.multiply( _tempQuaternion.setFromAxisAngle( this.rotationAxis, this.rotationAngle ) ).normalize(); + + } else { + + this.rotationAxis.applyQuaternion( this._parentQuaternionInv ); + object.quaternion.copy( _tempQuaternion.setFromAxisAngle( this.rotationAxis, this.rotationAngle ) ); + object.quaternion.multiply( this._quaternionStart ).normalize(); + + } + + } + + this.dispatchEvent( _changeEvent ); + this.dispatchEvent( _objectChangeEvent ); + + } + + pointerUp( pointer ) { + + if ( pointer !== null && pointer.button !== 0 ) return; + + if ( this.dragging && ( this.axis !== null ) ) { + + _mouseUpEvent.mode = this.mode; + this.dispatchEvent( _mouseUpEvent ); + + } + + this.dragging = false; + this.axis = null; + + } + + dispose() { + + this.domElement.removeEventListener( 'pointerdown', this._onPointerDown ); + this.domElement.removeEventListener( 'pointermove', this._onPointerHover ); + this.domElement.removeEventListener( 'pointermove', this._onPointerMove ); + this.domElement.removeEventListener( 'pointerup', this._onPointerUp ); + + this.traverse( function ( child ) { + + if ( child.geometry ) child.geometry.dispose(); + if ( child.material ) child.material.dispose(); + + } ); + + } + + // Set current object + attach( object ) { + + this.object = object; + this.visible = true; + + return this; + + } + + // Detach from object + detach() { + + this.object = undefined; + this.visible = false; + this.axis = null; + + return this; + + } + + reset() { + + if ( ! this.enabled ) return; + + if ( this.dragging ) { + + this.object.position.copy( this._positionStart ); + this.object.quaternion.copy( this._quaternionStart ); + this.object.scale.copy( this._scaleStart ); + + this.dispatchEvent( _changeEvent ); + this.dispatchEvent( _objectChangeEvent ); + + this.pointStart.copy( this.pointEnd ); + + } + + } + + getRaycaster() { + + return _raycaster; + + } + + // TODO: deprecate + + getMode() { + + return this.mode; + + } + + setMode( mode ) { + + this.mode = mode; + + } + + setTranslationSnap( translationSnap ) { + + this.translationSnap = translationSnap; + + } + + setRotationSnap( rotationSnap ) { + + this.rotationSnap = rotationSnap; + + } + + setScaleSnap( scaleSnap ) { + + this.scaleSnap = scaleSnap; + + } + + setSize( size ) { + + this.size = size; + + } + + setSpace( space ) { + + this.space = space; + + } + +} + +// mouse / touch event handlers + +function getPointer( event ) { + + if ( this.domElement.ownerDocument.pointerLockElement ) { + + return { + x: 0, + y: 0, + button: event.button + }; + + } else { + + const rect = this.domElement.getBoundingClientRect(); + + return { + x: ( event.clientX - rect.left ) / rect.width * 2 - 1, + y: - ( event.clientY - rect.top ) / rect.height * 2 + 1, + button: event.button + }; + + } + +} + +function onPointerHover( event ) { + + if ( ! this.enabled ) return; + + switch ( event.pointerType ) { + + case 'mouse': + case 'pen': + this.pointerHover( this._getPointer( event ) ); + break; + + } + +} + +function onPointerDown( event ) { + + if ( ! this.enabled ) return; + + if ( ! document.pointerLockElement ) { + + this.domElement.setPointerCapture( event.pointerId ); + + } + + this.domElement.addEventListener( 'pointermove', this._onPointerMove ); + + this.pointerHover( this._getPointer( event ) ); + this.pointerDown( this._getPointer( event ) ); + +} + +function onPointerMove( event ) { + + if ( ! this.enabled ) return; + + this.pointerMove( this._getPointer( event ) ); + +} + +function onPointerUp( event ) { + + if ( ! this.enabled ) return; + + this.domElement.releasePointerCapture( event.pointerId ); + + this.domElement.removeEventListener( 'pointermove', this._onPointerMove ); + + this.pointerUp( this._getPointer( event ) ); + +} + +function intersectObjectWithRay( object, raycaster, includeInvisible ) { + + const allIntersections = raycaster.intersectObject( object, true ); + + for ( let i = 0; i < allIntersections.length; i ++ ) { + + if ( allIntersections[ i ].object.visible || includeInvisible ) { + + return allIntersections[ i ]; + + } + + } + + return false; + +} + +// + +// Reusable utility variables + +const _tempEuler = new Euler(); +const _alignVector = new Vector3( 0, 1, 0 ); +const _zeroVector = new Vector3( 0, 0, 0 ); +const _lookAtMatrix = new Matrix4(); +const _tempQuaternion2 = new Quaternion(); +const _identityQuaternion = new Quaternion(); +const _dirVector = new Vector3(); +const _tempMatrix = new Matrix4(); + +const _unitX = new Vector3( 1, 0, 0 ); +const _unitY = new Vector3( 0, 1, 0 ); +const _unitZ = new Vector3( 0, 0, 1 ); + +const _v1 = new Vector3(); +const _v2 = new Vector3(); +const _v3 = new Vector3(); + +class TransformControlsGizmo extends Object3D { + + constructor() { + + super(); + + this.isTransformControlsGizmo = true; + + this.type = 'TransformControlsGizmo'; + + // shared materials + + const gizmoMaterial = new MeshBasicMaterial( { + depthTest: false, + depthWrite: false, + fog: false, + toneMapped: false, + transparent: true + } ); + + const gizmoLineMaterial = new LineBasicMaterial( { + depthTest: false, + depthWrite: false, + fog: false, + toneMapped: false, + transparent: true + } ); + + // Make unique material for each axis/color + + const matInvisible = gizmoMaterial.clone(); + matInvisible.opacity = 0.15; + + const matHelper = gizmoLineMaterial.clone(); + matHelper.opacity = 0.5; + + const matRed = gizmoMaterial.clone(); + matRed.color.setHex( 0xff0000 ); + + const matGreen = gizmoMaterial.clone(); + matGreen.color.setHex( 0x00ff00 ); + + const matBlue = gizmoMaterial.clone(); + matBlue.color.setHex( 0x0000ff ); + + const matRedTransparent = gizmoMaterial.clone(); + matRedTransparent.color.setHex( 0xff0000 ); + matRedTransparent.opacity = 0.5; + + const matGreenTransparent = gizmoMaterial.clone(); + matGreenTransparent.color.setHex( 0x00ff00 ); + matGreenTransparent.opacity = 0.5; + + const matBlueTransparent = gizmoMaterial.clone(); + matBlueTransparent.color.setHex( 0x0000ff ); + matBlueTransparent.opacity = 0.5; + + const matWhiteTransparent = gizmoMaterial.clone(); + matWhiteTransparent.opacity = 0.25; + + const matYellowTransparent = gizmoMaterial.clone(); + matYellowTransparent.color.setHex( 0xffff00 ); + matYellowTransparent.opacity = 0.25; + + const matYellow = gizmoMaterial.clone(); + matYellow.color.setHex( 0xffff00 ); + + const matGray = gizmoMaterial.clone(); + matGray.color.setHex( 0x787878 ); + + // reusable geometry + + const arrowGeometry = new CylinderGeometry( 0, 0.04, 0.1, 12 ); + arrowGeometry.translate( 0, 0.05, 0 ); + + const scaleHandleGeometry = new BoxGeometry( 0.08, 0.08, 0.08 ); + scaleHandleGeometry.translate( 0, 0.04, 0 ); + + const lineGeometry = new BufferGeometry(); + lineGeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 1, 0, 0 ], 3 ) ); + + const lineGeometry2 = new CylinderGeometry( 0.0075, 0.0075, 0.5, 3 ); + lineGeometry2.translate( 0, 0.25, 0 ); + + function CircleGeometry( radius, arc ) { + + const geometry = new TorusGeometry( radius, 0.0075, 3, 64, arc * Math.PI * 2 ); + geometry.rotateY( Math.PI / 2 ); + geometry.rotateX( Math.PI / 2 ); + return geometry; + + } + + // Special geometry for transform helper. If scaled with position vector it spans from [0,0,0] to position + + function TranslateHelperGeometry() { + + const geometry = new BufferGeometry(); + + geometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 1, 1, 1 ], 3 ) ); + + return geometry; + + } + + // Gizmo definitions - custom hierarchy definitions for setupGizmo() function + + const gizmoTranslate = { + X: [ + [ new Mesh( arrowGeometry, matRed ), [ 0.5, 0, 0 ], [ 0, 0, - Math.PI / 2 ]], + [ new Mesh( arrowGeometry, matRed ), [ - 0.5, 0, 0 ], [ 0, 0, Math.PI / 2 ]], + [ new Mesh( lineGeometry2, matRed ), [ 0, 0, 0 ], [ 0, 0, - Math.PI / 2 ]] + ], + Y: [ + [ new Mesh( arrowGeometry, matGreen ), [ 0, 0.5, 0 ]], + [ new Mesh( arrowGeometry, matGreen ), [ 0, - 0.5, 0 ], [ Math.PI, 0, 0 ]], + [ new Mesh( lineGeometry2, matGreen ) ] + ], + Z: [ + [ new Mesh( arrowGeometry, matBlue ), [ 0, 0, 0.5 ], [ Math.PI / 2, 0, 0 ]], + [ new Mesh( arrowGeometry, matBlue ), [ 0, 0, - 0.5 ], [ - Math.PI / 2, 0, 0 ]], + [ new Mesh( lineGeometry2, matBlue ), null, [ Math.PI / 2, 0, 0 ]] + ], + XYZ: [ + [ new Mesh( new OctahedronGeometry( 0.1, 0 ), matWhiteTransparent.clone() ), [ 0, 0, 0 ]] + ], + XY: [ + [ new Mesh( new BoxGeometry( 0.15, 0.15, 0.01 ), matBlueTransparent.clone() ), [ 0.15, 0.15, 0 ]] + ], + YZ: [ + [ new Mesh( new BoxGeometry( 0.15, 0.15, 0.01 ), matRedTransparent.clone() ), [ 0, 0.15, 0.15 ], [ 0, Math.PI / 2, 0 ]] + ], + XZ: [ + [ new Mesh( new BoxGeometry( 0.15, 0.15, 0.01 ), matGreenTransparent.clone() ), [ 0.15, 0, 0.15 ], [ - Math.PI / 2, 0, 0 ]] + ] + }; + + const pickerTranslate = { + X: [ + [ new Mesh( new CylinderGeometry( 0.2, 0, 0.6, 4 ), matInvisible ), [ 0.3, 0, 0 ], [ 0, 0, - Math.PI / 2 ]], + [ new Mesh( new CylinderGeometry( 0.2, 0, 0.6, 4 ), matInvisible ), [ - 0.3, 0, 0 ], [ 0, 0, Math.PI / 2 ]] + ], + Y: [ + [ new Mesh( new CylinderGeometry( 0.2, 0, 0.6, 4 ), matInvisible ), [ 0, 0.3, 0 ]], + [ new Mesh( new CylinderGeometry( 0.2, 0, 0.6, 4 ), matInvisible ), [ 0, - 0.3, 0 ], [ 0, 0, Math.PI ]] + ], + Z: [ + [ new Mesh( new CylinderGeometry( 0.2, 0, 0.6, 4 ), matInvisible ), [ 0, 0, 0.3 ], [ Math.PI / 2, 0, 0 ]], + [ new Mesh( new CylinderGeometry( 0.2, 0, 0.6, 4 ), matInvisible ), [ 0, 0, - 0.3 ], [ - Math.PI / 2, 0, 0 ]] + ], + XYZ: [ + [ new Mesh( new OctahedronGeometry( 0.2, 0 ), matInvisible ) ] + ], + XY: [ + [ new Mesh( new BoxGeometry( 0.2, 0.2, 0.01 ), matInvisible ), [ 0.15, 0.15, 0 ]] + ], + YZ: [ + [ new Mesh( new BoxGeometry( 0.2, 0.2, 0.01 ), matInvisible ), [ 0, 0.15, 0.15 ], [ 0, Math.PI / 2, 0 ]] + ], + XZ: [ + [ new Mesh( new BoxGeometry( 0.2, 0.2, 0.01 ), matInvisible ), [ 0.15, 0, 0.15 ], [ - Math.PI / 2, 0, 0 ]] + ] + }; + + const helperTranslate = { + START: [ + [ new Mesh( new OctahedronGeometry( 0.01, 2 ), matHelper ), null, null, null, 'helper' ] + ], + END: [ + [ new Mesh( new OctahedronGeometry( 0.01, 2 ), matHelper ), null, null, null, 'helper' ] + ], + DELTA: [ + [ new Line( TranslateHelperGeometry(), matHelper ), null, null, null, 'helper' ] + ], + X: [ + [ new Line( lineGeometry, matHelper.clone() ), [ - 1e3, 0, 0 ], null, [ 1e6, 1, 1 ], 'helper' ] + ], + Y: [ + [ new Line( lineGeometry, matHelper.clone() ), [ 0, - 1e3, 0 ], [ 0, 0, Math.PI / 2 ], [ 1e6, 1, 1 ], 'helper' ] + ], + Z: [ + [ new Line( lineGeometry, matHelper.clone() ), [ 0, 0, - 1e3 ], [ 0, - Math.PI / 2, 0 ], [ 1e6, 1, 1 ], 'helper' ] + ] + }; + + const gizmoRotate = { + XYZE: [ + [ new Mesh( CircleGeometry( 0.5, 1 ), matGray ), null, [ 0, Math.PI / 2, 0 ]] + ], + X: [ + [ new Mesh( CircleGeometry( 0.5, 0.5 ), matRed ) ] + ], + Y: [ + [ new Mesh( CircleGeometry( 0.5, 0.5 ), matGreen ), null, [ 0, 0, - Math.PI / 2 ]] + ], + Z: [ + [ new Mesh( CircleGeometry( 0.5, 0.5 ), matBlue ), null, [ 0, Math.PI / 2, 0 ]] + ], + E: [ + [ new Mesh( CircleGeometry( 0.75, 1 ), matYellowTransparent ), null, [ 0, Math.PI / 2, 0 ]] + ] + }; + + const helperRotate = { + AXIS: [ + [ new Line( lineGeometry, matHelper.clone() ), [ - 1e3, 0, 0 ], null, [ 1e6, 1, 1 ], 'helper' ] + ] + }; + + const pickerRotate = { + XYZE: [ + [ new Mesh( new SphereGeometry( 0.25, 10, 8 ), matInvisible ) ] + ], + X: [ + [ new Mesh( new TorusGeometry( 0.5, 0.1, 4, 24 ), matInvisible ), [ 0, 0, 0 ], [ 0, - Math.PI / 2, - Math.PI / 2 ]], + ], + Y: [ + [ new Mesh( new TorusGeometry( 0.5, 0.1, 4, 24 ), matInvisible ), [ 0, 0, 0 ], [ Math.PI / 2, 0, 0 ]], + ], + Z: [ + [ new Mesh( new TorusGeometry( 0.5, 0.1, 4, 24 ), matInvisible ), [ 0, 0, 0 ], [ 0, 0, - Math.PI / 2 ]], + ], + E: [ + [ new Mesh( new TorusGeometry( 0.75, 0.1, 2, 24 ), matInvisible ) ] + ] + }; + + const gizmoScale = { + X: [ + [ new Mesh( scaleHandleGeometry, matRed ), [ 0.5, 0, 0 ], [ 0, 0, - Math.PI / 2 ]], + [ new Mesh( lineGeometry2, matRed ), [ 0, 0, 0 ], [ 0, 0, - Math.PI / 2 ]], + [ new Mesh( scaleHandleGeometry, matRed ), [ - 0.5, 0, 0 ], [ 0, 0, Math.PI / 2 ]], + ], + Y: [ + [ new Mesh( scaleHandleGeometry, matGreen ), [ 0, 0.5, 0 ]], + [ new Mesh( lineGeometry2, matGreen ) ], + [ new Mesh( scaleHandleGeometry, matGreen ), [ 0, - 0.5, 0 ], [ 0, 0, Math.PI ]], + ], + Z: [ + [ new Mesh( scaleHandleGeometry, matBlue ), [ 0, 0, 0.5 ], [ Math.PI / 2, 0, 0 ]], + [ new Mesh( lineGeometry2, matBlue ), [ 0, 0, 0 ], [ Math.PI / 2, 0, 0 ]], + [ new Mesh( scaleHandleGeometry, matBlue ), [ 0, 0, - 0.5 ], [ - Math.PI / 2, 0, 0 ]] + ], + XY: [ + [ new Mesh( new BoxGeometry( 0.15, 0.15, 0.01 ), matBlueTransparent ), [ 0.15, 0.15, 0 ]] + ], + YZ: [ + [ new Mesh( new BoxGeometry( 0.15, 0.15, 0.01 ), matRedTransparent ), [ 0, 0.15, 0.15 ], [ 0, Math.PI / 2, 0 ]] + ], + XZ: [ + [ new Mesh( new BoxGeometry( 0.15, 0.15, 0.01 ), matGreenTransparent ), [ 0.15, 0, 0.15 ], [ - Math.PI / 2, 0, 0 ]] + ], + XYZ: [ + [ new Mesh( new BoxGeometry( 0.1, 0.1, 0.1 ), matWhiteTransparent.clone() ) ], + ] + }; + + const pickerScale = { + X: [ + [ new Mesh( new CylinderGeometry( 0.2, 0, 0.6, 4 ), matInvisible ), [ 0.3, 0, 0 ], [ 0, 0, - Math.PI / 2 ]], + [ new Mesh( new CylinderGeometry( 0.2, 0, 0.6, 4 ), matInvisible ), [ - 0.3, 0, 0 ], [ 0, 0, Math.PI / 2 ]] + ], + Y: [ + [ new Mesh( new CylinderGeometry( 0.2, 0, 0.6, 4 ), matInvisible ), [ 0, 0.3, 0 ]], + [ new Mesh( new CylinderGeometry( 0.2, 0, 0.6, 4 ), matInvisible ), [ 0, - 0.3, 0 ], [ 0, 0, Math.PI ]] + ], + Z: [ + [ new Mesh( new CylinderGeometry( 0.2, 0, 0.6, 4 ), matInvisible ), [ 0, 0, 0.3 ], [ Math.PI / 2, 0, 0 ]], + [ new Mesh( new CylinderGeometry( 0.2, 0, 0.6, 4 ), matInvisible ), [ 0, 0, - 0.3 ], [ - Math.PI / 2, 0, 0 ]] + ], + XY: [ + [ new Mesh( new BoxGeometry( 0.2, 0.2, 0.01 ), matInvisible ), [ 0.15, 0.15, 0 ]], + ], + YZ: [ + [ new Mesh( new BoxGeometry( 0.2, 0.2, 0.01 ), matInvisible ), [ 0, 0.15, 0.15 ], [ 0, Math.PI / 2, 0 ]], + ], + XZ: [ + [ new Mesh( new BoxGeometry( 0.2, 0.2, 0.01 ), matInvisible ), [ 0.15, 0, 0.15 ], [ - Math.PI / 2, 0, 0 ]], + ], + XYZ: [ + [ new Mesh( new BoxGeometry( 0.2, 0.2, 0.2 ), matInvisible ), [ 0, 0, 0 ]], + ] + }; + + const helperScale = { + X: [ + [ new Line( lineGeometry, matHelper.clone() ), [ - 1e3, 0, 0 ], null, [ 1e6, 1, 1 ], 'helper' ] + ], + Y: [ + [ new Line( lineGeometry, matHelper.clone() ), [ 0, - 1e3, 0 ], [ 0, 0, Math.PI / 2 ], [ 1e6, 1, 1 ], 'helper' ] + ], + Z: [ + [ new Line( lineGeometry, matHelper.clone() ), [ 0, 0, - 1e3 ], [ 0, - Math.PI / 2, 0 ], [ 1e6, 1, 1 ], 'helper' ] + ] + }; + + // Creates an Object3D with gizmos described in custom hierarchy definition. + + function setupGizmo( gizmoMap ) { + + const gizmo = new Object3D(); + + for ( const name in gizmoMap ) { + + for ( let i = gizmoMap[ name ].length; i --; ) { + + const object = gizmoMap[ name ][ i ][ 0 ].clone(); + const position = gizmoMap[ name ][ i ][ 1 ]; + const rotation = gizmoMap[ name ][ i ][ 2 ]; + const scale = gizmoMap[ name ][ i ][ 3 ]; + const tag = gizmoMap[ name ][ i ][ 4 ]; + + // name and tag properties are essential for picking and updating logic. + object.name = name; + object.tag = tag; + + if ( position ) { + + object.position.set( position[ 0 ], position[ 1 ], position[ 2 ] ); + + } + + if ( rotation ) { + + object.rotation.set( rotation[ 0 ], rotation[ 1 ], rotation[ 2 ] ); + + } + + if ( scale ) { + + object.scale.set( scale[ 0 ], scale[ 1 ], scale[ 2 ] ); + + } + + object.updateMatrix(); + + const tempGeometry = object.geometry.clone(); + tempGeometry.applyMatrix4( object.matrix ); + object.geometry = tempGeometry; + object.renderOrder = Infinity; + + object.position.set( 0, 0, 0 ); + object.rotation.set( 0, 0, 0 ); + object.scale.set( 1, 1, 1 ); + + gizmo.add( object ); + + } + + } + + return gizmo; + + } + + // Gizmo creation + + this.gizmo = {}; + this.picker = {}; + this.helper = {}; + + this.add( this.gizmo[ 'translate' ] = setupGizmo( gizmoTranslate ) ); + this.add( this.gizmo[ 'rotate' ] = setupGizmo( gizmoRotate ) ); + this.add( this.gizmo[ 'scale' ] = setupGizmo( gizmoScale ) ); + this.add( this.picker[ 'translate' ] = setupGizmo( pickerTranslate ) ); + this.add( this.picker[ 'rotate' ] = setupGizmo( pickerRotate ) ); + this.add( this.picker[ 'scale' ] = setupGizmo( pickerScale ) ); + this.add( this.helper[ 'translate' ] = setupGizmo( helperTranslate ) ); + this.add( this.helper[ 'rotate' ] = setupGizmo( helperRotate ) ); + this.add( this.helper[ 'scale' ] = setupGizmo( helperScale ) ); + + // Pickers should be hidden always + + this.picker[ 'translate' ].visible = false; + this.picker[ 'rotate' ].visible = false; + this.picker[ 'scale' ].visible = false; + + } + + // updateMatrixWorld will update transformations and appearance of individual handles + + updateMatrixWorld( force ) { + + const space = ( this.mode === 'scale' ) ? 'local' : this.space; // scale always oriented to local rotation + + const quaternion = ( space === 'local' ) ? this.worldQuaternion : _identityQuaternion; + + // Show only gizmos for current transform mode + + this.gizmo[ 'translate' ].visible = this.mode === 'translate'; + this.gizmo[ 'rotate' ].visible = this.mode === 'rotate'; + this.gizmo[ 'scale' ].visible = this.mode === 'scale'; + + this.helper[ 'translate' ].visible = this.mode === 'translate'; + this.helper[ 'rotate' ].visible = this.mode === 'rotate'; + this.helper[ 'scale' ].visible = this.mode === 'scale'; + + + let handles = []; + handles = handles.concat( this.picker[ this.mode ].children ); + handles = handles.concat( this.gizmo[ this.mode ].children ); + handles = handles.concat( this.helper[ this.mode ].children ); + + for ( let i = 0; i < handles.length; i ++ ) { + + const handle = handles[ i ]; + + // hide aligned to camera + + handle.visible = true; + handle.rotation.set( 0, 0, 0 ); + handle.position.copy( this.worldPosition ); + + let factor; + + if ( this.camera.isOrthographicCamera ) { + + factor = ( this.camera.top - this.camera.bottom ) / this.camera.zoom; + + } else { + + factor = this.worldPosition.distanceTo( this.cameraPosition ) * Math.min( 1.9 * Math.tan( Math.PI * this.camera.fov / 360 ) / this.camera.zoom, 7 ); + + } + + handle.scale.set( 1, 1, 1 ).multiplyScalar( factor * this.size / 4 ); + + // TODO: simplify helpers and consider decoupling from gizmo + + if ( handle.tag === 'helper' ) { + + handle.visible = false; + + if ( handle.name === 'AXIS' ) { + + handle.visible = !! this.axis; + + if ( this.axis === 'X' ) { + + _tempQuaternion.setFromEuler( _tempEuler.set( 0, 0, 0 ) ); + handle.quaternion.copy( quaternion ).multiply( _tempQuaternion ); + + if ( Math.abs( _alignVector.copy( _unitX ).applyQuaternion( quaternion ).dot( this.eye ) ) > 0.9 ) { + + handle.visible = false; + + } + + } + + if ( this.axis === 'Y' ) { + + _tempQuaternion.setFromEuler( _tempEuler.set( 0, 0, Math.PI / 2 ) ); + handle.quaternion.copy( quaternion ).multiply( _tempQuaternion ); + + if ( Math.abs( _alignVector.copy( _unitY ).applyQuaternion( quaternion ).dot( this.eye ) ) > 0.9 ) { + + handle.visible = false; + + } + + } + + if ( this.axis === 'Z' ) { + + _tempQuaternion.setFromEuler( _tempEuler.set( 0, Math.PI / 2, 0 ) ); + handle.quaternion.copy( quaternion ).multiply( _tempQuaternion ); + + if ( Math.abs( _alignVector.copy( _unitZ ).applyQuaternion( quaternion ).dot( this.eye ) ) > 0.9 ) { + + handle.visible = false; + + } + + } + + if ( this.axis === 'XYZE' ) { + + _tempQuaternion.setFromEuler( _tempEuler.set( 0, Math.PI / 2, 0 ) ); + _alignVector.copy( this.rotationAxis ); + handle.quaternion.setFromRotationMatrix( _lookAtMatrix.lookAt( _zeroVector, _alignVector, _unitY ) ); + handle.quaternion.multiply( _tempQuaternion ); + handle.visible = this.dragging; + + } + + if ( this.axis === 'E' ) { + + handle.visible = false; + + } + + + } else if ( handle.name === 'START' ) { + + handle.position.copy( this.worldPositionStart ); + handle.visible = this.dragging; + + } else if ( handle.name === 'END' ) { + + handle.position.copy( this.worldPosition ); + handle.visible = this.dragging; + + } else if ( handle.name === 'DELTA' ) { + + handle.position.copy( this.worldPositionStart ); + handle.quaternion.copy( this.worldQuaternionStart ); + _tempVector.set( 1e-10, 1e-10, 1e-10 ).add( this.worldPositionStart ).sub( this.worldPosition ).multiplyScalar( - 1 ); + _tempVector.applyQuaternion( this.worldQuaternionStart.clone().invert() ); + handle.scale.copy( _tempVector ); + handle.visible = this.dragging; + + } else { + + handle.quaternion.copy( quaternion ); + + if ( this.dragging ) { + + handle.position.copy( this.worldPositionStart ); + + } else { + + handle.position.copy( this.worldPosition ); + + } + + if ( this.axis ) { + + handle.visible = this.axis.search( handle.name ) !== - 1; + + } + + } + + // If updating helper, skip rest of the loop + continue; + + } + + // Align handles to current local or world rotation + + handle.quaternion.copy( quaternion ); + + if ( this.mode === 'translate' || this.mode === 'scale' ) { + + // Hide translate and scale axis facing the camera + + const AXIS_HIDE_THRESHOLD = 0.99; + const PLANE_HIDE_THRESHOLD = 0.2; + + if ( handle.name === 'X' ) { + + if ( Math.abs( _alignVector.copy( _unitX ).applyQuaternion( quaternion ).dot( this.eye ) ) > AXIS_HIDE_THRESHOLD ) { + + handle.scale.set( 1e-10, 1e-10, 1e-10 ); + handle.visible = false; + + } + + } + + if ( handle.name === 'Y' ) { + + if ( Math.abs( _alignVector.copy( _unitY ).applyQuaternion( quaternion ).dot( this.eye ) ) > AXIS_HIDE_THRESHOLD ) { + + handle.scale.set( 1e-10, 1e-10, 1e-10 ); + handle.visible = false; + + } + + } + + if ( handle.name === 'Z' ) { + + if ( Math.abs( _alignVector.copy( _unitZ ).applyQuaternion( quaternion ).dot( this.eye ) ) > AXIS_HIDE_THRESHOLD ) { + + handle.scale.set( 1e-10, 1e-10, 1e-10 ); + handle.visible = false; + + } + + } + + if ( handle.name === 'XY' ) { + + if ( Math.abs( _alignVector.copy( _unitZ ).applyQuaternion( quaternion ).dot( this.eye ) ) < PLANE_HIDE_THRESHOLD ) { + + handle.scale.set( 1e-10, 1e-10, 1e-10 ); + handle.visible = false; + + } + + } + + if ( handle.name === 'YZ' ) { + + if ( Math.abs( _alignVector.copy( _unitX ).applyQuaternion( quaternion ).dot( this.eye ) ) < PLANE_HIDE_THRESHOLD ) { + + handle.scale.set( 1e-10, 1e-10, 1e-10 ); + handle.visible = false; + + } + + } + + if ( handle.name === 'XZ' ) { + + if ( Math.abs( _alignVector.copy( _unitY ).applyQuaternion( quaternion ).dot( this.eye ) ) < PLANE_HIDE_THRESHOLD ) { + + handle.scale.set( 1e-10, 1e-10, 1e-10 ); + handle.visible = false; + + } + + } + + } else if ( this.mode === 'rotate' ) { + + // Align handles to current local or world rotation + + _tempQuaternion2.copy( quaternion ); + _alignVector.copy( this.eye ).applyQuaternion( _tempQuaternion.copy( quaternion ).invert() ); + + if ( handle.name.search( 'E' ) !== - 1 ) { + + handle.quaternion.setFromRotationMatrix( _lookAtMatrix.lookAt( this.eye, _zeroVector, _unitY ) ); + + } + + if ( handle.name === 'X' ) { + + _tempQuaternion.setFromAxisAngle( _unitX, Math.atan2( - _alignVector.y, _alignVector.z ) ); + _tempQuaternion.multiplyQuaternions( _tempQuaternion2, _tempQuaternion ); + handle.quaternion.copy( _tempQuaternion ); + + } + + if ( handle.name === 'Y' ) { + + _tempQuaternion.setFromAxisAngle( _unitY, Math.atan2( _alignVector.x, _alignVector.z ) ); + _tempQuaternion.multiplyQuaternions( _tempQuaternion2, _tempQuaternion ); + handle.quaternion.copy( _tempQuaternion ); + + } + + if ( handle.name === 'Z' ) { + + _tempQuaternion.setFromAxisAngle( _unitZ, Math.atan2( _alignVector.y, _alignVector.x ) ); + _tempQuaternion.multiplyQuaternions( _tempQuaternion2, _tempQuaternion ); + handle.quaternion.copy( _tempQuaternion ); + + } + + } + + // Hide disabled axes + handle.visible = handle.visible && ( handle.name.indexOf( 'X' ) === - 1 || this.showX ); + handle.visible = handle.visible && ( handle.name.indexOf( 'Y' ) === - 1 || this.showY ); + handle.visible = handle.visible && ( handle.name.indexOf( 'Z' ) === - 1 || this.showZ ); + handle.visible = handle.visible && ( handle.name.indexOf( 'E' ) === - 1 || ( this.showX && this.showY && this.showZ ) ); + + // highlight selected axis + + handle.material._color = handle.material._color || handle.material.color.clone(); + handle.material._opacity = handle.material._opacity || handle.material.opacity; + + handle.material.color.copy( handle.material._color ); + handle.material.opacity = handle.material._opacity; + + if ( this.enabled && this.axis ) { + + if ( handle.name === this.axis ) { + + handle.material.color.setHex( 0xffff00 ); + handle.material.opacity = 1.0; + + } else if ( this.axis.split( '' ).some( function ( a ) { + + return handle.name === a; + + } ) ) { + + handle.material.color.setHex( 0xffff00 ); + handle.material.opacity = 1.0; + + } + + } + + } + + super.updateMatrixWorld( force ); + + } + +} + +// + +class TransformControlsPlane extends Mesh { + + constructor() { + + super( + new PlaneGeometry( 100000, 100000, 2, 2 ), + new MeshBasicMaterial( { visible: false, wireframe: true, side: DoubleSide, transparent: true, opacity: 0.1, toneMapped: false } ) + ); + + this.isTransformControlsPlane = true; + + this.type = 'TransformControlsPlane'; + + } + + updateMatrixWorld( force ) { + + let space = this.space; + + this.position.copy( this.worldPosition ); + + if ( this.mode === 'scale' ) space = 'local'; // scale always oriented to local rotation + + _v1.copy( _unitX ).applyQuaternion( space === 'local' ? this.worldQuaternion : _identityQuaternion ); + _v2.copy( _unitY ).applyQuaternion( space === 'local' ? this.worldQuaternion : _identityQuaternion ); + _v3.copy( _unitZ ).applyQuaternion( space === 'local' ? this.worldQuaternion : _identityQuaternion ); + + // Align the plane for current transform mode, axis and space. + + _alignVector.copy( _v2 ); + + switch ( this.mode ) { + + case 'translate': + case 'scale': + switch ( this.axis ) { + + case 'X': + _alignVector.copy( this.eye ).cross( _v1 ); + _dirVector.copy( _v1 ).cross( _alignVector ); + break; + case 'Y': + _alignVector.copy( this.eye ).cross( _v2 ); + _dirVector.copy( _v2 ).cross( _alignVector ); + break; + case 'Z': + _alignVector.copy( this.eye ).cross( _v3 ); + _dirVector.copy( _v3 ).cross( _alignVector ); + break; + case 'XY': + _dirVector.copy( _v3 ); + break; + case 'YZ': + _dirVector.copy( _v1 ); + break; + case 'XZ': + _alignVector.copy( _v3 ); + _dirVector.copy( _v2 ); + break; + case 'XYZ': + case 'E': + _dirVector.set( 0, 0, 0 ); + break; + + } + + break; + case 'rotate': + default: + // special case for rotate + _dirVector.set( 0, 0, 0 ); + + } + + if ( _dirVector.length() === 0 ) { + + // If in rotate mode, make the plane parallel to camera + this.quaternion.copy( this.cameraQuaternion ); + + } else { + + _tempMatrix.lookAt( _tempVector.set( 0, 0, 0 ), _dirVector, _alignVector ); + + this.quaternion.setFromRotationMatrix( _tempMatrix ); + + } + + super.updateMatrixWorld( force ); + + } + +} + +export { TransformControls, TransformControlsGizmo, TransformControlsPlane }; diff --git a/node_modules/three/examples/jsm/csm/CSM.js b/node_modules/three/examples/jsm/csm/CSM.js new file mode 100644 index 0000000..649a0e5 --- /dev/null +++ b/node_modules/three/examples/jsm/csm/CSM.js @@ -0,0 +1,384 @@ +import { + Vector2, + Vector3, + DirectionalLight, + MathUtils, + ShaderChunk, + Matrix4, + Box3 +} from 'three'; +import { CSMFrustum } from './CSMFrustum.js'; +import { CSMShader } from './CSMShader.js'; + +const _cameraToLightMatrix = new Matrix4(); +const _lightSpaceFrustum = new CSMFrustum(); +const _center = new Vector3(); +const _bbox = new Box3(); +const _uniformArray = []; +const _logArray = []; +const _lightOrientationMatrix = new Matrix4(); +const _lightOrientationMatrixInverse = new Matrix4(); +const _up = new Vector3( 0, 1, 0 ); + +export class CSM { + + constructor( data ) { + + this.camera = data.camera; + this.parent = data.parent; + this.cascades = data.cascades || 3; + this.maxFar = data.maxFar || 100000; + this.mode = data.mode || 'practical'; + this.shadowMapSize = data.shadowMapSize || 2048; + this.shadowBias = data.shadowBias || 0.000001; + this.lightDirection = data.lightDirection || new Vector3( 1, - 1, 1 ).normalize(); + this.lightIntensity = data.lightIntensity || 3; + this.lightNear = data.lightNear || 1; + this.lightFar = data.lightFar || 2000; + this.lightMargin = data.lightMargin || 200; + this.customSplitsCallback = data.customSplitsCallback; + this.fade = false; + this.mainFrustum = new CSMFrustum(); + this.frustums = []; + this.breaks = []; + + this.lights = []; + this.shaders = new Map(); + + this.createLights(); + this.updateFrustums(); + this.injectInclude(); + + } + + createLights() { + + for ( let i = 0; i < this.cascades; i ++ ) { + + const light = new DirectionalLight( 0xffffff, this.lightIntensity ); + light.castShadow = true; + light.shadow.mapSize.width = this.shadowMapSize; + light.shadow.mapSize.height = this.shadowMapSize; + + light.shadow.camera.near = this.lightNear; + light.shadow.camera.far = this.lightFar; + light.shadow.bias = this.shadowBias; + + this.parent.add( light ); + this.parent.add( light.target ); + this.lights.push( light ); + + } + + } + + initCascades() { + + const camera = this.camera; + camera.updateProjectionMatrix(); + this.mainFrustum.setFromProjectionMatrix( camera.projectionMatrix, this.maxFar ); + this.mainFrustum.split( this.breaks, this.frustums ); + + } + + updateShadowBounds() { + + const frustums = this.frustums; + for ( let i = 0; i < frustums.length; i ++ ) { + + const light = this.lights[ i ]; + const shadowCam = light.shadow.camera; + const frustum = this.frustums[ i ]; + + // Get the two points that represent that furthest points on the frustum assuming + // that's either the diagonal across the far plane or the diagonal across the whole + // frustum itself. + const nearVerts = frustum.vertices.near; + const farVerts = frustum.vertices.far; + const point1 = farVerts[ 0 ]; + let point2; + if ( point1.distanceTo( farVerts[ 2 ] ) > point1.distanceTo( nearVerts[ 2 ] ) ) { + + point2 = farVerts[ 2 ]; + + } else { + + point2 = nearVerts[ 2 ]; + + } + + let squaredBBWidth = point1.distanceTo( point2 ); + if ( this.fade ) { + + // expand the shadow extents by the fade margin if fade is enabled. + const camera = this.camera; + const far = Math.max( camera.far, this.maxFar ); + const linearDepth = frustum.vertices.far[ 0 ].z / ( far - camera.near ); + const margin = 0.25 * Math.pow( linearDepth, 2.0 ) * ( far - camera.near ); + + squaredBBWidth += margin; + + } + + shadowCam.left = - squaredBBWidth / 2; + shadowCam.right = squaredBBWidth / 2; + shadowCam.top = squaredBBWidth / 2; + shadowCam.bottom = - squaredBBWidth / 2; + shadowCam.updateProjectionMatrix(); + + } + + } + + getBreaks() { + + const camera = this.camera; + const far = Math.min( camera.far, this.maxFar ); + this.breaks.length = 0; + + switch ( this.mode ) { + + case 'uniform': + uniformSplit( this.cascades, camera.near, far, this.breaks ); + break; + case 'logarithmic': + logarithmicSplit( this.cascades, camera.near, far, this.breaks ); + break; + case 'practical': + practicalSplit( this.cascades, camera.near, far, 0.5, this.breaks ); + break; + case 'custom': + if ( this.customSplitsCallback === undefined ) console.error( 'CSM: Custom split scheme callback not defined.' ); + this.customSplitsCallback( this.cascades, camera.near, far, this.breaks ); + break; + + } + + function uniformSplit( amount, near, far, target ) { + + for ( let i = 1; i < amount; i ++ ) { + + target.push( ( near + ( far - near ) * i / amount ) / far ); + + } + + target.push( 1 ); + + } + + function logarithmicSplit( amount, near, far, target ) { + + for ( let i = 1; i < amount; i ++ ) { + + target.push( ( near * ( far / near ) ** ( i / amount ) ) / far ); + + } + + target.push( 1 ); + + } + + function practicalSplit( amount, near, far, lambda, target ) { + + _uniformArray.length = 0; + _logArray.length = 0; + logarithmicSplit( amount, near, far, _logArray ); + uniformSplit( amount, near, far, _uniformArray ); + + for ( let i = 1; i < amount; i ++ ) { + + target.push( MathUtils.lerp( _uniformArray[ i - 1 ], _logArray[ i - 1 ], lambda ) ); + + } + + target.push( 1 ); + + } + + } + + update() { + + const camera = this.camera; + const frustums = this.frustums; + + // for each frustum we need to find its min-max box aligned with the light orientation + // the position in _lightOrientationMatrix does not matter, as we transform there and back + _lightOrientationMatrix.lookAt( new Vector3(), this.lightDirection, _up ); + _lightOrientationMatrixInverse.copy( _lightOrientationMatrix ).invert(); + + for ( let i = 0; i < frustums.length; i ++ ) { + + const light = this.lights[ i ]; + const shadowCam = light.shadow.camera; + const texelWidth = ( shadowCam.right - shadowCam.left ) / this.shadowMapSize; + const texelHeight = ( shadowCam.top - shadowCam.bottom ) / this.shadowMapSize; + _cameraToLightMatrix.multiplyMatrices( _lightOrientationMatrixInverse, camera.matrixWorld ); + frustums[ i ].toSpace( _cameraToLightMatrix, _lightSpaceFrustum ); + + const nearVerts = _lightSpaceFrustum.vertices.near; + const farVerts = _lightSpaceFrustum.vertices.far; + _bbox.makeEmpty(); + for ( let j = 0; j < 4; j ++ ) { + + _bbox.expandByPoint( nearVerts[ j ] ); + _bbox.expandByPoint( farVerts[ j ] ); + + } + + _bbox.getCenter( _center ); + _center.z = _bbox.max.z + this.lightMargin; + _center.x = Math.floor( _center.x / texelWidth ) * texelWidth; + _center.y = Math.floor( _center.y / texelHeight ) * texelHeight; + _center.applyMatrix4( _lightOrientationMatrix ); + + light.position.copy( _center ); + light.target.position.copy( _center ); + + light.target.position.x += this.lightDirection.x; + light.target.position.y += this.lightDirection.y; + light.target.position.z += this.lightDirection.z; + + } + + } + + injectInclude() { + + ShaderChunk.lights_fragment_begin = CSMShader.lights_fragment_begin; + ShaderChunk.lights_pars_begin = CSMShader.lights_pars_begin; + + } + + setupMaterial( material ) { + + material.defines = material.defines || {}; + material.defines.USE_CSM = 1; + material.defines.CSM_CASCADES = this.cascades; + + if ( this.fade ) { + + material.defines.CSM_FADE = ''; + + } + + const breaksVec2 = []; + const scope = this; + const shaders = this.shaders; + + material.onBeforeCompile = function ( shader ) { + + const far = Math.min( scope.camera.far, scope.maxFar ); + scope.getExtendedBreaks( breaksVec2 ); + + shader.uniforms.CSM_cascades = { value: breaksVec2 }; + shader.uniforms.cameraNear = { value: scope.camera.near }; + shader.uniforms.shadowFar = { value: far }; + + shaders.set( material, shader ); + + }; + + shaders.set( material, null ); + + } + + updateUniforms() { + + const far = Math.min( this.camera.far, this.maxFar ); + const shaders = this.shaders; + + shaders.forEach( function ( shader, material ) { + + if ( shader !== null ) { + + const uniforms = shader.uniforms; + this.getExtendedBreaks( uniforms.CSM_cascades.value ); + uniforms.cameraNear.value = this.camera.near; + uniforms.shadowFar.value = far; + + } + + if ( ! this.fade && 'CSM_FADE' in material.defines ) { + + delete material.defines.CSM_FADE; + material.needsUpdate = true; + + } else if ( this.fade && ! ( 'CSM_FADE' in material.defines ) ) { + + material.defines.CSM_FADE = ''; + material.needsUpdate = true; + + } + + }, this ); + + } + + getExtendedBreaks( target ) { + + while ( target.length < this.breaks.length ) { + + target.push( new Vector2() ); + + } + + target.length = this.breaks.length; + + for ( let i = 0; i < this.cascades; i ++ ) { + + const amount = this.breaks[ i ]; + const prev = this.breaks[ i - 1 ] || 0; + target[ i ].x = prev; + target[ i ].y = amount; + + } + + } + + updateFrustums() { + + this.getBreaks(); + this.initCascades(); + this.updateShadowBounds(); + this.updateUniforms(); + + } + + remove() { + + for ( let i = 0; i < this.lights.length; i ++ ) { + + this.parent.remove( this.lights[ i ].target ); + this.parent.remove( this.lights[ i ] ); + + } + + } + + dispose() { + + const shaders = this.shaders; + shaders.forEach( function ( shader, material ) { + + delete material.onBeforeCompile; + delete material.defines.USE_CSM; + delete material.defines.CSM_CASCADES; + delete material.defines.CSM_FADE; + + if ( shader !== null ) { + + delete shader.uniforms.CSM_cascades; + delete shader.uniforms.cameraNear; + delete shader.uniforms.shadowFar; + + } + + material.needsUpdate = true; + + } ); + shaders.clear(); + + } + +} diff --git a/node_modules/three/examples/jsm/csm/CSMFrustum.js b/node_modules/three/examples/jsm/csm/CSMFrustum.js new file mode 100644 index 0000000..2d968be --- /dev/null +++ b/node_modules/three/examples/jsm/csm/CSMFrustum.js @@ -0,0 +1,152 @@ +import { Vector3, Matrix4 } from 'three'; + +const inverseProjectionMatrix = new Matrix4(); + +class CSMFrustum { + + constructor( data ) { + + data = data || {}; + + this.vertices = { + near: [ + new Vector3(), + new Vector3(), + new Vector3(), + new Vector3() + ], + far: [ + new Vector3(), + new Vector3(), + new Vector3(), + new Vector3() + ] + }; + + if ( data.projectionMatrix !== undefined ) { + + this.setFromProjectionMatrix( data.projectionMatrix, data.maxFar || 10000 ); + + } + + } + + setFromProjectionMatrix( projectionMatrix, maxFar ) { + + const isOrthographic = projectionMatrix.elements[ 2 * 4 + 3 ] === 0; + + inverseProjectionMatrix.copy( projectionMatrix ).invert(); + + // 3 --- 0 vertices.near/far order + // | | + // 2 --- 1 + // clip space spans from [-1, 1] + + this.vertices.near[ 0 ].set( 1, 1, - 1 ); + this.vertices.near[ 1 ].set( 1, - 1, - 1 ); + this.vertices.near[ 2 ].set( - 1, - 1, - 1 ); + this.vertices.near[ 3 ].set( - 1, 1, - 1 ); + this.vertices.near.forEach( function ( v ) { + + v.applyMatrix4( inverseProjectionMatrix ); + + } ); + + this.vertices.far[ 0 ].set( 1, 1, 1 ); + this.vertices.far[ 1 ].set( 1, - 1, 1 ); + this.vertices.far[ 2 ].set( - 1, - 1, 1 ); + this.vertices.far[ 3 ].set( - 1, 1, 1 ); + this.vertices.far.forEach( function ( v ) { + + v.applyMatrix4( inverseProjectionMatrix ); + + const absZ = Math.abs( v.z ); + if ( isOrthographic ) { + + v.z *= Math.min( maxFar / absZ, 1.0 ); + + } else { + + v.multiplyScalar( Math.min( maxFar / absZ, 1.0 ) ); + + } + + } ); + + return this.vertices; + + } + + split( breaks, target ) { + + while ( breaks.length > target.length ) { + + target.push( new CSMFrustum() ); + + } + + target.length = breaks.length; + + for ( let i = 0; i < breaks.length; i ++ ) { + + const cascade = target[ i ]; + + if ( i === 0 ) { + + for ( let j = 0; j < 4; j ++ ) { + + cascade.vertices.near[ j ].copy( this.vertices.near[ j ] ); + + } + + } else { + + for ( let j = 0; j < 4; j ++ ) { + + cascade.vertices.near[ j ].lerpVectors( this.vertices.near[ j ], this.vertices.far[ j ], breaks[ i - 1 ] ); + + } + + } + + if ( i === breaks.length - 1 ) { + + for ( let j = 0; j < 4; j ++ ) { + + cascade.vertices.far[ j ].copy( this.vertices.far[ j ] ); + + } + + } else { + + for ( let j = 0; j < 4; j ++ ) { + + cascade.vertices.far[ j ].lerpVectors( this.vertices.near[ j ], this.vertices.far[ j ], breaks[ i ] ); + + } + + } + + } + + } + + toSpace( cameraMatrix, target ) { + + for ( let i = 0; i < 4; i ++ ) { + + target.vertices.near[ i ] + .copy( this.vertices.near[ i ] ) + .applyMatrix4( cameraMatrix ); + + target.vertices.far[ i ] + .copy( this.vertices.far[ i ] ) + .applyMatrix4( cameraMatrix ); + + } + + } + +} + +export { CSMFrustum }; diff --git a/node_modules/three/examples/jsm/csm/CSMHelper.js b/node_modules/three/examples/jsm/csm/CSMHelper.js new file mode 100644 index 0000000..d1cfed8 --- /dev/null +++ b/node_modules/three/examples/jsm/csm/CSMHelper.js @@ -0,0 +1,193 @@ +import { + Group, + Mesh, + LineSegments, + BufferGeometry, + LineBasicMaterial, + Box3Helper, + Box3, + PlaneGeometry, + MeshBasicMaterial, + BufferAttribute, + DoubleSide +} from 'three'; + +class CSMHelper extends Group { + + constructor( csm ) { + + super(); + this.csm = csm; + this.displayFrustum = true; + this.displayPlanes = true; + this.displayShadowBounds = true; + + const indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] ); + const positions = new Float32Array( 24 ); + const frustumGeometry = new BufferGeometry(); + frustumGeometry.setIndex( new BufferAttribute( indices, 1 ) ); + frustumGeometry.setAttribute( 'position', new BufferAttribute( positions, 3, false ) ); + const frustumLines = new LineSegments( frustumGeometry, new LineBasicMaterial() ); + this.add( frustumLines ); + + this.frustumLines = frustumLines; + this.cascadeLines = []; + this.cascadePlanes = []; + this.shadowLines = []; + + } + + updateVisibility() { + + const displayFrustum = this.displayFrustum; + const displayPlanes = this.displayPlanes; + const displayShadowBounds = this.displayShadowBounds; + + const frustumLines = this.frustumLines; + const cascadeLines = this.cascadeLines; + const cascadePlanes = this.cascadePlanes; + const shadowLines = this.shadowLines; + for ( let i = 0, l = cascadeLines.length; i < l; i ++ ) { + + const cascadeLine = cascadeLines[ i ]; + const cascadePlane = cascadePlanes[ i ]; + const shadowLineGroup = shadowLines[ i ]; + + cascadeLine.visible = displayFrustum; + cascadePlane.visible = displayFrustum && displayPlanes; + shadowLineGroup.visible = displayShadowBounds; + + } + + frustumLines.visible = displayFrustum; + + } + + update() { + + const csm = this.csm; + const camera = csm.camera; + const cascades = csm.cascades; + const mainFrustum = csm.mainFrustum; + const frustums = csm.frustums; + const lights = csm.lights; + + const frustumLines = this.frustumLines; + const frustumLinePositions = frustumLines.geometry.getAttribute( 'position' ); + const cascadeLines = this.cascadeLines; + const cascadePlanes = this.cascadePlanes; + const shadowLines = this.shadowLines; + + this.position.copy( camera.position ); + this.quaternion.copy( camera.quaternion ); + this.scale.copy( camera.scale ); + this.updateMatrixWorld( true ); + + while ( cascadeLines.length > cascades ) { + + this.remove( cascadeLines.pop() ); + this.remove( cascadePlanes.pop() ); + this.remove( shadowLines.pop() ); + + } + + while ( cascadeLines.length < cascades ) { + + const cascadeLine = new Box3Helper( new Box3(), 0xffffff ); + const planeMat = new MeshBasicMaterial( { transparent: true, opacity: 0.1, depthWrite: false, side: DoubleSide } ); + const cascadePlane = new Mesh( new PlaneGeometry(), planeMat ); + const shadowLineGroup = new Group(); + const shadowLine = new Box3Helper( new Box3(), 0xffff00 ); + shadowLineGroup.add( shadowLine ); + + this.add( cascadeLine ); + this.add( cascadePlane ); + this.add( shadowLineGroup ); + + cascadeLines.push( cascadeLine ); + cascadePlanes.push( cascadePlane ); + shadowLines.push( shadowLineGroup ); + + } + + for ( let i = 0; i < cascades; i ++ ) { + + const frustum = frustums[ i ]; + const light = lights[ i ]; + const shadowCam = light.shadow.camera; + const farVerts = frustum.vertices.far; + + const cascadeLine = cascadeLines[ i ]; + const cascadePlane = cascadePlanes[ i ]; + const shadowLineGroup = shadowLines[ i ]; + const shadowLine = shadowLineGroup.children[ 0 ]; + + cascadeLine.box.min.copy( farVerts[ 2 ] ); + cascadeLine.box.max.copy( farVerts[ 0 ] ); + cascadeLine.box.max.z += 1e-4; + + cascadePlane.position.addVectors( farVerts[ 0 ], farVerts[ 2 ] ); + cascadePlane.position.multiplyScalar( 0.5 ); + cascadePlane.scale.subVectors( farVerts[ 0 ], farVerts[ 2 ] ); + cascadePlane.scale.z = 1e-4; + + this.remove( shadowLineGroup ); + shadowLineGroup.position.copy( shadowCam.position ); + shadowLineGroup.quaternion.copy( shadowCam.quaternion ); + shadowLineGroup.scale.copy( shadowCam.scale ); + shadowLineGroup.updateMatrixWorld( true ); + this.attach( shadowLineGroup ); + + shadowLine.box.min.set( shadowCam.bottom, shadowCam.left, - shadowCam.far ); + shadowLine.box.max.set( shadowCam.top, shadowCam.right, - shadowCam.near ); + + } + + const nearVerts = mainFrustum.vertices.near; + const farVerts = mainFrustum.vertices.far; + frustumLinePositions.setXYZ( 0, farVerts[ 0 ].x, farVerts[ 0 ].y, farVerts[ 0 ].z ); + frustumLinePositions.setXYZ( 1, farVerts[ 3 ].x, farVerts[ 3 ].y, farVerts[ 3 ].z ); + frustumLinePositions.setXYZ( 2, farVerts[ 2 ].x, farVerts[ 2 ].y, farVerts[ 2 ].z ); + frustumLinePositions.setXYZ( 3, farVerts[ 1 ].x, farVerts[ 1 ].y, farVerts[ 1 ].z ); + + frustumLinePositions.setXYZ( 4, nearVerts[ 0 ].x, nearVerts[ 0 ].y, nearVerts[ 0 ].z ); + frustumLinePositions.setXYZ( 5, nearVerts[ 3 ].x, nearVerts[ 3 ].y, nearVerts[ 3 ].z ); + frustumLinePositions.setXYZ( 6, nearVerts[ 2 ].x, nearVerts[ 2 ].y, nearVerts[ 2 ].z ); + frustumLinePositions.setXYZ( 7, nearVerts[ 1 ].x, nearVerts[ 1 ].y, nearVerts[ 1 ].z ); + frustumLinePositions.needsUpdate = true; + + } + + dispose() { + + const frustumLines = this.frustumLines; + const cascadeLines = this.cascadeLines; + const cascadePlanes = this.cascadePlanes; + const shadowLines = this.shadowLines; + + frustumLines.geometry.dispose(); + frustumLines.material.dispose(); + + const cascades = this.csm.cascades; + + for ( let i = 0; i < cascades; i ++ ) { + + const cascadeLine = cascadeLines[ i ]; + const cascadePlane = cascadePlanes[ i ]; + const shadowLineGroup = shadowLines[ i ]; + const shadowLine = shadowLineGroup.children[ 0 ]; + + cascadeLine.dispose(); // Box3Helper + + cascadePlane.geometry.dispose(); + cascadePlane.material.dispose(); + + shadowLine.dispose(); // Box3Helper + + } + + } + +} + +export { CSMHelper }; diff --git a/node_modules/three/examples/jsm/csm/CSMShader.js b/node_modules/three/examples/jsm/csm/CSMShader.js new file mode 100644 index 0000000..d5b30d8 --- /dev/null +++ b/node_modules/three/examples/jsm/csm/CSMShader.js @@ -0,0 +1,295 @@ +import { ShaderChunk } from 'three'; + +const CSMShader = { + lights_fragment_begin: /* glsl */` +vec3 geometryPosition = - vViewPosition; +vec3 geometryNormal = normal; +vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); + +vec3 geometryClearcoatNormal = vec3( 0.0 ); + +#ifdef USE_CLEARCOAT + + geometryClearcoatNormal = clearcoatNormal; + +#endif + +#ifdef USE_IRIDESCENCE + float dotNVi = saturate( dot( normal, geometryViewDir ) ); + if ( material.iridescenceThickness == 0.0 ) { + material.iridescence = 0.0; + } else { + material.iridescence = saturate( material.iridescence ); + } + if ( material.iridescence > 0.0 ) { + material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); + // Iridescence F0 approximation + material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); + } +#endif + +IncidentLight directLight; + +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + + pointLight = pointLights[ i ]; + + getPointLightInfo( pointLight, geometryPosition, directLight ); + + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + } + #pragma unroll_loop_end + +#endif + +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + + SpotLight spotLight; + vec4 spotColor; + vec3 spotLightCoord; + bool inSpotLightMap; + + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + + spotLight = spotLights[ i ]; + + getSpotLightInfo( spotLight, geometryPosition, directLight ); + + // spot lights are ordered [shadows with maps, shadows without maps, maps without shadows, none] + #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX + #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS + #else + #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #endif + #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) + spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; + inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); + spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); + directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; + #endif + #undef SPOT_LIGHT_MAP_INDEX + + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + + #endif + + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + } + #pragma unroll_loop_end + +#endif + +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) && defined( USE_CSM ) && defined( CSM_CASCADES ) + + DirectionalLight directionalLight; + float linearDepth = (vViewPosition.z) / (shadowFar - cameraNear); + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + + #if defined( USE_SHADOWMAP ) && defined( CSM_FADE ) + vec2 cascade; + float cascadeCenter; + float closestEdge; + float margin; + float csmx; + float csmy; + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + + directionalLight = directionalLights[ i ]; + getDirectionalLightInfo( directionalLight, directLight ); + + #if ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + // NOTE: Depth gets larger away from the camera. + // cascade.x is closer, cascade.y is further + cascade = CSM_cascades[ i ]; + cascadeCenter = ( cascade.x + cascade.y ) / 2.0; + closestEdge = linearDepth < cascadeCenter ? cascade.x : cascade.y; + margin = 0.25 * pow( closestEdge, 2.0 ); + csmx = cascade.x - margin / 2.0; + csmy = cascade.y + margin / 2.0; + if( linearDepth >= csmx && ( linearDepth < csmy || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 ) ) { + + float dist = min( linearDepth - csmx, csmy - linearDepth ); + float ratio = clamp( dist / margin, 0.0, 1.0 ); + + vec3 prevColor = directLight.color; + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + + bool shouldFadeLastCascade = UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 && linearDepth > cascadeCenter; + directLight.color = mix( prevColor, directLight.color, shouldFadeLastCascade ? ratio : 1.0 ); + + ReflectedLight prevLight = reflectedLight; + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + bool shouldBlend = UNROLLED_LOOP_INDEX != CSM_CASCADES - 1 || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 && linearDepth < cascadeCenter; + float blendRatio = shouldBlend ? ratio : 1.0; + + reflectedLight.directDiffuse = mix( prevLight.directDiffuse, reflectedLight.directDiffuse, blendRatio ); + reflectedLight.directSpecular = mix( prevLight.directSpecular, reflectedLight.directSpecular, blendRatio ); + reflectedLight.indirectDiffuse = mix( prevLight.indirectDiffuse, reflectedLight.indirectDiffuse, blendRatio ); + reflectedLight.indirectSpecular = mix( prevLight.indirectSpecular, reflectedLight.indirectSpecular, blendRatio ); + + } + #endif + + } + #pragma unroll_loop_end + #elif defined (USE_SHADOWMAP) + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + + directionalLight = directionalLights[ i ]; + getDirectionalLightInfo( directionalLight, directLight ); + + #if ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + + directionalLightShadow = directionalLightShadows[ i ]; + if(linearDepth >= CSM_cascades[UNROLLED_LOOP_INDEX].x && linearDepth < CSM_cascades[UNROLLED_LOOP_INDEX].y) directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + + if(linearDepth >= CSM_cascades[UNROLLED_LOOP_INDEX].x && (linearDepth < CSM_cascades[UNROLLED_LOOP_INDEX].y || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1)) RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + #endif + + } + #pragma unroll_loop_end + + #elif ( NUM_DIR_LIGHT_SHADOWS > 0 ) + // note: no loop here - all CSM lights are in fact one light only + getDirectionalLightInfo( directionalLights[0], directLight ); + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + #endif + + #if ( NUM_DIR_LIGHTS > NUM_DIR_LIGHT_SHADOWS) + // compute the lights not casting shadows (if any) + + #pragma unroll_loop_start + for ( int i = NUM_DIR_LIGHT_SHADOWS; i < NUM_DIR_LIGHTS; i ++ ) { + + directionalLight = directionalLights[ i ]; + + getDirectionalLightInfo( directionalLight, directLight ); + + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + } + #pragma unroll_loop_end + + #endif + +#endif + + +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) && !defined( USE_CSM ) && !defined( CSM_CASCADES ) + + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + + directionalLight = directionalLights[ i ]; + + getDirectionalLightInfo( directionalLight, directLight ); + + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + + RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + } + #pragma unroll_loop_end + +#endif + +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + + RectAreaLight rectAreaLight; + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); + + } + #pragma unroll_loop_end + +#endif + +#if defined( RE_IndirectDiffuse ) + + vec3 iblIrradiance = vec3( 0.0 ); + + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + + #if defined( USE_LIGHT_PROBES ) + + irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); + + #endif + + #if ( NUM_HEMI_LIGHTS > 0 ) + + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); + + } + #pragma unroll_loop_end + + #endif + +#endif + +#if defined( RE_IndirectSpecular ) + + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); + +#endif +`, + lights_pars_begin: /* glsl */` +#if defined( USE_CSM ) && defined( CSM_CASCADES ) +uniform vec2 CSM_cascades[CSM_CASCADES]; +uniform float cameraNear; +uniform float shadowFar; +#endif + ` + ShaderChunk.lights_pars_begin +}; + +export { CSMShader }; diff --git a/node_modules/three/examples/jsm/curves/CurveExtras.js b/node_modules/three/examples/jsm/curves/CurveExtras.js new file mode 100644 index 0000000..51efb84 --- /dev/null +++ b/node_modules/three/examples/jsm/curves/CurveExtras.js @@ -0,0 +1,422 @@ +import { + Curve, + Vector3 +} from 'three'; + +/** + * A bunch of parametric curves + * + * Formulas collected from various sources + * http://mathworld.wolfram.com/HeartCurve.html + * http://en.wikipedia.org/wiki/Viviani%27s_curve + * http://www.mi.sanu.ac.rs/vismath/taylorapril2011/Taylor.pdf + * https://prideout.net/blog/old/blog/index.html@p=44.html + */ + +// GrannyKnot + +class GrannyKnot extends Curve { + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + t = 2 * Math.PI * t; + + const x = - 0.22 * Math.cos( t ) - 1.28 * Math.sin( t ) - 0.44 * Math.cos( 3 * t ) - 0.78 * Math.sin( 3 * t ); + const y = - 0.1 * Math.cos( 2 * t ) - 0.27 * Math.sin( 2 * t ) + 0.38 * Math.cos( 4 * t ) + 0.46 * Math.sin( 4 * t ); + const z = 0.7 * Math.cos( 3 * t ) - 0.4 * Math.sin( 3 * t ); + + return point.set( x, y, z ).multiplyScalar( 20 ); + + } + +} + +// HeartCurve + +class HeartCurve extends Curve { + + constructor( scale = 5 ) { + + super(); + + this.scale = scale; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + t *= 2 * Math.PI; + + const x = 16 * Math.pow( Math.sin( t ), 3 ); + const y = 13 * Math.cos( t ) - 5 * Math.cos( 2 * t ) - 2 * Math.cos( 3 * t ) - Math.cos( 4 * t ); + const z = 0; + + return point.set( x, y, z ).multiplyScalar( this.scale ); + + } + +} + +// Viviani's Curve + +class VivianiCurve extends Curve { + + constructor( scale = 70 ) { + + super(); + + this.scale = scale; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + t = t * 4 * Math.PI; // normalized to 0..1 + const a = this.scale / 2; + + const x = a * ( 1 + Math.cos( t ) ); + const y = a * Math.sin( t ); + const z = 2 * a * Math.sin( t / 2 ); + + return point.set( x, y, z ); + + } + +} + +// KnotCurve + +class KnotCurve extends Curve { + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + t *= 2 * Math.PI; + + const R = 10; + const s = 50; + + const x = s * Math.sin( t ); + const y = Math.cos( t ) * ( R + s * Math.cos( t ) ); + const z = Math.sin( t ) * ( R + s * Math.cos( t ) ); + + return point.set( x, y, z ); + + } + +} + + +// HelixCurve + +class HelixCurve extends Curve { + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + const a = 30; // radius + const b = 150; // height + + const t2 = 2 * Math.PI * t * b / 30; + + const x = Math.cos( t2 ) * a; + const y = Math.sin( t2 ) * a; + const z = b * t; + + return point.set( x, y, z ); + + } + +} + +// TrefoilKnot + +class TrefoilKnot extends Curve { + + constructor( scale = 10 ) { + + super(); + + this.scale = scale; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + t *= Math.PI * 2; + + const x = ( 2 + Math.cos( 3 * t ) ) * Math.cos( 2 * t ); + const y = ( 2 + Math.cos( 3 * t ) ) * Math.sin( 2 * t ); + const z = Math.sin( 3 * t ); + + return point.set( x, y, z ).multiplyScalar( this.scale ); + + } + +} + +// TorusKnot + +class TorusKnot extends Curve { + + constructor( scale = 10 ) { + + super(); + + this.scale = scale; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + const p = 3; + const q = 4; + + t *= Math.PI * 2; + + const x = ( 2 + Math.cos( q * t ) ) * Math.cos( p * t ); + const y = ( 2 + Math.cos( q * t ) ) * Math.sin( p * t ); + const z = Math.sin( q * t ); + + return point.set( x, y, z ).multiplyScalar( this.scale ); + + } + +} + +// CinquefoilKnot + +class CinquefoilKnot extends Curve { + + constructor( scale = 10 ) { + + super(); + + this.scale = scale; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + const p = 2; + const q = 5; + + t *= Math.PI * 2; + + const x = ( 2 + Math.cos( q * t ) ) * Math.cos( p * t ); + const y = ( 2 + Math.cos( q * t ) ) * Math.sin( p * t ); + const z = Math.sin( q * t ); + + return point.set( x, y, z ).multiplyScalar( this.scale ); + + } + +} + + +// TrefoilPolynomialKnot + +class TrefoilPolynomialKnot extends Curve { + + constructor( scale = 10 ) { + + super(); + + this.scale = scale; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + t = t * 4 - 2; + + const x = Math.pow( t, 3 ) - 3 * t; + const y = Math.pow( t, 4 ) - 4 * t * t; + const z = 1 / 5 * Math.pow( t, 5 ) - 2 * t; + + return point.set( x, y, z ).multiplyScalar( this.scale ); + + } + +} + +function scaleTo( x, y, t ) { + + const r = y - x; + return t * r + x; + +} + +// FigureEightPolynomialKnot + +class FigureEightPolynomialKnot extends Curve { + + constructor( scale = 1 ) { + + super(); + + this.scale = scale; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + t = scaleTo( - 4, 4, t ); + + const x = 2 / 5 * t * ( t * t - 7 ) * ( t * t - 10 ); + const y = Math.pow( t, 4 ) - 13 * t * t; + const z = 1 / 10 * t * ( t * t - 4 ) * ( t * t - 9 ) * ( t * t - 12 ); + + return point.set( x, y, z ).multiplyScalar( this.scale ); + + } + +} + +// DecoratedTorusKnot4a + +class DecoratedTorusKnot4a extends Curve { + + constructor( scale = 40 ) { + + super(); + + this.scale = scale; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + t *= Math.PI * 2; + + const x = Math.cos( 2 * t ) * ( 1 + 0.6 * ( Math.cos( 5 * t ) + 0.75 * Math.cos( 10 * t ) ) ); + const y = Math.sin( 2 * t ) * ( 1 + 0.6 * ( Math.cos( 5 * t ) + 0.75 * Math.cos( 10 * t ) ) ); + const z = 0.35 * Math.sin( 5 * t ); + + return point.set( x, y, z ).multiplyScalar( this.scale ); + + } + +} + +// DecoratedTorusKnot4b + +class DecoratedTorusKnot4b extends Curve { + + constructor( scale = 40 ) { + + super(); + + this.scale = scale; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + const fi = t * Math.PI * 2; + + const x = Math.cos( 2 * fi ) * ( 1 + 0.45 * Math.cos( 3 * fi ) + 0.4 * Math.cos( 9 * fi ) ); + const y = Math.sin( 2 * fi ) * ( 1 + 0.45 * Math.cos( 3 * fi ) + 0.4 * Math.cos( 9 * fi ) ); + const z = 0.2 * Math.sin( 9 * fi ); + + return point.set( x, y, z ).multiplyScalar( this.scale ); + + } + +} + + +// DecoratedTorusKnot5a + +class DecoratedTorusKnot5a extends Curve { + + constructor( scale = 40 ) { + + super(); + + this.scale = scale; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + const fi = t * Math.PI * 2; + + const x = Math.cos( 3 * fi ) * ( 1 + 0.3 * Math.cos( 5 * fi ) + 0.5 * Math.cos( 10 * fi ) ); + const y = Math.sin( 3 * fi ) * ( 1 + 0.3 * Math.cos( 5 * fi ) + 0.5 * Math.cos( 10 * fi ) ); + const z = 0.2 * Math.sin( 20 * fi ); + + return point.set( x, y, z ).multiplyScalar( this.scale ); + + } + +} + +// DecoratedTorusKnot5c + +class DecoratedTorusKnot5c extends Curve { + + constructor( scale = 40 ) { + + super(); + + this.scale = scale; + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + const fi = t * Math.PI * 2; + + const x = Math.cos( 4 * fi ) * ( 1 + 0.5 * ( Math.cos( 5 * fi ) + 0.4 * Math.cos( 20 * fi ) ) ); + const y = Math.sin( 4 * fi ) * ( 1 + 0.5 * ( Math.cos( 5 * fi ) + 0.4 * Math.cos( 20 * fi ) ) ); + const z = 0.35 * Math.sin( 15 * fi ); + + return point.set( x, y, z ).multiplyScalar( this.scale ); + + } + +} + +export { + GrannyKnot, + HeartCurve, + VivianiCurve, + KnotCurve, + HelixCurve, + TrefoilKnot, + TorusKnot, + CinquefoilKnot, + TrefoilPolynomialKnot, + FigureEightPolynomialKnot, + DecoratedTorusKnot4a, + DecoratedTorusKnot4b, + DecoratedTorusKnot5a, + DecoratedTorusKnot5c +}; diff --git a/node_modules/three/examples/jsm/curves/NURBSCurve.js b/node_modules/three/examples/jsm/curves/NURBSCurve.js new file mode 100644 index 0000000..8be8dde --- /dev/null +++ b/node_modules/three/examples/jsm/curves/NURBSCurve.js @@ -0,0 +1,80 @@ +import { + Curve, + Vector3, + Vector4 +} from 'three'; +import * as NURBSUtils from '../curves/NURBSUtils.js'; + +/** + * NURBS curve object + * + * Derives from Curve, overriding getPoint and getTangent. + * + * Implementation is based on (x, y [, z=0 [, w=1]]) control points with w=weight. + * + **/ + +class NURBSCurve extends Curve { + + constructor( + degree, + knots /* array of reals */, + controlPoints /* array of Vector(2|3|4) */, + startKnot /* index in knots */, + endKnot /* index in knots */ + ) { + + super(); + + this.degree = degree; + this.knots = knots; + this.controlPoints = []; + // Used by periodic NURBS to remove hidden spans + this.startKnot = startKnot || 0; + this.endKnot = endKnot || ( this.knots.length - 1 ); + + for ( let i = 0; i < controlPoints.length; ++ i ) { + + // ensure Vector4 for control points + const point = controlPoints[ i ]; + this.controlPoints[ i ] = new Vector4( point.x, point.y, point.z, point.w ); + + } + + } + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + const u = this.knots[ this.startKnot ] + t * ( this.knots[ this.endKnot ] - this.knots[ this.startKnot ] ); // linear mapping t->u + + // following results in (wx, wy, wz, w) homogeneous point + const hpoint = NURBSUtils.calcBSplinePoint( this.degree, this.knots, this.controlPoints, u ); + + if ( hpoint.w !== 1.0 ) { + + // project to 3D space: (wx, wy, wz, w) -> (x, y, z, 1) + hpoint.divideScalar( hpoint.w ); + + } + + return point.set( hpoint.x, hpoint.y, hpoint.z ); + + } + + getTangent( t, optionalTarget = new Vector3() ) { + + const tangent = optionalTarget; + + const u = this.knots[ 0 ] + t * ( this.knots[ this.knots.length - 1 ] - this.knots[ 0 ] ); + const ders = NURBSUtils.calcNURBSDerivatives( this.degree, this.knots, this.controlPoints, u, 1 ); + tangent.copy( ders[ 1 ] ).normalize(); + + return tangent; + + } + +} + +export { NURBSCurve }; diff --git a/node_modules/three/examples/jsm/curves/NURBSSurface.js b/node_modules/three/examples/jsm/curves/NURBSSurface.js new file mode 100644 index 0000000..577ecfc --- /dev/null +++ b/node_modules/three/examples/jsm/curves/NURBSSurface.js @@ -0,0 +1,52 @@ +import { + Vector4 +} from 'three'; +import * as NURBSUtils from '../curves/NURBSUtils.js'; + +/** + * NURBS surface object + * + * Implementation is based on (x, y [, z=0 [, w=1]]) control points with w=weight. + **/ + +class NURBSSurface { + + constructor( degree1, degree2, knots1, knots2 /* arrays of reals */, controlPoints /* array^2 of Vector(2|3|4) */ ) { + + this.degree1 = degree1; + this.degree2 = degree2; + this.knots1 = knots1; + this.knots2 = knots2; + this.controlPoints = []; + + const len1 = knots1.length - degree1 - 1; + const len2 = knots2.length - degree2 - 1; + + // ensure Vector4 for control points + for ( let i = 0; i < len1; ++ i ) { + + this.controlPoints[ i ] = []; + + for ( let j = 0; j < len2; ++ j ) { + + const point = controlPoints[ i ][ j ]; + this.controlPoints[ i ][ j ] = new Vector4( point.x, point.y, point.z, point.w ); + + } + + } + + } + + getPoint( t1, t2, target ) { + + const u = this.knots1[ 0 ] + t1 * ( this.knots1[ this.knots1.length - 1 ] - this.knots1[ 0 ] ); // linear mapping t1->u + const v = this.knots2[ 0 ] + t2 * ( this.knots2[ this.knots2.length - 1 ] - this.knots2[ 0 ] ); // linear mapping t2->u + + NURBSUtils.calcSurfacePoint( this.degree1, this.degree2, this.knots1, this.knots2, this.controlPoints, u, v, target ); + + } + +} + +export { NURBSSurface }; diff --git a/node_modules/three/examples/jsm/curves/NURBSUtils.js b/node_modules/three/examples/jsm/curves/NURBSUtils.js new file mode 100644 index 0000000..ad73da5 --- /dev/null +++ b/node_modules/three/examples/jsm/curves/NURBSUtils.js @@ -0,0 +1,542 @@ +import { + Vector3, + Vector4 +} from 'three'; + +/** + * NURBS utils + * + * See NURBSCurve and NURBSSurface. + **/ + + +/************************************************************** + * NURBS Utils + **************************************************************/ + +/* +Finds knot vector span. + +p : degree +u : parametric value +U : knot vector + +returns the span +*/ +function findSpan( p, u, U ) { + + const n = U.length - p - 1; + + if ( u >= U[ n ] ) { + + return n - 1; + + } + + if ( u <= U[ p ] ) { + + return p; + + } + + let low = p; + let high = n; + let mid = Math.floor( ( low + high ) / 2 ); + + while ( u < U[ mid ] || u >= U[ mid + 1 ] ) { + + if ( u < U[ mid ] ) { + + high = mid; + + } else { + + low = mid; + + } + + mid = Math.floor( ( low + high ) / 2 ); + + } + + return mid; + +} + + +/* +Calculate basis functions. See The NURBS Book, page 70, algorithm A2.2 + +span : span in which u lies +u : parametric point +p : degree +U : knot vector + +returns array[p+1] with basis functions values. +*/ +function calcBasisFunctions( span, u, p, U ) { + + const N = []; + const left = []; + const right = []; + N[ 0 ] = 1.0; + + for ( let j = 1; j <= p; ++ j ) { + + left[ j ] = u - U[ span + 1 - j ]; + right[ j ] = U[ span + j ] - u; + + let saved = 0.0; + + for ( let r = 0; r < j; ++ r ) { + + const rv = right[ r + 1 ]; + const lv = left[ j - r ]; + const temp = N[ r ] / ( rv + lv ); + N[ r ] = saved + rv * temp; + saved = lv * temp; + + } + + N[ j ] = saved; + + } + + return N; + +} + + +/* +Calculate B-Spline curve points. See The NURBS Book, page 82, algorithm A3.1. + +p : degree of B-Spline +U : knot vector +P : control points (x, y, z, w) +u : parametric point + +returns point for given u +*/ +function calcBSplinePoint( p, U, P, u ) { + + const span = findSpan( p, u, U ); + const N = calcBasisFunctions( span, u, p, U ); + const C = new Vector4( 0, 0, 0, 0 ); + + for ( let j = 0; j <= p; ++ j ) { + + const point = P[ span - p + j ]; + const Nj = N[ j ]; + const wNj = point.w * Nj; + C.x += point.x * wNj; + C.y += point.y * wNj; + C.z += point.z * wNj; + C.w += point.w * Nj; + + } + + return C; + +} + + +/* +Calculate basis functions derivatives. See The NURBS Book, page 72, algorithm A2.3. + +span : span in which u lies +u : parametric point +p : degree +n : number of derivatives to calculate +U : knot vector + +returns array[n+1][p+1] with basis functions derivatives +*/ +function calcBasisFunctionDerivatives( span, u, p, n, U ) { + + const zeroArr = []; + for ( let i = 0; i <= p; ++ i ) + zeroArr[ i ] = 0.0; + + const ders = []; + + for ( let i = 0; i <= n; ++ i ) + ders[ i ] = zeroArr.slice( 0 ); + + const ndu = []; + + for ( let i = 0; i <= p; ++ i ) + ndu[ i ] = zeroArr.slice( 0 ); + + ndu[ 0 ][ 0 ] = 1.0; + + const left = zeroArr.slice( 0 ); + const right = zeroArr.slice( 0 ); + + for ( let j = 1; j <= p; ++ j ) { + + left[ j ] = u - U[ span + 1 - j ]; + right[ j ] = U[ span + j ] - u; + + let saved = 0.0; + + for ( let r = 0; r < j; ++ r ) { + + const rv = right[ r + 1 ]; + const lv = left[ j - r ]; + ndu[ j ][ r ] = rv + lv; + + const temp = ndu[ r ][ j - 1 ] / ndu[ j ][ r ]; + ndu[ r ][ j ] = saved + rv * temp; + saved = lv * temp; + + } + + ndu[ j ][ j ] = saved; + + } + + for ( let j = 0; j <= p; ++ j ) { + + ders[ 0 ][ j ] = ndu[ j ][ p ]; + + } + + for ( let r = 0; r <= p; ++ r ) { + + let s1 = 0; + let s2 = 1; + + const a = []; + for ( let i = 0; i <= p; ++ i ) { + + a[ i ] = zeroArr.slice( 0 ); + + } + + a[ 0 ][ 0 ] = 1.0; + + for ( let k = 1; k <= n; ++ k ) { + + let d = 0.0; + const rk = r - k; + const pk = p - k; + + if ( r >= k ) { + + a[ s2 ][ 0 ] = a[ s1 ][ 0 ] / ndu[ pk + 1 ][ rk ]; + d = a[ s2 ][ 0 ] * ndu[ rk ][ pk ]; + + } + + const j1 = ( rk >= - 1 ) ? 1 : - rk; + const j2 = ( r - 1 <= pk ) ? k - 1 : p - r; + + for ( let j = j1; j <= j2; ++ j ) { + + a[ s2 ][ j ] = ( a[ s1 ][ j ] - a[ s1 ][ j - 1 ] ) / ndu[ pk + 1 ][ rk + j ]; + d += a[ s2 ][ j ] * ndu[ rk + j ][ pk ]; + + } + + if ( r <= pk ) { + + a[ s2 ][ k ] = - a[ s1 ][ k - 1 ] / ndu[ pk + 1 ][ r ]; + d += a[ s2 ][ k ] * ndu[ r ][ pk ]; + + } + + ders[ k ][ r ] = d; + + const j = s1; + s1 = s2; + s2 = j; + + } + + } + + let r = p; + + for ( let k = 1; k <= n; ++ k ) { + + for ( let j = 0; j <= p; ++ j ) { + + ders[ k ][ j ] *= r; + + } + + r *= p - k; + + } + + return ders; + +} + + +/* + Calculate derivatives of a B-Spline. See The NURBS Book, page 93, algorithm A3.2. + + p : degree + U : knot vector + P : control points + u : Parametric points + nd : number of derivatives + + returns array[d+1] with derivatives + */ +function calcBSplineDerivatives( p, U, P, u, nd ) { + + const du = nd < p ? nd : p; + const CK = []; + const span = findSpan( p, u, U ); + const nders = calcBasisFunctionDerivatives( span, u, p, du, U ); + const Pw = []; + + for ( let i = 0; i < P.length; ++ i ) { + + const point = P[ i ].clone(); + const w = point.w; + + point.x *= w; + point.y *= w; + point.z *= w; + + Pw[ i ] = point; + + } + + for ( let k = 0; k <= du; ++ k ) { + + const point = Pw[ span - p ].clone().multiplyScalar( nders[ k ][ 0 ] ); + + for ( let j = 1; j <= p; ++ j ) { + + point.add( Pw[ span - p + j ].clone().multiplyScalar( nders[ k ][ j ] ) ); + + } + + CK[ k ] = point; + + } + + for ( let k = du + 1; k <= nd + 1; ++ k ) { + + CK[ k ] = new Vector4( 0, 0, 0 ); + + } + + return CK; + +} + + +/* +Calculate "K over I" + +returns k!/(i!(k-i)!) +*/ +function calcKoverI( k, i ) { + + let nom = 1; + + for ( let j = 2; j <= k; ++ j ) { + + nom *= j; + + } + + let denom = 1; + + for ( let j = 2; j <= i; ++ j ) { + + denom *= j; + + } + + for ( let j = 2; j <= k - i; ++ j ) { + + denom *= j; + + } + + return nom / denom; + +} + + +/* +Calculate derivatives (0-nd) of rational curve. See The NURBS Book, page 127, algorithm A4.2. + +Pders : result of function calcBSplineDerivatives + +returns array with derivatives for rational curve. +*/ +function calcRationalCurveDerivatives( Pders ) { + + const nd = Pders.length; + const Aders = []; + const wders = []; + + for ( let i = 0; i < nd; ++ i ) { + + const point = Pders[ i ]; + Aders[ i ] = new Vector3( point.x, point.y, point.z ); + wders[ i ] = point.w; + + } + + const CK = []; + + for ( let k = 0; k < nd; ++ k ) { + + const v = Aders[ k ].clone(); + + for ( let i = 1; i <= k; ++ i ) { + + v.sub( CK[ k - i ].clone().multiplyScalar( calcKoverI( k, i ) * wders[ i ] ) ); + + } + + CK[ k ] = v.divideScalar( wders[ 0 ] ); + + } + + return CK; + +} + + +/* +Calculate NURBS curve derivatives. See The NURBS Book, page 127, algorithm A4.2. + +p : degree +U : knot vector +P : control points in homogeneous space +u : parametric points +nd : number of derivatives + +returns array with derivatives. +*/ +function calcNURBSDerivatives( p, U, P, u, nd ) { + + const Pders = calcBSplineDerivatives( p, U, P, u, nd ); + return calcRationalCurveDerivatives( Pders ); + +} + + +/* +Calculate rational B-Spline surface point. See The NURBS Book, page 134, algorithm A4.3. + +p, q : degrees of B-Spline surface +U, V : knot vectors +P : control points (x, y, z, w) +u, v : parametric values + +returns point for given (u, v) +*/ +function calcSurfacePoint( p, q, U, V, P, u, v, target ) { + + const uspan = findSpan( p, u, U ); + const vspan = findSpan( q, v, V ); + const Nu = calcBasisFunctions( uspan, u, p, U ); + const Nv = calcBasisFunctions( vspan, v, q, V ); + const temp = []; + + for ( let l = 0; l <= q; ++ l ) { + + temp[ l ] = new Vector4( 0, 0, 0, 0 ); + for ( let k = 0; k <= p; ++ k ) { + + const point = P[ uspan - p + k ][ vspan - q + l ].clone(); + const w = point.w; + point.x *= w; + point.y *= w; + point.z *= w; + temp[ l ].add( point.multiplyScalar( Nu[ k ] ) ); + + } + + } + + const Sw = new Vector4( 0, 0, 0, 0 ); + for ( let l = 0; l <= q; ++ l ) { + + Sw.add( temp[ l ].multiplyScalar( Nv[ l ] ) ); + + } + + Sw.divideScalar( Sw.w ); + target.set( Sw.x, Sw.y, Sw.z ); + +} + +/* +Calculate rational B-Spline volume point. See The NURBS Book, page 134, algorithm A4.3. + +p, q, r : degrees of B-Splinevolume +U, V, W : knot vectors +P : control points (x, y, z, w) +u, v, w : parametric values + +returns point for given (u, v, w) +*/ +function calcVolumePoint( p, q, r, U, V, W, P, u, v, w, target ) { + + const uspan = findSpan( p, u, U ); + const vspan = findSpan( q, v, V ); + const wspan = findSpan( r, w, W ); + const Nu = calcBasisFunctions( uspan, u, p, U ); + const Nv = calcBasisFunctions( vspan, v, q, V ); + const Nw = calcBasisFunctions( wspan, w, r, W ); + const temp = []; + + for ( let m = 0; m <= r; ++ m ) { + + temp[ m ] = []; + + for ( let l = 0; l <= q; ++ l ) { + + temp[ m ][ l ] = new Vector4( 0, 0, 0, 0 ); + for ( let k = 0; k <= p; ++ k ) { + + const point = P[ uspan - p + k ][ vspan - q + l ][ wspan - r + m ].clone(); + const w = point.w; + point.x *= w; + point.y *= w; + point.z *= w; + temp[ m ][ l ].add( point.multiplyScalar( Nu[ k ] ) ); + + } + + } + + } + const Sw = new Vector4( 0, 0, 0, 0 ); + for ( let m = 0; m <= r; ++ m ) { + for ( let l = 0; l <= q; ++ l ) { + + Sw.add( temp[ m ][ l ].multiplyScalar( Nw[ m ] ).multiplyScalar( Nv[ l ] ) ); + + } + } + + Sw.divideScalar( Sw.w ); + target.set( Sw.x, Sw.y, Sw.z ); + +} + + +export { + findSpan, + calcBasisFunctions, + calcBSplinePoint, + calcBasisFunctionDerivatives, + calcBSplineDerivatives, + calcKoverI, + calcRationalCurveDerivatives, + calcNURBSDerivatives, + calcSurfacePoint, + calcVolumePoint, +}; diff --git a/node_modules/three/examples/jsm/curves/NURBSVolume.js b/node_modules/three/examples/jsm/curves/NURBSVolume.js new file mode 100644 index 0000000..837ef20 --- /dev/null +++ b/node_modules/three/examples/jsm/curves/NURBSVolume.js @@ -0,0 +1,62 @@ +import { + Vector4 +} from 'three'; +import * as NURBSUtils from '../curves/NURBSUtils.js'; + +/** + * NURBS volume object + * + * Implementation is based on (x, y, z [, w=1]]) control points with w=weight. + **/ + +class NURBSVolume { + + constructor( degree1, degree2, degree3, knots1, knots2, knots3 /* arrays of reals */, controlPoints /* array^3 of Vector(2|3|4) */ ) { + + this.degree1 = degree1; + this.degree2 = degree2; + this.degree3 = degree3; + this.knots1 = knots1; + this.knots2 = knots2; + this.knots3 = knots3; + this.controlPoints = []; + + const len1 = knots1.length - degree1 - 1; + const len2 = knots2.length - degree2 - 1; + const len3 = knots3.length - degree3 - 1; + + // ensure Vector4 for control points + for ( let i = 0; i < len1; ++ i ) { + + this.controlPoints[ i ] = []; + + for ( let j = 0; j < len2; ++ j ) { + + this.controlPoints[ i ][ j ] = []; + + for ( let k = 0; k < len3; ++ k ) { + + const point = controlPoints[ i ][ j ][ k ]; + this.controlPoints[ i ][ j ][ k ] = new Vector4( point.x, point.y, point.z, point.w ); + + } + + } + + } + + } + + getPoint( t1, t2, t3, target ) { + + const u = this.knots1[ 0 ] + t1 * ( this.knots1[ this.knots1.length - 1 ] - this.knots1[ 0 ] ); // linear mapping t1->u + const v = this.knots2[ 0 ] + t2 * ( this.knots2[ this.knots2.length - 1 ] - this.knots2[ 0 ] ); // linear mapping t2->v + const w = this.knots3[ 0 ] + t3 * ( this.knots3[ this.knots3.length - 1 ] - this.knots3[ 0 ] ); // linear mapping t3->w + + NURBSUtils.calcVolumePoint( this.degree1, this.degree2, this.degree3, this.knots1, this.knots2, this.knots3, this.controlPoints, u, v, w, target ); + + } + +} + +export { NURBSVolume }; diff --git a/node_modules/three/examples/jsm/effects/AnaglyphEffect.js b/node_modules/three/examples/jsm/effects/AnaglyphEffect.js new file mode 100644 index 0000000..e47f551 --- /dev/null +++ b/node_modules/three/examples/jsm/effects/AnaglyphEffect.js @@ -0,0 +1,154 @@ +import { + LinearFilter, + Matrix3, + Mesh, + NearestFilter, + OrthographicCamera, + PlaneGeometry, + RGBAFormat, + Scene, + ShaderMaterial, + StereoCamera, + WebGLRenderTarget +} from 'three'; + +class AnaglyphEffect { + + constructor( renderer, width = 512, height = 512 ) { + + // Dubois matrices from https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.7.6968&rep=rep1&type=pdf#page=4 + + this.colorMatrixLeft = new Matrix3().fromArray( [ + 0.456100, - 0.0400822, - 0.0152161, + 0.500484, - 0.0378246, - 0.0205971, + 0.176381, - 0.0157589, - 0.00546856 + ] ); + + this.colorMatrixRight = new Matrix3().fromArray( [ + - 0.0434706, 0.378476, - 0.0721527, + - 0.0879388, 0.73364, - 0.112961, + - 0.00155529, - 0.0184503, 1.2264 + ] ); + + const _camera = new OrthographicCamera( - 1, 1, 1, - 1, 0, 1 ); + + const _scene = new Scene(); + + const _stereo = new StereoCamera(); + + const _params = { minFilter: LinearFilter, magFilter: NearestFilter, format: RGBAFormat }; + + const _renderTargetL = new WebGLRenderTarget( width, height, _params ); + const _renderTargetR = new WebGLRenderTarget( width, height, _params ); + + const _material = new ShaderMaterial( { + + uniforms: { + + 'mapLeft': { value: _renderTargetL.texture }, + 'mapRight': { value: _renderTargetR.texture }, + + 'colorMatrixLeft': { value: this.colorMatrixLeft }, + 'colorMatrixRight': { value: this.colorMatrixRight } + + }, + + vertexShader: [ + + 'varying vec2 vUv;', + + 'void main() {', + + ' vUv = vec2( uv.x, uv.y );', + ' gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );', + + '}' + + ].join( '\n' ), + + fragmentShader: [ + + 'uniform sampler2D mapLeft;', + 'uniform sampler2D mapRight;', + 'varying vec2 vUv;', + + 'uniform mat3 colorMatrixLeft;', + 'uniform mat3 colorMatrixRight;', + + 'void main() {', + + ' vec2 uv = vUv;', + + ' vec4 colorL = texture2D( mapLeft, uv );', + ' vec4 colorR = texture2D( mapRight, uv );', + + ' vec3 color = clamp(', + ' colorMatrixLeft * colorL.rgb +', + ' colorMatrixRight * colorR.rgb, 0., 1. );', + + ' gl_FragColor = vec4(', + ' color.r, color.g, color.b,', + ' max( colorL.a, colorR.a ) );', + + ' #include ', + ' #include ', + + '}' + + ].join( '\n' ) + + } ); + + const _mesh = new Mesh( new PlaneGeometry( 2, 2 ), _material ); + _scene.add( _mesh ); + + this.setSize = function ( width, height ) { + + renderer.setSize( width, height ); + + const pixelRatio = renderer.getPixelRatio(); + + _renderTargetL.setSize( width * pixelRatio, height * pixelRatio ); + _renderTargetR.setSize( width * pixelRatio, height * pixelRatio ); + + }; + + this.render = function ( scene, camera ) { + + const currentRenderTarget = renderer.getRenderTarget(); + + if ( scene.matrixWorldAutoUpdate === true ) scene.updateMatrixWorld(); + + if ( camera.parent === null && camera.matrixWorldAutoUpdate === true ) camera.updateMatrixWorld(); + + _stereo.update( camera ); + + renderer.setRenderTarget( _renderTargetL ); + renderer.clear(); + renderer.render( scene, _stereo.cameraL ); + + renderer.setRenderTarget( _renderTargetR ); + renderer.clear(); + renderer.render( scene, _stereo.cameraR ); + + renderer.setRenderTarget( null ); + renderer.render( _scene, _camera ); + + renderer.setRenderTarget( currentRenderTarget ); + + }; + + this.dispose = function () { + + _renderTargetL.dispose(); + _renderTargetR.dispose(); + _mesh.geometry.dispose(); + _mesh.material.dispose(); + + }; + + } + +} + +export { AnaglyphEffect }; diff --git a/node_modules/three/examples/jsm/effects/AsciiEffect.js b/node_modules/three/examples/jsm/effects/AsciiEffect.js new file mode 100644 index 0000000..af5eb7f --- /dev/null +++ b/node_modules/three/examples/jsm/effects/AsciiEffect.js @@ -0,0 +1,263 @@ +/** + * Ascii generation is based on https://github.com/hassadee/jsascii/blob/master/jsascii.js + * + * 16 April 2012 - @blurspline + */ + +class AsciiEffect { + + constructor( renderer, charSet = ' .:-=+*#%@', options = {} ) { + + // ' .,:;=|iI+hHOE#`$'; + // darker bolder character set from https://github.com/saw/Canvas-ASCII-Art/ + // ' .\'`^",:;Il!i~+_-?][}{1)(|/tfjrxnuvczXYUJCLQ0OZmwqpdbkhao*#MW&8%B@$'.split(''); + + // Some ASCII settings + + const fResolution = options[ 'resolution' ] || 0.15; // Higher for more details + const iScale = options[ 'scale' ] || 1; + const bColor = options[ 'color' ] || false; // nice but slows down rendering! + const bAlpha = options[ 'alpha' ] || false; // Transparency + const bBlock = options[ 'block' ] || false; // blocked characters. like good O dos + const bInvert = options[ 'invert' ] || false; // black is white, white is black + const strResolution = options[ 'strResolution' ] || 'low'; + + let width, height; + + const domElement = document.createElement( 'div' ); + domElement.style.cursor = 'default'; + + const oAscii = document.createElement( 'table' ); + domElement.appendChild( oAscii ); + + let iWidth, iHeight; + let oImg; + + this.setSize = function ( w, h ) { + + width = w; + height = h; + + renderer.setSize( w, h ); + + initAsciiSize(); + + }; + + + this.render = function ( scene, camera ) { + + renderer.render( scene, camera ); + asciifyImage( oAscii ); + + }; + + this.domElement = domElement; + + + // Throw in ascii library from https://github.com/hassadee/jsascii/blob/master/jsascii.js (MIT License) + + function initAsciiSize() { + + iWidth = Math.floor( width * fResolution ); + iHeight = Math.floor( height * fResolution ); + + oCanvas.width = iWidth; + oCanvas.height = iHeight; + // oCanvas.style.display = "none"; + // oCanvas.style.width = iWidth; + // oCanvas.style.height = iHeight; + + oImg = renderer.domElement; + + if ( oImg.style.backgroundColor ) { + + oAscii.rows[ 0 ].cells[ 0 ].style.backgroundColor = oImg.style.backgroundColor; + oAscii.rows[ 0 ].cells[ 0 ].style.color = oImg.style.color; + + } + + oAscii.cellSpacing = 0; + oAscii.cellPadding = 0; + + const oStyle = oAscii.style; + oStyle.whiteSpace = 'pre'; + oStyle.margin = '0px'; + oStyle.padding = '0px'; + oStyle.letterSpacing = fLetterSpacing + 'px'; + oStyle.fontFamily = strFont; + oStyle.fontSize = fFontSize + 'px'; + oStyle.lineHeight = fLineHeight + 'px'; + oStyle.textAlign = 'left'; + oStyle.textDecoration = 'none'; + + } + + + const aDefaultCharList = ( ' .,:;i1tfLCG08@' ).split( '' ); + const aDefaultColorCharList = ( ' CGO08@' ).split( '' ); + const strFont = 'courier new, monospace'; + + const oCanvasImg = renderer.domElement; + + const oCanvas = document.createElement( 'canvas' ); + if ( ! oCanvas.getContext ) { + + return; + + } + + const oCtx = oCanvas.getContext( '2d' ); + if ( ! oCtx.getImageData ) { + + return; + + } + + let aCharList = ( bColor ? aDefaultColorCharList : aDefaultCharList ); + + if ( charSet ) aCharList = charSet; + + // Setup dom + + const fFontSize = ( 2 / fResolution ) * iScale; + const fLineHeight = ( 2 / fResolution ) * iScale; + + // adjust letter-spacing for all combinations of scale and resolution to get it to fit the image width. + + let fLetterSpacing = 0; + + if ( strResolution == 'low' ) { + + switch ( iScale ) { + + case 1 : fLetterSpacing = - 1; break; + case 2 : + case 3 : fLetterSpacing = - 2.1; break; + case 4 : fLetterSpacing = - 3.1; break; + case 5 : fLetterSpacing = - 4.15; break; + + } + + } + + if ( strResolution == 'medium' ) { + + switch ( iScale ) { + + case 1 : fLetterSpacing = 0; break; + case 2 : fLetterSpacing = - 1; break; + case 3 : fLetterSpacing = - 1.04; break; + case 4 : + case 5 : fLetterSpacing = - 2.1; break; + + } + + } + + if ( strResolution == 'high' ) { + + switch ( iScale ) { + + case 1 : + case 2 : fLetterSpacing = 0; break; + case 3 : + case 4 : + case 5 : fLetterSpacing = - 1; break; + + } + + } + + + // can't get a span or div to flow like an img element, but a table works? + + + // convert img element to ascii + + function asciifyImage( oAscii ) { + + oCtx.clearRect( 0, 0, iWidth, iHeight ); + oCtx.drawImage( oCanvasImg, 0, 0, iWidth, iHeight ); + const oImgData = oCtx.getImageData( 0, 0, iWidth, iHeight ).data; + + // Coloring loop starts now + let strChars = ''; + + // console.time('rendering'); + + for ( let y = 0; y < iHeight; y += 2 ) { + + for ( let x = 0; x < iWidth; x ++ ) { + + const iOffset = ( y * iWidth + x ) * 4; + + const iRed = oImgData[ iOffset ]; + const iGreen = oImgData[ iOffset + 1 ]; + const iBlue = oImgData[ iOffset + 2 ]; + const iAlpha = oImgData[ iOffset + 3 ]; + let iCharIdx; + + let fBrightness; + + fBrightness = ( 0.3 * iRed + 0.59 * iGreen + 0.11 * iBlue ) / 255; + // fBrightness = (0.3*iRed + 0.5*iGreen + 0.3*iBlue) / 255; + + if ( iAlpha == 0 ) { + + // should calculate alpha instead, but quick hack :) + //fBrightness *= (iAlpha / 255); + fBrightness = 1; + + } + + iCharIdx = Math.floor( ( 1 - fBrightness ) * ( aCharList.length - 1 ) ); + + if ( bInvert ) { + + iCharIdx = aCharList.length - iCharIdx - 1; + + } + + // good for debugging + //fBrightness = Math.floor(fBrightness * 10); + //strThisChar = fBrightness; + + let strThisChar = aCharList[ iCharIdx ]; + + if ( strThisChar === undefined || strThisChar == ' ' ) + strThisChar = ' '; + + if ( bColor ) { + + strChars += '' + strThisChar + ''; + + } else { + + strChars += strThisChar; + + } + + } + + strChars += '
'; + + } + + oAscii.innerHTML = `${strChars}`; + + // console.timeEnd('rendering'); + + // return oAscii; + + } + + } + +} + +export { AsciiEffect }; diff --git a/node_modules/three/examples/jsm/effects/OutlineEffect.js b/node_modules/three/examples/jsm/effects/OutlineEffect.js new file mode 100644 index 0000000..3ab6034 --- /dev/null +++ b/node_modules/three/examples/jsm/effects/OutlineEffect.js @@ -0,0 +1,539 @@ +import { + BackSide, + Color, + ShaderMaterial, + UniformsLib, + UniformsUtils +} from 'three'; + +/** + * Reference: https://en.wikipedia.org/wiki/Cel_shading + * + * API + * + * 1. Traditional + * + * const effect = new OutlineEffect( renderer ); + * + * function render() { + * + * effect.render( scene, camera ); + * + * } + * + * 2. VR compatible + * + * const effect = new OutlineEffect( renderer ); + * let renderingOutline = false; + * + * scene.onAfterRender = function () { + * + * if ( renderingOutline ) return; + * + * renderingOutline = true; + * + * effect.renderOutline( scene, camera ); + * + * renderingOutline = false; + * + * }; + * + * function render() { + * + * renderer.render( scene, camera ); + * + * } + * + * // How to set default outline parameters + * new OutlineEffect( renderer, { + * defaultThickness: 0.01, + * defaultColor: [ 0, 0, 0 ], + * defaultAlpha: 0.8, + * defaultKeepAlive: true // keeps outline material in cache even if material is removed from scene + * } ); + * + * // How to set outline parameters for each material + * material.userData.outlineParameters = { + * thickness: 0.01, + * color: [ 0, 0, 0 ], + * alpha: 0.8, + * visible: true, + * keepAlive: true + * }; + */ + +class OutlineEffect { + + constructor( renderer, parameters = {} ) { + + this.enabled = true; + + const defaultThickness = parameters.defaultThickness !== undefined ? parameters.defaultThickness : 0.003; + const defaultColor = new Color().fromArray( parameters.defaultColor !== undefined ? parameters.defaultColor : [ 0, 0, 0 ] ); + const defaultAlpha = parameters.defaultAlpha !== undefined ? parameters.defaultAlpha : 1.0; + const defaultKeepAlive = parameters.defaultKeepAlive !== undefined ? parameters.defaultKeepAlive : false; + + // object.material.uuid -> outlineMaterial or + // object.material[ n ].uuid -> outlineMaterial + // save at the outline material creation and release + // if it's unused removeThresholdCount frames + // unless keepAlive is true. + const cache = {}; + + const removeThresholdCount = 60; + + // outlineMaterial.uuid -> object.material or + // outlineMaterial.uuid -> object.material[ n ] + // save before render and release after render. + const originalMaterials = {}; + + // object.uuid -> originalOnBeforeRender + // save before render and release after render. + const originalOnBeforeRenders = {}; + + //this.cache = cache; // for debug + + const uniformsOutline = { + outlineThickness: { value: defaultThickness }, + outlineColor: { value: defaultColor }, + outlineAlpha: { value: defaultAlpha } + }; + + const vertexShader = [ + '#include ', + '#include ', + '#include ', + '#include ', + '#include ', + '#include ', + '#include ', + '#include ', + + 'uniform float outlineThickness;', + + 'vec4 calculateOutline( vec4 pos, vec3 normal, vec4 skinned ) {', + ' float thickness = outlineThickness;', + ' const float ratio = 1.0;', // TODO: support outline thickness ratio for each vertex + ' vec4 pos2 = projectionMatrix * modelViewMatrix * vec4( skinned.xyz + normal, 1.0 );', + // NOTE: subtract pos2 from pos because BackSide objectNormal is negative + ' vec4 norm = normalize( pos - pos2 );', + ' return pos + norm * thickness * pos.w * ratio;', + '}', + + 'void main() {', + + ' #include ', + + ' #include ', + ' #include ', + ' #include ', + ' #include ', + + ' #include ', + ' #include ', + ' #include ', + ' #include ', + ' #include ', + + ' vec3 outlineNormal = - objectNormal;', // the outline material is always rendered with BackSide + + ' gl_Position = calculateOutline( gl_Position, outlineNormal, vec4( transformed, 1.0 ) );', + + ' #include ', + ' #include ', + ' #include ', + + '}', + + ].join( '\n' ); + + const fragmentShader = [ + + '#include ', + '#include ', + '#include ', + '#include ', + + 'uniform vec3 outlineColor;', + 'uniform float outlineAlpha;', + + 'void main() {', + + ' #include ', + ' #include ', + + ' gl_FragColor = vec4( outlineColor, outlineAlpha );', + + ' #include ', + ' #include ', + ' #include ', + ' #include ', + + '}' + + ].join( '\n' ); + + function createMaterial() { + + return new ShaderMaterial( { + type: 'OutlineEffect', + uniforms: UniformsUtils.merge( [ + UniformsLib[ 'fog' ], + UniformsLib[ 'displacementmap' ], + uniformsOutline + ] ), + vertexShader: vertexShader, + fragmentShader: fragmentShader, + side: BackSide + } ); + + } + + function getOutlineMaterialFromCache( originalMaterial ) { + + let data = cache[ originalMaterial.uuid ]; + + if ( data === undefined ) { + + data = { + material: createMaterial(), + used: true, + keepAlive: defaultKeepAlive, + count: 0 + }; + + cache[ originalMaterial.uuid ] = data; + + } + + data.used = true; + + return data.material; + + } + + function getOutlineMaterial( originalMaterial ) { + + const outlineMaterial = getOutlineMaterialFromCache( originalMaterial ); + + originalMaterials[ outlineMaterial.uuid ] = originalMaterial; + + updateOutlineMaterial( outlineMaterial, originalMaterial ); + + return outlineMaterial; + + } + + function isCompatible( object ) { + + const geometry = object.geometry; + const hasNormals = ( geometry !== undefined ) && ( geometry.attributes.normal !== undefined ); + + return ( object.isMesh === true && object.material !== undefined && hasNormals === true ); + + } + + function setOutlineMaterial( object ) { + + if ( isCompatible( object ) === false ) return; + + if ( Array.isArray( object.material ) ) { + + for ( let i = 0, il = object.material.length; i < il; i ++ ) { + + object.material[ i ] = getOutlineMaterial( object.material[ i ] ); + + } + + } else { + + object.material = getOutlineMaterial( object.material ); + + } + + originalOnBeforeRenders[ object.uuid ] = object.onBeforeRender; + object.onBeforeRender = onBeforeRender; + + } + + function restoreOriginalMaterial( object ) { + + if ( isCompatible( object ) === false ) return; + + if ( Array.isArray( object.material ) ) { + + for ( let i = 0, il = object.material.length; i < il; i ++ ) { + + object.material[ i ] = originalMaterials[ object.material[ i ].uuid ]; + + } + + } else { + + object.material = originalMaterials[ object.material.uuid ]; + + } + + object.onBeforeRender = originalOnBeforeRenders[ object.uuid ]; + + } + + function onBeforeRender( renderer, scene, camera, geometry, material ) { + + const originalMaterial = originalMaterials[ material.uuid ]; + + // just in case + if ( originalMaterial === undefined ) return; + + updateUniforms( material, originalMaterial ); + + } + + function updateUniforms( material, originalMaterial ) { + + const outlineParameters = originalMaterial.userData.outlineParameters; + + material.uniforms.outlineAlpha.value = originalMaterial.opacity; + + if ( outlineParameters !== undefined ) { + + if ( outlineParameters.thickness !== undefined ) material.uniforms.outlineThickness.value = outlineParameters.thickness; + if ( outlineParameters.color !== undefined ) material.uniforms.outlineColor.value.fromArray( outlineParameters.color ); + if ( outlineParameters.alpha !== undefined ) material.uniforms.outlineAlpha.value = outlineParameters.alpha; + + } + + if ( originalMaterial.displacementMap ) { + + material.uniforms.displacementMap.value = originalMaterial.displacementMap; + material.uniforms.displacementScale.value = originalMaterial.displacementScale; + material.uniforms.displacementBias.value = originalMaterial.displacementBias; + + } + + } + + function updateOutlineMaterial( material, originalMaterial ) { + + if ( material.name === 'invisible' ) return; + + const outlineParameters = originalMaterial.userData.outlineParameters; + + material.fog = originalMaterial.fog; + material.toneMapped = originalMaterial.toneMapped; + material.premultipliedAlpha = originalMaterial.premultipliedAlpha; + material.displacementMap = originalMaterial.displacementMap; + + if ( outlineParameters !== undefined ) { + + if ( originalMaterial.visible === false ) { + + material.visible = false; + + } else { + + material.visible = ( outlineParameters.visible !== undefined ) ? outlineParameters.visible : true; + + } + + material.transparent = ( outlineParameters.alpha !== undefined && outlineParameters.alpha < 1.0 ) ? true : originalMaterial.transparent; + + if ( outlineParameters.keepAlive !== undefined ) cache[ originalMaterial.uuid ].keepAlive = outlineParameters.keepAlive; + + } else { + + material.transparent = originalMaterial.transparent; + material.visible = originalMaterial.visible; + + } + + if ( originalMaterial.wireframe === true || originalMaterial.depthTest === false ) material.visible = false; + + if ( originalMaterial.clippingPlanes ) { + + material.clipping = true; + + material.clippingPlanes = originalMaterial.clippingPlanes; + material.clipIntersection = originalMaterial.clipIntersection; + material.clipShadows = originalMaterial.clipShadows; + + } + + material.version = originalMaterial.version; // update outline material if necessary + + } + + function cleanupCache() { + + let keys; + + // clear originialMaterials + keys = Object.keys( originalMaterials ); + + for ( let i = 0, il = keys.length; i < il; i ++ ) { + + originalMaterials[ keys[ i ] ] = undefined; + + } + + // clear originalOnBeforeRenders + keys = Object.keys( originalOnBeforeRenders ); + + for ( let i = 0, il = keys.length; i < il; i ++ ) { + + originalOnBeforeRenders[ keys[ i ] ] = undefined; + + } + + // remove unused outlineMaterial from cache + keys = Object.keys( cache ); + + for ( let i = 0, il = keys.length; i < il; i ++ ) { + + const key = keys[ i ]; + + if ( cache[ key ].used === false ) { + + cache[ key ].count ++; + + if ( cache[ key ].keepAlive === false && cache[ key ].count > removeThresholdCount ) { + + delete cache[ key ]; + + } + + } else { + + cache[ key ].used = false; + cache[ key ].count = 0; + + } + + } + + } + + this.render = function ( scene, camera ) { + + if ( this.enabled === false ) { + + renderer.render( scene, camera ); + return; + + } + + const currentAutoClear = renderer.autoClear; + renderer.autoClear = this.autoClear; + + renderer.render( scene, camera ); + + renderer.autoClear = currentAutoClear; + + this.renderOutline( scene, camera ); + + }; + + this.renderOutline = function ( scene, camera ) { + + const currentAutoClear = renderer.autoClear; + const currentSceneAutoUpdate = scene.matrixWorldAutoUpdate; + const currentSceneBackground = scene.background; + const currentShadowMapEnabled = renderer.shadowMap.enabled; + + scene.matrixWorldAutoUpdate = false; + scene.background = null; + renderer.autoClear = false; + renderer.shadowMap.enabled = false; + + scene.traverse( setOutlineMaterial ); + + renderer.render( scene, camera ); + + scene.traverse( restoreOriginalMaterial ); + + cleanupCache(); + + scene.matrixWorldAutoUpdate = currentSceneAutoUpdate; + scene.background = currentSceneBackground; + renderer.autoClear = currentAutoClear; + renderer.shadowMap.enabled = currentShadowMapEnabled; + + }; + + /* + * See #9918 + * + * The following property copies and wrapper methods enable + * OutlineEffect to be called from other *Effect, like + * + * effect = new StereoEffect( new OutlineEffect( renderer ) ); + * + * function render () { + * + * effect.render( scene, camera ); + * + * } + */ + this.autoClear = renderer.autoClear; + this.domElement = renderer.domElement; + this.shadowMap = renderer.shadowMap; + + this.clear = function ( color, depth, stencil ) { + + renderer.clear( color, depth, stencil ); + + }; + + this.getPixelRatio = function () { + + return renderer.getPixelRatio(); + + }; + + this.setPixelRatio = function ( value ) { + + renderer.setPixelRatio( value ); + + }; + + this.getSize = function ( target ) { + + return renderer.getSize( target ); + + }; + + this.setSize = function ( width, height, updateStyle ) { + + renderer.setSize( width, height, updateStyle ); + + }; + + this.setViewport = function ( x, y, width, height ) { + + renderer.setViewport( x, y, width, height ); + + }; + + this.setScissor = function ( x, y, width, height ) { + + renderer.setScissor( x, y, width, height ); + + }; + + this.setScissorTest = function ( boolean ) { + + renderer.setScissorTest( boolean ); + + }; + + this.setRenderTarget = function ( renderTarget ) { + + renderer.setRenderTarget( renderTarget ); + + }; + + } + +} + +export { OutlineEffect }; diff --git a/node_modules/three/examples/jsm/effects/ParallaxBarrierEffect.js b/node_modules/three/examples/jsm/effects/ParallaxBarrierEffect.js new file mode 100644 index 0000000..c01143c --- /dev/null +++ b/node_modules/three/examples/jsm/effects/ParallaxBarrierEffect.js @@ -0,0 +1,119 @@ +import { + LinearFilter, + Mesh, + NearestFilter, + OrthographicCamera, + PlaneGeometry, + RGBAFormat, + Scene, + ShaderMaterial, + StereoCamera, + WebGLRenderTarget +} from 'three'; + +class ParallaxBarrierEffect { + + constructor( renderer ) { + + const _camera = new OrthographicCamera( - 1, 1, 1, - 1, 0, 1 ); + + const _scene = new Scene(); + + const _stereo = new StereoCamera(); + + const _params = { minFilter: LinearFilter, magFilter: NearestFilter, format: RGBAFormat }; + + const _renderTargetL = new WebGLRenderTarget( 512, 512, _params ); + const _renderTargetR = new WebGLRenderTarget( 512, 512, _params ); + + const _material = new ShaderMaterial( { + + uniforms: { + + 'mapLeft': { value: _renderTargetL.texture }, + 'mapRight': { value: _renderTargetR.texture } + + }, + + vertexShader: [ + + 'varying vec2 vUv;', + + 'void main() {', + + ' vUv = vec2( uv.x, uv.y );', + ' gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );', + + '}' + + ].join( '\n' ), + + fragmentShader: [ + + 'uniform sampler2D mapLeft;', + 'uniform sampler2D mapRight;', + 'varying vec2 vUv;', + + 'void main() {', + + ' vec2 uv = vUv;', + + ' if ( ( mod( gl_FragCoord.y, 2.0 ) ) > 1.00 ) {', + + ' gl_FragColor = texture2D( mapLeft, uv );', + + ' } else {', + + ' gl_FragColor = texture2D( mapRight, uv );', + + ' }', + + ' #include ', + ' #include ', + + '}' + + ].join( '\n' ) + + } ); + + const mesh = new Mesh( new PlaneGeometry( 2, 2 ), _material ); + _scene.add( mesh ); + + this.setSize = function ( width, height ) { + + renderer.setSize( width, height ); + + const pixelRatio = renderer.getPixelRatio(); + + _renderTargetL.setSize( width * pixelRatio, height * pixelRatio ); + _renderTargetR.setSize( width * pixelRatio, height * pixelRatio ); + + }; + + this.render = function ( scene, camera ) { + + if ( scene.matrixWorldAutoUpdate === true ) scene.updateMatrixWorld(); + + if ( camera.parent === null && camera.matrixWorldAutoUpdate === true ) camera.updateMatrixWorld(); + + _stereo.update( camera ); + + renderer.setRenderTarget( _renderTargetL ); + renderer.clear(); + renderer.render( scene, _stereo.cameraL ); + + renderer.setRenderTarget( _renderTargetR ); + renderer.clear(); + renderer.render( scene, _stereo.cameraR ); + + renderer.setRenderTarget( null ); + renderer.render( _scene, _camera ); + + }; + + } + +} + +export { ParallaxBarrierEffect }; diff --git a/node_modules/three/examples/jsm/effects/PeppersGhostEffect.js b/node_modules/three/examples/jsm/effects/PeppersGhostEffect.js new file mode 100644 index 0000000..1572096 --- /dev/null +++ b/node_modules/three/examples/jsm/effects/PeppersGhostEffect.js @@ -0,0 +1,153 @@ +import { + PerspectiveCamera, + Quaternion, + Vector3 +} from 'three'; + +/** + * peppers ghost effect based on http://www.instructables.com/id/Reflective-Prism/?ALLSTEPS + */ + +class PeppersGhostEffect { + + constructor( renderer ) { + + const scope = this; + + scope.cameraDistance = 15; + scope.reflectFromAbove = false; + + // Internals + let _halfWidth, _width, _height; + + const _cameraF = new PerspectiveCamera(); //front + const _cameraB = new PerspectiveCamera(); //back + const _cameraL = new PerspectiveCamera(); //left + const _cameraR = new PerspectiveCamera(); //right + + const _position = new Vector3(); + const _quaternion = new Quaternion(); + const _scale = new Vector3(); + + // Initialization + renderer.autoClear = false; + + this.setSize = function ( width, height ) { + + _halfWidth = width / 2; + if ( width < height ) { + + _width = width / 3; + _height = width / 3; + + } else { + + _width = height / 3; + _height = height / 3; + + } + + renderer.setSize( width, height ); + + }; + + this.render = function ( scene, camera ) { + + if ( scene.matrixWorldAutoUpdate === true ) scene.updateMatrixWorld(); + + if ( camera.parent === null && camera.matrixWorldAutoUpdate === true ) camera.updateMatrixWorld(); + + camera.matrixWorld.decompose( _position, _quaternion, _scale ); + + // front + _cameraF.position.copy( _position ); + _cameraF.quaternion.copy( _quaternion ); + _cameraF.translateZ( scope.cameraDistance ); + _cameraF.lookAt( scene.position ); + + // back + _cameraB.position.copy( _position ); + _cameraB.quaternion.copy( _quaternion ); + _cameraB.translateZ( - ( scope.cameraDistance ) ); + _cameraB.lookAt( scene.position ); + _cameraB.rotation.z += 180 * ( Math.PI / 180 ); + + // left + _cameraL.position.copy( _position ); + _cameraL.quaternion.copy( _quaternion ); + _cameraL.translateX( - ( scope.cameraDistance ) ); + _cameraL.lookAt( scene.position ); + _cameraL.rotation.x += 90 * ( Math.PI / 180 ); + + // right + _cameraR.position.copy( _position ); + _cameraR.quaternion.copy( _quaternion ); + _cameraR.translateX( scope.cameraDistance ); + _cameraR.lookAt( scene.position ); + _cameraR.rotation.x += 90 * ( Math.PI / 180 ); + + + renderer.clear(); + renderer.setScissorTest( true ); + + renderer.setScissor( _halfWidth - ( _width / 2 ), ( _height * 2 ), _width, _height ); + renderer.setViewport( _halfWidth - ( _width / 2 ), ( _height * 2 ), _width, _height ); + + if ( scope.reflectFromAbove ) { + + renderer.render( scene, _cameraB ); + + } else { + + renderer.render( scene, _cameraF ); + + } + + renderer.setScissor( _halfWidth - ( _width / 2 ), 0, _width, _height ); + renderer.setViewport( _halfWidth - ( _width / 2 ), 0, _width, _height ); + + if ( scope.reflectFromAbove ) { + + renderer.render( scene, _cameraF ); + + } else { + + renderer.render( scene, _cameraB ); + + } + + renderer.setScissor( _halfWidth - ( _width / 2 ) - _width, _height, _width, _height ); + renderer.setViewport( _halfWidth - ( _width / 2 ) - _width, _height, _width, _height ); + + if ( scope.reflectFromAbove ) { + + renderer.render( scene, _cameraR ); + + } else { + + renderer.render( scene, _cameraL ); + + } + + renderer.setScissor( _halfWidth + ( _width / 2 ), _height, _width, _height ); + renderer.setViewport( _halfWidth + ( _width / 2 ), _height, _width, _height ); + + if ( scope.reflectFromAbove ) { + + renderer.render( scene, _cameraL ); + + } else { + + renderer.render( scene, _cameraR ); + + } + + renderer.setScissorTest( false ); + + }; + + } + +} + +export { PeppersGhostEffect }; diff --git a/node_modules/three/examples/jsm/effects/StereoEffect.js b/node_modules/three/examples/jsm/effects/StereoEffect.js new file mode 100644 index 0000000..e6e1b44 --- /dev/null +++ b/node_modules/three/examples/jsm/effects/StereoEffect.js @@ -0,0 +1,55 @@ +import { + StereoCamera, + Vector2 +} from 'three'; + +class StereoEffect { + + constructor( renderer ) { + + const _stereo = new StereoCamera(); + _stereo.aspect = 0.5; + const size = new Vector2(); + + this.setEyeSeparation = function ( eyeSep ) { + + _stereo.eyeSep = eyeSep; + + }; + + this.setSize = function ( width, height ) { + + renderer.setSize( width, height ); + + }; + + this.render = function ( scene, camera ) { + + if ( scene.matrixWorldAutoUpdate === true ) scene.updateMatrixWorld(); + + if ( camera.parent === null && camera.matrixWorldAutoUpdate === true ) camera.updateMatrixWorld(); + + _stereo.update( camera ); + + renderer.getSize( size ); + + if ( renderer.autoClear ) renderer.clear(); + renderer.setScissorTest( true ); + + renderer.setScissor( 0, 0, size.width / 2, size.height ); + renderer.setViewport( 0, 0, size.width / 2, size.height ); + renderer.render( scene, _stereo.cameraL ); + + renderer.setScissor( size.width / 2, 0, size.width / 2, size.height ); + renderer.setViewport( size.width / 2, 0, size.width / 2, size.height ); + renderer.render( scene, _stereo.cameraR ); + + renderer.setScissorTest( false ); + + }; + + } + +} + +export { StereoEffect }; diff --git a/node_modules/three/examples/jsm/environments/DebugEnvironment.js b/node_modules/three/examples/jsm/environments/DebugEnvironment.js new file mode 100644 index 0000000..ce3db06 --- /dev/null +++ b/node_modules/three/examples/jsm/environments/DebugEnvironment.js @@ -0,0 +1,52 @@ +import { + BackSide, + BoxGeometry, + Mesh, + MeshLambertMaterial, + MeshStandardMaterial, + PointLight, + Scene, +} from 'three'; + +class DebugEnvironment extends Scene { + + constructor() { + + super(); + + const geometry = new BoxGeometry(); + geometry.deleteAttribute( 'uv' ); + const roomMaterial = new MeshStandardMaterial( { metalness: 0, side: BackSide } ); + const room = new Mesh( geometry, roomMaterial ); + room.scale.setScalar( 10 ); + this.add( room ); + + const mainLight = new PointLight( 0xffffff, 50, 0, 2 ); + this.add( mainLight ); + + const material1 = new MeshLambertMaterial( { color: 0xff0000, emissive: 0xffffff, emissiveIntensity: 10 } ); + + const light1 = new Mesh( geometry, material1 ); + light1.position.set( - 5, 2, 0 ); + light1.scale.set( 0.1, 1, 1 ); + this.add( light1 ); + + const material2 = new MeshLambertMaterial( { color: 0x00ff00, emissive: 0xffffff, emissiveIntensity: 10 } ); + + const light2 = new Mesh( geometry, material2 ); + light2.position.set( 0, 5, 0 ); + light2.scale.set( 1, 0.1, 1 ); + this.add( light2 ); + + const material3 = new MeshLambertMaterial( { color: 0x0000ff, emissive: 0xffffff, emissiveIntensity: 10 } ); + + const light3 = new Mesh( geometry, material3 ); + light3.position.set( 2, 1, 5 ); + light3.scale.set( 1.5, 2, 0.1 ); + this.add( light3 ); + + } + +} + +export { DebugEnvironment }; diff --git a/node_modules/three/examples/jsm/environments/RoomEnvironment.js b/node_modules/three/examples/jsm/environments/RoomEnvironment.js new file mode 100644 index 0000000..f51f72b --- /dev/null +++ b/node_modules/three/examples/jsm/environments/RoomEnvironment.js @@ -0,0 +1,148 @@ +/** + * https://github.com/google/model-viewer/blob/master/packages/model-viewer/src/three-components/EnvironmentScene.ts + */ + +import { + BackSide, + BoxGeometry, + Mesh, + MeshBasicMaterial, + MeshStandardMaterial, + PointLight, + Scene, +} from 'three'; + +class RoomEnvironment extends Scene { + + constructor( renderer = null ) { + + super(); + + const geometry = new BoxGeometry(); + geometry.deleteAttribute( 'uv' ); + + const roomMaterial = new MeshStandardMaterial( { side: BackSide } ); + const boxMaterial = new MeshStandardMaterial(); + + let intensity = 5; + + if ( renderer !== null && renderer._useLegacyLights === false ) intensity = 900; + + const mainLight = new PointLight( 0xffffff, intensity, 28, 2 ); + mainLight.position.set( 0.418, 16.199, 0.300 ); + this.add( mainLight ); + + const room = new Mesh( geometry, roomMaterial ); + room.position.set( - 0.757, 13.219, 0.717 ); + room.scale.set( 31.713, 28.305, 28.591 ); + this.add( room ); + + const box1 = new Mesh( geometry, boxMaterial ); + box1.position.set( - 10.906, 2.009, 1.846 ); + box1.rotation.set( 0, - 0.195, 0 ); + box1.scale.set( 2.328, 7.905, 4.651 ); + this.add( box1 ); + + const box2 = new Mesh( geometry, boxMaterial ); + box2.position.set( - 5.607, - 0.754, - 0.758 ); + box2.rotation.set( 0, 0.994, 0 ); + box2.scale.set( 1.970, 1.534, 3.955 ); + this.add( box2 ); + + const box3 = new Mesh( geometry, boxMaterial ); + box3.position.set( 6.167, 0.857, 7.803 ); + box3.rotation.set( 0, 0.561, 0 ); + box3.scale.set( 3.927, 6.285, 3.687 ); + this.add( box3 ); + + const box4 = new Mesh( geometry, boxMaterial ); + box4.position.set( - 2.017, 0.018, 6.124 ); + box4.rotation.set( 0, 0.333, 0 ); + box4.scale.set( 2.002, 4.566, 2.064 ); + this.add( box4 ); + + const box5 = new Mesh( geometry, boxMaterial ); + box5.position.set( 2.291, - 0.756, - 2.621 ); + box5.rotation.set( 0, - 0.286, 0 ); + box5.scale.set( 1.546, 1.552, 1.496 ); + this.add( box5 ); + + const box6 = new Mesh( geometry, boxMaterial ); + box6.position.set( - 2.193, - 0.369, - 5.547 ); + box6.rotation.set( 0, 0.516, 0 ); + box6.scale.set( 3.875, 3.487, 2.986 ); + this.add( box6 ); + + + // -x right + const light1 = new Mesh( geometry, createAreaLightMaterial( 50 ) ); + light1.position.set( - 16.116, 14.37, 8.208 ); + light1.scale.set( 0.1, 2.428, 2.739 ); + this.add( light1 ); + + // -x left + const light2 = new Mesh( geometry, createAreaLightMaterial( 50 ) ); + light2.position.set( - 16.109, 18.021, - 8.207 ); + light2.scale.set( 0.1, 2.425, 2.751 ); + this.add( light2 ); + + // +x + const light3 = new Mesh( geometry, createAreaLightMaterial( 17 ) ); + light3.position.set( 14.904, 12.198, - 1.832 ); + light3.scale.set( 0.15, 4.265, 6.331 ); + this.add( light3 ); + + // +z + const light4 = new Mesh( geometry, createAreaLightMaterial( 43 ) ); + light4.position.set( - 0.462, 8.89, 14.520 ); + light4.scale.set( 4.38, 5.441, 0.088 ); + this.add( light4 ); + + // -z + const light5 = new Mesh( geometry, createAreaLightMaterial( 20 ) ); + light5.position.set( 3.235, 11.486, - 12.541 ); + light5.scale.set( 2.5, 2.0, 0.1 ); + this.add( light5 ); + + // +y + const light6 = new Mesh( geometry, createAreaLightMaterial( 100 ) ); + light6.position.set( 0.0, 20.0, 0.0 ); + light6.scale.set( 1.0, 0.1, 1.0 ); + this.add( light6 ); + + } + + dispose() { + + const resources = new Set(); + + this.traverse( ( object ) => { + + if ( object.isMesh ) { + + resources.add( object.geometry ); + resources.add( object.material ); + + } + + } ); + + for ( const resource of resources ) { + + resource.dispose(); + + } + + } + +} + +function createAreaLightMaterial( intensity ) { + + const material = new MeshBasicMaterial(); + material.color.setScalar( intensity ); + return material; + +} + +export { RoomEnvironment }; diff --git a/node_modules/three/examples/jsm/exporters/DRACOExporter.js b/node_modules/three/examples/jsm/exporters/DRACOExporter.js new file mode 100644 index 0000000..85a2e15 --- /dev/null +++ b/node_modules/three/examples/jsm/exporters/DRACOExporter.js @@ -0,0 +1,267 @@ +import { Color } from 'three'; + +/** + * Export draco compressed files from threejs geometry objects. + * + * Draco files are compressed and usually are smaller than conventional 3D file formats. + * + * The exporter receives a options object containing + * - decodeSpeed, indicates how to tune the encoder regarding decode speed (0 gives better speed but worst quality) + * - encodeSpeed, indicates how to tune the encoder parameters (0 gives better speed but worst quality) + * - encoderMethod + * - quantization, indicates the presision of each type of data stored in the draco file in the order (POSITION, NORMAL, COLOR, TEX_COORD, GENERIC) + * - exportUvs + * - exportNormals + * - exportColor + */ + +/* global DracoEncoderModule */ + +class DRACOExporter { + + parse( object, options = {} ) { + + options = Object.assign( { + decodeSpeed: 5, + encodeSpeed: 5, + encoderMethod: DRACOExporter.MESH_EDGEBREAKER_ENCODING, + quantization: [ 16, 8, 8, 8, 8 ], + exportUvs: true, + exportNormals: true, + exportColor: false, + }, options ); + + if ( DracoEncoderModule === undefined ) { + + throw new Error( 'THREE.DRACOExporter: required the draco_encoder to work.' ); + + } + + const geometry = object.geometry; + + const dracoEncoder = DracoEncoderModule(); + const encoder = new dracoEncoder.Encoder(); + let builder; + let dracoObject; + + if ( object.isMesh === true ) { + + builder = new dracoEncoder.MeshBuilder(); + dracoObject = new dracoEncoder.Mesh(); + + const vertices = geometry.getAttribute( 'position' ); + builder.AddFloatAttributeToMesh( dracoObject, dracoEncoder.POSITION, vertices.count, vertices.itemSize, vertices.array ); + + const faces = geometry.getIndex(); + + if ( faces !== null ) { + + builder.AddFacesToMesh( dracoObject, faces.count / 3, faces.array ); + + } else { + + const faces = new ( vertices.count > 65535 ? Uint32Array : Uint16Array )( vertices.count ); + + for ( let i = 0; i < faces.length; i ++ ) { + + faces[ i ] = i; + + } + + builder.AddFacesToMesh( dracoObject, vertices.count, faces ); + + } + + if ( options.exportNormals === true ) { + + const normals = geometry.getAttribute( 'normal' ); + + if ( normals !== undefined ) { + + builder.AddFloatAttributeToMesh( dracoObject, dracoEncoder.NORMAL, normals.count, normals.itemSize, normals.array ); + + } + + } + + if ( options.exportUvs === true ) { + + const uvs = geometry.getAttribute( 'uv' ); + + if ( uvs !== undefined ) { + + builder.AddFloatAttributeToMesh( dracoObject, dracoEncoder.TEX_COORD, uvs.count, uvs.itemSize, uvs.array ); + + } + + } + + if ( options.exportColor === true ) { + + const colors = geometry.getAttribute( 'color' ); + + if ( colors !== undefined ) { + + const array = createVertexColorSRGBArray( colors ); + + builder.AddFloatAttributeToMesh( dracoObject, dracoEncoder.COLOR, colors.count, colors.itemSize, array ); + + } + + } + + } else if ( object.isPoints === true ) { + + builder = new dracoEncoder.PointCloudBuilder(); + dracoObject = new dracoEncoder.PointCloud(); + + const vertices = geometry.getAttribute( 'position' ); + builder.AddFloatAttribute( dracoObject, dracoEncoder.POSITION, vertices.count, vertices.itemSize, vertices.array ); + + if ( options.exportColor === true ) { + + const colors = geometry.getAttribute( 'color' ); + + if ( colors !== undefined ) { + + const array = createVertexColorSRGBArray( colors ); + + builder.AddFloatAttribute( dracoObject, dracoEncoder.COLOR, colors.count, colors.itemSize, array ); + + } + + } + + } else { + + throw new Error( 'DRACOExporter: Unsupported object type.' ); + + } + + //Compress using draco encoder + + const encodedData = new dracoEncoder.DracoInt8Array(); + + //Sets the desired encoding and decoding speed for the given options from 0 (slowest speed, but the best compression) to 10 (fastest, but the worst compression). + + const encodeSpeed = ( options.encodeSpeed !== undefined ) ? options.encodeSpeed : 5; + const decodeSpeed = ( options.decodeSpeed !== undefined ) ? options.decodeSpeed : 5; + + encoder.SetSpeedOptions( encodeSpeed, decodeSpeed ); + + // Sets the desired encoding method for a given geometry. + + if ( options.encoderMethod !== undefined ) { + + encoder.SetEncodingMethod( options.encoderMethod ); + + } + + // Sets the quantization (number of bits used to represent) compression options for a named attribute. + // The attribute values will be quantized in a box defined by the maximum extent of the attribute values. + if ( options.quantization !== undefined ) { + + for ( let i = 0; i < 5; i ++ ) { + + if ( options.quantization[ i ] !== undefined ) { + + encoder.SetAttributeQuantization( i, options.quantization[ i ] ); + + } + + } + + } + + let length; + + if ( object.isMesh === true ) { + + length = encoder.EncodeMeshToDracoBuffer( dracoObject, encodedData ); + + } else { + + length = encoder.EncodePointCloudToDracoBuffer( dracoObject, true, encodedData ); + + } + + dracoEncoder.destroy( dracoObject ); + + if ( length === 0 ) { + + throw new Error( 'THREE.DRACOExporter: Draco encoding failed.' ); + + } + + //Copy encoded data to buffer. + const outputData = new Int8Array( new ArrayBuffer( length ) ); + + for ( let i = 0; i < length; i ++ ) { + + outputData[ i ] = encodedData.GetValue( i ); + + } + + dracoEncoder.destroy( encodedData ); + dracoEncoder.destroy( encoder ); + dracoEncoder.destroy( builder ); + + return outputData; + + } + +} + +function createVertexColorSRGBArray( attribute ) { + + // While .drc files do not specify colorspace, the only 'official' tooling + // is PLY and OBJ converters, which use sRGB. We'll assume sRGB is expected + // for .drc files, but note that Draco buffers embedded in glTF files will + // be Linear-sRGB instead. + + const _color = new Color(); + + const count = attribute.count; + const itemSize = attribute.itemSize; + const array = new Float32Array( count * itemSize ); + + for ( let i = 0, il = count; i < il; i ++ ) { + + _color.fromBufferAttribute( attribute, i ).convertLinearToSRGB(); + + array[ i * itemSize ] = _color.r; + array[ i * itemSize + 1 ] = _color.g; + array[ i * itemSize + 2 ] = _color.b; + + if ( itemSize === 4 ) { + + array[ i * itemSize + 3 ] = attribute.getW( i ); + + } + + } + + return array; + +} + +// Encoder methods + +DRACOExporter.MESH_EDGEBREAKER_ENCODING = 1; +DRACOExporter.MESH_SEQUENTIAL_ENCODING = 0; + +// Geometry type + +DRACOExporter.POINT_CLOUD = 0; +DRACOExporter.TRIANGULAR_MESH = 1; + +// Attribute type + +DRACOExporter.INVALID = - 1; +DRACOExporter.POSITION = 0; +DRACOExporter.NORMAL = 1; +DRACOExporter.COLOR = 2; +DRACOExporter.TEX_COORD = 3; +DRACOExporter.GENERIC = 4; + +export { DRACOExporter }; diff --git a/node_modules/three/examples/jsm/exporters/EXRExporter.js b/node_modules/three/examples/jsm/exporters/EXRExporter.js new file mode 100644 index 0000000..bd1d820 --- /dev/null +++ b/node_modules/three/examples/jsm/exporters/EXRExporter.js @@ -0,0 +1,579 @@ +/** + * @author sciecode / https://github.com/sciecode + * + * EXR format references: + * https://www.openexr.com/documentation/openexrfilelayout.pdf + */ + +import { + FloatType, + HalfFloatType, + RGBAFormat, + DataUtils, +} from 'three'; +import * as fflate from '../libs/fflate.module.js'; + +const textEncoder = new TextEncoder(); + +const NO_COMPRESSION = 0; +const ZIPS_COMPRESSION = 2; +const ZIP_COMPRESSION = 3; + +class EXRExporter { + + parse( arg1, arg2, arg3 ) { + + if ( ! arg1 || ! ( arg1.isWebGLRenderer || arg1.isDataTexture ) ) { + + throw Error( 'EXRExporter.parse: Unsupported first parameter, expected instance of WebGLRenderer or DataTexture.' ); + + } else if ( arg1.isWebGLRenderer ) { + + const renderer = arg1, renderTarget = arg2, options = arg3; + + supportedRTT( renderTarget ); + + const info = buildInfoRTT( renderTarget, options ), + dataBuffer = getPixelData( renderer, renderTarget, info ), + rawContentBuffer = reorganizeDataBuffer( dataBuffer, info ), + chunks = compressData( rawContentBuffer, info ); + + return fillData( chunks, info ); + + } else if ( arg1.isDataTexture ) { + + const texture = arg1, options = arg2; + + supportedDT( texture ); + + const info = buildInfoDT( texture, options ), + dataBuffer = texture.image.data, + rawContentBuffer = reorganizeDataBuffer( dataBuffer, info ), + chunks = compressData( rawContentBuffer, info ); + + return fillData( chunks, info ); + + } + + } + +} + +function supportedRTT( renderTarget ) { + + if ( ! renderTarget || ! renderTarget.isWebGLRenderTarget ) { + + throw Error( 'EXRExporter.parse: Unsupported second parameter, expected instance of WebGLRenderTarget.' ); + + } + + if ( renderTarget.isWebGLCubeRenderTarget || renderTarget.isWebGL3DRenderTarget || renderTarget.isWebGLArrayRenderTarget ) { + + throw Error( 'EXRExporter.parse: Unsupported render target type, expected instance of WebGLRenderTarget.' ); + + } + + if ( renderTarget.texture.type !== FloatType && renderTarget.texture.type !== HalfFloatType ) { + + throw Error( 'EXRExporter.parse: Unsupported WebGLRenderTarget texture type.' ); + + } + + if ( renderTarget.texture.format !== RGBAFormat ) { + + throw Error( 'EXRExporter.parse: Unsupported WebGLRenderTarget texture format, expected RGBAFormat.' ); + + } + +} + +function supportedDT( texture ) { + + if ( texture.type !== FloatType && texture.type !== HalfFloatType ) { + + throw Error( 'EXRExporter.parse: Unsupported DataTexture texture type.' ); + + } + + if ( texture.format !== RGBAFormat ) { + + throw Error( 'EXRExporter.parse: Unsupported DataTexture texture format, expected RGBAFormat.' ); + + } + + if ( ! texture.image.data ) { + + throw Error( 'EXRExporter.parse: Invalid DataTexture image data.' ); + + } + + if ( texture.type === FloatType && texture.image.data.constructor.name !== 'Float32Array' ) { + + throw Error( 'EXRExporter.parse: DataTexture image data doesn\'t match type, expected \'Float32Array\'.' ); + + } + + if ( texture.type === HalfFloatType && texture.image.data.constructor.name !== 'Uint16Array' ) { + + throw Error( 'EXRExporter.parse: DataTexture image data doesn\'t match type, expected \'Uint16Array\'.' ); + + } + +} + +function buildInfoRTT( renderTarget, options = {} ) { + + const compressionSizes = { + 0: 1, + 2: 1, + 3: 16 + }; + + const WIDTH = renderTarget.width, + HEIGHT = renderTarget.height, + TYPE = renderTarget.texture.type, + FORMAT = renderTarget.texture.format, + COMPRESSION = ( options.compression !== undefined ) ? options.compression : ZIP_COMPRESSION, + EXPORTER_TYPE = ( options.type !== undefined ) ? options.type : HalfFloatType, + OUT_TYPE = ( EXPORTER_TYPE === FloatType ) ? 2 : 1, + COMPRESSION_SIZE = compressionSizes[ COMPRESSION ], + NUM_CHANNELS = 4; + + return { + width: WIDTH, + height: HEIGHT, + type: TYPE, + format: FORMAT, + compression: COMPRESSION, + blockLines: COMPRESSION_SIZE, + dataType: OUT_TYPE, + dataSize: 2 * OUT_TYPE, + numBlocks: Math.ceil( HEIGHT / COMPRESSION_SIZE ), + numInputChannels: 4, + numOutputChannels: NUM_CHANNELS, + }; + +} + +function buildInfoDT( texture, options = {} ) { + + const compressionSizes = { + 0: 1, + 2: 1, + 3: 16 + }; + + const WIDTH = texture.image.width, + HEIGHT = texture.image.height, + TYPE = texture.type, + FORMAT = texture.format, + COMPRESSION = ( options.compression !== undefined ) ? options.compression : ZIP_COMPRESSION, + EXPORTER_TYPE = ( options.type !== undefined ) ? options.type : HalfFloatType, + OUT_TYPE = ( EXPORTER_TYPE === FloatType ) ? 2 : 1, + COMPRESSION_SIZE = compressionSizes[ COMPRESSION ], + NUM_CHANNELS = 4; + + return { + width: WIDTH, + height: HEIGHT, + type: TYPE, + format: FORMAT, + compression: COMPRESSION, + blockLines: COMPRESSION_SIZE, + dataType: OUT_TYPE, + dataSize: 2 * OUT_TYPE, + numBlocks: Math.ceil( HEIGHT / COMPRESSION_SIZE ), + numInputChannels: 4, + numOutputChannels: NUM_CHANNELS, + }; + +} + +function getPixelData( renderer, rtt, info ) { + + let dataBuffer; + + if ( info.type === FloatType ) { + + dataBuffer = new Float32Array( info.width * info.height * info.numInputChannels ); + + } else { + + dataBuffer = new Uint16Array( info.width * info.height * info.numInputChannels ); + + } + + renderer.readRenderTargetPixels( rtt, 0, 0, info.width, info.height, dataBuffer ); + + return dataBuffer; + +} + +function reorganizeDataBuffer( inBuffer, info ) { + + const w = info.width, + h = info.height, + dec = { r: 0, g: 0, b: 0, a: 0 }, + offset = { value: 0 }, + cOffset = ( info.numOutputChannels == 4 ) ? 1 : 0, + getValue = ( info.type == FloatType ) ? getFloat32 : getFloat16, + setValue = ( info.dataType == 1 ) ? setFloat16 : setFloat32, + outBuffer = new Uint8Array( info.width * info.height * info.numOutputChannels * info.dataSize ), + dv = new DataView( outBuffer.buffer ); + + for ( let y = 0; y < h; ++ y ) { + + for ( let x = 0; x < w; ++ x ) { + + const i = y * w * 4 + x * 4; + + const r = getValue( inBuffer, i ); + const g = getValue( inBuffer, i + 1 ); + const b = getValue( inBuffer, i + 2 ); + const a = getValue( inBuffer, i + 3 ); + + const line = ( h - y - 1 ) * w * ( 3 + cOffset ) * info.dataSize; + + decodeLinear( dec, r, g, b, a ); + + offset.value = line + x * info.dataSize; + setValue( dv, dec.a, offset ); + + offset.value = line + ( cOffset ) * w * info.dataSize + x * info.dataSize; + setValue( dv, dec.b, offset ); + + offset.value = line + ( 1 + cOffset ) * w * info.dataSize + x * info.dataSize; + setValue( dv, dec.g, offset ); + + offset.value = line + ( 2 + cOffset ) * w * info.dataSize + x * info.dataSize; + setValue( dv, dec.r, offset ); + + } + + } + + return outBuffer; + +} + +function compressData( inBuffer, info ) { + + let compress, + tmpBuffer, + sum = 0; + + const chunks = { data: new Array(), totalSize: 0 }, + size = info.width * info.numOutputChannels * info.blockLines * info.dataSize; + + switch ( info.compression ) { + + case 0: + compress = compressNONE; + break; + + case 2: + case 3: + compress = compressZIP; + break; + + } + + if ( info.compression !== 0 ) { + + tmpBuffer = new Uint8Array( size ); + + } + + for ( let i = 0; i < info.numBlocks; ++ i ) { + + const arr = inBuffer.subarray( size * i, size * ( i + 1 ) ); + + const block = compress( arr, tmpBuffer ); + + sum += block.length; + + chunks.data.push( { dataChunk: block, size: block.length } ); + + } + + chunks.totalSize = sum; + + return chunks; + +} + +function compressNONE( data ) { + + return data; + +} + +function compressZIP( data, tmpBuffer ) { + + // + // Reorder the pixel data. + // + + let t1 = 0, + t2 = Math.floor( ( data.length + 1 ) / 2 ), + s = 0; + + const stop = data.length - 1; + + while ( true ) { + + if ( s > stop ) break; + tmpBuffer[ t1 ++ ] = data[ s ++ ]; + + if ( s > stop ) break; + tmpBuffer[ t2 ++ ] = data[ s ++ ]; + + } + + // + // Predictor. + // + + let p = tmpBuffer[ 0 ]; + + for ( let t = 1; t < tmpBuffer.length; t ++ ) { + + const d = tmpBuffer[ t ] - p + ( 128 + 256 ); + p = tmpBuffer[ t ]; + tmpBuffer[ t ] = d; + + } + + const deflate = fflate.zlibSync( tmpBuffer ); + + return deflate; + +} + +function fillHeader( outBuffer, chunks, info ) { + + const offset = { value: 0 }; + const dv = new DataView( outBuffer.buffer ); + + setUint32( dv, 20000630, offset ); // magic + setUint32( dv, 2, offset ); // mask + + // = HEADER = + + setString( dv, 'compression', offset ); + setString( dv, 'compression', offset ); + setUint32( dv, 1, offset ); + setUint8( dv, info.compression, offset ); + + setString( dv, 'screenWindowCenter', offset ); + setString( dv, 'v2f', offset ); + setUint32( dv, 8, offset ); + setUint32( dv, 0, offset ); + setUint32( dv, 0, offset ); + + setString( dv, 'screenWindowWidth', offset ); + setString( dv, 'float', offset ); + setUint32( dv, 4, offset ); + setFloat32( dv, 1.0, offset ); + + setString( dv, 'pixelAspectRatio', offset ); + setString( dv, 'float', offset ); + setUint32( dv, 4, offset ); + setFloat32( dv, 1.0, offset ); + + setString( dv, 'lineOrder', offset ); + setString( dv, 'lineOrder', offset ); + setUint32( dv, 1, offset ); + setUint8( dv, 0, offset ); + + setString( dv, 'dataWindow', offset ); + setString( dv, 'box2i', offset ); + setUint32( dv, 16, offset ); + setUint32( dv, 0, offset ); + setUint32( dv, 0, offset ); + setUint32( dv, info.width - 1, offset ); + setUint32( dv, info.height - 1, offset ); + + setString( dv, 'displayWindow', offset ); + setString( dv, 'box2i', offset ); + setUint32( dv, 16, offset ); + setUint32( dv, 0, offset ); + setUint32( dv, 0, offset ); + setUint32( dv, info.width - 1, offset ); + setUint32( dv, info.height - 1, offset ); + + setString( dv, 'channels', offset ); + setString( dv, 'chlist', offset ); + setUint32( dv, info.numOutputChannels * 18 + 1, offset ); + + setString( dv, 'A', offset ); + setUint32( dv, info.dataType, offset ); + offset.value += 4; + setUint32( dv, 1, offset ); + setUint32( dv, 1, offset ); + + setString( dv, 'B', offset ); + setUint32( dv, info.dataType, offset ); + offset.value += 4; + setUint32( dv, 1, offset ); + setUint32( dv, 1, offset ); + + setString( dv, 'G', offset ); + setUint32( dv, info.dataType, offset ); + offset.value += 4; + setUint32( dv, 1, offset ); + setUint32( dv, 1, offset ); + + setString( dv, 'R', offset ); + setUint32( dv, info.dataType, offset ); + offset.value += 4; + setUint32( dv, 1, offset ); + setUint32( dv, 1, offset ); + + setUint8( dv, 0, offset ); + + // null-byte + setUint8( dv, 0, offset ); + + // = OFFSET TABLE = + + let sum = offset.value + info.numBlocks * 8; + + for ( let i = 0; i < chunks.data.length; ++ i ) { + + setUint64( dv, sum, offset ); + + sum += chunks.data[ i ].size + 8; + + } + +} + +function fillData( chunks, info ) { + + const TableSize = info.numBlocks * 8, + HeaderSize = 259 + ( 18 * info.numOutputChannels ), // 259 + 18 * chlist + offset = { value: HeaderSize + TableSize }, + outBuffer = new Uint8Array( HeaderSize + TableSize + chunks.totalSize + info.numBlocks * 8 ), + dv = new DataView( outBuffer.buffer ); + + fillHeader( outBuffer, chunks, info ); + + for ( let i = 0; i < chunks.data.length; ++ i ) { + + const data = chunks.data[ i ].dataChunk; + const size = chunks.data[ i ].size; + + setUint32( dv, i * info.blockLines, offset ); + setUint32( dv, size, offset ); + + outBuffer.set( data, offset.value ); + offset.value += size; + + } + + return outBuffer; + +} + +function decodeLinear( dec, r, g, b, a ) { + + dec.r = r; + dec.g = g; + dec.b = b; + dec.a = a; + +} + +// function decodeSRGB( dec, r, g, b, a ) { + +// dec.r = r > 0.04045 ? Math.pow( r * 0.9478672986 + 0.0521327014, 2.4 ) : r * 0.0773993808; +// dec.g = g > 0.04045 ? Math.pow( g * 0.9478672986 + 0.0521327014, 2.4 ) : g * 0.0773993808; +// dec.b = b > 0.04045 ? Math.pow( b * 0.9478672986 + 0.0521327014, 2.4 ) : b * 0.0773993808; +// dec.a = a; + +// } + + +function setUint8( dv, value, offset ) { + + dv.setUint8( offset.value, value ); + + offset.value += 1; + +} + +function setUint32( dv, value, offset ) { + + dv.setUint32( offset.value, value, true ); + + offset.value += 4; + +} + +function setFloat16( dv, value, offset ) { + + dv.setUint16( offset.value, DataUtils.toHalfFloat( value ), true ); + + offset.value += 2; + +} + +function setFloat32( dv, value, offset ) { + + dv.setFloat32( offset.value, value, true ); + + offset.value += 4; + +} + +function setUint64( dv, value, offset ) { + + dv.setBigUint64( offset.value, BigInt( value ), true ); + + offset.value += 8; + +} + +function setString( dv, string, offset ) { + + const tmp = textEncoder.encode( string + '\0' ); + + for ( let i = 0; i < tmp.length; ++ i ) { + + setUint8( dv, tmp[ i ], offset ); + + } + +} + +function decodeFloat16( binary ) { + + const exponent = ( binary & 0x7C00 ) >> 10, + fraction = binary & 0x03FF; + + return ( binary >> 15 ? - 1 : 1 ) * ( + exponent ? + ( + exponent === 0x1F ? + fraction ? NaN : Infinity : + Math.pow( 2, exponent - 15 ) * ( 1 + fraction / 0x400 ) + ) : + 6.103515625e-5 * ( fraction / 0x400 ) + ); + +} + +function getFloat16( arr, i ) { + + return decodeFloat16( arr[ i ] ); + +} + +function getFloat32( arr, i ) { + + return arr[ i ]; + +} + +export { EXRExporter, NO_COMPRESSION, ZIP_COMPRESSION, ZIPS_COMPRESSION }; diff --git a/node_modules/three/examples/jsm/exporters/GLTFExporter.js b/node_modules/three/examples/jsm/exporters/GLTFExporter.js new file mode 100644 index 0000000..7f72978 --- /dev/null +++ b/node_modules/three/examples/jsm/exporters/GLTFExporter.js @@ -0,0 +1,3380 @@ +import { + BufferAttribute, + ClampToEdgeWrapping, + Color, + DoubleSide, + InterpolateDiscrete, + InterpolateLinear, + NoColorSpace, + LinearFilter, + LinearMipmapLinearFilter, + LinearMipmapNearestFilter, + MathUtils, + Matrix4, + MirroredRepeatWrapping, + NearestFilter, + NearestMipmapLinearFilter, + NearestMipmapNearestFilter, + PropertyBinding, + RGBAFormat, + RepeatWrapping, + Scene, + Source, + SRGBColorSpace, + CompressedTexture, + Vector3, + Quaternion, + REVISION +} from 'three'; +import { decompress } from './../utils/TextureUtils.js'; + + +/** + * The KHR_mesh_quantization extension allows these extra attribute component types + * + * @see https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_mesh_quantization/README.md#extending-mesh-attributes + */ +const KHR_mesh_quantization_ExtraAttrTypes = { + POSITION: [ + 'byte', + 'byte normalized', + 'unsigned byte', + 'unsigned byte normalized', + 'short', + 'short normalized', + 'unsigned short', + 'unsigned short normalized', + ], + NORMAL: [ + 'byte normalized', + 'short normalized', + ], + TANGENT: [ + 'byte normalized', + 'short normalized', + ], + TEXCOORD: [ + 'byte', + 'byte normalized', + 'unsigned byte', + 'short', + 'short normalized', + 'unsigned short', + ], +}; + + +class GLTFExporter { + + constructor() { + + this.pluginCallbacks = []; + + this.register( function ( writer ) { + + return new GLTFLightExtension( writer ); + + } ); + + this.register( function ( writer ) { + + return new GLTFMaterialsUnlitExtension( writer ); + + } ); + + this.register( function ( writer ) { + + return new GLTFMaterialsTransmissionExtension( writer ); + + } ); + + this.register( function ( writer ) { + + return new GLTFMaterialsVolumeExtension( writer ); + + } ); + + this.register( function ( writer ) { + + return new GLTFMaterialsIorExtension( writer ); + + } ); + + this.register( function ( writer ) { + + return new GLTFMaterialsSpecularExtension( writer ); + + } ); + + this.register( function ( writer ) { + + return new GLTFMaterialsClearcoatExtension( writer ); + + } ); + + this.register( function ( writer ) { + + return new GLTFMaterialsDispersionExtension( writer ); + + } ); + + this.register( function ( writer ) { + + return new GLTFMaterialsIridescenceExtension( writer ); + + } ); + + this.register( function ( writer ) { + + return new GLTFMaterialsSheenExtension( writer ); + + } ); + + this.register( function ( writer ) { + + return new GLTFMaterialsAnisotropyExtension( writer ); + + } ); + + this.register( function ( writer ) { + + return new GLTFMaterialsEmissiveStrengthExtension( writer ); + + } ); + + this.register( function ( writer ) { + + return new GLTFMaterialsBumpExtension( writer ); + + } ); + + this.register( function ( writer ) { + + return new GLTFMeshGpuInstancing( writer ); + + } ); + + } + + register( callback ) { + + if ( this.pluginCallbacks.indexOf( callback ) === - 1 ) { + + this.pluginCallbacks.push( callback ); + + } + + return this; + + } + + unregister( callback ) { + + if ( this.pluginCallbacks.indexOf( callback ) !== - 1 ) { + + this.pluginCallbacks.splice( this.pluginCallbacks.indexOf( callback ), 1 ); + + } + + return this; + + } + + /** + * Parse scenes and generate GLTF output + * @param {Scene or [THREE.Scenes]} input Scene or Array of THREE.Scenes + * @param {Function} onDone Callback on completed + * @param {Function} onError Callback on errors + * @param {Object} options options + */ + parse( input, onDone, onError, options ) { + + const writer = new GLTFWriter(); + const plugins = []; + + for ( let i = 0, il = this.pluginCallbacks.length; i < il; i ++ ) { + + plugins.push( this.pluginCallbacks[ i ]( writer ) ); + + } + + writer.setPlugins( plugins ); + writer.write( input, onDone, options ).catch( onError ); + + } + + parseAsync( input, options ) { + + const scope = this; + + return new Promise( function ( resolve, reject ) { + + scope.parse( input, resolve, reject, options ); + + } ); + + } + +} + +//------------------------------------------------------------------------------ +// Constants +//------------------------------------------------------------------------------ + +const WEBGL_CONSTANTS = { + POINTS: 0x0000, + LINES: 0x0001, + LINE_LOOP: 0x0002, + LINE_STRIP: 0x0003, + TRIANGLES: 0x0004, + TRIANGLE_STRIP: 0x0005, + TRIANGLE_FAN: 0x0006, + + BYTE: 0x1400, + UNSIGNED_BYTE: 0x1401, + SHORT: 0x1402, + UNSIGNED_SHORT: 0x1403, + INT: 0x1404, + UNSIGNED_INT: 0x1405, + FLOAT: 0x1406, + + ARRAY_BUFFER: 0x8892, + ELEMENT_ARRAY_BUFFER: 0x8893, + + NEAREST: 0x2600, + LINEAR: 0x2601, + NEAREST_MIPMAP_NEAREST: 0x2700, + LINEAR_MIPMAP_NEAREST: 0x2701, + NEAREST_MIPMAP_LINEAR: 0x2702, + LINEAR_MIPMAP_LINEAR: 0x2703, + + CLAMP_TO_EDGE: 33071, + MIRRORED_REPEAT: 33648, + REPEAT: 10497 +}; + +const KHR_MESH_QUANTIZATION = 'KHR_mesh_quantization'; + +const THREE_TO_WEBGL = {}; + +THREE_TO_WEBGL[ NearestFilter ] = WEBGL_CONSTANTS.NEAREST; +THREE_TO_WEBGL[ NearestMipmapNearestFilter ] = WEBGL_CONSTANTS.NEAREST_MIPMAP_NEAREST; +THREE_TO_WEBGL[ NearestMipmapLinearFilter ] = WEBGL_CONSTANTS.NEAREST_MIPMAP_LINEAR; +THREE_TO_WEBGL[ LinearFilter ] = WEBGL_CONSTANTS.LINEAR; +THREE_TO_WEBGL[ LinearMipmapNearestFilter ] = WEBGL_CONSTANTS.LINEAR_MIPMAP_NEAREST; +THREE_TO_WEBGL[ LinearMipmapLinearFilter ] = WEBGL_CONSTANTS.LINEAR_MIPMAP_LINEAR; + +THREE_TO_WEBGL[ ClampToEdgeWrapping ] = WEBGL_CONSTANTS.CLAMP_TO_EDGE; +THREE_TO_WEBGL[ RepeatWrapping ] = WEBGL_CONSTANTS.REPEAT; +THREE_TO_WEBGL[ MirroredRepeatWrapping ] = WEBGL_CONSTANTS.MIRRORED_REPEAT; + +const PATH_PROPERTIES = { + scale: 'scale', + position: 'translation', + quaternion: 'rotation', + morphTargetInfluences: 'weights' +}; + +const DEFAULT_SPECULAR_COLOR = new Color(); + +// GLB constants +// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#glb-file-format-specification + +const GLB_HEADER_BYTES = 12; +const GLB_HEADER_MAGIC = 0x46546C67; +const GLB_VERSION = 2; + +const GLB_CHUNK_PREFIX_BYTES = 8; +const GLB_CHUNK_TYPE_JSON = 0x4E4F534A; +const GLB_CHUNK_TYPE_BIN = 0x004E4942; + +//------------------------------------------------------------------------------ +// Utility functions +//------------------------------------------------------------------------------ + +/** + * Compare two arrays + * @param {Array} array1 Array 1 to compare + * @param {Array} array2 Array 2 to compare + * @return {Boolean} Returns true if both arrays are equal + */ +function equalArray( array1, array2 ) { + + return ( array1.length === array2.length ) && array1.every( function ( element, index ) { + + return element === array2[ index ]; + + } ); + +} + +/** + * Converts a string to an ArrayBuffer. + * @param {string} text + * @return {ArrayBuffer} + */ +function stringToArrayBuffer( text ) { + + return new TextEncoder().encode( text ).buffer; + +} + +/** + * Is identity matrix + * + * @param {Matrix4} matrix + * @returns {Boolean} Returns true, if parameter is identity matrix + */ +function isIdentityMatrix( matrix ) { + + return equalArray( matrix.elements, [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ] ); + +} + +/** + * Get the min and max vectors from the given attribute + * @param {BufferAttribute} attribute Attribute to find the min/max in range from start to start + count + * @param {Integer} start + * @param {Integer} count + * @return {Object} Object containing the `min` and `max` values (As an array of attribute.itemSize components) + */ +function getMinMax( attribute, start, count ) { + + const output = { + + min: new Array( attribute.itemSize ).fill( Number.POSITIVE_INFINITY ), + max: new Array( attribute.itemSize ).fill( Number.NEGATIVE_INFINITY ) + + }; + + for ( let i = start; i < start + count; i ++ ) { + + for ( let a = 0; a < attribute.itemSize; a ++ ) { + + let value; + + if ( attribute.itemSize > 4 ) { + + // no support for interleaved data for itemSize > 4 + + value = attribute.array[ i * attribute.itemSize + a ]; + + } else { + + if ( a === 0 ) value = attribute.getX( i ); + else if ( a === 1 ) value = attribute.getY( i ); + else if ( a === 2 ) value = attribute.getZ( i ); + else if ( a === 3 ) value = attribute.getW( i ); + + if ( attribute.normalized === true ) { + + value = MathUtils.normalize( value, attribute.array ); + + } + + } + + output.min[ a ] = Math.min( output.min[ a ], value ); + output.max[ a ] = Math.max( output.max[ a ], value ); + + } + + } + + return output; + +} + +/** + * Get the required size + padding for a buffer, rounded to the next 4-byte boundary. + * https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#data-alignment + * + * @param {Integer} bufferSize The size the original buffer. + * @returns {Integer} new buffer size with required padding. + * + */ +function getPaddedBufferSize( bufferSize ) { + + return Math.ceil( bufferSize / 4 ) * 4; + +} + +/** + * Returns a buffer aligned to 4-byte boundary. + * + * @param {ArrayBuffer} arrayBuffer Buffer to pad + * @param {Integer} paddingByte (Optional) + * @returns {ArrayBuffer} The same buffer if it's already aligned to 4-byte boundary or a new buffer + */ +function getPaddedArrayBuffer( arrayBuffer, paddingByte = 0 ) { + + const paddedLength = getPaddedBufferSize( arrayBuffer.byteLength ); + + if ( paddedLength !== arrayBuffer.byteLength ) { + + const array = new Uint8Array( paddedLength ); + array.set( new Uint8Array( arrayBuffer ) ); + + if ( paddingByte !== 0 ) { + + for ( let i = arrayBuffer.byteLength; i < paddedLength; i ++ ) { + + array[ i ] = paddingByte; + + } + + } + + return array.buffer; + + } + + return arrayBuffer; + +} + +function getCanvas() { + + if ( typeof document === 'undefined' && typeof OffscreenCanvas !== 'undefined' ) { + + return new OffscreenCanvas( 1, 1 ); + + } + + return document.createElement( 'canvas' ); + +} + +function getToBlobPromise( canvas, mimeType ) { + + if ( canvas.toBlob !== undefined ) { + + return new Promise( ( resolve ) => canvas.toBlob( resolve, mimeType ) ); + + } + + let quality; + + // Blink's implementation of convertToBlob seems to default to a quality level of 100% + // Use the Blink default quality levels of toBlob instead so that file sizes are comparable. + if ( mimeType === 'image/jpeg' ) { + + quality = 0.92; + + } else if ( mimeType === 'image/webp' ) { + + quality = 0.8; + + } + + return canvas.convertToBlob( { + + type: mimeType, + quality: quality + + } ); + +} + +/** + * Writer + */ +class GLTFWriter { + + constructor() { + + this.plugins = []; + + this.options = {}; + this.pending = []; + this.buffers = []; + + this.byteOffset = 0; + this.buffers = []; + this.nodeMap = new Map(); + this.skins = []; + + this.extensionsUsed = {}; + this.extensionsRequired = {}; + + this.uids = new Map(); + this.uid = 0; + + this.json = { + asset: { + version: '2.0', + generator: 'THREE.GLTFExporter r' + REVISION + } + }; + + this.cache = { + meshes: new Map(), + attributes: new Map(), + attributesNormalized: new Map(), + materials: new Map(), + textures: new Map(), + images: new Map() + }; + + } + + setPlugins( plugins ) { + + this.plugins = plugins; + + } + + /** + * Parse scenes and generate GLTF output + * @param {Scene or [THREE.Scenes]} input Scene or Array of THREE.Scenes + * @param {Function} onDone Callback on completed + * @param {Object} options options + */ + async write( input, onDone, options = {} ) { + + this.options = Object.assign( { + // default options + binary: false, + trs: false, + onlyVisible: true, + maxTextureSize: Infinity, + animations: [], + includeCustomExtensions: false + }, options ); + + if ( this.options.animations.length > 0 ) { + + // Only TRS properties, and not matrices, may be targeted by animation. + this.options.trs = true; + + } + + this.processInput( input ); + + await Promise.all( this.pending ); + + const writer = this; + const buffers = writer.buffers; + const json = writer.json; + options = writer.options; + + const extensionsUsed = writer.extensionsUsed; + const extensionsRequired = writer.extensionsRequired; + + // Merge buffers. + const blob = new Blob( buffers, { type: 'application/octet-stream' } ); + + // Declare extensions. + const extensionsUsedList = Object.keys( extensionsUsed ); + const extensionsRequiredList = Object.keys( extensionsRequired ); + + if ( extensionsUsedList.length > 0 ) json.extensionsUsed = extensionsUsedList; + if ( extensionsRequiredList.length > 0 ) json.extensionsRequired = extensionsRequiredList; + + // Update bytelength of the single buffer. + if ( json.buffers && json.buffers.length > 0 ) json.buffers[ 0 ].byteLength = blob.size; + + if ( options.binary === true ) { + + // https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#glb-file-format-specification + + const reader = new FileReader(); + reader.readAsArrayBuffer( blob ); + reader.onloadend = function () { + + // Binary chunk. + const binaryChunk = getPaddedArrayBuffer( reader.result ); + const binaryChunkPrefix = new DataView( new ArrayBuffer( GLB_CHUNK_PREFIX_BYTES ) ); + binaryChunkPrefix.setUint32( 0, binaryChunk.byteLength, true ); + binaryChunkPrefix.setUint32( 4, GLB_CHUNK_TYPE_BIN, true ); + + // JSON chunk. + const jsonChunk = getPaddedArrayBuffer( stringToArrayBuffer( JSON.stringify( json ) ), 0x20 ); + const jsonChunkPrefix = new DataView( new ArrayBuffer( GLB_CHUNK_PREFIX_BYTES ) ); + jsonChunkPrefix.setUint32( 0, jsonChunk.byteLength, true ); + jsonChunkPrefix.setUint32( 4, GLB_CHUNK_TYPE_JSON, true ); + + // GLB header. + const header = new ArrayBuffer( GLB_HEADER_BYTES ); + const headerView = new DataView( header ); + headerView.setUint32( 0, GLB_HEADER_MAGIC, true ); + headerView.setUint32( 4, GLB_VERSION, true ); + const totalByteLength = GLB_HEADER_BYTES + + jsonChunkPrefix.byteLength + jsonChunk.byteLength + + binaryChunkPrefix.byteLength + binaryChunk.byteLength; + headerView.setUint32( 8, totalByteLength, true ); + + const glbBlob = new Blob( [ + header, + jsonChunkPrefix, + jsonChunk, + binaryChunkPrefix, + binaryChunk + ], { type: 'application/octet-stream' } ); + + const glbReader = new FileReader(); + glbReader.readAsArrayBuffer( glbBlob ); + glbReader.onloadend = function () { + + onDone( glbReader.result ); + + }; + + }; + + } else { + + if ( json.buffers && json.buffers.length > 0 ) { + + const reader = new FileReader(); + reader.readAsDataURL( blob ); + reader.onloadend = function () { + + const base64data = reader.result; + json.buffers[ 0 ].uri = base64data; + onDone( json ); + + }; + + } else { + + onDone( json ); + + } + + } + + + } + + /** + * Serializes a userData. + * + * @param {THREE.Object3D|THREE.Material} object + * @param {Object} objectDef + */ + serializeUserData( object, objectDef ) { + + if ( Object.keys( object.userData ).length === 0 ) return; + + const options = this.options; + const extensionsUsed = this.extensionsUsed; + + try { + + const json = JSON.parse( JSON.stringify( object.userData ) ); + + if ( options.includeCustomExtensions && json.gltfExtensions ) { + + if ( objectDef.extensions === undefined ) objectDef.extensions = {}; + + for ( const extensionName in json.gltfExtensions ) { + + objectDef.extensions[ extensionName ] = json.gltfExtensions[ extensionName ]; + extensionsUsed[ extensionName ] = true; + + } + + delete json.gltfExtensions; + + } + + if ( Object.keys( json ).length > 0 ) objectDef.extras = json; + + } catch ( error ) { + + console.warn( 'THREE.GLTFExporter: userData of \'' + object.name + '\' ' + + 'won\'t be serialized because of JSON.stringify error - ' + error.message ); + + } + + } + + /** + * Returns ids for buffer attributes. + * @param {Object} object + * @return {Integer} + */ + getUID( attribute, isRelativeCopy = false ) { + + if ( this.uids.has( attribute ) === false ) { + + const uids = new Map(); + + uids.set( true, this.uid ++ ); + uids.set( false, this.uid ++ ); + + this.uids.set( attribute, uids ); + + } + + const uids = this.uids.get( attribute ); + + return uids.get( isRelativeCopy ); + + } + + /** + * Checks if normal attribute values are normalized. + * + * @param {BufferAttribute} normal + * @returns {Boolean} + */ + isNormalizedNormalAttribute( normal ) { + + const cache = this.cache; + + if ( cache.attributesNormalized.has( normal ) ) return false; + + const v = new Vector3(); + + for ( let i = 0, il = normal.count; i < il; i ++ ) { + + // 0.0005 is from glTF-validator + if ( Math.abs( v.fromBufferAttribute( normal, i ).length() - 1.0 ) > 0.0005 ) return false; + + } + + return true; + + } + + /** + * Creates normalized normal buffer attribute. + * + * @param {BufferAttribute} normal + * @returns {BufferAttribute} + * + */ + createNormalizedNormalAttribute( normal ) { + + const cache = this.cache; + + if ( cache.attributesNormalized.has( normal ) ) return cache.attributesNormalized.get( normal ); + + const attribute = normal.clone(); + const v = new Vector3(); + + for ( let i = 0, il = attribute.count; i < il; i ++ ) { + + v.fromBufferAttribute( attribute, i ); + + if ( v.x === 0 && v.y === 0 && v.z === 0 ) { + + // if values can't be normalized set (1, 0, 0) + v.setX( 1.0 ); + + } else { + + v.normalize(); + + } + + attribute.setXYZ( i, v.x, v.y, v.z ); + + } + + cache.attributesNormalized.set( normal, attribute ); + + return attribute; + + } + + /** + * Applies a texture transform, if present, to the map definition. Requires + * the KHR_texture_transform extension. + * + * @param {Object} mapDef + * @param {THREE.Texture} texture + */ + applyTextureTransform( mapDef, texture ) { + + let didTransform = false; + const transformDef = {}; + + if ( texture.offset.x !== 0 || texture.offset.y !== 0 ) { + + transformDef.offset = texture.offset.toArray(); + didTransform = true; + + } + + if ( texture.rotation !== 0 ) { + + transformDef.rotation = texture.rotation; + didTransform = true; + + } + + if ( texture.repeat.x !== 1 || texture.repeat.y !== 1 ) { + + transformDef.scale = texture.repeat.toArray(); + didTransform = true; + + } + + if ( didTransform ) { + + mapDef.extensions = mapDef.extensions || {}; + mapDef.extensions[ 'KHR_texture_transform' ] = transformDef; + this.extensionsUsed[ 'KHR_texture_transform' ] = true; + + } + + } + + buildMetalRoughTexture( metalnessMap, roughnessMap ) { + + if ( metalnessMap === roughnessMap ) return metalnessMap; + + function getEncodingConversion( map ) { + + if ( map.colorSpace === SRGBColorSpace ) { + + return function SRGBToLinear( c ) { + + return ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 ); + + }; + + } + + return function LinearToLinear( c ) { + + return c; + + }; + + } + + console.warn( 'THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures.' ); + + if ( metalnessMap instanceof CompressedTexture ) { + + metalnessMap = decompress( metalnessMap ); + + } + + if ( roughnessMap instanceof CompressedTexture ) { + + roughnessMap = decompress( roughnessMap ); + + } + + const metalness = metalnessMap ? metalnessMap.image : null; + const roughness = roughnessMap ? roughnessMap.image : null; + + const width = Math.max( metalness ? metalness.width : 0, roughness ? roughness.width : 0 ); + const height = Math.max( metalness ? metalness.height : 0, roughness ? roughness.height : 0 ); + + const canvas = getCanvas(); + canvas.width = width; + canvas.height = height; + + const context = canvas.getContext( '2d' ); + context.fillStyle = '#00ffff'; + context.fillRect( 0, 0, width, height ); + + const composite = context.getImageData( 0, 0, width, height ); + + if ( metalness ) { + + context.drawImage( metalness, 0, 0, width, height ); + + const convert = getEncodingConversion( metalnessMap ); + const data = context.getImageData( 0, 0, width, height ).data; + + for ( let i = 2; i < data.length; i += 4 ) { + + composite.data[ i ] = convert( data[ i ] / 256 ) * 256; + + } + + } + + if ( roughness ) { + + context.drawImage( roughness, 0, 0, width, height ); + + const convert = getEncodingConversion( roughnessMap ); + const data = context.getImageData( 0, 0, width, height ).data; + + for ( let i = 1; i < data.length; i += 4 ) { + + composite.data[ i ] = convert( data[ i ] / 256 ) * 256; + + } + + } + + context.putImageData( composite, 0, 0 ); + + // + + const reference = metalnessMap || roughnessMap; + + const texture = reference.clone(); + + texture.source = new Source( canvas ); + texture.colorSpace = NoColorSpace; + texture.channel = ( metalnessMap || roughnessMap ).channel; + + if ( metalnessMap && roughnessMap && metalnessMap.channel !== roughnessMap.channel ) { + + console.warn( 'THREE.GLTFExporter: UV channels for metalnessMap and roughnessMap textures must match.' ); + + } + + return texture; + + } + + /** + * Process a buffer to append to the default one. + * @param {ArrayBuffer} buffer + * @return {Integer} + */ + processBuffer( buffer ) { + + const json = this.json; + const buffers = this.buffers; + + if ( ! json.buffers ) json.buffers = [ { byteLength: 0 } ]; + + // All buffers are merged before export. + buffers.push( buffer ); + + return 0; + + } + + /** + * Process and generate a BufferView + * @param {BufferAttribute} attribute + * @param {number} componentType + * @param {number} start + * @param {number} count + * @param {number} target (Optional) Target usage of the BufferView + * @return {Object} + */ + processBufferView( attribute, componentType, start, count, target ) { + + const json = this.json; + + if ( ! json.bufferViews ) json.bufferViews = []; + + // Create a new dataview and dump the attribute's array into it + + let componentSize; + + switch ( componentType ) { + + case WEBGL_CONSTANTS.BYTE: + case WEBGL_CONSTANTS.UNSIGNED_BYTE: + + componentSize = 1; + + break; + + case WEBGL_CONSTANTS.SHORT: + case WEBGL_CONSTANTS.UNSIGNED_SHORT: + + componentSize = 2; + + break; + + default: + + componentSize = 4; + + } + + let byteStride = attribute.itemSize * componentSize; + + if ( target === WEBGL_CONSTANTS.ARRAY_BUFFER ) { + + // Each element of a vertex attribute MUST be aligned to 4-byte boundaries + // inside a bufferView + byteStride = Math.ceil( byteStride / 4 ) * 4; + + } + + const byteLength = getPaddedBufferSize( count * byteStride ); + const dataView = new DataView( new ArrayBuffer( byteLength ) ); + let offset = 0; + + for ( let i = start; i < start + count; i ++ ) { + + for ( let a = 0; a < attribute.itemSize; a ++ ) { + + let value; + + if ( attribute.itemSize > 4 ) { + + // no support for interleaved data for itemSize > 4 + + value = attribute.array[ i * attribute.itemSize + a ]; + + } else { + + if ( a === 0 ) value = attribute.getX( i ); + else if ( a === 1 ) value = attribute.getY( i ); + else if ( a === 2 ) value = attribute.getZ( i ); + else if ( a === 3 ) value = attribute.getW( i ); + + if ( attribute.normalized === true ) { + + value = MathUtils.normalize( value, attribute.array ); + + } + + } + + if ( componentType === WEBGL_CONSTANTS.FLOAT ) { + + dataView.setFloat32( offset, value, true ); + + } else if ( componentType === WEBGL_CONSTANTS.INT ) { + + dataView.setInt32( offset, value, true ); + + } else if ( componentType === WEBGL_CONSTANTS.UNSIGNED_INT ) { + + dataView.setUint32( offset, value, true ); + + } else if ( componentType === WEBGL_CONSTANTS.SHORT ) { + + dataView.setInt16( offset, value, true ); + + } else if ( componentType === WEBGL_CONSTANTS.UNSIGNED_SHORT ) { + + dataView.setUint16( offset, value, true ); + + } else if ( componentType === WEBGL_CONSTANTS.BYTE ) { + + dataView.setInt8( offset, value ); + + } else if ( componentType === WEBGL_CONSTANTS.UNSIGNED_BYTE ) { + + dataView.setUint8( offset, value ); + + } + + offset += componentSize; + + } + + if ( ( offset % byteStride ) !== 0 ) { + + offset += byteStride - ( offset % byteStride ); + + } + + } + + const bufferViewDef = { + + buffer: this.processBuffer( dataView.buffer ), + byteOffset: this.byteOffset, + byteLength: byteLength + + }; + + if ( target !== undefined ) bufferViewDef.target = target; + + if ( target === WEBGL_CONSTANTS.ARRAY_BUFFER ) { + + // Only define byteStride for vertex attributes. + bufferViewDef.byteStride = byteStride; + + } + + this.byteOffset += byteLength; + + json.bufferViews.push( bufferViewDef ); + + // @TODO Merge bufferViews where possible. + const output = { + + id: json.bufferViews.length - 1, + byteLength: 0 + + }; + + return output; + + } + + /** + * Process and generate a BufferView from an image Blob. + * @param {Blob} blob + * @return {Promise} + */ + processBufferViewImage( blob ) { + + const writer = this; + const json = writer.json; + + if ( ! json.bufferViews ) json.bufferViews = []; + + return new Promise( function ( resolve ) { + + const reader = new FileReader(); + reader.readAsArrayBuffer( blob ); + reader.onloadend = function () { + + const buffer = getPaddedArrayBuffer( reader.result ); + + const bufferViewDef = { + buffer: writer.processBuffer( buffer ), + byteOffset: writer.byteOffset, + byteLength: buffer.byteLength + }; + + writer.byteOffset += buffer.byteLength; + resolve( json.bufferViews.push( bufferViewDef ) - 1 ); + + }; + + } ); + + } + + /** + * Process attribute to generate an accessor + * @param {BufferAttribute} attribute Attribute to process + * @param {THREE.BufferGeometry} geometry (Optional) Geometry used for truncated draw range + * @param {Integer} start (Optional) + * @param {Integer} count (Optional) + * @return {Integer|null} Index of the processed accessor on the "accessors" array + */ + processAccessor( attribute, geometry, start, count ) { + + const json = this.json; + + const types = { + + 1: 'SCALAR', + 2: 'VEC2', + 3: 'VEC3', + 4: 'VEC4', + 9: 'MAT3', + 16: 'MAT4' + + }; + + let componentType; + + // Detect the component type of the attribute array + if ( attribute.array.constructor === Float32Array ) { + + componentType = WEBGL_CONSTANTS.FLOAT; + + } else if ( attribute.array.constructor === Int32Array ) { + + componentType = WEBGL_CONSTANTS.INT; + + } else if ( attribute.array.constructor === Uint32Array ) { + + componentType = WEBGL_CONSTANTS.UNSIGNED_INT; + + } else if ( attribute.array.constructor === Int16Array ) { + + componentType = WEBGL_CONSTANTS.SHORT; + + } else if ( attribute.array.constructor === Uint16Array ) { + + componentType = WEBGL_CONSTANTS.UNSIGNED_SHORT; + + } else if ( attribute.array.constructor === Int8Array ) { + + componentType = WEBGL_CONSTANTS.BYTE; + + } else if ( attribute.array.constructor === Uint8Array ) { + + componentType = WEBGL_CONSTANTS.UNSIGNED_BYTE; + + } else { + + throw new Error( 'THREE.GLTFExporter: Unsupported bufferAttribute component type: ' + attribute.array.constructor.name ); + + } + + if ( start === undefined ) start = 0; + if ( count === undefined || count === Infinity ) count = attribute.count; + + // Skip creating an accessor if the attribute doesn't have data to export + if ( count === 0 ) return null; + + const minMax = getMinMax( attribute, start, count ); + let bufferViewTarget; + + // If geometry isn't provided, don't infer the target usage of the bufferView. For + // animation samplers, target must not be set. + if ( geometry !== undefined ) { + + bufferViewTarget = attribute === geometry.index ? WEBGL_CONSTANTS.ELEMENT_ARRAY_BUFFER : WEBGL_CONSTANTS.ARRAY_BUFFER; + + } + + const bufferView = this.processBufferView( attribute, componentType, start, count, bufferViewTarget ); + + const accessorDef = { + + bufferView: bufferView.id, + byteOffset: bufferView.byteOffset, + componentType: componentType, + count: count, + max: minMax.max, + min: minMax.min, + type: types[ attribute.itemSize ] + + }; + + if ( attribute.normalized === true ) accessorDef.normalized = true; + if ( ! json.accessors ) json.accessors = []; + + return json.accessors.push( accessorDef ) - 1; + + } + + /** + * Process image + * @param {Image} image to process + * @param {Integer} format of the image (RGBAFormat) + * @param {Boolean} flipY before writing out the image + * @param {String} mimeType export format + * @return {Integer} Index of the processed texture in the "images" array + */ + processImage( image, format, flipY, mimeType = 'image/png' ) { + + if ( image !== null ) { + + const writer = this; + const cache = writer.cache; + const json = writer.json; + const options = writer.options; + const pending = writer.pending; + + if ( ! cache.images.has( image ) ) cache.images.set( image, {} ); + + const cachedImages = cache.images.get( image ); + + const key = mimeType + ':flipY/' + flipY.toString(); + + if ( cachedImages[ key ] !== undefined ) return cachedImages[ key ]; + + if ( ! json.images ) json.images = []; + + const imageDef = { mimeType: mimeType }; + + const canvas = getCanvas(); + + canvas.width = Math.min( image.width, options.maxTextureSize ); + canvas.height = Math.min( image.height, options.maxTextureSize ); + + const ctx = canvas.getContext( '2d' ); + + if ( flipY === true ) { + + ctx.translate( 0, canvas.height ); + ctx.scale( 1, - 1 ); + + } + + if ( image.data !== undefined ) { // THREE.DataTexture + + if ( format !== RGBAFormat ) { + + console.error( 'GLTFExporter: Only RGBAFormat is supported.', format ); + + } + + if ( image.width > options.maxTextureSize || image.height > options.maxTextureSize ) { + + console.warn( 'GLTFExporter: Image size is bigger than maxTextureSize', image ); + + } + + const data = new Uint8ClampedArray( image.height * image.width * 4 ); + + for ( let i = 0; i < data.length; i += 4 ) { + + data[ i + 0 ] = image.data[ i + 0 ]; + data[ i + 1 ] = image.data[ i + 1 ]; + data[ i + 2 ] = image.data[ i + 2 ]; + data[ i + 3 ] = image.data[ i + 3 ]; + + } + + ctx.putImageData( new ImageData( data, image.width, image.height ), 0, 0 ); + + } else { + + if ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) || + ( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) || + ( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) || + ( typeof OffscreenCanvas !== 'undefined' && image instanceof OffscreenCanvas ) ) { + + ctx.drawImage( image, 0, 0, canvas.width, canvas.height ); + + } else { + + throw new Error( 'THREE.GLTFExporter: Invalid image type. Use HTMLImageElement, HTMLCanvasElement, ImageBitmap or OffscreenCanvas.' ); + + } + + } + + if ( options.binary === true ) { + + pending.push( + + getToBlobPromise( canvas, mimeType ) + .then( blob => writer.processBufferViewImage( blob ) ) + .then( bufferViewIndex => { + + imageDef.bufferView = bufferViewIndex; + + } ) + + ); + + } else { + + if ( canvas.toDataURL !== undefined ) { + + imageDef.uri = canvas.toDataURL( mimeType ); + + } else { + + pending.push( + + getToBlobPromise( canvas, mimeType ) + .then( blob => new FileReader().readAsDataURL( blob ) ) + .then( dataURL => { + + imageDef.uri = dataURL; + + } ) + + ); + + } + + } + + const index = json.images.push( imageDef ) - 1; + cachedImages[ key ] = index; + return index; + + } else { + + throw new Error( 'THREE.GLTFExporter: No valid image data found. Unable to process texture.' ); + + } + + } + + /** + * Process sampler + * @param {Texture} map Texture to process + * @return {Integer} Index of the processed texture in the "samplers" array + */ + processSampler( map ) { + + const json = this.json; + + if ( ! json.samplers ) json.samplers = []; + + const samplerDef = { + magFilter: THREE_TO_WEBGL[ map.magFilter ], + minFilter: THREE_TO_WEBGL[ map.minFilter ], + wrapS: THREE_TO_WEBGL[ map.wrapS ], + wrapT: THREE_TO_WEBGL[ map.wrapT ] + }; + + return json.samplers.push( samplerDef ) - 1; + + } + + /** + * Process texture + * @param {Texture} map Map to process + * @return {Integer} Index of the processed texture in the "textures" array + */ + processTexture( map ) { + + const writer = this; + const options = writer.options; + const cache = this.cache; + const json = this.json; + + if ( cache.textures.has( map ) ) return cache.textures.get( map ); + + if ( ! json.textures ) json.textures = []; + + // make non-readable textures (e.g. CompressedTexture) readable by blitting them into a new texture + if ( map instanceof CompressedTexture ) { + + map = decompress( map, options.maxTextureSize ); + + } + + let mimeType = map.userData.mimeType; + + if ( mimeType === 'image/webp' ) mimeType = 'image/png'; + + const textureDef = { + sampler: this.processSampler( map ), + source: this.processImage( map.image, map.format, map.flipY, mimeType ) + }; + + if ( map.name ) textureDef.name = map.name; + + this._invokeAll( function ( ext ) { + + ext.writeTexture && ext.writeTexture( map, textureDef ); + + } ); + + const index = json.textures.push( textureDef ) - 1; + cache.textures.set( map, index ); + return index; + + } + + /** + * Process material + * @param {THREE.Material} material Material to process + * @return {Integer|null} Index of the processed material in the "materials" array + */ + processMaterial( material ) { + + const cache = this.cache; + const json = this.json; + + if ( cache.materials.has( material ) ) return cache.materials.get( material ); + + if ( material.isShaderMaterial ) { + + console.warn( 'GLTFExporter: THREE.ShaderMaterial not supported.' ); + return null; + + } + + if ( ! json.materials ) json.materials = []; + + // @QUESTION Should we avoid including any attribute that has the default value? + const materialDef = { pbrMetallicRoughness: {} }; + + if ( material.isMeshStandardMaterial !== true && material.isMeshBasicMaterial !== true ) { + + console.warn( 'GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.' ); + + } + + // pbrMetallicRoughness.baseColorFactor + const color = material.color.toArray().concat( [ material.opacity ] ); + + if ( ! equalArray( color, [ 1, 1, 1, 1 ] ) ) { + + materialDef.pbrMetallicRoughness.baseColorFactor = color; + + } + + if ( material.isMeshStandardMaterial ) { + + materialDef.pbrMetallicRoughness.metallicFactor = material.metalness; + materialDef.pbrMetallicRoughness.roughnessFactor = material.roughness; + + } else { + + materialDef.pbrMetallicRoughness.metallicFactor = 0.5; + materialDef.pbrMetallicRoughness.roughnessFactor = 0.5; + + } + + // pbrMetallicRoughness.metallicRoughnessTexture + if ( material.metalnessMap || material.roughnessMap ) { + + const metalRoughTexture = this.buildMetalRoughTexture( material.metalnessMap, material.roughnessMap ); + + const metalRoughMapDef = { + index: this.processTexture( metalRoughTexture ), + channel: metalRoughTexture.channel + }; + this.applyTextureTransform( metalRoughMapDef, metalRoughTexture ); + materialDef.pbrMetallicRoughness.metallicRoughnessTexture = metalRoughMapDef; + + } + + // pbrMetallicRoughness.baseColorTexture + if ( material.map ) { + + const baseColorMapDef = { + index: this.processTexture( material.map ), + texCoord: material.map.channel + }; + this.applyTextureTransform( baseColorMapDef, material.map ); + materialDef.pbrMetallicRoughness.baseColorTexture = baseColorMapDef; + + } + + if ( material.emissive ) { + + const emissive = material.emissive; + const maxEmissiveComponent = Math.max( emissive.r, emissive.g, emissive.b ); + + if ( maxEmissiveComponent > 0 ) { + + materialDef.emissiveFactor = material.emissive.toArray(); + + } + + // emissiveTexture + if ( material.emissiveMap ) { + + const emissiveMapDef = { + index: this.processTexture( material.emissiveMap ), + texCoord: material.emissiveMap.channel + }; + this.applyTextureTransform( emissiveMapDef, material.emissiveMap ); + materialDef.emissiveTexture = emissiveMapDef; + + } + + } + + // normalTexture + if ( material.normalMap ) { + + const normalMapDef = { + index: this.processTexture( material.normalMap ), + texCoord: material.normalMap.channel + }; + + if ( material.normalScale && material.normalScale.x !== 1 ) { + + // glTF normal scale is univariate. Ignore `y`, which may be flipped. + // Context: https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995 + normalMapDef.scale = material.normalScale.x; + + } + + this.applyTextureTransform( normalMapDef, material.normalMap ); + materialDef.normalTexture = normalMapDef; + + } + + // occlusionTexture + if ( material.aoMap ) { + + const occlusionMapDef = { + index: this.processTexture( material.aoMap ), + texCoord: material.aoMap.channel + }; + + if ( material.aoMapIntensity !== 1.0 ) { + + occlusionMapDef.strength = material.aoMapIntensity; + + } + + this.applyTextureTransform( occlusionMapDef, material.aoMap ); + materialDef.occlusionTexture = occlusionMapDef; + + } + + // alphaMode + if ( material.transparent ) { + + materialDef.alphaMode = 'BLEND'; + + } else { + + if ( material.alphaTest > 0.0 ) { + + materialDef.alphaMode = 'MASK'; + materialDef.alphaCutoff = material.alphaTest; + + } + + } + + // doubleSided + if ( material.side === DoubleSide ) materialDef.doubleSided = true; + if ( material.name !== '' ) materialDef.name = material.name; + + this.serializeUserData( material, materialDef ); + + this._invokeAll( function ( ext ) { + + ext.writeMaterial && ext.writeMaterial( material, materialDef ); + + } ); + + const index = json.materials.push( materialDef ) - 1; + cache.materials.set( material, index ); + return index; + + } + + /** + * Process mesh + * @param {THREE.Mesh} mesh Mesh to process + * @return {Integer|null} Index of the processed mesh in the "meshes" array + */ + processMesh( mesh ) { + + const cache = this.cache; + const json = this.json; + + const meshCacheKeyParts = [ mesh.geometry.uuid ]; + + if ( Array.isArray( mesh.material ) ) { + + for ( let i = 0, l = mesh.material.length; i < l; i ++ ) { + + meshCacheKeyParts.push( mesh.material[ i ].uuid ); + + } + + } else { + + meshCacheKeyParts.push( mesh.material.uuid ); + + } + + const meshCacheKey = meshCacheKeyParts.join( ':' ); + + if ( cache.meshes.has( meshCacheKey ) ) return cache.meshes.get( meshCacheKey ); + + const geometry = mesh.geometry; + + let mode; + + // Use the correct mode + if ( mesh.isLineSegments ) { + + mode = WEBGL_CONSTANTS.LINES; + + } else if ( mesh.isLineLoop ) { + + mode = WEBGL_CONSTANTS.LINE_LOOP; + + } else if ( mesh.isLine ) { + + mode = WEBGL_CONSTANTS.LINE_STRIP; + + } else if ( mesh.isPoints ) { + + mode = WEBGL_CONSTANTS.POINTS; + + } else { + + mode = mesh.material.wireframe ? WEBGL_CONSTANTS.LINES : WEBGL_CONSTANTS.TRIANGLES; + + } + + const meshDef = {}; + const attributes = {}; + const primitives = []; + const targets = []; + + // Conversion between attributes names in threejs and gltf spec + const nameConversion = { + uv: 'TEXCOORD_0', + uv1: 'TEXCOORD_1', + uv2: 'TEXCOORD_2', + uv3: 'TEXCOORD_3', + color: 'COLOR_0', + skinWeight: 'WEIGHTS_0', + skinIndex: 'JOINTS_0' + }; + + const originalNormal = geometry.getAttribute( 'normal' ); + + if ( originalNormal !== undefined && ! this.isNormalizedNormalAttribute( originalNormal ) ) { + + console.warn( 'THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one.' ); + + geometry.setAttribute( 'normal', this.createNormalizedNormalAttribute( originalNormal ) ); + + } + + // @QUESTION Detect if .vertexColors = true? + // For every attribute create an accessor + let modifiedAttribute = null; + + for ( let attributeName in geometry.attributes ) { + + // Ignore morph target attributes, which are exported later. + if ( attributeName.slice( 0, 5 ) === 'morph' ) continue; + + const attribute = geometry.attributes[ attributeName ]; + attributeName = nameConversion[ attributeName ] || attributeName.toUpperCase(); + + // Prefix all geometry attributes except the ones specifically + // listed in the spec; non-spec attributes are considered custom. + const validVertexAttributes = + /^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/; + + if ( ! validVertexAttributes.test( attributeName ) ) attributeName = '_' + attributeName; + + if ( cache.attributes.has( this.getUID( attribute ) ) ) { + + attributes[ attributeName ] = cache.attributes.get( this.getUID( attribute ) ); + continue; + + } + + // JOINTS_0 must be UNSIGNED_BYTE or UNSIGNED_SHORT. + modifiedAttribute = null; + const array = attribute.array; + + if ( attributeName === 'JOINTS_0' && + ! ( array instanceof Uint16Array ) && + ! ( array instanceof Uint8Array ) ) { + + console.warn( 'GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.' ); + modifiedAttribute = new BufferAttribute( new Uint16Array( array ), attribute.itemSize, attribute.normalized ); + + } + + const accessor = this.processAccessor( modifiedAttribute || attribute, geometry ); + + if ( accessor !== null ) { + + if ( ! attributeName.startsWith( '_' ) ) { + + this.detectMeshQuantization( attributeName, attribute ); + + } + + attributes[ attributeName ] = accessor; + cache.attributes.set( this.getUID( attribute ), accessor ); + + } + + } + + if ( originalNormal !== undefined ) geometry.setAttribute( 'normal', originalNormal ); + + // Skip if no exportable attributes found + if ( Object.keys( attributes ).length === 0 ) return null; + + // Morph targets + if ( mesh.morphTargetInfluences !== undefined && mesh.morphTargetInfluences.length > 0 ) { + + const weights = []; + const targetNames = []; + const reverseDictionary = {}; + + if ( mesh.morphTargetDictionary !== undefined ) { + + for ( const key in mesh.morphTargetDictionary ) { + + reverseDictionary[ mesh.morphTargetDictionary[ key ] ] = key; + + } + + } + + for ( let i = 0; i < mesh.morphTargetInfluences.length; ++ i ) { + + const target = {}; + let warned = false; + + for ( const attributeName in geometry.morphAttributes ) { + + // glTF 2.0 morph supports only POSITION/NORMAL/TANGENT. + // Three.js doesn't support TANGENT yet. + + if ( attributeName !== 'position' && attributeName !== 'normal' ) { + + if ( ! warned ) { + + console.warn( 'GLTFExporter: Only POSITION and NORMAL morph are supported.' ); + warned = true; + + } + + continue; + + } + + const attribute = geometry.morphAttributes[ attributeName ][ i ]; + const gltfAttributeName = attributeName.toUpperCase(); + + // Three.js morph attribute has absolute values while the one of glTF has relative values. + // + // glTF 2.0 Specification: + // https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#morph-targets + + const baseAttribute = geometry.attributes[ attributeName ]; + + if ( cache.attributes.has( this.getUID( attribute, true ) ) ) { + + target[ gltfAttributeName ] = cache.attributes.get( this.getUID( attribute, true ) ); + continue; + + } + + // Clones attribute not to override + const relativeAttribute = attribute.clone(); + + if ( ! geometry.morphTargetsRelative ) { + + for ( let j = 0, jl = attribute.count; j < jl; j ++ ) { + + for ( let a = 0; a < attribute.itemSize; a ++ ) { + + if ( a === 0 ) relativeAttribute.setX( j, attribute.getX( j ) - baseAttribute.getX( j ) ); + if ( a === 1 ) relativeAttribute.setY( j, attribute.getY( j ) - baseAttribute.getY( j ) ); + if ( a === 2 ) relativeAttribute.setZ( j, attribute.getZ( j ) - baseAttribute.getZ( j ) ); + if ( a === 3 ) relativeAttribute.setW( j, attribute.getW( j ) - baseAttribute.getW( j ) ); + + } + + } + + } + + target[ gltfAttributeName ] = this.processAccessor( relativeAttribute, geometry ); + cache.attributes.set( this.getUID( baseAttribute, true ), target[ gltfAttributeName ] ); + + } + + targets.push( target ); + + weights.push( mesh.morphTargetInfluences[ i ] ); + + if ( mesh.morphTargetDictionary !== undefined ) targetNames.push( reverseDictionary[ i ] ); + + } + + meshDef.weights = weights; + + if ( targetNames.length > 0 ) { + + meshDef.extras = {}; + meshDef.extras.targetNames = targetNames; + + } + + } + + const isMultiMaterial = Array.isArray( mesh.material ); + + if ( isMultiMaterial && geometry.groups.length === 0 ) return null; + + let didForceIndices = false; + + if ( isMultiMaterial && geometry.index === null ) { + + const indices = []; + + for ( let i = 0, il = geometry.attributes.position.count; i < il; i ++ ) { + + indices[ i ] = i; + + } + + geometry.setIndex( indices ); + + didForceIndices = true; + + } + + const materials = isMultiMaterial ? mesh.material : [ mesh.material ]; + const groups = isMultiMaterial ? geometry.groups : [ { materialIndex: 0, start: undefined, count: undefined } ]; + + for ( let i = 0, il = groups.length; i < il; i ++ ) { + + const primitive = { + mode: mode, + attributes: attributes, + }; + + this.serializeUserData( geometry, primitive ); + + if ( targets.length > 0 ) primitive.targets = targets; + + if ( geometry.index !== null ) { + + let cacheKey = this.getUID( geometry.index ); + + if ( groups[ i ].start !== undefined || groups[ i ].count !== undefined ) { + + cacheKey += ':' + groups[ i ].start + ':' + groups[ i ].count; + + } + + if ( cache.attributes.has( cacheKey ) ) { + + primitive.indices = cache.attributes.get( cacheKey ); + + } else { + + primitive.indices = this.processAccessor( geometry.index, geometry, groups[ i ].start, groups[ i ].count ); + cache.attributes.set( cacheKey, primitive.indices ); + + } + + if ( primitive.indices === null ) delete primitive.indices; + + } + + const material = this.processMaterial( materials[ groups[ i ].materialIndex ] ); + + if ( material !== null ) primitive.material = material; + + primitives.push( primitive ); + + } + + if ( didForceIndices === true ) { + + geometry.setIndex( null ); + + } + + meshDef.primitives = primitives; + + if ( ! json.meshes ) json.meshes = []; + + this._invokeAll( function ( ext ) { + + ext.writeMesh && ext.writeMesh( mesh, meshDef ); + + } ); + + const index = json.meshes.push( meshDef ) - 1; + cache.meshes.set( meshCacheKey, index ); + return index; + + } + + /** + * If a vertex attribute with a + * [non-standard data type](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes-overview) + * is used, it is checked whether it is a valid data type according to the + * [KHR_mesh_quantization](https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_mesh_quantization/README.md) + * extension. + * In this case the extension is automatically added to the list of used extensions. + * + * @param {string} attributeName + * @param {THREE.BufferAttribute} attribute + */ + detectMeshQuantization( attributeName, attribute ) { + + if ( this.extensionsUsed[ KHR_MESH_QUANTIZATION ] ) return; + + let attrType = undefined; + + switch ( attribute.array.constructor ) { + + case Int8Array: + + attrType = 'byte'; + + break; + + case Uint8Array: + + attrType = 'unsigned byte'; + + break; + + case Int16Array: + + attrType = 'short'; + + break; + + case Uint16Array: + + attrType = 'unsigned short'; + + break; + + default: + + return; + + } + + if ( attribute.normalized ) attrType += ' normalized'; + + const attrNamePrefix = attributeName.split( '_', 1 )[ 0 ]; + + if ( KHR_mesh_quantization_ExtraAttrTypes[ attrNamePrefix ] && KHR_mesh_quantization_ExtraAttrTypes[ attrNamePrefix ].includes( attrType ) ) { + + this.extensionsUsed[ KHR_MESH_QUANTIZATION ] = true; + this.extensionsRequired[ KHR_MESH_QUANTIZATION ] = true; + + } + + } + + /** + * Process camera + * @param {THREE.Camera} camera Camera to process + * @return {Integer} Index of the processed mesh in the "camera" array + */ + processCamera( camera ) { + + const json = this.json; + + if ( ! json.cameras ) json.cameras = []; + + const isOrtho = camera.isOrthographicCamera; + + const cameraDef = { + type: isOrtho ? 'orthographic' : 'perspective' + }; + + if ( isOrtho ) { + + cameraDef.orthographic = { + xmag: camera.right * 2, + ymag: camera.top * 2, + zfar: camera.far <= 0 ? 0.001 : camera.far, + znear: camera.near < 0 ? 0 : camera.near + }; + + } else { + + cameraDef.perspective = { + aspectRatio: camera.aspect, + yfov: MathUtils.degToRad( camera.fov ), + zfar: camera.far <= 0 ? 0.001 : camera.far, + znear: camera.near < 0 ? 0 : camera.near + }; + + } + + // Question: Is saving "type" as name intentional? + if ( camera.name !== '' ) cameraDef.name = camera.type; + + return json.cameras.push( cameraDef ) - 1; + + } + + /** + * Creates glTF animation entry from AnimationClip object. + * + * Status: + * - Only properties listed in PATH_PROPERTIES may be animated. + * + * @param {THREE.AnimationClip} clip + * @param {THREE.Object3D} root + * @return {number|null} + */ + processAnimation( clip, root ) { + + const json = this.json; + const nodeMap = this.nodeMap; + + if ( ! json.animations ) json.animations = []; + + clip = GLTFExporter.Utils.mergeMorphTargetTracks( clip.clone(), root ); + + const tracks = clip.tracks; + const channels = []; + const samplers = []; + + for ( let i = 0; i < tracks.length; ++ i ) { + + const track = tracks[ i ]; + const trackBinding = PropertyBinding.parseTrackName( track.name ); + let trackNode = PropertyBinding.findNode( root, trackBinding.nodeName ); + const trackProperty = PATH_PROPERTIES[ trackBinding.propertyName ]; + + if ( trackBinding.objectName === 'bones' ) { + + if ( trackNode.isSkinnedMesh === true ) { + + trackNode = trackNode.skeleton.getBoneByName( trackBinding.objectIndex ); + + } else { + + trackNode = undefined; + + } + + } + + if ( ! trackNode || ! trackProperty ) { + + console.warn( 'THREE.GLTFExporter: Could not export animation track "%s".', track.name ); + return null; + + } + + const inputItemSize = 1; + let outputItemSize = track.values.length / track.times.length; + + if ( trackProperty === PATH_PROPERTIES.morphTargetInfluences ) { + + outputItemSize /= trackNode.morphTargetInfluences.length; + + } + + let interpolation; + + // @TODO export CubicInterpolant(InterpolateSmooth) as CUBICSPLINE + + // Detecting glTF cubic spline interpolant by checking factory method's special property + // GLTFCubicSplineInterpolant is a custom interpolant and track doesn't return + // valid value from .getInterpolation(). + if ( track.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === true ) { + + interpolation = 'CUBICSPLINE'; + + // itemSize of CUBICSPLINE keyframe is 9 + // (VEC3 * 3: inTangent, splineVertex, and outTangent) + // but needs to be stored as VEC3 so dividing by 3 here. + outputItemSize /= 3; + + } else if ( track.getInterpolation() === InterpolateDiscrete ) { + + interpolation = 'STEP'; + + } else { + + interpolation = 'LINEAR'; + + } + + samplers.push( { + input: this.processAccessor( new BufferAttribute( track.times, inputItemSize ) ), + output: this.processAccessor( new BufferAttribute( track.values, outputItemSize ) ), + interpolation: interpolation + } ); + + channels.push( { + sampler: samplers.length - 1, + target: { + node: nodeMap.get( trackNode ), + path: trackProperty + } + } ); + + } + + json.animations.push( { + name: clip.name || 'clip_' + json.animations.length, + samplers: samplers, + channels: channels + } ); + + return json.animations.length - 1; + + } + + /** + * @param {THREE.Object3D} object + * @return {number|null} + */ + processSkin( object ) { + + const json = this.json; + const nodeMap = this.nodeMap; + + const node = json.nodes[ nodeMap.get( object ) ]; + + const skeleton = object.skeleton; + + if ( skeleton === undefined ) return null; + + const rootJoint = object.skeleton.bones[ 0 ]; + + if ( rootJoint === undefined ) return null; + + const joints = []; + const inverseBindMatrices = new Float32Array( skeleton.bones.length * 16 ); + const temporaryBoneInverse = new Matrix4(); + + for ( let i = 0; i < skeleton.bones.length; ++ i ) { + + joints.push( nodeMap.get( skeleton.bones[ i ] ) ); + temporaryBoneInverse.copy( skeleton.boneInverses[ i ] ); + temporaryBoneInverse.multiply( object.bindMatrix ).toArray( inverseBindMatrices, i * 16 ); + + } + + if ( json.skins === undefined ) json.skins = []; + + json.skins.push( { + inverseBindMatrices: this.processAccessor( new BufferAttribute( inverseBindMatrices, 16 ) ), + joints: joints, + skeleton: nodeMap.get( rootJoint ) + } ); + + const skinIndex = node.skin = json.skins.length - 1; + + return skinIndex; + + } + + /** + * Process Object3D node + * @param {THREE.Object3D} node Object3D to processNode + * @return {Integer} Index of the node in the nodes list + */ + processNode( object ) { + + const json = this.json; + const options = this.options; + const nodeMap = this.nodeMap; + + if ( ! json.nodes ) json.nodes = []; + + const nodeDef = {}; + + if ( options.trs ) { + + const rotation = object.quaternion.toArray(); + const position = object.position.toArray(); + const scale = object.scale.toArray(); + + if ( ! equalArray( rotation, [ 0, 0, 0, 1 ] ) ) { + + nodeDef.rotation = rotation; + + } + + if ( ! equalArray( position, [ 0, 0, 0 ] ) ) { + + nodeDef.translation = position; + + } + + if ( ! equalArray( scale, [ 1, 1, 1 ] ) ) { + + nodeDef.scale = scale; + + } + + } else { + + if ( object.matrixAutoUpdate ) { + + object.updateMatrix(); + + } + + if ( isIdentityMatrix( object.matrix ) === false ) { + + nodeDef.matrix = object.matrix.elements; + + } + + } + + // We don't export empty strings name because it represents no-name in Three.js. + if ( object.name !== '' ) nodeDef.name = String( object.name ); + + this.serializeUserData( object, nodeDef ); + + if ( object.isMesh || object.isLine || object.isPoints ) { + + const meshIndex = this.processMesh( object ); + + if ( meshIndex !== null ) nodeDef.mesh = meshIndex; + + } else if ( object.isCamera ) { + + nodeDef.camera = this.processCamera( object ); + + } + + if ( object.isSkinnedMesh ) this.skins.push( object ); + + if ( object.children.length > 0 ) { + + const children = []; + + for ( let i = 0, l = object.children.length; i < l; i ++ ) { + + const child = object.children[ i ]; + + if ( child.visible || options.onlyVisible === false ) { + + const nodeIndex = this.processNode( child ); + + if ( nodeIndex !== null ) children.push( nodeIndex ); + + } + + } + + if ( children.length > 0 ) nodeDef.children = children; + + } + + this._invokeAll( function ( ext ) { + + ext.writeNode && ext.writeNode( object, nodeDef ); + + } ); + + const nodeIndex = json.nodes.push( nodeDef ) - 1; + nodeMap.set( object, nodeIndex ); + return nodeIndex; + + } + + /** + * Process Scene + * @param {Scene} node Scene to process + */ + processScene( scene ) { + + const json = this.json; + const options = this.options; + + if ( ! json.scenes ) { + + json.scenes = []; + json.scene = 0; + + } + + const sceneDef = {}; + + if ( scene.name !== '' ) sceneDef.name = scene.name; + + json.scenes.push( sceneDef ); + + const nodes = []; + + for ( let i = 0, l = scene.children.length; i < l; i ++ ) { + + const child = scene.children[ i ]; + + if ( child.visible || options.onlyVisible === false ) { + + const nodeIndex = this.processNode( child ); + + if ( nodeIndex !== null ) nodes.push( nodeIndex ); + + } + + } + + if ( nodes.length > 0 ) sceneDef.nodes = nodes; + + this.serializeUserData( scene, sceneDef ); + + } + + /** + * Creates a Scene to hold a list of objects and parse it + * @param {Array} objects List of objects to process + */ + processObjects( objects ) { + + const scene = new Scene(); + scene.name = 'AuxScene'; + + for ( let i = 0; i < objects.length; i ++ ) { + + // We push directly to children instead of calling `add` to prevent + // modify the .parent and break its original scene and hierarchy + scene.children.push( objects[ i ] ); + + } + + this.processScene( scene ); + + } + + /** + * @param {THREE.Object3D|Array} input + */ + processInput( input ) { + + const options = this.options; + + input = input instanceof Array ? input : [ input ]; + + this._invokeAll( function ( ext ) { + + ext.beforeParse && ext.beforeParse( input ); + + } ); + + const objectsWithoutScene = []; + + for ( let i = 0; i < input.length; i ++ ) { + + if ( input[ i ] instanceof Scene ) { + + this.processScene( input[ i ] ); + + } else { + + objectsWithoutScene.push( input[ i ] ); + + } + + } + + if ( objectsWithoutScene.length > 0 ) this.processObjects( objectsWithoutScene ); + + for ( let i = 0; i < this.skins.length; ++ i ) { + + this.processSkin( this.skins[ i ] ); + + } + + for ( let i = 0; i < options.animations.length; ++ i ) { + + this.processAnimation( options.animations[ i ], input[ 0 ] ); + + } + + this._invokeAll( function ( ext ) { + + ext.afterParse && ext.afterParse( input ); + + } ); + + } + + _invokeAll( func ) { + + for ( let i = 0, il = this.plugins.length; i < il; i ++ ) { + + func( this.plugins[ i ] ); + + } + + } + +} + +/** + * Punctual Lights Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual + */ +class GLTFLightExtension { + + constructor( writer ) { + + this.writer = writer; + this.name = 'KHR_lights_punctual'; + + } + + writeNode( light, nodeDef ) { + + if ( ! light.isLight ) return; + + if ( ! light.isDirectionalLight && ! light.isPointLight && ! light.isSpotLight ) { + + console.warn( 'THREE.GLTFExporter: Only directional, point, and spot lights are supported.', light ); + return; + + } + + const writer = this.writer; + const json = writer.json; + const extensionsUsed = writer.extensionsUsed; + + const lightDef = {}; + + if ( light.name ) lightDef.name = light.name; + + lightDef.color = light.color.toArray(); + + lightDef.intensity = light.intensity; + + if ( light.isDirectionalLight ) { + + lightDef.type = 'directional'; + + } else if ( light.isPointLight ) { + + lightDef.type = 'point'; + + if ( light.distance > 0 ) lightDef.range = light.distance; + + } else if ( light.isSpotLight ) { + + lightDef.type = 'spot'; + + if ( light.distance > 0 ) lightDef.range = light.distance; + + lightDef.spot = {}; + lightDef.spot.innerConeAngle = ( 1.0 - light.penumbra ) * light.angle; + lightDef.spot.outerConeAngle = light.angle; + + } + + if ( light.decay !== undefined && light.decay !== 2 ) { + + console.warn( 'THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, ' + + 'and expects light.decay=2.' ); + + } + + if ( light.target + && ( light.target.parent !== light + || light.target.position.x !== 0 + || light.target.position.y !== 0 + || light.target.position.z !== - 1 ) ) { + + console.warn( 'THREE.GLTFExporter: Light direction may be lost. For best results, ' + + 'make light.target a child of the light with position 0,0,-1.' ); + + } + + if ( ! extensionsUsed[ this.name ] ) { + + json.extensions = json.extensions || {}; + json.extensions[ this.name ] = { lights: [] }; + extensionsUsed[ this.name ] = true; + + } + + const lights = json.extensions[ this.name ].lights; + lights.push( lightDef ); + + nodeDef.extensions = nodeDef.extensions || {}; + nodeDef.extensions[ this.name ] = { light: lights.length - 1 }; + + } + +} + +/** + * Unlit Materials Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit + */ +class GLTFMaterialsUnlitExtension { + + constructor( writer ) { + + this.writer = writer; + this.name = 'KHR_materials_unlit'; + + } + + writeMaterial( material, materialDef ) { + + if ( ! material.isMeshBasicMaterial ) return; + + const writer = this.writer; + const extensionsUsed = writer.extensionsUsed; + + materialDef.extensions = materialDef.extensions || {}; + materialDef.extensions[ this.name ] = {}; + + extensionsUsed[ this.name ] = true; + + materialDef.pbrMetallicRoughness.metallicFactor = 0.0; + materialDef.pbrMetallicRoughness.roughnessFactor = 0.9; + + } + +} + +/** + * Clearcoat Materials Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_clearcoat + */ +class GLTFMaterialsClearcoatExtension { + + constructor( writer ) { + + this.writer = writer; + this.name = 'KHR_materials_clearcoat'; + + } + + writeMaterial( material, materialDef ) { + + if ( ! material.isMeshPhysicalMaterial || material.clearcoat === 0 ) return; + + const writer = this.writer; + const extensionsUsed = writer.extensionsUsed; + + const extensionDef = {}; + + extensionDef.clearcoatFactor = material.clearcoat; + + if ( material.clearcoatMap ) { + + const clearcoatMapDef = { + index: writer.processTexture( material.clearcoatMap ), + texCoord: material.clearcoatMap.channel + }; + writer.applyTextureTransform( clearcoatMapDef, material.clearcoatMap ); + extensionDef.clearcoatTexture = clearcoatMapDef; + + } + + extensionDef.clearcoatRoughnessFactor = material.clearcoatRoughness; + + if ( material.clearcoatRoughnessMap ) { + + const clearcoatRoughnessMapDef = { + index: writer.processTexture( material.clearcoatRoughnessMap ), + texCoord: material.clearcoatRoughnessMap.channel + }; + writer.applyTextureTransform( clearcoatRoughnessMapDef, material.clearcoatRoughnessMap ); + extensionDef.clearcoatRoughnessTexture = clearcoatRoughnessMapDef; + + } + + if ( material.clearcoatNormalMap ) { + + const clearcoatNormalMapDef = { + index: writer.processTexture( material.clearcoatNormalMap ), + texCoord: material.clearcoatNormalMap.channel + }; + + if ( material.clearcoatNormalScale.x !== 1 ) clearcoatNormalMapDef.scale = material.clearcoatNormalScale.x; + + writer.applyTextureTransform( clearcoatNormalMapDef, material.clearcoatNormalMap ); + extensionDef.clearcoatNormalTexture = clearcoatNormalMapDef; + + } + + materialDef.extensions = materialDef.extensions || {}; + materialDef.extensions[ this.name ] = extensionDef; + + extensionsUsed[ this.name ] = true; + + + } + +} + +/** + * Materials dispersion Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_dispersion + */ +class GLTFMaterialsDispersionExtension { + + constructor( writer ) { + + this.writer = writer; + this.name = 'KHR_materials_dispersion'; + + } + + writeMaterial( material, materialDef ) { + + if ( ! material.isMeshPhysicalMaterial || material.dispersion === 0 ) return; + + const writer = this.writer; + const extensionsUsed = writer.extensionsUsed; + + const extensionDef = {}; + + extensionDef.dispersion = material.dispersion; + + materialDef.extensions = materialDef.extensions || {}; + materialDef.extensions[ this.name ] = extensionDef; + + extensionsUsed[ this.name ] = true; + + } + +} + +/** + * Iridescence Materials Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_iridescence + */ +class GLTFMaterialsIridescenceExtension { + + constructor( writer ) { + + this.writer = writer; + this.name = 'KHR_materials_iridescence'; + + } + + writeMaterial( material, materialDef ) { + + if ( ! material.isMeshPhysicalMaterial || material.iridescence === 0 ) return; + + const writer = this.writer; + const extensionsUsed = writer.extensionsUsed; + + const extensionDef = {}; + + extensionDef.iridescenceFactor = material.iridescence; + + if ( material.iridescenceMap ) { + + const iridescenceMapDef = { + index: writer.processTexture( material.iridescenceMap ), + texCoord: material.iridescenceMap.channel + }; + writer.applyTextureTransform( iridescenceMapDef, material.iridescenceMap ); + extensionDef.iridescenceTexture = iridescenceMapDef; + + } + + extensionDef.iridescenceIor = material.iridescenceIOR; + extensionDef.iridescenceThicknessMinimum = material.iridescenceThicknessRange[ 0 ]; + extensionDef.iridescenceThicknessMaximum = material.iridescenceThicknessRange[ 1 ]; + + if ( material.iridescenceThicknessMap ) { + + const iridescenceThicknessMapDef = { + index: writer.processTexture( material.iridescenceThicknessMap ), + texCoord: material.iridescenceThicknessMap.channel + }; + writer.applyTextureTransform( iridescenceThicknessMapDef, material.iridescenceThicknessMap ); + extensionDef.iridescenceThicknessTexture = iridescenceThicknessMapDef; + + } + + materialDef.extensions = materialDef.extensions || {}; + materialDef.extensions[ this.name ] = extensionDef; + + extensionsUsed[ this.name ] = true; + + } + +} + +/** + * Transmission Materials Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_transmission + */ +class GLTFMaterialsTransmissionExtension { + + constructor( writer ) { + + this.writer = writer; + this.name = 'KHR_materials_transmission'; + + } + + writeMaterial( material, materialDef ) { + + if ( ! material.isMeshPhysicalMaterial || material.transmission === 0 ) return; + + const writer = this.writer; + const extensionsUsed = writer.extensionsUsed; + + const extensionDef = {}; + + extensionDef.transmissionFactor = material.transmission; + + if ( material.transmissionMap ) { + + const transmissionMapDef = { + index: writer.processTexture( material.transmissionMap ), + texCoord: material.transmissionMap.channel + }; + writer.applyTextureTransform( transmissionMapDef, material.transmissionMap ); + extensionDef.transmissionTexture = transmissionMapDef; + + } + + materialDef.extensions = materialDef.extensions || {}; + materialDef.extensions[ this.name ] = extensionDef; + + extensionsUsed[ this.name ] = true; + + } + +} + +/** + * Materials Volume Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_volume + */ +class GLTFMaterialsVolumeExtension { + + constructor( writer ) { + + this.writer = writer; + this.name = 'KHR_materials_volume'; + + } + + writeMaterial( material, materialDef ) { + + if ( ! material.isMeshPhysicalMaterial || material.transmission === 0 ) return; + + const writer = this.writer; + const extensionsUsed = writer.extensionsUsed; + + const extensionDef = {}; + + extensionDef.thicknessFactor = material.thickness; + + if ( material.thicknessMap ) { + + const thicknessMapDef = { + index: writer.processTexture( material.thicknessMap ), + texCoord: material.thicknessMap.channel + }; + writer.applyTextureTransform( thicknessMapDef, material.thicknessMap ); + extensionDef.thicknessTexture = thicknessMapDef; + + } + + extensionDef.attenuationDistance = material.attenuationDistance; + extensionDef.attenuationColor = material.attenuationColor.toArray(); + + materialDef.extensions = materialDef.extensions || {}; + materialDef.extensions[ this.name ] = extensionDef; + + extensionsUsed[ this.name ] = true; + + } + +} + +/** + * Materials ior Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_ior + */ +class GLTFMaterialsIorExtension { + + constructor( writer ) { + + this.writer = writer; + this.name = 'KHR_materials_ior'; + + } + + writeMaterial( material, materialDef ) { + + if ( ! material.isMeshPhysicalMaterial || material.ior === 1.5 ) return; + + const writer = this.writer; + const extensionsUsed = writer.extensionsUsed; + + const extensionDef = {}; + + extensionDef.ior = material.ior; + + materialDef.extensions = materialDef.extensions || {}; + materialDef.extensions[ this.name ] = extensionDef; + + extensionsUsed[ this.name ] = true; + + } + +} + +/** + * Materials specular Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_specular + */ +class GLTFMaterialsSpecularExtension { + + constructor( writer ) { + + this.writer = writer; + this.name = 'KHR_materials_specular'; + + } + + writeMaterial( material, materialDef ) { + + if ( ! material.isMeshPhysicalMaterial || ( material.specularIntensity === 1.0 && + material.specularColor.equals( DEFAULT_SPECULAR_COLOR ) && + ! material.specularIntensityMap && ! material.specularColorMap ) ) return; + + const writer = this.writer; + const extensionsUsed = writer.extensionsUsed; + + const extensionDef = {}; + + if ( material.specularIntensityMap ) { + + const specularIntensityMapDef = { + index: writer.processTexture( material.specularIntensityMap ), + texCoord: material.specularIntensityMap.channel + }; + writer.applyTextureTransform( specularIntensityMapDef, material.specularIntensityMap ); + extensionDef.specularTexture = specularIntensityMapDef; + + } + + if ( material.specularColorMap ) { + + const specularColorMapDef = { + index: writer.processTexture( material.specularColorMap ), + texCoord: material.specularColorMap.channel + }; + writer.applyTextureTransform( specularColorMapDef, material.specularColorMap ); + extensionDef.specularColorTexture = specularColorMapDef; + + } + + extensionDef.specularFactor = material.specularIntensity; + extensionDef.specularColorFactor = material.specularColor.toArray(); + + materialDef.extensions = materialDef.extensions || {}; + materialDef.extensions[ this.name ] = extensionDef; + + extensionsUsed[ this.name ] = true; + + } + +} + +/** + * Sheen Materials Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_sheen + */ +class GLTFMaterialsSheenExtension { + + constructor( writer ) { + + this.writer = writer; + this.name = 'KHR_materials_sheen'; + + } + + writeMaterial( material, materialDef ) { + + if ( ! material.isMeshPhysicalMaterial || material.sheen == 0.0 ) return; + + const writer = this.writer; + const extensionsUsed = writer.extensionsUsed; + + const extensionDef = {}; + + if ( material.sheenRoughnessMap ) { + + const sheenRoughnessMapDef = { + index: writer.processTexture( material.sheenRoughnessMap ), + texCoord: material.sheenRoughnessMap.channel + }; + writer.applyTextureTransform( sheenRoughnessMapDef, material.sheenRoughnessMap ); + extensionDef.sheenRoughnessTexture = sheenRoughnessMapDef; + + } + + if ( material.sheenColorMap ) { + + const sheenColorMapDef = { + index: writer.processTexture( material.sheenColorMap ), + texCoord: material.sheenColorMap.channel + }; + writer.applyTextureTransform( sheenColorMapDef, material.sheenColorMap ); + extensionDef.sheenColorTexture = sheenColorMapDef; + + } + + extensionDef.sheenRoughnessFactor = material.sheenRoughness; + extensionDef.sheenColorFactor = material.sheenColor.toArray(); + + materialDef.extensions = materialDef.extensions || {}; + materialDef.extensions[ this.name ] = extensionDef; + + extensionsUsed[ this.name ] = true; + + } + +} + +/** + * Anisotropy Materials Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_anisotropy + */ +class GLTFMaterialsAnisotropyExtension { + + constructor( writer ) { + + this.writer = writer; + this.name = 'KHR_materials_anisotropy'; + + } + + writeMaterial( material, materialDef ) { + + if ( ! material.isMeshPhysicalMaterial || material.anisotropy == 0.0 ) return; + + const writer = this.writer; + const extensionsUsed = writer.extensionsUsed; + + const extensionDef = {}; + + if ( material.anisotropyMap ) { + + const anisotropyMapDef = { index: writer.processTexture( material.anisotropyMap ) }; + writer.applyTextureTransform( anisotropyMapDef, material.anisotropyMap ); + extensionDef.anisotropyTexture = anisotropyMapDef; + + } + + extensionDef.anisotropyStrength = material.anisotropy; + extensionDef.anisotropyRotation = material.anisotropyRotation; + + materialDef.extensions = materialDef.extensions || {}; + materialDef.extensions[ this.name ] = extensionDef; + + extensionsUsed[ this.name ] = true; + + } + +} + +/** + * Materials Emissive Strength Extension + * + * Specification: https://github.com/KhronosGroup/glTF/blob/5768b3ce0ef32bc39cdf1bef10b948586635ead3/extensions/2.0/Khronos/KHR_materials_emissive_strength/README.md + */ +class GLTFMaterialsEmissiveStrengthExtension { + + constructor( writer ) { + + this.writer = writer; + this.name = 'KHR_materials_emissive_strength'; + + } + + writeMaterial( material, materialDef ) { + + if ( ! material.isMeshStandardMaterial || material.emissiveIntensity === 1.0 ) return; + + const writer = this.writer; + const extensionsUsed = writer.extensionsUsed; + + const extensionDef = {}; + + extensionDef.emissiveStrength = material.emissiveIntensity; + + materialDef.extensions = materialDef.extensions || {}; + materialDef.extensions[ this.name ] = extensionDef; + + extensionsUsed[ this.name ] = true; + + } + +} + + +/** + * Materials bump Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/EXT_materials_bump + */ +class GLTFMaterialsBumpExtension { + + constructor( writer ) { + + this.writer = writer; + this.name = 'EXT_materials_bump'; + + } + + writeMaterial( material, materialDef ) { + + if ( ! material.isMeshStandardMaterial || ( + material.bumpScale === 1 && + ! material.bumpMap ) ) return; + + const writer = this.writer; + const extensionsUsed = writer.extensionsUsed; + + const extensionDef = {}; + + if ( material.bumpMap ) { + + const bumpMapDef = { + index: writer.processTexture( material.bumpMap ), + texCoord: material.bumpMap.channel + }; + writer.applyTextureTransform( bumpMapDef, material.bumpMap ); + extensionDef.bumpTexture = bumpMapDef; + + } + + extensionDef.bumpFactor = material.bumpScale; + + materialDef.extensions = materialDef.extensions || {}; + materialDef.extensions[ this.name ] = extensionDef; + + extensionsUsed[ this.name ] = true; + + } + +} + +/** + * GPU Instancing Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_mesh_gpu_instancing + */ +class GLTFMeshGpuInstancing { + + constructor( writer ) { + + this.writer = writer; + this.name = 'EXT_mesh_gpu_instancing'; + + } + + writeNode( object, nodeDef ) { + + if ( ! object.isInstancedMesh ) return; + + const writer = this.writer; + + const mesh = object; + + const translationAttr = new Float32Array( mesh.count * 3 ); + const rotationAttr = new Float32Array( mesh.count * 4 ); + const scaleAttr = new Float32Array( mesh.count * 3 ); + + const matrix = new Matrix4(); + const position = new Vector3(); + const quaternion = new Quaternion(); + const scale = new Vector3(); + + for ( let i = 0; i < mesh.count; i ++ ) { + + mesh.getMatrixAt( i, matrix ); + matrix.decompose( position, quaternion, scale ); + + position.toArray( translationAttr, i * 3 ); + quaternion.toArray( rotationAttr, i * 4 ); + scale.toArray( scaleAttr, i * 3 ); + + } + + const attributes = { + TRANSLATION: writer.processAccessor( new BufferAttribute( translationAttr, 3 ) ), + ROTATION: writer.processAccessor( new BufferAttribute( rotationAttr, 4 ) ), + SCALE: writer.processAccessor( new BufferAttribute( scaleAttr, 3 ) ), + }; + + if ( mesh.instanceColor ) + attributes._COLOR_0 = writer.processAccessor( mesh.instanceColor ); + + nodeDef.extensions = nodeDef.extensions || {}; + nodeDef.extensions[ this.name ] = { attributes }; + + writer.extensionsUsed[ this.name ] = true; + writer.extensionsRequired[ this.name ] = true; + + } + +} + +/** + * Static utility functions + */ +GLTFExporter.Utils = { + + insertKeyframe: function ( track, time ) { + + const tolerance = 0.001; // 1ms + const valueSize = track.getValueSize(); + + const times = new track.TimeBufferType( track.times.length + 1 ); + const values = new track.ValueBufferType( track.values.length + valueSize ); + const interpolant = track.createInterpolant( new track.ValueBufferType( valueSize ) ); + + let index; + + if ( track.times.length === 0 ) { + + times[ 0 ] = time; + + for ( let i = 0; i < valueSize; i ++ ) { + + values[ i ] = 0; + + } + + index = 0; + + } else if ( time < track.times[ 0 ] ) { + + if ( Math.abs( track.times[ 0 ] - time ) < tolerance ) return 0; + + times[ 0 ] = time; + times.set( track.times, 1 ); + + values.set( interpolant.evaluate( time ), 0 ); + values.set( track.values, valueSize ); + + index = 0; + + } else if ( time > track.times[ track.times.length - 1 ] ) { + + if ( Math.abs( track.times[ track.times.length - 1 ] - time ) < tolerance ) { + + return track.times.length - 1; + + } + + times[ times.length - 1 ] = time; + times.set( track.times, 0 ); + + values.set( track.values, 0 ); + values.set( interpolant.evaluate( time ), track.values.length ); + + index = times.length - 1; + + } else { + + for ( let i = 0; i < track.times.length; i ++ ) { + + if ( Math.abs( track.times[ i ] - time ) < tolerance ) return i; + + if ( track.times[ i ] < time && track.times[ i + 1 ] > time ) { + + times.set( track.times.slice( 0, i + 1 ), 0 ); + times[ i + 1 ] = time; + times.set( track.times.slice( i + 1 ), i + 2 ); + + values.set( track.values.slice( 0, ( i + 1 ) * valueSize ), 0 ); + values.set( interpolant.evaluate( time ), ( i + 1 ) * valueSize ); + values.set( track.values.slice( ( i + 1 ) * valueSize ), ( i + 2 ) * valueSize ); + + index = i + 1; + + break; + + } + + } + + } + + track.times = times; + track.values = values; + + return index; + + }, + + mergeMorphTargetTracks: function ( clip, root ) { + + const tracks = []; + const mergedTracks = {}; + const sourceTracks = clip.tracks; + + for ( let i = 0; i < sourceTracks.length; ++ i ) { + + let sourceTrack = sourceTracks[ i ]; + const sourceTrackBinding = PropertyBinding.parseTrackName( sourceTrack.name ); + const sourceTrackNode = PropertyBinding.findNode( root, sourceTrackBinding.nodeName ); + + if ( sourceTrackBinding.propertyName !== 'morphTargetInfluences' || sourceTrackBinding.propertyIndex === undefined ) { + + // Tracks that don't affect morph targets, or that affect all morph targets together, can be left as-is. + tracks.push( sourceTrack ); + continue; + + } + + if ( sourceTrack.createInterpolant !== sourceTrack.InterpolantFactoryMethodDiscrete + && sourceTrack.createInterpolant !== sourceTrack.InterpolantFactoryMethodLinear ) { + + if ( sourceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) { + + // This should never happen, because glTF morph target animations + // affect all targets already. + throw new Error( 'THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.' ); + + } + + console.warn( 'THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead.' ); + + sourceTrack = sourceTrack.clone(); + sourceTrack.setInterpolation( InterpolateLinear ); + + } + + const targetCount = sourceTrackNode.morphTargetInfluences.length; + const targetIndex = sourceTrackNode.morphTargetDictionary[ sourceTrackBinding.propertyIndex ]; + + if ( targetIndex === undefined ) { + + throw new Error( 'THREE.GLTFExporter: Morph target name not found: ' + sourceTrackBinding.propertyIndex ); + + } + + let mergedTrack; + + // If this is the first time we've seen this object, create a new + // track to store merged keyframe data for each morph target. + if ( mergedTracks[ sourceTrackNode.uuid ] === undefined ) { + + mergedTrack = sourceTrack.clone(); + + const values = new mergedTrack.ValueBufferType( targetCount * mergedTrack.times.length ); + + for ( let j = 0; j < mergedTrack.times.length; j ++ ) { + + values[ j * targetCount + targetIndex ] = mergedTrack.values[ j ]; + + } + + // We need to take into consideration the intended target node + // of our original un-merged morphTarget animation. + mergedTrack.name = ( sourceTrackBinding.nodeName || '' ) + '.morphTargetInfluences'; + mergedTrack.values = values; + + mergedTracks[ sourceTrackNode.uuid ] = mergedTrack; + tracks.push( mergedTrack ); + + continue; + + } + + const sourceInterpolant = sourceTrack.createInterpolant( new sourceTrack.ValueBufferType( 1 ) ); + + mergedTrack = mergedTracks[ sourceTrackNode.uuid ]; + + // For every existing keyframe of the merged track, write a (possibly + // interpolated) value from the source track. + for ( let j = 0; j < mergedTrack.times.length; j ++ ) { + + mergedTrack.values[ j * targetCount + targetIndex ] = sourceInterpolant.evaluate( mergedTrack.times[ j ] ); + + } + + // For every existing keyframe of the source track, write a (possibly + // new) keyframe to the merged track. Values from the previous loop may + // be written again, but keyframes are de-duplicated. + for ( let j = 0; j < sourceTrack.times.length; j ++ ) { + + const keyframeIndex = this.insertKeyframe( mergedTrack, sourceTrack.times[ j ] ); + mergedTrack.values[ keyframeIndex * targetCount + targetIndex ] = sourceTrack.values[ j ]; + + } + + } + + clip.tracks = tracks; + + return clip; + + } + +}; + +export { GLTFExporter }; diff --git a/node_modules/three/examples/jsm/exporters/KTX2Exporter.js b/node_modules/three/examples/jsm/exporters/KTX2Exporter.js new file mode 100644 index 0000000..bfc24d8 --- /dev/null +++ b/node_modules/three/examples/jsm/exporters/KTX2Exporter.js @@ -0,0 +1,292 @@ +import { + FloatType, + HalfFloatType, + UnsignedByteType, + RGBAFormat, + RGFormat, + RGIntegerFormat, + RedFormat, + RedIntegerFormat, + NoColorSpace, + LinearSRGBColorSpace, + SRGBColorSpace, + DataTexture, + REVISION, +} from 'three'; + +import { + write, + KTX2Container, + KHR_DF_CHANNEL_RGBSDA_ALPHA, + KHR_DF_CHANNEL_RGBSDA_BLUE, + KHR_DF_CHANNEL_RGBSDA_GREEN, + KHR_DF_CHANNEL_RGBSDA_RED, + KHR_DF_MODEL_RGBSDA, + KHR_DF_PRIMARIES_BT709, + KHR_DF_PRIMARIES_UNSPECIFIED, + KHR_DF_SAMPLE_DATATYPE_FLOAT, + KHR_DF_SAMPLE_DATATYPE_LINEAR, + KHR_DF_SAMPLE_DATATYPE_SIGNED, + KHR_DF_TRANSFER_LINEAR, + KHR_DF_TRANSFER_SRGB, + VK_FORMAT_R16_SFLOAT, + VK_FORMAT_R16G16_SFLOAT, + VK_FORMAT_R16G16B16A16_SFLOAT, + VK_FORMAT_R32_SFLOAT, + VK_FORMAT_R32G32_SFLOAT, + VK_FORMAT_R32G32B32A32_SFLOAT, + VK_FORMAT_R8_SRGB, + VK_FORMAT_R8_UNORM, + VK_FORMAT_R8G8_SRGB, + VK_FORMAT_R8G8_UNORM, + VK_FORMAT_R8G8B8A8_SRGB, + VK_FORMAT_R8G8B8A8_UNORM, +} from '../libs/ktx-parse.module.js'; + +const VK_FORMAT_MAP = { + + [ RGBAFormat ]: { + [ FloatType ]: { + [ NoColorSpace ]: VK_FORMAT_R32G32B32A32_SFLOAT, + [ LinearSRGBColorSpace ]: VK_FORMAT_R32G32B32A32_SFLOAT, + }, + [ HalfFloatType ]: { + [ NoColorSpace ]: VK_FORMAT_R16G16B16A16_SFLOAT, + [ LinearSRGBColorSpace ]: VK_FORMAT_R16G16B16A16_SFLOAT, + }, + [ UnsignedByteType ]: { + [ NoColorSpace ]: VK_FORMAT_R8G8B8A8_UNORM, + [ LinearSRGBColorSpace ]: VK_FORMAT_R8G8B8A8_UNORM, + [ SRGBColorSpace ]: VK_FORMAT_R8G8B8A8_SRGB, + }, + }, + + [ RGFormat ]: { + [ FloatType ]: { + [ NoColorSpace ]: VK_FORMAT_R32G32_SFLOAT, + [ LinearSRGBColorSpace ]: VK_FORMAT_R32G32_SFLOAT, + }, + [ HalfFloatType ]: { + [ NoColorSpace ]: VK_FORMAT_R16G16_SFLOAT, + [ LinearSRGBColorSpace ]: VK_FORMAT_R16G16_SFLOAT, + }, + [ UnsignedByteType ]: { + [ NoColorSpace ]: VK_FORMAT_R8G8_UNORM, + [ LinearSRGBColorSpace ]: VK_FORMAT_R8G8_UNORM, + [ SRGBColorSpace ]: VK_FORMAT_R8G8_SRGB, + }, + }, + + [ RedFormat ]: { + [ FloatType ]: { + [ NoColorSpace ]: VK_FORMAT_R32_SFLOAT, + [ LinearSRGBColorSpace ]: VK_FORMAT_R32_SFLOAT, + }, + [ HalfFloatType ]: { + [ NoColorSpace ]: VK_FORMAT_R16_SFLOAT, + [ LinearSRGBColorSpace ]: VK_FORMAT_R16_SFLOAT, + }, + [ UnsignedByteType ]: { + [ NoColorSpace ]: VK_FORMAT_R8_UNORM, + [ LinearSRGBColorSpace ]: VK_FORMAT_R8_UNORM, + [ SRGBColorSpace ]: VK_FORMAT_R8_SRGB, + }, + }, + +}; + +const KHR_DF_CHANNEL_MAP = { + + 0: KHR_DF_CHANNEL_RGBSDA_RED, + 1: KHR_DF_CHANNEL_RGBSDA_GREEN, + 2: KHR_DF_CHANNEL_RGBSDA_BLUE, + 3: KHR_DF_CHANNEL_RGBSDA_ALPHA, + +}; + +const ERROR_INPUT = 'THREE.KTX2Exporter: Supported inputs are DataTexture, Data3DTexture, or WebGLRenderer and WebGLRenderTarget.'; +const ERROR_FORMAT = 'THREE.KTX2Exporter: Supported formats are RGBAFormat, RGFormat, or RedFormat.'; +const ERROR_TYPE = 'THREE.KTX2Exporter: Supported types are FloatType, HalfFloatType, or UnsignedByteType."'; +const ERROR_COLOR_SPACE = 'THREE.KTX2Exporter: Supported color spaces are SRGBColorSpace (UnsignedByteType only), LinearSRGBColorSpace, or NoColorSpace.'; + +export class KTX2Exporter { + + parse( arg1, arg2 ) { + + let texture; + + if ( arg1.isDataTexture || arg1.isData3DTexture ) { + + texture = arg1; + + } else if ( arg1.isWebGLRenderer && arg2.isWebGLRenderTarget ) { + + texture = toDataTexture( arg1, arg2 ); + + } else { + + throw new Error( ERROR_INPUT ); + + } + + if ( VK_FORMAT_MAP[ texture.format ] === undefined ) { + + throw new Error( ERROR_FORMAT ); + + } + + if ( VK_FORMAT_MAP[ texture.format ][ texture.type ] === undefined ) { + + throw new Error( ERROR_TYPE ); + + } + + if ( VK_FORMAT_MAP[ texture.format ][ texture.type ][ texture.colorSpace ] === undefined ) { + + throw new Error( ERROR_COLOR_SPACE ); + + } + + // + + const array = texture.image.data; + const channelCount = getChannelCount( texture ); + const container = new KTX2Container(); + + container.vkFormat = VK_FORMAT_MAP[ texture.format ][ texture.type ][ texture.colorSpace ]; + container.typeSize = array.BYTES_PER_ELEMENT; + container.pixelWidth = texture.image.width; + container.pixelHeight = texture.image.height; + + if ( texture.isData3DTexture ) { + + container.pixelDepth = texture.image.depth; + + } + + // + + const basicDesc = container.dataFormatDescriptor[ 0 ]; + + basicDesc.colorModel = KHR_DF_MODEL_RGBSDA; + basicDesc.colorPrimaries = texture.colorSpace === NoColorSpace + ? KHR_DF_PRIMARIES_UNSPECIFIED + : KHR_DF_PRIMARIES_BT709; + basicDesc.transferFunction = texture.colorSpace === SRGBColorSpace + ? KHR_DF_TRANSFER_SRGB + : KHR_DF_TRANSFER_LINEAR; + + basicDesc.texelBlockDimension = [ 0, 0, 0, 0 ]; + + basicDesc.bytesPlane = [ + + container.typeSize * channelCount, 0, 0, 0, 0, 0, 0, 0, + + ]; + + for ( let i = 0; i < channelCount; ++ i ) { + + let channelType = KHR_DF_CHANNEL_MAP[ i ]; + + if ( texture.colorSpace === LinearSRGBColorSpace || texture.colorSpace === NoColorSpace ) { + + channelType |= KHR_DF_SAMPLE_DATATYPE_LINEAR; + + } + + if ( texture.type === FloatType || texture.type === HalfFloatType ) { + + channelType |= KHR_DF_SAMPLE_DATATYPE_FLOAT; + channelType |= KHR_DF_SAMPLE_DATATYPE_SIGNED; + + } + + basicDesc.samples.push( { + + channelType: channelType, + bitOffset: i * array.BYTES_PER_ELEMENT, + bitLength: array.BYTES_PER_ELEMENT * 8 - 1, + samplePosition: [ 0, 0, 0, 0 ], + sampleLower: texture.type === UnsignedByteType ? 0 : - 1, + sampleUpper: texture.type === UnsignedByteType ? 255 : 1, + + } ); + + } + + // + + container.levels = [ { + + levelData: new Uint8Array( array.buffer, array.byteOffset, array.byteLength ), + uncompressedByteLength: array.byteLength, + + } ]; + + // + + container.keyValue[ 'KTXwriter' ] = `three.js ${ REVISION }`; + + // + + return write( container, { keepWriter: true } ); + + } + +} + +function toDataTexture( renderer, rtt ) { + + const channelCount = getChannelCount( rtt.texture ); + + let view; + + if ( rtt.texture.type === FloatType ) { + + view = new Float32Array( rtt.width * rtt.height * channelCount ); + + } else if ( rtt.texture.type === HalfFloatType ) { + + view = new Uint16Array( rtt.width * rtt.height * channelCount ); + + } else if ( rtt.texture.type === UnsignedByteType ) { + + view = new Uint8Array( rtt.width * rtt.height * channelCount ); + + } else { + + throw new Error( ERROR_TYPE ); + + } + + renderer.readRenderTargetPixels( rtt, 0, 0, rtt.width, rtt.height, view ); + + return new DataTexture( view, rtt.width, rtt.height, rtt.texture.format, rtt.texture.type ); + +} + +function getChannelCount( texture ) { + + switch ( texture.format ) { + + case RGBAFormat: + + return 4; + + case RGFormat: + case RGIntegerFormat: + + return 2; + + case RedFormat: + case RedIntegerFormat: + + return 1; + + default: + + throw new Error( ERROR_FORMAT ); + + } + +} diff --git a/node_modules/three/examples/jsm/exporters/MMDExporter.js b/node_modules/three/examples/jsm/exporters/MMDExporter.js new file mode 100644 index 0000000..bcef712 --- /dev/null +++ b/node_modules/three/examples/jsm/exporters/MMDExporter.js @@ -0,0 +1,217 @@ +import { + Matrix4, + Quaternion, + Vector3 +} from 'three'; +import { MMDParser } from '../libs/mmdparser.module.js'; + +/** + * Dependencies + * - mmd-parser https://github.com/takahirox/mmd-parser + */ + +class MMDExporter { + + /* TODO: implement + // mesh -> pmd + this.parsePmd = function ( object ) { + + }; + */ + + /* TODO: implement + // mesh -> pmx + this.parsePmx = function ( object ) { + + }; + */ + + /* TODO: implement + // animation + skeleton -> vmd + this.parseVmd = function ( object ) { + + }; + */ + + /* + * skeleton -> vpd + * Returns Shift_JIS encoded Uint8Array. Otherwise return strings. + */ + parseVpd( skin, outputShiftJis, useOriginalBones ) { + + if ( skin.isSkinnedMesh !== true ) { + + console.warn( 'THREE.MMDExporter: parseVpd() requires SkinnedMesh instance.' ); + return null; + + } + + function toStringsFromNumber( num ) { + + if ( Math.abs( num ) < 1e-6 ) num = 0; + + let a = num.toString(); + + if ( a.indexOf( '.' ) === - 1 ) { + + a += '.'; + + } + + a += '000000'; + + const index = a.indexOf( '.' ); + + const d = a.slice( 0, index ); + const p = a.slice( index + 1, index + 7 ); + + return d + '.' + p; + + } + + function toStringsFromArray( array ) { + + const a = []; + + for ( let i = 0, il = array.length; i < il; i ++ ) { + + a.push( toStringsFromNumber( array[ i ] ) ); + + } + + return a.join( ',' ); + + } + + skin.updateMatrixWorld( true ); + + const bones = skin.skeleton.bones; + const bones2 = getBindBones( skin ); + + const position = new Vector3(); + const quaternion = new Quaternion(); + const quaternion2 = new Quaternion(); + const matrix = new Matrix4(); + + const array = []; + array.push( 'Vocaloid Pose Data file' ); + array.push( '' ); + array.push( ( skin.name !== '' ? skin.name.replace( /\s/g, '_' ) : 'skin' ) + '.osm;' ); + array.push( bones.length + ';' ); + array.push( '' ); + + for ( let i = 0, il = bones.length; i < il; i ++ ) { + + const bone = bones[ i ]; + const bone2 = bones2[ i ]; + + /* + * use the bone matrix saved before solving IK. + * see CCDIKSolver for the detail. + */ + if ( useOriginalBones === true && + bone.userData.ik !== undefined && + bone.userData.ik.originalMatrix !== undefined ) { + + matrix.fromArray( bone.userData.ik.originalMatrix ); + + } else { + + matrix.copy( bone.matrix ); + + } + + position.setFromMatrixPosition( matrix ); + quaternion.setFromRotationMatrix( matrix ); + + const pArray = position.sub( bone2.position ).toArray(); + const qArray = quaternion2.copy( bone2.quaternion ).conjugate().multiply( quaternion ).toArray(); + + // right to left + pArray[ 2 ] = - pArray[ 2 ]; + qArray[ 0 ] = - qArray[ 0 ]; + qArray[ 1 ] = - qArray[ 1 ]; + + array.push( 'Bone' + i + '{' + bone.name ); + array.push( ' ' + toStringsFromArray( pArray ) + ';' ); + array.push( ' ' + toStringsFromArray( qArray ) + ';' ); + array.push( '}' ); + array.push( '' ); + + } + + array.push( '' ); + + const lines = array.join( '\n' ); + + return ( outputShiftJis === true ) ? unicodeToShiftjis( lines ) : lines; + + } + +} + +// Unicode to Shift_JIS table +let u2sTable; + +function unicodeToShiftjis( str ) { + + if ( u2sTable === undefined ) { + + const encoder = new MMDParser.CharsetEncoder(); + const table = encoder.s2uTable; + u2sTable = {}; + + const keys = Object.keys( table ); + + for ( let i = 0, il = keys.length; i < il; i ++ ) { + + let key = keys[ i ]; + + const value = table[ key ]; + key = parseInt( key ); + + u2sTable[ value ] = key; + + } + + } + + const array = []; + + for ( let i = 0, il = str.length; i < il; i ++ ) { + + const code = str.charCodeAt( i ); + + const value = u2sTable[ code ]; + + if ( value === undefined ) { + + throw new Error( 'cannot convert charcode 0x' + code.toString( 16 ) ); + + } else if ( value > 0xff ) { + + array.push( ( value >> 8 ) & 0xff ); + array.push( value & 0xff ); + + } else { + + array.push( value & 0xff ); + + } + + } + + return new Uint8Array( array ); + +} + +function getBindBones( skin ) { + + // any more efficient ways? + const poseSkin = skin.clone(); + poseSkin.pose(); + return poseSkin.skeleton.bones; + +} + +export { MMDExporter }; diff --git a/node_modules/three/examples/jsm/exporters/OBJExporter.js b/node_modules/three/examples/jsm/exporters/OBJExporter.js new file mode 100644 index 0000000..63a483e --- /dev/null +++ b/node_modules/three/examples/jsm/exporters/OBJExporter.js @@ -0,0 +1,284 @@ +import { + Color, + Matrix3, + Vector2, + Vector3 +} from 'three'; + +class OBJExporter { + + parse( object ) { + + let output = ''; + + let indexVertex = 0; + let indexVertexUvs = 0; + let indexNormals = 0; + + const vertex = new Vector3(); + const color = new Color(); + const normal = new Vector3(); + const uv = new Vector2(); + + const face = []; + + function parseMesh( mesh ) { + + let nbVertex = 0; + let nbNormals = 0; + let nbVertexUvs = 0; + + const geometry = mesh.geometry; + + const normalMatrixWorld = new Matrix3(); + + // shortcuts + const vertices = geometry.getAttribute( 'position' ); + const normals = geometry.getAttribute( 'normal' ); + const uvs = geometry.getAttribute( 'uv' ); + const indices = geometry.getIndex(); + + // name of the mesh object + output += 'o ' + mesh.name + '\n'; + + // name of the mesh material + if ( mesh.material && mesh.material.name ) { + + output += 'usemtl ' + mesh.material.name + '\n'; + + } + + // vertices + + if ( vertices !== undefined ) { + + for ( let i = 0, l = vertices.count; i < l; i ++, nbVertex ++ ) { + + vertex.fromBufferAttribute( vertices, i ); + + // transform the vertex to world space + vertex.applyMatrix4( mesh.matrixWorld ); + + // transform the vertex to export format + output += 'v ' + vertex.x + ' ' + vertex.y + ' ' + vertex.z + '\n'; + + } + + } + + // uvs + + if ( uvs !== undefined ) { + + for ( let i = 0, l = uvs.count; i < l; i ++, nbVertexUvs ++ ) { + + uv.fromBufferAttribute( uvs, i ); + + // transform the uv to export format + output += 'vt ' + uv.x + ' ' + uv.y + '\n'; + + } + + } + + // normals + + if ( normals !== undefined ) { + + normalMatrixWorld.getNormalMatrix( mesh.matrixWorld ); + + for ( let i = 0, l = normals.count; i < l; i ++, nbNormals ++ ) { + + normal.fromBufferAttribute( normals, i ); + + // transform the normal to world space + normal.applyMatrix3( normalMatrixWorld ).normalize(); + + // transform the normal to export format + output += 'vn ' + normal.x + ' ' + normal.y + ' ' + normal.z + '\n'; + + } + + } + + // faces + + if ( indices !== null ) { + + for ( let i = 0, l = indices.count; i < l; i += 3 ) { + + for ( let m = 0; m < 3; m ++ ) { + + const j = indices.getX( i + m ) + 1; + + face[ m ] = ( indexVertex + j ) + ( normals || uvs ? '/' + ( uvs ? ( indexVertexUvs + j ) : '' ) + ( normals ? '/' + ( indexNormals + j ) : '' ) : '' ); + + } + + // transform the face to export format + output += 'f ' + face.join( ' ' ) + '\n'; + + } + + } else { + + for ( let i = 0, l = vertices.count; i < l; i += 3 ) { + + for ( let m = 0; m < 3; m ++ ) { + + const j = i + m + 1; + + face[ m ] = ( indexVertex + j ) + ( normals || uvs ? '/' + ( uvs ? ( indexVertexUvs + j ) : '' ) + ( normals ? '/' + ( indexNormals + j ) : '' ) : '' ); + + } + + // transform the face to export format + output += 'f ' + face.join( ' ' ) + '\n'; + + } + + } + + // update index + indexVertex += nbVertex; + indexVertexUvs += nbVertexUvs; + indexNormals += nbNormals; + + } + + function parseLine( line ) { + + let nbVertex = 0; + + const geometry = line.geometry; + const type = line.type; + + // shortcuts + const vertices = geometry.getAttribute( 'position' ); + + // name of the line object + output += 'o ' + line.name + '\n'; + + if ( vertices !== undefined ) { + + for ( let i = 0, l = vertices.count; i < l; i ++, nbVertex ++ ) { + + vertex.fromBufferAttribute( vertices, i ); + + // transform the vertex to world space + vertex.applyMatrix4( line.matrixWorld ); + + // transform the vertex to export format + output += 'v ' + vertex.x + ' ' + vertex.y + ' ' + vertex.z + '\n'; + + } + + } + + if ( type === 'Line' ) { + + output += 'l '; + + for ( let j = 1, l = vertices.count; j <= l; j ++ ) { + + output += ( indexVertex + j ) + ' '; + + } + + output += '\n'; + + } + + if ( type === 'LineSegments' ) { + + for ( let j = 1, k = j + 1, l = vertices.count; j < l; j += 2, k = j + 1 ) { + + output += 'l ' + ( indexVertex + j ) + ' ' + ( indexVertex + k ) + '\n'; + + } + + } + + // update index + indexVertex += nbVertex; + + } + + function parsePoints( points ) { + + let nbVertex = 0; + + const geometry = points.geometry; + + const vertices = geometry.getAttribute( 'position' ); + const colors = geometry.getAttribute( 'color' ); + + output += 'o ' + points.name + '\n'; + + if ( vertices !== undefined ) { + + for ( let i = 0, l = vertices.count; i < l; i ++, nbVertex ++ ) { + + vertex.fromBufferAttribute( vertices, i ); + vertex.applyMatrix4( points.matrixWorld ); + + output += 'v ' + vertex.x + ' ' + vertex.y + ' ' + vertex.z; + + if ( colors !== undefined ) { + + color.fromBufferAttribute( colors, i ).convertLinearToSRGB(); + + output += ' ' + color.r + ' ' + color.g + ' ' + color.b; + + } + + output += '\n'; + + } + + output += 'p '; + + for ( let j = 1, l = vertices.count; j <= l; j ++ ) { + + output += ( indexVertex + j ) + ' '; + + } + + output += '\n'; + + } + + // update index + indexVertex += nbVertex; + + } + + object.traverse( function ( child ) { + + if ( child.isMesh === true ) { + + parseMesh( child ); + + } + + if ( child.isLine === true ) { + + parseLine( child ); + + } + + if ( child.isPoints === true ) { + + parsePoints( child ); + + } + + } ); + + return output; + + } + +} + +export { OBJExporter }; diff --git a/node_modules/three/examples/jsm/exporters/PLYExporter.js b/node_modules/three/examples/jsm/exporters/PLYExporter.js new file mode 100644 index 0000000..2e46a8c --- /dev/null +++ b/node_modules/three/examples/jsm/exporters/PLYExporter.js @@ -0,0 +1,528 @@ +import { + Matrix3, + Vector3, + Color +} from 'three'; + +/** + * https://github.com/gkjohnson/ply-exporter-js + * + * Usage: + * const exporter = new PLYExporter(); + * + * // second argument is a list of options + * exporter.parse(mesh, data => console.log(data), { binary: true, excludeAttributes: [ 'color' ], littleEndian: true }); + * + * Format Definition: + * http://paulbourke.net/dataformats/ply/ + */ + +class PLYExporter { + + parse( object, onDone, options = {} ) { + + // Iterate over the valid meshes in the object + function traverseMeshes( cb ) { + + object.traverse( function ( child ) { + + if ( child.isMesh === true || child.isPoints ) { + + const mesh = child; + const geometry = mesh.geometry; + + if ( geometry.hasAttribute( 'position' ) === true ) { + + cb( mesh, geometry ); + + } + + } + + } ); + + } + + // Default options + const defaultOptions = { + binary: false, + excludeAttributes: [], // normal, uv, color, index + littleEndian: false + }; + + options = Object.assign( defaultOptions, options ); + + const excludeAttributes = options.excludeAttributes; + let includeIndices = true; + let includeNormals = false; + let includeColors = false; + let includeUVs = false; + + // count the vertices, check which properties are used, + // and cache the BufferGeometry + let vertexCount = 0; + let faceCount = 0; + + object.traverse( function ( child ) { + + if ( child.isMesh === true ) { + + const mesh = child; + const geometry = mesh.geometry; + + const vertices = geometry.getAttribute( 'position' ); + const normals = geometry.getAttribute( 'normal' ); + const uvs = geometry.getAttribute( 'uv' ); + const colors = geometry.getAttribute( 'color' ); + const indices = geometry.getIndex(); + + if ( vertices === undefined ) { + + return; + + } + + vertexCount += vertices.count; + faceCount += indices ? indices.count / 3 : vertices.count / 3; + + if ( normals !== undefined ) includeNormals = true; + + if ( uvs !== undefined ) includeUVs = true; + + if ( colors !== undefined ) includeColors = true; + + } else if ( child.isPoints ) { + + const mesh = child; + const geometry = mesh.geometry; + + const vertices = geometry.getAttribute( 'position' ); + const normals = geometry.getAttribute( 'normal' ); + const colors = geometry.getAttribute( 'color' ); + + vertexCount += vertices.count; + + if ( normals !== undefined ) includeNormals = true; + + if ( colors !== undefined ) includeColors = true; + + includeIndices = false; + + } + + } ); + + const tempColor = new Color(); + includeIndices = includeIndices && excludeAttributes.indexOf( 'index' ) === - 1; + includeNormals = includeNormals && excludeAttributes.indexOf( 'normal' ) === - 1; + includeColors = includeColors && excludeAttributes.indexOf( 'color' ) === - 1; + includeUVs = includeUVs && excludeAttributes.indexOf( 'uv' ) === - 1; + + + if ( includeIndices && faceCount !== Math.floor( faceCount ) ) { + + // point cloud meshes will not have an index array and may not have a + // number of vertices that is divisble by 3 (and therefore representable + // as triangles) + console.error( + + 'PLYExporter: Failed to generate a valid PLY file with triangle indices because the ' + + 'number of indices is not divisible by 3.' + + ); + + return null; + + } + + const indexByteCount = 4; + + let header = + 'ply\n' + + `format ${ options.binary ? ( options.littleEndian ? 'binary_little_endian' : 'binary_big_endian' ) : 'ascii' } 1.0\n` + + `element vertex ${vertexCount}\n` + + + // position + 'property float x\n' + + 'property float y\n' + + 'property float z\n'; + + if ( includeNormals === true ) { + + // normal + header += + 'property float nx\n' + + 'property float ny\n' + + 'property float nz\n'; + + } + + if ( includeUVs === true ) { + + // uvs + header += + 'property float s\n' + + 'property float t\n'; + + } + + if ( includeColors === true ) { + + // colors + header += + 'property uchar red\n' + + 'property uchar green\n' + + 'property uchar blue\n'; + + } + + if ( includeIndices === true ) { + + // faces + header += + `element face ${faceCount}\n` + + 'property list uchar int vertex_index\n'; + + } + + header += 'end_header\n'; + + + // Generate attribute data + const vertex = new Vector3(); + const normalMatrixWorld = new Matrix3(); + let result = null; + + if ( options.binary === true ) { + + // Binary File Generation + const headerBin = new TextEncoder().encode( header ); + + // 3 position values at 4 bytes + // 3 normal values at 4 bytes + // 3 color channels with 1 byte + // 2 uv values at 4 bytes + const vertexListLength = vertexCount * ( 4 * 3 + ( includeNormals ? 4 * 3 : 0 ) + ( includeColors ? 3 : 0 ) + ( includeUVs ? 4 * 2 : 0 ) ); + + // 1 byte shape desciptor + // 3 vertex indices at ${indexByteCount} bytes + const faceListLength = includeIndices ? faceCount * ( indexByteCount * 3 + 1 ) : 0; + const output = new DataView( new ArrayBuffer( headerBin.length + vertexListLength + faceListLength ) ); + new Uint8Array( output.buffer ).set( headerBin, 0 ); + + + let vOffset = headerBin.length; + let fOffset = headerBin.length + vertexListLength; + let writtenVertices = 0; + traverseMeshes( function ( mesh, geometry ) { + + const vertices = geometry.getAttribute( 'position' ); + const normals = geometry.getAttribute( 'normal' ); + const uvs = geometry.getAttribute( 'uv' ); + const colors = geometry.getAttribute( 'color' ); + const indices = geometry.getIndex(); + + normalMatrixWorld.getNormalMatrix( mesh.matrixWorld ); + + for ( let i = 0, l = vertices.count; i < l; i ++ ) { + + vertex.fromBufferAttribute( vertices, i ); + + vertex.applyMatrix4( mesh.matrixWorld ); + + + // Position information + output.setFloat32( vOffset, vertex.x, options.littleEndian ); + vOffset += 4; + + output.setFloat32( vOffset, vertex.y, options.littleEndian ); + vOffset += 4; + + output.setFloat32( vOffset, vertex.z, options.littleEndian ); + vOffset += 4; + + // Normal information + if ( includeNormals === true ) { + + if ( normals != null ) { + + vertex.fromBufferAttribute( normals, i ); + + vertex.applyMatrix3( normalMatrixWorld ).normalize(); + + output.setFloat32( vOffset, vertex.x, options.littleEndian ); + vOffset += 4; + + output.setFloat32( vOffset, vertex.y, options.littleEndian ); + vOffset += 4; + + output.setFloat32( vOffset, vertex.z, options.littleEndian ); + vOffset += 4; + + } else { + + output.setFloat32( vOffset, 0, options.littleEndian ); + vOffset += 4; + + output.setFloat32( vOffset, 0, options.littleEndian ); + vOffset += 4; + + output.setFloat32( vOffset, 0, options.littleEndian ); + vOffset += 4; + + } + + } + + // UV information + if ( includeUVs === true ) { + + if ( uvs != null ) { + + output.setFloat32( vOffset, uvs.getX( i ), options.littleEndian ); + vOffset += 4; + + output.setFloat32( vOffset, uvs.getY( i ), options.littleEndian ); + vOffset += 4; + + } else { + + output.setFloat32( vOffset, 0, options.littleEndian ); + vOffset += 4; + + output.setFloat32( vOffset, 0, options.littleEndian ); + vOffset += 4; + + } + + } + + // Color information + if ( includeColors === true ) { + + if ( colors != null ) { + + tempColor + .fromBufferAttribute( colors, i ) + .convertLinearToSRGB(); + + output.setUint8( vOffset, Math.floor( tempColor.r * 255 ) ); + vOffset += 1; + + output.setUint8( vOffset, Math.floor( tempColor.g * 255 ) ); + vOffset += 1; + + output.setUint8( vOffset, Math.floor( tempColor.b * 255 ) ); + vOffset += 1; + + } else { + + output.setUint8( vOffset, 255 ); + vOffset += 1; + + output.setUint8( vOffset, 255 ); + vOffset += 1; + + output.setUint8( vOffset, 255 ); + vOffset += 1; + + } + + } + + } + + if ( includeIndices === true ) { + + // Create the face list + + if ( indices !== null ) { + + for ( let i = 0, l = indices.count; i < l; i += 3 ) { + + output.setUint8( fOffset, 3 ); + fOffset += 1; + + output.setUint32( fOffset, indices.getX( i + 0 ) + writtenVertices, options.littleEndian ); + fOffset += indexByteCount; + + output.setUint32( fOffset, indices.getX( i + 1 ) + writtenVertices, options.littleEndian ); + fOffset += indexByteCount; + + output.setUint32( fOffset, indices.getX( i + 2 ) + writtenVertices, options.littleEndian ); + fOffset += indexByteCount; + + } + + } else { + + for ( let i = 0, l = vertices.count; i < l; i += 3 ) { + + output.setUint8( fOffset, 3 ); + fOffset += 1; + + output.setUint32( fOffset, writtenVertices + i, options.littleEndian ); + fOffset += indexByteCount; + + output.setUint32( fOffset, writtenVertices + i + 1, options.littleEndian ); + fOffset += indexByteCount; + + output.setUint32( fOffset, writtenVertices + i + 2, options.littleEndian ); + fOffset += indexByteCount; + + } + + } + + } + + + // Save the amount of verts we've already written so we can offset + // the face index on the next mesh + writtenVertices += vertices.count; + + } ); + + result = output.buffer; + + } else { + + // Ascii File Generation + // count the number of vertices + let writtenVertices = 0; + let vertexList = ''; + let faceList = ''; + + traverseMeshes( function ( mesh, geometry ) { + + const vertices = geometry.getAttribute( 'position' ); + const normals = geometry.getAttribute( 'normal' ); + const uvs = geometry.getAttribute( 'uv' ); + const colors = geometry.getAttribute( 'color' ); + const indices = geometry.getIndex(); + + normalMatrixWorld.getNormalMatrix( mesh.matrixWorld ); + + // form each line + for ( let i = 0, l = vertices.count; i < l; i ++ ) { + + vertex.fromBufferAttribute( vertices, i ); + + vertex.applyMatrix4( mesh.matrixWorld ); + + + // Position information + let line = + vertex.x + ' ' + + vertex.y + ' ' + + vertex.z; + + // Normal information + if ( includeNormals === true ) { + + if ( normals != null ) { + + vertex.fromBufferAttribute( normals, i ); + + vertex.applyMatrix3( normalMatrixWorld ).normalize(); + + line += ' ' + + vertex.x + ' ' + + vertex.y + ' ' + + vertex.z; + + } else { + + line += ' 0 0 0'; + + } + + } + + // UV information + if ( includeUVs === true ) { + + if ( uvs != null ) { + + line += ' ' + + uvs.getX( i ) + ' ' + + uvs.getY( i ); + + } else { + + line += ' 0 0'; + + } + + } + + // Color information + if ( includeColors === true ) { + + if ( colors != null ) { + + tempColor + .fromBufferAttribute( colors, i ) + .convertLinearToSRGB(); + + line += ' ' + + Math.floor( tempColor.r * 255 ) + ' ' + + Math.floor( tempColor.g * 255 ) + ' ' + + Math.floor( tempColor.b * 255 ); + + } else { + + line += ' 255 255 255'; + + } + + } + + vertexList += line + '\n'; + + } + + // Create the face list + if ( includeIndices === true ) { + + if ( indices !== null ) { + + for ( let i = 0, l = indices.count; i < l; i += 3 ) { + + faceList += `3 ${ indices.getX( i + 0 ) + writtenVertices }`; + faceList += ` ${ indices.getX( i + 1 ) + writtenVertices }`; + faceList += ` ${ indices.getX( i + 2 ) + writtenVertices }\n`; + + } + + } else { + + for ( let i = 0, l = vertices.count; i < l; i += 3 ) { + + faceList += `3 ${ writtenVertices + i } ${ writtenVertices + i + 1 } ${ writtenVertices + i + 2 }\n`; + + } + + } + + faceCount += indices ? indices.count / 3 : vertices.count / 3; + + } + + writtenVertices += vertices.count; + + } ); + + result = `${ header }${vertexList}${ includeIndices ? `${faceList}\n` : '\n' }`; + + } + + if ( typeof onDone === 'function' ) requestAnimationFrame( () => onDone( result ) ); + + return result; + + } + +} + +export { PLYExporter }; diff --git a/node_modules/three/examples/jsm/exporters/STLExporter.js b/node_modules/three/examples/jsm/exporters/STLExporter.js new file mode 100644 index 0000000..a97b408 --- /dev/null +++ b/node_modules/three/examples/jsm/exporters/STLExporter.js @@ -0,0 +1,199 @@ +import { Vector3 } from 'three'; + +/** + * Usage: + * const exporter = new STLExporter(); + * + * // second argument is a list of options + * const data = exporter.parse( mesh, { binary: true } ); + * + */ + +class STLExporter { + + parse( scene, options = {} ) { + + options = Object.assign( { + binary: false + }, options ); + + const binary = options.binary; + + // + + const objects = []; + let triangles = 0; + + scene.traverse( function ( object ) { + + if ( object.isMesh ) { + + const geometry = object.geometry; + + const index = geometry.index; + const positionAttribute = geometry.getAttribute( 'position' ); + + triangles += ( index !== null ) ? ( index.count / 3 ) : ( positionAttribute.count / 3 ); + + objects.push( { + object3d: object, + geometry: geometry + } ); + + } + + } ); + + let output; + let offset = 80; // skip header + + if ( binary === true ) { + + const bufferLength = triangles * 2 + triangles * 3 * 4 * 4 + 80 + 4; + const arrayBuffer = new ArrayBuffer( bufferLength ); + output = new DataView( arrayBuffer ); + output.setUint32( offset, triangles, true ); offset += 4; + + } else { + + output = ''; + output += 'solid exported\n'; + + } + + const vA = new Vector3(); + const vB = new Vector3(); + const vC = new Vector3(); + const cb = new Vector3(); + const ab = new Vector3(); + const normal = new Vector3(); + + for ( let i = 0, il = objects.length; i < il; i ++ ) { + + const object = objects[ i ].object3d; + const geometry = objects[ i ].geometry; + + const index = geometry.index; + const positionAttribute = geometry.getAttribute( 'position' ); + + if ( index !== null ) { + + // indexed geometry + + for ( let j = 0; j < index.count; j += 3 ) { + + const a = index.getX( j + 0 ); + const b = index.getX( j + 1 ); + const c = index.getX( j + 2 ); + + writeFace( a, b, c, positionAttribute, object ); + + } + + } else { + + // non-indexed geometry + + for ( let j = 0; j < positionAttribute.count; j += 3 ) { + + const a = j + 0; + const b = j + 1; + const c = j + 2; + + writeFace( a, b, c, positionAttribute, object ); + + } + + } + + } + + if ( binary === false ) { + + output += 'endsolid exported\n'; + + } + + return output; + + function writeFace( a, b, c, positionAttribute, object ) { + + vA.fromBufferAttribute( positionAttribute, a ); + vB.fromBufferAttribute( positionAttribute, b ); + vC.fromBufferAttribute( positionAttribute, c ); + + if ( object.isSkinnedMesh === true ) { + + object.applyBoneTransform( a, vA ); + object.applyBoneTransform( b, vB ); + object.applyBoneTransform( c, vC ); + + } + + vA.applyMatrix4( object.matrixWorld ); + vB.applyMatrix4( object.matrixWorld ); + vC.applyMatrix4( object.matrixWorld ); + + writeNormal( vA, vB, vC ); + + writeVertex( vA ); + writeVertex( vB ); + writeVertex( vC ); + + if ( binary === true ) { + + output.setUint16( offset, 0, true ); offset += 2; + + } else { + + output += '\t\tendloop\n'; + output += '\tendfacet\n'; + + } + + } + + function writeNormal( vA, vB, vC ) { + + cb.subVectors( vC, vB ); + ab.subVectors( vA, vB ); + cb.cross( ab ).normalize(); + + normal.copy( cb ).normalize(); + + if ( binary === true ) { + + output.setFloat32( offset, normal.x, true ); offset += 4; + output.setFloat32( offset, normal.y, true ); offset += 4; + output.setFloat32( offset, normal.z, true ); offset += 4; + + } else { + + output += '\tfacet normal ' + normal.x + ' ' + normal.y + ' ' + normal.z + '\n'; + output += '\t\touter loop\n'; + + } + + } + + function writeVertex( vertex ) { + + if ( binary === true ) { + + output.setFloat32( offset, vertex.x, true ); offset += 4; + output.setFloat32( offset, vertex.y, true ); offset += 4; + output.setFloat32( offset, vertex.z, true ); offset += 4; + + } else { + + output += '\t\t\tvertex ' + vertex.x + ' ' + vertex.y + ' ' + vertex.z + '\n'; + + } + + } + + } + +} + +export { STLExporter }; diff --git a/node_modules/three/examples/jsm/exporters/USDZExporter.js b/node_modules/three/examples/jsm/exporters/USDZExporter.js new file mode 100644 index 0000000..63ecfd3 --- /dev/null +++ b/node_modules/three/examples/jsm/exporters/USDZExporter.js @@ -0,0 +1,741 @@ +import { + NoColorSpace, + DoubleSide, +} from 'three'; + +import { + strToU8, + zipSync, +} from '../libs/fflate.module.js'; + +import { decompress } from './../utils/TextureUtils.js'; + +class USDZExporter { + + parse( scene, onDone, onError, options ) { + + this.parseAsync( scene, options ).then( onDone ).catch( onError ); + + } + + async parseAsync( scene, options = {} ) { + + options = Object.assign( { + ar: { + anchoring: { type: 'plane' }, + planeAnchoring: { alignment: 'horizontal' } + }, + quickLookCompatible: false, + maxTextureSize: 1024, + }, options ); + + const files = {}; + const modelFileName = 'model.usda'; + + // model file should be first in USDZ archive so we init it here + files[ modelFileName ] = null; + + let output = buildHeader(); + + output += buildSceneStart( options ); + + const materials = {}; + const textures = {}; + + scene.traverseVisible( ( object ) => { + + if ( object.isMesh ) { + + const geometry = object.geometry; + const material = object.material; + + if ( material.isMeshStandardMaterial ) { + + const geometryFileName = 'geometries/Geometry_' + geometry.id + '.usda'; + + if ( ! ( geometryFileName in files ) ) { + + const meshObject = buildMeshObject( geometry ); + files[ geometryFileName ] = buildUSDFileAsString( meshObject ); + + } + + if ( ! ( material.uuid in materials ) ) { + + materials[ material.uuid ] = material; + + } + + output += buildXform( object, geometry, material ); + + } else { + + console.warn( 'THREE.USDZExporter: Unsupported material type (USDZ only supports MeshStandardMaterial)', object ); + + } + + } else if ( object.isCamera ) { + + output += buildCamera( object ); + + } + + } ); + + + output += buildSceneEnd(); + + output += buildMaterials( materials, textures, options.quickLookCompatible ); + + files[ modelFileName ] = strToU8( output ); + output = null; + + for ( const id in textures ) { + + let texture = textures[ id ]; + + if ( texture.isCompressedTexture === true ) { + + texture = decompress( texture ); + + } + + const canvas = imageToCanvas( texture.image, texture.flipY, options.maxTextureSize ); + const blob = await new Promise( resolve => canvas.toBlob( resolve, 'image/png', 1 ) ); + + files[ `textures/Texture_${ id }.png` ] = new Uint8Array( await blob.arrayBuffer() ); + + } + + // 64 byte alignment + // https://github.com/101arrowz/fflate/issues/39#issuecomment-777263109 + + let offset = 0; + + for ( const filename in files ) { + + const file = files[ filename ]; + const headerSize = 34 + filename.length; + + offset += headerSize; + + const offsetMod64 = offset & 63; + + if ( offsetMod64 !== 4 ) { + + const padLength = 64 - offsetMod64; + const padding = new Uint8Array( padLength ); + + files[ filename ] = [ file, { extra: { 12345: padding } } ]; + + } + + offset = file.length; + + } + + return zipSync( files, { level: 0 } ); + + } + +} + +function imageToCanvas( image, flipY, maxTextureSize ) { + + if ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) || + ( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) || + ( typeof OffscreenCanvas !== 'undefined' && image instanceof OffscreenCanvas ) || + ( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) { + + const scale = maxTextureSize / Math.max( image.width, image.height ); + + const canvas = document.createElement( 'canvas' ); + canvas.width = image.width * Math.min( 1, scale ); + canvas.height = image.height * Math.min( 1, scale ); + + const context = canvas.getContext( '2d' ); + + // TODO: We should be able to do this in the UsdTransform2d? + + if ( flipY === true ) { + + context.translate( 0, canvas.height ); + context.scale( 1, - 1 ); + + } + + context.drawImage( image, 0, 0, canvas.width, canvas.height ); + + return canvas; + + } else { + + throw new Error( 'THREE.USDZExporter: No valid image data found. Unable to process texture.' ); + + } + +} + +// + +const PRECISION = 7; + +function buildHeader() { + + return `#usda 1.0 +( + customLayerData = { + string creator = "Three.js USDZExporter" + } + defaultPrim = "Root" + metersPerUnit = 1 + upAxis = "Y" +) + +`; + +} + +function buildSceneStart( options ) { + + return `def Xform "Root" +{ + def Scope "Scenes" ( + kind = "sceneLibrary" + ) + { + def Xform "Scene" ( + customData = { + bool preliminary_collidesWithEnvironment = 0 + string sceneName = "Scene" + } + sceneName = "Scene" + ) + { + token preliminary:anchoring:type = "${options.ar.anchoring.type}" + token preliminary:planeAnchoring:alignment = "${options.ar.planeAnchoring.alignment}" + +`; + +} + +function buildSceneEnd() { + + return ` + } + } +} + +`; + +} + +function buildUSDFileAsString( dataToInsert ) { + + let output = buildHeader(); + output += dataToInsert; + return strToU8( output ); + +} + +// Xform + +function buildXform( object, geometry, material ) { + + const name = 'Object_' + object.id; + const transform = buildMatrix( object.matrixWorld ); + + if ( object.matrixWorld.determinant() < 0 ) { + + console.warn( 'THREE.USDZExporter: USDZ does not support negative scales', object ); + + } + + return `def Xform "${ name }" ( + prepend references = @./geometries/Geometry_${ geometry.id }.usda@ + prepend apiSchemas = ["MaterialBindingAPI"] +) +{ + matrix4d xformOp:transform = ${ transform } + uniform token[] xformOpOrder = ["xformOp:transform"] + + rel material:binding = +} + +`; + +} + +function buildMatrix( matrix ) { + + const array = matrix.elements; + + return `( ${ buildMatrixRow( array, 0 ) }, ${ buildMatrixRow( array, 4 ) }, ${ buildMatrixRow( array, 8 ) }, ${ buildMatrixRow( array, 12 ) } )`; + +} + +function buildMatrixRow( array, offset ) { + + return `(${ array[ offset + 0 ] }, ${ array[ offset + 1 ] }, ${ array[ offset + 2 ] }, ${ array[ offset + 3 ] })`; + +} + +// Mesh + +function buildMeshObject( geometry ) { + + const mesh = buildMesh( geometry ); + return ` +def "Geometry" +{ +${mesh} +} +`; + +} + +function buildMesh( geometry ) { + + const name = 'Geometry'; + const attributes = geometry.attributes; + const count = attributes.position.count; + + return ` + def Mesh "${ name }" + { + int[] faceVertexCounts = [${ buildMeshVertexCount( geometry ) }] + int[] faceVertexIndices = [${ buildMeshVertexIndices( geometry ) }] + normal3f[] normals = [${ buildVector3Array( attributes.normal, count )}] ( + interpolation = "vertex" + ) + point3f[] points = [${ buildVector3Array( attributes.position, count )}] +${ buildPrimvars( attributes ) } + uniform token subdivisionScheme = "none" + } +`; + +} + +function buildMeshVertexCount( geometry ) { + + const count = geometry.index !== null ? geometry.index.count : geometry.attributes.position.count; + + return Array( count / 3 ).fill( 3 ).join( ', ' ); + +} + +function buildMeshVertexIndices( geometry ) { + + const index = geometry.index; + const array = []; + + if ( index !== null ) { + + for ( let i = 0; i < index.count; i ++ ) { + + array.push( index.getX( i ) ); + + } + + } else { + + const length = geometry.attributes.position.count; + + for ( let i = 0; i < length; i ++ ) { + + array.push( i ); + + } + + } + + return array.join( ', ' ); + +} + +function buildVector3Array( attribute, count ) { + + if ( attribute === undefined ) { + + console.warn( 'USDZExporter: Normals missing.' ); + return Array( count ).fill( '(0, 0, 0)' ).join( ', ' ); + + } + + const array = []; + + for ( let i = 0; i < attribute.count; i ++ ) { + + const x = attribute.getX( i ); + const y = attribute.getY( i ); + const z = attribute.getZ( i ); + + array.push( `(${ x.toPrecision( PRECISION ) }, ${ y.toPrecision( PRECISION ) }, ${ z.toPrecision( PRECISION ) })` ); + + } + + return array.join( ', ' ); + +} + +function buildVector2Array( attribute ) { + + const array = []; + + for ( let i = 0; i < attribute.count; i ++ ) { + + const x = attribute.getX( i ); + const y = attribute.getY( i ); + + array.push( `(${ x.toPrecision( PRECISION ) }, ${ 1 - y.toPrecision( PRECISION ) })` ); + + } + + return array.join( ', ' ); + +} + +function buildPrimvars( attributes ) { + + let string = ''; + + for ( let i = 0; i < 4; i ++ ) { + + const id = ( i > 0 ? i : '' ); + const attribute = attributes[ 'uv' + id ]; + + if ( attribute !== undefined ) { + + string += ` + texCoord2f[] primvars:st${ id } = [${ buildVector2Array( attribute )}] ( + interpolation = "vertex" + )`; + + } + + } + + // vertex colors + + const colorAttribute = attributes.color; + + if ( colorAttribute !== undefined ) { + + const count = colorAttribute.count; + + string += ` + color3f[] primvars:displayColor = [${buildVector3Array( colorAttribute, count )}] ( + interpolation = "vertex" + )`; + + } + + return string; + +} + +// Materials + +function buildMaterials( materials, textures, quickLookCompatible = false ) { + + const array = []; + + for ( const uuid in materials ) { + + const material = materials[ uuid ]; + + array.push( buildMaterial( material, textures, quickLookCompatible ) ); + + } + + return `def "Materials" +{ +${ array.join( '' ) } +} + +`; + +} + +function buildMaterial( material, textures, quickLookCompatible = false ) { + + // https://graphics.pixar.com/usd/docs/UsdPreviewSurface-Proposal.html + + const pad = ' '; + const inputs = []; + const samplers = []; + + function buildTexture( texture, mapType, color ) { + + const id = texture.source.id + '_' + texture.flipY; + + textures[ id ] = texture; + + const uv = texture.channel > 0 ? 'st' + texture.channel : 'st'; + + const WRAPPINGS = { + 1000: 'repeat', // RepeatWrapping + 1001: 'clamp', // ClampToEdgeWrapping + 1002: 'mirror' // MirroredRepeatWrapping + }; + + const repeat = texture.repeat.clone(); + const offset = texture.offset.clone(); + const rotation = texture.rotation; + + // rotation is around the wrong point. after rotation we need to shift offset again so that we're rotating around the right spot + const xRotationOffset = Math.sin( rotation ); + const yRotationOffset = Math.cos( rotation ); + + // texture coordinates start in the opposite corner, need to correct + offset.y = 1 - offset.y - repeat.y; + + // turns out QuickLook is buggy and interprets texture repeat inverted/applies operations in a different order. + // Apple Feedback: FB10036297 and FB11442287 + if ( quickLookCompatible ) { + + // This is NOT correct yet in QuickLook, but comes close for a range of models. + // It becomes more incorrect the bigger the offset is + + offset.x = offset.x / repeat.x; + offset.y = offset.y / repeat.y; + + offset.x += xRotationOffset / repeat.x; + offset.y += yRotationOffset - 1; + + } else { + + // results match glTF results exactly. verified correct in usdview. + offset.x += xRotationOffset * repeat.x; + offset.y += ( 1 - yRotationOffset ) * repeat.y; + + } + + return ` + def Shader "PrimvarReader_${ mapType }" + { + uniform token info:id = "UsdPrimvarReader_float2" + float2 inputs:fallback = (0.0, 0.0) + token inputs:varname = "${ uv }" + float2 outputs:result + } + + def Shader "Transform2d_${ mapType }" + { + uniform token info:id = "UsdTransform2d" + token inputs:in.connect = + float inputs:rotation = ${ ( rotation * ( 180 / Math.PI ) ).toFixed( PRECISION ) } + float2 inputs:scale = ${ buildVector2( repeat ) } + float2 inputs:translation = ${ buildVector2( offset ) } + float2 outputs:result + } + + def Shader "Texture_${ texture.id }_${ mapType }" + { + uniform token info:id = "UsdUVTexture" + asset inputs:file = @textures/Texture_${ id }.png@ + float2 inputs:st.connect = + ${ color !== undefined ? 'float4 inputs:scale = ' + buildColor4( color ) : '' } + token inputs:sourceColorSpace = "${ texture.colorSpace === NoColorSpace ? 'raw' : 'sRGB' }" + token inputs:wrapS = "${ WRAPPINGS[ texture.wrapS ] }" + token inputs:wrapT = "${ WRAPPINGS[ texture.wrapT ] }" + float outputs:r + float outputs:g + float outputs:b + float3 outputs:rgb + ${ material.transparent || material.alphaTest > 0.0 ? 'float outputs:a' : '' } + }`; + + } + + + if ( material.side === DoubleSide ) { + + console.warn( 'THREE.USDZExporter: USDZ does not support double sided materials', material ); + + } + + if ( material.map !== null ) { + + inputs.push( `${ pad }color3f inputs:diffuseColor.connect = ` ); + + if ( material.transparent ) { + + inputs.push( `${ pad }float inputs:opacity.connect = ` ); + + } else if ( material.alphaTest > 0.0 ) { + + inputs.push( `${ pad }float inputs:opacity.connect = ` ); + inputs.push( `${ pad }float inputs:opacityThreshold = ${material.alphaTest}` ); + + } + + samplers.push( buildTexture( material.map, 'diffuse', material.color ) ); + + } else { + + inputs.push( `${ pad }color3f inputs:diffuseColor = ${ buildColor( material.color ) }` ); + + } + + if ( material.emissiveMap !== null ) { + + inputs.push( `${ pad }color3f inputs:emissiveColor.connect = ` ); + + samplers.push( buildTexture( material.emissiveMap, 'emissive' ) ); + + } else if ( material.emissive.getHex() > 0 ) { + + inputs.push( `${ pad }color3f inputs:emissiveColor = ${ buildColor( material.emissive ) }` ); + + } + + if ( material.normalMap !== null ) { + + inputs.push( `${ pad }normal3f inputs:normal.connect = ` ); + + samplers.push( buildTexture( material.normalMap, 'normal' ) ); + + } + + if ( material.aoMap !== null ) { + + inputs.push( `${ pad }float inputs:occlusion.connect = ` ); + + samplers.push( buildTexture( material.aoMap, 'occlusion' ) ); + + } + + if ( material.roughnessMap !== null && material.roughness === 1 ) { + + inputs.push( `${ pad }float inputs:roughness.connect = ` ); + + samplers.push( buildTexture( material.roughnessMap, 'roughness' ) ); + + } else { + + inputs.push( `${ pad }float inputs:roughness = ${ material.roughness }` ); + + } + + if ( material.metalnessMap !== null && material.metalness === 1 ) { + + inputs.push( `${ pad }float inputs:metallic.connect = ` ); + + samplers.push( buildTexture( material.metalnessMap, 'metallic' ) ); + + } else { + + inputs.push( `${ pad }float inputs:metallic = ${ material.metalness }` ); + + } + + if ( material.alphaMap !== null ) { + + inputs.push( `${pad}float inputs:opacity.connect = ` ); + inputs.push( `${pad}float inputs:opacityThreshold = 0.0001` ); + + samplers.push( buildTexture( material.alphaMap, 'opacity' ) ); + + } else { + + inputs.push( `${pad}float inputs:opacity = ${material.opacity}` ); + + } + + if ( material.isMeshPhysicalMaterial ) { + + inputs.push( `${ pad }float inputs:clearcoat = ${ material.clearcoat }` ); + inputs.push( `${ pad }float inputs:clearcoatRoughness = ${ material.clearcoatRoughness }` ); + inputs.push( `${ pad }float inputs:ior = ${ material.ior }` ); + + } + + return ` + def Material "Material_${ material.id }" + { + def Shader "PreviewSurface" + { + uniform token info:id = "UsdPreviewSurface" +${ inputs.join( '\n' ) } + int inputs:useSpecularWorkflow = 0 + token outputs:surface + } + + token outputs:surface.connect = + +${ samplers.join( '\n' ) } + + } +`; + +} + +function buildColor( color ) { + + return `(${ color.r }, ${ color.g }, ${ color.b })`; + +} + +function buildColor4( color ) { + + return `(${ color.r }, ${ color.g }, ${ color.b }, 1.0)`; + +} + +function buildVector2( vector ) { + + return `(${ vector.x }, ${ vector.y })`; + +} + + +function buildCamera( camera ) { + + const name = camera.name ? camera.name : 'Camera_' + camera.id; + + const transform = buildMatrix( camera.matrixWorld ); + + if ( camera.matrixWorld.determinant() < 0 ) { + + console.warn( 'THREE.USDZExporter: USDZ does not support negative scales', camera ); + + } + + if ( camera.isOrthographicCamera ) { + + return `def Camera "${name}" + { + matrix4d xformOp:transform = ${ transform } + uniform token[] xformOpOrder = ["xformOp:transform"] + + float2 clippingRange = (${ camera.near.toPrecision( PRECISION ) }, ${ camera.far.toPrecision( PRECISION ) }) + float horizontalAperture = ${ ( ( Math.abs( camera.left ) + Math.abs( camera.right ) ) * 10 ).toPrecision( PRECISION ) } + float verticalAperture = ${ ( ( Math.abs( camera.top ) + Math.abs( camera.bottom ) ) * 10 ).toPrecision( PRECISION ) } + token projection = "orthographic" + } + + `; + + } else { + + return `def Camera "${name}" + { + matrix4d xformOp:transform = ${ transform } + uniform token[] xformOpOrder = ["xformOp:transform"] + + float2 clippingRange = (${ camera.near.toPrecision( PRECISION ) }, ${ camera.far.toPrecision( PRECISION ) }) + float focalLength = ${ camera.getFocalLength().toPrecision( PRECISION ) } + float focusDistance = ${ camera.focus.toPrecision( PRECISION ) } + float horizontalAperture = ${ camera.getFilmWidth().toPrecision( PRECISION ) } + token projection = "perspective" + float verticalAperture = ${ camera.getFilmHeight().toPrecision( PRECISION ) } + } + + `; + + } + +} + +export { USDZExporter }; diff --git a/node_modules/three/examples/jsm/geometries/BoxLineGeometry.js b/node_modules/three/examples/jsm/geometries/BoxLineGeometry.js new file mode 100644 index 0000000..8f05833 --- /dev/null +++ b/node_modules/three/examples/jsm/geometries/BoxLineGeometry.js @@ -0,0 +1,69 @@ +import { + BufferGeometry, + Float32BufferAttribute +} from 'three'; + +class BoxLineGeometry extends BufferGeometry { + + constructor( width = 1, height = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1 ) { + + super(); + + widthSegments = Math.floor( widthSegments ); + heightSegments = Math.floor( heightSegments ); + depthSegments = Math.floor( depthSegments ); + + const widthHalf = width / 2; + const heightHalf = height / 2; + const depthHalf = depth / 2; + + const segmentWidth = width / widthSegments; + const segmentHeight = height / heightSegments; + const segmentDepth = depth / depthSegments; + + const vertices = []; + + let x = - widthHalf; + let y = - heightHalf; + let z = - depthHalf; + + for ( let i = 0; i <= widthSegments; i ++ ) { + + vertices.push( x, - heightHalf, - depthHalf, x, heightHalf, - depthHalf ); + vertices.push( x, heightHalf, - depthHalf, x, heightHalf, depthHalf ); + vertices.push( x, heightHalf, depthHalf, x, - heightHalf, depthHalf ); + vertices.push( x, - heightHalf, depthHalf, x, - heightHalf, - depthHalf ); + + x += segmentWidth; + + } + + for ( let i = 0; i <= heightSegments; i ++ ) { + + vertices.push( - widthHalf, y, - depthHalf, widthHalf, y, - depthHalf ); + vertices.push( widthHalf, y, - depthHalf, widthHalf, y, depthHalf ); + vertices.push( widthHalf, y, depthHalf, - widthHalf, y, depthHalf ); + vertices.push( - widthHalf, y, depthHalf, - widthHalf, y, - depthHalf ); + + y += segmentHeight; + + } + + for ( let i = 0; i <= depthSegments; i ++ ) { + + vertices.push( - widthHalf, - heightHalf, z, - widthHalf, heightHalf, z ); + vertices.push( - widthHalf, heightHalf, z, widthHalf, heightHalf, z ); + vertices.push( widthHalf, heightHalf, z, widthHalf, - heightHalf, z ); + vertices.push( widthHalf, - heightHalf, z, - widthHalf, - heightHalf, z ); + + z += segmentDepth; + + } + + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + + } + +} + +export { BoxLineGeometry }; diff --git a/node_modules/three/examples/jsm/geometries/ConvexGeometry.js b/node_modules/three/examples/jsm/geometries/ConvexGeometry.js new file mode 100644 index 0000000..3aa65c5 --- /dev/null +++ b/node_modules/three/examples/jsm/geometries/ConvexGeometry.js @@ -0,0 +1,53 @@ +import { + BufferGeometry, + Float32BufferAttribute +} from 'three'; +import { ConvexHull } from '../math/ConvexHull.js'; + +class ConvexGeometry extends BufferGeometry { + + constructor( points = [] ) { + + super(); + + // buffers + + const vertices = []; + const normals = []; + + const convexHull = new ConvexHull().setFromPoints( points ); + + // generate vertices and normals + + const faces = convexHull.faces; + + for ( let i = 0; i < faces.length; i ++ ) { + + const face = faces[ i ]; + let edge = face.edge; + + // we move along a doubly-connected edge list to access all face points (see HalfEdge docs) + + do { + + const point = edge.head().point; + + vertices.push( point.x, point.y, point.z ); + normals.push( face.normal.x, face.normal.y, face.normal.z ); + + edge = edge.next; + + } while ( edge !== face.edge ); + + } + + // build geometry + + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + + } + +} + +export { ConvexGeometry }; diff --git a/node_modules/three/examples/jsm/geometries/DecalGeometry.js b/node_modules/three/examples/jsm/geometries/DecalGeometry.js new file mode 100644 index 0000000..5e712f2 --- /dev/null +++ b/node_modules/three/examples/jsm/geometries/DecalGeometry.js @@ -0,0 +1,356 @@ +import { + BufferGeometry, + Float32BufferAttribute, + Matrix4, + Vector3 +} from 'three'; + +/** + * You can use this geometry to create a decal mesh, that serves different kinds of purposes. + * e.g. adding unique details to models, performing dynamic visual environmental changes or covering seams. + * + * Constructor parameter: + * + * mesh — Any mesh object + * position — Position of the decal projector + * orientation — Orientation of the decal projector + * size — Size of the decal projector + * + * reference: http://blog.wolfire.com/2009/06/how-to-project-decals/ + * + */ + +class DecalGeometry extends BufferGeometry { + + constructor( mesh, position, orientation, size ) { + + super(); + + // buffers + + const vertices = []; + const normals = []; + const uvs = []; + + // helpers + + const plane = new Vector3(); + + // this matrix represents the transformation of the decal projector + + const projectorMatrix = new Matrix4(); + projectorMatrix.makeRotationFromEuler( orientation ); + projectorMatrix.setPosition( position ); + + const projectorMatrixInverse = new Matrix4(); + projectorMatrixInverse.copy( projectorMatrix ).invert(); + + // generate buffers + + generate(); + + // build geometry + + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + function generate() { + + let decalVertices = []; + + const vertex = new Vector3(); + const normal = new Vector3(); + + // handle different geometry types + + const geometry = mesh.geometry; + + const positionAttribute = geometry.attributes.position; + const normalAttribute = geometry.attributes.normal; + + // first, create an array of 'DecalVertex' objects + // three consecutive 'DecalVertex' objects represent a single face + // + // this data structure will be later used to perform the clipping + + if ( geometry.index !== null ) { + + // indexed BufferGeometry + + const index = geometry.index; + + for ( let i = 0; i < index.count; i ++ ) { + + vertex.fromBufferAttribute( positionAttribute, index.getX( i ) ); + normal.fromBufferAttribute( normalAttribute, index.getX( i ) ); + + pushDecalVertex( decalVertices, vertex, normal ); + + } + + } else { + + // non-indexed BufferGeometry + + for ( let i = 0; i < positionAttribute.count; i ++ ) { + + vertex.fromBufferAttribute( positionAttribute, i ); + normal.fromBufferAttribute( normalAttribute, i ); + + pushDecalVertex( decalVertices, vertex, normal ); + + } + + } + + // second, clip the geometry so that it doesn't extend out from the projector + + decalVertices = clipGeometry( decalVertices, plane.set( 1, 0, 0 ) ); + decalVertices = clipGeometry( decalVertices, plane.set( - 1, 0, 0 ) ); + decalVertices = clipGeometry( decalVertices, plane.set( 0, 1, 0 ) ); + decalVertices = clipGeometry( decalVertices, plane.set( 0, - 1, 0 ) ); + decalVertices = clipGeometry( decalVertices, plane.set( 0, 0, 1 ) ); + decalVertices = clipGeometry( decalVertices, plane.set( 0, 0, - 1 ) ); + + // third, generate final vertices, normals and uvs + + for ( let i = 0; i < decalVertices.length; i ++ ) { + + const decalVertex = decalVertices[ i ]; + + // create texture coordinates (we are still in projector space) + + uvs.push( + 0.5 + ( decalVertex.position.x / size.x ), + 0.5 + ( decalVertex.position.y / size.y ) + ); + + // transform the vertex back to world space + + decalVertex.position.applyMatrix4( projectorMatrix ); + + // now create vertex and normal buffer data + + vertices.push( decalVertex.position.x, decalVertex.position.y, decalVertex.position.z ); + normals.push( decalVertex.normal.x, decalVertex.normal.y, decalVertex.normal.z ); + + } + + } + + function pushDecalVertex( decalVertices, vertex, normal ) { + + // transform the vertex to world space, then to projector space + + vertex.applyMatrix4( mesh.matrixWorld ); + vertex.applyMatrix4( projectorMatrixInverse ); + + normal.transformDirection( mesh.matrixWorld ); + + decalVertices.push( new DecalVertex( vertex.clone(), normal.clone() ) ); + + } + + function clipGeometry( inVertices, plane ) { + + const outVertices = []; + + const s = 0.5 * Math.abs( size.dot( plane ) ); + + // a single iteration clips one face, + // which consists of three consecutive 'DecalVertex' objects + + for ( let i = 0; i < inVertices.length; i += 3 ) { + + let total = 0; + let nV1; + let nV2; + let nV3; + let nV4; + + const d1 = inVertices[ i + 0 ].position.dot( plane ) - s; + const d2 = inVertices[ i + 1 ].position.dot( plane ) - s; + const d3 = inVertices[ i + 2 ].position.dot( plane ) - s; + + const v1Out = d1 > 0; + const v2Out = d2 > 0; + const v3Out = d3 > 0; + + // calculate, how many vertices of the face lie outside of the clipping plane + + total = ( v1Out ? 1 : 0 ) + ( v2Out ? 1 : 0 ) + ( v3Out ? 1 : 0 ); + + switch ( total ) { + + case 0: { + + // the entire face lies inside of the plane, no clipping needed + + outVertices.push( inVertices[ i ] ); + outVertices.push( inVertices[ i + 1 ] ); + outVertices.push( inVertices[ i + 2 ] ); + break; + + } + + case 1: { + + // one vertex lies outside of the plane, perform clipping + + if ( v1Out ) { + + nV1 = inVertices[ i + 1 ]; + nV2 = inVertices[ i + 2 ]; + nV3 = clip( inVertices[ i ], nV1, plane, s ); + nV4 = clip( inVertices[ i ], nV2, plane, s ); + + } + + if ( v2Out ) { + + nV1 = inVertices[ i ]; + nV2 = inVertices[ i + 2 ]; + nV3 = clip( inVertices[ i + 1 ], nV1, plane, s ); + nV4 = clip( inVertices[ i + 1 ], nV2, plane, s ); + + outVertices.push( nV3 ); + outVertices.push( nV2.clone() ); + outVertices.push( nV1.clone() ); + + outVertices.push( nV2.clone() ); + outVertices.push( nV3.clone() ); + outVertices.push( nV4 ); + break; + + } + + if ( v3Out ) { + + nV1 = inVertices[ i ]; + nV2 = inVertices[ i + 1 ]; + nV3 = clip( inVertices[ i + 2 ], nV1, plane, s ); + nV4 = clip( inVertices[ i + 2 ], nV2, plane, s ); + + } + + outVertices.push( nV1.clone() ); + outVertices.push( nV2.clone() ); + outVertices.push( nV3 ); + + outVertices.push( nV4 ); + outVertices.push( nV3.clone() ); + outVertices.push( nV2.clone() ); + + break; + + } + + case 2: { + + // two vertices lies outside of the plane, perform clipping + + if ( ! v1Out ) { + + nV1 = inVertices[ i ].clone(); + nV2 = clip( nV1, inVertices[ i + 1 ], plane, s ); + nV3 = clip( nV1, inVertices[ i + 2 ], plane, s ); + outVertices.push( nV1 ); + outVertices.push( nV2 ); + outVertices.push( nV3 ); + + } + + if ( ! v2Out ) { + + nV1 = inVertices[ i + 1 ].clone(); + nV2 = clip( nV1, inVertices[ i + 2 ], plane, s ); + nV3 = clip( nV1, inVertices[ i ], plane, s ); + outVertices.push( nV1 ); + outVertices.push( nV2 ); + outVertices.push( nV3 ); + + } + + if ( ! v3Out ) { + + nV1 = inVertices[ i + 2 ].clone(); + nV2 = clip( nV1, inVertices[ i ], plane, s ); + nV3 = clip( nV1, inVertices[ i + 1 ], plane, s ); + outVertices.push( nV1 ); + outVertices.push( nV2 ); + outVertices.push( nV3 ); + + } + + break; + + } + + case 3: { + + // the entire face lies outside of the plane, so let's discard the corresponding vertices + + break; + + } + + } + + } + + return outVertices; + + } + + function clip( v0, v1, p, s ) { + + const d0 = v0.position.dot( p ) - s; + const d1 = v1.position.dot( p ) - s; + + const s0 = d0 / ( d0 - d1 ); + + const v = new DecalVertex( + new Vector3( + v0.position.x + s0 * ( v1.position.x - v0.position.x ), + v0.position.y + s0 * ( v1.position.y - v0.position.y ), + v0.position.z + s0 * ( v1.position.z - v0.position.z ) + ), + new Vector3( + v0.normal.x + s0 * ( v1.normal.x - v0.normal.x ), + v0.normal.y + s0 * ( v1.normal.y - v0.normal.y ), + v0.normal.z + s0 * ( v1.normal.z - v0.normal.z ) + ) + ); + + // need to clip more values (texture coordinates)? do it this way: + // intersectpoint.value = a.value + s * ( b.value - a.value ); + + return v; + + } + + } + +} + +// helper + +class DecalVertex { + + constructor( position, normal ) { + + this.position = position; + this.normal = normal; + + } + + clone() { + + return new this.constructor( this.position.clone(), this.normal.clone() ); + + } + +} + +export { DecalGeometry, DecalVertex }; diff --git a/node_modules/three/examples/jsm/geometries/InstancedPointsGeometry.js b/node_modules/three/examples/jsm/geometries/InstancedPointsGeometry.js new file mode 100644 index 0000000..081ab6b --- /dev/null +++ b/node_modules/three/examples/jsm/geometries/InstancedPointsGeometry.js @@ -0,0 +1,174 @@ +import { + Box3, + Float32BufferAttribute, + InstancedBufferGeometry, + InstancedBufferAttribute, + Sphere, + Vector3 +} from 'three'; + +const _vector = new Vector3(); + +class InstancedPointsGeometry extends InstancedBufferGeometry { + + constructor() { + + super(); + + this.isInstancedPointsGeometry = true; + + this.type = 'InstancedPointsGeometry'; + + const positions = [ - 1, 1, 0, 1, 1, 0, - 1, - 1, 0, 1, - 1, 0 ]; + const uvs = [ - 1, 1, 1, 1, - 1, - 1, 1, - 1 ]; + const index = [ 0, 2, 1, 2, 3, 1 ]; + + this.setIndex( index ); + this.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + } + + applyMatrix4( matrix ) { + + const pos = this.attributes.instancePosition; + + if ( pos !== undefined ) { + + pos.applyMatrix4( matrix ); + + pos.needsUpdate = true; + + } + + if ( this.boundingBox !== null ) { + + this.computeBoundingBox(); + + } + + if ( this.boundingSphere !== null ) { + + this.computeBoundingSphere(); + + } + + return this; + + } + + setPositions( array ) { + + let points; + + if ( array instanceof Float32Array ) { + + points = array; + + } else if ( Array.isArray( array ) ) { + + points = new Float32Array( array ); + + } + + this.setAttribute( 'instancePosition', new InstancedBufferAttribute( points, 3 ) ); // xyz + + // + + this.computeBoundingBox(); + this.computeBoundingSphere(); + + return this; + + } + + setColors( array ) { + + let colors; + + if ( array instanceof Float32Array ) { + + colors = array; + + } else if ( Array.isArray( array ) ) { + + colors = new Float32Array( array ); + + } + + this.setAttribute( 'instanceColor', new InstancedBufferAttribute( colors, 3 ) ); // rgb + + return this; + + } + + computeBoundingBox() { + + if ( this.boundingBox === null ) { + + this.boundingBox = new Box3(); + + } + + const pos = this.attributes.instancePosition; + + if ( pos !== undefined ) { + + this.boundingBox.setFromBufferAttribute( pos ); + + } + + } + + computeBoundingSphere() { + + if ( this.boundingSphere === null ) { + + this.boundingSphere = new Sphere(); + + } + + if ( this.boundingBox === null ) { + + this.computeBoundingBox(); + + } + + const pos = this.attributes.instancePosition; + + if ( pos !== undefined ) { + + const center = this.boundingSphere.center; + + this.boundingBox.getCenter( center ); + + let maxRadiusSq = 0; + + for ( let i = 0, il = pos.count; i < il; i ++ ) { + + _vector.fromBufferAttribute( pos, i ); + maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector ) ); + + } + + this.boundingSphere.radius = Math.sqrt( maxRadiusSq ); + + if ( isNaN( this.boundingSphere.radius ) ) { + + console.error( 'THREE.InstancedPointsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.', this ); + + } + + } + + } + + toJSON() { + + // todo + + } + +} + +export default InstancedPointsGeometry; diff --git a/node_modules/three/examples/jsm/geometries/ParametricGeometries.js b/node_modules/three/examples/jsm/geometries/ParametricGeometries.js new file mode 100644 index 0000000..6716735 --- /dev/null +++ b/node_modules/three/examples/jsm/geometries/ParametricGeometries.js @@ -0,0 +1,254 @@ +import { + Curve, + Vector3 +} from 'three'; + +import { ParametricGeometry } from './ParametricGeometry.js'; + +/** + * Experimenting of primitive geometry creation using Surface Parametric equations + */ + +const ParametricGeometries = { + + klein: function ( v, u, target ) { + + u *= Math.PI; + v *= 2 * Math.PI; + + u = u * 2; + let x, z; + if ( u < Math.PI ) { + + x = 3 * Math.cos( u ) * ( 1 + Math.sin( u ) ) + ( 2 * ( 1 - Math.cos( u ) / 2 ) ) * Math.cos( u ) * Math.cos( v ); + z = - 8 * Math.sin( u ) - 2 * ( 1 - Math.cos( u ) / 2 ) * Math.sin( u ) * Math.cos( v ); + + } else { + + x = 3 * Math.cos( u ) * ( 1 + Math.sin( u ) ) + ( 2 * ( 1 - Math.cos( u ) / 2 ) ) * Math.cos( v + Math.PI ); + z = - 8 * Math.sin( u ); + + } + + const y = - 2 * ( 1 - Math.cos( u ) / 2 ) * Math.sin( v ); + + target.set( x, y, z ); + + }, + + plane: function ( width, height ) { + + return function ( u, v, target ) { + + const x = u * width; + const y = 0; + const z = v * height; + + target.set( x, y, z ); + + }; + + }, + + mobius: function ( u, t, target ) { + + // flat mobius strip + // http://www.wolframalpha.com/input/?i=M%C3%B6bius+strip+parametric+equations&lk=1&a=ClashPrefs_*Surface.MoebiusStrip.SurfaceProperty.ParametricEquations- + u = u - 0.5; + const v = 2 * Math.PI * t; + + const a = 2; + + const x = Math.cos( v ) * ( a + u * Math.cos( v / 2 ) ); + const y = Math.sin( v ) * ( a + u * Math.cos( v / 2 ) ); + const z = u * Math.sin( v / 2 ); + + target.set( x, y, z ); + + }, + + mobius3d: function ( u, t, target ) { + + // volumetric mobius strip + + u *= Math.PI; + t *= 2 * Math.PI; + + u = u * 2; + const phi = u / 2; + const major = 2.25, a = 0.125, b = 0.65; + + let x = a * Math.cos( t ) * Math.cos( phi ) - b * Math.sin( t ) * Math.sin( phi ); + const z = a * Math.cos( t ) * Math.sin( phi ) + b * Math.sin( t ) * Math.cos( phi ); + const y = ( major + x ) * Math.sin( u ); + x = ( major + x ) * Math.cos( u ); + + target.set( x, y, z ); + + } + +}; + + +/********************************************* + * + * Parametric Replacement for TubeGeometry + * + *********************************************/ + +ParametricGeometries.TubeGeometry = class TubeGeometry extends ParametricGeometry { + + constructor( path, segments = 64, radius = 1, segmentsRadius = 8, closed = false ) { + + const numpoints = segments + 1; + + const frames = path.computeFrenetFrames( segments, closed ), + tangents = frames.tangents, + normals = frames.normals, + binormals = frames.binormals; + + const position = new Vector3(); + + function ParametricTube( u, v, target ) { + + v *= 2 * Math.PI; + + const i = Math.floor( u * ( numpoints - 1 ) ); + + path.getPointAt( u, position ); + + const normal = normals[ i ]; + const binormal = binormals[ i ]; + + const cx = - radius * Math.cos( v ); // TODO: Hack: Negating it so it faces outside. + const cy = radius * Math.sin( v ); + + position.x += cx * normal.x + cy * binormal.x; + position.y += cx * normal.y + cy * binormal.y; + position.z += cx * normal.z + cy * binormal.z; + + target.copy( position ); + + } + + super( ParametricTube, segments, segmentsRadius ); + + // proxy internals + + this.tangents = tangents; + this.normals = normals; + this.binormals = binormals; + + this.path = path; + this.segments = segments; + this.radius = radius; + this.segmentsRadius = segmentsRadius; + this.closed = closed; + + } + +}; + + +/********************************************* + * + * Parametric Replacement for TorusKnotGeometry + * + *********************************************/ +ParametricGeometries.TorusKnotGeometry = class TorusKnotGeometry extends ParametricGeometries.TubeGeometry { + + constructor( radius = 200, tube = 40, segmentsT = 64, segmentsR = 8, p = 2, q = 3 ) { + + class TorusKnotCurve extends Curve { + + getPoint( t, optionalTarget = new Vector3() ) { + + const point = optionalTarget; + + t *= Math.PI * 2; + + const r = 0.5; + + const x = ( 1 + r * Math.cos( q * t ) ) * Math.cos( p * t ); + const y = ( 1 + r * Math.cos( q * t ) ) * Math.sin( p * t ); + const z = r * Math.sin( q * t ); + + return point.set( x, y, z ).multiplyScalar( radius ); + + } + + } + + const segments = segmentsT; + const radiusSegments = segmentsR; + const extrudePath = new TorusKnotCurve(); + + super( extrudePath, segments, tube, radiusSegments, true, false ); + + this.radius = radius; + this.tube = tube; + this.segmentsT = segmentsT; + this.segmentsR = segmentsR; + this.p = p; + this.q = q; + + } + +}; + +/********************************************* + * + * Parametric Replacement for SphereGeometry + * + *********************************************/ +ParametricGeometries.SphereGeometry = class SphereGeometry extends ParametricGeometry { + + constructor( size, u, v ) { + + function sphere( u, v, target ) { + + u *= Math.PI; + v *= 2 * Math.PI; + + const x = size * Math.sin( u ) * Math.cos( v ); + const y = size * Math.sin( u ) * Math.sin( v ); + const z = size * Math.cos( u ); + + target.set( x, y, z ); + + } + + super( sphere, u, v ); + + } + +}; + + +/********************************************* + * + * Parametric Replacement for PlaneGeometry + * + *********************************************/ + +ParametricGeometries.PlaneGeometry = class PlaneGeometry extends ParametricGeometry { + + constructor( width, depth, segmentsWidth, segmentsDepth ) { + + function plane( u, v, target ) { + + const x = u * width; + const y = 0; + const z = v * depth; + + target.set( x, y, z ); + + } + + super( plane, segmentsWidth, segmentsDepth ); + + } + +}; + +export { ParametricGeometries }; diff --git a/node_modules/three/examples/jsm/geometries/ParametricGeometry.js b/node_modules/three/examples/jsm/geometries/ParametricGeometry.js new file mode 100644 index 0000000..8f726b2 --- /dev/null +++ b/node_modules/three/examples/jsm/geometries/ParametricGeometry.js @@ -0,0 +1,139 @@ +/** + * Parametric Surfaces Geometry + * based on the brilliant article by @prideout https://prideout.net/blog/old/blog/index.html@p=44.html + */ + +import { + BufferGeometry, + Float32BufferAttribute, + Vector3 +} from 'three'; + +class ParametricGeometry extends BufferGeometry { + + constructor( func = ( u, v, target ) => target.set( u, v, Math.cos( u ) * Math.sin( v ) ), slices = 8, stacks = 8 ) { + + super(); + + this.type = 'ParametricGeometry'; + + this.parameters = { + func: func, + slices: slices, + stacks: stacks + }; + + // buffers + + const indices = []; + const vertices = []; + const normals = []; + const uvs = []; + + const EPS = 0.00001; + + const normal = new Vector3(); + + const p0 = new Vector3(), p1 = new Vector3(); + const pu = new Vector3(), pv = new Vector3(); + + // generate vertices, normals and uvs + + const sliceCount = slices + 1; + + for ( let i = 0; i <= stacks; i ++ ) { + + const v = i / stacks; + + for ( let j = 0; j <= slices; j ++ ) { + + const u = j / slices; + + // vertex + + func( u, v, p0 ); + vertices.push( p0.x, p0.y, p0.z ); + + // normal + + // approximate tangent vectors via finite differences + + if ( u - EPS >= 0 ) { + + func( u - EPS, v, p1 ); + pu.subVectors( p0, p1 ); + + } else { + + func( u + EPS, v, p1 ); + pu.subVectors( p1, p0 ); + + } + + if ( v - EPS >= 0 ) { + + func( u, v - EPS, p1 ); + pv.subVectors( p0, p1 ); + + } else { + + func( u, v + EPS, p1 ); + pv.subVectors( p1, p0 ); + + } + + // cross product of tangent vectors returns surface normal + + normal.crossVectors( pu, pv ).normalize(); + normals.push( normal.x, normal.y, normal.z ); + + // uv + + uvs.push( u, v ); + + } + + } + + // generate indices + + for ( let i = 0; i < stacks; i ++ ) { + + for ( let j = 0; j < slices; j ++ ) { + + const a = i * sliceCount + j; + const b = i * sliceCount + j + 1; + const c = ( i + 1 ) * sliceCount + j + 1; + const d = ( i + 1 ) * sliceCount + j; + + // faces one and two + + indices.push( a, b, d ); + indices.push( b, c, d ); + + } + + } + + // build geometry + + this.setIndex( indices ); + this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + } + + copy( source ) { + + super.copy( source ); + + this.parameters = Object.assign( {}, source.parameters ); + + return this; + + } + +} + +export { ParametricGeometry }; diff --git a/node_modules/three/examples/jsm/geometries/RoundedBoxGeometry.js b/node_modules/three/examples/jsm/geometries/RoundedBoxGeometry.js new file mode 100644 index 0000000..8baa168 --- /dev/null +++ b/node_modules/three/examples/jsm/geometries/RoundedBoxGeometry.js @@ -0,0 +1,155 @@ +import { + BoxGeometry, + Vector3 +} from 'three'; + +const _tempNormal = new Vector3(); + +function getUv( faceDirVector, normal, uvAxis, projectionAxis, radius, sideLength ) { + + const totArcLength = 2 * Math.PI * radius / 4; + + // length of the planes between the arcs on each axis + const centerLength = Math.max( sideLength - 2 * radius, 0 ); + const halfArc = Math.PI / 4; + + // Get the vector projected onto the Y plane + _tempNormal.copy( normal ); + _tempNormal[ projectionAxis ] = 0; + _tempNormal.normalize(); + + // total amount of UV space alloted to a single arc + const arcUvRatio = 0.5 * totArcLength / ( totArcLength + centerLength ); + + // the distance along one arc the point is at + const arcAngleRatio = 1.0 - ( _tempNormal.angleTo( faceDirVector ) / halfArc ); + + if ( Math.sign( _tempNormal[ uvAxis ] ) === 1 ) { + + return arcAngleRatio * arcUvRatio; + + } else { + + // total amount of UV space alloted to the plane between the arcs + const lenUv = centerLength / ( totArcLength + centerLength ); + return lenUv + arcUvRatio + arcUvRatio * ( 1.0 - arcAngleRatio ); + + } + +} + +class RoundedBoxGeometry extends BoxGeometry { + + constructor( width = 1, height = 1, depth = 1, segments = 2, radius = 0.1 ) { + + // ensure segments is odd so we have a plane connecting the rounded corners + segments = segments * 2 + 1; + + // ensure radius isn't bigger than shortest side + radius = Math.min( width / 2, height / 2, depth / 2, radius ); + + super( 1, 1, 1, segments, segments, segments ); + + // if we just have one segment we're the same as a regular box + if ( segments === 1 ) return; + + const geometry2 = this.toNonIndexed(); + + this.index = null; + this.attributes.position = geometry2.attributes.position; + this.attributes.normal = geometry2.attributes.normal; + this.attributes.uv = geometry2.attributes.uv; + + // + + const position = new Vector3(); + const normal = new Vector3(); + + const box = new Vector3( width, height, depth ).divideScalar( 2 ).subScalar( radius ); + + const positions = this.attributes.position.array; + const normals = this.attributes.normal.array; + const uvs = this.attributes.uv.array; + + const faceTris = positions.length / 6; + const faceDirVector = new Vector3(); + const halfSegmentSize = 0.5 / segments; + + for ( let i = 0, j = 0; i < positions.length; i += 3, j += 2 ) { + + position.fromArray( positions, i ); + normal.copy( position ); + normal.x -= Math.sign( normal.x ) * halfSegmentSize; + normal.y -= Math.sign( normal.y ) * halfSegmentSize; + normal.z -= Math.sign( normal.z ) * halfSegmentSize; + normal.normalize(); + + positions[ i + 0 ] = box.x * Math.sign( position.x ) + normal.x * radius; + positions[ i + 1 ] = box.y * Math.sign( position.y ) + normal.y * radius; + positions[ i + 2 ] = box.z * Math.sign( position.z ) + normal.z * radius; + + normals[ i + 0 ] = normal.x; + normals[ i + 1 ] = normal.y; + normals[ i + 2 ] = normal.z; + + const side = Math.floor( i / faceTris ); + + switch ( side ) { + + case 0: // right + + // generate UVs along Z then Y + faceDirVector.set( 1, 0, 0 ); + uvs[ j + 0 ] = getUv( faceDirVector, normal, 'z', 'y', radius, depth ); + uvs[ j + 1 ] = 1.0 - getUv( faceDirVector, normal, 'y', 'z', radius, height ); + break; + + case 1: // left + + // generate UVs along Z then Y + faceDirVector.set( - 1, 0, 0 ); + uvs[ j + 0 ] = 1.0 - getUv( faceDirVector, normal, 'z', 'y', radius, depth ); + uvs[ j + 1 ] = 1.0 - getUv( faceDirVector, normal, 'y', 'z', radius, height ); + break; + + case 2: // top + + // generate UVs along X then Z + faceDirVector.set( 0, 1, 0 ); + uvs[ j + 0 ] = 1.0 - getUv( faceDirVector, normal, 'x', 'z', radius, width ); + uvs[ j + 1 ] = getUv( faceDirVector, normal, 'z', 'x', radius, depth ); + break; + + case 3: // bottom + + // generate UVs along X then Z + faceDirVector.set( 0, - 1, 0 ); + uvs[ j + 0 ] = 1.0 - getUv( faceDirVector, normal, 'x', 'z', radius, width ); + uvs[ j + 1 ] = 1.0 - getUv( faceDirVector, normal, 'z', 'x', radius, depth ); + break; + + case 4: // front + + // generate UVs along X then Y + faceDirVector.set( 0, 0, 1 ); + uvs[ j + 0 ] = 1.0 - getUv( faceDirVector, normal, 'x', 'y', radius, width ); + uvs[ j + 1 ] = 1.0 - getUv( faceDirVector, normal, 'y', 'x', radius, height ); + break; + + case 5: // back + + // generate UVs along X then Y + faceDirVector.set( 0, 0, - 1 ); + uvs[ j + 0 ] = getUv( faceDirVector, normal, 'x', 'y', radius, width ); + uvs[ j + 1 ] = 1.0 - getUv( faceDirVector, normal, 'y', 'x', radius, height ); + break; + + } + + } + + } + +} + +export { RoundedBoxGeometry }; diff --git a/node_modules/three/examples/jsm/geometries/SDFGeometryGenerator.js b/node_modules/three/examples/jsm/geometries/SDFGeometryGenerator.js new file mode 100644 index 0000000..e80c9a3 --- /dev/null +++ b/node_modules/three/examples/jsm/geometries/SDFGeometryGenerator.js @@ -0,0 +1,144 @@ +/** + * @author santiago / @glitch_life + * wrapper of https://www.npmjs.com/package/isosurface by https://github.com/mikolalysenko + * + * Returns BufferGeometry from SDF + */ + +import { + BufferAttribute, + BufferGeometry, + FloatType, + Mesh, + OrthographicCamera, + PlaneGeometry, + Scene, + ShaderMaterial, + Vector2, + WebGLRenderTarget +} from 'three'; + +import { surfaceNet } from './../libs/surfaceNet.js'; + +class SDFGeometryGenerator { + + constructor( renderer ) { + + this.renderer = renderer; + + } + + generate( res = 64, distFunc = 'float dist( vec3 p ){ return length(p) - 0.5; }', bounds = 1 ) { + + let w, h; + if ( res == 8 ) [ w, h ] = [ 32, 16 ]; + else if ( res == 16 ) [ w, h ] = [ 64, 64 ]; + else if ( res == 32 ) [ w, h ] = [ 256, 128 ]; + else if ( res == 64 ) [ w, h ] = [ 512, 512 ]; + else if ( res == 128 ) [ w, h ] = [ 2048, 1024 ]; + else if ( res == 256 ) [ w, h ] = [ 4096, 4096 ]; + else if ( res == 512 ) [ w, h ] = [ 16384, 8096 ]; + else if ( res == 1024 ) [ w, h ] = [ 32768, 32768 ]; + else throw new Error( 'THREE.SDFGeometryGenerator: Resolution must be in range 8 < res < 1024 and must be ^2' ); + + const maxTexSize = this.renderer.capabilities.maxTextureSize; + + if ( w > maxTexSize || h > maxTexSize ) throw new Error( 'THREE.SDFGeometryGenerator: Your device does not support this resolution ( ' + res + ' ), decrease [res] param.' ); + + const [ tilesX, tilesY ] = [ ( w / res ), ( h / res ) ]; + + const sdfCompute = ` + varying vec2 vUv; + uniform float tileNum; + uniform float bounds; + [#dist#] + void main() { gl_FragColor=vec4( ( dist( vec3( vUv, tileNum ) * 2.0 * bounds - vec3( bounds ) ) < 0.00001 ) ? 1.0 : 0.0 ); } + `; + + const sdfRT = this.computeSDF( w, h, tilesX, tilesY, bounds, sdfCompute.replace( '[#dist#]', distFunc ) ); + + const read = new Float32Array( w * h * 4 ); + this.renderer.readRenderTargetPixels( sdfRT, 0, 0, w, h, read ); + sdfRT.dispose(); + + // + + const mesh = surfaceNet( [ res, res, res ], ( x, y, z ) => { + + x = ( x + bounds ) * ( res / ( bounds * 2 ) ); + y = ( y + bounds ) * ( res / ( bounds * 2 ) ); + z = ( z + bounds ) * ( res / ( bounds * 2 ) ); + let p = ( x + ( z % tilesX ) * res ) + y * w + ( Math.floor( z / tilesX ) * res * w ); + p *= 4; + return ( read[ p + 3 ] > 0 ) ? - 0.000000001 : 1; + + }, [[ - bounds, - bounds, - bounds ], [ bounds, bounds, bounds ]] ); + + const ps = [], ids = []; + const geometry = new BufferGeometry(); + mesh.positions.forEach( p => { + + ps.push( p[ 0 ], p[ 1 ], p[ 2 ] ); + + } ); + mesh.cells.forEach( p => ids.push( p[ 0 ], p[ 1 ], p[ 2 ] ) ); + geometry.setAttribute( 'position', new BufferAttribute( new Float32Array( ps ), 3 ) ); + geometry.setIndex( ids ); + + return geometry; + + } + + computeSDF( width, height, tilesX, tilesY, bounds, shader ) { + + const rt = new WebGLRenderTarget( width, height, { type: FloatType } ); + const scn = new Scene(); + const cam = new OrthographicCamera(); + const tiles = tilesX * tilesY; + let currentTile = 0; + + Object.assign( cam, { left: width / - 2, right: width / 2, top: height / 2, bottom: height / - 2 } ).updateProjectionMatrix(); + cam.position.z = 2; + + const tileSize = width / tilesX; + const geometry = new PlaneGeometry( tileSize, tileSize ); + + while ( currentTile ++ < tiles ) { + + const c = currentTile - 1; + const [ px, py ] = [ ( tileSize ) / 2 + ( c % tilesX ) * ( tileSize ) - width / 2, ( tileSize ) / 2 + Math.floor( c / tilesX ) * ( tileSize ) - height / 2 ]; + const compPlane = new Mesh( geometry, new ShaderMaterial( { + uniforms: { + res: { value: new Vector2( width, height ) }, + tileNum: { value: c / ( tilesX * tilesY - 1 ) }, + bounds: { value: bounds } + }, + vertexShader: 'varying vec2 vUv;void main(){vUv=uv;gl_Position=projectionMatrix*modelViewMatrix*vec4(position,1.0);}', + fragmentShader: shader + } ) ); + compPlane.position.set( px, py, 0 ); + scn.add( compPlane ); + + } + + this.renderer.setRenderTarget( rt ); + this.renderer.render( scn, cam ); + this.renderer.setRenderTarget( null ); + + // + + geometry.dispose(); + + scn.traverse( function ( object ) { + + if ( object.material !== undefined ) object.material.dispose(); + + } ); + + return rt; + + } + +} + +export { SDFGeometryGenerator }; diff --git a/node_modules/three/examples/jsm/geometries/TeapotGeometry.js b/node_modules/three/examples/jsm/geometries/TeapotGeometry.js new file mode 100644 index 0000000..b6b5ff1 --- /dev/null +++ b/node_modules/three/examples/jsm/geometries/TeapotGeometry.js @@ -0,0 +1,704 @@ +import { + BufferAttribute, + BufferGeometry, + Matrix4, + Vector3, + Vector4 +} from 'three'; + +/** + * Tessellates the famous Utah teapot database by Martin Newell into triangles. + * + * Parameters: size = 50, segments = 10, bottom = true, lid = true, body = true, + * fitLid = false, blinn = true + * + * size is a relative scale: I've scaled the teapot to fit vertically between -1 and 1. + * Think of it as a "radius". + * segments - number of line segments to subdivide each patch edge; + * 1 is possible but gives degenerates, so two is the real minimum. + * bottom - boolean, if true (default) then the bottom patches are added. Some consider + * adding the bottom heresy, so set this to "false" to adhere to the One True Way. + * lid - to remove the lid and look inside, set to true. + * body - to remove the body and leave the lid, set this and "bottom" to false. + * fitLid - the lid is a tad small in the original. This stretches it a bit so you can't + * see the teapot's insides through the gap. + * blinn - Jim Blinn scaled the original data vertically by dividing by about 1.3 to look + * nicer. If you want to see the original teapot, similar to the real-world model, set + * this to false. True by default. + * See http://en.wikipedia.org/wiki/File:Original_Utah_Teapot.jpg for the original + * real-world teapot (from http://en.wikipedia.org/wiki/Utah_teapot). + * + * Note that the bottom (the last four patches) is not flat - blame Frank Crow, not me. + * + * The teapot should normally be rendered as a double sided object, since for some + * patches both sides can be seen, e.g., the gap around the lid and inside the spout. + * + * Segments 'n' determines the number of triangles output. + * Total triangles = 32*2*n*n - 8*n [degenerates at the top and bottom cusps are deleted] + * + * size_factor # triangles + * 1 56 + * 2 240 + * 3 552 + * 4 992 + * + * 10 6320 + * 20 25440 + * 30 57360 + * + * Code converted from my ancient SPD software, http://tog.acm.org/resources/SPD/ + * Created for the Udacity course "Interactive Rendering", http://bit.ly/ericity + * YouTube video on teapot history: https://www.youtube.com/watch?v=DxMfblPzFNc + * + * See https://en.wikipedia.org/wiki/Utah_teapot for the history of the teapot + * + */ + +class TeapotGeometry extends BufferGeometry { + + constructor( size = 50, segments = 10, bottom = true, lid = true, body = true, fitLid = true, blinn = true ) { + + // 32 * 4 * 4 Bezier spline patches + const teapotPatches = [ + /*rim*/ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 3, 16, 17, 18, 7, 19, 20, 21, 11, 22, 23, 24, 15, 25, 26, 27, + 18, 28, 29, 30, 21, 31, 32, 33, 24, 34, 35, 36, 27, 37, 38, 39, + 30, 40, 41, 0, 33, 42, 43, 4, 36, 44, 45, 8, 39, 46, 47, 12, + /*body*/ + 12, 13, 14, 15, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 15, 25, 26, 27, 51, 60, 61, 62, 55, 63, 64, 65, 59, 66, 67, 68, + 27, 37, 38, 39, 62, 69, 70, 71, 65, 72, 73, 74, 68, 75, 76, 77, + 39, 46, 47, 12, 71, 78, 79, 48, 74, 80, 81, 52, 77, 82, 83, 56, + 56, 57, 58, 59, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 59, 66, 67, 68, 87, 96, 97, 98, 91, 99, 100, 101, 95, 102, 103, 104, + 68, 75, 76, 77, 98, 105, 106, 107, 101, 108, 109, 110, 104, 111, 112, 113, + 77, 82, 83, 56, 107, 114, 115, 84, 110, 116, 117, 88, 113, 118, 119, 92, + /*handle*/ + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 123, 136, 137, 120, 127, 138, 139, 124, 131, 140, 141, 128, 135, 142, 143, 132, + 132, 133, 134, 135, 144, 145, 146, 147, 148, 149, 150, 151, 68, 152, 153, 154, + 135, 142, 143, 132, 147, 155, 156, 144, 151, 157, 158, 148, 154, 159, 160, 68, + /*spout*/ + 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 164, 177, 178, 161, 168, 179, 180, 165, 172, 181, 182, 169, 176, 183, 184, 173, + 173, 174, 175, 176, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 176, 183, 184, 173, 188, 197, 198, 185, 192, 199, 200, 189, 196, 201, 202, 193, + /*lid*/ + 203, 203, 203, 203, 204, 205, 206, 207, 208, 208, 208, 208, 209, 210, 211, 212, + 203, 203, 203, 203, 207, 213, 214, 215, 208, 208, 208, 208, 212, 216, 217, 218, + 203, 203, 203, 203, 215, 219, 220, 221, 208, 208, 208, 208, 218, 222, 223, 224, + 203, 203, 203, 203, 221, 225, 226, 204, 208, 208, 208, 208, 224, 227, 228, 209, + 209, 210, 211, 212, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, + 212, 216, 217, 218, 232, 241, 242, 243, 236, 244, 245, 246, 240, 247, 248, 249, + 218, 222, 223, 224, 243, 250, 251, 252, 246, 253, 254, 255, 249, 256, 257, 258, + 224, 227, 228, 209, 252, 259, 260, 229, 255, 261, 262, 233, 258, 263, 264, 237, + /*bottom*/ + 265, 265, 265, 265, 266, 267, 268, 269, 270, 271, 272, 273, 92, 119, 118, 113, + 265, 265, 265, 265, 269, 274, 275, 276, 273, 277, 278, 279, 113, 112, 111, 104, + 265, 265, 265, 265, 276, 280, 281, 282, 279, 283, 284, 285, 104, 103, 102, 95, + 265, 265, 265, 265, 282, 286, 287, 266, 285, 288, 289, 270, 95, 94, 93, 92 + ]; + + const teapotVertices = [ + 1.4, 0, 2.4, + 1.4, - 0.784, 2.4, + 0.784, - 1.4, 2.4, + 0, - 1.4, 2.4, + 1.3375, 0, 2.53125, + 1.3375, - 0.749, 2.53125, + 0.749, - 1.3375, 2.53125, + 0, - 1.3375, 2.53125, + 1.4375, 0, 2.53125, + 1.4375, - 0.805, 2.53125, + 0.805, - 1.4375, 2.53125, + 0, - 1.4375, 2.53125, + 1.5, 0, 2.4, + 1.5, - 0.84, 2.4, + 0.84, - 1.5, 2.4, + 0, - 1.5, 2.4, + - 0.784, - 1.4, 2.4, + - 1.4, - 0.784, 2.4, + - 1.4, 0, 2.4, + - 0.749, - 1.3375, 2.53125, + - 1.3375, - 0.749, 2.53125, + - 1.3375, 0, 2.53125, + - 0.805, - 1.4375, 2.53125, + - 1.4375, - 0.805, 2.53125, + - 1.4375, 0, 2.53125, + - 0.84, - 1.5, 2.4, + - 1.5, - 0.84, 2.4, + - 1.5, 0, 2.4, + - 1.4, 0.784, 2.4, + - 0.784, 1.4, 2.4, + 0, 1.4, 2.4, + - 1.3375, 0.749, 2.53125, + - 0.749, 1.3375, 2.53125, + 0, 1.3375, 2.53125, + - 1.4375, 0.805, 2.53125, + - 0.805, 1.4375, 2.53125, + 0, 1.4375, 2.53125, + - 1.5, 0.84, 2.4, + - 0.84, 1.5, 2.4, + 0, 1.5, 2.4, + 0.784, 1.4, 2.4, + 1.4, 0.784, 2.4, + 0.749, 1.3375, 2.53125, + 1.3375, 0.749, 2.53125, + 0.805, 1.4375, 2.53125, + 1.4375, 0.805, 2.53125, + 0.84, 1.5, 2.4, + 1.5, 0.84, 2.4, + 1.75, 0, 1.875, + 1.75, - 0.98, 1.875, + 0.98, - 1.75, 1.875, + 0, - 1.75, 1.875, + 2, 0, 1.35, + 2, - 1.12, 1.35, + 1.12, - 2, 1.35, + 0, - 2, 1.35, + 2, 0, 0.9, + 2, - 1.12, 0.9, + 1.12, - 2, 0.9, + 0, - 2, 0.9, + - 0.98, - 1.75, 1.875, + - 1.75, - 0.98, 1.875, + - 1.75, 0, 1.875, + - 1.12, - 2, 1.35, + - 2, - 1.12, 1.35, + - 2, 0, 1.35, + - 1.12, - 2, 0.9, + - 2, - 1.12, 0.9, + - 2, 0, 0.9, + - 1.75, 0.98, 1.875, + - 0.98, 1.75, 1.875, + 0, 1.75, 1.875, + - 2, 1.12, 1.35, + - 1.12, 2, 1.35, + 0, 2, 1.35, + - 2, 1.12, 0.9, + - 1.12, 2, 0.9, + 0, 2, 0.9, + 0.98, 1.75, 1.875, + 1.75, 0.98, 1.875, + 1.12, 2, 1.35, + 2, 1.12, 1.35, + 1.12, 2, 0.9, + 2, 1.12, 0.9, + 2, 0, 0.45, + 2, - 1.12, 0.45, + 1.12, - 2, 0.45, + 0, - 2, 0.45, + 1.5, 0, 0.225, + 1.5, - 0.84, 0.225, + 0.84, - 1.5, 0.225, + 0, - 1.5, 0.225, + 1.5, 0, 0.15, + 1.5, - 0.84, 0.15, + 0.84, - 1.5, 0.15, + 0, - 1.5, 0.15, + - 1.12, - 2, 0.45, + - 2, - 1.12, 0.45, + - 2, 0, 0.45, + - 0.84, - 1.5, 0.225, + - 1.5, - 0.84, 0.225, + - 1.5, 0, 0.225, + - 0.84, - 1.5, 0.15, + - 1.5, - 0.84, 0.15, + - 1.5, 0, 0.15, + - 2, 1.12, 0.45, + - 1.12, 2, 0.45, + 0, 2, 0.45, + - 1.5, 0.84, 0.225, + - 0.84, 1.5, 0.225, + 0, 1.5, 0.225, + - 1.5, 0.84, 0.15, + - 0.84, 1.5, 0.15, + 0, 1.5, 0.15, + 1.12, 2, 0.45, + 2, 1.12, 0.45, + 0.84, 1.5, 0.225, + 1.5, 0.84, 0.225, + 0.84, 1.5, 0.15, + 1.5, 0.84, 0.15, + - 1.6, 0, 2.025, + - 1.6, - 0.3, 2.025, + - 1.5, - 0.3, 2.25, + - 1.5, 0, 2.25, + - 2.3, 0, 2.025, + - 2.3, - 0.3, 2.025, + - 2.5, - 0.3, 2.25, + - 2.5, 0, 2.25, + - 2.7, 0, 2.025, + - 2.7, - 0.3, 2.025, + - 3, - 0.3, 2.25, + - 3, 0, 2.25, + - 2.7, 0, 1.8, + - 2.7, - 0.3, 1.8, + - 3, - 0.3, 1.8, + - 3, 0, 1.8, + - 1.5, 0.3, 2.25, + - 1.6, 0.3, 2.025, + - 2.5, 0.3, 2.25, + - 2.3, 0.3, 2.025, + - 3, 0.3, 2.25, + - 2.7, 0.3, 2.025, + - 3, 0.3, 1.8, + - 2.7, 0.3, 1.8, + - 2.7, 0, 1.575, + - 2.7, - 0.3, 1.575, + - 3, - 0.3, 1.35, + - 3, 0, 1.35, + - 2.5, 0, 1.125, + - 2.5, - 0.3, 1.125, + - 2.65, - 0.3, 0.9375, + - 2.65, 0, 0.9375, + - 2, - 0.3, 0.9, + - 1.9, - 0.3, 0.6, + - 1.9, 0, 0.6, + - 3, 0.3, 1.35, + - 2.7, 0.3, 1.575, + - 2.65, 0.3, 0.9375, + - 2.5, 0.3, 1.125, + - 1.9, 0.3, 0.6, + - 2, 0.3, 0.9, + 1.7, 0, 1.425, + 1.7, - 0.66, 1.425, + 1.7, - 0.66, 0.6, + 1.7, 0, 0.6, + 2.6, 0, 1.425, + 2.6, - 0.66, 1.425, + 3.1, - 0.66, 0.825, + 3.1, 0, 0.825, + 2.3, 0, 2.1, + 2.3, - 0.25, 2.1, + 2.4, - 0.25, 2.025, + 2.4, 0, 2.025, + 2.7, 0, 2.4, + 2.7, - 0.25, 2.4, + 3.3, - 0.25, 2.4, + 3.3, 0, 2.4, + 1.7, 0.66, 0.6, + 1.7, 0.66, 1.425, + 3.1, 0.66, 0.825, + 2.6, 0.66, 1.425, + 2.4, 0.25, 2.025, + 2.3, 0.25, 2.1, + 3.3, 0.25, 2.4, + 2.7, 0.25, 2.4, + 2.8, 0, 2.475, + 2.8, - 0.25, 2.475, + 3.525, - 0.25, 2.49375, + 3.525, 0, 2.49375, + 2.9, 0, 2.475, + 2.9, - 0.15, 2.475, + 3.45, - 0.15, 2.5125, + 3.45, 0, 2.5125, + 2.8, 0, 2.4, + 2.8, - 0.15, 2.4, + 3.2, - 0.15, 2.4, + 3.2, 0, 2.4, + 3.525, 0.25, 2.49375, + 2.8, 0.25, 2.475, + 3.45, 0.15, 2.5125, + 2.9, 0.15, 2.475, + 3.2, 0.15, 2.4, + 2.8, 0.15, 2.4, + 0, 0, 3.15, + 0.8, 0, 3.15, + 0.8, - 0.45, 3.15, + 0.45, - 0.8, 3.15, + 0, - 0.8, 3.15, + 0, 0, 2.85, + 0.2, 0, 2.7, + 0.2, - 0.112, 2.7, + 0.112, - 0.2, 2.7, + 0, - 0.2, 2.7, + - 0.45, - 0.8, 3.15, + - 0.8, - 0.45, 3.15, + - 0.8, 0, 3.15, + - 0.112, - 0.2, 2.7, + - 0.2, - 0.112, 2.7, + - 0.2, 0, 2.7, + - 0.8, 0.45, 3.15, + - 0.45, 0.8, 3.15, + 0, 0.8, 3.15, + - 0.2, 0.112, 2.7, + - 0.112, 0.2, 2.7, + 0, 0.2, 2.7, + 0.45, 0.8, 3.15, + 0.8, 0.45, 3.15, + 0.112, 0.2, 2.7, + 0.2, 0.112, 2.7, + 0.4, 0, 2.55, + 0.4, - 0.224, 2.55, + 0.224, - 0.4, 2.55, + 0, - 0.4, 2.55, + 1.3, 0, 2.55, + 1.3, - 0.728, 2.55, + 0.728, - 1.3, 2.55, + 0, - 1.3, 2.55, + 1.3, 0, 2.4, + 1.3, - 0.728, 2.4, + 0.728, - 1.3, 2.4, + 0, - 1.3, 2.4, + - 0.224, - 0.4, 2.55, + - 0.4, - 0.224, 2.55, + - 0.4, 0, 2.55, + - 0.728, - 1.3, 2.55, + - 1.3, - 0.728, 2.55, + - 1.3, 0, 2.55, + - 0.728, - 1.3, 2.4, + - 1.3, - 0.728, 2.4, + - 1.3, 0, 2.4, + - 0.4, 0.224, 2.55, + - 0.224, 0.4, 2.55, + 0, 0.4, 2.55, + - 1.3, 0.728, 2.55, + - 0.728, 1.3, 2.55, + 0, 1.3, 2.55, + - 1.3, 0.728, 2.4, + - 0.728, 1.3, 2.4, + 0, 1.3, 2.4, + 0.224, 0.4, 2.55, + 0.4, 0.224, 2.55, + 0.728, 1.3, 2.55, + 1.3, 0.728, 2.55, + 0.728, 1.3, 2.4, + 1.3, 0.728, 2.4, + 0, 0, 0, + 1.425, 0, 0, + 1.425, 0.798, 0, + 0.798, 1.425, 0, + 0, 1.425, 0, + 1.5, 0, 0.075, + 1.5, 0.84, 0.075, + 0.84, 1.5, 0.075, + 0, 1.5, 0.075, + - 0.798, 1.425, 0, + - 1.425, 0.798, 0, + - 1.425, 0, 0, + - 0.84, 1.5, 0.075, + - 1.5, 0.84, 0.075, + - 1.5, 0, 0.075, + - 1.425, - 0.798, 0, + - 0.798, - 1.425, 0, + 0, - 1.425, 0, + - 1.5, - 0.84, 0.075, + - 0.84, - 1.5, 0.075, + 0, - 1.5, 0.075, + 0.798, - 1.425, 0, + 1.425, - 0.798, 0, + 0.84, - 1.5, 0.075, + 1.5, - 0.84, 0.075 + ]; + + super(); + + // number of segments per patch + segments = Math.max( 2, Math.floor( segments ) ); + + // Jim Blinn scaled the teapot down in size by about 1.3 for + // some rendering tests. He liked the new proportions that he kept + // the data in this form. The model was distributed with these new + // proportions and became the norm. Trivia: comparing images of the + // real teapot and the computer model, the ratio for the bowl of the + // real teapot is more like 1.25, but since 1.3 is the traditional + // value given, we use it here. + const blinnScale = 1.3; + + // scale the size to be the real scaling factor + const maxHeight = 3.15 * ( blinn ? 1 : blinnScale ); + + const maxHeight2 = maxHeight / 2; + const trueSize = size / maxHeight2; + + // Number of elements depends on what is needed. Subtract degenerate + // triangles at tip of bottom and lid out in advance. + let numTriangles = bottom ? ( 8 * segments - 4 ) * segments : 0; + numTriangles += lid ? ( 16 * segments - 4 ) * segments : 0; + numTriangles += body ? 40 * segments * segments : 0; + + const indices = new Uint32Array( numTriangles * 3 ); + + let numVertices = bottom ? 4 : 0; + numVertices += lid ? 8 : 0; + numVertices += body ? 20 : 0; + numVertices *= ( segments + 1 ) * ( segments + 1 ); + + const vertices = new Float32Array( numVertices * 3 ); + const normals = new Float32Array( numVertices * 3 ); + const uvs = new Float32Array( numVertices * 2 ); + + // Bezier form + const ms = new Matrix4(); + ms.set( + - 1.0, 3.0, - 3.0, 1.0, + 3.0, - 6.0, 3.0, 0.0, + - 3.0, 3.0, 0.0, 0.0, + 1.0, 0.0, 0.0, 0.0 ); + + const g = []; + + const sp = []; + const tp = []; + const dsp = []; + const dtp = []; + + // M * G * M matrix, sort of see + // http://www.cs.helsinki.fi/group/goa/mallinnus/curves/surfaces.html + const mgm = []; + + const vert = []; + const sdir = []; + const tdir = []; + + const norm = new Vector3(); + + let tcoord; + + let sval; + let tval; + let p; + let dsval = 0; + let dtval = 0; + + const normOut = new Vector3(); + + const gmx = new Matrix4(); + const tmtx = new Matrix4(); + + const vsp = new Vector4(); + const vtp = new Vector4(); + const vdsp = new Vector4(); + const vdtp = new Vector4(); + + const vsdir = new Vector3(); + const vtdir = new Vector3(); + + const mst = ms.clone(); + mst.transpose(); + + // internal function: test if triangle has any matching vertices; + // if so, don't save triangle, since it won't display anything. + const notDegenerate = ( vtx1, vtx2, vtx3 ) => // if any vertex matches, return false + ! ( ( ( vertices[ vtx1 * 3 ] === vertices[ vtx2 * 3 ] ) && + ( vertices[ vtx1 * 3 + 1 ] === vertices[ vtx2 * 3 + 1 ] ) && + ( vertices[ vtx1 * 3 + 2 ] === vertices[ vtx2 * 3 + 2 ] ) ) || + ( ( vertices[ vtx1 * 3 ] === vertices[ vtx3 * 3 ] ) && + ( vertices[ vtx1 * 3 + 1 ] === vertices[ vtx3 * 3 + 1 ] ) && + ( vertices[ vtx1 * 3 + 2 ] === vertices[ vtx3 * 3 + 2 ] ) ) || ( vertices[ vtx2 * 3 ] === vertices[ vtx3 * 3 ] ) && + ( vertices[ vtx2 * 3 + 1 ] === vertices[ vtx3 * 3 + 1 ] ) && + ( vertices[ vtx2 * 3 + 2 ] === vertices[ vtx3 * 3 + 2 ] ) ); + + + for ( let i = 0; i < 3; i ++ ) { + + mgm[ i ] = new Matrix4(); + + } + + const minPatches = body ? 0 : 20; + const maxPatches = bottom ? 32 : 28; + + const vertPerRow = segments + 1; + + let surfCount = 0; + + let vertCount = 0; + let normCount = 0; + let uvCount = 0; + + let indexCount = 0; + + for ( let surf = minPatches; surf < maxPatches; surf ++ ) { + + // lid is in the middle of the data, patches 20-27, + // so ignore it for this part of the loop if the lid is not desired + if ( lid || ( surf < 20 || surf >= 28 ) ) { + + // get M * G * M matrix for x,y,z + for ( let i = 0; i < 3; i ++ ) { + + // get control patches + for ( let r = 0; r < 4; r ++ ) { + + for ( let c = 0; c < 4; c ++ ) { + + // transposed + g[ c * 4 + r ] = teapotVertices[ teapotPatches[ surf * 16 + r * 4 + c ] * 3 + i ]; + + // is the lid to be made larger, and is this a point on the lid + // that is X or Y? + if ( fitLid && ( surf >= 20 && surf < 28 ) && ( i !== 2 ) ) { + + // increase XY size by 7.7%, found empirically. I don't + // increase Z so that the teapot will continue to fit in the + // space -1 to 1 for Y (Y is up for the final model). + g[ c * 4 + r ] *= 1.077; + + } + + // Blinn "fixed" the teapot by dividing Z by blinnScale, and that's the + // data we now use. The original teapot is taller. Fix it: + if ( ! blinn && ( i === 2 ) ) { + + g[ c * 4 + r ] *= blinnScale; + + } + + } + + } + + gmx.set( g[ 0 ], g[ 1 ], g[ 2 ], g[ 3 ], g[ 4 ], g[ 5 ], g[ 6 ], g[ 7 ], g[ 8 ], g[ 9 ], g[ 10 ], g[ 11 ], g[ 12 ], g[ 13 ], g[ 14 ], g[ 15 ] ); + + tmtx.multiplyMatrices( gmx, ms ); + mgm[ i ].multiplyMatrices( mst, tmtx ); + + } + + // step along, get points, and output + for ( let sstep = 0; sstep <= segments; sstep ++ ) { + + const s = sstep / segments; + + for ( let tstep = 0; tstep <= segments; tstep ++ ) { + + const t = tstep / segments; + + // point from basis + // get power vectors and their derivatives + for ( p = 4, sval = tval = 1.0; p --; ) { + + sp[ p ] = sval; + tp[ p ] = tval; + sval *= s; + tval *= t; + + if ( p === 3 ) { + + dsp[ p ] = dtp[ p ] = 0.0; + dsval = dtval = 1.0; + + } else { + + dsp[ p ] = dsval * ( 3 - p ); + dtp[ p ] = dtval * ( 3 - p ); + dsval *= s; + dtval *= t; + + } + + } + + vsp.fromArray( sp ); + vtp.fromArray( tp ); + vdsp.fromArray( dsp ); + vdtp.fromArray( dtp ); + + // do for x,y,z + for ( let i = 0; i < 3; i ++ ) { + + // multiply power vectors times matrix to get value + tcoord = vsp.clone(); + tcoord.applyMatrix4( mgm[ i ] ); + vert[ i ] = tcoord.dot( vtp ); + + // get s and t tangent vectors + tcoord = vdsp.clone(); + tcoord.applyMatrix4( mgm[ i ] ); + sdir[ i ] = tcoord.dot( vtp ); + + tcoord = vsp.clone(); + tcoord.applyMatrix4( mgm[ i ] ); + tdir[ i ] = tcoord.dot( vdtp ); + + } + + // find normal + vsdir.fromArray( sdir ); + vtdir.fromArray( tdir ); + norm.crossVectors( vtdir, vsdir ); + norm.normalize(); + + // if X and Z length is 0, at the cusp, so point the normal up or down, depending on patch number + if ( vert[ 0 ] === 0 && vert[ 1 ] === 0 ) { + + // if above the middle of the teapot, normal points up, else down + normOut.set( 0, vert[ 2 ] > maxHeight2 ? 1 : - 1, 0 ); + + } else { + + // standard output: rotate on X axis + normOut.set( norm.x, norm.z, - norm.y ); + + } + + // store it all + vertices[ vertCount ++ ] = trueSize * vert[ 0 ]; + vertices[ vertCount ++ ] = trueSize * ( vert[ 2 ] - maxHeight2 ); + vertices[ vertCount ++ ] = - trueSize * vert[ 1 ]; + + normals[ normCount ++ ] = normOut.x; + normals[ normCount ++ ] = normOut.y; + normals[ normCount ++ ] = normOut.z; + + uvs[ uvCount ++ ] = 1 - t; + uvs[ uvCount ++ ] = 1 - s; + + } + + } + + // save the faces + for ( let sstep = 0; sstep < segments; sstep ++ ) { + + for ( let tstep = 0; tstep < segments; tstep ++ ) { + + const v1 = surfCount * vertPerRow * vertPerRow + sstep * vertPerRow + tstep; + const v2 = v1 + 1; + const v3 = v2 + vertPerRow; + const v4 = v1 + vertPerRow; + + // Normals and UVs cannot be shared. Without clone(), you can see the consequences + // of sharing if you call geometry.applyMatrix4( matrix ). + if ( notDegenerate( v1, v2, v3 ) ) { + + indices[ indexCount ++ ] = v1; + indices[ indexCount ++ ] = v2; + indices[ indexCount ++ ] = v3; + + } + + if ( notDegenerate( v1, v3, v4 ) ) { + + indices[ indexCount ++ ] = v1; + indices[ indexCount ++ ] = v3; + indices[ indexCount ++ ] = v4; + + } + + } + + } + + // increment only if a surface was used + surfCount ++; + + } + + } + + this.setIndex( new BufferAttribute( indices, 1 ) ); + this.setAttribute( 'position', new BufferAttribute( vertices, 3 ) ); + this.setAttribute( 'normal', new BufferAttribute( normals, 3 ) ); + this.setAttribute( 'uv', new BufferAttribute( uvs, 2 ) ); + + this.computeBoundingSphere(); + + } + +} + +export { TeapotGeometry }; diff --git a/node_modules/three/examples/jsm/geometries/TextGeometry.js b/node_modules/three/examples/jsm/geometries/TextGeometry.js new file mode 100644 index 0000000..9eefd8d --- /dev/null +++ b/node_modules/three/examples/jsm/geometries/TextGeometry.js @@ -0,0 +1,65 @@ +/** + * Text = 3D Text + * + * parameters = { + * font: , // font + * + * size: , // size of the text + * depth: , // thickness to extrude text + * curveSegments: , // number of points on the curves + * + * bevelEnabled: , // turn on bevel + * bevelThickness: , // how deep into text bevel goes + * bevelSize: , // how far from text outline (including bevelOffset) is bevel + * bevelOffset: // how far from text outline does bevel start + * } + */ + +import { + ExtrudeGeometry +} from 'three'; + +class TextGeometry extends ExtrudeGeometry { + + constructor( text, parameters = {} ) { + + const font = parameters.font; + + if ( font === undefined ) { + + super(); // generate default extrude geometry + + } else { + + const shapes = font.generateShapes( text, parameters.size ); + + // translate parameters to ExtrudeGeometry API + + if ( parameters.depth === undefined && parameters.height !== undefined ) { + + console.warn( 'THREE.TextGeometry: .height is now depreciated. Please use .depth instead' ); // @deprecated, r163 + + } + + parameters.depth = parameters.depth !== undefined ? + parameters.depth : parameters.height !== undefined ? + parameters.height : 50; + + // defaults + + if ( parameters.bevelThickness === undefined ) parameters.bevelThickness = 10; + if ( parameters.bevelSize === undefined ) parameters.bevelSize = 8; + if ( parameters.bevelEnabled === undefined ) parameters.bevelEnabled = false; + + super( shapes, parameters ); + + } + + this.type = 'TextGeometry'; + + } + +} + + +export { TextGeometry }; diff --git a/node_modules/three/examples/jsm/helpers/LightProbeHelper.js b/node_modules/three/examples/jsm/helpers/LightProbeHelper.js new file mode 100644 index 0000000..8120488 --- /dev/null +++ b/node_modules/three/examples/jsm/helpers/LightProbeHelper.js @@ -0,0 +1,130 @@ +import { + Mesh, + ShaderMaterial, + SphereGeometry +} from 'three'; + +class LightProbeHelper extends Mesh { + + constructor( lightProbe, size ) { + + const material = new ShaderMaterial( { + + type: 'LightProbeHelperMaterial', + + uniforms: { + + sh: { value: lightProbe.sh.coefficients }, // by reference + + intensity: { value: lightProbe.intensity } + + }, + + vertexShader: [ + + 'varying vec3 vNormal;', + + 'void main() {', + + ' vNormal = normalize( normalMatrix * normal );', + + ' gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );', + + '}', + + ].join( '\n' ), + + fragmentShader: [ + + '#define RECIPROCAL_PI 0.318309886', + + 'vec3 inverseTransformDirection( in vec3 normal, in mat4 matrix ) {', + + ' // matrix is assumed to be orthogonal', + + ' return normalize( ( vec4( normal, 0.0 ) * matrix ).xyz );', + + '}', + + '// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf', + 'vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {', + + ' // normal is assumed to have unit length', + + ' float x = normal.x, y = normal.y, z = normal.z;', + + ' // band 0', + ' vec3 result = shCoefficients[ 0 ] * 0.886227;', + + ' // band 1', + ' result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;', + ' result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;', + ' result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;', + + ' // band 2', + ' result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;', + ' result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;', + ' result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );', + ' result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;', + ' result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );', + + ' return result;', + + '}', + + 'uniform vec3 sh[ 9 ]; // sh coefficients', + + 'uniform float intensity; // light probe intensity', + + 'varying vec3 vNormal;', + + 'void main() {', + + ' vec3 normal = normalize( vNormal );', + + ' vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );', + + ' vec3 irradiance = shGetIrradianceAt( worldNormal, sh );', + + ' vec3 outgoingLight = RECIPROCAL_PI * irradiance * intensity;', + + ' gl_FragColor = linearToOutputTexel( vec4( outgoingLight, 1.0 ) );', + + '}' + + ].join( '\n' ) + + } ); + + const geometry = new SphereGeometry( 1, 32, 16 ); + + super( geometry, material ); + + this.lightProbe = lightProbe; + this.size = size; + this.type = 'LightProbeHelper'; + + this.onBeforeRender(); + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + + onBeforeRender() { + + this.position.copy( this.lightProbe.position ); + + this.scale.set( 1, 1, 1 ).multiplyScalar( this.size ); + + this.material.uniforms.intensity.value = this.lightProbe.intensity; + + } + +} + +export { LightProbeHelper }; diff --git a/node_modules/three/examples/jsm/helpers/OctreeHelper.js b/node_modules/three/examples/jsm/helpers/OctreeHelper.js new file mode 100644 index 0000000..972942c --- /dev/null +++ b/node_modules/three/examples/jsm/helpers/OctreeHelper.js @@ -0,0 +1,73 @@ +import { + LineSegments, + BufferGeometry, + Float32BufferAttribute, + LineBasicMaterial +} from 'three'; + +class OctreeHelper extends LineSegments { + + constructor( octree, color = 0xffff00 ) { + + super( new BufferGeometry(), new LineBasicMaterial( { color: color, toneMapped: false } ) ); + + this.octree = octree; + this.color = color; + + this.type = 'OctreeHelper'; + + this.update(); + + } + + update() { + + const vertices = []; + + function traverse( tree ) { + + for ( let i = 0; i < tree.length; i ++ ) { + + const min = tree[ i ].box.min; + const max = tree[ i ].box.max; + + vertices.push( max.x, max.y, max.z ); vertices.push( min.x, max.y, max.z ); // 0, 1 + vertices.push( min.x, max.y, max.z ); vertices.push( min.x, min.y, max.z ); // 1, 2 + vertices.push( min.x, min.y, max.z ); vertices.push( max.x, min.y, max.z ); // 2, 3 + vertices.push( max.x, min.y, max.z ); vertices.push( max.x, max.y, max.z ); // 3, 0 + + vertices.push( max.x, max.y, min.z ); vertices.push( min.x, max.y, min.z ); // 4, 5 + vertices.push( min.x, max.y, min.z ); vertices.push( min.x, min.y, min.z ); // 5, 6 + vertices.push( min.x, min.y, min.z ); vertices.push( max.x, min.y, min.z ); // 6, 7 + vertices.push( max.x, min.y, min.z ); vertices.push( max.x, max.y, min.z ); // 7, 4 + + vertices.push( max.x, max.y, max.z ); vertices.push( max.x, max.y, min.z ); // 0, 4 + vertices.push( min.x, max.y, max.z ); vertices.push( min.x, max.y, min.z ); // 1, 5 + vertices.push( min.x, min.y, max.z ); vertices.push( min.x, min.y, min.z ); // 2, 6 + vertices.push( max.x, min.y, max.z ); vertices.push( max.x, min.y, min.z ); // 3, 7 + + traverse( tree[ i ].subTrees ); + + } + + } + + traverse( this.octree.subTrees ); + + this.geometry.dispose(); + + this.geometry = new BufferGeometry(); + this.geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +export { OctreeHelper }; diff --git a/node_modules/three/examples/jsm/helpers/PositionalAudioHelper.js b/node_modules/three/examples/jsm/helpers/PositionalAudioHelper.js new file mode 100644 index 0000000..0a20ea5 --- /dev/null +++ b/node_modules/three/examples/jsm/helpers/PositionalAudioHelper.js @@ -0,0 +1,109 @@ +import { + BufferGeometry, + BufferAttribute, + LineBasicMaterial, + Line, + MathUtils +} from 'three'; + +class PositionalAudioHelper extends Line { + + constructor( audio, range = 1, divisionsInnerAngle = 16, divisionsOuterAngle = 2 ) { + + const geometry = new BufferGeometry(); + const divisions = divisionsInnerAngle + divisionsOuterAngle * 2; + const positions = new Float32Array( ( divisions * 3 + 3 ) * 3 ); + geometry.setAttribute( 'position', new BufferAttribute( positions, 3 ) ); + + const materialInnerAngle = new LineBasicMaterial( { color: 0x00ff00 } ); + const materialOuterAngle = new LineBasicMaterial( { color: 0xffff00 } ); + + super( geometry, [ materialOuterAngle, materialInnerAngle ] ); + + this.audio = audio; + this.range = range; + this.divisionsInnerAngle = divisionsInnerAngle; + this.divisionsOuterAngle = divisionsOuterAngle; + this.type = 'PositionalAudioHelper'; + + this.update(); + + } + + update() { + + const audio = this.audio; + const range = this.range; + const divisionsInnerAngle = this.divisionsInnerAngle; + const divisionsOuterAngle = this.divisionsOuterAngle; + + const coneInnerAngle = MathUtils.degToRad( audio.panner.coneInnerAngle ); + const coneOuterAngle = MathUtils.degToRad( audio.panner.coneOuterAngle ); + + const halfConeInnerAngle = coneInnerAngle / 2; + const halfConeOuterAngle = coneOuterAngle / 2; + + let start = 0; + let count = 0; + let i; + let stride; + + const geometry = this.geometry; + const positionAttribute = geometry.attributes.position; + + geometry.clearGroups(); + + // + + function generateSegment( from, to, divisions, materialIndex ) { + + const step = ( to - from ) / divisions; + + positionAttribute.setXYZ( start, 0, 0, 0 ); + count ++; + + for ( i = from; i < to; i += step ) { + + stride = start + count; + + positionAttribute.setXYZ( stride, Math.sin( i ) * range, 0, Math.cos( i ) * range ); + positionAttribute.setXYZ( stride + 1, Math.sin( Math.min( i + step, to ) ) * range, 0, Math.cos( Math.min( i + step, to ) ) * range ); + positionAttribute.setXYZ( stride + 2, 0, 0, 0 ); + + count += 3; + + } + + geometry.addGroup( start, count, materialIndex ); + + start += count; + count = 0; + + } + + // + + generateSegment( - halfConeOuterAngle, - halfConeInnerAngle, divisionsOuterAngle, 0 ); + generateSegment( - halfConeInnerAngle, halfConeInnerAngle, divisionsInnerAngle, 1 ); + generateSegment( halfConeInnerAngle, halfConeOuterAngle, divisionsOuterAngle, 0 ); + + // + + positionAttribute.needsUpdate = true; + + if ( coneInnerAngle === coneOuterAngle ) this.material[ 0 ].visible = false; + + } + + dispose() { + + this.geometry.dispose(); + this.material[ 0 ].dispose(); + this.material[ 1 ].dispose(); + + } + +} + + +export { PositionalAudioHelper }; diff --git a/node_modules/three/examples/jsm/helpers/RectAreaLightHelper.js b/node_modules/three/examples/jsm/helpers/RectAreaLightHelper.js new file mode 100644 index 0000000..416fe1b --- /dev/null +++ b/node_modules/three/examples/jsm/helpers/RectAreaLightHelper.js @@ -0,0 +1,85 @@ +import { + BackSide, + BufferGeometry, + Float32BufferAttribute, + Line, + LineBasicMaterial, + Mesh, + MeshBasicMaterial +} from 'three'; + +/** + * This helper must be added as a child of the light + */ + +class RectAreaLightHelper extends Line { + + constructor( light, color ) { + + const positions = [ 1, 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, - 1, 0, 1, 1, 0 ]; + + const geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); + geometry.computeBoundingSphere(); + + const material = new LineBasicMaterial( { fog: false } ); + + super( geometry, material ); + + this.light = light; + this.color = color; // optional hardwired color for the helper + this.type = 'RectAreaLightHelper'; + + // + + const positions2 = [ 1, 1, 0, - 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, - 1, 0, 1, - 1, 0 ]; + + const geometry2 = new BufferGeometry(); + geometry2.setAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) ); + geometry2.computeBoundingSphere(); + + this.add( new Mesh( geometry2, new MeshBasicMaterial( { side: BackSide, fog: false } ) ) ); + + } + + updateMatrixWorld() { + + this.scale.set( 0.5 * this.light.width, 0.5 * this.light.height, 1 ); + + if ( this.color !== undefined ) { + + this.material.color.set( this.color ); + this.children[ 0 ].material.color.set( this.color ); + + } else { + + this.material.color.copy( this.light.color ).multiplyScalar( this.light.intensity ); + + // prevent hue shift + const c = this.material.color; + const max = Math.max( c.r, c.g, c.b ); + if ( max > 1 ) c.multiplyScalar( 1 / max ); + + this.children[ 0 ].material.color.copy( this.material.color ); + + } + + // ignore world scale on light + this.matrixWorld.extractRotation( this.light.matrixWorld ).scale( this.scale ).copyPosition( this.light.matrixWorld ); + + this.children[ 0 ].matrixWorld.copy( this.matrixWorld ); + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + this.children[ 0 ].geometry.dispose(); + this.children[ 0 ].material.dispose(); + + } + +} + +export { RectAreaLightHelper }; diff --git a/node_modules/three/examples/jsm/helpers/TextureHelper.js b/node_modules/three/examples/jsm/helpers/TextureHelper.js new file mode 100644 index 0000000..6767aed --- /dev/null +++ b/node_modules/three/examples/jsm/helpers/TextureHelper.js @@ -0,0 +1,237 @@ +import { + BoxGeometry, + BufferAttribute, + DoubleSide, + Mesh, + PlaneGeometry, + ShaderMaterial, + Vector3, +} from 'three'; +import { mergeGeometries } from '../utils/BufferGeometryUtils.js'; + +class TextureHelper extends Mesh { + + constructor( texture, width = 1, height = 1, depth = 1 ) { + + const material = new ShaderMaterial( { + + type: 'TextureHelperMaterial', + + side: DoubleSide, + transparent: true, + + uniforms: { + + map: { value: texture }, + alpha: { value: getAlpha( texture ) }, + + }, + + vertexShader: [ + + 'attribute vec3 uvw;', + + 'varying vec3 vUvw;', + + 'void main() {', + + ' vUvw = uvw;', + + ' gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );', + + '}', + + ].join( '\n' ), + + fragmentShader: [ + + 'precision highp float;', + + 'precision highp sampler2DArray;', + + 'precision highp sampler3D;', + + 'uniform {samplerType} map;', + + 'uniform float alpha;', + + 'varying vec3 vUvw;', + + 'vec4 textureHelper( in sampler2D map ) { return texture( map, vUvw.xy ); }', + + 'vec4 textureHelper( in sampler2DArray map ) { return texture( map, vUvw ); }', + + 'vec4 textureHelper( in sampler3D map ) { return texture( map, vUvw ); }', + + 'vec4 textureHelper( in samplerCube map ) { return texture( map, vUvw ); }', + + 'void main() {', + + ' gl_FragColor = linearToOutputTexel( vec4( textureHelper( map ).xyz, alpha ) );', + + '}' + + ].join( '\n' ).replace( '{samplerType}', getSamplerType( texture ) ) + + } ); + + const geometry = texture.isCubeTexture + ? createCubeGeometry( width, height, depth ) + : createSliceGeometry( texture, width, height, depth ); + + super( geometry, material ); + + this.texture = texture; + this.type = 'TextureHelper'; + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +function getSamplerType( texture ) { + + if ( texture.isCubeTexture ) { + + return 'samplerCube'; + + } else if ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) { + + return 'sampler2DArray'; + + } else if ( texture.isData3DTexture || texture.isCompressed3DTexture ) { + + return 'sampler3D'; + + } else { + + return 'sampler2D'; + + } + +} + +function getImageCount( texture ) { + + if ( texture.isCubeTexture ) { + + return 6; + + } else if ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) { + + return texture.image.depth; + + } else if ( texture.isData3DTexture || texture.isCompressed3DTexture ) { + + return texture.image.depth; + + } else { + + return 1; + + } + +} + +function getAlpha( texture ) { + + if ( texture.isCubeTexture ) { + + return 1; + + } else if ( texture.isDataArrayTexture || texture.isCompressedArrayTexture ) { + + return Math.max( 1 / texture.image.depth, 0.25 ); + + } else if ( texture.isData3DTexture || texture.isCompressed3DTexture ) { + + return Math.max( 1 / texture.image.depth, 0.25 ); + + } else { + + return 1; + + } + +} + +function createCubeGeometry( width, height, depth ) { + + const geometry = new BoxGeometry( width, height, depth ); + + const position = geometry.attributes.position; + const uv = geometry.attributes.uv; + const uvw = new BufferAttribute( new Float32Array( uv.count * 3 ), 3 ); + + const _direction = new Vector3(); + + for ( let j = 0, jl = uv.count; j < jl; ++ j ) { + + _direction.fromBufferAttribute( position, j ).normalize(); + + const u = _direction.x; + const v = _direction.y; + const w = _direction.z; + + uvw.setXYZ( j, u, v, w ); + + } + + geometry.deleteAttribute( 'uv' ); + geometry.setAttribute( 'uvw', uvw ); + + return geometry; + +} + +function createSliceGeometry( texture, width, height, depth ) { + + const sliceCount = getImageCount( texture ); + + const geometries = []; + + for ( let i = 0; i < sliceCount; ++ i ) { + + const geometry = new PlaneGeometry( width, height ); + + if ( sliceCount > 1 ) { + + geometry.translate( 0, 0, depth * ( i / ( sliceCount - 1 ) - 0.5 ) ); + + } + + const uv = geometry.attributes.uv; + const uvw = new BufferAttribute( new Float32Array( uv.count * 3 ), 3 ); + + for ( let j = 0, jl = uv.count; j < jl; ++ j ) { + + const u = uv.getX( j ); + const v = texture.flipY ? uv.getY( j ) : 1 - uv.getY( j ); + const w = sliceCount === 1 + ? 1 + : texture.isDataArrayTexture || texture.isCompressedArrayTexture + ? i + : i / ( sliceCount - 1 ); + + uvw.setXYZ( j, u, v, w ); + + } + + geometry.deleteAttribute( 'uv' ); + geometry.setAttribute( 'uvw', uvw ); + + geometries.push( geometry ); + + } + + return mergeGeometries( geometries ); + +} + +export { TextureHelper }; diff --git a/node_modules/three/examples/jsm/helpers/VertexNormalsHelper.js b/node_modules/three/examples/jsm/helpers/VertexNormalsHelper.js new file mode 100644 index 0000000..bfe41ab --- /dev/null +++ b/node_modules/three/examples/jsm/helpers/VertexNormalsHelper.js @@ -0,0 +1,96 @@ +import { + BufferGeometry, + Float32BufferAttribute, + LineSegments, + LineBasicMaterial, + Matrix3, + Vector3 +} from 'three'; + +const _v1 = new Vector3(); +const _v2 = new Vector3(); +const _normalMatrix = new Matrix3(); + +class VertexNormalsHelper extends LineSegments { + + constructor( object, size = 1, color = 0xff0000 ) { + + const geometry = new BufferGeometry(); + + const nNormals = object.geometry.attributes.normal.count; + const positions = new Float32BufferAttribute( nNormals * 2 * 3, 3 ); + + geometry.setAttribute( 'position', positions ); + + super( geometry, new LineBasicMaterial( { color, toneMapped: false } ) ); + + this.object = object; + this.size = size; + this.type = 'VertexNormalsHelper'; + + // + + this.matrixAutoUpdate = false; + + this.update(); + + } + + update() { + + this.object.updateMatrixWorld( true ); + + _normalMatrix.getNormalMatrix( this.object.matrixWorld ); + + const matrixWorld = this.object.matrixWorld; + + const position = this.geometry.attributes.position; + + // + + const objGeometry = this.object.geometry; + + if ( objGeometry ) { + + const objPos = objGeometry.attributes.position; + + const objNorm = objGeometry.attributes.normal; + + let idx = 0; + + // for simplicity, ignore index and drawcalls, and render every normal + + for ( let j = 0, jl = objPos.count; j < jl; j ++ ) { + + _v1.fromBufferAttribute( objPos, j ).applyMatrix4( matrixWorld ); + + _v2.fromBufferAttribute( objNorm, j ); + + _v2.applyMatrix3( _normalMatrix ).normalize().multiplyScalar( this.size ).add( _v1 ); + + position.setXYZ( idx, _v1.x, _v1.y, _v1.z ); + + idx = idx + 1; + + position.setXYZ( idx, _v2.x, _v2.y, _v2.z ); + + idx = idx + 1; + + } + + } + + position.needsUpdate = true; + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +export { VertexNormalsHelper }; diff --git a/node_modules/three/examples/jsm/helpers/VertexTangentsHelper.js b/node_modules/three/examples/jsm/helpers/VertexTangentsHelper.js new file mode 100644 index 0000000..1ad413f --- /dev/null +++ b/node_modules/three/examples/jsm/helpers/VertexTangentsHelper.js @@ -0,0 +1,88 @@ +import { + BufferGeometry, + Float32BufferAttribute, + LineSegments, + LineBasicMaterial, + Vector3 +} from 'three'; + +const _v1 = new Vector3(); +const _v2 = new Vector3(); + +class VertexTangentsHelper extends LineSegments { + + constructor( object, size = 1, color = 0x00ffff ) { + + const geometry = new BufferGeometry(); + + const nTangents = object.geometry.attributes.tangent.count; + const positions = new Float32BufferAttribute( nTangents * 2 * 3, 3 ); + + geometry.setAttribute( 'position', positions ); + + super( geometry, new LineBasicMaterial( { color, toneMapped: false } ) ); + + this.object = object; + this.size = size; + this.type = 'VertexTangentsHelper'; + + // + + this.matrixAutoUpdate = false; + + this.update(); + + } + + update() { + + this.object.updateMatrixWorld( true ); + + const matrixWorld = this.object.matrixWorld; + + const position = this.geometry.attributes.position; + + // + + const objGeometry = this.object.geometry; + + const objPos = objGeometry.attributes.position; + + const objTan = objGeometry.attributes.tangent; + + let idx = 0; + + // for simplicity, ignore index and drawcalls, and render every tangent + + for ( let j = 0, jl = objPos.count; j < jl; j ++ ) { + + _v1.fromBufferAttribute( objPos, j ).applyMatrix4( matrixWorld ); + + _v2.fromBufferAttribute( objTan, j ); + + _v2.transformDirection( matrixWorld ).multiplyScalar( this.size ).add( _v1 ); + + position.setXYZ( idx, _v1.x, _v1.y, _v1.z ); + + idx = idx + 1; + + position.setXYZ( idx, _v2.x, _v2.y, _v2.z ); + + idx = idx + 1; + + } + + position.needsUpdate = true; + + } + + dispose() { + + this.geometry.dispose(); + this.material.dispose(); + + } + +} + +export { VertexTangentsHelper }; diff --git a/node_modules/three/examples/jsm/helpers/ViewHelper.js b/node_modules/three/examples/jsm/helpers/ViewHelper.js new file mode 100644 index 0000000..077a922 --- /dev/null +++ b/node_modules/three/examples/jsm/helpers/ViewHelper.js @@ -0,0 +1,333 @@ +import { + BoxGeometry, + CanvasTexture, + Color, + Euler, + Mesh, + MeshBasicMaterial, + Object3D, + OrthographicCamera, + Quaternion, + Raycaster, + Sprite, + SpriteMaterial, + Vector2, + Vector3, + Vector4 +} from 'three'; + +class ViewHelper extends Object3D { + + constructor( camera, domElement ) { + + super(); + + this.isViewHelper = true; + + this.animating = false; + this.center = new Vector3(); + + const color1 = new Color( '#ff3653' ); + const color2 = new Color( '#8adb00' ); + const color3 = new Color( '#2c8fff' ); + + const interactiveObjects = []; + const raycaster = new Raycaster(); + const mouse = new Vector2(); + const dummy = new Object3D(); + + const orthoCamera = new OrthographicCamera( - 2, 2, 2, - 2, 0, 4 ); + orthoCamera.position.set( 0, 0, 2 ); + + const geometry = new BoxGeometry( 0.8, 0.05, 0.05 ).translate( 0.4, 0, 0 ); + + const xAxis = new Mesh( geometry, getAxisMaterial( color1 ) ); + const yAxis = new Mesh( geometry, getAxisMaterial( color2 ) ); + const zAxis = new Mesh( geometry, getAxisMaterial( color3 ) ); + + yAxis.rotation.z = Math.PI / 2; + zAxis.rotation.y = - Math.PI / 2; + + this.add( xAxis ); + this.add( zAxis ); + this.add( yAxis ); + + const posXAxisHelper = new Sprite( getSpriteMaterial( color1, 'X' ) ); + posXAxisHelper.userData.type = 'posX'; + const posYAxisHelper = new Sprite( getSpriteMaterial( color2, 'Y' ) ); + posYAxisHelper.userData.type = 'posY'; + const posZAxisHelper = new Sprite( getSpriteMaterial( color3, 'Z' ) ); + posZAxisHelper.userData.type = 'posZ'; + const negXAxisHelper = new Sprite( getSpriteMaterial( color1 ) ); + negXAxisHelper.userData.type = 'negX'; + const negYAxisHelper = new Sprite( getSpriteMaterial( color2 ) ); + negYAxisHelper.userData.type = 'negY'; + const negZAxisHelper = new Sprite( getSpriteMaterial( color3 ) ); + negZAxisHelper.userData.type = 'negZ'; + + posXAxisHelper.position.x = 1; + posYAxisHelper.position.y = 1; + posZAxisHelper.position.z = 1; + negXAxisHelper.position.x = - 1; + negXAxisHelper.scale.setScalar( 0.8 ); + negYAxisHelper.position.y = - 1; + negYAxisHelper.scale.setScalar( 0.8 ); + negZAxisHelper.position.z = - 1; + negZAxisHelper.scale.setScalar( 0.8 ); + + this.add( posXAxisHelper ); + this.add( posYAxisHelper ); + this.add( posZAxisHelper ); + this.add( negXAxisHelper ); + this.add( negYAxisHelper ); + this.add( negZAxisHelper ); + + interactiveObjects.push( posXAxisHelper ); + interactiveObjects.push( posYAxisHelper ); + interactiveObjects.push( posZAxisHelper ); + interactiveObjects.push( negXAxisHelper ); + interactiveObjects.push( negYAxisHelper ); + interactiveObjects.push( negZAxisHelper ); + + const point = new Vector3(); + const dim = 128; + const turnRate = 2 * Math.PI; // turn rate in angles per second + + this.render = function ( renderer ) { + + this.quaternion.copy( camera.quaternion ).invert(); + this.updateMatrixWorld(); + + point.set( 0, 0, 1 ); + point.applyQuaternion( camera.quaternion ); + + if ( point.x >= 0 ) { + + posXAxisHelper.material.opacity = 1; + negXAxisHelper.material.opacity = 0.5; + + } else { + + posXAxisHelper.material.opacity = 0.5; + negXAxisHelper.material.opacity = 1; + + } + + if ( point.y >= 0 ) { + + posYAxisHelper.material.opacity = 1; + negYAxisHelper.material.opacity = 0.5; + + } else { + + posYAxisHelper.material.opacity = 0.5; + negYAxisHelper.material.opacity = 1; + + } + + if ( point.z >= 0 ) { + + posZAxisHelper.material.opacity = 1; + negZAxisHelper.material.opacity = 0.5; + + } else { + + posZAxisHelper.material.opacity = 0.5; + negZAxisHelper.material.opacity = 1; + + } + + // + + const x = domElement.offsetWidth - dim; + + renderer.clearDepth(); + + renderer.getViewport( viewport ); + renderer.setViewport( x, 0, dim, dim ); + + renderer.render( this, orthoCamera ); + + renderer.setViewport( viewport.x, viewport.y, viewport.z, viewport.w ); + + }; + + const targetPosition = new Vector3(); + const targetQuaternion = new Quaternion(); + + const q1 = new Quaternion(); + const q2 = new Quaternion(); + const viewport = new Vector4(); + let radius = 0; + + this.handleClick = function ( event ) { + + if ( this.animating === true ) return false; + + const rect = domElement.getBoundingClientRect(); + const offsetX = rect.left + ( domElement.offsetWidth - dim ); + const offsetY = rect.top + ( domElement.offsetHeight - dim ); + mouse.x = ( ( event.clientX - offsetX ) / ( rect.right - offsetX ) ) * 2 - 1; + mouse.y = - ( ( event.clientY - offsetY ) / ( rect.bottom - offsetY ) ) * 2 + 1; + + raycaster.setFromCamera( mouse, orthoCamera ); + + const intersects = raycaster.intersectObjects( interactiveObjects ); + + if ( intersects.length > 0 ) { + + const intersection = intersects[ 0 ]; + const object = intersection.object; + + prepareAnimationData( object, this.center ); + + this.animating = true; + + return true; + + } else { + + return false; + + } + + }; + + this.update = function ( delta ) { + + const step = delta * turnRate; + + // animate position by doing a slerp and then scaling the position on the unit sphere + + q1.rotateTowards( q2, step ); + camera.position.set( 0, 0, 1 ).applyQuaternion( q1 ).multiplyScalar( radius ).add( this.center ); + + // animate orientation + + camera.quaternion.rotateTowards( targetQuaternion, step ); + + if ( q1.angleTo( q2 ) === 0 ) { + + this.animating = false; + + } + + }; + + this.dispose = function () { + + geometry.dispose(); + + xAxis.material.dispose(); + yAxis.material.dispose(); + zAxis.material.dispose(); + + posXAxisHelper.material.map.dispose(); + posYAxisHelper.material.map.dispose(); + posZAxisHelper.material.map.dispose(); + negXAxisHelper.material.map.dispose(); + negYAxisHelper.material.map.dispose(); + negZAxisHelper.material.map.dispose(); + + posXAxisHelper.material.dispose(); + posYAxisHelper.material.dispose(); + posZAxisHelper.material.dispose(); + negXAxisHelper.material.dispose(); + negYAxisHelper.material.dispose(); + negZAxisHelper.material.dispose(); + + }; + + function prepareAnimationData( object, focusPoint ) { + + switch ( object.userData.type ) { + + case 'posX': + targetPosition.set( 1, 0, 0 ); + targetQuaternion.setFromEuler( new Euler( 0, Math.PI * 0.5, 0 ) ); + break; + + case 'posY': + targetPosition.set( 0, 1, 0 ); + targetQuaternion.setFromEuler( new Euler( - Math.PI * 0.5, 0, 0 ) ); + break; + + case 'posZ': + targetPosition.set( 0, 0, 1 ); + targetQuaternion.setFromEuler( new Euler() ); + break; + + case 'negX': + targetPosition.set( - 1, 0, 0 ); + targetQuaternion.setFromEuler( new Euler( 0, - Math.PI * 0.5, 0 ) ); + break; + + case 'negY': + targetPosition.set( 0, - 1, 0 ); + targetQuaternion.setFromEuler( new Euler( Math.PI * 0.5, 0, 0 ) ); + break; + + case 'negZ': + targetPosition.set( 0, 0, - 1 ); + targetQuaternion.setFromEuler( new Euler( 0, Math.PI, 0 ) ); + break; + + default: + console.error( 'ViewHelper: Invalid axis.' ); + + } + + // + + radius = camera.position.distanceTo( focusPoint ); + targetPosition.multiplyScalar( radius ).add( focusPoint ); + + dummy.position.copy( focusPoint ); + + dummy.lookAt( camera.position ); + q1.copy( dummy.quaternion ); + + dummy.lookAt( targetPosition ); + q2.copy( dummy.quaternion ); + + } + + function getAxisMaterial( color ) { + + return new MeshBasicMaterial( { color: color, toneMapped: false } ); + + } + + function getSpriteMaterial( color, text = null ) { + + const canvas = document.createElement( 'canvas' ); + canvas.width = 64; + canvas.height = 64; + + const context = canvas.getContext( '2d' ); + context.beginPath(); + context.arc( 32, 32, 16, 0, 2 * Math.PI ); + context.closePath(); + context.fillStyle = color.getStyle(); + context.fill(); + + if ( text !== null ) { + + context.font = '24px Arial'; + context.textAlign = 'center'; + context.fillStyle = '#000000'; + context.fillText( text, 32, 41 ); + + } + + const texture = new CanvasTexture( canvas ); + + return new SpriteMaterial( { map: texture, toneMapped: false } ); + + } + + } + +} + +export { ViewHelper }; diff --git a/node_modules/three/examples/jsm/interactive/HTMLMesh.js b/node_modules/three/examples/jsm/interactive/HTMLMesh.js new file mode 100644 index 0000000..c7c5fa4 --- /dev/null +++ b/node_modules/three/examples/jsm/interactive/HTMLMesh.js @@ -0,0 +1,570 @@ +import { + CanvasTexture, + LinearFilter, + Mesh, + MeshBasicMaterial, + PlaneGeometry, + SRGBColorSpace, + Color +} from 'three'; + +class HTMLMesh extends Mesh { + + constructor( dom ) { + + const texture = new HTMLTexture( dom ); + + const geometry = new PlaneGeometry( texture.image.width * 0.001, texture.image.height * 0.001 ); + const material = new MeshBasicMaterial( { map: texture, toneMapped: false, transparent: true } ); + + super( geometry, material ); + + function onEvent( event ) { + + material.map.dispatchDOMEvent( event ); + + } + + this.addEventListener( 'mousedown', onEvent ); + this.addEventListener( 'mousemove', onEvent ); + this.addEventListener( 'mouseup', onEvent ); + this.addEventListener( 'click', onEvent ); + + this.dispose = function () { + + geometry.dispose(); + material.dispose(); + + material.map.dispose(); + + canvases.delete( dom ); + + this.removeEventListener( 'mousedown', onEvent ); + this.removeEventListener( 'mousemove', onEvent ); + this.removeEventListener( 'mouseup', onEvent ); + this.removeEventListener( 'click', onEvent ); + + }; + + } + +} + +class HTMLTexture extends CanvasTexture { + + constructor( dom ) { + + super( html2canvas( dom ) ); + + this.dom = dom; + + this.anisotropy = 16; + this.colorSpace = SRGBColorSpace; + this.minFilter = LinearFilter; + this.magFilter = LinearFilter; + + // Create an observer on the DOM, and run html2canvas update in the next loop + const observer = new MutationObserver( () => { + + if ( ! this.scheduleUpdate ) { + + // ideally should use xr.requestAnimationFrame, here setTimeout to avoid passing the renderer + this.scheduleUpdate = setTimeout( () => this.update(), 16 ); + + } + + } ); + + const config = { attributes: true, childList: true, subtree: true, characterData: true }; + observer.observe( dom, config ); + + this.observer = observer; + + } + + dispatchDOMEvent( event ) { + + if ( event.data ) { + + htmlevent( this.dom, event.type, event.data.x, event.data.y ); + + } + + } + + update() { + + this.image = html2canvas( this.dom ); + this.needsUpdate = true; + + this.scheduleUpdate = null; + + } + + dispose() { + + if ( this.observer ) { + + this.observer.disconnect(); + + } + + this.scheduleUpdate = clearTimeout( this.scheduleUpdate ); + + super.dispose(); + + } + +} + + +// + +const canvases = new WeakMap(); + +function html2canvas( element ) { + + const range = document.createRange(); + const color = new Color(); + + function Clipper( context ) { + + const clips = []; + let isClipping = false; + + function doClip() { + + if ( isClipping ) { + + isClipping = false; + context.restore(); + + } + + if ( clips.length === 0 ) return; + + let minX = - Infinity, minY = - Infinity; + let maxX = Infinity, maxY = Infinity; + + for ( let i = 0; i < clips.length; i ++ ) { + + const clip = clips[ i ]; + + minX = Math.max( minX, clip.x ); + minY = Math.max( minY, clip.y ); + maxX = Math.min( maxX, clip.x + clip.width ); + maxY = Math.min( maxY, clip.y + clip.height ); + + } + + context.save(); + context.beginPath(); + context.rect( minX, minY, maxX - minX, maxY - minY ); + context.clip(); + + isClipping = true; + + } + + return { + + add: function ( clip ) { + + clips.push( clip ); + doClip(); + + }, + + remove: function () { + + clips.pop(); + doClip(); + + } + + }; + + } + + function drawText( style, x, y, string ) { + + if ( string !== '' ) { + + if ( style.textTransform === 'uppercase' ) { + + string = string.toUpperCase(); + + } + + context.font = style.fontWeight + ' ' + style.fontSize + ' ' + style.fontFamily; + context.textBaseline = 'top'; + context.fillStyle = style.color; + context.fillText( string, x, y + parseFloat( style.fontSize ) * 0.1 ); + + } + + } + + function buildRectPath( x, y, w, h, r ) { + + if ( w < 2 * r ) r = w / 2; + if ( h < 2 * r ) r = h / 2; + + context.beginPath(); + context.moveTo( x + r, y ); + context.arcTo( x + w, y, x + w, y + h, r ); + context.arcTo( x + w, y + h, x, y + h, r ); + context.arcTo( x, y + h, x, y, r ); + context.arcTo( x, y, x + w, y, r ); + context.closePath(); + + } + + function drawBorder( style, which, x, y, width, height ) { + + const borderWidth = style[ which + 'Width' ]; + const borderStyle = style[ which + 'Style' ]; + const borderColor = style[ which + 'Color' ]; + + if ( borderWidth !== '0px' && borderStyle !== 'none' && borderColor !== 'transparent' && borderColor !== 'rgba(0, 0, 0, 0)' ) { + + context.strokeStyle = borderColor; + context.lineWidth = parseFloat( borderWidth ); + context.beginPath(); + context.moveTo( x, y ); + context.lineTo( x + width, y + height ); + context.stroke(); + + } + + } + + function drawElement( element, style ) { + + // Do not render invisible elements, comments and scripts. + if ( element.nodeType === Node.COMMENT_NODE || element.nodeName === 'SCRIPT' || ( element.style && element.style.display === 'none' ) ) { + + return; + + } + + let x = 0, y = 0, width = 0, height = 0; + + if ( element.nodeType === Node.TEXT_NODE ) { + + // text + + range.selectNode( element ); + + const rect = range.getBoundingClientRect(); + + x = rect.left - offset.left - 0.5; + y = rect.top - offset.top - 0.5; + width = rect.width; + height = rect.height; + + drawText( style, x, y, element.nodeValue.trim() ); + + } else if ( element instanceof HTMLCanvasElement ) { + + // Canvas element + + const rect = element.getBoundingClientRect(); + + x = rect.left - offset.left - 0.5; + y = rect.top - offset.top - 0.5; + + context.save(); + const dpr = window.devicePixelRatio; + context.scale( 1 / dpr, 1 / dpr ); + context.drawImage( element, x, y ); + context.restore(); + + } else if ( element instanceof HTMLImageElement ) { + + const rect = element.getBoundingClientRect(); + + x = rect.left - offset.left - 0.5; + y = rect.top - offset.top - 0.5; + width = rect.width; + height = rect.height; + + context.drawImage( element, x, y, width, height ); + + } else { + + const rect = element.getBoundingClientRect(); + + x = rect.left - offset.left - 0.5; + y = rect.top - offset.top - 0.5; + width = rect.width; + height = rect.height; + + style = window.getComputedStyle( element ); + + // Get the border of the element used for fill and border + + buildRectPath( x, y, width, height, parseFloat( style.borderRadius ) ); + + const backgroundColor = style.backgroundColor; + + if ( backgroundColor !== 'transparent' && backgroundColor !== 'rgba(0, 0, 0, 0)' ) { + + context.fillStyle = backgroundColor; + context.fill(); + + } + + // If all the borders match then stroke the round rectangle + + const borders = [ 'borderTop', 'borderLeft', 'borderBottom', 'borderRight' ]; + + let match = true; + let prevBorder = null; + + for ( const border of borders ) { + + if ( prevBorder !== null ) { + + match = ( style[ border + 'Width' ] === style[ prevBorder + 'Width' ] ) && + ( style[ border + 'Color' ] === style[ prevBorder + 'Color' ] ) && + ( style[ border + 'Style' ] === style[ prevBorder + 'Style' ] ); + + } + + if ( match === false ) break; + + prevBorder = border; + + } + + if ( match === true ) { + + // They all match so stroke the rectangle from before allows for border-radius + + const width = parseFloat( style.borderTopWidth ); + + if ( style.borderTopWidth !== '0px' && style.borderTopStyle !== 'none' && style.borderTopColor !== 'transparent' && style.borderTopColor !== 'rgba(0, 0, 0, 0)' ) { + + context.strokeStyle = style.borderTopColor; + context.lineWidth = width; + context.stroke(); + + } + + } else { + + // Otherwise draw individual borders + + drawBorder( style, 'borderTop', x, y, width, 0 ); + drawBorder( style, 'borderLeft', x, y, 0, height ); + drawBorder( style, 'borderBottom', x, y + height, width, 0 ); + drawBorder( style, 'borderRight', x + width, y, 0, height ); + + } + + if ( element instanceof HTMLInputElement ) { + + let accentColor = style.accentColor; + + if ( accentColor === undefined || accentColor === 'auto' ) accentColor = style.color; + + color.set( accentColor ); + + const luminance = Math.sqrt( 0.299 * ( color.r ** 2 ) + 0.587 * ( color.g ** 2 ) + 0.114 * ( color.b ** 2 ) ); + const accentTextColor = luminance < 0.5 ? 'white' : '#111111'; + + if ( element.type === 'radio' ) { + + buildRectPath( x, y, width, height, height ); + + context.fillStyle = 'white'; + context.strokeStyle = accentColor; + context.lineWidth = 1; + context.fill(); + context.stroke(); + + if ( element.checked ) { + + buildRectPath( x + 2, y + 2, width - 4, height - 4, height ); + + context.fillStyle = accentColor; + context.strokeStyle = accentTextColor; + context.lineWidth = 2; + context.fill(); + context.stroke(); + + } + + } + + if ( element.type === 'checkbox' ) { + + buildRectPath( x, y, width, height, 2 ); + + context.fillStyle = element.checked ? accentColor : 'white'; + context.strokeStyle = element.checked ? accentTextColor : accentColor; + context.lineWidth = 1; + context.stroke(); + context.fill(); + + if ( element.checked ) { + + const currentTextAlign = context.textAlign; + + context.textAlign = 'center'; + + const properties = { + color: accentTextColor, + fontFamily: style.fontFamily, + fontSize: height + 'px', + fontWeight: 'bold' + }; + + drawText( properties, x + ( width / 2 ), y, '✔' ); + + context.textAlign = currentTextAlign; + + } + + } + + if ( element.type === 'range' ) { + + const [ min, max, value ] = [ 'min', 'max', 'value' ].map( property => parseFloat( element[ property ] ) ); + const position = ( ( value - min ) / ( max - min ) ) * ( width - height ); + + buildRectPath( x, y + ( height / 4 ), width, height / 2, height / 4 ); + context.fillStyle = accentTextColor; + context.strokeStyle = accentColor; + context.lineWidth = 1; + context.fill(); + context.stroke(); + + buildRectPath( x, y + ( height / 4 ), position + ( height / 2 ), height / 2, height / 4 ); + context.fillStyle = accentColor; + context.fill(); + + buildRectPath( x + position, y, height, height, height / 2 ); + context.fillStyle = accentColor; + context.fill(); + + } + + if ( element.type === 'color' || element.type === 'text' || element.type === 'number' ) { + + clipper.add( { x: x, y: y, width: width, height: height } ); + + drawText( style, x + parseInt( style.paddingLeft ), y + parseInt( style.paddingTop ), element.value ); + + clipper.remove(); + + } + + } + + } + + /* + // debug + context.strokeStyle = '#' + Math.random().toString( 16 ).slice( - 3 ); + context.strokeRect( x - 0.5, y - 0.5, width + 1, height + 1 ); + */ + + const isClipping = style.overflow === 'auto' || style.overflow === 'hidden'; + + if ( isClipping ) clipper.add( { x: x, y: y, width: width, height: height } ); + + for ( let i = 0; i < element.childNodes.length; i ++ ) { + + drawElement( element.childNodes[ i ], style ); + + } + + if ( isClipping ) clipper.remove(); + + } + + const offset = element.getBoundingClientRect(); + + let canvas = canvases.get( element ); + + if ( canvas === undefined ) { + + canvas = document.createElement( 'canvas' ); + canvas.width = offset.width; + canvas.height = offset.height; + canvases.set( element, canvas ); + + } + + const context = canvas.getContext( '2d'/*, { alpha: false }*/ ); + + const clipper = new Clipper( context ); + + // console.time( 'drawElement' ); + + context.clearRect( 0, 0, canvas.width, canvas.height ); + + drawElement( element ); + + // console.timeEnd( 'drawElement' ); + + return canvas; + +} + +function htmlevent( element, event, x, y ) { + + const mouseEventInit = { + clientX: ( x * element.offsetWidth ) + element.offsetLeft, + clientY: ( y * element.offsetHeight ) + element.offsetTop, + view: element.ownerDocument.defaultView + }; + + window.dispatchEvent( new MouseEvent( event, mouseEventInit ) ); + + const rect = element.getBoundingClientRect(); + + x = x * rect.width + rect.left; + y = y * rect.height + rect.top; + + function traverse( element ) { + + if ( element.nodeType !== Node.TEXT_NODE && element.nodeType !== Node.COMMENT_NODE ) { + + const rect = element.getBoundingClientRect(); + + if ( x > rect.left && x < rect.right && y > rect.top && y < rect.bottom ) { + + element.dispatchEvent( new MouseEvent( event, mouseEventInit ) ); + + if ( element instanceof HTMLInputElement && element.type === 'range' && ( event === 'mousedown' || event === 'click' ) ) { + + const [ min, max ] = [ 'min', 'max' ].map( property => parseFloat( element[ property ] ) ); + + const width = rect.width; + const offsetX = x - rect.x; + const proportion = offsetX / width; + element.value = min + ( max - min ) * proportion; + element.dispatchEvent( new InputEvent( 'input', { bubbles: true } ) ); + + } + + } + + for ( let i = 0; i < element.childNodes.length; i ++ ) { + + traverse( element.childNodes[ i ] ); + + } + + } + + } + + traverse( element ); + +} + +export { HTMLMesh }; diff --git a/node_modules/three/examples/jsm/interactive/InteractiveGroup.js b/node_modules/three/examples/jsm/interactive/InteractiveGroup.js new file mode 100644 index 0000000..89ebec3 --- /dev/null +++ b/node_modules/three/examples/jsm/interactive/InteractiveGroup.js @@ -0,0 +1,106 @@ +import { + Group, + Raycaster, + Vector2 +} from 'three'; + +const _pointer = new Vector2(); +const _event = { type: '', data: _pointer }; + +const _raycaster = new Raycaster(); + +class InteractiveGroup extends Group { + + listenToPointerEvents( renderer, camera ) { + + const scope = this; + const raycaster = new Raycaster(); + + const element = renderer.domElement; + + function onPointerEvent( event ) { + + event.stopPropagation(); + + const rect = renderer.domElement.getBoundingClientRect(); + + _pointer.x = ( event.clientX - rect.left ) / rect.width * 2 - 1; + _pointer.y = - ( event.clientY - rect.top ) / rect.height * 2 + 1; + + raycaster.setFromCamera( _pointer, camera ); + + const intersects = raycaster.intersectObjects( scope.children, false ); + + if ( intersects.length > 0 ) { + + const intersection = intersects[ 0 ]; + + const object = intersection.object; + const uv = intersection.uv; + + _event.type = event.type; + _event.data.set( uv.x, 1 - uv.y ); + + object.dispatchEvent( _event ); + + } + + } + + element.addEventListener( 'pointerdown', onPointerEvent ); + element.addEventListener( 'pointerup', onPointerEvent ); + element.addEventListener( 'pointermove', onPointerEvent ); + element.addEventListener( 'mousedown', onPointerEvent ); + element.addEventListener( 'mouseup', onPointerEvent ); + element.addEventListener( 'mousemove', onPointerEvent ); + element.addEventListener( 'click', onPointerEvent ); + + } + + listenToXRControllerEvents( controller ) { + + const scope = this; + + // TODO: Dispatch pointerevents too + + const events = { + 'move': 'mousemove', + 'select': 'click', + 'selectstart': 'mousedown', + 'selectend': 'mouseup' + }; + + function onXRControllerEvent( event ) { + + const controller = event.target; + + _raycaster.setFromXRController( controller ); + + const intersections = _raycaster.intersectObjects( scope.children, false ); + + if ( intersections.length > 0 ) { + + const intersection = intersections[ 0 ]; + + const object = intersection.object; + const uv = intersection.uv; + + _event.type = events[ event.type ]; + _event.data.set( uv.x, 1 - uv.y ); + + object.dispatchEvent( _event ); + + } + + } + + controller.addEventListener( 'move', onXRControllerEvent ); + controller.addEventListener( 'select', onXRControllerEvent ); + controller.addEventListener( 'selectstart', onXRControllerEvent ); + controller.addEventListener( 'selectend', onXRControllerEvent ); + + } + +} + +export { InteractiveGroup }; diff --git a/node_modules/three/examples/jsm/interactive/SelectionBox.js b/node_modules/three/examples/jsm/interactive/SelectionBox.js new file mode 100644 index 0000000..597b9b2 --- /dev/null +++ b/node_modules/three/examples/jsm/interactive/SelectionBox.js @@ -0,0 +1,227 @@ +import { + Frustum, + Vector3, + Matrix4, + Quaternion, +} from 'three'; + +/** + * This is a class to check whether objects are in a selection area in 3D space + */ + +const _frustum = new Frustum(); +const _center = new Vector3(); + +const _tmpPoint = new Vector3(); + +const _vecNear = new Vector3(); +const _vecTopLeft = new Vector3(); +const _vecTopRight = new Vector3(); +const _vecDownRight = new Vector3(); +const _vecDownLeft = new Vector3(); + +const _vecFarTopLeft = new Vector3(); +const _vecFarTopRight = new Vector3(); +const _vecFarDownRight = new Vector3(); +const _vecFarDownLeft = new Vector3(); + +const _vectemp1 = new Vector3(); +const _vectemp2 = new Vector3(); +const _vectemp3 = new Vector3(); + +const _matrix = new Matrix4(); +const _quaternion = new Quaternion(); +const _scale = new Vector3(); + +class SelectionBox { + + constructor( camera, scene, deep = Number.MAX_VALUE ) { + + this.camera = camera; + this.scene = scene; + this.startPoint = new Vector3(); + this.endPoint = new Vector3(); + this.collection = []; + this.instances = {}; + this.deep = deep; + + } + + select( startPoint, endPoint ) { + + this.startPoint = startPoint || this.startPoint; + this.endPoint = endPoint || this.endPoint; + this.collection = []; + + this.updateFrustum( this.startPoint, this.endPoint ); + this.searchChildInFrustum( _frustum, this.scene ); + + return this.collection; + + } + + updateFrustum( startPoint, endPoint ) { + + startPoint = startPoint || this.startPoint; + endPoint = endPoint || this.endPoint; + + // Avoid invalid frustum + + if ( startPoint.x === endPoint.x ) { + + endPoint.x += Number.EPSILON; + + } + + if ( startPoint.y === endPoint.y ) { + + endPoint.y += Number.EPSILON; + + } + + this.camera.updateProjectionMatrix(); + this.camera.updateMatrixWorld(); + + if ( this.camera.isPerspectiveCamera ) { + + _tmpPoint.copy( startPoint ); + _tmpPoint.x = Math.min( startPoint.x, endPoint.x ); + _tmpPoint.y = Math.max( startPoint.y, endPoint.y ); + endPoint.x = Math.max( startPoint.x, endPoint.x ); + endPoint.y = Math.min( startPoint.y, endPoint.y ); + + _vecNear.setFromMatrixPosition( this.camera.matrixWorld ); + _vecTopLeft.copy( _tmpPoint ); + _vecTopRight.set( endPoint.x, _tmpPoint.y, 0 ); + _vecDownRight.copy( endPoint ); + _vecDownLeft.set( _tmpPoint.x, endPoint.y, 0 ); + + _vecTopLeft.unproject( this.camera ); + _vecTopRight.unproject( this.camera ); + _vecDownRight.unproject( this.camera ); + _vecDownLeft.unproject( this.camera ); + + _vectemp1.copy( _vecTopLeft ).sub( _vecNear ); + _vectemp2.copy( _vecTopRight ).sub( _vecNear ); + _vectemp3.copy( _vecDownRight ).sub( _vecNear ); + _vectemp1.normalize(); + _vectemp2.normalize(); + _vectemp3.normalize(); + + _vectemp1.multiplyScalar( this.deep ); + _vectemp2.multiplyScalar( this.deep ); + _vectemp3.multiplyScalar( this.deep ); + _vectemp1.add( _vecNear ); + _vectemp2.add( _vecNear ); + _vectemp3.add( _vecNear ); + + const planes = _frustum.planes; + + planes[ 0 ].setFromCoplanarPoints( _vecNear, _vecTopLeft, _vecTopRight ); + planes[ 1 ].setFromCoplanarPoints( _vecNear, _vecTopRight, _vecDownRight ); + planes[ 2 ].setFromCoplanarPoints( _vecDownRight, _vecDownLeft, _vecNear ); + planes[ 3 ].setFromCoplanarPoints( _vecDownLeft, _vecTopLeft, _vecNear ); + planes[ 4 ].setFromCoplanarPoints( _vecTopRight, _vecDownRight, _vecDownLeft ); + planes[ 5 ].setFromCoplanarPoints( _vectemp3, _vectemp2, _vectemp1 ); + planes[ 5 ].normal.multiplyScalar( - 1 ); + + } else if ( this.camera.isOrthographicCamera ) { + + const left = Math.min( startPoint.x, endPoint.x ); + const top = Math.max( startPoint.y, endPoint.y ); + const right = Math.max( startPoint.x, endPoint.x ); + const down = Math.min( startPoint.y, endPoint.y ); + + _vecTopLeft.set( left, top, - 1 ); + _vecTopRight.set( right, top, - 1 ); + _vecDownRight.set( right, down, - 1 ); + _vecDownLeft.set( left, down, - 1 ); + + _vecFarTopLeft.set( left, top, 1 ); + _vecFarTopRight.set( right, top, 1 ); + _vecFarDownRight.set( right, down, 1 ); + _vecFarDownLeft.set( left, down, 1 ); + + _vecTopLeft.unproject( this.camera ); + _vecTopRight.unproject( this.camera ); + _vecDownRight.unproject( this.camera ); + _vecDownLeft.unproject( this.camera ); + + _vecFarTopLeft.unproject( this.camera ); + _vecFarTopRight.unproject( this.camera ); + _vecFarDownRight.unproject( this.camera ); + _vecFarDownLeft.unproject( this.camera ); + + const planes = _frustum.planes; + + planes[ 0 ].setFromCoplanarPoints( _vecTopLeft, _vecFarTopLeft, _vecFarTopRight ); + planes[ 1 ].setFromCoplanarPoints( _vecTopRight, _vecFarTopRight, _vecFarDownRight ); + planes[ 2 ].setFromCoplanarPoints( _vecFarDownRight, _vecFarDownLeft, _vecDownLeft ); + planes[ 3 ].setFromCoplanarPoints( _vecFarDownLeft, _vecFarTopLeft, _vecTopLeft ); + planes[ 4 ].setFromCoplanarPoints( _vecTopRight, _vecDownRight, _vecDownLeft ); + planes[ 5 ].setFromCoplanarPoints( _vecFarDownRight, _vecFarTopRight, _vecFarTopLeft ); + planes[ 5 ].normal.multiplyScalar( - 1 ); + + } else { + + console.error( 'THREE.SelectionBox: Unsupported camera type.' ); + + } + + } + + searchChildInFrustum( frustum, object ) { + + if ( object.isMesh || object.isLine || object.isPoints ) { + + if ( object.isInstancedMesh ) { + + this.instances[ object.uuid ] = []; + + for ( let instanceId = 0; instanceId < object.count; instanceId ++ ) { + + object.getMatrixAt( instanceId, _matrix ); + _matrix.decompose( _center, _quaternion, _scale ); + _center.applyMatrix4( object.matrixWorld ); + + if ( frustum.containsPoint( _center ) ) { + + this.instances[ object.uuid ].push( instanceId ); + + } + + } + + } else { + + if ( object.geometry.boundingSphere === null ) object.geometry.computeBoundingSphere(); + + _center.copy( object.geometry.boundingSphere.center ); + + _center.applyMatrix4( object.matrixWorld ); + + if ( frustum.containsPoint( _center ) ) { + + this.collection.push( object ); + + } + + } + + } + + if ( object.children.length > 0 ) { + + for ( let x = 0; x < object.children.length; x ++ ) { + + this.searchChildInFrustum( frustum, object.children[ x ] ); + + } + + } + + } + +} + +export { SelectionBox }; diff --git a/node_modules/three/examples/jsm/interactive/SelectionHelper.js b/node_modules/three/examples/jsm/interactive/SelectionHelper.js new file mode 100644 index 0000000..613094e --- /dev/null +++ b/node_modules/three/examples/jsm/interactive/SelectionHelper.js @@ -0,0 +1,104 @@ +import { Vector2 } from 'three'; + +class SelectionHelper { + + constructor( renderer, cssClassName ) { + + this.element = document.createElement( 'div' ); + this.element.classList.add( cssClassName ); + this.element.style.pointerEvents = 'none'; + + this.renderer = renderer; + + this.startPoint = new Vector2(); + this.pointTopLeft = new Vector2(); + this.pointBottomRight = new Vector2(); + + this.isDown = false; + this.enabled = true; + + this.onPointerDown = function ( event ) { + + if ( this.enabled === false ) return; + + this.isDown = true; + this.onSelectStart( event ); + + }.bind( this ); + + this.onPointerMove = function ( event ) { + + if ( this.enabled === false ) return; + + if ( this.isDown ) { + + this.onSelectMove( event ); + + } + + }.bind( this ); + + this.onPointerUp = function ( ) { + + if ( this.enabled === false ) return; + + this.isDown = false; + this.onSelectOver(); + + }.bind( this ); + + this.renderer.domElement.addEventListener( 'pointerdown', this.onPointerDown ); + this.renderer.domElement.addEventListener( 'pointermove', this.onPointerMove ); + this.renderer.domElement.addEventListener( 'pointerup', this.onPointerUp ); + + } + + dispose() { + + this.renderer.domElement.removeEventListener( 'pointerdown', this.onPointerDown ); + this.renderer.domElement.removeEventListener( 'pointermove', this.onPointerMove ); + this.renderer.domElement.removeEventListener( 'pointerup', this.onPointerUp ); + + } + + onSelectStart( event ) { + + this.element.style.display = 'none'; + + this.renderer.domElement.parentElement.appendChild( this.element ); + + this.element.style.left = event.clientX + 'px'; + this.element.style.top = event.clientY + 'px'; + this.element.style.width = '0px'; + this.element.style.height = '0px'; + + this.startPoint.x = event.clientX; + this.startPoint.y = event.clientY; + + } + + onSelectMove( event ) { + + this.element.style.display = 'block'; + + this.pointBottomRight.x = Math.max( this.startPoint.x, event.clientX ); + this.pointBottomRight.y = Math.max( this.startPoint.y, event.clientY ); + this.pointTopLeft.x = Math.min( this.startPoint.x, event.clientX ); + this.pointTopLeft.y = Math.min( this.startPoint.y, event.clientY ); + + this.element.style.left = this.pointTopLeft.x + 'px'; + this.element.style.top = this.pointTopLeft.y + 'px'; + this.element.style.width = ( this.pointBottomRight.x - this.pointTopLeft.x ) + 'px'; + this.element.style.height = ( this.pointBottomRight.y - this.pointTopLeft.y ) + 'px'; + + } + + onSelectOver() { + + this.element.parentElement.removeChild( this.element ); + + } + +} + +export { SelectionHelper }; diff --git a/node_modules/three/examples/jsm/libs/ammo.wasm.js b/node_modules/three/examples/jsm/libs/ammo.wasm.js new file mode 100644 index 0000000..a7f835c --- /dev/null +++ b/node_modules/three/examples/jsm/libs/ammo.wasm.js @@ -0,0 +1,822 @@ + +// This is ammo.js, a port of Bullet Physics to JavaScript. zlib licensed. + +var Ammo = (function() { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; + return ( +function(Ammo) { + Ammo = Ammo || {}; + + +var b;b||(b=typeof Ammo !== 'undefined' ? Ammo : {});var ba;b.ready=new Promise(function(a){ba=a});var ca={},da;for(da in b)b.hasOwnProperty(da)&&(ca[da]=b[da]);var ea=!1,fa=!1,ha=!1,ia=!1;ea="object"===typeof window;fa="function"===typeof importScripts;ha="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node;ia=!ea&&!ha&&!fa;var ja="",ka,la,ma,na; +if(ha)ja=fa?require("path").dirname(ja)+"/":__dirname+"/",ka=function(a,c){ma||(ma=require("fs"));na||(na=require("path"));a=na.normalize(a);return ma.readFileSync(a,c?null:"utf8")},la=function(a){a=ka(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a},1>=2;d=za[a++];)Xa.push(105>d?Ca[++c>>1]:Aa[c]),++c;return Xa}var Za={f:function(){oa()},c:function(a,c,d){c=Ya(c,d);return Va[a].apply(null,c)},a:function(a,c,d){c=Ya(c,d);return Va[a].apply(null,c)},d:function(a,c,d){za.copyWithin(a,c,c+d)},e:function(){oa("OOM")},b:function(a){var c=Date.now();Aa[a>>2]=c/1E3|0;Aa[a+4>>2]=c%1E3*1E3|0;return 0},memory:sa,table:ua}; +(function(){function a(g){b.asm=g.exports;Ma--;b.monitorRunDependencies&&b.monitorRunDependencies(Ma);0==Ma&&(null!==Na&&(clearInterval(Na),Na=null),Oa&&(g=Oa,Oa=null,g()))}function c(g){a(g.instance)}function d(g){return Ua().then(function(n){return WebAssembly.instantiate(n,e)}).then(g,function(n){qa("failed to asynchronously prepare wasm: "+n);oa(n)})}var e={a:Za};Ma++;b.monitorRunDependencies&&b.monitorRunDependencies(Ma);if(b.instantiateWasm)try{return b.instantiateWasm(e,a)}catch(g){return qa("Module.instantiateWasm callback failed with error: "+ +g),!1}(function(){if(ra||"function"!==typeof WebAssembly.instantiateStreaming||Ra()||Pa("file://")||"function"!==typeof fetch)return d(c);fetch(Qa,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,e).then(c,function(n){qa("wasm streaming compile failed: "+n);qa("falling back to ArrayBuffer instantiation");return d(c)})})})();return{}})();var Wa=b.___wasm_call_ctors=function(){return(Wa=b.___wasm_call_ctors=b.asm.g).apply(null,arguments)}; +b.___em_js__array_bounds_check_error=function(){return(b.___em_js__array_bounds_check_error=b.asm.h).apply(null,arguments)}; +var $a=b._emscripten_bind_btCollisionWorld_getDispatcher_0=function(){return($a=b._emscripten_bind_btCollisionWorld_getDispatcher_0=b.asm.i).apply(null,arguments)},ab=b._emscripten_bind_btCollisionWorld_rayTest_3=function(){return(ab=b._emscripten_bind_btCollisionWorld_rayTest_3=b.asm.j).apply(null,arguments)},bb=b._emscripten_bind_btCollisionWorld_getPairCache_0=function(){return(bb=b._emscripten_bind_btCollisionWorld_getPairCache_0=b.asm.k).apply(null,arguments)},cb=b._emscripten_bind_btCollisionWorld_getDispatchInfo_0= +function(){return(cb=b._emscripten_bind_btCollisionWorld_getDispatchInfo_0=b.asm.l).apply(null,arguments)},db=b._emscripten_bind_btCollisionWorld_addCollisionObject_1=function(){return(db=b._emscripten_bind_btCollisionWorld_addCollisionObject_1=b.asm.m).apply(null,arguments)},eb=b._emscripten_bind_btCollisionWorld_addCollisionObject_2=function(){return(eb=b._emscripten_bind_btCollisionWorld_addCollisionObject_2=b.asm.n).apply(null,arguments)},fb=b._emscripten_bind_btCollisionWorld_addCollisionObject_3= +function(){return(fb=b._emscripten_bind_btCollisionWorld_addCollisionObject_3=b.asm.o).apply(null,arguments)},gb=b._emscripten_bind_btCollisionWorld_removeCollisionObject_1=function(){return(gb=b._emscripten_bind_btCollisionWorld_removeCollisionObject_1=b.asm.p).apply(null,arguments)},hb=b._emscripten_bind_btCollisionWorld_getBroadphase_0=function(){return(hb=b._emscripten_bind_btCollisionWorld_getBroadphase_0=b.asm.q).apply(null,arguments)},ib=b._emscripten_bind_btCollisionWorld_convexSweepTest_5= +function(){return(ib=b._emscripten_bind_btCollisionWorld_convexSweepTest_5=b.asm.r).apply(null,arguments)},jb=b._emscripten_bind_btCollisionWorld_contactPairTest_3=function(){return(jb=b._emscripten_bind_btCollisionWorld_contactPairTest_3=b.asm.s).apply(null,arguments)},kb=b._emscripten_bind_btCollisionWorld_contactTest_2=function(){return(kb=b._emscripten_bind_btCollisionWorld_contactTest_2=b.asm.t).apply(null,arguments)},lb=b._emscripten_bind_btCollisionWorld_updateSingleAabb_1=function(){return(lb= +b._emscripten_bind_btCollisionWorld_updateSingleAabb_1=b.asm.u).apply(null,arguments)},mb=b._emscripten_bind_btCollisionWorld_setDebugDrawer_1=function(){return(mb=b._emscripten_bind_btCollisionWorld_setDebugDrawer_1=b.asm.v).apply(null,arguments)},nb=b._emscripten_bind_btCollisionWorld_getDebugDrawer_0=function(){return(nb=b._emscripten_bind_btCollisionWorld_getDebugDrawer_0=b.asm.w).apply(null,arguments)},ob=b._emscripten_bind_btCollisionWorld_debugDrawWorld_0=function(){return(ob=b._emscripten_bind_btCollisionWorld_debugDrawWorld_0= +b.asm.x).apply(null,arguments)},pb=b._emscripten_bind_btCollisionWorld_debugDrawObject_3=function(){return(pb=b._emscripten_bind_btCollisionWorld_debugDrawObject_3=b.asm.y).apply(null,arguments)},qb=b._emscripten_bind_btCollisionWorld___destroy___0=function(){return(qb=b._emscripten_bind_btCollisionWorld___destroy___0=b.asm.z).apply(null,arguments)},rb=b._emscripten_bind_btCollisionShape_setLocalScaling_1=function(){return(rb=b._emscripten_bind_btCollisionShape_setLocalScaling_1=b.asm.A).apply(null, +arguments)},sb=b._emscripten_bind_btCollisionShape_getLocalScaling_0=function(){return(sb=b._emscripten_bind_btCollisionShape_getLocalScaling_0=b.asm.B).apply(null,arguments)},tb=b._emscripten_bind_btCollisionShape_calculateLocalInertia_2=function(){return(tb=b._emscripten_bind_btCollisionShape_calculateLocalInertia_2=b.asm.C).apply(null,arguments)},ub=b._emscripten_bind_btCollisionShape_setMargin_1=function(){return(ub=b._emscripten_bind_btCollisionShape_setMargin_1=b.asm.D).apply(null,arguments)}, +vb=b._emscripten_bind_btCollisionShape_getMargin_0=function(){return(vb=b._emscripten_bind_btCollisionShape_getMargin_0=b.asm.E).apply(null,arguments)},wb=b._emscripten_bind_btCollisionShape___destroy___0=function(){return(wb=b._emscripten_bind_btCollisionShape___destroy___0=b.asm.F).apply(null,arguments)},xb=b._emscripten_bind_btCollisionObject_setAnisotropicFriction_2=function(){return(xb=b._emscripten_bind_btCollisionObject_setAnisotropicFriction_2=b.asm.G).apply(null,arguments)},yb=b._emscripten_bind_btCollisionObject_getCollisionShape_0= +function(){return(yb=b._emscripten_bind_btCollisionObject_getCollisionShape_0=b.asm.H).apply(null,arguments)},zb=b._emscripten_bind_btCollisionObject_setContactProcessingThreshold_1=function(){return(zb=b._emscripten_bind_btCollisionObject_setContactProcessingThreshold_1=b.asm.I).apply(null,arguments)},Ab=b._emscripten_bind_btCollisionObject_setActivationState_1=function(){return(Ab=b._emscripten_bind_btCollisionObject_setActivationState_1=b.asm.J).apply(null,arguments)},Bb=b._emscripten_bind_btCollisionObject_forceActivationState_1= +function(){return(Bb=b._emscripten_bind_btCollisionObject_forceActivationState_1=b.asm.K).apply(null,arguments)},Cb=b._emscripten_bind_btCollisionObject_activate_0=function(){return(Cb=b._emscripten_bind_btCollisionObject_activate_0=b.asm.L).apply(null,arguments)},Db=b._emscripten_bind_btCollisionObject_activate_1=function(){return(Db=b._emscripten_bind_btCollisionObject_activate_1=b.asm.M).apply(null,arguments)},Eb=b._emscripten_bind_btCollisionObject_isActive_0=function(){return(Eb=b._emscripten_bind_btCollisionObject_isActive_0= +b.asm.N).apply(null,arguments)},Fb=b._emscripten_bind_btCollisionObject_isKinematicObject_0=function(){return(Fb=b._emscripten_bind_btCollisionObject_isKinematicObject_0=b.asm.O).apply(null,arguments)},Gb=b._emscripten_bind_btCollisionObject_isStaticObject_0=function(){return(Gb=b._emscripten_bind_btCollisionObject_isStaticObject_0=b.asm.P).apply(null,arguments)},Hb=b._emscripten_bind_btCollisionObject_isStaticOrKinematicObject_0=function(){return(Hb=b._emscripten_bind_btCollisionObject_isStaticOrKinematicObject_0= +b.asm.Q).apply(null,arguments)},Ib=b._emscripten_bind_btCollisionObject_getRestitution_0=function(){return(Ib=b._emscripten_bind_btCollisionObject_getRestitution_0=b.asm.R).apply(null,arguments)},Jb=b._emscripten_bind_btCollisionObject_getFriction_0=function(){return(Jb=b._emscripten_bind_btCollisionObject_getFriction_0=b.asm.S).apply(null,arguments)},Kb=b._emscripten_bind_btCollisionObject_getRollingFriction_0=function(){return(Kb=b._emscripten_bind_btCollisionObject_getRollingFriction_0=b.asm.T).apply(null, +arguments)},Lb=b._emscripten_bind_btCollisionObject_setRestitution_1=function(){return(Lb=b._emscripten_bind_btCollisionObject_setRestitution_1=b.asm.U).apply(null,arguments)},Mb=b._emscripten_bind_btCollisionObject_setFriction_1=function(){return(Mb=b._emscripten_bind_btCollisionObject_setFriction_1=b.asm.V).apply(null,arguments)},Nb=b._emscripten_bind_btCollisionObject_setRollingFriction_1=function(){return(Nb=b._emscripten_bind_btCollisionObject_setRollingFriction_1=b.asm.W).apply(null,arguments)}, +Ob=b._emscripten_bind_btCollisionObject_getWorldTransform_0=function(){return(Ob=b._emscripten_bind_btCollisionObject_getWorldTransform_0=b.asm.X).apply(null,arguments)},Pb=b._emscripten_bind_btCollisionObject_getCollisionFlags_0=function(){return(Pb=b._emscripten_bind_btCollisionObject_getCollisionFlags_0=b.asm.Y).apply(null,arguments)},Qb=b._emscripten_bind_btCollisionObject_setCollisionFlags_1=function(){return(Qb=b._emscripten_bind_btCollisionObject_setCollisionFlags_1=b.asm.Z).apply(null,arguments)}, +Sb=b._emscripten_bind_btCollisionObject_setWorldTransform_1=function(){return(Sb=b._emscripten_bind_btCollisionObject_setWorldTransform_1=b.asm._).apply(null,arguments)},Tb=b._emscripten_bind_btCollisionObject_setCollisionShape_1=function(){return(Tb=b._emscripten_bind_btCollisionObject_setCollisionShape_1=b.asm.$).apply(null,arguments)},Ub=b._emscripten_bind_btCollisionObject_setCcdMotionThreshold_1=function(){return(Ub=b._emscripten_bind_btCollisionObject_setCcdMotionThreshold_1=b.asm.aa).apply(null, +arguments)},Vb=b._emscripten_bind_btCollisionObject_setCcdSweptSphereRadius_1=function(){return(Vb=b._emscripten_bind_btCollisionObject_setCcdSweptSphereRadius_1=b.asm.ba).apply(null,arguments)},Wb=b._emscripten_bind_btCollisionObject_getUserIndex_0=function(){return(Wb=b._emscripten_bind_btCollisionObject_getUserIndex_0=b.asm.ca).apply(null,arguments)},Xb=b._emscripten_bind_btCollisionObject_setUserIndex_1=function(){return(Xb=b._emscripten_bind_btCollisionObject_setUserIndex_1=b.asm.da).apply(null, +arguments)},Yb=b._emscripten_bind_btCollisionObject_getUserPointer_0=function(){return(Yb=b._emscripten_bind_btCollisionObject_getUserPointer_0=b.asm.ea).apply(null,arguments)},Zb=b._emscripten_bind_btCollisionObject_setUserPointer_1=function(){return(Zb=b._emscripten_bind_btCollisionObject_setUserPointer_1=b.asm.fa).apply(null,arguments)},$b=b._emscripten_bind_btCollisionObject_getBroadphaseHandle_0=function(){return($b=b._emscripten_bind_btCollisionObject_getBroadphaseHandle_0=b.asm.ga).apply(null, +arguments)},ac=b._emscripten_bind_btCollisionObject___destroy___0=function(){return(ac=b._emscripten_bind_btCollisionObject___destroy___0=b.asm.ha).apply(null,arguments)},bc=b._emscripten_bind_btDynamicsWorld_addAction_1=function(){return(bc=b._emscripten_bind_btDynamicsWorld_addAction_1=b.asm.ia).apply(null,arguments)},cc=b._emscripten_bind_btDynamicsWorld_removeAction_1=function(){return(cc=b._emscripten_bind_btDynamicsWorld_removeAction_1=b.asm.ja).apply(null,arguments)},dc=b._emscripten_bind_btDynamicsWorld_getSolverInfo_0= +function(){return(dc=b._emscripten_bind_btDynamicsWorld_getSolverInfo_0=b.asm.ka).apply(null,arguments)},ec=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_1=function(){return(ec=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_1=b.asm.la).apply(null,arguments)},fc=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_2=function(){return(fc=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_2=b.asm.ma).apply(null,arguments)},hc=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_3= +function(){return(hc=b._emscripten_bind_btDynamicsWorld_setInternalTickCallback_3=b.asm.na).apply(null,arguments)},ic=b._emscripten_bind_btDynamicsWorld_getDispatcher_0=function(){return(ic=b._emscripten_bind_btDynamicsWorld_getDispatcher_0=b.asm.oa).apply(null,arguments)},jc=b._emscripten_bind_btDynamicsWorld_rayTest_3=function(){return(jc=b._emscripten_bind_btDynamicsWorld_rayTest_3=b.asm.pa).apply(null,arguments)},kc=b._emscripten_bind_btDynamicsWorld_getPairCache_0=function(){return(kc=b._emscripten_bind_btDynamicsWorld_getPairCache_0= +b.asm.qa).apply(null,arguments)},lc=b._emscripten_bind_btDynamicsWorld_getDispatchInfo_0=function(){return(lc=b._emscripten_bind_btDynamicsWorld_getDispatchInfo_0=b.asm.ra).apply(null,arguments)},mc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_1=function(){return(mc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_1=b.asm.sa).apply(null,arguments)},nc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_2=function(){return(nc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_2= +b.asm.ta).apply(null,arguments)},oc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_3=function(){return(oc=b._emscripten_bind_btDynamicsWorld_addCollisionObject_3=b.asm.ua).apply(null,arguments)},pc=b._emscripten_bind_btDynamicsWorld_removeCollisionObject_1=function(){return(pc=b._emscripten_bind_btDynamicsWorld_removeCollisionObject_1=b.asm.va).apply(null,arguments)},qc=b._emscripten_bind_btDynamicsWorld_getBroadphase_0=function(){return(qc=b._emscripten_bind_btDynamicsWorld_getBroadphase_0= +b.asm.wa).apply(null,arguments)},rc=b._emscripten_bind_btDynamicsWorld_convexSweepTest_5=function(){return(rc=b._emscripten_bind_btDynamicsWorld_convexSweepTest_5=b.asm.xa).apply(null,arguments)},sc=b._emscripten_bind_btDynamicsWorld_contactPairTest_3=function(){return(sc=b._emscripten_bind_btDynamicsWorld_contactPairTest_3=b.asm.ya).apply(null,arguments)},tc=b._emscripten_bind_btDynamicsWorld_contactTest_2=function(){return(tc=b._emscripten_bind_btDynamicsWorld_contactTest_2=b.asm.za).apply(null, +arguments)},uc=b._emscripten_bind_btDynamicsWorld_updateSingleAabb_1=function(){return(uc=b._emscripten_bind_btDynamicsWorld_updateSingleAabb_1=b.asm.Aa).apply(null,arguments)},vc=b._emscripten_bind_btDynamicsWorld_setDebugDrawer_1=function(){return(vc=b._emscripten_bind_btDynamicsWorld_setDebugDrawer_1=b.asm.Ba).apply(null,arguments)},wc=b._emscripten_bind_btDynamicsWorld_getDebugDrawer_0=function(){return(wc=b._emscripten_bind_btDynamicsWorld_getDebugDrawer_0=b.asm.Ca).apply(null,arguments)},xc= +b._emscripten_bind_btDynamicsWorld_debugDrawWorld_0=function(){return(xc=b._emscripten_bind_btDynamicsWorld_debugDrawWorld_0=b.asm.Da).apply(null,arguments)},yc=b._emscripten_bind_btDynamicsWorld_debugDrawObject_3=function(){return(yc=b._emscripten_bind_btDynamicsWorld_debugDrawObject_3=b.asm.Ea).apply(null,arguments)},zc=b._emscripten_bind_btDynamicsWorld___destroy___0=function(){return(zc=b._emscripten_bind_btDynamicsWorld___destroy___0=b.asm.Fa).apply(null,arguments)},Ac=b._emscripten_bind_btTypedConstraint_enableFeedback_1= +function(){return(Ac=b._emscripten_bind_btTypedConstraint_enableFeedback_1=b.asm.Ga).apply(null,arguments)},Bc=b._emscripten_bind_btTypedConstraint_getBreakingImpulseThreshold_0=function(){return(Bc=b._emscripten_bind_btTypedConstraint_getBreakingImpulseThreshold_0=b.asm.Ha).apply(null,arguments)},Cc=b._emscripten_bind_btTypedConstraint_setBreakingImpulseThreshold_1=function(){return(Cc=b._emscripten_bind_btTypedConstraint_setBreakingImpulseThreshold_1=b.asm.Ia).apply(null,arguments)},Dc=b._emscripten_bind_btTypedConstraint_getParam_2= +function(){return(Dc=b._emscripten_bind_btTypedConstraint_getParam_2=b.asm.Ja).apply(null,arguments)},Ec=b._emscripten_bind_btTypedConstraint_setParam_3=function(){return(Ec=b._emscripten_bind_btTypedConstraint_setParam_3=b.asm.Ka).apply(null,arguments)},Fc=b._emscripten_bind_btTypedConstraint___destroy___0=function(){return(Fc=b._emscripten_bind_btTypedConstraint___destroy___0=b.asm.La).apply(null,arguments)},Gc=b._emscripten_bind_btConcaveShape_setLocalScaling_1=function(){return(Gc=b._emscripten_bind_btConcaveShape_setLocalScaling_1= +b.asm.Ma).apply(null,arguments)},Hc=b._emscripten_bind_btConcaveShape_getLocalScaling_0=function(){return(Hc=b._emscripten_bind_btConcaveShape_getLocalScaling_0=b.asm.Na).apply(null,arguments)},Ic=b._emscripten_bind_btConcaveShape_calculateLocalInertia_2=function(){return(Ic=b._emscripten_bind_btConcaveShape_calculateLocalInertia_2=b.asm.Oa).apply(null,arguments)},Jc=b._emscripten_bind_btConcaveShape___destroy___0=function(){return(Jc=b._emscripten_bind_btConcaveShape___destroy___0=b.asm.Pa).apply(null, +arguments)},Kc=b._emscripten_bind_btCapsuleShape_btCapsuleShape_2=function(){return(Kc=b._emscripten_bind_btCapsuleShape_btCapsuleShape_2=b.asm.Qa).apply(null,arguments)},Lc=b._emscripten_bind_btCapsuleShape_setMargin_1=function(){return(Lc=b._emscripten_bind_btCapsuleShape_setMargin_1=b.asm.Ra).apply(null,arguments)},Mc=b._emscripten_bind_btCapsuleShape_getMargin_0=function(){return(Mc=b._emscripten_bind_btCapsuleShape_getMargin_0=b.asm.Sa).apply(null,arguments)},Nc=b._emscripten_bind_btCapsuleShape_getUpAxis_0= +function(){return(Nc=b._emscripten_bind_btCapsuleShape_getUpAxis_0=b.asm.Ta).apply(null,arguments)},Oc=b._emscripten_bind_btCapsuleShape_getRadius_0=function(){return(Oc=b._emscripten_bind_btCapsuleShape_getRadius_0=b.asm.Ua).apply(null,arguments)},Pc=b._emscripten_bind_btCapsuleShape_getHalfHeight_0=function(){return(Pc=b._emscripten_bind_btCapsuleShape_getHalfHeight_0=b.asm.Va).apply(null,arguments)},Qc=b._emscripten_bind_btCapsuleShape_setLocalScaling_1=function(){return(Qc=b._emscripten_bind_btCapsuleShape_setLocalScaling_1= +b.asm.Wa).apply(null,arguments)},Rc=b._emscripten_bind_btCapsuleShape_getLocalScaling_0=function(){return(Rc=b._emscripten_bind_btCapsuleShape_getLocalScaling_0=b.asm.Xa).apply(null,arguments)},Sc=b._emscripten_bind_btCapsuleShape_calculateLocalInertia_2=function(){return(Sc=b._emscripten_bind_btCapsuleShape_calculateLocalInertia_2=b.asm.Ya).apply(null,arguments)},Tc=b._emscripten_bind_btCapsuleShape___destroy___0=function(){return(Tc=b._emscripten_bind_btCapsuleShape___destroy___0=b.asm.Za).apply(null, +arguments)},Uc=b._emscripten_bind_btIDebugDraw_drawLine_3=function(){return(Uc=b._emscripten_bind_btIDebugDraw_drawLine_3=b.asm._a).apply(null,arguments)},Vc=b._emscripten_bind_btIDebugDraw_drawContactPoint_5=function(){return(Vc=b._emscripten_bind_btIDebugDraw_drawContactPoint_5=b.asm.$a).apply(null,arguments)},Wc=b._emscripten_bind_btIDebugDraw_reportErrorWarning_1=function(){return(Wc=b._emscripten_bind_btIDebugDraw_reportErrorWarning_1=b.asm.ab).apply(null,arguments)},Xc=b._emscripten_bind_btIDebugDraw_draw3dText_2= +function(){return(Xc=b._emscripten_bind_btIDebugDraw_draw3dText_2=b.asm.bb).apply(null,arguments)},Yc=b._emscripten_bind_btIDebugDraw_setDebugMode_1=function(){return(Yc=b._emscripten_bind_btIDebugDraw_setDebugMode_1=b.asm.cb).apply(null,arguments)},Zc=b._emscripten_bind_btIDebugDraw_getDebugMode_0=function(){return(Zc=b._emscripten_bind_btIDebugDraw_getDebugMode_0=b.asm.db).apply(null,arguments)},$c=b._emscripten_bind_btIDebugDraw___destroy___0=function(){return($c=b._emscripten_bind_btIDebugDraw___destroy___0= +b.asm.eb).apply(null,arguments)},ad=b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_0=function(){return(ad=b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_0=b.asm.fb).apply(null,arguments)},bd=b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_1=function(){return(bd=b._emscripten_bind_btDefaultCollisionConfiguration_btDefaultCollisionConfiguration_1=b.asm.gb).apply(null,arguments)},cd=b._emscripten_bind_btDefaultCollisionConfiguration___destroy___0= +function(){return(cd=b._emscripten_bind_btDefaultCollisionConfiguration___destroy___0=b.asm.hb).apply(null,arguments)},dd=b._emscripten_bind_btTriangleMeshShape_setLocalScaling_1=function(){return(dd=b._emscripten_bind_btTriangleMeshShape_setLocalScaling_1=b.asm.ib).apply(null,arguments)},ed=b._emscripten_bind_btTriangleMeshShape_getLocalScaling_0=function(){return(ed=b._emscripten_bind_btTriangleMeshShape_getLocalScaling_0=b.asm.jb).apply(null,arguments)},fd=b._emscripten_bind_btTriangleMeshShape_calculateLocalInertia_2= +function(){return(fd=b._emscripten_bind_btTriangleMeshShape_calculateLocalInertia_2=b.asm.kb).apply(null,arguments)},gd=b._emscripten_bind_btTriangleMeshShape___destroy___0=function(){return(gd=b._emscripten_bind_btTriangleMeshShape___destroy___0=b.asm.lb).apply(null,arguments)},hd=b._emscripten_bind_btGhostObject_btGhostObject_0=function(){return(hd=b._emscripten_bind_btGhostObject_btGhostObject_0=b.asm.mb).apply(null,arguments)},id=b._emscripten_bind_btGhostObject_getNumOverlappingObjects_0=function(){return(id= +b._emscripten_bind_btGhostObject_getNumOverlappingObjects_0=b.asm.nb).apply(null,arguments)},jd=b._emscripten_bind_btGhostObject_getOverlappingObject_1=function(){return(jd=b._emscripten_bind_btGhostObject_getOverlappingObject_1=b.asm.ob).apply(null,arguments)},kd=b._emscripten_bind_btGhostObject_setAnisotropicFriction_2=function(){return(kd=b._emscripten_bind_btGhostObject_setAnisotropicFriction_2=b.asm.pb).apply(null,arguments)},ld=b._emscripten_bind_btGhostObject_getCollisionShape_0=function(){return(ld= +b._emscripten_bind_btGhostObject_getCollisionShape_0=b.asm.qb).apply(null,arguments)},md=b._emscripten_bind_btGhostObject_setContactProcessingThreshold_1=function(){return(md=b._emscripten_bind_btGhostObject_setContactProcessingThreshold_1=b.asm.rb).apply(null,arguments)},nd=b._emscripten_bind_btGhostObject_setActivationState_1=function(){return(nd=b._emscripten_bind_btGhostObject_setActivationState_1=b.asm.sb).apply(null,arguments)},od=b._emscripten_bind_btGhostObject_forceActivationState_1=function(){return(od= +b._emscripten_bind_btGhostObject_forceActivationState_1=b.asm.tb).apply(null,arguments)},pd=b._emscripten_bind_btGhostObject_activate_0=function(){return(pd=b._emscripten_bind_btGhostObject_activate_0=b.asm.ub).apply(null,arguments)},qd=b._emscripten_bind_btGhostObject_activate_1=function(){return(qd=b._emscripten_bind_btGhostObject_activate_1=b.asm.vb).apply(null,arguments)},rd=b._emscripten_bind_btGhostObject_isActive_0=function(){return(rd=b._emscripten_bind_btGhostObject_isActive_0=b.asm.wb).apply(null, +arguments)},sd=b._emscripten_bind_btGhostObject_isKinematicObject_0=function(){return(sd=b._emscripten_bind_btGhostObject_isKinematicObject_0=b.asm.xb).apply(null,arguments)},td=b._emscripten_bind_btGhostObject_isStaticObject_0=function(){return(td=b._emscripten_bind_btGhostObject_isStaticObject_0=b.asm.yb).apply(null,arguments)},ud=b._emscripten_bind_btGhostObject_isStaticOrKinematicObject_0=function(){return(ud=b._emscripten_bind_btGhostObject_isStaticOrKinematicObject_0=b.asm.zb).apply(null,arguments)}, +vd=b._emscripten_bind_btGhostObject_getRestitution_0=function(){return(vd=b._emscripten_bind_btGhostObject_getRestitution_0=b.asm.Ab).apply(null,arguments)},wd=b._emscripten_bind_btGhostObject_getFriction_0=function(){return(wd=b._emscripten_bind_btGhostObject_getFriction_0=b.asm.Bb).apply(null,arguments)},xd=b._emscripten_bind_btGhostObject_getRollingFriction_0=function(){return(xd=b._emscripten_bind_btGhostObject_getRollingFriction_0=b.asm.Cb).apply(null,arguments)},yd=b._emscripten_bind_btGhostObject_setRestitution_1= +function(){return(yd=b._emscripten_bind_btGhostObject_setRestitution_1=b.asm.Db).apply(null,arguments)},zd=b._emscripten_bind_btGhostObject_setFriction_1=function(){return(zd=b._emscripten_bind_btGhostObject_setFriction_1=b.asm.Eb).apply(null,arguments)},Ad=b._emscripten_bind_btGhostObject_setRollingFriction_1=function(){return(Ad=b._emscripten_bind_btGhostObject_setRollingFriction_1=b.asm.Fb).apply(null,arguments)},Bd=b._emscripten_bind_btGhostObject_getWorldTransform_0=function(){return(Bd=b._emscripten_bind_btGhostObject_getWorldTransform_0= +b.asm.Gb).apply(null,arguments)},Cd=b._emscripten_bind_btGhostObject_getCollisionFlags_0=function(){return(Cd=b._emscripten_bind_btGhostObject_getCollisionFlags_0=b.asm.Hb).apply(null,arguments)},Dd=b._emscripten_bind_btGhostObject_setCollisionFlags_1=function(){return(Dd=b._emscripten_bind_btGhostObject_setCollisionFlags_1=b.asm.Ib).apply(null,arguments)},Ed=b._emscripten_bind_btGhostObject_setWorldTransform_1=function(){return(Ed=b._emscripten_bind_btGhostObject_setWorldTransform_1=b.asm.Jb).apply(null, +arguments)},Fd=b._emscripten_bind_btGhostObject_setCollisionShape_1=function(){return(Fd=b._emscripten_bind_btGhostObject_setCollisionShape_1=b.asm.Kb).apply(null,arguments)},Gd=b._emscripten_bind_btGhostObject_setCcdMotionThreshold_1=function(){return(Gd=b._emscripten_bind_btGhostObject_setCcdMotionThreshold_1=b.asm.Lb).apply(null,arguments)},Hd=b._emscripten_bind_btGhostObject_setCcdSweptSphereRadius_1=function(){return(Hd=b._emscripten_bind_btGhostObject_setCcdSweptSphereRadius_1=b.asm.Mb).apply(null, +arguments)},Id=b._emscripten_bind_btGhostObject_getUserIndex_0=function(){return(Id=b._emscripten_bind_btGhostObject_getUserIndex_0=b.asm.Nb).apply(null,arguments)},Jd=b._emscripten_bind_btGhostObject_setUserIndex_1=function(){return(Jd=b._emscripten_bind_btGhostObject_setUserIndex_1=b.asm.Ob).apply(null,arguments)},Kd=b._emscripten_bind_btGhostObject_getUserPointer_0=function(){return(Kd=b._emscripten_bind_btGhostObject_getUserPointer_0=b.asm.Pb).apply(null,arguments)},Ld=b._emscripten_bind_btGhostObject_setUserPointer_1= +function(){return(Ld=b._emscripten_bind_btGhostObject_setUserPointer_1=b.asm.Qb).apply(null,arguments)},Md=b._emscripten_bind_btGhostObject_getBroadphaseHandle_0=function(){return(Md=b._emscripten_bind_btGhostObject_getBroadphaseHandle_0=b.asm.Rb).apply(null,arguments)},Nd=b._emscripten_bind_btGhostObject___destroy___0=function(){return(Nd=b._emscripten_bind_btGhostObject___destroy___0=b.asm.Sb).apply(null,arguments)},Od=b._emscripten_bind_btConeShape_btConeShape_2=function(){return(Od=b._emscripten_bind_btConeShape_btConeShape_2= +b.asm.Tb).apply(null,arguments)},Pd=b._emscripten_bind_btConeShape_setLocalScaling_1=function(){return(Pd=b._emscripten_bind_btConeShape_setLocalScaling_1=b.asm.Ub).apply(null,arguments)},Qd=b._emscripten_bind_btConeShape_getLocalScaling_0=function(){return(Qd=b._emscripten_bind_btConeShape_getLocalScaling_0=b.asm.Vb).apply(null,arguments)},Rd=b._emscripten_bind_btConeShape_calculateLocalInertia_2=function(){return(Rd=b._emscripten_bind_btConeShape_calculateLocalInertia_2=b.asm.Wb).apply(null,arguments)}, +Sd=b._emscripten_bind_btConeShape___destroy___0=function(){return(Sd=b._emscripten_bind_btConeShape___destroy___0=b.asm.Xb).apply(null,arguments)},Td=b._emscripten_bind_btActionInterface_updateAction_2=function(){return(Td=b._emscripten_bind_btActionInterface_updateAction_2=b.asm.Yb).apply(null,arguments)},Ud=b._emscripten_bind_btActionInterface___destroy___0=function(){return(Ud=b._emscripten_bind_btActionInterface___destroy___0=b.asm.Zb).apply(null,arguments)},Vd=b._emscripten_bind_btVector3_btVector3_0= +function(){return(Vd=b._emscripten_bind_btVector3_btVector3_0=b.asm._b).apply(null,arguments)},Wd=b._emscripten_bind_btVector3_btVector3_3=function(){return(Wd=b._emscripten_bind_btVector3_btVector3_3=b.asm.$b).apply(null,arguments)},Xd=b._emscripten_bind_btVector3_length_0=function(){return(Xd=b._emscripten_bind_btVector3_length_0=b.asm.ac).apply(null,arguments)},Yd=b._emscripten_bind_btVector3_x_0=function(){return(Yd=b._emscripten_bind_btVector3_x_0=b.asm.bc).apply(null,arguments)},Zd=b._emscripten_bind_btVector3_y_0= +function(){return(Zd=b._emscripten_bind_btVector3_y_0=b.asm.cc).apply(null,arguments)},$d=b._emscripten_bind_btVector3_z_0=function(){return($d=b._emscripten_bind_btVector3_z_0=b.asm.dc).apply(null,arguments)},ae=b._emscripten_bind_btVector3_setX_1=function(){return(ae=b._emscripten_bind_btVector3_setX_1=b.asm.ec).apply(null,arguments)},be=b._emscripten_bind_btVector3_setY_1=function(){return(be=b._emscripten_bind_btVector3_setY_1=b.asm.fc).apply(null,arguments)},ce=b._emscripten_bind_btVector3_setZ_1= +function(){return(ce=b._emscripten_bind_btVector3_setZ_1=b.asm.gc).apply(null,arguments)},de=b._emscripten_bind_btVector3_setValue_3=function(){return(de=b._emscripten_bind_btVector3_setValue_3=b.asm.hc).apply(null,arguments)},ee=b._emscripten_bind_btVector3_normalize_0=function(){return(ee=b._emscripten_bind_btVector3_normalize_0=b.asm.ic).apply(null,arguments)},fe=b._emscripten_bind_btVector3_rotate_2=function(){return(fe=b._emscripten_bind_btVector3_rotate_2=b.asm.jc).apply(null,arguments)},ge= +b._emscripten_bind_btVector3_dot_1=function(){return(ge=b._emscripten_bind_btVector3_dot_1=b.asm.kc).apply(null,arguments)},he=b._emscripten_bind_btVector3_op_mul_1=function(){return(he=b._emscripten_bind_btVector3_op_mul_1=b.asm.lc).apply(null,arguments)},ie=b._emscripten_bind_btVector3_op_add_1=function(){return(ie=b._emscripten_bind_btVector3_op_add_1=b.asm.mc).apply(null,arguments)},je=b._emscripten_bind_btVector3_op_sub_1=function(){return(je=b._emscripten_bind_btVector3_op_sub_1=b.asm.nc).apply(null, +arguments)},ke=b._emscripten_bind_btVector3___destroy___0=function(){return(ke=b._emscripten_bind_btVector3___destroy___0=b.asm.oc).apply(null,arguments)},le=b._emscripten_bind_btVehicleRaycaster_castRay_3=function(){return(le=b._emscripten_bind_btVehicleRaycaster_castRay_3=b.asm.pc).apply(null,arguments)},me=b._emscripten_bind_btVehicleRaycaster___destroy___0=function(){return(me=b._emscripten_bind_btVehicleRaycaster___destroy___0=b.asm.qc).apply(null,arguments)},ne=b._emscripten_bind_btQuadWord_x_0= +function(){return(ne=b._emscripten_bind_btQuadWord_x_0=b.asm.rc).apply(null,arguments)},oe=b._emscripten_bind_btQuadWord_y_0=function(){return(oe=b._emscripten_bind_btQuadWord_y_0=b.asm.sc).apply(null,arguments)},pe=b._emscripten_bind_btQuadWord_z_0=function(){return(pe=b._emscripten_bind_btQuadWord_z_0=b.asm.tc).apply(null,arguments)},qe=b._emscripten_bind_btQuadWord_w_0=function(){return(qe=b._emscripten_bind_btQuadWord_w_0=b.asm.uc).apply(null,arguments)},re=b._emscripten_bind_btQuadWord_setX_1= +function(){return(re=b._emscripten_bind_btQuadWord_setX_1=b.asm.vc).apply(null,arguments)},se=b._emscripten_bind_btQuadWord_setY_1=function(){return(se=b._emscripten_bind_btQuadWord_setY_1=b.asm.wc).apply(null,arguments)},te=b._emscripten_bind_btQuadWord_setZ_1=function(){return(te=b._emscripten_bind_btQuadWord_setZ_1=b.asm.xc).apply(null,arguments)},ue=b._emscripten_bind_btQuadWord_setW_1=function(){return(ue=b._emscripten_bind_btQuadWord_setW_1=b.asm.yc).apply(null,arguments)},ve=b._emscripten_bind_btQuadWord___destroy___0= +function(){return(ve=b._emscripten_bind_btQuadWord___destroy___0=b.asm.zc).apply(null,arguments)},we=b._emscripten_bind_btCylinderShape_btCylinderShape_1=function(){return(we=b._emscripten_bind_btCylinderShape_btCylinderShape_1=b.asm.Ac).apply(null,arguments)},xe=b._emscripten_bind_btCylinderShape_setMargin_1=function(){return(xe=b._emscripten_bind_btCylinderShape_setMargin_1=b.asm.Bc).apply(null,arguments)},ye=b._emscripten_bind_btCylinderShape_getMargin_0=function(){return(ye=b._emscripten_bind_btCylinderShape_getMargin_0= +b.asm.Cc).apply(null,arguments)},ze=b._emscripten_bind_btCylinderShape_setLocalScaling_1=function(){return(ze=b._emscripten_bind_btCylinderShape_setLocalScaling_1=b.asm.Dc).apply(null,arguments)},Ae=b._emscripten_bind_btCylinderShape_getLocalScaling_0=function(){return(Ae=b._emscripten_bind_btCylinderShape_getLocalScaling_0=b.asm.Ec).apply(null,arguments)},Be=b._emscripten_bind_btCylinderShape_calculateLocalInertia_2=function(){return(Be=b._emscripten_bind_btCylinderShape_calculateLocalInertia_2= +b.asm.Fc).apply(null,arguments)},Ce=b._emscripten_bind_btCylinderShape___destroy___0=function(){return(Ce=b._emscripten_bind_btCylinderShape___destroy___0=b.asm.Gc).apply(null,arguments)},De=b._emscripten_bind_btDiscreteDynamicsWorld_btDiscreteDynamicsWorld_4=function(){return(De=b._emscripten_bind_btDiscreteDynamicsWorld_btDiscreteDynamicsWorld_4=b.asm.Hc).apply(null,arguments)},Ee=b._emscripten_bind_btDiscreteDynamicsWorld_setGravity_1=function(){return(Ee=b._emscripten_bind_btDiscreteDynamicsWorld_setGravity_1= +b.asm.Ic).apply(null,arguments)},Fe=b._emscripten_bind_btDiscreteDynamicsWorld_getGravity_0=function(){return(Fe=b._emscripten_bind_btDiscreteDynamicsWorld_getGravity_0=b.asm.Jc).apply(null,arguments)},Ge=b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_1=function(){return(Ge=b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_1=b.asm.Kc).apply(null,arguments)},He=b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_3=function(){return(He=b._emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_3= +b.asm.Lc).apply(null,arguments)},Ie=b._emscripten_bind_btDiscreteDynamicsWorld_removeRigidBody_1=function(){return(Ie=b._emscripten_bind_btDiscreteDynamicsWorld_removeRigidBody_1=b.asm.Mc).apply(null,arguments)},Je=b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_1=function(){return(Je=b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_1=b.asm.Nc).apply(null,arguments)},Ke=b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_2=function(){return(Ke=b._emscripten_bind_btDiscreteDynamicsWorld_addConstraint_2= +b.asm.Oc).apply(null,arguments)},Le=b._emscripten_bind_btDiscreteDynamicsWorld_removeConstraint_1=function(){return(Le=b._emscripten_bind_btDiscreteDynamicsWorld_removeConstraint_1=b.asm.Pc).apply(null,arguments)},Me=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_1=function(){return(Me=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_1=b.asm.Qc).apply(null,arguments)},Ne=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_2=function(){return(Ne=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_2= +b.asm.Rc).apply(null,arguments)},Oe=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_3=function(){return(Oe=b._emscripten_bind_btDiscreteDynamicsWorld_stepSimulation_3=b.asm.Sc).apply(null,arguments)},Pe=b._emscripten_bind_btDiscreteDynamicsWorld_setContactAddedCallback_1=function(){return(Pe=b._emscripten_bind_btDiscreteDynamicsWorld_setContactAddedCallback_1=b.asm.Tc).apply(null,arguments)},Qe=b._emscripten_bind_btDiscreteDynamicsWorld_setContactProcessedCallback_1=function(){return(Qe= +b._emscripten_bind_btDiscreteDynamicsWorld_setContactProcessedCallback_1=b.asm.Uc).apply(null,arguments)},Re=b._emscripten_bind_btDiscreteDynamicsWorld_setContactDestroyedCallback_1=function(){return(Re=b._emscripten_bind_btDiscreteDynamicsWorld_setContactDestroyedCallback_1=b.asm.Vc).apply(null,arguments)},Se=b._emscripten_bind_btDiscreteDynamicsWorld_getDispatcher_0=function(){return(Se=b._emscripten_bind_btDiscreteDynamicsWorld_getDispatcher_0=b.asm.Wc).apply(null,arguments)},Te=b._emscripten_bind_btDiscreteDynamicsWorld_rayTest_3= +function(){return(Te=b._emscripten_bind_btDiscreteDynamicsWorld_rayTest_3=b.asm.Xc).apply(null,arguments)},Ue=b._emscripten_bind_btDiscreteDynamicsWorld_getPairCache_0=function(){return(Ue=b._emscripten_bind_btDiscreteDynamicsWorld_getPairCache_0=b.asm.Yc).apply(null,arguments)},Ve=b._emscripten_bind_btDiscreteDynamicsWorld_getDispatchInfo_0=function(){return(Ve=b._emscripten_bind_btDiscreteDynamicsWorld_getDispatchInfo_0=b.asm.Zc).apply(null,arguments)},We=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_1= +function(){return(We=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_1=b.asm._c).apply(null,arguments)},Xe=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_2=function(){return(Xe=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_2=b.asm.$c).apply(null,arguments)},Ye=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_3=function(){return(Ye=b._emscripten_bind_btDiscreteDynamicsWorld_addCollisionObject_3=b.asm.ad).apply(null,arguments)},Ze=b._emscripten_bind_btDiscreteDynamicsWorld_removeCollisionObject_1= +function(){return(Ze=b._emscripten_bind_btDiscreteDynamicsWorld_removeCollisionObject_1=b.asm.bd).apply(null,arguments)},$e=b._emscripten_bind_btDiscreteDynamicsWorld_getBroadphase_0=function(){return($e=b._emscripten_bind_btDiscreteDynamicsWorld_getBroadphase_0=b.asm.cd).apply(null,arguments)},af=b._emscripten_bind_btDiscreteDynamicsWorld_convexSweepTest_5=function(){return(af=b._emscripten_bind_btDiscreteDynamicsWorld_convexSweepTest_5=b.asm.dd).apply(null,arguments)},bf=b._emscripten_bind_btDiscreteDynamicsWorld_contactPairTest_3= +function(){return(bf=b._emscripten_bind_btDiscreteDynamicsWorld_contactPairTest_3=b.asm.ed).apply(null,arguments)},cf=b._emscripten_bind_btDiscreteDynamicsWorld_contactTest_2=function(){return(cf=b._emscripten_bind_btDiscreteDynamicsWorld_contactTest_2=b.asm.fd).apply(null,arguments)},df=b._emscripten_bind_btDiscreteDynamicsWorld_updateSingleAabb_1=function(){return(df=b._emscripten_bind_btDiscreteDynamicsWorld_updateSingleAabb_1=b.asm.gd).apply(null,arguments)},ef=b._emscripten_bind_btDiscreteDynamicsWorld_setDebugDrawer_1= +function(){return(ef=b._emscripten_bind_btDiscreteDynamicsWorld_setDebugDrawer_1=b.asm.hd).apply(null,arguments)},ff=b._emscripten_bind_btDiscreteDynamicsWorld_getDebugDrawer_0=function(){return(ff=b._emscripten_bind_btDiscreteDynamicsWorld_getDebugDrawer_0=b.asm.id).apply(null,arguments)},gf=b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawWorld_0=function(){return(gf=b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawWorld_0=b.asm.jd).apply(null,arguments)},hf=b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawObject_3= +function(){return(hf=b._emscripten_bind_btDiscreteDynamicsWorld_debugDrawObject_3=b.asm.kd).apply(null,arguments)},jf=b._emscripten_bind_btDiscreteDynamicsWorld_addAction_1=function(){return(jf=b._emscripten_bind_btDiscreteDynamicsWorld_addAction_1=b.asm.ld).apply(null,arguments)},kf=b._emscripten_bind_btDiscreteDynamicsWorld_removeAction_1=function(){return(kf=b._emscripten_bind_btDiscreteDynamicsWorld_removeAction_1=b.asm.md).apply(null,arguments)},lf=b._emscripten_bind_btDiscreteDynamicsWorld_getSolverInfo_0= +function(){return(lf=b._emscripten_bind_btDiscreteDynamicsWorld_getSolverInfo_0=b.asm.nd).apply(null,arguments)},mf=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_1=function(){return(mf=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_1=b.asm.od).apply(null,arguments)},nf=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_2=function(){return(nf=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_2=b.asm.pd).apply(null,arguments)}, +of=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_3=function(){return(of=b._emscripten_bind_btDiscreteDynamicsWorld_setInternalTickCallback_3=b.asm.qd).apply(null,arguments)},pf=b._emscripten_bind_btDiscreteDynamicsWorld___destroy___0=function(){return(pf=b._emscripten_bind_btDiscreteDynamicsWorld___destroy___0=b.asm.rd).apply(null,arguments)},qf=b._emscripten_bind_btConvexShape_setLocalScaling_1=function(){return(qf=b._emscripten_bind_btConvexShape_setLocalScaling_1=b.asm.sd).apply(null, +arguments)},rf=b._emscripten_bind_btConvexShape_getLocalScaling_0=function(){return(rf=b._emscripten_bind_btConvexShape_getLocalScaling_0=b.asm.td).apply(null,arguments)},sf=b._emscripten_bind_btConvexShape_calculateLocalInertia_2=function(){return(sf=b._emscripten_bind_btConvexShape_calculateLocalInertia_2=b.asm.ud).apply(null,arguments)},tf=b._emscripten_bind_btConvexShape_setMargin_1=function(){return(tf=b._emscripten_bind_btConvexShape_setMargin_1=b.asm.vd).apply(null,arguments)},uf=b._emscripten_bind_btConvexShape_getMargin_0= +function(){return(uf=b._emscripten_bind_btConvexShape_getMargin_0=b.asm.wd).apply(null,arguments)},vf=b._emscripten_bind_btConvexShape___destroy___0=function(){return(vf=b._emscripten_bind_btConvexShape___destroy___0=b.asm.xd).apply(null,arguments)},wf=b._emscripten_bind_btDispatcher_getNumManifolds_0=function(){return(wf=b._emscripten_bind_btDispatcher_getNumManifolds_0=b.asm.yd).apply(null,arguments)},xf=b._emscripten_bind_btDispatcher_getManifoldByIndexInternal_1=function(){return(xf=b._emscripten_bind_btDispatcher_getManifoldByIndexInternal_1= +b.asm.zd).apply(null,arguments)},yf=b._emscripten_bind_btDispatcher___destroy___0=function(){return(yf=b._emscripten_bind_btDispatcher___destroy___0=b.asm.Ad).apply(null,arguments)},zf=b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_3=function(){return(zf=b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_3=b.asm.Bd).apply(null,arguments)},Af=b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_5=function(){return(Af=b._emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_5= +b.asm.Cd).apply(null,arguments)},Bf=b._emscripten_bind_btGeneric6DofConstraint_setLinearLowerLimit_1=function(){return(Bf=b._emscripten_bind_btGeneric6DofConstraint_setLinearLowerLimit_1=b.asm.Dd).apply(null,arguments)},Cf=b._emscripten_bind_btGeneric6DofConstraint_setLinearUpperLimit_1=function(){return(Cf=b._emscripten_bind_btGeneric6DofConstraint_setLinearUpperLimit_1=b.asm.Ed).apply(null,arguments)},Df=b._emscripten_bind_btGeneric6DofConstraint_setAngularLowerLimit_1=function(){return(Df=b._emscripten_bind_btGeneric6DofConstraint_setAngularLowerLimit_1= +b.asm.Fd).apply(null,arguments)},Ef=b._emscripten_bind_btGeneric6DofConstraint_setAngularUpperLimit_1=function(){return(Ef=b._emscripten_bind_btGeneric6DofConstraint_setAngularUpperLimit_1=b.asm.Gd).apply(null,arguments)},Ff=b._emscripten_bind_btGeneric6DofConstraint_getFrameOffsetA_0=function(){return(Ff=b._emscripten_bind_btGeneric6DofConstraint_getFrameOffsetA_0=b.asm.Hd).apply(null,arguments)},Gf=b._emscripten_bind_btGeneric6DofConstraint_enableFeedback_1=function(){return(Gf=b._emscripten_bind_btGeneric6DofConstraint_enableFeedback_1= +b.asm.Id).apply(null,arguments)},Hf=b._emscripten_bind_btGeneric6DofConstraint_getBreakingImpulseThreshold_0=function(){return(Hf=b._emscripten_bind_btGeneric6DofConstraint_getBreakingImpulseThreshold_0=b.asm.Jd).apply(null,arguments)},If=b._emscripten_bind_btGeneric6DofConstraint_setBreakingImpulseThreshold_1=function(){return(If=b._emscripten_bind_btGeneric6DofConstraint_setBreakingImpulseThreshold_1=b.asm.Kd).apply(null,arguments)},Jf=b._emscripten_bind_btGeneric6DofConstraint_getParam_2=function(){return(Jf= +b._emscripten_bind_btGeneric6DofConstraint_getParam_2=b.asm.Ld).apply(null,arguments)},Kf=b._emscripten_bind_btGeneric6DofConstraint_setParam_3=function(){return(Kf=b._emscripten_bind_btGeneric6DofConstraint_setParam_3=b.asm.Md).apply(null,arguments)},Lf=b._emscripten_bind_btGeneric6DofConstraint___destroy___0=function(){return(Lf=b._emscripten_bind_btGeneric6DofConstraint___destroy___0=b.asm.Nd).apply(null,arguments)},Mf=b._emscripten_bind_btStridingMeshInterface_setScaling_1=function(){return(Mf= +b._emscripten_bind_btStridingMeshInterface_setScaling_1=b.asm.Od).apply(null,arguments)},Nf=b._emscripten_bind_btStridingMeshInterface___destroy___0=function(){return(Nf=b._emscripten_bind_btStridingMeshInterface___destroy___0=b.asm.Pd).apply(null,arguments)},Of=b._emscripten_bind_btMotionState_getWorldTransform_1=function(){return(Of=b._emscripten_bind_btMotionState_getWorldTransform_1=b.asm.Qd).apply(null,arguments)},Pf=b._emscripten_bind_btMotionState_setWorldTransform_1=function(){return(Pf=b._emscripten_bind_btMotionState_setWorldTransform_1= +b.asm.Rd).apply(null,arguments)},Qf=b._emscripten_bind_btMotionState___destroy___0=function(){return(Qf=b._emscripten_bind_btMotionState___destroy___0=b.asm.Sd).apply(null,arguments)},Rf=b._emscripten_bind_ConvexResultCallback_hasHit_0=function(){return(Rf=b._emscripten_bind_ConvexResultCallback_hasHit_0=b.asm.Td).apply(null,arguments)},Sf=b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterGroup_0=function(){return(Sf=b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterGroup_0= +b.asm.Ud).apply(null,arguments)},Tf=b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterGroup_1=function(){return(Tf=b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterGroup_1=b.asm.Vd).apply(null,arguments)},Uf=b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterMask_0=function(){return(Uf=b._emscripten_bind_ConvexResultCallback_get_m_collisionFilterMask_0=b.asm.Wd).apply(null,arguments)},Vf=b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterMask_1=function(){return(Vf= +b._emscripten_bind_ConvexResultCallback_set_m_collisionFilterMask_1=b.asm.Xd).apply(null,arguments)},Wf=b._emscripten_bind_ConvexResultCallback_get_m_closestHitFraction_0=function(){return(Wf=b._emscripten_bind_ConvexResultCallback_get_m_closestHitFraction_0=b.asm.Yd).apply(null,arguments)},Xf=b._emscripten_bind_ConvexResultCallback_set_m_closestHitFraction_1=function(){return(Xf=b._emscripten_bind_ConvexResultCallback_set_m_closestHitFraction_1=b.asm.Zd).apply(null,arguments)},Yf=b._emscripten_bind_ConvexResultCallback___destroy___0= +function(){return(Yf=b._emscripten_bind_ConvexResultCallback___destroy___0=b.asm._d).apply(null,arguments)},Zf=b._emscripten_bind_ContactResultCallback_addSingleResult_7=function(){return(Zf=b._emscripten_bind_ContactResultCallback_addSingleResult_7=b.asm.$d).apply(null,arguments)},$f=b._emscripten_bind_ContactResultCallback___destroy___0=function(){return($f=b._emscripten_bind_ContactResultCallback___destroy___0=b.asm.ae).apply(null,arguments)},ag=b._emscripten_bind_btSoftBodySolver___destroy___0= +function(){return(ag=b._emscripten_bind_btSoftBodySolver___destroy___0=b.asm.be).apply(null,arguments)},bg=b._emscripten_bind_RayResultCallback_hasHit_0=function(){return(bg=b._emscripten_bind_RayResultCallback_hasHit_0=b.asm.ce).apply(null,arguments)},cg=b._emscripten_bind_RayResultCallback_get_m_collisionFilterGroup_0=function(){return(cg=b._emscripten_bind_RayResultCallback_get_m_collisionFilterGroup_0=b.asm.de).apply(null,arguments)},dg=b._emscripten_bind_RayResultCallback_set_m_collisionFilterGroup_1= +function(){return(dg=b._emscripten_bind_RayResultCallback_set_m_collisionFilterGroup_1=b.asm.ee).apply(null,arguments)},eg=b._emscripten_bind_RayResultCallback_get_m_collisionFilterMask_0=function(){return(eg=b._emscripten_bind_RayResultCallback_get_m_collisionFilterMask_0=b.asm.fe).apply(null,arguments)},fg=b._emscripten_bind_RayResultCallback_set_m_collisionFilterMask_1=function(){return(fg=b._emscripten_bind_RayResultCallback_set_m_collisionFilterMask_1=b.asm.ge).apply(null,arguments)},gg=b._emscripten_bind_RayResultCallback_get_m_closestHitFraction_0= +function(){return(gg=b._emscripten_bind_RayResultCallback_get_m_closestHitFraction_0=b.asm.he).apply(null,arguments)},hg=b._emscripten_bind_RayResultCallback_set_m_closestHitFraction_1=function(){return(hg=b._emscripten_bind_RayResultCallback_set_m_closestHitFraction_1=b.asm.ie).apply(null,arguments)},ig=b._emscripten_bind_RayResultCallback_get_m_collisionObject_0=function(){return(ig=b._emscripten_bind_RayResultCallback_get_m_collisionObject_0=b.asm.je).apply(null,arguments)},jg=b._emscripten_bind_RayResultCallback_set_m_collisionObject_1= +function(){return(jg=b._emscripten_bind_RayResultCallback_set_m_collisionObject_1=b.asm.ke).apply(null,arguments)},kg=b._emscripten_bind_RayResultCallback___destroy___0=function(){return(kg=b._emscripten_bind_RayResultCallback___destroy___0=b.asm.le).apply(null,arguments)},lg=b._emscripten_bind_btMatrix3x3_setEulerZYX_3=function(){return(lg=b._emscripten_bind_btMatrix3x3_setEulerZYX_3=b.asm.me).apply(null,arguments)},mg=b._emscripten_bind_btMatrix3x3_getRotation_1=function(){return(mg=b._emscripten_bind_btMatrix3x3_getRotation_1= +b.asm.ne).apply(null,arguments)},ng=b._emscripten_bind_btMatrix3x3_getRow_1=function(){return(ng=b._emscripten_bind_btMatrix3x3_getRow_1=b.asm.oe).apply(null,arguments)},og=b._emscripten_bind_btMatrix3x3___destroy___0=function(){return(og=b._emscripten_bind_btMatrix3x3___destroy___0=b.asm.pe).apply(null,arguments)},pg=b._emscripten_bind_btScalarArray_size_0=function(){return(pg=b._emscripten_bind_btScalarArray_size_0=b.asm.qe).apply(null,arguments)},qg=b._emscripten_bind_btScalarArray_at_1=function(){return(qg= +b._emscripten_bind_btScalarArray_at_1=b.asm.re).apply(null,arguments)},rg=b._emscripten_bind_btScalarArray___destroy___0=function(){return(rg=b._emscripten_bind_btScalarArray___destroy___0=b.asm.se).apply(null,arguments)},sg=b._emscripten_bind_Material_get_m_kLST_0=function(){return(sg=b._emscripten_bind_Material_get_m_kLST_0=b.asm.te).apply(null,arguments)},tg=b._emscripten_bind_Material_set_m_kLST_1=function(){return(tg=b._emscripten_bind_Material_set_m_kLST_1=b.asm.ue).apply(null,arguments)},ug= +b._emscripten_bind_Material_get_m_kAST_0=function(){return(ug=b._emscripten_bind_Material_get_m_kAST_0=b.asm.ve).apply(null,arguments)},vg=b._emscripten_bind_Material_set_m_kAST_1=function(){return(vg=b._emscripten_bind_Material_set_m_kAST_1=b.asm.we).apply(null,arguments)},wg=b._emscripten_bind_Material_get_m_kVST_0=function(){return(wg=b._emscripten_bind_Material_get_m_kVST_0=b.asm.xe).apply(null,arguments)},xg=b._emscripten_bind_Material_set_m_kVST_1=function(){return(xg=b._emscripten_bind_Material_set_m_kVST_1= +b.asm.ye).apply(null,arguments)},yg=b._emscripten_bind_Material_get_m_flags_0=function(){return(yg=b._emscripten_bind_Material_get_m_flags_0=b.asm.ze).apply(null,arguments)},zg=b._emscripten_bind_Material_set_m_flags_1=function(){return(zg=b._emscripten_bind_Material_set_m_flags_1=b.asm.Ae).apply(null,arguments)},Ag=b._emscripten_bind_Material___destroy___0=function(){return(Ag=b._emscripten_bind_Material___destroy___0=b.asm.Be).apply(null,arguments)},Bg=b._emscripten_bind_btDispatcherInfo_get_m_timeStep_0= +function(){return(Bg=b._emscripten_bind_btDispatcherInfo_get_m_timeStep_0=b.asm.Ce).apply(null,arguments)},Cg=b._emscripten_bind_btDispatcherInfo_set_m_timeStep_1=function(){return(Cg=b._emscripten_bind_btDispatcherInfo_set_m_timeStep_1=b.asm.De).apply(null,arguments)},Dg=b._emscripten_bind_btDispatcherInfo_get_m_stepCount_0=function(){return(Dg=b._emscripten_bind_btDispatcherInfo_get_m_stepCount_0=b.asm.Ee).apply(null,arguments)},Eg=b._emscripten_bind_btDispatcherInfo_set_m_stepCount_1=function(){return(Eg= +b._emscripten_bind_btDispatcherInfo_set_m_stepCount_1=b.asm.Fe).apply(null,arguments)},Fg=b._emscripten_bind_btDispatcherInfo_get_m_dispatchFunc_0=function(){return(Fg=b._emscripten_bind_btDispatcherInfo_get_m_dispatchFunc_0=b.asm.Ge).apply(null,arguments)},Gg=b._emscripten_bind_btDispatcherInfo_set_m_dispatchFunc_1=function(){return(Gg=b._emscripten_bind_btDispatcherInfo_set_m_dispatchFunc_1=b.asm.He).apply(null,arguments)},Hg=b._emscripten_bind_btDispatcherInfo_get_m_timeOfImpact_0=function(){return(Hg= +b._emscripten_bind_btDispatcherInfo_get_m_timeOfImpact_0=b.asm.Ie).apply(null,arguments)},Ig=b._emscripten_bind_btDispatcherInfo_set_m_timeOfImpact_1=function(){return(Ig=b._emscripten_bind_btDispatcherInfo_set_m_timeOfImpact_1=b.asm.Je).apply(null,arguments)},Jg=b._emscripten_bind_btDispatcherInfo_get_m_useContinuous_0=function(){return(Jg=b._emscripten_bind_btDispatcherInfo_get_m_useContinuous_0=b.asm.Ke).apply(null,arguments)},Kg=b._emscripten_bind_btDispatcherInfo_set_m_useContinuous_1=function(){return(Kg= +b._emscripten_bind_btDispatcherInfo_set_m_useContinuous_1=b.asm.Le).apply(null,arguments)},Lg=b._emscripten_bind_btDispatcherInfo_get_m_enableSatConvex_0=function(){return(Lg=b._emscripten_bind_btDispatcherInfo_get_m_enableSatConvex_0=b.asm.Me).apply(null,arguments)},Mg=b._emscripten_bind_btDispatcherInfo_set_m_enableSatConvex_1=function(){return(Mg=b._emscripten_bind_btDispatcherInfo_set_m_enableSatConvex_1=b.asm.Ne).apply(null,arguments)},Ng=b._emscripten_bind_btDispatcherInfo_get_m_enableSPU_0= +function(){return(Ng=b._emscripten_bind_btDispatcherInfo_get_m_enableSPU_0=b.asm.Oe).apply(null,arguments)},Og=b._emscripten_bind_btDispatcherInfo_set_m_enableSPU_1=function(){return(Og=b._emscripten_bind_btDispatcherInfo_set_m_enableSPU_1=b.asm.Pe).apply(null,arguments)},Pg=b._emscripten_bind_btDispatcherInfo_get_m_useEpa_0=function(){return(Pg=b._emscripten_bind_btDispatcherInfo_get_m_useEpa_0=b.asm.Qe).apply(null,arguments)},Qg=b._emscripten_bind_btDispatcherInfo_set_m_useEpa_1=function(){return(Qg= +b._emscripten_bind_btDispatcherInfo_set_m_useEpa_1=b.asm.Re).apply(null,arguments)},Rg=b._emscripten_bind_btDispatcherInfo_get_m_allowedCcdPenetration_0=function(){return(Rg=b._emscripten_bind_btDispatcherInfo_get_m_allowedCcdPenetration_0=b.asm.Se).apply(null,arguments)},Sg=b._emscripten_bind_btDispatcherInfo_set_m_allowedCcdPenetration_1=function(){return(Sg=b._emscripten_bind_btDispatcherInfo_set_m_allowedCcdPenetration_1=b.asm.Te).apply(null,arguments)},Tg=b._emscripten_bind_btDispatcherInfo_get_m_useConvexConservativeDistanceUtil_0= +function(){return(Tg=b._emscripten_bind_btDispatcherInfo_get_m_useConvexConservativeDistanceUtil_0=b.asm.Ue).apply(null,arguments)},Ug=b._emscripten_bind_btDispatcherInfo_set_m_useConvexConservativeDistanceUtil_1=function(){return(Ug=b._emscripten_bind_btDispatcherInfo_set_m_useConvexConservativeDistanceUtil_1=b.asm.Ve).apply(null,arguments)},Vg=b._emscripten_bind_btDispatcherInfo_get_m_convexConservativeDistanceThreshold_0=function(){return(Vg=b._emscripten_bind_btDispatcherInfo_get_m_convexConservativeDistanceThreshold_0= +b.asm.We).apply(null,arguments)},Wg=b._emscripten_bind_btDispatcherInfo_set_m_convexConservativeDistanceThreshold_1=function(){return(Wg=b._emscripten_bind_btDispatcherInfo_set_m_convexConservativeDistanceThreshold_1=b.asm.Xe).apply(null,arguments)},Xg=b._emscripten_bind_btDispatcherInfo___destroy___0=function(){return(Xg=b._emscripten_bind_btDispatcherInfo___destroy___0=b.asm.Ye).apply(null,arguments)},Yg=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_chassisConnectionCS_0=function(){return(Yg= +b._emscripten_bind_btWheelInfoConstructionInfo_get_m_chassisConnectionCS_0=b.asm.Ze).apply(null,arguments)},Zg=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_chassisConnectionCS_1=function(){return(Zg=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_chassisConnectionCS_1=b.asm._e).apply(null,arguments)},$g=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelDirectionCS_0=function(){return($g=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelDirectionCS_0=b.asm.$e).apply(null, +arguments)},ah=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelDirectionCS_1=function(){return(ah=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelDirectionCS_1=b.asm.af).apply(null,arguments)},bh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelAxleCS_0=function(){return(bh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelAxleCS_0=b.asm.bf).apply(null,arguments)},ch=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelAxleCS_1=function(){return(ch=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelAxleCS_1= +b.asm.cf).apply(null,arguments)},dh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionRestLength_0=function(){return(dh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionRestLength_0=b.asm.df).apply(null,arguments)},eh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionRestLength_1=function(){return(eh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionRestLength_1=b.asm.ef).apply(null,arguments)},fh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionTravelCm_0= +function(){return(fh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionTravelCm_0=b.asm.ff).apply(null,arguments)},gh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionTravelCm_1=function(){return(gh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionTravelCm_1=b.asm.gf).apply(null,arguments)},hh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelRadius_0=function(){return(hh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelRadius_0=b.asm.hf).apply(null, +arguments)},ih=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelRadius_1=function(){return(ih=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelRadius_1=b.asm.jf).apply(null,arguments)},jh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionStiffness_0=function(){return(jh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_suspensionStiffness_0=b.asm.kf).apply(null,arguments)},kh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionStiffness_1=function(){return(kh= +b._emscripten_bind_btWheelInfoConstructionInfo_set_m_suspensionStiffness_1=b.asm.lf).apply(null,arguments)},lh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingCompression_0=function(){return(lh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingCompression_0=b.asm.mf).apply(null,arguments)},mh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingCompression_1=function(){return(mh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingCompression_1= +b.asm.nf).apply(null,arguments)},nh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingRelaxation_0=function(){return(nh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_wheelsDampingRelaxation_0=b.asm.of).apply(null,arguments)},oh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingRelaxation_1=function(){return(oh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_wheelsDampingRelaxation_1=b.asm.pf).apply(null,arguments)},ph=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_frictionSlip_0= +function(){return(ph=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_frictionSlip_0=b.asm.qf).apply(null,arguments)},qh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_frictionSlip_1=function(){return(qh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_frictionSlip_1=b.asm.rf).apply(null,arguments)},rh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionForce_0=function(){return(rh=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_maxSuspensionForce_0=b.asm.sf).apply(null, +arguments)},sh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionForce_1=function(){return(sh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_maxSuspensionForce_1=b.asm.tf).apply(null,arguments)},th=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_bIsFrontWheel_0=function(){return(th=b._emscripten_bind_btWheelInfoConstructionInfo_get_m_bIsFrontWheel_0=b.asm.uf).apply(null,arguments)},uh=b._emscripten_bind_btWheelInfoConstructionInfo_set_m_bIsFrontWheel_1=function(){return(uh= +b._emscripten_bind_btWheelInfoConstructionInfo_set_m_bIsFrontWheel_1=b.asm.vf).apply(null,arguments)},vh=b._emscripten_bind_btWheelInfoConstructionInfo___destroy___0=function(){return(vh=b._emscripten_bind_btWheelInfoConstructionInfo___destroy___0=b.asm.wf).apply(null,arguments)},wh=b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_1=function(){return(wh=b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_1=b.asm.xf).apply(null,arguments)},xh=b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_2= +function(){return(xh=b._emscripten_bind_btConvexTriangleMeshShape_btConvexTriangleMeshShape_2=b.asm.yf).apply(null,arguments)},yh=b._emscripten_bind_btConvexTriangleMeshShape_setLocalScaling_1=function(){return(yh=b._emscripten_bind_btConvexTriangleMeshShape_setLocalScaling_1=b.asm.zf).apply(null,arguments)},zh=b._emscripten_bind_btConvexTriangleMeshShape_getLocalScaling_0=function(){return(zh=b._emscripten_bind_btConvexTriangleMeshShape_getLocalScaling_0=b.asm.Af).apply(null,arguments)},Ah=b._emscripten_bind_btConvexTriangleMeshShape_calculateLocalInertia_2= +function(){return(Ah=b._emscripten_bind_btConvexTriangleMeshShape_calculateLocalInertia_2=b.asm.Bf).apply(null,arguments)},Bh=b._emscripten_bind_btConvexTriangleMeshShape_setMargin_1=function(){return(Bh=b._emscripten_bind_btConvexTriangleMeshShape_setMargin_1=b.asm.Cf).apply(null,arguments)},Ch=b._emscripten_bind_btConvexTriangleMeshShape_getMargin_0=function(){return(Ch=b._emscripten_bind_btConvexTriangleMeshShape_getMargin_0=b.asm.Df).apply(null,arguments)},Dh=b._emscripten_bind_btConvexTriangleMeshShape___destroy___0= +function(){return(Dh=b._emscripten_bind_btConvexTriangleMeshShape___destroy___0=b.asm.Ef).apply(null,arguments)},Eh=b._emscripten_bind_btBroadphaseInterface_getOverlappingPairCache_0=function(){return(Eh=b._emscripten_bind_btBroadphaseInterface_getOverlappingPairCache_0=b.asm.Ff).apply(null,arguments)},Fh=b._emscripten_bind_btBroadphaseInterface___destroy___0=function(){return(Fh=b._emscripten_bind_btBroadphaseInterface___destroy___0=b.asm.Gf).apply(null,arguments)},Gh=b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_3= +function(){return(Gh=b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_3=b.asm.Hf).apply(null,arguments)},Hh=b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_4=function(){return(Hh=b._emscripten_bind_btRigidBodyConstructionInfo_btRigidBodyConstructionInfo_4=b.asm.If).apply(null,arguments)},Ih=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearDamping_0=function(){return(Ih=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearDamping_0= +b.asm.Jf).apply(null,arguments)},Jh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearDamping_1=function(){return(Jh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearDamping_1=b.asm.Kf).apply(null,arguments)},Kh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularDamping_0=function(){return(Kh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularDamping_0=b.asm.Lf).apply(null,arguments)},Lh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularDamping_1=function(){return(Lh= +b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularDamping_1=b.asm.Mf).apply(null,arguments)},Mh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_friction_0=function(){return(Mh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_friction_0=b.asm.Nf).apply(null,arguments)},Nh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_friction_1=function(){return(Nh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_friction_1=b.asm.Of).apply(null,arguments)},Oh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_rollingFriction_0= +function(){return(Oh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_rollingFriction_0=b.asm.Pf).apply(null,arguments)},Ph=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_rollingFriction_1=function(){return(Ph=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_rollingFriction_1=b.asm.Qf).apply(null,arguments)},Qh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_restitution_0=function(){return(Qh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_restitution_0=b.asm.Rf).apply(null, +arguments)},Rh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_restitution_1=function(){return(Rh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_restitution_1=b.asm.Sf).apply(null,arguments)},Sh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearSleepingThreshold_0=function(){return(Sh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_linearSleepingThreshold_0=b.asm.Tf).apply(null,arguments)},Th=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearSleepingThreshold_1=function(){return(Th= +b._emscripten_bind_btRigidBodyConstructionInfo_set_m_linearSleepingThreshold_1=b.asm.Uf).apply(null,arguments)},Uh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularSleepingThreshold_0=function(){return(Uh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_angularSleepingThreshold_0=b.asm.Vf).apply(null,arguments)},Vh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularSleepingThreshold_1=function(){return(Vh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_angularSleepingThreshold_1= +b.asm.Wf).apply(null,arguments)},Wh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDamping_0=function(){return(Wh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDamping_0=b.asm.Xf).apply(null,arguments)},Xh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDamping_1=function(){return(Xh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDamping_1=b.asm.Yf).apply(null,arguments)},Yh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDampingFactor_0= +function(){return(Yh=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalDampingFactor_0=b.asm.Zf).apply(null,arguments)},Zh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDampingFactor_1=function(){return(Zh=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalDampingFactor_1=b.asm._f).apply(null,arguments)},$h=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalLinearDampingThresholdSqr_0=function(){return($h=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalLinearDampingThresholdSqr_0= +b.asm.$f).apply(null,arguments)},ai=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalLinearDampingThresholdSqr_1=function(){return(ai=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalLinearDampingThresholdSqr_1=b.asm.ag).apply(null,arguments)},bi=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingThresholdSqr_0=function(){return(bi=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingThresholdSqr_0=b.asm.bg).apply(null, +arguments)},ci=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingThresholdSqr_1=function(){return(ci=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingThresholdSqr_1=b.asm.cg).apply(null,arguments)},di=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingFactor_0=function(){return(di=b._emscripten_bind_btRigidBodyConstructionInfo_get_m_additionalAngularDampingFactor_0=b.asm.dg).apply(null,arguments)},ei=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingFactor_1= +function(){return(ei=b._emscripten_bind_btRigidBodyConstructionInfo_set_m_additionalAngularDampingFactor_1=b.asm.eg).apply(null,arguments)},fi=b._emscripten_bind_btRigidBodyConstructionInfo___destroy___0=function(){return(fi=b._emscripten_bind_btRigidBodyConstructionInfo___destroy___0=b.asm.fg).apply(null,arguments)},gi=b._emscripten_bind_btCollisionConfiguration___destroy___0=function(){return(gi=b._emscripten_bind_btCollisionConfiguration___destroy___0=b.asm.gg).apply(null,arguments)},hi=b._emscripten_bind_btPersistentManifold_btPersistentManifold_0= +function(){return(hi=b._emscripten_bind_btPersistentManifold_btPersistentManifold_0=b.asm.hg).apply(null,arguments)},ii=b._emscripten_bind_btPersistentManifold_getBody0_0=function(){return(ii=b._emscripten_bind_btPersistentManifold_getBody0_0=b.asm.ig).apply(null,arguments)},ji=b._emscripten_bind_btPersistentManifold_getBody1_0=function(){return(ji=b._emscripten_bind_btPersistentManifold_getBody1_0=b.asm.jg).apply(null,arguments)},ki=b._emscripten_bind_btPersistentManifold_getNumContacts_0=function(){return(ki= +b._emscripten_bind_btPersistentManifold_getNumContacts_0=b.asm.kg).apply(null,arguments)},li=b._emscripten_bind_btPersistentManifold_getContactPoint_1=function(){return(li=b._emscripten_bind_btPersistentManifold_getContactPoint_1=b.asm.lg).apply(null,arguments)},mi=b._emscripten_bind_btPersistentManifold___destroy___0=function(){return(mi=b._emscripten_bind_btPersistentManifold___destroy___0=b.asm.mg).apply(null,arguments)},ni=b._emscripten_bind_btCompoundShape_btCompoundShape_0=function(){return(ni= +b._emscripten_bind_btCompoundShape_btCompoundShape_0=b.asm.ng).apply(null,arguments)},oi=b._emscripten_bind_btCompoundShape_btCompoundShape_1=function(){return(oi=b._emscripten_bind_btCompoundShape_btCompoundShape_1=b.asm.og).apply(null,arguments)},pi=b._emscripten_bind_btCompoundShape_addChildShape_2=function(){return(pi=b._emscripten_bind_btCompoundShape_addChildShape_2=b.asm.pg).apply(null,arguments)},qi=b._emscripten_bind_btCompoundShape_removeChildShape_1=function(){return(qi=b._emscripten_bind_btCompoundShape_removeChildShape_1= +b.asm.qg).apply(null,arguments)},ri=b._emscripten_bind_btCompoundShape_removeChildShapeByIndex_1=function(){return(ri=b._emscripten_bind_btCompoundShape_removeChildShapeByIndex_1=b.asm.rg).apply(null,arguments)},si=b._emscripten_bind_btCompoundShape_getNumChildShapes_0=function(){return(si=b._emscripten_bind_btCompoundShape_getNumChildShapes_0=b.asm.sg).apply(null,arguments)},ti=b._emscripten_bind_btCompoundShape_getChildShape_1=function(){return(ti=b._emscripten_bind_btCompoundShape_getChildShape_1= +b.asm.tg).apply(null,arguments)},ui=b._emscripten_bind_btCompoundShape_updateChildTransform_2=function(){return(ui=b._emscripten_bind_btCompoundShape_updateChildTransform_2=b.asm.ug).apply(null,arguments)},vi=b._emscripten_bind_btCompoundShape_updateChildTransform_3=function(){return(vi=b._emscripten_bind_btCompoundShape_updateChildTransform_3=b.asm.vg).apply(null,arguments)},wi=b._emscripten_bind_btCompoundShape_setMargin_1=function(){return(wi=b._emscripten_bind_btCompoundShape_setMargin_1=b.asm.wg).apply(null, +arguments)},xi=b._emscripten_bind_btCompoundShape_getMargin_0=function(){return(xi=b._emscripten_bind_btCompoundShape_getMargin_0=b.asm.xg).apply(null,arguments)},yi=b._emscripten_bind_btCompoundShape_setLocalScaling_1=function(){return(yi=b._emscripten_bind_btCompoundShape_setLocalScaling_1=b.asm.yg).apply(null,arguments)},zi=b._emscripten_bind_btCompoundShape_getLocalScaling_0=function(){return(zi=b._emscripten_bind_btCompoundShape_getLocalScaling_0=b.asm.zg).apply(null,arguments)},Ai=b._emscripten_bind_btCompoundShape_calculateLocalInertia_2= +function(){return(Ai=b._emscripten_bind_btCompoundShape_calculateLocalInertia_2=b.asm.Ag).apply(null,arguments)},Bi=b._emscripten_bind_btCompoundShape___destroy___0=function(){return(Bi=b._emscripten_bind_btCompoundShape___destroy___0=b.asm.Bg).apply(null,arguments)},Ci=b._emscripten_bind_ClosestConvexResultCallback_ClosestConvexResultCallback_2=function(){return(Ci=b._emscripten_bind_ClosestConvexResultCallback_ClosestConvexResultCallback_2=b.asm.Cg).apply(null,arguments)},Di=b._emscripten_bind_ClosestConvexResultCallback_hasHit_0= +function(){return(Di=b._emscripten_bind_ClosestConvexResultCallback_hasHit_0=b.asm.Dg).apply(null,arguments)},Ei=b._emscripten_bind_ClosestConvexResultCallback_get_m_convexFromWorld_0=function(){return(Ei=b._emscripten_bind_ClosestConvexResultCallback_get_m_convexFromWorld_0=b.asm.Eg).apply(null,arguments)},Fi=b._emscripten_bind_ClosestConvexResultCallback_set_m_convexFromWorld_1=function(){return(Fi=b._emscripten_bind_ClosestConvexResultCallback_set_m_convexFromWorld_1=b.asm.Fg).apply(null,arguments)}, +Gi=b._emscripten_bind_ClosestConvexResultCallback_get_m_convexToWorld_0=function(){return(Gi=b._emscripten_bind_ClosestConvexResultCallback_get_m_convexToWorld_0=b.asm.Gg).apply(null,arguments)},Hi=b._emscripten_bind_ClosestConvexResultCallback_set_m_convexToWorld_1=function(){return(Hi=b._emscripten_bind_ClosestConvexResultCallback_set_m_convexToWorld_1=b.asm.Hg).apply(null,arguments)},Ii=b._emscripten_bind_ClosestConvexResultCallback_get_m_hitNormalWorld_0=function(){return(Ii=b._emscripten_bind_ClosestConvexResultCallback_get_m_hitNormalWorld_0= +b.asm.Ig).apply(null,arguments)},Ji=b._emscripten_bind_ClosestConvexResultCallback_set_m_hitNormalWorld_1=function(){return(Ji=b._emscripten_bind_ClosestConvexResultCallback_set_m_hitNormalWorld_1=b.asm.Jg).apply(null,arguments)},Ki=b._emscripten_bind_ClosestConvexResultCallback_get_m_hitPointWorld_0=function(){return(Ki=b._emscripten_bind_ClosestConvexResultCallback_get_m_hitPointWorld_0=b.asm.Kg).apply(null,arguments)},Li=b._emscripten_bind_ClosestConvexResultCallback_set_m_hitPointWorld_1=function(){return(Li= +b._emscripten_bind_ClosestConvexResultCallback_set_m_hitPointWorld_1=b.asm.Lg).apply(null,arguments)},Mi=b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterGroup_0=function(){return(Mi=b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterGroup_0=b.asm.Mg).apply(null,arguments)},Ni=b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterGroup_1=function(){return(Ni=b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterGroup_1=b.asm.Ng).apply(null, +arguments)},Oi=b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterMask_0=function(){return(Oi=b._emscripten_bind_ClosestConvexResultCallback_get_m_collisionFilterMask_0=b.asm.Og).apply(null,arguments)},Pi=b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterMask_1=function(){return(Pi=b._emscripten_bind_ClosestConvexResultCallback_set_m_collisionFilterMask_1=b.asm.Pg).apply(null,arguments)},Qi=b._emscripten_bind_ClosestConvexResultCallback_get_m_closestHitFraction_0= +function(){return(Qi=b._emscripten_bind_ClosestConvexResultCallback_get_m_closestHitFraction_0=b.asm.Qg).apply(null,arguments)},Ri=b._emscripten_bind_ClosestConvexResultCallback_set_m_closestHitFraction_1=function(){return(Ri=b._emscripten_bind_ClosestConvexResultCallback_set_m_closestHitFraction_1=b.asm.Rg).apply(null,arguments)},Si=b._emscripten_bind_ClosestConvexResultCallback___destroy___0=function(){return(Si=b._emscripten_bind_ClosestConvexResultCallback___destroy___0=b.asm.Sg).apply(null,arguments)}, +Ti=b._emscripten_bind_AllHitsRayResultCallback_AllHitsRayResultCallback_2=function(){return(Ti=b._emscripten_bind_AllHitsRayResultCallback_AllHitsRayResultCallback_2=b.asm.Tg).apply(null,arguments)},Ui=b._emscripten_bind_AllHitsRayResultCallback_hasHit_0=function(){return(Ui=b._emscripten_bind_AllHitsRayResultCallback_hasHit_0=b.asm.Ug).apply(null,arguments)},Vi=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObjects_0=function(){return(Vi=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObjects_0= +b.asm.Vg).apply(null,arguments)},Wi=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObjects_1=function(){return(Wi=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObjects_1=b.asm.Wg).apply(null,arguments)},Xi=b._emscripten_bind_AllHitsRayResultCallback_get_m_rayFromWorld_0=function(){return(Xi=b._emscripten_bind_AllHitsRayResultCallback_get_m_rayFromWorld_0=b.asm.Xg).apply(null,arguments)},Yi=b._emscripten_bind_AllHitsRayResultCallback_set_m_rayFromWorld_1=function(){return(Yi= +b._emscripten_bind_AllHitsRayResultCallback_set_m_rayFromWorld_1=b.asm.Yg).apply(null,arguments)},Zi=b._emscripten_bind_AllHitsRayResultCallback_get_m_rayToWorld_0=function(){return(Zi=b._emscripten_bind_AllHitsRayResultCallback_get_m_rayToWorld_0=b.asm.Zg).apply(null,arguments)},$i=b._emscripten_bind_AllHitsRayResultCallback_set_m_rayToWorld_1=function(){return($i=b._emscripten_bind_AllHitsRayResultCallback_set_m_rayToWorld_1=b.asm._g).apply(null,arguments)},aj=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitNormalWorld_0= +function(){return(aj=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitNormalWorld_0=b.asm.$g).apply(null,arguments)},bj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitNormalWorld_1=function(){return(bj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitNormalWorld_1=b.asm.ah).apply(null,arguments)},cj=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitPointWorld_0=function(){return(cj=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitPointWorld_0=b.asm.bh).apply(null,arguments)}, +dj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitPointWorld_1=function(){return(dj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitPointWorld_1=b.asm.ch).apply(null,arguments)},ej=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitFractions_0=function(){return(ej=b._emscripten_bind_AllHitsRayResultCallback_get_m_hitFractions_0=b.asm.dh).apply(null,arguments)},fj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitFractions_1=function(){return(fj=b._emscripten_bind_AllHitsRayResultCallback_set_m_hitFractions_1= +b.asm.eh).apply(null,arguments)},gj=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterGroup_0=function(){return(gj=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterGroup_0=b.asm.fh).apply(null,arguments)},hj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterGroup_1=function(){return(hj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterGroup_1=b.asm.gh).apply(null,arguments)},ij=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterMask_0= +function(){return(ij=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionFilterMask_0=b.asm.hh).apply(null,arguments)},jj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterMask_1=function(){return(jj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionFilterMask_1=b.asm.ih).apply(null,arguments)},kj=b._emscripten_bind_AllHitsRayResultCallback_get_m_closestHitFraction_0=function(){return(kj=b._emscripten_bind_AllHitsRayResultCallback_get_m_closestHitFraction_0=b.asm.jh).apply(null, +arguments)},lj=b._emscripten_bind_AllHitsRayResultCallback_set_m_closestHitFraction_1=function(){return(lj=b._emscripten_bind_AllHitsRayResultCallback_set_m_closestHitFraction_1=b.asm.kh).apply(null,arguments)},mj=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObject_0=function(){return(mj=b._emscripten_bind_AllHitsRayResultCallback_get_m_collisionObject_0=b.asm.lh).apply(null,arguments)},nj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObject_1=function(){return(nj=b._emscripten_bind_AllHitsRayResultCallback_set_m_collisionObject_1= +b.asm.mh).apply(null,arguments)},oj=b._emscripten_bind_AllHitsRayResultCallback___destroy___0=function(){return(oj=b._emscripten_bind_AllHitsRayResultCallback___destroy___0=b.asm.nh).apply(null,arguments)},pj=b._emscripten_bind_tMaterialArray_size_0=function(){return(pj=b._emscripten_bind_tMaterialArray_size_0=b.asm.oh).apply(null,arguments)},qj=b._emscripten_bind_tMaterialArray_at_1=function(){return(qj=b._emscripten_bind_tMaterialArray_at_1=b.asm.ph).apply(null,arguments)},rj=b._emscripten_bind_tMaterialArray___destroy___0= +function(){return(rj=b._emscripten_bind_tMaterialArray___destroy___0=b.asm.qh).apply(null,arguments)},sj=b._emscripten_bind_btDefaultVehicleRaycaster_btDefaultVehicleRaycaster_1=function(){return(sj=b._emscripten_bind_btDefaultVehicleRaycaster_btDefaultVehicleRaycaster_1=b.asm.rh).apply(null,arguments)},tj=b._emscripten_bind_btDefaultVehicleRaycaster_castRay_3=function(){return(tj=b._emscripten_bind_btDefaultVehicleRaycaster_castRay_3=b.asm.sh).apply(null,arguments)},uj=b._emscripten_bind_btDefaultVehicleRaycaster___destroy___0= +function(){return(uj=b._emscripten_bind_btDefaultVehicleRaycaster___destroy___0=b.asm.th).apply(null,arguments)},vj=b._emscripten_bind_btEmptyShape_btEmptyShape_0=function(){return(vj=b._emscripten_bind_btEmptyShape_btEmptyShape_0=b.asm.uh).apply(null,arguments)},wj=b._emscripten_bind_btEmptyShape_setLocalScaling_1=function(){return(wj=b._emscripten_bind_btEmptyShape_setLocalScaling_1=b.asm.vh).apply(null,arguments)},xj=b._emscripten_bind_btEmptyShape_getLocalScaling_0=function(){return(xj=b._emscripten_bind_btEmptyShape_getLocalScaling_0= +b.asm.wh).apply(null,arguments)},yj=b._emscripten_bind_btEmptyShape_calculateLocalInertia_2=function(){return(yj=b._emscripten_bind_btEmptyShape_calculateLocalInertia_2=b.asm.xh).apply(null,arguments)},zj=b._emscripten_bind_btEmptyShape___destroy___0=function(){return(zj=b._emscripten_bind_btEmptyShape___destroy___0=b.asm.yh).apply(null,arguments)},Aj=b._emscripten_bind_btConstraintSetting_btConstraintSetting_0=function(){return(Aj=b._emscripten_bind_btConstraintSetting_btConstraintSetting_0=b.asm.zh).apply(null, +arguments)},Bj=b._emscripten_bind_btConstraintSetting_get_m_tau_0=function(){return(Bj=b._emscripten_bind_btConstraintSetting_get_m_tau_0=b.asm.Ah).apply(null,arguments)},Cj=b._emscripten_bind_btConstraintSetting_set_m_tau_1=function(){return(Cj=b._emscripten_bind_btConstraintSetting_set_m_tau_1=b.asm.Bh).apply(null,arguments)},Dj=b._emscripten_bind_btConstraintSetting_get_m_damping_0=function(){return(Dj=b._emscripten_bind_btConstraintSetting_get_m_damping_0=b.asm.Ch).apply(null,arguments)},Ej=b._emscripten_bind_btConstraintSetting_set_m_damping_1= +function(){return(Ej=b._emscripten_bind_btConstraintSetting_set_m_damping_1=b.asm.Dh).apply(null,arguments)},Fj=b._emscripten_bind_btConstraintSetting_get_m_impulseClamp_0=function(){return(Fj=b._emscripten_bind_btConstraintSetting_get_m_impulseClamp_0=b.asm.Eh).apply(null,arguments)},Gj=b._emscripten_bind_btConstraintSetting_set_m_impulseClamp_1=function(){return(Gj=b._emscripten_bind_btConstraintSetting_set_m_impulseClamp_1=b.asm.Fh).apply(null,arguments)},Hj=b._emscripten_bind_btConstraintSetting___destroy___0= +function(){return(Hj=b._emscripten_bind_btConstraintSetting___destroy___0=b.asm.Gh).apply(null,arguments)},Ij=b._emscripten_bind_LocalShapeInfo_get_m_shapePart_0=function(){return(Ij=b._emscripten_bind_LocalShapeInfo_get_m_shapePart_0=b.asm.Hh).apply(null,arguments)},Jj=b._emscripten_bind_LocalShapeInfo_set_m_shapePart_1=function(){return(Jj=b._emscripten_bind_LocalShapeInfo_set_m_shapePart_1=b.asm.Ih).apply(null,arguments)},Kj=b._emscripten_bind_LocalShapeInfo_get_m_triangleIndex_0=function(){return(Kj= +b._emscripten_bind_LocalShapeInfo_get_m_triangleIndex_0=b.asm.Jh).apply(null,arguments)},Lj=b._emscripten_bind_LocalShapeInfo_set_m_triangleIndex_1=function(){return(Lj=b._emscripten_bind_LocalShapeInfo_set_m_triangleIndex_1=b.asm.Kh).apply(null,arguments)},Mj=b._emscripten_bind_LocalShapeInfo___destroy___0=function(){return(Mj=b._emscripten_bind_LocalShapeInfo___destroy___0=b.asm.Lh).apply(null,arguments)},Nj=b._emscripten_bind_btRigidBody_btRigidBody_1=function(){return(Nj=b._emscripten_bind_btRigidBody_btRigidBody_1= +b.asm.Mh).apply(null,arguments)},Oj=b._emscripten_bind_btRigidBody_getCenterOfMassTransform_0=function(){return(Oj=b._emscripten_bind_btRigidBody_getCenterOfMassTransform_0=b.asm.Nh).apply(null,arguments)},Pj=b._emscripten_bind_btRigidBody_setCenterOfMassTransform_1=function(){return(Pj=b._emscripten_bind_btRigidBody_setCenterOfMassTransform_1=b.asm.Oh).apply(null,arguments)},Qj=b._emscripten_bind_btRigidBody_setSleepingThresholds_2=function(){return(Qj=b._emscripten_bind_btRigidBody_setSleepingThresholds_2= +b.asm.Ph).apply(null,arguments)},Rj=b._emscripten_bind_btRigidBody_getLinearDamping_0=function(){return(Rj=b._emscripten_bind_btRigidBody_getLinearDamping_0=b.asm.Qh).apply(null,arguments)},Sj=b._emscripten_bind_btRigidBody_getAngularDamping_0=function(){return(Sj=b._emscripten_bind_btRigidBody_getAngularDamping_0=b.asm.Rh).apply(null,arguments)},Tj=b._emscripten_bind_btRigidBody_setDamping_2=function(){return(Tj=b._emscripten_bind_btRigidBody_setDamping_2=b.asm.Sh).apply(null,arguments)},Uj=b._emscripten_bind_btRigidBody_setMassProps_2= +function(){return(Uj=b._emscripten_bind_btRigidBody_setMassProps_2=b.asm.Th).apply(null,arguments)},Vj=b._emscripten_bind_btRigidBody_getLinearFactor_0=function(){return(Vj=b._emscripten_bind_btRigidBody_getLinearFactor_0=b.asm.Uh).apply(null,arguments)},Wj=b._emscripten_bind_btRigidBody_setLinearFactor_1=function(){return(Wj=b._emscripten_bind_btRigidBody_setLinearFactor_1=b.asm.Vh).apply(null,arguments)},Xj=b._emscripten_bind_btRigidBody_applyTorque_1=function(){return(Xj=b._emscripten_bind_btRigidBody_applyTorque_1= +b.asm.Wh).apply(null,arguments)},Yj=b._emscripten_bind_btRigidBody_applyLocalTorque_1=function(){return(Yj=b._emscripten_bind_btRigidBody_applyLocalTorque_1=b.asm.Xh).apply(null,arguments)},Zj=b._emscripten_bind_btRigidBody_applyForce_2=function(){return(Zj=b._emscripten_bind_btRigidBody_applyForce_2=b.asm.Yh).apply(null,arguments)},ak=b._emscripten_bind_btRigidBody_applyCentralForce_1=function(){return(ak=b._emscripten_bind_btRigidBody_applyCentralForce_1=b.asm.Zh).apply(null,arguments)},bk=b._emscripten_bind_btRigidBody_applyCentralLocalForce_1= +function(){return(bk=b._emscripten_bind_btRigidBody_applyCentralLocalForce_1=b.asm._h).apply(null,arguments)},ck=b._emscripten_bind_btRigidBody_applyTorqueImpulse_1=function(){return(ck=b._emscripten_bind_btRigidBody_applyTorqueImpulse_1=b.asm.$h).apply(null,arguments)},dk=b._emscripten_bind_btRigidBody_applyImpulse_2=function(){return(dk=b._emscripten_bind_btRigidBody_applyImpulse_2=b.asm.ai).apply(null,arguments)},ek=b._emscripten_bind_btRigidBody_applyCentralImpulse_1=function(){return(ek=b._emscripten_bind_btRigidBody_applyCentralImpulse_1= +b.asm.bi).apply(null,arguments)},fk=b._emscripten_bind_btRigidBody_updateInertiaTensor_0=function(){return(fk=b._emscripten_bind_btRigidBody_updateInertiaTensor_0=b.asm.ci).apply(null,arguments)},gk=b._emscripten_bind_btRigidBody_getLinearVelocity_0=function(){return(gk=b._emscripten_bind_btRigidBody_getLinearVelocity_0=b.asm.di).apply(null,arguments)},hk=b._emscripten_bind_btRigidBody_getAngularVelocity_0=function(){return(hk=b._emscripten_bind_btRigidBody_getAngularVelocity_0=b.asm.ei).apply(null, +arguments)},ik=b._emscripten_bind_btRigidBody_setLinearVelocity_1=function(){return(ik=b._emscripten_bind_btRigidBody_setLinearVelocity_1=b.asm.fi).apply(null,arguments)},jk=b._emscripten_bind_btRigidBody_setAngularVelocity_1=function(){return(jk=b._emscripten_bind_btRigidBody_setAngularVelocity_1=b.asm.gi).apply(null,arguments)},kk=b._emscripten_bind_btRigidBody_getMotionState_0=function(){return(kk=b._emscripten_bind_btRigidBody_getMotionState_0=b.asm.hi).apply(null,arguments)},lk=b._emscripten_bind_btRigidBody_setMotionState_1= +function(){return(lk=b._emscripten_bind_btRigidBody_setMotionState_1=b.asm.ii).apply(null,arguments)},mk=b._emscripten_bind_btRigidBody_getAngularFactor_0=function(){return(mk=b._emscripten_bind_btRigidBody_getAngularFactor_0=b.asm.ji).apply(null,arguments)},nk=b._emscripten_bind_btRigidBody_setAngularFactor_1=function(){return(nk=b._emscripten_bind_btRigidBody_setAngularFactor_1=b.asm.ki).apply(null,arguments)},ok=b._emscripten_bind_btRigidBody_upcast_1=function(){return(ok=b._emscripten_bind_btRigidBody_upcast_1= +b.asm.li).apply(null,arguments)},pk=b._emscripten_bind_btRigidBody_getAabb_2=function(){return(pk=b._emscripten_bind_btRigidBody_getAabb_2=b.asm.mi).apply(null,arguments)},qk=b._emscripten_bind_btRigidBody_applyGravity_0=function(){return(qk=b._emscripten_bind_btRigidBody_applyGravity_0=b.asm.ni).apply(null,arguments)},rk=b._emscripten_bind_btRigidBody_getGravity_0=function(){return(rk=b._emscripten_bind_btRigidBody_getGravity_0=b.asm.oi).apply(null,arguments)},sk=b._emscripten_bind_btRigidBody_setGravity_1= +function(){return(sk=b._emscripten_bind_btRigidBody_setGravity_1=b.asm.pi).apply(null,arguments)},tk=b._emscripten_bind_btRigidBody_getBroadphaseProxy_0=function(){return(tk=b._emscripten_bind_btRigidBody_getBroadphaseProxy_0=b.asm.qi).apply(null,arguments)},uk=b._emscripten_bind_btRigidBody_clearForces_0=function(){return(uk=b._emscripten_bind_btRigidBody_clearForces_0=b.asm.ri).apply(null,arguments)},vk=b._emscripten_bind_btRigidBody_setAnisotropicFriction_2=function(){return(vk=b._emscripten_bind_btRigidBody_setAnisotropicFriction_2= +b.asm.si).apply(null,arguments)},wk=b._emscripten_bind_btRigidBody_getCollisionShape_0=function(){return(wk=b._emscripten_bind_btRigidBody_getCollisionShape_0=b.asm.ti).apply(null,arguments)},xk=b._emscripten_bind_btRigidBody_setContactProcessingThreshold_1=function(){return(xk=b._emscripten_bind_btRigidBody_setContactProcessingThreshold_1=b.asm.ui).apply(null,arguments)},yk=b._emscripten_bind_btRigidBody_setActivationState_1=function(){return(yk=b._emscripten_bind_btRigidBody_setActivationState_1= +b.asm.vi).apply(null,arguments)},zk=b._emscripten_bind_btRigidBody_forceActivationState_1=function(){return(zk=b._emscripten_bind_btRigidBody_forceActivationState_1=b.asm.wi).apply(null,arguments)},Ak=b._emscripten_bind_btRigidBody_activate_0=function(){return(Ak=b._emscripten_bind_btRigidBody_activate_0=b.asm.xi).apply(null,arguments)},Bk=b._emscripten_bind_btRigidBody_activate_1=function(){return(Bk=b._emscripten_bind_btRigidBody_activate_1=b.asm.yi).apply(null,arguments)},Ck=b._emscripten_bind_btRigidBody_isActive_0= +function(){return(Ck=b._emscripten_bind_btRigidBody_isActive_0=b.asm.zi).apply(null,arguments)},Dk=b._emscripten_bind_btRigidBody_isKinematicObject_0=function(){return(Dk=b._emscripten_bind_btRigidBody_isKinematicObject_0=b.asm.Ai).apply(null,arguments)},Ek=b._emscripten_bind_btRigidBody_isStaticObject_0=function(){return(Ek=b._emscripten_bind_btRigidBody_isStaticObject_0=b.asm.Bi).apply(null,arguments)},Fk=b._emscripten_bind_btRigidBody_isStaticOrKinematicObject_0=function(){return(Fk=b._emscripten_bind_btRigidBody_isStaticOrKinematicObject_0= +b.asm.Ci).apply(null,arguments)},Gk=b._emscripten_bind_btRigidBody_getRestitution_0=function(){return(Gk=b._emscripten_bind_btRigidBody_getRestitution_0=b.asm.Di).apply(null,arguments)},Hk=b._emscripten_bind_btRigidBody_getFriction_0=function(){return(Hk=b._emscripten_bind_btRigidBody_getFriction_0=b.asm.Ei).apply(null,arguments)},Ik=b._emscripten_bind_btRigidBody_getRollingFriction_0=function(){return(Ik=b._emscripten_bind_btRigidBody_getRollingFriction_0=b.asm.Fi).apply(null,arguments)},Jk=b._emscripten_bind_btRigidBody_setRestitution_1= +function(){return(Jk=b._emscripten_bind_btRigidBody_setRestitution_1=b.asm.Gi).apply(null,arguments)},Kk=b._emscripten_bind_btRigidBody_setFriction_1=function(){return(Kk=b._emscripten_bind_btRigidBody_setFriction_1=b.asm.Hi).apply(null,arguments)},Lk=b._emscripten_bind_btRigidBody_setRollingFriction_1=function(){return(Lk=b._emscripten_bind_btRigidBody_setRollingFriction_1=b.asm.Ii).apply(null,arguments)},Mk=b._emscripten_bind_btRigidBody_getWorldTransform_0=function(){return(Mk=b._emscripten_bind_btRigidBody_getWorldTransform_0= +b.asm.Ji).apply(null,arguments)},Nk=b._emscripten_bind_btRigidBody_getCollisionFlags_0=function(){return(Nk=b._emscripten_bind_btRigidBody_getCollisionFlags_0=b.asm.Ki).apply(null,arguments)},Ok=b._emscripten_bind_btRigidBody_setCollisionFlags_1=function(){return(Ok=b._emscripten_bind_btRigidBody_setCollisionFlags_1=b.asm.Li).apply(null,arguments)},Pk=b._emscripten_bind_btRigidBody_setWorldTransform_1=function(){return(Pk=b._emscripten_bind_btRigidBody_setWorldTransform_1=b.asm.Mi).apply(null,arguments)}, +Qk=b._emscripten_bind_btRigidBody_setCollisionShape_1=function(){return(Qk=b._emscripten_bind_btRigidBody_setCollisionShape_1=b.asm.Ni).apply(null,arguments)},Rk=b._emscripten_bind_btRigidBody_setCcdMotionThreshold_1=function(){return(Rk=b._emscripten_bind_btRigidBody_setCcdMotionThreshold_1=b.asm.Oi).apply(null,arguments)},Sk=b._emscripten_bind_btRigidBody_setCcdSweptSphereRadius_1=function(){return(Sk=b._emscripten_bind_btRigidBody_setCcdSweptSphereRadius_1=b.asm.Pi).apply(null,arguments)},Tk=b._emscripten_bind_btRigidBody_getUserIndex_0= +function(){return(Tk=b._emscripten_bind_btRigidBody_getUserIndex_0=b.asm.Qi).apply(null,arguments)},Uk=b._emscripten_bind_btRigidBody_setUserIndex_1=function(){return(Uk=b._emscripten_bind_btRigidBody_setUserIndex_1=b.asm.Ri).apply(null,arguments)},Vk=b._emscripten_bind_btRigidBody_getUserPointer_0=function(){return(Vk=b._emscripten_bind_btRigidBody_getUserPointer_0=b.asm.Si).apply(null,arguments)},Wk=b._emscripten_bind_btRigidBody_setUserPointer_1=function(){return(Wk=b._emscripten_bind_btRigidBody_setUserPointer_1= +b.asm.Ti).apply(null,arguments)},Xk=b._emscripten_bind_btRigidBody_getBroadphaseHandle_0=function(){return(Xk=b._emscripten_bind_btRigidBody_getBroadphaseHandle_0=b.asm.Ui).apply(null,arguments)},Yk=b._emscripten_bind_btRigidBody___destroy___0=function(){return(Yk=b._emscripten_bind_btRigidBody___destroy___0=b.asm.Vi).apply(null,arguments)},Zk=b._emscripten_bind_btIndexedMeshArray_size_0=function(){return(Zk=b._emscripten_bind_btIndexedMeshArray_size_0=b.asm.Wi).apply(null,arguments)},$k=b._emscripten_bind_btIndexedMeshArray_at_1= +function(){return($k=b._emscripten_bind_btIndexedMeshArray_at_1=b.asm.Xi).apply(null,arguments)},al=b._emscripten_bind_btIndexedMeshArray___destroy___0=function(){return(al=b._emscripten_bind_btIndexedMeshArray___destroy___0=b.asm.Yi).apply(null,arguments)},bl=b._emscripten_bind_btDbvtBroadphase_btDbvtBroadphase_0=function(){return(bl=b._emscripten_bind_btDbvtBroadphase_btDbvtBroadphase_0=b.asm.Zi).apply(null,arguments)},cl=b._emscripten_bind_btDbvtBroadphase___destroy___0=function(){return(cl=b._emscripten_bind_btDbvtBroadphase___destroy___0= +b.asm._i).apply(null,arguments)},dl=b._emscripten_bind_btHeightfieldTerrainShape_btHeightfieldTerrainShape_9=function(){return(dl=b._emscripten_bind_btHeightfieldTerrainShape_btHeightfieldTerrainShape_9=b.asm.$i).apply(null,arguments)},el=b._emscripten_bind_btHeightfieldTerrainShape_setMargin_1=function(){return(el=b._emscripten_bind_btHeightfieldTerrainShape_setMargin_1=b.asm.aj).apply(null,arguments)},fl=b._emscripten_bind_btHeightfieldTerrainShape_getMargin_0=function(){return(fl=b._emscripten_bind_btHeightfieldTerrainShape_getMargin_0= +b.asm.bj).apply(null,arguments)},gl=b._emscripten_bind_btHeightfieldTerrainShape_setLocalScaling_1=function(){return(gl=b._emscripten_bind_btHeightfieldTerrainShape_setLocalScaling_1=b.asm.cj).apply(null,arguments)},hl=b._emscripten_bind_btHeightfieldTerrainShape_getLocalScaling_0=function(){return(hl=b._emscripten_bind_btHeightfieldTerrainShape_getLocalScaling_0=b.asm.dj).apply(null,arguments)},il=b._emscripten_bind_btHeightfieldTerrainShape_calculateLocalInertia_2=function(){return(il=b._emscripten_bind_btHeightfieldTerrainShape_calculateLocalInertia_2= +b.asm.ej).apply(null,arguments)},jl=b._emscripten_bind_btHeightfieldTerrainShape___destroy___0=function(){return(jl=b._emscripten_bind_btHeightfieldTerrainShape___destroy___0=b.asm.fj).apply(null,arguments)},kl=b._emscripten_bind_btDefaultSoftBodySolver_btDefaultSoftBodySolver_0=function(){return(kl=b._emscripten_bind_btDefaultSoftBodySolver_btDefaultSoftBodySolver_0=b.asm.gj).apply(null,arguments)},ll=b._emscripten_bind_btDefaultSoftBodySolver___destroy___0=function(){return(ll=b._emscripten_bind_btDefaultSoftBodySolver___destroy___0= +b.asm.hj).apply(null,arguments)},ml=b._emscripten_bind_btCollisionDispatcher_btCollisionDispatcher_1=function(){return(ml=b._emscripten_bind_btCollisionDispatcher_btCollisionDispatcher_1=b.asm.ij).apply(null,arguments)},nl=b._emscripten_bind_btCollisionDispatcher_getNumManifolds_0=function(){return(nl=b._emscripten_bind_btCollisionDispatcher_getNumManifolds_0=b.asm.jj).apply(null,arguments)},ol=b._emscripten_bind_btCollisionDispatcher_getManifoldByIndexInternal_1=function(){return(ol=b._emscripten_bind_btCollisionDispatcher_getManifoldByIndexInternal_1= +b.asm.kj).apply(null,arguments)},pl=b._emscripten_bind_btCollisionDispatcher___destroy___0=function(){return(pl=b._emscripten_bind_btCollisionDispatcher___destroy___0=b.asm.lj).apply(null,arguments)},ql=b._emscripten_bind_btAxisSweep3_btAxisSweep3_2=function(){return(ql=b._emscripten_bind_btAxisSweep3_btAxisSweep3_2=b.asm.mj).apply(null,arguments)},rl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_3=function(){return(rl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_3=b.asm.nj).apply(null,arguments)}, +sl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_4=function(){return(sl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_4=b.asm.oj).apply(null,arguments)},tl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_5=function(){return(tl=b._emscripten_bind_btAxisSweep3_btAxisSweep3_5=b.asm.pj).apply(null,arguments)},ul=b._emscripten_bind_btAxisSweep3___destroy___0=function(){return(ul=b._emscripten_bind_btAxisSweep3___destroy___0=b.asm.qj).apply(null,arguments)},vl=b._emscripten_bind_VoidPtr___destroy___0=function(){return(vl= +b._emscripten_bind_VoidPtr___destroy___0=b.asm.rj).apply(null,arguments)},wl=b._emscripten_bind_btSoftBodyWorldInfo_btSoftBodyWorldInfo_0=function(){return(wl=b._emscripten_bind_btSoftBodyWorldInfo_btSoftBodyWorldInfo_0=b.asm.sj).apply(null,arguments)},xl=b._emscripten_bind_btSoftBodyWorldInfo_get_air_density_0=function(){return(xl=b._emscripten_bind_btSoftBodyWorldInfo_get_air_density_0=b.asm.tj).apply(null,arguments)},yl=b._emscripten_bind_btSoftBodyWorldInfo_set_air_density_1=function(){return(yl= +b._emscripten_bind_btSoftBodyWorldInfo_set_air_density_1=b.asm.uj).apply(null,arguments)},zl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_density_0=function(){return(zl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_density_0=b.asm.vj).apply(null,arguments)},Al=b._emscripten_bind_btSoftBodyWorldInfo_set_water_density_1=function(){return(Al=b._emscripten_bind_btSoftBodyWorldInfo_set_water_density_1=b.asm.wj).apply(null,arguments)},Bl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_offset_0= +function(){return(Bl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_offset_0=b.asm.xj).apply(null,arguments)},Cl=b._emscripten_bind_btSoftBodyWorldInfo_set_water_offset_1=function(){return(Cl=b._emscripten_bind_btSoftBodyWorldInfo_set_water_offset_1=b.asm.yj).apply(null,arguments)},Dl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_maxDisplacement_0=function(){return(Dl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_maxDisplacement_0=b.asm.zj).apply(null,arguments)},El=b._emscripten_bind_btSoftBodyWorldInfo_set_m_maxDisplacement_1= +function(){return(El=b._emscripten_bind_btSoftBodyWorldInfo_set_m_maxDisplacement_1=b.asm.Aj).apply(null,arguments)},Fl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_normal_0=function(){return(Fl=b._emscripten_bind_btSoftBodyWorldInfo_get_water_normal_0=b.asm.Bj).apply(null,arguments)},Gl=b._emscripten_bind_btSoftBodyWorldInfo_set_water_normal_1=function(){return(Gl=b._emscripten_bind_btSoftBodyWorldInfo_set_water_normal_1=b.asm.Cj).apply(null,arguments)},Hl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_broadphase_0= +function(){return(Hl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_broadphase_0=b.asm.Dj).apply(null,arguments)},Il=b._emscripten_bind_btSoftBodyWorldInfo_set_m_broadphase_1=function(){return(Il=b._emscripten_bind_btSoftBodyWorldInfo_set_m_broadphase_1=b.asm.Ej).apply(null,arguments)},Jl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_dispatcher_0=function(){return(Jl=b._emscripten_bind_btSoftBodyWorldInfo_get_m_dispatcher_0=b.asm.Fj).apply(null,arguments)},Kl=b._emscripten_bind_btSoftBodyWorldInfo_set_m_dispatcher_1= +function(){return(Kl=b._emscripten_bind_btSoftBodyWorldInfo_set_m_dispatcher_1=b.asm.Gj).apply(null,arguments)},Ll=b._emscripten_bind_btSoftBodyWorldInfo_get_m_gravity_0=function(){return(Ll=b._emscripten_bind_btSoftBodyWorldInfo_get_m_gravity_0=b.asm.Hj).apply(null,arguments)},Ml=b._emscripten_bind_btSoftBodyWorldInfo_set_m_gravity_1=function(){return(Ml=b._emscripten_bind_btSoftBodyWorldInfo_set_m_gravity_1=b.asm.Ij).apply(null,arguments)},Nl=b._emscripten_bind_btSoftBodyWorldInfo___destroy___0= +function(){return(Nl=b._emscripten_bind_btSoftBodyWorldInfo___destroy___0=b.asm.Jj).apply(null,arguments)},Ol=b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_2=function(){return(Ol=b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_2=b.asm.Kj).apply(null,arguments)},Pl=b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_4=function(){return(Pl=b._emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_4=b.asm.Lj).apply(null,arguments)},Ql=b._emscripten_bind_btConeTwistConstraint_setLimit_2= +function(){return(Ql=b._emscripten_bind_btConeTwistConstraint_setLimit_2=b.asm.Mj).apply(null,arguments)},Rl=b._emscripten_bind_btConeTwistConstraint_setAngularOnly_1=function(){return(Rl=b._emscripten_bind_btConeTwistConstraint_setAngularOnly_1=b.asm.Nj).apply(null,arguments)},Sl=b._emscripten_bind_btConeTwistConstraint_setDamping_1=function(){return(Sl=b._emscripten_bind_btConeTwistConstraint_setDamping_1=b.asm.Oj).apply(null,arguments)},Tl=b._emscripten_bind_btConeTwistConstraint_enableMotor_1= +function(){return(Tl=b._emscripten_bind_btConeTwistConstraint_enableMotor_1=b.asm.Pj).apply(null,arguments)},Ul=b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulse_1=function(){return(Ul=b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulse_1=b.asm.Qj).apply(null,arguments)},Vl=b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulseNormalized_1=function(){return(Vl=b._emscripten_bind_btConeTwistConstraint_setMaxMotorImpulseNormalized_1=b.asm.Rj).apply(null,arguments)},Wl=b._emscripten_bind_btConeTwistConstraint_setMotorTarget_1= +function(){return(Wl=b._emscripten_bind_btConeTwistConstraint_setMotorTarget_1=b.asm.Sj).apply(null,arguments)},Xl=b._emscripten_bind_btConeTwistConstraint_setMotorTargetInConstraintSpace_1=function(){return(Xl=b._emscripten_bind_btConeTwistConstraint_setMotorTargetInConstraintSpace_1=b.asm.Tj).apply(null,arguments)},Yl=b._emscripten_bind_btConeTwistConstraint_enableFeedback_1=function(){return(Yl=b._emscripten_bind_btConeTwistConstraint_enableFeedback_1=b.asm.Uj).apply(null,arguments)},Zl=b._emscripten_bind_btConeTwistConstraint_getBreakingImpulseThreshold_0= +function(){return(Zl=b._emscripten_bind_btConeTwistConstraint_getBreakingImpulseThreshold_0=b.asm.Vj).apply(null,arguments)},$l=b._emscripten_bind_btConeTwistConstraint_setBreakingImpulseThreshold_1=function(){return($l=b._emscripten_bind_btConeTwistConstraint_setBreakingImpulseThreshold_1=b.asm.Wj).apply(null,arguments)},am=b._emscripten_bind_btConeTwistConstraint_getParam_2=function(){return(am=b._emscripten_bind_btConeTwistConstraint_getParam_2=b.asm.Xj).apply(null,arguments)},bm=b._emscripten_bind_btConeTwistConstraint_setParam_3= +function(){return(bm=b._emscripten_bind_btConeTwistConstraint_setParam_3=b.asm.Yj).apply(null,arguments)},cm=b._emscripten_bind_btConeTwistConstraint___destroy___0=function(){return(cm=b._emscripten_bind_btConeTwistConstraint___destroy___0=b.asm.Zj).apply(null,arguments)},dm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_2=function(){return(dm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_2=b.asm._j).apply(null,arguments)},em=b._emscripten_bind_btHingeConstraint_btHingeConstraint_3= +function(){return(em=b._emscripten_bind_btHingeConstraint_btHingeConstraint_3=b.asm.$j).apply(null,arguments)},fm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_4=function(){return(fm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_4=b.asm.ak).apply(null,arguments)},gm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_5=function(){return(gm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_5=b.asm.bk).apply(null,arguments)},hm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_6= +function(){return(hm=b._emscripten_bind_btHingeConstraint_btHingeConstraint_6=b.asm.ck).apply(null,arguments)},im=b._emscripten_bind_btHingeConstraint_btHingeConstraint_7=function(){return(im=b._emscripten_bind_btHingeConstraint_btHingeConstraint_7=b.asm.dk).apply(null,arguments)},jm=b._emscripten_bind_btHingeConstraint_setLimit_4=function(){return(jm=b._emscripten_bind_btHingeConstraint_setLimit_4=b.asm.ek).apply(null,arguments)},km=b._emscripten_bind_btHingeConstraint_setLimit_5=function(){return(km= +b._emscripten_bind_btHingeConstraint_setLimit_5=b.asm.fk).apply(null,arguments)},lm=b._emscripten_bind_btHingeConstraint_enableAngularMotor_3=function(){return(lm=b._emscripten_bind_btHingeConstraint_enableAngularMotor_3=b.asm.gk).apply(null,arguments)},mm=b._emscripten_bind_btHingeConstraint_setAngularOnly_1=function(){return(mm=b._emscripten_bind_btHingeConstraint_setAngularOnly_1=b.asm.hk).apply(null,arguments)},nm=b._emscripten_bind_btHingeConstraint_enableMotor_1=function(){return(nm=b._emscripten_bind_btHingeConstraint_enableMotor_1= +b.asm.ik).apply(null,arguments)},om=b._emscripten_bind_btHingeConstraint_setMaxMotorImpulse_1=function(){return(om=b._emscripten_bind_btHingeConstraint_setMaxMotorImpulse_1=b.asm.jk).apply(null,arguments)},pm=b._emscripten_bind_btHingeConstraint_setMotorTarget_2=function(){return(pm=b._emscripten_bind_btHingeConstraint_setMotorTarget_2=b.asm.kk).apply(null,arguments)},qm=b._emscripten_bind_btHingeConstraint_enableFeedback_1=function(){return(qm=b._emscripten_bind_btHingeConstraint_enableFeedback_1= +b.asm.lk).apply(null,arguments)},rm=b._emscripten_bind_btHingeConstraint_getBreakingImpulseThreshold_0=function(){return(rm=b._emscripten_bind_btHingeConstraint_getBreakingImpulseThreshold_0=b.asm.mk).apply(null,arguments)},sm=b._emscripten_bind_btHingeConstraint_setBreakingImpulseThreshold_1=function(){return(sm=b._emscripten_bind_btHingeConstraint_setBreakingImpulseThreshold_1=b.asm.nk).apply(null,arguments)},tm=b._emscripten_bind_btHingeConstraint_getParam_2=function(){return(tm=b._emscripten_bind_btHingeConstraint_getParam_2= +b.asm.ok).apply(null,arguments)},um=b._emscripten_bind_btHingeConstraint_setParam_3=function(){return(um=b._emscripten_bind_btHingeConstraint_setParam_3=b.asm.pk).apply(null,arguments)},wm=b._emscripten_bind_btHingeConstraint___destroy___0=function(){return(wm=b._emscripten_bind_btHingeConstraint___destroy___0=b.asm.qk).apply(null,arguments)},xm=b._emscripten_bind_btConeShapeZ_btConeShapeZ_2=function(){return(xm=b._emscripten_bind_btConeShapeZ_btConeShapeZ_2=b.asm.rk).apply(null,arguments)},ym=b._emscripten_bind_btConeShapeZ_setLocalScaling_1= +function(){return(ym=b._emscripten_bind_btConeShapeZ_setLocalScaling_1=b.asm.sk).apply(null,arguments)},zm=b._emscripten_bind_btConeShapeZ_getLocalScaling_0=function(){return(zm=b._emscripten_bind_btConeShapeZ_getLocalScaling_0=b.asm.tk).apply(null,arguments)},Am=b._emscripten_bind_btConeShapeZ_calculateLocalInertia_2=function(){return(Am=b._emscripten_bind_btConeShapeZ_calculateLocalInertia_2=b.asm.uk).apply(null,arguments)},Bm=b._emscripten_bind_btConeShapeZ___destroy___0=function(){return(Bm=b._emscripten_bind_btConeShapeZ___destroy___0= +b.asm.vk).apply(null,arguments)},Cm=b._emscripten_bind_btConeShapeX_btConeShapeX_2=function(){return(Cm=b._emscripten_bind_btConeShapeX_btConeShapeX_2=b.asm.wk).apply(null,arguments)},Dm=b._emscripten_bind_btConeShapeX_setLocalScaling_1=function(){return(Dm=b._emscripten_bind_btConeShapeX_setLocalScaling_1=b.asm.xk).apply(null,arguments)},Em=b._emscripten_bind_btConeShapeX_getLocalScaling_0=function(){return(Em=b._emscripten_bind_btConeShapeX_getLocalScaling_0=b.asm.yk).apply(null,arguments)},Fm= +b._emscripten_bind_btConeShapeX_calculateLocalInertia_2=function(){return(Fm=b._emscripten_bind_btConeShapeX_calculateLocalInertia_2=b.asm.zk).apply(null,arguments)},Gm=b._emscripten_bind_btConeShapeX___destroy___0=function(){return(Gm=b._emscripten_bind_btConeShapeX___destroy___0=b.asm.Ak).apply(null,arguments)},Hm=b._emscripten_bind_btTriangleMesh_btTriangleMesh_0=function(){return(Hm=b._emscripten_bind_btTriangleMesh_btTriangleMesh_0=b.asm.Bk).apply(null,arguments)},Im=b._emscripten_bind_btTriangleMesh_btTriangleMesh_1= +function(){return(Im=b._emscripten_bind_btTriangleMesh_btTriangleMesh_1=b.asm.Ck).apply(null,arguments)},Jm=b._emscripten_bind_btTriangleMesh_btTriangleMesh_2=function(){return(Jm=b._emscripten_bind_btTriangleMesh_btTriangleMesh_2=b.asm.Dk).apply(null,arguments)},Km=b._emscripten_bind_btTriangleMesh_addTriangle_3=function(){return(Km=b._emscripten_bind_btTriangleMesh_addTriangle_3=b.asm.Ek).apply(null,arguments)},Lm=b._emscripten_bind_btTriangleMesh_addTriangle_4=function(){return(Lm=b._emscripten_bind_btTriangleMesh_addTriangle_4= +b.asm.Fk).apply(null,arguments)},Mm=b._emscripten_bind_btTriangleMesh_findOrAddVertex_2=function(){return(Mm=b._emscripten_bind_btTriangleMesh_findOrAddVertex_2=b.asm.Gk).apply(null,arguments)},Nm=b._emscripten_bind_btTriangleMesh_addIndex_1=function(){return(Nm=b._emscripten_bind_btTriangleMesh_addIndex_1=b.asm.Hk).apply(null,arguments)},Om=b._emscripten_bind_btTriangleMesh_getIndexedMeshArray_0=function(){return(Om=b._emscripten_bind_btTriangleMesh_getIndexedMeshArray_0=b.asm.Ik).apply(null,arguments)}, +Pm=b._emscripten_bind_btTriangleMesh_setScaling_1=function(){return(Pm=b._emscripten_bind_btTriangleMesh_setScaling_1=b.asm.Jk).apply(null,arguments)},Qm=b._emscripten_bind_btTriangleMesh___destroy___0=function(){return(Qm=b._emscripten_bind_btTriangleMesh___destroy___0=b.asm.Kk).apply(null,arguments)},Rm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_0=function(){return(Rm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_0=b.asm.Lk).apply(null,arguments)},Sm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_1= +function(){return(Sm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_1=b.asm.Mk).apply(null,arguments)},Tm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_2=function(){return(Tm=b._emscripten_bind_btConvexHullShape_btConvexHullShape_2=b.asm.Nk).apply(null,arguments)},Um=b._emscripten_bind_btConvexHullShape_addPoint_1=function(){return(Um=b._emscripten_bind_btConvexHullShape_addPoint_1=b.asm.Ok).apply(null,arguments)},Vm=b._emscripten_bind_btConvexHullShape_addPoint_2=function(){return(Vm= +b._emscripten_bind_btConvexHullShape_addPoint_2=b.asm.Pk).apply(null,arguments)},Wm=b._emscripten_bind_btConvexHullShape_setMargin_1=function(){return(Wm=b._emscripten_bind_btConvexHullShape_setMargin_1=b.asm.Qk).apply(null,arguments)},Xm=b._emscripten_bind_btConvexHullShape_getMargin_0=function(){return(Xm=b._emscripten_bind_btConvexHullShape_getMargin_0=b.asm.Rk).apply(null,arguments)},Ym=b._emscripten_bind_btConvexHullShape_getNumVertices_0=function(){return(Ym=b._emscripten_bind_btConvexHullShape_getNumVertices_0= +b.asm.Sk).apply(null,arguments)},Zm=b._emscripten_bind_btConvexHullShape_initializePolyhedralFeatures_1=function(){return(Zm=b._emscripten_bind_btConvexHullShape_initializePolyhedralFeatures_1=b.asm.Tk).apply(null,arguments)},$m=b._emscripten_bind_btConvexHullShape_recalcLocalAabb_0=function(){return($m=b._emscripten_bind_btConvexHullShape_recalcLocalAabb_0=b.asm.Uk).apply(null,arguments)},an=b._emscripten_bind_btConvexHullShape_getConvexPolyhedron_0=function(){return(an=b._emscripten_bind_btConvexHullShape_getConvexPolyhedron_0= +b.asm.Vk).apply(null,arguments)},bn=b._emscripten_bind_btConvexHullShape_setLocalScaling_1=function(){return(bn=b._emscripten_bind_btConvexHullShape_setLocalScaling_1=b.asm.Wk).apply(null,arguments)},cn=b._emscripten_bind_btConvexHullShape_getLocalScaling_0=function(){return(cn=b._emscripten_bind_btConvexHullShape_getLocalScaling_0=b.asm.Xk).apply(null,arguments)},dn=b._emscripten_bind_btConvexHullShape_calculateLocalInertia_2=function(){return(dn=b._emscripten_bind_btConvexHullShape_calculateLocalInertia_2= +b.asm.Yk).apply(null,arguments)},en=b._emscripten_bind_btConvexHullShape___destroy___0=function(){return(en=b._emscripten_bind_btConvexHullShape___destroy___0=b.asm.Zk).apply(null,arguments)},fn=b._emscripten_bind_btVehicleTuning_btVehicleTuning_0=function(){return(fn=b._emscripten_bind_btVehicleTuning_btVehicleTuning_0=b.asm._k).apply(null,arguments)},gn=b._emscripten_bind_btVehicleTuning_get_m_suspensionStiffness_0=function(){return(gn=b._emscripten_bind_btVehicleTuning_get_m_suspensionStiffness_0= +b.asm.$k).apply(null,arguments)},hn=b._emscripten_bind_btVehicleTuning_set_m_suspensionStiffness_1=function(){return(hn=b._emscripten_bind_btVehicleTuning_set_m_suspensionStiffness_1=b.asm.al).apply(null,arguments)},jn=b._emscripten_bind_btVehicleTuning_get_m_suspensionCompression_0=function(){return(jn=b._emscripten_bind_btVehicleTuning_get_m_suspensionCompression_0=b.asm.bl).apply(null,arguments)},kn=b._emscripten_bind_btVehicleTuning_set_m_suspensionCompression_1=function(){return(kn=b._emscripten_bind_btVehicleTuning_set_m_suspensionCompression_1= +b.asm.cl).apply(null,arguments)},ln=b._emscripten_bind_btVehicleTuning_get_m_suspensionDamping_0=function(){return(ln=b._emscripten_bind_btVehicleTuning_get_m_suspensionDamping_0=b.asm.dl).apply(null,arguments)},mn=b._emscripten_bind_btVehicleTuning_set_m_suspensionDamping_1=function(){return(mn=b._emscripten_bind_btVehicleTuning_set_m_suspensionDamping_1=b.asm.el).apply(null,arguments)},nn=b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionTravelCm_0=function(){return(nn=b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionTravelCm_0= +b.asm.fl).apply(null,arguments)},on=b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionTravelCm_1=function(){return(on=b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionTravelCm_1=b.asm.gl).apply(null,arguments)},pn=b._emscripten_bind_btVehicleTuning_get_m_frictionSlip_0=function(){return(pn=b._emscripten_bind_btVehicleTuning_get_m_frictionSlip_0=b.asm.hl).apply(null,arguments)},qn=b._emscripten_bind_btVehicleTuning_set_m_frictionSlip_1=function(){return(qn=b._emscripten_bind_btVehicleTuning_set_m_frictionSlip_1= +b.asm.il).apply(null,arguments)},rn=b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionForce_0=function(){return(rn=b._emscripten_bind_btVehicleTuning_get_m_maxSuspensionForce_0=b.asm.jl).apply(null,arguments)},sn=b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionForce_1=function(){return(sn=b._emscripten_bind_btVehicleTuning_set_m_maxSuspensionForce_1=b.asm.kl).apply(null,arguments)},tn=b._emscripten_bind_btCollisionObjectWrapper_getWorldTransform_0=function(){return(tn=b._emscripten_bind_btCollisionObjectWrapper_getWorldTransform_0= +b.asm.ll).apply(null,arguments)},un=b._emscripten_bind_btCollisionObjectWrapper_getCollisionObject_0=function(){return(un=b._emscripten_bind_btCollisionObjectWrapper_getCollisionObject_0=b.asm.ml).apply(null,arguments)},vn=b._emscripten_bind_btCollisionObjectWrapper_getCollisionShape_0=function(){return(vn=b._emscripten_bind_btCollisionObjectWrapper_getCollisionShape_0=b.asm.nl).apply(null,arguments)},wn=b._emscripten_bind_btShapeHull_btShapeHull_1=function(){return(wn=b._emscripten_bind_btShapeHull_btShapeHull_1= +b.asm.ol).apply(null,arguments)},xn=b._emscripten_bind_btShapeHull_buildHull_1=function(){return(xn=b._emscripten_bind_btShapeHull_buildHull_1=b.asm.pl).apply(null,arguments)},yn=b._emscripten_bind_btShapeHull_numVertices_0=function(){return(yn=b._emscripten_bind_btShapeHull_numVertices_0=b.asm.ql).apply(null,arguments)},zn=b._emscripten_bind_btShapeHull_getVertexPointer_0=function(){return(zn=b._emscripten_bind_btShapeHull_getVertexPointer_0=b.asm.rl).apply(null,arguments)},An=b._emscripten_bind_btShapeHull___destroy___0= +function(){return(An=b._emscripten_bind_btShapeHull___destroy___0=b.asm.sl).apply(null,arguments)},Bn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_0=function(){return(Bn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_0=b.asm.tl).apply(null,arguments)},Cn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_1=function(){return(Cn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_1=b.asm.ul).apply(null,arguments)},Dn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_2= +function(){return(Dn=b._emscripten_bind_btDefaultMotionState_btDefaultMotionState_2=b.asm.vl).apply(null,arguments)},En=b._emscripten_bind_btDefaultMotionState_getWorldTransform_1=function(){return(En=b._emscripten_bind_btDefaultMotionState_getWorldTransform_1=b.asm.wl).apply(null,arguments)},Fn=b._emscripten_bind_btDefaultMotionState_setWorldTransform_1=function(){return(Fn=b._emscripten_bind_btDefaultMotionState_setWorldTransform_1=b.asm.xl).apply(null,arguments)},Gn=b._emscripten_bind_btDefaultMotionState_get_m_graphicsWorldTrans_0= +function(){return(Gn=b._emscripten_bind_btDefaultMotionState_get_m_graphicsWorldTrans_0=b.asm.yl).apply(null,arguments)},Hn=b._emscripten_bind_btDefaultMotionState_set_m_graphicsWorldTrans_1=function(){return(Hn=b._emscripten_bind_btDefaultMotionState_set_m_graphicsWorldTrans_1=b.asm.zl).apply(null,arguments)},In=b._emscripten_bind_btDefaultMotionState___destroy___0=function(){return(In=b._emscripten_bind_btDefaultMotionState___destroy___0=b.asm.Al).apply(null,arguments)},Jn=b._emscripten_bind_btWheelInfo_btWheelInfo_1= +function(){return(Jn=b._emscripten_bind_btWheelInfo_btWheelInfo_1=b.asm.Bl).apply(null,arguments)},Kn=b._emscripten_bind_btWheelInfo_getSuspensionRestLength_0=function(){return(Kn=b._emscripten_bind_btWheelInfo_getSuspensionRestLength_0=b.asm.Cl).apply(null,arguments)},Ln=b._emscripten_bind_btWheelInfo_updateWheel_2=function(){return(Ln=b._emscripten_bind_btWheelInfo_updateWheel_2=b.asm.Dl).apply(null,arguments)},Mn=b._emscripten_bind_btWheelInfo_get_m_suspensionStiffness_0=function(){return(Mn=b._emscripten_bind_btWheelInfo_get_m_suspensionStiffness_0= +b.asm.El).apply(null,arguments)},Nn=b._emscripten_bind_btWheelInfo_set_m_suspensionStiffness_1=function(){return(Nn=b._emscripten_bind_btWheelInfo_set_m_suspensionStiffness_1=b.asm.Fl).apply(null,arguments)},On=b._emscripten_bind_btWheelInfo_get_m_frictionSlip_0=function(){return(On=b._emscripten_bind_btWheelInfo_get_m_frictionSlip_0=b.asm.Gl).apply(null,arguments)},Pn=b._emscripten_bind_btWheelInfo_set_m_frictionSlip_1=function(){return(Pn=b._emscripten_bind_btWheelInfo_set_m_frictionSlip_1=b.asm.Hl).apply(null, +arguments)},Qn=b._emscripten_bind_btWheelInfo_get_m_engineForce_0=function(){return(Qn=b._emscripten_bind_btWheelInfo_get_m_engineForce_0=b.asm.Il).apply(null,arguments)},Rn=b._emscripten_bind_btWheelInfo_set_m_engineForce_1=function(){return(Rn=b._emscripten_bind_btWheelInfo_set_m_engineForce_1=b.asm.Jl).apply(null,arguments)},Sn=b._emscripten_bind_btWheelInfo_get_m_rollInfluence_0=function(){return(Sn=b._emscripten_bind_btWheelInfo_get_m_rollInfluence_0=b.asm.Kl).apply(null,arguments)},Tn=b._emscripten_bind_btWheelInfo_set_m_rollInfluence_1= +function(){return(Tn=b._emscripten_bind_btWheelInfo_set_m_rollInfluence_1=b.asm.Ll).apply(null,arguments)},Un=b._emscripten_bind_btWheelInfo_get_m_suspensionRestLength1_0=function(){return(Un=b._emscripten_bind_btWheelInfo_get_m_suspensionRestLength1_0=b.asm.Ml).apply(null,arguments)},Vn=b._emscripten_bind_btWheelInfo_set_m_suspensionRestLength1_1=function(){return(Vn=b._emscripten_bind_btWheelInfo_set_m_suspensionRestLength1_1=b.asm.Nl).apply(null,arguments)},Wn=b._emscripten_bind_btWheelInfo_get_m_wheelsRadius_0= +function(){return(Wn=b._emscripten_bind_btWheelInfo_get_m_wheelsRadius_0=b.asm.Ol).apply(null,arguments)},Xn=b._emscripten_bind_btWheelInfo_set_m_wheelsRadius_1=function(){return(Xn=b._emscripten_bind_btWheelInfo_set_m_wheelsRadius_1=b.asm.Pl).apply(null,arguments)},Yn=b._emscripten_bind_btWheelInfo_get_m_wheelsDampingCompression_0=function(){return(Yn=b._emscripten_bind_btWheelInfo_get_m_wheelsDampingCompression_0=b.asm.Ql).apply(null,arguments)},Zn=b._emscripten_bind_btWheelInfo_set_m_wheelsDampingCompression_1= +function(){return(Zn=b._emscripten_bind_btWheelInfo_set_m_wheelsDampingCompression_1=b.asm.Rl).apply(null,arguments)},$n=b._emscripten_bind_btWheelInfo_get_m_wheelsDampingRelaxation_0=function(){return($n=b._emscripten_bind_btWheelInfo_get_m_wheelsDampingRelaxation_0=b.asm.Sl).apply(null,arguments)},ao=b._emscripten_bind_btWheelInfo_set_m_wheelsDampingRelaxation_1=function(){return(ao=b._emscripten_bind_btWheelInfo_set_m_wheelsDampingRelaxation_1=b.asm.Tl).apply(null,arguments)},bo=b._emscripten_bind_btWheelInfo_get_m_steering_0= +function(){return(bo=b._emscripten_bind_btWheelInfo_get_m_steering_0=b.asm.Ul).apply(null,arguments)},co=b._emscripten_bind_btWheelInfo_set_m_steering_1=function(){return(co=b._emscripten_bind_btWheelInfo_set_m_steering_1=b.asm.Vl).apply(null,arguments)},eo=b._emscripten_bind_btWheelInfo_get_m_maxSuspensionForce_0=function(){return(eo=b._emscripten_bind_btWheelInfo_get_m_maxSuspensionForce_0=b.asm.Wl).apply(null,arguments)},fo=b._emscripten_bind_btWheelInfo_set_m_maxSuspensionForce_1=function(){return(fo= +b._emscripten_bind_btWheelInfo_set_m_maxSuspensionForce_1=b.asm.Xl).apply(null,arguments)},go=b._emscripten_bind_btWheelInfo_get_m_maxSuspensionTravelCm_0=function(){return(go=b._emscripten_bind_btWheelInfo_get_m_maxSuspensionTravelCm_0=b.asm.Yl).apply(null,arguments)},ho=b._emscripten_bind_btWheelInfo_set_m_maxSuspensionTravelCm_1=function(){return(ho=b._emscripten_bind_btWheelInfo_set_m_maxSuspensionTravelCm_1=b.asm.Zl).apply(null,arguments)},io=b._emscripten_bind_btWheelInfo_get_m_wheelsSuspensionForce_0= +function(){return(io=b._emscripten_bind_btWheelInfo_get_m_wheelsSuspensionForce_0=b.asm._l).apply(null,arguments)},jo=b._emscripten_bind_btWheelInfo_set_m_wheelsSuspensionForce_1=function(){return(jo=b._emscripten_bind_btWheelInfo_set_m_wheelsSuspensionForce_1=b.asm.$l).apply(null,arguments)},ko=b._emscripten_bind_btWheelInfo_get_m_bIsFrontWheel_0=function(){return(ko=b._emscripten_bind_btWheelInfo_get_m_bIsFrontWheel_0=b.asm.am).apply(null,arguments)},lo=b._emscripten_bind_btWheelInfo_set_m_bIsFrontWheel_1= +function(){return(lo=b._emscripten_bind_btWheelInfo_set_m_bIsFrontWheel_1=b.asm.bm).apply(null,arguments)},mo=b._emscripten_bind_btWheelInfo_get_m_raycastInfo_0=function(){return(mo=b._emscripten_bind_btWheelInfo_get_m_raycastInfo_0=b.asm.cm).apply(null,arguments)},no=b._emscripten_bind_btWheelInfo_set_m_raycastInfo_1=function(){return(no=b._emscripten_bind_btWheelInfo_set_m_raycastInfo_1=b.asm.dm).apply(null,arguments)},oo=b._emscripten_bind_btWheelInfo_get_m_chassisConnectionPointCS_0=function(){return(oo= +b._emscripten_bind_btWheelInfo_get_m_chassisConnectionPointCS_0=b.asm.em).apply(null,arguments)},po=b._emscripten_bind_btWheelInfo_set_m_chassisConnectionPointCS_1=function(){return(po=b._emscripten_bind_btWheelInfo_set_m_chassisConnectionPointCS_1=b.asm.fm).apply(null,arguments)},qo=b._emscripten_bind_btWheelInfo_get_m_worldTransform_0=function(){return(qo=b._emscripten_bind_btWheelInfo_get_m_worldTransform_0=b.asm.gm).apply(null,arguments)},ro=b._emscripten_bind_btWheelInfo_set_m_worldTransform_1= +function(){return(ro=b._emscripten_bind_btWheelInfo_set_m_worldTransform_1=b.asm.hm).apply(null,arguments)},so=b._emscripten_bind_btWheelInfo_get_m_wheelDirectionCS_0=function(){return(so=b._emscripten_bind_btWheelInfo_get_m_wheelDirectionCS_0=b.asm.im).apply(null,arguments)},to=b._emscripten_bind_btWheelInfo_set_m_wheelDirectionCS_1=function(){return(to=b._emscripten_bind_btWheelInfo_set_m_wheelDirectionCS_1=b.asm.jm).apply(null,arguments)},uo=b._emscripten_bind_btWheelInfo_get_m_wheelAxleCS_0=function(){return(uo= +b._emscripten_bind_btWheelInfo_get_m_wheelAxleCS_0=b.asm.km).apply(null,arguments)},vo=b._emscripten_bind_btWheelInfo_set_m_wheelAxleCS_1=function(){return(vo=b._emscripten_bind_btWheelInfo_set_m_wheelAxleCS_1=b.asm.lm).apply(null,arguments)},wo=b._emscripten_bind_btWheelInfo_get_m_rotation_0=function(){return(wo=b._emscripten_bind_btWheelInfo_get_m_rotation_0=b.asm.mm).apply(null,arguments)},xo=b._emscripten_bind_btWheelInfo_set_m_rotation_1=function(){return(xo=b._emscripten_bind_btWheelInfo_set_m_rotation_1= +b.asm.nm).apply(null,arguments)},yo=b._emscripten_bind_btWheelInfo_get_m_deltaRotation_0=function(){return(yo=b._emscripten_bind_btWheelInfo_get_m_deltaRotation_0=b.asm.om).apply(null,arguments)},zo=b._emscripten_bind_btWheelInfo_set_m_deltaRotation_1=function(){return(zo=b._emscripten_bind_btWheelInfo_set_m_deltaRotation_1=b.asm.pm).apply(null,arguments)},Ao=b._emscripten_bind_btWheelInfo_get_m_brake_0=function(){return(Ao=b._emscripten_bind_btWheelInfo_get_m_brake_0=b.asm.qm).apply(null,arguments)}, +Bo=b._emscripten_bind_btWheelInfo_set_m_brake_1=function(){return(Bo=b._emscripten_bind_btWheelInfo_set_m_brake_1=b.asm.rm).apply(null,arguments)},Co=b._emscripten_bind_btWheelInfo_get_m_clippedInvContactDotSuspension_0=function(){return(Co=b._emscripten_bind_btWheelInfo_get_m_clippedInvContactDotSuspension_0=b.asm.sm).apply(null,arguments)},Do=b._emscripten_bind_btWheelInfo_set_m_clippedInvContactDotSuspension_1=function(){return(Do=b._emscripten_bind_btWheelInfo_set_m_clippedInvContactDotSuspension_1= +b.asm.tm).apply(null,arguments)},Eo=b._emscripten_bind_btWheelInfo_get_m_suspensionRelativeVelocity_0=function(){return(Eo=b._emscripten_bind_btWheelInfo_get_m_suspensionRelativeVelocity_0=b.asm.um).apply(null,arguments)},Fo=b._emscripten_bind_btWheelInfo_set_m_suspensionRelativeVelocity_1=function(){return(Fo=b._emscripten_bind_btWheelInfo_set_m_suspensionRelativeVelocity_1=b.asm.vm).apply(null,arguments)},Go=b._emscripten_bind_btWheelInfo_get_m_skidInfo_0=function(){return(Go=b._emscripten_bind_btWheelInfo_get_m_skidInfo_0= +b.asm.wm).apply(null,arguments)},Ho=b._emscripten_bind_btWheelInfo_set_m_skidInfo_1=function(){return(Ho=b._emscripten_bind_btWheelInfo_set_m_skidInfo_1=b.asm.xm).apply(null,arguments)},Io=b._emscripten_bind_btWheelInfo___destroy___0=function(){return(Io=b._emscripten_bind_btWheelInfo___destroy___0=b.asm.ym).apply(null,arguments)},Jo=b._emscripten_bind_btVector4_btVector4_0=function(){return(Jo=b._emscripten_bind_btVector4_btVector4_0=b.asm.zm).apply(null,arguments)},Ko=b._emscripten_bind_btVector4_btVector4_4= +function(){return(Ko=b._emscripten_bind_btVector4_btVector4_4=b.asm.Am).apply(null,arguments)},Lo=b._emscripten_bind_btVector4_w_0=function(){return(Lo=b._emscripten_bind_btVector4_w_0=b.asm.Bm).apply(null,arguments)},Mo=b._emscripten_bind_btVector4_setValue_4=function(){return(Mo=b._emscripten_bind_btVector4_setValue_4=b.asm.Cm).apply(null,arguments)},No=b._emscripten_bind_btVector4_length_0=function(){return(No=b._emscripten_bind_btVector4_length_0=b.asm.Dm).apply(null,arguments)},Oo=b._emscripten_bind_btVector4_x_0= +function(){return(Oo=b._emscripten_bind_btVector4_x_0=b.asm.Em).apply(null,arguments)},Po=b._emscripten_bind_btVector4_y_0=function(){return(Po=b._emscripten_bind_btVector4_y_0=b.asm.Fm).apply(null,arguments)},Qo=b._emscripten_bind_btVector4_z_0=function(){return(Qo=b._emscripten_bind_btVector4_z_0=b.asm.Gm).apply(null,arguments)},Ro=b._emscripten_bind_btVector4_setX_1=function(){return(Ro=b._emscripten_bind_btVector4_setX_1=b.asm.Hm).apply(null,arguments)},So=b._emscripten_bind_btVector4_setY_1= +function(){return(So=b._emscripten_bind_btVector4_setY_1=b.asm.Im).apply(null,arguments)},To=b._emscripten_bind_btVector4_setZ_1=function(){return(To=b._emscripten_bind_btVector4_setZ_1=b.asm.Jm).apply(null,arguments)},Uo=b._emscripten_bind_btVector4_normalize_0=function(){return(Uo=b._emscripten_bind_btVector4_normalize_0=b.asm.Km).apply(null,arguments)},Vo=b._emscripten_bind_btVector4_rotate_2=function(){return(Vo=b._emscripten_bind_btVector4_rotate_2=b.asm.Lm).apply(null,arguments)},Wo=b._emscripten_bind_btVector4_dot_1= +function(){return(Wo=b._emscripten_bind_btVector4_dot_1=b.asm.Mm).apply(null,arguments)},Xo=b._emscripten_bind_btVector4_op_mul_1=function(){return(Xo=b._emscripten_bind_btVector4_op_mul_1=b.asm.Nm).apply(null,arguments)},Yo=b._emscripten_bind_btVector4_op_add_1=function(){return(Yo=b._emscripten_bind_btVector4_op_add_1=b.asm.Om).apply(null,arguments)},Zo=b._emscripten_bind_btVector4_op_sub_1=function(){return(Zo=b._emscripten_bind_btVector4_op_sub_1=b.asm.Pm).apply(null,arguments)},$o=b._emscripten_bind_btVector4___destroy___0= +function(){return($o=b._emscripten_bind_btVector4___destroy___0=b.asm.Qm).apply(null,arguments)},ap=b._emscripten_bind_btDefaultCollisionConstructionInfo_btDefaultCollisionConstructionInfo_0=function(){return(ap=b._emscripten_bind_btDefaultCollisionConstructionInfo_btDefaultCollisionConstructionInfo_0=b.asm.Rm).apply(null,arguments)},bp=b._emscripten_bind_btDefaultCollisionConstructionInfo___destroy___0=function(){return(bp=b._emscripten_bind_btDefaultCollisionConstructionInfo___destroy___0=b.asm.Sm).apply(null, +arguments)},cp=b._emscripten_bind_Anchor_get_m_node_0=function(){return(cp=b._emscripten_bind_Anchor_get_m_node_0=b.asm.Tm).apply(null,arguments)},dp=b._emscripten_bind_Anchor_set_m_node_1=function(){return(dp=b._emscripten_bind_Anchor_set_m_node_1=b.asm.Um).apply(null,arguments)},ep=b._emscripten_bind_Anchor_get_m_local_0=function(){return(ep=b._emscripten_bind_Anchor_get_m_local_0=b.asm.Vm).apply(null,arguments)},fp=b._emscripten_bind_Anchor_set_m_local_1=function(){return(fp=b._emscripten_bind_Anchor_set_m_local_1= +b.asm.Wm).apply(null,arguments)},gp=b._emscripten_bind_Anchor_get_m_body_0=function(){return(gp=b._emscripten_bind_Anchor_get_m_body_0=b.asm.Xm).apply(null,arguments)},hp=b._emscripten_bind_Anchor_set_m_body_1=function(){return(hp=b._emscripten_bind_Anchor_set_m_body_1=b.asm.Ym).apply(null,arguments)},ip=b._emscripten_bind_Anchor_get_m_influence_0=function(){return(ip=b._emscripten_bind_Anchor_get_m_influence_0=b.asm.Zm).apply(null,arguments)},jp=b._emscripten_bind_Anchor_set_m_influence_1=function(){return(jp= +b._emscripten_bind_Anchor_set_m_influence_1=b.asm._m).apply(null,arguments)},kp=b._emscripten_bind_Anchor_get_m_c0_0=function(){return(kp=b._emscripten_bind_Anchor_get_m_c0_0=b.asm.$m).apply(null,arguments)},lp=b._emscripten_bind_Anchor_set_m_c0_1=function(){return(lp=b._emscripten_bind_Anchor_set_m_c0_1=b.asm.an).apply(null,arguments)},mp=b._emscripten_bind_Anchor_get_m_c1_0=function(){return(mp=b._emscripten_bind_Anchor_get_m_c1_0=b.asm.bn).apply(null,arguments)},np=b._emscripten_bind_Anchor_set_m_c1_1= +function(){return(np=b._emscripten_bind_Anchor_set_m_c1_1=b.asm.cn).apply(null,arguments)},op=b._emscripten_bind_Anchor_get_m_c2_0=function(){return(op=b._emscripten_bind_Anchor_get_m_c2_0=b.asm.dn).apply(null,arguments)},pp=b._emscripten_bind_Anchor_set_m_c2_1=function(){return(pp=b._emscripten_bind_Anchor_set_m_c2_1=b.asm.en).apply(null,arguments)},qp=b._emscripten_bind_Anchor___destroy___0=function(){return(qp=b._emscripten_bind_Anchor___destroy___0=b.asm.fn).apply(null,arguments)},rp=b._emscripten_bind_btVehicleRaycasterResult_get_m_hitPointInWorld_0= +function(){return(rp=b._emscripten_bind_btVehicleRaycasterResult_get_m_hitPointInWorld_0=b.asm.gn).apply(null,arguments)},sp=b._emscripten_bind_btVehicleRaycasterResult_set_m_hitPointInWorld_1=function(){return(sp=b._emscripten_bind_btVehicleRaycasterResult_set_m_hitPointInWorld_1=b.asm.hn).apply(null,arguments)},tp=b._emscripten_bind_btVehicleRaycasterResult_get_m_hitNormalInWorld_0=function(){return(tp=b._emscripten_bind_btVehicleRaycasterResult_get_m_hitNormalInWorld_0=b.asm.jn).apply(null,arguments)}, +up=b._emscripten_bind_btVehicleRaycasterResult_set_m_hitNormalInWorld_1=function(){return(up=b._emscripten_bind_btVehicleRaycasterResult_set_m_hitNormalInWorld_1=b.asm.kn).apply(null,arguments)},vp=b._emscripten_bind_btVehicleRaycasterResult_get_m_distFraction_0=function(){return(vp=b._emscripten_bind_btVehicleRaycasterResult_get_m_distFraction_0=b.asm.ln).apply(null,arguments)},wp=b._emscripten_bind_btVehicleRaycasterResult_set_m_distFraction_1=function(){return(wp=b._emscripten_bind_btVehicleRaycasterResult_set_m_distFraction_1= +b.asm.mn).apply(null,arguments)},xp=b._emscripten_bind_btVehicleRaycasterResult___destroy___0=function(){return(xp=b._emscripten_bind_btVehicleRaycasterResult___destroy___0=b.asm.nn).apply(null,arguments)},yp=b._emscripten_bind_btVector3Array_size_0=function(){return(yp=b._emscripten_bind_btVector3Array_size_0=b.asm.on).apply(null,arguments)},zp=b._emscripten_bind_btVector3Array_at_1=function(){return(zp=b._emscripten_bind_btVector3Array_at_1=b.asm.pn).apply(null,arguments)},Ap=b._emscripten_bind_btVector3Array___destroy___0= +function(){return(Ap=b._emscripten_bind_btVector3Array___destroy___0=b.asm.qn).apply(null,arguments)},Bp=b._emscripten_bind_btConstraintSolver___destroy___0=function(){return(Bp=b._emscripten_bind_btConstraintSolver___destroy___0=b.asm.rn).apply(null,arguments)},Cp=b._emscripten_bind_btRaycastVehicle_btRaycastVehicle_3=function(){return(Cp=b._emscripten_bind_btRaycastVehicle_btRaycastVehicle_3=b.asm.sn).apply(null,arguments)},Dp=b._emscripten_bind_btRaycastVehicle_applyEngineForce_2=function(){return(Dp= +b._emscripten_bind_btRaycastVehicle_applyEngineForce_2=b.asm.tn).apply(null,arguments)},Ep=b._emscripten_bind_btRaycastVehicle_setSteeringValue_2=function(){return(Ep=b._emscripten_bind_btRaycastVehicle_setSteeringValue_2=b.asm.un).apply(null,arguments)},Fp=b._emscripten_bind_btRaycastVehicle_getWheelTransformWS_1=function(){return(Fp=b._emscripten_bind_btRaycastVehicle_getWheelTransformWS_1=b.asm.vn).apply(null,arguments)},Gp=b._emscripten_bind_btRaycastVehicle_updateWheelTransform_2=function(){return(Gp= +b._emscripten_bind_btRaycastVehicle_updateWheelTransform_2=b.asm.wn).apply(null,arguments)},Hp=b._emscripten_bind_btRaycastVehicle_addWheel_7=function(){return(Hp=b._emscripten_bind_btRaycastVehicle_addWheel_7=b.asm.xn).apply(null,arguments)},Ip=b._emscripten_bind_btRaycastVehicle_getNumWheels_0=function(){return(Ip=b._emscripten_bind_btRaycastVehicle_getNumWheels_0=b.asm.yn).apply(null,arguments)},Jp=b._emscripten_bind_btRaycastVehicle_getRigidBody_0=function(){return(Jp=b._emscripten_bind_btRaycastVehicle_getRigidBody_0= +b.asm.zn).apply(null,arguments)},Kp=b._emscripten_bind_btRaycastVehicle_getWheelInfo_1=function(){return(Kp=b._emscripten_bind_btRaycastVehicle_getWheelInfo_1=b.asm.An).apply(null,arguments)},Lp=b._emscripten_bind_btRaycastVehicle_setBrake_2=function(){return(Lp=b._emscripten_bind_btRaycastVehicle_setBrake_2=b.asm.Bn).apply(null,arguments)},Mp=b._emscripten_bind_btRaycastVehicle_setCoordinateSystem_3=function(){return(Mp=b._emscripten_bind_btRaycastVehicle_setCoordinateSystem_3=b.asm.Cn).apply(null, +arguments)},Np=b._emscripten_bind_btRaycastVehicle_getCurrentSpeedKmHour_0=function(){return(Np=b._emscripten_bind_btRaycastVehicle_getCurrentSpeedKmHour_0=b.asm.Dn).apply(null,arguments)},Op=b._emscripten_bind_btRaycastVehicle_getChassisWorldTransform_0=function(){return(Op=b._emscripten_bind_btRaycastVehicle_getChassisWorldTransform_0=b.asm.En).apply(null,arguments)},Pp=b._emscripten_bind_btRaycastVehicle_rayCast_1=function(){return(Pp=b._emscripten_bind_btRaycastVehicle_rayCast_1=b.asm.Fn).apply(null, +arguments)},Qp=b._emscripten_bind_btRaycastVehicle_updateVehicle_1=function(){return(Qp=b._emscripten_bind_btRaycastVehicle_updateVehicle_1=b.asm.Gn).apply(null,arguments)},Rp=b._emscripten_bind_btRaycastVehicle_resetSuspension_0=function(){return(Rp=b._emscripten_bind_btRaycastVehicle_resetSuspension_0=b.asm.Hn).apply(null,arguments)},Sp=b._emscripten_bind_btRaycastVehicle_getSteeringValue_1=function(){return(Sp=b._emscripten_bind_btRaycastVehicle_getSteeringValue_1=b.asm.In).apply(null,arguments)}, +Tp=b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_1=function(){return(Tp=b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_1=b.asm.Jn).apply(null,arguments)},Up=b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_2=function(){return(Up=b._emscripten_bind_btRaycastVehicle_updateWheelTransformsWS_2=b.asm.Kn).apply(null,arguments)},Vp=b._emscripten_bind_btRaycastVehicle_setPitchControl_1=function(){return(Vp=b._emscripten_bind_btRaycastVehicle_setPitchControl_1=b.asm.Ln).apply(null, +arguments)},Wp=b._emscripten_bind_btRaycastVehicle_updateSuspension_1=function(){return(Wp=b._emscripten_bind_btRaycastVehicle_updateSuspension_1=b.asm.Mn).apply(null,arguments)},Xp=b._emscripten_bind_btRaycastVehicle_updateFriction_1=function(){return(Xp=b._emscripten_bind_btRaycastVehicle_updateFriction_1=b.asm.Nn).apply(null,arguments)},Yp=b._emscripten_bind_btRaycastVehicle_getRightAxis_0=function(){return(Yp=b._emscripten_bind_btRaycastVehicle_getRightAxis_0=b.asm.On).apply(null,arguments)}, +Zp=b._emscripten_bind_btRaycastVehicle_getUpAxis_0=function(){return(Zp=b._emscripten_bind_btRaycastVehicle_getUpAxis_0=b.asm.Pn).apply(null,arguments)},$p=b._emscripten_bind_btRaycastVehicle_getForwardAxis_0=function(){return($p=b._emscripten_bind_btRaycastVehicle_getForwardAxis_0=b.asm.Qn).apply(null,arguments)},aq=b._emscripten_bind_btRaycastVehicle_getForwardVector_0=function(){return(aq=b._emscripten_bind_btRaycastVehicle_getForwardVector_0=b.asm.Rn).apply(null,arguments)},bq=b._emscripten_bind_btRaycastVehicle_getUserConstraintType_0= +function(){return(bq=b._emscripten_bind_btRaycastVehicle_getUserConstraintType_0=b.asm.Sn).apply(null,arguments)},cq=b._emscripten_bind_btRaycastVehicle_setUserConstraintType_1=function(){return(cq=b._emscripten_bind_btRaycastVehicle_setUserConstraintType_1=b.asm.Tn).apply(null,arguments)},dq=b._emscripten_bind_btRaycastVehicle_setUserConstraintId_1=function(){return(dq=b._emscripten_bind_btRaycastVehicle_setUserConstraintId_1=b.asm.Un).apply(null,arguments)},eq=b._emscripten_bind_btRaycastVehicle_getUserConstraintId_0= +function(){return(eq=b._emscripten_bind_btRaycastVehicle_getUserConstraintId_0=b.asm.Vn).apply(null,arguments)},fq=b._emscripten_bind_btRaycastVehicle_updateAction_2=function(){return(fq=b._emscripten_bind_btRaycastVehicle_updateAction_2=b.asm.Wn).apply(null,arguments)},gq=b._emscripten_bind_btRaycastVehicle___destroy___0=function(){return(gq=b._emscripten_bind_btRaycastVehicle___destroy___0=b.asm.Xn).apply(null,arguments)},hq=b._emscripten_bind_btCylinderShapeX_btCylinderShapeX_1=function(){return(hq= +b._emscripten_bind_btCylinderShapeX_btCylinderShapeX_1=b.asm.Yn).apply(null,arguments)},iq=b._emscripten_bind_btCylinderShapeX_setMargin_1=function(){return(iq=b._emscripten_bind_btCylinderShapeX_setMargin_1=b.asm.Zn).apply(null,arguments)},jq=b._emscripten_bind_btCylinderShapeX_getMargin_0=function(){return(jq=b._emscripten_bind_btCylinderShapeX_getMargin_0=b.asm._n).apply(null,arguments)},kq=b._emscripten_bind_btCylinderShapeX_setLocalScaling_1=function(){return(kq=b._emscripten_bind_btCylinderShapeX_setLocalScaling_1= +b.asm.$n).apply(null,arguments)},lq=b._emscripten_bind_btCylinderShapeX_getLocalScaling_0=function(){return(lq=b._emscripten_bind_btCylinderShapeX_getLocalScaling_0=b.asm.ao).apply(null,arguments)},mq=b._emscripten_bind_btCylinderShapeX_calculateLocalInertia_2=function(){return(mq=b._emscripten_bind_btCylinderShapeX_calculateLocalInertia_2=b.asm.bo).apply(null,arguments)},nq=b._emscripten_bind_btCylinderShapeX___destroy___0=function(){return(nq=b._emscripten_bind_btCylinderShapeX___destroy___0=b.asm.co).apply(null, +arguments)},oq=b._emscripten_bind_btCylinderShapeZ_btCylinderShapeZ_1=function(){return(oq=b._emscripten_bind_btCylinderShapeZ_btCylinderShapeZ_1=b.asm.eo).apply(null,arguments)},pq=b._emscripten_bind_btCylinderShapeZ_setMargin_1=function(){return(pq=b._emscripten_bind_btCylinderShapeZ_setMargin_1=b.asm.fo).apply(null,arguments)},qq=b._emscripten_bind_btCylinderShapeZ_getMargin_0=function(){return(qq=b._emscripten_bind_btCylinderShapeZ_getMargin_0=b.asm.go).apply(null,arguments)},rq=b._emscripten_bind_btCylinderShapeZ_setLocalScaling_1= +function(){return(rq=b._emscripten_bind_btCylinderShapeZ_setLocalScaling_1=b.asm.ho).apply(null,arguments)},sq=b._emscripten_bind_btCylinderShapeZ_getLocalScaling_0=function(){return(sq=b._emscripten_bind_btCylinderShapeZ_getLocalScaling_0=b.asm.io).apply(null,arguments)},tq=b._emscripten_bind_btCylinderShapeZ_calculateLocalInertia_2=function(){return(tq=b._emscripten_bind_btCylinderShapeZ_calculateLocalInertia_2=b.asm.jo).apply(null,arguments)},uq=b._emscripten_bind_btCylinderShapeZ___destroy___0= +function(){return(uq=b._emscripten_bind_btCylinderShapeZ___destroy___0=b.asm.ko).apply(null,arguments)},vq=b._emscripten_bind_btConvexPolyhedron_get_m_vertices_0=function(){return(vq=b._emscripten_bind_btConvexPolyhedron_get_m_vertices_0=b.asm.lo).apply(null,arguments)},wq=b._emscripten_bind_btConvexPolyhedron_set_m_vertices_1=function(){return(wq=b._emscripten_bind_btConvexPolyhedron_set_m_vertices_1=b.asm.mo).apply(null,arguments)},xq=b._emscripten_bind_btConvexPolyhedron_get_m_faces_0=function(){return(xq= +b._emscripten_bind_btConvexPolyhedron_get_m_faces_0=b.asm.no).apply(null,arguments)},yq=b._emscripten_bind_btConvexPolyhedron_set_m_faces_1=function(){return(yq=b._emscripten_bind_btConvexPolyhedron_set_m_faces_1=b.asm.oo).apply(null,arguments)},zq=b._emscripten_bind_btConvexPolyhedron___destroy___0=function(){return(zq=b._emscripten_bind_btConvexPolyhedron___destroy___0=b.asm.po).apply(null,arguments)},Aq=b._emscripten_bind_btSequentialImpulseConstraintSolver_btSequentialImpulseConstraintSolver_0= +function(){return(Aq=b._emscripten_bind_btSequentialImpulseConstraintSolver_btSequentialImpulseConstraintSolver_0=b.asm.qo).apply(null,arguments)},Bq=b._emscripten_bind_btSequentialImpulseConstraintSolver___destroy___0=function(){return(Bq=b._emscripten_bind_btSequentialImpulseConstraintSolver___destroy___0=b.asm.ro).apply(null,arguments)},Cq=b._emscripten_bind_tAnchorArray_size_0=function(){return(Cq=b._emscripten_bind_tAnchorArray_size_0=b.asm.so).apply(null,arguments)},Dq=b._emscripten_bind_tAnchorArray_at_1= +function(){return(Dq=b._emscripten_bind_tAnchorArray_at_1=b.asm.to).apply(null,arguments)},Eq=b._emscripten_bind_tAnchorArray_clear_0=function(){return(Eq=b._emscripten_bind_tAnchorArray_clear_0=b.asm.uo).apply(null,arguments)},Fq=b._emscripten_bind_tAnchorArray_push_back_1=function(){return(Fq=b._emscripten_bind_tAnchorArray_push_back_1=b.asm.vo).apply(null,arguments)},Gq=b._emscripten_bind_tAnchorArray_pop_back_0=function(){return(Gq=b._emscripten_bind_tAnchorArray_pop_back_0=b.asm.wo).apply(null, +arguments)},Hq=b._emscripten_bind_tAnchorArray___destroy___0=function(){return(Hq=b._emscripten_bind_tAnchorArray___destroy___0=b.asm.xo).apply(null,arguments)},Iq=b._emscripten_bind_RaycastInfo_get_m_contactNormalWS_0=function(){return(Iq=b._emscripten_bind_RaycastInfo_get_m_contactNormalWS_0=b.asm.yo).apply(null,arguments)},Jq=b._emscripten_bind_RaycastInfo_set_m_contactNormalWS_1=function(){return(Jq=b._emscripten_bind_RaycastInfo_set_m_contactNormalWS_1=b.asm.zo).apply(null,arguments)},Kq=b._emscripten_bind_RaycastInfo_get_m_contactPointWS_0= +function(){return(Kq=b._emscripten_bind_RaycastInfo_get_m_contactPointWS_0=b.asm.Ao).apply(null,arguments)},Lq=b._emscripten_bind_RaycastInfo_set_m_contactPointWS_1=function(){return(Lq=b._emscripten_bind_RaycastInfo_set_m_contactPointWS_1=b.asm.Bo).apply(null,arguments)},Mq=b._emscripten_bind_RaycastInfo_get_m_suspensionLength_0=function(){return(Mq=b._emscripten_bind_RaycastInfo_get_m_suspensionLength_0=b.asm.Co).apply(null,arguments)},Nq=b._emscripten_bind_RaycastInfo_set_m_suspensionLength_1= +function(){return(Nq=b._emscripten_bind_RaycastInfo_set_m_suspensionLength_1=b.asm.Do).apply(null,arguments)},Oq=b._emscripten_bind_RaycastInfo_get_m_hardPointWS_0=function(){return(Oq=b._emscripten_bind_RaycastInfo_get_m_hardPointWS_0=b.asm.Eo).apply(null,arguments)},Pq=b._emscripten_bind_RaycastInfo_set_m_hardPointWS_1=function(){return(Pq=b._emscripten_bind_RaycastInfo_set_m_hardPointWS_1=b.asm.Fo).apply(null,arguments)},Qq=b._emscripten_bind_RaycastInfo_get_m_wheelDirectionWS_0=function(){return(Qq= +b._emscripten_bind_RaycastInfo_get_m_wheelDirectionWS_0=b.asm.Go).apply(null,arguments)},Rq=b._emscripten_bind_RaycastInfo_set_m_wheelDirectionWS_1=function(){return(Rq=b._emscripten_bind_RaycastInfo_set_m_wheelDirectionWS_1=b.asm.Ho).apply(null,arguments)},Sq=b._emscripten_bind_RaycastInfo_get_m_wheelAxleWS_0=function(){return(Sq=b._emscripten_bind_RaycastInfo_get_m_wheelAxleWS_0=b.asm.Io).apply(null,arguments)},Tq=b._emscripten_bind_RaycastInfo_set_m_wheelAxleWS_1=function(){return(Tq=b._emscripten_bind_RaycastInfo_set_m_wheelAxleWS_1= +b.asm.Jo).apply(null,arguments)},Uq=b._emscripten_bind_RaycastInfo_get_m_isInContact_0=function(){return(Uq=b._emscripten_bind_RaycastInfo_get_m_isInContact_0=b.asm.Ko).apply(null,arguments)},Vq=b._emscripten_bind_RaycastInfo_set_m_isInContact_1=function(){return(Vq=b._emscripten_bind_RaycastInfo_set_m_isInContact_1=b.asm.Lo).apply(null,arguments)},Wq=b._emscripten_bind_RaycastInfo_get_m_groundObject_0=function(){return(Wq=b._emscripten_bind_RaycastInfo_get_m_groundObject_0=b.asm.Mo).apply(null,arguments)}, +Xq=b._emscripten_bind_RaycastInfo_set_m_groundObject_1=function(){return(Xq=b._emscripten_bind_RaycastInfo_set_m_groundObject_1=b.asm.No).apply(null,arguments)},Yq=b._emscripten_bind_RaycastInfo___destroy___0=function(){return(Yq=b._emscripten_bind_RaycastInfo___destroy___0=b.asm.Oo).apply(null,arguments)},Zq=b._emscripten_bind_btMultiSphereShape_btMultiSphereShape_3=function(){return(Zq=b._emscripten_bind_btMultiSphereShape_btMultiSphereShape_3=b.asm.Po).apply(null,arguments)},$q=b._emscripten_bind_btMultiSphereShape_setLocalScaling_1= +function(){return($q=b._emscripten_bind_btMultiSphereShape_setLocalScaling_1=b.asm.Qo).apply(null,arguments)},ar=b._emscripten_bind_btMultiSphereShape_getLocalScaling_0=function(){return(ar=b._emscripten_bind_btMultiSphereShape_getLocalScaling_0=b.asm.Ro).apply(null,arguments)},br=b._emscripten_bind_btMultiSphereShape_calculateLocalInertia_2=function(){return(br=b._emscripten_bind_btMultiSphereShape_calculateLocalInertia_2=b.asm.So).apply(null,arguments)},cr=b._emscripten_bind_btMultiSphereShape___destroy___0= +function(){return(cr=b._emscripten_bind_btMultiSphereShape___destroy___0=b.asm.To).apply(null,arguments)},dr=b._emscripten_bind_btSoftBody_btSoftBody_4=function(){return(dr=b._emscripten_bind_btSoftBody_btSoftBody_4=b.asm.Uo).apply(null,arguments)},er=b._emscripten_bind_btSoftBody_checkLink_2=function(){return(er=b._emscripten_bind_btSoftBody_checkLink_2=b.asm.Vo).apply(null,arguments)},fr=b._emscripten_bind_btSoftBody_checkFace_3=function(){return(fr=b._emscripten_bind_btSoftBody_checkFace_3=b.asm.Wo).apply(null, +arguments)},gr=b._emscripten_bind_btSoftBody_appendMaterial_0=function(){return(gr=b._emscripten_bind_btSoftBody_appendMaterial_0=b.asm.Xo).apply(null,arguments)},hr=b._emscripten_bind_btSoftBody_appendNode_2=function(){return(hr=b._emscripten_bind_btSoftBody_appendNode_2=b.asm.Yo).apply(null,arguments)},ir=b._emscripten_bind_btSoftBody_appendLink_4=function(){return(ir=b._emscripten_bind_btSoftBody_appendLink_4=b.asm.Zo).apply(null,arguments)},jr=b._emscripten_bind_btSoftBody_appendFace_4=function(){return(jr= +b._emscripten_bind_btSoftBody_appendFace_4=b.asm._o).apply(null,arguments)},kr=b._emscripten_bind_btSoftBody_appendTetra_5=function(){return(kr=b._emscripten_bind_btSoftBody_appendTetra_5=b.asm.$o).apply(null,arguments)},lr=b._emscripten_bind_btSoftBody_appendAnchor_4=function(){return(lr=b._emscripten_bind_btSoftBody_appendAnchor_4=b.asm.ap).apply(null,arguments)},mr=b._emscripten_bind_btSoftBody_addForce_1=function(){return(mr=b._emscripten_bind_btSoftBody_addForce_1=b.asm.bp).apply(null,arguments)}, +nr=b._emscripten_bind_btSoftBody_addForce_2=function(){return(nr=b._emscripten_bind_btSoftBody_addForce_2=b.asm.cp).apply(null,arguments)},or=b._emscripten_bind_btSoftBody_addAeroForceToNode_2=function(){return(or=b._emscripten_bind_btSoftBody_addAeroForceToNode_2=b.asm.dp).apply(null,arguments)},pr=b._emscripten_bind_btSoftBody_getTotalMass_0=function(){return(pr=b._emscripten_bind_btSoftBody_getTotalMass_0=b.asm.ep).apply(null,arguments)},qr=b._emscripten_bind_btSoftBody_setTotalMass_2=function(){return(qr= +b._emscripten_bind_btSoftBody_setTotalMass_2=b.asm.fp).apply(null,arguments)},rr=b._emscripten_bind_btSoftBody_setMass_2=function(){return(rr=b._emscripten_bind_btSoftBody_setMass_2=b.asm.gp).apply(null,arguments)},sr=b._emscripten_bind_btSoftBody_transform_1=function(){return(sr=b._emscripten_bind_btSoftBody_transform_1=b.asm.hp).apply(null,arguments)},tr=b._emscripten_bind_btSoftBody_translate_1=function(){return(tr=b._emscripten_bind_btSoftBody_translate_1=b.asm.ip).apply(null,arguments)},ur=b._emscripten_bind_btSoftBody_rotate_1= +function(){return(ur=b._emscripten_bind_btSoftBody_rotate_1=b.asm.jp).apply(null,arguments)},vr=b._emscripten_bind_btSoftBody_scale_1=function(){return(vr=b._emscripten_bind_btSoftBody_scale_1=b.asm.kp).apply(null,arguments)},wr=b._emscripten_bind_btSoftBody_generateClusters_1=function(){return(wr=b._emscripten_bind_btSoftBody_generateClusters_1=b.asm.lp).apply(null,arguments)},xr=b._emscripten_bind_btSoftBody_generateClusters_2=function(){return(xr=b._emscripten_bind_btSoftBody_generateClusters_2= +b.asm.mp).apply(null,arguments)},yr=b._emscripten_bind_btSoftBody_generateBendingConstraints_2=function(){return(yr=b._emscripten_bind_btSoftBody_generateBendingConstraints_2=b.asm.np).apply(null,arguments)},zr=b._emscripten_bind_btSoftBody_upcast_1=function(){return(zr=b._emscripten_bind_btSoftBody_upcast_1=b.asm.op).apply(null,arguments)},Ar=b._emscripten_bind_btSoftBody_setAnisotropicFriction_2=function(){return(Ar=b._emscripten_bind_btSoftBody_setAnisotropicFriction_2=b.asm.pp).apply(null,arguments)}, +Br=b._emscripten_bind_btSoftBody_getCollisionShape_0=function(){return(Br=b._emscripten_bind_btSoftBody_getCollisionShape_0=b.asm.qp).apply(null,arguments)},Cr=b._emscripten_bind_btSoftBody_setContactProcessingThreshold_1=function(){return(Cr=b._emscripten_bind_btSoftBody_setContactProcessingThreshold_1=b.asm.rp).apply(null,arguments)},Dr=b._emscripten_bind_btSoftBody_setActivationState_1=function(){return(Dr=b._emscripten_bind_btSoftBody_setActivationState_1=b.asm.sp).apply(null,arguments)},Er=b._emscripten_bind_btSoftBody_forceActivationState_1= +function(){return(Er=b._emscripten_bind_btSoftBody_forceActivationState_1=b.asm.tp).apply(null,arguments)},Fr=b._emscripten_bind_btSoftBody_activate_0=function(){return(Fr=b._emscripten_bind_btSoftBody_activate_0=b.asm.up).apply(null,arguments)},Gr=b._emscripten_bind_btSoftBody_activate_1=function(){return(Gr=b._emscripten_bind_btSoftBody_activate_1=b.asm.vp).apply(null,arguments)},Hr=b._emscripten_bind_btSoftBody_isActive_0=function(){return(Hr=b._emscripten_bind_btSoftBody_isActive_0=b.asm.wp).apply(null, +arguments)},Ir=b._emscripten_bind_btSoftBody_isKinematicObject_0=function(){return(Ir=b._emscripten_bind_btSoftBody_isKinematicObject_0=b.asm.xp).apply(null,arguments)},Jr=b._emscripten_bind_btSoftBody_isStaticObject_0=function(){return(Jr=b._emscripten_bind_btSoftBody_isStaticObject_0=b.asm.yp).apply(null,arguments)},Kr=b._emscripten_bind_btSoftBody_isStaticOrKinematicObject_0=function(){return(Kr=b._emscripten_bind_btSoftBody_isStaticOrKinematicObject_0=b.asm.zp).apply(null,arguments)},Lr=b._emscripten_bind_btSoftBody_getRestitution_0= +function(){return(Lr=b._emscripten_bind_btSoftBody_getRestitution_0=b.asm.Ap).apply(null,arguments)},Mr=b._emscripten_bind_btSoftBody_getFriction_0=function(){return(Mr=b._emscripten_bind_btSoftBody_getFriction_0=b.asm.Bp).apply(null,arguments)},Nr=b._emscripten_bind_btSoftBody_getRollingFriction_0=function(){return(Nr=b._emscripten_bind_btSoftBody_getRollingFriction_0=b.asm.Cp).apply(null,arguments)},Or=b._emscripten_bind_btSoftBody_setRestitution_1=function(){return(Or=b._emscripten_bind_btSoftBody_setRestitution_1= +b.asm.Dp).apply(null,arguments)},Pr=b._emscripten_bind_btSoftBody_setFriction_1=function(){return(Pr=b._emscripten_bind_btSoftBody_setFriction_1=b.asm.Ep).apply(null,arguments)},Qr=b._emscripten_bind_btSoftBody_setRollingFriction_1=function(){return(Qr=b._emscripten_bind_btSoftBody_setRollingFriction_1=b.asm.Fp).apply(null,arguments)},Rr=b._emscripten_bind_btSoftBody_getWorldTransform_0=function(){return(Rr=b._emscripten_bind_btSoftBody_getWorldTransform_0=b.asm.Gp).apply(null,arguments)},Sr=b._emscripten_bind_btSoftBody_getCollisionFlags_0= +function(){return(Sr=b._emscripten_bind_btSoftBody_getCollisionFlags_0=b.asm.Hp).apply(null,arguments)},Tr=b._emscripten_bind_btSoftBody_setCollisionFlags_1=function(){return(Tr=b._emscripten_bind_btSoftBody_setCollisionFlags_1=b.asm.Ip).apply(null,arguments)},Ur=b._emscripten_bind_btSoftBody_setWorldTransform_1=function(){return(Ur=b._emscripten_bind_btSoftBody_setWorldTransform_1=b.asm.Jp).apply(null,arguments)},Vr=b._emscripten_bind_btSoftBody_setCollisionShape_1=function(){return(Vr=b._emscripten_bind_btSoftBody_setCollisionShape_1= +b.asm.Kp).apply(null,arguments)},Wr=b._emscripten_bind_btSoftBody_setCcdMotionThreshold_1=function(){return(Wr=b._emscripten_bind_btSoftBody_setCcdMotionThreshold_1=b.asm.Lp).apply(null,arguments)},Xr=b._emscripten_bind_btSoftBody_setCcdSweptSphereRadius_1=function(){return(Xr=b._emscripten_bind_btSoftBody_setCcdSweptSphereRadius_1=b.asm.Mp).apply(null,arguments)},Yr=b._emscripten_bind_btSoftBody_getUserIndex_0=function(){return(Yr=b._emscripten_bind_btSoftBody_getUserIndex_0=b.asm.Np).apply(null, +arguments)},Zr=b._emscripten_bind_btSoftBody_setUserIndex_1=function(){return(Zr=b._emscripten_bind_btSoftBody_setUserIndex_1=b.asm.Op).apply(null,arguments)},$r=b._emscripten_bind_btSoftBody_getUserPointer_0=function(){return($r=b._emscripten_bind_btSoftBody_getUserPointer_0=b.asm.Pp).apply(null,arguments)},as=b._emscripten_bind_btSoftBody_setUserPointer_1=function(){return(as=b._emscripten_bind_btSoftBody_setUserPointer_1=b.asm.Qp).apply(null,arguments)},bs=b._emscripten_bind_btSoftBody_getBroadphaseHandle_0= +function(){return(bs=b._emscripten_bind_btSoftBody_getBroadphaseHandle_0=b.asm.Rp).apply(null,arguments)},cs=b._emscripten_bind_btSoftBody_get_m_cfg_0=function(){return(cs=b._emscripten_bind_btSoftBody_get_m_cfg_0=b.asm.Sp).apply(null,arguments)},ds=b._emscripten_bind_btSoftBody_set_m_cfg_1=function(){return(ds=b._emscripten_bind_btSoftBody_set_m_cfg_1=b.asm.Tp).apply(null,arguments)},es=b._emscripten_bind_btSoftBody_get_m_nodes_0=function(){return(es=b._emscripten_bind_btSoftBody_get_m_nodes_0=b.asm.Up).apply(null, +arguments)},gs=b._emscripten_bind_btSoftBody_set_m_nodes_1=function(){return(gs=b._emscripten_bind_btSoftBody_set_m_nodes_1=b.asm.Vp).apply(null,arguments)},hs=b._emscripten_bind_btSoftBody_get_m_faces_0=function(){return(hs=b._emscripten_bind_btSoftBody_get_m_faces_0=b.asm.Wp).apply(null,arguments)},is=b._emscripten_bind_btSoftBody_set_m_faces_1=function(){return(is=b._emscripten_bind_btSoftBody_set_m_faces_1=b.asm.Xp).apply(null,arguments)},js=b._emscripten_bind_btSoftBody_get_m_materials_0=function(){return(js= +b._emscripten_bind_btSoftBody_get_m_materials_0=b.asm.Yp).apply(null,arguments)},ks=b._emscripten_bind_btSoftBody_set_m_materials_1=function(){return(ks=b._emscripten_bind_btSoftBody_set_m_materials_1=b.asm.Zp).apply(null,arguments)},ls=b._emscripten_bind_btSoftBody_get_m_anchors_0=function(){return(ls=b._emscripten_bind_btSoftBody_get_m_anchors_0=b.asm._p).apply(null,arguments)},ms=b._emscripten_bind_btSoftBody_set_m_anchors_1=function(){return(ms=b._emscripten_bind_btSoftBody_set_m_anchors_1=b.asm.$p).apply(null, +arguments)},ns=b._emscripten_bind_btSoftBody___destroy___0=function(){return(ns=b._emscripten_bind_btSoftBody___destroy___0=b.asm.aq).apply(null,arguments)},ps=b._emscripten_bind_btIntArray_size_0=function(){return(ps=b._emscripten_bind_btIntArray_size_0=b.asm.bq).apply(null,arguments)},qs=b._emscripten_bind_btIntArray_at_1=function(){return(qs=b._emscripten_bind_btIntArray_at_1=b.asm.cq).apply(null,arguments)},rs=b._emscripten_bind_btIntArray___destroy___0=function(){return(rs=b._emscripten_bind_btIntArray___destroy___0= +b.asm.dq).apply(null,arguments)},ss=b._emscripten_bind_Config_get_kVCF_0=function(){return(ss=b._emscripten_bind_Config_get_kVCF_0=b.asm.eq).apply(null,arguments)},ts=b._emscripten_bind_Config_set_kVCF_1=function(){return(ts=b._emscripten_bind_Config_set_kVCF_1=b.asm.fq).apply(null,arguments)},us=b._emscripten_bind_Config_get_kDP_0=function(){return(us=b._emscripten_bind_Config_get_kDP_0=b.asm.gq).apply(null,arguments)},vs=b._emscripten_bind_Config_set_kDP_1=function(){return(vs=b._emscripten_bind_Config_set_kDP_1= +b.asm.hq).apply(null,arguments)},xs=b._emscripten_bind_Config_get_kDG_0=function(){return(xs=b._emscripten_bind_Config_get_kDG_0=b.asm.iq).apply(null,arguments)},ys=b._emscripten_bind_Config_set_kDG_1=function(){return(ys=b._emscripten_bind_Config_set_kDG_1=b.asm.jq).apply(null,arguments)},zs=b._emscripten_bind_Config_get_kLF_0=function(){return(zs=b._emscripten_bind_Config_get_kLF_0=b.asm.kq).apply(null,arguments)},As=b._emscripten_bind_Config_set_kLF_1=function(){return(As=b._emscripten_bind_Config_set_kLF_1= +b.asm.lq).apply(null,arguments)},Bs=b._emscripten_bind_Config_get_kPR_0=function(){return(Bs=b._emscripten_bind_Config_get_kPR_0=b.asm.mq).apply(null,arguments)},Cs=b._emscripten_bind_Config_set_kPR_1=function(){return(Cs=b._emscripten_bind_Config_set_kPR_1=b.asm.nq).apply(null,arguments)},Ds=b._emscripten_bind_Config_get_kVC_0=function(){return(Ds=b._emscripten_bind_Config_get_kVC_0=b.asm.oq).apply(null,arguments)},Es=b._emscripten_bind_Config_set_kVC_1=function(){return(Es=b._emscripten_bind_Config_set_kVC_1= +b.asm.pq).apply(null,arguments)},Fs=b._emscripten_bind_Config_get_kDF_0=function(){return(Fs=b._emscripten_bind_Config_get_kDF_0=b.asm.qq).apply(null,arguments)},Gs=b._emscripten_bind_Config_set_kDF_1=function(){return(Gs=b._emscripten_bind_Config_set_kDF_1=b.asm.rq).apply(null,arguments)},Hs=b._emscripten_bind_Config_get_kMT_0=function(){return(Hs=b._emscripten_bind_Config_get_kMT_0=b.asm.sq).apply(null,arguments)},Is=b._emscripten_bind_Config_set_kMT_1=function(){return(Is=b._emscripten_bind_Config_set_kMT_1= +b.asm.tq).apply(null,arguments)},Js=b._emscripten_bind_Config_get_kCHR_0=function(){return(Js=b._emscripten_bind_Config_get_kCHR_0=b.asm.uq).apply(null,arguments)},Ks=b._emscripten_bind_Config_set_kCHR_1=function(){return(Ks=b._emscripten_bind_Config_set_kCHR_1=b.asm.vq).apply(null,arguments)},Ls=b._emscripten_bind_Config_get_kKHR_0=function(){return(Ls=b._emscripten_bind_Config_get_kKHR_0=b.asm.wq).apply(null,arguments)},Ms=b._emscripten_bind_Config_set_kKHR_1=function(){return(Ms=b._emscripten_bind_Config_set_kKHR_1= +b.asm.xq).apply(null,arguments)},Ns=b._emscripten_bind_Config_get_kSHR_0=function(){return(Ns=b._emscripten_bind_Config_get_kSHR_0=b.asm.yq).apply(null,arguments)},Os=b._emscripten_bind_Config_set_kSHR_1=function(){return(Os=b._emscripten_bind_Config_set_kSHR_1=b.asm.zq).apply(null,arguments)},Ps=b._emscripten_bind_Config_get_kAHR_0=function(){return(Ps=b._emscripten_bind_Config_get_kAHR_0=b.asm.Aq).apply(null,arguments)},Qs=b._emscripten_bind_Config_set_kAHR_1=function(){return(Qs=b._emscripten_bind_Config_set_kAHR_1= +b.asm.Bq).apply(null,arguments)},Rs=b._emscripten_bind_Config_get_kSRHR_CL_0=function(){return(Rs=b._emscripten_bind_Config_get_kSRHR_CL_0=b.asm.Cq).apply(null,arguments)},Ss=b._emscripten_bind_Config_set_kSRHR_CL_1=function(){return(Ss=b._emscripten_bind_Config_set_kSRHR_CL_1=b.asm.Dq).apply(null,arguments)},Ts=b._emscripten_bind_Config_get_kSKHR_CL_0=function(){return(Ts=b._emscripten_bind_Config_get_kSKHR_CL_0=b.asm.Eq).apply(null,arguments)},Us=b._emscripten_bind_Config_set_kSKHR_CL_1=function(){return(Us= +b._emscripten_bind_Config_set_kSKHR_CL_1=b.asm.Fq).apply(null,arguments)},Vs=b._emscripten_bind_Config_get_kSSHR_CL_0=function(){return(Vs=b._emscripten_bind_Config_get_kSSHR_CL_0=b.asm.Gq).apply(null,arguments)},Ws=b._emscripten_bind_Config_set_kSSHR_CL_1=function(){return(Ws=b._emscripten_bind_Config_set_kSSHR_CL_1=b.asm.Hq).apply(null,arguments)},Xs=b._emscripten_bind_Config_get_kSR_SPLT_CL_0=function(){return(Xs=b._emscripten_bind_Config_get_kSR_SPLT_CL_0=b.asm.Iq).apply(null,arguments)},Ys=b._emscripten_bind_Config_set_kSR_SPLT_CL_1= +function(){return(Ys=b._emscripten_bind_Config_set_kSR_SPLT_CL_1=b.asm.Jq).apply(null,arguments)},Zs=b._emscripten_bind_Config_get_kSK_SPLT_CL_0=function(){return(Zs=b._emscripten_bind_Config_get_kSK_SPLT_CL_0=b.asm.Kq).apply(null,arguments)},$s=b._emscripten_bind_Config_set_kSK_SPLT_CL_1=function(){return($s=b._emscripten_bind_Config_set_kSK_SPLT_CL_1=b.asm.Lq).apply(null,arguments)},at=b._emscripten_bind_Config_get_kSS_SPLT_CL_0=function(){return(at=b._emscripten_bind_Config_get_kSS_SPLT_CL_0=b.asm.Mq).apply(null, +arguments)},bt=b._emscripten_bind_Config_set_kSS_SPLT_CL_1=function(){return(bt=b._emscripten_bind_Config_set_kSS_SPLT_CL_1=b.asm.Nq).apply(null,arguments)},ct=b._emscripten_bind_Config_get_maxvolume_0=function(){return(ct=b._emscripten_bind_Config_get_maxvolume_0=b.asm.Oq).apply(null,arguments)},dt=b._emscripten_bind_Config_set_maxvolume_1=function(){return(dt=b._emscripten_bind_Config_set_maxvolume_1=b.asm.Pq).apply(null,arguments)},et=b._emscripten_bind_Config_get_timescale_0=function(){return(et= +b._emscripten_bind_Config_get_timescale_0=b.asm.Qq).apply(null,arguments)},ft=b._emscripten_bind_Config_set_timescale_1=function(){return(ft=b._emscripten_bind_Config_set_timescale_1=b.asm.Rq).apply(null,arguments)},gt=b._emscripten_bind_Config_get_viterations_0=function(){return(gt=b._emscripten_bind_Config_get_viterations_0=b.asm.Sq).apply(null,arguments)},ht=b._emscripten_bind_Config_set_viterations_1=function(){return(ht=b._emscripten_bind_Config_set_viterations_1=b.asm.Tq).apply(null,arguments)}, +it=b._emscripten_bind_Config_get_piterations_0=function(){return(it=b._emscripten_bind_Config_get_piterations_0=b.asm.Uq).apply(null,arguments)},jt=b._emscripten_bind_Config_set_piterations_1=function(){return(jt=b._emscripten_bind_Config_set_piterations_1=b.asm.Vq).apply(null,arguments)},kt=b._emscripten_bind_Config_get_diterations_0=function(){return(kt=b._emscripten_bind_Config_get_diterations_0=b.asm.Wq).apply(null,arguments)},lt=b._emscripten_bind_Config_set_diterations_1=function(){return(lt= +b._emscripten_bind_Config_set_diterations_1=b.asm.Xq).apply(null,arguments)},mt=b._emscripten_bind_Config_get_citerations_0=function(){return(mt=b._emscripten_bind_Config_get_citerations_0=b.asm.Yq).apply(null,arguments)},nt=b._emscripten_bind_Config_set_citerations_1=function(){return(nt=b._emscripten_bind_Config_set_citerations_1=b.asm.Zq).apply(null,arguments)},ot=b._emscripten_bind_Config_get_collisions_0=function(){return(ot=b._emscripten_bind_Config_get_collisions_0=b.asm._q).apply(null,arguments)}, +pt=b._emscripten_bind_Config_set_collisions_1=function(){return(pt=b._emscripten_bind_Config_set_collisions_1=b.asm.$q).apply(null,arguments)},qt=b._emscripten_bind_Config___destroy___0=function(){return(qt=b._emscripten_bind_Config___destroy___0=b.asm.ar).apply(null,arguments)},rt=b._emscripten_bind_Node_get_m_x_0=function(){return(rt=b._emscripten_bind_Node_get_m_x_0=b.asm.br).apply(null,arguments)},st=b._emscripten_bind_Node_set_m_x_1=function(){return(st=b._emscripten_bind_Node_set_m_x_1=b.asm.cr).apply(null, +arguments)},tt=b._emscripten_bind_Node_get_m_q_0=function(){return(tt=b._emscripten_bind_Node_get_m_q_0=b.asm.dr).apply(null,arguments)},ut=b._emscripten_bind_Node_set_m_q_1=function(){return(ut=b._emscripten_bind_Node_set_m_q_1=b.asm.er).apply(null,arguments)},vt=b._emscripten_bind_Node_get_m_v_0=function(){return(vt=b._emscripten_bind_Node_get_m_v_0=b.asm.fr).apply(null,arguments)},wt=b._emscripten_bind_Node_set_m_v_1=function(){return(wt=b._emscripten_bind_Node_set_m_v_1=b.asm.gr).apply(null,arguments)}, +xt=b._emscripten_bind_Node_get_m_f_0=function(){return(xt=b._emscripten_bind_Node_get_m_f_0=b.asm.hr).apply(null,arguments)},yt=b._emscripten_bind_Node_set_m_f_1=function(){return(yt=b._emscripten_bind_Node_set_m_f_1=b.asm.ir).apply(null,arguments)},zt=b._emscripten_bind_Node_get_m_n_0=function(){return(zt=b._emscripten_bind_Node_get_m_n_0=b.asm.jr).apply(null,arguments)},At=b._emscripten_bind_Node_set_m_n_1=function(){return(At=b._emscripten_bind_Node_set_m_n_1=b.asm.kr).apply(null,arguments)},Bt= +b._emscripten_bind_Node_get_m_im_0=function(){return(Bt=b._emscripten_bind_Node_get_m_im_0=b.asm.lr).apply(null,arguments)},Ct=b._emscripten_bind_Node_set_m_im_1=function(){return(Ct=b._emscripten_bind_Node_set_m_im_1=b.asm.mr).apply(null,arguments)},Dt=b._emscripten_bind_Node_get_m_area_0=function(){return(Dt=b._emscripten_bind_Node_get_m_area_0=b.asm.nr).apply(null,arguments)},Et=b._emscripten_bind_Node_set_m_area_1=function(){return(Et=b._emscripten_bind_Node_set_m_area_1=b.asm.or).apply(null, +arguments)},Ft=b._emscripten_bind_Node___destroy___0=function(){return(Ft=b._emscripten_bind_Node___destroy___0=b.asm.pr).apply(null,arguments)},Gt=b._emscripten_bind_btGhostPairCallback_btGhostPairCallback_0=function(){return(Gt=b._emscripten_bind_btGhostPairCallback_btGhostPairCallback_0=b.asm.qr).apply(null,arguments)},Ht=b._emscripten_bind_btGhostPairCallback___destroy___0=function(){return(Ht=b._emscripten_bind_btGhostPairCallback___destroy___0=b.asm.rr).apply(null,arguments)},It=b._emscripten_bind_btOverlappingPairCallback___destroy___0= +function(){return(It=b._emscripten_bind_btOverlappingPairCallback___destroy___0=b.asm.sr).apply(null,arguments)},Jt=b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_3=function(){return(Jt=b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_3=b.asm.tr).apply(null,arguments)},Kt=b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_4=function(){return(Kt=b._emscripten_bind_btKinematicCharacterController_btKinematicCharacterController_4= +b.asm.ur).apply(null,arguments)},Lt=b._emscripten_bind_btKinematicCharacterController_setUpAxis_1=function(){return(Lt=b._emscripten_bind_btKinematicCharacterController_setUpAxis_1=b.asm.vr).apply(null,arguments)},Mt=b._emscripten_bind_btKinematicCharacterController_setWalkDirection_1=function(){return(Mt=b._emscripten_bind_btKinematicCharacterController_setWalkDirection_1=b.asm.wr).apply(null,arguments)},Nt=b._emscripten_bind_btKinematicCharacterController_setVelocityForTimeInterval_2=function(){return(Nt= +b._emscripten_bind_btKinematicCharacterController_setVelocityForTimeInterval_2=b.asm.xr).apply(null,arguments)},Ot=b._emscripten_bind_btKinematicCharacterController_warp_1=function(){return(Ot=b._emscripten_bind_btKinematicCharacterController_warp_1=b.asm.yr).apply(null,arguments)},Pt=b._emscripten_bind_btKinematicCharacterController_preStep_1=function(){return(Pt=b._emscripten_bind_btKinematicCharacterController_preStep_1=b.asm.zr).apply(null,arguments)},Qt=b._emscripten_bind_btKinematicCharacterController_playerStep_2= +function(){return(Qt=b._emscripten_bind_btKinematicCharacterController_playerStep_2=b.asm.Ar).apply(null,arguments)},Rt=b._emscripten_bind_btKinematicCharacterController_setFallSpeed_1=function(){return(Rt=b._emscripten_bind_btKinematicCharacterController_setFallSpeed_1=b.asm.Br).apply(null,arguments)},St=b._emscripten_bind_btKinematicCharacterController_setJumpSpeed_1=function(){return(St=b._emscripten_bind_btKinematicCharacterController_setJumpSpeed_1=b.asm.Cr).apply(null,arguments)},Tt=b._emscripten_bind_btKinematicCharacterController_setMaxJumpHeight_1= +function(){return(Tt=b._emscripten_bind_btKinematicCharacterController_setMaxJumpHeight_1=b.asm.Dr).apply(null,arguments)},Ut=b._emscripten_bind_btKinematicCharacterController_canJump_0=function(){return(Ut=b._emscripten_bind_btKinematicCharacterController_canJump_0=b.asm.Er).apply(null,arguments)},Vt=b._emscripten_bind_btKinematicCharacterController_jump_0=function(){return(Vt=b._emscripten_bind_btKinematicCharacterController_jump_0=b.asm.Fr).apply(null,arguments)},Wt=b._emscripten_bind_btKinematicCharacterController_setGravity_1= +function(){return(Wt=b._emscripten_bind_btKinematicCharacterController_setGravity_1=b.asm.Gr).apply(null,arguments)},Xt=b._emscripten_bind_btKinematicCharacterController_getGravity_0=function(){return(Xt=b._emscripten_bind_btKinematicCharacterController_getGravity_0=b.asm.Hr).apply(null,arguments)},Yt=b._emscripten_bind_btKinematicCharacterController_setMaxSlope_1=function(){return(Yt=b._emscripten_bind_btKinematicCharacterController_setMaxSlope_1=b.asm.Ir).apply(null,arguments)},Zt=b._emscripten_bind_btKinematicCharacterController_getMaxSlope_0= +function(){return(Zt=b._emscripten_bind_btKinematicCharacterController_getMaxSlope_0=b.asm.Jr).apply(null,arguments)},$t=b._emscripten_bind_btKinematicCharacterController_getGhostObject_0=function(){return($t=b._emscripten_bind_btKinematicCharacterController_getGhostObject_0=b.asm.Kr).apply(null,arguments)},au=b._emscripten_bind_btKinematicCharacterController_setUseGhostSweepTest_1=function(){return(au=b._emscripten_bind_btKinematicCharacterController_setUseGhostSweepTest_1=b.asm.Lr).apply(null,arguments)}, +bu=b._emscripten_bind_btKinematicCharacterController_onGround_0=function(){return(bu=b._emscripten_bind_btKinematicCharacterController_onGround_0=b.asm.Mr).apply(null,arguments)},cu=b._emscripten_bind_btKinematicCharacterController_setUpInterpolate_1=function(){return(cu=b._emscripten_bind_btKinematicCharacterController_setUpInterpolate_1=b.asm.Nr).apply(null,arguments)},du=b._emscripten_bind_btKinematicCharacterController_updateAction_2=function(){return(du=b._emscripten_bind_btKinematicCharacterController_updateAction_2= +b.asm.Or).apply(null,arguments)},eu=b._emscripten_bind_btKinematicCharacterController___destroy___0=function(){return(eu=b._emscripten_bind_btKinematicCharacterController___destroy___0=b.asm.Pr).apply(null,arguments)},fu=b._emscripten_bind_btSoftBodyArray_size_0=function(){return(fu=b._emscripten_bind_btSoftBodyArray_size_0=b.asm.Qr).apply(null,arguments)},gu=b._emscripten_bind_btSoftBodyArray_at_1=function(){return(gu=b._emscripten_bind_btSoftBodyArray_at_1=b.asm.Rr).apply(null,arguments)},hu=b._emscripten_bind_btSoftBodyArray___destroy___0= +function(){return(hu=b._emscripten_bind_btSoftBodyArray___destroy___0=b.asm.Sr).apply(null,arguments)},iu=b._emscripten_bind_btFaceArray_size_0=function(){return(iu=b._emscripten_bind_btFaceArray_size_0=b.asm.Tr).apply(null,arguments)},ju=b._emscripten_bind_btFaceArray_at_1=function(){return(ju=b._emscripten_bind_btFaceArray_at_1=b.asm.Ur).apply(null,arguments)},ku=b._emscripten_bind_btFaceArray___destroy___0=function(){return(ku=b._emscripten_bind_btFaceArray___destroy___0=b.asm.Vr).apply(null,arguments)}, +lu=b._emscripten_bind_btStaticPlaneShape_btStaticPlaneShape_2=function(){return(lu=b._emscripten_bind_btStaticPlaneShape_btStaticPlaneShape_2=b.asm.Wr).apply(null,arguments)},mu=b._emscripten_bind_btStaticPlaneShape_setLocalScaling_1=function(){return(mu=b._emscripten_bind_btStaticPlaneShape_setLocalScaling_1=b.asm.Xr).apply(null,arguments)},nu=b._emscripten_bind_btStaticPlaneShape_getLocalScaling_0=function(){return(nu=b._emscripten_bind_btStaticPlaneShape_getLocalScaling_0=b.asm.Yr).apply(null, +arguments)},ou=b._emscripten_bind_btStaticPlaneShape_calculateLocalInertia_2=function(){return(ou=b._emscripten_bind_btStaticPlaneShape_calculateLocalInertia_2=b.asm.Zr).apply(null,arguments)},pu=b._emscripten_bind_btStaticPlaneShape___destroy___0=function(){return(pu=b._emscripten_bind_btStaticPlaneShape___destroy___0=b.asm._r).apply(null,arguments)},qu=b._emscripten_bind_btOverlappingPairCache_setInternalGhostPairCallback_1=function(){return(qu=b._emscripten_bind_btOverlappingPairCache_setInternalGhostPairCallback_1= +b.asm.$r).apply(null,arguments)},ru=b._emscripten_bind_btOverlappingPairCache_getNumOverlappingPairs_0=function(){return(ru=b._emscripten_bind_btOverlappingPairCache_getNumOverlappingPairs_0=b.asm.as).apply(null,arguments)},su=b._emscripten_bind_btOverlappingPairCache___destroy___0=function(){return(su=b._emscripten_bind_btOverlappingPairCache___destroy___0=b.asm.bs).apply(null,arguments)},tu=b._emscripten_bind_btIndexedMesh_get_m_numTriangles_0=function(){return(tu=b._emscripten_bind_btIndexedMesh_get_m_numTriangles_0= +b.asm.cs).apply(null,arguments)},uu=b._emscripten_bind_btIndexedMesh_set_m_numTriangles_1=function(){return(uu=b._emscripten_bind_btIndexedMesh_set_m_numTriangles_1=b.asm.ds).apply(null,arguments)},vu=b._emscripten_bind_btIndexedMesh___destroy___0=function(){return(vu=b._emscripten_bind_btIndexedMesh___destroy___0=b.asm.es).apply(null,arguments)},wu=b._emscripten_bind_btSoftRigidDynamicsWorld_btSoftRigidDynamicsWorld_5=function(){return(wu=b._emscripten_bind_btSoftRigidDynamicsWorld_btSoftRigidDynamicsWorld_5= +b.asm.fs).apply(null,arguments)},xu=b._emscripten_bind_btSoftRigidDynamicsWorld_addSoftBody_3=function(){return(xu=b._emscripten_bind_btSoftRigidDynamicsWorld_addSoftBody_3=b.asm.gs).apply(null,arguments)},yu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeSoftBody_1=function(){return(yu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeSoftBody_1=b.asm.hs).apply(null,arguments)},zu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeCollisionObject_1=function(){return(zu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeCollisionObject_1= +b.asm.is).apply(null,arguments)},Au=b._emscripten_bind_btSoftRigidDynamicsWorld_getWorldInfo_0=function(){return(Au=b._emscripten_bind_btSoftRigidDynamicsWorld_getWorldInfo_0=b.asm.js).apply(null,arguments)},Bu=b._emscripten_bind_btSoftRigidDynamicsWorld_getSoftBodyArray_0=function(){return(Bu=b._emscripten_bind_btSoftRigidDynamicsWorld_getSoftBodyArray_0=b.asm.ks).apply(null,arguments)},Cu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatcher_0=function(){return(Cu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatcher_0= +b.asm.ls).apply(null,arguments)},Du=b._emscripten_bind_btSoftRigidDynamicsWorld_rayTest_3=function(){return(Du=b._emscripten_bind_btSoftRigidDynamicsWorld_rayTest_3=b.asm.ms).apply(null,arguments)},Eu=b._emscripten_bind_btSoftRigidDynamicsWorld_getPairCache_0=function(){return(Eu=b._emscripten_bind_btSoftRigidDynamicsWorld_getPairCache_0=b.asm.ns).apply(null,arguments)},Fu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatchInfo_0=function(){return(Fu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDispatchInfo_0= +b.asm.os).apply(null,arguments)},Gu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_1=function(){return(Gu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_1=b.asm.ps).apply(null,arguments)},Hu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_2=function(){return(Hu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_2=b.asm.qs).apply(null,arguments)},Iu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_3=function(){return(Iu=b._emscripten_bind_btSoftRigidDynamicsWorld_addCollisionObject_3= +b.asm.rs).apply(null,arguments)},Ju=b._emscripten_bind_btSoftRigidDynamicsWorld_getBroadphase_0=function(){return(Ju=b._emscripten_bind_btSoftRigidDynamicsWorld_getBroadphase_0=b.asm.ss).apply(null,arguments)},Ku=b._emscripten_bind_btSoftRigidDynamicsWorld_convexSweepTest_5=function(){return(Ku=b._emscripten_bind_btSoftRigidDynamicsWorld_convexSweepTest_5=b.asm.ts).apply(null,arguments)},Lu=b._emscripten_bind_btSoftRigidDynamicsWorld_contactPairTest_3=function(){return(Lu=b._emscripten_bind_btSoftRigidDynamicsWorld_contactPairTest_3= +b.asm.us).apply(null,arguments)},Mu=b._emscripten_bind_btSoftRigidDynamicsWorld_contactTest_2=function(){return(Mu=b._emscripten_bind_btSoftRigidDynamicsWorld_contactTest_2=b.asm.vs).apply(null,arguments)},Nu=b._emscripten_bind_btSoftRigidDynamicsWorld_updateSingleAabb_1=function(){return(Nu=b._emscripten_bind_btSoftRigidDynamicsWorld_updateSingleAabb_1=b.asm.ws).apply(null,arguments)},Ou=b._emscripten_bind_btSoftRigidDynamicsWorld_setDebugDrawer_1=function(){return(Ou=b._emscripten_bind_btSoftRigidDynamicsWorld_setDebugDrawer_1= +b.asm.xs).apply(null,arguments)},Pu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDebugDrawer_0=function(){return(Pu=b._emscripten_bind_btSoftRigidDynamicsWorld_getDebugDrawer_0=b.asm.ys).apply(null,arguments)},Qu=b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawWorld_0=function(){return(Qu=b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawWorld_0=b.asm.zs).apply(null,arguments)},Ru=b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawObject_3=function(){return(Ru=b._emscripten_bind_btSoftRigidDynamicsWorld_debugDrawObject_3= +b.asm.As).apply(null,arguments)},Su=b._emscripten_bind_btSoftRigidDynamicsWorld_setGravity_1=function(){return(Su=b._emscripten_bind_btSoftRigidDynamicsWorld_setGravity_1=b.asm.Bs).apply(null,arguments)},Tu=b._emscripten_bind_btSoftRigidDynamicsWorld_getGravity_0=function(){return(Tu=b._emscripten_bind_btSoftRigidDynamicsWorld_getGravity_0=b.asm.Cs).apply(null,arguments)},Uu=b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_1=function(){return(Uu=b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_1= +b.asm.Ds).apply(null,arguments)},Vu=b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_3=function(){return(Vu=b._emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_3=b.asm.Es).apply(null,arguments)},Wu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeRigidBody_1=function(){return(Wu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeRigidBody_1=b.asm.Fs).apply(null,arguments)},Xu=b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_1=function(){return(Xu=b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_1= +b.asm.Gs).apply(null,arguments)},Yu=b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_2=function(){return(Yu=b._emscripten_bind_btSoftRigidDynamicsWorld_addConstraint_2=b.asm.Hs).apply(null,arguments)},Zu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeConstraint_1=function(){return(Zu=b._emscripten_bind_btSoftRigidDynamicsWorld_removeConstraint_1=b.asm.Is).apply(null,arguments)},$u=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_1=function(){return($u=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_1= +b.asm.Js).apply(null,arguments)},av=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_2=function(){return(av=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_2=b.asm.Ks).apply(null,arguments)},bv=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_3=function(){return(bv=b._emscripten_bind_btSoftRigidDynamicsWorld_stepSimulation_3=b.asm.Ls).apply(null,arguments)},cv=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactAddedCallback_1=function(){return(cv=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactAddedCallback_1= +b.asm.Ms).apply(null,arguments)},dv=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactProcessedCallback_1=function(){return(dv=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactProcessedCallback_1=b.asm.Ns).apply(null,arguments)},ev=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactDestroyedCallback_1=function(){return(ev=b._emscripten_bind_btSoftRigidDynamicsWorld_setContactDestroyedCallback_1=b.asm.Os).apply(null,arguments)},fv=b._emscripten_bind_btSoftRigidDynamicsWorld_addAction_1= +function(){return(fv=b._emscripten_bind_btSoftRigidDynamicsWorld_addAction_1=b.asm.Ps).apply(null,arguments)},gv=b._emscripten_bind_btSoftRigidDynamicsWorld_removeAction_1=function(){return(gv=b._emscripten_bind_btSoftRigidDynamicsWorld_removeAction_1=b.asm.Qs).apply(null,arguments)},hv=b._emscripten_bind_btSoftRigidDynamicsWorld_getSolverInfo_0=function(){return(hv=b._emscripten_bind_btSoftRigidDynamicsWorld_getSolverInfo_0=b.asm.Rs).apply(null,arguments)},iv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_1= +function(){return(iv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_1=b.asm.Ss).apply(null,arguments)},jv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_2=function(){return(jv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_2=b.asm.Ts).apply(null,arguments)},kv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_3=function(){return(kv=b._emscripten_bind_btSoftRigidDynamicsWorld_setInternalTickCallback_3=b.asm.Us).apply(null, +arguments)},lv=b._emscripten_bind_btSoftRigidDynamicsWorld___destroy___0=function(){return(lv=b._emscripten_bind_btSoftRigidDynamicsWorld___destroy___0=b.asm.Vs).apply(null,arguments)},mv=b._emscripten_bind_btFixedConstraint_btFixedConstraint_4=function(){return(mv=b._emscripten_bind_btFixedConstraint_btFixedConstraint_4=b.asm.Ws).apply(null,arguments)},nv=b._emscripten_bind_btFixedConstraint_enableFeedback_1=function(){return(nv=b._emscripten_bind_btFixedConstraint_enableFeedback_1=b.asm.Xs).apply(null, +arguments)},ov=b._emscripten_bind_btFixedConstraint_getBreakingImpulseThreshold_0=function(){return(ov=b._emscripten_bind_btFixedConstraint_getBreakingImpulseThreshold_0=b.asm.Ys).apply(null,arguments)},pv=b._emscripten_bind_btFixedConstraint_setBreakingImpulseThreshold_1=function(){return(pv=b._emscripten_bind_btFixedConstraint_setBreakingImpulseThreshold_1=b.asm.Zs).apply(null,arguments)},qv=b._emscripten_bind_btFixedConstraint_getParam_2=function(){return(qv=b._emscripten_bind_btFixedConstraint_getParam_2= +b.asm._s).apply(null,arguments)},rv=b._emscripten_bind_btFixedConstraint_setParam_3=function(){return(rv=b._emscripten_bind_btFixedConstraint_setParam_3=b.asm.$s).apply(null,arguments)},sv=b._emscripten_bind_btFixedConstraint___destroy___0=function(){return(sv=b._emscripten_bind_btFixedConstraint___destroy___0=b.asm.at).apply(null,arguments)},tv=b._emscripten_bind_btTransform_btTransform_0=function(){return(tv=b._emscripten_bind_btTransform_btTransform_0=b.asm.bt).apply(null,arguments)},uv=b._emscripten_bind_btTransform_btTransform_2= +function(){return(uv=b._emscripten_bind_btTransform_btTransform_2=b.asm.ct).apply(null,arguments)},vv=b._emscripten_bind_btTransform_setIdentity_0=function(){return(vv=b._emscripten_bind_btTransform_setIdentity_0=b.asm.dt).apply(null,arguments)},wv=b._emscripten_bind_btTransform_setOrigin_1=function(){return(wv=b._emscripten_bind_btTransform_setOrigin_1=b.asm.et).apply(null,arguments)},xv=b._emscripten_bind_btTransform_setRotation_1=function(){return(xv=b._emscripten_bind_btTransform_setRotation_1= +b.asm.ft).apply(null,arguments)},yv=b._emscripten_bind_btTransform_getOrigin_0=function(){return(yv=b._emscripten_bind_btTransform_getOrigin_0=b.asm.gt).apply(null,arguments)},zv=b._emscripten_bind_btTransform_getRotation_0=function(){return(zv=b._emscripten_bind_btTransform_getRotation_0=b.asm.ht).apply(null,arguments)},Av=b._emscripten_bind_btTransform_getBasis_0=function(){return(Av=b._emscripten_bind_btTransform_getBasis_0=b.asm.it).apply(null,arguments)},Bv=b._emscripten_bind_btTransform_setFromOpenGLMatrix_1= +function(){return(Bv=b._emscripten_bind_btTransform_setFromOpenGLMatrix_1=b.asm.jt).apply(null,arguments)},Cv=b._emscripten_bind_btTransform_inverse_0=function(){return(Cv=b._emscripten_bind_btTransform_inverse_0=b.asm.kt).apply(null,arguments)},Dv=b._emscripten_bind_btTransform_op_mul_1=function(){return(Dv=b._emscripten_bind_btTransform_op_mul_1=b.asm.lt).apply(null,arguments)},Ev=b._emscripten_bind_btTransform___destroy___0=function(){return(Ev=b._emscripten_bind_btTransform___destroy___0=b.asm.mt).apply(null, +arguments)},Fv=b._emscripten_bind_ClosestRayResultCallback_ClosestRayResultCallback_2=function(){return(Fv=b._emscripten_bind_ClosestRayResultCallback_ClosestRayResultCallback_2=b.asm.nt).apply(null,arguments)},Gv=b._emscripten_bind_ClosestRayResultCallback_hasHit_0=function(){return(Gv=b._emscripten_bind_ClosestRayResultCallback_hasHit_0=b.asm.ot).apply(null,arguments)},Hv=b._emscripten_bind_ClosestRayResultCallback_get_m_rayFromWorld_0=function(){return(Hv=b._emscripten_bind_ClosestRayResultCallback_get_m_rayFromWorld_0= +b.asm.pt).apply(null,arguments)},Iv=b._emscripten_bind_ClosestRayResultCallback_set_m_rayFromWorld_1=function(){return(Iv=b._emscripten_bind_ClosestRayResultCallback_set_m_rayFromWorld_1=b.asm.qt).apply(null,arguments)},Jv=b._emscripten_bind_ClosestRayResultCallback_get_m_rayToWorld_0=function(){return(Jv=b._emscripten_bind_ClosestRayResultCallback_get_m_rayToWorld_0=b.asm.rt).apply(null,arguments)},Kv=b._emscripten_bind_ClosestRayResultCallback_set_m_rayToWorld_1=function(){return(Kv=b._emscripten_bind_ClosestRayResultCallback_set_m_rayToWorld_1= +b.asm.st).apply(null,arguments)},Lv=b._emscripten_bind_ClosestRayResultCallback_get_m_hitNormalWorld_0=function(){return(Lv=b._emscripten_bind_ClosestRayResultCallback_get_m_hitNormalWorld_0=b.asm.tt).apply(null,arguments)},Mv=b._emscripten_bind_ClosestRayResultCallback_set_m_hitNormalWorld_1=function(){return(Mv=b._emscripten_bind_ClosestRayResultCallback_set_m_hitNormalWorld_1=b.asm.ut).apply(null,arguments)},Nv=b._emscripten_bind_ClosestRayResultCallback_get_m_hitPointWorld_0=function(){return(Nv= +b._emscripten_bind_ClosestRayResultCallback_get_m_hitPointWorld_0=b.asm.vt).apply(null,arguments)},Ov=b._emscripten_bind_ClosestRayResultCallback_set_m_hitPointWorld_1=function(){return(Ov=b._emscripten_bind_ClosestRayResultCallback_set_m_hitPointWorld_1=b.asm.wt).apply(null,arguments)},Pv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterGroup_0=function(){return(Pv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterGroup_0=b.asm.xt).apply(null,arguments)},Qv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterGroup_1= +function(){return(Qv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterGroup_1=b.asm.yt).apply(null,arguments)},Rv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterMask_0=function(){return(Rv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionFilterMask_0=b.asm.zt).apply(null,arguments)},Sv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterMask_1=function(){return(Sv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionFilterMask_1=b.asm.At).apply(null, +arguments)},Tv=b._emscripten_bind_ClosestRayResultCallback_get_m_closestHitFraction_0=function(){return(Tv=b._emscripten_bind_ClosestRayResultCallback_get_m_closestHitFraction_0=b.asm.Bt).apply(null,arguments)},Uv=b._emscripten_bind_ClosestRayResultCallback_set_m_closestHitFraction_1=function(){return(Uv=b._emscripten_bind_ClosestRayResultCallback_set_m_closestHitFraction_1=b.asm.Ct).apply(null,arguments)},Vv=b._emscripten_bind_ClosestRayResultCallback_get_m_collisionObject_0=function(){return(Vv= +b._emscripten_bind_ClosestRayResultCallback_get_m_collisionObject_0=b.asm.Dt).apply(null,arguments)},Wv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionObject_1=function(){return(Wv=b._emscripten_bind_ClosestRayResultCallback_set_m_collisionObject_1=b.asm.Et).apply(null,arguments)},Xv=b._emscripten_bind_ClosestRayResultCallback___destroy___0=function(){return(Xv=b._emscripten_bind_ClosestRayResultCallback___destroy___0=b.asm.Ft).apply(null,arguments)},Yv=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_0= +function(){return(Yv=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_0=b.asm.Gt).apply(null,arguments)},Zv=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_1=function(){return(Zv=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration_btSoftBodyRigidBodyCollisionConfiguration_1=b.asm.Ht).apply(null,arguments)},$v=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration___destroy___0= +function(){return($v=b._emscripten_bind_btSoftBodyRigidBodyCollisionConfiguration___destroy___0=b.asm.It).apply(null,arguments)},aw=b._emscripten_bind_ConcreteContactResultCallback_ConcreteContactResultCallback_0=function(){return(aw=b._emscripten_bind_ConcreteContactResultCallback_ConcreteContactResultCallback_0=b.asm.Jt).apply(null,arguments)},bw=b._emscripten_bind_ConcreteContactResultCallback_addSingleResult_7=function(){return(bw=b._emscripten_bind_ConcreteContactResultCallback_addSingleResult_7= +b.asm.Kt).apply(null,arguments)},cw=b._emscripten_bind_ConcreteContactResultCallback___destroy___0=function(){return(cw=b._emscripten_bind_ConcreteContactResultCallback___destroy___0=b.asm.Lt).apply(null,arguments)},dw=b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_2=function(){return(dw=b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_2=b.asm.Mt).apply(null,arguments)},ew=b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_3=function(){return(ew=b._emscripten_bind_btBvhTriangleMeshShape_btBvhTriangleMeshShape_3= +b.asm.Nt).apply(null,arguments)},fw=b._emscripten_bind_btBvhTriangleMeshShape_setLocalScaling_1=function(){return(fw=b._emscripten_bind_btBvhTriangleMeshShape_setLocalScaling_1=b.asm.Ot).apply(null,arguments)},gw=b._emscripten_bind_btBvhTriangleMeshShape_getLocalScaling_0=function(){return(gw=b._emscripten_bind_btBvhTriangleMeshShape_getLocalScaling_0=b.asm.Pt).apply(null,arguments)},hw=b._emscripten_bind_btBvhTriangleMeshShape_calculateLocalInertia_2=function(){return(hw=b._emscripten_bind_btBvhTriangleMeshShape_calculateLocalInertia_2= +b.asm.Qt).apply(null,arguments)},iw=b._emscripten_bind_btBvhTriangleMeshShape___destroy___0=function(){return(iw=b._emscripten_bind_btBvhTriangleMeshShape___destroy___0=b.asm.Rt).apply(null,arguments)},jw=b._emscripten_bind_btConstCollisionObjectArray_size_0=function(){return(jw=b._emscripten_bind_btConstCollisionObjectArray_size_0=b.asm.St).apply(null,arguments)},kw=b._emscripten_bind_btConstCollisionObjectArray_at_1=function(){return(kw=b._emscripten_bind_btConstCollisionObjectArray_at_1=b.asm.Tt).apply(null, +arguments)},lw=b._emscripten_bind_btConstCollisionObjectArray___destroy___0=function(){return(lw=b._emscripten_bind_btConstCollisionObjectArray___destroy___0=b.asm.Ut).apply(null,arguments)},mw=b._emscripten_bind_btSliderConstraint_btSliderConstraint_3=function(){return(mw=b._emscripten_bind_btSliderConstraint_btSliderConstraint_3=b.asm.Vt).apply(null,arguments)},nw=b._emscripten_bind_btSliderConstraint_btSliderConstraint_5=function(){return(nw=b._emscripten_bind_btSliderConstraint_btSliderConstraint_5= +b.asm.Wt).apply(null,arguments)},ow=b._emscripten_bind_btSliderConstraint_setLowerLinLimit_1=function(){return(ow=b._emscripten_bind_btSliderConstraint_setLowerLinLimit_1=b.asm.Xt).apply(null,arguments)},pw=b._emscripten_bind_btSliderConstraint_setUpperLinLimit_1=function(){return(pw=b._emscripten_bind_btSliderConstraint_setUpperLinLimit_1=b.asm.Yt).apply(null,arguments)},qw=b._emscripten_bind_btSliderConstraint_setLowerAngLimit_1=function(){return(qw=b._emscripten_bind_btSliderConstraint_setLowerAngLimit_1= +b.asm.Zt).apply(null,arguments)},rw=b._emscripten_bind_btSliderConstraint_setUpperAngLimit_1=function(){return(rw=b._emscripten_bind_btSliderConstraint_setUpperAngLimit_1=b.asm._t).apply(null,arguments)},sw=b._emscripten_bind_btSliderConstraint_enableFeedback_1=function(){return(sw=b._emscripten_bind_btSliderConstraint_enableFeedback_1=b.asm.$t).apply(null,arguments)},tw=b._emscripten_bind_btSliderConstraint_getBreakingImpulseThreshold_0=function(){return(tw=b._emscripten_bind_btSliderConstraint_getBreakingImpulseThreshold_0= +b.asm.au).apply(null,arguments)},uw=b._emscripten_bind_btSliderConstraint_setBreakingImpulseThreshold_1=function(){return(uw=b._emscripten_bind_btSliderConstraint_setBreakingImpulseThreshold_1=b.asm.bu).apply(null,arguments)},vw=b._emscripten_bind_btSliderConstraint_getParam_2=function(){return(vw=b._emscripten_bind_btSliderConstraint_getParam_2=b.asm.cu).apply(null,arguments)},ww=b._emscripten_bind_btSliderConstraint_setParam_3=function(){return(ww=b._emscripten_bind_btSliderConstraint_setParam_3= +b.asm.du).apply(null,arguments)},xw=b._emscripten_bind_btSliderConstraint___destroy___0=function(){return(xw=b._emscripten_bind_btSliderConstraint___destroy___0=b.asm.eu).apply(null,arguments)},yw=b._emscripten_bind_btPairCachingGhostObject_btPairCachingGhostObject_0=function(){return(yw=b._emscripten_bind_btPairCachingGhostObject_btPairCachingGhostObject_0=b.asm.fu).apply(null,arguments)},zw=b._emscripten_bind_btPairCachingGhostObject_setAnisotropicFriction_2=function(){return(zw=b._emscripten_bind_btPairCachingGhostObject_setAnisotropicFriction_2= +b.asm.gu).apply(null,arguments)},Aw=b._emscripten_bind_btPairCachingGhostObject_getCollisionShape_0=function(){return(Aw=b._emscripten_bind_btPairCachingGhostObject_getCollisionShape_0=b.asm.hu).apply(null,arguments)},Bw=b._emscripten_bind_btPairCachingGhostObject_setContactProcessingThreshold_1=function(){return(Bw=b._emscripten_bind_btPairCachingGhostObject_setContactProcessingThreshold_1=b.asm.iu).apply(null,arguments)},Cw=b._emscripten_bind_btPairCachingGhostObject_setActivationState_1=function(){return(Cw= +b._emscripten_bind_btPairCachingGhostObject_setActivationState_1=b.asm.ju).apply(null,arguments)},Dw=b._emscripten_bind_btPairCachingGhostObject_forceActivationState_1=function(){return(Dw=b._emscripten_bind_btPairCachingGhostObject_forceActivationState_1=b.asm.ku).apply(null,arguments)},Ew=b._emscripten_bind_btPairCachingGhostObject_activate_0=function(){return(Ew=b._emscripten_bind_btPairCachingGhostObject_activate_0=b.asm.lu).apply(null,arguments)},Fw=b._emscripten_bind_btPairCachingGhostObject_activate_1= +function(){return(Fw=b._emscripten_bind_btPairCachingGhostObject_activate_1=b.asm.mu).apply(null,arguments)},Gw=b._emscripten_bind_btPairCachingGhostObject_isActive_0=function(){return(Gw=b._emscripten_bind_btPairCachingGhostObject_isActive_0=b.asm.nu).apply(null,arguments)},Hw=b._emscripten_bind_btPairCachingGhostObject_isKinematicObject_0=function(){return(Hw=b._emscripten_bind_btPairCachingGhostObject_isKinematicObject_0=b.asm.ou).apply(null,arguments)},Iw=b._emscripten_bind_btPairCachingGhostObject_isStaticObject_0= +function(){return(Iw=b._emscripten_bind_btPairCachingGhostObject_isStaticObject_0=b.asm.pu).apply(null,arguments)},Jw=b._emscripten_bind_btPairCachingGhostObject_isStaticOrKinematicObject_0=function(){return(Jw=b._emscripten_bind_btPairCachingGhostObject_isStaticOrKinematicObject_0=b.asm.qu).apply(null,arguments)},Kw=b._emscripten_bind_btPairCachingGhostObject_getRestitution_0=function(){return(Kw=b._emscripten_bind_btPairCachingGhostObject_getRestitution_0=b.asm.ru).apply(null,arguments)},Lw=b._emscripten_bind_btPairCachingGhostObject_getFriction_0= +function(){return(Lw=b._emscripten_bind_btPairCachingGhostObject_getFriction_0=b.asm.su).apply(null,arguments)},Mw=b._emscripten_bind_btPairCachingGhostObject_getRollingFriction_0=function(){return(Mw=b._emscripten_bind_btPairCachingGhostObject_getRollingFriction_0=b.asm.tu).apply(null,arguments)},Nw=b._emscripten_bind_btPairCachingGhostObject_setRestitution_1=function(){return(Nw=b._emscripten_bind_btPairCachingGhostObject_setRestitution_1=b.asm.uu).apply(null,arguments)},Ow=b._emscripten_bind_btPairCachingGhostObject_setFriction_1= +function(){return(Ow=b._emscripten_bind_btPairCachingGhostObject_setFriction_1=b.asm.vu).apply(null,arguments)},Pw=b._emscripten_bind_btPairCachingGhostObject_setRollingFriction_1=function(){return(Pw=b._emscripten_bind_btPairCachingGhostObject_setRollingFriction_1=b.asm.wu).apply(null,arguments)},Qw=b._emscripten_bind_btPairCachingGhostObject_getWorldTransform_0=function(){return(Qw=b._emscripten_bind_btPairCachingGhostObject_getWorldTransform_0=b.asm.xu).apply(null,arguments)},Rw=b._emscripten_bind_btPairCachingGhostObject_getCollisionFlags_0= +function(){return(Rw=b._emscripten_bind_btPairCachingGhostObject_getCollisionFlags_0=b.asm.yu).apply(null,arguments)},Sw=b._emscripten_bind_btPairCachingGhostObject_setCollisionFlags_1=function(){return(Sw=b._emscripten_bind_btPairCachingGhostObject_setCollisionFlags_1=b.asm.zu).apply(null,arguments)},Tw=b._emscripten_bind_btPairCachingGhostObject_setWorldTransform_1=function(){return(Tw=b._emscripten_bind_btPairCachingGhostObject_setWorldTransform_1=b.asm.Au).apply(null,arguments)},Uw=b._emscripten_bind_btPairCachingGhostObject_setCollisionShape_1= +function(){return(Uw=b._emscripten_bind_btPairCachingGhostObject_setCollisionShape_1=b.asm.Bu).apply(null,arguments)},Vw=b._emscripten_bind_btPairCachingGhostObject_setCcdMotionThreshold_1=function(){return(Vw=b._emscripten_bind_btPairCachingGhostObject_setCcdMotionThreshold_1=b.asm.Cu).apply(null,arguments)},Ww=b._emscripten_bind_btPairCachingGhostObject_setCcdSweptSphereRadius_1=function(){return(Ww=b._emscripten_bind_btPairCachingGhostObject_setCcdSweptSphereRadius_1=b.asm.Du).apply(null,arguments)}, +Xw=b._emscripten_bind_btPairCachingGhostObject_getUserIndex_0=function(){return(Xw=b._emscripten_bind_btPairCachingGhostObject_getUserIndex_0=b.asm.Eu).apply(null,arguments)},Yw=b._emscripten_bind_btPairCachingGhostObject_setUserIndex_1=function(){return(Yw=b._emscripten_bind_btPairCachingGhostObject_setUserIndex_1=b.asm.Fu).apply(null,arguments)},Zw=b._emscripten_bind_btPairCachingGhostObject_getUserPointer_0=function(){return(Zw=b._emscripten_bind_btPairCachingGhostObject_getUserPointer_0=b.asm.Gu).apply(null, +arguments)},$w=b._emscripten_bind_btPairCachingGhostObject_setUserPointer_1=function(){return($w=b._emscripten_bind_btPairCachingGhostObject_setUserPointer_1=b.asm.Hu).apply(null,arguments)},ax=b._emscripten_bind_btPairCachingGhostObject_getBroadphaseHandle_0=function(){return(ax=b._emscripten_bind_btPairCachingGhostObject_getBroadphaseHandle_0=b.asm.Iu).apply(null,arguments)},bx=b._emscripten_bind_btPairCachingGhostObject_getNumOverlappingObjects_0=function(){return(bx=b._emscripten_bind_btPairCachingGhostObject_getNumOverlappingObjects_0= +b.asm.Ju).apply(null,arguments)},cx=b._emscripten_bind_btPairCachingGhostObject_getOverlappingObject_1=function(){return(cx=b._emscripten_bind_btPairCachingGhostObject_getOverlappingObject_1=b.asm.Ku).apply(null,arguments)},dx=b._emscripten_bind_btPairCachingGhostObject___destroy___0=function(){return(dx=b._emscripten_bind_btPairCachingGhostObject___destroy___0=b.asm.Lu).apply(null,arguments)},ex=b._emscripten_bind_btManifoldPoint_getPositionWorldOnA_0=function(){return(ex=b._emscripten_bind_btManifoldPoint_getPositionWorldOnA_0= +b.asm.Mu).apply(null,arguments)},fx=b._emscripten_bind_btManifoldPoint_getPositionWorldOnB_0=function(){return(fx=b._emscripten_bind_btManifoldPoint_getPositionWorldOnB_0=b.asm.Nu).apply(null,arguments)},gx=b._emscripten_bind_btManifoldPoint_getAppliedImpulse_0=function(){return(gx=b._emscripten_bind_btManifoldPoint_getAppliedImpulse_0=b.asm.Ou).apply(null,arguments)},hx=b._emscripten_bind_btManifoldPoint_getDistance_0=function(){return(hx=b._emscripten_bind_btManifoldPoint_getDistance_0=b.asm.Pu).apply(null, +arguments)},ix=b._emscripten_bind_btManifoldPoint_get_m_localPointA_0=function(){return(ix=b._emscripten_bind_btManifoldPoint_get_m_localPointA_0=b.asm.Qu).apply(null,arguments)},jx=b._emscripten_bind_btManifoldPoint_set_m_localPointA_1=function(){return(jx=b._emscripten_bind_btManifoldPoint_set_m_localPointA_1=b.asm.Ru).apply(null,arguments)},kx=b._emscripten_bind_btManifoldPoint_get_m_localPointB_0=function(){return(kx=b._emscripten_bind_btManifoldPoint_get_m_localPointB_0=b.asm.Su).apply(null, +arguments)},lx=b._emscripten_bind_btManifoldPoint_set_m_localPointB_1=function(){return(lx=b._emscripten_bind_btManifoldPoint_set_m_localPointB_1=b.asm.Tu).apply(null,arguments)},mx=b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnB_0=function(){return(mx=b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnB_0=b.asm.Uu).apply(null,arguments)},nx=b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnB_1=function(){return(nx=b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnB_1=b.asm.Vu).apply(null, +arguments)},ox=b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnA_0=function(){return(ox=b._emscripten_bind_btManifoldPoint_get_m_positionWorldOnA_0=b.asm.Wu).apply(null,arguments)},px=b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnA_1=function(){return(px=b._emscripten_bind_btManifoldPoint_set_m_positionWorldOnA_1=b.asm.Xu).apply(null,arguments)},qx=b._emscripten_bind_btManifoldPoint_get_m_normalWorldOnB_0=function(){return(qx=b._emscripten_bind_btManifoldPoint_get_m_normalWorldOnB_0= +b.asm.Yu).apply(null,arguments)},rx=b._emscripten_bind_btManifoldPoint_set_m_normalWorldOnB_1=function(){return(rx=b._emscripten_bind_btManifoldPoint_set_m_normalWorldOnB_1=b.asm.Zu).apply(null,arguments)},sx=b._emscripten_bind_btManifoldPoint_get_m_userPersistentData_0=function(){return(sx=b._emscripten_bind_btManifoldPoint_get_m_userPersistentData_0=b.asm._u).apply(null,arguments)},tx=b._emscripten_bind_btManifoldPoint_set_m_userPersistentData_1=function(){return(tx=b._emscripten_bind_btManifoldPoint_set_m_userPersistentData_1= +b.asm.$u).apply(null,arguments)},ux=b._emscripten_bind_btManifoldPoint___destroy___0=function(){return(ux=b._emscripten_bind_btManifoldPoint___destroy___0=b.asm.av).apply(null,arguments)},vx=b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_2=function(){return(vx=b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_2=b.asm.bv).apply(null,arguments)},wx=b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_4=function(){return(wx=b._emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_4= +b.asm.cv).apply(null,arguments)},xx=b._emscripten_bind_btPoint2PointConstraint_setPivotA_1=function(){return(xx=b._emscripten_bind_btPoint2PointConstraint_setPivotA_1=b.asm.dv).apply(null,arguments)},yx=b._emscripten_bind_btPoint2PointConstraint_setPivotB_1=function(){return(yx=b._emscripten_bind_btPoint2PointConstraint_setPivotB_1=b.asm.ev).apply(null,arguments)},zx=b._emscripten_bind_btPoint2PointConstraint_getPivotInA_0=function(){return(zx=b._emscripten_bind_btPoint2PointConstraint_getPivotInA_0= +b.asm.fv).apply(null,arguments)},Ax=b._emscripten_bind_btPoint2PointConstraint_getPivotInB_0=function(){return(Ax=b._emscripten_bind_btPoint2PointConstraint_getPivotInB_0=b.asm.gv).apply(null,arguments)},Bx=b._emscripten_bind_btPoint2PointConstraint_enableFeedback_1=function(){return(Bx=b._emscripten_bind_btPoint2PointConstraint_enableFeedback_1=b.asm.hv).apply(null,arguments)},Cx=b._emscripten_bind_btPoint2PointConstraint_getBreakingImpulseThreshold_0=function(){return(Cx=b._emscripten_bind_btPoint2PointConstraint_getBreakingImpulseThreshold_0= +b.asm.iv).apply(null,arguments)},Dx=b._emscripten_bind_btPoint2PointConstraint_setBreakingImpulseThreshold_1=function(){return(Dx=b._emscripten_bind_btPoint2PointConstraint_setBreakingImpulseThreshold_1=b.asm.jv).apply(null,arguments)},Ex=b._emscripten_bind_btPoint2PointConstraint_getParam_2=function(){return(Ex=b._emscripten_bind_btPoint2PointConstraint_getParam_2=b.asm.kv).apply(null,arguments)},Fx=b._emscripten_bind_btPoint2PointConstraint_setParam_3=function(){return(Fx=b._emscripten_bind_btPoint2PointConstraint_setParam_3= +b.asm.lv).apply(null,arguments)},Gx=b._emscripten_bind_btPoint2PointConstraint_get_m_setting_0=function(){return(Gx=b._emscripten_bind_btPoint2PointConstraint_get_m_setting_0=b.asm.mv).apply(null,arguments)},Hx=b._emscripten_bind_btPoint2PointConstraint_set_m_setting_1=function(){return(Hx=b._emscripten_bind_btPoint2PointConstraint_set_m_setting_1=b.asm.nv).apply(null,arguments)},Ix=b._emscripten_bind_btPoint2PointConstraint___destroy___0=function(){return(Ix=b._emscripten_bind_btPoint2PointConstraint___destroy___0= +b.asm.ov).apply(null,arguments)},Jx=b._emscripten_bind_btSoftBodyHelpers_btSoftBodyHelpers_0=function(){return(Jx=b._emscripten_bind_btSoftBodyHelpers_btSoftBodyHelpers_0=b.asm.pv).apply(null,arguments)},Kx=b._emscripten_bind_btSoftBodyHelpers_CreateRope_5=function(){return(Kx=b._emscripten_bind_btSoftBodyHelpers_CreateRope_5=b.asm.qv).apply(null,arguments)},Lx=b._emscripten_bind_btSoftBodyHelpers_CreatePatch_9=function(){return(Lx=b._emscripten_bind_btSoftBodyHelpers_CreatePatch_9=b.asm.rv).apply(null, +arguments)},Mx=b._emscripten_bind_btSoftBodyHelpers_CreatePatchUV_10=function(){return(Mx=b._emscripten_bind_btSoftBodyHelpers_CreatePatchUV_10=b.asm.sv).apply(null,arguments)},Nx=b._emscripten_bind_btSoftBodyHelpers_CreateEllipsoid_4=function(){return(Nx=b._emscripten_bind_btSoftBodyHelpers_CreateEllipsoid_4=b.asm.tv).apply(null,arguments)},Ox=b._emscripten_bind_btSoftBodyHelpers_CreateFromTriMesh_5=function(){return(Ox=b._emscripten_bind_btSoftBodyHelpers_CreateFromTriMesh_5=b.asm.uv).apply(null, +arguments)},Px=b._emscripten_bind_btSoftBodyHelpers_CreateFromConvexHull_4=function(){return(Px=b._emscripten_bind_btSoftBodyHelpers_CreateFromConvexHull_4=b.asm.vv).apply(null,arguments)},Qx=b._emscripten_bind_btSoftBodyHelpers___destroy___0=function(){return(Qx=b._emscripten_bind_btSoftBodyHelpers___destroy___0=b.asm.wv).apply(null,arguments)},Rx=b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterGroup_0=function(){return(Rx=b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterGroup_0= +b.asm.xv).apply(null,arguments)},Sx=b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterGroup_1=function(){return(Sx=b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterGroup_1=b.asm.yv).apply(null,arguments)},Tx=b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterMask_0=function(){return(Tx=b._emscripten_bind_btBroadphaseProxy_get_m_collisionFilterMask_0=b.asm.zv).apply(null,arguments)},Ux=b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterMask_1=function(){return(Ux=b._emscripten_bind_btBroadphaseProxy_set_m_collisionFilterMask_1= +b.asm.Av).apply(null,arguments)},Vx=b._emscripten_bind_btBroadphaseProxy___destroy___0=function(){return(Vx=b._emscripten_bind_btBroadphaseProxy___destroy___0=b.asm.Bv).apply(null,arguments)},Wx=b._emscripten_bind_tNodeArray_size_0=function(){return(Wx=b._emscripten_bind_tNodeArray_size_0=b.asm.Cv).apply(null,arguments)},Xx=b._emscripten_bind_tNodeArray_at_1=function(){return(Xx=b._emscripten_bind_tNodeArray_at_1=b.asm.Dv).apply(null,arguments)},Yx=b._emscripten_bind_tNodeArray___destroy___0=function(){return(Yx= +b._emscripten_bind_tNodeArray___destroy___0=b.asm.Ev).apply(null,arguments)},Zx=b._emscripten_bind_btBoxShape_btBoxShape_1=function(){return(Zx=b._emscripten_bind_btBoxShape_btBoxShape_1=b.asm.Fv).apply(null,arguments)},$x=b._emscripten_bind_btBoxShape_setMargin_1=function(){return($x=b._emscripten_bind_btBoxShape_setMargin_1=b.asm.Gv).apply(null,arguments)},ay=b._emscripten_bind_btBoxShape_getMargin_0=function(){return(ay=b._emscripten_bind_btBoxShape_getMargin_0=b.asm.Hv).apply(null,arguments)}, +by=b._emscripten_bind_btBoxShape_setLocalScaling_1=function(){return(by=b._emscripten_bind_btBoxShape_setLocalScaling_1=b.asm.Iv).apply(null,arguments)},cy=b._emscripten_bind_btBoxShape_getLocalScaling_0=function(){return(cy=b._emscripten_bind_btBoxShape_getLocalScaling_0=b.asm.Jv).apply(null,arguments)},dy=b._emscripten_bind_btBoxShape_calculateLocalInertia_2=function(){return(dy=b._emscripten_bind_btBoxShape_calculateLocalInertia_2=b.asm.Kv).apply(null,arguments)},ey=b._emscripten_bind_btBoxShape___destroy___0= +function(){return(ey=b._emscripten_bind_btBoxShape___destroy___0=b.asm.Lv).apply(null,arguments)},fy=b._emscripten_bind_btFace_get_m_indices_0=function(){return(fy=b._emscripten_bind_btFace_get_m_indices_0=b.asm.Mv).apply(null,arguments)},gy=b._emscripten_bind_btFace_set_m_indices_1=function(){return(gy=b._emscripten_bind_btFace_set_m_indices_1=b.asm.Nv).apply(null,arguments)},hy=b._emscripten_bind_btFace_get_m_plane_1=function(){return(hy=b._emscripten_bind_btFace_get_m_plane_1=b.asm.Ov).apply(null, +arguments)},iy=b._emscripten_bind_btFace_set_m_plane_2=function(){return(iy=b._emscripten_bind_btFace_set_m_plane_2=b.asm.Pv).apply(null,arguments)},jy=b._emscripten_bind_btFace___destroy___0=function(){return(jy=b._emscripten_bind_btFace___destroy___0=b.asm.Qv).apply(null,arguments)},ky=b._emscripten_bind_DebugDrawer_DebugDrawer_0=function(){return(ky=b._emscripten_bind_DebugDrawer_DebugDrawer_0=b.asm.Rv).apply(null,arguments)},ly=b._emscripten_bind_DebugDrawer_drawLine_3=function(){return(ly=b._emscripten_bind_DebugDrawer_drawLine_3= +b.asm.Sv).apply(null,arguments)},my=b._emscripten_bind_DebugDrawer_drawContactPoint_5=function(){return(my=b._emscripten_bind_DebugDrawer_drawContactPoint_5=b.asm.Tv).apply(null,arguments)},ny=b._emscripten_bind_DebugDrawer_reportErrorWarning_1=function(){return(ny=b._emscripten_bind_DebugDrawer_reportErrorWarning_1=b.asm.Uv).apply(null,arguments)},oy=b._emscripten_bind_DebugDrawer_draw3dText_2=function(){return(oy=b._emscripten_bind_DebugDrawer_draw3dText_2=b.asm.Vv).apply(null,arguments)},py=b._emscripten_bind_DebugDrawer_setDebugMode_1= +function(){return(py=b._emscripten_bind_DebugDrawer_setDebugMode_1=b.asm.Wv).apply(null,arguments)},qy=b._emscripten_bind_DebugDrawer_getDebugMode_0=function(){return(qy=b._emscripten_bind_DebugDrawer_getDebugMode_0=b.asm.Xv).apply(null,arguments)},ry=b._emscripten_bind_DebugDrawer___destroy___0=function(){return(ry=b._emscripten_bind_DebugDrawer___destroy___0=b.asm.Yv).apply(null,arguments)},sy=b._emscripten_bind_btCapsuleShapeX_btCapsuleShapeX_2=function(){return(sy=b._emscripten_bind_btCapsuleShapeX_btCapsuleShapeX_2= +b.asm.Zv).apply(null,arguments)},ty=b._emscripten_bind_btCapsuleShapeX_setMargin_1=function(){return(ty=b._emscripten_bind_btCapsuleShapeX_setMargin_1=b.asm._v).apply(null,arguments)},uy=b._emscripten_bind_btCapsuleShapeX_getMargin_0=function(){return(uy=b._emscripten_bind_btCapsuleShapeX_getMargin_0=b.asm.$v).apply(null,arguments)},vy=b._emscripten_bind_btCapsuleShapeX_getUpAxis_0=function(){return(vy=b._emscripten_bind_btCapsuleShapeX_getUpAxis_0=b.asm.aw).apply(null,arguments)},wy=b._emscripten_bind_btCapsuleShapeX_getRadius_0= +function(){return(wy=b._emscripten_bind_btCapsuleShapeX_getRadius_0=b.asm.bw).apply(null,arguments)},xy=b._emscripten_bind_btCapsuleShapeX_getHalfHeight_0=function(){return(xy=b._emscripten_bind_btCapsuleShapeX_getHalfHeight_0=b.asm.cw).apply(null,arguments)},yy=b._emscripten_bind_btCapsuleShapeX_setLocalScaling_1=function(){return(yy=b._emscripten_bind_btCapsuleShapeX_setLocalScaling_1=b.asm.dw).apply(null,arguments)},zy=b._emscripten_bind_btCapsuleShapeX_getLocalScaling_0=function(){return(zy=b._emscripten_bind_btCapsuleShapeX_getLocalScaling_0= +b.asm.ew).apply(null,arguments)},Ay=b._emscripten_bind_btCapsuleShapeX_calculateLocalInertia_2=function(){return(Ay=b._emscripten_bind_btCapsuleShapeX_calculateLocalInertia_2=b.asm.fw).apply(null,arguments)},By=b._emscripten_bind_btCapsuleShapeX___destroy___0=function(){return(By=b._emscripten_bind_btCapsuleShapeX___destroy___0=b.asm.gw).apply(null,arguments)},Cy=b._emscripten_bind_btQuaternion_btQuaternion_4=function(){return(Cy=b._emscripten_bind_btQuaternion_btQuaternion_4=b.asm.hw).apply(null, +arguments)},Dy=b._emscripten_bind_btQuaternion_setValue_4=function(){return(Dy=b._emscripten_bind_btQuaternion_setValue_4=b.asm.iw).apply(null,arguments)},Ey=b._emscripten_bind_btQuaternion_setEulerZYX_3=function(){return(Ey=b._emscripten_bind_btQuaternion_setEulerZYX_3=b.asm.jw).apply(null,arguments)},Fy=b._emscripten_bind_btQuaternion_setRotation_2=function(){return(Fy=b._emscripten_bind_btQuaternion_setRotation_2=b.asm.kw).apply(null,arguments)},Gy=b._emscripten_bind_btQuaternion_normalize_0=function(){return(Gy= +b._emscripten_bind_btQuaternion_normalize_0=b.asm.lw).apply(null,arguments)},Hy=b._emscripten_bind_btQuaternion_length2_0=function(){return(Hy=b._emscripten_bind_btQuaternion_length2_0=b.asm.mw).apply(null,arguments)},Iy=b._emscripten_bind_btQuaternion_length_0=function(){return(Iy=b._emscripten_bind_btQuaternion_length_0=b.asm.nw).apply(null,arguments)},Jy=b._emscripten_bind_btQuaternion_dot_1=function(){return(Jy=b._emscripten_bind_btQuaternion_dot_1=b.asm.ow).apply(null,arguments)},Ky=b._emscripten_bind_btQuaternion_normalized_0= +function(){return(Ky=b._emscripten_bind_btQuaternion_normalized_0=b.asm.pw).apply(null,arguments)},Ly=b._emscripten_bind_btQuaternion_getAxis_0=function(){return(Ly=b._emscripten_bind_btQuaternion_getAxis_0=b.asm.qw).apply(null,arguments)},My=b._emscripten_bind_btQuaternion_inverse_0=function(){return(My=b._emscripten_bind_btQuaternion_inverse_0=b.asm.rw).apply(null,arguments)},Ny=b._emscripten_bind_btQuaternion_getAngle_0=function(){return(Ny=b._emscripten_bind_btQuaternion_getAngle_0=b.asm.sw).apply(null, +arguments)},Oy=b._emscripten_bind_btQuaternion_getAngleShortestPath_0=function(){return(Oy=b._emscripten_bind_btQuaternion_getAngleShortestPath_0=b.asm.tw).apply(null,arguments)},Py=b._emscripten_bind_btQuaternion_angle_1=function(){return(Py=b._emscripten_bind_btQuaternion_angle_1=b.asm.uw).apply(null,arguments)},Qy=b._emscripten_bind_btQuaternion_angleShortestPath_1=function(){return(Qy=b._emscripten_bind_btQuaternion_angleShortestPath_1=b.asm.vw).apply(null,arguments)},Ry=b._emscripten_bind_btQuaternion_op_add_1= +function(){return(Ry=b._emscripten_bind_btQuaternion_op_add_1=b.asm.ww).apply(null,arguments)},Sy=b._emscripten_bind_btQuaternion_op_sub_1=function(){return(Sy=b._emscripten_bind_btQuaternion_op_sub_1=b.asm.xw).apply(null,arguments)},Ty=b._emscripten_bind_btQuaternion_op_mul_1=function(){return(Ty=b._emscripten_bind_btQuaternion_op_mul_1=b.asm.yw).apply(null,arguments)},Uy=b._emscripten_bind_btQuaternion_op_mulq_1=function(){return(Uy=b._emscripten_bind_btQuaternion_op_mulq_1=b.asm.zw).apply(null, +arguments)},Vy=b._emscripten_bind_btQuaternion_op_div_1=function(){return(Vy=b._emscripten_bind_btQuaternion_op_div_1=b.asm.Aw).apply(null,arguments)},Wy=b._emscripten_bind_btQuaternion_x_0=function(){return(Wy=b._emscripten_bind_btQuaternion_x_0=b.asm.Bw).apply(null,arguments)},Xy=b._emscripten_bind_btQuaternion_y_0=function(){return(Xy=b._emscripten_bind_btQuaternion_y_0=b.asm.Cw).apply(null,arguments)},Yy=b._emscripten_bind_btQuaternion_z_0=function(){return(Yy=b._emscripten_bind_btQuaternion_z_0= +b.asm.Dw).apply(null,arguments)},Zy=b._emscripten_bind_btQuaternion_w_0=function(){return(Zy=b._emscripten_bind_btQuaternion_w_0=b.asm.Ew).apply(null,arguments)},$y=b._emscripten_bind_btQuaternion_setX_1=function(){return($y=b._emscripten_bind_btQuaternion_setX_1=b.asm.Fw).apply(null,arguments)},az=b._emscripten_bind_btQuaternion_setY_1=function(){return(az=b._emscripten_bind_btQuaternion_setY_1=b.asm.Gw).apply(null,arguments)},bz=b._emscripten_bind_btQuaternion_setZ_1=function(){return(bz=b._emscripten_bind_btQuaternion_setZ_1= +b.asm.Hw).apply(null,arguments)},cz=b._emscripten_bind_btQuaternion_setW_1=function(){return(cz=b._emscripten_bind_btQuaternion_setW_1=b.asm.Iw).apply(null,arguments)},dz=b._emscripten_bind_btQuaternion___destroy___0=function(){return(dz=b._emscripten_bind_btQuaternion___destroy___0=b.asm.Jw).apply(null,arguments)},ez=b._emscripten_bind_btCapsuleShapeZ_btCapsuleShapeZ_2=function(){return(ez=b._emscripten_bind_btCapsuleShapeZ_btCapsuleShapeZ_2=b.asm.Kw).apply(null,arguments)},fz=b._emscripten_bind_btCapsuleShapeZ_setMargin_1= +function(){return(fz=b._emscripten_bind_btCapsuleShapeZ_setMargin_1=b.asm.Lw).apply(null,arguments)},gz=b._emscripten_bind_btCapsuleShapeZ_getMargin_0=function(){return(gz=b._emscripten_bind_btCapsuleShapeZ_getMargin_0=b.asm.Mw).apply(null,arguments)},hz=b._emscripten_bind_btCapsuleShapeZ_getUpAxis_0=function(){return(hz=b._emscripten_bind_btCapsuleShapeZ_getUpAxis_0=b.asm.Nw).apply(null,arguments)},iz=b._emscripten_bind_btCapsuleShapeZ_getRadius_0=function(){return(iz=b._emscripten_bind_btCapsuleShapeZ_getRadius_0= +b.asm.Ow).apply(null,arguments)},jz=b._emscripten_bind_btCapsuleShapeZ_getHalfHeight_0=function(){return(jz=b._emscripten_bind_btCapsuleShapeZ_getHalfHeight_0=b.asm.Pw).apply(null,arguments)},kz=b._emscripten_bind_btCapsuleShapeZ_setLocalScaling_1=function(){return(kz=b._emscripten_bind_btCapsuleShapeZ_setLocalScaling_1=b.asm.Qw).apply(null,arguments)},lz=b._emscripten_bind_btCapsuleShapeZ_getLocalScaling_0=function(){return(lz=b._emscripten_bind_btCapsuleShapeZ_getLocalScaling_0=b.asm.Rw).apply(null, +arguments)},mz=b._emscripten_bind_btCapsuleShapeZ_calculateLocalInertia_2=function(){return(mz=b._emscripten_bind_btCapsuleShapeZ_calculateLocalInertia_2=b.asm.Sw).apply(null,arguments)},nz=b._emscripten_bind_btCapsuleShapeZ___destroy___0=function(){return(nz=b._emscripten_bind_btCapsuleShapeZ___destroy___0=b.asm.Tw).apply(null,arguments)},oz=b._emscripten_bind_btContactSolverInfo_get_m_splitImpulse_0=function(){return(oz=b._emscripten_bind_btContactSolverInfo_get_m_splitImpulse_0=b.asm.Uw).apply(null, +arguments)},pz=b._emscripten_bind_btContactSolverInfo_set_m_splitImpulse_1=function(){return(pz=b._emscripten_bind_btContactSolverInfo_set_m_splitImpulse_1=b.asm.Vw).apply(null,arguments)},qz=b._emscripten_bind_btContactSolverInfo_get_m_splitImpulsePenetrationThreshold_0=function(){return(qz=b._emscripten_bind_btContactSolverInfo_get_m_splitImpulsePenetrationThreshold_0=b.asm.Ww).apply(null,arguments)},rz=b._emscripten_bind_btContactSolverInfo_set_m_splitImpulsePenetrationThreshold_1=function(){return(rz= +b._emscripten_bind_btContactSolverInfo_set_m_splitImpulsePenetrationThreshold_1=b.asm.Xw).apply(null,arguments)},sz=b._emscripten_bind_btContactSolverInfo_get_m_numIterations_0=function(){return(sz=b._emscripten_bind_btContactSolverInfo_get_m_numIterations_0=b.asm.Yw).apply(null,arguments)},tz=b._emscripten_bind_btContactSolverInfo_set_m_numIterations_1=function(){return(tz=b._emscripten_bind_btContactSolverInfo_set_m_numIterations_1=b.asm.Zw).apply(null,arguments)},uz=b._emscripten_bind_btContactSolverInfo___destroy___0= +function(){return(uz=b._emscripten_bind_btContactSolverInfo___destroy___0=b.asm._w).apply(null,arguments)},vz=b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_3=function(){return(vz=b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_3=b.asm.$w).apply(null,arguments)},wz=b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_5=function(){return(wz=b._emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_5= +b.asm.ax).apply(null,arguments)},xz=b._emscripten_bind_btGeneric6DofSpringConstraint_enableSpring_2=function(){return(xz=b._emscripten_bind_btGeneric6DofSpringConstraint_enableSpring_2=b.asm.bx).apply(null,arguments)},yz=b._emscripten_bind_btGeneric6DofSpringConstraint_setStiffness_2=function(){return(yz=b._emscripten_bind_btGeneric6DofSpringConstraint_setStiffness_2=b.asm.cx).apply(null,arguments)},zz=b._emscripten_bind_btGeneric6DofSpringConstraint_setDamping_2=function(){return(zz=b._emscripten_bind_btGeneric6DofSpringConstraint_setDamping_2= +b.asm.dx).apply(null,arguments)},Az=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_0=function(){return(Az=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_0=b.asm.ex).apply(null,arguments)},Bz=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_1=function(){return(Bz=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_1=b.asm.fx).apply(null,arguments)},Cz=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_2= +function(){return(Cz=b._emscripten_bind_btGeneric6DofSpringConstraint_setEquilibriumPoint_2=b.asm.gx).apply(null,arguments)},Dz=b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearLowerLimit_1=function(){return(Dz=b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearLowerLimit_1=b.asm.hx).apply(null,arguments)},Ez=b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearUpperLimit_1=function(){return(Ez=b._emscripten_bind_btGeneric6DofSpringConstraint_setLinearUpperLimit_1=b.asm.ix).apply(null, +arguments)},Fz=b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularLowerLimit_1=function(){return(Fz=b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularLowerLimit_1=b.asm.jx).apply(null,arguments)},Gz=b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularUpperLimit_1=function(){return(Gz=b._emscripten_bind_btGeneric6DofSpringConstraint_setAngularUpperLimit_1=b.asm.kx).apply(null,arguments)},Hz=b._emscripten_bind_btGeneric6DofSpringConstraint_getFrameOffsetA_0=function(){return(Hz= +b._emscripten_bind_btGeneric6DofSpringConstraint_getFrameOffsetA_0=b.asm.lx).apply(null,arguments)},Iz=b._emscripten_bind_btGeneric6DofSpringConstraint_enableFeedback_1=function(){return(Iz=b._emscripten_bind_btGeneric6DofSpringConstraint_enableFeedback_1=b.asm.mx).apply(null,arguments)},Jz=b._emscripten_bind_btGeneric6DofSpringConstraint_getBreakingImpulseThreshold_0=function(){return(Jz=b._emscripten_bind_btGeneric6DofSpringConstraint_getBreakingImpulseThreshold_0=b.asm.nx).apply(null,arguments)}, +Kz=b._emscripten_bind_btGeneric6DofSpringConstraint_setBreakingImpulseThreshold_1=function(){return(Kz=b._emscripten_bind_btGeneric6DofSpringConstraint_setBreakingImpulseThreshold_1=b.asm.ox).apply(null,arguments)},Lz=b._emscripten_bind_btGeneric6DofSpringConstraint_getParam_2=function(){return(Lz=b._emscripten_bind_btGeneric6DofSpringConstraint_getParam_2=b.asm.px).apply(null,arguments)},Mz=b._emscripten_bind_btGeneric6DofSpringConstraint_setParam_3=function(){return(Mz=b._emscripten_bind_btGeneric6DofSpringConstraint_setParam_3= +b.asm.qx).apply(null,arguments)},Nz=b._emscripten_bind_btGeneric6DofSpringConstraint___destroy___0=function(){return(Nz=b._emscripten_bind_btGeneric6DofSpringConstraint___destroy___0=b.asm.rx).apply(null,arguments)},Oz=b._emscripten_bind_btSphereShape_btSphereShape_1=function(){return(Oz=b._emscripten_bind_btSphereShape_btSphereShape_1=b.asm.sx).apply(null,arguments)},Pz=b._emscripten_bind_btSphereShape_setMargin_1=function(){return(Pz=b._emscripten_bind_btSphereShape_setMargin_1=b.asm.tx).apply(null, +arguments)},Qz=b._emscripten_bind_btSphereShape_getMargin_0=function(){return(Qz=b._emscripten_bind_btSphereShape_getMargin_0=b.asm.ux).apply(null,arguments)},Rz=b._emscripten_bind_btSphereShape_setLocalScaling_1=function(){return(Rz=b._emscripten_bind_btSphereShape_setLocalScaling_1=b.asm.vx).apply(null,arguments)},Sz=b._emscripten_bind_btSphereShape_getLocalScaling_0=function(){return(Sz=b._emscripten_bind_btSphereShape_getLocalScaling_0=b.asm.wx).apply(null,arguments)},Tz=b._emscripten_bind_btSphereShape_calculateLocalInertia_2= +function(){return(Tz=b._emscripten_bind_btSphereShape_calculateLocalInertia_2=b.asm.xx).apply(null,arguments)},Uz=b._emscripten_bind_btSphereShape___destroy___0=function(){return(Uz=b._emscripten_bind_btSphereShape___destroy___0=b.asm.yx).apply(null,arguments)},Vz=b._emscripten_bind_Face_get_m_n_1=function(){return(Vz=b._emscripten_bind_Face_get_m_n_1=b.asm.zx).apply(null,arguments)},Wz=b._emscripten_bind_Face_set_m_n_2=function(){return(Wz=b._emscripten_bind_Face_set_m_n_2=b.asm.Ax).apply(null,arguments)}, +Xz=b._emscripten_bind_Face_get_m_normal_0=function(){return(Xz=b._emscripten_bind_Face_get_m_normal_0=b.asm.Bx).apply(null,arguments)},Yz=b._emscripten_bind_Face_set_m_normal_1=function(){return(Yz=b._emscripten_bind_Face_set_m_normal_1=b.asm.Cx).apply(null,arguments)},Zz=b._emscripten_bind_Face_get_m_ra_0=function(){return(Zz=b._emscripten_bind_Face_get_m_ra_0=b.asm.Dx).apply(null,arguments)},$z=b._emscripten_bind_Face_set_m_ra_1=function(){return($z=b._emscripten_bind_Face_set_m_ra_1=b.asm.Ex).apply(null, +arguments)},aA=b._emscripten_bind_Face___destroy___0=function(){return(aA=b._emscripten_bind_Face___destroy___0=b.asm.Fx).apply(null,arguments)},bA=b._emscripten_bind_tFaceArray_size_0=function(){return(bA=b._emscripten_bind_tFaceArray_size_0=b.asm.Gx).apply(null,arguments)},cA=b._emscripten_bind_tFaceArray_at_1=function(){return(cA=b._emscripten_bind_tFaceArray_at_1=b.asm.Hx).apply(null,arguments)},dA=b._emscripten_bind_tFaceArray___destroy___0=function(){return(dA=b._emscripten_bind_tFaceArray___destroy___0= +b.asm.Ix).apply(null,arguments)},eA=b._emscripten_bind_LocalConvexResult_LocalConvexResult_5=function(){return(eA=b._emscripten_bind_LocalConvexResult_LocalConvexResult_5=b.asm.Jx).apply(null,arguments)},fA=b._emscripten_bind_LocalConvexResult_get_m_hitCollisionObject_0=function(){return(fA=b._emscripten_bind_LocalConvexResult_get_m_hitCollisionObject_0=b.asm.Kx).apply(null,arguments)},gA=b._emscripten_bind_LocalConvexResult_set_m_hitCollisionObject_1=function(){return(gA=b._emscripten_bind_LocalConvexResult_set_m_hitCollisionObject_1= +b.asm.Lx).apply(null,arguments)},hA=b._emscripten_bind_LocalConvexResult_get_m_localShapeInfo_0=function(){return(hA=b._emscripten_bind_LocalConvexResult_get_m_localShapeInfo_0=b.asm.Mx).apply(null,arguments)},iA=b._emscripten_bind_LocalConvexResult_set_m_localShapeInfo_1=function(){return(iA=b._emscripten_bind_LocalConvexResult_set_m_localShapeInfo_1=b.asm.Nx).apply(null,arguments)},jA=b._emscripten_bind_LocalConvexResult_get_m_hitNormalLocal_0=function(){return(jA=b._emscripten_bind_LocalConvexResult_get_m_hitNormalLocal_0= +b.asm.Ox).apply(null,arguments)},kA=b._emscripten_bind_LocalConvexResult_set_m_hitNormalLocal_1=function(){return(kA=b._emscripten_bind_LocalConvexResult_set_m_hitNormalLocal_1=b.asm.Px).apply(null,arguments)},lA=b._emscripten_bind_LocalConvexResult_get_m_hitPointLocal_0=function(){return(lA=b._emscripten_bind_LocalConvexResult_get_m_hitPointLocal_0=b.asm.Qx).apply(null,arguments)},mA=b._emscripten_bind_LocalConvexResult_set_m_hitPointLocal_1=function(){return(mA=b._emscripten_bind_LocalConvexResult_set_m_hitPointLocal_1= +b.asm.Rx).apply(null,arguments)},nA=b._emscripten_bind_LocalConvexResult_get_m_hitFraction_0=function(){return(nA=b._emscripten_bind_LocalConvexResult_get_m_hitFraction_0=b.asm.Sx).apply(null,arguments)},oA=b._emscripten_bind_LocalConvexResult_set_m_hitFraction_1=function(){return(oA=b._emscripten_bind_LocalConvexResult_set_m_hitFraction_1=b.asm.Tx).apply(null,arguments)},pA=b._emscripten_bind_LocalConvexResult___destroy___0=function(){return(pA=b._emscripten_bind_LocalConvexResult___destroy___0= +b.asm.Ux).apply(null,arguments)},qA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_ERP=function(){return(qA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_ERP=b.asm.Vx).apply(null,arguments)},rA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_ERP=function(){return(rA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_ERP=b.asm.Wx).apply(null,arguments)},sA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_CFM=function(){return(sA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_CFM= +b.asm.Xx).apply(null,arguments)},tA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_CFM=function(){return(tA=b._emscripten_enum_btConstraintParams_BT_CONSTRAINT_STOP_CFM=b.asm.Yx).apply(null,arguments)},uA=b._emscripten_enum_PHY_ScalarType_PHY_FLOAT=function(){return(uA=b._emscripten_enum_PHY_ScalarType_PHY_FLOAT=b.asm.Zx).apply(null,arguments)},vA=b._emscripten_enum_PHY_ScalarType_PHY_DOUBLE=function(){return(vA=b._emscripten_enum_PHY_ScalarType_PHY_DOUBLE=b.asm._x).apply(null,arguments)}, +wA=b._emscripten_enum_PHY_ScalarType_PHY_INTEGER=function(){return(wA=b._emscripten_enum_PHY_ScalarType_PHY_INTEGER=b.asm.$x).apply(null,arguments)},xA=b._emscripten_enum_PHY_ScalarType_PHY_SHORT=function(){return(xA=b._emscripten_enum_PHY_ScalarType_PHY_SHORT=b.asm.ay).apply(null,arguments)},yA=b._emscripten_enum_PHY_ScalarType_PHY_FIXEDPOINT88=function(){return(yA=b._emscripten_enum_PHY_ScalarType_PHY_FIXEDPOINT88=b.asm.by).apply(null,arguments)},zA=b._emscripten_enum_PHY_ScalarType_PHY_UCHAR=function(){return(zA= +b._emscripten_enum_PHY_ScalarType_PHY_UCHAR=b.asm.cy).apply(null,arguments)};b._malloc=function(){return(b._malloc=b.asm.dy).apply(null,arguments)};b._free=function(){return(b._free=b.asm.ey).apply(null,arguments)};b.dynCall_vi=function(){return(b.dynCall_vi=b.asm.fy).apply(null,arguments)};b.dynCall_v=function(){return(b.dynCall_v=b.asm.gy).apply(null,arguments)}; +b.UTF8ToString=function(a,c){if(a){var d=a+c;for(c=a;za[c]&&!(c>=d);)++c;if(16e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023))}}else d+=String.fromCharCode(e)}a=d}}else a="";return a};var AA; +Oa=function BA(){AA||CA();AA||(Oa=BA)}; +function CA(){function a(){if(!AA&&(AA=!0,b.calledRun=!0,!va)){Ka=!0;Fa(Ha);Fa(Ia);ba(b);if(b.onRuntimeInitialized)b.onRuntimeInitialized();if(b.postRun)for("function"==typeof b.postRun&&(b.postRun=[b.postRun]);b.postRun.length;){var c=b.postRun.shift();Ja.unshift(c)}Fa(Ja)}}if(!(0=EA?(assert(0>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var e=0;e=e&&(e=65536+((e&1023)<<10)|a.charCodeAt(++d)&1023);127>=e?++c:c=2047>=e?c+2:65535>=e?c+3:c+4}c=Array(c+1);e=c.length;d=0;if(0=n){var F=a.charCodeAt(++g);n=65536+((n&1023)<<10)|F&1023}if(127>=n){if(d>=e)break;c[d++]=n}else{if(2047>=n){if(d+1>=e)break;c[d++]=192|n>>6}else{if(65535>=n){if(d+2>=e)break;c[d++]=224| +n>>12}else{if(d+3>=e)break;c[d++]=240|n>>18;c[d++]=128|n>>12&63}c[d++]=128|n>>6&63}c[d++]=128|n&63}}c[d]=0}a=JA(c,ya);KA(c,ya,a)}return a}function MA(a){if("object"===typeof a){var c=JA(a,Ba);KA(a,Ba,c);return c}return a}function NA(){throw"cannot construct a btCollisionWorld, no constructor in IDL";}NA.prototype=Object.create(f.prototype);NA.prototype.constructor=NA;NA.prototype.iy=NA;NA.jy={};b.btCollisionWorld=NA;NA.prototype.getDispatcher=function(){return k($a(this.hy),OA)}; +NA.prototype.rayTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);ab(e,a,c,d)};NA.prototype.getPairCache=function(){return k(bb(this.hy),PA)};NA.prototype.getDispatchInfo=function(){return k(cb(this.hy),l)}; +NA.prototype.addCollisionObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?db(e,a):void 0===d?eb(e,a,c):fb(e,a,c,d)};NA.prototype.removeCollisionObject=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gb(c,a)};NA.prototype.getBroadphase=function(){return k(hb(this.hy),QA)}; +NA.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);ib(n,a,c,d,e,g)};NA.prototype.contactPairTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);jb(e,a,c,d)}; +NA.prototype.contactTest=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);kb(d,a,c)};NA.prototype.updateSingleAabb=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lb(c,a)};NA.prototype.setDebugDrawer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mb(c,a)};NA.prototype.getDebugDrawer=function(){return k(nb(this.hy),RA)};NA.prototype.debugDrawWorld=function(){ob(this.hy)}; +NA.prototype.debugDrawObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);pb(e,a,c,d)};NA.prototype.__destroy__=function(){qb(this.hy)};function m(){throw"cannot construct a btCollisionShape, no constructor in IDL";}m.prototype=Object.create(f.prototype);m.prototype.constructor=m;m.prototype.iy=m;m.jy={};b.btCollisionShape=m; +m.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);rb(c,a)};m.prototype.getLocalScaling=function(){return k(sb(this.hy),p)};m.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);tb(d,a,c)};m.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ub(c,a)};m.prototype.getMargin=function(){return vb(this.hy)};m.prototype.__destroy__=function(){wb(this.hy)}; +function q(){throw"cannot construct a btCollisionObject, no constructor in IDL";}q.prototype=Object.create(f.prototype);q.prototype.constructor=q;q.prototype.iy=q;q.jy={};b.btCollisionObject=q;q.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);xb(d,a,c)};q.prototype.getCollisionShape=function(){return k(yb(this.hy),m)}; +q.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);zb(c,a)};q.prototype.setActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ab(c,a)};q.prototype.forceActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Bb(c,a)};q.prototype.activate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);void 0===a?Cb(c):Db(c,a)};q.prototype.isActive=function(){return!!Eb(this.hy)};q.prototype.isKinematicObject=function(){return!!Fb(this.hy)}; +q.prototype.isStaticObject=function(){return!!Gb(this.hy)};q.prototype.isStaticOrKinematicObject=function(){return!!Hb(this.hy)};q.prototype.getRestitution=function(){return Ib(this.hy)};q.prototype.getFriction=function(){return Jb(this.hy)};q.prototype.getRollingFriction=function(){return Kb(this.hy)};q.prototype.setRestitution=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lb(c,a)};q.prototype.setFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Mb(c,a)}; +q.prototype.setRollingFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nb(c,a)};q.prototype.getWorldTransform=function(){return k(Ob(this.hy),r)};q.prototype.getCollisionFlags=function(){return Pb(this.hy)};q.prototype.setCollisionFlags=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qb(c,a)};q.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sb(c,a)}; +q.prototype.setCollisionShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tb(c,a)};q.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ub(c,a)};q.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vb(c,a)};q.prototype.getUserIndex=function(){return Wb(this.hy)};q.prototype.setUserIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xb(c,a)}; +q.prototype.getUserPointer=function(){return k(Yb(this.hy),SA)};q.prototype.setUserPointer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Zb(c,a)};q.prototype.getBroadphaseHandle=function(){return k($b(this.hy),t)};q.prototype.__destroy__=function(){ac(this.hy)};function u(){throw"cannot construct a btDynamicsWorld, no constructor in IDL";}u.prototype=Object.create(NA.prototype);u.prototype.constructor=u;u.prototype.iy=u;u.jy={};b.btDynamicsWorld=u; +u.prototype.addAction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);bc(c,a)};u.prototype.removeAction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);cc(c,a)};u.prototype.getSolverInfo=function(){return k(dc(this.hy),v)};u.prototype.setInternalTickCallback=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?ec(e,a):void 0===d?fc(e,a,c):hc(e,a,c,d)}; +u.prototype.getDispatcher=function(){return k(ic(this.hy),OA)};u.prototype.rayTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);jc(e,a,c,d)};u.prototype.getPairCache=function(){return k(kc(this.hy),PA)};u.prototype.getDispatchInfo=function(){return k(lc(this.hy),l)}; +u.prototype.addCollisionObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?mc(e,a):void 0===d?nc(e,a,c):oc(e,a,c,d)};u.prototype.removeCollisionObject=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pc(c,a)};u.prototype.getBroadphase=function(){return k(qc(this.hy),QA)}; +u.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);rc(n,a,c,d,e,g)};u.prototype.contactPairTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);sc(e,a,c,d)}; +u.prototype.contactTest=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);tc(d,a,c)};u.prototype.updateSingleAabb=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);uc(c,a)};u.prototype.setDebugDrawer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);vc(c,a)};u.prototype.getDebugDrawer=function(){return k(wc(this.hy),RA)};u.prototype.debugDrawWorld=function(){xc(this.hy)}; +u.prototype.debugDrawObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);yc(e,a,c,d)};u.prototype.__destroy__=function(){zc(this.hy)};function TA(){throw"cannot construct a btTypedConstraint, no constructor in IDL";}TA.prototype=Object.create(f.prototype);TA.prototype.constructor=TA;TA.prototype.iy=TA;TA.jy={};b.btTypedConstraint=TA; +TA.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ac(c,a)};TA.prototype.getBreakingImpulseThreshold=function(){return Bc(this.hy)};TA.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cc(c,a)};TA.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return Dc(d,a,c)}; +TA.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Ec(e,a,c,d)};TA.prototype.__destroy__=function(){Fc(this.hy)};function UA(){throw"cannot construct a btConcaveShape, no constructor in IDL";}UA.prototype=Object.create(m.prototype);UA.prototype.constructor=UA;UA.prototype.iy=UA;UA.jy={};b.btConcaveShape=UA; +UA.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gc(c,a)};UA.prototype.getLocalScaling=function(){return k(Hc(this.hy),p)};UA.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ic(d,a,c)};UA.prototype.__destroy__=function(){Jc(this.hy)};function VA(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=Kc(a,c);h(VA)[this.hy]=this}VA.prototype=Object.create(m.prototype); +VA.prototype.constructor=VA;VA.prototype.iy=VA;VA.jy={};b.btCapsuleShape=VA;VA.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lc(c,a)};VA.prototype.getMargin=function(){return Mc(this.hy)};VA.prototype.getUpAxis=function(){return Nc(this.hy)};VA.prototype.getRadius=function(){return Oc(this.hy)};VA.prototype.getHalfHeight=function(){return Pc(this.hy)};VA.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qc(c,a)}; +VA.prototype.getLocalScaling=function(){return k(Rc(this.hy),p)};VA.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Sc(d,a,c)};VA.prototype.__destroy__=function(){Tc(this.hy)};function RA(){throw"cannot construct a btIDebugDraw, no constructor in IDL";}RA.prototype=Object.create(f.prototype);RA.prototype.constructor=RA;RA.prototype.iy=RA;RA.jy={};b.btIDebugDraw=RA; +RA.prototype.drawLine=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Uc(e,a,c,d)};RA.prototype.drawContactPoint=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);Vc(n,a,c,d,e,g)}; +RA.prototype.reportErrorWarning=function(a){var c=this.hy;IA();a=a&&"object"===typeof a?a.hy:LA(a);Wc(c,a)};RA.prototype.draw3dText=function(a,c){var d=this.hy;IA();a&&"object"===typeof a&&(a=a.hy);c=c&&"object"===typeof c?c.hy:LA(c);Xc(d,a,c)};RA.prototype.setDebugMode=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yc(c,a)};RA.prototype.getDebugMode=function(){return Zc(this.hy)};RA.prototype.__destroy__=function(){$c(this.hy)}; +function WA(a){a&&"object"===typeof a&&(a=a.hy);this.hy=void 0===a?ad():bd(a);h(WA)[this.hy]=this}WA.prototype=Object.create(f.prototype);WA.prototype.constructor=WA;WA.prototype.iy=WA;WA.jy={};b.btDefaultCollisionConfiguration=WA;WA.prototype.__destroy__=function(){cd(this.hy)};function XA(){throw"cannot construct a btTriangleMeshShape, no constructor in IDL";}XA.prototype=Object.create(UA.prototype);XA.prototype.constructor=XA;XA.prototype.iy=XA;XA.jy={};b.btTriangleMeshShape=XA; +XA.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dd(c,a)};XA.prototype.getLocalScaling=function(){return k(ed(this.hy),p)};XA.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);fd(d,a,c)};XA.prototype.__destroy__=function(){gd(this.hy)};function w(){this.hy=hd();h(w)[this.hy]=this}w.prototype=Object.create(q.prototype);w.prototype.constructor=w;w.prototype.iy=w;w.jy={}; +b.btGhostObject=w;w.prototype.getNumOverlappingObjects=function(){return id(this.hy)};w.prototype.getOverlappingObject=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(jd(c,a),q)};w.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);kd(d,a,c)};w.prototype.getCollisionShape=function(){return k(ld(this.hy),m)}; +w.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);md(c,a)};w.prototype.setActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nd(c,a)};w.prototype.forceActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);od(c,a)};w.prototype.activate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);void 0===a?pd(c):qd(c,a)};w.prototype.isActive=function(){return!!rd(this.hy)};w.prototype.isKinematicObject=function(){return!!sd(this.hy)}; +w.prototype.isStaticObject=function(){return!!td(this.hy)};w.prototype.isStaticOrKinematicObject=function(){return!!ud(this.hy)};w.prototype.getRestitution=function(){return vd(this.hy)};w.prototype.getFriction=function(){return wd(this.hy)};w.prototype.getRollingFriction=function(){return xd(this.hy)};w.prototype.setRestitution=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yd(c,a)};w.prototype.setFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);zd(c,a)}; +w.prototype.setRollingFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ad(c,a)};w.prototype.getWorldTransform=function(){return k(Bd(this.hy),r)};w.prototype.getCollisionFlags=function(){return Cd(this.hy)};w.prototype.setCollisionFlags=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Dd(c,a)};w.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ed(c,a)}; +w.prototype.setCollisionShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Fd(c,a)};w.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gd(c,a)};w.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Hd(c,a)};w.prototype.getUserIndex=function(){return Id(this.hy)};w.prototype.setUserIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Jd(c,a)}; +w.prototype.getUserPointer=function(){return k(Kd(this.hy),SA)};w.prototype.setUserPointer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ld(c,a)};w.prototype.getBroadphaseHandle=function(){return k(Md(this.hy),t)};w.prototype.__destroy__=function(){Nd(this.hy)};function YA(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=Od(a,c);h(YA)[this.hy]=this}YA.prototype=Object.create(m.prototype);YA.prototype.constructor=YA;YA.prototype.iy=YA;YA.jy={}; +b.btConeShape=YA;YA.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pd(c,a)};YA.prototype.getLocalScaling=function(){return k(Qd(this.hy),p)};YA.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Rd(d,a,c)};YA.prototype.__destroy__=function(){Sd(this.hy)};function ZA(){throw"cannot construct a btActionInterface, no constructor in IDL";}ZA.prototype=Object.create(f.prototype); +ZA.prototype.constructor=ZA;ZA.prototype.iy=ZA;ZA.jy={};b.btActionInterface=ZA;ZA.prototype.updateAction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Td(d,a,c)};ZA.prototype.__destroy__=function(){Ud(this.hy)}; +function p(a,c,d){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);this.hy=void 0===a?Vd():void 0===c?_emscripten_bind_btVector3_btVector3_1(a):void 0===d?_emscripten_bind_btVector3_btVector3_2(a,c):Wd(a,c,d);h(p)[this.hy]=this}p.prototype=Object.create(f.prototype);p.prototype.constructor=p;p.prototype.iy=p;p.jy={};b.btVector3=p;p.prototype.length=p.prototype.length=function(){return Xd(this.hy)};p.prototype.x=p.prototype.x=function(){return Yd(this.hy)}; +p.prototype.y=p.prototype.y=function(){return Zd(this.hy)};p.prototype.z=p.prototype.z=function(){return $d(this.hy)};p.prototype.setX=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ae(c,a)};p.prototype.setY=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);be(c,a)};p.prototype.setZ=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ce(c,a)}; +p.prototype.setValue=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);de(e,a,c,d)};p.prototype.normalize=p.prototype.normalize=function(){ee(this.hy)};p.prototype.rotate=p.prototype.rotate=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return k(fe(d,a,c),p)};p.prototype.dot=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return ge(c,a)}; +p.prototype.op_mul=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(he(c,a),p)};p.prototype.op_add=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(ie(c,a),p)};p.prototype.op_sub=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(je(c,a),p)};p.prototype.__destroy__=function(){ke(this.hy)};function $A(){throw"cannot construct a btVehicleRaycaster, no constructor in IDL";}$A.prototype=Object.create(f.prototype);$A.prototype.constructor=$A; +$A.prototype.iy=$A;$A.jy={};b.btVehicleRaycaster=$A;$A.prototype.castRay=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);le(e,a,c,d)};$A.prototype.__destroy__=function(){me(this.hy)};function aB(){throw"cannot construct a btQuadWord, no constructor in IDL";}aB.prototype=Object.create(f.prototype);aB.prototype.constructor=aB;aB.prototype.iy=aB;aB.jy={};b.btQuadWord=aB;aB.prototype.x=aB.prototype.x=function(){return ne(this.hy)}; +aB.prototype.y=aB.prototype.y=function(){return oe(this.hy)};aB.prototype.z=aB.prototype.z=function(){return pe(this.hy)};aB.prototype.w=function(){return qe(this.hy)};aB.prototype.setX=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);re(c,a)};aB.prototype.setY=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);se(c,a)};aB.prototype.setZ=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);te(c,a)}; +aB.prototype.setW=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ue(c,a)};aB.prototype.__destroy__=function(){ve(this.hy)};function bB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=we(a);h(bB)[this.hy]=this}bB.prototype=Object.create(m.prototype);bB.prototype.constructor=bB;bB.prototype.iy=bB;bB.jy={};b.btCylinderShape=bB;bB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);xe(c,a)};bB.prototype.getMargin=function(){return ye(this.hy)}; +bB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ze(c,a)};bB.prototype.getLocalScaling=function(){return k(Ae(this.hy),p)};bB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Be(d,a,c)};bB.prototype.__destroy__=function(){Ce(this.hy)}; +function x(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=De(a,c,d,e);h(x)[this.hy]=this}x.prototype=Object.create(u.prototype);x.prototype.constructor=x;x.prototype.iy=x;x.jy={};b.btDiscreteDynamicsWorld=x;x.prototype.setGravity=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ee(c,a)};x.prototype.getGravity=function(){return k(Fe(this.hy),p)}; +x.prototype.addRigidBody=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?Ge(e,a):void 0===d?_emscripten_bind_btDiscreteDynamicsWorld_addRigidBody_2(e,a,c):He(e,a,c,d)};x.prototype.removeRigidBody=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ie(c,a)}; +x.prototype.addConstraint=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);void 0===c?Je(d,a):Ke(d,a,c)};x.prototype.removeConstraint=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Le(c,a)};x.prototype.stepSimulation=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);return void 0===c?Me(e,a):void 0===d?Ne(e,a,c):Oe(e,a,c,d)}; +x.prototype.setContactAddedCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pe(c,a)};x.prototype.setContactProcessedCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qe(c,a)};x.prototype.setContactDestroyedCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Re(c,a)};x.prototype.getDispatcher=function(){return k(Se(this.hy),OA)}; +x.prototype.rayTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Te(e,a,c,d)};x.prototype.getPairCache=function(){return k(Ue(this.hy),PA)};x.prototype.getDispatchInfo=function(){return k(Ve(this.hy),l)};x.prototype.addCollisionObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?We(e,a):void 0===d?Xe(e,a,c):Ye(e,a,c,d)}; +x.prototype.removeCollisionObject=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ze(c,a)};x.prototype.getBroadphase=function(){return k($e(this.hy),QA)};x.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);af(n,a,c,d,e,g)}; +x.prototype.contactPairTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);bf(e,a,c,d)};x.prototype.contactTest=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);cf(d,a,c)};x.prototype.updateSingleAabb=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);df(c,a)};x.prototype.setDebugDrawer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ef(c,a)}; +x.prototype.getDebugDrawer=function(){return k(ff(this.hy),RA)};x.prototype.debugDrawWorld=function(){gf(this.hy)};x.prototype.debugDrawObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);hf(e,a,c,d)};x.prototype.addAction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jf(c,a)};x.prototype.removeAction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);kf(c,a)}; +x.prototype.getSolverInfo=function(){return k(lf(this.hy),v)};x.prototype.setInternalTickCallback=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?mf(e,a):void 0===d?nf(e,a,c):of(e,a,c,d)};x.prototype.__destroy__=function(){pf(this.hy)};function cB(){throw"cannot construct a btConvexShape, no constructor in IDL";}cB.prototype=Object.create(m.prototype);cB.prototype.constructor=cB;cB.prototype.iy=cB;cB.jy={}; +b.btConvexShape=cB;cB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qf(c,a)};cB.prototype.getLocalScaling=function(){return k(rf(this.hy),p)};cB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);sf(d,a,c)};cB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);tf(c,a)};cB.prototype.getMargin=function(){return uf(this.hy)};cB.prototype.__destroy__=function(){vf(this.hy)}; +function OA(){throw"cannot construct a btDispatcher, no constructor in IDL";}OA.prototype=Object.create(f.prototype);OA.prototype.constructor=OA;OA.prototype.iy=OA;OA.jy={};b.btDispatcher=OA;OA.prototype.getNumManifolds=function(){return wf(this.hy)};OA.prototype.getManifoldByIndexInternal=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(xf(c,a),dB)};OA.prototype.__destroy__=function(){yf(this.hy)}; +function eB(a,c,d,e,g){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);this.hy=void 0===e?zf(a,c,d):void 0===g?_emscripten_bind_btGeneric6DofConstraint_btGeneric6DofConstraint_4(a,c,d,e):Af(a,c,d,e,g);h(eB)[this.hy]=this}eB.prototype=Object.create(TA.prototype);eB.prototype.constructor=eB;eB.prototype.iy=eB;eB.jy={};b.btGeneric6DofConstraint=eB; +eB.prototype.setLinearLowerLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Bf(c,a)};eB.prototype.setLinearUpperLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cf(c,a)};eB.prototype.setAngularLowerLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Df(c,a)};eB.prototype.setAngularUpperLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ef(c,a)};eB.prototype.getFrameOffsetA=function(){return k(Ff(this.hy),r)}; +eB.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gf(c,a)};eB.prototype.getBreakingImpulseThreshold=function(){return Hf(this.hy)};eB.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);If(c,a)};eB.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return Jf(d,a,c)}; +eB.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Kf(e,a,c,d)};eB.prototype.__destroy__=function(){Lf(this.hy)};function fB(){throw"cannot construct a btStridingMeshInterface, no constructor in IDL";}fB.prototype=Object.create(f.prototype);fB.prototype.constructor=fB;fB.prototype.iy=fB;fB.jy={};b.btStridingMeshInterface=fB; +fB.prototype.setScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Mf(c,a)};fB.prototype.__destroy__=function(){Nf(this.hy)};function gB(){throw"cannot construct a btMotionState, no constructor in IDL";}gB.prototype=Object.create(f.prototype);gB.prototype.constructor=gB;gB.prototype.iy=gB;gB.jy={};b.btMotionState=gB;gB.prototype.getWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Of(c,a)}; +gB.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pf(c,a)};gB.prototype.__destroy__=function(){Qf(this.hy)};function y(){throw"cannot construct a ConvexResultCallback, no constructor in IDL";}y.prototype=Object.create(f.prototype);y.prototype.constructor=y;y.prototype.iy=y;y.jy={};b.ConvexResultCallback=y;y.prototype.hasHit=function(){return!!Rf(this.hy)};y.prototype.get_m_collisionFilterGroup=y.prototype.ky=function(){return Sf(this.hy)}; +y.prototype.set_m_collisionFilterGroup=y.prototype.my=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tf(c,a)};Object.defineProperty(y.prototype,"m_collisionFilterGroup",{get:y.prototype.ky,set:y.prototype.my});y.prototype.get_m_collisionFilterMask=y.prototype.ly=function(){return Uf(this.hy)};y.prototype.set_m_collisionFilterMask=y.prototype.ny=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vf(c,a)}; +Object.defineProperty(y.prototype,"m_collisionFilterMask",{get:y.prototype.ly,set:y.prototype.ny});y.prototype.get_m_closestHitFraction=y.prototype.oy=function(){return Wf(this.hy)};y.prototype.set_m_closestHitFraction=y.prototype.py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xf(c,a)};Object.defineProperty(y.prototype,"m_closestHitFraction",{get:y.prototype.oy,set:y.prototype.py});y.prototype.__destroy__=function(){Yf(this.hy)}; +function hB(){throw"cannot construct a ContactResultCallback, no constructor in IDL";}hB.prototype=Object.create(f.prototype);hB.prototype.constructor=hB;hB.prototype.iy=hB;hB.jy={};b.ContactResultCallback=hB; +hB.prototype.addSingleResult=function(a,c,d,e,g,n,F){var aa=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);return Zf(aa,a,c,d,e,g,n,F)};hB.prototype.__destroy__=function(){$f(this.hy)};function iB(){throw"cannot construct a btSoftBodySolver, no constructor in IDL";}iB.prototype=Object.create(f.prototype); +iB.prototype.constructor=iB;iB.prototype.iy=iB;iB.jy={};b.btSoftBodySolver=iB;iB.prototype.__destroy__=function(){ag(this.hy)};function z(){throw"cannot construct a RayResultCallback, no constructor in IDL";}z.prototype=Object.create(f.prototype);z.prototype.constructor=z;z.prototype.iy=z;z.jy={};b.RayResultCallback=z;z.prototype.hasHit=function(){return!!bg(this.hy)};z.prototype.get_m_collisionFilterGroup=z.prototype.ky=function(){return cg(this.hy)}; +z.prototype.set_m_collisionFilterGroup=z.prototype.my=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dg(c,a)};Object.defineProperty(z.prototype,"m_collisionFilterGroup",{get:z.prototype.ky,set:z.prototype.my});z.prototype.get_m_collisionFilterMask=z.prototype.ly=function(){return eg(this.hy)};z.prototype.set_m_collisionFilterMask=z.prototype.ny=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fg(c,a)}; +Object.defineProperty(z.prototype,"m_collisionFilterMask",{get:z.prototype.ly,set:z.prototype.ny});z.prototype.get_m_closestHitFraction=z.prototype.oy=function(){return gg(this.hy)};z.prototype.set_m_closestHitFraction=z.prototype.py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);hg(c,a)};Object.defineProperty(z.prototype,"m_closestHitFraction",{get:z.prototype.oy,set:z.prototype.py});z.prototype.get_m_collisionObject=z.prototype.qy=function(){return k(ig(this.hy),q)}; +z.prototype.set_m_collisionObject=z.prototype.xy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jg(c,a)};Object.defineProperty(z.prototype,"m_collisionObject",{get:z.prototype.qy,set:z.prototype.xy});z.prototype.__destroy__=function(){kg(this.hy)};function jB(){throw"cannot construct a btMatrix3x3, no constructor in IDL";}jB.prototype=Object.create(f.prototype);jB.prototype.constructor=jB;jB.prototype.iy=jB;jB.jy={};b.btMatrix3x3=jB; +jB.prototype.setEulerZYX=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);lg(e,a,c,d)};jB.prototype.getRotation=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mg(c,a)};jB.prototype.getRow=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(ng(c,a),p)};jB.prototype.__destroy__=function(){og(this.hy)};function kB(){throw"cannot construct a btScalarArray, no constructor in IDL";}kB.prototype=Object.create(f.prototype); +kB.prototype.constructor=kB;kB.prototype.iy=kB;kB.jy={};b.btScalarArray=kB;kB.prototype.size=kB.prototype.size=function(){return pg(this.hy)};kB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return qg(c,a)};kB.prototype.__destroy__=function(){rg(this.hy)};function A(){throw"cannot construct a Material, no constructor in IDL";}A.prototype=Object.create(f.prototype);A.prototype.constructor=A;A.prototype.iy=A;A.jy={};b.Material=A;A.prototype.get_m_kLST=A.prototype.vA=function(){return sg(this.hy)}; +A.prototype.set_m_kLST=A.prototype.bD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);tg(c,a)};Object.defineProperty(A.prototype,"m_kLST",{get:A.prototype.vA,set:A.prototype.bD});A.prototype.get_m_kAST=A.prototype.uA=function(){return ug(this.hy)};A.prototype.set_m_kAST=A.prototype.aD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);vg(c,a)};Object.defineProperty(A.prototype,"m_kAST",{get:A.prototype.uA,set:A.prototype.aD});A.prototype.get_m_kVST=A.prototype.wA=function(){return wg(this.hy)}; +A.prototype.set_m_kVST=A.prototype.cD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);xg(c,a)};Object.defineProperty(A.prototype,"m_kVST",{get:A.prototype.wA,set:A.prototype.cD});A.prototype.get_m_flags=A.prototype.cA=function(){return yg(this.hy)};A.prototype.set_m_flags=A.prototype.JC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);zg(c,a)};Object.defineProperty(A.prototype,"m_flags",{get:A.prototype.cA,set:A.prototype.JC});A.prototype.__destroy__=function(){Ag(this.hy)}; +function l(){throw"cannot construct a btDispatcherInfo, no constructor in IDL";}l.prototype=Object.create(f.prototype);l.prototype.constructor=l;l.prototype.iy=l;l.jy={};b.btDispatcherInfo=l;l.prototype.get_m_timeStep=l.prototype.jB=function(){return Bg(this.hy)};l.prototype.set_m_timeStep=l.prototype.QD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cg(c,a)};Object.defineProperty(l.prototype,"m_timeStep",{get:l.prototype.jB,set:l.prototype.QD}); +l.prototype.get_m_stepCount=l.prototype.aB=function(){return Dg(this.hy)};l.prototype.set_m_stepCount=l.prototype.HD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Eg(c,a)};Object.defineProperty(l.prototype,"m_stepCount",{get:l.prototype.aB,set:l.prototype.HD});l.prototype.get_m_dispatchFunc=l.prototype.Wz=function(){return Fg(this.hy)};l.prototype.set_m_dispatchFunc=l.prototype.CC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gg(c,a)}; +Object.defineProperty(l.prototype,"m_dispatchFunc",{get:l.prototype.Wz,set:l.prototype.CC});l.prototype.get_m_timeOfImpact=l.prototype.iB=function(){return Hg(this.hy)};l.prototype.set_m_timeOfImpact=l.prototype.PD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ig(c,a)};Object.defineProperty(l.prototype,"m_timeOfImpact",{get:l.prototype.iB,set:l.prototype.PD});l.prototype.get_m_useContinuous=l.prototype.lB=function(){return!!Jg(this.hy)}; +l.prototype.set_m_useContinuous=l.prototype.SD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Kg(c,a)};Object.defineProperty(l.prototype,"m_useContinuous",{get:l.prototype.lB,set:l.prototype.SD});l.prototype.get_m_enableSatConvex=l.prototype.$z=function(){return!!Lg(this.hy)};l.prototype.set_m_enableSatConvex=l.prototype.GC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Mg(c,a)};Object.defineProperty(l.prototype,"m_enableSatConvex",{get:l.prototype.$z,set:l.prototype.GC}); +l.prototype.get_m_enableSPU=l.prototype.Zz=function(){return!!Ng(this.hy)};l.prototype.set_m_enableSPU=l.prototype.FC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Og(c,a)};Object.defineProperty(l.prototype,"m_enableSPU",{get:l.prototype.Zz,set:l.prototype.FC});l.prototype.get_m_useEpa=l.prototype.nB=function(){return!!Pg(this.hy)};l.prototype.set_m_useEpa=l.prototype.UD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qg(c,a)}; +Object.defineProperty(l.prototype,"m_useEpa",{get:l.prototype.nB,set:l.prototype.UD});l.prototype.get_m_allowedCcdPenetration=l.prototype.zz=function(){return Rg(this.hy)};l.prototype.set_m_allowedCcdPenetration=l.prototype.fC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sg(c,a)};Object.defineProperty(l.prototype,"m_allowedCcdPenetration",{get:l.prototype.zz,set:l.prototype.fC});l.prototype.get_m_useConvexConservativeDistanceUtil=l.prototype.mB=function(){return!!Tg(this.hy)}; +l.prototype.set_m_useConvexConservativeDistanceUtil=l.prototype.TD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ug(c,a)};Object.defineProperty(l.prototype,"m_useConvexConservativeDistanceUtil",{get:l.prototype.mB,set:l.prototype.TD});l.prototype.get_m_convexConservativeDistanceThreshold=l.prototype.Rz=function(){return Vg(this.hy)};l.prototype.set_m_convexConservativeDistanceThreshold=l.prototype.xC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wg(c,a)}; +Object.defineProperty(l.prototype,"m_convexConservativeDistanceThreshold",{get:l.prototype.Rz,set:l.prototype.xC});l.prototype.__destroy__=function(){Xg(this.hy)};function B(){throw"cannot construct a btWheelInfoConstructionInfo, no constructor in IDL";}B.prototype=Object.create(f.prototype);B.prototype.constructor=B;B.prototype.iy=B;B.jy={};b.btWheelInfoConstructionInfo=B;B.prototype.get_m_chassisConnectionCS=B.prototype.Lz=function(){return k(Yg(this.hy),p)}; +B.prototype.set_m_chassisConnectionCS=B.prototype.rC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Zg(c,a)};Object.defineProperty(B.prototype,"m_chassisConnectionCS",{get:B.prototype.Lz,set:B.prototype.rC});B.prototype.get_m_wheelDirectionCS=B.prototype.Ly=function(){return k($g(this.hy),p)};B.prototype.set_m_wheelDirectionCS=B.prototype.Uy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ah(c,a)};Object.defineProperty(B.prototype,"m_wheelDirectionCS",{get:B.prototype.Ly,set:B.prototype.Uy}); +B.prototype.get_m_wheelAxleCS=B.prototype.Ky=function(){return k(bh(this.hy),p)};B.prototype.set_m_wheelAxleCS=B.prototype.Ty=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ch(c,a)};Object.defineProperty(B.prototype,"m_wheelAxleCS",{get:B.prototype.Ky,set:B.prototype.Ty});B.prototype.get_m_suspensionRestLength=B.prototype.fB=function(){return dh(this.hy)};B.prototype.set_m_suspensionRestLength=B.prototype.MD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);eh(c,a)}; +Object.defineProperty(B.prototype,"m_suspensionRestLength",{get:B.prototype.fB,set:B.prototype.MD});B.prototype.get_m_maxSuspensionTravelCm=B.prototype.vy=function(){return fh(this.hy)};B.prototype.set_m_maxSuspensionTravelCm=B.prototype.Cy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gh(c,a)};Object.defineProperty(B.prototype,"m_maxSuspensionTravelCm",{get:B.prototype.vy,set:B.prototype.Cy});B.prototype.get_m_wheelRadius=B.prototype.tB=function(){return hh(this.hy)}; +B.prototype.set_m_wheelRadius=B.prototype.$D=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ih(c,a)};Object.defineProperty(B.prototype,"m_wheelRadius",{get:B.prototype.tB,set:B.prototype.$D});B.prototype.get_m_suspensionStiffness=B.prototype.wy=function(){return jh(this.hy)};B.prototype.set_m_suspensionStiffness=B.prototype.Dy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);kh(c,a)};Object.defineProperty(B.prototype,"m_suspensionStiffness",{get:B.prototype.wy,set:B.prototype.Dy}); +B.prototype.get_m_wheelsDampingCompression=B.prototype.My=function(){return lh(this.hy)};B.prototype.set_m_wheelsDampingCompression=B.prototype.Vy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mh(c,a)};Object.defineProperty(B.prototype,"m_wheelsDampingCompression",{get:B.prototype.My,set:B.prototype.Vy});B.prototype.get_m_wheelsDampingRelaxation=B.prototype.Ny=function(){return nh(this.hy)}; +B.prototype.set_m_wheelsDampingRelaxation=B.prototype.Wy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);oh(c,a)};Object.defineProperty(B.prototype,"m_wheelsDampingRelaxation",{get:B.prototype.Ny,set:B.prototype.Wy});B.prototype.get_m_frictionSlip=B.prototype.ry=function(){return ph(this.hy)};B.prototype.set_m_frictionSlip=B.prototype.yy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qh(c,a)};Object.defineProperty(B.prototype,"m_frictionSlip",{get:B.prototype.ry,set:B.prototype.yy}); +B.prototype.get_m_maxSuspensionForce=B.prototype.uy=function(){return rh(this.hy)};B.prototype.set_m_maxSuspensionForce=B.prototype.By=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sh(c,a)};Object.defineProperty(B.prototype,"m_maxSuspensionForce",{get:B.prototype.uy,set:B.prototype.By});B.prototype.get_m_bIsFrontWheel=B.prototype.Fy=function(){return!!th(this.hy)};B.prototype.set_m_bIsFrontWheel=B.prototype.Oy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);uh(c,a)}; +Object.defineProperty(B.prototype,"m_bIsFrontWheel",{get:B.prototype.Fy,set:B.prototype.Oy});B.prototype.__destroy__=function(){vh(this.hy)};function lB(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=void 0===c?wh(a):xh(a,c);h(lB)[this.hy]=this}lB.prototype=Object.create(cB.prototype);lB.prototype.constructor=lB;lB.prototype.iy=lB;lB.jy={};b.btConvexTriangleMeshShape=lB;lB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yh(c,a)}; +lB.prototype.getLocalScaling=function(){return k(zh(this.hy),p)};lB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ah(d,a,c)};lB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Bh(c,a)};lB.prototype.getMargin=function(){return Ch(this.hy)};lB.prototype.__destroy__=function(){Dh(this.hy)};function QA(){throw"cannot construct a btBroadphaseInterface, no constructor in IDL";}QA.prototype=Object.create(f.prototype); +QA.prototype.constructor=QA;QA.prototype.iy=QA;QA.jy={};b.btBroadphaseInterface=QA;QA.prototype.getOverlappingPairCache=function(){return k(Eh(this.hy),PA)};QA.prototype.__destroy__=function(){Fh(this.hy)};function C(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=void 0===e?Gh(a,c,d):Hh(a,c,d,e);h(C)[this.hy]=this}C.prototype=Object.create(f.prototype);C.prototype.constructor=C;C.prototype.iy=C; +C.jy={};b.btRigidBodyConstructionInfo=C;C.prototype.get_m_linearDamping=C.prototype.xA=function(){return Ih(this.hy)};C.prototype.set_m_linearDamping=C.prototype.dD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Jh(c,a)};Object.defineProperty(C.prototype,"m_linearDamping",{get:C.prototype.xA,set:C.prototype.dD});C.prototype.get_m_angularDamping=C.prototype.Bz=function(){return Kh(this.hy)}; +C.prototype.set_m_angularDamping=C.prototype.hC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lh(c,a)};Object.defineProperty(C.prototype,"m_angularDamping",{get:C.prototype.Bz,set:C.prototype.hC});C.prototype.get_m_friction=C.prototype.dA=function(){return Mh(this.hy)};C.prototype.set_m_friction=C.prototype.KC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nh(c,a)};Object.defineProperty(C.prototype,"m_friction",{get:C.prototype.dA,set:C.prototype.KC}); +C.prototype.get_m_rollingFriction=C.prototype.TA=function(){return Oh(this.hy)};C.prototype.set_m_rollingFriction=C.prototype.zD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ph(c,a)};Object.defineProperty(C.prototype,"m_rollingFriction",{get:C.prototype.TA,set:C.prototype.zD});C.prototype.get_m_restitution=C.prototype.RA=function(){return Qh(this.hy)};C.prototype.set_m_restitution=C.prototype.xD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rh(c,a)}; +Object.defineProperty(C.prototype,"m_restitution",{get:C.prototype.RA,set:C.prototype.xD});C.prototype.get_m_linearSleepingThreshold=C.prototype.yA=function(){return Sh(this.hy)};C.prototype.set_m_linearSleepingThreshold=C.prototype.eD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Th(c,a)};Object.defineProperty(C.prototype,"m_linearSleepingThreshold",{get:C.prototype.yA,set:C.prototype.eD});C.prototype.get_m_angularSleepingThreshold=C.prototype.Cz=function(){return Uh(this.hy)}; +C.prototype.set_m_angularSleepingThreshold=C.prototype.iC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vh(c,a)};Object.defineProperty(C.prototype,"m_angularSleepingThreshold",{get:C.prototype.Cz,set:C.prototype.iC});C.prototype.get_m_additionalDamping=C.prototype.wz=function(){return!!Wh(this.hy)};C.prototype.set_m_additionalDamping=C.prototype.cC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xh(c,a)}; +Object.defineProperty(C.prototype,"m_additionalDamping",{get:C.prototype.wz,set:C.prototype.cC});C.prototype.get_m_additionalDampingFactor=C.prototype.xz=function(){return Yh(this.hy)};C.prototype.set_m_additionalDampingFactor=C.prototype.dC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Zh(c,a)};Object.defineProperty(C.prototype,"m_additionalDampingFactor",{get:C.prototype.xz,set:C.prototype.dC});C.prototype.get_m_additionalLinearDampingThresholdSqr=C.prototype.yz=function(){return $h(this.hy)}; +C.prototype.set_m_additionalLinearDampingThresholdSqr=C.prototype.eC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ai(c,a)};Object.defineProperty(C.prototype,"m_additionalLinearDampingThresholdSqr",{get:C.prototype.yz,set:C.prototype.eC});C.prototype.get_m_additionalAngularDampingThresholdSqr=C.prototype.vz=function(){return bi(this.hy)};C.prototype.set_m_additionalAngularDampingThresholdSqr=C.prototype.bC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ci(c,a)}; +Object.defineProperty(C.prototype,"m_additionalAngularDampingThresholdSqr",{get:C.prototype.vz,set:C.prototype.bC});C.prototype.get_m_additionalAngularDampingFactor=C.prototype.uz=function(){return di(this.hy)};C.prototype.set_m_additionalAngularDampingFactor=C.prototype.aC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ei(c,a)};Object.defineProperty(C.prototype,"m_additionalAngularDampingFactor",{get:C.prototype.uz,set:C.prototype.aC});C.prototype.__destroy__=function(){fi(this.hy)}; +function mB(){throw"cannot construct a btCollisionConfiguration, no constructor in IDL";}mB.prototype=Object.create(f.prototype);mB.prototype.constructor=mB;mB.prototype.iy=mB;mB.jy={};b.btCollisionConfiguration=mB;mB.prototype.__destroy__=function(){gi(this.hy)};function dB(){this.hy=hi();h(dB)[this.hy]=this}dB.prototype=Object.create(f.prototype);dB.prototype.constructor=dB;dB.prototype.iy=dB;dB.jy={};b.btPersistentManifold=dB;dB.prototype.getBody0=function(){return k(ii(this.hy),q)}; +dB.prototype.getBody1=function(){return k(ji(this.hy),q)};dB.prototype.getNumContacts=function(){return ki(this.hy)};dB.prototype.getContactPoint=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(li(c,a),D)};dB.prototype.__destroy__=function(){mi(this.hy)};function nB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=void 0===a?ni():oi(a);h(nB)[this.hy]=this}nB.prototype=Object.create(m.prototype);nB.prototype.constructor=nB;nB.prototype.iy=nB;nB.jy={};b.btCompoundShape=nB; +nB.prototype.addChildShape=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);pi(d,a,c)};nB.prototype.removeChildShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qi(c,a)};nB.prototype.removeChildShapeByIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ri(c,a)};nB.prototype.getNumChildShapes=function(){return si(this.hy)};nB.prototype.getChildShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(ti(c,a),m)}; +nB.prototype.updateChildTransform=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===d?ui(e,a,c):vi(e,a,c,d)};nB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);wi(c,a)};nB.prototype.getMargin=function(){return xi(this.hy)};nB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yi(c,a)};nB.prototype.getLocalScaling=function(){return k(zi(this.hy),p)}; +nB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ai(d,a,c)};nB.prototype.__destroy__=function(){Bi(this.hy)};function E(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=Ci(a,c);h(E)[this.hy]=this}E.prototype=Object.create(y.prototype);E.prototype.constructor=E;E.prototype.iy=E;E.jy={};b.ClosestConvexResultCallback=E;E.prototype.hasHit=function(){return!!Di(this.hy)}; +E.prototype.get_m_convexFromWorld=E.prototype.Sz=function(){return k(Ei(this.hy),p)};E.prototype.set_m_convexFromWorld=E.prototype.yC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Fi(c,a)};Object.defineProperty(E.prototype,"m_convexFromWorld",{get:E.prototype.Sz,set:E.prototype.yC});E.prototype.get_m_convexToWorld=E.prototype.Tz=function(){return k(Gi(this.hy),p)};E.prototype.set_m_convexToWorld=E.prototype.zC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Hi(c,a)}; +Object.defineProperty(E.prototype,"m_convexToWorld",{get:E.prototype.Tz,set:E.prototype.zC});E.prototype.get_m_hitNormalWorld=E.prototype.sy=function(){return k(Ii(this.hy),p)};E.prototype.set_m_hitNormalWorld=E.prototype.zy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ji(c,a)};Object.defineProperty(E.prototype,"m_hitNormalWorld",{get:E.prototype.sy,set:E.prototype.zy});E.prototype.get_m_hitPointWorld=E.prototype.ty=function(){return k(Ki(this.hy),p)}; +E.prototype.set_m_hitPointWorld=E.prototype.Ay=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Li(c,a)};Object.defineProperty(E.prototype,"m_hitPointWorld",{get:E.prototype.ty,set:E.prototype.Ay});E.prototype.get_m_collisionFilterGroup=E.prototype.ky=function(){return Mi(this.hy)};E.prototype.set_m_collisionFilterGroup=E.prototype.my=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ni(c,a)};Object.defineProperty(E.prototype,"m_collisionFilterGroup",{get:E.prototype.ky,set:E.prototype.my}); +E.prototype.get_m_collisionFilterMask=E.prototype.ly=function(){return Oi(this.hy)};E.prototype.set_m_collisionFilterMask=E.prototype.ny=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pi(c,a)};Object.defineProperty(E.prototype,"m_collisionFilterMask",{get:E.prototype.ly,set:E.prototype.ny});E.prototype.get_m_closestHitFraction=E.prototype.oy=function(){return Qi(this.hy)}; +E.prototype.set_m_closestHitFraction=E.prototype.py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ri(c,a)};Object.defineProperty(E.prototype,"m_closestHitFraction",{get:E.prototype.oy,set:E.prototype.py});E.prototype.__destroy__=function(){Si(this.hy)};function G(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=Ti(a,c);h(G)[this.hy]=this}G.prototype=Object.create(z.prototype);G.prototype.constructor=G;G.prototype.iy=G;G.jy={};b.AllHitsRayResultCallback=G; +G.prototype.hasHit=function(){return!!Ui(this.hy)};G.prototype.get_m_collisionObjects=G.prototype.Oz=function(){return k(Vi(this.hy),oB)};G.prototype.set_m_collisionObjects=G.prototype.uC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wi(c,a)};Object.defineProperty(G.prototype,"m_collisionObjects",{get:G.prototype.Oz,set:G.prototype.uC});G.prototype.get_m_rayFromWorld=G.prototype.Iy=function(){return k(Xi(this.hy),p)}; +G.prototype.set_m_rayFromWorld=G.prototype.Ry=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yi(c,a)};Object.defineProperty(G.prototype,"m_rayFromWorld",{get:G.prototype.Iy,set:G.prototype.Ry});G.prototype.get_m_rayToWorld=G.prototype.Jy=function(){return k(Zi(this.hy),p)};G.prototype.set_m_rayToWorld=G.prototype.Sy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$i(c,a)};Object.defineProperty(G.prototype,"m_rayToWorld",{get:G.prototype.Jy,set:G.prototype.Sy}); +G.prototype.get_m_hitNormalWorld=G.prototype.sy=function(){return k(aj(this.hy),pB)};G.prototype.set_m_hitNormalWorld=G.prototype.zy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);bj(c,a)};Object.defineProperty(G.prototype,"m_hitNormalWorld",{get:G.prototype.sy,set:G.prototype.zy});G.prototype.get_m_hitPointWorld=G.prototype.ty=function(){return k(cj(this.hy),pB)};G.prototype.set_m_hitPointWorld=G.prototype.Ay=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dj(c,a)}; +Object.defineProperty(G.prototype,"m_hitPointWorld",{get:G.prototype.ty,set:G.prototype.Ay});G.prototype.get_m_hitFractions=G.prototype.kA=function(){return k(ej(this.hy),kB)};G.prototype.set_m_hitFractions=G.prototype.RC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fj(c,a)};Object.defineProperty(G.prototype,"m_hitFractions",{get:G.prototype.kA,set:G.prototype.RC});G.prototype.get_m_collisionFilterGroup=G.prototype.ky=function(){return gj(this.hy)}; +G.prototype.set_m_collisionFilterGroup=G.prototype.my=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);hj(c,a)};Object.defineProperty(G.prototype,"m_collisionFilterGroup",{get:G.prototype.ky,set:G.prototype.my});G.prototype.get_m_collisionFilterMask=G.prototype.ly=function(){return ij(this.hy)};G.prototype.set_m_collisionFilterMask=G.prototype.ny=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jj(c,a)}; +Object.defineProperty(G.prototype,"m_collisionFilterMask",{get:G.prototype.ly,set:G.prototype.ny});G.prototype.get_m_closestHitFraction=G.prototype.oy=function(){return kj(this.hy)};G.prototype.set_m_closestHitFraction=G.prototype.py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lj(c,a)};Object.defineProperty(G.prototype,"m_closestHitFraction",{get:G.prototype.oy,set:G.prototype.py});G.prototype.get_m_collisionObject=G.prototype.qy=function(){return k(mj(this.hy),q)}; +G.prototype.set_m_collisionObject=G.prototype.xy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nj(c,a)};Object.defineProperty(G.prototype,"m_collisionObject",{get:G.prototype.qy,set:G.prototype.xy});G.prototype.__destroy__=function(){oj(this.hy)};function qB(){throw"cannot construct a tMaterialArray, no constructor in IDL";}qB.prototype=Object.create(f.prototype);qB.prototype.constructor=qB;qB.prototype.iy=qB;qB.jy={};b.tMaterialArray=qB;qB.prototype.size=qB.prototype.size=function(){return pj(this.hy)}; +qB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(qj(c,a),A)};qB.prototype.__destroy__=function(){rj(this.hy)};function rB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=sj(a);h(rB)[this.hy]=this}rB.prototype=Object.create($A.prototype);rB.prototype.constructor=rB;rB.prototype.iy=rB;rB.jy={};b.btDefaultVehicleRaycaster=rB; +rB.prototype.castRay=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);tj(e,a,c,d)};rB.prototype.__destroy__=function(){uj(this.hy)};function sB(){this.hy=vj();h(sB)[this.hy]=this}sB.prototype=Object.create(UA.prototype);sB.prototype.constructor=sB;sB.prototype.iy=sB;sB.jy={};b.btEmptyShape=sB;sB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);wj(c,a)}; +sB.prototype.getLocalScaling=function(){return k(xj(this.hy),p)};sB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);yj(d,a,c)};sB.prototype.__destroy__=function(){zj(this.hy)};function H(){this.hy=Aj();h(H)[this.hy]=this}H.prototype=Object.create(f.prototype);H.prototype.constructor=H;H.prototype.iy=H;H.jy={};b.btConstraintSetting=H;H.prototype.get_m_tau=H.prototype.hB=function(){return Bj(this.hy)}; +H.prototype.set_m_tau=H.prototype.OD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cj(c,a)};Object.defineProperty(H.prototype,"m_tau",{get:H.prototype.hB,set:H.prototype.OD});H.prototype.get_m_damping=H.prototype.Uz=function(){return Dj(this.hy)};H.prototype.set_m_damping=H.prototype.AC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ej(c,a)};Object.defineProperty(H.prototype,"m_damping",{get:H.prototype.Uz,set:H.prototype.AC}); +H.prototype.get_m_impulseClamp=H.prototype.qA=function(){return Fj(this.hy)};H.prototype.set_m_impulseClamp=H.prototype.XC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gj(c,a)};Object.defineProperty(H.prototype,"m_impulseClamp",{get:H.prototype.qA,set:H.prototype.XC});H.prototype.__destroy__=function(){Hj(this.hy)};function tB(){throw"cannot construct a LocalShapeInfo, no constructor in IDL";}tB.prototype=Object.create(f.prototype);tB.prototype.constructor=tB;tB.prototype.iy=tB; +tB.jy={};b.LocalShapeInfo=tB;tB.prototype.get_m_shapePart=tB.prototype.WA=function(){return Ij(this.hy)};tB.prototype.set_m_shapePart=tB.prototype.CD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Jj(c,a)};Object.defineProperty(tB.prototype,"m_shapePart",{get:tB.prototype.WA,set:tB.prototype.CD});tB.prototype.get_m_triangleIndex=tB.prototype.kB=function(){return Kj(this.hy)}; +tB.prototype.set_m_triangleIndex=tB.prototype.RD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lj(c,a)};Object.defineProperty(tB.prototype,"m_triangleIndex",{get:tB.prototype.kB,set:tB.prototype.RD});tB.prototype.__destroy__=function(){Mj(this.hy)};function I(a){a&&"object"===typeof a&&(a=a.hy);this.hy=Nj(a);h(I)[this.hy]=this}I.prototype=Object.create(q.prototype);I.prototype.constructor=I;I.prototype.iy=I;I.jy={};b.btRigidBody=I; +I.prototype.getCenterOfMassTransform=function(){return k(Oj(this.hy),r)};I.prototype.setCenterOfMassTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pj(c,a)};I.prototype.setSleepingThresholds=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Qj(d,a,c)};I.prototype.getLinearDamping=function(){return Rj(this.hy)};I.prototype.getAngularDamping=function(){return Sj(this.hy)}; +I.prototype.setDamping=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Tj(d,a,c)};I.prototype.setMassProps=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Uj(d,a,c)};I.prototype.getLinearFactor=function(){return k(Vj(this.hy),p)};I.prototype.setLinearFactor=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wj(c,a)}; +I.prototype.applyTorque=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xj(c,a)};I.prototype.applyLocalTorque=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yj(c,a)};I.prototype.applyForce=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Zj(d,a,c)};I.prototype.applyCentralForce=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ak(c,a)}; +I.prototype.applyCentralLocalForce=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);bk(c,a)};I.prototype.applyTorqueImpulse=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ck(c,a)};I.prototype.applyImpulse=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);dk(d,a,c)};I.prototype.applyCentralImpulse=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ek(c,a)};I.prototype.updateInertiaTensor=function(){fk(this.hy)}; +I.prototype.getLinearVelocity=function(){return k(gk(this.hy),p)};I.prototype.getAngularVelocity=function(){return k(hk(this.hy),p)};I.prototype.setLinearVelocity=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ik(c,a)};I.prototype.setAngularVelocity=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jk(c,a)};I.prototype.getMotionState=function(){return k(kk(this.hy),gB)};I.prototype.setMotionState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lk(c,a)}; +I.prototype.getAngularFactor=function(){return k(mk(this.hy),p)};I.prototype.setAngularFactor=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nk(c,a)};I.prototype.upcast=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(ok(c,a),I)};I.prototype.getAabb=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);pk(d,a,c)};I.prototype.applyGravity=function(){qk(this.hy)};I.prototype.getGravity=function(){return k(rk(this.hy),p)}; +I.prototype.setGravity=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sk(c,a)};I.prototype.getBroadphaseProxy=function(){return k(tk(this.hy),t)};I.prototype.clearForces=function(){uk(this.hy)};I.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);vk(d,a,c)};I.prototype.getCollisionShape=function(){return k(wk(this.hy),m)}; +I.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);xk(c,a)};I.prototype.setActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yk(c,a)};I.prototype.forceActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);zk(c,a)};I.prototype.activate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);void 0===a?Ak(c):Bk(c,a)};I.prototype.isActive=function(){return!!Ck(this.hy)};I.prototype.isKinematicObject=function(){return!!Dk(this.hy)}; +I.prototype.isStaticObject=function(){return!!Ek(this.hy)};I.prototype.isStaticOrKinematicObject=function(){return!!Fk(this.hy)};I.prototype.getRestitution=function(){return Gk(this.hy)};I.prototype.getFriction=function(){return Hk(this.hy)};I.prototype.getRollingFriction=function(){return Ik(this.hy)};I.prototype.setRestitution=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Jk(c,a)};I.prototype.setFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Kk(c,a)}; +I.prototype.setRollingFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lk(c,a)};I.prototype.getWorldTransform=function(){return k(Mk(this.hy),r)};I.prototype.getCollisionFlags=function(){return Nk(this.hy)};I.prototype.setCollisionFlags=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ok(c,a)};I.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pk(c,a)}; +I.prototype.setCollisionShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qk(c,a)};I.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rk(c,a)};I.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sk(c,a)};I.prototype.getUserIndex=function(){return Tk(this.hy)};I.prototype.setUserIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Uk(c,a)}; +I.prototype.getUserPointer=function(){return k(Vk(this.hy),SA)};I.prototype.setUserPointer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wk(c,a)};I.prototype.getBroadphaseHandle=function(){return k(Xk(this.hy),t)};I.prototype.__destroy__=function(){Yk(this.hy)};function uB(){throw"cannot construct a btIndexedMeshArray, no constructor in IDL";}uB.prototype=Object.create(f.prototype);uB.prototype.constructor=uB;uB.prototype.iy=uB;uB.jy={};b.btIndexedMeshArray=uB; +uB.prototype.size=uB.prototype.size=function(){return Zk(this.hy)};uB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k($k(c,a),vB)};uB.prototype.__destroy__=function(){al(this.hy)};function wB(){this.hy=bl();h(wB)[this.hy]=this}wB.prototype=Object.create(f.prototype);wB.prototype.constructor=wB;wB.prototype.iy=wB;wB.jy={};b.btDbvtBroadphase=wB;wB.prototype.__destroy__=function(){cl(this.hy)}; +function xB(a,c,d,e,g,n,F,aa,ta){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);aa&&"object"===typeof aa&&(aa=aa.hy);ta&&"object"===typeof ta&&(ta=ta.hy);this.hy=dl(a,c,d,e,g,n,F,aa,ta);h(xB)[this.hy]=this}xB.prototype=Object.create(UA.prototype);xB.prototype.constructor=xB;xB.prototype.iy=xB;xB.jy={}; +b.btHeightfieldTerrainShape=xB;xB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);el(c,a)};xB.prototype.getMargin=function(){return fl(this.hy)};xB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gl(c,a)};xB.prototype.getLocalScaling=function(){return k(hl(this.hy),p)};xB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);il(d,a,c)}; +xB.prototype.__destroy__=function(){jl(this.hy)};function yB(){this.hy=kl();h(yB)[this.hy]=this}yB.prototype=Object.create(iB.prototype);yB.prototype.constructor=yB;yB.prototype.iy=yB;yB.jy={};b.btDefaultSoftBodySolver=yB;yB.prototype.__destroy__=function(){ll(this.hy)};function zB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=ml(a);h(zB)[this.hy]=this}zB.prototype=Object.create(OA.prototype);zB.prototype.constructor=zB;zB.prototype.iy=zB;zB.jy={};b.btCollisionDispatcher=zB; +zB.prototype.getNumManifolds=function(){return nl(this.hy)};zB.prototype.getManifoldByIndexInternal=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(ol(c,a),dB)};zB.prototype.__destroy__=function(){pl(this.hy)}; +function AB(a,c,d,e,g){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);this.hy=void 0===d?ql(a,c):void 0===e?rl(a,c,d):void 0===g?sl(a,c,d,e):tl(a,c,d,e,g);h(AB)[this.hy]=this}AB.prototype=Object.create(f.prototype);AB.prototype.constructor=AB;AB.prototype.iy=AB;AB.jy={};b.btAxisSweep3=AB;AB.prototype.__destroy__=function(){ul(this.hy)}; +function SA(){throw"cannot construct a VoidPtr, no constructor in IDL";}SA.prototype=Object.create(f.prototype);SA.prototype.constructor=SA;SA.prototype.iy=SA;SA.jy={};b.VoidPtr=SA;SA.prototype.__destroy__=function(){vl(this.hy)};function J(){this.hy=wl();h(J)[this.hy]=this}J.prototype=Object.create(f.prototype);J.prototype.constructor=J;J.prototype.iy=J;J.jy={};b.btSoftBodyWorldInfo=J;J.prototype.get_air_density=J.prototype.Yy=function(){return xl(this.hy)}; +J.prototype.set_air_density=J.prototype.FB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yl(c,a)};Object.defineProperty(J.prototype,"air_density",{get:J.prototype.Yy,set:J.prototype.FB});J.prototype.get_water_density=J.prototype.CB=function(){return zl(this.hy)};J.prototype.set_water_density=J.prototype.iE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Al(c,a)};Object.defineProperty(J.prototype,"water_density",{get:J.prototype.CB,set:J.prototype.iE}); +J.prototype.get_water_offset=J.prototype.EB=function(){return Bl(this.hy)};J.prototype.set_water_offset=J.prototype.kE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cl(c,a)};Object.defineProperty(J.prototype,"water_offset",{get:J.prototype.EB,set:J.prototype.kE});J.prototype.get_m_maxDisplacement=J.prototype.EA=function(){return Dl(this.hy)};J.prototype.set_m_maxDisplacement=J.prototype.kD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);El(c,a)}; +Object.defineProperty(J.prototype,"m_maxDisplacement",{get:J.prototype.EA,set:J.prototype.kD});J.prototype.get_water_normal=J.prototype.DB=function(){return k(Fl(this.hy),p)};J.prototype.set_water_normal=J.prototype.jE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gl(c,a)};Object.defineProperty(J.prototype,"water_normal",{get:J.prototype.DB,set:J.prototype.jE});J.prototype.get_m_broadphase=J.prototype.Gz=function(){return k(Hl(this.hy),QA)}; +J.prototype.set_m_broadphase=J.prototype.mC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Il(c,a)};Object.defineProperty(J.prototype,"m_broadphase",{get:J.prototype.Gz,set:J.prototype.mC});J.prototype.get_m_dispatcher=J.prototype.Xz=function(){return k(Jl(this.hy),OA)};J.prototype.set_m_dispatcher=J.prototype.DC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Kl(c,a)};Object.defineProperty(J.prototype,"m_dispatcher",{get:J.prototype.Xz,set:J.prototype.DC}); +J.prototype.get_m_gravity=J.prototype.fA=function(){return k(Ll(this.hy),p)};J.prototype.set_m_gravity=J.prototype.MC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ml(c,a)};Object.defineProperty(J.prototype,"m_gravity",{get:J.prototype.fA,set:J.prototype.MC});J.prototype.__destroy__=function(){Nl(this.hy)}; +function BB(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=void 0===d?Ol(a,c):void 0===e?_emscripten_bind_btConeTwistConstraint_btConeTwistConstraint_3(a,c,d):Pl(a,c,d,e);h(BB)[this.hy]=this}BB.prototype=Object.create(TA.prototype);BB.prototype.constructor=BB;BB.prototype.iy=BB;BB.jy={};b.btConeTwistConstraint=BB; +BB.prototype.setLimit=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ql(d,a,c)};BB.prototype.setAngularOnly=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rl(c,a)};BB.prototype.setDamping=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sl(c,a)};BB.prototype.enableMotor=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tl(c,a)}; +BB.prototype.setMaxMotorImpulse=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ul(c,a)};BB.prototype.setMaxMotorImpulseNormalized=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vl(c,a)};BB.prototype.setMotorTarget=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wl(c,a)};BB.prototype.setMotorTargetInConstraintSpace=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xl(c,a)}; +BB.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yl(c,a)};BB.prototype.getBreakingImpulseThreshold=function(){return Zl(this.hy)};BB.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$l(c,a)};BB.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return am(d,a,c)}; +BB.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);bm(e,a,c,d)};BB.prototype.__destroy__=function(){cm(this.hy)}; +function CB(a,c,d,e,g,n,F){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);this.hy=void 0===d?dm(a,c):void 0===e?em(a,c,d):void 0===g?fm(a,c,d,e):void 0===n?gm(a,c,d,e,g):void 0===F?hm(a,c,d,e,g,n):im(a,c,d,e,g,n,F);h(CB)[this.hy]=this}CB.prototype=Object.create(TA.prototype);CB.prototype.constructor=CB; +CB.prototype.iy=CB;CB.jy={};b.btHingeConstraint=CB;CB.prototype.setLimit=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);void 0===g?jm(n,a,c,d,e):km(n,a,c,d,e,g)};CB.prototype.enableAngularMotor=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);lm(e,a,c,d)}; +CB.prototype.setAngularOnly=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mm(c,a)};CB.prototype.enableMotor=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nm(c,a)};CB.prototype.setMaxMotorImpulse=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);om(c,a)};CB.prototype.setMotorTarget=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);pm(d,a,c)}; +CB.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qm(c,a)};CB.prototype.getBreakingImpulseThreshold=function(){return rm(this.hy)};CB.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sm(c,a)};CB.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return tm(d,a,c)}; +CB.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);um(e,a,c,d)};CB.prototype.__destroy__=function(){wm(this.hy)};function DB(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=xm(a,c);h(DB)[this.hy]=this}DB.prototype=Object.create(YA.prototype);DB.prototype.constructor=DB;DB.prototype.iy=DB;DB.jy={};b.btConeShapeZ=DB; +DB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ym(c,a)};DB.prototype.getLocalScaling=function(){return k(zm(this.hy),p)};DB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Am(d,a,c)};DB.prototype.__destroy__=function(){Bm(this.hy)};function EB(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=Cm(a,c);h(EB)[this.hy]=this}EB.prototype=Object.create(YA.prototype); +EB.prototype.constructor=EB;EB.prototype.iy=EB;EB.jy={};b.btConeShapeX=EB;EB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Dm(c,a)};EB.prototype.getLocalScaling=function(){return k(Em(this.hy),p)};EB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Fm(d,a,c)};EB.prototype.__destroy__=function(){Gm(this.hy)}; +function FB(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=void 0===a?Hm():void 0===c?Im(a):Jm(a,c);h(FB)[this.hy]=this}FB.prototype=Object.create(fB.prototype);FB.prototype.constructor=FB;FB.prototype.iy=FB;FB.jy={};b.btTriangleMesh=FB;FB.prototype.addTriangle=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);void 0===e?Km(g,a,c,d):Lm(g,a,c,d,e)}; +FB.prototype.findOrAddVertex=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return Mm(d,a,c)};FB.prototype.addIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nm(c,a)};FB.prototype.getIndexedMeshArray=function(){return k(Om(this.hy),uB)};FB.prototype.setScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pm(c,a)};FB.prototype.__destroy__=function(){Qm(this.hy)}; +function GB(a,c){IA();"object"==typeof a&&(a=MA(a));c&&"object"===typeof c&&(c=c.hy);this.hy=void 0===a?Rm():void 0===c?Sm(a):Tm(a,c);h(GB)[this.hy]=this}GB.prototype=Object.create(m.prototype);GB.prototype.constructor=GB;GB.prototype.iy=GB;GB.jy={};b.btConvexHullShape=GB;GB.prototype.addPoint=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);void 0===c?Um(d,a):Vm(d,a,c)}; +GB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wm(c,a)};GB.prototype.getMargin=function(){return Xm(this.hy)};GB.prototype.getNumVertices=function(){return Ym(this.hy)};GB.prototype.initializePolyhedralFeatures=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return!!Zm(c,a)};GB.prototype.recalcLocalAabb=function(){$m(this.hy)};GB.prototype.getConvexPolyhedron=function(){return k(an(this.hy),HB)}; +GB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);bn(c,a)};GB.prototype.getLocalScaling=function(){return k(cn(this.hy),p)};GB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);dn(d,a,c)};GB.prototype.__destroy__=function(){en(this.hy)};function K(){this.hy=fn();h(K)[this.hy]=this}K.prototype=Object.create(f.prototype);K.prototype.constructor=K;K.prototype.iy=K;K.jy={}; +b.btVehicleTuning=K;K.prototype.get_m_suspensionStiffness=K.prototype.wy=function(){return gn(this.hy)};K.prototype.set_m_suspensionStiffness=K.prototype.Dy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);hn(c,a)};Object.defineProperty(K.prototype,"m_suspensionStiffness",{get:K.prototype.wy,set:K.prototype.Dy});K.prototype.get_m_suspensionCompression=K.prototype.bB=function(){return jn(this.hy)}; +K.prototype.set_m_suspensionCompression=K.prototype.ID=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);kn(c,a)};Object.defineProperty(K.prototype,"m_suspensionCompression",{get:K.prototype.bB,set:K.prototype.ID});K.prototype.get_m_suspensionDamping=K.prototype.cB=function(){return ln(this.hy)};K.prototype.set_m_suspensionDamping=K.prototype.JD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mn(c,a)}; +Object.defineProperty(K.prototype,"m_suspensionDamping",{get:K.prototype.cB,set:K.prototype.JD});K.prototype.get_m_maxSuspensionTravelCm=K.prototype.vy=function(){return nn(this.hy)};K.prototype.set_m_maxSuspensionTravelCm=K.prototype.Cy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);on(c,a)};Object.defineProperty(K.prototype,"m_maxSuspensionTravelCm",{get:K.prototype.vy,set:K.prototype.Cy});K.prototype.get_m_frictionSlip=K.prototype.ry=function(){return pn(this.hy)}; +K.prototype.set_m_frictionSlip=K.prototype.yy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qn(c,a)};Object.defineProperty(K.prototype,"m_frictionSlip",{get:K.prototype.ry,set:K.prototype.yy});K.prototype.get_m_maxSuspensionForce=K.prototype.uy=function(){return rn(this.hy)};K.prototype.set_m_maxSuspensionForce=K.prototype.By=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sn(c,a)};Object.defineProperty(K.prototype,"m_maxSuspensionForce",{get:K.prototype.uy,set:K.prototype.By}); +function IB(){throw"cannot construct a btCollisionObjectWrapper, no constructor in IDL";}IB.prototype=Object.create(f.prototype);IB.prototype.constructor=IB;IB.prototype.iy=IB;IB.jy={};b.btCollisionObjectWrapper=IB;IB.prototype.getWorldTransform=function(){return k(tn(this.hy),r)};IB.prototype.getCollisionObject=function(){return k(un(this.hy),q)};IB.prototype.getCollisionShape=function(){return k(vn(this.hy),m)};function JB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=wn(a);h(JB)[this.hy]=this} +JB.prototype=Object.create(f.prototype);JB.prototype.constructor=JB;JB.prototype.iy=JB;JB.jy={};b.btShapeHull=JB;JB.prototype.buildHull=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return!!xn(c,a)};JB.prototype.numVertices=function(){return yn(this.hy)};JB.prototype.getVertexPointer=function(){return k(zn(this.hy),p)};JB.prototype.__destroy__=function(){An(this.hy)}; +function KB(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=void 0===a?Bn():void 0===c?Cn(a):Dn(a,c);h(KB)[this.hy]=this}KB.prototype=Object.create(gB.prototype);KB.prototype.constructor=KB;KB.prototype.iy=KB;KB.jy={};b.btDefaultMotionState=KB;KB.prototype.getWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);En(c,a)};KB.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Fn(c,a)}; +KB.prototype.get_m_graphicsWorldTrans=KB.prototype.eA=function(){return k(Gn(this.hy),r)};KB.prototype.set_m_graphicsWorldTrans=KB.prototype.LC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Hn(c,a)};Object.defineProperty(KB.prototype,"m_graphicsWorldTrans",{get:KB.prototype.eA,set:KB.prototype.LC});KB.prototype.__destroy__=function(){In(this.hy)};function L(a){a&&"object"===typeof a&&(a=a.hy);this.hy=Jn(a);h(L)[this.hy]=this}L.prototype=Object.create(f.prototype); +L.prototype.constructor=L;L.prototype.iy=L;L.jy={};b.btWheelInfo=L;L.prototype.getSuspensionRestLength=function(){return Kn(this.hy)};L.prototype.updateWheel=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ln(d,a,c)};L.prototype.get_m_suspensionStiffness=L.prototype.wy=function(){return Mn(this.hy)};L.prototype.set_m_suspensionStiffness=L.prototype.Dy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nn(c,a)}; +Object.defineProperty(L.prototype,"m_suspensionStiffness",{get:L.prototype.wy,set:L.prototype.Dy});L.prototype.get_m_frictionSlip=L.prototype.ry=function(){return On(this.hy)};L.prototype.set_m_frictionSlip=L.prototype.yy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pn(c,a)};Object.defineProperty(L.prototype,"m_frictionSlip",{get:L.prototype.ry,set:L.prototype.yy});L.prototype.get_m_engineForce=L.prototype.aA=function(){return Qn(this.hy)}; +L.prototype.set_m_engineForce=L.prototype.HC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rn(c,a)};Object.defineProperty(L.prototype,"m_engineForce",{get:L.prototype.aA,set:L.prototype.HC});L.prototype.get_m_rollInfluence=L.prototype.SA=function(){return Sn(this.hy)};L.prototype.set_m_rollInfluence=L.prototype.yD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tn(c,a)};Object.defineProperty(L.prototype,"m_rollInfluence",{get:L.prototype.SA,set:L.prototype.yD}); +L.prototype.get_m_suspensionRestLength1=L.prototype.gB=function(){return Un(this.hy)};L.prototype.set_m_suspensionRestLength1=L.prototype.ND=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vn(c,a)};Object.defineProperty(L.prototype,"m_suspensionRestLength1",{get:L.prototype.gB,set:L.prototype.ND});L.prototype.get_m_wheelsRadius=L.prototype.uB=function(){return Wn(this.hy)};L.prototype.set_m_wheelsRadius=L.prototype.aE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xn(c,a)}; +Object.defineProperty(L.prototype,"m_wheelsRadius",{get:L.prototype.uB,set:L.prototype.aE});L.prototype.get_m_wheelsDampingCompression=L.prototype.My=function(){return Yn(this.hy)};L.prototype.set_m_wheelsDampingCompression=L.prototype.Vy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Zn(c,a)};Object.defineProperty(L.prototype,"m_wheelsDampingCompression",{get:L.prototype.My,set:L.prototype.Vy});L.prototype.get_m_wheelsDampingRelaxation=L.prototype.Ny=function(){return $n(this.hy)}; +L.prototype.set_m_wheelsDampingRelaxation=L.prototype.Wy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ao(c,a)};Object.defineProperty(L.prototype,"m_wheelsDampingRelaxation",{get:L.prototype.Ny,set:L.prototype.Wy});L.prototype.get_m_steering=L.prototype.$A=function(){return bo(this.hy)};L.prototype.set_m_steering=L.prototype.GD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);co(c,a)};Object.defineProperty(L.prototype,"m_steering",{get:L.prototype.$A,set:L.prototype.GD}); +L.prototype.get_m_maxSuspensionForce=L.prototype.uy=function(){return eo(this.hy)};L.prototype.set_m_maxSuspensionForce=L.prototype.By=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fo(c,a)};Object.defineProperty(L.prototype,"m_maxSuspensionForce",{get:L.prototype.uy,set:L.prototype.By});L.prototype.get_m_maxSuspensionTravelCm=L.prototype.vy=function(){return go(this.hy)}; +L.prototype.set_m_maxSuspensionTravelCm=L.prototype.Cy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ho(c,a)};Object.defineProperty(L.prototype,"m_maxSuspensionTravelCm",{get:L.prototype.vy,set:L.prototype.Cy});L.prototype.get_m_wheelsSuspensionForce=L.prototype.vB=function(){return io(this.hy)};L.prototype.set_m_wheelsSuspensionForce=L.prototype.bE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jo(c,a)}; +Object.defineProperty(L.prototype,"m_wheelsSuspensionForce",{get:L.prototype.vB,set:L.prototype.bE});L.prototype.get_m_bIsFrontWheel=L.prototype.Fy=function(){return!!ko(this.hy)};L.prototype.set_m_bIsFrontWheel=L.prototype.Oy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lo(c,a)};Object.defineProperty(L.prototype,"m_bIsFrontWheel",{get:L.prototype.Fy,set:L.prototype.Oy});L.prototype.get_m_raycastInfo=L.prototype.QA=function(){return k(mo(this.hy),M)}; +L.prototype.set_m_raycastInfo=L.prototype.wD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);no(c,a)};Object.defineProperty(L.prototype,"m_raycastInfo",{get:L.prototype.QA,set:L.prototype.wD});L.prototype.get_m_chassisConnectionPointCS=L.prototype.Mz=function(){return k(oo(this.hy),p)};L.prototype.set_m_chassisConnectionPointCS=L.prototype.sC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);po(c,a)}; +Object.defineProperty(L.prototype,"m_chassisConnectionPointCS",{get:L.prototype.Mz,set:L.prototype.sC});L.prototype.get_m_worldTransform=L.prototype.wB=function(){return k(qo(this.hy),r)};L.prototype.set_m_worldTransform=L.prototype.cE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ro(c,a)};Object.defineProperty(L.prototype,"m_worldTransform",{get:L.prototype.wB,set:L.prototype.cE});L.prototype.get_m_wheelDirectionCS=L.prototype.Ly=function(){return k(so(this.hy),p)}; +L.prototype.set_m_wheelDirectionCS=L.prototype.Uy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);to(c,a)};Object.defineProperty(L.prototype,"m_wheelDirectionCS",{get:L.prototype.Ly,set:L.prototype.Uy});L.prototype.get_m_wheelAxleCS=L.prototype.Ky=function(){return k(uo(this.hy),p)};L.prototype.set_m_wheelAxleCS=L.prototype.Ty=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);vo(c,a)};Object.defineProperty(L.prototype,"m_wheelAxleCS",{get:L.prototype.Ky,set:L.prototype.Ty}); +L.prototype.get_m_rotation=L.prototype.UA=function(){return wo(this.hy)};L.prototype.set_m_rotation=L.prototype.AD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);xo(c,a)};Object.defineProperty(L.prototype,"m_rotation",{get:L.prototype.UA,set:L.prototype.AD});L.prototype.get_m_deltaRotation=L.prototype.Vz=function(){return yo(this.hy)};L.prototype.set_m_deltaRotation=L.prototype.BC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);zo(c,a)}; +Object.defineProperty(L.prototype,"m_deltaRotation",{get:L.prototype.Vz,set:L.prototype.BC});L.prototype.get_m_brake=L.prototype.Fz=function(){return Ao(this.hy)};L.prototype.set_m_brake=L.prototype.lC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Bo(c,a)};Object.defineProperty(L.prototype,"m_brake",{get:L.prototype.Fz,set:L.prototype.lC});L.prototype.get_m_clippedInvContactDotSuspension=L.prototype.Nz=function(){return Co(this.hy)}; +L.prototype.set_m_clippedInvContactDotSuspension=L.prototype.tC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Do(c,a)};Object.defineProperty(L.prototype,"m_clippedInvContactDotSuspension",{get:L.prototype.Nz,set:L.prototype.tC});L.prototype.get_m_suspensionRelativeVelocity=L.prototype.eB=function(){return Eo(this.hy)};L.prototype.set_m_suspensionRelativeVelocity=L.prototype.LD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Fo(c,a)}; +Object.defineProperty(L.prototype,"m_suspensionRelativeVelocity",{get:L.prototype.eB,set:L.prototype.LD});L.prototype.get_m_skidInfo=L.prototype.XA=function(){return Go(this.hy)};L.prototype.set_m_skidInfo=L.prototype.DD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ho(c,a)};Object.defineProperty(L.prototype,"m_skidInfo",{get:L.prototype.XA,set:L.prototype.DD});L.prototype.__destroy__=function(){Io(this.hy)}; +function N(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=void 0===a?Jo():void 0===c?_emscripten_bind_btVector4_btVector4_1(a):void 0===d?_emscripten_bind_btVector4_btVector4_2(a,c):void 0===e?_emscripten_bind_btVector4_btVector4_3(a,c,d):Ko(a,c,d,e);h(N)[this.hy]=this}N.prototype=Object.create(p.prototype);N.prototype.constructor=N;N.prototype.iy=N;N.jy={};b.btVector4=N;N.prototype.w=function(){return Lo(this.hy)}; +N.prototype.setValue=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);Mo(g,a,c,d,e)};N.prototype.length=N.prototype.length=function(){return No(this.hy)};N.prototype.x=N.prototype.x=function(){return Oo(this.hy)};N.prototype.y=N.prototype.y=function(){return Po(this.hy)};N.prototype.z=N.prototype.z=function(){return Qo(this.hy)}; +N.prototype.setX=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ro(c,a)};N.prototype.setY=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);So(c,a)};N.prototype.setZ=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);To(c,a)};N.prototype.normalize=N.prototype.normalize=function(){Uo(this.hy)};N.prototype.rotate=N.prototype.rotate=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return k(Vo(d,a,c),p)}; +N.prototype.dot=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return Wo(c,a)};N.prototype.op_mul=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Xo(c,a),p)};N.prototype.op_add=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Yo(c,a),p)};N.prototype.op_sub=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Zo(c,a),p)};N.prototype.__destroy__=function(){$o(this.hy)};function LB(){this.hy=ap();h(LB)[this.hy]=this}LB.prototype=Object.create(f.prototype); +LB.prototype.constructor=LB;LB.prototype.iy=LB;LB.jy={};b.btDefaultCollisionConstructionInfo=LB;LB.prototype.__destroy__=function(){bp(this.hy)};function O(){throw"cannot construct a Anchor, no constructor in IDL";}O.prototype=Object.create(f.prototype);O.prototype.constructor=O;O.prototype.iy=O;O.jy={};b.Anchor=O;O.prototype.get_m_node=O.prototype.FA=function(){return k(cp(this.hy),Node)};O.prototype.set_m_node=O.prototype.lD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dp(c,a)}; +Object.defineProperty(O.prototype,"m_node",{get:O.prototype.FA,set:O.prototype.lD});O.prototype.get_m_local=O.prototype.zA=function(){return k(ep(this.hy),p)};O.prototype.set_m_local=O.prototype.fD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fp(c,a)};Object.defineProperty(O.prototype,"m_local",{get:O.prototype.zA,set:O.prototype.fD});O.prototype.get_m_body=O.prototype.Ez=function(){return k(gp(this.hy),I)}; +O.prototype.set_m_body=O.prototype.kC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);hp(c,a)};Object.defineProperty(O.prototype,"m_body",{get:O.prototype.Ez,set:O.prototype.kC});O.prototype.get_m_influence=O.prototype.sA=function(){return ip(this.hy)};O.prototype.set_m_influence=O.prototype.ZC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jp(c,a)};Object.defineProperty(O.prototype,"m_influence",{get:O.prototype.sA,set:O.prototype.ZC}); +O.prototype.get_m_c0=O.prototype.Hz=function(){return k(kp(this.hy),jB)};O.prototype.set_m_c0=O.prototype.nC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lp(c,a)};Object.defineProperty(O.prototype,"m_c0",{get:O.prototype.Hz,set:O.prototype.nC});O.prototype.get_m_c1=O.prototype.Iz=function(){return k(mp(this.hy),p)};O.prototype.set_m_c1=O.prototype.oC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);np(c,a)};Object.defineProperty(O.prototype,"m_c1",{get:O.prototype.Iz,set:O.prototype.oC}); +O.prototype.get_m_c2=O.prototype.Jz=function(){return op(this.hy)};O.prototype.set_m_c2=O.prototype.pC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pp(c,a)};Object.defineProperty(O.prototype,"m_c2",{get:O.prototype.Jz,set:O.prototype.pC});O.prototype.__destroy__=function(){qp(this.hy)};function P(){throw"cannot construct a btVehicleRaycasterResult, no constructor in IDL";}P.prototype=Object.create(f.prototype);P.prototype.constructor=P;P.prototype.iy=P;P.jy={}; +b.btVehicleRaycasterResult=P;P.prototype.get_m_hitPointInWorld=P.prototype.nA=function(){return k(rp(this.hy),p)};P.prototype.set_m_hitPointInWorld=P.prototype.UC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sp(c,a)};Object.defineProperty(P.prototype,"m_hitPointInWorld",{get:P.prototype.nA,set:P.prototype.UC});P.prototype.get_m_hitNormalInWorld=P.prototype.lA=function(){return k(tp(this.hy),p)}; +P.prototype.set_m_hitNormalInWorld=P.prototype.SC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);up(c,a)};Object.defineProperty(P.prototype,"m_hitNormalInWorld",{get:P.prototype.lA,set:P.prototype.SC});P.prototype.get_m_distFraction=P.prototype.Yz=function(){return vp(this.hy)};P.prototype.set_m_distFraction=P.prototype.EC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);wp(c,a)};Object.defineProperty(P.prototype,"m_distFraction",{get:P.prototype.Yz,set:P.prototype.EC}); +P.prototype.__destroy__=function(){xp(this.hy)};function pB(){throw"cannot construct a btVector3Array, no constructor in IDL";}pB.prototype=Object.create(f.prototype);pB.prototype.constructor=pB;pB.prototype.iy=pB;pB.jy={};b.btVector3Array=pB;pB.prototype.size=pB.prototype.size=function(){return yp(this.hy)};pB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(zp(c,a),p)};pB.prototype.__destroy__=function(){Ap(this.hy)}; +function MB(){throw"cannot construct a btConstraintSolver, no constructor in IDL";}MB.prototype=Object.create(f.prototype);MB.prototype.constructor=MB;MB.prototype.iy=MB;MB.jy={};b.btConstraintSolver=MB;MB.prototype.__destroy__=function(){Bp(this.hy)};function Q(a,c,d){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);this.hy=Cp(a,c,d);h(Q)[this.hy]=this}Q.prototype=Object.create(ZA.prototype);Q.prototype.constructor=Q;Q.prototype.iy=Q;Q.jy={}; +b.btRaycastVehicle=Q;Q.prototype.applyEngineForce=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Dp(d,a,c)};Q.prototype.setSteeringValue=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ep(d,a,c)};Q.prototype.getWheelTransformWS=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Fp(c,a),r)}; +Q.prototype.updateWheelTransform=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Gp(d,a,c)};Q.prototype.addWheel=function(a,c,d,e,g,n,F){var aa=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);return k(Hp(aa,a,c,d,e,g,n,F),L)};Q.prototype.getNumWheels=function(){return Ip(this.hy)}; +Q.prototype.getRigidBody=function(){return k(Jp(this.hy),I)};Q.prototype.getWheelInfo=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Kp(c,a),L)};Q.prototype.setBrake=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Lp(d,a,c)};Q.prototype.setCoordinateSystem=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Mp(e,a,c,d)};Q.prototype.getCurrentSpeedKmHour=function(){return Np(this.hy)}; +Q.prototype.getChassisWorldTransform=function(){return k(Op(this.hy),r)};Q.prototype.rayCast=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return Pp(c,a)};Q.prototype.updateVehicle=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qp(c,a)};Q.prototype.resetSuspension=function(){Rp(this.hy)};Q.prototype.getSteeringValue=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return Sp(c,a)}; +Q.prototype.updateWheelTransformsWS=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);void 0===c?Tp(d,a):Up(d,a,c)};Q.prototype.setPitchControl=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vp(c,a)};Q.prototype.updateSuspension=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wp(c,a)};Q.prototype.updateFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xp(c,a)};Q.prototype.getRightAxis=function(){return Yp(this.hy)}; +Q.prototype.getUpAxis=function(){return Zp(this.hy)};Q.prototype.getForwardAxis=function(){return $p(this.hy)};Q.prototype.getForwardVector=function(){return k(aq(this.hy),p)};Q.prototype.getUserConstraintType=function(){return bq(this.hy)};Q.prototype.setUserConstraintType=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);cq(c,a)};Q.prototype.setUserConstraintId=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dq(c,a)};Q.prototype.getUserConstraintId=function(){return eq(this.hy)}; +Q.prototype.updateAction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);fq(d,a,c)};Q.prototype.__destroy__=function(){gq(this.hy)};function NB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=hq(a);h(NB)[this.hy]=this}NB.prototype=Object.create(bB.prototype);NB.prototype.constructor=NB;NB.prototype.iy=NB;NB.jy={};b.btCylinderShapeX=NB;NB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);iq(c,a)};NB.prototype.getMargin=function(){return jq(this.hy)}; +NB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);kq(c,a)};NB.prototype.getLocalScaling=function(){return k(lq(this.hy),p)};NB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);mq(d,a,c)};NB.prototype.__destroy__=function(){nq(this.hy)};function OB(a){a&&"object"===typeof a&&(a=a.hy);this.hy=oq(a);h(OB)[this.hy]=this}OB.prototype=Object.create(bB.prototype);OB.prototype.constructor=OB; +OB.prototype.iy=OB;OB.jy={};b.btCylinderShapeZ=OB;OB.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pq(c,a)};OB.prototype.getMargin=function(){return qq(this.hy)};OB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);rq(c,a)};OB.prototype.getLocalScaling=function(){return k(sq(this.hy),p)};OB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);tq(d,a,c)}; +OB.prototype.__destroy__=function(){uq(this.hy)};function HB(){throw"cannot construct a btConvexPolyhedron, no constructor in IDL";}HB.prototype=Object.create(f.prototype);HB.prototype.constructor=HB;HB.prototype.iy=HB;HB.jy={};b.btConvexPolyhedron=HB;HB.prototype.get_m_vertices=HB.prototype.qB=function(){return k(vq(this.hy),pB)};HB.prototype.set_m_vertices=HB.prototype.XD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);wq(c,a)}; +Object.defineProperty(HB.prototype,"m_vertices",{get:HB.prototype.qB,set:HB.prototype.XD});HB.prototype.get_m_faces=HB.prototype.Gy=function(){return k(xq(this.hy),PB)};HB.prototype.set_m_faces=HB.prototype.Py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yq(c,a)};Object.defineProperty(HB.prototype,"m_faces",{get:HB.prototype.Gy,set:HB.prototype.Py});HB.prototype.__destroy__=function(){zq(this.hy)};function QB(){this.hy=Aq();h(QB)[this.hy]=this}QB.prototype=Object.create(f.prototype); +QB.prototype.constructor=QB;QB.prototype.iy=QB;QB.jy={};b.btSequentialImpulseConstraintSolver=QB;QB.prototype.__destroy__=function(){Bq(this.hy)};function RB(){throw"cannot construct a tAnchorArray, no constructor in IDL";}RB.prototype=Object.create(f.prototype);RB.prototype.constructor=RB;RB.prototype.iy=RB;RB.jy={};b.tAnchorArray=RB;RB.prototype.size=RB.prototype.size=function(){return Cq(this.hy)};RB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Dq(c,a),O)}; +RB.prototype.clear=RB.prototype.clear=function(){Eq(this.hy)};RB.prototype.push_back=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Fq(c,a)};RB.prototype.pop_back=function(){Gq(this.hy)};RB.prototype.__destroy__=function(){Hq(this.hy)};function M(){throw"cannot construct a RaycastInfo, no constructor in IDL";}M.prototype=Object.create(f.prototype);M.prototype.constructor=M;M.prototype.iy=M;M.jy={};b.RaycastInfo=M; +M.prototype.get_m_contactNormalWS=M.prototype.Pz=function(){return k(Iq(this.hy),p)};M.prototype.set_m_contactNormalWS=M.prototype.vC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Jq(c,a)};Object.defineProperty(M.prototype,"m_contactNormalWS",{get:M.prototype.Pz,set:M.prototype.vC});M.prototype.get_m_contactPointWS=M.prototype.Qz=function(){return k(Kq(this.hy),p)};M.prototype.set_m_contactPointWS=M.prototype.wC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lq(c,a)}; +Object.defineProperty(M.prototype,"m_contactPointWS",{get:M.prototype.Qz,set:M.prototype.wC});M.prototype.get_m_suspensionLength=M.prototype.dB=function(){return Mq(this.hy)};M.prototype.set_m_suspensionLength=M.prototype.KD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nq(c,a)};Object.defineProperty(M.prototype,"m_suspensionLength",{get:M.prototype.dB,set:M.prototype.KD});M.prototype.get_m_hardPointWS=M.prototype.hA=function(){return k(Oq(this.hy),p)}; +M.prototype.set_m_hardPointWS=M.prototype.OC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pq(c,a)};Object.defineProperty(M.prototype,"m_hardPointWS",{get:M.prototype.hA,set:M.prototype.OC});M.prototype.get_m_wheelDirectionWS=M.prototype.sB=function(){return k(Qq(this.hy),p)};M.prototype.set_m_wheelDirectionWS=M.prototype.ZD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rq(c,a)};Object.defineProperty(M.prototype,"m_wheelDirectionWS",{get:M.prototype.sB,set:M.prototype.ZD}); +M.prototype.get_m_wheelAxleWS=M.prototype.rB=function(){return k(Sq(this.hy),p)};M.prototype.set_m_wheelAxleWS=M.prototype.YD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tq(c,a)};Object.defineProperty(M.prototype,"m_wheelAxleWS",{get:M.prototype.rB,set:M.prototype.YD});M.prototype.get_m_isInContact=M.prototype.tA=function(){return!!Uq(this.hy)};M.prototype.set_m_isInContact=M.prototype.$C=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vq(c,a)}; +Object.defineProperty(M.prototype,"m_isInContact",{get:M.prototype.tA,set:M.prototype.$C});M.prototype.get_m_groundObject=M.prototype.gA=function(){return Wq(this.hy)};M.prototype.set_m_groundObject=M.prototype.NC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xq(c,a)};Object.defineProperty(M.prototype,"m_groundObject",{get:M.prototype.gA,set:M.prototype.NC});M.prototype.__destroy__=function(){Yq(this.hy)}; +function SB(a,c,d){IA();a&&"object"===typeof a&&(a=a.hy);"object"==typeof c&&(c=MA(c));d&&"object"===typeof d&&(d=d.hy);this.hy=Zq(a,c,d);h(SB)[this.hy]=this}SB.prototype=Object.create(m.prototype);SB.prototype.constructor=SB;SB.prototype.iy=SB;SB.jy={};b.btMultiSphereShape=SB;SB.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$q(c,a)};SB.prototype.getLocalScaling=function(){return k(ar(this.hy),p)}; +SB.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);br(d,a,c)};SB.prototype.__destroy__=function(){cr(this.hy)};function R(a,c,d,e){IA();a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);"object"==typeof e&&(e=MA(e));this.hy=dr(a,c,d,e);h(R)[this.hy]=this}R.prototype=Object.create(q.prototype);R.prototype.constructor=R;R.prototype.iy=R;R.jy={};b.btSoftBody=R; +R.prototype.checkLink=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return!!er(d,a,c)};R.prototype.checkFace=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);return!!fr(e,a,c,d)};R.prototype.appendMaterial=function(){return k(gr(this.hy),A)};R.prototype.appendNode=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);hr(d,a,c)}; +R.prototype.appendLink=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);ir(g,a,c,d,e)};R.prototype.appendFace=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);jr(g,a,c,d,e)}; +R.prototype.appendTetra=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);kr(n,a,c,d,e,g)};R.prototype.appendAnchor=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);lr(g,a,c,d,e)}; +R.prototype.addForce=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);void 0===c?mr(d,a):nr(d,a,c)};R.prototype.addAeroForceToNode=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);or(d,a,c)};R.prototype.getTotalMass=function(){return pr(this.hy)};R.prototype.setTotalMass=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);qr(d,a,c)}; +R.prototype.setMass=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);rr(d,a,c)};R.prototype.transform=R.prototype.transform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sr(c,a)};R.prototype.translate=R.prototype.translate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);tr(c,a)};R.prototype.rotate=R.prototype.rotate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ur(c,a)}; +R.prototype.scale=R.prototype.scale=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);vr(c,a)};R.prototype.generateClusters=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return void 0===c?wr(d,a):xr(d,a,c)};R.prototype.generateBendingConstraints=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return yr(d,a,c)}; +R.prototype.upcast=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(zr(c,a),R)};R.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ar(d,a,c)};R.prototype.getCollisionShape=function(){return k(Br(this.hy),m)};R.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cr(c,a)}; +R.prototype.setActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Dr(c,a)};R.prototype.forceActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Er(c,a)};R.prototype.activate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);void 0===a?Fr(c):Gr(c,a)};R.prototype.isActive=function(){return!!Hr(this.hy)};R.prototype.isKinematicObject=function(){return!!Ir(this.hy)};R.prototype.isStaticObject=function(){return!!Jr(this.hy)}; +R.prototype.isStaticOrKinematicObject=function(){return!!Kr(this.hy)};R.prototype.getRestitution=function(){return Lr(this.hy)};R.prototype.getFriction=function(){return Mr(this.hy)};R.prototype.getRollingFriction=function(){return Nr(this.hy)};R.prototype.setRestitution=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Or(c,a)};R.prototype.setFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pr(c,a)}; +R.prototype.setRollingFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qr(c,a)};R.prototype.getWorldTransform=function(){return k(Rr(this.hy),r)};R.prototype.getCollisionFlags=function(){return Sr(this.hy)};R.prototype.setCollisionFlags=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tr(c,a)};R.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ur(c,a)}; +R.prototype.setCollisionShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vr(c,a)};R.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wr(c,a)};R.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Xr(c,a)};R.prototype.getUserIndex=function(){return Yr(this.hy)};R.prototype.setUserIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Zr(c,a)}; +R.prototype.getUserPointer=function(){return k($r(this.hy),SA)};R.prototype.setUserPointer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);as(c,a)};R.prototype.getBroadphaseHandle=function(){return k(bs(this.hy),t)};R.prototype.get_m_cfg=R.prototype.Kz=function(){return k(cs(this.hy),S)};R.prototype.set_m_cfg=R.prototype.qC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ds(c,a)};Object.defineProperty(R.prototype,"m_cfg",{get:R.prototype.Kz,set:R.prototype.qC}); +R.prototype.get_m_nodes=R.prototype.GA=function(){return k(es(this.hy),TB)};R.prototype.set_m_nodes=R.prototype.mD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gs(c,a)};Object.defineProperty(R.prototype,"m_nodes",{get:R.prototype.GA,set:R.prototype.mD});R.prototype.get_m_faces=R.prototype.Gy=function(){return k(hs(this.hy),UB)};R.prototype.set_m_faces=R.prototype.Py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);is(c,a)}; +Object.defineProperty(R.prototype,"m_faces",{get:R.prototype.Gy,set:R.prototype.Py});R.prototype.get_m_materials=R.prototype.DA=function(){return k(js(this.hy),qB)};R.prototype.set_m_materials=R.prototype.jD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ks(c,a)};Object.defineProperty(R.prototype,"m_materials",{get:R.prototype.DA,set:R.prototype.jD});R.prototype.get_m_anchors=R.prototype.Az=function(){return k(ls(this.hy),RB)}; +R.prototype.set_m_anchors=R.prototype.gC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ms(c,a)};Object.defineProperty(R.prototype,"m_anchors",{get:R.prototype.Az,set:R.prototype.gC});R.prototype.__destroy__=function(){ns(this.hy)};function VB(){throw"cannot construct a btIntArray, no constructor in IDL";}VB.prototype=Object.create(f.prototype);VB.prototype.constructor=VB;VB.prototype.iy=VB;VB.jy={};b.btIntArray=VB;VB.prototype.size=VB.prototype.size=function(){return ps(this.hy)}; +VB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return qs(c,a)};VB.prototype.__destroy__=function(){rs(this.hy)};function S(){throw"cannot construct a Config, no constructor in IDL";}S.prototype=Object.create(f.prototype);S.prototype.constructor=S;S.prototype.iy=S;S.jy={};b.Config=S;S.prototype.get_kVCF=S.prototype.sz=function(){return ss(this.hy)};S.prototype.set_kVCF=S.prototype.$B=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ts(c,a)}; +Object.defineProperty(S.prototype,"kVCF",{get:S.prototype.sz,set:S.prototype.$B});S.prototype.get_kDP=S.prototype.fz=function(){return us(this.hy)};S.prototype.set_kDP=S.prototype.NB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);vs(c,a)};Object.defineProperty(S.prototype,"kDP",{get:S.prototype.fz,set:S.prototype.NB});S.prototype.get_kDG=S.prototype.ez=function(){return xs(this.hy)};S.prototype.set_kDG=S.prototype.MB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ys(c,a)}; +Object.defineProperty(S.prototype,"kDG",{get:S.prototype.ez,set:S.prototype.MB});S.prototype.get_kLF=S.prototype.hz=function(){return zs(this.hy)};S.prototype.set_kLF=S.prototype.PB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);As(c,a)};Object.defineProperty(S.prototype,"kLF",{get:S.prototype.hz,set:S.prototype.PB});S.prototype.get_kPR=S.prototype.jz=function(){return Bs(this.hy)};S.prototype.set_kPR=S.prototype.RB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cs(c,a)}; +Object.defineProperty(S.prototype,"kPR",{get:S.prototype.jz,set:S.prototype.RB});S.prototype.get_kVC=S.prototype.rz=function(){return Ds(this.hy)};S.prototype.set_kVC=S.prototype.ZB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Es(c,a)};Object.defineProperty(S.prototype,"kVC",{get:S.prototype.rz,set:S.prototype.ZB});S.prototype.get_kDF=S.prototype.dz=function(){return Fs(this.hy)};S.prototype.set_kDF=S.prototype.LB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gs(c,a)}; +Object.defineProperty(S.prototype,"kDF",{get:S.prototype.dz,set:S.prototype.LB});S.prototype.get_kMT=S.prototype.iz=function(){return Hs(this.hy)};S.prototype.set_kMT=S.prototype.QB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Is(c,a)};Object.defineProperty(S.prototype,"kMT",{get:S.prototype.iz,set:S.prototype.QB});S.prototype.get_kCHR=S.prototype.cz=function(){return Js(this.hy)};S.prototype.set_kCHR=S.prototype.KB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ks(c,a)}; +Object.defineProperty(S.prototype,"kCHR",{get:S.prototype.cz,set:S.prototype.KB});S.prototype.get_kKHR=S.prototype.gz=function(){return Ls(this.hy)};S.prototype.set_kKHR=S.prototype.OB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ms(c,a)};Object.defineProperty(S.prototype,"kKHR",{get:S.prototype.gz,set:S.prototype.OB});S.prototype.get_kSHR=S.prototype.kz=function(){return Ns(this.hy)}; +S.prototype.set_kSHR=S.prototype.SB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Os(c,a)};Object.defineProperty(S.prototype,"kSHR",{get:S.prototype.kz,set:S.prototype.SB});S.prototype.get_kAHR=S.prototype.bz=function(){return Ps(this.hy)};S.prototype.set_kAHR=S.prototype.JB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qs(c,a)};Object.defineProperty(S.prototype,"kAHR",{get:S.prototype.bz,set:S.prototype.JB});S.prototype.get_kSRHR_CL=S.prototype.nz=function(){return Rs(this.hy)}; +S.prototype.set_kSRHR_CL=S.prototype.VB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ss(c,a)};Object.defineProperty(S.prototype,"kSRHR_CL",{get:S.prototype.nz,set:S.prototype.VB});S.prototype.get_kSKHR_CL=S.prototype.lz=function(){return Ts(this.hy)};S.prototype.set_kSKHR_CL=S.prototype.TB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Us(c,a)};Object.defineProperty(S.prototype,"kSKHR_CL",{get:S.prototype.lz,set:S.prototype.TB});S.prototype.get_kSSHR_CL=S.prototype.pz=function(){return Vs(this.hy)}; +S.prototype.set_kSSHR_CL=S.prototype.XB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ws(c,a)};Object.defineProperty(S.prototype,"kSSHR_CL",{get:S.prototype.pz,set:S.prototype.XB});S.prototype.get_kSR_SPLT_CL=S.prototype.oz=function(){return Xs(this.hy)};S.prototype.set_kSR_SPLT_CL=S.prototype.WB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ys(c,a)};Object.defineProperty(S.prototype,"kSR_SPLT_CL",{get:S.prototype.oz,set:S.prototype.WB}); +S.prototype.get_kSK_SPLT_CL=S.prototype.mz=function(){return Zs(this.hy)};S.prototype.set_kSK_SPLT_CL=S.prototype.UB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$s(c,a)};Object.defineProperty(S.prototype,"kSK_SPLT_CL",{get:S.prototype.mz,set:S.prototype.UB});S.prototype.get_kSS_SPLT_CL=S.prototype.qz=function(){return at(this.hy)};S.prototype.set_kSS_SPLT_CL=S.prototype.YB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);bt(c,a)}; +Object.defineProperty(S.prototype,"kSS_SPLT_CL",{get:S.prototype.qz,set:S.prototype.YB});S.prototype.get_maxvolume=S.prototype.yB=function(){return ct(this.hy)};S.prototype.set_maxvolume=S.prototype.eE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dt(c,a)};Object.defineProperty(S.prototype,"maxvolume",{get:S.prototype.yB,set:S.prototype.eE});S.prototype.get_timescale=S.prototype.AB=function(){return et(this.hy)}; +S.prototype.set_timescale=S.prototype.gE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ft(c,a)};Object.defineProperty(S.prototype,"timescale",{get:S.prototype.AB,set:S.prototype.gE});S.prototype.get_viterations=S.prototype.BB=function(){return gt(this.hy)};S.prototype.set_viterations=S.prototype.hE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ht(c,a)};Object.defineProperty(S.prototype,"viterations",{get:S.prototype.BB,set:S.prototype.hE}); +S.prototype.get_piterations=S.prototype.zB=function(){return it(this.hy)};S.prototype.set_piterations=S.prototype.fE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jt(c,a)};Object.defineProperty(S.prototype,"piterations",{get:S.prototype.zB,set:S.prototype.fE});S.prototype.get_diterations=S.prototype.az=function(){return kt(this.hy)};S.prototype.set_diterations=S.prototype.IB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lt(c,a)}; +Object.defineProperty(S.prototype,"diterations",{get:S.prototype.az,set:S.prototype.IB});S.prototype.get_citerations=S.prototype.Zy=function(){return mt(this.hy)};S.prototype.set_citerations=S.prototype.GB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nt(c,a)};Object.defineProperty(S.prototype,"citerations",{get:S.prototype.Zy,set:S.prototype.GB});S.prototype.get_collisions=S.prototype.$y=function(){return ot(this.hy)}; +S.prototype.set_collisions=S.prototype.HB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pt(c,a)};Object.defineProperty(S.prototype,"collisions",{get:S.prototype.$y,set:S.prototype.HB});S.prototype.__destroy__=function(){qt(this.hy)};function Node(){throw"cannot construct a Node, no constructor in IDL";}Node.prototype=Object.create(f.prototype);Node.prototype.constructor=Node;Node.prototype.iy=Node;Node.jy={};b.Node=Node; +Node.prototype.get_m_x=Node.prototype.xB=function(){return k(rt(this.hy),p)};Node.prototype.set_m_x=Node.prototype.dE=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);st(c,a)};Object.defineProperty(Node.prototype,"m_x",{get:Node.prototype.xB,set:Node.prototype.dE});Node.prototype.get_m_q=Node.prototype.OA=function(){return k(tt(this.hy),p)};Node.prototype.set_m_q=Node.prototype.uD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ut(c,a)}; +Object.defineProperty(Node.prototype,"m_q",{get:Node.prototype.OA,set:Node.prototype.uD});Node.prototype.get_m_v=Node.prototype.pB=function(){return k(vt(this.hy),p)};Node.prototype.set_m_v=Node.prototype.WD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);wt(c,a)};Object.defineProperty(Node.prototype,"m_v",{get:Node.prototype.pB,set:Node.prototype.WD});Node.prototype.get_m_f=Node.prototype.bA=function(){return k(xt(this.hy),p)}; +Node.prototype.set_m_f=Node.prototype.IC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yt(c,a)};Object.defineProperty(Node.prototype,"m_f",{get:Node.prototype.bA,set:Node.prototype.IC});Node.prototype.get_m_n=Node.prototype.Hy=function(){return k(zt(this.hy),p)};Node.prototype.set_m_n=Node.prototype.Qy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);At(c,a)};Object.defineProperty(Node.prototype,"m_n",{get:Node.prototype.Hy,set:Node.prototype.Qy}); +Node.prototype.get_m_im=Node.prototype.pA=function(){return Bt(this.hy)};Node.prototype.set_m_im=Node.prototype.WC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ct(c,a)};Object.defineProperty(Node.prototype,"m_im",{get:Node.prototype.pA,set:Node.prototype.WC});Node.prototype.get_m_area=Node.prototype.Dz=function(){return Dt(this.hy)};Node.prototype.set_m_area=Node.prototype.jC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Et(c,a)}; +Object.defineProperty(Node.prototype,"m_area",{get:Node.prototype.Dz,set:Node.prototype.jC});Node.prototype.__destroy__=function(){Ft(this.hy)};function WB(){this.hy=Gt();h(WB)[this.hy]=this}WB.prototype=Object.create(f.prototype);WB.prototype.constructor=WB;WB.prototype.iy=WB;WB.jy={};b.btGhostPairCallback=WB;WB.prototype.__destroy__=function(){Ht(this.hy)};function XB(){throw"cannot construct a btOverlappingPairCallback, no constructor in IDL";}XB.prototype=Object.create(f.prototype); +XB.prototype.constructor=XB;XB.prototype.iy=XB;XB.jy={};b.btOverlappingPairCallback=XB;XB.prototype.__destroy__=function(){It(this.hy)};function T(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=void 0===e?Jt(a,c,d):Kt(a,c,d,e);h(T)[this.hy]=this}T.prototype=Object.create(ZA.prototype);T.prototype.constructor=T;T.prototype.iy=T;T.jy={};b.btKinematicCharacterController=T; +T.prototype.setUpAxis=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Lt(c,a)};T.prototype.setWalkDirection=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Mt(c,a)};T.prototype.setVelocityForTimeInterval=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Nt(d,a,c)};T.prototype.warp=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ot(c,a)};T.prototype.preStep=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pt(c,a)}; +T.prototype.playerStep=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Qt(d,a,c)};T.prototype.setFallSpeed=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rt(c,a)};T.prototype.setJumpSpeed=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);St(c,a)};T.prototype.setMaxJumpHeight=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tt(c,a)};T.prototype.canJump=function(){return!!Ut(this.hy)};T.prototype.jump=function(){Vt(this.hy)}; +T.prototype.setGravity=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wt(c,a)};T.prototype.getGravity=function(){return Xt(this.hy)};T.prototype.setMaxSlope=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yt(c,a)};T.prototype.getMaxSlope=function(){return Zt(this.hy)};T.prototype.getGhostObject=function(){return k($t(this.hy),U)};T.prototype.setUseGhostSweepTest=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);au(c,a)};T.prototype.onGround=function(){return!!bu(this.hy)}; +T.prototype.setUpInterpolate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);cu(c,a)};T.prototype.updateAction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);du(d,a,c)};T.prototype.__destroy__=function(){eu(this.hy)};function YB(){throw"cannot construct a btSoftBodyArray, no constructor in IDL";}YB.prototype=Object.create(f.prototype);YB.prototype.constructor=YB;YB.prototype.iy=YB;YB.jy={};b.btSoftBodyArray=YB; +YB.prototype.size=YB.prototype.size=function(){return fu(this.hy)};YB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(gu(c,a),R)};YB.prototype.__destroy__=function(){hu(this.hy)};function PB(){throw"cannot construct a btFaceArray, no constructor in IDL";}PB.prototype=Object.create(f.prototype);PB.prototype.constructor=PB;PB.prototype.iy=PB;PB.jy={};b.btFaceArray=PB;PB.prototype.size=PB.prototype.size=function(){return iu(this.hy)}; +PB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(ju(c,a),ZB)};PB.prototype.__destroy__=function(){ku(this.hy)};function $B(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=lu(a,c);h($B)[this.hy]=this}$B.prototype=Object.create(UA.prototype);$B.prototype.constructor=$B;$B.prototype.iy=$B;$B.jy={};b.btStaticPlaneShape=$B;$B.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mu(c,a)}; +$B.prototype.getLocalScaling=function(){return k(nu(this.hy),p)};$B.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);ou(d,a,c)};$B.prototype.__destroy__=function(){pu(this.hy)};function PA(){throw"cannot construct a btOverlappingPairCache, no constructor in IDL";}PA.prototype=Object.create(f.prototype);PA.prototype.constructor=PA;PA.prototype.iy=PA;PA.jy={};b.btOverlappingPairCache=PA; +PA.prototype.setInternalGhostPairCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qu(c,a)};PA.prototype.getNumOverlappingPairs=function(){return ru(this.hy)};PA.prototype.__destroy__=function(){su(this.hy)};function vB(){throw"cannot construct a btIndexedMesh, no constructor in IDL";}vB.prototype=Object.create(f.prototype);vB.prototype.constructor=vB;vB.prototype.iy=vB;vB.jy={};b.btIndexedMesh=vB;vB.prototype.get_m_numTriangles=vB.prototype.KA=function(){return tu(this.hy)}; +vB.prototype.set_m_numTriangles=vB.prototype.qD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);uu(c,a)};Object.defineProperty(vB.prototype,"m_numTriangles",{get:vB.prototype.KA,set:vB.prototype.qD});vB.prototype.__destroy__=function(){vu(this.hy)};function V(a,c,d,e,g){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);this.hy=wu(a,c,d,e,g);h(V)[this.hy]=this}V.prototype=Object.create(x.prototype); +V.prototype.constructor=V;V.prototype.iy=V;V.jy={};b.btSoftRigidDynamicsWorld=V;V.prototype.addSoftBody=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);xu(e,a,c,d)};V.prototype.removeSoftBody=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yu(c,a)};V.prototype.removeCollisionObject=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);zu(c,a)};V.prototype.getWorldInfo=function(){return k(Au(this.hy),J)}; +V.prototype.getSoftBodyArray=function(){return k(Bu(this.hy),YB)};V.prototype.getDispatcher=function(){return k(Cu(this.hy),OA)};V.prototype.rayTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Du(e,a,c,d)};V.prototype.getPairCache=function(){return k(Eu(this.hy),PA)};V.prototype.getDispatchInfo=function(){return k(Fu(this.hy),l)}; +V.prototype.addCollisionObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?Gu(e,a):void 0===d?Hu(e,a,c):Iu(e,a,c,d)};V.prototype.getBroadphase=function(){return k(Ju(this.hy),QA)}; +V.prototype.convexSweepTest=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);Ku(n,a,c,d,e,g)};V.prototype.contactPairTest=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Lu(e,a,c,d)}; +V.prototype.contactTest=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Mu(d,a,c)};V.prototype.updateSingleAabb=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nu(c,a)};V.prototype.setDebugDrawer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ou(c,a)};V.prototype.getDebugDrawer=function(){return k(Pu(this.hy),RA)};V.prototype.debugDrawWorld=function(){Qu(this.hy)}; +V.prototype.debugDrawObject=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Ru(e,a,c,d)};V.prototype.setGravity=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Su(c,a)};V.prototype.getGravity=function(){return k(Tu(this.hy),p)}; +V.prototype.addRigidBody=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?Uu(e,a):void 0===d?_emscripten_bind_btSoftRigidDynamicsWorld_addRigidBody_2(e,a,c):Vu(e,a,c,d)};V.prototype.removeRigidBody=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wu(c,a)}; +V.prototype.addConstraint=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);void 0===c?Xu(d,a):Yu(d,a,c)};V.prototype.removeConstraint=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Zu(c,a)};V.prototype.stepSimulation=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);return void 0===c?$u(e,a):void 0===d?av(e,a,c):bv(e,a,c,d)}; +V.prototype.setContactAddedCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);cv(c,a)};V.prototype.setContactProcessedCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);dv(c,a)};V.prototype.setContactDestroyedCallback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ev(c,a)};V.prototype.addAction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fv(c,a)};V.prototype.removeAction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gv(c,a)}; +V.prototype.getSolverInfo=function(){return k(hv(this.hy),v)};V.prototype.setInternalTickCallback=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);void 0===c?iv(e,a):void 0===d?jv(e,a,c):kv(e,a,c,d)};V.prototype.__destroy__=function(){lv(this.hy)}; +function aC(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=mv(a,c,d,e);h(aC)[this.hy]=this}aC.prototype=Object.create(TA.prototype);aC.prototype.constructor=aC;aC.prototype.iy=aC;aC.jy={};b.btFixedConstraint=aC;aC.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nv(c,a)};aC.prototype.getBreakingImpulseThreshold=function(){return ov(this.hy)}; +aC.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pv(c,a)};aC.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return qv(d,a,c)};aC.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);rv(e,a,c,d)};aC.prototype.__destroy__=function(){sv(this.hy)}; +function r(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=void 0===a?tv():void 0===c?_emscripten_bind_btTransform_btTransform_1(a):uv(a,c);h(r)[this.hy]=this}r.prototype=Object.create(f.prototype);r.prototype.constructor=r;r.prototype.iy=r;r.jy={};b.btTransform=r;r.prototype.setIdentity=function(){vv(this.hy)};r.prototype.setOrigin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);wv(c,a)}; +r.prototype.setRotation=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);xv(c,a)};r.prototype.getOrigin=function(){return k(yv(this.hy),p)};r.prototype.getRotation=function(){return k(zv(this.hy),W)};r.prototype.getBasis=function(){return k(Av(this.hy),jB)};r.prototype.setFromOpenGLMatrix=function(a){var c=this.hy;IA();"object"==typeof a&&(a=MA(a));Bv(c,a)};r.prototype.inverse=r.prototype.inverse=function(){return k(Cv(this.hy),r)}; +r.prototype.op_mul=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Dv(c,a),r)};r.prototype.__destroy__=function(){Ev(this.hy)};function X(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=Fv(a,c);h(X)[this.hy]=this}X.prototype=Object.create(z.prototype);X.prototype.constructor=X;X.prototype.iy=X;X.jy={};b.ClosestRayResultCallback=X;X.prototype.hasHit=function(){return!!Gv(this.hy)}; +X.prototype.get_m_rayFromWorld=X.prototype.Iy=function(){return k(Hv(this.hy),p)};X.prototype.set_m_rayFromWorld=X.prototype.Ry=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Iv(c,a)};Object.defineProperty(X.prototype,"m_rayFromWorld",{get:X.prototype.Iy,set:X.prototype.Ry});X.prototype.get_m_rayToWorld=X.prototype.Jy=function(){return k(Jv(this.hy),p)};X.prototype.set_m_rayToWorld=X.prototype.Sy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Kv(c,a)}; +Object.defineProperty(X.prototype,"m_rayToWorld",{get:X.prototype.Jy,set:X.prototype.Sy});X.prototype.get_m_hitNormalWorld=X.prototype.sy=function(){return k(Lv(this.hy),p)};X.prototype.set_m_hitNormalWorld=X.prototype.zy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Mv(c,a)};Object.defineProperty(X.prototype,"m_hitNormalWorld",{get:X.prototype.sy,set:X.prototype.zy});X.prototype.get_m_hitPointWorld=X.prototype.ty=function(){return k(Nv(this.hy),p)}; +X.prototype.set_m_hitPointWorld=X.prototype.Ay=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ov(c,a)};Object.defineProperty(X.prototype,"m_hitPointWorld",{get:X.prototype.ty,set:X.prototype.Ay});X.prototype.get_m_collisionFilterGroup=X.prototype.ky=function(){return Pv(this.hy)};X.prototype.set_m_collisionFilterGroup=X.prototype.my=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Qv(c,a)};Object.defineProperty(X.prototype,"m_collisionFilterGroup",{get:X.prototype.ky,set:X.prototype.my}); +X.prototype.get_m_collisionFilterMask=X.prototype.ly=function(){return Rv(this.hy)};X.prototype.set_m_collisionFilterMask=X.prototype.ny=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sv(c,a)};Object.defineProperty(X.prototype,"m_collisionFilterMask",{get:X.prototype.ly,set:X.prototype.ny});X.prototype.get_m_closestHitFraction=X.prototype.oy=function(){return Tv(this.hy)}; +X.prototype.set_m_closestHitFraction=X.prototype.py=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Uv(c,a)};Object.defineProperty(X.prototype,"m_closestHitFraction",{get:X.prototype.oy,set:X.prototype.py});X.prototype.get_m_collisionObject=X.prototype.qy=function(){return k(Vv(this.hy),q)};X.prototype.set_m_collisionObject=X.prototype.xy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Wv(c,a)};Object.defineProperty(X.prototype,"m_collisionObject",{get:X.prototype.qy,set:X.prototype.xy}); +X.prototype.__destroy__=function(){Xv(this.hy)};function bC(a){a&&"object"===typeof a&&(a=a.hy);this.hy=void 0===a?Yv():Zv(a);h(bC)[this.hy]=this}bC.prototype=Object.create(WA.prototype);bC.prototype.constructor=bC;bC.prototype.iy=bC;bC.jy={};b.btSoftBodyRigidBodyCollisionConfiguration=bC;bC.prototype.__destroy__=function(){$v(this.hy)};function cC(){this.hy=aw();h(cC)[this.hy]=this}cC.prototype=Object.create(hB.prototype);cC.prototype.constructor=cC;cC.prototype.iy=cC;cC.jy={}; +b.ConcreteContactResultCallback=cC;cC.prototype.addSingleResult=function(a,c,d,e,g,n,F){var aa=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);return bw(aa,a,c,d,e,g,n,F)};cC.prototype.__destroy__=function(){cw(this.hy)}; +function dC(a,c,d){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);this.hy=void 0===d?dw(a,c):ew(a,c,d);h(dC)[this.hy]=this}dC.prototype=Object.create(XA.prototype);dC.prototype.constructor=dC;dC.prototype.iy=dC;dC.jy={};b.btBvhTriangleMeshShape=dC;dC.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fw(c,a)};dC.prototype.getLocalScaling=function(){return k(gw(this.hy),p)}; +dC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);hw(d,a,c)};dC.prototype.__destroy__=function(){iw(this.hy)};function oB(){throw"cannot construct a btConstCollisionObjectArray, no constructor in IDL";}oB.prototype=Object.create(f.prototype);oB.prototype.constructor=oB;oB.prototype.iy=oB;oB.jy={};b.btConstCollisionObjectArray=oB;oB.prototype.size=oB.prototype.size=function(){return jw(this.hy)}; +oB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(kw(c,a),q)};oB.prototype.__destroy__=function(){lw(this.hy)};function eC(a,c,d,e,g){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);this.hy=void 0===e?mw(a,c,d):void 0===g?_emscripten_bind_btSliderConstraint_btSliderConstraint_4(a,c,d,e):nw(a,c,d,e,g);h(eC)[this.hy]=this}eC.prototype=Object.create(TA.prototype); +eC.prototype.constructor=eC;eC.prototype.iy=eC;eC.jy={};b.btSliderConstraint=eC;eC.prototype.setLowerLinLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ow(c,a)};eC.prototype.setUpperLinLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pw(c,a)};eC.prototype.setLowerAngLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);qw(c,a)};eC.prototype.setUpperAngLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);rw(c,a)}; +eC.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);sw(c,a)};eC.prototype.getBreakingImpulseThreshold=function(){return tw(this.hy)};eC.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);uw(c,a)};eC.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return vw(d,a,c)}; +eC.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);ww(e,a,c,d)};eC.prototype.__destroy__=function(){xw(this.hy)};function U(){this.hy=yw();h(U)[this.hy]=this}U.prototype=Object.create(w.prototype);U.prototype.constructor=U;U.prototype.iy=U;U.jy={};b.btPairCachingGhostObject=U; +U.prototype.setAnisotropicFriction=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);zw(d,a,c)};U.prototype.getCollisionShape=function(){return k(Aw(this.hy),m)};U.prototype.setContactProcessingThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Bw(c,a)};U.prototype.setActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Cw(c,a)}; +U.prototype.forceActivationState=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Dw(c,a)};U.prototype.activate=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);void 0===a?Ew(c):Fw(c,a)};U.prototype.isActive=function(){return!!Gw(this.hy)};U.prototype.isKinematicObject=function(){return!!Hw(this.hy)};U.prototype.isStaticObject=function(){return!!Iw(this.hy)};U.prototype.isStaticOrKinematicObject=function(){return!!Jw(this.hy)};U.prototype.getRestitution=function(){return Kw(this.hy)}; +U.prototype.getFriction=function(){return Lw(this.hy)};U.prototype.getRollingFriction=function(){return Mw(this.hy)};U.prototype.setRestitution=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Nw(c,a)};U.prototype.setFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ow(c,a)};U.prototype.setRollingFriction=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pw(c,a)};U.prototype.getWorldTransform=function(){return k(Qw(this.hy),r)};U.prototype.getCollisionFlags=function(){return Rw(this.hy)}; +U.prototype.setCollisionFlags=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sw(c,a)};U.prototype.setWorldTransform=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Tw(c,a)};U.prototype.setCollisionShape=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Uw(c,a)};U.prototype.setCcdMotionThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Vw(c,a)};U.prototype.setCcdSweptSphereRadius=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ww(c,a)}; +U.prototype.getUserIndex=function(){return Xw(this.hy)};U.prototype.setUserIndex=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yw(c,a)};U.prototype.getUserPointer=function(){return k(Zw(this.hy),SA)};U.prototype.setUserPointer=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$w(c,a)};U.prototype.getBroadphaseHandle=function(){return k(ax(this.hy),t)};U.prototype.getNumOverlappingObjects=function(){return bx(this.hy)}; +U.prototype.getOverlappingObject=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(cx(c,a),q)};U.prototype.__destroy__=function(){dx(this.hy)};function D(){throw"cannot construct a btManifoldPoint, no constructor in IDL";}D.prototype=Object.create(f.prototype);D.prototype.constructor=D;D.prototype.iy=D;D.jy={};b.btManifoldPoint=D;D.prototype.getPositionWorldOnA=function(){return k(ex(this.hy),p)};D.prototype.getPositionWorldOnB=function(){return k(fx(this.hy),p)}; +D.prototype.getAppliedImpulse=function(){return gx(this.hy)};D.prototype.getDistance=function(){return hx(this.hy)};D.prototype.get_m_localPointA=D.prototype.AA=function(){return k(ix(this.hy),p)};D.prototype.set_m_localPointA=D.prototype.gD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);jx(c,a)};Object.defineProperty(D.prototype,"m_localPointA",{get:D.prototype.AA,set:D.prototype.gD});D.prototype.get_m_localPointB=D.prototype.BA=function(){return k(kx(this.hy),p)}; +D.prototype.set_m_localPointB=D.prototype.hD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);lx(c,a)};Object.defineProperty(D.prototype,"m_localPointB",{get:D.prototype.BA,set:D.prototype.hD});D.prototype.get_m_positionWorldOnB=D.prototype.NA=function(){return k(mx(this.hy),p)};D.prototype.set_m_positionWorldOnB=D.prototype.tD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);nx(c,a)};Object.defineProperty(D.prototype,"m_positionWorldOnB",{get:D.prototype.NA,set:D.prototype.tD}); +D.prototype.get_m_positionWorldOnA=D.prototype.MA=function(){return k(ox(this.hy),p)};D.prototype.set_m_positionWorldOnA=D.prototype.sD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);px(c,a)};Object.defineProperty(D.prototype,"m_positionWorldOnA",{get:D.prototype.MA,set:D.prototype.sD});D.prototype.get_m_normalWorldOnB=D.prototype.IA=function(){return k(qx(this.hy),p)};D.prototype.set_m_normalWorldOnB=D.prototype.oD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);rx(c,a)}; +Object.defineProperty(D.prototype,"m_normalWorldOnB",{get:D.prototype.IA,set:D.prototype.oD});D.prototype.get_m_userPersistentData=D.prototype.oB=function(){return sx(this.hy)};D.prototype.set_m_userPersistentData=D.prototype.VD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);tx(c,a)};Object.defineProperty(D.prototype,"m_userPersistentData",{get:D.prototype.oB,set:D.prototype.VD});D.prototype.__destroy__=function(){ux(this.hy)}; +function fC(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=void 0===d?vx(a,c):void 0===e?_emscripten_bind_btPoint2PointConstraint_btPoint2PointConstraint_3(a,c,d):wx(a,c,d,e);h(fC)[this.hy]=this}fC.prototype=Object.create(TA.prototype);fC.prototype.constructor=fC;fC.prototype.iy=fC;fC.jy={};b.btPoint2PointConstraint=fC; +fC.prototype.setPivotA=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);xx(c,a)};fC.prototype.setPivotB=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yx(c,a)};fC.prototype.getPivotInA=function(){return k(zx(this.hy),p)};fC.prototype.getPivotInB=function(){return k(Ax(this.hy),p)};fC.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Bx(c,a)};fC.prototype.getBreakingImpulseThreshold=function(){return Cx(this.hy)}; +fC.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Dx(c,a)};fC.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return Ex(d,a,c)};fC.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Fx(e,a,c,d)};fC.prototype.get_m_setting=fC.prototype.VA=function(){return k(Gx(this.hy),H)}; +fC.prototype.set_m_setting=fC.prototype.BD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Hx(c,a)};Object.defineProperty(fC.prototype,"m_setting",{get:fC.prototype.VA,set:fC.prototype.BD});fC.prototype.__destroy__=function(){Ix(this.hy)};function gC(){this.hy=Jx();h(gC)[this.hy]=this}gC.prototype=Object.create(f.prototype);gC.prototype.constructor=gC;gC.prototype.iy=gC;gC.jy={};b.btSoftBodyHelpers=gC; +gC.prototype.CreateRope=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);return k(Kx(n,a,c,d,e,g),R)}; +gC.prototype.CreatePatch=function(a,c,d,e,g,n,F,aa,ta){var Rb=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);aa&&"object"===typeof aa&&(aa=aa.hy);ta&&"object"===typeof ta&&(ta=ta.hy);return k(Lx(Rb,a,c,d,e,g,n,F,aa,ta),R)}; +gC.prototype.CreatePatchUV=function(a,c,d,e,g,n,F,aa,ta,Rb){var nC=this.hy;IA();a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);n&&"object"===typeof n&&(n=n.hy);F&&"object"===typeof F&&(F=F.hy);aa&&"object"===typeof aa&&(aa=aa.hy);ta&&"object"===typeof ta&&(ta=ta.hy);"object"==typeof Rb&&(Rb=MA(Rb));return k(Mx(nC,a,c,d,e,g,n,F,aa,ta,Rb),R)}; +gC.prototype.CreateEllipsoid=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);return k(Nx(g,a,c,d,e),R)}; +gC.prototype.CreateFromTriMesh=function(a,c,d,e,g){var n=this.hy;IA();a&&"object"===typeof a&&(a=a.hy);"object"==typeof c&&(c=MA(c));if("object"==typeof d&&"object"===typeof d){var F=JA(d,Aa);KA(d,Aa,F);d=F}e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);return k(Ox(n,a,c,d,e,g),R)}; +gC.prototype.CreateFromConvexHull=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);return k(Px(g,a,c,d,e),R)};gC.prototype.__destroy__=function(){Qx(this.hy)};function t(){throw"cannot construct a btBroadphaseProxy, no constructor in IDL";}t.prototype=Object.create(f.prototype);t.prototype.constructor=t;t.prototype.iy=t;t.jy={};b.btBroadphaseProxy=t; +t.prototype.get_m_collisionFilterGroup=t.prototype.ky=function(){return Rx(this.hy)};t.prototype.set_m_collisionFilterGroup=t.prototype.my=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Sx(c,a)};Object.defineProperty(t.prototype,"m_collisionFilterGroup",{get:t.prototype.ky,set:t.prototype.my});t.prototype.get_m_collisionFilterMask=t.prototype.ly=function(){return Tx(this.hy)}; +t.prototype.set_m_collisionFilterMask=t.prototype.ny=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ux(c,a)};Object.defineProperty(t.prototype,"m_collisionFilterMask",{get:t.prototype.ly,set:t.prototype.ny});t.prototype.__destroy__=function(){Vx(this.hy)};function TB(){throw"cannot construct a tNodeArray, no constructor in IDL";}TB.prototype=Object.create(f.prototype);TB.prototype.constructor=TB;TB.prototype.iy=TB;TB.jy={};b.tNodeArray=TB;TB.prototype.size=TB.prototype.size=function(){return Wx(this.hy)}; +TB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Xx(c,a),Node)};TB.prototype.__destroy__=function(){Yx(this.hy)};function hC(a){a&&"object"===typeof a&&(a=a.hy);this.hy=Zx(a);h(hC)[this.hy]=this}hC.prototype=Object.create(m.prototype);hC.prototype.constructor=hC;hC.prototype.iy=hC;hC.jy={};b.btBoxShape=hC;hC.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$x(c,a)};hC.prototype.getMargin=function(){return ay(this.hy)}; +hC.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);by(c,a)};hC.prototype.getLocalScaling=function(){return k(cy(this.hy),p)};hC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);dy(d,a,c)};hC.prototype.__destroy__=function(){ey(this.hy)};function ZB(){throw"cannot construct a btFace, no constructor in IDL";}ZB.prototype=Object.create(f.prototype);ZB.prototype.constructor=ZB; +ZB.prototype.iy=ZB;ZB.jy={};b.btFace=ZB;ZB.prototype.get_m_indices=ZB.prototype.rA=function(){return k(fy(this.hy),VB)};ZB.prototype.set_m_indices=ZB.prototype.YC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gy(c,a)};Object.defineProperty(ZB.prototype,"m_indices",{get:ZB.prototype.rA,set:ZB.prototype.YC});ZB.prototype.get_m_plane=ZB.prototype.LA=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return hy(c,a)}; +ZB.prototype.set_m_plane=ZB.prototype.rD=function(a,c){var d=this.hy;IA();a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);iy(d,a,c)};Object.defineProperty(ZB.prototype,"m_plane",{get:ZB.prototype.LA,set:ZB.prototype.rD});ZB.prototype.__destroy__=function(){jy(this.hy)};function iC(){this.hy=ky();h(iC)[this.hy]=this}iC.prototype=Object.create(RA.prototype);iC.prototype.constructor=iC;iC.prototype.iy=iC;iC.jy={};b.DebugDrawer=iC; +iC.prototype.drawLine=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);ly(e,a,c,d)};iC.prototype.drawContactPoint=function(a,c,d,e,g){var n=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);my(n,a,c,d,e,g)}; +iC.prototype.reportErrorWarning=function(a){var c=this.hy;IA();a=a&&"object"===typeof a?a.hy:LA(a);ny(c,a)};iC.prototype.draw3dText=function(a,c){var d=this.hy;IA();a&&"object"===typeof a&&(a=a.hy);c=c&&"object"===typeof c?c.hy:LA(c);oy(d,a,c)};iC.prototype.setDebugMode=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);py(c,a)};iC.prototype.getDebugMode=function(){return qy(this.hy)};iC.prototype.__destroy__=function(){ry(this.hy)}; +function jC(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=sy(a,c);h(jC)[this.hy]=this}jC.prototype=Object.create(VA.prototype);jC.prototype.constructor=jC;jC.prototype.iy=jC;jC.jy={};b.btCapsuleShapeX=jC;jC.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);ty(c,a)};jC.prototype.getMargin=function(){return uy(this.hy)};jC.prototype.getUpAxis=function(){return vy(this.hy)};jC.prototype.getRadius=function(){return wy(this.hy)}; +jC.prototype.getHalfHeight=function(){return xy(this.hy)};jC.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);yy(c,a)};jC.prototype.getLocalScaling=function(){return k(zy(this.hy),p)};jC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Ay(d,a,c)};jC.prototype.__destroy__=function(){By(this.hy)}; +function W(a,c,d,e){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);this.hy=Cy(a,c,d,e);h(W)[this.hy]=this}W.prototype=Object.create(aB.prototype);W.prototype.constructor=W;W.prototype.iy=W;W.jy={};b.btQuaternion=W;W.prototype.setValue=function(a,c,d,e){var g=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);Dy(g,a,c,d,e)}; +W.prototype.setEulerZYX=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Ey(e,a,c,d)};W.prototype.setRotation=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Fy(d,a,c)};W.prototype.normalize=W.prototype.normalize=function(){Gy(this.hy)};W.prototype.length2=function(){return Hy(this.hy)};W.prototype.length=W.prototype.length=function(){return Iy(this.hy)}; +W.prototype.dot=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return Jy(c,a)};W.prototype.normalized=function(){return k(Ky(this.hy),W)};W.prototype.getAxis=function(){return k(Ly(this.hy),p)};W.prototype.inverse=W.prototype.inverse=function(){return k(My(this.hy),W)};W.prototype.getAngle=function(){return Ny(this.hy)};W.prototype.getAngleShortestPath=function(){return Oy(this.hy)}; +W.prototype.angle=W.prototype.angle=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return Py(c,a)};W.prototype.angleShortestPath=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return Qy(c,a)};W.prototype.op_add=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Ry(c,a),W)};W.prototype.op_sub=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Sy(c,a),W)}; +W.prototype.op_mul=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Ty(c,a),W)};W.prototype.op_mulq=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Uy(c,a),W)};W.prototype.op_div=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Vy(c,a),W)};W.prototype.x=W.prototype.x=function(){return Wy(this.hy)};W.prototype.y=W.prototype.y=function(){return Xy(this.hy)};W.prototype.z=W.prototype.z=function(){return Yy(this.hy)};W.prototype.w=function(){return Zy(this.hy)}; +W.prototype.setX=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$y(c,a)};W.prototype.setY=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);az(c,a)};W.prototype.setZ=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);bz(c,a)};W.prototype.setW=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);cz(c,a)};W.prototype.__destroy__=function(){dz(this.hy)}; +function kC(a,c){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);this.hy=ez(a,c);h(kC)[this.hy]=this}kC.prototype=Object.create(VA.prototype);kC.prototype.constructor=kC;kC.prototype.iy=kC;kC.jy={};b.btCapsuleShapeZ=kC;kC.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);fz(c,a)};kC.prototype.getMargin=function(){return gz(this.hy)};kC.prototype.getUpAxis=function(){return hz(this.hy)};kC.prototype.getRadius=function(){return iz(this.hy)}; +kC.prototype.getHalfHeight=function(){return jz(this.hy)};kC.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);kz(c,a)};kC.prototype.getLocalScaling=function(){return k(lz(this.hy),p)};kC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);mz(d,a,c)};kC.prototype.__destroy__=function(){nz(this.hy)};function v(){throw"cannot construct a btContactSolverInfo, no constructor in IDL";} +v.prototype=Object.create(f.prototype);v.prototype.constructor=v;v.prototype.iy=v;v.jy={};b.btContactSolverInfo=v;v.prototype.get_m_splitImpulse=v.prototype.YA=function(){return!!oz(this.hy)};v.prototype.set_m_splitImpulse=v.prototype.ED=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);pz(c,a)};Object.defineProperty(v.prototype,"m_splitImpulse",{get:v.prototype.YA,set:v.prototype.ED});v.prototype.get_m_splitImpulsePenetrationThreshold=v.prototype.ZA=function(){return qz(this.hy)}; +v.prototype.set_m_splitImpulsePenetrationThreshold=v.prototype.FD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);rz(c,a)};Object.defineProperty(v.prototype,"m_splitImpulsePenetrationThreshold",{get:v.prototype.ZA,set:v.prototype.FD});v.prototype.get_m_numIterations=v.prototype.JA=function(){return sz(this.hy)};v.prototype.set_m_numIterations=v.prototype.pD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);tz(c,a)}; +Object.defineProperty(v.prototype,"m_numIterations",{get:v.prototype.JA,set:v.prototype.pD});v.prototype.__destroy__=function(){uz(this.hy)};function lC(a,c,d,e,g){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);this.hy=void 0===e?vz(a,c,d):void 0===g?_emscripten_bind_btGeneric6DofSpringConstraint_btGeneric6DofSpringConstraint_4(a,c,d,e):wz(a,c,d,e,g);h(lC)[this.hy]=this} +lC.prototype=Object.create(eB.prototype);lC.prototype.constructor=lC;lC.prototype.iy=lC;lC.jy={};b.btGeneric6DofSpringConstraint=lC;lC.prototype.enableSpring=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);xz(d,a,c)};lC.prototype.setStiffness=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);yz(d,a,c)}; +lC.prototype.setDamping=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);zz(d,a,c)};lC.prototype.setEquilibriumPoint=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);void 0===a?Az(d):void 0===c?Bz(d,a):Cz(d,a,c)};lC.prototype.setLinearLowerLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Dz(c,a)}; +lC.prototype.setLinearUpperLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Ez(c,a)};lC.prototype.setAngularLowerLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Fz(c,a)};lC.prototype.setAngularUpperLimit=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Gz(c,a)};lC.prototype.getFrameOffsetA=function(){return k(Hz(this.hy),r)};lC.prototype.enableFeedback=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Iz(c,a)}; +lC.prototype.getBreakingImpulseThreshold=function(){return Jz(this.hy)};lC.prototype.setBreakingImpulseThreshold=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Kz(c,a)};lC.prototype.getParam=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);return Lz(d,a,c)};lC.prototype.setParam=function(a,c,d){var e=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);Mz(e,a,c,d)}; +lC.prototype.__destroy__=function(){Nz(this.hy)};function mC(a){a&&"object"===typeof a&&(a=a.hy);this.hy=Oz(a);h(mC)[this.hy]=this}mC.prototype=Object.create(m.prototype);mC.prototype.constructor=mC;mC.prototype.iy=mC;mC.jy={};b.btSphereShape=mC;mC.prototype.setMargin=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Pz(c,a)};mC.prototype.getMargin=function(){return Qz(this.hy)};mC.prototype.setLocalScaling=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Rz(c,a)}; +mC.prototype.getLocalScaling=function(){return k(Sz(this.hy),p)};mC.prototype.calculateLocalInertia=function(a,c){var d=this.hy;a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Tz(d,a,c)};mC.prototype.__destroy__=function(){Uz(this.hy)};function Y(){throw"cannot construct a Face, no constructor in IDL";}Y.prototype=Object.create(f.prototype);Y.prototype.constructor=Y;Y.prototype.iy=Y;Y.jy={};b.Face=Y; +Y.prototype.get_m_n=Y.prototype.Hy=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(Vz(c,a),Node)};Y.prototype.set_m_n=Y.prototype.Qy=function(a,c){var d=this.hy;IA();a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);Wz(d,a,c)};Object.defineProperty(Y.prototype,"m_n",{get:Y.prototype.Hy,set:Y.prototype.Qy});Y.prototype.get_m_normal=Y.prototype.HA=function(){return k(Xz(this.hy),p)}; +Y.prototype.set_m_normal=Y.prototype.nD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);Yz(c,a)};Object.defineProperty(Y.prototype,"m_normal",{get:Y.prototype.HA,set:Y.prototype.nD});Y.prototype.get_m_ra=Y.prototype.PA=function(){return Zz(this.hy)};Y.prototype.set_m_ra=Y.prototype.vD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);$z(c,a)};Object.defineProperty(Y.prototype,"m_ra",{get:Y.prototype.PA,set:Y.prototype.vD});Y.prototype.__destroy__=function(){aA(this.hy)}; +function UB(){throw"cannot construct a tFaceArray, no constructor in IDL";}UB.prototype=Object.create(f.prototype);UB.prototype.constructor=UB;UB.prototype.iy=UB;UB.jy={};b.tFaceArray=UB;UB.prototype.size=UB.prototype.size=function(){return bA(this.hy)};UB.prototype.at=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);return k(cA(c,a),Y)};UB.prototype.__destroy__=function(){dA(this.hy)}; +function Z(a,c,d,e,g){a&&"object"===typeof a&&(a=a.hy);c&&"object"===typeof c&&(c=c.hy);d&&"object"===typeof d&&(d=d.hy);e&&"object"===typeof e&&(e=e.hy);g&&"object"===typeof g&&(g=g.hy);this.hy=eA(a,c,d,e,g);h(Z)[this.hy]=this}Z.prototype=Object.create(f.prototype);Z.prototype.constructor=Z;Z.prototype.iy=Z;Z.jy={};b.LocalConvexResult=Z;Z.prototype.get_m_hitCollisionObject=Z.prototype.iA=function(){return k(fA(this.hy),q)}; +Z.prototype.set_m_hitCollisionObject=Z.prototype.PC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);gA(c,a)};Object.defineProperty(Z.prototype,"m_hitCollisionObject",{get:Z.prototype.iA,set:Z.prototype.PC});Z.prototype.get_m_localShapeInfo=Z.prototype.CA=function(){return k(hA(this.hy),tB)};Z.prototype.set_m_localShapeInfo=Z.prototype.iD=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);iA(c,a)};Object.defineProperty(Z.prototype,"m_localShapeInfo",{get:Z.prototype.CA,set:Z.prototype.iD}); +Z.prototype.get_m_hitNormalLocal=Z.prototype.mA=function(){return k(jA(this.hy),p)};Z.prototype.set_m_hitNormalLocal=Z.prototype.TC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);kA(c,a)};Object.defineProperty(Z.prototype,"m_hitNormalLocal",{get:Z.prototype.mA,set:Z.prototype.TC});Z.prototype.get_m_hitPointLocal=Z.prototype.oA=function(){return k(lA(this.hy),p)};Z.prototype.set_m_hitPointLocal=Z.prototype.VC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);mA(c,a)}; +Object.defineProperty(Z.prototype,"m_hitPointLocal",{get:Z.prototype.oA,set:Z.prototype.VC});Z.prototype.get_m_hitFraction=Z.prototype.jA=function(){return nA(this.hy)};Z.prototype.set_m_hitFraction=Z.prototype.QC=function(a){var c=this.hy;a&&"object"===typeof a&&(a=a.hy);oA(c,a)};Object.defineProperty(Z.prototype,"m_hitFraction",{get:Z.prototype.jA,set:Z.prototype.QC});Z.prototype.__destroy__=function(){pA(this.hy)}; +(function(){function a(){b.BT_CONSTRAINT_ERP=qA();b.BT_CONSTRAINT_STOP_ERP=rA();b.BT_CONSTRAINT_CFM=sA();b.BT_CONSTRAINT_STOP_CFM=tA();b.PHY_FLOAT=uA();b.PHY_DOUBLE=vA();b.PHY_INTEGER=wA();b.PHY_SHORT=xA();b.PHY_FIXEDPOINT88=yA();b.PHY_UCHAR=zA()}Ka?a():Ia.unshift(a)})();this.Ammo=b; + + + return Ammo.ready +} +); +})(); +if (typeof exports === 'object' && typeof module === 'object') + module.exports = Ammo; + else if (typeof define === 'function' && define['amd']) + define([], function() { return Ammo; }); + else if (typeof exports === 'object') + exports["Ammo"] = Ammo; + diff --git a/node_modules/three/examples/jsm/libs/ammo.wasm.wasm b/node_modules/three/examples/jsm/libs/ammo.wasm.wasm new file mode 100644 index 0000000..fb4eff2 Binary files /dev/null and b/node_modules/three/examples/jsm/libs/ammo.wasm.wasm differ diff --git a/node_modules/three/examples/jsm/libs/basis/README.md b/node_modules/three/examples/jsm/libs/basis/README.md new file mode 100644 index 0000000..2d7744f --- /dev/null +++ b/node_modules/three/examples/jsm/libs/basis/README.md @@ -0,0 +1,46 @@ +# Basis Universal GPU Texture Compression + +Basis Universal is a "[supercompressed](http://gamma.cs.unc.edu/GST/gst.pdf)" +GPU texture and texture video compression system that outputs a highly +compressed intermediate file format (.basis) that can be quickly transcoded to +a wide variety of GPU texture compression formats. + +[GitHub](https://github.com/BinomialLLC/basis_universal) + +## Transcoders + +Basis Universal texture data may be used in two different file formats: +`.basis` and `.ktx2`, where `ktx2` is a standardized wrapper around basis texture data. + +For further documentation about the Basis compressor and transcoder, refer to +the [Basis GitHub repository](https://github.com/BinomialLLC/basis_universal). + +The folder contains two files required for transcoding `.basis` or `.ktx2` textures: + +* `basis_transcoder.js` — JavaScript wrapper for the WebAssembly transcoder. +* `basis_transcoder.wasm` — WebAssembly transcoder. + +Both are dependencies of `KTX2Loader`: + +```js +const ktx2Loader = new KTX2Loader(); +ktx2Loader.setTranscoderPath( 'examples/jsm/libs/basis/' ); +ktx2Loader.detectSupport( renderer ); +ktx2Loader.load( 'diffuse.ktx2', function ( texture ) { + + const material = new THREE.MeshStandardMaterial( { map: texture } ); + +}, function () { + + console.log( 'onProgress' ); + +}, function ( e ) { + + console.error( e ); + +} ); +``` + +## License + +[Apache License 2.0](https://github.com/BinomialLLC/basis_universal/blob/master/LICENSE) diff --git a/node_modules/three/examples/jsm/libs/basis/basis_transcoder.js b/node_modules/three/examples/jsm/libs/basis/basis_transcoder.js new file mode 100644 index 0000000..9e285dd --- /dev/null +++ b/node_modules/three/examples/jsm/libs/basis/basis_transcoder.js @@ -0,0 +1,21 @@ + +var BASIS = (function() { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; + return ( +function(BASIS) { + BASIS = BASIS || {}; + +var Module=typeof BASIS!=="undefined"?BASIS:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENVIRONMENT_IS_NODE){if(ENVIRONMENT_IS_WORKER){scriptDirectory=require("path").dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=function shell_read(filename,binary){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);return nodeFS["readFileSync"](filename,binary?null:"utf8")};readBinary=function readBinary(filename){var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);quit_=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){read_=function shell_read(f){return read(f)}}readBinary=function readBinary(f){var data;if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit==="function"){quit_=function(status){quit(status)}}if(typeof print!=="undefined"){if(typeof console==="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!=="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!=="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=function shell_read(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=function readBinary(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime;if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];if(typeof WebAssembly!=="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heap,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heap[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heap.subarray&&UTF8Decoder){return UTF8Decoder.decode(heap.subarray(idx,endPtr))}else{var str="";while(idx>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function UTF16ToString(ptr,maxBytesToRead){var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder){return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr))}else{var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str}}function stringToUTF16(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}function lengthBytesUTF16(str){return str.length*2}function UTF32ToString(ptr,maxBytesToRead){var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str}function stringToUTF32(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}function lengthBytesUTF32(str){var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len}function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module["HEAP8"]=HEAP8=new Int8Array(buf);Module["HEAP16"]=HEAP16=new Int16Array(buf);Module["HEAP32"]=HEAP32=new Int32Array(buf);Module["HEAPU8"]=HEAPU8=new Uint8Array(buf);Module["HEAPU16"]=HEAPU16=new Uint16Array(buf);Module["HEAPU32"]=HEAPU32=new Uint32Array(buf);Module["HEAPF32"]=HEAPF32=new Float32Array(buf);Module["HEAPF64"]=HEAPF64=new Float64Array(buf)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||16777216;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what+="";err(what);ABORT=true;EXITSTATUS=1;what="abort("+what+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}function hasPrefix(str,prefix){return String.prototype.startsWith?str.startsWith(prefix):str.indexOf(prefix)===0}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return hasPrefix(filename,dataURIPrefix)}var fileURIPrefix="file://";function isFileURI(filename){return hasPrefix(filename,fileURIPrefix)}var wasmBinaryFile="basis_transcoder.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(){try{if(wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(wasmBinaryFile)}else{throw"both async and sync fetching of the wasm failed"}}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&typeof fetch==="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary()})}return Promise.resolve().then(getBinary)}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["K"];updateGlobalBufferAndViews(wasmMemory.buffer);wasmTable=Module["asm"]["L"];removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiatedSource(output){receiveInstance(output["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming==="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&typeof fetch==="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiatedSource,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiatedSource)})})}else{return instantiateArrayBuffer(receiveInstantiatedSource)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);return false}}instantiateAsync().catch(readyPromiseReject);return{}}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=="function"){callback(Module);continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){wasmTable.get(func)()}else{wasmTable.get(func)(callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var structRegistrations={};function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}}function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(undefined===name){return"_unknown"}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return"_"+name}else{return name}}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function("body","return function "+name+"() {\n"+' "use strict";'+" return body.apply(this, arguments);\n"+"};\n")(body)}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return this.name+": "+this.message}};return errorClass}var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i>shift])},destructorFunction:null})}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType}}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")}var finalizationGroup=false;function detachFinalizer(handle){}function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}}function attachFinalizer(handle){if("undefined"===typeof FinalizationGroup){attachFinalizer=function(handle){return handle};return handle}finalizationGroup=new FinalizationGroup(function(iter){for(var result=iter.next();!result.done;result=iter.next()){var $$=result.value;if(!$$.ptr){console.warn("object already deleted: "+$$.ptr)}else{releaseClassHandle($$)}}});attachFinalizer=function(handle){finalizationGroup.register(handle,handle.$$,handle.$$);return handle};detachFinalizer=function(handle){finalizationGroup.unregister(handle.$$)};return attachFinalizer(handle)}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}}function ClassHandle_isDeleted(){return!this.$$.ptr}var delayFunction=undefined;var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}function init_ClassHandle(){ClassHandle.prototype["isAliasOf"]=ClassHandle_isAliasOf;ClassHandle.prototype["clone"]=ClassHandle_clone;ClassHandle.prototype["delete"]=ClassHandle_delete;ClassHandle.prototype["isDeleted"]=ClassHandle_isDeleted;ClassHandle.prototype["deleteLater"]=ClassHandle_deleteLater}function ClassHandle(){}var registeredPointers={};function ensureOverloadTable(proto,methodName,humanName){if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError("Function '"+humanName+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+proto[methodName].overloadTable+")!")}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError("Cannot register public name '"+name+"' twice")}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError("Cannot register multiple overloads of a function with the same number of arguments ("+numArguments+")!")}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError("Expected null or instance of "+desiredClass.name+", got an instance of "+ptrClass.name)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,__emval_register(function(){clonedHandle["delete"]()}));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+_embind_repr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+handle.$$.ptrType.name+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle["delete"]()}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)}function getInheritedInstanceCount(){return Object.keys(registeredInstances).length}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv}function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}}function init_embind(){Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction}var registeredInstances={};function getBasestPointer(class_,ptr){if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype["argPackAdvance"]=8;RegisteredPointer.prototype["readValueFromPointer"]=simpleReadValueFromPointer;RegisteredPointer.prototype["deleteObject"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype["fromWireType"]=RegisteredPointer_fromWireType}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}}function dynCallLegacy(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}return Module["dynCall_"+sig].call(null,ptr)}function dynCall(sig,ptr,args){if(sig.indexOf("j")!=-1){return dynCallLegacy(sig,ptr,args)}return wasmTable.get(ptr).apply(null,args)}function getDynCaller(sig,ptr){assert(sig.indexOf("j")>=0,"getDynCaller should only be called with i64 sigs");var argCache=[];return function(){argCache.length=arguments.length;for(var i=0;i>2)+i])}return array}function __embind_register_class_constructor(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor){assert(argCount>0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);var args=[rawConstructor];var destructors=[];whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName="constructor "+classType.name;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError("Cannot register multiple constructors with identical number of parameters ("+(argCount-1)+") for class '"+classType.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!")}classType.registeredClass.constructor_body[argCount-1]=function unboundTypeHandler(){throwUnboundTypeError("Cannot construct "+classType.name+" due to unbound types",rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){classType.registeredClass.constructor_body[argCount-1]=function constructor_body(){if(arguments.length!==argCount-1){throwBindingError(humanName+" called with "+arguments.length+" arguments, expected "+(argCount-1))}destructors.length=0;args.length=argCount;for(var i=1;i0?", ":"")+argsListWired}invokerFnBody+=(returns?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function count_emval_handles(){var count=0;for(var i=5;i>1])};case 2:return function(pointer){var heap=signed?HEAP32:HEAPU32;return this["fromWireType"](heap[pointer>>2])};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_enum(rawType,name,size,isSigned){var shift=getShiftFromSize(size);name=readLatin1String(name);function ctor(){}ctor.values={};registerType(rawType,{name:name,constructor:ctor,"fromWireType":function(c){return this.constructor.values[c]},"toWireType":function(destructors,c){return c.value},"argPackAdvance":8,"readValueFromPointer":enumReadValueFromPointer(name,shift,isSigned),destructorFunction:null});exposePublicSymbol(name,ctor)}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl}function __embind_register_enum_value(rawEnumType,name,enumValue){var enumType=requireRegisteredType(rawEnumType,"enum");name=readLatin1String(name);var Enum=enumType.constructor;var Value=Object.create(enumType.constructor.prototype,{value:{value:enumValue},constructor:{value:createNamedFunction(enumType.name+"_"+name,function(){})}});Enum.values[enumValue]=Value;Enum[name]=Value}function _embind_repr(v){if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 3:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError("Unknown float type: "+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(value){return value},"toWireType":function(destructors,value){if(typeof value!=="number"&&typeof value!=="boolean"){throw new TypeError('Cannot convert "'+_embind_repr(value)+'" to '+this.name)}return value},"argPackAdvance":8,"readValueFromPointer":floatReadValueFromPointer(name,shift),destructorFunction:null})}function __embind_register_function(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn){var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=readLatin1String(name);rawInvoker=embind__requireFunction(signature,rawInvoker);exposePublicSymbol(name,function(){throwUnboundTypeError("Cannot call "+name+" due to unbound types",argTypes)},argCount-1);whenDependentTypesAreResolved([],argTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn),argCount-1);return[]})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=function(value){return value};if(minRange===0){var bitshift=32-8*size;fromWireType=function(value){return value<>>bitshift}}var isUnsignedType=name.indexOf("unsigned")!=-1;registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":function(destructors,value){if(typeof value!=="number"&&typeof value!=="boolean"){throw new TypeError('Cannot convert "'+_embind_repr(value)+'" to '+this.name)}if(valuemaxRange){throw new TypeError('Passing a number "'+_embind_repr(value)+'" from JS side to C/C++ side to an argument of type "'+name+'", which is outside the valid range ['+minRange+", "+maxRange+"]!")}return isUnsignedType?value>>>0:value|0},"argPackAdvance":8,"readValueFromPointer":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":8,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var str;if(stdStringIsUTF8){var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr+4,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+4+i]=charCode}}else{for(var i=0;i>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":function(destructors,value){if(!(typeof value==="string")){throwBindingError("Cannot pass non-string to C++ string type "+name)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_value_object(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){structRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),fields:[]}}function __embind_register_value_object_field(structType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){structRegistrations[structType].fields.push({fieldName:readLatin1String(fieldName),getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext})}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":function(){return undefined},"toWireType":function(destructors,o){return undefined}})}function requireHandle(handle){if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handle_array[handle].value}function __emval_as(handle,returnType,destructorsRef){handle=requireHandle(handle);returnType=requireRegisteredType(returnType,"emval::as");var destructors=[];var rd=__emval_register(destructors);HEAP32[destructorsRef>>2]=rd;return returnType["toWireType"](destructors,handle)}var emval_symbols={};function getStringOrSymbol(address){var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}else{return symbol}}var emval_methodCallers=[];function __emval_call_void_method(caller,handle,methodName,args){caller=emval_methodCallers[caller];handle=requireHandle(handle);methodName=getStringOrSymbol(methodName);caller(handle,methodName,null,args)}function emval_get_global(){if(typeof globalThis==="object"){return globalThis}return function(){return Function}()("return this")()}function __emval_get_global(name){if(name===0){return __emval_register(emval_get_global())}else{name=getStringOrSymbol(name);return __emval_register(emval_get_global()[name])}}function __emval_addMethodCaller(caller){var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id}function __emval_lookupTypes(argCount,argTypes){var a=new Array(argCount);for(var i=0;i>2)+i],"parameter "+i)}return a}function __emval_get_method_caller(argCount,argTypes){var types=__emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+"_$"+types.slice(1).map(function(t){return t.name}).join("_")+"$";var params=["retType"];var args=[retType];var argsList="";for(var i=0;i4){emval_handle_array[handle].refcount+=1}}function craftEmvalAllocator(argCount){var argsList="";for(var i=0;i>> 2) + "+i+'], "parameter '+i+'");\n'+"var arg"+i+" = argType"+i+".readValueFromPointer(args);\n"+"args += argType"+i+"['argPackAdvance'];\n"}functionBody+="var obj = new constructor("+argsList+");\n"+"return __emval_register(obj);\n"+"}\n";return new Function("requireRegisteredType","Module","__emval_register",functionBody)(requireRegisteredType,Module,__emval_register)}var emval_newers={};function __emval_new(handle,argCount,argTypes,args){handle=requireHandle(handle);var newer=emval_newers[argCount];if(!newer){newer=craftEmvalAllocator(argCount);emval_newers[argCount]=newer}return newer(handle,argTypes,args)}function __emval_new_cstring(v){return __emval_register(getStringOrSymbol(v))}function __emval_run_destructors(handle){var destructors=emval_handle_array[handle].value;runDestructors(destructors);__emval_decref(handle)}function _abort(){abort()}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function _emscripten_get_heap_size(){return HEAPU8.length}function emscripten_realloc_buffer(size){try{wasmMemory.grow(size-buffer.byteLength+65535>>>16);updateGlobalBufferAndViews(wasmMemory.buffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){requestedSize=requestedSize>>>0;var oldSize=_emscripten_get_heap_size();var maxHeapSize=2147483648;if(requestedSize>maxHeapSize){return false}var minHeapSize=16777216;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(minHeapSize,requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var SYSCALLS={mappings:{},buffers:[null,[],[]],printChar:function(stream,curr){var buffer=SYSCALLS.buffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},get64:function(low,high){return low}};function _fd_close(fd){return 0}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){}function _fd_write(fd,iov,iovcnt,pnum){var num=0;for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j>2]=num;return 0}function _setTempRet0($i){setTempRet0($i|0)}InternalError=Module["InternalError"]=extendError(Error,"InternalError");embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");init_ClassHandle();init_RegisteredPointer();init_embind();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");init_emval();__ATINIT__.push({func:function(){___wasm_call_ctors()}});var asmLibraryArg={"t":__embind_finalize_value_object,"I":__embind_register_bool,"x":__embind_register_class,"w":__embind_register_class_constructor,"d":__embind_register_class_function,"k":__embind_register_constant,"H":__embind_register_emval,"n":__embind_register_enum,"a":__embind_register_enum_value,"A":__embind_register_float,"i":__embind_register_function,"j":__embind_register_integer,"h":__embind_register_memory_view,"B":__embind_register_std_string,"v":__embind_register_std_wstring,"u":__embind_register_value_object,"c":__embind_register_value_object_field,"J":__embind_register_void,"m":__emval_as,"s":__emval_call_void_method,"b":__emval_decref,"y":__emval_get_global,"p":__emval_get_method_caller,"r":__emval_get_module_property,"e":__emval_get_property,"g":__emval_incref,"q":__emval_new,"f":__emval_new_cstring,"l":__emval_run_destructors,"o":_abort,"E":_emscripten_memcpy_big,"F":_emscripten_resize_heap,"G":_fd_close,"C":_fd_seek,"z":_fd_write,"D":_setTempRet0};var asm=createWasm();var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["M"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["N"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["O"]).apply(null,arguments)};var ___getTypeName=Module["___getTypeName"]=function(){return(___getTypeName=Module["___getTypeName"]=Module["asm"]["P"]).apply(null,arguments)};var ___embind_register_native_and_builtin_types=Module["___embind_register_native_and_builtin_types"]=function(){return(___embind_register_native_and_builtin_types=Module["___embind_register_native_and_builtin_types"]=Module["asm"]["Q"]).apply(null,arguments)};var dynCall_jiji=Module["dynCall_jiji"]=function(){return(dynCall_jiji=Module["dynCall_jiji"]=Module["asm"]["R"]).apply(null,arguments)};var calledRun;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0)return;function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}Module["run"]=run;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}noExitRuntime=true;run(); + + + return BASIS.ready +} +); +})(); +if (typeof exports === 'object' && typeof module === 'object') + module.exports = BASIS; +else if (typeof define === 'function' && define['amd']) + define([], function() { return BASIS; }); +else if (typeof exports === 'object') + exports["BASIS"] = BASIS; diff --git a/node_modules/three/examples/jsm/libs/basis/basis_transcoder.wasm b/node_modules/three/examples/jsm/libs/basis/basis_transcoder.wasm new file mode 100644 index 0000000..4b9c343 Binary files /dev/null and b/node_modules/three/examples/jsm/libs/basis/basis_transcoder.wasm differ diff --git a/node_modules/three/examples/jsm/libs/chevrotain.module.min.js b/node_modules/three/examples/jsm/libs/chevrotain.module.min.js new file mode 100644 index 0000000..424790c --- /dev/null +++ b/node_modules/three/examples/jsm/libs/chevrotain.module.min.js @@ -0,0 +1,141 @@ +/*! chevrotain - v9.0.1 */ +var R=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports);var Er=R(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.VERSION=void 0;Pt.VERSION="9.0.1"});var k=R((exports,module)=>{"use strict";var __spreadArray=exports&&exports.__spreadArray||function(t,e){for(var r=0,n=e.length,i=t.length;r{(function(t,e){typeof define=="function"&&define.amd?define([],e):typeof St=="object"&&St.exports?St.exports=e():t.regexpToAst=e()})(typeof self!="undefined"?self:sn,function(){function t(){}t.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},t.prototype.restoreState=function(u){this.idx=u.idx,this.input=u.input,this.groupIdx=u.groupIdx},t.prototype.pattern=function(u){this.idx=0,this.input=u,this.groupIdx=0,this.consumeChar("/");var d=this.disjunction();this.consumeChar("/");for(var A={type:"Flags",loc:{begin:this.idx,end:u.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":o(A,"global");break;case"i":o(A,"ignoreCase");break;case"m":o(A,"multiLine");break;case"u":o(A,"unicode");break;case"y":o(A,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:A,value:d,loc:this.loc(0)}},t.prototype.disjunction=function(){var u=[],d=this.idx;for(u.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),u.push(this.alternative());return{type:"Disjunction",value:u,loc:this.loc(d)}},t.prototype.alternative=function(){for(var u=[],d=this.idx;this.isTerm();)u.push(this.term());return{type:"Alternative",value:u,loc:this.loc(d)}},t.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},t.prototype.assertion=function(){var u=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(u)};case"$":return{type:"EndAnchor",loc:this.loc(u)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(u)};case"B":return{type:"NonWordBoundary",loc:this.loc(u)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var d;switch(this.popChar()){case"=":d="Lookahead";break;case"!":d="NegativeLookahead";break}s(d);var A=this.disjunction();return this.consumeChar(")"),{type:d,value:A,loc:this.loc(u)}}c()},t.prototype.quantifier=function(u){var d,A=this.idx;switch(this.popChar()){case"*":d={atLeast:0,atMost:Infinity};break;case"+":d={atLeast:1,atMost:Infinity};break;case"?":d={atLeast:0,atMost:1};break;case"{":var _=this.integerIncludingZero();switch(this.popChar()){case"}":d={atLeast:_,atMost:_};break;case",":var g;this.isDigit()?(g=this.integerIncludingZero(),d={atLeast:_,atMost:g}):d={atLeast:_,atMost:Infinity},this.consumeChar("}");break}if(u===!0&&d===void 0)return;s(d);break}if(!(u===!0&&d===void 0))return s(d),this.peekChar(0)==="?"?(this.consumeChar("?"),d.greedy=!1):d.greedy=!0,d.type="Quantifier",d.loc=this.loc(A),d},t.prototype.atom=function(){var u,d=this.idx;switch(this.peekChar()){case".":u=this.dotAll();break;case"\\":u=this.atomEscape();break;case"[":u=this.characterClass();break;case"(":u=this.group();break}return u===void 0&&this.isPatternCharacter()&&(u=this.patternCharacter()),s(u),u.loc=this.loc(d),this.isQuantifier()&&(u.quantifier=this.quantifier()),u},t.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[i(` +`),i("\r"),i("\u2028"),i("\u2029")]}},t.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},t.prototype.decimalEscapeAtom=function(){var u=this.positiveInteger();return{type:"GroupBackReference",value:u}},t.prototype.characterClassEscape=function(){var u,d=!1;switch(this.popChar()){case"d":u=p;break;case"D":u=p,d=!0;break;case"s":u=m;break;case"S":u=m,d=!0;break;case"w":u=l;break;case"W":u=l,d=!0;break}return s(u),{type:"Set",value:u,complement:d}},t.prototype.controlEscapeAtom=function(){var u;switch(this.popChar()){case"f":u=i("\f");break;case"n":u=i(` +`);break;case"r":u=i("\r");break;case"t":u=i(" ");break;case"v":u=i("\v");break}return s(u),{type:"Character",value:u}},t.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var u=this.popChar();if(/[a-zA-Z]/.test(u)===!1)throw Error("Invalid ");var d=u.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:d}},t.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:i("\0")}},t.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},t.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},t.prototype.identityEscapeAtom=function(){var u=this.popChar();return{type:"Character",value:i(u)}},t.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var u=this.popChar();return{type:"Character",value:i(u)}}},t.prototype.characterClass=function(){var u=[],d=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),d=!0);this.isClassAtom();){var A=this.classAtom(),_=A.type==="Character";if(_&&this.isRangeDash()){this.consumeChar("-");var g=this.classAtom(),y=g.type==="Character";if(y){if(g.value=this.input.length)throw Error("Unexpected end of input");this.idx++},t.prototype.loc=function(u){return{begin:u,end:this.idx}};var e=/[0-9a-fA-F]/,r=/[0-9]/,n=/[1-9]/;function i(u){return u.charCodeAt(0)}function a(u,d){u.length!==void 0?u.forEach(function(A){d.push(A)}):d.push(u)}function o(u,d){if(u[d]===!0)throw"duplicate flag "+d;u[d]=!0}function s(u){if(u===void 0)throw Error("Internal Error - Should never get here!")}function c(){throw Error("Internal Error - Should never get here!")}var f,p=[];for(f=i("0");f<=i("9");f++)p.push(f);var l=[i("_")].concat(p);for(f=i("a");f<=i("z");f++)l.push(f);for(f=i("A");f<=i("Z");f++)l.push(f);var m=[i(" "),i("\f"),i(` +`),i("\r"),i(" "),i("\v"),i(" "),i("\xA0"),i("\u1680"),i("\u2000"),i("\u2001"),i("\u2002"),i("\u2003"),i("\u2004"),i("\u2005"),i("\u2006"),i("\u2007"),i("\u2008"),i("\u2009"),i("\u200A"),i("\u2028"),i("\u2029"),i("\u202F"),i("\u205F"),i("\u3000"),i("\uFEFF")];function v(){}return v.prototype.visitChildren=function(u){for(var d in u){var A=u[d];u.hasOwnProperty(d)&&(A.type!==void 0?this.visit(A):Array.isArray(A)&&A.forEach(function(_){this.visit(_)},this))}},v.prototype.visit=function(u){switch(u.type){case"Pattern":this.visitPattern(u);break;case"Flags":this.visitFlags(u);break;case"Disjunction":this.visitDisjunction(u);break;case"Alternative":this.visitAlternative(u);break;case"StartAnchor":this.visitStartAnchor(u);break;case"EndAnchor":this.visitEndAnchor(u);break;case"WordBoundary":this.visitWordBoundary(u);break;case"NonWordBoundary":this.visitNonWordBoundary(u);break;case"Lookahead":this.visitLookahead(u);break;case"NegativeLookahead":this.visitNegativeLookahead(u);break;case"Character":this.visitCharacter(u);break;case"Set":this.visitSet(u);break;case"Group":this.visitGroup(u);break;case"GroupBackReference":this.visitGroupBackReference(u);break;case"Quantifier":this.visitQuantifier(u);break}this.visitChildren(u)},v.prototype.visitPattern=function(u){},v.prototype.visitFlags=function(u){},v.prototype.visitDisjunction=function(u){},v.prototype.visitAlternative=function(u){},v.prototype.visitStartAnchor=function(u){},v.prototype.visitEndAnchor=function(u){},v.prototype.visitWordBoundary=function(u){},v.prototype.visitNonWordBoundary=function(u){},v.prototype.visitLookahead=function(u){},v.prototype.visitNegativeLookahead=function(u){},v.prototype.visitCharacter=function(u){},v.prototype.visitSet=function(u){},v.prototype.visitGroup=function(u){},v.prototype.visitGroupBackReference=function(u){},v.prototype.visitQuantifier=function(u){},{RegExpParser:t,BaseRegExpVisitor:v,VERSION:"0.5.0"}})});var Lt=R(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.clearRegExpParserCache=He.getRegExpAst=void 0;var Ga=xt(),Ct={},Wa=new Ga.RegExpParser;function Ba(t){var e=t.toString();if(Ct.hasOwnProperty(e))return Ct[e];var r=Wa.pattern(e);return Ct[e]=r,r}He.getRegExpAst=Ba;function qa(){Ct={}}He.clearRegExpParserCache=qa});var pn=R(re=>{"use strict";var ja=re&&re.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(re,"__esModule",{value:!0});re.canMatchCharCode=re.firstCharOptimizedIndices=re.getOptimizedStartCodesIndices=re.failedOptimizationPrefixMsg=void 0;var un=xt(),pe=k(),cn=Lt(),Ce=Tr(),ln="Complement Sets are not supported for first char optimization";re.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations: +`;function Va(t,e){e===void 0&&(e=!1);try{var r=cn.getRegExpAst(t),n=Mt(r.value,{},r.flags.ignoreCase);return n}catch(a){if(a.message===ln)e&&pe.PRINT_WARNING(""+re.failedOptimizationPrefixMsg+(" Unable to optimize: < "+t.toString()+` > +`)+` Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var i="";e&&(i=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),pe.PRINT_ERROR(re.failedOptimizationPrefixMsg+` +`+(" Failed parsing: < "+t.toString()+` > +`)+(" Using the regexp-to-ast library version: "+un.VERSION+` +`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+i)}}return[]}re.getOptimizedStartCodesIndices=Va;function Mt(t,e,r){switch(t.type){case"Disjunction":for(var n=0;n=Ce.minOptimizationVal)for(var m=p.from>=Ce.minOptimizationVal?p.from:Ce.minOptimizationVal,v=p.to,u=Ce.charCodeToOptimizedIndex(m),d=Ce.charCodeToOptimizedIndex(v),A=u;A<=d;A++)e[A]=A}}});break;case"Group":Mt(o.value,e,r);break;default:throw Error("Non Exhaustive Match")}var s=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&yr(o)===!1||o.type!=="Group"&&s===!1)break}break;default:throw Error("non exhaustive match!")}return pe.values(e)}re.firstCharOptimizedIndices=Mt;function bt(t,e,r){var n=Ce.charCodeToOptimizedIndex(t);e[n]=n,r===!0&&Ka(t,e)}function Ka(t,e){var r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){var i=Ce.charCodeToOptimizedIndex(n.charCodeAt(0));e[i]=i}else{var a=r.toLowerCase();if(a!==r){var i=Ce.charCodeToOptimizedIndex(a.charCodeAt(0));e[i]=i}}}function fn(t,e){return pe.find(t.value,function(r){if(typeof r=="number")return pe.contains(e,r);var n=r;return pe.find(e,function(i){return n.from<=i&&i<=n.to})!==void 0})}function yr(t){return t.quantifier&&t.quantifier.atLeast===0?!0:t.value?pe.isArray(t.value)?pe.every(t.value,yr):yr(t.value):!1}var za=function(t){ja(e,t);function e(r){var n=t.call(this)||this;return n.targetCharCodes=r,n.found=!1,n}return e.prototype.visitChildren=function(r){if(this.found!==!0){switch(r.type){case"Lookahead":this.visitLookahead(r);return;case"NegativeLookahead":this.visitNegativeLookahead(r);return}t.prototype.visitChildren.call(this,r)}},e.prototype.visitCharacter=function(r){pe.contains(this.targetCharCodes,r.value)&&(this.found=!0)},e.prototype.visitSet=function(r){r.complement?fn(r,this.targetCharCodes)===void 0&&(this.found=!0):fn(r,this.targetCharCodes)!==void 0&&(this.found=!0)},e}(un.BaseRegExpVisitor);function Ha(t,e){if(e instanceof RegExp){var r=cn.getRegExpAst(e),n=new za(t);return n.visit(r),n.found}else return pe.find(e,function(i){return pe.contains(t,i.charCodeAt(0))})!==void 0}re.canMatchCharCode=Ha});var Tr=R(T=>{"use strict";var hn=T&&T.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(T,"__esModule",{value:!0});T.charCodeToOptimizedIndex=T.minOptimizationVal=T.buildLineBreakIssueMessage=T.LineTerminatorOptimizedTester=T.isShortPattern=T.isCustomPattern=T.cloneEmptyGroups=T.performWarningRuntimeChecks=T.performRuntimeChecks=T.addStickyFlag=T.addStartOfInput=T.findUnreachablePatterns=T.findModesThatDoNotExist=T.findInvalidGroupType=T.findDuplicatePatterns=T.findUnsupportedFlags=T.findStartOfInputAnchor=T.findEmptyMatchRegExps=T.findEndOfInputAnchor=T.findInvalidPatterns=T.findMissingPatterns=T.validatePatterns=T.analyzeTokenTypes=T.enableSticky=T.disableSticky=T.SUPPORT_STICKY=T.MODES=T.DEFAULT_MODE=void 0;var dn=xt(),F=ft(),h=k(),Ye=pn(),vn=Lt(),Ae="PATTERN";T.DEFAULT_MODE="defaultMode";T.MODES="modes";T.SUPPORT_STICKY=typeof new RegExp("(?:)").sticky=="boolean";function Ya(){T.SUPPORT_STICKY=!1}T.disableSticky=Ya;function Xa(){T.SUPPORT_STICKY=!0}T.enableSticky=Xa;function Za(t,e){e=h.defaults(e,{useSticky:T.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:function(g,y){return y()}});var r=e.tracer;r("initCharCodeToOptimizedIndexMap",function(){$a()});var n;r("Reject Lexer.NA",function(){n=h.reject(t,function(g){return g[Ae]===F.Lexer.NA})});var i=!1,a;r("Transform Patterns",function(){i=!1,a=h.map(n,function(g){var y=g[Ae];if(h.isRegExp(y)){var b=y.source;return b.length===1&&b!=="^"&&b!=="$"&&b!=="."&&!y.ignoreCase?b:b.length===2&&b[0]==="\\"&&!h.contains(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],b[1])?b[1]:e.useSticky?gr(y):_r(y)}else{if(h.isFunction(y))return i=!0,{exec:y};if(h.has(y,"exec"))return i=!0,y;if(typeof y=="string"){if(y.length===1)return y;var L=y.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),se=new RegExp(L);return e.useSticky?gr(se):_r(se)}else throw Error("non exhaustive match")}})});var o,s,c,f,p;r("misc mapping",function(){o=h.map(n,function(g){return g.tokenTypeIdx}),s=h.map(n,function(g){var y=g.GROUP;if(y!==F.Lexer.SKIPPED){if(h.isString(y))return y;if(h.isUndefined(y))return!1;throw Error("non exhaustive match")}}),c=h.map(n,function(g){var y=g.LONGER_ALT;if(y){var b=h.indexOf(n,y);return b}}),f=h.map(n,function(g){return g.PUSH_MODE}),p=h.map(n,function(g){return h.has(g,"POP_MODE")})});var l;r("Line Terminator Handling",function(){var g=Tn(e.lineTerminatorCharacters);l=h.map(n,function(y){return!1}),e.positionTracking!=="onlyOffset"&&(l=h.map(n,function(y){if(h.has(y,"LINE_BREAKS"))return y.LINE_BREAKS;if(En(y,g)===!1)return Ye.canMatchCharCode(g,y.PATTERN)}))});var m,v,u,d;r("Misc Mapping #2",function(){m=h.map(n,Ar),v=h.map(a,mn),u=h.reduce(n,function(g,y){var b=y.GROUP;return h.isString(b)&&b!==F.Lexer.SKIPPED&&(g[b]=[]),g},{}),d=h.map(a,function(g,y){return{pattern:a[y],longerAlt:c[y],canLineTerminator:l[y],isCustom:m[y],short:v[y],group:s[y],push:f[y],pop:p[y],tokenTypeIdx:o[y],tokenType:n[y]}})});var A=!0,_=[];return e.safeMode||r("First Char Optimization",function(){_=h.reduce(n,function(g,y,b){if(typeof y.PATTERN=="string"){var L=y.PATTERN.charCodeAt(0),se=Or(L);Rr(g,se,d[b])}else if(h.isArray(y.START_CHARS_HINT)){var fe;h.forEach(y.START_CHARS_HINT,function(ue){var Q=typeof ue=="string"?ue.charCodeAt(0):ue,te=Or(Q);fe!==te&&(fe=te,Rr(g,te,d[b]))})}else if(h.isRegExp(y.PATTERN))if(y.PATTERN.unicode)A=!1,e.ensureOptimizations&&h.PRINT_ERROR(""+Ye.failedOptimizationPrefixMsg+(" Unable to analyze < "+y.PATTERN.toString()+` > pattern. +`)+` The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var Z=Ye.getOptimizedStartCodesIndices(y.PATTERN,e.ensureOptimizations);h.isEmpty(Z)&&(A=!1),h.forEach(Z,function(ue){Rr(g,ue,d[b])})}else e.ensureOptimizations&&h.PRINT_ERROR(""+Ye.failedOptimizationPrefixMsg+(" TokenType: <"+y.name+`> is using a custom token pattern without providing parameter. +`)+` This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),A=!1;return g},[])}),r("ArrayPacking",function(){_=h.packArray(_)}),{emptyGroups:u,patternIdxToConfig:d,charCodeToPatternIdxToConfig:_,hasCustom:i,canBeOptimized:A}}T.analyzeTokenTypes=Za;function Ja(t,e){var r=[],n=yn(t);r=r.concat(n.errors);var i=_n(n.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(Qa(a)),r=r.concat(gn(a)),r=r.concat(An(a,e)),r=r.concat(Rn(a)),r}T.validatePatterns=Ja;function Qa(t){var e=[],r=h.filter(t,function(n){return h.isRegExp(n[Ae])});return e=e.concat(On(r)),e=e.concat(In(r)),e=e.concat(kn(r)),e=e.concat(Pn(r)),e=e.concat(Nn(r)),e}function yn(t){var e=h.filter(t,function(i){return!h.has(i,Ae)}),r=h.map(e,function(i){return{message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:F.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[i]}}),n=h.difference(t,e);return{errors:r,valid:n}}T.findMissingPatterns=yn;function _n(t){var e=h.filter(t,function(i){var a=i[Ae];return!h.isRegExp(a)&&!h.isFunction(a)&&!h.has(a,"exec")&&!h.isString(a)}),r=h.map(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:F.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[i]}}),n=h.difference(t,e);return{errors:r,valid:n}}T.findInvalidPatterns=_n;var eo=/[^\\][\$]/;function On(t){var e=function(i){hn(a,i);function a(){var o=i!==null&&i.apply(this,arguments)||this;return o.found=!1,o}return a.prototype.visitEndAnchor=function(o){this.found=!0},a}(dn.BaseRegExpVisitor),r=h.filter(t,function(i){var a=i[Ae];try{var o=vn.getRegExpAst(a),s=new e;return s.visit(o),s.found}catch(c){return eo.test(a.source)}}),n=h.map(r,function(i){return{message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:F.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[i]}});return n}T.findEndOfInputAnchor=On;function Nn(t){var e=h.filter(t,function(n){var i=n[Ae];return i.test("")}),r=h.map(e,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:F.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[n]}});return r}T.findEmptyMatchRegExps=Nn;var to=/[^\\[][\^]|^\^/;function In(t){var e=function(i){hn(a,i);function a(){var o=i!==null&&i.apply(this,arguments)||this;return o.found=!1,o}return a.prototype.visitStartAnchor=function(o){this.found=!0},a}(dn.BaseRegExpVisitor),r=h.filter(t,function(i){var a=i[Ae];try{var o=vn.getRegExpAst(a),s=new e;return s.visit(o),s.found}catch(c){return to.test(a.source)}}),n=h.map(r,function(i){return{message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:F.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[i]}});return n}T.findStartOfInputAnchor=In;function kn(t){var e=h.filter(t,function(n){var i=n[Ae];return i instanceof RegExp&&(i.multiline||i.global)}),r=h.map(e,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:F.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}});return r}T.findUnsupportedFlags=kn;function Pn(t){var e=[],r=h.map(t,function(a){return h.reduce(t,function(o,s){return a.PATTERN.source===s.PATTERN.source&&!h.contains(e,s)&&s.PATTERN!==F.Lexer.NA&&(e.push(s),o.push(s)),o},[])});r=h.compact(r);var n=h.filter(r,function(a){return a.length>1}),i=h.map(n,function(a){var o=h.map(a,function(c){return c.name}),s=h.first(a).PATTERN;return{message:"The same RegExp pattern ->"+s+"<-"+("has been used in all of the following Token Types: "+o.join(", ")+" <-"),type:F.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:a}});return i}T.findDuplicatePatterns=Pn;function gn(t){var e=h.filter(t,function(n){if(!h.has(n,"GROUP"))return!1;var i=n.GROUP;return i!==F.Lexer.SKIPPED&&i!==F.Lexer.NA&&!h.isString(i)}),r=h.map(e,function(n){return{message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:F.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}});return r}T.findInvalidGroupType=gn;function An(t,e){var r=h.filter(t,function(i){return i.PUSH_MODE!==void 0&&!h.contains(e,i.PUSH_MODE)}),n=h.map(r,function(i){var a="Token Type: ->"+i.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+i.PUSH_MODE+"<-which does not exist";return{message:a,type:F.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}});return n}T.findModesThatDoNotExist=An;function Rn(t){var e=[],r=h.reduce(t,function(n,i,a){var o=i.PATTERN;return o===F.Lexer.NA||(h.isString(o)?n.push({str:o,idx:a,tokenType:i}):h.isRegExp(o)&&no(o)&&n.push({str:o.source,idx:a,tokenType:i})),n},[]);return h.forEach(t,function(n,i){h.forEach(r,function(a){var o=a.str,s=a.idx,c=a.tokenType;if(i"+n.name+"<-")+`in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:f,type:F.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[n,c]})}})}),e}T.findUnreachablePatterns=Rn;function ro(t,e){if(h.isRegExp(e)){var r=e.exec(t);return r!==null&&r.index===0}else{if(h.isFunction(e))return e(t,0,[],{});if(h.has(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function no(t){var e=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return h.find(e,function(r){return t.source.indexOf(r)!==-1})===void 0}function _r(t){var e=t.ignoreCase?"i":"";return new RegExp("^(?:"+t.source+")",e)}T.addStartOfInput=_r;function gr(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}T.addStickyFlag=gr;function io(t,e,r){var n=[];return h.has(t,T.DEFAULT_MODE)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+T.DEFAULT_MODE+`> property in its definition +`,type:F.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),h.has(t,T.MODES)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+T.MODES+`> property in its definition +`,type:F.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),h.has(t,T.MODES)&&h.has(t,T.DEFAULT_MODE)&&!h.has(t.modes,t.defaultMode)&&n.push({message:"A MultiMode Lexer cannot be initialized with a "+T.DEFAULT_MODE+": <"+t.defaultMode+`>which does not exist +`,type:F.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),h.has(t,T.MODES)&&h.forEach(t.modes,function(i,a){h.forEach(i,function(o,s){h.isUndefined(o)&&n.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+a+"> at index: <"+s+`> +`),type:F.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),n}T.performRuntimeChecks=io;function ao(t,e,r){var n=[],i=!1,a=h.compact(h.flatten(h.mapValues(t.modes,function(c){return c}))),o=h.reject(a,function(c){return c[Ae]===F.Lexer.NA}),s=Tn(r);return e&&h.forEach(o,function(c){var f=En(c,s);if(f!==!1){var p=Sn(c,f),l={message:p,type:f.issue,tokenType:c};n.push(l)}else h.has(c,"LINE_BREAKS")?c.LINE_BREAKS===!0&&(i=!0):Ye.canMatchCharCode(s,c.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:F.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),n}T.performWarningRuntimeChecks=ao;function oo(t){var e={},r=h.keys(t);return h.forEach(r,function(n){var i=t[n];if(h.isArray(i))e[n]=[];else throw Error("non exhaustive match")}),e}T.cloneEmptyGroups=oo;function Ar(t){var e=t.PATTERN;if(h.isRegExp(e))return!1;if(h.isFunction(e))return!0;if(h.has(e,"exec"))return!0;if(h.isString(e))return!1;throw Error("non exhaustive match")}T.isCustomPattern=Ar;function mn(t){return h.isString(t)&&t.length===1?t.charCodeAt(0):!1}T.isShortPattern=mn;T.LineTerminatorOptimizedTester={test:function(t){for(var e=t.length,r=this.lastIndex;r Token Type +`)+(" Root cause: "+e.errMsg+`. +`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===F.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. +`+(" The problem is in the <"+t.name+`> Token Type +`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}T.buildLineBreakIssueMessage=Sn;function Tn(t){var e=h.map(t,function(r){return h.isString(r)&&r.length>0?r.charCodeAt(0):r});return e}function Rr(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}T.minOptimizationVal=256;var Ft=[];function Or(t){return t255?255+~~(t/255):t}}});var Xe=R(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.isTokenType=N.hasExtendingTokensTypesMapProperty=N.hasExtendingTokensTypesProperty=N.hasCategoriesProperty=N.hasShortKeyProperty=N.singleAssignCategoriesToksMap=N.assignCategoriesMapProp=N.assignCategoriesTokensProp=N.assignTokenDefaultProps=N.expandCategories=N.augmentTokenTypes=N.tokenIdxToClass=N.tokenShortNameIdx=N.tokenStructuredMatcherNoCategories=N.tokenStructuredMatcher=void 0;var V=k();function so(t,e){var r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0}N.tokenStructuredMatcher=so;function uo(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}N.tokenStructuredMatcherNoCategories=uo;N.tokenShortNameIdx=1;N.tokenIdxToClass={};function co(t){var e=xn(t);Cn(e),Mn(e),Ln(e),V.forEach(e,function(r){r.isParent=r.categoryMatches.length>0})}N.augmentTokenTypes=co;function xn(t){for(var e=V.cloneArr(t),r=t,n=!0;n;){r=V.compact(V.flatten(V.map(r,function(a){return a.CATEGORIES})));var i=V.difference(r,e);e=e.concat(i),V.isEmpty(i)?n=!1:r=i}return e}N.expandCategories=xn;function Cn(t){V.forEach(t,function(e){bn(e)||(N.tokenIdxToClass[N.tokenShortNameIdx]=e,e.tokenTypeIdx=N.tokenShortNameIdx++),Nr(e)&&!V.isArray(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Nr(e)||(e.CATEGORIES=[]),Fn(e)||(e.categoryMatches=[]),wn(e)||(e.categoryMatchesMap={})})}N.assignTokenDefaultProps=Cn;function Ln(t){V.forEach(t,function(e){e.categoryMatches=[],V.forEach(e.categoryMatchesMap,function(r,n){e.categoryMatches.push(N.tokenIdxToClass[n].tokenTypeIdx)})})}N.assignCategoriesTokensProp=Ln;function Mn(t){V.forEach(t,function(e){Ir([],e)})}N.assignCategoriesMapProp=Mn;function Ir(t,e){V.forEach(t,function(r){e.categoryMatchesMap[r.tokenTypeIdx]=!0}),V.forEach(e.CATEGORIES,function(r){var n=t.concat(e);V.contains(n,r)||Ir(n,r)})}N.singleAssignCategoriesToksMap=Ir;function bn(t){return V.has(t,"tokenTypeIdx")}N.hasShortKeyProperty=bn;function Nr(t){return V.has(t,"CATEGORIES")}N.hasCategoriesProperty=Nr;function Fn(t){return V.has(t,"categoryMatches")}N.hasExtendingTokensTypesProperty=Fn;function wn(t){return V.has(t,"categoryMatchesMap")}N.hasExtendingTokensTypesMapProperty=wn;function lo(t){return V.has(t,"tokenTypeIdx")}N.isTokenType=lo});var kr=R(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.defaultLexerErrorProvider=void 0;wt.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(t){return"Unable to pop Lexer Mode after encountering Token ->"+t.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(t,e,r,n,i){return"unexpected character: ->"+t.charAt(e)+"<- at offset: "+e+","+(" skipped "+r+" characters.")}}});var ft=R(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.Lexer=qe.LexerDefinitionErrorType=void 0;var Ee=Tr(),w=k(),fo=Xe(),po=kr(),ho=Lt(),vo;(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"})(vo=qe.LexerDefinitionErrorType||(qe.LexerDefinitionErrorType={}));var pt={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:po.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(pt);var mo=function(){function t(e,r){var n=this;if(r===void 0&&(r=pt),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=w.merge(pt,r);var i=this.config.traceInitPerf;i===!0?(this.traceInitMaxIdent=Infinity,this.traceInitPerf=!0):typeof i=="number"&&(this.traceInitMaxIdent=i,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var a,o=!0;n.TRACE_INIT("Lexer Config handling",function(){if(n.config.lineTerminatorsPattern===pt.lineTerminatorsPattern)n.config.lineTerminatorsPattern=Ee.LineTerminatorOptimizedTester;else if(n.config.lineTerminatorCharacters===pt.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');n.trackStartLines=/full|onlyStart/i.test(n.config.positionTracking),n.trackEndLines=/full/i.test(n.config.positionTracking),w.isArray(e)?(a={modes:{}},a.modes[Ee.DEFAULT_MODE]=w.cloneArr(e),a[Ee.DEFAULT_MODE]=Ee.DEFAULT_MODE):(o=!1,a=w.cloneObj(e))}),n.config.skipValidations===!1&&(n.TRACE_INIT("performRuntimeChecks",function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(Ee.performRuntimeChecks(a,n.trackStartLines,n.config.lineTerminatorCharacters))}),n.TRACE_INIT("performWarningRuntimeChecks",function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat(Ee.performWarningRuntimeChecks(a,n.trackStartLines,n.config.lineTerminatorCharacters))})),a.modes=a.modes?a.modes:{},w.forEach(a.modes,function(p,l){a.modes[l]=w.reject(p,function(m){return w.isUndefined(m)})});var s=w.keys(a.modes);if(w.forEach(a.modes,function(p,l){n.TRACE_INIT("Mode: <"+l+"> processing",function(){if(n.modes.push(l),n.config.skipValidations===!1&&n.TRACE_INIT("validatePatterns",function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(Ee.validatePatterns(p,s))}),w.isEmpty(n.lexerDefinitionErrors)){fo.augmentTokenTypes(p);var m;n.TRACE_INIT("analyzeTokenTypes",function(){m=Ee.analyzeTokenTypes(p,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:n.TRACE_INIT.bind(n)})}),n.patternIdxToConfig[l]=m.patternIdxToConfig,n.charCodeToPatternIdxToConfig[l]=m.charCodeToPatternIdxToConfig,n.emptyGroups=w.merge(n.emptyGroups,m.emptyGroups),n.hasCustom=m.hasCustom||n.hasCustom,n.canModeBeOptimized[l]=m.canBeOptimized}})}),n.defaultMode=a.defaultMode,!w.isEmpty(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var c=w.map(n.lexerDefinitionErrors,function(p){return p.message}),f=c.join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+f)}w.forEach(n.lexerDefinitionWarning,function(p){w.PRINT_WARNING(p.message)}),n.TRACE_INIT("Choosing sub-methods implementations",function(){if(Ee.SUPPORT_STICKY?(n.chopInput=w.IDENTITY,n.match=n.matchWithTest):(n.updateLastIndex=w.NOOP,n.match=n.matchWithExec),o&&(n.handleModes=w.NOOP),n.trackStartLines===!1&&(n.computeNewColumn=w.IDENTITY),n.trackEndLines===!1&&(n.updateTokenEndLineColumnLocation=w.NOOP),/full/i.test(n.config.positionTracking))n.createTokenInstance=n.createFullToken;else if(/onlyStart/i.test(n.config.positionTracking))n.createTokenInstance=n.createStartOnlyToken;else if(/onlyOffset/i.test(n.config.positionTracking))n.createTokenInstance=n.createOffsetOnlyToken;else throw Error('Invalid config option: "'+n.config.positionTracking+'"');n.hasCustom?(n.addToken=n.addTokenUsingPush,n.handlePayload=n.handlePayloadWithCustom):(n.addToken=n.addTokenUsingMemberAccess,n.handlePayload=n.handlePayloadNoCustom)}),n.TRACE_INIT("Failed Optimization Warnings",function(){var p=w.reduce(n.canModeBeOptimized,function(l,m,v){return m===!1&&l.push(v),l},[]);if(r.ensureOptimizations&&!w.isEmpty(p))throw Error("Lexer Modes: < "+p.join(", ")+` > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),n.TRACE_INIT("clearRegExpParserCache",function(){ho.clearRegExpParserCache()}),n.TRACE_INIT("toFastProperties",function(){w.toFastProperties(n)})})}return t.prototype.tokenize=function(e,r){if(r===void 0&&(r=this.defaultMode),!w.isEmpty(this.lexerDefinitionErrors)){var n=w.map(this.lexerDefinitionErrors,function(o){return o.message}),i=n.join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+i)}var a=this.tokenizeInternal(e,r);return a},t.prototype.tokenizeInternal=function(e,r){var n=this,i,a,o,s,c,f,p,l,m,v,u,d,A,_,g,y=e,b=y.length,L=0,se=0,fe=this.hasCustom?0:Math.floor(e.length/10),Z=new Array(fe),ue=[],Q=this.trackStartLines?1:void 0,te=this.trackStartLines?1:void 0,xe=Ee.cloneEmptyGroups(this.emptyGroups),it=this.trackStartLines,at=this.config.lineTerminatorsPattern,Ke=0,we=[],ot=[],It=[],Qr=[];Object.freeze(Qr);var st=void 0;function Jr(){return we}function en(J){var lt=Ee.charCodeToOptimizedIndex(J),ze=ot[lt];return ze===void 0?Qr:ze}var wa=function(J){if(It.length===1&&J.tokenType.PUSH_MODE===void 0){var lt=n.config.errorMessageProvider.buildUnableToPopLexerModeMessage(J);ue.push({offset:J.startOffset,line:J.startLine!==void 0?J.startLine:void 0,column:J.startColumn!==void 0?J.startColumn:void 0,length:J.image.length,message:lt})}else{It.pop();var ze=w.last(It);we=n.patternIdxToConfig[ze],ot=n.charCodeToPatternIdxToConfig[ze],Ke=we.length;var Ua=n.canModeBeOptimized[ze]&&n.config.safeMode===!1;ot&&Ua?st=en:st=Jr}};function tn(J){It.push(J),ot=this.charCodeToPatternIdxToConfig[J],we=this.patternIdxToConfig[J],Ke=we.length,Ke=we.length;var lt=this.canModeBeOptimized[J]&&this.config.safeMode===!1;ot&<?st=en:st=Jr}tn.call(this,r);for(var me;Lc.length&&(c=o,f=p,me=fr)}break}}if(c!==null){if(l=c.length,m=me.group,m!==void 0&&(v=me.tokenTypeIdx,u=this.createTokenInstance(c,L,v,me.tokenType,Q,te,l),this.handlePayload(u,f),m===!1?se=this.addToken(Z,se,u):xe[m].push(u)),e=this.chopInput(e,l),L=L+l,te=this.computeNewColumn(te,l),it===!0&&me.canLineTerminator===!0){var kt=0,hr=void 0,dr=void 0;at.lastIndex=0;do hr=at.test(c),hr===!0&&(dr=at.lastIndex-1,kt++);while(hr===!0);kt!==0&&(Q=Q+kt,te=l-dr,this.updateTokenEndLineColumnLocation(u,m,dr,kt,Q,te,l))}this.handleModes(me,wa,tn,u)}else{for(var vr=L,an=Q,on=te,ct=!1;!ct&&L <"+e+">");var i=w.timer(r),a=i.time,o=i.value,s=a>10?console.warn:console.log;return this.traceInitIndent time: "+a+"ms"),this.traceInitIndent--,o}else return r()},t.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",t.NA=/NOT_APPLICABLE/,t}();qe.Lexer=mo});var Ue=R(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.tokenMatcher=H.createTokenInstance=H.EOF=H.createToken=H.hasTokenLabel=H.tokenName=H.tokenLabel=void 0;var Te=k(),Eo=ft(),Pr=Xe();function To(t){return Dn(t)?t.LABEL:t.name}H.tokenLabel=To;function yo(t){return t.name}H.tokenName=yo;function Dn(t){return Te.isString(t.LABEL)&&t.LABEL!==""}H.hasTokenLabel=Dn;var _o="parent",Un="categories",Gn="label",Wn="group",Bn="push_mode",qn="pop_mode",jn="longer_alt",Vn="line_breaks",Kn="start_chars_hint";function zn(t){return go(t)}H.createToken=zn;function go(t){var e=t.pattern,r={};if(r.name=t.name,Te.isUndefined(e)||(r.PATTERN=e),Te.has(t,_o))throw`The parent property is no longer supported. +See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Te.has(t,Un)&&(r.CATEGORIES=t[Un]),Pr.augmentTokenTypes([r]),Te.has(t,Gn)&&(r.LABEL=t[Gn]),Te.has(t,Wn)&&(r.GROUP=t[Wn]),Te.has(t,qn)&&(r.POP_MODE=t[qn]),Te.has(t,Bn)&&(r.PUSH_MODE=t[Bn]),Te.has(t,jn)&&(r.LONGER_ALT=t[jn]),Te.has(t,Vn)&&(r.LINE_BREAKS=t[Vn]),Te.has(t,Kn)&&(r.START_CHARS_HINT=t[Kn]),r}H.EOF=zn({name:"EOF",pattern:Eo.Lexer.NA});Pr.augmentTokenTypes([H.EOF]);function Ao(t,e,r,n,i,a,o,s){return{image:e,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}H.createTokenInstance=Ao;function Ro(t,e){return Pr.tokenStructuredMatcher(t,e)}H.tokenMatcher=Ro});var ne=R(S=>{"use strict";var Le=S&&S.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(S,"__esModule",{value:!0});S.serializeProduction=S.serializeGrammar=S.Terminal=S.Alternation=S.RepetitionWithSeparator=S.Repetition=S.RepetitionMandatoryWithSeparator=S.RepetitionMandatory=S.Option=S.Alternative=S.Rule=S.NonTerminal=S.AbstractProduction=void 0;var G=k(),Oo=Ue(),Re=function(){function t(e){this._definition=e}return Object.defineProperty(t.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),t.prototype.accept=function(e){e.visit(this),G.forEach(this.definition,function(r){r.accept(e)})},t}();S.AbstractProduction=Re;var Hn=function(t){Le(e,t);function e(r){var n=t.call(this,[])||this;return n.idx=1,G.assign(n,G.pick(r,function(i){return i!==void 0})),n}return Object.defineProperty(e.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(r){},enumerable:!1,configurable:!0}),e.prototype.accept=function(r){r.visit(this)},e}(Re);S.NonTerminal=Hn;var Yn=function(t){Le(e,t);function e(r){var n=t.call(this,r.definition)||this;return n.orgText="",G.assign(n,G.pick(r,function(i){return i!==void 0})),n}return e}(Re);S.Rule=Yn;var Xn=function(t){Le(e,t);function e(r){var n=t.call(this,r.definition)||this;return n.ignoreAmbiguities=!1,G.assign(n,G.pick(r,function(i){return i!==void 0})),n}return e}(Re);S.Alternative=Xn;var $n=function(t){Le(e,t);function e(r){var n=t.call(this,r.definition)||this;return n.idx=1,G.assign(n,G.pick(r,function(i){return i!==void 0})),n}return e}(Re);S.Option=$n;var Zn=function(t){Le(e,t);function e(r){var n=t.call(this,r.definition)||this;return n.idx=1,G.assign(n,G.pick(r,function(i){return i!==void 0})),n}return e}(Re);S.RepetitionMandatory=Zn;var Qn=function(t){Le(e,t);function e(r){var n=t.call(this,r.definition)||this;return n.idx=1,G.assign(n,G.pick(r,function(i){return i!==void 0})),n}return e}(Re);S.RepetitionMandatoryWithSeparator=Qn;var Jn=function(t){Le(e,t);function e(r){var n=t.call(this,r.definition)||this;return n.idx=1,G.assign(n,G.pick(r,function(i){return i!==void 0})),n}return e}(Re);S.Repetition=Jn;var ei=function(t){Le(e,t);function e(r){var n=t.call(this,r.definition)||this;return n.idx=1,G.assign(n,G.pick(r,function(i){return i!==void 0})),n}return e}(Re);S.RepetitionWithSeparator=ei;var ti=function(t){Le(e,t);function e(r){var n=t.call(this,r.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,G.assign(n,G.pick(r,function(i){return i!==void 0})),n}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(r){this._definition=r},enumerable:!1,configurable:!0}),e}(Re);S.Alternation=ti;var Dt=function(){function t(e){this.idx=1,G.assign(this,G.pick(e,function(r){return r!==void 0}))}return t.prototype.accept=function(e){e.visit(this)},t}();S.Terminal=Dt;function No(t){return G.map(t,ht)}S.serializeGrammar=No;function ht(t){function e(i){return G.map(i,ht)}if(t instanceof Hn)return{type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};if(t instanceof Xn)return{type:"Alternative",definition:e(t.definition)};if(t instanceof $n)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Zn)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Qn)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:ht(new Dt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ei)return{type:"RepetitionWithSeparator",idx:t.idx,separator:ht(new Dt({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Jn)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof ti)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof Dt){var r={type:"Terminal",name:t.terminalType.name,label:Oo.tokenLabel(t.terminalType),idx:t.idx},n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=G.isRegExp(n)?n.source:n),r}else{if(t instanceof Yn)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}S.serializeProduction=ht});var Gt=R(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.RestWalker=void 0;var Sr=k(),ie=ne(),Io=function(){function t(){}return t.prototype.walk=function(e,r){var n=this;r===void 0&&(r=[]),Sr.forEach(e.definition,function(i,a){var o=Sr.drop(e.definition,a+1);if(i instanceof ie.NonTerminal)n.walkProdRef(i,o,r);else if(i instanceof ie.Terminal)n.walkTerminal(i,o,r);else if(i instanceof ie.Alternative)n.walkFlat(i,o,r);else if(i instanceof ie.Option)n.walkOption(i,o,r);else if(i instanceof ie.RepetitionMandatory)n.walkAtLeastOne(i,o,r);else if(i instanceof ie.RepetitionMandatoryWithSeparator)n.walkAtLeastOneSep(i,o,r);else if(i instanceof ie.RepetitionWithSeparator)n.walkManySep(i,o,r);else if(i instanceof ie.Repetition)n.walkMany(i,o,r);else if(i instanceof ie.Alternation)n.walkOr(i,o,r);else throw Error("non exhaustive match")})},t.prototype.walkTerminal=function(e,r,n){},t.prototype.walkProdRef=function(e,r,n){},t.prototype.walkFlat=function(e,r,n){var i=r.concat(n);this.walk(e,i)},t.prototype.walkOption=function(e,r,n){var i=r.concat(n);this.walk(e,i)},t.prototype.walkAtLeastOne=function(e,r,n){var i=[new ie.Option({definition:e.definition})].concat(r,n);this.walk(e,i)},t.prototype.walkAtLeastOneSep=function(e,r,n){var i=ri(e,r,n);this.walk(e,i)},t.prototype.walkMany=function(e,r,n){var i=[new ie.Option({definition:e.definition})].concat(r,n);this.walk(e,i)},t.prototype.walkManySep=function(e,r,n){var i=ri(e,r,n);this.walk(e,i)},t.prototype.walkOr=function(e,r,n){var i=this,a=r.concat(n);Sr.forEach(e.definition,function(o){var s=new ie.Alternative({definition:[o]});i.walk(s,a)})},t}();Ut.RestWalker=Io;function ri(t,e,r){var n=[new ie.Option({definition:[new ie.Terminal({terminalType:t.separator})].concat(t.definition)})],i=n.concat(e,r);return i}});var $e=R(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.GAstVisitor=void 0;var Oe=ne(),ko=function(){function t(){}return t.prototype.visit=function(e){var r=e;switch(r.constructor){case Oe.NonTerminal:return this.visitNonTerminal(r);case Oe.Alternative:return this.visitAlternative(r);case Oe.Option:return this.visitOption(r);case Oe.RepetitionMandatory:return this.visitRepetitionMandatory(r);case Oe.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(r);case Oe.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(r);case Oe.Repetition:return this.visitRepetition(r);case Oe.Alternation:return this.visitAlternation(r);case Oe.Terminal:return this.visitTerminal(r);case Oe.Rule:return this.visitRule(r);default:throw Error("non exhaustive match")}},t.prototype.visitNonTerminal=function(e){},t.prototype.visitAlternative=function(e){},t.prototype.visitOption=function(e){},t.prototype.visitRepetition=function(e){},t.prototype.visitRepetitionMandatory=function(e){},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){},t.prototype.visitRepetitionWithSeparator=function(e){},t.prototype.visitAlternation=function(e){},t.prototype.visitTerminal=function(e){},t.prototype.visitRule=function(e){},t}();Wt.GAstVisitor=ko});var vt=R(X=>{"use strict";var Po=X&&X.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(X,"__esModule",{value:!0});X.collectMethods=X.DslMethodsCollectorVisitor=X.getProductionDslName=X.isBranchingProd=X.isOptionalProd=X.isSequenceProd=void 0;var dt=k(),W=ne(),So=$e();function xo(t){return t instanceof W.Alternative||t instanceof W.Option||t instanceof W.Repetition||t instanceof W.RepetitionMandatory||t instanceof W.RepetitionMandatoryWithSeparator||t instanceof W.RepetitionWithSeparator||t instanceof W.Terminal||t instanceof W.Rule}X.isSequenceProd=xo;function xr(t,e){e===void 0&&(e=[]);var r=t instanceof W.Option||t instanceof W.Repetition||t instanceof W.RepetitionWithSeparator;return r?!0:t instanceof W.Alternation?dt.some(t.definition,function(n){return xr(n,e)}):t instanceof W.NonTerminal&&dt.contains(e,t)?!1:t instanceof W.AbstractProduction?(t instanceof W.NonTerminal&&e.push(t),dt.every(t.definition,function(n){return xr(n,e)})):!1}X.isOptionalProd=xr;function Co(t){return t instanceof W.Alternation}X.isBranchingProd=Co;function Lo(t){if(t instanceof W.NonTerminal)return"SUBRULE";if(t instanceof W.Option)return"OPTION";if(t instanceof W.Alternation)return"OR";if(t instanceof W.RepetitionMandatory)return"AT_LEAST_ONE";if(t instanceof W.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(t instanceof W.RepetitionWithSeparator)return"MANY_SEP";if(t instanceof W.Repetition)return"MANY";if(t instanceof W.Terminal)return"CONSUME";throw Error("non exhaustive match")}X.getProductionDslName=Lo;var ni=function(t){Po(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.separator="-",r.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},r}return e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(r){var n=r.terminalType.name+this.separator+"Terminal";dt.has(this.dslMethods,n)||(this.dslMethods[n]=[]),this.dslMethods[n].push(r)},e.prototype.visitNonTerminal=function(r){var n=r.nonTerminalName+this.separator+"Terminal";dt.has(this.dslMethods,n)||(this.dslMethods[n]=[]),this.dslMethods[n].push(r)},e.prototype.visitOption=function(r){this.dslMethods.option.push(r)},e.prototype.visitRepetitionWithSeparator=function(r){this.dslMethods.repetitionWithSeparator.push(r)},e.prototype.visitRepetitionMandatory=function(r){this.dslMethods.repetitionMandatory.push(r)},e.prototype.visitRepetitionMandatoryWithSeparator=function(r){this.dslMethods.repetitionMandatoryWithSeparator.push(r)},e.prototype.visitRepetition=function(r){this.dslMethods.repetition.push(r)},e.prototype.visitAlternation=function(r){this.dslMethods.alternation.push(r)},e}(So.GAstVisitor);X.DslMethodsCollectorVisitor=ni;var Bt=new ni;function Mo(t){Bt.reset(),t.accept(Bt);var e=Bt.dslMethods;return Bt.reset(),e}X.collectMethods=Mo});var Lr=R(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.firstForTerminal=Ne.firstForBranching=Ne.firstForSequence=Ne.first=void 0;var qt=k(),ii=ne(),Cr=vt();function jt(t){if(t instanceof ii.NonTerminal)return jt(t.referencedRule);if(t instanceof ii.Terminal)return si(t);if(Cr.isSequenceProd(t))return ai(t);if(Cr.isBranchingProd(t))return oi(t);throw Error("non exhaustive match")}Ne.first=jt;function ai(t){for(var e=[],r=t.definition,n=0,i=r.length>n,a,o=!0;i&&o;)a=r[n],o=Cr.isOptionalProd(a),e=e.concat(jt(a)),n=n+1,i=r.length>n;return qt.uniq(e)}Ne.firstForSequence=ai;function oi(t){var e=qt.map(t.definition,function(r){return jt(r)});return qt.uniq(qt.flatten(e))}Ne.firstForBranching=oi;function si(t){return[t.terminalType]}Ne.firstForTerminal=si});var Mr=R(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.IN=void 0;Vt.IN="_~IN~_"});var pi=R(he=>{"use strict";var bo=he&&he.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(he,"__esModule",{value:!0});he.buildInProdFollowPrefix=he.buildBetweenProdsFollowPrefix=he.computeAllProdsFollows=he.ResyncFollowsWalker=void 0;var Fo=Gt(),wo=Lr(),ui=k(),ci=Mr(),Do=ne(),fi=function(t){bo(e,t);function e(r){var n=t.call(this)||this;return n.topProd=r,n.follows={},n}return e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(r,n,i){},e.prototype.walkProdRef=function(r,n,i){var a=li(r.referencedRule,r.idx)+this.topProd.name,o=n.concat(i),s=new Do.Alternative({definition:o}),c=wo.first(s);this.follows[a]=c},e}(Fo.RestWalker);he.ResyncFollowsWalker=fi;function Uo(t){var e={};return ui.forEach(t,function(r){var n=new fi(r).startWalking();ui.assign(e,n)}),e}he.computeAllProdsFollows=Uo;function li(t,e){return t.name+e+ci.IN}he.buildBetweenProdsFollowPrefix=li;function Go(t){var e=t.terminalType.name;return e+t.idx+ci.IN}he.buildInProdFollowPrefix=Go});var mt=R(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.defaultGrammarValidatorErrorProvider=Me.defaultGrammarResolverErrorProvider=Me.defaultParserErrorProvider=void 0;var Ze=Ue(),Wo=k(),ye=k(),br=ne(),hi=vt();Me.defaultParserErrorProvider={buildMismatchTokenMessage:function(t){var e=t.expected,r=t.actual,n=t.previous,i=t.ruleName,a=Ze.hasTokenLabel(e),o=a?"--> "+Ze.tokenLabel(e)+" <--":"token of type --> "+e.name+" <--",s="Expecting "+o+" but found --> '"+r.image+"' <--";return s},buildNotAllInputParsedMessage:function(t){var e=t.firstRedundant,r=t.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(t){var e=t.expectedPathsPerAlt,r=t.actual,n=t.previous,i=t.customUserDescription,a=t.ruleName,o="Expecting: ",s=ye.first(r).image,c=` +but found: '`+s+"'";if(i)return o+i+c;var f=ye.reduce(e,function(v,u){return v.concat(u)},[]),p=ye.map(f,function(v){return"["+ye.map(v,function(u){return Ze.tokenLabel(u)}).join(", ")+"]"}),l=ye.map(p,function(v,u){return" "+(u+1)+". "+v}),m=`one of these possible Token sequences: +`+l.join(` +`);return o+m+c},buildEarlyExitMessage:function(t){var e=t.expectedIterationPaths,r=t.actual,n=t.customUserDescription,i=t.ruleName,a="Expecting: ",o=ye.first(r).image,s=` +but found: '`+o+"'";if(n)return a+n+s;var c=ye.map(e,function(p){return"["+ye.map(p,function(l){return Ze.tokenLabel(l)}).join(",")+"]"}),f=`expecting at least one iteration which starts with one of these possible Token sequences:: + `+("<"+c.join(" ,")+">");return a+f+s}};Object.freeze(Me.defaultParserErrorProvider);Me.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(t,e){var r="Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+t.name+"<-";return r}};Me.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(t,e){function r(p){return p instanceof br.Terminal?p.terminalType.name:p instanceof br.NonTerminal?p.nonTerminalName:""}var n=t.name,i=ye.first(e),a=i.idx,o=hi.getProductionDslName(i),s=r(i),c=a>0,f="->"+o+(c?a:"")+"<- "+(s?"with argument: ->"+s+"<-":"")+` + appears more than once (`+e.length+" times) in the top level rule: ->"+n+`<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return f=f.replace(/[ \t]+/g," "),f=f.replace(/\s\s+/g,` +`),f},buildNamespaceConflictError:function(t){var e=`Namespace conflict found in grammar. +`+("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+t.name+`>. +`)+`To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`;return e},buildAlternationPrefixAmbiguityError:function(t){var e=ye.map(t.prefixPath,function(i){return Ze.tokenLabel(i)}).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,n="Ambiguous alternatives: <"+t.ambiguityIndices.join(" ,")+`> due to common lookahead prefix +`+("in inside <"+t.topLevelRule.name+`> Rule, +`)+("<"+e+`> may appears as a prefix path in all these alternatives. +`)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`;return n},buildAlternationAmbiguityError:function(t){var e=ye.map(t.prefixPath,function(i){return Ze.tokenLabel(i)}).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,n="Ambiguous Alternatives Detected: <"+t.ambiguityIndices.join(" ,")+"> in "+(" inside <"+t.topLevelRule.name+`> Rule, +`)+("<"+e+`> may appears as a prefix path in all these alternatives. +`);return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n},buildEmptyRepetitionError:function(t){var e=hi.getProductionDslName(t.repetition);t.repetition.idx!==0&&(e+=t.repetition.idx);var r="The repetition <"+e+"> within Rule <"+t.topLevelRule.name+`> can never consume any tokens. +This could lead to an infinite loop.`;return r},buildTokenNameError:function(t){return"deprecated"},buildEmptyAlternationError:function(t){var e="Ambiguous empty alternative: <"+(t.emptyChoiceIdx+1)+">"+(" in inside <"+t.topLevelRule.name+`> Rule. +`)+"Only the last alternative may be an empty alternative.";return e},buildTooManyAlternativesError:function(t){var e=`An Alternation cannot have more than 256 alternatives: +`+(" inside <"+t.topLevelRule.name+`> Rule. + has `+(t.alternation.definition.length+1)+" alternatives.");return e},buildLeftRecursionError:function(t){var e=t.topLevelRule.name,r=Wo.map(t.leftRecursionPath,function(a){return a.name}),n=e+" --> "+r.concat([e]).join(" --> "),i=`Left Recursion found in grammar. +`+("rule: <"+e+`> can be invoked from itself (directly or indirectly) +`)+(`without consuming any Tokens. The grammar path that causes this is: + `+n+` +`)+` To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return i},buildInvalidRuleNameError:function(t){return"deprecated"},buildDuplicateRuleNameError:function(t){var e;t.topLevelRule instanceof br.Rule?e=t.topLevelRule.name:e=t.topLevelRule;var r="Duplicate definition, rule: ->"+e+"<- is already defined in the grammar: ->"+t.grammarName+"<-";return r}}});var mi=R(Ge=>{"use strict";var Bo=Ge&&Ge.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.GastRefResolverVisitor=Ge.resolveGrammar=void 0;var qo=ce(),di=k(),jo=$e();function Vo(t,e){var r=new vi(t,e);return r.resolveRefs(),r.errors}Ge.resolveGrammar=Vo;var vi=function(t){Bo(e,t);function e(r,n){var i=t.call(this)||this;return i.nameToTopRule=r,i.errMsgProvider=n,i.errors=[],i}return e.prototype.resolveRefs=function(){var r=this;di.forEach(di.values(this.nameToTopRule),function(n){r.currTopLevel=n,n.accept(r)})},e.prototype.visitNonTerminal=function(r){var n=this.nameToTopRule[r.nonTerminalName];if(n)r.referencedRule=n;else{var i=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,r);this.errors.push({message:i,type:qo.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:r.nonTerminalName})}},e}(jo.GAstVisitor);Ge.GastRefResolverVisitor=vi});var Tt=R(j=>{"use strict";var je=j&&j.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(j,"__esModule",{value:!0});j.nextPossibleTokensAfter=j.possiblePathsFrom=j.NextTerminalAfterAtLeastOneSepWalker=j.NextTerminalAfterAtLeastOneWalker=j.NextTerminalAfterManySepWalker=j.NextTerminalAfterManyWalker=j.AbstractNextTerminalAfterProductionWalker=j.NextAfterTokenWalker=j.AbstractNextPossibleTokensWalker=void 0;var Ei=Gt(),I=k(),Ko=Lr(),O=ne(),Ti=function(t){je(e,t);function e(r,n){var i=t.call(this)||this;return i.topProd=r,i.path=n,i.possibleTokTypes=[],i.nextProductionName="",i.nextProductionOccurrence=0,i.found=!1,i.isAtEndOfPath=!1,i}return e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=I.cloneArr(this.path.ruleStack).reverse(),this.occurrenceStack=I.cloneArr(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(r,n){n===void 0&&(n=[]),this.found||t.prototype.walk.call(this,r,n)},e.prototype.walkProdRef=function(r,n,i){if(r.referencedRule.name===this.nextProductionName&&r.idx===this.nextProductionOccurrence){var a=n.concat(i);this.updateExpectedNext(),this.walk(r.referencedRule,a)}},e.prototype.updateExpectedNext=function(){I.isEmpty(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(Ei.RestWalker);j.AbstractNextPossibleTokensWalker=Ti;var zo=function(t){je(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.path=n,i.nextTerminalName="",i.nextTerminalOccurrence=0,i.nextTerminalName=i.path.lastTok.name,i.nextTerminalOccurrence=i.path.lastTokOccurrence,i}return e.prototype.walkTerminal=function(r,n,i){if(this.isAtEndOfPath&&r.terminalType.name===this.nextTerminalName&&r.idx===this.nextTerminalOccurrence&&!this.found){var a=n.concat(i),o=new O.Alternative({definition:a});this.possibleTokTypes=Ko.first(o),this.found=!0}},e}(Ti);j.NextAfterTokenWalker=zo;var Et=function(t){je(e,t);function e(r,n){var i=t.call(this)||this;return i.topRule=r,i.occurrence=n,i.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},i}return e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(Ei.RestWalker);j.AbstractNextTerminalAfterProductionWalker=Et;var Ho=function(t){je(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.walkMany=function(r,n,i){if(r.idx===this.occurrence){var a=I.first(n.concat(i));this.result.isEndOfRule=a===void 0,a instanceof O.Terminal&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else t.prototype.walkMany.call(this,r,n,i)},e}(Et);j.NextTerminalAfterManyWalker=Ho;var Yo=function(t){je(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.walkManySep=function(r,n,i){if(r.idx===this.occurrence){var a=I.first(n.concat(i));this.result.isEndOfRule=a===void 0,a instanceof O.Terminal&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else t.prototype.walkManySep.call(this,r,n,i)},e}(Et);j.NextTerminalAfterManySepWalker=Yo;var Xo=function(t){je(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.walkAtLeastOne=function(r,n,i){if(r.idx===this.occurrence){var a=I.first(n.concat(i));this.result.isEndOfRule=a===void 0,a instanceof O.Terminal&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else t.prototype.walkAtLeastOne.call(this,r,n,i)},e}(Et);j.NextTerminalAfterAtLeastOneWalker=Xo;var $o=function(t){je(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.walkAtLeastOneSep=function(r,n,i){if(r.idx===this.occurrence){var a=I.first(n.concat(i));this.result.isEndOfRule=a===void 0,a instanceof O.Terminal&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else t.prototype.walkAtLeastOneSep.call(this,r,n,i)},e}(Et);j.NextTerminalAfterAtLeastOneSepWalker=$o;function yi(t,e,r){r===void 0&&(r=[]),r=I.cloneArr(r);var n=[],i=0;function a(f){return f.concat(I.drop(t,i+1))}function o(f){var p=yi(a(f),e,r);return n.concat(p)}for(;r.length=0;it--){var at=_.definition[it],Ke={idx:u,def:at.definition.concat(I.drop(v)),ruleStack:d,occurrenceStack:A};l.push(Ke),l.push(o)}else if(_ instanceof O.Alternative)l.push({idx:u,def:_.definition.concat(I.drop(v)),ruleStack:d,occurrenceStack:A});else if(_ instanceof O.Rule)l.push(Zo(_,u,d,A));else throw Error("non exhaustive match")}}return p}j.nextPossibleTokensAfter=Qo;function Zo(t,e,r,n){var i=I.cloneArr(r);i.push(t.name);var a=I.cloneArr(n);return a.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:a}}});var yt=R(C=>{"use strict";var _i=C&&C.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(C,"__esModule",{value:!0});C.areTokenCategoriesNotUsed=C.isStrictPrefixOfPath=C.containsPath=C.getLookaheadPathsForOptionalProd=C.getLookaheadPathsForOr=C.lookAheadSequenceFromAlternatives=C.buildSingleAlternativeLookaheadFunction=C.buildAlternativesLookAheadFunc=C.buildLookaheadFuncForOptionalProd=C.buildLookaheadFuncForOr=C.getProdType=C.PROD_TYPE=void 0;var D=k(),gi=Tt(),Jo=Gt(),Kt=Xe(),We=ne(),es=$e(),z;(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(z=C.PROD_TYPE||(C.PROD_TYPE={}));function ts(t){if(t instanceof We.Option)return z.OPTION;if(t instanceof We.Repetition)return z.REPETITION;if(t instanceof We.RepetitionMandatory)return z.REPETITION_MANDATORY;if(t instanceof We.RepetitionMandatoryWithSeparator)return z.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof We.RepetitionWithSeparator)return z.REPETITION_WITH_SEPARATOR;if(t instanceof We.Alternation)return z.ALTERNATION;throw Error("non exhaustive match")}C.getProdType=ts;function rs(t,e,r,n,i,a){var o=Ai(t,e,r),s=Fr(o)?Kt.tokenStructuredMatcherNoCategories:Kt.tokenStructuredMatcher;return a(o,n,s,i)}C.buildLookaheadFuncForOr=rs;function ns(t,e,r,n,i,a){var o=Ri(t,e,i,r),s=Fr(o)?Kt.tokenStructuredMatcherNoCategories:Kt.tokenStructuredMatcher;return a(o[0],s,n)}C.buildLookaheadFuncForOptionalProd=ns;function is(t,e,r,n){var i=t.length,a=D.every(t,function(c){return D.every(c,function(f){return f.length===1})});if(e)return function(c){for(var f=D.map(c,function(y){return y.GATE}),p=0;p{"use strict";var Ur=x&&x.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(x,"__esModule",{value:!0});x.checkPrefixAlternativesAmbiguities=x.validateSomeNonEmptyLookaheadPath=x.validateTooManyAlts=x.RepetionCollector=x.validateAmbiguousAlternationAlternatives=x.validateEmptyOrAlternative=x.getFirstNoneTerminal=x.validateNoLeftRecursion=x.validateRuleIsOverridden=x.validateRuleDoesNotAlreadyExist=x.OccurrenceValidationCollector=x.identifyProductionForDuplicates=x.validateGrammar=void 0;var M=k(),B=k(),Ie=ce(),Gr=vt(),Qe=yt(),cs=Tt(),_e=ne(),Wr=$e();function ps(t,e,r,n,i){var a=M.map(t,function(v){return ls(v,n)}),o=M.map(t,function(v){return Br(v,v,n)}),s=[],c=[],f=[];B.every(o,B.isEmpty)&&(s=B.map(t,function(v){return Pi(v,n)}),c=B.map(t,function(v){return Si(v,e,n)}),f=Ci(t,e,n));var p=fs(t,r,n),l=B.map(t,function(v){return xi(v,n)}),m=B.map(t,function(v){return ki(v,t,i,n)});return M.flatten(a.concat(f,o,s,c,p,l,m))}x.validateGrammar=ps;function ls(t,e){var r=new bi;t.accept(r);var n=r.allProductions,i=M.groupBy(n,Li),a=M.pick(i,function(s){return s.length>1}),o=M.map(M.values(a),function(s){var c=M.first(s),f=e.buildDuplicateFoundError(t,s),p=Gr.getProductionDslName(c),l={message:f,type:Ie.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:p,occurrence:c.idx},m=Mi(c);return m&&(l.parameter=m),l});return o}function Li(t){return Gr.getProductionDslName(t)+"_#_"+t.idx+"_#_"+Mi(t)}x.identifyProductionForDuplicates=Li;function Mi(t){return t instanceof _e.Terminal?t.terminalType.name:t instanceof _e.NonTerminal?t.nonTerminalName:""}var bi=function(t){Ur(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.allProductions=[],r}return e.prototype.visitNonTerminal=function(r){this.allProductions.push(r)},e.prototype.visitOption=function(r){this.allProductions.push(r)},e.prototype.visitRepetitionWithSeparator=function(r){this.allProductions.push(r)},e.prototype.visitRepetitionMandatory=function(r){this.allProductions.push(r)},e.prototype.visitRepetitionMandatoryWithSeparator=function(r){this.allProductions.push(r)},e.prototype.visitRepetition=function(r){this.allProductions.push(r)},e.prototype.visitAlternation=function(r){this.allProductions.push(r)},e.prototype.visitTerminal=function(r){this.allProductions.push(r)},e}(Wr.GAstVisitor);x.OccurrenceValidationCollector=bi;function ki(t,e,r,n){var i=[],a=B.reduce(e,function(s,c){return c.name===t.name?s+1:s},0);if(a>1){var o=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});i.push({message:o,type:Ie.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}x.validateRuleDoesNotAlreadyExist=ki;function hs(t,e,r){var n=[],i;return M.contains(e,t)||(i="Invalid rule override, rule: ->"+t+"<- cannot be overridden in the grammar: ->"+r+"<-as it is not defined in any of the super grammars ",n.push({message:i,type:Ie.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:t})),n}x.validateRuleIsOverridden=hs;function Br(t,e,r,n){n===void 0&&(n=[]);var i=[],a=_t(e.definition);if(M.isEmpty(a))return[];var o=t.name,s=M.contains(a,t);s&&i.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:Ie.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:o});var c=M.difference(a,n.concat([t])),f=M.map(c,function(p){var l=M.cloneArr(n);return l.push(p),Br(t,p,r,l)});return i.concat(M.flatten(f))}x.validateNoLeftRecursion=Br;function _t(t){var e=[];if(M.isEmpty(t))return e;var r=M.first(t);if(r instanceof _e.NonTerminal)e.push(r.referencedRule);else if(r instanceof _e.Alternative||r instanceof _e.Option||r instanceof _e.RepetitionMandatory||r instanceof _e.RepetitionMandatoryWithSeparator||r instanceof _e.RepetitionWithSeparator||r instanceof _e.Repetition)e=e.concat(_t(r.definition));else if(r instanceof _e.Alternation)e=M.flatten(M.map(r.definition,function(o){return _t(o.definition)}));else if(!(r instanceof _e.Terminal))throw Error("non exhaustive match");var n=Gr.isOptionalProd(r),i=t.length>1;if(n&&i){var a=M.drop(t);return e.concat(_t(a))}else return e}x.getFirstNoneTerminal=_t;var qr=function(t){Ur(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.alternations=[],r}return e.prototype.visitAlternation=function(r){this.alternations.push(r)},e}(Wr.GAstVisitor);function Pi(t,e){var r=new qr;t.accept(r);var n=r.alternations,i=M.reduce(n,function(a,o){var s=M.dropRight(o.definition),c=M.map(s,function(f,p){var l=cs.nextPossibleTokensAfter([f],[],null,1);return M.isEmpty(l)?{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:o,emptyChoiceIdx:p}),type:Ie.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:o.idx,alternative:p+1}:null});return a.concat(M.compact(c))},[]);return i}x.validateEmptyOrAlternative=Pi;function Si(t,e,r){var n=new qr;t.accept(n);var i=n.alternations;i=B.reject(i,function(o){return o.ignoreAmbiguities===!0});var a=M.reduce(i,function(o,s){var c=s.idx,f=s.maxLookahead||e,p=Qe.getLookaheadPathsForOr(c,t,f,s),l=ds(p,s,t,r),m=Fi(p,s,t,r);return o.concat(l,m)},[]);return a}x.validateAmbiguousAlternationAlternatives=Si;var wi=function(t){Ur(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.allProductions=[],r}return e.prototype.visitRepetitionWithSeparator=function(r){this.allProductions.push(r)},e.prototype.visitRepetitionMandatory=function(r){this.allProductions.push(r)},e.prototype.visitRepetitionMandatoryWithSeparator=function(r){this.allProductions.push(r)},e.prototype.visitRepetition=function(r){this.allProductions.push(r)},e}(Wr.GAstVisitor);x.RepetionCollector=wi;function xi(t,e){var r=new qr;t.accept(r);var n=r.alternations,i=M.reduce(n,function(a,o){return o.definition.length>255&&a.push({message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:o}),type:Ie.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:t.name,occurrence:o.idx}),a},[]);return i}x.validateTooManyAlts=xi;function Ci(t,e,r){var n=[];return B.forEach(t,function(i){var a=new wi;i.accept(a);var o=a.allProductions;B.forEach(o,function(s){var c=Qe.getProdType(s),f=s.maxLookahead||e,p=s.idx,l=Qe.getLookaheadPathsForOptionalProd(p,i,c,f),m=l[0];if(B.isEmpty(B.flatten(m))){var v=r.buildEmptyRepetitionError({topLevelRule:i,repetition:s});n.push({message:v,type:Ie.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}x.validateSomeNonEmptyLookaheadPath=Ci;function ds(t,e,r,n){var i=[],a=B.reduce(t,function(s,c,f){return e.definition[f].ignoreAmbiguities===!0||B.forEach(c,function(p){var l=[f];B.forEach(t,function(m,v){f!==v&&Qe.containsPath(m,p)&&e.definition[v].ignoreAmbiguities!==!0&&l.push(v)}),l.length>1&&!Qe.containsPath(i,p)&&(i.push(p),s.push({alts:l,path:p}))}),s},[]),o=M.map(a,function(s){var c=B.map(s.alts,function(p){return p+1}),f=n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:c,prefixPath:s.path});return{message:f,type:Ie.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:[s.alts]}});return o}function Fi(t,e,r,n){var i=[],a=B.reduce(t,function(o,s,c){var f=B.map(s,function(p){return{idx:c,path:p}});return o.concat(f)},[]);return B.forEach(a,function(o){var s=e.definition[o.idx];if(s.ignoreAmbiguities!==!0){var c=o.idx,f=o.path,p=B.findAll(a,function(m){return e.definition[m.idx].ignoreAmbiguities!==!0&&m.idx{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.validateGrammar=Je.resolveGrammar=void 0;var Vr=k(),vs=mi(),ms=jr(),Di=mt();function Es(t){t=Vr.defaults(t,{errMsgProvider:Di.defaultGrammarResolverErrorProvider});var e={};return Vr.forEach(t.rules,function(r){e[r.name]=r}),vs.resolveGrammar(e,t.errMsgProvider)}Je.resolveGrammar=Es;function Ts(t){return t=Vr.defaults(t,{errMsgProvider:Di.defaultGrammarValidatorErrorProvider}),ms.validateGrammar(t.rules,t.maxLookahead,t.tokenTypes,t.errMsgProvider,t.grammarName)}Je.validateGrammar=Ts});var et=R(ae=>{"use strict";var gt=ae&&ae.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ae,"__esModule",{value:!0});ae.EarlyExitException=ae.NotAllInputParsedException=ae.NoViableAltException=ae.MismatchedTokenException=ae.isRecognitionException=void 0;var ys=k(),Gi="MismatchedTokenException",Wi="NoViableAltException",Bi="EarlyExitException",qi="NotAllInputParsedException",ji=[Gi,Wi,Bi,qi];Object.freeze(ji);function _s(t){return ys.contains(ji,t.name)}ae.isRecognitionException=_s;var zt=function(t){gt(e,t);function e(r,n){var i=this.constructor,a=t.call(this,r)||this;return a.token=n,a.resyncedTokens=[],Object.setPrototypeOf(a,i.prototype),Error.captureStackTrace&&Error.captureStackTrace(a,a.constructor),a}return e}(Error),gs=function(t){gt(e,t);function e(r,n,i){var a=t.call(this,r,n)||this;return a.previousToken=i,a.name=Gi,a}return e}(zt);ae.MismatchedTokenException=gs;var As=function(t){gt(e,t);function e(r,n,i){var a=t.call(this,r,n)||this;return a.previousToken=i,a.name=Wi,a}return e}(zt);ae.NoViableAltException=As;var Rs=function(t){gt(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name=qi,i}return e}(zt);ae.NotAllInputParsedException=Rs;var Os=function(t){gt(e,t);function e(r,n,i){var a=t.call(this,r,n)||this;return a.previousToken=i,a.name=Bi,a}return e}(zt);ae.EarlyExitException=Os});var zr=R($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.attemptInRepetitionRecovery=$.Recoverable=$.InRuleRecoveryException=$.IN_RULE_RECOVERY_EXCEPTION=$.EOF_FOLLOW_KEY=void 0;var Ht=Ue(),de=k(),Ns=et(),Is=Mr(),ks=ce();$.EOF_FOLLOW_KEY={};$.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";function Kr(t){this.name=$.IN_RULE_RECOVERY_EXCEPTION,this.message=t}$.InRuleRecoveryException=Kr;Kr.prototype=Error.prototype;var Ps=function(){function t(){}return t.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=de.has(e,"recoveryEnabled")?e.recoveryEnabled:ks.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Vi)},t.prototype.getTokenToInsert=function(e){var r=Ht.createTokenInstance(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r},t.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},t.prototype.tryInRepetitionRecovery=function(e,r,n,i){for(var a=this,o=this.findReSyncTokenType(),s=this.exportLexerState(),c=[],f=!1,p=this.LA(1),l=this.LA(1),m=function(){var v=a.LA(0),u=a.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:p,previous:v,ruleName:a.getCurrRuleFullName()}),d=new Ns.MismatchedTokenException(u,p,a.LA(0));d.resyncedTokens=de.dropRight(c),a.SAVE_ERROR(d)};!f;)if(this.tokenMatcher(l,i)){m();return}else if(n.call(this)){m(),e.apply(this,r);return}else this.tokenMatcher(l,o)?f=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,c));this.importLexerState(s)},t.prototype.shouldInRepetitionRecoveryBeTried=function(e,r,n){return!(n===!1||e===void 0||r===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))},t.prototype.getFollowsForInRuleRecovery=function(e,r){var n=this.getCurrentGrammarPath(e,r),i=this.getNextPossibleTokenTypes(n);return i},t.prototype.tryInRuleRecovery=function(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r)){var n=this.getTokenToInsert(e);return n}if(this.canRecoverWithSingleTokenDeletion(e)){var i=this.SKIP_TOKEN();return this.consumeToken(),i}throw new Kr("sad sad panda")},t.prototype.canPerformInRuleRecovery=function(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)},t.prototype.canRecoverWithSingleTokenInsertion=function(e,r){var n=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||de.isEmpty(r))return!1;var i=this.LA(1),a=de.find(r,function(o){return n.tokenMatcher(i,o)})!==void 0;return a},t.prototype.canRecoverWithSingleTokenDeletion=function(e){var r=this.tokenMatcher(this.LA(2),e);return r},t.prototype.isInCurrentRuleReSyncSet=function(e){var r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return de.contains(n,e)},t.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),r=this.LA(1),n=2;;){var i=r.tokenType;if(de.contains(e,i))return i;r=this.LA(n),n++}},t.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return $.EOF_FOLLOW_KEY;var e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}},t.prototype.buildFullFollowKeyStack=function(){var e=this,r=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return de.map(r,function(i,a){return a===0?$.EOF_FOLLOW_KEY:{ruleName:e.shortRuleNameToFullName(i),idxInCallingRule:n[a],inRule:e.shortRuleNameToFullName(r[a-1])}})},t.prototype.flattenFollowSet=function(){var e=this,r=de.map(this.buildFullFollowKeyStack(),function(n){return e.getFollowSetFromFollowKey(n)});return de.flatten(r)},t.prototype.getFollowSetFromFollowKey=function(e){if(e===$.EOF_FOLLOW_KEY)return[Ht.EOF];var r=e.ruleName+e.idxInCallingRule+Is.IN+e.inRule;return this.resyncFollows[r]},t.prototype.addToResyncTokens=function(e,r){return this.tokenMatcher(e,Ht.EOF)||r.push(e),r},t.prototype.reSyncTo=function(e){for(var r=[],n=this.LA(1);this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return de.dropRight(r)},t.prototype.attemptInRepetitionRecovery=function(e,r,n,i,a,o,s){},t.prototype.getCurrentGrammarPath=function(e,r){var n=this.getHumanReadableRuleStack(),i=de.cloneArr(this.RULE_OCCURRENCE_STACK),a={ruleStack:n,occurrenceStack:i,lastTok:e,lastTokOccurrence:r};return a},t.prototype.getHumanReadableRuleStack=function(){var e=this;return de.map(this.RULE_STACK,function(r){return e.shortRuleNameToFullName(r)})},t}();$.Recoverable=Ps;function Vi(t,e,r,n,i,a,o){var s=this.getKeyForAutomaticLookahead(n,i),c=this.firstAfterRepMap[s];if(c===void 0){var f=this.getCurrRuleFullName(),p=this.getGAstProductions()[f],l=new a(p,i);c=l.startWalking(),this.firstAfterRepMap[s]=c}var m=c.token,v=c.occurrence,u=c.isEndOfRule;this.RULE_STACK.length===1&&u&&m===void 0&&(m=Ht.EOF,v=1),this.shouldInRepetitionRecoveryBeTried(m,v,o)&&this.tryInRepetitionRecovery(t,e,r,m)}$.attemptInRepetitionRecovery=Vi});var Yt=R(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.getKeyForAutomaticLookahead=P.AT_LEAST_ONE_SEP_IDX=P.MANY_SEP_IDX=P.AT_LEAST_ONE_IDX=P.MANY_IDX=P.OPTION_IDX=P.OR_IDX=P.BITS_FOR_ALT_IDX=P.BITS_FOR_RULE_IDX=P.BITS_FOR_OCCURRENCE_IDX=P.BITS_FOR_METHOD_TYPE=void 0;P.BITS_FOR_METHOD_TYPE=4;P.BITS_FOR_OCCURRENCE_IDX=8;P.BITS_FOR_RULE_IDX=12;P.BITS_FOR_ALT_IDX=8;P.OR_IDX=1<{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.LooksAhead=void 0;var be=yt(),ge=k(),Ki=ce(),Fe=Yt(),Ve=vt(),xs=function(){function t(){}return t.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=ge.has(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Ki.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=ge.has(e,"maxLookahead")?e.maxLookahead:Ki.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=ge.isES2015MapSupported()?new Map:[],ge.isES2015MapSupported()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},t.prototype.preComputeLookaheadFunctions=function(e){var r=this;ge.forEach(e,function(n){r.TRACE_INIT(n.name+" Rule Lookahead",function(){var i=Ve.collectMethods(n),a=i.alternation,o=i.repetition,s=i.option,c=i.repetitionMandatory,f=i.repetitionMandatoryWithSeparator,p=i.repetitionWithSeparator;ge.forEach(a,function(l){var m=l.idx===0?"":l.idx;r.TRACE_INIT(""+Ve.getProductionDslName(l)+m,function(){var v=be.buildLookaheadFuncForOr(l.idx,n,l.maxLookahead||r.maxLookahead,l.hasPredicates,r.dynamicTokensEnabled,r.lookAheadBuilderForAlternatives),u=Fe.getKeyForAutomaticLookahead(r.fullRuleNameToShort[n.name],Fe.OR_IDX,l.idx);r.setLaFuncCache(u,v)})}),ge.forEach(o,function(l){r.computeLookaheadFunc(n,l.idx,Fe.MANY_IDX,be.PROD_TYPE.REPETITION,l.maxLookahead,Ve.getProductionDslName(l))}),ge.forEach(s,function(l){r.computeLookaheadFunc(n,l.idx,Fe.OPTION_IDX,be.PROD_TYPE.OPTION,l.maxLookahead,Ve.getProductionDslName(l))}),ge.forEach(c,function(l){r.computeLookaheadFunc(n,l.idx,Fe.AT_LEAST_ONE_IDX,be.PROD_TYPE.REPETITION_MANDATORY,l.maxLookahead,Ve.getProductionDslName(l))}),ge.forEach(f,function(l){r.computeLookaheadFunc(n,l.idx,Fe.AT_LEAST_ONE_SEP_IDX,be.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,l.maxLookahead,Ve.getProductionDslName(l))}),ge.forEach(p,function(l){r.computeLookaheadFunc(n,l.idx,Fe.MANY_SEP_IDX,be.PROD_TYPE.REPETITION_WITH_SEPARATOR,l.maxLookahead,Ve.getProductionDslName(l))})})})},t.prototype.computeLookaheadFunc=function(e,r,n,i,a,o){var s=this;this.TRACE_INIT(""+o+(r===0?"":r),function(){var c=be.buildLookaheadFuncForOptionalProd(r,e,a||s.maxLookahead,s.dynamicTokensEnabled,i,s.lookAheadBuilderForOptional),f=Fe.getKeyForAutomaticLookahead(s.fullRuleNameToShort[e.name],n,r);s.setLaFuncCache(f,c)})},t.prototype.lookAheadBuilderForOptional=function(e,r,n){return be.buildSingleAlternativeLookaheadFunction(e,r,n)},t.prototype.lookAheadBuilderForAlternatives=function(e,r,n,i){return be.buildAlternativesLookAheadFunc(e,r,n,i)},t.prototype.getKeyForAutomaticLookahead=function(e,r){var n=this.getLastExplicitRuleShortName();return Fe.getKeyForAutomaticLookahead(n,e,r)},t.prototype.getLaFuncFromCache=function(e){},t.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},t.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},t.prototype.setLaFuncCache=function(e,r){},t.prototype.setLaFuncCacheUsingMap=function(e,r){this.lookAheadFuncsCache.set(e,r)},t.prototype.setLaFuncUsingObj=function(e,r){this.lookAheadFuncsCache[e]=r},t}();Xt.LooksAhead=xs});var Hi=R(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.addNoneTerminalToCst=ke.addTerminalToCst=ke.setNodeLocationFull=ke.setNodeLocationOnlyOffset=void 0;function Cs(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.defineNameProp=Be.functionName=Be.classNameFromInstance=void 0;var Fs=k();function ws(t){return Yi(t.constructor)}Be.classNameFromInstance=ws;var Xi="name";function Yi(t){var e=t.name;return e||"anonymous"}Be.functionName=Yi;function Ds(t,e){var r=Object.getOwnPropertyDescriptor(t,Xi);return Fs.isUndefined(r)||r.configurable?(Object.defineProperty(t,Xi,{enumerable:!1,configurable:!0,writable:!1,value:e}),!0):!1}Be.defineNameProp=Ds});var ea=R(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.validateRedundantMethods=Y.validateMissingCstMethods=Y.validateVisitor=Y.CstVisitorDefinitionError=Y.createBaseVisitorConstructorWithDefaults=Y.createBaseSemanticVisitorConstructor=Y.defaultVisit=void 0;var ve=k(),At=Hr();function $i(t,e){for(var r=ve.keys(t),n=r.length,i=0;i: + `+(""+a.join(` + +`).replace(/\n/g,` + `)))}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}Y.createBaseSemanticVisitorConstructor=Us;function Gs(t,e,r){var n=function(){};At.defineNameProp(n,t+"BaseSemanticsWithDefaults");var i=Object.create(r.prototype);return ve.forEach(e,function(a){i[a]=$i}),n.prototype=i,n.prototype.constructor=n,n}Y.createBaseVisitorConstructorWithDefaults=Gs;var Yr;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(Yr=Y.CstVisitorDefinitionError||(Y.CstVisitorDefinitionError={}));function Zi(t,e){var r=Qi(t,e),n=Ji(t,e);return r.concat(n)}Y.validateVisitor=Zi;function Qi(t,e){var r=ve.map(e,function(n){if(!ve.isFunction(t[n]))return{msg:"Missing visitor method: <"+n+"> on "+At.functionName(t.constructor)+" CST Visitor.",type:Yr.MISSING_METHOD,methodName:n}});return ve.compact(r)}Y.validateMissingCstMethods=Qi;var Ws=["constructor","visit","validateVisitor"];function Ji(t,e){var r=[];for(var n in t)ve.isFunction(t[n])&&!ve.contains(Ws,n)&&!ve.contains(e,n)&&r.push({msg:"Redundant visitor method: <"+n+"> on "+At.functionName(t.constructor)+` CST Visitor +There is no Grammar Rule corresponding to this method's name. +`,type:Yr.REDUNDANT_METHOD,methodName:n});return r}Y.validateRedundantMethods=Ji});var ra=R($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.TreeBuilder=void 0;var tt=Hi(),K=k(),ta=ea(),Bs=ce(),qs=function(){function t(){}return t.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=K.has(e,"nodeLocationTracking")?e.nodeLocationTracking:Bs.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=K.NOOP,this.cstFinallyStateUpdate=K.NOOP,this.cstPostTerminal=K.NOOP,this.cstPostNonTerminal=K.NOOP,this.cstPostRule=K.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=tt.setNodeLocationFull,this.setNodeLocationFromNode=tt.setNodeLocationFull,this.cstPostRule=K.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=K.NOOP,this.setNodeLocationFromNode=K.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=tt.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=tt.setNodeLocationOnlyOffset,this.cstPostRule=K.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=K.NOOP,this.setNodeLocationFromNode=K.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=K.NOOP,this.setNodeLocationFromNode=K.NOOP,this.cstPostRule=K.NOOP,this.setInitialNodeLocation=K.NOOP;else throw Error('Invalid config option: "'+e.nodeLocationTracking+'"')},t.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},t.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},t.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.setInitialNodeLocationFullRegular=function(e){var r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.cstInvocationStateUpdate=function(e,r){var n={name:e,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},t.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},t.prototype.cstPostRuleFull=function(e){var r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},t.prototype.cstPostRuleOnlyOffset=function(e){var r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN},t.prototype.cstPostTerminal=function(e,r){var n=this.CST_STACK[this.CST_STACK.length-1];tt.addTerminalToCst(n,r,e),this.setNodeLocationFromToken(n.location,r)},t.prototype.cstPostNonTerminal=function(e,r){var n=this.CST_STACK[this.CST_STACK.length-1];tt.addNoneTerminalToCst(n,r,e),this.setNodeLocationFromNode(n.location,e.location)},t.prototype.getBaseCstVisitorConstructor=function(){if(K.isUndefined(this.baseCstVisitorConstructor)){var e=ta.createBaseSemanticVisitorConstructor(this.className,K.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},t.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(K.isUndefined(this.baseCstVisitorWithDefaultsConstructor)){var e=ta.createBaseVisitorConstructorWithDefaults(this.className,K.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},t.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},t.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},t.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},t}();$t.TreeBuilder=qs});var ia=R(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.LexerAdapter=void 0;var na=ce(),js=function(){function t(){}return t.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(t.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!1,configurable:!0}),t.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):na.END_OF_FILE},t.prototype.LA=function(e){var r=this.currIdx+e;return r<0||this.tokVectorLength<=r?na.END_OF_FILE:this.tokVector[r]},t.prototype.consumeToken=function(){this.currIdx++},t.prototype.exportLexerState=function(){return this.currIdx},t.prototype.importLexerState=function(e){this.currIdx=e},t.prototype.resetLexerState=function(){this.currIdx=-1},t.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},t.prototype.getLexerPosition=function(){return this.exportLexerState()},t}();Zt.LexerAdapter=js});var oa=R(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.RecognizerApi=void 0;var aa=k(),Vs=et(),Xr=ce(),Ks=mt(),zs=jr(),Hs=ne(),Ys=function(){function t(){}return t.prototype.ACTION=function(e){return e.call(this)},t.prototype.consume=function(e,r,n){return this.consumeInternal(r,e,n)},t.prototype.subrule=function(e,r,n){return this.subruleInternal(r,e,n)},t.prototype.option=function(e,r){return this.optionInternal(r,e)},t.prototype.or=function(e,r){return this.orInternal(r,e)},t.prototype.many=function(e,r){return this.manyInternal(e,r)},t.prototype.atLeastOne=function(e,r){return this.atLeastOneInternal(e,r)},t.prototype.CONSUME=function(e,r){return this.consumeInternal(e,0,r)},t.prototype.CONSUME1=function(e,r){return this.consumeInternal(e,1,r)},t.prototype.CONSUME2=function(e,r){return this.consumeInternal(e,2,r)},t.prototype.CONSUME3=function(e,r){return this.consumeInternal(e,3,r)},t.prototype.CONSUME4=function(e,r){return this.consumeInternal(e,4,r)},t.prototype.CONSUME5=function(e,r){return this.consumeInternal(e,5,r)},t.prototype.CONSUME6=function(e,r){return this.consumeInternal(e,6,r)},t.prototype.CONSUME7=function(e,r){return this.consumeInternal(e,7,r)},t.prototype.CONSUME8=function(e,r){return this.consumeInternal(e,8,r)},t.prototype.CONSUME9=function(e,r){return this.consumeInternal(e,9,r)},t.prototype.SUBRULE=function(e,r){return this.subruleInternal(e,0,r)},t.prototype.SUBRULE1=function(e,r){return this.subruleInternal(e,1,r)},t.prototype.SUBRULE2=function(e,r){return this.subruleInternal(e,2,r)},t.prototype.SUBRULE3=function(e,r){return this.subruleInternal(e,3,r)},t.prototype.SUBRULE4=function(e,r){return this.subruleInternal(e,4,r)},t.prototype.SUBRULE5=function(e,r){return this.subruleInternal(e,5,r)},t.prototype.SUBRULE6=function(e,r){return this.subruleInternal(e,6,r)},t.prototype.SUBRULE7=function(e,r){return this.subruleInternal(e,7,r)},t.prototype.SUBRULE8=function(e,r){return this.subruleInternal(e,8,r)},t.prototype.SUBRULE9=function(e,r){return this.subruleInternal(e,9,r)},t.prototype.OPTION=function(e){return this.optionInternal(e,0)},t.prototype.OPTION1=function(e){return this.optionInternal(e,1)},t.prototype.OPTION2=function(e){return this.optionInternal(e,2)},t.prototype.OPTION3=function(e){return this.optionInternal(e,3)},t.prototype.OPTION4=function(e){return this.optionInternal(e,4)},t.prototype.OPTION5=function(e){return this.optionInternal(e,5)},t.prototype.OPTION6=function(e){return this.optionInternal(e,6)},t.prototype.OPTION7=function(e){return this.optionInternal(e,7)},t.prototype.OPTION8=function(e){return this.optionInternal(e,8)},t.prototype.OPTION9=function(e){return this.optionInternal(e,9)},t.prototype.OR=function(e){return this.orInternal(e,0)},t.prototype.OR1=function(e){return this.orInternal(e,1)},t.prototype.OR2=function(e){return this.orInternal(e,2)},t.prototype.OR3=function(e){return this.orInternal(e,3)},t.prototype.OR4=function(e){return this.orInternal(e,4)},t.prototype.OR5=function(e){return this.orInternal(e,5)},t.prototype.OR6=function(e){return this.orInternal(e,6)},t.prototype.OR7=function(e){return this.orInternal(e,7)},t.prototype.OR8=function(e){return this.orInternal(e,8)},t.prototype.OR9=function(e){return this.orInternal(e,9)},t.prototype.MANY=function(e){this.manyInternal(0,e)},t.prototype.MANY1=function(e){this.manyInternal(1,e)},t.prototype.MANY2=function(e){this.manyInternal(2,e)},t.prototype.MANY3=function(e){this.manyInternal(3,e)},t.prototype.MANY4=function(e){this.manyInternal(4,e)},t.prototype.MANY5=function(e){this.manyInternal(5,e)},t.prototype.MANY6=function(e){this.manyInternal(6,e)},t.prototype.MANY7=function(e){this.manyInternal(7,e)},t.prototype.MANY8=function(e){this.manyInternal(8,e)},t.prototype.MANY9=function(e){this.manyInternal(9,e)},t.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},t.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},t.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},t.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},t.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},t.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},t.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},t.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},t.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},t.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},t.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},t.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},t.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},t.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},t.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},t.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},t.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},t.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},t.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},t.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},t.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},t.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},t.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},t.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},t.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},t.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},t.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},t.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},t.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},t.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},t.prototype.RULE=function(e,r,n){if(n===void 0&&(n=Xr.DEFAULT_RULE_CONFIG),aa.contains(this.definedRulesNames,e)){var i=Ks.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),a={message:i,type:Xr.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(a)}this.definedRulesNames.push(e);var o=this.defineRule(e,r,n);return this[e]=o,o},t.prototype.OVERRIDE_RULE=function(e,r,n){n===void 0&&(n=Xr.DEFAULT_RULE_CONFIG);var i=[];i=i.concat(zs.validateRuleIsOverridden(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(i);var a=this.defineRule(e,r,n);return this[e]=a,a},t.prototype.BACKTRACK=function(e,r){return function(){this.isBackTrackingStack.push(1);var n=this.saveRecogState();try{return e.apply(this,r),!0}catch(i){if(Vs.isRecognitionException(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}},t.prototype.getGAstProductions=function(){return this.gastProductionsCache},t.prototype.getSerializedGastProductions=function(){return Hs.serializeGrammar(aa.values(this.gastProductionsCache))},t}();Qt.RecognizerApi=Ys});var la=R(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.RecognizerEngine=void 0;var q=k(),le=Yt(),er=et(),sa=yt(),rt=Tt(),ua=ce(),Xs=zr(),ca=Ue(),Rt=Xe(),$s=Hr(),Zs=function(){function t(){}return t.prototype.initRecognizerEngine=function(e,r){if(this.className=$s.classNameFromInstance(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Rt.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},q.has(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if(q.isArray(e)){if(q.isEmpty(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if(q.isArray(e))this.tokensMap=q.reduce(e,function(o,s){return o[s.name]=s,o},{});else if(q.has(e,"modes")&&q.every(q.flatten(q.values(e.modes)),Rt.isTokenType)){var n=q.flatten(q.values(e.modes)),i=q.uniq(n);this.tokensMap=q.reduce(i,function(o,s){return o[s.name]=s,o},{})}else if(q.isObject(e))this.tokensMap=q.cloneObj(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=ca.EOF;var a=q.every(q.values(e),function(o){return q.isEmpty(o.categoryMatches)});this.tokenMatcher=a?Rt.tokenStructuredMatcherNoCategories:Rt.tokenStructuredMatcher,Rt.augmentTokenTypes(q.values(this.tokensMap))},t.prototype.defineRule=function(e,r,n){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+`> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var i=q.has(n,"resyncEnabled")?n.resyncEnabled:ua.DEFAULT_RULE_CONFIG.resyncEnabled,a=q.has(n,"recoveryValueFunc")?n.recoveryValueFunc:ua.DEFAULT_RULE_CONFIG.recoveryValueFunc,o=this.ruleShortNameIdx<r},t.prototype.orInternal=function(e,r){var n=this.getKeyForAutomaticLookahead(le.OR_IDX,r),i=q.isArray(e)?e:e.DEF,a=this.getLaFuncFromCache(n),o=a.call(this,i);if(o!==void 0){var s=i[o];return s.ALT.call(this)}this.raiseNoAltException(r,e.ERR_MSG)},t.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new er.NotAllInputParsedException(r,e))}},t.prototype.subruleInternal=function(e,r,n){var i;try{var a=n!==void 0?n.ARGS:void 0;return i=e.call(this,r,a),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),i}catch(o){this.subruleInternalError(o,n,e.ruleName)}},t.prototype.subruleInternalError=function(e,r,n){throw er.isRecognitionException(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e},t.prototype.consumeInternal=function(e,r,n){var i;try{var a=this.LA(1);this.tokenMatcher(a,e)===!0?(this.consumeToken(),i=a):this.consumeInternalError(e,a,n)}catch(o){i=this.consumeInternalRecovery(e,r,o)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,i),i},t.prototype.consumeInternalError=function(e,r,n){var i,a=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new er.MismatchedTokenException(i,r,a))},t.prototype.consumeInternalRecovery=function(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){var i=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,i)}catch(a){throw a.name===Xs.IN_RULE_RECOVERY_EXCEPTION?n:a}}else throw n},t.prototype.saveRecogState=function(){var e=this.errors,r=q.cloneArr(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}},t.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},t.prototype.ruleInvocationStateUpdate=function(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r,e)},t.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},t.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},t.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},t.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),ca.EOF)},t.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},t}();Jt.RecognizerEngine=Zs});var pa=R(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.ErrorHandler=void 0;var $r=et(),Zr=k(),fa=yt(),Qs=ce(),Js=function(){function t(){}return t.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=Zr.has(e,"errorMessageProvider")?e.errorMessageProvider:Qs.DEFAULT_PARSER_CONFIG.errorMessageProvider},t.prototype.SAVE_ERROR=function(e){if($r.isRecognitionException(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Zr.cloneArr(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(t.prototype,"errors",{get:function(){return Zr.cloneArr(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),t.prototype.raiseEarlyExitException=function(e,r,n){for(var i=this.getCurrRuleFullName(),a=this.getGAstProductions()[i],o=fa.getLookaheadPathsForOptionalProd(e,a,r,this.maxLookahead),s=o[0],c=[],f=1;f<=this.maxLookahead;f++)c.push(this.LA(f));var p=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:s,actual:c,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new $r.EarlyExitException(p,this.LA(1),this.LA(0)))},t.prototype.raiseNoAltException=function(e,r){for(var n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],a=fa.getLookaheadPathsForOr(e,i,this.maxLookahead),o=[],s=1;s<=this.maxLookahead;s++)o.push(this.LA(s));var c=this.LA(0),f=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:o,previous:c,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new $r.NoViableAltException(f,this.LA(1),c))},t}();tr.ErrorHandler=Js});var va=R(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.ContentAssist=void 0;var ha=Tt(),da=k(),eu=function(){function t(){}return t.prototype.initContentAssist=function(){},t.prototype.computeContentAssist=function(e,r){var n=this.gastProductionsCache[e];if(da.isUndefined(n))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return ha.nextPossibleTokensAfter([n],r,this.tokenMatcher,this.maxLookahead)},t.prototype.getNextPossibleTokenTypes=function(e){var r=da.first(e.ruleStack),n=this.getGAstProductions(),i=n[r],a=new ha.NextAfterTokenWalker(i,e).startWalking();return a},t}();rr.ContentAssist=eu});var Ra=R(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.GastRecorder=void 0;var oe=k(),Pe=ne(),tu=ft(),ma=Xe(),Ea=Ue(),ru=ce(),nu=Yt(),ir={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(ir);var Ta=!0,ya=Math.pow(2,nu.BITS_FOR_OCCURRENCE_IDX)-1,_a=Ea.createToken({name:"RECORDING_PHASE_TOKEN",pattern:tu.Lexer.NA});ma.augmentTokenTypes([_a]);var ga=Ea.createTokenInstance(_a,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(ga);var iu={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},ou=function(){function t(){}return t.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},t.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var r=function(i){var a=i>0?i:"";e["CONSUME"+a]=function(o,s){return this.consumeInternalRecord(o,i,s)},e["SUBRULE"+a]=function(o,s){return this.subruleInternalRecord(o,i,s)},e["OPTION"+a]=function(o){return this.optionInternalRecord(o,i)},e["OR"+a]=function(o){return this.orInternalRecord(o,i)},e["MANY"+a]=function(o){this.manyInternalRecord(i,o)},e["MANY_SEP"+a]=function(o){this.manySepFirstInternalRecord(i,o)},e["AT_LEAST_ONE"+a]=function(o){this.atLeastOneInternalRecord(i,o)},e["AT_LEAST_ONE_SEP"+a]=function(o){this.atLeastOneSepFirstInternalRecord(i,o)}},n=0;n<10;n++)r(n);e.consume=function(i,a,o){return this.consumeInternalRecord(a,i,o)},e.subrule=function(i,a,o){return this.subruleInternalRecord(a,i,o)},e.option=function(i,a){return this.optionInternalRecord(a,i)},e.or=function(i,a){return this.orInternalRecord(a,i)},e.many=function(i,a){this.manyInternalRecord(i,a)},e.atLeastOne=function(i,a){this.atLeastOneInternalRecord(i,a)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},t.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var r=0;r<10;r++){var n=r>0?r:"";delete e["CONSUME"+n],delete e["SUBRULE"+n],delete e["OPTION"+n],delete e["OR"+n],delete e["MANY"+n],delete e["MANY_SEP"+n],delete e["AT_LEAST_ONE"+n],delete e["AT_LEAST_ONE_SEP"+n]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},t.prototype.ACTION_RECORD=function(e){},t.prototype.BACKTRACK_RECORD=function(e,r){return function(){return!0}},t.prototype.LA_RECORD=function(e){return ru.END_OF_FILE},t.prototype.topLevelRuleRecord=function(e,r){try{var n=new Pe.Rule({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(i){if(i.KNOWN_RECORDER_ERROR!==!0)try{i.message=i.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch(a){throw i}throw i}},t.prototype.optionInternalRecord=function(e,r){return Ot.call(this,Pe.Option,e,r)},t.prototype.atLeastOneInternalRecord=function(e,r){Ot.call(this,Pe.RepetitionMandatory,r,e)},t.prototype.atLeastOneSepFirstInternalRecord=function(e,r){Ot.call(this,Pe.RepetitionMandatoryWithSeparator,r,e,Ta)},t.prototype.manyInternalRecord=function(e,r){Ot.call(this,Pe.Repetition,r,e)},t.prototype.manySepFirstInternalRecord=function(e,r){Ot.call(this,Pe.RepetitionWithSeparator,r,e,Ta)},t.prototype.orInternalRecord=function(e,r){return au.call(this,e,r)},t.prototype.subruleInternalRecord=function(e,r,n){if(ar(r),!e||oe.has(e,"ruleName")===!1){var i=new Error(" argument is invalid"+(" expecting a Parser method reference but got: <"+JSON.stringify(e)+">")+(` + inside top level rule: <`+this.recordingProdStack[0].name+">"));throw i.KNOWN_RECORDER_ERROR=!0,i}var a=oe.peek(this.recordingProdStack),o=e.ruleName,s=new Pe.NonTerminal({idx:r,nonTerminalName:o,referencedRule:void 0});return a.definition.push(s),this.outputCst?iu:ir},t.prototype.consumeInternalRecord=function(e,r,n){if(ar(r),!ma.hasShortKeyProperty(e)){var i=new Error(" argument is invalid"+(" expecting a TokenType reference but got: <"+JSON.stringify(e)+">")+(` + inside top level rule: <`+this.recordingProdStack[0].name+">"));throw i.KNOWN_RECORDER_ERROR=!0,i}var a=oe.peek(this.recordingProdStack),o=new Pe.Terminal({idx:r,terminalType:e});return a.definition.push(o),ga},t}();nr.GastRecorder=ou;function Ot(t,e,r,n){n===void 0&&(n=!1),ar(r);var i=oe.peek(this.recordingProdStack),a=oe.isFunction(e)?e:e.DEF,o=new t({definition:[],idx:r});return n&&(o.separator=e.SEP),oe.has(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),i.definition.push(o),this.recordingProdStack.pop(),ir}function au(t,e){var r=this;ar(e);var n=oe.peek(this.recordingProdStack),i=oe.isArray(t)===!1,a=i===!1?t:t.DEF,o=new Pe.Alternation({definition:[],idx:e,ignoreAmbiguities:i&&t.IGNORE_AMBIGUITIES===!0});oe.has(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD);var s=oe.some(a,function(c){return oe.isFunction(c.GATE)});return o.hasPredicates=s,n.definition.push(o),oe.forEach(a,function(c){var f=new Pe.Alternative({definition:[]});o.definition.push(f),oe.has(c,"IGNORE_AMBIGUITIES")?f.ignoreAmbiguities=c.IGNORE_AMBIGUITIES:oe.has(c,"GATE")&&(f.ignoreAmbiguities=!0),r.recordingProdStack.push(f),c.ALT.call(r),r.recordingProdStack.pop()}),ir}function Aa(t){return t===0?"":""+t}function ar(t){if(t<0||t>ya){var e=new Error("Invalid DSL Method idx value: <"+t+`> + `+("Idx value must be a none negative value smaller than "+(ya+1)));throw e.KNOWN_RECORDER_ERROR=!0,e}}});var Na=R(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.PerformanceTracer=void 0;var Oa=k(),su=ce(),uu=function(){function t(){}return t.prototype.initPerformanceTracer=function(e){if(Oa.has(e,"traceInitPerf")){var r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:Infinity,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=su.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},t.prototype.TRACE_INIT=function(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <"+e+">");var i=Oa.timer(r),a=i.time,o=i.value,s=a>10?console.warn:console.log;return this.traceInitIndent time: "+a+"ms"),this.traceInitIndent--,o}else return r()},t}();or.PerformanceTracer=uu});var Ia=R(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.applyMixins=void 0;function cu(t,e){e.forEach(function(r){var n=r.prototype;Object.getOwnPropertyNames(n).forEach(function(i){if(i!=="constructor"){var a=Object.getOwnPropertyDescriptor(n,i);a&&(a.get||a.set)?Object.defineProperty(t.prototype,i,a):t.prototype[i]=r.prototype[i]}})})}sr.applyMixins=cu});var ce=R(U=>{"use strict";var ka=U&&U.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(U,"__esModule",{value:!0});U.EmbeddedActionsParser=U.CstParser=U.Parser=U.EMPTY_ALT=U.ParserDefinitionErrorType=U.DEFAULT_RULE_CONFIG=U.DEFAULT_PARSER_CONFIG=U.END_OF_FILE=void 0;var ee=k(),lu=pi(),Pa=Ue(),Sa=mt(),xa=Ui(),fu=zr(),pu=zi(),hu=ra(),du=ia(),vu=oa(),mu=la(),Eu=pa(),Tu=va(),yu=Ra(),_u=Na(),gu=Ia();U.END_OF_FILE=Pa.createTokenInstance(Pa.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(U.END_OF_FILE);U.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Sa.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1});U.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});var Au;(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"})(Au=U.ParserDefinitionErrorType||(U.ParserDefinitionErrorType={}));function Ru(t){return t===void 0&&(t=void 0),function(){return t}}U.EMPTY_ALT=Ru;var ur=function(){function t(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;var n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),ee.has(r,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=ee.has(r,"skipValidations")?r.skipValidations:U.DEFAULT_PARSER_CONFIG.skipValidations}return t.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},t.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",function(){var r;e.selfAnalysisDone=!0;var n=e.className;e.TRACE_INIT("toFastProps",function(){ee.toFastProperties(e)}),e.TRACE_INIT("Grammar Recording",function(){try{e.enableRecording(),ee.forEach(e.definedRulesNames,function(a){var o=e[a],s=o.originalGrammarAction,c=void 0;e.TRACE_INIT(a+" Rule",function(){c=e.topLevelRuleRecord(a,s)}),e.gastProductionsCache[a]=c})}finally{e.disableRecording()}});var i=[];if(e.TRACE_INIT("Grammar Resolving",function(){i=xa.resolveGrammar({rules:ee.values(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(i)}),e.TRACE_INIT("Grammar Validations",function(){if(ee.isEmpty(i)&&e.skipValidations===!1){var a=xa.validateGrammar({rules:ee.values(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:ee.values(e.tokensMap),errMsgProvider:Sa.defaultGrammarValidatorErrorProvider,grammarName:n});e.definitionErrors=e.definitionErrors.concat(a)}}),ee.isEmpty(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",function(){var a=lu.computeAllProdsFollows(ee.values(e.gastProductionsCache));e.resyncFollows=a}),e.TRACE_INIT("ComputeLookaheadFunctions",function(){e.preComputeLookaheadFunctions(ee.values(e.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!ee.isEmpty(e.definitionErrors))throw r=ee.map(e.definitionErrors,function(a){return a.message}),new Error(`Parser Definition Errors detected: + `+r.join(` +------------------------------- +`))})},t.DEFER_DEFINITION_ERRORS_HANDLING=!1,t}();U.Parser=ur;gu.applyMixins(ur,[fu.Recoverable,pu.LooksAhead,hu.TreeBuilder,du.LexerAdapter,mu.RecognizerEngine,vu.RecognizerApi,Eu.ErrorHandler,Tu.ContentAssist,yu.GastRecorder,_u.PerformanceTracer]);var Ou=function(t){ka(e,t);function e(r,n){n===void 0&&(n=U.DEFAULT_PARSER_CONFIG);var i=this,a=ee.cloneObj(n);return a.outputCst=!0,i=t.call(this,r,a)||this,i}return e}(ur);U.CstParser=Ou;var Nu=function(t){ka(e,t);function e(r,n){n===void 0&&(n=U.DEFAULT_PARSER_CONFIG);var i=this,a=ee.cloneObj(n);return a.outputCst=!1,i=t.call(this,r,a)||this,i}return e}(ur);U.EmbeddedActionsParser=Nu});var La=R(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.createSyntaxDiagramsCode=void 0;var Ca=Er();function Iu(t,e){var r=e===void 0?{}:e,n=r.resourceBase,i=n===void 0?"https://unpkg.com/chevrotain@"+Ca.VERSION+"/diagrams/":n,a=r.css,o=a===void 0?"https://unpkg.com/chevrotain@"+Ca.VERSION+"/diagrams/diagrams.css":a,s=` + + + + + +`,c=` + +`,f=` + + + + +`,p=` +
+`,l=` + +`,m=` + +`;return s+c+f+p+l+m}cr.createSyntaxDiagramsCode=Iu});var Fa=R(E=>{"use strict";Object.defineProperty(E,"__esModule",{value:!0});E.Parser=E.createSyntaxDiagramsCode=E.clearCache=E.GAstVisitor=E.serializeProduction=E.serializeGrammar=E.Terminal=E.Rule=E.RepetitionWithSeparator=E.RepetitionMandatoryWithSeparator=E.RepetitionMandatory=E.Repetition=E.Option=E.NonTerminal=E.Alternative=E.Alternation=E.defaultLexerErrorProvider=E.NoViableAltException=E.NotAllInputParsedException=E.MismatchedTokenException=E.isRecognitionException=E.EarlyExitException=E.defaultParserErrorProvider=E.tokenName=E.tokenMatcher=E.tokenLabel=E.EOF=E.createTokenInstance=E.createToken=E.LexerDefinitionErrorType=E.Lexer=E.EMPTY_ALT=E.ParserDefinitionErrorType=E.EmbeddedActionsParser=E.CstParser=E.VERSION=void 0;var ku=Er();Object.defineProperty(E,"VERSION",{enumerable:!0,get:function(){return ku.VERSION}});var lr=ce();Object.defineProperty(E,"CstParser",{enumerable:!0,get:function(){return lr.CstParser}});Object.defineProperty(E,"EmbeddedActionsParser",{enumerable:!0,get:function(){return lr.EmbeddedActionsParser}});Object.defineProperty(E,"ParserDefinitionErrorType",{enumerable:!0,get:function(){return lr.ParserDefinitionErrorType}});Object.defineProperty(E,"EMPTY_ALT",{enumerable:!0,get:function(){return lr.EMPTY_ALT}});var Ma=ft();Object.defineProperty(E,"Lexer",{enumerable:!0,get:function(){return Ma.Lexer}});Object.defineProperty(E,"LexerDefinitionErrorType",{enumerable:!0,get:function(){return Ma.LexerDefinitionErrorType}});var nt=Ue();Object.defineProperty(E,"createToken",{enumerable:!0,get:function(){return nt.createToken}});Object.defineProperty(E,"createTokenInstance",{enumerable:!0,get:function(){return nt.createTokenInstance}});Object.defineProperty(E,"EOF",{enumerable:!0,get:function(){return nt.EOF}});Object.defineProperty(E,"tokenLabel",{enumerable:!0,get:function(){return nt.tokenLabel}});Object.defineProperty(E,"tokenMatcher",{enumerable:!0,get:function(){return nt.tokenMatcher}});Object.defineProperty(E,"tokenName",{enumerable:!0,get:function(){return nt.tokenName}});var Pu=mt();Object.defineProperty(E,"defaultParserErrorProvider",{enumerable:!0,get:function(){return Pu.defaultParserErrorProvider}});var Nt=et();Object.defineProperty(E,"EarlyExitException",{enumerable:!0,get:function(){return Nt.EarlyExitException}});Object.defineProperty(E,"isRecognitionException",{enumerable:!0,get:function(){return Nt.isRecognitionException}});Object.defineProperty(E,"MismatchedTokenException",{enumerable:!0,get:function(){return Nt.MismatchedTokenException}});Object.defineProperty(E,"NotAllInputParsedException",{enumerable:!0,get:function(){return Nt.NotAllInputParsedException}});Object.defineProperty(E,"NoViableAltException",{enumerable:!0,get:function(){return Nt.NoViableAltException}});var Su=kr();Object.defineProperty(E,"defaultLexerErrorProvider",{enumerable:!0,get:function(){return Su.defaultLexerErrorProvider}});var Se=ne();Object.defineProperty(E,"Alternation",{enumerable:!0,get:function(){return Se.Alternation}});Object.defineProperty(E,"Alternative",{enumerable:!0,get:function(){return Se.Alternative}});Object.defineProperty(E,"NonTerminal",{enumerable:!0,get:function(){return Se.NonTerminal}});Object.defineProperty(E,"Option",{enumerable:!0,get:function(){return Se.Option}});Object.defineProperty(E,"Repetition",{enumerable:!0,get:function(){return Se.Repetition}});Object.defineProperty(E,"RepetitionMandatory",{enumerable:!0,get:function(){return Se.RepetitionMandatory}});Object.defineProperty(E,"RepetitionMandatoryWithSeparator",{enumerable:!0,get:function(){return Se.RepetitionMandatoryWithSeparator}});Object.defineProperty(E,"RepetitionWithSeparator",{enumerable:!0,get:function(){return Se.RepetitionWithSeparator}});Object.defineProperty(E,"Rule",{enumerable:!0,get:function(){return Se.Rule}});Object.defineProperty(E,"Terminal",{enumerable:!0,get:function(){return Se.Terminal}});var ba=ne();Object.defineProperty(E,"serializeGrammar",{enumerable:!0,get:function(){return ba.serializeGrammar}});Object.defineProperty(E,"serializeProduction",{enumerable:!0,get:function(){return ba.serializeProduction}});var xu=$e();Object.defineProperty(E,"GAstVisitor",{enumerable:!0,get:function(){return xu.GAstVisitor}});function Cu(){console.warn(`The clearCache function was 'soft' removed from the Chevrotain API. + It performs no action other than printing this message. + Please avoid using it as it will be completely removed in the future`)}E.clearCache=Cu;var Lu=La();Object.defineProperty(E,"createSyntaxDiagramsCode",{enumerable:!0,get:function(){return Lu.createSyntaxDiagramsCode}});var Mu=function(){function t(){throw new Error(`The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead. +See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0`)}return t}();E.Parser=Mu});export default Fa(); diff --git a/node_modules/three/examples/jsm/libs/draco/README.md b/node_modules/three/examples/jsm/libs/draco/README.md new file mode 100644 index 0000000..4d89164 --- /dev/null +++ b/node_modules/three/examples/jsm/libs/draco/README.md @@ -0,0 +1,32 @@ +# Draco 3D Data Compression + +Draco is an open-source library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics. + +[Website](https://google.github.io/draco/) | [GitHub](https://github.com/google/draco) + +## Contents + +This folder contains three utilities: + +* `draco_decoder.js` — Emscripten-compiled decoder, compatible with any modern browser. +* `draco_decoder.wasm` — WebAssembly decoder, compatible with newer browsers and devices. +* `draco_wasm_wrapper.js` — JavaScript wrapper for the WASM decoder. + +Each file is provided in two variations: + +* **Default:** Latest stable builds, tracking the project's [master branch](https://github.com/google/draco). +* **glTF:** Builds targeted by the [glTF mesh compression extension](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression), tracking the [corresponding Draco branch](https://github.com/google/draco/tree/gltf_2.0_draco_extension). + +Either variation may be used with `DRACOLoader`: + +```js +var dracoLoader = new DRACOLoader(); +dracoLoader.setDecoderPath('path/to/decoders/'); +dracoLoader.setDecoderConfig({type: 'js'}); // (Optional) Override detection of WASM support. +``` + +Further [documentation on GitHub](https://github.com/google/draco/tree/master/javascript/example#static-loading-javascript-decoder). + +## License + +[Apache License 2.0](https://github.com/google/draco/blob/master/LICENSE) diff --git a/node_modules/three/examples/jsm/libs/draco/draco_decoder.js b/node_modules/three/examples/jsm/libs/draco/draco_decoder.js new file mode 100644 index 0000000..6629469 --- /dev/null +++ b/node_modules/three/examples/jsm/libs/draco/draco_decoder.js @@ -0,0 +1,34 @@ + +var DracoDecoderModule = (() => { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; + return ( +function(DracoDecoderModule = {}) { + +var Module=typeof DracoDecoderModule!="undefined"?DracoDecoderModule:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var isRuntimeInitialized=false;var isModuleParsed=false;Module["onRuntimeInitialized"]=function(){isRuntimeInitialized=true;if(isModuleParsed){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}};Module["onModuleParsed"]=function(){isModuleParsed=true;if(isRuntimeInitialized){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}};function isVersionSupported(versionString){if(typeof versionString!=="string")return false;const version=versionString.split(".");if(version.length<2||version.length>3)return false;if(version[0]==1&&version[1]>=0&&version[1]<=5)return true;if(version[0]!=0||version[1]>10)return false;return true}Module["isVersionSupported"]=isVersionSupported;var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;function logExceptionOnExit(e){if(e instanceof ExitStatus)return;let toLog=e;err("exiting due to exception: "+toLog)}if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=(filename,binary)=>{var ret=tryParseAsDataURI(filename);if(ret){return binary?ret:ret.toString()}filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror)=>{var ret=tryParseAsDataURI(filename);if(ret){onload(ret)}filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);quit_=(status,toThrow)=>{if(keepRuntimeAlive()){process["exitCode"]=status;throw toThrow}logExceptionOnExit(toThrow);process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;var WebAssembly={Memory:function(opts){this.buffer=new ArrayBuffer(opts["initial"]*65536)},Module:function(binary){},Instance:function(module,info){this.exports=( +// EMSCRIPTEN_START_ASM +function instantiate(na){function c(d){d.set=function(a,b){this[a]=b};d.get=function(a){return this[a]};return d}var e;var f=new Uint8Array(123);for(var a=25;a>=0;--a){f[48+a]=52+a;f[65+a]=a;f[97+a]=26+a}f[43]=62;f[47]=63;function l(m,n,o){var g,h,a=0,i=n,j=o.length,k=n+(j*3>>2)-(o[j-2]=="=")-(o[j-1]=="=");for(;a>4;if(i>2;if(i>2];s=H[b+12>>2];d=H[b+20>>2];e=H[b+16>>2];g=e+4|0;d=g>>>0<4?d+1|0:d;a:{b:{c:{if(g>>>0>k>>>0&(d|0)>=(s|0)|(d|0)>(s|0)){break c}d=e+H[b>>2]|0;H[a>>2]=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);d=H[b+20>>2];k=d;g=H[b+16>>2];e=g+4|0;d=e>>>0<4?d+1|0:d;H[b+16>>2]=e;H[b+20>>2]=d;if(K[a>>2]>31){break c}s=H[b+8>>2];y=H[b+12>>2];d=k;g=g+8|0;d=g>>>0<8?d+1|0:d;if(g>>>0>s>>>0&(d|0)>=(y|0)|(d|0)>(y|0)){break c}d=e+H[b>>2]|0;H[a+4>>2]=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);d=H[b+20>>2];k=d;g=H[b+16>>2];e=g+4|0;d=e>>>0<4?d+1|0:d;H[b+16>>2]=e;H[b+20>>2]=d;s=H[b+8>>2];y=H[b+12>>2];d=k;g=g+8|0;d=g>>>0<8?d+1|0:d;if(g>>>0>s>>>0&(d|0)>=(y|0)|(d|0)>(y|0)){break c}d=e+H[b>>2]|0;H[a+12>>2]=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);d=H[b+20>>2];k=d;g=H[b+16>>2];e=g+4|0;d=e>>>0<4?d+1|0:d;H[b+16>>2]=e;H[b+20>>2]=d;d=H[a+20>>2];x=H[a+12>>2];if((x|0)!=(d|0)?d:0){break c}s=H[b+8>>2];y=H[b+12>>2];d=k;g=g+8|0;d=g>>>0<8?d+1|0:d;if(g>>>0>s>>>0&(d|0)>=(y|0)|(d|0)>(y|0)){break c}d=e+H[b>>2]|0;e=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[a+16>>2]=e;g=H[b+20>>2];d=H[b+16>>2]+4|0;g=d>>>0<4?g+1|0:g;H[b+16>>2]=d;H[b+20>>2]=g;if(e>>>0>=7){H[B>>2]=e;Qd(1713,B);break c}H[B+664>>2]=c;d:{if(!x){break d}e:{k=H[c>>2];if(x>>>0<=(H[c+8>>2]-k|0)/12>>>0){break e}if(x>>>0<357913942){l=H[c+4>>2];d=N(x,12);e=pa(d);g=d+e|0;e=e+N((l-k|0)/12|0,12)|0;d=e;if((k|0)!=(l|0)){while(1){d=d-12|0;l=l-12|0;H[d>>2]=H[l>>2];H[d+4>>2]=H[l+4>>2];H[d+8>>2]=H[l+8>>2];if((k|0)!=(l|0)){continue}break}}H[c+8>>2]=g;H[c+4>>2]=e;H[c>>2]=d;if(!k){break e}oa(k);break e}break b}f:{switch(H[a+16>>2]){case 0:i=wb(B+8|0,3);z=B+664|0;k=H[b+8>>2];n=H[b+12>>2];d=H[b+20>>2];e=H[b+16>>2];g=e+4|0;d=g>>>0<4?d+1|0:d;g:{if(g>>>0>k>>>0&(d|0)>=(n|0)|(d|0)>(n|0)){break g}d=e+H[b>>2]|0;H[i>>2]=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);d=H[b+20>>2];k=d;g=H[b+16>>2];e=g+4|0;d=e>>>0<4?d+1|0:d;H[b+16>>2]=e;H[b+20>>2]=d;if(K[i>>2]>32){break g}n=H[b+8>>2];s=H[b+12>>2];d=k;g=g+8|0;d=g>>>0<8?d+1|0:d;if(g>>>0>n>>>0&(d|0)>=(s|0)|(d|0)>(s|0)){break g}d=e+H[b>>2]|0;e=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[i+4>>2]=e;g=H[b+20>>2];d=H[b+16>>2]+4|0;g=d>>>0<4?g+1|0:g;H[b+16>>2]=d;H[b+20>>2]=g;if(!e){break g}H[i+8>>2]=0;if(!ua(i+16|0,b)){break g}if(!ua(i+36|0,b)){break g}if(!ua(i+56|0,b)){break g}if(!ua(i+76|0,b)){break g}A=H[i+4>>2];d=0;g=0;f=ca-32|0;ca=f;m=H[i+12>>2];H[f+16>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;if(m){if(m>>>0>=1073741824){break b}b=m<<2;g=pa(b);H[f+8>>2]=g;d=b+g|0;H[f+16>>2]=d;ra(g,0,b);H[f+12>>2]=d}e=H[i+120>>2];b=H[e>>2];if(b){H[e+4>>2]=b;oa(b);m=H[i+12>>2];g=H[f+8>>2];d=H[f+12>>2]}H[e+4>>2]=d;H[e>>2]=g;H[e+8>>2]=H[f+16>>2];g=0;H[f+16>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;h:{if(m){if(m>>>0>=1073741824){break b}b=m<<2;w=pa(b);H[f+8>>2]=w;g=b+w|0;H[f+16>>2]=g;ra(w,0,b);H[f+12>>2]=g}d=H[i+132>>2];b=H[d>>2];if(b){H[d+4>>2]=b;oa(b);w=H[f+8>>2];g=H[f+12>>2]}H[d+4>>2]=g;H[d>>2]=w;H[d+8>>2]=H[f+16>>2];H[f+24>>2]=0;H[f+28>>2]=0;H[f+16>>2]=0;H[f+20>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;xa(f+8|0);d=H[f+24>>2]+H[f+28>>2]|0;b=(d>>>0)/341|0;b=H[H[f+12>>2]+(b<<2)>>2]+N(d-N(b,341)|0,12)|0;H[b+4>>2]=0;H[b+8>>2]=0;H[b>>2]=A;m=H[f+28>>2]+1|0;H[f+28>>2]=m;i:{if(!m){break i}y=i+96|0;while(1){n=H[f+12>>2];g=H[f+24>>2];e=m-1|0;d=g+e|0;b=(d>>>0)/341|0;b=H[n+(b<<2)>>2]+N(d-N(b,341)|0,12)|0;o=H[b+8>>2];k=H[b+4>>2];t=H[b>>2];H[f+28>>2]=e;b=H[f+16>>2];if((((b|0)!=(n|0)?N(b-n>>2,341)-1|0:0)-(g+m|0)|0)+1>>>0>=682){oa(H[b-4>>2]);H[f+16>>2]=H[f+16>>2]-4}b=0;if(t>>>0>A>>>0){break i}d=H[i+12>>2];m=(k|0)!=(d-1|0)?k+1|0:0;if(m>>>0>=d>>>0){break i}q=N(o,12);p=q+H[i+132>>2]|0;l=q+H[i+120>>2]|0;g=H[i>>2];r=m<<2;e=H[r+H[p>>2]>>2];j:{k:{if((g|0)==(e|0)){if(!t){break k}while(1){d=H[l>>2];x=H[d+8>>2];s=H[d+4>>2];n=H[d>>2];q=H[z>>2];m=H[q+4>>2];d=H[q+8>>2];l:{if(m>>>0>>0){H[m+8>>2]=x;H[m+4>>2]=s;H[m>>2]=n;H[q+4>>2]=m+12;break l}r=H[q>>2];g=(m-r|0)/12|0;k=g+1|0;if(k>>>0>=357913942){break b}e=(d-r|0)/12|0;d=e<<1;k=e>>>0>=178956970?357913941:d>>>0>k>>>0?d:k;if(k){if(k>>>0>=357913942){break a}d=pa(N(k,12))}else{d=0}w=d+N(g,12)|0;H[w+8>>2]=x;H[w+4>>2]=s;H[w>>2]=n;e=w+12|0;if((m|0)!=(r|0)){while(1){w=w-12|0;m=m-12|0;H[w>>2]=H[m>>2];H[w+4>>2]=H[m+4>>2];H[w+8>>2]=H[m+8>>2];if((m|0)!=(r|0)){continue}break}}H[q+8>>2]=d+N(k,12);H[q+4>>2]=e;H[q>>2]=w;if(!r){break l}oa(r)}H[i+8>>2]=H[i+8>>2]+1;b=b+1|0;if((t|0)!=(b|0)){continue}break}break k}m:{n:{o:{p:{if(t>>>0<=2){d=H[i+108>>2];H[d>>2]=m;w=1;g=H[i+12>>2];if(g>>>0>1){break p}break m}if(K[i+8>>2]>K[i+4>>2]){break i}b=H[i+120>>2];s=o+1|0;x=N(s,12);d=b+x|0;if((d|0)!=(l|0)){Aa(d,H[l>>2],H[l+4>>2]);b=H[i+120>>2]}b=r+H[b+x>>2]|0;H[b>>2]=H[b>>2]+(1<>2];e=32-k|0;q:{if((n|0)<=(e|0)){e=H[i+28>>2];if((e|0)==H[i+20>>2]){break o}d=H[e>>2];b=k+n|0;H[i+32>>2]=b;w=d<>>32-n|0;if((b|0)!=32){break q}H[i+32>>2]=0;H[i+28>>2]=e+4;break q}g=H[i+28>>2];b=g+4|0;if((b|0)==H[i+20>>2]){break o}d=H[g>>2];H[i+28>>2]=b;b=n-e|0;H[i+32>>2]=b;w=H[g+4>>2]>>>32-b|d<>>32-n}d=t>>>1|0;if(w>>>0>d>>>0){break i}break n}while(1){m=(g-1|0)!=(m|0)?m+1|0:0;H[d+(w<<2)>>2]=m;g=H[i+12>>2];w=w+1|0;if(g>>>0>w>>>0){continue}break}break m}d=t>>>1|0;w=0}r:{s:{e=d-w|0;b=t-e|0;t:{if((b|0)==(e|0)){b=e;break t}n=H[i+88>>2];if((n|0)==H[i+80>>2]){break s}k=H[n>>2];g=H[i+92>>2];d=g+1|0;H[i+92>>2]=d;g=k&-2147483648>>>g;u:{if((d|0)==32){H[i+92>>2]=0;H[i+88>>2]=n+4;if(g){break u}break s}if(!g){break s}}}d=b;b=e;break r}d=e}n=H[i+132>>2];k=n+q|0;g=H[k>>2];e=g+r|0;H[e>>2]=H[e>>2]+1;Aa(n+x|0,g,H[k+4>>2]);if(b){g=H[f+28>>2]+H[f+24>>2]|0;e=H[f+16>>2];w=H[f+12>>2];if((g|0)==(((e|0)!=(w|0)?N(e-w>>2,341)-1|0:0)|0)){xa(f+8|0);w=H[f+12>>2];g=H[f+24>>2]+H[f+28>>2]|0}e=(g>>>0)/341|0;e=H[(e<<2)+w>>2]+N(g-N(e,341)|0,12)|0;H[e+8>>2]=o;H[e+4>>2]=m;H[e>>2]=b;H[f+28>>2]=H[f+28>>2]+1}if(!d){break k}g=H[f+28>>2]+H[f+24>>2]|0;b=H[f+16>>2];w=H[f+12>>2];if((g|0)==(((b|0)!=(w|0)?N(b-w>>2,341)-1|0:0)|0)){xa(f+8|0);w=H[f+12>>2];g=H[f+24>>2]+H[f+28>>2]|0}b=(g>>>0)/341|0;b=H[(b<<2)+w>>2]+N(g-N(b,341)|0,12)|0;H[b+8>>2]=s;H[b+4>>2]=m;H[b>>2]=d;m=H[f+28>>2]+1|0;H[f+28>>2]=m;break j}if(!t){break k}while(1){if(H[i+12>>2]){o=H[i+40>>2];n=H[p>>2];w=H[i+96>>2];k=H[i+108>>2];m=0;while(1){q=k+(m<<2)|0;H[w+(H[q>>2]<<2)>>2]=0;g=H[i>>2];e=H[q>>2]<<2;d=H[e+n>>2];v:{if((g|0)==(d|0)){break v}r=e+w|0;u=g-d|0;x=H[i+52>>2];g=32-x|0;if((u|0)<=(g|0)){e=H[i+48>>2];if((e|0)==(o|0)){break i}H[r>>2]=H[e>>2]<>>32-u;d=u+H[i+52>>2]|0;H[i+52>>2]=d;if((d|0)!=32){break v}H[i+52>>2]=0;H[i+48>>2]=e+4;break v}s=H[i+48>>2];d=s+4|0;if((d|0)==(o|0)){break i}e=H[s>>2];H[i+48>>2]=d;d=u-g|0;H[i+52>>2]=d;H[r>>2]=H[s+4>>2]>>>32-d|e<>>32-u}e=H[q>>2]<<2;d=e+w|0;H[d>>2]=H[d>>2]|H[e+H[l>>2]>>2];m=m+1|0;if(m>>>0>2]){continue}break}}jb(z,y);H[i+8>>2]=H[i+8>>2]+1;b=b+1|0;if((t|0)!=(b|0)){continue}break}}m=H[f+28>>2]}if(m){continue}break}}H[f+28>>2]=0;w=H[f+16>>2];m=H[f+12>>2];g=w-m|0;if(g>>>0>=9){while(1){oa(H[m>>2]);m=H[f+12>>2]+4|0;H[f+12>>2]=m;w=H[f+16>>2];g=w-m|0;if(g>>>0>8){continue}break}}b=170;w:{switch((g>>>2|0)-1|0){case 1:b=341;case 0:H[f+24>>2]=b;break;default:break w}}x:{if((m|0)==(w|0)){break x}while(1){oa(H[m>>2]);m=m+4|0;if((w|0)!=(m|0)){continue}break}d=H[f+16>>2];b=H[f+12>>2];if((d|0)==(b|0)){break x}H[f+16>>2]=d+((b-d|0)+3&-4)}b=H[f+8>>2];if(b){oa(b)}ca=f+32|0;break h}}xb(i);break d;case 1:i=wb(B+8|0,3);A=B+664|0;k=H[b+8>>2];n=H[b+12>>2];d=H[b+20>>2];e=H[b+16>>2];g=e+4|0;d=g>>>0<4?d+1|0:d;y:{if(g>>>0>k>>>0&(d|0)>=(n|0)|(d|0)>(n|0)){break y}d=e+H[b>>2]|0;H[i>>2]=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);d=H[b+20>>2];k=d;g=H[b+16>>2];e=g+4|0;d=e>>>0<4?d+1|0:d;H[b+16>>2]=e;H[b+20>>2]=d;if(K[i>>2]>32){break y}n=H[b+8>>2];s=H[b+12>>2];d=k;g=g+8|0;d=g>>>0<8?d+1|0:d;if(g>>>0>n>>>0&(d|0)>=(s|0)|(d|0)>(s|0)){break y}d=e+H[b>>2]|0;e=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[i+4>>2]=e;g=H[b+20>>2];d=H[b+16>>2]+4|0;g=d>>>0<4?g+1|0:g;H[b+16>>2]=d;H[b+20>>2]=g;if(!e){break y}H[i+8>>2]=0;if(!ua(i+16|0,b)){break y}if(!ua(i+36|0,b)){break y}if(!ua(i+56|0,b)){break y}if(!ua(i+76|0,b)){break y}p=H[i+4>>2];d=0;f=ca-32|0;ca=f;m=H[i+12>>2];H[f+16>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;if(m){if(m>>>0>=1073741824){break b}b=m<<2;t=pa(b);H[f+8>>2]=t;d=b+t|0;H[f+16>>2]=d;ra(t,0,b);H[f+12>>2]=d}e=H[i+120>>2];b=H[e>>2];if(b){H[e+4>>2]=b;oa(b);m=H[i+12>>2];t=H[f+8>>2];d=H[f+12>>2]}H[e+4>>2]=d;H[e>>2]=t;H[e+8>>2]=H[f+16>>2];t=0;H[f+16>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;z:{if(m){if(m>>>0>=1073741824){break b}b=m<<2;o=pa(b);H[f+8>>2]=o;t=b+o|0;H[f+16>>2]=t;ra(o,0,b);H[f+12>>2]=t}d=H[i+132>>2];b=H[d>>2];if(b){H[d+4>>2]=b;oa(b);t=H[f+12>>2];o=H[f+8>>2]}H[d+4>>2]=t;H[d>>2]=o;H[d+8>>2]=H[f+16>>2];H[f+24>>2]=0;H[f+28>>2]=0;H[f+16>>2]=0;H[f+20>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;xa(f+8|0);d=H[f+24>>2]+H[f+28>>2]|0;b=(d>>>0)/341|0;b=H[H[f+12>>2]+(b<<2)>>2]+N(d-N(b,341)|0,12)|0;H[b+4>>2]=0;H[b+8>>2]=0;H[b>>2]=p;m=H[f+28>>2]+1|0;H[f+28>>2]=m;A:{if(!m){break A}s=i+96|0;while(1){k=H[f+12>>2];g=H[f+24>>2];e=m-1|0;d=g+e|0;b=(d>>>0)/341|0;b=H[k+(b<<2)>>2]+N(d-N(b,341)|0,12)|0;q=H[b+8>>2];d=H[b+4>>2];l=H[b>>2];H[f+28>>2]=e;b=H[f+16>>2];if((((b|0)!=(k|0)?N(b-k>>2,341)-1|0:0)-(g+m|0)|0)+1>>>0>=682){oa(H[b-4>>2]);H[f+16>>2]=H[f+16>>2]-4}if(l>>>0>p>>>0){break A}b=H[i+12>>2];m=(d|0)!=(b-1|0)?d+1|0:0;if(m>>>0>=b>>>0){break A}b=H[i+120>>2];r=N(q,12);u=b+r|0;e=H[i>>2];x=m<<2;n=r+H[i+132>>2]|0;d=H[x+H[n>>2]>>2];B:{C:{if((e|0)==(d|0)){x=0;if(!l){break C}while(1){b=H[u>>2];y=H[b+8>>2];n=H[b+4>>2];k=H[b>>2];q=H[A>>2];m=H[q+4>>2];b=H[q+8>>2];D:{if(m>>>0>>0){H[m+8>>2]=y;H[m+4>>2]=n;H[m>>2]=k;H[q+4>>2]=m+12;break D}r=H[q>>2];e=(m-r|0)/12|0;g=e+1|0;if(g>>>0>=357913942){break b}d=(b-r|0)/12|0;b=d<<1;g=d>>>0>=178956970?357913941:b>>>0>g>>>0?b:g;if(g){if(g>>>0>=357913942){break a}b=pa(N(g,12))}else{b=0}o=b+N(e,12)|0;H[o+8>>2]=y;H[o+4>>2]=n;H[o>>2]=k;d=o+12|0;if((m|0)!=(r|0)){while(1){o=o-12|0;m=m-12|0;H[o>>2]=H[m>>2];H[o+4>>2]=H[m+4>>2];H[o+8>>2]=H[m+8>>2];if((m|0)!=(r|0)){continue}break}}H[q+8>>2]=b+N(g,12);H[q+4>>2]=d;H[q>>2]=o;if(!r){break D}oa(r)}H[i+8>>2]=H[i+8>>2]+1;x=x+1|0;if((l|0)!=(x|0)){continue}break}break C}E:{F:{G:{H:{if(l>>>0<=2){b=H[i+108>>2];H[b>>2]=m;o=1;t=H[i+12>>2];if(t>>>0>1){break H}break E}if(K[i+8>>2]>K[i+4>>2]){break A}k=b;b=r+12|0;Aa(k+b|0,H[u>>2],H[u+4>>2]);b=x+H[b+H[i+120>>2]>>2]|0;H[b>>2]=H[b>>2]+(1<>2];e=32-k|0;I:{if((n|0)<=(e|0)){e=H[i+28>>2];if((e|0)==H[i+20>>2]){break G}d=H[e>>2];b=k+n|0;H[i+32>>2]=b;d=d<>>32-n|0;if((b|0)!=32){break I}H[i+32>>2]=0;H[i+28>>2]=e+4;break I}g=H[i+28>>2];b=g+4|0;if((b|0)==H[i+20>>2]){break G}d=H[g>>2];H[i+28>>2]=b;b=n-e|0;H[i+32>>2]=b;d=H[g+4>>2]>>>32-b|d<>>32-n}o=l>>>1|0;if(o>>>0>>0){break A}break F}while(1){m=(t-1|0)!=(m|0)?m+1|0:0;H[b+(o<<2)>>2]=m;o=o+1|0;t=H[i+12>>2];if(o>>>0>>0){continue}break}break E}o=l>>>1|0;d=0}y=q+1|0;J:{K:{e=o-d|0;d=l-e|0;L:{if((d|0)==(e|0)){b=e;break L}n=H[i+88>>2];if((n|0)==H[i+80>>2]){break K}k=H[n>>2];g=H[i+92>>2];b=g+1|0;H[i+92>>2]=b;g=k&-2147483648>>>g;M:{if((b|0)==32){H[i+92>>2]=0;H[i+88>>2]=n+4;if(g){break M}break K}if(!g){break K}}b=d}d=e;break J}b=e}n=H[i+132>>2];k=n+r|0;g=H[k>>2];e=g+x|0;H[e>>2]=H[e>>2]+1;Aa(n+N(y,12)|0,g,H[k+4>>2]);if(d){t=H[f+28>>2]+H[f+24>>2]|0;e=H[f+16>>2];o=H[f+12>>2];if((t|0)==(((e|0)!=(o|0)?N(e-o>>2,341)-1|0:0)|0)){xa(f+8|0);t=H[f+24>>2]+H[f+28>>2]|0;o=H[f+12>>2]}e=(t>>>0)/341|0;e=H[o+(e<<2)>>2]+N(t-N(e,341)|0,12)|0;H[e+8>>2]=q;H[e+4>>2]=m;H[e>>2]=d;H[f+28>>2]=H[f+28>>2]+1}if(!b){break C}t=H[f+28>>2]+H[f+24>>2]|0;d=H[f+16>>2];o=H[f+12>>2];if((t|0)==(((d|0)!=(o|0)?N(d-o>>2,341)-1|0:0)|0)){xa(f+8|0);t=H[f+24>>2]+H[f+28>>2]|0;o=H[f+12>>2]}d=(t>>>0)/341|0;d=H[o+(d<<2)>>2]+N(t-N(d,341)|0,12)|0;H[d+8>>2]=y;H[d+4>>2]=m;H[d>>2]=b;m=H[f+28>>2]+1|0;H[f+28>>2]=m;break B}t=0;if(!l){break C}while(1){if(H[i+12>>2]){o=H[i+40>>2];k=H[n>>2];z=H[i+96>>2];g=H[i+108>>2];m=0;while(1){q=g+(m<<2)|0;H[z+(H[q>>2]<<2)>>2]=0;e=H[i>>2];d=H[q>>2]<<2;b=H[d+k>>2];N:{if((e|0)==(b|0)){break N}r=d+z|0;w=e-b|0;x=H[i+52>>2];e=32-x|0;if((w|0)<=(e|0)){d=H[i+48>>2];if((d|0)==(o|0)){break A}H[r>>2]=H[d>>2]<>>32-w;b=w+H[i+52>>2]|0;H[i+52>>2]=b;if((b|0)!=32){break N}H[i+52>>2]=0;H[i+48>>2]=d+4;break N}y=H[i+48>>2];b=y+4|0;if((b|0)==(o|0)){break A}d=H[y>>2];H[i+48>>2]=b;b=w-e|0;H[i+52>>2]=b;H[r>>2]=H[y+4>>2]>>>32-b|d<>>32-w}d=H[q>>2]<<2;b=d+z|0;H[b>>2]=H[b>>2]|H[d+H[u>>2]>>2];m=m+1|0;if(m>>>0>2]){continue}break}}jb(A,s);H[i+8>>2]=H[i+8>>2]+1;t=t+1|0;if((l|0)!=(t|0)){continue}break}}m=H[f+28>>2]}if(m){continue}break}}H[f+28>>2]=0;o=H[f+16>>2];m=H[f+12>>2];t=o-m|0;if(t>>>0>=9){while(1){oa(H[m>>2]);m=H[f+12>>2]+4|0;H[f+12>>2]=m;o=H[f+16>>2];t=o-m|0;if(t>>>0>8){continue}break}}b=170;O:{switch((t>>>2|0)-1|0){case 1:b=341;case 0:H[f+24>>2]=b;break;default:break O}}P:{if((m|0)==(o|0)){break P}while(1){oa(H[m>>2]);m=m+4|0;if((o|0)!=(m|0)){continue}break}d=H[f+16>>2];b=H[f+12>>2];if((d|0)==(b|0)){break P}H[f+16>>2]=d+((b-d|0)+3&-4)}b=H[f+8>>2];if(b){oa(b)}ca=f+32|0;break z}}xb(i);break d;case 2:f=ub(B+8|0,3);w=B+664|0;k=H[b+8>>2];n=H[b+12>>2];d=H[b+20>>2];e=H[b+16>>2];g=e+4|0;d=g>>>0<4?d+1|0:d;Q:{if(g>>>0>k>>>0&(d|0)>=(n|0)|(d|0)>(n|0)){break Q}d=e+H[b>>2]|0;H[f>>2]=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);d=H[b+20>>2];k=d;g=H[b+16>>2];e=g+4|0;d=e>>>0<4?d+1|0:d;H[b+16>>2]=e;H[b+20>>2]=d;if(K[f>>2]>32){break Q}n=H[b+8>>2];s=H[b+12>>2];d=k;g=g+8|0;d=g>>>0<8?d+1|0:d;if(g>>>0>n>>>0&(d|0)>=(s|0)|(d|0)>(s|0)){break Q}d=e+H[b>>2]|0;e=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[f+4>>2]=e;g=H[b+20>>2];d=H[b+16>>2]+4|0;g=d>>>0<4?g+1|0:g;H[b+16>>2]=d;H[b+20>>2]=g;if(!e){break Q}H[f+8>>2]=0;if(!ta(f+16|0,b)){break Q}if(!ua(f+32|0,b)){break Q}if(!ua(f+52|0,b)){break Q}if(!ua(f+72|0,b)){break Q}z=H[f+4>>2];g=0;b=0;h=ca-32|0;ca=h;j=H[f+12>>2];H[h+16>>2]=0;H[h+8>>2]=0;H[h+12>>2]=0;if(j){if(j>>>0>=1073741824){break b}d=j<<2;g=pa(d);H[h+8>>2]=g;b=d+g|0;H[h+16>>2]=b;ra(g,0,d);H[h+12>>2]=b}e=H[f+116>>2];d=H[e>>2];if(d){H[e+4>>2]=d;oa(d);j=H[f+12>>2];g=H[h+8>>2];b=H[h+12>>2]}H[e+4>>2]=b;H[e>>2]=g;H[e+8>>2]=H[h+16>>2];g=0;H[h+16>>2]=0;H[h+8>>2]=0;H[h+12>>2]=0;R:{if(j){if(j>>>0>=1073741824){break b}b=j<<2;u=pa(b);H[h+8>>2]=u;g=b+u|0;H[h+16>>2]=g;ra(u,0,b);H[h+12>>2]=g}d=H[f+128>>2];b=H[d>>2];if(b){H[d+4>>2]=b;oa(b);u=H[h+8>>2];g=H[h+12>>2]}H[d+4>>2]=g;H[d>>2]=u;H[d+8>>2]=H[h+16>>2];H[h+24>>2]=0;H[h+28>>2]=0;H[h+16>>2]=0;H[h+20>>2]=0;H[h+8>>2]=0;H[h+12>>2]=0;xa(h+8|0);d=H[h+24>>2]+H[h+28>>2]|0;b=(d>>>0)/341|0;b=H[H[h+12>>2]+(b<<2)>>2]+N(d-N(b,341)|0,12)|0;H[b+4>>2]=0;H[b+8>>2]=0;H[b>>2]=z;j=H[h+28>>2]+1|0;H[h+28>>2]=j;S:{if(!j){break S}x=f+92|0;y=f+16|0;while(1){n=H[h+12>>2];g=H[h+24>>2];e=j-1|0;d=g+e|0;b=(d>>>0)/341|0;b=H[n+(b<<2)>>2]+N(d-N(b,341)|0,12)|0;p=H[b+8>>2];k=H[b+4>>2];i=H[b>>2];H[h+28>>2]=e;b=H[h+16>>2];if((((b|0)!=(n|0)?N(b-n>>2,341)-1|0:0)-(g+j|0)|0)+1>>>0>=682){oa(H[b-4>>2]);H[h+16>>2]=H[h+16>>2]-4}d=0;if(i>>>0>z>>>0){break S}b=H[f+12>>2];j=(k|0)!=(b-1|0)?k+1|0:0;if(j>>>0>=b>>>0){break S}o=N(p,12);A=o+H[f+128>>2]|0;t=o+H[f+116>>2]|0;g=H[f>>2];q=j<<2;e=H[q+H[A>>2]>>2];T:{if((g|0)==(e|0)){if(!i){break T}while(1){b=H[t>>2];r=H[b+8>>2];s=H[b+4>>2];n=H[b>>2];o=H[w>>2];j=H[o+4>>2];b=H[o+8>>2];U:{if(j>>>0>>0){H[j+8>>2]=r;H[j+4>>2]=s;H[j>>2]=n;H[o+4>>2]=j+12;break U}q=H[o>>2];g=(j-q|0)/12|0;k=g+1|0;if(k>>>0>=357913942){break b}e=(b-q|0)/12|0;b=e<<1;k=e>>>0>=178956970?357913941:b>>>0>k>>>0?b:k;if(k){if(k>>>0>=357913942){break a}b=pa(N(k,12))}else{b=0}u=b+N(g,12)|0;H[u+8>>2]=r;H[u+4>>2]=s;H[u>>2]=n;e=u+12|0;if((j|0)!=(q|0)){while(1){u=u-12|0;j=j-12|0;H[u>>2]=H[j>>2];H[u+4>>2]=H[j+4>>2];H[u+8>>2]=H[j+8>>2];if((j|0)!=(q|0)){continue}break}}H[o+8>>2]=b+N(k,12);H[o+4>>2]=e;H[o>>2]=u;if(!q){break U}oa(q)}H[f+8>>2]=H[f+8>>2]+1;d=d+1|0;if((i|0)!=(d|0)){continue}break}break T}V:{W:{X:{Y:{if(i>>>0<=2){b=H[f+104>>2];H[b>>2]=j;u=1;g=H[f+12>>2];if(g>>>0>1){break Y}break V}if(K[f+8>>2]>K[f+4>>2]){break S}b=H[f+116>>2];s=p+1|0;r=N(s,12);d=b+r|0;if((d|0)!=(t|0)){Aa(d,H[t>>2],H[t+4>>2]);b=H[f+116>>2]}b=q+H[b+r>>2]|0;H[b>>2]=H[b>>2]+(1<>2]=0;pc(y,Q(i)^31,h+4|0);d=i>>>1|0;b=H[h+4>>2];if(d>>>0>>0){break S}e=d-b|0;d=i-e|0;Z:{if((d|0)==(e|0)){b=e;break Z}n=H[f+84>>2];if((n|0)==H[f+76>>2]){break X}k=H[n>>2];g=H[f+88>>2];b=g+1|0;H[f+88>>2]=b;g=k&-2147483648>>>g;_:{if((b|0)==32){H[f+88>>2]=0;H[f+84>>2]=n+4;if(g){break _}break X}if(!g){break X}}b=d}d=e;break W}while(1){j=(g-1|0)!=(j|0)?j+1|0:0;H[b+(u<<2)>>2]=j;g=H[f+12>>2];u=u+1|0;if(g>>>0>u>>>0){continue}break}break V}b=e}n=H[f+128>>2];k=n+o|0;g=H[k>>2];e=g+q|0;H[e>>2]=H[e>>2]+1;Aa(n+r|0,g,H[k+4>>2]);if(d){g=H[h+28>>2]+H[h+24>>2]|0;e=H[h+16>>2];u=H[h+12>>2];if((g|0)==(((e|0)!=(u|0)?N(e-u>>2,341)-1|0:0)|0)){xa(h+8|0);u=H[h+12>>2];g=H[h+24>>2]+H[h+28>>2]|0}e=(g>>>0)/341|0;e=H[(e<<2)+u>>2]+N(g-N(e,341)|0,12)|0;H[e+8>>2]=p;H[e+4>>2]=j;H[e>>2]=d;H[h+28>>2]=H[h+28>>2]+1}if(!b){break T}g=H[h+28>>2]+H[h+24>>2]|0;d=H[h+16>>2];u=H[h+12>>2];if((g|0)==(((d|0)!=(u|0)?N(d-u>>2,341)-1|0:0)|0)){xa(h+8|0);u=H[h+12>>2];g=H[h+24>>2]+H[h+28>>2]|0}d=(g>>>0)/341|0;d=H[(d<<2)+u>>2]+N(g-N(d,341)|0,12)|0;H[d+8>>2]=s;H[d+4>>2]=j;H[d>>2]=b;H[h+28>>2]=H[h+28>>2]+1;break T}if(!i){break T}while(1){if(H[f+12>>2]){p=H[f+36>>2];n=H[A>>2];u=H[f+92>>2];k=H[f+104>>2];j=0;while(1){o=k+(j<<2)|0;H[u+(H[o>>2]<<2)>>2]=0;g=H[f>>2];e=H[o>>2]<<2;b=H[e+n>>2];$:{if((g|0)==(b|0)){break $}q=e+u|0;l=g-b|0;r=H[f+48>>2];g=32-r|0;if((l|0)<=(g|0)){e=H[f+44>>2];if((e|0)==(p|0)){break S}H[q>>2]=H[e>>2]<>>32-l;b=l+H[f+48>>2]|0;H[f+48>>2]=b;if((b|0)!=32){break $}H[f+48>>2]=0;H[f+44>>2]=e+4;break $}s=H[f+44>>2];b=s+4|0;if((b|0)==(p|0)){break S}e=H[s>>2];H[f+44>>2]=b;b=l-g|0;H[f+48>>2]=b;H[q>>2]=H[s+4>>2]>>>32-b|e<>>32-l}e=H[o>>2]<<2;b=e+u|0;H[b>>2]=H[b>>2]|H[e+H[t>>2]>>2];j=j+1|0;if(j>>>0>2]){continue}break}}jb(w,x);H[f+8>>2]=H[f+8>>2]+1;d=d+1|0;if((i|0)!=(d|0)){continue}break}}j=H[h+28>>2];if(j){continue}break}}H[h+28>>2]=0;u=H[h+16>>2];j=H[h+12>>2];g=u-j|0;if(g>>>0>=9){while(1){oa(H[j>>2]);j=H[h+12>>2]+4|0;H[h+12>>2]=j;u=H[h+16>>2];g=u-j|0;if(g>>>0>8){continue}break}}b=170;aa:{switch((g>>>2|0)-1|0){case 1:b=341;case 0:H[h+24>>2]=b;break;default:break aa}}ba:{if((j|0)==(u|0)){break ba}while(1){oa(H[j>>2]);j=j+4|0;if((u|0)!=(j|0)){continue}break}d=H[h+16>>2];b=H[h+12>>2];if((d|0)==(b|0)){break ba}H[h+16>>2]=d+((b-d|0)+3&-4)}b=H[h+8>>2];if(b){oa(b)}ca=h+32|0;break R}}vb(f);break d;case 3:i=ub(B+8|0,3);z=B+664|0;k=H[b+8>>2];n=H[b+12>>2];d=H[b+20>>2];e=H[b+16>>2];g=e+4|0;d=g>>>0<4?d+1|0:d;ca:{if(g>>>0>k>>>0&(d|0)>=(n|0)|(d|0)>(n|0)){break ca}d=e+H[b>>2]|0;H[i>>2]=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);d=H[b+20>>2];k=d;g=H[b+16>>2];e=g+4|0;d=e>>>0<4?d+1|0:d;H[b+16>>2]=e;H[b+20>>2]=d;if(K[i>>2]>32){break ca}n=H[b+8>>2];s=H[b+12>>2];d=k;g=g+8|0;d=g>>>0<8?d+1|0:d;if(g>>>0>n>>>0&(d|0)>=(s|0)|(d|0)>(s|0)){break ca}d=e+H[b>>2]|0;e=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[i+4>>2]=e;g=H[b+20>>2];d=H[b+16>>2]+4|0;g=d>>>0<4?g+1|0:g;H[b+16>>2]=d;H[b+20>>2]=g;if(!e){break ca}H[i+8>>2]=0;if(!ta(i+16|0,b)){break ca}if(!ua(i+32|0,b)){break ca}if(!ua(i+52|0,b)){break ca}if(!ua(i+72|0,b)){break ca}A=H[i+4>>2];d=0;f=ca-32|0;ca=f;j=H[i+12>>2];H[f+16>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;if(j){if(j>>>0>=1073741824){break b}b=j<<2;m=pa(b);H[f+8>>2]=m;d=b+m|0;H[f+16>>2]=d;ra(m,0,b);H[f+12>>2]=d}e=H[i+116>>2];b=H[e>>2];if(b){H[e+4>>2]=b;oa(b);j=H[i+12>>2];m=H[f+8>>2];d=H[f+12>>2]}H[e+4>>2]=d;H[e>>2]=m;H[e+8>>2]=H[f+16>>2];m=0;H[f+16>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;da:{if(j){if(j>>>0>=1073741824){break b}b=j<<2;p=pa(b);H[f+8>>2]=p;m=b+p|0;H[f+16>>2]=m;ra(p,0,b);H[f+12>>2]=m}d=H[i+128>>2];b=H[d>>2];if(b){H[d+4>>2]=b;oa(b);m=H[f+12>>2];p=H[f+8>>2]}H[d+4>>2]=m;H[d>>2]=p;H[d+8>>2]=H[f+16>>2];H[f+24>>2]=0;H[f+28>>2]=0;H[f+16>>2]=0;H[f+20>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;xa(f+8|0);d=H[f+24>>2]+H[f+28>>2]|0;b=(d>>>0)/341|0;b=H[H[f+12>>2]+(b<<2)>>2]+N(d-N(b,341)|0,12)|0;H[b+4>>2]=0;H[b+8>>2]=0;H[b>>2]=A;j=H[f+28>>2]+1|0;H[f+28>>2]=j;ea:{if(!j){break ea}y=i+92|0;s=i+16|0;while(1){k=H[f+12>>2];g=H[f+24>>2];e=j-1|0;d=g+e|0;b=(d>>>0)/341|0;b=H[k+(b<<2)>>2]+N(d-N(b,341)|0,12)|0;o=H[b+8>>2];d=H[b+4>>2];t=H[b>>2];H[f+28>>2]=e;b=H[f+16>>2];if((((b|0)!=(k|0)?N(b-k>>2,341)-1|0:0)-(g+j|0)|0)+1>>>0>=682){oa(H[b-4>>2]);H[f+16>>2]=H[f+16>>2]-4}if(t>>>0>A>>>0){break ea}b=H[i+12>>2];j=(d|0)!=(b-1|0)?d+1|0:0;if(j>>>0>=b>>>0){break ea}b=H[i+116>>2];q=N(o,12);l=b+q|0;e=H[i>>2];r=j<<2;n=q+H[i+128>>2]|0;d=H[r+H[n>>2]>>2];fa:{if((e|0)==(d|0)){r=0;if(!t){break fa}while(1){b=H[l>>2];x=H[b+8>>2];n=H[b+4>>2];k=H[b>>2];o=H[z>>2];j=H[o+4>>2];b=H[o+8>>2];ga:{if(j>>>0>>0){H[j+8>>2]=x;H[j+4>>2]=n;H[j>>2]=k;H[o+4>>2]=j+12;break ga}q=H[o>>2];e=(j-q|0)/12|0;g=e+1|0;if(g>>>0>=357913942){break b}d=(b-q|0)/12|0;b=d<<1;g=d>>>0>=178956970?357913941:b>>>0>g>>>0?b:g;if(g){if(g>>>0>=357913942){break a}b=pa(N(g,12))}else{b=0}p=b+N(e,12)|0;H[p+8>>2]=x;H[p+4>>2]=n;H[p>>2]=k;d=p+12|0;if((j|0)!=(q|0)){while(1){p=p-12|0;j=j-12|0;H[p>>2]=H[j>>2];H[p+4>>2]=H[j+4>>2];H[p+8>>2]=H[j+8>>2];if((j|0)!=(q|0)){continue}break}}H[o+8>>2]=b+N(g,12);H[o+4>>2]=d;H[o>>2]=p;if(!q){break ga}oa(q)}H[i+8>>2]=H[i+8>>2]+1;r=r+1|0;if((t|0)!=(r|0)){continue}break}break fa}ha:{ia:{ja:{ka:{if(t>>>0<=2){b=H[i+104>>2];H[b>>2]=j;p=1;m=H[i+12>>2];if(m>>>0>1){break ka}break ha}if(K[i+8>>2]>K[i+4>>2]){break ea}k=b;b=q+12|0;Aa(k+b|0,H[l>>2],H[l+4>>2]);b=r+H[b+H[i+116>>2]>>2]|0;H[b>>2]=H[b>>2]+(1<>2]=0;pc(s,Q(t)^31,f+4|0);d=t>>>1|0;b=H[f+4>>2];if(d>>>0>>0){break ea}x=o+1|0;e=d-b|0;d=t-e|0;la:{if((d|0)==(e|0)){b=e;break la}n=H[i+84>>2];if((n|0)==H[i+76>>2]){break ja}k=H[n>>2];g=H[i+88>>2];b=g+1|0;H[i+88>>2]=b;g=k&-2147483648>>>g;ma:{if((b|0)==32){H[i+88>>2]=0;H[i+84>>2]=n+4;if(g){break ma}break ja}if(!g){break ja}}b=d}d=e;break ia}while(1){j=(m-1|0)!=(j|0)?j+1|0:0;H[b+(p<<2)>>2]=j;m=H[i+12>>2];p=p+1|0;if(m>>>0>p>>>0){continue}break}break ha}b=e}n=H[i+128>>2];k=n+q|0;g=H[k>>2];e=g+r|0;H[e>>2]=H[e>>2]+1;Aa(n+N(x,12)|0,g,H[k+4>>2]);if(d){m=H[f+28>>2]+H[f+24>>2]|0;e=H[f+16>>2];p=H[f+12>>2];if((m|0)==(((e|0)!=(p|0)?N(e-p>>2,341)-1|0:0)|0)){xa(f+8|0);m=H[f+24>>2]+H[f+28>>2]|0;p=H[f+12>>2]}e=(m>>>0)/341|0;e=H[p+(e<<2)>>2]+N(m-N(e,341)|0,12)|0;H[e+8>>2]=o;H[e+4>>2]=j;H[e>>2]=d;H[f+28>>2]=H[f+28>>2]+1}if(!b){break fa}m=H[f+28>>2]+H[f+24>>2]|0;d=H[f+16>>2];p=H[f+12>>2];if((m|0)==(((d|0)!=(p|0)?N(d-p>>2,341)-1|0:0)|0)){xa(f+8|0);m=H[f+24>>2]+H[f+28>>2]|0;p=H[f+12>>2]}d=(m>>>0)/341|0;d=H[p+(d<<2)>>2]+N(m-N(d,341)|0,12)|0;H[d+8>>2]=x;H[d+4>>2]=j;H[d>>2]=b;H[f+28>>2]=H[f+28>>2]+1;break fa}m=0;if(!t){break fa}while(1){if(H[i+12>>2]){p=H[i+36>>2];k=H[n>>2];w=H[i+92>>2];g=H[i+104>>2];j=0;while(1){o=g+(j<<2)|0;H[w+(H[o>>2]<<2)>>2]=0;e=H[i>>2];d=H[o>>2]<<2;b=H[d+k>>2];na:{if((e|0)==(b|0)){break na}q=d+w|0;u=e-b|0;r=H[i+48>>2];e=32-r|0;if((u|0)<=(e|0)){d=H[i+44>>2];if((d|0)==(p|0)){break ea}H[q>>2]=H[d>>2]<>>32-u;b=u+H[i+48>>2]|0;H[i+48>>2]=b;if((b|0)!=32){break na}H[i+48>>2]=0;H[i+44>>2]=d+4;break na}x=H[i+44>>2];b=x+4|0;if((b|0)==(p|0)){break ea}d=H[x>>2];H[i+44>>2]=b;b=u-e|0;H[i+48>>2]=b;H[q>>2]=H[x+4>>2]>>>32-b|d<>>32-u}d=H[o>>2]<<2;b=d+w|0;H[b>>2]=H[b>>2]|H[d+H[l>>2]>>2];j=j+1|0;if(j>>>0>2]){continue}break}}jb(z,y);H[i+8>>2]=H[i+8>>2]+1;m=m+1|0;if((t|0)!=(m|0)){continue}break}}j=H[f+28>>2];if(j){continue}break}}H[f+28>>2]=0;p=H[f+16>>2];j=H[f+12>>2];m=p-j|0;if(m>>>0>=9){while(1){oa(H[j>>2]);j=H[f+12>>2]+4|0;H[f+12>>2]=j;p=H[f+16>>2];m=p-j|0;if(m>>>0>8){continue}break}}b=170;oa:{switch((m>>>2|0)-1|0){case 1:b=341;case 0:H[f+24>>2]=b;break;default:break oa}}pa:{if((j|0)==(p|0)){break pa}while(1){oa(H[j>>2]);j=j+4|0;if((p|0)!=(j|0)){continue}break}d=H[f+16>>2];b=H[f+12>>2];if((d|0)==(b|0)){break pa}H[f+16>>2]=d+((b-d|0)+3&-4)}b=H[f+8>>2];if(b){oa(b)}ca=f+32|0;break da}}vb(i);break d;case 4:f=$a(B+8|0,3);w=B+664|0;k=H[b+8>>2];n=H[b+12>>2];d=H[b+20>>2];e=H[b+16>>2];g=e+4|0;d=g>>>0<4?d+1|0:d;qa:{if(g>>>0>k>>>0&(d|0)>=(n|0)|(d|0)>(n|0)){break qa}d=e+H[b>>2]|0;H[f>>2]=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);d=H[b+20>>2];k=d;g=H[b+16>>2];e=g+4|0;d=e>>>0<4?d+1|0:d;H[b+16>>2]=e;H[b+20>>2]=d;if(K[f>>2]>32){break qa}n=H[b+8>>2];s=H[b+12>>2];d=k;g=g+8|0;d=g>>>0<8?d+1|0:d;if(g>>>0>n>>>0&(d|0)>=(s|0)|(d|0)>(s|0)){break qa}d=e+H[b>>2]|0;e=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[f+4>>2]=e;g=H[b+20>>2];d=H[b+16>>2]+4|0;g=d>>>0<4?g+1|0:g;H[b+16>>2]=d;H[b+20>>2]=g;if(!e){break qa}H[f+8>>2]=0;if(!sb(f+16|0,b)){break qa}if(!ua(f+544|0,b)){break qa}if(!ua(f+564|0,b)){break qa}if(!ua(f+584|0,b)){break qa}z=H[f+4>>2];l=0;b=0;h=ca-32|0;ca=h;d=H[f+12>>2];H[h+16>>2]=0;H[h+8>>2]=0;H[h+12>>2]=0;if(d){if(d>>>0>=1073741824){break b}e=d<<2;l=pa(e);H[h+8>>2]=l;b=e+l|0;H[h+16>>2]=b;ra(l,0,e);H[h+12>>2]=b}g=H[f+628>>2];e=H[g>>2];if(e){H[g+4>>2]=e;oa(e);d=H[f+12>>2];l=H[h+8>>2];b=H[h+12>>2]}H[g+4>>2]=b;H[g>>2]=l;H[g+8>>2]=H[h+16>>2];l=0;H[h+16>>2]=0;H[h+8>>2]=0;H[h+12>>2]=0;ra:{if(d){if(d>>>0>=1073741824){break b}b=d<<2;j=pa(b);H[h+8>>2]=j;l=b+j|0;H[h+16>>2]=l;ra(j,0,b);H[h+12>>2]=l}d=H[f+640>>2];b=H[d>>2];if(b){H[d+4>>2]=b;oa(b);j=H[h+8>>2];l=H[h+12>>2]}H[d+4>>2]=l;H[d>>2]=j;H[d+8>>2]=H[h+16>>2];H[h+24>>2]=0;H[h+28>>2]=0;H[h+16>>2]=0;H[h+20>>2]=0;H[h+8>>2]=0;H[h+12>>2]=0;xa(h+8|0);d=H[h+24>>2]+H[h+28>>2]|0;b=(d>>>0)/341|0;b=H[H[h+12>>2]+(b<<2)>>2]+N(d-N(b,341)|0,12)|0;H[b+4>>2]=0;H[b+8>>2]=0;H[b>>2]=z;d=H[h+28>>2]+1|0;H[h+28>>2]=d;sa:{if(!d){break sa}x=f+604|0;y=f+16|0;while(1){n=H[h+12>>2];k=H[h+24>>2];g=d-1|0;e=k+g|0;b=(e>>>0)/341|0;b=H[n+(b<<2)>>2]+N(e-N(b,341)|0,12)|0;p=H[b+8>>2];e=H[b+4>>2];i=H[b>>2];H[h+28>>2]=g;b=H[h+16>>2];if((((b|0)!=(n|0)?N(b-n>>2,341)-1|0:0)-(d+k|0)|0)+1>>>0>=682){oa(H[b-4>>2]);H[h+16>>2]=H[h+16>>2]-4}if(i>>>0>z>>>0){break sa}b=H[f+12>>2];j=(e|0)!=(b-1|0)?e+1|0:0;if(j>>>0>=b>>>0){break sa}o=N(p,12);A=o+H[f+640>>2]|0;t=o+H[f+628>>2]|0;g=H[f>>2];q=j<<2;e=H[q+H[A>>2]>>2];ta:{ua:{if((g|0)==(e|0)){o=0;if(!i){break ua}while(1){b=H[t>>2];r=H[b+8>>2];s=H[b+4>>2];n=H[b>>2];p=H[w>>2];d=H[p+4>>2];b=H[p+8>>2];va:{if(d>>>0>>0){H[d+8>>2]=r;H[d+4>>2]=s;H[d>>2]=n;H[p+4>>2]=d+12;break va}q=H[p>>2];g=(d-q|0)/12|0;k=g+1|0;if(k>>>0>=357913942){break b}e=(b-q|0)/12|0;b=e<<1;k=e>>>0>=178956970?357913941:b>>>0>k>>>0?b:k;if(k){if(k>>>0>=357913942){break a}b=pa(N(k,12))}else{b=0}j=b+N(g,12)|0;H[j+8>>2]=r;H[j+4>>2]=s;H[j>>2]=n;e=j+12|0;if((d|0)!=(q|0)){while(1){j=j-12|0;d=d-12|0;H[j>>2]=H[d>>2];H[j+4>>2]=H[d+4>>2];H[j+8>>2]=H[d+8>>2];if((d|0)!=(q|0)){continue}break}}H[p+8>>2]=b+N(k,12);H[p+4>>2]=e;H[p>>2]=j;if(!q){break va}oa(q)}H[f+8>>2]=H[f+8>>2]+1;o=o+1|0;if((i|0)!=(o|0)){continue}break}break ua}wa:{xa:{ya:{if(i>>>0<=2){b=H[f+616>>2];H[b>>2]=j;d=1;l=H[f+12>>2];if(l>>>0>1){break ya}break wa}if(K[f+8>>2]>K[f+4>>2]){break sa}b=H[f+628>>2];s=p+1|0;r=N(s,12);d=b+r|0;if((d|0)!=(t|0)){Aa(d,H[t>>2],H[t+4>>2]);b=H[f+628>>2]}b=q+H[b+r>>2]|0;H[b>>2]=H[b>>2]+(1<>>1|0;break xa}while(1){l=Ba(y+(d<<4)|0)|l<<1;d=d+1|0;if((b|0)!=(d|0)){continue}break}d=i>>>1|0;if(l>>>0<=d>>>0){break xa}break sa}while(1){j=(l-1|0)!=(j|0)?j+1|0:0;H[b+(d<<2)>>2]=j;d=d+1|0;l=H[f+12>>2];if(d>>>0>>0){continue}break}break wa}za:{Aa:{e=d-l|0;d=i-e|0;Ba:{if((d|0)==(e|0)){b=e;break Ba}n=H[f+596>>2];if((n|0)==H[f+588>>2]){break Aa}k=H[n>>2];g=H[f+600>>2];b=g+1|0;H[f+600>>2]=b;g=k&-2147483648>>>g;Ca:{if((b|0)==32){H[f+600>>2]=0;H[f+596>>2]=n+4;if(g){break Ca}break Aa}if(!g){break Aa}}b=d}d=e;break za}b=e}n=H[f+640>>2];k=n+o|0;g=H[k>>2];e=g+q|0;H[e>>2]=H[e>>2]+1;Aa(n+r|0,g,H[k+4>>2]);if(d){g=H[h+28>>2]+H[h+24>>2]|0;e=H[h+16>>2];l=H[h+12>>2];if((g|0)==(((e|0)!=(l|0)?N(e-l>>2,341)-1|0:0)|0)){xa(h+8|0);l=H[h+12>>2];g=H[h+24>>2]+H[h+28>>2]|0}e=(g>>>0)/341|0;e=H[(e<<2)+l>>2]+N(g-N(e,341)|0,12)|0;H[e+8>>2]=p;H[e+4>>2]=j;H[e>>2]=d;H[h+28>>2]=H[h+28>>2]+1}if(!b){break ua}l=H[h+28>>2]+H[h+24>>2]|0;e=H[h+16>>2];d=H[h+12>>2];if((l|0)==(((d|0)!=(e|0)?N(e-d>>2,341)-1|0:0)|0)){xa(h+8|0);l=H[h+24>>2]+H[h+28>>2]|0;e=H[h+12>>2]}else{e=d}d=(l>>>0)/341|0;d=H[e+(d<<2)>>2]+N(l-N(d,341)|0,12)|0;H[d+8>>2]=s;H[d+4>>2]=j;H[d>>2]=b;d=H[h+28>>2]+1|0;H[h+28>>2]=d;break ta}j=0;if(!i){break ua}while(1){if(H[f+12>>2]){p=H[f+548>>2];n=H[A>>2];u=H[f+604>>2];k=H[f+616>>2];d=0;while(1){o=k+(d<<2)|0;H[u+(H[o>>2]<<2)>>2]=0;g=H[f>>2];e=H[o>>2]<<2;b=H[e+n>>2];Da:{if((g|0)==(b|0)){break Da}q=e+u|0;l=g-b|0;r=H[f+560>>2];g=32-r|0;if((l|0)<=(g|0)){e=H[f+556>>2];if((e|0)==(p|0)){break sa}H[q>>2]=H[e>>2]<>>32-l;b=l+H[f+560>>2]|0;H[f+560>>2]=b;if((b|0)!=32){break Da}H[f+560>>2]=0;H[f+556>>2]=e+4;break Da}s=H[f+556>>2];b=s+4|0;if((b|0)==(p|0)){break sa}e=H[s>>2];H[f+556>>2]=b;b=l-g|0;H[f+560>>2]=b;H[q>>2]=H[s+4>>2]>>>32-b|e<>>32-l}e=H[o>>2]<<2;b=e+u|0;H[b>>2]=H[b>>2]|H[e+H[t>>2]>>2];d=d+1|0;if(d>>>0>2]){continue}break}}jb(w,x);H[f+8>>2]=H[f+8>>2]+1;j=j+1|0;if((i|0)!=(j|0)){continue}break}}d=H[h+28>>2]}if(d){continue}break}}H[h+28>>2]=0;j=H[h+16>>2];d=H[h+12>>2];l=j-d|0;if(l>>>0>=9){while(1){oa(H[d>>2]);d=H[h+12>>2]+4|0;H[h+12>>2]=d;j=H[h+16>>2];l=j-d|0;if(l>>>0>8){continue}break}}b=170;Ea:{switch((l>>>2|0)-1|0){case 1:b=341;case 0:H[h+24>>2]=b;break;default:break Ea}}Fa:{if((d|0)==(j|0)){break Fa}while(1){oa(H[d>>2]);d=d+4|0;if((j|0)!=(d|0)){continue}break}d=H[h+16>>2];b=H[h+12>>2];if((d|0)==(b|0)){break Fa}H[h+16>>2]=d+((b-d|0)+3&-4)}b=H[h+8>>2];if(b){oa(b)}ca=h+32|0;break ra}}ab(f);break d;case 5:f=$a(B+8|0,3);w=B+664|0;k=H[b+8>>2];n=H[b+12>>2];d=H[b+20>>2];e=H[b+16>>2];g=e+4|0;d=g>>>0<4?d+1|0:d;Ga:{if(g>>>0>k>>>0&(d|0)>=(n|0)|(d|0)>(n|0)){break Ga}d=e+H[b>>2]|0;H[f>>2]=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);d=H[b+20>>2];k=d;g=H[b+16>>2];e=g+4|0;d=e>>>0<4?d+1|0:d;H[b+16>>2]=e;H[b+20>>2]=d;if(K[f>>2]>32){break Ga}n=H[b+8>>2];s=H[b+12>>2];d=k;g=g+8|0;d=g>>>0<8?d+1|0:d;if(g>>>0>n>>>0&(d|0)>=(s|0)|(d|0)>(s|0)){break Ga}d=e+H[b>>2]|0;e=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[f+4>>2]=e;g=H[b+20>>2];d=H[b+16>>2]+4|0;g=d>>>0<4?g+1|0:g;H[b+16>>2]=d;H[b+20>>2]=g;if(!e){break Ga}H[f+8>>2]=0;if(!sb(f+16|0,b)){break Ga}if(!ua(f+544|0,b)){break Ga}if(!ua(f+564|0,b)){break Ga}if(!ua(f+584|0,b)){break Ga}z=H[f+4>>2];l=0;b=0;h=ca-32|0;ca=h;d=H[f+12>>2];H[h+16>>2]=0;H[h+8>>2]=0;H[h+12>>2]=0;if(d){if(d>>>0>=1073741824){break b}e=d<<2;l=pa(e);H[h+8>>2]=l;b=e+l|0;H[h+16>>2]=b;ra(l,0,e);H[h+12>>2]=b}g=H[f+628>>2];e=H[g>>2];if(e){H[g+4>>2]=e;oa(e);d=H[f+12>>2];l=H[h+8>>2];b=H[h+12>>2]}H[g+4>>2]=b;H[g>>2]=l;H[g+8>>2]=H[h+16>>2];l=0;H[h+16>>2]=0;H[h+8>>2]=0;H[h+12>>2]=0;Ha:{if(d){if(d>>>0>=1073741824){break b}b=d<<2;p=pa(b);H[h+8>>2]=p;l=b+p|0;H[h+16>>2]=l;ra(p,0,b);H[h+12>>2]=l}d=H[f+640>>2];b=H[d>>2];if(b){H[d+4>>2]=b;oa(b);l=H[h+12>>2];p=H[h+8>>2]}H[d+4>>2]=l;H[d>>2]=p;H[d+8>>2]=H[h+16>>2];H[h+24>>2]=0;H[h+28>>2]=0;H[h+16>>2]=0;H[h+20>>2]=0;H[h+8>>2]=0;H[h+12>>2]=0;xa(h+8|0);d=H[h+24>>2]+H[h+28>>2]|0;b=(d>>>0)/341|0;b=H[H[h+12>>2]+(b<<2)>>2]+N(d-N(b,341)|0,12)|0;H[b+4>>2]=0;H[b+8>>2]=0;H[b>>2]=z;d=H[h+28>>2]+1|0;H[h+28>>2]=d;Ia:{if(!d){break Ia}x=f+604|0;y=f+16|0;while(1){n=H[h+12>>2];k=H[h+24>>2];g=d-1|0;e=k+g|0;b=(e>>>0)/341|0;b=H[n+(b<<2)>>2]+N(e-N(b,341)|0,12)|0;o=H[b+8>>2];e=H[b+4>>2];i=H[b>>2];H[h+28>>2]=g;b=H[h+16>>2];if((((b|0)!=(n|0)?N(b-n>>2,341)-1|0:0)-(d+k|0)|0)+1>>>0>=682){oa(H[b-4>>2]);H[h+16>>2]=H[h+16>>2]-4}if(i>>>0>z>>>0){break Ia}m=0;b=H[f+12>>2];p=(e|0)!=(b-1|0)?e+1|0:0;if(p>>>0>=b>>>0){break Ia}b=H[f+628>>2];q=N(o,12);t=b+q|0;e=H[f>>2];r=p<<2;s=q+H[f+640>>2]|0;d=H[r+H[s>>2]>>2];Ja:{Ka:{if((e|0)==(d|0)){if(!i){break Ka}while(1){b=H[t>>2];r=H[b+8>>2];s=H[b+4>>2];n=H[b>>2];o=H[w>>2];d=H[o+4>>2];b=H[o+8>>2];La:{if(d>>>0>>0){H[d+8>>2]=r;H[d+4>>2]=s;H[d>>2]=n;H[o+4>>2]=d+12;break La}q=H[o>>2];g=(d-q|0)/12|0;k=g+1|0;if(k>>>0>=357913942){break b}e=(b-q|0)/12|0;b=e<<1;k=e>>>0>=178956970?357913941:b>>>0>k>>>0?b:k;if(k){if(k>>>0>=357913942){break a}b=pa(N(k,12))}else{b=0}p=b+N(g,12)|0;H[p+8>>2]=r;H[p+4>>2]=s;H[p>>2]=n;e=p+12|0;if((d|0)!=(q|0)){while(1){p=p-12|0;d=d-12|0;H[p>>2]=H[d>>2];H[p+4>>2]=H[d+4>>2];H[p+8>>2]=H[d+8>>2];if((d|0)!=(q|0)){continue}break}}H[o+8>>2]=b+N(k,12);H[o+4>>2]=e;H[o>>2]=p;if(!q){break La}oa(q)}H[f+8>>2]=H[f+8>>2]+1;m=m+1|0;if((i|0)!=(m|0)){continue}break}break Ka}Ma:{Na:{Oa:{if(i>>>0<=2){b=H[f+616>>2];H[b>>2]=p;d=1;l=H[f+12>>2];if(l>>>0>1){break Oa}break Ma}if(K[f+8>>2]>K[f+4>>2]){break Ia}k=b;b=q+12|0;Aa(k+b|0,H[t>>2],H[t+4>>2]);b=r+H[b+H[f+628>>2]>>2]|0;H[b>>2]=H[b>>2]+(1<>>1|0;break Na}while(1){l=Ba(y+(d<<4)|0)|l<<1;d=d+1|0;if((b|0)!=(d|0)){continue}break}d=i>>>1|0;if(l>>>0<=d>>>0){break Na}break Ia}while(1){p=(l-1|0)!=(p|0)?p+1|0:0;H[b+(d<<2)>>2]=p;d=d+1|0;l=H[f+12>>2];if(d>>>0>>0){continue}break}break Ma}s=o+1|0;Pa:{Qa:{e=d-l|0;d=i-e|0;Ra:{if((d|0)==(e|0)){b=e;break Ra}n=H[f+596>>2];if((n|0)==H[f+588>>2]){break Qa}k=H[n>>2];g=H[f+600>>2];b=g+1|0;H[f+600>>2]=b;g=k&-2147483648>>>g;Sa:{if((b|0)==32){H[f+600>>2]=0;H[f+596>>2]=n+4;if(g){break Sa}break Qa}if(!g){break Qa}}b=d}d=e;break Pa}b=e}n=H[f+640>>2];k=n+q|0;g=H[k>>2];e=g+r|0;H[e>>2]=H[e>>2]+1;Aa(n+N(s,12)|0,g,H[k+4>>2]);if(d){m=H[h+28>>2]+H[h+24>>2]|0;e=H[h+16>>2];l=H[h+12>>2];if((m|0)==(((e|0)!=(l|0)?N(e-l>>2,341)-1|0:0)|0)){xa(h+8|0);m=H[h+24>>2]+H[h+28>>2]|0;l=H[h+12>>2]}e=(m>>>0)/341|0;e=H[l+(e<<2)>>2]+N(m-N(e,341)|0,12)|0;H[e+8>>2]=o;H[e+4>>2]=p;H[e>>2]=d;H[h+28>>2]=H[h+28>>2]+1}if(!b){break Ka}l=H[h+28>>2]+H[h+24>>2]|0;e=H[h+16>>2];d=H[h+12>>2];if((l|0)==(((d|0)!=(e|0)?N(e-d>>2,341)-1|0:0)|0)){xa(h+8|0);l=H[h+24>>2]+H[h+28>>2]|0;e=H[h+12>>2]}else{e=d}d=(l>>>0)/341|0;d=H[e+(d<<2)>>2]+N(l-N(d,341)|0,12)|0;H[d+8>>2]=s;H[d+4>>2]=p;H[d>>2]=b;d=H[h+28>>2]+1|0;H[h+28>>2]=d;break Ja}if(!i){break Ka}while(1){if(H[f+12>>2]){A=H[f+548>>2];n=H[s>>2];u=H[f+604>>2];k=H[f+616>>2];d=0;while(1){p=k+(d<<2)|0;H[u+(H[p>>2]<<2)>>2]=0;g=H[f>>2];e=H[p>>2]<<2;b=H[e+n>>2];Ta:{if((g|0)==(b|0)){break Ta}o=e+u|0;l=g-b|0;q=H[f+560>>2];g=32-q|0;if((l|0)<=(g|0)){e=H[f+556>>2];if((e|0)==(A|0)){break Ia}H[o>>2]=H[e>>2]<>>32-l;b=l+H[f+560>>2]|0;H[f+560>>2]=b;if((b|0)!=32){break Ta}H[f+560>>2]=0;H[f+556>>2]=e+4;break Ta}r=H[f+556>>2];b=r+4|0;if((b|0)==(A|0)){break Ia}e=H[r>>2];H[f+556>>2]=b;b=l-g|0;H[f+560>>2]=b;H[o>>2]=H[r+4>>2]>>>32-b|e<>>32-l}e=H[p>>2]<<2;b=e+u|0;H[b>>2]=H[b>>2]|H[e+H[t>>2]>>2];d=d+1|0;if(d>>>0>2]){continue}break}}jb(w,x);H[f+8>>2]=H[f+8>>2]+1;m=m+1|0;if((i|0)!=(m|0)){continue}break}}d=H[h+28>>2]}if(d){continue}break}}H[h+28>>2]=0;p=H[h+16>>2];d=H[h+12>>2];l=p-d|0;if(l>>>0>=9){while(1){oa(H[d>>2]);d=H[h+12>>2]+4|0;H[h+12>>2]=d;p=H[h+16>>2];l=p-d|0;if(l>>>0>8){continue}break}}b=170;Ua:{switch((l>>>2|0)-1|0){case 1:b=341;case 0:H[h+24>>2]=b;break;default:break Ua}}Va:{if((d|0)==(p|0)){break Va}while(1){oa(H[d>>2]);d=d+4|0;if((p|0)!=(d|0)){continue}break}d=H[h+16>>2];b=H[h+12>>2];if((d|0)==(b|0)){break Va}H[h+16>>2]=d+((b-d|0)+3&-4)}b=H[h+8>>2];if(b){oa(b)}ca=h+32|0;break Ha}}ab(f);break d;case 6:break f;default:break c}}f=$a(B+8|0,3);w=B+664|0;k=H[b+8>>2];n=H[b+12>>2];d=H[b+20>>2];e=H[b+16>>2];g=e+4|0;d=g>>>0<4?d+1|0:d;Wa:{if(g>>>0>k>>>0&(d|0)>=(n|0)|(d|0)>(n|0)){break Wa}d=e+H[b>>2]|0;H[f>>2]=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);d=H[b+20>>2];k=d;g=H[b+16>>2];e=g+4|0;d=e>>>0<4?d+1|0:d;H[b+16>>2]=e;H[b+20>>2]=d;if(K[f>>2]>32){break Wa}n=H[b+8>>2];s=H[b+12>>2];d=k;g=g+8|0;d=g>>>0<8?d+1|0:d;if(g>>>0>n>>>0&(d|0)>=(s|0)|(d|0)>(s|0)){break Wa}d=e+H[b>>2]|0;e=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[f+4>>2]=e;g=H[b+20>>2];d=H[b+16>>2]+4|0;g=d>>>0<4?g+1|0:g;H[b+16>>2]=d;H[b+20>>2]=g;if(!e){break Wa}H[f+8>>2]=0;if(!sb(f+16|0,b)){break Wa}if(!ua(f+544|0,b)){break Wa}if(!ua(f+564|0,b)){break Wa}if(!ua(f+584|0,b)){break Wa}z=H[f+4>>2];l=0;b=0;h=ca-32|0;ca=h;d=H[f+12>>2];H[h+16>>2]=0;H[h+8>>2]=0;H[h+12>>2]=0;if(d){if(d>>>0>=1073741824){break b}e=d<<2;l=pa(e);H[h+8>>2]=l;b=e+l|0;H[h+16>>2]=b;ra(l,0,e);H[h+12>>2]=b}g=H[f+628>>2];e=H[g>>2];if(e){H[g+4>>2]=e;oa(e);d=H[f+12>>2];l=H[h+8>>2];b=H[h+12>>2]}H[g+4>>2]=b;H[g>>2]=l;H[g+8>>2]=H[h+16>>2];l=0;H[h+16>>2]=0;H[h+8>>2]=0;H[h+12>>2]=0;Xa:{if(d){if(d>>>0>=1073741824){break b}b=d<<2;j=pa(b);H[h+8>>2]=j;l=b+j|0;H[h+16>>2]=l;ra(j,0,b);H[h+12>>2]=l}d=H[f+640>>2];b=H[d>>2];if(b){H[d+4>>2]=b;oa(b);j=H[h+8>>2];l=H[h+12>>2]}H[d+4>>2]=l;H[d>>2]=j;H[d+8>>2]=H[h+16>>2];H[h+24>>2]=0;H[h+28>>2]=0;H[h+16>>2]=0;H[h+20>>2]=0;H[h+8>>2]=0;H[h+12>>2]=0;xa(h+8|0);d=H[h+24>>2]+H[h+28>>2]|0;b=(d>>>0)/341|0;b=H[H[h+12>>2]+(b<<2)>>2]+N(d-N(b,341)|0,12)|0;H[b+4>>2]=0;H[b+8>>2]=0;H[b>>2]=z;d=H[h+28>>2]+1|0;H[h+28>>2]=d;Ya:{if(!d){break Ya}x=f+604|0;y=f+16|0;while(1){n=H[h+12>>2];k=H[h+24>>2];g=d-1|0;e=k+g|0;b=(e>>>0)/341|0;b=H[n+(b<<2)>>2]+N(e-N(b,341)|0,12)|0;p=H[b+8>>2];i=H[b>>2];H[h+28>>2]=g;b=H[h+16>>2];if((((b|0)!=(n|0)?N(b-n>>2,341)-1|0:0)-(d+k|0)|0)+1>>>0>=682){oa(H[b-4>>2]);H[h+16>>2]=H[h+16>>2]-4}if(i>>>0>z>>>0){break Ya}b=H[f+628>>2];o=N(p,12);A=o+H[f+640>>2]|0;j=Vd(f,i,A);if(j>>>0>=K[f+12>>2]){break Ya}t=b+o|0;g=H[f>>2];q=j<<2;e=H[q+H[A>>2]>>2];Za:{_a:{if((g|0)==(e|0)){o=0;if(!i){break _a}while(1){b=H[t>>2];r=H[b+8>>2];s=H[b+4>>2];n=H[b>>2];p=H[w>>2];d=H[p+4>>2];b=H[p+8>>2];$a:{if(d>>>0>>0){H[d+8>>2]=r;H[d+4>>2]=s;H[d>>2]=n;H[p+4>>2]=d+12;break $a}q=H[p>>2];g=(d-q|0)/12|0;k=g+1|0;if(k>>>0>=357913942){break b}e=(b-q|0)/12|0;b=e<<1;k=e>>>0>=178956970?357913941:b>>>0>k>>>0?b:k;if(k){if(k>>>0>=357913942){break a}b=pa(N(k,12))}else{b=0}j=b+N(g,12)|0;H[j+8>>2]=r;H[j+4>>2]=s;H[j>>2]=n;e=j+12|0;if((d|0)!=(q|0)){while(1){j=j-12|0;d=d-12|0;H[j>>2]=H[d>>2];H[j+4>>2]=H[d+4>>2];H[j+8>>2]=H[d+8>>2];if((d|0)!=(q|0)){continue}break}}H[p+8>>2]=b+N(k,12);H[p+4>>2]=e;H[p>>2]=j;if(!q){break $a}oa(q)}H[f+8>>2]=H[f+8>>2]+1;o=o+1|0;if((i|0)!=(o|0)){continue}break}break _a}ab:{bb:{cb:{if(i>>>0<=2){b=H[f+616>>2];H[b>>2]=j;d=1;l=H[f+12>>2];if(l>>>0>1){break cb}break ab}if(K[f+8>>2]>K[f+4>>2]){break Ya}b=H[f+628>>2];s=p+1|0;r=N(s,12);d=b+r|0;if((d|0)!=(t|0)){Aa(d,H[t>>2],H[t+4>>2]);b=H[f+628>>2]}b=q+H[b+r>>2]|0;H[b>>2]=H[b>>2]+(1<>>1|0;break bb}while(1){l=Ba(y+(d<<4)|0)|l<<1;d=d+1|0;if((b|0)!=(d|0)){continue}break}d=i>>>1|0;if(l>>>0<=d>>>0){break bb}break Ya}while(1){j=(l-1|0)!=(j|0)?j+1|0:0;H[b+(d<<2)>>2]=j;d=d+1|0;l=H[f+12>>2];if(d>>>0>>0){continue}break}break ab}db:{eb:{e=d-l|0;d=i-e|0;fb:{if((d|0)==(e|0)){b=e;break fb}n=H[f+596>>2];if((n|0)==H[f+588>>2]){break eb}k=H[n>>2];g=H[f+600>>2];b=g+1|0;H[f+600>>2]=b;g=k&-2147483648>>>g;gb:{if((b|0)==32){H[f+600>>2]=0;H[f+596>>2]=n+4;if(g){break gb}break eb}if(!g){break eb}}b=d}d=e;break db}b=e}n=H[f+640>>2];k=n+o|0;g=H[k>>2];e=g+q|0;H[e>>2]=H[e>>2]+1;Aa(n+r|0,g,H[k+4>>2]);if(d){g=H[h+28>>2]+H[h+24>>2]|0;e=H[h+16>>2];l=H[h+12>>2];if((g|0)==(((e|0)!=(l|0)?N(e-l>>2,341)-1|0:0)|0)){xa(h+8|0);l=H[h+12>>2];g=H[h+24>>2]+H[h+28>>2]|0}e=(g>>>0)/341|0;e=H[(e<<2)+l>>2]+N(g-N(e,341)|0,12)|0;H[e+8>>2]=p;H[e+4>>2]=j;H[e>>2]=d;H[h+28>>2]=H[h+28>>2]+1}if(!b){break _a}l=H[h+28>>2]+H[h+24>>2]|0;e=H[h+16>>2];d=H[h+12>>2];if((l|0)==(((d|0)!=(e|0)?N(e-d>>2,341)-1|0:0)|0)){xa(h+8|0);l=H[h+24>>2]+H[h+28>>2]|0;e=H[h+12>>2]}else{e=d}d=(l>>>0)/341|0;d=H[e+(d<<2)>>2]+N(l-N(d,341)|0,12)|0;H[d+8>>2]=s;H[d+4>>2]=j;H[d>>2]=b;d=H[h+28>>2]+1|0;H[h+28>>2]=d;break Za}j=0;if(!i){break _a}while(1){if(H[f+12>>2]){p=H[f+548>>2];n=H[A>>2];u=H[f+604>>2];k=H[f+616>>2];d=0;while(1){o=k+(d<<2)|0;H[u+(H[o>>2]<<2)>>2]=0;g=H[f>>2];e=H[o>>2]<<2;b=H[e+n>>2];hb:{if((g|0)==(b|0)){break hb}q=e+u|0;l=g-b|0;r=H[f+560>>2];g=32-r|0;if((l|0)<=(g|0)){e=H[f+556>>2];if((e|0)==(p|0)){break Ya}H[q>>2]=H[e>>2]<>>32-l;b=l+H[f+560>>2]|0;H[f+560>>2]=b;if((b|0)!=32){break hb}H[f+560>>2]=0;H[f+556>>2]=e+4;break hb}s=H[f+556>>2];b=s+4|0;if((b|0)==(p|0)){break Ya}e=H[s>>2];H[f+556>>2]=b;b=l-g|0;H[f+560>>2]=b;H[q>>2]=H[s+4>>2]>>>32-b|e<>>32-l}e=H[o>>2]<<2;b=e+u|0;H[b>>2]=H[b>>2]|H[e+H[t>>2]>>2];d=d+1|0;if(d>>>0>2]){continue}break}}jb(w,x);H[f+8>>2]=H[f+8>>2]+1;j=j+1|0;if((i|0)!=(j|0)){continue}break}}d=H[h+28>>2]}if(d){continue}break}}H[h+28>>2]=0;j=H[h+16>>2];d=H[h+12>>2];l=j-d|0;if(l>>>0>=9){while(1){oa(H[d>>2]);d=H[h+12>>2]+4|0;H[h+12>>2]=d;j=H[h+16>>2];l=j-d|0;if(l>>>0>8){continue}break}}b=170;ib:{switch((l>>>2|0)-1|0){case 1:b=341;case 0:H[h+24>>2]=b;break;default:break ib}}jb:{if((d|0)==(j|0)){break jb}while(1){oa(H[d>>2]);d=d+4|0;if((j|0)!=(d|0)){continue}break}d=H[h+16>>2];b=H[h+12>>2];if((d|0)==(b|0)){break jb}H[h+16>>2]=d+((b-d|0)+3&-4)}b=H[h+8>>2];if(b){oa(b)}ca=h+32|0;break Xa}}ab(f)}n=H[a+12>>2]==((H[c+4>>2]-H[c>>2]|0)/12|0)}ca=B+672|0;return n}sa();v()}wa();v()}function kd(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;if(!a){return 1}e=H[c+20>>2];g=H[c+12>>2];i=H[c+16>>2];a:{if((e|0)>=(g|0)&i>>>0>=K[c+8>>2]|(e|0)>(g|0)){break a}g=I[i+H[c>>2]|0];i=i+1|0;e=i?e:e+1|0;H[c+16>>2]=i;H[c+20>>2]=e;b:{switch(g|0){case 0:e=a;f=b;i=d;a=0;d=0;m=ca+-64|0;ca=m;H[m+56>>2]=0;H[m+48>>2]=0;H[m+52>>2]=0;H[m+40>>2]=0;H[m+44>>2]=0;H[m+32>>2]=0;H[m+36>>2]=0;H[m+24>>2]=0;H[m+28>>2]=0;H[m+16>>2]=0;H[m+20>>2]=0;H[m+8>>2]=0;H[m+12>>2]=0;c:{if(!Ne(m+8|0,c)){break c}if(!Me(m+8|0,c)|(H[m+20>>2]?0:e)){break c}Db(c,0,0);if(e){s=f<<2;t=H[m+36>>2];w=H[m+48>>2];x=H[m+24>>2];l=H[m+56>>2];j=H[m+52>>2];while(1){d:{if(l>>>0>16383){break d}while(1){if((j|0)<=0){break d}j=j-1|0;H[m+52>>2]=j;l=I[j+w|0]|l<<8;H[m+56>>2]=l;if(l>>>0<16384){continue}break}}a=l&4095;r=H[(a<<2)+x>>2];b=(r<<3)+t|0;l=(N(H[b>>2],l>>>12|0)+a|0)-H[b+4>>2]|0;H[m+56>>2]=l;if((f|0)>0){a=0;if(!I[c+36|0]|r>>>0>32){break c}g=d+f|0;e:{if(!r){ra(i+(d<<2)|0,0,s);break e}y=r&-2;z=r&1;b=H[c+32>>2];h=H[c+28>>2];n=H[c+24>>2];while(1){k=0;a=b;o=0;q=0;if((r|0)!=1){while(1){p=n+(a>>>3|0)|0;f:{if(p>>>0>=h>>>0){p=0;break f}p=I[p|0];b=a+1|0;H[c+32>>2]=b;p=p>>>(a&7)&1;a=b}p=p<>>3|0)|0;if(u>>>0>>0){o=I[u|0];b=a+1|0;H[c+32>>2]=b;o=o>>>(a&7)&1;a=b}u=k|1;k=k+2|0;o=p|o<>>3|0)|0;if(p>>>0>>0){p=I[p|0];b=a+1|0;H[c+32>>2]=b;a=p>>>(a&7)&1}else{a=0}o=a<>2]=o;d=d+1|0;if((g|0)!=(d|0)){continue}break}}d=g}v=f+v|0;if(e>>>0>v>>>0){continue}break}}F[c+36|0]=0;b=H[c+20>>2];e=0;d=H[c+32>>2]+7|0;e=d>>>0<7?1:e;d=(e&7)<<29|d>>>3;a=d+H[c+16>>2]|0;e=(e>>>3|0)+b|0;H[c+16>>2]=a;H[c+20>>2]=a>>>0>>0?e+1|0:e;a=1}b=H[m+36>>2];if(b){H[m+40>>2]=b;oa(b)}b=H[m+24>>2];if(b){H[m+28>>2]=b;oa(b)}b=H[m+8>>2];if(b){H[m+12>>2]=b;oa(b)}ca=m- -64|0;return a;case 1:break b;default:break a}}b=0;e=H[c+20>>2];g=H[c+12>>2];i=H[c+16>>2];g:{if((e|0)>=(g|0)&i>>>0>=K[c+8>>2]|(e|0)>(g|0)){break g}g=I[i+H[c>>2]|0];i=i+1|0;e=i?e:e+1|0;H[c+16>>2]=i;H[c+20>>2]=e;h:{switch(g-1|0){case 8:g=a;r=d;i=ca+-64|0;ca=i;H[i+56>>2]=0;H[i+48>>2]=0;H[i+52>>2]=0;H[i+40>>2]=0;H[i+44>>2]=0;H[i+32>>2]=0;H[i+36>>2]=0;H[i+24>>2]=0;H[i+28>>2]=0;H[i+16>>2]=0;H[i+20>>2]=0;H[i+8>>2]=0;H[i+12>>2]=0;j=i+8|0;a=J[c+38>>1];i:{j:{if(!a){break j}k:{if(a>>>0<=511){d=H[c+8>>2];b=H[c+12>>2];e=H[c+20>>2];a=H[c+16>>2];f=a+4|0;e=f>>>0<4?e+1|0:e;if(d>>>0>>0&(b|0)<=(e|0)|(b|0)<(e|0)){break j}a=a+H[c>>2]|0;h=I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24);H[j+12>>2]=h;e=H[c+20>>2];f=H[c+16>>2]+4|0;e=f>>>0<4?e+1|0:e;H[c+16>>2]=f;H[c+20>>2]=e;break k}if(!hb(1,j+12|0,c)){break j}f=H[c+16>>2];e=H[c+20>>2];h=H[j+12>>2]}a=H[c+8>>2];d=a-f|0;a=H[c+12>>2]-((a>>>0>>0)+e|0)|0;if(d>>>0>>6>>>0&(a|0)<=0|(a|0)<0){break j}b=H[j>>2];a=H[j+4>>2]-b>>2;l:{if(a>>>0>>0){ya(j,h-a|0);h=H[j+12>>2];break l}if(a>>>0<=h>>>0){break l}H[j+4>>2]=b+(h<<2)}d=1;if(!h){break i}f=H[c+16>>2];e=H[c+20>>2];s=H[j>>2];m=H[c+8>>2];n=H[c+12>>2];b=0;while(1){d=0;if((e|0)>=(n|0)&f>>>0>=m>>>0|(e|0)>(n|0)){break i}d=H[c>>2];p=I[d+f|0];f=f+1|0;e=f?e:e+1|0;H[c+16>>2]=f;H[c+20>>2]=e;a=p>>>2|0;l=0;m:{n:{o:{p:{t=p&3;switch(t|0){case 0:break n;case 3:break p;default:break o}}a=a+b|0;d=0;if(a>>>0>=h>>>0){break i}ra(s+(b<<2)|0,0,(p&252)+4|0);b=a;break m}while(1){if((f|0)==(m|0)&(e|0)==(n|0)){break j}h=I[d+f|0];f=f+1|0;e=f?e:e+1|0;H[c+16>>2]=f;H[c+20>>2]=e;a=h<<(l<<3|6)|a;l=l+1|0;if((t|0)!=(l|0)){continue}break}}H[s+(b<<2)>>2]=a}b=b+1|0;h=H[j+12>>2];if(b>>>0>>0){continue}break}a=j+16|0;n=H[j>>2];d=H[j+16>>2];b=H[j+20>>2]-d|0;q:{if(b>>>0<=32767){ya(a,8192-(b>>>2|0)|0);break q}if((b|0)==32768){break q}H[j+20>>2]=d+32768}d=j+28|0;b=H[d>>2];f=H[j+32>>2]-b>>3;r:{if(f>>>0>>0){ob(d,h-f|0);b=H[d>>2];break r}if(f>>>0>h>>>0){H[j+32>>2]=(h<<3)+b}if(!h){break j}}m=H[a>>2];f=0;d=0;while(1){e=n+(f<<2)|0;j=H[e>>2];l=(f<<3)+b|0;a=d;H[l+4>>2]=a;H[l>>2]=j;e=H[e>>2];d=e+a|0;if(d>>>0>8192){break j}s:{if(a>>>0>=d>>>0){break s}l=0;j=e&7;if(j){while(1){H[m+(a<<2)>>2]=f;a=a+1|0;l=l+1|0;if((j|0)!=(l|0)){continue}break}}if(e-1>>>0<=6){break s}while(1){e=m+(a<<2)|0;H[e>>2]=f;H[e+28>>2]=f;H[e+24>>2]=f;H[e+20>>2]=f;H[e+16>>2]=f;H[e+12>>2]=f;H[e+8>>2]=f;H[e+4>>2]=f;a=a+8|0;if((d|0)!=(a|0)){continue}break}}f=f+1|0;if((h|0)!=(f|0)){continue}break}k=(d|0)==8192}d=k}t:{if(!d|(H[i+20>>2]?0:g)){break t}d=0;m=ca-16|0;ca=m;u:{v:{if(J[c+38>>1]<=511){b=H[c+8>>2];a=H[c+12>>2];h=a;e=H[c+20>>2];k=H[c+16>>2];f=k+8|0;e=f>>>0<8?e+1|0:e;if(b>>>0>>0&(a|0)<=(e|0)|(a|0)<(e|0)){break u}k=k+H[c>>2]|0;a=I[k|0]|I[k+1|0]<<8|(I[k+2|0]<<16|I[k+3|0]<<24);k=I[k+4|0]|I[k+5|0]<<8|(I[k+6|0]<<16|I[k+7|0]<<24);H[c+16>>2]=f;H[c+20>>2]=e;break v}if(!gb(1,m+8|0,c)){break u}f=H[c+16>>2];e=H[c+20>>2];b=H[c+8>>2];h=H[c+12>>2];a=H[m+8>>2];k=H[m+12>>2]}j=b-f|0;b=h-((b>>>0>>0)+e|0)|0;if((b|0)==(k|0)&a>>>0>j>>>0|b>>>0>>0){break u}e=e+k|0;b=a+f|0;e=b>>>0>>0?e+1|0:e;H[c+16>>2]=b;H[c+20>>2]=e;if((a|0)<=0){break u}b=H[c>>2]+f|0;H[i+48>>2]=b;c=a-1|0;f=c+b|0;e=I[f|0];w:{if(e>>>0<=63){H[i+52>>2]=c;a=I[f|0]&63;break w}x:{switch((e>>>6|0)-1|0){case 0:if(a>>>0<2){break u}a=a-2|0;H[i+52>>2]=a;a=a+b|0;a=I[a+1|0]<<8&16128|I[a|0];break w;case 1:if(a>>>0<3){break u}a=a-3|0;H[i+52>>2]=a;a=a+b|0;a=I[a+1|0]<<8|I[a+2|0]<<16&4128768|I[a|0];break w;default:break x}}a=a-4|0;H[i+52>>2]=a;a=a+b|0;a=(I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24))&1073741823}H[i+56>>2]=a+32768;d=a>>>0<8355840}ca=m+16|0;if(!d){break t}if(!g){o=1;break t}b=H[i+52>>2];a=H[i+56>>2];c=H[i+36>>2];d=H[i+48>>2];f=H[i+24>>2];while(1){y:{if(a>>>0>32767){break y}while(1){if((b|0)<=0){break y}b=b-1|0;H[i+52>>2]=b;a=I[b+d|0]|a<<8;H[i+56>>2]=a;if(a>>>0<32768){continue}break}}e=a&8191;o=H[f+(e<<2)>>2];k=c+(o<<3)|0;a=(N(H[k>>2],a>>>13|0)+e|0)-H[k+4>>2]|0;H[i+56>>2]=a;H[r+(q<<2)>>2]=o;o=1;q=q+1|0;if((g|0)!=(q|0)){continue}break}}a=H[i+36>>2];if(a){H[i+40>>2]=a;oa(a)}a=H[i+24>>2];if(a){H[i+28>>2]=a;oa(a)}a=H[i+8>>2];if(a){H[i+12>>2]=a;oa(a)}ca=i- -64|0;b=o;break g;case 9:m=a;r=d;g=ca+-64|0;ca=g;H[g+56>>2]=0;H[g+48>>2]=0;H[g+52>>2]=0;H[g+40>>2]=0;H[g+44>>2]=0;H[g+32>>2]=0;H[g+36>>2]=0;H[g+24>>2]=0;H[g+28>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;j=g+8|0;a=J[c+38>>1];z:{A:{if(!a){break A}B:{if(a>>>0<=511){d=H[c+8>>2];b=H[c+12>>2];e=H[c+20>>2];a=H[c+16>>2];f=a+4|0;e=f>>>0<4?e+1|0:e;if(d>>>0>>0&(b|0)<=(e|0)|(b|0)<(e|0)){break A}a=a+H[c>>2]|0;h=I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24);H[j+12>>2]=h;e=H[c+20>>2];f=H[c+16>>2]+4|0;e=f>>>0<4?e+1|0:e;H[c+16>>2]=f;H[c+20>>2]=e;break B}if(!hb(1,j+12|0,c)){break A}f=H[c+16>>2];e=H[c+20>>2];h=H[j+12>>2]}a=H[c+8>>2];d=a-f|0;a=H[c+12>>2]-((a>>>0>>0)+e|0)|0;if(d>>>0>>6>>>0&(a|0)<=0|(a|0)<0){break A}b=H[j>>2];a=H[j+4>>2]-b>>2;C:{if(a>>>0>>0){ya(j,h-a|0);h=H[j+12>>2];break C}if(a>>>0<=h>>>0){break C}H[j+4>>2]=b+(h<<2)}d=1;if(!h){break z}f=H[c+16>>2];e=H[c+20>>2];s=H[j>>2];i=H[c+8>>2];n=H[c+12>>2];b=0;while(1){d=0;if((e|0)>=(n|0)&f>>>0>=i>>>0|(e|0)>(n|0)){break z}d=H[c>>2];p=I[d+f|0];f=f+1|0;e=f?e:e+1|0;H[c+16>>2]=f;H[c+20>>2]=e;a=p>>>2|0;l=0;D:{E:{F:{G:{t=p&3;switch(t|0){case 0:break E;case 3:break G;default:break F}}a=a+b|0;d=0;if(a>>>0>=h>>>0){break z}ra(s+(b<<2)|0,0,(p&252)+4|0);b=a;break D}while(1){if((f|0)==(i|0)&(e|0)==(n|0)){break A}h=I[d+f|0];f=f+1|0;e=f?e:e+1|0;H[c+16>>2]=f;H[c+20>>2]=e;a=h<<(l<<3|6)|a;l=l+1|0;if((t|0)!=(l|0)){continue}break}}H[s+(b<<2)>>2]=a}b=b+1|0;h=H[j+12>>2];if(b>>>0>>0){continue}break}a=j+16|0;n=H[j>>2];d=H[j+16>>2];b=H[j+20>>2]-d|0;H:{if(b>>>0<=131071){ya(a,32768-(b>>>2|0)|0);break H}if((b|0)==131072){break H}H[j+20>>2]=d+131072}d=j+28|0;b=H[d>>2];f=H[j+32>>2]-b>>3;I:{if(f>>>0>>0){ob(d,h-f|0);b=H[d>>2];break I}if(f>>>0>h>>>0){H[j+32>>2]=(h<<3)+b}if(!h){break A}}i=H[a>>2];f=0;d=0;while(1){e=n+(f<<2)|0;j=H[e>>2];l=(f<<3)+b|0;a=d;H[l+4>>2]=a;H[l>>2]=j;e=H[e>>2];d=e+a|0;if(d>>>0>32768){break A}J:{if(a>>>0>=d>>>0){break J}l=0;j=e&7;if(j){while(1){H[i+(a<<2)>>2]=f;a=a+1|0;l=l+1|0;if((j|0)!=(l|0)){continue}break}}if(e-1>>>0<=6){break J}while(1){e=i+(a<<2)|0;H[e>>2]=f;H[e+28>>2]=f;H[e+24>>2]=f;H[e+20>>2]=f;H[e+16>>2]=f;H[e+12>>2]=f;H[e+8>>2]=f;H[e+4>>2]=f;a=a+8|0;if((d|0)!=(a|0)){continue}break}}f=f+1|0;if((h|0)!=(f|0)){continue}break}k=(d|0)==32768}d=k}K:{if(!d|(H[g+20>>2]?0:m)){break K}d=0;j=ca-16|0;ca=j;L:{M:{if(J[c+38>>1]<=511){b=H[c+8>>2];a=H[c+12>>2];h=a;e=H[c+20>>2];k=H[c+16>>2];f=k+8|0;e=f>>>0<8?e+1|0:e;if(b>>>0>>0&(a|0)<=(e|0)|(a|0)<(e|0)){break L}k=k+H[c>>2]|0;a=I[k|0]|I[k+1|0]<<8|(I[k+2|0]<<16|I[k+3|0]<<24);k=I[k+4|0]|I[k+5|0]<<8|(I[k+6|0]<<16|I[k+7|0]<<24);H[c+16>>2]=f;H[c+20>>2]=e;break M}if(!gb(1,j+8|0,c)){break L}f=H[c+16>>2];e=H[c+20>>2];b=H[c+8>>2];h=H[c+12>>2];a=H[j+8>>2];k=H[j+12>>2]}i=b-f|0;b=h-((b>>>0>>0)+e|0)|0;if((b|0)==(k|0)&a>>>0>i>>>0|b>>>0>>0){break L}i=e+k|0;b=a+f|0;i=b>>>0>>0?i+1|0:i;H[c+16>>2]=b;H[c+20>>2]=i;if((a|0)<=0){break L}b=H[c>>2]+f|0;H[g+48>>2]=b;c=a-1|0;f=c+b|0;e=I[f|0];N:{if(e>>>0<=63){H[g+52>>2]=c;a=I[f|0]&63;break N}O:{switch((e>>>6|0)-1|0){case 0:if(a>>>0<2){break L}a=a-2|0;H[g+52>>2]=a;a=a+b|0;a=I[a+1|0]<<8&16128|I[a|0];break N;case 1:if(a>>>0<3){break L}a=a-3|0;H[g+52>>2]=a;a=a+b|0;a=I[a+1|0]<<8|I[a+2|0]<<16&4128768|I[a|0];break N;default:break O}}a=a-4|0;H[g+52>>2]=a;a=a+b|0;a=(I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24))&1073741823}H[g+56>>2]=a+131072;d=a>>>0<33423360}ca=j+16|0;if(!d){break K}if(!m){o=1;break K}b=H[g+52>>2];a=H[g+56>>2];c=H[g+36>>2];d=H[g+48>>2];f=H[g+24>>2];while(1){P:{if(a>>>0>131071){break P}while(1){if((b|0)<=0){break P}b=b-1|0;H[g+52>>2]=b;a=I[b+d|0]|a<<8;H[g+56>>2]=a;if(a>>>0<131072){continue}break}}e=a&32767;o=H[f+(e<<2)>>2];k=c+(o<<3)|0;a=(N(H[k>>2],a>>>15|0)+e|0)-H[k+4>>2]|0;H[g+56>>2]=a;H[r+(q<<2)>>2]=o;o=1;q=q+1|0;if((m|0)!=(q|0)){continue}break}}a=H[g+36>>2];if(a){H[g+40>>2]=a;oa(a)}a=H[g+24>>2];if(a){H[g+28>>2]=a;oa(a)}a=H[g+8>>2];if(a){H[g+12>>2]=a;oa(a)}ca=g- -64|0;b=o;break g;case 10:m=a;j=d;g=ca+-64|0;ca=g;H[g+56>>2]=0;H[g+48>>2]=0;H[g+52>>2]=0;H[g+40>>2]=0;H[g+44>>2]=0;H[g+32>>2]=0;H[g+36>>2]=0;H[g+24>>2]=0;H[g+28>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;n=g+8|0;a=J[c+38>>1];Q:{R:{if(!a){break R}S:{if(a>>>0<=511){d=H[c+8>>2];b=H[c+12>>2];e=H[c+20>>2];a=H[c+16>>2];f=a+4|0;e=f>>>0<4?e+1|0:e;if(d>>>0>>0&(b|0)<=(e|0)|(b|0)<(e|0)){break R}a=a+H[c>>2]|0;h=I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24);H[n+12>>2]=h;e=H[c+20>>2];f=H[c+16>>2]+4|0;e=f>>>0<4?e+1|0:e;H[c+16>>2]=f;H[c+20>>2]=e;break S}if(!hb(1,n+12|0,c)){break R}f=H[c+16>>2];e=H[c+20>>2];h=H[n+12>>2]}a=H[c+8>>2];d=a-f|0;a=H[c+12>>2]-((a>>>0>>0)+e|0)|0;if(d>>>0>>6>>>0&(a|0)<=0|(a|0)<0){break R}b=H[n>>2];a=H[n+4>>2]-b>>2;T:{if(a>>>0>>0){ya(n,h-a|0);h=H[n+12>>2];break T}if(a>>>0<=h>>>0){break T}H[n+4>>2]=b+(h<<2)}d=1;if(!h){break Q}f=H[c+16>>2];e=H[c+20>>2];t=H[n>>2];r=H[c+8>>2];p=H[c+12>>2];b=0;while(1){d=0;if((e|0)>=(p|0)&f>>>0>=r>>>0|(e|0)>(p|0)){break Q}d=H[c>>2];s=I[d+f|0];f=f+1|0;i=f?e:e+1|0;H[c+16>>2]=f;e=i;H[c+20>>2]=e;a=s>>>2|0;l=0;U:{V:{W:{X:{i=s&3;switch(i|0){case 0:break V;case 3:break X;default:break W}}a=a+b|0;d=0;if(a>>>0>=h>>>0){break Q}ra(t+(b<<2)|0,0,(s&252)+4|0);b=a;break U}while(1){if((f|0)==(r|0)&(e|0)==(p|0)){break R}h=I[d+f|0];f=f+1|0;e=f?e:e+1|0;H[c+16>>2]=f;H[c+20>>2]=e;a=h<<(l<<3|6)|a;l=l+1|0;if((i|0)!=(l|0)){continue}break}}H[t+(b<<2)>>2]=a}b=b+1|0;h=H[n+12>>2];if(b>>>0>>0){continue}break}a=n+16|0;r=H[n>>2];d=H[n+16>>2];b=H[n+20>>2]-d|0;Y:{if(b>>>0<=262143){ya(a,65536-(b>>>2|0)|0);break Y}if((b|0)==262144){break Y}H[n+20>>2]=d+262144}d=n+28|0;b=H[d>>2];f=H[n+32>>2]-b>>3;Z:{if(f>>>0>>0){ob(d,h-f|0);b=H[d>>2];break Z}if(f>>>0>h>>>0){H[n+32>>2]=(h<<3)+b}if(!h){break R}}i=H[a>>2];f=0;d=0;while(1){e=r+(f<<2)|0;l=H[e>>2];n=(f<<3)+b|0;a=d;H[n+4>>2]=a;H[n>>2]=l;e=H[e>>2];d=e+a|0;if(d>>>0>65536){break R}_:{if(a>>>0>=d>>>0){break _}l=0;n=e&7;if(n){while(1){H[i+(a<<2)>>2]=f;a=a+1|0;l=l+1|0;if((n|0)!=(l|0)){continue}break}}if(e-1>>>0<=6){break _}while(1){e=i+(a<<2)|0;H[e>>2]=f;H[e+28>>2]=f;H[e+24>>2]=f;H[e+20>>2]=f;H[e+16>>2]=f;H[e+12>>2]=f;H[e+8>>2]=f;H[e+4>>2]=f;a=a+8|0;if((d|0)!=(a|0)){continue}break}}f=f+1|0;if((h|0)!=(f|0)){continue}break}k=(d|0)==65536}d=k}$:{if(!d|(H[g+20>>2]?0:m)){break $}d=0;i=ca-16|0;ca=i;aa:{ba:{if(J[c+38>>1]<=511){b=H[c+8>>2];a=H[c+12>>2];h=a;e=H[c+20>>2];k=H[c+16>>2];f=k+8|0;e=f>>>0<8?e+1|0:e;if(b>>>0>>0&(a|0)<=(e|0)|(a|0)<(e|0)){break aa}k=k+H[c>>2]|0;a=I[k|0]|I[k+1|0]<<8|(I[k+2|0]<<16|I[k+3|0]<<24);k=I[k+4|0]|I[k+5|0]<<8|(I[k+6|0]<<16|I[k+7|0]<<24);H[c+16>>2]=f;H[c+20>>2]=e;break ba}if(!gb(1,i+8|0,c)){break aa}f=H[c+16>>2];e=H[c+20>>2];b=H[c+8>>2];h=H[c+12>>2];a=H[i+8>>2];k=H[i+12>>2]}r=b-f|0;b=h-((b>>>0>>0)+e|0)|0;if((b|0)==(k|0)&a>>>0>r>>>0|b>>>0>>0){break aa}e=e+k|0;b=a+f|0;e=b>>>0>>0?e+1|0:e;H[c+16>>2]=b;H[c+20>>2]=e;if((a|0)<=0){break aa}b=H[c>>2]+f|0;H[g+48>>2]=b;c=a-1|0;f=c+b|0;e=I[f|0];ca:{if(e>>>0<=63){H[g+52>>2]=c;a=I[f|0]&63;break ca}da:{switch((e>>>6|0)-1|0){case 0:if(a>>>0<2){break aa}a=a-2|0;H[g+52>>2]=a;a=a+b|0;a=I[a+1|0]<<8&16128|I[a|0];break ca;case 1:if(a>>>0<3){break aa}a=a-3|0;H[g+52>>2]=a;a=a+b|0;a=I[a+1|0]<<8|I[a+2|0]<<16&4128768|I[a|0];break ca;default:break da}}a=a-4|0;H[g+52>>2]=a;a=a+b|0;a=(I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24))&1073741823}H[g+56>>2]=a+262144;d=a>>>0<66846720}ca=i+16|0;if(!d){break $}if(!m){o=1;break $}b=H[g+52>>2];a=H[g+56>>2];c=H[g+36>>2];d=H[g+48>>2];f=H[g+24>>2];while(1){ea:{if(a>>>0>262143){break ea}while(1){if((b|0)<=0){break ea}b=b-1|0;H[g+52>>2]=b;a=I[b+d|0]|a<<8;H[g+56>>2]=a;if(a>>>0<262144){continue}break}}e=a&65535;o=H[f+(e<<2)>>2];k=c+(o<<3)|0;a=(N(H[k>>2],a>>>16|0)+e|0)-H[k+4>>2]|0;H[g+56>>2]=a;H[j+(q<<2)>>2]=o;o=1;q=q+1|0;if((m|0)!=(q|0)){continue}break}}a=H[g+36>>2];if(a){H[g+40>>2]=a;oa(a)}a=H[g+24>>2];if(a){H[g+28>>2]=a;oa(a)}a=H[g+8>>2];if(a){H[g+12>>2]=a;oa(a)}ca=g- -64|0;b=o;break g;case 11:m=a;r=d;g=ca+-64|0;ca=g;H[g+56>>2]=0;H[g+48>>2]=0;H[g+52>>2]=0;H[g+40>>2]=0;H[g+44>>2]=0;H[g+32>>2]=0;H[g+36>>2]=0;H[g+24>>2]=0;H[g+28>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;j=g+8|0;a=J[c+38>>1];fa:{ga:{if(!a){break ga}ha:{if(a>>>0<=511){d=H[c+8>>2];b=H[c+12>>2];e=H[c+20>>2];a=H[c+16>>2];f=a+4|0;e=f>>>0<4?e+1|0:e;if(d>>>0>>0&(b|0)<=(e|0)|(b|0)<(e|0)){break ga}a=a+H[c>>2]|0;h=I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24);H[j+12>>2]=h;i=H[c+20>>2];f=H[c+16>>2]+4|0;i=f>>>0<4?i+1|0:i;H[c+16>>2]=f;e=i;H[c+20>>2]=e;break ha}if(!hb(1,j+12|0,c)){break ga}f=H[c+16>>2];e=H[c+20>>2];h=H[j+12>>2]}a=H[c+8>>2];d=a-f|0;a=H[c+12>>2]-((a>>>0>>0)+e|0)|0;if(d>>>0>>6>>>0&(a|0)<=0|(a|0)<0){break ga}b=H[j>>2];a=H[j+4>>2]-b>>2;ia:{if(a>>>0>>0){ya(j,h-a|0);h=H[j+12>>2];break ia}if(a>>>0<=h>>>0){break ia}H[j+4>>2]=b+(h<<2)}d=1;if(!h){break fa}f=H[c+16>>2];e=H[c+20>>2];s=H[j>>2];i=H[c+8>>2];n=H[c+12>>2];b=0;while(1){d=0;if((e|0)>=(n|0)&f>>>0>=i>>>0|(e|0)>(n|0)){break fa}d=H[c>>2];p=I[d+f|0];f=f+1|0;e=f?e:e+1|0;H[c+16>>2]=f;H[c+20>>2]=e;a=p>>>2|0;l=0;ja:{ka:{la:{ma:{t=p&3;switch(t|0){case 0:break ka;case 3:break ma;default:break la}}a=a+b|0;d=0;if(a>>>0>=h>>>0){break fa}ra(s+(b<<2)|0,0,(p&252)+4|0);b=a;break ja}while(1){if((f|0)==(i|0)&(e|0)==(n|0)){break ga}h=I[d+f|0];f=f+1|0;e=f?e:e+1|0;H[c+16>>2]=f;H[c+20>>2]=e;a=h<<(l<<3|6)|a;l=l+1|0;if((t|0)!=(l|0)){continue}break}}H[s+(b<<2)>>2]=a}b=b+1|0;h=H[j+12>>2];if(b>>>0>>0){continue}break}a=j+16|0;n=H[j>>2];d=H[j+16>>2];b=H[j+20>>2]-d|0;na:{if(b>>>0<=1048575){ya(a,262144-(b>>>2|0)|0);break na}if((b|0)==1048576){break na}H[j+20>>2]=d- -1048576}d=j+28|0;b=H[d>>2];f=H[j+32>>2]-b>>3;oa:{if(f>>>0>>0){ob(d,h-f|0);b=H[d>>2];break oa}if(f>>>0>h>>>0){H[j+32>>2]=(h<<3)+b}if(!h){break ga}}i=H[a>>2];f=0;d=0;while(1){e=n+(f<<2)|0;j=H[e>>2];l=(f<<3)+b|0;a=d;H[l+4>>2]=a;H[l>>2]=j;e=H[e>>2];d=e+a|0;if(d>>>0>262144){break ga}pa:{if(a>>>0>=d>>>0){break pa}l=0;j=e&7;if(j){while(1){H[i+(a<<2)>>2]=f;a=a+1|0;l=l+1|0;if((j|0)!=(l|0)){continue}break}}if(e-1>>>0<=6){break pa}while(1){e=i+(a<<2)|0;H[e>>2]=f;H[e+28>>2]=f;H[e+24>>2]=f;H[e+20>>2]=f;H[e+16>>2]=f;H[e+12>>2]=f;H[e+8>>2]=f;H[e+4>>2]=f;a=a+8|0;if((d|0)!=(a|0)){continue}break}}f=f+1|0;if((h|0)!=(f|0)){continue}break}k=(d|0)==262144}d=k}qa:{if(!d|(H[g+20>>2]?0:m)){break qa}d=0;j=ca-16|0;ca=j;ra:{sa:{if(J[c+38>>1]<=511){b=H[c+8>>2];a=H[c+12>>2];h=a;i=H[c+20>>2];k=H[c+16>>2];f=k+8|0;i=f>>>0<8?i+1|0:i;e=i;if(b>>>0>>0&(e|0)>=(a|0)|(a|0)<(e|0)){break ra}k=k+H[c>>2]|0;a=I[k|0]|I[k+1|0]<<8|(I[k+2|0]<<16|I[k+3|0]<<24);k=I[k+4|0]|I[k+5|0]<<8|(I[k+6|0]<<16|I[k+7|0]<<24);H[c+16>>2]=f;H[c+20>>2]=e;break sa}if(!gb(1,j+8|0,c)){break ra}f=H[c+16>>2];e=H[c+20>>2];b=H[c+8>>2];h=H[c+12>>2];a=H[j+8>>2];k=H[j+12>>2]}i=b-f|0;b=h-((b>>>0>>0)+e|0)|0;if((b|0)==(k|0)&a>>>0>i>>>0|b>>>0>>0){break ra}e=e+k|0;b=a+f|0;e=b>>>0>>0?e+1|0:e;H[c+16>>2]=b;H[c+20>>2]=e;if((a|0)<=0){break ra}b=H[c>>2]+f|0;H[g+48>>2]=b;c=a-1|0;f=c+b|0;e=I[f|0];ta:{if(e>>>0<=63){H[g+52>>2]=c;a=I[f|0]&63;break ta}ua:{switch((e>>>6|0)-1|0){case 0:if(a>>>0<2){break ra}a=a-2|0;H[g+52>>2]=a;a=a+b|0;a=I[a+1|0]<<8&16128|I[a|0];break ta;case 1:if(a>>>0<3){break ra}a=a-3|0;H[g+52>>2]=a;a=a+b|0;a=I[a+1|0]<<8|I[a+2|0]<<16&4128768|I[a|0];break ta;default:break ua}}a=a-4|0;H[g+52>>2]=a;a=a+b|0;a=(I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24))&1073741823}H[g+56>>2]=a- -1048576;d=a>>>0<267386880}ca=j+16|0;if(!d){break qa}if(!m){o=1;break qa}b=H[g+52>>2];a=H[g+56>>2];c=H[g+36>>2];d=H[g+48>>2];f=H[g+24>>2];while(1){va:{if(a>>>0>1048575){break va}while(1){if((b|0)<=0){break va}b=b-1|0;H[g+52>>2]=b;a=I[b+d|0]|a<<8;H[g+56>>2]=a;if(a>>>0<1048576){continue}break}}e=a&262143;o=H[f+(e<<2)>>2];k=c+(o<<3)|0;a=(N(H[k>>2],a>>>18|0)+e|0)-H[k+4>>2]|0;H[g+56>>2]=a;H[r+(q<<2)>>2]=o;o=1;q=q+1|0;if((m|0)!=(q|0)){continue}break}}a=H[g+36>>2];if(a){H[g+40>>2]=a;oa(a)}a=H[g+24>>2];if(a){H[g+28>>2]=a;oa(a)}a=H[g+8>>2];if(a){H[g+12>>2]=a;oa(a)}ca=g- -64|0;b=o;break g;case 12:m=a;r=d;g=ca+-64|0;ca=g;H[g+56>>2]=0;H[g+48>>2]=0;H[g+52>>2]=0;H[g+40>>2]=0;H[g+44>>2]=0;H[g+32>>2]=0;H[g+36>>2]=0;H[g+24>>2]=0;H[g+28>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;j=g+8|0;a=J[c+38>>1];wa:{xa:{if(!a){break xa}ya:{if(a>>>0<=511){d=H[c+8>>2];b=H[c+12>>2];i=H[c+20>>2];a=H[c+16>>2];f=a+4|0;i=f>>>0<4?i+1|0:i;if(d>>>0>>0&(b|0)<=(i|0)|(b|0)<(i|0)){break xa}a=a+H[c>>2]|0;h=I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24);H[j+12>>2]=h;e=H[c+20>>2];f=H[c+16>>2]+4|0;e=f>>>0<4?e+1|0:e;H[c+16>>2]=f;H[c+20>>2]=e;break ya}if(!hb(1,j+12|0,c)){break xa}f=H[c+16>>2];e=H[c+20>>2];h=H[j+12>>2]}a=H[c+8>>2];d=a-f|0;a=H[c+12>>2]-((a>>>0>>0)+e|0)|0;if(d>>>0>>6>>>0&(a|0)<=0|(a|0)<0){break xa}b=H[j>>2];a=H[j+4>>2]-b>>2;za:{if(a>>>0>>0){ya(j,h-a|0);h=H[j+12>>2];break za}if(a>>>0<=h>>>0){break za}H[j+4>>2]=b+(h<<2)}d=1;if(!h){break wa}f=H[c+16>>2];e=H[c+20>>2];s=H[j>>2];i=H[c+8>>2];n=H[c+12>>2];b=0;while(1){d=0;if((e|0)>=(n|0)&f>>>0>=i>>>0|(e|0)>(n|0)){break wa}d=H[c>>2];p=I[d+f|0];f=f+1|0;e=f?e:e+1|0;H[c+16>>2]=f;H[c+20>>2]=e;a=p>>>2|0;l=0;Aa:{Ba:{Ca:{Da:{t=p&3;switch(t|0){case 0:break Ba;case 3:break Da;default:break Ca}}a=a+b|0;d=0;if(a>>>0>=h>>>0){break wa}ra(s+(b<<2)|0,0,(p&252)+4|0);b=a;break Aa}while(1){if((f|0)==(i|0)&(e|0)==(n|0)){break xa}h=I[d+f|0];f=f+1|0;e=f?e:e+1|0;H[c+16>>2]=f;H[c+20>>2]=e;a=h<<(l<<3|6)|a;l=l+1|0;if((t|0)!=(l|0)){continue}break}}H[s+(b<<2)>>2]=a}b=b+1|0;h=H[j+12>>2];if(b>>>0>>0){continue}break}a=j+16|0;n=H[j>>2];d=H[j+16>>2];b=H[j+20>>2]-d|0;Ea:{if(b>>>0<=2097151){ya(a,524288-(b>>>2|0)|0);break Ea}if((b|0)==2097152){break Ea}H[j+20>>2]=d+2097152}d=j+28|0;b=H[d>>2];f=H[j+32>>2]-b>>3;Fa:{if(f>>>0>>0){ob(d,h-f|0);b=H[d>>2];break Fa}if(f>>>0>h>>>0){H[j+32>>2]=(h<<3)+b}if(!h){break xa}}i=H[a>>2];f=0;d=0;while(1){e=n+(f<<2)|0;j=H[e>>2];l=(f<<3)+b|0;a=d;H[l+4>>2]=a;H[l>>2]=j;e=H[e>>2];d=e+a|0;if(d>>>0>524288){break xa}Ga:{if(a>>>0>=d>>>0){break Ga}l=0;j=e&7;if(j){while(1){H[i+(a<<2)>>2]=f;a=a+1|0;l=l+1|0;if((j|0)!=(l|0)){continue}break}}if(e-1>>>0<=6){break Ga}while(1){e=i+(a<<2)|0;H[e>>2]=f;H[e+28>>2]=f;H[e+24>>2]=f;H[e+20>>2]=f;H[e+16>>2]=f;H[e+12>>2]=f;H[e+8>>2]=f;H[e+4>>2]=f;a=a+8|0;if((d|0)!=(a|0)){continue}break}}f=f+1|0;if((h|0)!=(f|0)){continue}break}k=(d|0)==524288}d=k}Ha:{if(!d|(H[g+20>>2]?0:m)){break Ha}d=0;i=ca-16|0;ca=i;Ia:{Ja:{if(J[c+38>>1]<=511){b=H[c+8>>2];a=H[c+12>>2];h=a;e=H[c+20>>2];k=H[c+16>>2];f=k+8|0;e=f>>>0<8?e+1|0:e;if(b>>>0>>0&(a|0)<=(e|0)|(a|0)<(e|0)){break Ia}k=k+H[c>>2]|0;a=I[k|0]|I[k+1|0]<<8|(I[k+2|0]<<16|I[k+3|0]<<24);k=I[k+4|0]|I[k+5|0]<<8|(I[k+6|0]<<16|I[k+7|0]<<24);H[c+16>>2]=f;H[c+20>>2]=e;break Ja}if(!gb(1,i+8|0,c)){break Ia}f=H[c+16>>2];e=H[c+20>>2];b=H[c+8>>2];h=H[c+12>>2];a=H[i+8>>2];k=H[i+12>>2]}j=b-f|0;b=h-((b>>>0>>0)+e|0)|0;if((b|0)==(k|0)&a>>>0>j>>>0|b>>>0>>0){break Ia}e=e+k|0;b=a+f|0;e=b>>>0>>0?e+1|0:e;H[c+16>>2]=b;H[c+20>>2]=e;if((a|0)<=0){break Ia}b=H[c>>2]+f|0;H[g+48>>2]=b;c=a-1|0;f=c+b|0;e=I[f|0];Ka:{if(e>>>0<=63){H[g+52>>2]=c;a=I[f|0]&63;break Ka}La:{switch((e>>>6|0)-1|0){case 0:if(a>>>0<2){break Ia}a=a-2|0;H[g+52>>2]=a;a=a+b|0;a=I[a+1|0]<<8&16128|I[a|0];break Ka;case 1:if(a>>>0<3){break Ia}a=a-3|0;H[g+52>>2]=a;a=a+b|0;a=I[a+1|0]<<8|I[a+2|0]<<16&4128768|I[a|0];break Ka;default:break La}}a=a-4|0;H[g+52>>2]=a;a=a+b|0;a=(I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24))&1073741823}H[g+56>>2]=a+2097152;d=a>>>0<534773760}ca=i+16|0;if(!d){break Ha}if(!m){o=1;break Ha}b=H[g+52>>2];a=H[g+56>>2];c=H[g+36>>2];d=H[g+48>>2];f=H[g+24>>2];while(1){Ma:{if(a>>>0>2097151){break Ma}while(1){if((b|0)<=0){break Ma}b=b-1|0;H[g+52>>2]=b;a=I[b+d|0]|a<<8;H[g+56>>2]=a;if(a>>>0<2097152){continue}break}}e=a&524287;o=H[f+(e<<2)>>2];k=c+(o<<3)|0;a=(N(H[k>>2],a>>>19|0)+e|0)-H[k+4>>2]|0;H[g+56>>2]=a;H[r+(q<<2)>>2]=o;o=1;q=q+1|0;if((m|0)!=(q|0)){continue}break}}a=H[g+36>>2];if(a){H[g+40>>2]=a;oa(a)}a=H[g+24>>2];if(a){H[g+28>>2]=a;oa(a)}a=H[g+8>>2];if(a){H[g+12>>2]=a;oa(a)}ca=g- -64|0;b=o;break g;case 17:b=Le(a,c,d);break g;case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:b=ca+-64|0;ca=b;H[b+56>>2]=0;H[b+48>>2]=0;H[b+52>>2]=0;H[b+40>>2]=0;H[b+44>>2]=0;H[b+32>>2]=0;H[b+36>>2]=0;H[b+24>>2]=0;H[b+28>>2]=0;H[b+16>>2]=0;H[b+20>>2]=0;H[b+8>>2]=0;H[b+12>>2]=0;Na:{if(!Ne(b+8|0,c)|(H[b+20>>2]?0:a)){break Na}if(!Me(b+8|0,c)){break Na}if(!a){f=1;break Na}e=H[b+52>>2];c=H[b+56>>2];k=H[b+36>>2];i=H[b+48>>2];g=H[b+24>>2];while(1){Oa:{if(c>>>0>16383){break Oa}while(1){if((e|0)<=0){break Oa}e=e-1|0;H[b+52>>2]=e;c=I[e+i|0]|c<<8;H[b+56>>2]=c;if(c>>>0<16384){continue}break}}f=c&4095;m=H[g+(f<<2)>>2];r=k+(m<<3)|0;c=(N(H[r>>2],c>>>12|0)+f|0)-H[r+4>>2]|0;H[b+56>>2]=c;H[(o<<2)+d>>2]=m;f=1;o=o+1|0;if((o|0)!=(a|0)){continue}break}}a=H[b+36>>2];if(a){H[b+40>>2]=a;oa(a)}a=H[b+24>>2];if(a){H[b+28>>2]=a;oa(a)}a=H[b+8>>2];if(a){H[b+12>>2]=a;oa(a)}ca=b- -64|0;b=f;break g;case 13:case 14:case 15:case 16:break h;default:break g}}b=Le(a,c,d)}f=b}return f}function gi(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,L=0,M=0,O=0,P=0,Q=0,R=0;s=ca+-64|0;ca=s;H[a+132>>2]=0;if(H[a+148>>2]){c=H[a+144>>2];if(c){while(1){d=H[c>>2];oa(c);c=d;if(c){continue}break}}c=0;H[a+144>>2]=0;d=H[a+140>>2];a:{if(!d){break a}if(d>>>0>=4){g=d&-4;while(1){e=c<<2;H[e+H[a+136>>2]>>2]=0;H[H[a+136>>2]+(e|4)>>2]=0;H[H[a+136>>2]+(e|8)>>2]=0;H[H[a+136>>2]+(e|12)>>2]=0;c=c+4|0;b=b+4|0;if((g|0)!=(b|0)){continue}break}}b=d&3;if(!b){break a}while(1){H[H[a+136>>2]+(c<<2)>>2]=0;c=c+1|0;u=u+1|0;if((b|0)!=(u|0)){continue}break}}H[a+148>>2]=0}b:{c:{d:{c=H[a+4>>2];u=I[c+36|0];b=u<<8|I[c+37|0];if(b>>>0<=513){i=H[c+32>>2];e:{if(b>>>0<=511){b=H[i+20>>2];e=H[i+16>>2];d=e+4|0;b=d>>>0<4?b+1|0:b;g=b;h=H[i+12>>2];if(K[i+8>>2]>>0&(b|0)>=(h|0)|(b|0)>(h|0)){break d}b=e+H[i>>2]|0;b=I[b|0]|I[b+1|0]<<8|(I[b+2|0]<<16|I[b+3|0]<<24);H[i+16>>2]=d;H[i+20>>2]=g;break e}if(!Ea(1,s,i)){break d}c=H[a+4>>2];u=I[c+36|0];b=H[s>>2]}H[a+132>>2]=b}g=H[c+32>>2];f:{g:{h:{if((u&255)>>>0<=1){u=0;d=H[g+20>>2];e=H[g+16>>2];b=e+4|0;d=b>>>0<4?d+1|0:d;i=H[g+12>>2];if(K[g+8>>2]>>0&(i|0)<=(d|0)|(d|0)>(i|0)){break c}e=e+H[g>>2]|0;e=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);H[s+60>>2]=e;H[g+16>>2]=b;H[g+20>>2]=d;H[a+156>>2]=e;n=a+156|0;break h}u=0;if(!Ea(1,s+60|0,g)){break c}c=H[a+4>>2];b=I[c+36|0];H[a+156>>2]=H[s+60>>2];n=a+156|0;if(b>>>0>1){break g}}g=H[c+32>>2];h=H[g+8>>2];i=H[g+12>>2];c=H[g+20>>2];d=H[g+16>>2];b=d+4|0;c=b>>>0<4?c+1|0:c;e=b;if(b>>>0>h>>>0&(c|0)>=(i|0)|(c|0)>(i|0)){break c}b=d+H[g>>2]|0;b=I[b|0]|I[b+1|0]<<8|(I[b+2|0]<<16|I[b+3|0]<<24);H[s+56>>2]=b;H[g+16>>2]=e;H[g+20>>2]=c;break f}if(!Ea(1,s+56|0,H[c+32>>2])){break c}b=H[s+56>>2]}if(b>>>0>1431655765|K[n>>2]>N(b,3)>>>0){break c}f=H[a+4>>2];g=H[f+32>>2];c=g;e=H[c+8>>2];i=H[c+16>>2];j=H[c+12>>2];d=H[c+20>>2];c=d;if((j|0)<=(c|0)&e>>>0<=i>>>0|(c|0)>(j|0)){break c}n=H[g>>2];o=I[n+i|0];h=i+1|0;c=h?c:c+1|0;H[g+16>>2]=h;H[g+20>>2]=c;i:{if(I[f+36|0]<=1){f=e;c=j;e=i+5|0;d=e>>>0<5?d+1|0:d;if((c|0)<=(d|0)&e>>>0>f>>>0|(c|0)<(d|0)){break c}c=h+n|0;n=I[c|0]|I[c+1|0]<<8|(I[c+2|0]<<16|I[c+3|0]<<24);H[s+52>>2]=n;H[g+16>>2]=e;H[g+20>>2]=d;break i}if(!Ea(1,s+52|0,g)){break c}n=H[s+52>>2]}if(b>>>0>>0|((n>>>0)/3|0)+n>>>0>>0){break c}c=H[a+4>>2];i=H[c+32>>2];j:{if(I[c+36|0]<=1){c=H[i+20>>2];e=H[i+16>>2];d=e+4|0;c=d>>>0<4?c+1|0:c;g=d;f=K[i+8>>2]>>0;d=H[i+12>>2];if(f&(d|0)<=(c|0)|(c|0)>(d|0)){break c}d=e+H[i>>2]|0;d=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[s+48>>2]=d;H[i+16>>2]=g;H[i+20>>2]=c;break j}if(!Ea(1,s+48|0,i)){break c}d=H[s+48>>2]}if(d>>>0>n>>>0){break c}H[a+28>>2]=H[a+24>>2];e=$b(pa(88));c=H[a+8>>2];H[a+8>>2]=e;if(c){cb(c);if(!H[a+8>>2]){break c}}H[a+164>>2]=H[a+160>>2];Jb(a+160|0,b);H[a+176>>2]=H[a+172>>2];Jb(a+172|0,b);H[a- -64>>2]=0;H[a+92>>2]=-1;H[a+84>>2]=-1;H[a+88>>2]=-1;H[a+40>>2]=H[a+36>>2];H[a+52>>2]=H[a+48>>2];H[a+76>>2]=H[a+72>>2];B=a+216|0;ed(B);dd(B,o);if(!Lc(H[a+8>>2],b,H[a+156>>2]+d|0)){break c}c=H[a+156>>2];F[s|0]=1;Oa(a+120|0,c+d|0,s);c=H[a+4>>2];b=J[c+36>>1];b=(b<<8|b>>>8)&65535;k:{if(b>>>0<=513){i=H[c+32>>2];l:{if(b>>>0<=511){b=H[i+20>>2];e=H[i+16>>2];c=e+4|0;b=c>>>0<4?b+1|0:b;g=b;h=H[i+12>>2];if(K[i+8>>2]>>0&(b|0)>=(h|0)|(b|0)>(h|0)){break c}b=e+H[i>>2]|0;b=I[b|0]|I[b+1|0]<<8|(I[b+2|0]<<16|I[b+3|0]<<24);H[i+16>>2]=c;H[i+20>>2]=g;break l}if(!Ea(1,s+44|0,i)){break c}b=H[s+44>>2]}if(!b){break c}c=H[H[a+4>>2]+32>>2];e=H[c+8>>2];g=H[c+16>>2];i=e-g|0;c=H[c+12>>2]-(H[c+20>>2]+(e>>>0>>0)|0)|0;if((c|0)<=0&b>>>0>i>>>0|(c|0)<0){break c}c=Ha(s);e=H[H[a+4>>2]+32>>2];g=H[e+16>>2];i=(g+H[e>>2]|0)+b|0;g=H[e+8>>2]-g|0;G[c+38>>1]=J[e+38>>1];H[c>>2]=i;H[c+16>>2]=0;H[c+20>>2]=0;H[c+8>>2]=g-b;H[c+12>>2]=0;C=Ib(a,c);if((C|0)==-1){break c}M=C>>31;break k}C=-1;M=-1;if((Ib(a,H[c+32>>2])|0)==-1){break c}}e=a+232|0;Ee(e,a);H[a+372>>2]=o;H[a+384>>2]=H[a+156>>2]+d;O=Ha(s);g=O;b=0;j=ca-16|0;ca=j;m:{n:{c=H[e+144>>2];c=J[(ea[H[H[c>>2]+32>>2]](c)|0)+36>>1];if(((c<<8|c>>>8)&65535)>>>0<=513){c=H[e+4>>2];H[e+40>>2]=H[e>>2];H[e+44>>2]=c;c=H[e+36>>2];H[e+72>>2]=H[e+32>>2];H[e+76>>2]=c;d=H[e+28>>2];c=e- -64|0;H[c>>2]=H[e+24>>2];H[c+4>>2]=d;c=H[e+20>>2];H[e+56>>2]=H[e+16>>2];H[e+60>>2]=c;c=H[e+12>>2];H[e+48>>2]=H[e+8>>2];H[e+52>>2]=c;if(!Db(e+40|0,1,j+8|0)){break n}c=H[e+44>>2];H[e>>2]=H[e+40>>2];H[e+4>>2]=c;c=H[e+76>>2];H[e+32>>2]=H[e+72>>2];H[e+36>>2]=c;c=H[e+68>>2];H[e+24>>2]=H[e+64>>2];H[e+28>>2]=c;c=H[e+60>>2];h=c;d=H[e+56>>2];H[e+16>>2]=d;H[e+20>>2]=c;i=H[e+52>>2];f=i;c=H[e+48>>2];H[e+8>>2]=c;H[e+12>>2]=f;o=c-d|0;k=H[j+12>>2];c=f-((c>>>0>>0)+h|0)|0;i=H[j+8>>2];if((k|0)==(c|0)&o>>>0>>0|c>>>0>>0){break n}c=h+k|0;f=d;d=d+i|0;c=f>>>0>d>>>0?c+1|0:c;H[e+16>>2]=d;H[e+20>>2]=c}o:{if(J[e+38>>1]<=513){c=H[e+4>>2];H[e+96>>2]=H[e>>2];H[e+100>>2]=c;c=H[e+36>>2];H[e+128>>2]=H[e+32>>2];H[e+132>>2]=c;c=H[e+28>>2];H[e+120>>2]=H[e+24>>2];H[e+124>>2]=c;c=H[e+20>>2];H[e+112>>2]=H[e+16>>2];H[e+116>>2]=c;c=H[e+12>>2];H[e+104>>2]=H[e+8>>2];H[e+108>>2]=c;if(!Db(e+96|0,1,j+8|0)){break n}c=H[e+100>>2];H[e>>2]=H[e+96>>2];H[e+4>>2]=c;c=H[e+132>>2];H[e+32>>2]=H[e+128>>2];H[e+36>>2]=c;c=H[e+124>>2];H[e+24>>2]=H[e+120>>2];H[e+28>>2]=c;d=H[e+116>>2];h=d;c=H[e+112>>2];H[e+16>>2]=c;H[e+20>>2]=d;i=H[e+108>>2];f=i;d=H[e+104>>2];H[e+8>>2]=d;H[e+12>>2]=f;o=d-c|0;k=H[j+12>>2];d=f-((c>>>0>d>>>0)+h|0)|0;i=H[j+8>>2];if((k|0)==(d|0)&o>>>0>>0|d>>>0>>0){break n}d=h+k|0;f=c;c=c+i|0;d=f>>>0>c>>>0?d+1|0:d;H[e+16>>2]=c;H[e+20>>2]=d;break o}if(!ta(e+80|0,e)){break m}}if(!Fe(e)){break m}c=H[e+4>>2];H[g>>2]=H[e>>2];H[g+4>>2]=c;c=H[e+36>>2];H[g+32>>2]=H[e+32>>2];H[g+36>>2]=c;c=H[e+28>>2];H[g+24>>2]=H[e+24>>2];H[g+28>>2]=c;c=H[e+20>>2];H[g+16>>2]=H[e+16>>2];H[g+20>>2]=c;c=H[e+12>>2];H[g+8>>2]=H[e+8>>2];H[g+12>>2]=c;c=H[e+144>>2];c=J[(ea[H[H[c>>2]+32>>2]](c)|0)+36>>1];p:{if(((c<<8|c>>>8)&65535)>>>0<=513){c=H[e+144>>2];q:{if(I[(ea[H[H[c>>2]+32>>2]](c)|0)+36|0]<=1){c=H[g+20>>2];i=H[g+16>>2];d=i+4|0;c=d>>>0<4?c+1|0:c;h=d;f=K[g+8>>2]>>0;d=H[g+12>>2];if(f&(d|0)<=(c|0)|(c|0)>(d|0)){break m}d=i+H[g>>2]|0;d=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[g+16>>2]=h;H[g+20>>2]=c;break q}if(!Ea(1,j+8|0,g)){break m}d=H[j+8>>2]}c=H[e+152>>2];if(d>>>0>=c>>>0){break m}d=H[g+20>>2];h=H[g+12>>2];i=H[g+16>>2];if((d|0)>=(h|0)&i>>>0>=K[g+8>>2]|(d|0)>(h|0)){break m}h=I[i+H[g>>2]|0];i=i+1|0;d=i?d:d+1|0;H[g+16>>2]=i;H[g+20>>2]=d;if(h){break m}H[e+176>>2]=2;H[e+180>>2]=7;break p}H[e+176>>2]=2;H[e+180>>2]=7;c=H[e+152>>2]}if((c|0)<0){break m}H[j+8>>2]=0;b=2;h=H[e+156>>2];i=H[e+160>>2]-h>>2;r:{if(i>>>0>>0){Pa(e+156|0,c-i|0,j+8|0);b=H[e+176>>2];d=H[e+180>>2];break r}d=7;if(c>>>0>=i>>>0){break r}H[e+160>>2]=h+(c<<2)}i=e+184|0;b=(d-b|0)+1|0;c=H[e+188>>2];h=H[e+184>>2];d=(c-h|0)/12|0;s:{if(b>>>0>d>>>0){o=0;d=b-d|0;f=H[i+8>>2];c=H[i+4>>2];t:{if(d>>>0<=(f-c|0)/12>>>0){if(d){b=c;c=N(d,12)-12|0;c=(c-((c>>>0)%12|0)|0)+12|0;c=ra(b,0,c)+c|0}H[i+4>>2]=c;break t}u:{v:{w:{h=H[i>>2];k=(c-h|0)/12|0;b=k+d|0;if(b>>>0<357913942){f=(f-h|0)/12|0;l=f<<1;f=f>>>0>=178956970?357913941:b>>>0>>0?l:b;if(f){if(f>>>0>=357913942){break w}o=pa(N(f,12))}b=N(k,12)+o|0;d=N(d,12)-12|0;k=(d-((d>>>0)%12|0)|0)+12|0;d=ra(b,0,k);k=d+k|0;f=N(f,12)+o|0;if((c|0)==(h|0)){break v}while(1){b=b-12|0;c=c-12|0;H[b>>2]=H[c>>2];H[b+4>>2]=H[c+4>>2];H[b+8>>2]=H[c+8>>2];H[c+8>>2]=0;H[c>>2]=0;H[c+4>>2]=0;if((c|0)!=(h|0)){continue}break}H[i+8>>2]=f;d=H[i+4>>2];H[i+4>>2]=k;c=H[i>>2];H[i>>2]=b;if((c|0)==(d|0)){break u}while(1){b=d-12|0;h=H[b>>2];if(h){H[d-8>>2]=h;oa(h)}d=b;if((b|0)!=(c|0)){continue}break}break u}break b}wa();v()}H[i+8>>2]=f;H[i+4>>2]=k;H[i>>2]=d}if(c){oa(c)}}d=H[e+188>>2];break s}if(b>>>0>=d>>>0){d=c;break s}d=h+N(b,12)|0;if((d|0)!=(c|0)){while(1){b=c-12|0;h=H[b>>2];if(h){H[c-8>>2]=h;oa(h)}c=b;if((d|0)!=(b|0)){continue}break}}H[e+188>>2]=d}f=e+196|0;b=H[e+184>>2];c=(d-b|0)/12|0;o=H[e+196>>2];h=H[e+200>>2]-o>>2;x:{if(c>>>0>h>>>0){ya(f,c-h|0);b=H[e+184>>2];d=H[e+188>>2];break x}if(c>>>0>=h>>>0){break x}H[e+200>>2]=o+(c<<2)}if((b|0)==(d|0)){b=1;break m}c=0;while(1){if(!Ea(1,j+8|0,g)){break n}b=H[e+148>>2];d=(H[b+4>>2]-H[b>>2]>>2>>>0)/3|0;b=H[j+8>>2];if(d>>>0>>0){break n}if(b){k=N(c,12);h=k+H[i>>2]|0;d=H[h>>2];o=H[h+4>>2]-d>>2;y:{if(o>>>0>>0){ya(h,b-o|0);d=H[k+H[i>>2]>>2];break y}if(b>>>0>=o>>>0){break y}H[h+4>>2]=(b<<2)+d}kd(b,1,g,d);H[H[f>>2]+(c<<2)>>2]=b}b=1;c=c+1|0;if(c>>>0<(H[e+188>>2]-H[e+184>>2]|0)/12>>>0){continue}break}break m}b=0}ca=j+16|0;z:{if(!b){break z}d=0;c=0;g=0;i=0;o=0;l=ca-96|0;ca=l;H[l+72>>2]=0;H[l+64>>2]=0;H[l+68>>2]=0;H[l+48>>2]=0;H[l+52>>2]=0;H[l+40>>2]=0;H[l+44>>2]=0;H[l+56>>2]=1065353216;H[l+32>>2]=0;H[l+24>>2]=0;H[l+28>>2]=0;j=a;L=H[a+124>>2];A:{B:{C:{D:{E:{if((n|0)<=0){break E}r=j+232|0;P=H[j+216>>2]!=H[j+220>>2];D=1;while(1){h=i;i=h+1|0;a=H[r+172>>2];F:{G:{if((a|0)!=-1){b=H[r+196>>2]+(a<<2)|0;f=H[b>>2];a=f-1|0;H[b>>2]=a;b=9;if((f|0)<=0){break F}a=H[H[H[r+184>>2]+N(H[r+172>>2],12)>>2]+(a<<2)>>2];if(a>>>0>4){break F}b=H[(a<<2)+12144>>2];break G}b=7;a=H[r+144>>2];a=J[(ea[H[H[a>>2]+32>>2]](a)|0)+36>>1];if(((a<<8|a>>>8)&65535)>>>0>513|!I[r+76|0]){break G}b=0;m=H[r- -64>>2];k=H[r+72>>2];a=m+(k>>>3|0)|0;p=H[r+68>>2];if(a>>>0>=p>>>0){break G}f=I[a|0];a=k+1|0;H[r+72>>2]=a;f=f>>>(k&7)&1;if(!f){break G}q=a>>>3|0;b=m+q|0;H:{if(b>>>0>=p>>>0){b=a;a=0;break H}t=I[b|0];b=k+2|0;H[r+72>>2]=b;q=b>>>3|0;a=t>>>(a&7)&1}k=m+q|0;if(k>>>0

>>0){k=I[k|0];H[r+72>>2]=b+1;b=k>>>(b&7)<<1&2}else{b=0}b=(a|b)<<1|f}H[r+168>>2]=b}a=b;I:{J:{if(!a){if((c|0)==(g|0)){b=-1;break D}d=-1;m=H[j+8>>2];t=H[m+24>>2];D=c-4|0;f=H[D>>2];a=-1;K:{if((f|0)==-1){break K}k=f+1|0;k=(k>>>0)%3|0?k:f-2|0;a=-1;if((k|0)==-1){break K}a=H[H[m>>2]+(k<<2)>>2]}b=H[t+(a<<2)>>2];if((b|0)!=-1){d=b+1|0;d=(d>>>0)%3|0?d:b-2|0}if((d|0)==(f|0)){b=-1;break D}if((f|0)!=-1){b=-1;if(H[H[m+12>>2]+(f<<2)>>2]!=-1){break D}}k=H[m+12>>2];if((d|0)!=-1){b=-1;if(H[k+(d<<2)>>2]!=-1){break D}}p=N(h,3);b=p+1|0;H[k+(f<<2)>>2]=b;w=b<<2;H[w+k>>2]=f;q=p+2|0;H[k+(d<<2)>>2]=q;y=q<<2;H[y+k>>2]=d;k=-1;h=-1;L:{if((f|0)==-1){break L}M:{if((f>>>0)%3|0){b=f-1|0;break M}b=f+2|0;h=-1;if((b|0)==-1){break L}}h=H[H[m>>2]+(b<<2)>>2]}N:{if((d|0)==-1){break N}b=d+1|0;b=(b>>>0)%3|0?b:d-2|0;if((b|0)==-1){break N}k=H[H[m>>2]+(b<<2)>>2]}b=-1;if((a|0)==(h|0)|(a|0)==(k|0)){break D}b=H[m>>2];H[b+(p<<2)>>2]=a;H[b+w>>2]=k;H[b+y>>2]=h;if((h|0)!=-1){H[t+(h<<2)>>2]=q}b=H[j+120>>2]+(a>>>3&536870908)|0;d=H[b>>2];Q=b,R=Vj(a)&d,H[Q>>2]=R;H[D>>2]=p;k=H[c-4>>2];break J}b=-1;O:{P:{Q:{R:{S:{T:{U:{V:{W:{switch(a-1|0){case 2:case 4:if((c|0)==(g|0)){break D}t=c-4|0;d=H[t>>2];f=H[j+8>>2];m=H[f+12>>2];if((d|0)!=-1&H[m+(d<<2)>>2]!=-1){break D}k=N(h,3);p=(a|0)==5;q=k+(p?2:1)|0;w=q<<2;H[w+m>>2]=d;H[m+(d<<2)>>2]=q;Ka(f+24|0,11424);a=H[j+8>>2];m=H[a+24>>2];if(H[a+28>>2]-m>>2>(L|0)){break D}a=H[a>>2];y=a+w|0;b=H[f+28>>2];f=H[f+24>>2];w=(b-f>>2)-1|0;H[y>>2]=w;if((b|0)!=(f|0)){H[m+(w<<2)>>2]=q}b=p?k:k+2|0;q=a+(k+p<<2)|0;X:{if((d|0)==-1){H[a+(b<<2)>>2]=-1;b=-1;break X}Y:{Z:{_:{if((d>>>0)%3|0){f=d-1|0;break _}f=d+2|0;if((f|0)==-1){break Z}}f=H[a+(f<<2)>>2];H[a+(b<<2)>>2]=f;if((f|0)==-1){break Y}H[m+(f<<2)>>2]=b;break Y}H[a+(b<<2)>>2]=-1}f=d+1|0;d=(f>>>0)%3|0?f:d-2|0;b=-1;if((d|0)==-1){break X}b=H[a+(d<<2)>>2]}H[q>>2]=b;H[t>>2]=k;break V;case 0:if((c|0)==(d|0)){break D}a=c-4|0;m=H[a>>2];H[l+68>>2]=a;p=H[l+44>>2];$:{if(!p){c=a;break $}f=H[l+40>>2];q=Uj(p)>>>0>1;b=h&p+2147483647;aa:{if(!q){break aa}b=h;if(b>>>0

>>0){break aa}b=(h>>>0)%(p>>>0)|0}k=b;b=H[f+(k<<2)>>2];if(!b){c=a;break $}b=H[b>>2];if(!b){c=a;break $}ba:{if(!q){f=p-1|0;while(1){p=H[b+4>>2];ca:{if((p|0)!=(h|0)){if((k|0)==(f&p)){break ca}c=a;break $}if((h|0)==H[b+8>>2]){break ba}}b=H[b>>2];if(b){continue}break}c=a;break $}while(1){f=H[b+4>>2];da:{if((f|0)!=(h|0)){if(f>>>0>=p>>>0){f=(f>>>0)%(p>>>0)|0}if((f|0)==(k|0)){break da}c=a;break $}if((h|0)==H[b+8>>2]){break ba}}b=H[b>>2];if(b){continue}break}c=a;break $}if((a|0)!=(x|0)){H[a>>2]=H[b+12>>2];H[l+68>>2]=c;break $}a=x-d|0;g=a>>2;c=g+1|0;if(c>>>0>=1073741824){break b}f=a>>>1|0;f=a>>>0>=2147483644?1073741823:c>>>0>>0?f:c;if(f){if(f>>>0>=1073741824){break B}a=pa(f<<2)}else{a=0}g=a+(g<<2)|0;H[g>>2]=H[b+12>>2];c=g+4|0;if((d|0)!=(x|0)){while(1){g=g-4|0;x=x-4|0;H[g>>2]=H[x>>2];if((d|0)!=(x|0)){continue}break}}x=a+(f<<2)|0;H[l+72>>2]=x;H[l+68>>2]=c;H[l+64>>2]=g;if(d){oa(d)}}if((c|0)==(g|0)){break P}w=c-4|0;a=H[w>>2];if((a|0)==(m|0)){break P}b=(a|0)==-1;p=H[j+8>>2];if(!b&H[H[p+12>>2]+(a<<2)>>2]!=-1){break P}q=H[p+12>>2];if((m|0)!=-1&H[q+(m<<2)>>2]!=-1){break P}k=N(h,3);t=k+2|0;H[q+(a<<2)>>2]=t;h=t<<2;H[h+q>>2]=a;d=k+1|0;H[q+(m<<2)>>2]=d;y=d<<2;H[y+q>>2]=m;if(b){break T}if((a>>>0)%3|0){f=a-1|0;break S}f=a+2|0;if((f|0)!=-1){break S}d=H[p>>2];f=-1;break R;case 6:break W;default:break D}}k=H[j+8>>2];Ka(k+24|0,11424);f=H[j+8>>2];a=N(h,3);m=H[k+28>>2];p=H[k+24>>2];q=m-p|0;k=q>>2;t=k-1|0;H[H[f>>2]+(a<<2)>>2]=t;Ka(f+24|0,11424);w=a+1|0;H[H[f>>2]+(w<<2)>>2]=(H[f+28>>2]-H[f+24>>2]>>2)-1;f=H[j+8>>2];Ka(f+24|0,11424);y=a+2|0;H[H[f>>2]+(y<<2)>>2]=(H[f+28>>2]-H[f+24>>2]>>2)-1;E=H[j+8>>2];f=H[E+24>>2];if(H[E+28>>2]-f>>2>(L|0)){break D}ea:{fa:{if((m|0)!=(p|0)){H[f+(t<<2)>>2]=a;b=0;if((q|0)==-4){break fa}}H[f+(k<<2)>>2]=w;b=k+1|0;if((b|0)==-1){break ea}}H[f+(b<<2)>>2]=y}if((c|0)!=(x|0)){H[c>>2]=a;c=c+4|0;H[l+68>>2]=c;break U}b=c-d|0;k=b>>2;g=k+1|0;if(g>>>0>=1073741824){break b}f=b>>>1|0;b=b>>>0>=2147483644?1073741823:g>>>0>>0?f:g;if(b){if(b>>>0>=1073741824){break B}f=pa(b<<2)}else{f=0}g=f+(k<<2)|0;H[g>>2]=a;x=f+(b<<2)|0;a=g+4|0;if((c|0)!=(d|0)){while(1){g=g-4|0;c=c-4|0;H[g>>2]=H[c>>2];if((c|0)!=(d|0)){continue}break}}H[l+72>>2]=x;H[l+68>>2]=a;H[l+64>>2]=g;if(d){oa(d)}c=a}d=g}Ce(r,H[c-4>>2]);a=H[j+40>>2];if((a|0)==H[j+36>>2]){break I}b=a-12|0;f=H[b+4>>2];h=(h^-1)+n|0;if(f>>>0>h>>>0){break P}if((f|0)!=(h|0)){break I}k=I[a-4|0];f=H[b>>2];H[j+40>>2]=b;if((f|0)<0){break P}m=c-4|0;a=H[m>>2];H[l+20>>2]=(f^-1)+n;b=l+20|0;H[l+88>>2]=b;Gb(l,l+40|0,b,l+88|0);f=H[l>>2];ga:{if(k&1){b=-1;if((a|0)==-1){break ga}b=a+1|0;b=(b>>>0)%3|0?b:a-2|0;break ga}b=-1;if((a|0)==-1){break ga}b=a-1|0;if((a>>>0)%3|0){break ga}b=a+2|0}H[f+12>>2]=b;b=H[j+40>>2];if((b|0)==H[j+36>>2]){break I}while(1){a=b-12|0;f=H[a+4>>2];if(f>>>0>h>>>0){break P}if((f|0)!=(h|0)){break I}f=I[b-4|0];b=H[a>>2];H[j+40>>2]=a;if((b|0)<0){break P}a=H[m>>2];H[l+20>>2]=(b^-1)+n;b=l+20|0;H[l+88>>2]=b;Gb(l,l+40|0,b,l+88|0);k=H[l>>2];ha:{if(f&1){b=-1;if((a|0)==-1){break ha}b=a+1|0;b=(b>>>0)%3|0?b:a-2|0;break ha}b=-1;if((a|0)==-1){break ha}b=a-1|0;if((a>>>0)%3|0){break ha}b=a+2|0}H[k+12>>2]=b;b=H[j+40>>2];if((b|0)!=H[j+36>>2]){continue}break}break I}f=-1;d=H[p>>2];H[d+(k<<2)>>2]=-1;b=-1;break Q}d=H[p>>2];f=H[d+(f<<2)>>2]}H[(k<<2)+d>>2]=f;E=a+1|0;a=(E>>>0)%3|0?E:a-2|0;b=-1;if((a|0)==-1){break Q}b=H[(a<<2)+d>>2]}H[d+y>>2]=b;ia:{if((m|0)==-1){H[d+h>>2]=-1;t=-1;a=-1;break ia}ja:{ka:{la:{if((m>>>0)%3|0){b=m-1|0;break la}b=m+2|0;if((b|0)==-1){break ka}}a=H[(b<<2)+d>>2];H[d+h>>2]=a;if((a|0)==-1){break ja}H[H[p+24>>2]+(a<<2)>>2]=t;break ja}H[d+h>>2]=-1}t=-1;b=m+1|0;b=(b>>>0)%3|0?b:m-2|0;a=-1;if((b|0)==-1){break ia}t=H[(b<<2)+d>>2];a=b}b=H[j+388>>2];h=f<<2;m=b+h|0;y=b;b=t<<2;H[m>>2]=H[m>>2]+H[y+b>>2];m=b;b=H[p+24>>2];m=m+b|0;if((f|0)!=-1){H[b+h>>2]=H[m>>2]}b=a;while(1){if((b|0)==-1){break O}H[(b<<2)+d>>2]=f;p=b+1|0;b=(p>>>0)%3|0?p:b-2|0;h=-1;ma:{if((b|0)==-1){break ma}b=H[q+(b<<2)>>2];h=-1;if((b|0)==-1){break ma}h=b+1|0;h=(h>>>0)%3|0?h:b-2|0}b=h;if((a|0)!=(b|0)){continue}break}}b=-1;if(!D){break E}break D}H[m>>2]=-1;na:{if(P){break na}if((z|0)!=(A|0)){H[A>>2]=t;A=A+4|0;H[l+28>>2]=A;break na}a=z-o|0;h=a>>2;b=h+1|0;if(b>>>0>=1073741824){break b}d=a>>>1|0;d=a>>>0>=2147483644?1073741823:b>>>0>>0?d:b;if(d){if(d>>>0>=1073741824){break B}a=pa(d<<2)}else{a=0}b=a+(h<<2)|0;H[b>>2]=t;A=b+4|0;if((o|0)!=(z|0)){while(1){b=b-4|0;z=z-4|0;H[b>>2]=H[z>>2];if((o|0)!=(z|0)){continue}break}}z=a+(d<<2)|0;H[l+32>>2]=z;H[l+28>>2]=A;H[l+24>>2]=b;if(o){oa(o)}o=b}H[w>>2]=k}Ce(r,k);d=g}D=(i|0)<(n|0);if((i|0)!=(n|0)){continue}break}i=n}b=-1;d=H[j+8>>2];if(H[d+28>>2]-H[d+24>>2]>>2>(L|0)){break D}if((c|0)!=(g|0)){x=j+72|0;h=j+60|0;p=j+312|0;while(1){c=c-4|0;o=H[c>>2];H[l+68>>2]=c;oa:{pa:{qa:{if(J[j+270>>1]<=513){if(!I[j+364|0]){break pa}a=H[j+360>>2];b=H[j+352>>2]+(a>>>3|0)|0;if(b>>>0>=K[j+356>>2]){break qa}b=I[b|0];H[j+360>>2]=a+1;if(!(b>>>(a&7)&1)){break qa}break pa}if(Ba(p)){break pa}}b=H[j+64>>2];a=H[j+68>>2];if((b|0)==a<<5){if((b+1|0)<0){break b}if(b>>>0<=1073741822){a=a<<6;b=(b&-32)+32|0;a=a>>>0>b>>>0?a:b}else{a=2147483647}pb(h,a);b=H[j+64>>2]}H[j+64>>2]=b+1;a=H[j+60>>2]+(b>>>3&536870908)|0;d=H[a>>2];Q=a,R=Vj(b)&d,H[Q>>2]=R;b=H[j+76>>2];if((b|0)!=H[j+80>>2]){H[b>>2]=o;H[j+76>>2]=b+4;break oa}d=H[x>>2];a=b-d|0;k=a>>2;f=k+1|0;if(f>>>0<1073741824){n=a>>>1|0;n=a>>>0>=2147483644?1073741823:f>>>0>>0?n:f;if(n){if(n>>>0>=1073741824){break B}a=pa(n<<2)}else{a=0}f=a+(k<<2)|0;H[f>>2]=o;o=f+4|0;if((b|0)!=(d|0)){while(1){f=f-4|0;b=b-4|0;H[f>>2]=H[b>>2];if((b|0)!=(d|0)){continue}break}}H[j+80>>2]=a+(n<<2);H[j+76>>2]=o;H[j+72>>2]=f;if(!d){break oa}oa(d);break oa}break b}m=H[j+8>>2];r=H[m>>2];if(((H[m+4>>2]-r>>2>>>0)/3|0)<=(i|0)){b=-1;break D}d=-1;q=H[m+24>>2];n=-1;ra:{if((o|0)==-1){break ra}g=o+1|0;g=(g>>>0)%3|0?g:o-2|0;n=-1;if((g|0)==-1){break ra}n=H[r+(g<<2)>>2]}a=H[q+(n<<2)>>2];sa:{if((a|0)==-1){k=1;f=-1;break sa}k=1;f=-1;b=a+1|0;a=(b>>>0)%3|0?b:a-2|0;if((a|0)==-1){break sa}k=0;d=a;b=a+1|0;b=(b>>>0)%3|0?b:a-2|0;if((b|0)!=-1){f=H[r+(b<<2)>>2]}}b=-1;g=-1;a=H[q+(f<<2)>>2];if((a|0)!=-1){g=a+1|0;g=(g>>>0)%3|0?g:a-2|0}if((d|0)==(o|0)|(g|0)==(o|0)|((o|0)!=-1&H[H[m+12>>2]+(o<<2)>>2]!=-1|(d|0)==(g|0))){break D}if(!k&H[H[m+12>>2]+(d<<2)>>2]!=-1){break D}k=-1;a=H[m+12>>2];m=-1;ta:{if((g|0)==-1){break ta}if(H[a+(g<<2)>>2]!=-1){break D}b=g+1|0;b=(b>>>0)%3|0?b:g-2|0;m=-1;if((b|0)==-1){break ta}m=H[r+(b<<2)>>2]}b=N(i,3);H[l>>2]=b;H[a+(b<<2)>>2]=o;H[a+(o<<2)>>2]=b;b=H[l>>2]+1|0;H[a+(b<<2)>>2]=d;H[a+(d<<2)>>2]=b;b=H[l>>2]+2|0;H[a+(b<<2)>>2]=g;H[a+(g<<2)>>2]=b;a=H[l>>2];H[r+(a<<2)>>2]=f;b=a+1|0;d=r+(b<<2)|0;H[d>>2]=m;g=a+2|0;o=r+(g<<2)|0;H[o>>2]=n;a=H[j+120>>2];f=b?f:-1;n=a+(f>>>3&536870908)|0;r=H[n>>2];Q=n,R=Vj(f)&r,H[Q>>2]=R;k=(b|0)!=-1?H[d>>2]:k;b=a+(k>>>3&536870908)|0;d=H[b>>2];Q=b,R=Vj(k)&d,H[Q>>2]=R;b=-1;b=(g|0)!=-1?H[o>>2]:b;a=a+(b>>>3&536870908)|0;d=H[a>>2];Q=a,R=Vj(b)&d,H[Q>>2]=R;F[l+88|0]=1;_c(h,l+88|0);Ka(x,l);i=i+1|0;g=H[l+64>>2]}if((c|0)!=(g|0)){continue}break}d=H[j+8>>2]}b=-1;if(((H[d+4>>2]-H[d>>2]>>2>>>0)/3|0)!=(i|0)){break D}b=H[d+28>>2]-H[d+24>>2]>>2;i=H[l+24>>2];f=H[l+28>>2];if((i|0)==(f|0)){break C}while(1){a=H[i>>2];h=H[d+24>>2];c=b-1|0;g=h+(c<<2)|0;if(H[g>>2]==-1){while(1){c=b-2|0;b=b-1|0;g=h+(c<<2)|0;if(H[g>>2]==-1){continue}break}}if(a>>>0<=c>>>0){H[l>>2]=d;g=H[g>>2];F[l+12|0]=1;H[l+8>>2]=g;H[l+4>>2]=g;if((g|0)!=-1){while(1){d=H[H[j+8>>2]>>2]+(g<<2)|0;if(H[d>>2]!=(c|0)){b=-1;break D}H[d>>2]=a;uc(l);g=H[l+8>>2];if((g|0)!=-1){continue}break}d=H[j+8>>2]}h=H[d+24>>2];g=h+(c<<2)|0;if((a|0)!=-1){H[h+(a<<2)>>2]=H[g>>2]}H[g>>2]=-1;g=1<>2];a=h+(a>>>3&536870908)|0;h=h+(c>>>3&536870908)|0;c=1<>2]&c){g=g|H[a>>2]}else{g=H[a>>2]&(g^-1)}H[a>>2]=g;H[h>>2]=H[h>>2]&(c^-1);b=b-1|0}i=i+4|0;if((f|0)!=(i|0)){continue}break}}i=H[l+24>>2]}if(i){oa(i)}a=H[l+48>>2];if(a){while(1){c=H[a>>2];oa(a);a=c;if(a){continue}break}}a=H[l+40>>2];H[l+40>>2]=0;if(a){oa(a)}a=H[l+64>>2];if(a){H[l+68>>2]=a;oa(a)}ca=l+96|0;break A}wa();v()}if((b|0)==-1){break z}a=O;c=H[a+16>>2];d=c+H[a>>2]|0;c=H[a+8>>2]-c|0;a=H[H[j+4>>2]+32>>2];G[a+38>>1]=J[a+38>>1];H[a>>2]=d;H[a+16>>2]=0;H[a+20>>2]=0;H[a+8>>2]=c;H[a+12>>2]=0;a=H[j+4>>2];c=J[a+36>>1];g=c<<8|c>>>8;if((g&65535)>>>0<=513){a=H[a+32>>2];c=H[a+16>>2];d=M+H[a+20>>2]|0;c=c+C|0;d=c>>>0>>0?d+1|0:d;H[a+16>>2]=c;H[a+20>>2]=d}ua:{if(H[j+216>>2]==H[j+220>>2]){break ua}c=H[j+8>>2];a=H[c>>2];c=H[c+4>>2];va:{if((g&65535)>>>0>=513){if((a|0)==(c|0)){break ua}c=0;break va}if((a|0)==(c|0)){break ua}c=0;while(1){if(cd(j,c)){c=c+3|0;a=H[j+8>>2];if(c>>>0>2]-H[a>>2]>>2>>>0){continue}break ua}break}break z}while(1){if(bd(j,c)){c=c+3|0;a=H[j+8>>2];if(c>>>0>2]-H[a>>2]>>2>>>0){continue}break ua}break}break z}ad(e);c=H[j+216>>2];if((c|0)!=H[j+220>>2]){n=0;while(1){d=N(n,144);Jc((d+c|0)+4|0,H[j+8>>2]);a=H[B>>2];e=a+d|0;c=H[e+132>>2];e=H[e+136>>2];if((c|0)!=(e|0)){while(1){Hc((d+H[B>>2]|0)+4|0,H[c>>2]);c=c+4|0;if((e|0)!=(c|0)){continue}break}a=H[B>>2]}if(!Ic((a+d|0)+4|0)){break z}n=n+1|0;c=H[j+216>>2];if(n>>>0<(H[j+220>>2]-c|0)/144>>>0){continue}break}}a=H[j+8>>2];Hb(j+184|0,H[a+28>>2]-H[a+24>>2]>>2);u=H[j+216>>2];if((u|0)!=H[j+220>>2]){c=0;while(1){a=N(c,144)+u|0;d=H[a+60>>2]-H[a+56>>2]>>2;f=a+104|0;a=H[j+8>>2];a=H[a+28>>2]-H[a+24>>2]>>2;Hb(f,(a|0)<(d|0)?d:a);c=c+1|0;u=H[j+216>>2];if(c>>>0<(H[j+220>>2]-u|0)/144>>>0){continue}break}}u=$c(j,b)}break c}u=0}ca=s- -64|0;return u|0}sa();v()}function ii(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,L=0,M=0,O=0,P=0,Q=0,R=0,S=0;u=ca+-64|0;ca=u;H[a+132>>2]=0;if(H[a+148>>2]){c=H[a+144>>2];if(c){while(1){b=H[c>>2];oa(c);c=b;if(b){continue}break}}c=0;H[a+144>>2]=0;l=H[a+140>>2];a:{if(!l){break a}if(l>>>0>=4){b=l&-4;while(1){e=c<<2;H[e+H[a+136>>2]>>2]=0;H[H[a+136>>2]+(e|4)>>2]=0;H[H[a+136>>2]+(e|8)>>2]=0;H[H[a+136>>2]+(e|12)>>2]=0;c=c+4|0;f=f+4|0;if((b|0)!=(f|0)){continue}break}}b=l&3;if(!b){break a}while(1){H[H[a+136>>2]+(c<<2)>>2]=0;c=c+1|0;w=w+1|0;if((b|0)!=(w|0)){continue}break}}H[a+148>>2]=0}b:{c:{c=H[a+4>>2];w=I[c+36|0];b=w<<8|I[c+37|0];if(b>>>0<=513){g=H[c+32>>2];d:{if(b>>>0<=511){f=H[g+20>>2];l=H[g+16>>2];e=l+4|0;f=e>>>0<4?f+1|0:f;b=f;d=H[g+12>>2];if(K[g+8>>2]>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break c}f=l+H[g>>2]|0;f=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);H[g+16>>2]=e;H[g+20>>2]=b;break d}if(!Ea(1,u,g)){break c}c=H[a+4>>2];w=I[c+36|0];f=H[u>>2]}H[a+132>>2]=f}d=H[c+32>>2];e:{f:{g:{if((w&255)>>>0<=1){w=0;b=H[d+20>>2];e=H[d+16>>2];f=e+4|0;b=f>>>0<4?b+1|0:b;l=H[d+12>>2];if(K[d+8>>2]>>0&(l|0)<=(b|0)|(b|0)>(l|0)){break b}e=e+H[d>>2]|0;e=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);H[u+60>>2]=e;H[d+16>>2]=f;H[d+20>>2]=b;H[a+156>>2]=e;t=a+156|0;break g}w=0;if(!Ea(1,u+60|0,d)){break b}c=H[a+4>>2];b=I[c+36|0];H[a+156>>2]=H[u+60>>2];t=a+156|0;if(b>>>0>1){break f}}d=H[c+32>>2];e=H[d+8>>2];l=H[d+12>>2];c=H[d+20>>2];f=H[d+16>>2];b=f+4|0;c=b>>>0<4?c+1|0:c;if(b>>>0>e>>>0&(c|0)>=(l|0)|(c|0)>(l|0)){break b}f=f+H[d>>2]|0;f=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);H[u+56>>2]=f;H[d+16>>2]=b;H[d+20>>2]=c;break e}if(!Ea(1,u+56|0,H[c+32>>2])){break b}f=H[u+56>>2]}if(f>>>0>1431655765|K[t>>2]>N(f,3)>>>0){break b}E=H[a+4>>2];x=H[E+32>>2];c=H[x+8>>2];d=H[x+12>>2];b=H[x+20>>2];h=H[x+16>>2];if((d|0)<=(b|0)&h>>>0>=c>>>0|(b|0)>(d|0)){break b}j=H[x>>2];k=I[j+h|0];e=x;l=h+1|0;g=l?b:b+1|0;H[e+16>>2]=l;H[e+20>>2]=g;h:{if(I[E+36|0]<=1){e=c;c=h+5|0;b=c>>>0<5?b+1|0:b;if(c>>>0>e>>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break b}e=j+l|0;t=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);H[u+52>>2]=t;H[x+16>>2]=c;H[x+20>>2]=b;break h}if(!Ea(1,u+52|0,x)){break b}t=H[u+52>>2]}if(f>>>0>>0|((t>>>0)/3|0)+t>>>0>>0){break b}c=H[a+4>>2];d=H[c+32>>2];i:{if(I[c+36|0]<=1){c=H[d+20>>2];b=H[d+16>>2];e=b+4|0;c=e>>>0<4?c+1|0:c;l=H[d+12>>2];if(K[d+8>>2]>>0&(l|0)<=(c|0)|(c|0)>(l|0)){break b}b=b+H[d>>2]|0;b=I[b|0]|I[b+1|0]<<8|(I[b+2|0]<<16|I[b+3|0]<<24);H[u+48>>2]=b;H[d+16>>2]=e;H[d+20>>2]=c;break i}if(!Ea(1,u+48|0,d)){break b}b=H[u+48>>2]}if(b>>>0>t>>>0){break b}H[a+28>>2]=H[a+24>>2];c=$b(pa(88));e=H[a+8>>2];H[a+8>>2]=c;if(e){cb(e);if(!H[a+8>>2]){break b}}H[a+164>>2]=H[a+160>>2];Jb(a+160|0,f);H[a+176>>2]=H[a+172>>2];Jb(a+172|0,f);H[a- -64>>2]=0;H[a+92>>2]=-1;H[a+84>>2]=-1;H[a+88>>2]=-1;H[a+40>>2]=H[a+36>>2];H[a+52>>2]=H[a+48>>2];H[a+76>>2]=H[a+72>>2];M=a+216|0;ed(M);dd(M,k);if(!Lc(H[a+8>>2],f,H[a+156>>2]+b|0)){break b}c=H[a+156>>2];F[u|0]=1;Oa(a+120|0,b+c|0,u);f=H[a+4>>2];c=J[f+36>>1];c=(c<<8|c>>>8)&65535;j:{if(c>>>0<=513){g=H[f+32>>2];k:{if(c>>>0<=511){f=H[g+20>>2];l=H[g+16>>2];e=l+4|0;f=e>>>0<4?f+1|0:f;c=f;d=H[g+12>>2];if(K[g+8>>2]>>0&(c|0)>=(d|0)|(c|0)>(d|0)){break b}f=l+H[g>>2]|0;f=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);H[g+16>>2]=e;H[g+20>>2]=c;break k}if(!Ea(1,u+44|0,g)){break b}f=H[u+44>>2]}if(!f){break b}d=H[H[a+4>>2]+32>>2];l=H[d+8>>2];c=H[d+16>>2];e=l-c|0;c=H[d+12>>2]-(H[d+20>>2]+(c>>>0>l>>>0)|0)|0;if((c|0)<=0&f>>>0>e>>>0|(c|0)<0){break b}g=Ha(u);d=H[H[a+4>>2]+32>>2];l=H[d+16>>2];e=(l+H[d>>2]|0)+f|0;c=H[d+8>>2]-l|0;G[g+38>>1]=J[d+38>>1];H[g>>2]=e;H[g+16>>2]=0;H[g+20>>2]=0;H[g+8>>2]=c-f;H[g+12>>2]=0;c=Ib(a,g);if((c|0)==-1){break b}E=c;P=c>>31;break j}E=-1;P=-1;if((Ib(a,H[f+32>>2])|0)==-1){break b}}B=a+232|0;Ee(B,a);H[a+372>>2]=k;H[a+384>>2]=H[a+156>>2]+b;x=Ha(u);g=x;d=0;l=ca-16|0;ca=l;l:{if(!Ge(B,g)){break l}b=H[g+20>>2];f=H[g+16>>2];c=f+4|0;b=c>>>0<4?b+1|0:b;e=H[g+12>>2];if(K[g+8>>2]>>0&(e|0)<=(b|0)|(b|0)>(e|0)){break l}f=f+H[g>>2]|0;f=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);H[g+16>>2]=c;H[g+20>>2]=b;if((f|0)<0){break l}b=f;f=H[B+152>>2];if((b|0)>=(f|0)){break l}H[l+12>>2]=0;c=H[B+156>>2];b=H[B+160>>2]-c>>2;m:{if(b>>>0>>0){Pa(B+156|0,f-b|0,l+12|0);break m}if(b>>>0<=f>>>0){break m}H[B+160>>2]=c+(f<<2)}d=ta(B+168|0,g)}ca=l+16|0;n:{if(!d){break n}d=0;c=0;f=0;l=0;i=ca-96|0;ca=i;H[i+72>>2]=0;H[i+64>>2]=0;H[i+68>>2]=0;H[i+48>>2]=0;H[i+52>>2]=0;H[i+40>>2]=0;H[i+44>>2]=0;H[i+56>>2]=1065353216;H[i+32>>2]=0;H[i+24>>2]=0;H[i+28>>2]=0;g=a;O=H[a+124>>2];o:{p:{q:{r:{s:{t:{if((t|0)<=0){break t}z=g+400|0;Q=g+232|0;C=H[g+216>>2]!=H[g+220>>2];y=1;while(1){e=l;l=e+1|0;u:{v:{w:{x:{y:{if(H[g+420>>2]!=-1){if(Ba(z)){break y}}if(!I[g+308|0]){break x}z:{o=H[g+296>>2];r=H[g+304>>2];a=o+(r>>>3|0)|0;k=H[g+300>>2];if(a>>>0>=k>>>0){break z}b=I[a|0];a=r+1|0;H[g+304>>2]=a;h=b>>>(r&7)&1;if(!h){break z}n=a>>>3|0;b=o+n|0;A:{if(b>>>0>=k>>>0){b=a;a=0;break A}j=I[b|0];b=r+2|0;H[g+304>>2]=b;n=b>>>3|0;a=j>>>(a&7)&1}j=n+o|0;if(j>>>0>>0){j=I[j|0];H[g+304>>2]=b+1;b=j>>>(b&7)<<1&2}else{b=0}p=(a|b)<<1|h;H[g+416>>2]=p;break w}H[g+416>>2]=0;break x}p=H[g+420>>2];H[g+416>>2]=p;if(p){break w}}if((c|0)==(f|0)){b=-1;break s}p=-1;n=H[g+8>>2];o=H[n+24>>2];j=c-4|0;m=H[j>>2];d=-1;B:{if((m|0)==-1){break B}b=m+1|0;b=(b>>>0)%3|0?b:m-2|0;d=-1;if((b|0)==-1){break B}d=H[H[n>>2]+(b<<2)>>2]}b=H[o+(d<<2)>>2];if((b|0)!=-1){a=b+1|0;p=(a>>>0)%3|0?a:b-2|0}if((m|0)==(p|0)){b=-1;break s}if((m|0)!=-1){b=-1;if(H[H[n+12>>2]+(m<<2)>>2]!=-1){break s}}k=H[n+12>>2];if((p|0)!=-1){b=-1;if(H[k+(p<<2)>>2]!=-1){break s}}q=N(e,3);a=q+1|0;H[k+(m<<2)>>2]=a;h=a<<2;H[h+k>>2]=m;r=q+2|0;H[k+(p<<2)>>2]=r;e=r<<2;H[e+k>>2]=p;k=-1;a=-1;C:{if((m|0)==-1){break C}D:{if((m>>>0)%3|0){b=m-1|0;break D}b=m+2|0;a=-1;if((b|0)==-1){break C}}a=H[H[n>>2]+(b<<2)>>2]}E:{if((p|0)==-1){break E}b=p+1|0;b=(b>>>0)%3|0?b:p-2|0;if((b|0)==-1){break E}k=H[H[n>>2]+(b<<2)>>2]}b=-1;if((a|0)==(d|0)|(d|0)==(k|0)){break s}b=H[n>>2];H[b+(q<<2)>>2]=d;H[b+h>>2]=k;H[b+e>>2]=a;if((a|0)!=-1){H[o+(a<<2)>>2]=r}b=H[g+120>>2]+(d>>>3&536870908)|0;a=H[b>>2];R=b,S=Vj(d)&a,H[R>>2]=S;H[j>>2]=q;p=H[c-4>>2];break v}b=-1;F:{G:{H:{I:{J:{K:{L:{M:{N:{O:{P:{switch(p-1|0){case 2:case 4:if((c|0)==(f|0)){break s}h=c-4|0;m=H[h>>2];r=H[g+8>>2];d=H[r+12>>2];if((m|0)!=-1&H[d+(m<<2)>>2]!=-1){break s}q=N(e,3);k=(p|0)==5;j=q+(k?2:1)|0;a=j<<2;H[a+d>>2]=m;H[d+(m<<2)>>2]=j;Ka(r+24|0,11424);d=H[g+8>>2];o=H[d+24>>2];if(H[d+28>>2]-o>>2>(O|0)){break s}n=H[d>>2];p=n+a|0;d=H[r+28>>2];b=H[r+24>>2];a=(d-b>>2)-1|0;H[p>>2]=a;if((b|0)!=(d|0)){H[o+(a<<2)>>2]=j}d=k?q:q+2|0;j=n+(k+q<<2)|0;Q:{if((m|0)==-1){H[n+(d<<2)>>2]=-1;b=-1;break Q}R:{S:{T:{if((m>>>0)%3|0){a=m-1|0;break T}a=m+2|0;if((a|0)==-1){break S}}a=H[n+(a<<2)>>2];H[n+(d<<2)>>2]=a;if((a|0)==-1){break R}H[o+(a<<2)>>2]=d;break R}H[n+(d<<2)>>2]=-1}a=m+1|0;a=(a>>>0)%3|0?a:m-2|0;b=-1;if((a|0)==-1){break Q}b=H[n+(a<<2)>>2]}H[j>>2]=b;H[h>>2]=q;break O;case 0:if((c|0)==(d|0)){break s}a=c-4|0;m=H[a>>2];H[i+68>>2]=a;k=H[i+44>>2];U:{if(!k){c=a;break U}o=H[i+40>>2];h=Uj(k)>>>0>1;b=e&k+2147483647;V:{if(!h){break V}b=e;if(b>>>0>>0){break V}b=(e>>>0)%(k>>>0)|0}j=b;b=H[o+(j<<2)>>2];if(!b){c=a;break U}b=H[b>>2];if(!b){c=a;break U}W:{if(!h){k=k-1|0;while(1){h=H[b+4>>2];X:{if((h|0)!=(e|0)){if((j|0)==(h&k)){break X}c=a;break U}if((e|0)==H[b+8>>2]){break W}}b=H[b>>2];if(b){continue}break}c=a;break U}while(1){h=H[b+4>>2];Y:{if((h|0)!=(e|0)){if(h>>>0>=k>>>0){h=(h>>>0)%(k>>>0)|0}if((h|0)==(j|0)){break Y}c=a;break U}if((e|0)==H[b+8>>2]){break W}}b=H[b>>2];if(b){continue}break}c=a;break U}if((a|0)!=(A|0)){H[a>>2]=H[b+12>>2];H[i+68>>2]=c;break U}h=A-d|0;c=h>>2;f=c+1|0;if(f>>>0>=1073741824){break M}a=h>>>1|0;h=h>>>0>=2147483644?1073741823:a>>>0>f>>>0?a:f;if(h){if(h>>>0>=1073741824){break p}a=pa(h<<2)}else{a=0}f=a+(c<<2)|0;H[f>>2]=H[b+12>>2];c=f+4|0;if((d|0)!=(A|0)){while(1){f=f-4|0;A=A-4|0;H[f>>2]=H[A>>2];if((d|0)!=(A|0)){continue}break}}A=a+(h<<2)|0;H[i+72>>2]=A;H[i+68>>2]=c;H[i+64>>2]=f;if(d){oa(d)}}if((c|0)==(f|0)){break G}j=c-4|0;n=H[j>>2];if((n|0)==(m|0)){break G}d=(n|0)==-1;q=H[g+8>>2];if(!d&H[H[q+12>>2]+(n<<2)>>2]!=-1){break G}r=H[q+12>>2];if((m|0)!=-1&H[r+(m<<2)>>2]!=-1){break G}p=N(e,3);e=p+2|0;H[r+(n<<2)>>2]=e;o=e<<2;H[o+r>>2]=n;a=p+1|0;H[r+(m<<2)>>2]=a;b=a<<2;H[b+r>>2]=m;if(d){break L}if((n>>>0)%3|0){k=n-1|0;break J}k=n+2|0;if((k|0)!=-1){break J}d=H[q>>2];a=-1;break I;case 6:break P;default:break s}}a=H[g+8>>2];Ka(a+24|0,11424);h=H[g+8>>2];p=N(e,3);q=H[a+28>>2];r=H[a+24>>2];o=q-r|0;n=o>>2;k=n-1|0;H[H[h>>2]+(p<<2)>>2]=k;Ka(h+24|0,11424);j=p+1|0;H[H[h>>2]+(j<<2)>>2]=(H[h+28>>2]-H[h+24>>2]>>2)-1;a=H[g+8>>2];Ka(a+24|0,11424);h=p+2|0;H[H[a>>2]+(h<<2)>>2]=(H[a+28>>2]-H[a+24>>2]>>2)-1;a=H[g+8>>2];m=H[a+24>>2];if(H[a+28>>2]-m>>2>(O|0)){break s}Z:{_:{if((q|0)!=(r|0)){H[m+(k<<2)>>2]=p;b=0;if((o|0)==-4){break _}}H[m+(n<<2)>>2]=j;b=n+1|0;if((b|0)==-1){break Z}}H[m+(b<<2)>>2]=h}if((c|0)!=(A|0)){H[c>>2]=p;c=c+4|0;H[i+68>>2]=c;break N}h=c-d|0;b=h>>2;f=b+1|0;if(f>>>0>=1073741824){break K}a=h>>>1|0;h=h>>>0>=2147483644?1073741823:a>>>0>f>>>0?a:f;if(h){if(h>>>0>=1073741824){break p}a=pa(h<<2)}else{a=0}f=a+(b<<2)|0;H[f>>2]=p;A=a+(h<<2)|0;a=f+4|0;if((c|0)!=(d|0)){while(1){f=f-4|0;c=c-4|0;H[f>>2]=H[c>>2];if((c|0)!=(d|0)){continue}break}}H[i+72>>2]=A;H[i+68>>2]=a;H[i+64>>2]=f;if(d){oa(d)}c=a}d=f}De(Q,H[c-4>>2]);h=H[g+40>>2];if((h|0)==H[g+36>>2]){break u}b=h-12|0;a=H[b+4>>2];k=(e^-1)+t|0;if(a>>>0>k>>>0){break G}if((a|0)!=(k|0)){break u}e=I[h-4|0];a=H[b>>2];H[g+40>>2]=b;if((a|0)<0){break G}h=c-4|0;j=H[h>>2];H[i+20>>2]=(a^-1)+t;a=i+20|0;H[i+88>>2]=a;Gb(i,i+40|0,a,i+88|0);b=H[i>>2];$:{if(e&1){a=-1;if((j|0)==-1){break $}a=j+1|0;a=(a>>>0)%3|0?a:j-2|0;break $}a=-1;if((j|0)==-1){break $}a=j-1|0;if((j>>>0)%3|0){break $}a=j+2|0}H[b+12>>2]=a;b=H[g+40>>2];if((b|0)==H[g+36>>2]){break u}while(1){j=b-12|0;a=H[j+4>>2];if(a>>>0>k>>>0){break G}if((a|0)!=(k|0)){break u}e=I[b-4|0];a=H[j>>2];H[g+40>>2]=j;if((a|0)<0){break G}j=H[h>>2];H[i+20>>2]=(a^-1)+t;a=i+20|0;H[i+88>>2]=a;Gb(i,i+40|0,a,i+88|0);b=H[i>>2];aa:{if(e&1){a=-1;if((j|0)==-1){break aa}a=j+1|0;a=(a>>>0)%3|0?a:j-2|0;break aa}a=-1;if((j|0)==-1){break aa}a=j-1|0;if((j>>>0)%3|0){break aa}a=j+2|0}H[b+12>>2]=a;b=H[g+40>>2];if((b|0)!=H[g+36>>2]){continue}break}break u}sa();v()}k=-1;d=H[q>>2];H[d+(p<<2)>>2]=-1;h=-1;break H}sa();v()}d=H[q>>2];a=H[d+(k<<2)>>2]}k=a;H[(p<<2)+d>>2]=a;a=n+1|0;a=(a>>>0)%3|0?a:n-2|0;h=-1;if((a|0)==-1){break H}h=H[(a<<2)+d>>2]}H[b+d>>2]=h;ba:{if((m|0)==-1){H[d+o>>2]=-1;n=-1;a=-1;break ba}ca:{da:{ea:{if((m>>>0)%3|0){b=m-1|0;break ea}b=m+2|0;if((b|0)==-1){break da}}a=H[(b<<2)+d>>2];H[d+o>>2]=a;if((a|0)==-1){break ca}H[H[q+24>>2]+(a<<2)>>2]=e;break ca}H[d+o>>2]=-1}n=-1;b=m+1|0;b=(b>>>0)%3|0?b:m-2|0;a=-1;if((b|0)==-1){break ba}n=H[(b<<2)+d>>2];a=b}h=H[g+388>>2];e=k<<2;b=h+e|0;o=b;m=H[b>>2];b=n<<2;H[o>>2]=m+H[b+h>>2];h=b;b=H[q+24>>2];o=h+b|0;if((k|0)!=-1){H[b+e>>2]=H[o>>2]}b=a;while(1){if((b|0)==-1){break F}H[(b<<2)+d>>2]=k;h=b+1|0;b=(h>>>0)%3|0?h:b-2|0;e=-1;fa:{if((b|0)==-1){break fa}h=H[r+(b<<2)>>2];e=-1;if((h|0)==-1){break fa}b=h+1|0;e=(b>>>0)%3|0?b:h-2|0}b=e;if((a|0)!=(b|0)){continue}break}}b=-1;if(!(y&1)){break t}break s}H[o>>2]=-1;ga:{if(C){break ga}if((D|0)!=(L|0)){H[L>>2]=n;L=L+4|0;H[i+28>>2]=L;break ga}d=D-s|0;b=d>>2;e=b+1|0;if(e>>>0>=1073741824){break q}a=d>>>1|0;e=d>>>0>=2147483644?1073741823:a>>>0>e>>>0?a:e;if(e){if(e>>>0>=1073741824){break p}a=pa(e<<2)}else{a=0}b=a+(b<<2)|0;H[b>>2]=n;L=b+4|0;if((s|0)!=(D|0)){while(1){b=b-4|0;D=D-4|0;H[b>>2]=H[D>>2];if((s|0)!=(D|0)){continue}break}}D=a+(e<<2)|0;H[i+32>>2]=D;H[i+28>>2]=L;H[i+24>>2]=b;if(s){oa(s)}s=b}H[j>>2]=p}De(Q,p);d=f}y=(l|0)<(t|0);if((l|0)!=(t|0)){continue}break}l=t}b=-1;y=H[g+8>>2];if(H[y+28>>2]-H[y+24>>2]>>2>(O|0)){break s}if((c|0)!=(f|0)){r=g+72|0;j=g+60|0;t=g+312|0;while(1){c=c-4|0;z=H[c>>2];H[i+68>>2]=c;ha:{ia:{ja:{if(J[g+270>>1]<=513){if(!I[g+364|0]){break ia}b=H[g+360>>2];a=H[g+352>>2]+(b>>>3|0)|0;if(a>>>0>=K[g+356>>2]){break ja}a=I[a|0];H[g+360>>2]=b+1;if(!(a>>>(b&7)&1)){break ja}break ia}if(Ba(t)){break ia}}ka:{la:{b=H[g+64>>2];e=H[g+68>>2];if((b|0)==e<<5){if((b+1|0)<0){break la}if(b>>>0<=1073741822){e=e<<6;b=(b&-32)+32|0;a=b>>>0>>0?e:b}else{a=2147483647}pb(j,a);b=H[g+64>>2]}H[g+64>>2]=b+1;e=H[g+60>>2]+(b>>>3&536870908)|0;a=H[e>>2];R=e,S=Vj(b)&a,H[R>>2]=S;b=H[g+76>>2];if((b|0)!=H[g+80>>2]){H[b>>2]=z;H[g+76>>2]=b+4;break ha}s=H[r>>2];h=b-s|0;e=h>>2;d=e+1|0;if(d>>>0>=1073741824){break ka}a=h>>>1|0;h=h>>>0>=2147483644?1073741823:a>>>0>d>>>0?a:d;if(h){if(h>>>0>=1073741824){break p}a=pa(h<<2)}else{a=0}d=a+(e<<2)|0;H[d>>2]=z;e=d+4|0;if((b|0)!=(s|0)){while(1){d=d-4|0;b=b-4|0;H[d>>2]=H[b>>2];if((b|0)!=(s|0)){continue}break}}H[g+80>>2]=a+(h<<2);H[g+76>>2]=e;H[g+72>>2]=d;if(!s){break ha}oa(s);break ha}sa();v()}sa();v()}q=H[g+8>>2];C=H[q>>2];if(((H[q+4>>2]-C>>2>>>0)/3|0)<=(l|0)){b=-1;break s}f=-1;b=-1;d=-1;s=H[q+24>>2];e=-1;ma:{if((z|0)==-1){break ma}a=z+1|0;a=(a>>>0)%3|0?a:z-2|0;e=-1;if((a|0)==-1){break ma}e=H[C+(a<<2)>>2]}o=H[s+(e<<2)>>2];na:{if((o|0)==-1){k=1;a=-1;break na}k=1;h=o+1|0;h=(h>>>0)%3|0?h:o-2|0;a=-1;if((h|0)==-1){break na}k=0;a=h+1|0;f=h;a=(a>>>0)%3|0?a:f-2|0;if((a|0)!=-1){a=H[C+(a<<2)>>2]}else{a=-1}}h=H[(a<<2)+s>>2];if((h|0)!=-1){d=h+1|0;d=(d>>>0)%3|0?d:h-2|0}if((f|0)==(z|0)|(d|0)==(z|0)|((z|0)!=-1&H[H[q+12>>2]+(z<<2)>>2]!=-1|(d|0)==(f|0))){break s}if(!k&H[H[q+12>>2]+(f<<2)>>2]!=-1){break s}k=-1;s=H[q+12>>2];h=-1;oa:{if((d|0)==-1){break oa}if(H[s+(d<<2)>>2]!=-1){break s}b=d+1|0;b=(b>>>0)%3|0?b:d-2|0;h=-1;if((b|0)==-1){break oa}h=H[C+(b<<2)>>2]}b=N(l,3);H[i>>2]=b;H[s+(b<<2)>>2]=z;H[s+(z<<2)>>2]=b;b=H[i>>2]+1|0;H[s+(b<<2)>>2]=f;H[s+(f<<2)>>2]=b;b=H[i>>2]+2|0;H[s+(b<<2)>>2]=d;H[s+(d<<2)>>2]=b;b=H[i>>2];H[C+(b<<2)>>2]=a;o=b+1|0;s=C+(o<<2)|0;H[s>>2]=h;h=b+2|0;d=C+(h<<2)|0;H[d>>2]=e;e=H[g+120>>2];f=o?a:-1;b=e+(f>>>3&536870908)|0;a=H[b>>2];R=b,S=Vj(f)&a,H[R>>2]=S;k=(o|0)!=-1?H[s>>2]:k;b=e+(k>>>3&536870908)|0;a=H[b>>2];R=b,S=Vj(k)&a,H[R>>2]=S;b=-1;b=(h|0)!=-1?H[d>>2]:b;f=e+(b>>>3&536870908)|0;a=H[f>>2];R=f,S=Vj(b)&a,H[R>>2]=S;F[i+88|0]=1;_c(j,i+88|0);Ka(r,i);l=l+1|0;f=H[i+64>>2]}if((c|0)!=(f|0)){continue}break}y=H[g+8>>2]}b=-1;if(((H[y+4>>2]-H[y>>2]>>2>>>0)/3|0)!=(l|0)){break s}b=H[y+28>>2]-H[y+24>>2]>>2;l=H[i+24>>2];e=H[i+28>>2];if((l|0)==(e|0)){break r}while(1){j=H[l>>2];a=H[y+24>>2];c=b-1|0;d=a+(c<<2)|0;if(H[d>>2]==-1){while(1){c=b-2|0;b=b-1|0;d=a+(c<<2)|0;if(H[d>>2]==-1){continue}break}}if(c>>>0>=j>>>0){H[i>>2]=y;d=H[d>>2];F[i+12|0]=1;H[i+8>>2]=d;H[i+4>>2]=d;if((d|0)!=-1){while(1){a=H[H[g+8>>2]>>2]+(d<<2)|0;if(H[a>>2]!=(c|0)){b=-1;break s}H[a>>2]=j;uc(i);d=H[i+8>>2];if((d|0)!=-1){continue}break}y=H[g+8>>2]}a=H[y+24>>2];f=a+(c<<2)|0;if((j|0)!=-1){H[a+(j<<2)>>2]=H[f>>2]}H[f>>2]=-1;h=1<>2];f=a+(j>>>3&536870908)|0;d=a+(c>>>3&536870908)|0;a=1<>2]&a){c=h|H[f>>2]}else{c=H[f>>2]&(h^-1)}H[f>>2]=c;H[d>>2]=H[d>>2]&(a^-1);b=b-1|0}l=l+4|0;if((e|0)!=(l|0)){continue}break}}l=H[i+24>>2]}if(l){oa(l)}a=H[i+48>>2];if(a){while(1){c=H[a>>2];oa(a);a=c;if(a){continue}break}}a=H[i+40>>2];H[i+40>>2]=0;if(a){oa(a)}a=H[i+64>>2];if(a){H[i+68>>2]=a;oa(a)}ca=i+96|0;break o}sa();v()}wa();v()}f=b;if((b|0)==-1){break n}b=H[x+16>>2];c=b+H[x>>2]|0;a=H[x+8>>2]-b|0;b=H[H[g+4>>2]+32>>2];G[b+38>>1]=J[b+38>>1];H[b>>2]=c;H[b+16>>2]=0;H[b+20>>2]=0;H[b+8>>2]=a;H[b+12>>2]=0;b=H[g+4>>2];a=J[b+36>>1];c=a<<8|a>>>8;if((c&65535)>>>0<=513){b=H[b+32>>2];e=b;a=H[b+16>>2];b=P+H[b+20>>2]|0;a=a+E|0;b=a>>>0>>0?b+1|0:b;H[e+16>>2]=a;H[e+20>>2]=b}pa:{if(H[g+216>>2]==H[g+220>>2]){break pa}a=H[g+8>>2];b=H[a>>2];a=H[a+4>>2];qa:{if((c&65535)>>>0>=513){if((a|0)==(b|0)){break pa}c=0;break qa}if((a|0)==(b|0)){break pa}c=0;while(1){if(cd(g,c)){c=c+3|0;a=H[g+8>>2];if(c>>>0>2]-H[a>>2]>>2>>>0){continue}break pa}break}break n}while(1){if(bd(g,c)){c=c+3|0;a=H[g+8>>2];if(c>>>0>2]-H[a>>2]>>2>>>0){continue}break pa}break}break n}ad(B);c=H[g+216>>2];if((c|0)!=H[g+220>>2]){t=0;while(1){e=N(t,144);Jc((e+c|0)+4|0,H[g+8>>2]);a=H[M>>2];b=a+e|0;c=H[b+132>>2];b=H[b+136>>2];if((c|0)!=(b|0)){while(1){Hc((e+H[M>>2]|0)+4|0,H[c>>2]);c=c+4|0;if((b|0)!=(c|0)){continue}break}a=H[M>>2]}if(!Ic((a+e|0)+4|0)){break n}t=t+1|0;c=H[g+216>>2];if(t>>>0<(H[g+220>>2]-c|0)/144>>>0){continue}break}}a=H[g+8>>2];Hb(g+184|0,H[a+28>>2]-H[a+24>>2]>>2);w=H[g+216>>2];if((w|0)!=H[g+220>>2]){c=0;while(1){a=N(c,144)+w|0;b=H[a+60>>2]-H[a+56>>2]>>2;e=a+104|0;a=H[g+8>>2];a=H[a+28>>2]-H[a+24>>2]>>2;Hb(e,(a|0)<(b|0)?b:a);c=c+1|0;w=H[g+216>>2];if(c>>>0<(H[g+220>>2]-w|0)/144>>>0){continue}break}}w=$c(g,f)}break b}w=0}ca=u- -64|0;return w|0}function ki(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,L=0,M=0,O=0,P=0,Q=0;t=ca+-64|0;ca=t;H[a+132>>2]=0;if(H[a+148>>2]){d=H[a+144>>2];if(d){while(1){b=H[d>>2];oa(d);d=b;if(b){continue}break}}d=0;H[a+144>>2]=0;k=H[a+140>>2];a:{if(!k){break a}if(k>>>0>=4){b=k&-4;while(1){c=d<<2;H[c+H[a+136>>2]>>2]=0;H[H[a+136>>2]+(c|4)>>2]=0;H[H[a+136>>2]+(c|8)>>2]=0;H[H[a+136>>2]+(c|12)>>2]=0;d=d+4|0;e=e+4|0;if((b|0)!=(e|0)){continue}break}}b=k&3;if(!b){break a}while(1){H[H[a+136>>2]+(d<<2)>>2]=0;d=d+1|0;x=x+1|0;if((b|0)!=(x|0)){continue}break}}H[a+148>>2]=0}b:{c:{d=H[a+4>>2];x=I[d+36|0];b=x<<8|I[d+37|0];if(b>>>0<=513){f=H[d+32>>2];d:{if(b>>>0<=511){b=H[f+20>>2];e=H[f+16>>2];c=e+4|0;b=c>>>0<4?b+1|0:b;k=H[f+12>>2];if(K[f+8>>2]>>0&(k|0)<=(b|0)|(b|0)>(k|0)){break c}e=e+H[f>>2]|0;e=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);H[f+16>>2]=c;H[f+20>>2]=b;break d}if(!Ea(1,t,f)){break c}d=H[a+4>>2];x=I[d+36|0];e=H[t>>2]}H[a+132>>2]=e}f=H[d+32>>2];e:{f:{g:{if((x&255)>>>0<=1){x=0;b=H[f+20>>2];c=H[f+16>>2];e=c+4|0;b=e>>>0<4?b+1|0:b;k=H[f+12>>2];if(K[f+8>>2]>>0&(k|0)<=(b|0)|(b|0)>(k|0)){break b}c=c+H[f>>2]|0;c=I[c|0]|I[c+1|0]<<8|(I[c+2|0]<<16|I[c+3|0]<<24);H[t+60>>2]=c;H[f+16>>2]=e;H[f+20>>2]=b;H[a+156>>2]=c;l=a+156|0;break g}x=0;if(!Ea(1,t+60|0,f)){break b}d=H[a+4>>2];b=I[d+36|0];H[a+156>>2]=H[t+60>>2];l=a+156|0;if(b>>>0>1){break f}}f=H[d+32>>2];c=H[f+8>>2];k=H[f+12>>2];d=H[f+20>>2];e=H[f+16>>2];b=e+4|0;d=b>>>0<4?d+1|0:d;if(b>>>0>c>>>0&(d|0)>=(k|0)|(d|0)>(k|0)){break b}e=e+H[f>>2]|0;e=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);H[t+56>>2]=e;H[f+16>>2]=b;H[f+20>>2]=d;break e}if(!Ea(1,t+56|0,H[d+32>>2])){break b}e=H[t+56>>2]}if(e>>>0>1431655765|K[l>>2]>N(e,3)>>>0){break b}j=H[a+4>>2];y=H[j+32>>2];d=H[y+8>>2];f=H[y+12>>2];b=H[y+20>>2];m=H[y+16>>2];if((f|0)<=(b|0)&m>>>0>=d>>>0|(b|0)>(f|0)){break b}l=H[y>>2];g=I[l+m|0];c=y;k=m+1|0;C=k?b:b+1|0;H[c+16>>2]=k;H[c+20>>2]=C;h:{if(I[j+36|0]<=1){c=d;d=m+5|0;b=d>>>0<5?b+1|0:b;if(c>>>0>>0&(b|0)>=(f|0)|(b|0)>(f|0)){break b}c=k+l|0;l=I[c|0]|I[c+1|0]<<8|(I[c+2|0]<<16|I[c+3|0]<<24);H[t+52>>2]=l;H[y+16>>2]=d;H[y+20>>2]=b;break h}if(!Ea(1,t+52|0,y)){break b}l=H[t+52>>2]}if(e>>>0>>0|((l>>>0)/3|0)+l>>>0>>0){break b}d=H[a+4>>2];f=H[d+32>>2];i:{if(I[d+36|0]<=1){d=H[f+20>>2];b=H[f+16>>2];c=b+4|0;d=c>>>0<4?d+1|0:d;k=H[f+12>>2];if(K[f+8>>2]>>0&(k|0)<=(d|0)|(d|0)>(k|0)){break b}b=b+H[f>>2]|0;b=I[b|0]|I[b+1|0]<<8|(I[b+2|0]<<16|I[b+3|0]<<24);H[t+48>>2]=b;H[f+16>>2]=c;H[f+20>>2]=d;break i}if(!Ea(1,t+48|0,f)){break b}b=H[t+48>>2]}if(b>>>0>l>>>0){break b}H[a+28>>2]=H[a+24>>2];d=$b(pa(88));c=H[a+8>>2];H[a+8>>2]=d;if(c){cb(c);if(!H[a+8>>2]){break b}}H[a+164>>2]=H[a+160>>2];Jb(a+160|0,e);H[a+176>>2]=H[a+172>>2];Jb(a+172|0,e);H[a- -64>>2]=0;H[a+92>>2]=-1;H[a+84>>2]=-1;H[a+88>>2]=-1;H[a+40>>2]=H[a+36>>2];H[a+52>>2]=H[a+48>>2];H[a+76>>2]=H[a+72>>2];E=a+216|0;ed(E);dd(E,g);if(!Lc(H[a+8>>2],e,H[a+156>>2]+b|0)){break b}d=H[a+156>>2];F[t|0]=1;Oa(a+120|0,b+d|0,t);b=H[a+4>>2];d=J[b+36>>1];d=(d<<8|d>>>8)&65535;j:{if(d>>>0<=513){k=H[b+32>>2];k:{if(d>>>0<=511){b=H[k+20>>2];e=H[k+16>>2];d=e+4|0;b=d>>>0<4?b+1|0:b;c=H[k+12>>2];if(K[k+8>>2]>>0&(c|0)<=(b|0)|(b|0)>(c|0)){break b}e=e+H[k>>2]|0;e=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);H[k+16>>2]=d;H[k+20>>2]=b;break k}if(!Ea(1,t+44|0,k)){break b}e=H[t+44>>2]}if(!e){break b}k=H[H[a+4>>2]+32>>2];c=H[k+8>>2];d=H[k+16>>2];b=c-d|0;d=H[k+12>>2]-(H[k+20>>2]+(c>>>0>>0)|0)|0;if(b>>>0>>0&(d|0)<=0|(d|0)<0){break b}f=Ha(t);k=H[H[a+4>>2]+32>>2];c=H[k+16>>2];b=(c+H[k>>2]|0)+e|0;d=H[k+8>>2]-c|0;G[f+38>>1]=J[k+38>>1];H[f>>2]=b;H[f+16>>2]=0;H[f+20>>2]=0;H[f+8>>2]=d-e;H[f+12>>2]=0;d=Ib(a,f);if((d|0)==-1){break b}y=d;M=d>>31;break j}y=-1;M=-1;if((Ib(a,H[b+32>>2])|0)==-1){break b}}O=a+232|0;e=O;H[e+144>>2]=a;d=H[(ea[H[H[a>>2]+32>>2]](a)|0)+32>>2];b=H[d>>2]+H[d+16>>2]|0;d=H[(ea[H[H[a>>2]+32>>2]](a)|0)+32>>2];d=H[d+8>>2]-H[d+16>>2]|0;P=e,Q=J[H[(ea[H[H[a>>2]+32>>2]](a)|0)+32>>2]+38>>1],G[P+38>>1]=Q;H[e>>2]=b;H[e+16>>2]=0;H[e+20>>2]=0;H[e+8>>2]=d;H[e+12>>2]=0;H[a+372>>2]=g;C=Ha(t);l:{if(!Ge(e,C)){break l}b=0;d=0;e=0;k=0;i=ca-96|0;ca=i;H[i+72>>2]=0;H[i+64>>2]=0;H[i+68>>2]=0;H[i+48>>2]=0;H[i+52>>2]=0;H[i+40>>2]=0;H[i+44>>2]=0;H[i+56>>2]=1065353216;H[i+32>>2]=0;H[i+24>>2]=0;H[i+28>>2]=0;h=a;L=H[a+124>>2];m:{n:{o:{p:{q:{r:{if((l|0)<=0){break r}A=H[h+216>>2]!=H[h+220>>2];s=1;while(1){f=k;k=f+1|0;s:{t:{u:{v:{w:{x:{y:{z:{A:{B:{C:{D:{E:{F:{G:{if(!I[h+308|0]){break G}u=H[h+296>>2];g=H[h+304>>2];a=u+(g>>>3|0)|0;p=H[h+300>>2];if(a>>>0>=p>>>0){break G}c=I[a|0];a=g+1|0;H[h+304>>2]=a;m=c>>>(g&7)&1;if(!m){break G}n=0;j=a>>>3|0;c=u+j|0;H:{if(c>>>0>=p>>>0){g=a;a=0;break H}c=I[c|0];g=g+2|0;H[h+304>>2]=g;j=g>>>3|0;a=c>>>(a&7)&1}c=j+u|0;if(c>>>0

>>0){c=I[c|0];H[h+304>>2]=g+1;n=c>>>(g&7)<<1&2}j=-1;a=m|(a|n)<<1;switch(a-1|0){case 6:break D;case 0:break E;case 2:case 4:break F;default:break q}}if((d|0)==(e|0)){j=-1;break q}g=-1;q=H[h+8>>2];u=H[q+24>>2];p=d-4|0;s=H[p>>2];c=-1;I:{if((s|0)==-1){break I}b=s+1|0;b=(b>>>0)%3|0?b:s-2|0;c=-1;if((b|0)==-1){break I}c=H[H[q>>2]+(b<<2)>>2]}b=H[u+(c<<2)>>2];if((b|0)!=-1){a=b+1|0;g=(a>>>0)%3|0?a:b-2|0}if((g|0)==(s|0)){j=-1;break q}if((s|0)!=-1){j=-1;if(H[H[q+12>>2]+(s<<2)>>2]!=-1){break q}}b=H[q+12>>2];if((g|0)!=-1){j=-1;if(H[b+(g<<2)>>2]!=-1){break q}}n=N(f,3);a=n+1|0;H[b+(s<<2)>>2]=a;m=a<<2;H[m+b>>2]=s;r=n+2|0;H[b+(g<<2)>>2]=r;f=r<<2;H[f+b>>2]=g;o=-1;a=-1;J:{if((s|0)==-1){break J}K:{if((s>>>0)%3|0){b=s-1|0;break K}b=s+2|0;a=-1;if((b|0)==-1){break J}}a=H[H[q>>2]+(b<<2)>>2]}L:{if((g|0)==-1){break L}b=g+1|0;b=(b>>>0)%3|0?b:g-2|0;if((b|0)==-1){break L}o=H[H[q>>2]+(b<<2)>>2]}j=-1;if((a|0)==(c|0)|(c|0)==(o|0)){break q}b=H[q>>2];H[b+(n<<2)>>2]=c;H[b+m>>2]=o;H[b+f>>2]=a;if((a|0)!=-1){H[u+(a<<2)>>2]=r}b=H[h+120>>2]+(c>>>3&536870908)|0;a=H[b>>2];P=b,Q=Vj(c)&a,H[P>>2]=Q;H[p>>2]=n;b=e;break s}if((d|0)==(e|0)){break q}m=d-4|0;n=H[m>>2];r=H[h+8>>2];b=H[r+12>>2];if((n|0)!=-1&H[b+(n<<2)>>2]!=-1){break q}o=N(f,3);p=(a|0)==5;g=o+(p?2:1)|0;a=g<<2;H[a+b>>2]=n;H[b+(n<<2)>>2]=g;Ka(r+24|0,11424);b=H[h+8>>2];u=H[b+24>>2];if(H[b+28>>2]-u>>2>(L|0)){break q}j=H[b>>2];q=j+a|0;c=H[r+28>>2];b=H[r+24>>2];a=(c-b>>2)-1|0;H[q>>2]=a;if((b|0)!=(c|0)){H[u+(a<<2)>>2]=g}c=p?o:o+2|0;g=j+(o+p<<2)|0;M:{if((n|0)==-1){H[j+(c<<2)>>2]=-1;b=-1;break M}N:{O:{P:{if((n>>>0)%3|0){a=n-1|0;break P}a=n+2|0;if((a|0)==-1){break O}}a=H[j+(a<<2)>>2];H[j+(c<<2)>>2]=a;if((a|0)==-1){break N}H[u+(a<<2)>>2]=c;break N}H[j+(c<<2)>>2]=-1}a=n+1|0;a=(a>>>0)%3|0?a:n-2|0;b=-1;if((a|0)==-1){break M}b=H[j+(a<<2)>>2]}H[g>>2]=b;H[m>>2]=o;b=e;break y}if((b|0)==(d|0)){break q}a=d-4|0;q=H[a>>2];H[i+68>>2]=a;p=H[i+44>>2];Q:{if(!p){d=a;break Q}g=H[i+40>>2];j=Uj(p)>>>0>1;c=f&p+2147483647;R:{if(!j){break R}c=f;if(c>>>0

>>0){break R}c=(f>>>0)%(p>>>0)|0}m=c;c=H[g+(m<<2)>>2];if(!c){d=a;break Q}g=H[c>>2];if(!g){d=a;break Q}S:{if(!j){j=p-1|0;while(1){c=H[g+4>>2];T:{if((c|0)!=(f|0)){if((m|0)==(c&j)){break T}d=a;break Q}if((f|0)==H[g+8>>2]){break S}}g=H[g>>2];if(g){continue}break}d=a;break Q}while(1){c=H[g+4>>2];U:{if((c|0)!=(f|0)){if(c>>>0>=p>>>0){c=(c>>>0)%(p>>>0)|0}if((c|0)==(m|0)){break U}d=a;break Q}if((f|0)==H[g+8>>2]){break S}}g=H[g>>2];if(g){continue}break}d=a;break Q}if((a|0)!=(z|0)){H[a>>2]=H[g+12>>2];H[i+68>>2]=d;break Q}c=z-b|0;d=c>>2;e=d+1|0;if(e>>>0>=1073741824){break C}a=c>>>1|0;c=c>>>0>=2147483644?1073741823:a>>>0>e>>>0?a:e;if(c){if(c>>>0>=1073741824){break n}a=pa(c<<2)}else{a=0}e=a+(d<<2)|0;H[e>>2]=H[g+12>>2];d=e+4|0;if((b|0)!=(z|0)){while(1){e=e-4|0;z=z-4|0;H[e>>2]=H[z>>2];if((b|0)!=(z|0)){continue}break}}z=a+(c<<2)|0;H[i+72>>2]=z;H[i+68>>2]=d;H[i+64>>2]=e;if(b){oa(b)}}if((d|0)==(e|0)){break u}g=d-4|0;n=H[g>>2];if((n|0)==(q|0)){break u}b=(n|0)==-1;o=H[h+8>>2];if(!b&H[H[o+12>>2]+(n<<2)>>2]!=-1){break u}r=H[o+12>>2];if((q|0)!=-1&H[r+(q<<2)>>2]!=-1){break u}u=N(f,3);f=u+2|0;H[r+(n<<2)>>2]=f;p=f<<2;H[p+r>>2]=n;a=u+1|0;H[r+(q<<2)>>2]=a;c=a<<2;H[c+r>>2]=q;if(b){break B}if((n>>>0)%3|0){m=n-1|0;break x}m=n+2|0;if((m|0)!=-1){break x}a=H[o>>2];b=-1;break w}a=H[h+8>>2];Ka(a+24|0,11424);c=H[h+8>>2];q=N(f,3);r=H[a+28>>2];u=H[a+24>>2];p=r-u|0;o=p>>2;g=o-1|0;H[H[c>>2]+(q<<2)>>2]=g;Ka(c+24|0,11424);m=q+1|0;H[H[c>>2]+(m<<2)>>2]=(H[c+28>>2]-H[c+24>>2]>>2)-1;a=H[h+8>>2];Ka(a+24|0,11424);c=q+2|0;H[H[a>>2]+(c<<2)>>2]=(H[a+28>>2]-H[a+24>>2]>>2)-1;a=H[h+8>>2];n=H[a+24>>2];if(H[a+28>>2]-n>>2>(L|0)){break q}V:{W:{if((r|0)!=(u|0)){H[n+(g<<2)>>2]=q;j=0;if((p|0)==-4){break W}}H[n+(o<<2)>>2]=m;j=o+1|0;if((j|0)==-1){break V}}H[n+(j<<2)>>2]=c}if((d|0)!=(z|0)){H[d>>2]=q;d=d+4|0;H[i+68>>2]=d;break y}m=d-b|0;e=m>>2;c=e+1|0;if(c>>>0>=1073741824){break A}a=m>>>1|0;c=m>>>0>=2147483644?1073741823:a>>>0>c>>>0?a:c;if(c){if(c>>>0>=1073741824){break n}a=pa(c<<2)}else{a=0}e=a+(e<<2)|0;H[e>>2]=q;z=a+(c<<2)|0;a=e+4|0;if((b|0)!=(d|0)){while(1){e=e-4|0;d=d-4|0;H[e>>2]=H[d>>2];if((b|0)!=(d|0)){continue}break}}H[i+72>>2]=z;H[i+68>>2]=a;H[i+64>>2]=e;if(!b){break z}oa(b);break z}sa();v()}m=-1;a=H[o>>2];H[a+(u<<2)>>2]=-1;j=-1;break v}sa();v()}d=a;b=e}m=H[h+40>>2];if((m|0)==H[h+36>>2]){break s}c=m-12|0;a=H[c+4>>2];j=(f^-1)+l|0;if(a>>>0>j>>>0){break u}if((a|0)!=(j|0)){break s}f=I[m-4|0];a=H[c>>2];H[h+40>>2]=c;if((a|0)<0){break u}m=d-4|0;g=H[m>>2];H[i+20>>2]=(a^-1)+l;a=i+20|0;H[i+88>>2]=a;Gb(i,i+40|0,a,i+88|0);c=H[i>>2];X:{if(f&1){a=-1;if((g|0)==-1){break X}a=g+1|0;a=(a>>>0)%3|0?a:g-2|0;break X}a=-1;if((g|0)==-1){break X}a=g-1|0;if((g>>>0)%3|0){break X}a=g+2|0}H[c+12>>2]=a;g=H[h+40>>2];if((g|0)==H[h+36>>2]){break s}while(1){c=g-12|0;a=H[c+4>>2];if(a>>>0>j>>>0){break u}if((a|0)!=(j|0)){break s}f=I[g-4|0];a=H[c>>2];H[h+40>>2]=c;if((a|0)<0){break u}g=H[m>>2];H[i+20>>2]=(a^-1)+l;a=i+20|0;H[i+88>>2]=a;Gb(i,i+40|0,a,i+88|0);c=H[i>>2];Y:{if(f&1){a=-1;if((g|0)==-1){break Y}a=g+1|0;a=(a>>>0)%3|0?a:g-2|0;break Y}a=-1;if((g|0)==-1){break Y}a=g-1|0;if((g>>>0)%3|0){break Y}a=g+2|0}H[c+12>>2]=a;g=H[h+40>>2];if((g|0)!=H[h+36>>2]){continue}break}break s}a=H[o>>2];b=H[a+(m<<2)>>2]}m=b;H[(u<<2)+a>>2]=b;b=n+1|0;b=(b>>>0)%3|0?b:n-2|0;j=-1;if((b|0)==-1){break v}j=H[(b<<2)+a>>2]}H[a+c>>2]=j;Z:{if((q|0)==-1){H[a+p>>2]=-1;n=-1;c=-1;break Z}_:{$:{aa:{if((q>>>0)%3|0){b=q-1|0;break aa}b=q+2|0;if((b|0)==-1){break $}}b=H[(b<<2)+a>>2];H[a+p>>2]=b;if((b|0)==-1){break _}H[H[o+24>>2]+(b<<2)>>2]=f;break _}H[a+p>>2]=-1}n=-1;b=q+1|0;b=(b>>>0)%3|0?b:q-2|0;c=-1;if((b|0)==-1){break Z}n=H[(b<<2)+a>>2];c=b}b=H[o+24>>2];p=b+(n<<2)|0;if((m|0)!=-1){H[b+(m<<2)>>2]=H[p>>2]}b=c;while(1){if((b|0)==-1){break t}H[(b<<2)+a>>2]=m;j=b+1|0;b=(j>>>0)%3|0?j:b-2|0;f=-1;ba:{if((b|0)==-1){break ba}j=H[r+(b<<2)>>2];f=-1;if((j|0)==-1){break ba}b=j+1|0;f=(b>>>0)%3|0?b:j-2|0}b=f;if((c|0)!=(b|0)){continue}break}}j=-1;if(!(s&1)){break r}break q}H[p>>2]=-1;ca:{if(A){break ca}if((B|0)!=(D|0)){H[D>>2]=n;D=D+4|0;H[i+28>>2]=D;break ca}f=B-w|0;b=f>>2;c=b+1|0;if(c>>>0>=1073741824){break o}a=f>>>1|0;c=f>>>0>=2147483644?1073741823:a>>>0>c>>>0?a:c;if(c){if(c>>>0>=1073741824){break n}a=pa(c<<2)}else{a=0}b=a+(b<<2)|0;H[b>>2]=n;D=b+4|0;if((w|0)!=(B|0)){while(1){b=b-4|0;B=B-4|0;H[b>>2]=H[B>>2];if((w|0)!=(B|0)){continue}break}}B=a+(c<<2)|0;H[i+32>>2]=B;H[i+28>>2]=D;H[i+24>>2]=b;if(w){oa(w)}w=b}H[g>>2]=u;b=e}s=(k|0)<(l|0);if((k|0)!=(l|0)){continue}break}k=l}j=-1;a=H[h+8>>2];if(H[a+28>>2]-H[a+24>>2]>>2>(L|0)){break q}if((d|0)!=(e|0)){u=h+72|0;m=h+60|0;p=h+312|0;while(1){d=d-4|0;o=H[d>>2];H[i+68>>2]=d;da:{ea:{fa:{if(J[h+270>>1]<=513){if(!I[h+364|0]){break ea}b=H[h+360>>2];a=H[h+352>>2]+(b>>>3|0)|0;if(a>>>0>=K[h+356>>2]){break fa}a=I[a|0];H[h+360>>2]=b+1;if(!(a>>>(b&7)&1)){break fa}break ea}if(Ba(p)){break ea}}ga:{ha:{b=H[h+64>>2];c=H[h+68>>2];if((b|0)==c<<5){if((b+1|0)<0){break ha}if(b>>>0<=1073741822){c=c<<6;b=(b&-32)+32|0;a=b>>>0>>0?c:b}else{a=2147483647}pb(m,a);b=H[h+64>>2]}H[h+64>>2]=b+1;c=H[h+60>>2]+(b>>>3&536870908)|0;a=H[c>>2];P=c,Q=Vj(b)&a,H[P>>2]=Q;b=H[h+76>>2];if((b|0)!=H[h+80>>2]){H[b>>2]=o;H[h+76>>2]=b+4;break da}l=H[u>>2];w=b-l|0;c=w>>2;f=c+1|0;if(f>>>0>=1073741824){break ga}a=w>>>1|0;f=w>>>0>=2147483644?1073741823:a>>>0>f>>>0?a:f;if(f){if(f>>>0>=1073741824){break n}a=pa(f<<2)}else{a=0}g=a+(c<<2)|0;H[g>>2]=o;c=g+4|0;if((b|0)!=(l|0)){while(1){g=g-4|0;b=b-4|0;H[g>>2]=H[b>>2];if((b|0)!=(l|0)){continue}break}}H[h+80>>2]=a+(f<<2);H[h+76>>2]=c;H[h+72>>2]=g;if(!l){break da}oa(l);break da}sa();v()}sa();v()}r=H[h+8>>2];A=H[r>>2];if(((H[r+4>>2]-A>>2>>>0)/3|0)<=(k|0)){j=-1;break q}a=-1;j=-1;b=-1;w=H[r+24>>2];f=-1;ia:{if((o|0)==-1){break ia}e=o+1|0;e=(e>>>0)%3|0?e:o-2|0;f=-1;if((e|0)==-1){break ia}f=H[A+(e<<2)>>2]}l=H[w+(f<<2)>>2];ja:{if((l|0)==-1){g=1;e=-1;break ja}g=1;c=l+1|0;c=(c>>>0)%3|0?c:l-2|0;e=-1;if((c|0)==-1){break ja}g=0;a=c;e=a+1|0;e=(e>>>0)%3|0?e:a-2|0;if((e|0)!=-1){e=H[A+(e<<2)>>2]}else{e=-1}}c=H[(e<<2)+w>>2];if((c|0)!=-1){b=c+1|0;b=(b>>>0)%3|0?b:c-2|0}if((a|0)==(o|0)|(b|0)==(o|0)|((o|0)!=-1&H[H[r+12>>2]+(o<<2)>>2]!=-1|(a|0)==(b|0))){break q}if(!g&H[H[r+12>>2]+(a<<2)>>2]!=-1){break q}g=-1;l=H[r+12>>2];w=-1;ka:{if((b|0)==-1){break ka}if(H[l+(b<<2)>>2]!=-1){break q}c=b+1|0;c=(c>>>0)%3|0?c:b-2|0;w=-1;if((c|0)==-1){break ka}w=H[A+(c<<2)>>2]}c=N(k,3);H[i>>2]=c;H[l+(c<<2)>>2]=o;H[l+(o<<2)>>2]=c;c=H[i>>2]+1|0;H[l+(c<<2)>>2]=a;H[l+(a<<2)>>2]=c;a=H[i>>2]+2|0;H[l+(a<<2)>>2]=b;H[l+(b<<2)>>2]=a;a=H[i>>2];H[A+(a<<2)>>2]=e;j=a+1|0;l=A+(j<<2)|0;H[l>>2]=w;w=a+2|0;c=A+(w<<2)|0;H[c>>2]=f;f=H[h+120>>2];e=j?e:-1;b=f+(e>>>3&536870908)|0;a=H[b>>2];P=b,Q=Vj(e)&a,H[P>>2]=Q;g=(j|0)!=-1?H[l>>2]:g;b=f+(g>>>3&536870908)|0;a=H[b>>2];P=b,Q=Vj(g)&a,H[P>>2]=Q;b=-1;b=(w|0)!=-1?H[c>>2]:b;e=f+(b>>>3&536870908)|0;a=H[e>>2];P=e,Q=Vj(b)&a,H[P>>2]=Q;F[i+88|0]=1;_c(m,i+88|0);Ka(u,i);k=k+1|0;e=H[i+64>>2]}if((d|0)!=(e|0)){continue}break}a=H[h+8>>2]}j=-1;if(((H[a+4>>2]-H[a>>2]>>2>>>0)/3|0)!=(k|0)){break q}j=H[a+28>>2]-H[a+24>>2]>>2;s=H[i+24>>2];c=H[i+28>>2];if((s|0)==(c|0)){break p}while(1){k=H[s>>2];d=H[a+24>>2];b=j-1|0;g=d+(b<<2)|0;if(H[g>>2]==-1){while(1){b=j-2|0;j=j-1|0;g=d+(b<<2)|0;if(H[g>>2]==-1){continue}break}}if(b>>>0>=k>>>0){H[i>>2]=a;g=H[g>>2];F[i+12|0]=1;H[i+8>>2]=g;H[i+4>>2]=g;if((g|0)!=-1){while(1){a=H[H[h+8>>2]>>2]+(g<<2)|0;if(H[a>>2]!=(b|0)){j=-1;break q}H[a>>2]=k;uc(i);g=H[i+8>>2];if((g|0)!=-1){continue}break}a=H[h+8>>2]}d=H[a+24>>2];e=d+(b<<2)|0;if((k|0)!=-1){H[d+(k<<2)>>2]=H[e>>2]}H[e>>2]=-1;f=1<>2];e=d+(k>>>3&536870908)|0;k=d+(b>>>3&536870908)|0;d=1<>2]&d){b=f|H[e>>2]}else{b=H[e>>2]&(f^-1)}H[e>>2]=b;H[k>>2]=H[k>>2]&(d^-1);j=j-1|0}s=s+4|0;if((c|0)!=(s|0)){continue}break}}s=H[i+24>>2]}if(s){oa(s)}a=H[i+48>>2];if(a){while(1){d=H[a>>2];oa(a);a=d;if(a){continue}break}}a=H[i+40>>2];H[i+40>>2]=0;if(a){oa(a)}a=H[i+64>>2];if(a){H[i+68>>2]=a;oa(a)}ca=i+96|0;a=j;break m}sa();v()}wa();v()}e=a;if((a|0)==-1){break l}b=H[C+16>>2];d=b+H[C>>2]|0;a=H[C+8>>2]-b|0;b=H[H[h+4>>2]+32>>2];G[b+38>>1]=J[b+38>>1];H[b>>2]=d;H[b+16>>2]=0;H[b+20>>2]=0;H[b+8>>2]=a;H[b+12>>2]=0;b=H[h+4>>2];a=J[b+36>>1];d=a<<8|a>>>8;if((d&65535)>>>0<=513){b=H[b+32>>2];c=b;a=H[b+16>>2];b=M+H[b+20>>2]|0;a=a+y|0;b=a>>>0>>0?b+1|0:b;H[c+16>>2]=a;H[c+20>>2]=b}la:{if(H[h+216>>2]==H[h+220>>2]){break la}a=H[h+8>>2];b=H[a>>2];a=H[a+4>>2];ma:{if((d&65535)>>>0>=513){if((a|0)==(b|0)){break la}d=0;break ma}if((a|0)==(b|0)){break la}d=0;while(1){if(cd(h,d)){d=d+3|0;a=H[h+8>>2];if(d>>>0>2]-H[a>>2]>>2>>>0){continue}break la}break}break l}while(1){if(bd(h,d)){d=d+3|0;a=H[h+8>>2];if(d>>>0>2]-H[a>>2]>>2>>>0){continue}break la}break}break l}ad(O);d=H[h+216>>2];if((d|0)!=H[h+220>>2]){l=0;while(1){c=N(l,144);Jc((c+d|0)+4|0,H[h+8>>2]);a=H[E>>2];b=a+c|0;d=H[b+132>>2];b=H[b+136>>2];if((d|0)!=(b|0)){while(1){Hc((c+H[E>>2]|0)+4|0,H[d>>2]);d=d+4|0;if((b|0)!=(d|0)){continue}break}a=H[E>>2]}if(!Ic((a+c|0)+4|0)){break l}l=l+1|0;d=H[h+216>>2];if(l>>>0<(H[h+220>>2]-d|0)/144>>>0){continue}break}}a=H[h+8>>2];Hb(h+184|0,H[a+28>>2]-H[a+24>>2]>>2);x=H[h+216>>2];if((x|0)!=H[h+220>>2]){d=0;while(1){a=N(d,144)+x|0;b=H[a+60>>2]-H[a+56>>2]>>2;c=a+104|0;a=H[h+8>>2];a=H[a+28>>2]-H[a+24>>2]>>2;Hb(c,(a|0)<(b|0)?b:a);d=d+1|0;x=H[h+216>>2];if(d>>>0<(H[h+220>>2]-x|0)/144>>>0){continue}break}}x=$c(h,e)}break b}x=0}ca=t- -64|0;return x|0}function Bg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,J=0,K=0,L=0,M=0,O=0;B=c;c=0;m=ca-96|0;ca=m;l=m+16|0;ra(l,0,76);H[m+92>>2]=-1;H[m+8>>2]=0;H[m>>2]=0;H[m+4>>2]=0;r=ca-16|0;ca=r;H[l+68>>2]=0;H[l+72>>2]=0;H[l>>2]=b;s=ca-16|0;ca=s;u=b;a=H[b+20>>2];a:{if((H[b+24>>2]-a|0)<=0){break a}a=H[a>>2];if((a|0)==-1){break a}c=H[H[u+8>>2]+(a<<2)>>2]}b:{c:{d:{if(!c){a=0;break d}a=H[u+100>>2];e=H[u+96>>2];H[s+8>>2]=0;H[s>>2]=0;H[s+4>>2]=0;f=a-e|0;b=(f|0)/12|0;e:{if((a|0)==(e|0)){break e}if(b>>>0>=357913942){break c}d=pa(f);H[s>>2]=d;H[s+8>>2]=d+N(b,12);a=0;n=d;f=f-12|0;d=(f-((f>>>0)%12|0)|0)+12|0;f=ra(n,0,d);H[s+4>>2]=d+f;if(I[c+84|0]){c=b>>>0<=1?1:b;h=c&1;if(b>>>0>=2){g=c&-2;c=0;while(1){d=N(a,12);b=d+e|0;i=H[b+4>>2];j=H[b>>2];d=d+f|0;H[d+8>>2]=H[b+8>>2];H[d>>2]=j;H[d+4>>2]=i;d=N(a|1,12);b=d+e|0;i=H[b+4>>2];j=H[b>>2];d=d+f|0;H[d+8>>2]=H[b+8>>2];H[d>>2]=j;H[d+4>>2]=i;a=a+2|0;c=c+2|0;if((g|0)!=(c|0)){continue}break}}if(!h){break e}b=N(a,12);a=b+e|0;c=H[a+4>>2];e=H[a>>2];b=b+f|0;H[b+8>>2]=H[a+8>>2];H[b>>2]=e;H[b+4>>2]=c;break e}h=b>>>0<=1?1:b;a=H[c+68>>2];c=0;while(1){d=N(c,12);b=d+e|0;g=H[a+(H[b>>2]<<2)>>2];i=H[a+(H[b+4>>2]<<2)>>2];d=d+f|0;H[d+8>>2]=H[a+(H[b+8>>2]<<2)>>2];H[d+4>>2]=i;H[d>>2]=g;c=c+1|0;if((h|0)!=(c|0)){continue}break}}d=0;E=ca-16|0;ca=E;h=pa(88);$b(h);C=ca-16|0;ca=C;H[h+80>>2]=0;H[h+84>>2]=0;a=H[h+76>>2];H[h+76>>2]=0;if(a){oa(a)}H[h+68>>2]=0;H[h+72>>2]=0;b=h- -64|0;a=H[b>>2];H[b>>2]=0;if(a){oa(a)}g=H[s+4>>2];b=H[s>>2];c=(g-b|0)/12|0;a=N(c,3);f=H[h>>2];e=H[h+4>>2]-f>>2;f:{if(a>>>0>e>>>0){ue(h,a-e|0);g=H[s+4>>2];b=H[s>>2];c=(g-b|0)/12|0;break f}if(a>>>0>=e>>>0){break f}H[h+4>>2]=f+(a<<2)}g:{if((b|0)==(g|0)){break g}e=c>>>0<=1?1:c;g=e&1;a=H[h>>2];if(c>>>0>=2){i=e&-2;c=0;while(1){e=N(d,12);j=e+a|0;f=b+e|0;H[j>>2]=H[f>>2];H[a+(e|4)>>2]=H[f+4>>2];H[j+8>>2]=H[f+8>>2];f=N(d|1,12);e=f+a|0;f=b+f|0;H[e>>2]=H[f>>2];H[e+4>>2]=H[f+4>>2];H[e+8>>2]=H[f+8>>2];d=d+2|0;c=c+2|0;if((i|0)!=(c|0)){continue}break}}if(!g){break g}c=N(d,12);a=c+a|0;b=b+c|0;H[a>>2]=H[b>>2];H[a+4>>2]=H[b+4>>2];H[a+8>>2]=H[b+8>>2]}H[C+12>>2]=-1;a=0;e=0;g=0;f=ca-32|0;ca=f;h:{i:{w=C+12|0;j:{if(!w){break j}c=H[h+4>>2];j=H[h>>2];d=c-j|0;i=d>>2;n=H[h+12>>2];b=H[h+16>>2]-n>>2;k:{if(i>>>0>b>>>0){qb(h+12|0,i-b|0,13652);c=H[h+4>>2];j=H[h>>2];d=c-j|0;i=d>>2;break k}if(b>>>0<=i>>>0){break k}H[h+16>>2]=n+(i<<2)}H[f+24>>2]=0;H[f+16>>2]=0;H[f+20>>2]=0;b=(c|0)==(j|0);if(!b){if((d|0)<0){break i}e=pa(d);H[f+20>>2]=e;H[f+16>>2]=e;H[f+24>>2]=(i<<2)+e}l:{m:{n:{o:{p:{if(d){while(1){i=H[(a<<2)+j>>2];b=H[f+20>>2]-e>>2;q:{if(i>>>0>>0){break q}H[f>>2]=0;d=i+1|0;if(d>>>0>b>>>0){Pa(f+16|0,d-b|0,f);j=H[h>>2];c=H[h+4>>2];e=H[f+16>>2];break q}if(b>>>0<=d>>>0){break q}H[f+20>>2]=(d<<2)+e}b=(i<<2)+e|0;H[b>>2]=H[b>>2]+1;a=a+1|0;d=c-j|0;i=d>>2;if(a>>>0>>0){continue}break}break p}d=0;if(!b){break o}break n}if((c|0)==(j|0)){d=0;break n}if(d>>>0>=2147483645){break m}}d=pa(d<<1);ra(d,255,i<<3)}H[f+8>>2]=0;H[f>>2]=0;H[f+4>>2]=0;b=H[f+20>>2];a=b-e|0;t=a>>2;r:{s:{if((b|0)==(e|0)){break s}if((a|0)<0){break r}q=pa(a);H[f>>2]=q;H[f+8>>2]=(t<<2)+q;b=ra(q,0,a);H[f+4>>2]=b+a;c=t>>>0<=1?1:t;n=c&3;a=0;if(c-1>>>0>=3){o=c&-4;while(1){c=g<<2;H[c+b>>2]=a;x=c|4;a=H[c+e>>2]+a|0;H[x+b>>2]=a;y=c|8;a=a+H[e+x>>2]|0;H[y+b>>2]=a;c=c|12;a=a+H[e+y>>2]|0;H[c+b>>2]=a;a=a+H[c+e>>2]|0;g=g+4|0;p=p+4|0;if((o|0)!=(p|0)){continue}break}}if(!n){break s}while(1){c=g<<2;H[c+b>>2]=a;g=g+1|0;a=H[c+e>>2]+a|0;k=k+1|0;if((n|0)!=(k|0)){continue}break}}if(!i){break l}x=H[h+40>>2];y=H[h+12>>2];n=0;while(1){G=n<<2;a=G+j|0;k=-1;c=n+1|0;b=(c>>>0)%3|0?c:n-2|0;if((b|0)!=-1){k=H[(b<<2)+j>>2]}b=H[a>>2];t:{u:{if(!((n>>>0)%3|0)){p=-1;a=n+2|0;if((a|0)!=-1){p=H[(a<<2)+j>>2]}if(!((b|0)==(k|0)|(b|0)==(p|0))&(k|0)!=(p|0)){break u}x=x+1|0;H[h+40>>2]=x;c=n+3|0;break t}p=H[a-4>>2]}a=p<<2;A=H[a+e>>2];v:{w:{if((A|0)<=0){break w}a=H[a+q>>2];g=0;while(1){o=(a<<3)+d|0;z=H[o>>2];if((z|0)==-1){break w}x:{if((k|0)!=(z|0)){break x}o=H[o+4>>2];if((o|0)!=-1){z=H[(o<<2)+j>>2]}else{z=-1}if((z|0)==(b|0)){break x}while(1){y:{b=a;g=g+1|0;if((A|0)<=(g|0)){break y}a=b+1|0;J=(a<<3)+d|0;z=H[J>>2];K=(b<<3)+d|0;H[K+4>>2]=H[J+4>>2];H[K>>2]=z;if((z|0)!=-1){continue}}break}H[(b<<3)+d>>2]=-1;if((o|0)==-1){break w}H[y+G>>2]=o;H[y+(o<<2)>>2]=n;break v}a=a+1|0;g=g+1|0;if((A|0)!=(g|0)){continue}break}}a=k<<2;k=H[a+e>>2];if((k|0)<=0){break v}a=H[a+q>>2];g=0;while(1){b=(a<<3)+d|0;if(H[b>>2]==-1){H[b>>2]=p;H[b+4>>2]=n;break v}a=a+1|0;g=g+1|0;if((k|0)!=(g|0)){continue}break}}}n=c;if(n>>>0>>0){continue}break}break l}break i}sa();v()}H[w>>2]=t;if(q){oa(q)}if(d){oa(d)}a=H[f+16>>2];if(!a){break j}H[f+20>>2]=a;oa(a)}ca=f+32|0;x=(w|0)!=0;if(x){k=ca-32|0;ca=k;a=H[h>>2];g=H[h+4>>2];H[k+24>>2]=0;H[k+16>>2]=0;H[k+20>>2]=0;if((a|0)==(g|0)){c=g}else{a=g-a|0;if((a|0)<0){break i}a=a>>2;b=(a-1>>>5|0)+1|0;c=pa(b<<2);H[k+24>>2]=b;H[k+20>>2]=0;H[k+16>>2]=c;Mc(k+16|0,a);g=H[h>>2];c=H[h+4>>2]}H[k+8>>2]=0;H[k>>2]=0;while(1){z:{o=0;i=0;if((c|0)==(g|0)){break z}while(1){b=H[k+16>>2];A:{if(H[b+(i>>>3&536870908)>>2]>>>i&1){break A}c=H[k>>2];H[k+4>>2]=c;e=H[h+12>>2];a=i;while(1){B:{f=a+1|0;d=a;a=(f>>>0)%3|0?f:a-2|0;if((a|0)==-1){break B}a=H[e+(a<<2)>>2];if((a|0)==-1){break B}f=a+1|0;a=(f>>>0)%3|0?f:a-2|0;if((i|0)==(a|0)|(a|0)==-1){break B}if(!(H[b+(a>>>3&536870908)>>2]>>>a&1)){continue}}break}j=d;C:{D:{E:{while(1){a=H[k+16>>2]+(j>>>3&536870908)|0;H[a>>2]=H[a>>2]|1<>>0)%3|0?a:j-2|0;g=H[h>>2];y=(j>>>0)%3|0;b=(y?-1:2)+j|0;n=H[k>>2];A=(n|0)==(c|0);F:{if(A){break F}w=H[(f<<2)+g>>2];q=H[h+12>>2];a=n;if((b|0)!=-1){e=q+(b<<2)|0;while(1){G:{if((w|0)!=H[a>>2]){break G}p=H[a+4>>2];t=H[e>>2];if((p|0)==(t|0)){break G}e=b;c=-1;a=-1;if((p|0)==-1){break C}break D}a=a+8|0;if((c|0)!=(a|0)){continue}break}break F}while(1){if((w|0)==H[a>>2]){t=-1;e=-1;p=H[a+4>>2];if((p|0)!=-1){break D}}a=a+8|0;if((c|0)!=(a|0)){continue}break}}b=H[(b<<2)+g>>2];H:{if(H[k+8>>2]!=(c|0)){H[c>>2]=b;H[c+4>>2]=f;c=c+8|0;H[k+4>>2]=c;break H}a=c-n|0;p=a>>3;e=p+1|0;if(e>>>0>=536870912){break i}g=a>>>2|0;g=a>>>0>=2147483640?536870911:e>>>0>>0?g:e;if(g){if(g>>>0>=536870912){break E}e=pa(g<<3)}else{e=0}a=e+(p<<3)|0;H[a>>2]=b;H[a+4>>2]=f;b=a+8|0;if(!A){while(1){c=c-8|0;f=H[c+4>>2];a=a-8|0;H[a>>2]=H[c>>2];H[a+4>>2]=f;if((c|0)!=(n|0)){continue}break}c=H[k>>2]}H[k+8>>2]=e+(g<<3);H[k+4>>2]=b;H[k>>2]=a;if(c){oa(c)}c=b}I:{J:{if(y){a=j-1|0;break J}a=j+2|0;if((a|0)==-1){break I}}a=H[H[h+12>>2]+(a<<2)>>2];if((a|0)==-1){break I}j=a+((a>>>0)%3|0?-1:2)|0;if((d|0)==(j|0)){break I}if((j|0)!=-1){continue}}break}g=H[h>>2];break A}wa();v()}c=H[q+(p<<2)>>2];b=e;a=p}if((t|0)!=-1){H[q+(t<<2)>>2]=-1}if((c|0)!=-1){H[q+(c<<2)>>2]=-1}H[q+(b<<2)>>2]=-1;H[q+(a<<2)>>2]=-1;o=1}i=i+1|0;c=H[h+4>>2];if(i>>>0>2>>>0){continue}break}if(o){continue}}break}a=H[k>>2];if(a){oa(a)}a=H[k+16>>2];if(a){oa(a)}ca=k+32|0;n=0;g=ca-32|0;ca=g;e=H[C+12>>2];H[h+36>>2]=e;p=h+24|0;b=H[h+24>>2];a=H[h+28>>2]-b>>2;K:{L:{if(a>>>0>>0){qb(p,e-a|0,13652);H[g+24>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;break L}if(a>>>0>e>>>0){H[h+28>>2]=b+(e<<2)}H[g+24>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;if(!e){break K}}if((e|0)<0){break i}a=(e-1>>>5|0)+1|0;b=pa(a<<2);H[g+24>>2]=a;H[g+20>>2]=0;H[g+16>>2]=b;Mc(g+16|0,e)}a=H[h>>2];b=H[h+4>>2];H[g+8>>2]=0;H[g>>2]=0;H[g+4>>2]=0;M:{if((a|0)==(b|0)){a=b}else{a=b-a|0;if((a|0)<0){break i}a=a>>2;b=(a-1>>>5|0)+1|0;c=pa(b<<2);H[g+8>>2]=b;H[g+4>>2]=0;H[g>>2]=c;Mc(g,a);b=H[h>>2];a=H[h+4>>2]}if(a-b>>>0<12){break M}N:{while(1){q=N(n,3);d=(q<<2)+b|0;f=H[d>>2];c=-1;i=q+1|0;if((i|0)!=-1){c=H[(i<<2)+b>>2]}O:{if((c|0)==(f|0)){break O}i=f;f=H[d+8>>2];if((i|0)==(f|0)|(c|0)==(f|0)){break O}k=0;i=H[g>>2];while(1){f=k+q|0;if(!(H[(f>>>3&536870908)+i>>2]>>>f&1)){a=H[(f<<2)+b>>2];c=1<>2];b=a>>>5|0;i=H[d+(b<<2)>>2];t=c&i;if(t){c=H[h+28>>2];P:{if((c|0)!=H[h+32>>2]){H[c>>2]=-1;H[h+28>>2]=c+4;break P}i=H[p>>2];b=c-i|0;o=b>>2;d=o+1|0;if(d>>>0>=1073741824){break i}j=b>>>1|0;j=b>>>0>=2147483644?1073741823:d>>>0>>0?j:d;if(j){if(j>>>0>=1073741824){break N}b=pa(j<<2)}else{b=0}d=b+(o<<2)|0;H[d>>2]=-1;o=d+4|0;if((c|0)!=(i|0)){while(1){d=d-4|0;c=c-4|0;H[d>>2]=H[c>>2];if((c|0)!=(i|0)){continue}break}}H[h+32>>2]=b+(j<<2);H[h+28>>2]=o;H[h+24>>2]=d;if(!i){break P}oa(i)}c=H[h+52>>2];Q:{if((c|0)!=H[h+56>>2]){H[c>>2]=a;H[h+52>>2]=c+4;break Q}i=H[h+48>>2];b=c-i|0;o=b>>2;d=o+1|0;if(d>>>0>=1073741824){break i}j=b>>>1|0;j=b>>>0>=2147483644?1073741823:d>>>0>>0?j:d;if(j){if(j>>>0>=1073741824){break N}b=pa(j<<2)}else{b=0}d=b+(o<<2)|0;H[d>>2]=a;a=d+4|0;if((c|0)!=(i|0)){while(1){d=d-4|0;c=c-4|0;H[d>>2]=H[c>>2];if((c|0)!=(i|0)){continue}break}}H[h+56>>2]=b+(j<<2);H[h+52>>2]=a;H[h+48>>2]=d;if(!i){break Q}oa(i)}c=H[g+20>>2];a=H[g+24>>2];if((c|0)==a<<5){if((c+1|0)<0){break i}b=g+16|0;if(c>>>0<=1073741822){a=a<<6;c=(c&-32)+32|0;a=a>>>0>c>>>0?a:c}else{a=2147483647}pb(b,a);c=H[g+20>>2]}H[g+20>>2]=c+1;d=H[g+16>>2];a=d+(c>>>3&536870908)|0;b=H[a>>2];M=a,O=Vj(c)&b,H[M>>2]=O;c=1<>>5|0;i=H[(b<<2)+d>>2];a=e;e=a+1|0}H[(b<<2)+d>>2]=c|i;o=H[h+24>>2]+(a<<2)|0;j=H[h+12>>2];b=H[h>>2];i=H[g>>2];c=f;R:{S:{T:{while(1){if((c|0)==-1){break T}d=(c>>>3&536870908)+i|0;H[d>>2]=H[d>>2]|1<>2]=c;if(t){H[(c<<2)+b>>2]=a}w=c+1|0;c=(w>>>0)%3|0?w:c-2|0;d=-1;U:{if((c|0)==-1){break U}c=H[j+(c<<2)>>2];d=-1;if((c|0)==-1){break U}d=c+1|0;d=(d>>>0)%3|0?d:c-2|0}c=d;if((f|0)!=(c|0)){continue}break}if((f|0)!=-1){break R}c=1;break S}if((f>>>0)%3|0){c=f-1|0;break S}c=f+2|0;if((c|0)==-1){break R}}c=H[j+(c<<2)>>2];if((c|0)==-1){break R}V:{if((c>>>0)%3|0){c=c-1|0;break V}c=c+2|0;if((c|0)==-1){break R}}f=H[h+12>>2];b=H[h>>2];while(1){d=(c>>>3&536870908)+i|0;H[d>>2]=H[d>>2]|1<>2]=a}W:{if((c>>>0)%3|0){c=c-1|0;break W}c=c+2|0;if((c|0)==-1){break R}}c=H[f+(c<<2)>>2];if((c|0)==-1){break R}c=c+((c>>>0)%3|0?-1:2)|0;if((c|0)!=-1){continue}break}}}k=k+1|0;if((k|0)!=3){continue}break}b=H[h>>2];a=H[h+4>>2]}n=n+1|0;if(n>>>0<(a-b>>2>>>0)/3>>>0){continue}break}break M}wa();v()}c=0;H[h+44>>2]=0;a=H[g+16>>2];b=H[g+20>>2];if(b){e=b&31;b=(b>>>3&536870908)+a|0;d=a;i=0;while(1){if(!(H[d>>2]>>>c&1)){i=i+1|0;H[h+44>>2]=i}f=(c|0)==31;c=f?0:c+1|0;d=(f<<2)+d|0;if((b|0)!=(d|0)|(c|0)!=(e|0)){continue}break}}b=H[g>>2];if(b){oa(b);a=H[g+16>>2]}if(a){oa(a)}ca=g+32|0}ca=C+16|0;if(!x){H[E+8>>2]=0;cb(h);h=0}ca=E+16|0;a=h;break h}sa();v()}b=H[s>>2];if(!b){break d}H[s+4>>2]=b;oa(b)}ca=s+16|0;break b}sa();v()}c=H[l+4>>2];b=a;H[l+4>>2]=a;if(c){cb(c);b=H[l+4>>2]}X:{if(!b){break X}a=H[u+100>>2];c=H[u+96>>2];F[r+12|0]=0;Oa(l+56|0,(a-c|0)/12|0,r+12|0);a=H[u+100>>2];c=H[u+96>>2];if((a|0)==(c|0)){break X}while(1){if(!(H[H[l+56>>2]+(D>>>3&536870908)>>2]>>>D&1)){a=N(D,3);Gc(l,0,a);c=H[l+8>>2];e=H[l+12>>2];Gc(l,1,a+1|0);f=H[l+20>>2];d=H[l+24>>2];Gc(l,2,a+2|0);n=(c|0)==(e|0)?-1:0;a=d-f>>2;c=e-c>>2;e=a>>>0>c>>>0;c=H[l+36>>2]-H[l+32>>2]>>2>>>0>(e?a:c)>>>0?2:e?1:n;Y:{if(H[l+68>>2]<=0){break Y}H[r+12>>2]=H[l+76>>2];H[r+8>>2]=m;bb(r+8|0,r+12|0);a=H[((c<<2)+l|0)+44>>2];if((a|0)<0){a=-1}else{e=(a>>>0)/3|0;a=H[(H[H[l>>2]+96>>2]+N(e,12)|0)+(a-N(e,3)<<2)>>2]}H[r+12>>2]=a;H[r+8>>2]=m;bb(r+8|0,r+12|0);e=H[l+72>>2];H[l+72>>2]=e+2;if(!(e&1)){break Y}H[r+12>>2]=a;H[r+8>>2]=m;bb(r+8|0,r+12|0);H[l+72>>2]=H[l+72>>2]+1}d=0;e=ca-16|0;ca=e;H[l+68>>2]=H[l+68>>2]+1;a=N(c,12)+l|0;a=H[a+12>>2]-H[a+8>>2]|0;if((a|0)>0){a=a>>>2|0;h=a>>>0<=1?1:a;c=H[((c<<2)+l|0)+44>>2];while(1){a=c;f=(a>>>0)/3|0;c=(a|0)==-1;g=c?-1:f;i=H[l+56>>2]+(g>>>3&536870908)|0;H[i>>2]=H[i>>2]|1<>2]=H[l+72>>2]+1;Z:{_:{$:{aa:{ba:{if(!d){ca:{if((a|0)>=0){H[e+12>>2]=H[(H[H[l>>2]+96>>2]+N(f,12)|0)+((a>>>0)%3<<2)>>2];H[e+8>>2]=m;bb(e+8|0,e+12|0);break ca}H[e+12>>2]=-1;H[e+8>>2]=m;bb(e+8|0,e+12|0);if(c){break ba}}c=-1;f=a+1|0;f=(f>>>0)%3|0?f:a-2|0;if((f|0)>=0){g=(f>>>0)/3|0;f=H[(H[H[l>>2]+96>>2]+N(g,12)|0)+(f-N(g,3)<<2)>>2]}else{f=-1}H[e+12>>2]=f;H[e+8>>2]=m;bb(e+8|0,e+12|0);f=((a>>>0)%3|0?-1:2)+a|0;if((f|0)<0){break aa}c=(f>>>0)/3|0;c=H[(H[H[l>>2]+96>>2]+N(c,12)|0)+(f-N(c,3)<<2)>>2];break aa}c=(a|0)<0?-1:H[(H[H[l>>2]+96>>2]+N(f,12)|0)+((a>>>0)%3<<2)>>2];H[l+76>>2]=c;H[e+12>>2]=c;H[e+8>>2]=m;bb(e+8|0,e+12|0);if(d&1){c=-1;if((a|0)==-1){break Z}if((N(f,3)|0)!=(a|0)){a=a-1|0;break _}a=a+2|0;break $}c=-1;if((a|0)==-1){break Z}c=a+1|0;a=(c>>>0)%3|0?c:a-2|0;break $}c=-1;H[e+12>>2]=-1;H[e+8>>2]=m;bb(e+8|0,e+12|0)}H[l+76>>2]=c;H[e+12>>2]=c;H[e+8>>2]=m;bb(e+8|0,e+12|0)}c=-1;if((a|0)==-1){break Z}}c=H[H[H[l+4>>2]+12>>2]+(a<<2)>>2]}d=d+1|0;if((h|0)!=(d|0)){continue}break}}ca=e+16|0;c=H[u+96>>2];a=H[u+100>>2]}D=D+1|0;if(D>>>0<(a-c|0)/12>>>0){continue}break}}ca=r+16|0;da:{if(b){a=H[B>>2];if(a){H[B+4>>2]=a;oa(a)}H[B>>2]=H[m>>2];H[B+4>>2]=H[m+4>>2];H[B+8>>2]=H[m+8>>2];L=H[m+84>>2];break da}a=H[m>>2];if(!a){break da}H[m+4>>2]=a;oa(a)}a=H[m+72>>2];if(a){oa(a)}a=H[m+48>>2];if(a){H[m+52>>2]=a;oa(a)}a=H[m+36>>2];if(a){H[m+40>>2]=a;oa(a)}a=H[m+24>>2];if(a){H[m+28>>2]=a;oa(a)}a=H[m+20>>2];H[m+20>>2]=0;if(a){cb(a)}ca=m+96|0;return L|0}function qg(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;i=b;a=0;b=0;a:{b:{switch(d-1|0){case 0:j=H[i+80>>2];h=I[c+24|0];c:{if((N(j,h)|0)!=(e|0)){break c}d=H[c+28>>2]!=1;b=I[c+84|0];if(!(d|!b)){qa(f,H[H[c>>2]>>2]+H[c+48>>2]|0,e);b=1;break c}if(h){a=pa(h);ra(a,0,h)}d:{if(!j){b=1;break d}if(!d){if(h){d=0;e=0;while(1){i=d+f|0;k=H[H[c>>2]>>2];m=H[c+48>>2];g=H[c+40>>2];b=Rj(g,H[c+44>>2],I[c+84|0]?e:H[H[c+68>>2]+(e<<2)>>2],0);n=b;b=b+m|0;qa(i,qa(a,b+k|0,g),h);d=d+h|0;b=1;e=e+1|0;if((j|0)!=(e|0)){continue}break}break d}if(b){b=1;h=H[c>>2];e=H[c+48>>2];f=H[c+40>>2];i=H[c+44>>2];if((j|0)!=1){g=j&-2;c=0;d=0;while(1){k=H[h>>2];m=Rj(f,i,c,0)+e|0;k=qa(a,k+m|0,f);m=H[h>>2];n=Rj(f,i,c|1,0)+e|0;qa(k,m+n|0,f);c=c+2|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}g=c}if(!(j&1)){break d}c=H[h>>2];d=Rj(g,0,f,i)+e|0;qa(a,c+d|0,f);break d}b=1;h=H[c>>2];e=H[c+48>>2];g=H[c+68>>2];f=H[c+40>>2];i=H[c+44>>2];c=0;if((j|0)!=1){k=j&-2;d=0;while(1){m=H[h>>2];n=c<<2;l=Rj(f,i,H[n+g>>2],0)+e|0;m=qa(a,m+l|0,f);l=H[h>>2];n=Rj(f,i,H[g+(n|4)>>2],0)+e|0;qa(m,l+n|0,f);c=c+2|0;d=d+2|0;if((k|0)!=(d|0)){continue}break}}if(!(j&1)){break d}d=H[h>>2];c=Rj(f,i,H[g+(c<<2)>>2],0)+e|0;qa(a,c+d|0,f);break d}b=0;if(!h){d=0;while(1){if(!ic(c,I[c+84|0]?d:H[H[c+68>>2]+(d<<2)>>2],F[c+24|0],a)){break d}d=d+1|0;b=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}break d}d=0;e=0;while(1){if(!ic(c,I[c+84|0]?e:H[H[c+68>>2]+(e<<2)>>2],F[c+24|0],a)){break d}qa(d+f|0,a,h);d=d+h|0;e=e+1|0;b=j>>>0<=e>>>0;if((e|0)!=(j|0)){continue}break}}if(!a){break c}oa(a)}break a;case 2:n=I[c+24|0];l=n<<1;j=H[i+80>>2];e:{if((N(l,j)|0)!=(e|0)){break e}i=H[c+28>>2]!=3;d=I[c+84|0];if(!(i|!d)){qa(f,H[H[c>>2]>>2]+H[c+48>>2]|0,e);a=1;break e}f:{if(!n){e=0;break f}e=pa(l);ra(e,0,l)}g:{if(!j){a=1;break g}if(!i){o=H[c+68>>2];k=H[c>>2];b=H[c+48>>2];i=H[c+40>>2];m=H[c+44>>2];if(n){if(!d){c=0;d=0;while(1){a=1;g=H[k>>2];p=Rj(i,m,H[o+(d<<2)>>2],0)+b|0;qa((c<<1)+f|0,qa(e,g+p|0,i),l);c=c+n|0;d=d+1|0;if((j|0)!=(d|0)){continue}break}break g}c=0;while(1){a=1;o=H[k>>2];p=Rj(g,h,i,m)+b|0;qa((c<<1)+f|0,qa(e,o+p|0,i),l);c=c+n|0;d=h;g=g+1|0;d=g?d:d+1|0;h=d;if((j|0)!=(g|0)|d){continue}break}break g}if(!d){a=1;c=0;if((j|0)!=1){f=j&-2;d=0;while(1){h=H[k>>2];g=c<<2;n=Rj(i,m,H[g+o>>2],0)+b|0;h=qa(e,h+n|0,i);n=H[k>>2];g=Rj(i,m,H[o+(g|4)>>2],0)+b|0;qa(h,g+n|0,i);c=c+2|0;d=d+2|0;if((f|0)!=(d|0)){continue}break}}if(!(j&1)){break g}d=H[k>>2];b=Rj(i,m,H[o+(c<<2)>>2],0)+b|0;qa(e,b+d|0,i);break g}n=j&1;a=1;if((j|0)!=1){j=j&-2;f=0;c=0;while(1){d=H[k>>2];l=Rj(g,h,i,m)+b|0;d=qa(e,d+l|0,i);l=H[k>>2];o=Rj(i,m,g|1,h)+b|0;qa(d,l+o|0,i);g=g+2|0;h=g>>>0<2?h+1|0:h;f=f+2|0;d=f>>>0<2?c+1|0:c;c=d;if((f|0)!=(j|0)|c){continue}break}}if(!n){break g}c=H[k>>2];b=Rj(g,h,i,m)+b|0;qa(e,b+c|0,i);break g}if(!n){d=0;while(1){if(!gc(c,I[c+84|0]?d:H[H[c+68>>2]+(d<<2)>>2],F[c+24|0],e)){break g}d=d+1|0;a=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}break g}d=0;while(1){if(!gc(c,I[c+84|0]?d:H[H[c+68>>2]+(d<<2)>>2],F[c+24|0],e)){break g}qa((b<<1)+f|0,e,l);b=b+n|0;d=d+1|0;a=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}}if(!e){break e}oa(e)}b=a;break a;case 4:l=I[c+24|0];o=l<<2;j=H[i+80>>2];h:{if((N(o,j)|0)!=(e|0)){break h}i=H[c+28>>2]!=5;d=I[c+84|0];if(!(i|!d)){qa(f,H[H[c>>2]>>2]+H[c+48>>2]|0,e);b=1;break h}i:{if(!l){e=0;break i}e=pa(o);ra(e,0,o)}b=1;j:{if(!j){break j}if(!i){a=H[c+68>>2];m=H[c>>2];i=H[c+48>>2];k=H[c+40>>2];n=H[c+44>>2];if(l){if(!d){c=0;d=0;while(1){g=H[m>>2];p=Rj(k,n,H[a+(d<<2)>>2],0)+i|0;qa((c<<2)+f|0,qa(e,g+p|0,k),o);c=c+l|0;d=d+1|0;if((j|0)!=(d|0)){continue}break}break j}c=0;while(1){d=H[m>>2];p=Rj(g,h,k,n)+i|0;qa((c<<2)+f|0,qa(e,d+p|0,k),o);c=c+l|0;g=g+1|0;a=g?h:h+1|0;h=a;if((j|0)!=(g|0)|h){continue}break}break j}if(!d){c=0;if((j|0)!=1){f=j&-2;d=0;while(1){h=H[m>>2];g=c<<2;l=Rj(k,n,H[g+a>>2],0)+i|0;h=qa(e,h+l|0,k);l=H[m>>2];g=Rj(k,n,H[a+(g|4)>>2],0)+i|0;qa(h,g+l|0,k);c=c+2|0;d=d+2|0;if((f|0)!=(d|0)){continue}break}}if(!(j&1)){break j}d=H[m>>2];a=Rj(k,n,H[a+(c<<2)>>2],0)+i|0;qa(e,a+d|0,k);break j}l=j&1;if((j|0)!=1){j=j&-2;f=0;c=0;while(1){a=H[m>>2];d=Rj(g,h,k,n)+i|0;a=qa(e,a+d|0,k);d=H[m>>2];o=Rj(k,n,g|1,h)+i|0;qa(a,d+o|0,k);d=h;g=g+2|0;h=g>>>0<2?d+1|0:d;f=f+2|0;a=f>>>0<2?c+1|0:c;c=a;if((f|0)!=(j|0)|c){continue}break}}if(!l){break j}a=H[m>>2];c=Rj(g,h,k,n)+i|0;qa(e,a+c|0,k);break j}b=0;if(!l){d=0;while(1){if(!ec(c,I[c+84|0]?d:H[H[c+68>>2]+(d<<2)>>2],F[c+24|0],e)){break j}d=d+1|0;b=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}break j}d=0;while(1){if(!ec(c,I[c+84|0]?d:H[H[c+68>>2]+(d<<2)>>2],F[c+24|0],e)){break j}qa((a<<2)+f|0,e,o);a=a+l|0;d=d+1|0;b=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}}if(!e){break h}oa(e)}break a;case 1:j=H[i+80>>2];h=I[c+24|0];k:{if((N(j,h)|0)!=(e|0)){break k}d=H[c+28>>2]!=2;b=I[c+84|0];if(!(d|!b)){qa(f,H[H[c>>2]>>2]+H[c+48>>2]|0,e);b=1;break k}if(h){a=pa(h);ra(a,0,h)}l:{if(!j){b=1;break l}if(!d){if(h){d=0;e=0;while(1){i=d+f|0;k=H[H[c>>2]>>2];m=H[c+48>>2];g=H[c+40>>2];b=Rj(g,H[c+44>>2],I[c+84|0]?e:H[H[c+68>>2]+(e<<2)>>2],0);n=b;b=b+m|0;qa(i,qa(a,b+k|0,g),h);d=d+h|0;b=1;e=e+1|0;if((j|0)!=(e|0)){continue}break}break l}if(b){b=1;h=H[c>>2];e=H[c+48>>2];f=H[c+40>>2];i=H[c+44>>2];if((j|0)!=1){g=j&-2;c=0;d=0;while(1){k=H[h>>2];m=Rj(f,i,c,0)+e|0;k=qa(a,k+m|0,f);m=H[h>>2];n=Rj(f,i,c|1,0)+e|0;qa(k,m+n|0,f);c=c+2|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}g=c}if(!(j&1)){break l}c=H[h>>2];d=Rj(g,0,f,i)+e|0;qa(a,c+d|0,f);break l}b=1;h=H[c>>2];e=H[c+48>>2];g=H[c+68>>2];f=H[c+40>>2];i=H[c+44>>2];c=0;if((j|0)!=1){k=j&-2;d=0;while(1){m=H[h>>2];n=c<<2;l=Rj(f,i,H[n+g>>2],0)+e|0;m=qa(a,m+l|0,f);l=H[h>>2];n=Rj(f,i,H[g+(n|4)>>2],0)+e|0;qa(m,l+n|0,f);c=c+2|0;d=d+2|0;if((k|0)!=(d|0)){continue}break}}if(!(j&1)){break l}d=H[h>>2];c=Rj(f,i,H[g+(c<<2)>>2],0)+e|0;qa(a,c+d|0,f);break l}b=0;if(!h){d=0;while(1){if(!hc(c,I[c+84|0]?d:H[H[c+68>>2]+(d<<2)>>2],F[c+24|0],a)){break l}d=d+1|0;b=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}break l}d=0;e=0;while(1){if(!hc(c,I[c+84|0]?e:H[H[c+68>>2]+(e<<2)>>2],F[c+24|0],a)){break l}qa(d+f|0,a,h);d=d+h|0;e=e+1|0;b=j>>>0<=e>>>0;if((e|0)!=(j|0)){continue}break}}if(!a){break k}oa(a)}break a;case 3:n=I[c+24|0];l=n<<1;j=H[i+80>>2];m:{if((N(l,j)|0)!=(e|0)){break m}i=H[c+28>>2]!=4;d=I[c+84|0];if(!(i|!d)){qa(f,H[H[c>>2]>>2]+H[c+48>>2]|0,e);a=1;break m}n:{if(!n){e=0;break n}e=pa(l);ra(e,0,l)}o:{if(!j){a=1;break o}if(!i){o=H[c+68>>2];k=H[c>>2];b=H[c+48>>2];i=H[c+40>>2];m=H[c+44>>2];if(n){if(!d){c=0;d=0;while(1){a=1;g=H[k>>2];p=Rj(i,m,H[o+(d<<2)>>2],0)+b|0;qa((c<<1)+f|0,qa(e,g+p|0,i),l);c=c+n|0;d=d+1|0;if((j|0)!=(d|0)){continue}break}break o}c=0;while(1){a=1;o=H[k>>2];p=Rj(g,h,i,m)+b|0;qa((c<<1)+f|0,qa(e,o+p|0,i),l);c=c+n|0;d=h;g=g+1|0;d=g?d:d+1|0;h=d;if((j|0)!=(g|0)|d){continue}break}break o}if(!d){a=1;c=0;if((j|0)!=1){f=j&-2;d=0;while(1){h=H[k>>2];g=c<<2;n=Rj(i,m,H[g+o>>2],0)+b|0;h=qa(e,h+n|0,i);n=H[k>>2];g=Rj(i,m,H[o+(g|4)>>2],0)+b|0;qa(h,g+n|0,i);c=c+2|0;d=d+2|0;if((f|0)!=(d|0)){continue}break}}if(!(j&1)){break o}d=H[k>>2];b=Rj(i,m,H[o+(c<<2)>>2],0)+b|0;qa(e,b+d|0,i);break o}n=j&1;a=1;if((j|0)!=1){j=j&-2;f=0;c=0;while(1){d=H[k>>2];l=Rj(g,h,i,m)+b|0;d=qa(e,d+l|0,i);l=H[k>>2];o=Rj(i,m,g|1,h)+b|0;qa(d,l+o|0,i);g=g+2|0;h=g>>>0<2?h+1|0:h;f=f+2|0;d=f>>>0<2?c+1|0:c;c=d;if((f|0)!=(j|0)|c){continue}break}}if(!n){break o}c=H[k>>2];b=Rj(g,h,i,m)+b|0;qa(e,b+c|0,i);break o}if(!n){d=0;while(1){if(!fc(c,I[c+84|0]?d:H[H[c+68>>2]+(d<<2)>>2],F[c+24|0],e)){break o}d=d+1|0;a=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}break o}d=0;while(1){if(!fc(c,I[c+84|0]?d:H[H[c+68>>2]+(d<<2)>>2],F[c+24|0],e)){break o}qa((b<<1)+f|0,e,l);b=b+n|0;d=d+1|0;a=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}}if(!e){break m}oa(e)}b=a;break a;case 5:l=I[c+24|0];o=l<<2;j=H[i+80>>2];p:{if((N(o,j)|0)!=(e|0)){break p}i=H[c+28>>2]!=6;d=I[c+84|0];if(!(i|!d)){qa(f,H[H[c>>2]>>2]+H[c+48>>2]|0,e);b=1;break p}q:{if(!l){e=0;break q}e=pa(o);ra(e,0,o)}b=1;r:{if(!j){break r}if(!i){a=H[c+68>>2];m=H[c>>2];i=H[c+48>>2];k=H[c+40>>2];n=H[c+44>>2];if(l){if(!d){c=0;d=0;while(1){g=H[m>>2];p=Rj(k,n,H[a+(d<<2)>>2],0)+i|0;qa((c<<2)+f|0,qa(e,g+p|0,k),o);c=c+l|0;d=d+1|0;if((j|0)!=(d|0)){continue}break}break r}c=0;while(1){d=H[m>>2];p=Rj(g,h,k,n)+i|0;qa((c<<2)+f|0,qa(e,d+p|0,k),o);c=c+l|0;g=g+1|0;a=g?h:h+1|0;h=a;if((j|0)!=(g|0)|h){continue}break}break r}if(!d){c=0;if((j|0)!=1){f=j&-2;d=0;while(1){h=H[m>>2];g=c<<2;l=Rj(k,n,H[g+a>>2],0)+i|0;h=qa(e,h+l|0,k);l=H[m>>2];g=Rj(k,n,H[a+(g|4)>>2],0)+i|0;qa(h,g+l|0,k);c=c+2|0;d=d+2|0;if((f|0)!=(d|0)){continue}break}}if(!(j&1)){break r}d=H[m>>2];a=Rj(k,n,H[a+(c<<2)>>2],0)+i|0;qa(e,a+d|0,k);break r}l=j&1;if((j|0)!=1){j=j&-2;f=0;c=0;while(1){a=H[m>>2];d=Rj(g,h,k,n)+i|0;a=qa(e,a+d|0,k);d=H[m>>2];o=Rj(k,n,g|1,h)+i|0;qa(a,d+o|0,k);d=h;g=g+2|0;h=g>>>0<2?d+1|0:d;f=f+2|0;a=f>>>0<2?c+1|0:c;c=a;if((f|0)!=(j|0)|c){continue}break}}if(!l){break r}a=H[m>>2];c=Rj(g,h,k,n)+i|0;qa(e,a+c|0,k);break r}b=0;if(!l){d=0;while(1){if(!dc(c,I[c+84|0]?d:H[H[c+68>>2]+(d<<2)>>2],F[c+24|0],e)){break r}d=d+1|0;b=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}break r}d=0;while(1){if(!dc(c,I[c+84|0]?d:H[H[c+68>>2]+(d<<2)>>2],F[c+24|0],e)){break r}qa((a<<2)+f|0,e,o);a=a+l|0;d=d+1|0;b=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}}if(!e){break p}oa(e)}break a;case 8:p=I[c+24|0];q=p<<2;k=H[i+80>>2];s:{if((N(q,k)|0)!=(e|0)){break s}i=H[c+28>>2];t:{if(!p){break t}a=pa(q);d=a;m=q-4|0;l=(m>>>2|0)+1&7;if(l){e=0;while(1){H[d>>2]=-1073741824;d=d+4|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}if(m>>>0<28){break t}e=(p<<2)+a|0;while(1){H[d+24>>2]=-1073741824;H[d+28>>2]=-1073741824;H[d+16>>2]=-1073741824;H[d+20>>2]=-1073741824;H[d+8>>2]=-1073741824;H[d+12>>2]=-1073741824;H[d>>2]=-1073741824;H[d+4>>2]=-1073741824;d=d+32|0;if((e|0)!=(d|0)){continue}break}}u:{if(!k){b=1;break u}if((i|0)==9){r=H[c+68>>2];l=H[c>>2];i=H[c+48>>2];s=I[c+84|0];m=H[c+44>>2];c=H[c+40>>2];o=c;if(p){e=0;d=0;while(1){h=(e<<2)+f|0;g=H[l>>2];b=Rj(c,m,s?d:H[r+(d<<2)>>2],0)+i|0;qa(h,qa(a,b+g|0,o),q);e=e+p|0;b=1;d=d+1|0;if((k|0)!=(d|0)){continue}break}break u}if(!s){b=1;d=0;if((k|0)!=1){f=k&-2;e=0;while(1){h=H[l>>2];g=d<<2;j=Rj(c,m,H[g+r>>2],0)+i|0;h=qa(a,h+j|0,o);j=H[l>>2];g=Rj(c,m,H[r+(g|4)>>2],0)+i|0;qa(h,j+g|0,o);d=d+2|0;e=e+2|0;if((f|0)!=(e|0)){continue}break}}if(!(k&1)){break u}e=H[l>>2];c=Rj(c,m,H[r+(d<<2)>>2],0)+i|0;qa(a,c+e|0,o);break u}f=k&1;b=1;if((k|0)!=1){k=k&-2;while(1){d=H[l>>2];e=Rj(g,h,c,m)+i|0;d=qa(a,d+e|0,o);e=H[l>>2];p=Rj(c,m,g|1,h)+i|0;qa(d,e+p|0,o);g=g+2|0;h=g>>>0<2?h+1|0:h;d=j;e=n+2|0;d=e>>>0<2?d+1|0:d;n=e;j=d;if((e|0)!=(k|0)|d){continue}break}}if(!f){break u}d=H[l>>2];c=Rj(g,h,c,m)+i|0;qa(a,c+d|0,o);break u}if(!p){d=0;while(1){if(!Va(c,I[c+84|0]?d:H[H[c+68>>2]+(d<<2)>>2],F[c+24|0],a)){break u}d=d+1|0;b=k>>>0<=d>>>0;if((d|0)!=(k|0)){continue}break}break u}e=0;d=0;while(1){if(!Va(c,I[c+84|0]?d:H[H[c+68>>2]+(d<<2)>>2],F[c+24|0],a)){break u}qa((e<<2)+f|0,a,q);e=e+p|0;d=d+1|0;b=k>>>0<=d>>>0;if((d|0)!=(k|0)){continue}break}}if(!a){break s}oa(a)}a=b;break;default:break b}}b=a}return b|0}function ef(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;i=ca-48|0;ca=i;a:{b:{if((c|0)!=1){break b}c=H[a+4>>2];g=H[a+12>>2];H[i+40>>2]=0;a=i;H[a+32>>2]=0;H[a+36>>2]=0;H[a+24>>2]=0;H[a+28>>2]=0;H[a+16>>2]=0;H[a+20>>2]=0;H[a+8>>2]=0;H[a+12>>2]=0;e=a+8|0;c:{if((b|0)==-2){break c}l=H[H[H[c+4>>2]+8>>2]+(g<<2)>>2];if((ea[H[H[c>>2]+8>>2]](c)|0)==1){a=J[c+36>>1];j=(a<<8|a>>>8)&65535;a=0;h=ca-32|0;ca=h;d=H[H[H[c+4>>2]+8>>2]+(g<<2)>>2];d:{if((ea[H[H[c>>2]+8>>2]](c)|0)!=1|b-1>>>0>5){break d}k=ea[H[H[c>>2]+36>>2]](c)|0;f=ea[H[H[c>>2]+44>>2]](c,g)|0;if(!k|!f){break d}a=ea[H[H[c>>2]+40>>2]](c,g)|0;if(a){c=H[c+44>>2];H[h+12>>2]=a;H[h+8>>2]=c;H[h+20>>2]=f;H[h+16>>2]=f+12;c=h+8|0;a=0;e:{f:{switch(b-1|0){case 0:a=pa(60);H[a+4>>2]=d;H[a>>2]=3272;b=H[e+4>>2];H[a+8>>2]=H[e>>2];H[a+12>>2]=b;b=H[e+12>>2];H[a+16>>2]=H[e+8>>2];H[a+20>>2]=b;b=H[e+20>>2];H[a+24>>2]=H[e+16>>2];H[a+28>>2]=b;H[a+40>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;d=H[e+24>>2];f=H[e+28>>2];if((d|0)!=(f|0)){g=f-d|0;if((g|0)<0){break a}b=pa(g);H[a+32>>2]=b;H[a+40>>2]=(g&-4)+b;while(1){H[b>>2]=H[d>>2];b=b+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}H[a+36>>2]=b}b=H[c+4>>2];H[a+44>>2]=H[c>>2];H[a+48>>2]=b;b=H[c+12>>2];H[a+52>>2]=H[c+8>>2];H[a+56>>2]=b;H[a>>2]=2564;break e;case 1:a=pa(60);H[a+4>>2]=d;H[a>>2]=3272;b=H[e+4>>2];H[a+8>>2]=H[e>>2];H[a+12>>2]=b;b=H[e+12>>2];H[a+16>>2]=H[e+8>>2];H[a+20>>2]=b;b=H[e+20>>2];H[a+24>>2]=H[e+16>>2];H[a+28>>2]=b;H[a+40>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;d=H[e+24>>2];f=H[e+28>>2];if((d|0)!=(f|0)){g=f-d|0;if((g|0)<0){break a}b=pa(g);H[a+32>>2]=b;H[a+40>>2]=(g&-4)+b;while(1){H[b>>2]=H[d>>2];b=b+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}H[a+36>>2]=b}b=H[c+4>>2];H[a+44>>2]=H[c>>2];H[a+48>>2]=b;b=H[c+12>>2];H[a+52>>2]=H[c+8>>2];H[a+56>>2]=b;H[a>>2]=3328;break e;case 3:a=pa(112);H[a+4>>2]=d;H[a>>2]=3272;b=H[e+4>>2];H[a+8>>2]=H[e>>2];H[a+12>>2]=b;b=H[e+12>>2];H[a+16>>2]=H[e+8>>2];H[a+20>>2]=b;b=H[e+20>>2];H[a+24>>2]=H[e+16>>2];H[a+28>>2]=b;H[a+40>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;d=H[e+24>>2];f=H[e+28>>2];if((d|0)!=(f|0)){g=f-d|0;if((g|0)<0){break a}b=pa(g);H[a+32>>2]=b;H[a+40>>2]=(g&-4)+b;while(1){H[b>>2]=H[d>>2];b=b+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}H[a+36>>2]=b}b=H[c+4>>2];H[a+44>>2]=H[c>>2];H[a+48>>2]=b;b=H[c+12>>2];H[a+52>>2]=H[c+8>>2];H[a+56>>2]=b;H[a+60>>2]=0;H[a+64>>2]=0;H[a>>2]=3564;H[a+68>>2]=0;H[a+72>>2]=0;H[a+76>>2]=0;H[a+80>>2]=0;H[a+84>>2]=0;H[a+88>>2]=0;H[a+92>>2]=0;H[a+96>>2]=0;H[a+100>>2]=0;H[a+104>>2]=0;H[a+108>>2]=0;break e;case 2:a=pa(92);H[a+4>>2]=d;H[a>>2]=3272;b=H[e+4>>2];H[a+8>>2]=H[e>>2];H[a+12>>2]=b;b=H[e+12>>2];H[a+16>>2]=H[e+8>>2];H[a+20>>2]=b;b=H[e+20>>2];H[a+24>>2]=H[e+16>>2];H[a+28>>2]=b;H[a+40>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;d=H[e+24>>2];f=H[e+28>>2];if((d|0)!=(f|0)){g=f-d|0;if((g|0)<0){break a}b=pa(g);H[a+32>>2]=b;H[a+40>>2]=(g&-4)+b;while(1){H[b>>2]=H[d>>2];b=b+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}H[a+36>>2]=b}b=H[c+4>>2];H[a+44>>2]=H[c>>2];H[a+48>>2]=b;b=H[c+12>>2];H[a+52>>2]=H[c+8>>2];H[a+56>>2]=b;H[a+60>>2]=0;H[a+64>>2]=0;H[a>>2]=3812;H[a+68>>2]=0;H[a+72>>2]=0;H[a+76>>2]=0;H[a+80>>2]=0;H[a+84>>2]=0;H[a+88>>2]=j;break e;case 4:a=pa(104);H[a+4>>2]=d;H[a>>2]=3272;b=H[e+4>>2];H[a+8>>2]=H[e>>2];H[a+12>>2]=b;b=H[e+12>>2];H[a+16>>2]=H[e+8>>2];H[a+20>>2]=b;b=H[e+20>>2];H[a+24>>2]=H[e+16>>2];H[a+28>>2]=b;H[a+40>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;d=H[e+24>>2];f=H[e+28>>2];if((d|0)!=(f|0)){g=f-d|0;if((g|0)<0){break a}b=pa(g);H[a+32>>2]=b;H[a+40>>2]=(g&-4)+b;while(1){H[b>>2]=H[d>>2];b=b+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}H[a+36>>2]=b}b=H[c+4>>2];H[a+44>>2]=H[c>>2];H[a+48>>2]=b;b=H[c+12>>2];H[a+52>>2]=H[c+8>>2];H[a+56>>2]=b;H[a+84>>2]=0;H[a+76>>2]=0;H[a+80>>2]=0;H[a+60>>2]=0;H[a+64>>2]=0;H[a>>2]=4040;b=H[c+4>>2];H[a+88>>2]=H[c>>2];H[a+92>>2]=b;b=H[c+12>>2];H[a+96>>2]=H[c+8>>2];H[a+100>>2]=b;break e;case 5:break f;default:break e}}a=pa(128);H[a+4>>2]=d;H[a>>2]=3272;b=H[e+4>>2];H[a+8>>2]=H[e>>2];H[a+12>>2]=b;b=H[e+12>>2];H[a+16>>2]=H[e+8>>2];H[a+20>>2]=b;b=H[e+20>>2];H[a+24>>2]=H[e+16>>2];H[a+28>>2]=b;H[a+40>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;g:{b=H[e+28>>2];d=H[e+24>>2];if((b|0)!=(d|0)){d=b-d|0;if((d|0)<0){break a}b=pa(d);H[a+36>>2]=b;H[a+32>>2]=b;H[a+40>>2]=(d&-4)+b;d=H[e+24>>2];f=H[e+28>>2];if((d|0)!=(f|0)){while(1){H[b>>2]=H[d>>2];b=b+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}}H[a+36>>2]=b}H[a>>2]=3216;b=H[c+4>>2];H[a+44>>2]=H[c>>2];H[a+48>>2]=b;b=H[c+12>>2];H[a+52>>2]=H[c+8>>2];H[a+56>>2]=b;b=a- -64|0;H[b>>2]=0;H[b+4>>2]=0;H[a+60>>2]=4904;H[a>>2]=4276;b=H[c+4>>2];H[a+72>>2]=H[c>>2];H[a+76>>2]=b;b=H[c+12>>2];H[a+80>>2]=H[c+8>>2];H[a+84>>2]=b;H[a+104>>2]=1065353216;H[a+108>>2]=-1;H[a+96>>2]=-1;H[a+100>>2]=-1;H[a+88>>2]=1;H[a+92>>2]=-1;H[a+60>>2]=4512;H[a+112>>2]=0;H[a+116>>2]=0;F[a+117|0]=0;F[a+118|0]=0;F[a+119|0]=0;F[a+120|0]=0;F[a+121|0]=0;F[a+122|0]=0;F[a+123|0]=0;F[a+124|0]=0;break g}}break d}a=H[c+44>>2];H[h+12>>2]=k;H[h+8>>2]=a;H[h+20>>2]=f;H[h+16>>2]=f+12;c=h+8|0;a=0;h:{i:{switch(b-1|0){case 0:a=pa(60);H[a+4>>2]=d;H[a>>2]=3272;b=H[e+4>>2];H[a+8>>2]=H[e>>2];H[a+12>>2]=b;b=H[e+12>>2];H[a+16>>2]=H[e+8>>2];H[a+20>>2]=b;b=H[e+20>>2];H[a+24>>2]=H[e+16>>2];H[a+28>>2]=b;H[a+40>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;d=H[e+24>>2];f=H[e+28>>2];if((d|0)!=(f|0)){g=f-d|0;if((g|0)<0){break a}b=pa(g);H[a+32>>2]=b;H[a+40>>2]=(g&-4)+b;while(1){H[b>>2]=H[d>>2];b=b+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}H[a+36>>2]=b}b=H[c+4>>2];H[a+44>>2]=H[c>>2];H[a+48>>2]=b;b=H[c+12>>2];H[a+52>>2]=H[c+8>>2];H[a+56>>2]=b;H[a>>2]=4932;break h;case 1:a=pa(60);H[a+4>>2]=d;H[a>>2]=3272;b=H[e+4>>2];H[a+8>>2]=H[e>>2];H[a+12>>2]=b;b=H[e+12>>2];H[a+16>>2]=H[e+8>>2];H[a+20>>2]=b;b=H[e+20>>2];H[a+24>>2]=H[e+16>>2];H[a+28>>2]=b;H[a+40>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;d=H[e+24>>2];f=H[e+28>>2];if((d|0)!=(f|0)){g=f-d|0;if((g|0)<0){break a}b=pa(g);H[a+32>>2]=b;H[a+40>>2]=(g&-4)+b;while(1){H[b>>2]=H[d>>2];b=b+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}H[a+36>>2]=b}b=H[c+4>>2];H[a+44>>2]=H[c>>2];H[a+48>>2]=b;b=H[c+12>>2];H[a+52>>2]=H[c+8>>2];H[a+56>>2]=b;H[a>>2]=5356;break h;case 3:a=pa(112);H[a+4>>2]=d;H[a>>2]=3272;b=H[e+4>>2];H[a+8>>2]=H[e>>2];H[a+12>>2]=b;b=H[e+12>>2];H[a+16>>2]=H[e+8>>2];H[a+20>>2]=b;b=H[e+20>>2];H[a+24>>2]=H[e+16>>2];H[a+28>>2]=b;H[a+40>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;d=H[e+24>>2];f=H[e+28>>2];if((d|0)!=(f|0)){g=f-d|0;if((g|0)<0){break a}b=pa(g);H[a+32>>2]=b;H[a+40>>2]=(g&-4)+b;while(1){H[b>>2]=H[d>>2];b=b+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}H[a+36>>2]=b}b=H[c+4>>2];H[a+44>>2]=H[c>>2];H[a+48>>2]=b;b=H[c+12>>2];H[a+52>>2]=H[c+8>>2];H[a+56>>2]=b;H[a+60>>2]=0;H[a+64>>2]=0;H[a>>2]=5580;H[a+68>>2]=0;H[a+72>>2]=0;H[a+76>>2]=0;H[a+80>>2]=0;H[a+84>>2]=0;H[a+88>>2]=0;H[a+92>>2]=0;H[a+96>>2]=0;H[a+100>>2]=0;H[a+104>>2]=0;H[a+108>>2]=0;break h;case 2:a=pa(92);H[a+4>>2]=d;H[a>>2]=3272;b=H[e+4>>2];H[a+8>>2]=H[e>>2];H[a+12>>2]=b;b=H[e+12>>2];H[a+16>>2]=H[e+8>>2];H[a+20>>2]=b;b=H[e+20>>2];H[a+24>>2]=H[e+16>>2];H[a+28>>2]=b;H[a+40>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;d=H[e+24>>2];f=H[e+28>>2];if((d|0)!=(f|0)){g=f-d|0;if((g|0)<0){break a}b=pa(g);H[a+32>>2]=b;H[a+40>>2]=(g&-4)+b;while(1){H[b>>2]=H[d>>2];b=b+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}H[a+36>>2]=b}b=H[c+4>>2];H[a+44>>2]=H[c>>2];H[a+48>>2]=b;b=H[c+12>>2];H[a+52>>2]=H[c+8>>2];H[a+56>>2]=b;H[a+60>>2]=0;H[a+64>>2]=0;H[a>>2]=5816;H[a+68>>2]=0;H[a+72>>2]=0;H[a+76>>2]=0;H[a+80>>2]=0;H[a+84>>2]=0;H[a+88>>2]=j;break h;case 4:a=pa(104);H[a+4>>2]=d;H[a>>2]=3272;b=H[e+4>>2];H[a+8>>2]=H[e>>2];H[a+12>>2]=b;b=H[e+12>>2];H[a+16>>2]=H[e+8>>2];H[a+20>>2]=b;b=H[e+20>>2];H[a+24>>2]=H[e+16>>2];H[a+28>>2]=b;H[a+40>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;d=H[e+24>>2];f=H[e+28>>2];if((d|0)!=(f|0)){g=f-d|0;if((g|0)<0){break a}b=pa(g);H[a+32>>2]=b;H[a+40>>2]=(g&-4)+b;while(1){H[b>>2]=H[d>>2];b=b+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}H[a+36>>2]=b}b=H[c+4>>2];H[a+44>>2]=H[c>>2];H[a+48>>2]=b;b=H[c+12>>2];H[a+52>>2]=H[c+8>>2];H[a+56>>2]=b;H[a+84>>2]=0;H[a+76>>2]=0;H[a+80>>2]=0;H[a+60>>2]=0;H[a+64>>2]=0;H[a>>2]=6032;b=H[c+4>>2];H[a+88>>2]=H[c>>2];H[a+92>>2]=b;b=H[c+12>>2];H[a+96>>2]=H[c+8>>2];H[a+100>>2]=b;break h;case 5:break i;default:break h}}a=pa(128);H[a+4>>2]=d;H[a>>2]=3272;b=H[e+4>>2];H[a+8>>2]=H[e>>2];H[a+12>>2]=b;b=H[e+12>>2];H[a+16>>2]=H[e+8>>2];H[a+20>>2]=b;b=H[e+20>>2];H[a+24>>2]=H[e+16>>2];H[a+28>>2]=b;H[a+40>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;j:{b=H[e+28>>2];d=H[e+24>>2];if((b|0)!=(d|0)){d=b-d|0;if((d|0)<0){break a}b=pa(d);H[a+36>>2]=b;H[a+32>>2]=b;H[a+40>>2]=(d&-4)+b;d=H[e+24>>2];f=H[e+28>>2];if((d|0)!=(f|0)){while(1){H[b>>2]=H[d>>2];b=b+4|0;d=d+4|0;if((f|0)!=(d|0)){continue}break}}H[a+36>>2]=b}H[a>>2]=5300;b=H[c+4>>2];H[a+44>>2]=H[c>>2];H[a+48>>2]=b;b=H[c+12>>2];H[a+52>>2]=H[c+8>>2];H[a+56>>2]=b;b=a- -64|0;H[b>>2]=0;H[b+4>>2]=0;H[a+60>>2]=6840;H[a>>2]=6256;b=H[c+4>>2];H[a+72>>2]=H[c>>2];H[a+76>>2]=b;b=H[c+12>>2];H[a+80>>2]=H[c+8>>2];H[a+84>>2]=b;H[a+104>>2]=1065353216;H[a+108>>2]=-1;H[a+96>>2]=-1;H[a+100>>2]=-1;H[a+88>>2]=1;H[a+92>>2]=-1;H[a+60>>2]=6476;H[a+112>>2]=0;H[a+116>>2]=0;F[a+117|0]=0;F[a+118|0]=0;F[a+119|0]=0;F[a+120|0]=0;F[a+121|0]=0;F[a+122|0]=0;F[a+123|0]=0;F[a+124|0]=0;break j}}}ca=h+32|0;d=a;if(a){break c}}d=pa(44);H[d+4>>2]=l;H[d>>2]=3272;a=H[e+4>>2];H[d+8>>2]=H[e>>2];H[d+12>>2]=a;a=H[e+12>>2];H[d+16>>2]=H[e+8>>2];H[d+20>>2]=a;a=H[e+20>>2];H[d+24>>2]=H[e+16>>2];H[d+28>>2]=a;H[d+40>>2]=0;H[d+32>>2]=0;H[d+36>>2]=0;c=H[e+24>>2];a=H[e+28>>2];if((c|0)!=(a|0)){b=a-c|0;if((b|0)<0){break a}e=pa(b);H[d+32>>2]=e;H[d+40>>2]=(b&-4)+e;while(1){H[e>>2]=H[c>>2];e=e+4|0;c=c+4|0;if((a|0)!=(c|0)){continue}break}H[d+36>>2]=e}H[d>>2]=6868;break c}e=d;a=H[i+32>>2];if(!a){break b}H[i+36>>2]=a;oa(a)}ca=i+48|0;return e|0}sa();v()}function Ec(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;l=ca-16|0;ca=l;a:{b:{c:{d:{e:{f:{g:{h:{i:{if(a>>>0<=244){g=H[4298];h=a>>>0<11?16:a+11&-8;c=h>>>3|0;b=g>>>c|0;if(b&3){c=c+((b^-1)&1)|0;a=c<<3;b=a+17232|0;d=H[a+17240>>2];a=H[d+8>>2];j:{if((b|0)==(a|0)){m=17192,n=Vj(c)&g,H[m>>2]=n;break j}H[a+12>>2]=b;H[b+8>>2]=a}a=d+8|0;b=c<<3;H[d+4>>2]=b|3;b=b+d|0;H[b+4>>2]=H[b+4>>2]|1;break a}k=H[4300];if(k>>>0>=h>>>0){break i}if(b){a=2<>2];a=H[e+8>>2];k:{if((b|0)==(a|0)){g=Vj(d)&g;H[4298]=g;break k}H[a+12>>2]=b;H[b+8>>2]=a}H[e+4>>2]=h|3;c=e+h|0;a=d<<3;d=a-h|0;H[c+4>>2]=d|1;H[a+e>>2]=d;if(k){b=(k&-8)+17232|0;f=H[4303];a=1<<(k>>>3);l:{if(!(a&g)){H[4298]=a|g;a=b;break l}a=H[b+8>>2]}H[b+8>>2]=f;H[a+12>>2]=f;H[f+12>>2]=b;H[f+8>>2]=a}a=e+8|0;H[4303]=c;H[4300]=d;break a}j=H[4299];if(!j){break i}c=H[(Qj(0-j&j)<<2)+17496>>2];f=(H[c+4>>2]&-8)-h|0;b=c;while(1){m:{a=H[b+16>>2];if(!a){a=H[b+20>>2];if(!a){break m}}b=(H[a+4>>2]&-8)-h|0;d=b>>>0>>0;f=d?b:f;c=d?a:c;b=a;continue}break}i=H[c+24>>2];d=H[c+12>>2];if((d|0)!=(c|0)){a=H[c+8>>2];H[a+12>>2]=d;H[d+8>>2]=a;break b}b=c+20|0;a=H[b>>2];if(!a){a=H[c+16>>2];if(!a){break h}b=c+16|0}while(1){e=b;d=a;b=a+20|0;a=H[b>>2];if(a){continue}b=d+16|0;a=H[d+16>>2];if(a){continue}break}H[e>>2]=0;break b}h=-1;if(a>>>0>4294967231){break i}a=a+11|0;h=a&-8;j=H[4299];if(!j){break i}f=0-h|0;g=0;n:{if(h>>>0<256){break n}g=31;if(h>>>0>16777215){break n}a=Q(a>>>8|0);g=((h>>>38-a&1)-(a<<1)|0)+62|0}b=H[(g<<2)+17496>>2];o:{p:{q:{if(!b){a=0;break q}a=0;c=h<<((g|0)!=31?25-(g>>>1|0)|0:0);while(1){r:{e=(H[b+4>>2]&-8)-h|0;if(e>>>0>=f>>>0){break r}d=b;f=e;if(e){break r}f=0;a=b;break p}e=H[b+20>>2];b=H[((c>>>29&4)+b|0)+16>>2];a=e?(e|0)==(b|0)?a:e:a;c=c<<1;if(b){continue}break}}if(!(a|d)){d=0;a=2<>2]}if(!a){break o}}while(1){b=(H[a+4>>2]&-8)-h|0;c=b>>>0>>0;f=c?b:f;d=c?a:d;b=H[a+16>>2];if(b){a=b}else{a=H[a+20>>2]}if(a){continue}break}}if(!d|H[4300]-h>>>0<=f>>>0){break i}g=H[d+24>>2];c=H[d+12>>2];if((d|0)!=(c|0)){a=H[d+8>>2];H[a+12>>2]=c;H[c+8>>2]=a;break c}b=d+20|0;a=H[b>>2];if(!a){a=H[d+16>>2];if(!a){break g}b=d+16|0}while(1){e=b;c=a;b=a+20|0;a=H[b>>2];if(a){continue}b=c+16|0;a=H[c+16>>2];if(a){continue}break}H[e>>2]=0;break c}a=H[4300];if(a>>>0>=h>>>0){d=H[4303];b=a-h|0;s:{if(b>>>0>=16){c=d+h|0;H[c+4>>2]=b|1;H[a+d>>2]=b;H[d+4>>2]=h|3;break s}H[d+4>>2]=a|3;a=a+d|0;H[a+4>>2]=H[a+4>>2]|1;c=0;b=0}H[4300]=b;H[4303]=c;a=d+8|0;break a}i=H[4301];if(i>>>0>h>>>0){b=i-h|0;H[4301]=b;c=H[4304];a=c+h|0;H[4304]=a;H[a+4>>2]=b|1;H[c+4>>2]=h|3;a=c+8|0;break a}a=0;j=h+47|0;if(H[4416]){c=H[4418]}else{H[4419]=-1;H[4420]=-1;H[4417]=4096;H[4418]=4096;H[4416]=l+12&-16^1431655768;H[4421]=0;H[4409]=0;c=4096}e=j+c|0;f=0-c|0;b=e&f;if(b>>>0<=h>>>0){break a}d=H[4408];if(d){c=H[4406];g=c+b|0;if(d>>>0>>0|c>>>0>=g>>>0){break a}}t:{if(!(I[17636]&4)){u:{v:{w:{x:{d=H[4304];if(d){a=17640;while(1){c=H[a>>2];if(c>>>0<=d>>>0&d>>>0>2]>>>0){break x}a=H[a+8>>2];if(a){continue}break}}c=zb(0);if((c|0)==-1){break u}g=b;d=H[4417];a=d-1|0;if(a&c){g=(b-c|0)+(a+c&0-d)|0}if(g>>>0<=h>>>0){break u}d=H[4408];if(d){a=H[4406];f=a+g|0;if(d>>>0>>0|a>>>0>=f>>>0){break u}}a=zb(g);if((c|0)!=(a|0)){break w}break t}g=f&e-i;c=zb(g);if((c|0)==(H[a>>2]+H[a+4>>2]|0)){break v}a=c}if((a|0)==-1){break u}if(h+48>>>0<=g>>>0){c=a;break t}c=H[4418];c=c+(j-g|0)&0-c;if((zb(c)|0)==-1){break u}g=c+g|0;c=a;break t}if((c|0)!=-1){break t}}H[4409]=H[4409]|4}c=zb(b);a=zb(0);if((c|0)==-1|(a|0)==-1|a>>>0<=c>>>0){break d}g=a-c|0;if(g>>>0<=h+40>>>0){break d}}a=H[4406]+g|0;H[4406]=a;if(a>>>0>K[4407]){H[4407]=a}y:{e=H[4304];if(e){a=17640;while(1){d=H[a>>2];b=H[a+4>>2];if((d+b|0)==(c|0)){break y}a=H[a+8>>2];if(a){continue}break}break f}a=H[4302];if(!(a>>>0<=c>>>0?a:0)){H[4302]=c}a=0;H[4411]=g;H[4410]=c;H[4306]=-1;H[4307]=H[4416];H[4413]=0;while(1){d=a<<3;b=d+17232|0;H[d+17240>>2]=b;H[d+17244>>2]=b;a=a+1|0;if((a|0)!=32){continue}break}d=g-40|0;a=c+8&7?-8-c&7:0;b=d-a|0;H[4301]=b;a=a+c|0;H[4304]=a;H[a+4>>2]=b|1;H[(c+d|0)+4>>2]=40;H[4305]=H[4420];break e}if(I[a+12|0]&8|d>>>0>e>>>0|c>>>0<=e>>>0){break f}H[a+4>>2]=b+g;a=e+8&7?-8-e&7:0;c=a+e|0;H[4304]=c;b=H[4301]+g|0;a=b-a|0;H[4301]=a;H[c+4>>2]=a|1;H[(b+e|0)+4>>2]=40;H[4305]=H[4420];break e}d=0;break b}c=0;break c}if(K[4302]>c>>>0){H[4302]=c}b=c+g|0;a=17640;z:{A:{B:{C:{D:{E:{while(1){if((b|0)!=H[a>>2]){a=H[a+8>>2];if(a){continue}break E}break}if(!(I[a+12|0]&8)){break D}}a=17640;while(1){b=H[a>>2];if(b>>>0<=e>>>0){f=b+H[a+4>>2]|0;if(f>>>0>e>>>0){break C}}a=H[a+8>>2];continue}}H[a>>2]=c;H[a+4>>2]=H[a+4>>2]+g;j=(c+8&7?-8-c&7:0)+c|0;H[j+4>>2]=h|3;g=b+(b+8&7?-8-b&7:0)|0;i=h+j|0;a=g-i|0;if((e|0)==(g|0)){H[4304]=i;a=H[4301]+a|0;H[4301]=a;H[i+4>>2]=a|1;break A}if(H[4303]==(g|0)){H[4303]=i;a=H[4300]+a|0;H[4300]=a;H[i+4>>2]=a|1;H[a+i>>2]=a;break A}f=H[g+4>>2];if((f&3)==1){e=f&-8;F:{if(f>>>0<=255){d=H[g+8>>2];b=f>>>3|0;c=H[g+12>>2];if((c|0)==(d|0)){m=17192,n=H[4298]&Vj(b),H[m>>2]=n;break F}H[d+12>>2]=c;H[c+8>>2]=d;break F}h=H[g+24>>2];c=H[g+12>>2];G:{if((g|0)!=(c|0)){b=H[g+8>>2];H[b+12>>2]=c;H[c+8>>2]=b;break G}H:{f=g+20|0;b=H[f>>2];if(b){break H}f=g+16|0;b=H[f>>2];if(b){break H}c=0;break G}while(1){d=f;c=b;f=c+20|0;b=H[f>>2];if(b){continue}f=c+16|0;b=H[c+16>>2];if(b){continue}break}H[d>>2]=0}if(!h){break F}d=H[g+28>>2];b=(d<<2)+17496|0;I:{if(H[b>>2]==(g|0)){H[b>>2]=c;if(c){break I}m=17196,n=H[4299]&Vj(d),H[m>>2]=n;break F}H[h+(H[h+16>>2]==(g|0)?16:20)>>2]=c;if(!c){break F}}H[c+24>>2]=h;b=H[g+16>>2];if(b){H[c+16>>2]=b;H[b+24>>2]=c}b=H[g+20>>2];if(!b){break F}H[c+20>>2]=b;H[b+24>>2]=c}g=e+g|0;f=H[g+4>>2];a=a+e|0}H[g+4>>2]=f&-2;H[i+4>>2]=a|1;H[a+i>>2]=a;if(a>>>0<=255){b=(a&-8)+17232|0;c=H[4298];a=1<<(a>>>3);J:{if(!(c&a)){H[4298]=a|c;a=b;break J}a=H[b+8>>2]}H[b+8>>2]=i;H[a+12>>2]=i;H[i+12>>2]=b;H[i+8>>2]=a;break A}f=31;if(a>>>0<=16777215){b=Q(a>>>8|0);f=((a>>>38-b&1)-(b<<1)|0)+62|0}H[i+28>>2]=f;H[i+16>>2]=0;H[i+20>>2]=0;b=(f<<2)+17496|0;d=H[4299];c=1<>2]=i;break K}f=a<<((f|0)!=31?25-(f>>>1|0)|0:0);c=H[b>>2];while(1){b=c;if((H[c+4>>2]&-8)==(a|0)){break B}c=f>>>29|0;f=f<<1;d=(c&4)+b|0;c=H[d+16>>2];if(c){continue}break}H[d+16>>2]=i}H[i+24>>2]=b;H[i+12>>2]=i;H[i+8>>2]=i;break A}d=g-40|0;a=c+8&7?-8-c&7:0;b=d-a|0;H[4301]=b;a=a+c|0;H[4304]=a;H[a+4>>2]=b|1;H[(c+d|0)+4>>2]=40;H[4305]=H[4420];a=(f+(f-39&7?39-f&7:0)|0)-47|0;d=a>>>0>>0?e:a;H[d+4>>2]=27;a=H[4413];H[d+16>>2]=H[4412];H[d+20>>2]=a;a=H[4411];H[d+8>>2]=H[4410];H[d+12>>2]=a;H[4412]=d+8;H[4411]=g;H[4410]=c;H[4413]=0;a=d+24|0;while(1){H[a+4>>2]=7;b=a+8|0;a=a+4|0;if(b>>>0>>0){continue}break}if((d|0)==(e|0)){break e}H[d+4>>2]=H[d+4>>2]&-2;f=d-e|0;H[e+4>>2]=f|1;H[d>>2]=f;if(f>>>0<=255){b=(f&-8)+17232|0;c=H[4298];a=1<<(f>>>3);L:{if(!(c&a)){H[4298]=a|c;a=b;break L}a=H[b+8>>2]}H[b+8>>2]=e;H[a+12>>2]=e;H[e+12>>2]=b;H[e+8>>2]=a;break e}a=31;if(f>>>0<=16777215){a=Q(f>>>8|0);a=((f>>>38-a&1)-(a<<1)|0)+62|0}H[e+28>>2]=a;H[e+16>>2]=0;H[e+20>>2]=0;b=(a<<2)+17496|0;d=H[4299];c=1<>2]=e;break M}a=f<<((a|0)!=31?25-(a>>>1|0)|0:0);d=H[b>>2];while(1){b=d;if((f|0)==(H[b+4>>2]&-8)){break z}c=a>>>29|0;a=a<<1;c=(c&4)+b|0;d=H[c+16>>2];if(d){continue}break}H[c+16>>2]=e}H[e+24>>2]=b;H[e+12>>2]=e;H[e+8>>2]=e;break e}a=H[b+8>>2];H[a+12>>2]=i;H[b+8>>2]=i;H[i+24>>2]=0;H[i+12>>2]=b;H[i+8>>2]=a}a=j+8|0;break a}a=H[b+8>>2];H[a+12>>2]=e;H[b+8>>2]=e;H[e+24>>2]=0;H[e+12>>2]=b;H[e+8>>2]=a}a=H[4301];if(a>>>0<=h>>>0){break d}b=a-h|0;H[4301]=b;c=H[4304];a=c+h|0;H[4304]=a;H[a+4>>2]=b|1;H[c+4>>2]=h|3;a=c+8|0;break a}H[3992]=48;a=0;break a}N:{if(!g){break N}b=H[d+28>>2];a=(b<<2)+17496|0;O:{if(H[a>>2]==(d|0)){H[a>>2]=c;if(c){break O}j=Vj(b)&j;H[4299]=j;break N}H[g+(H[g+16>>2]==(d|0)?16:20)>>2]=c;if(!c){break N}}H[c+24>>2]=g;a=H[d+16>>2];if(a){H[c+16>>2]=a;H[a+24>>2]=c}a=H[d+20>>2];if(!a){break N}H[c+20>>2]=a;H[a+24>>2]=c}P:{if(f>>>0<=15){a=f+h|0;H[d+4>>2]=a|3;a=a+d|0;H[a+4>>2]=H[a+4>>2]|1;break P}H[d+4>>2]=h|3;e=d+h|0;H[e+4>>2]=f|1;H[e+f>>2]=f;if(f>>>0<=255){b=(f&-8)+17232|0;c=H[4298];a=1<<(f>>>3);Q:{if(!(c&a)){H[4298]=a|c;a=b;break Q}a=H[b+8>>2]}H[b+8>>2]=e;H[a+12>>2]=e;H[e+12>>2]=b;H[e+8>>2]=a;break P}a=31;if(f>>>0<=16777215){a=Q(f>>>8|0);a=((f>>>38-a&1)-(a<<1)|0)+62|0}H[e+28>>2]=a;H[e+16>>2]=0;H[e+20>>2]=0;b=(a<<2)+17496|0;R:{c=1<>2]=e;break S}a=f<<((a|0)!=31?25-(a>>>1|0)|0:0);h=H[b>>2];while(1){b=h;if((H[b+4>>2]&-8)==(f|0)){break R}c=a>>>29|0;a=a<<1;c=(c&4)+b|0;h=H[c+16>>2];if(h){continue}break}H[c+16>>2]=e}H[e+24>>2]=b;H[e+12>>2]=e;H[e+8>>2]=e;break P}a=H[b+8>>2];H[a+12>>2]=e;H[b+8>>2]=e;H[e+24>>2]=0;H[e+12>>2]=b;H[e+8>>2]=a}a=d+8|0;break a}T:{if(!i){break T}b=H[c+28>>2];a=(b<<2)+17496|0;U:{if(H[a>>2]==(c|0)){H[a>>2]=d;if(d){break U}m=17196,n=Vj(b)&j,H[m>>2]=n;break T}H[i+(H[i+16>>2]==(c|0)?16:20)>>2]=d;if(!d){break T}}H[d+24>>2]=i;a=H[c+16>>2];if(a){H[d+16>>2]=a;H[a+24>>2]=d}a=H[c+20>>2];if(!a){break T}H[d+20>>2]=a;H[a+24>>2]=d}V:{if(f>>>0<=15){a=f+h|0;H[c+4>>2]=a|3;a=a+c|0;H[a+4>>2]=H[a+4>>2]|1;break V}H[c+4>>2]=h|3;d=c+h|0;H[d+4>>2]=f|1;H[d+f>>2]=f;if(k){b=(k&-8)+17232|0;e=H[4303];a=1<<(k>>>3);W:{if(!(a&g)){H[4298]=a|g;a=b;break W}a=H[b+8>>2]}H[b+8>>2]=e;H[a+12>>2]=e;H[e+12>>2]=b;H[e+8>>2]=a}H[4303]=d;H[4300]=f}a=c+8|0}ca=l+16|0;return a|0}function ce(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0;m=ca-32|0;ca=m;o=pa(12);H[o+8>>2]=0;H[o+4>>2]=b;H[o>>2]=0;s=o+12|0;b=s;a:{b:{c:{while(1){b=b-12|0;w=H[b+8>>2];j=H[b+4>>2];t=H[b>>2];if(t){if((w|0)>1e3){break a}H[m+24>>2]=0;H[m+16>>2]=0;H[m+20>>2]=0;d=1;c=H[a>>2];e=H[c+8>>2];h=H[c+12>>2];g=H[c+20>>2];f=H[c+16>>2];d:{if((h|0)<=(g|0)&f>>>0>=e>>>0|(g|0)>(h|0)){break d}e=I[f+H[c>>2]|0];h=c;c=g;f=f+1|0;c=f?c:c+1|0;H[h+16>>2]=f;H[h+20>>2]=c;Cc(m+16|0,e);if(e){c=H[a>>2];n=Dc(m+16|0);p=H[c+8>>2];g=H[c+12>>2];h=H[c+20>>2];f=H[c+16>>2];k=f+e|0;h=k>>>0>>0?h+1|0:h;if((g|0)<=(h|0)&k>>>0>p>>>0|(g|0)<(h|0)){break d}qa(n,f+H[c>>2]|0,e);d=H[c+20>>2];f=e;e=e+H[c+16>>2]|0;d=f>>>0>e>>>0?d+1|0:d;H[c+16>>2]=e;H[c+20>>2]=d}j=pa(24);c=j;H[c+4>>2]=0;H[c+8>>2]=0;c=c+16|0;H[c>>2]=0;H[c+4>>2]=0;H[j>>2]=j+4;H[j+12>>2]=c;e=ca-32|0;ca=e;h=t+12|0;c=m+16|0;u=nb(h,c);i=t+16|0;e:{if((u|0)==(i|0)){H[e+16>>2]=c;f:{g:{d=H[h+4>>2];h:{if(!d){f=h+4|0;c=f;break h}f=I[c+11|0];g=f<<24>>24<0;n=g?H[c>>2]:c;g=g?H[c+4>>2]:f;while(1){c=d;d=I[c+27|0];f=d<<24>>24<0;d=f?H[c+20>>2]:d;p=d>>>0>>0;i:{j:{k:{l:{k=p?d:g;m:{if(k){f=f?H[c+16>>2]:c+16|0;q=Fa(n,f,k);if(!q){if(d>>>0>g>>>0){break m}break l}if((q|0)>=0){break l}break m}if(d>>>0<=g>>>0){break k}}f=c;d=H[c>>2];if(d){continue}break h}d=Fa(f,n,k);if(d){break j}}if(p){break i}break g}if((d|0)>=0){break g}}d=H[c+4>>2];if(d){continue}break}f=c+4|0}d=pa(32);n=d+16|0;g=H[e+16>>2];n:{if(F[g+11|0]>=0){p=H[g+4>>2];H[n>>2]=H[g>>2];H[n+4>>2]=p;H[n+8>>2]=H[g+8>>2];break n}za(n,H[g>>2],H[g+4>>2])}H[d+8>>2]=c;H[d>>2]=0;H[d+4>>2]=0;H[d+28>>2]=0;H[f>>2]=d;c=d;g=H[H[h>>2]>>2];if(g){H[h>>2]=g;c=H[f>>2]}Sb(H[h+4>>2],c);H[h+8>>2]=H[h+8>>2]+1;c=1;break f}d=c;c=0}F[e+28|0]=c;H[e+24>>2]=d;d=H[e+24>>2];c=H[d+28>>2];H[d+28>>2]=j;if(!c){break e}Ra(c+12|0,H[c+16>>2]);Qa(c,H[c+4>>2]);oa(c);break e}if(!j){break e}Ra(j+12|0,H[j+16>>2]);Qa(j,H[j+4>>2]);oa(j)}ca=e+32|0;d=(i|0)!=(u|0)}if(F[m+27|0]<0){oa(H[m+16>>2])}if(d){break a}}if(!j){break a}H[m+16>>2]=0;if(!Bb(1,m+16|0,H[a>>2])){break a}q=0;x=H[m+16>>2];if(x){while(1){d=0;i=ca-32|0;ca=i;H[i+24>>2]=0;H[i+16>>2]=0;H[i+20>>2]=0;c=H[a>>2];f=H[c+8>>2];o:{p:{h=H[c+12>>2];g=H[c+20>>2];e=H[c+16>>2];q:{if((h|0)<=(g|0)&e>>>0>=f>>>0|(g|0)>(h|0)){break q}f=I[e+H[c>>2]|0];h=c;c=g;e=e+1|0;c=e?c:c+1|0;H[h+16>>2]=e;H[h+20>>2]=c;Cc(i+16|0,f);if(f){e=H[a>>2];n=Dc(i+16|0);p=H[e+8>>2];g=H[e+12>>2];c=H[e+20>>2];h=H[e+16>>2];k=h+f|0;c=k>>>0>>0?c+1|0:c;if(k>>>0>p>>>0&(c|0)>=(g|0)|(c|0)>(g|0)){break q}qa(n,h+H[e>>2]|0,f);c=H[e+20>>2];g=f;f=f+H[e+16>>2]|0;c=g>>>0>f>>>0?c+1|0:c;H[e+16>>2]=f;H[e+20>>2]=c}H[i+12>>2]=0;if(!Bb(1,i+12|0,H[a>>2])){break q}f=H[i+12>>2];if(!f){break q}e=H[a>>2];c=H[e+8>>2];h=H[e+16>>2];g=c-h|0;c=H[e+12>>2]-(H[e+20>>2]+(c>>>0>>0)|0)|0;if((c|0)<=0&f>>>0>g>>>0|(c|0)<0){break q}H[i+8>>2]=0;H[i>>2]=0;H[i+4>>2]=0;if((f|0)<0){break p}d=pa(f);H[i>>2]=d;c=d+f|0;H[i+8>>2]=c;l=ra(d,0,f);H[i+4>>2]=c;h=H[e+12>>2];y=h;p=H[e+8>>2];c=H[e+20>>2];k=H[e+16>>2];g=f+k|0;c=g>>>0>>0?c+1|0:c;u=g;n=c;r:{if((c|0)<=(h|0)&g>>>0<=p>>>0|(c|0)<(h|0)){qa(l,H[e>>2]+k|0,f);d=H[e+20>>2];c=f+H[e+16>>2]|0;d=c>>>0>>0?d+1|0:d;H[e+16>>2]=c;H[e+20>>2]=d;h=ca-48|0;ca=h;e=nb(j,i+16|0);if((e|0)!=(j+4|0)){c=H[e+4>>2];s:{if(!c){c=e;while(1){d=H[c+8>>2];f=H[d>>2]!=(c|0);c=d;if(f){continue}break}break s}while(1){d=c;c=H[c>>2];if(c){continue}break}}if((e|0)==H[j>>2]){H[j>>2]=d}H[j+8>>2]=H[j+8>>2]-1;f=H[j+4>>2];t:{u:{g=e;d=e;e=H[d>>2];if(e){c=H[g+4>>2];if(!c){break u}while(1){d=c;c=H[c>>2];if(c){continue}break}}e=H[d+4>>2];if(e){break u}e=0;k=1;break t}H[e+8>>2]=H[d+8>>2];k=0}l=H[d+8>>2];c=H[l>>2];v:{if((d|0)==(c|0)){H[l>>2]=e;if((d|0)==(f|0)){c=0;f=e;break v}c=H[l+4>>2];break v}H[l+4>>2]=e}r=!I[d+12|0];if((d|0)!=(g|0)){l=H[g+8>>2];H[d+8>>2]=l;H[l+(((g|0)!=H[H[g+8>>2]>>2])<<2)>>2]=d;l=H[g>>2];H[d>>2]=l;H[l+8>>2]=d;l=H[g+4>>2];H[d+4>>2]=l;if(l){H[l+8>>2]=d}F[d+12|0]=I[g+12|0];f=(f|0)==(g|0)?d:f}w:{if(r|!f){break w}if(k){while(1){e=I[c+12|0];x:{d=H[c+8>>2];if(H[d>>2]!=(c|0)){if(!e){F[c+12|0]=1;F[d+12|0]=0;e=H[d+4>>2];k=H[e>>2];H[d+4>>2]=k;if(k){H[k+8>>2]=d}H[e+8>>2]=H[d+8>>2];k=H[d+8>>2];H[(((d|0)!=H[k>>2])<<2)+k>>2]=e;H[e>>2]=d;H[d+8>>2]=e;d=c;c=H[c>>2];f=(c|0)==(f|0)?d:f;c=H[c+4>>2]}y:{z:{d=H[c>>2];A:{if(!(I[d+12|0]?0:d)){e=H[c+4>>2];if(I[e+12|0]?0:e){break A}F[c+12|0]=0;c=H[c+8>>2];B:{if((f|0)==(c|0)){c=f;break B}if(I[c+12|0]){break x}}F[c+12|0]=1;break w}e=H[c+4>>2];if(!e){break z}}if(I[e+12|0]){break z}d=c;break y}F[d+12|0]=1;F[c+12|0]=0;e=H[d+4>>2];H[c>>2]=e;if(e){H[e+8>>2]=c}H[d+8>>2]=H[c+8>>2];e=H[c+8>>2];H[((H[e>>2]!=(c|0))<<2)+e>>2]=d;H[d+4>>2]=c;H[c+8>>2]=d;e=c}c=H[d+8>>2];F[d+12|0]=I[c+12|0];F[c+12|0]=1;F[e+12|0]=1;d=H[c+4>>2];e=H[d>>2];H[c+4>>2]=e;if(e){H[e+8>>2]=c}H[d+8>>2]=H[c+8>>2];e=H[c+8>>2];H[(((c|0)!=H[e>>2])<<2)+e>>2]=d;H[d>>2]=c;H[c+8>>2]=d;break w}if(!e){F[c+12|0]=1;F[d+12|0]=0;e=H[c+4>>2];H[d>>2]=e;if(e){H[e+8>>2]=d}H[c+8>>2]=H[d+8>>2];e=H[d+8>>2];H[(((d|0)!=H[e>>2])<<2)+e>>2]=c;H[c+4>>2]=d;H[d+8>>2]=c;f=(d|0)==(f|0)?c:f;c=H[d>>2]}e=H[c>>2];C:{if(!(!e|I[e+12|0])){d=c;break C}d=H[c+4>>2];if(!(I[d+12|0]?0:d)){F[c+12|0]=0;c=H[c+8>>2];if((c|0)!=(f|0)?I[c+12|0]:0){break x}F[c+12|0]=1;break w}if(e){if(!I[e+12|0]){d=c;break C}d=H[c+4>>2]}F[d+12|0]=1;F[c+12|0]=0;e=H[d>>2];H[c+4>>2]=e;if(e){H[e+8>>2]=c}H[d+8>>2]=H[c+8>>2];e=H[c+8>>2];H[((H[e>>2]!=(c|0))<<2)+e>>2]=d;H[d>>2]=c;H[c+8>>2]=d;e=c}c=H[d+8>>2];F[d+12|0]=I[c+12|0];F[c+12|0]=1;F[e+12|0]=1;d=H[c>>2];e=H[d+4>>2];H[c>>2]=e;if(e){H[e+8>>2]=c}H[d+8>>2]=H[c+8>>2];e=H[c+8>>2];H[(((c|0)!=H[e>>2])<<2)+e>>2]=d;H[d+4>>2]=c;H[c+8>>2]=d;break w}d=c;c=H[c+8>>2];c=H[(((d|0)==H[c>>2])<<2)+c>>2];continue}}F[e+12|0]=1}c=H[g+28>>2];if(c){H[g+32>>2]=c;oa(c)}if(F[g+27|0]<0){oa(H[g+16>>2])}oa(g)}H[h+8>>2]=0;H[h>>2]=0;H[h+4>>2]=0;c=H[i+4>>2];d=H[i>>2];f=c-d|0;e=0;D:{E:{if((c|0)!=(d|0)){if((f|0)<0){break E}e=pa(f);c=ra(e,0,f);g=c+f|0;H[h+8>>2]=g;H[h+4>>2]=g;H[h>>2]=c;c=d}qa(e,c,f);F:{if(F[i+27|0]>=0){H[h+24>>2]=H[i+24>>2];c=H[i+20>>2];H[h+16>>2]=H[i+16>>2];H[h+20>>2]=c;break F}za(h+16|0,H[i+16>>2],H[i+20>>2])}ae(h+28|0,h);f=h+16|0;c=f;G:{H:{d=H[j+4>>2];I:{if(!d){e=j+4|0;c=e;break I}e=I[c+11|0];g=e<<24>>24<0;k=g?H[c>>2]:c;g=g?H[c+4>>2]:e;while(1){c=d;d=I[c+27|0];e=d<<24>>24<0;d=e?H[c+20>>2]:d;l=d>>>0>>0;J:{K:{L:{M:{r=l?d:g;N:{if(r){e=e?H[c+16>>2]:c+16|0;z=Fa(k,e,r);if(!z){if(d>>>0>g>>>0){break N}break M}if((z|0)>=0){break M}break N}if(d>>>0<=g>>>0){break L}}e=c;d=H[c>>2];if(d){continue}break I}d=Fa(e,k,r);if(d){break K}}if(l){break J}break H}if((d|0)>=0){break H}}d=H[c+4>>2];if(d){continue}break}e=c+4|0}d=pa(40);H[d+24>>2]=H[f+8>>2];g=H[f+4>>2];H[d+16>>2]=H[f>>2];H[d+20>>2]=g;H[f>>2]=0;H[f+4>>2]=0;H[f+8>>2]=0;ae(d+28|0,f+12|0);H[d+8>>2]=c;H[d>>2]=0;H[d+4>>2]=0;H[e>>2]=d;c=d;f=H[H[j>>2]>>2];if(f){H[j>>2]=f;c=H[e>>2]}Sb(H[j+4>>2],c);H[j+8>>2]=H[j+8>>2]+1;c=1;break G}d=c;c=0}F[h+44|0]=c;H[h+40>>2]=d;c=H[h+28>>2];if(c){H[h+32>>2]=c;oa(c)}if(F[h+27|0]<0){oa(H[h+16>>2])}c=H[h>>2];if(c){H[h+4>>2]=c;oa(c)}ca=h+48|0;break D}sa();v()}d=H[i>>2];if(!d){break r}}H[i+4>>2]=d;oa(d)}d=(n|0)<=(y|0)&p>>>0>=u>>>0|(n|0)<(y|0)}if(F[i+27|0]<0){oa(H[i+16>>2])}ca=i+32|0;break o}sa();v()}if(!d){break a}q=q+1|0;if((x|0)!=(q|0)){continue}break}}H[m+12>>2]=0;if(!Bb(1,m+12|0,H[a>>2])){break a}c=H[a>>2];e=H[c+8>>2];f=H[c+16>>2];h=e-f|0;d=H[m+12>>2];c=H[c+12>>2]-(H[c+20>>2]+(e>>>0>>0)|0)|0;if(h>>>0>>0&(c|0)<=0|(c|0)<0){break a}if(d){q=0;h=((t|0)!=0)+w|0;while(1){O:{if(b>>>0>>0){H[b+8>>2]=h;H[b+4>>2]=0;H[b>>2]=j;b=b+12|0;d=H[m+12>>2];break O}c=b-o|0;g=(c|0)/12|0;b=g+1|0;if(b>>>0>=357913942){break c}e=(s-o|0)/12|0;f=e<<1;e=e>>>0>=178956970?357913941:b>>>0>>0?f:b;if(e){if(e>>>0>=357913942){break b}f=pa(N(e,12))}else{f=0}b=f+N(g,12)|0;H[b+8>>2]=h;H[b+4>>2]=0;H[b>>2]=j;c=va(b+N((c|0)/-12|0,12)|0,o,c);s=f+N(e,12)|0;b=b+12|0;if(o){oa(o)}o=c}q=q+1|0;if(q>>>0>>0){continue}break}}if((b|0)!=(o|0)){continue}break}A=1;break a}sa();v()}wa();v()}if(o){oa(o)}ca=m+32|0;return A}function Af(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=O(0),q=0,r=0;e=ca-720|0;ca=e;a:{b:{c:{d:{e:{f:{g:{h:{i:{if(J[b+38>>1]>=515){H[e+680>>2]=0;H[e+672>>2]=0;H[e+676>>2]=0;if((ea[H[H[a>>2]+24>>2]](a)|0)<=0){break d}while(1){c=ea[H[H[a>>2]+20>>2]](a,n)|0;d=H[H[H[(ea[H[H[a>>2]+28>>2]](a)|0)+4>>2]+8>>2]+(c<<2)>>2];if(H[d+28>>2]==9){f=H[e+672>>2];c=H[e+676>>2]-f>>2;k=I[d+24|0];j:{if(c>>>0>>0){ya(e+672|0,k-c|0);break j}if(c>>>0<=k>>>0){break j}H[e+676>>2]=f+(k<<2)}j=0;i=H[b+8>>2];h=H[b+12>>2];c=H[b+20>>2];d=k<<2;f=H[b+16>>2];l=f+d|0;c=d>>>0>l>>>0?c+1|0:c;if(i>>>0>>0&(c|0)>=(h|0)|(c|0)>(h|0)){break b}qa(H[e+672>>2],f+H[b>>2]|0,d);c=H[b+20>>2];f=d;d=d+H[b+16>>2]|0;c=f>>>0>d>>>0?c+1|0:c;i=d;H[b+16>>2]=d;H[b+20>>2]=c;l=H[b+12>>2];g=H[b+8>>2];h=d+4|0;f=h>>>0<4?c+1|0:c;d=f;if(g>>>0>>0&(d|0)>=(l|0)|(d|0)>(l|0)){break b}o=H[b>>2];f=o+i|0;f=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);H[b+16>>2]=h;H[b+20>>2]=d;if(g>>>0<=h>>>0&(d|0)>=(l|0)|(d|0)>(l|0)){break b}d=I[h+o|0];h=i+5|0;c=h>>>0<5?c+1|0:c;H[b+16>>2]=h;H[b+20>>2]=c;if(d>>>0>31){break b}p=(A(2,f),B());H[e+20>>2]=-1;H[e+16>>2]=1832;H[e+32>>2]=0;H[e+36>>2]=0;H[e+24>>2]=0;H[e+28>>2]=0;c=H[e+672>>2];o=d-1|0;if(o>>>0<=29){H[e+20>>2]=d;k:{h=c+(k<<2)|0;l=h-c|0;f=l>>2;i=H[e+32>>2];d=H[e+24>>2];if(f>>>0<=i-d>>2>>>0){i=H[e+28>>2]-d|0;l=i>>2;i=f>>>0>l>>>0?c+i|0:h;g=i-c|0;if((c|0)!=(i|0)){va(d,c,g)}if(f>>>0>l>>>0){c=h-i|0;d=H[e+28>>2];if((h|0)!=(i|0)){va(d,i,c)}H[e+28>>2]=c+d;break k}H[e+28>>2]=d+g;break k}if(d){H[e+28>>2]=d;oa(d);H[e+32>>2]=0;H[e+24>>2]=0;H[e+28>>2]=0;i=0}l:{if((l|0)<0){break l}d=i>>>1|0;d=i>>>0>=2147483644?1073741823:d>>>0>f>>>0?d:f;if(d>>>0>=1073741824){break l}i=d<<2;d=pa(i);H[e+28>>2]=d;H[e+24>>2]=d;H[e+32>>2]=d+i;if((c|0)!=(h|0)){qa(d,c,l)}H[e+28>>2]=d+(f<<2);break k}sa();v()}L[e+36>>2]=p}m:{if(o>>>0>=30){break m}if(!Xc(e+16|0,H[H[a+60>>2]+((H[a+40>>2]-H[a+36>>2]|0)/24<<2)>>2])){break m}c=H[a+40>>2];n:{if((c|0)!=H[a+44>>2]){H[c>>2]=1832;d=H[e+20>>2];H[c+16>>2]=0;H[c+8>>2]=0;H[c+12>>2]=0;H[c+4>>2]=d;d=H[e+28>>2];f=H[e+24>>2];if((d|0)!=(f|0)){d=d-f|0;if((d|0)<0){break i}g=pa(d);H[c+12>>2]=g;H[c+8>>2]=g;H[c+16>>2]=(d&-4)+g;k=H[e+24>>2];d=H[e+28>>2];if((k|0)!=(d|0)){while(1){L[g>>2]=L[k>>2];g=g+4|0;k=k+4|0;if((d|0)!=(k|0)){continue}break}}H[c+12>>2]=g}L[c+20>>2]=L[e+36>>2];H[a+40>>2]=c+24;break n}d=0;o:{p:{q:{r:{j=H[a+40>>2];f=H[a+36>>2];i=(j-f|0)/24|0;c=i+1|0;if(c>>>0<178956971){h=(H[a+44>>2]-f|0)/24|0;l=h<<1;h=h>>>0>=89478485?178956970:c>>>0>>0?l:c;if(h){if(h>>>0>=178956971){break r}d=pa(N(h,24))}g=N(i,24)+d|0;H[g>>2]=1832;c=H[e+20>>2];H[g+16>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;H[g+4>>2]=c;c=H[e+24>>2];i=H[e+28>>2];if((c|0)!=(i|0)){l=i-c|0;if((l|0)<0){break q}k=pa(l);H[g+8>>2]=k;H[g+16>>2]=(l&-4)+k;while(1){L[k>>2]=L[c>>2];k=k+4|0;c=c+4|0;if((i|0)!=(c|0)){continue}break}H[g+12>>2]=k}c=N(h,24)+d|0;L[g+20>>2]=L[e+36>>2];d=g+24|0;if((f|0)==(j|0)){break p}while(1){g=g-24|0;H[g>>2]=1832;j=j-24|0;H[g+4>>2]=H[j+4>>2];H[g+8>>2]=H[j+8>>2];H[g+12>>2]=H[j+12>>2];H[g+16>>2]=H[j+16>>2];H[j+16>>2]=0;H[j+8>>2]=0;H[j+12>>2]=0;L[g+20>>2]=L[j+20>>2];if((f|0)!=(j|0)){continue}break}H[a+44>>2]=c;k=H[a+40>>2];H[a+40>>2]=d;j=H[a+36>>2];H[a+36>>2]=g;if((j|0)==(k|0)){break o}while(1){k=k-24|0;ea[H[H[k>>2]>>2]](k)|0;if((j|0)!=(k|0)){continue}break}break o}sa();v()}wa();v()}sa();v()}H[a+44>>2]=c;H[a+40>>2]=d;H[a+36>>2]=g}if(j){oa(j)}}j=1}H[e+16>>2]=1832;c=H[e+24>>2];if(c){H[e+28>>2]=c;oa(c)}if(!j){break c}}n=n+1|0;if((ea[H[H[a>>2]+24>>2]](a)|0)>(n|0)){continue}break}break d}k=ea[H[H[a>>2]+24>>2]](a)|0;H[e+712>>2]=0;H[e+704>>2]=0;H[e+708>>2]=0;if(k){if(k>>>0>=214748365){break h}c=N(k,20);d=pa(c);H[e+704>>2]=d;H[e+712>>2]=c+d;c=c-20|0;c=(c-((c>>>0)%20|0)|0)+20|0;q=e,r=ra(d,0,c)+c|0,H[q+708>>2]=r;while(1){c=ea[H[H[a>>2]+20>>2]](a,m)|0;d=H[H[H[(ea[H[H[a>>2]+28>>2]](a)|0)+4>>2]+8>>2]+(c<<2)>>2];f=H[d+28>>2];c=f-1|0;if(c>>>0<=10){c=H[(c<<2)+13584>>2]}else{c=-1}h=(c|0)>0?c:0;if(h>>>0>4){break f}c=H[e+704>>2]+N(m,20)|0;i=I[d+24|0];H[c+16>>2]=i;H[c+12>>2]=h;H[c+8>>2]=f;H[c+4>>2]=g;H[c>>2]=d;g=g+i|0;m=m+1|0;if((k|0)!=(m|0)){continue}break}}c=ea[H[H[a>>2]+20>>2]](a,0)|0;m=H[H[H[(ea[H[H[a>>2]+28>>2]](a)|0)+4>>2]+8>>2]+(c<<2)>>2];F[m+84|0]=1;H[m+72>>2]=H[m+68>>2];h=H[b+12>>2];c=h;d=H[b+20>>2];f=H[b+8>>2];i=H[b+16>>2];if((c|0)<=(d|0)&f>>>0<=i>>>0|(c|0)<(d|0)){break f}n=H[b>>2];o=I[n+i|0];c=d;l=i+1|0;c=l?c:c+1|0;H[b+16>>2]=l;H[b+20>>2]=c;s:{switch(o|0){case 0:a=H[e+704>>2];if((H[e+708>>2]-a|0)!=20){break e}if(H[a+16>>2]!=3){break f}t:{if(f>>>0<=l>>>0&(c|0)>=(h|0)|(c|0)>(h|0)){break t}c=d;a=i+2|0;c=a>>>0<2?c+1|0:c;l=a;H[b+16>>2]=a;H[b+20>>2]=c;c=d;a=i+6|0;c=a>>>0<6?c+1|0:c;if(a>>>0>f>>>0&(c|0)>=(h|0)|(c|0)>(h|0)){break t}d=l+n|0;d=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=a;H[b+20>>2]=c;mb(m,d);j=e+672|0;H[j+20>>2]=0;H[j+12>>2]=0;H[j+16>>2]=0;H[j>>2]=0;H[j+4>>2]=0;H[j+20>>2]=d;d=Ac(e+16|0,e+704|0);k=0;g=ca-32|0;ca=g;H[g+24>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;f=H[b+12>>2];m=f;i=H[b+8>>2];c=H[b+20>>2];l=c;h=H[b+16>>2];a=h+4|0;c=a>>>0<4?c+1|0:c;u:{if(a>>>0>i>>>0&(c|0)>=(f|0)|(c|0)>(f|0)){break u}n=H[b>>2];f=n+h|0;f=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);H[b+16>>2]=a;H[b+20>>2]=c;v:{w:{switch(f-2|0){case 1:if((c|0)>=(m|0)&a>>>0>=i>>>0|(c|0)>(m|0)){break u}a=F[a+n|0];c=l;f=h+5|0;c=f>>>0<5?c+1|0:c;H[b+16>>2]=f;H[b+20>>2]=c;H[j+8>>2]=a;if((a|0)==1){if(Ud(j,b,g+16|0)){break v}break u}Rd(1799,23,H[3443]);break u;default:Rd(1774,24,H[3443]);break u;case 0:break w}}if(!Ud(j,b,g+16|0)){break u}}H[g+8>>2]=H[g+16>>2];H[g>>2]=H[g+20>>2];c=ca-32|0;ca=c;a=H[j>>2];p=L[j+4>>2];H[c+24>>2]=1065353216;h=-1<0){L[c+24>>2]=p/O(a|0)}m=H[g+8>>2];n=H[g>>2];if((m|0)!=(n|0)){a=H[d+28>>2];while(1){b=H[m>>2];f=H[m+4>>2];p=L[c+24>>2];L[c+16>>2]=p*O(H[m+8>>2]-h|0);L[c+12>>2]=p*O(f-h|0);L[c+8>>2]=p*O(b-h|0);b=a;i=H[d+16>>2];f=H[i>>2];if(!I[f+84|0]){b=H[H[f+68>>2]+(a<<2)>>2]}if(K[f+80>>2]>b>>>0){a=H[f+40>>2];qa(H[H[f>>2]>>2]+N(a,b)|0,(c+8|0)+(H[i+4>>2]<<2)|0,a);n=H[g>>2];a=H[d+28>>2]}a=a+1|0;H[d+28>>2]=a;m=m+12|0;if((n|0)!=(m|0)){continue}break}}ca=c+32|0;k=1}a=H[g+16>>2];if(a){H[g+20>>2]=a;oa(a)}ca=g+32|0;yc(d);j=1;if(k){break f}}j=0;break f;case 1:break s;default:break f}}if(f>>>0<=l>>>0&(c|0)>=(h|0)|(c|0)>(h|0)){break f}o=I[l+n|0];c=d;l=i+2|0;c=l>>>0<2?c+1|0:c;H[b+16>>2]=l;H[b+20>>2]=c;if(o>>>0>=7){H[e>>2]=o;Qd(1651,e);break f}c=d;d=i+6|0;c=d>>>0<6?c+1|0:c;if(d>>>0>f>>>0&(c|0)>=(h|0)|(c|0)>(h|0)){break f}f=l+n|0;f=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);H[b+16>>2]=d;H[b+20>>2]=c;if(k){m=0;while(1){c=ea[H[H[a>>2]+20>>2]](a,m)|0;c=H[H[H[(ea[H[H[a>>2]+28>>2]](a)|0)+4>>2]+8>>2]+(c<<2)>>2];mb(c,f);F[c+84|0]=1;H[c+72>>2]=H[c+68>>2];m=m+1|0;if((k|0)!=(m|0)){continue}break}}a=Ac(e+672|0,e+704|0);x:{y:{switch(o|0){case 1:c=wb(e+16|0,g);b=zd(c,b,a,-1);xb(c);if(!b){break g}break x;case 2:c=ub(e+16|0,g);b=yd(c,b,a,-1);vb(c);if(!b){break g}break x;case 3:c=ub(e+16|0,g);b=xd(c,b,a,-1);vb(c);if(!b){break g}break x;case 4:c=$a(e+16|0,g);b=wd(c,b,a,-1);ab(c);if(!b){break g}break x;case 5:c=$a(e+16|0,g);b=vd(c,b,a,-1);ab(c);if(!b){break g}break x;case 6:c=$a(e+16|0,g);b=ud(c,b,a,-1);ab(c);if(b){break x}break g;case 0:break y;default:break g}}c=wb(e+16|0,g);b=Bd(c,b,a,-1);xb(c);if(!b){break g}}yc(a);j=1;break f}sa();v()}sa();v()}yc(a)}a=H[e+704>>2]}if(!a){break a}H[e+708>>2]=a;oa(a);break a}j=1;if(H[a+52>>2]==H[a+48>>2]){break b}while(1){if(!td(1,e+16|0,b)){break c}c=H[a+48>>2];d=H[e+16>>2];H[c+(m<<2)>>2]=d>>>1^0-(d&1);m=m+1|0;if(m>>>0>2]-c>>2>>>0){continue}break}break b}j=0}a=H[e+672>>2];if(!a){break a}H[e+676>>2]=a;oa(a)}ca=e+720|0;return j|0}function te(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;h=ca-32|0;ca=h;H[b+32>>2]=d;H[b+40>>2]=c;H[b+4>>2]=e;nc(a,d,h+16|0);a:{if(H[a>>2]){break a}if(F[a+15|0]<0){oa(H[a+4>>2])}d=I[h+23|0];if((ea[H[H[b>>2]+8>>2]](b)|0)!=(d|0)){b=pa(64);F[b+50|0]=0;c=I[1314]|I[1315]<<8;F[b+48|0]=c;F[b+49|0]=c>>>8;c=I[1310]|I[1311]<<8|(I[1312]<<16|I[1313]<<24);d=I[1306]|I[1307]<<8|(I[1308]<<16|I[1309]<<24);F[b+40|0]=d;F[b+41|0]=d>>>8;F[b+42|0]=d>>>16;F[b+43|0]=d>>>24;F[b+44|0]=c;F[b+45|0]=c>>>8;F[b+46|0]=c>>>16;F[b+47|0]=c>>>24;c=I[1302]|I[1303]<<8|(I[1304]<<16|I[1305]<<24);d=I[1298]|I[1299]<<8|(I[1300]<<16|I[1301]<<24);F[b+32|0]=d;F[b+33|0]=d>>>8;F[b+34|0]=d>>>16;F[b+35|0]=d>>>24;F[b+36|0]=c;F[b+37|0]=c>>>8;F[b+38|0]=c>>>16;F[b+39|0]=c>>>24;c=I[1294]|I[1295]<<8|(I[1296]<<16|I[1297]<<24);d=I[1290]|I[1291]<<8|(I[1292]<<16|I[1293]<<24);F[b+24|0]=d;F[b+25|0]=d>>>8;F[b+26|0]=d>>>16;F[b+27|0]=d>>>24;F[b+28|0]=c;F[b+29|0]=c>>>8;F[b+30|0]=c>>>16;F[b+31|0]=c>>>24;c=I[1286]|I[1287]<<8|(I[1288]<<16|I[1289]<<24);d=I[1282]|I[1283]<<8|(I[1284]<<16|I[1285]<<24);F[b+16|0]=d;F[b+17|0]=d>>>8;F[b+18|0]=d>>>16;F[b+19|0]=d>>>24;F[b+20|0]=c;F[b+21|0]=c>>>8;F[b+22|0]=c>>>16;F[b+23|0]=c>>>24;c=I[1278]|I[1279]<<8|(I[1280]<<16|I[1281]<<24);d=I[1274]|I[1275]<<8|(I[1276]<<16|I[1277]<<24);F[b+8|0]=d;F[b+9|0]=d>>>8;F[b+10|0]=d>>>16;F[b+11|0]=d>>>24;F[b+12|0]=c;F[b+13|0]=c>>>8;F[b+14|0]=c>>>16;F[b+15|0]=c>>>24;c=I[1270]|I[1271]<<8|(I[1272]<<16|I[1273]<<24);d=I[1266]|I[1267]<<8|(I[1268]<<16|I[1269]<<24);F[b|0]=d;F[b+1|0]=d>>>8;F[b+2|0]=d>>>16;F[b+3|0]=d>>>24;F[b+4|0]=c;F[b+5|0]=c>>>8;F[b+6|0]=c>>>16;F[b+7|0]=c>>>24;H[a>>2]=-1;za(a+4|0,b,50);oa(b);break a}c=I[h+21|0];F[b+36|0]=c;e=I[h+22|0];F[b+37|0]=e;if((c-3&255)>>>0<=253){b=pa(32);F[b+22|0]=0;c=I[1427]|I[1428]<<8|(I[1429]<<16|I[1430]<<24);d=I[1423]|I[1424]<<8|(I[1425]<<16|I[1426]<<24);F[b+14|0]=d;F[b+15|0]=d>>>8;F[b+16|0]=d>>>16;F[b+17|0]=d>>>24;F[b+18|0]=c;F[b+19|0]=c>>>8;F[b+20|0]=c>>>16;F[b+21|0]=c>>>24;c=I[1421]|I[1422]<<8|(I[1423]<<16|I[1424]<<24);d=I[1417]|I[1418]<<8|(I[1419]<<16|I[1420]<<24);F[b+8|0]=d;F[b+9|0]=d>>>8;F[b+10|0]=d>>>16;F[b+11|0]=d>>>24;F[b+12|0]=c;F[b+13|0]=c>>>8;F[b+14|0]=c>>>16;F[b+15|0]=c>>>24;c=I[1413]|I[1414]<<8|(I[1415]<<16|I[1416]<<24);d=I[1409]|I[1410]<<8|(I[1411]<<16|I[1412]<<24);F[b|0]=d;F[b+1|0]=d>>>8;F[b+2|0]=d>>>16;F[b+3|0]=d>>>24;F[b+4|0]=c;F[b+5|0]=c>>>8;F[b+6|0]=c>>>16;F[b+7|0]=c>>>24;H[a>>2]=-5;za(a+4|0,b,22);oa(b);break a}if(!((c|0)!=2|e>>>0<=(d?2:3)>>>0)){b=pa(32);F[b+22|0]=0;c=I[1404]|I[1405]<<8|(I[1406]<<16|I[1407]<<24);d=I[1400]|I[1401]<<8|(I[1402]<<16|I[1403]<<24);F[b+14|0]=d;F[b+15|0]=d>>>8;F[b+16|0]=d>>>16;F[b+17|0]=d>>>24;F[b+18|0]=c;F[b+19|0]=c>>>8;F[b+20|0]=c>>>16;F[b+21|0]=c>>>24;c=I[1398]|I[1399]<<8|(I[1400]<<16|I[1401]<<24);d=I[1394]|I[1395]<<8|(I[1396]<<16|I[1397]<<24);F[b+8|0]=d;F[b+9|0]=d>>>8;F[b+10|0]=d>>>16;F[b+11|0]=d>>>24;F[b+12|0]=c;F[b+13|0]=c>>>8;F[b+14|0]=c>>>16;F[b+15|0]=c>>>24;c=I[1390]|I[1391]<<8|(I[1392]<<16|I[1393]<<24);d=I[1386]|I[1387]<<8|(I[1388]<<16|I[1389]<<24);F[b|0]=d;F[b+1|0]=d>>>8;F[b+2|0]=d>>>16;F[b+3|0]=d>>>24;F[b+4|0]=c;F[b+5|0]=c>>>8;F[b+6|0]=c>>>16;F[b+7|0]=c>>>24;H[a>>2]=-5;za(a+4|0,b,22);oa(b);break a}c=e|c<<8;G[H[b+32>>2]+38>>1]=c;b:{if((c&65535)>>>0<259|G[h+26>>1]>=0){break b}i=ca-16|0;ca=i;e=pa(36);c=e;H[c+4>>2]=0;H[c+8>>2]=0;H[c+24>>2]=0;H[c+28>>2]=0;c=c+16|0;H[c>>2]=0;H[c+4>>2]=0;H[e>>2]=e+4;H[e+32>>2]=0;H[e+12>>2]=c;H[i>>2]=0;d=H[b+32>>2];j=ca-16|0;ca=j;c=0;c:{if(!e){break c}H[i>>2]=d;H[j+12>>2]=0;c=0;if(!Bb(1,j+12|0,d)){break c}m=H[j+12>>2];if(m){while(1){d:{if(Bb(1,j+8|0,H[i>>2])){c=pa(28);H[c+4>>2]=0;H[c+8>>2]=0;d=c+16|0;H[d>>2]=0;H[d+4>>2]=0;H[c>>2]=c+4;H[c+12>>2]=d;H[c+24>>2]=H[j+8>>2];if(ce(i,c)){break d}Ra(c+12|0,H[c+16>>2]);Qa(c,H[c+4>>2]);oa(c)}c=0;break c}f=ca-16|0;ca=f;H[f+8>>2]=c;e:{if(!c){break e}d=H[e+28>>2];f:{if(d>>>0>2]){H[f+8>>2]=0;H[d>>2]=c;H[e+28>>2]=d+4;break f}d=0;g:{h:{i:{g=H[e+24>>2];l=H[e+28>>2]-g>>2;c=l+1|0;if(c>>>0<1073741824){g=H[e+32>>2]-g|0;k=g>>>1|0;g=g>>>0>=2147483644?1073741823:c>>>0>>0?k:c;if(g){if(g>>>0>=1073741824){break i}d=pa(g<<2)}k=H[f+8>>2];H[f+8>>2]=0;c=(l<<2)+d|0;H[c>>2]=k;g=(g<<2)+d|0;l=c+4|0;d=H[e+28>>2];k=H[e+24>>2];if((d|0)==(k|0)){break h}while(1){d=d-4|0;o=H[d>>2];H[d>>2]=0;c=c-4|0;H[c>>2]=o;if((d|0)!=(k|0)){continue}break}H[e+32>>2]=g;g=H[e+28>>2];H[e+28>>2]=l;d=H[e+24>>2];H[e+24>>2]=c;if((d|0)==(g|0)){break g}while(1){g=g-4|0;c=H[g>>2];H[g>>2]=0;if(c){Ra(c+12|0,H[c+16>>2]);Qa(c,H[c+4>>2]);oa(c)}if((d|0)!=(g|0)){continue}break}break g}sa();v()}wa();v()}H[e+32>>2]=g;H[e+28>>2]=l;H[e+24>>2]=c}if(d){oa(d)}}c=H[f+8>>2];H[f+8>>2]=0;if(!c){break e}Ra(c+12|0,H[c+16>>2]);Qa(c,H[c+4>>2]);oa(c)}ca=f+16|0;n=n+1|0;if((m|0)!=(n|0)){continue}break}}c=ce(i,e)}ca=j+16|0;j:{if(c){d=H[b+4>>2];c=H[d+4>>2];H[d+4>>2]=e;if(c){Uc(c)}H[a>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;H[a+12>>2]=0;break j}c=pa(32);F[c+26|0]=0;d=I[1579]|I[1580]<<8;F[c+24|0]=d;F[c+25|0]=d>>>8;d=I[1575]|I[1576]<<8|(I[1577]<<16|I[1578]<<24);f=I[1571]|I[1572]<<8|(I[1573]<<16|I[1574]<<24);F[c+16|0]=f;F[c+17|0]=f>>>8;F[c+18|0]=f>>>16;F[c+19|0]=f>>>24;F[c+20|0]=d;F[c+21|0]=d>>>8;F[c+22|0]=d>>>16;F[c+23|0]=d>>>24;d=I[1567]|I[1568]<<8|(I[1569]<<16|I[1570]<<24);f=I[1563]|I[1564]<<8|(I[1565]<<16|I[1566]<<24);F[c+8|0]=f;F[c+9|0]=f>>>8;F[c+10|0]=f>>>16;F[c+11|0]=f>>>24;F[c+12|0]=d;F[c+13|0]=d>>>8;F[c+14|0]=d>>>16;F[c+15|0]=d>>>24;d=I[1559]|I[1560]<<8|(I[1561]<<16|I[1562]<<24);f=I[1555]|I[1556]<<8|(I[1557]<<16|I[1558]<<24);F[c|0]=f;F[c+1|0]=f>>>8;F[c+2|0]=f>>>16;F[c+3|0]=f>>>24;F[c+4|0]=d;F[c+5|0]=d>>>8;F[c+6|0]=d>>>16;F[c+7|0]=d>>>24;H[a>>2]=-1;za(a+4|0,c,26);oa(c);H[i+8>>2]=0;Uc(e)}ca=i+16|0;if(H[a>>2]){break a}if(F[a+15|0]>=0){break b}oa(H[a+4>>2])}if(!(ea[H[H[b>>2]+12>>2]](b)|0)){b=pa(48);F[b+33|0]=0;F[b+32|0]=I[1384];c=I[1380]|I[1381]<<8|(I[1382]<<16|I[1383]<<24);d=I[1376]|I[1377]<<8|(I[1378]<<16|I[1379]<<24);F[b+24|0]=d;F[b+25|0]=d>>>8;F[b+26|0]=d>>>16;F[b+27|0]=d>>>24;F[b+28|0]=c;F[b+29|0]=c>>>8;F[b+30|0]=c>>>16;F[b+31|0]=c>>>24;c=I[1372]|I[1373]<<8|(I[1374]<<16|I[1375]<<24);d=I[1368]|I[1369]<<8|(I[1370]<<16|I[1371]<<24);F[b+16|0]=d;F[b+17|0]=d>>>8;F[b+18|0]=d>>>16;F[b+19|0]=d>>>24;F[b+20|0]=c;F[b+21|0]=c>>>8;F[b+22|0]=c>>>16;F[b+23|0]=c>>>24;c=I[1364]|I[1365]<<8|(I[1366]<<16|I[1367]<<24);d=I[1360]|I[1361]<<8|(I[1362]<<16|I[1363]<<24);F[b+8|0]=d;F[b+9|0]=d>>>8;F[b+10|0]=d>>>16;F[b+11|0]=d>>>24;F[b+12|0]=c;F[b+13|0]=c>>>8;F[b+14|0]=c>>>16;F[b+15|0]=c>>>24;c=I[1356]|I[1357]<<8|(I[1358]<<16|I[1359]<<24);d=I[1352]|I[1353]<<8|(I[1354]<<16|I[1355]<<24);F[b|0]=d;F[b+1|0]=d>>>8;F[b+2|0]=d>>>16;F[b+3|0]=d>>>24;F[b+4|0]=c;F[b+5|0]=c>>>8;F[b+6|0]=c>>>16;F[b+7|0]=c>>>24;H[a>>2]=-1;za(a+4|0,b,33);oa(b);break a}if(!(ea[H[H[b>>2]+20>>2]](b)|0)){b=mc(h,1582);H[a>>2]=-1;a=a+4|0;if(F[b+11|0]>=0){c=H[b+4>>2];H[a>>2]=H[b>>2];H[a+4>>2]=c;H[a+8>>2]=H[b+8>>2];break a}za(a,H[b>>2],H[b+4>>2]);if(F[b+11|0]>=0){break a}oa(H[b>>2]);break a}if(!(ea[H[H[b>>2]+24>>2]](b)|0)){b=mc(h,1317);H[a>>2]=-1;a=a+4|0;if(F[b+11|0]>=0){c=H[b+4>>2];H[a>>2]=H[b>>2];H[a+4>>2]=c;H[a+8>>2]=H[b+8>>2];break a}za(a,H[b>>2],H[b+4>>2]);if(F[b+11|0]>=0){break a}oa(H[b>>2]);break a}H[a>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;H[a+12>>2]=0}ca=h+32|0}function pg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0;m=ca-16|0;ca=m;H[m+12>>2]=b;b=pa(32);H[m>>2]=b;H[m+4>>2]=24;H[m+8>>2]=-2147483616;c=I[1206]|I[1207]<<8|(I[1208]<<16|I[1209]<<24);d=I[1202]|I[1203]<<8|(I[1204]<<16|I[1205]<<24);F[b+16|0]=d;F[b+17|0]=d>>>8;F[b+18|0]=d>>>16;F[b+19|0]=d>>>24;F[b+20|0]=c;F[b+21|0]=c>>>8;F[b+22|0]=c>>>16;F[b+23|0]=c>>>24;c=I[1198]|I[1199]<<8|(I[1200]<<16|I[1201]<<24);d=I[1194]|I[1195]<<8|(I[1196]<<16|I[1197]<<24);F[b+8|0]=d;F[b+9|0]=d>>>8;F[b+10|0]=d>>>16;F[b+11|0]=d>>>24;F[b+12|0]=c;F[b+13|0]=c>>>8;F[b+14|0]=c>>>16;F[b+15|0]=c>>>24;c=I[1190]|I[1191]<<8|(I[1192]<<16|I[1193]<<24);d=I[1186]|I[1187]<<8|(I[1188]<<16|I[1189]<<24);F[b|0]=d;F[b+1|0]=d>>>8;F[b+2|0]=d>>>16;F[b+3|0]=d>>>24;F[b+4|0]=c;F[b+5|0]=c>>>8;F[b+6|0]=c>>>16;F[b+7|0]=c>>>24;F[b+24|0]=0;l=ca-48|0;ca=l;f=H[m+12>>2];d=a;a=a+16|0;b=H[a>>2];a:{b:{if(!b){break b}c=a;while(1){e=(f|0)>H[b+16>>2];c=e?c:b;b=H[(e?b+4|0:b)>>2];if(b){continue}break}if((a|0)==(c|0)){break b}if((f|0)>=H[c+16>>2]){break a}}H[l+28>>2]=0;H[l+32>>2]=0;y=l+24|0;H[l+24>>2]=y|4;a=l+16|0;H[a>>2]=0;H[a+4>>2]=0;H[l+8>>2]=f;H[l+12>>2]=a;t=l+8|0;a=t;x=ca-16|0;ca=x;u=d+12|0;c=H[u+4>>2];c:{d:{if(!c){o=u+4|0;d=o;break d}a=H[a>>2];while(1){d=c;b=H[c+16>>2];if((b|0)>(a|0)){o=d;c=H[d>>2];if(c){continue}break d}if((a|0)<=(b|0)){g=d;a=0;break c}c=H[d+4>>2];if(c){continue}break}o=d+4|0}g=pa(32);b=H[t>>2];q=g+24|0;a=q;H[a>>2]=0;H[a+4>>2]=0;H[g+16>>2]=b;r=g+20|0;H[r>>2]=a;c=H[t+4>>2];z=t+8|0;if((c|0)!=(z|0)){while(1){p=ca-16|0;ca=p;a=p+8|0;k=c+16|0;e:{f:{g:{h:{i:{j:{k:{f=q;e=r+4|0;l:{if((f|0)==(e|0)){break l}b=I[f+27|0];h=b<<24>>24<0;i=I[k+11|0];n=i<<24>>24;j=(n|0)<0;i=j?H[k+4>>2]:i;b=h?H[f+20>>2]:b;s=i>>>0>b>>>0;w=s?b:i;if(w){j=j?H[k>>2]:k;h=h?H[f+16>>2]:f+16|0;A=Fa(j,h,w);if(!A){if(b>>>0>i>>>0){break l}break k}if((A|0)>=0){break k}break l}if(b>>>0<=i>>>0){break j}}h=H[f>>2];m:{a=f;n:{if((a|0)==H[r>>2]){break n}o:{if(!h){b=f;while(1){a=H[b+8>>2];i=H[a>>2]==(b|0);b=a;if(i){continue}break}break o}b=h;while(1){a=b;b=H[b+4>>2];if(b){continue}break}}i=I[k+11|0];s=i<<24>>24;b=(s|0)<0;j=I[a+27|0];n=j<<24>>24<0;p:{i=b?H[k+4>>2]:i;j=n?H[a+20>>2]:j;w=i>>>0>>0?i:j;if(w){b=Fa(n?H[a+16>>2]:a+16|0,b?H[k>>2]:k,w);if(b){break p}}if(i>>>0>j>>>0){break n}break m}if((b|0)>=0){break m}}if(!h){H[p+12>>2]=f;a=f;break e}H[p+12>>2]=a;a=a+4|0;break e}b=H[e>>2];if(!b){H[p+12>>2]=e;a=e;break e}h=(s|0)<0?H[k>>2]:k;f=e;while(1){a=b;b=I[b+27|0];e=b<<24>>24<0;b=e?H[a+20>>2]:b;k=b>>>0>>0;q:{r:{s:{t:{n=k?b:i;u:{if(n){e=e?H[a+16>>2]:a+16|0;j=Fa(h,e,n);if(!j){if(b>>>0>i>>>0){break u}break t}if((j|0)>=0){break t}break u}if(b>>>0<=i>>>0){break s}}f=a;b=H[a>>2];if(b){continue}break g}b=Fa(e,h,n);if(b){break r}}if(k){break q}break g}if((b|0)>=0){break g}}f=a+4|0;b=H[a+4>>2];if(b){continue}break}break g}b=Fa(h,j,w);if(b){break i}}if(s){break h}break f}if((b|0)>=0){break f}}h=H[f+4>>2];v:{if(!h){b=f;while(1){a=H[b+8>>2];j=H[a>>2]!=(b|0);b=a;if(j){continue}break}break v}b=h;while(1){a=b;b=H[b>>2];if(b){continue}break}}w:{x:{if((a|0)==(e|0)){break x}j=I[a+27|0];b=j<<24>>24<0;y:{j=b?H[a+20>>2]:j;s=i>>>0>j>>>0?j:i;if(s){b=Fa((n|0)<0?H[k>>2]:k,b?H[a+16>>2]:a+16|0,s);if(b){break y}}if(i>>>0>>0){break x}break w}if((b|0)>=0){break w}}if(!h){H[p+12>>2]=f;a=f+4|0;break e}H[p+12>>2]=a;break e}b=H[e>>2];if(!b){H[p+12>>2]=e;a=e;break e}h=(n|0)<0?H[k>>2]:k;f=e;while(1){a=b;b=I[b+27|0];e=b<<24>>24<0;b=e?H[a+20>>2]:b;k=b>>>0>>0;z:{A:{B:{C:{n=k?b:i;D:{if(n){e=e?H[a+16>>2]:a+16|0;j=Fa(h,e,n);if(!j){if(b>>>0>i>>>0){break D}break C}if((j|0)>=0){break C}break D}if(b>>>0<=i>>>0){break B}}f=a;b=H[a>>2];if(b){continue}break g}b=Fa(e,h,n);if(b){break A}}if(k){break z}break g}if((b|0)>=0){break g}}f=a+4|0;b=H[a+4>>2];if(b){continue}break}}H[p+12>>2]=a;a=f;break e}H[p+12>>2]=f;H[a>>2]=f}f=a;a=H[a>>2];if(a){b=0}else{a=pa(40);b=a+16|0;E:{if(F[c+27|0]>=0){e=H[c+20>>2];H[b>>2]=H[c+16>>2];H[b+4>>2]=e;H[b+8>>2]=H[c+24>>2];break E}za(b,H[c+16>>2],H[c+20>>2])}b=a+28|0;F:{if(F[c+39|0]>=0){e=H[c+32>>2];H[b>>2]=H[c+28>>2];H[b+4>>2]=e;H[b+8>>2]=H[c+36>>2];break F}za(b,H[c+28>>2],H[c+32>>2])}H[a+8>>2]=H[p+12>>2];H[a>>2]=0;H[a+4>>2]=0;H[f>>2]=a;b=a;e=H[H[r>>2]>>2];if(e){H[r>>2]=e;b=H[f>>2]}Sb(H[r+4>>2],b);H[r+8>>2]=H[r+8>>2]+1;b=1}F[x+12|0]=b;H[x+8>>2]=a;ca=p+16|0;b=H[c+4>>2];G:{if(b){while(1){c=b;b=H[b>>2];if(b){continue}break G}}while(1){a=c;c=H[c+8>>2];if((a|0)!=H[c>>2]){continue}break}}if((c|0)!=(z|0)){continue}break}}H[g+8>>2]=d;H[g>>2]=0;H[g+4>>2]=0;H[o>>2]=g;c=g;a=H[H[u>>2]>>2];if(a){H[u>>2]=a;c=H[o>>2]}Sb(H[u+4>>2],c);H[u+8>>2]=H[u+8>>2]+1;a=1}F[l+44|0]=a;H[l+40>>2]=g;ca=x+16|0;c=H[l+40>>2];Kb(t|4,H[l+16>>2]);Kb(y,H[l+28>>2])}f=ca-48|0;ca=f;d=f+8|0;g=ca-32|0;ca=g;o=g+32|0;b=o;a=g+21|0;H:{if((b|0)==(a|0)){break H}}e=b-a|0;I:{if((e|0)<=9){h=61;if((e|0)<(K[3660]<=1|0)){break I}}F[a|0]=49;b=a+1|0;h=0}H[g+12>>2]=h;H[g+8>>2]=b;h=ca-16|0;ca=h;e=ca-16|0;ca=e;J:{q=H[g+8>>2];g=q-a|0;if(g>>>0<=2147483631){K:{if(g>>>0<11){F[d+11|0]=g|I[d+11|0]&128;F[d+11|0]=I[d+11|0]&127;b=d;break K}t=e+8|0;if(g>>>0>=11){k=g+16&-16;b=k-1|0;b=(b|0)==11?k:b}else{b=10}Zb(t,b+1|0);b=H[e+8>>2];H[d>>2]=b;H[d+8>>2]=H[d+8>>2]&-2147483648|H[e+12>>2]&2147483647;H[d+8>>2]=H[d+8>>2]|-2147483648;H[d+4>>2]=g}while(1){if((a|0)!=(q|0)){F[b|0]=I[a|0];b=b+1|0;a=a+1|0;continue}break}F[e+7|0]=0;F[b|0]=I[e+7|0];ca=e+16|0;break J}Na();v()}ca=h+16|0;ca=o;H[f+32>>2]=m;L:{M:{a=c+20|0;d=H[a+4>>2];N:{if(!d){g=a+4|0;c=g;break N}b=I[m+11|0];c=b<<24>>24<0;e=c?H[m>>2]:m;b=c?H[m+4>>2]:b;while(1){c=d;d=I[c+27|0];g=d<<24>>24<0;d=g?H[c+20>>2]:d;o=d>>>0>>0;O:{P:{Q:{R:{h=o?d:b;S:{if(h){g=g?H[c+16>>2]:c+16|0;q=Fa(e,g,h);if(!q){if(b>>>0>>0){break S}break R}if((q|0)>=0){break R}break S}if(b>>>0>=d>>>0){break Q}}g=c;d=H[c>>2];if(d){continue}break N}d=Fa(g,e,h);if(d){break P}}if(o){break O}break M}if((d|0)>=0){break M}}d=H[c+4>>2];if(d){continue}break}g=c+4|0}d=pa(40);e=d+16|0;b=H[f+32>>2];T:{if(F[b+11|0]>=0){o=H[b+4>>2];H[e>>2]=H[b>>2];H[e+4>>2]=o;H[e+8>>2]=H[b+8>>2];break T}za(e,H[b>>2],H[b+4>>2])}H[d+8>>2]=c;H[d>>2]=0;H[d+4>>2]=0;H[d+36>>2]=0;H[d+28>>2]=0;H[d+32>>2]=0;H[g>>2]=d;c=d;b=H[H[a>>2]>>2];if(b){H[a>>2]=b;c=H[g>>2]}Sb(H[a+4>>2],c);H[a+8>>2]=H[a+8>>2]+1;a=1;break L}d=c;a=0}F[f+44|0]=a;H[f+40>>2]=d;a=H[f+40>>2];if(F[a+39|0]<0){oa(H[a+28>>2])}b=H[f+12>>2];H[a+28>>2]=H[f+8>>2];H[a+32>>2]=b;H[a+36>>2]=H[f+16>>2];ca=f+48|0;ca=l+48|0;if(F[m+11|0]<0){oa(H[m>>2])}ca=m+16|0}function Bd(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;j=H[b+8>>2];e=H[b+12>>2];g=H[b+20>>2];h=H[b+16>>2];k=h+4|0;g=k>>>0<4?g+1|0:g;a:{if(j>>>0>>0&(e|0)<=(g|0)|(e|0)<(g|0)){break a}h=h+H[b>>2]|0;H[a>>2]=I[h|0]|I[h+1|0]<<8|(I[h+2|0]<<16|I[h+3|0]<<24);h=H[b+20>>2];e=h;j=H[b+16>>2];g=j+4|0;h=g>>>0<4?e+1|0:e;H[b+16>>2]=g;H[b+20>>2]=h;if(K[a>>2]>32){break a}l=H[b+8>>2];k=H[b+12>>2];h=e;e=j+8|0;h=e>>>0<8?h+1|0:h;if(e>>>0>l>>>0&(h|0)>=(k|0)|(h|0)>(k|0)){break a}h=H[b>>2]+g|0;g=I[h|0]|I[h+1|0]<<8|(I[h+2|0]<<16|I[h+3|0]<<24);H[a+4>>2]=g;h=H[b+20>>2];e=H[b+16>>2]+4|0;h=e>>>0<4?h+1|0:h;H[b+16>>2]=e;H[b+20>>2]=h;if(!g){return 1}if(d>>>0>>0){break a}H[a+8>>2]=0;if(!ua(a+16|0,b)){break a}if(!ua(a+36|0,b)){break a}if(!ua(a+56|0,b)){break a}if(!ua(a+76|0,b)){break a}s=H[a+4>>2];h=c;b=0;g=0;e=ca-32|0;ca=e;d=a;a=H[a+12>>2];H[e+16>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;b:{c:{if(a){if(a>>>0>=1073741824){break c}c=a<<2;b=pa(c);H[e+8>>2]=b;g=b+c|0;H[e+16>>2]=g;ra(b,0,c);H[e+12>>2]=g}c=H[d+120>>2];i=H[c>>2];if(i){H[c+4>>2]=i;oa(i);g=H[e+12>>2];b=H[e+8>>2];a=H[d+12>>2]}H[c+4>>2]=g;H[c>>2]=b;H[c+8>>2]=H[e+16>>2];b=0;H[e+16>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;d:{if(a){if(a>>>0>=1073741824){break d}a=a<<2;f=pa(a);H[e+8>>2]=f;b=a+f|0;H[e+16>>2]=b;ra(f,0,a);H[e+12>>2]=b}a=H[d+132>>2];c=H[a>>2];if(c){H[a+4>>2]=c;oa(c);f=H[e+8>>2];b=H[e+12>>2]}H[a+4>>2]=b;H[a>>2]=f;H[a+8>>2]=H[e+16>>2];H[e+24>>2]=0;H[e+28>>2]=0;H[e+16>>2]=0;H[e+20>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;xa(e+8|0);a=H[e+24>>2]+H[e+28>>2]|0;b=(a>>>0)/341|0;a=H[H[e+12>>2]+(b<<2)>>2]+N(a-N(b,341)|0,12)|0;H[a+4>>2]=0;H[a+8>>2]=0;H[a>>2]=s;c=1;a=H[e+28>>2]+1|0;H[e+28>>2]=a;e:{if(!a){break e}while(1){b=H[e+12>>2];f=H[e+24>>2];k=a-1|0;c=f+k|0;i=(c>>>0)/341|0;c=H[b+(i<<2)>>2]+N(c-N(i,341)|0,12)|0;g=H[c+8>>2];i=H[c+4>>2];j=H[c>>2];H[e+28>>2]=k;c=H[e+16>>2];if((((b|0)!=(c|0)?N(c-b>>2,341)-1|0:0)-(a+f|0)|0)+1>>>0>=682){oa(H[c-4>>2]);H[e+16>>2]=H[e+16>>2]-4}c=0;if(j>>>0>s>>>0){break e}b=H[d+12>>2];a=(b-1|0)!=(i|0)?i+1|0:0;if(a>>>0>=b>>>0){break e}f=N(g,12);o=f+H[d+132>>2]|0;k=f+H[d+120>>2]|0;i=H[d>>2];l=a<<2;m=H[l+H[o>>2]>>2];f:{g:{if((i|0)==(m|0)){if(!j){break g}o=0;b=H[h+20>>2];g=H[h+16>>2];if((b|0)==(g|0)){a=H[d+8>>2];H[h+28>>2]=j+H[h+28>>2];H[d+8>>2]=a+j;break g}while(1){c=(b|0)==(g|0);a=b;i=0;b=g;h:{if(c){break h}while(1){f=H[h+28>>2];b=a;c=N(i,20)+g|0;l=H[c>>2];if(!I[l+84|0]){f=H[H[l+68>>2]+(f<<2)>>2]}if(K[l+80>>2]<=f>>>0){break h}m=H[k>>2]+(H[c+4>>2]<<2)|0;g=H[c+12>>2];b=m;i:{if(g>>>0>3){break i}a=0;b=H[h+12>>2];if(!H[c+16>>2]){break i}while(1){b=qa(b,m+(a<<2)|0,g);g=H[c+12>>2];b=b+g|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[h+12>>2]}a=H[l+40>>2];qa(H[H[l>>2]>>2]+N(a,f)|0,b,a);i=i+1|0;a=H[h+20>>2];b=a;g=H[h+16>>2];if(i>>>0<(b-g|0)/20>>>0){continue}break}}H[h+28>>2]=H[h+28>>2]+1;H[d+8>>2]=H[d+8>>2]+1;o=o+1|0;if((j|0)!=(o|0)){continue}break}break g}j:{k:{l:{m:{if(j>>>0<=2){c=H[d+108>>2];H[c>>2]=a;f=1;b=H[d+12>>2];if(b>>>0>1){break m}break j}if(K[d+8>>2]>K[d+4>>2]){break e}b=H[d+120>>2];n=g+1|0;o=N(n,12);p=b+o|0;if((p|0)!=(k|0)){Aa(p,H[k>>2],H[k+4>>2]);b=H[d+120>>2]}b=l+H[b+o>>2]|0;H[b>>2]=H[b>>2]+(1<>2];m=32-i|0;n:{if((b|0)<=(m|0)){k=H[d+28>>2];if((k|0)==H[d+20>>2]){break l}m=H[k>>2];p=b+i|0;H[d+32>>2]=p;b=m<>>32-b|0;if((p|0)!=32){break n}H[d+32>>2]=0;H[d+28>>2]=k+4;break n}k=H[d+28>>2];p=k+4|0;if((p|0)==H[d+20>>2]){break l}r=H[k>>2];H[d+28>>2]=p;m=b-m|0;H[d+32>>2]=m;b=H[k+4>>2]>>>32-m|r<>>32-b}i=j>>>1|0;if(i>>>0>>0){break e}break k}while(1){a=(b-1|0)!=(a|0)?a+1|0:0;H[c+(f<<2)>>2]=a;b=H[d+12>>2];f=f+1|0;if(b>>>0>f>>>0){continue}break}break j}i=j>>>1|0;b=0}o:{p:{b=i-b|0;c=j-b|0;q:{if((c|0)==(b|0)){c=b;break q}i=H[d+88>>2];if((i|0)==H[d+80>>2]){break p}j=H[i>>2];k=H[d+92>>2];m=k+1|0;H[d+92>>2]=m;j=j&-2147483648>>>k;r:{if((m|0)==32){H[d+92>>2]=0;H[d+88>>2]=i+4;if(j){break r}break p}if(!j){break p}}}i=c;c=b;break o}i=b}b=H[d+132>>2];j=b+f|0;f=H[j>>2];k=f+l|0;H[k>>2]=H[k>>2]+1;Aa(b+o|0,f,H[j+4>>2]);if(c){b=H[e+28>>2]+H[e+24>>2]|0;j=H[e+16>>2];f=H[e+12>>2];if((b|0)==(((f|0)!=(j|0)?N(j-f>>2,341)-1|0:0)|0)){xa(e+8|0);f=H[e+12>>2];b=H[e+24>>2]+H[e+28>>2]|0}j=(b>>>0)/341|0;b=H[(j<<2)+f>>2]+N(b-N(j,341)|0,12)|0;H[b+8>>2]=g;H[b+4>>2]=a;H[b>>2]=c;H[e+28>>2]=H[e+28>>2]+1}if(!i){break g}b=H[e+28>>2]+H[e+24>>2]|0;c=H[e+16>>2];f=H[e+12>>2];if((b|0)==(((c|0)!=(f|0)?N(c-f>>2,341)-1|0:0)|0)){xa(e+8|0);f=H[e+12>>2];b=H[e+24>>2]+H[e+28>>2]|0}c=(b>>>0)/341|0;b=H[(c<<2)+f>>2]+N(b-N(c,341)|0,12)|0;H[b+8>>2]=n;H[b+4>>2]=a;H[b>>2]=i;a=H[e+28>>2]+1|0;H[e+28>>2]=a;break f}m=0;if(!j){break g}while(1){if(H[d+12>>2]){i=H[d+40>>2];p=H[o>>2];c=H[d+96>>2];r=H[d+108>>2];a=0;while(1){g=r+(a<<2)|0;H[c+(H[g>>2]<<2)>>2]=0;b=H[d>>2];f=H[g>>2]<<2;l=H[f+p>>2];s:{if((b|0)==(l|0)){break s}f=c+f|0;b=b-l|0;l=H[d+52>>2];q=32-l|0;if((b|0)<=(q|0)){n=H[d+48>>2];if((n|0)==(i|0)){c=0;break e}H[f>>2]=H[n>>2]<>>32-b;b=b+H[d+52>>2]|0;H[d+52>>2]=b;if((b|0)!=32){break s}H[d+52>>2]=0;H[d+48>>2]=n+4;break s}n=H[d+48>>2];t=n+4|0;if((i|0)==(t|0)){c=0;break e}u=H[n>>2];H[d+48>>2]=t;q=b-q|0;H[d+52>>2]=q;H[f>>2]=H[n+4>>2]>>>32-q|u<>>32-b}b=H[g>>2]<<2;g=b+c|0;H[g>>2]=H[g>>2]|H[b+H[k>>2]>>2];a=a+1|0;if(a>>>0>2]){continue}break}}i=0;a=H[h+16>>2];t:{if((a|0)==H[h+20>>2]){break t}while(1){f=H[h+28>>2];c=N(i,20)+a|0;l=H[c>>2];if(!I[l+84|0]){f=H[H[l+68>>2]+(f<<2)>>2]}if(K[l+80>>2]<=f>>>0){break t}n=H[d+96>>2]+(H[c+4>>2]<<2)|0;g=H[c+12>>2];b=n;u:{if(g>>>0>3){break u}a=0;b=H[h+12>>2];if(!H[c+16>>2]){break u}while(1){b=qa(b,n+(a<<2)|0,g);g=H[c+12>>2];b=b+g|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[h+12>>2]}a=H[l+40>>2];qa(H[H[l>>2]>>2]+N(a,f)|0,b,a);i=i+1|0;a=H[h+16>>2];if(i>>>0<(H[h+20>>2]-a|0)/20>>>0){continue}break}}H[h+28>>2]=H[h+28>>2]+1;H[d+8>>2]=H[d+8>>2]+1;m=m+1|0;if((j|0)!=(m|0)){continue}break}}a=H[e+28>>2]}if(a){continue}break}c=1}H[e+28>>2]=0;f=H[e+16>>2];a=H[e+12>>2];b=f-a|0;if(b>>>0>=9){while(1){oa(H[a>>2]);a=H[e+12>>2]+4|0;H[e+12>>2]=a;f=H[e+16>>2];b=f-a|0;if(b>>>0>8){continue}break}}g=170;v:{switch((b>>>2|0)-1|0){case 1:g=341;case 0:H[e+24>>2]=g;break;default:break v}}w:{if((a|0)==(f|0)){break w}while(1){oa(H[a>>2]);a=a+4|0;if((f|0)!=(a|0)){continue}break}a=H[e+16>>2];b=H[e+12>>2];if((a|0)==(b|0)){break w}H[e+16>>2]=a+((b-a|0)+3&-4)}a=H[e+8>>2];if(a){oa(a)}ca=e+32|0;break b}sa();v()}sa();v()}i=c}return i}function zd(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;j=H[b+8>>2];l=H[b+12>>2];k=H[b+20>>2];i=H[b+16>>2];f=i+4|0;k=f>>>0<4?k+1|0:k;a:{if(f>>>0>j>>>0&(k|0)>=(l|0)|(k|0)>(l|0)){break a}i=i+H[b>>2]|0;H[a>>2]=I[i|0]|I[i+1|0]<<8|(I[i+2|0]<<16|I[i+3|0]<<24);i=H[b+20>>2];j=i;f=H[b+16>>2];i=f+4|0;l=i>>>0<4?j+1|0:j;H[b+16>>2]=i;H[b+20>>2]=l;if(K[a>>2]>32){break a}l=H[b+8>>2];k=H[b+12>>2];f=f+8|0;j=f>>>0<8?j+1|0:j;if((k|0)<=(j|0)&f>>>0>l>>>0|(k|0)<(j|0)){break a}i=H[b>>2]+i|0;f=I[i|0]|I[i+1|0]<<8|(I[i+2|0]<<16|I[i+3|0]<<24);H[a+4>>2]=f;j=H[b+20>>2];i=H[b+16>>2]+4|0;j=i>>>0<4?j+1|0:j;H[b+16>>2]=i;H[b+20>>2]=j;if(!f){return 1}if(d>>>0>>0){break a}H[a+8>>2]=0;if(!ua(a+16|0,b)){break a}if(!ua(a+36|0,b)){break a}if(!ua(a+56|0,b)){break a}if(!ua(a+76|0,b)){break a}t=H[a+4>>2];i=c;b=0;c=0;e=ca-32|0;ca=e;f=a;a=H[a+12>>2];H[e+16>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;b:{c:{if(a){if(a>>>0>=1073741824){break c}d=a<<2;b=pa(d);H[e+8>>2]=b;c=b+d|0;H[e+16>>2]=c;ra(b,0,d);H[e+12>>2]=c}g=H[f+120>>2];d=H[g>>2];if(d){H[g+4>>2]=d;oa(d);c=H[e+12>>2];b=H[e+8>>2];a=H[f+12>>2]}H[g+4>>2]=c;H[g>>2]=b;H[g+8>>2]=H[e+16>>2];b=0;H[e+16>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;d:{if(a){if(a>>>0>=1073741824){break d}a=a<<2;h=pa(a);H[e+8>>2]=h;b=a+h|0;H[e+16>>2]=b;ra(h,0,a);H[e+12>>2]=b}c=H[f+132>>2];a=H[c>>2];if(a){H[c+4>>2]=a;oa(a);h=H[e+8>>2];b=H[e+12>>2]}H[c+4>>2]=b;H[c>>2]=h;H[c+8>>2]=H[e+16>>2];H[e+24>>2]=0;H[e+28>>2]=0;H[e+16>>2]=0;H[e+20>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;xa(e+8|0);b=H[e+24>>2]+H[e+28>>2]|0;a=(b>>>0)/341|0;a=H[H[e+12>>2]+(a<<2)>>2]+N(b-N(a,341)|0,12)|0;H[a+4>>2]=0;H[a+8>>2]=0;H[a>>2]=t;d=1;a=H[e+28>>2]+1|0;H[e+28>>2]=a;e:{if(!a){break e}while(1){j=H[e+12>>2];g=H[e+24>>2];d=a-1|0;c=g+d|0;b=(c>>>0)/341|0;b=H[j+(b<<2)>>2]+N(c-N(b,341)|0,12)|0;n=H[b+8>>2];c=H[b+4>>2];m=H[b>>2];H[e+28>>2]=d;b=H[e+16>>2];if((((b|0)!=(j|0)?N(b-j>>2,341)-1|0:0)-(a+g|0)|0)+1>>>0>=682){oa(H[b-4>>2]);H[e+16>>2]=H[e+16>>2]-4}if(m>>>0>t>>>0){d=0;break e}d=0;b=H[f+12>>2];a=(c|0)!=(b-1|0)?c+1|0:0;if(a>>>0>=b>>>0){break e}b=H[f+120>>2];o=N(n,12);q=b+o|0;g=H[f>>2];h=a<<2;l=o+H[f+132>>2]|0;c=H[h+H[l>>2]>>2];f:{g:{if((g|0)==(c|0)){if(!m){break g}h=0;b=H[i+20>>2];c=H[i+16>>2];if((b|0)==(c|0)){a=H[f+8>>2];H[i+28>>2]=m+H[i+28>>2];H[f+8>>2]=a+m;break g}while(1){d=(b|0)==(c|0);a=b;g=0;b=c;h:{if(d){break h}while(1){d=H[i+28>>2];b=a;k=N(g,20)+c|0;l=H[k>>2];if(!I[l+84|0]){d=H[H[l+68>>2]+(d<<2)>>2]}if(K[l+80>>2]<=d>>>0){break h}j=H[q>>2]+(H[k+4>>2]<<2)|0;c=H[k+12>>2];b=j;i:{if(c>>>0>3){break i}a=0;b=H[i+12>>2];if(!H[k+16>>2]){break i}while(1){b=qa(b,j+(a<<2)|0,c);c=H[k+12>>2];b=b+c|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[i+12>>2]}a=H[l+40>>2];qa(H[H[l>>2]>>2]+N(a,d)|0,b,a);g=g+1|0;a=H[i+20>>2];b=a;c=H[i+16>>2];if(g>>>0<(b-c|0)/20>>>0){continue}break}}H[i+28>>2]=H[i+28>>2]+1;H[f+8>>2]=H[f+8>>2]+1;h=h+1|0;if((m|0)!=(h|0)){continue}break}break g}j:{k:{l:{m:{if(m>>>0<=2){c=H[f+108>>2];H[c>>2]=a;h=1;b=H[f+12>>2];if(b>>>0>1){break m}break j}if(K[f+8>>2]>K[f+4>>2]){break e}j=b;b=o+12|0;Aa(j+b|0,H[q>>2],H[q+4>>2]);b=h+H[b+H[f+120>>2]>>2]|0;H[b>>2]=H[b>>2]+(1<>2];g=32-l|0;n:{if((k|0)<=(g|0)){g=H[f+28>>2];if((g|0)==H[f+20>>2]){break l}c=H[g>>2];b=k+l|0;H[f+32>>2]=b;c=c<>>32-k|0;if((b|0)!=32){break n}H[f+32>>2]=0;H[f+28>>2]=g+4;break n}j=H[f+28>>2];b=j+4|0;if((b|0)==H[f+20>>2]){break l}c=H[j>>2];H[f+28>>2]=b;b=k-g|0;H[f+32>>2]=b;c=H[j+4>>2]>>>32-b|c<>>32-k}g=m>>>1|0;if(g>>>0>>0){break e}break k}while(1){a=(b-1|0)!=(a|0)?a+1|0:0;H[c+(h<<2)>>2]=a;b=H[f+12>>2];h=h+1|0;if(b>>>0>h>>>0){continue}break}break j}g=m>>>1|0;c=0}k=n+1|0;o:{p:{b=g-c|0;c=m-b|0;q:{if((c|0)==(b|0)){c=b;break q}l=H[f+88>>2];if((l|0)==H[f+80>>2]){break p}j=H[l>>2];g=H[f+92>>2];d=g+1|0;H[f+92>>2]=d;g=j&-2147483648>>>g;r:{if((d|0)==32){H[f+92>>2]=0;H[f+88>>2]=l+4;if(g){break r}break p}if(!g){break p}}}g=c;c=b;break o}g=b}l=H[f+132>>2];j=l+o|0;d=H[j>>2];b=d+h|0;H[b>>2]=H[b>>2]+1;Aa(l+N(k,12)|0,d,H[j+4>>2]);if(c){b=H[e+28>>2]+H[e+24>>2]|0;d=H[e+16>>2];h=H[e+12>>2];if((b|0)==(((d|0)!=(h|0)?N(d-h>>2,341)-1|0:0)|0)){xa(e+8|0);h=H[e+12>>2];b=H[e+24>>2]+H[e+28>>2]|0}d=(b>>>0)/341|0;b=H[(d<<2)+h>>2]+N(b-N(d,341)|0,12)|0;H[b+8>>2]=n;H[b+4>>2]=a;H[b>>2]=c;H[e+28>>2]=H[e+28>>2]+1}if(!g){break g}b=H[e+28>>2]+H[e+24>>2]|0;c=H[e+16>>2];h=H[e+12>>2];if((b|0)==(((c|0)!=(h|0)?N(c-h>>2,341)-1|0:0)|0)){xa(e+8|0);h=H[e+12>>2];b=H[e+24>>2]+H[e+28>>2]|0}c=(b>>>0)/341|0;b=H[(c<<2)+h>>2]+N(b-N(c,341)|0,12)|0;H[b+8>>2]=k;H[b+4>>2]=a;H[b>>2]=g;a=H[e+28>>2]+1|0;H[e+28>>2]=a;break f}r=0;if(!m){break g}while(1){if(H[f+12>>2]){u=H[f+40>>2];j=H[l>>2];s=H[f+96>>2];g=H[f+108>>2];a=0;while(1){n=(a<<2)+g|0;H[s+(H[n>>2]<<2)>>2]=0;d=H[f>>2];c=H[n>>2]<<2;b=H[c+j>>2];s:{if((d|0)==(b|0)){break s}o=c+s|0;p=d-b|0;h=H[f+52>>2];d=32-h|0;if((p|0)<=(d|0)){c=H[f+48>>2];if((c|0)==(u|0)){d=0;break e}H[o>>2]=H[c>>2]<>>32-p;b=p+H[f+52>>2]|0;H[f+52>>2]=b;if((b|0)!=32){break s}H[f+52>>2]=0;H[f+48>>2]=c+4;break s}k=H[f+48>>2];b=k+4|0;if((u|0)==(b|0)){d=0;break e}c=H[k>>2];H[f+48>>2]=b;b=p-d|0;H[f+52>>2]=b;H[o>>2]=H[k+4>>2]>>>32-b|c<>>32-p}c=H[n>>2]<<2;b=c+s|0;H[b>>2]=H[b>>2]|H[c+H[q>>2]>>2];a=a+1|0;if(a>>>0>2]){continue}break}}g=0;a=H[i+16>>2];t:{if((a|0)==H[i+20>>2]){break t}while(1){d=H[i+28>>2];h=N(g,20)+a|0;k=H[h>>2];if(!I[k+84|0]){d=H[H[k+68>>2]+(d<<2)>>2]}if(K[k+80>>2]<=d>>>0){break t}j=H[f+96>>2]+(H[h+4>>2]<<2)|0;c=H[h+12>>2];b=j;u:{if(c>>>0>3){break u}a=0;b=H[i+12>>2];if(!H[h+16>>2]){break u}while(1){b=qa(b,j+(a<<2)|0,c);c=H[h+12>>2];b=b+c|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[i+12>>2]}a=H[k+40>>2];qa(H[H[k>>2]>>2]+N(a,d)|0,b,a);g=g+1|0;a=H[i+16>>2];if(g>>>0<(H[i+20>>2]-a|0)/20>>>0){continue}break}}H[i+28>>2]=H[i+28>>2]+1;H[f+8>>2]=H[f+8>>2]+1;r=r+1|0;if((m|0)!=(r|0)){continue}break}}a=H[e+28>>2]}if(a){continue}break}d=1}H[e+28>>2]=0;h=H[e+16>>2];a=H[e+12>>2];b=h-a|0;if(b>>>0>=9){while(1){oa(H[a>>2]);a=H[e+12>>2]+4|0;H[e+12>>2]=a;h=H[e+16>>2];b=h-a|0;if(b>>>0>8){continue}break}}c=170;v:{switch((b>>>2|0)-1|0){case 1:c=341;case 0:H[e+24>>2]=c;break;default:break v}}w:{if((a|0)==(h|0)){break w}while(1){oa(H[a>>2]);a=a+4|0;if((h|0)!=(a|0)){continue}break}b=H[e+16>>2];a=H[e+12>>2];if((b|0)==(a|0)){break w}H[e+16>>2]=b+((a-b|0)+3&-4)}a=H[e+8>>2];if(a){oa(a)}ca=e+32|0;g=d;break b}sa();v()}sa();v()}}return g}function wd(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;i=H[b+8>>2];j=H[b+12>>2];n=H[b+20>>2];e=H[b+16>>2];h=e+4|0;n=h>>>0<4?n+1|0:n;a:{if(i>>>0>>0&(j|0)<=(n|0)|(j|0)<(n|0)){break a}e=e+H[b>>2]|0;H[a>>2]=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);e=H[b+20>>2];i=e;h=H[b+16>>2];e=h+4|0;j=e>>>0<4?i+1|0:i;H[b+16>>2]=e;H[b+20>>2]=j;if(K[a>>2]>32){break a}j=H[b+8>>2];n=H[b+12>>2];h=h+8|0;i=h>>>0<8?i+1|0:i;if(h>>>0>j>>>0&(i|0)>=(n|0)|(i|0)>(n|0)){break a}e=H[b>>2]+e|0;h=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);H[a+4>>2]=h;i=H[b+20>>2];e=H[b+16>>2]+4|0;i=e>>>0<4?i+1|0:i;H[b+16>>2]=e;H[b+20>>2]=i;if(!h){return 1}if(d>>>0>>0){break a}H[a+8>>2]=0;if(!sb(a+16|0,b)){break a}if(!ua(a+544|0,b)){break a}if(!ua(a+564|0,b)){break a}if(!ua(a+584|0,b)){break a}u=H[a+4>>2];d=c;b=0;c=0;f=ca-32|0;ca=f;g=a;a=H[a+12>>2];H[f+16>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;b:{c:{if(a){if(a>>>0>=1073741824){break c}e=a<<2;b=pa(e);H[f+8>>2]=b;c=b+e|0;H[f+16>>2]=c;ra(b,0,e);H[f+12>>2]=c}h=H[g+628>>2];e=H[h>>2];if(e){H[h+4>>2]=e;oa(e);c=H[f+12>>2];b=H[f+8>>2];a=H[g+12>>2]}H[h+4>>2]=c;H[h>>2]=b;H[h+8>>2]=H[f+16>>2];b=0;H[f+16>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;d:{if(a){if(a>>>0>=1073741824){break d}a=a<<2;k=pa(a);H[f+8>>2]=k;b=a+k|0;H[f+16>>2]=b;ra(k,0,a);H[f+12>>2]=b}c=H[g+640>>2];a=H[c>>2];if(a){H[c+4>>2]=a;oa(a);k=H[f+8>>2];b=H[f+12>>2]}H[c+4>>2]=b;H[c>>2]=k;H[c+8>>2]=H[f+16>>2];H[f+24>>2]=0;H[f+28>>2]=0;H[f+16>>2]=0;H[f+20>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;xa(f+8|0);b=H[f+24>>2]+H[f+28>>2]|0;a=(b>>>0)/341|0;a=H[H[f+12>>2]+(a<<2)>>2]+N(b-N(a,341)|0,12)|0;H[a+4>>2]=0;H[a+8>>2]=0;H[a>>2]=u;c=1;a=H[f+28>>2]+1|0;H[f+28>>2]=a;e:{if(!a){break e}n=g+16|0;while(1){j=H[f+12>>2];h=H[f+24>>2];e=a-1|0;c=h+e|0;b=(c>>>0)/341|0;b=H[j+(b<<2)>>2]+N(c-N(b,341)|0,12)|0;q=H[b+8>>2];i=H[b+4>>2];o=H[b>>2];H[f+28>>2]=e;b=H[f+16>>2];if((((b|0)!=(j|0)?N(b-j>>2,341)-1|0:0)-(a+h|0)|0)+1>>>0>=682){oa(H[b-4>>2]);H[f+16>>2]=H[f+16>>2]-4}c=0;if(o>>>0>u>>>0){break e}a=H[g+12>>2];k=(i|0)!=(a-1|0)?i+1|0:0;if(k>>>0>=a>>>0){break e}p=N(q,12);w=p+H[g+640>>2]|0;r=p+H[g+628>>2]|0;h=H[g>>2];l=k<<2;e=H[l+H[w>>2]>>2];f:{g:{if((h|0)==(e|0)){if(!o){break g}c=H[d+16>>2];b=H[d+20>>2];m=0;while(1){e=(b|0)==(c|0);a=b;j=0;b=c;h:{if(e){break h}while(1){l=H[d+28>>2];b=a;i=N(j,20)+c|0;h=H[i>>2];if(!I[h+84|0]){l=H[H[h+68>>2]+(l<<2)>>2]}if(K[h+80>>2]<=l>>>0){break h}e=H[r>>2]+(H[i+4>>2]<<2)|0;c=H[i+12>>2];b=e;i:{if(c>>>0>3){break i}a=0;b=H[d+12>>2];if(!H[i+16>>2]){break i}while(1){b=qa(b,e+(a<<2)|0,c);c=H[i+12>>2];b=b+c|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[d+12>>2]}a=H[h+40>>2];qa(H[H[h>>2]>>2]+N(a,l)|0,b,a);a=H[d+20>>2];b=a;j=j+1|0;c=H[d+16>>2];if(j>>>0<(a-c|0)/20>>>0){continue}break}}H[d+28>>2]=H[d+28>>2]+1;H[g+8>>2]=H[g+8>>2]+1;m=m+1|0;if((o|0)!=(m|0)){continue}break}break g}j:{k:{l:{if(o>>>0<=2){c=H[g+616>>2];H[c>>2]=k;a=1;b=H[g+12>>2];if(b>>>0>1){break l}break j}if(K[g+8>>2]>K[g+4>>2]){break e}a=H[g+628>>2];j=q+1|0;m=N(j,12);b=a+m|0;if((b|0)!=(r|0)){Aa(b,H[r>>2],H[r+4>>2]);a=H[g+628>>2]}a=l+H[a+m>>2]|0;H[a>>2]=H[a>>2]+(1<>>1|0;break k}while(1){b=Ba((a<<4)+n|0)|b<<1;a=a+1|0;if((c|0)!=(a|0)){continue}break}a=o>>>1|0;if(b>>>0<=a>>>0){break k}c=0;break e}while(1){k=(b-1|0)!=(k|0)?k+1|0:0;H[c+(a<<2)>>2]=k;a=a+1|0;b=H[g+12>>2];if(a>>>0>>0){continue}break}break j}m:{n:{b=a-b|0;a=o-b|0;o:{if((a|0)==(b|0)){a=b;break o}i=H[g+596>>2];if((i|0)==H[g+588>>2]){break n}h=H[i>>2];e=H[g+600>>2];c=e+1|0;H[g+600>>2]=c;e=h&-2147483648>>>e;p:{if((c|0)==32){H[g+600>>2]=0;H[g+596>>2]=i+4;if(e){break p}break n}if(!e){break n}}}c=a;a=b;break m}c=b}i=H[g+640>>2];h=i+p|0;e=H[h>>2];b=e+l|0;H[b>>2]=H[b>>2]+1;Aa(i+m|0,e,H[h+4>>2]);if(a){m=H[f+28>>2]+H[f+24>>2]|0;e=H[f+16>>2];b=H[f+12>>2];if((m|0)==(((b|0)!=(e|0)?N(e-b>>2,341)-1|0:0)|0)){xa(f+8|0);m=H[f+24>>2]+H[f+28>>2]|0;e=H[f+12>>2]}else{e=b}b=(m>>>0)/341|0;b=H[e+(b<<2)>>2]+N(m-N(b,341)|0,12)|0;H[b+8>>2]=q;H[b+4>>2]=k;H[b>>2]=a;H[f+28>>2]=H[f+28>>2]+1}if(!c){break g}b=H[f+28>>2]+H[f+24>>2]|0;e=H[f+16>>2];a=H[f+12>>2];if((b|0)==(((a|0)!=(e|0)?N(e-a>>2,341)-1|0:0)|0)){xa(f+8|0);b=H[f+24>>2]+H[f+28>>2]|0;e=H[f+12>>2]}else{e=a}a=(b>>>0)/341|0;a=H[e+(a<<2)>>2]+N(b-N(a,341)|0,12)|0;H[a+8>>2]=j;H[a+4>>2]=k;H[a>>2]=c;a=H[f+28>>2]+1|0;H[f+28>>2]=a;break f}k=0;if(!o){break g}while(1){if(H[g+12>>2]){q=H[g+548>>2];i=H[w>>2];t=H[g+604>>2];h=H[g+616>>2];a=0;while(1){p=(a<<2)+h|0;H[t+(H[p>>2]<<2)>>2]=0;e=H[g>>2];c=H[p>>2]<<2;b=H[c+i>>2];q:{if((e|0)==(b|0)){break q}l=c+t|0;s=e-b|0;m=H[g+560>>2];e=32-m|0;if((s|0)<=(e|0)){c=H[g+556>>2];if((c|0)==(q|0)){c=0;break e}H[l>>2]=H[c>>2]<>>32-s;b=s+H[g+560>>2]|0;H[g+560>>2]=b;if((b|0)!=32){break q}H[g+560>>2]=0;H[g+556>>2]=c+4;break q}j=H[g+556>>2];b=j+4|0;if((q|0)==(b|0)){c=0;break e}c=H[j>>2];H[g+556>>2]=b;b=s-e|0;H[g+560>>2]=b;H[l>>2]=H[j+4>>2]>>>32-b|c<>>32-s}c=H[p>>2]<<2;b=c+t|0;H[b>>2]=H[b>>2]|H[c+H[r>>2]>>2];a=a+1|0;if(a>>>0>2]){continue}break}}j=0;a=H[d+16>>2];r:{if((a|0)==H[d+20>>2]){break r}while(1){l=H[d+28>>2];i=N(j,20)+a|0;h=H[i>>2];if(!I[h+84|0]){l=H[H[h+68>>2]+(l<<2)>>2]}if(K[h+80>>2]<=l>>>0){break r}e=H[g+604>>2]+(H[i+4>>2]<<2)|0;c=H[i+12>>2];b=e;s:{if(c>>>0>3){break s}a=0;b=H[d+12>>2];if(!H[i+16>>2]){break s}while(1){b=qa(b,e+(a<<2)|0,c);c=H[i+12>>2];b=b+c|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[d+12>>2]}a=H[h+40>>2];qa(H[H[h>>2]>>2]+N(a,l)|0,b,a);j=j+1|0;a=H[d+16>>2];if(j>>>0<(H[d+20>>2]-a|0)/20>>>0){continue}break}}H[d+28>>2]=H[d+28>>2]+1;H[g+8>>2]=H[g+8>>2]+1;k=k+1|0;if((o|0)!=(k|0)){continue}break}}a=H[f+28>>2]}if(a){continue}break}c=1}H[f+28>>2]=0;k=H[f+16>>2];a=H[f+12>>2];b=k-a|0;if(b>>>0>=9){while(1){oa(H[a>>2]);a=H[f+12>>2]+4|0;H[f+12>>2]=a;k=H[f+16>>2];b=k-a|0;if(b>>>0>8){continue}break}}d=170;t:{switch((b>>>2|0)-1|0){case 1:d=341;case 0:H[f+24>>2]=d;break;default:break t}}u:{if((a|0)==(k|0)){break u}while(1){oa(H[a>>2]);a=a+4|0;if((k|0)!=(a|0)){continue}break}b=H[f+16>>2];a=H[f+12>>2];if((b|0)==(a|0)){break u}H[f+16>>2]=b+((a-b|0)+3&-4)}a=H[f+8>>2];if(a){oa(a)}ca=f+32|0;break b}sa();v()}sa();v()}g=c}return g}function ud(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;i=H[b+8>>2];k=H[b+12>>2];o=H[b+20>>2];e=H[b+16>>2];h=e+4|0;o=h>>>0<4?o+1|0:o;a:{if(i>>>0>>0&(k|0)<=(o|0)|(k|0)<(o|0)){break a}e=e+H[b>>2]|0;H[a>>2]=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);e=H[b+20>>2];i=e;h=H[b+16>>2];e=h+4|0;k=e>>>0<4?i+1|0:i;H[b+16>>2]=e;H[b+20>>2]=k;if(K[a>>2]>32){break a}k=H[b+8>>2];o=H[b+12>>2];h=h+8|0;i=h>>>0<8?i+1|0:i;if(h>>>0>k>>>0&(i|0)>=(o|0)|(i|0)>(o|0)){break a}e=H[b>>2]+e|0;h=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);H[a+4>>2]=h;i=H[b+20>>2];e=H[b+16>>2]+4|0;i=e>>>0<4?i+1|0:i;H[b+16>>2]=e;H[b+20>>2]=i;if(!h){return 1}if(d>>>0>>0){break a}H[a+8>>2]=0;if(!sb(a+16|0,b)){break a}if(!ua(a+544|0,b)){break a}if(!ua(a+564|0,b)){break a}if(!ua(a+584|0,b)){break a}w=H[a+4>>2];d=c;b=0;c=0;f=ca-32|0;ca=f;g=a;a=H[a+12>>2];H[f+16>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;b:{c:{if(a){if(a>>>0>=1073741824){break c}e=a<<2;b=pa(e);H[f+8>>2]=b;c=b+e|0;H[f+16>>2]=c;ra(b,0,e);H[f+12>>2]=c}h=H[g+628>>2];e=H[h>>2];if(e){H[h+4>>2]=e;oa(e);c=H[f+12>>2];b=H[f+8>>2];a=H[g+12>>2]}H[h+4>>2]=c;H[h>>2]=b;H[h+8>>2]=H[f+16>>2];b=0;H[f+16>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;d:{if(a){if(a>>>0>=1073741824){break d}a=a<<2;j=pa(a);H[f+8>>2]=j;b=a+j|0;H[f+16>>2]=b;ra(j,0,a);H[f+12>>2]=b}c=H[g+640>>2];a=H[c>>2];if(a){H[c+4>>2]=a;oa(a);j=H[f+8>>2];b=H[f+12>>2]}H[c+4>>2]=b;H[c>>2]=j;H[c+8>>2]=H[f+16>>2];H[f+24>>2]=0;H[f+28>>2]=0;H[f+16>>2]=0;H[f+20>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;xa(f+8|0);b=H[f+24>>2]+H[f+28>>2]|0;a=(b>>>0)/341|0;a=H[H[f+12>>2]+(a<<2)>>2]+N(b-N(a,341)|0,12)|0;H[a+4>>2]=0;H[a+8>>2]=0;H[a>>2]=w;c=1;a=H[f+28>>2]+1|0;H[f+28>>2]=a;e:{if(!a){break e}o=g+16|0;while(1){i=H[f+12>>2];h=H[f+24>>2];e=a-1|0;c=h+e|0;b=(c>>>0)/341|0;b=H[i+(b<<2)>>2]+N(c-N(b,341)|0,12)|0;q=H[b+8>>2];n=H[b>>2];H[f+28>>2]=e;b=H[f+16>>2];if((((b|0)!=(i|0)?N(b-i>>2,341)-1|0:0)-(a+h|0)|0)+1>>>0>=682){oa(H[b-4>>2]);H[f+16>>2]=H[f+16>>2]-4}c=0;if(n>>>0>w>>>0){break e}a=H[g+628>>2];p=N(q,12);t=p+H[g+640>>2]|0;j=Vd(g,n,t);if(j>>>0>=K[g+12>>2]){break e}r=a+p|0;h=H[g>>2];l=j<<2;e=H[l+H[t>>2]>>2];f:{g:{if((h|0)==(e|0)){if(!n){break g}c=H[d+16>>2];b=H[d+20>>2];m=0;while(1){e=(b|0)==(c|0);a=b;k=0;b=c;h:{if(e){break h}while(1){l=H[d+28>>2];b=a;i=N(k,20)+c|0;h=H[i>>2];if(!I[h+84|0]){l=H[H[h+68>>2]+(l<<2)>>2]}if(K[h+80>>2]<=l>>>0){break h}e=H[r>>2]+(H[i+4>>2]<<2)|0;c=H[i+12>>2];b=e;i:{if(c>>>0>3){break i}a=0;b=H[d+12>>2];if(!H[i+16>>2]){break i}while(1){b=qa(b,e+(a<<2)|0,c);c=H[i+12>>2];b=b+c|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[d+12>>2]}a=H[h+40>>2];qa(H[H[h>>2]>>2]+N(a,l)|0,b,a);a=H[d+20>>2];b=a;k=k+1|0;c=H[d+16>>2];if(k>>>0<(a-c|0)/20>>>0){continue}break}}H[d+28>>2]=H[d+28>>2]+1;H[g+8>>2]=H[g+8>>2]+1;m=m+1|0;if((n|0)!=(m|0)){continue}break}break g}j:{k:{l:{if(n>>>0<=2){c=H[g+616>>2];H[c>>2]=j;a=1;b=H[g+12>>2];if(b>>>0>1){break l}break j}if(K[g+8>>2]>K[g+4>>2]){break e}a=H[g+628>>2];k=q+1|0;m=N(k,12);b=a+m|0;if((b|0)!=(r|0)){Aa(b,H[r>>2],H[r+4>>2]);a=H[g+628>>2]}a=l+H[a+m>>2]|0;H[a>>2]=H[a>>2]+(1<>>1|0;break k}while(1){b=Ba((a<<4)+o|0)|b<<1;a=a+1|0;if((c|0)!=(a|0)){continue}break}a=n>>>1|0;if(b>>>0<=a>>>0){break k}c=0;break e}while(1){j=(b-1|0)!=(j|0)?j+1|0:0;H[c+(a<<2)>>2]=j;a=a+1|0;b=H[g+12>>2];if(a>>>0>>0){continue}break}break j}m:{n:{b=a-b|0;a=n-b|0;o:{if((a|0)==(b|0)){a=b;break o}i=H[g+596>>2];if((i|0)==H[g+588>>2]){break n}h=H[i>>2];e=H[g+600>>2];c=e+1|0;H[g+600>>2]=c;e=h&-2147483648>>>e;p:{if((c|0)==32){H[g+600>>2]=0;H[g+596>>2]=i+4;if(e){break p}break n}if(!e){break n}}}c=a;a=b;break m}c=b}i=H[g+640>>2];h=i+p|0;e=H[h>>2];b=e+l|0;H[b>>2]=H[b>>2]+1;Aa(i+m|0,e,H[h+4>>2]);if(a){m=H[f+28>>2]+H[f+24>>2]|0;e=H[f+16>>2];b=H[f+12>>2];if((m|0)==(((b|0)!=(e|0)?N(e-b>>2,341)-1|0:0)|0)){xa(f+8|0);m=H[f+24>>2]+H[f+28>>2]|0;e=H[f+12>>2]}else{e=b}b=(m>>>0)/341|0;b=H[e+(b<<2)>>2]+N(m-N(b,341)|0,12)|0;H[b+8>>2]=q;H[b+4>>2]=j;H[b>>2]=a;H[f+28>>2]=H[f+28>>2]+1}if(!c){break g}b=H[f+28>>2]+H[f+24>>2]|0;e=H[f+16>>2];a=H[f+12>>2];if((b|0)==(((a|0)!=(e|0)?N(e-a>>2,341)-1|0:0)|0)){xa(f+8|0);b=H[f+24>>2]+H[f+28>>2]|0;e=H[f+12>>2]}else{e=a}a=(b>>>0)/341|0;a=H[e+(a<<2)>>2]+N(b-N(a,341)|0,12)|0;H[a+8>>2]=k;H[a+4>>2]=j;H[a>>2]=c;a=H[f+28>>2]+1|0;H[f+28>>2]=a;break f}j=0;if(!n){break g}while(1){if(H[g+12>>2]){q=H[g+548>>2];i=H[t>>2];u=H[g+604>>2];h=H[g+616>>2];a=0;while(1){p=(a<<2)+h|0;H[u+(H[p>>2]<<2)>>2]=0;e=H[g>>2];c=H[p>>2]<<2;b=H[c+i>>2];q:{if((e|0)==(b|0)){break q}l=c+u|0;s=e-b|0;m=H[g+560>>2];e=32-m|0;if((s|0)<=(e|0)){c=H[g+556>>2];if((c|0)==(q|0)){c=0;break e}H[l>>2]=H[c>>2]<>>32-s;b=s+H[g+560>>2]|0;H[g+560>>2]=b;if((b|0)!=32){break q}H[g+560>>2]=0;H[g+556>>2]=c+4;break q}k=H[g+556>>2];b=k+4|0;if((q|0)==(b|0)){c=0;break e}c=H[k>>2];H[g+556>>2]=b;b=s-e|0;H[g+560>>2]=b;H[l>>2]=H[k+4>>2]>>>32-b|c<>>32-s}c=H[p>>2]<<2;b=c+u|0;H[b>>2]=H[b>>2]|H[c+H[r>>2]>>2];a=a+1|0;if(a>>>0>2]){continue}break}}k=0;a=H[d+16>>2];r:{if((a|0)==H[d+20>>2]){break r}while(1){l=H[d+28>>2];i=N(k,20)+a|0;h=H[i>>2];if(!I[h+84|0]){l=H[H[h+68>>2]+(l<<2)>>2]}if(K[h+80>>2]<=l>>>0){break r}e=H[g+604>>2]+(H[i+4>>2]<<2)|0;c=H[i+12>>2];b=e;s:{if(c>>>0>3){break s}a=0;b=H[d+12>>2];if(!H[i+16>>2]){break s}while(1){b=qa(b,e+(a<<2)|0,c);c=H[i+12>>2];b=b+c|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[d+12>>2]}a=H[h+40>>2];qa(H[H[h>>2]>>2]+N(a,l)|0,b,a);k=k+1|0;a=H[d+16>>2];if(k>>>0<(H[d+20>>2]-a|0)/20>>>0){continue}break}}H[d+28>>2]=H[d+28>>2]+1;H[g+8>>2]=H[g+8>>2]+1;j=j+1|0;if((n|0)!=(j|0)){continue}break}}a=H[f+28>>2]}if(a){continue}break}c=1}H[f+28>>2]=0;j=H[f+16>>2];a=H[f+12>>2];b=j-a|0;if(b>>>0>=9){while(1){oa(H[a>>2]);a=H[f+12>>2]+4|0;H[f+12>>2]=a;j=H[f+16>>2];b=j-a|0;if(b>>>0>8){continue}break}}d=170;t:{switch((b>>>2|0)-1|0){case 1:d=341;case 0:H[f+24>>2]=d;break;default:break t}}u:{if((a|0)==(j|0)){break u}while(1){oa(H[a>>2]);a=a+4|0;if((j|0)!=(a|0)){continue}break}b=H[f+16>>2];a=H[f+12>>2];if((b|0)==(a|0)){break u}H[f+16>>2]=b+((a-b|0)+3&-4)}a=H[f+8>>2];if(a){oa(a)}ca=f+32|0;break b}sa();v()}sa();v()}g=c}return g}function vd(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;i=H[b+8>>2];k=H[b+12>>2];m=H[b+20>>2];f=H[b+16>>2];h=f+4|0;m=h>>>0<4?m+1|0:m;a:{if(i>>>0>>0&(k|0)<=(m|0)|(k|0)<(m|0)){break a}f=f+H[b>>2]|0;H[a>>2]=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);f=H[b+20>>2];i=f;h=H[b+16>>2];f=h+4|0;k=f>>>0<4?i+1|0:i;H[b+16>>2]=f;H[b+20>>2]=k;if(K[a>>2]>32){break a}k=H[b+8>>2];m=H[b+12>>2];h=h+8|0;i=h>>>0<8?i+1|0:i;if(h>>>0>k>>>0&(i|0)>=(m|0)|(i|0)>(m|0)){break a}f=f+H[b>>2]|0;h=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);H[a+4>>2]=h;i=H[b+20>>2];f=H[b+16>>2]+4|0;i=f>>>0<4?i+1|0:i;H[b+16>>2]=f;H[b+20>>2]=i;if(!h){return 1}if(d>>>0>>0){break a}H[a+8>>2]=0;if(!sb(a+16|0,b)){break a}if(!ua(a+544|0,b)){break a}if(!ua(a+564|0,b)){break a}if(!ua(a+584|0,b)){break a}u=H[a+4>>2];b=0;e=ca-32|0;ca=e;f=a;a=H[a+12>>2];H[e+16>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;b:{c:{if(a){if(a>>>0>=1073741824){break c}d=a<<2;b=pa(d);H[e+8>>2]=b;g=b+d|0;H[e+16>>2]=g;ra(b,0,d);H[e+12>>2]=g}h=H[f+628>>2];d=H[h>>2];if(d){H[h+4>>2]=d;oa(d);g=H[e+12>>2];b=H[e+8>>2];a=H[f+12>>2]}H[h+4>>2]=g;H[h>>2]=b;H[h+8>>2]=H[e+16>>2];b=0;H[e+16>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;d:{if(a){if(a>>>0>=1073741824){break d}a=a<<2;j=pa(a);H[e+8>>2]=j;b=a+j|0;H[e+16>>2]=b;ra(j,0,a);H[e+12>>2]=b}d=H[f+640>>2];a=H[d>>2];if(a){H[d+4>>2]=a;oa(a);j=H[e+8>>2];b=H[e+12>>2]}H[d+4>>2]=b;H[d>>2]=j;H[d+8>>2]=H[e+16>>2];H[e+24>>2]=0;H[e+28>>2]=0;H[e+16>>2]=0;H[e+20>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;xa(e+8|0);b=H[e+24>>2]+H[e+28>>2]|0;a=(b>>>0)/341|0;a=H[H[e+12>>2]+(a<<2)>>2]+N(b-N(a,341)|0,12)|0;H[a+4>>2]=0;H[a+8>>2]=0;H[a>>2]=u;d=1;a=H[e+28>>2]+1|0;H[e+28>>2]=a;e:{if(!a){break e}m=f+16|0;while(1){k=H[e+12>>2];h=H[e+24>>2];g=a-1|0;d=h+g|0;b=(d>>>0)/341|0;b=H[k+(b<<2)>>2]+N(d-N(b,341)|0,12)|0;q=H[b+8>>2];i=H[b+4>>2];n=H[b>>2];H[e+28>>2]=g;b=H[e+16>>2];if((((b|0)!=(k|0)?N(b-k>>2,341)-1|0:0)-(a+h|0)|0)+1>>>0>=682){oa(H[b-4>>2]);H[e+16>>2]=H[e+16>>2]-4}if(n>>>0>u>>>0){d=0;break e}d=0;a=H[f+12>>2];j=(i|0)!=(a-1|0)?i+1|0:0;if(j>>>0>=a>>>0){break e}a=H[f+628>>2];o=N(q,12);s=a+o|0;g=H[f>>2];l=j<<2;k=o+H[f+640>>2]|0;b=H[l+H[k>>2]>>2];f:{g:{if((g|0)==(b|0)){if(!n){break g}g=H[c+16>>2];b=H[c+20>>2];p=0;while(1){d=(b|0)==(g|0);a=b;j=0;b=g;h:{if(d){break h}while(1){d=H[c+28>>2];b=a;k=N(j,20)+g|0;i=H[k>>2];if(!I[i+84|0]){d=H[H[i+68>>2]+(d<<2)>>2]}if(K[i+80>>2]<=d>>>0){break h}h=H[s>>2]+(H[k+4>>2]<<2)|0;g=H[k+12>>2];b=h;i:{if(g>>>0>3){break i}a=0;b=H[c+12>>2];if(!H[k+16>>2]){break i}while(1){b=qa(b,h+(a<<2)|0,g);g=H[k+12>>2];b=b+g|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[c+12>>2]}a=H[i+40>>2];qa(H[H[i>>2]>>2]+N(a,d)|0,b,a);a=H[c+20>>2];b=a;j=j+1|0;g=H[c+16>>2];if(j>>>0<(a-g|0)/20>>>0){continue}break}}H[c+28>>2]=H[c+28>>2]+1;H[f+8>>2]=H[f+8>>2]+1;p=p+1|0;if((p|0)!=(n|0)){continue}break}break g}j:{k:{l:{if(n>>>0<=2){d=H[f+616>>2];H[d>>2]=j;a=1;b=H[f+12>>2];if(b>>>0>1){break l}break j}if(K[f+8>>2]>K[f+4>>2]){break e}d=a;a=o+12|0;Aa(d+a|0,H[s>>2],H[s+4>>2]);a=l+H[a+H[f+628>>2]>>2]|0;H[a>>2]=H[a>>2]+(1<>>1|0;break k}while(1){b=Ba((a<<4)+m|0)|b<<1;a=a+1|0;if((d|0)!=(a|0)){continue}break}a=n>>>1|0;if(b>>>0<=a>>>0){break k}d=0;break e}while(1){j=(b-1|0)!=(j|0)?j+1|0:0;H[d+(a<<2)>>2]=j;a=a+1|0;b=H[f+12>>2];if(a>>>0>>0){continue}break}break j}k=q+1|0;m:{n:{b=a-b|0;a=n-b|0;o:{if((a|0)==(b|0)){a=b;break o}i=H[f+596>>2];if((i|0)==H[f+588>>2]){break n}h=H[i>>2];g=H[f+600>>2];d=g+1|0;H[f+600>>2]=d;g=h&-2147483648>>>g;p:{if((d|0)==32){H[f+600>>2]=0;H[f+596>>2]=i+4;if(g){break p}break n}if(!g){break n}}}d=a;a=b;break m}d=b}i=H[f+640>>2];h=i+o|0;g=H[h>>2];b=g+l|0;H[b>>2]=H[b>>2]+1;Aa(i+N(k,12)|0,g,H[h+4>>2]);if(a){h=H[e+28>>2]+H[e+24>>2]|0;g=H[e+16>>2];b=H[e+12>>2];if((h|0)==(((b|0)!=(g|0)?N(g-b>>2,341)-1|0:0)|0)){xa(e+8|0);h=H[e+24>>2]+H[e+28>>2]|0;g=H[e+12>>2]}else{g=b}b=(h>>>0)/341|0;b=H[g+(b<<2)>>2]+N(h-N(b,341)|0,12)|0;H[b+8>>2]=q;H[b+4>>2]=j;H[b>>2]=a;H[e+28>>2]=H[e+28>>2]+1}if(!d){break g}b=H[e+28>>2]+H[e+24>>2]|0;g=H[e+16>>2];a=H[e+12>>2];if((b|0)==(((a|0)!=(g|0)?N(g-a>>2,341)-1|0:0)|0)){xa(e+8|0);b=H[e+24>>2]+H[e+28>>2]|0;g=H[e+12>>2]}else{g=a}a=(b>>>0)/341|0;a=H[g+(a<<2)>>2]+N(b-N(a,341)|0,12)|0;H[a+8>>2]=k;H[a+4>>2]=j;H[a>>2]=d;a=H[e+28>>2]+1|0;H[e+28>>2]=a;break f}p=0;if(!n){break g}while(1){if(H[f+12>>2]){w=H[f+548>>2];i=H[k>>2];t=H[f+604>>2];h=H[f+616>>2];a=0;while(1){j=h+(a<<2)|0;H[(H[j>>2]<<2)+t>>2]=0;g=H[f>>2];d=H[j>>2]<<2;b=H[d+i>>2];q:{if((g|0)==(b|0)){break q}q=d+t|0;r=g-b|0;o=H[f+560>>2];g=32-o|0;if((r|0)<=(g|0)){d=H[f+556>>2];if((d|0)==(w|0)){d=0;break e}H[q>>2]=H[d>>2]<>>32-r;b=H[f+560>>2]+r|0;H[f+560>>2]=b;if((b|0)!=32){break q}H[f+560>>2]=0;H[f+556>>2]=d+4;break q}l=H[f+556>>2];b=l+4|0;if((b|0)==(w|0)){d=0;break e}d=H[l>>2];H[f+556>>2]=b;b=r-g|0;H[f+560>>2]=b;H[q>>2]=H[l+4>>2]>>>32-b|d<>>32-r}d=H[j>>2]<<2;b=d+t|0;H[b>>2]=H[b>>2]|H[d+H[s>>2]>>2];a=a+1|0;if(a>>>0>2]){continue}break}}j=0;a=H[c+16>>2];r:{if((a|0)==H[c+20>>2]){break r}while(1){d=H[c+28>>2];l=N(j,20)+a|0;i=H[l>>2];if(!I[i+84|0]){d=H[H[i+68>>2]+(d<<2)>>2]}if(K[i+80>>2]<=d>>>0){break r}h=H[f+604>>2]+(H[l+4>>2]<<2)|0;g=H[l+12>>2];b=h;s:{if(g>>>0>3){break s}a=0;b=H[c+12>>2];if(!H[l+16>>2]){break s}while(1){b=qa(b,h+(a<<2)|0,g);g=H[l+12>>2];b=b+g|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[c+12>>2]}a=H[i+40>>2];qa(H[H[i>>2]>>2]+N(a,d)|0,b,a);j=j+1|0;a=H[c+16>>2];if(j>>>0<(H[c+20>>2]-a|0)/20>>>0){continue}break}}H[c+28>>2]=H[c+28>>2]+1;H[f+8>>2]=H[f+8>>2]+1;p=p+1|0;if((p|0)!=(n|0)){continue}break}}a=H[e+28>>2]}if(a){continue}break}d=1}H[e+28>>2]=0;j=H[e+16>>2];a=H[e+12>>2];b=j-a|0;if(b>>>0>=9){while(1){oa(H[a>>2]);a=H[e+12>>2]+4|0;H[e+12>>2]=a;j=H[e+16>>2];b=j-a|0;if(b>>>0>8){continue}break}}g=170;t:{switch((b>>>2|0)-1|0){case 1:g=341;case 0:H[e+24>>2]=g;break;default:break t}}u:{if((a|0)==(j|0)){break u}while(1){oa(H[a>>2]);a=a+4|0;if((j|0)!=(a|0)){continue}break}b=H[e+16>>2];a=H[e+12>>2];if((b|0)==(a|0)){break u}H[e+16>>2]=b+((a-b|0)+3&-4)}a=H[e+8>>2];if(a){oa(a)}ca=e+32|0;break b}sa();v()}sa();v()}g=d}return g}function yd(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;j=H[b+8>>2];e=H[b+12>>2];g=H[b+20>>2];h=H[b+16>>2];l=h+4|0;g=l>>>0<4?g+1|0:g;a:{if(j>>>0>>0&(e|0)<=(g|0)|(e|0)<(g|0)){break a}h=h+H[b>>2]|0;H[a>>2]=I[h|0]|I[h+1|0]<<8|(I[h+2|0]<<16|I[h+3|0]<<24);h=H[b+20>>2];e=h;j=H[b+16>>2];g=j+4|0;h=g>>>0<4?e+1|0:e;H[b+16>>2]=g;H[b+20>>2]=h;if(K[a>>2]>32){break a}k=H[b+8>>2];l=H[b+12>>2];h=e;e=j+8|0;h=e>>>0<8?h+1|0:h;if(e>>>0>k>>>0&(h|0)>=(l|0)|(h|0)>(l|0)){break a}h=H[b>>2]+g|0;g=I[h|0]|I[h+1|0]<<8|(I[h+2|0]<<16|I[h+3|0]<<24);H[a+4>>2]=g;h=H[b+20>>2];e=H[b+16>>2]+4|0;h=e>>>0<4?h+1|0:h;H[b+16>>2]=e;H[b+20>>2]=h;if(!g){return 1}if(d>>>0>>0){break a}H[a+8>>2]=0;if(!ta(a+16|0,b)){break a}if(!ua(a+32|0,b)){break a}if(!ua(a+52|0,b)){break a}if(!ua(a+72|0,b)){break a}r=H[a+4>>2];h=c;b=0;g=0;e=ca-32|0;ca=e;d=a;a=H[a+12>>2];H[e+16>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;b:{c:{if(a){if(a>>>0>=1073741824){break c}c=a<<2;b=pa(c);H[e+8>>2]=b;g=b+c|0;H[e+16>>2]=g;ra(b,0,c);H[e+12>>2]=g}c=H[d+116>>2];i=H[c>>2];if(i){H[c+4>>2]=i;oa(i);g=H[e+12>>2];b=H[e+8>>2];a=H[d+12>>2]}H[c+4>>2]=g;H[c>>2]=b;H[c+8>>2]=H[e+16>>2];b=0;H[e+16>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;d:{if(a){if(a>>>0>=1073741824){break d}a=a<<2;f=pa(a);H[e+8>>2]=f;b=a+f|0;H[e+16>>2]=b;ra(f,0,a);H[e+12>>2]=b}a=H[d+128>>2];c=H[a>>2];if(c){H[a+4>>2]=c;oa(c);f=H[e+8>>2];b=H[e+12>>2]}H[a+4>>2]=b;H[a>>2]=f;H[a+8>>2]=H[e+16>>2];H[e+24>>2]=0;H[e+28>>2]=0;H[e+16>>2]=0;H[e+20>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;xa(e+8|0);a=H[e+24>>2]+H[e+28>>2]|0;b=(a>>>0)/341|0;a=H[H[e+12>>2]+(b<<2)>>2]+N(a-N(b,341)|0,12)|0;H[a+4>>2]=0;H[a+8>>2]=0;H[a>>2]=r;c=1;a=H[e+28>>2]+1|0;H[e+28>>2]=a;e:{if(!a){break e}t=d+16|0;while(1){b=H[e+12>>2];f=H[e+24>>2];l=a-1|0;c=f+l|0;i=(c>>>0)/341|0;c=H[b+(i<<2)>>2]+N(c-N(i,341)|0,12)|0;g=H[c+8>>2];i=H[c+4>>2];j=H[c>>2];H[e+28>>2]=l;c=H[e+16>>2];if((((b|0)!=(c|0)?N(c-b>>2,341)-1|0:0)-(a+f|0)|0)+1>>>0>=682){oa(H[c-4>>2]);H[e+16>>2]=H[e+16>>2]-4}c=0;if(j>>>0>r>>>0){break e}b=H[d+12>>2];a=(b-1|0)!=(i|0)?i+1|0:0;if(a>>>0>=b>>>0){break e}f=N(g,12);o=f+H[d+128>>2]|0;l=f+H[d+116>>2]|0;i=H[d>>2];k=a<<2;n=H[k+H[o>>2]>>2];f:{if((i|0)==(n|0)){if(!j){break f}o=0;b=H[h+20>>2];g=H[h+16>>2];if((b|0)==(g|0)){a=H[d+8>>2];H[h+28>>2]=j+H[h+28>>2];H[d+8>>2]=a+j;break f}while(1){c=(b|0)==(g|0);a=b;i=0;b=g;g:{if(c){break g}while(1){f=H[h+28>>2];b=a;c=N(i,20)+g|0;k=H[c>>2];if(!I[k+84|0]){f=H[H[k+68>>2]+(f<<2)>>2]}if(K[k+80>>2]<=f>>>0){break g}n=H[l>>2]+(H[c+4>>2]<<2)|0;g=H[c+12>>2];b=n;h:{if(g>>>0>3){break h}a=0;b=H[h+12>>2];if(!H[c+16>>2]){break h}while(1){b=qa(b,n+(a<<2)|0,g);g=H[c+12>>2];b=b+g|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[h+12>>2]}a=H[k+40>>2];qa(H[H[k>>2]>>2]+N(a,f)|0,b,a);i=i+1|0;a=H[h+20>>2];b=a;g=H[h+16>>2];if(i>>>0<(b-g|0)/20>>>0){continue}break}}H[h+28>>2]=H[h+28>>2]+1;H[d+8>>2]=H[d+8>>2]+1;o=o+1|0;if((j|0)!=(o|0)){continue}break}break f}i:{j:{k:{l:{if(j>>>0<=2){c=H[d+104>>2];H[c>>2]=a;f=1;b=H[d+12>>2];if(b>>>0>1){break l}break i}if(K[d+8>>2]>K[d+4>>2]){break e}b=H[d+116>>2];m=g+1|0;o=N(m,12);q=b+o|0;if((q|0)!=(l|0)){Aa(q,H[l>>2],H[l+4>>2]);b=H[d+116>>2]}b=k+H[b+o>>2]|0;H[b>>2]=H[b>>2]+(1<>2]=0;pc(t,Q(j)^31,e+4|0);b=j>>>1|0;i=H[e+4>>2];if(b>>>0>>0){break e}b=b-i|0;c=j-b|0;m:{if((c|0)==(b|0)){c=b;break m}i=H[d+84>>2];if((i|0)==H[d+76>>2]){break k}j=H[i>>2];l=H[d+88>>2];n=l+1|0;H[d+88>>2]=n;j=j&-2147483648>>>l;n:{if((n|0)==32){H[d+88>>2]=0;H[d+84>>2]=i+4;if(j){break n}break k}if(!j){break k}}}i=c;c=b;break j}while(1){a=(b-1|0)!=(a|0)?a+1|0:0;H[c+(f<<2)>>2]=a;b=H[d+12>>2];f=f+1|0;if(b>>>0>f>>>0){continue}break}break i}i=b}b=H[d+128>>2];j=b+f|0;f=H[j>>2];l=f+k|0;H[l>>2]=H[l>>2]+1;Aa(b+o|0,f,H[j+4>>2]);if(c){b=H[e+28>>2]+H[e+24>>2]|0;j=H[e+16>>2];f=H[e+12>>2];if((b|0)==(((f|0)!=(j|0)?N(j-f>>2,341)-1|0:0)|0)){xa(e+8|0);f=H[e+12>>2];b=H[e+24>>2]+H[e+28>>2]|0}j=(b>>>0)/341|0;b=H[(j<<2)+f>>2]+N(b-N(j,341)|0,12)|0;H[b+8>>2]=g;H[b+4>>2]=a;H[b>>2]=c;H[e+28>>2]=H[e+28>>2]+1}if(!i){break f}b=H[e+28>>2]+H[e+24>>2]|0;c=H[e+16>>2];f=H[e+12>>2];if((b|0)==(((c|0)!=(f|0)?N(c-f>>2,341)-1|0:0)|0)){xa(e+8|0);f=H[e+12>>2];b=H[e+24>>2]+H[e+28>>2]|0}c=(b>>>0)/341|0;b=H[(c<<2)+f>>2]+N(b-N(c,341)|0,12)|0;H[b+8>>2]=m;H[b+4>>2]=a;H[b>>2]=i;H[e+28>>2]=H[e+28>>2]+1;break f}n=0;if(!j){break f}while(1){if(H[d+12>>2]){i=H[d+36>>2];q=H[o>>2];c=H[d+92>>2];u=H[d+104>>2];a=0;while(1){g=(a<<2)+u|0;H[c+(H[g>>2]<<2)>>2]=0;b=H[d>>2];f=H[g>>2]<<2;k=H[f+q>>2];o:{if((b|0)==(k|0)){break o}f=c+f|0;b=b-k|0;k=H[d+48>>2];p=32-k|0;if((b|0)<=(p|0)){m=H[d+44>>2];if((m|0)==(i|0)){c=0;break e}H[f>>2]=H[m>>2]<>>32-b;b=b+H[d+48>>2]|0;H[d+48>>2]=b;if((b|0)!=32){break o}H[d+48>>2]=0;H[d+44>>2]=m+4;break o}m=H[d+44>>2];s=m+4|0;if((i|0)==(s|0)){c=0;break e}w=H[m>>2];H[d+44>>2]=s;p=b-p|0;H[d+48>>2]=p;H[f>>2]=H[m+4>>2]>>>32-p|w<>>32-b}b=H[g>>2]<<2;g=b+c|0;H[g>>2]=H[g>>2]|H[b+H[l>>2]>>2];a=a+1|0;if(a>>>0>2]){continue}break}}i=0;a=H[h+16>>2];p:{if((a|0)==H[h+20>>2]){break p}while(1){f=H[h+28>>2];c=N(i,20)+a|0;k=H[c>>2];if(!I[k+84|0]){f=H[H[k+68>>2]+(f<<2)>>2]}if(K[k+80>>2]<=f>>>0){break p}m=H[d+92>>2]+(H[c+4>>2]<<2)|0;g=H[c+12>>2];b=m;q:{if(g>>>0>3){break q}a=0;b=H[h+12>>2];if(!H[c+16>>2]){break q}while(1){b=qa(b,m+(a<<2)|0,g);g=H[c+12>>2];b=b+g|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[h+12>>2]}a=H[k+40>>2];qa(H[H[k>>2]>>2]+N(a,f)|0,b,a);i=i+1|0;a=H[h+16>>2];if(i>>>0<(H[h+20>>2]-a|0)/20>>>0){continue}break}}H[h+28>>2]=H[h+28>>2]+1;H[d+8>>2]=H[d+8>>2]+1;n=n+1|0;if((j|0)!=(n|0)){continue}break}}a=H[e+28>>2];if(a){continue}break}c=1}H[e+28>>2]=0;f=H[e+16>>2];a=H[e+12>>2];b=f-a|0;if(b>>>0>=9){while(1){oa(H[a>>2]);a=H[e+12>>2]+4|0;H[e+12>>2]=a;f=H[e+16>>2];b=f-a|0;if(b>>>0>8){continue}break}}g=170;r:{switch((b>>>2|0)-1|0){case 1:g=341;case 0:H[e+24>>2]=g;break;default:break r}}s:{if((a|0)==(f|0)){break s}while(1){oa(H[a>>2]);a=a+4|0;if((f|0)!=(a|0)){continue}break}a=H[e+16>>2];b=H[e+12>>2];if((a|0)==(b|0)){break s}H[e+16>>2]=a+((b-a|0)+3&-4)}a=H[e+8>>2];if(a){oa(a)}ca=e+32|0;break b}sa();v()}sa();v()}i=c}return i}function xd(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;i=H[b+8>>2];k=H[b+12>>2];n=H[b+20>>2];h=H[b+16>>2];f=h+4|0;n=f>>>0<4?n+1|0:n;a:{if((k|0)<=(n|0)&f>>>0>i>>>0|(k|0)<(n|0)){break a}h=h+H[b>>2]|0;H[a>>2]=I[h|0]|I[h+1|0]<<8|(I[h+2|0]<<16|I[h+3|0]<<24);h=H[b+20>>2];i=h;f=H[b+16>>2];h=f+4|0;k=h>>>0<4?i+1|0:i;H[b+16>>2]=h;H[b+20>>2]=k;if(K[a>>2]>32){break a}k=H[b+8>>2];n=H[b+12>>2];f=f+8|0;i=f>>>0<8?i+1|0:i;if(f>>>0>k>>>0&(i|0)>=(n|0)|(i|0)>(n|0)){break a}h=H[b>>2]+h|0;f=I[h|0]|I[h+1|0]<<8|(I[h+2|0]<<16|I[h+3|0]<<24);H[a+4>>2]=f;i=H[b+20>>2];h=H[b+16>>2]+4|0;i=h>>>0<4?i+1|0:i;H[b+16>>2]=h;H[b+20>>2]=i;if(!f){return 1}if(d>>>0>>0){break a}H[a+8>>2]=0;if(!ta(a+16|0,b)){break a}if(!ua(a+32|0,b)){break a}if(!ua(a+52|0,b)){break a}if(!ua(a+72|0,b)){break a}u=H[a+4>>2];h=c;b=0;c=0;e=ca-32|0;ca=e;f=a;a=H[a+12>>2];H[e+16>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;b:{c:{if(a){if(a>>>0>=1073741824){break c}d=a<<2;b=pa(d);H[e+8>>2]=b;c=b+d|0;H[e+16>>2]=c;ra(b,0,d);H[e+12>>2]=c}j=H[f+116>>2];d=H[j>>2];if(d){H[j+4>>2]=d;oa(d);c=H[e+12>>2];b=H[e+8>>2];a=H[f+12>>2]}H[j+4>>2]=c;H[j>>2]=b;H[j+8>>2]=H[e+16>>2];b=0;H[e+16>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;d:{if(a){if(a>>>0>=1073741824){break d}a=a<<2;g=pa(a);H[e+8>>2]=g;b=a+g|0;H[e+16>>2]=b;ra(g,0,a);H[e+12>>2]=b}c=H[f+128>>2];a=H[c>>2];if(a){H[c+4>>2]=a;oa(a);g=H[e+8>>2];b=H[e+12>>2]}H[c+4>>2]=b;H[c>>2]=g;H[c+8>>2]=H[e+16>>2];H[e+24>>2]=0;H[e+28>>2]=0;H[e+16>>2]=0;H[e+20>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;xa(e+8|0);b=H[e+24>>2]+H[e+28>>2]|0;a=(b>>>0)/341|0;a=H[H[e+12>>2]+(a<<2)>>2]+N(b-N(a,341)|0,12)|0;H[a+4>>2]=0;H[a+8>>2]=0;H[a>>2]=u;d=1;a=H[e+28>>2]+1|0;H[e+28>>2]=a;e:{if(!a){break e}n=f+16|0;while(1){i=H[e+12>>2];j=H[e+24>>2];d=a-1|0;c=j+d|0;b=(c>>>0)/341|0;b=H[i+(b<<2)>>2]+N(c-N(b,341)|0,12)|0;o=H[b+8>>2];c=H[b+4>>2];m=H[b>>2];H[e+28>>2]=d;b=H[e+16>>2];if((((b|0)!=(i|0)?N(b-i>>2,341)-1|0:0)-(a+j|0)|0)+1>>>0>=682){oa(H[b-4>>2]);H[e+16>>2]=H[e+16>>2]-4}if(m>>>0>u>>>0){d=0;break e}d=0;b=H[f+12>>2];a=(c|0)!=(b-1|0)?c+1|0:0;if(a>>>0>=b>>>0){break e}b=H[f+116>>2];p=N(o,12);r=b+p|0;j=H[f>>2];g=a<<2;k=p+H[f+128>>2]|0;c=H[g+H[k>>2]>>2];f:{if((j|0)==(c|0)){if(!m){break f}b=H[h+20>>2];c=H[h+16>>2];if((b|0)==(c|0)){a=H[f+8>>2];H[h+28>>2]=m+H[h+28>>2];H[f+8>>2]=a+m;break f}while(1){i=(b|0)==(c|0);a=b;j=0;b=c;g:{if(i){break g}while(1){g=H[h+28>>2];b=a;l=N(j,20)+c|0;k=H[l>>2];if(!I[k+84|0]){g=H[H[k+68>>2]+(g<<2)>>2]}if(K[k+80>>2]<=g>>>0){break g}i=H[r>>2]+(H[l+4>>2]<<2)|0;c=H[l+12>>2];b=i;h:{if(c>>>0>3){break h}a=0;b=H[h+12>>2];if(!H[l+16>>2]){break h}while(1){b=qa(b,i+(a<<2)|0,c);c=H[l+12>>2];b=b+c|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[h+12>>2]}a=H[k+40>>2];qa(H[H[k>>2]>>2]+N(a,g)|0,b,a);j=j+1|0;a=H[h+20>>2];b=a;c=H[h+16>>2];if(j>>>0<(b-c|0)/20>>>0){continue}break}}H[h+28>>2]=H[h+28>>2]+1;H[f+8>>2]=H[f+8>>2]+1;d=d+1|0;if((m|0)!=(d|0)){continue}break}break f}i:{j:{k:{l:{if(m>>>0<=2){c=H[f+104>>2];H[c>>2]=a;g=1;b=H[f+12>>2];if(b>>>0>1){break l}break i}if(K[f+8>>2]>K[f+4>>2]){break e}i=b;b=p+12|0;Aa(i+b|0,H[r>>2],H[r+4>>2]);b=g+H[b+H[f+116>>2]>>2]|0;H[b>>2]=H[b>>2]+(1<>2]=0;pc(n,Q(m)^31,e+4|0);c=m>>>1|0;b=H[e+4>>2];if(c>>>0>>0){break e}l=o+1|0;b=c-b|0;c=m-b|0;m:{if((c|0)==(b|0)){c=b;break m}k=H[f+84>>2];if((k|0)==H[f+76>>2]){break k}i=H[k>>2];j=H[f+88>>2];d=j+1|0;H[f+88>>2]=d;j=i&-2147483648>>>j;n:{if((d|0)==32){H[f+88>>2]=0;H[f+84>>2]=k+4;if(j){break n}break k}if(!j){break k}}}j=c;c=b;break j}while(1){a=(b-1|0)!=(a|0)?a+1|0:0;H[c+(g<<2)>>2]=a;b=H[f+12>>2];g=g+1|0;if(b>>>0>g>>>0){continue}break}break i}j=b}k=H[f+128>>2];i=k+p|0;d=H[i>>2];b=d+g|0;H[b>>2]=H[b>>2]+1;Aa(k+N(l,12)|0,d,H[i+4>>2]);if(c){b=H[e+28>>2]+H[e+24>>2]|0;d=H[e+16>>2];g=H[e+12>>2];if((b|0)==(((d|0)!=(g|0)?N(d-g>>2,341)-1|0:0)|0)){xa(e+8|0);g=H[e+12>>2];b=H[e+24>>2]+H[e+28>>2]|0}d=(b>>>0)/341|0;b=H[(d<<2)+g>>2]+N(b-N(d,341)|0,12)|0;H[b+8>>2]=o;H[b+4>>2]=a;H[b>>2]=c;H[e+28>>2]=H[e+28>>2]+1}if(!j){break f}b=H[e+28>>2]+H[e+24>>2]|0;c=H[e+16>>2];g=H[e+12>>2];if((b|0)==(((c|0)!=(g|0)?N(c-g>>2,341)-1|0:0)|0)){xa(e+8|0);g=H[e+12>>2];b=H[e+24>>2]+H[e+28>>2]|0}c=(b>>>0)/341|0;b=H[(c<<2)+g>>2]+N(b-N(c,341)|0,12)|0;H[b+8>>2]=l;H[b+4>>2]=a;H[b>>2]=j;H[e+28>>2]=H[e+28>>2]+1;break f}s=0;if(!m){break f}while(1){if(H[f+12>>2]){w=H[f+36>>2];i=H[k>>2];t=H[f+92>>2];j=H[f+104>>2];a=0;while(1){o=(a<<2)+j|0;H[t+(H[o>>2]<<2)>>2]=0;d=H[f>>2];c=H[o>>2]<<2;b=H[c+i>>2];o:{if((d|0)==(b|0)){break o}p=c+t|0;q=d-b|0;g=H[f+48>>2];d=32-g|0;if((q|0)<=(d|0)){c=H[f+44>>2];if((c|0)==(w|0)){d=0;break e}H[p>>2]=H[c>>2]<>>32-q;b=q+H[f+48>>2]|0;H[f+48>>2]=b;if((b|0)!=32){break o}H[f+48>>2]=0;H[f+44>>2]=c+4;break o}l=H[f+44>>2];b=l+4|0;if((w|0)==(b|0)){d=0;break e}c=H[l>>2];H[f+44>>2]=b;b=q-d|0;H[f+48>>2]=b;H[p>>2]=H[l+4>>2]>>>32-b|c<>>32-q}c=H[o>>2]<<2;b=c+t|0;H[b>>2]=H[b>>2]|H[c+H[r>>2]>>2];a=a+1|0;if(a>>>0>2]){continue}break}}j=0;a=H[h+16>>2];p:{if((a|0)==H[h+20>>2]){break p}while(1){g=H[h+28>>2];l=N(j,20)+a|0;i=H[l>>2];if(!I[i+84|0]){g=H[H[i+68>>2]+(g<<2)>>2]}if(K[i+80>>2]<=g>>>0){break p}d=H[f+92>>2]+(H[l+4>>2]<<2)|0;c=H[l+12>>2];b=d;q:{if(c>>>0>3){break q}a=0;b=H[h+12>>2];if(!H[l+16>>2]){break q}while(1){b=qa(b,d+(a<<2)|0,c);c=H[l+12>>2];b=b+c|0;a=a+1|0;if(a>>>0>2]){continue}break}b=H[h+12>>2]}a=H[i+40>>2];qa(H[H[i>>2]>>2]+N(a,g)|0,b,a);j=j+1|0;a=H[h+16>>2];if(j>>>0<(H[h+20>>2]-a|0)/20>>>0){continue}break}}H[h+28>>2]=H[h+28>>2]+1;H[f+8>>2]=H[f+8>>2]+1;s=s+1|0;if((m|0)!=(s|0)){continue}break}}a=H[e+28>>2];if(a){continue}break}d=1}H[e+28>>2]=0;g=H[e+16>>2];a=H[e+12>>2];b=g-a|0;if(b>>>0>=9){while(1){oa(H[a>>2]);a=H[e+12>>2]+4|0;H[e+12>>2]=a;g=H[e+16>>2];b=g-a|0;if(b>>>0>8){continue}break}}c=170;r:{switch((b>>>2|0)-1|0){case 1:c=341;case 0:H[e+24>>2]=c;break;default:break r}}s:{if((a|0)==(g|0)){break s}while(1){oa(H[a>>2]);a=a+4|0;if((g|0)!=(a|0)){continue}break}b=H[e+16>>2];a=H[e+12>>2];if((b|0)==(a|0)){break s}H[e+16>>2]=b+((a-b|0)+3&-4)}a=H[e+8>>2];if(a){oa(a)}ca=e+32|0;j=d;break b}sa();v()}sa();v()}}return j}function $c(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;h=ca-32|0;ca=h;g=H[H[a+4>>2]+44>>2];c=H[a+8>>2];d=H[c>>2];c=H[c+4>>2];H[h+24>>2]=0;H[h+16>>2]=0;H[h+20>>2]=0;d=(c-d>>2>>>0)/3|0;c=H[g+96>>2];f=(H[g+100>>2]-c|0)/12|0;a:{if(d>>>0>f>>>0){e=d-f|0;i=H[g+104>>2];c=H[g+100>>2];if(e>>>0<=(i-c|0)/12>>>0){b:{if(!e){break b}d=c;f=N(e,12)-12|0;i=((f>>>0)/12|0)+1&3;if(i){while(1){l=H[h+20>>2];H[d>>2]=H[h+16>>2];H[d+4>>2]=l;H[d+8>>2]=H[h+24>>2];d=d+12|0;j=j+1|0;if((i|0)!=(j|0)){continue}break}}c=N(e,12)+c|0;if(f>>>0<36){break b}while(1){f=H[h+20>>2];H[d>>2]=H[h+16>>2];H[d+4>>2]=f;H[d+8>>2]=H[h+24>>2];H[d+20>>2]=H[h+24>>2];f=H[h+20>>2];H[d+12>>2]=H[h+16>>2];H[d+16>>2]=f;H[d+32>>2]=H[h+24>>2];f=H[h+20>>2];H[d+24>>2]=H[h+16>>2];H[d+28>>2]=f;f=H[h+20>>2];H[d+36>>2]=H[h+16>>2];H[d+40>>2]=f;H[d+44>>2]=H[h+24>>2];d=d+48|0;if((d|0)!=(c|0)){continue}break}}H[g+100>>2]=c;break a}c:{f=H[g+96>>2];n=(c-f|0)/12|0;d=n+e|0;if(d>>>0<357913942){f=(i-f|0)/12|0;i=f<<1;i=f>>>0>=178956970?357913941:d>>>0>>0?i:d;if(i){if(i>>>0>=357913942){break c}l=pa(N(i,12))}f=N(n,12)+l|0;d=f;e=N(e,12);n=e-12|0;q=((n>>>0)/12|0)+1&3;if(q){while(1){r=H[h+20>>2];H[d>>2]=H[h+16>>2];H[d+4>>2]=r;H[d+8>>2]=H[h+24>>2];d=d+12|0;j=j+1|0;if((q|0)!=(j|0)){continue}break}}e=e+f|0;if(n>>>0>=36){while(1){j=H[h+20>>2];H[d>>2]=H[h+16>>2];H[d+4>>2]=j;H[d+8>>2]=H[h+24>>2];H[d+20>>2]=H[h+24>>2];j=H[h+20>>2];H[d+12>>2]=H[h+16>>2];H[d+16>>2]=j;H[d+32>>2]=H[h+24>>2];j=H[h+20>>2];H[d+24>>2]=H[h+16>>2];H[d+28>>2]=j;j=H[h+20>>2];H[d+36>>2]=H[h+16>>2];H[d+40>>2]=j;H[d+44>>2]=H[h+24>>2];d=d+48|0;if((e|0)!=(d|0)){continue}break}}j=H[g+96>>2];if((j|0)!=(c|0)){while(1){c=c-12|0;n=H[c+4>>2];f=f-12|0;d=f;H[d>>2]=H[c>>2];H[d+4>>2]=n;H[d+8>>2]=H[c+8>>2];if((c|0)!=(j|0)){continue}break}c=H[g+96>>2]}H[g+104>>2]=N(i,12)+l;H[g+100>>2]=e;H[g+96>>2]=f;if(c){oa(c)}break a}sa();v()}wa();v()}if(d>>>0>=f>>>0){break a}H[g+100>>2]=c+N(d,12)}d:{if(H[a+216>>2]==H[a+220>>2]){j=H[a+4>>2];c=H[j+44>>2];d=H[c+100>>2];f=H[c+96>>2];if((d|0)!=(f|0)){c=(d-f|0)/12|0;o=c>>>0<=1?1:c;c=0;while(1){d=H[a+8>>2];i=f+N(c,12)|0;g=N(c,3);e:{f:{if((g|0)==-1){e=H[(H[d>>2]+(g<<2)|0)+4>>2];k=-1;g=1;break f}e=-1;k=H[H[d>>2]+(g<<2)>>2];l=g+1|0;if((l|0)==-1){g=0;break f}e=H[H[d>>2]+(l<<2)>>2];g=g+2|0;m=-1;if((g|0)==-1){break e}}m=H[H[d>>2]+(g<<2)>>2]}H[i+8>>2]=m;H[i+4>>2]=e;H[i>>2]=k;c=c+1|0;if((o|0)!=(c|0)){continue}break}}H[H[j+4>>2]+80>>2]=b;c=1;break d}d=0;H[h+24>>2]=0;H[h+16>>2]=0;H[h+20>>2]=0;l=H[a+8>>2];c=H[l>>2];g=H[l+4>>2];H[h+8>>2]=0;H[h>>2]=0;H[h+4>>2]=0;b=0;g:{h:{i:{j:{k:{l:{if((c|0)!=(g|0)){c=g-c|0;if((c|0)<0){break l}b=pa(c);H[h>>2]=b;H[h+8>>2]=(c&-4)+b;u=h,w=ra(b,0,c)+c|0,H[u+4>>2]=w}c=H[l+24>>2];if((H[l+28>>2]-c|0)<4){break h}f=0;while(1){g=H[(p<<2)+c>>2];m:{if((g|0)==-1){break m}n:{if(H[H[a+120>>2]+(p>>>3&536870908)>>2]>>>p&1){break n}n=H[a+216>>2];c=H[a+220>>2];if((n|0)==(c|0)){break n}e=g+2|0;i=(g>>>0)%3|0;q=i?g-1|0:e;c=(c-n|0)/144|0;r=c>>>0<=1?1:c;j=0;t=(i|0)!=0|(e|0)!=-1;while(1){s=g<<2;i=N(j,144)+n|0;c=H[s+H[H[i+68>>2]>>2]>>2];o:{if(!(H[H[i+16>>2]+(c>>>3&536870908)>>2]>>>c&1)){break o}c=-1;p:{if(!t){break p}e=H[H[l+12>>2]+(q<<2)>>2];c=-1;if((e|0)==-1){break p}c=e-1|0;if((e>>>0)%3|0){break p}c=e+2|0}if((g|0)==(c|0)){break o}e=s;s=H[i+32>>2];i=H[e+s>>2];while(1){e=0;if((c|0)==-1){break g}if((i|0)!=H[s+(c<<2)>>2]){g=c;break n}q:{r:{if((c>>>0)%3|0){e=c-1|0;break r}e=c+2|0;m=-1;if((e|0)==-1){break q}}c=H[H[l+12>>2]+(e<<2)>>2];m=-1;if((c|0)==-1){break q}m=c-1|0;if((c>>>0)%3|0){break q}m=c+2|0}c=m;if((g|0)!=(c|0)){continue}break}}j=j+1|0;if((r|0)!=(j|0)){continue}break}}i=k-f|0;e=i>>2;H[(g<<2)+b>>2]=e;s:{if(k>>>0>>0){H[k>>2]=g;k=k+4|0;H[h+20>>2]=k;break s}c=e+1|0;if(c>>>0>=1073741824){break k}d=o-f|0;k=d>>>1|0;c=d>>>0>=2147483644?1073741823:c>>>0>>0?k:c;if(c){if(c>>>0>=1073741824){break j}d=pa(c<<2)}else{d=0}e=d+(e<<2)|0;H[e>>2]=g;m=c<<2;c=va(d,f,i);o=m+c|0;H[h+24>>2]=o;k=e+4|0;H[h+20>>2]=k;H[h+16>>2]=c;if(f){oa(f);l=H[a+8>>2]}f=c}if((g|0)==-1){break m}t:{if((g>>>0)%3|0){c=g-1|0;break t}c=g+2|0;if((c|0)==-1){break m}}c=H[H[l+12>>2]+(c<<2)>>2];if((c|0)==-1){break m}c=c+((c>>>0)%3|0?-1:2)|0;if((c|0)==-1){break m}e=g;if((c|0)==(g|0)){break m}while(1){i=c;u:{v:{c=H[a+220>>2];j=H[a+216>>2];if((c|0)==(j|0)){break v}c=(c-j|0)/144|0;n=c>>>0<=1?1:c;c=0;while(1){q=H[(j+N(c,144)|0)+32>>2];r=i<<2;if(H[q+r>>2]==H[q+(e<<2)>>2]){c=c+1|0;if((n|0)!=(c|0)){continue}break v}break}j=k-d|0;e=j>>2;H[b+r>>2]=e;if(k>>>0>>0){H[k>>2]=i;k=k+4|0;H[h+20>>2]=k;f=d;break u}c=e+1|0;if(c>>>0>=1073741824){break i}f=o-d|0;k=f>>>1|0;c=f>>>0>=2147483644?1073741823:c>>>0>>0?k:c;if(c){if(c>>>0>=1073741824){break j}f=pa(c<<2)}else{f=0}e=f+(e<<2)|0;H[e>>2]=i;m=c<<2;c=va(f,d,j);o=m+c|0;H[h+24>>2]=o;k=e+4|0;H[h+20>>2]=k;H[h+16>>2]=c;if(!d){d=c;break u}oa(d);l=H[a+8>>2];d=c;break u}H[(i<<2)+b>>2]=H[(e<<2)+b>>2]}if((i|0)==-1){break m}w:{if((i>>>0)%3|0){c=i-1|0;break w}c=i+2|0;if((c|0)==-1){break m}}c=H[H[l+12>>2]+(c<<2)>>2];if((c|0)==-1){break m}c=c+((c>>>0)%3|0?-1:2)|0;if((c|0)==-1){break m}e=i;if((c|0)!=(g|0)){continue}break}}p=p+1|0;c=H[l+24>>2];if((p|0)>2]-c>>2){continue}break}break h}sa();v()}sa();v()}wa();v()}sa();v()}i=H[a+4>>2];a=H[i+44>>2];c=H[a+100>>2];a=H[a+96>>2];x:{if((c|0)==(a|0)){break x}g=(c-a|0)/12|0;f=g>>>0<=1?1:g;l=f&1;c=0;if(g>>>0>=2){j=f&-2;g=0;while(1){e=N(c,12);f=e+b|0;o=H[f>>2];p=H[f+4>>2];e=a+e|0;H[e+8>>2]=H[f+8>>2];H[e>>2]=o;H[e+4>>2]=p;e=N(c|1,12);f=e+b|0;o=H[f>>2];p=H[f+4>>2];e=a+e|0;H[e+8>>2]=H[f+8>>2];H[e>>2]=o;H[e+4>>2]=p;c=c+2|0;g=g+2|0;if((j|0)!=(g|0)){continue}break}}if(!l){break x}g=N(c,12);c=g+b|0;f=H[c>>2];e=H[c+4>>2];a=a+g|0;H[a+8>>2]=H[c+8>>2];H[a>>2]=f;H[a+4>>2]=e}H[H[i+4>>2]+80>>2]=k-d>>2;e=1}c=e;if(b){oa(b)}if(!d){break d}H[h+20>>2]=d;oa(d)}ca=h+32|0;return c}function Fj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0,J=0,K=0,L=0,M=0,O=0,P=0;g=ca+-64|0;ca=g;H[a+8>>2]=e;y=a+32|0;f=H[y>>2];d=H[a+36>>2]-f>>2;a:{b:{if(d>>>0>>0){ya(y,e-d|0);H[g+56>>2]=0;H[g+60>>2]=0;H[g+48>>2]=0;H[g+52>>2]=0;H[g+40>>2]=0;H[g+44>>2]=0;H[g+32>>2]=0;H[g+36>>2]=0;H[g+24>>2]=0;H[g+28>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;H[g>>2]=0;break b}if(d>>>0>e>>>0){H[a+36>>2]=f+(e<<2)}H[g+56>>2]=0;H[g+60>>2]=0;H[g+48>>2]=0;H[g+52>>2]=0;H[g+40>>2]=0;H[g+44>>2]=0;H[g+32>>2]=0;H[g+36>>2]=0;H[g+24>>2]=0;H[g+28>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;H[g>>2]=0;d=0;if(!e){break a}}Pa(g+16|0,e,g);h=H[g+28>>2];d=H[g+32>>2]}H[g>>2]=0;d=d-h>>2;c:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break c}H[g+32>>2]=(e<<2)+h;break c}Pa(g+16|12,e-d|0,g)}H[g>>2]=0;f=H[g+40>>2];d=H[g+44>>2]-f>>2;d:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break d}H[g+44>>2]=f+(e<<2);break d}Pa(g+40|0,e-d|0,g)}H[g>>2]=0;f=H[g+52>>2];d=H[g+56>>2]-f>>2;e:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break e}H[g+56>>2]=f+(e<<2);break e}Pa(g+52|0,e-d|0,g)}f:{if(H[a+8>>2]<=0){break f}i=H[g+16>>2];j=H[a+32>>2];h=0;while(1){d=h<<2;f=H[d+i>>2];m=H[a+16>>2];g:{if((f|0)>(m|0)){H[d+j>>2]=m;break g}d=d+j|0;m=H[a+12>>2];if((m|0)>(f|0)){H[d>>2]=m;break g}H[d>>2]=f}h=h+1|0;d=H[a+8>>2];if((h|0)<(d|0)){continue}break}if((d|0)<=0){break f}d=0;while(1){i=d<<2;f=i+c|0;i=H[b+i>>2]+H[j+i>>2]|0;H[f>>2]=i;h:{if((i|0)>H[a+16>>2]){i=i-H[a+20>>2]|0}else{if((i|0)>=H[a+12>>2]){break h}i=i+H[a+20>>2]|0}H[f>>2]=i}d=d+1|0;if((d|0)>2]){continue}break}}G=H[a+52>>2];t=H[a+48>>2];z=pa(16);d=z;H[d>>2]=0;H[d+4>>2]=0;H[d+8>>2]=0;H[d+12>>2]=0;H[g+8>>2]=0;H[g>>2]=0;H[g+4>>2]=0;i:{if(e){if(e>>>0>=1073741824){break i}d=e<<2;r=pa(d);H[g>>2]=r;H[g+8>>2]=d+r;ra(r,0,d)}A=1;d=H[a+56>>2];B=H[d>>2];d=H[d+4>>2]-B|0;j:{if((d|0)<8){break j}w=d>>2;I=(w|0)<=2?2:w;J=w>>>0<=1?1:w;C=e&-2;D=e&1;K=e&-4;E=e&3;F=e-1|0;L=e<<2;M=e>>>0<4;A=0;m=1;while(1){k:{l:{m:{n:{if((m|0)!=(J|0)){o:{p:{f=H[(m<<2)+B>>2];if((f|0)==-1){break p}k=1;d=f+2|0;j=(f>>>0)%3|0;x=j?f-1|0:d;s=1<>2];O=n+(x>>>3&536870908)|0;i=0;P=(j|0)!=0|(d|0)!=-1;d=f;q:{while(1){r:{if(H[n+(d>>>3&536870908)>>2]>>>d&1){break r}j=H[H[H[t+64>>2]+12>>2]+(d<<2)>>2];if((j|0)==-1){break r}l=H[G>>2];h=H[t+28>>2];p=H[l+(H[h+(j<<2)>>2]<<2)>>2];if((p|0)>=(m|0)){break r}q=j+1|0;q=H[l+(H[h+(((q>>>0)%3|0?q:j-2|0)<<2)>>2]<<2)>>2];if((q|0)>=(m|0)){break r}h=H[l+(H[h+(j+((j>>>0)%3|0?-1:2)<<2)>>2]<<2)>>2];if((h|0)>=(m|0)){break r}s:{if(!e){break s}j=H[(g+16|0)+N(i,12)>>2];l=N(e,h);q=N(e,q);p=N(e,p);h=0;o=0;if(F){while(1){H[j+(h<<2)>>2]=(H[(h+l<<2)+c>>2]+H[(h+q<<2)+c>>2]|0)-H[(h+p<<2)+c>>2];u=h|1;H[j+(u<<2)>>2]=(H[(l+u<<2)+c>>2]+H[(q+u<<2)+c>>2]|0)-H[(p+u<<2)+c>>2];h=h+2|0;o=o+2|0;if((C|0)!=(o|0)){continue}break}}if(!D){break s}H[j+(h<<2)>>2]=(H[(h+l<<2)+c>>2]+H[(h+q<<2)+c>>2]|0)-H[(h+p<<2)+c>>2]}j=4;i=i+1|0;if((i|0)==4){break q}}t:{if(k&1){h=d-2|0;j=d+1|0;d=-1;j=(j>>>0)%3|0?j:h;if((j|0)==-1|H[n+(j>>>3&536870908)>>2]>>>j&1){break t}j=H[H[H[t+64>>2]+12>>2]+(j<<2)>>2];if((j|0)==-1){break t}d=j+1|0;d=(d>>>0)%3|0?d:j-2|0;break t}u:{if((d>>>0)%3|0){h=d-1|0;break u}h=d+2|0;d=-1;if((h|0)==-1){break t}}d=-1;if(H[n+(h>>>3&536870908)>>2]>>>h&1){break t}j=H[H[H[t+64>>2]+12>>2]+(h<<2)>>2];if((j|0)==-1){break t}if((j>>>0)%3|0){d=j-1|0;break t}d=j+2|0}v:{if((d|0)==(f|0)){break v}if((d|0)==-1&k){if(!P|s&H[O>>2]){break v}d=H[H[H[t+64>>2]+12>>2]+(x<<2)>>2];if((d|0)==-1){break v}k=0;d=(d>>>0)%3|0?d-1|0:d+2|0}if((d|0)!=-1){continue}}break}j=i;if((j|0)<=0){break p}}if(e){ra(r,0,L)}d=j-1|0;q=(d<<2)+z|0;d=N(d,12)+a|0;u=d;x=H[d- -64>>2];k=0;d=H[g>>2];f=0;while(1){i=H[q>>2];H[q>>2]=i+1;if(i>>>0>=x>>>0){break j}w:{if(H[H[u+60>>2]+(i>>>3&536870908)>>2]>>>i&1){break w}f=f+1|0;if(!e){break w}n=H[(g+16|0)+N(k,12)>>2];i=0;h=0;p=0;if(!M){while(1){l=h<<2;o=l+d|0;H[o>>2]=H[l+n>>2]+H[o>>2];o=l|4;s=o+d|0;H[s>>2]=H[n+o>>2]+H[s>>2];o=l|8;s=o+d|0;H[s>>2]=H[n+o>>2]+H[s>>2];l=l|12;o=l+d|0;H[o>>2]=H[l+n>>2]+H[o>>2];h=h+4|0;p=p+4|0;if((K|0)!=(p|0)){continue}break}}if(!E){break w}while(1){l=h<<2;p=l+d|0;H[p>>2]=H[l+n>>2]+H[p>>2];h=h+1|0;i=i+1|0;if((E|0)!=(i|0)){continue}break}}k=k+1|0;if((k|0)!=(j|0)){continue}break}i=N(e,m);if(!f){break o}if(!e){break l}h=0;d=0;if(F){break n}break m}i=N(e,m)}if(H[a+8>>2]<=0){break k}k=(N(m-1|0,e)<<2)+c|0;j=H[y>>2];h=0;while(1){d=h<<2;f=H[d+k>>2];n=H[a+16>>2];x:{if((f|0)>(n|0)){H[d+j>>2]=n;break x}d=d+j|0;n=H[a+12>>2];if((n|0)>(f|0)){H[d>>2]=n;break x}H[d>>2]=f}h=h+1|0;f=H[a+8>>2];if((h|0)<(f|0)){continue}break}d=0;if((f|0)<=0){break k}f=i<<2;h=f+c|0;k=b+f|0;while(1){i=d<<2;f=i+h|0;i=H[i+k>>2]+H[j+i>>2]|0;H[f>>2]=i;y:{if((i|0)>H[a+16>>2]){i=i-H[a+20>>2]|0}else{if((i|0)>=H[a+12>>2]){break y}i=i+H[a+20>>2]|0}H[f>>2]=i}d=d+1|0;if((d|0)>2]){continue}break}break k}Ca();v()}while(1){j=h<<2;k=j+r|0;H[k>>2]=H[k>>2]/(f|0);j=(j|4)+r|0;H[j>>2]=H[j>>2]/(f|0);h=h+2|0;d=d+2|0;if((C|0)!=(d|0)){continue}break}}if(!D){break l}d=(h<<2)+r|0;H[d>>2]=H[d>>2]/(f|0)}if(H[a+8>>2]<=0){break k}j=H[y>>2];h=0;while(1){d=h<<2;f=H[d+r>>2];k=H[a+16>>2];z:{if((f|0)>(k|0)){H[d+j>>2]=k;break z}d=d+j|0;k=H[a+12>>2];if((k|0)>(f|0)){H[d>>2]=k;break z}H[d>>2]=f}h=h+1|0;f=H[a+8>>2];if((h|0)<(f|0)){continue}break}d=0;if((f|0)<=0){break k}f=i<<2;h=f+c|0;k=b+f|0;while(1){i=d<<2;f=i+h|0;i=H[i+k>>2]+H[j+i>>2]|0;H[f>>2]=i;A:{if((i|0)>H[a+16>>2]){i=i-H[a+20>>2]|0}else{if((i|0)>=H[a+12>>2]){break A}i=i+H[a+20>>2]|0}H[f>>2]=i}d=d+1|0;if((d|0)>2]){continue}break}}m=m+1|0;A=(w|0)<=(m|0);if((m|0)!=(I|0)){continue}break}}a=H[g>>2];if(a){oa(a)}oa(z);a=H[g+52>>2];if(a){H[g+56>>2]=a;oa(a)}a=H[g+40>>2];if(a){H[g+44>>2]=a;oa(a)}a=H[g+28>>2];if(a){H[g+32>>2]=a;oa(a)}a=H[g+16>>2];if(a){H[g+20>>2]=a;oa(a)}ca=g- -64|0;return A|0}sa();v()}function oj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0,J=0,K=0,L=0,M=0;h=ca+-64|0;ca=h;H[a+8>>2]=e;x=a+32|0;f=H[x>>2];d=H[a+36>>2]-f>>2;a:{b:{if(d>>>0>>0){ya(x,e-d|0);H[h+56>>2]=0;H[h+60>>2]=0;H[h+48>>2]=0;H[h+52>>2]=0;H[h+40>>2]=0;H[h+44>>2]=0;H[h+32>>2]=0;H[h+36>>2]=0;H[h+24>>2]=0;H[h+28>>2]=0;H[h+16>>2]=0;H[h+20>>2]=0;H[h>>2]=0;break b}if(d>>>0>e>>>0){H[a+36>>2]=f+(e<<2)}H[h+56>>2]=0;H[h+60>>2]=0;H[h+48>>2]=0;H[h+52>>2]=0;H[h+40>>2]=0;H[h+44>>2]=0;H[h+32>>2]=0;H[h+36>>2]=0;H[h+24>>2]=0;H[h+28>>2]=0;H[h+16>>2]=0;H[h+20>>2]=0;H[h>>2]=0;d=0;if(!e){break a}}Pa(h+16|0,e,h);i=H[h+28>>2];d=H[h+32>>2]}H[h>>2]=0;d=d-i>>2;c:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break c}H[h+32>>2]=(e<<2)+i;break c}Pa(h+16|12,e-d|0,h)}H[h>>2]=0;f=H[h+40>>2];d=H[h+44>>2]-f>>2;d:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break d}H[h+44>>2]=f+(e<<2);break d}Pa(h+40|0,e-d|0,h)}H[h>>2]=0;f=H[h+52>>2];d=H[h+56>>2]-f>>2;e:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break e}H[h+56>>2]=f+(e<<2);break e}Pa(h+52|0,e-d|0,h)}f:{if(H[a+8>>2]<=0){break f}g=H[h+16>>2];j=H[a+32>>2];i=0;while(1){d=i<<2;f=H[d+g>>2];m=H[a+16>>2];g:{if((f|0)>(m|0)){H[d+j>>2]=m;break g}d=d+j|0;m=H[a+12>>2];if((m|0)>(f|0)){H[d>>2]=m;break g}H[d>>2]=f}i=i+1|0;d=H[a+8>>2];if((i|0)<(d|0)){continue}break}if((d|0)<=0){break f}d=0;while(1){g=d<<2;f=g+c|0;g=H[b+g>>2]+H[g+j>>2]|0;H[f>>2]=g;h:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break h}g=g+H[a+20>>2]|0}H[f>>2]=g}d=d+1|0;if((d|0)>2]){continue}break}}G=H[a+52>>2];A=H[a+48>>2];y=pa(16);d=y;H[d>>2]=0;H[d+4>>2]=0;H[d+8>>2]=0;H[d+12>>2]=0;H[h+8>>2]=0;H[h>>2]=0;H[h+4>>2]=0;i:{if(e){if(e>>>0>=1073741824){break i}d=e<<2;t=pa(d);H[h>>2]=t;H[h+8>>2]=d+t;ra(t,0,d)}z=1;d=H[a+56>>2];B=H[d>>2];d=H[d+4>>2]-B|0;j:{if((d|0)<8){break j}w=d>>2;I=(w|0)<=2?2:w;J=w>>>0<=1?1:w;C=e&-2;D=e&1;K=e&-4;E=e&3;F=e-1|0;L=e<<2;M=e>>>0<4;z=0;m=1;while(1){k:{l:{m:{n:{if((m|0)!=(J|0)){o:{p:{f=H[(m<<2)+B>>2];if((f|0)==-1){break p}n=H[A+12>>2];d=f+2|0;g=(f>>>0)%3|0;q=n+((g?f-1|0:d)<<2)|0;j=0;u=(g|0)!=0|(d|0)!=-1;k=1;d=f;q:{while(1){g=H[n+(d<<2)>>2];r:{if((g|0)==-1){break r}l=-1;p=H[G>>2];r=H[A>>2];i=p+(H[r+(g<<2)>>2]<<2)|0;o=g+1|0;o=(o>>>0)%3|0?o:g-2|0;if((o|0)!=-1){l=H[r+(o<<2)>>2]}o=H[i>>2];s:{t:{if((g>>>0)%3|0){i=g-1|0;break t}i=g+2|0;s=-1;if((i|0)==-1){break s}}s=H[r+(i<<2)>>2]}if((m|0)<=(o|0)){break r}i=H[p+(l<<2)>>2];if((i|0)>=(m|0)){break r}l=H[p+(s<<2)>>2];if((l|0)>=(m|0)){break r}g=H[(h+16|0)+N(j,12)>>2];u:{if(!e){break u}l=N(e,l);r=N(e,i);p=N(e,o);i=0;s=0;if(F){while(1){H[g+(i<<2)>>2]=(H[(i+l<<2)+c>>2]+H[(i+r<<2)+c>>2]|0)-H[(i+p<<2)+c>>2];o=i|1;H[g+(o<<2)>>2]=(H[(l+o<<2)+c>>2]+H[(o+r<<2)+c>>2]|0)-H[(o+p<<2)+c>>2];i=i+2|0;s=s+2|0;if((C|0)!=(s|0)){continue}break}}if(!D){break u}H[g+(i<<2)>>2]=(H[(i+l<<2)+c>>2]+H[(i+r<<2)+c>>2]|0)-H[(i+p<<2)+c>>2]}g=4;j=j+1|0;if((j|0)==4){break q}}v:{if(k&1){i=d+1|0;d=(i>>>0)%3|0?i:d-2|0;g=-1;if((d|0)==-1){break v}d=H[n+(d<<2)>>2];g=-1;if((d|0)==-1){break v}g=d+1|0;g=(g>>>0)%3|0?g:d-2|0;break v}w:{if((d>>>0)%3|0){i=d-1|0;break w}i=d+2|0;g=-1;if((i|0)==-1){break v}}d=H[n+(i<<2)>>2];g=-1;if((d|0)==-1){break v}g=d-1|0;if((d>>>0)%3|0){break v}g=d+2|0}d=g;x:{if((f|0)==(d|0)){break x}if((d|0)==-1&k){if(!u){break x}d=H[q>>2];if((d|0)==-1){break x}k=0;d=(d>>>0)%3|0?d-1|0:d+2|0}if((d|0)!=-1){continue}}break}g=j;if((g|0)<=0){break p}}if(e){ra(t,0,L)}d=g-1|0;r=(d<<2)+y|0;d=N(d,12)+a|0;o=d;s=H[d- -64>>2];k=0;d=H[h>>2];f=0;while(1){j=H[r>>2];H[r>>2]=j+1;if(j>>>0>=s>>>0){break j}y:{if(H[H[o+60>>2]+(j>>>3&536870908)>>2]>>>j&1){break y}f=f+1|0;if(!e){break y}j=H[(h+16|0)+N(k,12)>>2];l=0;i=0;p=0;if(!M){while(1){n=i<<2;q=n+d|0;H[q>>2]=H[j+n>>2]+H[q>>2];q=n|4;u=q+d|0;H[u>>2]=H[j+q>>2]+H[u>>2];q=n|8;u=q+d|0;H[u>>2]=H[j+q>>2]+H[u>>2];n=n|12;q=n+d|0;H[q>>2]=H[j+n>>2]+H[q>>2];i=i+4|0;p=p+4|0;if((K|0)!=(p|0)){continue}break}}if(!E){break y}while(1){n=i<<2;p=n+d|0;H[p>>2]=H[j+n>>2]+H[p>>2];i=i+1|0;l=l+1|0;if((E|0)!=(l|0)){continue}break}}k=k+1|0;if((k|0)!=(g|0)){continue}break}g=N(e,m);if(!f){break o}if(!e){break l}i=0;d=0;if(F){break n}break m}g=N(e,m)}if(H[a+8>>2]<=0){break k}k=(N(m-1|0,e)<<2)+c|0;j=H[x>>2];i=0;while(1){d=i<<2;f=H[d+k>>2];l=H[a+16>>2];z:{if((f|0)>(l|0)){H[d+j>>2]=l;break z}d=d+j|0;l=H[a+12>>2];if((l|0)>(f|0)){H[d>>2]=l;break z}H[d>>2]=f}i=i+1|0;f=H[a+8>>2];if((i|0)<(f|0)){continue}break}d=0;if((f|0)<=0){break k}f=g<<2;i=f+c|0;k=b+f|0;while(1){g=d<<2;f=g+i|0;g=H[g+k>>2]+H[g+j>>2]|0;H[f>>2]=g;A:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break A}g=g+H[a+20>>2]|0}H[f>>2]=g}d=d+1|0;if((d|0)>2]){continue}break}break k}Ca();v()}while(1){j=i<<2;k=j+t|0;H[k>>2]=H[k>>2]/(f|0);j=(j|4)+t|0;H[j>>2]=H[j>>2]/(f|0);i=i+2|0;d=d+2|0;if((C|0)!=(d|0)){continue}break}}if(!D){break l}d=(i<<2)+t|0;H[d>>2]=H[d>>2]/(f|0)}if(H[a+8>>2]<=0){break k}j=H[x>>2];i=0;while(1){d=i<<2;f=H[d+t>>2];k=H[a+16>>2];B:{if((f|0)>(k|0)){H[d+j>>2]=k;break B}d=d+j|0;k=H[a+12>>2];if((k|0)>(f|0)){H[d>>2]=k;break B}H[d>>2]=f}i=i+1|0;f=H[a+8>>2];if((i|0)<(f|0)){continue}break}d=0;if((f|0)<=0){break k}f=g<<2;i=f+c|0;k=b+f|0;while(1){g=d<<2;f=g+i|0;g=H[g+k>>2]+H[g+j>>2]|0;H[f>>2]=g;C:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break C}g=g+H[a+20>>2]|0}H[f>>2]=g}d=d+1|0;if((d|0)>2]){continue}break}}m=m+1|0;z=(w|0)<=(m|0);if((m|0)!=(I|0)){continue}break}}a=H[h>>2];if(a){oa(a)}oa(y);a=H[h+52>>2];if(a){H[h+56>>2]=a;oa(a)}a=H[h+40>>2];if(a){H[h+44>>2]=a;oa(a)}a=H[h+28>>2];if(a){H[h+32>>2]=a;oa(a)}a=H[h+16>>2];if(a){H[h+20>>2]=a;oa(a)}ca=h- -64|0;return z|0}sa();v()}function Od(a,b,c,d,e){var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0;i=ca-80|0;ca=i;H[i+76>>2]=b;y=i+55|0;r=i+56|0;a:{b:{c:{d:{e:while(1){h=b;if((o^2147483647)<(f|0)){break d}o=f+o|0;f:{g:{h:{f=h;g=I[f|0];if(g){while(1){i:{b=g&255;j:{if(!b){b=f;break j}if((b|0)!=37){break i}g=f;while(1){if(I[g+1|0]!=37){b=g;break j}f=f+1|0;j=I[g+2|0];b=g+2|0;g=b;if((j|0)==37){continue}break}}f=f-h|0;x=o^2147483647;if((f|0)>(x|0)){break d}if(a){Ab(a,h,f)}if(f){continue e}H[i+76>>2]=b;f=b+1|0;p=-1;if(!(I[b+2|0]!=36|F[b+1|0]-48>>>0>=10)){p=F[b+1|0]-48|0;s=1;f=b+3|0}H[i+76>>2]=f;n=0;g=F[f|0];b=g-32|0;k:{if(b>>>0>31){k=f;break k}k=f;b=1<>2]=k;n=b|n;g=F[f+1|0];b=g-32|0;if(b>>>0>=32){break k}f=k;b=1<>>0>=10)){H[((F[k+1|0]<<2)+e|0)-192>>2]=10;g=k+3|0;s=1;b=H[((F[k+1|0]<<3)+d|0)-384>>2];break m}if(s){break h}g=k+1|0;if(!a){H[i+76>>2]=g;s=0;q=0;break l}b=H[c>>2];H[c>>2]=b+4;s=0;b=H[b>>2]}H[i+76>>2]=g;q=b;if((b|0)>=0){break l}q=0-q|0;n=n|8192;break l}q=Nd(i+76|0);if((q|0)<0){break d}g=H[i+76>>2]}f=0;m=-1;n:{if(I[g|0]!=46){b=g;u=0;break n}if(I[g+1|0]==42){o:{if(!(I[g+3|0]!=36|F[g+2|0]-48>>>0>=10)){H[((F[g+2|0]<<2)+e|0)-192>>2]=10;b=g+4|0;m=H[((F[g+2|0]<<3)+d|0)-384>>2];break o}if(s){break h}b=g+2|0;m=0;if(!a){break o}j=H[c>>2];H[c>>2]=j+4;m=H[j>>2]}H[i+76>>2]=b;u=(m^-1)>>>31|0;break n}H[i+76>>2]=g+1;m=Nd(i+76|0);b=H[i+76>>2];u=1}while(1){g=f;k=28;l=b;f=F[b|0];if(f-123>>>0<4294967238){break c}b=l+1|0;f=I[(f+N(g,58)|0)+13711|0];if(f-1>>>0<8){continue}break}H[i+76>>2]=b;p:{q:{if((f|0)!=27){if(!f){break c}if((p|0)>=0){H[(p<<2)+e>>2]=f;j=(p<<3)+d|0;f=H[j+4>>2];H[i+64>>2]=H[j>>2];H[i+68>>2]=f;break q}if(!a){break f}Md(i- -64|0,f,c);break p}if((p|0)>=0){break c}}f=0;if(!a){continue e}}j=n&-65537;n=n&8192?j:n;p=0;t=1132;k=r;r:{s:{t:{u:{v:{w:{x:{y:{z:{A:{B:{C:{D:{E:{F:{G:{f=F[l|0];f=g?(f&15)==3?f&-33:f:f;switch(f-88|0){case 11:break r;case 9:case 13:case 14:case 15:break s;case 27:break x;case 12:case 17:break A;case 23:break B;case 0:case 32:break C;case 24:break D;case 22:break E;case 29:break F;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 10:case 16:case 18:case 19:case 20:case 21:case 25:case 26:case 28:case 30:case 31:break g;default:break G}}H:{switch(f-65|0){case 0:case 4:case 5:case 6:break s;case 2:break v;case 1:case 3:break g;default:break H}}if((f|0)==83){break w}break g}l=H[i+64>>2];j=H[i+68>>2];t=1132;break z}f=0;I:{switch(g&255){case 0:H[H[i+64>>2]>>2]=o;continue e;case 1:H[H[i+64>>2]>>2]=o;continue e;case 2:h=H[i+64>>2];H[h>>2]=o;H[h+4>>2]=o>>31;continue e;case 3:G[H[i+64>>2]>>1]=o;continue e;case 4:F[H[i+64>>2]]=o;continue e;case 6:H[H[i+64>>2]>>2]=o;continue e;case 7:break I;default:continue e}}h=H[i+64>>2];H[h>>2]=o;H[h+4>>2]=o>>31;continue e}m=m>>>0<=8?8:m;n=n|8;f=120}h=r;l=H[i+64>>2];j=H[i+68>>2];if(l|j){z=f&32;while(1){h=h-1|0;F[h|0]=z|I[(l&15)+14240|0];w=!j&l>>>0>15|(j|0)!=0;g=j;j=g>>>4|0;l=(g&15)<<28|l>>>4;if(w){continue}break}}if(!(H[i+64>>2]|H[i+68>>2])|!(n&8)){break y}t=(f>>>4|0)+1132|0;p=2;break y}f=r;h=H[i+68>>2];j=h;l=H[i+64>>2];if(h|l){while(1){f=f-1|0;F[f|0]=l&7|48;g=!j&l>>>0>7|(j|0)!=0;h=j;j=h>>>3|0;l=(h&7)<<29|l>>>3;if(g){continue}break}}h=f;if(!(n&8)){break y}f=r-h|0;m=(f|0)<(m|0)?m:f+1|0;break y}l=H[i+64>>2];h=H[i+68>>2];j=h;if((h|0)<0){f=0-(((l|0)!=0)+j|0)|0;j=f;l=0-l|0;H[i+64>>2]=l;H[i+68>>2]=f;p=1;t=1132;break z}if(n&2048){p=1;t=1133;break z}p=n&1;t=p?1134:1132}g=r;if(j){while(1){g=g-1|0;f=j;w=Tj(l,f,10,0);h=da;A=g,B=l-Rj(w,h,10,0)|48,F[A|0]=B;l=w;j=h;if(f>>>0>9){continue}break}}h=l;if(h){while(1){g=g-1|0;f=(h>>>0)/10|0;F[g|0]=h-N(f,10)|48;j=h>>>0>9;h=f;if(j){continue}break}}h=g}if((m|0)<0?u:0){break d}n=u?n&-65537:n;f=H[i+64>>2];j=H[i+68>>2];if(!(m|(f|j)!=0)){h=r;m=0;break g}f=!(f|j)+(r-h|0)|0;m=(f|0)<(m|0)?m:f;break g}g=m>>>0>=2147483647?2147483647:m;k=g;n=(g|0)!=0;h=H[i+64>>2];h=h?h:1614;f=h;J:{K:{L:{M:{if(!(f&3)|!g){break M}while(1){if(!I[f|0]){break L}k=k-1|0;n=(k|0)!=0;f=f+1|0;if(!(f&3)){break M}if(k){continue}break}}if(!n){break K}if(!(!I[f|0]|k>>>0<4)){while(1){l=H[f>>2];if((l^-1)&l-16843009&-2139062144){break L}f=f+4|0;k=k-4|0;if(k>>>0>3){continue}break}}if(!k){break K}}while(1){if(!I[f|0]){break J}f=f+1|0;k=k-1|0;if(k){continue}break}}f=0}f=f?f-h|0:g;k=f+h|0;if((m|0)>=0){n=j;m=f;break g}n=j;m=f;if(I[k|0]){break d}break g}if(m){g=H[i+64>>2];break u}f=0;ib(a,32,q,0,n);break t}H[i+12>>2]=0;H[i+8>>2]=H[i+64>>2];g=i+8|0;H[i+64>>2]=g;m=-1}f=0;N:{while(1){h=H[g>>2];if(!h){break N}j=Ld(i+4|0,h);h=(j|0)<0;if(!(h|j>>>0>m-f>>>0)){g=g+4|0;f=f+j|0;if(m>>>0>f>>>0){continue}break N}break}if(h){break b}}k=61;if((f|0)<0){break c}ib(a,32,q,f,n);if(!f){f=0;break t}k=0;g=H[i+64>>2];while(1){h=H[g>>2];if(!h){break t}h=Ld(i+4|0,h);k=h+k|0;if(k>>>0>f>>>0){break t}Ab(a,i+4|0,h);g=g+4|0;if(f>>>0>k>>>0){continue}break}}ib(a,32,q,f,n^8192);f=(f|0)<(q|0)?q:f;continue e}if((m|0)<0?u:0){break d}v()}F[i+55|0]=H[i+64>>2];m=1;h=y;n=j;break g}g=I[f+1|0];f=f+1|0;continue}}if(a){break a}if(!s){break f}f=1;while(1){a=H[(f<<2)+e>>2];if(a){Md((f<<3)+d|0,a,c);o=1;f=f+1|0;if((f|0)!=10){continue}break a}break}o=1;if(f>>>0>=10){break a}while(1){if(H[(f<<2)+e>>2]){break h}f=f+1|0;if((f|0)!=10){continue}break}break a}k=28;break c}l=k-h|0;j=(m|0)>(l|0)?m:l;if((j|0)>(p^2147483647)){break d}k=61;g=j+p|0;f=(g|0)<(q|0)?q:g;if((x|0)<(f|0)){break c}ib(a,32,f,g,n);Ab(a,t,p);ib(a,48,f,g,n^65536);ib(a,48,j,l,0);Ab(a,h,l);ib(a,32,f,g,n^8192);continue}break}o=0;break a}k=61}H[3992]=k}o=-1}ca=i+80|0;return o}function hj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0;a:{b:{if((e|0)!=2){break b}H[a+8>>2]=2;H[a- -64>>2]=f;M=a+32|0;e=H[M>>2];d=H[a+36>>2]-e|0;c:{if(d>>>0<=7){ya(M,2-(d>>>2|0)|0);break c}if((d|0)==8){break c}H[a+36>>2]=e+8}i=1;d=H[a+56>>2];d=H[d+4>>2]-H[d>>2]|0;if((d|0)<=0){break b}o=a+60|0;d=d>>>2|0;X=d>>>0<=1?1:d;Y=a+68|0;d=0;while(1){f=H[a+56>>2];e=H[f>>2];if(H[f+4>>2]-e>>2>>>0<=d>>>0){break a}k=ca-80|0;ca=k;f=-1;d:{e:{e=H[e+(d<<2)>>2];if((e|0)==-1){break e}i=H[o+32>>2];g=e+1|0;g=(g>>>0)%3|0?g:e-2|0;if((g|0)!=-1){f=H[H[i>>2]+(g<<2)>>2]}p=-1;e=e+((e>>>0)%3|0?-1:2)|0;if((e|0)!=-1){p=H[H[i>>2]+(e<<2)>>2]}i=H[o+36>>2];e=H[i>>2];i=H[i+4>>2]-e>>2;if(i>>>0<=f>>>0|i>>>0<=p>>>0){break e}f:{g:{h:{i:{j:{k:{j=H[e+(p<<2)>>2];f=H[e+(f<<2)>>2];if((j|0)>=(d|0)|(f|0)>=(d|0)){break k}i=(j<<3)+c|0;w=H[i+4>>2];g=(f<<3)+c|0;e=H[g+4>>2];l=H[i>>2];i=H[g>>2];if(!((l|0)!=(i|0)|(e|0)!=(w|0))){H[o+8>>2]=i;H[o+12>>2]=e;break j}p=H[H[o+4>>2]+(d<<2)>>2];H[k+72>>2]=0;H[k+76>>2]=0;g=k- -64|0;H[g>>2]=0;H[g+4>>2]=0;H[k+56>>2]=0;H[k+60>>2]=0;g=H[o>>2];if(!I[g+84|0]){p=H[H[g+68>>2]+(p<<2)>>2]}Sa(g,p,F[g+24|0],k+56|0);p=H[H[o+4>>2]+(f<<2)>>2];H[k+48>>2]=0;H[k+52>>2]=0;H[k+40>>2]=0;H[k+44>>2]=0;H[k+32>>2]=0;H[k+36>>2]=0;g=H[o>>2];if(!I[g+84|0]){p=H[H[g+68>>2]+(p<<2)>>2]}Sa(g,p,F[g+24|0],k+32|0);p=H[H[o+4>>2]+(j<<2)>>2];H[k+24>>2]=0;H[k+28>>2]=0;H[k+16>>2]=0;H[k+20>>2]=0;H[k+8>>2]=0;H[k+12>>2]=0;g=H[o>>2];if(!I[g+84|0]){p=H[H[g+68>>2]+(p<<2)>>2]}Sa(g,p,F[g+24|0],k+8|0);g=H[k+16>>2];n=H[k+40>>2];x=g-n|0;N=H[k+44>>2];g=H[k+20>>2]-(N+(g>>>0>>0)|0)|0;E=g;j=Rj(x,g,x,g);q=da;g=H[k+8>>2];z=H[k+32>>2];A=g-z|0;O=H[k+36>>2];g=H[k+12>>2]-(O+(g>>>0>>0)|0)|0;G=g;h=j;j=Rj(A,g,A,g);g=h+j|0;h=da+q|0;h=g>>>0>>0?h+1|0:h;j=H[k+24>>2];B=H[k+48>>2];C=j-B|0;P=H[k+52>>2];j=H[k+28>>2]-(P+(j>>>0>>0)|0)|0;J=j;m=g;g=Rj(C,j,C,j);r=m+g|0;h=da+h|0;s=g>>>0>r>>>0?h+1|0:h;if(!(s|r)){break k}p=0;D=Tj(-1,2147483647,r,s);f=i>>31;R=f;h=f>>31;Q=i;g=h;q=i^g;i=q-g|0;f=(f^g)-((g>>>0>q>>>0)+g|0)|0;g=f;f=e>>31;S=f;K=e;e=f>>31;q=K^e;m=q-e|0;h=f>>31;e=(h^f)-((e>>>0>q>>>0)+h|0)|0;f=(g|0)==(e|0)&i>>>0>m>>>0|e>>>0>>0;i=f?i:m;j=da;e=f?g:e;if((j|0)==(e|0)&i>>>0>D>>>0|e>>>0>j>>>0){break f}i=H[k+64>>2];T=H[k+68>>2];e=Rj(i-n|0,T-((i>>>0>>0)+N|0)|0,x,E);f=da;g=H[k+56>>2];U=H[k+60>>2];j=Rj(g-z|0,U-((g>>>0>>0)+O|0)|0,A,G);e=j+e|0;h=da+f|0;h=e>>>0>>0?h+1|0:h;f=e;m=H[k+72>>2];V=H[k+76>>2];e=Rj(m-B|0,V-((m>>>0>>0)+P|0)|0,C,J);j=f+e|0;f=da+h|0;q=e>>>0>j>>>0?f+1|0:f;e=l;D=e-Q|0;e=(e>>31)-((e>>>0>>0)+R|0)|0;W=e;l=e>>31;y=l^D;f=y-l|0;h=e>>31;e=(h^e)-((l>>>0>y>>>0)+h|0)|0;h=e;y=w-K|0;e=(w>>31)-((w>>>0>>0)+S|0)|0;w=e;l=f;t=e>>31;u=t^y;L=u-t|0;f=e>>31;e=(f^e)-((t>>>0>u>>>0)+f|0)|0;f=(h|0)==(e|0)&l>>>0>L>>>0|e>>>0>>0;f=Tj(-1,2147483647,f?l:L,f?h:e)>>>0>>0;e=da;if(f&(e|0)<=(q|0)|(e|0)<(q|0)){break f}e=G>>31;f=e;l=e^A;e=l-e|0;f=(f^G)-((f>>>0>l>>>0)+f|0)|0;h=E>>31;t=h^x;u=t-h|0;l=(h^E)-((h>>>0>t>>>0)+h|0)|0;h=(f|0)==(l|0)&e>>>0>u>>>0|f>>>0>l>>>0;e=h?e:u;f=h?f:l;h=J>>31;L=e;t=h^C;u=t-h|0;l=(h^J)-((h>>>0>t>>>0)+h|0)|0;e=(f|0)==(l|0)&e>>>0>u>>>0|f>>>0>l>>>0;f=Tj(-1,2147483647,e?L:u,e?f:l)>>>0>>0;e=da;if(f&(e|0)<=(q|0)|(e|0)<(q|0)){break f}l=1;e=0;f=n;n=Sj(Rj(j,q,x,E),da,r,s);f=f+n|0;h=da+N|0;h=f>>>0>>0?h+1|0:h;n=i-f|0;f=T-((f>>>0>i>>>0)+h|0)|0;n=Rj(n,f,n,f);x=da;f=g;h=Sj(Rj(j,q,A,G),da,r,s);i=h+z|0;g=da+O|0;g=h>>>0>i>>>0?g+1|0:g;h=f-i|0;f=U-((f>>>0>>0)+g|0)|0;g=Rj(h,f,h,f);i=g+n|0;f=da+x|0;f=g>>>0>i>>>0?f+1|0:f;n=i;g=Sj(Rj(j,q,C,J),da,r,s);i=g+B|0;h=da+P|0;h=g>>>0>i>>>0?h+1|0:h;g=m-i|0;i=V-((i>>>0>m>>>0)+h|0)|0;m=Rj(g,i,g,i);i=m+n|0;g=da+f|0;f=Rj(i,i>>>0>>0?g+1|0:g,r,s);i=da;m=i;if(!i&f>>>0<=1){break i}h=f;while(1){g=e<<1|l>>>31;l=l<<1;e=g;n=!i&h>>>0>7|(i|0)!=0;h=(i&3)<<30|h>>>2;i=i>>>2|0;if(n){continue}break}break h}if((d|0)>(f|0)){e=f<<1}else{if((d|0)<=0){H[o+8>>2]=0;H[o+12>>2]=0;break j}e=(d<<1)-2|0}e=(e<<2)+c|0;H[o+8>>2]=H[e>>2];H[o+12>>2]=H[e+4>>2]}p=1;break f}e=m;l=f;if(f-1|0){break g}}while(1){i=Tj(f,m,l,e);h=e+da|0;e=i+l|0;h=e>>>0>>0?h+1|0:h;l=(h&1)<<31|e>>>1;e=h>>>1|0;i=Rj(l,e,l,e);g=da;if((m|0)==(g|0)&f>>>0>>0|g>>>0>m>>>0){continue}break}}f=H[o+20>>2];if(!f){break f}g=f-1|0;h=H[H[o+16>>2]+(g>>>3&536870908)>>2];H[o+20>>2]=g;p=1;f=Rj(j,q,y,w);i=da;n=Rj(r,s,K,S);m=n+f|0;f=da+i|0;f=m>>>0>>0?f+1|0:f;i=Rj(l,e,D,W);g=h>>>g&1;h=g?0-i|0:i;m=h+m|0;n=f;f=da;i=n+(g?0-(f+((i|0)!=0)|0)|0:f)|0;Z=o,_=Sj(m,h>>>0>m>>>0?i+1|0:i,r,s),H[Z+12>>2]=_;f=Rj(j,q,D,W);i=da;j=Rj(r,s,Q,R);f=j+f|0;h=da+i|0;e=Rj(l,e,y,w);i=0-e|0;l=da;h=(f>>>0>>0?h+1|0:h)+(g?l:0-(((e|0)!=0)+l|0)|0)|0;i=g?e:i;f=i+f|0;Z=o,_=Sj(f,f>>>0>>0?h+1|0:h,r,s),H[Z+8>>2]=_}ca=k+80|0;e=p;break d}Ca();v()}i=e;if(!e){return 0}l:{if(H[a+8>>2]<=0){break l}l=H[M>>2];e=0;while(1){f=e<<2;g=H[f+Y>>2];j=H[a+16>>2];m:{if((g|0)>(j|0)){H[f+l>>2]=j;break m}f=f+l|0;j=H[a+12>>2];if((j|0)>(g|0)){H[f>>2]=j;break m}H[f>>2]=g}e=e+1|0;g=H[a+8>>2];if((e|0)<(g|0)){continue}break}f=0;if((g|0)<=0){break l}e=d<<3;j=e+c|0;q=b+e|0;while(1){g=f<<2;e=g+j|0;g=H[g+q>>2]+H[g+l>>2]|0;H[e>>2]=g;n:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break n}g=g+H[a+20>>2]|0}H[e>>2]=g}f=f+1|0;if((f|0)>2]){continue}break}}d=d+1|0;if((X|0)!=(d|0)){continue}break}}return i|0}Ca();v()}function xj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0;a:{b:{if((e|0)!=2){break b}H[a+8>>2]=2;H[a- -64>>2]=f;M=a+32|0;e=H[M>>2];d=H[a+36>>2]-e|0;c:{if(d>>>0<=7){ya(M,2-(d>>>2|0)|0);break c}if((d|0)==8){break c}H[a+36>>2]=e+8}p=1;d=H[a+56>>2];d=H[d+4>>2]-H[d>>2]|0;if((d|0)<=0){break b}o=a+60|0;d=d>>>2|0;X=d>>>0<=1?1:d;Y=a+68|0;d=0;while(1){e=H[a+56>>2];h=H[e>>2];if(H[e+4>>2]-h>>2>>>0<=d>>>0){break a}k=ca-80|0;ca=k;f=-1;h=H[h+(d<<2)>>2];e=-1;d:{if((h|0)==-1){break d}e=h+1|0;f=(e>>>0)%3|0?e:h-2|0;e=h-1|0;if((h>>>0)%3|0){break d}e=h+2|0}g=H[o+36>>2];h=H[g>>2];e:{f:{g:{h:{i:{g=H[g+4>>2]-h>>2;i=f<<2;f=H[H[o+32>>2]+28>>2];j=H[i+f>>2];if(g>>>0<=j>>>0){break i}e=H[f+(e<<2)>>2];if(e>>>0>=g>>>0){break i}j:{k:{l=H[h+(e<<2)>>2];f=H[h+(j<<2)>>2];if((l|0)>=(d|0)|(f|0)>=(d|0)){break k}h=(l<<3)+c|0;w=H[h+4>>2];g=(f<<3)+c|0;e=H[g+4>>2];j=H[h>>2];h=H[g>>2];if(!((j|0)!=(h|0)|(e|0)!=(w|0))){H[o+8>>2]=h;H[o+12>>2]=e;break j}p=H[H[o+4>>2]+(d<<2)>>2];H[k+72>>2]=0;H[k+76>>2]=0;g=k- -64|0;H[g>>2]=0;H[g+4>>2]=0;H[k+56>>2]=0;H[k+60>>2]=0;g=H[o>>2];if(!I[g+84|0]){p=H[H[g+68>>2]+(p<<2)>>2]}Sa(g,p,F[g+24|0],k+56|0);p=H[H[o+4>>2]+(f<<2)>>2];H[k+48>>2]=0;H[k+52>>2]=0;H[k+40>>2]=0;H[k+44>>2]=0;H[k+32>>2]=0;H[k+36>>2]=0;g=H[o>>2];if(!I[g+84|0]){p=H[H[g+68>>2]+(p<<2)>>2]}Sa(g,p,F[g+24|0],k+32|0);p=H[H[o+4>>2]+(l<<2)>>2];H[k+24>>2]=0;H[k+28>>2]=0;H[k+16>>2]=0;H[k+20>>2]=0;H[k+8>>2]=0;H[k+12>>2]=0;g=H[o>>2];if(!I[g+84|0]){p=H[H[g+68>>2]+(p<<2)>>2]}Sa(g,p,F[g+24|0],k+8|0);g=H[k+16>>2];n=H[k+40>>2];x=g-n|0;N=H[k+44>>2];g=H[k+20>>2]-(N+(g>>>0>>0)|0)|0;E=g;l=Rj(x,g,x,g);q=da;g=H[k+8>>2];z=H[k+32>>2];A=g-z|0;O=H[k+36>>2];g=H[k+12>>2]-(O+(g>>>0>>0)|0)|0;G=g;i=l;l=Rj(A,g,A,g);g=i+l|0;i=da+q|0;i=g>>>0>>0?i+1|0:i;l=H[k+24>>2];B=H[k+48>>2];C=l-B|0;P=H[k+52>>2];l=H[k+28>>2]-(P+(l>>>0>>0)|0)|0;J=l;m=g;g=Rj(C,l,C,l);r=m+g|0;i=da+i|0;s=g>>>0>r>>>0?i+1|0:i;if(!(s|r)){break k}p=0;D=Tj(-1,2147483647,r,s);f=h>>31;R=f;i=f>>31;Q=h;g=i;q=h^g;h=q-g|0;f=(f^g)-((g>>>0>q>>>0)+g|0)|0;g=f;f=e>>31;S=f;K=e;e=f>>31;q=K^e;m=q-e|0;i=f>>31;e=(i^f)-((e>>>0>q>>>0)+i|0)|0;f=(g|0)==(e|0)&h>>>0>m>>>0|e>>>0>>0;h=f?h:m;l=da;e=f?g:e;if((l|0)==(e|0)&h>>>0>D>>>0|e>>>0>l>>>0){break e}h=H[k+64>>2];T=H[k+68>>2];e=Rj(h-n|0,T-((h>>>0>>0)+N|0)|0,x,E);f=da;g=H[k+56>>2];U=H[k+60>>2];l=Rj(g-z|0,U-((g>>>0>>0)+O|0)|0,A,G);e=l+e|0;i=da+f|0;i=e>>>0>>0?i+1|0:i;f=e;m=H[k+72>>2];V=H[k+76>>2];e=Rj(m-B|0,V-((m>>>0>>0)+P|0)|0,C,J);l=f+e|0;f=da+i|0;q=e>>>0>l>>>0?f+1|0:f;e=j;D=e-Q|0;e=(e>>31)-((e>>>0>>0)+R|0)|0;W=e;j=e>>31;y=j^D;f=y-j|0;i=e>>31;e=(i^e)-((j>>>0>y>>>0)+i|0)|0;i=e;y=w-K|0;e=(w>>31)-((w>>>0>>0)+S|0)|0;w=e;j=f;t=e>>31;u=t^y;L=u-t|0;f=e>>31;e=(f^e)-((t>>>0>u>>>0)+f|0)|0;f=(i|0)==(e|0)&j>>>0>L>>>0|e>>>0>>0;f=Tj(-1,2147483647,f?j:L,f?i:e)>>>0>>0;e=da;if(f&(e|0)<=(q|0)|(e|0)<(q|0)){break e}e=G>>31;f=e;j=e^A;e=j-e|0;f=(f^G)-((f>>>0>j>>>0)+f|0)|0;i=E>>31;t=i^x;u=t-i|0;j=(i^E)-((i>>>0>t>>>0)+i|0)|0;i=(f|0)==(j|0)&e>>>0>u>>>0|f>>>0>j>>>0;e=i?e:u;f=i?f:j;i=J>>31;L=e;t=i^C;u=t-i|0;j=(i^J)-((i>>>0>t>>>0)+i|0)|0;e=(f|0)==(j|0)&e>>>0>u>>>0|f>>>0>j>>>0;f=Tj(-1,2147483647,e?L:u,e?f:j)>>>0>>0;e=da;if(f&(e|0)<=(q|0)|(e|0)<(q|0)){break e}j=1;e=0;f=n;n=Sj(Rj(l,q,x,E),da,r,s);f=f+n|0;i=da+N|0;i=f>>>0>>0?i+1|0:i;n=h-f|0;f=T-((f>>>0>h>>>0)+i|0)|0;n=Rj(n,f,n,f);x=da;f=g;i=Sj(Rj(l,q,A,G),da,r,s);h=i+z|0;g=da+O|0;g=h>>>0>>0?g+1|0:g;i=f-h|0;f=U-((f>>>0>>0)+g|0)|0;g=Rj(i,f,i,f);h=g+n|0;f=da+x|0;f=h>>>0>>0?f+1|0:f;n=h;g=Sj(Rj(l,q,C,J),da,r,s);h=g+B|0;i=da+P|0;i=h>>>0>>0?i+1|0:i;g=m-h|0;h=V-((h>>>0>m>>>0)+i|0)|0;m=Rj(g,h,g,h);h=m+n|0;g=da+f|0;f=Rj(h,h>>>0>>0?g+1|0:g,r,s);h=da;m=h;if(!h&f>>>0<=1){break h}i=f;while(1){g=e<<1|j>>>31;j=j<<1;e=g;n=!h&i>>>0>7|(h|0)!=0;i=(h&3)<<30|i>>>2;h=h>>>2|0;if(n){continue}break}break g}if((d|0)>(f|0)){e=f<<1}else{if((d|0)<=0){H[o+8>>2]=0;H[o+12>>2]=0;break j}e=(d<<1)-2|0}e=(e<<2)+c|0;H[o+8>>2]=H[e>>2];H[o+12>>2]=H[e+4>>2]}p=1;break e}Ca();v()}e=m;j=f;if(f-1|0){break f}}while(1){h=Tj(f,m,j,e);i=e+da|0;e=h+j|0;i=e>>>0>>0?i+1|0:i;j=(i&1)<<31|e>>>1;e=i>>>1|0;h=Rj(j,e,j,e);g=da;if((m|0)==(g|0)&f>>>0>>0|g>>>0>m>>>0){continue}break}}f=H[o+20>>2];if(!f){break e}g=f-1|0;i=H[H[o+16>>2]+(g>>>3&536870908)>>2];H[o+20>>2]=g;p=1;f=Rj(l,q,y,w);h=da;n=Rj(r,s,K,S);m=n+f|0;f=da+h|0;f=m>>>0>>0?f+1|0:f;h=Rj(j,e,D,W);g=i>>>g&1;i=g?0-h|0:h;m=i+m|0;n=f;f=da;h=n+(g?0-(f+((h|0)!=0)|0)|0:f)|0;Z=o,_=Sj(m,i>>>0>m>>>0?h+1|0:h,r,s),H[Z+12>>2]=_;f=Rj(l,q,D,W);h=da;l=Rj(r,s,Q,R);f=l+f|0;i=da+h|0;e=Rj(j,e,y,w);h=0-e|0;j=da;i=(f>>>0>>0?i+1|0:i)+(g?j:0-(((e|0)!=0)+j|0)|0)|0;h=g?e:h;f=h+f|0;Z=o,_=Sj(f,f>>>0>>0?i+1|0:i,r,s),H[Z+8>>2]=_}ca=k+80|0;if(!p){return 0}l:{if(H[a+8>>2]<=0){break l}g=H[M>>2];e=0;while(1){f=e<<2;h=H[f+Y>>2];j=H[a+16>>2];m:{if((h|0)>(j|0)){H[f+g>>2]=j;break m}f=f+g|0;j=H[a+12>>2];if((j|0)>(h|0)){H[f>>2]=j;break m}H[f>>2]=h}e=e+1|0;h=H[a+8>>2];if((e|0)<(h|0)){continue}break}f=0;if((h|0)<=0){break l}e=d<<3;j=e+c|0;l=b+e|0;while(1){h=f<<2;e=h+j|0;h=H[h+l>>2]+H[h+g>>2]|0;H[e>>2]=h;n:{if((h|0)>H[a+16>>2]){i=h-H[a+20>>2]|0}else{if((h|0)>=H[a+12>>2]){break n}i=h+H[a+20>>2]|0}H[e>>2]=i}f=f+1|0;if((f|0)>2]){continue}break}}d=d+1|0;if((X|0)!=(d|0)){continue}break}}return p|0}Ca();v()}function $a(a,b){var c=0,d=0,e=0,f=0,g=0;e=ca-16|0;ca=e;H[a+12>>2]=b;H[a+8>>2]=0;H[a>>2]=0;H[a+4>>2]=0;d=a+16|0;H[d>>2]=0;H[d+4>>2]=0;F[d+5|0]=0;F[d+6|0]=0;F[d+7|0]=0;F[d+8|0]=0;F[d+9|0]=0;F[d+10|0]=0;F[d+11|0]=0;F[d+12|0]=0;c=d+16|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+32|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+48|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d- -64|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+80|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+96|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+112|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+128|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+144|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+160|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+176|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+192|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+208|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+224|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+240|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+256|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+272|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+288|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+304|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+320|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+336|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+352|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+368|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+384|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+400|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+416|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+432|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+448|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+464|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c=d+480|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;d=d+496|0;H[d>>2]=0;H[d+4>>2]=0;F[d+5|0]=0;F[d+6|0]=0;F[d+7|0]=0;F[d+8|0]=0;F[d+9|0]=0;F[d+10|0]=0;F[d+11|0]=0;F[d+12|0]=0;H[a+528>>2]=0;H[a+532>>2]=0;F[a+533|0]=0;F[a+534|0]=0;F[a+535|0]=0;F[a+536|0]=0;F[a+537|0]=0;F[a+538|0]=0;F[a+539|0]=0;F[a+540|0]=0;H[a+544>>2]=0;H[a+548>>2]=0;H[a+560>>2]=0;H[a+552>>2]=0;H[a+556>>2]=0;H[a+564>>2]=0;H[a+568>>2]=0;H[a+580>>2]=0;H[a+572>>2]=0;H[a+576>>2]=0;H[a+584>>2]=0;H[a+588>>2]=0;H[a+600>>2]=0;H[a+592>>2]=0;H[a+596>>2]=0;H[a+612>>2]=0;H[a+604>>2]=0;H[a+608>>2]=0;g=a+628|0;a:{b:{if(b){if(b>>>0<1073741824){break b}sa();v()}H[a+616>>2]=0;H[a+620>>2]=0;H[a+624>>2]=0;H[e+8>>2]=0;H[e>>2]=0;H[e+4>>2]=0;d=1;break a}d=b<<2;c=pa(d);H[a+604>>2]=c;f=c+d|0;H[a+612>>2]=f;ra(c,0,d);H[a+624>>2]=0;H[a+616>>2]=0;H[a+620>>2]=0;H[a+608>>2]=f;c=pa(d);H[a+616>>2]=c;f=c+d|0;H[a+624>>2]=f;ra(c,0,d);H[a+620>>2]=f;c=pa(d);H[e>>2]=c;f=c+d|0;H[e+8>>2]=f;ra(c,0,d);H[e+4>>2]=f;d=b<<5|1}tb(g,d,e);c=H[e>>2];if(c){H[e+4>>2]=c;oa(c)}H[e+8>>2]=0;H[e>>2]=0;H[e+4>>2]=0;if(b){b=b<<2;c=pa(b);H[e>>2]=c;f=b+c|0;H[e+8>>2]=f;ra(c,0,b);H[e+4>>2]=f}tb(a+640|0,d,e);b=H[e>>2];if(b){H[e+4>>2]=b;oa(b)}ca=e+16|0;return a}function gc(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=O(0),n=O(0),o=0;a:{b:{if(!d){break b}c:{switch(H[a+28>>2]-1|0){case 0:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}G[(g<<1)+d>>1]=F[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 1:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}G[(g<<1)+d>>1]=I[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 2:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}G[(g<<1)+d>>1]=J[b>>1];b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 3:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){return 0}e=G[b>>1];if((e|0)<0){break b}G[(g<<1)+d>>1]=e;b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 4:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}e=H[b>>2];if(e+32768>>>0>65535){break b}G[(g<<1)+d>>1]=e;b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 5:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}e=H[b>>2];if(e>>>0>32767){break b}G[(g<<1)+d>>1]=e;b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 6:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;k=H[e+4>>2];while(1){if(b>>>0>=k>>>0){break b}h=H[b+4>>2];e=H[b>>2];i=e+32768|0;h=i>>>0<32768?h+1|0:h;if(!h&i>>>0>65535|h){break b}G[(g<<1)+d>>1]=e;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 7:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}k=H[b+4>>2];e=H[b>>2];if(!k&e>>>0>32767|k){break b}G[(g<<1)+d>>1]=e;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 8:d:{e:{e=I[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break e}e=H[a>>2];j=H[e>>2];g=j;f=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=H[e+4>>2];e=f-j|0;if(!I[a+32|0]){j=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=L[g>>2];if(m>=O(32767)|m>1]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}j=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=L[g>>2];if(m>=O(32767)|mO(1)){break d}e=(b<<1)+d|0;l=T(+m*32767+.5);f:{if(P(l)<2147483648){i=~~l;break f}i=-2147483648}G[e>>1]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}j=1;if(c>>>0<=e>>>0){break d}ra((e<<1)+d|0,0,c-e<<1)}return j;case 9:g:{h:{e=I[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break h}e=H[a>>2];j=H[e>>2];g=j;f=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=H[e+4>>2];e=f-j|0;if(!I[a+32|0]){j=0;if((b|0)>=(e|0)){break g}b=0;while(1){l=M[g>>3];if(l>=32767|l<-32768|l!=l){break g}o=P(l);if(o==Infinity){break g}e=(b<<1)+d|0;if(o<2147483648){i=~~l}else{i=-2147483648}G[e>>1]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}j=0;if((b|0)>=(e|0)){break g}b=0;while(1){l=M[g>>3];if(l>=32767|l<-32768|(P(l)==Infinity|l!=l)){break g}if(l<0|l>1){break g}e=(b<<1)+d|0;l=T(l*32767+.5);i:{if(P(l)<2147483648){i=~~l;break i}i=-2147483648}G[e>>1]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}j=1;if(c>>>0<=e>>>0){break g}ra((e<<1)+d|0,0,c-e<<1)}return j;case 10:break c;default:break b}}e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}G[(g<<1)+d>>1]=I[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}ra((e<<1)+d|0,0,(c&255)-e<<1)}return j}ra((e<<1)+d|0,0,(c&255)-e<<1);return 1}function ec(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=O(0),n=O(0),o=0;a:{b:{if(!d){break b}c:{switch(H[a+28>>2]-1|0){case 0:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}H[(g<<2)+d>>2]=F[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 1:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}H[(g<<2)+d>>2]=I[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 2:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}H[(g<<2)+d>>2]=G[b>>1];b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 3:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}H[(g<<2)+d>>2]=J[b>>1];b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 4:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}H[(g<<2)+d>>2]=H[b>>2];b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 5:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){return 0}e=H[b>>2];if((e|0)<0){break b}H[(g<<2)+d>>2]=e;b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 6:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;k=H[e+4>>2];while(1){if(b>>>0>=k>>>0){break b}h=H[b+4>>2];e=H[b>>2];if(e- -2147483648>>>0<2147483648?h+1|0:h){break b}H[(g<<2)+d>>2]=e;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 7:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}k=H[b+4>>2];e=H[b>>2];if(!k&e>>>0>2147483647|k){break b}H[(g<<2)+d>>2]=e;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 8:d:{e:{e=I[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break e}e=H[a>>2];j=H[e>>2];g=j;f=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=H[e+4>>2];e=f-j|0;if(!I[a+32|0]){j=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=L[g>>2];if(m>=O(2147483648)|m>2]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}j=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=L[g>>2];if(m>=O(2147483648)|mO(1)){break d}e=(b<<2)+d|0;l=T(+m*2147483647+.5);f:{if(P(l)<2147483648){i=~~l;break f}i=-2147483648}H[e>>2]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}j=1;if(c>>>0<=e>>>0){break d}ra((e<<2)+d|0,0,c-e<<2)}return j;case 9:g:{h:{e=I[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break h}e=H[a>>2];j=H[e>>2];g=j;f=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=H[e+4>>2];e=f-j|0;if(!I[a+32|0]){j=0;if((b|0)>=(e|0)){break g}b=0;while(1){l=M[g>>3];if(l>=2147483647|l<-2147483648|l!=l){break g}o=P(l);if(o==Infinity){break g}e=(b<<2)+d|0;if(o<2147483648){i=~~l}else{i=-2147483648}H[e>>2]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}j=0;if((b|0)>=(e|0)){break g}b=0;while(1){l=M[g>>3];if(l>=2147483647|l<-2147483648|(P(l)==Infinity|l!=l)){break g}if(l<0|l>1){break g}e=(b<<2)+d|0;l=T(l*2147483647+.5);i:{if(P(l)<2147483648){i=~~l;break i}i=-2147483648}H[e>>2]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}j=1;if(c>>>0<=e>>>0){break g}ra((e<<2)+d|0,0,c-e<<2)}return j;case 10:break c;default:break b}}e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}H[(g<<2)+d>>2]=I[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}ra((e<<2)+d|0,0,(c&255)-e<<2)}return j}ra((e<<2)+d|0,0,(c&255)-e<<2);return 1}function fc(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=O(0);a:{b:{if(!d){break b}c:{switch(H[a+28>>2]-1|0){case 0:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){return 0}e=F[b|0];if((e|0)<0){break b}G[(g<<1)+d>>1]=e&255;b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 1:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}G[(g<<1)+d>>1]=I[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 2:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){return 0}e=G[b>>1];if((e|0)<0){break b}G[(g<<1)+d>>1]=e;b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 3:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}G[(g<<1)+d>>1]=J[b>>1];b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 4:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}e=H[b>>2];if(e>>>0>65535){break b}G[(g<<1)+d>>1]=e;b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 5:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}e=H[b>>2];if(e>>>0>65535){break b}G[(g<<1)+d>>1]=e;b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 6:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}k=H[b+4>>2];e=H[b>>2];if(!k&e>>>0>65535|k){break b}G[(g<<1)+d>>1]=e;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 7:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}k=H[b+4>>2];e=H[b>>2];if(!k&e>>>0>65535|k){break b}G[(g<<1)+d>>1]=e;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 8:d:{e:{e=I[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break e}e=H[a>>2];l=H[e>>2];g=l;f=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=H[e+4>>2];e=f-l|0;if(!I[a+32|0]){l=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=L[g>>2];if(m>=O(65535)|m=O(0)){i=~~m>>>0}else{i=0}G[e>>1]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}l=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=L[g>>2];if(m>=O(65535)|mO(1)){break d}e=(b<<1)+d|0;j=T(+m*65535+.5);f:{if(j<4294967296&j>=0){i=~~j>>>0;break f}i=0}G[e>>1]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}l=1;if(c>>>0<=e>>>0){break d}ra((e<<1)+d|0,0,c-e<<1)}return l;case 9:g:{h:{e=I[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break h}e=H[a>>2];l=H[e>>2];g=l;f=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=H[e+4>>2];e=f-l|0;if(!I[a+32|0]){l=0;if((b|0)>=(e|0)){break g}b=0;while(1){j=M[g>>3];if(j>=65535|j<0|(P(j)==Infinity|j!=j)){break g}e=(b<<1)+d|0;if(j<4294967296&j>=0){i=~~j>>>0}else{i=0}G[e>>1]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}l=0;if((b|0)>=(e|0)){break g}b=0;while(1){j=M[g>>3];if(j>=65535|j<0|(P(j)==Infinity|j!=j)){break g}if(j>1){break g}e=(b<<1)+d|0;j=T(j*65535+.5);i:{if(j<4294967296&j>=0){i=~~j>>>0;break i}i=0}G[e>>1]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}l=1;if(c>>>0<=e>>>0){break g}ra((e<<1)+d|0,0,c-e<<1)}return l;case 10:break c;default:break b}}e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];k=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}G[(g<<1)+d>>1]=I[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}ra((e<<1)+d|0,0,(c&255)-e<<1)}return l}ra((e<<1)+d|0,0,(c&255)-e<<1);return 1}function Sa(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=O(0),l=0,m=0,n=O(0),o=0;a:{if(!d){break a}b:{c:{switch(H[a+28>>2]-1|0){case 0:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;i=F[b|0];H[e>>2]=i;H[e+4>>2]=i>>31;b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 1:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;H[e>>2]=I[b|0];H[e+4>>2]=0;b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 2:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;i=G[b>>1];H[e>>2]=i;H[e+4>>2]=i>>31;b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 3:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;H[e>>2]=J[b>>1];H[e+4>>2]=0;b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 4:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;i=H[b>>2];H[e>>2]=i;H[e+4>>2]=i>>31;b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 5:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;H[e>>2]=H[b>>2];H[e+4>>2]=0;b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 6:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}i=H[b+4>>2];e=(g<<3)+d|0;H[e>>2]=H[b>>2];H[e+4>>2]=i;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 7:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=H[b>>2];i=H[b+4>>2];if((i|0)<0){break a}j=(g<<3)+d|0;H[j>>2]=e;H[j+4>>2]=i;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 8:d:{e=I[a+24|0];f=c&255;if(!(e>>>0>>0?e:f)){break d}if(I[a+32|0]){break a}e=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);j=b;b=b+e|0;e=H[a>>2];i=H[e+4>>2];e=H[e>>2];if((b|0)>=(i-e|0)){break a}g=b+e|0;h=c&255;b=0;while(1){k=L[g>>2];if(k>=O(0x8000000000000000)|k=O(1)?~~(k>O(0)?O(R(O(T(O(k*O(2.3283064365386963e-10)))),O(4294967296))):O(U(O(O(k-O(~~k>>>0>>>0))*O(2.3283064365386963e-10)))))>>>0:0;m=~~k>>>0;break e}j=-2147483648;m=0}H[e>>2]=m;H[e+4>>2]=j;b=b+1|0;e=I[a+24|0];if(b>>>0>=(e>>>0>>0?e:h)>>>0){break d}g=g+4|0;if(i>>>0>g>>>0){continue}break}break a}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 9:f:{e=I[a+24|0];f=c&255;if(!(e>>>0>>0?e:f)){break f}if(I[a+32|0]){break a}e=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);j=b;b=b+e|0;e=H[a>>2];i=H[e+4>>2];e=H[e>>2];if((b|0)>=(i-e|0)){break a}g=b+e|0;h=c&255;b=0;while(1){l=M[g>>3];if(l>=0x8000000000000000|l<-0x8000000000000000|l!=l){break a}o=P(l);if(o==Infinity){break a}e=(b<<3)+d|0;g:{if(o<0x8000000000000000){j=P(l)>=1?~~(l>0?R(T(l*2.3283064365386963e-10),4294967295):U((l-+(~~l>>>0>>>0))*2.3283064365386963e-10))>>>0:0;m=~~l>>>0;break g}j=-2147483648;m=0}H[e>>2]=m;H[e+4>>2]=j;b=b+1|0;e=I[a+24|0];if(b>>>0>=(e>>>0>>0?e:h)>>>0){break f}g=g+8|0;if(i>>>0>g>>>0){continue}break}break a}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 10:break c;default:break a}}e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;H[e>>2]=I[b|0];H[e+4>>2]=0;b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0}ra(d,0,a<<3)}}function Oj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;j=a;a:{b:{c:{d:{e:{f:{g:{h:{a=H[a+8>>2];switch(H[a+28>>2]-1|0){case 4:break c;case 5:break d;case 2:break e;case 3:break f;case 0:break g;case 1:break h;default:break a}}f=I[a+24|0];c=pa(f);a=H[j+16>>2];if(H[a+80>>2]){g=H[H[a>>2]>>2]+H[a+48>>2]|0}else{g=0}if(!b){break b}if(f){o=f&252;l=f&3;h=f>>>0<4;while(1){a=0;e=0;if(!h){while(1){k=g+(d<<2)|0;F[a+c|0]=H[k>>2];F[(a|1)+c|0]=H[k+4>>2];F[(a|2)+c|0]=H[k+8>>2];F[(a|3)+c|0]=H[k+12>>2];a=a+4|0;d=d+4|0;e=e+4|0;if((o|0)!=(e|0)){continue}break}}e=0;if(l){while(1){F[a+c|0]=H[g+(d<<2)>>2];a=a+1|0;d=d+1|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}qa(H[H[H[j+8>>2]+64>>2]>>2]+m|0,c,f);m=f+m|0;n=n+1|0;if((n|0)!=(b|0)){continue}break}break b}a=0;if((b|0)!=1){g=b&-2;while(1){qa(H[H[H[j+8>>2]+64>>2]>>2]+a|0,c,f);a=a+f|0;qa(a+H[H[H[j+8>>2]+64>>2]>>2]|0,c,f);a=a+f|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}}if(!(b&1)){break b}qa(H[H[H[j+8>>2]+64>>2]>>2]+a|0,c,f);break b}f=I[a+24|0];c=pa(f);a=H[j+16>>2];if(H[a+80>>2]){g=H[H[a>>2]>>2]+H[a+48>>2]|0}else{g=0}if(!b){break b}if(f){o=f&252;l=f&3;h=f>>>0<4;while(1){a=0;e=0;if(!h){while(1){k=g+(d<<2)|0;F[a+c|0]=H[k>>2];F[(a|1)+c|0]=H[k+4>>2];F[(a|2)+c|0]=H[k+8>>2];F[(a|3)+c|0]=H[k+12>>2];a=a+4|0;d=d+4|0;e=e+4|0;if((o|0)!=(e|0)){continue}break}}e=0;if(l){while(1){F[a+c|0]=H[g+(d<<2)>>2];a=a+1|0;d=d+1|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}qa(H[H[H[j+8>>2]+64>>2]>>2]+m|0,c,f);m=f+m|0;n=n+1|0;if((n|0)!=(b|0)){continue}break}break b}a=0;if((b|0)!=1){g=b&-2;while(1){qa(H[H[H[j+8>>2]+64>>2]>>2]+a|0,c,f);a=a+f|0;qa(a+H[H[H[j+8>>2]+64>>2]>>2]|0,c,f);a=a+f|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}}if(!(b&1)){break b}qa(H[H[H[j+8>>2]+64>>2]>>2]+a|0,c,f);break b}h=I[a+24|0];i=h<<1;c=pa(i);a=H[j+16>>2];if(H[a+80>>2]){g=H[H[a>>2]>>2]+H[a+48>>2]|0}else{g=0}if(!b){break b}if(h){o=h&252;l=h&3;h=h>>>0<4;while(1){a=0;e=0;if(!h){while(1){f=a<<1;k=g+(d<<2)|0;G[f+c>>1]=H[k>>2];G[(f|2)+c>>1]=H[k+4>>2];G[(f|4)+c>>1]=H[k+8>>2];G[(f|6)+c>>1]=H[k+12>>2];a=a+4|0;d=d+4|0;e=e+4|0;if((o|0)!=(e|0)){continue}break}}e=0;if(l){while(1){G[(a<<1)+c>>1]=H[g+(d<<2)>>2];a=a+1|0;d=d+1|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}qa(H[H[H[j+8>>2]+64>>2]>>2]+n|0,c,i);n=i+n|0;m=m+1|0;if((m|0)!=(b|0)){continue}break}break b}a=0;if((b|0)!=1){g=b&-2;while(1){qa(H[H[H[j+8>>2]+64>>2]>>2]+a|0,c,i);a=a+i|0;qa(a+H[H[H[j+8>>2]+64>>2]>>2]|0,c,i);a=a+i|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}}if(!(b&1)){break b}qa(H[H[H[j+8>>2]+64>>2]>>2]+a|0,c,i);break b}h=I[a+24|0];i=h<<1;c=pa(i);a=H[j+16>>2];if(H[a+80>>2]){g=H[H[a>>2]>>2]+H[a+48>>2]|0}else{g=0}if(!b){break b}if(h){o=h&252;l=h&3;h=h>>>0<4;while(1){a=0;e=0;if(!h){while(1){f=a<<1;k=g+(d<<2)|0;G[f+c>>1]=H[k>>2];G[(f|2)+c>>1]=H[k+4>>2];G[(f|4)+c>>1]=H[k+8>>2];G[(f|6)+c>>1]=H[k+12>>2];a=a+4|0;d=d+4|0;e=e+4|0;if((o|0)!=(e|0)){continue}break}}e=0;if(l){while(1){G[(a<<1)+c>>1]=H[g+(d<<2)>>2];a=a+1|0;d=d+1|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}qa(H[H[H[j+8>>2]+64>>2]>>2]+n|0,c,i);n=i+n|0;m=m+1|0;if((m|0)!=(b|0)){continue}break}break b}a=0;if((b|0)!=1){g=b&-2;while(1){qa(H[H[H[j+8>>2]+64>>2]>>2]+a|0,c,i);a=a+i|0;qa(a+H[H[H[j+8>>2]+64>>2]>>2]|0,c,i);a=a+i|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}}if(!(b&1)){break b}qa(H[H[H[j+8>>2]+64>>2]>>2]+a|0,c,i);break b}h=I[a+24|0];i=h<<2;c=pa(i);a=H[j+16>>2];if(H[a+80>>2]){g=H[H[a>>2]>>2]+H[a+48>>2]|0}else{g=0}if(!b){break b}if(h){o=h&252;l=h&3;h=h>>>0<4;while(1){a=0;e=0;if(!h){while(1){f=a<<2;k=g+(d<<2)|0;H[f+c>>2]=H[k>>2];H[(f|4)+c>>2]=H[k+4>>2];H[(f|8)+c>>2]=H[k+8>>2];H[(f|12)+c>>2]=H[k+12>>2];a=a+4|0;d=d+4|0;e=e+4|0;if((o|0)!=(e|0)){continue}break}}e=0;if(l){while(1){H[(a<<2)+c>>2]=H[g+(d<<2)>>2];a=a+1|0;d=d+1|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}qa(H[H[H[j+8>>2]+64>>2]>>2]+n|0,c,i);n=i+n|0;m=m+1|0;if((m|0)!=(b|0)){continue}break}break b}a=0;if((b|0)!=1){g=b&-2;while(1){qa(H[H[H[j+8>>2]+64>>2]>>2]+a|0,c,i);a=a+i|0;qa(a+H[H[H[j+8>>2]+64>>2]>>2]|0,c,i);a=a+i|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}}if(!(b&1)){break b}qa(H[H[H[j+8>>2]+64>>2]>>2]+a|0,c,i);break b}h=I[a+24|0];i=h<<2;c=pa(i);a=H[j+16>>2];if(H[a+80>>2]){g=H[H[a>>2]>>2]+H[a+48>>2]|0}else{g=0}if(!b){break b}if(h){o=h&252;l=h&3;h=h>>>0<4;while(1){a=0;e=0;if(!h){while(1){f=a<<2;k=g+(d<<2)|0;H[f+c>>2]=H[k>>2];H[(f|4)+c>>2]=H[k+4>>2];H[(f|8)+c>>2]=H[k+8>>2];H[(f|12)+c>>2]=H[k+12>>2];a=a+4|0;d=d+4|0;e=e+4|0;if((o|0)!=(e|0)){continue}break}}e=0;if(l){while(1){H[(a<<2)+c>>2]=H[g+(d<<2)>>2];a=a+1|0;d=d+1|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}qa(H[H[H[j+8>>2]+64>>2]>>2]+n|0,c,i);n=i+n|0;m=m+1|0;if((m|0)!=(b|0)){continue}break}break b}a=0;if((b|0)!=1){g=b&-2;while(1){qa(H[H[H[j+8>>2]+64>>2]>>2]+a|0,c,i);a=a+i|0;qa(a+H[H[H[j+8>>2]+64>>2]>>2]|0,c,i);a=a+i|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}}if(!(b&1)){break b}qa(H[H[H[j+8>>2]+64>>2]>>2]+a|0,c,i)}oa(c);c=1}return c|0}function dc(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=O(0);a:{b:{if(!d){break b}c:{switch(H[a+28>>2]-1|0){case 0:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];l=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}H[(g<<2)+d>>2]=F[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 1:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];l=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}H[(g<<2)+d>>2]=I[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 2:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];l=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}H[(g<<2)+d>>2]=G[b>>1];b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 3:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];l=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}H[(g<<2)+d>>2]=J[b>>1];b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 4:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];l=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}H[(g<<2)+d>>2]=H[b>>2];b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 5:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];l=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}H[(g<<2)+d>>2]=H[b>>2];b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 6:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];l=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}e=H[b>>2];if(H[b+4>>2]){break b}H[(g<<2)+d>>2]=e;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 7:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];l=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}e=H[b>>2];if(H[b+4>>2]){break b}H[(g<<2)+d>>2]=e;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 8:d:{e:{e=I[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break e}e=H[a>>2];k=H[e>>2];g=k;f=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=H[e+4>>2];e=f-k|0;if(!I[a+32|0]){k=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=L[g>>2];if(m>=O(4294967296)|m=O(0)){i=~~m>>>0}else{i=0}H[e>>2]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}k=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=L[g>>2];if(m>=O(4294967296)|mO(1)){break d}e=(b<<2)+d|0;j=T(+m*4294967295+.5);f:{if(j<4294967296&j>=0){i=~~j>>>0;break f}i=0}H[e>>2]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}k=1;if(c>>>0<=e>>>0){break d}ra((e<<2)+d|0,0,c-e<<2)}return k;case 9:g:{h:{e=I[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break h}e=H[a>>2];k=H[e>>2];g=k;f=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=H[e+4>>2];e=f-k|0;if(!I[a+32|0]){k=0;if((b|0)>=(e|0)){break g}b=0;while(1){j=M[g>>3];if(j>=4294967295|j<0|(P(j)==Infinity|j!=j)){break g}e=(b<<2)+d|0;if(j<4294967296&j>=0){i=~~j>>>0}else{i=0}H[e>>2]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}k=0;if((b|0)>=(e|0)){break g}b=0;while(1){j=M[g>>3];if(j>=4294967295|j<0|(P(j)==Infinity|j!=j)){break g}if(j>1){break g}e=(b<<2)+d|0;j=T(j*4294967295+.5);i:{if(j<4294967296&j>=0){i=~~j>>>0;break i}i=0}H[e>>2]=i;b=b+1|0;e=I[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}k=1;if(c>>>0<=e>>>0){break g}ra((e<<2)+d|0,0,c-e<<2)}return k;case 10:break c;default:break b}}e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];h=H[e>>2];l=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=H[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}H[(g<<2)+d>>2]=I[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}ra((e<<2)+d|0,0,(c&255)-e<<2)}return k}ra((e<<2)+d|0,0,(c&255)-e<<2);return 1}function ye(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;a:{b:{c:{d:{e:{if(H[a+92>>2]==H[a+88>>2]){break e}c=H[a+52>>2];f:{if((c|0)!=H[a+56>>2]){H[c>>2]=b;H[a+52>>2]=c+4;break f}h=H[a+48>>2];g=c-h|0;d=g>>2;f=d+1|0;if(f>>>0>=1073741824){break a}e=g>>>1|0;g=g>>>0>=2147483644?1073741823:f>>>0>>0?e:f;if(g){if(g>>>0>=1073741824){break d}e=pa(g<<2)}else{e=0}f=e+(d<<2)|0;H[f>>2]=b;d=f+4|0;if((c|0)!=(h|0)){while(1){f=f-4|0;c=c-4|0;H[f>>2]=H[c>>2];if((c|0)!=(h|0)){continue}break}}H[a+56>>2]=e+(g<<2);H[a+52>>2]=d;H[a+48>>2]=f;if(!h){break f}oa(h)}H[a+84>>2]=0;c=-1;e=-1;g:{if((b|0)==-1){break g}d=H[a+4>>2];e=b+1|0;e=(e>>>0)%3|0?e:b-2|0;if((e|0)!=-1){c=H[H[d>>2]+(e<<2)>>2]}h:{if((b>>>0)%3|0){l=b-1|0;break h}l=b+2|0;e=-1;if((l|0)==-1){break g}}e=H[H[d>>2]+(l<<2)>>2]}i=e>>>3&536870908;d=H[a+36>>2];h=d+(c>>>3&536870908)|0;g=H[h>>2];f=1<>2]=f|g;f=a+8|0;if((b|0)!=-1){d=b+1|0;d=(d>>>0)%3|0?d:b-2|0}else{d=-1}Ua(f,c,d);d=H[a+36>>2]}f=d+i|0;d=H[f>>2];c=1<>2]=c|d;d=a+8|0;c=-1;i:{if((b|0)==-1){break i}c=b-1|0;if((b>>>0)%3|0){break i}c=b+2|0}Ua(d,e,c)}c=-1;c=(b|0)!=-1?H[H[H[a+4>>2]>>2]+(b<<2)>>2]:c;f=H[a+36>>2]+(c>>>3&536870908)|0;d=H[f>>2];e=1<>2]=d|e;Ua(a+8|0,c,b)}d=H[a+84>>2];if((d|0)>2){break e}while(1){e=N(d,12)+a|0;b=H[e+52>>2];if((b|0)==H[e+48>>2]){d=d+1|0;if((d|0)!=3){continue}break e}b=b-4|0;c=H[b>>2];H[e+52>>2]=b;H[a+84>>2]=d;if((c|0)==-1){break e}f=H[a+24>>2];b=(c>>>0)/3|0;j:{if(H[f+(b>>>3&268435452)>>2]>>>b&1){break j}k:{while(1){k=(c>>>0)/3|0;b=(k>>>3&268435452)+f|0;H[b>>2]=H[b>>2]|1<>2]>>2]+(c<<2)>>2]:d;f=H[a+36>>2]+(d>>>3&536870908)|0;e=H[f>>2];b=1<>2]=b|e;i=H[(H[H[a+16>>2]+96>>2]+N(k,12)|0)+((c>>>0)%3<<2)>>2];l=H[H[a+20>>2]+4>>2];f=H[l+4>>2];t:{if((f|0)!=H[l+8>>2]){H[f>>2]=i;H[l+4>>2]=f+4;break t}j=H[l>>2];h=f-j|0;g=h>>2;e=g+1|0;if(e>>>0>=1073741824){break s}b=h>>>1|0;h=h>>>0>=2147483644?1073741823:b>>>0>e>>>0?b:e;if(h){if(h>>>0>=1073741824){break d}e=pa(h<<2)}else{e=0}b=e+(g<<2)|0;H[b>>2]=i;g=b+4|0;if((f|0)!=(j|0)){while(1){b=b-4|0;f=f-4|0;H[b>>2]=H[f>>2];if((f|0)!=(j|0)){continue}break}}H[l+8>>2]=e+(h<<2);H[l+4>>2]=g;H[l>>2]=b;if(!j){break t}oa(j)}j=H[a+12>>2];f=H[j+4>>2];u:{if((f|0)!=H[j+8>>2]){H[f>>2]=c;H[j+4>>2]=f+4;break u}i=H[j>>2];h=f-i|0;g=h>>2;e=g+1|0;if(e>>>0>=1073741824){break r}b=h>>>1|0;h=h>>>0>=2147483644?1073741823:b>>>0>e>>>0?b:e;if(h){if(h>>>0>=1073741824){break d}e=pa(h<<2)}else{e=0}b=e+(g<<2)|0;H[b>>2]=c;g=b+4|0;if((f|0)!=(i|0)){while(1){b=b-4|0;f=f-4|0;H[b>>2]=H[f>>2];if((f|0)!=(i|0)){continue}break}}H[j+8>>2]=e+(h<<2);H[j+4>>2]=g;H[j>>2]=b;if(!i){break u}oa(i)}b=H[a+12>>2];H[H[b+12>>2]+(d<<2)>>2]=H[b+24>>2];H[b+24>>2]=H[b+24>>2]+1}if((c|0)==-1){break k}g=H[a+4>>2];f=-1;b=c+1|0;b=(b>>>0)%3|0?b:c-2|0;if((b|0)!=-1){f=H[H[g+12>>2]+(b<<2)>>2]}v:{w:{if((N(k,3)|0)!=(c|0)){d=c-1|0;break w}d=c+2|0;c=-1;if((d|0)==-1){break v}}c=H[H[g+12>>2]+(d<<2)>>2]}d=(c|0)==-1;e=(c>>>0)/3|0;if((f|0)!=-1){b=(f>>>0)/3|0;b=H[H[a+24>>2]+(b>>>3&268435452)>>2]&1<>2]+(b>>>3&536870908)>>2]>>>b&1){break x}k=0;b=H[H[g>>2]+(c<<2)>>2];if(!(H[H[a+36>>2]+(b>>>3&536870908)>>2]>>>b&1)){b=H[a+88>>2]+(b<<2)|0;e=H[b>>2];H[b>>2]=e+1;k=(e|0)<=0?2:1}if(H[a+84>>2]>=(k|0)&l){break m}j=N(k,12)+a|0;b=H[j+52>>2];y:{if((b|0)!=H[j+56>>2]){H[b>>2]=c;H[j+52>>2]=b+4;break y}i=H[j+48>>2];h=b-i|0;d=h>>2;g=d+1|0;if(g>>>0>=1073741824){break c}e=h>>>1|0;g=h>>>0>=2147483644?1073741823:e>>>0>g>>>0?e:g;if(g){if(g>>>0>=1073741824){break d}e=pa(g<<2)}else{e=0}d=e+(d<<2)|0;H[d>>2]=c;c=d+4|0;if((b|0)!=(i|0)){while(1){d=d-4|0;b=b-4|0;H[d>>2]=H[b>>2];if((b|0)!=(i|0)){continue}break}}H[j+48>>2]=d;H[j+52>>2]=c;H[j+56>>2]=e+(g<<2);if(!i){break y}oa(i)}if(H[a+84>>2]<=(k|0)){break x}H[a+84>>2]=k}if(l){break k}c=-1;if((f|0)==-1){break n}}c=H[H[H[a+4>>2]>>2]+(f<<2)>>2]}b=0;if(!(H[H[a+36>>2]+(c>>>3&536870908)>>2]>>>c&1)){b=H[a+88>>2]+(c<<2)|0;c=H[b>>2];H[b>>2]=c+1;b=(c|0)<=0?2:1}if(H[a+84>>2]<(b|0)){break l}c=f}f=H[a+24>>2];continue}break}k=N(b,12)+a|0;c=H[k+52>>2];z:{if((c|0)!=H[k+56>>2]){H[c>>2]=f;H[k+52>>2]=c+4;break z}i=H[k+48>>2];h=c-i|0;d=h>>2;g=d+1|0;if(g>>>0>=1073741824){break b}e=h>>>1|0;g=h>>>0>=2147483644?1073741823:e>>>0>g>>>0?e:g;if(g){if(g>>>0>=1073741824){break d}e=pa(g<<2)}else{e=0}d=e+(d<<2)|0;H[d>>2]=f;f=d+4|0;if((c|0)!=(i|0)){while(1){d=d-4|0;c=c-4|0;H[d>>2]=H[c>>2];if((c|0)!=(i|0)){continue}break}}H[k+48>>2]=d;H[k+52>>2]=f;H[k+56>>2]=e+(g<<2);if(!i){break z}oa(i)}d=H[a+84>>2];if((d|0)<=(b|0)){break j}H[a+84>>2]=b;d=b;break j}d=H[a+84>>2]}if((d|0)<3){continue}break}}return 1}wa();v()}sa();v()}sa();v()}sa();v()}function gd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;n=ca-96|0;ca=n;o=H[a+4>>2];d=H[o+32>>2];i=H[d+8>>2];j=H[d+12>>2];e=j;c=H[d+20>>2];f=H[d+16>>2];a:{if((e|0)<=(c|0)&f>>>0>=i>>>0|(c|0)>(e|0)){break a}p=H[d>>2];g=I[p+f|0];h=f+1|0;e=h?c:c+1|0;H[d+16>>2]=h;H[d+20>>2]=e;if((e|0)>=(j|0)&h>>>0>=i>>>0|(e|0)>(j|0)){break a}m=I[h+p|0];h=f+2|0;e=h>>>0<2?c+1|0:c;H[d+16>>2]=h;H[d+20>>2]=e;l=g<<24>>24;b:{if((l|0)>=0){k=H[a+216>>2];if(g>>>0>=(H[a+220>>2]-k|0)/144>>>0){break a}k=k+N(g,144)|0;if(H[k>>2]<0){break b}break a}if(H[a+212>>2]>=0){break a}k=a+212|0}H[k>>2]=b;c:{d:{e:{f:{g:{h:{k=J[o+36>>1];i:{if(((k<<8|k>>>8)&65535)>>>0>=258){if((e|0)>=(j|0)&h>>>0>=i>>>0|(e|0)>(j|0)){break a}e=I[h+p|0];f=f+3|0;c=f>>>0<3?c+1|0:c;H[d+16>>2]=f;H[d+20>>2]=c;if(e>>>0>1){break a}d=e>>>0<2?e:0;if(!m){break i}if(!d){break h}break a}if(m){break g}d=0}if((l|0)<0){e=a+184|0}else{c=H[a+216>>2]+N(g,144)|0;F[c+100|0]=0;e=c+104|0}if((d|0)!=1){break e}c=ca-112|0;ca=c;h=H[H[a+4>>2]+44>>2];d=pa(120);H[d>>2]=12172;H[d+4>>2]=0;H[d+116>>2]=0;H[d+112>>2]=e;H[d+108>>2]=h;H[d+12>>2]=0;H[d+16>>2]=0;H[d+20>>2]=0;H[d+24>>2]=0;H[d+28>>2]=0;H[d+32>>2]=0;H[d+36>>2]=0;H[d+40>>2]=0;H[d+44>>2]=0;H[d+48>>2]=0;H[d+52>>2]=0;H[d+56>>2]=0;H[d+60>>2]=0;H[d+8>>2]=12384;f=d- -64|0;H[f>>2]=0;H[f+4>>2]=0;H[d+72>>2]=0;H[d+76>>2]=0;H[d+80>>2]=0;H[d+84>>2]=0;H[d+88>>2]=0;H[d+104>>2]=0;H[d+96>>2]=0;H[d+100>>2]=0;f=H[a+8>>2];H[c+48>>2]=0;H[c+52>>2]=0;H[c+40>>2]=0;H[c+44>>2]=0;i=c+32|0;H[i>>2]=0;H[i+4>>2]=0;H[c+24>>2]=0;H[c+28>>2]=0;g=c- -64|0;H[g>>2]=0;H[g+4>>2]=0;H[c+72>>2]=0;H[c+76>>2]=0;H[c+80>>2]=0;H[c+84>>2]=0;H[c+88>>2]=0;H[c+104>>2]=0;H[c+16>>2]=0;H[c+20>>2]=0;H[c+56>>2]=0;H[c+60>>2]=0;H[c+8>>2]=12384;H[c+96>>2]=0;H[c+100>>2]=0;H[c+12>>2]=f;g=H[f>>2];j=H[f+4>>2];F[c+111|0]=0;m=i;i=c+111|0;Oa(m,(j-g>>2>>>0)/3|0,i);g=H[c+12>>2];j=H[g+28>>2];g=H[g+24>>2];F[c+111|0]=0;Oa(c+44|0,j-g>>2,i);H[c+28>>2]=d;H[c+24>>2]=h;H[c+20>>2]=e;H[c+16>>2]=f;f=d+8|0;e=c+8|0;fd(f,e);j:{if((e|0)==(f|0)){H[d+92>>2]=H[e+84>>2];break j}Cb(d+56|0,H[e+48>>2],H[e+52>>2]);Cb(d+68|0,H[e+60>>2],H[e- -64>>2]);Cb(d+80|0,H[e+72>>2],H[e+76>>2]);H[d+92>>2]=H[e+84>>2];Aa(d+96|0,H[e+88>>2],H[e+92>>2])}H[c+8>>2]=12384;e=H[c+96>>2];if(e){H[c+100>>2]=e;oa(e)}e=H[c+80>>2];if(e){H[c+84>>2]=e;oa(e)}e=H[c+68>>2];if(e){H[c+72>>2]=e;oa(e)}e=H[c+56>>2];if(e){H[c+60>>2]=e;oa(e)}H[c+8>>2]=12620;e=H[c+44>>2];if(e){oa(e)}e=H[c+32>>2];if(e){oa(e)}ca=c+112|0;break d}if((l|0)>=0){break f}break a}if((l|0)<0){break a}}e=H[a+216>>2];c=H[o+44>>2];d=pa(80);H[d>>2]=12932;H[d+4>>2]=0;H[d+76>>2]=0;H[d+68>>2]=c;H[d+8>>2]=11872;H[d+12>>2]=0;H[d+16>>2]=0;H[d+20>>2]=0;H[d+24>>2]=0;H[d+28>>2]=0;H[d+32>>2]=0;H[d+36>>2]=0;H[d+40>>2]=0;H[d+44>>2]=0;H[d+48>>2]=0;H[d+52>>2]=0;e=e+N(g,144)|0;f=e+104|0;H[d+72>>2]=f;H[d- -64>>2]=0;H[d+56>>2]=0;H[d+60>>2]=0;H[n+24>>2]=c;c=n;H[c+68>>2]=0;H[c+72>>2]=0;H[c+60>>2]=0;H[c+64>>2]=0;H[c+52>>2]=0;H[c+56>>2]=0;H[c+44>>2]=0;H[c+48>>2]=0;H[c+84>>2]=0;H[c+88>>2]=0;H[c+76>>2]=0;H[c+80>>2]=0;H[c+28>>2]=d;h=H[c+28>>2];H[c+8>>2]=H[c+24>>2];H[c+12>>2]=h;H[c+20>>2]=f;f=e+4|0;H[c+16>>2]=f;H[c+36>>2]=0;H[c+40>>2]=0;H[c+32>>2]=11872;e=H[c+20>>2];H[c>>2]=H[c+16>>2];H[c+4>>2]=e;e=c+32|0;Ie(e,f,c);c=d+8|0;fd(c,e);if((c|0)!=(e|0)){Cb(d+56|0,H[e+48>>2],H[e+52>>2])}He(e);break c}c=ca+-64|0;ca=c;h=H[H[a+4>>2]+44>>2];d=pa(80);H[d>>2]=12640;H[d+4>>2]=0;H[d+76>>2]=0;H[d+72>>2]=e;H[d+68>>2]=h;H[d+8>>2]=12804;H[d+12>>2]=0;H[d+16>>2]=0;H[d+20>>2]=0;H[d+24>>2]=0;H[d+28>>2]=0;H[d+32>>2]=0;H[d+36>>2]=0;H[d+40>>2]=0;H[d+44>>2]=0;H[d+48>>2]=0;H[d+52>>2]=0;H[d- -64>>2]=0;i=d+56|0;f=i;H[f>>2]=0;H[f+4>>2]=0;f=H[a+8>>2];H[c+40>>2]=0;H[c+44>>2]=0;H[c+32>>2]=0;H[c+36>>2]=0;g=c+24|0;H[g>>2]=0;H[g+4>>2]=0;H[c+16>>2]=0;H[c+20>>2]=0;H[c+56>>2]=0;H[c+8>>2]=0;H[c+12>>2]=0;H[c+48>>2]=0;H[c+52>>2]=0;H[c>>2]=12804;H[c+4>>2]=f;j=H[f>>2];l=H[f+4>>2];F[c+63|0]=0;m=g;g=c+63|0;Oa(m,(l-j>>2>>>0)/3|0,g);j=H[c+4>>2];l=H[j+28>>2];j=H[j+24>>2];F[c+63|0]=0;Oa(c+36|0,l-j>>2,g);H[c+20>>2]=d;H[c+16>>2]=h;H[c+12>>2]=e;H[c+8>>2]=f;fd(d+8|0,c);Cb(i,H[c+48>>2],H[c+52>>2]);H[c>>2]=12804;e=H[c+48>>2];if(e){H[c+52>>2]=e;oa(e)}H[c>>2]=12620;e=H[c+36>>2];if(e){oa(e)}e=H[c+24>>2];if(e){oa(e)}ca=c- -64|0}if(!d){break a}}d=od(pa(64),d);c=H[a+4>>2];a=d;d=b;k:{l:{if((d|0)>=0){h=c+8|0;b=H[c+12>>2];i=H[c+8>>2];e=b-i>>2;m:{if((e|0)>(d|0)){break m}f=d+1|0;if(d>>>0>=e>>>0){Vb(h,f-e|0);break m}if(e>>>0<=f>>>0){break m}f=i+(f<<2)|0;if((f|0)!=(b|0)){while(1){b=b-4|0;e=H[b>>2];H[b>>2]=0;if(e){ea[H[H[e>>2]+4>>2]](e)}if((b|0)!=(f|0)){continue}break}}H[c+12>>2]=f}c=H[h>>2]+(d<<2)|0;b=H[c>>2];H[c>>2]=a;if(b){break l}break k}b=a;if(!a){break k}}ea[H[H[b>>2]+4>>2]](b)}q=(d^-1)>>>31|0}ca=n+96|0;return q|0}function Kd(a){var b=0,c=0,d=0,e=0,f=0,g=0;e=ca-16|0;ca=e;H[e+12>>2]=a;a:{if(a>>>0<=211){d=H[Jd(14256,14448,e+12|0)>>2];break a}if(a>>>0>=4294967292){X();v()}f=(a>>>0)/210|0;d=N(f,210);H[e+8>>2]=a-d;g=Jd(14448,14640,e+8|0)-14448>>2;while(1){d=H[(g<<2)+14448>>2]+d|0;a=5;while(1){b:{if((a|0)==47){a=211;while(1){b=(d>>>0)/(a>>>0)|0;if(b>>>0>>0){break a}if((N(a,b)|0)==(d|0)){break b}b=a+10|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+12|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+16|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+18|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+22|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+28|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+30|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+36|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+40|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+42|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+46|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+52|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+58|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+60|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+66|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+70|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+72|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+78|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+82|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+88|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+96|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+100|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+102|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+106|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+108|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+112|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+120|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+126|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+130|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+136|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+138|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+142|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+148|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+150|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+156|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+162|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+166|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+168|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+172|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+178|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+180|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+186|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+190|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+192|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+196|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+198|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((N(b,c)|0)==(d|0)){break b}b=a+208|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}a=a+210|0;if((N(b,c)|0)!=(d|0)){continue}break}break b}b=H[(a<<2)+14256>>2];c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}a=a+1|0;if((N(b,c)|0)!=(d|0)){continue}}break}d=g+1|0;a=(d|0)==48;g=a?0:d;f=a+f|0;d=N(f,210);continue}}ca=e+16|0;return d}function Ib(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;j=ca-16|0;ca=j;a:{b:{c:{d:{if(I[H[a+4>>2]+36|0]<=1){k=-1;c=H[b+20>>2];d=H[b+16>>2];e=d+4|0;c=e>>>0<4?c+1|0:c;g=H[b+12>>2];if(K[b+8>>2]>>0&(g|0)<=(c|0)|(c|0)>(g|0)){break c}d=d+H[b>>2]|0;l=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[j+12>>2]=l;H[b+16>>2]=e;H[b+20>>2]=c;break d}k=-1;if(!Ea(1,j+12|0,b)){break c}l=H[j+12>>2]}e:{f:{g:{h:{i:{if(!l){break i}c=H[a+8>>2];if((H[c+4>>2]-H[c>>2]>>2>>>0)/3>>>0>>0){break c}c=J[H[a+4>>2]+36>>1];if(((c<<8|c>>>8)&65535)>>>0>=258){j:{while(1){if(!Ea(1,j+8|0,b)){break c}c=H[j+8>>2];if(!Ea(1,j+8|0,b)){break c}f=c+f|0;c=H[j+8>>2];if(f>>>0>>0){break c}g=f-c|0;c=H[a+40>>2];k:{if((c|0)!=H[a+44>>2]){H[c+4>>2]=f;H[c>>2]=g;H[a+40>>2]=c+12;l=H[j+12>>2];break k}m=H[a+36>>2];d=c-m|0;o=(d|0)/12|0;e=o+1|0;if(e>>>0>=357913942){break j}c=o<<1;h=o>>>0>=178956970?357913941:c>>>0>e>>>0?c:e;if(h){if(h>>>0>=357913942){break b}i=pa(N(h,12))}else{i=0}e=i+N(o,12)|0;H[e+4>>2]=f;H[e>>2]=g;c=va(e+N((d|0)/-12|0,12)|0,m,d);H[a+44>>2]=i+N(h,12);H[a+40>>2]=e+12;H[a+36>>2]=c;if(!m){break k}oa(m)}p=p+1|0;if(l>>>0>p>>>0){continue}break}k=0;Db(b,0,0);if(l){while(1){e=I[b+36|0];c=J[H[a+4>>2]+36>>1];l:{m:{if(((c<<8|c>>>8)&65535)>>>0<=513){if(!e){break l}p=0;c=H[b+32>>2];n=c>>>3|0;g=H[b+24>>2];e=n+g|0;d=H[b+28>>2];n:{if(e>>>0>=d>>>0){f=c;break n}e=I[e|0];f=c+1|0;H[b+32>>2]=f;n=f>>>3|0;p=e>>>(c&7)&1}if(d>>>0>g+n>>>0){break m}break l}if(!e){break l}p=0;f=H[b+32>>2];c=H[b+24>>2]+(f>>>3|0)|0;if(c>>>0>=K[b+28>>2]){break l}p=I[c|0]>>>(f&7)&1}H[b+32>>2]=f+1}c=H[a+36>>2]+N(k,12)|0;F[c+8|0]=I[c+8|0]&254|p&1;k=k+1|0;if((k|0)!=(l|0)){continue}break}}F[b+36|0]=0;f=H[b+20>>2];e=0;d=H[b+32>>2]+7|0;e=d>>>0<7?1:e;c=e>>>3|0;e=(e&7)<<29|d>>>3;d=e+H[b+16>>2]|0;c=c+f|0;H[b+16>>2]=d;H[b+20>>2]=d>>>0>>0?c+1|0:c;break i}sa();v()}while(1){d=H[b+8>>2];c=H[b+12>>2];g=c;c=H[b+20>>2];e=c;h=H[b+16>>2];f=h+4|0;c=f>>>0<4?c+1|0:c;i=f;if(f>>>0>d>>>0&(c|0)>=(g|0)|(c|0)>(g|0)){break c}m=H[b>>2];f=m+h|0;o=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);H[b+16>>2]=i;H[b+20>>2]=c;c=e;f=h+8|0;c=f>>>0<8?c+1|0:c;if(d>>>0>>0&(c|0)>=(g|0)|(c|0)>(g|0)){break c}i=i+m|0;i=I[i|0]|I[i+1|0]<<8|(I[i+2|0]<<16|I[i+3|0]<<24);H[b+16>>2]=f;H[b+20>>2]=c;if(d>>>0<=f>>>0&(c|0)>=(g|0)|(c|0)>(g|0)){break c}d=I[f+m|0];c=h+9|0;e=c>>>0<9?e+1|0:e;H[b+16>>2]=c;H[b+20>>2]=e;f=d&1;c=H[a+40>>2];o:{if((c|0)!=H[a+44>>2]){F[c+8|0]=f;H[c+4>>2]=i;H[c>>2]=o;H[a+40>>2]=c+12;l=H[j+12>>2];break o}m=H[a+36>>2];d=c-m|0;h=(d|0)/12|0;e=h+1|0;if(e>>>0>=357913942){break h}c=h<<1;g=h>>>0>=178956970?357913941:c>>>0>e>>>0?c:e;if(g){if(g>>>0>=357913942){break b}e=pa(N(g,12))}else{e=0}h=e+N(h,12)|0;F[h+8|0]=f;H[h+4>>2]=i;H[h>>2]=o;c=va(h+N((d|0)/-12|0,12)|0,m,d);H[a+44>>2]=e+N(g,12);H[a+40>>2]=h+12;H[a+36>>2]=c;if(!m){break o}oa(m)}n=n+1|0;if(l>>>0>n>>>0){continue}break}}H[j+8>>2]=0;c=J[H[a+4>>2]+36>>1];c=(c<<8|c>>>8)&65535;p:{if(c>>>0<=511){k=-1;c=H[b+20>>2];d=H[b+16>>2];e=d+4|0;c=e>>>0<4?c+1|0:c;f=H[b+12>>2];if(K[b+8>>2]>>0&(f|0)<=(c|0)|(c|0)>(f|0)){break c}d=d+H[b>>2]|0;f=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=e;H[b+20>>2]=c;break p}if((c|0)!=512){break e}k=-1;if(!Ea(1,j+8|0,b)){break c}f=H[j+8>>2]}if(!f){break e}c=J[H[a+4>>2]+36>>1];if(((c<<8|c>>>8)&65535)>>>0<258){break f}n=0;l=0;while(1){if(!Ea(1,j+4|0,b)){break c}l=H[j+4>>2]+l|0;c=H[a+52>>2];q:{if((c|0)!=H[a+56>>2]){H[c>>2]=l;H[a+52>>2]=c+4;break q}i=H[a+48>>2];g=c-i|0;e=g>>2;d=e+1|0;if(d>>>0>=1073741824){break g}c=g>>>1|0;d=g>>>0>=2147483644?1073741823:c>>>0>d>>>0?c:d;if(d){if(d>>>0>=1073741824){break b}c=pa(d<<2)}else{c=0}e=c+(e<<2)|0;H[e>>2]=l;c=va(c,i,g);H[a+56>>2]=c+(d<<2);H[a+52>>2]=e+4;H[a+48>>2]=c;if(!i){break q}oa(i)}n=n+1|0;if((n|0)!=(f|0)){continue}break}break e}sa();v()}sa();v()}k=0;while(1){c=H[b+20>>2];d=H[b+16>>2];e=d+4|0;c=e>>>0<4?c+1|0:c;g=H[b+12>>2];if(K[b+8>>2]>>0&(g|0)<=(c|0)|(c|0)>(g|0)){k=-1;break c}d=d+H[b>>2]|0;g=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=e;H[b+20>>2]=c;c=H[a+52>>2];r:{if((c|0)!=H[a+56>>2]){H[c>>2]=g;H[a+52>>2]=c+4;break r}h=H[a+48>>2];i=c-h|0;e=i>>2;d=e+1|0;if(d>>>0>=1073741824){break a}c=i>>>1|0;d=i>>>0>=2147483644?1073741823:c>>>0>d>>>0?c:d;if(d){if(d>>>0>=1073741824){break b}c=pa(d<<2)}else{c=0}e=c+(e<<2)|0;H[e>>2]=g;c=va(c,h,i);H[a+56>>2]=c+(d<<2);H[a+52>>2]=e+4;H[a+48>>2]=c;if(!h){break r}oa(h)}k=k+1|0;if((k|0)!=(f|0)){continue}break}}k=H[b+16>>2]}ca=j+16|0;return k}wa();v()}sa();v()}function Va(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=O(0),k=0,l=0;a:{if(!d){break a}b:{c:{switch(H[a+28>>2]-1|0){case 0:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];g=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=H[e+4>>2];i=I[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=O(F[b|0]);L[(h<<2)+d>>2]=i?O(j/O(127)):j;b=b+1|0;h=h+1|0;e=I[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 1:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];g=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=H[e+4>>2];i=I[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=O(I[b|0]);L[(h<<2)+d>>2]=i?O(j/O(255)):j;b=b+1|0;h=h+1|0;e=I[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 2:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];g=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=H[e+4>>2];i=I[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=O(G[b>>1]);L[(h<<2)+d>>2]=i?O(j/O(32767)):j;b=b+2|0;h=h+1|0;e=I[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 3:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];g=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=H[e+4>>2];i=I[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=O(J[b>>1]);L[(h<<2)+d>>2]=i?O(j/O(65535)):j;b=b+2|0;h=h+1|0;e=I[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 4:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];g=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=H[e+4>>2];i=I[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=O(H[b>>2]);L[(h<<2)+d>>2]=i?O(j*O(4.656612873077393e-10)):j;b=b+4|0;h=h+1|0;e=I[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 5:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];g=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=H[e+4>>2];i=I[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=O(K[b>>2]);L[(h<<2)+d>>2]=i?O(j*O(2.3283064365386963e-10)):j;b=b+4|0;h=h+1|0;e=I[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 6:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];g=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=H[e+4>>2];i=I[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=O(+K[b>>2]+ +H[b+4>>2]*4294967296);L[(h<<2)+d>>2]=i?O(j*O(10842021724855044e-35)):j;b=b+8|0;h=h+1|0;e=I[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 7:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];g=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=H[e+4>>2];i=I[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=O(+K[b>>2]+ +K[b+4>>2]*4294967296);L[(h<<2)+d>>2]=i?O(j*O(5.421010862427522e-20)):j;b=b+8|0;h=h+1|0;e=I[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 8:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];g=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=H[e+4>>2];while(1){if(b>>>0>=g>>>0){break a}L[(h<<2)+d>>2]=L[b>>2];b=b+4|0;h=h+1|0;e=I[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 9:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];g=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=H[e+4>>2];while(1){if(b>>>0>=g>>>0){break a}L[(h<<2)+d>>2]=M[b>>3];b=b+8|0;h=h+1|0;e=I[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 10:break c;default:break a}}e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[a>>2];g=H[e>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=H[e+4>>2];while(1){if(b>>>0>=g>>>0){break a}L[(h<<2)+d>>2]=I[b|0]?O(1):O(0);b=b+1|0;h=h+1|0;e=I[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0}ra(d,0,a<<2)}return l}function ic(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=O(0),m=O(0);a:{b:{if(!d){break b}c:{switch(H[a+28>>2]-1|0){case 0:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}F[d+g|0]=I[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 1:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){return 0}e=F[b|0];if((e|0)<0){break b}F[d+g|0]=e;b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 2:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}e=J[b>>1];if((e+128&65535)>>>0>255){break b}F[d+g|0]=e;b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 3:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}e=J[b>>1];if(e>>>0>127){break b}F[d+g|0]=e;b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 4:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}e=H[b>>2];if(e+128>>>0>255){break b}F[d+g|0]=e;b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 5:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}e=H[b>>2];if(e>>>0>127){break b}F[d+g|0]=e;b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 6:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}i=H[b+4>>2];e=H[b>>2];h=e+128|0;i=h>>>0<128?i+1|0:i;if(!i&h>>>0>255|i){break b}F[d+g|0]=e;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 7:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}i=H[b+4>>2];e=H[b>>2];if(!i&e>>>0>127|i){break b}F[d+g|0]=e;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 8:e=I[a+24|0];c=c&255;d:{if(c>>>0>e>>>0?e:c){e=H[H[a>>2]>>2];f=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+f|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break d}l=L[b>>2];if(l>=O(127)|lO(1)){break d}j=T(+l*127+.5);if(!(P(j)<2147483648)){break f}h=~~j;break e}if(!(m>>0<(c>>>0>e>>>0?e:c)>>>0){continue}break}}k=1;if(c>>>0<=e>>>0){break d}ra(d+e|0,0,c-e|0)}return k;case 9:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}j=M[b>>3];if(j>=127|j<-128|(P(j)==Infinity|j!=j)){break b}e=d+g|0;if(I[a+32|0]){if(j<0|j>1){break b}j=T(j*127+.5)}g:{if(P(j)<2147483648){h=~~j;break g}h=-2147483648}F[e|0]=h;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 10:break c;default:break b}}e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}F[d+g|0]=I[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}ra(d+e|0,0,(c&255)-e|0)}return k}ra(d+e|0,0,(c&255)-e|0);return 1}function hc(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=O(0);a:{b:{if(!d){break b}c:{switch(H[a+28>>2]-1|0){case 0:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){return 0}e=F[b|0];if((e|0)<0){break b}F[d+g|0]=e;b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 1:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}F[d+g|0]=I[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 2:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}e=J[b>>1];if(e>>>0>255){break b}F[d+g|0]=e;b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 3:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}e=J[b>>1];if(e>>>0>255){break b}F[d+g|0]=e;b=b+2|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 4:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}e=H[b>>2];if(e>>>0>255){break b}F[d+g|0]=e;b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 5:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}e=H[b>>2];if(e>>>0>255){break b}F[d+g|0]=e;b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 6:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}i=H[b+4>>2];e=H[b>>2];if(!i&e>>>0>255|i){break b}F[d+g|0]=e;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 7:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}i=H[b+4>>2];e=H[b>>2];if(!i&e>>>0>255|i){break b}F[d+g|0]=e;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 8:e=I[a+24|0];c=c&255;d:{if(c>>>0>e>>>0?e:c){e=H[H[a>>2]>>2];f=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+f|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break d}l=L[b>>2];if(l>=O(255)|lO(1)){break d}j=T(+l*255+.5);if(!(j<4294967296&j>=0)){break f}h=~~j>>>0;break e}if(!(l=O(0))){break f}h=~~l>>>0;break e}h=0}F[e|0]=h;b=b+4|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(c>>>0>e>>>0?e:c)>>>0){continue}break}}k=1;if(c>>>0<=e>>>0){break d}ra(d+e|0,0,c-e|0)}return k;case 9:e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}j=M[b>>3];if(j>=255|j<0|(P(j)==Infinity|j!=j)){break b}e=d+g|0;if(I[a+32|0]){if(j>1){break b}j=T(j*255+.5)}g:{if(j<4294967296&j>=0){h=~~j>>>0;break g}h=0}F[e|0]=h;b=b+8|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 10:break c;default:break b}}e=I[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=H[H[a>>2]>>2];i=H[a+48>>2];b=Rj(H[a+40>>2],H[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(K[H[a>>2]+4>>2]<=b>>>0){break b}F[d+g|0]=I[b|0];b=b+1|0;g=g+1|0;e=I[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}ra(d+e|0,0,(c&255)-e|0)}return k}ra(d+e|0,0,(c&255)-e|0);return 1}function Hh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;g=ca-32|0;ca=g;i=H[a+32>>2];b=J[a+36>>1];a:{b:{if(((b<<8|b>>>8)&65535)>>>0<=513){b=H[i+8>>2];d=H[i+12>>2];c=b;b=H[i+20>>2];e=b;j=H[i+16>>2];f=j+4|0;b=f>>>0<4?b+1|0:b;if(c>>>0>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break a}n=H[i>>2];k=n+j|0;k=I[k|0]|I[k+1|0]<<8|(I[k+2|0]<<16|I[k+3|0]<<24);H[i+16>>2]=f;H[i+20>>2]=b;h=c;c=d;b=e;d=j+8|0;b=d>>>0<8?b+1|0:b;if(d>>>0>h>>>0&(b|0)>=(c|0)|(b|0)>(c|0)){break a}c=f+n|0;n=I[c|0]|I[c+1|0]<<8|(I[c+2|0]<<16|I[c+3|0]<<24);H[i+16>>2]=d;H[i+20>>2]=b;break b}if(!Fb(1,g+28|0,i)){break a}if(!Fb(1,g+24|0,H[a+32>>2])){break a}k=H[g+28>>2];n=H[g+24>>2]}if(k>>>0>1431655765){break a}d=H[a+32>>2];b=d;j=H[b+8>>2];c=H[b+16>>2];f=H[b+12>>2];b=H[b+20>>2];e=Sj(j-c|0,f-(b+(c>>>0>j>>>0)|0)|0,3,0);if(!da&e>>>0>>0){break a}e=Rj(k,0,3,0);if(!da&e>>>0>>0|((b|0)>=(f|0)&c>>>0>=j>>>0|(b|0)>(f|0))){break a}j=I[c+H[d>>2]|0];c=c+1|0;b=c?b:b+1|0;H[d+16>>2]=c;H[d+20>>2]=b;c:{d:{if(!j){d=0;c=ca-32|0;ca=c;H[c+24>>2]=0;H[c+16>>2]=0;H[c+20>>2]=0;e:{f:{b=N(k,3);if(b){if(b>>>0>=1073741824){break f}j=N(k,12);d=pa(j);ra(d,0,j)}b=kd(b,1,H[a+32>>2],d);g:{h:{if(!(!k|!b)){j=0;while(1){i:{b=(j<<2)+d|0;f=H[b>>2];e=f>>>1|0;f=(f&1?0-e|0:e)+l|0;if((f|0)<0){break i}H[c>>2]=f;e=H[b+4>>2];h=e>>>1|0;f=f+(e&1?0-h|0:h)|0;if((f|0)<0){break i}H[c+4>>2]=f;b=H[b+8>>2];e=b>>>1|0;l=f+(b&1?0-e|0:e)|0;if((l|0)<0){break i}H[c+8>>2]=l;Rb(H[a+44>>2]+96|0,c);j=j+3|0;b=1;o=o+1|0;if((o|0)!=(k|0)){continue}break h}break}b=0;break h}if(!d){break g}}oa(d)}ca=c+32|0;break e}sa();v()}if(b){break d}break a}if(n>>>0<=255){if(!k){break d}while(1){j:{H[g+16>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;d=H[a+32>>2];b=d;j=H[b+16>>2];e=H[b+8>>2];c=H[b+20>>2];h=H[b+12>>2];b=h;if(e>>>0<=j>>>0&(c|0)>=(b|0)|(b|0)<(c|0)){break j}i=H[d>>2];l=I[i+j|0];b=c;f=j+1|0;b=f?b:b+1|0;H[d+16>>2]=f;H[d+20>>2]=b;H[g+8>>2]=l;l=e>>>0>>0&(c|0)>=(h|0)|(c|0)>(h|0);e=l?j:e;h=l?c:h;if((e|0)==(f|0)&(h|0)==(b|0)){break j}l=I[f+i|0];b=c;f=j+2|0;b=f>>>0<2?b+1|0:b;H[d+16>>2]=f;H[d+20>>2]=b;H[g+12>>2]=l;if((e|0)==(f|0)&(b|0)==(h|0)){break j}f=I[f+i|0];b=c;c=j+3|0;b=c>>>0<3?b+1|0:b;H[d+16>>2]=c;H[d+20>>2]=b;H[g+16>>2]=f;Rb(H[a+44>>2]+96|0,g+8|0);m=m+1|0;if((m|0)!=(k|0)){continue}break d}break}m=0;break a}if(n>>>0<=65535){if(!k){break d}while(1){k:{H[g+16>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;i=H[a+32>>2];b=i;c=H[b+8>>2];d=H[b+12>>2];f=H[b+16>>2];b=H[b+20>>2];j=b;e=f+2|0;b=e>>>0<2?b+1|0:b;if(c>>>0>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break k}l=H[i>>2];h=l+f|0;h=I[h|0]|I[h+1|0]<<8;H[i+16>>2]=e;H[i+20>>2]=b;H[g+8>>2]=h;b=j;h=f+4|0;b=h>>>0<4?b+1|0:b;if(c>>>0>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break k}e=e+l|0;e=I[e|0]|I[e+1|0]<<8;H[i+16>>2]=h;H[i+20>>2]=b;H[g+12>>2]=e;e=c;b=j;c=f+6|0;b=c>>>0<6?b+1|0:b;if(c>>>0>e>>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break k}d=h+l|0;d=I[d|0]|I[d+1|0]<<8;H[i+16>>2]=c;H[i+20>>2]=b;H[g+16>>2]=d;Rb(H[a+44>>2]+96|0,g+8|0);m=m+1|0;if((m|0)!=(k|0)){continue}break d}break}m=0;break a}l:{if(n>>>0>2097151){break l}b=J[a+36>>1];if(((b<<8|b>>>8)&65535)>>>0<514){break l}if(!k){break d}while(1){m:{H[g+16>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;if(!Fb(1,g+4|0,H[a+32>>2])){break m}H[g+8>>2]=H[g+4>>2];if(!Fb(1,g+4|0,H[a+32>>2])){break m}H[g+12>>2]=H[g+4>>2];if(!Fb(1,g+4|0,H[a+32>>2])){break m}H[g+16>>2]=H[g+4>>2];Rb(H[a+44>>2]+96|0,g+8|0);m=m+1|0;if((m|0)!=(k|0)){continue}break d}break}m=0;break a}if(!k){break d}while(1){H[g+16>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;i=H[a+32>>2];b=i;c=H[b+8>>2];d=H[b+12>>2];f=H[b+16>>2];b=H[b+20>>2];j=b;e=f+4|0;b=e>>>0<4?b+1|0:b;if(c>>>0>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break c}l=H[i>>2];h=l+f|0;h=I[h|0]|I[h+1|0]<<8|(I[h+2|0]<<16|I[h+3|0]<<24);H[i+16>>2]=e;H[i+20>>2]=b;H[g+8>>2]=h;b=j;h=f+8|0;b=h>>>0<8?b+1|0:b;if(c>>>0>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break c}e=e+l|0;e=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);H[i+16>>2]=h;H[i+20>>2]=b;H[g+12>>2]=e;e=c;b=j;c=f+12|0;b=c>>>0<12?b+1|0:b;if(c>>>0>e>>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break c}d=h+l|0;d=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[i+16>>2]=c;H[i+20>>2]=b;H[g+16>>2]=d;Rb(H[a+44>>2]+96|0,g+8|0);m=m+1|0;if((m|0)!=(k|0)){continue}break}}H[H[a+4>>2]+80>>2]=n;m=1;break a}m=0}ca=g+32|0;return m|0}function zf(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=O(0),w=0;p=ca-16|0;ca=p;a:{if(!(H[a+60>>2]!=H[a- -64>>2]|H[a+48>>2]!=H[a+52>>2])){j=1;break a}j=1;if((ea[H[H[a>>2]+24>>2]](a)|0)<=0){break a}while(1){b:{b=ea[H[H[a>>2]+20>>2]](a,w)|0;c:{d:{e:{f=H[H[H[(ea[H[H[a>>2]+28>>2]](a)|0)+4>>2]+8>>2]+(b<<2)>>2];switch(H[f+28>>2]-1|0){case 8:break d;case 0:case 2:case 4:break e;default:break c}}b=I[f+24|0];f:{if(!b){n=0;j=0;break f}j=0;b=b<<2;n=pa(b);ra(n,0,b);b=I[f+24|0];if(!b){break f}b=b<<2;j=pa(b);ra(j,0,b)}g:{h:{i:{switch(H[f+28>>2]-1|0){case 4:i=0;h=0;d=0;b=0;k=0;e=I[f+24|0];j:{if(!e){g=0;break j}e=e<<2;h=pa(e);ra(h,0,e);g=pa(e);ra(g,0,e)}k:{if(H[f+80>>2]){while(1){o=H[f>>2];c=H[o>>2];m=H[f+48>>2];e=H[f+40>>2];l=Rj(e,H[f+44>>2],d,b);m=m+l|0;s=c+m|0;c=e;m=qa(h,s,c);l=I[f+24|0];if(l){t=H[a+48>>2];e=0;while(1){r=e<<2;s=H[r+m>>2];if((s|0)<0){break k}H[g+r>>2]=s+H[t+(e+u<<2)>>2];e=e+1|0;if((l|0)!=(e|0)){continue}break}}qa(H[o>>2]+N(d,c)|0,g,c);d=d+1|0;b=d?b:b+1|0;if(!b&K[f+80>>2]>d>>>0){continue}break}}k=1}if(g){oa(g)}if(h){oa(h)}if(k){break h}break g;case 2:g=0;e=0;d=0;b=0;c=I[f+24|0];if(c){c=c<<1;e=pa(c);ra(e,0,c);g=pa(c);ra(g,0,c)}if(H[f+80>>2]){while(1){l=H[f>>2];h=H[l>>2];i=H[f+48>>2];c=H[f+40>>2];k=Rj(c,H[f+44>>2],d,b);i=i+k|0;k=qa(e,h+i|0,c);o=I[f+24|0];l:{if(!o){break l}m=H[a+48>>2];h=0;if((o|0)!=1){t=o&254;i=0;while(1){r=h<<1;G[r+g>>1]=J[k+r>>1]+J[m+(h+u<<2)>>1];r=h|1;s=r<<1;G[s+g>>1]=J[k+s>>1]+J[m+(r+u<<2)>>1];h=h+2|0;i=i+2|0;if((t|0)!=(i|0)){continue}break}}if(!(o&1)){break l}i=h<<1;G[i+g>>1]=J[i+k>>1]+J[m+(h+u<<2)>>1]}qa(H[l>>2]+N(d,c)|0,g,c);d=d+1|0;b=d?b:b+1|0;if(!b&K[f+80>>2]>d>>>0){continue}break}}if(g){oa(g)}if(e){oa(e)}break h;case 0:break i;default:break h}}h=0;e=0;d=0;b=0;c=I[f+24|0];if(c){e=pa(c);ra(e,0,c);h=pa(c);ra(h,0,c)}if(H[f+80>>2]){while(1){t=H[f>>2];g=H[t>>2];i=H[f+48>>2];c=H[f+40>>2];k=Rj(c,H[f+44>>2],d,b);i=i+k|0;k=qa(e,g+i|0,c);o=I[f+24|0];m:{if(!o){break m}m=H[a+48>>2];g=0;if((o|0)!=1){r=o&254;i=0;while(1){F[g+h|0]=I[g+k|0]+I[m+(g+u<<2)|0];l=g|1;F[l+h|0]=I[k+l|0]+I[m+(l+u<<2)|0];g=g+2|0;i=i+2|0;if((r|0)!=(i|0)){continue}break}}if(!(o&1)){break m}F[g+h|0]=I[g+k|0]+I[m+(g+u<<2)|0]}qa(H[t>>2]+N(d,c)|0,h,c);d=d+1|0;b=d?b:b+1|0;if(!b&K[f+80>>2]>d>>>0){continue}break}}if(h){oa(h)}if(e){oa(e)}}u=I[f+24|0]+u|0;i=1}if(j){oa(j)}if(n){oa(n)}if(i){break c}j=0;break a}e=H[H[a+60>>2]+(q<<2)>>2];h=H[a+36>>2];g=H[(ea[H[H[a>>2]+28>>2]](a)|0)+40>>2];H[p+12>>2]=H[f+56>>2];b=pa(32);H[p>>2]=b;H[p+4>>2]=24;H[p+8>>2]=-2147483616;d=I[1206]|I[1207]<<8|(I[1208]<<16|I[1209]<<24);c=I[1202]|I[1203]<<8|(I[1204]<<16|I[1205]<<24);F[b+16|0]=c;F[b+17|0]=c>>>8;F[b+18|0]=c>>>16;F[b+19|0]=c>>>24;F[b+20|0]=d;F[b+21|0]=d>>>8;F[b+22|0]=d>>>16;F[b+23|0]=d>>>24;d=I[1198]|I[1199]<<8|(I[1200]<<16|I[1201]<<24);c=I[1194]|I[1195]<<8|(I[1196]<<16|I[1197]<<24);F[b+8|0]=c;F[b+9|0]=c>>>8;F[b+10|0]=c>>>16;F[b+11|0]=c>>>24;F[b+12|0]=d;F[b+13|0]=d>>>8;F[b+14|0]=d>>>16;F[b+15|0]=d>>>24;d=I[1190]|I[1191]<<8|(I[1192]<<16|I[1193]<<24);c=I[1186]|I[1187]<<8|(I[1188]<<16|I[1189]<<24);F[b|0]=c;F[b+1|0]=c>>>8;F[b+2|0]=c>>>16;F[b+3|0]=c>>>24;F[b+4|0]=d;F[b+5|0]=d>>>8;F[b+6|0]=d>>>16;F[b+7|0]=d>>>24;F[b+24|0]=0;d=sd(g,p+12|0,p);if(F[p+11|0]<0){oa(H[p>>2])}b=q+1|0;n:{if(d){oe(f,e);break n}g=h+N(q,24)|0;q=H[g+4>>2];c=I[f+24|0];h=c<<2;d=pa(h);H[p>>2]=1065353216;v=L[g+20>>2];q=-1<0){L[p>>2]=v/O(q|0)}if((q|0)<=0){break b}o:{if(!H[e+80>>2]){break o}if(!c){n=0;j=0;while(1){qa(H[H[f+64>>2]>>2]+j|0,d,h);j=h+j|0;n=n+1|0;if(n>>>0>2]){continue}break}break o}o=H[H[e>>2]>>2]+H[e+48>>2]|0;t=c&254;r=c&1;i=0;k=0;j=0;while(1){q=H[g+8>>2];v=L[p>>2];n=0;m=0;if((c|0)!=1){while(1){l=n<<2;s=o+(j<<2)|0;L[l+d>>2]=O(v*O(H[s>>2]))+L[l+q>>2];l=l|4;L[l+d>>2]=O(v*O(H[s+4>>2]))+L[l+q>>2];n=n+2|0;j=j+2|0;m=m+2|0;if((t|0)!=(m|0)){continue}break}}if(r){n=n<<2;L[n+d>>2]=O(v*O(H[o+(j<<2)>>2]))+L[n+q>>2];j=j+1|0}qa(H[H[f+64>>2]>>2]+k|0,d,h);k=h+k|0;i=i+1|0;if(i>>>0>2]){continue}break}}oa(d)}q=b}j=1;w=w+1|0;if((ea[H[H[a>>2]+24>>2]](a)|0)>(w|0)){continue}break a}break}oa(d);j=0}ca=p+16|0;return j|0}function Le(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=ca+-64|0;ca=g;H[g+56>>2]=0;H[g+48>>2]=0;H[g+52>>2]=0;H[g+40>>2]=0;H[g+44>>2]=0;H[g+32>>2]=0;H[g+36>>2]=0;H[g+24>>2]=0;H[g+28>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;j=g+8|0;d=J[b+38>>1];a:{b:{if(!d){break b}c:{if(d>>>0<=511){h=H[b+8>>2];f=H[b+12>>2];e=H[b+20>>2];d=H[b+16>>2];i=d+4|0;e=i>>>0<4?e+1|0:e;if(h>>>0>>0&(e|0)>=(f|0)|(e|0)>(f|0)){break b}d=d+H[b>>2]|0;l=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[j+12>>2]=l;e=H[b+20>>2];d=H[b+16>>2]+4|0;e=d>>>0<4?e+1|0:e;H[b+16>>2]=d;H[b+20>>2]=e;break c}if(!hb(1,j+12|0,b)){break b}d=H[b+16>>2];e=H[b+20>>2];l=H[j+12>>2]}f=H[b+8>>2];i=f-d|0;d=H[b+12>>2]-((d>>>0>f>>>0)+e|0)|0;if(i>>>0>>6>>>0&(d|0)<=0|(d|0)<0){break b}e=H[j>>2];d=H[j+4>>2]-e>>2;d:{if(d>>>0>>0){ya(j,l-d|0);l=H[j+12>>2];break d}if(d>>>0<=l>>>0){break d}H[j+4>>2]=e+(l<<2)}i=1;if(!l){break a}d=H[b+16>>2];e=H[b+20>>2];r=H[j>>2];k=H[b+8>>2];o=H[b+12>>2];h=0;while(1){i=0;if((e|0)>=(o|0)&d>>>0>=k>>>0|(e|0)>(o|0)){break a}i=H[b>>2];p=I[i+d|0];d=d+1|0;e=d?e:e+1|0;H[b+16>>2]=d;H[b+20>>2]=e;f=p>>>2|0;m=0;e:{f:{g:{h:{s=p&3;switch(s|0){case 0:break f;case 3:break h;default:break g}}f=f+h|0;i=0;if(f>>>0>=l>>>0){break a}ra(r+(h<<2)|0,0,(p&252)+4|0);h=f;break e}while(1){if((d|0)==(k|0)&(e|0)==(o|0)){break b}l=I[d+i|0];d=d+1|0;e=d?e:e+1|0;H[b+16>>2]=d;H[b+20>>2]=e;f=l<<(m<<3|6)|f;m=m+1|0;if((s|0)!=(m|0)){continue}break}}H[r+(h<<2)>>2]=f}l=H[j+12>>2];h=h+1|0;if(l>>>0>h>>>0){continue}break}d=j+16|0;o=H[j>>2];f=H[j+16>>2];e=H[j+20>>2]-f|0;i:{if(e>>>0<=4194303){ya(d,1048576-(e>>>2|0)|0);break i}if((e|0)==4194304){break i}H[j+20>>2]=f+4194304}e=j+28|0;h=H[e>>2];f=H[j+32>>2]-h>>3;j:{if(f>>>0>>0){ob(e,l-f|0);h=H[e>>2];break j}if(f>>>0>l>>>0){H[j+32>>2]=(l<<3)+h}if(!l){break b}}k=H[d>>2];d=0;i=0;while(1){e=o+(d<<2)|0;j=H[e>>2];m=(d<<3)+h|0;f=i;H[m+4>>2]=f;H[m>>2]=j;e=H[e>>2];i=e+f|0;if(i>>>0>1048576){break b}k:{if(f>>>0>=i>>>0){break k}m=0;j=e&7;if(j){while(1){H[k+(f<<2)>>2]=d;f=f+1|0;m=m+1|0;if((j|0)!=(m|0)){continue}break}}if(e-1>>>0<=6){break k}while(1){e=k+(f<<2)|0;H[e>>2]=d;H[e+28>>2]=d;H[e+24>>2]=d;H[e+20>>2]=d;H[e+16>>2]=d;H[e+12>>2]=d;H[e+8>>2]=d;H[e+4>>2]=d;f=f+8|0;if((i|0)!=(f|0)){continue}break}}d=d+1|0;if((l|0)!=(d|0)){continue}break}n=(i|0)==1048576}i=n}l:{if(!i|(H[g+20>>2]?0:a)){break l}i=0;n=ca-16|0;ca=n;m:{n:{if(J[b+38>>1]<=511){h=H[b+8>>2];f=H[b+12>>2];j=f;e=H[b+20>>2];k=H[b+16>>2];d=k+8|0;e=d>>>0<8?e+1|0:e;if(d>>>0>h>>>0&(e|0)>=(f|0)|(e|0)>(f|0)){break m}k=k+H[b>>2]|0;f=I[k|0]|I[k+1|0]<<8|(I[k+2|0]<<16|I[k+3|0]<<24);k=I[k+4|0]|I[k+5|0]<<8|(I[k+6|0]<<16|I[k+7|0]<<24);H[b+16>>2]=d;H[b+20>>2]=e;break n}if(!gb(1,n+8|0,b)){break m}d=H[b+16>>2];e=H[b+20>>2];h=H[b+8>>2];j=H[b+12>>2];f=H[n+8>>2];k=H[n+12>>2]}l=h-d|0;h=j-((d>>>0>h>>>0)+e|0)|0;if((h|0)==(k|0)&f>>>0>l>>>0|h>>>0>>0){break m}e=e+k|0;h=d+f|0;e=h>>>0>>0?e+1|0:e;H[b+16>>2]=h;H[b+20>>2]=e;if((f|0)<=0){break m}b=H[b>>2]+d|0;H[g+48>>2]=b;d=f-1|0;e=d+b|0;h=I[e|0];o:{if(h>>>0<=63){H[g+52>>2]=d;b=I[e|0]&63;break o}p:{switch((h>>>6|0)-1|0){case 0:if(f>>>0<2){break m}d=f-2|0;H[g+52>>2]=d;b=b+d|0;b=I[b+1|0]<<8&16128|I[b|0];break o;case 1:if(f>>>0<3){break m}d=f-3|0;H[g+52>>2]=d;b=b+d|0;b=I[b+1|0]<<8|I[b+2|0]<<16&4128768|I[b|0];break o;default:break p}}d=f-4|0;H[g+52>>2]=d;b=b+d|0;b=(I[b|0]|I[b+1|0]<<8|(I[b+2|0]<<16|I[b+3|0]<<24))&1073741823}H[g+56>>2]=b+4194304;i=b>>>0<1069547520}ca=n+16|0;if(!i){break l}if(!a){t=1;break l}b=H[g+52>>2];f=H[g+56>>2];d=H[g+36>>2];e=H[g+48>>2];h=H[g+24>>2];while(1){q:{if(f>>>0>4194303){break q}while(1){if((b|0)<=0){break q}b=b-1|0;H[g+52>>2]=b;f=I[b+e|0]|f<<8;H[g+56>>2]=f;if(f>>>0<4194304){continue}break}}i=f&1048575;k=H[h+(i<<2)>>2];n=d+(k<<3)|0;f=(N(H[n>>2],f>>>20|0)+i|0)-H[n+4>>2]|0;H[g+56>>2]=f;H[(q<<2)+c>>2]=k;t=1;q=q+1|0;if((q|0)!=(a|0)){continue}break}}a=H[g+36>>2];if(a){H[g+40>>2]=a;oa(a)}a=H[g+24>>2];if(a){H[g+28>>2]=a;oa(a)}a=H[g+8>>2];if(a){H[g+12>>2]=a;oa(a)}ca=g- -64|0;return t}function nc(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;e=ca-48|0;ca=e;f=J[6677]|J[6678]<<16;d=J[6675]|J[6676]<<16;G[e+38>>1]=d;G[e+40>>1]=d>>>16;G[e+42>>1]=f;G[e+44>>1]=f>>>16;d=H[3337];H[e+32>>2]=H[3336];H[e+36>>2]=d;d=H[3335];H[e+24>>2]=H[3334];H[e+28>>2]=d;d=H[3333];H[e+16>>2]=H[3332];H[e+20>>2]=d;g=H[b+8>>2];i=H[b+12>>2];h=H[b+20>>2];d=H[b+16>>2];f=d+5|0;h=f>>>0<5?h+1|0:h;a:{b:{if(g>>>0>>0&(h|0)>=(i|0)|(h|0)>(i|0)){d=Ma(e+16|0);if(d>>>0>=2147483632){break a}c:{d:{if(d>>>0>=11){b=(d|15)+1|0;c=pa(b);H[e+8>>2]=b|-2147483648;H[e>>2]=c;H[e+4>>2]=d;b=c+d|0;break d}F[e+11|0]=d;b=d+e|0;c=e;if(!d){break c}}qa(c,e+16|0,d)}F[b|0]=0;H[a>>2]=-2;b=a+4|0;if(F[e+11|0]>=0){a=H[e+4>>2];H[b>>2]=H[e>>2];H[b+4>>2]=a;H[b+8>>2]=H[e+8>>2];break b}za(b,H[e>>2],H[e+4>>2]);if(F[e+11|0]>=0){break b}oa(H[e>>2]);break b}f=d+H[b>>2]|0;d=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);F[c|0]=d;F[c+1|0]=d>>>8;F[c+2|0]=d>>>16;F[c+3|0]=d>>>24;F[c+4|0]=I[f+4|0];d=H[b+20>>2];f=H[b+16>>2]+5|0;d=f>>>0<5?d+1|0:d;H[b+16>>2]=f;H[b+20>>2]=d;if(Fa(c,1260,5)){d=pa(32);F[d+17|0]=0;F[d+16|0]=I[1496];c=I[1492]|I[1493]<<8|(I[1494]<<16|I[1495]<<24);b=I[1488]|I[1489]<<8|(I[1490]<<16|I[1491]<<24);F[d+8|0]=b;F[d+9|0]=b>>>8;F[d+10|0]=b>>>16;F[d+11|0]=b>>>24;F[d+12|0]=c;F[d+13|0]=c>>>8;F[d+14|0]=c>>>16;F[d+15|0]=c>>>24;c=I[1484]|I[1485]<<8|(I[1486]<<16|I[1487]<<24);b=I[1480]|I[1481]<<8|(I[1482]<<16|I[1483]<<24);F[d|0]=b;F[d+1|0]=b>>>8;F[d+2|0]=b>>>16;F[d+3|0]=b>>>24;F[d+4|0]=c;F[d+5|0]=c>>>8;F[d+6|0]=c>>>16;F[d+7|0]=c>>>24;H[a>>2]=-1;za(a+4|0,d,17);oa(d);break b}g=H[b+12>>2];if((g|0)<=(d|0)&K[b+8>>2]<=f>>>0|(d|0)>(g|0)){d=Ma(e+16|0);if(d>>>0>=2147483632){break a}e:{f:{if(d>>>0>=11){b=(d|15)+1|0;c=pa(b);H[e+8>>2]=b|-2147483648;H[e>>2]=c;H[e+4>>2]=d;b=c+d|0;break f}F[e+11|0]=d;b=d+e|0;c=e;if(!d){break e}}qa(c,e+16|0,d)}F[b|0]=0;H[a>>2]=-2;b=a+4|0;if(F[e+11|0]>=0){a=H[e+4>>2];H[b>>2]=H[e>>2];H[b+4>>2]=a;H[b+8>>2]=H[e+8>>2];break b}za(b,H[e>>2],H[e+4>>2]);if(F[e+11|0]>=0){break b}oa(H[e>>2]);break b}F[c+5|0]=I[f+H[b>>2]|0];g=H[b+20>>2];d=H[b+16>>2]+1|0;g=d?g:g+1|0;H[b+16>>2]=d;H[b+20>>2]=g;f=H[b+12>>2];if((f|0)<=(g|0)&K[b+8>>2]<=d>>>0|(g|0)>(f|0)){d=Ma(e+16|0);if(d>>>0>=2147483632){break a}g:{h:{if(d>>>0>=11){b=(d|15)+1|0;c=pa(b);H[e+8>>2]=b|-2147483648;H[e>>2]=c;H[e+4>>2]=d;b=c+d|0;break h}F[e+11|0]=d;b=d+e|0;c=e;if(!d){break g}}qa(c,e+16|0,d)}F[b|0]=0;H[a>>2]=-2;b=a+4|0;if(F[e+11|0]>=0){a=H[e+4>>2];H[b>>2]=H[e>>2];H[b+4>>2]=a;H[b+8>>2]=H[e+8>>2];break b}za(b,H[e>>2],H[e+4>>2]);if(F[e+11|0]>=0){break b}oa(H[e>>2]);break b}F[c+6|0]=I[d+H[b>>2]|0];h=H[b+20>>2];d=H[b+16>>2]+1|0;h=d?h:h+1|0;H[b+16>>2]=d;H[b+20>>2]=h;f=H[b+12>>2];if((f|0)<=(h|0)&K[b+8>>2]<=d>>>0|(f|0)<(h|0)){d=Ma(e+16|0);if(d>>>0>=2147483632){break a}i:{j:{if(d>>>0>=11){b=(d|15)+1|0;c=pa(b);H[e+8>>2]=b|-2147483648;H[e>>2]=c;H[e+4>>2]=d;b=c+d|0;break j}F[e+11|0]=d;b=d+e|0;c=e;if(!d){break i}}qa(c,e+16|0,d)}F[b|0]=0;H[a>>2]=-2;b=a+4|0;if(F[e+11|0]>=0){a=H[e+4>>2];H[b>>2]=H[e>>2];H[b+4>>2]=a;H[b+8>>2]=H[e+8>>2];break b}za(b,H[e>>2],H[e+4>>2]);if(F[e+11|0]>=0){break b}oa(H[e>>2]);break b}F[c+7|0]=I[d+H[b>>2]|0];g=H[b+20>>2];d=H[b+16>>2]+1|0;g=d?g:g+1|0;H[b+16>>2]=d;H[b+20>>2]=g;f=H[b+12>>2];if((f|0)<=(g|0)&K[b+8>>2]<=d>>>0|(g|0)>(f|0)){c=mc(e,e+16|0);H[a>>2]=-2;b=a+4|0;if(F[c+11|0]>=0){a=H[c+4>>2];H[b>>2]=H[c>>2];H[b+4>>2]=a;H[b+8>>2]=H[c+8>>2];break b}za(b,H[c>>2],H[c+4>>2]);if(F[c+11|0]>=0){break b}oa(H[c>>2]);break b}F[c+8|0]=I[d+H[b>>2]|0];d=H[b+20>>2];g=H[b+16>>2];f=g+1|0;i=f?d:d+1|0;H[b+16>>2]=f;H[b+20>>2]=i;i=H[b+8>>2];h=H[b+12>>2];g=g+3|0;d=g>>>0<3?d+1|0:d;if(g>>>0>i>>>0&(d|0)>=(h|0)|(d|0)>(h|0)){c=mc(e,e+16|0);H[a>>2]=-2;b=a+4|0;if(F[c+11|0]>=0){a=H[c+4>>2];H[b>>2]=H[c>>2];H[b+4>>2]=a;H[b+8>>2]=H[c+8>>2];break b}za(b,H[c>>2],H[c+4>>2]);if(F[c+11|0]>=0){break b}oa(H[c>>2]);break b}d=c;c=H[b>>2]+f|0;G[d+10>>1]=I[c|0]|I[c+1|0]<<8;g=H[b+20>>2];c=H[b+16>>2]+2|0;g=c>>>0<2?g+1|0:g;H[b+16>>2]=c;H[b+20>>2]=g;H[a+8>>2]=0;H[a+12>>2]=0;H[a>>2]=0;H[a+4>>2]=0}ca=e+48|0;return}Na();v()}function Nb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0;e=ca-96|0;ca=e;f=H[a+16>>2];F[e+92|0]=1;H[e+88>>2]=b;H[e+84>>2]=b;H[e+80>>2]=f;j=H[a+20>>2];d=H[j>>2];a:{b:{f=H[H[f+28>>2]+(b<<2)>>2];if(f>>>0>2]-d>>2>>>0){d=H[H[a+8>>2]+(H[d+(f<<2)>>2]<<2)>>2];f=H[a+4>>2];if(!I[f+84|0]){d=H[H[f+68>>2]+(d<<2)>>2]}H[e+72>>2]=0;H[e+76>>2]=0;j=e- -64|0;H[j>>2]=0;H[j+4>>2]=0;H[e+56>>2]=0;H[e+60>>2]=0;Sa(f,d,F[f+24|0],e+56|0);if((b|0)!=-1){f=b+1|0;j=(f>>>0)%3|0?f:b-2|0;m=((b>>>0)%3|0?-1:2)+b|0;while(1){d=j;f=m;c:{if(!H[a+28>>2]){break c}f=b+1|0;d=(f>>>0)%3|0?f:b-2|0;f=b-1|0;if((b>>>0)%3|0){break c}f=b+2|0}n=H[a+20>>2];b=H[n>>2];d=H[H[H[a+16>>2]+28>>2]+(d<<2)>>2];if(d>>>0>=H[n+4>>2]-b>>2>>>0){break b}d=H[H[a+8>>2]+(H[b+(d<<2)>>2]<<2)>>2];b=H[a+4>>2];if(!I[b+84|0]){d=H[H[b+68>>2]+(d<<2)>>2]}H[e+48>>2]=0;H[e+52>>2]=0;H[e+40>>2]=0;H[e+44>>2]=0;H[e+32>>2]=0;H[e+36>>2]=0;Sa(b,d,F[b+24|0],e+32|0);d=H[a+20>>2];b=H[d>>2];f=H[H[H[a+16>>2]+28>>2]+(f<<2)>>2];if(f>>>0>=H[d+4>>2]-b>>2>>>0){break a}d=H[H[a+8>>2]+(H[b+(f<<2)>>2]<<2)>>2];b=H[a+4>>2];if(!I[b+84|0]){d=H[H[b+68>>2]+(d<<2)>>2]}H[e+24>>2]=0;H[e+28>>2]=0;H[e+16>>2]=0;H[e+20>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;Sa(b,d,F[b+24|0],e+8|0);g=H[e+8>>2];b=H[e+56>>2];d=g-b|0;p=H[e+60>>2];t=H[e+12>>2]-(p+(b>>>0>g>>>0)|0)|0;h=H[e+40>>2];f=H[e+64>>2];n=h-f|0;u=H[e+68>>2];y=H[e+44>>2]-(u+(f>>>0>h>>>0)|0)|0;g=Rj(d,t,n,y);w=o-g|0;x=i-(da+(g>>>0>o>>>0)|0)|0;i=w;h=H[e+16>>2];g=h-f|0;u=H[e+20>>2]-((f>>>0>h>>>0)+u|0)|0;k=H[e+32>>2];h=k-b|0;w=H[e+36>>2]-((b>>>0>k>>>0)+p|0)|0;b=Rj(g,u,h,w);o=i+b|0;i=da+x|0;i=b>>>0>o>>>0?i+1|0:i;b=l;l=d;p=t;k=H[e+48>>2];f=H[e+72>>2];d=k-f|0;t=H[e+76>>2];x=H[e+52>>2]-(t+(f>>>0>k>>>0)|0)|0;l=Rj(l,p,d,x);k=b+l|0;b=da+q|0;b=k>>>0>>0?b+1|0:b;l=H[e+24>>2];p=l-f|0;f=H[e+28>>2]-((f>>>0>l>>>0)+t|0)|0;q=Rj(p,f,h,w);l=k-q|0;q=b-(da+(k>>>0>>0)|0)|0;b=Rj(g,u,d,x);d=r-b|0;b=s-(da+(b>>>0>r>>>0)|0)|0;s=Rj(p,f,n,y);r=s+d|0;b=da+b|0;s=r>>>0>>0?b+1|0:b;b=H[e+88>>2];f=H[e+80>>2];d:{if(I[e+92|0]){e:{f:{g:{h:{if((b|0)==-1){break h}d=b+1|0;b=(d>>>0)%3|0?d:b-2|0;if((b|0)==-1|H[H[f>>2]+(b>>>3&536870908)>>2]>>>b&1){break h}b=H[H[H[f+64>>2]+12>>2]+(b<<2)>>2];if((b|0)!=-1){break g}}H[e+88>>2]=-1;break f}d=b+1|0;b=(d>>>0)%3|0?d:b-2|0;H[e+88>>2]=b;if((b|0)!=-1){break e}}b=H[e+84>>2];d=-1;i:{if((b|0)==-1){break i}j:{if((b>>>0)%3|0){b=b-1|0;break j}b=b+2|0;d=-1;if((b|0)==-1){break i}}d=-1;if(H[H[f>>2]+(b>>>3&536870908)>>2]>>>b&1){break i}b=H[H[H[f+64>>2]+12>>2]+(b<<2)>>2];d=-1;if((b|0)==-1){break i}d=b-1|0;if((b>>>0)%3|0){break i}d=b+2|0}F[e+92|0]=0;H[e+88>>2]=d;break d}if((b|0)!=H[e+84>>2]){break d}H[e+88>>2]=-1;break d}d=-1;k:{if((b|0)==-1){break k}l:{if((b>>>0)%3|0){b=b-1|0;break l}b=b+2|0;d=-1;if((b|0)==-1){break k}}d=-1;if(H[H[f>>2]+(b>>>3&536870908)>>2]>>>b&1){break k}b=H[H[H[f+64>>2]+12>>2]+(b<<2)>>2];d=-1;if((b|0)==-1){break k}d=b-1|0;if((b>>>0)%3|0){break k}d=b+2|0}H[e+88>>2]=d}b=H[e+88>>2];if((b|0)!=-1){continue}break}}b=s>>31;f=b^r;d=f-b|0;b=(b^s)-((b>>>0>f>>>0)+b|0)|0;m=-1;f=2147483647;g=q>>31;h=g^l;j=h-g|0;n=(g^q)-((h>>>0>>0)+g|0)|0;h=n;k=j^-1;g=h^2147483647;n=i;m:{n:{if(!H[a+28>>2]){if((b|0)==(g|0)&d>>>0>k>>>0|b>>>0>g>>>0){break m}b=b+h|0;a=d+j|0;b=a>>>0>>0?b+1|0:b;f=a;g=i;a=g>>31;d=a;m=d^o;a=m-d|0;i=a;d=(d^g)-((d>>>0>m>>>0)+d|0)|0;a=a+f|0;d=d^2147483647;i=(d|0)==(b|0)&(i^-1)>>>0>>0|b>>>0>d>>>0;a=i?-1:a;if(!(i&0)&(a|0)<=536870912|(a|0)<536870912){break m}b=0;a=a>>>29|0;break n}o:{if((b|0)==(g|0)&d>>>0>k>>>0|b>>>0>g>>>0){break o}b=b+h|0;a=d+j|0;b=a>>>0>>0?b+1|0:b;k=i;d=i>>31;h=d^o;i=h-d|0;j=(d^k)-((d>>>0>h>>>0)+d|0)|0;g=j^2147483647;d=a;a=i;if((g|0)==(b|0)&d>>>0>(a^-1)>>>0|b>>>0>g>>>0){break o}b=b+j|0;m=a+d|0;b=m>>>0>>0?b+1|0:b;f=b;if(!b&m>>>0<536870913){break m}}b=f>>>29|0;a=(f&536870911)<<3|m>>>29}o=Sj(o,n,a,b);l=Sj(l,q,a,b);r=Sj(r,s,a,b)}H[c+8>>2]=o;H[c+4>>2]=l;H[c>>2]=r;ca=e+96|0;return}Ca();v()}Ca();v()}Ca();v()}function Jj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;H[a+8>>2]=e;r=a+32|0;g=H[r>>2];f=H[a+36>>2]-g>>2;a:{if(f>>>0>>0){ya(r,e-f|0);d=H[a+8>>2];break a}d=e;if(d>>>0>=f>>>0){break a}H[a+36>>2]=g+(e<<2);d=e}w=e<<2;f=e>>>0>1073741823?-1:w;m=ra(pa(f),0,f);p=ra(pa(f),0,f);b:{if((d|0)<=0){break b}i=H[a+32>>2];while(1){d=h<<2;f=H[d+m>>2];g=H[a+16>>2];c:{if((f|0)>(g|0)){H[d+i>>2]=g;break c}d=d+i|0;g=H[a+12>>2];if((g|0)>(f|0)){H[d>>2]=g;break c}H[d>>2]=f}d=H[a+8>>2];h=h+1|0;if((d|0)>(h|0)){continue}break}if((d|0)<=0){break b}f=0;while(1){g=f<<2;d=g+c|0;g=H[b+g>>2]+H[g+i>>2]|0;H[d>>2]=g;d:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break d}g=g+H[a+20>>2]|0}H[d>>2]=g}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}}f=H[a+56>>2];x=H[f>>2];f=H[f+4>>2]-x|0;if((f|0)>=5){D=H[a+52>>2];s=H[a+48>>2];u=f>>>2|0;E=u>>>0<=2?2:u;y=e&-2;z=e&1;F=e&-4;A=e&3;B=e-1|0;n=1;while(1){e:{f:{g:{h:{if((n|0)!=(u|0)){g=H[(n<<2)+x>>2];t=(e|0)<=0;if(!t){ra(m,0,w)}if((g|0)==-1){i=N(e,n);break f}C=H[s>>2];l=0;f=g;while(1){i:{if(H[(f>>>3&536870908)+C>>2]>>>f&1){break i}i=H[H[H[s+64>>2]+12>>2]+(f<<2)>>2];if((i|0)==-1){break i}j=H[D>>2];h=H[s+28>>2];o=H[j+(H[h+(i<<2)>>2]<<2)>>2];if((o|0)>=(n|0)){break i}k=i+1|0;k=H[j+(H[h+(((k>>>0)%3|0?k:i-2|0)<<2)>>2]<<2)>>2];if((k|0)>=(n|0)){break i}i=H[j+(H[h+(i+((i>>>0)%3|0?-1:2)<<2)>>2]<<2)>>2];if((i|0)>=(n|0)){break i}j:{if(t){break j}i=N(e,i);j=N(e,k);o=N(e,o);h=0;q=0;if(B){while(1){H[(h<<2)+p>>2]=(H[(h+i<<2)+c>>2]+H[(h+j<<2)+c>>2]|0)-H[(h+o<<2)+c>>2];k=h|1;H[(k<<2)+p>>2]=(H[(i+k<<2)+c>>2]+H[(j+k<<2)+c>>2]|0)-H[(k+o<<2)+c>>2];h=h+2|0;q=q+2|0;if((y|0)!=(q|0)){continue}break}}if(z){H[(h<<2)+p>>2]=(H[(h+i<<2)+c>>2]+H[(h+j<<2)+c>>2]|0)-H[(h+o<<2)+c>>2]}if(t){break j}o=0;h=0;i=0;if(e>>>0>3){while(1){j=h<<2;k=j+m|0;H[k>>2]=H[j+p>>2]+H[k>>2];k=j|4;q=k+m|0;H[q>>2]=H[k+p>>2]+H[q>>2];k=j|8;q=k+m|0;H[q>>2]=H[k+p>>2]+H[q>>2];j=j|12;k=j+m|0;H[k>>2]=H[j+p>>2]+H[k>>2];h=h+4|0;i=i+4|0;if((F|0)!=(i|0)){continue}break}}if(!A){break j}while(1){i=h<<2;j=i+m|0;H[j>>2]=H[i+p>>2]+H[j>>2];h=h+1|0;o=o+1|0;if((A|0)!=(o|0)){continue}break}}l=l+1|0}k:{l:{if((f>>>0)%3|0){h=f-1|0;break l}h=f+2|0;i=-1;if((h|0)==-1){break k}}i=-1;if(H[(h>>>3&536870908)+C>>2]>>>h&1){break k}f=H[H[H[s+64>>2]+12>>2]+(h<<2)>>2];i=-1;if((f|0)==-1){break k}i=f-1|0;if((f>>>0)%3|0){break k}i=f+2|0}f=i;if((g|0)!=(f|0)&(f|0)!=-1){continue}break}i=N(e,n);if(!l){break f}if(t){break g}h=0;f=0;if(!B){break h}while(1){g=h<<2;j=g+m|0;H[j>>2]=H[j>>2]/(l|0);g=(g|4)+m|0;H[g>>2]=H[g>>2]/(l|0);h=h+2|0;f=f+2|0;if((y|0)!=(f|0)){continue}break}break h}Ca();v()}if(!z){break g}f=(h<<2)+m|0;H[f>>2]=H[f>>2]/(l|0)}if((d|0)<=0){break e}l=H[r>>2];h=0;while(1){d=h<<2;f=H[d+m>>2];g=H[a+16>>2];m:{if((f|0)>(g|0)){H[d+l>>2]=g;break m}d=d+l|0;g=H[a+12>>2];if((g|0)>(f|0)){H[d>>2]=g;break m}H[d>>2]=f}d=H[a+8>>2];h=h+1|0;if((d|0)>(h|0)){continue}break}f=0;if((d|0)<=0){break e}d=i<<2;i=d+c|0;h=b+d|0;while(1){g=f<<2;d=g+i|0;g=H[h+g>>2]+H[g+l>>2]|0;H[d>>2]=g;n:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break n}g=g+H[a+20>>2]|0}H[d>>2]=g}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}break e}if((d|0)<=0){break e}g=(N(n-1|0,e)<<2)+c|0;l=H[r>>2];h=0;while(1){d=h<<2;f=H[d+g>>2];j=H[a+16>>2];o:{if((f|0)>(j|0)){H[d+l>>2]=j;break o}d=d+l|0;j=H[a+12>>2];if((j|0)>(f|0)){H[d>>2]=j;break o}H[d>>2]=f}d=H[a+8>>2];h=h+1|0;if((d|0)>(h|0)){continue}break}f=0;if((d|0)<=0){break e}d=i<<2;i=d+c|0;h=b+d|0;while(1){g=f<<2;d=g+i|0;g=H[h+g>>2]+H[g+l>>2]|0;H[d>>2]=g;p:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break p}g=g+H[a+20>>2]|0}H[d>>2]=g}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}}n=n+1|0;if((E|0)!=(n|0)){continue}break}}oa(p);oa(m);return 1}function sj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;H[a+8>>2]=e;r=a+32|0;f=H[r>>2];j=H[a+36>>2]-f>>2;a:{if(j>>>0>>0){ya(r,e-j|0);d=H[a+8>>2];break a}d=e;if(e>>>0>=j>>>0){break a}H[a+36>>2]=f+(e<<2);d=e}u=e<<2;f=e>>>0>1073741823?-1:u;m=ra(pa(f),0,f);p=ra(pa(f),0,f);b:{if((d|0)<=0){break b}i=H[a+32>>2];while(1){f=h<<2;j=H[f+m>>2];d=H[a+16>>2];c:{if((j|0)>(d|0)){H[f+i>>2]=d;break c}f=f+i|0;d=H[a+12>>2];if((d|0)>(j|0)){H[f>>2]=d;break c}H[f>>2]=j}d=H[a+8>>2];h=h+1|0;if((d|0)>(h|0)){continue}break}if((d|0)<=0){break b}f=0;while(1){j=f<<2;d=j+c|0;j=H[b+j>>2]+H[j+i>>2]|0;H[d>>2]=j;d:{if((j|0)>H[a+16>>2]){j=j-H[a+20>>2]|0}else{if((j|0)>=H[a+12>>2]){break d}j=j+H[a+20>>2]|0}H[d>>2]=j}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}}f=H[a+56>>2];w=H[f>>2];f=H[f+4>>2]-w|0;if((f|0)>=5){D=H[a+52>>2];x=H[a+48>>2];t=f>>>2|0;E=t>>>0<=2?2:t;y=e&-2;z=e&1;F=e&-4;A=e&3;B=e-1|0;n=1;while(1){e:{f:{g:{h:{if((n|0)!=(t|0)){j=H[(n<<2)+w>>2];s=(e|0)<=0;if(!s){ra(m,0,u)}if((j|0)==-1){g=N(e,n);break f}C=H[x+12>>2];q=0;f=j;while(1){h=H[(f<<2)+C>>2];i:{if((h|0)==-1){break i}o=H[D>>2];l=H[x>>2];k=H[o+(H[l+(h<<2)>>2]<<2)>>2];i=h+1|0;i=(i>>>0)%3|0?i:h-2|0;if((i|0)!=-1){g=H[l+(i<<2)>>2]}else{g=-1}j:{k:{if((h>>>0)%3|0){h=h-1|0;break k}h=h+2|0;i=-1;if((h|0)==-1){break j}}i=H[l+(h<<2)>>2]}if((k|0)>=(n|0)){break i}g=H[(g<<2)+o>>2];if((g|0)>=(n|0)){break i}i=H[o+(i<<2)>>2];if((i|0)>=(n|0)){break i}l:{if(s){break l}l=N(e,i);o=N(e,g);k=N(e,k);h=0;i=0;if(B){while(1){H[(h<<2)+p>>2]=(H[(h+l<<2)+c>>2]+H[(h+o<<2)+c>>2]|0)-H[(h+k<<2)+c>>2];g=h|1;H[(g<<2)+p>>2]=(H[(g+l<<2)+c>>2]+H[(g+o<<2)+c>>2]|0)-H[(g+k<<2)+c>>2];h=h+2|0;i=i+2|0;if((y|0)!=(i|0)){continue}break}}if(z){H[(h<<2)+p>>2]=(H[(h+l<<2)+c>>2]+H[(h+o<<2)+c>>2]|0)-H[(h+k<<2)+c>>2]}if(s){break l}o=0;h=0;k=0;if(e>>>0>3){while(1){l=h<<2;i=l+m|0;H[i>>2]=H[l+p>>2]+H[i>>2];g=l|4;i=g+m|0;H[i>>2]=H[g+p>>2]+H[i>>2];g=l|8;i=g+m|0;H[i>>2]=H[g+p>>2]+H[i>>2];g=l|12;i=g+m|0;H[i>>2]=H[g+p>>2]+H[i>>2];h=h+4|0;k=k+4|0;if((F|0)!=(k|0)){continue}break}}if(!A){break l}while(1){g=h<<2;i=g+m|0;H[i>>2]=H[g+p>>2]+H[i>>2];h=h+1|0;o=o+1|0;if((A|0)!=(o|0)){continue}break}}q=q+1|0}m:{n:{if((f>>>0)%3|0){h=f-1|0;break n}h=f+2|0;g=-1;if((h|0)==-1){break m}}f=H[(h<<2)+C>>2];g=-1;if((f|0)==-1){break m}g=f-1|0;if((f>>>0)%3|0){break m}g=f+2|0}f=g;if((j|0)!=(f|0)&(f|0)!=-1){continue}break}g=N(e,n);if(!q){break f}if(s){break g}h=0;f=0;if(!B){break h}while(1){i=h<<2;j=i+m|0;H[j>>2]=H[j>>2]/(q|0);j=(i|4)+m|0;H[j>>2]=H[j>>2]/(q|0);h=h+2|0;f=f+2|0;if((y|0)!=(f|0)){continue}break}break h}Ca();v()}if(!z){break g}f=(h<<2)+m|0;H[f>>2]=H[f>>2]/(q|0)}if((d|0)<=0){break e}k=H[r>>2];h=0;while(1){f=h<<2;j=H[f+m>>2];d=H[a+16>>2];o:{if((j|0)>(d|0)){H[f+k>>2]=d;break o}f=f+k|0;d=H[a+12>>2];if((d|0)>(j|0)){H[f>>2]=d;break o}H[f>>2]=j}d=H[a+8>>2];h=h+1|0;if((d|0)>(h|0)){continue}break}f=0;if((d|0)<=0){break e}d=g<<2;i=d+c|0;j=b+d|0;while(1){g=f<<2;d=g+i|0;g=H[g+j>>2]+H[g+k>>2]|0;H[d>>2]=g;p:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break p}g=g+H[a+20>>2]|0}H[d>>2]=g}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}break e}if((d|0)<=0){break e}f=(N(n-1|0,e)<<2)+c|0;k=H[r>>2];h=0;while(1){j=h<<2;i=H[j+f>>2];d=H[a+16>>2];q:{if((i|0)>(d|0)){H[j+k>>2]=d;break q}j=j+k|0;d=H[a+12>>2];if((d|0)>(i|0)){H[j>>2]=d;break q}H[j>>2]=i}d=H[a+8>>2];h=h+1|0;if((d|0)>(h|0)){continue}break}f=0;if((d|0)<=0){break e}d=g<<2;i=d+c|0;j=b+d|0;while(1){g=f<<2;d=g+i|0;g=H[g+j>>2]+H[g+k>>2]|0;H[d>>2]=g;r:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break r}g=g+H[a+20>>2]|0}H[d>>2]=g}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}}n=n+1|0;if((E|0)!=(n|0)){continue}break}}oa(p);oa(m);return 1}function xa(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;f=ca-32|0;ca=f;a:{b=H[a+16>>2];b:{if(b>>>0>=341){H[a+16>>2]=b-341;b=H[a+4>>2];j=H[b>>2];c=b+4|0;H[a+4>>2]=c;b=H[a+8>>2];c:{if((b|0)!=H[a+12>>2]){d=b;break c}k=H[a>>2];if(k>>>0>>0){e=((c-k>>2)+1|0)/-2<<2;b=b-c|0;d=va(e+c|0,c,b)+b|0;H[a+8>>2]=d;H[a+4>>2]=e+H[a+4>>2];break c}d=(b|0)==(k|0)?1:b-k>>1;if(d>>>0>=1073741824){break a}e=d<<2;h=pa(e);l=e+h|0;e=h+(d&-4)|0;d=e;d:{if((b|0)==(c|0)){break d}b=b-c|0;m=b&-4;i=b-4|0;g=(i>>>2|0)+1&7;e:{if(!g){b=e;break e}d=0;b=e;while(1){H[b>>2]=H[c>>2];c=c+4|0;b=b+4|0;d=d+1|0;if((g|0)!=(d|0)){continue}break}}d=e+m|0;if(i>>>0<28){break d}while(1){H[b>>2]=H[c>>2];H[b+4>>2]=H[c+4>>2];H[b+8>>2]=H[c+8>>2];H[b+12>>2]=H[c+12>>2];H[b+16>>2]=H[c+16>>2];H[b+20>>2]=H[c+20>>2];H[b+24>>2]=H[c+24>>2];H[b+28>>2]=H[c+28>>2];c=c+32|0;b=b+32|0;if((d|0)!=(b|0)){continue}break}}H[a+12>>2]=l;H[a+8>>2]=d;H[a+4>>2]=e;H[a>>2]=h;if(!k){break c}oa(k);d=H[a+8>>2]}H[d>>2]=j;H[a+8>>2]=H[a+8>>2]+4;break b}c=H[a+8>>2];b=H[a+4>>2];l=c-b|0;h=l>>2;g=H[a+12>>2];d=H[a>>2];e=g-d|0;if(h>>>0>2>>>0){if((c|0)!=(g|0)){n=f,o=pa(4092),H[n+8>>2]=o;d=a;f:{g:{b=H[a+8>>2];h:{if((b|0)!=H[a+12>>2]){e=b;break h}c=H[d+4>>2];h=H[d>>2];if(c>>>0>h>>>0){g=((c-h>>2)+1|0)/-2<<2;a=b-c|0;e=va(g+c|0,c,a)+a|0;H[d+8>>2]=e;H[d+4>>2]=g+H[d+4>>2];break h}e=(b|0)==(h|0)?1:b-h>>1;if(e>>>0>=1073741824){break g}a=e<<2;j=pa(a);l=a+j|0;a=j+(e&-4)|0;e=a;i:{if((b|0)==(c|0)){break i}b=b-c|0;m=b&-4;i=b-4|0;g=(i>>>2|0)+1&7;j:{if(!g){b=a;break j}e=0;b=a;while(1){H[b>>2]=H[c>>2];c=c+4|0;b=b+4|0;e=e+1|0;if((g|0)!=(e|0)){continue}break}}e=a+m|0;if(i>>>0<28){break i}while(1){H[b>>2]=H[c>>2];H[b+4>>2]=H[c+4>>2];H[b+8>>2]=H[c+8>>2];H[b+12>>2]=H[c+12>>2];H[b+16>>2]=H[c+16>>2];H[b+20>>2]=H[c+20>>2];H[b+24>>2]=H[c+24>>2];H[b+28>>2]=H[c+28>>2];c=c+32|0;b=b+32|0;if((e|0)!=(b|0)){continue}break}}H[d+12>>2]=l;H[d+8>>2]=e;H[d+4>>2]=a;H[d>>2]=j;if(!h){break h}oa(h);e=H[d+8>>2]}H[e>>2]=H[f+8>>2];H[d+8>>2]=H[d+8>>2]+4;break f}wa();v()}break b}n=f,o=pa(4092),H[n+8>>2]=o;qd(a,f+8|0);b=H[a+4>>2];j=H[b>>2];c=b+4|0;H[a+4>>2]=c;b=H[a+8>>2];k:{if((b|0)!=H[a+12>>2]){d=b;break k}k=H[a>>2];if(k>>>0>>0){e=((c-k>>2)+1|0)/-2<<2;b=b-c|0;d=va(e+c|0,c,b)+b|0;H[a+8>>2]=d;H[a+4>>2]=e+H[a+4>>2];break k}d=(b|0)==(k|0)?1:b-k>>1;if(d>>>0>=1073741824){break a}e=d<<2;h=pa(e);l=e+h|0;e=h+(d&-4)|0;d=e;l:{if((b|0)==(c|0)){break l}b=b-c|0;m=b&-4;i=b-4|0;g=(i>>>2|0)+1&7;m:{if(!g){b=e;break m}d=0;b=e;while(1){H[b>>2]=H[c>>2];c=c+4|0;b=b+4|0;d=d+1|0;if((g|0)!=(d|0)){continue}break}}d=e+m|0;if(i>>>0<28){break l}while(1){H[b>>2]=H[c>>2];H[b+4>>2]=H[c+4>>2];H[b+8>>2]=H[c+8>>2];H[b+12>>2]=H[c+12>>2];H[b+16>>2]=H[c+16>>2];H[b+20>>2]=H[c+20>>2];H[b+24>>2]=H[c+24>>2];H[b+28>>2]=H[c+28>>2];c=c+32|0;b=b+32|0;if((d|0)!=(b|0)){continue}break}}H[a+12>>2]=l;H[a+8>>2]=d;H[a+4>>2]=e;H[a>>2]=h;if(!k){break k}oa(k);d=H[a+8>>2]}H[d>>2]=j;H[a+8>>2]=H[a+8>>2]+4;break b}H[f+24>>2]=a+12;m=(d|0)==(g|0)?1:e>>1;if(m>>>0>=1073741824){break a}e=m<<2;g=pa(e);H[f+8>>2]=g;j=e+g|0;H[f+20>>2]=j;d=(h<<2)+g|0;H[f+12>>2]=d;i=pa(4092);n:{if((h|0)!=(m|0)){break n}if((l|0)>0){d=((h+1|0)/-2<<2)+d|0;H[f+12>>2]=d;break n}d=(b|0)==(c|0)?1:l>>1;if(d>>>0>=1073741824){break a}b=d<<2;e=pa(b);H[f+8>>2]=e;j=b+e|0;H[f+20>>2]=j;d=e+(d&-4)|0;H[f+12>>2]=d;oa(g);b=H[a+4>>2];c=H[a+8>>2];g=e}H[d>>2]=i;i=d+4|0;H[f+16>>2]=i;e=b;if((b|0)!=(c|0)){while(1){c=c-4|0;qd(f+8|0,c);if(H[a+4>>2]!=(c|0)){continue}break}j=H[f+20>>2];i=H[f+16>>2];d=H[f+12>>2];g=H[f+8>>2];e=c;b=H[a+8>>2]}c=H[a>>2];H[a>>2]=g;H[f+8>>2]=c;H[a+4>>2]=d;H[f+12>>2]=e;H[a+8>>2]=i;H[f+16>>2]=b;d=H[a+12>>2];H[a+12>>2]=j;H[f+20>>2]=d;if((b|0)!=(e|0)){H[f+16>>2]=((e-b|0)+3&-4)+b}if(!c){break b}oa(c)}ca=f+32|0;return}wa();v()}function Aj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=O(0),j=0,k=0,l=0,m=O(0),n=O(0),o=O(0),p=O(0),q=O(0),r=0,s=O(0),t=O(0),u=O(0),w=O(0),x=0,y=O(0),z=O(0),A=O(0),B=0;a:{b:{if((e|0)!=2){break b}H[a+64>>2]=f;H[a+72>>2]=2;e=pa(8);d=H[a+68>>2];H[a+68>>2]=e;if(d){oa(d)}H[a+8>>2]=2;x=a+32|0;e=H[x>>2];d=H[a+36>>2]-e|0;c:{if(d>>>0<=7){ya(x,2-(d>>>2|0)|0);break c}if((d|0)==8){break c}H[a+36>>2]=e+8}h=1;d=H[a+56>>2];d=H[d+4>>2]-H[d>>2]|0;if((d|0)<=0){break b}d=d>>>2|0;B=d>>>0<=1?1:d;d=0;while(1){e=H[a+56>>2];h=H[e>>2];if(H[e+4>>2]-h>>2>>>0<=d>>>0){break a}q=O(0);g=ca-48|0;ca=g;e=-1;h=H[h+(d<<2)>>2];f=-1;d:{if((h|0)==-1){break d}e=h+1|0;e=(e>>>0)%3|0?e:h-2|0;f=h-1|0;if((h>>>0)%3|0){break d}f=h+2|0}j=H[a+52>>2];h=H[j>>2];e:{f:{j=H[j+4>>2]-h>>2;l=e<<2;e=H[H[a+48>>2]+28>>2];r=H[l+e>>2];if(j>>>0<=r>>>0){break f}e=H[e+(f<<2)>>2];if(e>>>0>=j>>>0){break f}j=H[h+(e<<2)>>2];f=H[h+(r<<2)>>2];g:{if(!((j|0)>=(d|0)|(f|0)>=(d|0))){e=H[a+72>>2];h=(N(e,j)<<2)+c|0;m=O(H[h+4>>2]);e=(N(e,f)<<2)+c|0;p=O(H[e+4>>2]);y=O(H[e>>2]);n=O(H[h>>2]);if(!(y!=n|m!=p)){h=+m>2147483647;e=H[a+68>>2];if(O(P(m))>2]=m2147483647;if(O(P(n))>2]=n>2]+(d<<2)>>2];H[g+40>>2]=0;H[g+32>>2]=0;H[g+36>>2]=0;h=H[a+60>>2];if(!I[h+84|0]){e=H[H[h+68>>2]+(e<<2)>>2]}Va(h,e,F[h+24|0],g+32|0);f=H[H[a+64>>2]+(f<<2)>>2];H[g+24>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;e=H[a+60>>2];if(!I[e+84|0]){f=H[H[e+68>>2]+(f<<2)>>2]}Va(e,f,F[e+24|0],g+16|0);f=H[H[a+64>>2]+(j<<2)>>2];H[g+8>>2]=0;H[g>>2]=0;H[g+4>>2]=0;e=H[a+60>>2];if(!I[e+84|0]){f=H[H[e+68>>2]+(f<<2)>>2]}Va(e,f,F[e+24|0],g);o=L[g+24>>2];s=O(L[g+8>>2]-o);t=L[g+20>>2];u=O(L[g+4>>2]-t);A=L[g+16>>2];w=O(L[g>>2]-A);z=O(O(s*s)+O(O(u*u)+O(O(w*w)+O(0))));h:{if(H[a+88>>2]>=258){i=O(0);if(!(z>O(0))){break h}}i=O(L[g+40>>2]-o);o=O(L[g+36>>2]-t);t=O(L[g+32>>2]-A);q=O(O(O(s*i)+O(O(u*o)+O(O(w*t)+O(0))))/z);i=O(i-O(s*q));s=O(i*i);i=O(o-O(u*q));o=O(i*i);i=O(t-O(w*q));i=O(W(O(O(s+O(o+O(O(i*i)+O(0))))/z)))}f=H[a+80>>2];if(f){e=f-1|0;h=H[H[a+76>>2]+(e>>>3&536870908)>>2];H[a+80>>2]=e;m=O(m-p);o=O(O(m*q)+p);n=O(n-y);p=O(n*i);e=h>>>e&1;p=O(o+(e?p:O(-p)));i=O(i*m);k=T(+O(O(O(n*q)+y)+(e?O(-i):i))+.5);i:{if(k<-2147483648|k!=k|k>2147483647){e=H[a+68>>2];H[e>>2]=-2147483648;break i}e=H[a+68>>2];if(P(k)<2147483648){h=~~k}else{h=-2147483648}H[e>>2]=h}k=T(+p+.5);j=k>2147483647;if(P(k)<2147483648){h=~~k}else{h=-2147483648}H[e+4>>2]=k<-2147483648?-2147483648:k!=k?-2147483648:j?-2147483648:h}f=(f|0)!=0;break g}j:{if((d|0)>(f|0)){e=H[a+72>>2];h=N(f,e);break j}if((d|0)<=0){f=1;if(H[a+72>>2]<=0){break g}h=H[a+68>>2];e=0;while(1){H[h+(e<<2)>>2]=0;e=e+1|0;if((e|0)>2]){continue}break}break g}e=H[a+72>>2];h=N(e,d-1|0)}f=1;if((e|0)<=0){break g}j=H[a+68>>2];e=0;while(1){H[j+(e<<2)>>2]=H[(e+h<<2)+c>>2];e=e+1|0;if((e|0)>2]){continue}break}}ca=g+48|0;break e}Ca();v()}h=f;if(!h){return 0}k:{if(H[a+8>>2]<=0){break k}r=H[a+68>>2];j=H[x>>2];e=0;while(1){f=e<<2;g=H[f+r>>2];l=H[a+16>>2];l:{if((g|0)>(l|0)){H[f+j>>2]=l;break l}f=f+j|0;l=H[a+12>>2];if((l|0)>(g|0)){H[f>>2]=l;break l}H[f>>2]=g}e=e+1|0;g=H[a+8>>2];if((e|0)<(g|0)){continue}break}f=0;if((g|0)<=0){break k}e=d<<3;r=e+c|0;l=b+e|0;while(1){g=f<<2;e=g+r|0;g=H[g+l>>2]+H[g+j>>2]|0;H[e>>2]=g;m:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break m}g=g+H[a+20>>2]|0}H[e>>2]=g}f=f+1|0;if((f|0)>2]){continue}break}}d=d+1|0;if((B|0)!=(d|0)){continue}break}}return h|0}Ca();v()}function kj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=O(0),j=0,k=0,l=O(0),m=O(0),n=O(0),o=O(0),p=0,q=O(0),r=O(0),s=O(0),t=O(0),u=O(0),w=0,x=O(0),y=O(0),z=0,A=O(0),B=0;a:{b:{if((e|0)!=2){break b}H[a+64>>2]=f;H[a+72>>2]=2;e=pa(8);d=H[a+68>>2];H[a+68>>2]=e;if(d){oa(d)}H[a+8>>2]=2;w=a+32|0;e=H[w>>2];d=H[a+36>>2]-e|0;c:{if(d>>>0<=7){ya(w,2-(d>>>2|0)|0);break c}if((d|0)==8){break c}H[a+36>>2]=e+8}h=1;d=H[a+56>>2];d=H[d+4>>2]-H[d>>2]|0;if((d|0)<=0){break b}d=d>>>2|0;B=d>>>0<=1?1:d;d=0;while(1){f=H[a+56>>2];e=H[f>>2];if(H[f+4>>2]-e>>2>>>0<=d>>>0){break a}q=O(0);g=ca-48|0;ca=g;h=-1;d:{e:{e=H[e+(d<<2)>>2];if((e|0)==-1){break e}j=H[a+48>>2];f=e+1|0;f=(f>>>0)%3|0?f:e-2|0;if((f|0)!=-1){h=H[H[j>>2]+(f<<2)>>2]}f=-1;e=e+((e>>>0)%3|0?-1:2)|0;if((e|0)!=-1){f=H[H[j>>2]+(e<<2)>>2]}e=H[a+52>>2];j=H[e>>2];e=H[e+4>>2]-j>>2;if(e>>>0<=h>>>0|e>>>0<=f>>>0){break e}e=H[j+(h<<2)>>2];j=H[j+(f<<2)>>2];f:{if(!((d|0)<=(e|0)|(j|0)>=(d|0))){f=H[a+72>>2];h=(N(f,j)<<2)+c|0;l=O(H[h+4>>2]);f=(N(e,f)<<2)+c|0;o=O(H[f+4>>2]);x=O(H[f>>2]);m=O(H[h>>2]);if(!(x!=m|l!=o)){h=+l>2147483647;e=H[a+68>>2];if(O(P(l))>2]=l2147483647;if(O(P(m))>2]=m>2]+(d<<2)>>2];H[g+40>>2]=0;H[g+32>>2]=0;H[g+36>>2]=0;h=H[a+60>>2];if(!I[h+84|0]){f=H[H[h+68>>2]+(f<<2)>>2]}Va(h,f,F[h+24|0],g+32|0);f=H[H[a+64>>2]+(e<<2)>>2];H[g+24>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;e=H[a+60>>2];if(!I[e+84|0]){f=H[H[e+68>>2]+(f<<2)>>2]}Va(e,f,F[e+24|0],g+16|0);h=H[H[a+64>>2]+(j<<2)>>2];H[g+8>>2]=0;H[g>>2]=0;H[g+4>>2]=0;e=H[a+60>>2];if(!I[e+84|0]){h=H[H[e+68>>2]+(h<<2)>>2]}Va(e,h,F[e+24|0],g);n=L[g+24>>2];r=O(L[g+8>>2]-n);s=L[g+20>>2];t=O(L[g+4>>2]-s);A=L[g+16>>2];u=O(L[g>>2]-A);y=O(O(r*r)+O(O(t*t)+O(O(u*u)+O(0))));g:{if(H[a+88>>2]>=258){i=O(0);if(!(y>O(0))){break g}}i=O(L[g+40>>2]-n);n=O(L[g+36>>2]-s);s=O(L[g+32>>2]-A);q=O(O(O(r*i)+O(O(t*n)+O(O(u*s)+O(0))))/y);i=O(i-O(r*q));r=O(i*i);i=O(n-O(t*q));n=O(i*i);i=O(s-O(u*q));i=O(W(O(O(r+O(n+O(O(i*i)+O(0))))/y)))}e=H[a+80>>2];if(e){f=e-1|0;h=H[H[a+76>>2]+(f>>>3&536870908)>>2];H[a+80>>2]=f;l=O(l-o);n=O(O(l*q)+o);m=O(m-x);o=O(m*i);f=h>>>f&1;o=O(n+(f?o:O(-o)));i=O(i*l);k=T(+O(O(O(m*q)+x)+(f?O(-i):i))+.5);h:{if(k<-2147483648|k!=k|k>2147483647){h=H[a+68>>2];H[h>>2]=-2147483648;break h}h=H[a+68>>2];if(P(k)<2147483648){f=~~k}else{f=-2147483648}H[h>>2]=f}k=T(+o+.5);j=k>2147483647;if(P(k)<2147483648){f=~~k}else{f=-2147483648}H[h+4>>2]=k<-2147483648?-2147483648:k!=k?-2147483648:j?-2147483648:f}h=(e|0)!=0;break f}i:{if((d|0)>(e|0)){f=H[a+72>>2];e=N(e,f);break i}if((d|0)<=0){h=1;if(H[a+72>>2]<=0){break f}e=H[a+68>>2];f=0;while(1){H[e+(f<<2)>>2]=0;f=f+1|0;if((f|0)>2]){continue}break}break f}f=H[a+72>>2];e=N(f,d-1|0)}h=1;if((f|0)<=0){break f}j=H[a+68>>2];f=0;while(1){H[j+(f<<2)>>2]=H[(e+f<<2)+c>>2];f=f+1|0;if((f|0)>2]){continue}break}}ca=g+48|0;break d}Ca();v()}if(!h){return 0}j:{if(H[a+8>>2]<=0){break j}z=H[a+68>>2];j=H[w>>2];e=0;while(1){f=e<<2;g=H[f+z>>2];p=H[a+16>>2];k:{if((g|0)>(p|0)){H[f+j>>2]=p;break k}f=f+j|0;p=H[a+12>>2];if((p|0)>(g|0)){H[f>>2]=p;break k}H[f>>2]=g}e=e+1|0;g=H[a+8>>2];if((e|0)<(g|0)){continue}break}f=0;if((g|0)<=0){break j}e=d<<3;z=e+c|0;p=b+e|0;while(1){g=f<<2;e=g+z|0;g=H[g+p>>2]+H[g+j>>2]|0;H[e>>2]=g;l:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break l}g=g+H[a+20>>2]|0}H[e>>2]=g}f=f+1|0;if((f|0)>2]){continue}break}}d=d+1|0;if((B|0)!=(d|0)){continue}break}}return h|0}Ca();v()}function Of(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=ca-704|0;ca=f;n=1;a:{b:{c:{d:{if(J[b+38>>1]<515){break d}n=0;c=H[b+20>>2];d=H[b+12>>2];g=H[b+16>>2];if((c|0)>=(d|0)&g>>>0>=K[b+8>>2]|(c|0)>(d|0)){break d}p=I[H[b>>2]+g|0];g=g+1|0;c=g?c:c+1|0;H[b+16>>2]=g;H[b+20>>2]=c;g=H[H[(ea[H[H[a>>2]+28>>2]](a)|0)+4>>2]+80>>2];c=ea[H[H[a>>2]+24>>2]](a)|0;H[f+40>>2]=0;H[f+32>>2]=0;H[f+36>>2]=0;if(c){if(c>>>0>=214748365){break c}c=N(c,20);d=pa(c);H[f+32>>2]=d;H[f+40>>2]=c+d;c=c-20|0;c=(c-((c>>>0)%20|0)|0)+20|0;q=f,r=ra(d,0,c)+c|0,H[q+36>>2]=r}e:{if((ea[H[H[a>>2]+24>>2]](a)|0)>0){while(1){c=ea[H[H[a>>2]+20>>2]](a,l)|0;c=H[H[H[(ea[H[H[a>>2]+28>>2]](a)|0)+4>>2]+8>>2]+(c<<2)>>2];mb(c,g);F[c+84|0]=1;H[c+72>>2]=H[c+68>>2];d=H[c+28>>2];if(d>>>0>9){break e}f:{g:{h:{e=1<>2],d,6,0,i,i>>31);c=jc(pa(96),e);H[f>>2]=c;F[c+84|0]=1;H[c+72>>2]=H[c+68>>2];mb(c,g);c=H[a+64>>2];if(c>>>0>=K[a+68>>2]){break h}d=H[f>>2];H[f>>2]=0;H[c>>2]=d;c=c+4|0;H[a+64>>2]=c;break g}j=0;if(!I[c+24|0]){break f}while(1){d=H[a+52>>2];i=H[a+56>>2];i:{if(d>>>0>>0){H[d>>2]=0;H[a+52>>2]=d+4;break i}e=d;d=H[a+48>>2];m=e-d|0;k=m>>2;e=k+1|0;if(e>>>0>=1073741824){break b}o=k<<2;i=i-d|0;k=i>>>1|0;e=i>>>0>=2147483644?1073741823:e>>>0>>0?k:e;if(e){if(e>>>0>=1073741824){break a}i=pa(e<<2)}else{i=0}k=o+i|0;H[k>>2]=0;o=e<<2;e=va(i,d,m);H[a+56>>2]=o+e;H[a+52>>2]=k+4;H[a+48>>2]=e;if(!d){break i}oa(d)}j=j+1|0;if(j>>>0>2];i=H[a+64>>2]-e>>2;d=i+1|0;if(d>>>0<1073741824){e=H[a+68>>2]-e|0;j=e>>>1|0;e=e>>>0>=2147483644?1073741823:d>>>0>>0?j:d;if(e){if(e>>>0>=1073741824){break l}c=pa(e<<2)}j=H[f>>2];H[f>>2]=0;d=(i<<2)+c|0;H[d>>2]=j;e=(e<<2)+c|0;i=d+4|0;c=H[a+64>>2];j=H[a+60>>2];if((c|0)==(j|0)){break k}while(1){c=c-4|0;m=H[c>>2];H[c>>2]=0;d=d-4|0;H[d>>2]=m;if((c|0)!=(j|0)){continue}break}H[a+68>>2]=e;e=H[a+64>>2];H[a+64>>2]=i;c=H[a+60>>2];H[a+60>>2]=d;if((c|0)==(e|0)){break j}while(1){e=e-4|0;d=H[e>>2];H[e>>2]=0;if(d){Ga(d)}if((c|0)!=(e|0)){continue}break}break j}sa();v()}wa();v()}H[a+68>>2]=e;H[a+64>>2]=i;H[a+60>>2]=d}if(c){oa(c)}c=H[a+64>>2]}c=H[c-4>>2];d=H[f>>2];H[f>>2]=0;if(!d){break f}Ga(d)}i=H[c+28>>2];d=i-1|0;if(d>>>0<=10){e=H[(d<<2)+13584>>2]}else{e=-1}d=H[f+32>>2]+N(l,20)|0;j=I[c+24|0];H[d+16>>2]=j;H[d+12>>2]=(e|0)>0?e:0;H[d+8>>2]=i;H[d+4>>2]=h;H[d>>2]=c;h=h+j|0;l=l+1|0;if((ea[H[H[a>>2]+24>>2]](a)|0)>(l|0)){continue}break}}a=Ac(f,f+32|0);m:{n:{o:{switch(p|0){case 0:c=wb(f+48|0,h);b=Bd(c,b,a,g);h=H[c+8>>2];xb(c);if(!b){break m}if((h|0)==(g|0)){break n}break m;case 1:c=wb(f+48|0,h);b=zd(c,b,a,g);h=H[c+8>>2];xb(c);if(!b){break m}if((h|0)==(g|0)){break n}break m;case 2:c=ub(f+48|0,h);b=yd(c,b,a,g);h=H[c+8>>2];vb(c);if(!b){break m}if((h|0)==(g|0)){break n}break m;case 3:c=ub(f+48|0,h);b=xd(c,b,a,g);h=H[c+8>>2];vb(c);if(!b){break m}if((h|0)==(g|0)){break n}break m;case 4:c=$a(f+48|0,h);b=wd(c,b,a,g);h=H[c+8>>2];ab(c);if(!b){break m}if((h|0)==(g|0)){break n}break m;case 5:c=$a(f+48|0,h);b=vd(c,b,a,g);h=H[c+8>>2];ab(c);if(!b){break m}if((h|0)==(g|0)){break n}break m;case 6:break o;default:break m}}c=$a(f+48|0,h);b=ud(c,b,a,g);h=H[c+8>>2];ab(c);if(!b|(h|0)!=(g|0)){break m}}n=1}b=H[a+16>>2];if(b){H[a+20>>2]=b;oa(b)}b=H[a>>2];if(!b){break e}H[a+4>>2]=b;oa(b)}a=H[f+32>>2];if(!a){break d}H[f+36>>2]=a;oa(a)}ca=f+704|0;return n|0}sa();v()}sa();v()}wa();v()}function Zi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;e=ca-32|0;ca=e;a:{b:{switch(c-2|0){case 0:c=H[a+4>>2];f=H[a+12>>2];H[e+24>>2]=-1;H[e+16>>2]=-1;H[e+20>>2]=1065353216;H[e+8>>2]=-1;H[e+12>>2]=-1;if((b|0)==-2){break a}i=H[H[H[c+4>>2]+8>>2]+(f<<2)>>2];if((ea[H[H[c>>2]+8>>2]](c)|0)==1){h=H[H[H[c+4>>2]+8>>2]+(f<<2)>>2];c:{if((ea[H[H[c>>2]+8>>2]](c)|0)!=1|b-1>>>0>5){break c}g=ea[H[H[c>>2]+36>>2]](c)|0;a=ea[H[H[c>>2]+44>>2]](c,f)|0;if(!g|!a){break c}f=ea[H[H[c>>2]+40>>2]](c,f)|0;d:{if(f){if((b|0)!=6){break c}b=H[c+44>>2];d=pa(112);H[d+4>>2]=h;c=H[e+12>>2];H[d+8>>2]=H[e+8>>2];H[d+12>>2]=c;c=H[e+20>>2];H[d+16>>2]=H[e+16>>2];H[d+20>>2]=c;H[d+24>>2]=H[e+24>>2];H[d+40>>2]=a;c=a+12|0;H[d+36>>2]=c;H[d+32>>2]=f;H[d+28>>2]=b;H[d+68>>2]=a;H[d- -64>>2]=c;H[d+60>>2]=f;H[d+56>>2]=b;H[d+48>>2]=0;H[d+52>>2]=0;H[d>>2]=7144;H[d+88>>2]=1065353216;H[d+92>>2]=-1;H[d+80>>2]=-1;H[d+84>>2]=-1;H[d+72>>2]=1;H[d+76>>2]=-1;H[d+44>>2]=7668;a=d+96|0;break d}if((b|0)!=6){break c}b=H[c+44>>2];d=pa(112);H[d+4>>2]=h;c=H[e+12>>2];H[d+8>>2]=H[e+8>>2];H[d+12>>2]=c;c=H[e+20>>2];H[d+16>>2]=H[e+16>>2];H[d+20>>2]=c;H[d+24>>2]=H[e+24>>2];H[d+40>>2]=a;c=a+12|0;H[d+36>>2]=c;H[d+32>>2]=g;H[d+28>>2]=b;H[d+68>>2]=a;H[d- -64>>2]=c;H[d+60>>2]=g;H[d+56>>2]=b;H[d+48>>2]=0;H[d+52>>2]=0;H[d>>2]=8080;H[d+88>>2]=1065353216;H[d+92>>2]=-1;H[d+80>>2]=-1;H[d+84>>2]=-1;H[d+72>>2]=1;H[d+76>>2]=-1;H[d+44>>2]=8472;a=d+96|0}H[a>>2]=0;H[a+4>>2]=0;F[a+5|0]=0;F[a+6|0]=0;F[a+7|0]=0;F[a+8|0]=0;F[a+9|0]=0;F[a+10|0]=0;F[a+11|0]=0;F[a+12|0]=0}if(d){break a}}d=pa(28);H[d+4>>2]=i;a=H[e+12>>2];H[d+8>>2]=H[e+8>>2];H[d+12>>2]=a;a=H[e+20>>2];H[d+16>>2]=H[e+16>>2];H[d+20>>2]=a;H[d+24>>2]=H[e+24>>2];H[d>>2]=8860;break a;case 1:break b;default:break a}}c=H[a+4>>2];f=H[a+12>>2];H[e+24>>2]=-1;H[e+16>>2]=-1;H[e+20>>2]=1065353216;H[e+8>>2]=-1;H[e+12>>2]=-1;if((b|0)==-2){break a}i=H[H[H[c+4>>2]+8>>2]+(f<<2)>>2];if((ea[H[H[c>>2]+8>>2]](c)|0)==1){h=H[H[H[c+4>>2]+8>>2]+(f<<2)>>2];e:{if((ea[H[H[c>>2]+8>>2]](c)|0)!=1|b-1>>>0>5){break e}g=ea[H[H[c>>2]+36>>2]](c)|0;a=ea[H[H[c>>2]+44>>2]](c,f)|0;if(!g|!a){break e}f=ea[H[H[c>>2]+40>>2]](c,f)|0;f:{if(f){if((b|0)!=6){break e}b=H[c+44>>2];d=pa(112);H[d+4>>2]=h;c=H[e+12>>2];H[d+8>>2]=H[e+8>>2];H[d+12>>2]=c;c=H[e+20>>2];H[d+16>>2]=H[e+16>>2];H[d+20>>2]=c;H[d+24>>2]=H[e+24>>2];H[d+40>>2]=a;c=a+12|0;H[d+36>>2]=c;H[d+32>>2]=f;H[d+28>>2]=b;H[d+68>>2]=a;H[d- -64>>2]=c;H[d+60>>2]=f;H[d+56>>2]=b;H[d+48>>2]=0;H[d+52>>2]=0;H[d>>2]=9028;H[d+88>>2]=1065353216;H[d+92>>2]=-1;H[d+80>>2]=-1;H[d+84>>2]=-1;H[d+72>>2]=1;H[d+76>>2]=-1;H[d+44>>2]=9592;a=d+96|0;break f}if((b|0)!=6){break e}b=H[c+44>>2];d=pa(112);H[d+4>>2]=h;c=H[e+12>>2];H[d+8>>2]=H[e+8>>2];H[d+12>>2]=c;c=H[e+20>>2];H[d+16>>2]=H[e+16>>2];H[d+20>>2]=c;H[d+24>>2]=H[e+24>>2];H[d+40>>2]=a;c=a+12|0;H[d+36>>2]=c;H[d+32>>2]=g;H[d+28>>2]=b;H[d+68>>2]=a;H[d- -64>>2]=c;H[d+60>>2]=g;H[d+56>>2]=b;H[d+48>>2]=0;H[d+52>>2]=0;H[d>>2]=10032;H[d+88>>2]=1065353216;H[d+92>>2]=-1;H[d+80>>2]=-1;H[d+84>>2]=-1;H[d+72>>2]=1;H[d+76>>2]=-1;H[d+44>>2]=10452;a=d+96|0}H[a>>2]=0;H[a+4>>2]=0;F[a+5|0]=0;F[a+6|0]=0;F[a+7|0]=0;F[a+8|0]=0;F[a+9|0]=0;F[a+10|0]=0;F[a+11|0]=0;F[a+12|0]=0}if(d){break a}}d=pa(28);H[d+4>>2]=i;a=H[e+12>>2];H[d+8>>2]=H[e+8>>2];H[d+12>>2]=a;a=H[e+20>>2];H[d+16>>2]=H[e+16>>2];H[d+20>>2]=a;H[d+24>>2]=H[e+24>>2];H[d>>2]=10864}ca=e+32|0;return d|0}function Ki(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=O(0),f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=O(0),p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;if(H[c>>2]==H[c+4>>2]){m=H[d+80>>2];u=ca-16|0;ca=u;g=H[a+4>>2];k=I[b+24|0];h=H[d+48>>2];n=H[H[d>>2]>>2];c=u+8|0;H[c>>2]=1065353216;d=c;L[c>>2]=O(-1<>2];c=pa(k<<2);a:{if(!m|!k){break a}p=h+n|0;o=L[d>>2];n=H[a+8>>2];v=H[b>>2];d=H[b+48>>2];g=H[b+40>>2];w=H[b+44>>2];if(!I[b+84|0]){f=H[b+68>>2];s=k&254;t=k&1;a=0;while(1){b=H[v>>2];l=Rj(g,w,H[f+(i<<2)>>2],0)+d|0;h=qa(c,b+l|0,g);b=0;q=0;if((k|0)!=1){while(1){l=p+(a<<2)|0;j=b<<2;e=O(T(O(O(o*O(L[j+h>>2]-L[n+j>>2]))+O(.5))));b:{if(O(P(e))>2]=r;j=j|4;e=O(T(O(O(o*O(L[j+h>>2]-L[n+j>>2]))+O(.5))));c:{if(O(P(e))>2]=j;b=b+2|0;a=a+2|0;q=q+2|0;if((s|0)!=(q|0)){continue}break}}if(t){l=p+(a<<2)|0;b=b<<2;e=O(T(O(O(o*O(L[b+h>>2]-L[b+n>>2]))+O(.5))));d:{if(O(P(e))>2]=b;a=a+1|0}i=i+1|0;if((m|0)!=(i|0)){continue}break}break a}s=k&254;t=k&1;a=0;while(1){b=H[v>>2];h=Rj(g,w,i,l)+d|0;j=qa(c,b+h|0,g);b=0;q=0;if((k|0)!=1){while(1){h=p+(a<<2)|0;f=b<<2;e=O(T(O(O(o*O(L[f+j>>2]-L[f+n>>2]))+O(.5))));e:{if(O(P(e))>2]=r;f=f|4;e=O(T(O(O(o*O(L[f+j>>2]-L[f+n>>2]))+O(.5))));f:{if(O(P(e))>2]=f;b=b+2|0;a=a+2|0;q=q+2|0;if((s|0)!=(q|0)){continue}break}}if(t){h=p+(a<<2)|0;b=b<<2;e=O(T(O(O(o*O(L[b+j>>2]-L[b+n>>2]))+O(.5))));g:{if(O(P(e))>2]=b;a=a+1|0}b=l;i=i+1|0;b=i?b:b+1|0;l=b;if((i|0)!=(m|0)|b){continue}break}}oa(c);ca=u+16|0;return 1}j=ca-16|0;ca=j;m=H[a+4>>2];i=I[b+24|0];g=H[d+48>>2];h=H[H[d>>2]>>2];d=j+8|0;H[d>>2]=1065353216;l=d;L[d>>2]=O(-1<>2];d=pa(i<<2);m=H[c+4>>2];q=H[c>>2];h:{if(!i|(m|0)==(q|0)){break h}n=h+g|0;c=m-q>>2;u=c>>>0<=1?1:c;o=L[l>>2];h=H[a+8>>2];v=H[b>>2];l=H[b+48>>2];m=H[b+40>>2];w=H[b+44>>2];if(I[b+84|0]){s=i&254;t=i&1;a=0;c=0;while(1){b=H[v>>2];g=Rj(m,w,H[q+(c<<2)>>2],0)+l|0;p=qa(d,b+g|0,m);b=0;k=0;if((i|0)!=1){while(1){g=n+(a<<2)|0;f=b<<2;e=O(T(O(O(o*O(L[f+p>>2]-L[h+f>>2]))+O(.5))));i:{if(O(P(e))>2]=r;f=f|4;e=O(T(O(O(o*O(L[f+p>>2]-L[h+f>>2]))+O(.5))));j:{if(O(P(e))>2]=f;b=b+2|0;a=a+2|0;k=k+2|0;if((s|0)!=(k|0)){continue}break}}if(t){g=n+(a<<2)|0;b=b<<2;e=O(T(O(O(o*O(L[b+p>>2]-L[b+h>>2]))+O(.5))));k:{if(O(P(e))>2]=b;a=a+1|0}c=c+1|0;if((u|0)!=(c|0)){continue}break}break h}s=H[b+68>>2];t=i&254;x=i&1;a=0;c=0;while(1){b=H[v>>2];g=Rj(m,w,H[s+(H[q+(c<<2)>>2]<<2)>>2],0)+l|0;p=qa(d,b+g|0,m);b=0;k=0;if((i|0)!=1){while(1){g=n+(a<<2)|0;f=b<<2;e=O(T(O(O(o*O(L[f+p>>2]-L[h+f>>2]))+O(.5))));l:{if(O(P(e))>2]=r;f=f|4;e=O(T(O(O(o*O(L[f+p>>2]-L[h+f>>2]))+O(.5))));m:{if(O(P(e))>2]=f;b=b+2|0;a=a+2|0;k=k+2|0;if((t|0)!=(k|0)){continue}break}}if(x){g=n+(a<<2)|0;b=b<<2;e=O(T(O(O(o*O(L[b+p>>2]-L[b+h>>2]))+O(.5))));n:{if(O(P(e))>2]=b;a=a+1|0}c=c+1|0;if((u|0)!=(c|0)){continue}break}}oa(d);ca=j+16|0;return 1}function dd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=H[a+4>>2];e=H[a>>2];f=(c-e|0)/144|0;if(f>>>0>>0){e=a;b=b-f|0;h=H[a+8>>2];c=H[a+4>>2];a:{if(b>>>0<=(h-c|0)/144>>>0){b:{if(!b){break b}a=c;f=b&7;if(f){while(1){Ia(a);a=a+144|0;d=d+1|0;if((f|0)!=(d|0)){continue}break}}c=N(b,144)+c|0;if((b-1&268435455)>>>0<7){break b}while(1){Ia(a);Ia(a+144|0);Ia(a+288|0);Ia(a+432|0);Ia(a+576|0);Ia(a+720|0);Ia(a+864|0);Ia(a+1008|0);a=a+1152|0;if((c|0)!=(a|0)){continue}break}}H[e+4>>2]=c;break a}c:{d:{e:{a=c;c=H[e>>2];i=(a-c|0)/144|0;a=i+b|0;if(a>>>0<29826162){c=(h-c|0)/144|0;f=c<<1;f=c>>>0>=14913080?29826161:a>>>0>>0?f:a;if(f){if(f>>>0>=29826162){break e}g=pa(N(f,144))}c=N(i,144)+g|0;a=c;h=b&7;if(h){while(1){Ia(a);a=a+144|0;d=d+1|0;if((h|0)!=(d|0)){continue}break}}h=N(b,144)+c|0;if((b-1&268435455)>>>0>=7){while(1){Ia(a);Ia(a+144|0);Ia(a+288|0);Ia(a+432|0);Ia(a+576|0);Ia(a+720|0);Ia(a+864|0);Ia(a+1008|0);a=a+1152|0;if((h|0)!=(a|0)){continue}break}}b=N(f,144)+g|0;d=H[e+4>>2];f=H[e>>2];if((d|0)==(f|0)){break d}while(1){c=c-144|0;d=d-144|0;a=d;H[c>>2]=H[a>>2];H[c+4>>2]=H[a+4>>2];H[c+8>>2]=H[a+8>>2];H[c+12>>2]=H[a+12>>2];H[a+12>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;H[c+16>>2]=H[a+16>>2];H[c+20>>2]=H[a+20>>2];H[c+24>>2]=H[a+24>>2];H[a+24>>2]=0;H[a+16>>2]=0;H[a+20>>2]=0;g=I[a+28|0];H[c+40>>2]=0;H[c+32>>2]=0;H[c+36>>2]=0;F[c+28|0]=g;H[c+32>>2]=H[a+32>>2];H[c+36>>2]=H[a+36>>2];H[c+40>>2]=H[a+40>>2];H[a+40>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;H[c+52>>2]=0;H[c+44>>2]=0;H[c+48>>2]=0;H[c+44>>2]=H[a+44>>2];H[c+48>>2]=H[a+48>>2];H[c+52>>2]=H[a+52>>2];H[a+52>>2]=0;H[a+44>>2]=0;H[a+48>>2]=0;g=c- -64|0;H[g>>2]=0;H[c+56>>2]=0;H[c+60>>2]=0;H[c+56>>2]=H[a+56>>2];H[c+60>>2]=H[a+60>>2];i=g;g=a- -64|0;H[i>>2]=H[g>>2];H[g>>2]=0;H[a+56>>2]=0;H[a+60>>2]=0;H[c+68>>2]=H[a+68>>2];g=H[a+72>>2];H[c+84>>2]=0;H[c+76>>2]=0;H[c+80>>2]=0;H[c+72>>2]=g;H[c+76>>2]=H[a+76>>2];H[c+80>>2]=H[a+80>>2];H[c+84>>2]=H[a+84>>2];H[a+84>>2]=0;H[a+76>>2]=0;H[a+80>>2]=0;H[c+96>>2]=0;H[c+88>>2]=0;H[c+92>>2]=0;H[c+88>>2]=H[a+88>>2];H[c+92>>2]=H[a+92>>2];H[c+96>>2]=H[a+96>>2];H[a+96>>2]=0;H[a+88>>2]=0;H[a+92>>2]=0;g=I[a+100|0];H[c+112>>2]=0;H[c+104>>2]=0;H[c+108>>2]=0;F[c+100|0]=g;H[c+104>>2]=H[a+104>>2];H[c+108>>2]=H[a+108>>2];H[c+112>>2]=H[a+112>>2];H[a+112>>2]=0;H[a+104>>2]=0;H[a+108>>2]=0;H[c+124>>2]=0;H[c+116>>2]=0;H[c+120>>2]=0;H[c+116>>2]=H[a+116>>2];H[c+120>>2]=H[a+120>>2];H[c+124>>2]=H[a+124>>2];H[a+124>>2]=0;H[a+116>>2]=0;H[a+120>>2]=0;g=H[a+128>>2];H[c+140>>2]=0;H[c+132>>2]=0;H[c+136>>2]=0;H[c+128>>2]=g;H[c+132>>2]=H[a+132>>2];H[c+136>>2]=H[a+136>>2];H[c+140>>2]=H[a+140>>2];H[a+140>>2]=0;H[a+132>>2]=0;H[a+136>>2]=0;if((a|0)!=(f|0)){continue}break}H[e+8>>2]=b;a=H[e+4>>2];H[e+4>>2]=h;d=H[e>>2];H[e>>2]=c;if((a|0)==(d|0)){break c}while(1){b=a-144|0;c=H[b+132>>2];if(c){H[a-8>>2]=c;oa(c)}c=H[a-28>>2];if(c){H[a-24>>2]=c;oa(c)}c=H[a-40>>2];if(c){H[a-36>>2]=c;oa(c)}oc(a-140|0);a=b;if((d|0)!=(a|0)){continue}break}break c}sa();v()}wa();v()}H[e+8>>2]=b;H[e+4>>2]=h;H[e>>2]=c}if(d){oa(d)}}return}if(b>>>0>>0){e=e+N(b,144)|0;if((e|0)!=(c|0)){while(1){b=c-144|0;d=H[b+132>>2];if(d){H[c-8>>2]=d;oa(d)}d=H[c-28>>2];if(d){H[c-24>>2]=d;oa(d)}d=H[c-40>>2];if(d){H[c-36>>2]=d;oa(d)}oc(c-140|0);c=b;if((e|0)!=(c|0)){continue}break}}H[a+4>>2]=e}}function Pe(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;f=ca-80|0;ca=f;e=H[c+36>>2];H[f+72>>2]=H[c+32>>2];H[f+76>>2]=e;g=H[c+28>>2];e=f- -64|0;H[e>>2]=H[c+24>>2];H[e+4>>2]=g;e=H[c+20>>2];H[f+56>>2]=H[c+16>>2];H[f+60>>2]=e;e=H[c+12>>2];H[f+48>>2]=H[c+8>>2];H[f+52>>2]=e;e=H[c+4>>2];H[f+40>>2]=H[c>>2];H[f+44>>2]=e;nc(a,f+40|0,f+24|0);a:{if(H[a>>2]){break a}if(F[a+15|0]<0){oa(H[a+4>>2])}if(I[f+31|0]){b=pa(32);F[b+27|0]=0;c=I[1521]|I[1522]<<8|(I[1523]<<16|I[1524]<<24);F[b+23|0]=c;F[b+24|0]=c>>>8;F[b+25|0]=c>>>16;F[b+26|0]=c>>>24;c=I[1518]|I[1519]<<8|(I[1520]<<16|I[1521]<<24);d=I[1514]|I[1515]<<8|(I[1516]<<16|I[1517]<<24);F[b+16|0]=d;F[b+17|0]=d>>>8;F[b+18|0]=d>>>16;F[b+19|0]=d>>>24;F[b+20|0]=c;F[b+21|0]=c>>>8;F[b+22|0]=c>>>16;F[b+23|0]=c>>>24;c=I[1510]|I[1511]<<8|(I[1512]<<16|I[1513]<<24);d=I[1506]|I[1507]<<8|(I[1508]<<16|I[1509]<<24);F[b+8|0]=d;F[b+9|0]=d>>>8;F[b+10|0]=d>>>16;F[b+11|0]=d>>>24;F[b+12|0]=c;F[b+13|0]=c>>>8;F[b+14|0]=c>>>16;F[b+15|0]=c>>>24;c=I[1502]|I[1503]<<8|(I[1504]<<16|I[1505]<<24);d=I[1498]|I[1499]<<8|(I[1500]<<16|I[1501]<<24);F[b|0]=d;F[b+1|0]=d>>>8;F[b+2|0]=d>>>16;F[b+3|0]=d>>>24;F[b+4|0]=c;F[b+5|0]=c>>>8;F[b+6|0]=c>>>16;F[b+7|0]=c>>>24;H[a>>2]=-1;za(a+4|0,b,27);oa(b);break a}i=ca-16|0;ca=i;b:{c:{switch(F[f+32|0]){case 0:e=pa(44);H[e>>2]=0;H[e+4>>2]=0;H[e+40>>2]=0;H[e+32>>2]=0;H[e+36>>2]=0;H[e+24>>2]=0;H[e+28>>2]=0;H[e+16>>2]=0;H[e+20>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;e=Vc(e);H[e>>2]=13496;H[f+8>>2]=0;H[f+12>>2]=0;H[f>>2]=0;H[f+4>>2]=0;H[f+16>>2]=e;break b;case 1:e=pa(44);H[e>>2]=0;H[e+4>>2]=0;H[e+40>>2]=0;H[e+32>>2]=0;H[e+36>>2]=0;H[e+24>>2]=0;H[e+28>>2]=0;H[e+16>>2]=0;H[e+20>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;e=Vc(e);H[e>>2]=13404;H[f+8>>2]=0;H[f+12>>2]=0;H[f>>2]=0;H[f+4>>2]=0;H[f+16>>2]=e;break b;default:break c}}g=pa(32);F[g+28|0]=0;e=I[1550]|I[1551]<<8|(I[1552]<<16|I[1553]<<24);F[g+24|0]=e;F[g+25|0]=e>>>8;F[g+26|0]=e>>>16;F[g+27|0]=e>>>24;e=I[1546]|I[1547]<<8|(I[1548]<<16|I[1549]<<24);h=I[1542]|I[1543]<<8|(I[1544]<<16|I[1545]<<24);F[g+16|0]=h;F[g+17|0]=h>>>8;F[g+18|0]=h>>>16;F[g+19|0]=h>>>24;F[g+20|0]=e;F[g+21|0]=e>>>8;F[g+22|0]=e>>>16;F[g+23|0]=e>>>24;e=I[1538]|I[1539]<<8|(I[1540]<<16|I[1541]<<24);h=I[1534]|I[1535]<<8|(I[1536]<<16|I[1537]<<24);F[g+8|0]=h;F[g+9|0]=h>>>8;F[g+10|0]=h>>>16;F[g+11|0]=h>>>24;F[g+12|0]=e;F[g+13|0]=e>>>8;F[g+14|0]=e>>>16;F[g+15|0]=e>>>24;e=I[1530]|I[1531]<<8|(I[1532]<<16|I[1533]<<24);h=I[1526]|I[1527]<<8|(I[1528]<<16|I[1529]<<24);F[g|0]=h;F[g+1|0]=h>>>8;F[g+2|0]=h>>>16;F[g+3|0]=h>>>24;F[g+4|0]=e;F[g+5|0]=e>>>8;F[g+6|0]=e>>>16;F[g+7|0]=e>>>24;H[i>>2]=-1;e=i|4;za(e,g,28);j=F[i+15|0];H[f>>2]=H[i>>2];h=f+4|0;d:{if((j|0)>=0){j=H[e+4>>2];H[h>>2]=H[e>>2];H[h+4>>2]=j;H[h+8>>2]=H[e+8>>2];H[f+16>>2]=0;break d}za(h,H[i+4>>2],H[i+8>>2]);e=F[i+15|0];H[f+16>>2]=0;if((e|0)>=0){break d}oa(H[i+4>>2])}oa(g)}ca=i+16|0;e=H[f>>2];e:{if(e){H[a>>2]=e;a=a+4|0;if(F[f+15|0]>=0){b=f|4;c=H[b+4>>2];H[a>>2]=H[b>>2];H[a+4>>2]=c;H[a+8>>2]=H[b+8>>2];break e}za(a,H[f+4>>2],H[f+8>>2]);break e}e=H[f+16>>2];H[f+16>>2]=0;te(a,e,b,c,d);if(!H[a>>2]){if(F[a+15|0]<0){oa(H[a+4>>2])}H[a>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;H[a+12>>2]=0}ea[H[H[e>>2]+4>>2]](e)}a=H[f+16>>2];H[f+16>>2]=0;if(a){ea[H[H[a>>2]+4>>2]](a)}if(F[f+15|0]>=0){break a}oa(H[f+4>>2])}ca=f+80|0}function Ic(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;H[a+56>>2]=H[a+52>>2];H[a+44>>2]=H[a+40>>2];b=H[a+64>>2];c=H[b+24>>2];if((c|0)==H[b+28>>2]){return 1}a:{b:{c:{while(1){g=i;i=H[(k<<2)+c>>2];d:{if((i|0)==-1){i=g;break d}b=H[a+56>>2];e:{if((b|0)!=H[a+60>>2]){H[b>>2]=g;H[a+56>>2]=b+4;break e}d=H[a+52>>2];e=b-d|0;h=e>>2;c=h+1|0;if(c>>>0>=1073741824){break c}f=e>>>1|0;f=e>>>0>=2147483644?1073741823:c>>>0>>0?f:c;if(f){if(f>>>0>=1073741824){break b}e=pa(f<<2)}else{e=0}c=e+(h<<2)|0;H[c>>2]=g;h=c+4|0;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;H[c>>2]=H[b>>2];if((b|0)!=(d|0)){continue}break}}H[a+60>>2]=e+(f<<2);H[a+56>>2]=h;H[a+52>>2]=c;if(!d){break e}oa(d)}f:{g:{if(!(H[H[a+12>>2]+(k>>>3&536870908)>>2]>>>k&1)){break g}e=i+1|0;e=(e>>>0)%3|0?e:i-2|0;if((e|0)==-1|H[H[a>>2]+(e>>>3&536870908)>>2]>>>e&1){break g}e=H[H[H[a+64>>2]+12>>2]+(e<<2)>>2];if((e|0)==-1){break g}b=e+1|0;b=(b>>>0)%3|0?b:e-2|0;if((b|0)==-1){break g}c=H[a+64>>2];f=H[a>>2];while(1){e=b;b=-1;d=e+1|0;d=(d>>>0)%3|0?d:e-2|0;h:{if((d|0)==-1|H[f+(d>>>3&536870908)>>2]>>>d&1){break h}d=H[H[c+12>>2]+(d<<2)>>2];if((d|0)==-1){break h}b=d+1|0;b=(b>>>0)%3|0?b:d-2|0}if((b|0)!=(i|0)){if((b|0)==-1){break f}continue}break}return 0}e=i}H[H[a+28>>2]+(e<<2)>>2]=g;b=H[a+44>>2];i:{if((b|0)!=H[a+48>>2]){H[b>>2]=e;H[a+44>>2]=b+4;break i}d=H[a+40>>2];i=b-d|0;h=i>>2;c=h+1|0;if(c>>>0>=1073741824){break a}f=i>>>1|0;f=i>>>0>=2147483644?1073741823:c>>>0>>0?f:c;if(f){if(f>>>0>=1073741824){break b}i=pa(f<<2)}else{i=0}c=i+(h<<2)|0;H[c>>2]=e;h=c+4|0;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;H[c>>2]=H[b>>2];if((b|0)!=(d|0)){continue}break}}H[a+48>>2]=i+(f<<2);H[a+44>>2]=h;H[a+40>>2]=c;if(!d){break i}oa(d)}i=g+1|0;b=H[a+64>>2];if((e|0)==-1){break d}j:{if((e>>>0)%3|0){c=e-1|0;break j}c=e+2|0;if((c|0)==-1){break d}}d=H[H[b+12>>2]+(c<<2)>>2];if((d|0)==-1){break d}f=d+((d>>>0)%3|0?-1:2)|0;if((f|0)==-1|(e|0)==(f|0)){break d}while(1){b=f+1|0;b=(b>>>0)%3|0?b:f-2|0;if(H[H[a>>2]+(b>>>3&536870908)>>2]>>>b&1){b=H[a+56>>2];k:{if((b|0)!=H[a+60>>2]){H[b>>2]=i;H[a+56>>2]=b+4;break k}d=H[a+52>>2];g=b-d|0;j=g>>2;c=j+1|0;if(c>>>0>=1073741824){break c}h=g>>>1|0;h=g>>>0>=2147483644?1073741823:c>>>0>>0?h:c;if(h){if(h>>>0>=1073741824){break b}g=pa(h<<2)}else{g=0}c=g+(j<<2)|0;H[c>>2]=i;j=c+4|0;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;H[c>>2]=H[b>>2];if((b|0)!=(d|0)){continue}break}}H[a+60>>2]=g+(h<<2);H[a+56>>2]=j;H[a+52>>2]=c;if(!d){break k}oa(d)}d=i+1|0;b=H[a+44>>2];l:{if((b|0)!=H[a+48>>2]){H[b>>2]=f;H[a+44>>2]=b+4;break l}h=H[a+40>>2];g=b-h|0;l=g>>2;c=l+1|0;if(c>>>0>=1073741824){break a}j=g>>>1|0;j=g>>>0>=2147483644?1073741823:c>>>0>>0?j:c;if(j){if(j>>>0>=1073741824){break b}g=pa(j<<2)}else{g=0}c=g+(l<<2)|0;H[c>>2]=f;l=c+4|0;if((b|0)!=(h|0)){while(1){c=c-4|0;b=b-4|0;H[c>>2]=H[b>>2];if((b|0)!=(h|0)){continue}break}}H[a+48>>2]=g+(j<<2);H[a+44>>2]=l;H[a+40>>2]=c;if(!h){break l}oa(h)}g=i;i=d}H[H[a+28>>2]+(f<<2)>>2]=g;b=H[a+64>>2];m:{if((f>>>0)%3|0){c=f-1|0;break m}c=f+2|0;if((c|0)==-1){break d}}d=H[H[b+12>>2]+(c<<2)>>2];if((d|0)==-1){break d}f=d+((d>>>0)%3|0?-1:2)|0;if((f|0)==-1){break d}if((e|0)!=(f|0)){continue}break}}k=k+1|0;c=H[b+24>>2];if(k>>>0>2]-c>>2>>>0){continue}break}return 1}sa();v()}wa();v()}sa();v()}function ti(a){a=a|0;var b=0,c=0,d=0,e=0;c=H[a+32>>2];d=H[c+16>>2];e=H[c+12>>2];b=H[c+20>>2];if(K[c+8>>2]>d>>>0&(e|0)>=(b|0)|(b|0)<(e|0)){e=I[H[c>>2]+d|0];d=d+1|0;b=d?b:b+1|0;H[c+16>>2]=d;H[c+20>>2]=b;b=H[a+48>>2];H[a+48>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}a:{b:{c:{d:{switch(e|0){case 0:b=pa(384);H[b>>2]=11384;ra(b+4|0,0,80);H[b+96>>2]=0;H[b+100>>2]=0;H[b+92>>2]=-1;H[b+84>>2]=-1;H[b+88>>2]=-1;H[b+104>>2]=0;H[b+108>>2]=0;H[b+112>>2]=0;H[b+116>>2]=0;H[b+120>>2]=0;H[b+124>>2]=0;H[b+128>>2]=0;H[b+132>>2]=0;H[b+136>>2]=0;H[b+140>>2]=0;H[b+144>>2]=0;H[b+148>>2]=0;H[b+156>>2]=0;H[b+160>>2]=0;H[b+152>>2]=1065353216;H[b+164>>2]=0;H[b+168>>2]=0;H[b+172>>2]=0;H[b+176>>2]=0;H[b+180>>2]=0;H[b+184>>2]=0;H[b+188>>2]=0;H[b+192>>2]=0;H[b+196>>2]=0;H[b+200>>2]=0;H[b+204>>2]=0;H[b+208>>2]=0;H[b+212>>2]=-1;H[b+216>>2]=0;H[b+220>>2]=0;H[b+224>>2]=0;Ha(b+232|0);Ha(b+272|0);c=b+312|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;Ha(b+328|0);H[b+376>>2]=0;H[b+368>>2]=0;H[b+372>>2]=0;break c;case 1:b=pa(424);H[b>>2]=11436;ra(b+4|0,0,80);H[b+96>>2]=0;H[b+100>>2]=0;H[b+92>>2]=-1;H[b+84>>2]=-1;H[b+88>>2]=-1;H[b+104>>2]=0;H[b+108>>2]=0;H[b+112>>2]=0;H[b+116>>2]=0;H[b+120>>2]=0;H[b+124>>2]=0;H[b+128>>2]=0;H[b+132>>2]=0;H[b+136>>2]=0;H[b+140>>2]=0;H[b+144>>2]=0;H[b+148>>2]=0;H[b+156>>2]=0;H[b+160>>2]=0;H[b+152>>2]=1065353216;H[b+164>>2]=0;H[b+168>>2]=0;H[b+172>>2]=0;H[b+176>>2]=0;H[b+180>>2]=0;H[b+184>>2]=0;H[b+188>>2]=0;H[b+192>>2]=0;H[b+196>>2]=0;H[b+200>>2]=0;H[b+204>>2]=0;H[b+208>>2]=0;H[b+212>>2]=-1;H[b+216>>2]=0;H[b+220>>2]=0;H[b+224>>2]=0;Ha(b+232|0);Ha(b+272|0);c=b+312|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;Ha(b+328|0);H[b+392>>2]=0;H[b+396>>2]=0;H[b+384>>2]=0;H[b+388>>2]=0;H[b+376>>2]=0;H[b+380>>2]=0;H[b+368>>2]=0;H[b+372>>2]=0;c=b+400|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;H[b+416>>2]=-1;H[b+420>>2]=-1;break c;case 2:break d;default:break b}}b=pa(440);H[b>>2]=11484;ra(b+4|0,0,80);H[b+96>>2]=0;H[b+100>>2]=0;H[b+92>>2]=-1;H[b+84>>2]=-1;H[b+88>>2]=-1;H[b+104>>2]=0;H[b+108>>2]=0;H[b+112>>2]=0;H[b+116>>2]=0;H[b+120>>2]=0;H[b+124>>2]=0;H[b+128>>2]=0;H[b+132>>2]=0;H[b+136>>2]=0;H[b+140>>2]=0;H[b+144>>2]=0;H[b+148>>2]=0;H[b+156>>2]=0;H[b+160>>2]=0;H[b+152>>2]=1065353216;H[b+164>>2]=0;H[b+168>>2]=0;H[b+172>>2]=0;H[b+176>>2]=0;H[b+180>>2]=0;H[b+184>>2]=0;H[b+188>>2]=0;H[b+192>>2]=0;H[b+196>>2]=0;H[b+200>>2]=0;H[b+204>>2]=0;H[b+208>>2]=0;H[b+212>>2]=-1;H[b+216>>2]=0;H[b+220>>2]=0;H[b+224>>2]=0;Ha(b+232|0);Ha(b+272|0);c=b+312|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;Ha(b+328|0);H[b+392>>2]=0;H[b+396>>2]=0;H[b+384>>2]=0;H[b+388>>2]=0;H[b+376>>2]=0;H[b+380>>2]=0;H[b+368>>2]=0;H[b+372>>2]=0;H[b+416>>2]=0;H[b+420>>2]=0;H[b+408>>2]=2;H[b+412>>2]=7;H[b+400>>2]=-1;H[b+404>>2]=-1;H[b+424>>2]=0;H[b+428>>2]=0;H[b+432>>2]=0;H[b+436>>2]=0}c=H[a+48>>2];H[a+48>>2]=b;if(!c){break a}ea[H[H[c>>2]+4>>2]](c)}b=H[a+48>>2];if(b){break a}return 0}a=ea[H[H[b>>2]+8>>2]](b,a)|0}else{a=0}return a|0}function Lb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0;f=ca-96|0;ca=f;e=H[a+16>>2];F[f+92|0]=1;H[f+88>>2]=b;H[f+84>>2]=b;H[f+80>>2]=e;a:{if((b|0)==-1){break a}j=H[a+20>>2];d=H[j>>2];e=H[H[e>>2]+(b<<2)>>2];if(e>>>0>=H[j+4>>2]-d>>2>>>0){break a}e=H[H[a+8>>2]+(H[d+(e<<2)>>2]<<2)>>2];d=H[a+4>>2];if(!I[d+84|0]){e=H[H[d+68>>2]+(e<<2)>>2]}H[f+72>>2]=0;H[f+76>>2]=0;j=f- -64|0;H[j>>2]=0;H[j+4>>2]=0;H[f+56>>2]=0;H[f+60>>2]=0;Sa(d,e,F[d+24|0],f+56|0);e=b+1|0;j=(e>>>0)%3|0?e:b-2|0;n=((b>>>0)%3|0?-1:2)+b|0;b:{c:{while(1){d=j;e=n;d:{if(!H[a+28>>2]){break d}e=b+1|0;d=(e>>>0)%3|0?e:b-2|0;e=b-1|0;if((b>>>0)%3|0){break d}e=b+2|0}if((d|0)==-1){break b}m=H[a+20>>2];b=H[m>>2];d=H[H[H[a+16>>2]>>2]+(d<<2)>>2];if(d>>>0>=H[m+4>>2]-b>>2>>>0){break b}d=H[H[a+8>>2]+(H[(d<<2)+b>>2]<<2)>>2];b=H[a+4>>2];if(!I[b+84|0]){d=H[H[b+68>>2]+(d<<2)>>2]}H[f+48>>2]=0;H[f+52>>2]=0;H[f+40>>2]=0;H[f+44>>2]=0;H[f+32>>2]=0;H[f+36>>2]=0;Sa(b,d,F[b+24|0],f+32|0);if((e|0)==-1){break c}d=H[a+20>>2];b=H[d>>2];e=H[H[H[a+16>>2]>>2]+(e<<2)>>2];if(e>>>0>=H[d+4>>2]-b>>2>>>0){break c}d=H[H[a+8>>2]+(H[b+(e<<2)>>2]<<2)>>2];b=H[a+4>>2];if(!I[b+84|0]){d=H[H[b+68>>2]+(d<<2)>>2]}H[f+24>>2]=0;H[f+28>>2]=0;H[f+16>>2]=0;H[f+20>>2]=0;H[f+8>>2]=0;H[f+12>>2]=0;Sa(b,d,F[b+24|0],f+8|0);g=H[f+8>>2];b=H[f+56>>2];d=g-b|0;p=H[f+60>>2];t=H[f+12>>2]-(p+(b>>>0>g>>>0)|0)|0;i=H[f+40>>2];e=H[f+64>>2];m=i-e|0;u=H[f+68>>2];y=H[f+44>>2]-(u+(e>>>0>i>>>0)|0)|0;g=Rj(d,t,m,y);w=o-g|0;x=h-(da+(g>>>0>o>>>0)|0)|0;h=w;i=H[f+16>>2];g=i-e|0;u=H[f+20>>2]-((e>>>0>i>>>0)+u|0)|0;k=H[f+32>>2];i=k-b|0;w=H[f+36>>2]-((b>>>0>k>>>0)+p|0)|0;b=Rj(g,u,i,w);o=h+b|0;h=da+x|0;h=b>>>0>o>>>0?h+1|0:h;b=l;l=d;p=t;k=H[f+48>>2];e=H[f+72>>2];d=k-e|0;t=H[f+76>>2];x=H[f+52>>2]-(t+(e>>>0>k>>>0)|0)|0;l=Rj(l,p,d,x);k=b+l|0;b=da+q|0;b=k>>>0>>0?b+1|0:b;l=H[f+24>>2];p=l-e|0;e=H[f+28>>2]-((e>>>0>l>>>0)+t|0)|0;q=Rj(p,e,i,w);l=k-q|0;q=b-(da+(k>>>0>>0)|0)|0;b=Rj(g,u,d,x);d=r-b|0;b=s-(da+(b>>>0>r>>>0)|0)|0;s=Rj(p,e,m,y);r=s+d|0;b=da+b|0;s=r>>>0>>0?b+1|0:b;uc(f+80|0);b=H[f+88>>2];if((b|0)!=-1){continue}break}b=s>>31;e=b^r;d=e-b|0;b=(b^s)-((b>>>0>e>>>0)+b|0)|0;n=-1;e=2147483647;m=q>>31;g=m;i=g^l;j=i-g|0;m=(g^q)-((i>>>0>>0)+g|0)|0;i=m;k=j^-1;g=i^2147483647;m=h;e:{f:{if(!H[a+28>>2]){if((b|0)==(g|0)&d>>>0>k>>>0|b>>>0>g>>>0){break e}b=b+i|0;a=d+j|0;b=a>>>0>>0?b+1|0:b;e=a;g=h;a=g>>31;d=a;n=d^o;a=n-d|0;h=a;d=(d^g)-((d>>>0>n>>>0)+d|0)|0;a=a+e|0;d=d^2147483647;h=(d|0)==(b|0)&(h^-1)>>>0>>0|b>>>0>d>>>0;a=h?-1:a;if(!(h&0)&(a|0)<=536870912|(a|0)<536870912){break e}b=0;a=a>>>29|0;break f}g:{if((b|0)==(g|0)&d>>>0>k>>>0|b>>>0>g>>>0){break g}b=b+i|0;a=d+j|0;b=a>>>0>>0?b+1|0:b;k=h;h=h>>31;g=h;i=g^o;h=i-g|0;j=(g^k)-((g>>>0>i>>>0)+g|0)|0;g=j^2147483647;d=a;a=h;if((g|0)==(b|0)&d>>>0>(a^-1)>>>0|b>>>0>g>>>0){break g}b=b+j|0;n=a+d|0;b=n>>>0>>0?b+1|0:b;e=b;if(!b&n>>>0<536870913){break e}}b=e>>>29|0;a=(e&536870911)<<3|n>>>29}o=Sj(o,m,a,b);l=Sj(l,q,a,b);r=Sj(r,s,a,b)}H[c+8>>2]=o;H[c+4>>2]=l;H[c>>2]=r;ca=f+96|0;return}Ca();v()}Ca();v()}Ca();v()}function Wd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:{if((b|0)<0){break a}c=H[a+12>>2];d=H[a+8>>2];if(c-d>>2>>>0<=b>>>0){break a}d=d+(b<<2)|0;e=H[d>>2];i=H[e+60>>2];f=H[e+56>>2];e=d+4|0;if((e|0)!=(c|0)){while(1){h=H[e>>2];H[e>>2]=0;g=H[d>>2];H[d>>2]=h;if(g){Ga(g)}d=d+4|0;e=e+4|0;if((e|0)!=(c|0)){continue}break}c=H[a+12>>2]}if((c|0)!=(d|0)){while(1){c=c-4|0;e=H[c>>2];H[c>>2]=0;if(e){Ga(e)}if((c|0)!=(d|0)){continue}break}}H[a+12>>2]=d;g=H[a+4>>2];b:{if(!g|(i|0)<0){break b}c=H[g+24>>2];d=H[g+28>>2];if((c|0)==(d|0)){break b}while(1){if((i|0)==H[H[c>>2]+24>>2]){d=c+4|0;i=H[g+28>>2];if((d|0)!=(i|0)){while(1){h=H[d>>2];H[d>>2]=0;e=H[c>>2];H[c>>2]=h;if(e){Ra(e+12|0,H[e+16>>2]);Qa(e,H[e+4>>2]);oa(e)}c=c+4|0;d=d+4|0;if((i|0)!=(d|0)){continue}break}d=H[g+28>>2]}if((c|0)!=(d|0)){while(1){d=d-4|0;e=H[d>>2];H[d>>2]=0;if(e){Ra(e+12|0,H[e+16>>2]);Qa(e,H[e+4>>2]);oa(e)}if((c|0)!=(d|0)){continue}break}}H[g+28>>2]=c;break b}c=c+4|0;if((d|0)!=(c|0)){continue}break}}c:{if((f|0)>4){break c}d:{e=N(f,12)+a|0;c=H[e+20>>2];d=H[e+24>>2];if((c|0)==(d|0)){break d}while(1){if(H[c>>2]==(b|0)){break d}c=c+4|0;if((d|0)!=(c|0)){continue}break}break c}if((c|0)==(d|0)){break c}f=c;c=c+4|0;va(f,c,d-c|0);H[e+24>>2]=d-4}c=H[a+24>>2];d=H[a+20>>2];e:{if((c|0)==(d|0)){break e}e=c-d|0;c=e>>2;g=c>>>0<=1?1:c;i=g&1;c=0;if(e>>>0>=8){g=g&-2;e=0;while(1){f=c<<2;h=f+d|0;j=H[h>>2];if((j|0)>(b|0)){H[h>>2]=j-1}f=d+(f|4)|0;h=H[f>>2];if((h|0)>(b|0)){H[f>>2]=h-1}c=c+2|0;e=e+2|0;if((g|0)!=(e|0)){continue}break}}if(!i){break e}c=d+(c<<2)|0;d=H[c>>2];if((d|0)<=(b|0)){break e}H[c>>2]=d-1}c=H[a+36>>2];d=H[a+32>>2];f:{if((c|0)==(d|0)){break f}e=c-d|0;c=e>>2;g=c>>>0<=1?1:c;i=g&1;c=0;if(e>>>0>=8){g=g&-2;e=0;while(1){f=c<<2;h=f+d|0;j=H[h>>2];if((j|0)>(b|0)){H[h>>2]=j-1}f=d+(f|4)|0;h=H[f>>2];if((h|0)>(b|0)){H[f>>2]=h-1}c=c+2|0;e=e+2|0;if((g|0)!=(e|0)){continue}break}}if(!i){break f}c=d+(c<<2)|0;d=H[c>>2];if((d|0)<=(b|0)){break f}H[c>>2]=d-1}c=H[a+48>>2];d=H[a+44>>2];g:{if((c|0)==(d|0)){break g}e=c-d|0;c=e>>2;g=c>>>0<=1?1:c;i=g&1;c=0;if(e>>>0>=8){g=g&-2;e=0;while(1){f=c<<2;h=f+d|0;j=H[h>>2];if((j|0)>(b|0)){H[h>>2]=j-1}f=d+(f|4)|0;h=H[f>>2];if((h|0)>(b|0)){H[f>>2]=h-1}c=c+2|0;e=e+2|0;if((g|0)!=(e|0)){continue}break}}if(!i){break g}c=d+(c<<2)|0;d=H[c>>2];if((d|0)<=(b|0)){break g}H[c>>2]=d-1}c=H[a+60>>2];d=H[a+56>>2];h:{if((c|0)==(d|0)){break h}e=c-d|0;c=e>>2;g=c>>>0<=1?1:c;i=g&1;c=0;if(e>>>0>=8){g=g&-2;e=0;while(1){f=c<<2;h=f+d|0;j=H[h>>2];if((j|0)>(b|0)){H[h>>2]=j-1}f=d+(f|4)|0;h=H[f>>2];if((h|0)>(b|0)){H[f>>2]=h-1}c=c+2|0;e=e+2|0;if((g|0)!=(e|0)){continue}break}}if(!i){break h}c=d+(c<<2)|0;d=H[c>>2];if((d|0)<=(b|0)){break h}H[c>>2]=d-1}c=H[a+72>>2];a=H[a+68>>2];if((c|0)==(a|0)){break a}d=c-a|0;c=d>>2;e=c>>>0<=1?1:c;g=e&1;c=0;if(d>>>0>=8){d=e&-2;e=0;while(1){i=c<<2;f=i+a|0;h=H[f>>2];if((h|0)>(b|0)){H[f>>2]=h-1}i=a+(i|4)|0;f=H[i>>2];if((f|0)>(b|0)){H[i>>2]=f-1}c=c+2|0;e=e+2|0;if((d|0)!=(e|0)){continue}break}}if(!g){break a}f=b;a=a+(c<<2)|0;b=H[a>>2];if((f|0)>=(b|0)){break a}H[a>>2]=b-1}}function oa(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:{if(!a){break a}d=a-8|0;b=H[a-4>>2];a=b&-8;f=d+a|0;b:{if(b&1){break b}if(!(b&3)){break a}b=H[d>>2];d=d-b|0;if(d>>>0>>0<=255){e=H[d+8>>2];b=b>>>3|0;c=H[d+12>>2];if((c|0)==(e|0)){i=17192,j=H[4298]&Vj(b),H[i>>2]=j;break b}H[e+12>>2]=c;H[c+8>>2]=e;break b}h=H[d+24>>2];b=H[d+12>>2];c:{if((d|0)!=(b|0)){c=H[d+8>>2];H[c+12>>2]=b;H[b+8>>2]=c;break c}d:{e=d+20|0;c=H[e>>2];if(c){break d}e=d+16|0;c=H[e>>2];if(c){break d}b=0;break c}while(1){g=e;b=c;e=b+20|0;c=H[e>>2];if(c){continue}e=b+16|0;c=H[b+16>>2];if(c){continue}break}H[g>>2]=0}if(!h){break b}e=H[d+28>>2];c=(e<<2)+17496|0;e:{if(H[c>>2]==(d|0)){H[c>>2]=b;if(b){break e}i=17196,j=H[4299]&Vj(e),H[i>>2]=j;break b}H[h+(H[h+16>>2]==(d|0)?16:20)>>2]=b;if(!b){break b}}H[b+24>>2]=h;c=H[d+16>>2];if(c){H[b+16>>2]=c;H[c+24>>2]=b}c=H[d+20>>2];if(!c){break b}H[b+20>>2]=c;H[c+24>>2]=b;break b}b=H[f+4>>2];if((b&3)!=3){break b}H[4300]=a;H[f+4>>2]=b&-2;H[d+4>>2]=a|1;H[a+d>>2]=a;return}if(d>>>0>=f>>>0){break a}b=H[f+4>>2];if(!(b&1)){break a}f:{if(!(b&2)){if(H[4304]==(f|0)){H[4304]=d;a=H[4301]+a|0;H[4301]=a;H[d+4>>2]=a|1;if(H[4303]!=(d|0)){break a}H[4300]=0;H[4303]=0;return}if(H[4303]==(f|0)){H[4303]=d;a=H[4300]+a|0;H[4300]=a;H[d+4>>2]=a|1;H[a+d>>2]=a;return}a=(b&-8)+a|0;g:{if(b>>>0<=255){e=H[f+8>>2];b=b>>>3|0;c=H[f+12>>2];if((c|0)==(e|0)){i=17192,j=H[4298]&Vj(b),H[i>>2]=j;break g}H[e+12>>2]=c;H[c+8>>2]=e;break g}h=H[f+24>>2];b=H[f+12>>2];h:{if((f|0)!=(b|0)){c=H[f+8>>2];H[c+12>>2]=b;H[b+8>>2]=c;break h}i:{e=f+20|0;c=H[e>>2];if(c){break i}e=f+16|0;c=H[e>>2];if(c){break i}b=0;break h}while(1){g=e;b=c;e=b+20|0;c=H[e>>2];if(c){continue}e=b+16|0;c=H[b+16>>2];if(c){continue}break}H[g>>2]=0}if(!h){break g}e=H[f+28>>2];c=(e<<2)+17496|0;j:{if(H[c>>2]==(f|0)){H[c>>2]=b;if(b){break j}i=17196,j=H[4299]&Vj(e),H[i>>2]=j;break g}H[h+(H[h+16>>2]==(f|0)?16:20)>>2]=b;if(!b){break g}}H[b+24>>2]=h;c=H[f+16>>2];if(c){H[b+16>>2]=c;H[c+24>>2]=b}c=H[f+20>>2];if(!c){break g}H[b+20>>2]=c;H[c+24>>2]=b}H[d+4>>2]=a|1;H[a+d>>2]=a;if(H[4303]!=(d|0)){break f}H[4300]=a;return}H[f+4>>2]=b&-2;H[d+4>>2]=a|1;H[a+d>>2]=a}if(a>>>0<=255){b=(a&-8)+17232|0;c=H[4298];a=1<<(a>>>3);k:{if(!(c&a)){H[4298]=a|c;a=b;break k}a=H[b+8>>2]}H[b+8>>2]=d;H[a+12>>2]=d;H[d+12>>2]=b;H[d+8>>2]=a;return}e=31;if(a>>>0<=16777215){b=Q(a>>>8|0);e=((a>>>38-b&1)-(b<<1)|0)+62|0}H[d+28>>2]=e;H[d+16>>2]=0;H[d+20>>2]=0;g=(e<<2)+17496|0;l:{m:{c=H[4299];b=1<>2]=d;H[d+24>>2]=g;break n}e=a<<((e|0)!=31?25-(e>>>1|0)|0:0);b=H[g>>2];while(1){c=b;if((H[b+4>>2]&-8)==(a|0)){break m}b=e>>>29|0;e=e<<1;g=c+(b&4)|0;b=H[g+16>>2];if(b){continue}break}H[g+16>>2]=d;H[d+24>>2]=c}H[d+12>>2]=d;H[d+8>>2]=d;break l}a=H[c+8>>2];H[a+12>>2]=d;H[c+8>>2]=d;H[d+24>>2]=0;H[d+12>>2]=c;H[d+8>>2]=a}a=H[4306]-1|0;H[4306]=a?a:-1}}function tj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;H[a+8>>2]=e;n=a+32|0;h=H[n>>2];f=H[a+36>>2]-h>>2;a:{if(f>>>0>>0){ya(n,e-f|0);d=H[a+8>>2];break a}d=e;if(d>>>0>=f>>>0){break a}H[a+36>>2]=h+(e<<2);d=e}s=H[a+52>>2];p=H[a+48>>2];f=0;h=e>>>0>1073741823?-1:e<<2;m=ra(pa(h),0,h);b:{if((d|0)<=0){break b}g=H[a+32>>2];while(1){d=f<<2;h=H[d+m>>2];j=H[a+16>>2];c:{if((h|0)>(j|0)){H[d+g>>2]=j;break c}d=d+g|0;j=H[a+12>>2];if((j|0)>(h|0)){H[d>>2]=j;break c}H[d>>2]=h}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}if((d|0)<=0){break b}f=0;while(1){h=f<<2;d=h+c|0;h=H[b+h>>2]+H[g+h>>2]|0;H[d>>2]=h;d:{if((h|0)>H[a+16>>2]){i=h-H[a+20>>2]|0}else{if((h|0)>=H[a+12>>2]){break d}i=h+H[a+20>>2]|0}H[d>>2]=i}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}}f=H[a+56>>2];q=H[f>>2];f=H[f+4>>2]-q|0;if((f|0)>=5){o=f>>>2|0;t=o>>>0<=2?2:o;u=e&-2;w=e&1;h=1;while(1){e:{f:{if((h|0)!=(o|0)){r=N(e,h);f=H[(h<<2)+q>>2];if((f|0)==-1){break f}f=H[H[p+12>>2]+(f<<2)>>2];if((f|0)==-1){break f}j=H[s>>2];g=H[p>>2];k=H[j+(H[g+(f<<2)>>2]<<2)>>2];i=f+1|0;i=(i>>>0)%3|0?i:f-2|0;if((i|0)!=-1){i=H[g+(i<<2)>>2]}else{i=-1}g:{h:{if((f>>>0)%3|0){f=f-1|0;break h}f=f+2|0;l=-1;if((f|0)==-1){break g}}l=H[g+(f<<2)>>2]}if((h|0)<=(k|0)){break f}f=H[(i<<2)+j>>2];if((f|0)>=(h|0)){break f}g=H[j+(l<<2)>>2];if((g|0)>=(h|0)){break f}i:{if((e|0)<=0){break i}g=N(e,g);j=N(e,f);k=N(e,k);f=0;l=0;if((e|0)!=1){while(1){H[(f<<2)+m>>2]=(H[(f+g<<2)+c>>2]+H[(f+j<<2)+c>>2]|0)-H[(f+k<<2)+c>>2];i=f|1;H[(i<<2)+m>>2]=(H[(g+i<<2)+c>>2]+H[(j+i<<2)+c>>2]|0)-H[(i+k<<2)+c>>2];f=f+2|0;l=l+2|0;if((u|0)!=(l|0)){continue}break}}if(!w){break i}H[(f<<2)+m>>2]=(H[(f+g<<2)+c>>2]+H[(f+j<<2)+c>>2]|0)-H[(f+k<<2)+c>>2]}if((d|0)<=0){break e}j=H[n>>2];f=0;while(1){d=f<<2;g=H[d+m>>2];k=H[a+16>>2];j:{if((g|0)>(k|0)){H[d+j>>2]=k;break j}d=d+j|0;k=H[a+12>>2];if((k|0)>(g|0)){H[d>>2]=k;break j}H[d>>2]=g}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}f=0;if((d|0)<=0){break e}d=r<<2;k=d+c|0;i=b+d|0;while(1){g=f<<2;d=g+k|0;g=H[g+i>>2]+H[g+j>>2]|0;H[d>>2]=g;k:{if((g|0)>H[a+16>>2]){l=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break k}l=g+H[a+20>>2]|0}H[d>>2]=l}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}break e}Ca();v()}if((d|0)<=0){break e}k=(N(h-1|0,e)<<2)+c|0;j=H[n>>2];f=0;while(1){d=f<<2;g=H[d+k>>2];i=H[a+16>>2];l:{if((g|0)>(i|0)){H[d+j>>2]=i;break l}d=d+j|0;i=H[a+12>>2];if((i|0)>(g|0)){H[d>>2]=i;break l}H[d>>2]=g}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}f=0;if((d|0)<=0){break e}d=r<<2;k=d+c|0;i=b+d|0;while(1){g=f<<2;d=g+k|0;g=H[g+i>>2]+H[g+j>>2]|0;H[d>>2]=g;m:{if((g|0)>H[a+16>>2]){l=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break m}l=g+H[a+20>>2]|0}H[d>>2]=l}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}}h=h+1|0;if((t|0)!=(h|0)){continue}break}}oa(m);return 1}function we(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((b|0)==-1){return 1}g=(b>>>0)/3|0;if(!(H[H[a+24>>2]+(g>>>3&268435452)>>2]>>>g&1)){e=H[a+48>>2];H[a+52>>2]=e;a:{if((e|0)!=H[a+56>>2]){H[e>>2]=b;H[a+52>>2]=e+4;break a}d=pa(4);H[d>>2]=b;c=d+4|0;H[a+56>>2]=c;H[a+52>>2]=c;H[a+48>>2]=d;if(!e){break a}oa(e)}c=b+1|0;i=(c>>>0)%3|0?c:b-2|0;c=H[H[a+4>>2]+28>>2];k=H[(i<<2)+c>>2];if((k|0)==-1){return 0}e=(b-N(g,3)|0?-1:2)+b|0;j=H[c+(e<<2)>>2];if((j|0)==-1){return 0}b=H[a+36>>2];g=b+(k>>>3&536870908)|0;d=H[g>>2];c=1<>2]=c|d;Ua(a+8|0,k,i);b=H[a+36>>2]}d=(j>>>3&536870908)+b|0;c=H[d>>2];b=1<>2]=b|c;Ua(a+8|0,j,e)}f=H[a+52>>2];if((f|0)==H[a+48>>2]){return 1}k=a+8|0;while(1){b:{c:{f=f-4|0;b=H[f>>2];if((b|0)==-1){break c}c=(b>>>0)/3|0;g=H[a+24>>2]+(c>>>3&268435452)|0;d=H[g>>2];c=1<>2]=c|d;h=H[a+4>>2];c=H[H[h+28>>2]+(b<<2)>>2];if((c|0)==-1){return 0}while(1){d=b;d:{e:{j=H[a+36>>2]+(c>>>3&536870908)|0;i=H[j>>2];e=1<>2]+(c<<2)>>2];g:{if((g|0)==-1){break g}b=g+1|0;b=(b>>>0)%3|0?b:g-2|0;if((b|0)==-1|H[H[h>>2]+(b>>>3&536870908)>>2]>>>b&1){break g}g=H[H[H[h+64>>2]+12>>2]+(b<<2)>>2];if((g|0)!=-1){break f}}H[j>>2]=e|i;Ua(k,c,d);h=H[a+4>>2];break e}H[j>>2]=e|i;Ua(k,c,d);h=H[a+4>>2];b=g+1|0;if((((b>>>0)%3|0?b:g-2|0)|0)==-1){break e}b=-1;h:{if((d|0)==-1){break h}c=d+1|0;c=(c>>>0)%3|0?c:d-2|0;if((c|0)==-1|H[H[h>>2]+(c>>>3&536870908)>>2]>>>c&1){break h}b=H[H[H[h+64>>2]+12>>2]+(c<<2)>>2]}c=(b>>>0)/3|0;d=1<>2];e=c>>>5|0;j=H[f+(e<<2)>>2];break d}i:{j:{if((d|0)==-1){break j}c=-1;b=d+1|0;b=(b>>>0)%3|0?b:d-2|0;if(!((b|0)==-1|H[H[h>>2]+(b>>>3&536870908)>>2]>>>b&1)){c=H[H[H[h+64>>2]+12>>2]+(b<<2)>>2]}k:{l:{if((d>>>0)%3|0){f=d-1|0;break l}f=d+2|0;b=-1;if((f|0)==-1){break k}}b=-1;if(H[H[h>>2]+(f>>>3&536870908)>>2]>>>f&1){break k}b=H[H[H[h+64>>2]+12>>2]+(f<<2)>>2]}g=(b|0)==-1;i=g?-1:(b>>>0)/3|0;if((c|0)!=-1){f=H[a+24>>2];d=(c>>>0)/3|0;e=d>>>5|0;j=H[f+(e<<2)>>2];d=1<>2];e=i>>>5|0;j=H[f+(e<<2)>>2];if(!(d&j)){break d}}f=H[a+52>>2]-4|0;H[a+52>>2]=f;break b}if(g){b=c;break d}if(H[(i>>>3&536870908)+f>>2]>>>i&1){b=c;break d}h=H[a+52>>2];H[h-4>>2]=b;if(H[a+56>>2]!=(h|0)){H[h>>2]=c;f=h+4|0;break c}m:{i=H[a+48>>2];e=h-i|0;g=e>>2;d=g+1|0;if(d>>>0<1073741824){b=e>>>1|0;e=e>>>0>=2147483644?1073741823:b>>>0>d>>>0?b:d;if(e){if(e>>>0>=1073741824){break m}d=pa(e<<2)}else{d=0}b=d+(g<<2)|0;H[b>>2]=c;f=b+4|0;if((h|0)!=(i|0)){while(1){b=b-4|0;h=h-4|0;H[b>>2]=H[h>>2];if((h|0)!=(i|0)){continue}break}}H[a+56>>2]=d+(e<<2);H[a+52>>2]=f;H[a+48>>2]=b;if(!i){break b}oa(i);f=H[a+52>>2];break b}sa();v()}wa();v()}H[(e<<2)+f>>2]=d|j;c=H[H[h+28>>2]+(b<<2)>>2];if((c|0)!=-1){continue}break}return 0}H[a+52>>2]=f}if(H[a+48>>2]!=(f|0)){continue}break}}return 1}function Lj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;H[a+8>>2]=e;m=a+32|0;h=H[m>>2];f=H[a+36>>2]-h>>2;a:{if(f>>>0>>0){ya(m,e-f|0);d=H[a+8>>2];break a}d=e;if(d>>>0>=f>>>0){break a}H[a+36>>2]=h+(e<<2);d=e}s=H[a+52>>2];n=H[a+48>>2];f=0;h=e>>>0>1073741823?-1:e<<2;l=ra(pa(h),0,h);b:{if((d|0)<=0){break b}g=H[a+32>>2];while(1){d=f<<2;h=H[d+l>>2];i=H[a+16>>2];c:{if((h|0)>(i|0)){H[d+g>>2]=i;break c}d=d+g|0;i=H[a+12>>2];if((i|0)>(h|0)){H[d>>2]=i;break c}H[d>>2]=h}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}if((d|0)<=0){break b}f=0;while(1){h=f<<2;d=h+c|0;h=H[b+h>>2]+H[g+h>>2]|0;H[d>>2]=h;d:{if((h|0)>H[a+16>>2]){h=h-H[a+20>>2]|0}else{if((h|0)>=H[a+12>>2]){break d}h=h+H[a+20>>2]|0}H[d>>2]=h}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}}f=H[a+56>>2];q=H[f>>2];f=H[f+4>>2]-q|0;if((f|0)>=5){o=f>>>2|0;t=o>>>0<=2?2:o;u=e&-2;w=e&1;h=1;while(1){e:{f:{if((h|0)!=(o|0)){r=N(e,h);f=H[(h<<2)+q>>2];if((f|0)==-1|H[H[n>>2]+(f>>>3&536870908)>>2]>>>f&1){break f}f=H[H[H[n+64>>2]+12>>2]+(f<<2)>>2];if((f|0)==-1){break f}i=H[s>>2];g=H[n+28>>2];k=H[i+(H[g+(f<<2)>>2]<<2)>>2];if((k|0)>=(h|0)){break f}j=f+1|0;j=H[i+(H[g+(((j>>>0)%3|0?j:f-2|0)<<2)>>2]<<2)>>2];if((j|0)>=(h|0)){break f}f=H[i+(H[g+(f+((f>>>0)%3|0?-1:2)<<2)>>2]<<2)>>2];if((f|0)>=(h|0)){break f}g:{if((e|0)<=0){break g}g=N(e,f);i=N(e,j);k=N(e,k);f=0;p=0;if((e|0)!=1){while(1){H[(f<<2)+l>>2]=(H[(f+g<<2)+c>>2]+H[(f+i<<2)+c>>2]|0)-H[(f+k<<2)+c>>2];j=f|1;H[(j<<2)+l>>2]=(H[(g+j<<2)+c>>2]+H[(i+j<<2)+c>>2]|0)-H[(k+j<<2)+c>>2];f=f+2|0;p=p+2|0;if((u|0)!=(p|0)){continue}break}}if(!w){break g}H[(f<<2)+l>>2]=(H[(f+g<<2)+c>>2]+H[(f+i<<2)+c>>2]|0)-H[(f+k<<2)+c>>2]}if((d|0)<=0){break e}i=H[m>>2];f=0;while(1){d=f<<2;g=H[d+l>>2];k=H[a+16>>2];h:{if((g|0)>(k|0)){H[d+i>>2]=k;break h}d=d+i|0;k=H[a+12>>2];if((k|0)>(g|0)){H[d>>2]=k;break h}H[d>>2]=g}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}f=0;if((d|0)<=0){break e}d=r<<2;k=d+c|0;j=b+d|0;while(1){g=f<<2;d=g+k|0;g=H[g+j>>2]+H[g+i>>2]|0;H[d>>2]=g;i:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break i}g=g+H[a+20>>2]|0}H[d>>2]=g}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}break e}Ca();v()}if((d|0)<=0){break e}k=(N(h-1|0,e)<<2)+c|0;i=H[m>>2];f=0;while(1){d=f<<2;g=H[d+k>>2];j=H[a+16>>2];j:{if((g|0)>(j|0)){H[d+i>>2]=j;break j}d=d+i|0;j=H[a+12>>2];if((j|0)>(g|0)){H[d>>2]=j;break j}H[d>>2]=g}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}f=0;if((d|0)<=0){break e}d=r<<2;k=d+c|0;j=b+d|0;while(1){g=f<<2;d=g+k|0;g=H[g+j>>2]+H[g+i>>2]|0;H[d>>2]=g;k:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break k}g=g+H[a+20>>2]|0}H[d>>2]=g}d=H[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}}h=h+1|0;if((t|0)!=(h|0)){continue}break}}oa(l);return 1}function Gb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=O(0),k=0,l=0,m=O(0);i=H[c>>2];a:{b:{f=H[b+4>>2];if(!f){break b}g=Uj(f);c:{if(g>>>0>=2){e=i;if(f>>>0<=e>>>0){e=(i>>>0)%(f>>>0)|0}c=H[H[b>>2]+(e<<2)>>2];if(!c){break b}if(g>>>0<=1){break c}while(1){c=H[c>>2];if(!c){break b}g=H[c+4>>2];if((g|0)!=(i|0)){if(f>>>0<=g>>>0){g=(g>>>0)%(f>>>0)|0}if((e|0)!=(g|0)){break b}}if(H[c+8>>2]!=(i|0)){continue}break}b=0;break a}e=f-1&i;c=H[H[b>>2]+(e<<2)>>2];if(!c){break b}}h=f-1|0;while(1){c=H[c>>2];if(!c){break b}g=H[c+4>>2];if((g|0)!=(i|0)&(g&h)!=(e|0)){break b}if(H[c+8>>2]!=(i|0)){continue}break}b=0;break a}c=pa(16);d=H[H[d>>2]>>2];H[c+12>>2]=0;H[c+8>>2]=d;H[c+4>>2]=i;H[c>>2]=0;m=O(H[b+12>>2]+1>>>0);j=L[b+16>>2];d:{if(m>O(j*O(f>>>0))?0:f){break d}e=2;d=(f-1&f)!=0|f>>>0<3|f<<1;j=O(U(O(m/j)));e:{if(j=O(0)){g=~~j>>>0;break e}g=0}d=d>>>0>g>>>0?d:g;f:{if((d|0)==1){break f}if(!(d&d-1)){e=d;break f}e=Kd(d);f=H[b+4>>2]}g:{if(e>>>0<=f>>>0){if(e>>>0>=f>>>0){break g}g=f>>>0<3;j=O(U(O(O(K[b+12>>2])/L[b+16>>2])));h:{if(j=O(0)){d=~~j>>>0;break h}d=0}i:{j:{if(g){break j}if(Uj(f)>>>0>1){break j}d=d>>>0<2?d:1<<32-Q(d-1|0);break i}d=Kd(d)}e=d>>>0>>0?e:d;if(f>>>0<=e>>>0){break g}}f=0;g=0;h=e;k:{l:{m:{n:{if(e){if(h>>>0>=1073741824){break n}d=pa(h<<2);e=H[b>>2];H[b>>2]=d;if(e){oa(e)}H[b+4>>2]=h;d=0;if(h>>>0>=4){e=h&-4;while(1){k=d<<2;H[k+H[b>>2]>>2]=0;H[H[b>>2]+(k|4)>>2]=0;H[H[b>>2]+(k|8)>>2]=0;H[H[b>>2]+(k|12)>>2]=0;d=d+4|0;g=g+4|0;if((e|0)!=(g|0)){continue}break}}e=h&3;if(e){while(1){H[H[b>>2]+(d<<2)>>2]=0;d=d+1|0;f=f+1|0;if((e|0)!=(f|0)){continue}break}}e=H[b+8>>2];if(!e){break k}d=b+8|0;f=H[e+4>>2];g=Uj(h);if(g>>>0<2){break m}f=f>>>0>=h>>>0?(f>>>0)%(h>>>0)|0:f;H[H[b>>2]+(f<<2)>>2]=d;d=H[e>>2];if(!d){break k}if(g>>>0<=1){break l}while(1){g=H[d+4>>2];if(h>>>0<=g>>>0){g=(g>>>0)%(h>>>0)|0}o:{if((f|0)==(g|0)){e=d;break o}l=g<<2;k=l+H[b>>2]|0;if(!H[k>>2]){H[k>>2]=e;e=d;f=g;break o}H[e>>2]=H[d>>2];H[d>>2]=H[H[l+H[b>>2]>>2]>>2];H[H[l+H[b>>2]>>2]>>2]=d}d=H[e>>2];if(d){continue}break}break k}d=H[b>>2];H[b>>2]=0;if(d){oa(d)}H[b+4>>2]=0;break k}wa();v()}f=h-1&f;H[H[b>>2]+(f<<2)>>2]=d;d=H[e>>2];if(!d){break k}}k=h-1|0;while(1){g=k&H[d+4>>2];p:{if((g|0)==(f|0)){e=d;break p}l=g<<2;h=l+H[b>>2]|0;if(H[h>>2]){H[e>>2]=H[d>>2];H[d>>2]=H[H[l+H[b>>2]>>2]>>2];H[H[l+H[b>>2]>>2]>>2]=d;break p}H[h>>2]=e;e=d;f=g}d=H[e>>2];if(d){continue}break}}}f=H[b+4>>2];d=f-1|0;if(!(d&f)){e=d&i;break d}if(f>>>0>i>>>0){e=i;break d}e=(i>>>0)%(f>>>0)|0}e=H[b>>2]+(e<<2)|0;d=H[e>>2];q:{r:{if(!d){d=b+8|0;H[c>>2]=H[d>>2];H[b+8>>2]=c;H[e>>2]=d;d=H[c>>2];if(!d){break q}d=H[d+4>>2];e=f-1|0;s:{if(!(e&f)){d=d&e;break s}if(d>>>0>>0){break s}d=(d>>>0)%(f>>>0)|0}d=H[b>>2]+(d<<2)|0;break r}H[c>>2]=H[d>>2]}H[d>>2]=c}H[b+12>>2]=H[b+12>>2]+1;b=1}F[a+4|0]=b;H[a>>2]=c}function Oe(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;f=ca-80|0;ca=f;e=H[c+36>>2];H[f+72>>2]=H[c+32>>2];H[f+76>>2]=e;g=H[c+28>>2];e=f- -64|0;H[e>>2]=H[c+24>>2];H[e+4>>2]=g;e=H[c+20>>2];H[f+56>>2]=H[c+16>>2];H[f+60>>2]=e;e=H[c+12>>2];H[f+48>>2]=H[c+8>>2];H[f+52>>2]=e;e=H[c+4>>2];H[f+40>>2]=H[c>>2];H[f+44>>2]=e;nc(a,f+40|0,f+24|0);a:{if(H[a>>2]){break a}if(F[a+15|0]<0){oa(H[a+4>>2])}if(I[f+31|0]!=1){b=pa(32);F[b+20|0]=0;c=I[1448]|I[1449]<<8|(I[1450]<<16|I[1451]<<24);F[b+16|0]=c;F[b+17|0]=c>>>8;F[b+18|0]=c>>>16;F[b+19|0]=c>>>24;c=I[1444]|I[1445]<<8|(I[1446]<<16|I[1447]<<24);d=I[1440]|I[1441]<<8|(I[1442]<<16|I[1443]<<24);F[b+8|0]=d;F[b+9|0]=d>>>8;F[b+10|0]=d>>>16;F[b+11|0]=d>>>24;F[b+12|0]=c;F[b+13|0]=c>>>8;F[b+14|0]=c>>>16;F[b+15|0]=c>>>24;c=I[1436]|I[1437]<<8|(I[1438]<<16|I[1439]<<24);d=I[1432]|I[1433]<<8|(I[1434]<<16|I[1435]<<24);F[b|0]=d;F[b+1|0]=d>>>8;F[b+2|0]=d>>>16;F[b+3|0]=d>>>24;F[b+4|0]=c;F[b+5|0]=c>>>8;F[b+6|0]=c>>>16;F[b+7|0]=c>>>24;H[a>>2]=-1;za(a+4|0,b,20);oa(b);break a}i=ca-16|0;ca=i;b:{c:{switch(I[f+32|0]){case 0:e=Ke(pa(48));H[e>>2]=13112;H[f+8>>2]=0;H[f+12>>2]=0;H[f>>2]=0;H[f+4>>2]=0;H[f+16>>2]=e;break b;case 1:e=Ke(pa(52));H[e+48>>2]=0;H[e>>2]=11276;H[f+8>>2]=0;H[f+12>>2]=0;H[f>>2]=0;H[f+4>>2]=0;H[f+16>>2]=e;break b;default:break c}}g=pa(32);F[g+28|0]=0;e=I[1550]|I[1551]<<8|(I[1552]<<16|I[1553]<<24);F[g+24|0]=e;F[g+25|0]=e>>>8;F[g+26|0]=e>>>16;F[g+27|0]=e>>>24;e=I[1546]|I[1547]<<8|(I[1548]<<16|I[1549]<<24);h=I[1542]|I[1543]<<8|(I[1544]<<16|I[1545]<<24);F[g+16|0]=h;F[g+17|0]=h>>>8;F[g+18|0]=h>>>16;F[g+19|0]=h>>>24;F[g+20|0]=e;F[g+21|0]=e>>>8;F[g+22|0]=e>>>16;F[g+23|0]=e>>>24;e=I[1538]|I[1539]<<8|(I[1540]<<16|I[1541]<<24);h=I[1534]|I[1535]<<8|(I[1536]<<16|I[1537]<<24);F[g+8|0]=h;F[g+9|0]=h>>>8;F[g+10|0]=h>>>16;F[g+11|0]=h>>>24;F[g+12|0]=e;F[g+13|0]=e>>>8;F[g+14|0]=e>>>16;F[g+15|0]=e>>>24;e=I[1530]|I[1531]<<8|(I[1532]<<16|I[1533]<<24);h=I[1526]|I[1527]<<8|(I[1528]<<16|I[1529]<<24);F[g|0]=h;F[g+1|0]=h>>>8;F[g+2|0]=h>>>16;F[g+3|0]=h>>>24;F[g+4|0]=e;F[g+5|0]=e>>>8;F[g+6|0]=e>>>16;F[g+7|0]=e>>>24;H[i>>2]=-1;e=i|4;za(e,g,28);j=F[i+15|0];H[f>>2]=H[i>>2];h=f+4|0;d:{if((j|0)>=0){j=H[e+4>>2];H[h>>2]=H[e>>2];H[h+4>>2]=j;H[h+8>>2]=H[e+8>>2];H[f+16>>2]=0;break d}za(h,H[i+4>>2],H[i+8>>2]);e=F[i+15|0];H[f+16>>2]=0;if((e|0)>=0){break d}oa(H[i+4>>2])}oa(g)}ca=i+16|0;e=H[f>>2];e:{if(e){H[a>>2]=e;a=a+4|0;if(F[f+15|0]>=0){b=f|4;c=H[b+4>>2];H[a>>2]=H[b>>2];H[a+4>>2]=c;H[a+8>>2]=H[b+8>>2];break e}za(a,H[f+4>>2],H[f+8>>2]);break e}e=H[f+16>>2];H[f+16>>2]=0;H[e+44>>2]=d;te(a,e,b,c,d);if(!H[a>>2]){if(F[a+15|0]<0){oa(H[a+4>>2])}H[a>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;H[a+12>>2]=0}ea[H[H[e>>2]+4>>2]](e)}a=H[f+16>>2];H[f+16>>2]=0;if(a){ea[H[H[a>>2]+4>>2]](a)}if(F[f+15|0]>=0){break a}oa(H[f+4>>2])}ca=f+80|0}function Gc(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;j=N(b,12)+a|0;H[j+12>>2]=H[j+8>>2];m=(c|0)==-1?-1:(c>>>0)/3|0;d=1;k=c;a:{b:{c:{while(1){d:{l=d;if(!d){if((k|0)==-1){break d}if((de(a,((k>>>0)%3|0?-1:2)+k|0)|0)==-1){break a}c=k+1|0;d=(c>>>0)%3|0?c:k-2|0;if((d|0)==-1){break a}c=d+1|0;c=(c>>>0)%3|0?c:d-2|0;if((c|0)==-1){break a}d=H[H[H[a+4>>2]+12>>2]+(c<<2)>>2];if((d|0)==-1){break a}c=d+1|0;c=(c>>>0)%3|0?c:d-2|0;if((c|0)==-1){break a}m=(c>>>0)/3|0}e:{d=H[a+56>>2]+(m>>>3&536870908)|0;h=H[d>>2];e=1<>2]=e|h;d=H[j+12>>2];f:{if((d|0)!=H[j+16>>2]){H[d>>2]=m;H[j+12>>2]=d+4;break f}n=H[j+8>>2];h=d-n|0;e=h>>2;i=e+1|0;if(i>>>0>=1073741824){break c}g=h>>>1|0;i=h>>>0>=2147483644?1073741823:i>>>0>>0?g:i;if(i){if(i>>>0>=1073741824){break b}g=pa(i<<2)}else{g=0}h=g+(e<<2)|0;H[h>>2]=m;e=h+4|0;if((d|0)!=(n|0)){while(1){h=h-4|0;d=d-4|0;H[h>>2]=H[d>>2];if((d|0)!=(n|0)){continue}break}}H[j+8>>2]=h;H[j+12>>2]=e;H[j+16>>2]=g+(i<<2);if(!n){break f}oa(n)}g=f+1|0;g:{h:{i:{if(!f){break i}if(g&1){if((c|0)==-1){c=-1;break g}d=c+1|0;c=(d>>>0)%3|0?d:c-2|0;break i}k=l?k:c;if((c|0)==-1){c=-1;break g}if((c>>>0)%3|0){d=c-1|0;break h}c=c+2|0}d=c;c=-1;if((d|0)==-1){break g}}c=H[H[H[a+4>>2]+12>>2]+(d<<2)>>2];h=-1;f=-1;e=d+1|0;e=(e>>>0)%3|0?e:d-2|0;if((e|0)>=0){f=(e>>>0)/3|0;f=H[(H[H[a>>2]+96>>2]+N(f,12)|0)+(e-N(f,3)<<2)>>2]}j:{if((c|0)==-1){break j}i=((c>>>0)%3|0?-1:2)+c|0;if((i|0)<0){break j}e=(i>>>0)/3|0;h=H[(H[H[a>>2]+96>>2]+N(e,12)|0)+(i-N(e,3)<<2)>>2]}if((f|0)!=(h|0)){c=-1;break g}k:{l:{f=((d>>>0)%3|0?-1:2)+d|0;if((f|0)>=0){d=(f>>>0)/3|0;if((c|0)!=-1){break l}c=-1;break g}d=-1;if((c|0)!=-1){break k}c=-1;break g}d=H[(H[H[a>>2]+96>>2]+N(d,12)|0)+(f-N(d,3)<<2)>>2]}f=c+1|0;e=(f>>>0)%3|0?f:c-2|0;if((e|0)>=0){f=(e>>>0)/3|0;f=H[(H[H[a>>2]+96>>2]+N(f,12)|0)+(e-N(f,3)<<2)>>2]}else{f=-1}if((f|0)!=(d|0)){c=-1;break g}f=g;m=(c>>>0)/3|0;d=H[a+56>>2]+(m>>>3&268435452)|0;h=H[d>>2];e=1<>2]-4|0;g=H[l>>2];d=H[a+56>>2]+(g>>>3&536870908)|0;c=H[d>>2];o=d,p=Vj(g)&c,H[o>>2]=p;H[j+12>>2]=l;break a}d=0;if(l){continue}break a}break}k=-1;de(a,-1);break a}sa();v()}wa();v()}H[((b<<2)+a|0)+44>>2]=k;b=H[j+12>>2];i=H[j+8>>2];m:{if((b|0)==(i|0)){break m}c=b-i|0;b=c>>2;b=b>>>0<=1?1:b;k=b&1;e=H[a+56>>2];d=0;if(c>>>0>=8){f=b&-2;c=0;while(1){l=d<<2;g=H[l+i>>2];b=e+(g>>>3&536870908)|0;a=H[b>>2];o=b,p=Vj(g)&a,H[o>>2]=p;g=H[i+(l|4)>>2];b=e+(g>>>3&536870908)|0;a=H[b>>2];o=b,p=Vj(g)&a,H[o>>2]=p;d=d+2|0;c=c+2|0;if((f|0)!=(c|0)){continue}break}}if(!k){break m}c=H[i+(d<<2)>>2];b=e+(c>>>3&536870908)|0;a=H[b>>2];o=b,p=Vj(c)&a,H[o>>2]=p}}function Gj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;h=ca-32|0;ca=h;a:{if(J[b+38>>1]<=513){c=H[b+20>>2];f=H[b+12>>2];d=H[b+16>>2];if((c|0)>=(f|0)&d>>>0>=K[b+8>>2]|(c|0)>(f|0)){break a}f=I[d+H[b>>2]|0];d=d+1|0;c=d?c:c+1|0;H[b+16>>2]=d;H[b+20>>2]=c;if(f){break a}}b:{if(!Xa(1,h+28|0,b)){break b}d=H[h+28>>2];c=H[H[a+48>>2]+64>>2];if(d>>>0>H[c+4>>2]-H[c>>2]>>2>>>0){break b}c:{if(d){Wa(a+60|0,d);c=h+8|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;if(!ta(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|H[g>>2]}else{i=H[g>>2]&(f^-1)}H[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}if(!Xa(1,h+28|0,b)){break b}d=H[h+28>>2];c=H[H[a+48>>2]+64>>2];if(d>>>0>H[c+4>>2]-H[c>>2]>>2>>>0){break b}if(d){e=0;Wa(a+72|0,d);c=h+8|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;if(!ta(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|H[g>>2]}else{i=H[g>>2]&(f^-1)}H[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}if(!Xa(1,h+28|0,b)){break b}d=H[h+28>>2];c=H[H[a+48>>2]+64>>2];if(d>>>0>H[c+4>>2]-H[c>>2]>>2>>>0){break b}if(d){e=0;Wa(a+84|0,d);c=h+8|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;if(!ta(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|H[g>>2]}else{i=H[g>>2]&(f^-1)}H[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}if(!Xa(1,h+28|0,b)){break b}d=H[h+28>>2];c=H[H[a+48>>2]+64>>2];if(d>>>0>H[c+4>>2]-H[c>>2]>>2>>>0){break b}if(d){e=0;Wa(a+96|0,d);c=h+8|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;if(!ta(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|H[g>>2]}else{i=H[g>>2]&(f^-1)}H[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}e=0;c=H[b+8>>2];f=H[b+12>>2];d=c;c=H[b+20>>2];i=c;g=H[b+16>>2];j=g+4|0;c=j>>>0<4?c+1|0:c;if(d>>>0>>0&(c|0)>=(f|0)|(c|0)>(f|0)){break a}m=H[b>>2];k=m+g|0;l=I[k|0]|I[k+1|0]<<8|(I[k+2|0]<<16|I[k+3|0]<<24);H[b+16>>2]=j;H[b+20>>2]=c;k=d;d=f;c=i;f=g+8|0;c=f>>>0<8?c+1|0:c;if(f>>>0>k>>>0&(c|0)>=(d|0)|(c|0)>(d|0)){break a}d=j+m|0;d=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=f;H[b+20>>2]=c;if((d|0)<(l|0)){break a}H[a+16>>2]=d;H[a+12>>2]=l;c=(d>>31)-((l>>31)+(d>>>0>>0)|0)|0;b=d-l|0;if(!c&b>>>0>2147483646|c){break a}e=1;b=b+1|0;H[a+20>>2]=b;c=b>>>1|0;H[a+24>>2]=c;H[a+28>>2]=0-c;if(b&1){break a}H[a+24>>2]=c-1;break a}}e=0}ca=h+32|0;return e|0}function pj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;h=ca-32|0;ca=h;a:{if(J[b+38>>1]<=513){c=H[b+20>>2];f=H[b+12>>2];d=H[b+16>>2];if((c|0)>=(f|0)&d>>>0>=K[b+8>>2]|(c|0)>(f|0)){break a}f=I[d+H[b>>2]|0];d=d+1|0;c=d?c:c+1|0;H[b+16>>2]=d;H[b+20>>2]=c;if(f){break a}}b:{if(!Xa(1,h+28|0,b)){break b}d=H[h+28>>2];c=H[a+48>>2];if(d>>>0>H[c+4>>2]-H[c>>2]>>2>>>0){break b}c:{if(d){Wa(a+60|0,d);c=h+8|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;if(!ta(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|H[g>>2]}else{i=H[g>>2]&(f^-1)}H[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}if(!Xa(1,h+28|0,b)){break b}d=H[h+28>>2];c=H[a+48>>2];if(d>>>0>H[c+4>>2]-H[c>>2]>>2>>>0){break b}if(d){e=0;Wa(a+72|0,d);c=h+8|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;if(!ta(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|H[g>>2]}else{i=H[g>>2]&(f^-1)}H[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}if(!Xa(1,h+28|0,b)){break b}d=H[h+28>>2];c=H[a+48>>2];if(d>>>0>H[c+4>>2]-H[c>>2]>>2>>>0){break b}if(d){e=0;Wa(a+84|0,d);c=h+8|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;if(!ta(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|H[g>>2]}else{i=H[g>>2]&(f^-1)}H[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}if(!Xa(1,h+28|0,b)){break b}d=H[h+28>>2];c=H[a+48>>2];if(d>>>0>H[c+4>>2]-H[c>>2]>>2>>>0){break b}if(d){e=0;Wa(a+96|0,d);c=h+8|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;if(!ta(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|H[g>>2]}else{i=H[g>>2]&(f^-1)}H[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}e=0;c=H[b+8>>2];f=H[b+12>>2];d=c;c=H[b+20>>2];i=c;g=H[b+16>>2];j=g+4|0;c=j>>>0<4?c+1|0:c;if(d>>>0>>0&(c|0)>=(f|0)|(c|0)>(f|0)){break a}m=H[b>>2];k=m+g|0;l=I[k|0]|I[k+1|0]<<8|(I[k+2|0]<<16|I[k+3|0]<<24);H[b+16>>2]=j;H[b+20>>2]=c;k=d;d=f;c=i;f=g+8|0;c=f>>>0<8?c+1|0:c;if(f>>>0>k>>>0&(c|0)>=(d|0)|(c|0)>(d|0)){break a}d=j+m|0;d=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=f;H[b+20>>2]=c;if((d|0)<(l|0)){break a}H[a+16>>2]=d;H[a+12>>2]=l;c=(d>>31)-((l>>31)+(d>>>0>>0)|0)|0;b=d-l|0;if(!c&b>>>0>2147483646|c){break a}e=1;b=b+1|0;H[a+20>>2]=b;c=b>>>1|0;H[a+24>>2]=c;H[a+28>>2]=0-c;if(b&1){break a}H[a+24>>2]=c-1;break a}}e=0}ca=h+32|0;return e|0}function xe(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((b|0)==-1){return 1}g=(b>>>0)/3|0;if(!(H[H[a+24>>2]+(g>>>3&268435452)>>2]>>>g&1)){f=H[a+48>>2];H[a+52>>2]=f;a:{if((f|0)!=H[a+56>>2]){H[f>>2]=b;H[a+52>>2]=f+4;break a}d=pa(4);H[d>>2]=b;c=d+4|0;H[a+56>>2]=c;H[a+52>>2]=c;H[a+48>>2]=d;if(!f){break a}oa(f)}e=-1;d=H[a+4>>2];c=b+1|0;i=(c>>>0)%3|0?c:b-2|0;if((i|0)!=-1){e=H[H[d>>2]+(i<<2)>>2]}b:{h=b-N(g,3)|0;if(h){c=b-1|0;break b}c=b+2|0;if((c|0)!=-1){break b}return 0}if((e|0)==-1){return 0}j=H[H[d>>2]+(c<<2)>>2];if((j|0)==-1){return 0}c=H[a+36>>2];f=c+(e>>>3&536870908)|0;g=H[f>>2];d=1<>2]=d|g;Ua(a+8|0,e,i);c=H[a+36>>2]}g=(j>>>3&536870908)+c|0;d=H[g>>2];c=1<>2]=c|d;Ua(a+8|0,j,(h?-1:2)+b|0)}c=H[a+52>>2];if((c|0)==H[a+48>>2]){return 1}j=a+8|0;while(1){c:{d:{c=c-4|0;b=H[c>>2];if((b|0)==-1){break d}d=(b>>>0)/3|0;f=H[a+24>>2]+(d>>>3&268435452)|0;g=H[f>>2];d=1<>2]=d|g;while(1){i=H[a+4>>2];e=H[H[i>>2]+(b<<2)>>2];if((e|0)==-1){return 0}e:{f:{h=H[a+36>>2]+(e>>>3&536870908)|0;f=H[h>>2];g=1<>2]+(e<<2)>>2];h:{if((d|0)==-1){break h}c=d+1|0;c=(c>>>0)%3|0?c:d-2|0;if((c|0)==-1){break h}d=H[H[i+12>>2]+(c<<2)>>2];if((d|0)!=-1){break g}}H[h>>2]=f|g;Ua(j,e,b);break f}H[h>>2]=f|g;Ua(j,e,b);c=d+1|0;if((((c>>>0)%3|0?c:d-2|0)|0)==-1){break f}c=b-2|0;d=b+1|0;b=-1;c=(d>>>0)%3|0?d:c;if((c|0)!=-1){b=H[H[H[a+4>>2]+12>>2]+(c<<2)>>2]}c=(b>>>0)/3|0;d=1<>2];f=c>>>5|0;i=H[e+(f<<2)>>2];break e}c=-1;g=H[a+4>>2];d=b+1|0;d=(d>>>0)%3|0?d:b-2|0;if((d|0)!=-1){c=H[H[g+12>>2]+(d<<2)>>2]}i:{j:{if((b>>>0)%3|0){e=b-1|0;break j}e=b+2|0;b=-1;if((e|0)==-1){break i}}b=H[H[g+12>>2]+(e<<2)>>2]}g=(b|0)==-1;h=g?-1:(b>>>0)/3|0;k:{if((c|0)!=-1){e=H[a+24>>2];d=(c>>>0)/3|0;f=d>>>5|0;i=H[e+(f<<2)>>2];d=1<>2];f=h>>>5|0;i=H[e+(f<<2)>>2];if(!(d&i)){break e}}c=H[a+52>>2]-4|0;H[a+52>>2]=c;break c}if(g){b=c;break e}if(H[(h>>>3&536870908)+e>>2]>>>h&1){b=c;break e}e=H[a+52>>2];H[e-4>>2]=b;if(H[a+56>>2]!=(e|0)){H[e>>2]=c;c=e+4|0;break d}l:{h=H[a+48>>2];f=e-h|0;g=f>>2;d=g+1|0;if(d>>>0<1073741824){b=f>>>1|0;f=f>>>0>=2147483644?1073741823:b>>>0>d>>>0?b:d;if(f){if(f>>>0>=1073741824){break l}d=pa(f<<2)}else{d=0}b=d+(g<<2)|0;H[b>>2]=c;c=b+4|0;if((e|0)!=(h|0)){while(1){b=b-4|0;e=e-4|0;H[b>>2]=H[e>>2];if((e|0)!=(h|0)){continue}break}}H[a+56>>2]=d+(f<<2);H[a+52>>2]=c;H[a+48>>2]=b;if(!h){break c}oa(h);c=H[a+52>>2];break c}sa();v()}wa();v()}H[(f<<2)+e>>2]=d|i;if((b|0)!=-1){continue}break}return 0}H[a+52>>2]=c}if(H[a+48>>2]!=(c|0)){continue}break}}return 1}function uj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;g=ca-32|0;ca=g;H[a+68>>2]=f;d=H[a+56>>2];e=H[d>>2];d=H[d+4>>2];H[g+24>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;a:{d=d-e|0;if((d|0)>0){m=a+60|0;d=d>>>2|0;n=d>>>0<=1?1:d;o=a+112|0;while(1){e=H[a+56>>2];d=H[e>>2];if(H[e+4>>2]-d>>2>>>0<=j>>>0){break a}Nb(m,H[d+(j<<2)>>2],g+16|0);i=H[g+20>>2];d=i>>31;h=H[g+16>>2];e=h>>31;f=(d^i)-d+((e^h)-e)|0;k=H[g+24>>2];d=k>>31;e=(d^k)-d|0;d=0;l=e;e=e+f|0;d=l>>>0>e>>>0?1:d;b:{if(!(d|e)){H[g+16>>2]=H[a+108>>2];break b}f=H[a+108>>2];l=f>>31;h=Sj(Rj(f,l,h,h>>31),da,e,d);H[g+16>>2]=h;d=Sj(Rj(f,l,i,i>>31),da,e,d);H[g+20>>2]=d;e=d;d=d>>31;e=(e^d)-d|0;d=h>>31;d=e+((d^h)-d|0)|0;if((k|0)>=0){H[g+24>>2]=f-d;break b}H[g+24>>2]=d-f}d=Ba(o);f=H[g+16>>2];c:{if(d){H[g+24>>2]=0-H[g+24>>2];e=0-H[g+20>>2]|0;H[g+20>>2]=e;f=0-f|0;H[g+16>>2]=f;break c}e=H[g+20>>2]}d:{if((f|0)>=0){f=H[a+108>>2];d=f+H[g+24>>2]|0;f=e+f|0;break d}e:{if((e|0)<0){d=H[g+24>>2];f=d>>31;f=(d^f)-f|0;break e}d=H[g+24>>2];f=d>>31;f=H[a+100>>2]+(f-(d^f)|0)|0}if((d|0)<0){d=e>>31;d=(d^e)-d|0;break d}d=e>>31;d=H[a+100>>2]+(d-(d^e)|0)|0}e=H[a+100>>2];f:{if(!(d|f)){d=e;f=d;break f}if(!((d|0)!=(e|0)|f)){f=d;break f}if(!((e|0)!=(f|0)|d)){d=f;break f}g:{if(f){break g}i=H[a+108>>2];if((i|0)>=(d|0)){break g}d=(i<<1)-d|0;f=0;break f}h:{if((e|0)!=(f|0)){break h}i=H[a+108>>2];if((i|0)<=(d|0)){break h}d=(i<<1)-d|0;break f}i:{if((d|0)!=(e|0)){break i}e=H[a+108>>2];if((e|0)<=(f|0)){break i}f=(e<<1)-f|0;break f}if(d){break f}d=0;e=H[a+108>>2];if((e|0)>=(f|0)){break f}f=(e<<1)-f|0}H[g+12>>2]=d;H[g+8>>2]=f;j:{if(H[a+8>>2]<=0){break j}i=H[a+32>>2];f=0;while(1){d=f<<2;e=H[d+(g+8|0)>>2];h=H[a+16>>2];k:{if((e|0)>(h|0)){H[d+i>>2]=h;break k}d=d+i|0;h=H[a+12>>2];if((h|0)>(e|0)){H[d>>2]=h;break k}H[d>>2]=e}f=f+1|0;e=H[a+8>>2];if((f|0)<(e|0)){continue}break}d=0;if((e|0)<=0){break j}e=j<<3;h=e+c|0;k=b+e|0;while(1){f=d<<2;e=f+h|0;f=H[f+k>>2]+H[f+i>>2]|0;H[e>>2]=f;l:{if((f|0)>H[a+16>>2]){f=f-H[a+20>>2]|0}else{if((f|0)>=H[a+12>>2]){break l}f=f+H[a+20>>2]|0}H[e>>2]=f}d=d+1|0;if((d|0)>2]){continue}break}}j=j+1|0;if((n|0)!=(j|0)){continue}break}}ca=g+32|0;return 1}Ca();v()}function dj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;g=ca-32|0;ca=g;H[a+68>>2]=f;d=H[a+56>>2];e=H[d>>2];d=H[d+4>>2];H[g+24>>2]=0;H[g+16>>2]=0;H[g+20>>2]=0;a:{d=d-e|0;if((d|0)>0){m=a+60|0;d=d>>>2|0;n=d>>>0<=1?1:d;o=a+112|0;while(1){e=H[a+56>>2];d=H[e>>2];if(H[e+4>>2]-d>>2>>>0<=j>>>0){break a}Lb(m,H[d+(j<<2)>>2],g+16|0);i=H[g+20>>2];d=i>>31;h=H[g+16>>2];e=h>>31;f=(d^i)-d+((e^h)-e)|0;k=H[g+24>>2];d=k>>31;e=(d^k)-d|0;d=0;l=e;e=e+f|0;d=l>>>0>e>>>0?1:d;b:{if(!(d|e)){H[g+16>>2]=H[a+108>>2];break b}f=H[a+108>>2];l=f>>31;h=Sj(Rj(f,l,h,h>>31),da,e,d);H[g+16>>2]=h;d=Sj(Rj(f,l,i,i>>31),da,e,d);H[g+20>>2]=d;e=d;d=d>>31;e=(e^d)-d|0;d=h>>31;d=e+((d^h)-d|0)|0;if((k|0)>=0){H[g+24>>2]=f-d;break b}H[g+24>>2]=d-f}d=Ba(o);f=H[g+16>>2];c:{if(d){H[g+24>>2]=0-H[g+24>>2];e=0-H[g+20>>2]|0;H[g+20>>2]=e;f=0-f|0;H[g+16>>2]=f;break c}e=H[g+20>>2]}d:{if((f|0)>=0){f=H[a+108>>2];d=f+H[g+24>>2]|0;f=e+f|0;break d}e:{if((e|0)<0){d=H[g+24>>2];f=d>>31;f=(d^f)-f|0;break e}d=H[g+24>>2];f=d>>31;f=H[a+100>>2]+(f-(d^f)|0)|0}if((d|0)<0){d=e>>31;d=(d^e)-d|0;break d}d=e>>31;d=H[a+100>>2]+(d-(d^e)|0)|0}e=H[a+100>>2];f:{if(!(d|f)){d=e;f=d;break f}if(!((d|0)!=(e|0)|f)){f=d;break f}if(!((e|0)!=(f|0)|d)){d=f;break f}g:{if(f){break g}i=H[a+108>>2];if((i|0)>=(d|0)){break g}d=(i<<1)-d|0;f=0;break f}h:{if((e|0)!=(f|0)){break h}i=H[a+108>>2];if((i|0)<=(d|0)){break h}d=(i<<1)-d|0;break f}i:{if((d|0)!=(e|0)){break i}e=H[a+108>>2];if((e|0)<=(f|0)){break i}f=(e<<1)-f|0;break f}if(d){break f}d=0;e=H[a+108>>2];if((e|0)>=(f|0)){break f}f=(e<<1)-f|0}H[g+12>>2]=d;H[g+8>>2]=f;j:{if(H[a+8>>2]<=0){break j}i=H[a+32>>2];f=0;while(1){d=f<<2;e=H[d+(g+8|0)>>2];h=H[a+16>>2];k:{if((e|0)>(h|0)){H[d+i>>2]=h;break k}d=d+i|0;h=H[a+12>>2];if((h|0)>(e|0)){H[d>>2]=h;break k}H[d>>2]=e}f=f+1|0;e=H[a+8>>2];if((f|0)<(e|0)){continue}break}d=0;if((e|0)<=0){break j}e=j<<3;h=e+c|0;k=b+e|0;while(1){f=d<<2;e=f+h|0;f=H[f+k>>2]+H[f+i>>2]|0;H[e>>2]=f;l:{if((f|0)>H[a+16>>2]){f=f-H[a+20>>2]|0}else{if((f|0)>=H[a+12>>2]){break l}f=f+H[a+20>>2]|0}H[e>>2]=f}d=d+1|0;if((d|0)>2]){continue}break}}j=j+1|0;if((n|0)!=(j|0)){continue}break}}ca=g+32|0;return 1}Ca();v()}function ke(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;h=ca-80|0;ca=h;a:{b:{if(I[H[a+28>>2]+36|0]<=1){d=H[b+20>>2];f=H[b+16>>2];c=f+4|0;d=c>>>0<4?d+1|0:d;g=H[b+12>>2];if(K[b+8>>2]>>0&(g|0)<=(d|0)|(d|0)>(g|0)){break a}f=f+H[b>>2]|0;j=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);H[b+16>>2]=c;H[b+20>>2]=d;break b}if(!Pc(1,h+76|0,b)){break a}j=H[h+76>>2]}if(!j){break a}d=H[b+8>>2];c=H[b+16>>2];d=Rj(d-c|0,H[b+12>>2]-(H[b+20>>2]+(c>>>0>d>>>0)|0)|0,5,0);c=da;if(d>>>0>>0&(c|0)<=0|(c|0)<0){break a}c=H[a+4>>2];d=H[a+8>>2]-c>>2;c:{if(d>>>0>>0){ya(a+4|0,j-d|0);break c}if(d>>>0<=j>>>0){break c}H[a+8>>2]=c+(j<<2)}p=a+16|0;l=H[a+32>>2];while(1){i=H[b+12>>2];c=i;d=H[b+20>>2];e=H[b+8>>2];f=H[b+16>>2];if((c|0)<=(d|0)&e>>>0<=f>>>0|(c|0)<(d|0)){e=0;break a}n=H[b>>2];q=I[n+f|0];c=d;g=f+1|0;c=g?c:c+1|0;H[b+16>>2]=g;H[b+20>>2]=c;if(e>>>0<=g>>>0&(c|0)>=(i|0)|(c|0)>(i|0)){e=0;break a}g=I[g+n|0];c=d;k=f+2|0;c=k>>>0<2?c+1|0:c;H[b+16>>2]=k;H[b+20>>2]=c;if(e>>>0<=k>>>0&(c|0)>=(i|0)|(c|0)>(i|0)){e=0;break a}k=I[k+n|0];c=d;m=f+3|0;c=m>>>0<3?c+1|0:c;H[b+16>>2]=m;H[b+20>>2]=c;if(e>>>0<=m>>>0&(c|0)>=(i|0)|(c|0)>(i|0)){e=0;break a}e=I[m+n|0];c=d;d=f+4|0;c=d>>>0<4?c+1|0:c;H[b+16>>2]=d;H[b+20>>2]=c;if(q>>>0>4){e=0;break a}if((g-12&255)>>>0<245){e=0;break a}if(!k){e=0;break a}m=Eb(h+8|0);i=(e|0)!=0;d=g-1|0;if(d>>>0<=10){c=H[(d<<2)+13584>>2]}else{c=-1}d=N(c,k);lc(m,q,k,g,i,d,d>>31);d:{d=J[H[a+28>>2]+36>>1];e:{if(((d<<8|d>>>8)&65535)>>>0<=258){c=H[b+20>>2];f=H[b+16>>2];d=f+2|0;c=d>>>0<2?c+1|0:c;e=H[b+12>>2];if(K[b+8>>2]>>0&(e|0)<=(c|0)|(c|0)>(e|0)){break d}f=f+H[b>>2]|0;e=I[f|0]|I[f+1|0]<<8;H[b+16>>2]=d;H[b+20>>2]=c;break e}if(!Pc(1,h+4|0,b)){break d}e=H[h+4>>2]}H[h+68>>2]=e;d=jc(pa(96),m);ea[H[H[l>>2]+8>>2]](l,H[l+12>>2]-H[l+8>>2]>>2,d);d=(H[l+12>>2]-H[l+8>>2]>>2)-1|0;f=d<<2;H[H[f+H[l+8>>2]>>2]+60>>2]=e;H[H[a+4>>2]+(o<<2)>>2]=d;e=H[a+16>>2];c=H[a+20>>2]-e>>2;f:{if((c|0)>(d|0)){break f}H[h>>2]=-1;d=d+1|0;if(d>>>0>c>>>0){Pa(p,d-c|0,h);e=H[p>>2];break f}if(c>>>0<=d>>>0){break f}H[a+20>>2]=(d<<2)+e}H[e+f>>2]=o;e=1;o=o+1|0;if((o|0)!=(j|0)){continue}break a}break}e=0}ca=h+80|0;return e|0}function nd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;n=ea[H[H[a>>2]+44>>2]](a)|0;a:{if((n|0)<=0){break a}i=H[b+4>>2]-H[b>>2]>>2;e=ca+-64|0;ca=e;f=Eb(e);d=N(H[3400],n);lc(f,H[H[a+8>>2]+56>>2],n&255,5,0,d,d>>31);f=jc(pa(96),f);F[f+84|0]=1;H[f+72>>2]=H[f+68>>2];mb(f,i);H[f+60>>2]=H[H[a+8>>2]+60>>2];d=H[a+16>>2];H[a+16>>2]=f;if(d){Ga(d)}ca=e- -64|0;h=H[a+16>>2];if(!H[h+80>>2]){break a}j=H[H[h>>2]>>2];if(!j){break a}m=H[c+12>>2];e=m;d=H[c+20>>2];g=H[c+8>>2];k=H[c+16>>2];if((e|0)<=(d|0)&g>>>0<=k>>>0|(d|0)>(e|0)){break a}l=N(i,n);i=j+H[h+48>>2]|0;h=H[c>>2];j=I[h+k|0];e=k+1|0;f=e?d:d+1|0;H[c+16>>2]=e;H[c+20>>2]=f;b:{c:{if(j){if(kd(l,n,c,i)){break c}break a}if((f|0)>=(m|0)&e>>>0>=g>>>0|(f|0)>(m|0)){break a}g=I[e+h|0];f=k+2|0;d=f>>>0<2?d+1|0:d;H[c+16>>2]=f;H[c+20>>2]=d;d=H[H[a+16>>2]+64>>2];d=H[d+4>>2]-H[d>>2]|0;if((g|0)==H[3400]){e=l<<2;if(e>>>0>d>>>0){break a}g=H[c+8>>2];k=H[c+12>>2];j=H[c+20>>2];d=H[c+16>>2];f=e+d|0;j=f>>>0>>0?j+1|0:j;if(f>>>0>g>>>0&(j|0)>=(k|0)|(j|0)>(k|0)){break a}qa(i,d+H[c>>2]|0,e);f=H[c+20>>2];d=e+H[c+16>>2]|0;f=d>>>0>>0?f+1|0:f;H[c+16>>2]=d;H[c+20>>2]=f;break c}if(d>>>0>>0){break a}d=H[c+8>>2];f=H[c+16>>2];e=d-f|0;m=d>>>0>>0;d=H[c+20>>2];k=H[c+12>>2]-(m+d|0)|0;m=Rj(g,0,l,0)>>>0>e>>>0;e=da;if(m&(e|0)>=(k|0)|(e|0)>(k|0)){break a}e=1;if(!l){break b}h=0;while(1){k=H[c+8>>2];j=H[c+12>>2];e=f+g|0;d=e>>>0>>0?d+1|0:d;if(e>>>0>k>>>0&(d|0)>=(j|0)|(d|0)>(j|0)){return 0}qa(i+(h<<2)|0,H[c>>2]+f|0,g);d=H[c+20>>2];f=g+H[c+16>>2]|0;d=f>>>0>>0?d+1|0:d;H[c+16>>2]=f;H[c+20>>2]=d;h=h+1|0;if((l|0)!=(h|0)){continue}break}}e=1;if(!l){break b}d=H[a+20>>2];if(d){e=0;if(ea[H[H[d>>2]+32>>2]](d)|0){break b}}g=0;h=0;d:{if((l|0)<=0){break d}if((l|0)!=1){f=l&-2;while(1){e=g<<2;d=H[e+i>>2];H[e+i>>2]=0-(d&1)^d>>>1;d=e|4;e=H[d+i>>2];H[d+i>>2]=0-(e&1)^e>>>1;g=g+2|0;h=h+2|0;if((f|0)!=(h|0)){continue}break}}if(!(l&1)){break d}d=g<<2;f=H[d+i>>2];H[d+i>>2]=0-(f&1)^f>>>1}e=0}d=e;f=H[a+20>>2];e:{if(!f){break e}if(!(ea[H[H[f>>2]+40>>2]](f,c)|0)){break a}if(d){break e}a=H[a+20>>2];if(!(ea[H[H[a>>2]+44>>2]](a,i,i,l,n,H[b>>2])|0)){break a}}o=1}return o|0}function pb(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;h=ca-32|0;ca=h;a:{b:{if(H[a+8>>2]<<5>>>0>=b>>>0){break b}if((b|0)<0){break a}b=(b-1>>>5|0)+1|0;c=pa(b<<2);H[h+24>>2]=b;H[h+20>>2]=0;H[h+16>>2]=c;b=H[a>>2];H[h+12>>2]=0;H[h+8>>2]=b;c=H[a+4>>2];H[h+4>>2]=c&31;H[h>>2]=b+(c>>>3&536870908);e=ca-32|0;ca=e;i=H[h+4>>2];g=H[h+12>>2];j=H[h>>2];d=H[h+8>>2];b=(i-g|0)+(j-d<<3)|0;f=H[h+20>>2];c=b+f|0;H[h+20>>2]=c;if(!((c-1^f-1)>>>0<32?f:0)){H[H[h+16>>2]+((c>>>0>=33?c-1>>>5|0:0)<<2)>>2]=0}c=H[h+16>>2]+(f>>>3&536870908)|0;f=f&31;c:{if((f|0)==(g|0)){if((b|0)<=0){break c}if(g){i=32-g|0;f=(b|0)<(i|0)?b:i;i=-1<>>i-f;H[c>>2]=H[c>>2]&(i^-1)|i&H[d>>2];d=d+4|0;c=(g+f>>>3&536870908)+c|0;b=b-f|0}g=(b|0)/32|0;if(b+31>>>0>=63){va(c,d,g<<2)}b=b-(g<<5)|0;if((b|0)<=0){break c}f=c;c=g<<2;g=f+c|0;b=-1>>>32-b|0;H[g>>2]=H[g>>2]&(b^-1)|b&H[c+d>>2];break c}H[e+28>>2]=g;H[e+24>>2]=d;H[e+20>>2]=i;H[e+16>>2]=j;H[e+12>>2]=f;H[e+8>>2]=c;b=H[e+28>>2];c=H[e+24>>2];g=(H[e+20>>2]-b|0)+(H[e+16>>2]-c<<3)|0;d:{if((g|0)<=0){b=H[e+12>>2];d=H[e+8>>2];break d}e:{if(!b){b=H[e+12>>2];break e}d=H[e+12>>2];j=32-d|0;k=32-b|0;f=(g|0)<(k|0)?g:k;i=f>>>0>j>>>0?j:f;l=H[e+8>>2];m=H[l>>2]&(-1<>>j-i^-1);j=H[c>>2]&(-1<>>k-f);H[l>>2]=m|(b>>>0>>0?j<>>b-d|0);c=d+i|0;b=c&31;H[e+12>>2]=b;d=l+(c>>>3&536870908)|0;H[e+8>>2]=d;c=f-i|0;if((c|0)>0){H[d>>2]=H[d>>2]&(-1>>>32-c^-1)|j>>>i+H[e+28>>2];H[e+12>>2]=c;b=c}g=g-f|0;c=H[e+24>>2]+4|0;H[e+24>>2]=c}i=-1<=32){j=i^-1;while(1){d=H[e+8>>2];c=H[c>>2];H[d>>2]=j&H[d>>2]|c<>2]=d+4;H[d+4>>2]=i&H[d+4>>2]|c>>>f;c=H[e+24>>2]+4|0;H[e+24>>2]=c;d=g>>>0>63;g=g-32|0;if(d){continue}break}}d=H[e+8>>2];if((g|0)<=0){break d}j=f;f=(g|0)>(f|0)?f:g;j=H[d>>2]&(i&-1>>>j-f^-1);i=H[c>>2]&-1>>>32-g;H[d>>2]=j|i<>2]=c;d=(b>>>3&536870908)+d|0;H[e+8>>2]=d;b=g-f|0;if((b|0)<=0){b=c;break d}H[d>>2]=H[d>>2]&(-1>>>32-b^-1)|i>>>f;H[e+12>>2]=b}H[e+4>>2]=b;H[e>>2]=d}ca=e+32|0;b=H[a>>2];H[a>>2]=H[h+16>>2];H[h+16>>2]=b;c=H[a+4>>2];H[a+4>>2]=H[h+20>>2];H[h+20>>2]=c;c=H[a+8>>2];H[a+8>>2]=H[h+24>>2];H[h+24>>2]=c;if(!b){break b}oa(b)}ca=h+32|0;return}sa();v()}function Ne(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=J[b+38>>1];a:{if(!c){break a}b:{if(c>>>0<=511){g=H[b+8>>2];e=H[b+12>>2];d=H[b+20>>2];c=H[b+16>>2];i=c+4|0;d=i>>>0<4?d+1|0:d;if(g>>>0>>0&(d|0)>=(e|0)|(d|0)>(e|0)){break a}c=c+H[b>>2]|0;f=I[c|0]|I[c+1|0]<<8|(I[c+2|0]<<16|I[c+3|0]<<24);H[a+12>>2]=f;d=H[b+20>>2];c=H[b+16>>2]+4|0;d=c>>>0<4?d+1|0:d;H[b+16>>2]=c;H[b+20>>2]=d;break b}if(!hb(1,a+12|0,b)){break a}c=H[b+16>>2];d=H[b+20>>2];f=H[a+12>>2]}e=H[b+8>>2];i=e-c|0;c=H[b+12>>2]-(d+(c>>>0>e>>>0)|0)|0;if(i>>>0>>6>>>0&(c|0)<=0|(c|0)<0){break a}d=H[a>>2];c=H[a+4>>2]-d>>2;c:{if(c>>>0>>0){ya(a,f-c|0);f=H[a+12>>2];break c}if(c>>>0<=f>>>0){break c}H[a+4>>2]=d+(f<<2)}if(!f){return 1}c=H[b+16>>2];d=H[b+20>>2];l=H[a>>2];i=H[b+8>>2];j=H[b+12>>2];g=0;while(1){if((d|0)>=(j|0)&c>>>0>=i>>>0|(d|0)>(j|0)){return 0}m=H[b>>2];k=I[m+c|0];c=c+1|0;d=c?d:d+1|0;H[b+16>>2]=c;H[b+20>>2]=d;e=k>>>2|0;h=0;d:{e:{f:{g:{n=k&3;switch(n|0){case 0:break e;case 3:break g;default:break f}}e=e+g|0;if(e>>>0>=f>>>0){return 0}ra(l+(g<<2)|0,0,(k&252)+4|0);g=e;break d}while(1){if((c|0)==(i|0)&(d|0)==(j|0)){break a}f=I[c+m|0];c=c+1|0;d=c?d:d+1|0;H[b+16>>2]=c;H[b+20>>2]=d;e=f<<(h<<3|6)|e;h=h+1|0;if((n|0)!=(h|0)){continue}break}}H[l+(g<<2)>>2]=e}f=H[a+12>>2];g=g+1|0;if(f>>>0>g>>>0){continue}break}b=a+16|0;i=H[a>>2];d=H[a+16>>2];c=H[a+20>>2]-d|0;h:{if(c>>>0<=16383){ya(b,4096-(c>>>2|0)|0);break h}if((c|0)==16384){break h}H[a+20>>2]=d+16384}c=a+28|0;g=H[c>>2];d=H[a+32>>2]-g>>3;i:{if(d>>>0>>0){ob(c,f-d|0);g=H[c>>2];break i}if(d>>>0>f>>>0){H[a+32>>2]=(f<<3)+g}if(!f){break a}}d=H[b>>2];b=0;a=0;while(1){c=i+(b<<2)|0;h=H[c>>2];e=a;j=(b<<3)+g|0;H[j+4>>2]=a;H[j>>2]=h;c=H[c>>2];a=c+a|0;if(a>>>0>4096){break a}j:{if(a>>>0<=e>>>0){break j}h=0;j=c&7;if(j){while(1){H[d+(e<<2)>>2]=b;e=e+1|0;h=h+1|0;if((j|0)!=(h|0)){continue}break}}if(c-1>>>0<=6){break j}while(1){c=d+(e<<2)|0;H[c>>2]=b;H[c+28>>2]=b;H[c+24>>2]=b;H[c+20>>2]=b;H[c+16>>2]=b;H[c+12>>2]=b;H[c+8>>2]=b;H[c+4>>2]=b;e=e+8|0;if((e|0)!=(a|0)){continue}break}}b=b+1|0;if((f|0)!=(b|0)){continue}break}o=(a|0)==4096}return o}function Ni(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=ca-48|0;ca=g;d=H[a+8>>2];if(d-2>>>0<=28){H[a+76>>2]=d;e=-1<>2]=d;H[a+80>>2]=e^-1;H[a+92>>2]=(d|0)/2;L[a+88>>2]=O(2)/O(d|0)}H[a+52>>2]=f;d=H[a+40>>2];e=H[d>>2];d=H[d+4>>2];H[g+16>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;a:{d=d-e|0;if((d|0)>0){m=a+8|0;n=a+44|0;d=d>>>2|0;o=d>>>0<=1?1:d;p=a+96|0;while(1){e=H[a+40>>2];d=H[e>>2];if(H[e+4>>2]-d>>2>>>0<=j>>>0){break a}Nb(n,H[d+(j<<2)>>2],g+8|0);h=H[g+12>>2];d=h>>31;i=H[g+8>>2];e=i>>31;f=(d^h)-d+((e^i)-e)|0;l=H[g+16>>2];d=l>>31;e=(d^l)-d|0;d=0;k=e;e=e+f|0;d=k>>>0>e>>>0?1:d;b:{if(!(d|e)){H[g+8>>2]=H[a+92>>2];break b}f=H[a+92>>2];k=f>>31;i=Sj(Rj(f,k,i,i>>31),da,e,d);H[g+8>>2]=i;d=Sj(Rj(f,k,h,h>>31),da,e,d);H[g+12>>2]=d;e=d>>31;e=(d^e)-e|0;d=i>>31;d=e+((d^i)-d|0)|0;if((l|0)>=0){H[g+16>>2]=f-d;break b}H[g+16>>2]=d-f}d=Ba(p);f=H[g+8>>2];c:{if(d){H[g+16>>2]=0-H[g+16>>2];e=0-H[g+12>>2]|0;H[g+12>>2]=e;f=0-f|0;H[g+8>>2]=f;break c}e=H[g+12>>2]}d:{if((f|0)>=0){f=H[a+92>>2];d=f+H[g+16>>2]|0;f=e+f|0;break d}e:{if((e|0)<0){d=H[g+16>>2];f=d>>31;f=(d^f)-f|0;break e}d=H[g+16>>2];f=d>>31;f=H[a+84>>2]+(f-(d^f)|0)|0}if((d|0)<0){d=e>>31;d=(d^e)-d|0;break d}d=e>>31;d=H[a+84>>2]+(d-(d^e)|0)|0}e=H[a+84>>2];f:{if(!(d|f)){d=e;f=d;break f}if(!((d|0)!=(e|0)|f)){f=d;break f}if(!((e|0)!=(f|0)|d)){d=f;break f}g:{if(f){break g}h=H[a+92>>2];if((h|0)>=(d|0)){break g}d=(h<<1)-d|0;f=0;break f}h:{if((e|0)!=(f|0)){break h}h=H[a+92>>2];if((h|0)<=(d|0)){break h}d=(h<<1)-d|0;break f}i:{if((d|0)!=(e|0)){break i}e=H[a+92>>2];if((e|0)<=(f|0)){break i}f=(e<<1)-f|0;break f}if(d){break f}d=0;e=H[a+92>>2];if((e|0)>=(f|0)){break f}f=(e<<1)-f|0}e=j<<3;h=e+b|0;i=H[h>>2];h=H[h+4>>2];H[g+36>>2]=d;H[g+32>>2]=f;H[g+24>>2]=i;H[g+28>>2]=h;qc(g+40|0,m,g+32|0,g+24|0);d=c+e|0;H[d>>2]=H[g+40>>2];H[d+4>>2]=H[g+44>>2];j=j+1|0;if((o|0)!=(j|0)){continue}break}}ca=g+48|0;return 1}Ca();v()}function Ii(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=ca-48|0;ca=g;d=H[a+8>>2];if(d-2>>>0<=28){H[a+76>>2]=d;e=-1<>2]=d;H[a+80>>2]=e^-1;H[a+92>>2]=(d|0)/2;L[a+88>>2]=O(2)/O(d|0)}H[a+52>>2]=f;d=H[a+40>>2];e=H[d>>2];d=H[d+4>>2];H[g+16>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;a:{d=d-e|0;if((d|0)>0){m=a+8|0;n=a+44|0;d=d>>>2|0;o=d>>>0<=1?1:d;p=a+96|0;while(1){e=H[a+40>>2];d=H[e>>2];if(H[e+4>>2]-d>>2>>>0<=j>>>0){break a}Lb(n,H[d+(j<<2)>>2],g+8|0);h=H[g+12>>2];d=h>>31;i=H[g+8>>2];e=i>>31;f=(d^h)-d+((e^i)-e)|0;l=H[g+16>>2];d=l>>31;e=(d^l)-d|0;d=0;k=e;e=e+f|0;d=k>>>0>e>>>0?1:d;b:{if(!(d|e)){H[g+8>>2]=H[a+92>>2];break b}f=H[a+92>>2];k=f>>31;i=Sj(Rj(f,k,i,i>>31),da,e,d);H[g+8>>2]=i;d=Sj(Rj(f,k,h,h>>31),da,e,d);H[g+12>>2]=d;e=d>>31;e=(d^e)-e|0;d=i>>31;d=e+((d^i)-d|0)|0;if((l|0)>=0){H[g+16>>2]=f-d;break b}H[g+16>>2]=d-f}d=Ba(p);f=H[g+8>>2];c:{if(d){H[g+16>>2]=0-H[g+16>>2];e=0-H[g+12>>2]|0;H[g+12>>2]=e;f=0-f|0;H[g+8>>2]=f;break c}e=H[g+12>>2]}d:{if((f|0)>=0){f=H[a+92>>2];d=f+H[g+16>>2]|0;f=e+f|0;break d}e:{if((e|0)<0){d=H[g+16>>2];f=d>>31;f=(d^f)-f|0;break e}d=H[g+16>>2];f=d>>31;f=H[a+84>>2]+(f-(d^f)|0)|0}if((d|0)<0){d=e>>31;d=(d^e)-d|0;break d}d=e>>31;d=H[a+84>>2]+(d-(d^e)|0)|0}e=H[a+84>>2];f:{if(!(d|f)){d=e;f=d;break f}if(!((d|0)!=(e|0)|f)){f=d;break f}if(!((e|0)!=(f|0)|d)){d=f;break f}g:{if(f){break g}h=H[a+92>>2];if((h|0)>=(d|0)){break g}d=(h<<1)-d|0;f=0;break f}h:{if((e|0)!=(f|0)){break h}h=H[a+92>>2];if((h|0)<=(d|0)){break h}d=(h<<1)-d|0;break f}i:{if((d|0)!=(e|0)){break i}e=H[a+92>>2];if((e|0)<=(f|0)){break i}f=(e<<1)-f|0;break f}if(d){break f}d=0;e=H[a+92>>2];if((e|0)>=(f|0)){break f}f=(e<<1)-f|0}e=j<<3;h=e+b|0;i=H[h>>2];h=H[h+4>>2];H[g+36>>2]=d;H[g+32>>2]=f;H[g+24>>2]=i;H[g+28>>2]=h;qc(g+40|0,m,g+32|0,g+24|0);d=c+e|0;H[d>>2]=H[g+40>>2];H[d+4>>2]=H[g+44>>2];j=j+1|0;if((o|0)!=(j|0)){continue}break}}ca=g+48|0;return 1}Ca();v()}function Wi(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=ca-48|0;ca=g;d=H[a+8>>2];if(d-2>>>0<=28){H[a+76>>2]=d;e=-1<>2]=d;H[a+80>>2]=e^-1;H[a+92>>2]=(d|0)/2;L[a+88>>2]=O(2)/O(d|0)}H[a+52>>2]=f;d=H[a+40>>2];e=H[d>>2];d=H[d+4>>2];H[g+16>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;a:{d=d-e|0;if((d|0)>0){m=a+8|0;n=a+44|0;d=d>>>2|0;o=d>>>0<=1?1:d;p=a+96|0;while(1){e=H[a+40>>2];d=H[e>>2];if(H[e+4>>2]-d>>2>>>0<=j>>>0){break a}Nb(n,H[d+(j<<2)>>2],g+8|0);h=H[g+12>>2];d=h>>31;i=H[g+8>>2];e=i>>31;f=(d^h)-d+((e^i)-e)|0;l=H[g+16>>2];d=l>>31;e=(d^l)-d|0;d=0;k=e;e=e+f|0;d=k>>>0>e>>>0?1:d;b:{if(!(d|e)){H[g+8>>2]=H[a+92>>2];break b}f=H[a+92>>2];k=f>>31;i=Sj(Rj(f,k,i,i>>31),da,e,d);H[g+8>>2]=i;d=Sj(Rj(f,k,h,h>>31),da,e,d);H[g+12>>2]=d;e=d>>31;e=(d^e)-e|0;d=i>>31;d=e+((d^i)-d|0)|0;if((l|0)>=0){H[g+16>>2]=f-d;break b}H[g+16>>2]=d-f}d=Ba(p);f=H[g+8>>2];c:{if(d){H[g+16>>2]=0-H[g+16>>2];e=0-H[g+12>>2]|0;H[g+12>>2]=e;f=0-f|0;H[g+8>>2]=f;break c}e=H[g+12>>2]}d:{if((f|0)>=0){f=H[a+92>>2];d=f+H[g+16>>2]|0;f=e+f|0;break d}e:{if((e|0)<0){d=H[g+16>>2];f=d>>31;f=(d^f)-f|0;break e}d=H[g+16>>2];f=d>>31;f=H[a+84>>2]+(f-(d^f)|0)|0}if((d|0)<0){d=e>>31;d=(d^e)-d|0;break d}d=e>>31;d=H[a+84>>2]+(d-(d^e)|0)|0}e=H[a+84>>2];f:{if(!(d|f)){d=e;f=d;break f}if(!((d|0)!=(e|0)|f)){f=d;break f}if(!((e|0)!=(f|0)|d)){d=f;break f}g:{if(f){break g}h=H[a+92>>2];if((h|0)>=(d|0)){break g}d=(h<<1)-d|0;f=0;break f}h:{if((e|0)!=(f|0)){break h}h=H[a+92>>2];if((h|0)<=(d|0)){break h}d=(h<<1)-d|0;break f}i:{if((d|0)!=(e|0)){break i}e=H[a+92>>2];if((e|0)<=(f|0)){break i}f=(e<<1)-f|0;break f}if(d){break f}d=0;e=H[a+92>>2];if((e|0)>=(f|0)){break f}f=(e<<1)-f|0}e=j<<3;h=e+b|0;i=H[h+4>>2];H[g+40>>2]=H[h>>2];H[g+44>>2]=i;H[g+28>>2]=d;H[g+24>>2]=f;rc(g+32|0,m,g+24|0,g+40|0);d=c+e|0;H[d>>2]=H[g+32>>2];H[d+4>>2]=H[g+36>>2];j=j+1|0;if((o|0)!=(j|0)){continue}break}}ca=g+48|0;return 1}Ca();v()}function Ri(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=ca-48|0;ca=g;d=H[a+8>>2];if(d-2>>>0<=28){H[a+76>>2]=d;e=-1<>2]=d;H[a+80>>2]=e^-1;H[a+92>>2]=(d|0)/2;L[a+88>>2]=O(2)/O(d|0)}H[a+52>>2]=f;d=H[a+40>>2];e=H[d>>2];d=H[d+4>>2];H[g+16>>2]=0;H[g+8>>2]=0;H[g+12>>2]=0;a:{d=d-e|0;if((d|0)>0){m=a+8|0;n=a+44|0;d=d>>>2|0;o=d>>>0<=1?1:d;p=a+96|0;while(1){e=H[a+40>>2];d=H[e>>2];if(H[e+4>>2]-d>>2>>>0<=j>>>0){break a}Lb(n,H[d+(j<<2)>>2],g+8|0);h=H[g+12>>2];d=h>>31;i=H[g+8>>2];e=i>>31;f=(d^h)-d+((e^i)-e)|0;l=H[g+16>>2];d=l>>31;e=(d^l)-d|0;d=0;k=e;e=e+f|0;d=k>>>0>e>>>0?1:d;b:{if(!(d|e)){H[g+8>>2]=H[a+92>>2];break b}f=H[a+92>>2];k=f>>31;i=Sj(Rj(f,k,i,i>>31),da,e,d);H[g+8>>2]=i;d=Sj(Rj(f,k,h,h>>31),da,e,d);H[g+12>>2]=d;e=d>>31;e=(d^e)-e|0;d=i>>31;d=e+((d^i)-d|0)|0;if((l|0)>=0){H[g+16>>2]=f-d;break b}H[g+16>>2]=d-f}d=Ba(p);f=H[g+8>>2];c:{if(d){H[g+16>>2]=0-H[g+16>>2];e=0-H[g+12>>2]|0;H[g+12>>2]=e;f=0-f|0;H[g+8>>2]=f;break c}e=H[g+12>>2]}d:{if((f|0)>=0){f=H[a+92>>2];d=f+H[g+16>>2]|0;f=e+f|0;break d}e:{if((e|0)<0){d=H[g+16>>2];f=d>>31;f=(d^f)-f|0;break e}d=H[g+16>>2];f=d>>31;f=H[a+84>>2]+(f-(d^f)|0)|0}if((d|0)<0){d=e>>31;d=(d^e)-d|0;break d}d=e>>31;d=H[a+84>>2]+(d-(d^e)|0)|0}e=H[a+84>>2];f:{if(!(d|f)){d=e;f=d;break f}if(!((d|0)!=(e|0)|f)){f=d;break f}if(!((e|0)!=(f|0)|d)){d=f;break f}g:{if(f){break g}h=H[a+92>>2];if((h|0)>=(d|0)){break g}d=(h<<1)-d|0;f=0;break f}h:{if((e|0)!=(f|0)){break h}h=H[a+92>>2];if((h|0)<=(d|0)){break h}d=(h<<1)-d|0;break f}i:{if((d|0)!=(e|0)){break i}e=H[a+92>>2];if((e|0)<=(f|0)){break i}f=(e<<1)-f|0;break f}if(d){break f}d=0;e=H[a+92>>2];if((e|0)>=(f|0)){break f}f=(e<<1)-f|0}e=j<<3;h=e+b|0;i=H[h+4>>2];H[g+40>>2]=H[h>>2];H[g+44>>2]=i;H[g+28>>2]=d;H[g+24>>2]=f;rc(g+32|0,m,g+24|0,g+40|0);d=c+e|0;H[d>>2]=H[g+32>>2];H[d+4>>2]=H[g+36>>2];j=j+1|0;if((o|0)!=(j|0)){continue}break}}ca=g+48|0;return 1}Ca();v()}function Ge(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;f=ca-16|0;ca=f;c=H[a+4>>2];H[a+40>>2]=H[a>>2];H[a+44>>2]=c;c=H[a+36>>2];H[a+72>>2]=H[a+32>>2];H[a+76>>2]=c;d=H[a+28>>2];c=a- -64|0;H[c>>2]=H[a+24>>2];H[c+4>>2]=d;c=H[a+20>>2];H[a+56>>2]=H[a+16>>2];H[a+60>>2]=c;c=H[a+12>>2];H[a+48>>2]=H[a+8>>2];H[a+52>>2]=c;a:{b:{if(Db(a+40|0,1,f+8|0)){c=H[a+44>>2];H[a>>2]=H[a+40>>2];H[a+4>>2]=c;c=H[a+76>>2];H[a+32>>2]=H[a+72>>2];H[a+36>>2]=c;c=H[a+68>>2];H[a+24>>2]=H[a+64>>2];H[a+28>>2]=c;d=H[a+60>>2];h=d;c=H[a+56>>2];H[a+16>>2]=c;H[a+20>>2]=d;e=H[a+52>>2];d=H[a+48>>2];H[a+8>>2]=d;H[a+12>>2]=e;i=d-c|0;g=H[f+12>>2];e=e-((c>>>0>d>>>0)+h|0)|0;d=H[f+8>>2];if((g|0)==(e|0)&i>>>0>=d>>>0|e>>>0>g>>>0){break b}}c=0;break a}e=h+g|0;c=c+d|0;e=c>>>0>>0?e+1|0:e;H[a+16>>2]=c;H[a+20>>2]=e;c:{if(J[a+38>>1]<=513){c=H[a+4>>2];H[a+96>>2]=H[a>>2];H[a+100>>2]=c;c=H[a+36>>2];H[a+128>>2]=H[a+32>>2];H[a+132>>2]=c;c=H[a+28>>2];H[a+120>>2]=H[a+24>>2];H[a+124>>2]=c;c=H[a+20>>2];H[a+112>>2]=H[a+16>>2];H[a+116>>2]=c;c=H[a+12>>2];H[a+104>>2]=H[a+8>>2];H[a+108>>2]=c;d:{if(Db(a+96|0,1,f+8|0)){c=H[a+100>>2];H[a>>2]=H[a+96>>2];H[a+4>>2]=c;c=H[a+132>>2];H[a+32>>2]=H[a+128>>2];H[a+36>>2]=c;c=H[a+124>>2];H[a+24>>2]=H[a+120>>2];H[a+28>>2]=c;d=H[a+116>>2];h=d;c=H[a+112>>2];H[a+16>>2]=c;H[a+20>>2]=d;e=H[a+108>>2];d=H[a+104>>2];H[a+8>>2]=d;H[a+12>>2]=e;i=d-c|0;g=H[f+12>>2];e=e-((c>>>0>d>>>0)+h|0)|0;d=H[f+8>>2];if((g|0)==(e|0)&i>>>0>=d>>>0|e>>>0>g>>>0){break d}}c=0;break a}e=h+g|0;c=c+d|0;e=c>>>0>>0?e+1|0:e;H[a+16>>2]=c;H[a+20>>2]=e;break c}c=0;if(!ta(a+80|0,a)){break a}}c=0;if(!Fe(a)){break a}c=H[a+4>>2];H[b>>2]=H[a>>2];H[b+4>>2]=c;c=H[a+36>>2];H[b+32>>2]=H[a+32>>2];H[b+36>>2]=c;c=H[a+28>>2];H[b+24>>2]=H[a+24>>2];H[b+28>>2]=c;c=H[a+20>>2];H[b+16>>2]=H[a+16>>2];H[b+20>>2]=c;c=H[a+12>>2];H[b+8>>2]=H[a+8>>2];H[b+12>>2]=c;c=1}ca=f+16|0;return c}function oe(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;if(!H[a+64>>2]){c=pa(32);H[c+16>>2]=0;H[c+20>>2]=0;H[c+8>>2]=0;H[c>>2]=0;H[c+4>>2]=0;H[c+24>>2]=0;H[c+28>>2]=0;d=H[a+64>>2];H[a+64>>2]=c;if(d){c=H[d>>2];if(c){H[d+4>>2]=c;oa(c)}oa(d);c=H[a+64>>2]}H[a>>2]=c;d=H[c+20>>2];H[a+8>>2]=H[c+16>>2];H[a+12>>2]=d;d=H[c+24>>2];c=H[c+28>>2];H[a+48>>2]=0;H[a+52>>2]=0;H[a+40>>2]=0;H[a+44>>2]=0;H[a+16>>2]=d;H[a+20>>2]=c}a:{F[a+24|0]=I[b+24|0];H[a+28>>2]=H[b+28>>2];F[a+32|0]=I[b+32|0];c=H[b+44>>2];H[a+40>>2]=H[b+40>>2];H[a+44>>2]=c;c=H[b+52>>2];H[a+48>>2]=H[b+48>>2];H[a+52>>2]=c;H[a+56>>2]=H[b+56>>2];c=H[b+12>>2];H[a+8>>2]=H[b+8>>2];H[a+12>>2]=c;c=H[b+20>>2];H[a+16>>2]=H[b+16>>2];H[a+20>>2]=c;H[a+60>>2]=H[b+60>>2];c=H[b>>2];b:{if(!c){H[a>>2]=0;d=1;break b}g=H[a>>2];d=0;if(!g){break b}d=H[c>>2];c=H[c+4>>2]-d|0;se(g,d,c,0);d=1}c:{if(!d){break c}F[a+84|0]=I[b+84|0];H[a+80>>2]=H[b+80>>2];if((a|0)!=(b|0)){Cb(a+68|0,H[b+68>>2],H[b+72>>2])}f=H[b+88>>2];d:{if(f){e=pa(40);b=H[f>>2];H[e+16>>2]=0;H[e+8>>2]=0;H[e+12>>2]=0;H[e>>2]=b;c=H[f+12>>2];b=H[f+8>>2];if((c|0)!=(b|0)){c=c-b|0;if((c|0)<0){break a}b=pa(c);H[e+12>>2]=b;H[e+8>>2]=b;H[e+16>>2]=b+c;c=H[f+8>>2];h=H[f+12>>2];e:{if((c|0)==(h|0)){break e}g=(c^-1)+h|0;d=h-c&7;if(d){while(1){F[b|0]=I[c|0];b=b+1|0;c=c+1|0;i=i+1|0;if((d|0)!=(i|0)){continue}break}}if(g>>>0<7){break e}while(1){F[b|0]=I[c|0];F[b+1|0]=I[c+1|0];F[b+2|0]=I[c+2|0];F[b+3|0]=I[c+3|0];F[b+4|0]=I[c+4|0];F[b+5|0]=I[c+5|0];F[b+6|0]=I[c+6|0];F[b+7|0]=I[c+7|0];b=b+8|0;c=c+8|0;if((h|0)!=(c|0)){continue}break}}H[e+12>>2]=b}b=H[f+36>>2];H[e+32>>2]=H[f+32>>2];H[e+36>>2]=b;b=H[f+28>>2];H[e+24>>2]=H[f+24>>2];H[e+28>>2]=b;b=H[a+88>>2];H[a+88>>2]=e;if(b){break d}break c}b=H[a+88>>2];H[a+88>>2]=0;if(!b){break c}}a=H[b+8>>2];if(a){H[b+12>>2]=a;oa(a)}oa(b)}return}sa();v()}function og(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=ca-32|0;ca=f;e=f+8|0;c=ca-80|0;ca=c;a=H[b+36>>2];H[c+72>>2]=H[b+32>>2];H[c+76>>2]=a;d=H[b+28>>2];a=c- -64|0;H[a>>2]=H[b+24>>2];H[a+4>>2]=d;a=H[b+20>>2];H[c+56>>2]=H[b+16>>2];H[c+60>>2]=a;a=H[b+12>>2];H[c+48>>2]=H[b+8>>2];H[c+52>>2]=a;a=H[b+4>>2];H[c+40>>2]=H[b>>2];H[c+44>>2]=a;nc(c+8|0,c+40|0,c+24|0);a=H[c+8>>2];a:{if(a){H[e>>2]=a;a=e+4|0;if(F[c+23|0]>=0){b=c+8|4;e=H[b+4>>2];H[a>>2]=H[b>>2];H[a+4>>2]=e;H[a+8>>2]=H[b+8>>2];break a}za(a,H[c+12>>2],H[c+16>>2]);if(F[c+23|0]>=0){break a}oa(H[c+12>>2]);break a}if(F[c+23|0]<0){oa(H[c+12>>2])}a=I[c+31|0];if(a>>>0>=2){b=pa(32);F[b+26|0]=0;a=I[1477]|I[1478]<<8;F[b+24|0]=a;F[b+25|0]=a>>>8;a=I[1473]|I[1474]<<8|(I[1475]<<16|I[1476]<<24);d=I[1469]|I[1470]<<8|(I[1471]<<16|I[1472]<<24);F[b+16|0]=d;F[b+17|0]=d>>>8;F[b+18|0]=d>>>16;F[b+19|0]=d>>>24;F[b+20|0]=a;F[b+21|0]=a>>>8;F[b+22|0]=a>>>16;F[b+23|0]=a>>>24;a=I[1465]|I[1466]<<8|(I[1467]<<16|I[1468]<<24);d=I[1461]|I[1462]<<8|(I[1463]<<16|I[1464]<<24);F[b+8|0]=d;F[b+9|0]=d>>>8;F[b+10|0]=d>>>16;F[b+11|0]=d>>>24;F[b+12|0]=a;F[b+13|0]=a>>>8;F[b+14|0]=a>>>16;F[b+15|0]=a>>>24;a=I[1457]|I[1458]<<8|(I[1459]<<16|I[1460]<<24);d=I[1453]|I[1454]<<8|(I[1455]<<16|I[1456]<<24);F[b|0]=d;F[b+1|0]=d>>>8;F[b+2|0]=d>>>16;F[b+3|0]=d>>>24;F[b+4|0]=a;F[b+5|0]=a>>>8;F[b+6|0]=a>>>16;F[b+7|0]=a>>>24;H[c+8>>2]=-1;a=c+8|4;za(a,b,26);d=F[c+23|0];H[e>>2]=H[c+8>>2];e=e+4|0;if((d|0)>=0){d=H[a+4>>2];H[e>>2]=H[a>>2];H[e+4>>2]=d;H[e+8>>2]=H[a+8>>2];oa(b);break a}za(e,H[c+12>>2],H[c+16>>2]);if(F[c+23|0]<0){oa(H[c+12>>2])}oa(b);break a}H[e>>2]=0;H[e+4>>2]=0;H[e+16>>2]=a;H[e+8>>2]=0;H[e+12>>2]=0}ca=c+80|0;a=H[f+24>>2];if(F[f+23|0]<0){oa(H[f+12>>2])}ca=f+32|0;return a|0}function Xd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;k=ca-16|0;ca=k;H[k+8>>2]=c;h=H[a+12>>2];d=H[a+8>>2];g=h-d>>2;a:{if((g|0)>(b|0)){break a}e=b+1|0;if(e>>>0>g>>>0){l=e-g|0;f=H[a+16>>2];d=H[a+12>>2];if(l>>>0<=f-d>>2>>>0){if(l){e=d;d=l<<2;d=ra(e,0,d)+d|0}H[a+12>>2]=d;break a}b:{c:{d:{m=H[a+8>>2];g=d-m>>2;i=g+l|0;if(i>>>0<1073741824){e=f-m|0;f=e>>>1|0;e=e>>>0>=2147483644?1073741823:f>>>0>i>>>0?f:i;if(e){if(e>>>0>=1073741824){break d}j=pa(e<<2)}h=(g<<2)+j|0;f=l<<2;i=ra(h,0,f);g=f+i|0;e=(e<<2)+j|0;if((d|0)==(m|0)){break c}while(1){d=d-4|0;f=H[d>>2];H[d>>2]=0;h=h-4|0;H[h>>2]=f;if((d|0)!=(m|0)){continue}break}H[a+16>>2]=e;e=H[a+12>>2];H[a+12>>2]=g;d=H[a+8>>2];H[a+8>>2]=h;if((d|0)==(e|0)){break b}while(1){e=e-4|0;f=H[e>>2];H[e>>2]=0;if(f){Ga(f)}if((d|0)!=(e|0)){continue}break}break b}sa();v()}wa();v()}H[a+16>>2]=e;H[a+12>>2]=g;H[a+8>>2]=i}if(d){oa(d)}break a}if(e>>>0>=g>>>0){break a}d=d+(e<<2)|0;if((d|0)!=(h|0)){while(1){h=h-4|0;c=H[h>>2];H[h>>2]=0;if(c){Ga(c)}if((d|0)!=(h|0)){continue}break}c=H[k+8>>2]}H[a+12>>2]=d}e:{f:{d=H[c+56>>2];g:{if((d|0)>4){break g}j=N(d,12)+a|0;d=H[j+24>>2];if((d|0)!=H[j+28>>2]){H[d>>2]=b;H[j+24>>2]=d+4;break g}i=H[j+20>>2];g=d-i|0;f=g>>2;e=f+1|0;if(e>>>0>=1073741824){break f}d=g>>>1|0;e=g>>>0>=2147483644?1073741823:d>>>0>e>>>0?d:e;if(e){if(e>>>0>=1073741824){break e}d=pa(e<<2)}else{d=0}f=d+(f<<2)|0;H[f>>2]=b;d=va(d,i,g);H[j+20>>2]=d;H[j+24>>2]=f+4;H[j+28>>2]=d+(e<<2);if(!i){break g}oa(i)}H[c+60>>2]=b;a=H[a+8>>2];H[k+8>>2]=0;a=a+(b<<2)|0;b=H[a>>2];H[a>>2]=c;if(b){Ga(b)}a=H[k+8>>2];H[k+8>>2]=0;if(a){Ga(a)}ca=k+16|0;return}sa();v()}wa();v()}function Og(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=c;d=a;a:{if(H[a+12>>2]==(b|0)){break a}a=b;b=H[d+4>>2];e=H[d>>2];if((b|0)!=(e|0)){while(1){c=b-12|0;if(F[b-1|0]<0){oa(H[c>>2])}b=c;if((e|0)!=(b|0)){continue}break}}H[d+12>>2]=a;H[d+4>>2]=e;c=H[a>>2];j=a+4|0;if((c|0)==(j|0)){break a}while(1){a=H[d+4>>2];b:{if((a|0)!=H[d+8>>2]){c:{if(F[c+27|0]>=0){b=H[c+20>>2];H[a>>2]=H[c+16>>2];H[a+4>>2]=b;H[a+8>>2]=H[c+24>>2];break c}za(a,H[c+16>>2],H[c+20>>2])}H[d+4>>2]=a+12;break b}g=0;d:{e:{f:{a=H[d+4>>2];e=H[d>>2];f=(a-e|0)/12|0;b=f+1|0;if(b>>>0<357913942){h=(H[d+8>>2]-e|0)/12|0;k=h<<1;b=h>>>0>=178956970?357913941:b>>>0>>0?k:b;if(b){if(b>>>0>=357913942){break f}g=pa(N(b,12))}h=N(b,12);b=N(f,12)+g|0;g:{if(F[c+27|0]>=0){f=H[c+20>>2];H[b>>2]=H[c+16>>2];H[b+4>>2]=f;H[b+8>>2]=H[c+24>>2];break g}za(b,H[c+16>>2],H[c+20>>2]);e=H[d>>2];a=H[d+4>>2]}g=g+h|0;f=b+12|0;if((a|0)==(e|0)){break e}while(1){a=a-12|0;h=H[a+4>>2];b=b-12|0;H[b>>2]=H[a>>2];H[b+4>>2]=h;H[b+8>>2]=H[a+8>>2];H[a>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;if((a|0)!=(e|0)){continue}break}H[d+8>>2]=g;a=H[d+4>>2];H[d+4>>2]=f;e=H[d>>2];H[d>>2]=b;if((a|0)==(e|0)){break d}while(1){b=a-12|0;if(F[a-1|0]<0){oa(H[b>>2])}a=b;if((e|0)!=(b|0)){continue}break}break d}sa();v()}wa();v()}H[d+8>>2]=g;H[d+4>>2]=f;H[d>>2]=b}if(e){oa(e)}}b=H[c+4>>2];h:{if(b){while(1){a=b;b=H[b>>2];if(b){continue}break h}}while(1){a=H[c+8>>2];b=H[a>>2]!=(c|0);c=a;if(b){continue}break}}c=a;if((j|0)!=(a|0)){continue}break}}a=0;i:{if((i|0)<0){break i}b=H[d>>2];if((H[d+4>>2]-b|0)/12>>>0<=i>>>0){break i}a=b+N(i,12)|0;a=F[a+11|0]<0?H[a>>2]:a}return a|0}function bd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;i=ca-16|0;ca=i;H[i>>2]=b;f=-1;a:{if((b|0)==-1){H[i+4>>2]=-1;break a}f=b+1|0;H[i+4>>2]=(f>>>0)%3|0?f:b-2|0;if((b>>>0)%3|0){f=b-1|0;break a}f=b+2|0}H[i+8>>2]=f;n=(b>>>0)/3|0;b:{c:{d:{while(1){e:{f:{j=H[(l<<2)+i>>2];if((j|0)!=-1){f=H[H[H[a+8>>2]+12>>2]+(j<<2)>>2];if((f|0)!=-1){break f}}f=0;g=H[a+216>>2];if((g|0)==H[a+220>>2]){break e}while(1){g=N(f,144)+g|0;d=H[g+136>>2];c=H[g+140>>2];g:{if(d>>>0>>0){H[d>>2]=j;H[g+136>>2]=d+4;break g}e=d;d=H[g+132>>2];k=e-d|0;e=k>>2;h=e+1|0;if(h>>>0>=1073741824){break d}m=e<<2;c=c-d|0;e=c>>>1|0;h=c>>>0>=2147483644?1073741823:h>>>0>>0?e:h;if(h){if(h>>>0>=1073741824){break c}c=pa(h<<2)}else{c=0}e=m+c|0;H[e>>2]=j;c=va(c,d,k);H[g+132>>2]=c;H[g+136>>2]=e+4;H[g+140>>2]=c+(h<<2);if(!d){break g}oa(d)}f=f+1|0;g=H[a+216>>2];if(f>>>0<(H[a+220>>2]-g|0)/144>>>0){continue}break}break e}if((b|0)==-1|(f>>>0)/3>>>0>>0){break e}f=0;if(H[a+220>>2]==H[a+216>>2]){break e}while(1){h:{if(!Ba(H[a+368>>2]+(f<<4)|0)){break h}g=H[a+216>>2]+N(f,144)|0;d=H[g+136>>2];c=H[g+140>>2];if(d>>>0>>0){H[d>>2]=j;H[g+136>>2]=d+4;break h}e=d;d=H[g+132>>2];k=e-d|0;e=k>>2;h=e+1|0;if(h>>>0>=1073741824){break b}m=e<<2;c=c-d|0;e=c>>>1|0;h=c>>>0>=2147483644?1073741823:h>>>0>>0?e:h;if(h){if(h>>>0>=1073741824){break c}c=pa(h<<2)}else{c=0}e=m+c|0;H[e>>2]=j;c=va(c,d,k);H[g+132>>2]=c;H[g+136>>2]=e+4;H[g+140>>2]=c+(h<<2);if(!d){break h}oa(d)}f=f+1|0;if(f>>>0<(H[a+220>>2]-H[a+216>>2]|0)/144>>>0){continue}break}}l=l+1|0;if((l|0)!=3){continue}break}ca=i+16|0;return 1}sa();v()}wa();v()}sa();v()}function cd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;h=ca-16|0;ca=h;H[h>>2]=b;c=-1;a:{if((b|0)==-1){H[h+4>>2]=-1;break a}c=b+1|0;H[h+4>>2]=(c>>>0)%3|0?c:b-2|0;if((b>>>0)%3|0){c=b-1|0;break a}c=b+2|0}H[h+8>>2]=c;b:{c:{while(1){i=H[(k<<2)+h>>2];d:{if(!((i|0)==-1|H[H[H[a+8>>2]+12>>2]+(i<<2)>>2]==-1)){b=0;if(H[a+220>>2]==H[a+216>>2]){break d}while(1){e:{f:{if(!Ba(H[a+368>>2]+(b<<4)|0)){break f}c=H[a+216>>2]+N(b,144)|0;e=H[c+136>>2];d=H[c+140>>2];if(e>>>0>>0){H[e>>2]=i;H[c+136>>2]=e+4;break f}f=e;e=H[c+132>>2];j=f-e|0;f=j>>2;g=f+1|0;if(g>>>0>=1073741824){break e}l=f<<2;d=d-e|0;f=d>>>1|0;g=d>>>0>=2147483644?1073741823:g>>>0>>0?f:g;if(g){if(g>>>0>=1073741824){break b}d=pa(g<<2)}else{d=0}f=l+d|0;H[f>>2]=i;d=va(d,e,j);H[c+132>>2]=d;H[c+136>>2]=f+4;H[c+140>>2]=d+(g<<2);if(!e){break f}oa(e)}b=b+1|0;if(b>>>0<(H[a+220>>2]-H[a+216>>2]|0)/144>>>0){continue}break d}break}sa();v()}b=0;c=H[a+216>>2];if((c|0)==H[a+220>>2]){break d}while(1){c=N(b,144)+c|0;e=H[c+136>>2];d=H[c+140>>2];g:{if(e>>>0>>0){H[e>>2]=i;H[c+136>>2]=e+4;break g}f=e;e=H[c+132>>2];j=f-e|0;f=j>>2;g=f+1|0;if(g>>>0>=1073741824){break c}l=f<<2;d=d-e|0;f=d>>>1|0;g=d>>>0>=2147483644?1073741823:g>>>0>>0?f:g;if(g){if(g>>>0>=1073741824){break b}d=pa(g<<2)}else{d=0}f=l+d|0;H[f>>2]=i;d=va(d,e,j);H[c+132>>2]=d;H[c+136>>2]=f+4;H[c+140>>2]=d+(g<<2);if(!e){break g}oa(e)}b=b+1|0;c=H[a+216>>2];if(b>>>0<(H[a+220>>2]-c|0)/144>>>0){continue}break}}k=k+1|0;if((k|0)!=3){continue}break}ca=h+16|0;return 1}sa();v()}wa();v()}function vg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;m=ca-16|0;ca=m;l=H[b+80>>2];e=I[c+24|0];a=N(l,e);a:{b:{c:{d:{b=H[c+28>>2];if(!(!I[c+84|0]|(b|0)!=1&(b|0)!=2)){b=H[c+48>>2];c=H[H[c>>2]>>2];H[m+8>>2]=0;H[m>>2]=0;H[m+4>>2]=0;if(a){if((a|0)<0){break d}f=pa(a);h=qa(f,b+c|0,a)+a|0}a=H[d>>2];if(a){H[d+4>>2]=a;oa(a)}H[d+8>>2]=h;H[d+4>>2]=h;H[d>>2]=f;b=1;break a}if(e){f=pa(e);ra(f,0,e)}e:{i=H[d+4>>2];b=H[d>>2];g=i-b|0;f:{if(g>>>0>>0){k=a-g|0;j=H[d+8>>2];if(k>>>0<=j-i>>>0){n=d,o=ra(i,0,k)+k|0,H[n+4>>2]=o;break f}if((a|0)<0){break e}i=j-b|0;j=i<<1;i=i>>>0>=1073741823?2147483647:a>>>0>>0?j:a;j=pa(i);ra(j+g|0,0,k);g=va(j,b,g);H[d+8>>2]=g+i;H[d+4>>2]=a+g;H[d>>2]=g;if(!b){break f}oa(b);break f}if(a>>>0>=g>>>0){break f}H[d+4>>2]=a+b}if(!l){b=1;break c}if(!e){b=0;a=0;while(1){if(!ic(c,I[c+84|0]?a:H[H[c+68>>2]+(a<<2)>>2],F[c+24|0],f)){break c}a=a+1|0;b=l>>>0<=a>>>0;if((a|0)!=(l|0)){continue}break}break c}i=e&252;g=e&3;b=0;j=e>>>0<4;e=0;while(1){if(!ic(c,I[c+84|0]?e:H[H[c+68>>2]+(e<<2)>>2],F[c+24|0],f)){break c}b=0;a=0;k=0;if(!j){while(1){F[H[d>>2]+h|0]=I[a+f|0];F[(H[d>>2]+h|0)+1|0]=I[(a|1)+f|0];F[(H[d>>2]+h|0)+2|0]=I[(a|2)+f|0];F[(H[d>>2]+h|0)+3|0]=I[(a|3)+f|0];a=a+4|0;h=h+4|0;k=k+4|0;if((i|0)!=(k|0)){continue}break}}if(g){while(1){F[H[d>>2]+h|0]=I[a+f|0];a=a+1|0;h=h+1|0;b=b+1|0;if((g|0)!=(b|0)){continue}break}}e=e+1|0;b=l>>>0<=e>>>0;if((e|0)!=(l|0)){continue}break}break b}sa();v()}sa();v()}if(!f){break a}}oa(f)}ca=m+16|0;return b&1}function ug(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;m=ca-16|0;ca=m;l=H[b+80>>2];e=I[c+24|0];a=N(l,e);a:{b:{c:{d:{b=H[c+28>>2];if(!(!I[c+84|0]|(b|0)!=1&(b|0)!=2)){b=H[c+48>>2];c=H[H[c>>2]>>2];H[m+8>>2]=0;H[m>>2]=0;H[m+4>>2]=0;if(a){if((a|0)<0){break d}f=pa(a);h=qa(f,b+c|0,a)+a|0}a=H[d>>2];if(a){H[d+4>>2]=a;oa(a)}H[d+8>>2]=h;H[d+4>>2]=h;H[d>>2]=f;b=1;break a}if(e){f=pa(e);ra(f,0,e)}e:{i=H[d+4>>2];b=H[d>>2];g=i-b|0;f:{if(g>>>0>>0){k=a-g|0;j=H[d+8>>2];if(k>>>0<=j-i>>>0){n=d,o=ra(i,0,k)+k|0,H[n+4>>2]=o;break f}if((a|0)<0){break e}i=j-b|0;j=i<<1;i=i>>>0>=1073741823?2147483647:a>>>0>>0?j:a;j=pa(i);ra(j+g|0,0,k);g=va(j,b,g);H[d+8>>2]=g+i;H[d+4>>2]=a+g;H[d>>2]=g;if(!b){break f}oa(b);break f}if(a>>>0>=g>>>0){break f}H[d+4>>2]=a+b}if(!l){b=1;break c}if(!e){b=0;a=0;while(1){if(!hc(c,I[c+84|0]?a:H[H[c+68>>2]+(a<<2)>>2],F[c+24|0],f)){break c}a=a+1|0;b=l>>>0<=a>>>0;if((a|0)!=(l|0)){continue}break}break c}i=e&252;g=e&3;b=0;j=e>>>0<4;e=0;while(1){if(!hc(c,I[c+84|0]?e:H[H[c+68>>2]+(e<<2)>>2],F[c+24|0],f)){break c}b=0;a=0;k=0;if(!j){while(1){F[H[d>>2]+h|0]=I[a+f|0];F[(H[d>>2]+h|0)+1|0]=I[(a|1)+f|0];F[(H[d>>2]+h|0)+2|0]=I[(a|2)+f|0];F[(H[d>>2]+h|0)+3|0]=I[(a|3)+f|0];a=a+4|0;h=h+4|0;k=k+4|0;if((i|0)!=(k|0)){continue}break}}if(g){while(1){F[H[d>>2]+h|0]=I[a+f|0];a=a+1|0;h=h+1|0;b=b+1|0;if((g|0)!=(b|0)){continue}break}}e=e+1|0;b=l>>>0<=e>>>0;if((e|0)!=(l|0)){continue}break}break b}sa();v()}sa();v()}if(!f){break a}}oa(f)}ca=m+16|0;return b&1}function qc(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;k=H[b+16>>2];h=H[c+4>>2]-k|0;e=H[c>>2]-k|0;H[c>>2]=e;f=h;H[c+4>>2]=f;l=H[b+16>>2];f=f>>31;g=(h^f)-f|0;f=e>>31;m=l>>>0>=g+((f^e)-f|0)>>>0;a:{if(m){f=h;break a}b:{c:{if((e|0)>=0){g=1;j=1;if((h|0)>=0){break b}i=1;g=-1;j=-1;if(e){break c}break b}i=-1;g=-1;j=-1;if((h|0)<=0){break b}}g=(h|0)<=0?-1:1;j=i}n=N(j,l);f=(e<<1)-n|0;i=(N(g,j)|0)>=0;e=N(g,l);f=((i?0-f|0:f)+e|0)/2|0;H[c+4>>2]=f;e=(h<<1)-e|0;e=((i?0-e|0:e)+n|0)/2|0;H[c>>2]=e}d:{e:{f:{g:{h:{i:{j:{if(e){if((e|0)<0){break j}if((f|0)>=0){break i}break f}if(f){break h}j=1;g=0;f=0;i=0;break d}j=1;if((f|0)>0){break g}i=(f|0)>0?3:0;g=f;f=e;break d}g=0-f|0;f=0-e|0;i=2;break e}if((f|0)<=0){break f}}f=0-f|0;g=e;i=3;break e}g=0-e|0;i=1}H[c>>2]=f;H[c+4>>2]=g;j=0}e=H[d>>2]+f|0;h=H[b+16>>2];k:{if((e|0)>(h|0)){e=e-H[b+4>>2]|0;break k}if((0-h|0)<=(e|0)){break k}e=H[b+4>>2]+e|0}c=H[d+4>>2]+g|0;l:{if((h|0)<(c|0)){c=c-H[b+4>>2]|0;break l}if((0-h|0)<=(c|0)){break l}c=H[b+4>>2]+c|0}m:{if(j){b=c;break m}b=c;n:{o:{p:{d=4-i|0;switch((d>>>0<4?d:0-i|0)-1|0){case 2:break n;case 1:break o;case 0:break p;default:break m}}b=0-e|0;e=c;break m}b=0-c|0;e=0-e|0;break m}b=e;e=0-c|0}q:{if(m){c=b;break q}r:{s:{if((e|0)>=0){c=1;f=1;if((b|0)>=0){break r}d=1;c=-1;f=-1;if(e){break s}break r}d=-1;c=-1;f=-1;if((b|0)<=0){break r}}c=(b|0)<=0?-1:1;f=d}d=e<<1;e=N(f,h);d=d-e|0;f=(N(c,f)|0)>=0;g=f?0-d|0:d;d=N(c,h);c=(g+d|0)/2|0;b=(b<<1)-d|0;e=(e+(f?0-b|0:b)|0)/2|0}b=a;H[b>>2]=e+k;H[b+4>>2]=c+k}function Cj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;j=ca-32|0;ca=j;H[j+28>>2]=0;a:{b:{if(J[b+38>>1]<=513){c=H[b+20>>2];d=H[b+16>>2];e=d+4|0;c=e>>>0<4?c+1|0:c;h=H[b+12>>2];if(K[b+8>>2]>>0&(h|0)<=(c|0)|(c|0)>(h|0)){break a}d=d+H[b>>2]|0;f=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=e;H[b+20>>2]=c;break b}if(!Xa(1,j+28|0,b)){break a}f=H[j+28>>2]}if(!f){break a}c=H[H[a+48>>2]+64>>2];if(H[c+4>>2]-H[c>>2]>>2>>>0>>0){break a}Wa(a+76|0,f);c=j+8|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c:{if(!ta(c,b)){break c}h=1;while(1){d=1<>2]+(i>>>3&536870908)|0;e=e^h;if(e&1){d=H[g>>2]&(d^-1)}else{d=d|H[g>>2]}h=e^1;H[g>>2]=d;i=i+1|0;if((f|0)!=(i|0)){continue}break}c=H[b+8>>2];e=H[b+12>>2];g=e;e=H[b+20>>2];h=e;f=H[b+16>>2];d=f+4|0;e=d>>>0<4?e+1|0:e;i=d;if(d>>>0>c>>>0&(e|0)>=(g|0)|(e|0)>(g|0)){break c}l=H[b>>2];d=l+f|0;k=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=i;H[b+20>>2]=e;d=c;c=h;e=f+8|0;c=e>>>0<8?c+1|0:c;if(d>>>0>>0&(c|0)>=(g|0)|(c|0)>(g|0)){break c}d=i+l|0;d=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=e;H[b+20>>2]=c;if((d|0)<(k|0)){break c}H[a+16>>2]=d;H[a+12>>2]=k;c=(d>>31)-((k>>31)+(d>>>0>>0)|0)|0;b=d-k|0;if(!c&b>>>0>2147483646|c){break c}m=1;c=b+1|0;H[a+20>>2]=c;b=c>>>1|0;H[a+24>>2]=b;H[a+28>>2]=0-b;if(c&1){break c}H[a+24>>2]=b-1}}ca=j+32|0;return m|0}function lj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;j=ca-32|0;ca=j;H[j+28>>2]=0;a:{b:{if(J[b+38>>1]<=513){c=H[b+20>>2];d=H[b+16>>2];e=d+4|0;c=e>>>0<4?c+1|0:c;h=H[b+12>>2];if(K[b+8>>2]>>0&(h|0)<=(c|0)|(c|0)>(h|0)){break a}d=d+H[b>>2]|0;f=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=e;H[b+20>>2]=c;break b}if(!Xa(1,j+28|0,b)){break a}f=H[j+28>>2]}if(!f){break a}c=H[a+48>>2];if(H[c+4>>2]-H[c>>2]>>2>>>0>>0){break a}Wa(a+76|0,f);c=j+8|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;c:{if(!ta(c,b)){break c}h=1;while(1){d=1<>2]+(i>>>3&536870908)|0;e=e^h;if(e&1){d=H[g>>2]&(d^-1)}else{d=d|H[g>>2]}h=e^1;H[g>>2]=d;i=i+1|0;if((f|0)!=(i|0)){continue}break}c=H[b+8>>2];e=H[b+12>>2];g=e;e=H[b+20>>2];h=e;f=H[b+16>>2];d=f+4|0;e=d>>>0<4?e+1|0:e;i=d;if(d>>>0>c>>>0&(e|0)>=(g|0)|(e|0)>(g|0)){break c}l=H[b>>2];d=l+f|0;k=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=i;H[b+20>>2]=e;d=c;c=h;e=f+8|0;c=e>>>0<8?c+1|0:c;if(d>>>0>>0&(c|0)>=(g|0)|(c|0)>(g|0)){break c}d=i+l|0;d=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=e;H[b+20>>2]=c;if((d|0)<(k|0)){break c}H[a+16>>2]=d;H[a+12>>2]=k;c=(d>>31)-((k>>31)+(d>>>0>>0)|0)|0;b=d-k|0;if(!c&b>>>0>2147483646|c){break c}m=1;c=b+1|0;H[a+20>>2]=c;b=c>>>1|0;H[a+24>>2]=b;H[a+28>>2]=0-b;if(c&1){break c}H[a+24>>2]=b-1}}ca=j+32|0;return m|0}function cj(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;H[a+8>>2]=e;m=a+32|0;h=H[m>>2];g=H[a+36>>2]-h>>2;a:{if(g>>>0>>0){ya(m,e-g|0);f=H[a+8>>2];break a}f=e;if(f>>>0>=g>>>0){break a}H[a+36>>2]=h+(e<<2);f=e}g=e>>>0>1073741823?-1:e<<2;n=ra(pa(g),0,g);b:{if((f|0)<=0){break b}h=H[a+32>>2];while(1){f=i<<2;g=H[f+n>>2];j=H[a+16>>2];c:{if((g|0)>(j|0)){H[f+h>>2]=j;break c}f=f+h|0;j=H[a+12>>2];if((j|0)>(g|0)){H[f>>2]=j;break c}H[f>>2]=g}f=H[a+8>>2];i=i+1|0;if((f|0)>(i|0)){continue}break}if((f|0)<=0){break b}i=0;while(1){g=i<<2;f=g+c|0;g=H[b+g>>2]+H[g+h>>2]|0;H[f>>2]=g;d:{if((g|0)>H[a+16>>2]){g=g-H[a+20>>2]|0}else{if((g|0)>=H[a+12>>2]){break d}g=g+H[a+20>>2]|0}H[f>>2]=g}f=H[a+8>>2];i=i+1|0;if((f|0)>(i|0)){continue}break}}if(!((d|0)<=(e|0)|(f|0)<=0)){p=0-e<<2;g=e;while(1){e:{if((f|0)<=0){break e}l=g<<2;o=l+c|0;q=o+p|0;j=H[m>>2];i=0;while(1){f=i<<2;h=H[f+q>>2];k=H[a+16>>2];f:{if((h|0)>(k|0)){H[f+j>>2]=k;break f}f=f+j|0;k=H[a+12>>2];if((k|0)>(h|0)){H[f>>2]=k;break f}H[f>>2]=h}f=H[a+8>>2];i=i+1|0;if((f|0)>(i|0)){continue}break}i=0;if((f|0)<=0){break e}l=b+l|0;while(1){h=i<<2;f=h+o|0;h=H[h+l>>2]+H[h+j>>2]|0;H[f>>2]=h;g:{if((h|0)>H[a+16>>2]){h=h-H[a+20>>2]|0}else{if((h|0)>=H[a+12>>2]){break g}h=h+H[a+20>>2]|0}H[f>>2]=h}f=H[a+8>>2];i=i+1|0;if((f|0)>(i|0)){continue}break}}g=e+g|0;if((g|0)<(d|0)){continue}break}}oa(n);return 1}function De(a,b){var c=0,d=0,e=0,f=0,g=0;d=-1;f=-1;a:{if((b|0)==-1){break a}c=b+1|0;d=(c>>>0)%3|0?c:b-2|0;f=b-1|0;if((b>>>0)%3|0){break a}f=b+2|0}b:{c:{d:{e:{f:{g:{e=H[a+184>>2];switch(e|0){case 7:break d;case 3:break e;case 5:break f;case 0:case 1:break g;default:break b}}g=H[a+148>>2];c=-1;e=1;d=((d|0)!=-1?H[H[g>>2]+(d<<2)>>2]:c)<<2;c=H[a+156>>2];d=d+c|0;H[d>>2]=H[d>>2]+1;c=(((f|0)==-1?-1:H[H[g>>2]+(f<<2)>>2])<<2)+c|0;break c}g=H[a+148>>2];c=H[a+156>>2];e=c+(((b|0)==-1?-1:H[H[g>>2]+(b<<2)>>2])<<2)|0;H[e>>2]=H[e>>2]+1;d=(((d|0)==-1?-1:H[H[g>>2]+(d<<2)>>2])<<2)+c|0;H[d>>2]=H[d>>2]+1;e=2;c=(((f|0)==-1?-1:H[H[g>>2]+(f<<2)>>2])<<2)+c|0;break c}g=H[a+148>>2];c=H[a+156>>2];e=c+(((b|0)==-1?-1:H[H[g>>2]+(b<<2)>>2])<<2)|0;H[e>>2]=H[e>>2]+1;d=(((d|0)==-1?-1:H[H[g>>2]+(d<<2)>>2])<<2)+c|0;H[d>>2]=H[d>>2]+2;e=1;c=(((f|0)==-1?-1:H[H[g>>2]+(f<<2)>>2])<<2)+c|0;break c}g=H[a+148>>2];c=H[a+156>>2];e=c+(((b|0)==-1?-1:H[H[g>>2]+(b<<2)>>2])<<2)|0;H[e>>2]=H[e>>2]+2;d=(((d|0)==-1?-1:H[H[g>>2]+(d<<2)>>2])<<2)+c|0;H[d>>2]=H[d>>2]+2;e=2;c=(((f|0)==-1?-1:H[H[g>>2]+(f<<2)>>2])<<2)+c|0}H[c>>2]=H[c>>2]+e;e=H[a+184>>2]}h:{switch(e|0){case 0:case 5:f=H[a+156>>2];c=-1;i:{if((b|0)==-1){break i}d=b+1|0;b=(d>>>0)%3|0?d:b-2|0;c=-1;if((b|0)==-1){break i}c=H[H[H[a+148>>2]>>2]+(b<<2)>>2]}if(H[f+(c<<2)>>2]<=5){H[a+188>>2]=5;return}H[a+188>>2]=0;return;default:break h}}H[a+188>>2]=-1}function xg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;j=H[b+80>>2];b=I[c+24|0];g=N(j,b);a:{if(!b){break a}h=b<<2;f=pa(h);a=f;k=b&7;if(k){while(1){H[a>>2]=-1073741824;a=a+4|0;e=e+1|0;if((k|0)!=(e|0)){continue}break}}if((b-1&1073741823)>>>0<7){break a}e=f+h|0;while(1){H[a+24>>2]=-1073741824;H[a+28>>2]=-1073741824;H[a+16>>2]=-1073741824;H[a+20>>2]=-1073741824;H[a+8>>2]=-1073741824;H[a+12>>2]=-1073741824;H[a>>2]=-1073741824;H[a+4>>2]=-1073741824;a=a+32|0;if((e|0)!=(a|0)){continue}break}}e=H[d>>2];a=H[d+4>>2]-e>>2;b:{if(a>>>0>>0){ya(d,g-a|0);break b}if(a>>>0<=g>>>0){break b}H[d+4>>2]=e+(g<<2)}c:{d:{e:{if(!j){i=1;break e}if(!b){a=0;while(1){if(!Va(c,I[c+84|0]?a:H[H[c+68>>2]+(a<<2)>>2],F[c+24|0],f)){break e}a=a+1|0;i=j>>>0<=a>>>0;if((a|0)!=(j|0)){continue}break}break e}n=b&252;k=b&3;o=b>>>0<4;e=0;b=0;while(1){if(!Va(c,I[c+84|0]?b:H[H[c+68>>2]+(b<<2)>>2],F[c+24|0],f)){break e}m=H[d>>2];i=0;a=0;l=0;if(!o){while(1){g=(e<<2)+m|0;h=a<<2;L[g>>2]=L[h+f>>2];L[g+4>>2]=L[(h|4)+f>>2];L[g+8>>2]=L[(h|8)+f>>2];L[g+12>>2]=L[(h|12)+f>>2];a=a+4|0;e=e+4|0;l=l+4|0;if((n|0)!=(l|0)){continue}break}}if(k){while(1){L[(e<<2)+m>>2]=L[(a<<2)+f>>2];a=a+1|0;e=e+1|0;i=i+1|0;if((k|0)!=(i|0)){continue}break}}b=b+1|0;i=j>>>0<=b>>>0;if((b|0)!=(j|0)){continue}break}break d}if(!f){break c}}oa(f)}return i|0}function mf(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=ca-16|0;ca=e;h=1;i=ea[H[H[a>>2]+24>>2]](a)|0;a:{if((i|0)<=0){break a}l=a+48|0;h=0;while(1){b:{c:{if(!H[(ea[H[H[a>>2]+28>>2]](a)|0)+40>>2]){break c}j=f<<2;g=H[j+H[a+36>>2]>>2];b=H[g+8>>2];k=rb(g);if(!k){break c}g=H[(ea[H[H[a>>2]+28>>2]](a)|0)+40>>2];H[e+12>>2]=H[b+56>>2];b=pa(32);H[e>>2]=b;H[e+4>>2]=24;H[e+8>>2]=-2147483616;c=I[1206]|I[1207]<<8|(I[1208]<<16|I[1209]<<24);d=I[1202]|I[1203]<<8|(I[1204]<<16|I[1205]<<24);F[b+16|0]=d;F[b+17|0]=d>>>8;F[b+18|0]=d>>>16;F[b+19|0]=d>>>24;F[b+20|0]=c;F[b+21|0]=c>>>8;F[b+22|0]=c>>>16;F[b+23|0]=c>>>24;c=I[1198]|I[1199]<<8|(I[1200]<<16|I[1201]<<24);d=I[1194]|I[1195]<<8|(I[1196]<<16|I[1197]<<24);F[b+8|0]=d;F[b+9|0]=d>>>8;F[b+10|0]=d>>>16;F[b+11|0]=d>>>24;F[b+12|0]=c;F[b+13|0]=c>>>8;F[b+14|0]=c>>>16;F[b+15|0]=c>>>24;c=I[1190]|I[1191]<<8|(I[1192]<<16|I[1193]<<24);d=I[1186]|I[1187]<<8|(I[1188]<<16|I[1189]<<24);F[b|0]=d;F[b+1|0]=d>>>8;F[b+2|0]=d>>>16;F[b+3|0]=d>>>24;F[b+4|0]=c;F[b+5|0]=c>>>8;F[b+6|0]=c>>>16;F[b+7|0]=c>>>24;F[b+24|0]=0;b=sd(g,e+12|0,e);if(F[e+11|0]<0){oa(H[e>>2])}if(!b){break c}oe(H[H[H[a+36>>2]+j>>2]+8>>2],k);break b}b=H[H[a+36>>2]+(f<<2)>>2];if(!(ea[H[H[b>>2]+24>>2]](b,l)|0)){break a}}f=f+1|0;h=(i|0)<=(f|0);if((f|0)!=(i|0)){continue}break}}ca=e+16|0;return h|0}function Ye(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;k=ca-16|0;ca=k;c=H[b+20>>2];d=H[b+16>>2];e=d+4|0;c=e>>>0<4?c+1|0:c;g=H[b+12>>2];a:{if(K[b+8>>2]>>0&(g|0)<=(c|0)|(c|0)>(g|0)){break a}d=d+H[b>>2]|0;h=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=e;H[b+20>>2]=c;if((h|0)<0){break a}Wa(a+76|0,h);c=k;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;b:{if(!ta(c,b)){break b}if(h){g=1;while(1){d=1<>2]+(i>>>3&536870908)|0;e=e^g;if(e&1){d=H[f>>2]&(d^-1)}else{d=d|H[f>>2]}g=e^1;H[f>>2]=d;i=i+1|0;if((h|0)!=(i|0)){continue}break}}i=0;c=H[b+8>>2];e=H[b+12>>2];f=e;e=H[b+20>>2];g=e;l=H[b+16>>2];d=l+4|0;e=d>>>0<4?e+1|0:e;h=d;if(d>>>0>c>>>0&(e|0)>=(f|0)|(e|0)>(f|0)){break b}m=H[b>>2];d=m+l|0;j=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=h;H[b+20>>2]=e;d=c;c=g;e=l+8|0;c=e>>>0<8?c+1|0:c;if(d>>>0>>0&(c|0)>=(f|0)|(c|0)>(f|0)){break b}d=h+m|0;d=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=e;H[b+20>>2]=c;if((d|0)<(j|0)){break b}H[a+16>>2]=d;H[a+12>>2]=j;c=(d>>31)-((j>>31)+(d>>>0>>0)|0)|0;b=d-j|0;if(!c&b>>>0>2147483646|c){break b}i=1;c=b+1|0;H[a+20>>2]=c;b=c>>>1|0;H[a+24>>2]=b;H[a+28>>2]=0-b;if(c&1){break b}H[a+24>>2]=b-1}}ca=k+16|0;return i|0}function rg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;a=0;k=ca-16|0;ca=k;j=H[b+80>>2];e=I[c+24|0];b=N(j,e);a:{b:{c:{d:{f=H[c+28>>2];if(!(!I[c+84|0]|(f|0)!=5&(f|0)!=6)){e=H[c+48>>2];c=H[H[c>>2]>>2];H[k+8>>2]=0;H[k>>2]=0;H[k+4>>2]=0;if(b){if((b|0)<0){break d}b=b<<2;a=pa(b);g=qa(a,c+e|0,b)+b|0}b=H[d>>2];if(b){H[d+4>>2]=b;oa(b)}H[d+8>>2]=g;H[d+4>>2]=g;H[d>>2]=a;h=1;break a}if(e){f=e<<2;a=pa(f);ra(a,0,f)}i=H[d>>2];f=H[d+4>>2]-i>>2;e:{if(f>>>0>>0){ya(d,b-f|0);break e}if(b>>>0>=f>>>0){break e}H[d+4>>2]=i+(b<<2)}if(!j){h=1;break c}if(!e){b=0;while(1){if(!dc(c,I[c+84|0]?b:H[H[c+68>>2]+(b<<2)>>2],F[c+24|0],a)){break c}b=b+1|0;h=j>>>0<=b>>>0;if((b|0)!=(j|0)){continue}break}break c}o=e&252;m=e&3;p=e>>>0<4;e=0;while(1){if(!dc(c,I[c+84|0]?e:H[H[c+68>>2]+(e<<2)>>2],F[c+24|0],a)){break c}n=H[d>>2];l=0;b=0;h=0;if(!p){while(1){f=(g<<2)+n|0;i=b<<2;H[f>>2]=H[i+a>>2];H[f+4>>2]=H[(i|4)+a>>2];H[f+8>>2]=H[(i|8)+a>>2];H[f+12>>2]=H[(i|12)+a>>2];b=b+4|0;g=g+4|0;h=h+4|0;if((o|0)!=(h|0)){continue}break}}if(m){while(1){H[(g<<2)+n>>2]=H[(b<<2)+a>>2];b=b+1|0;g=g+1|0;l=l+1|0;if((l|0)!=(m|0)){continue}break}}e=e+1|0;h=j>>>0<=e>>>0;if((e|0)!=(j|0)){continue}break}break b}sa();v()}if(!a){break a}}oa(a)}ca=k+16|0;return h|0}function ge(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;a=0;k=ca-16|0;ca=k;j=H[b+80>>2];e=I[c+24|0];b=N(j,e);a:{b:{c:{d:{f=H[c+28>>2];if(!(!I[c+84|0]|(f|0)!=5&(f|0)!=6)){e=H[c+48>>2];c=H[H[c>>2]>>2];H[k+8>>2]=0;H[k>>2]=0;H[k+4>>2]=0;if(b){if((b|0)<0){break d}b=b<<2;a=pa(b);g=qa(a,c+e|0,b)+b|0}b=H[d>>2];if(b){H[d+4>>2]=b;oa(b)}H[d+8>>2]=g;H[d+4>>2]=g;H[d>>2]=a;h=1;break a}if(e){f=e<<2;a=pa(f);ra(a,0,f)}i=H[d>>2];f=H[d+4>>2]-i>>2;e:{if(f>>>0>>0){ya(d,b-f|0);break e}if(b>>>0>=f>>>0){break e}H[d+4>>2]=i+(b<<2)}if(!j){h=1;break c}if(!e){b=0;while(1){if(!ec(c,I[c+84|0]?b:H[H[c+68>>2]+(b<<2)>>2],F[c+24|0],a)){break c}b=b+1|0;h=j>>>0<=b>>>0;if((b|0)!=(j|0)){continue}break}break c}o=e&252;m=e&3;p=e>>>0<4;e=0;while(1){if(!ec(c,I[c+84|0]?e:H[H[c+68>>2]+(e<<2)>>2],F[c+24|0],a)){break c}n=H[d>>2];l=0;b=0;h=0;if(!p){while(1){f=(g<<2)+n|0;i=b<<2;H[f>>2]=H[i+a>>2];H[f+4>>2]=H[(i|4)+a>>2];H[f+8>>2]=H[(i|8)+a>>2];H[f+12>>2]=H[(i|12)+a>>2];b=b+4|0;g=g+4|0;h=h+4|0;if((o|0)!=(h|0)){continue}break}}if(m){while(1){H[(g<<2)+n>>2]=H[(b<<2)+a>>2];b=b+1|0;g=g+1|0;l=l+1|0;if((l|0)!=(m|0)){continue}break}}e=e+1|0;h=j>>>0<=e>>>0;if((e|0)!=(j|0)){continue}break}break b}sa();v()}if(!a){break a}}oa(a)}ca=k+16|0;return h|0}function tg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;a=0;k=ca-16|0;ca=k;j=H[b+80>>2];e=I[c+24|0];b=N(j,e);a:{b:{c:{d:{f=H[c+28>>2];if(!(!I[c+84|0]|(f|0)!=3&(f|0)!=4)){e=H[c+48>>2];c=H[H[c>>2]>>2];H[k+8>>2]=0;H[k>>2]=0;H[k+4>>2]=0;if(b){if((b|0)<0){break d}b=b<<1;a=pa(b);g=qa(a,c+e|0,b)+b|0}b=H[d>>2];if(b){H[d+4>>2]=b;oa(b)}H[d+8>>2]=g;H[d+4>>2]=g;H[d>>2]=a;h=1;break a}if(e){f=e<<1;a=pa(f);ra(a,0,f)}i=H[d>>2];f=H[d+4>>2]-i>>1;e:{if(f>>>0>>0){qe(d,b-f|0);break e}if(b>>>0>=f>>>0){break e}H[d+4>>2]=i+(b<<1)}if(!j){h=1;break c}if(!e){b=0;while(1){if(!gc(c,I[c+84|0]?b:H[H[c+68>>2]+(b<<2)>>2],F[c+24|0],a)){break c}b=b+1|0;h=j>>>0<=b>>>0;if((b|0)!=(j|0)){continue}break}break c}o=e&252;m=e&3;p=e>>>0<4;e=0;while(1){if(!gc(c,I[c+84|0]?e:H[H[c+68>>2]+(e<<2)>>2],F[c+24|0],a)){break c}n=H[d>>2];l=0;b=0;h=0;if(!p){while(1){f=(g<<1)+n|0;i=b<<1;G[f>>1]=J[i+a>>1];G[f+2>>1]=J[(i|2)+a>>1];G[f+4>>1]=J[(i|4)+a>>1];G[f+6>>1]=J[(i|6)+a>>1];b=b+4|0;g=g+4|0;h=h+4|0;if((o|0)!=(h|0)){continue}break}}if(m){while(1){G[(g<<1)+n>>1]=J[(b<<1)+a>>1];b=b+1|0;g=g+1|0;l=l+1|0;if((l|0)!=(m|0)){continue}break}}e=e+1|0;h=j>>>0<=e>>>0;if((e|0)!=(j|0)){continue}break}break b}sa();v()}if(!a){break a}}oa(a)}ca=k+16|0;return h|0}function sg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;a=0;k=ca-16|0;ca=k;j=H[b+80>>2];e=I[c+24|0];b=N(j,e);a:{b:{c:{d:{f=H[c+28>>2];if(!(!I[c+84|0]|(f|0)!=3&(f|0)!=4)){e=H[c+48>>2];c=H[H[c>>2]>>2];H[k+8>>2]=0;H[k>>2]=0;H[k+4>>2]=0;if(b){if((b|0)<0){break d}b=b<<1;a=pa(b);g=qa(a,c+e|0,b)+b|0}b=H[d>>2];if(b){H[d+4>>2]=b;oa(b)}H[d+8>>2]=g;H[d+4>>2]=g;H[d>>2]=a;h=1;break a}if(e){f=e<<1;a=pa(f);ra(a,0,f)}i=H[d>>2];f=H[d+4>>2]-i>>1;e:{if(f>>>0>>0){qe(d,b-f|0);break e}if(b>>>0>=f>>>0){break e}H[d+4>>2]=i+(b<<1)}if(!j){h=1;break c}if(!e){b=0;while(1){if(!fc(c,I[c+84|0]?b:H[H[c+68>>2]+(b<<2)>>2],F[c+24|0],a)){break c}b=b+1|0;h=j>>>0<=b>>>0;if((b|0)!=(j|0)){continue}break}break c}o=e&252;m=e&3;p=e>>>0<4;e=0;while(1){if(!fc(c,I[c+84|0]?e:H[H[c+68>>2]+(e<<2)>>2],F[c+24|0],a)){break c}n=H[d>>2];l=0;b=0;h=0;if(!p){while(1){f=(g<<1)+n|0;i=b<<1;G[f>>1]=J[i+a>>1];G[f+2>>1]=J[(i|2)+a>>1];G[f+4>>1]=J[(i|4)+a>>1];G[f+6>>1]=J[(i|6)+a>>1];b=b+4|0;g=g+4|0;h=h+4|0;if((o|0)!=(h|0)){continue}break}}if(m){while(1){G[(g<<1)+n>>1]=J[(b<<1)+a>>1];b=b+1|0;g=g+1|0;l=l+1|0;if((l|0)!=(m|0)){continue}break}}e=e+1|0;h=j>>>0<=e>>>0;if((e|0)!=(j|0)){continue}break}break b}sa();v()}if(!a){break a}}oa(a)}ca=k+16|0;return h|0}function Ce(a,b){var c=0,d=0,e=0,f=0,g=0;f=-1;d=-1;a:{if((b|0)==-1){break a}d=b+1|0;f=(d>>>0)%3|0?d:b-2|0;d=b-1|0;if((b>>>0)%3|0){break a}d=b+2|0}b:{c:{d:{switch(H[a+168>>2]){case 0:case 1:e=H[a+148>>2];c=1;b=H[a+156>>2];g=b+(((f|0)==-1?-1:H[H[e>>2]+(f<<2)>>2])<<2)|0;H[g>>2]=H[g>>2]+1;b=(((d|0)==-1?-1:H[H[e>>2]+(d<<2)>>2])<<2)+b|0;break c;case 5:e=H[a+148>>2];c=-1;c=((b|0)!=-1?H[H[e>>2]+(b<<2)>>2]:c)<<2;b=H[a+156>>2];c=c+b|0;H[c>>2]=H[c>>2]+1;c=(((f|0)==-1?-1:H[H[e>>2]+(f<<2)>>2])<<2)+b|0;H[c>>2]=H[c>>2]+1;c=2;b=(((d|0)==-1?-1:H[H[e>>2]+(d<<2)>>2])<<2)+b|0;break c;case 3:e=H[a+148>>2];c=-1;c=((b|0)!=-1?H[H[e>>2]+(b<<2)>>2]:c)<<2;b=H[a+156>>2];c=c+b|0;H[c>>2]=H[c>>2]+1;c=(((f|0)==-1?-1:H[H[e>>2]+(f<<2)>>2])<<2)+b|0;H[c>>2]=H[c>>2]+2;c=1;b=(((d|0)==-1?-1:H[H[e>>2]+(d<<2)>>2])<<2)+b|0;break c;case 7:break d;default:break b}}e=H[a+148>>2];c=-1;c=((b|0)!=-1?H[H[e>>2]+(b<<2)>>2]:c)<<2;b=H[a+156>>2];c=c+b|0;H[c>>2]=H[c>>2]+2;c=(((f|0)==-1?-1:H[H[e>>2]+(f<<2)>>2])<<2)+b|0;H[c>>2]=H[c>>2]+2;c=2;b=(((d|0)==-1?-1:H[H[e>>2]+(d<<2)>>2])<<2)+b|0}H[b>>2]=H[b>>2]+c}c=a;b=H[H[a+156>>2]+(((f|0)==-1?-1:H[H[H[a+148>>2]>>2]+(f<<2)>>2])<<2)>>2];d=H[a+180>>2];a=H[a+176>>2];H[c+172>>2]=(a|0)<=(b|0)?((b|0)<(d|0)?b:d)-a|0:0}function Ac(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;H[a+16>>2]=0;H[a+20>>2]=0;H[a+8>>2]=0;H[a>>2]=0;H[a+4>>2]=0;H[a+24>>2]=0;f=H[b+4>>2];g=H[b>>2];e=f-g|0;c=(e|0)/20|0;a:{if((f|0)==(g|0)){break a}b:{if(c>>>0<214748365){f=pa(e);H[a+20>>2]=f;H[a+16>>2]=f;H[a+24>>2]=f+N(c,20);c=H[b>>2];g=H[b+4>>2];if((c|0)==(g|0)){break a}b=f;while(1){e=H[c+4>>2];H[b>>2]=H[c>>2];H[b+4>>2]=e;H[b+16>>2]=H[c+16>>2];e=H[c+12>>2];H[b+8>>2]=H[c+8>>2];H[b+12>>2]=e;b=b+20|0;c=c+20|0;if((g|0)!=(c|0)){continue}break}g=0;H[a+28>>2]=0;H[a+20>>2]=b;if((b|0)!=(f|0)){b=(b-f|0)/20|0;e=b>>>0<=1?1:b;h=e&3;b=0;c=0;if(e-1>>>0>=3){i=e&-4;e=0;while(1){d=f+N(b,20)|0;d=N(H[d+16>>2],H[d+12>>2]);c=c>>>0>d>>>0?c:d;d=f+N(b|1,20)|0;d=N(H[d+16>>2],H[d+12>>2]);c=c>>>0>d>>>0?c:d;d=f+N(b|2,20)|0;d=N(H[d+16>>2],H[d+12>>2]);c=c>>>0>d>>>0?c:d;d=f+N(b|3,20)|0;d=N(H[d+16>>2],H[d+12>>2]);c=c>>>0>d>>>0?c:d;b=b+4|0;e=e+4|0;if((i|0)!=(e|0)){continue}break}}if(h){while(1){e=f+N(b,20)|0;e=N(H[e+16>>2],H[e+12>>2]);c=c>>>0>e>>>0?c:e;b=b+1|0;g=g+1|0;if((h|0)!=(g|0)){continue}break}}if(!c){H[a+12>>2]=0;return a}if((c|0)<0){break b}g=pa(c);b=ra(g,0,c);f=b+c|0;H[a+8>>2]=f;H[a+4>>2]=f;H[a>>2]=b}H[a+12>>2]=g;return a}sa();v()}sa();v()}H[a+28>>2]=0;H[a+12>>2]=0;return a}function Dh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;a:{b=H[a+32>>2];f=H[b+8>>2];h=H[b+12>>2];g=H[b+20>>2];c=H[b+16>>2];e=0;b:{if((h|0)<=(g|0)&c>>>0>=f>>>0|(g|0)>(h|0)){break b}f=I[H[b>>2]+c|0];e=b;b=g;c=c+1|0;b=c?b:b+1|0;H[e+16>>2]=c;H[e+20>>2]=b;c:{if(!f){break c}while(1){if(ea[H[H[a>>2]+16>>2]](a,d)|0){d=d+1|0;if((f|0)!=(d|0)){continue}break c}break}return 0}d=H[a+8>>2];b=H[a+12>>2];if((d|0)!=(b|0)){while(1){c=H[d>>2];if(!(ea[H[H[c>>2]+8>>2]](c,a,H[a+4>>2])|0)){break a}d=d+4|0;if((b|0)!=(d|0)){continue}break}}d:{if(!f){break d}d=0;while(1){b=H[H[a+8>>2]+(d<<2)>>2];if(!(ea[H[H[b>>2]+12>>2]](b,H[a+32>>2])|0)){break a}d=d+1|0;if((f|0)!=(d|0)){continue}break}if(!f){break d}i=a+20|0;b=0;while(1){d=0;j=b<<2;c=H[j+H[a+8>>2]>>2];k=ea[H[H[c>>2]+24>>2]](c)|0;if((k|0)>0){while(1){c=H[H[a+8>>2]+j>>2];c=ea[H[H[c>>2]+20>>2]](c,d)|0;e=H[a+20>>2];g=H[a+24>>2]-e>>2;e:{if(c>>>0>>0){break e}h=c+1|0;if(h>>>0>g>>>0){ya(i,h-g|0);e=H[i>>2];break e}if(g>>>0<=h>>>0){break e}H[a+24>>2]=(h<<2)+e}H[(c<<2)+e>>2]=b;d=d+1|0;if((k|0)!=(d|0)){continue}break}}b=b+1|0;if((f|0)!=(b|0)){continue}break}}e=0;if(!(ea[H[H[a>>2]+28>>2]](a)|0)){break b}e=ea[H[H[a>>2]+32>>2]](a)|0}return e|0}return 0}function ta(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=ca-16|0;ca=i;f=H[b+20>>2];d=H[b+12>>2];c=H[b+16>>2];a:{if((f|0)>=(d|0)&c>>>0>=K[b+8>>2]|(d|0)<(f|0)){break a}F[a+12|0]=I[c+H[b>>2]|0];c=H[b+20>>2];g=c;f=H[b+16>>2];e=f+1|0;c=e?c:c+1|0;H[b+16>>2]=e;H[b+20>>2]=c;b:{if(J[b+38>>1]<=513){d=H[b+8>>2];c=H[b+12>>2];h=c;c=g;f=f+5|0;c=f>>>0<5?c+1|0:c;if(d>>>0>>0&(c|0)>=(h|0)|(c|0)>(h|0)){break a}e=e+H[b>>2]|0;e=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);H[b+16>>2]=f;H[b+20>>2]=c;break b}if(!Qe(1,i+12|0,b)){break a}f=H[b+16>>2];c=H[b+20>>2];d=H[b+8>>2];h=H[b+12>>2];e=H[i+12>>2]}g=d-f|0;d=h-(c+(d>>>0>>0)|0)|0;if((d|0)<=0&e>>>0>g>>>0|(d|0)<0|(e|0)<=0){break a}j=H[b>>2]+f|0;H[a>>2]=j;c:{d:{h=e-1|0;g=h+j|0;d=I[g|0];e:{if(d>>>0<=63){H[a+4>>2]=h;g=I[g|0]&63;break e}f:{switch((d>>>6|0)-1|0){case 1:break d;case 0:break f;default:break a}}if(e>>>0<2){break a}d=e-2|0;H[a+4>>2]=d;d=d+j|0;g=I[d+1|0]<<8&16128|I[d|0]}H[a+8>>2]=g+4096;break c}if(e>>>0<3){break a}d=e-3|0;H[a+4>>2]=d;g=a;a=d+j|0;a=I[a+1|0]<<8|I[a+2|0]<<16&4128768|I[a|0];H[g+8>>2]=a+4096;if(a>>>0>1044479){break a}}a=e+f|0;c=a>>>0>>0?c+1|0:c;H[b+16>>2]=a;H[b+20>>2]=c;k=1}ca=i+16|0;return k}function Wf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;Xd(a,b,c);c=H[a+84>>2];d=H[a+88>>2]-c>>2;a:{if((d|0)>(b|0)){break a}b=b+1|0;if(b>>>0>d>>>0){b:{d=b-d|0;e=H[a+92>>2];c=H[a+88>>2];if(d>>>0<=e-c>>2>>>0){c:{if(!d){break c}b=c;e=d&7;if(e){while(1){H[b>>2]=1;b=b+4|0;f=f+1|0;if((e|0)!=(f|0)){continue}break}}c=(d<<2)+c|0;if((d-1&1073741823)>>>0<7){break c}while(1){H[b+24>>2]=1;H[b+28>>2]=1;H[b+16>>2]=1;H[b+20>>2]=1;H[b+8>>2]=1;H[b+12>>2]=1;H[b>>2]=1;H[b+4>>2]=1;b=b+32|0;if((c|0)!=(b|0)){continue}break}}H[a+88>>2]=c;break b}d:{b=c;c=H[a+84>>2];i=b-c|0;g=i>>2;b=g+d|0;if(b>>>0<1073741824){e=e-c|0;h=e>>>1|0;e=e>>>0>=2147483644?1073741823:b>>>0>>0?h:b;if(e){if(e>>>0>=1073741824){break d}j=pa(e<<2)}g=(g<<2)+j|0;b=g;h=d&7;if(h){while(1){H[b>>2]=1;b=b+4|0;f=f+1|0;if((h|0)!=(f|0)){continue}break}}f=g+(d<<2)|0;if((d-1&1073741823)>>>0>=7){while(1){H[b+24>>2]=1;H[b+28>>2]=1;H[b+16>>2]=1;H[b+20>>2]=1;H[b+8>>2]=1;H[b+12>>2]=1;H[b>>2]=1;H[b+4>>2]=1;b=b+32|0;if((f|0)!=(b|0)){continue}break}}b=va(j,c,i);H[a+88>>2]=f;H[a+84>>2]=b;H[a+92>>2]=b+(e<<2);if(c){oa(c)}break b}sa();v()}wa();v()}return}if(b>>>0>=d>>>0){break a}H[a+88>>2]=c+(b<<2)}}function qb(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=H[a+8>>2];e=H[a+4>>2];if(d-e>>2>>>0>=b>>>0){a:{if(!b){break a}d=e;g=b&7;if(g){while(1){H[d>>2]=H[c>>2];d=d+4|0;f=f+1|0;if((g|0)!=(f|0)){continue}break}}e=(b<<2)+e|0;if((b-1&1073741823)>>>0<7){break a}while(1){H[d>>2]=H[c>>2];H[d+4>>2]=H[c>>2];H[d+8>>2]=H[c>>2];H[d+12>>2]=H[c>>2];H[d+16>>2]=H[c>>2];H[d+20>>2]=H[c>>2];H[d+24>>2]=H[c>>2];H[d+28>>2]=H[c>>2];d=d+32|0;if((e|0)!=(d|0)){continue}break}}H[a+4>>2]=e;return}b:{i=H[a>>2];f=e-i>>2;h=f+b|0;if(h>>>0<1073741824){j=d-i|0;d=j>>>1|0;h=j>>>0>=2147483644?1073741823:d>>>0>h>>>0?d:h;if(h){if(h>>>0>=1073741824){break b}k=pa(h<<2)}f=(f<<2)+k|0;d=f;j=b&7;if(j){while(1){H[d>>2]=H[c>>2];d=d+4|0;g=g+1|0;if((j|0)!=(g|0)){continue}break}}g=(b<<2)+f|0;if((b-1&1073741823)>>>0>=7){while(1){H[d>>2]=H[c>>2];H[d+4>>2]=H[c>>2];H[d+8>>2]=H[c>>2];H[d+12>>2]=H[c>>2];H[d+16>>2]=H[c>>2];H[d+20>>2]=H[c>>2];H[d+24>>2]=H[c>>2];H[d+28>>2]=H[c>>2];d=d+32|0;if((g|0)!=(d|0)){continue}break}}if((e|0)!=(i|0)){while(1){f=f-4|0;e=e-4|0;H[f>>2]=H[e>>2];if((e|0)!=(i|0)){continue}break}}H[a+8>>2]=(h<<2)+k;H[a+4>>2]=g;H[a>>2]=f;if(i){oa(i)}return}sa();v()}wa();v()}function Kc(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=H[a+8>>2];e=H[a>>2];if(d-e>>2>>>0>=b>>>0){f=H[a+4>>2];h=f-e>>2;i=b>>>0>h>>>0?h:b;a:{if(!i){break a}d=e;g=i;j=g&7;if(j){while(1){H[d>>2]=H[c>>2];g=g-1|0;d=d+4|0;k=k+1|0;if((k|0)!=(j|0)){continue}break}}if(i>>>0<8){break a}while(1){H[d>>2]=H[c>>2];H[d+4>>2]=H[c>>2];H[d+8>>2]=H[c>>2];H[d+12>>2]=H[c>>2];H[d+16>>2]=H[c>>2];H[d+20>>2]=H[c>>2];H[d+24>>2]=H[c>>2];H[d+28>>2]=H[c>>2];d=d+32|0;g=g-8|0;if(g){continue}break}}if(b>>>0>h>>>0){b=(b-h<<2)+f|0;while(1){H[f>>2]=H[c>>2];f=f+4|0;if((b|0)!=(f|0)){continue}break}H[a+4>>2]=b;return}H[a+4>>2]=e+(b<<2);return}if(e){H[a+4>>2]=e;oa(e);H[a+8>>2]=0;H[a>>2]=0;H[a+4>>2]=0;d=0}b:{if(b>>>0>=1073741824){break b}e=d>>>1|0;d=d>>>0>=2147483644?1073741823:b>>>0>>0?e:b;if(d>>>0>=1073741824){break b}d=d<<2;e=pa(d);H[a>>2]=e;H[a+8>>2]=d+e;c=H[c>>2];d=e;g=b&7;if(g){while(1){H[d>>2]=c;d=d+4|0;f=f+1|0;if((g|0)!=(f|0)){continue}break}}e=e+(b<<2)|0;if((b-1&1073741823)>>>0>=7){while(1){H[d+28>>2]=c;H[d+24>>2]=c;H[d+20>>2]=c;H[d+16>>2]=c;H[d+12>>2]=c;H[d+8>>2]=c;H[d+4>>2]=c;H[d>>2]=c;d=d+32|0;if((e|0)!=(d|0)){continue}break}}H[a+4>>2]=e;return}sa();v()}function Me(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;h=ca-16|0;ca=h;a:{b:{if(J[b+38>>1]<=511){e=H[b+8>>2];c=H[b+12>>2];i=c;f=H[b+20>>2];d=H[b+16>>2];g=d+8|0;f=g>>>0<8?f+1|0:f;if(e>>>0>>0&(c|0)<=(f|0)|(c|0)<(f|0)){break a}d=d+H[b>>2]|0;c=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);d=I[d+4|0]|I[d+5|0]<<8|(I[d+6|0]<<16|I[d+7|0]<<24);H[b+16>>2]=g;H[b+20>>2]=f;break b}if(!gb(1,h+8|0,b)){break a}g=H[b+16>>2];f=H[b+20>>2];e=H[b+8>>2];i=H[b+12>>2];c=H[h+8>>2];d=H[h+12>>2]}j=e-g|0;e=i-(f+(e>>>0>>0)|0)|0;if((e|0)==(d|0)&c>>>0>j>>>0|d>>>0>e>>>0){break a}e=d+f|0;f=c+g|0;e=f>>>0>>0?e+1|0:e;H[b+16>>2]=f;H[b+20>>2]=e;if((c|0)<=0){break a}b=H[b>>2]+g|0;H[a+40>>2]=b;g=c-1|0;e=b+g|0;f=I[e|0];c:{if(f>>>0<=63){H[a+44>>2]=g;b=I[e|0]&63;break c}d:{switch((f>>>6|0)-1|0){case 0:if(c>>>0<2){break a}c=c-2|0;H[a+44>>2]=c;b=b+c|0;b=I[b+1|0]<<8&16128|I[b|0];break c;case 1:if(c>>>0<3){break a}c=c-3|0;H[a+44>>2]=c;b=b+c|0;b=I[b+1|0]<<8|I[b+2|0]<<16&4128768|I[b|0];break c;default:break d}}c=c-4|0;H[a+44>>2]=c;b=b+c|0;b=(I[b|0]|I[b+1|0]<<8|(I[b+2|0]<<16|I[b+3|0]<<24))&1073741823}H[a+48>>2]=b+16384;k=b>>>0<4177920}ca=h+16|0;return k}function Ua(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=(c>>>0)/3|0;j=H[(H[H[a+8>>2]+96>>2]+N(f,12)|0)+(c-N(f,3)<<2)>>2];a:{h=H[H[a+12>>2]+4>>2];e=H[h+4>>2];if((e|0)!=H[h+8>>2]){H[e>>2]=j;H[h+4>>2]=e+4;break a}b:{i=H[h>>2];f=e-i|0;g=f>>2;d=g+1|0;if(d>>>0<1073741824){k=g<<2;g=f>>>1|0;g=f>>>0>=2147483644?1073741823:d>>>0>>0?g:d;if(g){if(g>>>0>=1073741824){break b}f=pa(g<<2)}else{f=0}d=k+f|0;H[d>>2]=j;j=d+4|0;if((e|0)!=(i|0)){while(1){d=d-4|0;e=e-4|0;H[d>>2]=H[e>>2];if((e|0)!=(i|0)){continue}break}}H[h+8>>2]=f+(g<<2);H[h+4>>2]=j;H[h>>2]=d;if(i){oa(i)}break a}sa();v()}wa();v()}c:{d:{h=H[a+4>>2];e=H[h+4>>2];e:{if((e|0)!=H[h+8>>2]){H[e>>2]=c;H[h+4>>2]=e+4;break e}i=H[h>>2];f=e-i|0;j=f>>2;d=j+1|0;if(d>>>0>=1073741824){break d}g=f>>>1|0;g=f>>>0>=2147483644?1073741823:d>>>0>>0?g:d;if(g){if(g>>>0>=1073741824){break c}f=pa(g<<2)}else{f=0}d=f+(j<<2)|0;H[d>>2]=c;c=d+4|0;if((e|0)!=(i|0)){while(1){d=d-4|0;e=e-4|0;H[d>>2]=H[e>>2];if((e|0)!=(i|0)){continue}break}}H[h+8>>2]=f+(g<<2);H[h+4>>2]=c;H[h>>2]=d;if(!i){break e}oa(i)}a=H[a+4>>2];H[H[a+12>>2]+(b<<2)>>2]=H[a+24>>2];H[a+24>>2]=H[a+24>>2]+1;return}sa();v()}wa();v()}function Wb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;h=d-c|0;if((h|0)<=0){return}a:{e=H[a+8>>2];i=H[a+4>>2];if((e-i|0)>=(h|0)){j=i-b|0;if((j|0)>=(h|0)){f=i;g=d;break a}f=i;g=c+j|0;if((g|0)!=(d|0)){e=g;while(1){F[f|0]=I[e|0];f=f+1|0;e=e+1|0;if((e|0)!=(d|0)){continue}break}}H[a+4>>2]=f;if((j|0)>0){break a}return}k=H[a>>2];g=(i-k|0)+h|0;if((g|0)>=0){j=b-k|0;f=e-k|0;e=f<<1;f=f>>>0>=1073741823?2147483647:e>>>0>g>>>0?e:g;if(f){e=pa(f)}else{e=0}g=j+e|0;if((c|0)!=(d|0)){g=qa(g,c,h)+h|0}d=va(e,k,j);c=i-b|0;b=va(g,b,c);H[a+8>>2]=e+f;H[a+4>>2]=b+c;H[a>>2]=d;if(k){oa(k)}return}sa();v()}e=f;d=e-h|0;if(i>>>0>d>>>0){while(1){F[e|0]=I[d|0];e=e+1|0;d=d+1|0;if(i>>>0>d>>>0){continue}break}}H[a+4>>2]=e;a=b+h|0;if((a|0)!=(f|0)){a=f-a|0;va(f-a|0,b,a)}if((c|0)==(g|0)){return}f=(c^-1)+g|0;a=g-c&7;b:{if(!a){e=b;break b}d=0;e=b;while(1){F[e|0]=I[c|0];e=e+1|0;c=c+1|0;d=d+1|0;if((a|0)!=(d|0)){continue}break}}if(f>>>0<7){return}while(1){F[e|0]=I[c|0];F[e+1|0]=I[c+1|0];F[e+2|0]=I[c+2|0];F[e+3|0]=I[c+3|0];F[e+4|0]=I[c+4|0];F[e+5|0]=I[c+5|0];F[e+6|0]=I[c+6|0];F[e+7|0]=I[c+7|0];e=e+8|0;c=c+8|0;if((g|0)!=(c|0)){continue}break}}function qa(a,b,c){var d=0,e=0,f=0;if(c>>>0>=512){ba(a|0,b|0,c|0);return a}e=a+c|0;a:{if(!((a^b)&3)){b:{if(!(a&3)){c=a;break b}if(!c){c=a;break b}c=a;while(1){F[c|0]=I[b|0];b=b+1|0;c=c+1|0;if(!(c&3)){break b}if(c>>>0>>0){continue}break}}d=e&-4;c:{if(d>>>0<64){break c}f=d+-64|0;if(f>>>0>>0){break c}while(1){H[c>>2]=H[b>>2];H[c+4>>2]=H[b+4>>2];H[c+8>>2]=H[b+8>>2];H[c+12>>2]=H[b+12>>2];H[c+16>>2]=H[b+16>>2];H[c+20>>2]=H[b+20>>2];H[c+24>>2]=H[b+24>>2];H[c+28>>2]=H[b+28>>2];H[c+32>>2]=H[b+32>>2];H[c+36>>2]=H[b+36>>2];H[c+40>>2]=H[b+40>>2];H[c+44>>2]=H[b+44>>2];H[c+48>>2]=H[b+48>>2];H[c+52>>2]=H[b+52>>2];H[c+56>>2]=H[b+56>>2];H[c+60>>2]=H[b+60>>2];b=b- -64|0;c=c- -64|0;if(f>>>0>=c>>>0){continue}break}}if(c>>>0>=d>>>0){break a}while(1){H[c>>2]=H[b>>2];b=b+4|0;c=c+4|0;if(d>>>0>c>>>0){continue}break}break a}if(e>>>0<4){c=a;break a}d=e-4|0;if(d>>>0>>0){c=a;break a}c=a;while(1){F[c|0]=I[b|0];F[c+1|0]=I[b+1|0];F[c+2|0]=I[b+2|0];F[c+3|0]=I[b+3|0];b=b+4|0;c=c+4|0;if(d>>>0>=c>>>0){continue}break}}if(c>>>0>>0){while(1){F[c|0]=I[b|0];b=b+1|0;c=c+1|0;if((e|0)!=(c|0)){continue}break}}return a}function ub(a,b){var c=0,d=0,e=0,f=0,g=0;d=ca-16|0;ca=d;H[a+12>>2]=b;H[a+8>>2]=0;H[a>>2]=0;H[a+4>>2]=0;c=a+16|0;H[c>>2]=0;H[c+4>>2]=0;F[c+5|0]=0;F[c+6|0]=0;F[c+7|0]=0;F[c+8|0]=0;F[c+9|0]=0;F[c+10|0]=0;F[c+11|0]=0;F[c+12|0]=0;H[a+32>>2]=0;H[a+36>>2]=0;H[a+48>>2]=0;H[a+40>>2]=0;H[a+44>>2]=0;H[a+52>>2]=0;H[a+56>>2]=0;H[a+68>>2]=0;H[a+60>>2]=0;H[a+64>>2]=0;H[a+72>>2]=0;H[a+76>>2]=0;H[a+88>>2]=0;H[a+80>>2]=0;H[a+84>>2]=0;H[a+100>>2]=0;H[a+92>>2]=0;H[a+96>>2]=0;g=a+116|0;a:{b:{if(b){if(b>>>0<1073741824){break b}sa();v()}H[a+104>>2]=0;H[a+108>>2]=0;H[a+112>>2]=0;H[d+8>>2]=0;H[d>>2]=0;H[d+4>>2]=0;c=1;break a}c=b<<2;e=pa(c);H[a+92>>2]=e;f=c+e|0;H[a+100>>2]=f;ra(e,0,c);H[a+112>>2]=0;H[a+104>>2]=0;H[a+108>>2]=0;H[a+96>>2]=f;e=pa(c);H[a+104>>2]=e;f=c+e|0;H[a+112>>2]=f;ra(e,0,c);H[a+108>>2]=f;e=pa(c);H[d>>2]=e;f=c+e|0;H[d+8>>2]=f;ra(e,0,c);H[d+4>>2]=f;c=b<<5|1}tb(g,c,d);e=H[d>>2];if(e){H[d+4>>2]=e;oa(e)}H[d+8>>2]=0;H[d>>2]=0;H[d+4>>2]=0;if(b){b=b<<2;e=pa(b);H[d>>2]=e;f=b+e|0;H[d+8>>2]=f;ra(e,0,b);H[d+4>>2]=f}tb(a+128|0,c,d);b=H[d>>2];if(b){H[d+4>>2]=b;oa(b)}ca=d+16|0;return a}function ze(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;H[a>>2]=11484;d=a+232|0;b=H[d+196>>2];if(b){H[d+200>>2]=b;oa(b)}c=H[d+184>>2];if(c){b=c;e=H[d+188>>2];if((b|0)!=(e|0)){while(1){b=e-12|0;f=H[b>>2];if(f){H[e-8>>2]=f;oa(f)}e=b;if((b|0)!=(c|0)){continue}break}b=H[d+184>>2]}H[d+188>>2]=c;oa(b)}b=H[d+156>>2];if(b){H[d+160>>2]=b;oa(b)}c=H[d+136>>2];H[d+136>>2]=0;if(c){e=c-4|0;b=H[e>>2];if(b){b=c+(b<<4)|0;while(1){b=b-16|0;if((c|0)!=(b|0)){continue}break}}oa(e)}Yc(a+216|0);b=H[a+196>>2];if(b){H[a+200>>2]=b;oa(b)}b=H[a+184>>2];if(b){H[a+188>>2]=b;oa(b)}b=H[a+172>>2];if(b){H[a+176>>2]=b;oa(b)}b=H[a+160>>2];if(b){H[a+164>>2]=b;oa(b)}b=H[a+144>>2];if(b){while(1){c=H[b>>2];oa(b);b=c;if(b){continue}break}}b=H[a+136>>2];H[a+136>>2]=0;if(b){oa(b)}b=H[a+120>>2];if(b){oa(b)}b=H[a+108>>2];if(b){oa(b)}b=H[a+96>>2];if(b){oa(b)}b=H[a+72>>2];if(b){H[a+76>>2]=b;oa(b)}b=H[a+60>>2];if(b){oa(b)}b=H[a+48>>2];if(b){H[a+52>>2]=b;oa(b)}b=H[a+36>>2];if(b){H[a+40>>2]=b;oa(b)}b=H[a+24>>2];if(b){H[a+28>>2]=b;oa(b)}b=H[a+12>>2];if(b){H[a+16>>2]=b;oa(b)}b=H[a+8>>2];H[a+8>>2]=0;if(b){cb(b)}return a|0}function Pa(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=H[a+8>>2];e=H[a+4>>2];if(d-e>>2>>>0>=b>>>0){a:{if(!b){break a}d=e;f=b&7;if(f){while(1){H[d>>2]=H[c>>2];d=d+4|0;h=h+1|0;if((f|0)!=(h|0)){continue}break}}e=(b<<2)+e|0;if((b-1&1073741823)>>>0<7){break a}while(1){H[d>>2]=H[c>>2];H[d+4>>2]=H[c>>2];H[d+8>>2]=H[c>>2];H[d+12>>2]=H[c>>2];H[d+16>>2]=H[c>>2];H[d+20>>2]=H[c>>2];H[d+24>>2]=H[c>>2];H[d+28>>2]=H[c>>2];d=d+32|0;if((e|0)!=(d|0)){continue}break}}H[a+4>>2]=e;return}b:{i=H[a>>2];j=e-i|0;f=j>>2;g=f+b|0;if(g>>>0<1073741824){d=d-i|0;e=d>>>1|0;g=d>>>0>=2147483644?1073741823:e>>>0>g>>>0?e:g;if(g){if(g>>>0>=1073741824){break b}k=pa(g<<2)}f=(f<<2)+k|0;d=f;e=b&7;if(e){while(1){H[d>>2]=H[c>>2];d=d+4|0;h=h+1|0;if((e|0)!=(h|0)){continue}break}}e=f+(b<<2)|0;if((b-1&1073741823)>>>0>=7){while(1){H[d>>2]=H[c>>2];H[d+4>>2]=H[c>>2];H[d+8>>2]=H[c>>2];H[d+12>>2]=H[c>>2];H[d+16>>2]=H[c>>2];H[d+20>>2]=H[c>>2];H[d+24>>2]=H[c>>2];H[d+28>>2]=H[c>>2];d=d+32|0;if((e|0)!=(d|0)){continue}break}}b=va(k,i,j);H[a+4>>2]=e;H[a>>2]=b;H[a+8>>2]=b+(g<<2);if(i){oa(i)}return}sa();v()}wa();v()}function Cc(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;if(I[a+11|0]>>>7|0){d=H[a+4>>2]}else{d=I[a+11|0]&127}if(d>>>0>>0){h=ca-16|0;ca=h;b=b-d|0;if(b){g=I[a+11|0]>>>7|0?(H[a+8>>2]&2147483647)-1|0:10;if(I[a+11|0]>>>7|0){d=H[a+4>>2]}else{d=I[a+11|0]&127}i=d+b|0;if(g-d>>>0>>0){a:{e=ca-16|0;ca=e;c=i-g|0;if(c>>>0<=2147483631-g>>>0){if(I[a+11|0]>>>7|0){f=H[a>>2]}else{f=a}if(g>>>0<1073741799){H[e+12>>2]=g<<1;H[e>>2]=c+g;c=ca-16|0;ca=c;ca=c+16|0;c=e+12|0;c=H[(K[e>>2]>2]?c:e)>>2];if(c>>>0>=11){j=c+16&-16;c=j-1|0;c=(c|0)==11?j:c}else{c=10}c=c+1|0}else{c=2147483631}Zb(e,c);c=H[e>>2];if(d){yb(c,f,d)}if((g|0)!=10){oa(f)}H[a>>2]=c;H[a+8>>2]=H[a+8>>2]&-2147483648|H[e+4>>2]&2147483647;H[a+8>>2]=H[a+8>>2]|-2147483648;ca=e+16|0;break a}Na();v()}}f=d;if(I[a+11|0]>>>7|0){d=H[a>>2]}else{d=a}f=f+d|0;e=ca-16|0;ca=e;F[e+15|0]=0;while(1){if(b){F[f|0]=I[e+15|0];b=b-1|0;f=f+1|0;continue}break}ca=e+16|0;Id(a,i);F[h+15|0]=0;F[d+i|0]=I[h+15|0]}ca=h+16|0;return}if(I[a+11|0]>>>7|0){d=H[a>>2]}else{d=a}f=ca-16|0;ca=f;Id(a,b);F[f+15|0]=0;F[b+d|0]=I[f+15|0];ca=f+16|0}function Jc(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;g=ca-16|0;ca=g;a:{b:{if(b){H[a+88>>2]=0;H[a+92>>2]=0;d=H[a+84>>2];H[a+84>>2]=0;if(d){oa(d)}H[a+76>>2]=0;H[a+80>>2]=0;d=H[a+72>>2];H[a+72>>2]=0;if(d){oa(d)}d=H[b>>2];c=H[b+4>>2];F[g+15|0]=0;Oa(a,c-d>>2,g+15|0);d=H[b+28>>2];c=H[b+24>>2];F[g+14|0]=0;Oa(a+12|0,d-c>>2,g+14|0);Kc(a+28|0,H[b+4>>2]-H[b>>2]>>2,13708);c=H[b+28>>2]-H[b+24>>2]|0;f=c>>2;e=H[a+52>>2];c:{if(f>>>0<=H[a+60>>2]-e>>2>>>0){break c}if((c|0)<0){break b}d=H[a+56>>2];c=pa(c);f=c+(f<<2)|0;h=c+(d-e&-4)|0;c=h;if((d|0)!=(e|0)){while(1){c=c-4|0;d=d-4|0;H[c>>2]=H[d>>2];if((d|0)!=(e|0)){continue}break}}H[a+60>>2]=f;H[a+56>>2]=h;H[a+52>>2]=c;if(!e){break c}oa(e)}c=H[b+28>>2]-H[b+24>>2]|0;f=c>>2;e=H[a+40>>2];d:{if(f>>>0<=H[a+48>>2]-e>>2>>>0){break d}if((c|0)<0){break a}d=H[a+44>>2];c=pa(c);f=c+(f<<2)|0;h=c+(d-e&-4)|0;c=h;if((d|0)!=(e|0)){while(1){c=c-4|0;d=d-4|0;H[c>>2]=H[d>>2];if((d|0)!=(e|0)){continue}break}}H[a+48>>2]=f;H[a+44>>2]=h;H[a+40>>2]=c;if(!e){break d}oa(e)}F[a+24|0]=1;H[a+64>>2]=b}ca=g+16|0;return}sa();v()}sa();v()}function wb(a,b){var c=0,d=0,e=0,f=0,g=0;c=ca-16|0;ca=c;H[a+12>>2]=b;H[a+8>>2]=0;H[a>>2]=0;H[a+4>>2]=0;H[a+16>>2]=0;H[a+20>>2]=0;H[a+32>>2]=0;H[a+24>>2]=0;H[a+28>>2]=0;H[a+36>>2]=0;H[a+40>>2]=0;H[a+52>>2]=0;H[a+44>>2]=0;H[a+48>>2]=0;H[a+56>>2]=0;H[a+60>>2]=0;H[a+72>>2]=0;H[a+64>>2]=0;H[a+68>>2]=0;H[a+76>>2]=0;H[a+80>>2]=0;H[a+92>>2]=0;H[a+84>>2]=0;H[a+88>>2]=0;H[a+104>>2]=0;H[a+96>>2]=0;H[a+100>>2]=0;g=a+120|0;a:{b:{if(b){if(b>>>0<1073741824){break b}sa();v()}H[a+108>>2]=0;H[a+112>>2]=0;H[a+116>>2]=0;H[c+8>>2]=0;H[c>>2]=0;H[c+4>>2]=0;e=1;break a}e=b<<2;d=pa(e);H[a+96>>2]=d;f=d+e|0;H[a+104>>2]=f;ra(d,0,e);H[a+116>>2]=0;H[a+108>>2]=0;H[a+112>>2]=0;H[a+100>>2]=f;d=pa(e);H[a+108>>2]=d;f=d+e|0;H[a+116>>2]=f;ra(d,0,e);H[a+112>>2]=f;d=pa(e);H[c>>2]=d;f=d+e|0;H[c+8>>2]=f;ra(d,0,e);H[c+4>>2]=f;e=b<<5|1}tb(g,e,c);d=H[c>>2];if(d){H[c+4>>2]=d;oa(d)}H[c+8>>2]=0;H[c>>2]=0;H[c+4>>2]=0;if(b){b=b<<2;d=pa(b);H[c>>2]=d;f=b+d|0;H[c+8>>2]=f;ra(d,0,b);H[c+4>>2]=f}tb(a+132|0,e,c);b=H[c>>2];if(b){H[c+4>>2]=b;oa(b)}ca=c+16|0;return a}function Sb(a,b){var c=0,d=0,e=0;c=(a|0)==(b|0);F[b+12|0]=c;a:{if(c){break a}while(1){d=H[b+8>>2];if(I[d+12|0]){break a}b:{c=H[d+8>>2];e=H[c>>2];if((e|0)==(d|0)){e=H[c+4>>2];if(!(!e|I[e+12|0])){break b}c:{if(H[d>>2]==(b|0)){b=d;break c}b=H[d+4>>2];a=H[b>>2];H[d+4>>2]=a;if(a){H[a+8>>2]=d;c=H[d+8>>2]}H[b+8>>2]=c;a=H[d+8>>2];H[((H[a>>2]!=(d|0))<<2)+a>>2]=b;H[b>>2]=d;H[d+8>>2]=b;c=H[b+8>>2];d=H[c>>2]}F[b+12|0]=1;F[c+12|0]=0;a=H[d+4>>2];H[c>>2]=a;if(a){H[a+8>>2]=c}H[d+8>>2]=H[c+8>>2];a=H[c+8>>2];H[((H[a>>2]!=(c|0))<<2)+a>>2]=d;H[d+4>>2]=c;H[c+8>>2]=d;return}if(!(I[e+12|0]|!e)){break b}d:{if(H[d>>2]!=(b|0)){b=d;break d}a=H[b+4>>2];H[d>>2]=a;if(a){H[a+8>>2]=d;c=H[d+8>>2]}H[b+8>>2]=c;a=H[d+8>>2];H[((H[a>>2]!=(d|0))<<2)+a>>2]=b;H[b+4>>2]=d;H[d+8>>2]=b;c=H[b+8>>2]}F[b+12|0]=1;F[c+12|0]=0;a=H[c+4>>2];b=H[a>>2];H[c+4>>2]=b;if(b){H[b+8>>2]=c}H[a+8>>2]=H[c+8>>2];b=H[c+8>>2];H[((H[b>>2]!=(c|0))<<2)+b>>2]=a;H[a>>2]=c;H[c+8>>2]=a;break a}F[d+12|0]=1;F[c+12|0]=(a|0)==(c|0);F[e+12|0]=1;b=c;if((c|0)!=(a|0)){continue}break}}}function Tj(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{if(b){if(!c){break k}if(!d){break j}e=Q(d)-Q(b)|0;if(e>>>0<=31){break i}break c}if((d|0)==1|d>>>0>1){break c}da=0;a=(a>>>0)/(c>>>0)|0;break a}if(!a){break h}if(!d|d-1&d){break g}a=b>>>Qj(d)|0;da=0;break a}if(!(c-1&c)){break f}h=(Q(c)+33|0)-Q(b)|0;g=0-h|0;break d}h=e+1|0;g=63-e|0;break d}da=0;a=(b>>>0)/(d>>>0)|0;break a}e=Q(d)-Q(b)|0;if(e>>>0<31){break e}break c}if((c|0)==1){break b}d=Qj(c);c=d&31;if((d&63)>>>0>=32){a=b>>>c|0}else{e=b>>>c|0;a=((1<>>c}da=e;break a}h=e+1|0;g=63-e|0}e=h&63;f=e&31;if(e>>>0>=32){e=0;i=b>>>f|0}else{e=b>>>f|0;i=((1<>>f}g=g&63;f=g&31;if(g>>>0>=32){b=a<>>32-f|b<>>31;e=i<<1|b>>>31;f=m-(j+(e>>>0>g>>>0)|0)>>31;k=c&f;i=e-k|0;e=j-((d&f)+(e>>>0>>0)|0)|0;b=b<<1|a>>>31;a=l|a<<1;l=f&1;h=h-1|0;if(h){continue}break}}da=b<<1|a>>>31;a=l|a<<1;break a}a=0;b=0}da=b}return a}function rc(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;k=H[b+16>>2];h=H[c+4>>2]-k|0;e=H[c>>2]-k|0;H[c>>2]=e;H[c+4>>2]=h;g=H[b+16>>2];f=h>>31;i=(f^h)-f|0;f=e>>31;l=g>>>0>=i+((f^e)-f|0)>>>0;a:{if(l){f=h;break a}b:{c:{if((e|0)>=0){f=1;i=1;if((h|0)>=0){break b}j=1;f=-1;i=-1;if(e){break c}break b}j=-1;f=-1;i=-1;if((h|0)<=0){break b}}f=(h|0)<=0?-1:1;i=j}j=N(g,i);e=(e<<1)-j|0;i=(N(f,i)|0)>=0;g=N(f,g);f=((i?0-e|0:e)+g|0)/2|0;H[c+4>>2]=f;m=c;c=(h<<1)-g|0;e=(j+(i?0-c|0:c)|0)/2|0;H[m>>2]=e;g=H[b+16>>2]}c=H[d+4>>2]+f|0;e=H[d>>2]+e|0;d:{if((g|0)<(e|0)){e=e-H[b+4>>2]|0;break d}if((0-g|0)<=(e|0)){break d}e=H[b+4>>2]+e|0}e:{if((c|0)>(g|0)){c=c-H[b+4>>2]|0;break e}if((0-g|0)<=(c|0)){break e}c=H[b+4>>2]+c|0}f:{if(l){g=c;break f}g:{h:{if((e|0)>=0){b=1;f=1;if((c|0)>=0){break g}d=1;b=-1;f=-1;if(e){break h}break g}d=-1;b=-1;f=-1;if((c|0)<=0){break g}}b=(c|0)<=0?-1:1;f=d}d=N(f,g);h=(e<<1)-d|0;f=(N(b,f)|0)>=0;b=N(b,g);g=((f?0-h|0:h)+b|0)/2|0;b=(c<<1)-b|0;e=(d+(f?0-b|0:b)|0)/2|0}c=a;H[c>>2]=e+k;H[c+4>>2]=g+k}function Wh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;g=ca-16|0;ca=g;e=H[a+4>>2];d=H[e>>2];a:{b=H[a+12>>2];c=H[b+28>>2]-H[b+24>>2]|0;f=c>>2;b:{if(f>>>0<=H[e+8>>2]-d>>2>>>0){break b}if((c|0)<0){break a}b=H[e+4>>2];c=pa(c);f=c+(f<<2)|0;h=c+(b-d&-4)|0;c=h;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;H[c>>2]=H[b>>2];if((b|0)!=(d|0)){continue}break}}H[e+8>>2]=f;H[e+4>>2]=h;H[e>>2]=c;if(!d){break b}oa(d)}b=H[a+12>>2];c=H[b+28>>2];b=H[b+24>>2];H[g+12>>2]=0;b=c-b>>2;d=a+96|0;e=H[d>>2];c=H[a+100>>2]-e>>2;c:{if(b>>>0>c>>>0){Pa(d,b-c|0,g+12|0);break c}if(b>>>0>=c>>>0){break c}H[a+100>>2]=e+(b<<2)}e=a+8|0;b=H[a+116>>2];d:{if(b){d=H[b>>2];if((d|0)==H[b+4>>2]){c=1;break d}b=0;while(1){c=ye(e,H[(b<<2)+d>>2]);if(!c){break d}f=H[a+116>>2];d=H[f>>2];b=b+1|0;if(b>>>0>2]-d>>2>>>0){continue}break}break d}c=1;a=H[a+12>>2];a=H[a+4>>2]-H[a>>2]|0;if(a>>>0<12){break d}a=(a>>2>>>0)/3|0;b=0;while(1){c=ye(e,N(b,3));if(!c){break d}b=b+1|0;if((a|0)!=(b|0)){continue}break}}ca=g+16|0;return c|0}sa();v()}function gj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=H[b+88>>2];if(!(!c|H[c>>2]!=1)){e=H[c+8>>2];H[a+4>>2]=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);f=a+8|0;d=I[b+24|0];h=H[a+8>>2];g=H[a+12>>2]-h>>2;a:{if(d>>>0>g>>>0){ya(f,d-g|0);d=I[b+24|0];e=H[c+8>>2];break a}if(d>>>0>=g>>>0){break a}H[a+12>>2]=h+(d<<2)}b:{if(!d){b=4;break b}h=d&3;f=H[f>>2];c:{if(d-1>>>0<3){b=4;d=0;break c}k=d&252;d=0;b=4;while(1){g=d<<2;c=b+e|0;H[g+f>>2]=I[c|0]|I[c+1|0]<<8|(I[c+2|0]<<16|I[c+3|0]<<24);H[f+(g|4)>>2]=I[c+4|0]|I[c+5|0]<<8|(I[c+6|0]<<16|I[c+7|0]<<24);H[f+(g|8)>>2]=I[c+8|0]|I[c+9|0]<<8|(I[c+10|0]<<16|I[c+11|0]<<24);H[f+(g|12)>>2]=I[c+12|0]|I[c+13|0]<<8|(I[c+14|0]<<16|I[c+15|0]<<24);d=d+4|0;b=b+16|0;i=i+4|0;if((k|0)!=(i|0)){continue}break}}if(!h){break b}while(1){c=b+e|0;H[f+(d<<2)>>2]=I[c|0]|I[c+1|0]<<8|(I[c+2|0]<<16|I[c+3|0]<<24);d=d+1|0;b=b+4|0;j=j+1|0;if((h|0)!=(j|0)){continue}break}}d=a;a=b+e|0;H[d+20>>2]=I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24);d=1}return d|0}function se(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{if(!b){if((d|0)<0){break a}f=H[a+4>>2];b=H[a>>2];d=f-b|0;if(c>>>0>d>>>0){g=c-d|0;e=H[a+8>>2];if(g>>>0<=e-f>>>0){i=a,j=ra(f,0,g)+g|0,H[i+4>>2]=j;break c}if((c|0)<0){break b}f=e-b|0;e=f<<1;f=f>>>0>=1073741823?2147483647:c>>>0>>0?e:c;e=pa(f);ra(e+d|0,0,g);d=va(e,b,d);H[a+8>>2]=d+f;H[a+4>>2]=c+d;H[a>>2]=d;if(!b){break c}oa(b);break c}if(c>>>0>=d>>>0){break c}H[a+4>>2]=b+c;break c}if((d|0)<0){break a}e=H[a+4>>2];f=H[a>>2];g=e-f|0;d:{if((d|0)<=0&c>>>0<=g>>>0|(d|0)<0){break d}if(c>>>0>g>>>0){d=c-g|0;h=H[a+8>>2];if(d>>>0<=h-e>>>0){i=a,j=ra(e,0,d)+d|0,H[i+4>>2]=j;break d}if((c|0)<0){break b}e=h-f|0;h=e<<1;e=e>>>0>=1073741823?2147483647:c>>>0>>0?h:c;h=pa(e);ra(h+g|0,0,d);d=va(h,f,g);H[a+8>>2]=d+e;H[a+4>>2]=c+d;H[a>>2]=d;if(!f){break d}oa(f);break d}if(c>>>0>=g>>>0){break d}H[a+4>>2]=c+f}if(!c){break c}va(H[a>>2],b,c)}b=H[a+28>>2];c=H[a+24>>2]+1|0;b=c?b:b+1|0;H[a+24>>2]=c;H[a+28>>2]=b;g=1;break a}sa();v()}return g}function Jh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;k=H[a+12>>2];c=H[a+68>>2];d=H[c+80>>2];F[b+84|0]=0;n=b+68|0;i=H[b+68>>2];e=H[b+72>>2]-i>>2;a:{if(e>>>0>>0){qb(n,d-e|0,12372);c=H[a+68>>2];d=H[c+80>>2];break a}if(d>>>0>=e>>>0){break a}H[b+72>>2]=i+(d<<2)}b=H[c+100>>2];e=H[c+96>>2];i=(b-e|0)/12|0;m=1;b:{if((b|0)==(e|0)){break b}k=H[k+28>>2];f=H[k>>2];if((f|0)==-1){return 0}o=i>>>0<=1?1:i;c=e;b=0;m=0;while(1){g=H[c>>2];if(g>>>0>=d>>>0){break b}j=H[H[a+72>>2]+12>>2];h=H[j+(f<<2)>>2];if(h>>>0>=d>>>0){break b}f=H[n>>2];H[f+(g<<2)>>2]=h;g=k+(l<<2)|0;h=H[g+4>>2];if((h|0)==-1){break b}l=H[c+4>>2];if(l>>>0>=d>>>0){break b}h=H[(h<<2)+j>>2];if(h>>>0>=d>>>0){break b}H[f+(l<<2)>>2]=h;g=H[g+8>>2];if((g|0)==-1){break b}c=H[c+8>>2];if(c>>>0>=d>>>0){break b}j=H[(g<<2)+j>>2];if(j>>>0>=d>>>0){break b}H[f+(c<<2)>>2]=j;b=b+1|0;m=i>>>0<=b>>>0;if((b|0)==(o|0)){break b}c=e+N(b,12)|0;l=N(b,3);f=H[k+(l<<2)>>2];if((f|0)!=-1){continue}break}}return m|0}function Gh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;h=H[d+80>>2];e=ca-48|0;ca=e;a=H[a+4>>2];m=a-2|0;a:{if(m>>>0>28){break a}j=H[H[d>>2]>>2]+H[d+48>>2]|0;H[e+16>>2]=a;a=-1<>2]=a^-1;a=-2-a|0;H[e+24>>2]=a;H[e+32>>2]=(a|0)/2;L[e+28>>2]=O(2)/O(a|0);f=H[c>>2];if((f|0)!=H[c+4>>2]){a=0;d=0;while(1){g=H[(d<<2)+f>>2];h=e+36|0;k=H[H[b>>2]>>2];l=H[b+48>>2];f=H[b+40>>2];i=H[b+44>>2];if(!I[b+84|0]){g=H[H[b+68>>2]+(g<<2)>>2]}g=Rj(f,i,g,0);i=g;g=g+l|0;qa(h,g+k|0,f);he(e+16|0,h,e+12|0,e+8|0);f=a<<2;H[f+j>>2]=H[e+12>>2];H[(f|4)+j>>2]=H[e+8>>2];a=a+2|0;d=d+1|0;f=H[c>>2];if(d>>>0>2]-f>>2>>>0){continue}break}break a}if(!h){break a}d=0;a=0;while(1){k=e+36|0;l=H[H[b>>2]>>2];i=H[b+48>>2];c=H[b+40>>2];f=Rj(c,H[b+44>>2],I[b+84|0]?a:H[H[b+68>>2]+(a<<2)>>2],0);g=f;f=f+i|0;qa(k,f+l|0,c);he(e+16|0,k,e+12|0,e+8|0);c=d<<2;H[c+j>>2]=H[e+12>>2];H[(c|4)+j>>2]=H[e+8>>2];d=d+2|0;a=a+1|0;if((h|0)!=(a|0)){continue}break}}ca=e+48|0;return m>>>0<29|0}function Re(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=O(0),j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;k=ca-16|0;ca=k;if(H[c+28>>2]==9){d=H[a+4>>2];h=I[c+24|0];e=h<<2;f=pa(e);l=k+8|0;H[l>>2]=1065353216;i=L[a+20>>2];d=-1<0){L[l>>2]=i/O(d|0)}o=(d|0)>0;a:{if(!o){break a}j=H[c+80>>2];if(!j){break a}if(h){p=H[H[b>>2]>>2]+H[b+48>>2]|0;t=h&254;u=h&1;b=0;while(1){m=H[a+8>>2];i=L[l>>2];d=0;n=0;if((h|0)!=1){while(1){g=d<<2;q=(b<<2)+p|0;L[g+f>>2]=O(i*O(H[q>>2]))+L[g+m>>2];g=g|4;L[g+f>>2]=O(i*O(H[q+4>>2]))+L[g+m>>2];d=d+2|0;b=b+2|0;n=n+2|0;if((t|0)!=(n|0)){continue}break}}if(u){d=d<<2;L[d+f>>2]=O(i*O(H[(b<<2)+p>>2]))+L[d+m>>2];b=b+1|0}qa(H[H[c+64>>2]>>2]+r|0,f,e);r=e+r|0;s=s+1|0;if((s|0)!=(j|0)){continue}break}break a}b=0;if((j|0)!=1){a=j&-2;d=0;while(1){qa(H[H[c+64>>2]>>2]+b|0,f,e);b=b+e|0;qa(b+H[H[c+64>>2]>>2]|0,f,e);b=b+e|0;d=d+2|0;if((a|0)!=(d|0)){continue}break}}if(!(j&1)){break a}qa(H[H[c+64>>2]>>2]+b|0,f,e)}oa(f)}ca=k+16|0;return o|0}function Xh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=H[a+12>>2];d=H[a+108>>2];e=H[d+80>>2];F[b+84|0]=0;m=b+68|0;h=H[b+68>>2];f=H[b+72>>2]-h>>2;a:{if(f>>>0>>0){qb(m,e-f|0,12372);d=H[a+108>>2];e=H[d+80>>2];break a}if(e>>>0>=f>>>0){break a}H[b+72>>2]=h+(e<<2)}b=H[d+100>>2];f=H[d+96>>2];h=(b-f|0)/12|0;k=1;b:{if((b|0)==(f|0)){break b}n=h>>>0<=1?1:h;o=H[c>>2];c=0;d=f;b=0;k=0;while(1){c=(c<<2)+o|0;i=H[c>>2];if((i|0)==-1){break b}g=H[d>>2];if(g>>>0>=e>>>0){break b}l=H[H[a+112>>2]+12>>2];j=H[l+(i<<2)>>2];if(j>>>0>=e>>>0){break b}i=H[m>>2];H[i+(g<<2)>>2]=j;g=H[c+4>>2];if((g|0)==-1){break b}j=H[d+4>>2];if(j>>>0>=e>>>0){break b}g=H[(g<<2)+l>>2];if(g>>>0>=e>>>0){break b}H[i+(j<<2)>>2]=g;c=H[c+8>>2];if((c|0)==-1){break b}d=H[d+8>>2];if(d>>>0>=e>>>0){break b}c=H[(c<<2)+l>>2];if(c>>>0>=e>>>0){break b}H[i+(d<<2)>>2]=c;b=b+1|0;k=h>>>0<=b>>>0;if((b|0)==(n|0)){break b}c=N(b,3);d=f+N(b,12)|0;if((b|0)!=1431655765){continue}break}}return k|0}function Ph(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=H[a+12>>2];d=H[a+68>>2];e=H[d+80>>2];F[b+84|0]=0;m=b+68|0;h=H[b+68>>2];f=H[b+72>>2]-h>>2;a:{if(f>>>0>>0){qb(m,e-f|0,12372);d=H[a+68>>2];e=H[d+80>>2];break a}if(e>>>0>=f>>>0){break a}H[b+72>>2]=h+(e<<2)}b=H[d+100>>2];f=H[d+96>>2];h=(b-f|0)/12|0;k=1;b:{if((b|0)==(f|0)){break b}n=h>>>0<=1?1:h;o=H[c>>2];c=0;d=f;b=0;k=0;while(1){c=(c<<2)+o|0;i=H[c>>2];if((i|0)==-1){break b}g=H[d>>2];if(g>>>0>=e>>>0){break b}l=H[H[a+72>>2]+12>>2];j=H[l+(i<<2)>>2];if(j>>>0>=e>>>0){break b}i=H[m>>2];H[i+(g<<2)>>2]=j;g=H[c+4>>2];if((g|0)==-1){break b}j=H[d+4>>2];if(j>>>0>=e>>>0){break b}g=H[(g<<2)+l>>2];if(g>>>0>=e>>>0){break b}H[i+(j<<2)>>2]=g;c=H[c+8>>2];if((c|0)==-1){break b}d=H[d+8>>2];if(d>>>0>=e>>>0){break b}c=H[(c<<2)+l>>2];if(c>>>0>=e>>>0){break b}H[i+(d<<2)>>2]=c;b=b+1|0;k=h>>>0<=b>>>0;if((b|0)==(n|0)){break b}c=N(b,3);d=f+N(b,12)|0;if((b|0)!=1431655765){continue}break}}return k|0}function Wa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;d=ca-16|0;ca=d;a:{f=H[a+4>>2];b:{if(f>>>0>>0){e=b-f|0;c=H[a+8>>2];g=c<<5;c:{if(!(e>>>0>g>>>0|f>>>0>g-e>>>0)){H[a+4>>2]=b;h=f&31;b=H[a>>2]+(f>>>3&536870908)|0;break c}H[d+8>>2]=0;H[d>>2]=0;H[d+4>>2]=0;if((b|0)<0){break a}if(g>>>0<=1073741822){c=c<<6;b=b+31&-32;b=b>>>0>>0?c:b}else{b=2147483647}pb(d,b);f=H[a+4>>2];H[d+4>>2]=f+e;i=H[a>>2];b=H[d>>2];d:{if((f|0)<=0){break d}c=f>>>5|0;if(f>>>0>=32){va(b,i,c<<2)}g=c<<2;b=g+b|0;h=f&31;if(h){c=-1>>>32-h|0;H[b>>2]=H[b>>2]&(c^-1)|H[i+g>>2]&c}i=H[a>>2]}H[a>>2]=H[d>>2];H[d>>2]=i;c=H[a+4>>2];H[a+4>>2]=H[d+4>>2];H[d+4>>2]=c;c=H[a+8>>2];H[a+8>>2]=H[d+8>>2];H[d+8>>2]=c;if(!i){break c}oa(i)}if(!e){break b}if(h){c=32-h|0;a=c>>>0>>0?c:e;H[b>>2]=H[b>>2]&(-1<>>c-a^-1);e=e-a|0;b=b+4|0}a=e>>>5|0;if(e>>>0>=32){ra(b,0,a<<2)}if((e&-32)==(e|0)){break b}a=(a<<2)+b|0;H[a>>2]=H[a>>2]&(-1>>>32-(e&31)^-1);break b}H[a+4>>2]=b}ca=d+16|0;return}sa();v()}function Je(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=H[a+12>>2];i=H[a+8>>2];d=e-i>>2;b=I[b+24|0];a:{if(d>>>0>>0){ya(a+8|0,b-d|0);i=H[a+8>>2];e=H[a+12>>2];break a}if(b>>>0>=d>>>0){break a}e=(b<<2)+i|0;H[a+12>>2]=e}b=0;f=H[c+8>>2];h=H[c+12>>2];j=H[c+20>>2];e=e-i|0;d=H[c+16>>2];g=e+d|0;j=e>>>0>g>>>0?j+1|0:j;b:{if(f>>>0>>0&(h|0)<=(j|0)|(h|0)<(j|0)){break b}qa(i,d+H[c>>2]|0,e);d=H[c+20>>2];g=e;e=e+H[c+16>>2]|0;d=g>>>0>e>>>0?d+1|0:d;H[c+16>>2]=e;H[c+20>>2]=d;f=H[c+8>>2];h=H[c+12>>2];g=e+4|0;d=g>>>0<4?d+1|0:d;if(f>>>0>>0&(d|0)>=(h|0)|(d|0)>(h|0)){break b}d=e+H[c>>2]|0;H[a+20>>2]=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);d=H[c+20>>2];g=d;f=d;e=H[c+16>>2];d=e+4|0;f=d>>>0<4?f+1|0:f;H[c+16>>2]=d;H[c+20>>2]=f;h=H[c+12>>2];if((f|0)>=(h|0)&d>>>0>=K[c+8>>2]|(f|0)>(h|0)){break b}f=I[d+H[c>>2]|0];d=g;e=e+5|0;d=e>>>0<5?d+1|0:d;H[c+16>>2]=e;H[c+20>>2]=d;if(f-1>>>0>29){break b}H[a+4>>2]=f;b=1}return b|0}function qd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;a:{f=H[a+4>>2];b:{if((f|0)!=H[a>>2]){c=f;break b}g=H[a+8>>2];c=H[a+12>>2];if(g>>>0>>0){e=((c-g>>2)+1|0)/2<<2;c=e+g|0;if((f|0)!=(g|0)){d=g-f|0;c=c-d|0;va(c,f,d);f=H[a+8>>2]}H[a+4>>2]=c;H[a+8>>2]=e+f;break b}d=(c|0)==(f|0)?1:c-f>>1;if(d>>>0>=1073741824){break a}c=d<<2;i=pa(c);k=i+c|0;c=(d+3&-4)+i|0;h=c;c:{if((f|0)==(g|0)){break c}g=g-f|0;l=g&-4;e=c;d=f;j=g-4|0;g=(j>>>2|0)+1&7;if(g){h=0;while(1){H[e>>2]=H[d>>2];d=d+4|0;e=e+4|0;h=h+1|0;if((g|0)!=(h|0)){continue}break}}h=c+l|0;if(j>>>0<28){break c}while(1){H[e>>2]=H[d>>2];H[e+4>>2]=H[d+4>>2];H[e+8>>2]=H[d+8>>2];H[e+12>>2]=H[d+12>>2];H[e+16>>2]=H[d+16>>2];H[e+20>>2]=H[d+20>>2];H[e+24>>2]=H[d+24>>2];H[e+28>>2]=H[d+28>>2];d=d+32|0;e=e+32|0;if((h|0)!=(e|0)){continue}break}}H[a+12>>2]=k;H[a+8>>2]=h;H[a+4>>2]=c;H[a>>2]=i;if(!f){break b}oa(f);c=H[a+4>>2]}H[c-4>>2]=H[b>>2];H[a+4>>2]=H[a+4>>2]-4;return}wa();v()}function sb(a,b){var c=0;a:{if(!ta(a,b)){break a}if(!ta(a+16|0,b)){break a}if(!ta(a+32|0,b)){break a}if(!ta(a+48|0,b)){break a}if(!ta(a- -64|0,b)){break a}if(!ta(a+80|0,b)){break a}if(!ta(a+96|0,b)){break a}if(!ta(a+112|0,b)){break a}if(!ta(a+128|0,b)){break a}if(!ta(a+144|0,b)){break a}if(!ta(a+160|0,b)){break a}if(!ta(a+176|0,b)){break a}if(!ta(a+192|0,b)){break a}if(!ta(a+208|0,b)){break a}if(!ta(a+224|0,b)){break a}if(!ta(a+240|0,b)){break a}if(!ta(a+256|0,b)){break a}if(!ta(a+272|0,b)){break a}if(!ta(a+288|0,b)){break a}if(!ta(a+304|0,b)){break a}if(!ta(a+320|0,b)){break a}if(!ta(a+336|0,b)){break a}if(!ta(a+352|0,b)){break a}if(!ta(a+368|0,b)){break a}if(!ta(a+384|0,b)){break a}if(!ta(a+400|0,b)){break a}if(!ta(a+416|0,b)){break a}if(!ta(a+432|0,b)){break a}if(!ta(a+448|0,b)){break a}if(!ta(a+464|0,b)){break a}if(!ta(a+480|0,b)){break a}if(!ta(a+496|0,b)){break a}c=ta(a+512|0,b)}return c}function qf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a:{if(!ke(a,b)){break a}h=a+36|0;g=ea[H[H[a>>2]+24>>2]](a)|0;e=H[a+40>>2];d=H[a+36>>2];c=e-d>>2;b:{if(g>>>0>c>>>0){Vb(h,g-c|0);break b}if(c>>>0<=g>>>0){break b}d=d+(g<<2)|0;if((d|0)!=(e|0)){while(1){e=e-4|0;c=H[e>>2];H[e>>2]=0;if(c){ea[H[H[c>>2]+4>>2]](c)}if((d|0)!=(e|0)){continue}break}}H[a+40>>2]=d}c=1;if((g|0)<=0){break a}e=0;while(1){c:{c=H[b+20>>2];f=H[b+12>>2];d=H[b+16>>2];if((c|0)>=(f|0)&d>>>0>=K[b+8>>2]|(c|0)>(f|0)){break c}f=I[H[b>>2]+d|0];d=d+1|0;c=d?c:c+1|0;H[b+16>>2]=d;H[b+20>>2]=c;d=ea[H[H[a>>2]+48>>2]](a,f)|0;f=e<<2;i=f+H[a+36>>2]|0;c=H[i>>2];H[i>>2]=d;if(c){ea[H[H[c>>2]+4>>2]](c)}c=H[H[h>>2]+f>>2];if(!c){break c}if(!(k=c,l=ea[H[H[a>>2]+28>>2]](a)|0,m=ea[H[H[a>>2]+20>>2]](a,e)|0,j=H[H[c>>2]+8>>2],ea[j](k|0,l|0,m|0)|0)){break c}c=1;e=e+1|0;if((g|0)!=(e|0)){continue}break a}break}c=0}return c|0}function he(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;j=+L[b>>2];k=+L[b+4>>2];l=+L[b+8>>2];g=P(j)+P(k)+P(l);a:{if(!(g>1e-6)){j=1;k=0;e=0;break a}g=1/g;k=g*k;j=g*j;e=g*l<0}h=H[a+16>>2];l=+(h|0);g=T(j*l+.5);b:{if(P(g)<2147483648){m=~~g;break b}m=-2147483648}f=m>>31;i=(f^m)-f|0;g=T(k*l+.5);c:{if(P(g)<2147483648){f=~~g;break c}f=-2147483648}b=f>>31;b=h-(i+((f^b)-b|0)|0)|0;i=(b|0)>0?b:0;e=e?0-i|0:i;f=f+(b>>31&((f|0)>0?b:0-b|0))|0;d:{if((m|0)>=0){b=e+h|0;a=H[a+8>>2];e=h+f|0;break d}b=f>>31;b=(b^f)-b|0;a=H[a+8>>2];b=(e|0)<0?b:a-b|0;e=(f|0)<0?i:a-i|0}e:{if(!(b|e)){b=a;break e}if(!((a|0)!=(b|0)|e)){b=a;break e}if(!((a|0)!=(e|0)|b)){b=a;break e}if(!((b|0)<=(h|0)|e)){b=(h<<1)-b|0;a=0;break e}if(!((a|0)!=(e|0)|(b|0)>=(h|0))){b=(h<<1)-b|0;break e}if(!((a|0)!=(b|0)|(e|0)>=(h|0))){b=a;a=(h<<1)-e|0;break e}if(b){a=e;break e}b=0;if((e|0)<=(h|0)){a=e;break e}a=(h<<1)-e|0}H[c>>2]=a;H[d>>2]=b}function Ve(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=H[b+8>>2];h=H[b+12>>2];c=H[b+20>>2];i=c;k=H[b+16>>2];d=k+4|0;c=d>>>0<4?c+1|0:c;a:{if(d>>>0>g>>>0&(c|0)>=(h|0)|(c|0)>(h|0)){break a}l=H[b>>2];f=k+l|0;e=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);H[b+16>>2]=d;H[b+20>>2]=c;c=i;f=k+8|0;c=f>>>0<8?c+1|0:c;if(f>>>0>g>>>0&(c|0)>=(h|0)|(c|0)>(h|0)){break a}d=d+l|0;j=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=f;H[b+20>>2]=c;if((e|0)>(j|0)){break a}H[a+16>>2]=j;H[a+12>>2]=e;d=j-e|0;e=(j>>31)-((e>>31)+(e>>>0>j>>>0)|0)|0;if(!e&d>>>0>2147483646|e){break a}d=d+1|0;H[a+20>>2]=d;e=d>>>1|0;H[a+24>>2]=e;H[a+28>>2]=0-e;if(!(d&1)){H[a+24>>2]=e-1}if(J[b+38>>1]<=513){if((c|0)>=(h|0)&f>>>0>=g>>>0|(c|0)>(h|0)){break a}g=I[f+l|0];c=i;i=k+9|0;c=i>>>0<9?c+1|0:c;H[b+16>>2]=i;H[b+20>>2]=c;if(g>>>0>1){break a}H[a+88>>2]=g}m=ta(a+112|0,b)}return m|0}function Hc(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;g=H[a>>2];c=g+(b>>>3&536870908)|0;H[c>>2]=H[c>>2]|1<>2];e=(b|0)==-1;d=-1;a:{if(e){break a}c=b+1|0;c=(c>>>0)%3|0?c:b-2|0;d=-1;if((c|0)==-1){break a}d=H[H[f>>2]+(c<<2)>>2]}c=H[a+12>>2];h=(d>>>3&536870908)+c|0;H[h>>2]=H[h>>2]|1<>>0)%3|0){e=b-1|0;break e}e=b+2|0;d=-1;if((e|0)==-1){break d}}d=H[H[f>>2]+(e<<2)>>2]}e=(d>>>3&536870908)+c|0;H[e>>2]=H[e>>2]|1<>2]+(b<<2)>>2];if((b|0)==-1){break b}F[a+24|0]=0;a=(b>>>3&536870908)+g|0;H[a>>2]=H[a>>2]|1<>>0)%3|0?a:b-2|0;if((a|0)!=-1){d=H[H[f>>2]+(a<<2)>>2]}a=c+(d>>>3&536870908)|0;H[a>>2]=H[a>>2]|1<>>0)%3|0){b=b-1|0;break g}b=b+2|0;a=-1;if((b|0)==-1){break f}}a=H[H[f>>2]+(b<<2)>>2]}b=1<>>3&536870908)|0;c=H[a>>2];break c}a=c+536870908|0;b=H[c+536870908>>2];c=-2147483648}H[a>>2]=b|c}}function Fd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=O(0),f=O(0),g=O(0),h=O(0),i=O(0),j=0,k=O(0),l=O(0),m=O(0),n=O(0),o=0;a:{if(H[c+28>>2]!=9|I[c+24|0]!=3){break a}a=H[a+4>>2];if(a-2>>>0>28){break a}o=1;j=H[c+80>>2];if(!j){break a}k=O(O(2)/O((1<>2]>>2]+H[c+48>>2]|0;a=H[H[b>>2]>>2]+H[b+48>>2]|0;b=0;while(1){g=O(0);l=O(0);m=O(0);e=O(O(O(H[a>>2])*k)+O(-1));f=O(O(O(H[a+4>>2])*k)+O(-1));i=O(O(O(1)-O(P(e)))-O(P(f)));h=O(S(O(-i),O(0)));n=O(-h);f=O(f+(f>>8;F[c+10|0]=d>>>16;F[c+11|0]=d>>>24;d=(w(l),y(2));F[c+4|0]=d;F[c+5|0]=d>>>8;F[c+6|0]=d>>>16;F[c+7|0]=d>>>24;d=(w(g),y(2));F[c|0]=d;F[c+1|0]=d>>>8;F[c+2|0]=d>>>16;F[c+3|0]=d>>>24;c=c+12|0;b=b+1|0;if((j|0)!=(b|0)){continue}break}}return o|0}function Vd(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:{if(b>>>0<=63){b=0;a=H[a+12>>2];if(a>>>0<2){break a}b=a-1|0;e=b&3;d=H[c>>2];c=0;b:{if(a-2>>>0<3){a=1;b=0;break b}f=b&-4;b=0;a=1;while(1){g=a+3|0;h=a+2|0;i=a+1|0;b=K[d+(b<<2)>>2]>K[d+(a<<2)>>2]?a:b;b=K[d+(b<<2)>>2]>K[d+(i<<2)>>2]?i:b;b=K[d+(b<<2)>>2]>K[d+(h<<2)>>2]?h:b;b=K[d+(b<<2)>>2]>K[d+(g<<2)>>2]?g:b;a=a+4|0;j=j+4|0;if((f|0)!=(j|0)){continue}break}}if(!e){break a}while(1){b=K[d+(b<<2)>>2]>K[d+(a<<2)>>2]?a:b;a=a+1|0;c=c+1|0;if((e|0)!=(c|0)){continue}break}break a}b=H[a+580>>2];d=32-b|0;if((d|0)>=4){c=H[a+576>>2];if((c|0)==H[a+568>>2]){return 0}d=H[c>>2];e=b+4|0;H[a+580>>2]=e;b=d<>>28|0;if((e|0)!=32){break a}H[a+580>>2]=0;H[a+576>>2]=c+4;return b}c=H[a+576>>2];e=c+4|0;if((e|0)==H[a+568>>2]){return 0}f=H[c>>2];H[a+576>>2]=e;H[a+580>>2]=b-28;a=60-b|0;b=H[c+4>>2]>>>a|f<>>a-d}return b}function Ae(a){a=a|0;var b=0,c=0,d=0,e=0;H[a>>2]=11436;b=H[a+388>>2];if(b){H[a+392>>2]=b;oa(b)}d=H[a+368>>2];H[a+368>>2]=0;if(d){e=d-4|0;b=H[e>>2];if(b){c=(b<<4)+d|0;while(1){c=c-16|0;if((d|0)!=(c|0)){continue}break}}oa(e)}Yc(a+216|0);b=H[a+196>>2];if(b){H[a+200>>2]=b;oa(b)}b=H[a+184>>2];if(b){H[a+188>>2]=b;oa(b)}b=H[a+172>>2];if(b){H[a+176>>2]=b;oa(b)}b=H[a+160>>2];if(b){H[a+164>>2]=b;oa(b)}c=H[a+144>>2];if(c){while(1){b=H[c>>2];oa(c);c=b;if(b){continue}break}}b=H[a+136>>2];H[a+136>>2]=0;if(b){oa(b)}b=H[a+120>>2];if(b){oa(b)}b=H[a+108>>2];if(b){oa(b)}b=H[a+96>>2];if(b){oa(b)}b=H[a+72>>2];if(b){H[a+76>>2]=b;oa(b)}b=H[a+60>>2];if(b){oa(b)}b=H[a+48>>2];if(b){H[a+52>>2]=b;oa(b)}b=H[a+36>>2];if(b){H[a+40>>2]=b;oa(b)}b=H[a+24>>2];if(b){H[a+28>>2]=b;oa(b)}b=H[a+12>>2];if(b){H[a+16>>2]=b;oa(b)}b=H[a+8>>2];H[a+8>>2]=0;if(b){cb(b)}return a|0}function Sg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;a:{a=ca-32|0;ca=a;e=Ma(c);if(e>>>0<2147483632){b:{c:{if(e>>>0>=11){g=(e|15)+1|0;f=pa(g);H[a+24>>2]=g|-2147483648;H[a+16>>2]=f;H[a+20>>2]=e;g=e+f|0;break c}F[a+27|0]=e;f=a+16|0;g=e+f|0;if(!e){break b}}qa(f,c,e)}F[g|0]=0;H[a+8>>2]=0;H[a>>2]=0;H[a+4>>2]=0;d:{c=nb(b,a+16|0);if((c|0)==(b+4|0)){break d}b=H[c+28>>2];e=H[c+32>>2];if((b|0)==(e|0)){break d}b=e-b|0;if(b&3){break d}e=b>>>2|0;f=H[a+4>>2];b=H[a>>2];g=f-b>>2;e:{if(e>>>0>g>>>0){ya(a,e-g|0);b=H[a>>2];f=H[a+4>>2];break e}if(e>>>0>=g>>>0){break e}f=(e<<2)+b|0;H[a+4>>2]=f}if((b|0)!=(f|0)){e=b;b=H[c+28>>2];qa(e,b,H[c+32>>2]-b|0);break d}Ca();v()}b=H[d>>2];if(b){H[d+4>>2]=b;oa(b)}H[d>>2]=H[a>>2];H[d+4>>2]=H[a+4>>2];H[d+8>>2]=H[a+8>>2];if(F[a+27|0]<0){oa(H[a+16>>2])}ca=a+32|0;break a}Na();v()}}function Be(a){a=a|0;var b=0,c=0,d=0,e=0;H[a>>2]=11384;d=H[a+368>>2];H[a+368>>2]=0;if(d){e=d-4|0;b=H[e>>2];if(b){c=(b<<4)+d|0;while(1){c=c-16|0;if((d|0)!=(c|0)){continue}break}}oa(e)}Yc(a+216|0);b=H[a+196>>2];if(b){H[a+200>>2]=b;oa(b)}b=H[a+184>>2];if(b){H[a+188>>2]=b;oa(b)}b=H[a+172>>2];if(b){H[a+176>>2]=b;oa(b)}b=H[a+160>>2];if(b){H[a+164>>2]=b;oa(b)}c=H[a+144>>2];if(c){while(1){b=H[c>>2];oa(c);c=b;if(b){continue}break}}b=H[a+136>>2];H[a+136>>2]=0;if(b){oa(b)}b=H[a+120>>2];if(b){oa(b)}b=H[a+108>>2];if(b){oa(b)}b=H[a+96>>2];if(b){oa(b)}b=H[a+72>>2];if(b){H[a+76>>2]=b;oa(b)}b=H[a+60>>2];if(b){oa(b)}b=H[a+48>>2];if(b){H[a+52>>2]=b;oa(b)}b=H[a+36>>2];if(b){H[a+40>>2]=b;oa(b)}b=H[a+24>>2];if(b){H[a+28>>2]=b;oa(b)}b=H[a+12>>2];if(b){H[a+16>>2]=b;oa(b)}b=H[a+8>>2];H[a+8>>2]=0;if(b){cb(b)}return a|0}function Ug(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=ca-16|0;ca=d;a:{e=Ma(c);if(e>>>0<2147483632){b:{c:{if(e>>>0>=11){f=(e|15)+1|0;a=pa(f);H[d+8>>2]=f|-2147483648;H[d>>2]=a;H[d+4>>2]=e;f=a+e|0;break c}F[d+11|0]=e;f=d+e|0;a=d;if(!e){break b}}qa(a,c,e)}F[f|0]=0;c=I[d+11|0];e=c<<24>>24;b=H[b+4>>2];a=0;d:{if(!b){break d}a=c;c=(e|0)<0;a=c?H[d+4>>2]:a;f=c?H[d>>2]:d;while(1){c=I[b+27|0];g=c<<24>>24<0;c=g?H[b+20>>2]:c;i=c>>>0>>0;e:{f:{g:{h:{i:{j:{h=i?c:a;if(h){g=g?H[b+16>>2]:b+16|0;j=Fa(f,g,h);if(j){break j}if(a>>>0>=c>>>0){break i}break e}if(a>>>0>=c>>>0){break h}break e}if((j|0)<0){break e}}c=Fa(g,f,h);if(c){break g}}if(i){break f}a=1;break d}if((c|0)<0){break f}a=1;break d}b=b+4|0}b=H[b>>2];if(b){continue}break}a=0}if((e|0)<0){oa(H[d>>2])}ca=d+16|0;break a}Na();v()}return a|0}function fd(a,b){var c=0,d=0;c=H[b+8>>2];H[a+4>>2]=H[b+4>>2];H[a+8>>2]=c;H[a+20>>2]=H[b+20>>2];c=H[b+16>>2];H[a+12>>2]=H[b+12>>2];H[a+16>>2]=c;a:{b:{if((a|0)!=(b|0)){c=H[b+28>>2];if(c){d=H[a+24>>2];if(H[a+32>>2]<<5>>>0>>0){if(d){oa(d);H[a+32>>2]=0;H[a+24>>2]=0;H[a+28>>2]=0;c=H[b+28>>2]}if((c|0)<0){break b}c=(c-1>>>5|0)+1|0;d=pa(c<<2);H[a+32>>2]=c;H[a+28>>2]=0;H[a+24>>2]=d;c=H[b+28>>2]}va(d,H[b+24>>2],(c-1>>>3&536870908)+4|0);c=H[b+28>>2]}else{c=0}H[a+28>>2]=c;c=H[b+40>>2];if(c){d=H[a+36>>2];if(H[a+44>>2]<<5>>>0>>0){if(d){oa(d);H[a+44>>2]=0;H[a+36>>2]=0;H[a+40>>2]=0;c=H[b+40>>2]}if((c|0)<0){break a}c=(c-1>>>5|0)+1|0;d=pa(c<<2);H[a+44>>2]=c;H[a+40>>2]=0;H[a+36>>2]=d;c=H[b+40>>2]}va(d,H[b+36>>2],(c-1>>>3&536870908)+4|0);b=H[b+40>>2]}else{b=0}H[a+40>>2]=b}return}sa();v()}sa();v()}function uc(a){var b=0,c=0,d=0;b=H[a+8>>2];d=H[a>>2];a:{if(I[a+12|0]){b:{c:{d:{e:{if((b|0)==-1){break e}c=b+1|0;b=(c>>>0)%3|0?c:b-2|0;if((b|0)==-1){break e}b=H[H[d+12>>2]+(b<<2)>>2];if((b|0)!=-1){break d}}H[a+8>>2]=-1;break c}c=b+1|0;b=(c>>>0)%3|0?c:b-2|0;H[a+8>>2]=b;if((b|0)!=-1){break b}}c=H[a+4>>2];b=-1;f:{if((c|0)==-1){break f}g:{if((c>>>0)%3|0){c=c-1|0;break g}c=c+2|0;b=-1;if((c|0)==-1){break f}}c=H[H[d+12>>2]+(c<<2)>>2];b=-1;if((c|0)==-1){break f}b=c-1|0;if((c>>>0)%3|0){break f}b=c+2|0}F[a+12|0]=0;H[a+8>>2]=b;return}if((b|0)!=H[a+4>>2]){break a}H[a+8>>2]=-1;return}c=-1;h:{if((b|0)==-1){break h}i:{if((b>>>0)%3|0){b=b-1|0;break i}b=b+2|0;c=-1;if((b|0)==-1){break h}}b=H[H[d+12>>2]+(b<<2)>>2];c=-1;if((b|0)==-1){break h}c=b-1|0;if((b>>>0)%3|0){break h}c=b+2|0}H[a+8>>2]=c}}function Rf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;f=ca-32|0;ca=f;d=H[a+28>>2];H[f+16>>2]=d;g=H[a+20>>2];H[f+28>>2]=c;H[f+24>>2]=b;b=g-d|0;H[f+20>>2]=b;g=b+c|0;i=2;a:{b:{b=f+16|0;d=Z(H[a+60>>2],b|0,2,f+12|0)|0;if(d){H[3992]=d;d=-1}else{d=0}c:{d:{if(d){d=b;break d}while(1){e=H[f+12>>2];if((e|0)==(g|0)){break c}if((e|0)<0){d=b;break b}h=H[b+4>>2];j=h>>>0>>0;d=(j<<3)+b|0;h=e-(j?h:0)|0;H[d>>2]=h+H[d>>2];b=(j?12:4)+b|0;H[b>>2]=H[b>>2]-h;g=g-e|0;b=d;i=i-j|0;e=Z(H[a+60>>2],b|0,i|0,f+12|0)|0;if(e){H[3992]=e;e=-1}else{e=0}if(!e){continue}break}}if((g|0)!=-1){break b}}b=H[a+44>>2];H[a+28>>2]=b;H[a+20>>2]=b;H[a+16>>2]=b+H[a+48>>2];a=c;break a}H[a+28>>2]=0;H[a+16>>2]=0;H[a+20>>2]=0;H[a>>2]=H[a>>2]|32;a=0;if((i|0)==2){break a}a=c-H[d+4>>2]|0}ca=f+32|0;return a|0}function Ih(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;e=H[a+4>>2];d=H[e>>2];a:{b=H[a+12>>2];c=H[b+56>>2]-H[b+52>>2]|0;f=c>>2;b:{if(f>>>0<=H[e+8>>2]-d>>2>>>0){break b}if((c|0)<0){break a}b=H[e+4>>2];c=pa(c);f=c+(f<<2)|0;g=c+(b-d&-4)|0;c=g;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;H[c>>2]=H[b>>2];if((b|0)!=(d|0)){continue}break}}H[e+8>>2]=f;H[e+4>>2]=g;H[e>>2]=c;if(!d){break b}oa(d)}e=a+8|0;b=H[a+76>>2];c:{if(b){d=H[b>>2];if((d|0)==H[b+4>>2]){return 1}b=0;while(1){c=we(e,H[(b<<2)+d>>2]);if(!c){break c}f=H[a+76>>2];d=H[f>>2];b=b+1|0;if(b>>>0>2]-d>>2>>>0){continue}break}break c}c=1;a=H[H[a+12>>2]+64>>2];a=H[a+4>>2]-H[a>>2]|0;if(a>>>0<12){break c}a=(a>>2>>>0)/3|0;b=0;while(1){c=we(e,N(b,3));if(!c){break c}b=b+1|0;if((a|0)!=(b|0)){continue}break}}return c|0}sa();v()}function Oh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;e=H[a+4>>2];d=H[e>>2];a:{b=H[a+12>>2];c=H[b+28>>2]-H[b+24>>2]|0;f=c>>2;b:{if(f>>>0<=H[e+8>>2]-d>>2>>>0){break b}if((c|0)<0){break a}b=H[e+4>>2];c=pa(c);f=c+(f<<2)|0;g=c+(b-d&-4)|0;c=g;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;H[c>>2]=H[b>>2];if((b|0)!=(d|0)){continue}break}}H[e+8>>2]=f;H[e+4>>2]=g;H[e>>2]=c;if(!d){break b}oa(d)}e=a+8|0;b=H[a+76>>2];c:{if(b){d=H[b>>2];if((d|0)==H[b+4>>2]){return 1}b=0;while(1){c=xe(e,H[(b<<2)+d>>2]);if(!c){break c}f=H[a+76>>2];d=H[f>>2];b=b+1|0;if(b>>>0>2]-d>>2>>>0){continue}break}break c}c=1;a=H[a+12>>2];a=H[a+4>>2]-H[a>>2]|0;if(a>>>0<12){break c}a=(a>>2>>>0)/3|0;b=0;while(1){c=xe(e,N(b,3));if(!c){break c}b=b+1|0;if((a|0)!=(b|0)){continue}break}}return c|0}sa();v()}function Te(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;g=H[b+8>>2];h=H[b+12>>2];c=H[b+20>>2];i=c;e=H[b+16>>2];d=e+4|0;c=d>>>0<4?c+1|0:c;a:{if(d>>>0>g>>>0&(c|0)>=(h|0)|(c|0)>(h|0)){break a}j=H[b>>2];f=e+j|0;f=I[f|0]|I[f+1|0]<<8|(I[f+2|0]<<16|I[f+3|0]<<24);H[b+16>>2]=d;H[b+20>>2]=c;k=J[b+38>>1];if(k>>>0<=513){c=i;d=e+8|0;c=d>>>0<8?c+1|0:c;if(d>>>0>g>>>0&(c|0)>=(h|0)|(c|0)>(h|0)){break a}H[b+16>>2]=d;H[b+20>>2]=c}if(!(f&1)){break a}e=Q(f)^31;if(e-1>>>0>28){break a}H[a+8>>2]=e+1;i=-2<>2]=e;H[a+12>>2]=i^-1;H[a+24>>2]=e>>1;L[a+20>>2]=O(2)/O(e|0);if(k>>>0<=513){if((c|0)>=(h|0)&d>>>0>=g>>>0|(c|0)>(h|0)){break a}g=I[d+j|0];d=d+1|0;c=d?c:c+1|0;H[b+16>>2]=d;H[b+20>>2]=c;if(g>>>0>1){break a}H[a+72>>2]=g}l=ta(a+96|0,b)}return l|0}function Se(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=H[b+8>>2];g=H[b+12>>2];c=H[b+20>>2];h=c;i=H[b+16>>2];e=i+4|0;c=e>>>0<4?c+1|0:c;a:{if(e>>>0>f>>>0&(c|0)>=(g|0)|(c|0)>(g|0)){break a}j=H[b>>2];d=i+j|0;d=I[d|0]|I[d+1|0]<<8|(I[d+2|0]<<16|I[d+3|0]<<24);H[b+16>>2]=e;H[b+20>>2]=c;c=h;e=i+8|0;c=e>>>0<8?c+1|0:c;if(e>>>0>f>>>0&(c|0)>=(g|0)|(c|0)>(g|0)){break a}H[b+16>>2]=e;H[b+20>>2]=c;if(!(d&1)){break a}d=Q(d)^31;if(d-1>>>0>28){break a}H[a+8>>2]=d+1;k=-2<>2]=d;H[a+12>>2]=k^-1;H[a+24>>2]=d>>1;L[a+20>>2]=O(2)/O(d|0);if(J[b+38>>1]<=513){if((c|0)>=(g|0)&e>>>0>=f>>>0|(c|0)>(g|0)){break a}c=I[e+j|0];f=i+9|0;h=f>>>0<9?h+1|0:h;H[b+16>>2]=f;H[b+20>>2]=h;if(c>>>0>1){break a}H[a+72>>2]=c}l=ta(a+96|0,b)}return l|0} +function va(a,b,c){var d=0,e=0;a:{if((a|0)==(b|0)){break a}e=a+c|0;if(b-e>>>0<=0-(c<<1)>>>0){return qa(a,b,c)}d=(a^b)&3;b:{c:{if(a>>>0>>0){if(d){d=a;break b}if(!(a&3)){d=a;break c}d=a;while(1){if(!c){break a}F[d|0]=I[b|0];b=b+1|0;c=c-1|0;d=d+1|0;if(d&3){continue}break}break c}d:{if(d){break d}if(e&3){while(1){if(!c){break a}c=c-1|0;d=c+a|0;F[d|0]=I[b+c|0];if(d&3){continue}break}}if(c>>>0<=3){break d}while(1){c=c-4|0;H[c+a>>2]=H[b+c>>2];if(c>>>0>3){continue}break}}if(!c){break a}while(1){c=c-1|0;F[c+a|0]=I[b+c|0];if(c){continue}break}break a}if(c>>>0<=3){break b}while(1){H[d>>2]=H[b>>2];b=b+4|0;d=d+4|0;c=c-4|0;if(c>>>0>3){continue}break}}if(!c){break a}while(1){F[d|0]=I[b|0];d=d+1|0;b=b+1|0;c=c-1|0;if(c){continue}break}}return a}function ff(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;h=H[c+12>>2];f=h;e=H[c+20>>2];i=H[c+8>>2];g=H[c+16>>2];a:{if((f|0)<=(e|0)&i>>>0<=g>>>0|(e|0)>(f|0)){break a}j=H[c>>2];k=F[j+g|0];d=e;f=g+1|0;d=f?d:d+1|0;H[c+16>>2]=f;H[c+20>>2]=d;b:{if((k|0)==-2){break b}if((d|0)>=(h|0)&f>>>0>=i>>>0|(d|0)>(h|0)){break a}d=F[f+j|0];g=g+2|0;e=g>>>0<2?e+1|0:e;H[c+16>>2]=g;H[c+20>>2]=e;if((d-4&255)>>>0<251){break a}e=ea[H[H[a>>2]+40>>2]](a,k,d)|0;d=H[a+20>>2];H[a+20>>2]=e;if(!d){break b}ea[H[H[d>>2]+4>>2]](d)}d=H[a+20>>2];if(d){if(!(ea[H[H[a>>2]+28>>2]](a,d)|0)){break a}}if(!(ea[H[H[a>>2]+36>>2]](a,b,c)|0)){break a}c=H[a+4>>2];if(!(!c|I[c+36|0]>1)){if(!(ea[H[H[a>>2]+48>>2]](a,H[b+4>>2]-H[b>>2]>>2)|0)){break a}}l=1}return l|0}function Vb(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;d=H[a+8>>2];c=H[a+4>>2];if(d-c>>2>>>0>=b>>>0){if(b){b=b<<2;c=ra(c,0,b)+b|0}H[a+4>>2]=c;return}a:{b:{c:{g=H[a>>2];f=c-g>>2;e=f+b|0;if(e>>>0<1073741824){d=d-g|0;h=d>>>1|0;e=d>>>0>=2147483644?1073741823:e>>>0>>0?h:e;if(e){if(e>>>0>=1073741824){break c}i=pa(e<<2)}d=(f<<2)+i|0;f=b<<2;b=ra(d,0,f);f=b+f|0;e=(e<<2)+i|0;if((c|0)==(g|0)){break b}while(1){c=c-4|0;b=H[c>>2];H[c>>2]=0;d=d-4|0;H[d>>2]=b;if((c|0)!=(g|0)){continue}break}H[a+8>>2]=e;b=H[a+4>>2];H[a+4>>2]=f;c=H[a>>2];H[a>>2]=d;if((b|0)==(c|0)){break a}while(1){b=b-4|0;a=H[b>>2];H[b>>2]=0;if(a){ea[H[H[a>>2]+4>>2]](a)}if((b|0)!=(c|0)){continue}break}break a}sa();v()}wa();v()}H[a+8>>2]=e;H[a+4>>2]=f;H[a>>2]=b}if(c){oa(c)}}function Md(a,b,c){a:{switch(b-9|0){case 0:b=H[c>>2];H[c>>2]=b+4;H[a>>2]=H[b>>2];return;case 6:b=H[c>>2];H[c>>2]=b+4;b=G[b>>1];H[a>>2]=b;H[a+4>>2]=b>>31;return;case 7:b=H[c>>2];H[c>>2]=b+4;H[a>>2]=J[b>>1];H[a+4>>2]=0;return;case 8:b=H[c>>2];H[c>>2]=b+4;b=F[b|0];H[a>>2]=b;H[a+4>>2]=b>>31;return;case 9:b=H[c>>2];H[c>>2]=b+4;H[a>>2]=I[b|0];H[a+4>>2]=0;return;case 16:b=H[c>>2]+7&-8;H[c>>2]=b+8;M[a>>3]=M[b>>3];return;case 17:v();default:return;case 1:case 4:case 14:b=H[c>>2];H[c>>2]=b+4;b=H[b>>2];H[a>>2]=b;H[a+4>>2]=b>>31;return;case 2:case 5:case 11:case 15:b=H[c>>2];H[c>>2]=b+4;H[a>>2]=H[b>>2];H[a+4>>2]=0;return;case 3:case 10:case 12:case 13:break a}}b=H[c>>2]+7&-8;H[c>>2]=b+8;c=H[b+4>>2];H[a>>2]=H[b>>2];H[a+4>>2]=c}function Ed(a,b){var c=0,d=0,e=0;c=ca+-64|0;ca=c;d=H[a>>2];e=H[d-4>>2];d=H[d-8>>2];H[c+32>>2]=0;H[c+36>>2]=0;H[c+40>>2]=0;H[c+44>>2]=0;H[c+48>>2]=0;H[c+52>>2]=0;F[c+55|0]=0;F[c+56|0]=0;F[c+57|0]=0;F[c+58|0]=0;F[c+59|0]=0;F[c+60|0]=0;F[c+61|0]=0;F[c+62|0]=0;H[c+24>>2]=0;H[c+28>>2]=0;H[c+20>>2]=0;H[c+16>>2]=14924;H[c+12>>2]=a;H[c+8>>2]=b;a=a+d|0;d=0;a:{if(Ya(e,b,0)){H[c+56>>2]=1;ea[H[H[e>>2]+20>>2]](e,c+8|0,a,a,1,0);d=H[c+32>>2]==1?a:0;break a}ea[H[H[e>>2]+24>>2]](e,c+8|0,a,1,0);b:{switch(H[c+44>>2]){case 0:d=H[c+48>>2]==1?H[c+36>>2]==1?H[c+40>>2]==1?H[c+28>>2]:0:0:0;break a;case 1:break b;default:break a}}if(H[c+32>>2]!=1){if(H[c+48>>2]|H[c+36>>2]!=1|H[c+40>>2]!=1){break a}}d=H[c+24>>2]}ca=c- -64|0;return d}function ua(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;H[a+16>>2]=0;e=H[a>>2];H[a+4>>2]=e;H[a+12>>2]=e;e=H[b+8>>2];c=H[b+12>>2];h=c;d=H[b+20>>2];f=H[b+16>>2];g=f+4|0;d=g>>>0<4?d+1|0:d;a:{if(e>>>0>>0&(d|0)>=(c|0)|(d|0)>(c|0)){break a}c=f+H[b>>2]|0;c=I[c|0]|I[c+1|0]<<8|(I[c+2|0]<<16|I[c+3|0]<<24);H[b+16>>2]=g;H[b+20>>2]=d;if(!c|c&3){break a}f=h-(d+(e>>>0>>0)|0)|0;if(e-g>>>0>>0&(f|0)<=0|(f|0)<0){break a}if(c>>>0>=4){ya(a,c>>>2|0);h=H[b+12>>2];g=H[b+16>>2];d=H[b+20>>2];e=H[b+8>>2]}f=c+g|0;d=f>>>0>>0?d+1|0:d;if(e>>>0>>0&(d|0)>=(h|0)|(d|0)>(h|0)){break a}qa(H[a>>2],H[b>>2]+g|0,c);d=H[b+20>>2];e=c+H[b+16>>2]|0;d=e>>>0>>0?d+1|0:d;H[b+16>>2]=e;H[b+20>>2]=d;H[a+16>>2]=0;H[a+12>>2]=H[a>>2];i=1}return i}function de(a,b){var c=0,d=0,e=0,f=0;d=-1;e=-1;f=-1;a:{b:{if((b|0)==-1){break b}e=H[H[H[a+4>>2]+12>>2]+(b<<2)>>2];c=b+1|0;c=(c>>>0)%3|0?c:b-2|0;if((c|0)>=0){f=(c>>>0)/3|0;f=H[(H[H[a>>2]+96>>2]+N(f,12)|0)+(c-N(f,3)<<2)>>2]}c:{if((e|0)==-1){break c}c=((e>>>0)%3|0?-1:2)+e|0;if((c|0)<0){break c}d=(c>>>0)/3|0;d=H[(H[H[a>>2]+96>>2]+N(d,12)|0)+(c-N(d,3)<<2)>>2]}c=-1;if((d|0)!=(f|0)){break a}f=-1;d:{b=((b>>>0)%3|0?-1:2)+b|0;if((b|0)>=0){d=(b>>>0)/3|0;d=H[(H[H[a>>2]+96>>2]+N(d,12)|0)+(b-N(d,3)<<2)>>2];if((e|0)==-1){break b}break d}d=-1;if((e|0)!=-1){break d}break b}b=e+1|0;b=(b>>>0)%3|0?b:e-2|0;if((b|0)<0){break b}c=H[H[a>>2]+96>>2];a=(b>>>0)/3|0;f=H[(c+N(a,12)|0)+(b-N(a,3)<<2)>>2]}c=(d|0)!=(f|0)?-1:e}return c}function Ah(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;c=pa(72);H[c+4>>2]=0;H[c+8>>2]=0;H[c>>2]=1984;H[c+12>>2]=0;H[c+16>>2]=0;H[c+20>>2]=0;H[c+24>>2]=0;H[c+28>>2]=0;H[c+32>>2]=0;H[c+36>>2]=0;H[c+40>>2]=0;H[c>>2]=2128;H[c+44>>2]=0;H[c+48>>2]=0;H[c+52>>2]=0;H[c+56>>2]=0;H[c+60>>2]=0;H[c+64>>2]=0;H[c+68>>2]=0;h=c;a:{if((b|0)>=0){g=a+8|0;c=H[a+12>>2];e=H[a+8>>2];f=c-e>>2;b:{if((f|0)>(b|0)){break b}d=b+1|0;if(b>>>0>=f>>>0){Vb(g,d-f|0);break b}if(d>>>0>=f>>>0){break b}e=(d<<2)+e|0;if((e|0)!=(c|0)){while(1){c=c-4|0;d=H[c>>2];H[c>>2]=0;if(d){ea[H[H[d>>2]+4>>2]](d)}if((c|0)!=(e|0)){continue}break}}H[a+12>>2]=e}a=H[g>>2]+(b<<2)|0;c=H[a>>2];H[a>>2]=h;if(!c){break a}}ea[H[H[c>>2]+4>>2]](c)}return(b^-1)>>>31|0}function ra(a,b,c){var d=0,e=0,f=0,g=0;a:{if(!c){break a}F[a|0]=b;d=a+c|0;F[d-1|0]=b;if(c>>>0<3){break a}F[a+2|0]=b;F[a+1|0]=b;F[d-3|0]=b;F[d-2|0]=b;if(c>>>0<7){break a}F[a+3|0]=b;F[d-4|0]=b;if(c>>>0<9){break a}d=0-a&3;e=d+a|0;b=N(b&255,16843009);H[e>>2]=b;d=c-d&-4;c=d+e|0;H[c-4>>2]=b;if(d>>>0<9){break a}H[e+8>>2]=b;H[e+4>>2]=b;H[c-8>>2]=b;H[c-12>>2]=b;if(d>>>0<25){break a}H[e+24>>2]=b;H[e+20>>2]=b;H[e+16>>2]=b;H[e+12>>2]=b;H[c-16>>2]=b;H[c-20>>2]=b;H[c-24>>2]=b;H[c-28>>2]=b;g=e&4|24;c=d-g|0;if(c>>>0<32){break a}d=Rj(b,0,1,1);f=da;b=e+g|0;while(1){H[b+24>>2]=d;H[b+28>>2]=f;H[b+16>>2]=d;H[b+20>>2]=f;H[b+8>>2]=d;H[b+12>>2]=f;H[b>>2]=d;H[b+4>>2]=f;b=b+32|0;c=c-32|0;if(c>>>0>31){continue}break}}return a}function Mj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=H[b+8>>2];e=H[b+12>>2];g=e;e=H[b+20>>2];k=e;h=H[b+16>>2];c=h+4|0;e=c>>>0<4?e+1|0:e;i=c;a:{if(c>>>0>d>>>0&(e|0)>=(g|0)|(e|0)>(g|0)){break a}j=H[b>>2];c=j+h|0;f=I[c|0]|I[c+1|0]<<8|(I[c+2|0]<<16|I[c+3|0]<<24);H[b+16>>2]=i;H[b+20>>2]=e;c=d;d=k;e=h+8|0;d=e>>>0<8?d+1|0:d;if(c>>>0>>0&(d|0)>=(g|0)|(d|0)>(g|0)){break a}c=i+j|0;c=I[c|0]|I[c+1|0]<<8|(I[c+2|0]<<16|I[c+3|0]<<24);H[b+16>>2]=e;H[b+20>>2]=d;if((c|0)<(f|0)){break a}H[a+16>>2]=c;H[a+12>>2]=f;d=(c>>31)-((f>>31)+(c>>>0>>0)|0)|0;b=c-f|0;if(!d&b>>>0>2147483646|d){break a}l=1;d=b+1|0;H[a+20>>2]=d;b=d>>>1|0;H[a+24>>2]=b;H[a+28>>2]=0-b;if(d&1){break a}H[a+24>>2]=b-1}return l|0}function sd(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=a+16|0;d=H[e>>2];a:{if(!d){break a}f=H[b>>2];b=e;while(1){g=(f|0)>H[d+16>>2];b=g?b:d;d=H[(g?d+4|0:d)>>2];if(d){continue}break}if((b|0)==(e|0)|(f|0)>2]){break a}d=H[b+24>>2];if(!d){break a}f=b+20|0;b=I[c+11|0];e=b<<24>>24<0;g=e?H[c>>2]:c;b=e?H[c+4>>2]:b;while(1){e=I[d+27|0];h=e<<24>>24<0;e=h?H[d+20>>2]:e;j=e>>>0>>0;b:{c:{d:{e:{f:{g:{i=j?e:b;if(i){h=h?H[d+16>>2]:d+16|0;k=Fa(g,h,i);if(k){break g}if(b>>>0>=e>>>0){break f}break b}if(b>>>0>=e>>>0){break e}break b}if((k|0)<0){break b}}e=Fa(h,g,i);if(e){break d}}if(j){break c}return Tc(f,c)}if((e|0)<0){break c}return Tc(f,c)}d=d+4|0}d=H[d>>2];if(d){continue}break}}return Tc(a,c)}function be(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=ca-16|0;ca=d;f=H[a+24>>2];k=H[a+28>>2];a:{if((f|0)!=(k|0)){while(1){H[d+8>>2]=0;H[d>>2]=0;H[d+4>>2]=0;a=$d(H[f>>2],b,d);g=I[d+11|0];h=g<<24>>24;i=3;b:{c:{d:{if(!a){break d}i=0;a=I[c+11|0];e=a<<24>>24;j=(h|0)<0?H[d+4>>2]:g;if((j|0)!=(((e|0)<0?H[c+4>>2]:a)|0)){break d}a=(e|0)<0?H[c>>2]:c;e=(h|0)<0;e:{if(!e){e=d;if(!h){break e}while(1){if(I[e|0]!=I[a|0]){break d}a=a+1|0;e=e+1|0;g=g-1|0;if(g){continue}break}break e}if(!j){break e}if(Fa(e?H[d>>2]:d,a,j)){break c}}l=H[f>>2];i=1}if((h|0)>=0){break b}}oa(H[d>>2])}f:{switch(i|0){case 0:case 3:break f;default:break a}}f=f+4|0;if((k|0)!=(f|0)){continue}break}}l=0}ca=d+16|0;return l}function Cb(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;f=c-b|0;h=f>>2;d=H[a+8>>2];e=H[a>>2];if(h>>>0<=d-e>>2>>>0){d=H[a+4>>2];g=d-e|0;f=g+b|0;i=g>>2;g=i>>>0>>0?f:c;if((g|0)!=(b|0)){while(1){H[e>>2]=H[b>>2];e=e+4|0;b=b+4|0;if((g|0)!=(b|0)){continue}break}}if(h>>>0>i>>>0){if((c|0)!=(g|0)){while(1){H[d>>2]=H[f>>2];d=d+4|0;f=f+4|0;if((f|0)!=(c|0)){continue}break}}H[a+4>>2]=d;return}H[a+4>>2]=e;return}if(e){H[a+4>>2]=e;oa(e);H[a+8>>2]=0;H[a>>2]=0;H[a+4>>2]=0;d=0}a:{if((f|0)<0){break a}e=d>>>1|0;d=d>>>0>=2147483644?1073741823:e>>>0>h>>>0?e:h;if(d>>>0>=1073741824){break a}e=d<<2;d=pa(e);H[a>>2]=d;H[a+8>>2]=d+e;if((b|0)!=(c|0)){c=b;b=(f-4&-4)+4|0;d=qa(d,c,b)+b|0}H[a+4>>2]=d;return}sa();v()}function Oa(a,b,c){var d=0,e=0,f=0;e=ca-16|0;ca=e;H[a+4>>2]=0;a:{b:{if(!b){break b}f=H[a+8>>2];d=f<<5;c:{if(d>>>0>=b>>>0){H[a+4>>2]=b;break c}H[e+8>>2]=0;H[e>>2]=0;H[e+4>>2]=0;if((b|0)<0){break a}if(d>>>0<=1073741822){f=f<<6;d=b+31&-32;d=d>>>0>>0?f:d}else{d=2147483647}pb(e,d);f=H[a>>2];H[a>>2]=H[e>>2];H[e>>2]=f;d=H[a+4>>2];H[a+4>>2]=b;H[e+4>>2]=d;d=H[a+8>>2];H[a+8>>2]=H[e+8>>2];H[e+8>>2]=d;if(!f){break c}oa(f)}d=b>>>5|0;a=H[a>>2];if(I[c|0]){if(b>>>0>=32){ra(a,255,d<<2)}if((b&-32)==(b|0)){break b}a=a+(d<<2)|0;H[a>>2]=H[a>>2]|-1>>>32-(b&31);break b}if(b>>>0>=32){ra(a,0,d<<2)}if((b&-32)==(b|0)){break b}a=a+(d<<2)|0;H[a>>2]=H[a>>2]&(-1>>>32-(b&31)^-1)}ca=e+16|0;return}sa();v()}function Hg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=ca-32|0;ca=e;a:{b:{f=Ma(c);if(f>>>0<2147483632){c:{d:{if(f>>>0>=11){a=(f|15)+1|0;g=pa(a);H[e+24>>2]=a|-2147483648;H[e+16>>2]=g;H[e+20>>2]=f;a=f+g|0;break d}F[e+27|0]=f;g=e+16|0;a=f+g|0;if(!f){break c}}qa(g,c,f)}F[a|0]=0;c=Ma(d);if(c>>>0>=2147483632){break b}e:{f:{if(c>>>0>=11){f=(c|15)+1|0;a=pa(f);H[e+8>>2]=f|-2147483648;H[e>>2]=a;H[e+4>>2]=c;g=a+c|0;break f}F[e+11|0]=c;g=c+e|0;a=e;if(!c){break e}}qa(a,d,c)}F[g|0]=0;c=H[b+4>>2];a=-1;g:{if(!c){break g}c=be(c,e+16|0,e);a=-1;if(!c){break g}a=Yd(b,H[c+24>>2])}if(F[e+11|0]<0){oa(H[e>>2])}if(F[e+27|0]<0){oa(H[e+16>>2])}ca=e+32|0;break a}Na();v()}Na();v()}return a|0}function jb(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=H[b>>2];h=H[b+8>>2];i=H[b+4>>2];j=H[b>>2];d=H[a>>2];b=H[d+4>>2];a=H[d+8>>2];if(b>>>0>>0){H[b+8>>2]=h;H[b+4>>2]=i;H[b>>2]=j;H[d+4>>2]=b+12;return}a:{e=H[d>>2];g=(b-e|0)/12|0;c=g+1|0;if(c>>>0<357913942){f=(a-e|0)/12|0;a=f<<1;c=f>>>0>=178956970?357913941:a>>>0>c>>>0?a:c;if(c){if(c>>>0>=357913942){break a}f=pa(N(c,12))}else{f=0}a=f+N(g,12)|0;H[a+8>>2]=h;H[a+4>>2]=i;H[a>>2]=j;g=a+12|0;if((b|0)!=(e|0)){while(1){a=a-12|0;b=b-12|0;H[a>>2]=H[b>>2];H[a+4>>2]=H[b+4>>2];H[a+8>>2]=H[b+8>>2];if((b|0)!=(e|0)){continue}break}}H[d+8>>2]=f+N(c,12);H[d+4>>2]=g;H[d>>2]=a;if(e){oa(e)}return}sa();v()}wa();v()}function lf(a,b){a=a|0;b=b|0;a=0;a:{switch(b|0){case 0:a=pa(20);H[a+12>>2]=-1;H[a+16>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;H[a>>2]=2232;return a|0;case 1:a=pa(24);H[a+12>>2]=-1;H[a+16>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;H[a>>2]=2232;H[a+20>>2]=0;H[a>>2]=2448;return a|0;case 2:a=pa(48);H[a+12>>2]=-1;H[a+16>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;H[a>>2]=2232;H[a+20>>2]=0;H[a>>2]=2448;H[a+24>>2]=1832;H[a>>2]=11048;H[a+32>>2]=0;H[a+36>>2]=0;H[a+28>>2]=-1;H[a+40>>2]=0;H[a+44>>2]=0;return a|0;case 3:a=pa(32);H[a+12>>2]=-1;H[a+16>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;H[a>>2]=2232;H[a+20>>2]=0;H[a>>2]=2448;H[a+24>>2]=1032;H[a>>2]=7028;H[a+28>>2]=-1;break;default:break a}}return a|0}function tf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=H[b>>2];b=H[b+4>>2];d=H[H[a+8>>2]+40>>2];j=d;m=pa((d|0)<0?-1:d);i=b-f|0;e=1;a:{if((i|0)<4){break a}b=0;g=H[c+16>>2];k=d;f=g+d|0;d=0+H[c+20>>2]|0;d=f>>>0>>0?d+1|0:d;h=H[c+12>>2];e=0;if(K[c+8>>2]>>0&(d|0)>=(h|0)|(d|0)>(h|0)){break a}e=i>>2;i=(e|0)<=1?1:e;while(1){b:{g=qa(m,H[c>>2]+g|0,j);H[c+16>>2]=f;H[c+20>>2]=d;qa(H[H[H[a+8>>2]+64>>2]>>2]+b|0,g,j);l=l+1|0;if((i|0)==(l|0)){break b}b=b+j|0;d=n+H[c+20>>2]|0;g=H[c+16>>2];f=k+g|0;d=f>>>0>>0?d+1|0:d;h=H[c+12>>2];if((d|0)<=(h|0)&K[c+8>>2]>=f>>>0|(d|0)<(h|0)){continue}}break}e=(e|0)<=(l|0)}oa(m);return e|0}function Ti(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;H[b>>2]=1;f=b+8|0;c=H[b+8>>2];d=H[b+12>>2]-c|0;if(d>>>0<=4294967291){kc(f,d+4|0);c=H[f>>2]}c=c+d|0;d=H[a+4>>2];F[c|0]=d;F[c+1|0]=d>>>8;F[c+2|0]=d>>>16;F[c+3|0]=d>>>24;c=H[a+8>>2];if((c|0)!=H[a+12>>2]){d=0;while(1){g=(d<<2)+c|0;c=H[b+8>>2];e=H[b+12>>2]-c|0;if(e>>>0<=4294967291){kc(f,e+4|0);c=H[f>>2]}c=c+e|0;e=H[g>>2];F[c|0]=e;F[c+1|0]=e>>>8;F[c+2|0]=e>>>16;F[c+3|0]=e>>>24;d=d+1|0;c=H[a+8>>2];if(d>>>0>2]-c>>2>>>0){continue}break}}c=H[b+12>>2];b=H[b+8>>2];c=c-b|0;if(c>>>0<=4294967291){kc(f,c+4|0);b=H[f>>2]}b=b+c|0;a=H[a+20>>2];F[b|0]=a;F[b+1|0]=a>>>8;F[b+2|0]=a>>>16;F[b+3|0]=a>>>24}function Aa(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;f=c-b|0;g=f>>2;d=H[a+8>>2];e=H[a>>2];if(g>>>0<=d-e>>2>>>0){f=H[a+4>>2]-e|0;d=f+b|0;h=f>>2;f=h>>>0>>0?d:c;i=f-b|0;if((b|0)!=(f|0)){va(e,b,i)}if(g>>>0>h>>>0){b=H[a+4>>2];if((c|0)!=(f|0)){while(1){H[b>>2]=H[d>>2];b=b+4|0;d=d+4|0;if((d|0)!=(c|0)){continue}break}}H[a+4>>2]=b;return}H[a+4>>2]=e+i;return}if(e){H[a+4>>2]=e;oa(e);H[a+8>>2]=0;H[a>>2]=0;H[a+4>>2]=0;d=0}a:{if((f|0)<0){break a}e=d>>>1|0;d=d>>>0>=2147483644?1073741823:e>>>0>g>>>0?e:g;if(d>>>0>=1073741824){break a}e=d<<2;d=pa(e);H[a>>2]=d;H[a+8>>2]=d+e;if((b|0)!=(c|0)){c=b;b=(f-4&-4)+4|0;d=qa(d,c,b)+b|0}H[a+4>>2]=d;return}sa();v()}function Rb(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;c=H[a+4>>2];if((c|0)!=H[a+8>>2]){e=H[b+4>>2];H[c>>2]=H[b>>2];H[c+4>>2]=e;H[c+8>>2]=H[b+8>>2];H[a+4>>2]=c+12;return}a:{g=H[a>>2];d=(c-g|0)/12|0;e=d+1|0;if(e>>>0<357913942){f=d<<1;f=d>>>0>=178956970?357913941:e>>>0>>0?f:e;if(f){if(f>>>0>=357913942){break a}e=pa(N(f,12))}else{e=0}d=e+N(d,12)|0;h=H[b+4>>2];H[d>>2]=H[b>>2];H[d+4>>2]=h;H[d+8>>2]=H[b+8>>2];b=d+12|0;if((c|0)!=(g|0)){while(1){c=c-12|0;h=H[c+4>>2];d=d-12|0;H[d>>2]=H[c>>2];H[d+4>>2]=h;H[d+8>>2]=H[c+8>>2];if((c|0)!=(g|0)){continue}break}c=H[a>>2]}H[a+8>>2]=e+N(f,12);H[a+4>>2]=b;H[a>>2]=d;if(c){oa(c)}return}sa();v()}wa();v()}function Qi(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=ca-32|0;ca=f;g=e>>>0>1073741823?-1:e<<2;l=ra(pa(g),0,g);g=l;i=H[g>>2];g=H[g+4>>2];k=H[b+4>>2];H[f+24>>2]=H[b>>2];H[f+28>>2]=k;H[f+8>>2]=i;H[f+12>>2]=g;i=a+8|0;rc(f+16|0,i,f+8|0,f+24|0);H[c>>2]=H[f+16>>2];H[c+4>>2]=H[f+20>>2];if((d|0)>(e|0)){k=0-e<<2;a=e;while(1){h=a<<2;g=h+c|0;j=g+k|0;m=H[j>>2];j=H[j+4>>2];h=b+h|0;n=H[h+4>>2];H[f+24>>2]=H[h>>2];H[f+28>>2]=n;H[f+8>>2]=m;H[f+12>>2]=j;rc(f+16|0,i,f+8|0,f+24|0);H[g>>2]=H[f+16>>2];H[g+4>>2]=H[f+20>>2];a=a+e|0;if((d|0)>(a|0)){continue}break}}oa(l);ca=f+32|0;return 1}function Hi(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=ca-32|0;ca=f;h=e>>>0>1073741823?-1:e<<2;h=ra(pa(h),0,h);g=H[b>>2];i=H[b+4>>2];k=H[h+4>>2];H[f+16>>2]=H[h>>2];H[f+20>>2]=k;H[f+8>>2]=g;H[f+12>>2]=i;i=a+8|0;qc(f+24|0,i,f+16|0,f+8|0);H[c>>2]=H[f+24>>2];H[c+4>>2]=H[f+28>>2];if((d|0)>(e|0)){k=0-e<<2;a=e;while(1){g=a<<2;j=g+b|0;m=H[j>>2];j=H[j+4>>2];g=c+g|0;l=g+k|0;n=H[l+4>>2];H[f+16>>2]=H[l>>2];H[f+20>>2]=n;H[f+8>>2]=m;H[f+12>>2]=j;qc(f+24|0,i,f+16|0,f+8|0);H[g>>2]=H[f+24>>2];H[g+4>>2]=H[f+28>>2];a=a+e|0;if((d|0)>(a|0)){continue}break}}oa(h);ca=f+32|0;return 1}function Ag(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;a:{if(K[b+80>>2]>65535){break a}a=H[b+100>>2];b=H[b+96>>2];e=(a-b|0)/12|0;f=N(e,6);g=(f|0)==(c|0);if((a|0)==(b|0)|(c|0)!=(f|0)){break a}g=1;c=e>>>0<=1?1:e;i=c&1;a=0;if(e>>>0>=2){j=c&-2;c=0;while(1){f=N(a,6);h=f+d|0;e=b+N(a,12)|0;G[h>>1]=H[e>>2];G[(f|2)+d>>1]=H[e+4>>2];G[h+4>>1]=H[e+8>>2];f=a|1;e=N(f,6)+d|0;f=b+N(f,12)|0;G[e>>1]=H[f>>2];G[e+2>>1]=H[f+4>>2];G[e+4>>1]=H[f+8>>2];a=a+2|0;c=c+2|0;if((j|0)!=(c|0)){continue}break}}if(!i){break a}c=N(a,6)+d|0;a=b+N(a,12)|0;G[c>>1]=H[a>>2];G[c+2>>1]=H[a+4>>2];G[c+4>>1]=H[a+8>>2]}return g|0}function Gd(a,b,c,d,e,f,g){var h=0,i=0,j=0;h=ca-16|0;ca=h;if((b^-1)+2147483631>>>0>=c>>>0){if(I[a+11|0]>>>7|0){i=H[a>>2]}else{i=a}if(b>>>0<1073741799){H[h+12>>2]=b<<1;H[h>>2]=b+c;c=ca-16|0;ca=c;ca=c+16|0;c=h+12|0;c=H[(K[h>>2]>2]?c:h)>>2];if(c>>>0>=11){j=c+16&-16;c=j-1|0;c=(c|0)==11?j:c}else{c=10}c=c+1|0}else{c=2147483631}Zb(h,c);c=H[h>>2];if(f){yb(c,g,f)}g=d-e|0;if((d|0)!=(e|0)){yb(c+f|0,e+i|0,g)}if((b|0)!=10){oa(i)}H[a>>2]=c;H[a+8>>2]=H[a+8>>2]&-2147483648|H[h+4>>2]&2147483647;H[a+8>>2]=H[a+8>>2]|-2147483648;b=a;a=f+g|0;H[b+4>>2]=a;F[h+12|0]=0;F[a+c|0]=I[h+12|0];ca=h+16|0;return}Na();v()}function Rg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;a=ca-32|0;ca=a;H[a+24>>2]=0;H[a+28>>2]=0;a:{d=Ma(c);if(d>>>0<2147483632){b:{c:{if(d>>>0>=11){e=(d|15)+1|0;f=pa(e);H[a+16>>2]=e|-2147483648;H[a+8>>2]=f;H[a+12>>2]=d;e=d+f|0;break c}F[a+19|0]=d;f=a+8|0;e=f+d|0;if(!d){break b}}qa(f,c,d)}F[e|0]=0;c=b+4|0;b=nb(b,a+8|0);d:{if((c|0)==(b|0)){break d}c=H[b+32>>2];b=H[b+28>>2];if((c-b|0)!=8){break d}c=I[b+4|0]|I[b+5|0]<<8|(I[b+6|0]<<16|I[b+7|0]<<24);H[a+24>>2]=I[b|0]|I[b+1|0]<<8|(I[b+2|0]<<16|I[b+3|0]<<24);H[a+28>>2]=c}g=M[a+24>>3];if(F[a+19|0]<0){oa(H[a+8>>2])}ca=a+32|0;break a}Na();v()}return+g}function uf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;f=1;a:{if((ea[H[H[b>>2]+20>>2]](b)|0)<=0){break a}while(1){f=0;c=Zd(H[H[a+4>>2]+4>>2],ea[H[H[b>>2]+24>>2]](b,g)|0);if((c|0)==-1){break a}e=H[a+4>>2];b:{if(I[e+36|0]<=1){if(ea[H[H[b>>2]+28>>2]](b,H[H[H[e+4>>2]+8>>2]+(c<<2)>>2])|0){break b}break a}d=0;c:{if((c|0)<0){break c}h=H[e+4>>2];if(H[h+12>>2]-H[h+8>>2]>>2<=(c|0)){break c}d=H[H[e+8>>2]+(H[H[e+20>>2]+(c<<2)>>2]<<2)>>2];d=ea[H[H[d>>2]+32>>2]](d,c)|0}if(!d){break a}if(!(ea[H[H[b>>2]+28>>2]](b,d)|0)){break a}}f=1;g=g+1|0;if((ea[H[H[b>>2]+20>>2]](b)|0)>(g|0)){continue}break}}return f|0}function tb(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;H[a+8>>2]=0;H[a>>2]=0;H[a+4>>2]=0;a:{b:{if(b){if(b>>>0>=357913942){break b}b=N(b,12);d=pa(b);H[a+4>>2]=d;H[a>>2]=d;e=b+d|0;H[a+8>>2]=e;f=H[c+4>>2];g=H[c>>2];c:{if((f|0)==(g|0)){b=b-12|0;ra(d,0,(b-((b>>>0)%12|0)|0)+12|0);break c}h=f-g|0;if((h|0)<0){break a}i=h&-4;while(1){H[d+8>>2]=0;H[d>>2]=0;H[d+4>>2]=0;b=pa(h);H[d>>2]=b;H[d+8>>2]=b+i;c=g;while(1){H[b>>2]=H[c>>2];b=b+4|0;c=c+4|0;if((f|0)!=(c|0)){continue}break}H[d+4>>2]=b;d=d+12|0;if((e|0)!=(d|0)){continue}break}}H[a+4>>2]=e}return}sa();v()}H[d+8>>2]=0;H[d>>2]=0;H[d+4>>2]=0;sa();v()}function Vi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=H[b+8>>2];d=H[b+12>>2];g=d;d=H[b+20>>2];i=d;h=H[b+16>>2];f=h+4|0;d=f>>>0<4?d+1|0:d;a:{if(c>>>0>>0&(d|0)>=(g|0)|(d|0)>(g|0)){break a}e=h+H[b>>2]|0;e=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);H[b+16>>2]=f;H[b+20>>2]=d;if(J[b+38>>1]<=513){f=c;c=i;d=h+8|0;c=d>>>0<8?c+1|0:c;if(d>>>0>f>>>0&(c|0)>=(g|0)|(c|0)>(g|0)){break a}H[b+16>>2]=d;H[b+20>>2]=c}if(!(e&1)){break a}b=Q(e)^31;if(b-1>>>0>28){break a}j=1;H[a+8>>2]=b+1;b=-2<>2]=c;H[a+12>>2]=b^-1;H[a+24>>2]=c>>1;L[a+20>>2]=O(2)/O(c|0)}return j|0}function Lc(a,b,c){var d=0,e=0,f=0,g=0;a:{f=b>>>0<1431655766&(b|c)>=0;b:{if(!f){break b}b=N(b,3);Kc(a,b,13648);Kc(a+12|0,b,13652);d=H[a+24>>2];c:{if(H[a+32>>2]-d>>2>>>0>=c>>>0){break c}if(c>>>0>=1073741824){break a}b=H[a+28>>2];e=c<<2;c=pa(e);e=c+e|0;g=c+(b-d&-4)|0;c=g;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;H[c>>2]=H[b>>2];if((b|0)!=(d|0)){continue}break}}H[a+32>>2]=e;H[a+28>>2]=g;H[a+24>>2]=c;if(!d){break c}oa(d)}H[a+80>>2]=0;H[a+84>>2]=0;b=H[a+76>>2];H[a+76>>2]=0;if(b){oa(b)}H[a+68>>2]=0;H[a+72>>2]=0;b=a- -64|0;a=H[b>>2];H[b>>2]=0;if(!a){break b}oa(a)}return f}sa();v()}function Fe(a){var b=0,c=0,d=0,e=0,f=0;f=1;c=H[a+140>>2];a:{if((c|0)<=0){break a}b=c<<4;d=pa(c>>>0>268435455?-1:b|4);H[d>>2]=c;d=d+4|0;c=d+b|0;b=d;while(1){H[b>>2]=0;H[b+4>>2]=0;F[b+5|0]=0;F[b+6|0]=0;F[b+7|0]=0;F[b+8|0]=0;F[b+9|0]=0;F[b+10|0]=0;F[b+11|0]=0;F[b+12|0]=0;b=b+16|0;if((c|0)!=(b|0)){continue}break}e=H[a+136>>2];H[a+136>>2]=d;if(e){c=e-4|0;d=H[c>>2];if(d){b=(d<<4)+e|0;while(1){b=b-16|0;if((e|0)!=(b|0)){continue}break}}oa(c)}b=0;if(H[a+140>>2]<=0){break a}while(1){f=ta(H[a+136>>2]+(b<<4)|0,a);if(!f){break a}b=b+1|0;if((b|0)>2]){continue}break}}return f}function mb(a,b){var c=0,d=0,e=0,f=0,g=0;a:{if(H[a+64>>2]){break a}c=pa(32);H[c+16>>2]=0;H[c+20>>2]=0;H[c+8>>2]=0;H[c>>2]=0;H[c+4>>2]=0;H[c+24>>2]=0;H[c+28>>2]=0;d=H[a+64>>2];H[a+64>>2]=c;if(!d){break a}c=H[d>>2];if(c){H[d+4>>2]=c;oa(c)}oa(d)}d=H[a+64>>2];c=H[a+28>>2]-1|0;if(c>>>0<=10){c=H[(c<<2)+13584>>2]}else{c=-1}c=N(c,I[a+24|0]);f=c>>31;g=se(d,0,Rj(c,f,b,0),da);if(g){d=H[a+64>>2];H[a>>2]=d;e=H[d+20>>2];H[a+8>>2]=H[d+16>>2];H[a+12>>2]=e;e=H[d+24>>2];d=H[d+28>>2];H[a+48>>2]=0;H[a+52>>2]=0;H[a+40>>2]=c;H[a+44>>2]=f;H[a+16>>2]=e;H[a+20>>2]=d;H[a+80>>2]=b}return g}function jc(a,b){var c=0;c=H[b+4>>2];H[a>>2]=H[b>>2];H[a+4>>2]=c;c=H[b+60>>2];H[a+56>>2]=H[b+56>>2];H[a+60>>2]=c;c=H[b+52>>2];H[a+48>>2]=H[b+48>>2];H[a+52>>2]=c;c=H[b+44>>2];H[a+40>>2]=H[b+40>>2];H[a+44>>2]=c;c=H[b+36>>2];H[a+32>>2]=H[b+32>>2];H[a+36>>2]=c;c=H[b+28>>2];H[a+24>>2]=H[b+24>>2];H[a+28>>2]=c;c=H[b+20>>2];H[a+16>>2]=H[b+16>>2];H[a+20>>2]=c;c=H[b+12>>2];H[a+8>>2]=H[b+8>>2];H[a+12>>2]=c;H[a+88>>2]=0;H[a+64>>2]=0;H[a+68>>2]=0;H[a+72>>2]=0;H[a+76>>2]=0;F[a+77|0]=0;F[a+78|0]=0;F[a+79|0]=0;F[a+80|0]=0;F[a+81|0]=0;F[a+82|0]=0;F[a+83|0]=0;F[a+84|0]=0;return a}function zg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;a=H[b+100>>2];b=H[b+96>>2];h=a-b|0;a:{if((h|0)!=(c|0)|(a|0)==(b|0)){break a}g=(c|0)/12|0;e=g>>>0<=1?1:g;j=e&1;a=0;if(g>>>0>=2){k=e&-2;g=0;while(1){e=N(a,12);i=e+d|0;f=b+e|0;H[i>>2]=H[f>>2];H[(e|4)+d>>2]=H[f+4>>2];H[i+8>>2]=H[f+8>>2];f=N(a|1,12);e=f+d|0;f=b+f|0;H[e>>2]=H[f>>2];H[e+4>>2]=H[f+4>>2];H[e+8>>2]=H[f+8>>2];a=a+2|0;g=g+2|0;if((k|0)!=(g|0)){continue}break}}if(!j){break a}e=d;d=N(a,12);a=e+d|0;b=b+d|0;H[a>>2]=H[b>>2];H[a+4>>2]=H[b+4>>2];H[a+8>>2]=H[b+8>>2]}return(c|0)==(h|0)|0}function Mi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=H[b+8>>2];d=H[b+12>>2];g=d;d=H[b+20>>2];i=d;h=H[b+16>>2];f=h+4|0;d=f>>>0<4?d+1|0:d;a:{if(c>>>0>>0&(d|0)>=(g|0)|(d|0)>(g|0)){break a}e=h+H[b>>2]|0;e=I[e|0]|I[e+1|0]<<8|(I[e+2|0]<<16|I[e+3|0]<<24);H[b+16>>2]=f;H[b+20>>2]=d;f=c;c=i;d=h+8|0;c=d>>>0<8?c+1|0:c;if(d>>>0>f>>>0&(c|0)>=(g|0)|(c|0)>(g|0)){break a}H[b+16>>2]=d;H[b+20>>2]=c;if(!(e&1)){break a}b=Q(e)^31;if(b-1>>>0>28){break a}j=1;H[a+8>>2]=b+1;b=-2<>2]=c;H[a+12>>2]=b^-1;H[a+24>>2]=c>>1;L[a+20>>2]=O(2)/O(c|0)}return j|0}function nb(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;f=a+4|0;a=H[a+4>>2];a:{b:{if(!a){break b}d=I[b+11|0];c=d<<24>>24<0;g=c?H[b>>2]:b;d=c?H[b+4>>2]:d;b=f;while(1){e=I[a+27|0];c=e<<24>>24<0;e=c?H[a+20>>2]:e;h=e>>>0>d>>>0;i=h?d:e;c:{if(i){c=Fa(c?H[a+16>>2]:a+16|0,g,i);if(c){break c}}c=d>>>0>e>>>0?-1:h}c=(c|0)<0;b=c?b:a;a=H[(c?a+4|0:a)>>2];if(a){continue}break}if((b|0)==(f|0)){break b}c=I[b+27|0];a=c<<24>>24<0;d:{c=a?H[b+20>>2]:c;e=c>>>0>>0?c:d;if(e){a=Fa(g,a?H[b+16>>2]:b+16|0,e);if(a){break d}}if(c>>>0>d>>>0){break b}break a}if((a|0)>=0){break a}}b=f}return b}function Jf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;if(Ya(a,H[b+8>>2],e)){if(!(H[b+28>>2]==1|H[b+4>>2]!=(c|0))){H[b+28>>2]=d}return}a:{if(Ya(a,H[b>>2],e)){if(!(H[b+16>>2]!=(c|0)&H[b+20>>2]!=(c|0))){if((d|0)!=1){break a}H[b+32>>2]=1;return}H[b+32>>2]=d;b:{if(H[b+44>>2]==4){break b}G[b+52>>1]=0;a=H[a+8>>2];ea[H[H[a>>2]+20>>2]](a,b,c,c,1,e);if(I[b+53|0]){H[b+44>>2]=3;if(!I[b+52|0]){break b}break a}H[b+44>>2]=4}H[b+20>>2]=c;H[b+40>>2]=H[b+40>>2]+1;if(H[b+36>>2]!=1|H[b+24>>2]!=2){break a}F[b+54|0]=1;return}a=H[a+8>>2];ea[H[H[a>>2]+24>>2]](a,b,c,d,e)}}function Db(a,b,c){var d=0,e=0,f=0,g=0;a:{b:{if(!b){break b}if(J[a+38>>1]<=513){f=H[a+12>>2];d=H[a+20>>2];b=H[a+16>>2];g=b+8|0;d=g>>>0<8?d+1|0:d;e=0;if(K[a+8>>2]>>0&(d|0)>=(f|0)|(d|0)>(f|0)){break a}b=b+H[a>>2]|0;d=I[b+4|0]|I[b+5|0]<<8|(I[b+6|0]<<16|I[b+7|0]<<24);H[c>>2]=I[b|0]|I[b+1|0]<<8|(I[b+2|0]<<16|I[b+3|0]<<24);H[c+4>>2]=d;b=H[a+20>>2];c=H[a+16>>2]+8|0;b=c>>>0<8?b+1|0:b;H[a+16>>2]=c;H[a+20>>2]=b;break b}e=0;if(!re(1,c,a)){break a}}F[a+36|0]=1;H[a+32>>2]=0;b=H[a+16>>2];c=b+H[a>>2]|0;H[a+24>>2]=c;H[a+28>>2]=(H[a+8>>2]-b|0)+c;e=1}return e}function ve(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;f=pa(64);c=pa(12);H[c+8>>2]=H[H[a+4>>2]+80>>2];H[c>>2]=13216;H[c+4>>2]=0;f=od(f,c);a:{b:{if((b|0)<0){c=f;break b}h=a+8|0;c=H[a+12>>2];e=H[a+8>>2];g=c-e>>2;c:{if((g|0)>(b|0)){break c}d=b+1|0;if(b>>>0>=g>>>0){Vb(h,d-g|0);break c}if(d>>>0>=g>>>0){break c}e=e+(d<<2)|0;if((e|0)!=(c|0)){while(1){c=c-4|0;d=H[c>>2];H[c>>2]=0;if(d){ea[H[H[d>>2]+4>>2]](d)}if((c|0)!=(e|0)){continue}break}}H[a+12>>2]=e}a=H[h>>2]+(b<<2)|0;c=H[a>>2];H[a>>2]=f;if(!c){break a}}ea[H[H[c>>2]+4>>2]](c)}return(b^-1)>>>31|0}function Qd(a,b){var c=0,d=0,e=0,f=0;d=ca-16|0;ca=d;H[d+12>>2]=b;c=ca-208|0;ca=c;H[c+204>>2]=b;b=c+160|0;ra(b,0,40);H[c+200>>2]=H[c+204>>2];a:{if((Od(0,a,c+200|0,c+80|0,b)|0)<0){break a}f=H[3941]>=0;b=H[3922];if(H[3940]<=0){H[3922]=b&-33}b:{c:{d:{if(!H[3934]){H[3934]=80;H[3929]=0;H[3926]=0;H[3927]=0;e=H[3933];H[3933]=c;break d}if(H[3926]){break c}}if(Sd(15688)){break b}}Od(15688,a,c+200|0,c+80|0,c+160|0)}if(e){ea[H[3931]](15688,0,0)|0;H[3934]=0;H[3933]=e;H[3929]=0;H[3926]=0;H[3927]=0}H[3922]=H[3922]|b&32;if(!f){break a}}ca=c+208|0;ca=d+16|0}function pf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;c=H[a+60>>2];a:{if(!c){break a}H[c+4>>2]=a+48;if(!(ea[H[H[c>>2]+12>>2]](c)|0)){break a}b:{c=ea[H[H[a>>2]+24>>2]](a)|0;if((c|0)<=0){break b}while(1){c:{f=H[(ea[H[H[a>>2]+28>>2]](a)|0)+4>>2];g=ea[H[H[a>>2]+20>>2]](a,d)|0;e=H[a+60>>2];if(!(ea[H[H[e>>2]+8>>2]](e,H[H[f+8>>2]+(g<<2)>>2])|0)){break c}d=d+1|0;if((c|0)!=(d|0)){continue}break b}break}return 0}d=0;if(!(ea[H[H[a>>2]+36>>2]](a,b)|0)){break a}if(!(ea[H[H[a>>2]+40>>2]](a,b)|0)){break a}d=ea[H[H[a>>2]+44>>2]](a)|0}return d|0}function id(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=H[a+216>>2];if((c|0)!=H[a+220>>2]){while(1){a:{c=H[N(e,144)+c>>2];if((c|0)<0){break a}d=H[a+4>>2];f=H[d+8>>2];if((c|0)>=H[d+12>>2]-f>>2){break a}d=0;c=H[(c<<2)+f>>2];if((ea[H[H[c>>2]+24>>2]](c)|0)<=0){break a}while(1){if((ea[H[H[c>>2]+20>>2]](c,d)|0)!=(b|0)){d=d+1|0;if((ea[H[H[c>>2]+24>>2]](c)|0)>(d|0)){continue}break a}break}a=H[a+216>>2]+N(e,144)|0;return(I[a+100|0]?a+4|0:0)|0}e=e+1|0;c=H[a+216>>2];if(e>>>0<(H[a+220>>2]-c|0)/144>>>0){continue}break}}return 0}function xb(a){var b=0,c=0,d=0,e=0;c=H[a+132>>2];if(c){d=c;b=H[a+136>>2];if((c|0)!=(b|0)){while(1){d=b-12|0;e=H[d>>2];if(e){H[b-8>>2]=e;oa(e)}b=d;if((c|0)!=(b|0)){continue}break}d=H[a+132>>2]}H[a+136>>2]=c;oa(d)}c=H[a+120>>2];if(c){d=c;b=H[a+124>>2];if((c|0)!=(b|0)){while(1){d=b-12|0;e=H[d>>2];if(e){H[b-8>>2]=e;oa(e)}b=d;if((c|0)!=(b|0)){continue}break}d=H[a+120>>2]}H[a+124>>2]=c;oa(d)}b=H[a+108>>2];if(b){H[a+112>>2]=b;oa(b)}b=H[a+96>>2];if(b){H[a+100>>2]=b;oa(b)}Za(a+76|0);Za(a+56|0);Za(a+36|0);Za(a+16|0)}function rd(a){a=a|0;var b=0,c=0,d=0;H[a>>2]=2128;d=H[a+60>>2];if(d){b=d;c=H[a- -64>>2];if((b|0)!=(c|0)){while(1){c=c-4|0;b=H[c>>2];H[c>>2]=0;if(b){Ga(b)}if((c|0)!=(d|0)){continue}break}b=H[a+60>>2]}H[a+64>>2]=d;oa(b)}b=H[a+48>>2];if(b){H[a+52>>2]=b;oa(b)}d=H[a+36>>2];if(d){b=d;c=H[a+40>>2];if((b|0)!=(c|0)){while(1){c=c-24|0;ea[H[H[c>>2]>>2]](c)|0;if((c|0)!=(d|0)){continue}break}b=H[a+36>>2]}H[a+40>>2]=d;oa(b)}H[a>>2]=1984;b=H[a+16>>2];if(b){H[a+20>>2]=b;oa(b)}b=H[a+4>>2];if(b){H[a+8>>2]=b;oa(b)}return a|0}function ue(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=H[a+8>>2];d=H[a+4>>2];if(c-d>>2>>>0>=b>>>0){if(b){b=b<<2;d=ra(d,0,b)+b|0}H[a+4>>2]=d;return}a:{f=H[a>>2];g=d-f>>2;e=g+b|0;if(e>>>0<1073741824){c=c-f|0;h=c>>>1|0;e=c>>>0>=2147483644?1073741823:e>>>0>>0?h:e;if(e){if(e>>>0>=1073741824){break a}i=pa(e<<2)}c=(g<<2)+i|0;b=b<<2;b=ra(c,0,b)+b|0;if((d|0)!=(f|0)){while(1){c=c-4|0;d=d-4|0;H[c>>2]=H[d>>2];if((d|0)!=(f|0)){continue}break}}H[a+8>>2]=(e<<2)+i;H[a+4>>2]=b;H[a>>2]=c;if(f){oa(f)}return}sa();v()}wa();v()}function rb(a){var b=0,c=0,d=0,e=0,f=0;d=H[a+8>>2];a:{if(I[d+84|0]){break a}b=H[a+16>>2];if(!b|!I[b+84|0]){break a}c=H[d+72>>2];e=H[d+68>>2];F[b+84|0]=0;c=c-e>>2;f=H[b+68>>2];e=H[b+72>>2]-f>>2;b:{if(c>>>0>e>>>0){qb(b+68|0,c-e|0,2316);d=H[a+8>>2];break b}if(c>>>0>=e>>>0){break b}H[b+72>>2]=f+(c<<2)}if(I[d+84|0]){break a}c=H[d+68>>2];if((c|0)==H[d+72>>2]){break a}e=H[H[a+16>>2]+68>>2];b=0;while(1){f=b<<2;H[f+e>>2]=H[c+f>>2];b=b+1|0;c=H[d+68>>2];if(b>>>0>2]-c>>2>>>0){continue}break}}return H[a+16>>2]}function Lg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=ca+-64|0;ca=e;f=Ha(e+8|0);H[f+16>>2]=0;H[f+20>>2]=0;H[f>>2]=b;H[f+8>>2]=c;H[f+12>>2]=0;b=e+48|0;Pe(b,a,f,d);H[a+24>>2]=H[e+48>>2];f=a+24|0;a:{if((f|0)==(b|0)){break a}b=a+28|0;c=e+48|4;g=I[e+63|0];d=g<<24>>24;if(F[a+39|0]>=0){if((d|0)>=0){a=H[c+4>>2];H[b>>2]=H[c>>2];H[b+4>>2]=a;H[b+8>>2]=H[c+8>>2];break a}Xb(b,H[e+52>>2],H[e+56>>2]);break a}a=(d|0)<0;Yb(b,a?H[e+52>>2]:c,a?H[e+56>>2]:g)}if(F[e+63|0]<0){oa(H[e+52>>2])}ca=e- -64|0;return f|0}function Kg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=ca+-64|0;ca=e;f=Ha(e+8|0);H[f+16>>2]=0;H[f+20>>2]=0;H[f>>2]=b;H[f+8>>2]=c;H[f+12>>2]=0;b=e+48|0;Oe(b,a,f,d);H[a+24>>2]=H[e+48>>2];f=a+24|0;a:{if((f|0)==(b|0)){break a}b=a+28|0;c=e+48|4;g=I[e+63|0];d=g<<24>>24;if(F[a+39|0]>=0){if((d|0)>=0){a=H[c+4>>2];H[b>>2]=H[c>>2];H[b+4>>2]=a;H[b+8>>2]=H[c+8>>2];break a}Xb(b,H[e+52>>2],H[e+56>>2]);break a}a=(d|0)<0;Yb(b,a?H[e+52>>2]:c,a?H[e+56>>2]:g)}if(F[e+63|0]<0){oa(H[e+52>>2])}ca=e- -64|0;return f|0}function Ig(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;a=ca-32|0;ca=a;a:{d=Ma(c);if(d>>>0<2147483632){b:{c:{if(d>>>0>=11){e=(d|15)+1|0;f=pa(e);H[a+24>>2]=e|-2147483648;H[a+16>>2]=f;H[a+20>>2]=d;e=d+f|0;break c}F[a+27|0]=d;f=a+16|0;e=f+d|0;if(!d){break b}}qa(f,c,d)}F[e|0]=0;F[a+4|0]=0;H[a>>2]=1701667182;F[a+11|0]=4;d=H[b+4>>2];c=-1;d:{if(!d){break d}d=be(d,a,a+16|0);c=-1;if(!d){break d}c=Yd(b,H[d+24>>2])}b=c;if(F[a+11|0]<0){oa(H[a>>2])}if(F[a+27|0]<0){oa(H[a+16>>2])}ca=a+32|0;break a}Na();v()}return b|0}function hd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=H[a+216>>2];if((c|0)!=H[a+220>>2]){while(1){a:{c=H[N(e,144)+c>>2];if((c|0)<0){break a}d=H[a+4>>2];f=H[d+8>>2];if((c|0)>=H[d+12>>2]-f>>2){break a}d=0;c=H[(c<<2)+f>>2];if((ea[H[H[c>>2]+24>>2]](c)|0)<=0){break a}while(1){if((ea[H[H[c>>2]+20>>2]](c,d)|0)!=(b|0)){d=d+1|0;if((ea[H[H[c>>2]+24>>2]](c)|0)>(d|0)){continue}break a}break}return(H[a+216>>2]+N(e,144)|0)+104|0}e=e+1|0;c=H[a+216>>2];if(e>>>0<(H[a+220>>2]-c|0)/144>>>0){continue}break}}return a+184|0}function ab(a){var b=0,c=0,d=0,e=0;c=H[a+640>>2];if(c){d=c;b=H[a+644>>2];if((c|0)!=(b|0)){while(1){d=b-12|0;e=H[d>>2];if(e){H[b-8>>2]=e;oa(e)}b=d;if((c|0)!=(b|0)){continue}break}d=H[a+640>>2]}H[a+644>>2]=c;oa(d)}c=H[a+628>>2];if(c){d=c;b=H[a+632>>2];if((c|0)!=(b|0)){while(1){d=b-12|0;e=H[d>>2];if(e){H[b-8>>2]=e;oa(e)}b=d;if((c|0)!=(b|0)){continue}break}d=H[a+628>>2]}H[a+632>>2]=c;oa(d)}b=H[a+616>>2];if(b){H[a+620>>2]=b;oa(b)}b=H[a+604>>2];if(b){H[a+608>>2]=b;oa(b)}Za(a+584|0);Za(a+564|0);Za(a+544|0)}function Tg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=ca-16|0;ca=d;H[d+12>>2]=0;a:{e=Ma(c);if(e>>>0<2147483632){b:{c:{if(e>>>0>=11){f=(e|15)+1|0;a=pa(f);H[d+8>>2]=f|-2147483648;H[d>>2]=a;H[d+4>>2]=e;f=a+e|0;break c}F[d+11|0]=e;f=d+e|0;a=d;if(!e){break b}}qa(a,c,e)}F[f|0]=0;a=nb(b,d);d:{if((a|0)==(b+4|0)){break d}b=H[a+32>>2];a=H[a+28>>2];if((b-a|0)!=4){break d}H[d+12>>2]=I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24)}a=H[d+12>>2];if(F[d+11|0]<0){oa(H[d>>2])}ca=d+16|0;break a}Na();v()}return a|0}function vb(a){var b=0,c=0,d=0,e=0;c=H[a+128>>2];if(c){d=c;b=H[a+132>>2];if((c|0)!=(b|0)){while(1){d=b-12|0;e=H[d>>2];if(e){H[b-8>>2]=e;oa(e)}b=d;if((c|0)!=(b|0)){continue}break}d=H[a+128>>2]}H[a+132>>2]=c;oa(d)}c=H[a+116>>2];if(c){d=c;b=H[a+120>>2];if((c|0)!=(b|0)){while(1){d=b-12|0;e=H[d>>2];if(e){H[b-8>>2]=e;oa(e)}b=d;if((c|0)!=(b|0)){continue}break}d=H[a+116>>2]}H[a+120>>2]=c;oa(d)}b=H[a+104>>2];if(b){H[a+108>>2]=b;oa(b)}b=H[a+92>>2];if(b){H[a+96>>2]=b;oa(b)}Za(a+72|0);Za(a+52|0);Za(a+32|0)}function kc(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{c=H[a+4>>2];e=H[a>>2];d=c-e|0;b:{if(d>>>0>>0){g=b-d|0;f=H[a+8>>2];if(g>>>0<=f-c>>>0){h=a,i=ra(c,0,g)+g|0,H[h+4>>2]=i;break b}if((b|0)<0){break a}c=f-e|0;f=c<<1;c=c>>>0>=1073741823?2147483647:b>>>0>>0?f:b;f=pa(c);ra(f+d|0,0,g);d=va(f,e,d);H[a+8>>2]=d+c;H[a+4>>2]=b+d;H[a>>2]=d;if(!e){break b}oa(e);break b}if(b>>>0>=d>>>0){break b}H[a+4>>2]=b+e}b=H[a+28>>2];c=b;d=b+1|0;b=H[a+24>>2]+1|0;e=b?c:d;H[a+24>>2]=b;H[a+28>>2]=e;return}sa();v()}function Ka(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;e=H[a+4>>2];if((e|0)!=H[a+8>>2]){H[e>>2]=H[b>>2];H[a+4>>2]=e+4;return}a:{g=H[a>>2];f=e-g|0;c=f>>2;d=c+1|0;if(d>>>0<1073741824){h=c<<2;c=f>>>1|0;c=f>>>0>=2147483644?1073741823:c>>>0>d>>>0?c:d;if(c){if(c>>>0>=1073741824){break a}f=pa(c<<2)}else{f=0}d=h+f|0;H[d>>2]=H[b>>2];b=d+4|0;if((e|0)!=(g|0)){while(1){d=d-4|0;e=e-4|0;H[d>>2]=H[e>>2];if((e|0)!=(g|0)){continue}break}}H[a+8>>2]=f+(c<<2);H[a+4>>2]=b;H[a>>2]=d;if(g){oa(g)}return}sa();v()}wa();v()}function Ia(a){H[a>>2]=-1;H[a+4>>2]=0;H[a+8>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;F[a+28|0]=1;H[a+20>>2]=0;H[a+24>>2]=0;H[a+12>>2]=0;H[a+16>>2]=0;H[a+40>>2]=0;H[a+44>>2]=0;H[a+48>>2]=0;H[a+52>>2]=0;H[a+56>>2]=0;H[a+60>>2]=0;H[a+64>>2]=0;H[a+68>>2]=0;H[a+76>>2]=0;H[a+80>>2]=0;H[a+84>>2]=0;H[a+88>>2]=0;H[a+92>>2]=0;H[a+96>>2]=0;H[a+72>>2]=a+4;H[a+104>>2]=0;H[a+108>>2]=0;F[a+100|0]=1;H[a+112>>2]=0;H[a+116>>2]=0;H[a+120>>2]=0;H[a+124>>2]=0;H[a+128>>2]=0;H[a+132>>2]=0;H[a+136>>2]=0;H[a+140>>2]=0}function Ld(a,b){if(!a){return 0}a:{b:{if(a){if(b>>>0<=127){break b}c:{if(!H[H[4292]>>2]){if((b&-128)==57216){break b}break c}if(b>>>0<=2047){F[a+1|0]=b&63|128;F[a|0]=b>>>6|192;a=2;break a}if(!((b&-8192)!=57344&b>>>0>=55296)){F[a+2|0]=b&63|128;F[a|0]=b>>>12|224;F[a+1|0]=b>>>6&63|128;a=3;break a}if(b-65536>>>0<=1048575){F[a+3|0]=b&63|128;F[a|0]=b>>>18|240;F[a+2|0]=b>>>6&63|128;F[a+1|0]=b>>>12&63|128;a=4;break a}}H[3992]=25;a=-1}else{a=1}break a}F[a|0]=b;a=1}return a}function Hb(a,b){var c=0,d=0,e=0,f=0;d=H[a+12>>2];c=H[a+16>>2]-d>>2;a:{if(c>>>0>>0){ya(a+12|0,b-c|0);break a}if(b>>>0>=c>>>0){break a}H[a+16>>2]=d+(b<<2)}b:{c=H[a>>2];c:{if(H[a+8>>2]-c>>2>>>0>=b>>>0){break c}if(b>>>0>=1073741824){break b}d=H[a+4>>2];e=b<<2;b=pa(e);e=b+e|0;f=b+(d-c&-4)|0;b=f;if((c|0)!=(d|0)){while(1){b=b-4|0;d=d-4|0;H[b>>2]=H[d>>2];if((c|0)!=(d|0)){continue}break}}H[a+8>>2]=e;H[a+4>>2]=f;H[a>>2]=b;if(!c){break c}oa(c)}return}sa();v()}function _b(a){a=a|0;var b=0,c=0,d=0;H[a>>2]=13724;b=H[a+68>>2];if(b){H[a+72>>2]=b;oa(b)}b=H[a+56>>2];if(b){H[a+60>>2]=b;oa(b)}b=H[a+44>>2];if(b){H[a+48>>2]=b;oa(b)}b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}b=H[a+20>>2];if(b){H[a+24>>2]=b;oa(b)}b=H[a+8>>2];if(b){d=b;c=H[a+12>>2];if((b|0)!=(c|0)){while(1){c=c-4|0;d=H[c>>2];H[c>>2]=0;if(d){Ga(d)}if((b|0)!=(c|0)){continue}break}d=H[a+8>>2]}H[a+12>>2]=b;oa(d)}b=H[a+4>>2];H[a+4>>2]=0;if(b){Uc(b)}return a|0}function yb(a,b,c){var d=0,e=0,f=0,g=0,h=0;f=ca-16|0;ca=f;d=ca-32|0;ca=d;e=ca-16|0;ca=e;H[e+12>>2]=b;H[e+8>>2]=b+c;H[d+24>>2]=H[e+12>>2];H[d+28>>2]=H[e+8>>2];ca=e+16|0;c=ca-16|0;ca=c;h=H[d+28>>2];e=H[d+24>>2];g=h-e|0;if((e|0)!=(h|0)){va(a,e,g)}H[c+12>>2]=e+g;H[c+8>>2]=a+g;H[d+16>>2]=H[c+12>>2];H[d+20>>2]=H[c+8>>2];ca=c+16|0;H[d+12>>2]=(H[d+16>>2]-b|0)+b;H[d+8>>2]=(H[d+20>>2]-a|0)+a;H[f+8>>2]=H[d+12>>2];H[f+12>>2]=H[d+8>>2];ca=d+32|0;ca=f+16|0}function ya(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;e=H[a+8>>2];c=H[a+4>>2];if(e-c>>2>>>0>=b>>>0){if(b){b=b<<2;c=ra(c,0,b)+b|0}H[a+4>>2]=c;return}a:{f=c;c=H[a>>2];g=f-c|0;h=g>>2;d=h+b|0;if(d>>>0<1073741824){e=e-c|0;f=e>>>1|0;d=e>>>0>=2147483644?1073741823:d>>>0>>0?f:d;if(d){if(d>>>0>=1073741824){break a}i=pa(d<<2)}b=b<<2;e=ra((h<<2)+i|0,0,b);f=d<<2;d=va(i,c,g);H[a+8>>2]=f+d;H[a+4>>2]=b+e;H[a>>2]=d;if(c){oa(c)}return}sa();v()}wa();v()}function Tc(a,b){var c=0,d=0,e=0,f=0;c=a+4|0;a=nb(a,b);a:{if((c|0)==(a|0)){break a}b=a+28|0;b=F[a+39|0]<0?H[b>>2]:b;while(1){a=b;b=a+1|0;c=F[a|0];if((c|0)==32|c-9>>>0<5){continue}break}b:{c:{d:{c=F[a|0];switch(c-43|0){case 0:break c;case 2:break d;default:break b}}e=1}c=F[b|0];a=b}if(c-48>>>0<10){while(1){d=(N(d,10)-F[a|0]|0)+48|0;b=F[a+1|0];a=a+1|0;if(b-48>>>0<10){continue}break}}a=e?d:0-d|0;if((a|0)==-1){break a}f=(a|0)!=0}return f}function bb(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;a=H[a>>2];c=H[a+4>>2];e=H[a+8>>2];if(c>>>0>>0){H[c>>2]=H[b>>2];H[a+4>>2]=c+4;return}a:{d=c;c=H[a>>2];g=d-c|0;d=g>>2;f=d+1|0;if(f>>>0<1073741824){h=d<<2;e=e-c|0;d=e>>>1|0;f=e>>>0>=2147483644?1073741823:f>>>0>>0?d:f;if(f){if(f>>>0>=1073741824){break a}e=pa(f<<2)}else{e=0}d=h+e|0;H[d>>2]=H[b>>2];b=va(e,c,g);H[a+8>>2]=b+(f<<2);H[a+4>>2]=d+4;H[a>>2]=b;if(c){oa(c)}return}sa();v()}wa();v()}function ob(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;e=H[a+8>>2];c=H[a+4>>2];if(e-c>>3>>>0>=b>>>0){if(b){b=b<<3;c=ra(c,0,b)+b|0}H[a+4>>2]=c;return}a:{f=c;c=H[a>>2];g=f-c|0;h=g>>3;d=h+b|0;if(d>>>0<536870912){e=e-c|0;f=e>>>2|0;d=e>>>0>=2147483640?536870911:d>>>0>>0?f:d;if(d){if(d>>>0>=536870912){break a}i=pa(d<<3)}b=b<<3;e=ra((h<<3)+i|0,0,b);f=d<<3;d=va(i,c,g);H[a+8>>2]=f+d;H[a+4>>2]=b+e;H[a>>2]=d;if(c){oa(c)}return}sa();v()}wa();v()}function kf(a){a=a|0;var b=0,c=0,d=0;H[a>>2]=2328;b=H[a+60>>2];H[a+60>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}b=H[a+48>>2];if(b){H[a+52>>2]=b;oa(b)}d=H[a+36>>2];if(d){c=H[a+40>>2];b=d;if((c|0)!=(b|0)){while(1){c=c-4|0;b=H[c>>2];H[c>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}b=H[a+36>>2]}H[a+40>>2]=d;oa(b)}H[a>>2]=1984;b=H[a+16>>2];if(b){H[a+20>>2]=b;oa(b)}b=H[a+4>>2];if(b){H[a+8>>2]=b;oa(b)}return a|0}function jf(a){a=a|0;var b=0,c=0,d=0;H[a>>2]=2328;b=H[a+60>>2];H[a+60>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}b=H[a+48>>2];if(b){H[a+52>>2]=b;oa(b)}d=H[a+36>>2];if(d){c=H[a+40>>2];b=d;if((c|0)!=(b|0)){while(1){c=c-4|0;b=H[c>>2];H[c>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}b=H[a+36>>2]}H[a+40>>2]=d;oa(b)}H[a>>2]=1984;b=H[a+16>>2];if(b){H[a+20>>2]=b;oa(b)}b=H[a+4>>2];if(b){H[a+8>>2]=b;oa(b)}oa(a)}function xi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;d=ca-16|0;ca=d;e=H[a+4>>2];a:{if((e|0)==-1){break a}c=H[b+20>>2];if(!!H[b+16>>2]&(c|0)>=0|(c|0)>0){break a}Wb(b,H[b+4>>2],H[a+8>>2],H[a+12>>2]);c=H[b+20>>2];if(!!H[b+16>>2]&(c|0)>=0|(c|0)>0){break a}Wb(b,H[b+4>>2],a+20|0,a+24|0);c=H[b+20>>2];f=H[b+16>>2];F[d+15|0]=H[a+4>>2];if(!!f&(c|0)>=0|(c|0)>0){break a}Wb(b,H[b+4>>2],d+15|0,d+16|0)}ca=d+16|0;return(e|0)!=-1|0}function Eh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;a:{b=H[a+8>>2];b:{if((b|0)<0){break b}c=H[a+4>>2];e=H[c>>2];d=H[c+4>>2]-e>>2;c:{if(d>>>0>>0){ue(c,b-d|0);f=H[a+8>>2];break c}f=b;if(b>>>0>=d>>>0){break c}H[c+4>>2]=e+(b<<2);f=b}d=f;if((d|0)<=0){break b}a=H[a+4>>2];c=H[a>>2];e=H[a+4>>2]-c>>2;a=0;while(1){if((a|0)==(e|0)){break a}H[c+(a<<2)>>2]=a;a=a+1|0;if((d|0)!=(a|0)){continue}break}}return(b^-1)>>>31|0}Ca();v()}function qe(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;e=H[a+8>>2];c=H[a+4>>2];if(e-c>>1>>>0>=b>>>0){if(b){b=b<<1;c=ra(c,0,b)+b|0}H[a+4>>2]=c;return}a:{f=c;c=H[a>>2];g=f-c|0;f=g>>1;d=f+b|0;if((d|0)>=0){e=e-c|0;d=e>>>0>=2147483646?2147483647:d>>>0>>0?e:d;if(d){if((d|0)<0){break a}h=pa(d<<1)}b=b<<1;e=ra((f<<1)+h|0,0,b);f=d<<1;d=va(h,c,g);H[a+8>>2]=f+d;H[a+4>>2]=b+e;H[a>>2]=d;if(c){oa(c)}return}sa();v()}wa();v()}function ng(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=ca-16|0;ca=d;Pe(d,a,b,c);H[a+24>>2]=H[d>>2];e=a+24|0;a:{if((e|0)==(d|0)){break a}b=a+28|0;c=d|4;f=I[d+15|0];g=f<<24>>24;if(F[a+39|0]>=0){if((g|0)>=0){a=H[c+4>>2];H[b>>2]=H[c>>2];H[b+4>>2]=a;H[b+8>>2]=H[c+8>>2];break a}Xb(b,H[d+4>>2],H[d+8>>2]);break a}a=(g|0)<0;Yb(b,a?H[d+4>>2]:c,a?H[d+8>>2]:f)}if(F[d+15|0]<0){oa(H[d+4>>2])}ca=d+16|0;return e|0}function mg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=ca-16|0;ca=d;Oe(d,a,b,c);H[a+24>>2]=H[d>>2];e=a+24|0;a:{if((e|0)==(d|0)){break a}b=a+28|0;c=d|4;f=I[d+15|0];g=f<<24>>24;if(F[a+39|0]>=0){if((g|0)>=0){a=H[c+4>>2];H[b>>2]=H[c>>2];H[b+4>>2]=a;H[b+8>>2]=H[c+8>>2];break a}Xb(b,H[d+4>>2],H[d+8>>2]);break a}a=(g|0)<0;Yb(b,a?H[d+4>>2]:c,a?H[d+8>>2]:f)}if(F[d+15|0]<0){oa(H[d+4>>2])}ca=d+16|0;return e|0}function za(a,b,c){var d=0,e=0,f=0,g=0;e=ca-16|0;ca=e;a:{b:{if(c>>>0<11){d=a;F[a+11|0]=I[a+11|0]&128|c;F[a+11|0]=I[a+11|0]&127;break b}if(c>>>0>2147483631){break a}g=e+8|0;if(c>>>0>=11){f=c+16&-16;d=f-1|0;d=(d|0)==11?f:d}else{d=10}Zb(g,d+1|0);d=H[e+8>>2];H[a>>2]=d;H[a+8>>2]=H[a+8>>2]&-2147483648|H[e+12>>2]&2147483647;H[a+8>>2]=H[a+8>>2]|-2147483648;H[a+4>>2]=c}yb(d,b,c+1|0);ca=e+16|0;return}Na();v()}function Qg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=ca-16|0;ca=d;a:{e=Ma(c);if(e>>>0<2147483632){b:{c:{if(e>>>0>=11){g=(e|15)+1|0;f=pa(g);H[d+8>>2]=g|-2147483648;H[d>>2]=f;H[d+4>>2]=e;g=e+f|0;break c}F[d+11|0]=e;g=d+e|0;f=d;if(!e){break b}}qa(f,c,e)}F[g|0]=0;f=a+16|0;c=$d(b,d,f);b=H[a+16>>2];a=F[a+27|0];if(F[d+11|0]<0){oa(H[d>>2])}ca=d+16|0;a=c?(a|0)<0?b:f:0;break a}Na();v()}return a|0}function Mc(a,b){var c=0,d=0,e=0;c=H[a+4>>2];d=c+b|0;H[a+4>>2]=d;if(!((d-1^c-1)>>>0<32?c:0)){H[H[a>>2]+((d>>>0>=33?d-1>>>5|0:0)<<2)>>2]=0}a:{if(!b){break a}a=H[a>>2]+(c>>>3&536870908)|0;c=c&31;if(c){d=32-c|0;e=b>>>0>d>>>0?d:b;H[a>>2]=H[a>>2]&(-1<>>d-e^-1);b=b-e|0;a=a+4|0}c=b>>>5|0;if(b>>>0>=32){ra(a,0,c<<2)}if((b&-32)==(b|0)){break a}a=(c<<2)+a|0;H[a>>2]=H[a>>2]&(-1>>>32-(b&31)^-1)}}function Fc(a,b,c){var d=0,e=0,f=0;d=H[c+16>>2];a:{if(!d){if(Sd(c)){break a}d=H[c+16>>2]}f=H[c+20>>2];if(d-f>>>0>>0){return ea[H[c+36>>2]](c,a,b)|0}b:{if(H[c+80>>2]<0){d=0;break b}e=b;while(1){d=e;if(!d){d=0;break b}e=d-1|0;if(I[e+a|0]!=10){continue}break}e=ea[H[c+36>>2]](c,a,d)|0;if(e>>>0>>0){break a}a=a+d|0;b=b-d|0;f=H[c+20>>2]}qa(f,a,b);H[c+20>>2]=H[c+20>>2]+b;e=b+d|0}return e}function ad(a){var b=0,c=0,d=0,e=0;if(I[a+76|0]){F[a+76|0]=0;e=H[a+60>>2];c=H[a+72>>2]+7|0;b=c>>>0<7?1:b;d=b<<29|c>>>3;c=d+H[a+56>>2]|0;b=(b>>>3|0)+e|0;H[a+56>>2]=c;H[a+60>>2]=c>>>0>>0?b+1|0:b}if(J[a+38>>1]<=513){F[a+132|0]=0;e=H[a+116>>2];b=0;c=H[a+128>>2]+7|0;b=c>>>0<7?1:b;d=b<<29|c>>>3;c=d+H[a+112>>2]|0;b=(b>>>3|0)+e|0;H[a+112>>2]=c;H[a+116>>2]=c>>>0>>0?b+1|0:b}}function re(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>10){break a}d=H[c+20>>2];f=H[c+12>>2];e=H[c+16>>2];if((d|0)>=(f|0)&e>>>0>=K[c+8>>2]|(d|0)>(f|0)){break a}f=F[e+H[c>>2]|0];e=e+1|0;d=e?d:d+1|0;H[c+16>>2]=e;H[c+20>>2]=d;d=f;b:{if((d|0)<0){if(!re(a+1|0,b,c)){break a}a=H[b>>2];d=d&127|a<<7;a=H[b+4>>2]<<7|a>>>25;break b}d=d&255;a=0}H[b>>2]=d;H[b+4>>2]=a;g=1}return g}function gb(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>10){break a}d=H[c+20>>2];f=H[c+12>>2];e=H[c+16>>2];if((d|0)>=(f|0)&e>>>0>=K[c+8>>2]|(d|0)>(f|0)){break a}f=F[e+H[c>>2]|0];e=e+1|0;d=e?d:d+1|0;H[c+16>>2]=e;H[c+20>>2]=d;d=f;b:{if((d|0)<0){if(!gb(a+1|0,b,c)){break a}a=H[b>>2];d=d&127|a<<7;a=H[b+4>>2]<<7|a>>>25;break b}d=d&255;a=0}H[b>>2]=d;H[b+4>>2]=a;g=1}return g}function Nh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;e=ca+-64|0;ca=e;d=ea[H[H[a>>2]+44>>2]](a,b)|0;a=ea[H[H[a>>2]+40>>2]](a,b)|0;f=Eb(e);g=H[b+56>>2];h=d&255;i=a;a=a-1|0;if(a>>>0<=10){a=H[(a<<2)+13584>>2]}else{a=-1}d=N(a,d);lc(f,g,h,i,0,d,d>>31);a=jc(pa(96),f);mb(a,c);F[a+84|0]=1;H[a+72>>2]=H[a+68>>2];H[a+60>>2]=H[b+60>>2];ca=e- -64|0;return a|0}function If(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;if(Ya(a,H[b+8>>2],e)){if(!(H[b+28>>2]==1|H[b+4>>2]!=(c|0))){H[b+28>>2]=d}return}a:{if(!Ya(a,H[b>>2],e)){break a}if(!(H[b+16>>2]!=(c|0)&H[b+20>>2]!=(c|0))){if((d|0)!=1){break a}H[b+32>>2]=1;return}H[b+20>>2]=c;H[b+32>>2]=d;H[b+40>>2]=H[b+40>>2]+1;if(!(H[b+36>>2]!=1|H[b+24>>2]!=2)){F[b+54|0]=1}H[b+44>>2]=4}}function Bh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;e=H[a+32>>2];b=e;h=H[b+8>>2];g=H[b+12>>2];c=H[b+16>>2];b=H[b+20>>2];f=c+4|0;b=f>>>0<4?b+1|0:b;d=0;a:{if(f>>>0>h>>>0&(b|0)>=(g|0)|(b|0)>(g|0)){break a}c=H[e>>2]+c|0;c=I[c|0]|I[c+1|0]<<8|(I[c+2|0]<<16|I[c+3|0]<<24);H[e+16>>2]=f;H[e+20>>2]=b;d=0;if((c|0)<0){break a}H[H[a+4>>2]+80>>2]=c;d=1}return d|0}function qi(a){a=a|0;var b=0,c=0,d=0;H[a>>2]=11276;b=H[a+48>>2];H[a+48>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}H[a>>2]=13280;b=H[a+20>>2];if(b){H[a+24>>2]=b;oa(b)}d=H[a+8>>2];if(d){c=H[a+12>>2];b=d;if((c|0)!=(b|0)){while(1){c=c-4|0;b=H[c>>2];H[c>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}b=H[a+8>>2]}H[a+12>>2]=d;oa(b)}return a|0}function Ee(a,b){var c=0,d=0,e=0,f=0;H[a+144>>2]=b;c=H[(ea[H[H[b>>2]+32>>2]](b)|0)+32>>2];c=H[c>>2]+H[c+16>>2]|0;d=H[(ea[H[H[b>>2]+32>>2]](b)|0)+32>>2];d=H[d+8>>2]-H[d+16>>2]|0;e=a,f=J[H[(ea[H[H[b>>2]+32>>2]](b)|0)+32>>2]+38>>1],G[e+38>>1]=f;H[a>>2]=c;H[a+16>>2]=0;H[a+20>>2]=0;H[a+8>>2]=d;H[a+12>>2]=0;e=a,f=ea[H[H[b>>2]+36>>2]](b)|0,H[e+148>>2]=f}function Cd(a,b,c,d){F[a+53|0]=1;a:{if(H[a+4>>2]!=(c|0)){break a}F[a+52|0]=1;c=H[a+16>>2];b:{if(!c){H[a+36>>2]=1;H[a+24>>2]=d;H[a+16>>2]=b;if((d|0)!=1){break a}if(H[a+48>>2]==1){break b}break a}if((b|0)==(c|0)){c=H[a+24>>2];if((c|0)==2){H[a+24>>2]=d;c=d}if(H[a+48>>2]!=1){break a}if((c|0)==1){break b}break a}H[a+36>>2]=H[a+36>>2]+1}F[a+54|0]=1}}function pi(a){a=a|0;var b=0,c=0,d=0;H[a>>2]=11276;b=H[a+48>>2];H[a+48>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}H[a>>2]=13280;b=H[a+20>>2];if(b){H[a+24>>2]=b;oa(b)}d=H[a+8>>2];if(d){c=H[a+12>>2];b=d;if((c|0)!=(b|0)){while(1){c=c-4|0;b=H[c>>2];H[c>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}b=H[a+8>>2]}H[a+12>>2]=d;oa(b)}oa(a)}function zh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;e=H[a+32>>2];b=e;g=H[b+8>>2];d=H[b+12>>2];c=H[b+16>>2];b=H[b+20>>2];f=d;d=c+4|0;b=d>>>0<4?b+1|0:b;if((f|0)>=(b|0)&d>>>0<=g>>>0|(b|0)<(f|0)){c=H[e>>2]+c|0;c=I[c|0]|I[c+1|0]<<8|(I[c+2|0]<<16|I[c+3|0]<<24);H[e+16>>2]=d;H[e+20>>2]=b;H[H[a+4>>2]+80>>2]=c}return(b|0)<=(f|0)&d>>>0<=g>>>0|(b|0)<(f|0)}function Mf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=ca+-64|0;ca=e;d=1;a:{if(Ya(a,b,0)){break a}d=0;if(!b){break a}b=Ed(b,14972);d=0;if(!b){break a}d=e+8|0;ra(d|4,0,52);H[e+56>>2]=1;H[e+20>>2]=-1;H[e+16>>2]=a;H[e+8>>2]=b;ea[H[H[b>>2]+28>>2]](b,d,H[c>>2],1);a=H[e+32>>2];if((a|0)==1){H[c>>2]=H[e+24>>2]}d=(a|0)==1}ca=e- -64|0;return d|0}function Ie(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=ca-16|0;ca=d;H[a+4>>2]=b;b=H[b+64>>2];e=H[b>>2];b=H[b+4>>2];F[d+15|0]=0;Oa(a+24|0,(b-e>>2>>>0)/3|0,d+15|0);b=H[a+4>>2];e=H[b+56>>2];b=H[b+52>>2];F[d+14|0]=0;Oa(a+36|0,e-b>>2,d+14|0);b=H[c+12>>2];H[a+16>>2]=H[c+8>>2];H[a+20>>2]=b;b=H[c+4>>2];H[a+8>>2]=H[c>>2];H[a+12>>2]=b;ca=d+16|0}function pc(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if(!b){H[c>>2]=0;return}h=0-I[a+12|0]&255;e=H[a+4>>2];d=H[a+8>>2];i=H[a>>2];while(1){j=f<<1;if(!((e|0)<=0|d>>>0>4095)){e=e-1|0;H[a+4>>2]=e;d=I[e+i|0]|d<<8}g=d&255;f=g>>>0>>0;k=g;g=N(d>>>8|0,h);d=f?k+g|0:d-(h+g|0)|0;H[a+8>>2]=d;f=f|j;b=b-1|0;if(b){continue}break}H[c>>2]=f}function yg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;a=ca-16|0;ca=a;f=F[b+24|0];e=H[3411];H[a+8>>2]=H[3410];H[a+12>>2]=e;e=H[3409];H[a>>2]=H[3408];H[a+4>>2]=e;e=Va(b,c,f,a);if(e){b=0;if(f){c=(f&255)<<2;b=pa(c);g=qa(b,a,c)+c|0}c=H[d>>2];if(c){H[d+4>>2]=c;oa(c)}H[d+8>>2]=g;H[d+4>>2]=g;H[d>>2]=b}ca=a+16|0;return e|0}function of(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;f=ea[H[H[a>>2]+24>>2]](a)|0;c=1;a:{if((f|0)<=0){break a}d=H[H[a+36>>2]>>2];g=a+48|0;c=0;if(!(ea[H[H[d>>2]+16>>2]](d,g,b)|0)){break a}while(1){e=e+1|0;if((f|0)!=(e|0)){d=H[H[a+36>>2]+(e<<2)>>2];if(ea[H[H[d>>2]+16>>2]](d,g,b)|0){continue}}break}c=(e|0)>=(f|0)}return c|0}function nf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;f=ea[H[H[a>>2]+24>>2]](a)|0;c=1;a:{if((f|0)<=0){break a}d=H[H[a+36>>2]>>2];g=a+48|0;c=0;if(!(ea[H[H[d>>2]+20>>2]](d,g,b)|0)){break a}while(1){e=e+1|0;if((f|0)!=(e|0)){d=H[H[a+36>>2]+(e<<2)>>2];if(ea[H[H[d>>2]+20>>2]](d,g,b)|0){continue}}break}c=(e|0)>=(f|0)}return c|0}function _c(a,b){var c=0,d=0;a:{c=H[a+4>>2];d=H[a+8>>2];if((c|0)==d<<5){if((c+1|0)<0){break a}if(c>>>0<=1073741822){d=d<<6;c=(c&-32)+32|0;c=c>>>0>>0?d:c}else{c=2147483647}pb(a,c);c=H[a+4>>2]}H[a+4>>2]=c+1;d=1<>2]+(c>>>3&536870908)|0;if(I[b|0]){H[a>>2]=d|H[a>>2];return}H[a>>2]=H[a>>2]&(d^-1);return}sa();v()}function $h(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=ca-16|0;ca=d;H[a+4>>2]=b;e=H[b>>2];b=H[b+4>>2];F[d+15|0]=0;Oa(a+24|0,(b-e>>2>>>0)/3|0,d+15|0);b=H[a+4>>2];e=H[b+28>>2];b=H[b+24>>2];F[d+14|0]=0;Oa(a+36|0,e-b>>2,d+14|0);b=H[c+12>>2];H[a+16>>2]=H[c+8>>2];H[a+20>>2]=b;b=H[c+4>>2];H[a+8>>2]=H[c>>2];H[a+12>>2]=b;ca=d+16|0}function $b(a){var b=0;H[a>>2]=0;H[a+4>>2]=0;H[a+56>>2]=0;H[a+48>>2]=0;H[a+52>>2]=0;H[a+40>>2]=0;H[a+44>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;H[a+24>>2]=0;H[a+28>>2]=0;H[a+16>>2]=0;H[a+20>>2]=0;H[a+8>>2]=0;H[a+12>>2]=0;b=a- -64|0;H[b>>2]=0;H[b+4>>2]=0;H[a+72>>2]=0;H[a+76>>2]=0;H[a+80>>2]=0;H[a+84>>2]=0;H[a+60>>2]=a;return a}function td(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=H[c+20>>2];e=H[c+12>>2];f=H[c+16>>2];if((d|0)>=(e|0)&f>>>0>=K[c+8>>2]|(d|0)>(e|0)){break a}e=I[H[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;H[c+16>>2]=f;H[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!td(a+1|0,b,c)){break a}e=d&127|H[b>>2]<<7}H[b>>2]=e;g=1}return g} +function hb(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=H[c+20>>2];e=H[c+12>>2];f=H[c+16>>2];if((d|0)>=(e|0)&f>>>0>=K[c+8>>2]|(d|0)>(e|0)){break a}e=I[H[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;H[c+16>>2]=f;H[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!hb(a+1|0,b,c)){break a}e=d&127|H[b>>2]<<7}H[b>>2]=e;g=1}return g}function Xa(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=H[c+20>>2];e=H[c+12>>2];f=H[c+16>>2];if((d|0)>=(e|0)&f>>>0>=K[c+8>>2]|(d|0)>(e|0)){break a}e=I[H[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;H[c+16>>2]=f;H[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!Xa(a+1|0,b,c)){break a}e=d&127|H[b>>2]<<7}H[b>>2]=e;g=1}return g}function Qe(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=H[c+20>>2];e=H[c+12>>2];f=H[c+16>>2];if((d|0)>=(e|0)&f>>>0>=K[c+8>>2]|(d|0)>(e|0)){break a}e=I[H[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;H[c+16>>2]=f;H[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!Qe(a+1|0,b,c)){break a}e=d&127|H[b>>2]<<7}H[b>>2]=e;g=1}return g}function Pc(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=H[c+20>>2];e=H[c+12>>2];f=H[c+16>>2];if((d|0)>=(e|0)&f>>>0>=K[c+8>>2]|(d|0)>(e|0)){break a}e=I[H[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;H[c+16>>2]=f;H[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!Pc(a+1|0,b,c)){break a}e=d&127|H[b>>2]<<7}H[b>>2]=e;g=1}return g}function Fb(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=H[c+20>>2];e=H[c+12>>2];f=H[c+16>>2];if((d|0)>=(e|0)&f>>>0>=K[c+8>>2]|(d|0)>(e|0)){break a}e=I[H[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;H[c+16>>2]=f;H[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!Fb(a+1|0,b,c)){break a}e=d&127|H[b>>2]<<7}H[b>>2]=e;g=1}return g}function Ea(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=H[c+20>>2];e=H[c+12>>2];f=H[c+16>>2];if((d|0)>=(e|0)&f>>>0>=K[c+8>>2]|(d|0)>(e|0)){break a}e=I[H[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;H[c+16>>2]=f;H[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!Ea(a+1|0,b,c)){break a}e=d&127|H[b>>2]<<7}H[b>>2]=e;g=1}return g}function Bb(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=H[c+20>>2];e=H[c+12>>2];f=H[c+16>>2];if((d|0)>=(e|0)&f>>>0>=K[c+8>>2]|(d|0)>(e|0)){break a}e=I[H[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;H[c+16>>2]=f;H[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!Bb(a+1|0,b,c)){break a}e=d&127|H[b>>2]<<7}H[b>>2]=e;g=1}return g}function Fa(a,b,c){var d=0,e=0;a:{b:{if(c>>>0>=4){if((a|b)&3){break b}while(1){if(H[a>>2]!=H[b>>2]){break b}b=b+4|0;a=a+4|0;c=c-4|0;if(c>>>0>3){continue}break}}if(!c){break a}}while(1){d=I[a|0];e=I[b|0];if((d|0)==(e|0)){b=b+1|0;a=a+1|0;c=c-1|0;if(c){continue}break a}break}return d-e|0}return 0}function Yc(a){var b=0,c=0,d=0,e=0;d=H[a>>2];if(d){e=d;c=H[a+4>>2];if((d|0)!=(c|0)){while(1){e=c-144|0;b=H[e+132>>2];if(b){H[c-8>>2]=b;oa(b)}b=H[c-28>>2];if(b){H[c-24>>2]=b;oa(b)}b=H[c-40>>2];if(b){H[c-36>>2]=b;oa(b)}oc(c-140|0);c=e;if((d|0)!=(c|0)){continue}break}e=H[a>>2]}H[a+4>>2]=d;oa(e)}}function Dg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=H[b+4>>2];a:{if(!d){break a}b=H[H[H[b+8>>2]+(c<<2)>>2]+60>>2];if((b|0)<0){break a}a=H[d+24>>2];c=H[d+28>>2];if((a|0)==(c|0)){break a}b:{while(1){e=H[a>>2];if((b|0)==H[e+24>>2]){break b}a=a+4|0;if((c|0)!=(a|0)){continue}break}e=0}}return e|0}function Zh(a){a=a|0;var b=0;H[a+8>>2]=12384;H[a>>2]=12172;b=H[a+96>>2];if(b){H[a+100>>2]=b;oa(b)}b=H[a+80>>2];if(b){H[a+84>>2]=b;oa(b)}b=H[a+68>>2];if(b){H[a+72>>2]=b;oa(b)}b=H[a+56>>2];if(b){H[a+60>>2]=b;oa(b)}H[a+8>>2]=12620;b=H[a+44>>2];if(b){oa(b)}b=H[a+32>>2];if(b){oa(b)}return a|0}function Uc(a){var b=0,c=0,d=0;if(a){d=H[a+24>>2];if(d){b=d;c=H[a+28>>2];if((b|0)!=(c|0)){while(1){c=c-4|0;b=H[c>>2];H[c>>2]=0;if(b){Ra(b+12|0,H[b+16>>2]);Qa(b,H[b+4>>2]);oa(b)}if((c|0)!=(d|0)){continue}break}b=H[a+24>>2]}H[a+28>>2]=d;oa(b)}Ra(a+12|0,H[a+16>>2]);Qa(a,H[a+4>>2]);oa(a)}}function Yh(a){a=a|0;var b=0;H[a+8>>2]=12384;H[a>>2]=12172;b=H[a+96>>2];if(b){H[a+100>>2]=b;oa(b)}b=H[a+80>>2];if(b){H[a+84>>2]=b;oa(b)}b=H[a+68>>2];if(b){H[a+72>>2]=b;oa(b)}b=H[a+56>>2];if(b){H[a+60>>2]=b;oa(b)}H[a+8>>2]=12620;b=H[a+44>>2];if(b){oa(b)}b=H[a+32>>2];if(b){oa(b)}oa(a)}function vi(a){a=a|0;var b=0,c=0,d=0;H[a>>2]=13280;b=H[a+20>>2];if(b){H[a+24>>2]=b;oa(b)}d=H[a+8>>2];if(d){c=H[a+12>>2];b=d;if((c|0)!=(b|0)){while(1){c=c-4|0;b=H[c>>2];H[c>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}b=H[a+8>>2]}H[a+12>>2]=d;oa(b)}return a|0}function xc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;h=H[c+8>>2];e=H[c+16>>2];g=H[c+12>>2];f=g;d=H[c+20>>2];if(h>>>0>e>>>0&(f|0)>=(d|0)|(d|0)<(f|0)){b=I[H[c>>2]+e|0];i=e+1|0;f=i?d:d+1|0;H[c+16>>2]=i;H[c+20>>2]=f;H[a+4>>2]=b}return e>>>0>>0&(d|0)<=(g|0)|(d|0)<(g|0)}function Wc(a){a=a|0;var b=0,c=0,d=0;H[a>>2]=13280;b=H[a+20>>2];if(b){H[a+24>>2]=b;oa(b)}d=H[a+8>>2];if(d){c=H[a+12>>2];b=d;if((c|0)!=(b|0)){while(1){c=c-4|0;b=H[c>>2];H[c>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}b=H[a+8>>2]}H[a+12>>2]=d;oa(b)}oa(a)}function Ya(a,b,c){var d=0;if(!c){return H[a+4>>2]==H[b+4>>2]}if((a|0)==(b|0)){return 1}d=H[a+4>>2];a=I[d|0];c=H[b+4>>2];b=I[c|0];a:{if(!a|(b|0)!=(a|0)){break a}while(1){b=I[c+1|0];a=I[d+1|0];if(!a){break a}c=c+1|0;d=d+1|0;if((a|0)==(b|0)){continue}break}}return(a|0)==(b|0)}function _h(a){a=a|0;var b=0;H[a>>2]=12384;b=H[a+88>>2];if(b){H[a+92>>2]=b;oa(b)}b=H[a+72>>2];if(b){H[a+76>>2]=b;oa(b)}b=H[a+60>>2];if(b){H[a- -64>>2]=b;oa(b)}b=H[a+48>>2];if(b){H[a+52>>2]=b;oa(b)}H[a>>2]=12620;b=H[a+36>>2];if(b){oa(b)}b=H[a+24>>2];if(b){oa(b)}return a|0}function Fg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=H[b+12>>2];b=H[b+8>>2];a=0;a:{if((d|0)==(b|0)){break a}a=d-b>>2;d=a>>>0<=1?1:a;a=0;b:{while(1){e=H[b+(a<<2)>>2];if(H[e+60>>2]==(c|0)){break b}a=a+1|0;if((d|0)!=(a|0)){continue}break}a=0;break a}a=(a|0)!=-1?e:0}return a|0}function ae(a,b){var c=0,d=0,e=0;H[a+8>>2]=0;H[a>>2]=0;H[a+4>>2]=0;a:{c=H[b+4>>2];d=H[b>>2];b:{if((c|0)==(d|0)){a=c;break b}c=c-d|0;if((c|0)<0){break a}d=c;e=pa(c);c=ra(e,0,c);d=d+c|0;H[a+8>>2]=d;H[a+4>>2]=d;H[a>>2]=c;c=H[b>>2];a=H[b+4>>2]}qa(e,c,a-c|0);return}sa();v()}function ed(a){var b=0,c=0,d=0,e=0;c=H[a+4>>2];d=H[a>>2];if((c|0)!=(d|0)){while(1){e=c-144|0;b=H[e+132>>2];if(b){H[c-8>>2]=b;oa(b)}b=H[c-28>>2];if(b){H[c-24>>2]=b;oa(b)}b=H[c-40>>2];if(b){H[c-36>>2]=b;oa(b)}oc(c-140|0);c=e;if((d|0)!=(c|0)){continue}break}}H[a+4>>2]=d}function Vh(a){a=a|0;var b=0;H[a>>2]=12384;b=H[a+88>>2];if(b){H[a+92>>2]=b;oa(b)}b=H[a+72>>2];if(b){H[a+76>>2]=b;oa(b)}b=H[a+60>>2];if(b){H[a- -64>>2]=b;oa(b)}b=H[a+48>>2];if(b){H[a+52>>2]=b;oa(b)}H[a>>2]=12620;b=H[a+36>>2];if(b){oa(b)}b=H[a+24>>2];if(b){oa(b)}oa(a)}function cb(a){var b=0;if(a){b=H[a+76>>2];if(b){H[a+80>>2]=b;oa(b)}b=H[a- -64>>2];if(b){H[a+68>>2]=b;oa(b)}b=H[a+48>>2];if(b){H[a+52>>2]=b;oa(b)}b=H[a+24>>2];if(b){H[a+28>>2]=b;oa(b)}b=H[a+12>>2];if(b){H[a+16>>2]=b;oa(b)}b=H[a>>2];if(b){H[a+4>>2]=b;oa(b)}oa(a)}}function Jd(a,b,c){var d=0,e=0,f=0,g=0;f=ca-16|0;ca=f;d=ca-16|0;ca=d;b=b-a>>2;while(1){if(b){H[d+12>>2]=a;e=b>>>1|0;H[d+12>>2]=H[d+12>>2]+(e<<2);g=(e^-1)+b|0;b=e;e=K[H[d+12>>2]>>2]>2];b=e?g:b;a=e?H[d+12>>2]+4|0:a;continue}break}ca=d+16|0;ca=f+16|0;return a}function oc(a){var b=0;b=H[a+84>>2];if(b){H[a+88>>2]=b;oa(b)}b=H[a+72>>2];if(b){H[a+76>>2]=b;oa(b)}b=H[a+52>>2];if(b){H[a+56>>2]=b;oa(b)}b=H[a+40>>2];if(b){H[a+44>>2]=b;oa(b)}b=H[a+28>>2];if(b){H[a+32>>2]=b;oa(b)}b=H[a+12>>2];if(b){oa(b)}a=H[a>>2];if(a){oa(a)}}function Xc(a,b){var c=0,d=0;d=pa(40);H[d>>2]=-1;c=d+8|0;H[c+16>>2]=0;H[c+20>>2]=0;H[c+8>>2]=0;H[c>>2]=0;H[c+4>>2]=0;H[c+24>>2]=0;H[c+28>>2]=0;ea[H[H[a>>2]+16>>2]](a,d);a=H[b+88>>2];H[b+88>>2]=d;if(a){b=H[a+8>>2];if(b){H[a+12>>2]=b;oa(b)}oa(a)}return 1}function Ma(a){var b=0,c=0,d=0;b=a;a:{if(b&3){while(1){if(!I[b|0]){break a}b=b+1|0;if(b&3){continue}break}}while(1){c=b;b=b+4|0;d=H[c>>2];if(!((d^-1)&d-16843009&-2139062144)){continue}break}while(1){b=c;c=b+1|0;if(I[b|0]){continue}break}}return b-a|0}function Ba(a){var b=0,c=0,d=0,e=0,f=0;d=I[a+12|0];c=H[a+8>>2];a:{if(c>>>0>4095){break a}b=H[a+4>>2];if((b|0)<=0){break a}b=b-1|0;H[a+4>>2]=b;c=I[b+H[a>>2]|0]|c<<8}d=0-d&255;b=N(d,c>>>8|0);e=c&255;f=e>>>0>>0;H[a+8>>2]=f?b+e|0:c-(b+d|0)|0;return f}function od(a,b){H[a+4>>2]=0;H[a+8>>2]=0;H[a>>2]=1984;H[a+12>>2]=0;H[a+16>>2]=0;H[a+20>>2]=0;H[a+24>>2]=0;H[a+28>>2]=0;H[a+32>>2]=0;H[a+36>>2]=0;H[a+40>>2]=0;H[a>>2]=2328;H[a+60>>2]=b;H[a+44>>2]=0;H[a+48>>2]=0;H[a+52>>2]=0;H[a+56>>2]=0;return a}function mc(a,b){var c=0,d=0,e=0;c=Ma(b);if(c>>>0<2147483632){a:{b:{if(c>>>0>=11){d=(c|15)+1|0;e=pa(d);H[a+8>>2]=d|-2147483648;H[a>>2]=e;H[a+4>>2]=c;d=c+e|0;break b}F[a+11|0]=c;d=a+c|0;e=a;if(!c){break a}}va(e,b,c)}F[d|0]=0;return a}Na();v()}function Ng(a){a=a|0;var b=0,c=0,d=0;if(a){if(F[a+27|0]<0){oa(H[a+16>>2])}b=H[a>>2];if(b){c=b;d=H[a+4>>2];if((b|0)!=(d|0)){while(1){c=d-12|0;if(F[d-1|0]<0){oa(H[c>>2])}d=c;if((d|0)!=(b|0)){continue}break}c=H[a>>2]}H[a+4>>2]=b;oa(c)}oa(a)}}function Jb(a,b){var c=0,d=0,e=0;a:{c=H[a>>2];b:{if(H[a+8>>2]-c>>2>>>0>=b>>>0){break b}if(b>>>0>=1073741824){break a}d=H[a+4>>2]-c|0;e=b<<2;b=va(pa(e),c,d);H[a+8>>2]=b+e;H[a+4>>2]=b+d;H[a>>2]=b;if(!c){break b}oa(c)}return}sa();v()}function Ga(a){a=a|0;var b=0,c=0;if(a){b=H[a+88>>2];H[a+88>>2]=0;if(b){c=H[b+8>>2];if(c){H[b+12>>2]=c;oa(c)}oa(b)}b=H[a+68>>2];if(b){H[a+72>>2]=b;oa(b)}b=H[a+64>>2];H[a+64>>2]=0;if(b){c=H[b>>2];if(c){H[b+4>>2]=c;oa(c)}oa(b)}oa(a)}}function Nd(a){var b=0,c=0,d=0;if(F[H[a>>2]]-48>>>0>=10){return 0}while(1){d=H[a>>2];c=-1;if(b>>>0<=214748364){c=F[d|0]-48|0;b=N(b,10);c=(c|0)>(b^2147483647)?-1:c+b|0}H[a>>2]=d+1;b=c;if(F[d+1|0]-48>>>0<10){continue}break}return b}function Cg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;b=H[b+96>>2];a=pa(12);b=b+N(c,12)|0;c=H[b+4>>2];H[a>>2]=H[b>>2];H[a+4>>2]=c;H[a+8>>2]=H[b+8>>2];b=H[d>>2];if(b){H[d+4>>2]=b;oa(b)}H[d>>2]=a;a=a+12|0;H[d+8>>2]=a;H[d+4>>2]=a;return 1}function Ai(a){a=a|0;var b=0;H[a+24>>2]=1832;H[a>>2]=11048;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}H[a>>2]=2448;b=H[a+20>>2];H[a+20>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}H[a>>2]=2232;b=H[a+16>>2];H[a+16>>2]=0;if(b){Ga(b)}return a|0}function Sj(a,b,c,d){var e=0,f=0,g=0,h=0;f=b^d;g=f>>31;e=b>>31;a=a^e;h=a-e|0;e=(b^e)-((a>>>0>>0)+e|0)|0;a=d>>31;b=c^a;f=f>>31;a=Tj(h,e,b-a|0,(a^d)-((a>>>0>b>>>0)+a|0)|0)^f;b=a-f|0;da=(g^da)-((a>>>0>>0)+g|0)|0;return b}function yi(a){a=a|0;var b=0;H[a+24>>2]=1832;H[a>>2]=11048;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}H[a>>2]=2448;b=H[a+20>>2];H[a+20>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}H[a>>2]=2232;b=H[a+16>>2];H[a+16>>2]=0;if(b){Ga(b)}oa(a)}function Yb(a,b,c){var d=0,e=0,f=0;e=ca-16|0;ca=e;d=H[a+8>>2]&2147483647;a:{if(d>>>0>c>>>0){d=H[a>>2];H[a+4>>2]=c;yb(d,b,c);F[e+15|0]=0;F[c+d|0]=I[e+15|0];break a}f=a;a=H[a+4>>2];Gd(f,d-1|0,(c-d|0)+1|0,a,a,c,b)}ca=e+16|0}function Bf(a,b){a=a|0;b=b|0;var c=0,d=0;c=ca-16|0;ca=c;a=H[a+4>>2];a:{if((a|0)==-1){break a}F[c+15|0]=a;d=H[b+20>>2];if(!!H[b+16>>2]&(d|0)>=0|(d|0)>0){break a}Wb(b,H[b+4>>2],c+15|0,c+16|0)}ca=c+16|0;return(a|0)!=-1|0}function Xb(a,b,c){var d=0,e=0;d=ca-16|0;ca=d;a:{if(c>>>0<=10){F[a+11|0]=I[a+11|0]&128|c;F[a+11|0]=I[a+11|0]&127;yb(a,b,c);F[d+15|0]=0;F[a+c|0]=I[d+15|0];break a}e=a;a=I[a+11|0]&127;Gd(e,10,c-10|0,a,a,c,b)}ca=d+16|0}function Rj(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;e=c>>>16|0;f=a>>>16|0;j=N(e,f);g=c&65535;h=a&65535;i=N(g,h);f=(i>>>16|0)+N(f,g)|0;e=(f&65535)+N(e,h)|0;da=(N(b,c)+j|0)+N(a,d)+(f>>>16)+(e>>>16)|0;return i&65535|e<<16}function Dd(a,b,c){var d=0;d=H[a+16>>2];if(!d){H[a+36>>2]=1;H[a+24>>2]=c;H[a+16>>2]=b;return}a:{if((b|0)==(d|0)){if(H[a+24>>2]!=2){break a}H[a+24>>2]=c;return}F[a+54|0]=1;H[a+24>>2]=2;H[a+36>>2]=H[a+36>>2]+1}}function th(){var a=0;a=Eb(pa(96));H[a+64>>2]=0;H[a+68>>2]=0;H[a+88>>2]=0;H[a+72>>2]=0;H[a+76>>2]=0;F[a+77|0]=0;F[a+78|0]=0;F[a+79|0]=0;F[a+80|0]=0;F[a+81|0]=0;F[a+82|0]=0;F[a+83|0]=0;F[a+84|0]=0;return a|0}function zi(a,b){a=a|0;b=b|0;var c=0,d=0;H[b>>2]=2;c=H[b+8>>2];d=H[b+12>>2]-c|0;if(d>>>0<=4294967291){kc(b+8|0,d+4|0);c=H[b+8>>2]}b=c+d|0;a=H[a+4>>2];F[b|0]=a;F[b+1|0]=a>>>8;F[b+2|0]=a>>>16;F[b+3|0]=a>>>24}function rj(a){a=a|0;var b=0;H[a>>2]=5580;b=H[a+96>>2];if(b){oa(b)}b=H[a+84>>2];if(b){oa(b)}b=H[a+72>>2];if(b){oa(b)}b=H[a+60>>2];if(b){oa(b)}H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}return a|0}function ib(a,b,c,d,e){var f=0;f=ca-256|0;ca=f;if(!(e&73728|(c|0)<=(d|0))){d=c-d|0;c=d>>>0<256;ra(f,b&255,c?d:256);if(!c){while(1){Ab(a,f,256);d=d-256|0;if(d>>>0>255){continue}break}}Ab(a,f,d)}ca=f+256|0}function Ij(a){a=a|0;var b=0;H[a>>2]=3564;b=H[a+96>>2];if(b){oa(b)}b=H[a+84>>2];if(b){oa(b)}b=H[a+72>>2];if(b){oa(b)}b=H[a+60>>2];if(b){oa(b)}H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}return a|0}function Ch(a){a=a|0;var b=0,c=0,d=0;b=H[a+8>>2];d=H[a+12>>2];if((b|0)==(d|0)){return 1}while(1){c=H[b>>2];c=ea[H[H[c>>2]+16>>2]](c,H[a+32>>2])|0;if(c){b=b+4|0;if((d|0)!=(b|0)){continue}}break}return c|0}function Yd(a,b){var c=0,d=0;c=H[a+8>>2];a=H[a+12>>2];if((c|0)!=(a|0)){a=a-c>>2;d=a>>>0<=1?1:a;a=0;while(1){if(H[H[(a<<2)+c>>2]+60>>2]==(b|0)){return a}a=a+1|0;if((d|0)!=(a|0)){continue}break}}return-1}function qj(a){a=a|0;var b=0;H[a>>2]=5580;b=H[a+96>>2];if(b){oa(b)}b=H[a+84>>2];if(b){oa(b)}b=H[a+72>>2];if(b){oa(b)}b=H[a+60>>2];if(b){oa(b)}H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}oa(a)}function Hj(a){a=a|0;var b=0;H[a>>2]=3564;b=H[a+96>>2];if(b){oa(b)}b=H[a+84>>2];if(b){oa(b)}b=H[a+72>>2];if(b){oa(b)}b=H[a+60>>2];if(b){oa(b)}H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}oa(a)}function $d(a,b,c){var d=0,e=0;d=a+4|0;a=nb(a,b);a:{if((d|0)==(a|0)){break a}b=H[a+32>>2];d=H[a+28>>2];if((b|0)==(d|0)){break a}Cc(c,b-d|0);c=Dc(c);b=H[a+28>>2];qa(c,b,H[a+32>>2]-b|0);e=1}return e}function Qf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=ca-16|0;ca=e;a=_(H[a+60>>2],b|0,c|0,d&255,e+8|0)|0;if(a){H[3992]=a;a=-1}else{a=0}ca=e+16|0;da=a?-1:H[e+12>>2];return(a?-1:H[e+8>>2])|0}function Sd(a){var b=0;b=H[a+72>>2];H[a+72>>2]=b-1|b;b=H[a>>2];if(b&8){H[a>>2]=b|32;return-1}H[a+4>>2]=0;H[a+8>>2]=0;b=H[a+44>>2];H[a+28>>2]=b;H[a+20>>2]=b;H[a+16>>2]=b+H[a+48>>2];return 0}function Eb(a){H[a+8>>2]=0;H[a+12>>2]=0;H[a>>2]=0;H[a+40>>2]=0;H[a+44>>2]=0;H[a+28>>2]=9;F[a+24|0]=1;H[a+56>>2]=-1;H[a+60>>2]=0;H[a+16>>2]=0;H[a+20>>2]=0;H[a+48>>2]=0;H[a+52>>2]=0;return a}function hf(a,b){a=a|0;b=b|0;var c=0,d=0;d=H[a+16>>2];c=0;a:{if(H[a+20>>2]-d>>2<=(b|0)){break a}b=H[(b<<2)+d>>2];c=0;if((b|0)<0){break a}c=rb(H[H[a+36>>2]+(b<<2)>>2])}return c|0}function Mg(){var a=0,b=0;a=pa(40);H[a+4>>2]=0;H[a+8>>2]=0;H[a+24>>2]=0;H[a+28>>2]=0;b=a+16|0;H[b>>2]=0;H[b+4>>2]=0;H[a>>2]=a+4;H[a+12>>2]=b;H[a+32>>2]=0;H[a+36>>2]=0;return a|0}function Vf(a,b){a=a|0;b=b|0;var c=0,d=0;Wd(a,b);a:{if((b|0)<0){break a}d=H[a+88>>2];c=H[a+84>>2];if(d-c>>2<=(b|0)){break a}c=(b<<2)+c|0;b=c+4|0;va(c,b,d-b|0);H[a+88>>2]=d-4}}function Rh(a){a=a|0;var b=0;H[a+8>>2]=12804;H[a>>2]=12640;b=H[a+56>>2];if(b){H[a+60>>2]=b;oa(b)}H[a+8>>2]=12620;b=H[a+44>>2];if(b){oa(b)}b=H[a+32>>2];if(b){oa(b)}return a|0}function Lh(a){a=a|0;var b=0;H[a+8>>2]=11872;H[a>>2]=12932;b=H[a+56>>2];if(b){H[a+60>>2]=b;oa(b)}H[a+8>>2]=12124;b=H[a+44>>2];if(b){oa(b)}b=H[a+32>>2];if(b){oa(b)}return a|0}function zb(a){var b=0,c=0;b=H[3958];c=a+7&-8;a=b+c|0;a:{if(a>>>0<=b>>>0?c:0){break a}if(a>>>0>fa()<<16>>>0){if(!($(a|0)|0)){break a}}H[3958]=a;return b}H[3992]=48;return-1}function bj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;H[a+4>>2]=b;b=H[H[H[b+4>>2]+8>>2]+(c<<2)>>2];H[a+12>>2]=c;H[a+8>>2]=b;a=H[a+8>>2];if(I[a+24|0]==3){d=H[a+28>>2]==9}return d|0}function wf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=H[a+8>>2];a:{if(!I[d+24|0]){break a}if(!mb(d,H[b+4>>2]-H[b>>2]>>2)){break a}e=ea[H[H[a>>2]+32>>2]](a,b,c)|0}return e|0}function Qh(a){a=a|0;var b=0;H[a+8>>2]=12804;H[a>>2]=12640;b=H[a+56>>2];if(b){H[a+60>>2]=b;oa(b)}H[a+8>>2]=12620;b=H[a+44>>2];if(b){oa(b)}b=H[a+32>>2];if(b){oa(b)}oa(a)}function Kh(a){a=a|0;var b=0;H[a+8>>2]=11872;H[a>>2]=12932;b=H[a+56>>2];if(b){H[a+60>>2]=b;oa(b)}H[a+8>>2]=12124;b=H[a+44>>2];if(b){oa(b)}b=H[a+32>>2];if(b){oa(b)}oa(a)}function nj(a){a=a|0;var b=0;H[a>>2]=5816;b=H[a+76>>2];if(b){oa(b)}b=H[a+68>>2];H[a+68>>2]=0;if(b){oa(b)}H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}return a|0}function Ra(a,b){if(b){Ra(a,H[b>>2]);Ra(a,H[b+4>>2]);a=H[b+28>>2];H[b+28>>2]=0;if(a){Ra(a+12|0,H[a+16>>2]);Qa(a,H[a+4>>2]);oa(a)}if(F[b+27|0]<0){oa(H[b+16>>2])}oa(b)}}function Gi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;H[a+4>>2]=b;d=H[H[H[b+4>>2]+8>>2]+(c<<2)>>2];H[a+12>>2]=c;H[a+8>>2]=d;return H[H[H[H[b+4>>2]+8>>2]+(c<<2)>>2]+28>>2]==9|0}function Ej(a){a=a|0;var b=0;H[a>>2]=3812;b=H[a+76>>2];if(b){oa(b)}b=H[a+68>>2];H[a+68>>2]=0;if(b){oa(b)}H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}return a|0}function Vc(a){H[a+40>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;H[a>>2]=13280;H[a+12>>2]=0;H[a+16>>2]=0;H[a+20>>2]=0;H[a+24>>2]=0;H[a+28>>2]=0;H[a+32>>2]=0;G[a+36>>1]=0;return a}function Hd(a,b){var c=0,d=0,e=0,f=0;H[a>>2]=15260;H[a>>2]=15372;c=Ma(b);d=pa(c+13|0);H[d+8>>2]=0;H[d+4>>2]=c;H[d>>2]=c;e=a,f=qa(d+12|0,b,c+1|0),H[e+4>>2]=f;return a}function jg(a,b){a=a|0;b=b|0;var c=0;a:{if(!(ea[H[H[a>>2]+36>>2]](a,b)|0)){break a}if(!(ea[H[H[a>>2]+40>>2]](a,b)|0)){break a}c=ea[H[H[a>>2]+44>>2]](a)|0}return c|0}function mj(a){a=a|0;var b=0;H[a>>2]=5816;b=H[a+76>>2];if(b){oa(b)}b=H[a+68>>2];H[a+68>>2]=0;if(b){oa(b)}H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}oa(a)}function Dj(a){a=a|0;var b=0;H[a>>2]=3812;b=H[a+76>>2];if(b){oa(b)}b=H[a+68>>2];H[a+68>>2]=0;if(b){oa(b)}H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}oa(a)}function Xe(a){a=a|0;var b=0;a:{if(!H[a- -64>>2]|!H[a+68>>2]|(!H[a+44>>2]|!H[a+48>>2])){break a}if(!H[a+52>>2]|!H[a+56>>2]){break a}b=H[a+92>>2]!=-1}return b|0}function cf(a){a=a|0;var b=0;H[a>>2]=2448;b=H[a+20>>2];H[a+20>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}H[a>>2]=2232;b=H[a+16>>2];H[a+16>>2]=0;if(b){Ga(b)}return a|0}function Pj(a,b){a=a|0;b=b|0;var c=0;b=H[b+88>>2];if(!(!b|H[b>>2]!=2)){c=a;a=H[b+8>>2];H[c+4>>2]=I[a|0]|I[a+1|0]<<8|(I[a+2|0]<<16|I[a+3|0]<<24);c=1}return c|0}function tc(a){a=a|0;var b=0;a:{if(!H[a+48>>2]|!H[a+52>>2]|(!H[a+28>>2]|!H[a+32>>2])){break a}if(!H[a+36>>2]|!H[a+40>>2]){break a}b=H[a+76>>2]!=-1}return b|0}function Sh(a){a=a|0;var b=0;H[a>>2]=12804;b=H[a+48>>2];if(b){H[a+52>>2]=b;oa(b)}H[a>>2]=12620;b=H[a+36>>2];if(b){oa(b)}b=H[a+24>>2];if(b){oa(b)}return a|0}function He(a){a=a|0;var b=0;H[a>>2]=11872;b=H[a+48>>2];if(b){H[a+52>>2]=b;oa(b)}H[a>>2]=12124;b=H[a+36>>2];if(b){oa(b)}b=H[a+24>>2];if(b){oa(b)}return a|0}function bf(a){a=a|0;var b=0;H[a>>2]=2448;b=H[a+20>>2];H[a+20>>2]=0;if(b){ea[H[H[b>>2]+4>>2]](b)}H[a>>2]=2232;b=H[a+16>>2];H[a+16>>2]=0;if(b){Ga(b)}oa(a)}function wh(){var a=0,b=0;b=pa(40);H[b>>2]=-1;a=b+8|0;H[a+16>>2]=0;H[a+20>>2]=0;H[a+8>>2]=0;H[a>>2]=0;H[a+4>>2]=0;H[a+24>>2]=0;H[a+28>>2]=0;return b|0}function gf(a,b){a=a|0;b=b|0;var c=0,d=0;d=H[a+4>>2];a:{if(d){c=1;if(I[d+36|0]<2){break a}}c=ea[H[H[a>>2]+48>>2]](a,H[b+4>>2]-H[b>>2]>>2)|0}return c|0}function ci(a){a=a|0;var b=0;H[a>>2]=11872;b=H[a+48>>2];if(b){H[a+52>>2]=b;oa(b)}H[a>>2]=12124;b=H[a+36>>2];if(b){oa(b)}b=H[a+24>>2];if(b){oa(b)}oa(a)}function Mh(a){a=a|0;var b=0;H[a>>2]=12804;b=H[a+48>>2];if(b){H[a+52>>2]=b;oa(b)}H[a>>2]=12620;b=H[a+36>>2];if(b){oa(b)}b=H[a+24>>2];if(b){oa(b)}oa(a)}function Ha(a){H[a+8>>2]=0;H[a+12>>2]=0;H[a>>2]=0;H[a+16>>2]=0;H[a+20>>2]=0;H[a+32>>2]=0;H[a+24>>2]=0;H[a+28>>2]=0;G[a+38>>1]=0;F[a+36|0]=0;return a}function Hf(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if(Ya(a,H[b+8>>2],f)){Cd(b,c,d,e);return}a=H[a+8>>2];ea[H[H[a>>2]+20>>2]](a,b,c,d,e,f)}function Ei(a,b,c){a=a|0;b=b|0;c=c|0;a:{if(I[H[a+4>>2]+36|0]>=2){b=0;if(!(ea[H[H[a>>2]+52>>2]](a)|0)){break a}}b=Xc(a+24|0,H[a+16>>2])}return b|0}function Fi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a:{if(I[H[a+4>>2]+36|0]<=1){d=0;if(!(ea[H[H[a>>2]+52>>2]](a)|0)){break a}}d=nd(a,b,c)}return d|0}function gh(){var a=0;a=_d(pa(108));H[a+84>>2]=0;H[a+88>>2]=0;H[a>>2]=13664;H[a+92>>2]=0;H[a+96>>2]=0;H[a+100>>2]=0;H[a+104>>2]=0;return a|0}function Zd(a,b){var c=0;c=-1;a:{if((b|0)==-1|(b|0)>4){break a}b=N(b,12)+a|0;a=H[b+20>>2];if((H[b+24>>2]-a|0)<=0){break a}c=H[a>>2]}return c}function lc(a,b,c,d,e,f,g){H[a>>2]=0;H[a+56>>2]=b;H[a+48>>2]=0;H[a+52>>2]=0;H[a+40>>2]=f;H[a+44>>2]=g;F[a+32|0]=e;H[a+28>>2]=d;F[a+24|0]=c}function aj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;a:{if(I[H[a+4>>2]+36|0]<=1){d=0;if(!xc(a+24|0,H[a+8>>2],c)){break a}}d=nd(a,b,c)}return d|0}function $i(a,b,c){a=a|0;b=b|0;c=c|0;a:{if(I[H[a+4>>2]+36|0]>=2){b=0;if(!xc(a+24|0,rb(a),c)){break a}}b=Xc(a+24|0,H[a+16>>2])}return b|0}function Yf(a){a=a|0;var b=0;H[a>>2]=13664;b=H[a+96>>2];if(b){H[a+100>>2]=b;oa(b)}b=H[a+84>>2];if(b){H[a+88>>2]=b;oa(b)}return _b(a)|0}function Dc(a){var b=0;if(I[a+11|0]>>>7|0){b=H[a+4>>2]}else{b=I[a+11|0]&127}if(!b){af(1232);v()}if(I[a+11|0]>>>7|0){a=H[a>>2]}return a}function Xf(a){a=a|0;var b=0;H[a>>2]=13664;b=H[a+96>>2];if(b){H[a+100>>2]=b;oa(b)}b=H[a+84>>2];if(b){H[a+88>>2]=b;oa(b)}oa(_b(a))}function zj(a){a=a|0;var b=0;H[a>>2]=4040;b=H[a+76>>2];if(b){oa(b)}H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}return a|0}function jj(a){a=a|0;var b=0;H[a>>2]=6032;b=H[a+76>>2];if(b){oa(b)}H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}return a|0}function Qa(a,b){if(b){Qa(a,H[b>>2]);Qa(a,H[b+4>>2]);a=H[b+28>>2];if(a){H[b+32>>2]=a;oa(a)}if(F[b+27|0]<0){oa(H[b+16>>2])}oa(b)}}function Vg(){var a=0;a=pa(28);H[a>>2]=0;H[a+4>>2]=0;H[a+24>>2]=0;H[a+16>>2]=0;H[a+20>>2]=0;H[a+8>>2]=0;H[a+12>>2]=0;return a|0}function wg(a){a=a|0;var b=0;H[a>>2]=1984;b=H[a+16>>2];if(b){H[a+20>>2]=b;oa(b)}b=H[a+4>>2];if(b){H[a+8>>2]=b;oa(b)}return a|0}function eh(){var a=0,b=0;a=pa(24);H[a+4>>2]=0;H[a+8>>2]=0;b=a+16|0;H[b>>2]=0;H[b+4>>2]=0;H[a>>2]=a+4;H[a+12>>2]=b;return a|0}function Kf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(Ya(a,H[b+8>>2],0)){Dd(b,c,d);return}a=H[a+8>>2];ea[H[H[a>>2]+28>>2]](a,b,c,d)}function yj(a){a=a|0;var b=0;H[a>>2]=4040;b=H[a+76>>2];if(b){oa(b)}H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}oa(a)}function ij(a){a=a|0;var b=0;H[a>>2]=6032;b=H[a+76>>2];if(b){oa(b)}H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}oa(a)}function pa(a){var b=0;a=a?a:1;a:{while(1){b=Ec(a);if(b){break a}b=H[4422];if(b){ea[b|0]();continue}break}X();v()}return b}function Kb(a,b){if(b){Kb(a,H[b>>2]);Kb(a,H[b+4>>2]);if(F[b+39|0]<0){oa(H[b+28>>2])}if(F[b+27|0]<0){oa(H[b+16>>2])}oa(b)}}function Ad(a){a=a|0;var b=0,c=0;H[a>>2]=15372;b=H[a+4>>2]-12|0;c=H[b+8>>2]-1|0;H[b+8>>2]=c;if((c|0)<0){oa(b)}return a|0}function lh(){var a=0;a=pa(24);H[a+8>>2]=0;H[a+12>>2]=0;H[a+4>>2]=-1;H[a>>2]=1832;H[a+16>>2]=0;H[a+20>>2]=0;return a|0}function pd(a,b,c){a=a|0;b=b|0;c=c|0;H[a+4>>2]=b;b=H[H[H[b+4>>2]+8>>2]+(c<<2)>>2];H[a+12>>2]=c;H[a+8>>2]=b;return 1}function wc(a){a=a|0;var b=0;if(!(!H[a+60>>2]|!H[a+44>>2]|(!H[a+48>>2]|!H[a+52>>2]))){b=H[a+56>>2]!=0}return b|0}function Id(a,b){if(I[a+11|0]>>>7|0){H[a+4>>2]=b;return}F[a+11|0]=I[a+11|0]&128|b;F[a+11|0]=I[a+11|0]&127}function wj(a){a=a|0;var b=0;H[a>>2]=4276;H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}return a|0}function fj(a){a=a|0;var b=0;H[a>>2]=6256;H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}return a|0}function bi(a){a=a|0;var b=0;H[a>>2]=12124;b=H[a+36>>2];if(b){oa(b)}b=H[a+24>>2];if(b){oa(b)}return a|0}function Uh(a){a=a|0;var b=0;H[a>>2]=12620;b=H[a+36>>2];if(b){oa(b)}b=H[a+24>>2];if(b){oa(b)}return a|0}function lg(a){a=a|0;if(a){if(F[a+39|0]<0){oa(H[a+28>>2])}Oc(a+12|0,H[a+16>>2]);Kb(a,H[a+4>>2]);oa(a)}}function Pb(a){a=a|0;var b=0;if(!(!H[a+52>>2]|(!H[a+44>>2]|!H[a+48>>2]))){b=H[a+56>>2]!=0}return b|0}function vj(a){a=a|0;var b=0;H[a>>2]=4276;H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}oa(a)}function vc(a,b){a=a|0;b=b|0;var c=0;if(!(H[b+56>>2]|!b|I[b+24|0]!=3)){H[a+60>>2]=b;c=1}return c|0}function ej(a){a=a|0;var b=0;H[a>>2]=6256;H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}oa(a)}function ai(a){a=a|0;var b=0;H[a>>2]=12124;b=H[a+36>>2];if(b){oa(b)}b=H[a+24>>2];if(b){oa(b)}oa(a)}function Th(a){a=a|0;var b=0;H[a>>2]=12620;b=H[a+36>>2];if(b){oa(b)}b=H[a+24>>2];if(b){oa(b)}oa(a)}function xh(a,b,c){a=a|0;b=b|0;c=c|0;H[a+16>>2]=0;H[a+20>>2]=0;H[a>>2]=b;H[a+8>>2]=c;H[a+12>>2]=0}function We(a,b){a=a|0;b=b|0;var c=0;if(!(H[b+56>>2]|I[b+24|0]!=3)){H[a- -64>>2]=b;c=1}return c|0}function yc(a){var b=0;b=H[a+16>>2];if(b){H[a+20>>2]=b;oa(b)}b=H[a>>2];if(b){H[a+4>>2]=b;oa(b)}}function sc(a,b){a=a|0;b=b|0;var c=0;if(!(H[b+56>>2]|I[b+24|0]!=3)){H[a+48>>2]=b;c=1}return c|0}function Gf(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if(Ya(a,H[b+8>>2],f)){Cd(b,c,d,e)}}function wa(){var a=0;a=Bc(4);H[a>>2]=15260;H[a>>2]=15220;H[a>>2]=15240;Y(a|0,15352,14);v()}function sf(a){a=a|0;var b=0;H[a>>2]=2232;b=H[a+16>>2];H[a+16>>2]=0;if(b){Ga(b)}return a|0}function Kj(a){a=a|0;var b=0;H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}return a|0}function mi(a){a=a|0;var b=0;H[a>>2]=1832;b=H[a+8>>2];if(b){H[a+12>>2]=b;oa(b)}return a|0}function Ci(a){a=a|0;var b=0;b=rb(a);return Je(a+24|0,b?b:H[a+8>>2],H[H[a+4>>2]+32>>2])|0}function rf(a){a=a|0;var b=0;H[a>>2]=2232;b=H[a+16>>2];H[a+16>>2]=0;if(b){Ga(b)}oa(a)}function ji(a){a=a|0;var b=0;H[a>>2]=1832;b=H[a+8>>2];if(b){H[a+12>>2]=b;oa(b)}oa(a)} +function Ub(a){a=a|0;var b=0;H[a>>2]=3272;b=H[a+32>>2];if(b){H[a+36>>2]=b;oa(b)}oa(a)}function Za(a){var b=0;H[a+16>>2]=0;b=H[a>>2];H[a+4>>2]=b;H[a+12>>2]=b;if(b){oa(b)}}function Oc(a,b){if(b){Oc(a,H[b>>2]);Oc(a,H[b+4>>2]);Kb(b+20|0,H[b+24>>2]);oa(b)}}function wi(a){a=a|0;if(!H[a+44>>2]){return 0}return ea[H[H[a>>2]+48>>2]](a)|0}function vh(a){a=a|0;var b=0;if(a){b=H[a+8>>2];if(b){H[a+12>>2]=b;oa(b)}oa(a)}}function Uj(a){var b=0;while(1){if(a){a=a-1&a;b=b+1|0;continue}break}return b}function Lf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(Ya(a,H[b+8>>2],0)){Dd(b,c,d)}}function ui(a,b){a=a|0;b=b|0;a=H[a+48>>2];return ea[H[H[a>>2]+20>>2]](a,b)|0}function ni(a,b){a=a|0;b=b|0;a=H[a+48>>2];return ea[H[H[a>>2]+12>>2]](a,b)|0}function li(a,b){a=a|0;b=b|0;a=H[a+48>>2];return ea[H[H[a>>2]+16>>2]](a,b)|0}function lb(){var a=0;a=pa(12);H[a>>2]=0;H[a+4>>2]=0;H[a+8>>2]=0;return a|0}function kb(a){a=a|0;var b=0;if(a){b=H[a>>2];if(b){H[a+4>>2]=b;oa(b)}oa(a)}}function Vj(a){var b=0;b=a&31;a=0-a&31;return(-1>>>b&-2)<>>a} +function dh(a,b,c){a=a|0;b=b|0;c=c|0;H[a+32>>2]=c;H[a+28>>2]=b;return 1}function ch(a){a=a|0;if(a){Ra(a+12|0,H[a+16>>2]);Qa(a,H[a+4>>2]);oa(a)}}function Rd(a,b,c){a:{if(H[c+76>>2]<0){a=Fc(a,b,c);break a}a=Fc(a,b,c)}}function Mb(a,b){a=a|0;b=b|0;if(b>>>0<=1){H[a+28>>2]=b}return b>>>0<2|0}function Fh(a,b){a=a|0;b=b|0;F[b+84|0]=1;H[b+72>>2]=H[b+68>>2];return 1}function si(a){a=a|0;a=H[a+48>>2];return ea[H[H[a>>2]+24>>2]](a)|0}function ri(a){a=a|0;a=H[a+48>>2];return ea[H[H[a>>2]+28>>2]](a)|0}function oi(a){a=a|0;a=H[a+48>>2];return ea[H[H[a>>2]+36>>2]](a)|0}function ih(){var a=0;a=pa(8);H[a+4>>2]=-1;H[a>>2]=1032;return a|0}function Gg(a,b,c){a=a|0;b=b|0;c=c|0;return H[H[b+8>>2]+(c<<2)>>2]}function _i(a,b){a=a|0;b=b|0;return Fd(a+24|0,rb(a),H[a+8>>2])|0}function Bi(a,b){a=a|0;b=b|0;return Re(a+24|0,rb(a),H[a+8>>2])|0}function xf(a,b){a=a|0;b=b|0;H[a+12>>2]=-1;H[a+8>>2]=b;return 1}function ne(a,b){a=a|0;b=b|0;return ea[H[H[a>>2]+12>>2]](a,b)|0}function Ff(a){a=a|0;if(!a){return 0}return(Ed(a,15068)|0)!=0|0}function Di(a,b){a=a|0;b=b|0;return ea[H[H[a>>2]+56>>2]](a,b)|0}function $g(a){a=a|0;if(a){if(F[a+15|0]<0){oa(H[a+4>>2])}oa(a)}}function kh(a,b){a=a|0;b=b|0;return O(L[H[a+8>>2]+(b<<2)>>2])}function af(a){a=Hd(Bc(8),a);H[a>>2]=15472;Y(a|0,15504,1);v()}function Ue(a){a=Hd(Bc(8),a);H[a>>2]=15420;Y(a|0,15452,1);v()}function _g(a,b){a=a|0;b=b|0;return O(L[H[a>>2]+(b<<2)>>2])}function fh(a){a=a|0;return(H[a+100>>2]-H[a+96>>2]|0)/12|0}function ah(a){a=a|0;return(F[a+15|0]<0?H[a+4>>2]:a+4|0)|0}function _f(a,b){a=a|0;b=b|0;return H[H[a+4>>2]+(b<<2)>>2]}function Pf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;da=0;return 0}function Ke(a){a=Vc(a);H[a+44>>2]=0;H[a>>2]=11180;return a}function ie(a,b){a=a|0;b=b|0;return H[H[a>>2]+(b<<2)>>2]}function Xg(a,b){a=a|0;b=b|0;return G[H[a>>2]+(b<<1)>>1]}function Wg(a,b){a=a|0;b=b|0;return J[H[a>>2]+(b<<1)>>1]}function Zb(a,b){var c=0;c=pa(b);H[a+4>>2]=b;H[a>>2]=c}function Jg(a,b,c){a=a|0;b=b|0;c=c|0;return Zd(b,c)|0}function _d(a){H[a>>2]=13724;ra(a+4|0,0,80);return a}function me(a){a=a|0;return H[a+12>>2]-H[a+8>>2]>>2}function Qj(a){if(a){return 31-Q(a-1^a)|0}return 32}function cc(a){a=a|0;if(a){ea[H[H[a>>2]+4>>2]](a)}}function Zg(a,b){a=a|0;b=b|0;return F[H[a>>2]+b|0]}function Yg(a,b){a=a|0;b=b|0;return I[H[a>>2]+b|0]}function Uf(a){a=a|0;return H[a+8>>2]-H[a+4>>2]>>2}function jd(a,b){a=a|0;b=b|0;H[a+4>>2]=b;return 1}function je(a){a=a|0;return H[a+4>>2]-H[a>>2]>>1}function Qc(a){a=a|0;return H[a+4>>2]-H[a>>2]>>2}function le(a){a=a|0;return H[a+4>>2]-H[a>>2]|0}function Ab(a,b,c){if(!(I[a|0]&32)){Fc(b,c,a)}}function vf(a,b,c){a=a|0;b=b|0;c=c|0;return 1}function hi(a,b){a=a|0;b=b|0;return I[b+24|0]}function Pg(a,b){a=a|0;b=b|0;return H[b+8>>2]}function Nj(a){a=a|0;return I[H[a+8>>2]+24|0]}function Li(a){a=a|0;H[a>>2]=10032;return a|0}function Eg(a,b){a=a|0;b=b|0;return H[b+4>>2]}function Yi(a){a=a|0;H[a>>2]=7144;return a|0}function Ui(a){a=a|0;H[a>>2]=8080;return a|0}function Sf(a){a=a|0;return aa(H[a+60>>2])|0}function Pi(a){a=a|0;H[a>>2]=9028;return a|0}function jh(a){a=a|0;return O(L[a+20>>2])}function Ji(a){a=a|0;H[a>>2]=10032;oa(a)}function Xi(a){a=a|0;H[a>>2]=7144;oa(a)}function Si(a){a=a|0;H[a>>2]=8080;oa(a)}function Oi(a){a=a|0;H[a>>2]=9028;oa(a)}function sh(a){a=a|0;return H[a+88>>2]}function rh(a){a=a|0;return H[a+56>>2]}function oh(a){a=a|0;return H[a+40>>2]}function nh(a){a=a|0;return H[a+48>>2]}function mh(a){a=a|0;return H[a+60>>2]}function eb(a){a=a|0;return H[a+28>>2]}function df(){H[4292]=17048;H[4274]=42}function Rc(a){a=a|0;return H[a+80>>2]}function qh(a){a=a|0;return F[a+24|0]}function ph(a){a=a|0;return I[a+32|0]}function md(a,b){a=a|0;b=b|0;return-1}function db(a){a=a|0;return H[a+4>>2]}function bh(a){a=a|0;return!H[a>>2]|0}function _e(a,b){a=a|0;b=b|0;return 6}function Zc(a){a=a|0;return H[a+8>>2]}function Pd(a,b){a=a|0;b=b|0;return 1}function Ja(a,b){a=a|0;b=b|0;return 0}function Bj(a,b){a=a|0;b=b|0;return 2}function Bc(a){return Ec(a+80|0)+80|0}function pe(a){a=a|0;return H[a>>2]}function yh(){return Ha(pa(40))|0}function uh(){return Eb(pa(64))|0}function hh(){return _d(pa(84))|0}function Sc(a){a=a|0;if(a){oa(a)}}function zc(a){a=a|0;Ad(a);oa(a)}function Ef(a){a=a|0;return 1171}function Df(a){a=a|0;return 1245}function Cf(a){a=a|0;return 1211}function Ta(a){a=a|0;return a|0}function yf(a){a=a|0;oa(rd(a))}function fi(a){a=a|0;oa(Be(a))}function ei(a){a=a|0;oa(Ae(a))}function di(a){a=a|0;oa(ze(a))}function Tf(a){a=a|0;oa(_b(a))}function ld(a){a=a|0;return 3}function _a(a){a=a|0;return 0}function Ze(a){a=a|0;return 5}function Tb(a){a=a|0;return 2}function Ob(a){a=a|0;return 6}function Da(a){a=a|0;return 1}function $e(a){a=a|0;return 4}function sa(){Ue(1164);v()}function Na(){Ue(1232);v()}function La(a){a=a|0;oa(a)}function Ca(){af(1164);v()}function fb(a){a=a|0;v()}function eg(){return 10}function dg(){return 11}function cg(){return 12}function kg(){return 5}function ig(){return 6}function hg(){return 7}function gg(){return 8}function fg(){return 9}function fe(){return 3}function ee(){return 4}function bg(){return-2}function bc(){return-1}function ag(){return-3}function ac(){return 1}function Zf(){return-5}function Qb(){return 0}function Nc(){return 2}function $f(){return-4}function Nf(){X();v()}function Td(a){a=a|0} +// EMSCRIPTEN_END_FUNCS +e=I;p(q);var ea=c([null,Ad,Ta,La,Tb,Pj,zi,Gh,Fd,Bf,xc,Nh,_e,Bj,Ta,mi,ji,Da,gj,Ti,Ki,Re,xi,Je,_e,hi,wg,fb,dh,ke,jg,_f,Uf,eb,Ja,Nf,Pd,Da,rd,yf,Of,Af,zf,sf,rf,pd,xf,wf,vf,Pd,uf,tf,kf,jf,qf,pf,hf,of,nf,mf,lf,cf,bf,pd,gf,ff,nd,ef,Nj,Oj,Kj,Ub,Da,db,Pb,_a,md,Ja,_a,Da,Mj,Lj,fb,fb,Ub,Tb,Pb,Jj,Ij,Hj,$e,Pb,Gj,Fj,Ej,Dj,ld,wc,Da,Ja,vc,Cj,Aj,zj,yj,Ze,wc,Da,Ja,vc,Ye,xj,wj,vj,Ob,Xe,Da,Ja,We,Ve,uj,Ta,La,Mb,eb,Nb,fb,Ub,Da,Pb,tj,fb,Ub,Tb,Pb,sj,rj,qj,$e,Pb,pj,oj,nj,mj,ld,wc,Da,Ja,vc,lj,kj,jj,ij,Ze,wc,Da,Ja,vc,Ye,hj,fj,ej,Ob,Xe,Da,Ja,We,Ve,dj,Ta,La,Mb,eb,Lb,fb,Ub,_a,Da,cj,cf,bf,bj,$i,aj,Zi,Tb,_i,Yi,Xi,Ob,db,tc,Da,Ja,sc,Da,Tb,Te,Wi,Ta,La,Mb,eb,Nb,Ui,Si,Ob,tc,Da,Ja,sc,Te,Ri,Ta,La,Mb,eb,Lb,Ta,La,_a,Da,_a,md,Ja,Vi,Qi,Pi,Oi,Ob,db,tc,Da,Ja,sc,Da,ld,Se,Ni,Ta,La,Mb,eb,Nb,Li,Ji,Ob,tc,Da,Ja,sc,Se,Ii,Ta,La,Mb,eb,Lb,La,_a,Da,_a,md,Ja,Mi,Hi,Ai,yi,Gi,Ei,Fi,Di,Ci,Bi,vi,fb,Da,Da,wi,Dh,Ch,Da,_a,Ja,Ja,qi,pi,ti,ui,ri,oi,ni,li,si,Be,fi,jd,id,hd,gd,ki,Da,db,Zc,Ae,ei,jd,id,hd,gd,ii,Da,db,Zc,ze,di,jd,id,hd,gd,gi,Da,db,Zc,He,ci,Ie,bi,ai,Zh,Yh,Xh,Wh,_h,Vh,$h,Uh,Th,Rh,Qh,Ph,Oh,Sh,Mh,Lh,Kh,Jh,Ih,Wc,ve,Hh,Ta,La,Fh,Eh,fb,_a,Da,Wc,Ah,Bh,Wc,ve,zh,Yf,Xf,Wf,Vf,_b,Tf,Xd,Wd,Sf,Rf,Qf,_a,Pf,Ta,La,Td,Td,Mf,Gf,If,Lf,La,Hf,Jf,Kf,La,Df,La,Cf,La,Ef,zc,db,zc,zc]);function fa(){return E.byteLength/65536|0}function ka(la){la=la|0;var ga=fa()|0;var ha=ga+la|0;if(ga=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||16777216;assert(INITIAL_MEMORY>=65536,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+INITIAL_MEMORY+"! (STACK_SIZE="+65536+")");if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_MEMORY/65536,"maximum":2147483648/65536})}updateMemoryViews();INITIAL_MEMORY=wasmMemory.buffer.byteLength;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function keepRuntimeAlive(){return noExitRuntime}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;wasmBinaryFile="draco_decoder.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(file);if(binary){return binary}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(wasmBinaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmTable=Module["asm"]["j"];addOnInit(Module["asm"]["i"]);removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e)}}instantiateAsync().catch(readyPromiseReject);return{}}function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module)}}function intArrayToString(array){var ret=[];for(var i=0;i255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;return prev===1};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw ptr}function _abort(){abort("")}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function getHeapMax(){return 2147483648}function emscripten_realloc_buffer(size){var b=wasmMemory.buffer;try{wasmMemory.grow(size-b.byteLength+65535>>>16);updateMemoryViews();return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var SYSCALLS={varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret}};function _fd_close(fd){return 52}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){return 70}var printCharBuffers=[null,[],[]];function printChar(stream,curr){var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}}function _fd_write(fd,iov,iovcnt,pnum){var num=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j>2]=num;return 0}function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var decodeBase64=typeof atob=="function"?atob:function(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run();function WrapperObject(){}WrapperObject.prototype=Object.create(WrapperObject.prototype);WrapperObject.prototype.constructor=WrapperObject;WrapperObject.prototype.__class__=WrapperObject;WrapperObject.__cache__={};Module["WrapperObject"]=WrapperObject;function getCache(__class__){return(__class__||WrapperObject).__cache__}Module["getCache"]=getCache;function wrapPointer(ptr,__class__){var cache=getCache(__class__);var ret=cache[ptr];if(ret)return ret;ret=Object.create((__class__||WrapperObject).prototype);ret.ptr=ptr;return cache[ptr]=ret}Module["wrapPointer"]=wrapPointer;function castObject(obj,__class__){return wrapPointer(obj.ptr,__class__)}Module["castObject"]=castObject;Module["NULL"]=wrapPointer(0);function destroy(obj){if(!obj["__destroy__"])throw"Error: Cannot destroy object. (Did you create it yourself?)";obj["__destroy__"]();delete getCache(obj.__class__)[obj.ptr]}Module["destroy"]=destroy;function compare(obj1,obj2){return obj1.ptr===obj2.ptr}Module["compare"]=compare;function getPointer(obj){return obj.ptr}Module["getPointer"]=getPointer;function getClass(obj){return obj.__class__}Module["getClass"]=getClass;var ensureCache={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(ensureCache.needed){for(var i=0;i=ensureCache.size){assert(len>0);ensureCache.needed+=len;ret=Module["_malloc"](len);ensureCache.temps.push(ret)}else{ret=ensureCache.buffer+ensureCache.pos;ensureCache.pos+=len}return ret},copy:function(array,view,offset){offset>>>=0;var bytes=view.BYTES_PER_ELEMENT;switch(bytes){case 2:offset>>>=1;break;case 4:offset>>>=2;break;case 8:offset>>>=3;break}for(var i=0;i3)return false;if(version[0]==1&&version[1]>=0&&version[1]<=3)return true;if(version[0]!=0||version[1]>10)return false;return true}Module["isVersionSupported"]=isVersionSupported;var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module["arguments"]=[];Module["thisProgram"]="./this.program";Module["quit"]=(function(status,toThrow){throw toThrow});Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER}if(ENVIRONMENT_IS_NODE){var nodeFS;var nodePath;Module["read"]=function shell_read(filename,binary){var ret;ret=tryParseAsDataURI(filename);if(!ret){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);ret=nodeFS["readFileSync"](filename)}return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}Module["arguments"]=process["argv"].slice(2);process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));process["on"]("unhandledRejection",(function(reason,p){process["exit"](1)}));Module["inspect"]=(function(){return"[Emscripten Module object]"})}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){Module["read"]=function shell_read(f){var data=tryParseAsDataURI(f);if(data){return intArrayToString(data)}return read(f)}}Module["readBinary"]=function readBinary(f){var data;data=tryParseAsDataURI(f);if(data){return data}if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=(function(status,toThrow){quit(status)})}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function shell_read(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function readBinary(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)};Module["setWindowTitle"]=(function(title){document.title=title})}Module["print"]=typeof console!=="undefined"?console.log.bind(console):typeof print!=="undefined"?print:null;Module["printErr"]=typeof printErr!=="undefined"?printErr:typeof console!=="undefined"&&console.warn.bind(console)||Module["print"];Module.print=Module["print"];Module.printErr=Module["printErr"];for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var STACK_ALIGN=16;function staticAlloc(size){assert(!staticSealed);var ret=STATICTOP;STATICTOP=STATICTOP+size+15&-16;return ret}function dynamicAlloc(size){assert(DYNAMICTOP_PTR);var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;HEAP32[DYNAMICTOP_PTR>>2]=end;if(end>=TOTAL_MEMORY){var success=enlargeMemory();if(!success){HEAP32[DYNAMICTOP_PTR>>2]=ret;return 0}}return ret}function alignMemory(size,factor){if(!factor)factor=STACK_ALIGN;var ret=size=Math.ceil(size/factor)*factor;return ret}function getNativeTypeSize(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return 4}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;Module.printErr(text)}}var jsCallStartIndex=1;var functionPointers=new Array(0);var funcWrappers={};function dynCall(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}var GLOBAL_BASE=8;var ABORT=0;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];assert(func,"Cannot call unknown function "+ident+", make sure it is exported");return func}var JSfuncs={"stackSave":(function(){stackSave()}),"stackRestore":(function(){stackRestore()}),"arrayToC":(function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};function ccall(ident,returnType,argTypes,args,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var ALLOC_STATIC=2;var ALLOC_NONE=4;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[typeof _malloc==="function"?_malloc:staticAlloc,stackAlloc,staticAlloc,dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var stop;ptr=ret;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return UTF8ToString(ptr)}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx){var endPtr=idx;while(u8Array[endPtr])++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}}function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function demangle(func){return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}var WASM_PAGE_SIZE=65536;var ASMJS_PAGE_SIZE=16777216;var MIN_TOTAL_MEMORY=16777216;function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBuffer(buf){Module["buffer"]=buffer=buf}function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed;var STACK_BASE,STACKTOP,STACK_MAX;var DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0;staticSealed=false;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}if(!Module["reallocBuffer"])Module["reallocBuffer"]=(function(size){var ret;try{if(ArrayBuffer.transfer){ret=ArrayBuffer.transfer(buffer,size)}else{var oldHEAP8=HEAP8;ret=new ArrayBuffer(size);var temp=new Int8Array(ret);temp.set(oldHEAP8)}}catch(e){return false}var success=_emscripten_replace_memory(ret);if(!success)return false;return ret});function enlargeMemory(){var PAGE_MULTIPLE=Module["usingWasm"]?WASM_PAGE_SIZE:ASMJS_PAGE_SIZE;var LIMIT=2147483648-PAGE_MULTIPLE;if(HEAP32[DYNAMICTOP_PTR>>2]>LIMIT){return false}var OLD_TOTAL_MEMORY=TOTAL_MEMORY;TOTAL_MEMORY=Math.max(TOTAL_MEMORY,MIN_TOTAL_MEMORY);while(TOTAL_MEMORY>2]){if(TOTAL_MEMORY<=536870912){TOTAL_MEMORY=alignUp(2*TOTAL_MEMORY,PAGE_MULTIPLE)}else{TOTAL_MEMORY=Math.min(alignUp((3*TOTAL_MEMORY+2147483648)/4,PAGE_MULTIPLE),LIMIT)}}var replacement=Module["reallocBuffer"](TOTAL_MEMORY);if(!replacement||replacement.byteLength!=TOTAL_MEMORY){TOTAL_MEMORY=OLD_TOTAL_MEMORY;return false}updateGlobalBuffer(replacement);updateGlobalBufferViews();return true}var byteLength;try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);byteLength(new ArrayBuffer(4))}catch(e){byteLength=(function(buffer){return buffer.byteLength})}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;if(TOTAL_MEMORY0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPreMain(cb){__ATMAIN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_round=Math.round;var Math_min=Math.min;var Math_max=Math.max;var Math_clz32=Math.clz32;var Math_trunc=Math.trunc;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}STATIC_BASE=GLOBAL_BASE;STATICTOP=STATIC_BASE+18640;__ATINIT__.push();memoryInitializer="data:application/octet-stream;base64,vBoAACwbAADkGgAAehsAACAAAAAAAAAAvBoAAKEbAADkGgAAvhsAACAAAAAAAAAAvBoAAOcbAADkGgAAAxwAADgAAAAAAAAAvBoAACUcAADkGgAAShwAADgAAAAAAAAA5BoAAI4mAABQAAAAAAAAAOQaAAB6HAAAiAAAAAAAAADkGgAA0xwAAJgAAAAAAAAA5BoAACcdAACoAAAAAAAAAOQaAABbHQAAuAAAAAAAAAC8GgAAhh0AAOQaAACqHQAA0AAAAAAAAAC8GgAASB4AAOQaAADmHgAA6AAAAAAAAADkGgAAfh8AAIgAAAAAAAAA5BoAAAcgAADoAAAAAAAAAOQaAAChIAAA6AAAAAAAAADkGgAARyEAAOgAAAAAAAAA5BoAAN0hAAA4AQAAAAAAALwaAACIIgAA5BoAADMjAABQAQAAAAAAAOQaAADYIwAAiAAAAAAAAADkGgAAbiQAAFABAAAAAAAA5BoAABUlAABQAQAAAAAAAOQaAADIJQAAUAEAAAAAAADkGgAAqDEAAGgAAAAAAAAA5BoAALomAACwAQAAAAAAAOQaAAArJwAAmAAAAAAAAADkGgAAlycAANABAAAAAAAAvBoAAE0oAADkGgAAAykAAOgBAAAAAAAA5BoAALMpAACwAQAAAAAAAOQaAABUKgAA6AEAAAAAAADkGgAABisAAOgBAAAAAAAA5BoAAMQrAADoAQAAAAAAAOQaAAByLAAAOAIAAAAAAAC8GgAANS0AAOQaAAD4LQAAUAIAAAAAAADkGgAAtS4AALABAAAAAAAA5BoAAGMvAABQAgAAAAAAAOQaAAAiMAAAUAIAAAAAAADkGgAA7TAAAFACAAAAAAAA5BoAANMxAABoAAAAAAAAAOQaAABJMgAACAAAAAAAAAC8GgAAFjIAAOQaAABcMgAAsAIAAAAAAADkGgAAbDMAAHgDAAAAAAAA5BoAAOE3AABgAwAAAAAAALwaAAAsNAAA5BoAAJM0AADoAgAAAAAAAOQaAAAANQAAEAMAAAAAAAC8GgAAizUAALwaAAClNQAA5BoAAP81AAAYAwAAAAAAAOQaAABfNgAAEAMAAAAAAADkGgAA3TYAABgDAAAAAAAA5BoAAEY3AAAQAwAAAAAAALwaAAAtOAAA5BoAAFs4AABgAwAAAAAAAOQaAADMOAAAqAMAAAAAAADkGgAAEjkAAHgDAAAAAAAA5BoAAPg4AAAQAwAAAAAAALwaAAAyOQAA5BoAAAc6AACoAwAAAAAAAOQaAAApOgAAqAMAAAAAAADkGgAATzoAAOADAAAAAAAAvBoAAKE6AAC8GgAA0EQAAOQaAAAwRQAAAAQAAAAAAADkGgAA3UQAABAEAAAAAAAAvBoAAP5EAADkGgAAC0UAAPADAAAAAAAA5BoAABJGAADoAwAAAAAAAOQaAAAiRgAAKAQAAAAAAADkGgAAV0YAAAAEAAAAAAAA5BoAADNGAABIBAAAAAAAAAAAAAAIAAAAAQAAAAIAAAAAAAAAEAAAAAMAAAAEAAAAAQAAAAEAAAABAAAAAAAAACgAAAAFAAAABgAAAAIAAAACAAAAAgAAAP//////////AAAAADgAAAAHAAAACAAAAAEAAAADAAAAAQAAAAQAAAAFAAAAAgAAAAYAAAAHAAAAAwAAAAEAAAAIAAAAAAAAAEAAAAAJAAAACgAAAAEAAAADAAAABAAAAAQAAAAFAAAAAgAAAAYAAAAHAAAABQAAAAkAAAAKAAAAAAAAAFAAAAALAAAADAAAAAMAAAALAAAADAAAAAQAAAANAAAABgAAAAcAAAAOAAAADwAAAAUAAAAAAAAAWAAAAA0AAAAOAAAABgAAABAAAAAIAAAAEQAAABIAAAAHAAAAEwAAABQAAAAJAAAAFQAAABYAAAAKAAAAAQAAAAAAAABoAAAADwAAABAAAAAIAAAACwAAABcAAAAEAAAADQAAAAYAAAALAAAADgAAAA8AAAAJAAAAAgAAAAoAAAD/////AAAAAIgAAAARAAAAEgAAAAEAAAAMAAAAAQAAAA0AAAAYAAAAGQAAAA4AAAAPAAAAGgAAAAEAAAAAAAAAeAAAABEAAAATAAAAEAAAAAwAAAARAAAADQAAABgAAAAZAAAADgAAAA8AAAAaAAAAAQAAAAAAAAAYAQAAEQAAABQAAAASAAAADAAAABMAAAANAAAAGAAAABkAAAAOAAAADwAAABoAAAACAAAAAAAAAPgAAAAVAAAAFgAAABQAAAAMAAAAFQAAABYAAAAbAAAAHAAAAA4AAAAPAAAAHQAAAAMAAAAAAAAA2AAAABcAAAAYAAAAFwAAAAwAAAAYAAAAGQAAAB4AAAAfAAAADgAAAA8AAAAgAAAABAAAAAAAAADAAAAAGQAAABoAAAAhAAAAGgAAAAMAAAAAAAAA6AAAABEAAAAbAAAAAQAAAAwAAAABAAAADQAAABgAAAAZAAAADgAAAA8AAAAaAAAAAQAAAAAAAAAIAQAAHAAAAB0AAAAbAAAADAAAABwAAAANAAAAGAAAABkAAAAOAAAADwAAACIAAAAFAAAAAAAAAIABAAARAAAAHgAAAB0AAAAMAAAAHgAAAA0AAAAYAAAAGQAAAA4AAAAPAAAAGgAAAAYAAAAAAAAAYAEAAB8AAAAgAAAAHwAAAAwAAAAgAAAAIQAAACMAAAAkAAAADgAAAA8AAAAlAAAABwAAAAAAAABAAQAAIQAAACIAAAAiAAAADAAAACMAAAAkAAAAJgAAACcAAAAOAAAADwAAACgAAAAIAAAAAAAAACgBAAAjAAAAJAAAACkAAAAlAAAABAAAAAAAAABQAQAAEQAAACUAAAABAAAADAAAAAEAAAANAAAAGAAAABkAAAAOAAAADwAAABoAAAABAAAAAAAAAHABAAAmAAAAJwAAACYAAAAMAAAAJwAAAA0AAAAYAAAAGQAAAA4AAAAPAAAAKgAAAAkAAAAAAAAAkAEAACgAAAApAAAACwAAAAsAAAAXAAAABAAAACsAAAAoAAAAKQAAAA4AAAAPAAAACQAAAAUAAAAMAAAAAAAAAKABAAAqAAAAKwAAACoAAAArAAAALAAAAC0AAAAsAAAALQAAAC4AAAAvAAAALgAAAAoAAAAAAAAAGAIAACoAAAAsAAAAMAAAACsAAAAxAAAALQAAACwAAAAtAAAALgAAAC8AAAAuAAAACwAAAAAAAAAIAgAALQAAAC4AAAAyAAAAKwAAADMAAAAtAAAALAAAAC0AAAAuAAAALwAAAC8AAAAMAAAAAAAAAPgBAAAvAAAAMAAAADQAAAArAAAANQAAADYAAAAwAAAAMQAAAC4AAAAvAAAAMgAAAA0AAAAAAAAA2AEAADEAAAAyAAAANwAAACsAAAA4AAAAOQAAADMAAAA0AAAALgAAAC8AAAA1AAAADgAAAAAAAADAAQAAMwAAADQAAAA2AAAAOgAAAAYAAAAAAAAAgAIAACoAAAA1AAAAOwAAACsAAAA8AAAALQAAACwAAAAtAAAALgAAAC8AAAAuAAAADwAAAAAAAABwAgAANgAAADcAAAA9AAAAKwAAAD4AAAAtAAAALAAAAC0AAAAuAAAALwAAADcAAAAQAAAAAAAAAGACAAA4AAAAOQAAAD8AAAArAAAAQAAAAEEAAAA4AAAAOQAAAC4AAAAvAAAAOgAAABEAAAAAAAAAQAIAADoAAAA7AAAAQgAAACsAAABDAAAARAAAADsAAAA8AAAALgAAAC8AAAA9AAAAEgAAAAAAAAAoAgAAPAAAAD0AAAA+AAAARQAAAAcAAAAAAAAAkAIAAD4AAAA/AAAADQAAAAsAAAAXAAAABAAAAD8AAABGAAAARwAAAA4AAAAPAAAACQAAAAIAAAAOAAAAAAAAAKACAAABAAAAQAAAAAEAAAACAAAAAAAAALACAABBAAAAQgAAAAAAAAC4AgAAQQAAAEMAAAAAAAAAyAIAAEQAAABFAAAASAAAAEkAAABKAAAASwAAAAMAAABMAAAATQAAAEAAAABBAAAATgAAAEYAAABPAAAAQgAAAEMAAAAEAAAARwAAAAAAAADYAgAASAAAAEkAAABEAAAARQAAAEYAAABHAAAASAAAAAUAAABQAAAASQAAAFEAAAABAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAAwAAAAAAAAAAAwAASgAAAEsAAABKAAAAUgAAAAAAAADwAgAATAAAAE0AAAAIAAAAAAAAAOgCAABOAAAATwAAAAgAAAD/////AAAAADADAABQAAAAUQAAAEsAAABTAAAAAAAAACADAABSAAAAUwAAAAkAAAAAAAAAGAMAAFQAAABVAAAACQAAAAAAAABQAwAAVgAAAFcAAABMAAAAVAAAAAAAAABAAwAAWAAAAFkAAAAJAAAAAAAAAGgDAABaAAAAWwAAAE0AAABOAAAATwAAAFAAAABRAAAABgAAAFUAAABSAAAAVgAAAAAAAAABAAAABQAAAAIAAAAFAAAAAwAAAAUAAAAEAAAAAAAAAHgDAABcAAAAXQAAAEgAAAABAAAAVwAAAEsAAAADAAAATAAAAE0AAAABAAAAUwAAAE4AAAABAAAAWAAAAFQAAABVAAAAAQAAAAEAAAAAAAAAiAMAAFwAAABeAAAASAAAAFkAAABXAAAASwAAAAMAAABMAAAATQAAAFYAAABTAAAATgAAAF8AAABYAAAAVAAAAFUAAAAHAAAAYAAAAAAAAACYAwAAYQAAAGIAAABXAAAAWgAAAAAAAACoAwAAXAAAAGMAAABbAAAAAQAAAFcAAABLAAAACAAAAEwAAABNAAAAAQAAAFMAAABOAAAAAQAAAAAAAACwAwAAXAAAAGQAAABbAAAAXAAAAFcAAABLAAAACQAAAEwAAABNAAAAWAAAAFMAAABOAAAAZQAAAAAAAADAAwAAXAAAAGYAAABbAAAAXQAAAFcAAABLAAAACgAAAEwAAABNAAAAWQAAAFMAAABOAAAAZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAFZVVVUCAAAAAAAAAAIAAACamZmZAwAAAFZVVVUDAAAAJUmSJAMAAAAAAAAAAwAAAMhxHMcEAAAAmpmZmQQAAABGF110BAAAAFZVVVUEAAAAPLETOwQAAAAlSZIkBAAAABIREREEAAAAAAAAAAQAAADi4eHhBQAAAMhxHMcFAAAAy2sorwUAAACamZmZBQAAAIdhGIYFAAAARhdddAUAAACRhSxkBQAAAFZVVVUFAAAAexSuRwUAAAA8sRM7BQAAANtLaC8FAAAAJUmSJAUAAAASlnsaBQAAABIREREFAAAAhRBCCAUAAAAAAAAABQAAAAgffPAGAAAA4uHh4QYAAADVQR3UBgAAAMhxHMcGAAAATZHPugYAAADLayivBgAAAKVBGqQGAAAAmpmZmQYAAAD6GJyPBgAAAIdhGIYGAAAAGPQFfQYAAABGF110BgAAAG3BFmwGAAAAkYUsZAYAAAC6gphcBgAAAFZVVVUGAAAAcwpeTgYAAAB7FK5HBgAAAEJBQUEGAAAAPLETOwYAAACzzyE1BgAAANtLaC8GAAAAnxLkKQYAAAAlSZIkBgAAAN1HcB8GAAAAEpZ7GgYAAAD45bEVBgAAABIREREGAAAA/BSXDAYAAACFEEIIBgAAAAVBEAQGAAAAAAAAAAYAAAD5gR/4BwAAAAgffPAHAAAAwBoT6QcAAADi4eHhBwAAAGwH5toHAAAA1UEd1AcAAACRaIXNBwAAAMhxHMcHAAAAOXDgwAcAAABNkc+6BwAAAE8b6LQHAAAAy2sorwcAAAAH9o6pBwAAAKVBGqQHAAAAUunIngcAAACamZmZBwAAAM4Pi5QHAAAA+hicjwcAAAD3kMuKBwAAAIdhGIYHAAAAgoGBgQcAAAAY9AV9BwAAABjIpHgHAAAARhdddAcAAADBBS5wBwAAAG3BFmwHAAAAaYEWaAcAAACRhSxkBwAAAAYWWGAHAAAAuoKYXAcAAAAJI+1YBwAAAFZVVVUHAAAAr37QUQcAAABzCl5OBwAAAAZq/UoHAAAAexSuRwcAAABXhm9EBwAAAEJBQUEHAAAAz8siPgcAAAA8sRM7BwAAADmBEzgHAAAAs88hNQcAAACjND4yBwAAANtLaC8HAAAA2bSfLAcAAACfEuQpBwAAAIkLNScHAAAAJUmSJAcAAAATePshBwAAAN1HcB8HAAAA22rwHAcAAAASlnsaBwAAABmBERgHAAAA+OWxFQcAAAAUgVwTBwAAABIREREHAAAAv1bPDgcAAAD8FJcMBwAAAKcQaAoHAAAAhRBCCAcAAAAw3SQGBwAAAAVBEAQHAAAAEQgEAgcAAAAAAAAABwAAACDwB/wIAAAA+YEf+AgAAADlWUb0CAAAAAgffPAIAAAAMXvA7AgAAADAGhPpCAAAAJGsc+UIAAAA4uHh4QgAAABAbl3eCAAAAGwH5toIAAAATGV71wgAAADVQR3UCAAAAPdYy9AIAAAAkWiFzQgAAABWMEvKCAAAAMhxHMcIAAAAHfD4wwgAAAA5cODACAAAAJq40r0IAAAATZHPuggAAADew9a3CAAAAE8b6LQIAAAAB2QDsggAAADLayivCAAAAK0BV6wIAAAAB/aOqQgAAABuGtCmCAAAAKVBGqQIAAAAmD9toQgAAABS6cieCAAAAO8ULZwIAAAAmpmZmQgAAACBTw6XCAAAAM4Pi5QIAAAAnrQPkggAAAD6GJyPCAAAANQYMI0IAAAA95DLiggAAAALX26ICAAAAIdhGIYIAAAArHfJgwgAAACCgYGBCAAAANFfQH8IAAAAGPQFfQgAAACPINJ6CAAAABjIpHgIAAAARM59dggAAABGF110CAAAAPWHQnIIAAAAwQUucAgAAAC1dh9uCAAAAG3BFmwIAAAAFs0TaggAAABpgRZoCAAAAKbGHmYIAAAAkYUsZAgAAABxpz9iCAAAAAYWWGAIAAAAjrt1XggAAAC6gphcCAAAALFWwFoIAAAACSPtWAgAAADG0x5XCAAAAFZVVVUIAAAAkJSQUwgAAACvftBRCAAAAFEBFVAIAAAAcwpeTggAAABziKtMCAAAAAZq/UoIAAAAPJ5TSQgAAAB7FK5HCAAAAIC8DEYIAAAAV4ZvRAgAAABeYtZCCAAAAEJBQUEIAAAA/BOwPwgAAADPyyI+CAAAAEhamTwIAAAAPLETOwgAAADCwpE5CAAAADmBEzgIAAAAPt+YNggAAACzzyE1CAAAALZFrjMIAAAAozQ+MggAAAAUkNEwCAAAANtLaC8IAAAABVwCLggAAADZtJ8sCAAAANFKQCsIAAAAnxLkKQgAAAApAYsoCAAAAIkLNScIAAAACSfiJQgAAAAlSZIkCAAAAIpnRSMIAAAAE3j7IQgAAADHcLQgCAAAAN1HcB8IAAAAtPMuHggAAADbavAcCAAAAAWktBsIAAAAEpZ7GggAAAAJOEUZCAAAABmBERgIAAAAlWjgFggAAAD45bEVCAAAAOHwhRQIAAAAFIFcEwgAAAB2jjUSCAAAABIREREIAAAAEAHvDwgAAAC/Vs8OCAAAAIkKsg0IAAAA/BSXDAgAAADDbn4LCAAAAKcQaAoIAAAAkfNTCQgAAACFEEIICAAAAKVgMgcIAAAAMN0kBggAAAB+fxkFCAAAAAVBEAQIAAAAUhsJAwgAAAARCAQCCAAAAAIBAQEIAAAA/////wAAAADQAwAAaAAAAGkAAAAKAAAACwAAAF4AAABqAAAACwAAAP////8AAAAA4AMAAGsAAABsAAAADAAAAAwAAABeAAAAagAAAA0AAAD/////HBcAAAUAAAAAAAAAAAAAAF8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAQAAAAyEgAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAP//////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJxIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAABkAAAA6AMAABAnAACghgEAQEIPAICWmAAA4fUFX3CJAP8JLw8AAAAAAgAAAAMAAAAFAAAABwAAAAsAAAANAAAAEQAAABMAAAAXAAAAHQAAAB8AAAAlAAAAKQAAACsAAAAvAAAANQAAADsAAAA9AAAAQwAAAEcAAABJAAAATwAAAFMAAABZAAAAYQAAAGUAAABnAAAAawAAAG0AAABxAAAAfwAAAIMAAACJAAAAiwAAAJUAAACXAAAAnQAAAKMAAACnAAAArQAAALMAAAC1AAAAvwAAAMEAAADFAAAAxwAAANMAAAABAAAACwAAAA0AAAARAAAAEwAAABcAAAAdAAAAHwAAACUAAAApAAAAKwAAAC8AAAA1AAAAOwAAAD0AAABDAAAARwAAAEkAAABPAAAAUwAAAFkAAABhAAAAZQAAAGcAAABrAAAAbQAAAHEAAAB5AAAAfwAAAIMAAACJAAAAiwAAAI8AAACVAAAAlwAAAJ0AAACjAAAApwAAAKkAAACtAAAAswAAALUAAAC7AAAAvwAAAMEAAADFAAAAxwAAANEAAAACAAAAAAAAAPADAABtAAAAbgAAAG8AAABwAAAAEgAAAAEAAAABAAAAAwAAAAAAAAAYBAAAbQAAAHEAAABvAAAAcAAAABIAAAACAAAAAgAAAAQAAAAAAAAAKAQAAHIAAABzAAAAYAAAAAAAAAA4BAAAcgAAAHQAAABgAAAATjVkcmFjbzExRW5jb2RlckJhc2VJTlNfMThFbmNvZGVyT3B0aW9uc0Jhc2VJTlNfMTdHZW9tZXRyeUF0dHJpYnV0ZTRUeXBlRUVFRUUATjVkcmFjbzI4QXR0cmlidXRlT2N0YWhlZHJvblRyYW5zZm9ybUUATjVkcmFjbzE4QXR0cmlidXRlVHJhbnNmb3JtRQBONWRyYWNvMzBBdHRyaWJ1dGVRdWFudGl6YXRpb25UcmFuc2Zvcm1FAE41ZHJhY28xN0F0dHJpYnV0ZXNFbmNvZGVyRQBONWRyYWNvMjNLZFRyZWVBdHRyaWJ1dGVzRW5jb2RlckUATjVkcmFjbzI2U2VxdWVudGlhbEF0dHJpYnV0ZUVuY29kZXJFAE41ZHJhY28zN1NlcXVlbnRpYWxBdHRyaWJ1dGVFbmNvZGVyc0NvbnRyb2xsZXJFAE41ZHJhY28yOFByZWRpY3Rpb25TY2hlbWVEZWx0YUVuY29kZXJJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFRUUATjVkcmFjbzIzUHJlZGljdGlvblNjaGVtZUVuY29kZXJJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFRUUATjVkcmFjbzM3UHJlZGljdGlvblNjaGVtZVR5cGVkRW5jb2RlckludGVyZmFjZUlpaUVFAE41ZHJhY28zMlByZWRpY3Rpb25TY2hlbWVFbmNvZGVySW50ZXJmYWNlRQBONWRyYWNvMjVQcmVkaWN0aW9uU2NoZW1lSW50ZXJmYWNlRQBONWRyYWNvNDhNZXNoUHJlZGljdGlvblNjaGVtZUdlb21ldHJpY05vcm1hbFByZWRpY3RvckFyZWFJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMTFDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280OE1lc2hQcmVkaWN0aW9uU2NoZW1lR2VvbWV0cmljTm9ybWFsUHJlZGljdG9yQmFzZUlpTlNfMzdQcmVkaWN0aW9uU2NoZW1lV3JhcEVuY29kaW5nVHJhbnNmb3JtSWlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18xMUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQyTWVzaFByZWRpY3Rpb25TY2hlbWVHZW9tZXRyaWNOb3JtYWxFbmNvZGVySWlOU18zN1ByZWRpY3Rpb25TY2hlbWVXcmFwRW5jb2RpbmdUcmFuc2Zvcm1JaWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzExQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvMjdNZXNoUHJlZGljdGlvblNjaGVtZUVuY29kZXJJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMTFDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280NE1lc2hQcmVkaWN0aW9uU2NoZW1lVGV4Q29vcmRzUG9ydGFibGVFbmNvZGVySWlOU18zN1ByZWRpY3Rpb25TY2hlbWVXcmFwRW5jb2RpbmdUcmFuc2Zvcm1JaWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzExQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNTZNZXNoUHJlZGljdGlvblNjaGVtZUNvbnN0cmFpbmVkTXVsdGlQYXJhbGxlbG9ncmFtRW5jb2RlcklpTlNfMzdQcmVkaWN0aW9uU2NoZW1lV3JhcEVuY29kaW5nVHJhbnNmb3JtSWlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18xMUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQwTWVzaFByZWRpY3Rpb25TY2hlbWVQYXJhbGxlbG9ncmFtRW5jb2RlcklpTlNfMzdQcmVkaWN0aW9uU2NoZW1lV3JhcEVuY29kaW5nVHJhbnNmb3JtSWlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18xMUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQ4TWVzaFByZWRpY3Rpb25TY2hlbWVHZW9tZXRyaWNOb3JtYWxQcmVkaWN0b3JBcmVhSWlOU18zN1ByZWRpY3Rpb25TY2hlbWVXcmFwRW5jb2RpbmdUcmFuc2Zvcm1JaWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQ4TWVzaFByZWRpY3Rpb25TY2hlbWVHZW9tZXRyaWNOb3JtYWxQcmVkaWN0b3JCYXNlSWlOU18zN1ByZWRpY3Rpb25TY2hlbWVXcmFwRW5jb2RpbmdUcmFuc2Zvcm1JaWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQyTWVzaFByZWRpY3Rpb25TY2hlbWVHZW9tZXRyaWNOb3JtYWxFbmNvZGVySWlOU18zN1ByZWRpY3Rpb25TY2hlbWVXcmFwRW5jb2RpbmdUcmFuc2Zvcm1JaWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzI3TWVzaFByZWRpY3Rpb25TY2hlbWVFbmNvZGVySWlOU18zN1ByZWRpY3Rpb25TY2hlbWVXcmFwRW5jb2RpbmdUcmFuc2Zvcm1JaWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQ0TWVzaFByZWRpY3Rpb25TY2hlbWVUZXhDb29yZHNQb3J0YWJsZUVuY29kZXJJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMjRNZXNoQXR0cmlidXRlQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNTZNZXNoUHJlZGljdGlvblNjaGVtZUNvbnN0cmFpbmVkTXVsdGlQYXJhbGxlbG9ncmFtRW5jb2RlcklpTlNfMzdQcmVkaWN0aW9uU2NoZW1lV3JhcEVuY29kaW5nVHJhbnNmb3JtSWlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18yNE1lc2hBdHRyaWJ1dGVDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280ME1lc2hQcmVkaWN0aW9uU2NoZW1lUGFyYWxsZWxvZ3JhbUVuY29kZXJJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMjRNZXNoQXR0cmlidXRlQ29ybmVyVGFibGVFRUVFRQB1c2VfYnVpbHRfaW5fYXR0cmlidXRlX2NvbXByZXNzaW9uAE41ZHJhY28zM1NlcXVlbnRpYWxJbnRlZ2VyQXR0cmlidXRlRW5jb2RlckUATjVkcmFjbzI4UHJlZGljdGlvblNjaGVtZURlbHRhRW5jb2RlcklpTlNfNjJQcmVkaWN0aW9uU2NoZW1lTm9ybWFsT2N0YWhlZHJvbkNhbm9uaWNhbGl6ZWRFbmNvZGluZ1RyYW5zZm9ybUlpRUVFRQBONWRyYWNvMjNQcmVkaWN0aW9uU2NoZW1lRW5jb2RlcklpTlNfNjJQcmVkaWN0aW9uU2NoZW1lTm9ybWFsT2N0YWhlZHJvbkNhbm9uaWNhbGl6ZWRFbmNvZGluZ1RyYW5zZm9ybUlpRUVFRQBONWRyYWNvNDhNZXNoUHJlZGljdGlvblNjaGVtZUdlb21ldHJpY05vcm1hbFByZWRpY3RvckFyZWFJaU5TXzYyUHJlZGljdGlvblNjaGVtZU5vcm1hbE9jdGFoZWRyb25DYW5vbmljYWxpemVkRW5jb2RpbmdUcmFuc2Zvcm1JaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMTFDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280OE1lc2hQcmVkaWN0aW9uU2NoZW1lR2VvbWV0cmljTm9ybWFsUHJlZGljdG9yQmFzZUlpTlNfNjJQcmVkaWN0aW9uU2NoZW1lTm9ybWFsT2N0YWhlZHJvbkNhbm9uaWNhbGl6ZWRFbmNvZGluZ1RyYW5zZm9ybUlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18xMUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQyTWVzaFByZWRpY3Rpb25TY2hlbWVHZW9tZXRyaWNOb3JtYWxFbmNvZGVySWlOU182MlByZWRpY3Rpb25TY2hlbWVOb3JtYWxPY3RhaGVkcm9uQ2Fub25pY2FsaXplZEVuY29kaW5nVHJhbnNmb3JtSWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzExQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvMjdNZXNoUHJlZGljdGlvblNjaGVtZUVuY29kZXJJaU5TXzYyUHJlZGljdGlvblNjaGVtZU5vcm1hbE9jdGFoZWRyb25DYW5vbmljYWxpemVkRW5jb2RpbmdUcmFuc2Zvcm1JaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMTFDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280NE1lc2hQcmVkaWN0aW9uU2NoZW1lVGV4Q29vcmRzUG9ydGFibGVFbmNvZGVySWlOU182MlByZWRpY3Rpb25TY2hlbWVOb3JtYWxPY3RhaGVkcm9uQ2Fub25pY2FsaXplZEVuY29kaW5nVHJhbnNmb3JtSWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzExQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNTZNZXNoUHJlZGljdGlvblNjaGVtZUNvbnN0cmFpbmVkTXVsdGlQYXJhbGxlbG9ncmFtRW5jb2RlcklpTlNfNjJQcmVkaWN0aW9uU2NoZW1lTm9ybWFsT2N0YWhlZHJvbkNhbm9uaWNhbGl6ZWRFbmNvZGluZ1RyYW5zZm9ybUlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18xMUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQwTWVzaFByZWRpY3Rpb25TY2hlbWVQYXJhbGxlbG9ncmFtRW5jb2RlcklpTlNfNjJQcmVkaWN0aW9uU2NoZW1lTm9ybWFsT2N0YWhlZHJvbkNhbm9uaWNhbGl6ZWRFbmNvZGluZ1RyYW5zZm9ybUlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18xMUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQ4TWVzaFByZWRpY3Rpb25TY2hlbWVHZW9tZXRyaWNOb3JtYWxQcmVkaWN0b3JBcmVhSWlOU182MlByZWRpY3Rpb25TY2hlbWVOb3JtYWxPY3RhaGVkcm9uQ2Fub25pY2FsaXplZEVuY29kaW5nVHJhbnNmb3JtSWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQ4TWVzaFByZWRpY3Rpb25TY2hlbWVHZW9tZXRyaWNOb3JtYWxQcmVkaWN0b3JCYXNlSWlOU182MlByZWRpY3Rpb25TY2hlbWVOb3JtYWxPY3RhaGVkcm9uQ2Fub25pY2FsaXplZEVuY29kaW5nVHJhbnNmb3JtSWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQyTWVzaFByZWRpY3Rpb25TY2hlbWVHZW9tZXRyaWNOb3JtYWxFbmNvZGVySWlOU182MlByZWRpY3Rpb25TY2hlbWVOb3JtYWxPY3RhaGVkcm9uQ2Fub25pY2FsaXplZEVuY29kaW5nVHJhbnNmb3JtSWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzI3TWVzaFByZWRpY3Rpb25TY2hlbWVFbmNvZGVySWlOU182MlByZWRpY3Rpb25TY2hlbWVOb3JtYWxPY3RhaGVkcm9uQ2Fub25pY2FsaXplZEVuY29kaW5nVHJhbnNmb3JtSWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQ0TWVzaFByZWRpY3Rpb25TY2hlbWVUZXhDb29yZHNQb3J0YWJsZUVuY29kZXJJaU5TXzYyUHJlZGljdGlvblNjaGVtZU5vcm1hbE9jdGFoZWRyb25DYW5vbmljYWxpemVkRW5jb2RpbmdUcmFuc2Zvcm1JaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMjRNZXNoQXR0cmlidXRlQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNTZNZXNoUHJlZGljdGlvblNjaGVtZUNvbnN0cmFpbmVkTXVsdGlQYXJhbGxlbG9ncmFtRW5jb2RlcklpTlNfNjJQcmVkaWN0aW9uU2NoZW1lTm9ybWFsT2N0YWhlZHJvbkNhbm9uaWNhbGl6ZWRFbmNvZGluZ1RyYW5zZm9ybUlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18yNE1lc2hBdHRyaWJ1dGVDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280ME1lc2hQcmVkaWN0aW9uU2NoZW1lUGFyYWxsZWxvZ3JhbUVuY29kZXJJaU5TXzYyUHJlZGljdGlvblNjaGVtZU5vcm1hbE9jdGFoZWRyb25DYW5vbmljYWxpemVkRW5jb2RpbmdUcmFuc2Zvcm1JaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMjRNZXNoQXR0cmlidXRlQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvMzJTZXF1ZW50aWFsTm9ybWFsQXR0cmlidXRlRW5jb2RlckUATjVkcmFjbzM4U2VxdWVudGlhbFF1YW50aXphdGlvbkF0dHJpYnV0ZUVuY29kZXJFAHByZWRpY3Rpb25fc2NoZW1lAE41ZHJhY28xMUVuY29kZXJCYXNlSU5TXzE4RW5jb2Rlck9wdGlvbnNCYXNlSWlFRUVFAE41ZHJhY283RW5jb2RlckUAIABONWRyYWNvMTNFeHBlcnRFbmNvZGVyRQBlbmNvZGluZ19tZXRob2QAcXVhbnRpemF0aW9uX2JpdHMASW52YWxpZCBlbmNvZGluZyBtZXRob2QuAGVuY29kaW5nX3NwZWVkAGRlY29kaW5nX3NwZWVkAHF1YW50aXphdGlvbl9vcmlnaW4AcXVhbnRpemF0aW9uX3JhbmdlAHN5bWJvbF9lbmNvZGluZ19tZXRob2QAc3ltYm9sX2VuY29kaW5nX2NvbXByZXNzaW9uX2xldmVsAHN0YW5kYXJkX2VkZ2VicmVha2VyAHByZWRpY3RpdmVfZWRnZWJyZWFrZXIAZWRnZWJyZWFrZXJfbWV0aG9kAE41ZHJhY28yMk1lc2hFZGdlYnJlYWtlckVuY29kZXJFAEFsbCB0cmlhbmdsZXMgYXJlIGRlZ2VuZXJhdGUuAEZhaWxlZCB0byBwcm9jZXNzIG1lc2ggaG9sZXMuAEZhaWxlZCB0byBpbml0aWFsaXplIGF0dHJpYnV0ZSBkYXRhLgBGYWlsZWQgdG8gZW5jb2RlIG1lc2ggY29tcG9uZW50LgBGYWlsZWQgdG8gZW5jb2RlIHNwbGl0IGRhdGEuAE41ZHJhY28xM1RyYXZlcnNlckJhc2VJTlNfMjRNZXNoQXR0cmlidXRlQ29ybmVyVGFibGVFTlNfMzZNZXNoQXR0cmlidXRlSW5kaWNlc0VuY29kaW5nT2JzZXJ2ZXJJUzFfRUVFRQBONWRyYWNvMTlEZXB0aEZpcnN0VHJhdmVyc2VySU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRU5TXzM2TWVzaEF0dHJpYnV0ZUluZGljZXNFbmNvZGluZ09ic2VydmVySVMxX0VFRUUATjVkcmFjbzIyTWVzaFRyYXZlcnNhbFNlcXVlbmNlcklOU18xOURlcHRoRmlyc3RUcmF2ZXJzZXJJTlNfMjRNZXNoQXR0cmlidXRlQ29ybmVyVGFibGVFTlNfMzZNZXNoQXR0cmlidXRlSW5kaWNlc0VuY29kaW5nT2JzZXJ2ZXJJUzJfRUVFRUVFAE41ZHJhY28xNVBvaW50c1NlcXVlbmNlckUATjVkcmFjbzEzVHJhdmVyc2VyQmFzZUlOU18xMUNvcm5lclRhYmxlRU5TXzM2TWVzaEF0dHJpYnV0ZUluZGljZXNFbmNvZGluZ09ic2VydmVySVMxX0VFRUUATjVkcmFjbzE5RGVwdGhGaXJzdFRyYXZlcnNlcklOU18xMUNvcm5lclRhYmxlRU5TXzM2TWVzaEF0dHJpYnV0ZUluZGljZXNFbmNvZGluZ09ic2VydmVySVMxX0VFRUUATjVkcmFjbzIyTWVzaFRyYXZlcnNhbFNlcXVlbmNlcklOU18xOURlcHRoRmlyc3RUcmF2ZXJzZXJJTlNfMTFDb3JuZXJUYWJsZUVOU18zNk1lc2hBdHRyaWJ1dGVJbmRpY2VzRW5jb2RpbmdPYnNlcnZlcklTMl9FRUVFRUUATjVkcmFjbzI4TWF4UHJlZGljdGlvbkRlZ3JlZVRyYXZlcnNlcklOU18xMUNvcm5lclRhYmxlRU5TXzM2TWVzaEF0dHJpYnV0ZUluZGljZXNFbmNvZGluZ09ic2VydmVySVMxX0VFRUUATjVkcmFjbzIyTWVzaFRyYXZlcnNhbFNlcXVlbmNlcklOU18yOE1heFByZWRpY3Rpb25EZWdyZWVUcmF2ZXJzZXJJTlNfMTFDb3JuZXJUYWJsZUVOU18zNk1lc2hBdHRyaWJ1dGVJbmRpY2VzRW5jb2RpbmdPYnNlcnZlcklTMl9FRUVFRUUAc3BsaXRfbWVzaF9vbl9zZWFtcwBONWRyYWNvMjZNZXNoRWRnZWJyZWFrZXJFbmNvZGVySW1wbElOU18zMU1lc2hFZGdlYnJlYWtlclRyYXZlcnNhbEVuY29kZXJFRUUATjVkcmFjbzM1TWVzaEVkZ2VicmVha2VyRW5jb2RlckltcGxJbnRlcmZhY2VFAE41ZHJhY28yNk1lc2hFZGdlYnJlYWtlckVuY29kZXJJbXBsSU5TXzM4TWVzaEVkZ2VicmVha2VyVHJhdmVyc2FsVmFsZW5jZUVuY29kZXJFRUUAc3RvcmVfbnVtYmVyX29mX2VuY29kZWRfZmFjZXMATjVkcmFjbzExTWVzaEVuY29kZXJFAGNvbXByZXNzX2Nvbm5lY3Rpdml0eQBONWRyYWNvMTVMaW5lYXJTZXF1ZW5jZXJFAE41ZHJhY28yMU1lc2hTZXF1ZW50aWFsRW5jb2RlckUATjVkcmFjbzE3UG9pbnRDbG91ZEVuY29kZXJFAEludmFsaWQgaW5wdXQgZ2VvbWV0cnkuAEZhaWxlZCB0byBpbml0aWFsaXplIGVuY29kZXIuAEZhaWxlZCB0byBlbmNvZGUgaW50ZXJuYWwgZGF0YS4ARmFpbGVkIHRvIGVuY29kZSBwb2ludCBhdHRyaWJ1dGVzLgBzdG9yZV9udW1iZXJfb2ZfZW5jb2RlZF9wb2ludHMARmFpbGVkIHRvIGVuY29kZSBtZXRhZGF0YS4ARFJBQ08ATjVkcmFjbzIzUG9pbnRDbG91ZEtkVHJlZUVuY29kZXJFAE41ZHJhY28yN1BvaW50Q2xvdWRTZXF1ZW50aWFsRW5jb2RlckUATjVkcmFjbzRNZXNoRQBhbGxvY2F0b3I8VD46OmFsbG9jYXRlKHNpemVfdCBuKSAnbicgZXhjZWVkcyBtYXhpbXVtIHN1cHBvcnRlZCBzaXplAE41ZHJhY28xMFBvaW50Q2xvdWRFABEACgAREREAAAAABQAAAAAAAAkAAAAACwAAAAAAAAAAEQAPChEREQMKBwABEwkLCwAACQYLAAALAAYRAAAAERERAAAAAAAAAAAAAAAAAAAAAAsAAAAAAAAAABEACgoREREACgAAAgAJCwAAAAkACwAACwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAMAAAAAAwAAAAACQwAAAAAAAwAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAADQAAAAQNAAAAAAkOAAAAAAAOAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAA8AAAAADwAAAAAJEAAAAAAAEAAAEAAAEgAAABISEgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAEhISAAAAAAAACQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAAAAACgAAAAAKAAAAAAkLAAAAAAALAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAADAAAAAAJDAAAAAAADAAADAAALSsgICAwWDB4AChudWxsKQAtMFgrMFggMFgtMHgrMHggMHgAaW5mAElORgBOQU4AMDEyMzQ1Njc4OUFCQ0RFRi4AVCEiGQ0BAgMRSxwMEAQLHRIeJ2hub3BxYiAFBg8TFBUaCBYHKCQXGAkKDhsfJSODgn0mKis8PT4/Q0dKTVhZWltcXV5fYGFjZGVmZ2lqa2xyc3R5ent8AElsbGVnYWwgYnl0ZSBzZXF1ZW5jZQBEb21haW4gZXJyb3IAUmVzdWx0IG5vdCByZXByZXNlbnRhYmxlAE5vdCBhIHR0eQBQZXJtaXNzaW9uIGRlbmllZABPcGVyYXRpb24gbm90IHBlcm1pdHRlZABObyBzdWNoIGZpbGUgb3IgZGlyZWN0b3J5AE5vIHN1Y2ggcHJvY2VzcwBGaWxlIGV4aXN0cwBWYWx1ZSB0b28gbGFyZ2UgZm9yIGRhdGEgdHlwZQBObyBzcGFjZSBsZWZ0IG9uIGRldmljZQBPdXQgb2YgbWVtb3J5AFJlc291cmNlIGJ1c3kASW50ZXJydXB0ZWQgc3lzdGVtIGNhbGwAUmVzb3VyY2UgdGVtcG9yYXJpbHkgdW5hdmFpbGFibGUASW52YWxpZCBzZWVrAENyb3NzLWRldmljZSBsaW5rAFJlYWQtb25seSBmaWxlIHN5c3RlbQBEaXJlY3Rvcnkgbm90IGVtcHR5AENvbm5lY3Rpb24gcmVzZXQgYnkgcGVlcgBPcGVyYXRpb24gdGltZWQgb3V0AENvbm5lY3Rpb24gcmVmdXNlZABIb3N0IGlzIGRvd24ASG9zdCBpcyB1bnJlYWNoYWJsZQBBZGRyZXNzIGluIHVzZQBCcm9rZW4gcGlwZQBJL08gZXJyb3IATm8gc3VjaCBkZXZpY2Ugb3IgYWRkcmVzcwBCbG9jayBkZXZpY2UgcmVxdWlyZWQATm8gc3VjaCBkZXZpY2UATm90IGEgZGlyZWN0b3J5AElzIGEgZGlyZWN0b3J5AFRleHQgZmlsZSBidXN5AEV4ZWMgZm9ybWF0IGVycm9yAEludmFsaWQgYXJndW1lbnQAQXJndW1lbnQgbGlzdCB0b28gbG9uZwBTeW1ib2xpYyBsaW5rIGxvb3AARmlsZW5hbWUgdG9vIGxvbmcAVG9vIG1hbnkgb3BlbiBmaWxlcyBpbiBzeXN0ZW0ATm8gZmlsZSBkZXNjcmlwdG9ycyBhdmFpbGFibGUAQmFkIGZpbGUgZGVzY3JpcHRvcgBObyBjaGlsZCBwcm9jZXNzAEJhZCBhZGRyZXNzAEZpbGUgdG9vIGxhcmdlAFRvbyBtYW55IGxpbmtzAE5vIGxvY2tzIGF2YWlsYWJsZQBSZXNvdXJjZSBkZWFkbG9jayB3b3VsZCBvY2N1cgBTdGF0ZSBub3QgcmVjb3ZlcmFibGUAUHJldmlvdXMgb3duZXIgZGllZABPcGVyYXRpb24gY2FuY2VsZWQARnVuY3Rpb24gbm90IGltcGxlbWVudGVkAE5vIG1lc3NhZ2Ugb2YgZGVzaXJlZCB0eXBlAElkZW50aWZpZXIgcmVtb3ZlZABEZXZpY2Ugbm90IGEgc3RyZWFtAE5vIGRhdGEgYXZhaWxhYmxlAERldmljZSB0aW1lb3V0AE91dCBvZiBzdHJlYW1zIHJlc291cmNlcwBMaW5rIGhhcyBiZWVuIHNldmVyZWQAUHJvdG9jb2wgZXJyb3IAQmFkIG1lc3NhZ2UARmlsZSBkZXNjcmlwdG9yIGluIGJhZCBzdGF0ZQBOb3QgYSBzb2NrZXQARGVzdGluYXRpb24gYWRkcmVzcyByZXF1aXJlZABNZXNzYWdlIHRvbyBsYXJnZQBQcm90b2NvbCB3cm9uZyB0eXBlIGZvciBzb2NrZXQAUHJvdG9jb2wgbm90IGF2YWlsYWJsZQBQcm90b2NvbCBub3Qgc3VwcG9ydGVkAFNvY2tldCB0eXBlIG5vdCBzdXBwb3J0ZWQATm90IHN1cHBvcnRlZABQcm90b2NvbCBmYW1pbHkgbm90IHN1cHBvcnRlZABBZGRyZXNzIGZhbWlseSBub3Qgc3VwcG9ydGVkIGJ5IHByb3RvY29sAEFkZHJlc3Mgbm90IGF2YWlsYWJsZQBOZXR3b3JrIGlzIGRvd24ATmV0d29yayB1bnJlYWNoYWJsZQBDb25uZWN0aW9uIHJlc2V0IGJ5IG5ldHdvcmsAQ29ubmVjdGlvbiBhYm9ydGVkAE5vIGJ1ZmZlciBzcGFjZSBhdmFpbGFibGUAU29ja2V0IGlzIGNvbm5lY3RlZABTb2NrZXQgbm90IGNvbm5lY3RlZABDYW5ub3Qgc2VuZCBhZnRlciBzb2NrZXQgc2h1dGRvd24AT3BlcmF0aW9uIGFscmVhZHkgaW4gcHJvZ3Jlc3MAT3BlcmF0aW9uIGluIHByb2dyZXNzAFN0YWxlIGZpbGUgaGFuZGxlAFJlbW90ZSBJL08gZXJyb3IAUXVvdGEgZXhjZWVkZWQATm8gbWVkaXVtIGZvdW5kAFdyb25nIG1lZGl1bSB0eXBlAE5vIGVycm9yIGluZm9ybWF0aW9uAABpbmZpbml0eQBuYW4AJWQAJWYAdGVybWluYXRpbmcgd2l0aCAlcyBleGNlcHRpb24gb2YgdHlwZSAlczogJXMAdGVybWluYXRpbmcgd2l0aCAlcyBleGNlcHRpb24gb2YgdHlwZSAlcwB0ZXJtaW5hdGluZyB3aXRoICVzIGZvcmVpZ24gZXhjZXB0aW9uAHRlcm1pbmF0aW5nAHVuY2F1Z2h0AFN0OWV4Y2VwdGlvbgBOMTBfX2N4eGFiaXYxMTZfX3NoaW1fdHlwZV9pbmZvRQBTdDl0eXBlX2luZm8ATjEwX19jeHhhYml2MTIwX19zaV9jbGFzc190eXBlX2luZm9FAE4xMF9fY3h4YWJpdjExN19fY2xhc3NfdHlwZV9pbmZvRQBwdGhyZWFkX29uY2UgZmFpbHVyZSBpbiBfX2N4YV9nZXRfZ2xvYmFsc19mYXN0KCkAY2Fubm90IGNyZWF0ZSBwdGhyZWFkIGtleSBmb3IgX19jeGFfZ2V0X2dsb2JhbHMoKQBjYW5ub3QgemVybyBvdXQgdGhyZWFkIHZhbHVlIGZvciBfX2N4YV9nZXRfZ2xvYmFscygpAHRlcm1pbmF0ZV9oYW5kbGVyIHVuZXhwZWN0ZWRseSByZXR1cm5lZABTdDExbG9naWNfZXJyb3IAU3QxMmxlbmd0aF9lcnJvcgBOMTBfX2N4eGFiaXYxMTlfX3BvaW50ZXJfdHlwZV9pbmZvRQBOMTBfX2N4eGFiaXYxMTdfX3BiYXNlX3R5cGVfaW5mb0U=";var tempDoublePtr=STATICTOP;STATICTOP+=16;function ___cxa_allocate_exception(size){return _malloc(size)}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:(function(adjusted){if(!adjusted||EXCEPTIONS.infos[adjusted])return adjusted;for(var ptr in EXCEPTIONS.infos){var info=EXCEPTIONS.infos[ptr];if(info.adjusted===adjusted){return ptr}}return adjusted}),addRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount++}),decRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];assert(info.refcount>0);info.refcount--;if(info.refcount===0&&!info.rethrown){if(info.destructor){Module["dynCall_vi"](info.destructor,ptr)}delete EXCEPTIONS.infos[ptr];___cxa_free_exception(ptr)}}),clearRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount=0})};function ___cxa_begin_catch(ptr){var info=EXCEPTIONS.infos[ptr];if(info&&!info.caught){info.caught=true;__ZSt18uncaught_exceptionv.uncaught_exception--}if(info)info.rethrown=false;EXCEPTIONS.caught.push(ptr);EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(ptr));return ptr}function ___cxa_pure_virtual(){ABORT=true;throw"Pure virtual function called!"}function ___resumeException(ptr){if(!EXCEPTIONS.last){EXCEPTIONS.last=ptr}throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_find_matching_catch(){var thrown=EXCEPTIONS.last;if(!thrown){return(setTempRet0(0),0)|0}var info=EXCEPTIONS.infos[thrown];var throwntype=info.type;if(!throwntype){return(setTempRet0(0),thrown)|0}var typeArray=Array.prototype.slice.call(arguments);var pointer=Module["___cxa_is_pointer_type"](throwntype);if(!___cxa_find_matching_catch.buffer)___cxa_find_matching_catch.buffer=_malloc(4);HEAP32[___cxa_find_matching_catch.buffer>>2]=thrown;thrown=___cxa_find_matching_catch.buffer;for(var i=0;i>2];info.adjusted=thrown;return(setTempRet0(typeArray[i]),thrown)|0}}thrown=HEAP32[thrown>>2];return(setTempRet0(throwntype),thrown)|0}function ___cxa_throw(ptr,type,destructor){EXCEPTIONS.infos[ptr]={ptr:ptr,adjusted:ptr,type:type,destructor:destructor,refcount:0,caught:false,rethrown:false};EXCEPTIONS.last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exception=1}else{__ZSt18uncaught_exceptionv.uncaught_exception++}throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC);function ___gxx_personality_v0(){}var SYSCALLS={varargs:0,get:(function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret}),getStr:(function(){var ret=Pointer_stringify(SYSCALLS.get());return ret}),get64:(function(){var low=SYSCALLS.get(),high=SYSCALLS.get();if(low>=0)assert(high===0);else assert(high===-1);return low}),getZero:(function(){assert(SYSCALLS.get()===0)})};function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();var offset=offset_low;FS.llseek(stream,offset,whence);HEAP32[result>>2]=stream.position;if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function flush_NO_FILESYSTEM(){var fflush=Module["_fflush"];if(fflush)fflush(0);var printChar=___syscall146.printChar;if(!printChar)return;var buffers=___syscall146.buffers;if(buffers[1].length)printChar(1,10);if(buffers[2].length)printChar(2,10)}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.get(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();var ret=0;if(!___syscall146.buffers){___syscall146.buffers=[null,[],[]];___syscall146.printChar=(function(stream,curr){var buffer=___syscall146.buffers[stream];assert(buffer);if(curr===0||curr===10){(stream===1?Module["print"]:Module["printErr"])(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}})}for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j>2]=PTHREAD_SPECIFIC_NEXT_KEY;PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0;PTHREAD_SPECIFIC_NEXT_KEY++;return 0}function _pthread_once(ptr,func){if(!_pthread_once.seen)_pthread_once.seen={};if(ptr in _pthread_once.seen)return;Module["dynCall_v"](func);_pthread_once.seen[ptr]=1}function _pthread_setspecific(key,value){if(!(key in PTHREAD_SPECIFIC)){return ERRNO_CODES.EINVAL}PTHREAD_SPECIFIC[key]=value;return 0}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}DYNAMICTOP_PTR=staticAlloc(4);STACK_BASE=STACKTOP=alignMemory(STATICTOP);STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=alignMemory(STACK_MAX);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;staticSealed=true;var ASSERTIONS=false;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}function intArrayToString(array){var ret=[];for(var i=0;i255){if(ASSERTIONS){assert(false,"Character code "+chr+" ("+String.fromCharCode(chr)+") at offset "+i+" not in 0x00-0xFF.")}chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}var decodeBase64=typeof atob==="function"?atob:(function(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i2147483648)return false;b=new a(newBuffer);d=new c(newBuffer);f=new e(newBuffer);h=new g(newBuffer);j=new i(newBuffer);l=new k(newBuffer);n=new m(newBuffer);p=new o(newBuffer);buffer=newBuffer;return true} +// EMSCRIPTEN_START_FUNCS +function wc(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!a)return;b=a+-8|0;c=f[4516]|0;d=f[a+-4>>2]|0;a=d&-8;e=b+a|0;do if(!(d&1)){g=f[b>>2]|0;if(!(d&3))return;h=b+(0-g)|0;i=g+a|0;if(h>>>0>>0)return;if((f[4517]|0)==(h|0)){j=e+4|0;k=f[j>>2]|0;if((k&3|0)!=3){l=h;m=i;n=h;break}f[4514]=i;f[j>>2]=k&-2;f[h+4>>2]=i|1;f[h+i>>2]=i;return}k=g>>>3;if(g>>>0<256){g=f[h+8>>2]|0;j=f[h+12>>2]|0;if((j|0)==(g|0)){f[4512]=f[4512]&~(1<>2]=j;f[j+8>>2]=g;l=h;m=i;n=h;break}}g=f[h+24>>2]|0;j=f[h+12>>2]|0;do if((j|0)==(h|0)){k=h+16|0;o=k+4|0;p=f[o>>2]|0;if(!p){q=f[k>>2]|0;if(!q){r=0;break}else{s=q;t=k}}else{s=p;t=o}while(1){o=s+20|0;p=f[o>>2]|0;if(p|0){s=p;t=o;continue}o=s+16|0;p=f[o>>2]|0;if(!p)break;else{s=p;t=o}}f[t>>2]=0;r=s}else{o=f[h+8>>2]|0;f[o+12>>2]=j;f[j+8>>2]=o;r=j}while(0);if(g){j=f[h+28>>2]|0;o=18352+(j<<2)|0;if((f[o>>2]|0)==(h|0)){f[o>>2]=r;if(!r){f[4513]=f[4513]&~(1<>2]|0)!=(h|0)&1)<<2)>>2]=r;if(!r){l=h;m=i;n=h;break}}f[r+24>>2]=g;j=h+16|0;o=f[j>>2]|0;if(o|0){f[r+16>>2]=o;f[o+24>>2]=r}o=f[j+4>>2]|0;if(o){f[r+20>>2]=o;f[o+24>>2]=r;l=h;m=i;n=h}else{l=h;m=i;n=h}}else{l=h;m=i;n=h}}else{l=b;m=a;n=b}while(0);if(n>>>0>=e>>>0)return;b=e+4|0;a=f[b>>2]|0;if(!(a&1))return;if(!(a&2)){if((f[4518]|0)==(e|0)){r=(f[4515]|0)+m|0;f[4515]=r;f[4518]=l;f[l+4>>2]=r|1;if((l|0)!=(f[4517]|0))return;f[4517]=0;f[4514]=0;return}if((f[4517]|0)==(e|0)){r=(f[4514]|0)+m|0;f[4514]=r;f[4517]=n;f[l+4>>2]=r|1;f[n+r>>2]=r;return}r=(a&-8)+m|0;s=a>>>3;do if(a>>>0<256){t=f[e+8>>2]|0;c=f[e+12>>2]|0;if((c|0)==(t|0)){f[4512]=f[4512]&~(1<>2]=c;f[c+8>>2]=t;break}}else{t=f[e+24>>2]|0;c=f[e+12>>2]|0;do if((c|0)==(e|0)){d=e+16|0;o=d+4|0;j=f[o>>2]|0;if(!j){p=f[d>>2]|0;if(!p){u=0;break}else{v=p;w=d}}else{v=j;w=o}while(1){o=v+20|0;j=f[o>>2]|0;if(j|0){v=j;w=o;continue}o=v+16|0;j=f[o>>2]|0;if(!j)break;else{v=j;w=o}}f[w>>2]=0;u=v}else{o=f[e+8>>2]|0;f[o+12>>2]=c;f[c+8>>2]=o;u=c}while(0);if(t|0){c=f[e+28>>2]|0;h=18352+(c<<2)|0;if((f[h>>2]|0)==(e|0)){f[h>>2]=u;if(!u){f[4513]=f[4513]&~(1<>2]|0)!=(e|0)&1)<<2)>>2]=u;if(!u)break}f[u+24>>2]=t;c=e+16|0;h=f[c>>2]|0;if(h|0){f[u+16>>2]=h;f[h+24>>2]=u}h=f[c+4>>2]|0;if(h|0){f[u+20>>2]=h;f[h+24>>2]=u}}}while(0);f[l+4>>2]=r|1;f[n+r>>2]=r;if((l|0)==(f[4517]|0)){f[4514]=r;return}else x=r}else{f[b>>2]=a&-2;f[l+4>>2]=m|1;f[n+m>>2]=m;x=m}m=x>>>3;if(x>>>0<256){n=18088+(m<<1<<2)|0;a=f[4512]|0;b=1<>2]|0;z=b}f[z>>2]=l;f[y+12>>2]=l;f[l+8>>2]=y;f[l+12>>2]=n;return}n=x>>>8;if(n)if(x>>>0>16777215)A=31;else{y=(n+1048320|0)>>>16&8;z=n<>>16&4;b=z<>>16&2;a=14-(n|y|z)+(b<>>15)|0;A=x>>>(a+7|0)&1|a<<1}else A=0;a=18352+(A<<2)|0;f[l+28>>2]=A;f[l+20>>2]=0;f[l+16>>2]=0;z=f[4513]|0;b=1<>>1)|0);n=f[a>>2]|0;while(1){if((f[n+4>>2]&-8|0)==(x|0)){B=73;break}C=n+16+(y>>>31<<2)|0;m=f[C>>2]|0;if(!m){B=72;break}else{y=y<<1;n=m}}if((B|0)==72){f[C>>2]=l;f[l+24>>2]=n;f[l+12>>2]=l;f[l+8>>2]=l;break}else if((B|0)==73){y=n+8|0;t=f[y>>2]|0;f[t+12>>2]=l;f[y>>2]=l;f[l+8>>2]=t;f[l+12>>2]=n;f[l+24>>2]=0;break}}else{f[4513]=z|b;f[a>>2]=l;f[l+24>>2]=a;f[l+12>>2]=l;f[l+8>>2]=l}while(0);l=(f[4520]|0)+-1|0;f[4520]=l;if(!l)D=18504;else return;while(1){l=f[D>>2]|0;if(!l)break;else D=l+8|0}f[4520]=-1;return}function xc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=Oa,F=Oa,G=Oa,H=0,I=0,J=0,K=0;d=b[c+11>>0]|0;e=d<<24>>24<0;g=e?f[c>>2]|0:c;i=e?f[c+4>>2]|0:d&255;if(i>>>0>3){d=g;e=i;j=i;while(1){k=X(h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24,1540483477)|0;e=(X(k>>>24^k,1540483477)|0)^(X(e,1540483477)|0);j=j+-4|0;if(j>>>0<=3)break;else d=d+4|0}d=i+-4|0;j=d&-4;l=d-j|0;m=g+(j+4)|0;o=e}else{l=i;m=g;o=i}switch(l|0){case 3:{p=h[m+2>>0]<<16^o;q=6;break}case 2:{p=o;q=6;break}case 1:{r=o;q=7;break}default:s=o}if((q|0)==6){r=h[m+1>>0]<<8^p;q=7}if((q|0)==7)s=X(r^h[m>>0],1540483477)|0;m=X(s>>>13^s,1540483477)|0;s=m>>>15^m;m=a+4|0;r=f[m>>2]|0;p=(r|0)==0;a:do if(!p){o=r+-1|0;l=(o&r|0)==0;if(!l)if(s>>>0>>0)t=s;else t=(s>>>0)%(r>>>0)|0;else t=s&o;e=f[(f[a>>2]|0)+(t<<2)>>2]|0;if((e|0)!=0?(j=f[e>>2]|0,(j|0)!=0):0){e=(i|0)==0;if(l){if(e){l=j;while(1){d=f[l+4>>2]|0;if(!((d|0)==(s|0)|(d&o|0)==(t|0))){u=t;break a}d=b[l+8+11>>0]|0;if(!((d<<24>>24<0?f[l+12>>2]|0:d&255)|0)){v=l;break}l=f[l>>2]|0;if(!l){u=t;break a}}w=v+20|0;return w|0}else x=j;b:while(1){l=f[x+4>>2]|0;if(!((l|0)==(s|0)|(l&o|0)==(t|0))){u=t;break a}l=x+8|0;d=b[l+11>>0]|0;k=d<<24>>24<0;y=d&255;do if(((k?f[x+12>>2]|0:y)|0)==(i|0)){d=f[l>>2]|0;if(k)if(!(Pk(d,g,i)|0)){v=x;q=63;break b}else break;if((b[g>>0]|0)==(d&255)<<24>>24){d=l;z=y;A=g;do{z=z+-1|0;d=d+1|0;if(!z){v=x;q=63;break b}A=A+1|0}while((b[d>>0]|0)==(b[A>>0]|0))}}while(0);x=f[x>>2]|0;if(!x){u=t;break a}}if((q|0)==63){w=v+20|0;return w|0}}if(e){o=j;while(1){y=f[o+4>>2]|0;if((y|0)!=(s|0)){if(y>>>0>>0)B=y;else B=(y>>>0)%(r>>>0)|0;if((B|0)!=(t|0)){u=t;break a}}y=b[o+8+11>>0]|0;if(!((y<<24>>24<0?f[o+12>>2]|0:y&255)|0)){v=o;break}o=f[o>>2]|0;if(!o){u=t;break a}}w=v+20|0;return w|0}else C=j;c:while(1){o=f[C+4>>2]|0;if((o|0)!=(s|0)){if(o>>>0>>0)D=o;else D=(o>>>0)%(r>>>0)|0;if((D|0)!=(t|0)){u=t;break a}}o=C+8|0;e=b[o+11>>0]|0;y=e<<24>>24<0;l=e&255;do if(((y?f[C+12>>2]|0:l)|0)==(i|0)){e=f[o>>2]|0;if(y)if(!(Pk(e,g,i)|0)){v=C;q=63;break c}else break;if((b[g>>0]|0)==(e&255)<<24>>24){e=o;k=l;A=g;do{k=k+-1|0;e=e+1|0;if(!k){v=C;q=63;break c}A=A+1|0}while((b[e>>0]|0)==(b[A>>0]|0))}}while(0);C=f[C>>2]|0;if(!C){u=t;break a}}if((q|0)==63){w=v+20|0;return w|0}}else u=t}else u=0;while(0);t=dn(24)|0;dj(t+8|0,c);f[t+20>>2]=0;f[t+4>>2]=s;f[t>>2]=0;c=a+12|0;E=$(((f[c>>2]|0)+1|0)>>>0);F=$(r>>>0);G=$(n[a+16>>2]);do if(p|$(G*F)>>0<3|(r+-1&r|0)!=0)&1;g=~~$(W($(E/G)))>>>0;Ph(a,C>>>0>>0?g:C);C=f[m>>2]|0;g=C+-1|0;if(!(g&C)){H=C;I=g&s;break}if(s>>>0>>0){H=C;I=s}else{H=C;I=(s>>>0)%(C>>>0)|0}}else{H=r;I=u}while(0);u=(f[a>>2]|0)+(I<<2)|0;I=f[u>>2]|0;if(!I){r=a+8|0;f[t>>2]=f[r>>2];f[r>>2]=t;f[u>>2]=r;r=f[t>>2]|0;if(r|0){u=f[r+4>>2]|0;r=H+-1|0;if(r&H)if(u>>>0>>0)J=u;else J=(u>>>0)%(H>>>0)|0;else J=u&r;K=(f[a>>2]|0)+(J<<2)|0;q=61}}else{f[t>>2]=f[I>>2];K=I;q=61}if((q|0)==61)f[K>>2]=t;f[c>>2]=(f[c>>2]|0)+1;v=t;w=v+20|0;return w|0}function yc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0.0,G=0.0,H=0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0,Q=0.0,R=0.0,S=0,T=0.0,U=0,V=0,W=0,X=0.0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0.0,da=0,ea=0.0;g=a+4|0;i=f[g>>2]|0;j=a+100|0;if(i>>>0<(f[j>>2]|0)>>>0){f[g>>2]=i+1;k=h[i>>0]|0;l=0}else{k=Di(a)|0;l=0}a:while(1){switch(k|0){case 46:{m=8;break a;break}case 48:break;default:{n=0;o=0;p=1.0;q=0.0;r=0;s=k;t=l;u=0;v=0;w=0;x=0;break a}}i=f[g>>2]|0;if(i>>>0<(f[j>>2]|0)>>>0){f[g>>2]=i+1;k=h[i>>0]|0;l=1;continue}else{k=Di(a)|0;l=1;continue}}if((m|0)==8){k=f[g>>2]|0;if(k>>>0<(f[j>>2]|0)>>>0){f[g>>2]=k+1;y=h[k>>0]|0}else y=Di(a)|0;if((y|0)==48){k=0;i=0;while(1){z=f[g>>2]|0;if(z>>>0<(f[j>>2]|0)>>>0){f[g>>2]=z+1;A=h[z>>0]|0}else A=Di(a)|0;z=Tn(k|0,i|0,-1,-1)|0;B=I;if((A|0)==48){k=z;i=B}else{n=1;o=0;p=1.0;q=0.0;r=0;s=A;t=1;u=0;v=0;w=z;x=B;break}}}else{n=1;o=0;p=1.0;q=0.0;r=0;s=y;t=l;u=0;v=0;w=0;x=0}}while(1){l=s+-48|0;y=s|32;if(l>>>0>=10){A=(s|0)==46;if(!(A|(y+-97|0)>>>0<6)){C=s;break}if(A)if(!n){D=1;E=o;F=p;G=q;H=r;J=t;K=v;L=u;M=v;N=u}else{C=46;break}else m=20}else m=20;if((m|0)==20){m=0;A=(s|0)>57?y+-87|0:l;do if(!((u|0)<0|(u|0)==0&v>>>0<8))if((u|0)<0|(u|0)==0&v>>>0<14){O=p*.0625;P=o;Q=O;R=q+O*+(A|0);S=r;break}else{l=(o|0)!=0|(A|0)==0;P=l?o:1;Q=p;R=l?q:q+p*.5;S=r;break}else{P=o;Q=p;R=q;S=A+(r<<4)|0}while(0);A=Tn(v|0,u|0,1,0)|0;D=n;E=P;F=Q;G=R;H=S;J=1;K=w;L=x;M=A;N=I}A=f[g>>2]|0;if(A>>>0<(f[j>>2]|0)>>>0){f[g>>2]=A+1;n=D;o=E;p=F;q=G;r=H;s=h[A>>0]|0;t=J;u=N;v=M;w=K;x=L;continue}else{n=D;o=E;p=F;q=G;r=H;s=Di(a)|0;t=J;u=N;v=M;w=K;x=L;continue}}do if(!t){L=(f[j>>2]|0)==0;if(!L)f[g>>2]=(f[g>>2]|0)+-1;if(e){if(!L)f[g>>2]=(f[g>>2]|0)+-1;if(!((n|0)==0|L))f[g>>2]=(f[g>>2]|0)+-1}else Rm(a,0);T=+(d|0)*0.0}else{L=(n|0)==0;K=L?v:w;M=L?u:x;if((u|0)<0|(u|0)==0&v>>>0<8){L=r;N=v;J=u;while(1){s=L<<4;H=N;N=Tn(N|0,J|0,1,0)|0;if(!((J|0)<0|(J|0)==0&H>>>0<7)){U=s;break}else{L=s;J=I}}}else U=r;if((C|32|0)==112){J=De(a,e)|0;L=I;if((J|0)==0&(L|0)==-2147483648){if(!e){Rm(a,0);T=0.0;break}if(!(f[j>>2]|0)){V=0;W=0}else{f[g>>2]=(f[g>>2]|0)+-1;V=0;W=0}}else{V=J;W=L}}else if(!(f[j>>2]|0)){V=0;W=0}else{f[g>>2]=(f[g>>2]|0)+-1;V=0;W=0}L=Rn(K|0,M|0,2)|0;J=Tn(L|0,I|0,-32,-1)|0;L=Tn(J|0,I|0,V|0,W|0)|0;J=I;if(!U){T=+(d|0)*0.0;break}N=0-c|0;s=((N|0)<0)<<31>>31;if((J|0)>(s|0)|(J|0)==(s|0)&L>>>0>N>>>0){N=ir()|0;f[N>>2]=34;T=+(d|0)*1797693134862315708145274.0e284*1797693134862315708145274.0e284;break}N=c+-106|0;s=((N|0)<0)<<31>>31;if((J|0)<(s|0)|(J|0)==(s|0)&L>>>0>>0){N=ir()|0;f[N>>2]=34;T=+(d|0)*2.2250738585072014e-308*2.2250738585072014e-308;break}if((U|0)>-1){G=q;N=U;s=L;H=J;while(1){E=!(G>=.5);o=N<<1|(E^1)&1;F=G+(E?G:G+-1.0);E=Tn(s|0,H|0,-1,-1)|0;D=I;if((o|0)>-1){G=F;N=o;s=E;H=D}else{X=F;Y=o;Z=E;_=D;break}}}else{X=q;Y=U;Z=L;_=J}H=((b|0)<0)<<31>>31;s=Vn(32,0,c|0,((c|0)<0)<<31>>31|0)|0;N=Tn(s|0,I|0,Z|0,_|0)|0;s=I;if((s|0)<(H|0)|(s|0)==(H|0)&N>>>0>>0)if((N|0)>0){$=N;m=59}else{aa=0;ba=84;m=61}else{$=b;m=59}if((m|0)==59)if(($|0)<53){aa=$;ba=84-$|0;m=61}else{ca=0.0;da=$;ea=+(d|0)}if((m|0)==61){G=+(d|0);ca=+Gq(+Wj(1.0,ba),G);da=aa;ea=G}N=(Y&1|0)==0&(X!=0.0&(da|0)<32);G=(N?0.0:X)*ea+(ca+ea*+((Y+(N&1)|0)>>>0))-ca;if(!(G!=0.0)){N=ir()|0;f[N>>2]=34}T=+Hq(G,Z)}while(0);return +T}function zc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;g=u;u=u+16|0;h=g+4|0;i=g;if(!(oh(a,d)|0)){j=0;u=g;return j|0}d=a+84|0;k=f[d>>2]|0;l=a+88|0;m=f[l>>2]|0;if((m|0)!=(k|0))f[l>>2]=m+(~((m+-4-k|0)>>>2)<<2);f[d>>2]=0;f[l>>2]=0;f[a+92>>2]=0;if(k|0)br(k);k=a+72|0;l=f[k>>2]|0;d=a+76|0;if((f[d>>2]|0)!=(l|0))f[d>>2]=l;f[k>>2]=0;f[d>>2]=0;f[a+80>>2]=0;if(l|0)br(l);l=a+64|0;d=f[l>>2]|0;if((f[d+4>>2]|0)!=(f[d>>2]|0)){k=a+12|0;m=e+84|0;n=e+68|0;o=c+96|0;p=a+24|0;q=0;r=d;do{f[i>>2]=(q>>>0)/3|0;f[h>>2]=f[i>>2];d=Rj(r,h)|0;r=f[l>>2]|0;do if(!d){s=f[(f[r+12>>2]|0)+(q<<2)>>2]|0;if((s|0)==-1){t=(f[a>>2]|0)+(q>>>5<<2)|0;f[t>>2]=f[t>>2]|1<<(q&31);t=q+1|0;v=((t>>>0)%3|0|0)==0?q+-2|0:t;if((v|0)==-1)w=-1;else w=f[(f[r>>2]|0)+(v<<2)>>2]|0;v=(f[k>>2]|0)+(w>>>5<<2)|0;f[v>>2]=f[v>>2]|1<<(w&31);v=(((q>>>0)%3|0|0)==0?2:-1)+q|0;if((v|0)==-1)x=-1;else x=f[(f[r>>2]|0)+(v<<2)>>2]|0;v=(f[k>>2]|0)+(x>>>5<<2)|0;f[v>>2]=f[v>>2]|1<<(x&31);break}if(s>>>0>=q>>>0){v=q+1|0;t=((v>>>0)%3|0|0)==0?q+-2|0:v;y=s+(((s>>>0)%3|0|0)==0?2:-1)|0;z=(t|0)==-1;if(!(b[m>>0]|0)){if(z)A=-1;else A=f[(f[o>>2]|0)+(((t|0)/3|0)*12|0)+(((t|0)%3|0)<<2)>>2]|0;B=(y|0)==-1;if(B)C=-1;else C=f[(f[o>>2]|0)+(((y|0)/3|0)*12|0)+(((y|0)%3|0)<<2)>>2]|0;D=f[n>>2]|0;if((f[D+(A<<2)>>2]|0)==(f[D+(C<<2)>>2]|0)){E=t+1|0;if(z)F=-1;else F=((E>>>0)%3|0|0)==0?t+-2|0:E;do if(!B)if(!((y>>>0)%3|0)){G=y+2|0;break}else{G=y+-1|0;break}else G=-1;while(0);if((F|0)==-1)H=-1;else H=f[(f[o>>2]|0)+(((F|0)/3|0)*12|0)+(((F|0)%3|0)<<2)>>2]|0;if((G|0)==-1)I=-1;else I=f[(f[o>>2]|0)+(((G|0)/3|0)*12|0)+(((G|0)%3|0)<<2)>>2]|0;if((f[D+(H<<2)>>2]|0)==(f[D+(I<<2)>>2]|0))break}}else{if(z)J=-1;else J=f[(f[o>>2]|0)+(((t|0)/3|0)*12|0)+(((t|0)%3|0)<<2)>>2]|0;B=(y|0)==-1;if(B)K=-1;else K=f[(f[o>>2]|0)+(((y|0)/3|0)*12|0)+(((y|0)%3|0)<<2)>>2]|0;if((J|0)==(K|0)){E=t+1|0;if(z)L=-1;else L=((E>>>0)%3|0|0)==0?t+-2|0:E;do if(!B)if(!((y>>>0)%3|0)){M=y+2|0;break}else{M=y+-1|0;break}else M=-1;while(0);if((L|0)==-1)N=-1;else N=f[(f[o>>2]|0)+(((L|0)/3|0)*12|0)+(((L|0)%3|0)<<2)>>2]|0;if((M|0)==-1)O=-1;else O=f[(f[o>>2]|0)+(((M|0)/3|0)*12|0)+(((M|0)%3|0)<<2)>>2]|0;if((N|0)==(O|0))break}}b[p>>0]=0;y=f[a>>2]|0;B=y+(q>>>5<<2)|0;f[B>>2]=f[B>>2]|1<<(q&31);B=y+(s>>>5<<2)|0;f[B>>2]=f[B>>2]|1<<(s&31);B=((v>>>0)%3|0|0)==0?q+-2|0:v;if((B|0)==-1)P=-1;else P=f[(f[r>>2]|0)+(B<<2)>>2]|0;B=(f[k>>2]|0)+(P>>>5<<2)|0;f[B>>2]=f[B>>2]|1<<(P&31);B=(((q>>>0)%3|0|0)==0?2:-1)+q|0;if((B|0)==-1)Q=-1;else Q=f[(f[r>>2]|0)+(B<<2)>>2]|0;B=(f[k>>2]|0)+(Q>>>5<<2)|0;f[B>>2]=f[B>>2]|1<<(Q&31);B=s+1|0;y=((B>>>0)%3|0|0)==0?s+-2|0:B;if((y|0)==-1)R=-1;else R=f[(f[r>>2]|0)+(y<<2)>>2]|0;y=(f[k>>2]|0)+(R>>>5<<2)|0;f[y>>2]=f[y>>2]|1<<(R&31);y=(((s>>>0)%3|0|0)==0?2:-1)+s|0;if((y|0)==-1)S=-1;else S=f[(f[r>>2]|0)+(y<<2)>>2]|0;y=(f[k>>2]|0)+(S>>>5<<2)|0;f[y>>2]=f[y>>2]|1<<(S&31)}}while(0);q=q+1|0}while(q>>>0<(f[r+4>>2]|0)-(f[r>>2]|0)>>2>>>0)}if((c|0)!=0&(e|0)!=0){Kc(a,c,e);j=1;u=g;return j|0}else{gd(a,0,0);j=1;u=g;return j|0}return 0}function Ac(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;d=u;u=u+32|0;e=d+12|0;g=d+8|0;h=d+4|0;i=d;j=a+8|0;a:do if(f[j>>2]|0?(k=f[a>>2]|0,l=a+4|0,f[a>>2]=l,f[(f[l>>2]|0)+8>>2]=0,f[l>>2]=0,f[j>>2]=0,m=f[k+4>>2]|0,n=(m|0)==0?k:m,n|0):0){m=a+4|0;k=n;n=f[b>>2]|0;while(1){if((n|0)==(f[c>>2]|0))break;o=k+16|0;f[o>>2]=f[n+16>>2];if((k|0)!=(n|0)){f[h>>2]=f[n+20>>2];f[i>>2]=n+24;f[g>>2]=f[h>>2];f[e>>2]=f[i>>2];Hc(k+20|0,g,e)}p=k+8|0;q=f[p>>2]|0;do if(q){r=f[q>>2]|0;if((r|0)==(k|0)){f[q>>2]=0;s=f[q+4>>2]|0;if(!s){t=q;break}else v=s;while(1){s=f[v>>2]|0;if(s|0){v=s;continue}s=f[v+4>>2]|0;if(!s)break;else v=s}t=v;break}else{f[q+4>>2]=0;if(!r){t=q;break}else w=r;while(1){s=f[w>>2]|0;if(s|0){w=s;continue}s=f[w+4>>2]|0;if(!s)break;else w=s}t=w;break}}else t=0;while(0);q=f[l>>2]|0;do if(q){r=f[o>>2]|0;s=q;while(1){if((r|0)<(f[s+16>>2]|0)){x=f[s>>2]|0;if(!x){y=22;break}else z=x}else{A=s+4|0;x=f[A>>2]|0;if(!x){y=25;break}else z=x}s=z}if((y|0)==22){y=0;B=s;C=s;break}else if((y|0)==25){y=0;B=s;C=A;break}}else{B=l;C=l}while(0);f[k>>2]=0;f[k+4>>2]=0;f[p>>2]=B;f[C>>2]=k;q=f[f[a>>2]>>2]|0;if(!q)D=k;else{f[a>>2]=q;D=f[C>>2]|0}Ae(f[m>>2]|0,D);f[j>>2]=(f[j>>2]|0)+1;q=f[n+4>>2]|0;if(!q){o=n+8|0;r=f[o>>2]|0;if((f[r>>2]|0)==(n|0))E=r;else{r=o;do{o=f[r>>2]|0;r=o+8|0;x=f[r>>2]|0}while((f[x>>2]|0)!=(o|0));E=x}}else{r=q;while(1){p=f[r>>2]|0;if(!p)break;else r=p}E=r}f[b>>2]=E;if(!t)break a;else{k=t;n=E}}n=f[k+8>>2]|0;if(!n)F=k;else{m=n;while(1){n=f[m+8>>2]|0;if(!n)break;else m=n}F=m}Dj(a,F)}while(0);F=f[b>>2]|0;E=f[c>>2]|0;if((F|0)==(E|0)){u=d;return}c=a+4|0;t=a+4|0;D=F;while(1){tg(e,a,D+16|0);F=f[c>>2]|0;do if(F){C=f[e>>2]|0;B=f[C+16>>2]|0;A=F;while(1){if((B|0)<(f[A+16>>2]|0)){z=f[A>>2]|0;if(!z){y=43;break}else G=z}else{H=A+4|0;z=f[H>>2]|0;if(!z){y=46;break}else G=z}A=G}if((y|0)==43){y=0;I=A;J=A;K=C;break}else if((y|0)==46){y=0;I=A;J=H;K=C;break}}else{I=c;J=c;K=f[e>>2]|0}while(0);f[K>>2]=0;f[K+4>>2]=0;f[K+8>>2]=I;f[J>>2]=K;F=f[f[a>>2]>>2]|0;if(!F)L=K;else{f[a>>2]=F;L=f[J>>2]|0}Ae(f[t>>2]|0,L);f[j>>2]=(f[j>>2]|0)+1;F=f[D+4>>2]|0;if(!F){m=D+8|0;B=f[m>>2]|0;if((f[B>>2]|0)==(D|0))M=B;else{B=m;do{m=f[B>>2]|0;B=m+8|0;r=f[B>>2]|0}while((f[r>>2]|0)!=(m|0));M=r}}else{B=F;while(1){r=f[B>>2]|0;if(!r)break;else B=r}M=B}f[b>>2]=M;if((M|0)==(E|0))break;else D=M}u=d;return}function Bc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;g=a+8|0;Ah(g,b,d,e);d=e>>>0>1073741823?-1:e<<2;h=_q(d)|0;hj(h|0,0,d|0)|0;d=f[a+48>>2]|0;i=f[a+56>>2]|0;j=f[i>>2]|0;k=(f[i+4>>2]|0)-j|0;l=k>>2;a:do if((k|0)>4){m=f[a+52>>2]|0;n=a+16|0;o=a+32|0;p=a+12|0;q=a+28|0;r=a+20|0;s=a+24|0;t=d+12|0;u=(e|0)>0;v=j;w=l;while(1){x=w;w=w+-1|0;if(l>>>0<=w>>>0)break;y=f[v+(w<<2)>>2]|0;z=X(w,e)|0;if((y|0)!=-1?(A=f[(f[t>>2]|0)+(y<<2)>>2]|0,(A|0)!=-1):0){y=f[d>>2]|0;B=f[m>>2]|0;C=f[B+(f[y+(A<<2)>>2]<<2)>>2]|0;D=A+1|0;E=((D>>>0)%3|0|0)==0?A+-2|0:D;if((E|0)==-1)F=-1;else F=f[y+(E<<2)>>2]|0;E=f[B+(F<<2)>>2]|0;D=(((A>>>0)%3|0|0)==0?2:-1)+A|0;if((D|0)==-1)G=-1;else G=f[y+(D<<2)>>2]|0;D=f[B+(G<<2)>>2]|0;if((C|0)<(w|0)&(E|0)<(w|0)&(D|0)<(w|0)){B=X(C,e)|0;C=X(E,e)|0;E=X(D,e)|0;if(u){D=0;do{f[h+(D<<2)>>2]=(f[b+(D+E<<2)>>2]|0)+(f[b+(D+C<<2)>>2]|0)-(f[b+(D+B<<2)>>2]|0);D=D+1|0}while((D|0)!=(e|0))}D=b+(z<<2)|0;B=c+(z<<2)|0;C=f[g>>2]|0;if((C|0)>0){E=0;y=h;A=C;while(1){if((A|0)>0){C=0;do{H=f[y+(C<<2)>>2]|0;I=f[n>>2]|0;if((H|0)>(I|0)){J=f[o>>2]|0;f[J+(C<<2)>>2]=I;K=J}else{J=f[p>>2]|0;I=f[o>>2]|0;f[I+(C<<2)>>2]=(H|0)<(J|0)?J:H;K=I}C=C+1|0}while((C|0)<(f[g>>2]|0));L=K}else L=f[o>>2]|0;C=(f[D+(E<<2)>>2]|0)-(f[L+(E<<2)>>2]|0)|0;I=B+(E<<2)|0;f[I>>2]=C;if((C|0)>=(f[q>>2]|0)){if((C|0)>(f[s>>2]|0)){M=C-(f[r>>2]|0)|0;N=42}}else{M=(f[r>>2]|0)+C|0;N=42}if((N|0)==42){N=0;f[I>>2]=M}E=E+1|0;A=f[g>>2]|0;if((E|0)>=(A|0))break;else y=L}}}else N=16}else N=16;if((N|0)==16?(N=0,y=b+(z<<2)|0,A=c+(z<<2)|0,E=f[g>>2]|0,(E|0)>0):0){B=0;D=b+((X(x+-2|0,e)|0)<<2)|0;I=E;while(1){if((I|0)>0){E=0;do{C=f[D+(E<<2)>>2]|0;H=f[n>>2]|0;if((C|0)>(H|0)){J=f[o>>2]|0;f[J+(E<<2)>>2]=H;O=J}else{J=f[p>>2]|0;H=f[o>>2]|0;f[H+(E<<2)>>2]=(C|0)<(J|0)?J:C;O=H}E=E+1|0}while((E|0)<(f[g>>2]|0));P=O}else P=f[o>>2]|0;E=(f[y+(B<<2)>>2]|0)-(f[P+(B<<2)>>2]|0)|0;H=A+(B<<2)|0;f[H>>2]=E;if((E|0)>=(f[q>>2]|0)){if((E|0)>(f[s>>2]|0)){Q=E-(f[r>>2]|0)|0;N=29}}else{Q=(f[r>>2]|0)+E|0;N=29}if((N|0)==29){N=0;f[H>>2]=Q}B=B+1|0;I=f[g>>2]|0;if((B|0)>=(I|0))break;else D=P}}if((x|0)<=2)break a}mq(i)}while(0);if((e|0)>0)hj(h|0,0,e<<2|0)|0;e=f[g>>2]|0;if((e|0)<=0){$q(h);return 1}i=a+16|0;P=a+32|0;Q=a+12|0;O=a+28|0;L=a+20|0;M=a+24|0;a=0;K=h;G=e;while(1){if((G|0)>0){e=0;do{F=f[K+(e<<2)>>2]|0;d=f[i>>2]|0;if((F|0)>(d|0)){l=f[P>>2]|0;f[l+(e<<2)>>2]=d;R=l}else{l=f[Q>>2]|0;d=f[P>>2]|0;f[d+(e<<2)>>2]=(F|0)<(l|0)?l:F;R=d}e=e+1|0}while((e|0)<(f[g>>2]|0));S=R}else S=f[P>>2]|0;e=(f[b+(a<<2)>>2]|0)-(f[S+(a<<2)>>2]|0)|0;d=c+(a<<2)|0;f[d>>2]=e;if((e|0)>=(f[O>>2]|0)){if((e|0)>(f[M>>2]|0)){T=e-(f[L>>2]|0)|0;N=56}}else{T=(f[L>>2]|0)+e|0;N=56}if((N|0)==56){N=0;f[d>>2]=T}a=a+1|0;G=f[g>>2]|0;if((a|0)>=(G|0))break;else K=S}$q(h);return 1}function Cc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;g=a+8|0;Ah(g,b,d,e);d=e>>>0>1073741823?-1:e<<2;h=_q(d)|0;hj(h|0,0,d|0)|0;d=f[a+48>>2]|0;i=f[a+56>>2]|0;j=f[i>>2]|0;k=(f[i+4>>2]|0)-j|0;l=k>>2;a:do if((k|0)>4){m=f[a+52>>2]|0;n=a+16|0;o=a+32|0;p=a+12|0;q=a+28|0;r=a+20|0;s=a+24|0;t=d+64|0;u=d+28|0;v=(e|0)>0;w=j;x=l;while(1){y=x;x=x+-1|0;if(l>>>0<=x>>>0)break;z=f[w+(x<<2)>>2]|0;A=X(x,e)|0;if((((z|0)!=-1?(f[(f[d>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)==0:0)?(B=f[(f[(f[t>>2]|0)+12>>2]|0)+(z<<2)>>2]|0,(B|0)!=-1):0)?(z=f[u>>2]|0,C=f[m>>2]|0,D=f[C+(f[z+(B<<2)>>2]<<2)>>2]|0,E=B+1|0,F=f[C+(f[z+((((E>>>0)%3|0|0)==0?B+-2|0:E)<<2)>>2]<<2)>>2]|0,E=f[C+(f[z+((((B>>>0)%3|0|0)==0?2:-1)+B<<2)>>2]<<2)>>2]|0,(D|0)<(x|0)&(F|0)<(x|0)&(E|0)<(x|0)):0){B=X(D,e)|0;D=X(F,e)|0;F=X(E,e)|0;if(v){E=0;do{f[h+(E<<2)>>2]=(f[b+(E+F<<2)>>2]|0)+(f[b+(E+D<<2)>>2]|0)-(f[b+(E+B<<2)>>2]|0);E=E+1|0}while((E|0)!=(e|0))}E=b+(A<<2)|0;B=c+(A<<2)|0;D=f[g>>2]|0;if((D|0)>0){F=0;z=h;C=D;while(1){if((C|0)>0){D=0;do{G=f[z+(D<<2)>>2]|0;H=f[n>>2]|0;if((G|0)>(H|0)){I=f[o>>2]|0;f[I+(D<<2)>>2]=H;J=I}else{I=f[p>>2]|0;H=f[o>>2]|0;f[H+(D<<2)>>2]=(G|0)<(I|0)?I:G;J=H}D=D+1|0}while((D|0)<(f[g>>2]|0));K=J}else K=f[o>>2]|0;D=(f[E+(F<<2)>>2]|0)-(f[K+(F<<2)>>2]|0)|0;H=B+(F<<2)|0;f[H>>2]=D;if((D|0)>=(f[q>>2]|0)){if((D|0)>(f[s>>2]|0)){L=D-(f[r>>2]|0)|0;M=39}}else{L=(f[r>>2]|0)+D|0;M=39}if((M|0)==39){M=0;f[H>>2]=L}F=F+1|0;C=f[g>>2]|0;if((F|0)>=(C|0))break;else z=K}}}else M=13;if((M|0)==13?(M=0,z=b+(A<<2)|0,C=c+(A<<2)|0,F=f[g>>2]|0,(F|0)>0):0){B=0;E=b+((X(y+-2|0,e)|0)<<2)|0;H=F;while(1){if((H|0)>0){F=0;do{D=f[E+(F<<2)>>2]|0;G=f[n>>2]|0;if((D|0)>(G|0)){I=f[o>>2]|0;f[I+(F<<2)>>2]=G;N=I}else{I=f[p>>2]|0;G=f[o>>2]|0;f[G+(F<<2)>>2]=(D|0)<(I|0)?I:D;N=G}F=F+1|0}while((F|0)<(f[g>>2]|0));O=N}else O=f[o>>2]|0;F=(f[z+(B<<2)>>2]|0)-(f[O+(B<<2)>>2]|0)|0;G=C+(B<<2)|0;f[G>>2]=F;if((F|0)>=(f[q>>2]|0)){if((F|0)>(f[s>>2]|0)){P=F-(f[r>>2]|0)|0;M=26}}else{P=(f[r>>2]|0)+F|0;M=26}if((M|0)==26){M=0;f[G>>2]=P}B=B+1|0;H=f[g>>2]|0;if((B|0)>=(H|0))break;else E=O}}if((y|0)<=2)break a}mq(i)}while(0);if((e|0)>0)hj(h|0,0,e<<2|0)|0;e=f[g>>2]|0;if((e|0)<=0){$q(h);return 1}i=a+16|0;O=a+32|0;P=a+12|0;N=a+28|0;K=a+20|0;L=a+24|0;a=0;J=h;d=e;while(1){if((d|0)>0){e=0;do{l=f[J+(e<<2)>>2]|0;j=f[i>>2]|0;if((l|0)>(j|0)){k=f[O>>2]|0;f[k+(e<<2)>>2]=j;Q=k}else{k=f[P>>2]|0;j=f[O>>2]|0;f[j+(e<<2)>>2]=(l|0)<(k|0)?k:l;Q=j}e=e+1|0}while((e|0)<(f[g>>2]|0));R=Q}else R=f[O>>2]|0;e=(f[b+(a<<2)>>2]|0)-(f[R+(a<<2)>>2]|0)|0;j=c+(a<<2)|0;f[j>>2]=e;if((e|0)>=(f[N>>2]|0)){if((e|0)>(f[L>>2]|0)){S=e-(f[K>>2]|0)|0;M=53}}else{S=(f[K>>2]|0)+e|0;M=53}if((M|0)==53){M=0;f[j>>2]=S}a=a+1|0;d=f[g>>2]|0;if((a|0)>=(d|0))break;else J=R}$q(h);return 1}function Dc(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;h=u;u=u+48|0;i=h+28|0;j=h+24|0;k=h;l=h+12|0;m=h+40|0;if((c|0)<0){n=0;u=h;return n|0}if(!c){n=1;u=h;return n|0}o=(d|0)>1;p=o?d:1;f[k>>2]=0;d=k+4|0;f[d>>2]=0;f[k+8>>2]=0;$j(k,c);q=k+8|0;if(o){o=0;r=0;while(1){s=1;t=f[a+(r<<2)>>2]|0;do{v=f[a+(s+r<<2)>>2]|0;t=t>>>0>>0?v:t;s=s+1|0}while((s|0)!=(p|0));s=(_(t|0)|0)^31;v=t>>>0>o>>>0?t:o;w=(t|0)==0?1:s+1|0;f[i>>2]=w;s=f[d>>2]|0;if(s>>>0<(f[q>>2]|0)>>>0){f[s>>2]=w;f[d>>2]=s+4}else Ci(k,i);r=r+p|0;if((r|0)>=(c|0)){x=v;break}else o=v}}else{o=0;r=0;while(1){v=f[a+(o<<2)>>2]|0;s=(_(v|0)|0)^31;w=v>>>0>r>>>0?v:r;y=(v|0)==0?1:s+1|0;f[i>>2]=y;s=f[d>>2]|0;if(s>>>0<(f[q>>2]|0)>>>0){f[s>>2]=y;f[d>>2]=s+4}else Ci(k,i);o=o+p|0;if((o|0)>=(c|0)){x=w;break}else r=w}}f[l>>2]=0;r=l+4|0;f[r>>2]=0;f[l+8>>2]=0;o=f[k>>2]|0;q=(f[d>>2]|0)-o|0;w=q>>2;if(w){if(w>>>0>1073741823)mq(l);s=dn(q)|0;f[r>>2]=s;f[l>>2]=s;f[l+8>>2]=s+(w<<2);w=s;if((q|0)>0){y=s+(q>>>2<<2)|0;Rg(s|0,o|0,q|0)|0;f[r>>2]=y;q=y-w>>2;if((y|0)==(s|0)){z=q;A=s;B=0;C=0}else{y=0;o=0;v=0;while(1){D=Tn(o|0,v|0,f[s+(y<<2)>>2]|0,0)|0;E=I;y=y+1|0;if(y>>>0>=q>>>0){z=q;A=s;B=D;C=E;break}else{o=D;v=E}}}}else{F=w;G=18}}else{F=0;G=18}if((G|0)==18){z=0;A=F;B=0;C=0}F=rg(A,z,32,i)|0;z=I;A=f[i>>2]<<3;w=Rn(A|0,((A|0)<0)<<31>>31|0,1)|0;A=I;v=on(B|0,C|0,p|0,0)|0;C=Tn(F|0,z|0,v|0,I|0)|0;v=Tn(C|0,I|0,w|0,A|0)|0;A=I;w=f[l>>2]|0;if(w|0){l=f[r>>2]|0;if((l|0)!=(w|0))f[r>>2]=l+(~((l+-4-w|0)>>>2)<<2);br(w)}w=rg(a,c,x,i)|0;l=f[i>>2]|0;r=((x-l|0)/64|0)+l<<3;C=l<<3;z=Tn(w|0,I|0,C|0,((C|0)<0)<<31>>31|0)|0;C=Tn(z|0,I|0,r|0,((r|0)<0)<<31>>31|0)|0;r=I;z=(_((x>>>0>1?x:1)|0)|0)^30;if(e){f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;w=dn(32)|0;f[i>>2]=w;f[i+8>>2]=-2147483616;f[i+4>>2]=22;F=w;B=13044;o=F+22|0;do{b[F>>0]=b[B>>0]|0;F=F+1|0;B=B+1|0}while((F|0)<(o|0));b[w+22>>0]=0;w=(sh(e,i)|0)==0;if((b[i+11>>0]|0)<0)br(f[i>>2]|0);if(!w){f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;w=dn(32)|0;f[i>>2]=w;f[i+8>>2]=-2147483616;f[i+4>>2]=22;F=w;B=13044;o=F+22|0;do{b[F>>0]=b[B>>0]|0;F=F+1|0;B=B+1|0}while((F|0)<(o|0));b[w+22>>0]=0;w=Ck(e,i)|0;if((b[i+11>>0]|0)<0)br(f[i>>2]|0);H=w}else G=32}else G=32;if((G|0)==32)H=z>>>0<18&((A|0)>(r|0)|(A|0)==(r|0)&v>>>0>=C>>>0)&1;b[m>>0]=H;C=g+16|0;v=f[C+4>>2]|0;if(!((v|0)>0|(v|0)==0&(f[C>>2]|0)>>>0>0)){f[j>>2]=f[g+4>>2];f[i>>2]=f[j>>2];ye(g,i,m,m+1|0)|0}switch(H|0){case 0:{J=md(a,c,p,k,g)|0;break}case 1:{J=Nc(a,c,x,l,e,g)|0;break}default:J=0}g=f[k>>2]|0;if(g|0){k=f[d>>2]|0;if((k|0)!=(g|0))f[d>>2]=k+(~((k+-4-g|0)>>>2)<<2);br(g)}n=J;u=h;return n|0}function Ec(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;if((b|0)<0)return;c=a+12|0;d=f[c>>2]|0;e=f[a+8>>2]|0;g=e;h=d;if(d-e>>2>>>0<=b>>>0)return;e=g+(b<<2)|0;d=f[(f[e>>2]|0)+56>>2]|0;i=f[(f[g+(b<<2)>>2]|0)+60>>2]|0;g=e+4|0;if((g|0)!=(h|0)){j=g;g=e;do{k=f[j>>2]|0;f[j>>2]=0;l=f[g>>2]|0;f[g>>2]=k;if(l|0){k=l+88|0;m=f[k>>2]|0;f[k>>2]=0;if(m|0){k=f[m+8>>2]|0;if(k|0){n=m+12|0;if((f[n>>2]|0)!=(k|0))f[n>>2]=k;br(k)}br(m)}m=f[l+68>>2]|0;if(m|0){k=l+72|0;n=f[k>>2]|0;if((n|0)!=(m|0))f[k>>2]=n+(~((n+-4-m|0)>>>2)<<2);br(m)}m=l+64|0;n=f[m>>2]|0;f[m>>2]=0;if(n|0){m=f[n>>2]|0;if(m|0){k=n+4|0;if((f[k>>2]|0)!=(m|0))f[k>>2]=m;br(m)}br(n)}br(l)}j=j+4|0;g=g+4|0}while((j|0)!=(h|0));j=f[c>>2]|0;if((j|0)!=(g|0)){o=g;p=j;q=24}}else{o=e;p=h;q=24}if((q|0)==24){q=p;do{p=q+-4|0;f[c>>2]=p;h=f[p>>2]|0;f[p>>2]=0;if(h|0){p=h+88|0;e=f[p>>2]|0;f[p>>2]=0;if(e|0){p=f[e+8>>2]|0;if(p|0){j=e+12|0;if((f[j>>2]|0)!=(p|0))f[j>>2]=p;br(p)}br(e)}e=f[h+68>>2]|0;if(e|0){p=h+72|0;j=f[p>>2]|0;if((j|0)!=(e|0))f[p>>2]=j+(~((j+-4-e|0)>>>2)<<2);br(e)}e=h+64|0;j=f[e>>2]|0;f[e>>2]=0;if(j|0){e=f[j>>2]|0;if(e|0){p=j+4|0;if((f[p>>2]|0)!=(e|0))f[p>>2]=e;br(e)}br(j)}br(h)}q=f[c>>2]|0}while((q|0)!=(o|0))}o=f[a+4>>2]|0;a:do if(o|0){q=o+44|0;c=f[q>>2]|0;h=f[o+40>>2]|0;while(1){if((h|0)==(c|0))break a;r=h+4|0;if((f[(f[h>>2]|0)+40>>2]|0)==(i|0))break;else h=r}if((r|0)!=(c|0)){j=r;e=h;do{p=f[j>>2]|0;f[j>>2]=0;g=f[e>>2]|0;f[e>>2]=p;if(g|0){Qi(g);br(g)}j=j+4|0;e=e+4|0}while((j|0)!=(c|0));j=f[q>>2]|0;if((j|0)==(e|0))break;else{s=e;t=j}}else{s=h;t=c}j=t;do{g=j+-4|0;f[q>>2]=g;p=f[g>>2]|0;f[g>>2]=0;if(p|0){Qi(p);br(p)}j=f[q>>2]|0}while((j|0)!=(s|0))}while(0);b:do if((d|0)<5){s=f[a+20+(d*12|0)>>2]|0;t=a+20+(d*12|0)+4|0;r=f[t>>2]|0;i=r;c:do if((s|0)==(r|0))u=s;else{o=s;while(1){if((f[o>>2]|0)==(b|0)){u=o;break c}o=o+4|0;if((o|0)==(r|0))break b}}while(0);if((u|0)!=(r|0)){s=u+4|0;o=i-s|0;j=o>>2;if(!j)v=r;else{Xl(u|0,s|0,o|0)|0;v=f[t>>2]|0}o=u+(j<<2)|0;if((v|0)!=(o|0))f[t>>2]=v+(~((v+-4-o|0)>>>2)<<2)}}while(0);v=f[a+24>>2]|0;u=f[a+20>>2]|0;d=u;if((v|0)!=(u|0)){o=v-u>>2;u=0;do{v=d+(u<<2)|0;j=f[v>>2]|0;if((j|0)>(b|0))f[v>>2]=j+-1;u=u+1|0}while(u>>>0>>0)}o=f[a+36>>2]|0;u=f[a+32>>2]|0;d=u;if((o|0)!=(u|0)){j=o-u>>2;u=0;do{o=d+(u<<2)|0;v=f[o>>2]|0;if((v|0)>(b|0))f[o>>2]=v+-1;u=u+1|0}while(u>>>0>>0)}j=f[a+48>>2]|0;u=f[a+44>>2]|0;d=u;if((j|0)!=(u|0)){v=j-u>>2;u=0;do{j=d+(u<<2)|0;o=f[j>>2]|0;if((o|0)>(b|0))f[j>>2]=o+-1;u=u+1|0}while(u>>>0>>0)}v=f[a+60>>2]|0;u=f[a+56>>2]|0;d=u;if((v|0)!=(u|0)){o=v-u>>2;u=0;do{v=d+(u<<2)|0;j=f[v>>2]|0;if((j|0)>(b|0))f[v>>2]=j+-1;u=u+1|0}while(u>>>0>>0)}o=f[a+72>>2]|0;u=f[a+68>>2]|0;a=u;if((o|0)==(u|0))return;d=o-u>>2;u=0;do{o=a+(u<<2)|0;j=f[o>>2]|0;if((j|0)>(b|0))f[o>>2]=j+-1;u=u+1|0}while(u>>>0>>0);return}function Fc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;d=u;u=u+32|0;e=d+16|0;g=d;h=c+4|0;i=f[(f[h>>2]|0)+48>>2]|0;j=c+12|0;c=f[j>>2]|0;k=dn(32)|0;f[e>>2]=k;f[e+8>>2]=-2147483616;f[e+4>>2]=17;l=k;m=12932;n=l+17|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[k+17>>0]=0;k=i+16|0;o=f[k>>2]|0;if(o){p=k;q=o;a:while(1){o=q;while(1){if((f[o+16>>2]|0)>=(c|0))break;r=f[o+4>>2]|0;if(!r){s=p;break a}else o=r}q=f[o>>2]|0;if(!q){s=o;break}else p=o}if(((s|0)!=(k|0)?(c|0)>=(f[s+16>>2]|0):0)?(c=s+20|0,(sh(c,e)|0)!=0):0)t=yk(c,e,-1)|0;else v=10}else v=10;if((v|0)==10)t=yk(i,e,-1)|0;if((b[e+11>>0]|0)<0)br(f[e>>2]|0);i=(1<>2]=-1;f[e+4>>2]=-1;f[e+8>>2]=-1;f[e+12>>2]=-1;if(i&1|0?(t=(_(i|0)|0)^31,(t+-1|0)>>>0<=28):0){f[e>>2]=t+1;i=2<>2]=i+-1;t=i+-2|0;f[e+8>>2]=t;f[e+12>>2]=(t|0)/2|0}t=Ki(f[j>>2]|0,f[h>>2]|0)|0;i=f[(f[h>>2]|0)+48>>2]|0;c=f[j>>2]|0;s=dn(32)|0;f[g>>2]=s;f[g+8>>2]=-2147483616;f[g+4>>2]=17;l=s;m=12804;n=l+17|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[s+17>>0]=0;s=i+16|0;m=f[s>>2]|0;if(m){l=s;n=m;b:while(1){m=n;while(1){if((f[m+16>>2]|0)>=(c|0))break;k=f[m+4>>2]|0;if(!k){w=l;break b}else m=k}n=f[m>>2]|0;if(!n){w=m;break}else l=m}if(((w|0)!=(s|0)?(c|0)>=(f[w+16>>2]|0):0)?(c=w+20|0,(sh(c,g)|0)!=0):0)x=yk(c,g,t)|0;else v=25}else v=25;if((v|0)==25)x=yk(i,g,t)|0;if((b[g+11>>0]|0)<0)br(f[g>>2]|0);switch(x|0){case 6:{x=f[j>>2]|0;t=f[h>>2]|0;i=f[(f[(f[t+4>>2]|0)+8>>2]|0)+(x<<2)>>2]|0;do if((Qa[f[(f[t>>2]|0)+8>>2]&127](t)|0)==1){rf(g,t,6,x,e,514);c=f[g>>2]|0;if(!c){f[g>>2]=0;y=g;v=34;break}else{z=g;A=c;break}}else{y=g;v=34}while(0);if((v|0)==34){x=dn(24)|0;f[x+4>>2]=i;i=x+8|0;f[i>>2]=f[e>>2];f[i+4>>2]=f[e+4>>2];f[i+8>>2]=f[e+8>>2];f[i+12>>2]=f[e+12>>2];f[x>>2]=2320;i=x;f[g>>2]=i;z=y;A=i}f[a>>2]=A;f[z>>2]=0;u=d;return}case 0:{z=f[j>>2]|0;j=f[h>>2]|0;h=f[(f[(f[j+4>>2]|0)+8>>2]|0)+(z<<2)>>2]|0;do if((Qa[f[(f[j>>2]|0)+8>>2]&127](j)|0)==1){rf(g,j,0,z,e,514);A=f[g>>2]|0;if(!A){f[g>>2]=0;B=g;v=41;break}else{C=g;D=A;break}}else{B=g;v=41}while(0);if((v|0)==41){v=dn(24)|0;f[v+4>>2]=h;h=v+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[v>>2]=2320;e=v;f[g>>2]=e;C=B;D=e}f[a>>2]=D;f[C>>2]=0;u=d;return}default:{f[a>>2]=0;u=d;return}}}function Gc(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;b=u;u=u+32|0;c=b+20|0;d=b+8|0;e=b;g=a+4|0;h=f[g>>2]|0;i=f[a>>2]|0;j=h-i|0;k=j>>2;f[c>>2]=0;l=c+4|0;f[l>>2]=0;m=c+8|0;f[m>>2]=0;n=i;if(k|0){if((j|0)<0)mq(c);j=((k+-1|0)>>>5)+1|0;o=dn(j<<2)|0;f[c>>2]=o;f[m>>2]=j;f[l>>2]=k;l=k>>>5;hj(o|0,0,l<<2|0)|0;j=k&31;k=o+(l<<2)|0;if(j|0)f[k>>2]=f[k>>2]&~(-1>>>(32-j|0))}f[d>>2]=0;j=d+4|0;f[j>>2]=0;f[d+8>>2]=0;k=a+12|0;l=e+4|0;o=d+8|0;m=n;n=h;h=i;while(1){if((n|0)==(h|0))break;else{p=0;q=0;r=h;s=m}while(1){i=f[c>>2]|0;do if(!(f[i+(q>>>5<<2)>>2]&1<<(q&31))){t=f[d>>2]|0;v=f[j>>2]|0;if((v|0)==(t|0))w=t;else{x=v+(~((v+-8-t|0)>>>3)<<3)|0;f[j>>2]=x;w=x}x=q;while(1){v=x+1|0;y=((v>>>0)%3|0|0)==0?x+-2|0:v;if((y|0)==-1){z=x;A=r;B=i;C=s;D=t;E=w;break}v=f[(f[k>>2]|0)+(y<<2)>>2]|0;y=v+1|0;if((v|0)==-1){z=x;A=r;B=i;C=s;D=t;E=w;break}F=((y>>>0)%3|0|0)==0?v+-2|0:y;if(!((F|0)!=(q|0)&(F|0)!=-1)){z=x;A=r;B=i;C=s;D=t;E=w;break}if(!(f[i+(F>>>5<<2)>>2]&1<<(F&31)))x=F;else{z=x;A=r;B=i;C=s;D=t;E=w;break}}a:while(1){t=B+(z>>>5<<2)|0;f[t>>2]=f[t>>2]|1<<(z&31);t=z+1|0;F=((t>>>0)%3|0|0)==0?z+-2|0:t;t=f[C+(F<<2)>>2]|0;G=(((z>>>0)%3|0|0)==0?2:-1)+z|0;if((D|0)!=(E|0))if((G|0)==-1){y=D;do{if((f[y>>2]|0)==(t|0)?(v=f[y+4>>2]|0,(v|0)!=-1):0){H=v;I=-1;J=-1;K=25;break a}y=y+8|0}while((y|0)!=(E|0))}else{y=D;do{if((f[y>>2]|0)==(t|0)?(L=f[y+4>>2]|0,M=f[(f[k>>2]|0)+(G<<2)>>2]|0,(M|0)!=(L|0)):0){K=24;break a}y=y+8|0}while((y|0)!=(E|0))}f[e>>2]=0;f[e>>2]=f[C+(G<<2)>>2];f[l>>2]=F;if((E|0)==(f[o>>2]|0))ei(d,e);else{y=e;t=f[y+4>>2]|0;v=E;f[v>>2]=f[y>>2];f[v+4>>2]=t;f[j>>2]=(f[j>>2]|0)+8}if((G|0)==-1){K=38;break}t=f[(f[k>>2]|0)+(G<<2)>>2]|0;if((t|0)==-1){K=38;break}v=t+(((t>>>0)%3|0|0)==0?2:-1)|0;if(!((v|0)!=(x|0)&(v|0)!=-1)){K=40;break}t=f[a>>2]|0;z=v;A=t;B=f[c>>2]|0;C=t;D=f[d>>2]|0;E=f[j>>2]|0}if((K|0)==24){K=0;if((L|0)==-1){N=-1;O=-1;P=M;Q=G}else{H=L;I=M;J=G;K=25}}else if((K|0)==38){K=0;K=40}if((K|0)==25){K=0;N=H;O=f[(f[k>>2]|0)+(H<<2)>>2]|0;P=I;Q=J}else if((K|0)==40){K=0;R=p;S=f[a>>2]|0;break}if((P|0)!=-1)f[(f[k>>2]|0)+(P<<2)>>2]=-1;x=f[k>>2]|0;if((O|0)!=-1)f[x+(O<<2)>>2]=-1;f[x+(Q<<2)>>2]=-1;f[x+(N<<2)>>2]=-1;R=1;S=A}else{R=p;S=r}while(0);q=q+1|0;T=f[g>>2]|0;s=S;if(q>>>0>=T-S>>2>>>0)break;else{p=R;r=S}}if(R){m=s;n=T;h=S}else break}S=f[d>>2]|0;if(S|0){d=f[j>>2]|0;if((d|0)!=(S|0))f[j>>2]=d+(~((d+-8-S|0)>>>3)<<3);br(S)}S=f[c>>2]|0;if(!S){u=b;return 1}br(S);u=b;return 1}function Hc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;e=a+8|0;a:do if(f[e>>2]|0?(g=f[a>>2]|0,h=a+4|0,f[a>>2]=h,f[(f[h>>2]|0)+8>>2]=0,f[h>>2]=0,f[e>>2]=0,i=f[g+4>>2]|0,j=(i|0)==0?g:i,j|0):0){i=a+4|0;g=j;j=f[c>>2]|0;while(1){if((j|0)==(f[d>>2]|0))break;k=g+16|0;Ql(k,j+16|0)|0;Ql(g+28|0,j+28|0)|0;l=g+8|0;m=f[l>>2]|0;do if(m){n=f[m>>2]|0;if((n|0)==(g|0)){f[m>>2]=0;o=f[m+4>>2]|0;if(!o){p=m;break}else q=o;while(1){o=f[q>>2]|0;if(o|0){q=o;continue}o=f[q+4>>2]|0;if(!o)break;else q=o}p=q;break}else{f[m+4>>2]=0;if(!n){p=m;break}else r=n;while(1){o=f[r>>2]|0;if(o|0){r=o;continue}o=f[r+4>>2]|0;if(!o)break;else r=o}p=r;break}}else p=0;while(0);m=f[h>>2]|0;do if(m){n=b[k+11>>0]|0;o=n<<24>>24<0;s=o?f[g+20>>2]|0:n&255;n=o?f[k>>2]|0:k;o=m;while(1){t=o+16|0;u=b[t+11>>0]|0;v=u<<24>>24<0;w=v?f[o+20>>2]|0:u&255;u=w>>>0>>0?w:s;if((u|0)!=0?(x=Pk(n,v?f[t>>2]|0:t,u)|0,(x|0)!=0):0)if((x|0)<0)y=22;else y=24;else if(s>>>0>>0)y=22;else y=24;if((y|0)==22){y=0;w=f[o>>2]|0;if(!w){y=23;break}else z=w}else if((y|0)==24){y=0;A=o+4|0;w=f[A>>2]|0;if(!w){y=26;break}else z=w}o=z}if((y|0)==23){y=0;B=o;C=o;break}else if((y|0)==26){y=0;B=A;C=o;break}}else{B=h;C=h}while(0);f[g>>2]=0;f[g+4>>2]=0;f[l>>2]=C;f[B>>2]=g;m=f[f[a>>2]>>2]|0;if(!m)D=g;else{f[a>>2]=m;D=f[B>>2]|0}Ae(f[i>>2]|0,D);f[e>>2]=(f[e>>2]|0)+1;m=f[j+4>>2]|0;if(!m){k=j+8|0;s=f[k>>2]|0;if((f[s>>2]|0)==(j|0))E=s;else{s=k;do{k=f[s>>2]|0;s=k+8|0;n=f[s>>2]|0}while((f[n>>2]|0)!=(k|0));E=n}}else{s=m;while(1){l=f[s>>2]|0;if(!l)break;else s=l}E=s}f[c>>2]=E;if(!p)break a;else{g=p;j=E}}j=f[g+8>>2]|0;if(!j)F=g;else{i=j;while(1){j=f[i+8>>2]|0;if(!j)break;else i=j}F=i}sj(a,F)}while(0);F=f[c>>2]|0;E=f[d>>2]|0;if((F|0)==(E|0))return;else G=F;while(1){Qe(a,G+16|0)|0;F=f[G+4>>2]|0;if(!F){d=G+8|0;p=f[d>>2]|0;if((f[p>>2]|0)==(G|0))H=p;else{p=d;do{d=f[p>>2]|0;p=d+8|0;e=f[p>>2]|0}while((f[e>>2]|0)!=(d|0));H=e}}else{p=F;while(1){i=f[p>>2]|0;if(!i)break;else p=i}H=p}f[c>>2]=H;if((H|0)==(E|0))break;else G=H}return}function Ic(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;g=u;u=u+16|0;h=g;i=c+4|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;j=dn(16)|0;f[h>>2]=j;f[h+8>>2]=-2147483632;f[h+4>>2]=15;k=j;l=12916;m=k+15|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[j+15>>0]=0;j=yk(i,h,-1)|0;if((b[h+11>>0]|0)<0)br(f[h>>2]|0);switch(j|0){case 0:{n=dn(56)|0;k=n;m=k+56|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(m|0));zn(n);o=3728;p=n;break}case -1:{if((Yh(i)|0)==10){n=dn(56)|0;k=n;m=k+56|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(m|0));zn(n);o=3728;p=n}else q=6;break}default:q=6}a:do if((q|0)==6){n=d+8|0;r=d+12|0;s=f[r>>2]|0;t=f[n>>2]|0;b:do if((s-t|0)>0){v=h+8|0;w=h+4|0;x=c+20|0;y=h+11|0;z=0;A=t;B=s;c:while(1){C=f[(f[A+(z<<2)>>2]|0)+28>>2]|0;switch(C|0){case 9:{q=12;break}case 6:case 5:case 4:case 2:{D=A;E=B;break}default:{if((C|2|0)!=3)break c;if((C|0)==9)q=12;else{D=A;E=B}}}if((q|0)==12){q=0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;C=dn(32)|0;f[h>>2]=C;f[v>>2]=-2147483616;f[w>>2]=17;k=C;l=12932;m=k+17|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[C+17>>0]=0;F=f[x>>2]|0;if(F){G=x;H=F;d:while(1){F=H;while(1){if((f[F+16>>2]|0)>=0)break;I=f[F+4>>2]|0;if(!I){J=G;break d}else F=I}H=f[F>>2]|0;if(!H){J=F;break}else G=F}if(((J|0)!=(x|0)?(f[J+16>>2]|0)<=0:0)?(G=J+20|0,(sh(G,h)|0)!=0):0)K=yk(G,h,-1)|0;else q=21}else q=21;if((q|0)==21){q=0;K=yk(i,h,-1)|0}if((b[y>>0]|0)<0)br(f[h>>2]|0);if((K|0)<1)break;D=f[n>>2]|0;E=f[r>>2]|0}z=z+1|0;if((z|0)>=(E-D>>2|0))break b;else{A=D;B=E}}if((j|0)!=1){B=dn(56)|0;k=B;m=k+56|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(m|0));zn(B);o=3728;p=B;break a}f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;A=dn(32)|0;f[h>>2]=A;f[h+8>>2]=-2147483616;f[h+4>>2]=24;k=A;l=12950;m=k+24|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[A+24>>0]=0;f[a>>2]=-1;dj(a+4|0,h);if((b[h+11>>0]|0)<0)br(f[h>>2]|0);u=g;return}while(0);r=dn(56)|0;k=r;m=k+56|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(m|0));zn(r);o=3668;p=r}while(0);f[p>>2]=o;tp(p,d);Ad(a,p,i,e);if(!(f[a>>2]|0)){e=a+4|0;if((b[e+11>>0]|0)<0)br(f[e>>2]|0);f[c+40>>2]=f[p+52>>2];f[c+44>>2]=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0}Va[f[(f[p>>2]|0)+4>>2]&127](p);u=g;return}function Jc(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;b=u;u=u+32|0;c=b+4|0;d=b;e=a+16|0;g=f[e>>2]|0;if(g>>>0>112){f[e>>2]=g+-113;g=a+4|0;e=f[g>>2]|0;h=f[e>>2]|0;i=e+4|0;f[g>>2]=i;e=a+8|0;j=f[e>>2]|0;k=a+12|0;l=f[k>>2]|0;m=l;do if((j|0)==(l|0)){n=f[a>>2]|0;o=n;if(i>>>0>n>>>0){p=i;q=((p-o>>2)+1|0)/-2|0;r=i+(q<<2)|0;s=j-p|0;p=s>>2;if(!p)t=i;else{Xl(r|0,i|0,s|0)|0;t=f[g>>2]|0}s=r+(p<<2)|0;f[e>>2]=s;f[g>>2]=t+(q<<2);v=s;break}s=m-o>>1;o=(s|0)==0?1:s;if(o>>>0>1073741823){s=ra(8)|0;Wo(s,14941);f[s>>2]=6944;va(s|0,1080,114)}s=dn(o<<2)|0;q=s;p=s+(o>>>2<<2)|0;r=p;w=s+(o<<2)|0;if((i|0)==(j|0)){x=r;y=n}else{n=p;p=r;o=i;do{f[n>>2]=f[o>>2];n=p+4|0;p=n;o=o+4|0}while((o|0)!=(j|0));x=p;y=f[a>>2]|0}f[a>>2]=q;f[g>>2]=r;f[e>>2]=x;f[k>>2]=w;if(!y)v=x;else{br(y);v=f[e>>2]|0}}else v=j;while(0);f[v>>2]=h;f[e>>2]=(f[e>>2]|0)+4;u=b;return}e=a+8|0;h=f[e>>2]|0;v=a+4|0;j=h-(f[v>>2]|0)|0;y=a+12|0;x=f[y>>2]|0;k=x-(f[a>>2]|0)|0;if(j>>>0>=k>>>0){g=k>>1;k=(g|0)==0?1:g;f[c+12>>2]=0;f[c+16>>2]=a+12;if(k>>>0>1073741823){g=ra(8)|0;Wo(g,14941);f[g>>2]=6944;va(g|0,1080,114)}g=dn(k<<2)|0;f[c>>2]=g;i=g+(j>>2<<2)|0;j=c+8|0;f[j>>2]=i;m=c+4|0;f[m>>2]=i;i=c+12|0;f[i>>2]=g+(k<<2);k=dn(4068)|0;f[d>>2]=k;kg(c,d);d=f[e>>2]|0;while(1){z=f[v>>2]|0;if((d|0)==(z|0))break;k=d+-4|0;dg(c,k);d=k}k=z;z=f[a>>2]|0;f[a>>2]=f[c>>2];f[c>>2]=z;f[v>>2]=f[m>>2];f[m>>2]=k;m=f[e>>2]|0;f[e>>2]=f[j>>2];f[j>>2]=m;g=f[y>>2]|0;f[y>>2]=f[i>>2];f[i>>2]=g;g=m;if((d|0)!=(g|0))f[j>>2]=g+(~((g+-4-k|0)>>>2)<<2);if(z|0)br(z);u=b;return}if((x|0)!=(h|0)){h=dn(4068)|0;f[c>>2]=h;kg(a,c);u=b;return}h=dn(4068)|0;f[c>>2]=h;dg(a,c);c=f[v>>2]|0;h=f[c>>2]|0;x=c+4|0;f[v>>2]=x;c=f[e>>2]|0;z=f[y>>2]|0;k=z;do if((c|0)==(z|0)){g=f[a>>2]|0;j=g;if(x>>>0>g>>>0){d=x;m=((d-j>>2)+1|0)/-2|0;i=x+(m<<2)|0;t=c-d|0;d=t>>2;if(!d)A=x;else{Xl(i|0,x|0,t|0)|0;A=f[v>>2]|0}t=i+(d<<2)|0;f[e>>2]=t;f[v>>2]=A+(m<<2);B=t;break}t=k-j>>1;j=(t|0)==0?1:t;if(j>>>0>1073741823){t=ra(8)|0;Wo(t,14941);f[t>>2]=6944;va(t|0,1080,114)}t=dn(j<<2)|0;m=t;d=t+(j>>>2<<2)|0;i=d;l=t+(j<<2)|0;if((x|0)==(c|0)){C=i;D=g}else{g=d;d=i;j=x;do{f[g>>2]=f[j>>2];g=d+4|0;d=g;j=j+4|0}while((j|0)!=(c|0));C=d;D=f[a>>2]|0}f[a>>2]=m;f[v>>2]=i;f[e>>2]=C;f[y>>2]=l;if(!D)B=C;else{br(D);B=f[e>>2]|0}}else B=c;while(0);f[B>>2]=h;f[e>>2]=(f[e>>2]|0)+4;u=b;return}function Kc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;e=u;u=u+16|0;g=e+8|0;h=e+4|0;i=e;j=a+64|0;k=f[j>>2]|0;if((f[k+28>>2]|0)==(f[k+24>>2]|0)){u=e;return}l=c+96|0;c=a+52|0;m=d+84|0;n=d+68|0;d=a+56|0;o=a+60|0;p=a+12|0;q=a+28|0;r=a+40|0;s=a+44|0;t=a+48|0;v=0;w=0;x=k;while(1){k=f[(f[x+24>>2]|0)+(w<<2)>>2]|0;if((k|0)==-1){y=v;z=x}else{A=v+1|0;B=f[(f[l>>2]|0)+(((k|0)/3|0)*12|0)+(((k|0)%3|0)<<2)>>2]|0;if(!(b[m>>0]|0))C=f[(f[n>>2]|0)+(B<<2)>>2]|0;else C=B;f[g>>2]=C;B=f[d>>2]|0;if(B>>>0<(f[o>>2]|0)>>>0){f[B>>2]=C;f[d>>2]=B+4}else Ci(c,g);f[g>>2]=k;f[h>>2]=0;a:do if(!(f[(f[p>>2]|0)+(w>>>5<<2)>>2]&1<<(w&31)))D=k;else{B=k+1|0;E=((B>>>0)%3|0|0)==0?k+-2|0:B;if(((E|0)!=-1?(f[(f[a>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)==0:0)?(B=f[(f[(f[j>>2]|0)+12>>2]|0)+(E<<2)>>2]|0,E=B+1|0,(B|0)!=-1):0){F=((E>>>0)%3|0|0)==0?B+-2|0:E;f[h>>2]=F;if((F|0)==-1){D=k;break}else G=F;while(1){f[g>>2]=G;F=G+1|0;E=((F>>>0)%3|0|0)==0?G+-2|0:F;if((E|0)==-1)break;if(f[(f[a>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)break;F=f[(f[(f[j>>2]|0)+12>>2]|0)+(E<<2)>>2]|0;E=F+1|0;if((F|0)==-1)break;B=((E>>>0)%3|0|0)==0?F+-2|0:E;f[h>>2]=B;if((B|0)==-1){D=G;break a}else G=B}f[h>>2]=-1;D=G;break}f[h>>2]=-1;D=k}while(0);f[(f[q>>2]|0)+(D<<2)>>2]=v;k=f[s>>2]|0;if((k|0)==(f[t>>2]|0))Ci(r,g);else{f[k>>2]=f[g>>2];f[s>>2]=k+4}k=f[j>>2]|0;B=f[g>>2]|0;b:do if(((B|0)!=-1?(E=(((B>>>0)%3|0|0)==0?2:-1)+B|0,(E|0)!=-1):0)?(F=f[(f[k+12>>2]|0)+(E<<2)>>2]|0,(F|0)!=-1):0){E=F+(((F>>>0)%3|0|0)==0?2:-1)|0;f[h>>2]=E;if((E|0)!=-1&(E|0)!=(B|0)){F=A;H=v;I=E;while(1){E=I+1|0;J=((E>>>0)%3|0|0)==0?I+-2|0:E;do if(f[(f[a>>2]|0)+(J>>>5<<2)>>2]&1<<(J&31)){E=F+1|0;K=f[(f[l>>2]|0)+(((I|0)/3|0)*12|0)+(((I|0)%3|0)<<2)>>2]|0;if(!(b[m>>0]|0))L=f[(f[n>>2]|0)+(K<<2)>>2]|0;else L=K;f[i>>2]=L;K=f[d>>2]|0;if(K>>>0<(f[o>>2]|0)>>>0){f[K>>2]=L;f[d>>2]=K+4}else Ci(c,i);K=f[s>>2]|0;if((K|0)==(f[t>>2]|0)){Ci(r,h);M=E;N=F;break}else{f[K>>2]=f[h>>2];f[s>>2]=K+4;M=E;N=F;break}}else{M=F;N=H}while(0);f[(f[q>>2]|0)+(f[h>>2]<<2)>>2]=N;O=f[j>>2]|0;J=f[h>>2]|0;if((J|0)==-1)break;E=(((J>>>0)%3|0|0)==0?2:-1)+J|0;if((E|0)==-1)break;J=f[(f[O+12>>2]|0)+(E<<2)>>2]|0;if((J|0)==-1)break;I=J+(((J>>>0)%3|0|0)==0?2:-1)|0;f[h>>2]=I;if(!((I|0)!=-1?(I|0)!=(f[g>>2]|0):0)){P=M;Q=O;break b}else{F=M;H=N}}f[h>>2]=-1;P=M;Q=O}else{P=A;Q=k}}else R=28;while(0);if((R|0)==28){R=0;f[h>>2]=-1;P=A;Q=k}y=P;z=Q}w=w+1|0;if(w>>>0>=(f[z+28>>2]|0)-(f[z+24>>2]|0)>>2>>>0)break;else{v=y;x=z}}u=e;return}function Lc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0.0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,D=0,E=0,F=0;switch(c|0){case 0:{e=-149;g=24;i=4;break}case 1:{e=-1074;g=53;i=4;break}case 2:{e=-1074;g=53;i=4;break}default:j=0.0}a:do if((i|0)==4){c=a+4|0;k=a+100|0;do{l=f[c>>2]|0;if(l>>>0<(f[k>>2]|0)>>>0){f[c>>2]=l+1;m=h[l>>0]|0}else m=Di(a)|0}while((tq(m)|0)!=0);b:do switch(m|0){case 43:case 45:{l=1-(((m|0)==45&1)<<1)|0;n=f[c>>2]|0;if(n>>>0<(f[k>>2]|0)>>>0){f[c>>2]=n+1;o=h[n>>0]|0;p=l;break b}else{o=Di(a)|0;p=l;break b}break}default:{o=m;p=1}}while(0);l=0;n=o;while(1){if((n|32|0)!=(b[17452+l>>0]|0)){q=l;r=n;break}do if(l>>>0<7){s=f[c>>2]|0;if(s>>>0<(f[k>>2]|0)>>>0){f[c>>2]=s+1;t=h[s>>0]|0;break}else{t=Di(a)|0;break}}else t=n;while(0);s=l+1|0;if(s>>>0<8){l=s;n=t}else{q=s;r=t;break}}c:do switch(q|0){case 8:break;case 3:{i=23;break}default:{n=(d|0)!=0;if(n&q>>>0>3)if((q|0)==8)break c;else{i=23;break c}d:do if(!q){l=0;s=r;while(1){if((s|32|0)!=(b[17461+l>>0]|0)){u=l;v=s;break d}do if(l>>>0<2){w=f[c>>2]|0;if(w>>>0<(f[k>>2]|0)>>>0){f[c>>2]=w+1;x=h[w>>0]|0;break}else{x=Di(a)|0;break}}else x=s;while(0);w=l+1|0;if(w>>>0<3){l=w;s=x}else{u=w;v=x;break}}}else{u=q;v=r}while(0);switch(u|0){case 3:{s=f[c>>2]|0;if(s>>>0<(f[k>>2]|0)>>>0){f[c>>2]=s+1;y=h[s>>0]|0}else y=Di(a)|0;if((y|0)==40)z=1;else{if(!(f[k>>2]|0)){j=B;break a}f[c>>2]=(f[c>>2]|0)+-1;j=B;break a}while(1){s=f[c>>2]|0;if(s>>>0<(f[k>>2]|0)>>>0){f[c>>2]=s+1;A=h[s>>0]|0}else A=Di(a)|0;if(!((A+-48|0)>>>0<10|(A+-65|0)>>>0<26)?!((A|0)==95|(A+-97|0)>>>0<26):0)break;z=z+1|0}if((A|0)==41){j=B;break a}s=(f[k>>2]|0)==0;if(!s)f[c>>2]=(f[c>>2]|0)+-1;if(!n){l=ir()|0;f[l>>2]=22;Rm(a,0);j=0.0;break a}if(!z){j=B;break a}else D=z;while(1){D=D+-1|0;if(!s)f[c>>2]=(f[c>>2]|0)+-1;if(!D){j=B;break a}}break}case 0:{if((v|0)==48){s=f[c>>2]|0;if(s>>>0<(f[k>>2]|0)>>>0){f[c>>2]=s+1;E=h[s>>0]|0}else E=Di(a)|0;if((E|32|0)==120){j=+yc(a,g,e,p,d);break a}if(!(f[k>>2]|0))F=48;else{f[c>>2]=(f[c>>2]|0)+-1;F=48}}else F=v;j=+ob(a,F,g,e,p,d);break a;break}default:{if(f[k>>2]|0)f[c>>2]=(f[c>>2]|0)+-1;s=ir()|0;f[s>>2]=22;Rm(a,0);j=0.0;break a}}}}while(0);if((i|0)==23){s=(f[k>>2]|0)==0;if(!s)f[c>>2]=(f[c>>2]|0)+-1;if((d|0)!=0&q>>>0>3){n=q;do{if(!s)f[c>>2]=(f[c>>2]|0)+-1;n=n+-1|0}while(n>>>0>3)}}j=+$($(p|0)*$(C))}while(0);return +j}function Mc(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;b=u;u=u+16|0;c=b+4|0;d=b;e=f[a+64>>2]|0;if(!e){u=b;return}g=Qa[f[(f[e>>2]|0)+32>>2]&127](e)|0;if(!g){u=b;return}e=g+24|0;h=g+28|0;i=((f[h>>2]|0)-(f[e>>2]|0)>>2)-(f[g+44>>2]|0)|0;j=a+56|0;k=f[j>>2]|0;if(((f[k+12>>2]|0)-(f[k+8>>2]|0)|0)>4){f[c>>2]=0;l=c+4|0;f[l>>2]=0;f[c+8>>2]=0;m=c+8|0;n=0;o=k;while(1){if(!(f[(f[(f[o+8>>2]|0)+(n<<2)>>2]|0)+56>>2]|0))p=o;else{k=Ra[f[(f[a>>2]|0)+56>>2]&127](a,n)|0;f[d>>2]=k;q=k;do if(k|0){r=f[l>>2]|0;if((r|0)==(f[m>>2]|0)){Ci(c,d);break}else{f[r>>2]=q;f[l>>2]=(f[l>>2]|0)+4;break}}while(0);p=f[j>>2]|0}n=n+1|0;if((n|0)>=((f[p+12>>2]|0)-(f[p+8>>2]|0)>>2|0))break;else o=p}o=f[h>>2]|0;h=f[e>>2]|0;e=h;if((o|0)==(h|0)){s=i;t=f[c>>2]|0}else{n=o-h>>2;h=g+12|0;g=f[l>>2]|0;o=f[c>>2]|0;c=(g|0)==(o|0);j=o;d=g-o>>2;o=p+96|0;p=i;g=0;while(1){m=f[e+(g<<2)>>2]|0;if((m|0)==-1)v=p;else{q=f[o>>2]|0;k=f[q+(((m|0)/3|0)*12|0)+(((m|0)%3|0)<<2)>>2]|0;r=(((m>>>0)%3|0|0)==0?2:-1)+m|0;a:do if(((r|0)!=-1?(w=f[(f[h>>2]|0)+(r<<2)>>2]|0,(w|0)!=-1):0)?(x=w+(((w>>>0)%3|0|0)==0?2:-1)|0,(x|0)!=-1):0){if(c){w=0;y=x;z=k;while(1){A=z;z=f[q+(((y|0)/3|0)*12|0)+(((y|0)%3|0)<<2)>>2]|0;B=w+((z|0)!=(A|0)&1)|0;if((y|0)==(m|0)){C=B;break a}A=(((y>>>0)%3|0|0)==0?2:-1)+y|0;if((A|0)==-1){C=B;break a}D=f[(f[h>>2]|0)+(A<<2)>>2]|0;if((D|0)==-1){C=B;break a}y=D+(((D>>>0)%3|0|0)==0?2:-1)|0;if((y|0)==-1){C=B;break a}else w=B}}else{E=0;F=x;G=m;H=k}while(1){w=f[q+(((F|0)/3|0)*12|0)+(((F|0)%3|0)<<2)>>2]|0;b:do if((w|0)==(H|0)){y=0;while(1){z=f[(f[j+(y<<2)>>2]|0)+28>>2]|0;y=y+1|0;if((f[z+(F<<2)>>2]|0)!=(f[z+(G<<2)>>2]|0)){I=H;J=28;break b}if(y>>>0>=d>>>0){K=H;L=E;break}}}else{I=w;J=28}while(0);if((J|0)==28){J=0;K=I;L=E+1|0}if((F|0)==(m|0)){C=L;break a}w=(((F>>>0)%3|0|0)==0?2:-1)+F|0;if((w|0)==-1){C=L;break a}y=f[(f[h>>2]|0)+(w<<2)>>2]|0;if((y|0)==-1){C=L;break a}w=y+(((y>>>0)%3|0|0)==0?2:-1)|0;if((w|0)==-1){C=L;break}else{y=F;E=L;F=w;H=K;G=y}}}else C=0;while(0);m=f[e+(g<<2)>>2]|0;q=m+1|0;if(((m|0)!=-1?(k=((q>>>0)%3|0|0)==0?m+-2|0:q,(k|0)!=-1):0)?(q=f[(f[h>>2]|0)+(k<<2)>>2]|0,k=q+1|0,(q|0)!=-1):0)M=((((k>>>0)%3|0|0)==0?q+-2|0:k)|0)==-1;else M=1;v=C+p+(((C|0)!=0&(M^1))<<31>>31)|0}g=g+1|0;if(g>>>0>=n>>>0){s=v;t=j;break}else p=v}}if(t|0){v=f[l>>2]|0;if((v|0)!=(t|0))f[l>>2]=v+(~((v+-4-t|0)>>>2)<<2);br(t)}N=s}else N=i;f[a+52>>2]=N;u=b;return}function Nc(a,c,d,e,g,h){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;i=u;u=u+32|0;j=i+4|0;k=i;l=i+16|0;m=(_(e|0)|0)^31;if((e|0)>0)if(m>>>0>17){n=0;u=i;return n|0}else o=m+1|0;else o=1;do if(g){m=dn(48)|0;f[j>>2]=m;f[j+8>>2]=-2147483600;f[j+4>>2]=33;e=m;p=13067;q=e+33|0;do{b[e>>0]=b[p>>0]|0;e=e+1|0;p=p+1|0}while((e|0)<(q|0));b[m+33>>0]=0;r=(sh(g,j)|0)==0;if((b[j+11>>0]|0)<0)br(f[j>>2]|0);if(!r){r=dn(48)|0;f[j>>2]=r;f[j+8>>2]=-2147483600;f[j+4>>2]=33;e=r;p=13067;q=e+33|0;do{b[e>>0]=b[p>>0]|0;e=e+1|0;p=p+1|0}while((e|0)<(q|0));b[r+33>>0]=0;p=Ck(g,j)|0;if((b[j+11>>0]|0)<0)br(f[j>>2]|0);if((p|0)<4){s=o+-2|0;break}if((p|0)<6){s=o+-1|0;break}if((p|0)>9){s=o+2|0;break}else{s=o+((p|0)>7&1)|0;break}}else s=o}else s=o;while(0);o=(s|0)>1?s:1;s=(o|0)<18?o:18;b[l>>0]=s;o=h+16|0;g=f[o+4>>2]|0;if(!((g|0)>0|(g|0)==0&(f[o>>2]|0)>>>0>0)){f[k>>2]=f[h+4>>2];f[j>>2]=f[k>>2];ye(h,j,l,l+1|0)|0}do switch(s&31){case 1:case 0:{n=je(a,c,d,h)|0;u=i;return n|0}case 2:{n=ie(a,c,d,h)|0;u=i;return n|0}case 3:{n=he(a,c,d,h)|0;u=i;return n|0}case 4:{n=ge(a,c,d,h)|0;u=i;return n|0}case 5:{n=fe(a,c,d,h)|0;u=i;return n|0}case 6:{n=ee(a,c,d,h)|0;u=i;return n|0}case 7:{n=de(a,c,d,h)|0;u=i;return n|0}case 8:{n=ce(a,c,d,h)|0;u=i;return n|0}case 9:{n=be(a,c,d,h)|0;u=i;return n|0}case 10:{n=ae(a,c,d,h)|0;u=i;return n|0}case 11:{n=$d(a,c,d,h)|0;u=i;return n|0}case 12:{n=_d(a,c,d,h)|0;u=i;return n|0}case 13:{n=Zd(a,c,d,h)|0;u=i;return n|0}case 14:{n=Yd(a,c,d,h)|0;u=i;return n|0}case 15:{n=Xd(a,c,d,h)|0;u=i;return n|0}case 16:{n=Wd(a,c,d,h)|0;u=i;return n|0}case 17:{n=Vd(a,c,d,h)|0;u=i;return n|0}case 18:{n=Ud(a,c,d,h)|0;u=i;return n|0}default:{n=0;u=i;return n|0}}while(0);return 0}function Oc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;wb(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function Pc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;xb(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function Qc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;yb(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function Rc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;zb(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function Sc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Ab(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function Tc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*524288.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==524288){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Eb(z,A,g);a:do if((x|0)<524288){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=524288-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>524288;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-524288|0;m=x;while(1){v=524288.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==524288){C=p;D=524288;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=524288){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*1.9073486328125e-06)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function Uc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*262144.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==262144){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Bb(z,A,g);a:do if((x|0)<262144){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=262144-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>262144;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-262144|0;m=x;while(1){v=262144.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==262144){C=p;D=262144;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=262144){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*3.814697265625e-06)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function Vc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*65536.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==65536){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Cb(z,A,g);a:do if((x|0)<65536){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=65536-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>65536;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-65536|0;m=x;while(1){v=65536.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==65536){C=p;D=65536;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=65536){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*.0000152587890625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function Wc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*32768.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==32768){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Db(z,A,g);a:do if((x|0)<32768){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=32768-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>32768;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-32768|0;m=x;while(1){v=32768.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==32768){C=p;D=32768;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=32768){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*.000030517578125)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function Xc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*8192.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==8192){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Fb(z,A,g);a:do if((x|0)<8192){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=8192-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>8192;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-8192|0;m=x;while(1){v=8192.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==8192){C=p;D=8192;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=8192){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*.0001220703125)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function Yc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Gb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function Zc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Hb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function _c(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Ib(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function $c(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Jb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function ad(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Kb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function bd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Lb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function cd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Mb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function dd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Tn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else dh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)mq(h);else{i=l<<2;t=dn(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;hj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Nb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);br(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Fg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=xe(a,d)|0;u=e;return w|0}function ed(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0;g=u;u=u+32|0;d=g+16|0;h=g+8|0;i=g;j=e>>>0>1073741823?-1:e<<2;k=_q(j)|0;hj(k|0,0,j|0)|0;j=f[a+28>>2]|0;l=a+36|0;m=f[l>>2]|0;n=f[m+4>>2]|0;o=f[m>>2]|0;p=n-o|0;a:do if((p|0)>4){q=p>>2;r=f[a+32>>2]|0;s=a+8|0;t=h+4|0;v=i+4|0;w=d+4|0;x=j+12|0;y=(e|0)>0;z=k+4|0;A=h+4|0;B=i+4|0;C=d+4|0;D=q+-1|0;if(n-o>>2>>>0>D>>>0){E=q;F=D;G=o}else{H=m;mq(H)}while(1){D=f[G+(F<<2)>>2]|0;q=X(F,e)|0;if((D|0)!=-1?(I=f[(f[x>>2]|0)+(D<<2)>>2]|0,(I|0)!=-1):0){D=f[j>>2]|0;J=f[r>>2]|0;K=f[J+(f[D+(I<<2)>>2]<<2)>>2]|0;L=I+1|0;M=((L>>>0)%3|0|0)==0?I+-2|0:L;if((M|0)==-1)N=-1;else N=f[D+(M<<2)>>2]|0;M=f[J+(N<<2)>>2]|0;L=(((I>>>0)%3|0|0)==0?2:-1)+I|0;if((L|0)==-1)O=-1;else O=f[D+(L<<2)>>2]|0;L=f[J+(O<<2)>>2]|0;if((K|0)<(F|0)&(M|0)<(F|0)&(L|0)<(F|0)){J=X(K,e)|0;K=X(M,e)|0;M=X(L,e)|0;if(y){L=0;do{f[k+(L<<2)>>2]=(f[b+(L+M<<2)>>2]|0)+(f[b+(L+K<<2)>>2]|0)-(f[b+(L+J<<2)>>2]|0);L=L+1|0}while((L|0)!=(e|0))}L=b+(q<<2)|0;J=c+(q<<2)|0;K=f[L+4>>2]|0;M=f[k>>2]|0;D=f[z>>2]|0;f[h>>2]=f[L>>2];f[A>>2]=K;f[i>>2]=M;f[B>>2]=D;Dd(d,s,h,i);f[J>>2]=f[d>>2];f[J+4>>2]=f[C>>2]}else P=15}else P=15;if((P|0)==15){P=0;J=b+(q<<2)|0;D=b+((X(E+-2|0,e)|0)<<2)|0;M=c+(q<<2)|0;K=f[J+4>>2]|0;L=f[D>>2]|0;I=f[D+4>>2]|0;f[h>>2]=f[J>>2];f[t>>2]=K;f[i>>2]=L;f[v>>2]=I;Dd(d,s,h,i);f[M>>2]=f[d>>2];f[M+4>>2]=f[w>>2]}if((E|0)<=2)break a;M=f[l>>2]|0;G=f[M>>2]|0;I=F+-1|0;if((f[M+4>>2]|0)-G>>2>>>0<=I>>>0){H=M;break}else{M=F;F=I;E=M}}mq(H)}while(0);if((e|0)<=0){Q=a+8|0;R=b+4|0;S=f[b>>2]|0;T=f[R>>2]|0;U=k+4|0;V=f[k>>2]|0;W=f[U>>2]|0;f[h>>2]=S;Y=h+4|0;f[Y>>2]=T;f[i>>2]=V;Z=i+4|0;f[Z>>2]=W;Dd(d,Q,h,i);_=f[d>>2]|0;f[c>>2]=_;$=d+4|0;aa=f[$>>2]|0;ba=c+4|0;f[ba>>2]=aa;$q(k);u=g;return 1}hj(k|0,0,e<<2|0)|0;Q=a+8|0;R=b+4|0;S=f[b>>2]|0;T=f[R>>2]|0;U=k+4|0;V=f[k>>2]|0;W=f[U>>2]|0;f[h>>2]=S;Y=h+4|0;f[Y>>2]=T;f[i>>2]=V;Z=i+4|0;f[Z>>2]=W;Dd(d,Q,h,i);_=f[d>>2]|0;f[c>>2]=_;$=d+4|0;aa=f[$>>2]|0;ba=c+4|0;f[ba>>2]=aa;$q(k);u=g;return 1}function fd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0;d=u;u=u+32|0;e=d;g=d+20|0;h=d+24|0;i=d+8|0;j=f[a>>2]|0;k=j+8|0;l=j;j=f[l>>2]|0;m=f[l+4>>2]|0;l=Tn(j|0,m|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=I;n=Tn(l|0,k|0,(l|0)==0&(k|0)==0&1|0,0)|0;k=~~((+(j>>>0)+4294967296.0*+(m>>>0))/(+(n>>>0)+4294967296.0*+(I>>>0))*256.0+.5)>>>0;n=k>>>0<255?k:255;k=n+((n|0)==0&1)&255;b[h>>0]=k;n=a+12|0;m=a+16|0;j=((f[m>>2]|0)-(f[n>>2]|0)<<1)+64|0;f[i>>2]=0;l=i+4|0;f[l>>2]=0;f[i+8>>2]=0;if(!j)o=0;else{if((j|0)<0)mq(i);p=dn(j)|0;f[l>>2]=p;f[i>>2]=p;f[i+8>>2]=p+j;q=j;j=p;do{b[j>>0]=0;j=(f[l>>2]|0)+1|0;f[l>>2]=j;q=q+-1|0}while((q|0)!=0);o=f[i>>2]|0}q=a+28|0;j=(f[q>>2]|0)+-1|0;a:do if((j|0)>-1){p=a+24|0;r=j;s=0;t=4096;v=k;while(1){w=(f[p>>2]&1<>>0>>0){y=s;z=t}else{b[o+s>>0]=t;y=s+1|0;z=t>>>8}on(f[3780+(x<<3)>>2]|0,0,z|0,0)|0;A=z+(w?0:0-v&255)+(X((z+I|0)>>>(f[3780+(x<<3)+4>>2]|0),256-x|0)|0)|0;x=r+-1|0;if((x|0)<=-1){B=y;C=A;break a}r=x;s=y;t=A;v=b[h>>0]|0}}else{B=0;C=4096}while(0);y=f[m>>2]|0;if((f[n>>2]|0)==(y|0)){D=B;E=C}else{z=B;B=C;C=y;while(1){C=C+-4|0;y=f[C>>2]|0;k=31;j=z;v=B;while(1){t=b[h>>0]|0;s=(1<>>0>>0){F=j;G=v}else{b[o+j>>0]=v;F=j+1|0;G=v>>>8}on(f[3780+(r<<3)>>2]|0,0,G|0,0)|0;v=G+(s?0:0-t&255)+(X((G+I|0)>>>(f[3780+(r<<3)+4>>2]|0),256-r|0)|0)|0;if((k|0)<=0)break;else{k=k+-1|0;j=F}}if((f[n>>2]|0)==(C|0)){D=F;E=v;break}else{z=F;B=v}}}B=E+-4096|0;do if(B>>>0>=64){if(B>>>0<16384){F=o+D|0;z=E+12288|0;b[F>>0]=z;H=2;J=z>>>8;K=F+1|0;L=25;break}if(B>>>0<4194304){F=o+D|0;z=E+8384512|0;b[F>>0]=z;b[F+1>>0]=z>>>8;H=3;J=z>>>16;K=F+2|0;L=25}else M=D}else{H=1;J=B;K=o+D|0;L=25}while(0);if((L|0)==25){b[K>>0]=J;M=H+D|0}D=c+16|0;H=D;J=f[H+4>>2]|0;if(!((J|0)>0|(J|0)==0&(f[H>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];ye(c,e,h,h+1|0)|0}Nh(M,c)|0;h=f[i>>2]|0;H=D;D=f[H+4>>2]|0;if(!((D|0)>0|(D|0)==0&(f[H>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];ye(c,e,h,h+M|0)|0}M=e;f[M>>2]=0;f[M+4>>2]=0;cf(a,2,e);e=f[a+12>>2]|0;M=f[m>>2]|0;if((M|0)!=(e|0))f[m>>2]=M+(~((M+-4-e|0)>>>2)<<2);f[a+24>>2]=0;f[q>>2]=0;q=f[i>>2]|0;if(!q){u=d;return}if((f[l>>2]|0)!=(q|0))f[l>>2]=q;br(q);u=d;return}function gd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;c=u;u=u+16|0;b=c+8|0;d=c+4|0;e=c;g=a+64|0;h=f[g>>2]|0;if((f[h+28>>2]|0)==(f[h+24>>2]|0)){u=c;return}i=a+52|0;j=a+56|0;k=a+60|0;l=a+12|0;m=a+28|0;n=a+40|0;o=a+44|0;p=a+48|0;q=0;r=0;s=h;while(1){h=f[(f[s+24>>2]|0)+(r<<2)>>2]|0;if((h|0)==-1){t=q;v=s}else{w=q+1|0;f[b>>2]=q;x=f[j>>2]|0;if((x|0)==(f[k>>2]|0))Ci(i,b);else{f[x>>2]=q;f[j>>2]=x+4}f[d>>2]=h;f[e>>2]=0;a:do if(!(f[(f[l>>2]|0)+(r>>>5<<2)>>2]&1<<(r&31)))y=h;else{x=h+1|0;z=((x>>>0)%3|0|0)==0?h+-2|0:x;if(((z|0)!=-1?(f[(f[a>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)==0:0)?(x=f[(f[(f[g>>2]|0)+12>>2]|0)+(z<<2)>>2]|0,z=x+1|0,(x|0)!=-1):0){A=((z>>>0)%3|0|0)==0?x+-2|0:z;f[e>>2]=A;if((A|0)==-1){y=h;break}else B=A;while(1){f[d>>2]=B;A=B+1|0;z=((A>>>0)%3|0|0)==0?B+-2|0:A;if((z|0)==-1)break;if(f[(f[a>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)break;A=f[(f[(f[g>>2]|0)+12>>2]|0)+(z<<2)>>2]|0;z=A+1|0;if((A|0)==-1)break;x=((z>>>0)%3|0|0)==0?A+-2|0:z;f[e>>2]=x;if((x|0)==-1){y=B;break a}else B=x}f[e>>2]=-1;y=B;break}f[e>>2]=-1;y=h}while(0);f[(f[m>>2]|0)+(y<<2)>>2]=f[b>>2];h=f[o>>2]|0;if((h|0)==(f[p>>2]|0))Ci(n,d);else{f[h>>2]=f[d>>2];f[o>>2]=h+4}h=f[g>>2]|0;x=f[d>>2]|0;b:do if(((x|0)!=-1?(z=(((x>>>0)%3|0|0)==0?2:-1)+x|0,(z|0)!=-1):0)?(A=f[(f[h+12>>2]|0)+(z<<2)>>2]|0,(A|0)!=-1):0){z=A+(((A>>>0)%3|0|0)==0?2:-1)|0;f[e>>2]=z;if((z|0)!=-1&(z|0)!=(x|0)){A=w;C=z;while(1){z=C+1|0;D=((z>>>0)%3|0|0)==0?C+-2|0:z;do if(f[(f[a>>2]|0)+(D>>>5<<2)>>2]&1<<(D&31)){z=A+1|0;f[b>>2]=A;E=f[j>>2]|0;if((E|0)==(f[k>>2]|0))Ci(i,b);else{f[E>>2]=A;f[j>>2]=E+4}E=f[o>>2]|0;if((E|0)==(f[p>>2]|0)){Ci(n,e);F=z;break}else{f[E>>2]=f[e>>2];f[o>>2]=E+4;F=z;break}}else F=A;while(0);f[(f[m>>2]|0)+(f[e>>2]<<2)>>2]=f[b>>2];G=f[g>>2]|0;D=f[e>>2]|0;if((D|0)==-1)break;z=(((D>>>0)%3|0|0)==0?2:-1)+D|0;if((z|0)==-1)break;D=f[(f[G+12>>2]|0)+(z<<2)>>2]|0;if((D|0)==-1)break;C=D+(((D>>>0)%3|0|0)==0?2:-1)|0;f[e>>2]=C;if(!((C|0)!=-1?(C|0)!=(f[d>>2]|0):0)){H=F;I=G;break b}else A=F}f[e>>2]=-1;H=F;I=G}else{H=w;I=h}}else J=26;while(0);if((J|0)==26){J=0;f[e>>2]=-1;H=w;I=h}t=H;v=I}r=r+1|0;if(r>>>0>=(f[v+28>>2]|0)-(f[v+24>>2]|0)>>2>>>0)break;else{q=t;s=v}}u=c;return}function hd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;h=a+124|0;f[h>>2]=(f[h>>2]|0)+1;h=a+88|0;i=a+120|0;j=f[i>>2]|0;k=j+1|0;do if((j|0)!=-1){l=((k>>>0)%3|0|0)==0?j+-2|0:k;if(!((j>>>0)%3|0)){m=j+2|0;n=l;break}else{m=j+-1|0;n=l;break}}else{m=-1;n=-1}while(0);k=a+104|0;l=a+92|0;o=f[l>>2]|0;p=o+(n<<2)|0;q=f[k>>2]|0;r=q+(f[p>>2]<<2)|0;s=f[r>>2]|0;switch(b|0){case 1:case 0:{f[r>>2]=s+-1;r=q+(f[o+(m<<2)>>2]<<2)|0;f[r>>2]=(f[r>>2]|0)+-1;if((b|0)==1){if((m|0)!=-1?(r=f[(f[(f[h>>2]|0)+12>>2]|0)+(m<<2)>>2]|0,(r|0)!=-1):0){t=a+64|0;v=1;w=r;while(1){r=f[t>>2]|0;x=f[(f[r>>2]|0)+36>>2]|0;f[e>>2]=(w>>>0)/3|0;f[d>>2]=f[e>>2];if(Ra[x&127](r,d)|0){y=v;break}r=w+1|0;x=((r>>>0)%3|0|0)==0?w+-2|0:r;if((x|0)==-1){z=12;break}w=f[(f[(f[h>>2]|0)+12>>2]|0)+(x<<2)>>2]|0;x=v+1|0;if((w|0)==-1){y=x;break}else v=x}if((z|0)==12)y=v+1|0;A=y;B=f[k>>2]|0;C=f[l>>2]|0}else{A=1;B=q;C=o}f[B+(f[C+(f[i>>2]<<2)>>2]<<2)>>2]=A;A=a+108|0;i=f[A>>2]|0;C=i-B>>2;B=i;if((n|0)!=-1?(i=f[(f[(f[h>>2]|0)+12>>2]|0)+(n<<2)>>2]|0,(i|0)!=-1):0){n=a+64|0;y=1;v=i;while(1){i=f[n>>2]|0;w=f[(f[i>>2]|0)+36>>2]|0;f[g>>2]=(v>>>0)/3|0;f[d>>2]=f[g>>2];if(Ra[w&127](i,d)|0){D=y;break}i=v+1|0;f[(f[l>>2]|0)+((((i>>>0)%3|0|0)==0?v+-2|0:i)<<2)>>2]=C;i=(((v>>>0)%3|0|0)==0?2:-1)+v|0;if((i|0)==-1){z=20;break}v=f[(f[(f[h>>2]|0)+12>>2]|0)+(i<<2)>>2]|0;i=y+1|0;if((v|0)==-1){D=i;break}else y=i}if((z|0)==20)D=y+1|0;E=D;F=f[A>>2]|0}else{E=1;F=B}f[d>>2]=E;if(F>>>0<(f[a+112>>2]|0)>>>0){f[F>>2]=E;f[A>>2]=F+4}else Ci(k,d)}break}case 5:{k=q+(f[o+(j<<2)>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-1;k=q+(f[p>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-1;k=q+(f[o+(m<<2)>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-2;break}case 3:{k=q+(f[o+(j<<2)>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-1;k=q+(f[p>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-2;k=q+(f[o+(m<<2)>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-1;break}case 7:{k=q+(f[o+(j<<2)>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-2;k=q+(f[p>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-2;k=q+(f[o+(m<<2)>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-2;break}default:{}}k=a+116|0;m=f[k>>2]|0;if((m|0)==-1){f[k>>2]=b;u=c;return}o=f[a+128>>2]|0;if((s|0)<(o|0))G=o;else{q=f[a+132>>2]|0;G=(s|0)>(q|0)?q:s}s=G-o|0;o=f[a+136>>2]|0;a=f[3384+(m<<2)>>2]|0;f[d>>2]=a;m=o+(s*12|0)+4|0;G=f[m>>2]|0;if(G>>>0<(f[o+(s*12|0)+8>>2]|0)>>>0){f[G>>2]=a;f[m>>2]=G+4}else Ci(o+(s*12|0)|0,d);f[k>>2]=b;u=c;return}function id(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0;g=u;u=u+32|0;d=g+16|0;h=g+8|0;i=g;j=e>>>0>1073741823?-1:e<<2;k=_q(j)|0;hj(k|0,0,j|0)|0;j=f[a+28>>2]|0;l=a+36|0;m=f[l>>2]|0;n=f[m+4>>2]|0;o=f[m>>2]|0;p=n-o|0;a:do if((p|0)>4){q=p>>2;r=f[a+32>>2]|0;s=a+8|0;t=h+4|0;v=i+4|0;w=d+4|0;x=j+64|0;y=j+28|0;z=(e|0)>0;A=k+4|0;B=h+4|0;C=i+4|0;D=d+4|0;E=q+-1|0;if(n-o>>2>>>0>E>>>0){F=q;G=E;H=o}else{I=m;mq(I)}while(1){E=f[H+(G<<2)>>2]|0;q=X(G,e)|0;if((((E|0)!=-1?(f[(f[j>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)==0:0)?(J=f[(f[(f[x>>2]|0)+12>>2]|0)+(E<<2)>>2]|0,(J|0)!=-1):0)?(E=f[y>>2]|0,K=f[r>>2]|0,L=f[K+(f[E+(J<<2)>>2]<<2)>>2]|0,M=J+1|0,N=f[K+(f[E+((((M>>>0)%3|0|0)==0?J+-2|0:M)<<2)>>2]<<2)>>2]|0,M=f[K+(f[E+((((J>>>0)%3|0|0)==0?2:-1)+J<<2)>>2]<<2)>>2]|0,(L|0)<(G|0)&(N|0)<(G|0)&(M|0)<(G|0)):0){J=X(L,e)|0;L=X(N,e)|0;N=X(M,e)|0;if(z){M=0;do{f[k+(M<<2)>>2]=(f[b+(M+N<<2)>>2]|0)+(f[b+(M+L<<2)>>2]|0)-(f[b+(M+J<<2)>>2]|0);M=M+1|0}while((M|0)!=(e|0))}M=b+(q<<2)|0;J=c+(q<<2)|0;L=f[M+4>>2]|0;N=f[k>>2]|0;E=f[A>>2]|0;f[h>>2]=f[M>>2];f[B>>2]=L;f[i>>2]=N;f[C>>2]=E;Dd(d,s,h,i);f[J>>2]=f[d>>2];f[J+4>>2]=f[D>>2]}else{J=b+(q<<2)|0;E=b+((X(F+-2|0,e)|0)<<2)|0;N=c+(q<<2)|0;L=f[J+4>>2]|0;M=f[E>>2]|0;K=f[E+4>>2]|0;f[h>>2]=f[J>>2];f[t>>2]=L;f[i>>2]=M;f[v>>2]=K;Dd(d,s,h,i);f[N>>2]=f[d>>2];f[N+4>>2]=f[w>>2]}if((F|0)<=2)break a;N=f[l>>2]|0;H=f[N>>2]|0;K=G+-1|0;if((f[N+4>>2]|0)-H>>2>>>0<=K>>>0){I=N;break}else{N=G;G=K;F=N}}mq(I)}while(0);if((e|0)<=0){O=a+8|0;P=b+4|0;Q=f[b>>2]|0;R=f[P>>2]|0;S=k+4|0;T=f[k>>2]|0;U=f[S>>2]|0;f[h>>2]=Q;V=h+4|0;f[V>>2]=R;f[i>>2]=T;W=i+4|0;f[W>>2]=U;Dd(d,O,h,i);Y=f[d>>2]|0;f[c>>2]=Y;Z=d+4|0;_=f[Z>>2]|0;$=c+4|0;f[$>>2]=_;$q(k);u=g;return 1}hj(k|0,0,e<<2|0)|0;O=a+8|0;P=b+4|0;Q=f[b>>2]|0;R=f[P>>2]|0;S=k+4|0;T=f[k>>2]|0;U=f[S>>2]|0;f[h>>2]=Q;V=h+4|0;f[V>>2]=R;f[i>>2]=T;W=i+4|0;f[W>>2]=U;Dd(d,O,h,i);Y=f[d>>2]|0;f[c>>2]=Y;Z=d+4|0;_=f[Z>>2]|0;$=c+4|0;f[$>>2]=_;$q(k);u=g;return 1}function jd(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;c=a+4|0;if(!b){e=f[a>>2]|0;f[a>>2]=0;if(e|0)br(e);f[c>>2]=0;return}if(b>>>0>1073741823){e=ra(8)|0;Wo(e,14941);f[e>>2]=6944;va(e|0,1080,114)}e=dn(b<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)br(g);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;g=f[c>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=b+-1|0;i=(h&b|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(b>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=c;c=f[g>>2]|0;if(!c)return;else{k=j;l=g;m=c;n=g}a:while(1){g=l;c=m;j=n;b:while(1){c:do if(i){e=c;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=q+2|0;v=e+12|0;w=q+6|0;x=f[e>>2]|0;d:do if(!x)y=e;else{z=d[q>>1]|0;A=e;B=x;while(1){C=B+8|0;if(z<<16>>16!=(d[C>>1]|0)){y=A;break d}if((d[u>>1]|0)!=(d[C+2>>1]|0)){y=A;break d}if((d[v>>1]|0)!=(d[B+12>>1]|0)){y=A;break d}if((d[w>>1]|0)!=(d[C+6>>1]|0)){y=A;break d}C=f[B>>2]|0;if(!C){y=B;break}else{D=B;B=C;A=D}}}while(0);f[j>>2]=f[y>>2];f[y>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){E=43;break a}}}else{e=c;while(1){w=f[e+4>>2]|0;if(w>>>0>>0)F=w;else F=(w>>>0)%(b>>>0)|0;if((F|0)==(k|0)){p=e;break c}w=(f[a>>2]|0)+(F<<2)|0;if(!(f[w>>2]|0)){r=e;s=F;t=w;break b}w=e+8|0;v=w+2|0;u=e+12|0;x=w+6|0;q=f[e>>2]|0;e:do if(!q)G=e;else{A=d[w>>1]|0;B=e;z=q;while(1){D=z+8|0;if(A<<16>>16!=(d[D>>1]|0)){G=B;break e}if((d[v>>1]|0)!=(d[D+2>>1]|0)){G=B;break e}if((d[u>>1]|0)!=(d[z+12>>1]|0)){G=B;break e}if((d[x>>1]|0)!=(d[D+6>>1]|0)){G=B;break e}D=f[z>>2]|0;if(!D){G=z;break}else{C=z;z=D;B=C}}}while(0);f[j>>2]=f[G>>2];f[G>>2]=f[f[(f[a>>2]|0)+(F<<2)>>2]>>2];f[f[(f[a>>2]|0)+(F<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){E=43;break a}}}while(0);c=f[p>>2]|0;if(!c){E=43;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){E=43;break}else{k=s;l=r;n=r}}if((E|0)==43)return}function kd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)br(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;Wo(e,14941);f[e>>2]=6944;va(e|0,1080,114)}e=dn(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)br(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){c:do if(i){e=d;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=q+1|0;v=q+2|0;w=q+3|0;x=f[e>>2]|0;d:do if(!x)y=e;else{z=b[q>>0]|0;A=e;B=x;while(1){C=B+8|0;if(z<<24>>24!=(b[C>>0]|0)){y=A;break d}if((b[u>>0]|0)!=(b[C+1>>0]|0)){y=A;break d}if((b[v>>0]|0)!=(b[C+2>>0]|0)){y=A;break d}if((b[w>>0]|0)!=(b[C+3>>0]|0)){y=A;break d}C=f[B>>2]|0;if(!C){y=B;break}else{D=B;B=C;A=D}}}while(0);f[j>>2]=f[y>>2];f[y>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){E=43;break a}}}else{e=d;while(1){w=f[e+4>>2]|0;if(w>>>0>>0)F=w;else F=(w>>>0)%(c>>>0)|0;if((F|0)==(k|0)){p=e;break c}w=(f[a>>2]|0)+(F<<2)|0;if(!(f[w>>2]|0)){r=e;s=F;t=w;break b}w=e+8|0;v=w+1|0;u=w+2|0;x=w+3|0;q=f[e>>2]|0;e:do if(!q)G=e;else{A=b[w>>0]|0;B=e;z=q;while(1){D=z+8|0;if(A<<24>>24!=(b[D>>0]|0)){G=B;break e}if((b[v>>0]|0)!=(b[D+1>>0]|0)){G=B;break e}if((b[u>>0]|0)!=(b[D+2>>0]|0)){G=B;break e}if((b[x>>0]|0)!=(b[D+3>>0]|0)){G=B;break e}D=f[z>>2]|0;if(!D){G=z;break}else{C=z;z=D;B=C}}}while(0);f[j>>2]=f[G>>2];f[G>>2]=f[f[(f[a>>2]|0)+(F<<2)>>2]>>2];f[f[(f[a>>2]|0)+(F<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){E=43;break a}}}while(0);d=f[p>>2]|0;if(!d){E=43;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){E=43;break}else{k=s;l=r;n=r}}if((E|0)==43)return}function ld(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)br(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;Wo(d,14941);f[d>>2]=6944;va(d|0,1080,114)}d=dn(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)br(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){e=k;c=l;i=m;b:while(1){c:do if(h){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0)){o=d;break c}p=(f[a>>2]|0)+(n<<2)|0;if(!(f[p>>2]|0)){q=d;r=n;s=p;break b}p=d+12|0;t=d+16|0;u=d+20|0;v=f[d>>2]|0;d:do if(!v)w=d;else{x=f[d+8>>2]|0;y=d;z=v;while(1){if((x|0)!=(f[z+8>>2]|0)){w=y;break d}if((f[p>>2]|0)!=(f[z+12>>2]|0)){w=y;break d}if((f[t>>2]|0)!=(f[z+16>>2]|0)){w=y;break d}if((f[u>>2]|0)!=(f[z+20>>2]|0)){w=y;break d}A=f[z>>2]|0;if(!A){w=z;break}else{B=z;z=A;y=B}}}while(0);f[i>>2]=f[w>>2];f[w>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){C=43;break a}}}else{d=c;while(1){u=f[d+4>>2]|0;if(u>>>0>>0)D=u;else D=(u>>>0)%(b>>>0)|0;if((D|0)==(j|0)){o=d;break c}u=(f[a>>2]|0)+(D<<2)|0;if(!(f[u>>2]|0)){q=d;r=D;s=u;break b}u=d+12|0;t=d+16|0;p=d+20|0;v=f[d>>2]|0;e:do if(!v)E=d;else{y=f[d+8>>2]|0;z=d;x=v;while(1){if((y|0)!=(f[x+8>>2]|0)){E=z;break e}if((f[u>>2]|0)!=(f[x+12>>2]|0)){E=z;break e}if((f[t>>2]|0)!=(f[x+16>>2]|0)){E=z;break e}if((f[p>>2]|0)!=(f[x+20>>2]|0)){E=z;break e}B=f[x>>2]|0;if(!B){E=x;break}else{A=x;x=B;z=A}}}while(0);f[i>>2]=f[E>>2];f[E>>2]=f[f[(f[a>>2]|0)+(D<<2)>>2]>>2];f[f[(f[a>>2]|0)+(D<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){C=43;break a}}}while(0);c=f[o>>2]|0;if(!c){C=43;break a}else{e=o;i=o}}f[s>>2]=i;l=f[q>>2]|0;if(!l){C=43;break}else{j=r;k=q;m=q}}if((C|0)==43)return}function md(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0;i=u;u=u+352|0;j=i+340|0;k=i+336|0;l=i+80|0;m=i+48|0;n=i;hj(l|0,0,256)|0;o=f[e+4>>2]|0;p=f[e>>2]|0;q=p;if((o|0)!=(p|0)){r=o-p>>2;p=0;do{o=l+(f[q+(p<<2)>>2]<<3)|0;s=o;t=Tn(f[s>>2]|0,f[s+4>>2]|0,1,0)|0;s=o;f[s>>2]=t;f[s+4>>2]=I;p=p+1|0}while(p>>>0>>0)}Cn(m);r=Rn(c|0,((c|0)<0)<<31>>31|0,5)|0;p=I;q=n+40|0;s=q;f[s>>2]=0;f[s+4>>2]=0;s=n;t=s+36|0;do{f[s>>2]=0;s=s+4|0}while((s|0)<(t|0));$c(n,l,32,g)|0;l=n+16|0;s=Rn(f[l>>2]|0,f[l+4>>2]|0,1)|0;l=g+4|0;t=(f[l>>2]|0)-(f[g>>2]|0)|0;o=q;f[o>>2]=t;f[o+4>>2]=0;o=Tn(s|0,I|0,39,0)|0;s=Wn(o|0,I|0,3)|0;o=Tn(s|0,I|0,8,0)|0;s=Tn(o|0,I|0,t|0,0)|0;vl(g,s,I);s=n+24|0;f[s>>2]=(f[g>>2]|0)+(f[q>>2]|0);q=n+28|0;f[q>>2]=0;t=n+32|0;f[t>>2]=16384;li(m,r,p,0)|0;p=c-d|0;if((p|0)>-1){c=(d|0)>0;r=m+16|0;o=m+12|0;v=p;do{w=f[e>>2]|0;x=f[w+(((v|0)/(d|0)|0)<<2)>>2]|0;y=f[n>>2]|0;z=f[y+(x<<3)>>2]|0;A=f[t>>2]|0;B=z<<10;if(A>>>0>>0){C=A;D=w}else{w=A;do{A=f[s>>2]|0;E=f[q>>2]|0;f[q>>2]=E+1;b[A+E>>0]=w;w=(f[t>>2]|0)>>>8;f[t>>2]=w}while(w>>>0>=B>>>0);C=w;D=f[e>>2]|0}f[t>>2]=(((C>>>0)/(z>>>0)|0)<<12)+((C>>>0)%(z>>>0)|0)+(f[y+(x<<3)+4>>2]|0);B=p-v|0;E=f[D+(((B|0)/(d|0)|0)<<2)>>2]|0;if(c&(E|0)>0){A=0;do{F=f[a+(A+B<<2)>>2]|0;G=r;H=f[G+4>>2]|0;if((H|0)>0|(H|0)==0&(f[G>>2]|0)>>>0>0){G=f[o>>2]|0;H=G+4|0;J=0;K=f[H>>2]|0;do{L=K>>>3;M=K&7;N=(f[G>>2]|0)+L|0;b[N>>0]=(1<>0]|0);N=(f[G>>2]|0)+L|0;b[N>>0]=(F>>>J&1)<>0]|0);K=(f[H>>2]|0)+1|0;f[H>>2]=K;J=J+1|0}while((J|0)!=(E|0))}A=A+1|0}while((A|0)!=(d|0))}v=v-d|0}while((v|0)>-1)}Lf(n,g);Qf(m);v=f[m>>2]|0;d=m+4|0;o=g+16|0;r=f[o+4>>2]|0;if(!((r|0)>0|(r|0)==0&(f[o>>2]|0)>>>0>0)){o=(f[d>>2]|0)-v|0;f[k>>2]=f[l>>2];f[j>>2]=f[k>>2];ye(g,j,v,v+o|0)|0}o=f[n>>2]|0;if(o|0){v=n+4|0;n=f[v>>2]|0;if((n|0)!=(o|0))f[v>>2]=n+(~((n+-8-o|0)>>>3)<<3);br(o)}o=m+12|0;n=f[o>>2]|0;f[o>>2]=0;if(n|0)br(n);n=f[m>>2]|0;if(!n){u=i;return 1}if((f[d>>2]|0)!=(n|0))f[d>>2]=n;br(n);u=i;return 1}function nd(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;c=a+4|0;if(!b){e=f[a>>2]|0;f[a>>2]=0;if(e|0)br(e);f[c>>2]=0;return}if(b>>>0>1073741823){e=ra(8)|0;Wo(e,14941);f[e>>2]=6944;va(e|0,1080,114)}e=dn(b<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)br(g);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;g=f[c>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=b+-1|0;i=(h&b|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(b>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=c;c=f[g>>2]|0;if(!c)return;else{k=j;l=g;m=c;n=g}a:while(1){g=l;c=m;j=n;b:while(1){c:do if(i){e=c;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=e+12|0;v=f[e>>2]|0;d:do if(!v)w=e;else{x=d[q>>1]|0;y=q+2|0;z=e;A=v;while(1){B=A+8|0;if(x<<16>>16!=(d[B>>1]|0)){w=z;break d}if((d[y>>1]|0)!=(d[B+2>>1]|0)){w=z;break d}if((d[u>>1]|0)!=(d[A+12>>1]|0)){w=z;break d}B=f[A>>2]|0;if(!B){w=A;break}else{C=A;A=B;z=C}}}while(0);f[j>>2]=f[w>>2];f[w>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){D=41;break a}}}else{e=c;while(1){u=f[e+4>>2]|0;if(u>>>0>>0)E=u;else E=(u>>>0)%(b>>>0)|0;if((E|0)==(k|0)){p=e;break c}u=(f[a>>2]|0)+(E<<2)|0;if(!(f[u>>2]|0)){r=e;s=E;t=u;break b}u=e+8|0;v=e+12|0;q=f[e>>2]|0;e:do if(!q)F=e;else{z=d[u>>1]|0;A=u+2|0;y=e;x=q;while(1){C=x+8|0;if(z<<16>>16!=(d[C>>1]|0)){F=y;break e}if((d[A>>1]|0)!=(d[C+2>>1]|0)){F=y;break e}if((d[v>>1]|0)!=(d[x+12>>1]|0)){F=y;break e}C=f[x>>2]|0;if(!C){F=x;break}else{B=x;x=C;y=B}}}while(0);f[j>>2]=f[F>>2];f[F>>2]=f[f[(f[a>>2]|0)+(E<<2)>>2]>>2];f[f[(f[a>>2]|0)+(E<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){D=41;break a}}}while(0);c=f[p>>2]|0;if(!c){D=41;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){D=41;break}else{k=s;l=r;n=r}}if((D|0)==41)return}function od(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)br(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;Wo(e,14941);f[e>>2]=6944;va(e|0,1080,114)}e=dn(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)br(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){c:do if(i){e=d;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=q+1|0;v=q+2|0;w=f[e>>2]|0;d:do if(!w)x=e;else{y=b[q>>0]|0;z=e;A=w;while(1){B=A+8|0;if(y<<24>>24!=(b[B>>0]|0)){x=z;break d}if((b[u>>0]|0)!=(b[B+1>>0]|0)){x=z;break d}if((b[v>>0]|0)!=(b[B+2>>0]|0)){x=z;break d}B=f[A>>2]|0;if(!B){x=A;break}else{C=A;A=B;z=C}}}while(0);f[j>>2]=f[x>>2];f[x>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){D=41;break a}}}else{e=d;while(1){v=f[e+4>>2]|0;if(v>>>0>>0)E=v;else E=(v>>>0)%(c>>>0)|0;if((E|0)==(k|0)){p=e;break c}v=(f[a>>2]|0)+(E<<2)|0;if(!(f[v>>2]|0)){r=e;s=E;t=v;break b}v=e+8|0;u=v+1|0;w=v+2|0;q=f[e>>2]|0;e:do if(!q)F=e;else{z=b[v>>0]|0;A=e;y=q;while(1){C=y+8|0;if(z<<24>>24!=(b[C>>0]|0)){F=A;break e}if((b[u>>0]|0)!=(b[C+1>>0]|0)){F=A;break e}if((b[w>>0]|0)!=(b[C+2>>0]|0)){F=A;break e}C=f[y>>2]|0;if(!C){F=y;break}else{B=y;y=C;A=B}}}while(0);f[j>>2]=f[F>>2];f[F>>2]=f[f[(f[a>>2]|0)+(E<<2)>>2]>>2];f[f[(f[a>>2]|0)+(E<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){D=41;break a}}}while(0);d=f[p>>2]|0;if(!d){D=41;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){D=41;break}else{k=s;l=r;n=r}}if((D|0)==41)return}function pd(a,b){a=+a;b=+b;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0.0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0.0;p[s>>3]=a;c=f[s>>2]|0;d=f[s+4>>2]|0;p[s>>3]=b;e=f[s>>2]|0;g=f[s+4>>2]|0;h=Wn(c|0,d|0,52)|0;i=h&2047;h=Wn(e|0,g|0,52)|0;j=h&2047;h=d&-2147483648;k=Rn(e|0,g|0,1)|0;l=I;a:do if(!((k|0)==0&(l|0)==0)?(m=xo(b)|0,n=I&2147483647,!((i|0)==2047|(n>>>0>2146435072|(n|0)==2146435072&m>>>0>0))):0){m=Rn(c|0,d|0,1)|0;n=I;if(!(n>>>0>l>>>0|(n|0)==(l|0)&m>>>0>k>>>0))return +((m|0)==(k|0)&(n|0)==(l|0)?a*0.0:a);if(!i){n=Rn(c|0,d|0,12)|0;m=I;if((m|0)>-1|(m|0)==-1&n>>>0>4294967295){o=0;q=n;n=m;while(1){m=o+-1|0;q=Rn(q|0,n|0,1)|0;n=I;if(!((n|0)>-1|(n|0)==-1&q>>>0>4294967295)){r=m;break}else o=m}}else r=0;o=Rn(c|0,d|0,1-r|0)|0;t=r;u=o;v=I}else{t=i;u=c;v=d&1048575|1048576}if(!j){o=Rn(e|0,g|0,12)|0;q=I;if((q|0)>-1|(q|0)==-1&o>>>0>4294967295){n=0;m=o;o=q;while(1){q=n+-1|0;m=Rn(m|0,o|0,1)|0;o=I;if(!((o|0)>-1|(o|0)==-1&m>>>0>4294967295)){w=q;break}else n=q}}else w=0;n=Rn(e|0,g|0,1-w|0)|0;x=w;y=n;z=I}else{x=j;y=e;z=g&1048575|1048576}n=Vn(u|0,v|0,y|0,z|0)|0;m=I;o=(m|0)>-1|(m|0)==-1&n>>>0>4294967295;b:do if((t|0)>(x|0)){q=t;A=m;B=o;C=u;D=v;E=n;while(1){if(B)if((E|0)==0&(A|0)==0)break;else{F=E;G=A}else{F=C;G=D}H=Rn(F|0,G|0,1)|0;J=I;K=q+-1|0;L=Vn(H|0,J|0,y|0,z|0)|0;M=I;N=(M|0)>-1|(M|0)==-1&L>>>0>4294967295;if((K|0)>(x|0)){q=K;A=M;B=N;C=H;D=J;E=L}else{O=K;P=N;Q=L;R=M;S=H;T=J;break b}}U=a*0.0;break a}else{O=t;P=o;Q=n;R=m;S=u;T=v}while(0);if(P)if((Q|0)==0&(R|0)==0){U=a*0.0;break}else{V=R;W=Q}else{V=T;W=S}if(V>>>0<1048576|(V|0)==1048576&W>>>0<0){m=O;n=W;o=V;while(1){E=Rn(n|0,o|0,1)|0;D=I;C=m+-1|0;if(D>>>0<1048576|(D|0)==1048576&E>>>0<0){m=C;n=E;o=D}else{X=C;Y=E;Z=D;break}}}else{X=O;Y=W;Z=V}if((X|0)>0){o=Tn(Y|0,Z|0,0,-1048576)|0;n=I;m=Rn(X|0,0,52)|0;_=n|I;$=o|m}else{m=Wn(Y|0,Z|0,1-X|0)|0;_=I;$=m}f[s>>2]=$;f[s+4>>2]=_|h;U=+p[s>>3]}else aa=3;while(0);if((aa|0)==3){ba=a*b;U=ba/ba}return +U}function qd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)br(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;Wo(d,14941);f[d>>2]=6944;va(d|0,1080,114)}d=dn(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)br(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){e=k;c=l;i=m;b:while(1){c:do if(h){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0)){o=d;break c}p=(f[a>>2]|0)+(n<<2)|0;if(!(f[p>>2]|0)){q=d;r=n;s=p;break b}p=d+12|0;t=d+16|0;u=f[d>>2]|0;d:do if(!u)v=d;else{w=f[d+8>>2]|0;x=d;y=u;while(1){if((w|0)!=(f[y+8>>2]|0)){v=x;break d}if((f[p>>2]|0)!=(f[y+12>>2]|0)){v=x;break d}if((f[t>>2]|0)!=(f[y+16>>2]|0)){v=x;break d}z=f[y>>2]|0;if(!z){v=y;break}else{A=y;y=z;x=A}}}while(0);f[i>>2]=f[v>>2];f[v>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){B=41;break a}}}else{d=c;while(1){t=f[d+4>>2]|0;if(t>>>0>>0)C=t;else C=(t>>>0)%(b>>>0)|0;if((C|0)==(j|0)){o=d;break c}t=(f[a>>2]|0)+(C<<2)|0;if(!(f[t>>2]|0)){q=d;r=C;s=t;break b}t=d+12|0;p=d+16|0;u=f[d>>2]|0;e:do if(!u)D=d;else{x=f[d+8>>2]|0;y=d;w=u;while(1){if((x|0)!=(f[w+8>>2]|0)){D=y;break e}if((f[t>>2]|0)!=(f[w+12>>2]|0)){D=y;break e}if((f[p>>2]|0)!=(f[w+16>>2]|0)){D=y;break e}A=f[w>>2]|0;if(!A){D=w;break}else{z=w;w=A;y=z}}}while(0);f[i>>2]=f[D>>2];f[D>>2]=f[f[(f[a>>2]|0)+(C<<2)>>2]>>2];f[f[(f[a>>2]|0)+(C<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){B=41;break a}}}while(0);c=f[o>>2]|0;if(!c){B=41;break a}else{e=o;i=o}}f[s>>2]=i;l=f[q>>2]|0;if(!l){B=41;break}else{j=r;k=q;m=q}}if((B|0)==41)return}function rd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)br(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;Wo(e,14941);f[e>>2]=6944;va(e|0,1080,114)}e=dn(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)br(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){o=d;while(1){e=f[o+4>>2]|0;if(!i)if(e>>>0>>0)p=e;else p=(e>>>0)%(c>>>0)|0;else p=e&h;if((p|0)==(k|0))break;q=(f[a>>2]|0)+(p<<2)|0;if(!(f[q>>2]|0))break b;e=f[o>>2]|0;c:do if(!e)r=o;else{s=o+8|0;t=b[s+11>>0]|0;u=t<<24>>24<0;v=t&255;t=u?f[o+12>>2]|0:v;w=(t|0)==0;if(u){u=o;x=e;while(1){y=x+8|0;z=b[y+11>>0]|0;A=z<<24>>24<0;if((t|0)!=((A?f[x+12>>2]|0:z&255)|0)){r=u;break c}if(!w?Pk(f[s>>2]|0,A?f[y>>2]|0:y,t)|0:0){r=u;break c}y=f[x>>2]|0;if(!y){r=x;break c}else{A=x;x=y;u=A}}}if(w){u=o;x=e;while(1){A=b[x+8+11>>0]|0;if((A<<24>>24<0?f[x+12>>2]|0:A&255)|0){r=u;break c}A=f[x>>2]|0;if(!A){r=x;break c}else{y=x;x=A;u=y}}}u=o;x=e;while(1){w=x+8|0;y=b[w+11>>0]|0;A=y<<24>>24<0;if((t|0)!=((A?f[x+12>>2]|0:y&255)|0)){r=u;break c}y=A?f[w>>2]|0:w;if((b[y>>0]|0)==(f[s>>2]&255)<<24>>24){B=s;C=v;D=y}else{r=u;break c}while(1){C=C+-1|0;B=B+1|0;if(!C)break;D=D+1|0;if((b[B>>0]|0)!=(b[D>>0]|0)){r=u;break c}}y=f[x>>2]|0;if(!y){r=x;break}else{w=x;x=y;u=w}}}while(0);f[j>>2]=f[r>>2];f[r>>2]=f[f[(f[a>>2]|0)+(p<<2)>>2]>>2];f[f[(f[a>>2]|0)+(p<<2)>>2]>>2]=o;e=f[g>>2]|0;if(!e){E=43;break a}else o=e}d=f[o>>2]|0;if(!d){E=43;break a}else{g=o;j=o}}f[q>>2]=j;m=f[o>>2]|0;if(!m){E=43;break}else{k=p;l=o;n=o}}if((E|0)==43)return}function sd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+48|0;d=c+8|0;e=c+4|0;g=c;h=a+44|0;Nh(f[h>>2]|0,b)|0;if(f[h>>2]|0){rn(d);lk(d);i=f[h>>2]|0;if((i|0)>0){h=a+40|0;j=i;do{i=j;j=j+-1|0;Vi(d,(f[(f[h>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)|0)!=0)}while((i|0)>1)}fd(d,b);tj(d)}j=a+56|0;Nh(f[j>>2]|0,b)|0;if(f[j>>2]|0){rn(d);lk(d);h=f[j>>2]|0;if((h|0)>1){j=a+52|0;i=h;do{h=i;i=i+-2|0;Vi(d,(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)!=0);k=h+-1|0;Vi(d,(f[(f[j>>2]|0)+(k>>>5<<2)>>2]&1<<(k&31)|0)!=0)}while((h|0)>3)}fd(d,b);tj(d)}j=a+68|0;Nh(f[j>>2]|0,b)|0;if(f[j>>2]|0){rn(d);lk(d);i=f[j>>2]|0;if((i|0)>2){j=a+64|0;h=i;do{i=h;h=h+-3|0;Vi(d,(f[(f[j>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)|0)!=0);k=i+-2|0;Vi(d,(f[(f[j>>2]|0)+(k>>>5<<2)>>2]&1<<(k&31)|0)!=0);k=i+-1|0;Vi(d,(f[(f[j>>2]|0)+(k>>>5<<2)>>2]&1<<(k&31)|0)!=0)}while((i|0)>5)}fd(d,b);tj(d)}j=a+80|0;Nh(f[j>>2]|0,b)|0;if(f[j>>2]|0){rn(d);lk(d);h=f[j>>2]|0;if((h|0)>3){j=a+76|0;i=h;do{h=i;i=i+-4|0;Vi(d,(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)!=0);k=h+-3|0;Vi(d,(f[(f[j>>2]|0)+(k>>>5<<2)>>2]&1<<(k&31)|0)!=0);k=h+-2|0;Vi(d,(f[(f[j>>2]|0)+(k>>>5<<2)>>2]&1<<(k&31)|0)!=0);k=h+-1|0;Vi(d,(f[(f[j>>2]|0)+(k>>>5<<2)>>2]&1<<(k&31)|0)!=0)}while((h|0)>7)}fd(d,b);tj(d)}f[g>>2]=f[a+12>>2];j=b+16|0;i=j;h=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&h>>>0>0){l=k;m=h}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;h=j;l=f[h+4>>2]|0;m=f[h>>2]|0}f[g>>2]=f[a+20>>2];if((l|0)>0|(l|0)==0&m>>>0>0){u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;u=c;return 1}function td(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+48|0;d=c+8|0;e=c+4|0;g=c;h=a+64|0;Nh(f[h>>2]|0,b)|0;if(f[h>>2]|0){rn(d);lk(d);i=f[h>>2]|0;if((i|0)>0){h=a+60|0;j=i;do{i=j;j=j+-1|0;Vi(d,(f[(f[h>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)|0)!=0)}while((i|0)>1)}fd(d,b);tj(d)}j=a+76|0;Nh(f[j>>2]|0,b)|0;if(f[j>>2]|0){rn(d);lk(d);h=f[j>>2]|0;if((h|0)>1){j=a+72|0;i=h;do{h=i;i=i+-2|0;Vi(d,(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)!=0);k=h+-1|0;Vi(d,(f[(f[j>>2]|0)+(k>>>5<<2)>>2]&1<<(k&31)|0)!=0)}while((h|0)>3)}fd(d,b);tj(d)}j=a+88|0;Nh(f[j>>2]|0,b)|0;if(f[j>>2]|0){rn(d);lk(d);i=f[j>>2]|0;if((i|0)>2){j=a+84|0;h=i;do{i=h;h=h+-3|0;Vi(d,(f[(f[j>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)|0)!=0);k=i+-2|0;Vi(d,(f[(f[j>>2]|0)+(k>>>5<<2)>>2]&1<<(k&31)|0)!=0);k=i+-1|0;Vi(d,(f[(f[j>>2]|0)+(k>>>5<<2)>>2]&1<<(k&31)|0)!=0)}while((i|0)>5)}fd(d,b);tj(d)}j=a+100|0;Nh(f[j>>2]|0,b)|0;if(f[j>>2]|0){rn(d);lk(d);h=f[j>>2]|0;if((h|0)>3){j=a+96|0;i=h;do{h=i;i=i+-4|0;Vi(d,(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)!=0);k=h+-3|0;Vi(d,(f[(f[j>>2]|0)+(k>>>5<<2)>>2]&1<<(k&31)|0)!=0);k=h+-2|0;Vi(d,(f[(f[j>>2]|0)+(k>>>5<<2)>>2]&1<<(k&31)|0)!=0);k=h+-1|0;Vi(d,(f[(f[j>>2]|0)+(k>>>5<<2)>>2]&1<<(k&31)|0)!=0)}while((h|0)>7)}fd(d,b);tj(d)}f[g>>2]=f[a+12>>2];j=b+16|0;i=j;h=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&h>>>0>0){l=k;m=h}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;h=j;l=f[h+4>>2]|0;m=f[h>>2]|0}f[g>>2]=f[a+16>>2];if((l|0)>0|(l|0)==0&m>>>0>0){u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;u=c;return 1}function ud(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;c=a+4|0;if(!b){e=f[a>>2]|0;f[a>>2]=0;if(e|0)br(e);f[c>>2]=0;return}if(b>>>0>1073741823){e=ra(8)|0;Wo(e,14941);f[e>>2]=6944;va(e|0,1080,114)}e=dn(b<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)br(g);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;g=f[c>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=b+-1|0;i=(h&b|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(b>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=c;c=f[g>>2]|0;if(!c)return;else{k=j;l=g;m=c;n=g}a:while(1){g=l;c=m;j=n;b:while(1){c:do if(i){e=c;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=f[e>>2]|0;d:do if(!u)v=e;else{w=d[q>>1]|0;x=q+2|0;y=e;z=u;while(1){A=z+8|0;if(w<<16>>16!=(d[A>>1]|0)){v=y;break d}if((d[x>>1]|0)!=(d[A+2>>1]|0)){v=y;break d}A=f[z>>2]|0;if(!A){v=z;break}else{B=z;z=A;y=B}}}while(0);f[j>>2]=f[v>>2];f[v>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){C=39;break a}}}else{e=c;while(1){u=f[e+4>>2]|0;if(u>>>0>>0)D=u;else D=(u>>>0)%(b>>>0)|0;if((D|0)==(k|0)){p=e;break c}u=(f[a>>2]|0)+(D<<2)|0;if(!(f[u>>2]|0)){r=e;s=D;t=u;break b}u=e+8|0;q=f[e>>2]|0;e:do if(!q)E=e;else{y=d[u>>1]|0;z=u+2|0;x=e;w=q;while(1){B=w+8|0;if(y<<16>>16!=(d[B>>1]|0)){E=x;break e}if((d[z>>1]|0)!=(d[B+2>>1]|0)){E=x;break e}B=f[w>>2]|0;if(!B){E=w;break}else{A=w;w=B;x=A}}}while(0);f[j>>2]=f[E>>2];f[E>>2]=f[f[(f[a>>2]|0)+(D<<2)>>2]>>2];f[f[(f[a>>2]|0)+(D<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){C=39;break a}}}while(0);c=f[p>>2]|0;if(!c){C=39;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){C=39;break}else{k=s;l=r;n=r}}if((C|0)==39)return}function vd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)br(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;Wo(e,14941);f[e>>2]=6944;va(e|0,1080,114)}e=dn(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)br(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){c:do if(i){e=d;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=f[e>>2]|0;d:do if(!u)v=e;else{w=b[q>>0]|0;x=q+1|0;y=e;z=u;while(1){A=z+8|0;if(w<<24>>24!=(b[A>>0]|0)){v=y;break d}if((b[x>>0]|0)!=(b[A+1>>0]|0)){v=y;break d}A=f[z>>2]|0;if(!A){v=z;break}else{B=z;z=A;y=B}}}while(0);f[j>>2]=f[v>>2];f[v>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){C=39;break a}}}else{e=d;while(1){u=f[e+4>>2]|0;if(u>>>0>>0)D=u;else D=(u>>>0)%(c>>>0)|0;if((D|0)==(k|0)){p=e;break c}u=(f[a>>2]|0)+(D<<2)|0;if(!(f[u>>2]|0)){r=e;s=D;t=u;break b}u=e+8|0;q=f[e>>2]|0;e:do if(!q)E=e;else{y=b[u>>0]|0;z=u+1|0;x=e;w=q;while(1){B=w+8|0;if(y<<24>>24!=(b[B>>0]|0)){E=x;break e}if((b[z>>0]|0)!=(b[B+1>>0]|0)){E=x;break e}B=f[w>>2]|0;if(!B){E=w;break}else{A=w;w=B;x=A}}}while(0);f[j>>2]=f[E>>2];f[E>>2]=f[f[(f[a>>2]|0)+(D<<2)>>2]>>2];f[f[(f[a>>2]|0)+(D<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){C=39;break a}}}while(0);d=f[p>>2]|0;if(!d){C=39;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){C=39;break}else{k=s;l=r;n=r}}if((C|0)==39)return}function wd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;c=u;u=u+48|0;d=c+32|0;e=c+28|0;g=c+16|0;h=c;i=a+16|0;j=f[i>>2]|0;if(j|0){k=f[b>>2]|0;l=i;m=j;a:while(1){j=m;while(1){if((f[j+16>>2]|0)>=(k|0))break;n=f[j+4>>2]|0;if(!n){o=l;break a}else j=n}m=f[j>>2]|0;if(!m){o=j;break}else l=j}if((o|0)!=(i|0)?(k|0)>=(f[o+16>>2]|0):0){p=o;q=p+20|0;u=c;return q|0}}wp(g);f[h>>2]=f[b>>2];b=h+4|0;f[h+8>>2]=0;o=h+12|0;f[o>>2]=0;k=h+8|0;f[b>>2]=k;l=f[g>>2]|0;m=g+4|0;if((l|0)!=(m|0)){n=k;r=l;while(1){l=r+16|0;f[e>>2]=n;f[d>>2]=f[e>>2];Wg(b,d,l,l)|0;l=f[r+4>>2]|0;if(!l){s=r+8|0;t=f[s>>2]|0;if((f[t>>2]|0)==(r|0))v=t;else{t=s;do{s=f[t>>2]|0;t=s+8|0;w=f[t>>2]|0}while((f[w>>2]|0)!=(s|0));v=w}}else{t=l;while(1){j=f[t>>2]|0;if(!j)break;else t=j}v=t}if((v|0)==(m|0))break;else r=v}}v=a+12|0;r=f[i>>2]|0;do if(r){d=f[h>>2]|0;e=a+16|0;n=r;while(1){l=f[n+16>>2]|0;if((d|0)<(l|0)){j=f[n>>2]|0;if(!j){x=23;break}else{y=n;z=j}}else{if((l|0)>=(d|0)){x=27;break}A=n+4|0;l=f[A>>2]|0;if(!l){x=26;break}else{y=A;z=l}}e=y;n=z}if((x|0)==23){B=n;C=n;break}else if((x|0)==26){B=n;C=A;break}else if((x|0)==27){B=n;C=e;break}}else{B=i;C=i}while(0);i=f[C>>2]|0;if(!i){x=dn(32)|0;f[x+16>>2]=f[h>>2];A=x+20|0;f[A>>2]=f[b>>2];z=x+24|0;y=f[h+8>>2]|0;f[z>>2]=y;r=f[o>>2]|0;f[x+28>>2]=r;if(!r)f[A>>2]=z;else{f[y+8>>2]=z;f[b>>2]=k;f[k>>2]=0;f[o>>2]=0}f[x>>2]=0;f[x+4>>2]=0;f[x+8>>2]=B;f[C>>2]=x;B=f[f[v>>2]>>2]|0;if(!B)D=x;else{f[v>>2]=B;D=f[C>>2]|0}Ae(f[a+16>>2]|0,D);D=a+20|0;f[D>>2]=(f[D>>2]|0)+1;E=x}else E=i;sj(h+4|0,f[k>>2]|0);sj(g,f[m>>2]|0);p=E;q=p+20|0;u=c;return q|0}function xd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;d=b[c+11>>0]|0;e=d<<24>>24<0;g=e?f[c>>2]|0:c;i=e?f[c+4>>2]|0:d&255;if(i>>>0>3){d=g;c=i;e=i;while(1){j=X(h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24,1540483477)|0;c=(X(j>>>24^j,1540483477)|0)^(X(c,1540483477)|0);e=e+-4|0;if(e>>>0<=3)break;else d=d+4|0}d=i+-4|0;e=d&-4;k=d-e|0;l=g+(e+4)|0;m=c}else{k=i;l=g;m=i}switch(k|0){case 3:{n=h[l+2>>0]<<16^m;o=6;break}case 2:{n=m;o=6;break}case 1:{p=m;o=7;break}default:q=m}if((o|0)==6){p=h[l+1>>0]<<8^n;o=7}if((o|0)==7)q=X(p^h[l>>0],1540483477)|0;l=X(q>>>13^q,1540483477)|0;q=l>>>15^l;l=f[a+4>>2]|0;if(!l){r=0;return r|0}p=l+-1|0;n=(p&l|0)==0;if(!n)if(q>>>0>>0)s=q;else s=(q>>>0)%(l>>>0)|0;else s=q&p;m=f[(f[a>>2]|0)+(s<<2)>>2]|0;if(!m){r=0;return r|0}a=f[m>>2]|0;if(!a){r=0;return r|0}m=(i|0)==0;if(n){n=a;a:while(1){k=f[n+4>>2]|0;c=(k|0)==(q|0);if(!(c|(k&p|0)==(s|0))){r=0;o=40;break}do if(c?(k=n+8|0,e=b[k+11>>0]|0,d=e<<24>>24<0,j=e&255,((d?f[n+12>>2]|0:j)|0)==(i|0)):0){e=f[k>>2]|0;t=d?e:k;if(d){if(m){r=n;o=40;break a}if(!(Pk(t,g,i)|0)){r=n;o=40;break a}else break}if(m){r=n;o=40;break a}if((b[g>>0]|0)==(e&255)<<24>>24){e=k;k=j;j=g;do{k=k+-1|0;e=e+1|0;if(!k){r=n;o=40;break a}j=j+1|0}while((b[e>>0]|0)==(b[j>>0]|0))}}while(0);n=f[n>>2]|0;if(!n){r=0;o=40;break}}if((o|0)==40)return r|0}else u=a;b:while(1){a=f[u+4>>2]|0;do if((a|0)==(q|0)){n=u+8|0;p=b[n+11>>0]|0;c=p<<24>>24<0;j=p&255;if(((c?f[u+12>>2]|0:j)|0)==(i|0)){p=f[n>>2]|0;e=c?p:n;if(c){if(m){r=u;o=40;break b}if(!(Pk(e,g,i)|0)){r=u;o=40;break b}else break}if(m){r=u;o=40;break b}if((b[g>>0]|0)==(p&255)<<24>>24){p=n;n=j;j=g;do{n=n+-1|0;p=p+1|0;if(!n){r=u;o=40;break b}j=j+1|0}while((b[p>>0]|0)==(b[j>>0]|0))}}}else{if(a>>>0>>0)v=a;else v=(a>>>0)%(l>>>0)|0;if((v|0)!=(s|0)){r=0;o=40;break b}}while(0);u=f[u>>2]|0;if(!u){r=0;o=40;break}}if((o|0)==40)return r|0;return 0}function yd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)br(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;Wo(d,14941);f[d>>2]=6944;va(d|0,1080,114)}d=dn(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)br(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){e=k;c=l;i=m;b:while(1){c:do if(h){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0)){o=d;break c}p=(f[a>>2]|0)+(n<<2)|0;if(!(f[p>>2]|0)){q=d;r=n;s=p;break b}p=d+12|0;t=f[d>>2]|0;d:do if(!t)u=d;else{v=f[d+8>>2]|0;w=d;x=t;while(1){if((v|0)!=(f[x+8>>2]|0)){u=w;break d}if((f[p>>2]|0)!=(f[x+12>>2]|0)){u=w;break d}y=f[x>>2]|0;if(!y){u=x;break}else{z=x;x=y;w=z}}}while(0);f[i>>2]=f[u>>2];f[u>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){A=39;break a}}}else{d=c;while(1){p=f[d+4>>2]|0;if(p>>>0>>0)B=p;else B=(p>>>0)%(b>>>0)|0;if((B|0)==(j|0)){o=d;break c}p=(f[a>>2]|0)+(B<<2)|0;if(!(f[p>>2]|0)){q=d;r=B;s=p;break b}p=d+12|0;t=f[d>>2]|0;e:do if(!t)C=d;else{w=f[d+8>>2]|0;x=d;v=t;while(1){if((w|0)!=(f[v+8>>2]|0)){C=x;break e}if((f[p>>2]|0)!=(f[v+12>>2]|0)){C=x;break e}z=f[v>>2]|0;if(!z){C=v;break}else{y=v;v=z;x=y}}}while(0);f[i>>2]=f[C>>2];f[C>>2]=f[f[(f[a>>2]|0)+(B<<2)>>2]>>2];f[f[(f[a>>2]|0)+(B<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){A=39;break a}}}while(0);c=f[o>>2]|0;if(!c){A=39;break a}else{e=o;i=o}}f[s>>2]=i;l=f[q>>2]|0;if(!l){A=39;break}else{j=r;k=q;m=q}}if((A|0)==39)return}function zd(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;h=a+4|0;i=f[c>>2]|0;c=i;do if((i|0)!=(h|0)){j=i+16|0;k=b[j+11>>0]|0;l=k<<24>>24<0;m=l?f[i+20>>2]|0:k&255;k=b[g+11>>0]|0;n=k<<24>>24<0;o=n?f[g+4>>2]|0:k&255;k=m>>>0>>0;p=k?m:o;if((p|0)!=0?(q=Pk(n?f[g>>2]|0:g,l?f[j>>2]|0:j,p)|0,(q|0)!=0):0){if((q|0)<0)break}else r=4;if((r|0)==4?o>>>0>>0:0)break;q=o>>>0>>0?o:m;if((q|0)!=0?(m=Pk(l?f[j>>2]|0:j,n?f[g>>2]|0:g,q)|0,(m|0)!=0):0){if((m|0)>=0)r=37}else r=21;if((r|0)==21?!k:0)r=37;if((r|0)==37){f[d>>2]=c;f[e>>2]=c;s=e;return s|0}k=f[i+4>>2]|0;m=(k|0)==0;if(m){q=i+8|0;j=f[q>>2]|0;if((f[j>>2]|0)==(i|0))t=j;else{j=q;do{q=f[j>>2]|0;j=q+8|0;l=f[j>>2]|0}while((f[l>>2]|0)!=(q|0));t=l}}else{j=k;while(1){l=f[j>>2]|0;if(!l)break;else j=l}t=j}do if((t|0)!=(h|0)){k=t+16|0;l=b[k+11>>0]|0;q=l<<24>>24<0;p=q?f[t+20>>2]|0:l&255;l=p>>>0>>0?p:o;if((l|0)!=0?(u=Pk(n?f[g>>2]|0:g,q?f[k>>2]|0:k,l)|0,(u|0)!=0):0){if((u|0)<0)break}else r=31;if((r|0)==31?o>>>0

>>0:0)break;s=hg(a,d,g)|0;return s|0}while(0);if(m){f[d>>2]=c;s=i+4|0;return s|0}else{f[d>>2]=t;s=t;return s|0}}while(0);t=f[i>>2]|0;do if((f[a>>2]|0)==(i|0))v=c;else{if(!t){h=i;while(1){e=f[h+8>>2]|0;if((f[e>>2]|0)==(h|0))h=e;else{w=e;break}}}else{h=t;while(1){m=f[h+4>>2]|0;if(!m){w=h;break}else h=m}}h=w;m=w+16|0;e=b[g+11>>0]|0;o=e<<24>>24<0;n=o?f[g+4>>2]|0:e&255;e=b[m+11>>0]|0;j=e<<24>>24<0;p=j?f[w+20>>2]|0:e&255;e=n>>>0

>>0?n:p;if((e|0)!=0?(u=Pk(j?f[m>>2]|0:m,o?f[g>>2]|0:g,e)|0,(u|0)!=0):0){if((u|0)<0){v=h;break}}else r=13;if((r|0)==13?p>>>0>>0:0){v=h;break}s=hg(a,d,g)|0;return s|0}while(0);if(!t){f[d>>2]=i;s=i;return s|0}else{f[d>>2]=v;s=v+4|0;return s|0}return 0}function Ad(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;g=u;u=u+16|0;h=g;f[c+48>>2]=d;f[c+44>>2]=e;e=f[c+8>>2]|0;i=c+12|0;j=f[i>>2]|0;if((j|0)!=(e|0)){k=j;do{j=k+-4|0;f[i>>2]=j;l=f[j>>2]|0;f[j>>2]=0;if(l|0)Va[f[(f[l>>2]|0)+4>>2]&127](l);k=f[i>>2]|0}while((k|0)!=(e|0))}e=f[c+20>>2]|0;k=c+24|0;i=f[k>>2]|0;if((i|0)!=(e|0))f[k>>2]=i+(~((i+-4-e|0)>>>2)<<2);e=f[c+32>>2]|0;i=c+36|0;k=f[i>>2]|0;if((k|0)!=(e|0))f[i>>2]=k+(~((k+-4-e|0)>>>2)<<2);if(!(f[c+4>>2]|0)){e=dn(32)|0;f[h>>2]=e;f[h+8>>2]=-2147483616;f[h+4>>2]=23;m=e;n=14670;o=m+23|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[e+23>>0]=0;f[a>>2]=-1;dj(a+4|0,h);if((b[h+11>>0]|0)<0)br(f[h>>2]|0);u=g;return}Jd(a,c);if(f[a>>2]|0){u=g;return}e=a+4|0;k=e+11|0;if((b[k>>0]|0)<0)br(f[e>>2]|0);Ji(a,c);if(f[a>>2]|0){u=g;return}if((b[k>>0]|0)<0)br(f[e>>2]|0);if(!(Qa[f[(f[c>>2]|0)+16>>2]&127](c)|0)){i=dn(32)|0;f[h>>2]=i;f[h+8>>2]=-2147483616;f[h+4>>2]=29;m=i;n=14694;o=m+29|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[i+29>>0]=0;f[a>>2]=-1;dj(e,h);if((b[h+11>>0]|0)<0)br(f[h>>2]|0);u=g;return}if(!(Qa[f[(f[c>>2]|0)+20>>2]&127](c)|0)){i=dn(32)|0;f[h>>2]=i;f[h+8>>2]=-2147483616;f[h+4>>2]=31;m=i;n=14724;o=m+31|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[i+31>>0]=0;f[a>>2]=-1;dj(e,h);if((b[h+11>>0]|0)<0)br(f[h>>2]|0);u=g;return}Wa[f[(f[c>>2]|0)+24>>2]&15](a,c);if(f[a>>2]|0){u=g;return}if((b[k>>0]|0)<0)br(f[e>>2]|0);if(!(Qa[f[(f[c>>2]|0)+28>>2]&127](c)|0)){k=dn(48)|0;f[h>>2]=k;f[h+8>>2]=-2147483600;f[h+4>>2]=34;m=k;n=14756;o=m+34|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[k+34>>0]=0;f[a>>2]=-1;dj(e,h);if((b[h+11>>0]|0)<0)br(f[h>>2]|0);u=g;return}e=dn(32)|0;f[h>>2]=e;f[h+8>>2]=-2147483616;f[h+4>>2]=30;m=e;n=14791;o=m+30|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[e+30>>0]=0;e=Oj(d,h,0)|0;if((b[h+11>>0]|0)<0)br(f[h>>2]|0);if(e)Va[f[(f[c>>2]|0)+48>>2]&127](c);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=g;return}function Bd(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;g=a;h=b;i=h;j=c;k=d;l=k;if(!i){m=(e|0)!=0;if(!l){if(m){f[e>>2]=(g>>>0)%(j>>>0);f[e+4>>2]=0}n=0;o=(g>>>0)/(j>>>0)>>>0;return (I=n,o)|0}else{if(!m){n=0;o=0;return (I=n,o)|0}f[e>>2]=a|0;f[e+4>>2]=b&0;n=0;o=0;return (I=n,o)|0}}m=(l|0)==0;do if(j){if(!m){p=(_(l|0)|0)-(_(i|0)|0)|0;if(p>>>0<=31){q=p+1|0;r=31-p|0;s=p-31>>31;t=q;u=g>>>(q>>>0)&s|i<>>(q>>>0)&s;w=0;x=g<>2]=a|0;f[e+4>>2]=h|b&0;n=0;o=0;return (I=n,o)|0}r=j-1|0;if(r&j|0){s=(_(j|0)|0)+33-(_(i|0)|0)|0;q=64-s|0;p=32-s|0;y=p>>31;z=s-32|0;A=z>>31;t=s;u=p-1>>31&i>>>(z>>>0)|(i<>>(s>>>0))&A;v=A&i>>>(s>>>0);w=g<>>(z>>>0))&y|g<>31;break}if(e|0){f[e>>2]=r&g;f[e+4>>2]=0}if((j|0)==1){n=h|b&0;o=a|0|0;return (I=n,o)|0}else{r=im(j|0)|0;n=i>>>(r>>>0)|0;o=i<<32-r|g>>>(r>>>0)|0;return (I=n,o)|0}}else{if(m){if(e|0){f[e>>2]=(i>>>0)%(j>>>0);f[e+4>>2]=0}n=0;o=(i>>>0)/(j>>>0)>>>0;return (I=n,o)|0}if(!g){if(e|0){f[e>>2]=0;f[e+4>>2]=(i>>>0)%(l>>>0)}n=0;o=(i>>>0)/(l>>>0)>>>0;return (I=n,o)|0}r=l-1|0;if(!(r&l)){if(e|0){f[e>>2]=a|0;f[e+4>>2]=r&i|b&0}n=0;o=i>>>((im(l|0)|0)>>>0);return (I=n,o)|0}r=(_(l|0)|0)-(_(i|0)|0)|0;if(r>>>0<=30){s=r+1|0;p=31-r|0;t=s;u=i<>>(s>>>0);v=i>>>(s>>>0);w=0;x=g<>2]=a|0;f[e+4>>2]=h|b&0;n=0;o=0;return (I=n,o)|0}while(0);if(!t){B=x;C=w;D=v;E=u;F=0;G=0}else{b=c|0|0;c=k|d&0;d=Tn(b|0,c|0,-1,-1)|0;k=I;h=x;x=w;w=v;v=u;u=t;t=0;do{a=h;h=x>>>31|h<<1;x=t|x<<1;g=v<<1|a>>>31|0;a=v>>>31|w<<1|0;Vn(d|0,k|0,g|0,a|0)|0;i=I;l=i>>31|((i|0)<0?-1:0)<<1;t=l&1;v=Vn(g|0,a|0,l&b|0,(((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1)&c|0)|0;w=I;u=u-1|0}while((u|0)!=0);B=h;C=x;D=w;E=v;F=0;G=t}t=C;C=0;if(e|0){f[e>>2]=E;f[e+4>>2]=D}n=(t|0)>>>31|(B|C)<<1|(C<<1|t>>>31)&0|F;o=(t<<1|0>>>31)&-2|G;return (I=n,o)|0}function Cd(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;c=u;u=u+32|0;d=c+4|0;e=c;g=c+16|0;h=a+48|0;i=f[h>>2]|0;j=dn(32)|0;f[d>>2]=j;f[d+8>>2]=-2147483616;f[d+4>>2]=20;k=j;l=13101;m=k+20|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[j+20>>0]=0;j=vk(i+24|0,d)|0;if((b[d+11>>0]|0)<0)br(f[d>>2]|0);i=f[h>>2]|0;n=dn(32)|0;f[d>>2]=n;f[d+8>>2]=-2147483616;f[d+4>>2]=22;k=n;l=13122;m=k+22|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[n+22>>0]=0;n=vk(i+24|0,d)|0;if((b[d+11>>0]|0)<0)br(f[d>>2]|0);i=a+64|0;o=f[i>>2]|0;f[i>>2]=0;if(o|0)Va[f[(f[o>>2]|0)+4>>2]&127](o);o=f[a+56>>2]|0;p=(((f[o+100>>2]|0)-(f[o+96>>2]|0)|0)/12|0)>>>0<1e3;o=f[h>>2]|0;q=dn(32)|0;f[d>>2]=q;f[d+8>>2]=-2147483616;f[d+4>>2]=18;k=q;l=13145;m=k+18|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[q+18>>0]=0;q=yk(o,d,-1)|0;if((b[d+11>>0]|0)<0)br(f[d>>2]|0);switch(q|0){case -1:{if(j?p|((Yh(f[h>>2]|0)|0)>4|n^1):0)r=13;else r=17;break}case 0:{if(j)r=13;else r=21;break}case 2:{r=17;break}default:r=21}if((r|0)==13){j=f[a+44>>2]|0;b[g>>0]=0;n=j+16|0;h=f[n+4>>2]|0;if(!((h|0)>0|(h|0)==0&(f[n>>2]|0)>>>0>0)){f[e>>2]=f[j+4>>2];f[d>>2]=f[e>>2];ye(j,d,g,g+1|0)|0}j=dn(296)|0;Ni(j);n=f[i>>2]|0;f[i>>2]=j;if(!n)s=j;else{Va[f[(f[n>>2]|0)+4>>2]&127](n);r=21}}else if((r|0)==17){n=f[a+44>>2]|0;b[g>>0]=2;j=n+16|0;h=f[j+4>>2]|0;if(!((h|0)>0|(h|0)==0&(f[j>>2]|0)>>>0>0)){f[e>>2]=f[n+4>>2];f[d>>2]=f[e>>2];ye(n,d,g,g+1|0)|0}g=dn(360)|0;ji(g);d=f[i>>2]|0;f[i>>2]=g;if(!d)s=g;else{Va[f[(f[d>>2]|0)+4>>2]&127](d);r=21}}if((r|0)==21){r=f[i>>2]|0;if(!r){t=0;u=c;return t|0}else s=r}t=Ra[f[(f[s>>2]|0)+8>>2]&127](s,a)|0;u=c;return t|0}function Dd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;e=b+12|0;g=f[e>>2]|0;h=c+4|0;i=(f[h>>2]|0)-g|0;j=c;f[j>>2]=(f[c>>2]|0)-g;f[j+4>>2]=i;i=(f[d>>2]|0)-g|0;j=d+4|0;k=(f[j>>2]|0)-g|0;g=d;f[g>>2]=i;f[g+4>>2]=k;g=f[e>>2]|0;if((((k|0)>-1?k:0-k|0)+((i|0)>-1?i:0-i|0)|0)>(g|0)){l=f[c>>2]|0;m=f[h>>2]|0;if((l|0)>-1)if((m|0)<=-1)if((l|0)<1){n=-1;o=-1}else p=6;else{n=1;o=1}else if((m|0)<1){n=-1;o=-1}else p=6;if((p|0)==6){n=(l|0)>0?1:-1;o=(m|0)>0?1:-1}q=X(g,n)|0;r=X(g,o)|0;g=(l<<1)-q|0;f[c>>2]=g;l=(m<<1)-r|0;f[h>>2]=l;if((X(n,o)|0)>-1){o=0-l|0;f[c>>2]=o;s=0-g|0;t=o}else{f[c>>2]=l;s=g;t=l}f[c>>2]=(t+q|0)/2|0;f[h>>2]=(s+r|0)/2|0;r=f[d>>2]|0;s=f[j>>2]|0;if((r|0)>-1)if((s|0)<=-1)if((r|0)<1){u=-1;v=-1}else p=14;else{u=1;v=1}else if((s|0)<1){u=-1;v=-1}else p=14;if((p|0)==14){u=(r|0)>0?1:-1;v=(s|0)>0?1:-1}q=f[e>>2]|0;e=X(q,u)|0;t=X(q,v)|0;q=(r<<1)-e|0;f[d>>2]=q;r=(s<<1)-t|0;f[j>>2]=r;if((X(u,v)|0)>-1){v=0-r|0;f[d>>2]=v;w=0-q|0;x=v}else{f[d>>2]=r;w=q;x=r}r=(x+e|0)/2|0;f[d>>2]=r;e=(w+t|0)/2|0;f[j>>2]=e;y=r;z=e}else{y=i;z=k}if(!y)if(!z){A=y;B=z}else p=22;else if((y|0)<0&(z|0)<1){A=y;B=z}else p=22;if((p|0)==22){if(!y)C=(z|0)==0?0:(z|0)>0?3:1;else C=(y|0)>0?(z>>31)+2|0:(z|0)<1?0:3;z=f[c>>2]|0;y=f[h>>2]|0;switch(C|0){case 1:{C=c;f[C>>2]=y;f[C+4>>2]=0-z;D=f[j>>2]|0;E=0-(f[d>>2]|0)|0;break}case 2:{C=c;f[C>>2]=0-z;f[C+4>>2]=0-y;D=0-(f[d>>2]|0)|0;E=0-(f[j>>2]|0)|0;break}case 3:{C=c;f[C>>2]=0-y;f[C+4>>2]=z;D=0-(f[j>>2]|0)|0;E=f[d>>2]|0;break}default:{C=c;f[C>>2]=z;f[C+4>>2]=y;D=f[d>>2]|0;E=f[j>>2]|0}}j=d;f[j>>2]=D;f[j+4>>2]=E;A=D;B=E}E=(f[c>>2]|0)-A|0;f[a>>2]=E;A=(f[h>>2]|0)-B|0;B=a+4|0;f[B>>2]=A;if((E|0)<0)F=(f[b+4>>2]|0)+E|0;else F=E;f[a>>2]=F;if((A|0)>=0){G=A;f[B>>2]=G;return}G=(f[b+4>>2]|0)+A|0;f[B>>2]=G;return}function Ed(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;c=a+4|0;if(!b){e=f[a>>2]|0;f[a>>2]=0;if(e|0)br(e);f[c>>2]=0;return}if(b>>>0>1073741823){e=ra(8)|0;Wo(e,14941);f[e>>2]=6944;va(e|0,1080,114)}e=dn(b<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)br(g);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;g=f[c>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=b+-1|0;i=(h&b|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(b>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=c;c=f[g>>2]|0;if(!c)return;else{k=j;l=g;m=c;n=g}a:while(1){b:do if(i){g=l;c=m;j=n;while(1){e=c;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0))break;p=(f[a>>2]|0)+(o<<2)|0;if(!(f[p>>2]|0)){q=e;r=j;s=o;t=p;break b}p=e+8|0;u=e;while(1){v=f[u>>2]|0;if(!v)break;if((d[p>>1]|0)==(d[v+8>>1]|0))u=v;else break}f[j>>2]=v;f[u>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;p=f[g>>2]|0;if(!p){w=37;break a}else e=p}c=f[e>>2]|0;if(!c){w=37;break a}else{g=e;j=e}}}else{j=l;g=m;c=n;while(1){p=g;while(1){x=f[p+4>>2]|0;if(x>>>0>>0)y=x;else y=(x>>>0)%(b>>>0)|0;if((y|0)==(k|0))break;x=(f[a>>2]|0)+(y<<2)|0;if(!(f[x>>2]|0)){q=p;r=c;s=y;t=x;break b}x=p+8|0;z=p;while(1){A=f[z>>2]|0;if(!A)break;if((d[x>>1]|0)==(d[A+8>>1]|0))z=A;else break}f[c>>2]=A;f[z>>2]=f[f[(f[a>>2]|0)+(y<<2)>>2]>>2];f[f[(f[a>>2]|0)+(y<<2)>>2]>>2]=p;x=f[j>>2]|0;if(!x){w=37;break a}else p=x}g=f[p>>2]|0;if(!g){w=37;break a}else{j=p;c=p}}}while(0);f[t>>2]=r;m=f[q>>2]|0;if(!m){w=37;break}else{k=s;l=q;n=q}}if((w|0)==37)return}function Fd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)br(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;Wo(e,14941);f[e>>2]=6944;va(e|0,1080,114)}e=dn(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)br(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){b:do if(i){g=l;d=m;j=n;while(1){e=d;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0))break;p=(f[a>>2]|0)+(o<<2)|0;if(!(f[p>>2]|0)){q=e;r=j;s=o;t=p;break b}p=e+8|0;u=e;while(1){v=f[u>>2]|0;if(!v)break;if((b[p>>0]|0)==(b[v+8>>0]|0))u=v;else break}f[j>>2]=v;f[u>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;p=f[g>>2]|0;if(!p){w=37;break a}else e=p}d=f[e>>2]|0;if(!d){w=37;break a}else{g=e;j=e}}}else{j=l;g=m;d=n;while(1){p=g;while(1){x=f[p+4>>2]|0;if(x>>>0>>0)y=x;else y=(x>>>0)%(c>>>0)|0;if((y|0)==(k|0))break;x=(f[a>>2]|0)+(y<<2)|0;if(!(f[x>>2]|0)){q=p;r=d;s=y;t=x;break b}x=p+8|0;z=p;while(1){A=f[z>>2]|0;if(!A)break;if((b[x>>0]|0)==(b[A+8>>0]|0))z=A;else break}f[d>>2]=A;f[z>>2]=f[f[(f[a>>2]|0)+(y<<2)>>2]>>2];f[f[(f[a>>2]|0)+(y<<2)>>2]>>2]=p;x=f[j>>2]|0;if(!x){w=37;break a}else p=x}g=f[p>>2]|0;if(!g){w=37;break a}else{j=p;d=p}}}while(0);f[t>>2]=r;m=f[q>>2]|0;if(!m){w=37;break}else{k=s;l=q;n=q}}if((w|0)==37)return}function Gd(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;g=f[c>>2]|0;c=f[b>>2]|0;h=g-c|0;i=a+8|0;j=f[i>>2]|0;if(h>>>0<64){if(j>>>0<=1){k=0;return k|0}l=f[e>>2]|0;m=0;n=1;while(1){o=(f[l+(m<<2)>>2]|0)>>>0>(f[l+(n<<2)>>2]|0)>>>0?n:m;n=n+1|0;if(n>>>0>=j>>>0){k=o;break}else m=o}return k|0}if(j){j=f[a+1128>>2]|0;m=f[e>>2]|0;e=f[a+1140>>2]|0;n=f[d>>2]|0;d=b+4|0;l=b+8|0;if((g|0)==(c|0)){b=0;do{o=j+(b<<2)|0;f[o>>2]=0;p=(f[a>>2]|0)-(f[m+(b<<2)>>2]|0)|0;f[e+(b<<2)>>2]=p;if(p|0){p=f[o>>2]|0;q=h-p|0;f[o>>2]=q>>>0

>>0?p:q}b=b+1|0;q=f[i>>2]|0}while(b>>>0>>0);r=q}else{b=0;do{q=j+(b<<2)|0;f[q>>2]=0;p=(f[a>>2]|0)-(f[m+(b<<2)>>2]|0)|0;f[e+(b<<2)>>2]=p;if(p|0){o=(f[n+(b<<2)>>2]|0)+(1<>2]|0;s=f[(f[d>>2]|0)+24>>2]|0;t=c;u=f[q>>2]|0;do{v=s+((X(t,p)|0)<<2)+(b<<2)|0;u=u+((f[v>>2]|0)>>>0>>0&1)|0;f[q>>2]=u;t=t+1|0}while((t|0)!=(g|0));t=h-u|0;f[q>>2]=t>>>0>>0?u:t}b=b+1|0;t=f[i>>2]|0}while(b>>>0>>0);r=t}if(r){b=f[a+1140>>2]|0;i=a+1128|0;h=0;g=0;c=0;while(1){if(!(f[b+(g<<2)>>2]|0)){w=h;x=c}else{d=f[(f[i>>2]|0)+(g<<2)>>2]|0;l=h>>>0>>0;w=l?d:h;x=l?g:c}g=g+1|0;if(g>>>0>=r>>>0){y=x;break}else{h=w;c=x}}}else y=0}else y=0;x=a+1088|0;c=a+1104|0;w=f[c>>2]|0;h=32-w|0;if((h|0)<4){r=y&15;g=4-h|0;f[c>>2]=g;h=a+1100|0;i=f[h>>2]|r>>>g;f[h>>2]=i;g=a+1092|0;b=f[g>>2]|0;if((b|0)==(f[a+1096>>2]|0))Ci(x,h);else{f[b>>2]=i;f[g>>2]=b+4}f[h>>2]=r<<32-(f[c>>2]|0);k=y;return k|0}r=a+1100|0;h=f[r>>2]|y<<28>>>w;f[r>>2]=h;b=w+4|0;f[c>>2]=b;if((b|0)!=32){k=y;return k|0}b=a+1092|0;w=f[b>>2]|0;if((w|0)==(f[a+1096>>2]|0))Ci(x,r);else{f[w>>2]=h;f[b>>2]=w+4}f[r>>2]=0;f[c>>2]=0;k=y;return k|0}function Hd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)br(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;Wo(d,14941);f[d>>2]=6944;va(d|0,1080,114)}d=dn(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)br(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){b:do if(h){e=k;c=l;i=m;while(1){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0))break;o=(f[a>>2]|0)+(n<<2)|0;if(!(f[o>>2]|0)){p=d;q=i;r=n;s=o;break b}o=d+8|0;t=d;while(1){u=f[t>>2]|0;if(!u)break;if((f[o>>2]|0)==(f[u+8>>2]|0))t=u;else break}f[i>>2]=u;f[t>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;o=f[e>>2]|0;if(!o){v=37;break a}else d=o}c=f[d>>2]|0;if(!c){v=37;break a}else{e=d;i=d}}}else{i=k;e=l;c=m;while(1){o=e;while(1){w=f[o+4>>2]|0;if(w>>>0>>0)x=w;else x=(w>>>0)%(b>>>0)|0;if((x|0)==(j|0))break;w=(f[a>>2]|0)+(x<<2)|0;if(!(f[w>>2]|0)){p=o;q=c;r=x;s=w;break b}w=o+8|0;y=o;while(1){z=f[y>>2]|0;if(!z)break;if((f[w>>2]|0)==(f[z+8>>2]|0))y=z;else break}f[c>>2]=z;f[y>>2]=f[f[(f[a>>2]|0)+(x<<2)>>2]>>2];f[f[(f[a>>2]|0)+(x<<2)>>2]>>2]=o;w=f[i>>2]|0;if(!w){v=37;break a}else o=w}e=f[o>>2]|0;if(!e){v=37;break a}else{i=o;c=o}}}while(0);f[s>>2]=q;l=f[p>>2]|0;if(!l){v=37;break}else{j=r;k=p;m=p}}if((v|0)==37)return}function Id(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)br(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;Wo(e,14941);f[e>>2]=6944;va(e|0,1080,114)}e=dn(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)br(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;e=a+24|0;k=j;j=g;l=d;d=g;a:while(1){g=j;m=l;n=d;b:while(1){o=m;while(1){p=f[o+4>>2]|0;if(!i)if(p>>>0>>0)q=p;else q=(p>>>0)%(c>>>0)|0;else q=p&h;if((q|0)==(k|0))break;r=(f[a>>2]|0)+(q<<2)|0;if(!(f[r>>2]|0))break b;p=f[o>>2]|0;c:do if(!p)s=o;else{t=f[o+8>>2]|0;u=f[e>>2]|0;v=f[u+8>>2]|0;w=(f[u+12>>2]|0)-v|0;u=v;v=w>>>2;if((w|0)>0){x=o;y=p}else{w=p;while(1){z=f[w>>2]|0;if(!z){s=w;break c}else w=z}}while(1){w=f[y+8>>2]|0;z=0;do{A=f[u+(z<<2)>>2]|0;if(!(b[A+84>>0]|0)){B=f[A+68>>2]|0;C=f[B+(w<<2)>>2]|0;D=f[B+(t<<2)>>2]|0}else{C=w;D=t}z=z+1|0;if((D|0)!=(C|0)){s=x;break c}}while((z|0)<(v|0));z=f[y>>2]|0;if(!z){s=y;break}else{w=y;y=z;x=w}}}while(0);f[n>>2]=f[s>>2];f[s>>2]=f[f[(f[a>>2]|0)+(q<<2)>>2]>>2];f[f[(f[a>>2]|0)+(q<<2)>>2]>>2]=o;p=f[g>>2]|0;if(!p){E=38;break a}else o=p}m=f[o>>2]|0;if(!m){E=38;break a}else{g=o;n=o}}f[r>>2]=n;l=f[o>>2]|0;if(!l){E=38;break}else{k=q;j=o;d=o}}if((E|0)==38)return}function Jd(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;e=u;u=u+16|0;g=e+4|0;h=e;i=e+12|0;j=e+11|0;k=e+10|0;l=e+8|0;m=c+44|0;n=f[m>>2]|0;o=n+16|0;p=f[o+4>>2]|0;if(!((p|0)>0|(p|0)==0&(f[o>>2]|0)>>>0>0)){f[h>>2]=f[n+4>>2];f[g>>2]=f[h>>2];ye(n,g,14849,14854)|0}n=Qa[f[(f[c>>2]|0)+8>>2]&127](c)|0;b[i>>0]=n;b[j>>0]=2;b[k>>0]=(n&255|0)==0?3:2;n=f[m>>2]|0;o=n+16|0;p=f[o+4>>2]|0;if(!((p|0)>0|(p|0)==0&(f[o>>2]|0)>>>0>0)){f[h>>2]=f[n+4>>2];f[g>>2]=f[h>>2];ye(n,g,j,j+1|0)|0;j=f[m>>2]|0;o=j+16|0;p=f[o+4>>2]|0;if(!((p|0)>0|(p|0)==0&(f[o>>2]|0)>>>0>0)){f[h>>2]=f[j+4>>2];f[g>>2]=f[h>>2];ye(j,g,k,k+1|0)|0;k=f[m>>2]|0;o=k+16|0;p=f[o+4>>2]|0;if((p|0)>0|(p|0)==0&(f[o>>2]|0)>>>0>0){q=h;r=k}else{f[h>>2]=f[k+4>>2];f[g>>2]=f[h>>2];ye(k,g,i,i+1|0)|0;q=h;r=f[m>>2]|0}}else{s=h;t=j;v=6}}else{s=h;t=n;v=6}if((v|0)==6){q=h;r=t}t=Qa[f[(f[c>>2]|0)+12>>2]&127](c)|0;b[l>>0]=t;t=r+16|0;q=f[t+4>>2]|0;if(!((q|0)>0|(q|0)==0&(f[t>>2]|0)>>>0>0)){f[h>>2]=f[r+4>>2];f[g>>2]=f[h>>2];ye(r,g,l,l+1|0)|0}d[l>>1]=(f[(f[c+4>>2]|0)+4>>2]|0)==0?0:-32768;c=f[m>>2]|0;m=c+16|0;r=f[m+4>>2]|0;if((r|0)>0|(r|0)==0&(f[m>>2]|0)>>>0>0){f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=e;return}f[h>>2]=f[c+4>>2];f[g>>2]=f[h>>2];ye(c,g,l,l+2|0)|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=e;return}function Kd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=Oa,x=0,y=Oa,z=Oa,A=Oa,B=Oa;e=u;u=u+16|0;g=e;h=a+4|0;if((f[h>>2]|0)!=-1){i=0;u=e;return i|0}f[h>>2]=d;d=b[c+24>>0]|0;h=d<<24>>24;j=a+20|0;n[j>>2]=$(0.0);f[g>>2]=0;k=g+4|0;f[k>>2]=0;f[g+8>>2]=0;do if(d<<24>>24)if(d<<24>>24<0)mq(g);else{l=h<<2;m=dn(l)|0;f[g>>2]=m;o=m+(h<<2)|0;f[g+8>>2]=o;hj(m|0,0,l|0)|0;l=m+(h<<2)|0;f[k>>2]=l;p=m;q=l;r=o;break}else{p=0;q=0;r=0}while(0);k=a+8|0;g=f[k>>2]|0;o=a+12|0;if(!g)s=a+16|0;else{l=f[o>>2]|0;if((l|0)!=(g|0))f[o>>2]=l+(~((l+-4-g|0)>>>2)<<2);br(g);g=a+16|0;f[g>>2]=0;f[o>>2]=0;f[k>>2]=0;s=g}f[k>>2]=p;f[o>>2]=q;f[s>>2]=r;r=h>>>0>1073741823?-1:h<<2;s=_q(r)|0;q=_q(r)|0;r=c+48|0;o=f[r>>2]|0;g=c+40|0;a=f[g>>2]|0;l=f[c>>2]|0;Rg(q|0,(f[l>>2]|0)+o|0,a|0)|0;Rg(p|0,(f[l>>2]|0)+o|0,a|0)|0;a=r;r=f[a>>2]|0;o=f[a+4>>2]|0;a=g;g=f[a>>2]|0;l=f[a+4>>2]|0;a=f[c>>2]|0;Rg(s|0,(f[a>>2]|0)+r|0,g|0)|0;p=f[c+80>>2]|0;a:do if(p>>>0>1){if(d<<24>>24<=0){c=1;while(1){m=on(g|0,l|0,c|0,0)|0;t=Tn(m|0,I|0,r|0,o|0)|0;Rg(q|0,(f[a>>2]|0)+t|0,g|0)|0;c=c+1|0;if(c>>>0>=p>>>0)break a}}c=f[k>>2]|0;t=1;do{m=on(g|0,l|0,t|0,0)|0;v=Tn(m|0,I|0,r|0,o|0)|0;Rg(q|0,(f[a>>2]|0)+v|0,g|0)|0;v=0;do{m=c+(v<<2)|0;w=$(n[m>>2]);x=q+(v<<2)|0;y=$(n[x>>2]);if(w>y){n[m>>2]=y;z=$(n[x>>2])}else z=y;x=s+(v<<2)|0;if($(n[x>>2])>2]=z;v=v+1|0}while((v|0)!=(h|0));t=t+1|0}while(t>>>0

>>0)}while(0);if(d<<24>>24>0){d=f[k>>2]|0;k=0;z=$(n[j>>2]);while(1){y=$(n[s+(k<<2)>>2]);w=$(y-$(n[d+(k<<2)>>2]));if(w>z){n[j>>2]=w;A=w}else A=z;k=k+1|0;if((k|0)==(h|0)){B=A;break}else z=A}}else B=$(n[j>>2]);if(B==$(0.0))n[j>>2]=$(1.0);$q(q);$q(s);i=1;u=e;return i|0}function Ld(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;g=a+8|0;Ah(g,b,d,e);h=d-e|0;if((h|0)>0){d=0-e|0;i=a+16|0;j=a+32|0;k=a+12|0;l=a+28|0;m=a+20|0;n=a+24|0;o=h;h=f[g>>2]|0;while(1){p=b+(o<<2)|0;q=c+(o<<2)|0;if((h|0)>0){r=0;s=p+(d<<2)|0;t=h;while(1){if((t|0)>0){u=0;do{v=f[s+(u<<2)>>2]|0;w=f[i>>2]|0;if((v|0)>(w|0)){x=f[j>>2]|0;f[x+(u<<2)>>2]=w;y=x}else{x=f[k>>2]|0;w=f[j>>2]|0;f[w+(u<<2)>>2]=(v|0)<(x|0)?x:v;y=w}u=u+1|0}while((u|0)<(f[g>>2]|0));z=y}else z=f[j>>2]|0;u=(f[p+(r<<2)>>2]|0)-(f[z+(r<<2)>>2]|0)|0;w=q+(r<<2)|0;f[w>>2]=u;if((u|0)>=(f[l>>2]|0)){if((u|0)>(f[n>>2]|0)){A=u-(f[m>>2]|0)|0;B=31}}else{A=(f[m>>2]|0)+u|0;B=31}if((B|0)==31){B=0;f[w>>2]=A}r=r+1|0;w=f[g>>2]|0;if((r|0)>=(w|0)){C=w;break}else{s=z;t=w}}}else C=h;o=o-e|0;if((o|0)<=0){D=C;break}else h=C}}else D=f[g>>2]|0;C=e>>>0>1073741823?-1:e<<2;e=_q(C)|0;hj(e|0,0,C|0)|0;if((D|0)<=0){$q(e);return 1}C=a+16|0;h=a+32|0;o=a+12|0;z=a+28|0;A=a+20|0;m=a+24|0;a=0;n=e;l=D;while(1){if((l|0)>0){D=0;do{j=f[n+(D<<2)>>2]|0;y=f[C>>2]|0;if((j|0)>(y|0)){k=f[h>>2]|0;f[k+(D<<2)>>2]=y;E=k}else{k=f[o>>2]|0;y=f[h>>2]|0;f[y+(D<<2)>>2]=(j|0)<(k|0)?k:j;E=y}D=D+1|0}while((D|0)<(f[g>>2]|0));F=E}else F=f[h>>2]|0;D=(f[b+(a<<2)>>2]|0)-(f[F+(a<<2)>>2]|0)|0;y=c+(a<<2)|0;f[y>>2]=D;if((D|0)>=(f[z>>2]|0)){if((D|0)>(f[m>>2]|0)){G=D-(f[A>>2]|0)|0;B=16}}else{G=(f[A>>2]|0)+D|0;B=16}if((B|0)==16){B=0;f[y>>2]=G}a=a+1|0;l=f[g>>2]|0;if((a|0)>=(l|0))break;else n=F}$q(e);return 1}function Md(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;e=f[a>>2]|0;g=e;h=(f[b>>2]|0)-g|0;b=e+(h>>2<<2)|0;i=f[c>>2]|0;c=f[d>>2]|0;d=c-i|0;j=d>>2;k=i;l=c;if((d|0)<=0){m=b;return m|0}d=a+8|0;n=f[d>>2]|0;o=a+4|0;p=f[o>>2]|0;q=p;if((j|0)<=(n-q>>2|0)){r=b;s=q-r|0;t=s>>2;if((j|0)>(t|0)){u=k+(t<<2)|0;t=u;if((u|0)==(l|0))v=p;else{w=l+-4-t|0;x=u;u=p;while(1){f[u>>2]=f[x>>2];x=x+4|0;if((x|0)==(l|0))break;else u=u+4|0}u=p+((w>>>2)+1<<2)|0;f[o>>2]=u;v=u}if((s|0)>0){y=t;z=v}else{m=b;return m|0}}else{y=c;z=p}c=z-(b+(j<<2))>>2;v=b+(c<<2)|0;if(v>>>0

>>0){t=(p+(0-c<<2)+~r|0)>>>2;r=v;s=z;while(1){f[s>>2]=f[r>>2];r=r+4|0;if(r>>>0>=p>>>0)break;else s=s+4|0}f[o>>2]=z+(t+1<<2)}if(c|0){c=v;v=z;do{c=c+-4|0;v=v+-4|0;f[v>>2]=f[c>>2]}while((c|0)!=(b|0))}c=y;if((k|0)==(c|0)){m=b;return m|0}else{A=b;B=k}while(1){f[A>>2]=f[B>>2];B=B+4|0;if((B|0)==(c|0)){m=b;break}else A=A+4|0}return m|0}A=(q-g>>2)+j|0;if(A>>>0>1073741823)mq(a);j=n-g|0;g=j>>1;n=j>>2>>>0<536870911?(g>>>0>>0?A:g):1073741823;g=b;A=h>>2;do if(n)if(n>>>0>1073741823){j=ra(8)|0;Wo(j,14941);f[j>>2]=6944;va(j|0,1080,114)}else{j=dn(n<<2)|0;C=j;D=j;break}else{C=0;D=0}while(0);j=D+(A<<2)|0;A=D+(n<<2)|0;if((l|0)==(k|0))E=j;else{n=((l+-4-i|0)>>>2)+1|0;i=k;k=j;while(1){f[k>>2]=f[i>>2];i=i+4|0;if((i|0)==(l|0))break;else k=k+4|0}E=j+(n<<2)|0}if((h|0)>0)Rg(C|0,e|0,h|0)|0;h=q-g|0;if((h|0)>0){Rg(E|0,b|0,h|0)|0;F=E+(h>>>2<<2)|0}else F=E;f[a>>2]=D;f[o>>2]=F;f[d>>2]=A;if(!e){m=j;return m|0}br(e);m=j;return m|0}function Nd(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0;switch(c|0){case 1:{c=dn(60)|0;f[c>>2]=1528;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];_j(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1948;i=c;f[a>>2]=i;return}case 4:{c=dn(168)|0;Ei(c,d,e,g);i=c;f[a>>2]=i;return}case 5:{c=dn(104)|0;f[c>>2]=1528;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];_j(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2004;f[c+60>>2]=0;f[c+64>>2]=0;f[c+76>>2]=0;f[c+80>>2]=0;f[c+84>>2]=0;h=c+88|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=dn(140)|0;f[c>>2]=1528;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];_j(c+32|0,e+24|0);e=c+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=2060;f[c+64>>2]=0;f[c+68>>2]=0;e=c+72|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+60>>2]=2116;f[c+88>>2]=1;g=c+92|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;rn(c+108|0);i=c;f[a>>2]=i;return}default:{i=0;f[a>>2]=i;return}}}function Od(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0;switch(c|0){case 1:{c=dn(60)|0;f[c>>2]=1528;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];_j(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1640;i=c;f[a>>2]=i;return}case 4:{c=dn(168)|0;Hi(c,d,e,g);i=c;f[a>>2]=i;return}case 5:{c=dn(104)|0;f[c>>2]=1528;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];_j(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1696;f[c+60>>2]=0;f[c+64>>2]=0;f[c+76>>2]=0;f[c+80>>2]=0;f[c+84>>2]=0;h=c+88|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=dn(140)|0;f[c>>2]=1528;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];_j(c+32|0,e+24|0);e=c+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=1752;f[c+64>>2]=0;f[c+68>>2]=0;e=c+72|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+60>>2]=1808;f[c+88>>2]=1;g=c+92|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;rn(c+108|0);i=c;f[a>>2]=i;return}default:{i=0;f[a>>2]=i;return}}}function Pd(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0;switch(c|0){case 1:{c=dn(40)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2628;i=c;f[a>>2]=i;return}case 4:{c=dn(152)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2684;h=c+96|0;b=c+40|0;j=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(j|0));Sm(h);f[c+136>>2]=0;f[c+140>>2]=0;f[c+144>>2]=0;i=c;f[a>>2]=i;return}case 5:{c=dn(84)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2740;f[c+40>>2]=0;f[c+44>>2]=0;f[c+56>>2]=0;f[c+60>>2]=0;f[c+64>>2]=0;h=c+68|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=dn(120)|0;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];e=c+24|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=2796;f[c+44>>2]=0;f[c+48>>2]=0;e=c+52|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+40>>2]=2852;f[c+68>>2]=1;g=c+72|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;rn(c+88|0);i=c;f[a>>2]=i;return}default:{i=0;f[a>>2]=i;return}}}function Qd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;switch(b-a>>2|0){case 2:{d=b+-4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=f[c>>2]|0;i=f[h>>2]|0;j=(f[h+4>>2]|0)-i>>3;if(j>>>0<=e>>>0)mq(h);k=i;if(j>>>0<=g>>>0)mq(h);if((f[k+(e<<3)>>2]|0)>>>0>=(f[k+(g<<3)>>2]|0)>>>0){l=1;return l|0}f[a>>2]=e;f[d>>2]=g;l=1;return l|0}case 3:{Cg(a,a+4|0,b+-4|0,c)|0;l=1;return l|0}case 4:{Qg(a,a+4|0,a+8|0,b+-4|0,c)|0;l=1;return l|0}case 5:{Tf(a,a+4|0,a+8|0,a+12|0,b+-4|0,c)|0;l=1;return l|0}case 1:case 0:{l=1;return l|0}default:{g=a+8|0;Cg(a,a+4|0,g,c)|0;d=a+12|0;a:do if((d|0)!=(b|0)){e=f[c>>2]|0;k=f[e>>2]|0;h=(f[e+4>>2]|0)-k>>3;j=k;k=d;i=0;m=g;b:while(1){n=f[k>>2]|0;o=f[m>>2]|0;if(h>>>0<=n>>>0){p=14;break}if(h>>>0<=o>>>0){p=16;break}q=j+(n<<3)|0;if((f[q>>2]|0)>>>0<(f[j+(o<<3)>>2]|0)>>>0){r=m;s=k;t=o;while(1){f[s>>2]=t;if((r|0)==(a|0)){u=a;break}o=r+-4|0;t=f[o>>2]|0;if(h>>>0<=t>>>0){p=20;break b}if((f[q>>2]|0)>>>0>=(f[j+(t<<3)>>2]|0)>>>0){u=r;break}else{v=r;r=o;s=v}}f[u>>2]=n;s=i+1|0;if((s|0)==8){w=0;x=(k+4|0)==(b|0);break a}else y=s}else y=i;s=k+4|0;if((s|0)==(b|0)){w=1;x=0;break a}else{r=k;k=s;i=y;m=r}}if((p|0)==14)mq(e);else if((p|0)==16)mq(e);else if((p|0)==20)mq(e)}else{w=1;x=0}while(0);l=x|w;return l|0}}return 0}function Rd(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0;switch(c|0){case 1:{c=dn(40)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2376;i=c;f[a>>2]=i;return}case 4:{c=dn(152)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2432;h=c+96|0;b=c+40|0;j=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(j|0));Sm(h);f[c+136>>2]=0;f[c+140>>2]=0;f[c+144>>2]=0;i=c;f[a>>2]=i;return}case 5:{c=dn(84)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2488;f[c+40>>2]=0;f[c+44>>2]=0;f[c+56>>2]=0;f[c+60>>2]=0;f[c+64>>2]=0;h=c+68|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=dn(120)|0;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];e=c+24|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=2544;f[c+44>>2]=0;f[c+48>>2]=0;e=c+52|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+40>>2]=2600;f[c+68>>2]=1;g=c+72|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;rn(c+88|0);i=c;f[a>>2]=i;return}default:{i=0;f[a>>2]=i;return}}}function Sd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=Oa,t=Oa,u=Oa,v=0,w=0,x=0,y=0,z=0;c=f[b>>2]|0;b=a+4|0;d=f[b>>2]|0;e=(d|0)==0;a:do if(!e){g=d+-1|0;h=(g&d|0)==0;if(!h)if(c>>>0>>0)i=c;else i=(c>>>0)%(d>>>0)|0;else i=g&c;j=f[(f[a>>2]|0)+(i<<2)>>2]|0;if(!j)k=i;else{if(h){h=j;while(1){l=f[h>>2]|0;if(!l){k=i;break a}m=f[l+4>>2]|0;if(!((m|0)==(c|0)|(m&g|0)==(i|0))){k=i;break a}if((f[l+8>>2]|0)==(c|0)){o=l;break}else h=l}p=o+12|0;return p|0}else q=j;while(1){h=f[q>>2]|0;if(!h){k=i;break a}g=f[h+4>>2]|0;if((g|0)!=(c|0)){if(g>>>0>>0)r=g;else r=(g>>>0)%(d>>>0)|0;if((r|0)!=(i|0)){k=i;break a}}if((f[h+8>>2]|0)==(c|0)){o=h;break}else q=h}p=o+12|0;return p|0}}else k=0;while(0);q=dn(16)|0;f[q+8>>2]=c;f[q+12>>2]=0;f[q+4>>2]=c;f[q>>2]=0;i=a+12|0;s=$(((f[i>>2]|0)+1|0)>>>0);t=$(d>>>0);u=$(n[a+16>>2]);do if(e|$(u*t)>>0<3|(d+-1&d|0)!=0)&1;j=~~$(W($(s/u)))>>>0;ti(a,r>>>0>>0?j:r);r=f[b>>2]|0;j=r+-1|0;if(!(j&r)){v=r;w=j&c;break}if(c>>>0>>0){v=r;w=c}else{v=r;w=(c>>>0)%(r>>>0)|0}}else{v=d;w=k}while(0);k=(f[a>>2]|0)+(w<<2)|0;w=f[k>>2]|0;if(!w){d=a+8|0;f[q>>2]=f[d>>2];f[d>>2]=q;f[k>>2]=d;d=f[q>>2]|0;if(d|0){k=f[d+4>>2]|0;d=v+-1|0;if(d&v)if(k>>>0>>0)x=k;else x=(k>>>0)%(v>>>0)|0;else x=k&d;y=(f[a>>2]|0)+(x<<2)|0;z=30}}else{f[q>>2]=f[w>>2];y=w;z=30}if((z|0)==30)f[y>>2]=q;f[i>>2]=(f[i>>2]|0)+1;o=q;p=o+12|0;return p|0}function Td(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0;c=u;u=u+16|0;d=c+4|0;e=c;f[a+64>>2]=b;g=a+128|0;f[g>>2]=2;h=a+132|0;f[h>>2]=7;i=Qa[f[(f[b>>2]|0)+32>>2]&127](b)|0;b=a+88|0;f[b>>2]=i;j=a+104|0;k=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;i=a+108|0;l=f[i>>2]|0;m=f[j>>2]|0;n=l-m>>2;o=m;p=l;if(k>>>0<=n>>>0)if(k>>>0>>0?(q=o+(k<<2)|0,(q|0)!=(p|0)):0){o=p+(~((p+-4-q|0)>>>2)<<2)|0;f[i>>2]=o;r=o;s=m}else{r=l;s=m}else{oi(j,k-n|0);r=f[i>>2]|0;s=f[j>>2]|0}if((r|0)!=(s|0)){s=0;do{r=f[b>>2]|0;f[e>>2]=s;f[d>>2]=f[e>>2];n=Og(r,d)|0;r=f[j>>2]|0;f[r+(s<<2)>>2]=n;s=s+1|0}while(s>>>0<(f[i>>2]|0)-r>>2>>>0)}i=a+92|0;s=f[b>>2]|0;j=f[s>>2]|0;d=(f[s+4>>2]|0)-j>>2;e=a+96|0;r=f[e>>2]|0;n=f[i>>2]|0;k=r-n>>2;m=n;n=r;if(d>>>0<=k>>>0)if(d>>>0>>0?(r=m+(d<<2)|0,(r|0)!=(n|0)):0){f[e>>2]=n+(~((n+-4-r|0)>>>2)<<2);t=s;v=j}else{t=s;v=j}else{oi(i,d-k|0);k=f[b>>2]|0;t=k;v=f[k>>2]|0}k=f[t+4>>2]|0;if((k|0)!=(v|0)){v=f[i>>2]|0;i=f[t>>2]|0;t=k-i>>2;k=0;do{f[v+(k<<2)>>2]=f[i+(k<<2)>>2];k=k+1|0}while(k>>>0>>0)}t=(f[h>>2]|0)-(f[g>>2]|0)+1|0;g=a+136|0;h=a+140|0;a=f[h>>2]|0;k=f[g>>2]|0;i=(a-k|0)/12|0;v=a;if(t>>>0>i>>>0){vf(g,t-i|0);u=c;return 1}if(t>>>0>=i>>>0){u=c;return 1}i=k+(t*12|0)|0;if((i|0)==(v|0)){u=c;return 1}else w=v;while(1){v=w+-12|0;f[h>>2]=v;t=f[v>>2]|0;if(!t)x=v;else{v=w+-8|0;k=f[v>>2]|0;if((k|0)!=(t|0))f[v>>2]=k+(~((k+-4-t|0)>>>2)<<2);br(t);x=f[h>>2]|0}if((x|0)==(i|0))break;else w=x}u=c;return 1}function Ud(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Oc(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=4194304;if(d){d=c;c=4194304;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<20)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}xf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function Vd(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Pc(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=4194304;if(d){d=c;c=4194304;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<20)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}xf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function Wd(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Qc(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=4194304;if(d){d=c;c=4194304;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<20)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}xf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function Xd(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Rc(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=4194304;if(d){d=c;c=4194304;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<20)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}xf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function Yd(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Sc(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=4194304;if(d){d=c;c=4194304;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<20)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}xf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function Zd(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Tc(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=2097152;if(d){d=c;c=2097152;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<19)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}yf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function _d(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Uc(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=1048576;if(d){d=c;c=1048576;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<18)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}zf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function $d(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Vc(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=262144;if(d){d=c;c=262144;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<16)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Cf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function ae(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Wc(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=131072;if(d){d=c;c=131072;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<15)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Df(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function be(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Xc(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=32768;if(d){d=c;c=32768;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<13)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Ef(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function ce(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Yc(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Lf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function de(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));Zc(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Lf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function ee(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));_c(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Lf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function fe(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));$c(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Lf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function ge(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));ad(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Lf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function he(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));bd(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Lf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function ie(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));cd(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Lf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function je(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)mq(h);else{l=dn(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;hj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Tn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;l=i;p=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(p|0));dd(i,n,o-n>>3,e)|0;n=i+16|0;o=Rn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Tn(o|0,I|0,39,0)|0;o=Wn(l|0,I|0,3)|0;l=Tn(o|0,I|0,8,0)|0;o=Tn(l|0,I|0,n|0,0)|0;vl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Lf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);br(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);br(e);u=g;return 1}function ke(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=f[b>>2]|0;g=b+4|0;h=f[g>>2]|0;i=((f[c>>2]|0)-e<<3)+(f[c+4>>2]|0)-h|0;c=e;if((i|0)<=0){j=d+4|0;k=f[d>>2]|0;f[a>>2]=k;l=a+4|0;m=f[j>>2]|0;f[l>>2]=m;return}if(!h){e=d+4|0;n=i;o=e;p=c;q=f[e>>2]|0}else{e=32-h|0;r=(i|0)<(e|0)?i:e;s=-1>>>(e-r|0)&-1<>2];c=d+4|0;h=f[c>>2]|0;e=32-h|0;t=e>>>0>>0?e:r;u=f[d>>2]|0;v=f[u>>2]&~(-1>>>(e-t|0)&-1<>2]=v;h=f[c>>2]|0;e=f[g>>2]|0;f[u>>2]=(h>>>0>e>>>0?s<>>(e-h|0))|v;v=(f[c>>2]|0)+t|0;h=u+(v>>>5<<2)|0;f[d>>2]=h;u=v&31;f[c>>2]=u;v=r-t|0;if((v|0)>0){e=f[h>>2]&~(-1>>>(32-v|0));f[h>>2]=e;f[h>>2]=e|s>>>((f[g>>2]|0)+t|0);f[c>>2]=v;w=v}else w=u;u=(f[b>>2]|0)+4|0;f[b>>2]=u;n=i-r|0;o=c;p=u;q=w}w=32-q|0;u=-1<31){q=~u;c=~n;r=n+((c|0)>-64?c:-64)+32&-32;c=n;i=p;while(1){v=f[i>>2]|0;t=f[d>>2]|0;g=f[t>>2]&q;f[t>>2]=g;f[t>>2]=g|v<>2];g=t+4|0;f[d>>2]=g;f[g>>2]=f[g>>2]&u|v>>>w;i=(f[b>>2]|0)+4|0;f[b>>2]=i;if((c|0)<=63)break;else c=c+-32|0}x=n+-32-r|0;y=i}else{x=n;y=p}if((x|0)<=0){j=o;k=f[d>>2]|0;f[a>>2]=k;l=a+4|0;m=f[j>>2]|0;f[l>>2]=m;return}p=f[y>>2]&-1>>>(32-x|0);y=(w|0)<(x|0)?w:x;n=f[d>>2]|0;i=f[n>>2]&~(-1<>2]&-1>>>(w-y|0));f[n>>2]=i;f[n>>2]=i|p<>2];i=(f[o>>2]|0)+y|0;w=n+(i>>>5<<2)|0;f[d>>2]=w;f[o>>2]=i&31;i=x-y|0;if((i|0)<=0){j=o;k=f[d>>2]|0;f[a>>2]=k;l=a+4|0;m=f[j>>2]|0;f[l>>2]=m;return}f[w>>2]=f[w>>2]&~(-1>>>(32-i|0))|p>>>y;f[o>>2]=i;j=o;k=f[d>>2]|0;f[a>>2]=k;l=a+4|0;m=f[j>>2]|0;f[l>>2]=m;return}function le(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+9|0;i=d+8|0;j=f[(f[a+184>>2]|0)+(c<<2)>>2]&255;b[h>>0]=j;c=a+4|0;k=f[(f[c>>2]|0)+44>>2]|0;l=k+16|0;m=f[l+4>>2]|0;if((m|0)>0|(m|0)==0&(f[l>>2]|0)>>>0>0)n=j;else{f[g>>2]=f[k+4>>2];f[e>>2]=f[g>>2];ye(k,e,h,h+1|0)|0;n=b[h>>0]|0}a:do if(n<<24>>24>-1){k=a+172|0;j=f[(f[k>>2]|0)+((n<<24>>24)*136|0)>>2]|0;l=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+56|0;m=b[h>>0]|0;o=f[k>>2]|0;k=f[o+(m*136|0)+132>>2]|0;switch(f[(f[(f[l>>2]|0)+84>>2]|0)+(j<<2)>>2]|0){case 0:{p=k;q=7;break a;break}case 1:{if(b[o+(m*136|0)+28>>0]|0){p=k;q=7;break a}break}default:{}}m=f[(f[c>>2]|0)+44>>2]|0;b[i>>0]=1;o=m+16|0;j=f[o+4>>2]|0;if(!((j|0)>0|(j|0)==0&(f[o>>2]|0)>>>0>0)){f[g>>2]=f[m+4>>2];f[e>>2]=f[g>>2];ye(m,e,i,i+1|0)|0}r=k}else{p=f[a+68>>2]|0;q=7}while(0);if((q|0)==7){q=f[(f[c>>2]|0)+44>>2]|0;b[i>>0]=0;a=q+16|0;h=f[a+4>>2]|0;if(!((h|0)>0|(h|0)==0&(f[a>>2]|0)>>>0>0)){f[g>>2]=f[q+4>>2];f[e>>2]=f[g>>2];ye(q,e,i,i+1|0)|0}r=p}p=f[(f[c>>2]|0)+44>>2]|0;b[i>>0]=r;r=p+16|0;c=f[r+4>>2]|0;if((c|0)>0|(c|0)==0&(f[r>>2]|0)>>>0>0){u=d;return 1}f[g>>2]=f[p+4>>2];f[e>>2]=f[g>>2];ye(p,e,i,i+1|0)|0;u=d;return 1}function me(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;h=u;u=u+16|0;i=h+4|0;j=h;k=a+60|0;f[a+64>>2]=g;g=a+8|0;Ah(g,b,d,e);d=a+56|0;l=f[d>>2]|0;m=f[l+4>>2]|0;n=f[l>>2]|0;o=m-n|0;if((o|0)<=0){u=h;return 1}p=(o>>>2)+-1|0;o=a+68|0;q=a+16|0;r=a+32|0;s=a+12|0;t=a+28|0;v=a+20|0;w=a+24|0;if(m-n>>2>>>0>p>>>0){x=p;y=n}else{z=l;mq(z)}while(1){f[j>>2]=f[y+(x<<2)>>2];f[i>>2]=f[j>>2];tb(k,i,b,x)|0;l=X(x,e)|0;n=b+(l<<2)|0;p=c+(l<<2)|0;l=f[g>>2]|0;if((l|0)>0){m=0;a=o;A=l;while(1){if((A|0)>0){l=0;do{B=f[a+(l<<2)>>2]|0;C=f[q>>2]|0;if((B|0)>(C|0)){D=f[r>>2]|0;f[D+(l<<2)>>2]=C;E=D}else{D=f[s>>2]|0;C=f[r>>2]|0;f[C+(l<<2)>>2]=(B|0)<(D|0)?D:B;E=C}l=l+1|0}while((l|0)<(f[g>>2]|0));F=E}else F=f[r>>2]|0;l=(f[n+(m<<2)>>2]|0)-(f[F+(m<<2)>>2]|0)|0;C=p+(m<<2)|0;f[C>>2]=l;if((l|0)>=(f[t>>2]|0)){if((l|0)>(f[w>>2]|0)){G=l-(f[v>>2]|0)|0;H=18}}else{G=(f[v>>2]|0)+l|0;H=18}if((H|0)==18){H=0;f[C>>2]=G}m=m+1|0;A=f[g>>2]|0;if((m|0)>=(A|0))break;else a=F}}x=x+-1|0;if((x|0)<=-1){H=3;break}a=f[d>>2]|0;y=f[a>>2]|0;if((f[a+4>>2]|0)-y>>2>>>0<=x>>>0){z=a;H=4;break}}if((H|0)==3){u=h;return 1}else if((H|0)==4)mq(z);return 0}function ne(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;h=u;u=u+16|0;i=h+4|0;j=h;k=a+60|0;f[a+64>>2]=g;g=a+8|0;Ah(g,b,d,e);d=a+56|0;l=f[d>>2]|0;m=f[l+4>>2]|0;n=f[l>>2]|0;o=m-n|0;if((o|0)<=0){u=h;return 1}p=(o>>>2)+-1|0;o=a+68|0;q=a+16|0;r=a+32|0;s=a+12|0;t=a+28|0;v=a+20|0;w=a+24|0;if(m-n>>2>>>0>p>>>0){x=p;y=n}else{z=l;mq(z)}while(1){f[j>>2]=f[y+(x<<2)>>2];f[i>>2]=f[j>>2];sb(k,i,b,x)|0;l=X(x,e)|0;n=b+(l<<2)|0;p=c+(l<<2)|0;l=f[g>>2]|0;if((l|0)>0){m=0;a=o;A=l;while(1){if((A|0)>0){l=0;do{B=f[a+(l<<2)>>2]|0;C=f[q>>2]|0;if((B|0)>(C|0)){D=f[r>>2]|0;f[D+(l<<2)>>2]=C;E=D}else{D=f[s>>2]|0;C=f[r>>2]|0;f[C+(l<<2)>>2]=(B|0)<(D|0)?D:B;E=C}l=l+1|0}while((l|0)<(f[g>>2]|0));F=E}else F=f[r>>2]|0;l=(f[n+(m<<2)>>2]|0)-(f[F+(m<<2)>>2]|0)|0;C=p+(m<<2)|0;f[C>>2]=l;if((l|0)>=(f[t>>2]|0)){if((l|0)>(f[w>>2]|0)){G=l-(f[v>>2]|0)|0;H=18}}else{G=(f[v>>2]|0)+l|0;H=18}if((H|0)==18){H=0;f[C>>2]=G}m=m+1|0;A=f[g>>2]|0;if((m|0)>=(A|0))break;else a=F}}x=x+-1|0;if((x|0)<=-1){H=3;break}a=f[d>>2]|0;y=f[a>>2]|0;if((f[a+4>>2]|0)-y>>2>>>0<=x>>>0){z=a;H=4;break}}if((H|0)==3){u=h;return 1}else if((H|0)==4)mq(z);return 0}function oe(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+12|0;g=f[e>>2]|0;h=(f[g+4>>2]|0)-(f[g>>2]|0)>>2;if(!h){u=b;return 1}i=a+152|0;j=a+140|0;k=a+144|0;l=a+148|0;a=0;m=g;while(1){f[d>>2]=(a>>>0)/3|0;f[c>>2]=f[d>>2];if(!(Rj(m,c)|0)?(g=f[e>>2]|0,(f[(f[g+12>>2]|0)+(a<<2)>>2]|0)==-1):0){n=a+1|0;o=((n>>>0)%3|0|0)==0?a+-2|0:n;if((o|0)==-1)p=-1;else p=f[(f[g>>2]|0)+(o<<2)>>2]|0;o=f[i>>2]|0;if((f[o+(p<<2)>>2]|0)==-1){g=f[k>>2]|0;n=f[l>>2]|0;if((g|0)==(n<<5|0)){if((g+1|0)<0){q=11;break}r=n<<6;n=g+32&-32;hi(j,g>>>0<1073741823?(r>>>0>>0?n:r):2147483647);s=f[k>>2]|0;t=f[i>>2]|0}else{s=g;t=o}f[k>>2]=s+1;o=(f[j>>2]|0)+(s>>>5<<2)|0;f[o>>2]=f[o>>2]&~(1<<(s&31));o=t+(p<<2)|0;if((f[o>>2]|0)==-1){r=a;n=o;while(1){f[n>>2]=g;o=r+1|0;a:do if((r|0)!=-1?(v=((o>>>0)%3|0|0)==0?r+-2|0:o,(v|0)!=-1):0){w=f[e>>2]|0;x=f[w+12>>2]|0;y=v;while(1){v=f[x+(y<<2)>>2]|0;if((v|0)==-1)break;z=v+1|0;A=((z>>>0)%3|0|0)==0?v+-2|0:z;if((A|0)==-1){B=-1;C=-1;break a}else y=A}x=y+1|0;A=((x>>>0)%3|0|0)==0?y+-2|0:x;if((A|0)==-1){B=y;C=-1}else{B=y;C=f[(f[w>>2]|0)+(A<<2)>>2]|0}}else{B=-1;C=-1}while(0);n=t+(C<<2)|0;if((f[n>>2]|0)!=-1)break;else r=B}}}}r=a+1|0;if(r>>>0>=h>>>0){q=3;break}a=r;m=f[e>>2]|0}if((q|0)==3){u=b;return 1}else if((q|0)==11)mq(j);return 0} +function pe(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=u;u=u+32|0;e=d+8|0;g=d;h=a+4|0;i=f[h>>2]|0;if(i>>>0>=b>>>0){f[h>>2]=b;u=d;return}j=a+8|0;k=f[j>>2]|0;l=k<<5;m=b-i|0;if(l>>>0>>0|i>>>0>(l-m|0)>>>0){f[e>>2]=0;n=e+4|0;f[n>>2]=0;o=e+8|0;f[o>>2]=0;if((b|0)<0)mq(a);p=k<<6;k=b+31&-32;hi(e,l>>>0<1073741823?(p>>>0>>0?k:p):2147483647);p=f[h>>2]|0;f[n>>2]=p+m;k=f[a>>2]|0;l=k;q=f[e>>2]|0;r=(l+(p>>>5<<2)-k<<3)+(p&31)|0;if((r|0)>0){p=r>>>5;Xl(q|0,k|0,p<<2|0)|0;k=r&31;r=q+(p<<2)|0;s=r;if(!k){t=0;v=s}else{w=-1>>>(32-k|0);f[r>>2]=f[r>>2]&~w|f[l+(p<<2)>>2]&w;t=k;v=s}}else{t=0;v=q}f[g>>2]=v;f[g+4>>2]=t;t=g;g=f[t>>2]|0;v=f[t+4>>2]|0;t=f[a>>2]|0;f[a>>2]=f[e>>2];f[e>>2]=t;e=f[h>>2]|0;f[h>>2]=f[n>>2];f[n>>2]=e;e=f[j>>2]|0;f[j>>2]=f[o>>2];f[o>>2]=e;if(t|0)br(t);x=g;y=v}else{v=(f[a>>2]|0)+(i>>>5<<2)|0;f[h>>2]=b;x=v;y=i&31}if(!m){u=d;return}i=(y|0)==0;v=x;if(c){if(i){z=m;A=x;B=v}else{c=32-y|0;b=c>>>0>m>>>0?m:c;f[v>>2]=f[v>>2]|-1>>>(c-b|0)&-1<>>5;hj(A|0,-1,c<<2|0)|0;A=z&31;z=B+(c<<2)|0;if(!A){u=d;return}f[z>>2]=f[z>>2]|-1>>>(32-A|0);u=d;return}else{if(i){C=m;D=x;E=v}else{x=32-y|0;i=x>>>0>m>>>0?m:x;f[v>>2]=f[v>>2]&~(-1>>>(x-i|0)&-1<>>5;hj(D|0,0,y<<2|0)|0;D=C&31;C=E+(y<<2)|0;if(!D){u=d;return}f[C>>2]=f[C>>2]&~(-1>>>(32-D|0));u=d;return}}function qe(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0;a=u;u=u+48|0;g=a+36|0;h=a+24|0;i=a+12|0;j=a;if(!c){k=0;u=a;return k|0}f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;l=vj(d)|0;if(l>>>0>4294967279)mq(g);if(l>>>0<11){b[g+11>>0]=l;if(!l)m=g;else{n=g;o=7}}else{p=l+16&-16;q=dn(p)|0;f[g>>2]=q;f[g+8>>2]=p|-2147483648;f[g+4>>2]=l;n=q;o=7}if((o|0)==7){Rg(n|0,d|0,l|0)|0;m=n}b[m+l>>0]=0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;l=vj(e)|0;if(l>>>0>4294967279)mq(h);if(l>>>0<11){b[h+11>>0]=l;if(!l)r=h;else{s=h;o=13}}else{m=l+16&-16;n=dn(m)|0;f[h>>2]=n;f[h+8>>2]=m|-2147483648;f[h+4>>2]=l;s=n;o=13}if((o|0)==13){Rg(s|0,e|0,l|0)|0;r=s}b[r+l>>0]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;l=vj(d)|0;if(l>>>0>4294967279)mq(i);if(l>>>0<11){b[i+11>>0]=l;if(!l)t=i;else{v=i;o=19}}else{r=l+16&-16;s=dn(r)|0;f[i>>2]=s;f[i+8>>2]=r|-2147483648;f[i+4>>2]=l;v=s;o=19}if((o|0)==19){Rg(v|0,d|0,l|0)|0;t=v}b[t+l>>0]=0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;l=vj(e)|0;if(l>>>0>4294967279)mq(j);if(l>>>0<11){b[j+11>>0]=l;if(!l)w=j;else{x=j;o=25}}else{t=l+16&-16;v=dn(t)|0;f[j>>2]=v;f[j+8>>2]=t|-2147483648;f[j+4>>2]=l;x=v;o=25}if((o|0)==25){Rg(x|0,e|0,l|0)|0;w=x}b[w+l>>0]=0;en(c,i,j);if((b[j+11>>0]|0)<0)br(f[j>>2]|0);if((b[i+11>>0]|0)<0)br(f[i>>2]|0);if((b[h+11>>0]|0)<0)br(f[h>>2]|0);if((b[g+11>>0]|0)<0)br(f[g>>2]|0);k=1;u=a;return k|0}function re(a,c){a=a|0;c=c|0;var d=0,e=0,g=0;f[a>>2]=f[c>>2];d=c+4|0;f[a+4>>2]=f[d>>2];e=c+8|0;f[a+8>>2]=f[e>>2];g=c+12|0;f[a+12>>2]=f[g>>2];f[d>>2]=0;f[e>>2]=0;f[g>>2]=0;g=c+16|0;f[a+16>>2]=f[g>>2];e=c+20|0;f[a+20>>2]=f[e>>2];d=c+24|0;f[a+24>>2]=f[d>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;b[a+28>>0]=b[c+28>>0]|0;d=a+32|0;e=c+32|0;f[d>>2]=0;g=a+36|0;f[g>>2]=0;f[a+40>>2]=0;f[d>>2]=f[e>>2];d=c+36|0;f[g>>2]=f[d>>2];g=c+40|0;f[a+40>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;e=a+44|0;d=c+44|0;f[e>>2]=0;g=a+48|0;f[g>>2]=0;f[a+52>>2]=0;f[e>>2]=f[d>>2];e=c+48|0;f[g>>2]=f[e>>2];g=c+52|0;f[a+52>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;d=a+56|0;e=c+56|0;f[d>>2]=0;g=a+60|0;f[g>>2]=0;f[a+64>>2]=0;f[d>>2]=f[e>>2];d=c+60|0;f[g>>2]=f[d>>2];g=c+64|0;f[a+64>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;f[a+68>>2]=f[c+68>>2];f[a+72>>2]=f[c+72>>2];e=a+76|0;d=c+76|0;f[e>>2]=0;g=a+80|0;f[g>>2]=0;f[a+84>>2]=0;f[e>>2]=f[d>>2];e=c+80|0;f[g>>2]=f[e>>2];g=c+84|0;f[a+84>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;d=a+88|0;e=c+88|0;f[d>>2]=0;g=a+92|0;f[g>>2]=0;f[a+96>>2]=0;f[d>>2]=f[e>>2];d=c+92|0;f[g>>2]=f[d>>2];g=c+96|0;f[a+96>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;b[a+100>>0]=b[c+100>>0]|0;e=a+104|0;d=c+104|0;f[e>>2]=0;g=a+108|0;f[g>>2]=0;f[a+112>>2]=0;f[e>>2]=f[d>>2];e=c+108|0;f[g>>2]=f[e>>2];g=c+112|0;f[a+112>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;d=a+116|0;e=c+116|0;f[d>>2]=0;g=a+120|0;f[g>>2]=0;f[a+124>>2]=0;f[d>>2]=f[e>>2];d=c+120|0;f[g>>2]=f[d>>2];g=c+124|0;f[a+124>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;f[a+128>>2]=f[c+128>>2];f[a+132>>2]=f[c+132>>2];return}function se(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;h=u;u=u+48|0;i=h+36|0;j=h+24|0;k=h+8|0;l=h+4|0;m=h;n=e+4|0;Bh(i,c,(f[n>>2]|0)-(f[e>>2]|0)>>2,2,g,d,1);g=f[i>>2]|0;o=(f[f[g>>2]>>2]|0)+(f[g+48>>2]|0)|0;f[k>>2]=-1;f[k+4>>2]=-1;f[k+8>>2]=-1;f[k+12>>2]=-1;p=f[c+4>>2]|0;if((p+-2|0)>>>0<=28){f[k>>2]=p;c=1<>2]=c+-1;p=c+-2|0;f[k+8>>2]=p;f[k+12>>2]=(p|0)/2|0;p=f[e>>2]|0;if((f[n>>2]|0)==(p|0))q=g;else{c=d+84|0;r=d+68|0;s=d+48|0;t=d+40|0;v=0;w=0;x=p;while(1){p=f[x+(v<<2)>>2]|0;if(!(b[c>>0]|0))y=f[(f[r>>2]|0)+(p<<2)>>2]|0;else y=p;p=s;z=f[p>>2]|0;A=f[p+4>>2]|0;p=t;B=f[p>>2]|0;C=on(B|0,f[p+4>>2]|0,y|0,0)|0;p=Tn(C|0,I|0,z|0,A|0)|0;Rg(j|0,(f[f[d>>2]>>2]|0)+p|0,B|0)|0;df(k,j,l,m);f[o+(w<<2)>>2]=f[l>>2];f[o+((w|1)<<2)>>2]=f[m>>2];v=v+1|0;x=f[e>>2]|0;if(v>>>0>=(f[n>>2]|0)-x>>2>>>0)break;else w=w+2|0}q=f[i>>2]|0}f[a>>2]=q;f[i>>2]=0;u=h;return}f[a>>2]=0;f[i>>2]=0;if(!g){u=h;return}i=g+88|0;a=f[i>>2]|0;f[i>>2]=0;if(a|0){i=f[a+8>>2]|0;if(i|0){q=a+12|0;if((f[q>>2]|0)!=(i|0))f[q>>2]=i;br(i)}br(a)}a=f[g+68>>2]|0;if(a|0){i=g+72|0;q=f[i>>2]|0;if((q|0)!=(a|0))f[i>>2]=q+(~((q+-4-a|0)>>>2)<<2);br(a)}a=g+64|0;q=f[a>>2]|0;f[a>>2]=0;if(q|0){a=f[q>>2]|0;if(a|0){i=q+4|0;if((f[i>>2]|0)!=(a|0))f[i>>2]=a;br(a)}br(q)}br(g);u=h;return}function te(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;if(((e-h|0)/136|0)>>>0>=c>>>0){i=c;j=h;do{f[j>>2]=-1;Ek(j+4|0);b[j+100>>0]=1;k=j+104|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;f[k+24>>2]=0;j=(f[g>>2]|0)+136|0;f[g>>2]=j;i=i+-1|0}while((i|0)!=0);return}i=f[a>>2]|0;j=(h-i|0)/136|0;h=j+c|0;if(h>>>0>31580641)mq(a);k=(e-i|0)/136|0;i=k<<1;e=k>>>0<15790320?(i>>>0>>0?h:i):31580641;do if(e)if(e>>>0>31580641){i=ra(8)|0;Wo(i,14941);f[i>>2]=6944;va(i|0,1080,114)}else{l=dn(e*136|0)|0;break}else l=0;while(0);i=l+(j*136|0)|0;j=i;h=l+(e*136|0)|0;e=c;c=j;l=i;do{f[l>>2]=-1;Ek(l+4|0);b[l+100>>0]=1;k=l+104|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;f[k+24>>2]=0;l=c+136|0;c=l;e=e+-1|0}while((e|0)!=0);e=f[a>>2]|0;l=f[g>>2]|0;if((l|0)==(e|0)){m=j;n=e;o=e}else{k=l;l=j;j=i;do{k=k+-136|0;re(j+-136|0,k);j=l+-136|0;l=j}while((k|0)!=(e|0));m=l;n=f[a>>2]|0;o=f[g>>2]|0}f[a>>2]=m;f[g>>2]=c;f[d>>2]=h;h=n;if((o|0)!=(h|0)){d=o;do{o=f[d+-20>>2]|0;if(o|0){c=d+-16|0;g=f[c>>2]|0;if((g|0)!=(o|0))f[c>>2]=g+(~((g+-4-o|0)>>>2)<<2);br(o)}o=f[d+-32>>2]|0;if(o|0){g=d+-28|0;c=f[g>>2]|0;if((c|0)!=(o|0))f[g>>2]=c+(~((c+-4-o|0)>>>2)<<2);br(o)}yi(d+-132|0);d=d+-136|0}while((d|0)!=(h|0))}if(!n)return;br(n);return}function ue(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=f[b>>2]|0;b=a+12|0;d=(c|0)==-1;e=c+1|0;do if(!d){g=((e>>>0)%3|0|0)==0?c+-2|0:e;if(!((c>>>0)%3|0)){h=g;i=c+2|0;break}else{h=g;i=c+-1|0;break}}else{h=-1;i=-1}while(0);e=d?-1:(c>>>0)/3|0;g=a+28|0;j=(f[g>>2]|0)+(e>>>5<<2)|0;f[j>>2]=1<<(e&31)|f[j>>2];j=a+172|0;e=a+176|0;k=a+280|0;if(((!d?(d=f[(f[(f[b>>2]|0)+12>>2]|0)+(c<<2)>>2]|0,(d|0)!=-1):0)?(a=(d>>>0)/3|0,(f[(f[g>>2]|0)+(a>>>5<<2)>>2]&1<<(a&31)|0)==0):0)?(a=f[j>>2]|0,(f[e>>2]|0)!=(a|0)):0){d=c>>>5;l=1<<(c&31);c=0;m=a;do{a=(f[k>>2]|0)+(c<<5)|0;if(!(l&f[(f[m+(c*136|0)+4>>2]|0)+(d<<2)>>2]))Vi(a,0);else Vi(a,1);c=c+1|0;m=f[j>>2]|0}while(c>>>0<(((f[e>>2]|0)-m|0)/136|0)>>>0)}if((((h|0)!=-1?(m=f[(f[(f[b>>2]|0)+12>>2]|0)+(h<<2)>>2]|0,(m|0)!=-1):0)?(c=(m>>>0)/3|0,(f[(f[g>>2]|0)+(c>>>5<<2)>>2]&1<<(c&31)|0)==0):0)?(c=f[j>>2]|0,(f[e>>2]|0)!=(c|0)):0){m=h>>>5;d=1<<(h&31);h=0;l=c;do{c=(f[k>>2]|0)+(h<<5)|0;if(!(d&f[(f[l+(h*136|0)+4>>2]|0)+(m<<2)>>2]))Vi(c,0);else Vi(c,1);h=h+1|0;l=f[j>>2]|0}while(h>>>0<(((f[e>>2]|0)-l|0)/136|0)>>>0)}if((i|0)==-1)return 1;l=f[(f[(f[b>>2]|0)+12>>2]|0)+(i<<2)>>2]|0;if((l|0)==-1)return 1;b=(l>>>0)/3|0;if(f[(f[g>>2]|0)+(b>>>5<<2)>>2]&1<<(b&31)|0)return 1;b=f[j>>2]|0;if((f[e>>2]|0)==(b|0))return 1;g=i>>>5;l=1<<(i&31);i=0;h=b;do{b=(f[k>>2]|0)+(i<<5)|0;if(!(l&f[(f[h+(i*136|0)+4>>2]|0)+(g<<2)>>2]))Vi(b,0);else Vi(b,1);i=i+1|0;h=f[j>>2]|0}while(i>>>0<(((f[e>>2]|0)-h|0)/136|0)>>>0);return 1}function ve(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;i=a+4|0;j=a+8|0;Nh((f[j>>2]|0)-(f[i>>2]|0)>>2,c)|0;k=f[i>>2]|0;if((f[j>>2]|0)==(k|0)){u=d;return 1}l=a+32|0;a=c+16|0;m=c+4|0;n=h+1|0;o=h+1|0;p=h+1|0;q=h+1|0;r=0;s=k;do{k=f[(f[(f[l>>2]|0)+8>>2]|0)+(f[s+(r<<2)>>2]<<2)>>2]|0;b[h>>0]=f[k+56>>2];t=a;v=f[t>>2]|0;w=f[t+4>>2]|0;if((w|0)>0|(w|0)==0&v>>>0>0){x=w;y=v}else{f[g>>2]=f[m>>2];f[e>>2]=f[g>>2];ye(c,e,h,q)|0;v=a;x=f[v+4>>2]|0;y=f[v>>2]|0}b[h>>0]=f[k+28>>2];if((x|0)>0|(x|0)==0&y>>>0>0){z=x;A=y}else{f[g>>2]=f[m>>2];f[e>>2]=f[g>>2];ye(c,e,h,p)|0;v=a;z=f[v+4>>2]|0;A=f[v>>2]|0}b[h>>0]=b[k+24>>0]|0;if((z|0)>0|(z|0)==0&A>>>0>0){B=z;C=A}else{f[g>>2]=f[m>>2];f[e>>2]=f[g>>2];ye(c,e,h,o)|0;v=a;B=f[v+4>>2]|0;C=f[v>>2]|0}b[h>>0]=b[k+32>>0]|0;if(!((B|0)>0|(B|0)==0&C>>>0>0)){f[g>>2]=f[m>>2];f[e>>2]=f[g>>2];ye(c,e,h,n)|0}Nh(f[k+60>>2]|0,c)|0;r=r+1|0;s=f[i>>2]|0}while(r>>>0<(f[j>>2]|0)-s>>2>>>0);u=d;return 1}function we(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0;d=u;u=u+32|0;e=d+16|0;g=d+12|0;h=d+8|0;i=d+4|0;j=d;wp(a);f[a+16>>2]=0;f[a+20>>2]=0;f[a+12>>2]=a+16;k=a+24|0;wp(k);l=b+4|0;if((a|0)!=(l|0)){f[h>>2]=f[l>>2];f[i>>2]=b+8;f[g>>2]=f[h>>2];f[e>>2]=f[i>>2];Hc(a,g,e)}l=b+28|0;if((k|0)!=(l|0)){f[h>>2]=f[l>>2];f[i>>2]=b+32;f[g>>2]=f[h>>2];f[e>>2]=f[i>>2];Hc(k,g,e)}f[j>>2]=0;k=c+8|0;l=c+12|0;c=f[l>>2]|0;m=f[k>>2]|0;if((c-m|0)<=0){u=d;return}n=b+20|0;b=m;m=c;c=0;while(1){o=f[(f[b+(c<<2)>>2]|0)+56>>2]|0;p=f[n>>2]|0;if(p){q=n;r=p;a:while(1){p=r;while(1){if((f[p+16>>2]|0)>=(o|0))break;s=f[p+4>>2]|0;if(!s){t=q;break a}else p=s}r=f[p>>2]|0;if(!r){t=p;break}else q=p}if((t|0)!=(n|0)?(o|0)>=(f[t+16>>2]|0):0){q=t+20|0;r=wd(a,j)|0;if((r|0)!=(q|0)){f[h>>2]=f[q>>2];f[i>>2]=t+24;f[g>>2]=f[h>>2];f[e>>2]=f[i>>2];Hc(r,g,e)}v=f[j>>2]|0;w=f[k>>2]|0;x=f[l>>2]|0}else{v=c;w=b;x=m}}else{v=c;w=b;x=m}c=v+1|0;f[j>>2]=c;if((c|0)>=(x-w>>2|0))break;else{b=w;m=x}}u=d;return}function xe(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;i=a+12|0;Nh(f[i>>2]|0,c)|0;if(!(f[i>>2]|0)){j=1;u=d;return j|0}k=c+16|0;l=c+4|0;m=h+1|0;n=h+1|0;o=h+1|0;p=0;while(1){q=f[a>>2]|0;r=f[q+(p<<3)>>2]|0;if(r>>>0>63)if(r>>>0>16383)if(r>>>0>4194303){j=0;s=20;break}else{t=2;s=13}else{t=1;s=13}else if(!r){v=p+1|0;w=0;while(1){if(f[q+(v+w<<3)>>2]|0){x=w;break}y=w+1|0;if(y>>>0<63)w=y;else{x=y;break}}b[h>>0]=x<<2|3;w=k;v=f[w+4>>2]|0;if(!((v|0)>0|(v|0)==0&(f[w>>2]|0)>>>0>0)){f[g>>2]=f[l>>2];f[e>>2]=f[g>>2];ye(c,e,h,o)|0}z=x+p|0}else{t=0;s=13}if((s|0)==13){s=0;b[h>>0]=t|r<<2;w=k;v=f[w+4>>2]|0;if(!((v|0)>0|(v|0)==0&(f[w>>2]|0)>>>0>0)){f[g>>2]=f[l>>2];f[e>>2]=f[g>>2];ye(c,e,h,n)|0}if(!t)z=p;else{w=0;do{w=w+1|0;b[h>>0]=r>>>((w<<3)+-2|0);v=k;q=f[v+4>>2]|0;if(!((q|0)>0|(q|0)==0&(f[v>>2]|0)>>>0>0)){f[g>>2]=f[l>>2];f[e>>2]=f[g>>2];ye(c,e,h,m)|0}}while((w|0)<(t|0));z=p}}p=z+1|0;if(p>>>0>=(f[i>>2]|0)>>>0){j=1;s=20;break}}if((s|0)==20){u=d;return j|0}return 0}function ye(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;g=f[a>>2]|0;h=g;i=(f[c>>2]|0)-h|0;c=g+i|0;j=e-d|0;if((j|0)<=0){k=c;return k|0}l=a+8|0;m=f[l>>2]|0;n=a+4|0;o=f[n>>2]|0;p=o;if((j|0)<=(m-p|0)){q=p-c|0;if((j|0)>(q|0)){r=d+q|0;if((r|0)==(e|0))s=o;else{t=r;u=o;while(1){b[u>>0]=b[t>>0]|0;t=t+1|0;v=(f[n>>2]|0)+1|0;f[n>>2]=v;if((t|0)==(e|0)){s=v;break}else u=v}}if((q|0)>0){w=r;x=s}else{k=c;return k|0}}else{w=e;x=o}s=x-(c+j)|0;r=c+s|0;if(r>>>0>>0){q=r;r=x;do{b[r>>0]=b[q>>0]|0;q=q+1|0;r=(f[n>>2]|0)+1|0;f[n>>2]=r}while((q|0)!=(o|0))}if(s|0)Xl(x+(0-s)|0,c|0,s|0)|0;if((w|0)==(d|0)){k=c;return k|0}else{y=d;z=c}while(1){b[z>>0]=b[y>>0]|0;y=y+1|0;if((y|0)==(w|0)){k=c;break}else z=z+1|0}return k|0}z=p-h+j|0;if((z|0)<0)mq(a);j=m-h|0;h=j<<1;m=j>>>0<1073741823?(h>>>0>>0?z:h):2147483647;h=c;if(!m)A=0;else A=dn(m)|0;z=A+i|0;i=z;j=A+m|0;if((d|0)==(e|0)){B=i;C=g}else{g=d;d=i;i=z;do{b[i>>0]=b[g>>0]|0;i=d+1|0;d=i;g=g+1|0}while((g|0)!=(e|0));B=d;C=f[a>>2]|0}d=h-C|0;e=z+(0-d)|0;if((d|0)>0)Rg(e|0,C|0,d|0)|0;d=(f[n>>2]|0)-h|0;if((d|0)>0){h=B;Rg(h|0,c|0,d|0)|0;D=h+d|0;E=f[a>>2]|0}else{D=B;E=C}f[a>>2]=e;f[n>>2]=D;f[l>>2]=j;if(!E){k=z;return k|0}br(E);k=z;return k|0}function ze(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=u;u=u+16|0;g=e;h=f[(f[c+4>>2]|0)+(d<<2)>>2]|0;d=f[c+28>>2]|0;c=f[(f[(f[d+4>>2]|0)+8>>2]|0)+(h<<2)>>2]|0;switch(f[c+28>>2]|0){case 5:case 6:case 3:case 4:case 1:case 2:{i=dn(40)|0;Ao(i);j=i;k=j;f[a>>2]=k;u=e;return}case 9:{l=3;break}default:{}}if((l|0)==3){i=f[d+48>>2]|0;d=dn(32)|0;f[g>>2]=d;f[g+8>>2]=-2147483616;f[g+4>>2]=17;m=d;n=12932;o=m+17|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[d+17>>0]=0;d=i+16|0;n=f[d>>2]|0;if(n){p=d;q=n;a:while(1){n=q;while(1){if((f[n+16>>2]|0)>=(h|0))break;r=f[n+4>>2]|0;if(!r){s=p;break a}else n=r}q=f[n>>2]|0;if(!q){s=n;break}else p=n}if(((s|0)!=(d|0)?(h|0)>=(f[s+16>>2]|0):0)?(h=s+20|0,(sh(h,g)|0)!=0):0)t=yk(h,g,-1)|0;else l=12}else l=12;if((l|0)==12)t=yk(i,g,-1)|0;if((b[g+11>>0]|0)<0)br(f[g>>2]|0);if((t|0)>0)if((f[c+56>>2]|0)==1){c=dn(48)|0;m=c;o=m+48|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(o|0));Ao(c);f[c>>2]=2256;f[c+40>>2]=1152;f[c+44>>2]=-1;j=c;k=j;f[a>>2]=k;u=e;return}else{c=dn(64)|0;mm(c);j=c;k=j;f[a>>2]=k;u=e;return}}c=dn(36)|0;wm(c);j=c;k=j;f[a>>2]=k;u=e;return}function Ae(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=(c|0)==(a|0);b[c+12>>0]=d&1;if(d)return;else e=c;while(1){g=e+8|0;h=f[g>>2]|0;c=h+12|0;if(b[c>>0]|0){i=23;break}j=h+8|0;k=f[j>>2]|0;d=f[k>>2]|0;if((d|0)==(h|0)){l=f[k+4>>2]|0;if(!l){i=7;break}m=l+12|0;if(!(b[m>>0]|0))n=m;else{i=7;break}}else{if(!d){i=16;break}m=d+12|0;if(!(b[m>>0]|0))n=m;else{i=16;break}}b[c>>0]=1;c=(k|0)==(a|0);b[k+12>>0]=c&1;b[n>>0]=1;if(c){i=23;break}else e=k}if((i|0)==7){if((f[h>>2]|0)==(e|0)){o=h;p=k}else{n=h+4|0;a=f[n>>2]|0;c=f[a>>2]|0;f[n>>2]=c;if(!c)q=k;else{f[c+8>>2]=h;q=f[j>>2]|0}f[a+8>>2]=q;q=f[j>>2]|0;f[((f[q>>2]|0)==(h|0)?q:q+4|0)>>2]=a;f[a>>2]=h;f[j>>2]=a;o=a;p=f[a+8>>2]|0}b[o+12>>0]=1;b[p+12>>0]=0;o=f[p>>2]|0;a=o+4|0;q=f[a>>2]|0;f[p>>2]=q;if(q|0)f[q+8>>2]=p;q=p+8|0;f[o+8>>2]=f[q>>2];c=f[q>>2]|0;f[((f[c>>2]|0)==(p|0)?c:c+4|0)>>2]=o;f[a>>2]=p;f[q>>2]=o;return}else if((i|0)==16){if((f[h>>2]|0)==(e|0)){o=e+4|0;q=f[o>>2]|0;f[h>>2]=q;if(!q)r=k;else{f[q+8>>2]=h;r=f[j>>2]|0}f[g>>2]=r;r=f[j>>2]|0;f[((f[r>>2]|0)==(h|0)?r:r+4|0)>>2]=e;f[o>>2]=h;f[j>>2]=e;s=e;t=f[e+8>>2]|0}else{s=h;t=k}b[s+12>>0]=1;b[t+12>>0]=0;s=t+4|0;k=f[s>>2]|0;h=f[k>>2]|0;f[s>>2]=h;if(h|0)f[h+8>>2]=t;h=t+8|0;f[k+8>>2]=f[h>>2];s=f[h>>2]|0;f[((f[s>>2]|0)==(t|0)?s:s+4|0)>>2]=k;f[k>>2]=t;f[h>>2]=k;return}else if((i|0)==23)return}function Be(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=Oa,C=Oa;h=u;u=u+16|0;i=h;j=e+4|0;k=b[d+24>>0]|0;l=k<<24>>24;Bh(a,c,(f[j>>2]|0)-(f[e>>2]|0)>>2,l,g,d,1);g=f[a>>2]|0;a=(f[f[g>>2]>>2]|0)+(f[g+48>>2]|0)|0;g=f[c+4>>2]|0;sq(i);yo(i,$(n[c+20>>2]),(1<>>0>1073741823?-1:l<<2)|0;m=f[j>>2]|0;j=f[e>>2]|0;e=j;if((m|0)==(j|0)){$q(g);u=h;return}o=d+68|0;p=d+48|0;q=d+40|0;r=c+8|0;c=(b[d+84>>0]|0)==0;s=m-j>>2;if(k<<24>>24>0){t=0;v=0}else{k=0;do{j=f[e+(k<<2)>>2]|0;if(c)w=f[(f[o>>2]|0)+(j<<2)>>2]|0;else w=j;j=p;m=f[j>>2]|0;x=f[j+4>>2]|0;j=q;y=f[j>>2]|0;z=on(y|0,f[j+4>>2]|0,w|0,0)|0;j=Tn(z|0,I|0,m|0,x|0)|0;Rg(g|0,(f[f[d>>2]>>2]|0)+j|0,y|0)|0;k=k+1|0}while(k>>>0>>0);$q(g);u=h;return}while(1){k=f[e+(t<<2)>>2]|0;if(c)A=f[(f[o>>2]|0)+(k<<2)>>2]|0;else A=k;k=p;w=f[k>>2]|0;y=f[k+4>>2]|0;k=q;j=f[k>>2]|0;x=on(j|0,f[k+4>>2]|0,A|0,0)|0;k=Tn(x|0,I|0,w|0,y|0)|0;Rg(g|0,(f[f[d>>2]>>2]|0)+k|0,j|0)|0;j=f[r>>2]|0;B=$(n[i>>2]);k=0;y=v;while(1){C=$(n[g+(k<<2)>>2]);w=~~$(J($($(B*$(C-$(n[j+(k<<2)>>2])))+$(.5))));f[a+(y<<2)>>2]=w;k=k+1|0;if((k|0)==(l|0))break;else y=y+1|0}t=t+1|0;if(t>>>0>=s>>>0)break;else v=v+l|0}$q(g);u=h;return}function Ce(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;d=f[b>>2]|0;b=a+12|0;e=(d|0)==-1;do if(e){g=1;h=-1;i=-1}else{j=d+(((d>>>0)%3|0|0)==0?2:-1)|0;if((j|0)!=-1){k=f[(f[b>>2]|0)+12>>2]|0;l=j;while(1){j=f[k+(l<<2)>>2]|0;if((j|0)==-1){m=0;n=l;break}o=j+1|0;l=((o>>>0)%3|0|0)==0?j+-2|0:o;if((l|0)==-1){m=1;n=-1;break}}if(e){g=m;h=-1;i=n;break}else{p=m;q=n}}else{p=1;q=-1}g=p;h=f[(f[f[b>>2]>>2]|0)+(d<<2)>>2]|0;i=q}while(0);if(c){c=(f[a+84>>2]|0)+(h>>>5<<2)|0;f[c>>2]=f[c>>2]|1<<(h&31);r=1}else r=0;c=f[(f[a+152>>2]|0)+(h<<2)>>2]|0;q=(f[a+140>>2]|0)+(c>>>5<<2)|0;f[q>>2]=f[q>>2]|1<<(c&31);if(!g){g=(((i>>>0)%3|0|0)==0?2:-1)+i|0;if((g|0)==-1){s=-1;t=i}else{s=f[(f[f[b>>2]>>2]|0)+(g<<2)>>2]|0;t=i}}else{s=-1;t=-1}if((s|0)==(h|0)){u=r;return u|0}i=f[a+84>>2]|0;a=r;r=s;s=t;while(1){t=i+(r>>>5<<2)|0;f[t>>2]=f[t>>2]|1<<(r&31);t=a+1|0;g=s+1|0;a:do if((s|0)!=-1?(c=((g>>>0)%3|0|0)==0?s+-2|0:g,(c|0)!=-1):0){q=f[b>>2]|0;d=f[q+12>>2]|0;p=c;while(1){c=f[d+(p<<2)>>2]|0;if((c|0)==-1)break;n=c+1|0;m=((n>>>0)%3|0|0)==0?c+-2|0:n;if((m|0)==-1){v=-1;w=-1;break a}else p=m}d=(((p>>>0)%3|0|0)==0?2:-1)+p|0;if((d|0)==-1){v=-1;w=p}else{v=f[(f[q>>2]|0)+(d<<2)>>2]|0;w=p}}else{v=-1;w=-1}while(0);if((v|0)==(h|0)){u=t;break}else{a=t;r=v;s=w}}return u|0}function De(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;c=a+4|0;d=f[c>>2]|0;e=a+100|0;if(d>>>0<(f[e>>2]|0)>>>0){f[c>>2]=d+1;g=h[d>>0]|0}else g=Di(a)|0;switch(g|0){case 43:case 45:{d=(g|0)==45&1;i=f[c>>2]|0;if(i>>>0<(f[e>>2]|0)>>>0){f[c>>2]=i+1;j=h[i>>0]|0}else j=Di(a)|0;if((b|0)!=0&(j+-48|0)>>>0>9?(f[e>>2]|0)!=0:0){f[c>>2]=(f[c>>2]|0)+-1;k=d;l=j}else{k=d;l=j}break}default:{k=0;l=g}}if((l+-48|0)>>>0>9)if(!(f[e>>2]|0)){m=-2147483648;n=0}else{f[c>>2]=(f[c>>2]|0)+-1;m=-2147483648;n=0}else{g=0;j=l;while(1){g=j+-48+(g*10|0)|0;l=f[c>>2]|0;if(l>>>0<(f[e>>2]|0)>>>0){f[c>>2]=l+1;o=h[l>>0]|0}else o=Di(a)|0;if(!((o+-48|0)>>>0<10&(g|0)<214748364))break;else j=o}j=((g|0)<0)<<31>>31;if((o+-48|0)>>>0<10){l=o;d=g;b=j;while(1){i=on(d|0,b|0,10,0)|0;p=I;q=Tn(l|0,((l|0)<0)<<31>>31|0,-48,-1)|0;r=Tn(q|0,I|0,i|0,p|0)|0;p=I;i=f[c>>2]|0;if(i>>>0<(f[e>>2]|0)>>>0){f[c>>2]=i+1;s=h[i>>0]|0}else s=Di(a)|0;if((s+-48|0)>>>0<10&((p|0)<21474836|(p|0)==21474836&r>>>0<2061584302)){l=s;d=r;b=p}else{t=s;u=r;v=p;break}}}else{t=o;u=g;v=j}if((t+-48|0)>>>0<10)do{t=f[c>>2]|0;if(t>>>0<(f[e>>2]|0)>>>0){f[c>>2]=t+1;w=h[t>>0]|0}else w=Di(a)|0}while((w+-48|0)>>>0<10);if(f[e>>2]|0)f[c>>2]=(f[c>>2]|0)+-1;c=(k|0)!=0;k=Vn(0,0,u|0,v|0)|0;m=c?I:v;n=c?k:u}I=m;return n|0}function Ee(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;b=a+1176|0;c=f[b>>2]|0;if(c|0){d=a+1180|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);br(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}br(g)}g=a+1164|0;b=f[g>>2]|0;if(b|0){j=a+1168|0;h=f[j>>2]|0;if((h|0)==(b|0))l=b;else{c=h;while(1){h=c+-12|0;f[j>>2]=h;d=f[h>>2]|0;if(!d)m=h;else{h=c+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);br(d);m=f[j>>2]|0}if((m|0)==(b|0))break;else c=m}l=f[g>>2]|0}br(l)}l=f[a+1152>>2]|0;if(l|0){g=a+1156|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);br(l)}l=f[a+1140>>2]|0;if(l|0){m=a+1144|0;g=f[m>>2]|0;if((g|0)!=(l|0))f[m>>2]=g+(~((g+-4-l|0)>>>2)<<2);br(l)}l=f[a+1128>>2]|0;if(!l){n=a+1108|0;dl(n);o=a+1088|0;dl(o);p=a+1068|0;dl(p);q=a+1036|0;tj(q);r=a+12|0;xh(r);return}g=a+1132|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);br(l);n=a+1108|0;dl(n);o=a+1088|0;dl(o);p=a+1068|0;dl(p);q=a+1036|0;tj(q);r=a+12|0;xh(r);return}function Fe(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=u;u=u+16|0;e=d;g=a+4|0;h=f[g>>2]|0;i=f[(f[a>>2]|0)+52>>2]|0;if(!h){if(!(Sa[i&31](a,c,0)|0)){j=0;u=d;return j|0}}else if(!(Sa[i&31](a,c,f[(f[h+4>>2]|0)+80>>2]|0)|0)){j=0;u=d;return j|0}if(!(b[a+28>>0]|0)){j=1;u=d;return j|0}h=f[a+8>>2]|0;i=f[a+32>>2]|0;a=f[h+80>>2]|0;f[e>>2]=0;k=e+4|0;f[k>>2]=0;f[e+8>>2]=0;do if(a)if(a>>>0>1073741823)mq(e);else{l=a<<2;m=dn(l)|0;f[e>>2]=m;n=m+(a<<2)|0;f[e+8>>2]=n;hj(m|0,0,l|0)|0;f[k>>2]=n;o=m;p=n;q=m;break}else{o=0;p=0;q=0}while(0);e=f[c+4>>2]|0;a=f[c>>2]|0;c=a;a:do if((e|0)!=(a|0)){m=e-a>>2;if(b[h+84>>0]|0){n=0;while(1){f[o+(f[c+(n<<2)>>2]<<2)>>2]=n;n=n+1|0;if(n>>>0>=m>>>0)break a}}n=f[h+68>>2]|0;l=0;do{f[o+(f[n+(f[c+(l<<2)>>2]<<2)>>2]<<2)>>2]=l;l=l+1|0}while(l>>>0>>0)}while(0);c=f[(f[(f[g>>2]|0)+4>>2]|0)+80>>2]|0;b:do if(c|0){g=f[i+68>>2]|0;if(b[h+84>>0]|0){a=0;while(1){f[g+(a<<2)>>2]=f[o+(a<<2)>>2];a=a+1|0;if(a>>>0>=c>>>0)break b}}a=f[h+68>>2]|0;e=0;do{f[g+(e<<2)>>2]=f[o+(f[a+(e<<2)>>2]<<2)>>2];e=e+1|0}while(e>>>0>>0)}while(0);if(o|0){if((p|0)!=(o|0))f[k>>2]=p+(~((p+-4-o|0)>>>2)<<2);br(q)}j=1;u=d;return j|0}function Ge(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=u;u=u+16|0;d=c;f[a>>2]=0;f[a+8>>2]=b;yh(a+12|0);rn(a+1036|0);to(a+1068|0);to(a+1088|0);to(a+1108|0);e=a+1128|0;f[e>>2]=0;g=a+1132|0;f[g>>2]=0;f[a+1136>>2]=0;h=(b|0)==0;do if(!h)if(b>>>0>1073741823)mq(e);else{i=b<<2;j=dn(i)|0;f[e>>2]=j;k=j+(b<<2)|0;f[a+1136>>2]=k;hj(j|0,0,i|0)|0;f[g>>2]=k;break}while(0);g=a+1140|0;f[g>>2]=0;e=a+1144|0;f[e>>2]=0;f[a+1148>>2]=0;if(!h){k=b<<2;i=dn(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+1148>>2]=g;hj(i|0,0,k|0)|0;f[e>>2]=g}g=a+1152|0;f[g>>2]=0;e=a+1156|0;f[e>>2]=0;f[a+1160>>2]=0;if(!h){k=b<<2;i=dn(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+1160>>2]=g;hj(i|0,0,k|0)|0;f[e>>2]=g}g=b<<5|1;f[d>>2]=0;e=d+4|0;f[e>>2]=0;f[d+8>>2]=0;if(!h){k=b<<2;i=dn(k)|0;f[d>>2]=i;j=i+(b<<2)|0;f[d+8>>2]=j;hj(i|0,0,k|0)|0;f[e>>2]=j}fk(a+1164|0,g,d);j=f[d>>2]|0;if(j|0){k=f[e>>2]|0;if((k|0)!=(j|0))f[e>>2]=k+(~((k+-4-j|0)>>>2)<<2);br(j)}f[d>>2]=0;j=d+4|0;f[j>>2]=0;f[d+8>>2]=0;if(!h){h=b<<2;k=dn(h)|0;f[d>>2]=k;e=k+(b<<2)|0;f[d+8>>2]=e;hj(k|0,0,h|0)|0;f[j>>2]=e}fk(a+1176|0,g,d);g=f[d>>2]|0;if(!g){u=c;return}d=f[j>>2]|0;if((d|0)!=(g|0))f[j>>2]=d+(~((d+-4-g|0)>>>2)<<2);br(g);u=c;return}function He(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0.0,E=0.0;g=u;u=u+16|0;h=g;i=b+16|0;f[a>>2]=f[i>>2];f[a+4>>2]=f[i+4>>2];f[a+8>>2]=f[i+8>>2];f[a+12>>2]=f[i+12>>2];f[a+16>>2]=f[i+16>>2];f[a+20>>2]=f[i+20>>2];j=a+8|0;f[j>>2]=(f[j>>2]|0)+d;j=(d|0)>0;if(j){k=b+4|0;l=a+16|0;m=a+12|0;n=f[b>>2]|0;o=n;q=0;r=o;s=n;n=o;while(1){o=f[c+(q<<2)>>2]|0;t=f[k>>2]|0;if(t-s>>2>>>0>o>>>0){v=r;w=n}else{x=o+1|0;f[h>>2]=0;y=t-s>>2;z=s;A=t;if(x>>>0<=y>>>0)if(x>>>0>>0?(t=z+(x<<2)|0,(t|0)!=(A|0)):0){f[k>>2]=A+(~((A+-4-t|0)>>>2)<<2);B=r}else B=r;else{kh(b,x-y|0,h);B=f[b>>2]|0}v=B;w=B}y=w+(o<<2)|0;x=f[y>>2]|0;s=w;if((x|0)<=1)if((x|0)==0?(f[l>>2]=(f[l>>2]|0)+1,o>>>0>(f[m>>2]|0)>>>0):0){f[m>>2]=o;C=0.0}else C=0.0;else{D=+(x|0);C=+Fg(D)*D}x=(f[y>>2]|0)+1|0;f[y>>2]=x;D=+(x|0);E=+Fg(D)*D-C;p[a>>3]=+p[a>>3]+E;q=q+1|0;if((q|0)==(d|0))break;else{r=v;n=w}}}if(e){f[i>>2]=f[a>>2];f[i+4>>2]=f[a+4>>2];f[i+8>>2]=f[a+8>>2];f[i+12>>2]=f[a+12>>2];f[i+16>>2]=f[a+16>>2];u=g;return}if(!j){u=g;return}j=f[b>>2]|0;b=0;do{a=j+(f[c+(b<<2)>>2]<<2)|0;f[a>>2]=(f[a>>2]|0)+-1;b=b+1|0}while((b|0)!=(d|0));u=g;return}function Ie(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0.0;a:do if(b>>>0<=20)do switch(b|0){case 9:{d=(f[c>>2]|0)+(4-1)&~(4-1);e=f[d>>2]|0;f[c>>2]=d+4;f[a>>2]=e;break a;break}case 10:{e=(f[c>>2]|0)+(4-1)&~(4-1);d=f[e>>2]|0;f[c>>2]=e+4;e=a;f[e>>2]=d;f[e+4>>2]=((d|0)<0)<<31>>31;break a;break}case 11:{d=(f[c>>2]|0)+(4-1)&~(4-1);e=f[d>>2]|0;f[c>>2]=d+4;d=a;f[d>>2]=e;f[d+4>>2]=0;break a;break}case 12:{d=(f[c>>2]|0)+(8-1)&~(8-1);e=d;g=f[e>>2]|0;h=f[e+4>>2]|0;f[c>>2]=d+8;d=a;f[d>>2]=g;f[d+4>>2]=h;break a;break}case 13:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=(d&65535)<<16>>16;d=a;f[d>>2]=h;f[d+4>>2]=((h|0)<0)<<31>>31;break a;break}case 14:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=a;f[h>>2]=d&65535;f[h+4>>2]=0;break a;break}case 15:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=(d&255)<<24>>24;d=a;f[d>>2]=h;f[d+4>>2]=((h|0)<0)<<31>>31;break a;break}case 16:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=a;f[h>>2]=d&255;f[h+4>>2]=0;break a;break}case 17:{h=(f[c>>2]|0)+(8-1)&~(8-1);i=+p[h>>3];f[c>>2]=h+8;p[a>>3]=i;break a;break}case 18:{h=(f[c>>2]|0)+(8-1)&~(8-1);i=+p[h>>3];f[c>>2]=h+8;p[a>>3]=i;break a;break}default:break a}while(0);while(0);return}function Je(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;c=u;u=u+16|0;d=c+4|0;e=c;g=c+8|0;if(!(Qa[f[(f[a>>2]|0)+32>>2]&127](a)|0)){h=0;u=c;return h|0}i=a+44|0;j=f[i>>2]|0;k=a+8|0;l=a+12|0;m=f[l>>2]|0;n=f[k>>2]|0;b[g>>0]=(m-n|0)>>>2;o=j+16|0;p=f[o+4>>2]|0;if((p|0)>0|(p|0)==0&(f[o>>2]|0)>>>0>0){q=k;r=n;s=m}else{f[e>>2]=f[j+4>>2];f[d>>2]=f[e>>2];ye(j,d,g,g+1|0)|0;q=k;r=f[k>>2]|0;s=f[l>>2]|0}a:do if((r|0)!=(s|0)){l=a+4|0;k=r;while(1){g=f[k>>2]|0;k=k+4|0;if(!(Sa[f[(f[g>>2]|0)+8>>2]&31](g,a,f[l>>2]|0)|0)){h=0;break}if((k|0)==(s|0))break a}u=c;return h|0}while(0);if(!(vc(a)|0)){h=0;u=c;return h|0}s=a+32|0;r=f[s>>2]|0;k=a+36|0;l=f[k>>2]|0;b:do if((r|0)!=(l|0)){g=r;do{if(!(Ra[f[(f[a>>2]|0)+40>>2]&127](a,f[g>>2]|0)|0)){h=0;t=18;break}g=g+4|0}while((g|0)!=(l|0));if((t|0)==18){u=c;return h|0}g=f[s>>2]|0;d=f[k>>2]|0;if((g|0)!=(d|0)){j=g;while(1){g=f[(f[q>>2]|0)+(f[j>>2]<<2)>>2]|0;j=j+4|0;if(!(Ra[f[(f[g>>2]|0)+12>>2]&127](g,f[i>>2]|0)|0)){h=0;break}if((j|0)==(d|0))break b}u=c;return h|0}}while(0);h=Qa[f[(f[a>>2]|0)+44>>2]&127](a)|0;u=c;return h|0}function Ke(a,b){a=a|0;b=b|0;fd(a,b);fd(a+32|0,b);fd(a+64|0,b);fd(a+96|0,b);fd(a+128|0,b);fd(a+160|0,b);fd(a+192|0,b);fd(a+224|0,b);fd(a+256|0,b);fd(a+288|0,b);fd(a+320|0,b);fd(a+352|0,b);fd(a+384|0,b);fd(a+416|0,b);fd(a+448|0,b);fd(a+480|0,b);fd(a+512|0,b);fd(a+544|0,b);fd(a+576|0,b);fd(a+608|0,b);fd(a+640|0,b);fd(a+672|0,b);fd(a+704|0,b);fd(a+736|0,b);fd(a+768|0,b);fd(a+800|0,b);fd(a+832|0,b);fd(a+864|0,b);fd(a+896|0,b);fd(a+928|0,b);fd(a+960|0,b);fd(a+992|0,b);fd(a+1024|0,b);return}function Le(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=u;u=u+64|0;g=e+60|0;h=e;i=dn(80)|0;j=f[c+8>>2]|0;f[i+4>>2]=0;f[i>>2]=3232;k=i+8|0;l=i+12|0;m=l+44|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[k>>2]=3256;n=i+56|0;f[n>>2]=0;f[i+60>>2]=0;f[i+64>>2]=0;f[i+68>>2]=j;f[i+72>>2]=d;o=i+76|0;f[o>>2]=0;p=i;q=f[c+12>>2]|0;r=h+4|0;l=r+4|0;m=l+40|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[h>>2]=3256;l=h+48|0;f[l>>2]=0;m=h+52|0;f[m>>2]=0;f[h+56>>2]=0;s=q;f[r>>2]=s;t=((f[s+4>>2]|0)-(f[q>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;Xg(h+24|0,t,g);t=f[r>>2]|0;r=(f[t+28>>2]|0)-(f[t+24>>2]|0)>>2;b[g>>0]=0;Xg(h+36|0,r,g);f[h+8>>2]=q;f[h+12>>2]=d;f[h+16>>2]=j;f[h+20>>2]=i;f[o>>2]=c+72;ef(k,h)|0;Yf(n,f[l>>2]|0,f[m>>2]|0);f[a>>2]=p;f[h>>2]=3256;p=f[l>>2]|0;if(p|0){l=f[m>>2]|0;if((l|0)!=(p|0))f[m>>2]=l+(~((l+-4-p|0)>>>2)<<2);br(p)}f[h>>2]=3276;p=f[h+36>>2]|0;if(p|0)br(p);p=f[h+24>>2]|0;if(!p){u=e;return}br(p);u=e;return}function Me(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;c=u;u=u+32|0;d=c;e=a+4|0;g=f[a>>2]|0;h=(f[e>>2]|0)-g>>2;i=h+1|0;if(i>>>0>1073741823)mq(a);j=a+8|0;k=(f[j>>2]|0)-g|0;g=k>>1;l=k>>2>>>0<536870911?(g>>>0>>0?i:g):1073741823;f[d+12>>2]=0;f[d+16>>2]=a+8;do if(l)if(l>>>0>1073741823){g=ra(8)|0;Wo(g,14941);f[g>>2]=6944;va(g|0,1080,114)}else{m=dn(l<<2)|0;break}else m=0;while(0);f[d>>2]=m;g=m+(h<<2)|0;h=d+8|0;i=d+4|0;f[i>>2]=g;k=m+(l<<2)|0;l=d+12|0;f[l>>2]=k;m=f[b>>2]|0;f[b>>2]=0;f[g>>2]=m;m=g+4|0;f[h>>2]=m;b=f[a>>2]|0;n=f[e>>2]|0;if((n|0)==(b|0)){o=g;p=l;q=h;r=b;s=m;t=n;v=k;w=o;f[a>>2]=w;f[i>>2]=r;f[e>>2]=s;f[q>>2]=t;x=f[j>>2]|0;f[j>>2]=v;f[p>>2]=x;f[d>>2]=r;Wh(d);u=c;return}else{y=n;z=g}do{y=y+-4|0;g=f[y>>2]|0;f[y>>2]=0;f[z+-4>>2]=g;z=(f[i>>2]|0)+-4|0;f[i>>2]=z}while((y|0)!=(b|0));o=z;p=l;q=h;r=f[a>>2]|0;s=f[h>>2]|0;t=f[e>>2]|0;v=f[l>>2]|0;w=o;f[a>>2]=w;f[i>>2]=r;f[e>>2]=s;f[q>>2]=t;x=f[j>>2]|0;f[j>>2]=v;f[p>>2]=x;f[d>>2]=r;Wh(d);u=c;return}function Ne(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+32|0;e=d+12|0;g=d;h=hl(c,0)|0;if(!h){f[a>>2]=0;u=d;return}i=f[c+100>>2]|0;j=f[c+96>>2]|0;c=i-j|0;k=(c|0)/12|0;f[e>>2]=0;l=e+4|0;f[l>>2]=0;f[e+8>>2]=0;m=j;do if(c)if(k>>>0>357913941)mq(e);else{n=dn(c)|0;f[e>>2]=n;f[e+8>>2]=n+(k*12|0);hj(n|0,0,c|0)|0;f[l>>2]=n+c;o=n;break}else o=0;while(0);f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;a:do if((i|0)!=(j|0)){c=g+4|0;n=g+8|0;if(b[h+84>>0]|0){p=0;while(1){q=m+(p*12|0)|0;f[g>>2]=f[q>>2];f[g+4>>2]=f[q+4>>2];f[g+8>>2]=f[q+8>>2];f[o+(p*12|0)>>2]=f[g>>2];f[o+(p*12|0)+4>>2]=f[c>>2];f[o+(p*12|0)+8>>2]=f[n>>2];p=p+1|0;if(p>>>0>=k>>>0)break a}}p=f[h+68>>2]|0;q=0;do{r=f[p+(f[m+(q*12|0)>>2]<<2)>>2]|0;f[g>>2]=r;s=f[p+(f[m+(q*12|0)+4>>2]<<2)>>2]|0;f[c>>2]=s;t=f[p+(f[m+(q*12|0)+8>>2]<<2)>>2]|0;f[n>>2]=t;f[o+(q*12|0)>>2]=r;f[o+(q*12|0)+4>>2]=s;f[o+(q*12|0)+8>>2]=t;q=q+1|0}while(q>>>0>>0)}while(0);Cj(a,e);a=f[e>>2]|0;if(a|0){e=f[l>>2]|0;if((e|0)!=(a|0))f[l>>2]=e+(~(((e+-12-a|0)>>>0)/12|0)*12|0);br(a)}u=d;return}function Oe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=u;u=u+16|0;d=c;f[a>>2]=0;f[a+8>>2]=b;rn(a+12|0);to(a+44|0);to(a+64|0);to(a+84|0);e=a+104|0;f[e>>2]=0;g=a+108|0;f[g>>2]=0;f[a+112>>2]=0;h=(b|0)==0;do if(!h)if(b>>>0>1073741823)mq(e);else{i=b<<2;j=dn(i)|0;f[e>>2]=j;k=j+(b<<2)|0;f[a+112>>2]=k;hj(j|0,0,i|0)|0;f[g>>2]=k;break}while(0);g=a+116|0;f[g>>2]=0;e=a+120|0;f[e>>2]=0;f[a+124>>2]=0;if(!h){k=b<<2;i=dn(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+124>>2]=g;hj(i|0,0,k|0)|0;f[e>>2]=g}g=a+128|0;f[g>>2]=0;e=a+132|0;f[e>>2]=0;f[a+136>>2]=0;if(!h){k=b<<2;i=dn(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+136>>2]=g;hj(i|0,0,k|0)|0;f[e>>2]=g}g=b<<5|1;f[d>>2]=0;e=d+4|0;f[e>>2]=0;f[d+8>>2]=0;if(!h){k=b<<2;i=dn(k)|0;f[d>>2]=i;j=i+(b<<2)|0;f[d+8>>2]=j;hj(i|0,0,k|0)|0;f[e>>2]=j}fk(a+140|0,g,d);j=f[d>>2]|0;if(j|0){k=f[e>>2]|0;if((k|0)!=(j|0))f[e>>2]=k+(~((k+-4-j|0)>>>2)<<2);br(j)}f[d>>2]=0;j=d+4|0;f[j>>2]=0;f[d+8>>2]=0;if(!h){h=b<<2;k=dn(h)|0;f[d>>2]=k;e=k+(b<<2)|0;f[d+8>>2]=e;hj(k|0,0,h|0)|0;f[j>>2]=e}fk(a+152|0,g,d);g=f[d>>2]|0;if(!g){u=c;return}d=f[j>>2]|0;if((d|0)!=(g|0))f[j>>2]=d+(~((d+-4-g|0)>>>2)<<2);br(g);u=c;return}function Pe(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=u;u=u+16|0;d=c;f[a>>2]=0;f[a+8>>2]=b;to(a+12|0);to(a+32|0);to(a+52|0);to(a+72|0);e=a+92|0;f[e>>2]=0;g=a+96|0;f[g>>2]=0;f[a+100>>2]=0;h=(b|0)==0;do if(!h)if(b>>>0>1073741823)mq(e);else{i=b<<2;j=dn(i)|0;f[e>>2]=j;k=j+(b<<2)|0;f[a+100>>2]=k;hj(j|0,0,i|0)|0;f[g>>2]=k;break}while(0);g=a+104|0;f[g>>2]=0;e=a+108|0;f[e>>2]=0;f[a+112>>2]=0;if(!h){k=b<<2;i=dn(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+112>>2]=g;hj(i|0,0,k|0)|0;f[e>>2]=g}g=a+116|0;f[g>>2]=0;e=a+120|0;f[e>>2]=0;f[a+124>>2]=0;if(!h){k=b<<2;i=dn(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+124>>2]=g;hj(i|0,0,k|0)|0;f[e>>2]=g}g=b<<5|1;f[d>>2]=0;e=d+4|0;f[e>>2]=0;f[d+8>>2]=0;if(!h){k=b<<2;i=dn(k)|0;f[d>>2]=i;j=i+(b<<2)|0;f[d+8>>2]=j;hj(i|0,0,k|0)|0;f[e>>2]=j}fk(a+128|0,g,d);j=f[d>>2]|0;if(j|0){k=f[e>>2]|0;if((k|0)!=(j|0))f[e>>2]=k+(~((k+-4-j|0)>>>2)<<2);br(j)}f[d>>2]=0;j=d+4|0;f[j>>2]=0;f[d+8>>2]=0;if(!h){h=b<<2;k=dn(h)|0;f[d>>2]=k;e=k+(b<<2)|0;f[d+8>>2]=e;hj(k|0,0,h|0)|0;f[j>>2]=e}fk(a+140|0,g,d);g=f[d>>2]|0;if(!g){u=c;return}d=f[j>>2]|0;if((d|0)!=(g|0))f[j>>2]=d+(~((d+-4-g|0)>>>2)<<2);br(g);u=c;return}function Qe(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;d=dn(40)|0;e=d+16|0;dj(e,c);dj(d+28|0,c+12|0);c=a+4|0;g=f[c>>2]|0;do if(g){h=b[d+27>>0]|0;i=h<<24>>24<0;j=i?f[d+20>>2]|0:h&255;h=i?f[e>>2]|0:e;i=g;while(1){k=i+16|0;l=b[k+11>>0]|0;m=l<<24>>24<0;n=m?f[i+20>>2]|0:l&255;l=n>>>0>>0?n:j;if((l|0)!=0?(o=Pk(h,m?f[k>>2]|0:k,l)|0,(o|0)!=0):0)if((o|0)<0)p=7;else p=9;else if(j>>>0>>0)p=7;else p=9;if((p|0)==7){p=0;n=f[i>>2]|0;if(!n){p=8;break}else q=n}else if((p|0)==9){p=0;r=i+4|0;n=f[r>>2]|0;if(!n){p=11;break}else q=n}i=q}if((p|0)==8){s=i;t=i;break}else if((p|0)==11){s=i;t=r;break}}else{s=c;t=c}while(0);f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=s;f[t>>2]=d;s=f[f[a>>2]>>2]|0;if(!s){u=d;v=a+4|0;w=f[v>>2]|0;Ae(w,u);x=a+8|0;y=f[x>>2]|0;z=y+1|0;f[x>>2]=z;return d|0}f[a>>2]=s;u=f[t>>2]|0;v=a+4|0;w=f[v>>2]|0;Ae(w,u);x=a+8|0;y=f[x>>2]|0;z=y+1|0;f[x>>2]=z;return d|0}function Re(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=Oa,B=Oa;g=u;u=u+16|0;h=g;i=b[d+24>>0]|0;j=i<<24>>24;Bh(a,c,e,j,0,d,1);k=f[a>>2]|0;a=(f[f[k>>2]>>2]|0)+(f[k+48>>2]|0)|0;k=f[c+4>>2]|0;sq(h);yo(h,$(n[c+20>>2]),(1<>>0>1073741823?-1:j<<2)|0;if(!e){$q(k);u=g;return}l=d+68|0;m=d+48|0;o=d+40|0;p=c+8|0;c=(b[d+84>>0]|0)==0;if(i<<24>>24>0){q=0;r=0}else{i=0;do{if(c)s=f[(f[l>>2]|0)+(i<<2)>>2]|0;else s=i;t=m;v=f[t>>2]|0;w=f[t+4>>2]|0;t=o;x=f[t>>2]|0;y=on(x|0,f[t+4>>2]|0,s|0,0)|0;t=Tn(y|0,I|0,v|0,w|0)|0;Rg(k|0,(f[f[d>>2]>>2]|0)+t|0,x|0)|0;i=i+1|0}while((i|0)!=(e|0));$q(k);u=g;return}while(1){if(c)z=f[(f[l>>2]|0)+(r<<2)>>2]|0;else z=r;i=m;s=f[i>>2]|0;x=f[i+4>>2]|0;i=o;t=f[i>>2]|0;w=on(t|0,f[i+4>>2]|0,z|0,0)|0;i=Tn(w|0,I|0,s|0,x|0)|0;Rg(k|0,(f[f[d>>2]>>2]|0)+i|0,t|0)|0;t=f[p>>2]|0;A=$(n[h>>2]);i=0;x=q;while(1){B=$(n[k+(i<<2)>>2]);s=~~$(J($($(A*$(B-$(n[t+(i<<2)>>2])))+$(.5))));f[a+(x<<2)>>2]=s;i=i+1|0;if((i|0)==(j|0))break;else x=x+1|0}r=r+1|0;if((r|0)==(e|0))break;else q=q+j|0}$q(k);u=g;return}function Se(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3340;ii(a+200|0);b=f[a+184>>2]|0;if(b|0){c=a+188|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}_i(a+172|0);b=f[a+152>>2]|0;if(b|0){d=a+156|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+140>>2]|0;if(b|0)br(b);b=f[a+128>>2]|0;if(b|0){c=b;do{b=c;c=f[c>>2]|0;br(b)}while((c|0)!=0)}c=a+120|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)br(b);b=f[a+108>>2]|0;if(b|0){c=a+112|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);br(b)}b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+84>>2]|0;if(b|0)br(b);b=f[a+72>>2]|0;if(b|0){c=a+76|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+40>>2]|0;if(b|0){c=a+44|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+28>>2]|0;if(b|0)br(b);b=f[a+16>>2]|0;if(b|0){d=a+20|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=a+12|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;ui(a);br(a);return}function Te(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a+140|0;c=f[b>>2]|0;if(c|0){d=a+144|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);br(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}br(g)}g=a+128|0;b=f[g>>2]|0;if(b|0){j=a+132|0;h=f[j>>2]|0;if((h|0)==(b|0))l=b;else{c=h;while(1){h=c+-12|0;f[j>>2]=h;d=f[h>>2]|0;if(!d)m=h;else{h=c+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);br(d);m=f[j>>2]|0}if((m|0)==(b|0))break;else c=m}l=f[g>>2]|0}br(l)}l=f[a+116>>2]|0;if(l|0){g=a+120|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);br(l)}l=f[a+104>>2]|0;if(l|0){m=a+108|0;g=f[m>>2]|0;if((g|0)!=(l|0))f[m>>2]=g+(~((g+-4-l|0)>>>2)<<2);br(l)}l=f[a+92>>2]|0;if(!l){n=a+72|0;dl(n);o=a+52|0;dl(o);p=a+32|0;dl(p);q=a+12|0;dl(q);return}g=a+96|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);br(l);n=a+72|0;dl(n);o=a+52|0;dl(o);p=a+32|0;dl(p);q=a+12|0;dl(q);return}function Ue(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a+152|0;c=f[b>>2]|0;if(c|0){d=a+156|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);br(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}br(g)}g=a+140|0;b=f[g>>2]|0;if(b|0){j=a+144|0;h=f[j>>2]|0;if((h|0)==(b|0))l=b;else{c=h;while(1){h=c+-12|0;f[j>>2]=h;d=f[h>>2]|0;if(!d)m=h;else{h=c+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);br(d);m=f[j>>2]|0}if((m|0)==(b|0))break;else c=m}l=f[g>>2]|0}br(l)}l=f[a+128>>2]|0;if(l|0){g=a+132|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);br(l)}l=f[a+116>>2]|0;if(l|0){m=a+120|0;g=f[m>>2]|0;if((g|0)!=(l|0))f[m>>2]=g+(~((g+-4-l|0)>>>2)<<2);br(l)}l=f[a+104>>2]|0;if(!l){n=a+84|0;dl(n);o=a+64|0;dl(o);p=a+44|0;dl(p);q=a+12|0;tj(q);return}g=a+108|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);br(l);n=a+84|0;dl(n);o=a+64|0;dl(o);p=a+44|0;dl(p);q=a+12|0;tj(q);return}function Ve(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3080;jj(a+200|0);b=f[a+184>>2]|0;if(b|0){c=a+188|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}_i(a+172|0);b=f[a+152>>2]|0;if(b|0){d=a+156|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+140>>2]|0;if(b|0)br(b);b=f[a+128>>2]|0;if(b|0){c=b;do{b=c;c=f[c>>2]|0;br(b)}while((c|0)!=0)}c=a+120|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)br(b);b=f[a+108>>2]|0;if(b|0){c=a+112|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);br(b)}b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+84>>2]|0;if(b|0)br(b);b=f[a+72>>2]|0;if(b|0){c=a+76|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+40>>2]|0;if(b|0){c=a+44|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+28>>2]|0;if(b|0)br(b);b=f[a+16>>2]|0;if(b|0){d=a+20|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=a+12|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;ui(a);br(a);return}function We(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+48|0;d=c+44|0;e=c+40|0;g=c+36|0;h=c+32|0;i=c;f[h>>2]=f[a+60>>2];j=b+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)){f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,h,h+4|0)|0}rn(i);lk(i);if((f[h>>2]|0)>0){k=a+56|0;l=1;m=0;do{n=l;l=(f[(f[k>>2]|0)+(m>>>5<<2)>>2]&1<<(m&31)|0)!=0;Vi(i,n^l^1);m=m+1|0}while((m|0)<(f[h>>2]|0))}fd(i,b);f[g>>2]=f[a+12>>2];h=j;m=f[h>>2]|0;l=f[h+4>>2]|0;if((l|0)>0|(l|0)==0&m>>>0>0){o=l;p=m}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;m=j;o=f[m+4>>2]|0;p=f[m>>2]|0}f[g>>2]=f[a+20>>2];if((o|0)>0|(o|0)==0&p>>>0>0){tj(i);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;tj(i);u=c;return 1}function Xe(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=f[c>>2]|0;c=f[d>>2]|0;e=f[a+4>>2]|0;g=f[d+4>>2]|0;h=e+-1|0;i=(h&e|0)==0;if(!i)if(g>>>0>>0)j=g;else j=(g>>>0)%(e>>>0)|0;else j=h&g;g=(f[a>>2]|0)+(j<<2)|0;k=f[g>>2]|0;while(1){l=f[k>>2]|0;if((l|0)==(d|0))break;else k=l}if((k|0)!=(a+8|0)){l=f[k+4>>2]|0;if(!i)if(l>>>0>>0)m=l;else m=(l>>>0)%(e>>>0)|0;else m=l&h;if((m|0)==(j|0)){n=c;o=21}else o=13}else o=13;do if((o|0)==13){if(c|0){m=f[c+4>>2]|0;if(!i)if(m>>>0>>0)p=m;else p=(m>>>0)%(e>>>0)|0;else p=m&h;if((p|0)==(j|0)){q=c;r=c;o=22;break}}f[g>>2]=0;n=f[d>>2]|0;o=21}while(0);if((o|0)==21){g=n;if(!n)s=g;else{q=n;r=g;o=22}}if((o|0)==22){o=f[q+4>>2]|0;if(!i)if(o>>>0>>0)t=o;else t=(o>>>0)%(e>>>0)|0;else t=o&h;if((t|0)==(j|0))s=r;else{f[(f[a>>2]|0)+(t<<2)>>2]=k;s=f[d>>2]|0}}f[k>>2]=s;f[d>>2]=0;s=a+12|0;f[s>>2]=(f[s>>2]|0)+-1;if(!d)return c|0;s=d+8|0;a=f[d+20>>2]|0;if(a|0){k=d+24|0;if((f[k>>2]|0)!=(a|0))f[k>>2]=a;br(a)}if((b[s+11>>0]|0)<0)br(f[s>>2]|0);br(d);return c|0}function Ye(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;b=u;u=u+16|0;c=b+4|0;d=b;f[c>>2]=0;e=c+4|0;f[e>>2]=0;f[c+8>>2]=0;g=a+56|0;h=f[g>>2]|0;i=(f[h+100>>2]|0)-(f[h+96>>2]|0)|0;j=(i|0)/12|0;if(!i){k=0;l=0}else{i=c+8|0;m=0;n=0;o=h;h=0;p=0;while(1){q=f[o+96>>2]|0;r=f[q+(n*12|0)>>2]|0;s=r-m|0;t=((s|0)>-1?s:0-s|0)<<1|s>>>31;f[d>>2]=t;if((h|0)==(p|0)){Ci(c,d);v=f[e>>2]|0;w=f[i>>2]|0}else{f[h>>2]=t;t=h+4|0;f[e>>2]=t;v=t;w=p}t=f[q+(n*12|0)+4>>2]|0;s=t-r|0;r=((s|0)>-1?s:0-s|0)<<1|s>>>31;f[d>>2]=r;if((v|0)==(w|0)){Ci(c,d);x=f[e>>2]|0;y=f[i>>2]|0}else{f[v>>2]=r;r=v+4|0;f[e>>2]=r;x=r;y=w}r=f[q+(n*12|0)+8>>2]|0;q=r-t|0;t=((q|0)>-1?q:0-q|0)<<1|q>>>31;f[d>>2]=t;if((x|0)==(y|0))Ci(c,d);else{f[x>>2]=t;f[e>>2]=x+4}t=n+1|0;if(t>>>0>=j>>>0)break;m=r;n=t;o=f[g>>2]|0;h=f[e>>2]|0;p=f[i>>2]|0}k=f[c>>2]|0;l=f[e>>2]|0}Dc(k,l-k>>2,1,0,f[a+44>>2]|0)|0;a=f[c>>2]|0;if(!a){u=b;return 1}c=f[e>>2]|0;if((c|0)!=(a|0))f[e>>2]=c+(~((c+-4-a|0)>>>2)<<2);br(a);u=b;return 1}function Ze(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=f[a+12>>2]|0;e=a+108|0;g=f[e>>2]|0;h=f[g+80>>2]|0;b[c+84>>0]=0;i=c+68|0;j=c+72|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0)if(h>>>0>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{kh(i,h-m|0,3220);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+112|0;a=c+68|0;c=f[o+96>>2]|0;o=0;while(1){h=o*3|0;if((h|0)==-1){q=0;r=12;break}i=f[d>>2]|0;g=f[i+(h<<2)>>2]|0;if((g|0)==-1){q=0;r=12;break}k=f[(f[m>>2]|0)+12>>2]|0;l=f[k+(g<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}g=f[a>>2]|0;f[g+(f[c+(o*12|0)>>2]<<2)>>2]=l;l=h+1|0;if((l|0)==-1){q=0;r=12;break}j=f[i+(l<<2)>>2]|0;if((j|0)==-1){q=0;r=12;break}l=f[k+(j<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+4>>2]<<2)>>2]=l;l=h+2|0;if((l|0)==-1){q=0;r=12;break}h=f[i+(l<<2)>>2]|0;if((h|0)==-1){q=0;r=12;break}l=f[k+(h<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+8>>2]<<2)>>2]=l;o=o+1|0;if(o>>>0>=e>>>0){q=1;r=12;break}}if((r|0)==12)return q|0;return 0}function _e(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+48|0;d=c+44|0;e=c+40|0;g=c+36|0;h=c+32|0;i=c;f[h>>2]=f[a+80>>2];j=b+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)){f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,h,h+4|0)|0}rn(i);lk(i);if((f[h>>2]|0)>0){k=a+76|0;l=1;m=0;do{n=l;l=(f[(f[k>>2]|0)+(m>>>5<<2)>>2]&1<<(m&31)|0)!=0;Vi(i,n^l^1);m=m+1|0}while((m|0)<(f[h>>2]|0))}fd(i,b);f[g>>2]=f[a+12>>2];h=j;m=f[h>>2]|0;l=f[h+4>>2]|0;if((l|0)>0|(l|0)==0&m>>>0>0){o=l;p=m}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;m=j;o=f[m+4>>2]|0;p=f[m>>2]|0}f[g>>2]=f[a+16>>2];if((o|0)>0|(o|0)==0&p>>>0>0){tj(i);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;tj(i);u=c;return 1}function $e(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=a+12|0;h=f[g>>2]|0;$j(f[a+4>>2]|0,(f[h+28>>2]|0)-(f[h+24>>2]|0)>>2);h=a+96|0;i=f[g>>2]|0;j=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;f[c>>2]=0;i=a+100|0;k=f[i>>2]|0;l=f[h>>2]|0;m=k-l>>2;n=l;l=k;if(j>>>0<=m>>>0){if(j>>>0>>0?(k=n+(j<<2)|0,(k|0)!=(l|0)):0)f[i>>2]=l+(~((l+-4-k|0)>>>2)<<2)}else kh(h,j-m|0,c);m=a+116|0;a=f[m>>2]|0;if(!a){j=f[g>>2]|0;g=(f[j+4>>2]|0)-(f[j>>2]|0)>>2;j=(g>>>0)/3|0;if(g>>>0<=2){o=1;u=b;return o|0}g=0;while(1){f[d>>2]=g*3;f[c>>2]=f[d>>2];g=g+1|0;if(!(vb(e,c)|0)){o=0;p=15;break}if((g|0)>=(j|0)){o=1;p=15;break}}if((p|0)==15){u=b;return o|0}}else{j=f[a>>2]|0;if((f[a+4>>2]|0)==(j|0)){o=1;u=b;return o|0}a=0;g=j;while(1){f[d>>2]=f[g+(a<<2)>>2];f[c>>2]=f[d>>2];a=a+1|0;if(!(vb(e,c)|0)){o=0;p=15;break}j=f[m>>2]|0;g=f[j>>2]|0;if(a>>>0>=(f[j+4>>2]|0)-g>>2>>>0){o=1;p=15;break}}if((p|0)==15){u=b;return o|0}}return 0}function af(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=f[a+12>>2]|0;e=a+68|0;g=f[e>>2]|0;h=f[g+80>>2]|0;b[c+84>>0]=0;i=c+68|0;j=c+72|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0)if(h>>>0>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{kh(i,h-m|0,3220);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+72|0;a=c+68|0;c=f[o+96>>2]|0;o=0;while(1){h=o*3|0;if((h|0)==-1){q=0;r=12;break}i=f[d>>2]|0;g=f[i+(h<<2)>>2]|0;if((g|0)==-1){q=0;r=12;break}k=f[(f[m>>2]|0)+12>>2]|0;l=f[k+(g<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}g=f[a>>2]|0;f[g+(f[c+(o*12|0)>>2]<<2)>>2]=l;l=h+1|0;if((l|0)==-1){q=0;r=12;break}j=f[i+(l<<2)>>2]|0;if((j|0)==-1){q=0;r=12;break}l=f[k+(j<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+4>>2]<<2)>>2]=l;l=h+2|0;if((l|0)==-1){q=0;r=12;break}h=f[i+(l<<2)>>2]|0;if((h|0)==-1){q=0;r=12;break}l=f[k+(h<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=12;break}f[g+(f[c+(o*12|0)+8>>2]<<2)>>2]=l;o=o+1|0;if(o>>>0>=e>>>0){q=1;r=12;break}}if((r|0)==12)return q|0;return 0}function bf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=u;u=u+16|0;d=c+12|0;e=c+8|0;g=c+4|0;h=c;if(!b){i=dn(76)|0;j=dn(12)|0;k=f[(f[a+4>>2]|0)+80>>2]|0;f[j+4>>2]=0;f[j>>2]=3584;f[j+8>>2]=k;f[h>>2]=j;ml(i,h,0);j=i;f[g>>2]=j;i=a+12|0;k=f[i>>2]|0;if(k>>>0<(f[a+16>>2]|0)>>>0){f[g>>2]=0;f[k>>2]=j;f[i>>2]=k+4;l=g}else{yg(a+8|0,g);l=g}g=f[l>>2]|0;f[l>>2]=0;if(g|0)Va[f[(f[g>>2]|0)+4>>2]&127](g);g=f[h>>2]|0;f[h>>2]=0;if(!g){u=c;return 1}Va[f[(f[g>>2]|0)+4>>2]&127](g);u=c;return 1}g=f[f[a+8>>2]>>2]|0;f[d>>2]=b;a=g+4|0;h=g+8|0;l=f[h>>2]|0;if((l|0)==(f[g+12>>2]|0))Ci(a,d);else{f[l>>2]=b;f[h>>2]=l+4}l=f[d>>2]|0;b=g+16|0;k=g+20|0;g=f[k>>2]|0;i=f[b>>2]|0;j=g-i>>2;m=i;if((l|0)<(j|0)){n=m;o=l}else{i=l+1|0;f[e>>2]=-1;p=g;if(i>>>0<=j>>>0)if(i>>>0>>0?(g=m+(i<<2)|0,(g|0)!=(p|0)):0){f[k>>2]=p+(~((p+-4-g|0)>>>2)<<2);q=l;r=m}else{q=l;r=m}else{kh(b,i-j|0,e);q=f[d>>2]|0;r=f[b>>2]|0}n=r;o=q}f[n+(o<<2)>>2]=((f[h>>2]|0)-(f[a>>2]|0)>>2)+-1;u=c;return 1}function cf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=a+8|0;e=f[d>>2]|0;g=f[a>>2]|0;h=g;do if(e-g>>3>>>0>=b>>>0){i=a+4|0;j=f[i>>2]|0;k=j-g>>3;l=k>>>0>>0;m=l?k:b;n=j;if(m|0){j=m;m=h;while(1){o=c;p=f[o+4>>2]|0;q=m;f[q>>2]=f[o>>2];f[q+4>>2]=p;j=j+-1|0;if(!j)break;else m=m+8|0}}if(!l){m=h+(b<<3)|0;if((m|0)==(n|0))return;else{r=i;s=n+(~((n+-8-m|0)>>>3)<<3)|0;break}}else{m=b-k|0;j=m;p=n;while(1){q=c;o=f[q+4>>2]|0;t=p;f[t>>2]=f[q>>2];f[t+4>>2]=o;j=j+-1|0;if(!j)break;else p=p+8|0}r=i;s=n+(m<<3)|0;break}}else{p=g;if(!g)u=e;else{j=a+4|0;k=f[j>>2]|0;if((k|0)!=(h|0))f[j>>2]=k+(~((k+-8-g|0)>>>3)<<3);br(p);f[d>>2]=0;f[j>>2]=0;f[a>>2]=0;u=0}if(b>>>0>536870911)mq(a);j=u>>2;p=u>>3>>>0<268435455?(j>>>0>>0?b:j):536870911;if(p>>>0>536870911)mq(a);j=dn(p<<3)|0;k=a+4|0;f[k>>2]=j;f[a>>2]=j;f[d>>2]=j+(p<<3);p=b;l=j;while(1){o=c;t=f[o+4>>2]|0;q=l;f[q>>2]=f[o>>2];f[q+4>>2]=t;p=p+-1|0;if(!p)break;else l=l+8|0}r=k;s=j+(b<<3)|0}while(0);f[r>>2]=s;return}function df(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;e=+$(n[b>>2]);g=+K(+e);h=+$(n[b+4>>2]);i=g+ +K(+h);g=+$(n[b+8>>2]);j=i+ +K(+g);b=j>1.0e-06;i=1.0/j;k=f[a+12>>2]|0;j=+(k|0);l=~~+J(+((b?i*e:1.0)*j+.5));m=~~+J(+((b?i*h:0.0)*j+.5));o=(l|0)>-1;p=k-(o?l:0-l|0)-((m|0)>-1?m:0-m|0)|0;l=(p|0)<0;q=(l?((m|0)>0?p:0-p|0):0)+m|0;m=l?0:p;p=(b?i*g:0.0)<0.0?0-m|0:m;do if(!o){if((q|0)<0)r=(p|0)>-1?p:0-p|0;else r=(f[a+8>>2]|0)-((p|0)>-1?p:0-p|0)|0;if((p|0)<0){s=(q|0)>-1?q:0-q|0;t=r;break}else{s=(f[a+8>>2]|0)-((q|0)>-1?q:0-q|0)|0;t=r;break}}else{s=k+p|0;t=k+q|0}while(0);q=(t|0)==0;p=(s|0)==0;r=f[a+8>>2]|0;if(!(s|t)){u=r;v=r;f[c>>2]=u;f[d>>2]=v;return}a=(r|0)==(s|0);if(q&a){u=s;v=s;f[c>>2]=u;f[d>>2]=v;return}o=(r|0)==(t|0);if(p&o){u=t;v=t;f[c>>2]=u;f[d>>2]=v;return}if(q&(k|0)<(s|0)){u=0;v=(k<<1)-s|0;f[c>>2]=u;f[d>>2]=v;return}if(o&(k|0)>(s|0)){u=t;v=(k<<1)-s|0;f[c>>2]=u;f[d>>2]=v;return}if(a&(k|0)>(t|0)){u=(k<<1)-t|0;v=s;f[c>>2]=u;f[d>>2]=v;return}if(!p){u=t;v=s;f[c>>2]=u;f[d>>2]=v;return}u=(k|0)<(t|0)?(k<<1)-t|0:t;v=0;f[c>>2]=u;f[d>>2]=v;return}function ef(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=a+4|0;d=b+4|0;f[c>>2]=f[d>>2];f[c+4>>2]=f[d+4>>2];f[c+8>>2]=f[d+8>>2];f[c+12>>2]=f[d+12>>2];f[c+16>>2]=f[d+16>>2];d=a+24|0;c=b+24|0;if((a|0)==(b|0))return a|0;e=b+28|0;g=f[e>>2]|0;if(!g)h=0;else{i=a+32|0;do if(g>>>0>f[i>>2]<<5>>>0){j=f[d>>2]|0;if(!j)k=g;else{br(j);f[d>>2]=0;f[i>>2]=0;f[a+28>>2]=0;k=f[e>>2]|0}if((k|0)<0)mq(d);else{j=((k+-1|0)>>>5)+1|0;l=dn(j<<2)|0;f[d>>2]=l;f[a+28>>2]=0;f[i>>2]=j;m=f[e>>2]|0;n=l;break}}else{m=g;n=f[d>>2]|0}while(0);Xl(n|0,f[c>>2]|0,((m+-1|0)>>>5<<2)+4|0)|0;h=f[e>>2]|0}f[a+28>>2]=h;h=a+36|0;e=b+36|0;m=b+40|0;b=f[m>>2]|0;if(!b)o=0;else{c=a+44|0;do if(b>>>0>f[c>>2]<<5>>>0){n=f[h>>2]|0;if(!n)p=b;else{br(n);f[h>>2]=0;f[c>>2]=0;f[a+40>>2]=0;p=f[m>>2]|0}if((p|0)<0)mq(h);else{n=((p+-1|0)>>>5)+1|0;d=dn(n<<2)|0;f[h>>2]=d;f[a+40>>2]=0;f[c>>2]=n;q=f[m>>2]|0;r=d;break}}else{q=b;r=f[h>>2]|0}while(0);Xl(r|0,f[e>>2]|0,((q+-1|0)>>>5<<2)+4|0)|0;o=f[m>>2]|0}f[a+40>>2]=o;return a|0}function ff(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+32|0;h=g+12|0;i=g;f[a>>2]=f[d>>2];d=a+4|0;f[d>>2]=(f[c>>2]|0)-(f[b>>2]|0);j=e+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)?(k=e+4|0,f[i>>2]=f[k>>2],f[h>>2]=f[i>>2],ye(e,h,a,a+4|0)|0,l=j,j=f[l+4>>2]|0,!((j|0)>0|(j|0)==0&(f[l>>2]|0)>>>0>0)):0){f[i>>2]=f[k>>2];f[h>>2]=f[i>>2];ye(e,h,d,d+4|0)|0;m=i}else m=i;if(!(f[d>>2]|0)){u=g;return 1}d=a+12|0;og(d);m=a+1068|0;Cm(m);k=a+1088|0;Cm(k);l=a+1108|0;Cm(l);f[i>>2]=f[b>>2];f[i+4>>2]=f[b+4>>2];f[i+8>>2]=f[b+8>>2];f[h>>2]=f[c>>2];f[h+4>>2]=f[c+4>>2];f[h+8>>2]=f[c+8>>2];jb(a,i,h);Ke(d,e);mg(m,e);mg(k,e);mg(l,e);u=g;return 1}function gf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+32|0;h=g+12|0;i=g;f[a>>2]=f[d>>2];d=a+4|0;f[d>>2]=(f[c>>2]|0)-(f[b>>2]|0);j=e+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)?(k=e+4|0,f[i>>2]=f[k>>2],f[h>>2]=f[i>>2],ye(e,h,a,a+4|0)|0,l=j,j=f[l+4>>2]|0,!((j|0)>0|(j|0)==0&(f[l>>2]|0)>>>0>0)):0){f[i>>2]=f[k>>2];f[h>>2]=f[i>>2];ye(e,h,d,d+4|0)|0;m=i}else m=i;if(!(f[d>>2]|0)){u=g;return 1}d=a+12|0;og(d);m=a+1068|0;Cm(m);k=a+1088|0;Cm(k);l=a+1108|0;Cm(l);f[i>>2]=f[b>>2];f[i+4>>2]=f[b+4>>2];f[i+8>>2]=f[b+8>>2];f[h>>2]=f[c>>2];f[h+4>>2]=f[c+4>>2];f[h+8>>2]=f[c+8>>2];mb(a,i,h);Ke(d,e);mg(m,e);mg(k,e);mg(l,e);u=g;return 1}function hf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;c=u;u=u+32|0;d=c;e=a+8|0;g=f[e>>2]|0;h=a+4|0;i=f[h>>2]|0;j=i;if(g-i>>2>>>0>=b>>>0){hj(i|0,0,b<<2|0)|0;f[h>>2]=i+(b<<2);u=c;return}k=f[a>>2]|0;l=i-k>>2;m=l+b|0;n=k;if(m>>>0>1073741823)mq(a);o=g-k|0;p=o>>1;q=o>>2>>>0<536870911?(p>>>0>>0?m:p):1073741823;f[d+12>>2]=0;f[d+16>>2]=a+8;do if(q)if(q>>>0>1073741823){p=ra(8)|0;Wo(p,14941);f[p>>2]=6944;va(p|0,1080,114)}else{r=dn(q<<2)|0;break}else r=0;while(0);f[d>>2]=r;p=r+(l<<2)|0;l=d+8|0;m=d+4|0;f[m>>2]=p;o=r+(q<<2)|0;q=d+12|0;f[q>>2]=o;r=p+(b<<2)|0;hj(p|0,0,b<<2|0)|0;f[l>>2]=r;if((j|0)==(n|0)){s=p;t=q;v=l;w=k;x=r;y=i;z=o;A=g}else{g=j;j=p;do{g=g+-4|0;p=f[g>>2]|0;f[g>>2]=0;f[j+-4>>2]=p;j=(f[m>>2]|0)+-4|0;f[m>>2]=j}while((g|0)!=(n|0));s=j;t=q;v=l;w=f[a>>2]|0;x=f[l>>2]|0;y=f[h>>2]|0;z=f[q>>2]|0;A=f[e>>2]|0}f[a>>2]=s;f[m>>2]=w;f[h>>2]=x;f[v>>2]=y;f[e>>2]=z;f[t>>2]=A;f[d>>2]=w;Wh(d);u=c;return}function jf(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=u;u=u+16|0;h=d;i=f[a+124>>2]|0;if(!i){u=d;return}j=i+-1|0;k=(j&i|0)==0;if(!k)if(i>>>0>g>>>0)l=g;else l=(g>>>0)%(i>>>0)|0;else l=j&g;m=f[(f[a+120>>2]|0)+(l<<2)>>2]|0;if(!m){u=d;return}n=f[m>>2]|0;if(!n){u=d;return}a:do if(k){m=n;while(1){o=f[m+4>>2]|0;p=(o|0)==(g|0);if(!(p|(o&j|0)==(l|0))){q=24;break}if(p?(f[m+8>>2]|0)==(g|0):0){r=m;break a}m=f[m>>2]|0;if(!m){q=24;break}}if((q|0)==24){u=d;return}}else{m=n;while(1){p=f[m+4>>2]|0;if((p|0)==(g|0)){if((f[m+8>>2]|0)==(g|0)){r=m;break a}}else{if(p>>>0>>0)s=p;else s=(p>>>0)%(i>>>0)|0;if((s|0)!=(l|0)){q=24;break}}m=f[m>>2]|0;if(!m){q=24;break}}if((q|0)==24){u=d;return}}while(0);q=f[r+12>>2]|0;if((q|0)==-1){u=d;return}f[h>>2]=q;f[h+4>>2]=c;b[h+8>>0]=e&1;e=a+112|0;c=f[e>>2]|0;if((c|0)==(f[a+116>>2]|0))ki(a+108|0,h);else{f[c>>2]=f[h>>2];f[c+4>>2]=f[h+4>>2];f[c+8>>2]=f[h+8>>2];f[e>>2]=(f[e>>2]|0)+12}u=d;return}function kf(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=d[b>>1]|0;e=d[b+2>>1]|0;g=d[b+4>>1]|0;h=d[b+6>>1]|0;b=((((c^318)&65535)+239^e&65535)+239^g&65535)+239^h&65535;i=f[a+4>>2]|0;if(!i){j=0;return j|0}k=i+-1|0;l=(k&i|0)==0;if(!l)if(b>>>0>>0)m=b;else m=(b>>>0)%(i>>>0)|0;else m=b&k;n=f[(f[a>>2]|0)+(m<<2)>>2]|0;if(!n){j=0;return j|0}a=f[n>>2]|0;if(!a){j=0;return j|0}if(l){l=a;while(1){n=f[l+4>>2]|0;o=(n|0)==(b|0);if(!(o|(n&k|0)==(m|0))){j=0;p=25;break}if((((o?(o=l+8|0,(d[o>>1]|0)==c<<16>>16):0)?(d[o+2>>1]|0)==e<<16>>16:0)?(d[l+12>>1]|0)==g<<16>>16:0)?(d[o+6>>1]|0)==h<<16>>16:0){j=l;p=25;break}l=f[l>>2]|0;if(!l){j=0;p=25;break}}if((p|0)==25)return j|0}else q=a;while(1){a=f[q+4>>2]|0;if((a|0)==(b|0)){l=q+8|0;if((((d[l>>1]|0)==c<<16>>16?(d[l+2>>1]|0)==e<<16>>16:0)?(d[q+12>>1]|0)==g<<16>>16:0)?(d[l+6>>1]|0)==h<<16>>16:0){j=q;p=25;break}}else{if(a>>>0>>0)r=a;else r=(a>>>0)%(i>>>0)|0;if((r|0)!=(m|0)){j=0;p=25;break}}q=f[q>>2]|0;if(!q){j=0;p=25;break}}if((p|0)==25)return j|0;return 0}function lf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+32|0;h=g+12|0;i=g;f[a>>2]=f[d>>2];d=a+4|0;f[d>>2]=(f[c>>2]|0)-(f[b>>2]|0);j=e+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)?(k=e+4|0,f[i>>2]=f[k>>2],f[h>>2]=f[i>>2],ye(e,h,a,a+4|0)|0,l=j,j=f[l+4>>2]|0,!((j|0)>0|(j|0)==0&(f[l>>2]|0)>>>0>0)):0){f[i>>2]=f[k>>2];f[h>>2]=f[i>>2];ye(e,h,d,d+4|0)|0;m=i}else m=i;if(!(f[d>>2]|0)){u=g;return 1}d=a+12|0;Cm(d);m=a+32|0;Cm(m);k=a+52|0;Cm(k);l=a+72|0;Cm(l);f[i>>2]=f[b>>2];f[i+4>>2]=f[b+4>>2];f[i+8>>2]=f[b+8>>2];f[h>>2]=f[c>>2];f[h+4>>2]=f[c+4>>2];f[h+8>>2]=f[c+8>>2];hb(a,i,h);mg(d,e);mg(m,e);mg(k,e);mg(l,e);u=g;return 1}function mf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+32|0;h=g+12|0;i=g;f[a>>2]=f[d>>2];d=a+4|0;f[d>>2]=(f[c>>2]|0)-(f[b>>2]|0);j=e+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)?(k=e+4|0,f[i>>2]=f[k>>2],f[h>>2]=f[i>>2],ye(e,h,a,a+4|0)|0,l=j,j=f[l+4>>2]|0,!((j|0)>0|(j|0)==0&(f[l>>2]|0)>>>0>0)):0){f[i>>2]=f[k>>2];f[h>>2]=f[i>>2];ye(e,h,d,d+4|0)|0;m=i}else m=i;if(!(f[d>>2]|0)){u=g;return 1}d=a+12|0;lk(d);m=a+44|0;Cm(m);k=a+64|0;Cm(k);l=a+84|0;Cm(l);f[i>>2]=f[b>>2];f[i+4>>2]=f[b+4>>2];f[i+8>>2]=f[b+8>>2];f[h>>2]=f[c>>2];f[h+4>>2]=f[c+4>>2];f[h+8>>2]=f[c+8>>2];nb(a,i,h);fd(d,e);mg(m,e);mg(k,e);mg(l,e);u=g;return 1}function nf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;a=u;u=u+16|0;e=a+4|0;g=a;h=a+8|0;i=d+11|0;j=b[i>>0]|0;k=j<<24>>24<0;if(k){l=f[d+4>>2]|0;if(l>>>0>255){m=0;u=a;return m|0}else n=l}else n=j&255;if(!n){b[h>>0]=0;n=c+16|0;l=f[n+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[n>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];ye(c,e,h,h+1|0)|0}m=1;u=a;return m|0}n=d+4|0;l=f[n>>2]|0;b[h>>0]=k?l:j&255;k=c+16|0;o=k;p=f[o>>2]|0;q=f[o+4>>2]|0;if((q|0)>0|(q|0)==0&p>>>0>0){r=j;s=q;t=p;v=l}else{f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];ye(c,e,h,h+1|0)|0;h=k;r=b[i>>0]|0;s=f[h+4>>2]|0;t=f[h>>2]|0;v=f[n>>2]|0}n=r<<24>>24<0;h=n?f[d>>2]|0:d;if(!((s|0)>0|(s|0)==0&t>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];ye(c,e,h,h+(n?v:r&255)|0)|0}m=1;u=a;return m|0}function of(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=a+4|0;d=f[a>>2]|0;e=((f[c>>2]|0)-d|0)/24|0;g=e+1|0;if(g>>>0>178956970)mq(a);h=a+8|0;i=((f[h>>2]|0)-d|0)/24|0;d=i<<1;j=i>>>0<89478485?(d>>>0>>0?g:d):178956970;do if(j)if(j>>>0>178956970){d=ra(8)|0;Wo(d,14941);f[d>>2]=6944;va(d|0,1080,114)}else{k=dn(j*24|0)|0;break}else k=0;while(0);d=k+(e*24|0)|0;g=d;i=k+(j*24|0)|0;f[d>>2]=1180;f[k+(e*24|0)+4>>2]=f[b+4>>2];_j(k+(e*24|0)+8|0,b+8|0);f[k+(e*24|0)+20>>2]=f[b+20>>2];b=d+24|0;e=f[a>>2]|0;k=f[c>>2]|0;if((k|0)==(e|0)){l=g;m=e;n=e}else{j=k;k=g;g=d;do{f[g+-24>>2]=1180;f[g+-20>>2]=f[j+-20>>2];d=g+-16|0;o=j+-16|0;f[d>>2]=0;p=g+-12|0;f[p>>2]=0;f[g+-8>>2]=0;f[d>>2]=f[o>>2];d=j+-12|0;f[p>>2]=f[d>>2];p=j+-8|0;f[g+-8>>2]=f[p>>2];f[p>>2]=0;f[d>>2]=0;f[o>>2]=0;f[g+-4>>2]=f[j+-4>>2];j=j+-24|0;g=k+-24|0;k=g}while((j|0)!=(e|0));l=k;m=f[a>>2]|0;n=f[c>>2]|0}f[a>>2]=l;f[c>>2]=b;f[h>>2]=i;i=m;if((n|0)!=(i|0)){h=n;do{h=h+-24|0;Va[f[f[h>>2]>>2]&127](h)}while((h|0)!=(i|0))}if(!m)return;br(m);return}function pf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=b[c>>0]|0;e=b[c+1>>0]|0;g=b[c+2>>0]|0;h=b[c+3>>0]|0;c=(((d&255^318)+239^e&255)+239^g&255)+239^h&255;i=f[a+4>>2]|0;if(!i){j=0;return j|0}k=i+-1|0;l=(k&i|0)==0;if(!l)if(c>>>0>>0)m=c;else m=(c>>>0)%(i>>>0)|0;else m=c&k;n=f[(f[a>>2]|0)+(m<<2)>>2]|0;if(!n){j=0;return j|0}a=f[n>>2]|0;if(!a){j=0;return j|0}if(l){l=a;while(1){n=f[l+4>>2]|0;o=(n|0)==(c|0);if(!(o|(n&k|0)==(m|0))){j=0;p=25;break}if((((o?(o=l+8|0,(b[o>>0]|0)==d<<24>>24):0)?(b[o+1>>0]|0)==e<<24>>24:0)?(b[o+2>>0]|0)==g<<24>>24:0)?(b[o+3>>0]|0)==h<<24>>24:0){j=l;p=25;break}l=f[l>>2]|0;if(!l){j=0;p=25;break}}if((p|0)==25)return j|0}else q=a;while(1){a=f[q+4>>2]|0;if((a|0)==(c|0)){l=q+8|0;if((((b[l>>0]|0)==d<<24>>24?(b[l+1>>0]|0)==e<<24>>24:0)?(b[l+2>>0]|0)==g<<24>>24:0)?(b[l+3>>0]|0)==h<<24>>24:0){j=q;p=25;break}}else{if(a>>>0>>0)r=a;else r=(a>>>0)%(i>>>0)|0;if((r|0)!=(m|0)){j=0;p=25;break}}q=f[q>>2]|0;if(!q){j=0;p=25;break}}if((p|0)==25)return j|0;return 0}function qf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;d=u;u=u+32|0;h=d+24|0;i=d+16|0;j=d;k=d+8|0;l=a+40|0;f[a+44>>2]=g;g=a+36|0;m=f[g>>2]|0;n=f[m+4>>2]|0;o=f[m>>2]|0;p=n-o|0;if((p|0)<=0){u=d;return 1}q=(p>>>2)+-1|0;p=a+8|0;r=a+48|0;s=a+52|0;a=i+4|0;t=j+4|0;v=h+4|0;if(n-o>>2>>>0>q>>>0){w=q;x=o}else{y=m;mq(y)}while(1){f[k>>2]=f[x+(w<<2)>>2];f[h>>2]=f[k>>2];tb(l,h,b,w)|0;m=X(w,e)|0;o=b+(m<<2)|0;q=c+(m<<2)|0;m=f[o+4>>2]|0;n=f[r>>2]|0;z=f[s>>2]|0;f[i>>2]=f[o>>2];f[a>>2]=m;f[j>>2]=n;f[t>>2]=z;Dd(h,p,i,j);f[q>>2]=f[h>>2];f[q+4>>2]=f[v>>2];w=w+-1|0;if((w|0)<=-1){A=3;break}q=f[g>>2]|0;x=f[q>>2]|0;if((f[q+4>>2]|0)-x>>2>>>0<=w>>>0){y=q;A=4;break}}if((A|0)==3){u=d;return 1}else if((A|0)==4)mq(y);return 0}function rf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=u;u=u+32|0;i=h;j=h+16|0;k=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;do if((c+-1|0)>>>0<6&(Qa[f[(f[b>>2]|0)+8>>2]&127](b)|0)==1){l=Qa[f[(f[b>>2]|0)+52>>2]&127](b)|0;m=Ra[f[(f[b>>2]|0)+60>>2]&127](b,d)|0;if((l|0)==0|(m|0)==0){f[a>>2]=0;u=h;return}n=Ra[f[(f[b>>2]|0)+56>>2]&127](b,d)|0;if(!n){f[i>>2]=f[b+56>>2];f[i+4>>2]=l;f[i+12>>2]=m;f[i+8>>2]=m+12;Rd(a,j,c,k,e,i,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}else{f[i>>2]=f[b+56>>2];f[i+4>>2]=n;f[i+12>>2]=m;f[i+8>>2]=m+12;Pd(a,j,c,k,e,i,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}}while(0);f[a>>2]=0;u=h;return}function sf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;d=u;u=u+32|0;h=d+24|0;i=d+16|0;j=d;k=d+8|0;l=a+40|0;f[a+44>>2]=g;g=a+36|0;m=f[g>>2]|0;n=f[m+4>>2]|0;o=f[m>>2]|0;p=n-o|0;if((p|0)<=0){u=d;return 1}q=(p>>>2)+-1|0;p=a+8|0;r=a+48|0;s=a+52|0;a=i+4|0;t=j+4|0;v=h+4|0;if(n-o>>2>>>0>q>>>0){w=q;x=o}else{y=m;mq(y)}while(1){f[k>>2]=f[x+(w<<2)>>2];f[h>>2]=f[k>>2];sb(l,h,b,w)|0;m=X(w,e)|0;o=b+(m<<2)|0;q=c+(m<<2)|0;m=f[o+4>>2]|0;n=f[r>>2]|0;z=f[s>>2]|0;f[i>>2]=f[o>>2];f[a>>2]=m;f[j>>2]=n;f[t>>2]=z;Dd(h,p,i,j);f[q>>2]=f[h>>2];f[q+4>>2]=f[v>>2];w=w+-1|0;if((w|0)<=-1){A=3;break}q=f[g>>2]|0;x=f[q>>2]|0;if((f[q+4>>2]|0)-x>>2>>>0<=w>>>0){y=q;A=4;break}}if((A|0)==3){u=d;return 1}else if((A|0)==4)mq(y);return 0}function tf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=f[b>>2]|0;b=f[c>>2]|0;e=b-d>>2;g=a+8|0;h=f[g>>2]|0;i=f[a>>2]|0;j=i;k=b;if(e>>>0<=h-i>>2>>>0){l=a+4|0;m=(f[l>>2]|0)-i>>2;n=e>>>0>m>>>0;o=n?d+(m<<2)|0:b;b=o-d|0;m=b>>2;if(m|0)Xl(i|0,d|0,b|0)|0;b=j+(m<<2)|0;if(!n){n=f[l>>2]|0;if((n|0)==(b|0))return;f[l>>2]=n+(~((n+-4-b|0)>>>2)<<2);return}b=f[c>>2]|0;c=o;if((b|0)==(c|0))return;n=f[l>>2]|0;m=b+-4-o|0;o=c;c=n;while(1){f[c>>2]=f[o>>2];o=o+4|0;if((o|0)==(b|0))break;else c=c+4|0}f[l>>2]=n+((m>>>2)+1<<2);return}m=i;if(!i)p=h;else{h=a+4|0;n=f[h>>2]|0;if((n|0)!=(j|0))f[h>>2]=n+(~((n+-4-i|0)>>>2)<<2);br(m);f[g>>2]=0;f[h>>2]=0;f[a>>2]=0;p=0}if(e>>>0>1073741823)mq(a);h=p>>1;m=p>>2>>>0<536870911?(h>>>0>>0?e:h):1073741823;if(m>>>0>1073741823)mq(a);h=dn(m<<2)|0;e=a+4|0;f[e>>2]=h;f[a>>2]=h;f[g>>2]=h+(m<<2);m=d;if((k|0)==(m|0))return;g=k+-4-d|0;d=m;m=h;while(1){f[m>>2]=f[d>>2];d=d+4|0;if((d|0)==(k|0))break;else m=m+4|0}f[e>>2]=h+((g>>>2)+1<<2);return}function uf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=u;u=u+112|0;g=e+100|0;h=e;i=dn(120)|0;j=f[c+8>>2]|0;f[i+4>>2]=0;f[i>>2]=3296;k=i+8|0;l=i+12|0;m=l+44|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[k>>2]=3320;l=i+56|0;m=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[i+96>>2]=0;f[i+100>>2]=0;f[i+104>>2]=0;f[i+108>>2]=j;f[i+112>>2]=d;k=i+116|0;f[k>>2]=0;n=i;o=f[c+12>>2]|0;p=h+4|0;l=p+4|0;m=l+40|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[h>>2]=3320;l=h+48|0;m=l+36|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[h+88>>2]=0;f[h+92>>2]=0;f[h+96>>2]=0;l=o;f[p>>2]=l;m=((f[l+4>>2]|0)-(f[o>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;Xg(h+24|0,m,g);m=f[p>>2]|0;p=(f[m+28>>2]|0)-(f[m+24>>2]|0)>>2;b[g>>0]=0;Xg(h+36|0,p,g);f[h+8>>2]=o;f[h+12>>2]=d;f[h+16>>2]=j;f[h+20>>2]=i;f[k>>2]=c+72;fh(i,h);f[a>>2]=n;Gi(h);u=e;return}function vf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(((d-g|0)/12|0)>>>0>=b>>>0){hj(g|0,0,b*12|0)|0;f[e>>2]=h+(b*12|0);return}i=f[a>>2]|0;j=(g-i|0)/12|0;g=j+b|0;k=i;if(g>>>0>357913941)mq(a);l=(d-i|0)/12|0;d=l<<1;m=l>>>0<178956970?(d>>>0>>0?g:d):357913941;do if(m)if(m>>>0>357913941){d=ra(8)|0;Wo(d,14941);f[d>>2]=6944;va(d|0,1080,114)}else{n=dn(m*12|0)|0;break}else n=0;while(0);d=n+(j*12|0)|0;j=d;g=n+(m*12|0)|0;hj(d|0,0,b*12|0)|0;m=d+(b*12|0)|0;if((h|0)==(k|0)){o=j;p=i;q=h}else{i=h;h=j;j=d;do{d=j+-12|0;b=i;i=i+-12|0;f[d>>2]=0;n=j+-8|0;f[n>>2]=0;f[j+-4>>2]=0;f[d>>2]=f[i>>2];d=b+-8|0;f[n>>2]=f[d>>2];n=b+-4|0;f[j+-4>>2]=f[n>>2];f[n>>2]=0;f[d>>2]=0;f[i>>2]=0;j=h+-12|0;h=j}while((i|0)!=(k|0));o=h;p=f[a>>2]|0;q=f[e>>2]|0}f[a>>2]=o;f[e>>2]=m;f[c>>2]=g;g=p;if((q|0)!=(g|0)){c=q;do{q=c;c=c+-12|0;m=f[c>>2]|0;if(m|0){e=q+-8|0;q=f[e>>2]|0;if((q|0)!=(m|0))f[e>>2]=q+(~((q+-4-m|0)>>>2)<<2);br(m)}}while((c|0)!=(g|0))}if(!p)return;br(p);return}function wf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=f[a+12>>2]|0;e=a+68|0;g=f[e>>2]|0;h=f[g+80>>2]|0;b[c+84>>0]=0;i=c+68|0;j=c+72|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0)if(h>>>0>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{kh(i,h-m|0,3220);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+72|0;a=c+68|0;c=f[o+96>>2]|0;o=f[d+28>>2]|0;d=0;while(1){h=d*3|0;i=f[o+(h<<2)>>2]|0;if((i|0)==-1){q=0;r=11;break}g=f[(f[m>>2]|0)+12>>2]|0;k=f[g+(i<<2)>>2]|0;if(k>>>0>=p>>>0){q=0;r=11;break}i=f[a>>2]|0;f[i+(f[c+(d*12|0)>>2]<<2)>>2]=k;k=f[o+(h+1<<2)>>2]|0;if((k|0)==-1){q=0;r=11;break}l=f[g+(k<<2)>>2]|0;if(l>>>0>=p>>>0){q=0;r=11;break}f[i+(f[c+(d*12|0)+4>>2]<<2)>>2]=l;l=f[o+(h+2<<2)>>2]|0;if((l|0)==-1){q=0;r=11;break}h=f[g+(l<<2)>>2]|0;if(h>>>0>=p>>>0){q=0;r=11;break}f[i+(f[c+(d*12|0)+8>>2]<<2)>>2]=h;d=d+1|0;if(d>>>0>=e>>>0){q=1;r=11;break}}if((r|0)==11)return q|0;return 0}function xf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-4194304|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-4177920|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+4194304|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1077936128|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Cn(e);eh(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;Xl(h+a|0,h|0,o|0)|0;Rg(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Tn(a|0,0,o|0,k|0)|0;k=Tn(h|0,I|0,g|0,j|0)|0;vl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)br(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;br(c);u=d;return}function yf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-2097152|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-2080768|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+6291456|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1075838976|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Cn(e);eh(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;Xl(h+a|0,h|0,o|0)|0;Rg(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Tn(a|0,0,o|0,k|0)|0;k=Tn(h|0,I|0,g|0,j|0)|0;vl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)br(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;br(c);u=d;return}function zf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-1048576|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1032192|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+7340032|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1074790400|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Cn(e);eh(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;Xl(h+a|0,h|0,o|0)|0;Rg(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Tn(a|0,0,o|0,k|0)|0;k=Tn(h|0,I|0,g|0,j|0)|0;vl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)br(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;br(c);u=d;return}function Af(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;a=u;u=u+96|0;j=a;if(!c){k=-1;u=a;return k|0}Lm(j);yj(j,d,0,g&255,i,0,g<<1,0,0,0);i=uh(c,j,1,e)|0;d=f[(f[c+8>>2]|0)+(i<<2)>>2]|0;if(e|0){l=d+84|0;m=d+68|0;n=d+40|0;o=d+64|0;d=0;do{if(!(b[l>>0]|0))p=f[(f[m>>2]|0)+(d<<2)>>2]|0;else p=d;q=h+((X(d,g)|0)<<1)|0;r=n;s=f[r>>2]|0;t=on(s|0,f[r+4>>2]|0,p|0,0)|0;Rg((f[f[o>>2]>>2]|0)+t|0,q|0,s|0)|0;d=d+1|0}while((d|0)!=(e|0))}d=c+80|0;c=f[d>>2]|0;if(c)if((c|0)==(e|0))v=10;else w=-1;else{f[d>>2]=e;v=10}if((v|0)==10)w=i;i=j+88|0;v=f[i>>2]|0;f[i>>2]=0;if(v|0){i=f[v+8>>2]|0;if(i|0){e=v+12|0;if((f[e>>2]|0)!=(i|0))f[e>>2]=i;br(i)}br(v)}v=f[j+68>>2]|0;if(v|0){i=j+72|0;e=f[i>>2]|0;if((e|0)!=(v|0))f[i>>2]=e+(~((e+-4-v|0)>>>2)<<2);br(v)}v=j+64|0;j=f[v>>2]|0;f[v>>2]=0;if(j|0){v=f[j>>2]|0;if(v|0){e=j+4|0;if((f[e>>2]|0)!=(v|0))f[e>>2]=v;br(v)}br(j)}k=w;u=a;return k|0}function Bf(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;a=u;u=u+96|0;j=a;if(!c){k=-1;u=a;return k|0}Lm(j);yj(j,d,0,g&255,i,0,g<<2,0,0,0);i=uh(c,j,1,e)|0;d=f[(f[c+8>>2]|0)+(i<<2)>>2]|0;if(e|0){l=d+84|0;m=d+68|0;n=d+40|0;o=d+64|0;d=0;do{if(!(b[l>>0]|0))p=f[(f[m>>2]|0)+(d<<2)>>2]|0;else p=d;q=h+((X(d,g)|0)<<2)|0;r=n;s=f[r>>2]|0;t=on(s|0,f[r+4>>2]|0,p|0,0)|0;Rg((f[f[o>>2]>>2]|0)+t|0,q|0,s|0)|0;d=d+1|0}while((d|0)!=(e|0))}d=c+80|0;c=f[d>>2]|0;if(c)if((c|0)==(e|0))v=10;else w=-1;else{f[d>>2]=e;v=10}if((v|0)==10)w=i;i=j+88|0;v=f[i>>2]|0;f[i>>2]=0;if(v|0){i=f[v+8>>2]|0;if(i|0){e=v+12|0;if((f[e>>2]|0)!=(i|0))f[e>>2]=i;br(i)}br(v)}v=f[j+68>>2]|0;if(v|0){i=j+72|0;e=f[i>>2]|0;if((e|0)!=(v|0))f[i>>2]=e+(~((e+-4-v|0)>>>2)<<2);br(v)}v=j+64|0;j=f[v>>2]|0;f[v>>2]=0;if(j|0){v=f[j>>2]|0;if(v|0){e=j+4|0;if((f[e>>2]|0)!=(v|0))f[e>>2]=v;br(v)}br(j)}k=w;u=a;return k|0}function Cf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-262144|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-245760|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+8126464|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1074003968|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Cn(e);eh(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;Xl(h+a|0,h|0,o|0)|0;Rg(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Tn(a|0,0,o|0,k|0)|0;k=Tn(h|0,I|0,g|0,j|0)|0;vl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)br(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;br(c);u=d;return}function Df(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-131072|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-114688|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+8257536|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1073872896|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Cn(e);eh(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;Xl(h+a|0,h|0,o|0)|0;Rg(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Tn(a|0,0,o|0,k|0)|0;k=Tn(h|0,I|0,g|0,j|0)|0;vl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)br(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;br(c);u=d;return}function Ef(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-32768|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-16384|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+8355840|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1073774592|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Cn(e);eh(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;Xl(h+a|0,h|0,o|0)|0;Rg(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Tn(a|0,0,o|0,k|0)|0;k=Tn(h|0,I|0,g|0,j|0)|0;vl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)br(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;br(c);u=d;return}function Ff(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=f[b>>2]|0;d=f[b+4>>2]|0;e=f[b+8>>2]|0;g=f[b+12>>2]|0;b=(((c^318)+239^d)+239^e)+239^g;h=f[a+4>>2]|0;if(!h){i=0;return i|0}j=h+-1|0;k=(j&h|0)==0;if(!k)if(b>>>0>>0)l=b;else l=(b>>>0)%(h>>>0)|0;else l=b&j;m=f[(f[a>>2]|0)+(l<<2)>>2]|0;if(!m){i=0;return i|0}a=f[m>>2]|0;if(!a){i=0;return i|0}if(k){k=a;while(1){m=f[k+4>>2]|0;n=(m|0)==(b|0);if(!(n|(m&j|0)==(l|0))){i=0;o=25;break}if((((n?(f[k+8>>2]|0)==(c|0):0)?(f[k+12>>2]|0)==(d|0):0)?(f[k+16>>2]|0)==(e|0):0)?(f[k+20>>2]|0)==(g|0):0){i=k;o=25;break}k=f[k>>2]|0;if(!k){i=0;o=25;break}}if((o|0)==25)return i|0}else p=a;while(1){a=f[p+4>>2]|0;if((a|0)==(b|0)){if((((f[p+8>>2]|0)==(c|0)?(f[p+12>>2]|0)==(d|0):0)?(f[p+16>>2]|0)==(e|0):0)?(f[p+20>>2]|0)==(g|0):0){i=p;o=25;break}}else{if(a>>>0>>0)q=a;else q=(a>>>0)%(h>>>0)|0;if((q|0)!=(l|0)){i=0;o=25;break}}p=f[p>>2]|0;if(!p){i=0;o=25;break}}if((o|0)==25)return i|0;return 0}function Gf(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;a=u;u=u+96|0;j=a;if(!c){k=-1;u=a;return k|0}Lm(j);yj(j,d,0,g&255,i,0,g,0,0,0);i=uh(c,j,1,e)|0;d=f[(f[c+8>>2]|0)+(i<<2)>>2]|0;if(e|0){l=d+84|0;m=d+68|0;n=d+40|0;o=d+64|0;d=0;do{if(!(b[l>>0]|0))p=f[(f[m>>2]|0)+(d<<2)>>2]|0;else p=d;q=h+(X(d,g)|0)|0;r=n;s=f[r>>2]|0;t=on(s|0,f[r+4>>2]|0,p|0,0)|0;Rg((f[f[o>>2]>>2]|0)+t|0,q|0,s|0)|0;d=d+1|0}while((d|0)!=(e|0))}d=c+80|0;c=f[d>>2]|0;if(c)if((c|0)==(e|0))v=10;else w=-1;else{f[d>>2]=e;v=10}if((v|0)==10)w=i;i=j+88|0;v=f[i>>2]|0;f[i>>2]=0;if(v|0){i=f[v+8>>2]|0;if(i|0){e=v+12|0;if((f[e>>2]|0)!=(i|0))f[e>>2]=i;br(i)}br(v)}v=f[j+68>>2]|0;if(v|0){i=j+72|0;e=f[i>>2]|0;if((e|0)!=(v|0))f[i>>2]=e+(~((e+-4-v|0)>>>2)<<2);br(v)}v=j+64|0;j=f[v>>2]|0;f[v>>2]=0;if(j|0){v=f[j>>2]|0;if(v|0){e=j+4|0;if((f[e>>2]|0)!=(v|0))f[e>>2]=v;br(v)}br(j)}k=w;u=a;return k|0}function Hf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=u;u=u+32|0;i=h;j=h+16|0;k=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;do if((c+-1|0)>>>0<6&(Qa[f[(f[b>>2]|0)+8>>2]&127](b)|0)==1){l=Qa[f[(f[b>>2]|0)+52>>2]&127](b)|0;m=Ra[f[(f[b>>2]|0)+60>>2]&127](b,d)|0;if((l|0)==0|(m|0)==0){f[a>>2]=0;u=h;return}n=Ra[f[(f[b>>2]|0)+56>>2]&127](b,d)|0;if(!n){f[i>>2]=f[b+56>>2];f[i+4>>2]=l;f[i+12>>2]=m;f[i+8>>2]=m+12;Od(a,j,c,k,e,i,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}else{f[i>>2]=f[b+56>>2];f[i+4>>2]=n;f[i+12>>2]=m;f[i+8>>2]=m+12;Nd(a,j,c,k,e,i,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}}while(0);f[a>>2]=0;u=h;return}function If(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=f[d>>2]|0;g=f[d+4>>2]|0;if((e|0)==(g|0)){h=0;i=a+12|0;j=a+8|0}else{d=f[c>>2]|0;c=a+8|0;k=a+12|0;a=0;l=e;while(1){e=f[l>>2]|0;m=f[d+(e<<2)>>2]|0;if(m>>>0>>0)n=a;else{o=f[c>>2]|0;p=(f[k>>2]|0)-o|0;q=o;if((p|0)>0){o=p>>>2;p=0;do{r=f[q+(p<<2)>>2]|0;s=f[r+68>>2]|0;if(!(b[r+84>>0]|0))t=f[s+(e<<2)>>2]|0;else t=e;f[s+(m<<2)>>2]=t;p=p+1|0}while((p|0)<(o|0))}n=m+1|0}l=l+4|0;if((l|0)==(g|0)){h=n;i=k;j=c;break}else a=n}}n=f[i>>2]|0;a=f[j>>2]|0;if((n-a|0)>0){u=0;v=a;w=n}else return;while(1){n=f[v+(u<<2)>>2]|0;b[n+84>>0]=0;a=n+68|0;c=n+72|0;n=f[c>>2]|0;k=f[a>>2]|0;g=n-k>>2;l=k;k=n;if(h>>>0<=g>>>0)if(h>>>0>>0?(n=l+(h<<2)|0,(n|0)!=(k|0)):0){f[c>>2]=k+(~((k+-4-n|0)>>>2)<<2);x=v;y=w}else{x=v;y=w}else{kh(a,h-g|0,5908);x=f[j>>2]|0;y=f[i>>2]|0}u=u+1|0;if((u|0)>=(y-x>>2|0))break;else{v=x;w=y}}return}function Jf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=b;e=c-d>>2;g=a+8|0;h=f[g>>2]|0;i=f[a>>2]|0;j=i;if(e>>>0<=h-i>>2>>>0){k=a+4|0;l=(f[k>>2]|0)-i>>2;m=e>>>0>l>>>0;n=b+(l<<2)|0;l=m?n:c;o=l;p=o-d|0;q=p>>2;if(q|0)Xl(i|0,b|0,p|0)|0;p=j+(q<<2)|0;if(!m){m=f[k>>2]|0;if((m|0)==(p|0))return;f[k>>2]=m+(~((m+-4-p|0)>>>2)<<2);return}if((l|0)==(c|0))return;l=f[k>>2]|0;p=((c+-4-o|0)>>>2)+1|0;o=n;n=l;while(1){f[n>>2]=f[o>>2];o=o+4|0;if((o|0)==(c|0))break;else n=n+4|0}f[k>>2]=l+(p<<2);return}p=i;if(!i)r=h;else{h=a+4|0;l=f[h>>2]|0;if((l|0)!=(j|0))f[h>>2]=l+(~((l+-4-i|0)>>>2)<<2);br(p);f[g>>2]=0;f[h>>2]=0;f[a>>2]=0;r=0}if(e>>>0>1073741823)mq(a);h=r>>1;p=r>>2>>>0<536870911?(h>>>0>>0?e:h):1073741823;if(p>>>0>1073741823)mq(a);h=dn(p<<2)|0;e=a+4|0;f[e>>2]=h;f[a>>2]=h;f[g>>2]=h+(p<<2);if((b|0)==(c|0))return;p=((c+-4-d|0)>>>2)+1|0;d=b;b=h;while(1){f[b>>2]=f[d>>2];d=d+4|0;if((d|0)==(c|0))break;else b=b+4|0}f[e>>2]=h+(p<<2);return}function Kf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;c=u;u=u+16|0;d=c;e=a+76|0;g=f[e>>2]|0;h=a+80|0;i=f[h>>2]|0;if((i|0)!=(g|0))f[h>>2]=i+(~((i+-4-g|0)>>>2)<<2);f[e>>2]=0;f[h>>2]=0;f[a+84>>2]=0;if(g|0)br(g);g=a+64|0;h=f[g>>2]|0;e=a+68|0;if((f[e>>2]|0)!=(h|0))f[e>>2]=h;f[g>>2]=0;f[e>>2]=0;f[a+72>>2]=0;if(h|0)br(h);h=b+4|0;e=f[h>>2]|0;g=f[b>>2]|0;i=((e-g|0)/12|0)*3|0;j=a+4|0;k=f[j>>2]|0;l=f[a>>2]|0;m=k-l>>2;n=l;l=k;k=g;if(i>>>0<=m>>>0)if(i>>>0>>0?(o=n+(i<<2)|0,(o|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-o|0)>>>2)<<2);p=e;q=g;r=k}else{p=e;q=g;r=k}else{oi(a,i-m|0);m=f[b>>2]|0;p=f[h>>2]|0;q=m;r=m}if((p|0)!=(q|0)){q=f[a>>2]|0;m=(p-r|0)/12|0;p=0;do{h=p*3|0;f[q+(h<<2)>>2]=f[r+(p*12|0)>>2];f[q+(h+1<<2)>>2]=f[r+(p*12|0)+4>>2];f[q+(h+2<<2)>>2]=f[r+(p*12|0)+8>>2];p=p+1|0}while(p>>>0>>0)}f[d>>2]=-1;if(!(oc(a,d)|0)){s=0;u=c;return s|0}Gc(a)|0;fb(a,f[d>>2]|0)|0;s=1;u=c;return s|0}function Lf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-16384|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;b[m>>0]=j;b[m+1>>0]=j>>>8;n=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;o=j+8372224|0;b[m>>0]=o;b[m+1>>0]=o>>>8;b[m+2>>0]=o>>>16;n=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;o=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+-1073758208|0;b[o>>0]=m;b[o+1>>0]=m>>>8;b[o+2>>0]=m>>>16;b[o+3>>0]=m>>>24;n=(f[l>>2]|0)+4|0;break}else{n=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;n=(f[l>>2]|0)+1|0}while(0);k=((n|0)<0)<<31>>31;Cn(e);eh(n,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;Xl(h+a|0,h|0,n|0)|0;Rg(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Tn(a|0,0,n|0,k|0)|0;k=Tn(h|0,I|0,g|0,j|0)|0;vl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)br(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;br(c);u=d;return}function Mf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=b;e=c-d>>2;g=a+8|0;h=f[g>>2]|0;i=f[a>>2]|0;j=i;if(e>>>0<=h-i>>2>>>0){k=a+4|0;l=(f[k>>2]|0)-i>>2;m=e>>>0>l>>>0;n=b+(l<<2)|0;l=m?n:c;o=l;p=o-d|0;q=p>>2;if(q|0)Xl(i|0,b|0,p|0)|0;p=j+(q<<2)|0;if(!m){m=f[k>>2]|0;if((m|0)==(p|0))return;f[k>>2]=m+(~((m+-4-p|0)>>>2)<<2);return}if((l|0)==(c|0))return;l=f[k>>2]|0;p=c+-4-o|0;o=n;n=l;while(1){f[n>>2]=f[o>>2];o=o+4|0;if((o|0)==(c|0))break;else n=n+4|0}f[k>>2]=l+((p>>>2)+1<<2);return}p=i;if(!i)r=h;else{h=a+4|0;l=f[h>>2]|0;if((l|0)!=(j|0))f[h>>2]=l+(~((l+-4-i|0)>>>2)<<2);br(p);f[g>>2]=0;f[h>>2]=0;f[a>>2]=0;r=0}if(e>>>0>1073741823)mq(a);h=r>>1;p=r>>2>>>0<536870911?(h>>>0>>0?e:h):1073741823;if(p>>>0>1073741823)mq(a);h=dn(p<<2)|0;e=a+4|0;f[e>>2]=h;f[a>>2]=h;f[g>>2]=h+(p<<2);if((b|0)==(c|0))return;p=c+-4-d|0;d=b;b=h;while(1){f[b>>2]=f[d>>2];d=d+4|0;if((d|0)==(c|0))break;else b=b+4|0}f[e>>2]=h+((p>>>2)+1<<2);return}function Nf(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0;g=u;u=u+80|0;h=g;i=g+64|0;Al(h);j=f[(f[a+8>>2]|0)+56>>2]|0;k=X(Ll(5)|0,d)|0;yj(h,j,0,d&255,5,0,k,((k|0)<0)<<31>>31,0,0);k=dn(96)|0;nl(k,h);pj(k,c)|0;f[i>>2]=k;Wi(a,i);k=f[i>>2]|0;f[i>>2]=0;if(k|0){i=k+88|0;c=f[i>>2]|0;f[i>>2]=0;if(c|0){i=f[c+8>>2]|0;if(i|0){h=c+12|0;if((f[h>>2]|0)!=(i|0))f[h>>2]=i;br(i)}br(c)}c=f[k+68>>2]|0;if(c|0){i=k+72|0;h=f[i>>2]|0;if((h|0)!=(c|0))f[i>>2]=h+(~((h+-4-c|0)>>>2)<<2);br(c)}c=k+64|0;h=f[c>>2]|0;f[c>>2]=0;if(h|0){c=f[h>>2]|0;if(c|0){i=h+4|0;if((f[i>>2]|0)!=(c|0))f[i>>2]=c;br(c)}br(h)}br(k)}if(!e){u=g;return}k=f[a+32>>2]|0;b[k+84>>0]=0;a=k+68|0;h=k+72|0;k=f[h>>2]|0;c=f[a>>2]|0;i=k-c>>2;d=k;if(i>>>0>>0){kh(a,e-i|0,1516);u=g;return}if(i>>>0<=e>>>0){u=g;return}i=c+(e<<2)|0;if((i|0)==(d|0)){u=g;return}f[h>>2]=d+(~((d+-4-i|0)>>>2)<<2);u=g;return}function Of(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;c=u;u=u+16|0;d=c+4|0;e=c;g=a+4|0;h=f[g>>2]|0;i=a+8|0;j=f[i>>2]|0;if((j|0)==(h|0))k=h;else{l=j+(~((j+-4-h|0)>>>2)<<2)|0;f[i>>2]=l;k=l}l=a+16|0;h=f[l>>2]|0;j=a+20|0;m=f[j>>2]|0;n=h;if((m|0)!=(h|0))f[j>>2]=m+(~((m+-4-n|0)>>>2)<<2);m=f[b>>2]|0;h=f[b+4>>2]|0;if((m|0)==(h|0)){u=c;return}b=a+12|0;a=m;m=k;k=n;while(1){n=f[a>>2]|0;f[d>>2]=n;if((m|0)==(f[b>>2]|0)){Ci(g,d);o=f[l>>2]|0}else{f[m>>2]=n;f[i>>2]=m+4;o=k}n=f[d>>2]|0;p=f[j>>2]|0;q=p-o>>2;r=o;if((n|0)<(q|0)){s=r;t=n;v=o}else{w=n+1|0;f[e>>2]=-1;x=p;if(w>>>0<=q>>>0)if(w>>>0>>0?(p=r+(w<<2)|0,(p|0)!=(x|0)):0){f[j>>2]=x+(~((x+-4-p|0)>>>2)<<2);y=n;z=r;A=o}else{y=n;z=r;A=o}else{kh(l,w-q|0,e);q=f[l>>2]|0;y=f[d>>2]|0;z=q;A=q}s=z;t=y;v=A}m=f[i>>2]|0;f[s+(t<<2)>>2]=(m-(f[g>>2]|0)>>2)+-1;a=a+4|0;if((a|0)==(h|0))break;else k=v}u=c;return}function Pf(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=d[b>>1]|0;e=d[b+2>>1]|0;g=d[b+4>>1]|0;b=(((c^318)&65535)+239^e&65535)+239^g&65535;h=f[a+4>>2]|0;if(!h){i=0;return i|0}j=h+-1|0;k=(j&h|0)==0;if(!k)if(b>>>0>>0)l=b;else l=(b>>>0)%(h>>>0)|0;else l=b&j;m=f[(f[a>>2]|0)+(l<<2)>>2]|0;if(!m){i=0;return i|0}a=f[m>>2]|0;if(!a){i=0;return i|0}if(k){k=a;while(1){m=f[k+4>>2]|0;n=(m|0)==(b|0);if(!(n|(m&j|0)==(l|0))){i=0;o=23;break}if(((n?(n=k+8|0,(d[n>>1]|0)==c<<16>>16):0)?(d[n+2>>1]|0)==e<<16>>16:0)?(d[k+12>>1]|0)==g<<16>>16:0){i=k;o=23;break}k=f[k>>2]|0;if(!k){i=0;o=23;break}}if((o|0)==23)return i|0}else p=a;while(1){a=f[p+4>>2]|0;if((a|0)==(b|0)){k=p+8|0;if(((d[k>>1]|0)==c<<16>>16?(d[k+2>>1]|0)==e<<16>>16:0)?(d[p+12>>1]|0)==g<<16>>16:0){i=p;o=23;break}}else{if(a>>>0>>0)q=a;else q=(a>>>0)%(h>>>0)|0;if((q|0)!=(l|0)){i=0;o=23;break}}p=f[p>>2]|0;if(!p){i=0;o=23;break}}if((o|0)==23)return i|0;return 0}function Qf(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=u;u=u+32|0;d=c;e=a+16|0;g=e;h=f[g>>2]|0;i=f[g+4>>2]|0;if(!((i|0)>0|(i|0)==0&h>>>0>0)){u=c;return}g=Tn(f[(f[a+12>>2]|0)+4>>2]|0,0,7,0)|0;j=Wn(g|0,I|0,3)|0;g=I;if(!(b[a+24>>0]|0)){k=a+4|0;l=k;m=k;n=h;o=i}else{k=f[a>>2]|0;p=a+4|0;q=k+((f[p>>2]|0)-k)|0;k=Tn(h|0,i|0,8,0)|0;i=q+(0-k)|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;b[d+24>>0]=0;eh(j,g,d)|0;k=d+4|0;q=(f[k>>2]|0)-(f[d>>2]|0)|0;Xl(i+q|0,i+8|0,j|0)|0;Rg(i|0,f[d>>2]|0,q|0)|0;i=e;h=Tn(f[i>>2]|0,f[i+4>>2]|0,8-q|0,0)|0;q=e;f[q>>2]=h;f[q+4>>2]=I;q=d+12|0;h=f[q>>2]|0;f[q>>2]=0;if(h|0)br(h);h=f[d>>2]|0;if(h|0){if((f[k>>2]|0)!=(h|0))f[k>>2]=h;br(h)}h=e;l=p;m=p;n=f[h>>2]|0;o=f[h+4>>2]|0}h=f[l>>2]|0;l=f[a>>2]|0;p=h-l|0;k=Vn(j|0,g|0,n|0,o|0)|0;o=Tn(k|0,I|0,p|0,0)|0;k=l;l=h;if(p>>>0>=o>>>0){if(p>>>0>o>>>0?(h=k+o|0,(h|0)!=(l|0)):0)f[m>>2]=h}else ri(a,o-p|0);p=e;f[p>>2]=0;f[p+4>>2]=0;u=c;return}function Rf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f[c>>2]=1;d=a+4|0;e=c+8|0;g=c+12|0;c=f[e>>2]|0;i=(f[g>>2]|0)-c|0;if(i>>>0<4294967292){Bk(e,i+4|0,0);j=f[e>>2]|0}else j=c;c=j+i|0;i=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;b[c>>0]=i;b[c+1>>0]=i>>8;b[c+2>>0]=i>>16;b[c+3>>0]=i>>24;i=a+8|0;c=a+12|0;d=f[i>>2]|0;if((f[c>>2]|0)!=(d|0)){j=0;k=d;do{d=k+(j<<2)|0;l=f[e>>2]|0;m=(f[g>>2]|0)-l|0;if(m>>>0<4294967292){Bk(e,m+4|0,0);n=f[e>>2]|0}else n=l;l=n+m|0;m=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;b[l>>0]=m;b[l+1>>0]=m>>8;b[l+2>>0]=m>>16;b[l+3>>0]=m>>24;j=j+1|0;k=f[i>>2]|0}while(j>>>0<(f[c>>2]|0)-k>>2>>>0)}k=a+20|0;a=f[e>>2]|0;c=(f[g>>2]|0)-a|0;if(c>>>0<4294967292){Bk(e,c+4|0,0);o=f[e>>2]|0;p=o+c|0;q=h[k>>0]|h[k+1>>0]<<8|h[k+2>>0]<<16|h[k+3>>0]<<24;b[p>>0]=q;b[p+1>>0]=q>>8;b[p+2>>0]=q>>16;b[p+3>>0]=q>>24;return}else{o=a;p=o+c|0;q=h[k>>0]|h[k+1>>0]<<8|h[k+2>>0]<<16|h[k+3>>0]<<24;b[p>>0]=q;b[p+1>>0]=q>>8;b[p+2>>0]=q>>16;b[p+3>>0]=q>>24;return}}function Sf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+8|0;e=f[d>>2]|0;g=f[a>>2]|0;h=g;do if(e-g>>2>>>0>=b>>>0){i=a+4|0;j=f[i>>2]|0;k=j-g>>2;l=k>>>0>>0;m=l?k:b;n=j;if(m|0){j=m;m=h;while(1){f[m>>2]=f[c>>2];j=j+-1|0;if(!j)break;else m=m+4|0}}if(!l){m=h+(b<<2)|0;if((m|0)==(n|0))return;else{o=i;p=n+(~((n+-4-m|0)>>>2)<<2)|0;break}}else{m=b-k|0;j=m;q=n;while(1){f[q>>2]=f[c>>2];j=j+-1|0;if(!j)break;else q=q+4|0}o=i;p=n+(m<<2)|0;break}}else{q=g;if(!g)r=e;else{j=a+4|0;k=f[j>>2]|0;if((k|0)!=(h|0))f[j>>2]=k+(~((k+-4-g|0)>>>2)<<2);br(q);f[d>>2]=0;f[j>>2]=0;f[a>>2]=0;r=0}if(b>>>0>1073741823)mq(a);j=r>>1;q=r>>2>>>0<536870911?(j>>>0>>0?b:j):1073741823;if(q>>>0>1073741823)mq(a);j=dn(q<<2)|0;k=a+4|0;f[k>>2]=j;f[a>>2]=j;f[d>>2]=j+(q<<2);q=b;l=j;while(1){f[l>>2]=f[c>>2];q=q+-1|0;if(!q)break;else l=l+4|0}o=k;p=j+(b<<2)|0}while(0);f[o>>2]=p;return}function Tf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=Qg(a,b,c,d,g)|0;i=f[e>>2]|0;j=f[d>>2]|0;k=f[g>>2]|0;g=f[k>>2]|0;l=(f[k+4>>2]|0)-g>>3;if(l>>>0<=i>>>0)mq(k);m=g;if(l>>>0<=j>>>0)mq(k);if((f[m+(i<<3)>>2]|0)>>>0>=(f[m+(j<<3)>>2]|0)>>>0){n=h;return n|0}f[d>>2]=i;f[e>>2]=j;j=f[d>>2]|0;e=f[c>>2]|0;if(l>>>0<=j>>>0)mq(k);if(l>>>0<=e>>>0)mq(k);if((f[m+(j<<3)>>2]|0)>>>0>=(f[m+(e<<3)>>2]|0)>>>0){n=h+1|0;return n|0}f[c>>2]=j;f[d>>2]=e;e=f[c>>2]|0;d=f[b>>2]|0;if(l>>>0<=e>>>0)mq(k);if(l>>>0<=d>>>0)mq(k);if((f[m+(e<<3)>>2]|0)>>>0>=(f[m+(d<<3)>>2]|0)>>>0){n=h+2|0;return n|0}f[b>>2]=e;f[c>>2]=d;d=f[b>>2]|0;c=f[a>>2]|0;if(l>>>0<=d>>>0)mq(k);if(l>>>0<=c>>>0)mq(k);if((f[m+(d<<3)>>2]|0)>>>0>=(f[m+(c<<3)>>2]|0)>>>0){n=h+3|0;return n|0}f[a>>2]=d;f[b>>2]=c;n=h+4|0;return n|0}function Uf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=b[c>>0]|0;e=b[c+1>>0]|0;g=b[c+2>>0]|0;c=((d&255^318)+239^e&255)+239^g&255;h=f[a+4>>2]|0;if(!h){i=0;return i|0}j=h+-1|0;k=(j&h|0)==0;if(!k)if(c>>>0>>0)l=c;else l=(c>>>0)%(h>>>0)|0;else l=c&j;m=f[(f[a>>2]|0)+(l<<2)>>2]|0;if(!m){i=0;return i|0}a=f[m>>2]|0;if(!a){i=0;return i|0}if(k){k=a;while(1){m=f[k+4>>2]|0;n=(m|0)==(c|0);if(!(n|(m&j|0)==(l|0))){i=0;o=23;break}if(((n?(n=k+8|0,(b[n>>0]|0)==d<<24>>24):0)?(b[n+1>>0]|0)==e<<24>>24:0)?(b[n+2>>0]|0)==g<<24>>24:0){i=k;o=23;break}k=f[k>>2]|0;if(!k){i=0;o=23;break}}if((o|0)==23)return i|0}else p=a;while(1){a=f[p+4>>2]|0;if((a|0)==(c|0)){k=p+8|0;if(((b[k>>0]|0)==d<<24>>24?(b[k+1>>0]|0)==e<<24>>24:0)?(b[k+2>>0]|0)==g<<24>>24:0){i=p;o=23;break}}else{if(a>>>0>>0)q=a;else q=(a>>>0)%(h>>>0)|0;if((q|0)!=(l|0)){i=0;o=23;break}}p=f[p>>2]|0;if(!p){i=0;o=23;break}}if((o|0)==23)return i|0;return 0}function Vf(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=u;u=u+16|0;c=b;d=a+36|0;e=a+4|0;g=a+8|0;h=(f[g>>2]|0)-(f[e>>2]|0)>>2;i=a+40|0;j=f[i>>2]|0;k=f[d>>2]|0;l=j-k>>2;m=k;k=j;if(h>>>0<=l>>>0){if(h>>>0>>0?(j=m+(h<<2)|0,(j|0)!=(k|0)):0){m=k;do{k=m+-4|0;f[i>>2]=k;n=f[k>>2]|0;f[k>>2]=0;if(n|0)Va[f[(f[n>>2]|0)+4>>2]&127](n);m=f[i>>2]|0}while((m|0)!=(j|0))}}else ng(d,h-l|0);if((f[g>>2]|0)==(f[e>>2]|0)){o=1;u=b;return o|0}l=a+52|0;h=a+48|0;j=0;while(1){Xa[f[(f[a>>2]|0)+56>>2]&15](c,a,j);m=(f[d>>2]|0)+(j<<2)|0;i=f[c>>2]|0;f[c>>2]=0;n=f[m>>2]|0;f[m>>2]=i;if(n|0)Va[f[(f[n>>2]|0)+4>>2]&127](n);n=f[c>>2]|0;f[c>>2]=0;if(n|0)Va[f[(f[n>>2]|0)+4>>2]&127](n);n=f[(f[d>>2]|0)+(j<<2)>>2]|0;if(!n){o=0;p=19;break}if(j>>>0<(f[l>>2]|0)>>>0?f[(f[h>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)|0:0)Pp(n);j=j+1|0;if(j>>>0>=(f[g>>2]|0)-(f[e>>2]|0)>>2>>>0){o=1;p=19;break}}if((p|0)==19){u=b;return o|0}return 0}function Wf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=u;u=u+16|0;e=d+4|0;g=d;Nh(f[c+12>>2]|0,b)|0;h=f[c+8>>2]|0;a:do if(h|0){i=b+16|0;j=b+4|0;k=h;while(1){l=k;if(!(nf(0,b,l+8|0)|0)){m=0;break}n=l+20|0;o=(f[l+24>>2]|0)-(f[n>>2]|0)|0;Nh(o,b)|0;l=f[n>>2]|0;n=i;p=f[n+4>>2]|0;if(!((p|0)>0|(p|0)==0&(f[n>>2]|0)>>>0>0)){f[g>>2]=f[j>>2];f[e>>2]=f[g>>2];ye(b,e,l,l+o|0)|0}k=f[k>>2]|0;if(!k)break a}u=d;return m|0}while(0);Nh(f[c+32>>2]|0,b)|0;e=f[c+28>>2]|0;if(!e){m=1;u=d;return m|0}else q=e;while(1){e=q;if(!(nf(0,b,e+8|0)|0)){m=0;r=10;break}Wf(a,b,f[e+20>>2]|0)|0;q=f[q>>2]|0;if(!q){m=1;r=10;break}}if((r|0)==10){u=d;return m|0}return 0}function Xf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;h=a+8|0;i=a+12|0;j=f[h>>2]|0;if((f[i>>2]|0)==(j|0)){k=dn(76)|0;pn(k,b);l=k;f[g>>2]=l;k=f[i>>2]|0;if(k>>>0<(f[a+16>>2]|0)>>>0){f[g>>2]=0;f[k>>2]=l;f[i>>2]=k+4;m=g}else{yg(h,g);m=g}g=f[m>>2]|0;f[m>>2]=0;if(!g){u=c;return 1}Va[f[(f[g>>2]|0)+4>>2]&127](g);u=c;return 1}g=f[j>>2]|0;f[d>>2]=b;j=g+4|0;m=g+8|0;h=f[m>>2]|0;if((h|0)==(f[g+12>>2]|0))Ci(j,d);else{f[h>>2]=b;f[m>>2]=h+4}h=f[d>>2]|0;b=g+16|0;k=g+20|0;g=f[k>>2]|0;i=f[b>>2]|0;l=g-i>>2;a=i;if((h|0)<(l|0)){n=a;o=h}else{i=h+1|0;f[e>>2]=-1;p=g;if(i>>>0<=l>>>0)if(i>>>0>>0?(g=a+(i<<2)|0,(g|0)!=(p|0)):0){f[k>>2]=p+(~((p+-4-g|0)>>>2)<<2);q=h;r=a}else{q=h;r=a}else{kh(b,i-l|0,e);q=f[d>>2]|0;r=f[b>>2]|0}n=r;o=q}f[n+(o<<2)>>2]=((f[m>>2]|0)-(f[j>>2]|0)>>2)+-1;u=c;return 1}function Yf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=c;e=b;g=d-e|0;h=g>>2;i=a+8|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(h>>>0>j-k>>2>>>0){m=k;if(!k)n=j;else{j=a+4|0;o=f[j>>2]|0;if((o|0)!=(l|0))f[j>>2]=o+(~((o+-4-k|0)>>>2)<<2);br(m);f[i>>2]=0;f[j>>2]=0;f[a>>2]=0;n=0}if(h>>>0>1073741823)mq(a);j=n>>1;m=n>>2>>>0<536870911?(j>>>0>>0?h:j):1073741823;if(m>>>0>1073741823)mq(a);j=dn(m<<2)|0;n=a+4|0;f[n>>2]=j;f[a>>2]=j;f[i>>2]=j+(m<<2);if((g|0)<=0)return;Rg(j|0,b|0,g|0)|0;f[n>>2]=j+(g>>>2<<2);return}g=a+4|0;a=f[g>>2]|0;j=a-k>>2;k=h>>>0>j>>>0;h=k?b+(j<<2)|0:c;c=a;j=a;if((h|0)==(b|0))p=l;else{a=h+-4-e|0;e=b;b=l;while(1){f[b>>2]=f[e>>2];e=e+4|0;if((e|0)==(h|0))break;else b=b+4|0}p=l+((a>>>2)+1<<2)|0}if(k){k=d-h|0;if((k|0)<=0)return;Rg(j|0,h|0,k|0)|0;f[g>>2]=(f[g>>2]|0)+(k>>>2<<2);return}else{if((p|0)==(c|0))return;f[g>>2]=c+(~((c+-4-p|0)>>>2)<<2);return}}function Zf(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0;g=u;u=u+96|0;h=g+40|0;i=g;Gm(h,d);we(i,c,d);th(h,i);sj(i+24|0,f[i+28>>2]|0);Dj(i+12|0,f[i+16>>2]|0);sj(i,f[i+4>>2]|0);Si(a,h,e);if(!(f[a>>2]|0)){e=a+4|0;if((b[e+11>>0]|0)<0)br(f[e>>2]|0);f[c+40>>2]=f[h+40>>2];f[c+44>>2]=f[h+44>>2];f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0}f[h>>2]=2968;sj(h+28|0,f[h+32>>2]|0);Dj(h+16|0,f[h+20>>2]|0);sj(h+4|0,f[h+8>>2]|0);u=g;return}function _f(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=f[b>>2]|0;d=f[b+4>>2]|0;e=f[b+8>>2]|0;b=((c^318)+239^d)+239^e;g=f[a+4>>2]|0;if(!g){h=0;return h|0}i=g+-1|0;j=(i&g|0)==0;if(!j)if(b>>>0>>0)k=b;else k=(b>>>0)%(g>>>0)|0;else k=b&i;l=f[(f[a>>2]|0)+(k<<2)>>2]|0;if(!l){h=0;return h|0}a=f[l>>2]|0;if(!a){h=0;return h|0}if(j){j=a;while(1){l=f[j+4>>2]|0;m=(l|0)==(b|0);if(!(m|(l&i|0)==(k|0))){h=0;n=23;break}if(((m?(f[j+8>>2]|0)==(c|0):0)?(f[j+12>>2]|0)==(d|0):0)?(f[j+16>>2]|0)==(e|0):0){h=j;n=23;break}j=f[j>>2]|0;if(!j){h=0;n=23;break}}if((n|0)==23)return h|0}else o=a;while(1){a=f[o+4>>2]|0;if((a|0)==(b|0)){if(((f[o+8>>2]|0)==(c|0)?(f[o+12>>2]|0)==(d|0):0)?(f[o+16>>2]|0)==(e|0):0){h=o;n=23;break}}else{if(a>>>0>>0)p=a;else p=(a>>>0)%(g>>>0)|0;if((p|0)!=(k|0)){h=0;n=23;break}}o=f[o>>2]|0;if(!o){h=0;n=23;break}}if((n|0)==23)return h|0;return 0}function $f(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=u;u=u+16|0;g=e;if(!(ih(a,c,d)|0)){h=0;u=e;return h|0}if((b[(f[a+8>>2]|0)+24>>0]|0)!=3){h=0;u=e;return h|0}i=f[c+48>>2]|0;c=dn(32)|0;f[g>>2]=c;f[g+8>>2]=-2147483616;f[g+4>>2]=17;j=c;k=12932;l=j+17|0;do{b[j>>0]=b[k>>0]|0;j=j+1|0;k=k+1|0}while((j|0)<(l|0));b[c+17>>0]=0;c=i+16|0;k=f[c>>2]|0;if(k){j=c;l=k;a:while(1){k=l;while(1){if((f[k+16>>2]|0)>=(d|0))break;m=f[k+4>>2]|0;if(!m){n=j;break a}else k=m}l=f[k>>2]|0;if(!l){n=k;break}else j=k}if(((n|0)!=(c|0)?(f[n+16>>2]|0)<=(d|0):0)?(d=n+20|0,(sh(d,g)|0)!=0):0)o=yk(d,g,-1)|0;else p=12}else p=12;if((p|0)==12)o=yk(i,g,-1)|0;if((b[g+11>>0]|0)<0)br(f[g>>2]|0);if((o|0)<1){h=0;u=e;return h|0}tp(a+40|0,o);h=1;u=e;return h|0}function ag(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=c;g=d-e|0;h=a+8|0;i=f[h>>2]|0;j=f[a>>2]|0;k=j;if(g>>>0>(i-j|0)>>>0){if(!j)l=i;else{i=a+4|0;if((f[i>>2]|0)!=(k|0))f[i>>2]=k;br(k);f[h>>2]=0;f[i>>2]=0;f[a>>2]=0;l=0}if((g|0)<0)mq(a);i=l<<1;m=l>>>0<1073741823?(i>>>0>>0?g:i):2147483647;if((m|0)<0)mq(a);i=dn(m)|0;l=a+4|0;f[l>>2]=i;f[a>>2]=i;f[h>>2]=i+m;if((c|0)==(d|0))return;else{n=c;o=i}do{b[o>>0]=b[n>>0]|0;n=n+1|0;o=(f[l>>2]|0)+1|0;f[l>>2]=o}while((n|0)!=(d|0));return}n=a+4|0;a=(f[n>>2]|0)-j|0;j=g>>>0>a>>>0;g=c+a|0;a=j?g:d;if((a|0)==(c|0))p=k;else{o=c;c=k;while(1){b[c>>0]=b[o>>0]|0;o=o+1|0;if((o|0)==(a|0))break;else c=c+1|0}p=k+(a-e)|0}if(!j){if((f[n>>2]|0)==(p|0))return;f[n>>2]=p;return}if((a|0)==(d|0))return;a=g;g=f[n>>2]|0;do{b[g>>0]=b[a>>0]|0;a=a+1|0;g=(f[n>>2]|0)+1|0;f[n>>2]=g}while((a|0)!=(d|0));return}function bg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=c>>>1&1431655765|c<<1&-1431655766;c=d>>>2&858993459|d<<2&-858993460;d=c>>>4&252645135|c<<4&-252645136;c=d>>>8&16711935|d<<8&-16711936;d=32-b|0;e=(c>>>16|c<<16)>>>d;c=e-(e>>>1&1431655765)|0;g=(c>>>2&858993459)+(c&858993459)|0;c=(X((g>>>4)+g&252645135,16843009)|0)>>>24;g=b-c|0;h=f[a>>2]|0;i=h;j=Tn(f[i>>2]|0,f[i+4>>2]|0,g|0,((g|0)<0)<<31>>31|0)|0;g=h;f[g>>2]=j;f[g+4>>2]=I;g=h+8|0;h=g;j=Tn(f[h>>2]|0,f[h+4>>2]|0,c|0,0)|0;c=g;f[c>>2]=j;f[c+4>>2]=I;c=a+28|0;j=f[c>>2]|0;g=32-j|0;h=a+24|0;do if((g|0)>=(b|0)){i=-1>>>d<>2]&~i|i&e<>2]=k;i=j+b|0;f[c>>2]=i;if((i|0)!=32)return;i=a+16|0;l=f[i>>2]|0;if((l|0)==(f[a+20>>2]|0)){Ci(a+12|0,h);m=0;n=0;break}else{f[l>>2]=k;f[i>>2]=l+4;m=0;n=0;break}}else{l=-1>>>j<>2]&~l|l&e<>2]=i;l=a+16|0;k=f[l>>2]|0;if((k|0)==(f[a+20>>2]|0))Ci(a+12|0,h);else{f[k>>2]=i;f[l>>2]=k+4}k=b-g|0;m=k;n=-1>>>(32-k|0)&e>>>g}while(0);f[h>>2]=n;f[c>>2]=m;return}function cg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=c&255;g=(d|0)!=0;a:do if(g&(a&3|0)!=0){h=c&255;i=a;j=d;while(1){if((b[i>>0]|0)==h<<24>>24){k=i;l=j;m=6;break a}n=i+1|0;o=j+-1|0;p=(o|0)!=0;if(p&(n&3|0)!=0){i=n;j=o}else{q=n;r=o;s=p;m=5;break}}}else{q=a;r=d;s=g;m=5}while(0);if((m|0)==5)if(s){k=q;l=r;m=6}else{t=q;u=0}b:do if((m|0)==6){q=c&255;if((b[k>>0]|0)==q<<24>>24){t=k;u=l}else{r=X(e,16843009)|0;c:do if(l>>>0>3){s=k;g=l;while(1){d=f[s>>2]^r;if((d&-2139062144^-2139062144)&d+-16843009|0)break;d=s+4|0;a=g+-4|0;if(a>>>0>3){s=d;g=a}else{v=d;w=a;m=11;break c}}x=s;y=g}else{v=k;w=l;m=11}while(0);if((m|0)==11)if(!w){t=v;u=0;break}else{x=v;y=w}while(1){if((b[x>>0]|0)==q<<24>>24){t=x;u=y;break b}r=x+1|0;y=y+-1|0;if(!y){t=r;u=0;break}else x=r}}}while(0);return (u|0?t:0)|0}function dg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=e;do if((d|0)==(e|0)){h=a+8|0;i=f[h>>2]|0;j=a+12|0;k=f[j>>2]|0;l=k;if(i>>>0>>0){k=i;m=((l-k>>2)+1|0)/2|0;n=i+(m<<2)|0;o=k-d|0;k=o>>2;p=n+(0-k<<2)|0;if(!k){q=n;r=i}else{Xl(p|0,d|0,o|0)|0;q=p;r=f[h>>2]|0}f[c>>2]=q;f[h>>2]=r+(m<<2);s=q;break}m=l-g>>1;l=(m|0)==0?1:m;if(l>>>0>1073741823){m=ra(8)|0;Wo(m,14941);f[m>>2]=6944;va(m|0,1080,114)}m=dn(l<<2)|0;p=m;o=m+((l+3|0)>>>2<<2)|0;n=o;k=m+(l<<2)|0;if((d|0)==(i|0)){t=n;u=d}else{l=o;m=n;v=d;do{f[l>>2]=f[v>>2];l=m+4|0;m=l;v=v+4|0}while((v|0)!=(i|0));t=m;u=f[a>>2]|0}f[a>>2]=p;f[c>>2]=n;f[h>>2]=t;f[j>>2]=k;if(!u)s=o;else{br(u);s=f[c>>2]|0}}else s=d;while(0);f[s+-4>>2]=f[b>>2];f[c>>2]=(f[c>>2]|0)+-4;return}function eg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;i=a+4|0;if((f[i>>2]|0)==-1){j=0;u=d;return j|0}k=f[a+8>>2]|0;l=c+16|0;m=l;n=f[m>>2]|0;o=f[m+4>>2]|0;if(!((o|0)>0|(o|0)==0&n>>>0>0)){m=(f[a+12>>2]|0)-k|0;p=c+4|0;f[g>>2]=f[p>>2];f[e>>2]=f[g>>2];ye(c,e,k,k+m|0)|0;m=l;k=f[m>>2]|0;q=f[m+4>>2]|0;m=a+20|0;if((q|0)>0|(q|0)==0&k>>>0>0){r=q;s=k;t=g}else{f[g>>2]=f[p>>2];f[e>>2]=f[g>>2];ye(c,e,m,m+4|0)|0;m=l;r=f[m+4>>2]|0;s=f[m>>2]|0;t=g}}else{r=o;s=n;t=g}b[h>>0]=f[i>>2];if(!((r|0)>0|(r|0)==0&s>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];ye(c,e,h,h+1|0)|0}j=1;u=d;return j|0}function fg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;e=u;u=u+16|0;g=e+4|0;h=e;i=a+8|0;a=f[i>>2]|0;j=f[a+40>>2]|0;k=_q((j|0)>-1?j:-1)|0;l=c+4|0;m=f[l>>2]|0;n=f[c>>2]|0;if((m|0)==(n|0)){$q(k);u=e;return 1}o=d+16|0;p=d+4|0;q=k+j|0;j=0;r=n;n=a;s=a;a=m;while(1){m=f[r+(j<<2)>>2]|0;if(!(b[n+84>>0]|0))t=f[(f[n+68>>2]|0)+(m<<2)>>2]|0;else t=m;m=s+48|0;v=f[m>>2]|0;w=f[m+4>>2]|0;m=s+40|0;x=f[m>>2]|0;y=on(x|0,f[m+4>>2]|0,t|0,0)|0;m=Tn(y|0,I|0,v|0,w|0)|0;Rg(k|0,(f[f[s>>2]>>2]|0)+m|0,x|0)|0;x=o;m=f[x+4>>2]|0;if((m|0)>0|(m|0)==0&(f[x>>2]|0)>>>0>0){z=r;A=a}else{f[h>>2]=f[p>>2];f[g>>2]=f[h>>2];ye(d,g,k,q)|0;z=f[c>>2]|0;A=f[l>>2]|0}x=j+1|0;if(x>>>0>=A-z>>2>>>0)break;m=f[i>>2]|0;j=x;r=z;n=m;s=m;a=A}$q(k);u=e;return 1}function gg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=(f[b>>2]|0)*3|0;if((d|0)==-1){e=0;g=-1;f[c>>2]=g;return e|0}b=f[a+12>>2]|0;h=f[b+12>>2]|0;if((f[h+(d<<2)>>2]|0)==-1){e=0;g=d;f[c>>2]=g;return e|0}i=f[b>>2]|0;b=f[a+152>>2]|0;if((f[b+(f[i+(d<<2)>>2]<<2)>>2]|0)==-1){a=d+1|0;j=((a>>>0)%3|0|0)==0?d+-2|0:a;if((j|0)==-1){e=0;g=-1;f[c>>2]=g;return e|0}if((f[h+(j<<2)>>2]|0)==-1){e=0;g=j;f[c>>2]=g;return e|0}if((f[b+(f[i+(j<<2)>>2]<<2)>>2]|0)==-1){a=j+1|0;k=((a>>>0)%3|0|0)==0?j+-2|0:a;if((k|0)==-1){e=0;g=-1;f[c>>2]=g;return e|0}if((f[h+(k<<2)>>2]|0)==-1){e=0;g=k;f[c>>2]=g;return e|0}if((f[b+(f[i+(k<<2)>>2]<<2)>>2]|0)==-1){i=k+1|0;e=1;g=((i>>>0)%3|0|0)==0?k+-2|0:i;f[c>>2]=g;return e|0}else l=k}else l=j}else l=d;while(1){d=(((l>>>0)%3|0|0)==0?2:-1)+l|0;if((d|0)==-1)break;j=f[h+(d<<2)>>2]|0;if((j|0)==-1)break;d=j+(((j>>>0)%3|0|0)==0?2:-1)|0;if((d|0)==-1)break;else l=d}e=0;g=(((l>>>0)%3|0|0)==0?2:-1)+l|0;f[c>>2]=g;return e|0}function hg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=a+4|0;g=f[e>>2]|0;if(!g){f[c>>2]=e;h=e;return h|0}e=b[d+11>>0]|0;i=e<<24>>24<0;j=i?f[d+4>>2]|0:e&255;e=i?f[d>>2]|0:d;d=a+4|0;a=g;while(1){g=a+16|0;i=b[g+11>>0]|0;k=i<<24>>24<0;l=k?f[a+20>>2]|0:i&255;i=l>>>0>>0;m=i?l:j;if((m|0)!=0?(n=Pk(e,k?f[g>>2]|0:g,m)|0,(n|0)!=0):0)if((n|0)<0)o=8;else o=10;else if(j>>>0>>0)o=8;else o=10;if((o|0)==8){o=0;n=f[a>>2]|0;if(!n){o=9;break}else{p=a;q=n}}else if((o|0)==10){o=0;n=j>>>0>>0?j:l;if((n|0)!=0?(l=Pk(k?f[g>>2]|0:g,e,n)|0,(l|0)!=0):0){if((l|0)>=0){o=16;break}}else o=12;if((o|0)==12?(o=0,!i):0){o=16;break}r=a+4|0;i=f[r>>2]|0;if(!i){o=15;break}else{p=r;q=i}}d=p;a=q}if((o|0)==9){f[c>>2]=a;h=a;return h|0}else if((o|0)==15){f[c>>2]=a;h=r;return h|0}else if((o|0)==16){f[c>>2]=a;h=d;return h|0}return 0}function ig(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;d=u;u=u+32|0;e=d+24|0;g=d+16|0;h=d+8|0;i=d;j=a+4|0;k=f[j>>2]|0;l=f[b>>2]|0;m=f[b+4>>2]|0;b=f[c>>2]|0;n=f[c+4>>2]|0;c=b-l<<3;f[j>>2]=k-m+n+c;j=(f[a>>2]|0)+(k>>>5<<2)|0;a=k&31;k=j;if((m|0)!=(a|0)){f[e>>2]=l;f[e+4>>2]=m;f[g>>2]=b;f[g+4>>2]=n;f[h>>2]=k;f[h+4>>2]=a;ke(i,e,g,h);u=d;return}h=n-m+c|0;c=l;if((h|0)>0){if(!m){o=h;p=j;q=0;r=l;s=c}else{l=32-m|0;n=(h|0)<(l|0)?h:l;g=-1>>>(l-n|0)&-1<>2]=f[j>>2]&~g|f[c>>2]&g;g=n+m|0;l=c+4|0;o=h-n|0;p=j+(g>>>5<<2)|0;q=g&31;r=l;s=l}l=(o|0)/32|0;Xl(p|0,r|0,l<<2|0)|0;r=o-(l<<5)|0;o=p+(l<<2)|0;p=o;if((r|0)>0){g=-1>>>(32-r|0);f[o>>2]=f[o>>2]&~g|f[s+(l<<2)>>2]&g;t=r;v=p}else{t=q;v=p}}else{t=m;v=k}f[i>>2]=v;f[i+4>>2]=t;u=d;return}function jg(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=u;u=u+16|0;h=g;i=c+4|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;j=dn(16)|0;f[h>>2]=j;f[h+8>>2]=-2147483632;f[h+4>>2]=15;k=j;l=12916;m=k+15|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[j+15>>0]=0;j=yk(i,h,-1)|0;if((b[h+11>>0]|0)<0)br(f[h>>2]|0);switch(j|0){case -1:{if((Yh(i)|0)==10)n=6;else n=5;break}case 1:{n=5;break}default:n=6}if((n|0)==5){j=dn(68)|0;Xo(j);o=j}else if((n|0)==6){n=dn(64)|0;Gp(n);o=n}vo(o,d);Ad(a,o,i,e);if(f[a>>2]|0){p=f[o>>2]|0;q=p+4|0;r=f[q>>2]|0;Va[r&127](o);u=g;return}e=a+4|0;if((b[e+11>>0]|0)<0)br(f[e>>2]|0);f[c+40>>2]=f[o+52>>2];f[c+44>>2]=f[o+60>>2];f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;p=f[o>>2]|0;q=p+4|0;r=f[q>>2]|0;Va[r&127](o);u=g;return}function kg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;c=a+8|0;d=f[c>>2]|0;e=a+12|0;g=f[e>>2]|0;h=g;do if((d|0)==(g|0)){i=a+4|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(j>>>0>k>>>0){m=j;n=((m-l>>2)+1|0)/-2|0;o=j+(n<<2)|0;p=d-m|0;m=p>>2;if(!m)q=j;else{Xl(o|0,j|0,p|0)|0;q=f[i>>2]|0}p=o+(m<<2)|0;f[c>>2]=p;f[i>>2]=q+(n<<2);r=p;break}p=h-l>>1;l=(p|0)==0?1:p;if(l>>>0>1073741823){p=ra(8)|0;Wo(p,14941);f[p>>2]=6944;va(p|0,1080,114)}p=dn(l<<2)|0;n=p;m=p+(l>>>2<<2)|0;o=m;s=p+(l<<2)|0;if((j|0)==(d|0)){t=o;u=k}else{k=m;m=o;l=j;do{f[k>>2]=f[l>>2];k=m+4|0;m=k;l=l+4|0}while((l|0)!=(d|0));t=m;u=f[a>>2]|0}f[a>>2]=n;f[i>>2]=o;f[c>>2]=t;f[e>>2]=s;if(!u)r=t;else{br(u);r=f[c>>2]|0}}else r=d;while(0);f[r>>2]=f[b>>2];f[c>>2]=(f[c>>2]|0)+4;return}function lg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=a+12|0;h=f[g>>2]|0;$j(f[a+4>>2]|0,(f[h+56>>2]|0)-(f[h+52>>2]|0)>>2);h=a+76|0;a=f[h>>2]|0;if(!a){i=f[(f[g>>2]|0)+64>>2]|0;g=(f[i+4>>2]|0)-(f[i>>2]|0)>>2;i=(g>>>0)/3|0;if(g>>>0<=2){j=1;u=b;return j|0}g=0;while(1){f[d>>2]=g*3;f[c>>2]=f[d>>2];g=g+1|0;if(!(Tb(e,c)|0)){j=0;k=10;break}if((g|0)>=(i|0)){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}else{i=f[a>>2]|0;if((f[a+4>>2]|0)==(i|0)){j=1;u=b;return j|0}a=0;g=i;while(1){f[d>>2]=f[g+(a<<2)>>2];f[c>>2]=f[d>>2];a=a+1|0;if(!(Tb(e,c)|0)){j=0;k=10;break}i=f[h>>2]|0;g=f[i>>2]|0;if(a>>>0>=(f[i+4>>2]|0)-g>>2>>>0){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}return 0}function mg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;h=a+12|0;i=a+4|0;j=f[i>>2]|0;if((j|0)==(f[a+8>>2]|0)){Ci(a,h);k=f[i>>2]|0}else{f[j>>2]=f[h>>2];l=j+4|0;f[i>>2]=l;k=l}l=f[a>>2]|0;f[g>>2]=k-l;k=b+16|0;j=k;m=f[j+4>>2]|0;if(!((m|0)>0|(m|0)==0&(f[j>>2]|0)>>>0>0)){f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;j=f[a>>2]|0;m=f[g>>2]|0;g=k;k=f[g+4>>2]|0;if((k|0)>0|(k|0)==0&(f[g>>2]|0)>>>0>0){n=j;o=e}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,j,j+m|0)|0;n=f[a>>2]|0;o=e}}else{n=l;o=e}e=f[i>>2]|0;if((e|0)==(n|0)){f[h>>2]=0;p=a+16|0;f[p>>2]=0;u=c;return}f[i>>2]=e+(~((e+-4-n|0)>>>2)<<2);f[h>>2]=0;p=a+16|0;f[p>>2]=0;u=c;return}function ng(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(d-g>>2>>>0>=b>>>0){hj(g|0,0,b<<2|0)|0;f[e>>2]=g+(b<<2);return}i=f[a>>2]|0;j=g-i>>2;g=j+b|0;k=i;if(g>>>0>1073741823)mq(a);l=d-i|0;d=l>>1;m=l>>2>>>0<536870911?(d>>>0>>0?g:d):1073741823;do if(m)if(m>>>0>1073741823){d=ra(8)|0;Wo(d,14941);f[d>>2]=6944;va(d|0,1080,114)}else{n=dn(m<<2)|0;break}else n=0;while(0);d=n+(j<<2)|0;hj(d|0,0,b<<2|0)|0;b=d;j=n+(m<<2)|0;m=n+(g<<2)|0;if((h|0)==(k|0)){o=b;p=i;q=h}else{i=h;h=b;b=d;do{i=i+-4|0;d=f[i>>2]|0;f[i>>2]=0;f[b+-4>>2]=d;b=h+-4|0;h=b}while((i|0)!=(k|0));o=h;p=f[a>>2]|0;q=f[e>>2]|0}f[a>>2]=o;f[e>>2]=m;f[c>>2]=j;j=p;if((q|0)!=(j|0)){c=q;do{c=c+-4|0;q=f[c>>2]|0;f[c>>2]=0;if(q|0)Va[f[(f[q>>2]|0)+4>>2]&127](q)}while((c|0)!=(j|0))}if(!p)return;br(p);return}function og(a){a=a|0;lk(a);lk(a+32|0);lk(a+64|0);lk(a+96|0);lk(a+128|0);lk(a+160|0);lk(a+192|0);lk(a+224|0);lk(a+256|0);lk(a+288|0);lk(a+320|0);lk(a+352|0);lk(a+384|0);lk(a+416|0);lk(a+448|0);lk(a+480|0);lk(a+512|0);lk(a+544|0);lk(a+576|0);lk(a+608|0);lk(a+640|0);lk(a+672|0);lk(a+704|0);lk(a+736|0);lk(a+768|0);lk(a+800|0);lk(a+832|0);lk(a+864|0);lk(a+896|0);lk(a+928|0);lk(a+960|0);lk(a+992|0);lk(a+1024|0);return}function pg(a,c,d,e,g,h){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=$(h);var i=0,j=0,k=0,l=0,m=0,n=0;i=u;u=u+16|0;j=i;k=i+4|0;f[j>>2]=c;c=a+4|0;a=dn(32)|0;f[k>>2]=a;f[k+8>>2]=-2147483616;f[k+4>>2]=17;l=a;m=12932;n=l+17|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[a+17>>0]=0;Nj(wd(c,j)|0,k,d);if((b[k+11>>0]|0)<0)br(f[k>>2]|0);d=dn(32)|0;f[k>>2]=d;f[k+8>>2]=-2147483616;f[k+4>>2]=19;l=d;m=13005;n=l+19|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[d+19>>0]=0;ci(wd(c,j)|0,k,g,e);if((b[k+11>>0]|0)<0)br(f[k>>2]|0);e=dn(32)|0;f[k>>2]=e;f[k+8>>2]=-2147483616;f[k+4>>2]=18;l=e;m=13025;n=l+18|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[e+18>>0]=0;Lj(wd(c,j)|0,k,h);if((b[k+11>>0]|0)>=0){u=i;return}br(f[k>>2]|0);u=i;return}function qg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=c;e=b;g=d-e|0;h=g>>2;i=a+8|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(h>>>0<=j-k>>2>>>0){m=a+4|0;n=(f[m>>2]|0)-k>>2;o=h>>>0>n>>>0;p=o?b+(n<<2)|0:c;c=p;n=c-e|0;e=n>>2;if(e|0)Xl(k|0,b|0,n|0)|0;n=l+(e<<2)|0;if(o){o=d-c|0;if((o|0)<=0)return;Rg(f[m>>2]|0,p|0,o|0)|0;f[m>>2]=(f[m>>2]|0)+(o>>>2<<2);return}else{o=f[m>>2]|0;if((o|0)==(n|0))return;f[m>>2]=o+(~((o+-4-n|0)>>>2)<<2);return}}n=k;if(!k)q=j;else{j=a+4|0;o=f[j>>2]|0;if((o|0)!=(l|0))f[j>>2]=o+(~((o+-4-k|0)>>>2)<<2);br(n);f[i>>2]=0;f[j>>2]=0;f[a>>2]=0;q=0}if(h>>>0>1073741823)mq(a);j=q>>1;n=q>>2>>>0<536870911?(j>>>0>>0?h:j):1073741823;if(n>>>0>1073741823)mq(a);j=dn(n<<2)|0;h=a+4|0;f[h>>2]=j;f[a>>2]=j;f[i>>2]=j+(n<<2);if((g|0)<=0)return;Rg(j|0,b|0,g|0)|0;f[h>>2]=j+(g>>>2<<2);return}function rg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0.0,r=0.0,s=0.0,t=0,v=0.0;e=u;u=u+16|0;g=e;h=c+1|0;f[g>>2]=0;i=g+4|0;f[i>>2]=0;f[g+8>>2]=0;do if(h)if(h>>>0>1073741823)mq(g);else{j=dn(h<<2)|0;f[g>>2]=j;k=j+(h<<2)|0;f[g+8>>2]=k;hj(j|0,0,(c<<2)+4|0)|0;f[i>>2]=k;l=j;m=k;n=j;break}else{l=0;m=0;n=0}while(0);if((b|0)>0){g=0;do{j=l+(f[a+(g<<2)>>2]<<2)|0;f[j>>2]=(f[j>>2]|0)+1;g=g+1|0}while((g|0)!=(b|0))}o=+(b|0);if((c|0)<0){p=0;q=0.0}else{c=0;r=0.0;b=0;while(1){g=f[l+(b<<2)>>2]|0;s=+(g|0);if((g|0)>0){t=c+1|0;v=r+ +Fg(s/o)*s}else{t=c;v=r}b=b+1|0;if((b|0)==(h|0)){p=t;q=v;break}else{c=t;r=v}}}if(d|0)f[d>>2]=p;v=-q;p=~~v>>>0;d=+K(v)>=1.0?(v>0.0?~~+Y(+J(v/4294967296.0),4294967295.0)>>>0:~~+W((v-+(~~v>>>0))/4294967296.0)>>>0):0;if(!l){I=d;u=e;return p|0}if((m|0)!=(l|0))f[i>>2]=m+(~((m+-4-l|0)>>>2)<<2);br(n);I=d;u=e;return p|0}function sg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=a+12|0;h=f[g>>2]|0;$j(f[a+4>>2]|0,(f[h+28>>2]|0)-(f[h+24>>2]|0)>>2);h=a+76|0;a=f[h>>2]|0;if(!a){i=f[g>>2]|0;g=(f[i+4>>2]|0)-(f[i>>2]|0)>>2;i=(g>>>0)/3|0;if(g>>>0<=2){j=1;u=b;return j|0}g=0;while(1){f[d>>2]=g*3;f[c>>2]=f[d>>2];g=g+1|0;if(!(Wb(e,c)|0)){j=0;k=10;break}if((g|0)>=(i|0)){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}else{i=f[a>>2]|0;if((f[a+4>>2]|0)==(i|0)){j=1;u=b;return j|0}a=0;g=i;while(1){f[d>>2]=f[g+(a<<2)>>2];f[c>>2]=f[d>>2];a=a+1|0;if(!(Wb(e,c)|0)){j=0;k=10;break}i=f[h>>2]|0;g=f[i>>2]|0;if(a>>>0>=(f[i+4>>2]|0)-g>>2>>>0){j=1;k=10;break}}if((k|0)==10){u=b;return j|0}}return 0}function tg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=u;u=u+16|0;g=e+4|0;h=e;i=dn(32)|0;f[a>>2]=i;f[a+4>>2]=c+4;c=a+8|0;b[c>>0]=0;f[i+16>>2]=f[d>>2];a=i+20|0;f[i+24>>2]=0;f[i+28>>2]=0;j=i+24|0;f[a>>2]=j;i=f[d+4>>2]|0;k=d+8|0;if((i|0)==(k|0)){b[c>>0]=1;u=e;return}d=j;j=i;while(1){i=j+16|0;f[h>>2]=d;f[g>>2]=f[h>>2];Wg(a,g,i,i)|0;i=f[j+4>>2]|0;if(!i){l=j+8|0;m=f[l>>2]|0;if((f[m>>2]|0)==(j|0))n=m;else{m=l;do{l=f[m>>2]|0;m=l+8|0;o=f[m>>2]|0}while((f[o>>2]|0)!=(l|0));n=o}}else{m=i;while(1){o=f[m>>2]|0;if(!o)break;else m=o}n=m}if((n|0)==(k|0))break;else j=n}b[c>>0]=1;u=e;return}function ug(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d;f[e>>2]=b;g=a+8|0;if(((f[a+12>>2]|0)-(f[g>>2]|0)>>2|0)<=(b|0))jh(g,b+1|0);h=f[(f[c>>2]|0)+56>>2]|0;do if((h|0)<5){i=a+20+(h*12|0)+4|0;j=f[i>>2]|0;if((j|0)==(f[a+20+(h*12|0)+8>>2]|0)){Ci(a+20+(h*12|0)|0,e);break}else{f[j>>2]=b;f[i>>2]=j+4;break}}while(0);b=f[c>>2]|0;h=f[e>>2]|0;f[b+60>>2]=h;e=(f[g>>2]|0)+(h<<2)|0;f[c>>2]=0;c=f[e>>2]|0;f[e>>2]=b;if(!c){u=d;return}b=c+88|0;e=f[b>>2]|0;f[b>>2]=0;if(e|0){b=f[e+8>>2]|0;if(b|0){h=e+12|0;if((f[h>>2]|0)!=(b|0))f[h>>2]=b;br(b)}br(e)}e=f[c+68>>2]|0;if(e|0){b=c+72|0;h=f[b>>2]|0;if((h|0)!=(e|0))f[b>>2]=h+(~((h+-4-e|0)>>>2)<<2);br(e)}e=c+64|0;h=f[e>>2]|0;f[e>>2]=0;if(h|0){e=f[h>>2]|0;if(e|0){b=h+4|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;br(e)}br(h)}br(c);u=d;return}function vg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;d=u;u=u+48|0;e=d+16|0;g=d;h=d+32|0;i=a+28|0;j=f[i>>2]|0;f[h>>2]=j;k=a+20|0;l=(f[k>>2]|0)-j|0;f[h+4>>2]=l;f[h+8>>2]=b;f[h+12>>2]=c;b=l+c|0;l=a+60|0;f[g>>2]=f[l>>2];f[g+4>>2]=h;f[g+8>>2]=2;j=ro(Aa(146,g|0)|0)|0;a:do if((b|0)!=(j|0)){g=2;m=b;n=h;o=j;while(1){if((o|0)<0)break;m=m-o|0;p=f[n+4>>2]|0;q=o>>>0>p>>>0;r=q?n+8|0:n;s=g+(q<<31>>31)|0;t=o-(q?p:0)|0;f[r>>2]=(f[r>>2]|0)+t;p=r+4|0;f[p>>2]=(f[p>>2]|0)-t;f[e>>2]=f[l>>2];f[e+4>>2]=r;f[e+8>>2]=s;o=ro(Aa(146,e|0)|0)|0;if((m|0)==(o|0)){v=3;break a}else{g=s;n=r}}f[a+16>>2]=0;f[i>>2]=0;f[k>>2]=0;f[a>>2]=f[a>>2]|32;if((g|0)==2)w=0;else w=c-(f[n+4>>2]|0)|0}else v=3;while(0);if((v|0)==3){v=f[a+44>>2]|0;f[a+16>>2]=v+(f[a+48>>2]|0);a=v;f[i>>2]=a;f[k>>2]=a;w=c}u=d;return w|0}function wg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=5880;b=f[a+68>>2]|0;if(b|0){c=a+72|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+56>>2]|0;if(b|0){d=a+60|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+44>>2]|0;if(b|0){c=a+48|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+32>>2]|0;if(b|0){d=a+36|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+20>>2]|0;if(b|0){c=a+24|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}Sh(a+8|0);b=a+4|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;b=a+40|0;d=f[b>>2]|0;if(d|0){c=a+44|0;e=f[c>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[c>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0){Qi(i);br(i)}h=f[c>>2]|0}while((h|0)!=(d|0));g=f[b>>2]|0}br(g)}Qi(a);br(a);return}function xg(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a+12|0;d=f[a>>2]|0;e=a+8|0;g=f[e>>2]|0;h=(g|0)==-1;if(!(b[c>>0]|0)){do if(((!h?(i=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(i|0)!=-1):0)?(f[(f[d>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)==0:0)?(j=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(i<<2)>>2]|0,(j|0)!=-1):0)if(!((j>>>0)%3|0)){k=j+2|0;break}else{k=j+-1|0;break}else k=-1;while(0);f[e>>2]=k;return}k=g+1|0;if(((!h?(h=((k>>>0)%3|0|0)==0?g+-2|0:k,(h|0)!=-1):0)?(f[(f[d>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)|0)==0:0)?(k=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(h<<2)>>2]|0,h=k+1|0,(k|0)!=-1):0){g=((h>>>0)%3|0|0)==0?k+-2|0:h;f[e>>2]=g;if((g|0)!=-1){if((g|0)!=(f[a+4>>2]|0))return;f[e>>2]=-1;return}}else f[e>>2]=-1;g=f[a+4>>2]|0;do if((((g|0)!=-1?(a=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(a|0)!=-1):0)?(f[(f[d>>2]|0)+(a>>>5<<2)>>2]&1<<(a&31)|0)==0:0)?(h=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(a<<2)>>2]|0,(h|0)!=-1):0)if(!((h>>>0)%3|0)){l=h+2|0;break}else{l=h+-1|0;break}else l=-1;while(0);f[e>>2]=l;b[c>>0]=0;return}function yg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d>>2;g=e+1|0;if(g>>>0>1073741823)mq(a);h=a+8|0;i=(f[h>>2]|0)-d|0;d=i>>1;j=i>>2>>>0<536870911?(d>>>0>>0?g:d):1073741823;do if(j)if(j>>>0>1073741823){d=ra(8)|0;Wo(d,14941);f[d>>2]=6944;va(d|0,1080,114)}else{k=dn(j<<2)|0;break}else k=0;while(0);d=k+(e<<2)|0;e=d;g=k+(j<<2)|0;j=f[b>>2]|0;f[b>>2]=0;f[d>>2]=j;j=d+4|0;b=f[a>>2]|0;k=f[c>>2]|0;if((k|0)==(b|0)){l=e;m=b;n=b}else{i=k;k=e;e=d;do{i=i+-4|0;d=f[i>>2]|0;f[i>>2]=0;f[e+-4>>2]=d;e=k+-4|0;k=e}while((i|0)!=(b|0));l=k;m=f[a>>2]|0;n=f[c>>2]|0}f[a>>2]=l;f[c>>2]=j;f[h>>2]=g;g=m;if((n|0)!=(g|0)){h=n;do{h=h+-4|0;n=f[h>>2]|0;f[h>>2]=0;if(n|0)Va[f[(f[n>>2]|0)+4>>2]&127](n)}while((h|0)!=(g|0))}if(!m)return;br(m);return}function zg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+4|0;a=f[d>>2]|0;do if(a|0){e=b[c+11>>0]|0;g=e<<24>>24<0;h=g?f[c+4>>2]|0:e&255;e=g?f[c>>2]|0:c;g=d;i=a;a:while(1){j=i;while(1){k=j+16|0;l=b[k+11>>0]|0;m=l<<24>>24<0;n=m?f[j+20>>2]|0:l&255;l=h>>>0>>0?h:n;if((l|0)!=0?(o=Pk(m?f[k>>2]|0:k,e,l)|0,(o|0)!=0):0){if((o|0)>=0)break}else p=6;if((p|0)==6?(p=0,n>>>0>=h>>>0):0)break;n=f[j+4>>2]|0;if(!n){q=g;break a}else j=n}i=f[j>>2]|0;if(!i){q=j;break}else g=j}if((q|0)!=(d|0)){g=q+16|0;i=b[g+11>>0]|0;n=i<<24>>24<0;o=n?f[q+20>>2]|0:i&255;i=o>>>0>>0?o:h;if(i|0?(l=Pk(e,n?f[g>>2]|0:g,i)|0,l|0):0){if((l|0)<0)break;else r=q;return r|0}if(h>>>0>=o>>>0){r=q;return r|0}}}while(0);r=d;return r|0}function Ag(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;if(((e-h|0)/12|0)>>>0>=b>>>0){i=b;j=h;do{f[j>>2]=f[c>>2];f[j+4>>2]=f[c+4>>2];f[j+8>>2]=f[c+8>>2];j=(f[g>>2]|0)+12|0;f[g>>2]=j;i=i+-1|0}while((i|0)!=0);return}i=f[a>>2]|0;j=(h-i|0)/12|0;h=j+b|0;if(h>>>0>357913941)mq(a);k=(e-i|0)/12|0;i=k<<1;e=k>>>0<178956970?(i>>>0>>0?h:i):357913941;do if(e)if(e>>>0>357913941){i=ra(8)|0;Wo(i,14941);f[i>>2]=6944;va(i|0,1080,114)}else{l=dn(e*12|0)|0;break}else l=0;while(0);i=l+(j*12|0)|0;j=l+(e*12|0)|0;e=b;b=i;l=i;do{f[b>>2]=f[c>>2];f[b+4>>2]=f[c+4>>2];f[b+8>>2]=f[c+8>>2];b=l+12|0;l=b;e=e+-1|0}while((e|0)!=0);e=f[a>>2]|0;b=(f[g>>2]|0)-e|0;c=i+(((b|0)/-12|0)*12|0)|0;if((b|0)>0)Rg(c|0,e|0,b|0)|0;f[a>>2]=c;f[g>>2]=l;f[d>>2]=j;if(!e)return;br(e);return}function Bg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d>>2;g=e+1|0;if(g>>>0>1073741823)mq(a);h=a+8|0;i=(f[h>>2]|0)-d|0;d=i>>1;j=i>>2>>>0<536870911?(d>>>0>>0?g:d):1073741823;do if(j)if(j>>>0>1073741823){d=ra(8)|0;Wo(d,14941);f[d>>2]=6944;va(d|0,1080,114)}else{k=dn(j<<2)|0;break}else k=0;while(0);d=k+(e<<2)|0;e=d;g=k+(j<<2)|0;j=f[b>>2]|0;f[b>>2]=0;f[d>>2]=j;j=d+4|0;b=f[a>>2]|0;k=f[c>>2]|0;if((k|0)==(b|0)){l=e;m=b;n=b}else{i=k;k=e;e=d;do{i=i+-4|0;d=f[i>>2]|0;f[i>>2]=0;f[e+-4>>2]=d;e=k+-4|0;k=e}while((i|0)!=(b|0));l=k;m=f[a>>2]|0;n=f[c>>2]|0}f[a>>2]=l;f[c>>2]=j;f[h>>2]=g;g=m;if((n|0)!=(g|0)){h=n;do{h=h+-4|0;n=f[h>>2]|0;f[h>>2]=0;if(n|0){Qi(n);br(n)}}while((h|0)!=(g|0))}if(!m)return;br(m);return}function Cg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=f[b>>2]|0;g=f[a>>2]|0;h=f[d>>2]|0;d=f[h>>2]|0;i=(f[h+4>>2]|0)-d>>3;if(i>>>0<=e>>>0)mq(h);j=d;if(i>>>0<=g>>>0)mq(h);d=f[j+(e<<3)>>2]|0;k=f[c>>2]|0;if(i>>>0<=k>>>0)mq(h);l=j+(g<<3)|0;m=(f[j+(k<<3)>>2]|0)>>>0>>0;if(d>>>0<(f[l>>2]|0)>>>0){if(m){f[a>>2]=k;f[c>>2]=g;n=1;return n|0}f[a>>2]=e;f[b>>2]=g;d=f[c>>2]|0;if(i>>>0<=d>>>0)mq(h);if((f[j+(d<<3)>>2]|0)>>>0>=(f[l>>2]|0)>>>0){n=1;return n|0}f[b>>2]=d;f[c>>2]=g;n=2;return n|0}if(!m){n=0;return n|0}f[b>>2]=k;f[c>>2]=e;e=f[b>>2]|0;c=f[a>>2]|0;if(i>>>0<=e>>>0)mq(h);if(i>>>0<=c>>>0)mq(h);if((f[j+(e<<3)>>2]|0)>>>0>=(f[j+(c<<3)>>2]|0)>>>0){n=1;return n|0}f[a>>2]=e;f[b>>2]=c;n=2;return n|0}function Dg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0;e=u;u=u+96|0;g=e+40|0;h=e;Am(g,c);we(h,b,c);th(g,h);sj(h+24|0,f[h+28>>2]|0);Dj(h+12|0,f[h+16>>2]|0);sj(h,f[h+4>>2]|0);Si(a,g,d);f[g>>2]=2968;sj(g+28|0,f[g+32>>2]|0);Dj(g+16|0,f[g+20>>2]|0);sj(g+4|0,f[g+8>>2]|0);u=e;return}function Eg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;a=u;u=u+16|0;e=a;if(!b){g=0;u=a;return g|0}h=b+96|0;i=b+100|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;b=f[i>>2]|0;j=f[h>>2]|0;k=(b-j|0)/12|0;l=j;j=b;if(k>>>0>=c>>>0){if(k>>>0>c>>>0?(b=l+(c*12|0)|0,(b|0)!=(j|0)):0)f[i>>2]=j+(~(((j+-12-b|0)>>>0)/12|0)*12|0);if(!c){g=1;u=a;return g|0}}else Ag(h,c-k|0,e);k=0;b=f[h>>2]|0;while(1){j=k*3|0;l=f[d+(j<<2)>>2]|0;m=f[d+(j+1<<2)>>2]|0;n=f[d+(j+2<<2)>>2]|0;j=((f[i>>2]|0)-b|0)/12|0;o=k;k=k+1|0;if(o>>>0>>0){p=b;q=b}else{f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;Ag(h,k-j|0,e);j=f[h>>2]|0;p=j;q=j}f[p+(o*12|0)>>2]=l;f[p+(o*12|0)+4>>2]=m;f[p+(o*12|0)+8>>2]=n;if((k|0)==(c|0)){g=1;break}else b=q}u=a;return g|0}function Fg(a){a=+a;var b=0,c=0,d=0,e=0.0,g=0,h=0,i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,q=0.0,r=0.0,t=0.0;p[s>>3]=a;b=f[s>>2]|0;c=f[s+4>>2]|0;d=(c|0)<0;do if(d|c>>>0<1048576){if((b|0)==0&(c&2147483647|0)==0){e=-1.0/(a*a);break}if(d){e=(a-a)/0.0;break}else{p[s>>3]=a*18014398509481984.0;g=f[s+4>>2]|0;h=-1077;i=g;j=f[s>>2]|0;k=g;l=9;break}}else if(c>>>0<=2146435071)if((b|0)==0&0==0&(c|0)==1072693248)e=0.0;else{h=-1023;i=c;j=b;k=c;l=9}else e=a;while(0);if((l|0)==9){l=i+614242|0;f[s>>2]=j;f[s+4>>2]=(l&1048575)+1072079006;a=+p[s>>3]+-1.0;m=a*a*.5;n=a/(a+2.0);o=n*n;q=o*o;p[s>>3]=a-m;j=f[s+4>>2]|0;f[s>>2]=0;f[s+4>>2]=j;r=+p[s>>3];t=a-r-m+n*(m+(q*(q*(q*.15313837699209373+.22222198432149784)+.3999999999940942)+o*(q*(q*(q*.14798198605116586+.1818357216161805)+.2857142874366239)+.6666666666666735)));q=r*1.4426950407214463;o=+(h+(l>>>20)|0);m=q+o;e=m+(q+(o-m)+(t*1.4426950407214463+(t+r)*1.6751713164886512e-10))}return +e}function Gg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=u;u=u+16|0;e=d;g=dn(32)|0;f[e>>2]=g;f[e+8>>2]=-2147483616;f[e+4>>2]=17;h=g;i=12804;j=h+17|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[g+17>>0]=0;g=c+16|0;i=f[g>>2]|0;if(i){h=g;j=i;a:while(1){i=j;while(1){if((f[i+16>>2]|0)>=(a|0))break;k=f[i+4>>2]|0;if(!k){l=h;break a}else i=k}j=f[i>>2]|0;if(!j){l=i;break}else h=i}if(((l|0)!=(g|0)?(f[l+16>>2]|0)<=(a|0):0)?(a=l+20|0,(sh(a,e)|0)!=0):0)m=a;else n=10}else n=10;if((n|0)==10)m=c;c=yk(m,e,-1)|0;if((b[e+11>>0]|0)>=0){o=(c|0)==-1;p=c>>>0>6;q=p?-2:c;r=o?-1:q;u=d;return r|0}br(f[e>>2]|0);o=(c|0)==-1;p=c>>>0>6;q=p?-2:c;r=o?-1:q;u=d;return r|0}function Hg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;d=u;u=u+16|0;e=d;g=f[c>>2]|0;f[c>>2]=0;f[e>>2]=g;ug(a,b,e);g=f[e>>2]|0;f[e>>2]=0;if(g|0){e=g+88|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0){e=f[c+8>>2]|0;if(e|0){h=c+12|0;if((f[h>>2]|0)!=(e|0))f[h>>2]=e;br(e)}br(c)}c=f[g+68>>2]|0;if(c|0){e=g+72|0;h=f[e>>2]|0;if((h|0)!=(c|0))f[e>>2]=h+(~((h+-4-c|0)>>>2)<<2);br(c)}c=g+64|0;h=f[c>>2]|0;f[c>>2]=0;if(h|0){c=f[h>>2]|0;if(c|0){e=h+4|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;br(c)}br(h)}br(g)}g=a+84|0;h=a+88|0;a=f[h>>2]|0;c=f[g>>2]|0;e=a-c>>2;if((e|0)>(b|0)){u=d;return}i=b+1|0;b=a;if(i>>>0>e>>>0){nh(g,i-e|0);u=d;return}if(i>>>0>=e>>>0){u=d;return}e=c+(i<<2)|0;if((e|0)==(b|0)){u=d;return}f[h>>2]=b+(~((b+-4-e|0)>>>2)<<2);u=d;return}function Ig(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;g=a+4|0;f[g>>2]=c;f[a+8>>2]=f[c+56>>2];h=f[a+184>>2]|0;i=a+188|0;j=f[i>>2]|0;if((j|0)!=(h|0))f[i>>2]=j+(~((j+-4-h|0)>>>2)<<2);h=f[c+48>>2]|0;c=dn(32)|0;f[e>>2]=c;f[e+8>>2]=-2147483616;f[e+4>>2]=19;j=c;i=14285;k=j+19|0;do{b[j>>0]=b[i>>0]|0;j=j+1|0;i=i+1|0}while((j|0)<(k|0));b[c+19>>0]=0;c=(sh(h,e)|0)==0;if((b[e+11>>0]|0)<0)br(f[e>>2]|0);h=f[(f[g>>2]|0)+48>>2]|0;if(c){c=(Yh(h)|0)>5&1;b[a+352>>0]=c;u=d;return 1}c=dn(32)|0;f[e>>2]=c;f[e+8>>2]=-2147483616;f[e+4>>2]=19;j=c;i=14285;k=j+19|0;do{b[j>>0]=b[i>>0]|0;j=j+1|0;i=i+1|0}while((j|0)<(k|0));b[c+19>>0]=0;c=(Oj(h,e,0)|0)&1;b[a+352>>0]=c;if((b[e+11>>0]|0)<0)br(f[e>>2]|0);u=d;return 1}function Jg(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0;c=a+108|0;d=(f[a+112>>2]|0)-(f[c>>2]|0)|0;e=(d|0)/12|0;g=a+4|0;Nh(e,f[(f[g>>2]|0)+44>>2]|0)|0;if(!d)return 1;d=0;a=0;while(1){i=f[c>>2]|0;j=i+(d*12|0)+4|0;Nh((f[j>>2]|0)-a|0,f[(f[g>>2]|0)+44>>2]|0)|0;Nh((f[j>>2]|0)-(f[i+(d*12|0)>>2]|0)|0,f[(f[g>>2]|0)+44>>2]|0)|0;d=d+1|0;if(d>>>0>=e>>>0)break;else a=f[j>>2]|0}li(f[(f[g>>2]|0)+44>>2]|0,e,0,0)|0;a=0;do{d=f[(f[g>>2]|0)+44>>2]|0;j=d+16|0;i=f[j+4>>2]|0;if((i|0)>0|(i|0)==0&(f[j>>2]|0)>>>0>0){j=f[d+12>>2]|0;d=j+4|0;i=f[d>>2]|0;k=b[(f[c>>2]|0)+(a*12|0)+8>>0]&1;l=i>>>3;m=i&7;i=(f[j>>2]|0)+l|0;b[i>>0]=(1<>0]|0);i=(f[j>>2]|0)+l|0;b[i>>0]=k<>0]|0);f[d>>2]=(f[d>>2]|0)+1}a=a+1|0}while(a>>>0>>0);Qf(f[(f[g>>2]|0)+44>>2]|0);return 1}function Kg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;g=a+4|0;f[g>>2]=c;f[a+8>>2]=f[c+56>>2];h=f[a+184>>2]|0;i=a+188|0;j=f[i>>2]|0;if((j|0)!=(h|0))f[i>>2]=j+(~((j+-4-h|0)>>>2)<<2);h=f[c+48>>2]|0;c=dn(32)|0;f[e>>2]=c;f[e+8>>2]=-2147483616;f[e+4>>2]=19;j=c;i=14285;k=j+19|0;do{b[j>>0]=b[i>>0]|0;j=j+1|0;i=i+1|0}while((j|0)<(k|0));b[c+19>>0]=0;c=(sh(h,e)|0)==0;if((b[e+11>>0]|0)<0)br(f[e>>2]|0);h=f[(f[g>>2]|0)+48>>2]|0;if(c){c=(Yh(h)|0)>5&1;b[a+288>>0]=c;u=d;return 1}c=dn(32)|0;f[e>>2]=c;f[e+8>>2]=-2147483616;f[e+4>>2]=19;j=c;i=14285;k=j+19|0;do{b[j>>0]=b[i>>0]|0;j=j+1|0;i=i+1|0}while((j|0)<(k|0));b[c+19>>0]=0;c=(Oj(h,e,0)|0)&1;b[a+288>>0]=c;if((b[e+11>>0]|0)<0)br(f[e>>2]|0);u=d;return 1}function Lg(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=u;u=u+32|0;h=g+16|0;i=g+8|0;j=g;k=d-e|0;d=a+8|0;if((k|0)>0){a=0-e|0;l=i+4|0;m=j+4|0;n=h+4|0;o=k;do{k=b+(o<<2)|0;p=k+(a<<2)|0;q=c+(o<<2)|0;r=f[k+4>>2]|0;s=f[p>>2]|0;t=f[p+4>>2]|0;f[i>>2]=f[k>>2];f[l>>2]=r;f[j>>2]=s;f[m>>2]=t;Dd(h,d,i,j);f[q>>2]=f[h>>2];f[q+4>>2]=f[n>>2];o=o-e|0}while((o|0)>0)}o=e>>>0>1073741823?-1:e<<2;e=_q(o)|0;hj(e|0,0,o|0)|0;o=f[b+4>>2]|0;n=f[e>>2]|0;m=f[e+4>>2]|0;f[i>>2]=f[b>>2];f[i+4>>2]=o;f[j>>2]=n;f[j+4>>2]=m;Dd(h,d,i,j);f[c>>2]=f[h>>2];f[c+4>>2]=f[h+4>>2];$q(e);u=g;return 1}function Mg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+32|0;d=c+12|0;e=c;g=f[b+100>>2]|0;h=f[b+96>>2]|0;b=g-h|0;i=(b|0)/12|0;f[d>>2]=0;j=d+4|0;f[j>>2]=0;f[d+8>>2]=0;k=h;do if(b)if(i>>>0>357913941)mq(d);else{l=dn(b)|0;f[d>>2]=l;f[d+8>>2]=l+(i*12|0);hj(l|0,0,b|0)|0;f[j>>2]=l+b;m=l;break}else m=0;while(0);f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;if((g|0)!=(h|0)){h=e+4|0;g=e+8|0;b=0;do{l=k+(b*12|0)|0;f[e>>2]=f[l>>2];f[e+4>>2]=f[l+4>>2];f[e+8>>2]=f[l+8>>2];f[m+(b*12|0)>>2]=f[e>>2];f[m+(b*12|0)+4>>2]=f[h>>2];f[m+(b*12|0)+8>>2]=f[g>>2];b=b+1|0}while(b>>>0>>0)}Cj(a,d);a=f[d>>2]|0;if(!a){u=c;return}d=f[j>>2]|0;if((d|0)!=(a|0))f[j>>2]=d+(~(((d+-12-a|0)>>>0)/12|0)*12|0);br(a);u=c;return}function Ng(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;if(c>>>0>4294967279)mq(a);d=a+11|0;e=b[d>>0]|0;g=e<<24>>24<0;if(g){h=f[a+4>>2]|0;i=(f[a+8>>2]&2147483647)+-1|0}else{h=e&255;i=10}j=h>>>0>c>>>0?h:c;c=j>>>0<11;k=c?10:(j+16&-16)+-1|0;do if((k|0)!=(i|0)){do if(c){j=f[a>>2]|0;if(g){l=0;m=j;n=a;o=13}else{Lo(a,j,(e&255)+1|0)|0;br(j);o=16}}else{j=k+1|0;p=dn(j)|0;if(g){l=1;m=f[a>>2]|0;n=p;o=13;break}else{Lo(p,a,(e&255)+1|0)|0;q=p;r=j;s=a+4|0;o=15;break}}while(0);if((o|0)==13){j=a+4|0;Lo(n,m,(f[j>>2]|0)+1|0)|0;br(m);if(l){q=n;r=k+1|0;s=j;o=15}else o=16}if((o|0)==15){f[a+8>>2]=r|-2147483648;f[s>>2]=h;f[a>>2]=q;break}else if((o|0)==16){b[d>>0]=h;break}}while(0);return}function Og(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=f[b>>2]|0;if((c|0)==-1){d=-1;return d|0}b=f[(f[a+24>>2]|0)+(c<<2)>>2]|0;if((b|0)==-1){d=0;return d|0}c=a+12|0;a=0;e=0;g=b;a:while(1){b:do if(e){h=a+1|0;i=(((g>>>0)%3|0|0)==0?2:-1)+g|0;if((i|0)==-1){d=h;j=15;break a}k=f[(f[c>>2]|0)+(i<<2)>>2]|0;if((k|0)==-1){d=h;j=15;break a}if(!((k>>>0)%3|0)){l=k+2|0;m=h;break}else{l=k+-1|0;m=h;break}}else{h=a;k=g;while(1){i=h+1|0;n=k+1|0;o=((n>>>0)%3|0|0)==0?k+-2|0:n;if((o|0)==-1){l=b;m=i;break b}n=f[(f[c>>2]|0)+(o<<2)>>2]|0;o=n+1|0;if((n|0)==-1){l=b;m=i;break b}k=((o>>>0)%3|0|0)==0?n+-2|0:o;if((k|0)==-1){l=b;m=i;break b}if((k|0)==(b|0)){d=i;j=15;break a}else h=i}}while(0);if((l|0)==-1){d=m;j=15;break}else{a=m;e=1;g=l}}if((j|0)==15)return d|0;return 0}function Pg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=a+8|0;Cg(a,a+4|0,d,c)|0;e=a+12|0;if((e|0)==(b|0))return;g=f[c>>2]|0;c=f[g>>2]|0;h=(f[g+4>>2]|0)-c>>3;i=c;c=e;e=d;a:while(1){d=f[c>>2]|0;j=f[e>>2]|0;if(h>>>0<=d>>>0){k=5;break}if(h>>>0<=j>>>0){k=7;break}l=i+(d<<3)|0;if((f[l>>2]|0)>>>0<(f[i+(j<<3)>>2]|0)>>>0){m=e;n=c;o=j;while(1){f[n>>2]=o;if((m|0)==(a|0)){p=a;break}j=m+-4|0;o=f[j>>2]|0;if(h>>>0<=o>>>0){k=11;break a}if((f[l>>2]|0)>>>0>=(f[i+(o<<3)>>2]|0)>>>0){p=m;break}else{q=m;m=j;n=q}}f[p>>2]=d}n=c+4|0;if((n|0)==(b|0)){k=3;break}else{m=c;c=n;e=m}}if((k|0)==3)return;else if((k|0)==5)mq(g);else if((k|0)==7)mq(g);else if((k|0)==11)mq(g)}function Qg(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=Cg(a,b,c,e)|0;h=f[d>>2]|0;i=f[c>>2]|0;j=f[e>>2]|0;e=f[j>>2]|0;k=(f[j+4>>2]|0)-e>>3;if(k>>>0<=h>>>0)mq(j);l=e;if(k>>>0<=i>>>0)mq(j);if((f[l+(h<<3)>>2]|0)>>>0>=(f[l+(i<<3)>>2]|0)>>>0){m=g;return m|0}f[c>>2]=h;f[d>>2]=i;i=f[c>>2]|0;d=f[b>>2]|0;if(k>>>0<=i>>>0)mq(j);if(k>>>0<=d>>>0)mq(j);if((f[l+(i<<3)>>2]|0)>>>0>=(f[l+(d<<3)>>2]|0)>>>0){m=g+1|0;return m|0}f[b>>2]=i;f[c>>2]=d;d=f[b>>2]|0;c=f[a>>2]|0;if(k>>>0<=d>>>0)mq(j);if(k>>>0<=c>>>0)mq(j);if((f[l+(d<<3)>>2]|0)>>>0>=(f[l+(c<<3)>>2]|0)>>>0){m=g+2|0;return m|0}f[a>>2]=d;f[b>>2]=c;m=g+3|0;return m|0}function Rg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0;if((d|0)>=8192)return Da(a|0,c|0,d|0)|0;e=a|0;g=a+d|0;if((a&3)==(c&3)){while(a&3){if(!d)return e|0;b[a>>0]=b[c>>0]|0;a=a+1|0;c=c+1|0;d=d-1|0}h=g&-4|0;d=h-64|0;while((a|0)<=(d|0)){f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];f[a+12>>2]=f[c+12>>2];f[a+16>>2]=f[c+16>>2];f[a+20>>2]=f[c+20>>2];f[a+24>>2]=f[c+24>>2];f[a+28>>2]=f[c+28>>2];f[a+32>>2]=f[c+32>>2];f[a+36>>2]=f[c+36>>2];f[a+40>>2]=f[c+40>>2];f[a+44>>2]=f[c+44>>2];f[a+48>>2]=f[c+48>>2];f[a+52>>2]=f[c+52>>2];f[a+56>>2]=f[c+56>>2];f[a+60>>2]=f[c+60>>2];a=a+64|0;c=c+64|0}while((a|0)<(h|0)){f[a>>2]=f[c>>2];a=a+4|0;c=c+4|0}}else{h=g-4|0;while((a|0)<(h|0)){b[a>>0]=b[c>>0]|0;b[a+1>>0]=b[c+1>>0]|0;b[a+2>>0]=b[c+2>>0]|0;b[a+3>>0]=b[c+3>>0]|0;a=a+4|0;c=c+4|0}}while((a|0)<(g|0)){b[a>>0]=b[c>>0]|0;a=a+1|0;c=c+1|0}return e|0}function Sg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;c=u;u=u+16|0;d=c+4|0;e=c;f[a>>2]=1216;g=a+4|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;f[g+16>>2]=0;f[g+20>>2]=0;f[g+24>>2]=0;f[g+28>>2]=0;f[d>>2]=b;b=a+4|0;g=a+8|0;Ci(b,d);h=f[d>>2]|0;i=a+20|0;j=f[i>>2]|0;k=a+16|0;a=f[k>>2]|0;l=j-a>>2;m=a;if((h|0)<(l|0)){n=m;o=h;p=f[g>>2]|0;q=f[b>>2]|0;r=p-q|0;s=r>>2;t=s+-1|0;v=n+(o<<2)|0;f[v>>2]=t;u=c;return}a=h+1|0;f[e>>2]=-1;w=j;if(a>>>0<=l>>>0)if(a>>>0>>0?(j=m+(a<<2)|0,(j|0)!=(w|0)):0){f[i>>2]=w+(~((w+-4-j|0)>>>2)<<2);x=h;y=m}else{x=h;y=m}else{kh(k,a-l|0,e);x=f[d>>2]|0;y=f[k>>2]|0}n=y;o=x;p=f[g>>2]|0;q=f[b>>2]|0;r=p-q|0;s=r>>2;t=s+-1|0;v=n+(o<<2)|0;f[v>>2]=t;u=c;return}function Tg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=a+4|0;c=f[b>>2]|0;d=(f[c+12>>2]|0)-(f[c+8>>2]|0)|0;c=d>>2;a:do if((d|0)>0){e=0;while(1){if(!(Ra[f[(f[a>>2]|0)+36>>2]&127](a,e)|0)){g=0;break}e=e+1|0;h=f[b>>2]|0;i=(f[h+12>>2]|0)-(f[h+8>>2]|0)>>2;if((e|0)>=(i|0)){j=i;break a}}return g|0}else j=c;while(0);c=a+20|0;b=a+24|0;d=f[b>>2]|0;e=f[c>>2]|0;i=d-e>>2;h=e;e=d;if(j>>>0<=i>>>0){if(j>>>0>>0?(d=h+(j<<2)|0,(d|0)!=(e|0)):0)f[b>>2]=e+(~((e+-4-d|0)>>>2)<<2)}else oi(c,j-i|0);i=f[a+12>>2]|0;j=f[a+8>>2]|0;a=j;if((i|0)==(j|0)){g=1;return g|0}d=i-j>>2;j=0;do{i=f[a+(j<<2)>>2]|0;e=f[i+8>>2]|0;b=f[i+4>>2]|0;i=b;if((e|0)!=(b|0)?(h=f[c>>2]|0,k=e-b>>2,f[h+(f[i>>2]<<2)>>2]=j,k>>>0>1):0){b=1;do{f[h+(f[i+(b<<2)>>2]<<2)>>2]=j;b=b+1|0}while(b>>>0>>0)}j=j+1|0}while(j>>>0>>0);g=1;return g|0}function Ug(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=f[c+88>>2]|0;if(!d){e=0;return e|0}if((f[d>>2]|0)!=1){e=0;return e|0}g=d+8|0;d=f[g>>2]|0;f[a+4>>2]=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;i=a+8|0;j=c+24|0;c=b[j>>0]|0;k=c<<24>>24;l=a+12|0;m=f[l>>2]|0;n=f[i>>2]|0;o=m-n>>2;p=n;n=m;if(o>>>0>=k>>>0)if(o>>>0>k>>>0?(m=p+(k<<2)|0,(m|0)!=(n|0)):0){f[l>>2]=n+(~((n+-4-m|0)>>>2)<<2);q=c;r=d}else{q=c;r=d}else{oi(i,k-o|0);q=b[j>>0]|0;r=f[g>>2]|0}g=r+4|0;j=h[g>>0]|h[g+1>>0]<<8|h[g+2>>0]<<16|h[g+3>>0]<<24;if(q<<24>>24>0){g=f[i>>2]|0;i=q<<24>>24;q=j;o=4;k=0;while(1){f[g+(k<<2)>>2]=q;o=o+4|0;k=k+1|0;d=r+o|0;c=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;if((k|0)>=(i|0)){s=c;break}else q=c}}else s=j;f[a+20>>2]=s;e=1;return e|0}function Vg(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;do if(!(qp(a,f[c+8>>2]|0,g)|0)){if(!(qp(a,f[c>>2]|0,g)|0)){h=f[a+8>>2]|0;Za[f[(f[h>>2]|0)+24>>2]&3](h,c,d,e,g);break}if((f[c+16>>2]|0)!=(d|0)?(h=c+20|0,(f[h>>2]|0)!=(d|0)):0){f[c+32>>2]=e;i=c+44|0;if((f[i>>2]|0)==4)break;j=c+52|0;b[j>>0]=0;k=c+53|0;b[k>>0]=0;l=f[a+8>>2]|0;_a[f[(f[l>>2]|0)+20>>2]&3](l,c,d,d,1,g);if(b[k>>0]|0)if(!(b[j>>0]|0)){m=3;n=11}else o=3;else{m=4;n=11}if((n|0)==11){f[h>>2]=d;h=c+40|0;f[h>>2]=(f[h>>2]|0)+1;if((f[c+36>>2]|0)==1?(f[c+24>>2]|0)==2:0){b[c+54>>0]=1;o=m}else o=m}f[i>>2]=o;break}if((e|0)==1)f[c+32>>2]=1}else Om(0,c,d,e);while(0);return}function Wg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e+12|0;h=e+8|0;i=e;f[i>>2]=f[b>>2];f[g>>2]=f[i>>2];i=zd(a,g,h,e+4|0,c)|0;c=f[i>>2]|0;if(c|0){j=c;u=e;return j|0}c=dn(40)|0;dj(c+16|0,d);dj(c+28|0,d+12|0);d=f[h>>2]|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=d;f[i>>2]=c;d=f[f[a>>2]>>2]|0;if(!d)k=c;else{f[a>>2]=d;k=f[i>>2]|0}Ae(f[a+4>>2]|0,k);k=a+8|0;f[k>>2]=(f[k>>2]|0)+1;j=c;u=e;return j|0}function Xg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=u;u=u+16|0;g=e;h=a+4|0;f[h>>2]=0;if(!c){u=e;return}i=a+8|0;j=f[i>>2]|0;k=j<<5;if(k>>>0>>0){f[g>>2]=0;l=g+4|0;f[l>>2]=0;m=g+8|0;f[m>>2]=0;if((c|0)<0)mq(a);n=j<<6;j=c+31&-32;hi(g,k>>>0<1073741823?(n>>>0>>0?j:n):2147483647);n=f[a>>2]|0;f[a>>2]=f[g>>2];f[g>>2]=n;g=f[h>>2]|0;f[h>>2]=c;f[l>>2]=g;g=f[i>>2]|0;f[i>>2]=f[m>>2];f[m>>2]=g;if(n|0)br(n);o=a}else{f[h>>2]=c;o=a}a=f[o>>2]|0;o=a;h=a;a=c>>>5;n=a<<2;if(!(b[d>>0]|0)){hj(h|0,0,n|0)|0;d=c&31;g=o+(a<<2)|0;if(!d){u=e;return}f[g>>2]=f[g>>2]&~(-1>>>(32-d|0));u=e;return}else{hj(h|0,-1,n|0)|0;n=c&31;c=o+(a<<2)|0;if(!n){u=e;return}f[c>>2]=f[c>>2]|-1>>>(32-n|0);u=e;return}}function Yg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;f[g>>2]=f[a+12>>2];h=b+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&j>>>0>0){l=k;m=j}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;j=h;l=f[j+4>>2]|0;m=f[j>>2]|0}f[g>>2]=f[a+20>>2];if((l|0)>0|(l|0)==0&m>>>0>0){n=a+88|0;fd(n,b);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;n=a+88|0;fd(n,b);u=c;return 1}function Zg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;f[g>>2]=f[a+12>>2];h=b+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&j>>>0>0){l=k;m=j}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;j=h;l=f[j+4>>2]|0;m=f[j>>2]|0}f[g>>2]=f[a+16>>2];if((l|0)>0|(l|0)==0&m>>>0>0){n=a+108|0;fd(n,b);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;n=a+108|0;fd(n,b);u=c;return 1}function _g(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=a+32|0;d=f[a+64>>2]|0;e=(Qa[f[(f[d>>2]|0)+40>>2]&127](d)|0)+56|0;d=f[e>>2]|0;li(c,(((f[d+100>>2]|0)-(f[d+96>>2]|0)|0)/12|0)*3|0,0,1)|0;d=a+68|0;e=f[d>>2]|0;g=(f[a+72>>2]|0)-e|0;if((g|0)<=0){Qf(c);return}i=a+48|0;j=a+44|0;a=(g>>>2)+-1|0;g=e;while(1){e=f[g+(a<<2)>>2]|0;k=f[3124+(e<<2)>>2]|0;l=i;m=f[l+4>>2]|0;if((m|0)>0|(m|0)==0&(f[l>>2]|0)>>>0>0?(l=f[j>>2]|0,171>>>e&1|0):0){m=l+4|0;n=0;o=f[m>>2]|0;do{p=o>>>3;q=o&7;r=(f[l>>2]|0)+p|0;b[r>>0]=(1<>0]|0);r=(f[l>>2]|0)+p|0;b[r>>0]=(e>>>n&1)<>0]|0);o=(f[m>>2]|0)+1|0;f[m>>2]=o;n=n+1|0}while((n|0)!=(k|0))}k=a+-1|0;if((k|0)<=-1)break;a=k;g=f[d>>2]|0}Qf(c);return}function $g(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+48|0;h=g;i=g+32|0;if(!c){j=0;u=g;return j|0}Cn(h);do if((Tl(c,0)|0)!=-1){if(d){if(!(Qa[f[(f[c>>2]|0)+16>>2]&127](c)|0)){k=0;break}Va[f[(f[c>>2]|0)+20>>2]&127](c)}Dg(i,a,c,h);l=(f[i>>2]|0)==0;m=i+4|0;if((b[m+11>>0]|0)<0)br(f[m>>2]|0);if(l){l=f[h>>2]|0;m=h+4|0;ag(e,l,l+((f[m>>2]|0)-l)|0);k=(f[m>>2]|0)-(f[h>>2]|0)|0}else k=0}else k=0;while(0);e=h+12|0;i=f[e>>2]|0;f[e>>2]=0;if(i|0)br(i);i=f[h>>2]|0;if(i|0){e=h+4|0;if((f[e>>2]|0)!=(i|0))f[e>>2]=i;br(i)}j=k;u=g;return j|0}function ah(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=u;u=u+16|0;d=c;e=f[(f[a>>2]|0)+8>>2]|0;g=a+8|0;h=a+12|0;i=(f[h>>2]|0)-(f[g>>2]|0)>>2;j=f[b>>2]|0;f[b>>2]=0;f[d>>2]=j;Xa[e&15](a,i,d);i=f[d>>2]|0;f[d>>2]=0;if(!i){k=f[h>>2]|0;l=f[g>>2]|0;m=k-l|0;n=m>>2;o=n+-1|0;u=c;return o|0}d=i+88|0;a=f[d>>2]|0;f[d>>2]=0;if(a|0){d=f[a+8>>2]|0;if(d|0){e=a+12|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;br(d)}br(a)}a=f[i+68>>2]|0;if(a|0){d=i+72|0;e=f[d>>2]|0;if((e|0)!=(a|0))f[d>>2]=e+(~((e+-4-a|0)>>>2)<<2);br(a)}a=i+64|0;e=f[a>>2]|0;f[a>>2]=0;if(e|0){a=f[e>>2]|0;if(a|0){d=e+4|0;if((f[d>>2]|0)!=(a|0))f[d>>2]=a;br(a)}br(e)}br(i);k=f[h>>2]|0;l=f[g>>2]|0;m=k-l|0;n=m>>2;o=n+-1|0;u=c;return o|0}function bh(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if(b[a+352>>0]|0)return 1;c=a+8|0;d=f[c>>2]|0;e=(f[d+12>>2]|0)-(f[d+8>>2]|0)|0;d=e>>2;g=a+172|0;si(g,d+-1|0);if(!((d|0)!=1&(e|0)>0))return 1;e=a+12|0;a=0;h=0;while(1){i=f[(f[(f[c>>2]|0)+8>>2]|0)+(a<<2)>>2]|0;if(!(f[i+56>>2]|0))j=h;else{k=f[g>>2]|0;f[k+(h*136|0)>>2]=a;l=f[k+(h*136|0)+104>>2]|0;m=k+(h*136|0)+108|0;n=f[m>>2]|0;if((n|0)!=(l|0))f[m>>2]=n+(~((n+-4-l|0)>>>2)<<2);l=f[e>>2]|0;$j(k+(h*136|0)+104|0,(f[l+4>>2]|0)-(f[l>>2]|0)>>2);l=f[g>>2]|0;f[l+(h*136|0)+128>>2]=0;zc(l+(h*136|0)+4|0,f[c>>2]|0,f[e>>2]|0,i)|0;j=h+1|0}a=a+1|0;if((a|0)>=(d|0))break;else h=j}return 1}function ch(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if(b[a+288>>0]|0)return 1;c=a+8|0;d=f[c>>2]|0;e=(f[d+12>>2]|0)-(f[d+8>>2]|0)|0;d=e>>2;g=a+172|0;si(g,d+-1|0);if(!((d|0)!=1&(e|0)>0))return 1;e=a+12|0;a=0;h=0;while(1){i=f[(f[(f[c>>2]|0)+8>>2]|0)+(a<<2)>>2]|0;if(!(f[i+56>>2]|0))j=h;else{k=f[g>>2]|0;f[k+(h*136|0)>>2]=a;l=f[k+(h*136|0)+104>>2]|0;m=k+(h*136|0)+108|0;n=f[m>>2]|0;if((n|0)!=(l|0))f[m>>2]=n+(~((n+-4-l|0)>>>2)<<2);l=f[e>>2]|0;$j(k+(h*136|0)+104|0,(f[l+4>>2]|0)-(f[l>>2]|0)>>2);l=f[g>>2]|0;f[l+(h*136|0)+128>>2]=0;zc(l+(h*136|0)+4|0,f[c>>2]|0,f[e>>2]|0,i)|0;j=h+1|0}a=a+1|0;if((a|0)>=(d|0))break;else h=j}return 1}function dh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;if(d-g>>3>>>0>=b>>>0){h=b;i=g;do{j=i;f[j>>2]=0;f[j+4>>2]=0;i=(f[e>>2]|0)+8|0;f[e>>2]=i;h=h+-1|0}while((h|0)!=0);return}h=f[a>>2]|0;i=g-h>>3;g=i+b|0;if(g>>>0>536870911)mq(a);j=d-h|0;h=j>>2;d=j>>3>>>0<268435455?(h>>>0>>0?g:h):536870911;do if(d)if(d>>>0>536870911){h=ra(8)|0;Wo(h,14941);f[h>>2]=6944;va(h|0,1080,114)}else{k=dn(d<<3)|0;break}else k=0;while(0);h=k+(i<<3)|0;i=k+(d<<3)|0;d=b;b=h;k=h;do{g=b;f[g>>2]=0;f[g+4>>2]=0;b=k+8|0;k=b;d=d+-1|0}while((d|0)!=0);d=f[a>>2]|0;b=(f[e>>2]|0)-d|0;g=h+(0-(b>>3)<<3)|0;if((b|0)>0)Rg(g|0,d|0,b|0)|0;f[a>>2]=g;f[e>>2]=k;f[c>>2]=i;if(!d)return;br(d);return}function eh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=u;u=u+16|0;g=e+4|0;h=e;i=e+8|0;j=a&255;b[i>>0]=j&127;do if(c>>>0>0|(c|0)==0&a>>>0>127){b[i>>0]=j|-128;k=d+16|0;l=f[k+4>>2]|0;if((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0){m=0;break}else{f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];ye(d,g,i,i+1|0)|0;k=Wn(a|0,c|0,7)|0;m=eh(k,I,d)|0;break}}else{k=d+16|0;l=f[k+4>>2]|0;if((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0){m=0;break}f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];ye(d,g,i,i+1|0)|0;n=1;u=e;return n|0}while(0);n=m;u=e;return n|0}function fh(a,b){a=a|0;b=b|0;var c=0;c=a+8|0;ef(c,b)|0;if((c|0)==(b|0)){f[a+92>>2]=f[b+84>>2];return}else{Yf(a+56|0,f[b+48>>2]|0,f[b+52>>2]|0);Yf(a+68|0,f[b+60>>2]|0,f[b+64>>2]|0);Yf(a+80|0,f[b+72>>2]|0,f[b+76>>2]|0);f[a+92>>2]=f[b+84>>2];qg(a+96|0,f[b+88>>2]|0,f[b+92>>2]|0);return}}function gh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0;g=f[(f[(f[d+4>>2]|0)+8>>2]|0)+(c<<2)>>2]|0;if((b|0)==-1)h=Ki(c,d)|0;else h=b;if((h|0)==-2)i=0;else{do if((Qa[f[(f[d>>2]|0)+8>>2]&127](d)|0)==1){Hf(a,d,h,c,e,514);if(!(f[a>>2]|0)){f[a>>2]=0;break}else return}while(0);c=dn(44)|0;f[c>>2]=1528;f[c+4>>2]=g;g=c+8|0;f[g>>2]=f[e>>2];f[g+4>>2]=f[e+4>>2];f[g+8>>2]=f[e+8>>2];f[g+12>>2]=f[e+12>>2];f[g+16>>2]=f[e+16>>2];f[g+20>>2]=f[e+20>>2];_j(c+32|0,e+24|0);f[c>>2]=1584;i=c}f[a>>2]=i;return}function hh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=u;u=u+224|0;g=e+120|0;h=e+80|0;i=e;j=e+136|0;k=h;l=k+40|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(l|0));f[g>>2]=f[d>>2];if((qb(0,c,g,i,h)|0)<0)m=-1;else{if((f[a+76>>2]|0)>-1)n=gr(a)|0;else n=0;d=f[a>>2]|0;k=d&32;if((b[a+74>>0]|0)<1)f[a>>2]=d&-33;d=a+48|0;if(!(f[d>>2]|0)){l=a+44|0;o=f[l>>2]|0;f[l>>2]=j;p=a+28|0;f[p>>2]=j;q=a+20|0;f[q>>2]=j;f[d>>2]=80;r=a+16|0;f[r>>2]=j+80;j=qb(a,c,g,i,h)|0;if(!o)s=j;else{Sa[f[a+36>>2]&31](a,0,0)|0;t=(f[q>>2]|0)==0?-1:j;f[l>>2]=o;f[d>>2]=0;f[r>>2]=0;f[p>>2]=0;f[q>>2]=0;s=t}}else s=qb(a,c,g,i,h)|0;h=f[a>>2]|0;f[a>>2]=h|k;if(n|0)fr(a);m=(h&32|0)==0?s:-1}u=e;return m|0}function ih(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;d=u;u=u+16|0;e=d;if(!(fn(a,b,c)|0)){g=0;u=d;return g|0}if((Qa[f[(f[a>>2]|0)+32>>2]&127](a)|0)<<24>>24==1?((f[(f[a+8>>2]|0)+28>>2]|0)+-1|0)>>>0>=6:0){g=0;u=d;return g|0}h=Gg(c,f[b+48>>2]|0)|0;Xa[f[(f[a>>2]|0)+48>>2]&15](e,a,h);h=a+36|0;b=f[e>>2]|0;f[e>>2]=0;c=f[h>>2]|0;f[h>>2]=b;if(!c){f[e>>2]=0;i=b}else{Va[f[(f[c>>2]|0)+4>>2]&127](c);c=f[e>>2]|0;f[e>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&127](c);i=f[h>>2]|0}if(!i){g=1;u=d;return g|0}if(Ra[f[(f[a>>2]|0)+36>>2]&127](a,i)|0){g=1;u=d;return g|0}i=f[h>>2]|0;f[h>>2]=0;if(!i){g=1;u=d;return g|0}Va[f[(f[i>>2]|0)+4>>2]&127](i);g=1;u=d;return g|0}function jh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=d-e>>2;h=d;if(g>>>0>>0){hf(a,b-g|0);return}if(g>>>0<=b>>>0)return;g=e+(b<<2)|0;if((g|0)==(h|0))return;else i=h;do{h=i+-4|0;f[c>>2]=h;b=f[h>>2]|0;f[h>>2]=0;if(b|0){h=b+88|0;e=f[h>>2]|0;f[h>>2]=0;if(e|0){h=f[e+8>>2]|0;if(h|0){a=e+12|0;if((f[a>>2]|0)!=(h|0))f[a>>2]=h;br(h)}br(e)}e=f[b+68>>2]|0;if(e|0){h=b+72|0;a=f[h>>2]|0;if((a|0)!=(e|0))f[h>>2]=a+(~((a+-4-e|0)>>>2)<<2);br(e)}e=b+64|0;a=f[e>>2]|0;f[e>>2]=0;if(a|0){e=f[a>>2]|0;if(e|0){h=a+4|0;if((f[h>>2]|0)!=(e|0))f[h>>2]=e;br(e)}br(a)}br(b)}i=f[c>>2]|0}while((i|0)!=(g|0));return}function kh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;i=h;if(e-h>>2>>>0>=b>>>0){j=b;k=i;while(1){f[k>>2]=f[c>>2];j=j+-1|0;if(!j)break;else k=k+4|0}f[g>>2]=i+(b<<2);return}i=f[a>>2]|0;k=h-i|0;h=k>>2;j=h+b|0;if(j>>>0>1073741823)mq(a);l=e-i|0;e=l>>1;m=l>>2>>>0<536870911?(e>>>0>>0?j:e):1073741823;do if(m)if(m>>>0>1073741823){e=ra(8)|0;Wo(e,14941);f[e>>2]=6944;va(e|0,1080,114)}else{e=dn(m<<2)|0;n=e;o=e;break}else{n=0;o=0}while(0);e=n+(h<<2)|0;h=n+(m<<2)|0;m=b;j=e;while(1){f[j>>2]=f[c>>2];m=m+-1|0;if(!m)break;else j=j+4|0}if((k|0)>0)Rg(o|0,i|0,k|0)|0;f[a>>2]=n;f[g>>2]=e+(b<<2);f[d>>2]=h;if(!i)return;br(i);return}function lh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=(f[a>>2]|0)+1794895138|0;g=rp(f[a+8>>2]|0,e)|0;h=rp(f[a+12>>2]|0,e)|0;i=rp(f[a+16>>2]|0,e)|0;a:do if((g>>>0>>2>>>0?(j=c-(g<<2)|0,h>>>0>>0&i>>>0>>0):0)?((i|h)&3|0)==0:0){j=h>>>2;k=i>>>2;l=0;m=g;while(1){n=m>>>1;o=l+n|0;p=o<<1;q=p+j|0;r=rp(f[a+(q<<2)>>2]|0,e)|0;s=rp(f[a+(q+1<<2)>>2]|0,e)|0;if(!(s>>>0>>0&r>>>0<(c-s|0)>>>0)){t=0;break a}if(b[a+(s+r)>>0]|0){t=0;break a}r=bl(d,a+s|0)|0;if(!r)break;s=(r|0)<0;if((m|0)==1){t=0;break a}else{l=s?l:o;m=s?n:m-n|0}}m=p+k|0;l=rp(f[a+(m<<2)>>2]|0,e)|0;j=rp(f[a+(m+1<<2)>>2]|0,e)|0;if(j>>>0>>0&l>>>0<(c-j|0)>>>0)t=(b[a+(j+l)>>0]|0)==0?a+j|0:0;else t=0}else t=0;while(0);return t|0}function mh(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;h=u;u=u+64|0;i=h;j=f[a>>2]|0;k=a+(f[j+-8>>2]|0)|0;l=f[j+-4>>2]|0;f[i>>2]=e;f[i+4>>2]=a;f[i+8>>2]=c;f[i+12>>2]=g;g=i+16|0;c=i+20|0;a=i+24|0;j=i+28|0;m=i+32|0;n=i+40|0;o=g;p=o+36|0;do{f[o>>2]=0;o=o+4|0}while((o|0)<(p|0));d[g+36>>1]=0;b[g+38>>0]=0;a:do if(qp(l,e,0)|0){f[i+48>>2]=1;_a[f[(f[l>>2]|0)+20>>2]&3](l,i,k,k,1,0);q=(f[a>>2]|0)==1?k:0}else{Za[f[(f[l>>2]|0)+24>>2]&3](l,i,k,1,0);switch(f[i+36>>2]|0){case 0:{q=(f[n>>2]|0)==1&(f[j>>2]|0)==1&(f[m>>2]|0)==1?f[c>>2]|0:0;break a;break}case 1:break;default:{q=0;break a}}if((f[a>>2]|0)!=1?!((f[n>>2]|0)==0&(f[j>>2]|0)==1&(f[m>>2]|0)==1):0){q=0;break}q=f[g>>2]|0}while(0);u=h;return q|0}function nh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(d-g>>2>>>0>=b>>>0){i=b;j=h;while(1){f[j>>2]=1;i=i+-1|0;if(!i)break;else j=j+4|0}f[e>>2]=h+(b<<2);return}h=f[a>>2]|0;j=g-h|0;g=j>>2;i=g+b|0;if(i>>>0>1073741823)mq(a);k=d-h|0;d=k>>1;l=k>>2>>>0<536870911?(d>>>0>>0?i:d):1073741823;do if(l)if(l>>>0>1073741823){d=ra(8)|0;Wo(d,14941);f[d>>2]=6944;va(d|0,1080,114)}else{d=dn(l<<2)|0;m=d;n=d;break}else{m=0;n=0}while(0);d=m+(g<<2)|0;g=m+(l<<2)|0;l=b;i=d;while(1){f[i>>2]=1;l=l+-1|0;if(!l)break;else i=i+4|0}if((j|0)>0)Rg(n|0,h|0,j|0)|0;f[a>>2]=m;f[e>>2]=d+(b<<2);f[c>>2]=g;if(!h)return;br(h);return}function oh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;if(!c){g=0;u=d;return g|0}h=a+84|0;i=f[h>>2]|0;j=a+88|0;k=f[j>>2]|0;if((k|0)!=(i|0))f[j>>2]=k+(~((k+-4-i|0)>>>2)<<2);f[h>>2]=0;f[j>>2]=0;f[a+92>>2]=0;if(i|0)br(i);i=a+72|0;j=f[i>>2]|0;h=a+76|0;if((f[h>>2]|0)!=(j|0))f[h>>2]=j;f[i>>2]=0;f[h>>2]=0;f[a+80>>2]=0;if(j|0)br(j);j=c+4|0;h=(f[j>>2]|0)-(f[c>>2]|0)>>2;b[e>>0]=0;Xg(a,h,e);h=c+24|0;i=c+28|0;k=(f[i>>2]|0)-(f[h>>2]|0)>>2;b[e>>0]=0;Xg(a+12|0,k,e);Sf(a+28|0,(f[j>>2]|0)-(f[c>>2]|0)>>2,5868);$j(a+52|0,(f[i>>2]|0)-(f[h>>2]|0)>>2);$j(a+40|0,(f[i>>2]|0)-(f[h>>2]|0)>>2);f[a+64>>2]=c;b[a+24>>0]=1;g=1;u=d;return g|0}function ph(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a+12|0;d=f[a>>2]|0;e=a+8|0;g=f[e>>2]|0;h=(g|0)==-1;if(!(b[c>>0]|0)){do if((!h?(i=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(i|0)!=-1):0)?(j=f[(f[d+12>>2]|0)+(i<<2)>>2]|0,(j|0)!=-1):0)if(!((j>>>0)%3|0)){k=j+2|0;break}else{k=j+-1|0;break}else k=-1;while(0);f[e>>2]=k;return}k=g+1|0;if((!h?(h=((k>>>0)%3|0|0)==0?g+-2|0:k,(h|0)!=-1):0)?(k=f[(f[d+12>>2]|0)+(h<<2)>>2]|0,h=k+1|0,(k|0)!=-1):0){g=((h>>>0)%3|0|0)==0?k+-2|0:h;f[e>>2]=g;if((g|0)!=-1){if((g|0)!=(f[a+4>>2]|0))return;f[e>>2]=-1;return}}else f[e>>2]=-1;g=f[a+4>>2]|0;do if(((g|0)!=-1?(a=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(a|0)!=-1):0)?(h=f[(f[d+12>>2]|0)+(a<<2)>>2]|0,(h|0)!=-1):0)if(!((h>>>0)%3|0)){l=h+2|0;break}else{l=h+-1|0;break}else l=-1;while(0);f[e>>2]=l;b[c>>0]=0;return}function qh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Id(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+20>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;Id(a,e);return}function rh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+48|0;g=e;h=e+32|0;i=a+4|0;j=f[i>>2]|0;if(!j){k=0;u=e;return k|0}do if(c)if(Qa[f[(f[j>>2]|0)+16>>2]&127](j)|0){l=f[i>>2]|0;Va[f[(f[l>>2]|0)+20>>2]&127](l);break}else{k=0;u=e;return k|0}while(0);Cn(g);Si(h,f[a>>2]|0,g);a=(f[h>>2]|0)==0;i=h+4|0;if((b[i+11>>0]|0)<0)br(f[i>>2]|0);if(a){a=f[g>>2]|0;i=g+4|0;ag(d,a,a+((f[i>>2]|0)-a)|0);m=(f[i>>2]|0)-(f[g>>2]|0)|0}else m=0;i=g+12|0;a=f[i>>2]|0;f[i>>2]=0;if(a|0)br(a);a=f[g>>2]|0;if(a|0){i=g+4|0;if((f[i>>2]|0)!=(a|0))f[i>>2]=a;br(a)}k=m;u=e;return k|0}function sh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=f[a+4>>2]|0;if(!d){e=0;return e|0}a=b[c+11>>0]|0;g=a<<24>>24<0;h=g?f[c+4>>2]|0:a&255;a=g?f[c>>2]|0:c;c=d;while(1){d=c+16|0;g=b[d+11>>0]|0;i=g<<24>>24<0;j=i?f[c+20>>2]|0:g&255;g=j>>>0>>0;k=g?j:h;if((k|0)!=0?(l=Pk(a,i?f[d>>2]|0:d,k)|0,(l|0)!=0):0)if((l|0)<0)m=7;else m=8;else if(h>>>0>>0)m=7;else m=8;if((m|0)==7){m=0;n=c}else if((m|0)==8){m=0;l=h>>>0>>0?h:j;if((l|0)!=0?(j=Pk(i?f[d>>2]|0:d,a,l)|0,(j|0)!=0):0){if((j|0)>=0){e=1;m=14;break}}else m=10;if((m|0)==10?(m=0,!g):0){e=1;m=14;break}n=c+4|0}c=f[n>>2]|0;if(!c){e=0;m=14;break}}if((m|0)==14)return e|0;return 0}function th(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=u;u=u+16|0;d=c+12|0;e=c+8|0;g=c+4|0;h=c;i=a+4|0;j=(i|0)==(b|0);if(!j){f[g>>2]=f[b>>2];f[h>>2]=b+4;f[e>>2]=f[g>>2];f[d>>2]=f[h>>2];Hc(i,e,d)}if(!j){f[g>>2]=f[b+12>>2];f[h>>2]=b+16;f[e>>2]=f[g>>2];f[d>>2]=f[h>>2];Ac(a+16|0,e,d)}if(j){u=c;return}f[g>>2]=f[b+24>>2];f[h>>2]=b+28;f[e>>2]=f[g>>2];f[d>>2]=f[h>>2];Hc(a+28|0,e,d);u=c;return}function uh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=u;u=u+16|0;g=e+4|0;h=e;di(g,a,b,c,d);d=f[g>>2]|0;if(!d){i=-1;f[g>>2]=0;u=e;return i|0}f[g>>2]=0;f[h>>2]=d;d=ah(a,h)|0;a=f[h>>2]|0;f[h>>2]=0;if(!a){i=d;f[g>>2]=0;u=e;return i|0}h=a+88|0;c=f[h>>2]|0;f[h>>2]=0;if(c|0){h=f[c+8>>2]|0;if(h|0){b=c+12|0;if((f[b>>2]|0)!=(h|0))f[b>>2]=h;br(h)}br(c)}c=f[a+68>>2]|0;if(c|0){h=a+72|0;b=f[h>>2]|0;if((b|0)!=(c|0))f[h>>2]=b+(~((b+-4-c|0)>>>2)<<2);br(c)}c=a+64|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0){c=f[b>>2]|0;if(c|0){h=b+4|0;if((f[h>>2]|0)!=(c|0))f[h>>2]=c;br(c)}br(b)}br(a);i=d;f[g>>2]=0;u=e;return i|0}function vh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=u;u=u+16|0;g=e+4|0;h=e;i=f[a+8>>2]|0;j=i+24|0;k=b[j>>0]|0;l=c+4|0;Nf(a,(f[l>>2]|0)-(f[c>>2]|0)>>2,k,d);d=f[a+32>>2]|0;a=(f[f[d>>2]>>2]|0)+(f[d+48>>2]|0)|0;d=f[c>>2]|0;c=f[l>>2]|0;if((d|0)==(c|0)){m=1;u=e;return m|0}l=i+84|0;n=i+68|0;o=0;p=d;while(1){d=f[p>>2]|0;if(!(b[l>>0]|0))q=f[(f[n>>2]|0)+(d<<2)>>2]|0;else q=d;f[h>>2]=q;d=b[j>>0]|0;f[g>>2]=f[h>>2];if(!(Pb(i,g,d,a+(o<<2)|0)|0)){m=0;r=7;break}p=p+4|0;if((p|0)==(c|0)){m=1;r=7;break}else o=o+k|0}if((r|0)==7){u=e;return m|0}return 0}function wh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=1392;b=a+72|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&127](c);c=f[a+60>>2]|0;if(c|0){b=a+64|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);br(c)}c=f[a+48>>2]|0;if(c|0)br(c);c=a+36|0;d=f[c>>2]|0;if(d|0){b=a+40|0;e=f[b>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[b>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0)Va[f[(f[i>>2]|0)+4>>2]&127](i);h=f[b>>2]|0}while((h|0)!=(d|0));g=f[c>>2]|0}br(g)}f[a>>2]=1216;g=f[a+16>>2]|0;if(g|0){c=a+20|0;d=f[c>>2]|0;if((d|0)!=(g|0))f[c>>2]=d+(~((d+-4-g|0)>>>2)<<2);br(g)}g=f[a+4>>2]|0;if(!g)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(g|0))f[d>>2]=a+(~((a+-4-g|0)>>>2)<<2);br(g);return}function xh(a){a=a|0;tj(a+992|0);tj(a+960|0);tj(a+928|0);tj(a+896|0);tj(a+864|0);tj(a+832|0);tj(a+800|0);tj(a+768|0);tj(a+736|0);tj(a+704|0);tj(a+672|0);tj(a+640|0);tj(a+608|0);tj(a+576|0);tj(a+544|0);tj(a+512|0);tj(a+480|0);tj(a+448|0);tj(a+416|0);tj(a+384|0);tj(a+352|0);tj(a+320|0);tj(a+288|0);tj(a+256|0);tj(a+224|0);tj(a+192|0);tj(a+160|0);tj(a+128|0);tj(a+96|0);tj(a+64|0);tj(a+32|0);tj(a);return}function yh(a){a=a|0;rn(a);rn(a+32|0);rn(a+64|0);rn(a+96|0);rn(a+128|0);rn(a+160|0);rn(a+192|0);rn(a+224|0);rn(a+256|0);rn(a+288|0);rn(a+320|0);rn(a+352|0);rn(a+384|0);rn(a+416|0);rn(a+448|0);rn(a+480|0);rn(a+512|0);rn(a+544|0);rn(a+576|0);rn(a+608|0);rn(a+640|0);rn(a+672|0);rn(a+704|0);rn(a+736|0);rn(a+768|0);rn(a+800|0);rn(a+832|0);rn(a+864|0);rn(a+896|0);rn(a+928|0);rn(a+960|0);rn(a+992|0);return}function zh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;a=u;u=u+16|0;e=a;if((c|0)<0|((b|0)==0|(d|0)==0)){g=0;u=a;return g|0}h=f[b+8>>2]|0;if(((f[b+12>>2]|0)-h>>2|0)<=(c|0)){g=0;u=a;return g|0}i=b+4|0;if(!(f[i>>2]|0)){j=dn(52)|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;n[j+16>>2]=$(1.0);k=j+20|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;n[j+36>>2]=$(1.0);f[j+40>>2]=0;f[j+44>>2]=0;f[j+48>>2]=0;f[b+4>>2]=j}j=f[(f[h+(c<<2)>>2]|0)+60>>2]|0;c=dn(44)|0;Ub(c,d);f[c+40>>2]=j;j=f[i>>2]|0;f[e>>2]=c;gk(j,e)|0;j=f[e>>2]|0;f[e>>2]=0;if(!j){g=1;u=a;return g|0}Qi(j);br(j);g=1;u=a;return g|0}function Ah(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f[a>>2]=d;e=a+24|0;g=a+28|0;h=f[g>>2]|0;i=f[e>>2]|0;j=h-i>>2;k=i;i=h;if(j>>>0>=d>>>0){if(j>>>0>d>>>0?(h=k+(d<<2)|0,(h|0)!=(i|0)):0)f[g>>2]=i+(~((i+-4-h|0)>>>2)<<2)}else oi(e,d-j|0);if(!c)return;j=f[b>>2]|0;if((c|0)>1){d=j;e=j;h=1;while(1){i=f[b+(h<<2)>>2]|0;g=(i|0)<(e|0);k=g?i:e;l=g?d:(i|0)>(d|0)?i:d;h=h+1|0;if((h|0)==(c|0)){m=l;n=k;break}else{d=l;e=k}}}else{m=j;n=j}f[a+4>>2]=n;f[a+8>>2]=m;j=Vn(m|0,((m|0)<0)<<31>>31|0,n|0,((n|0)<0)<<31>>31|0)|0;n=I;if(!(n>>>0<0|(n|0)==0&j>>>0<2147483647))return;n=j+1|0;f[a+12>>2]=n;j=(n|0)/2|0;m=a+16|0;f[m>>2]=j;f[a+20>>2]=0-j;if(n&1|0)return;f[m>>2]=j+-1;return}function Bh(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0;c=u;u=u+64|0;j=c;k=i?6:5;Al(j);i=f[h+56>>2]|0;h=X(Ll(k)|0,e)|0;yj(j,i,0,e&255,k,0,h,((h|0)<0)<<31>>31,0,0);h=dn(96)|0;nl(h,j);f[a>>2]=h;pj(h,d)|0;d=h+84|0;if(!g){b[d>>0]=1;a=f[h+68>>2]|0;j=h+72|0;k=f[j>>2]|0;if((k|0)==(a|0)){u=c;return}f[j>>2]=k+(~((k+-4-a|0)>>>2)<<2);u=c;return}b[d>>0]=0;d=h+68|0;a=h+72|0;h=f[a>>2]|0;k=f[d>>2]|0;j=h-k>>2;e=h;if(j>>>0>>0){kh(d,g-j|0,1200);u=c;return}if(j>>>0<=g>>>0){u=c;return}j=k+(g<<2)|0;if((j|0)==(e|0)){u=c;return}f[a>>2]=e+(~((e+-4-j|0)>>>2)<<2);u=c;return}function Ch(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){jd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;jd(a,e);return}function Dh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){nd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;nd(a,e);return}function Eh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){ud(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;ud(a,e);return}function Fh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Ed(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;Ed(a,e);return}function Gh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){ld(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;ld(a,e);return}function Hh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){qd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;qd(a,e);return}function Ih(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){yd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;yd(a,e);return}function Jh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){kd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;kd(a,e);return}function Kh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){od(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;od(a,e);return}function Lh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){vd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;vd(a,e);return}function Mh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Fd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;Fd(a,e);return}function Nh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;b[h>>0]=a&127;do if(a>>>0>127){b[h>>0]=a|128;i=c+16|0;j=f[i+4>>2]|0;if((j|0)>0|(j|0)==0&(f[i>>2]|0)>>>0>0){k=0;break}else{f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];ye(c,e,h,h+1|0)|0;k=Nh(a>>>7,c)|0;break}}else{i=c+16|0;j=f[i+4>>2]|0;if((j|0)>0|(j|0)==0&(f[i>>2]|0)>>>0>0){k=0;break}f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];ye(c,e,h,h+1|0)|0;l=1;u=d;return l|0}while(0);l=k;u=d;return l|0}function Oh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=u;u=u+16|0;e=d;Be(e,a+40|0,f[a+8>>2]|0,b,c);Wi(a,e);a=f[e>>2]|0;f[e>>2]=0;if(!a){u=d;return 1}e=a+88|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0){e=f[c+8>>2]|0;if(e|0){b=c+12|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;br(e)}br(c)}c=f[a+68>>2]|0;if(c|0){e=a+72|0;b=f[e>>2]|0;if((b|0)!=(c|0))f[e>>2]=b+(~((b+-4-c|0)>>>2)<<2);br(c)}c=a+64|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0){c=f[b>>2]|0;if(c|0){e=b+4|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;br(c)}br(b)}br(a);u=d;return 1}function Ph(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){rd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;rd(a,e);return}function Qh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;e=u;u=u+48|0;g=e;h=e+32|0;if(!c){i=0;u=e;return i|0}Cn(g);if((Tl(c,0)|0)!=-1?Qa[f[(f[c>>2]|0)+16>>2]&127](c)|0:0){Va[f[(f[c>>2]|0)+20>>2]&127](c);Zf(h,a,c,g);c=(f[h>>2]|0)==0;a=h+4|0;if((b[a+11>>0]|0)<0)br(f[a>>2]|0);if(c){c=f[g>>2]|0;a=g+4|0;ag(d,c,c+((f[a>>2]|0)-c)|0);j=(f[a>>2]|0)-(f[g>>2]|0)|0}else j=0}else j=0;a=g+12|0;c=f[a>>2]|0;f[a>>2]=0;if(c|0)br(c);c=f[g>>2]|0;if(c|0){a=g+4|0;if((f[a>>2]|0)!=(c|0))f[a>>2]=c;br(c)}i=j;u=e;return i|0}function Rh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=u;u=u+16|0;e=d;se(e,a+40|0,f[a+8>>2]|0,b,c);Wi(a,e);a=f[e>>2]|0;f[e>>2]=0;if(!a){u=d;return 1}e=a+88|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0){e=f[c+8>>2]|0;if(e|0){b=c+12|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;br(e)}br(c)}c=f[a+68>>2]|0;if(c|0){e=a+72|0;b=f[e>>2]|0;if((b|0)!=(c|0))f[e>>2]=b+(~((b+-4-c|0)>>>2)<<2);br(c)}c=a+64|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0){c=f[b>>2]|0;if(c|0){e=b+4|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;br(c)}br(b)}br(a);u=d;return 1}function Sh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;d=f[c>>2]|0;if((d|0)==(b|0))e=b;else{g=d;do{d=g+-4|0;f[c>>2]=d;h=f[d>>2]|0;f[d>>2]=0;if(h|0){d=h+88|0;i=f[d>>2]|0;f[d>>2]=0;if(i|0){d=f[i+8>>2]|0;if(d|0){j=i+12|0;if((f[j>>2]|0)!=(d|0))f[j>>2]=d;br(d)}br(i)}i=f[h+68>>2]|0;if(i|0){d=h+72|0;j=f[d>>2]|0;if((j|0)!=(i|0))f[d>>2]=j+(~((j+-4-i|0)>>>2)<<2);br(i)}i=h+64|0;j=f[i>>2]|0;f[i>>2]=0;if(j|0){i=f[j>>2]|0;if(i|0){d=j+4|0;if((f[d>>2]|0)!=(i|0))f[d>>2]=i;br(i)}br(j)}br(h)}g=f[c>>2]|0}while((g|0)!=(b|0));e=f[a>>2]|0}br(e);return}function Th(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=(d|0)<0;do if(!b){if(e){g=0;return g|0}h=a+4|0;i=f[h>>2]|0;j=f[a>>2]|0;k=i-j|0;if(k>>>0>>0){ri(a,c-k|0);break}if(k>>>0>c>>>0?(k=j+c|0,(k|0)!=(i|0)):0)f[h>>2]=k}else{if(e){g=0;return g|0}k=a+4|0;h=f[k>>2]|0;i=f[a>>2]|0;j=h-i|0;do if(0<(d|0)|0==(d|0)&j>>>0>>0){if(j>>>0>>0){ri(a,c-j|0);break}if(j>>>0>c>>>0?(l=i+c|0,(l|0)!=(h|0)):0){f[k>>2]=l;m=15}else m=15}else m=15;while(0);if((m|0)==15?(c|0)==0:0)break;Xl(f[a>>2]|0,b|0,c|0)|0}while(0);c=a+24|0;a=c;b=Tn(f[a>>2]|0,f[a+4>>2]|0,1,0)|0;a=c;f[a>>2]=b;f[a+4>>2]=I;g=1;return g|0}function Uh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;if(!(ve(a,c)|0)){i=0;u=d;return i|0}j=a+36|0;k=a+40|0;a=f[j>>2]|0;if((f[k>>2]|0)==(a|0)){i=1;u=d;return i|0}l=c+16|0;m=c+4|0;n=h+1|0;o=0;p=a;do{a=f[p+(o<<2)>>2]|0;q=Qa[f[(f[a>>2]|0)+32>>2]&127](a)|0;b[h>>0]=q;q=l;a=f[q+4>>2]|0;if(!((a|0)>0|(a|0)==0&(f[q>>2]|0)>>>0>0)){f[g>>2]=f[m>>2];f[e>>2]=f[g>>2];ye(c,e,h,n)|0}o=o+1|0;p=f[j>>2]|0}while(o>>>0<(f[k>>2]|0)-p>>2>>>0);i=1;u=d;return i|0}function Vh(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=u;u=u+16|0;d=c;wp(a);f[a+16>>2]=0;f[a+20>>2]=0;f[a+12>>2]=a+16;e=a+24|0;wp(e);f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;a=dn(32)|0;f[d>>2]=a;f[d+8>>2]=-2147483616;f[d+4>>2]=20;g=a;h=13101;i=g+20|0;do{b[g>>0]=b[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(i|0));b[a+20>>0]=0;Mj(e,d,1);if((b[d+11>>0]|0)<0)br(f[d>>2]|0);f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;a=dn(32)|0;f[d>>2]=a;f[d+8>>2]=-2147483616;f[d+4>>2]=22;g=a;h=13122;i=g+22|0;do{b[g>>0]=b[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(i|0));b[a+22>>0]=0;Mj(e,d,1);if((b[d+11>>0]|0)>=0){u=c;return}br(f[d>>2]|0);u=c;return}function Wh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=f[a+4>>2]|0;c=a+8|0;d=f[c>>2]|0;if((d|0)!=(b|0)){e=d;do{d=e+-4|0;f[c>>2]=d;g=f[d>>2]|0;f[d>>2]=0;if(g|0){d=g+88|0;h=f[d>>2]|0;f[d>>2]=0;if(h|0){d=f[h+8>>2]|0;if(d|0){i=h+12|0;if((f[i>>2]|0)!=(d|0))f[i>>2]=d;br(d)}br(h)}h=f[g+68>>2]|0;if(h|0){d=g+72|0;i=f[d>>2]|0;if((i|0)!=(h|0))f[d>>2]=i+(~((i+-4-h|0)>>>2)<<2);br(h)}h=g+64|0;i=f[h>>2]|0;f[h>>2]=0;if(i|0){h=f[i>>2]|0;if(h|0){d=i+4|0;if((f[d>>2]|0)!=(h|0))f[d>>2]=h;br(h)}br(i)}br(g)}e=f[c>>2]|0}while((e|0)!=(b|0))}b=f[a>>2]|0;if(!b)return;br(b);return}function Xh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;f[g>>2]=f[a+12>>2];h=b+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&j>>>0>0){l=k;m=j}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;j=h;l=f[j+4>>2]|0;m=f[j>>2]|0}f[g>>2]=f[a+20>>2];if((l|0)>0|(l|0)==0&m>>>0>0){u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;u=c;return 1}function Yh(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=u;u=u+16|0;d=c;e=dn(16)|0;f[d>>2]=e;f[d+8>>2]=-2147483632;f[d+4>>2]=14;g=e;h=12975;i=g+14|0;do{b[g>>0]=b[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(i|0));b[e+14>>0]=0;e=yk(a,d,-1)|0;if((b[d+11>>0]|0)<0)br(f[d>>2]|0);j=dn(16)|0;f[d>>2]=j;f[d+8>>2]=-2147483632;f[d+4>>2]=14;g=j;h=12990;i=g+14|0;do{b[g>>0]=b[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(i|0));b[j+14>>0]=0;j=yk(a,d,-1)|0;if((b[d+11>>0]|0)>=0){k=(e|0)<(j|0);l=k?j:e;m=(l|0)==-1;n=m?5:l;u=c;return n|0}br(f[d>>2]|0);k=(e|0)<(j|0);l=k?j:e;m=(l|0)==-1;n=m?5:l;u=c;return n|0}function Zh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;f[g>>2]=f[a+12>>2];h=b+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&j>>>0>0){l=k;m=j}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;j=h;l=f[j+4>>2]|0;m=f[j>>2]|0}f[g>>2]=f[a+16>>2];if((l|0)>0|(l|0)==0&m>>>0>0){u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];ye(b,d,g,g+4|0)|0;u=c;return 1}function _h(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=dn(32)|0;f[a>>2]=g;f[a+4>>2]=c+8;c=a+8|0;b[c>>0]=0;h=g+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;h=g+20|0;i=e+12|0;f[h>>2]=0;f[g+24>>2]=0;f[g+28>>2]=0;g=e+16|0;e=f[g>>2]|0;j=f[i>>2]|0;k=e-j|0;if(!k){l=j;m=e;n=0}else{ri(h,k);l=f[i>>2]|0;m=f[g>>2]|0;n=f[h>>2]|0}Rg(n|0,l|0,m-l|0)|0;b[c>>0]=1;c=f[a>>2]|0;f[c+4>>2]=d;f[c>>2]=0;return}function $h(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0;b=a+32|0;fd(a,b);c=a+80|0;d=f[c>>2]|0;if((d|0?(e=a+84|0,(f[e>>2]|0)>0):0)?(fd(d,b),(f[e>>2]|0)>1):0){d=1;do{fd((f[c>>2]|0)+(d<<5)|0,b);d=d+1|0}while((d|0)<(f[e>>2]|0))}e=a+136|0;d=a+140|0;a=f[e>>2]|0;if((f[d>>2]|0)==(a|0))return;c=0;g=a;while(1){a=g;Nh((f[a+(c*12|0)+4>>2]|0)-(f[a+(c*12|0)>>2]|0)>>2,b)|0;a=f[e>>2]|0;h=f[a+(c*12|0)>>2]|0;i=(f[a+(c*12|0)+4>>2]|0)-h>>2;if(!i)j=a;else{Dc(h,i,1,0,b)|0;j=f[e>>2]|0}c=c+1|0;if(c>>>0>=(((f[d>>2]|0)-j|0)/12|0)>>>0)break;else g=j}return}function ai(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=d+16|0;g=f[e>>2]|0;if(!g)if(!(pl(d)|0)){h=f[e>>2]|0;i=5}else j=0;else{h=g;i=5}a:do if((i|0)==5){g=d+20|0;e=f[g>>2]|0;k=e;if((h-e|0)>>>0>>0){j=Sa[f[d+36>>2]&31](d,a,c)|0;break}b:do if((b[d+75>>0]|0)>-1){e=c;while(1){if(!e){l=0;m=a;n=c;o=k;break b}p=e+-1|0;if((b[a+p>>0]|0)==10)break;else e=p}p=Sa[f[d+36>>2]&31](d,a,e)|0;if(p>>>0>>0){j=p;break a}l=e;m=a+e|0;n=c-e|0;o=f[g>>2]|0}else{l=0;m=a;n=c;o=k}while(0);Rg(o|0,m|0,n|0)|0;f[g>>2]=(f[g>>2]|0)+n;j=l+n|0}while(0);return j|0}function bi(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+12|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d+28>>2]|0;if(c|0){e=c;do{c=e;e=f[e>>2]|0;bi(c+8|0);br(c)}while((e|0)!=0)}e=d+20|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0)br(c);c=f[d+8>>2]|0;if(c|0){e=c;do{c=e;e=f[e>>2]|0;g=c+8|0;h=f[c+20>>2]|0;if(h|0){i=c+24|0;if((f[i>>2]|0)!=(h|0))f[i>>2]=h;br(h)}if((b[g+11>>0]|0)<0)br(f[g>>2]|0);br(c)}while((e|0)!=0)}e=f[d>>2]|0;f[d>>2]=0;if(e|0)br(e);br(d)}if((b[a+11>>0]|0)>=0)return;br(f[a>>2]|0);return}function ci(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0;g=u;u=u+32|0;h=g+12|0;i=g;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;if((e|0)>0){j=i+11|0;k=i+4|0;l=0;do{if((l|0)>0)vn(h,12890)|0;cl(i,$(n[d+(l<<2)>>2]));m=b[j>>0]|0;o=m<<24>>24<0;$i(h,o?f[i>>2]|0:i,o?f[k>>2]|0:m&255)|0;if((b[j>>0]|0)<0)br(f[i>>2]|0);l=l+1|0}while((l|0)<(e|0))}Ql(mi(a,c)|0,h)|0;if((b[h+11>>0]|0)>=0){u=g;return}br(f[h>>2]|0);u=g;return}function di(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if((f[d+56>>2]|0)==-1){h=0;f[a>>2]=h;return}i=dn(96)|0;nl(i,d);d=i;do if(!e){j=f[c+80>>2]|0;b[i+84>>0]=0;k=i+68|0;l=i+72|0;m=f[l>>2]|0;n=f[k>>2]|0;o=m-n>>2;p=m;if(j>>>0>o>>>0){kh(k,j-o|0,5908);break}if(j>>>0>>0?(o=n+(j<<2)|0,(o|0)!=(p|0)):0)f[l>>2]=p+(~((p+-4-o|0)>>>2)<<2)}else{b[i+84>>0]=1;o=f[i+68>>2]|0;p=i+72|0;l=f[p>>2]|0;if((l|0)!=(o|0))f[p>>2]=l+(~((l+-4-o|0)>>>2)<<2);f[i+80>>2]=f[c+80>>2]}while(0);if(!g){h=d;f[a>>2]=h;return}pj(i,g)|0;h=d;f[a>>2]=h;return}function ei(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d|0;g=e>>3;h=g+1|0;if(h>>>0>536870911)mq(a);i=a+8|0;j=(f[i>>2]|0)-d|0;k=j>>2;l=j>>3>>>0<268435455?(k>>>0>>0?h:k):536870911;do if(l)if(l>>>0>536870911){k=ra(8)|0;Wo(k,14941);f[k>>2]=6944;va(k|0,1080,114)}else{k=dn(l<<3)|0;m=k;n=k;break}else{m=0;n=0}while(0);k=m+(g<<3)|0;g=b;b=f[g+4>>2]|0;h=k;f[h>>2]=f[g>>2];f[h+4>>2]=b;if((e|0)>0)Rg(n|0,d|0,e|0)|0;f[a>>2]=m;f[c>>2]=k+8;f[i>>2]=m+(l<<3);if(!d)return;br(d);return}function fi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+16|0;d=c;if((Qa[f[(f[b>>2]|0)+20>>2]&127](b)|0)<=0){e=1;u=c;return e|0}g=a+4|0;h=a+20|0;i=a+24|0;j=a+16|0;a=0;while(1){k=f[(f[g>>2]|0)+4>>2]|0;l=Tl(k,Ra[f[(f[b>>2]|0)+24>>2]&127](b,a)|0)|0;f[d>>2]=l;if((l|0)==-1)break;k=f[h>>2]|0;if((k|0)==(f[i>>2]|0))Ci(j,d);else{f[k>>2]=l;f[h>>2]=k+4}al(f[g>>2]|0,f[d>>2]|0)|0;a=a+1|0;if((a|0)>=(Qa[f[(f[b>>2]|0)+20>>2]&127](b)|0)){e=1;m=9;break}}if((m|0)==9){u=c;return e|0}e=0;u=c;return e|0}function gi(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;f[a>>2]=1276;Sh(a+60|0);b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=a+36|0;d=f[b>>2]|0;if(d|0){c=a+40|0;e=f[c>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-24|0;f[c>>2]=e;Va[f[f[e>>2]>>2]&127](e);h=f[c>>2]|0}while((h|0)!=(d|0));g=f[b>>2]|0}br(g)}f[a>>2]=1216;g=f[a+16>>2]|0;if(g|0){b=a+20|0;d=f[b>>2]|0;if((d|0)!=(g|0))f[b>>2]=d+(~((d+-4-g|0)>>>2)<<2);br(g)}g=f[a+4>>2]|0;if(!g)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(g|0))f[d>>2]=a+(~((a+-4-g|0)>>>2)<<2);br(g);return}function hi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=u;u=u+32|0;d=c+16|0;e=c+8|0;g=c;h=a+8|0;if(f[h>>2]<<5>>>0>=b>>>0){u=c;return}f[d>>2]=0;i=d+4|0;f[i>>2]=0;j=d+8|0;f[j>>2]=0;if((b|0)<0)mq(d);k=((b+-1|0)>>>5)+1|0;b=dn(k<<2)|0;f[d>>2]=b;f[i>>2]=0;f[j>>2]=k;k=f[a>>2]|0;f[e>>2]=k;f[e+4>>2]=0;b=a+4|0;l=f[b>>2]|0;f[g>>2]=k+(l>>>5<<2);f[g+4>>2]=l&31;ig(d,e,g);g=f[a>>2]|0;f[a>>2]=f[d>>2];f[d>>2]=g;d=f[b>>2]|0;f[b>>2]=f[i>>2];f[i>>2]=d;d=f[h>>2]|0;f[h>>2]=f[j>>2];f[j>>2]=d;if(g|0)br(g);u=c;return}function ii(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=a+136|0;c=f[b>>2]|0;if(c|0){d=a+140|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);br(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}br(g)}g=f[a+104>>2]|0;if(g|0){b=a+108|0;j=f[b>>2]|0;if((j|0)!=(g|0))f[b>>2]=j+(~((j+-4-g|0)>>>2)<<2);br(g)}g=f[a+92>>2]|0;if(!g){jj(a);return}j=a+96|0;b=f[j>>2]|0;if((b|0)!=(g|0))f[j>>2]=b+(~((b+-4-g|0)>>>2)<<2);br(g);jj(a);return}function ji(a){a=a|0;var c=0,d=0,e=0,g=0;f[a>>2]=3340;c=a+72|0;d=a+136|0;e=a+4|0;g=e+64|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));e=c;g=e+64|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));n[d>>2]=$(1.0);d=a+140|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;f[a+164>>2]=-1;d=a+168|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;f[d+24>>2]=0;rn(a+200|0);Cn(a+232|0);d=a+316|0;e=a+264|0;g=e+52|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));f[d>>2]=-1;f[a+320>>2]=-1;f[a+324>>2]=0;f[a+328>>2]=2;f[a+332>>2]=7;f[a+336>>2]=0;f[a+340>>2]=0;f[a+344>>2]=0;b[a+352>>0]=0;return}function ki(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d|0;g=(e|0)/12|0;h=g+1|0;if(h>>>0>357913941)mq(a);i=a+8|0;j=((f[i>>2]|0)-d|0)/12|0;k=j<<1;l=j>>>0<178956970?(k>>>0>>0?h:k):357913941;do if(l)if(l>>>0>357913941){k=ra(8)|0;Wo(k,14941);f[k>>2]=6944;va(k|0,1080,114)}else{m=dn(l*12|0)|0;break}else m=0;while(0);k=m+(g*12|0)|0;f[k>>2]=f[b>>2];f[k+4>>2]=f[b+4>>2];f[k+8>>2]=f[b+8>>2];b=k+(((e|0)/-12|0)*12|0)|0;if((e|0)>0)Rg(b|0,d|0,e|0)|0;f[a>>2]=b;f[c>>2]=k+12;f[i>>2]=m+(l*12|0);if(!d)return;br(d);return}function li(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=a+16|0;h=g;i=f[h+4>>2]|0;if((d|0)<0|(d|0)==0&c>>>0<1|((i|0)>0|(i|0)==0&(f[h>>2]|0)>>>0>0)){j=0;return j|0}b[a+24>>0]=e&1;h=Tn(c|0,d|0,7,0)|0;d=zk(h|0,I|0,8,0)|0;h=I;c=g;f[c>>2]=d;f[c+4>>2]=h;c=a+4|0;g=f[c>>2]|0;i=f[a>>2]|0;k=g-i|0;l=Tn(k|0,0,8,0)|0;m=e?l:k;l=Tn(m|0,(e?I:0)|0,d|0,h|0)|0;h=i;i=g;if(k>>>0>=l>>>0)if(k>>>0>l>>>0?(g=h+l|0,(g|0)!=(i|0)):0){f[c>>2]=g;n=h}else n=h;else{ri(a,l-k|0);n=f[a>>2]|0}k=dn(8)|0;f[k>>2]=n+m;f[k+4>>2]=0;m=a+12|0;a=f[m>>2]|0;f[m>>2]=k;if(!a){j=1;return j|0}br(a);j=1;return j|0}function mi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=u;u=u+16|0;d=c;e=hg(a,d,b)|0;g=f[e>>2]|0;if(g|0){h=g;i=h+28|0;u=c;return i|0}g=dn(40)|0;dj(g+16|0,b);b=g+28|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;b=f[d>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=b;f[e>>2]=g;b=f[f[a>>2]>>2]|0;if(!b)j=g;else{f[a>>2]=b;j=f[e>>2]|0}Ae(f[a+4>>2]|0,j);j=a+8|0;f[j>>2]=(f[j>>2]|0)+1;h=g;i=h+28|0;u=c;return i|0}function ni(a,c,d,e,g,h,i,j){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0;k=u;u=u+16|0;l=k;if((-18-c|0)>>>0>>0)mq(a);if((b[a+11>>0]|0)<0)m=f[a>>2]|0;else m=a;if(c>>>0<2147483623){n=d+c|0;d=c<<1;o=n>>>0>>0?d:n;p=o>>>0<11?11:o+16&-16}else p=-17;o=dn(p)|0;if(g|0)Lo(o,m,g)|0;if(i|0)Lo(o+g|0,j,i)|0;j=e-h|0;e=j-g|0;if(e|0)Lo(o+g+i|0,m+g+h|0,e)|0;if((c|0)!=10)br(m);f[a>>2]=o;f[a+8>>2]=p|-2147483648;p=j+i|0;f[a+4>>2]=p;b[l>>0]=0;Hp(o+p|0,l);u=k;return}function oi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;if(d-g>>2>>>0>=b>>>0){hj(g|0,0,b<<2|0)|0;f[e>>2]=g+(b<<2);return}h=f[a>>2]|0;i=g-h|0;g=i>>2;j=g+b|0;if(j>>>0>1073741823)mq(a);k=d-h|0;d=k>>1;l=k>>2>>>0<536870911?(d>>>0>>0?j:d):1073741823;do if(l)if(l>>>0>1073741823){d=ra(8)|0;Wo(d,14941);f[d>>2]=6944;va(d|0,1080,114)}else{d=dn(l<<2)|0;m=d;n=d;break}else{m=0;n=0}while(0);d=m+(g<<2)|0;hj(d|0,0,b<<2|0)|0;if((i|0)>0)Rg(n|0,h|0,i|0)|0;f[a>>2]=m;f[e>>2]=d+(b<<2);f[c>>2]=m+(l<<2);if(!h)return;br(h);return}function pi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=dn(32)|0;f[a>>2]=g;f[a+4>>2]=c+8;c=a+8|0;b[c>>0]=0;dj(g+8|0,e);h=g+20|0;i=e+12|0;f[h>>2]=0;f[g+24>>2]=0;f[g+28>>2]=0;g=e+16|0;e=f[g>>2]|0;j=f[i>>2]|0;k=e-j|0;if(!k){l=j;m=e;n=0}else{ri(h,k);l=f[i>>2]|0;m=f[g>>2]|0;n=f[h>>2]|0}Rg(n|0,l|0,m-l|0)|0;b[c>>0]=1;c=f[a>>2]|0;f[c+4>>2]=d;f[c>>2]=0;return}function qi(a,c,d){a=a|0;c=c|0;d=$(d);var e=0,g=0,h=0,i=0,j=0,k=0.0,l=0,m=0,n=0,o=0;e=u;u=u+16|0;g=e;h=c+11|0;i=b[h>>0]|0;if(i<<24>>24<0)j=f[c+4>>2]|0;else j=i&255;k=+d;l=j;j=i;while(1){if(j<<24>>24<0)m=f[c>>2]|0;else m=c;p[g>>3]=k;n=wn(m,l+1|0,17468,g)|0;if((n|0)>-1)if(n>>>0>l>>>0)o=n;else break;else o=l<<1|1;wj(c,o,0);l=o;j=b[h>>0]|0}wj(c,n,0);f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];a=0;while(1){if((a|0)==3)break;f[c+(a<<2)>>2]=0;a=a+1|0}u=e;return}function ri(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;if((e-h|0)>>>0>=c>>>0){i=c;j=h;do{b[j>>0]=0;j=(f[g>>2]|0)+1|0;f[g>>2]=j;i=i+-1|0}while((i|0)!=0);return}i=f[a>>2]|0;j=h-i|0;h=j+c|0;if((h|0)<0)mq(a);k=e-i|0;i=k<<1;e=k>>>0<1073741823?(i>>>0>>0?h:i):2147483647;if(!e)l=0;else l=dn(e)|0;i=l+j|0;j=l+e|0;e=c;c=i;l=i;do{b[l>>0]=0;l=c+1|0;c=l;e=e+-1|0}while((e|0)!=0);e=f[a>>2]|0;l=(f[g>>2]|0)-e|0;h=i+(0-l)|0;if((l|0)>0)Rg(h|0,e|0,l|0)|0;f[a>>2]=h;f[g>>2]=c;f[d>>2]=j;if(!e)return;br(e);return}function si(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=(d-e|0)/136|0;h=d;if(g>>>0>>0){te(a,b-g|0);return}if(g>>>0<=b>>>0)return;g=e+(b*136|0)|0;if((g|0)==(h|0))return;else i=h;do{f[c>>2]=i+-136;h=f[i+-20>>2]|0;if(h|0){b=i+-16|0;e=f[b>>2]|0;if((e|0)!=(h|0))f[b>>2]=e+(~((e+-4-h|0)>>>2)<<2);br(h)}h=f[i+-32>>2]|0;if(h|0){e=i+-28|0;b=f[e>>2]|0;if((b|0)!=(h|0))f[e>>2]=b+(~((b+-4-h|0)>>>2)<<2);br(h)}yi(i+-132|0);i=f[c>>2]|0}while((i|0)!=(g|0));return}function ti(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Hd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;Hd(a,e);return}function ui(a){a=a|0;var b=0,c=0,d=0;b=f[a+76>>2]|0;if(b|0){c=a+80|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+64>>2]|0;if(b|0){d=a+68|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;br(b)}b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+24>>2]|0;if(b|0){c=a+28|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+12>>2]|0;if(b|0){d=a+16|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a>>2]|0;if(!b)return;c=a+4|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);br(b);return}function vi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=u;u=u+16|0;g=e;h=c+11|0;i=b[h>>0]|0;if(i<<24>>24<0)j=f[c+4>>2]|0;else j=i&255;k=j;j=i;while(1){if(j<<24>>24<0)l=f[c>>2]|0;else l=c;f[g>>2]=d;m=wn(l,k+1|0,17465,g)|0;if((m|0)>-1)if(m>>>0>k>>>0)n=m;else break;else n=k<<1|1;wj(c,n,0);k=n;j=b[h>>0]|0}wj(c,m,0);f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];a=0;while(1){if((a|0)==3)break;f[c+(a<<2)>>2]=0;a=a+1|0}u=e;return}function wi(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;b=a+8|0;c=f[b>>2]|0;if((c|0)<0){d=0;return d|0}e=a+4|0;a=f[e>>2]|0;g=a+4|0;h=f[g>>2]|0;i=f[a>>2]|0;j=h-i>>2;k=i;i=h;if(c>>>0<=j>>>0)if(c>>>0>>0?(h=k+(c<<2)|0,(h|0)!=(i|0)):0){f[g>>2]=i+(~((i+-4-h|0)>>>2)<<2);l=c}else l=c;else{oi(a,c-j|0);l=f[b>>2]|0}if((l|0)<=0){d=1;return d|0}b=f[e>>2]|0;e=f[b>>2]|0;j=(f[b+4>>2]|0)-e>>2;c=e;e=0;while(1){if(j>>>0<=e>>>0){m=10;break}f[c+(e<<2)>>2]=e;e=e+1|0;if((e|0)>=(l|0)){d=1;m=12;break}}if((m|0)==10)mq(b);else if((m|0)==12)return d|0;return 0}function xi(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d;g=dn(32)|0;f[e>>2]=g;f[e+8>>2]=-2147483616;f[e+4>>2]=30;h=g;i=14791;j=h+30|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[g+30>>0]=0;g=a+4|0;Mj(g,e,c);if((b[e+11>>0]|0)<0)br(f[e>>2]|0);a=dn(32)|0;f[e>>2]=a;f[e+8>>2]=-2147483616;f[e+4>>2]=29;h=a;i=14510;j=h+29|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[a+29>>0]=0;Mj(g,e,c);if((b[e+11>>0]|0)>=0){u=d;return}br(f[e>>2]|0);u=d;return}function yi(a){a=a|0;var b=0,c=0,d=0;b=f[a+84>>2]|0;if(b|0){c=a+88|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+72>>2]|0;if(b|0){d=a+76|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;br(b)}b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+40>>2]|0;if(b|0){c=a+44|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+28>>2]|0;if(b|0){d=a+32|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+12>>2]|0;if(b|0)br(b);b=f[a>>2]|0;if(!b)return;br(b);return}function zi(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=1336;b=a+32|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=c+88|0;d=f[b>>2]|0;f[b>>2]=0;if(d|0){b=f[d+8>>2]|0;if(b|0){e=d+12|0;if((f[e>>2]|0)!=(b|0))f[e>>2]=b;br(b)}br(d)}d=f[c+68>>2]|0;if(d|0){b=c+72|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-4-d|0)>>>2)<<2);br(d)}d=c+64|0;e=f[d>>2]|0;f[d>>2]=0;if(e|0){d=f[e>>2]|0;if(d|0){b=e+4|0;if((f[b>>2]|0)!=(d|0))f[b>>2]=d;br(d)}br(e)}br(c)}c=f[a+16>>2]|0;if(!c)return;e=a+20|0;a=f[e>>2]|0;if((a|0)!=(c|0))f[e>>2]=a+(~((a+-4-c|0)>>>2)<<2);br(c);return}function Ai(){var a=0,b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;a=u;u=u+48|0;b=a+32|0;c=a+24|0;d=a+16|0;e=a;g=a+36|0;a=mn()|0;if(a|0?(h=f[a>>2]|0,h|0):0){a=h+48|0;i=f[a>>2]|0;j=f[a+4>>2]|0;if(!((i&-256|0)==1126902528&(j|0)==1129074247)){f[c>>2]=17607;Dn(17557,c)}if((i|0)==1126902529&(j|0)==1129074247)k=f[h+44>>2]|0;else k=h+80|0;f[g>>2]=k;k=f[h>>2]|0;h=f[k+4>>2]|0;if(Sa[f[(f[250]|0)+16>>2]&31](1e3,k,g)|0){k=f[g>>2]|0;g=Qa[f[(f[k>>2]|0)+8>>2]&127](k)|0;f[e>>2]=17607;f[e+4>>2]=h;f[e+8>>2]=g;Dn(17471,e)}else{f[d>>2]=17607;f[d+4>>2]=h;Dn(17516,d)}}Dn(17595,b)}function Bi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;do if(a){if(c>>>0<128){b[a>>0]=c;e=1;break}d=(Yq()|0)+188|0;if(!(f[f[d>>2]>>2]|0))if((c&-128|0)==57216){b[a>>0]=c;e=1;break}else{d=ir()|0;f[d>>2]=84;e=-1;break}if(c>>>0<2048){b[a>>0]=c>>>6|192;b[a+1>>0]=c&63|128;e=2;break}if(c>>>0<55296|(c&-8192|0)==57344){b[a>>0]=c>>>12|224;b[a+1>>0]=c>>>6&63|128;b[a+2>>0]=c&63|128;e=3;break}if((c+-65536|0)>>>0<1048576){b[a>>0]=c>>>18|240;b[a+1>>0]=c>>>12&63|128;b[a+2>>0]=c>>>6&63|128;b[a+3>>0]=c&63|128;e=4;break}else{d=ir()|0;f[d>>2]=84;e=-1;break}}else e=1;while(0);return e|0}function Ci(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d|0;g=e>>2;h=g+1|0;if(h>>>0>1073741823)mq(a);i=a+8|0;j=(f[i>>2]|0)-d|0;k=j>>1;l=j>>2>>>0<536870911?(k>>>0>>0?h:k):1073741823;do if(l)if(l>>>0>1073741823){k=ra(8)|0;Wo(k,14941);f[k>>2]=6944;va(k|0,1080,114)}else{k=dn(l<<2)|0;m=k;n=k;break}else{m=0;n=0}while(0);k=m+(g<<2)|0;f[k>>2]=f[b>>2];if((e|0)>0)Rg(n|0,d|0,e|0)|0;f[a>>2]=m;f[c>>2]=k+4;f[i>>2]=m+(l<<2);if(!d)return;br(d);return}function Di(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=a+104|0;d=f[c>>2]|0;if((d|0)!=0?(f[a+108>>2]|0)>=(d|0):0)e=4;else{d=Qm(a)|0;if((d|0)>=0){g=f[c>>2]|0;c=a+8|0;if(g){i=f[c>>2]|0;j=f[a+4>>2]|0;k=g-(f[a+108>>2]|0)|0;g=i;if((i-j|0)<(k|0)){l=g;m=g}else{l=j+(k+-1)|0;m=g}}else{g=f[c>>2]|0;l=g;m=g}f[a+100>>2]=l;l=a+4|0;if(!m)n=f[l>>2]|0;else{g=f[l>>2]|0;l=a+108|0;f[l>>2]=m+1-g+(f[l>>2]|0);n=g}g=n+-1|0;if((d|0)==(h[g>>0]|0|0))o=d;else{b[g>>0]=d;o=d}}else e=4}if((e|0)==4){f[a+100>>2]=0;o=-1}return o|0}function Ei(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;f[a>>2]=1528;f[a+4>>2]=b;b=a+8|0;f[b>>2]=f[c>>2];f[b+4>>2]=f[c+4>>2];f[b+8>>2]=f[c+8>>2];f[b+12>>2]=f[c+12>>2];f[b+16>>2]=f[c+16>>2];f[b+20>>2]=f[c+20>>2];_j(a+32|0,c+24|0);f[a>>2]=2144;c=a+44|0;f[c>>2]=f[d>>2];f[c+4>>2]=f[d+4>>2];f[c+8>>2]=f[d+8>>2];f[c+12>>2]=f[d+12>>2];f[a>>2]=2200;d=a+112|0;c=a+60|0;b=c+52|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(b|0));Sm(d);f[a+152>>2]=0;f[a+156>>2]=0;f[a+160>>2]=0;return}function Fi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e;h=dn(16)|0;f[g>>2]=h;f[g+8>>2]=-2147483632;f[g+4>>2]=14;i=h;j=12975;k=i+14|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[h+14>>0]=0;Nj(a,g,c);if((b[g+11>>0]|0)<0)br(f[g>>2]|0);c=dn(16)|0;f[g>>2]=c;f[g+8>>2]=-2147483632;f[g+4>>2]=14;i=c;j=12990;k=i+14|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[c+14>>0]=0;Nj(a,g,d);if((b[g+11>>0]|0)>=0){u=e;return}br(f[g>>2]|0);u=e;return}function Gi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3320;b=f[a+88>>2]|0;if(b|0){c=a+92|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+72>>2]|0;if(b|0){d=a+76|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+60>>2]|0;if(b|0){c=a+64|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}f[a>>2]=3276;b=f[a+36>>2]|0;if(b|0)br(b);b=f[a+24>>2]|0;if(!b)return;br(b);return}function Hi(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;f[a>>2]=1528;f[a+4>>2]=b;b=a+8|0;f[b>>2]=f[c>>2];f[b+4>>2]=f[c+4>>2];f[b+8>>2]=f[c+8>>2];f[b+12>>2]=f[c+12>>2];f[b+16>>2]=f[c+16>>2];f[b+20>>2]=f[c+20>>2];_j(a+32|0,c+24|0);f[a>>2]=1836;c=a+44|0;f[c>>2]=f[d>>2];f[c+4>>2]=f[d+4>>2];f[c+8>>2]=f[d+8>>2];f[c+12>>2]=f[d+12>>2];f[a>>2]=1892;d=a+112|0;c=a+60|0;b=c+52|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(b|0));Sm(d);f[a+152>>2]=0;f[a+156>>2]=0;f[a+160>>2]=0;return}function Ii(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2200;b=f[a+152>>2]|0;if(b|0){c=a+156|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+112>>2]|0;if(b|0){d=a+116|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+96>>2]|0;if(b|0)br(b);b=f[a+84>>2]|0;if(b|0)br(b);b=f[a+72>>2]|0;if(b|0)br(b);b=f[a+60>>2]|0;if(b|0)br(b);f[a>>2]=1528;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);br(b);return}function Ji(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;d=u;u=u+16|0;e=d;g=f[(f[c+4>>2]|0)+4>>2]|0;if(!g){f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=d;return}if(!(rj(d+12|0,f[c+44>>2]|0,g)|0)){g=dn(32)|0;f[e>>2]=g;f[e+8>>2]=-2147483616;f[e+4>>2]=26;c=g;h=14822;i=c+26|0;do{b[c>>0]=b[h>>0]|0;c=c+1|0;h=h+1|0}while((c|0)<(i|0));b[g+26>>0]=0;f[a>>2]=-1;dj(a+4|0,e);if((b[e+11>>0]|0)<0)br(f[e>>2]|0)}else{f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0}u=d;return}function Ki(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;c=b+48|0;if((Yh(f[c>>2]|0)|0)>9){d=0;return d|0}if((Qa[f[(f[b>>2]|0)+8>>2]&127](b)|0)!=1){d=0;return d|0}e=b+4|0;b=(f[(f[(f[e>>2]|0)+8>>2]|0)+(a<<2)>>2]|0)+56|0;a=f[b>>2]|0;do if((a|0)==3)if((Yh(f[c>>2]|0)|0)<4){d=5;return d|0}else{g=f[b>>2]|0;break}else g=a;while(0);a=Yh(f[c>>2]|0)|0;if((g|0)==1){d=(a|0)<4?6:0;return d|0}if((a|0)>7){d=0;return d|0}if((Yh(f[c>>2]|0)|0)>1){d=1;return d|0}else return ((f[(f[e>>2]|0)+80>>2]|0)>>>0<40?1:4)|0;return 0}function Li(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1892;b=f[a+152>>2]|0;if(b|0){c=a+156|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+112>>2]|0;if(b|0){d=a+116|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+96>>2]|0;if(b|0)br(b);b=f[a+84>>2]|0;if(b|0)br(b);b=f[a+72>>2]|0;if(b|0)br(b);b=f[a+60>>2]|0;if(b|0)br(b);f[a>>2]=1528;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);br(b);return}function Mi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=u;u=u+128|0;h=g+124|0;i=g;j=i;k=6284;l=j+124|0;do{f[j>>2]=f[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(l|0));if((c+-1|0)>>>0>2147483646)if(!c){m=h;n=1;o=4}else{h=ir()|0;f[h>>2]=75;p=-1}else{m=a;n=c;o=4}if((o|0)==4){o=-2-m|0;c=n>>>0>o>>>0?o:n;f[i+48>>2]=c;n=i+20|0;f[n>>2]=m;f[i+44>>2]=m;o=m+c|0;m=i+16|0;f[m>>2]=o;f[i+28>>2]=o;o=hh(i,d,e)|0;if(!c)p=o;else{c=f[n>>2]|0;b[c+(((c|0)==(f[m>>2]|0))<<31>>31)>>0]=0;p=o}}u=g;return p|0}function Ni(a){a=a|0;var c=0,d=0,e=0,g=0;f[a>>2]=3080;c=a+72|0;d=a+136|0;e=a+4|0;g=e+64|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));e=c;g=e+64|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));n[d>>2]=$(1.0);d=a+140|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;f[a+164>>2]=-1;d=a+168|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;f[d+24>>2]=0;rn(a+200|0);Cn(a+232|0);d=a+264|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;b[d+24>>0]=0;return}function Oi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=+e;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a=u;u=u+16|0;g=a;if(!c){h=0;u=a;return h|0}f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;i=vj(d)|0;if(i>>>0>4294967279)mq(g);if(i>>>0<11){b[g+11>>0]=i;if(!i)j=g;else{k=g;l=7}}else{m=i+16&-16;n=dn(m)|0;f[g>>2]=n;f[g+8>>2]=m|-2147483648;f[g+4>>2]=i;k=n;l=7}if((l|0)==7){Rg(k|0,d|0,i|0)|0;j=k}b[j+i>>0]=0;Ol(c,g,e);if((b[g+11>>0]|0)<0)br(f[g>>2]|0);h=1;u=a;return h|0}function Pi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a=u;u=u+16|0;g=a;if(!c){h=0;u=a;return h|0}f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;i=vj(d)|0;if(i>>>0>4294967279)mq(g);if(i>>>0<11){b[g+11>>0]=i;if(!i)j=g;else{k=g;l=7}}else{m=i+16&-16;n=dn(m)|0;f[g>>2]=n;f[g+8>>2]=m|-2147483648;f[g+4>>2]=i;k=n;l=7}if((l|0)==7){Rg(k|0,d|0,i|0)|0;j=k}b[j+i>>0]=0;Pl(c,g,e);if((b[g+11>>0]|0)<0)br(f[g>>2]|0);h=1;u=a;return h|0}function Qi(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;c=f[a+28>>2]|0;if(c|0){d=c;do{c=d;d=f[d>>2]|0;e=c+8|0;g=c+20|0;h=f[g>>2]|0;f[g>>2]=0;if(h|0){Qi(h);br(h)}if((b[e+11>>0]|0)<0)br(f[e>>2]|0);br(c)}while((d|0)!=0)}d=a+20|0;c=f[d>>2]|0;f[d>>2]=0;if(c|0)br(c);c=f[a+8>>2]|0;if(c|0){d=c;do{c=d;d=f[d>>2]|0;e=c+8|0;h=f[c+20>>2]|0;if(h|0){g=c+24|0;if((f[g>>2]|0)!=(h|0))f[g>>2]=h;br(h)}if((b[e+11>>0]|0)<0)br(f[e>>2]|0);br(c)}while((d|0)!=0)}d=f[a>>2]|0;f[a>>2]=0;if(!d)return;br(d);return}function Ri(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;Wa[f[(f[c>>2]|0)+64>>2]&15](a,c);if(f[a>>2]|0){u=d;return}g=a+4|0;if((b[g+11>>0]|0)<0)br(f[g>>2]|0);g=f[c+48>>2]|0;h=dn(32)|0;f[e>>2]=h;f[e+8>>2]=-2147483616;f[e+4>>2]=29;i=h;j=14510;k=i+29|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[h+29>>0]=0;h=Oj(g,e,0)|0;if((b[e+11>>0]|0)<0)br(f[e>>2]|0);if(h)Va[f[(f[c>>2]|0)+68>>2]&127](c);f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=d;return}function Si(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0;e=u;u=u+16|0;g=e;h=f[c+48>>2]|0;if(!h){i=dn(32)|0;f[g>>2]=i;f[g+8>>2]=-2147483616;f[g+4>>2]=23;j=i;k=14670;l=j+23|0;do{b[j>>0]=b[k>>0]|0;j=j+1|0;k=k+1|0}while((j|0)<(l|0));b[i+23>>0]=0;f[a>>2]=-1;dj(a+4|0,g);if((b[g+11>>0]|0)<0)br(f[g>>2]|0);u=e;return}g=f[c+52>>2]|0;if(!g){Ic(a,c,h,d);u=e;return}else{jg(a,c,g,d);u=e;return}}function Ti(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;lk(a);b=a+84|0;c=f[b>>2]|0;if((c|0)<=0)return;d=c<<5;e=_q(c>>>0>134217727|d>>>0>4294967291?-1:d+4|0)|0;f[e>>2]=c;d=e+4|0;e=d+(c<<5)|0;c=d;do{rn(c);c=c+32|0}while((c|0)!=(e|0));e=a+80|0;a=f[e>>2]|0;f[e>>2]=d;if(a|0){d=a+-4|0;c=f[d>>2]|0;if(c|0){g=a+(c<<5)|0;do{g=g+-32|0;tj(g)}while((g|0)!=(a|0))}$q(d)}if((f[b>>2]|0)>0)h=0;else return;do{lk((f[e>>2]|0)+(h<<5)|0);h=h+1|0}while((h|0)<(f[b>>2]|0));return}function Ui(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;if(!b){d=0;return d|0}if(f[b+4>>2]|0){d=0;return d|0}a=dn(52)|0;Ub(a,c);f[a+40>>2]=0;f[a+44>>2]=0;f[a+48>>2]=0;c=b+4|0;b=f[c>>2]|0;f[c>>2]=a;if(!b){d=1;return d|0}a=b+40|0;c=f[a>>2]|0;if(c|0){e=b+44|0;g=f[e>>2]|0;if((g|0)==(c|0))h=c;else{i=g;do{g=i+-4|0;f[e>>2]=g;j=f[g>>2]|0;f[g>>2]=0;if(j|0){Qi(j);br(j)}i=f[e>>2]|0}while((i|0)!=(c|0));h=f[a>>2]|0}br(h)}Qi(b);br(b);d=1;return d|0}function Vi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=f[a>>2]|0;if(b){b=c+8|0;d=b;e=Tn(f[d>>2]|0,f[d+4>>2]|0,1,0)|0;d=b;f[d>>2]=e;f[d+4>>2]=I;d=a+28|0;e=f[d>>2]|0;b=a+24|0;f[b>>2]=f[b>>2]|1<>2]|0,f[e+4>>2]|0,1,0)|0;e=c;f[e>>2]=d;f[e+4>>2]=I;e=a+28|0;g=e;h=f[e>>2]|0}e=h+1|0;f[g>>2]=e;if((e|0)!=32)return;e=a+24|0;h=a+16|0;d=f[h>>2]|0;if((d|0)==(f[a+20>>2]|0))Ci(a+12|0,e);else{f[d>>2]=f[e>>2];f[h>>2]=d+4}f[g>>2]=0;f[e>>2]=0;return}function Wi(a,b){a=a|0;b=b|0;var c=0,d=0;c=a+32|0;a=f[b>>2]|0;f[b>>2]=0;b=f[c>>2]|0;f[c>>2]=a;if(!b)return;a=b+88|0;c=f[a>>2]|0;f[a>>2]=0;if(c|0){a=f[c+8>>2]|0;if(a|0){d=c+12|0;if((f[d>>2]|0)!=(a|0))f[d>>2]=a;br(a)}br(c)}c=f[b+68>>2]|0;if(c|0){a=b+72|0;d=f[a>>2]|0;if((d|0)!=(c|0))f[a>>2]=d+(~((d+-4-c|0)>>>2)<<2);br(c)}c=b+64|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d>>2]|0;if(c|0){a=d+4|0;if((f[a>>2]|0)!=(c|0))f[a>>2]=c;br(c)}br(d)}br(b);return}function Xi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+16|0;g=e;if(c|0){h=a+11|0;i=b[h>>0]|0;if(i<<24>>24<0){j=f[a+4>>2]|0;k=(f[a+8>>2]&2147483647)+-1|0}else{j=i&255;k=10}if((k-j|0)>>>0>>0){lj(a,k,c-k+j|0,j,j,0,0);l=b[h>>0]|0}else l=i;if(l<<24>>24<0)m=f[a>>2]|0;else m=a;On(m+j|0,c,d)|0;d=j+c|0;if((b[h>>0]|0)<0)f[a+4>>2]=d;else b[h>>0]=d;b[g>>0]=0;Hp(m+d|0,g)}u=e;return a|0}function Yi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+48|0;e=d+4|0;g=d;h=f[b+12>>2]|0;i=f[b+4>>2]|0;b=e;j=b+36|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(j|0));gh(g,c,h,i,e);i=f[e+24>>2]|0;if(!i){k=f[g>>2]|0;f[a>>2]=k;u=d;return}h=e+28|0;e=f[h>>2]|0;if((e|0)!=(i|0))f[h>>2]=e+(~((e+-4-i|0)>>>2)<<2);br(i);k=f[g>>2]|0;f[a>>2]=k;u=d;return}function Zi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+16|0;g=e;h=a+11|0;i=b[h>>0]|0;j=i<<24>>24<0;if(j)k=(f[a+8>>2]&2147483647)+-1|0;else k=10;do if(k>>>0>=d>>>0){if(j)l=f[a>>2]|0;else l=a;Jo(l,c,d)|0;b[g>>0]=0;Hp(l+d|0,g);if((b[h>>0]|0)<0){f[a+4>>2]=d;break}else{b[h>>0]=d;break}}else{if(j)m=f[a+4>>2]|0;else m=i&255;ni(a,k,d-k|0,m,0,m,d,c)}while(0);u=e;return a|0}function _i(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;d=f[c>>2]|0;if((d|0)==(b|0))e=b;else{g=d;do{f[c>>2]=g+-136;d=f[g+-20>>2]|0;if(d|0){h=g+-16|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);br(d)}d=f[g+-32>>2]|0;if(d|0){i=g+-28|0;h=f[i>>2]|0;if((h|0)!=(d|0))f[i>>2]=h+(~((h+-4-d|0)>>>2)<<2);br(d)}yi(g+-132|0);g=f[c>>2]|0}while((g|0)!=(b|0));e=f[a>>2]|0}br(e);return}function $i(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+16|0;g=e;h=a+11|0;i=b[h>>0]|0;j=i<<24>>24<0;if(j){k=f[a+4>>2]|0;l=(f[a+8>>2]&2147483647)+-1|0}else{k=i&255;l=10}if((l-k|0)>>>0>=d>>>0){if(d|0){if(j)m=f[a>>2]|0;else m=a;Lo(m+k|0,c,d)|0;j=k+d|0;if((b[h>>0]|0)<0)f[a+4>>2]=j;else b[h>>0]=j;b[g>>0]=0;Hp(m+j|0,g)}}else ni(a,l,d-l+k|0,k,k,0,d,c);u=e;return a|0}function aj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;f[a>>2]=3608;b=f[a+32>>2]|0;if(b|0){c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+20>>2]|0;if(b|0){d=a+24|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=a+8|0;c=f[b>>2]|0;if(!c)return;d=a+12|0;a=f[d>>2]|0;if((a|0)==(c|0))e=c;else{g=a;do{a=g+-4|0;f[d>>2]=a;h=f[a>>2]|0;f[a>>2]=0;if(h|0)Va[f[(f[h>>2]|0)+4>>2]&127](h);g=f[d>>2]|0}while((g|0)!=(c|0));e=f[b>>2]|0}br(e);return}function bj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+4|0;if((Qa[f[(f[b>>2]|0)+20>>2]&127](b)|0)<=0){d=1;return d|0}a=0;while(1){e=f[(f[c>>2]|0)+4>>2]|0;g=Tl(e,Ra[f[(f[b>>2]|0)+24>>2]&127](b,a)|0)|0;if((g|0)==-1){d=0;h=6;break}e=f[(f[b>>2]|0)+28>>2]|0;i=$k(f[c>>2]|0,g)|0;a=a+1|0;if(!(Ra[e&127](b,i)|0)){d=0;h=6;break}if((a|0)>=(Qa[f[(f[b>>2]|0)+20>>2]&127](b)|0)){d=1;h=6;break}}if((h|0)==6)return d|0;return 0}function cj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;if(!(lo(a,b,c)|0)){d=0;return d|0}if(!(Qa[f[(f[a>>2]|0)+52>>2]&127](a)|0)){d=0;return d|0}c=a+4|0;e=a+8|0;g=f[c>>2]|0;if((f[e>>2]|0)==(g|0)){d=1;return d|0}h=a+36|0;a=0;i=g;while(1){g=f[(f[h>>2]|0)+(a<<2)>>2]|0;if(!(Sa[f[(f[g>>2]|0)+8>>2]&31](g,b,f[i+(a<<2)>>2]|0)|0)){d=0;j=7;break}a=a+1|0;i=f[c>>2]|0;if(a>>>0>=(f[e>>2]|0)-i>>2>>>0){d=1;j=7;break}}if((j|0)==7)return d|0;return 0}function dj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;if((b[c+11>>0]|0)<0){g=f[c>>2]|0;h=f[c+4>>2]|0;if(h>>>0>4294967279)mq(a);if(h>>>0<11){b[a+11>>0]=h;i=a}else{j=h+16&-16;k=dn(j)|0;f[a>>2]=k;f[a+8>>2]=j|-2147483648;f[a+4>>2]=h;i=k}Lo(i,g,h)|0;b[e>>0]=0;Hp(i+h|0,e)}else{f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2]}u=d;return}function ej(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;f[g>>2]=f[(f[b+4>>2]|0)+80>>2];h=f[b+44>>2]|0;b=h+16|0;i=f[b+4>>2]|0;if((i|0)>0|(i|0)==0&(f[b>>2]|0)>>>0>0){f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=c;return}f[e>>2]=f[h+4>>2];f[d>>2]=f[e>>2];ye(h,d,g,g+4|0)|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=c;return}function fj(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0;b[c+53>>0]=1;do if((f[c+4>>2]|0)==(e|0)){b[c+52>>0]=1;a=c+16|0;h=f[a>>2]|0;if(!h){f[a>>2]=d;f[c+24>>2]=g;f[c+36>>2]=1;if(!((g|0)==1?(f[c+48>>2]|0)==1:0))break;b[c+54>>0]=1;break}if((h|0)!=(d|0)){h=c+36|0;f[h>>2]=(f[h>>2]|0)+1;b[c+54>>0]=1;break}h=c+24|0;a=f[h>>2]|0;if((a|0)==2){f[h>>2]=g;i=g}else i=a;if((i|0)==1?(f[c+48>>2]|0)==1:0)b[c+54>>0]=1}while(0);return}function gj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=a+36|0;d=a+40|0;e=f[c>>2]|0;if((f[d>>2]|0)!=(e|0)){g=0;h=e;do{eg(h+(g*24|0)|0,b)|0;g=g+1|0;h=f[c>>2]|0}while(g>>>0<(((f[d>>2]|0)-h|0)/24|0)>>>0)}h=a+48|0;d=a+52|0;a=f[h>>2]|0;if((f[d>>2]|0)==(a|0))return 1;else{i=0;j=a}do{a=f[j+(i<<2)>>2]|0;Nh(a<<1^a>>31,b)|0;i=i+1|0;j=f[h>>2]|0}while(i>>>0<(f[d>>2]|0)-j>>2>>>0);return 1}function hj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=a+d|0;c=c&255;if((d|0)>=67){while(a&3){b[a>>0]=c;a=a+1|0}g=e&-4|0;h=g-64|0;i=c|c<<8|c<<16|c<<24;while((a|0)<=(h|0)){f[a>>2]=i;f[a+4>>2]=i;f[a+8>>2]=i;f[a+12>>2]=i;f[a+16>>2]=i;f[a+20>>2]=i;f[a+24>>2]=i;f[a+28>>2]=i;f[a+32>>2]=i;f[a+36>>2]=i;f[a+40>>2]=i;f[a+44>>2]=i;f[a+48>>2]=i;f[a+52>>2]=i;f[a+56>>2]=i;f[a+60>>2]=i;a=a+64|0}while((a|0)<(g|0)){f[a>>2]=i;a=a+4|0}}while((a|0)<(e|0)){b[a>>0]=c;a=a+1|0}return e-d|0}function ij(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0;do if(!(qp(a,f[c+8>>2]|0,g)|0)){if(qp(a,f[c>>2]|0,g)|0){if((f[c+16>>2]|0)!=(d|0)?(h=c+20|0,(f[h>>2]|0)!=(d|0)):0){f[c+32>>2]=e;f[h>>2]=d;h=c+40|0;f[h>>2]=(f[h>>2]|0)+1;if((f[c+36>>2]|0)==1?(f[c+24>>2]|0)==2:0)b[c+54>>0]=1;f[c+44>>2]=4;break}if((e|0)==1)f[c+32>>2]=1}}else Om(0,c,d,e);while(0);return}function jj(a){a=a|0;var b=0,c=0,d=0,e=0;b=a+80|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=c+-4|0;d=f[b>>2]|0;if(d|0){e=c+(d<<5)|0;do{e=e+-32|0;tj(e)}while((e|0)!=(c|0))}$q(b)}b=f[a+68>>2]|0;if(b|0){c=a+72|0;e=f[c>>2]|0;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);br(b)}b=a+44|0;e=f[b>>2]|0;f[b>>2]=0;if(e|0)br(e);e=f[a+32>>2]|0;if(!e){tj(a);return}b=a+36|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;br(e);tj(a);return}function kj(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2684;b=f[a+136>>2]|0;if(b|0){c=a+140|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+76>>2]|0;if(b|0)br(b);b=f[a+64>>2]|0;if(b|0)br(b);b=f[a+52>>2]|0;if(b|0)br(b);b=f[a+40>>2]|0;if(!b)return;br(b);return}function lj(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0;if((-17-c|0)>>>0>>0)mq(a);if((b[a+11>>0]|0)<0)j=f[a>>2]|0;else j=a;if(c>>>0<2147483623){k=d+c|0;d=c<<1;l=k>>>0>>0?d:k;m=l>>>0<11?11:l+16&-16}else m=-17;l=dn(m)|0;if(g|0)Lo(l,j,g)|0;k=e-h-g|0;if(k|0)Lo(l+g+i|0,j+g+h|0,k)|0;if((c|0)!=10)br(j);f[a>>2]=l;f[a+8>>2]=m|-2147483648;return}function mj(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2432;b=f[a+136>>2]|0;if(b|0){c=a+140|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b)}b=f[a+76>>2]|0;if(b|0)br(b);b=f[a+64>>2]|0;if(b|0)br(b);b=f[a+52>>2]|0;if(b|0)br(b);b=f[a+40>>2]|0;if(!b)return;br(b);return}function nj(a,b){a=a|0;b=b|0;if(!b)return;else{nj(a,f[b>>2]|0);nj(a,f[b+4>>2]|0);sj(b+20|0,f[b+24>>2]|0);br(b);return}}function oj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;If(a,b,c);c=f[a+100>>2]|0;d=f[a+96>>2]|0;a=d;if((c|0)==(d|0))return;e=f[b>>2]|0;b=(c-d|0)/12|0;d=0;do{c=a+(d*12|0)|0;f[c>>2]=f[e+(f[c>>2]<<2)>>2];c=a+(d*12|0)+4|0;f[c>>2]=f[e+(f[c>>2]<<2)>>2];c=a+(d*12|0)+8|0;f[c>>2]=f[e+(f[c>>2]<<2)>>2];d=d+1|0}while(d>>>0>>0);return}function pj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=a+64|0;if((f[d>>2]|0)==0?(e=dn(32)|0,tn(e),g=f[d>>2]|0,f[d>>2]=e,g|0):0){e=f[g>>2]|0;if(e|0){h=g+4|0;if((f[h>>2]|0)!=(e|0))f[h>>2]=e;br(e)}br(g)}g=Ll(f[a+28>>2]|0)|0;e=X(g,b[a+24>>0]|0)|0;g=((e|0)<0)<<31>>31;h=f[d>>2]|0;i=on(e|0,g|0,c|0,0)|0;if(!(Th(h,0,i,I)|0)){j=0;return j|0}Ak(a,f[d>>2]|0,e,g,0,0);f[a+80>>2]=c;j=1;return j|0}function qj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+64|0;e=d;if(!(qp(a,b,0)|0))if((b|0)!=0?(g=mh(b,1024,1008,0)|0,(g|0)!=0):0){b=e+4|0;h=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(h|0));f[e>>2]=g;f[e+8>>2]=a;f[e+12>>2]=-1;f[e+48>>2]=1;Ya[f[(f[g>>2]|0)+28>>2]&7](g,e,f[c>>2]|0,1);if((f[e+24>>2]|0)==1){f[c>>2]=f[e+16>>2];i=1}else i=0;j=i}else j=0;else j=1;u=d;return j|0}function rj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;if(!c){d=0;return d|0}e=c+40|0;g=c+44|0;Nh((f[g>>2]|0)-(f[e>>2]|0)>>2,b)|0;h=f[e>>2]|0;e=f[g>>2]|0;if((h|0)!=(e|0)){g=h;do{h=f[g>>2]|0;if(h|0){Nh(f[h+40>>2]|0,b)|0;Wf(a,b,h)|0}g=g+4|0}while((g|0)!=(e|0))}Wf(a,b,c)|0;d=1;return d|0}function sj(a,c){a=a|0;c=c|0;var d=0;if(!c)return;sj(a,f[c>>2]|0);sj(a,f[c+4>>2]|0);a=c+16|0;d=c+28|0;if((b[d+11>>0]|0)<0)br(f[d>>2]|0);if((b[a+11>>0]|0)<0)br(f[a>>2]|0);br(c);return}function tj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=u;u=u+16|0;c=b;d=c;f[d>>2]=0;f[d+4>>2]=0;cf(a,2,c);c=f[a+12>>2]|0;d=a+16|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e+(~((e+-4-c|0)>>>2)<<2)|0;f[d>>2]=h;g=h}f[a+24>>2]=0;f[a+28>>2]=0;if(c|0){if((g|0)!=(c|0))f[d>>2]=g+(~((g+-4-c|0)>>>2)<<2);br(c)}c=f[a>>2]|0;if(!c){u=b;return}g=a+4|0;a=f[g>>2]|0;if((a|0)!=(c|0))f[g>>2]=a+(~((a+-8-c|0)>>>3)<<3);br(c);u=b;return} +function $a(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0;b=u;u=u+16|0;c=b;do if(a>>>0<245){d=a>>>0<11?16:a+11&-8;e=d>>>3;g=f[4512]|0;h=g>>>e;if(h&3|0){i=(h&1^1)+e|0;j=18088+(i<<1<<2)|0;k=j+8|0;l=f[k>>2]|0;m=l+8|0;n=f[m>>2]|0;if((n|0)==(j|0))f[4512]=g&~(1<>2]=j;f[k>>2]=n}n=i<<3;f[l+4>>2]=n|3;i=l+n+4|0;f[i>>2]=f[i>>2]|1;o=m;u=b;return o|0}m=f[4514]|0;if(d>>>0>m>>>0){if(h|0){i=2<>>12&16;e=i>>>n;i=e>>>5&8;h=e>>>i;e=h>>>2&4;l=h>>>e;h=l>>>1&2;k=l>>>h;l=k>>>1&1;j=(i|n|e|h|l)+(k>>>l)|0;l=18088+(j<<1<<2)|0;k=l+8|0;h=f[k>>2]|0;e=h+8|0;n=f[e>>2]|0;if((n|0)==(l|0)){i=g&~(1<>2]=l;f[k>>2]=n;p=g}n=j<<3;j=n-d|0;f[h+4>>2]=d|3;k=h+d|0;f[k+4>>2]=j|1;f[h+n>>2]=j;if(m|0){n=f[4517]|0;h=m>>>3;l=18088+(h<<1<<2)|0;i=1<>2]|0;r=i}f[r>>2]=n;f[q+12>>2]=n;f[n+8>>2]=q;f[n+12>>2]=l}f[4514]=j;f[4517]=k;o=e;u=b;return o|0}e=f[4513]|0;if(e){k=(e&0-e)+-1|0;j=k>>>12&16;l=k>>>j;k=l>>>5&8;n=l>>>k;l=n>>>2&4;i=n>>>l;n=i>>>1&2;h=i>>>n;i=h>>>1&1;s=f[18352+((k|j|l|n|i)+(h>>>i)<<2)>>2]|0;i=(f[s+4>>2]&-8)-d|0;h=f[s+16+(((f[s+16>>2]|0)==0&1)<<2)>>2]|0;if(!h){t=s;v=i}else{n=s;s=i;i=h;while(1){h=(f[i+4>>2]&-8)-d|0;l=h>>>0>>0;j=l?h:s;h=l?i:n;i=f[i+16+(((f[i+16>>2]|0)==0&1)<<2)>>2]|0;if(!i){t=h;v=j;break}else{n=h;s=j}}}s=t+d|0;if(s>>>0>t>>>0){n=f[t+24>>2]|0;i=f[t+12>>2]|0;do if((i|0)==(t|0)){j=t+20|0;h=f[j>>2]|0;if(!h){l=t+16|0;k=f[l>>2]|0;if(!k){w=0;break}else{x=k;y=l}}else{x=h;y=j}while(1){j=x+20|0;h=f[j>>2]|0;if(h|0){x=h;y=j;continue}j=x+16|0;h=f[j>>2]|0;if(!h)break;else{x=h;y=j}}f[y>>2]=0;w=x}else{j=f[t+8>>2]|0;f[j+12>>2]=i;f[i+8>>2]=j;w=i}while(0);do if(n|0){i=f[t+28>>2]|0;j=18352+(i<<2)|0;if((t|0)==(f[j>>2]|0)){f[j>>2]=w;if(!w){f[4513]=e&~(1<>2]|0)!=(t|0)&1)<<2)>>2]=w;if(!w)break}f[w+24>>2]=n;i=f[t+16>>2]|0;if(i|0){f[w+16>>2]=i;f[i+24>>2]=w}i=f[t+20>>2]|0;if(i|0){f[w+20>>2]=i;f[i+24>>2]=w}}while(0);if(v>>>0<16){n=v+d|0;f[t+4>>2]=n|3;e=t+n+4|0;f[e>>2]=f[e>>2]|1}else{f[t+4>>2]=d|3;f[s+4>>2]=v|1;f[s+v>>2]=v;if(m|0){e=f[4517]|0;n=m>>>3;i=18088+(n<<1<<2)|0;j=1<>2]|0;A=j}f[A>>2]=e;f[z+12>>2]=e;f[e+8>>2]=z;f[e+12>>2]=i}f[4514]=v;f[4517]=s}o=t+8|0;u=b;return o|0}else B=d}else B=d}else B=d}else if(a>>>0<=4294967231){i=a+11|0;e=i&-8;j=f[4513]|0;if(j){n=0-e|0;h=i>>>8;if(h)if(e>>>0>16777215)C=31;else{i=(h+1048320|0)>>>16&8;l=h<>>16&4;k=l<>>16&2;D=14-(h|i|l)+(k<>>15)|0;C=e>>>(D+7|0)&1|D<<1}else C=0;D=f[18352+(C<<2)>>2]|0;a:do if(!D){E=0;F=0;G=n;H=57}else{l=0;k=n;i=D;h=e<<((C|0)==31?0:25-(C>>>1)|0);I=0;while(1){J=(f[i+4>>2]&-8)-e|0;if(J>>>0>>0)if(!J){K=0;L=i;M=i;H=61;break a}else{N=i;O=J}else{N=l;O=k}J=f[i+20>>2]|0;i=f[i+16+(h>>>31<<2)>>2]|0;P=(J|0)==0|(J|0)==(i|0)?I:J;J=(i|0)==0;if(J){E=P;F=N;G=O;H=57;break}else{l=N;k=O;h=h<<((J^1)&1);I=P}}}while(0);if((H|0)==57){if((E|0)==0&(F|0)==0){D=2<>>12&16;d=D>>>n;D=d>>>5&8;s=d>>>D;d=s>>>2&4;g=s>>>d;s=g>>>1&2;m=g>>>s;g=m>>>1&1;Q=0;R=f[18352+((D|n|d|s|g)+(m>>>g)<<2)>>2]|0}else{Q=F;R=E}if(!R){S=Q;T=G}else{K=G;L=R;M=Q;H=61}}if((H|0)==61)while(1){H=0;g=(f[L+4>>2]&-8)-e|0;m=g>>>0>>0;s=m?g:K;g=m?L:M;L=f[L+16+(((f[L+16>>2]|0)==0&1)<<2)>>2]|0;if(!L){S=g;T=s;break}else{K=s;M=g;H=61}}if((S|0)!=0?T>>>0<((f[4514]|0)-e|0)>>>0:0){g=S+e|0;if(g>>>0<=S>>>0){o=0;u=b;return o|0}s=f[S+24>>2]|0;m=f[S+12>>2]|0;do if((m|0)==(S|0)){d=S+20|0;n=f[d>>2]|0;if(!n){D=S+16|0;I=f[D>>2]|0;if(!I){U=0;break}else{V=I;W=D}}else{V=n;W=d}while(1){d=V+20|0;n=f[d>>2]|0;if(n|0){V=n;W=d;continue}d=V+16|0;n=f[d>>2]|0;if(!n)break;else{V=n;W=d}}f[W>>2]=0;U=V}else{d=f[S+8>>2]|0;f[d+12>>2]=m;f[m+8>>2]=d;U=m}while(0);do if(s){m=f[S+28>>2]|0;d=18352+(m<<2)|0;if((S|0)==(f[d>>2]|0)){f[d>>2]=U;if(!U){d=j&~(1<>2]|0)!=(S|0)&1)<<2)>>2]=U;if(!U){X=j;break}}f[U+24>>2]=s;d=f[S+16>>2]|0;if(d|0){f[U+16>>2]=d;f[d+24>>2]=U}d=f[S+20>>2]|0;if(d){f[U+20>>2]=d;f[d+24>>2]=U;X=j}else X=j}else X=j;while(0);do if(T>>>0>=16){f[S+4>>2]=e|3;f[g+4>>2]=T|1;f[g+T>>2]=T;j=T>>>3;if(T>>>0<256){s=18088+(j<<1<<2)|0;d=f[4512]|0;m=1<>2]|0;Z=m}f[Z>>2]=g;f[Y+12>>2]=g;f[g+8>>2]=Y;f[g+12>>2]=s;break}s=T>>>8;if(s)if(T>>>0>16777215)_=31;else{m=(s+1048320|0)>>>16&8;d=s<>>16&4;j=d<>>16&2;n=14-(s|m|d)+(j<>>15)|0;_=T>>>(n+7|0)&1|n<<1}else _=0;n=18352+(_<<2)|0;f[g+28>>2]=_;d=g+16|0;f[d+4>>2]=0;f[d>>2]=0;d=1<<_;if(!(X&d)){f[4513]=X|d;f[n>>2]=g;f[g+24>>2]=n;f[g+12>>2]=g;f[g+8>>2]=g;break}d=T<<((_|0)==31?0:25-(_>>>1)|0);j=f[n>>2]|0;while(1){if((f[j+4>>2]&-8|0)==(T|0)){H=97;break}$=j+16+(d>>>31<<2)|0;n=f[$>>2]|0;if(!n){H=96;break}else{d=d<<1;j=n}}if((H|0)==96){f[$>>2]=g;f[g+24>>2]=j;f[g+12>>2]=g;f[g+8>>2]=g;break}else if((H|0)==97){d=j+8|0;n=f[d>>2]|0;f[n+12>>2]=g;f[d>>2]=g;f[g+8>>2]=n;f[g+12>>2]=j;f[g+24>>2]=0;break}}else{n=T+e|0;f[S+4>>2]=n|3;d=S+n+4|0;f[d>>2]=f[d>>2]|1}while(0);o=S+8|0;u=b;return o|0}else B=e}else B=e}else B=-1;while(0);S=f[4514]|0;if(S>>>0>=B>>>0){T=S-B|0;$=f[4517]|0;if(T>>>0>15){_=$+B|0;f[4517]=_;f[4514]=T;f[_+4>>2]=T|1;f[$+S>>2]=T;f[$+4>>2]=B|3}else{f[4514]=0;f[4517]=0;f[$+4>>2]=S|3;T=$+S+4|0;f[T>>2]=f[T>>2]|1}o=$+8|0;u=b;return o|0}$=f[4515]|0;if($>>>0>B>>>0){T=$-B|0;f[4515]=T;S=f[4518]|0;_=S+B|0;f[4518]=_;f[_+4>>2]=T|1;f[S+4>>2]=B|3;o=S+8|0;u=b;return o|0}if(!(f[4630]|0)){f[4632]=4096;f[4631]=4096;f[4633]=-1;f[4634]=-1;f[4635]=0;f[4623]=0;f[4630]=c&-16^1431655768;aa=4096}else aa=f[4632]|0;c=B+48|0;S=B+47|0;T=aa+S|0;_=0-aa|0;aa=T&_;if(aa>>>0<=B>>>0){o=0;u=b;return o|0}X=f[4622]|0;if(X|0?(Y=f[4620]|0,Z=Y+aa|0,Z>>>0<=Y>>>0|Z>>>0>X>>>0):0){o=0;u=b;return o|0}b:do if(!(f[4623]&4)){X=f[4518]|0;c:do if(X){Z=18496;while(1){Y=f[Z>>2]|0;if(Y>>>0<=X>>>0?(ba=Z+4|0,(Y+(f[ba>>2]|0)|0)>>>0>X>>>0):0)break;Y=f[Z+8>>2]|0;if(!Y){H=118;break c}else Z=Y}j=T-$&_;if(j>>>0<2147483647){Y=Fl(j|0)|0;if((Y|0)==((f[Z>>2]|0)+(f[ba>>2]|0)|0))if((Y|0)==(-1|0))ca=j;else{da=j;ea=Y;H=135;break b}else{fa=Y;ga=j;H=126}}else ca=0}else H=118;while(0);do if((H|0)==118){X=Fl(0)|0;if((X|0)!=(-1|0)?(e=X,j=f[4631]|0,Y=j+-1|0,U=((Y&e|0)==0?0:(Y+e&0-j)-e|0)+aa|0,e=f[4620]|0,j=U+e|0,U>>>0>B>>>0&U>>>0<2147483647):0){Y=f[4622]|0;if(Y|0?j>>>0<=e>>>0|j>>>0>Y>>>0:0){ca=0;break}Y=Fl(U|0)|0;if((Y|0)==(X|0)){da=U;ea=X;H=135;break b}else{fa=Y;ga=U;H=126}}else ca=0}while(0);do if((H|0)==126){U=0-ga|0;if(!(c>>>0>ga>>>0&(ga>>>0<2147483647&(fa|0)!=(-1|0))))if((fa|0)==(-1|0)){ca=0;break}else{da=ga;ea=fa;H=135;break b}Y=f[4632]|0;X=S-ga+Y&0-Y;if(X>>>0>=2147483647){da=ga;ea=fa;H=135;break b}if((Fl(X|0)|0)==(-1|0)){Fl(U|0)|0;ca=0;break}else{da=X+ga|0;ea=fa;H=135;break b}}while(0);f[4623]=f[4623]|4;ha=ca;H=133}else{ha=0;H=133}while(0);if(((H|0)==133?aa>>>0<2147483647:0)?(ca=Fl(aa|0)|0,aa=Fl(0)|0,fa=aa-ca|0,ga=fa>>>0>(B+40|0)>>>0,!((ca|0)==(-1|0)|ga^1|ca>>>0>>0&((ca|0)!=(-1|0)&(aa|0)!=(-1|0))^1)):0){da=ga?fa:ha;ea=ca;H=135}if((H|0)==135){ca=(f[4620]|0)+da|0;f[4620]=ca;if(ca>>>0>(f[4621]|0)>>>0)f[4621]=ca;ca=f[4518]|0;do if(ca){ha=18496;while(1){ia=f[ha>>2]|0;ja=ha+4|0;ka=f[ja>>2]|0;if((ea|0)==(ia+ka|0)){H=143;break}fa=f[ha+8>>2]|0;if(!fa)break;else ha=fa}if(((H|0)==143?(f[ha+12>>2]&8|0)==0:0)?ea>>>0>ca>>>0&ia>>>0<=ca>>>0:0){f[ja>>2]=ka+da;fa=(f[4515]|0)+da|0;ga=ca+8|0;aa=(ga&7|0)==0?0:0-ga&7;ga=ca+aa|0;S=fa-aa|0;f[4518]=ga;f[4515]=S;f[ga+4>>2]=S|1;f[ca+fa+4>>2]=40;f[4519]=f[4634];break}if(ea>>>0<(f[4516]|0)>>>0)f[4516]=ea;fa=ea+da|0;S=18496;while(1){if((f[S>>2]|0)==(fa|0)){H=151;break}ga=f[S+8>>2]|0;if(!ga){la=18496;break}else S=ga}if((H|0)==151)if(!(f[S+12>>2]&8)){f[S>>2]=ea;ha=S+4|0;f[ha>>2]=(f[ha>>2]|0)+da;ha=ea+8|0;ga=ea+((ha&7|0)==0?0:0-ha&7)|0;ha=fa+8|0;aa=fa+((ha&7|0)==0?0:0-ha&7)|0;ha=ga+B|0;c=aa-ga-B|0;f[ga+4>>2]=B|3;do if((ca|0)!=(aa|0)){if((f[4517]|0)==(aa|0)){ba=(f[4514]|0)+c|0;f[4514]=ba;f[4517]=ha;f[ha+4>>2]=ba|1;f[ha+ba>>2]=ba;break}ba=f[aa+4>>2]|0;if((ba&3|0)==1){_=ba&-8;$=ba>>>3;d:do if(ba>>>0<256){T=f[aa+8>>2]|0;X=f[aa+12>>2]|0;if((X|0)==(T|0)){f[4512]=f[4512]&~(1<<$);break}else{f[T+12>>2]=X;f[X+8>>2]=T;break}}else{T=f[aa+24>>2]|0;X=f[aa+12>>2]|0;do if((X|0)==(aa|0)){U=aa+16|0;Y=U+4|0;j=f[Y>>2]|0;if(!j){e=f[U>>2]|0;if(!e){ma=0;break}else{na=e;oa=U}}else{na=j;oa=Y}while(1){Y=na+20|0;j=f[Y>>2]|0;if(j|0){na=j;oa=Y;continue}Y=na+16|0;j=f[Y>>2]|0;if(!j)break;else{na=j;oa=Y}}f[oa>>2]=0;ma=na}else{Y=f[aa+8>>2]|0;f[Y+12>>2]=X;f[X+8>>2]=Y;ma=X}while(0);if(!T)break;X=f[aa+28>>2]|0;Y=18352+(X<<2)|0;do if((f[Y>>2]|0)!=(aa|0)){f[T+16+(((f[T+16>>2]|0)!=(aa|0)&1)<<2)>>2]=ma;if(!ma)break d}else{f[Y>>2]=ma;if(ma|0)break;f[4513]=f[4513]&~(1<>2]=T;X=aa+16|0;Y=f[X>>2]|0;if(Y|0){f[ma+16>>2]=Y;f[Y+24>>2]=ma}Y=f[X+4>>2]|0;if(!Y)break;f[ma+20>>2]=Y;f[Y+24>>2]=ma}while(0);pa=aa+_|0;qa=_+c|0}else{pa=aa;qa=c}$=pa+4|0;f[$>>2]=f[$>>2]&-2;f[ha+4>>2]=qa|1;f[ha+qa>>2]=qa;$=qa>>>3;if(qa>>>0<256){ba=18088+($<<1<<2)|0;Z=f[4512]|0;Y=1<<$;if(!(Z&Y)){f[4512]=Z|Y;ra=ba;sa=ba+8|0}else{Y=ba+8|0;ra=f[Y>>2]|0;sa=Y}f[sa>>2]=ha;f[ra+12>>2]=ha;f[ha+8>>2]=ra;f[ha+12>>2]=ba;break}ba=qa>>>8;do if(!ba)ta=0;else{if(qa>>>0>16777215){ta=31;break}Y=(ba+1048320|0)>>>16&8;Z=ba<>>16&4;X=Z<<$;Z=(X+245760|0)>>>16&2;j=14-($|Y|Z)+(X<>>15)|0;ta=qa>>>(j+7|0)&1|j<<1}while(0);ba=18352+(ta<<2)|0;f[ha+28>>2]=ta;_=ha+16|0;f[_+4>>2]=0;f[_>>2]=0;_=f[4513]|0;j=1<>2]=ha;f[ha+24>>2]=ba;f[ha+12>>2]=ha;f[ha+8>>2]=ha;break}j=qa<<((ta|0)==31?0:25-(ta>>>1)|0);_=f[ba>>2]|0;while(1){if((f[_+4>>2]&-8|0)==(qa|0)){H=192;break}ua=_+16+(j>>>31<<2)|0;ba=f[ua>>2]|0;if(!ba){H=191;break}else{j=j<<1;_=ba}}if((H|0)==191){f[ua>>2]=ha;f[ha+24>>2]=_;f[ha+12>>2]=ha;f[ha+8>>2]=ha;break}else if((H|0)==192){j=_+8|0;ba=f[j>>2]|0;f[ba+12>>2]=ha;f[j>>2]=ha;f[ha+8>>2]=ba;f[ha+12>>2]=_;f[ha+24>>2]=0;break}}else{ba=(f[4515]|0)+c|0;f[4515]=ba;f[4518]=ha;f[ha+4>>2]=ba|1}while(0);o=ga+8|0;u=b;return o|0}else la=18496;while(1){ha=f[la>>2]|0;if(ha>>>0<=ca>>>0?(va=ha+(f[la+4>>2]|0)|0,va>>>0>ca>>>0):0)break;la=f[la+8>>2]|0}ga=va+-47|0;ha=ga+8|0;c=ga+((ha&7|0)==0?0:0-ha&7)|0;ha=ca+16|0;ga=c>>>0>>0?ca:c;c=ga+8|0;aa=da+-40|0;fa=ea+8|0;S=(fa&7|0)==0?0:0-fa&7;fa=ea+S|0;ba=aa-S|0;f[4518]=fa;f[4515]=ba;f[fa+4>>2]=ba|1;f[ea+aa+4>>2]=40;f[4519]=f[4634];aa=ga+4|0;f[aa>>2]=27;f[c>>2]=f[4624];f[c+4>>2]=f[4625];f[c+8>>2]=f[4626];f[c+12>>2]=f[4627];f[4624]=ea;f[4625]=da;f[4627]=0;f[4626]=c;c=ga+24|0;do{ba=c;c=c+4|0;f[c>>2]=7}while((ba+8|0)>>>0>>0);if((ga|0)!=(ca|0)){c=ga-ca|0;f[aa>>2]=f[aa>>2]&-2;f[ca+4>>2]=c|1;f[ga>>2]=c;ba=c>>>3;if(c>>>0<256){fa=18088+(ba<<1<<2)|0;S=f[4512]|0;j=1<>2]|0;xa=j}f[xa>>2]=ca;f[wa+12>>2]=ca;f[ca+8>>2]=wa;f[ca+12>>2]=fa;break}fa=c>>>8;if(fa)if(c>>>0>16777215)ya=31;else{j=(fa+1048320|0)>>>16&8;S=fa<>>16&4;ba=S<>>16&2;Z=14-(fa|j|S)+(ba<>>15)|0;ya=c>>>(Z+7|0)&1|Z<<1}else ya=0;Z=18352+(ya<<2)|0;f[ca+28>>2]=ya;f[ca+20>>2]=0;f[ha>>2]=0;S=f[4513]|0;ba=1<>2]=ca;f[ca+24>>2]=Z;f[ca+12>>2]=ca;f[ca+8>>2]=ca;break}ba=c<<((ya|0)==31?0:25-(ya>>>1)|0);S=f[Z>>2]|0;while(1){if((f[S+4>>2]&-8|0)==(c|0)){H=213;break}za=S+16+(ba>>>31<<2)|0;Z=f[za>>2]|0;if(!Z){H=212;break}else{ba=ba<<1;S=Z}}if((H|0)==212){f[za>>2]=ca;f[ca+24>>2]=S;f[ca+12>>2]=ca;f[ca+8>>2]=ca;break}else if((H|0)==213){ba=S+8|0;c=f[ba>>2]|0;f[c+12>>2]=ca;f[ba>>2]=ca;f[ca+8>>2]=c;f[ca+12>>2]=S;f[ca+24>>2]=0;break}}}else{c=f[4516]|0;if((c|0)==0|ea>>>0>>0)f[4516]=ea;f[4624]=ea;f[4625]=da;f[4627]=0;f[4521]=f[4630];f[4520]=-1;f[4525]=18088;f[4524]=18088;f[4527]=18096;f[4526]=18096;f[4529]=18104;f[4528]=18104;f[4531]=18112;f[4530]=18112;f[4533]=18120;f[4532]=18120;f[4535]=18128;f[4534]=18128;f[4537]=18136;f[4536]=18136;f[4539]=18144;f[4538]=18144;f[4541]=18152;f[4540]=18152;f[4543]=18160;f[4542]=18160;f[4545]=18168;f[4544]=18168;f[4547]=18176;f[4546]=18176;f[4549]=18184;f[4548]=18184;f[4551]=18192;f[4550]=18192;f[4553]=18200;f[4552]=18200;f[4555]=18208;f[4554]=18208;f[4557]=18216;f[4556]=18216;f[4559]=18224;f[4558]=18224;f[4561]=18232;f[4560]=18232;f[4563]=18240;f[4562]=18240;f[4565]=18248;f[4564]=18248;f[4567]=18256;f[4566]=18256;f[4569]=18264;f[4568]=18264;f[4571]=18272;f[4570]=18272;f[4573]=18280;f[4572]=18280;f[4575]=18288;f[4574]=18288;f[4577]=18296;f[4576]=18296;f[4579]=18304;f[4578]=18304;f[4581]=18312;f[4580]=18312;f[4583]=18320;f[4582]=18320;f[4585]=18328;f[4584]=18328;f[4587]=18336;f[4586]=18336;c=da+-40|0;ba=ea+8|0;ha=(ba&7|0)==0?0:0-ba&7;ba=ea+ha|0;ga=c-ha|0;f[4518]=ba;f[4515]=ga;f[ba+4>>2]=ga|1;f[ea+c+4>>2]=40;f[4519]=f[4634]}while(0);ea=f[4515]|0;if(ea>>>0>B>>>0){da=ea-B|0;f[4515]=da;ea=f[4518]|0;ca=ea+B|0;f[4518]=ca;f[ca+4>>2]=da|1;f[ea+4>>2]=B|3;o=ea+8|0;u=b;return o|0}}ea=ir()|0;f[ea>>2]=12;o=0;u=b;return o|0}function ab(a,c,d,e,g,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0.0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0;i=u;u=u+240|0;j=i+104|0;k=i+224|0;l=i+176|0;m=i+160|0;n=i+228|0;o=i+72|0;p=i+40|0;q=i+132|0;r=i;s=i+172|0;t=i+156|0;v=i+152|0;w=i+148|0;x=i+144|0;y=i+128|0;z=a+8|0;Ah(z,c,e,g);e=f[a+48>>2]|0;A=f[a+52>>2]|0;B=l;C=B+48|0;do{f[B>>2]=0;B=B+4|0}while((B|0)<(C|0));if(!g){D=0;E=0}else{oi(l,g);D=f[l+12>>2]|0;E=f[l+16>>2]|0}B=l+16|0;C=E-D>>2;F=D;D=E;if(C>>>0>=g>>>0){if(C>>>0>g>>>0?(E=F+(g<<2)|0,(E|0)!=(D|0)):0)f[B>>2]=D+(~((D+-4-E|0)>>>2)<<2)}else oi(l+12|0,g-C|0);C=l+24|0;E=l+28|0;D=f[E>>2]|0;B=f[C>>2]|0;F=D-B>>2;G=B;B=D;if(F>>>0>=g>>>0){if(F>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[E>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else oi(C,g-F|0);F=l+36|0;C=l+40|0;D=f[C>>2]|0;B=f[F>>2]|0;E=D-B>>2;G=B;B=D;if(E>>>0>=g>>>0){if(E>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[C>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else oi(F,g-E|0);f[m>>2]=0;E=m+4|0;f[E>>2]=0;f[m+8>>2]=0;F=(g|0)==0;do if(!F)if(g>>>0>1073741823)mq(m);else{D=g<<2;B=dn(D)|0;f[m>>2]=B;C=B+(g<<2)|0;f[m+8>>2]=C;hj(B|0,0,D|0)|0;f[E>>2]=C;break}while(0);C=a+152|0;D=a+156|0;B=f[D>>2]|0;G=f[C>>2]|0;H=B-G>>2;L=G;G=B;if(H>>>0>=g>>>0){if(H>>>0>g>>>0?(B=L+(g<<2)|0,(B|0)!=(G|0)):0)f[D>>2]=G+(~((G+-4-B|0)>>>2)<<2)}else oi(C,g-H|0);f[o>>2]=0;f[o+4>>2]=0;f[o+8>>2]=0;f[o+12>>2]=0;f[o+16>>2]=0;f[o+20>>2]=0;f[o+24>>2]=0;f[o+28>>2]=0;f[p>>2]=0;f[p+4>>2]=0;f[p+8>>2]=0;f[p+12>>2]=0;f[p+16>>2]=0;f[p+20>>2]=0;f[p+24>>2]=0;f[p+28>>2]=0;f[q>>2]=0;H=q+4|0;f[H>>2]=0;f[q+8>>2]=0;if(F){M=0;N=0;O=0;P=0}else{F=g<<2;B=dn(F)|0;f[q>>2]=B;G=B+(g<<2)|0;f[q+8>>2]=G;hj(B|0,0,F|0)|0;f[H>>2]=G;M=B;N=G;O=G;P=B}B=a+56|0;G=f[B>>2]|0;F=f[G+4>>2]|0;D=f[G>>2]|0;L=F-D|0;a:do if((L|0)>4){Q=L>>>2;R=e+64|0;S=e+28|0;T=(g|0)>0;U=r+4|0;V=r+8|0;Z=r+12|0;_=a+152|0;$=a+112|0;aa=r+16|0;ba=r+28|0;ca=a+16|0;da=a+32|0;ea=a+12|0;fa=a+28|0;ga=a+20|0;ha=a+24|0;ia=r+28|0;ja=r+16|0;ka=r+20|0;la=r+32|0;ma=n+1|0;na=g<<2;oa=(g|0)==1;pa=Q+-1|0;if(F-D>>2>>>0>pa>>>0){qa=Q;ra=pa;sa=D;ta=M;ua=P;va=O;wa=M;xa=N;ya=M;za=N}else{Aa=G;mq(Aa)}b:while(1){pa=f[sa+(ra<<2)>>2]|0;Q=(((pa>>>0)%3|0|0)==0?2:-1)+pa|0;Ba=Q>>>5;Ca=1<<(Q&31);Da=(pa|0)==-1|(Q|0)==-1;Ea=1;Fa=0;Ga=pa;c:while(1){Ha=Ea^1;Ia=Fa;Ja=Ga;while(1){if((Ja|0)==-1){Ka=Ia;break c}La=f[l+(Ia*12|0)>>2]|0;if(((f[(f[e>>2]|0)+(Ja>>>5<<2)>>2]&1<<(Ja&31)|0)==0?(Ma=f[(f[(f[R>>2]|0)+12>>2]|0)+(Ja<<2)>>2]|0,(Ma|0)!=-1):0)?(Na=f[S>>2]|0,Oa=f[A>>2]|0,Pa=f[Oa+(f[Na+(Ma<<2)>>2]<<2)>>2]|0,Qa=Ma+1|0,Ra=f[Oa+(f[Na+((((Qa>>>0)%3|0|0)==0?Ma+-2|0:Qa)<<2)>>2]<<2)>>2]|0,Qa=f[Oa+(f[Na+((((Ma>>>0)%3|0|0)==0?2:-1)+Ma<<2)>>2]<<2)>>2]|0,(Pa|0)<(ra|0)&(Ra|0)<(ra|0)&(Qa|0)<(ra|0)):0){Ma=X(Pa,g)|0;Pa=X(Ra,g)|0;Ra=X(Qa,g)|0;if(T){Qa=0;do{f[La+(Qa<<2)>>2]=(f[c+(Qa+Ra<<2)>>2]|0)+(f[c+(Qa+Pa<<2)>>2]|0)-(f[c+(Qa+Ma<<2)>>2]|0);Qa=Qa+1|0}while((Qa|0)!=(g|0))}Qa=Ia+1|0;if((Qa|0)==4){Ka=4;break c}else Sa=Qa}else Sa=Ia;do if(Ea){Qa=Ja+1|0;Ma=((Qa>>>0)%3|0|0)==0?Ja+-2|0:Qa;if(((Ma|0)!=-1?(f[(f[e>>2]|0)+(Ma>>>5<<2)>>2]&1<<(Ma&31)|0)==0:0)?(Qa=f[(f[(f[R>>2]|0)+12>>2]|0)+(Ma<<2)>>2]|0,Ma=Qa+1|0,(Qa|0)!=-1):0)Ta=((Ma>>>0)%3|0|0)==0?Qa+-2|0:Ma;else Ta=-1}else{Ma=(((Ja>>>0)%3|0|0)==0?2:-1)+Ja|0;if(((Ma|0)!=-1?(f[(f[e>>2]|0)+(Ma>>>5<<2)>>2]&1<<(Ma&31)|0)==0:0)?(Qa=f[(f[(f[R>>2]|0)+12>>2]|0)+(Ma<<2)>>2]|0,(Qa|0)!=-1):0)if(!((Qa>>>0)%3|0)){Ta=Qa+2|0;break}else{Ta=Qa+-1|0;break}else Ta=-1}while(0);if((Ta|0)==(pa|0)){Ka=Sa;break c}if((Ta|0)!=-1|Ha){Ia=Sa;Ja=Ta}else break}if(Da){Ea=0;Fa=Sa;Ga=-1;continue}if(f[(f[e>>2]|0)+(Ba<<2)>>2]&Ca|0){Ea=0;Fa=Sa;Ga=-1;continue}Ja=f[(f[(f[R>>2]|0)+12>>2]|0)+(Q<<2)>>2]|0;if((Ja|0)==-1){Ea=0;Fa=Sa;Ga=-1;continue}if(!((Ja>>>0)%3|0)){Ea=0;Fa=Sa;Ga=Ja+2|0;continue}else{Ea=0;Fa=Sa;Ga=Ja+-1|0;continue}}Ga=X(ra,g)|0;f[r>>2]=0;f[U>>2]=0;b[V>>0]=0;f[Z>>2]=0;f[Z+4>>2]=0;f[Z+8>>2]=0;f[Z+12>>2]=0;f[Z+16>>2]=0;f[Z+20>>2]=0;f[Z+24>>2]=0;Fa=c+((X(qa+-2|0,g)|0)<<2)|0;Ea=c+(Ga<<2)|0;Q=f[_>>2]|0;if(T){Ca=0;Ba=0;while(1){Da=(f[Fa+(Ca<<2)>>2]|0)-(f[Ea+(Ca<<2)>>2]|0)|0;pa=((Da|0)>-1?Da:0-Da|0)+Ba|0;f[ta+(Ca<<2)>>2]=Da;f[Q+(Ca<<2)>>2]=Da<<1^Da>>31;Ca=Ca+1|0;if((Ca|0)==(g|0)){Ua=pa;break}else Ba=pa}}else Ua=0;ho(j,$,Q,g);Ba=Tk(j)|0;Ca=I;pa=om(j)|0;Da=Tn(pa|0,I|0,Ba|0,Ca|0)|0;Ca=I;Ba=(Ka|0)>0;if(Ba){pa=Ka+-1|0;Ja=p+(pa<<3)|0;Ia=Ja;Ha=Tn(f[Ia>>2]|0,f[Ia+4>>2]|0,Ka|0,((Ka|0)<0)<<31>>31|0)|0;Ia=I;Qa=Ja;f[Qa>>2]=Ha;f[Qa+4>>2]=Ia;Va=+W(+(+jm(Ha,f[o+(pa<<3)>>2]|0)*(+(Ha>>>0)+4294967296.0*+(Ia|0))));Ia=Tn(Da|0,Ca|0,~~Va>>>0|0,(+K(Va)>=1.0?(Va>0.0?~~+Y(+J(Va/4294967296.0),4294967295.0)>>>0:~~+W((Va-+(~~Va>>>0))/4294967296.0)>>>0):0)|0)|0;Wa=Ia}else Wa=Da;Da=r;f[Da>>2]=Wa;f[Da+4>>2]=Ua;b[V>>0]=0;f[Z>>2]=0;Mf(aa,Fa,Fa+(g<<2)|0);f[s>>2]=ua;f[t>>2]=va;f[k>>2]=f[s>>2];f[j>>2]=f[t>>2];tf(ba,k,j);if((Ka|0)<1){Xa=za;Ya=ya;Za=xa;_a=wa;$a=va;ab=ua;bb=ua}else{Da=n+Ka|0;Ia=f[q>>2]|0;Ca=Ka+-1|0;Ha=o+(Ca<<3)|0;pa=p+(Ca<<3)|0;Ca=Ia;Qa=f[H>>2]|0;Ja=Da+-1|0;Ma=(Ja|0)==(n|0);Pa=Da+-2|0;Ra=ma>>>0>>0;La=~Ka;Na=Ka+2+((La|0)>-2?La:-2)|0;La=Qa;Oa=Ja>>>0>n>>>0;cb=0;db=1;while(1){cb=cb+1|0;hj(n|0,1,Na|0)|0;hj(n|0,0,cb|0)|0;d:while(1){if(T){hj(f[m>>2]|0,0,na|0)|0;eb=f[m>>2]|0;fb=0;gb=0;while(1){if(!(b[n+fb>>0]|0)){hb=f[l+(fb*12|0)>>2]|0;ib=0;do{jb=eb+(ib<<2)|0;f[jb>>2]=(f[jb>>2]|0)+(f[hb+(ib<<2)>>2]|0);ib=ib+1|0}while((ib|0)!=(g|0));kb=(1<>0]|0))mb=(1<>2]|0;do if(T){f[fb>>2]=(f[fb>>2]|0)/(db|0)|0;if(!oa){gb=1;do{eb=fb+(gb<<2)|0;f[eb>>2]=(f[eb>>2]|0)/(db|0)|0;gb=gb+1|0}while((gb|0)!=(g|0));gb=f[_>>2]|0;if(T)nb=gb;else{ob=0;pb=gb;break}}else nb=f[_>>2]|0;gb=0;eb=0;while(1){ib=(f[fb+(gb<<2)>>2]|0)-(f[Ea+(gb<<2)>>2]|0)|0;hb=((ib|0)>-1?ib:0-ib|0)+eb|0;f[Ia+(gb<<2)>>2]=ib;f[nb+(gb<<2)>>2]=ib<<1^ib>>31;gb=gb+1|0;if((gb|0)==(g|0)){ob=hb;pb=nb;break}else eb=hb}}else{ob=0;pb=f[_>>2]|0}while(0);ho(j,$,pb,g);fb=Tk(j)|0;eb=I;gb=om(j)|0;hb=Tn(gb|0,I|0,fb|0,eb|0)|0;eb=I;if(Ba){fb=Ha;gb=Tn(f[fb>>2]|0,f[fb+4>>2]|0,db|0,0)|0;fb=pa;ib=f[fb>>2]|0;jb=f[fb+4>>2]|0;Va=+W(+(+jm(ib,gb)*(+(ib>>>0)+4294967296.0*+(jb|0))));jb=Tn(hb|0,eb|0,~~Va>>>0|0,(+K(Va)>=1.0?(Va>0.0?~~+Y(+J(Va/4294967296.0),4294967295.0)>>>0:~~+W((Va-+(~~Va>>>0))/4294967296.0)>>>0):0)|0)|0;qb=jb}else qb=hb;hb=f[r>>2]|0;if(!((qb|0)>=(hb|0)?!((qb|0)<=(hb|0)?(ob|0)<(f[U>>2]|0):0):0)){hb=r;f[hb>>2]=qb;f[hb+4>>2]=ob;b[V>>0]=lb;f[Z>>2]=db;f[v>>2]=f[m>>2];f[w>>2]=f[E>>2];f[k>>2]=f[v>>2];f[j>>2]=f[w>>2];tf(aa,k,j);f[x>>2]=Ca;f[y>>2]=Qa;f[k>>2]=f[x>>2];f[j>>2]=f[y>>2];tf(ba,k,j)}if(Ma)break;rb=b[Ja>>0]|0;hb=-1;jb=rb;while(1){eb=hb+-1|0;sb=Da+eb|0;ib=jb;jb=b[sb>>0]|0;if((jb&255)<(ib&255))break;if((sb|0)==(n|0)){tb=86;break d}else hb=eb}eb=Da+hb|0;if((jb&255)<(rb&255)){ub=Ja;vb=rb}else{ib=Da;gb=Ja;while(1){fb=gb+-1|0;if((jb&255)<(h[ib+-2>>0]|0)){ub=fb;vb=1;break}else{wb=gb;gb=fb;ib=wb}}}b[sb>>0]=vb;b[ub>>0]=jb;if((hb|0)<-1){xb=eb;yb=Ja}else continue;while(1){ib=b[xb>>0]|0;b[xb>>0]=b[yb>>0]|0;b[yb>>0]=ib;ib=xb+1|0;gb=yb+-1|0;if(ib>>>0>>0){xb=ib;yb=gb}else continue d}}if(((tb|0)==86?(tb=0,Oa):0)?(eb=b[n>>0]|0,b[n>>0]=rb,b[Ja>>0]=eb,Ra):0){eb=Pa;hb=ma;do{jb=b[hb>>0]|0;b[hb>>0]=b[eb>>0]|0;b[eb>>0]=jb;hb=hb+1|0;eb=eb+-1|0}while(hb>>>0>>0)}if((db|0)>=(Ka|0)){Xa=La;Ya=Ia;Za=La;_a=Ia;$a=Qa;ab=Ca;bb=Ia;break}else db=db+1|0}}if(Ba){db=f[Z>>2]|0;Ia=o+(Ka+-1<<3)|0;Ca=Ia;Qa=Tn(f[Ca>>2]|0,f[Ca+4>>2]|0,db|0,((db|0)<0)<<31>>31|0)|0;db=Ia;f[db>>2]=Qa;f[db+4>>2]=I}if(T){db=f[ba>>2]|0;Qa=f[C>>2]|0;Ia=0;do{Ca=f[db+(Ia<<2)>>2]|0;f[Qa+(Ia<<2)>>2]=Ca<<1^Ca>>31;Ia=Ia+1|0}while((Ia|0)!=(g|0));zb=Qa}else zb=f[C>>2]|0;go(j,$,zb,g);if(Ba){Qa=Ka+-1|0;Ab=a+60+(Qa*12|0)|0;Ia=a+60+(Qa*12|0)+4|0;db=a+60+(Qa*12|0)+8|0;Qa=0;do{Ca=f[Ia>>2]|0;La=f[db>>2]|0;Pa=(Ca|0)==(La<<5|0);if(!(1<>0])){if(Pa){if((Ca+1|0)<0){tb=114;break b}Ra=La<<6;Ja=Ca+32&-32;hi(Ab,Ca>>>0<1073741823?(Ra>>>0>>0?Ja:Ra):2147483647);Bb=f[Ia>>2]|0}else Bb=Ca;f[Ia>>2]=Bb+1;Ra=(f[Ab>>2]|0)+(Bb>>>5<<2)|0;f[Ra>>2]=f[Ra>>2]|1<<(Bb&31)}else{if(Pa){if((Ca+1|0)<0){tb=119;break b}Pa=La<<6;La=Ca+32&-32;hi(Ab,Ca>>>0<1073741823?(Pa>>>0>>0?La:Pa):2147483647);Cb=f[Ia>>2]|0}else Cb=Ca;f[Ia>>2]=Cb+1;Ca=(f[Ab>>2]|0)+(Cb>>>5<<2)|0;f[Ca>>2]=f[Ca>>2]&~(1<<(Cb&31))}Qa=Qa+1|0}while((Qa|0)<(Ka|0))}Qa=d+(Ga<<2)|0;Ia=f[z>>2]|0;if((Ia|0)>0){db=0;Ba=f[aa>>2]|0;Ca=Ia;while(1){if((Ca|0)>0){Ia=0;do{Pa=f[Ba+(Ia<<2)>>2]|0;La=f[ca>>2]|0;if((Pa|0)>(La|0)){Ra=f[da>>2]|0;f[Ra+(Ia<<2)>>2]=La;Db=Ra}else{Ra=f[ea>>2]|0;La=f[da>>2]|0;f[La+(Ia<<2)>>2]=(Pa|0)<(Ra|0)?Ra:Pa;Db=La}Ia=Ia+1|0}while((Ia|0)<(f[z>>2]|0));Eb=Db}else Eb=f[da>>2]|0;Ia=(f[Ea+(db<<2)>>2]|0)-(f[Eb+(db<<2)>>2]|0)|0;La=Qa+(db<<2)|0;f[La>>2]=Ia;do if((Ia|0)<(f[fa>>2]|0)){Fb=(f[ga>>2]|0)+Ia|0;tb=109}else{if((Ia|0)<=(f[ha>>2]|0))break;Fb=Ia-(f[ga>>2]|0)|0;tb=109}while(0);if((tb|0)==109){tb=0;f[La>>2]=Fb}db=db+1|0;Ca=f[z>>2]|0;if((db|0)>=(Ca|0))break;else Ba=Eb}}Ba=f[ia>>2]|0;if(Ba|0){Ca=f[la>>2]|0;if((Ca|0)!=(Ba|0))f[la>>2]=Ca+(~((Ca+-4-Ba|0)>>>2)<<2);br(Ba)}Ba=f[ja>>2]|0;if(Ba|0){Ca=f[ka>>2]|0;if((Ca|0)!=(Ba|0))f[ka>>2]=Ca+(~((Ca+-4-Ba|0)>>>2)<<2);br(Ba)}if((qa|0)<=2){Gb=_a;Hb=Za;break a}Ba=f[B>>2]|0;sa=f[Ba>>2]|0;Ca=ra+-1|0;if((f[Ba+4>>2]|0)-sa>>2>>>0<=Ca>>>0){Aa=Ba;tb=18;break}else{Ba=ra;ra=Ca;ta=bb;ua=ab;va=$a;wa=_a;xa=Za;ya=Ya;za=Xa;qa=Ba}}if((tb|0)==18)mq(Aa);else if((tb|0)==114)mq(Ab);else if((tb|0)==119)mq(Ab)}else{Gb=M;Hb=N}while(0);N=f[l>>2]|0;if((g|0)>0?(f[N>>2]=0,(g|0)!=1):0){M=1;do{f[N+(M<<2)>>2]=0;M=M+1|0}while((M|0)!=(g|0))}g=f[z>>2]|0;if((g|0)>0){M=a+16|0;Ab=a+32|0;Aa=a+12|0;qa=a+28|0;Xa=a+20|0;za=a+24|0;a=0;Ya=N;N=g;while(1){if((N|0)>0){g=0;do{ya=f[Ya+(g<<2)>>2]|0;Za=f[M>>2]|0;if((ya|0)>(Za|0)){xa=f[Ab>>2]|0;f[xa+(g<<2)>>2]=Za;Ib=xa}else{xa=f[Aa>>2]|0;Za=f[Ab>>2]|0;f[Za+(g<<2)>>2]=(ya|0)<(xa|0)?xa:ya;Ib=Za}g=g+1|0}while((g|0)<(f[z>>2]|0));Jb=Ib}else Jb=f[Ab>>2]|0;g=(f[c+(a<<2)>>2]|0)-(f[Jb+(a<<2)>>2]|0)|0;Za=d+(a<<2)|0;f[Za>>2]=g;if((g|0)>=(f[qa>>2]|0)){if((g|0)>(f[za>>2]|0)){Kb=g-(f[Xa>>2]|0)|0;tb=145}}else{Kb=(f[Xa>>2]|0)+g|0;tb=145}if((tb|0)==145){tb=0;f[Za>>2]=Kb}a=a+1|0;N=f[z>>2]|0;if((a|0)>=(N|0))break;else Ya=Jb}}if(Gb|0){if((Hb|0)!=(Gb|0))f[H>>2]=Hb+(~((Hb+-4-Gb|0)>>>2)<<2);br(Gb)}Gb=f[m>>2]|0;if(Gb|0){m=f[E>>2]|0;if((m|0)!=(Gb|0))f[E>>2]=m+(~((m+-4-Gb|0)>>>2)<<2);br(Gb)}Gb=f[l+36>>2]|0;if(Gb|0){m=l+40|0;E=f[m>>2]|0;if((E|0)!=(Gb|0))f[m>>2]=E+(~((E+-4-Gb|0)>>>2)<<2);br(Gb)}Gb=f[l+24>>2]|0;if(Gb|0){E=l+28|0;m=f[E>>2]|0;if((m|0)!=(Gb|0))f[E>>2]=m+(~((m+-4-Gb|0)>>>2)<<2);br(Gb)}Gb=f[l+12>>2]|0;if(Gb|0){m=l+16|0;E=f[m>>2]|0;if((E|0)!=(Gb|0))f[m>>2]=E+(~((E+-4-Gb|0)>>>2)<<2);br(Gb)}Gb=f[l>>2]|0;if(!Gb){u=i;return 1}E=l+4|0;l=f[E>>2]|0;if((l|0)!=(Gb|0))f[E>>2]=l+(~((l+-4-Gb|0)>>>2)<<2);br(Gb);u=i;return 1}function bb(a,c,d,e,g,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0.0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0;i=u;u=u+240|0;j=i+104|0;k=i+224|0;l=i+176|0;m=i+160|0;n=i+228|0;o=i+72|0;p=i+40|0;q=i+132|0;r=i;s=i+172|0;t=i+156|0;v=i+152|0;w=i+148|0;x=i+144|0;y=i+128|0;z=a+8|0;Ah(z,c,e,g);e=f[a+48>>2]|0;A=f[a+52>>2]|0;B=l;C=B+48|0;do{f[B>>2]=0;B=B+4|0}while((B|0)<(C|0));if(!g){D=0;E=0}else{oi(l,g);D=f[l+12>>2]|0;E=f[l+16>>2]|0}B=l+16|0;C=E-D>>2;F=D;D=E;if(C>>>0>=g>>>0){if(C>>>0>g>>>0?(E=F+(g<<2)|0,(E|0)!=(D|0)):0)f[B>>2]=D+(~((D+-4-E|0)>>>2)<<2)}else oi(l+12|0,g-C|0);C=l+24|0;E=l+28|0;D=f[E>>2]|0;B=f[C>>2]|0;F=D-B>>2;G=B;B=D;if(F>>>0>=g>>>0){if(F>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[E>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else oi(C,g-F|0);F=l+36|0;C=l+40|0;D=f[C>>2]|0;B=f[F>>2]|0;E=D-B>>2;G=B;B=D;if(E>>>0>=g>>>0){if(E>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[C>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else oi(F,g-E|0);f[m>>2]=0;E=m+4|0;f[E>>2]=0;f[m+8>>2]=0;F=(g|0)==0;do if(!F)if(g>>>0>1073741823)mq(m);else{D=g<<2;B=dn(D)|0;f[m>>2]=B;C=B+(g<<2)|0;f[m+8>>2]=C;hj(B|0,0,D|0)|0;f[E>>2]=C;break}while(0);C=a+152|0;D=a+156|0;B=f[D>>2]|0;G=f[C>>2]|0;H=B-G>>2;L=G;G=B;if(H>>>0>=g>>>0){if(H>>>0>g>>>0?(B=L+(g<<2)|0,(B|0)!=(G|0)):0)f[D>>2]=G+(~((G+-4-B|0)>>>2)<<2)}else oi(C,g-H|0);f[o>>2]=0;f[o+4>>2]=0;f[o+8>>2]=0;f[o+12>>2]=0;f[o+16>>2]=0;f[o+20>>2]=0;f[o+24>>2]=0;f[o+28>>2]=0;f[p>>2]=0;f[p+4>>2]=0;f[p+8>>2]=0;f[p+12>>2]=0;f[p+16>>2]=0;f[p+20>>2]=0;f[p+24>>2]=0;f[p+28>>2]=0;f[q>>2]=0;H=q+4|0;f[H>>2]=0;f[q+8>>2]=0;if(F){M=0;N=0;O=0;P=0}else{F=g<<2;B=dn(F)|0;f[q>>2]=B;G=B+(g<<2)|0;f[q+8>>2]=G;hj(B|0,0,F|0)|0;f[H>>2]=G;M=B;N=G;O=G;P=B}B=a+56|0;G=f[B>>2]|0;F=f[G+4>>2]|0;D=f[G>>2]|0;L=F-D|0;a:do if((L|0)>4){Q=L>>>2;R=e+12|0;S=(g|0)>0;T=r+4|0;U=r+8|0;V=r+12|0;Z=a+152|0;_=a+112|0;$=r+16|0;aa=r+28|0;ba=a+16|0;ca=a+32|0;da=a+12|0;ea=a+28|0;fa=a+20|0;ga=a+24|0;ha=r+28|0;ia=r+16|0;ja=r+20|0;ka=r+32|0;la=n+1|0;ma=g<<2;na=(g|0)==1;oa=Q+-1|0;if(F-D>>2>>>0>oa>>>0){pa=Q;qa=oa;ra=D;sa=M;ta=P;ua=O;va=M;wa=N;xa=M;ya=N}else{za=G;mq(za)}b:while(1){oa=f[ra+(qa<<2)>>2]|0;Q=(((oa>>>0)%3|0|0)==0?2:-1)+oa|0;Aa=(oa|0)==-1|(Q|0)==-1;Ba=1;Ca=0;Da=oa;c:while(1){Ea=Ba^1;Fa=Ca;Ga=Da;while(1){if((Ga|0)==-1){Ha=Fa;break c}Ia=f[l+(Fa*12|0)>>2]|0;Ja=f[R>>2]|0;Ka=f[Ja+(Ga<<2)>>2]|0;if((Ka|0)!=-1){La=f[e>>2]|0;Ma=f[A>>2]|0;Na=f[Ma+(f[La+(Ka<<2)>>2]<<2)>>2]|0;Oa=Ka+1|0;Pa=((Oa>>>0)%3|0|0)==0?Ka+-2|0:Oa;if((Pa|0)==-1)Qa=-1;else Qa=f[La+(Pa<<2)>>2]|0;Pa=f[Ma+(Qa<<2)>>2]|0;Oa=(((Ka>>>0)%3|0|0)==0?2:-1)+Ka|0;if((Oa|0)==-1)Ra=-1;else Ra=f[La+(Oa<<2)>>2]|0;Oa=f[Ma+(Ra<<2)>>2]|0;if((Na|0)<(qa|0)&(Pa|0)<(qa|0)&(Oa|0)<(qa|0)){Ma=X(Na,g)|0;Na=X(Pa,g)|0;Pa=X(Oa,g)|0;if(S){Oa=0;do{f[Ia+(Oa<<2)>>2]=(f[c+(Oa+Pa<<2)>>2]|0)+(f[c+(Oa+Na<<2)>>2]|0)-(f[c+(Oa+Ma<<2)>>2]|0);Oa=Oa+1|0}while((Oa|0)!=(g|0))}Oa=Fa+1|0;if((Oa|0)==4){Ha=4;break c}else Sa=Oa}else Sa=Fa}else Sa=Fa;do if(Ba){Oa=Ga+1|0;Ma=((Oa>>>0)%3|0|0)==0?Ga+-2|0:Oa;if((Ma|0)!=-1?(Oa=f[Ja+(Ma<<2)>>2]|0,Ma=Oa+1|0,(Oa|0)!=-1):0)Ta=((Ma>>>0)%3|0|0)==0?Oa+-2|0:Ma;else Ta=-1}else{Ma=(((Ga>>>0)%3|0|0)==0?2:-1)+Ga|0;if((Ma|0)!=-1?(Oa=f[Ja+(Ma<<2)>>2]|0,(Oa|0)!=-1):0)if(!((Oa>>>0)%3|0)){Ta=Oa+2|0;break}else{Ta=Oa+-1|0;break}else Ta=-1}while(0);if((Ta|0)==(oa|0)){Ha=Sa;break c}if((Ta|0)!=-1|Ea){Fa=Sa;Ga=Ta}else break}if(Aa){Ba=0;Ca=Sa;Da=-1;continue}Ga=f[Ja+(Q<<2)>>2]|0;if((Ga|0)==-1){Ba=0;Ca=Sa;Da=-1;continue}if(!((Ga>>>0)%3|0)){Ba=0;Ca=Sa;Da=Ga+2|0;continue}else{Ba=0;Ca=Sa;Da=Ga+-1|0;continue}}Da=X(qa,g)|0;f[r>>2]=0;f[T>>2]=0;b[U>>0]=0;f[V>>2]=0;f[V+4>>2]=0;f[V+8>>2]=0;f[V+12>>2]=0;f[V+16>>2]=0;f[V+20>>2]=0;f[V+24>>2]=0;Ca=c+((X(pa+-2|0,g)|0)<<2)|0;Ba=c+(Da<<2)|0;Q=f[Z>>2]|0;if(S){Aa=0;oa=0;while(1){Ga=(f[Ca+(Aa<<2)>>2]|0)-(f[Ba+(Aa<<2)>>2]|0)|0;Fa=((Ga|0)>-1?Ga:0-Ga|0)+oa|0;f[sa+(Aa<<2)>>2]=Ga;f[Q+(Aa<<2)>>2]=Ga<<1^Ga>>31;Aa=Aa+1|0;if((Aa|0)==(g|0)){Ua=Fa;break}else oa=Fa}}else Ua=0;ho(j,_,Q,g);oa=Tk(j)|0;Aa=I;Fa=om(j)|0;Ga=Tn(Fa|0,I|0,oa|0,Aa|0)|0;Aa=I;oa=(Ha|0)>0;if(oa){Fa=Ha+-1|0;Ea=p+(Fa<<3)|0;Oa=Ea;Ma=Tn(f[Oa>>2]|0,f[Oa+4>>2]|0,Ha|0,((Ha|0)<0)<<31>>31|0)|0;Oa=I;Na=Ea;f[Na>>2]=Ma;f[Na+4>>2]=Oa;Va=+W(+(+jm(Ma,f[o+(Fa<<3)>>2]|0)*(+(Ma>>>0)+4294967296.0*+(Oa|0))));Oa=Tn(Ga|0,Aa|0,~~Va>>>0|0,(+K(Va)>=1.0?(Va>0.0?~~+Y(+J(Va/4294967296.0),4294967295.0)>>>0:~~+W((Va-+(~~Va>>>0))/4294967296.0)>>>0):0)|0)|0;Wa=Oa}else Wa=Ga;Ga=r;f[Ga>>2]=Wa;f[Ga+4>>2]=Ua;b[U>>0]=0;f[V>>2]=0;Mf($,Ca,Ca+(g<<2)|0);f[s>>2]=ta;f[t>>2]=ua;f[k>>2]=f[s>>2];f[j>>2]=f[t>>2];tf(aa,k,j);if((Ha|0)<1){Xa=ya;Ya=xa;Za=wa;_a=va;$a=ua;ab=ta;bb=ta}else{Ga=n+Ha|0;Oa=f[q>>2]|0;Aa=Ha+-1|0;Ma=o+(Aa<<3)|0;Fa=p+(Aa<<3)|0;Aa=Oa;Na=f[H>>2]|0;Ea=Ga+-1|0;Pa=(Ea|0)==(n|0);Ia=Ga+-2|0;La=la>>>0>>0;Ka=~Ha;cb=Ha+2+((Ka|0)>-2?Ka:-2)|0;Ka=Na;db=Ea>>>0>n>>>0;eb=0;fb=1;while(1){eb=eb+1|0;hj(n|0,1,cb|0)|0;hj(n|0,0,eb|0)|0;d:while(1){if(S){hj(f[m>>2]|0,0,ma|0)|0;gb=f[m>>2]|0;hb=0;ib=0;while(1){if(!(b[n+hb>>0]|0)){jb=f[l+(hb*12|0)>>2]|0;kb=0;do{lb=gb+(kb<<2)|0;f[lb>>2]=(f[lb>>2]|0)+(f[jb+(kb<<2)>>2]|0);kb=kb+1|0}while((kb|0)!=(g|0));mb=(1<>0]|0))ob=(1<>2]|0;do if(S){f[hb>>2]=(f[hb>>2]|0)/(fb|0)|0;if(!na){ib=1;do{gb=hb+(ib<<2)|0;f[gb>>2]=(f[gb>>2]|0)/(fb|0)|0;ib=ib+1|0}while((ib|0)!=(g|0));ib=f[Z>>2]|0;if(S)pb=ib;else{qb=0;rb=ib;break}}else pb=f[Z>>2]|0;ib=0;gb=0;while(1){kb=(f[hb+(ib<<2)>>2]|0)-(f[Ba+(ib<<2)>>2]|0)|0;jb=((kb|0)>-1?kb:0-kb|0)+gb|0;f[Oa+(ib<<2)>>2]=kb;f[pb+(ib<<2)>>2]=kb<<1^kb>>31;ib=ib+1|0;if((ib|0)==(g|0)){qb=jb;rb=pb;break}else gb=jb}}else{qb=0;rb=f[Z>>2]|0}while(0);ho(j,_,rb,g);hb=Tk(j)|0;gb=I;ib=om(j)|0;jb=Tn(ib|0,I|0,hb|0,gb|0)|0;gb=I;if(oa){hb=Ma;ib=Tn(f[hb>>2]|0,f[hb+4>>2]|0,fb|0,0)|0;hb=Fa;kb=f[hb>>2]|0;lb=f[hb+4>>2]|0;Va=+W(+(+jm(kb,ib)*(+(kb>>>0)+4294967296.0*+(lb|0))));lb=Tn(jb|0,gb|0,~~Va>>>0|0,(+K(Va)>=1.0?(Va>0.0?~~+Y(+J(Va/4294967296.0),4294967295.0)>>>0:~~+W((Va-+(~~Va>>>0))/4294967296.0)>>>0):0)|0)|0;sb=lb}else sb=jb;jb=f[r>>2]|0;if(!((sb|0)>=(jb|0)?!((sb|0)<=(jb|0)?(qb|0)<(f[T>>2]|0):0):0)){jb=r;f[jb>>2]=sb;f[jb+4>>2]=qb;b[U>>0]=nb;f[V>>2]=fb;f[v>>2]=f[m>>2];f[w>>2]=f[E>>2];f[k>>2]=f[v>>2];f[j>>2]=f[w>>2];tf($,k,j);f[x>>2]=Aa;f[y>>2]=Na;f[k>>2]=f[x>>2];f[j>>2]=f[y>>2];tf(aa,k,j)}if(Pa)break;tb=b[Ea>>0]|0;jb=-1;lb=tb;while(1){gb=jb+-1|0;ub=Ga+gb|0;kb=lb;lb=b[ub>>0]|0;if((lb&255)<(kb&255))break;if((ub|0)==(n|0)){vb=86;break d}else jb=gb}gb=Ga+jb|0;if((lb&255)<(tb&255)){wb=Ea;xb=tb}else{kb=Ga;ib=Ea;while(1){hb=ib+-1|0;if((lb&255)<(h[kb+-2>>0]|0)){wb=hb;xb=1;break}else{yb=ib;ib=hb;kb=yb}}}b[ub>>0]=xb;b[wb>>0]=lb;if((jb|0)<-1){zb=gb;Ab=Ea}else continue;while(1){kb=b[zb>>0]|0;b[zb>>0]=b[Ab>>0]|0;b[Ab>>0]=kb;kb=zb+1|0;ib=Ab+-1|0;if(kb>>>0>>0){zb=kb;Ab=ib}else continue d}}if(((vb|0)==86?(vb=0,db):0)?(gb=b[n>>0]|0,b[n>>0]=tb,b[Ea>>0]=gb,La):0){gb=Ia;jb=la;do{lb=b[jb>>0]|0;b[jb>>0]=b[gb>>0]|0;b[gb>>0]=lb;jb=jb+1|0;gb=gb+-1|0}while(jb>>>0>>0)}if((fb|0)>=(Ha|0)){Xa=Ka;Ya=Oa;Za=Ka;_a=Oa;$a=Na;ab=Aa;bb=Oa;break}else fb=fb+1|0}}if(oa){fb=f[V>>2]|0;Oa=o+(Ha+-1<<3)|0;Aa=Oa;Na=Tn(f[Aa>>2]|0,f[Aa+4>>2]|0,fb|0,((fb|0)<0)<<31>>31|0)|0;fb=Oa;f[fb>>2]=Na;f[fb+4>>2]=I}if(S){fb=f[aa>>2]|0;Na=f[C>>2]|0;Oa=0;do{Aa=f[fb+(Oa<<2)>>2]|0;f[Na+(Oa<<2)>>2]=Aa<<1^Aa>>31;Oa=Oa+1|0}while((Oa|0)!=(g|0));Bb=Na}else Bb=f[C>>2]|0;go(j,_,Bb,g);if(oa){Na=Ha+-1|0;Cb=a+60+(Na*12|0)|0;Oa=a+60+(Na*12|0)+4|0;fb=a+60+(Na*12|0)+8|0;Na=0;do{Aa=f[Oa>>2]|0;Ka=f[fb>>2]|0;Ia=(Aa|0)==(Ka<<5|0);if(!(1<>0])){if(Ia){if((Aa+1|0)<0){vb=114;break b}La=Ka<<6;Ea=Aa+32&-32;hi(Cb,Aa>>>0<1073741823?(La>>>0>>0?Ea:La):2147483647);Db=f[Oa>>2]|0}else Db=Aa;f[Oa>>2]=Db+1;La=(f[Cb>>2]|0)+(Db>>>5<<2)|0;f[La>>2]=f[La>>2]|1<<(Db&31)}else{if(Ia){if((Aa+1|0)<0){vb=119;break b}Ia=Ka<<6;Ka=Aa+32&-32;hi(Cb,Aa>>>0<1073741823?(Ia>>>0>>0?Ka:Ia):2147483647);Eb=f[Oa>>2]|0}else Eb=Aa;f[Oa>>2]=Eb+1;Aa=(f[Cb>>2]|0)+(Eb>>>5<<2)|0;f[Aa>>2]=f[Aa>>2]&~(1<<(Eb&31))}Na=Na+1|0}while((Na|0)<(Ha|0))}Na=d+(Da<<2)|0;Oa=f[z>>2]|0;if((Oa|0)>0){fb=0;oa=f[$>>2]|0;Aa=Oa;while(1){if((Aa|0)>0){Oa=0;do{Ia=f[oa+(Oa<<2)>>2]|0;Ka=f[ba>>2]|0;if((Ia|0)>(Ka|0)){La=f[ca>>2]|0;f[La+(Oa<<2)>>2]=Ka;Fb=La}else{La=f[da>>2]|0;Ka=f[ca>>2]|0;f[Ka+(Oa<<2)>>2]=(Ia|0)<(La|0)?La:Ia;Fb=Ka}Oa=Oa+1|0}while((Oa|0)<(f[z>>2]|0));Gb=Fb}else Gb=f[ca>>2]|0;Oa=(f[Ba+(fb<<2)>>2]|0)-(f[Gb+(fb<<2)>>2]|0)|0;Ka=Na+(fb<<2)|0;f[Ka>>2]=Oa;do if((Oa|0)<(f[ea>>2]|0)){Hb=(f[fa>>2]|0)+Oa|0;vb=109}else{if((Oa|0)<=(f[ga>>2]|0))break;Hb=Oa-(f[fa>>2]|0)|0;vb=109}while(0);if((vb|0)==109){vb=0;f[Ka>>2]=Hb}fb=fb+1|0;Aa=f[z>>2]|0;if((fb|0)>=(Aa|0))break;else oa=Gb}}oa=f[ha>>2]|0;if(oa|0){Aa=f[ka>>2]|0;if((Aa|0)!=(oa|0))f[ka>>2]=Aa+(~((Aa+-4-oa|0)>>>2)<<2);br(oa)}oa=f[ia>>2]|0;if(oa|0){Aa=f[ja>>2]|0;if((Aa|0)!=(oa|0))f[ja>>2]=Aa+(~((Aa+-4-oa|0)>>>2)<<2);br(oa)}if((pa|0)<=2){Ib=_a;Jb=Za;break a}oa=f[B>>2]|0;ra=f[oa>>2]|0;Aa=qa+-1|0;if((f[oa+4>>2]|0)-ra>>2>>>0<=Aa>>>0){za=oa;vb=18;break}else{oa=qa;qa=Aa;sa=bb;ta=ab;ua=$a;va=_a;wa=Za;xa=Ya;ya=Xa;pa=oa}}if((vb|0)==18)mq(za);else if((vb|0)==114)mq(Cb);else if((vb|0)==119)mq(Cb)}else{Ib=M;Jb=N}while(0);N=f[l>>2]|0;if((g|0)>0?(f[N>>2]=0,(g|0)!=1):0){M=1;do{f[N+(M<<2)>>2]=0;M=M+1|0}while((M|0)!=(g|0))}g=f[z>>2]|0;if((g|0)>0){M=a+16|0;Cb=a+32|0;za=a+12|0;pa=a+28|0;Xa=a+20|0;ya=a+24|0;a=0;Ya=N;N=g;while(1){if((N|0)>0){g=0;do{xa=f[Ya+(g<<2)>>2]|0;Za=f[M>>2]|0;if((xa|0)>(Za|0)){wa=f[Cb>>2]|0;f[wa+(g<<2)>>2]=Za;Kb=wa}else{wa=f[za>>2]|0;Za=f[Cb>>2]|0;f[Za+(g<<2)>>2]=(xa|0)<(wa|0)?wa:xa;Kb=Za}g=g+1|0}while((g|0)<(f[z>>2]|0));Lb=Kb}else Lb=f[Cb>>2]|0;g=(f[c+(a<<2)>>2]|0)-(f[Lb+(a<<2)>>2]|0)|0;Za=d+(a<<2)|0;f[Za>>2]=g;if((g|0)>=(f[pa>>2]|0)){if((g|0)>(f[ya>>2]|0)){Mb=g-(f[Xa>>2]|0)|0;vb=145}}else{Mb=(f[Xa>>2]|0)+g|0;vb=145}if((vb|0)==145){vb=0;f[Za>>2]=Mb}a=a+1|0;N=f[z>>2]|0;if((a|0)>=(N|0))break;else Ya=Lb}}if(Ib|0){if((Jb|0)!=(Ib|0))f[H>>2]=Jb+(~((Jb+-4-Ib|0)>>>2)<<2);br(Ib)}Ib=f[m>>2]|0;if(Ib|0){m=f[E>>2]|0;if((m|0)!=(Ib|0))f[E>>2]=m+(~((m+-4-Ib|0)>>>2)<<2);br(Ib)}Ib=f[l+36>>2]|0;if(Ib|0){m=l+40|0;E=f[m>>2]|0;if((E|0)!=(Ib|0))f[m>>2]=E+(~((E+-4-Ib|0)>>>2)<<2);br(Ib)}Ib=f[l+24>>2]|0;if(Ib|0){E=l+28|0;m=f[E>>2]|0;if((m|0)!=(Ib|0))f[E>>2]=m+(~((m+-4-Ib|0)>>>2)<<2);br(Ib)}Ib=f[l+12>>2]|0;if(Ib|0){m=l+16|0;E=f[m>>2]|0;if((E|0)!=(Ib|0))f[m>>2]=E+(~((E+-4-Ib|0)>>>2)<<2);br(Ib)}Ib=f[l>>2]|0;if(!Ib){u=i;return 1}E=l+4|0;l=f[E>>2]|0;if((l|0)!=(Ib|0))f[E>>2]=l+(~((l+-4-Ib|0)>>>2)<<2);br(Ib);u=i;return 1}function cb(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;b=u;u=u+16|0;c=b;d=b+8|0;e=b+4|0;f[d>>2]=a;do if(a>>>0>=212){g=(a>>>0)/210|0;h=g*210|0;f[e>>2]=a-h;i=0;j=g;g=(zl(6640,6832,e,c)|0)-6640>>2;k=h;a:while(1){l=(f[6640+(g<<2)>>2]|0)+k|0;h=5;while(1){if(h>>>0>=47){m=211;n=i;o=8;break}p=f[6448+(h<<2)>>2]|0;q=(l>>>0)/(p>>>0)|0;if(q>>>0

>>0){o=106;break a}if((l|0)==(X(q,p)|0)){r=i;break}else h=h+1|0}b:do if((o|0)==8){c:while(1){o=0;h=(l>>>0)/(m>>>0)|0;do if(h>>>0>=m>>>0)if((l|0)!=(X(h,m)|0)){p=m+10|0;q=(l>>>0)/(p>>>0)|0;if(q>>>0>=p>>>0)if((l|0)!=(X(q,p)|0)){q=m+12|0;s=(l>>>0)/(q>>>0)|0;if(s>>>0>=q>>>0)if((l|0)!=(X(s,q)|0)){s=m+16|0;t=(l>>>0)/(s>>>0)|0;if(t>>>0>=s>>>0)if((l|0)!=(X(t,s)|0)){t=m+18|0;v=(l>>>0)/(t>>>0)|0;if(v>>>0>=t>>>0)if((l|0)!=(X(v,t)|0)){v=m+22|0;w=(l>>>0)/(v>>>0)|0;if(w>>>0>=v>>>0)if((l|0)!=(X(w,v)|0)){w=m+28|0;x=(l>>>0)/(w>>>0)|0;if(x>>>0>=w>>>0)if((l|0)==(X(x,w)|0)){y=w;z=9;A=n}else{x=m+30|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+36|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+40|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+42|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+46|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+52|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+58|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+60|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+66|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+70|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+72|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+78|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+82|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+88|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+96|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+100|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+102|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+106|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+108|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+112|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+120|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+126|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+130|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+136|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+138|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+142|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+148|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+150|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+156|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+162|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+166|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+168|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+172|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+178|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+180|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+186|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+190|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+192|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+196|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+198|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+208|0;B=(l>>>0)/(x>>>0)|0;C=B>>>0>>0;D=(l|0)==(X(B,x)|0);y=C|D?x:m+210|0;z=C?1:D?9:0;A=C?l:n}else{y=w;z=1;A=l}}else{y=v;z=9;A=n}else{y=v;z=1;A=l}}else{y=t;z=9;A=n}else{y=t;z=1;A=l}}else{y=s;z=9;A=n}else{y=s;z=1;A=l}}else{y=q;z=9;A=n}else{y=q;z=1;A=l}}else{y=p;z=9;A=n}else{y=p;z=1;A=l}}else{y=m;z=9;A=n}else{y=m;z=1;A=l}while(0);switch(z&15){case 9:{r=A;break b;break}case 0:{m=y;n=A;o=8;break}default:break c}}if(!z)r=A;else{o=107;break a}}while(0);h=g+1|0;p=(h|0)==48;q=j+(p&1)|0;i=r;j=q;g=p?0:h;k=q*210|0}if((o|0)==106){f[d>>2]=l;E=l;break}else if((o|0)==107){f[d>>2]=l;E=A;break}}else{k=zl(6448,6640,d,c)|0;E=f[k>>2]|0}while(0);u=b;return E|0}function db(a,c,d,e,g,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0.0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0;i=u;u=u+256|0;e=i+104|0;j=i+240|0;k=i+224|0;l=i+160|0;m=i+140|0;n=i+248|0;o=i+72|0;p=i+40|0;q=i+128|0;r=i;s=i+232|0;t=i+220|0;v=i+216|0;w=i+212|0;x=i+208|0;y=i+152|0;z=f[a+28>>2]|0;A=f[a+32>>2]|0;B=l;C=B+48|0;do{f[B>>2]=0;B=B+4|0}while((B|0)<(C|0));if(!g){D=0;E=0}else{oi(l,g);D=f[l+12>>2]|0;E=f[l+16>>2]|0}B=l+16|0;C=E-D>>2;F=D;D=E;if(C>>>0>=g>>>0){if(C>>>0>g>>>0?(E=F+(g<<2)|0,(E|0)!=(D|0)):0)f[B>>2]=D+(~((D+-4-E|0)>>>2)<<2)}else oi(l+12|0,g-C|0);C=l+24|0;E=l+28|0;D=f[E>>2]|0;B=f[C>>2]|0;F=D-B>>2;G=B;B=D;if(F>>>0>=g>>>0){if(F>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[E>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else oi(C,g-F|0);F=l+36|0;C=l+40|0;D=f[C>>2]|0;B=f[F>>2]|0;E=D-B>>2;G=B;B=D;if(E>>>0>=g>>>0){if(E>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[C>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else oi(F,g-E|0);f[m>>2]=0;E=m+4|0;f[E>>2]=0;f[m+8>>2]=0;F=(g|0)==0;do if(!F)if(g>>>0>1073741823)mq(m);else{D=g<<2;B=dn(D)|0;f[m>>2]=B;C=B+(g<<2)|0;f[m+8>>2]=C;hj(B|0,0,D|0)|0;f[E>>2]=C;break}while(0);C=a+136|0;D=a+140|0;B=f[D>>2]|0;G=f[C>>2]|0;H=B-G>>2;L=G;G=B;if(H>>>0>=g>>>0){if(H>>>0>g>>>0?(B=L+(g<<2)|0,(B|0)!=(G|0)):0)f[D>>2]=G+(~((G+-4-B|0)>>>2)<<2)}else oi(C,g-H|0);f[o>>2]=0;f[o+4>>2]=0;f[o+8>>2]=0;f[o+12>>2]=0;f[o+16>>2]=0;f[o+20>>2]=0;f[o+24>>2]=0;f[o+28>>2]=0;f[p>>2]=0;f[p+4>>2]=0;f[p+8>>2]=0;f[p+12>>2]=0;f[p+16>>2]=0;f[p+20>>2]=0;f[p+24>>2]=0;f[p+28>>2]=0;f[q>>2]=0;H=q+4|0;f[H>>2]=0;f[q+8>>2]=0;if(F){M=0;N=0;O=0;P=0}else{F=g<<2;B=dn(F)|0;f[q>>2]=B;G=B+(g<<2)|0;f[q+8>>2]=G;hj(B|0,0,F|0)|0;f[H>>2]=G;M=B;N=G;O=G;P=B}B=a+36|0;G=f[B>>2]|0;F=f[G+4>>2]|0;D=f[G>>2]|0;L=F-D|0;a:do if((L|0)>4){Q=L>>>2;R=z+64|0;S=z+28|0;T=(g|0)>0;U=r+4|0;V=r+8|0;Z=r+12|0;_=a+136|0;$=a+96|0;aa=r+16|0;ba=r+28|0;ca=a+8|0;da=j+4|0;ea=k+4|0;fa=e+4|0;ga=r+28|0;ha=r+16|0;ia=r+20|0;ja=r+32|0;ka=n+1|0;la=g<<2;ma=(g|0)==1;na=Q+-1|0;if(F-D>>2>>>0>na>>>0){oa=Q;pa=na;qa=D;ra=M;sa=P;ta=O;ua=M;va=N;wa=M;xa=N}else{ya=G;mq(ya)}b:while(1){na=f[qa+(pa<<2)>>2]|0;Q=(((na>>>0)%3|0|0)==0?2:-1)+na|0;za=Q>>>5;Aa=1<<(Q&31);Ba=(na|0)==-1|(Q|0)==-1;Ca=1;Da=0;Ea=na;c:while(1){Fa=Ca^1;Ga=Da;Ha=Ea;while(1){if((Ha|0)==-1){Ia=Ga;break c}Ja=f[l+(Ga*12|0)>>2]|0;if(((f[(f[z>>2]|0)+(Ha>>>5<<2)>>2]&1<<(Ha&31)|0)==0?(Ka=f[(f[(f[R>>2]|0)+12>>2]|0)+(Ha<<2)>>2]|0,(Ka|0)!=-1):0)?(La=f[S>>2]|0,Ma=f[A>>2]|0,Na=f[Ma+(f[La+(Ka<<2)>>2]<<2)>>2]|0,Oa=Ka+1|0,Pa=f[Ma+(f[La+((((Oa>>>0)%3|0|0)==0?Ka+-2|0:Oa)<<2)>>2]<<2)>>2]|0,Oa=f[Ma+(f[La+((((Ka>>>0)%3|0|0)==0?2:-1)+Ka<<2)>>2]<<2)>>2]|0,(Na|0)<(pa|0)&(Pa|0)<(pa|0)&(Oa|0)<(pa|0)):0){Ka=X(Na,g)|0;Na=X(Pa,g)|0;Pa=X(Oa,g)|0;if(T){Oa=0;do{f[Ja+(Oa<<2)>>2]=(f[c+(Oa+Pa<<2)>>2]|0)+(f[c+(Oa+Na<<2)>>2]|0)-(f[c+(Oa+Ka<<2)>>2]|0);Oa=Oa+1|0}while((Oa|0)!=(g|0))}Oa=Ga+1|0;if((Oa|0)==4){Ia=4;break c}else Qa=Oa}else Qa=Ga;do if(Ca){Oa=Ha+1|0;Ka=((Oa>>>0)%3|0|0)==0?Ha+-2|0:Oa;if(((Ka|0)!=-1?(f[(f[z>>2]|0)+(Ka>>>5<<2)>>2]&1<<(Ka&31)|0)==0:0)?(Oa=f[(f[(f[R>>2]|0)+12>>2]|0)+(Ka<<2)>>2]|0,Ka=Oa+1|0,(Oa|0)!=-1):0)Ra=((Ka>>>0)%3|0|0)==0?Oa+-2|0:Ka;else Ra=-1}else{Ka=(((Ha>>>0)%3|0|0)==0?2:-1)+Ha|0;if(((Ka|0)!=-1?(f[(f[z>>2]|0)+(Ka>>>5<<2)>>2]&1<<(Ka&31)|0)==0:0)?(Oa=f[(f[(f[R>>2]|0)+12>>2]|0)+(Ka<<2)>>2]|0,(Oa|0)!=-1):0)if(!((Oa>>>0)%3|0)){Ra=Oa+2|0;break}else{Ra=Oa+-1|0;break}else Ra=-1}while(0);if((Ra|0)==(na|0)){Ia=Qa;break c}if((Ra|0)!=-1|Fa){Ga=Qa;Ha=Ra}else break}if(Ba){Ca=0;Da=Qa;Ea=-1;continue}if(f[(f[z>>2]|0)+(za<<2)>>2]&Aa|0){Ca=0;Da=Qa;Ea=-1;continue}Ha=f[(f[(f[R>>2]|0)+12>>2]|0)+(Q<<2)>>2]|0;if((Ha|0)==-1){Ca=0;Da=Qa;Ea=-1;continue}if(!((Ha>>>0)%3|0)){Ca=0;Da=Qa;Ea=Ha+2|0;continue}else{Ca=0;Da=Qa;Ea=Ha+-1|0;continue}}Ea=X(pa,g)|0;f[r>>2]=0;f[U>>2]=0;b[V>>0]=0;f[Z>>2]=0;f[Z+4>>2]=0;f[Z+8>>2]=0;f[Z+12>>2]=0;f[Z+16>>2]=0;f[Z+20>>2]=0;f[Z+24>>2]=0;Da=c+((X(oa+-2|0,g)|0)<<2)|0;Ca=c+(Ea<<2)|0;Q=f[_>>2]|0;if(T){Aa=0;za=0;while(1){Ba=(f[Da+(Aa<<2)>>2]|0)-(f[Ca+(Aa<<2)>>2]|0)|0;na=((Ba|0)>-1?Ba:0-Ba|0)+za|0;f[ra+(Aa<<2)>>2]=Ba;f[Q+(Aa<<2)>>2]=Ba<<1^Ba>>31;Aa=Aa+1|0;if((Aa|0)==(g|0)){Sa=na;break}else za=na}}else Sa=0;ho(e,$,Q,g);za=Tk(e)|0;Aa=I;na=om(e)|0;Ba=Tn(na|0,I|0,za|0,Aa|0)|0;Aa=I;za=(Ia|0)>0;if(za){na=Ia+-1|0;Ha=p+(na<<3)|0;Ga=Ha;Fa=Tn(f[Ga>>2]|0,f[Ga+4>>2]|0,Ia|0,((Ia|0)<0)<<31>>31|0)|0;Ga=I;Oa=Ha;f[Oa>>2]=Fa;f[Oa+4>>2]=Ga;Ta=+W(+(+jm(Fa,f[o+(na<<3)>>2]|0)*(+(Fa>>>0)+4294967296.0*+(Ga|0))));Ga=Tn(Ba|0,Aa|0,~~Ta>>>0|0,(+K(Ta)>=1.0?(Ta>0.0?~~+Y(+J(Ta/4294967296.0),4294967295.0)>>>0:~~+W((Ta-+(~~Ta>>>0))/4294967296.0)>>>0):0)|0)|0;Ua=Ga}else Ua=Ba;Ba=r;f[Ba>>2]=Ua;f[Ba+4>>2]=Sa;b[V>>0]=0;f[Z>>2]=0;Mf(aa,Da,Da+(g<<2)|0);f[s>>2]=sa;f[t>>2]=ta;f[j>>2]=f[s>>2];f[e>>2]=f[t>>2];tf(ba,j,e);if((Ia|0)<1){Va=xa;Wa=wa;Xa=va;Ya=ua;Za=ta;_a=sa;$a=sa}else{Ba=n+Ia|0;Ga=f[q>>2]|0;Aa=Ia+-1|0;Fa=o+(Aa<<3)|0;na=p+(Aa<<3)|0;Aa=Ga;Oa=f[H>>2]|0;Ha=Ba+-1|0;Ka=(Ha|0)==(n|0);Na=Ba+-2|0;Pa=ka>>>0>>0;Ja=~Ia;La=Ia+2+((Ja|0)>-2?Ja:-2)|0;Ja=Oa;Ma=Ha>>>0>n>>>0;ab=0;bb=1;while(1){ab=ab+1|0;hj(n|0,1,La|0)|0;hj(n|0,0,ab|0)|0;d:while(1){if(T){hj(f[m>>2]|0,0,la|0)|0;cb=f[m>>2]|0;db=0;eb=0;while(1){if(!(b[n+db>>0]|0)){fb=f[l+(db*12|0)>>2]|0;gb=0;do{hb=cb+(gb<<2)|0;f[hb>>2]=(f[hb>>2]|0)+(f[fb+(gb<<2)>>2]|0);gb=gb+1|0}while((gb|0)!=(g|0));ib=(1<>0]|0))kb=(1<>2]|0;do if(T){f[db>>2]=(f[db>>2]|0)/(bb|0)|0;if(!ma){eb=1;do{cb=db+(eb<<2)|0;f[cb>>2]=(f[cb>>2]|0)/(bb|0)|0;eb=eb+1|0}while((eb|0)!=(g|0));eb=f[_>>2]|0;if(T)lb=eb;else{mb=0;nb=eb;break}}else lb=f[_>>2]|0;eb=0;cb=0;while(1){gb=(f[db+(eb<<2)>>2]|0)-(f[Ca+(eb<<2)>>2]|0)|0;fb=((gb|0)>-1?gb:0-gb|0)+cb|0;f[Ga+(eb<<2)>>2]=gb;f[lb+(eb<<2)>>2]=gb<<1^gb>>31;eb=eb+1|0;if((eb|0)==(g|0)){mb=fb;nb=lb;break}else cb=fb}}else{mb=0;nb=f[_>>2]|0}while(0);ho(e,$,nb,g);db=Tk(e)|0;cb=I;eb=om(e)|0;fb=Tn(eb|0,I|0,db|0,cb|0)|0;cb=I;if(za){db=Fa;eb=Tn(f[db>>2]|0,f[db+4>>2]|0,bb|0,0)|0;db=na;gb=f[db>>2]|0;hb=f[db+4>>2]|0;Ta=+W(+(+jm(gb,eb)*(+(gb>>>0)+4294967296.0*+(hb|0))));hb=Tn(fb|0,cb|0,~~Ta>>>0|0,(+K(Ta)>=1.0?(Ta>0.0?~~+Y(+J(Ta/4294967296.0),4294967295.0)>>>0:~~+W((Ta-+(~~Ta>>>0))/4294967296.0)>>>0):0)|0)|0;ob=hb}else ob=fb;fb=f[r>>2]|0;if(!((ob|0)>=(fb|0)?!((ob|0)<=(fb|0)?(mb|0)<(f[U>>2]|0):0):0)){fb=r;f[fb>>2]=ob;f[fb+4>>2]=mb;b[V>>0]=jb;f[Z>>2]=bb;f[v>>2]=f[m>>2];f[w>>2]=f[E>>2];f[j>>2]=f[v>>2];f[e>>2]=f[w>>2];tf(aa,j,e);f[x>>2]=Aa;f[y>>2]=Oa;f[j>>2]=f[x>>2];f[e>>2]=f[y>>2];tf(ba,j,e)}if(Ka)break;pb=b[Ha>>0]|0;fb=-1;hb=pb;while(1){cb=fb+-1|0;qb=Ba+cb|0;gb=hb;hb=b[qb>>0]|0;if((hb&255)<(gb&255))break;if((qb|0)==(n|0)){rb=86;break d}else fb=cb}cb=Ba+fb|0;if((hb&255)<(pb&255)){sb=Ha;tb=pb}else{gb=Ba;eb=Ha;while(1){db=eb+-1|0;if((hb&255)<(h[gb+-2>>0]|0)){sb=db;tb=1;break}else{ub=eb;eb=db;gb=ub}}}b[qb>>0]=tb;b[sb>>0]=hb;if((fb|0)<-1){vb=cb;wb=Ha}else continue;while(1){gb=b[vb>>0]|0;b[vb>>0]=b[wb>>0]|0;b[wb>>0]=gb;gb=vb+1|0;eb=wb+-1|0;if(gb>>>0>>0){vb=gb;wb=eb}else continue d}}if(((rb|0)==86?(rb=0,Ma):0)?(cb=b[n>>0]|0,b[n>>0]=pb,b[Ha>>0]=cb,Pa):0){cb=Na;fb=ka;do{hb=b[fb>>0]|0;b[fb>>0]=b[cb>>0]|0;b[cb>>0]=hb;fb=fb+1|0;cb=cb+-1|0}while(fb>>>0>>0)}if((bb|0)>=(Ia|0)){Va=Ja;Wa=Ga;Xa=Ja;Ya=Ga;Za=Oa;_a=Aa;$a=Ga;break}else bb=bb+1|0}}if(za){bb=f[Z>>2]|0;Ga=o+(Ia+-1<<3)|0;Aa=Ga;Oa=Tn(f[Aa>>2]|0,f[Aa+4>>2]|0,bb|0,((bb|0)<0)<<31>>31|0)|0;bb=Ga;f[bb>>2]=Oa;f[bb+4>>2]=I}if(T){bb=f[ba>>2]|0;Oa=f[C>>2]|0;Ga=0;do{Aa=f[bb+(Ga<<2)>>2]|0;f[Oa+(Ga<<2)>>2]=Aa<<1^Aa>>31;Ga=Ga+1|0}while((Ga|0)!=(g|0));xb=Oa}else xb=f[C>>2]|0;go(e,$,xb,g);if(za){Oa=Ia+-1|0;yb=a+40+(Oa*12|0)|0;Ga=a+40+(Oa*12|0)+4|0;bb=a+40+(Oa*12|0)+8|0;Oa=0;do{Aa=f[Ga>>2]|0;Ja=f[bb>>2]|0;Na=(Aa|0)==(Ja<<5|0);if(!(1<>0])){if(Na){if((Aa+1|0)<0){rb=101;break b}Pa=Ja<<6;Ha=Aa+32&-32;hi(yb,Aa>>>0<1073741823?(Pa>>>0>>0?Ha:Pa):2147483647);zb=f[Ga>>2]|0}else zb=Aa;f[Ga>>2]=zb+1;Pa=(f[yb>>2]|0)+(zb>>>5<<2)|0;f[Pa>>2]=f[Pa>>2]|1<<(zb&31)}else{if(Na){if((Aa+1|0)<0){rb=106;break b}Na=Ja<<6;Ja=Aa+32&-32;hi(yb,Aa>>>0<1073741823?(Na>>>0>>0?Ja:Na):2147483647);Ab=f[Ga>>2]|0}else Ab=Aa;f[Ga>>2]=Ab+1;Aa=(f[yb>>2]|0)+(Ab>>>5<<2)|0;f[Aa>>2]=f[Aa>>2]&~(1<<(Ab&31))}Oa=Oa+1|0}while((Oa|0)<(Ia|0))}Oa=f[aa>>2]|0;Ga=d+(Ea<<2)|0;bb=f[Ca+4>>2]|0;za=f[Oa>>2]|0;Aa=f[Oa+4>>2]|0;f[j>>2]=f[Ca>>2];f[da>>2]=bb;f[k>>2]=za;f[ea>>2]=Aa;Dd(e,ca,j,k);f[Ga>>2]=f[e>>2];f[Ga+4>>2]=f[fa>>2];Ga=f[ga>>2]|0;if(Ga|0){Aa=f[ja>>2]|0;if((Aa|0)!=(Ga|0))f[ja>>2]=Aa+(~((Aa+-4-Ga|0)>>>2)<<2);br(Ga)}Ga=f[ha>>2]|0;if(Ga|0){Aa=f[ia>>2]|0;if((Aa|0)!=(Ga|0))f[ia>>2]=Aa+(~((Aa+-4-Ga|0)>>>2)<<2);br(Ga)}if((oa|0)<=2){Bb=Ya;Cb=Xa;break a}Ga=f[B>>2]|0;qa=f[Ga>>2]|0;Aa=pa+-1|0;if((f[Ga+4>>2]|0)-qa>>2>>>0<=Aa>>>0){ya=Ga;rb=18;break}else{Ga=pa;pa=Aa;ra=$a;sa=_a;ta=Za;ua=Ya;va=Xa;wa=Wa;xa=Va;oa=Ga}}if((rb|0)==18)mq(ya);else if((rb|0)==101)mq(yb);else if((rb|0)==106)mq(yb)}else{Bb=M;Cb=N}while(0);if((g|0)>0)hj(f[l>>2]|0,0,g<<2|0)|0;g=f[l>>2]|0;N=f[c+4>>2]|0;M=f[g>>2]|0;yb=f[g+4>>2]|0;f[j>>2]=f[c>>2];f[j+4>>2]=N;f[k>>2]=M;f[k+4>>2]=yb;Dd(e,a+8|0,j,k);f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];if(Bb|0){if((Cb|0)!=(Bb|0))f[H>>2]=Cb+(~((Cb+-4-Bb|0)>>>2)<<2);br(Bb)}Bb=f[m>>2]|0;if(Bb|0){m=f[E>>2]|0;if((m|0)!=(Bb|0))f[E>>2]=m+(~((m+-4-Bb|0)>>>2)<<2);br(Bb)}Bb=f[l+36>>2]|0;if(Bb|0){m=l+40|0;E=f[m>>2]|0;if((E|0)!=(Bb|0))f[m>>2]=E+(~((E+-4-Bb|0)>>>2)<<2);br(Bb)}Bb=f[l+24>>2]|0;if(Bb|0){E=l+28|0;m=f[E>>2]|0;if((m|0)!=(Bb|0))f[E>>2]=m+(~((m+-4-Bb|0)>>>2)<<2);br(Bb)}Bb=f[l+12>>2]|0;if(Bb|0){m=l+16|0;E=f[m>>2]|0;if((E|0)!=(Bb|0))f[m>>2]=E+(~((E+-4-Bb|0)>>>2)<<2);br(Bb)}Bb=f[l>>2]|0;if(!Bb){u=i;return 1}E=l+4|0;l=f[E>>2]|0;if((l|0)!=(Bb|0))f[E>>2]=l+(~((l+-4-Bb|0)>>>2)<<2);br(Bb);u=i;return 1}function eb(a,c,d,e,g,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0.0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0;i=u;u=u+256|0;e=i+104|0;j=i+240|0;k=i+224|0;l=i+160|0;m=i+140|0;n=i+248|0;o=i+72|0;p=i+40|0;q=i+128|0;r=i;s=i+232|0;t=i+220|0;v=i+216|0;w=i+212|0;x=i+208|0;y=i+152|0;z=f[a+28>>2]|0;A=f[a+32>>2]|0;B=l;C=B+48|0;do{f[B>>2]=0;B=B+4|0}while((B|0)<(C|0));if(!g){D=0;E=0}else{oi(l,g);D=f[l+12>>2]|0;E=f[l+16>>2]|0}B=l+16|0;C=E-D>>2;F=D;D=E;if(C>>>0>=g>>>0){if(C>>>0>g>>>0?(E=F+(g<<2)|0,(E|0)!=(D|0)):0)f[B>>2]=D+(~((D+-4-E|0)>>>2)<<2)}else oi(l+12|0,g-C|0);C=l+24|0;E=l+28|0;D=f[E>>2]|0;B=f[C>>2]|0;F=D-B>>2;G=B;B=D;if(F>>>0>=g>>>0){if(F>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[E>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else oi(C,g-F|0);F=l+36|0;C=l+40|0;D=f[C>>2]|0;B=f[F>>2]|0;E=D-B>>2;G=B;B=D;if(E>>>0>=g>>>0){if(E>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[C>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else oi(F,g-E|0);f[m>>2]=0;E=m+4|0;f[E>>2]=0;f[m+8>>2]=0;F=(g|0)==0;do if(!F)if(g>>>0>1073741823)mq(m);else{D=g<<2;B=dn(D)|0;f[m>>2]=B;C=B+(g<<2)|0;f[m+8>>2]=C;hj(B|0,0,D|0)|0;f[E>>2]=C;break}while(0);C=a+136|0;D=a+140|0;B=f[D>>2]|0;G=f[C>>2]|0;H=B-G>>2;L=G;G=B;if(H>>>0>=g>>>0){if(H>>>0>g>>>0?(B=L+(g<<2)|0,(B|0)!=(G|0)):0)f[D>>2]=G+(~((G+-4-B|0)>>>2)<<2)}else oi(C,g-H|0);f[o>>2]=0;f[o+4>>2]=0;f[o+8>>2]=0;f[o+12>>2]=0;f[o+16>>2]=0;f[o+20>>2]=0;f[o+24>>2]=0;f[o+28>>2]=0;f[p>>2]=0;f[p+4>>2]=0;f[p+8>>2]=0;f[p+12>>2]=0;f[p+16>>2]=0;f[p+20>>2]=0;f[p+24>>2]=0;f[p+28>>2]=0;f[q>>2]=0;H=q+4|0;f[H>>2]=0;f[q+8>>2]=0;if(F){M=0;N=0;O=0;P=0}else{F=g<<2;B=dn(F)|0;f[q>>2]=B;G=B+(g<<2)|0;f[q+8>>2]=G;hj(B|0,0,F|0)|0;f[H>>2]=G;M=B;N=G;O=G;P=B}B=a+36|0;G=f[B>>2]|0;F=f[G+4>>2]|0;D=f[G>>2]|0;L=F-D|0;a:do if((L|0)>4){Q=L>>>2;R=z+12|0;S=(g|0)>0;T=r+4|0;U=r+8|0;V=r+12|0;Z=a+136|0;_=a+96|0;$=r+16|0;aa=r+28|0;ba=a+8|0;ca=j+4|0;da=k+4|0;ea=e+4|0;fa=r+28|0;ga=r+16|0;ha=r+20|0;ia=r+32|0;ja=n+1|0;ka=g<<2;la=(g|0)==1;ma=Q+-1|0;if(F-D>>2>>>0>ma>>>0){na=Q;oa=ma;pa=M;qa=P;ra=O;sa=M;ta=N;ua=M;va=N;wa=D}else{xa=G;mq(xa)}b:while(1){ma=f[wa+(oa<<2)>>2]|0;Q=(((ma>>>0)%3|0|0)==0?2:-1)+ma|0;ya=(ma|0)==-1|(Q|0)==-1;za=1;Aa=0;Ba=ma;c:while(1){Ca=za^1;Da=Aa;Ea=Ba;while(1){if((Ea|0)==-1){Fa=Da;break c}Ga=f[l+(Da*12|0)>>2]|0;Ha=f[R>>2]|0;Ia=f[Ha+(Ea<<2)>>2]|0;if((Ia|0)!=-1){Ja=f[z>>2]|0;Ka=f[A>>2]|0;La=f[Ka+(f[Ja+(Ia<<2)>>2]<<2)>>2]|0;Ma=Ia+1|0;Na=((Ma>>>0)%3|0|0)==0?Ia+-2|0:Ma;if((Na|0)==-1)Oa=-1;else Oa=f[Ja+(Na<<2)>>2]|0;Na=f[Ka+(Oa<<2)>>2]|0;Ma=(((Ia>>>0)%3|0|0)==0?2:-1)+Ia|0;if((Ma|0)==-1)Pa=-1;else Pa=f[Ja+(Ma<<2)>>2]|0;Ma=f[Ka+(Pa<<2)>>2]|0;if((La|0)<(oa|0)&(Na|0)<(oa|0)&(Ma|0)<(oa|0)){Ka=X(La,g)|0;La=X(Na,g)|0;Na=X(Ma,g)|0;if(S){Ma=0;do{f[Ga+(Ma<<2)>>2]=(f[c+(Ma+Na<<2)>>2]|0)+(f[c+(Ma+La<<2)>>2]|0)-(f[c+(Ma+Ka<<2)>>2]|0);Ma=Ma+1|0}while((Ma|0)!=(g|0))}Ma=Da+1|0;if((Ma|0)==4){Fa=4;break c}else Qa=Ma}else Qa=Da}else Qa=Da;do if(za){Ma=Ea+1|0;Ka=((Ma>>>0)%3|0|0)==0?Ea+-2|0:Ma;if((Ka|0)!=-1?(Ma=f[Ha+(Ka<<2)>>2]|0,Ka=Ma+1|0,(Ma|0)!=-1):0)Ra=((Ka>>>0)%3|0|0)==0?Ma+-2|0:Ka;else Ra=-1}else{Ka=(((Ea>>>0)%3|0|0)==0?2:-1)+Ea|0;if((Ka|0)!=-1?(Ma=f[Ha+(Ka<<2)>>2]|0,(Ma|0)!=-1):0)if(!((Ma>>>0)%3|0)){Ra=Ma+2|0;break}else{Ra=Ma+-1|0;break}else Ra=-1}while(0);if((Ra|0)==(ma|0)){Fa=Qa;break c}if((Ra|0)!=-1|Ca){Da=Qa;Ea=Ra}else break}if(ya){za=0;Aa=Qa;Ba=-1;continue}Ea=f[Ha+(Q<<2)>>2]|0;if((Ea|0)==-1){za=0;Aa=Qa;Ba=-1;continue}if(!((Ea>>>0)%3|0)){za=0;Aa=Qa;Ba=Ea+2|0;continue}else{za=0;Aa=Qa;Ba=Ea+-1|0;continue}}Ba=X(oa,g)|0;f[r>>2]=0;f[T>>2]=0;b[U>>0]=0;f[V>>2]=0;f[V+4>>2]=0;f[V+8>>2]=0;f[V+12>>2]=0;f[V+16>>2]=0;f[V+20>>2]=0;f[V+24>>2]=0;Aa=c+((X(na+-2|0,g)|0)<<2)|0;za=c+(Ba<<2)|0;Q=f[Z>>2]|0;if(S){ya=0;ma=0;while(1){Ea=(f[Aa+(ya<<2)>>2]|0)-(f[za+(ya<<2)>>2]|0)|0;Da=((Ea|0)>-1?Ea:0-Ea|0)+ma|0;f[pa+(ya<<2)>>2]=Ea;f[Q+(ya<<2)>>2]=Ea<<1^Ea>>31;ya=ya+1|0;if((ya|0)==(g|0)){Sa=Da;break}else ma=Da}}else Sa=0;ho(e,_,Q,g);ma=Tk(e)|0;ya=I;Da=om(e)|0;Ea=Tn(Da|0,I|0,ma|0,ya|0)|0;ya=I;ma=(Fa|0)>0;if(ma){Da=Fa+-1|0;Ca=p+(Da<<3)|0;Ma=Ca;Ka=Tn(f[Ma>>2]|0,f[Ma+4>>2]|0,Fa|0,((Fa|0)<0)<<31>>31|0)|0;Ma=I;La=Ca;f[La>>2]=Ka;f[La+4>>2]=Ma;Ta=+W(+(+jm(Ka,f[o+(Da<<3)>>2]|0)*(+(Ka>>>0)+4294967296.0*+(Ma|0))));Ma=Tn(Ea|0,ya|0,~~Ta>>>0|0,(+K(Ta)>=1.0?(Ta>0.0?~~+Y(+J(Ta/4294967296.0),4294967295.0)>>>0:~~+W((Ta-+(~~Ta>>>0))/4294967296.0)>>>0):0)|0)|0;Ua=Ma}else Ua=Ea;Ea=r;f[Ea>>2]=Ua;f[Ea+4>>2]=Sa;b[U>>0]=0;f[V>>2]=0;Mf($,Aa,Aa+(g<<2)|0);f[s>>2]=qa;f[t>>2]=ra;f[j>>2]=f[s>>2];f[e>>2]=f[t>>2];tf(aa,j,e);if((Fa|0)<1){Va=va;Wa=ua;Xa=ta;Ya=sa;Za=ra;_a=qa;$a=qa}else{Ea=n+Fa|0;Ma=f[q>>2]|0;ya=Fa+-1|0;Ka=o+(ya<<3)|0;Da=p+(ya<<3)|0;ya=Ma;La=f[H>>2]|0;Ca=Ea+-1|0;Na=(Ca|0)==(n|0);Ga=Ea+-2|0;Ja=ja>>>0>>0;Ia=~Fa;ab=Fa+2+((Ia|0)>-2?Ia:-2)|0;Ia=La;bb=Ca>>>0>n>>>0;cb=0;db=1;while(1){cb=cb+1|0;hj(n|0,1,ab|0)|0;hj(n|0,0,cb|0)|0;d:while(1){if(S){hj(f[m>>2]|0,0,ka|0)|0;eb=f[m>>2]|0;fb=0;gb=0;while(1){if(!(b[n+fb>>0]|0)){hb=f[l+(fb*12|0)>>2]|0;ib=0;do{jb=eb+(ib<<2)|0;f[jb>>2]=(f[jb>>2]|0)+(f[hb+(ib<<2)>>2]|0);ib=ib+1|0}while((ib|0)!=(g|0));kb=(1<>0]|0))mb=(1<>2]|0;do if(S){f[fb>>2]=(f[fb>>2]|0)/(db|0)|0;if(!la){gb=1;do{eb=fb+(gb<<2)|0;f[eb>>2]=(f[eb>>2]|0)/(db|0)|0;gb=gb+1|0}while((gb|0)!=(g|0));gb=f[Z>>2]|0;if(S)nb=gb;else{ob=0;pb=gb;break}}else nb=f[Z>>2]|0;gb=0;eb=0;while(1){ib=(f[fb+(gb<<2)>>2]|0)-(f[za+(gb<<2)>>2]|0)|0;hb=((ib|0)>-1?ib:0-ib|0)+eb|0;f[Ma+(gb<<2)>>2]=ib;f[nb+(gb<<2)>>2]=ib<<1^ib>>31;gb=gb+1|0;if((gb|0)==(g|0)){ob=hb;pb=nb;break}else eb=hb}}else{ob=0;pb=f[Z>>2]|0}while(0);ho(e,_,pb,g);fb=Tk(e)|0;eb=I;gb=om(e)|0;hb=Tn(gb|0,I|0,fb|0,eb|0)|0;eb=I;if(ma){fb=Ka;gb=Tn(f[fb>>2]|0,f[fb+4>>2]|0,db|0,0)|0;fb=Da;ib=f[fb>>2]|0;jb=f[fb+4>>2]|0;Ta=+W(+(+jm(ib,gb)*(+(ib>>>0)+4294967296.0*+(jb|0))));jb=Tn(hb|0,eb|0,~~Ta>>>0|0,(+K(Ta)>=1.0?(Ta>0.0?~~+Y(+J(Ta/4294967296.0),4294967295.0)>>>0:~~+W((Ta-+(~~Ta>>>0))/4294967296.0)>>>0):0)|0)|0;qb=jb}else qb=hb;hb=f[r>>2]|0;if(!((qb|0)>=(hb|0)?!((qb|0)<=(hb|0)?(ob|0)<(f[T>>2]|0):0):0)){hb=r;f[hb>>2]=qb;f[hb+4>>2]=ob;b[U>>0]=lb;f[V>>2]=db;f[v>>2]=f[m>>2];f[w>>2]=f[E>>2];f[j>>2]=f[v>>2];f[e>>2]=f[w>>2];tf($,j,e);f[x>>2]=ya;f[y>>2]=La;f[j>>2]=f[x>>2];f[e>>2]=f[y>>2];tf(aa,j,e)}if(Na)break;rb=b[Ca>>0]|0;hb=-1;jb=rb;while(1){eb=hb+-1|0;sb=Ea+eb|0;ib=jb;jb=b[sb>>0]|0;if((jb&255)<(ib&255))break;if((sb|0)==(n|0)){tb=86;break d}else hb=eb}eb=Ea+hb|0;if((jb&255)<(rb&255)){ub=Ca;vb=rb}else{ib=Ea;gb=Ca;while(1){fb=gb+-1|0;if((jb&255)<(h[ib+-2>>0]|0)){ub=fb;vb=1;break}else{wb=gb;gb=fb;ib=wb}}}b[sb>>0]=vb;b[ub>>0]=jb;if((hb|0)<-1){xb=eb;yb=Ca}else continue;while(1){ib=b[xb>>0]|0;b[xb>>0]=b[yb>>0]|0;b[yb>>0]=ib;ib=xb+1|0;gb=yb+-1|0;if(ib>>>0>>0){xb=ib;yb=gb}else continue d}}if(((tb|0)==86?(tb=0,bb):0)?(eb=b[n>>0]|0,b[n>>0]=rb,b[Ca>>0]=eb,Ja):0){eb=Ga;hb=ja;do{jb=b[hb>>0]|0;b[hb>>0]=b[eb>>0]|0;b[eb>>0]=jb;hb=hb+1|0;eb=eb+-1|0}while(hb>>>0>>0)}if((db|0)>=(Fa|0)){Va=Ia;Wa=Ma;Xa=Ia;Ya=Ma;Za=La;_a=ya;$a=Ma;break}else db=db+1|0}}if(ma){db=f[V>>2]|0;Ma=o+(Fa+-1<<3)|0;ya=Ma;La=Tn(f[ya>>2]|0,f[ya+4>>2]|0,db|0,((db|0)<0)<<31>>31|0)|0;db=Ma;f[db>>2]=La;f[db+4>>2]=I}if(S){db=f[aa>>2]|0;La=f[C>>2]|0;Ma=0;do{ya=f[db+(Ma<<2)>>2]|0;f[La+(Ma<<2)>>2]=ya<<1^ya>>31;Ma=Ma+1|0}while((Ma|0)!=(g|0));zb=La}else zb=f[C>>2]|0;go(e,_,zb,g);if(ma){La=Fa+-1|0;Ab=a+40+(La*12|0)|0;Ma=a+40+(La*12|0)+4|0;db=a+40+(La*12|0)+8|0;La=0;do{ya=f[Ma>>2]|0;Ia=f[db>>2]|0;Ga=(ya|0)==(Ia<<5|0);if(!(1<>0])){if(Ga){if((ya+1|0)<0){tb=101;break b}Ja=Ia<<6;Ca=ya+32&-32;hi(Ab,ya>>>0<1073741823?(Ja>>>0>>0?Ca:Ja):2147483647);Bb=f[Ma>>2]|0}else Bb=ya;f[Ma>>2]=Bb+1;Ja=(f[Ab>>2]|0)+(Bb>>>5<<2)|0;f[Ja>>2]=f[Ja>>2]|1<<(Bb&31)}else{if(Ga){if((ya+1|0)<0){tb=106;break b}Ga=Ia<<6;Ia=ya+32&-32;hi(Ab,ya>>>0<1073741823?(Ga>>>0>>0?Ia:Ga):2147483647);Cb=f[Ma>>2]|0}else Cb=ya;f[Ma>>2]=Cb+1;ya=(f[Ab>>2]|0)+(Cb>>>5<<2)|0;f[ya>>2]=f[ya>>2]&~(1<<(Cb&31))}La=La+1|0}while((La|0)<(Fa|0))}La=f[$>>2]|0;Ma=d+(Ba<<2)|0;db=f[za+4>>2]|0;ma=f[La>>2]|0;ya=f[La+4>>2]|0;f[j>>2]=f[za>>2];f[ca>>2]=db;f[k>>2]=ma;f[da>>2]=ya;Dd(e,ba,j,k);f[Ma>>2]=f[e>>2];f[Ma+4>>2]=f[ea>>2];Ma=f[fa>>2]|0;if(Ma|0){ya=f[ia>>2]|0;if((ya|0)!=(Ma|0))f[ia>>2]=ya+(~((ya+-4-Ma|0)>>>2)<<2);br(Ma)}Ma=f[ga>>2]|0;if(Ma|0){ya=f[ha>>2]|0;if((ya|0)!=(Ma|0))f[ha>>2]=ya+(~((ya+-4-Ma|0)>>>2)<<2);br(Ma)}if((na|0)<=2){Db=Ya;Eb=Xa;break a}Ma=f[B>>2]|0;wa=f[Ma>>2]|0;ya=oa+-1|0;if((f[Ma+4>>2]|0)-wa>>2>>>0<=ya>>>0){xa=Ma;tb=18;break}else{Ma=oa;oa=ya;pa=$a;qa=_a;ra=Za;sa=Ya;ta=Xa;ua=Wa;va=Va;na=Ma}}if((tb|0)==18)mq(xa);else if((tb|0)==101)mq(Ab);else if((tb|0)==106)mq(Ab)}else{Db=M;Eb=N}while(0);if((g|0)>0)hj(f[l>>2]|0,0,g<<2|0)|0;g=f[l>>2]|0;N=f[c+4>>2]|0;M=f[g>>2]|0;Ab=f[g+4>>2]|0;f[j>>2]=f[c>>2];f[j+4>>2]=N;f[k>>2]=M;f[k+4>>2]=Ab;Dd(e,a+8|0,j,k);f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];if(Db|0){if((Eb|0)!=(Db|0))f[H>>2]=Eb+(~((Eb+-4-Db|0)>>>2)<<2);br(Db)}Db=f[m>>2]|0;if(Db|0){m=f[E>>2]|0;if((m|0)!=(Db|0))f[E>>2]=m+(~((m+-4-Db|0)>>>2)<<2);br(Db)}Db=f[l+36>>2]|0;if(Db|0){m=l+40|0;E=f[m>>2]|0;if((E|0)!=(Db|0))f[m>>2]=E+(~((E+-4-Db|0)>>>2)<<2);br(Db)}Db=f[l+24>>2]|0;if(Db|0){E=l+28|0;m=f[E>>2]|0;if((m|0)!=(Db|0))f[E>>2]=m+(~((m+-4-Db|0)>>>2)<<2);br(Db)}Db=f[l+12>>2]|0;if(Db|0){m=l+16|0;E=f[m>>2]|0;if((E|0)!=(Db|0))f[m>>2]=E+(~((E+-4-Db|0)>>>2)<<2);br(Db)}Db=f[l>>2]|0;if(!Db){u=i;return 1}E=l+4|0;l=f[E>>2]|0;if((l|0)!=(Db|0))f[E>>2]=l+(~((l+-4-Db|0)>>>2)<<2);br(Db);u=i;return 1}function fb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0;c=u;u=u+32|0;d=c+16|0;e=c+4|0;g=c;f[a+36>>2]=b;h=a+24|0;i=a+28|0;j=f[i>>2]|0;k=f[h>>2]|0;l=j-k>>2;m=k;k=j;if(l>>>0>=b>>>0){if(l>>>0>b>>>0?(j=m+(b<<2)|0,(j|0)!=(k|0)):0)f[i>>2]=k+(~((k+-4-j|0)>>>2)<<2)}else kh(h,b-l|0,5828);f[d>>2]=0;l=d+4|0;f[l>>2]=0;j=d+8|0;f[j>>2]=0;if(b){if((b|0)<0)mq(d);k=((b+-1|0)>>>5)+1|0;m=dn(k<<2)|0;f[d>>2]=m;f[j>>2]=k;f[l>>2]=b;k=b>>>5;hj(m|0,0,k<<2|0)|0;n=b&31;o=m+(k<<2)|0;k=m;if(!n){p=b;q=k;r=m}else{f[o>>2]=f[o>>2]&~(-1>>>(32-n|0));p=b;q=k;r=m}}else{p=0;q=0;r=0}m=a+4|0;k=f[a>>2]|0;n=(f[m>>2]|0)-k|0;o=n>>2;f[e>>2]=0;s=e+4|0;f[s>>2]=0;t=e+8|0;f[t>>2]=0;do if(o){if((n|0)<0)mq(e);v=((o+-1|0)>>>5)+1|0;w=dn(v<<2)|0;f[e>>2]=w;f[t>>2]=v;f[s>>2]=o;v=o>>>5;hj(w|0,0,v<<2|0)|0;x=o&31;y=w+(v<<2)|0;if(x|0)f[y>>2]=f[y>>2]&~(-1>>>(32-x|0));if(o>>>0>2){x=a+12|0;y=a+32|0;v=a+52|0;w=a+56|0;z=a+48|0;A=b;B=k;C=0;D=q;E=r;a:while(1){F=B;G=C*3|0;if((G|0)!=-1){H=f[F+(G<<2)>>2]|0;I=G+1|0;J=((I>>>0)%3|0|0)==0?G+-2|0:I;if((J|0)==-1)K=-1;else K=f[F+(J<<2)>>2]|0;J=(((G>>>0)%3|0|0)==0?2:-1)+G|0;if((J|0)==-1)L=-1;else L=f[F+(J<<2)>>2]|0;if((H|0)!=(K|0)?!((H|0)==(L|0)|(K|0)==(L|0)):0){H=0;J=A;F=E;I=D;while(1){M=H+G|0;if(!(f[(f[e>>2]|0)+(M>>>5<<2)>>2]&1<<(M&31))){N=f[(f[a>>2]|0)+(M<<2)>>2]|0;f[g>>2]=N;if(!(f[F+(N>>>5<<2)>>2]&1<<(N&31))){O=0;P=J;Q=N}else{N=f[i>>2]|0;if((N|0)==(f[y>>2]|0))Ci(h,5828);else{f[N>>2]=-1;f[i>>2]=N+4}N=f[v>>2]|0;if((N|0)==(f[w>>2]|0))Ci(z,g);else{f[N>>2]=f[g>>2];f[v>>2]=N+4}N=f[l>>2]|0;R=f[j>>2]|0;if((N|0)==(R<<5|0)){if((N+1|0)<0){S=50;break a}T=R<<6;R=N+32&-32;hi(d,N>>>0<1073741823?(T>>>0>>0?R:T):2147483647);U=f[l>>2]|0}else U=N;f[l>>2]=U+1;N=(f[d>>2]|0)+(U>>>5<<2)|0;f[N>>2]=f[N>>2]&~(1<<(U&31));f[g>>2]=J;O=1;P=J+1|0;Q=J}N=f[d>>2]|0;T=N+(Q>>>5<<2)|0;f[T>>2]=f[T>>2]|1<<(Q&31);T=N;b:do if(O){R=M;while(1){if((R|0)==-1){S=64;break b}V=(f[e>>2]|0)+(R>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(R&31);V=f[g>>2]|0;f[(f[h>>2]|0)+(V<<2)>>2]=R;f[(f[a>>2]|0)+(R<<2)>>2]=V;V=R+1|0;W=((V>>>0)%3|0|0)==0?R+-2|0:V;do if((W|0)==-1)X=-1;else{V=f[(f[x>>2]|0)+(W<<2)>>2]|0;Y=V+1|0;if((V|0)==-1){X=-1;break}X=((Y>>>0)%3|0|0)==0?V+-2|0:Y}while(0);if((X|0)==(M|0))break;else R=X}}else{R=M;while(1){if((R|0)==-1){S=64;break b}W=(f[e>>2]|0)+(R>>>5<<2)|0;f[W>>2]=f[W>>2]|1<<(R&31);f[(f[h>>2]|0)+(f[g>>2]<<2)>>2]=R;W=R+1|0;Y=((W>>>0)%3|0|0)==0?R+-2|0:W;do if((Y|0)==-1)Z=-1;else{W=f[(f[x>>2]|0)+(Y<<2)>>2]|0;V=W+1|0;if((W|0)==-1){Z=-1;break}Z=((V>>>0)%3|0|0)==0?W+-2|0:V}while(0);if((Z|0)==(M|0))break;else R=Z}}while(0);c:do if((S|0)==64){S=0;if((M|0)==-1)break;R=(((M>>>0)%3|0|0)==0?2:-1)+M|0;if((R|0)==-1)break;Y=f[(f[x>>2]|0)+(R<<2)>>2]|0;if((Y|0)==-1)break;R=Y+(((Y>>>0)%3|0|0)==0?2:-1)|0;if((R|0)==-1)break;if(!O){Y=R;while(1){V=(f[e>>2]|0)+(Y>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(Y&31);V=(((Y>>>0)%3|0|0)==0?2:-1)+Y|0;if((V|0)==-1)break c;W=f[(f[x>>2]|0)+(V<<2)>>2]|0;if((W|0)==-1)break c;Y=W+(((W>>>0)%3|0|0)==0?2:-1)|0;if((Y|0)==-1)break c}}Y=f[a>>2]|0;W=R;do{V=(f[e>>2]|0)+(W>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(W&31);f[Y+(W<<2)>>2]=f[g>>2];V=(((W>>>0)%3|0|0)==0?2:-1)+W|0;if((V|0)==-1)break c;_=f[(f[x>>2]|0)+(V<<2)>>2]|0;if((_|0)==-1)break c;W=_+(((_>>>0)%3|0|0)==0?2:-1)|0}while((W|0)!=-1)}while(0);$=P;aa=T;ba=N}else{$=J;aa=I;ba=F}if((H|0)<2){H=H+1|0;J=$;F=ba;I=aa}else{ca=$;da=aa;ea=ba;break}}}else{ca=A;da=D;ea=E}}else{ca=A;da=D;ea=E}C=C+1|0;B=f[a>>2]|0;if(C>>>0>=(((f[m>>2]|0)-B>>2>>>0)/3|0)>>>0){S=18;break}else{A=ca;D=da;E=ea}}if((S|0)==18){fa=da;ga=f[l>>2]|0;break}else if((S|0)==50)mq(d)}else{fa=q;ga=p}}else{fa=q;ga=p}while(0);p=a+44|0;f[p>>2]=0;a=fa;fa=ga>>>5;q=a+(fa<<2)|0;S=ga&31;ga=(fa|0)!=0;d:do if(fa|S|0)if(!S){l=a;da=0;ea=ga;while(1){e:do if(ea){if(!(f[l>>2]&1)){ca=da+1|0;f[p>>2]=ca;ha=ca}else ha=da;if(!(f[l>>2]&2)){ca=ha+1|0;f[p>>2]=ca;ia=ca}else ia=ha;if(!(f[l>>2]&4)){ca=ia+1|0;f[p>>2]=ca;ja=ca}else ja=ia;if(!(f[l>>2]&8)){ca=ja+1|0;f[p>>2]=ca;ka=ca}else ka=ja;if(!(f[l>>2]&16)){ca=ka+1|0;f[p>>2]=ca;la=ca}else la=ka;if(!(f[l>>2]&32)){ca=la+1|0;f[p>>2]=ca;ma=ca}else ma=la;if(!(f[l>>2]&64)){ca=ma+1|0;f[p>>2]=ca;na=ca}else na=ma;if(!(f[l>>2]&128)){ca=na+1|0;f[p>>2]=ca;oa=ca}else oa=na;if(!(f[l>>2]&256)){ca=oa+1|0;f[p>>2]=ca;pa=ca}else pa=oa;if(!(f[l>>2]&512)){ca=pa+1|0;f[p>>2]=ca;qa=ca}else qa=pa;if(!(f[l>>2]&1024)){ca=qa+1|0;f[p>>2]=ca;ra=ca}else ra=qa;if(!(f[l>>2]&2048)){ca=ra+1|0;f[p>>2]=ca;sa=ca}else sa=ra;if(!(f[l>>2]&4096)){ca=sa+1|0;f[p>>2]=ca;ta=ca}else ta=sa;if(!(f[l>>2]&8192)){ca=ta+1|0;f[p>>2]=ca;ua=ca}else ua=ta;if(!(f[l>>2]&16384)){ca=ua+1|0;f[p>>2]=ca;va=ca}else va=ua;if(!(f[l>>2]&32768)){ca=va+1|0;f[p>>2]=ca;wa=ca}else wa=va;if(!(f[l>>2]&65536)){ca=wa+1|0;f[p>>2]=ca;xa=ca}else xa=wa;if(!(f[l>>2]&131072)){ca=xa+1|0;f[p>>2]=ca;ya=ca}else ya=xa;if(!(f[l>>2]&262144)){ca=ya+1|0;f[p>>2]=ca;za=ca}else za=ya;if(!(f[l>>2]&524288)){ca=za+1|0;f[p>>2]=ca;Aa=ca}else Aa=za;if(!(f[l>>2]&1048576)){ca=Aa+1|0;f[p>>2]=ca;Ba=ca}else Ba=Aa;if(!(f[l>>2]&2097152)){ca=Ba+1|0;f[p>>2]=ca;Ca=ca}else Ca=Ba;if(!(f[l>>2]&4194304)){ca=Ca+1|0;f[p>>2]=ca;Da=ca}else Da=Ca;if(!(f[l>>2]&8388608)){ca=Da+1|0;f[p>>2]=ca;Ea=ca}else Ea=Da;if(!(f[l>>2]&16777216)){ca=Ea+1|0;f[p>>2]=ca;Fa=ca}else Fa=Ea;if(!(f[l>>2]&33554432)){ca=Fa+1|0;f[p>>2]=ca;Ga=ca}else Ga=Fa;if(!(f[l>>2]&67108864)){ca=Ga+1|0;f[p>>2]=ca;Ha=ca}else Ha=Ga;if(!(f[l>>2]&134217728)){ca=Ha+1|0;f[p>>2]=ca;Ia=ca}else Ia=Ha;if(!(f[l>>2]&268435456)){ca=Ia+1|0;f[p>>2]=ca;Ja=ca}else Ja=Ia;if(!(f[l>>2]&536870912)){ca=Ja+1|0;f[p>>2]=ca;Ka=ca}else Ka=Ja;if(!(f[l>>2]&1073741824)){ca=Ka+1|0;f[p>>2]=ca;La=ca}else La=Ka;if((f[l>>2]|0)<=-1){Ma=La;break}ca=La+1|0;f[p>>2]=ca;Ma=ca}else{ca=0;m=da;while(1){if(!(f[l>>2]&1<>2]=ba;Na=ba}else Na=m;if((ca|0)==31){Ma=Na;break e}ca=ca+1|0;if(!ca)break d;else m=Na}}while(0);l=l+4|0;if((q|0)==(l|0))break;else{da=Ma;ea=1}}}else{if(ga){ea=0;da=a;l=0;while(1){if(!(f[da>>2]&1)){m=l+1|0;f[p>>2]=m;Oa=m;Pa=m}else{Oa=l;Pa=ea}if(!(f[da>>2]&2)){m=Oa+1|0;f[p>>2]=m;Qa=m;Ra=m}else{Qa=Oa;Ra=Pa}if(!(f[da>>2]&4)){m=Qa+1|0;f[p>>2]=m;Sa=m;Ta=m}else{Sa=Qa;Ta=Ra}if(!(f[da>>2]&8)){m=Sa+1|0;f[p>>2]=m;Ua=m;Va=m}else{Ua=Sa;Va=Ta}if(!(f[da>>2]&16)){m=Ua+1|0;f[p>>2]=m;Wa=m;Xa=m}else{Wa=Ua;Xa=Va}if(!(f[da>>2]&32)){m=Wa+1|0;f[p>>2]=m;Ya=m;Za=m}else{Ya=Wa;Za=Xa}if(!(f[da>>2]&64)){m=Ya+1|0;f[p>>2]=m;_a=m;$a=m}else{_a=Ya;$a=Za}if(!(f[da>>2]&128)){m=_a+1|0;f[p>>2]=m;ab=m;bb=m}else{ab=_a;bb=$a}if(!(f[da>>2]&256)){m=ab+1|0;f[p>>2]=m;cb=m;db=m}else{cb=ab;db=bb}if(!(f[da>>2]&512)){m=cb+1|0;f[p>>2]=m;eb=m;fb=m}else{eb=cb;fb=db}if(!(f[da>>2]&1024)){m=eb+1|0;f[p>>2]=m;gb=m;hb=m}else{gb=eb;hb=fb}if(!(f[da>>2]&2048)){m=gb+1|0;f[p>>2]=m;ib=m;jb=m}else{ib=gb;jb=hb}if(!(f[da>>2]&4096)){m=ib+1|0;f[p>>2]=m;kb=m;lb=m}else{kb=ib;lb=jb}if(!(f[da>>2]&8192)){m=kb+1|0;f[p>>2]=m;mb=m;nb=m}else{mb=kb;nb=lb}if(!(f[da>>2]&16384)){m=mb+1|0;f[p>>2]=m;ob=m;pb=m}else{ob=mb;pb=nb}if(!(f[da>>2]&32768)){m=ob+1|0;f[p>>2]=m;qb=m;rb=m}else{qb=ob;rb=pb}if(!(f[da>>2]&65536)){m=qb+1|0;f[p>>2]=m;sb=m;tb=m}else{sb=qb;tb=rb}if(!(f[da>>2]&131072)){m=sb+1|0;f[p>>2]=m;ub=m;vb=m}else{ub=sb;vb=tb}if(!(f[da>>2]&262144)){m=ub+1|0;f[p>>2]=m;wb=m;xb=m}else{wb=ub;xb=vb}if(!(f[da>>2]&524288)){m=wb+1|0;f[p>>2]=m;yb=m;zb=m}else{yb=wb;zb=xb}if(!(f[da>>2]&1048576)){m=yb+1|0;f[p>>2]=m;Ab=m;Bb=m}else{Ab=yb;Bb=zb}if(!(f[da>>2]&2097152)){m=Ab+1|0;f[p>>2]=m;Cb=m;Db=m}else{Cb=Ab;Db=Bb}if(!(f[da>>2]&4194304)){m=Cb+1|0;f[p>>2]=m;Eb=m;Fb=m}else{Eb=Cb;Fb=Db}if(!(f[da>>2]&8388608)){m=Eb+1|0;f[p>>2]=m;Gb=m;Hb=m}else{Gb=Eb;Hb=Fb}if(!(f[da>>2]&16777216)){m=Gb+1|0;f[p>>2]=m;Ib=m;Jb=m}else{Ib=Gb;Jb=Hb}if(!(f[da>>2]&33554432)){m=Ib+1|0;f[p>>2]=m;Kb=m;Lb=m}else{Kb=Ib;Lb=Jb}if(!(f[da>>2]&67108864)){m=Kb+1|0;f[p>>2]=m;Mb=m;Nb=m}else{Mb=Kb;Nb=Lb}if(!(f[da>>2]&134217728)){m=Mb+1|0;f[p>>2]=m;Ob=m;Pb=m}else{Ob=Mb;Pb=Nb}if(!(f[da>>2]&268435456)){m=Ob+1|0;f[p>>2]=m;Qb=m;Rb=m}else{Qb=Ob;Rb=Pb}if(!(f[da>>2]&536870912)){m=Qb+1|0;f[p>>2]=m;Sb=m;Tb=m}else{Sb=Qb;Tb=Rb}if(!(f[da>>2]&1073741824)){m=Sb+1|0;f[p>>2]=m;Ub=m;Vb=m}else{Ub=Sb;Vb=Tb}if((f[da>>2]|0)>-1){m=Ub+1|0;f[p>>2]=m;Wb=m;Xb=m}else{Wb=Ub;Xb=Vb}m=da+4|0;if((q|0)==(m|0)){Yb=m;Zb=Xb;break}else{ea=Xb;da=m;l=Wb}}}else{Yb=a;Zb=0}l=0;da=Zb;while(1){if(!(f[Yb>>2]&1<>2]=ea;_b=ea}else _b=da;l=l+1|0;if((l|0)==(S|0))break;else da=_b}}while(0);_b=f[e>>2]|0;if(_b|0)br(_b);_b=f[d>>2]|0;if(!_b){u=c;return 1}br(_b);u=c;return 1}function gb(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=Oa,La=0,Ma=0,Na=0,Pa=0,Qa=Oa,Ra=0,Sa=0,Ta=0,Ua=0,Va=0;c=u;u=u+80|0;d=c+60|0;e=c+48|0;g=c+24|0;h=c+12|0;i=c;j=a+28|0;k=f[j>>2]|0;l=f[k+4>>2]|0;m=f[l+80>>2]|0;o=a+4|0;p=a+8|0;q=f[p>>2]|0;r=f[o>>2]|0;s=(q|0)==(r|0);t=r;if(s){f[a+72>>2]=0;v=1;u=c;return v|0}w=f[l+8>>2]|0;x=q-r>>2;r=0;q=0;do{r=r+(b[(f[w+(f[t+(q<<2)>>2]<<2)>>2]|0)+24>>0]|0)|0;q=q+1|0}while(q>>>0>>0);f[a+72>>2]=r;if(s){v=1;u=c;return v|0}s=g+4|0;r=g+8|0;x=d+8|0;q=d+4|0;w=d+11|0;y=g+12|0;z=d+8|0;A=d+4|0;B=d+11|0;C=h+4|0;D=h+8|0;E=i+8|0;F=i+4|0;G=d+11|0;H=d+4|0;I=i+11|0;J=d+8|0;K=d+4|0;L=d+11|0;M=d+11|0;N=d+4|0;O=h+8|0;P=a+40|0;Q=a+44|0;R=a+36|0;S=a+64|0;T=a+68|0;U=a+60|0;V=g+8|0;W=g+20|0;X=e+8|0;Y=e+4|0;Z=e+11|0;_=g+4|0;aa=g+8|0;ba=h+4|0;ca=h+8|0;da=h+8|0;ea=a+52|0;fa=a+56|0;ga=a+48|0;a=g+8|0;ha=0;ia=t;t=l;l=k;a:while(1){k=f[ia+(ha<<2)>>2]|0;ja=f[(f[t+8>>2]|0)+(k<<2)>>2]|0;switch(f[ja+28>>2]|0){case 9:{f[g>>2]=1180;f[s>>2]=-1;f[r>>2]=0;f[r+4>>2]=0;f[r+8>>2]=0;f[r+12>>2]=0;ka=f[l+48>>2]|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;la=dn(32)|0;f[d>>2]=la;f[x>>2]=-2147483616;f[q>>2]=17;ma=la;na=12932;oa=ma+17|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[la+17>>0]=0;pa=ka+16|0;qa=f[pa>>2]|0;if(qa){ra=pa;sa=qa;b:while(1){qa=sa;while(1){if((f[qa+16>>2]|0)>=(k|0))break;ta=f[qa+4>>2]|0;if(!ta){ua=ra;break b}else qa=ta}sa=f[qa>>2]|0;if(!sa){ua=qa;break}else ra=qa}if(((ua|0)!=(pa|0)?(k|0)>=(f[ua+16>>2]|0):0)?(ra=ua+20|0,(sh(ra,d)|0)!=0):0)va=yk(ra,d,-1)|0;else wa=17}else wa=17;if((wa|0)==17){wa=0;va=yk(ka,d,-1)|0}if((b[w>>0]|0)<0)br(f[d>>2]|0);if((va|0)<1)xa=1;else{ra=f[(f[j>>2]|0)+48>>2]|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;sa=dn(32)|0;f[d>>2]=sa;f[z>>2]=-2147483616;f[A>>2]=19;ma=sa;na=13005;oa=ma+19|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[sa+19>>0]=0;ka=ra+16|0;pa=f[ka>>2]|0;if(pa){la=ka;ta=pa;c:while(1){pa=ta;while(1){if((f[pa+16>>2]|0)>=(k|0))break;ya=f[pa+4>>2]|0;if(!ya){za=la;break c}else pa=ya}ta=f[pa>>2]|0;if(!ta){za=pa;break}else la=pa}if((za|0)!=(ka|0)?(k|0)>=(f[za+16>>2]|0):0)Aa=za+20|0;else wa=29}else wa=29;if((wa|0)==29){wa=0;Aa=ra}if(!(sh(Aa,d)|0))Ba=0;else{la=f[(f[j>>2]|0)+48>>2]|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;ta=dn(32)|0;f[e>>2]=ta;f[X>>2]=-2147483616;f[Y>>2]=18;ma=ta;na=13025;oa=ma+18|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[ta+18>>0]=0;ra=la+16|0;ka=f[ra>>2]|0;if(ka){sa=ra;qa=ka;d:while(1){ka=qa;while(1){if((f[ka+16>>2]|0)>=(k|0))break;ya=f[ka+4>>2]|0;if(!ya){Ca=sa;break d}else ka=ya}qa=f[ka>>2]|0;if(!qa){Ca=ka;break}else sa=ka}if((Ca|0)!=(ra|0)?(k|0)>=(f[Ca+16>>2]|0):0)Da=Ca+20|0;else wa=39}else wa=39;if((wa|0)==39){wa=0;Da=la}sa=(sh(Da,e)|0)!=0;if((b[Z>>0]|0)<0)br(f[e>>2]|0);Ba=sa}if((b[B>>0]|0)<0)br(f[d>>2]|0);if(Ba){sa=ja+24|0;qa=b[sa>>0]|0;ta=qa<<24>>24;f[h>>2]=0;f[C>>2]=0;f[D>>2]=0;if(!(qa<<24>>24))Ea=0;else{if(qa<<24>>24<0){wa=48;break a}qa=ta<<2;pa=dn(qa)|0;f[h>>2]=pa;ya=pa+(ta<<2)|0;f[O>>2]=ya;hj(pa|0,0,qa|0)|0;f[C>>2]=ya;Ea=pa}pa=f[(f[j>>2]|0)+48>>2]|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;ya=dn(32)|0;f[i>>2]=ya;f[E>>2]=-2147483616;f[F>>2]=19;ma=ya;na=13005;oa=ma+19|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[ya+19>>0]=0;la=b[sa>>0]|0;ra=la<<24>>24;qa=pa+16|0;ta=f[qa>>2]|0;if(ta){Fa=qa;Ga=ta;e:while(1){ta=Ga;while(1){if((f[ta+16>>2]|0)>=(k|0))break;Ha=f[ta+4>>2]|0;if(!Ha){Ia=Fa;break e}else ta=Ha}Ga=f[ta>>2]|0;if(!Ga){Ia=ta;break}else Fa=ta}if(((Ia|0)!=(qa|0)?(k|0)>=(f[Ia+16>>2]|0):0)?(Fa=Ia+20|0,(sh(Fa,i)|0)!=0):0){Ga=zg(Fa,i)|0;if((Ga|0)!=(Ia+24|0)){dj(d,Ga+28|0);Ga=b[M>>0]|0;Fa=Ga<<24>>24<0;if(!((Fa?f[N>>2]|0:Ga&255)|0))Ja=Ga;else{if(la<<24>>24>0){ya=Fa?f[d>>2]|0:d;Fa=0;do{Ka=$(pq(ya,e));ka=ya;ya=f[e>>2]|0;if((ka|0)==(ya|0))break;n[Ea+(Fa<<2)>>2]=Ka;Fa=Fa+1|0}while((Fa|0)<(ra|0));La=b[M>>0]|0}else La=Ga;Ja=La}if(Ja<<24>>24<0)br(f[d>>2]|0)}}else wa=69}else wa=69;if((wa|0)==69?(wa=0,Fa=zg(pa,i)|0,(Fa|0)!=(pa+4|0)):0){dj(d,Fa+28|0);Fa=b[G>>0]|0;ya=Fa<<24>>24<0;if(!((ya?f[H>>2]|0:Fa&255)|0))Ma=Fa;else{if(la<<24>>24>0){qa=ya?f[d>>2]|0:d;ya=0;do{Ka=$(pq(qa,e));ka=qa;qa=f[e>>2]|0;if((ka|0)==(qa|0))break;n[Ea+(ya<<2)>>2]=Ka;ya=ya+1|0}while((ya|0)<(ra|0));Na=b[G>>0]|0}else Na=Fa;Ma=Na}if(Ma<<24>>24<0)br(f[d>>2]|0)}if((b[I>>0]|0)<0)br(f[i>>2]|0);ra=f[(f[j>>2]|0)+48>>2]|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;ya=dn(32)|0;f[d>>2]=ya;f[J>>2]=-2147483616;f[K>>2]=18;ma=ya;na=13025;oa=ma+18|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[ya+18>>0]=0;na=ra+16|0;ma=f[na>>2]|0;do if(ma){oa=na;Fa=ma;f:while(1){qa=Fa;while(1){if((f[qa+16>>2]|0)>=(k|0))break;la=f[qa+4>>2]|0;if(!la){Pa=oa;break f}else qa=la}Fa=f[qa>>2]|0;if(!Fa){Pa=qa;break}else oa=qa}if((Pa|0)!=(na|0)?(k|0)>=(f[Pa+16>>2]|0):0){oa=Pa+20|0;if(!(sh(oa,d)|0)){wa=91;break}Qa=$(kk(oa,d,$(1.0)))}else wa=91}else wa=91;while(0);if((wa|0)==91){wa=0;Qa=$(kk(ra,d,$(1.0)))}if((b[L>>0]|0)<0)br(f[d>>2]|0);wl(g,va,f[h>>2]|0,b[sa>>0]|0,Qa);k=f[h>>2]|0;if(k|0){na=f[C>>2]|0;if((na|0)!=(k|0))f[C>>2]=na+(~((na+-4-k|0)>>>2)<<2);br(k)}}else Kd(g,ja,va)|0;k=f[P>>2]|0;if((k|0)==(f[Q>>2]|0))of(R,g);else{f[k>>2]=1180;f[k+4>>2]=f[s>>2];Ra=k+8|0;f[Ra>>2]=0;na=k+12|0;f[na>>2]=0;f[k+16>>2]=0;ma=(f[y>>2]|0)-(f[V>>2]|0)|0;ya=ma>>2;if(ya|0){if(ya>>>0>1073741823){wa=103;break a}oa=dn(ma)|0;f[na>>2]=oa;f[Ra>>2]=oa;f[k+16>>2]=oa+(ya<<2);ya=f[V>>2]|0;ma=(f[y>>2]|0)-ya|0;if((ma|0)>0){Rg(oa|0,ya|0,ma|0)|0;f[na>>2]=oa+(ma>>>2<<2)}}f[k+20>>2]=f[W>>2];f[P>>2]=(f[P>>2]|0)+24}Re(d,g,ja,m);k=f[S>>2]|0;if(k>>>0<(f[T>>2]|0)>>>0){ma=f[d>>2]|0;f[d>>2]=0;f[k>>2]=ma;f[S>>2]=k+4}else Me(U,d);k=f[d>>2]|0;f[d>>2]=0;if(k|0){ma=k+88|0;oa=f[ma>>2]|0;f[ma>>2]=0;if(oa|0){ma=f[oa+8>>2]|0;if(ma|0){na=oa+12|0;if((f[na>>2]|0)!=(ma|0))f[na>>2]=ma;br(ma)}br(oa)}oa=f[k+68>>2]|0;if(oa|0){ma=k+72|0;na=f[ma>>2]|0;if((na|0)!=(oa|0))f[ma>>2]=na+(~((na+-4-oa|0)>>>2)<<2);br(oa)}oa=k+64|0;na=f[oa>>2]|0;f[oa>>2]=0;if(na|0){oa=f[na>>2]|0;if(oa|0){ma=na+4|0;if((f[ma>>2]|0)!=(oa|0))f[ma>>2]=oa;br(oa)}br(na)}br(k)}xa=0}f[g>>2]=1180;k=f[r>>2]|0;if(k|0){na=f[y>>2]|0;if((na|0)!=(k|0))f[y>>2]=na+(~((na+-4-k|0)>>>2)<<2);br(k)}if(xa|0){v=0;wa=169;break a}break}case 1:case 3:case 5:{k=ja+24|0;na=b[k>>0]|0;oa=na<<24>>24;f[g>>2]=0;f[_>>2]=0;f[aa>>2]=0;if(!(na<<24>>24))Sa=0;else{if(na<<24>>24<0){wa=137;break a}na=dn(oa<<2)|0;f[_>>2]=na;f[g>>2]=na;ma=na+(oa<<2)|0;f[a>>2]=ma;ya=oa;oa=na;while(1){f[oa>>2]=2147483647;ya=ya+-1|0;if(!ya)break;else oa=oa+4|0}f[_>>2]=ma;Sa=b[k>>0]|0}oa=Sa<<24>>24;f[h>>2]=0;f[ba>>2]=0;f[ca>>2]=0;if(!(Sa<<24>>24))Ta=0;else{if(Sa<<24>>24<0){wa=144;break a}ya=oa<<2;sa=dn(ya)|0;f[h>>2]=sa;ra=sa+(oa<<2)|0;f[da>>2]=ra;hj(sa|0,0,ya|0)|0;f[ba>>2]=ra;Ta=sa}sa=ja+80|0;ra=b[k>>0]|0;g:do if(!(f[sa>>2]|0))Ua=ra;else{ya=0;oa=ra;na=Ta;while(1){f[e>>2]=ya;f[d>>2]=f[e>>2];Pb(ja,d,oa,na)|0;Fa=b[k>>0]|0;if(Fa<<24>>24>0){ta=f[g>>2]|0;la=f[h>>2]|0;pa=Fa<<24>>24;Ga=0;do{ka=ta+(Ga<<2)|0;Ha=f[la+(Ga<<2)>>2]|0;if((f[ka>>2]|0)>(Ha|0))f[ka>>2]=Ha;Ga=Ga+1|0}while((Ga|0)<(pa|0))}pa=ya+1|0;if(pa>>>0>=(f[sa>>2]|0)>>>0){Ua=Fa;break g}ya=pa;oa=Fa;na=f[h>>2]|0}}while(0);if(Ua<<24>>24>0){sa=0;ja=Ua;while(1){ra=(f[g>>2]|0)+(sa<<2)|0;ma=f[ea>>2]|0;if((ma|0)==(f[fa>>2]|0)){Ci(ga,ra);Va=b[k>>0]|0}else{f[ma>>2]=f[ra>>2];f[ea>>2]=ma+4;Va=ja}sa=sa+1|0;if((sa|0)>=(Va<<24>>24|0))break;else ja=Va}}ja=f[h>>2]|0;if(ja|0){sa=f[ba>>2]|0;if((sa|0)!=(ja|0))f[ba>>2]=sa+(~((sa+-4-ja|0)>>>2)<<2);br(ja)}ja=f[g>>2]|0;if(ja|0){sa=f[_>>2]|0;if((sa|0)!=(ja|0))f[_>>2]=sa+(~((sa+-4-ja|0)>>>2)<<2);br(ja)}break}default:{}}ja=ha+1|0;sa=f[o>>2]|0;if(ja>>>0>=(f[p>>2]|0)-sa>>2>>>0){v=1;wa=169;break}k=f[j>>2]|0;ha=ja;ia=sa;t=f[k+4>>2]|0;l=k}if((wa|0)==48)mq(h);else if((wa|0)==103)mq(Ra);else if((wa|0)==137)mq(g);else if((wa|0)==144)mq(h);else if((wa|0)==169){u=c;return v|0}return 0}function hb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0;d=u;u=u+32|0;e=d;g=a+8|0;h=f[g>>2]|0;f[e>>2]=0;i=e+4|0;f[i>>2]=0;f[e+8>>2]=0;do if(h)if(h>>>0>1073741823)mq(e);else{j=h<<2;k=dn(j)|0;f[e>>2]=k;l=k+(h<<2)|0;f[e+8>>2]=l;hj(k|0,0,j|0)|0;f[i>>2]=l;m=l;n=k;break}else{m=0;n=0}while(0);k=a+128|0;l=f[k>>2]|0;j=f[l>>2]|0;o=l+4|0;if(!j){p=l+8|0;q=n;r=m;s=h}else{h=f[o>>2]|0;if((h|0)!=(j|0))f[o>>2]=h+(~((h+-4-j|0)>>>2)<<2);br(j);j=l+8|0;f[j>>2]=0;f[o>>2]=0;f[l>>2]=0;p=j;q=f[e>>2]|0;r=f[i>>2]|0;s=f[g>>2]|0}f[l>>2]=q;f[o>>2]=r;f[p>>2]=f[e+8>>2];f[e>>2]=0;p=e+4|0;f[p>>2]=0;f[e+8>>2]=0;do if(s)if(s>>>0>1073741823)mq(e);else{r=s<<2;o=dn(r)|0;f[e>>2]=o;q=o+(s<<2)|0;f[e+8>>2]=q;hj(o|0,0,r|0)|0;f[p>>2]=q;t=q;v=o;break}else{t=0;v=0}while(0);s=a+140|0;o=f[s>>2]|0;q=f[o>>2]|0;r=o+4|0;if(!q){w=o+8|0;x=v;y=t}else{t=f[r>>2]|0;if((t|0)!=(q|0))f[r>>2]=t+(~((t+-4-q|0)>>>2)<<2);br(q);q=o+8|0;f[q>>2]=0;f[r>>2]=0;f[o>>2]=0;w=q;x=f[e>>2]|0;y=f[p>>2]|0}f[o>>2]=x;f[r>>2]=y;f[w>>2]=f[e+8>>2];w=f[b>>2]|0;y=b+4|0;r=f[y>>2]|0;x=f[y+4>>2]|0;y=f[c>>2]|0;o=c+4|0;p=f[o>>2]|0;q=f[o+4>>2]|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;f[e+20>>2]=0;o=e+8|0;t=e+4|0;v=e+16|0;l=e+20|0;i=r;Jc(e);j=f[t>>2]|0;h=(f[l>>2]|0)+(f[v>>2]|0)|0;if((f[o>>2]|0)==(j|0))z=0;else z=(f[j+(((h>>>0)/113|0)<<2)>>2]|0)+(((h>>>0)%113|0)*36|0)|0;f[z>>2]=w;h=z+4|0;f[h>>2]=r;f[h+4>>2]=x;f[z+12>>2]=y;h=z+16|0;f[h>>2]=p;f[h+4>>2]=q;f[z+24>>2]=0;f[z+28>>2]=y-w;f[z+32>>2]=0;z=(f[l>>2]|0)+1|0;f[l>>2]=z;if(z|0){w=a+116|0;y=a+48|0;h=a+44|0;j=a+36|0;m=a+40|0;n=a+32|0;A=b+8|0;B=c+8|0;C=a+28|0;D=a+24|0;E=a+16|0;F=a+20|0;G=a+12|0;H=a+88|0;I=a+84|0;J=a+76|0;K=a+80|0;L=a+72|0;M=i+4|0;N=i+24|0;O=i+24|0;P=p+24|0;Q=z;while(1){z=f[v>>2]|0;R=Q+-1|0;S=R+z|0;T=f[t>>2]|0;U=f[T+(((S>>>0)/113|0)<<2)>>2]|0;V=(S>>>0)%113|0;S=f[U+(V*36|0)>>2]|0;W=f[U+(V*36|0)+12>>2]|0;Y=f[U+(V*36|0)+24>>2]|0;Z=f[U+(V*36|0)+32>>2]|0;f[l>>2]=R;R=f[o>>2]|0;V=R-T>>2;if((1-Q-z+((V|0)==0?0:(V*113|0)+-1|0)|0)>>>0>225){br(f[R+-4>>2]|0);f[o>>2]=(f[o>>2]|0)+-4}f[b>>2]=S;f[c>>2]=W;R=f[k>>2]|0;V=((f[g>>2]|0)+-1|0)==(Y|0)?0:Y+1|0;Y=(f[s>>2]|0)+(Z*12|0)|0;z=W-S|0;T=(f[a>>2]|0)-(f[(f[Y>>2]|0)+(V<<2)>>2]|0)|0;a:do if(T){if(z>>>0<3){U=f[w>>2]|0;f[U>>2]=V;$=f[g>>2]|0;if($>>>0>1){aa=1;ba=$;ca=V;while(1){ca=(ca|0)==(ba+-1|0)?0:ca+1|0;f[U+(aa<<2)>>2]=ca;aa=aa+1|0;da=f[g>>2]|0;if(aa>>>0>=da>>>0){ea=da;break}else ba=da}}else ea=$;if(!z){fa=99;break}else{ga=0;ha=ea}while(1){ba=(f[N>>2]|0)+((X(f[M>>2]|0,S+ga|0)|0)<<2)|0;if(!ha)ia=0;else{aa=0;do{ca=f[(f[w>>2]|0)+(aa<<2)>>2]|0;U=(f[a>>2]|0)-(f[(f[Y>>2]|0)+(ca<<2)>>2]|0)|0;do if(U|0){da=f[y>>2]|0;ja=32-da|0;ka=32-U|0;la=f[ba+(ca<<2)>>2]<(ja|0)){ma=la>>>ka;ka=U-ja|0;f[y>>2]=ka;ja=f[h>>2]|ma>>>ka;f[h>>2]=ja;ka=f[j>>2]|0;if((ka|0)==(f[m>>2]|0))Ci(n,h);else{f[ka>>2]=ja;f[j>>2]=ka+4}f[h>>2]=ma<<32-(f[y>>2]|0);break}ma=f[h>>2]|la>>>da;f[h>>2]=ma;la=da+U|0;f[y>>2]=la;if((la|0)!=32)break;la=f[j>>2]|0;if((la|0)==(f[m>>2]|0))Ci(n,h);else{f[la>>2]=ma;f[j>>2]=la+4}f[h>>2]=0;f[y>>2]=0}while(0);aa=aa+1|0;U=f[g>>2]|0}while(aa>>>0>>0);ia=U}ga=ga+1|0;if(ga>>>0>=z>>>0){fa=99;break a}else ha=ia}}$=Z+1|0;qg(R+($*12|0)|0,f[R+(Z*12|0)>>2]|0,f[R+(Z*12|0)+4>>2]|0);aa=(f[(f[k>>2]|0)+($*12|0)>>2]|0)+(V<<2)|0;ba=(f[aa>>2]|0)+(1<>2]=ba;aa=f[A>>2]|0;U=f[B>>2]|0;b:do if((W|0)==(S|0))na=S;else{ca=f[O>>2]|0;if(!aa){if((f[ca+(V<<2)>>2]|0)>>>0>>0){na=W;break}else{oa=W;pa=S}while(1){la=oa;do{la=la+-1|0;if((pa|0)==(la|0)){na=pa;break b}ma=(f[P>>2]|0)+((X(la,U)|0)<<2)+(V<<2)|0}while((f[ma>>2]|0)>>>0>=ba>>>0);pa=pa+1|0;if((pa|0)==(la|0)){na=la;break b}else oa=la}}else{qa=W;ra=S}while(1){ma=ra;while(1){sa=ca+((X(ma,aa)|0)<<2)|0;if((f[sa+(V<<2)>>2]|0)>>>0>=ba>>>0){ta=qa;break}da=ma+1|0;if((da|0)==(qa|0)){na=qa;break b}else ma=da}while(1){ta=ta+-1|0;if((ma|0)==(ta|0)){na=ma;break b}ua=(f[P>>2]|0)+((X(ta,U)|0)<<2)|0;if((f[ua+(V<<2)>>2]|0)>>>0>>0){va=0;break}}do{la=sa+(va<<2)|0;da=ua+(va<<2)|0;ka=f[la>>2]|0;f[la>>2]=f[da>>2];f[da>>2]=ka;va=va+1|0}while((va|0)!=(aa|0));ra=ma+1|0;if((ra|0)==(ta|0)){na=ta;break}else qa=ta}}while(0);ba=(_(z|0)|0)^31;U=na-S|0;ca=W-na|0;ka=U>>>0>>0;if((U|0)!=(ca|0)){da=f[H>>2]|0;if(ka)f[I>>2]=f[I>>2]|1<<31-da;la=da+1|0;f[H>>2]=la;if((la|0)==32){la=f[J>>2]|0;if((la|0)==(f[K>>2]|0))Ci(L,I);else{f[la>>2]=f[I>>2];f[J>>2]=la+4}f[H>>2]=0;f[I>>2]=0}}la=z>>>1;do if(ka){da=f[C>>2]|0;ja=32-da|0;wa=32-ba|0;xa=la-U<(ja|0)){ya=xa>>>wa;wa=ba-ja|0;f[C>>2]=wa;ja=f[D>>2]|ya>>>wa;f[D>>2]=ja;wa=f[E>>2]|0;if((wa|0)==(f[F>>2]|0))Ci(G,D);else{f[wa>>2]=ja;f[E>>2]=wa+4}f[D>>2]=ya<<32-(f[C>>2]|0);break}ya=f[D>>2]|xa>>>da;f[D>>2]=ya;xa=da+ba|0;f[C>>2]=xa;if((xa|0)==32){xa=f[E>>2]|0;if((xa|0)==(f[F>>2]|0))Ci(G,D);else{f[xa>>2]=ya;f[E>>2]=xa+4}f[D>>2]=0;f[C>>2]=0}}else{xa=f[C>>2]|0;ya=32-xa|0;da=32-ba|0;wa=la-ca<(ya|0)){ja=wa>>>da;da=ba-ya|0;f[C>>2]=da;ya=f[D>>2]|ja>>>da;f[D>>2]=ya;da=f[E>>2]|0;if((da|0)==(f[F>>2]|0))Ci(G,D);else{f[da>>2]=ya;f[E>>2]=da+4}f[D>>2]=ja<<32-(f[C>>2]|0);break}ja=f[D>>2]|wa>>>xa;f[D>>2]=ja;wa=xa+ba|0;f[C>>2]=wa;if((wa|0)==32){wa=f[E>>2]|0;if((wa|0)==(f[F>>2]|0))Ci(G,D);else{f[wa>>2]=ja;f[E>>2]=wa+4}f[D>>2]=0;f[C>>2]=0}}while(0);ba=f[s>>2]|0;la=f[ba+(Z*12|0)>>2]|0;ka=la+(V<<2)|0;f[ka>>2]=(f[ka>>2]|0)+1;qg(ba+($*12|0)|0,la,f[ba+(Z*12|0)+4>>2]|0);if((na|0)!=(S|0)){ba=f[o>>2]|0;la=f[t>>2]|0;ka=ba-la>>2;wa=f[v>>2]|0;ja=f[l>>2]|0;if((((ka|0)==0?0:(ka*113|0)+-1|0)|0)==(ja+wa|0)){Jc(e);za=f[v>>2]|0;Aa=f[l>>2]|0;Ba=f[o>>2]|0;Ca=f[t>>2]|0}else{za=wa;Aa=ja;Ba=ba;Ca=la}la=Aa+za|0;if((Ba|0)==(Ca|0))Da=0;else Da=(f[Ca+(((la>>>0)/113|0)<<2)>>2]|0)+(((la>>>0)%113|0)*36|0)|0;f[Da>>2]=S;la=Da+4|0;f[la>>2]=r;f[la+4>>2]=x;f[Da+12>>2]=na;f[Da+16>>2]=i;f[Da+20>>2]=aa;f[Da+24>>2]=V;f[Da+28>>2]=U;f[Da+32>>2]=Z;f[l>>2]=(f[l>>2]|0)+1}if((W|0)!=(na|0)){la=f[o>>2]|0;ba=f[t>>2]|0;ja=la-ba>>2;wa=f[v>>2]|0;ka=f[l>>2]|0;if((((ja|0)==0?0:(ja*113|0)+-1|0)|0)==(ka+wa|0)){Jc(e);Ea=f[v>>2]|0;Fa=f[l>>2]|0;Ga=f[o>>2]|0;Ha=f[t>>2]|0}else{Ea=wa;Fa=ka;Ga=la;Ha=ba}ba=Fa+Ea|0;if((Ga|0)==(Ha|0))Ia=0;else Ia=(f[Ha+(((ba>>>0)/113|0)<<2)>>2]|0)+(((ba>>>0)%113|0)*36|0)|0;f[Ia>>2]=na;f[Ia+4>>2]=i;f[Ia+8>>2]=aa;f[Ia+12>>2]=W;ba=Ia+16|0;f[ba>>2]=p;f[ba+4>>2]=q;f[Ia+24>>2]=V;f[Ia+28>>2]=ca;f[Ia+32>>2]=$;ba=(f[l>>2]|0)+1|0;f[l>>2]=ba;Ja=ba}else fa=99}else fa=99;while(0);if((fa|0)==99){fa=0;Ja=f[l>>2]|0}if(!Ja)break;else Q=Ja}}Ja=f[t>>2]|0;Q=f[v>>2]|0;Ia=Ja+(((Q>>>0)/113|0)<<2)|0;q=f[o>>2]|0;p=q;i=Ja;if((q|0)==(Ja|0)){Ka=0;La=0}else{na=(f[Ia>>2]|0)+(((Q>>>0)%113|0)*36|0)|0;Ka=na;La=na}na=Ia;Ia=La;c:while(1){La=Ia;do{Q=La;if((Ka|0)==(Q|0))break c;La=Q+36|0}while((La-(f[na>>2]|0)|0)!=4068);La=na+4|0;na=La;Ia=f[La>>2]|0}f[l>>2]=0;l=p-i>>2;if(l>>>0>2){i=Ja;do{br(f[i>>2]|0);i=(f[t>>2]|0)+4|0;f[t>>2]=i;Ma=f[o>>2]|0;Na=Ma-i>>2}while(Na>>>0>2);Oa=Na;Pa=i;Qa=Ma}else{Oa=l;Pa=Ja;Qa=q}switch(Oa|0){case 1:{Ra=56;fa=113;break}case 2:{Ra=113;fa=113;break}default:{}}if((fa|0)==113)f[v>>2]=Ra;if((Pa|0)!=(Qa|0)){Ra=Pa;do{br(f[Ra>>2]|0);Ra=Ra+4|0}while((Ra|0)!=(Qa|0));Qa=f[t>>2]|0;t=f[o>>2]|0;if((t|0)!=(Qa|0))f[o>>2]=t+(~((t+-4-Qa|0)>>>2)<<2)}Qa=f[e>>2]|0;if(!Qa){u=d;return}br(Qa);u=d;return}function ib(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0;d=u;u=u+80|0;e=d+56|0;g=d+52|0;h=d+48|0;i=d+68|0;j=d;k=d+44|0;l=d+40|0;m=d+36|0;n=d+32|0;o=d+28|0;p=d+24|0;q=d+20|0;r=d+16|0;s=d+12|0;if(!(b[c+288>>0]|0)){Ne(e,f[c+8>>2]|0);t=c+12|0;v=f[e>>2]|0;f[e>>2]=0;w=f[t>>2]|0;f[t>>2]=v;if(w){ui(w);br(w);w=f[e>>2]|0;f[e>>2]=0;if(w|0){ui(w);br(w)}}else f[e>>2]=0}else{Mg(e,f[c+8>>2]|0);w=c+12|0;v=f[e>>2]|0;f[e>>2]=0;t=f[w>>2]|0;f[w>>2]=v;if(t){ui(t);br(t);t=f[e>>2]|0;f[e>>2]=0;if(t|0){ui(t);br(t)}}else f[e>>2]=0}t=c+12|0;v=f[t>>2]|0;if(v|0?(((f[v+4>>2]|0)-(f[v>>2]|0)>>2>>>0)/3|0|0)!=(f[v+40>>2]|0):0){w=c+200|0;f[c+264>>2]=c;x=c+4|0;Nh(((f[v+28>>2]|0)-(f[v+24>>2]|0)>>2)-(f[v+44>>2]|0)|0,f[(f[x>>2]|0)+44>>2]|0)|0;v=f[t>>2]|0;Nh((((f[v+4>>2]|0)-(f[v>>2]|0)>>2>>>0)/3|0)-(f[v+40>>2]|0)|0,f[(f[x>>2]|0)+44>>2]|0)|0;v=c+28|0;y=c+8|0;z=f[y>>2]|0;A=((f[z+100>>2]|0)-(f[z+96>>2]|0)|0)/12|0;b[e>>0]=0;Xg(v,A,e);A=f[t>>2]|0;z=(f[A+28>>2]|0)-(f[A+24>>2]|0)>>2;f[e>>2]=-1;Sf(c+52|0,z,e);z=c+40|0;A=f[z>>2]|0;B=c+44|0;C=f[B>>2]|0;if((C|0)!=(A|0))f[B>>2]=C+(~((C+-4-A|0)>>>2)<<2);A=f[t>>2]|0;C=(f[A+4>>2]|0)-(f[A>>2]|0)>>2;$j(z,C-((C>>>0)%3|0)|0);C=c+84|0;z=f[t>>2]|0;A=(f[z+28>>2]|0)-(f[z+24>>2]|0)>>2;b[e>>0]=0;Xg(C,A,e);A=c+96|0;z=f[A>>2]|0;B=c+100|0;D=f[B>>2]|0;if((D|0)!=(z|0))f[B>>2]=D+(~((D+-4-z|0)>>>2)<<2);f[c+164>>2]=-1;z=c+168|0;f[z>>2]=0;D=f[c+108>>2]|0;E=c+112|0;F=f[E>>2]|0;if((F|0)!=(D|0))f[E>>2]=F+(~(((F+-12-D|0)>>>0)/12|0)*12|0);D=c+132|0;if(f[D>>2]|0){F=c+128|0;E=f[F>>2]|0;if(E|0){G=E;do{E=G;G=f[G>>2]|0;br(E)}while((G|0)!=0)}f[F>>2]=0;F=f[c+124>>2]|0;if(F|0){G=c+120|0;E=0;do{f[(f[G>>2]|0)+(E<<2)>>2]=0;E=E+1|0}while((E|0)!=(F|0))}f[D>>2]=0}f[c+144>>2]=0;D=f[t>>2]|0;F=(f[D+28>>2]|0)-(f[D+24>>2]|0)>>2;f[e>>2]=-1;Sf(c+152|0,F,e);F=c+72|0;D=f[F>>2]|0;E=c+76|0;G=f[E>>2]|0;if((G|0)!=(D|0))f[E>>2]=G+(~((G+-4-D|0)>>>2)<<2);D=f[t>>2]|0;$j(F,((f[D+4>>2]|0)-(f[D>>2]|0)>>2>>>0)/3|0);f[c+64>>2]=0;if(!(oe(c)|0)){D=dn(32)|0;f[e>>2]=D;f[e+8>>2]=-2147483616;f[e+4>>2]=29;H=D;I=13227;J=H+29|0;do{b[H>>0]=b[I>>0]|0;H=H+1|0;I=I+1|0}while((H|0)<(J|0));b[D+29>>0]=0;f[a>>2]=-1;dj(a+4|0,e);if((b[e+11>>0]|0)<0)br(f[e>>2]|0);u=d;return}if(!(ch(c)|0)){D=dn(48)|0;f[e>>2]=D;f[e+8>>2]=-2147483600;f[e+4>>2]=36;H=D;I=13257;J=H+36|0;do{b[H>>0]=b[I>>0]|0;H=H+1|0;I=I+1|0}while((H|0)<(J|0));b[D+36>>0]=0;f[a>>2]=-1;dj(a+4|0,e);if((b[e+11>>0]|0)<0)br(f[e>>2]|0);u=d;return}D=c+172|0;G=c+176|0;K=(((f[G>>2]|0)-(f[D>>2]|0)|0)/136|0)&255;b[i>>0]=K;L=f[(f[x>>2]|0)+44>>2]|0;M=L+16|0;N=f[M+4>>2]|0;if((N|0)>0|(N|0)==0&(f[M>>2]|0)>>>0>0)O=K;else{f[g>>2]=f[L+4>>2];f[e>>2]=f[g>>2];ye(L,e,i,i+1|0)|0;O=b[i>>0]|0}i=c+284|0;f[i>>2]=O&255;O=f[t>>2]|0;L=(f[O+4>>2]|0)-(f[O>>2]|0)|0;O=L>>2;Ti(w);f[j>>2]=0;K=j+4|0;f[K>>2]=0;f[j+8>>2]=0;a:do if((L|0)>0){M=c+104|0;N=j+8|0;P=0;b:while(1){Q=(P>>>0)/3|0;R=Q>>>5;S=1<<(Q&31);if((f[(f[v>>2]|0)+(R<<2)>>2]&S|0)==0?(T=f[t>>2]|0,f[k>>2]=Q,f[e>>2]=f[k>>2],!(Rj(T,e)|0)):0){f[g>>2]=0;f[l>>2]=Q;f[e>>2]=f[l>>2];Q=gg(c,e,g)|0;Vi(w,Q);T=f[g>>2]|0;U=(T|0)==-1;do if(Q){do if(U){V=-1;W=-1;X=-1}else{Y=f[f[t>>2]>>2]|0;Z=f[Y+(T<<2)>>2]|0;_=T+1|0;$=((_>>>0)%3|0|0)==0?T+-2|0:_;if(($|0)==-1)aa=-1;else aa=f[Y+($<<2)>>2]|0;$=(((T>>>0)%3|0|0)==0?2:-1)+T|0;if(($|0)==-1){V=-1;W=aa;X=Z;break}V=f[Y+($<<2)>>2]|0;W=aa;X=Z}while(0);Z=f[C>>2]|0;$=Z+(X>>>5<<2)|0;f[$>>2]=f[$>>2]|1<<(X&31);$=Z+(W>>>5<<2)|0;f[$>>2]=f[$>>2]|1<<(W&31);$=Z+(V>>>5<<2)|0;f[$>>2]=f[$>>2]|1<<(V&31);f[e>>2]=1;$=f[B>>2]|0;if($>>>0<(f[M>>2]|0)>>>0){f[$>>2]=1;f[B>>2]=$+4}else Ci(A,e);$=(f[v>>2]|0)+(R<<2)|0;f[$>>2]=f[$>>2]|S;$=T+1|0;if(U)ba=-1;else ba=(($>>>0)%3|0|0)==0?T+-2|0:$;f[e>>2]=ba;Z=f[K>>2]|0;if(Z>>>0<(f[N>>2]|0)>>>0){f[Z>>2]=ba;f[K>>2]=Z+4}else Ci(j,e);if(U)break;Z=(($>>>0)%3|0|0)==0?T+-2|0:$;if((Z|0)==-1)break;$=f[(f[(f[t>>2]|0)+12>>2]|0)+(Z<<2)>>2]|0;Z=($|0)==-1;Y=Z?-1:($>>>0)/3|0;if(Z)break;if(f[(f[v>>2]|0)+(Y>>>5<<2)>>2]&1<<(Y&31)|0)break;f[m>>2]=$;f[e>>2]=f[m>>2];if(!(hc(c,e)|0)){ca=65;break b}}else{$=T+1|0;if(U)da=-1;else da=(($>>>0)%3|0|0)==0?T+-2|0:$;f[n>>2]=da;f[e>>2]=f[n>>2];Ce(c,e,1)|0;f[o>>2]=f[g>>2];f[e>>2]=f[o>>2];if(!(hc(c,e)|0)){ca=71;break b}}while(0)}P=P+1|0;if((P|0)>=(O|0)){ca=77;break a}}if((ca|0)==65){f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;P=dn(48)|0;f[e>>2]=P;f[e+8>>2]=-2147483600;f[e+4>>2]=32;H=P;I=13294;J=H+32|0;do{b[H>>0]=b[I>>0]|0;H=H+1|0;I=I+1|0}while((H|0)<(J|0));b[P+32>>0]=0;f[a>>2]=-1;dj(a+4|0,e);if((b[e+11>>0]|0)<0)br(f[e>>2]|0)}else if((ca|0)==71){f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;N=dn(48)|0;f[e>>2]=N;f[e+8>>2]=-2147483600;f[e+4>>2]=32;H=N;I=13294;J=H+32|0;do{b[H>>0]=b[I>>0]|0;H=H+1|0;I=I+1|0}while((H|0)<(J|0));b[N+32>>0]=0;f[a>>2]=-1;dj(a+4|0,e);if((b[e+11>>0]|0)<0)br(f[e>>2]|0)}}else ca=77;while(0);do if((ca|0)==77){O=f[F>>2]|0;o=f[E>>2]|0;n=o;if((O|0)!=(o|0)?(da=o+-4|0,O>>>0>>0):0){o=O;O=da;do{da=f[o>>2]|0;f[o>>2]=f[O>>2];f[O>>2]=da;o=o+4|0;O=O+-4|0}while(o>>>0>>0)}f[p>>2]=n;f[q>>2]=f[j>>2];f[r>>2]=f[K>>2];f[h>>2]=f[p>>2];f[g>>2]=f[q>>2];f[e>>2]=f[r>>2];Md(F,h,g,e)|0;if((f[G>>2]|0)!=(f[D>>2]|0)?(O=f[y>>2]|0,o=((f[O+100>>2]|0)-(f[O+96>>2]|0)|0)/12|0,b[e>>0]=0,Xg(v,o,e),o=f[F>>2]|0,O=f[E>>2]|0,(o|0)!=(O|0)):0){N=o;do{f[s>>2]=f[N>>2];f[e>>2]=f[s>>2];ue(c,e)|0;N=N+4|0}while((N|0)!=(O|0))}_g(w);O=c+232|0;fd(w,O);N=c+280|0;n=f[N>>2]|0;if((n|0?(f[i>>2]|0)>0:0)?(fd(n,O),(f[i>>2]|0)>1):0){n=1;do{fd((f[N>>2]|0)+(n<<5)|0,O);n=n+1|0}while((n|0)<(f[i>>2]|0))}Nh((f[c+272>>2]|0)-(f[c+268>>2]|0)>>2,f[(f[x>>2]|0)+44>>2]|0)|0;Nh(f[z>>2]|0,f[(f[x>>2]|0)+44>>2]|0)|0;if(Jg(c)|0){n=f[(f[x>>2]|0)+44>>2]|0;N=f[O>>2]|0;o=n+16|0;da=f[o+4>>2]|0;if(!((da|0)>0|(da|0)==0&(f[o>>2]|0)>>>0>0)){o=(f[c+236>>2]|0)-N|0;f[g>>2]=f[n+4>>2];f[e>>2]=f[g>>2];ye(n,e,N,N+o|0)|0}f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;break}else{f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;o=dn(32)|0;f[e>>2]=o;f[e+8>>2]=-2147483616;f[e+4>>2]=28;H=o;I=13327;J=H+28|0;do{b[H>>0]=b[I>>0]|0;H=H+1|0;I=I+1|0}while((H|0)<(J|0));b[o+28>>0]=0;f[a>>2]=-1;dj(a+4|0,e);if((b[e+11>>0]|0)<0)br(f[e>>2]|0);break}}while(0);g=f[j>>2]|0;if(g|0){j=f[K>>2]|0;if((j|0)!=(g|0))f[K>>2]=j+(~((j+-4-g|0)>>>2)<<2);br(g)}u=d;return}g=dn(32)|0;f[e>>2]=g;f[e+8>>2]=-2147483616;f[e+4>>2]=29;H=g;I=13197;J=H+29|0;do{b[H>>0]=b[I>>0]|0;H=H+1|0;I=I+1|0}while((H|0)<(J|0));b[g+29>>0]=0;f[a>>2]=-1;dj(a+4|0,e);if((b[e+11>>0]|0)<0)br(f[e>>2]|0);u=d;return}function jb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0;d=u;u=u+48|0;e=d+36|0;g=d+24|0;h=d;i=a+8|0;j=f[i>>2]|0;f[e>>2]=0;k=e+4|0;f[k>>2]=0;f[e+8>>2]=0;do if(j)if(j>>>0>1073741823)mq(e);else{l=j<<2;m=dn(l)|0;f[e>>2]=m;n=m+(j<<2)|0;f[e+8>>2]=n;hj(m|0,0,l|0)|0;f[k>>2]=n;o=n;p=m;break}else{o=0;p=0}while(0);m=a+1164|0;n=f[m>>2]|0;l=f[n>>2]|0;q=n+4|0;if(!l){r=n+8|0;s=p;t=o;v=j}else{j=f[q>>2]|0;if((j|0)!=(l|0))f[q>>2]=j+(~((j+-4-l|0)>>>2)<<2);br(l);l=n+8|0;f[l>>2]=0;f[q>>2]=0;f[n>>2]=0;r=l;s=f[e>>2]|0;t=f[k>>2]|0;v=f[i>>2]|0}f[n>>2]=s;f[q>>2]=t;f[r>>2]=f[e+8>>2];f[e>>2]=0;r=e+4|0;f[r>>2]=0;f[e+8>>2]=0;do if(v)if(v>>>0>1073741823)mq(e);else{t=v<<2;q=dn(t)|0;f[e>>2]=q;s=q+(v<<2)|0;f[e+8>>2]=s;hj(q|0,0,t|0)|0;f[r>>2]=s;w=s;x=q;break}else{w=0;x=0}while(0);v=a+1176|0;q=f[v>>2]|0;s=f[q>>2]|0;t=q+4|0;if(!s){y=q+8|0;z=x;A=w}else{w=f[t>>2]|0;if((w|0)!=(s|0))f[t>>2]=w+(~((w+-4-s|0)>>>2)<<2);br(s);s=q+8|0;f[s>>2]=0;f[t>>2]=0;f[q>>2]=0;y=s;z=f[e>>2]|0;A=f[r>>2]|0}f[q>>2]=z;f[t>>2]=A;f[y>>2]=f[e+8>>2];y=f[b>>2]|0;A=b+4|0;t=f[A>>2]|0;z=f[A+4>>2]|0;A=f[c>>2]|0;q=c+4|0;r=f[q>>2]|0;s=f[q+4>>2]|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;f[h+16>>2]=0;f[h+20>>2]=0;q=h+8|0;w=h+4|0;x=h+16|0;n=h+20|0;k=t;Jc(h);l=f[w>>2]|0;j=(f[n>>2]|0)+(f[x>>2]|0)|0;if((f[q>>2]|0)==(l|0))B=0;else B=(f[l+(((j>>>0)/113|0)<<2)>>2]|0)+(((j>>>0)%113|0)*36|0)|0;f[B>>2]=y;j=B+4|0;f[j>>2]=t;f[j+4>>2]=z;f[B+12>>2]=A;j=B+16|0;f[j>>2]=r;f[j+4>>2]=s;f[B+24>>2]=0;f[B+28>>2]=A-y;f[B+32>>2]=0;B=(f[n>>2]|0)+1|0;f[n>>2]=B;if(B|0){y=a+1152|0;A=a+1084|0;j=a+1080|0;l=a+1072|0;o=a+1076|0;p=a+1068|0;C=b+8|0;D=c+8|0;E=a+1124|0;F=a+1120|0;G=a+1112|0;H=a+1116|0;I=a+1108|0;J=k+4|0;K=k+24|0;L=k+24|0;M=r+24|0;N=B;while(1){B=f[x>>2]|0;O=N+-1|0;P=O+B|0;Q=f[w>>2]|0;R=f[Q+(((P>>>0)/113|0)<<2)>>2]|0;S=(P>>>0)%113|0;P=f[R+(S*36|0)>>2]|0;T=f[R+(S*36|0)+12>>2]|0;U=f[R+(S*36|0)+24>>2]|0;V=f[R+(S*36|0)+32>>2]|0;f[n>>2]=O;O=f[q>>2]|0;S=O-Q>>2;if((1-N-B+((S|0)==0?0:(S*113|0)+-1|0)|0)>>>0>225){br(f[O+-4>>2]|0);f[q>>2]=(f[q>>2]|0)+-4}f[b>>2]=P;f[c>>2]=T;O=f[m>>2]|0;S=O+(V*12|0)|0;B=(f[v>>2]|0)+(V*12|0)|0;f[g>>2]=f[b>>2];f[g+4>>2]=f[b+4>>2];f[g+8>>2]=f[b+8>>2];f[e>>2]=f[c>>2];f[e+4>>2]=f[c+4>>2];f[e+8>>2]=f[c+8>>2];Q=Gd(a,g,e,S,B,U)|0;U=T-P|0;R=(f[a>>2]|0)-(f[(f[B>>2]|0)+(Q<<2)>>2]|0)|0;a:do if(R){if(U>>>0<3){W=f[y>>2]|0;f[W>>2]=Q;Y=f[i>>2]|0;if(Y>>>0>1){Z=1;$=Y;aa=Q;while(1){aa=(aa|0)==($+-1|0)?0:aa+1|0;f[W+(Z<<2)>>2]=aa;Z=Z+1|0;ba=f[i>>2]|0;if(Z>>>0>=ba>>>0){ca=ba;break}else $=ba}}else ca=Y;if(!U){da=87;break}else{ea=0;fa=ca}while(1){$=(f[K>>2]|0)+((X(f[J>>2]|0,P+ea|0)|0)<<2)|0;if(!fa)ga=0;else{Z=0;do{aa=f[(f[y>>2]|0)+(Z<<2)>>2]|0;W=(f[a>>2]|0)-(f[(f[B>>2]|0)+(aa<<2)>>2]|0)|0;do if(W|0){ba=f[A>>2]|0;ha=32-ba|0;ia=32-W|0;ja=f[$+(aa<<2)>>2]<(ha|0)){ka=ja>>>ia;ia=W-ha|0;f[A>>2]=ia;ha=f[j>>2]|ka>>>ia;f[j>>2]=ha;ia=f[l>>2]|0;if((ia|0)==(f[o>>2]|0))Ci(p,j);else{f[ia>>2]=ha;f[l>>2]=ia+4}f[j>>2]=ka<<32-(f[A>>2]|0);break}ka=f[j>>2]|ja>>>ba;f[j>>2]=ka;ja=ba+W|0;f[A>>2]=ja;if((ja|0)!=32)break;ja=f[l>>2]|0;if((ja|0)==(f[o>>2]|0))Ci(p,j);else{f[ja>>2]=ka;f[l>>2]=ja+4}f[j>>2]=0;f[A>>2]=0}while(0);Z=Z+1|0;W=f[i>>2]|0}while(Z>>>0>>0);ga=W}ea=ea+1|0;if(ea>>>0>=U>>>0){da=87;break a}else fa=ga}}Y=V+1|0;Z=f[m>>2]|0;$=Z+(Y*12|0)|0;if(($|0)==(S|0))la=Z;else{qg($,f[S>>2]|0,f[O+(V*12|0)+4>>2]|0);la=f[m>>2]|0}$=(f[la+(Y*12|0)>>2]|0)+(Q<<2)|0;Z=(f[$>>2]|0)+(1<>2]=Z;$=f[C>>2]|0;W=f[D>>2]|0;b:do if((T|0)==(P|0))ma=P;else{aa=f[L>>2]|0;if(!$){if((f[aa+(Q<<2)>>2]|0)>>>0>>0){ma=T;break}else{na=T;oa=P}while(1){ja=na;do{ja=ja+-1|0;if((oa|0)==(ja|0)){ma=oa;break b}ka=(f[M>>2]|0)+((X(ja,W)|0)<<2)+(Q<<2)|0}while((f[ka>>2]|0)>>>0>=Z>>>0);oa=oa+1|0;if((oa|0)==(ja|0)){ma=ja;break b}else na=ja}}else{pa=T;qa=P}while(1){ka=qa;while(1){ra=aa+((X(ka,$)|0)<<2)|0;if((f[ra+(Q<<2)>>2]|0)>>>0>=Z>>>0){sa=pa;break}ba=ka+1|0;if((ba|0)==(pa|0)){ma=pa;break b}else ka=ba}while(1){sa=sa+-1|0;if((ka|0)==(sa|0)){ma=ka;break b}ta=(f[M>>2]|0)+((X(sa,W)|0)<<2)|0;if((f[ta+(Q<<2)>>2]|0)>>>0>>0){ua=0;break}}do{ja=ra+(ua<<2)|0;ba=ta+(ua<<2)|0;ia=f[ja>>2]|0;f[ja>>2]=f[ba>>2];f[ba>>2]=ia;ua=ua+1|0}while((ua|0)!=($|0));qa=ka+1|0;if((qa|0)==(sa|0)){ma=sa;break}else pa=sa}}while(0);Z=(_(U|0)|0)^31;W=ma-P|0;aa=T-ma|0;ia=W>>>0>>0;if((W|0)!=(aa|0)){ba=f[E>>2]|0;if(ia)f[F>>2]=f[F>>2]|1<<31-ba;ja=ba+1|0;f[E>>2]=ja;if((ja|0)==32){ja=f[G>>2]|0;if((ja|0)==(f[H>>2]|0))Ci(I,F);else{f[ja>>2]=f[F>>2];f[G>>2]=ja+4}f[E>>2]=0;f[F>>2]=0}}ja=U>>>1;if(ia){ia=ja-W|0;if(Z|0){ba=0;ha=1<>>1}}}else{ha=ja-aa|0;if(Z|0){ba=0;ia=1<>>1}}}ia=f[v>>2]|0;Z=f[ia+(V*12|0)>>2]|0;ba=Z+(Q<<2)|0;f[ba>>2]=(f[ba>>2]|0)+1;qg(ia+(Y*12|0)|0,Z,f[ia+(V*12|0)+4>>2]|0);if((ma|0)!=(P|0)){ia=f[q>>2]|0;Z=f[w>>2]|0;ba=ia-Z>>2;ha=f[x>>2]|0;ja=f[n>>2]|0;if((((ba|0)==0?0:(ba*113|0)+-1|0)|0)==(ja+ha|0)){Jc(h);va=f[x>>2]|0;wa=f[n>>2]|0;xa=f[q>>2]|0;ya=f[w>>2]|0}else{va=ha;wa=ja;xa=ia;ya=Z}Z=wa+va|0;if((xa|0)==(ya|0))za=0;else za=(f[ya+(((Z>>>0)/113|0)<<2)>>2]|0)+(((Z>>>0)%113|0)*36|0)|0;f[za>>2]=P;Z=za+4|0;f[Z>>2]=t;f[Z+4>>2]=z;f[za+12>>2]=ma;f[za+16>>2]=k;f[za+20>>2]=$;f[za+24>>2]=Q;f[za+28>>2]=W;f[za+32>>2]=V;f[n>>2]=(f[n>>2]|0)+1}if((T|0)!=(ma|0)){Z=f[q>>2]|0;ia=f[w>>2]|0;ja=Z-ia>>2;ha=f[x>>2]|0;ba=f[n>>2]|0;if((((ja|0)==0?0:(ja*113|0)+-1|0)|0)==(ba+ha|0)){Jc(h);Aa=f[x>>2]|0;Ba=f[n>>2]|0;Ca=f[q>>2]|0;Da=f[w>>2]|0}else{Aa=ha;Ba=ba;Ca=Z;Da=ia}ia=Ba+Aa|0;if((Ca|0)==(Da|0))Ea=0;else Ea=(f[Da+(((ia>>>0)/113|0)<<2)>>2]|0)+(((ia>>>0)%113|0)*36|0)|0;f[Ea>>2]=ma;f[Ea+4>>2]=k;f[Ea+8>>2]=$;f[Ea+12>>2]=T;ia=Ea+16|0;f[ia>>2]=r;f[ia+4>>2]=s;f[Ea+24>>2]=Q;f[Ea+28>>2]=aa;f[Ea+32>>2]=Y;ia=(f[n>>2]|0)+1|0;f[n>>2]=ia;Fa=ia}else da=87}else da=87;while(0);if((da|0)==87){da=0;Fa=f[n>>2]|0}if(!Fa)break;else N=Fa}}Fa=f[w>>2]|0;N=f[x>>2]|0;Ea=Fa+(((N>>>0)/113|0)<<2)|0;s=f[q>>2]|0;r=s;k=Fa;if((s|0)==(Fa|0)){Ga=0;Ha=0}else{ma=(f[Ea>>2]|0)+(((N>>>0)%113|0)*36|0)|0;Ga=ma;Ha=ma}ma=Ea;Ea=Ha;c:while(1){Ha=Ea;do{N=Ha;if((Ga|0)==(N|0))break c;Ha=N+36|0}while((Ha-(f[ma>>2]|0)|0)!=4068);Ha=ma+4|0;ma=Ha;Ea=f[Ha>>2]|0}f[n>>2]=0;n=r-k>>2;if(n>>>0>2){k=Fa;do{br(f[k>>2]|0);k=(f[w>>2]|0)+4|0;f[w>>2]=k;Ia=f[q>>2]|0;Ja=Ia-k>>2}while(Ja>>>0>2);Ka=Ja;La=k;Ma=Ia}else{Ka=n;La=Fa;Ma=s}switch(Ka|0){case 1:{Na=56;da=101;break}case 2:{Na=113;da=101;break}default:{}}if((da|0)==101)f[x>>2]=Na;if((La|0)!=(Ma|0)){Na=La;do{br(f[Na>>2]|0);Na=Na+4|0}while((Na|0)!=(Ma|0));Ma=f[w>>2]|0;w=f[q>>2]|0;if((w|0)!=(Ma|0))f[q>>2]=w+(~((w+-4-Ma|0)>>>2)<<2)}Ma=f[h>>2]|0;if(!Ma){u=d;return}br(Ma);u=d;return}function kb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0;d=u;u=u+1424|0;e=d+1408|0;g=d+1396|0;h=d+1420|0;i=d+1200|0;j=d+12|0;k=d;l=d+1384|0;m=d+1372|0;n=d+1360|0;o=d+1348|0;p=d+1336|0;q=d+1324|0;r=d+1312|0;s=d+1300|0;t=d+1288|0;v=d+1276|0;w=d+1264|0;x=d+1252|0;y=d+1240|0;z=d+1228|0;A=a+28|0;B=10-(Yh(f[(f[A>>2]|0)+48>>2]|0)|0)|0;C=(B|0)<6?B:6;b[h>>0]=C;if((C&255|0)==6?(f[a+72>>2]|0)>15:0)b[h>>0]=5;C=c+16|0;B=f[C+4>>2]|0;if(!((B|0)>0|(B|0)==0&(f[C>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];ye(c,e,h,h+1|0)|0}C=f[A>>2]|0;B=f[(f[C+4>>2]|0)+80>>2]|0;D=a+72|0;E=f[D>>2]|0;f[i>>2]=B;F=i+4|0;f[F>>2]=E;f[i+8>>2]=E<<2;G=i+12|0;H=X(E,B)|0;f[G>>2]=0;J=i+16|0;f[J>>2]=0;f[i+20>>2]=0;do if(H)if(H>>>0>1073741823)mq(G);else{K=H<<2;L=dn(K)|0;f[G>>2]=L;M=L+(H<<2)|0;f[i+20>>2]=M;hj(L|0,0,K|0)|0;f[J>>2]=M;N=L;break}else N=0;while(0);H=i+24|0;f[H>>2]=N;G=a+4|0;L=a+8|0;M=f[G>>2]|0;a:do if((f[L>>2]|0)!=(M|0)){K=j+4|0;O=j+8|0;P=j+8|0;Q=(B|0)==0;R=j+4|0;S=j+8|0;T=k+4|0;U=k+8|0;V=k+8|0;W=a+48|0;Y=j+8|0;Z=a+60|0;$=0;aa=0;ba=0;ca=0;da=M;ea=C;b:while(1){fa=f[(f[(f[ea+4>>2]|0)+8>>2]|0)+(f[da+(ca<<2)>>2]<<2)>>2]|0;switch(f[fa+28>>2]|0){case 1:case 3:case 5:case 2:case 4:case 6:{ga=fa;ha=aa;break}case 9:{ga=f[(f[Z>>2]|0)+(aa<<2)>>2]|0;ha=aa+1|0;break}default:{ia=0;break a}}if(!ga){ia=0;break a}c:do switch(f[ga+28>>2]|0){case 6:{if(Q){ja=ba;ka=ga+24|0;break c}fa=ga+84|0;la=ga+68|0;ma=ga+48|0;na=ga+40|0;oa=ga+24|0;pa=0;do{if(!(b[fa>>0]|0))qa=f[(f[la>>2]|0)+(pa<<2)>>2]|0;else qa=pa;ra=ma;sa=f[ra>>2]|0;ta=f[ra+4>>2]|0;ra=na;ua=on(f[ra>>2]|0,f[ra+4>>2]|0,qa|0,0)|0;ra=Tn(ua|0,I|0,sa|0,ta|0)|0;Rg((f[H>>2]|0)+((X(f[F>>2]|0,pa)|0)<<2)+($<<2)|0,(f[f[ga>>2]>>2]|0)+ra|0,b[oa>>0]<<2|0)|0;pa=pa+1|0}while((pa|0)!=(B|0));ja=ba;ka=oa;break}case 1:case 3:case 5:{oa=ga+24|0;pa=b[oa>>0]|0;na=pa<<24>>24;f[j>>2]=0;f[R>>2]=0;f[S>>2]=0;if(!(pa<<24>>24))va=0;else{if(pa<<24>>24<0){wa=24;break b}pa=na<<2;ma=dn(pa)|0;f[j>>2]=ma;la=ma+(na<<2)|0;f[Y>>2]=la;hj(ma|0,0,pa|0)|0;f[R>>2]=la;va=b[oa>>0]|0}la=va<<24>>24;f[k>>2]=0;f[T>>2]=0;f[U>>2]=0;if(!(va<<24>>24)){xa=0;ya=0}else{if(va<<24>>24<0){wa=30;break b}pa=la<<2;ma=dn(pa)|0;f[k>>2]=ma;na=ma+(la<<2)|0;f[V>>2]=na;hj(ma|0,0,pa|0)|0;f[T>>2]=na;xa=ma;ya=ma}if(Q){za=ya;Aa=xa}else{ma=ga+84|0;na=ga+68|0;pa=0;do{if(!(b[ma>>0]|0))Ba=f[(f[na>>2]|0)+(pa<<2)>>2]|0;else Ba=pa;la=f[j>>2]|0;f[g>>2]=Ba;fa=b[oa>>0]|0;f[e>>2]=f[g>>2];Pb(ga,e,fa,la)|0;la=b[oa>>0]|0;fa=la<<24>>24;if(la<<24>>24>0){la=f[j>>2]|0;ra=f[W>>2]|0;ta=f[k>>2]|0;sa=0;do{f[ta+(sa<<2)>>2]=(f[la+(sa<<2)>>2]|0)-(f[ra+(sa+ba<<2)>>2]|0);sa=sa+1|0}while((sa|0)<(fa|0));Ca=ta}else Ca=f[k>>2]|0;Rg((f[H>>2]|0)+((X(f[F>>2]|0,pa)|0)<<2)+($<<2)|0,Ca|0,fa<<2|0)|0;pa=pa+1|0}while(pa>>>0>>0);pa=f[k>>2]|0;za=pa;Aa=pa}pa=ba+(b[oa>>0]|0)|0;if(za|0){na=f[T>>2]|0;if((na|0)!=(za|0))f[T>>2]=na+(~((na+-4-za|0)>>>2)<<2);br(Aa)}na=f[j>>2]|0;if(na|0){ma=f[R>>2]|0;if((ma|0)!=(na|0))f[R>>2]=ma+(~((ma+-4-na|0)>>>2)<<2);br(na)}ja=pa;ka=oa;break}default:{pa=ga+24|0;na=b[pa>>0]|0;ma=na<<24>>24;f[j>>2]=0;f[K>>2]=0;f[O>>2]=0;if(!(na<<24>>24)){Da=0;Ea=0}else{if(na<<24>>24<0){wa=53;break b}na=ma<<2;ta=dn(na)|0;f[j>>2]=ta;sa=ta+(ma<<2)|0;f[P>>2]=sa;hj(ta|0,0,na|0)|0;f[K>>2]=sa;Da=ta;Ea=ta}if(Q){Fa=Ea;Ga=Da}else{ta=ga+84|0;sa=ga+68|0;na=0;do{if(!(b[ta>>0]|0))Ha=f[(f[sa>>2]|0)+(na<<2)>>2]|0;else Ha=na;ma=f[j>>2]|0;f[g>>2]=Ha;ra=b[pa>>0]|0;f[e>>2]=f[g>>2];Ob(ga,e,ra,ma)|0;Rg((f[H>>2]|0)+((X(f[F>>2]|0,na)|0)<<2)+($<<2)|0,f[j>>2]|0,b[pa>>0]<<2|0)|0;na=na+1|0}while(na>>>0>>0);na=f[j>>2]|0;Fa=na;Ga=na}if(Fa|0){na=f[K>>2]|0;if((na|0)!=(Fa|0))f[K>>2]=na+(~((na+-4-Fa|0)>>>2)<<2);br(Ga)}ja=ba;ka=pa}}while(0);na=ca+1|0;sa=f[G>>2]|0;if(na>>>0>=(f[L>>2]|0)-sa>>2>>>0){wa=66;break}$=$+(b[ka>>0]|0)|0;aa=ha;ba=ja;ca=na;da=sa;ea=f[A>>2]|0}if((wa|0)==24)mq(j);else if((wa|0)==30)mq(k);else if((wa|0)==53)mq(j);else if((wa|0)==66){Ia=f[D>>2]|0;Ja=f[H>>2]|0;wa=67;break}}else{Ia=E;Ja=N;wa=67}while(0);d:do if((wa|0)==67){N=X(Ia,B)|0;if((N|0)>0){E=0;H=0;while(1){D=f[Ja+(E<<2)>>2]|0;if(!D)Ka=H;else{A=(_(D|0)|0)^31;Ka=(A|0)<(H|0)?H:A+1|0}E=E+1|0;if((E|0)>=(N|0)){La=Ka;break}else H=Ka}}else La=0;switch(b[h>>0]|0){case 6:{Ge(j,Ia);f[l>>2]=0;f[l+4>>2]=i;H=f[F>>2]|0;f[l+8>>2]=H;f[m>>2]=f[i>>2];f[m+4>>2]=i;f[m+8>>2]=H;f[k>>2]=La;f[g>>2]=f[l>>2];f[g+4>>2]=f[l+4>>2];f[g+8>>2]=f[l+8>>2];f[e>>2]=f[m>>2];f[e+4>>2]=f[m+4>>2];f[e+8>>2]=f[m+8>>2];H=ff(j,g,e,k,c)|0;Ee(j);if(!H){ia=0;break d}break}case 5:{Ge(j,Ia);f[n>>2]=0;f[n+4>>2]=i;H=f[F>>2]|0;f[n+8>>2]=H;f[o>>2]=f[i>>2];f[o+4>>2]=i;f[o+8>>2]=H;f[k>>2]=La;f[g>>2]=f[n>>2];f[g+4>>2]=f[n+4>>2];f[g+8>>2]=f[n+8>>2];f[e>>2]=f[o>>2];f[e+4>>2]=f[o+4>>2];f[e+8>>2]=f[o+8>>2];H=gf(j,g,e,k,c)|0;Ee(j);if(!H){ia=0;break d}break}case 4:{Ge(j,Ia);f[p>>2]=0;f[p+4>>2]=i;H=f[F>>2]|0;f[p+8>>2]=H;f[q>>2]=f[i>>2];f[q+4>>2]=i;f[q+8>>2]=H;f[k>>2]=La;f[g>>2]=f[p>>2];f[g+4>>2]=f[p+4>>2];f[g+8>>2]=f[p+8>>2];f[e>>2]=f[q>>2];f[e+4>>2]=f[q+4>>2];f[e+8>>2]=f[q+8>>2];H=gf(j,g,e,k,c)|0;Ee(j);if(!H){ia=0;break d}break}case 3:{Oe(j,Ia);f[r>>2]=0;f[r+4>>2]=i;H=f[F>>2]|0;f[r+8>>2]=H;f[s>>2]=f[i>>2];f[s+4>>2]=i;f[s+8>>2]=H;f[k>>2]=La;f[g>>2]=f[r>>2];f[g+4>>2]=f[r+4>>2];f[g+8>>2]=f[r+8>>2];f[e>>2]=f[s>>2];f[e+4>>2]=f[s+4>>2];f[e+8>>2]=f[s+8>>2];H=mf(j,g,e,k,c)|0;Ue(j);if(!H){ia=0;break d}break}case 2:{Oe(j,Ia);f[t>>2]=0;f[t+4>>2]=i;H=f[F>>2]|0;f[t+8>>2]=H;f[v>>2]=f[i>>2];f[v+4>>2]=i;f[v+8>>2]=H;f[k>>2]=La;f[g>>2]=f[t>>2];f[g+4>>2]=f[t+4>>2];f[g+8>>2]=f[t+8>>2];f[e>>2]=f[v>>2];f[e+4>>2]=f[v+4>>2];f[e+8>>2]=f[v+8>>2];H=mf(j,g,e,k,c)|0;Ue(j);if(!H){ia=0;break d}break}case 1:{Pe(j,Ia);f[w>>2]=0;f[w+4>>2]=i;H=f[F>>2]|0;f[w+8>>2]=H;f[x>>2]=f[i>>2];f[x+4>>2]=i;f[x+8>>2]=H;f[k>>2]=La;f[g>>2]=f[w>>2];f[g+4>>2]=f[w+4>>2];f[g+8>>2]=f[w+8>>2];f[e>>2]=f[x>>2];f[e+4>>2]=f[x+4>>2];f[e+8>>2]=f[x+8>>2];H=lf(j,g,e,k,c)|0;Te(j);if(!H){ia=0;break d}break}case 0:{Pe(j,Ia);f[y>>2]=0;f[y+4>>2]=i;H=f[F>>2]|0;f[y+8>>2]=H;f[z>>2]=f[i>>2];f[z+4>>2]=i;f[z+8>>2]=H;f[k>>2]=La;f[g>>2]=f[y>>2];f[g+4>>2]=f[y+4>>2];f[g+8>>2]=f[y+8>>2];f[e>>2]=f[z>>2];f[e+4>>2]=f[z+4>>2];f[e+8>>2]=f[z+8>>2];H=lf(j,g,e,k,c)|0;Te(j);if(!H){ia=0;break d}break}default:{ia=0;break d}}ia=1}while(0);j=f[i+12>>2]|0;if(!j){u=d;return ia|0}i=f[J>>2]|0;if((i|0)!=(j|0))f[J>>2]=i+(~((i+-4-j|0)>>>2)<<2);br(j);u=d;return ia|0}function lb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0;d=u;u=u+80|0;e=d+56|0;g=d+52|0;h=d+48|0;i=d+68|0;j=d;k=d+44|0;l=d+40|0;m=d+36|0;n=d+32|0;o=d+28|0;p=d+24|0;q=d+20|0;r=d+16|0;s=d+12|0;if(!(b[c+352>>0]|0)){Ne(e,f[c+8>>2]|0);t=c+12|0;v=f[e>>2]|0;f[e>>2]=0;w=f[t>>2]|0;f[t>>2]=v;if(w){ui(w);br(w);w=f[e>>2]|0;f[e>>2]=0;if(w|0){ui(w);br(w)}}else f[e>>2]=0}else{Mg(e,f[c+8>>2]|0);w=c+12|0;v=f[e>>2]|0;f[e>>2]=0;t=f[w>>2]|0;f[w>>2]=v;if(t){ui(t);br(t);t=f[e>>2]|0;f[e>>2]=0;if(t|0){ui(t);br(t)}}else f[e>>2]=0}t=c+12|0;v=f[t>>2]|0;if(v|0?(((f[v+4>>2]|0)-(f[v>>2]|0)>>2>>>0)/3|0|0)!=(f[v+40>>2]|0):0){v=c+200|0;Td(v,c)|0;w=f[t>>2]|0;x=c+4|0;Nh(((f[w+28>>2]|0)-(f[w+24>>2]|0)>>2)-(f[w+44>>2]|0)|0,f[(f[x>>2]|0)+44>>2]|0)|0;w=f[t>>2]|0;Nh((((f[w+4>>2]|0)-(f[w>>2]|0)>>2>>>0)/3|0)-(f[w+40>>2]|0)|0,f[(f[x>>2]|0)+44>>2]|0)|0;w=c+28|0;y=c+8|0;z=f[y>>2]|0;A=((f[z+100>>2]|0)-(f[z+96>>2]|0)|0)/12|0;b[e>>0]=0;Xg(w,A,e);A=f[t>>2]|0;z=(f[A+28>>2]|0)-(f[A+24>>2]|0)>>2;f[e>>2]=-1;Sf(c+52|0,z,e);z=c+40|0;A=f[z>>2]|0;B=c+44|0;C=f[B>>2]|0;if((C|0)!=(A|0))f[B>>2]=C+(~((C+-4-A|0)>>>2)<<2);A=f[t>>2]|0;C=(f[A+4>>2]|0)-(f[A>>2]|0)>>2;$j(z,C-((C>>>0)%3|0)|0);C=c+84|0;z=f[t>>2]|0;A=(f[z+28>>2]|0)-(f[z+24>>2]|0)>>2;b[e>>0]=0;Xg(C,A,e);A=c+96|0;z=f[A>>2]|0;B=c+100|0;D=f[B>>2]|0;if((D|0)!=(z|0))f[B>>2]=D+(~((D+-4-z|0)>>>2)<<2);f[c+164>>2]=-1;z=c+168|0;f[z>>2]=0;D=f[c+108>>2]|0;E=c+112|0;F=f[E>>2]|0;if((F|0)!=(D|0))f[E>>2]=F+(~(((F+-12-D|0)>>>0)/12|0)*12|0);D=c+132|0;if(f[D>>2]|0){F=c+128|0;E=f[F>>2]|0;if(E|0){G=E;do{E=G;G=f[G>>2]|0;br(E)}while((G|0)!=0)}f[F>>2]=0;F=f[c+124>>2]|0;if(F|0){G=c+120|0;E=0;do{f[(f[G>>2]|0)+(E<<2)>>2]=0;E=E+1|0}while((E|0)!=(F|0))}f[D>>2]=0}f[c+144>>2]=0;D=f[t>>2]|0;F=(f[D+28>>2]|0)-(f[D+24>>2]|0)>>2;f[e>>2]=-1;Sf(c+152|0,F,e);F=c+72|0;D=f[F>>2]|0;E=c+76|0;G=f[E>>2]|0;if((G|0)!=(D|0))f[E>>2]=G+(~((G+-4-D|0)>>>2)<<2);D=f[t>>2]|0;$j(F,((f[D+4>>2]|0)-(f[D>>2]|0)>>2>>>0)/3|0);f[c+64>>2]=0;if(!(oe(c)|0)){D=dn(32)|0;f[e>>2]=D;f[e+8>>2]=-2147483616;f[e+4>>2]=29;H=D;I=13227;J=H+29|0;do{b[H>>0]=b[I>>0]|0;H=H+1|0;I=I+1|0}while((H|0)<(J|0));b[D+29>>0]=0;f[a>>2]=-1;dj(a+4|0,e);if((b[e+11>>0]|0)<0)br(f[e>>2]|0);u=d;return}if(!(bh(c)|0)){D=dn(48)|0;f[e>>2]=D;f[e+8>>2]=-2147483600;f[e+4>>2]=36;H=D;I=13257;J=H+36|0;do{b[H>>0]=b[I>>0]|0;H=H+1|0;I=I+1|0}while((H|0)<(J|0));b[D+36>>0]=0;f[a>>2]=-1;dj(a+4|0,e);if((b[e+11>>0]|0)<0)br(f[e>>2]|0);u=d;return}D=c+172|0;G=c+176|0;K=(((f[G>>2]|0)-(f[D>>2]|0)|0)/136|0)&255;b[i>>0]=K;L=f[(f[x>>2]|0)+44>>2]|0;M=L+16|0;N=f[M+4>>2]|0;if((N|0)>0|(N|0)==0&(f[M>>2]|0)>>>0>0)O=K;else{f[g>>2]=f[L+4>>2];f[e>>2]=f[g>>2];ye(L,e,i,i+1|0)|0;O=b[i>>0]|0}f[c+284>>2]=O&255;O=f[t>>2]|0;i=(f[O+4>>2]|0)-(f[O>>2]|0)|0;O=i>>2;Ti(v);f[j>>2]=0;L=j+4|0;f[L>>2]=0;f[j+8>>2]=0;a:do if((i|0)>0){K=c+104|0;M=j+8|0;N=0;b:while(1){P=(N>>>0)/3|0;Q=P>>>5;R=1<<(P&31);if((f[(f[w>>2]|0)+(Q<<2)>>2]&R|0)==0?(S=f[t>>2]|0,f[k>>2]=P,f[e>>2]=f[k>>2],!(Rj(S,e)|0)):0){f[g>>2]=0;f[l>>2]=P;f[e>>2]=f[l>>2];P=gg(c,e,g)|0;Vi(v,P);S=f[g>>2]|0;T=(S|0)==-1;do if(P){do if(T){U=-1;V=-1;W=-1}else{X=f[f[t>>2]>>2]|0;Y=f[X+(S<<2)>>2]|0;Z=S+1|0;_=((Z>>>0)%3|0|0)==0?S+-2|0:Z;if((_|0)==-1)$=-1;else $=f[X+(_<<2)>>2]|0;_=(((S>>>0)%3|0|0)==0?2:-1)+S|0;if((_|0)==-1){U=-1;V=$;W=Y;break}U=f[X+(_<<2)>>2]|0;V=$;W=Y}while(0);Y=f[C>>2]|0;_=Y+(W>>>5<<2)|0;f[_>>2]=f[_>>2]|1<<(W&31);_=Y+(V>>>5<<2)|0;f[_>>2]=f[_>>2]|1<<(V&31);_=Y+(U>>>5<<2)|0;f[_>>2]=f[_>>2]|1<<(U&31);f[e>>2]=1;_=f[B>>2]|0;if(_>>>0<(f[K>>2]|0)>>>0){f[_>>2]=1;f[B>>2]=_+4}else Ci(A,e);_=(f[w>>2]|0)+(Q<<2)|0;f[_>>2]=f[_>>2]|R;_=S+1|0;if(T)aa=-1;else aa=((_>>>0)%3|0|0)==0?S+-2|0:_;f[e>>2]=aa;Y=f[L>>2]|0;if(Y>>>0<(f[M>>2]|0)>>>0){f[Y>>2]=aa;f[L>>2]=Y+4}else Ci(j,e);if(T)break;Y=((_>>>0)%3|0|0)==0?S+-2|0:_;if((Y|0)==-1)break;_=f[(f[(f[t>>2]|0)+12>>2]|0)+(Y<<2)>>2]|0;Y=(_|0)==-1;X=Y?-1:(_>>>0)/3|0;if(Y)break;if(f[(f[w>>2]|0)+(X>>>5<<2)>>2]&1<<(X&31)|0)break;f[m>>2]=_;f[e>>2]=f[m>>2];if(!(Zb(c,e)|0)){ba=65;break b}}else{_=S+1|0;if(T)ca=-1;else ca=((_>>>0)%3|0|0)==0?S+-2|0:_;f[n>>2]=ca;f[e>>2]=f[n>>2];Ce(c,e,1)|0;f[o>>2]=f[g>>2];f[e>>2]=f[o>>2];if(!(Zb(c,e)|0)){ba=71;break b}}while(0)}N=N+1|0;if((N|0)>=(O|0)){ba=77;break a}}if((ba|0)==65){f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;N=dn(48)|0;f[e>>2]=N;f[e+8>>2]=-2147483600;f[e+4>>2]=32;H=N;I=13294;J=H+32|0;do{b[H>>0]=b[I>>0]|0;H=H+1|0;I=I+1|0}while((H|0)<(J|0));b[N+32>>0]=0;f[a>>2]=-1;dj(a+4|0,e);if((b[e+11>>0]|0)<0)br(f[e>>2]|0)}else if((ba|0)==71){f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;M=dn(48)|0;f[e>>2]=M;f[e+8>>2]=-2147483600;f[e+4>>2]=32;H=M;I=13294;J=H+32|0;do{b[H>>0]=b[I>>0]|0;H=H+1|0;I=I+1|0}while((H|0)<(J|0));b[M+32>>0]=0;f[a>>2]=-1;dj(a+4|0,e);if((b[e+11>>0]|0)<0)br(f[e>>2]|0)}}else ba=77;while(0);do if((ba|0)==77){O=f[F>>2]|0;o=f[E>>2]|0;n=o;if((O|0)!=(o|0)?(ca=o+-4|0,O>>>0>>0):0){o=O;O=ca;do{ca=f[o>>2]|0;f[o>>2]=f[O>>2];f[O>>2]=ca;o=o+4|0;O=O+-4|0}while(o>>>0>>0)}f[p>>2]=n;f[q>>2]=f[j>>2];f[r>>2]=f[L>>2];f[h>>2]=f[p>>2];f[g>>2]=f[q>>2];f[e>>2]=f[r>>2];Md(F,h,g,e)|0;if((f[G>>2]|0)!=(f[D>>2]|0)?(O=f[y>>2]|0,o=((f[O+100>>2]|0)-(f[O+96>>2]|0)|0)/12|0,b[e>>0]=0,Xg(w,o,e),o=f[F>>2]|0,O=f[E>>2]|0,(o|0)!=(O|0)):0){M=o;do{f[s>>2]=f[M>>2];f[e>>2]=f[s>>2];ue(c,e)|0;M=M+4|0}while((M|0)!=(O|0))}$h(v);Nh(f[c+324>>2]|0,f[(f[x>>2]|0)+44>>2]|0)|0;Nh(f[z>>2]|0,f[(f[x>>2]|0)+44>>2]|0)|0;if(Jg(c)|0){O=f[(f[x>>2]|0)+44>>2]|0;M=f[c+232>>2]|0;n=O+16|0;o=f[n+4>>2]|0;if(!((o|0)>0|(o|0)==0&(f[n>>2]|0)>>>0>0)){n=(f[c+236>>2]|0)-M|0;f[g>>2]=f[O+4>>2];f[e>>2]=f[g>>2];ye(O,e,M,M+n|0)|0}f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;break}else{f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;n=dn(32)|0;f[e>>2]=n;f[e+8>>2]=-2147483616;f[e+4>>2]=28;H=n;I=13327;J=H+28|0;do{b[H>>0]=b[I>>0]|0;H=H+1|0;I=I+1|0}while((H|0)<(J|0));b[n+28>>0]=0;f[a>>2]=-1;dj(a+4|0,e);if((b[e+11>>0]|0)<0)br(f[e>>2]|0);break}}while(0);g=f[j>>2]|0;if(g|0){j=f[L>>2]|0;if((j|0)!=(g|0))f[L>>2]=j+(~((j+-4-g|0)>>>2)<<2);br(g)}u=d;return}g=dn(32)|0;f[e>>2]=g;f[e+8>>2]=-2147483616;f[e+4>>2]=29;H=g;I=13197;J=H+29|0;do{b[H>>0]=b[I>>0]|0;H=H+1|0;I=I+1|0}while((H|0)<(J|0));b[g+29>>0]=0;f[a>>2]=-1;dj(a+4|0,e);if((b[e+11>>0]|0)<0)br(f[e>>2]|0);u=d;return}function mb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0;d=u;u=u+32|0;e=d;g=a+8|0;h=f[g>>2]|0;f[e>>2]=0;i=e+4|0;f[i>>2]=0;f[e+8>>2]=0;do if(h)if(h>>>0>1073741823)mq(e);else{j=h<<2;k=dn(j)|0;f[e>>2]=k;l=k+(h<<2)|0;f[e+8>>2]=l;hj(k|0,0,j|0)|0;f[i>>2]=l;m=l;n=k;break}else{m=0;n=0}while(0);k=a+1164|0;l=f[k>>2]|0;j=f[l>>2]|0;o=l+4|0;if(!j){p=l+8|0;q=n;r=m;s=h}else{h=f[o>>2]|0;if((h|0)!=(j|0))f[o>>2]=h+(~((h+-4-j|0)>>>2)<<2);br(j);j=l+8|0;f[j>>2]=0;f[o>>2]=0;f[l>>2]=0;p=j;q=f[e>>2]|0;r=f[i>>2]|0;s=f[g>>2]|0}f[l>>2]=q;f[o>>2]=r;f[p>>2]=f[e+8>>2];f[e>>2]=0;p=e+4|0;f[p>>2]=0;f[e+8>>2]=0;do if(s)if(s>>>0>1073741823)mq(e);else{r=s<<2;o=dn(r)|0;f[e>>2]=o;q=o+(s<<2)|0;f[e+8>>2]=q;hj(o|0,0,r|0)|0;f[p>>2]=q;t=q;v=o;break}else{t=0;v=0}while(0);s=a+1176|0;o=f[s>>2]|0;q=f[o>>2]|0;r=o+4|0;if(!q){w=o+8|0;x=v;y=t}else{t=f[r>>2]|0;if((t|0)!=(q|0))f[r>>2]=t+(~((t+-4-q|0)>>>2)<<2);br(q);q=o+8|0;f[q>>2]=0;f[r>>2]=0;f[o>>2]=0;w=q;x=f[e>>2]|0;y=f[p>>2]|0}f[o>>2]=x;f[r>>2]=y;f[w>>2]=f[e+8>>2];w=f[b>>2]|0;y=b+4|0;r=f[y>>2]|0;x=f[y+4>>2]|0;y=f[c>>2]|0;o=c+4|0;p=f[o>>2]|0;q=f[o+4>>2]|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;f[e+20>>2]=0;o=e+8|0;t=e+4|0;v=e+16|0;l=e+20|0;i=r;Jc(e);j=f[t>>2]|0;h=(f[l>>2]|0)+(f[v>>2]|0)|0;if((f[o>>2]|0)==(j|0))z=0;else z=(f[j+(((h>>>0)/113|0)<<2)>>2]|0)+(((h>>>0)%113|0)*36|0)|0;f[z>>2]=w;h=z+4|0;f[h>>2]=r;f[h+4>>2]=x;f[z+12>>2]=y;h=z+16|0;f[h>>2]=p;f[h+4>>2]=q;f[z+24>>2]=0;f[z+28>>2]=y-w;f[z+32>>2]=0;z=(f[l>>2]|0)+1|0;f[l>>2]=z;if(z|0){w=a+1152|0;y=a+1084|0;h=a+1080|0;j=a+1072|0;m=a+1076|0;n=a+1068|0;A=b+8|0;B=c+8|0;C=a+1124|0;D=a+1120|0;E=a+1112|0;F=a+1116|0;G=a+1108|0;H=i+4|0;I=i+24|0;J=i+24|0;K=p+24|0;L=z;while(1){z=f[v>>2]|0;M=L+-1|0;N=M+z|0;O=f[t>>2]|0;P=f[O+(((N>>>0)/113|0)<<2)>>2]|0;Q=(N>>>0)%113|0;N=f[P+(Q*36|0)>>2]|0;R=f[P+(Q*36|0)+12>>2]|0;S=f[P+(Q*36|0)+24>>2]|0;T=f[P+(Q*36|0)+32>>2]|0;f[l>>2]=M;M=f[o>>2]|0;Q=M-O>>2;if((1-L-z+((Q|0)==0?0:(Q*113|0)+-1|0)|0)>>>0>225){br(f[M+-4>>2]|0);f[o>>2]=(f[o>>2]|0)+-4}f[b>>2]=N;f[c>>2]=R;M=f[k>>2]|0;Q=((f[g>>2]|0)+-1|0)==(S|0)?0:S+1|0;S=(f[s>>2]|0)+(T*12|0)|0;z=R-N|0;O=(f[a>>2]|0)-(f[(f[S>>2]|0)+(Q<<2)>>2]|0)|0;a:do if(O){if(z>>>0<3){P=f[w>>2]|0;f[P>>2]=Q;U=f[g>>2]|0;if(U>>>0>1){V=1;W=U;Y=Q;while(1){Y=(Y|0)==(W+-1|0)?0:Y+1|0;f[P+(V<<2)>>2]=Y;V=V+1|0;Z=f[g>>2]|0;if(V>>>0>=Z>>>0){$=Z;break}else W=Z}}else $=U;if(!z){aa=85;break}else{ba=0;ca=$}while(1){W=(f[I>>2]|0)+((X(f[H>>2]|0,N+ba|0)|0)<<2)|0;if(!ca)da=0;else{V=0;do{Y=f[(f[w>>2]|0)+(V<<2)>>2]|0;P=(f[a>>2]|0)-(f[(f[S>>2]|0)+(Y<<2)>>2]|0)|0;do if(P|0){Z=f[y>>2]|0;ea=32-Z|0;fa=32-P|0;ga=f[W+(Y<<2)>>2]<(ea|0)){ha=ga>>>fa;fa=P-ea|0;f[y>>2]=fa;ea=f[h>>2]|ha>>>fa;f[h>>2]=ea;fa=f[j>>2]|0;if((fa|0)==(f[m>>2]|0))Ci(n,h);else{f[fa>>2]=ea;f[j>>2]=fa+4}f[h>>2]=ha<<32-(f[y>>2]|0);break}ha=f[h>>2]|ga>>>Z;f[h>>2]=ha;ga=Z+P|0;f[y>>2]=ga;if((ga|0)!=32)break;ga=f[j>>2]|0;if((ga|0)==(f[m>>2]|0))Ci(n,h);else{f[ga>>2]=ha;f[j>>2]=ga+4}f[h>>2]=0;f[y>>2]=0}while(0);V=V+1|0;P=f[g>>2]|0}while(V>>>0

>>0);da=P}ba=ba+1|0;if(ba>>>0>=z>>>0){aa=85;break a}else ca=da}}U=T+1|0;qg(M+(U*12|0)|0,f[M+(T*12|0)>>2]|0,f[M+(T*12|0)+4>>2]|0);V=(f[(f[k>>2]|0)+(U*12|0)>>2]|0)+(Q<<2)|0;W=(f[V>>2]|0)+(1<>2]=W;V=f[A>>2]|0;P=f[B>>2]|0;b:do if((R|0)==(N|0))ia=N;else{Y=f[J>>2]|0;if(!V){if((f[Y+(Q<<2)>>2]|0)>>>0>>0){ia=R;break}else{ja=R;ka=N}while(1){ga=ja;do{ga=ga+-1|0;if((ka|0)==(ga|0)){ia=ka;break b}ha=(f[K>>2]|0)+((X(ga,P)|0)<<2)+(Q<<2)|0}while((f[ha>>2]|0)>>>0>=W>>>0);ka=ka+1|0;if((ka|0)==(ga|0)){ia=ga;break b}else ja=ga}}else{la=R;ma=N}while(1){ha=ma;while(1){na=Y+((X(ha,V)|0)<<2)|0;if((f[na+(Q<<2)>>2]|0)>>>0>=W>>>0){oa=la;break}Z=ha+1|0;if((Z|0)==(la|0)){ia=la;break b}else ha=Z}while(1){oa=oa+-1|0;if((ha|0)==(oa|0)){ia=ha;break b}pa=(f[K>>2]|0)+((X(oa,P)|0)<<2)|0;if((f[pa+(Q<<2)>>2]|0)>>>0>>0){qa=0;break}}do{ga=na+(qa<<2)|0;Z=pa+(qa<<2)|0;fa=f[ga>>2]|0;f[ga>>2]=f[Z>>2];f[Z>>2]=fa;qa=qa+1|0}while((qa|0)!=(V|0));ma=ha+1|0;if((ma|0)==(oa|0)){ia=oa;break}else la=oa}}while(0);W=(_(z|0)|0)^31;P=ia-N|0;Y=R-ia|0;fa=P>>>0>>0;if((P|0)!=(Y|0)){Z=f[C>>2]|0;if(fa)f[D>>2]=f[D>>2]|1<<31-Z;ga=Z+1|0;f[C>>2]=ga;if((ga|0)==32){ga=f[E>>2]|0;if((ga|0)==(f[F>>2]|0))Ci(G,D);else{f[ga>>2]=f[D>>2];f[E>>2]=ga+4}f[C>>2]=0;f[D>>2]=0}}ga=z>>>1;if(fa){fa=ga-P|0;if(W|0){Z=0;ea=1<>>1}}}else{ea=ga-Y|0;if(W|0){Z=0;fa=1<>>1}}}fa=f[s>>2]|0;W=f[fa+(T*12|0)>>2]|0;Z=W+(Q<<2)|0;f[Z>>2]=(f[Z>>2]|0)+1;qg(fa+(U*12|0)|0,W,f[fa+(T*12|0)+4>>2]|0);if((ia|0)!=(N|0)){fa=f[o>>2]|0;W=f[t>>2]|0;Z=fa-W>>2;ea=f[v>>2]|0;ga=f[l>>2]|0;if((((Z|0)==0?0:(Z*113|0)+-1|0)|0)==(ga+ea|0)){Jc(e);ra=f[v>>2]|0;sa=f[l>>2]|0;ta=f[o>>2]|0;ua=f[t>>2]|0}else{ra=ea;sa=ga;ta=fa;ua=W}W=sa+ra|0;if((ta|0)==(ua|0))va=0;else va=(f[ua+(((W>>>0)/113|0)<<2)>>2]|0)+(((W>>>0)%113|0)*36|0)|0;f[va>>2]=N;W=va+4|0;f[W>>2]=r;f[W+4>>2]=x;f[va+12>>2]=ia;f[va+16>>2]=i;f[va+20>>2]=V;f[va+24>>2]=Q;f[va+28>>2]=P;f[va+32>>2]=T;f[l>>2]=(f[l>>2]|0)+1}if((R|0)!=(ia|0)){W=f[o>>2]|0;fa=f[t>>2]|0;ga=W-fa>>2;ea=f[v>>2]|0;Z=f[l>>2]|0;if((((ga|0)==0?0:(ga*113|0)+-1|0)|0)==(Z+ea|0)){Jc(e);wa=f[v>>2]|0;xa=f[l>>2]|0;ya=f[o>>2]|0;za=f[t>>2]|0}else{wa=ea;xa=Z;ya=W;za=fa}fa=xa+wa|0;if((ya|0)==(za|0))Aa=0;else Aa=(f[za+(((fa>>>0)/113|0)<<2)>>2]|0)+(((fa>>>0)%113|0)*36|0)|0;f[Aa>>2]=ia;f[Aa+4>>2]=i;f[Aa+8>>2]=V;f[Aa+12>>2]=R;fa=Aa+16|0;f[fa>>2]=p;f[fa+4>>2]=q;f[Aa+24>>2]=Q;f[Aa+28>>2]=Y;f[Aa+32>>2]=U;fa=(f[l>>2]|0)+1|0;f[l>>2]=fa;Ba=fa}else aa=85}else aa=85;while(0);if((aa|0)==85){aa=0;Ba=f[l>>2]|0}if(!Ba)break;else L=Ba}}Ba=f[t>>2]|0;L=f[v>>2]|0;Aa=Ba+(((L>>>0)/113|0)<<2)|0;q=f[o>>2]|0;p=q;i=Ba;if((q|0)==(Ba|0)){Ca=0;Da=0}else{ia=(f[Aa>>2]|0)+(((L>>>0)%113|0)*36|0)|0;Ca=ia;Da=ia}ia=Aa;Aa=Da;c:while(1){Da=Aa;do{L=Da;if((Ca|0)==(L|0))break c;Da=L+36|0}while((Da-(f[ia>>2]|0)|0)!=4068);Da=ia+4|0;ia=Da;Aa=f[Da>>2]|0}f[l>>2]=0;l=p-i>>2;if(l>>>0>2){i=Ba;do{br(f[i>>2]|0);i=(f[t>>2]|0)+4|0;f[t>>2]=i;Ea=f[o>>2]|0;Fa=Ea-i>>2}while(Fa>>>0>2);Ga=Fa;Ha=i;Ia=Ea}else{Ga=l;Ha=Ba;Ia=q}switch(Ga|0){case 1:{Ja=56;aa=99;break}case 2:{Ja=113;aa=99;break}default:{}}if((aa|0)==99)f[v>>2]=Ja;if((Ha|0)!=(Ia|0)){Ja=Ha;do{br(f[Ja>>2]|0);Ja=Ja+4|0}while((Ja|0)!=(Ia|0));Ia=f[t>>2]|0;t=f[o>>2]|0;if((t|0)!=(Ia|0))f[o>>2]=t+(~((t+-4-Ia|0)>>>2)<<2)}Ia=f[e>>2]|0;if(!Ia){u=d;return}br(Ia);u=d;return}function nb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0;d=u;u=u+32|0;e=d;g=a+8|0;h=f[g>>2]|0;f[e>>2]=0;i=e+4|0;f[i>>2]=0;f[e+8>>2]=0;do if(h)if(h>>>0>1073741823)mq(e);else{j=h<<2;k=dn(j)|0;f[e>>2]=k;l=k+(h<<2)|0;f[e+8>>2]=l;hj(k|0,0,j|0)|0;f[i>>2]=l;m=l;n=k;break}else{m=0;n=0}while(0);k=a+140|0;l=f[k>>2]|0;j=f[l>>2]|0;o=l+4|0;if(!j){p=l+8|0;q=n;r=m;s=h}else{h=f[o>>2]|0;if((h|0)!=(j|0))f[o>>2]=h+(~((h+-4-j|0)>>>2)<<2);br(j);j=l+8|0;f[j>>2]=0;f[o>>2]=0;f[l>>2]=0;p=j;q=f[e>>2]|0;r=f[i>>2]|0;s=f[g>>2]|0}f[l>>2]=q;f[o>>2]=r;f[p>>2]=f[e+8>>2];f[e>>2]=0;p=e+4|0;f[p>>2]=0;f[e+8>>2]=0;do if(s)if(s>>>0>1073741823)mq(e);else{r=s<<2;o=dn(r)|0;f[e>>2]=o;q=o+(s<<2)|0;f[e+8>>2]=q;hj(o|0,0,r|0)|0;f[p>>2]=q;t=q;v=o;break}else{t=0;v=0}while(0);s=a+152|0;o=f[s>>2]|0;q=f[o>>2]|0;r=o+4|0;if(!q){w=o+8|0;x=v;y=t}else{t=f[r>>2]|0;if((t|0)!=(q|0))f[r>>2]=t+(~((t+-4-q|0)>>>2)<<2);br(q);q=o+8|0;f[q>>2]=0;f[r>>2]=0;f[o>>2]=0;w=q;x=f[e>>2]|0;y=f[p>>2]|0}f[o>>2]=x;f[r>>2]=y;f[w>>2]=f[e+8>>2];w=f[b>>2]|0;y=b+4|0;r=f[y>>2]|0;x=f[y+4>>2]|0;y=f[c>>2]|0;o=c+4|0;p=f[o>>2]|0;q=f[o+4>>2]|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;f[e+20>>2]=0;o=e+8|0;t=e+4|0;v=e+16|0;l=e+20|0;i=r;Jc(e);j=f[t>>2]|0;h=(f[l>>2]|0)+(f[v>>2]|0)|0;if((f[o>>2]|0)==(j|0))z=0;else z=(f[j+(((h>>>0)/113|0)<<2)>>2]|0)+(((h>>>0)%113|0)*36|0)|0;f[z>>2]=w;h=z+4|0;f[h>>2]=r;f[h+4>>2]=x;f[z+12>>2]=y;h=z+16|0;f[h>>2]=p;f[h+4>>2]=q;f[z+24>>2]=0;f[z+28>>2]=y-w;f[z+32>>2]=0;z=(f[l>>2]|0)+1|0;f[l>>2]=z;if(z|0){w=a+128|0;y=a+60|0;h=a+56|0;j=a+48|0;m=a+52|0;n=a+44|0;A=b+8|0;B=c+8|0;C=a+12|0;D=a+100|0;E=a+96|0;F=a+88|0;G=a+92|0;H=a+84|0;I=i+4|0;J=i+24|0;K=i+24|0;L=p+24|0;M=z;while(1){z=f[v>>2]|0;N=M+-1|0;O=N+z|0;P=f[t>>2]|0;Q=f[P+(((O>>>0)/113|0)<<2)>>2]|0;R=(O>>>0)%113|0;O=f[Q+(R*36|0)>>2]|0;S=f[Q+(R*36|0)+12>>2]|0;T=f[Q+(R*36|0)+24>>2]|0;U=f[Q+(R*36|0)+32>>2]|0;f[l>>2]=N;N=f[o>>2]|0;R=N-P>>2;if((1-M-z+((R|0)==0?0:(R*113|0)+-1|0)|0)>>>0>225){br(f[N+-4>>2]|0);f[o>>2]=(f[o>>2]|0)+-4}f[b>>2]=O;f[c>>2]=S;N=f[k>>2]|0;R=((f[g>>2]|0)+-1|0)==(T|0)?0:T+1|0;T=(f[s>>2]|0)+(U*12|0)|0;z=S-O|0;P=(f[a>>2]|0)-(f[(f[T>>2]|0)+(R<<2)>>2]|0)|0;a:do if(P){if(z>>>0<3){Q=f[w>>2]|0;f[Q>>2]=R;V=f[g>>2]|0;if(V>>>0>1){W=1;Y=V;Z=R;while(1){Z=(Z|0)==(Y+-1|0)?0:Z+1|0;f[Q+(W<<2)>>2]=Z;W=W+1|0;$=f[g>>2]|0;if(W>>>0>=$>>>0){aa=$;break}else Y=$}}else aa=V;if(!z){ba=81;break}else{ca=0;da=aa}while(1){Y=(f[J>>2]|0)+((X(f[I>>2]|0,O+ca|0)|0)<<2)|0;if(!da)ea=0;else{W=0;do{Z=f[(f[w>>2]|0)+(W<<2)>>2]|0;Q=(f[a>>2]|0)-(f[(f[T>>2]|0)+(Z<<2)>>2]|0)|0;do if(Q|0){$=f[y>>2]|0;fa=32-$|0;ga=32-Q|0;ha=f[Y+(Z<<2)>>2]<(fa|0)){ia=ha>>>ga;ga=Q-fa|0;f[y>>2]=ga;fa=f[h>>2]|ia>>>ga;f[h>>2]=fa;ga=f[j>>2]|0;if((ga|0)==(f[m>>2]|0))Ci(n,h);else{f[ga>>2]=fa;f[j>>2]=ga+4}f[h>>2]=ia<<32-(f[y>>2]|0);break}ia=f[h>>2]|ha>>>$;f[h>>2]=ia;ha=$+Q|0;f[y>>2]=ha;if((ha|0)!=32)break;ha=f[j>>2]|0;if((ha|0)==(f[m>>2]|0))Ci(n,h);else{f[ha>>2]=ia;f[j>>2]=ha+4}f[h>>2]=0;f[y>>2]=0}while(0);W=W+1|0;Q=f[g>>2]|0}while(W>>>0>>0);ea=Q}ca=ca+1|0;if(ca>>>0>=z>>>0){ba=81;break a}else da=ea}}V=U+1|0;qg(N+(V*12|0)|0,f[N+(U*12|0)>>2]|0,f[N+(U*12|0)+4>>2]|0);W=(f[(f[k>>2]|0)+(V*12|0)>>2]|0)+(R<<2)|0;Y=(f[W>>2]|0)+(1<>2]=Y;W=f[A>>2]|0;Q=f[B>>2]|0;b:do if((S|0)==(O|0))ja=O;else{Z=f[K>>2]|0;if(!W){if((f[Z+(R<<2)>>2]|0)>>>0>>0){ja=S;break}else{ka=S;la=O}while(1){ha=ka;do{ha=ha+-1|0;if((la|0)==(ha|0)){ja=la;break b}ia=(f[L>>2]|0)+((X(ha,Q)|0)<<2)+(R<<2)|0}while((f[ia>>2]|0)>>>0>=Y>>>0);la=la+1|0;if((la|0)==(ha|0)){ja=ha;break b}else ka=ha}}else{ma=S;na=O}while(1){ia=na;while(1){oa=Z+((X(ia,W)|0)<<2)|0;if((f[oa+(R<<2)>>2]|0)>>>0>=Y>>>0){pa=ma;break}$=ia+1|0;if(($|0)==(ma|0)){ja=ma;break b}else ia=$}while(1){pa=pa+-1|0;if((ia|0)==(pa|0)){ja=ia;break b}qa=(f[L>>2]|0)+((X(pa,Q)|0)<<2)|0;if((f[qa+(R<<2)>>2]|0)>>>0>>0){ra=0;break}}do{ha=oa+(ra<<2)|0;$=qa+(ra<<2)|0;ga=f[ha>>2]|0;f[ha>>2]=f[$>>2];f[$>>2]=ga;ra=ra+1|0}while((ra|0)!=(W|0));na=ia+1|0;if((na|0)==(pa|0)){ja=pa;break}else ma=pa}}while(0);Y=(_(z|0)|0)^31;Q=ja-O|0;Z=S-ja|0;ga=Q>>>0>>0;if((Q|0)!=(Z|0)){$=f[D>>2]|0;if(ga)f[E>>2]=f[E>>2]|1<<31-$;ha=$+1|0;f[D>>2]=ha;if((ha|0)==32){ha=f[F>>2]|0;if((ha|0)==(f[G>>2]|0))Ci(H,E);else{f[ha>>2]=f[E>>2];f[F>>2]=ha+4}f[D>>2]=0;f[E>>2]=0}}ha=z>>>1;if(ga)bg(C,Y,ha-Q|0);else bg(C,Y,ha-Z|0);ha=f[s>>2]|0;Y=f[ha+(U*12|0)>>2]|0;ga=Y+(R<<2)|0;f[ga>>2]=(f[ga>>2]|0)+1;qg(ha+(V*12|0)|0,Y,f[ha+(U*12|0)+4>>2]|0);if((ja|0)!=(O|0)){ha=f[o>>2]|0;Y=f[t>>2]|0;ga=ha-Y>>2;$=f[v>>2]|0;fa=f[l>>2]|0;if((((ga|0)==0?0:(ga*113|0)+-1|0)|0)==(fa+$|0)){Jc(e);sa=f[v>>2]|0;ta=f[l>>2]|0;ua=f[o>>2]|0;va=f[t>>2]|0}else{sa=$;ta=fa;ua=ha;va=Y}Y=ta+sa|0;if((ua|0)==(va|0))wa=0;else wa=(f[va+(((Y>>>0)/113|0)<<2)>>2]|0)+(((Y>>>0)%113|0)*36|0)|0;f[wa>>2]=O;Y=wa+4|0;f[Y>>2]=r;f[Y+4>>2]=x;f[wa+12>>2]=ja;f[wa+16>>2]=i;f[wa+20>>2]=W;f[wa+24>>2]=R;f[wa+28>>2]=Q;f[wa+32>>2]=U;f[l>>2]=(f[l>>2]|0)+1}if((S|0)!=(ja|0)){Q=f[o>>2]|0;Y=f[t>>2]|0;ha=Q-Y>>2;fa=f[v>>2]|0;$=f[l>>2]|0;if((((ha|0)==0?0:(ha*113|0)+-1|0)|0)==($+fa|0)){Jc(e);xa=f[v>>2]|0;ya=f[l>>2]|0;za=f[o>>2]|0;Aa=f[t>>2]|0}else{xa=fa;ya=$;za=Q;Aa=Y}Y=ya+xa|0;if((za|0)==(Aa|0))Ba=0;else Ba=(f[Aa+(((Y>>>0)/113|0)<<2)>>2]|0)+(((Y>>>0)%113|0)*36|0)|0;f[Ba>>2]=ja;f[Ba+4>>2]=i;f[Ba+8>>2]=W;f[Ba+12>>2]=S;Y=Ba+16|0;f[Y>>2]=p;f[Y+4>>2]=q;f[Ba+24>>2]=R;f[Ba+28>>2]=Z;f[Ba+32>>2]=V;Z=(f[l>>2]|0)+1|0;f[l>>2]=Z;Ca=Z}else ba=81}else ba=81;while(0);if((ba|0)==81){ba=0;Ca=f[l>>2]|0}if(!Ca)break;else M=Ca}}Ca=f[t>>2]|0;M=f[v>>2]|0;Ba=Ca+(((M>>>0)/113|0)<<2)|0;q=f[o>>2]|0;p=q;i=Ca;if((q|0)==(Ca|0)){Da=0;Ea=0}else{ja=(f[Ba>>2]|0)+(((M>>>0)%113|0)*36|0)|0;Da=ja;Ea=ja}ja=Ba;Ba=Ea;c:while(1){Ea=Ba;do{M=Ea;if((Da|0)==(M|0))break c;Ea=M+36|0}while((Ea-(f[ja>>2]|0)|0)!=4068);Ea=ja+4|0;ja=Ea;Ba=f[Ea>>2]|0}f[l>>2]=0;l=p-i>>2;if(l>>>0>2){i=Ca;do{br(f[i>>2]|0);i=(f[t>>2]|0)+4|0;f[t>>2]=i;Fa=f[o>>2]|0;Ga=Fa-i>>2}while(Ga>>>0>2);Ha=Ga;Ia=i;Ja=Fa}else{Ha=l;Ia=Ca;Ja=q}switch(Ha|0){case 1:{Ka=56;ba=95;break}case 2:{Ka=113;ba=95;break}default:{}}if((ba|0)==95)f[v>>2]=Ka;if((Ia|0)!=(Ja|0)){Ka=Ia;do{br(f[Ka>>2]|0);Ka=Ka+4|0}while((Ka|0)!=(Ja|0));Ja=f[t>>2]|0;t=f[o>>2]|0;if((t|0)!=(Ja|0))f[o>>2]=t+(~((t+-4-Ja|0)>>>2)<<2)}Ja=f[e>>2]|0;if(!Ja){u=d;return}br(Ja);u=d;return}function ob(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0.0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0.0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0.0,kb=0.0,lb=0.0,mb=0.0,nb=0.0,ob=0.0,pb=0.0,qb=0.0,rb=0.0,sb=0.0,tb=0;i=u;u=u+512|0;j=i;k=d+c|0;l=0-k|0;m=a+4|0;n=a+100|0;o=b;b=0;a:while(1){switch(o|0){case 46:{p=6;break a;break}case 48:break;default:{q=0;r=o;s=b;t=0;v=0;break a}}w=f[m>>2]|0;if(w>>>0<(f[n>>2]|0)>>>0){f[m>>2]=w+1;o=h[w>>0]|0;b=1;continue}else{o=Di(a)|0;b=1;continue}}if((p|0)==6){o=f[m>>2]|0;if(o>>>0<(f[n>>2]|0)>>>0){f[m>>2]=o+1;x=h[o>>0]|0}else x=Di(a)|0;if((x|0)==48){o=0;w=0;while(1){y=Tn(o|0,w|0,-1,-1)|0;z=I;A=f[m>>2]|0;if(A>>>0<(f[n>>2]|0)>>>0){f[m>>2]=A+1;B=h[A>>0]|0}else B=Di(a)|0;if((B|0)==48){o=y;w=z}else{q=1;r=B;s=1;t=y;v=z;break}}}else{q=1;r=x;s=b;t=0;v=0}}f[j>>2]=0;b=r+-48|0;x=(r|0)==46;b:do if(x|b>>>0<10){B=j+496|0;w=0;o=0;z=0;y=q;A=s;C=r;D=x;E=b;F=t;G=v;H=0;J=0;c:while(1){do if(D)if(!y){L=w;M=o;N=1;O=z;P=A;Q=H;R=J;S=H;T=J}else break c;else{U=Tn(H|0,J|0,1,0)|0;V=I;W=(C|0)!=48;if((o|0)>=125){if(!W){L=w;M=o;N=y;O=z;P=A;Q=F;R=G;S=U;T=V;break}f[B>>2]=f[B>>2]|1;L=w;M=o;N=y;O=z;P=A;Q=F;R=G;S=U;T=V;break}Y=j+(o<<2)|0;if(!w)Z=E;else Z=C+-48+((f[Y>>2]|0)*10|0)|0;f[Y>>2]=Z;Y=w+1|0;_=(Y|0)==9;L=_?0:Y;M=o+(_&1)|0;N=y;O=W?U:z;P=1;Q=F;R=G;S=U;T=V}while(0);V=f[m>>2]|0;if(V>>>0<(f[n>>2]|0)>>>0){f[m>>2]=V+1;$=h[V>>0]|0}else $=Di(a)|0;E=$+-48|0;D=($|0)==46;if(!(D|E>>>0<10)){aa=L;ba=M;ca=O;da=N;ea=$;fa=P;ga=S;ha=Q;ia=T;ja=R;p=29;break b}else{w=L;o=M;z=O;y=N;A=P;C=$;F=Q;G=R;H=S;J=T}}ka=w;la=o;ma=z;na=H;oa=J;pa=F;qa=G;ra=(A|0)!=0;p=37}else{aa=0;ba=0;ca=0;da=q;ea=r;fa=s;ga=0;ha=t;ia=0;ja=v;p=29}while(0);do if((p|0)==29){v=(da|0)==0;t=v?ga:ha;s=v?ia:ja;v=(fa|0)!=0;if(!(v&(ea|32|0)==101))if((ea|0)>-1){ka=aa;la=ba;ma=ca;na=ga;oa=ia;pa=t;qa=s;ra=v;p=37;break}else{sa=aa;ta=ba;ua=ca;va=ga;wa=ia;xa=v;ya=t;za=s;p=39;break}v=De(a,g)|0;r=I;if((v|0)==0&(r|0)==-2147483648){if(!g){Rm(a,0);Aa=0.0;break}if(!(f[n>>2]|0)){Ba=0;Ca=0}else{f[m>>2]=(f[m>>2]|0)+-1;Ba=0;Ca=0}}else{Ba=v;Ca=r}r=Tn(Ba|0,Ca|0,t|0,s|0)|0;Da=aa;Ea=ba;Fa=ca;Ga=r;Ha=ga;Ia=I;Ja=ia;p=41}while(0);if((p|0)==37)if(f[n>>2]|0){f[m>>2]=(f[m>>2]|0)+-1;if(ra){Da=ka;Ea=la;Fa=ma;Ga=pa;Ha=na;Ia=qa;Ja=oa;p=41}else p=40}else{sa=ka;ta=la;ua=ma;va=na;wa=oa;xa=ra;ya=pa;za=qa;p=39}if((p|0)==39)if(xa){Da=sa;Ea=ta;Fa=ua;Ga=ya;Ha=va;Ia=za;Ja=wa;p=41}else p=40;do if((p|0)==40){wa=ir()|0;f[wa>>2]=22;Rm(a,0);Aa=0.0}else if((p|0)==41){wa=f[j>>2]|0;if(!wa){Aa=+(e|0)*0.0;break}if(((Ja|0)<0|(Ja|0)==0&Ha>>>0<10)&((Ga|0)==(Ha|0)&(Ia|0)==(Ja|0))?(c|0)>30|(wa>>>c|0)==0:0){Aa=+(e|0)*+(wa>>>0);break}wa=(d|0)/-2|0;za=((wa|0)<0)<<31>>31;if((Ia|0)>(za|0)|(Ia|0)==(za|0)&Ga>>>0>wa>>>0){wa=ir()|0;f[wa>>2]=34;Aa=+(e|0)*1797693134862315708145274.0e284*1797693134862315708145274.0e284;break}wa=d+-106|0;za=((wa|0)<0)<<31>>31;if((Ia|0)<(za|0)|(Ia|0)==(za|0)&Ga>>>0>>0){wa=ir()|0;f[wa>>2]=34;Aa=+(e|0)*2.2250738585072014e-308*2.2250738585072014e-308;break}if(!Da)Ka=Ea;else{if((Da|0)<9){wa=j+(Ea<<2)|0;za=Da;va=f[wa>>2]|0;while(1){va=va*10|0;if((za|0)>=8)break;else za=za+1|0}f[wa>>2]=va}Ka=Ea+1|0}if((Fa|0)<9?(Fa|0)<=(Ga|0)&(Ga|0)<18:0){if((Ga|0)==9){Aa=+(e|0)*+((f[j>>2]|0)>>>0);break}if((Ga|0)<9){Aa=+(e|0)*+((f[j>>2]|0)>>>0)/+(f[6408+(8-Ga<<2)>>2]|0);break}za=c+27+(X(Ga,-3)|0)|0;A=f[j>>2]|0;if((za|0)>30|(A>>>za|0)==0){Aa=+(e|0)*+(A>>>0)*+(f[6408+(Ga+-10<<2)>>2]|0);break}}A=(Ga|0)%9|0;if(!A){La=0;Ma=Ka;Na=0;Oa=Ga}else{za=(Ga|0)>-1?A:A+9|0;A=f[6408+(8-za<<2)>>2]|0;if(Ka){G=1e9/(A|0)|0;F=0;J=0;H=Ga;z=0;do{o=j+(z<<2)|0;w=f[o>>2]|0;ya=((w>>>0)/(A>>>0)|0)+F|0;f[o>>2]=ya;F=X(G,(w>>>0)%(A>>>0)|0)|0;w=(z|0)==(J|0)&(ya|0)==0;H=w?H+-9|0:H;J=w?J+1&127:J;z=z+1|0}while((z|0)!=(Ka|0));if(!F){Pa=J;Qa=Ka;Ra=H}else{f[j+(Ka<<2)>>2]=F;Pa=J;Qa=Ka+1|0;Ra=H}}else{Pa=0;Qa=0;Ra=Ga}La=0;Ma=Qa;Na=Pa;Oa=9-za+Ra|0}d:while(1){z=(Oa|0)<18;A=(Oa|0)==18;G=j+(Na<<2)|0;va=La;wa=Ma;while(1){if(!z){if(!A){Sa=va;Ta=Na;Ua=Oa;Va=wa;break d}if((f[G>>2]|0)>>>0>=9007199){Sa=va;Ta=Na;Ua=18;Va=wa;break d}}w=0;Wa=wa;ya=wa+127|0;while(1){o=ya&127;ua=j+(o<<2)|0;ta=Rn(f[ua>>2]|0,0,29)|0;sa=Tn(ta|0,I|0,w|0,0)|0;ta=I;if(ta>>>0>0|(ta|0)==0&sa>>>0>1e9){xa=up(sa|0,ta|0,1e9,0)|0;qa=an(sa|0,ta|0,1e9,0)|0;Xa=xa;Ya=qa}else{Xa=0;Ya=sa}f[ua>>2]=Ya;ua=(o|0)==(Na|0);Wa=(Ya|0)==0&(((o|0)!=(Wa+127&127|0)|ua)^1)?o:Wa;if(ua)break;else{w=Xa;ya=o+-1|0}}va=va+-29|0;if(Xa|0)break;else wa=Wa}wa=Na+127&127;G=Wa+127&127;A=j+((Wa+126&127)<<2)|0;if((wa|0)==(Wa|0)){f[A>>2]=f[A>>2]|f[j+(G<<2)>>2];Za=G}else Za=Wa;f[j+(wa<<2)>>2]=Xa;La=va;Ma=Za;Na=wa;Oa=Oa+9|0}e:while(1){za=Va+1&127;H=j+((Va+127&127)<<2)|0;J=Sa;F=Ta;wa=Ua;while(1){G=(wa|0)==18;A=(wa|0)>27?9:1;_a=J;$a=F;while(1){z=0;while(1){ya=z+$a&127;if((ya|0)==(Va|0)){ab=2;p=88;break}w=f[j+(ya<<2)>>2]|0;ya=f[6440+(z<<2)>>2]|0;if(w>>>0>>0){ab=2;p=88;break}if(w>>>0>ya>>>0)break;ya=z+1|0;if((z|0)<1)z=ya;else{ab=ya;p=88;break}}if((p|0)==88?(p=0,G&(ab|0)==2):0){bb=0.0;cb=0;db=Va;break e}eb=A+_a|0;if(($a|0)==(Va|0)){_a=eb;$a=Va}else break}G=(1<>>A;fb=0;gb=$a;hb=wa;ya=$a;do{w=j+(ya<<2)|0;o=f[w>>2]|0;ua=(o>>>A)+fb|0;f[w>>2]=ua;fb=X(o&G,z)|0;o=(ya|0)==(gb|0)&(ua|0)==0;hb=o?hb+-9|0:hb;gb=o?gb+1&127:gb;ya=ya+1&127}while((ya|0)!=(Va|0));if(!fb){J=eb;F=gb;wa=hb;continue}if((za|0)!=(gb|0))break;f[H>>2]=f[H>>2]|1;J=eb;F=gb;wa=hb}f[j+(Va<<2)>>2]=fb;Sa=eb;Ta=gb;Ua=hb;Va=za}while(1){wa=cb+$a&127;F=db+1&127;if((wa|0)==(db|0)){f[j+(F+-1<<2)>>2]=0;ib=F}else ib=db;bb=bb*1.0e9+ +((f[j+(wa<<2)>>2]|0)>>>0);cb=cb+1|0;if((cb|0)==2)break;else db=ib}jb=+(e|0);kb=bb*jb;wa=_a+53|0;F=wa-d|0;J=(F|0)<(c|0);H=J?((F|0)>0?F:0):c;if((H|0)<53){lb=+Gq(+Wj(1.0,105-H|0),kb);mb=+Sq(kb,+Wj(1.0,53-H|0));nb=lb;ob=mb;pb=lb+(kb-mb)}else{nb=0.0;ob=0.0;pb=kb}va=$a+2&127;if((va|0)!=(ib|0)){ya=f[j+(va<<2)>>2]|0;do if(ya>>>0>=5e8){if((ya|0)!=5e8){qb=jb*.75+ob;break}if(($a+3&127|0)==(ib|0)){qb=jb*.5+ob;break}else{qb=jb*.75+ob;break}}else{if((ya|0)==0?($a+3&127|0)==(ib|0):0){qb=ob;break}qb=jb*.25+ob}while(0);if((53-H|0)>1?!(+Sq(qb,1.0)!=0.0):0)rb=qb+1.0;else rb=qb}else rb=ob;jb=pb+rb-nb;do if((wa&2147483647|0)>(-2-k|0)){ya=!(+K(+jb)>=9007199254740992.0);va=_a+((ya^1)&1)|0;kb=ya?jb:jb*.5;if((va+50|0)<=(l|0)?!(rb!=0.0&(J&((H|0)!=(F|0)|ya))):0){sb=kb;tb=va;break}ya=ir()|0;f[ya>>2]=34;sb=kb;tb=va}else{sb=jb;tb=_a}while(0);Aa=+Hq(sb,tb)}while(0);u=i;return +Aa}function pb(a,c,d,e,g,i){a=a|0;c=+c;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0,D=0.0,E=0,F=0,G=0,H=0.0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0.0,ga=0.0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0;j=u;u=u+560|0;k=j+8|0;l=j;m=j+524|0;n=m;o=j+512|0;f[l>>2]=0;p=o+12|0;xo(c)|0;if((I|0)<0){q=-c;r=1;s=15511}else{q=c;r=(g&2049|0)!=0&1;s=(g&2048|0)==0?((g&1|0)==0?15512:15517):15514}xo(q)|0;do if(0==0&(I&2146435072|0)==2146435072){t=(i&32|0)!=0;v=r+3|0;Hk(a,32,d,v,g&-65537);ep(a,s,r);ep(a,q!=q|0.0!=0.0?(t?17461:15538):t?15530:15534,3);Hk(a,32,d,v,g^8192);w=v}else{c=+Iq(q,l)*2.0;v=c!=0.0;if(v)f[l>>2]=(f[l>>2]|0)+-1;t=i|32;if((t|0)==97){x=i&32;y=(x|0)==0?s:s+9|0;z=r|2;A=12-e|0;do if(!(e>>>0>11|(A|0)==0)){B=8.0;C=A;do{C=C+-1|0;B=B*16.0}while((C|0)!=0);if((b[y>>0]|0)==45){D=-(B+(-c-B));break}else{D=c+B-B;break}}else D=c;while(0);A=f[l>>2]|0;C=(A|0)<0?0-A|0:A;E=Jj(C,((C|0)<0)<<31>>31,p)|0;if((E|0)==(p|0)){C=o+11|0;b[C>>0]=48;F=C}else F=E;b[F+-1>>0]=(A>>31&2)+43;A=F+-2|0;b[A>>0]=i+15;E=(e|0)<1;C=(g&8|0)==0;G=m;H=D;while(1){J=~~H;K=G+1|0;b[G>>0]=x|h[15542+J>>0];H=(H-+(J|0))*16.0;if((K-n|0)==1?!(C&(E&H==0.0)):0){b[K>>0]=46;L=G+2|0}else L=K;if(!(H!=0.0))break;else G=L}G=L;if((e|0)!=0?(-2-n+G|0)<(e|0):0){M=G-n|0;N=e+2|0}else{E=G-n|0;M=E;N=E}E=p-A|0;G=E+z+N|0;Hk(a,32,d,G,g);ep(a,y,z);Hk(a,48,d,G,g^65536);ep(a,m,M);Hk(a,48,N-M|0,0,0);ep(a,A,E);Hk(a,32,d,G,g^8192);w=G;break}G=(e|0)<0?6:e;if(v){E=(f[l>>2]|0)+-28|0;f[l>>2]=E;O=c*268435456.0;P=E}else{O=c;P=f[l>>2]|0}E=(P|0)<0?k:k+288|0;C=E;H=O;do{x=~~H>>>0;f[C>>2]=x;C=C+4|0;H=(H-+(x>>>0))*1.0e9}while(H!=0.0);if((P|0)>0){v=E;A=C;z=P;while(1){y=(z|0)<29?z:29;x=A+-4|0;if(x>>>0>=v>>>0){K=x;x=0;do{J=Rn(f[K>>2]|0,0,y|0)|0;Q=Tn(J|0,I|0,x|0,0)|0;J=I;R=an(Q|0,J|0,1e9,0)|0;f[K>>2]=R;x=up(Q|0,J|0,1e9,0)|0;K=K+-4|0}while(K>>>0>=v>>>0);if(x){K=v+-4|0;f[K>>2]=x;S=K}else S=v}else S=v;K=A;while(1){if(K>>>0<=S>>>0)break;J=K+-4|0;if(!(f[J>>2]|0))K=J;else break}x=(f[l>>2]|0)-y|0;f[l>>2]=x;if((x|0)>0){v=S;A=K;z=x}else{T=S;U=K;V=x;break}}}else{T=E;U=C;V=P}if((V|0)<0){z=((G+25|0)/9|0)+1|0;A=(t|0)==102;v=T;x=U;J=V;while(1){Q=0-J|0;R=(Q|0)<9?Q:9;if(v>>>0>>0){Q=(1<>>R;Y=0;Z=v;do{_=f[Z>>2]|0;f[Z>>2]=(_>>>R)+Y;Y=X(_&Q,W)|0;Z=Z+4|0}while(Z>>>0>>0);Z=(f[v>>2]|0)==0?v+4|0:v;if(!Y){$=Z;aa=x}else{f[x>>2]=Y;$=Z;aa=x+4|0}}else{$=(f[v>>2]|0)==0?v+4|0:v;aa=x}Z=A?E:$;W=(aa-Z>>2|0)>(z|0)?Z+(z<<2)|0:aa;J=(f[l>>2]|0)+R|0;f[l>>2]=J;if((J|0)>=0){ba=$;ca=W;break}else{v=$;x=W}}}else{ba=T;ca=U}x=E;if(ba>>>0>>0){v=(x-ba>>2)*9|0;J=f[ba>>2]|0;if(J>>>0<10)da=v;else{z=v;v=10;while(1){v=v*10|0;A=z+1|0;if(J>>>0>>0){da=A;break}else z=A}}}else da=0;z=(t|0)==103;v=(G|0)!=0;J=G-((t|0)!=102?da:0)+((v&z)<<31>>31)|0;if((J|0)<(((ca-x>>2)*9|0)+-9|0)){A=J+9216|0;J=E+4+(((A|0)/9|0)+-1024<<2)|0;C=(A|0)%9|0;if((C|0)<8){A=C;C=10;while(1){W=C*10|0;if((A|0)<7){A=A+1|0;C=W}else{ea=W;break}}}else ea=10;C=f[J>>2]|0;A=(C>>>0)%(ea>>>0)|0;t=(J+4|0)==(ca|0);if(!(t&(A|0)==0)){B=(((C>>>0)/(ea>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;W=(ea|0)/2|0;H=A>>>0>>0?.5:t&(A|0)==(W|0)?1.0:1.5;if(!r){fa=H;ga=B}else{W=(b[s>>0]|0)==45;fa=W?-H:H;ga=W?-B:B}W=C-A|0;f[J>>2]=W;if(ga+fa!=ga){A=W+ea|0;f[J>>2]=A;if(A>>>0>999999999){A=ba;W=J;while(1){C=W+-4|0;f[W>>2]=0;if(C>>>0>>0){t=A+-4|0;f[t>>2]=0;ha=t}else ha=A;t=(f[C>>2]|0)+1|0;f[C>>2]=t;if(t>>>0>999999999){A=ha;W=C}else{ia=ha;ja=C;break}}}else{ia=ba;ja=J}W=(x-ia>>2)*9|0;A=f[ia>>2]|0;if(A>>>0<10){ka=ja;la=W;ma=ia}else{C=W;W=10;while(1){W=W*10|0;t=C+1|0;if(A>>>0>>0){ka=ja;la=t;ma=ia;break}else C=t}}}else{ka=J;la=da;ma=ba}}else{ka=J;la=da;ma=ba}C=ka+4|0;na=la;oa=ca>>>0>C>>>0?C:ca;pa=ma}else{na=da;oa=ca;pa=ba}C=oa;while(1){if(C>>>0<=pa>>>0){qa=0;break}W=C+-4|0;if(!(f[W>>2]|0))C=W;else{qa=1;break}}J=0-na|0;do if(z){W=G+((v^1)&1)|0;if((W|0)>(na|0)&(na|0)>-5){ra=i+-1|0;sa=W+-1-na|0}else{ra=i+-2|0;sa=W+-1|0}W=g&8;if(!W){if(qa?(A=f[C+-4>>2]|0,(A|0)!=0):0)if(!((A>>>0)%10|0)){t=0;Z=10;while(1){Z=Z*10|0;Q=t+1|0;if((A>>>0)%(Z>>>0)|0|0){ta=Q;break}else t=Q}}else ta=0;else ta=9;t=((C-x>>2)*9|0)+-9|0;if((ra|32|0)==102){Z=t-ta|0;A=(Z|0)>0?Z:0;ua=ra;va=(sa|0)<(A|0)?sa:A;wa=0;break}else{A=t+na-ta|0;t=(A|0)>0?A:0;ua=ra;va=(sa|0)<(t|0)?sa:t;wa=0;break}}else{ua=ra;va=sa;wa=W}}else{ua=i;va=G;wa=g&8}while(0);G=va|wa;x=(G|0)!=0&1;v=(ua|32|0)==102;if(v){xa=0;ya=(na|0)>0?na:0}else{z=(na|0)<0?J:na;t=Jj(z,((z|0)<0)<<31>>31,p)|0;z=p;if((z-t|0)<2){A=t;while(1){Z=A+-1|0;b[Z>>0]=48;if((z-Z|0)<2)A=Z;else{za=Z;break}}}else za=t;b[za+-1>>0]=(na>>31&2)+43;A=za+-2|0;b[A>>0]=ua;xa=A;ya=z-A|0}A=r+1+va+x+ya|0;Hk(a,32,d,A,g);ep(a,s,r);Hk(a,48,d,A,g^65536);if(v){J=pa>>>0>E>>>0?E:pa;Z=m+9|0;R=Z;Y=m+8|0;Q=J;do{K=Jj(f[Q>>2]|0,0,Z)|0;if((Q|0)==(J|0))if((K|0)==(Z|0)){b[Y>>0]=48;Aa=Y}else Aa=K;else if(K>>>0>m>>>0){hj(m|0,48,K-n|0)|0;y=K;while(1){_=y+-1|0;if(_>>>0>m>>>0)y=_;else{Aa=_;break}}}else Aa=K;ep(a,Aa,R-Aa|0);Q=Q+4|0}while(Q>>>0<=E>>>0);if(G|0)ep(a,15558,1);if(Q>>>0>>0&(va|0)>0){E=va;R=Q;while(1){Y=Jj(f[R>>2]|0,0,Z)|0;if(Y>>>0>m>>>0){hj(m|0,48,Y-n|0)|0;J=Y;while(1){v=J+-1|0;if(v>>>0>m>>>0)J=v;else{Ba=v;break}}}else Ba=Y;ep(a,Ba,(E|0)<9?E:9);R=R+4|0;J=E+-9|0;if(!(R>>>0>>0&(E|0)>9)){Ca=J;break}else E=J}}else Ca=va;Hk(a,48,Ca+9|0,9,0)}else{E=qa?C:pa+4|0;if((va|0)>-1){R=m+9|0;Z=(wa|0)==0;Q=R;G=0-n|0;J=m+8|0;K=va;v=pa;while(1){x=Jj(f[v>>2]|0,0,R)|0;if((x|0)==(R|0)){b[J>>0]=48;Da=J}else Da=x;do if((v|0)==(pa|0)){x=Da+1|0;ep(a,Da,1);if(Z&(K|0)<1){Ea=x;break}ep(a,15558,1);Ea=x}else{if(Da>>>0<=m>>>0){Ea=Da;break}hj(m|0,48,Da+G|0)|0;x=Da;while(1){z=x+-1|0;if(z>>>0>m>>>0)x=z;else{Ea=z;break}}}while(0);Y=Q-Ea|0;ep(a,Ea,(K|0)>(Y|0)?Y:K);x=K-Y|0;v=v+4|0;if(!(v>>>0>>0&(x|0)>-1)){Fa=x;break}else K=x}}else Fa=va;Hk(a,48,Fa+18|0,18,0);ep(a,xa,p-xa|0)}Hk(a,32,d,A,g^8192);w=A}while(0);u=j;return ((w|0)<(d|0)?d:w)|0}function qb(a,c,e,g,h){a=a|0;c=c|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0;i=u;u=u+64|0;j=i+16|0;k=i;l=i+24|0;m=i+8|0;n=i+20|0;f[j>>2]=c;c=(a|0)!=0;o=l+40|0;q=o;r=l+39|0;l=m+4|0;s=0;t=0;v=0;a:while(1){do if((t|0)>-1)if((s|0)>(2147483647-t|0)){w=ir()|0;f[w>>2]=75;x=-1;break}else{x=s+t|0;break}else x=t;while(0);w=f[j>>2]|0;y=b[w>>0]|0;if(!(y<<24>>24)){z=88;break}else{A=y;B=w}b:while(1){switch(A<<24>>24){case 37:{C=B;D=B;z=9;break b;break}case 0:{E=B;break b;break}default:{}}y=B+1|0;f[j>>2]=y;A=b[y>>0]|0;B=y}c:do if((z|0)==9)while(1){z=0;if((b[D+1>>0]|0)!=37){E=C;break c}y=C+1|0;D=D+2|0;f[j>>2]=D;if((b[D>>0]|0)!=37){E=y;break}else{C=y;z=9}}while(0);y=E-w|0;if(c)ep(a,w,y);if(y|0){s=y;t=x;continue}y=(Pq(b[(f[j>>2]|0)+1>>0]|0)|0)==0;F=f[j>>2]|0;if(!y?(b[F+2>>0]|0)==36:0){G=(b[F+1>>0]|0)+-48|0;H=1;J=3}else{G=-1;H=v;J=1}y=F+J|0;f[j>>2]=y;F=b[y>>0]|0;K=(F<<24>>24)+-32|0;if(K>>>0>31|(1<>24)+-32|K;P=F+1|0;f[j>>2]=P;Q=b[P>>0]|0;R=(Q<<24>>24)+-32|0;if(R>>>0>31|(1<>24==42){if((Pq(b[N+1>>0]|0)|0)!=0?(F=f[j>>2]|0,(b[F+2>>0]|0)==36):0){O=F+1|0;f[h+((b[O>>0]|0)+-48<<2)>>2]=10;S=f[g+((b[O>>0]|0)+-48<<3)>>2]|0;T=1;U=F+3|0}else{if(H|0){V=-1;break}if(c){F=(f[e>>2]|0)+(4-1)&~(4-1);O=f[F>>2]|0;f[e>>2]=F+4;W=O}else W=0;S=W;T=0;U=(f[j>>2]|0)+1|0}f[j>>2]=U;O=(S|0)<0;X=O?0-S|0:S;Y=O?L|8192:L;Z=T;_=U}else{O=Cl(j)|0;if((O|0)<0){V=-1;break}X=O;Y=L;Z=H;_=f[j>>2]|0}do if((b[_>>0]|0)==46){if((b[_+1>>0]|0)!=42){f[j>>2]=_+1;O=Cl(j)|0;$=O;aa=f[j>>2]|0;break}if(Pq(b[_+2>>0]|0)|0?(O=f[j>>2]|0,(b[O+3>>0]|0)==36):0){F=O+2|0;f[h+((b[F>>0]|0)+-48<<2)>>2]=10;K=f[g+((b[F>>0]|0)+-48<<3)>>2]|0;F=O+4|0;f[j>>2]=F;$=K;aa=F;break}if(Z|0){V=-1;break a}if(c){F=(f[e>>2]|0)+(4-1)&~(4-1);K=f[F>>2]|0;f[e>>2]=F+4;ba=K}else ba=0;K=(f[j>>2]|0)+2|0;f[j>>2]=K;$=ba;aa=K}else{$=-1;aa=_}while(0);K=0;F=aa;while(1){if(((b[F>>0]|0)+-65|0)>>>0>57){V=-1;break a}O=F;F=F+1|0;f[j>>2]=F;ca=b[(b[O>>0]|0)+-65+(15030+(K*58|0))>>0]|0;da=ca&255;if((da+-1|0)>>>0>=8)break;else K=da}if(!(ca<<24>>24)){V=-1;break}O=(G|0)>-1;do if(ca<<24>>24==19)if(O){V=-1;break a}else z=50;else{if(O){f[h+(G<<2)>>2]=da;P=g+(G<<3)|0;Q=f[P+4>>2]|0;y=k;f[y>>2]=f[P>>2];f[y+4>>2]=Q;z=50;break}if(!c){V=0;break a}Ie(k,da,e);ea=f[j>>2]|0}while(0);if((z|0)==50){z=0;if(c)ea=F;else{s=0;t=x;v=Z;continue}}O=b[ea+-1>>0]|0;Q=(K|0)!=0&(O&15|0)==3?O&-33:O;O=Y&-65537;y=(Y&8192|0)==0?Y:O;d:do switch(Q|0){case 110:{switch((K&255)<<24>>24){case 0:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 1:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 2:{P=f[k>>2]|0;f[P>>2]=x;f[P+4>>2]=((x|0)<0)<<31>>31;s=0;t=x;v=Z;continue a;break}case 3:{d[f[k>>2]>>1]=x;s=0;t=x;v=Z;continue a;break}case 4:{b[f[k>>2]>>0]=x;s=0;t=x;v=Z;continue a;break}case 6:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 7:{P=f[k>>2]|0;f[P>>2]=x;f[P+4>>2]=((x|0)<0)<<31>>31;s=0;t=x;v=Z;continue a;break}default:{s=0;t=x;v=Z;continue a}}break}case 112:{fa=120;ga=$>>>0>8?$:8;ha=y|8;z=62;break}case 88:case 120:{fa=Q;ga=$;ha=y;z=62;break}case 111:{P=k;R=f[P>>2]|0;ia=f[P+4>>2]|0;P=Gl(R,ia,o)|0;ja=q-P|0;ka=P;la=0;ma=15494;na=(y&8|0)==0|($|0)>(ja|0)?$:ja+1|0;oa=y;pa=R;qa=ia;z=68;break}case 105:case 100:{ia=k;R=f[ia>>2]|0;ja=f[ia+4>>2]|0;if((ja|0)<0){ia=Vn(0,0,R|0,ja|0)|0;P=I;ra=k;f[ra>>2]=ia;f[ra+4>>2]=P;sa=1;ta=15494;ua=ia;va=P;z=67;break d}else{sa=(y&2049|0)!=0&1;ta=(y&2048|0)==0?((y&1|0)==0?15494:15496):15495;ua=R;va=ja;z=67;break d}break}case 117:{ja=k;sa=0;ta=15494;ua=f[ja>>2]|0;va=f[ja+4>>2]|0;z=67;break}case 99:{b[r>>0]=f[k>>2];wa=r;xa=0;ya=15494;za=o;Aa=1;Ba=O;break}case 109:{ja=ir()|0;Ca=kp(f[ja>>2]|0)|0;z=72;break}case 115:{ja=f[k>>2]|0;Ca=ja|0?ja:15504;z=72;break}case 67:{f[m>>2]=f[k>>2];f[l>>2]=0;f[k>>2]=m;Da=-1;Ea=m;z=76;break}case 83:{ja=f[k>>2]|0;if(!$){Hk(a,32,X,0,y);Fa=0;z=85}else{Da=$;Ea=ja;z=76}break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{s=pb(a,+p[k>>3],X,$,y,Q)|0;t=x;v=Z;continue a;break}default:{wa=w;xa=0;ya=15494;za=o;Aa=$;Ba=y}}while(0);e:do if((z|0)==62){z=0;w=k;Q=f[w>>2]|0;K=f[w+4>>2]|0;w=ol(Q,K,o,fa&32)|0;F=(ha&8|0)==0|(Q|0)==0&(K|0)==0;ka=w;la=F?0:2;ma=F?15494:15494+(fa>>4)|0;na=ga;oa=ha;pa=Q;qa=K;z=68}else if((z|0)==67){z=0;ka=Jj(ua,va,o)|0;la=sa;ma=ta;na=$;oa=y;pa=ua;qa=va;z=68}else if((z|0)==72){z=0;K=cg(Ca,0,$)|0;Q=(K|0)==0;wa=Ca;xa=0;ya=15494;za=Q?Ca+$|0:K;Aa=Q?$:K-Ca|0;Ba=O}else if((z|0)==76){z=0;K=Ea;Q=0;F=0;while(1){w=f[K>>2]|0;if(!w){Ga=Q;Ha=F;break}ja=Yo(n,w)|0;if((ja|0)<0|ja>>>0>(Da-Q|0)>>>0){Ga=Q;Ha=ja;break}w=ja+Q|0;if(Da>>>0>w>>>0){K=K+4|0;Q=w;F=ja}else{Ga=w;Ha=ja;break}}if((Ha|0)<0){V=-1;break a}Hk(a,32,X,Ga,y);if(!Ga){Fa=0;z=85}else{F=Ea;Q=0;while(1){K=f[F>>2]|0;if(!K){Fa=Ga;z=85;break e}ja=Yo(n,K)|0;Q=ja+Q|0;if((Q|0)>(Ga|0)){Fa=Ga;z=85;break e}ep(a,n,ja);if(Q>>>0>=Ga>>>0){Fa=Ga;z=85;break}else F=F+4|0}}}while(0);if((z|0)==68){z=0;O=(pa|0)!=0|(qa|0)!=0;F=(na|0)!=0|O;Q=q-ka+((O^1)&1)|0;wa=F?ka:o;xa=la;ya=ma;za=o;Aa=F?((na|0)>(Q|0)?na:Q):na;Ba=(na|0)>-1?oa&-65537:oa}else if((z|0)==85){z=0;Hk(a,32,X,Fa,y^8192);s=(X|0)>(Fa|0)?X:Fa;t=x;v=Z;continue}Q=za-wa|0;F=(Aa|0)<(Q|0)?Q:Aa;O=F+xa|0;ja=(X|0)<(O|0)?O:X;Hk(a,32,ja,O,Ba);ep(a,ya,xa);Hk(a,48,ja,O,Ba^65536);Hk(a,48,F,Q,0);ep(a,wa,Q);Hk(a,32,ja,O,Ba^8192);s=ja;t=x;v=Z}f:do if((z|0)==88)if(!a)if(v){Z=1;while(1){t=f[h+(Z<<2)>>2]|0;if(!t){Ia=Z;break}Ie(g+(Z<<3)|0,t,e);t=Z+1|0;if((Z|0)<9)Z=t;else{Ia=t;break}}if((Ia|0)<10){Z=Ia;while(1){if(f[h+(Z<<2)>>2]|0){V=-1;break f}if((Z|0)<9)Z=Z+1|0;else{V=1;break}}}else V=1}else V=0;else V=x;while(0);u=i;return V|0}function rb(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=Oa,ma=Oa,na=Oa,oa=0,pa=0,qa=0,ra=0,sa=0;c=u;u=u+64|0;d=c+28|0;e=c+16|0;g=c+4|0;h=c;i=a;j=a+80|0;k=f[j>>2]|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=i;l=d+20|0;n[l>>2]=$(1.0);f[d+24>>2]=i;qh(d,k);k=f[j>>2]|0;f[e>>2]=0;i=e+4|0;f[i>>2]=0;f[e+8>>2]=0;m=(k|0)==0;do if(!m)if(k>>>0>1073741823)mq(e);else{o=k<<2;p=dn(o)|0;f[e>>2]=p;q=p+(k<<2)|0;f[e+8>>2]=q;hj(p|0,0,o|0)|0;f[i>>2]=q;break}while(0);f[g>>2]=0;k=g+4|0;f[k>>2]=0;f[g+8>>2]=0;f[h>>2]=0;if(!m){m=d+16|0;q=d+4|0;o=d+12|0;p=d+8|0;r=g+8|0;s=d+24|0;t=0;v=0;while(1){w=f[m>>2]|0;x=f[w+8>>2]|0;y=(f[w+12>>2]|0)-x|0;w=(y|0)>0;z=x;if(w){x=y>>>2;A=0;B=0;while(1){C=f[z+(A<<2)>>2]|0;if(!(b[C+84>>0]|0))D=f[(f[C+68>>2]|0)+(v<<2)>>2]|0;else D=v;C=D+239^B;A=A+1|0;if((A|0)>=(x|0)){E=C;break}else B=C}}else E=0;B=f[q>>2]|0;x=(B|0)==0;a:do if(!x){A=B+-1|0;C=(A&B|0)==0;if(!C)if(E>>>0>>0)F=E;else F=(E>>>0)%(B>>>0)|0;else F=A&E;G=f[(f[d>>2]|0)+(F<<2)>>2]|0;if((G|0)!=0?(H=f[G>>2]|0,(H|0)!=0):0){G=f[s>>2]|0;I=G+8|0;J=G+12|0;b:do if(C){G=H;while(1){K=f[G+4>>2]|0;L=(K|0)==(E|0);if(!(L|(K&A|0)==(F|0))){M=44;break a}c:do if(L){K=f[G+8>>2]|0;N=f[I>>2]|0;O=(f[J>>2]|0)-N|0;P=N;if((O|0)<=0){Q=G;break b}N=O>>>2;O=0;while(1){R=f[P+(O<<2)>>2]|0;if(!(b[R+84>>0]|0)){S=f[R+68>>2]|0;T=f[S+(v<<2)>>2]|0;U=f[S+(K<<2)>>2]|0}else{T=v;U=K}O=O+1|0;if((U|0)!=(T|0))break c;if((O|0)>=(N|0)){V=G;M=42;break b}}}while(0);G=f[G>>2]|0;if(!G){M=44;break a}}}else{G=H;while(1){L=f[G+4>>2]|0;d:do if((L|0)!=(E|0)){if(L>>>0>>0)X=L;else X=(L>>>0)%(B>>>0)|0;if((X|0)!=(F|0)){M=44;break a}}else{N=f[G+8>>2]|0;O=f[I>>2]|0;K=(f[J>>2]|0)-O|0;P=O;if((K|0)<=0){Q=G;break b}O=K>>>2;K=0;while(1){S=f[P+(K<<2)>>2]|0;if(!(b[S+84>>0]|0)){R=f[S+68>>2]|0;Y=f[R+(v<<2)>>2]|0;Z=f[R+(N<<2)>>2]|0}else{Y=v;Z=N}K=K+1|0;if((Z|0)!=(Y|0))break d;if((K|0)>=(O|0)){V=G;M=42;break b}}}while(0);G=f[G>>2]|0;if(!G){M=44;break a}}}while(0);if((M|0)==42){M=0;if(!V){M=44;break}else Q=V}f[(f[e>>2]|0)+(v<<2)>>2]=f[Q+12>>2];_=t}else M=44}else M=44;while(0);do if((M|0)==44){M=0;if(w){J=y>>>2;I=0;H=0;while(1){A=f[z+(I<<2)>>2]|0;if(!(b[A+84>>0]|0))aa=f[(f[A+68>>2]|0)+(v<<2)>>2]|0;else aa=v;A=aa+239^H;I=I+1|0;if((I|0)>=(J|0)){ba=A;break}else H=A}}else ba=0;e:do if(!x){H=B+-1|0;J=(H&B|0)==0;if(!J)if(ba>>>0>>0)ca=ba;else ca=(ba>>>0)%(B>>>0)|0;else ca=H&ba;I=f[(f[d>>2]|0)+(ca<<2)>>2]|0;if((I|0)!=0?(A=f[I>>2]|0,(A|0)!=0):0){I=f[s>>2]|0;C=I+8|0;G=I+12|0;if(J){J=A;while(1){I=f[J+4>>2]|0;if(!((I|0)==(ba|0)|(I&H|0)==(ca|0))){da=ca;M=76;break e}I=f[J+8>>2]|0;L=f[C>>2]|0;O=(f[G>>2]|0)-L|0;K=L;if((O|0)<=0){ea=v;break e}L=O>>>2;O=0;while(1){N=f[K+(O<<2)>>2]|0;if(!(b[N+84>>0]|0)){P=f[N+68>>2]|0;fa=f[P+(v<<2)>>2]|0;ga=f[P+(I<<2)>>2]|0}else{fa=v;ga=I}O=O+1|0;if((ga|0)!=(fa|0))break;if((O|0)>=(L|0)){ea=v;break e}}J=f[J>>2]|0;if(!J){da=ca;M=76;break e}}}else ha=A;while(1){J=f[ha+4>>2]|0;if((J|0)!=(ba|0)){if(J>>>0>>0)ia=J;else ia=(J>>>0)%(B>>>0)|0;if((ia|0)!=(ca|0)){da=ca;M=76;break e}}J=f[ha+8>>2]|0;H=f[C>>2]|0;L=(f[G>>2]|0)-H|0;O=H;if((L|0)<=0){ea=v;break e}H=L>>>2;L=0;while(1){I=f[O+(L<<2)>>2]|0;if(!(b[I+84>>0]|0)){K=f[I+68>>2]|0;ja=f[K+(v<<2)>>2]|0;ka=f[K+(J<<2)>>2]|0}else{ja=v;ka=J}L=L+1|0;if((ka|0)!=(ja|0))break;if((L|0)>=(H|0)){ea=v;break e}}ha=f[ha>>2]|0;if(!ha){da=ca;M=76;break}}}else{da=ca;M=76}}else{da=0;M=76}while(0);if((M|0)==76){M=0;G=dn(16)|0;f[G+8>>2]=v;f[G+12>>2]=t;f[G+4>>2]=ba;f[G>>2]=0;la=$(((f[o>>2]|0)+1|0)>>>0);ma=$(B>>>0);na=$(n[l>>2]);do if(x|$(na*ma)>>0<3|(B+-1&B|0)!=0)&1;A=~~$(W($(la/na)))>>>0;qh(d,C>>>0>>0?A:C);C=f[q>>2]|0;A=C+-1|0;if(!(A&C)){oa=C;pa=A&ba;break}if(ba>>>0>>0){oa=C;pa=ba}else{oa=C;pa=(ba>>>0)%(C>>>0)|0}}else{oa=B;pa=da}while(0);C=(f[d>>2]|0)+(pa<<2)|0;A=f[C>>2]|0;if(!A){f[G>>2]=f[p>>2];f[p>>2]=G;f[C>>2]=p;C=f[G>>2]|0;if(C|0){H=f[C+4>>2]|0;C=oa+-1|0;if(C&oa)if(H>>>0>>0)qa=H;else qa=(H>>>0)%(oa>>>0)|0;else qa=H&C;ra=(f[d>>2]|0)+(qa<<2)|0;M=89}}else{f[G>>2]=f[A>>2];ra=A;M=89}if((M|0)==89){M=0;f[ra>>2]=G}f[o>>2]=(f[o>>2]|0)+1;ea=f[h>>2]|0}A=t+1|0;f[(f[e>>2]|0)+(ea<<2)>>2]=t;C=f[k>>2]|0;if((C|0)==(f[r>>2]|0)){Ci(g,h);_=A;break}else{f[C>>2]=f[h>>2];f[k>>2]=C+4;_=A;break}}while(0);v=(f[h>>2]|0)+1|0;f[h>>2]=v;sa=f[j>>2]|0;if(v>>>0>=sa>>>0)break;else t=_}if((_|0)!=(sa|0)){Xa[f[(f[a>>2]|0)+24>>2]&15](a,e,g);f[j>>2]=_}}_=f[g>>2]|0;if(_|0){g=f[k>>2]|0;if((g|0)!=(_|0))f[k>>2]=g+(~((g+-4-_|0)>>>2)<<2);br(_)}_=f[e>>2]|0;if(_|0){e=f[i>>2]|0;if((e|0)!=(_|0))f[i>>2]=e+(~((e+-4-_|0)>>>2)<<2);br(_)}_=f[d+8>>2]|0;if(_|0){e=_;do{_=e;e=f[e>>2]|0;br(_)}while((e|0)!=0)}e=f[d>>2]|0;f[d>>2]=0;if(!e){u=c;return}br(e);u=c;return}function sb(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0;g=u;u=u+80|0;h=g+76|0;i=g+72|0;j=g+48|0;k=g+24|0;l=g;m=a+32|0;n=f[c>>2]|0;c=n+1|0;if((n|0)!=-1){o=((c>>>0)%3|0|0)==0?n+-2|0:c;c=(((n>>>0)%3|0|0)==0?2:-1)+n|0;if((o|0)==-1)p=-1;else p=f[(f[f[m>>2]>>2]|0)+(o<<2)>>2]|0;if((c|0)==-1){q=p;r=-1}else{q=p;r=f[(f[f[m>>2]>>2]|0)+(c<<2)>>2]|0}}else{q=-1;r=-1}c=f[a+36>>2]|0;m=f[c>>2]|0;p=(f[c+4>>2]|0)-m>>2;if(p>>>0<=q>>>0)mq(c);o=m;m=f[o+(q<<2)>>2]|0;if(p>>>0<=r>>>0)mq(c);c=f[o+(r<<2)>>2]|0;r=(m|0)<(e|0);do if(r&(c|0)<(e|0)){o=m<<1;p=f[d+(o<<2)>>2]|0;q=((p|0)<0)<<31>>31;n=f[d+((o|1)<<2)>>2]|0;o=((n|0)<0)<<31>>31;s=c<<1;t=f[d+(s<<2)>>2]|0;v=f[d+((s|1)<<2)>>2]|0;if(!((t|0)!=(p|0)|(v|0)!=(n|0))){f[a+8>>2]=p;f[a+12>>2]=n;u=g;return 1}s=a+4|0;w=f[(f[s>>2]|0)+(e<<2)>>2]|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;f[j+16>>2]=0;f[j+20>>2]=0;x=f[a>>2]|0;if(!(b[x+84>>0]|0))y=f[(f[x+68>>2]|0)+(w<<2)>>2]|0;else y=w;f[i>>2]=y;w=b[x+24>>0]|0;f[h>>2]=f[i>>2];ub(x,h,w,j)|0;w=f[(f[s>>2]|0)+(m<<2)>>2]|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;x=f[a>>2]|0;if(!(b[x+84>>0]|0))z=f[(f[x+68>>2]|0)+(w<<2)>>2]|0;else z=w;f[i>>2]=z;w=b[x+24>>0]|0;f[h>>2]=f[i>>2];ub(x,h,w,k)|0;w=f[(f[s>>2]|0)+(c<<2)>>2]|0;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;f[l+12>>2]=0;f[l+16>>2]=0;f[l+20>>2]=0;s=f[a>>2]|0;if(!(b[s+84>>0]|0))A=f[(f[s+68>>2]|0)+(w<<2)>>2]|0;else A=w;f[i>>2]=A;w=b[s+24>>0]|0;f[h>>2]=f[i>>2];ub(s,h,w,l)|0;w=l;s=k;x=f[s>>2]|0;B=f[s+4>>2]|0;s=Vn(f[w>>2]|0,f[w+4>>2]|0,x|0,B|0)|0;w=I;C=l+8|0;D=k+8|0;E=f[D>>2]|0;F=f[D+4>>2]|0;D=Vn(f[C>>2]|0,f[C+4>>2]|0,E|0,F|0)|0;C=I;G=l+16|0;H=k+16|0;J=f[H>>2]|0;K=f[H+4>>2]|0;H=Vn(f[G>>2]|0,f[G+4>>2]|0,J|0,K|0)|0;G=I;L=on(s|0,w|0,s|0,w|0)|0;M=I;N=on(D|0,C|0,D|0,C|0)|0;O=Tn(N|0,I|0,L|0,M|0)|0;M=I;L=on(H|0,G|0,H|0,G|0)|0;N=Tn(O|0,M|0,L|0,I|0)|0;L=I;if((N|0)==0&(L|0)==0)break;M=j;O=Vn(f[M>>2]|0,f[M+4>>2]|0,x|0,B|0)|0;B=I;x=j+8|0;M=Vn(f[x>>2]|0,f[x+4>>2]|0,E|0,F|0)|0;F=I;E=j+16|0;x=Vn(f[E>>2]|0,f[E+4>>2]|0,J|0,K|0)|0;K=I;J=on(O|0,B|0,s|0,w|0)|0;E=I;P=on(M|0,F|0,D|0,C|0)|0;Q=Tn(P|0,I|0,J|0,E|0)|0;E=I;J=on(x|0,K|0,H|0,G|0)|0;P=Tn(Q|0,E|0,J|0,I|0)|0;J=I;E=Vn(t|0,((t|0)<0)<<31>>31|0,p|0,q|0)|0;t=I;Q=Vn(v|0,((v|0)<0)<<31>>31|0,n|0,o|0)|0;v=I;R=on(N|0,L|0,p|0,q|0)|0;q=I;p=on(N|0,L|0,n|0,o|0)|0;o=I;n=on(P|0,J|0,E|0,t|0)|0;S=I;T=on(P|0,J|0,Q|0,v|0)|0;U=I;V=Tn(n|0,S|0,R|0,q|0)|0;q=I;R=Tn(T|0,U|0,p|0,o|0)|0;o=I;p=on(P|0,J|0,s|0,w|0)|0;w=I;s=on(P|0,J|0,D|0,C|0)|0;C=I;D=on(P|0,J|0,H|0,G|0)|0;G=I;H=zk(p|0,w|0,N|0,L|0)|0;w=I;p=zk(s|0,C|0,N|0,L|0)|0;C=I;s=zk(D|0,G|0,N|0,L|0)|0;G=I;D=Vn(O|0,B|0,H|0,w|0)|0;w=I;H=Vn(M|0,F|0,p|0,C|0)|0;C=I;p=Vn(x|0,K|0,s|0,G|0)|0;G=I;s=on(D|0,w|0,D|0,w|0)|0;w=I;D=on(H|0,C|0,H|0,C|0)|0;C=Tn(D|0,I|0,s|0,w|0)|0;w=I;s=on(p|0,G|0,p|0,G|0)|0;G=Tn(C|0,w|0,s|0,I|0)|0;s=I;w=Vn(0,0,E|0,t|0)|0;t=I;E=on(G|0,s|0,N|0,L|0)|0;s=I;switch(E|0){case 0:{if(!s){W=0;X=0}else{Y=1;Z=0;_=E;$=s;aa=23}break}case 1:{if(!s){ba=1;ca=0;aa=24}else{Y=1;Z=0;_=E;$=s;aa=23}break}default:{Y=1;Z=0;_=E;$=s;aa=23}}if((aa|0)==23)while(1){aa=0;G=Rn(Y|0,Z|0,1)|0;C=I;p=_;_=Wn(_|0,$|0,2)|0;if(!($>>>0>0|($|0)==0&p>>>0>7)){ba=G;ca=C;aa=24;break}else{Y=G;Z=C;$=I;aa=23}}if((aa|0)==24)while(1){aa=0;C=up(E|0,s|0,ba|0,ca|0)|0;G=Tn(C|0,I|0,ba|0,ca|0)|0;C=Wn(G|0,I|0,1)|0;G=I;p=on(C|0,G|0,C|0,G|0)|0;D=I;if(D>>>0>s>>>0|(D|0)==(s|0)&p>>>0>E>>>0){ba=C;ca=G;aa=24}else{W=C;X=G;break}}E=on(W|0,X|0,Q|0,v|0)|0;s=I;G=on(W|0,X|0,w|0,t|0)|0;C=I;p=Tn(E|0,s|0,V|0,q|0)|0;D=I;H=Tn(G|0,C|0,R|0,o|0)|0;K=I;x=zk(p|0,D|0,N|0,L|0)|0;D=I;p=zk(H|0,K|0,N|0,L|0)|0;K=I;H=Vn(V|0,q|0,E|0,s|0)|0;s=I;E=Vn(R|0,o|0,G|0,C|0)|0;C=I;G=zk(H|0,s|0,N|0,L|0)|0;s=I;H=zk(E|0,C|0,N|0,L|0)|0;C=I;E=e<<1;F=f[d+(E<<2)>>2]|0;M=((F|0)<0)<<31>>31;B=f[d+((E|1)<<2)>>2]|0;E=((B|0)<0)<<31>>31;O=Vn(F|0,M|0,x|0,D|0)|0;J=I;P=Vn(B|0,E|0,p|0,K|0)|0;U=I;T=on(O|0,J|0,O|0,J|0)|0;J=I;O=on(P|0,U|0,P|0,U|0)|0;U=Tn(O|0,I|0,T|0,J|0)|0;J=I;T=Vn(F|0,M|0,G|0,s|0)|0;M=I;F=Vn(B|0,E|0,H|0,C|0)|0;E=I;B=on(T|0,M|0,T|0,M|0)|0;M=I;T=on(F|0,E|0,F|0,E|0)|0;E=Tn(T|0,I|0,B|0,M|0)|0;M=I;B=a+16|0;T=a+20|0;F=f[T>>2]|0;O=f[a+24>>2]|0;P=(F|0)==(O<<5|0);if(J>>>0>>0|(J|0)==(M|0)&U>>>0>>0){do if(P)if((F+1|0)<0)mq(B);else{E=O<<6;U=F+32&-32;hi(B,F>>>0<1073741823?(E>>>0>>0?U:E):2147483647);da=f[T>>2]|0;break}else da=F;while(0);f[T>>2]=da+1;L=(f[B>>2]|0)+(da>>>5<<2)|0;f[L>>2]=f[L>>2]|1<<(da&31);ea=x;fa=p;ga=K;ha=D}else{do if(P)if((F+1|0)<0)mq(B);else{L=O<<6;N=F+32&-32;hi(B,F>>>0<1073741823?(L>>>0>>0?N:L):2147483647);ia=f[T>>2]|0;break}else ia=F;while(0);f[T>>2]=ia+1;F=(f[B>>2]|0)+(ia>>>5<<2)|0;f[F>>2]=f[F>>2]&~(1<<(ia&31));ea=G;fa=H;ga=C;ha=s}f[a+8>>2]=ea;f[a+12>>2]=fa;u=g;return 1}while(0);do if(r)ja=m<<1;else{if((e|0)>0){ja=(e<<1)+-2|0;break}fa=a+8|0;f[fa>>2]=0;f[fa+4>>2]=0;u=g;return 1}while(0);f[a+8>>2]=f[d+(ja<<2)>>2];f[a+12>>2]=f[d+(ja+1<<2)>>2];u=g;return 1}function tb(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0;g=u;u=u+80|0;h=g+76|0;i=g+72|0;j=g+48|0;k=g+24|0;l=g;m=a+32|0;n=f[c>>2]|0;c=n+1|0;do if((n|0)!=-1){o=((c>>>0)%3|0|0)==0?n+-2|0:c;if(!((n>>>0)%3|0)){p=n+2|0;q=o;break}else{p=n+-1|0;q=o;break}}else{p=-1;q=-1}while(0);n=f[(f[m>>2]|0)+28>>2]|0;m=f[n+(q<<2)>>2]|0;q=f[n+(p<<2)>>2]|0;p=f[a+36>>2]|0;n=f[p>>2]|0;c=(f[p+4>>2]|0)-n>>2;if(c>>>0<=m>>>0)mq(p);o=n;n=f[o+(m<<2)>>2]|0;if(c>>>0<=q>>>0)mq(p);p=f[o+(q<<2)>>2]|0;q=(n|0)<(e|0);do if(q&(p|0)<(e|0)){o=n<<1;c=f[d+(o<<2)>>2]|0;m=((c|0)<0)<<31>>31;r=f[d+((o|1)<<2)>>2]|0;o=((r|0)<0)<<31>>31;s=p<<1;t=f[d+(s<<2)>>2]|0;v=f[d+((s|1)<<2)>>2]|0;if(!((t|0)!=(c|0)|(v|0)!=(r|0))){f[a+8>>2]=c;f[a+12>>2]=r;u=g;return 1}s=a+4|0;w=f[(f[s>>2]|0)+(e<<2)>>2]|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;f[j+16>>2]=0;f[j+20>>2]=0;x=f[a>>2]|0;if(!(b[x+84>>0]|0))y=f[(f[x+68>>2]|0)+(w<<2)>>2]|0;else y=w;f[i>>2]=y;w=b[x+24>>0]|0;f[h>>2]=f[i>>2];ub(x,h,w,j)|0;w=f[(f[s>>2]|0)+(n<<2)>>2]|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;x=f[a>>2]|0;if(!(b[x+84>>0]|0))z=f[(f[x+68>>2]|0)+(w<<2)>>2]|0;else z=w;f[i>>2]=z;w=b[x+24>>0]|0;f[h>>2]=f[i>>2];ub(x,h,w,k)|0;w=f[(f[s>>2]|0)+(p<<2)>>2]|0;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;f[l+12>>2]=0;f[l+16>>2]=0;f[l+20>>2]=0;s=f[a>>2]|0;if(!(b[s+84>>0]|0))A=f[(f[s+68>>2]|0)+(w<<2)>>2]|0;else A=w;f[i>>2]=A;w=b[s+24>>0]|0;f[h>>2]=f[i>>2];ub(s,h,w,l)|0;w=l;s=k;x=f[s>>2]|0;B=f[s+4>>2]|0;s=Vn(f[w>>2]|0,f[w+4>>2]|0,x|0,B|0)|0;w=I;C=l+8|0;D=k+8|0;E=f[D>>2]|0;F=f[D+4>>2]|0;D=Vn(f[C>>2]|0,f[C+4>>2]|0,E|0,F|0)|0;C=I;G=l+16|0;H=k+16|0;J=f[H>>2]|0;K=f[H+4>>2]|0;H=Vn(f[G>>2]|0,f[G+4>>2]|0,J|0,K|0)|0;G=I;L=on(s|0,w|0,s|0,w|0)|0;M=I;N=on(D|0,C|0,D|0,C|0)|0;O=Tn(N|0,I|0,L|0,M|0)|0;M=I;L=on(H|0,G|0,H|0,G|0)|0;N=Tn(O|0,M|0,L|0,I|0)|0;L=I;if((N|0)==0&(L|0)==0)break;M=j;O=Vn(f[M>>2]|0,f[M+4>>2]|0,x|0,B|0)|0;B=I;x=j+8|0;M=Vn(f[x>>2]|0,f[x+4>>2]|0,E|0,F|0)|0;F=I;E=j+16|0;x=Vn(f[E>>2]|0,f[E+4>>2]|0,J|0,K|0)|0;K=I;J=on(O|0,B|0,s|0,w|0)|0;E=I;P=on(M|0,F|0,D|0,C|0)|0;Q=Tn(P|0,I|0,J|0,E|0)|0;E=I;J=on(x|0,K|0,H|0,G|0)|0;P=Tn(Q|0,E|0,J|0,I|0)|0;J=I;E=Vn(t|0,((t|0)<0)<<31>>31|0,c|0,m|0)|0;t=I;Q=Vn(v|0,((v|0)<0)<<31>>31|0,r|0,o|0)|0;v=I;R=on(N|0,L|0,c|0,m|0)|0;m=I;c=on(N|0,L|0,r|0,o|0)|0;o=I;r=on(P|0,J|0,E|0,t|0)|0;S=I;T=on(P|0,J|0,Q|0,v|0)|0;U=I;V=Tn(r|0,S|0,R|0,m|0)|0;m=I;R=Tn(T|0,U|0,c|0,o|0)|0;o=I;c=on(P|0,J|0,s|0,w|0)|0;w=I;s=on(P|0,J|0,D|0,C|0)|0;C=I;D=on(P|0,J|0,H|0,G|0)|0;G=I;H=zk(c|0,w|0,N|0,L|0)|0;w=I;c=zk(s|0,C|0,N|0,L|0)|0;C=I;s=zk(D|0,G|0,N|0,L|0)|0;G=I;D=Vn(O|0,B|0,H|0,w|0)|0;w=I;H=Vn(M|0,F|0,c|0,C|0)|0;C=I;c=Vn(x|0,K|0,s|0,G|0)|0;G=I;s=on(D|0,w|0,D|0,w|0)|0;w=I;D=on(H|0,C|0,H|0,C|0)|0;C=Tn(D|0,I|0,s|0,w|0)|0;w=I;s=on(c|0,G|0,c|0,G|0)|0;G=Tn(C|0,w|0,s|0,I|0)|0;s=I;w=Vn(0,0,E|0,t|0)|0;t=I;E=on(G|0,s|0,N|0,L|0)|0;s=I;switch(E|0){case 0:{if(!s){W=0;X=0}else{Y=1;Z=0;_=E;$=s;aa=22}break}case 1:{if(!s){ba=1;ca=0;aa=23}else{Y=1;Z=0;_=E;$=s;aa=22}break}default:{Y=1;Z=0;_=E;$=s;aa=22}}if((aa|0)==22)while(1){aa=0;G=Rn(Y|0,Z|0,1)|0;C=I;c=_;_=Wn(_|0,$|0,2)|0;if(!($>>>0>0|($|0)==0&c>>>0>7)){ba=G;ca=C;aa=23;break}else{Y=G;Z=C;$=I;aa=22}}if((aa|0)==23)while(1){aa=0;C=up(E|0,s|0,ba|0,ca|0)|0;G=Tn(C|0,I|0,ba|0,ca|0)|0;C=Wn(G|0,I|0,1)|0;G=I;c=on(C|0,G|0,C|0,G|0)|0;D=I;if(D>>>0>s>>>0|(D|0)==(s|0)&c>>>0>E>>>0){ba=C;ca=G;aa=23}else{W=C;X=G;break}}E=on(W|0,X|0,Q|0,v|0)|0;s=I;G=on(W|0,X|0,w|0,t|0)|0;C=I;c=Tn(E|0,s|0,V|0,m|0)|0;D=I;H=Tn(G|0,C|0,R|0,o|0)|0;K=I;x=zk(c|0,D|0,N|0,L|0)|0;D=I;c=zk(H|0,K|0,N|0,L|0)|0;K=I;H=Vn(V|0,m|0,E|0,s|0)|0;s=I;E=Vn(R|0,o|0,G|0,C|0)|0;C=I;G=zk(H|0,s|0,N|0,L|0)|0;s=I;H=zk(E|0,C|0,N|0,L|0)|0;C=I;E=e<<1;F=f[d+(E<<2)>>2]|0;M=((F|0)<0)<<31>>31;B=f[d+((E|1)<<2)>>2]|0;E=((B|0)<0)<<31>>31;O=Vn(F|0,M|0,x|0,D|0)|0;J=I;P=Vn(B|0,E|0,c|0,K|0)|0;U=I;T=on(O|0,J|0,O|0,J|0)|0;J=I;O=on(P|0,U|0,P|0,U|0)|0;U=Tn(O|0,I|0,T|0,J|0)|0;J=I;T=Vn(F|0,M|0,G|0,s|0)|0;M=I;F=Vn(B|0,E|0,H|0,C|0)|0;E=I;B=on(T|0,M|0,T|0,M|0)|0;M=I;T=on(F|0,E|0,F|0,E|0)|0;E=Tn(T|0,I|0,B|0,M|0)|0;M=I;B=a+16|0;T=a+20|0;F=f[T>>2]|0;O=f[a+24>>2]|0;P=(F|0)==(O<<5|0);if(J>>>0>>0|(J|0)==(M|0)&U>>>0>>0){do if(P)if((F+1|0)<0)mq(B);else{E=O<<6;U=F+32&-32;hi(B,F>>>0<1073741823?(E>>>0>>0?U:E):2147483647);da=f[T>>2]|0;break}else da=F;while(0);f[T>>2]=da+1;L=(f[B>>2]|0)+(da>>>5<<2)|0;f[L>>2]=f[L>>2]|1<<(da&31);ea=x;fa=c;ga=K;ha=D}else{do if(P)if((F+1|0)<0)mq(B);else{L=O<<6;N=F+32&-32;hi(B,F>>>0<1073741823?(L>>>0>>0?N:L):2147483647);ia=f[T>>2]|0;break}else ia=F;while(0);f[T>>2]=ia+1;F=(f[B>>2]|0)+(ia>>>5<<2)|0;f[F>>2]=f[F>>2]&~(1<<(ia&31));ea=G;fa=H;ga=C;ha=s}f[a+8>>2]=ea;f[a+12>>2]=fa;u=g;return 1}while(0);do if(q)ja=n<<1;else{if((e|0)>0){ja=(e<<1)+-2|0;break}fa=a+8|0;f[fa>>2]=0;f[fa+4>>2]=0;u=g;return 1}while(0);f[a+8>>2]=f[d+(ja<<2)>>2];f[a+12>>2]=f[d+(ja+1<<2)>>2];u=g;return 1}function ub(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=Oa,D=0,E=0.0,F=0,G=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=on(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Tn(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){m=b[o>>0]|0;q=g+(r<<3)|0;f[q>>2]=m;f[q+4>>2]=((m|0)<0)<<31>>31;r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(o<<3)|0,0,(e<<24>>24)-o<<3|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=on(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Tn(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=g+(t<<3)|0;f[k>>2]=h[m>>0];f[k+4>>2]=0;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(m<<3)|0,0,(e<<24>>24)-m<<3|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=on(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Tn(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){o=d[l>>1]|0;k=g+(q<<3)|0;f[k>>2]=o;f[k+4>>2]=((o|0)<0)<<31>>31;q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(l<<3)|0,0,(e<<24>>24)-l<<3|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=on(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Tn(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){m=g+(k<<3)|0;f[m>>2]=j[r>>1];f[m+4>>2]=0;k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(r<<3)|0,0,(e<<24>>24)-r<<3|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=on(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=Tn(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){l=f[t>>2]|0;m=g+(o<<3)|0;f[m>>2]=l;f[m+4>>2]=((l|0)<0)<<31>>31;o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(t<<3)|0,0,(e<<24>>24)-t<<3|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=on(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=Tn(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){r=g+(m<<3)|0;f[r>>2]=f[q>>2];f[r+4>>2]=0;m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(q<<3)|0,0,(e<<24>>24)-q<<3|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=on(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=Tn(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){t=k;r=f[t+4>>2]|0;z=g+(l<<3)|0;f[z>>2]=f[t>>2];f[z+4>>2]=r;l=l+1|0;r=b[q>>0]|0;if((l|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){A=r;break}else k=k+8|0}}else A=m;k=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(k<<3)|0,0,(e<<24>>24)-k<<3|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;r=on(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;z=Tn(r|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+z|0;z=0;while(1){q=o;r=f[q+4>>2]|0;t=g+(z<<3)|0;f[t>>2]=f[q>>2];f[t+4>>2]=r;z=z+1|0;r=b[k>>0]|0;if((z|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){B=r;break}else o=o+8|0}}else B=l;o=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(o<<3)|0,0,(e<<24>>24)-o<<3|0)|0;i=1;return i|0}case 9:{o=a+24|0;z=b[o>>0]|0;if((z<<24>>24>e<<24>>24?e:z)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;r=on(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Tn(r|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){C=$(n[m>>2]);k=+K(+C)>=1.0?(+C>0.0?~~+Y(+J(+C/4294967296.0),4294967295.0)>>>0:~~+W((+C-+(~~+C>>>0))/4294967296.0)>>>0):0;r=g+(t<<3)|0;f[r>>2]=~~+C>>>0;f[r+4>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){D=k;break}else m=m+4|0}}else D=z;m=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(m<<3)|0,0,(e<<24>>24)-m<<3|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=on(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;r=Tn(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+r|0;r=0;while(1){E=+p[l>>3];o=+K(E)>=1.0?(E>0.0?~~+Y(+J(E/4294967296.0),4294967295.0)>>>0:~~+W((E-+(~~E>>>0))/4294967296.0)>>>0):0;k=g+(r<<3)|0;f[k>>2]=~~E>>>0;f[k+4>>2]=o;r=r+1|0;o=b[m>>0]|0;if((r|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){F=o;break}else l=l+8|0}}else F=t;l=F<<24>>24;if(F<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(l<<3)|0,0,(e<<24>>24)-l<<3|0)|0;i=1;return i|0}case 11:{l=a+24|0;r=b[l>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){m=f[f[a>>2]>>2]|0;z=a+40|0;o=on(f[z>>2]|0,f[z+4>>2]|0,f[c>>2]|0,0)|0;z=a+48|0;k=Tn(o|0,I|0,f[z>>2]|0,f[z+4>>2]|0)|0;z=m+k|0;k=0;while(1){m=g+(k<<3)|0;f[m>>2]=h[z>>0];f[m+4>>2]=0;k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){G=m;break}else z=z+1|0}}else G=r;z=G<<24>>24;if(G<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(z<<3)|0,0,(e<<24>>24)-z<<3|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function vb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;c=u;u=u+16|0;d=c+8|0;e=c;if((f[a+92>>2]|0)==(f[a+88>>2]|0)){u=c;return 1}g=a+52|0;h=f[g>>2]|0;if((h|0)==(f[a+56>>2]|0)){Ci(a+48|0,b);i=b}else{f[h>>2]=f[b>>2];f[g>>2]=h+4;i=b}b=a+84|0;f[b>>2]=0;h=a+4|0;g=f[h>>2]|0;j=f[i>>2]|0;k=j+1|0;if((j|0)!=-1){l=((k>>>0)%3|0|0)==0?j+-2|0:k;if((l|0)==-1)m=-1;else m=f[(f[g>>2]|0)+(l<<2)>>2]|0;l=(((j>>>0)%3|0|0)==0?2:-1)+j|0;if((l|0)==-1){n=m;o=-1}else{n=m;o=f[(f[g>>2]|0)+(l<<2)>>2]|0}}else{n=-1;o=-1}l=a+36|0;g=f[l>>2]|0;m=g+(n>>>5<<2)|0;j=1<<(n&31);k=f[m>>2]|0;if(!(k&j)){f[m>>2]=k|j;j=f[i>>2]|0;k=j+1|0;if((j|0)==-1)p=-1;else p=((k>>>0)%3|0|0)==0?j+-2|0:k;f[e>>2]=p;k=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((p>>>0)/3|0)*12|0)+(((p>>>0)%3|0)<<2)>>2]|0;p=f[a+20>>2]|0;f[d>>2]=k;j=f[p+4>>2]|0;p=j+4|0;m=f[p>>2]|0;if((m|0)==(f[j+8>>2]|0))Ci(j,d);else{f[m>>2]=k;f[p>>2]=m+4}m=a+12|0;p=f[m>>2]|0;k=p+4|0;j=f[k>>2]|0;if((j|0)==(f[p+8>>2]|0)){Ci(p,e);q=f[m>>2]|0}else{f[j>>2]=f[e>>2];f[k>>2]=j+4;q=p}p=q+24|0;f[(f[q+12>>2]|0)+(n<<2)>>2]=f[p>>2];f[p>>2]=(f[p>>2]|0)+1;r=f[l>>2]|0}else r=g;g=r+(o>>>5<<2)|0;r=1<<(o&31);p=f[g>>2]|0;if(!(p&r)){f[g>>2]=p|r;r=f[i>>2]|0;do if((r|0)!=-1)if(!((r>>>0)%3|0)){s=r+2|0;break}else{s=r+-1|0;break}else s=-1;while(0);f[e>>2]=s;r=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((s>>>0)/3|0)*12|0)+(((s>>>0)%3|0)<<2)>>2]|0;s=f[a+20>>2]|0;f[d>>2]=r;p=f[s+4>>2]|0;s=p+4|0;g=f[s>>2]|0;if((g|0)==(f[p+8>>2]|0))Ci(p,d);else{f[g>>2]=r;f[s>>2]=g+4}g=a+12|0;s=f[g>>2]|0;r=s+4|0;p=f[r>>2]|0;if((p|0)==(f[s+8>>2]|0)){Ci(s,e);t=f[g>>2]|0}else{f[p>>2]=f[e>>2];f[r>>2]=p+4;t=s}s=t+24|0;f[(f[t+12>>2]|0)+(o<<2)>>2]=f[s>>2];f[s>>2]=(f[s>>2]|0)+1}s=f[i>>2]|0;if((s|0)==-1)v=-1;else v=f[(f[f[h>>2]>>2]|0)+(s<<2)>>2]|0;s=(f[l>>2]|0)+(v>>>5<<2)|0;o=1<<(v&31);t=f[s>>2]|0;if(!(o&t)){f[s>>2]=t|o;o=f[i>>2]|0;f[e>>2]=o;t=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((o>>>0)/3|0)*12|0)+(((o>>>0)%3|0)<<2)>>2]|0;o=f[a+20>>2]|0;f[d>>2]=t;s=f[o+4>>2]|0;o=s+4|0;p=f[o>>2]|0;if((p|0)==(f[s+8>>2]|0))Ci(s,d);else{f[p>>2]=t;f[o>>2]=p+4}p=a+12|0;o=f[p>>2]|0;t=o+4|0;s=f[t>>2]|0;if((s|0)==(f[o+8>>2]|0)){Ci(o,e);w=f[p>>2]|0}else{f[s>>2]=f[e>>2];f[t>>2]=s+4;w=o}o=w+24|0;f[(f[w+12>>2]|0)+(v<<2)>>2]=f[o>>2];f[o>>2]=(f[o>>2]|0)+1}o=f[b>>2]|0;a:do if((o|0)<3){v=a+24|0;w=a+16|0;s=a+20|0;t=a+12|0;p=a+88|0;r=o;while(1){g=r;while(1){x=a+48+(g*12|0)+4|0;y=f[x>>2]|0;if((f[a+48+(g*12|0)>>2]|0)!=(y|0))break;if((g|0)<2)g=g+1|0;else break a}n=y+-4|0;q=f[n>>2]|0;f[x>>2]=n;f[b>>2]=g;f[i>>2]=q;if((q|0)==-1)break;n=(q>>>0)/3|0;j=f[v>>2]|0;do if(!(f[j+(n>>>5<<2)>>2]&1<<(n&31))){k=q;m=j;b:while(1){z=(k>>>0)/3|0;A=m+(z>>>5<<2)|0;f[A>>2]=1<<(z&31)|f[A>>2];A=f[i>>2]|0;if((A|0)==-1)B=-1;else B=f[(f[f[h>>2]>>2]|0)+(A<<2)>>2]|0;z=(f[l>>2]|0)+(B>>>5<<2)|0;C=1<<(B&31);D=f[z>>2]|0;if(!(C&D)){f[z>>2]=D|C;C=f[i>>2]|0;f[e>>2]=C;D=f[(f[(f[w>>2]|0)+96>>2]|0)+(((C>>>0)/3|0)*12|0)+(((C>>>0)%3|0)<<2)>>2]|0;C=f[s>>2]|0;f[d>>2]=D;z=f[C+4>>2]|0;C=z+4|0;E=f[C>>2]|0;if((E|0)==(f[z+8>>2]|0))Ci(z,d);else{f[E>>2]=D;f[C>>2]=E+4}E=f[t>>2]|0;C=E+4|0;D=f[C>>2]|0;if((D|0)==(f[E+8>>2]|0)){Ci(E,e);F=f[t>>2]|0}else{f[D>>2]=f[e>>2];f[C>>2]=D+4;F=E}E=F+24|0;f[(f[F+12>>2]|0)+(B<<2)>>2]=f[E>>2];f[E>>2]=(f[E>>2]|0)+1;G=f[i>>2]|0}else G=A;A=f[h>>2]|0;if((G|0)==-1){H=93;break}E=G+1|0;D=((E>>>0)%3|0|0)==0?G+-2|0:E;if((D|0)==-1)I=-1;else I=f[(f[A+12>>2]|0)+(D<<2)>>2]|0;D=(((G>>>0)%3|0|0)==0?2:-1)+G|0;if((D|0)==-1)J=-1;else J=f[(f[A+12>>2]|0)+(D<<2)>>2]|0;D=(I|0)==-1;E=D?-1:(I>>>0)/3|0;C=(J|0)==-1;z=C?-1:(J>>>0)/3|0;if(D)K=1;else K=(f[(f[v>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)!=0;do if(C)if(K){H=93;break b}else H=82;else{if(f[(f[v>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)if(K){H=93;break b}else{H=82;break}E=f[(f[A>>2]|0)+(J<<2)>>2]|0;if(!(1<<(E&31)&f[(f[l>>2]|0)+(E>>>5<<2)>>2])){L=(f[p>>2]|0)+(E<<2)|0;E=f[L>>2]|0;f[L>>2]=E+1;M=(E|0)>0?1:2}else M=0;if(K?(M|0)<=(f[b>>2]|0):0){N=J;break}f[d>>2]=J;E=a+48+(M*12|0)+4|0;L=f[E>>2]|0;if((L|0)==(f[a+48+(M*12|0)+8>>2]|0))Ci(a+48+(M*12|0)|0,d);else{f[L>>2]=J;f[E>>2]=L+4}if((f[b>>2]|0)>(M|0))f[b>>2]=M;if(K){H=93;break b}else H=82}while(0);if((H|0)==82){H=0;if(D)O=-1;else O=f[(f[f[h>>2]>>2]|0)+(I<<2)>>2]|0;if(!(1<<(O&31)&f[(f[l>>2]|0)+(O>>>5<<2)>>2])){A=(f[p>>2]|0)+(O<<2)|0;z=f[A>>2]|0;f[A>>2]=z+1;P=(z|0)>0?1:2}else P=0;if((P|0)>(f[b>>2]|0))break;else N=I}f[i>>2]=N;k=N;m=f[v>>2]|0}if((H|0)==93){H=0;Q=f[b>>2]|0;break}f[d>>2]=I;m=a+48+(P*12|0)+4|0;k=f[m>>2]|0;if((k|0)==(f[a+48+(P*12|0)+8>>2]|0))Ci(a+48+(P*12|0)|0,d);else{f[k>>2]=I;f[m>>2]=k+4}k=f[b>>2]|0;if((k|0)>(P|0)){f[b>>2]=P;R=P}else R=k;Q=R}else Q=g;while(0);if((Q|0)<3)r=Q;else break a}u=c;return 1}while(0);f[i>>2]=-1;u=c;return 1}function wb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}wb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;wb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function xb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}xb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;xb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function yb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}yb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;yb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function zb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}zb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;zb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Ab(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Ab(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Ab(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}} +function Bb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Bb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Bb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Cb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Cb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Cb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Db(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Db(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Db(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Eb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Eb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Eb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Fb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Fb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Fb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Gb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Gb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Gb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Hb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Hb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Hb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Ib(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Ib(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Ib(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Jb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Jb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Jb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Kb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Kb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Kb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Lb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Lb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Lb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Mb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Mb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Mb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Nb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=Tf(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Cg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=Qd(h,Y,c)|0;j=Y+4|0;if(Qd(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Nb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Nb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)mq(d);_=$;if(i>>>0<=Y>>>0)mq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Cg(h,h+4|0,e,c)|0;return}case 12:{Qg(h,h+4|0,h+8|0,e,c)|0;return}case 13:{Tf(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{Pg(h,a,c);return}case 20:{mq(p);break}case 22:{mq(p);break}case 26:{mq(p);break}case 32:{mq(p);break}case 38:{mq(A);break}case 40:{mq(A);break}case 46:{mq(A);break}case 47:{mq(A);break}case 51:{mq(p);break}case 57:{mq(R);break}case 59:{mq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)mq(S);else mq(S);break}case 66:{mq(S);break}case 72:{mq(Z);break}case 74:{mq(Z);break}case 84:return}}function Ob(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=on(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Tn(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){f[g+(r<<2)>>2]=b[o>>0];r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=on(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Tn(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){f[g+(t<<2)>>2]=h[m>>0];t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=on(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Tn(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=d[l>>1];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=on(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Tn(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=j[r>>1];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=on(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=Tn(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){f[g+(o<<2)>>2]=f[t>>2];o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(t<<2)|0,0,(e<<24>>24)-t<<2|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=on(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=Tn(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){f[g+(m<<2)>>2]=f[q>>2];m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(q<<2)|0,0,(e<<24>>24)-q<<2|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=on(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=Tn(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){f[g+(l<<2)>>2]=f[k>>2];l=l+1|0;t=b[q>>0]|0;if((l|0)>=((t<<24>>24>e<<24>>24?e:t)<<24>>24|0)){z=t;break}else k=k+8|0}}else z=m;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;t=on(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Tn(t|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+r|0;r=0;while(1){f[g+(r<<2)>>2]=f[o>>2];r=r+1|0;q=b[k>>0]|0;if((r|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else o=o+8|0}}else A=l;o=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 9:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=on(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Tn(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=~~$(n[m>>2])>>>0;f[g+(t<<2)>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else m=m+4|0}}else B=r;m=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=on(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Tn(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=~~+p[l>>3]>>>0;q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){C=o;break}else l=l+8|0}}else C=t;l=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 11:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=on(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Tn(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=h[r>>0];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){D=m;break}else r=r+1|0}}else D=q;r=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function Pb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=on(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Tn(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){f[g+(r<<2)>>2]=b[o>>0];r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=on(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Tn(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){f[g+(t<<2)>>2]=h[m>>0];t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=on(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Tn(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=d[l>>1];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=on(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Tn(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=j[r>>1];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=on(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=Tn(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){f[g+(o<<2)>>2]=f[t>>2];o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(t<<2)|0,0,(e<<24>>24)-t<<2|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=on(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=Tn(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){f[g+(m<<2)>>2]=f[q>>2];m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(q<<2)|0,0,(e<<24>>24)-q<<2|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=on(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=Tn(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){f[g+(l<<2)>>2]=f[k>>2];l=l+1|0;t=b[q>>0]|0;if((l|0)>=((t<<24>>24>e<<24>>24?e:t)<<24>>24|0)){z=t;break}else k=k+8|0}}else z=m;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;t=on(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Tn(t|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+r|0;r=0;while(1){f[g+(r<<2)>>2]=f[o>>2];r=r+1|0;q=b[k>>0]|0;if((r|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else o=o+8|0}}else A=l;o=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 9:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=on(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Tn(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=~~$(n[m>>2]);f[g+(t<<2)>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else m=m+4|0}}else B=r;m=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=on(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Tn(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=~~+p[l>>3];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){C=o;break}else l=l+8|0}}else C=t;l=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 11:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=on(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Tn(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=h[r>>0];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){D=m;break}else r=r+1|0}}else D=q;r=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}hj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function Qb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=Oa,J=0,K=0,L=0,M=0,N=Oa;e=u;u=u+48|0;g=e+36|0;h=e+24|0;i=e+12|0;j=e;if(!(ih(a,c,d)|0)){k=0;u=e;return k|0}l=f[(f[(f[c+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;if((f[l+28>>2]|0)!=9){k=0;u=e;return k|0}m=c+48|0;c=f[m>>2]|0;o=dn(32)|0;f[g>>2]=o;f[g+8>>2]=-2147483616;f[g+4>>2]=17;p=o;q=12932;r=p+17|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[o+17>>0]=0;o=c+16|0;s=f[o>>2]|0;if(s){t=o;v=s;a:while(1){s=v;while(1){if((f[s+16>>2]|0)>=(d|0))break;w=f[s+4>>2]|0;if(!w){x=t;break a}else s=w}v=f[s>>2]|0;if(!v){x=s;break}else t=s}if(((x|0)!=(o|0)?(f[x+16>>2]|0)<=(d|0):0)?(o=x+20|0,(sh(o,g)|0)!=0):0)y=yk(o,g,-1)|0;else z=12}else z=12;if((z|0)==12)y=yk(c,g,-1)|0;if((b[g+11>>0]|0)<0)br(f[g>>2]|0);if((y|0)<1){k=0;u=e;return k|0}c=f[m>>2]|0;o=dn(32)|0;f[g>>2]=o;f[g+8>>2]=-2147483616;f[g+4>>2]=19;p=o;q=13005;r=p+19|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[o+19>>0]=0;o=c+16|0;x=f[o>>2]|0;if(x){t=o;v=x;b:while(1){x=v;while(1){if((f[x+16>>2]|0)>=(d|0))break;w=f[x+4>>2]|0;if(!w){A=t;break b}else x=w}v=f[x>>2]|0;if(!v){A=x;break}else t=x}if((A|0)!=(o|0)?(f[A+16>>2]|0)<=(d|0):0)B=A+20|0;else z=24}else z=24;if((z|0)==24)B=c;if(!(sh(B,g)|0))C=0;else{B=f[m>>2]|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;c=dn(32)|0;f[h>>2]=c;f[h+8>>2]=-2147483616;f[h+4>>2]=18;p=c;q=13025;r=p+18|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[c+18>>0]=0;c=B+16|0;A=f[c>>2]|0;if(A){o=c;t=A;c:while(1){A=t;while(1){if((f[A+16>>2]|0)>=(d|0))break;v=f[A+4>>2]|0;if(!v){D=o;break c}else A=v}t=f[A>>2]|0;if(!t){D=A;break}else o=A}if((D|0)!=(c|0)?(f[D+16>>2]|0)<=(d|0):0)E=D+20|0;else z=34}else z=34;if((z|0)==34)E=B;B=(sh(E,h)|0)!=0;if((b[h+11>>0]|0)<0)br(f[h>>2]|0);C=B}if((b[g+11>>0]|0)<0)br(f[g>>2]|0);if(!C){Kd(a+40|0,l,y)|0;k=1;u=e;return k|0}C=l+24|0;l=b[C>>0]|0;B=l<<24>>24;f[i>>2]=0;E=i+4|0;f[E>>2]=0;f[i+8>>2]=0;do if(l<<24>>24)if(l<<24>>24<0)mq(i);else{D=B<<2;c=dn(D)|0;f[i>>2]=c;o=c+(B<<2)|0;f[i+8>>2]=o;hj(c|0,0,D|0)|0;f[E>>2]=o;F=c;break}else F=0;while(0);B=f[m>>2]|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;l=dn(32)|0;f[j>>2]=l;f[j+8>>2]=-2147483616;f[j+4>>2]=19;p=l;q=13005;r=p+19|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[l+19>>0]=0;l=b[C>>0]|0;c=l<<24>>24;o=B+16|0;D=f[o>>2]|0;if(D){t=o;x=D;d:while(1){D=x;while(1){if((f[D+16>>2]|0)>=(d|0))break;v=f[D+4>>2]|0;if(!v){G=t;break d}else D=v}x=f[D>>2]|0;if(!x){G=D;break}else t=D}if(((G|0)!=(o|0)?(f[G+16>>2]|0)<=(d|0):0)?(o=G+20|0,(sh(o,j)|0)!=0):0){t=zg(o,j)|0;if((t|0)!=(G+24|0)){dj(g,t+28|0);t=g+11|0;G=b[t>>0]|0;o=G<<24>>24<0;if(!((o?f[g+4>>2]|0:G&255)|0))H=G;else{if(l<<24>>24>0){x=o?f[g>>2]|0:g;o=0;do{I=$(pq(x,h));A=x;x=f[h>>2]|0;if((A|0)==(x|0))break;n[F+(o<<2)>>2]=I;o=o+1|0}while((o|0)<(c|0));J=b[t>>0]|0}else J=G;H=J}if(H<<24>>24<0)br(f[g>>2]|0)}}else z=64}else z=64;if((z|0)==64?(H=zg(B,j)|0,(H|0)!=(B+4|0)):0){dj(g,H+28|0);H=g+11|0;B=b[H>>0]|0;J=B<<24>>24<0;if(!((J?f[g+4>>2]|0:B&255)|0))K=B;else{if(l<<24>>24>0){l=J?f[g>>2]|0:g;J=0;do{I=$(pq(l,h));G=l;l=f[h>>2]|0;if((G|0)==(l|0))break;n[F+(J<<2)>>2]=I;J=J+1|0}while((J|0)<(c|0));L=b[H>>0]|0}else L=B;K=L}if(K<<24>>24<0)br(f[g>>2]|0)}if((b[j+11>>0]|0)<0)br(f[j>>2]|0);j=f[m>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;m=dn(32)|0;f[g>>2]=m;f[g+8>>2]=-2147483616;f[g+4>>2]=18;p=m;q=13025;r=p+18|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[m+18>>0]=0;m=j+16|0;q=f[m>>2]|0;if(q){p=m;r=q;e:while(1){q=r;while(1){if((f[q+16>>2]|0)>=(d|0))break;K=f[q+4>>2]|0;if(!K){M=p;break e}else q=K}r=f[q>>2]|0;if(!r){M=q;break}else p=q}if(((M|0)!=(m|0)?(f[M+16>>2]|0)<=(d|0):0)?(d=M+20|0,(sh(d,g)|0)!=0):0)N=$(kk(d,g,$(1.0)));else z=86}else z=86;if((z|0)==86)N=$(kk(j,g,$(1.0)));if((b[g+11>>0]|0)<0)br(f[g>>2]|0);wl(a+40|0,y,f[i>>2]|0,b[C>>0]|0,N);C=f[i>>2]|0;if(C|0){i=f[E>>2]|0;if((i|0)!=(C|0))f[E>>2]=i+(~((i+-4-C|0)>>>2)<<2);br(C)}k=1;u=e;return k|0}function Rb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0;e=u;u=u+64|0;d=e+48|0;h=e+36|0;i=e+24|0;j=e+16|0;k=e+8|0;l=e;m=e+32|0;n=a+60|0;f[a+68>>2]=g;g=a+108|0;lk(g);o=a+56|0;p=f[o>>2]|0;q=(f[p+4>>2]|0)-(f[p>>2]|0)|0;r=q>>2;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;s=i;f[s>>2]=0;f[s+4>>2]=0;s=j;f[s>>2]=0;f[s+4>>2]=0;s=k;f[s>>2]=0;f[s+4>>2]=0;s=l;f[s>>2]=0;f[s+4>>2]=0;if((q|0)<=0){u=e;return 1}q=h+4|0;s=h+8|0;t=a+104|0;v=i+4|0;w=a+100|0;x=j+4|0;y=a+8|0;z=a+16|0;A=a+32|0;B=a+12|0;C=a+28|0;D=a+20|0;E=a+24|0;F=a+96|0;a=k+4|0;G=l+4|0;H=f[p>>2]|0;if((f[p+4>>2]|0)==(H|0)){J=p;mq(J)}else{K=0;L=H}while(1){f[m>>2]=f[L+(K<<2)>>2];f[d>>2]=f[m>>2];fc(n,d,h);H=f[h>>2]|0;p=(H|0)>-1?H:0-H|0;M=f[q>>2]|0;N=(M|0)>-1?M:0-M|0;O=Tn(N|0,((N|0)<0)<<31>>31|0,p|0,((p|0)<0)<<31>>31|0)|0;p=f[s>>2]|0;N=(p|0)>-1;P=N?p:0-p|0;p=Tn(O|0,I|0,P|0,((P|0)<0)<<31>>31|0)|0;P=I;if((p|0)==0&(P|0)==0){O=f[t>>2]|0;Q=O;R=h;S=M;T=O}else{O=f[t>>2]|0;U=((O|0)<0)<<31>>31;V=on(O|0,U|0,H|0,((H|0)<0)<<31>>31|0)|0;H=zk(V|0,I|0,p|0,P|0)|0;f[h>>2]=H;V=on(O|0,U|0,M|0,((M|0)<0)<<31>>31|0)|0;M=zk(V|0,I|0,p|0,P|0)|0;f[q>>2]=M;P=O-((H|0)>-1?H:0-H|0)-((M|0)>-1?M:0-M|0)|0;Q=N?P:0-P|0;R=s;S=M;T=O}f[R>>2]=Q;O=f[h>>2]|0;do if((O|0)<=-1){if((S|0)<0){M=f[s>>2]|0;W=(M|0)>-1?M:0-M|0;X=M}else{M=f[s>>2]|0;W=(f[w>>2]|0)-((M|0)>-1?M:0-M|0)|0;X=M}if((X|0)<0){Y=(S|0)>-1?S:0-S|0;Z=W;_=X;break}else{Y=(f[w>>2]|0)-((S|0)>-1?S:0-S|0)|0;Z=W;_=X;break}}else{M=f[s>>2]|0;Y=M+T|0;Z=T+S|0;_=M}while(0);M=(Z|0)==0;P=(Y|0)==0;N=f[w>>2]|0;do if(Y|Z){H=(N|0)==(Y|0);if(!(M&H)){p=(N|0)==(Z|0);if(!(P&p)){if(M&(T|0)<(Y|0)){$=0;aa=(T<<1)-Y|0;break}if(p&(T|0)>(Y|0)){$=Z;aa=(T<<1)-Y|0;break}if(H&(T|0)>(Z|0)){$=(T<<1)-Z|0;aa=Y;break}if(P){$=(T|0)<(Z|0)?(T<<1)-Z|0:Z;aa=0}else{$=Z;aa=Y}}else{$=Z;aa=Z}}else{$=Y;aa=Y}}else{$=N;aa=N}while(0);f[i>>2]=$;f[v>>2]=aa;P=0-S|0;M=0-_|0;f[h>>2]=0-O;f[q>>2]=P;f[s>>2]=M;if((O|0)<1){ba=T-_|0;ca=T-S|0}else{H=(_|0)<1?M:_;M=(S|0)<1?P:S;ba=(_|0)>0?M:N-M|0;ca=(S|0)>0?H:N-H|0}H=(ca|0)==0;M=(ba|0)==0;do if(((ba|ca|0)!=0?(P=(N|0)==(ba|0),!(H&P)):0)?(p=(N|0)==(ca|0),!(M&p)):0){if(H&(T|0)<(ba|0)){da=0;ea=(T<<1)-ba|0;break}if(p&(T|0)>(ba|0)){da=N;ea=(T<<1)-ba|0;break}if(P&(T|0)>(ca|0)){da=(T<<1)-ca|0;ea=N;break}if(M){da=(T|0)<(ca|0)?(T<<1)-ca|0:ca;ea=0}else{da=ca;ea=ba}}else{da=N;ea=N}while(0);f[j>>2]=da;f[x>>2]=ea;N=K<<1;M=b+(N<<2)|0;H=f[y>>2]|0;if((H|0)>0){O=0;P=i;p=H;while(1){if((p|0)>0){H=0;do{V=f[P+(H<<2)>>2]|0;U=f[z>>2]|0;if((V|0)>(U|0)){fa=f[A>>2]|0;f[fa+(H<<2)>>2]=U;ga=fa}else{fa=f[B>>2]|0;U=f[A>>2]|0;f[U+(H<<2)>>2]=(V|0)<(fa|0)?fa:V;ga=U}H=H+1|0;U=f[y>>2]|0}while((H|0)<(U|0));ha=ga;ia=U}else{ha=f[A>>2]|0;ia=p}H=(f[M+(O<<2)>>2]|0)-(f[ha+(O<<2)>>2]|0)|0;U=k+(O<<2)|0;f[U>>2]=H;ja=f[C>>2]|0;if((H|0)>=(ja|0)){if((H|0)>(f[E>>2]|0)){ka=H-(f[D>>2]|0)|0;la=52}}else{ka=(f[D>>2]|0)+H|0;la=52}if((la|0)==52){la=0;f[U>>2]=ka}O=O+1|0;if((O|0)>=(ia|0))break;else{P=ha;p=ia}}if((ia|0)>0){p=0;P=j;O=ia;U=ja;while(1){if((O|0)>0){H=0;do{V=f[P+(H<<2)>>2]|0;fa=f[z>>2]|0;if((V|0)>(fa|0))f[ha+(H<<2)>>2]=fa;else{fa=f[B>>2]|0;f[ha+(H<<2)>>2]=(V|0)<(fa|0)?fa:V}H=H+1|0;ma=f[y>>2]|0}while((H|0)<(ma|0));na=f[C>>2]|0;oa=ma}else{na=U;oa=O}H=(f[M+(p<<2)>>2]|0)-(f[ha+(p<<2)>>2]|0)|0;V=l+(p<<2)|0;f[V>>2]=H;if((H|0)>=(na|0)){if((H|0)>(f[E>>2]|0)){pa=H-(f[D>>2]|0)|0;la=65}}else{pa=(f[D>>2]|0)+H|0;la=65}if((la|0)==65){la=0;f[V>>2]=pa}p=p+1|0;if((p|0)>=(oa|0))break;else{P=ha;O=oa;U=na}}}}U=f[k>>2]|0;O=f[t>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))qa=(f[F>>2]|0)+U|0;else qa=U;else qa=U-(f[F>>2]|0)|0;f[k>>2]=qa;U=f[a>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))ra=(f[F>>2]|0)+U|0;else ra=U;else ra=U-(f[F>>2]|0)|0;f[a>>2]=ra;U=f[l>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))sa=(f[F>>2]|0)+U|0;else sa=U;else sa=U-(f[F>>2]|0)|0;f[l>>2]=sa;U=f[G>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))ta=(f[F>>2]|0)+U|0;else ta=U;else ta=U-(f[F>>2]|0)|0;f[G>>2]=ta;if((((ra|0)>-1?ra:0-ra|0)+((qa|0)>-1?qa:0-qa|0)|0)<(((sa|0)>-1?sa:0-sa|0)+((ta|0)>-1?ta:0-ta|0)|0)){Vi(g,0);ua=k}else{Vi(g,1);ua=l}U=f[ua>>2]|0;if((U|0)<0)va=(f[F>>2]|0)+U|0;else va=U;U=c+(N<<2)|0;f[U>>2]=va;O=f[ua+4>>2]|0;if((O|0)<0)wa=(f[F>>2]|0)+O|0;else wa=O;f[U+4>>2]=wa;K=K+1|0;if((K|0)>=(r|0)){la=3;break}U=f[o>>2]|0;L=f[U>>2]|0;if((f[U+4>>2]|0)-L>>2>>>0<=K>>>0){J=U;la=4;break}}if((la|0)==3){u=e;return 1}else if((la|0)==4)mq(J);return 0}function Sb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0;e=u;u=u+64|0;d=e+48|0;h=e+36|0;i=e+24|0;j=e+16|0;k=e+8|0;l=e;m=e+32|0;n=a+60|0;f[a+68>>2]=g;g=a+108|0;lk(g);o=a+56|0;p=f[o>>2]|0;q=(f[p+4>>2]|0)-(f[p>>2]|0)|0;r=q>>2;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;s=i;f[s>>2]=0;f[s+4>>2]=0;s=j;f[s>>2]=0;f[s+4>>2]=0;s=k;f[s>>2]=0;f[s+4>>2]=0;s=l;f[s>>2]=0;f[s+4>>2]=0;if((q|0)<=0){u=e;return 1}q=h+4|0;s=h+8|0;t=a+104|0;v=i+4|0;w=a+100|0;x=j+4|0;y=a+8|0;z=a+16|0;A=a+32|0;B=a+12|0;C=a+28|0;D=a+20|0;E=a+24|0;F=a+96|0;a=k+4|0;G=l+4|0;H=f[p>>2]|0;if((f[p+4>>2]|0)==(H|0)){J=p;mq(J)}else{K=0;L=H}while(1){f[m>>2]=f[L+(K<<2)>>2];f[d>>2]=f[m>>2];$b(n,d,h);H=f[h>>2]|0;p=(H|0)>-1?H:0-H|0;M=f[q>>2]|0;N=(M|0)>-1?M:0-M|0;O=Tn(N|0,((N|0)<0)<<31>>31|0,p|0,((p|0)<0)<<31>>31|0)|0;p=f[s>>2]|0;N=(p|0)>-1;P=N?p:0-p|0;p=Tn(O|0,I|0,P|0,((P|0)<0)<<31>>31|0)|0;P=I;if((p|0)==0&(P|0)==0){O=f[t>>2]|0;Q=O;R=h;S=M;T=O}else{O=f[t>>2]|0;U=((O|0)<0)<<31>>31;V=on(O|0,U|0,H|0,((H|0)<0)<<31>>31|0)|0;H=zk(V|0,I|0,p|0,P|0)|0;f[h>>2]=H;V=on(O|0,U|0,M|0,((M|0)<0)<<31>>31|0)|0;M=zk(V|0,I|0,p|0,P|0)|0;f[q>>2]=M;P=O-((H|0)>-1?H:0-H|0)-((M|0)>-1?M:0-M|0)|0;Q=N?P:0-P|0;R=s;S=M;T=O}f[R>>2]=Q;O=f[h>>2]|0;do if((O|0)<=-1){if((S|0)<0){M=f[s>>2]|0;W=(M|0)>-1?M:0-M|0;X=M}else{M=f[s>>2]|0;W=(f[w>>2]|0)-((M|0)>-1?M:0-M|0)|0;X=M}if((X|0)<0){Y=(S|0)>-1?S:0-S|0;Z=W;_=X;break}else{Y=(f[w>>2]|0)-((S|0)>-1?S:0-S|0)|0;Z=W;_=X;break}}else{M=f[s>>2]|0;Y=M+T|0;Z=T+S|0;_=M}while(0);M=(Z|0)==0;P=(Y|0)==0;N=f[w>>2]|0;do if(Y|Z){H=(N|0)==(Y|0);if(!(M&H)){p=(N|0)==(Z|0);if(!(P&p)){if(M&(T|0)<(Y|0)){$=0;aa=(T<<1)-Y|0;break}if(p&(T|0)>(Y|0)){$=Z;aa=(T<<1)-Y|0;break}if(H&(T|0)>(Z|0)){$=(T<<1)-Z|0;aa=Y;break}if(P){$=(T|0)<(Z|0)?(T<<1)-Z|0:Z;aa=0}else{$=Z;aa=Y}}else{$=Z;aa=Z}}else{$=Y;aa=Y}}else{$=N;aa=N}while(0);f[i>>2]=$;f[v>>2]=aa;P=0-S|0;M=0-_|0;f[h>>2]=0-O;f[q>>2]=P;f[s>>2]=M;if((O|0)<1){ba=T-_|0;ca=T-S|0}else{H=(_|0)<1?M:_;M=(S|0)<1?P:S;ba=(_|0)>0?M:N-M|0;ca=(S|0)>0?H:N-H|0}H=(ca|0)==0;M=(ba|0)==0;do if(((ba|ca|0)!=0?(P=(N|0)==(ba|0),!(H&P)):0)?(p=(N|0)==(ca|0),!(M&p)):0){if(H&(T|0)<(ba|0)){da=0;ea=(T<<1)-ba|0;break}if(p&(T|0)>(ba|0)){da=N;ea=(T<<1)-ba|0;break}if(P&(T|0)>(ca|0)){da=(T<<1)-ca|0;ea=N;break}if(M){da=(T|0)<(ca|0)?(T<<1)-ca|0:ca;ea=0}else{da=ca;ea=ba}}else{da=N;ea=N}while(0);f[j>>2]=da;f[x>>2]=ea;N=K<<1;M=b+(N<<2)|0;H=f[y>>2]|0;if((H|0)>0){O=0;P=i;p=H;while(1){if((p|0)>0){H=0;do{V=f[P+(H<<2)>>2]|0;U=f[z>>2]|0;if((V|0)>(U|0)){fa=f[A>>2]|0;f[fa+(H<<2)>>2]=U;ga=fa}else{fa=f[B>>2]|0;U=f[A>>2]|0;f[U+(H<<2)>>2]=(V|0)<(fa|0)?fa:V;ga=U}H=H+1|0;U=f[y>>2]|0}while((H|0)<(U|0));ha=ga;ia=U}else{ha=f[A>>2]|0;ia=p}H=(f[M+(O<<2)>>2]|0)-(f[ha+(O<<2)>>2]|0)|0;U=k+(O<<2)|0;f[U>>2]=H;ja=f[C>>2]|0;if((H|0)>=(ja|0)){if((H|0)>(f[E>>2]|0)){ka=H-(f[D>>2]|0)|0;la=52}}else{ka=(f[D>>2]|0)+H|0;la=52}if((la|0)==52){la=0;f[U>>2]=ka}O=O+1|0;if((O|0)>=(ia|0))break;else{P=ha;p=ia}}if((ia|0)>0){p=0;P=j;O=ia;U=ja;while(1){if((O|0)>0){H=0;do{V=f[P+(H<<2)>>2]|0;fa=f[z>>2]|0;if((V|0)>(fa|0))f[ha+(H<<2)>>2]=fa;else{fa=f[B>>2]|0;f[ha+(H<<2)>>2]=(V|0)<(fa|0)?fa:V}H=H+1|0;ma=f[y>>2]|0}while((H|0)<(ma|0));na=f[C>>2]|0;oa=ma}else{na=U;oa=O}H=(f[M+(p<<2)>>2]|0)-(f[ha+(p<<2)>>2]|0)|0;V=l+(p<<2)|0;f[V>>2]=H;if((H|0)>=(na|0)){if((H|0)>(f[E>>2]|0)){pa=H-(f[D>>2]|0)|0;la=65}}else{pa=(f[D>>2]|0)+H|0;la=65}if((la|0)==65){la=0;f[V>>2]=pa}p=p+1|0;if((p|0)>=(oa|0))break;else{P=ha;O=oa;U=na}}}}U=f[k>>2]|0;O=f[t>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))qa=(f[F>>2]|0)+U|0;else qa=U;else qa=U-(f[F>>2]|0)|0;f[k>>2]=qa;U=f[a>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))ra=(f[F>>2]|0)+U|0;else ra=U;else ra=U-(f[F>>2]|0)|0;f[a>>2]=ra;U=f[l>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))sa=(f[F>>2]|0)+U|0;else sa=U;else sa=U-(f[F>>2]|0)|0;f[l>>2]=sa;U=f[G>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))ta=(f[F>>2]|0)+U|0;else ta=U;else ta=U-(f[F>>2]|0)|0;f[G>>2]=ta;if((((ra|0)>-1?ra:0-ra|0)+((qa|0)>-1?qa:0-qa|0)|0)<(((sa|0)>-1?sa:0-sa|0)+((ta|0)>-1?ta:0-ta|0)|0)){Vi(g,0);ua=k}else{Vi(g,1);ua=l}U=f[ua>>2]|0;if((U|0)<0)va=(f[F>>2]|0)+U|0;else va=U;U=c+(N<<2)|0;f[U>>2]=va;O=f[ua+4>>2]|0;if((O|0)<0)wa=(f[F>>2]|0)+O|0;else wa=O;f[U+4>>2]=wa;K=K+1|0;if((K|0)>=(r|0)){la=3;break}U=f[o>>2]|0;L=f[U>>2]|0;if((f[U+4>>2]|0)-L>>2>>>0<=K>>>0){J=U;la=4;break}}if((la|0)==3){u=e;return 1}else if((la|0)==4)mq(J);return 0}function Tb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;c=u;u=u+16|0;d=c+8|0;e=c;g=f[b>>2]|0;if((g|0)==-1){h=1;u=c;return h|0}i=(g>>>0)/3|0;j=a+24|0;if(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0){h=1;u=c;return h|0}i=a+48|0;k=f[i>>2]|0;l=a+52|0;m=f[l>>2]|0;if((m|0)==(k|0))n=k;else{o=m+(~((m+-4-k|0)>>>2)<<2)|0;f[l>>2]=o;n=o}o=a+56|0;if((n|0)==(f[o>>2]|0))Ci(i,b);else{f[n>>2]=g;f[l>>2]=n+4}n=a+4|0;g=f[n>>2]|0;k=f[b>>2]|0;m=k+1|0;do if((k|0)!=-1){p=f[g+28>>2]|0;q=f[p+((((m>>>0)%3|0|0)==0?k+-2|0:m)<<2)>>2]|0;if(!((k>>>0)%3|0)){r=q;s=k+2|0;t=p;break}else{r=q;s=k+-1|0;t=p;break}}else{p=f[g+28>>2]|0;r=f[p+-4>>2]|0;s=-1;t=p}while(0);g=f[t+(s<<2)>>2]|0;if((r|0)==-1|(g|0)==-1){h=0;u=c;return h|0}s=a+36|0;t=f[s>>2]|0;k=t+(r>>>5<<2)|0;m=1<<(r&31);p=f[k>>2]|0;if(!(p&m)){f[k>>2]=p|m;m=f[b>>2]|0;p=m+1|0;if((m|0)==-1)v=-1;else v=((p>>>0)%3|0|0)==0?m+-2|0:p;f[e>>2]=v;p=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((v>>>0)/3|0)*12|0)+(((v>>>0)%3|0)<<2)>>2]|0;v=f[a+20>>2]|0;f[d>>2]=p;m=f[v+4>>2]|0;v=m+4|0;k=f[v>>2]|0;if((k|0)==(f[m+8>>2]|0))Ci(m,d);else{f[k>>2]=p;f[v>>2]=k+4}k=a+12|0;v=f[k>>2]|0;p=v+4|0;m=f[p>>2]|0;if((m|0)==(f[v+8>>2]|0)){Ci(v,e);w=f[k>>2]|0}else{f[m>>2]=f[e>>2];f[p>>2]=m+4;w=v}v=w+24|0;f[(f[w+12>>2]|0)+(r<<2)>>2]=f[v>>2];f[v>>2]=(f[v>>2]|0)+1;x=f[s>>2]|0}else x=t;t=x+(g>>>5<<2)|0;x=1<<(g&31);v=f[t>>2]|0;if(!(v&x)){f[t>>2]=v|x;x=f[b>>2]|0;do if((x|0)!=-1)if(!((x>>>0)%3|0)){y=x+2|0;break}else{y=x+-1|0;break}else y=-1;while(0);f[e>>2]=y;x=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((y>>>0)/3|0)*12|0)+(((y>>>0)%3|0)<<2)>>2]|0;y=f[a+20>>2]|0;f[d>>2]=x;v=f[y+4>>2]|0;y=v+4|0;t=f[y>>2]|0;if((t|0)==(f[v+8>>2]|0))Ci(v,d);else{f[t>>2]=x;f[y>>2]=t+4}t=a+12|0;y=f[t>>2]|0;x=y+4|0;v=f[x>>2]|0;if((v|0)==(f[y+8>>2]|0)){Ci(y,e);z=f[t>>2]|0}else{f[v>>2]=f[e>>2];f[x>>2]=v+4;z=y}y=z+24|0;f[(f[z+12>>2]|0)+(g<<2)>>2]=f[y>>2];f[y>>2]=(f[y>>2]|0)+1}y=f[i>>2]|0;g=f[l>>2]|0;if((y|0)==(g|0)){h=1;u=c;return h|0}z=a+16|0;v=a+20|0;x=a+12|0;a=g;g=y;a:while(1){y=f[a+-4>>2]|0;f[b>>2]=y;t=(y>>>0)/3|0;if((y|0)!=-1?(y=(f[j>>2]|0)+(t>>>5<<2)|0,r=1<<(t&31),t=f[y>>2]|0,(t&r|0)==0):0){f[y>>2]=t|r;r=f[n>>2]|0;t=f[b>>2]|0;y=f[(f[r+28>>2]|0)+(t<<2)>>2]|0;if((y|0)==-1){h=0;A=79;break}else{B=y;C=r;D=t}b:while(1){t=(f[s>>2]|0)+(B>>>5<<2)|0;r=1<<(B&31);y=f[t>>2]|0;do if(!(y&r)){w=f[(f[C+40>>2]|0)+(B<<2)>>2]|0;if((w|0)==-1)E=1;else{m=f[(f[f[C+64>>2]>>2]|0)+(w<<2)>>2]|0;E=(1<<(m&31)&f[(f[C+12>>2]|0)+(m>>>5<<2)>>2]|0)!=0}f[t>>2]=y|r;m=f[b>>2]|0;f[e>>2]=m;w=f[(f[(f[z>>2]|0)+96>>2]|0)+(((m>>>0)/3|0)*12|0)+(((m>>>0)%3|0)<<2)>>2]|0;m=f[v>>2]|0;f[d>>2]=w;p=f[m+4>>2]|0;m=p+4|0;k=f[m>>2]|0;if((k|0)==(f[p+8>>2]|0))Ci(p,d);else{f[k>>2]=w;f[m>>2]=k+4}k=f[x>>2]|0;m=k+4|0;w=f[m>>2]|0;if((w|0)==(f[k+8>>2]|0)){Ci(k,e);F=f[x>>2]|0}else{f[w>>2]=f[e>>2];f[m>>2]=w+4;F=k}k=F+24|0;f[(f[F+12>>2]|0)+(B<<2)>>2]=f[k>>2];f[k>>2]=(f[k>>2]|0)+1;k=f[n>>2]|0;w=f[b>>2]|0;if(E){G=w;H=k;A=59;break}m=w+1|0;do if((w|0)==-1)I=-1;else{p=((m>>>0)%3|0|0)==0?w+-2|0:m;if((p|0)==-1){I=-1;break}if(f[(f[k>>2]|0)+(p>>>5<<2)>>2]&1<<(p&31)|0){I=-1;break}I=f[(f[(f[k+64>>2]|0)+12>>2]|0)+(p<<2)>>2]|0}while(0);f[b>>2]=I;J=(I>>>0)/3|0;K=k}else{G=D;H=C;A=59}while(0);if((A|0)==59){A=0;r=G+1|0;if((G|0)==-1){A=60;break}y=((r>>>0)%3|0|0)==0?G+-2|0:r;do if((y|0)==-1)L=-1;else{if(f[(f[H>>2]|0)+(y>>>5<<2)>>2]&1<<(y&31)|0){L=-1;break}L=f[(f[(f[H+64>>2]|0)+12>>2]|0)+(y<<2)>>2]|0}while(0);f[d>>2]=L;y=(((G>>>0)%3|0|0)==0?2:-1)+G|0;do if((y|0)==-1)M=-1;else{if(f[(f[H>>2]|0)+(y>>>5<<2)>>2]&1<<(y&31)|0){M=-1;break}M=f[(f[(f[H+64>>2]|0)+12>>2]|0)+(y<<2)>>2]|0}while(0);y=(L|0)==-1;r=(L>>>0)/3|0;t=y?-1:r;m=(M|0)==-1;w=(M>>>0)/3|0;p=m?-1:w;do if(!y){q=f[j>>2]|0;if(f[q+(t>>>5<<2)>>2]&1<<(t&31)|0){A=69;break}if(m){N=L;O=r;break}if(!(f[q+(p>>>5<<2)>>2]&1<<(p&31))){A=74;break b}else{N=L;O=r}}else A=69;while(0);if((A|0)==69){A=0;if(m){A=71;break}if(!(f[(f[j>>2]|0)+(p>>>5<<2)>>2]&1<<(p&31))){N=M;O=w}else{A=71;break}}f[b>>2]=N;J=O;K=H}r=(f[j>>2]|0)+(J>>>5<<2)|0;f[r>>2]=f[r>>2]|1<<(J&31);D=f[b>>2]|0;B=f[(f[K+28>>2]|0)+(D<<2)>>2]|0;if((B|0)==-1){h=0;A=79;break a}else C=K}do if((A|0)==60){A=0;f[d>>2]=-1;A=71}else if((A|0)==74){A=0;r=f[l>>2]|0;f[r+-4>>2]=M;if((r|0)==(f[o>>2]|0)){Ci(i,d);P=f[l>>2]|0;break}else{f[r>>2]=f[d>>2];t=r+4|0;f[l>>2]=t;P=t;break}}while(0);if((A|0)==71){A=0;t=(f[l>>2]|0)+-4|0;f[l>>2]=t;P=t}Q=f[i>>2]|0;R=P}else{t=a+-4|0;f[l>>2]=t;Q=g;R=t}if((Q|0)==(R|0)){h=1;A=79;break}else{a=R;g=Q}}if((A|0)==79){u=c;return h|0}return 0}function Ub(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=Oa,V=Oa,Y=Oa,Z=0,_=0,aa=0,ba=0;d=u;u=u+16|0;e=d;g=a+16|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;n[g>>2]=$(1.0);i=a+20|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[a+36>>2]=$(1.0);j=f[c+8>>2]|0;a:do if(j|0){k=a+4|0;l=a+12|0;m=a+8|0;o=j;p=j;while(1){q=o+8|0;r=b[q+11>>0]|0;s=r<<24>>24<0;t=s?f[q>>2]|0:q;v=s?f[o+12>>2]|0:r&255;if(v>>>0>3){r=t;s=v;w=v;while(1){x=X(h[r>>0]|h[r+1>>0]<<8|h[r+2>>0]<<16|h[r+3>>0]<<24,1540483477)|0;s=(X(x>>>24^x,1540483477)|0)^(X(s,1540483477)|0);w=w+-4|0;if(w>>>0<=3)break;else r=r+4|0}r=v+-4|0;w=r&-4;y=r-w|0;z=t+(w+4)|0;A=s}else{y=v;z=t;A=v}switch(y|0){case 3:{B=h[z+2>>0]<<16^A;C=8;break}case 2:{B=A;C=8;break}case 1:{D=A;C=9;break}default:E=A}if((C|0)==8){C=0;D=h[z+1>>0]<<8^B;C=9}if((C|0)==9){C=0;E=X(D^h[z>>0],1540483477)|0}w=X(E>>>13^E,1540483477)|0;r=w>>>15^w;w=f[k>>2]|0;x=(w|0)==0;b:do if(!x){F=w+-1|0;G=(F&w|0)==0;if(!G)if(r>>>0>>0)H=r;else H=(r>>>0)%(w>>>0)|0;else H=r&F;I=f[(f[a>>2]|0)+(H<<2)>>2]|0;if((I|0)!=0?(J=f[I>>2]|0,(J|0)!=0):0){I=(v|0)==0;if(G){if(I){G=J;while(1){K=f[G+4>>2]|0;if(!((K|0)==(r|0)|(K&F|0)==(H|0))){L=H;C=50;break b}K=b[G+8+11>>0]|0;if(!((K<<24>>24<0?f[G+12>>2]|0:K&255)|0))break b;G=f[G>>2]|0;if(!G){L=H;C=50;break b}}}else M=J;while(1){G=f[M+4>>2]|0;if(!((G|0)==(r|0)|(G&F|0)==(H|0))){L=H;C=50;break b}G=M+8|0;K=b[G+11>>0]|0;N=K<<24>>24<0;O=K&255;do if(((N?f[M+12>>2]|0:O)|0)==(v|0)){K=f[G>>2]|0;if(N)if(!(Pk(K,t,v)|0))break b;else break;if((b[t>>0]|0)==(K&255)<<24>>24){K=G;P=O;Q=t;do{P=P+-1|0;K=K+1|0;if(!P)break b;Q=Q+1|0}while((b[K>>0]|0)==(b[Q>>0]|0))}}while(0);M=f[M>>2]|0;if(!M){L=H;C=50;break b}}}if(I){F=J;while(1){O=f[F+4>>2]|0;if((O|0)!=(r|0)){if(O>>>0>>0)R=O;else R=(O>>>0)%(w>>>0)|0;if((R|0)!=(H|0)){L=H;C=50;break b}}O=b[F+8+11>>0]|0;if(!((O<<24>>24<0?f[F+12>>2]|0:O&255)|0))break b;F=f[F>>2]|0;if(!F){L=H;C=50;break b}}}else S=J;while(1){F=f[S+4>>2]|0;if((F|0)!=(r|0)){if(F>>>0>>0)T=F;else T=(F>>>0)%(w>>>0)|0;if((T|0)!=(H|0)){L=H;C=50;break b}}F=S+8|0;I=b[F+11>>0]|0;O=I<<24>>24<0;G=I&255;do if(((O?f[S+12>>2]|0:G)|0)==(v|0)){I=f[F>>2]|0;if(O)if(!(Pk(I,t,v)|0))break b;else break;if((b[t>>0]|0)==(I&255)<<24>>24){I=F;N=G;Q=t;do{N=N+-1|0;I=I+1|0;if(!N)break b;Q=Q+1|0}while((b[I>>0]|0)==(b[Q>>0]|0))}}while(0);S=f[S>>2]|0;if(!S){L=H;C=50;break}}}else{L=H;C=50}}else{L=0;C=50}while(0);if((C|0)==50){C=0;pi(e,a,r,q);U=$(((f[l>>2]|0)+1|0)>>>0);V=$(w>>>0);Y=$(n[g>>2]);do if(x|$(Y*V)>>0<3|(w+-1&w|0)!=0)&1;v=~~$(W($(U/Y)))>>>0;Ph(a,t>>>0>>0?v:t);t=f[k>>2]|0;v=t+-1|0;if(!(v&t)){Z=t;_=v&r;break}if(r>>>0>>0){Z=t;_=r}else{Z=t;_=(r>>>0)%(t>>>0)|0}}else{Z=w;_=L}while(0);w=f[(f[a>>2]|0)+(_<<2)>>2]|0;if(!w){f[f[e>>2]>>2]=f[m>>2];f[m>>2]=f[e>>2];f[(f[a>>2]|0)+(_<<2)>>2]=m;r=f[e>>2]|0;x=f[r>>2]|0;if(x|0){q=f[x+4>>2]|0;x=Z+-1|0;if(x&Z)if(q>>>0>>0)aa=q;else aa=(q>>>0)%(Z>>>0)|0;else aa=q&x;f[(f[a>>2]|0)+(aa<<2)>>2]=r}}else{f[f[e>>2]>>2]=f[w>>2];f[w>>2]=f[e>>2]}f[l>>2]=(f[l>>2]|0)+1}w=f[p>>2]|0;if(!w)break a;else{o=w;p=w}}}while(0);e=f[c+28>>2]|0;if(!e){u=d;return}else ba=e;do{e=ba;c=dn(40)|0;Ub(c,f[e+20>>2]|0);aa=xc(i,e+8|0)|0;e=f[aa>>2]|0;f[aa>>2]=c;if(e|0){c=f[e+28>>2]|0;if(c|0){aa=c;do{c=aa;aa=f[aa>>2]|0;bi(c+8|0);br(c)}while((aa|0)!=0)}aa=e+20|0;c=f[aa>>2]|0;f[aa>>2]=0;if(c|0)br(c);c=f[e+8>>2]|0;if(c|0){aa=c;do{c=aa;aa=f[aa>>2]|0;a=c+8|0;Z=f[c+20>>2]|0;if(Z|0){_=c+24|0;if((f[_>>2]|0)!=(Z|0))f[_>>2]=Z;br(Z)}if((b[a+11>>0]|0)<0)br(f[a>>2]|0);br(c)}while((aa|0)!=0)}aa=f[e>>2]|0;f[e>>2]=0;if(aa|0)br(aa);br(e)}ba=f[ba>>2]|0}while((ba|0)!=0);u=d;return}function Vb(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=Oa,fa=Oa,ga=Oa,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0;g=u;u=u+48|0;i=g+16|0;j=g+12|0;k=g;l=i+16|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[l>>2]=$(1.0);m=a+80|0;o=f[m>>2]|0;f[k>>2]=0;p=k+4|0;f[p>>2]=0;f[k+8>>2]=0;if(o){if(o>>>0>1073741823)mq(k);q=o<<2;r=dn(q)|0;f[k>>2]=r;s=r+(o<<2)|0;f[k+8>>2]=s;hj(r|0,0,q|0)|0;f[p>>2]=s;s=c+48|0;q=c+40|0;o=i+4|0;t=i+12|0;v=i+8|0;w=a+40|0;x=a+64|0;y=f[e>>2]|0;e=r;z=0;A=0;B=r;C=r;D=0;E=r;while(1){r=s;F=f[r>>2]|0;G=f[r+4>>2]|0;r=q;H=on(f[r>>2]|0,f[r+4>>2]|0,y+z|0,0)|0;r=Tn(H|0,I|0,F|0,G|0)|0;G=(f[f[c>>2]>>2]|0)+r|0;r=h[G>>0]|h[G+1>>0]<<8|h[G+2>>0]<<16|h[G+3>>0]<<24;f[j>>2]=r;G=r&65535;F=r>>>16;H=F&65535;J=(r&65535^318)+239^F;F=(D|0)==0;a:do if(!F){K=D+-1|0;L=(K&D|0)==0;if(!L)if(J>>>0>>0)M=J;else M=(J>>>0)%(D>>>0)|0;else M=J&K;N=f[(f[i>>2]|0)+(M<<2)>>2]|0;do if(N|0?(O=f[N>>2]|0,O|0):0){b:do if(L){P=O;while(1){Q=f[P+4>>2]|0;R=(Q|0)==(J|0);if(!(R|(Q&K|0)==(M|0))){S=27;break b}if((R?(R=P+8|0,(d[R>>1]|0)==G<<16>>16):0)?(d[R+2>>1]|0)==H<<16>>16:0){T=P;S=26;break b}P=f[P>>2]|0;if(!P){S=27;break}}}else{P=O;while(1){R=f[P+4>>2]|0;if((R|0)==(J|0)){Q=P+8|0;if((d[Q>>1]|0)==G<<16>>16?(d[Q+2>>1]|0)==H<<16>>16:0){T=P;S=26;break b}}else{if(R>>>0>>0)U=R;else U=(R>>>0)%(D>>>0)|0;if((U|0)!=(M|0)){S=27;break b}}P=f[P>>2]|0;if(!P){S=27;break}}}while(0);if((S|0)==26){S=0;f[E+(z<<2)>>2]=f[T+12>>2];V=e;X=A;Y=C;Z=B;_=E;break a}else if((S|0)==27){S=0;if(F){aa=0;S=46;break a}else break}}while(0);K=D+-1|0;L=(K&D|0)==0;if(!L)if(J>>>0>>0)ba=J;else ba=(J>>>0)%(D>>>0)|0;else ba=K&J;N=f[(f[i>>2]|0)+(ba<<2)>>2]|0;if((N|0)!=0?(O=f[N>>2]|0,(O|0)!=0):0){if(L){L=O;while(1){N=f[L+4>>2]|0;if(!((N|0)==(J|0)|(N&K|0)==(ba|0))){aa=ba;S=46;break a}N=L+8|0;if((d[N>>1]|0)==G<<16>>16?(d[N+2>>1]|0)==H<<16>>16:0){S=61;break a}L=f[L>>2]|0;if(!L){aa=ba;S=46;break a}}}else ca=O;while(1){L=f[ca+4>>2]|0;if((L|0)!=(J|0)){if(L>>>0>>0)da=L;else da=(L>>>0)%(D>>>0)|0;if((da|0)!=(ba|0)){aa=ba;S=46;break a}}L=ca+8|0;if((d[L>>1]|0)==G<<16>>16?(d[L+2>>1]|0)==H<<16>>16:0){S=61;break a}ca=f[ca>>2]|0;if(!ca){aa=ba;S=46;break}}}else{aa=ba;S=46}}else{aa=0;S=46}while(0);if((S|0)==46){S=0;H=dn(16)|0;G=H+8|0;d[G>>1]=r;d[G+2>>1]=r>>>16;f[H+12>>2]=A;f[H+4>>2]=J;f[H>>2]=0;ea=$(((f[t>>2]|0)+1|0)>>>0);fa=$(D>>>0);ga=$(n[l>>2]);do if(F|$(ga*fa)>>0<3|(D+-1&D|0)!=0)&1;O=~~$(W($(ea/ga)))>>>0;Eh(i,G>>>0>>0?O:G);G=f[o>>2]|0;O=G+-1|0;if(!(O&G)){ha=G;ia=O&J;break}if(J>>>0>>0){ha=G;ia=J}else{ha=G;ia=(J>>>0)%(G>>>0)|0}}else{ha=D;ia=aa}while(0);J=(f[i>>2]|0)+(ia<<2)|0;F=f[J>>2]|0;if(!F){f[H>>2]=f[v>>2];f[v>>2]=H;f[J>>2]=v;J=f[H>>2]|0;if(J|0){r=f[J+4>>2]|0;J=ha+-1|0;if(J&ha)if(r>>>0>>0)ja=r;else ja=(r>>>0)%(ha>>>0)|0;else ja=r&J;ka=(f[i>>2]|0)+(ja<<2)|0;S=59}}else{f[H>>2]=f[F>>2];ka=F;S=59}if((S|0)==59){S=0;f[ka>>2]=H}f[t>>2]=(f[t>>2]|0)+1;S=61}if((S|0)==61){S=0;F=w;J=f[F>>2]|0;r=on(J|0,f[F+4>>2]|0,A|0,0)|0;Rg((f[f[x>>2]>>2]|0)+r|0,j|0,J|0)|0;J=f[k>>2]|0;f[J+(z<<2)>>2]=A;V=J;X=A+1|0;Y=J;Z=J;_=J}J=z+1|0;la=f[m>>2]|0;if(J>>>0>=la>>>0)break;e=V;z=J;A=X;B=Z;C=Y;D=f[o>>2]|0;E=_}if((X|0)==(la|0))ma=Z;else{Z=a+84|0;if(!(b[Z>>0]|0)){_=f[a+72>>2]|0;E=f[a+68>>2]|0;o=E;if((_|0)==(E|0))na=V;else{D=_-E>>2;E=0;do{_=o+(E<<2)|0;f[_>>2]=f[Y+(f[_>>2]<<2)>>2];E=E+1|0}while(E>>>0>>0);na=V}}else{b[Z>>0]=0;Z=a+68|0;V=a+72|0;D=f[V>>2]|0;E=f[Z>>2]|0;Y=D-E>>2;o=E;E=D;if(la>>>0<=Y>>>0)if(la>>>0>>0?(D=o+(la<<2)|0,(D|0)!=(E|0)):0){f[V>>2]=E+(~((E+-4-D|0)>>>2)<<2);oa=la}else oa=la;else{kh(Z,la-Y|0,1204);oa=f[m>>2]|0}Y=f[k>>2]|0;if(!oa)na=Y;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[Y+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);na=Y}}f[m>>2]=X;ma=na}if(!ma)pa=X;else{na=f[p>>2]|0;if((na|0)!=(ma|0))f[p>>2]=na+(~((na+-4-ma|0)>>>2)<<2);br(ma);pa=X}}else pa=0;X=f[i+8>>2]|0;if(X|0){ma=X;do{X=ma;ma=f[ma>>2]|0;br(X)}while((ma|0)!=0)}ma=f[i>>2]|0;f[i>>2]=0;if(!ma){u=g;return pa|0}br(ma);u=g;return pa|0}function Wb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;c=u;u=u+16|0;d=c+8|0;e=c;g=f[b>>2]|0;if((g|0)==-1){h=1;u=c;return h|0}i=(g>>>0)/3|0;j=a+24|0;if(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0){h=1;u=c;return h|0}i=a+48|0;k=f[i>>2]|0;l=a+52|0;m=f[l>>2]|0;if((m|0)==(k|0))n=k;else{o=m+(~((m+-4-k|0)>>>2)<<2)|0;f[l>>2]=o;n=o}o=a+56|0;if((n|0)==(f[o>>2]|0))Ci(i,b);else{f[n>>2]=g;f[l>>2]=n+4}n=a+4|0;g=f[n>>2]|0;k=f[b>>2]|0;m=k+1|0;if((k|0)==-1){h=0;u=c;return h|0}p=((m>>>0)%3|0|0)==0?k+-2|0:m;if((p|0)==-1)q=-1;else q=f[(f[g>>2]|0)+(p<<2)>>2]|0;p=(((k>>>0)%3|0|0)==0?2:-1)+k|0;if((p|0)==-1){h=0;u=c;return h|0}k=f[(f[g>>2]|0)+(p<<2)>>2]|0;if((q|0)==-1|(k|0)==-1){h=0;u=c;return h|0}p=a+36|0;g=f[p>>2]|0;m=g+(q>>>5<<2)|0;r=1<<(q&31);s=f[m>>2]|0;if(!(s&r)){f[m>>2]=s|r;r=f[b>>2]|0;s=r+1|0;if((r|0)==-1)t=-1;else t=((s>>>0)%3|0|0)==0?r+-2|0:s;f[e>>2]=t;s=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((t>>>0)/3|0)*12|0)+(((t>>>0)%3|0)<<2)>>2]|0;t=f[a+20>>2]|0;f[d>>2]=s;r=f[t+4>>2]|0;t=r+4|0;m=f[t>>2]|0;if((m|0)==(f[r+8>>2]|0))Ci(r,d);else{f[m>>2]=s;f[t>>2]=m+4}m=a+12|0;t=f[m>>2]|0;s=t+4|0;r=f[s>>2]|0;if((r|0)==(f[t+8>>2]|0)){Ci(t,e);v=f[m>>2]|0}else{f[r>>2]=f[e>>2];f[s>>2]=r+4;v=t}t=v+24|0;f[(f[v+12>>2]|0)+(q<<2)>>2]=f[t>>2];f[t>>2]=(f[t>>2]|0)+1;w=f[p>>2]|0}else w=g;g=w+(k>>>5<<2)|0;w=1<<(k&31);t=f[g>>2]|0;if(!(t&w)){f[g>>2]=t|w;w=f[b>>2]|0;do if((w|0)!=-1)if(!((w>>>0)%3|0)){x=w+2|0;break}else{x=w+-1|0;break}else x=-1;while(0);f[e>>2]=x;w=f[(f[(f[a+16>>2]|0)+96>>2]|0)+(((x>>>0)/3|0)*12|0)+(((x>>>0)%3|0)<<2)>>2]|0;x=f[a+20>>2]|0;f[d>>2]=w;t=f[x+4>>2]|0;x=t+4|0;g=f[x>>2]|0;if((g|0)==(f[t+8>>2]|0))Ci(t,d);else{f[g>>2]=w;f[x>>2]=g+4}g=a+12|0;x=f[g>>2]|0;w=x+4|0;t=f[w>>2]|0;if((t|0)==(f[x+8>>2]|0)){Ci(x,e);y=f[g>>2]|0}else{f[t>>2]=f[e>>2];f[w>>2]=t+4;y=x}x=y+24|0;f[(f[y+12>>2]|0)+(k<<2)>>2]=f[x>>2];f[x>>2]=(f[x>>2]|0)+1}x=f[i>>2]|0;k=f[l>>2]|0;if((x|0)==(k|0)){h=1;u=c;return h|0}y=a+16|0;t=a+20|0;w=a+12|0;a=k;k=x;a:while(1){x=f[a+-4>>2]|0;f[b>>2]=x;g=(x>>>0)/3|0;if((x|0)!=-1?(x=(f[j>>2]|0)+(g>>>5<<2)|0,q=1<<(g&31),g=f[x>>2]|0,(g&q|0)==0):0){f[x>>2]=g|q;q=f[b>>2]|0;if((q|0)==-1){h=0;z=80;break}g=f[n>>2]|0;x=q;b:while(1){q=f[(f[g>>2]|0)+(x<<2)>>2]|0;if((q|0)==-1){h=0;z=80;break a}v=(f[p>>2]|0)+(q>>>5<<2)|0;r=1<<(q&31);s=f[v>>2]|0;do if(!(s&r)){m=f[(f[g+24>>2]|0)+(q<<2)>>2]|0;A=m+1|0;do if((m|0)==-1)B=1;else{C=((A>>>0)%3|0|0)==0?m+-2|0:A;if((C|0)==-1){B=1;break}D=f[(f[g+12>>2]|0)+(C<<2)>>2]|0;C=D+1|0;if((D|0)==-1){B=1;break}B=((((C>>>0)%3|0|0)==0?D+-2|0:C)|0)==-1}while(0);f[v>>2]=s|r;A=f[b>>2]|0;f[e>>2]=A;m=f[(f[(f[y>>2]|0)+96>>2]|0)+(((A>>>0)/3|0)*12|0)+(((A>>>0)%3|0)<<2)>>2]|0;A=f[t>>2]|0;f[d>>2]=m;C=f[A+4>>2]|0;A=C+4|0;D=f[A>>2]|0;if((D|0)==(f[C+8>>2]|0))Ci(C,d);else{f[D>>2]=m;f[A>>2]=D+4}D=f[w>>2]|0;A=D+4|0;m=f[A>>2]|0;if((m|0)==(f[D+8>>2]|0)){Ci(D,e);E=f[w>>2]|0}else{f[m>>2]=f[e>>2];f[A>>2]=m+4;E=D}D=E+24|0;f[(f[E+12>>2]|0)+(q<<2)>>2]=f[D>>2];f[D>>2]=(f[D>>2]|0)+1;D=f[n>>2]|0;m=f[b>>2]|0;if(B)if((m|0)==-1){z=63;break b}else{F=m;G=D;z=64;break}do if((m|0)==-1)H=-1;else{A=m+1|0;C=((A>>>0)%3|0|0)==0?m+-2|0:A;if((C|0)==-1){H=-1;break}H=f[(f[D+12>>2]|0)+(C<<2)>>2]|0}while(0);f[b>>2]=H;I=(H>>>0)/3|0;J=D}else{F=x;G=g;z=64}while(0);if((z|0)==64){z=0;q=F+1|0;r=((q>>>0)%3|0|0)==0?F+-2|0:q;if((r|0)==-1)K=-1;else K=f[(f[G+12>>2]|0)+(r<<2)>>2]|0;f[d>>2]=K;r=(((F>>>0)%3|0|0)==0?2:-1)+F|0;if((r|0)==-1)L=-1;else L=f[(f[G+12>>2]|0)+(r<<2)>>2]|0;r=(K|0)==-1;q=(K>>>0)/3|0;s=r?-1:q;v=(L|0)==-1;m=(L>>>0)/3|0;C=v?-1:m;do if(!r){A=f[j>>2]|0;if(f[A+(s>>>5<<2)>>2]&1<<(s&31)|0){z=70;break}if(v){M=K;N=q;break}if(!(f[A+(C>>>5<<2)>>2]&1<<(C&31))){z=75;break b}else{M=K;N=q}}else z=70;while(0);if((z|0)==70){z=0;if(v){z=72;break}if(!(f[(f[j>>2]|0)+(C>>>5<<2)>>2]&1<<(C&31))){M=L;N=m}else{z=72;break}}f[b>>2]=M;I=N;J=G}q=(f[j>>2]|0)+(I>>>5<<2)|0;f[q>>2]=f[q>>2]|1<<(I&31);x=f[b>>2]|0;if((x|0)==-1){h=0;z=80;break a}else g=J}do if((z|0)==63){z=0;f[d>>2]=-1;z=72}else if((z|0)==75){z=0;g=f[l>>2]|0;f[g+-4>>2]=L;if((g|0)==(f[o>>2]|0)){Ci(i,d);O=f[l>>2]|0;break}else{f[g>>2]=f[d>>2];x=g+4|0;f[l>>2]=x;O=x;break}}while(0);if((z|0)==72){z=0;x=(f[l>>2]|0)+-4|0;f[l>>2]=x;O=x}P=f[i>>2]|0;Q=O}else{x=a+-4|0;f[l>>2]=x;P=k;Q=x}if((P|0)==(Q|0)){h=1;z=80;break}else{a=Q;k=P}}if((z|0)==80){u=c;return h|0}return 0}function Xb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=Oa,da=Oa,ea=Oa,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0;e=u;u=u+48|0;g=e+20|0;i=e;j=e+8|0;k=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[k>>2]=$(1.0);l=a+80|0;m=f[l>>2]|0;f[j>>2]=0;o=j+4|0;f[o>>2]=0;f[j+8>>2]=0;if(m){if(m>>>0>1073741823)mq(j);p=m<<2;q=dn(p)|0;f[j>>2]=q;r=q+(m<<2)|0;f[j+8>>2]=r;hj(q|0,0,p|0)|0;f[o>>2]=r;r=c+48|0;p=c+40|0;m=g+4|0;s=g+12|0;t=g+8|0;v=a+40|0;w=a+64|0;x=f[d>>2]|0;d=q;y=0;z=0;A=q;B=q;C=q;q=0;while(1){D=r;E=f[D>>2]|0;F=f[D+4>>2]|0;D=p;G=on(f[D>>2]|0,f[D+4>>2]|0,x+y|0,0)|0;D=Tn(G|0,I|0,E|0,F|0)|0;F=(f[f[c>>2]>>2]|0)+D|0;D=F;E=h[D>>0]|h[D+1>>0]<<8|h[D+2>>0]<<16|h[D+3>>0]<<24;D=F+4|0;F=h[D>>0]|h[D+1>>0]<<8|h[D+2>>0]<<16|h[D+3>>0]<<24;D=i;f[D>>2]=E;f[D+4>>2]=F;D=(E^318)+239^F;G=(q|0)==0;a:do if(!G){H=q+-1|0;J=(H&q|0)==0;if(!J)if(D>>>0>>0)K=D;else K=(D>>>0)%(q>>>0)|0;else K=D&H;L=f[(f[g>>2]|0)+(K<<2)>>2]|0;do if(L|0?(M=f[L>>2]|0,M|0):0){b:do if(J){N=M;while(1){O=f[N+4>>2]|0;P=(O|0)==(D|0);if(!(P|(O&H|0)==(K|0))){Q=27;break b}if((P?(f[N+8>>2]|0)==(E|0):0)?(f[N+12>>2]|0)==(F|0):0){R=N;Q=26;break b}N=f[N>>2]|0;if(!N){Q=27;break}}}else{N=M;while(1){P=f[N+4>>2]|0;if((P|0)==(D|0)){if((f[N+8>>2]|0)==(E|0)?(f[N+12>>2]|0)==(F|0):0){R=N;Q=26;break b}}else{if(P>>>0>>0)S=P;else S=(P>>>0)%(q>>>0)|0;if((S|0)!=(K|0)){Q=27;break b}}N=f[N>>2]|0;if(!N){Q=27;break}}}while(0);if((Q|0)==26){Q=0;f[A+(y<<2)>>2]=f[R+16>>2];T=d;U=z;V=C;X=B;Y=A;break a}else if((Q|0)==27){Q=0;if(G){Z=0;Q=46;break a}else break}}while(0);H=q+-1|0;J=(H&q|0)==0;if(!J)if(D>>>0>>0)_=D;else _=(D>>>0)%(q>>>0)|0;else _=H&D;L=f[(f[g>>2]|0)+(_<<2)>>2]|0;if((L|0)!=0?(M=f[L>>2]|0,(M|0)!=0):0){if(J){J=M;while(1){L=f[J+4>>2]|0;if(!((L|0)==(D|0)|(L&H|0)==(_|0))){Z=_;Q=46;break a}if((f[J+8>>2]|0)==(E|0)?(f[J+12>>2]|0)==(F|0):0){Q=61;break a}J=f[J>>2]|0;if(!J){Z=_;Q=46;break a}}}else aa=M;while(1){J=f[aa+4>>2]|0;if((J|0)!=(D|0)){if(J>>>0>>0)ba=J;else ba=(J>>>0)%(q>>>0)|0;if((ba|0)!=(_|0)){Z=_;Q=46;break a}}if((f[aa+8>>2]|0)==(E|0)?(f[aa+12>>2]|0)==(F|0):0){Q=61;break a}aa=f[aa>>2]|0;if(!aa){Z=_;Q=46;break}}}else{Z=_;Q=46}}else{Z=0;Q=46}while(0);if((Q|0)==46){Q=0;M=dn(20)|0;J=M+8|0;f[J>>2]=E;f[J+4>>2]=F;f[M+16>>2]=z;f[M+4>>2]=D;f[M>>2]=0;ca=$(((f[s>>2]|0)+1|0)>>>0);da=$(q>>>0);ea=$(n[k>>2]);do if(G|$(ea*da)>>0<3|(q+-1&q|0)!=0)&1;H=~~$(W($(ca/ea)))>>>0;Ih(g,J>>>0>>0?H:J);J=f[m>>2]|0;H=J+-1|0;if(!(H&J)){fa=J;ga=H&D;break}if(D>>>0>>0){fa=J;ga=D}else{fa=J;ga=(D>>>0)%(J>>>0)|0}}else{fa=q;ga=Z}while(0);D=(f[g>>2]|0)+(ga<<2)|0;G=f[D>>2]|0;if(!G){f[M>>2]=f[t>>2];f[t>>2]=M;f[D>>2]=t;D=f[M>>2]|0;if(D|0){F=f[D+4>>2]|0;D=fa+-1|0;if(D&fa)if(F>>>0>>0)ha=F;else ha=(F>>>0)%(fa>>>0)|0;else ha=F&D;ia=(f[g>>2]|0)+(ha<<2)|0;Q=59}}else{f[M>>2]=f[G>>2];ia=G;Q=59}if((Q|0)==59){Q=0;f[ia>>2]=M}f[s>>2]=(f[s>>2]|0)+1;Q=61}if((Q|0)==61){Q=0;G=v;D=f[G>>2]|0;F=on(D|0,f[G+4>>2]|0,z|0,0)|0;Rg((f[f[w>>2]>>2]|0)+F|0,i|0,D|0)|0;D=f[j>>2]|0;f[D+(y<<2)>>2]=z;T=D;U=z+1|0;V=D;X=D;Y=D}D=y+1|0;ja=f[l>>2]|0;if(D>>>0>=ja>>>0)break;d=T;y=D;z=U;A=Y;B=X;C=V;q=f[m>>2]|0}if((U|0)==(ja|0))ka=X;else{X=a+84|0;if(!(b[X>>0]|0)){m=f[a+72>>2]|0;q=f[a+68>>2]|0;C=q;if((m|0)==(q|0))la=T;else{B=m-q>>2;q=0;do{m=C+(q<<2)|0;f[m>>2]=f[V+(f[m>>2]<<2)>>2];q=q+1|0}while(q>>>0>>0);la=T}}else{b[X>>0]=0;X=a+68|0;T=a+72|0;B=f[T>>2]|0;q=f[X>>2]|0;V=B-q>>2;C=q;q=B;if(ja>>>0<=V>>>0)if(ja>>>0>>0?(B=C+(ja<<2)|0,(B|0)!=(q|0)):0){f[T>>2]=q+(~((q+-4-B|0)>>>2)<<2);ma=ja}else ma=ja;else{kh(X,ja-V|0,1204);ma=f[l>>2]|0}V=f[j>>2]|0;if(!ma)la=V;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[V+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);la=V}}f[l>>2]=U;ka=la}if(!ka)na=U;else{la=f[o>>2]|0;if((la|0)!=(ka|0))f[o>>2]=la+(~((la+-4-ka|0)>>>2)<<2);br(ka);na=U}}else na=0;U=f[g+8>>2]|0;if(U|0){ka=U;do{U=ka;ka=f[ka>>2]|0;br(U)}while((ka|0)!=0)}ka=f[g>>2]|0;f[g>>2]=0;if(!ka){u=e;return na|0}br(ka);u=e;return na|0}function Yb(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=Oa,fa=Oa,ga=Oa,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0;g=u;u=u+48|0;i=g+12|0;j=g+32|0;k=g;l=i+16|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[l>>2]=$(1.0);m=a+80|0;o=f[m>>2]|0;f[k>>2]=0;p=k+4|0;f[p>>2]=0;f[k+8>>2]=0;if(o){if(o>>>0>1073741823)mq(k);q=o<<2;r=dn(q)|0;f[k>>2]=r;s=r+(o<<2)|0;f[k+8>>2]=s;hj(r|0,0,q|0)|0;f[p>>2]=s;s=c+48|0;q=c+40|0;o=i+4|0;t=i+12|0;v=i+8|0;w=a+40|0;x=a+64|0;y=f[e>>2]|0;e=r;z=0;A=0;B=r;C=r;D=0;E=r;while(1){r=s;F=f[r>>2]|0;G=f[r+4>>2]|0;r=q;H=on(f[r>>2]|0,f[r+4>>2]|0,y+z|0,0)|0;r=Tn(H|0,I|0,F|0,G|0)|0;G=(f[f[c>>2]>>2]|0)+r|0;r=h[G>>0]|h[G+1>>0]<<8;d[j>>1]=r;G=r&255;F=(r&65535)>>>8;H=F&255;J=((r&255^318)+239<<16>>16^F)&65535;F=(D|0)==0;a:do if(!F){K=D+-1|0;L=(K&D|0)==0;if(!L)if(D>>>0>J>>>0)M=J;else M=(J>>>0)%(D>>>0)|0;else M=K&J;N=f[(f[i>>2]|0)+(M<<2)>>2]|0;do if(N|0?(O=f[N>>2]|0,O|0):0){b:do if(L){P=O;while(1){Q=f[P+4>>2]|0;R=(Q|0)==(J|0);if(!(R|(Q&K|0)==(M|0))){S=27;break b}if((R?(R=P+8|0,(b[R>>0]|0)==G<<24>>24):0)?(b[R+1>>0]|0)==H<<24>>24:0){T=P;S=26;break b}P=f[P>>2]|0;if(!P){S=27;break}}}else{P=O;while(1){R=f[P+4>>2]|0;if((R|0)==(J|0)){Q=P+8|0;if((b[Q>>0]|0)==G<<24>>24?(b[Q+1>>0]|0)==H<<24>>24:0){T=P;S=26;break b}}else{if(R>>>0>>0)U=R;else U=(R>>>0)%(D>>>0)|0;if((U|0)!=(M|0)){S=27;break b}}P=f[P>>2]|0;if(!P){S=27;break}}}while(0);if((S|0)==26){S=0;f[E+(z<<2)>>2]=f[T+12>>2];V=e;X=A;Y=C;Z=B;_=E;break a}else if((S|0)==27){S=0;if(F){aa=0;S=46;break a}else break}}while(0);K=D+-1|0;L=(K&D|0)==0;if(!L)if(D>>>0>J>>>0)ba=J;else ba=(J>>>0)%(D>>>0)|0;else ba=K&J;N=f[(f[i>>2]|0)+(ba<<2)>>2]|0;if((N|0)!=0?(O=f[N>>2]|0,(O|0)!=0):0){if(L){L=O;while(1){N=f[L+4>>2]|0;if(!((N|0)==(J|0)|(N&K|0)==(ba|0))){aa=ba;S=46;break a}N=L+8|0;if((b[N>>0]|0)==G<<24>>24?(b[N+1>>0]|0)==H<<24>>24:0){S=61;break a}L=f[L>>2]|0;if(!L){aa=ba;S=46;break a}}}else ca=O;while(1){L=f[ca+4>>2]|0;if((L|0)!=(J|0)){if(L>>>0>>0)da=L;else da=(L>>>0)%(D>>>0)|0;if((da|0)!=(ba|0)){aa=ba;S=46;break a}}L=ca+8|0;if((b[L>>0]|0)==G<<24>>24?(b[L+1>>0]|0)==H<<24>>24:0){S=61;break a}ca=f[ca>>2]|0;if(!ca){aa=ba;S=46;break}}}else{aa=ba;S=46}}else{aa=0;S=46}while(0);if((S|0)==46){S=0;H=dn(16)|0;G=H+8|0;b[G>>0]=r;b[G+1>>0]=r>>8;f[H+12>>2]=A;f[H+4>>2]=J;f[H>>2]=0;ea=$(((f[t>>2]|0)+1|0)>>>0);fa=$(D>>>0);ga=$(n[l>>2]);do if(F|$(ga*fa)>>0<3|(D+-1&D|0)!=0)&1;O=~~$(W($(ea/ga)))>>>0;Lh(i,G>>>0>>0?O:G);G=f[o>>2]|0;O=G+-1|0;if(!(O&G)){ha=G;ia=O&J;break}if(G>>>0>J>>>0){ha=G;ia=J}else{ha=G;ia=(J>>>0)%(G>>>0)|0}}else{ha=D;ia=aa}while(0);J=(f[i>>2]|0)+(ia<<2)|0;F=f[J>>2]|0;if(!F){f[H>>2]=f[v>>2];f[v>>2]=H;f[J>>2]=v;J=f[H>>2]|0;if(J|0){r=f[J+4>>2]|0;J=ha+-1|0;if(J&ha)if(r>>>0>>0)ja=r;else ja=(r>>>0)%(ha>>>0)|0;else ja=r&J;ka=(f[i>>2]|0)+(ja<<2)|0;S=59}}else{f[H>>2]=f[F>>2];ka=F;S=59}if((S|0)==59){S=0;f[ka>>2]=H}f[t>>2]=(f[t>>2]|0)+1;S=61}if((S|0)==61){S=0;F=w;J=f[F>>2]|0;r=on(J|0,f[F+4>>2]|0,A|0,0)|0;Rg((f[f[x>>2]>>2]|0)+r|0,j|0,J|0)|0;J=f[k>>2]|0;f[J+(z<<2)>>2]=A;V=J;X=A+1|0;Y=J;Z=J;_=J}J=z+1|0;la=f[m>>2]|0;if(J>>>0>=la>>>0)break;e=V;z=J;A=X;B=Z;C=Y;D=f[o>>2]|0;E=_}if((X|0)==(la|0))ma=Z;else{Z=a+84|0;if(!(b[Z>>0]|0)){_=f[a+72>>2]|0;E=f[a+68>>2]|0;o=E;if((_|0)==(E|0))na=V;else{D=_-E>>2;E=0;do{_=o+(E<<2)|0;f[_>>2]=f[Y+(f[_>>2]<<2)>>2];E=E+1|0}while(E>>>0>>0);na=V}}else{b[Z>>0]=0;Z=a+68|0;V=a+72|0;D=f[V>>2]|0;E=f[Z>>2]|0;Y=D-E>>2;o=E;E=D;if(la>>>0<=Y>>>0)if(la>>>0>>0?(D=o+(la<<2)|0,(D|0)!=(E|0)):0){f[V>>2]=E+(~((E+-4-D|0)>>>2)<<2);oa=la}else oa=la;else{kh(Z,la-Y|0,1204);oa=f[m>>2]|0}Y=f[k>>2]|0;if(!oa)na=Y;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[Y+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);na=Y}}f[m>>2]=X;ma=na}if(!ma)pa=X;else{na=f[p>>2]|0;if((na|0)!=(ma|0))f[p>>2]=na+(~((na+-4-ma|0)>>>2)<<2);br(ma);pa=X}}else pa=0;X=f[i+8>>2]|0;if(X|0){ma=X;do{X=ma;ma=f[ma>>2]|0;br(X)}while((ma|0)!=0)}ma=f[i>>2]|0;f[i>>2]=0;if(!ma){u=g;return pa|0}br(ma);u=g;return pa|0}function Zb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0;c=u;u=u+16|0;d=c+8|0;e=c;g=c+4|0;h=a+16|0;i=f[h>>2]|0;j=a+20|0;k=f[j>>2]|0;if((k|0)==(i|0))l=i;else{m=k+(~((k+-4-i|0)>>>2)<<2)|0;f[j>>2]=m;l=m}m=a+24|0;if((l|0)==(f[m>>2]|0)){Ci(h,b);n=f[h>>2]|0;o=f[j>>2]|0}else{f[l>>2]=f[b>>2];k=l+4|0;f[j>>2]=k;n=i;o=k}k=f[a+8>>2]|0;i=(f[k+100>>2]|0)-(f[k+96>>2]|0)|0;k=(i|0)/12|0;if((n|0)==(o|0)){u=c;return 1}n=a+28|0;l=(i|0)>0;i=a+164|0;p=a+12|0;q=a+76|0;r=a+80|0;s=a+72|0;t=a+200|0;v=a+320|0;w=a+152|0;x=a+84|0;y=a+324|0;z=a+292|0;A=a+304|0;B=a+316|0;C=a+328|0;D=a+336|0;E=a+332|0;F=a+168|0;G=a+140|0;H=a+120|0;I=o;do{o=f[I+-4>>2]|0;f[b>>2]=o;a:do if((o|0)!=-1?(J=(o>>>0)/3|0,K=f[n>>2]|0,(f[K+(J>>>5<<2)>>2]&1<<(J&31)|0)==0):0){if(l){J=0;L=K;b:while(1){K=J+1|0;f[i>>2]=(f[i>>2]|0)+1;M=f[b>>2]|0;N=(M|0)==-1?-1:(M>>>0)/3|0;M=L+(N>>>5<<2)|0;f[M>>2]=1<<(N&31)|f[M>>2];M=f[q>>2]|0;if((M|0)==(f[r>>2]|0))Ci(s,b);else{f[M>>2]=f[b>>2];f[q>>2]=M+4}f[v>>2]=f[b>>2];M=f[b>>2]|0;if((M|0)==-1)O=-1;else O=f[(f[f[p>>2]>>2]|0)+(M<<2)>>2]|0;P=(f[(f[w>>2]|0)+(O<<2)>>2]|0)!=-1;Q=(f[x>>2]|0)+(O>>>5<<2)|0;R=1<<(O&31);S=f[Q>>2]|0;do if(!(S&R)){f[Q>>2]=S|R;if(P){T=f[b>>2]|0;U=38;break}f[y>>2]=(f[y>>2]|0)+1;V=f[v>>2]|0;W=V+1|0;do if((V|0)!=-1){X=((W>>>0)%3|0|0)==0?V+-2|0:W;if(!((V>>>0)%3|0)){Y=V+2|0;Z=X;break}else{Y=V+-1|0;Z=X;break}}else{Y=-1;Z=-1}while(0);V=f[z>>2]|0;W=f[A>>2]|0;X=W+(f[V+(Z<<2)>>2]<<2)|0;_=f[X>>2]|0;f[X>>2]=_+-1;X=W+(f[V+(Y<<2)>>2]<<2)|0;f[X>>2]=(f[X>>2]|0)+-1;X=f[B>>2]|0;if((X|0)!=-1){V=f[C>>2]|0;if((_|0)<(V|0))$=V;else{W=f[E>>2]|0;$=(_|0)>(W|0)?W:_}_=$-V|0;V=f[D>>2]|0;W=f[3384+(X<<2)>>2]|0;f[d>>2]=W;X=V+(_*12|0)+4|0;aa=f[X>>2]|0;if(aa>>>0<(f[V+(_*12|0)+8>>2]|0)>>>0){f[aa>>2]=W;f[X>>2]=aa+4}else Ci(V+(_*12|0)|0,d)}f[B>>2]=0;_=f[b>>2]|0;V=_+1|0;if((_|0)!=-1?(aa=((V>>>0)%3|0|0)==0?_+-2|0:V,(aa|0)!=-1):0)ba=f[(f[(f[p>>2]|0)+12>>2]|0)+(aa<<2)>>2]|0;else ba=-1;f[b>>2]=ba}else{T=M;U=38}while(0);if((U|0)==38){U=0;M=T+1|0;if((T|0)==-1){U=43;break}R=((M>>>0)%3|0|0)==0?T+-2|0:M;if((R|0)==-1)ca=-1;else ca=f[(f[(f[p>>2]|0)+12>>2]|0)+(R<<2)>>2]|0;f[e>>2]=ca;R=(((T>>>0)%3|0|0)==0?2:-1)+T|0;if((R|0)==-1)da=-1;else da=f[(f[(f[p>>2]|0)+12>>2]|0)+(R<<2)>>2]|0;R=(ca|0)==-1;S=R?-1:(ca>>>0)/3|0;ea=(da|0)==-1;fa=ea?-1:(da>>>0)/3|0;Q=((M>>>0)%3|0|0)==0?T+-2|0:M;if(((Q|0)!=-1?(M=f[(f[p>>2]|0)+12>>2]|0,aa=f[M+(Q<<2)>>2]|0,(aa|0)!=-1):0)?(Q=(aa>>>0)/3|0,aa=f[n>>2]|0,(f[aa+(Q>>>5<<2)>>2]&1<<(Q&31)|0)==0):0){Q=(((T>>>0)%3|0|0)==0?2:-1)+T|0;do if((Q|0)!=-1){V=f[M+(Q<<2)>>2]|0;if((V|0)==-1)break;_=(V>>>0)/3|0;if(!(f[aa+(_>>>5<<2)>>2]&1<<(_&31))){U=62;break b}}while(0);if(!ea)jf(a,f[i>>2]|0,N,0,fa);hd(t,3);ga=f[e>>2]|0}else{if(!R){jf(a,f[i>>2]|0,N,1,S);aa=f[b>>2]|0;if((aa|0)==-1){U=52;break}else ha=aa}else ha=T;aa=(((ha>>>0)%3|0|0)==0?2:-1)+ha|0;if((aa|0)==-1){U=52;break}Q=f[(f[(f[p>>2]|0)+12>>2]|0)+(aa<<2)>>2]|0;if((Q|0)==-1){U=52;break}aa=(Q>>>0)/3|0;if(f[(f[n>>2]|0)+(aa>>>5<<2)>>2]&1<<(aa&31)|0){U=52;break}hd(t,5);ga=da}f[b>>2]=ga}if((K|0)>=(k|0))break a;J=K;L=f[n>>2]|0}do if((U|0)==43){U=0;f[e>>2]=-1;U=54}else if((U|0)==52){U=0;if(ea)U=54;else{jf(a,f[i>>2]|0,N,0,fa);U=54}}else if((U|0)==62){U=0;hd(t,1);f[F>>2]=(f[F>>2]|0)+1;if(P?(L=f[(f[w>>2]|0)+(O<<2)>>2]|0,(1<<(L&31)&f[(f[G>>2]|0)+(L>>>5<<2)>>2]|0)==0):0){f[g>>2]=f[b>>2];f[d>>2]=f[g>>2];Ce(a,d,0)|0}L=f[i>>2]|0;f[d>>2]=N;J=Sd(H,d)|0;f[J>>2]=L;L=f[j>>2]|0;f[L+-4>>2]=da;if((L|0)==(f[m>>2]|0)){Ci(h,e);break}else{f[L>>2]=f[e>>2];f[j>>2]=L+4;break}}while(0);if((U|0)==54){U=0;hd(t,7);f[j>>2]=(f[j>>2]|0)+-4}}}else U=11;while(0);if((U|0)==11){U=0;f[j>>2]=I+-4}I=f[j>>2]|0}while((f[h>>2]|0)!=(I|0));u=c;return 1}function _b(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=Oa,K=Oa,L=Oa,M=0,N=0,O=0,P=0;e=u;u=u+64|0;g=e+40|0;i=e+16|0;j=e;k=xd(a,c)|0;if(k|0){f[i>>2]=k;f[g>>2]=f[i>>2];Xe(a,g)|0}f[j>>2]=0;k=j+4|0;f[k>>2]=0;f[j+8>>2]=0;ri(j,8);l=d;d=l;m=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;d=l+4|0;l=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;d=f[j>>2]|0;o=d;b[o>>0]=m;b[o+1>>0]=m>>8;b[o+2>>0]=m>>16;b[o+3>>0]=m>>24;m=d+4|0;b[m>>0]=l;b[m+1>>0]=l>>8;b[m+2>>0]=l>>16;b[m+3>>0]=l>>24;dj(i,c);c=i+12|0;f[c>>2]=0;l=i+16|0;f[l>>2]=0;f[i+20>>2]=0;m=f[k>>2]|0;d=f[j>>2]|0;o=m-d|0;if(!o){p=d;q=m;r=0}else{ri(c,o);p=f[j>>2]|0;q=f[k>>2]|0;r=f[c>>2]|0}Rg(r|0,p|0,q-p|0)|0;p=i+11|0;q=b[p>>0]|0;r=q<<24>>24<0;c=r?f[i>>2]|0:i;o=r?f[i+4>>2]|0:q&255;if(o>>>0>3){q=c;r=o;m=o;while(1){d=X(h[q>>0]|h[q+1>>0]<<8|h[q+2>>0]<<16|h[q+3>>0]<<24,1540483477)|0;r=(X(d>>>24^d,1540483477)|0)^(X(r,1540483477)|0);m=m+-4|0;if(m>>>0<=3)break;else q=q+4|0}q=o+-4|0;m=q&-4;s=q-m|0;t=c+(m+4)|0;v=r}else{s=o;t=c;v=o}switch(s|0){case 3:{w=h[t+2>>0]<<16^v;x=10;break}case 2:{w=v;x=10;break}case 1:{y=v;x=11;break}default:z=v}if((x|0)==10){y=h[t+1>>0]<<8^w;x=11}if((x|0)==11)z=X(y^h[t>>0],1540483477)|0;t=X(z>>>13^z,1540483477)|0;z=t>>>15^t;t=a+4|0;y=f[t>>2]|0;w=(y|0)==0;a:do if(!w){v=y+-1|0;s=(v&y|0)==0;if(!s)if(z>>>0>>0)A=z;else A=(z>>>0)%(y>>>0)|0;else A=z&v;r=f[(f[a>>2]|0)+(A<<2)>>2]|0;if((r|0)!=0?(m=f[r>>2]|0,(m|0)!=0):0){r=(o|0)==0;if(s){if(r){s=m;while(1){q=f[s+4>>2]|0;if(!((q|0)==(z|0)|(q&v|0)==(A|0))){B=A;x=52;break a}q=b[s+8+11>>0]|0;if(!((q<<24>>24<0?f[s+12>>2]|0:q&255)|0))break a;s=f[s>>2]|0;if(!s){B=A;x=52;break a}}}else C=m;while(1){s=f[C+4>>2]|0;if(!((s|0)==(z|0)|(s&v|0)==(A|0))){B=A;x=52;break a}s=C+8|0;q=b[s+11>>0]|0;d=q<<24>>24<0;D=q&255;do if(((d?f[C+12>>2]|0:D)|0)==(o|0)){q=f[s>>2]|0;if(d)if(!(Pk(q,c,o)|0))break a;else break;if((b[c>>0]|0)==(q&255)<<24>>24){q=s;E=D;F=c;do{E=E+-1|0;q=q+1|0;if(!E)break a;F=F+1|0}while((b[q>>0]|0)==(b[F>>0]|0))}}while(0);C=f[C>>2]|0;if(!C){B=A;x=52;break a}}}if(r){v=m;while(1){D=f[v+4>>2]|0;if((D|0)!=(z|0)){if(D>>>0>>0)G=D;else G=(D>>>0)%(y>>>0)|0;if((G|0)!=(A|0)){B=A;x=52;break a}}D=b[v+8+11>>0]|0;if(!((D<<24>>24<0?f[v+12>>2]|0:D&255)|0))break a;v=f[v>>2]|0;if(!v){B=A;x=52;break a}}}else H=m;while(1){v=f[H+4>>2]|0;if((v|0)!=(z|0)){if(v>>>0>>0)I=v;else I=(v>>>0)%(y>>>0)|0;if((I|0)!=(A|0)){B=A;x=52;break a}}v=H+8|0;r=b[v+11>>0]|0;D=r<<24>>24<0;s=r&255;do if(((D?f[H+12>>2]|0:s)|0)==(o|0)){r=f[v>>2]|0;if(D)if(!(Pk(r,c,o)|0))break a;else break;if((b[c>>0]|0)==(r&255)<<24>>24){r=v;d=s;F=c;do{d=d+-1|0;r=r+1|0;if(!d)break a;F=F+1|0}while((b[r>>0]|0)==(b[F>>0]|0))}}while(0);H=f[H>>2]|0;if(!H){B=A;x=52;break}}}else{B=A;x=52}}else{B=0;x=52}while(0);if((x|0)==52){_h(g,a,z,i);x=a+12|0;J=$(((f[x>>2]|0)+1|0)>>>0);K=$(y>>>0);L=$(n[a+16>>2]);do if(w|$(L*K)>>0<3|(y+-1&y|0)!=0)&1;H=~~$(W($(J/L)))>>>0;Ph(a,A>>>0>>0?H:A);A=f[t>>2]|0;H=A+-1|0;if(!(H&A)){M=A;N=H&z;break}if(z>>>0>>0){M=A;N=z}else{M=A;N=(z>>>0)%(A>>>0)|0}}else{M=y;N=B}while(0);B=f[(f[a>>2]|0)+(N<<2)>>2]|0;if(!B){y=a+8|0;f[f[g>>2]>>2]=f[y>>2];f[y>>2]=f[g>>2];f[(f[a>>2]|0)+(N<<2)>>2]=y;y=f[g>>2]|0;N=f[y>>2]|0;if(!N)O=g;else{z=f[N+4>>2]|0;N=M+-1|0;if(N&M)if(z>>>0>>0)P=z;else P=(z>>>0)%(M>>>0)|0;else P=z&N;f[(f[a>>2]|0)+(P<<2)>>2]=y;O=g}}else{f[f[g>>2]>>2]=f[B>>2];f[B>>2]=f[g>>2];O=g}f[x>>2]=(f[x>>2]|0)+1;f[O>>2]=0}O=f[i+12>>2]|0;if(O|0){if((f[l>>2]|0)!=(O|0))f[l>>2]=O;br(O)}if((b[p>>0]|0)<0)br(f[i>>2]|0);i=f[j>>2]|0;if(!i){u=e;return}if((f[k>>2]|0)!=(i|0))f[k>>2]=i;br(i);u=e;return}function $b(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0;e=u;u=u+96|0;g=e+92|0;h=e+88|0;i=e+72|0;j=e+48|0;k=e+24|0;l=e;m=a+16|0;n=f[m>>2]|0;o=f[c>>2]|0;f[i>>2]=n;f[i+4>>2]=o;c=i+8|0;f[c>>2]=o;b[i+12>>0]=1;p=(o|0)==-1;if(p)q=-1;else q=f[(f[n>>2]|0)+(o<<2)>>2]|0;n=a+20|0;r=f[n>>2]|0;s=f[r>>2]|0;if((f[r+4>>2]|0)-s>>2>>>0<=q>>>0)mq(r);r=a+8|0;t=f[(f[r>>2]|0)+(f[s+(q<<2)>>2]<<2)>>2]|0;q=a+4|0;s=f[q>>2]|0;if(!(b[s+84>>0]|0))v=f[(f[s+68>>2]|0)+(t<<2)>>2]|0;else v=t;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;f[j+16>>2]=0;f[j+20>>2]=0;f[h>>2]=v;v=b[s+24>>0]|0;f[g>>2]=f[h>>2];ub(s,g,v,j)|0;v=a+28|0;a=(f[v>>2]|0)==0;a:do if(!p){s=k+8|0;t=j+8|0;w=k+16|0;x=j+16|0;y=l+8|0;z=l+16|0;A=o;B=o;C=0;D=0;E=0;F=0;G=0;H=0;J=a;K=o;while(1){do if(J){L=K+1|0;if((K|0)==-1){M=A;N=-1;O=-1;P=-1;break}Q=((L>>>0)%3|0|0)==0?K+-2|0:L;if((A|0)!=-1)if(!((A>>>0)%3|0)){R=A;S=A+2|0;T=Q;U=A;V=19;break}else{R=A;S=A+-1|0;T=Q;U=A;V=19;break}else{R=-1;S=-1;T=Q;U=-1;V=19}}else{Q=B+1|0;L=((Q>>>0)%3|0|0)==0?B+-2|0:Q;if(!((B>>>0)%3|0)){R=A;S=B+2|0;T=L;U=K;V=19;break}else{R=A;S=B+-1|0;T=L;U=K;V=19;break}}while(0);if((V|0)==19){V=0;if((T|0)==-1){M=R;N=-1;O=S;P=U}else{M=R;N=f[(f[f[m>>2]>>2]|0)+(T<<2)>>2]|0;O=S;P=U}}W=f[n>>2]|0;L=f[W>>2]|0;if((f[W+4>>2]|0)-L>>2>>>0<=N>>>0){V=22;break}Q=f[(f[r>>2]|0)+(f[L+(N<<2)>>2]<<2)>>2]|0;L=f[q>>2]|0;if(!(b[L+84>>0]|0))X=f[(f[L+68>>2]|0)+(Q<<2)>>2]|0;else X=Q;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;f[h>>2]=X;Q=b[L+24>>0]|0;f[g>>2]=f[h>>2];ub(L,g,Q,k)|0;if((O|0)==-1)Y=-1;else Y=f[(f[f[m>>2]>>2]|0)+(O<<2)>>2]|0;Z=f[n>>2]|0;Q=f[Z>>2]|0;if((f[Z+4>>2]|0)-Q>>2>>>0<=Y>>>0){V=28;break}L=f[(f[r>>2]|0)+(f[Q+(Y<<2)>>2]<<2)>>2]|0;Q=f[q>>2]|0;if(!(b[Q+84>>0]|0))_=f[(f[Q+68>>2]|0)+(L<<2)>>2]|0;else _=L;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;f[l+12>>2]=0;f[l+16>>2]=0;f[l+20>>2]=0;f[h>>2]=_;L=b[Q+24>>0]|0;f[g>>2]=f[h>>2];ub(Q,g,L,l)|0;L=k;Q=j;$=f[Q>>2]|0;aa=f[Q+4>>2]|0;Q=Vn(f[L>>2]|0,f[L+4>>2]|0,$|0,aa|0)|0;L=I;ba=s;ca=t;da=f[ca>>2]|0;ea=f[ca+4>>2]|0;ca=Vn(f[ba>>2]|0,f[ba+4>>2]|0,da|0,ea|0)|0;ba=I;fa=w;ga=x;ha=f[ga>>2]|0;ia=f[ga+4>>2]|0;ga=Vn(f[fa>>2]|0,f[fa+4>>2]|0,ha|0,ia|0)|0;fa=I;ja=l;ka=Vn(f[ja>>2]|0,f[ja+4>>2]|0,$|0,aa|0)|0;aa=I;$=y;ja=Vn(f[$>>2]|0,f[$+4>>2]|0,da|0,ea|0)|0;ea=I;da=z;$=Vn(f[da>>2]|0,f[da+4>>2]|0,ha|0,ia|0)|0;ia=I;ha=on($|0,ia|0,ca|0,ba|0)|0;da=I;la=on(ja|0,ea|0,ga|0,fa|0)|0;ma=I;na=on(ka|0,aa|0,ga|0,fa|0)|0;fa=I;ga=on($|0,ia|0,Q|0,L|0)|0;ia=I;$=on(ja|0,ea|0,Q|0,L|0)|0;L=I;Q=on(ka|0,aa|0,ca|0,ba|0)|0;ba=I;ca=Vn(C|0,D|0,la|0,ma|0)|0;ma=Tn(ca|0,I|0,ha|0,da|0)|0;da=I;ha=Tn(na|0,fa|0,E|0,F|0)|0;fa=Vn(ha|0,I|0,ga|0,ia|0)|0;ia=I;ga=Vn(G|0,H|0,Q|0,ba|0)|0;ba=Tn(ga|0,I|0,$|0,L|0)|0;L=I;ph(i);B=f[c>>2]|0;$=(f[v>>2]|0)==0;if((B|0)==-1){oa=$;pa=da;qa=ma;ra=ia;sa=fa;ta=L;ua=ba;break a}else{A=M;C=ma;D=da;E=fa;F=ia;G=ba;H=L;J=$;K=P}}if((V|0)==22)mq(W);else if((V|0)==28)mq(Z)}else{oa=a;pa=0;qa=0;ra=0;sa=0;ta=0;ua=0}while(0);a=(pa|0)>-1|(pa|0)==-1&qa>>>0>4294967295;Z=Vn(0,0,qa|0,pa|0)|0;V=a?pa:I;W=(ra|0)>-1|(ra|0)==-1&sa>>>0>4294967295;P=Vn(0,0,sa|0,ra|0)|0;M=W?ra:I;v=(ta|0)>-1|(ta|0)==-1&ua>>>0>4294967295;c=Vn(0,0,ua|0,ta|0)|0;i=Tn((W?sa:P)|0,M|0,(v?ua:c)|0,(v?ta:I)|0)|0;v=Tn(i|0,I|0,(a?qa:Z)|0,V|0)|0;V=I;if(oa){if((v|0)<=536870912){va=qa;wa=sa;xa=ua;f[d>>2]=va;ya=d+4|0;f[ya>>2]=wa;za=d+8|0;f[za>>2]=xa;u=e;return}oa=Wn(v|0,V|0,29)|0;Z=oa&7;oa=zk(qa|0,pa|0,Z|0,0)|0;a=zk(sa|0,ra|0,Z|0,0)|0;i=zk(ua|0,ta|0,Z|0,0)|0;va=oa;wa=a;xa=i;f[d>>2]=va;ya=d+4|0;f[ya>>2]=wa;za=d+8|0;f[za>>2]=xa;u=e;return}else{if(!((V|0)>0|(V|0)==0&v>>>0>536870912)){va=qa;wa=sa;xa=ua;f[d>>2]=va;ya=d+4|0;f[ya>>2]=wa;za=d+8|0;f[za>>2]=xa;u=e;return}i=Wn(v|0,V|0,29)|0;V=I;v=zk(qa|0,pa|0,i|0,V|0)|0;pa=zk(sa|0,ra|0,i|0,V|0)|0;ra=zk(ua|0,ta|0,i|0,V|0)|0;va=v;wa=pa;xa=ra;f[d>>2]=va;ya=d+4|0;f[ya>>2]=wa;za=d+8|0;f[za>>2]=xa;u=e;return}}function ac(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=Oa,M=Oa,N=Oa,O=0,P=0,Q=0,R=0;e=u;u=u+64|0;g=e+40|0;i=e+16|0;j=e;k=xd(a,c)|0;if(k|0){f[i>>2]=k;f[g>>2]=f[i>>2];Xe(a,g)|0}f[j>>2]=0;k=j+4|0;f[k>>2]=0;f[j+8>>2]=0;l=d+11|0;m=b[l>>0]|0;o=d+4|0;p=f[o>>2]|0;q=m<<24>>24<0?p:m&255;if(!q){r=m;s=p;t=0}else{ri(j,q);r=b[l>>0]|0;s=f[o>>2]|0;t=f[j>>2]|0}o=r<<24>>24<0;Rg(t|0,(o?f[d>>2]|0:d)|0,(o?s:r&255)|0)|0;dj(i,c);c=i+12|0;f[c>>2]=0;r=i+16|0;f[r>>2]=0;f[i+20>>2]=0;s=f[k>>2]|0;o=f[j>>2]|0;d=s-o|0;if(!d){v=o;w=s;x=0}else{ri(c,d);v=f[j>>2]|0;w=f[k>>2]|0;x=f[c>>2]|0}Rg(x|0,v|0,w-v|0)|0;v=i+11|0;w=b[v>>0]|0;x=w<<24>>24<0;c=x?f[i>>2]|0:i;d=x?f[i+4>>2]|0:w&255;if(d>>>0>3){w=c;x=d;s=d;while(1){o=X(h[w>>0]|h[w+1>>0]<<8|h[w+2>>0]<<16|h[w+3>>0]<<24,1540483477)|0;x=(X(o>>>24^o,1540483477)|0)^(X(x,1540483477)|0);s=s+-4|0;if(s>>>0<=3)break;else w=w+4|0}w=d+-4|0;s=w&-4;y=w-s|0;z=c+(s+4)|0;A=x}else{y=d;z=c;A=d}switch(y|0){case 3:{B=h[z+2>>0]<<16^A;C=12;break}case 2:{B=A;C=12;break}case 1:{D=A;C=13;break}default:E=A}if((C|0)==12){D=h[z+1>>0]<<8^B;C=13}if((C|0)==13)E=X(D^h[z>>0],1540483477)|0;z=X(E>>>13^E,1540483477)|0;E=z>>>15^z;z=a+4|0;D=f[z>>2]|0;B=(D|0)==0;a:do if(!B){A=D+-1|0;y=(A&D|0)==0;if(!y)if(E>>>0>>0)F=E;else F=(E>>>0)%(D>>>0)|0;else F=E&A;x=f[(f[a>>2]|0)+(F<<2)>>2]|0;if((x|0)!=0?(s=f[x>>2]|0,(s|0)!=0):0){x=(d|0)==0;if(y){if(x){y=s;while(1){w=f[y+4>>2]|0;if(!((w|0)==(E|0)|(w&A|0)==(F|0))){G=F;C=54;break a}w=b[y+8+11>>0]|0;if(!((w<<24>>24<0?f[y+12>>2]|0:w&255)|0))break a;y=f[y>>2]|0;if(!y){G=F;C=54;break a}}}else H=s;while(1){y=f[H+4>>2]|0;if(!((y|0)==(E|0)|(y&A|0)==(F|0))){G=F;C=54;break a}y=H+8|0;w=b[y+11>>0]|0;o=w<<24>>24<0;t=w&255;do if(((o?f[H+12>>2]|0:t)|0)==(d|0)){w=f[y>>2]|0;if(o)if(!(Pk(w,c,d)|0))break a;else break;if((b[c>>0]|0)==(w&255)<<24>>24){w=y;l=t;q=c;do{l=l+-1|0;w=w+1|0;if(!l)break a;q=q+1|0}while((b[w>>0]|0)==(b[q>>0]|0))}}while(0);H=f[H>>2]|0;if(!H){G=F;C=54;break a}}}if(x){A=s;while(1){t=f[A+4>>2]|0;if((t|0)!=(E|0)){if(t>>>0>>0)I=t;else I=(t>>>0)%(D>>>0)|0;if((I|0)!=(F|0)){G=F;C=54;break a}}t=b[A+8+11>>0]|0;if(!((t<<24>>24<0?f[A+12>>2]|0:t&255)|0))break a;A=f[A>>2]|0;if(!A){G=F;C=54;break a}}}else J=s;while(1){A=f[J+4>>2]|0;if((A|0)!=(E|0)){if(A>>>0>>0)K=A;else K=(A>>>0)%(D>>>0)|0;if((K|0)!=(F|0)){G=F;C=54;break a}}A=J+8|0;x=b[A+11>>0]|0;t=x<<24>>24<0;y=x&255;do if(((t?f[J+12>>2]|0:y)|0)==(d|0)){x=f[A>>2]|0;if(t)if(!(Pk(x,c,d)|0))break a;else break;if((b[c>>0]|0)==(x&255)<<24>>24){x=A;o=y;q=c;do{o=o+-1|0;x=x+1|0;if(!o)break a;q=q+1|0}while((b[x>>0]|0)==(b[q>>0]|0))}}while(0);J=f[J>>2]|0;if(!J){G=F;C=54;break}}}else{G=F;C=54}}else{G=0;C=54}while(0);if((C|0)==54){_h(g,a,E,i);C=a+12|0;L=$(((f[C>>2]|0)+1|0)>>>0);M=$(D>>>0);N=$(n[a+16>>2]);do if(B|$(N*M)>>0<3|(D+-1&D|0)!=0)&1;J=~~$(W($(L/N)))>>>0;Ph(a,F>>>0>>0?J:F);F=f[z>>2]|0;J=F+-1|0;if(!(J&F)){O=F;P=J&E;break}if(E>>>0>>0){O=F;P=E}else{O=F;P=(E>>>0)%(F>>>0)|0}}else{O=D;P=G}while(0);G=f[(f[a>>2]|0)+(P<<2)>>2]|0;if(!G){D=a+8|0;f[f[g>>2]>>2]=f[D>>2];f[D>>2]=f[g>>2];f[(f[a>>2]|0)+(P<<2)>>2]=D;D=f[g>>2]|0;P=f[D>>2]|0;if(!P)Q=g;else{E=f[P+4>>2]|0;P=O+-1|0;if(P&O)if(E>>>0>>0)R=E;else R=(E>>>0)%(O>>>0)|0;else R=E&P;f[(f[a>>2]|0)+(R<<2)>>2]=D;Q=g}}else{f[f[g>>2]>>2]=f[G>>2];f[G>>2]=f[g>>2];Q=g}f[C>>2]=(f[C>>2]|0)+1;f[Q>>2]=0}Q=f[i+12>>2]|0;if(Q|0){if((f[r>>2]|0)!=(Q|0))f[r>>2]=Q;br(Q)}if((b[v>>0]|0)<0)br(f[i>>2]|0);i=f[j>>2]|0;if(!i){u=e;return}if((f[k>>2]|0)!=(i|0))f[k>>2]=i;br(i);u=e;return}function bc(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=Oa,fa=Oa,ga=Oa,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0;g=u;u=u+48|0;i=g+12|0;j=g+32|0;k=g;l=i+16|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[l>>2]=$(1.0);m=a+80|0;o=f[m>>2]|0;f[k>>2]=0;p=k+4|0;f[p>>2]=0;f[k+8>>2]=0;if(o){if(o>>>0>1073741823)mq(k);q=o<<2;r=dn(q)|0;f[k>>2]=r;s=r+(o<<2)|0;f[k+8>>2]=s;hj(r|0,0,q|0)|0;f[p>>2]=s;s=c+48|0;q=c+40|0;o=i+4|0;t=i+12|0;v=i+8|0;w=a+40|0;x=a+64|0;y=f[e>>2]|0;e=0;z=r;A=0;B=0;C=r;D=r;E=r;while(1){r=s;F=f[r>>2]|0;G=f[r+4>>2]|0;r=q;H=on(f[r>>2]|0,f[r+4>>2]|0,y+A|0,0)|0;r=Tn(H|0,I|0,F|0,G|0)|0;G=(f[f[c>>2]>>2]|0)+r|0;r=h[G>>0]|h[G+1>>0]<<8;d[j>>1]=r;G=(r^318)&65535;a:do if(e){F=e+-1|0;H=(F&e|0)==0;if(!H)if(e>>>0>G>>>0)J=G;else J=(G>>>0)%(e>>>0)|0;else J=F&G;K=f[i>>2]|0;L=f[K+(J<<2)>>2]|0;b:do if(L|0?(M=f[L>>2]|0,M|0):0){c:do if(H){N=M;while(1){O=f[N+4>>2]|0;P=(O|0)==(G|0);if(!(P|(O&F|0)==(J|0)))break b;if(P?(d[N+8>>1]|0)==r<<16>>16:0){Q=N;break c}N=f[N>>2]|0;if(!N)break b}}else{N=M;while(1){P=f[N+4>>2]|0;if((P|0)==(G|0)){if((d[N+8>>1]|0)==r<<16>>16){Q=N;break c}}else{if(P>>>0>>0)R=P;else R=(P>>>0)%(e>>>0)|0;if((R|0)!=(J|0))break b}N=f[N>>2]|0;if(!N)break b}}while(0);f[E+(A<<2)>>2]=f[Q+12>>2];S=z;T=B;U=D;V=C;X=E;break a}while(0);if(!H)if(e>>>0>G>>>0)Y=G;else Y=(G>>>0)%(e>>>0)|0;else Y=F&G;L=f[K+(Y<<2)>>2]|0;if(!L){Z=Y;_=e;aa=0;ba=40}else{if(H){M=L;while(1){M=f[M>>2]|0;if(!M){Z=Y;_=e;aa=0;ba=40;break a}N=f[M+4>>2]|0;if(!((N|0)==(G|0)|(N&F|0)==(Y|0))){Z=Y;_=e;aa=0;ba=40;break a}if((d[M+8>>1]|0)==r<<16>>16){ba=55;break a}}}else ca=L;while(1){ca=f[ca>>2]|0;if(!ca){Z=Y;_=e;aa=0;ba=40;break a}M=f[ca+4>>2]|0;if((M|0)!=(G|0)){if(M>>>0>>0)da=M;else da=(M>>>0)%(e>>>0)|0;if((da|0)!=(Y|0)){Z=Y;_=e;aa=0;ba=40;break a}}if((d[ca+8>>1]|0)==r<<16>>16){ba=55;break}}}}else{Z=0;_=0;aa=1;ba=40}while(0);if((ba|0)==40){ba=0;L=dn(16)|0;d[L+8>>1]=r;f[L+12>>2]=B;f[L+4>>2]=G;f[L>>2]=0;ea=$(((f[t>>2]|0)+1|0)>>>0);fa=$(_>>>0);ga=$(n[l>>2]);do if(aa|$(ga*fa)>>0<3|(_+-1&_|0)!=0)&1;F=~~$(W($(ea/ga)))>>>0;Fh(i,M>>>0>>0?F:M);M=f[o>>2]|0;F=M+-1|0;if(!(F&M)){ha=M;ia=F&G;break}if(M>>>0>G>>>0){ha=M;ia=G}else{ha=M;ia=(G>>>0)%(M>>>0)|0}}else{ha=_;ia=Z}while(0);G=(f[i>>2]|0)+(ia<<2)|0;r=f[G>>2]|0;if(!r){f[L>>2]=f[v>>2];f[v>>2]=L;f[G>>2]=v;G=f[L>>2]|0;if(G|0){M=f[G+4>>2]|0;G=ha+-1|0;if(G&ha)if(M>>>0>>0)ja=M;else ja=(M>>>0)%(ha>>>0)|0;else ja=M&G;ka=(f[i>>2]|0)+(ja<<2)|0;ba=53}}else{f[L>>2]=f[r>>2];ka=r;ba=53}if((ba|0)==53){ba=0;f[ka>>2]=L}f[t>>2]=(f[t>>2]|0)+1;ba=55}if((ba|0)==55){ba=0;r=w;G=f[r>>2]|0;M=on(G|0,f[r+4>>2]|0,B|0,0)|0;Rg((f[f[x>>2]>>2]|0)+M|0,j|0,G|0)|0;G=f[k>>2]|0;f[G+(A<<2)>>2]=B;S=G;T=B+1|0;U=G;V=G;X=G}G=A+1|0;la=f[m>>2]|0;if(G>>>0>=la>>>0)break;e=f[o>>2]|0;z=S;A=G;B=T;C=V;D=U;E=X}if((T|0)==(la|0))ma=V;else{V=a+84|0;if(!(b[V>>0]|0)){X=f[a+72>>2]|0;E=f[a+68>>2]|0;D=E;if((X|0)==(E|0))na=S;else{C=X-E>>2;E=0;do{X=D+(E<<2)|0;f[X>>2]=f[U+(f[X>>2]<<2)>>2];E=E+1|0}while(E>>>0>>0);na=S}}else{b[V>>0]=0;V=a+68|0;S=a+72|0;C=f[S>>2]|0;E=f[V>>2]|0;U=C-E>>2;D=E;E=C;if(la>>>0<=U>>>0)if(la>>>0>>0?(C=D+(la<<2)|0,(C|0)!=(E|0)):0){f[S>>2]=E+(~((E+-4-C|0)>>>2)<<2);oa=la}else oa=la;else{kh(V,la-U|0,1204);oa=f[m>>2]|0}U=f[k>>2]|0;if(!oa)na=U;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[U+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);na=U}}f[m>>2]=T;ma=na}if(!ma)pa=T;else{na=f[p>>2]|0;if((na|0)!=(ma|0))f[p>>2]=na+(~((na+-4-ma|0)>>>2)<<2);br(ma);pa=T}}else pa=0;T=f[i+8>>2]|0;if(T|0){ma=T;do{T=ma;ma=f[ma>>2]|0;br(T)}while((ma|0)!=0)}ma=f[i>>2]|0;f[i>>2]=0;if(!ma){u=g;return pa|0}br(ma);u=g;return pa|0}function cc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=Oa,K=Oa,L=Oa,M=0,N=0,O=0,P=0;e=u;u=u+64|0;g=e+40|0;i=e+16|0;j=e;k=xd(a,c)|0;if(k|0){f[i>>2]=k;f[g>>2]=f[i>>2];Xe(a,g)|0}f[j>>2]=0;k=j+4|0;f[k>>2]=0;f[j+8>>2]=0;ri(j,4);l=f[j>>2]|0;m=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;b[l>>0]=m;b[l+1>>0]=m>>8;b[l+2>>0]=m>>16;b[l+3>>0]=m>>24;dj(i,c);c=i+12|0;f[c>>2]=0;m=i+16|0;f[m>>2]=0;f[i+20>>2]=0;l=f[k>>2]|0;d=f[j>>2]|0;o=l-d|0;if(!o){p=d;q=l;r=0}else{ri(c,o);p=f[j>>2]|0;q=f[k>>2]|0;r=f[c>>2]|0}Rg(r|0,p|0,q-p|0)|0;p=i+11|0;q=b[p>>0]|0;r=q<<24>>24<0;c=r?f[i>>2]|0:i;o=r?f[i+4>>2]|0:q&255;if(o>>>0>3){q=c;r=o;l=o;while(1){d=X(h[q>>0]|h[q+1>>0]<<8|h[q+2>>0]<<16|h[q+3>>0]<<24,1540483477)|0;r=(X(d>>>24^d,1540483477)|0)^(X(r,1540483477)|0);l=l+-4|0;if(l>>>0<=3)break;else q=q+4|0}q=o+-4|0;l=q&-4;s=q-l|0;t=c+(l+4)|0;v=r}else{s=o;t=c;v=o}switch(s|0){case 3:{w=h[t+2>>0]<<16^v;x=10;break}case 2:{w=v;x=10;break}case 1:{y=v;x=11;break}default:z=v}if((x|0)==10){y=h[t+1>>0]<<8^w;x=11}if((x|0)==11)z=X(y^h[t>>0],1540483477)|0;t=X(z>>>13^z,1540483477)|0;z=t>>>15^t;t=a+4|0;y=f[t>>2]|0;w=(y|0)==0;a:do if(!w){v=y+-1|0;s=(v&y|0)==0;if(!s)if(z>>>0>>0)A=z;else A=(z>>>0)%(y>>>0)|0;else A=z&v;r=f[(f[a>>2]|0)+(A<<2)>>2]|0;if((r|0)!=0?(l=f[r>>2]|0,(l|0)!=0):0){r=(o|0)==0;if(s){if(r){s=l;while(1){q=f[s+4>>2]|0;if(!((q|0)==(z|0)|(q&v|0)==(A|0))){B=A;x=52;break a}q=b[s+8+11>>0]|0;if(!((q<<24>>24<0?f[s+12>>2]|0:q&255)|0))break a;s=f[s>>2]|0;if(!s){B=A;x=52;break a}}}else C=l;while(1){s=f[C+4>>2]|0;if(!((s|0)==(z|0)|(s&v|0)==(A|0))){B=A;x=52;break a}s=C+8|0;q=b[s+11>>0]|0;d=q<<24>>24<0;D=q&255;do if(((d?f[C+12>>2]|0:D)|0)==(o|0)){q=f[s>>2]|0;if(d)if(!(Pk(q,c,o)|0))break a;else break;if((b[c>>0]|0)==(q&255)<<24>>24){q=s;E=D;F=c;do{E=E+-1|0;q=q+1|0;if(!E)break a;F=F+1|0}while((b[q>>0]|0)==(b[F>>0]|0))}}while(0);C=f[C>>2]|0;if(!C){B=A;x=52;break a}}}if(r){v=l;while(1){D=f[v+4>>2]|0;if((D|0)!=(z|0)){if(D>>>0>>0)G=D;else G=(D>>>0)%(y>>>0)|0;if((G|0)!=(A|0)){B=A;x=52;break a}}D=b[v+8+11>>0]|0;if(!((D<<24>>24<0?f[v+12>>2]|0:D&255)|0))break a;v=f[v>>2]|0;if(!v){B=A;x=52;break a}}}else H=l;while(1){v=f[H+4>>2]|0;if((v|0)!=(z|0)){if(v>>>0>>0)I=v;else I=(v>>>0)%(y>>>0)|0;if((I|0)!=(A|0)){B=A;x=52;break a}}v=H+8|0;r=b[v+11>>0]|0;D=r<<24>>24<0;s=r&255;do if(((D?f[H+12>>2]|0:s)|0)==(o|0)){r=f[v>>2]|0;if(D)if(!(Pk(r,c,o)|0))break a;else break;if((b[c>>0]|0)==(r&255)<<24>>24){r=v;d=s;F=c;do{d=d+-1|0;r=r+1|0;if(!d)break a;F=F+1|0}while((b[r>>0]|0)==(b[F>>0]|0))}}while(0);H=f[H>>2]|0;if(!H){B=A;x=52;break}}}else{B=A;x=52}}else{B=0;x=52}while(0);if((x|0)==52){_h(g,a,z,i);x=a+12|0;J=$(((f[x>>2]|0)+1|0)>>>0);K=$(y>>>0);L=$(n[a+16>>2]);do if(w|$(L*K)>>0<3|(y+-1&y|0)!=0)&1;H=~~$(W($(J/L)))>>>0;Ph(a,A>>>0>>0?H:A);A=f[t>>2]|0;H=A+-1|0;if(!(H&A)){M=A;N=H&z;break}if(z>>>0>>0){M=A;N=z}else{M=A;N=(z>>>0)%(A>>>0)|0}}else{M=y;N=B}while(0);B=f[(f[a>>2]|0)+(N<<2)>>2]|0;if(!B){y=a+8|0;f[f[g>>2]>>2]=f[y>>2];f[y>>2]=f[g>>2];f[(f[a>>2]|0)+(N<<2)>>2]=y;y=f[g>>2]|0;N=f[y>>2]|0;if(!N)O=g;else{z=f[N+4>>2]|0;N=M+-1|0;if(N&M)if(z>>>0>>0)P=z;else P=(z>>>0)%(M>>>0)|0;else P=z&N;f[(f[a>>2]|0)+(P<<2)>>2]=y;O=g}}else{f[f[g>>2]>>2]=f[B>>2];f[B>>2]=f[g>>2];O=g}f[x>>2]=(f[x>>2]|0)+1;f[O>>2]=0}O=f[i+12>>2]|0;if(O|0){if((f[m>>2]|0)!=(O|0))f[m>>2]=O;br(O)}if((b[p>>0]|0)<0)br(f[i>>2]|0);i=f[j>>2]|0;if(!i){u=e;return}if((f[k>>2]|0)!=(i|0))f[k>>2]=i;br(i);u=e;return}function dc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=Oa,da=Oa,ea=Oa,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0;e=u;u=u+48|0;g=e+12|0;h=e+32|0;i=e;j=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[j>>2]=$(1.0);k=a+80|0;l=f[k>>2]|0;f[i>>2]=0;m=i+4|0;f[m>>2]=0;f[i+8>>2]=0;if(l){if(l>>>0>1073741823)mq(i);o=l<<2;p=dn(o)|0;f[i>>2]=p;q=p+(l<<2)|0;f[i+8>>2]=q;hj(p|0,0,o|0)|0;f[m>>2]=q;q=c+48|0;o=c+40|0;l=g+4|0;r=g+12|0;s=g+8|0;t=a+40|0;v=a+64|0;w=f[d>>2]|0;d=0;x=p;y=0;z=0;A=p;B=p;C=p;while(1){p=q;D=f[p>>2]|0;E=f[p+4>>2]|0;p=o;F=on(f[p>>2]|0,f[p+4>>2]|0,w+y|0,0)|0;p=Tn(F|0,I|0,D|0,E|0)|0;E=b[(f[f[c>>2]>>2]|0)+p>>0]|0;b[h>>0]=E;p=E&255^318;a:do if(d){D=d+-1|0;F=(D&d|0)==0;if(!F)if(p>>>0>>0)G=p;else G=(p>>>0)%(d>>>0)|0;else G=D&p;H=f[g>>2]|0;J=f[H+(G<<2)>>2]|0;b:do if(J|0?(K=f[J>>2]|0,K|0):0){c:do if(F){L=K;while(1){M=f[L+4>>2]|0;N=(M|0)==(p|0);if(!(N|(M&D|0)==(G|0)))break b;if(N?(b[L+8>>0]|0)==E<<24>>24:0){O=L;break c}L=f[L>>2]|0;if(!L)break b}}else{L=K;while(1){N=f[L+4>>2]|0;if((N|0)==(p|0)){if((b[L+8>>0]|0)==E<<24>>24){O=L;break c}}else{if(N>>>0>>0)P=N;else P=(N>>>0)%(d>>>0)|0;if((P|0)!=(G|0))break b}L=f[L>>2]|0;if(!L)break b}}while(0);f[C+(y<<2)>>2]=f[O+12>>2];Q=x;R=z;S=B;T=A;U=C;break a}while(0);if(!F)if(p>>>0>>0)V=p;else V=(p>>>0)%(d>>>0)|0;else V=D&p;J=f[H+(V<<2)>>2]|0;if(!J){X=V;Y=d;Z=0;_=40}else{if(F){K=J;while(1){K=f[K>>2]|0;if(!K){X=V;Y=d;Z=0;_=40;break a}L=f[K+4>>2]|0;if(!((L|0)==(p|0)|(L&D|0)==(V|0))){X=V;Y=d;Z=0;_=40;break a}if((b[K+8>>0]|0)==E<<24>>24){_=55;break a}}}else aa=J;while(1){aa=f[aa>>2]|0;if(!aa){X=V;Y=d;Z=0;_=40;break a}K=f[aa+4>>2]|0;if((K|0)!=(p|0)){if(K>>>0>>0)ba=K;else ba=(K>>>0)%(d>>>0)|0;if((ba|0)!=(V|0)){X=V;Y=d;Z=0;_=40;break a}}if((b[aa+8>>0]|0)==E<<24>>24){_=55;break}}}}else{X=0;Y=0;Z=1;_=40}while(0);if((_|0)==40){_=0;J=dn(16)|0;b[J+8>>0]=E;f[J+12>>2]=z;f[J+4>>2]=p;f[J>>2]=0;ca=$(((f[r>>2]|0)+1|0)>>>0);da=$(Y>>>0);ea=$(n[j>>2]);do if(Z|$(ea*da)>>0<3|(Y+-1&Y|0)!=0)&1;D=~~$(W($(ca/ea)))>>>0;Mh(g,K>>>0>>0?D:K);K=f[l>>2]|0;D=K+-1|0;if(!(D&K)){fa=K;ga=D&p;break}if(p>>>0>>0){fa=K;ga=p}else{fa=K;ga=(p>>>0)%(K>>>0)|0}}else{fa=Y;ga=X}while(0);p=(f[g>>2]|0)+(ga<<2)|0;E=f[p>>2]|0;if(!E){f[J>>2]=f[s>>2];f[s>>2]=J;f[p>>2]=s;p=f[J>>2]|0;if(p|0){K=f[p+4>>2]|0;p=fa+-1|0;if(p&fa)if(K>>>0>>0)ha=K;else ha=(K>>>0)%(fa>>>0)|0;else ha=K&p;ia=(f[g>>2]|0)+(ha<<2)|0;_=53}}else{f[J>>2]=f[E>>2];ia=E;_=53}if((_|0)==53){_=0;f[ia>>2]=J}f[r>>2]=(f[r>>2]|0)+1;_=55}if((_|0)==55){_=0;E=t;p=f[E>>2]|0;K=on(p|0,f[E+4>>2]|0,z|0,0)|0;Rg((f[f[v>>2]>>2]|0)+K|0,h|0,p|0)|0;p=f[i>>2]|0;f[p+(y<<2)>>2]=z;Q=p;R=z+1|0;S=p;T=p;U=p}p=y+1|0;ja=f[k>>2]|0;if(p>>>0>=ja>>>0)break;d=f[l>>2]|0;x=Q;y=p;z=R;A=T;B=S;C=U}if((R|0)==(ja|0))ka=T;else{T=a+84|0;if(!(b[T>>0]|0)){U=f[a+72>>2]|0;C=f[a+68>>2]|0;B=C;if((U|0)==(C|0))la=Q;else{A=U-C>>2;C=0;do{U=B+(C<<2)|0;f[U>>2]=f[S+(f[U>>2]<<2)>>2];C=C+1|0}while(C>>>0>>0);la=Q}}else{b[T>>0]=0;T=a+68|0;Q=a+72|0;A=f[Q>>2]|0;C=f[T>>2]|0;S=A-C>>2;B=C;C=A;if(ja>>>0<=S>>>0)if(ja>>>0>>0?(A=B+(ja<<2)|0,(A|0)!=(C|0)):0){f[Q>>2]=C+(~((C+-4-A|0)>>>2)<<2);ma=ja}else ma=ja;else{kh(T,ja-S|0,1204);ma=f[k>>2]|0}S=f[i>>2]|0;if(!ma)la=S;else{i=f[a+68>>2]|0;a=0;do{f[i+(a<<2)>>2]=f[S+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);la=S}}f[k>>2]=R;ka=la}if(!ka)na=R;else{la=f[m>>2]|0;if((la|0)!=(ka|0))f[m>>2]=la+(~((la+-4-ka|0)>>>2)<<2);br(ka);na=R}}else na=0;R=f[g+8>>2]|0;if(R|0){ka=R;do{R=ka;ka=f[ka>>2]|0;br(R)}while((ka|0)!=0)}ka=f[g>>2]|0;f[g>>2]=0;if(!ka){u=e;return na|0}br(ka);u=e;return na|0}function ec(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=Oa,ea=Oa,fa=Oa,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0;e=u;u=u+48|0;g=e+16|0;i=e+12|0;j=e;k=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[k>>2]=$(1.0);l=a+80|0;m=f[l>>2]|0;f[j>>2]=0;o=j+4|0;f[o>>2]=0;f[j+8>>2]=0;if(m){if(m>>>0>1073741823)mq(j);p=m<<2;q=dn(p)|0;f[j>>2]=q;r=q+(m<<2)|0;f[j+8>>2]=r;hj(q|0,0,p|0)|0;f[o>>2]=r;r=c+48|0;p=c+40|0;m=g+4|0;s=g+12|0;t=g+8|0;v=a+40|0;w=a+64|0;x=f[d>>2]|0;d=0;y=q;z=0;A=0;B=q;C=q;D=q;while(1){q=r;E=f[q>>2]|0;F=f[q+4>>2]|0;q=p;G=on(f[q>>2]|0,f[q+4>>2]|0,x+z|0,0)|0;q=Tn(G|0,I|0,E|0,F|0)|0;F=(f[f[c>>2]>>2]|0)+q|0;q=h[F>>0]|h[F+1>>0]<<8|h[F+2>>0]<<16|h[F+3>>0]<<24;f[i>>2]=q;F=q^318;a:do if(d){E=d+-1|0;G=(E&d|0)==0;if(!G)if(F>>>0>>0)H=F;else H=(F>>>0)%(d>>>0)|0;else H=E&F;J=f[g>>2]|0;K=f[J+(H<<2)>>2]|0;b:do if(K|0?(L=f[K>>2]|0,L|0):0){c:do if(G){M=L;while(1){N=f[M+4>>2]|0;O=(N|0)==(F|0);if(!(O|(N&E|0)==(H|0)))break b;if(O?(f[M+8>>2]|0)==(q|0):0){P=M;break c}M=f[M>>2]|0;if(!M)break b}}else{M=L;while(1){O=f[M+4>>2]|0;if((O|0)==(F|0)){if((f[M+8>>2]|0)==(q|0)){P=M;break c}}else{if(O>>>0>>0)Q=O;else Q=(O>>>0)%(d>>>0)|0;if((Q|0)!=(H|0))break b}M=f[M>>2]|0;if(!M)break b}}while(0);f[D+(z<<2)>>2]=f[P+12>>2];R=y;S=A;T=C;U=B;V=D;break a}while(0);if(!G)if(F>>>0>>0)X=F;else X=(F>>>0)%(d>>>0)|0;else X=E&F;K=f[J+(X<<2)>>2]|0;if(!K){Y=X;Z=d;_=0;aa=40}else{if(G){L=K;while(1){L=f[L>>2]|0;if(!L){Y=X;Z=d;_=0;aa=40;break a}M=f[L+4>>2]|0;if(!((M|0)==(F|0)|(M&E|0)==(X|0))){Y=X;Z=d;_=0;aa=40;break a}if((f[L+8>>2]|0)==(q|0)){aa=55;break a}}}else ba=K;while(1){ba=f[ba>>2]|0;if(!ba){Y=X;Z=d;_=0;aa=40;break a}L=f[ba+4>>2]|0;if((L|0)!=(F|0)){if(L>>>0>>0)ca=L;else ca=(L>>>0)%(d>>>0)|0;if((ca|0)!=(X|0)){Y=X;Z=d;_=0;aa=40;break a}}if((f[ba+8>>2]|0)==(q|0)){aa=55;break}}}}else{Y=0;Z=0;_=1;aa=40}while(0);if((aa|0)==40){aa=0;K=dn(16)|0;f[K+8>>2]=q;f[K+12>>2]=A;f[K+4>>2]=F;f[K>>2]=0;da=$(((f[s>>2]|0)+1|0)>>>0);ea=$(Z>>>0);fa=$(n[k>>2]);do if(_|$(fa*ea)>>0<3|(Z+-1&Z|0)!=0)&1;E=~~$(W($(da/fa)))>>>0;ti(g,L>>>0>>0?E:L);L=f[m>>2]|0;E=L+-1|0;if(!(E&L)){ga=L;ha=E&F;break}if(F>>>0>>0){ga=L;ha=F}else{ga=L;ha=(F>>>0)%(L>>>0)|0}}else{ga=Z;ha=Y}while(0);F=(f[g>>2]|0)+(ha<<2)|0;q=f[F>>2]|0;if(!q){f[K>>2]=f[t>>2];f[t>>2]=K;f[F>>2]=t;F=f[K>>2]|0;if(F|0){L=f[F+4>>2]|0;F=ga+-1|0;if(F&ga)if(L>>>0>>0)ia=L;else ia=(L>>>0)%(ga>>>0)|0;else ia=L&F;ja=(f[g>>2]|0)+(ia<<2)|0;aa=53}}else{f[K>>2]=f[q>>2];ja=q;aa=53}if((aa|0)==53){aa=0;f[ja>>2]=K}f[s>>2]=(f[s>>2]|0)+1;aa=55}if((aa|0)==55){aa=0;q=v;F=f[q>>2]|0;L=on(F|0,f[q+4>>2]|0,A|0,0)|0;Rg((f[f[w>>2]>>2]|0)+L|0,i|0,F|0)|0;F=f[j>>2]|0;f[F+(z<<2)>>2]=A;R=F;S=A+1|0;T=F;U=F;V=F}F=z+1|0;ka=f[l>>2]|0;if(F>>>0>=ka>>>0)break;d=f[m>>2]|0;y=R;z=F;A=S;B=U;C=T;D=V}if((S|0)==(ka|0))la=U;else{U=a+84|0;if(!(b[U>>0]|0)){V=f[a+72>>2]|0;D=f[a+68>>2]|0;C=D;if((V|0)==(D|0))ma=R;else{B=V-D>>2;D=0;do{V=C+(D<<2)|0;f[V>>2]=f[T+(f[V>>2]<<2)>>2];D=D+1|0}while(D>>>0>>0);ma=R}}else{b[U>>0]=0;U=a+68|0;R=a+72|0;B=f[R>>2]|0;D=f[U>>2]|0;T=B-D>>2;C=D;D=B;if(ka>>>0<=T>>>0)if(ka>>>0>>0?(B=C+(ka<<2)|0,(B|0)!=(D|0)):0){f[R>>2]=D+(~((D+-4-B|0)>>>2)<<2);na=ka}else na=ka;else{kh(U,ka-T|0,1204);na=f[l>>2]|0}T=f[j>>2]|0;if(!na)ma=T;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[T+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);ma=T}}f[l>>2]=S;la=ma}if(!la)oa=S;else{ma=f[o>>2]|0;if((ma|0)!=(la|0))f[o>>2]=ma+(~((ma+-4-la|0)>>>2)<<2);br(la);oa=S}}else oa=0;S=f[g+8>>2]|0;if(S|0){la=S;do{S=la;la=f[la>>2]|0;br(S)}while((la|0)!=0)}la=f[g>>2]|0;f[g>>2]=0;if(!la){u=e;return oa|0}br(la);u=e;return oa|0}function fc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0;e=u;u=u+96|0;g=e+92|0;h=e+88|0;i=e+72|0;j=e+48|0;k=e+24|0;l=e;m=a+16|0;n=f[m>>2]|0;o=f[c>>2]|0;f[i>>2]=n;f[i+4>>2]=o;c=i+8|0;f[c>>2]=o;b[i+12>>0]=1;p=f[(f[n+28>>2]|0)+(o<<2)>>2]|0;n=a+20|0;q=f[n>>2]|0;r=f[q>>2]|0;if((f[q+4>>2]|0)-r>>2>>>0<=p>>>0)mq(q);q=a+8|0;s=f[(f[q>>2]|0)+(f[r+(p<<2)>>2]<<2)>>2]|0;p=a+4|0;r=f[p>>2]|0;if(!(b[r+84>>0]|0))t=f[(f[r+68>>2]|0)+(s<<2)>>2]|0;else t=s;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;f[j+16>>2]=0;f[j+20>>2]=0;f[h>>2]=t;t=b[r+24>>0]|0;f[g>>2]=f[h>>2];ub(r,g,t,j)|0;t=a+28|0;a=(f[t>>2]|0)==0;a:do if((o|0)!=-1){r=k+8|0;s=j+8|0;v=k+16|0;w=j+16|0;x=l+8|0;y=l+16|0;z=o;A=o;B=0;C=0;D=0;E=0;F=0;G=0;H=a;J=o;while(1){do if(H){K=J+1|0;if((J|0)!=-1){L=((K>>>0)%3|0|0)==0?J+-2|0:K;if((z|0)!=-1)if(!((z>>>0)%3|0)){M=z;N=z+2|0;O=L;P=z;break}else{M=z;N=z+-1|0;O=L;P=z;break}else{M=-1;N=-1;O=L;P=-1}}else{M=z;N=-1;O=-1;P=-1}}else{L=A+1|0;K=((L>>>0)%3|0|0)==0?A+-2|0:L;if(!((A>>>0)%3|0)){M=z;N=A+2|0;O=K;P=J;break}else{M=z;N=A+-1|0;O=K;P=J;break}}while(0);K=f[(f[(f[m>>2]|0)+28>>2]|0)+(O<<2)>>2]|0;Q=f[n>>2]|0;L=f[Q>>2]|0;if((f[Q+4>>2]|0)-L>>2>>>0<=K>>>0){R=17;break}S=f[(f[q>>2]|0)+(f[L+(K<<2)>>2]<<2)>>2]|0;K=f[p>>2]|0;if(!(b[K+84>>0]|0))T=f[(f[K+68>>2]|0)+(S<<2)>>2]|0;else T=S;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;f[h>>2]=T;S=b[K+24>>0]|0;f[g>>2]=f[h>>2];ub(K,g,S,k)|0;S=f[(f[(f[m>>2]|0)+28>>2]|0)+(N<<2)>>2]|0;U=f[n>>2]|0;K=f[U>>2]|0;if((f[U+4>>2]|0)-K>>2>>>0<=S>>>0){R=21;break}L=f[(f[q>>2]|0)+(f[K+(S<<2)>>2]<<2)>>2]|0;S=f[p>>2]|0;if(!(b[S+84>>0]|0))V=f[(f[S+68>>2]|0)+(L<<2)>>2]|0;else V=L;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;f[l+12>>2]=0;f[l+16>>2]=0;f[l+20>>2]=0;f[h>>2]=V;L=b[S+24>>0]|0;f[g>>2]=f[h>>2];ub(S,g,L,l)|0;L=k;S=j;K=f[S>>2]|0;W=f[S+4>>2]|0;S=Vn(f[L>>2]|0,f[L+4>>2]|0,K|0,W|0)|0;L=I;X=r;Y=s;Z=f[Y>>2]|0;_=f[Y+4>>2]|0;Y=Vn(f[X>>2]|0,f[X+4>>2]|0,Z|0,_|0)|0;X=I;$=v;aa=w;ba=f[aa>>2]|0;ca=f[aa+4>>2]|0;aa=Vn(f[$>>2]|0,f[$+4>>2]|0,ba|0,ca|0)|0;$=I;da=l;ea=Vn(f[da>>2]|0,f[da+4>>2]|0,K|0,W|0)|0;W=I;K=x;da=Vn(f[K>>2]|0,f[K+4>>2]|0,Z|0,_|0)|0;_=I;Z=y;K=Vn(f[Z>>2]|0,f[Z+4>>2]|0,ba|0,ca|0)|0;ca=I;ba=on(K|0,ca|0,Y|0,X|0)|0;Z=I;fa=on(da|0,_|0,aa|0,$|0)|0;ga=I;ha=on(ea|0,W|0,aa|0,$|0)|0;$=I;aa=on(K|0,ca|0,S|0,L|0)|0;ca=I;K=on(da|0,_|0,S|0,L|0)|0;L=I;S=on(ea|0,W|0,Y|0,X|0)|0;X=I;Y=Vn(B|0,C|0,fa|0,ga|0)|0;ga=Tn(Y|0,I|0,ba|0,Z|0)|0;Z=I;ba=Tn(ha|0,$|0,D|0,E|0)|0;$=Vn(ba|0,I|0,aa|0,ca|0)|0;ca=I;aa=Vn(F|0,G|0,S|0,X|0)|0;X=Tn(aa|0,I|0,K|0,L|0)|0;L=I;xg(i);A=f[c>>2]|0;K=(f[t>>2]|0)==0;if((A|0)==-1){ia=K;ja=Z;ka=ga;la=ca;ma=$;na=L;oa=X;break a}else{z=M;B=ga;C=Z;D=$;E=ca;F=X;G=L;H=K;J=P}}if((R|0)==17)mq(Q);else if((R|0)==21)mq(U)}else{ia=a;ja=0;ka=0;la=0;ma=0;na=0;oa=0}while(0);a=(ja|0)>-1|(ja|0)==-1&ka>>>0>4294967295;U=Vn(0,0,ka|0,ja|0)|0;R=a?ja:I;Q=(la|0)>-1|(la|0)==-1&ma>>>0>4294967295;P=Vn(0,0,ma|0,la|0)|0;M=Q?la:I;t=(na|0)>-1|(na|0)==-1&oa>>>0>4294967295;c=Vn(0,0,oa|0,na|0)|0;i=Tn((Q?ma:P)|0,M|0,(t?oa:c)|0,(t?na:I)|0)|0;t=Tn(i|0,I|0,(a?ka:U)|0,R|0)|0;R=I;if(ia){if((t|0)<=536870912){pa=ka;qa=ma;ra=oa;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}ia=Wn(t|0,R|0,29)|0;U=ia&7;ia=zk(ka|0,ja|0,U|0,0)|0;a=zk(ma|0,la|0,U|0,0)|0;i=zk(oa|0,na|0,U|0,0)|0;pa=ia;qa=a;ra=i;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}else{if(!((R|0)>0|(R|0)==0&t>>>0>536870912)){pa=ka;qa=ma;ra=oa;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}i=Wn(t|0,R|0,29)|0;R=I;t=zk(ka|0,ja|0,i|0,R|0)|0;ja=zk(ma|0,la|0,i|0,R|0)|0;la=zk(oa|0,na|0,i|0,R|0)|0;pa=t;qa=ja;ra=la;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}}function gc(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=Oa,V=Oa,X=Oa,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0;g=u;u=u+48|0;i=g+28|0;j=g+8|0;k=g;l=g+16|0;m=i+16|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[m>>2]=$(1.0);o=a+80|0;p=f[o>>2]|0;f[l>>2]=0;q=l+4|0;f[q>>2]=0;f[l+8>>2]=0;if(p){if(p>>>0>1073741823)mq(l);r=p<<2;s=dn(r)|0;f[l>>2]=s;t=s+(p<<2)|0;f[l+8>>2]=t;hj(s|0,0,r|0)|0;f[q>>2]=t;t=f[e>>2]|0;e=c+48|0;r=c+40|0;s=i+4|0;p=i+12|0;v=i+8|0;w=a+40|0;x=a+64|0;y=0;z=0;while(1){A=e;B=f[A>>2]|0;C=f[A+4>>2]|0;A=r;D=on(f[A>>2]|0,f[A+4>>2]|0,t+y|0,0)|0;A=Tn(D|0,I|0,B|0,C|0)|0;C=(f[f[c>>2]>>2]|0)+A|0;A=C;B=h[A>>0]|h[A+1>>0]<<8|h[A+2>>0]<<16|h[A+3>>0]<<24;A=C+4|0;C=h[A>>0]|h[A+1>>0]<<8|h[A+2>>0]<<16|h[A+3>>0]<<24;A=j;f[A>>2]=B;f[A+4>>2]=C;A=k;f[A>>2]=B;f[A+4>>2]=C;C=kf(i,k)|0;if(!C){A=k;B=f[A>>2]|0;D=f[A+4>>2]|0;A=B&65535;E=Wn(B|0,D|0,16)|0;F=E&65535;G=D&65535;H=Wn(B|0,D|0,48)|0;J=H&65535;K=((((A^318)&65535)+239^E&65535)+239^D&65535)+239^H&65535;H=f[s>>2]|0;E=(H|0)==0;a:do if(!E){L=H+-1|0;M=(L&H|0)==0;if(!M)if(K>>>0>>0)N=K;else N=(K>>>0)%(H>>>0)|0;else N=K&L;O=f[(f[i>>2]|0)+(N<<2)>>2]|0;if((O|0)!=0?(P=f[O>>2]|0,(P|0)!=0):0){if(M){M=P;while(1){O=f[M+4>>2]|0;if(!((O|0)==(K|0)|(O&L|0)==(N|0))){Q=N;R=31;break a}O=M+8|0;if((((d[O>>1]|0)==A<<16>>16?(d[O+2>>1]|0)==F<<16>>16:0)?(d[M+12>>1]|0)==G<<16>>16:0)?(d[O+6>>1]|0)==J<<16>>16:0)break a;M=f[M>>2]|0;if(!M){Q=N;R=31;break a}}}else S=P;while(1){M=f[S+4>>2]|0;if((M|0)!=(K|0)){if(M>>>0>>0)T=M;else T=(M>>>0)%(H>>>0)|0;if((T|0)!=(N|0)){Q=N;R=31;break a}}M=S+8|0;if((((d[M>>1]|0)==A<<16>>16?(d[M+2>>1]|0)==F<<16>>16:0)?(d[S+12>>1]|0)==G<<16>>16:0)?(d[M+6>>1]|0)==J<<16>>16:0)break a;S=f[S>>2]|0;if(!S){Q=N;R=31;break}}}else{Q=N;R=31}}else{Q=0;R=31}while(0);if((R|0)==31){R=0;J=dn(20)|0;G=J+8|0;F=G;d[F>>1]=B;d[F+2>>1]=B>>>16;F=G+4|0;d[F>>1]=D;d[F+2>>1]=D>>>16;f[J+16>>2]=z;f[J+4>>2]=K;f[J>>2]=0;U=$(((f[p>>2]|0)+1|0)>>>0);V=$(H>>>0);X=$(n[m>>2]);do if(E|$(X*V)>>0<3|(H+-1&H|0)!=0)&1;G=~~$(W($(U/X)))>>>0;Ch(i,F>>>0>>0?G:F);F=f[s>>2]|0;G=F+-1|0;if(!(G&F)){Y=F;Z=G&K;break}if(K>>>0>>0){Y=F;Z=K}else{Y=F;Z=(K>>>0)%(F>>>0)|0}}else{Y=H;Z=Q}while(0);H=(f[i>>2]|0)+(Z<<2)|0;K=f[H>>2]|0;if(!K){f[J>>2]=f[v>>2];f[v>>2]=J;f[H>>2]=v;H=f[J>>2]|0;if(H|0){E=f[H+4>>2]|0;H=Y+-1|0;if(H&Y)if(E>>>0>>0)_=E;else _=(E>>>0)%(Y>>>0)|0;else _=E&H;aa=(f[i>>2]|0)+(_<<2)|0;R=44}}else{f[J>>2]=f[K>>2];aa=K;R=44}if((R|0)==44){R=0;f[aa>>2]=J}f[p>>2]=(f[p>>2]|0)+1}K=w;H=f[K>>2]|0;E=on(H|0,f[K+4>>2]|0,z|0,0)|0;Rg((f[f[x>>2]>>2]|0)+E|0,j|0,H|0)|0;H=f[l>>2]|0;f[H+(y<<2)>>2]=z;ba=z+1|0;ca=H}else{H=f[l>>2]|0;f[H+(y<<2)>>2]=f[C+16>>2];ba=z;ca=H}y=y+1|0;da=f[o>>2]|0;if(y>>>0>=da>>>0)break;else z=ba}if((ba|0)==(da|0))ea=ca;else{z=a+84|0;if(!(b[z>>0]|0)){y=f[a+72>>2]|0;j=f[a+68>>2]|0;x=j;if((y|0)==(j|0))fa=ca;else{w=y-j>>2;j=0;do{y=x+(j<<2)|0;f[y>>2]=f[ca+(f[y>>2]<<2)>>2];j=j+1|0}while(j>>>0>>0);fa=ca}}else{b[z>>0]=0;z=a+68|0;ca=a+72|0;w=f[ca>>2]|0;j=f[z>>2]|0;x=w-j>>2;y=j;j=w;if(da>>>0<=x>>>0)if(da>>>0>>0?(w=y+(da<<2)|0,(w|0)!=(j|0)):0){f[ca>>2]=j+(~((j+-4-w|0)>>>2)<<2);ga=da}else ga=da;else{kh(z,da-x|0,1204);ga=f[o>>2]|0}x=f[l>>2]|0;if(!ga)fa=x;else{l=f[a+68>>2]|0;a=0;do{f[l+(a<<2)>>2]=f[x+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);fa=x}}f[o>>2]=ba;ea=fa}if(!ea)ha=ba;else{fa=f[q>>2]|0;if((fa|0)!=(ea|0))f[q>>2]=fa+(~((fa+-4-ea|0)>>>2)<<2);br(ea);ha=ba}}else ha=0;ba=f[i+8>>2]|0;if(ba|0){ea=ba;do{ba=ea;ea=f[ea>>2]|0;br(ba)}while((ea|0)!=0)}ea=f[i>>2]|0;f[i>>2]=0;if(!ea){u=g;return ha|0}br(ea);u=g;return ha|0}function hc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;c=u;u=u+16|0;d=c+8|0;e=c;g=c+4|0;h=a+16|0;i=f[h>>2]|0;j=a+20|0;k=f[j>>2]|0;if((k|0)==(i|0))l=i;else{m=k+(~((k+-4-i|0)>>>2)<<2)|0;f[j>>2]=m;l=m}m=a+24|0;if((l|0)==(f[m>>2]|0)){Ci(h,b);n=f[h>>2]|0;o=f[j>>2]|0}else{f[l>>2]=f[b>>2];k=l+4|0;f[j>>2]=k;n=i;o=k}k=f[a+8>>2]|0;i=(f[k+100>>2]|0)-(f[k+96>>2]|0)|0;k=(i|0)/12|0;if((n|0)==(o|0)){u=c;return 1}n=a+28|0;l=(i|0)>0;i=a+164|0;p=a+12|0;q=a+76|0;r=a+80|0;s=a+72|0;t=a+152|0;v=a+84|0;w=a+272|0;x=a+276|0;y=a+268|0;z=a+168|0;A=a+140|0;B=a+120|0;C=o;do{o=f[C+-4>>2]|0;f[b>>2]=o;a:do if((o|0)!=-1?(D=(o>>>0)/3|0,E=f[n>>2]|0,(f[E+(D>>>5<<2)>>2]&1<<(D&31)|0)==0):0){if(l){D=0;F=E;b:while(1){E=D+1|0;f[i>>2]=(f[i>>2]|0)+1;G=f[b>>2]|0;H=(G|0)==-1?-1:(G>>>0)/3|0;G=F+(H>>>5<<2)|0;f[G>>2]=1<<(H&31)|f[G>>2];G=f[q>>2]|0;if((G|0)==(f[r>>2]|0))Ci(s,b);else{f[G>>2]=f[b>>2];f[q>>2]=G+4}G=f[b>>2]|0;if((G|0)==-1)I=-1;else I=f[(f[f[p>>2]>>2]|0)+(G<<2)>>2]|0;J=(f[(f[t>>2]|0)+(I<<2)>>2]|0)!=-1;K=(f[v>>2]|0)+(I>>>5<<2)|0;L=1<<(I&31);M=f[K>>2]|0;do if(!(M&L)){f[K>>2]=M|L;if(J){N=f[b>>2]|0;O=30;break}f[d>>2]=0;P=f[w>>2]|0;if((P|0)==(f[x>>2]|0))Ci(y,d);else{f[P>>2]=0;f[w>>2]=P+4}P=f[b>>2]|0;Q=P+1|0;if((P|0)!=-1?(R=((Q>>>0)%3|0|0)==0?P+-2|0:Q,(R|0)!=-1):0)S=f[(f[(f[p>>2]|0)+12>>2]|0)+(R<<2)>>2]|0;else S=-1;f[b>>2]=S}else{N=G;O=30}while(0);if((O|0)==30){O=0;G=N+1|0;if((N|0)==-1){O=35;break}L=((G>>>0)%3|0|0)==0?N+-2|0:G;if((L|0)==-1)T=-1;else T=f[(f[(f[p>>2]|0)+12>>2]|0)+(L<<2)>>2]|0;f[e>>2]=T;L=(((N>>>0)%3|0|0)==0?2:-1)+N|0;if((L|0)==-1)U=-1;else U=f[(f[(f[p>>2]|0)+12>>2]|0)+(L<<2)>>2]|0;L=(T|0)==-1;M=L?-1:(T>>>0)/3|0;V=(U|0)==-1;W=V?-1:(U>>>0)/3|0;K=((G>>>0)%3|0|0)==0?N+-2|0:G;if(((K|0)!=-1?(G=f[(f[p>>2]|0)+12>>2]|0,R=f[G+(K<<2)>>2]|0,(R|0)!=-1):0)?(K=(R>>>0)/3|0,R=f[n>>2]|0,(f[R+(K>>>5<<2)>>2]&1<<(K&31)|0)==0):0){K=(((N>>>0)%3|0|0)==0?2:-1)+N|0;do if((K|0)!=-1){Q=f[G+(K<<2)>>2]|0;if((Q|0)==-1)break;P=(Q>>>0)/3|0;if(!(f[R+(P>>>5<<2)>>2]&1<<(P&31))){O=63;break b}}while(0);if(!V)jf(a,f[i>>2]|0,H,0,W);f[d>>2]=3;R=f[w>>2]|0;if((R|0)==(f[x>>2]|0))Ci(y,d);else{f[R>>2]=3;f[w>>2]=R+4}X=f[e>>2]|0}else{if(!L){jf(a,f[i>>2]|0,H,1,M);R=f[b>>2]|0;if((R|0)==-1){O=44;break}else Y=R}else Y=N;R=(((Y>>>0)%3|0|0)==0?2:-1)+Y|0;if((R|0)==-1){O=44;break}K=f[(f[(f[p>>2]|0)+12>>2]|0)+(R<<2)>>2]|0;if((K|0)==-1){O=44;break}R=(K>>>0)/3|0;if(f[(f[n>>2]|0)+(R>>>5<<2)>>2]&1<<(R&31)|0){O=44;break}f[d>>2]=5;R=f[w>>2]|0;if((R|0)==(f[x>>2]|0))Ci(y,d);else{f[R>>2]=5;f[w>>2]=R+4}X=U}f[b>>2]=X}if((E|0)>=(k|0))break a;D=E;F=f[n>>2]|0}do if((O|0)==35){O=0;f[e>>2]=-1;O=46}else if((O|0)==44){O=0;if(V)O=46;else{jf(a,f[i>>2]|0,H,0,W);O=46}}else if((O|0)==63){O=0;f[d>>2]=1;F=f[w>>2]|0;if((F|0)==(f[x>>2]|0))Ci(y,d);else{f[F>>2]=1;f[w>>2]=F+4}f[z>>2]=(f[z>>2]|0)+1;if(J?(F=f[(f[t>>2]|0)+(I<<2)>>2]|0,(1<<(F&31)&f[(f[A>>2]|0)+(F>>>5<<2)>>2]|0)==0):0){f[g>>2]=f[b>>2];f[d>>2]=f[g>>2];Ce(a,d,0)|0}F=f[i>>2]|0;f[d>>2]=H;D=Sd(B,d)|0;f[D>>2]=F;F=f[j>>2]|0;f[F+-4>>2]=U;if((F|0)==(f[m>>2]|0)){Ci(h,e);break}else{f[F>>2]=f[e>>2];f[j>>2]=F+4;break}}while(0);if((O|0)==46){O=0;f[d>>2]=7;F=f[w>>2]|0;if((F|0)==(f[x>>2]|0))Ci(y,d);else{f[F>>2]=7;f[w>>2]=F+4}f[j>>2]=(f[j>>2]|0)+-4}}}else O=11;while(0);if((O|0)==11){O=0;f[j>>2]=C+-4}C=f[j>>2]|0}while((f[h>>2]|0)!=(C|0));u=c;return 1}function ic(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=Oa,V=Oa,X=Oa,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0;e=u;u=u+48|0;g=e+20|0;i=e+16|0;j=e+12|0;k=e;l=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[l>>2]=$(1.0);m=a+80|0;o=f[m>>2]|0;f[k>>2]=0;p=k+4|0;f[p>>2]=0;f[k+8>>2]=0;if(o){if(o>>>0>1073741823)mq(k);q=o<<2;r=dn(q)|0;f[k>>2]=r;s=r+(o<<2)|0;f[k+8>>2]=s;hj(r|0,0,q|0)|0;f[p>>2]=s;s=f[d>>2]|0;d=c+48|0;q=c+40|0;r=g+4|0;o=g+12|0;t=g+8|0;v=a+40|0;w=a+64|0;x=0;y=0;while(1){z=d;A=f[z>>2]|0;B=f[z+4>>2]|0;z=q;C=on(f[z>>2]|0,f[z+4>>2]|0,s+x|0,0)|0;z=Tn(C|0,I|0,A|0,B|0)|0;B=(f[f[c>>2]>>2]|0)+z|0;z=h[B>>0]|h[B+1>>0]<<8|h[B+2>>0]<<16|h[B+3>>0]<<24;f[i>>2]=z;f[j>>2]=z;z=pf(g,j)|0;if(!z){B=f[j>>2]|0;A=B&255;C=B>>>8;D=C&255;E=B>>>16;F=E&255;G=B>>>24;H=G&255;J=C&255;C=E&255;E=(((B&255^318)+239^J)+239^C)+239^G;G=f[r>>2]|0;K=(G|0)==0;a:do if(!K){L=G+-1|0;M=(L&G|0)==0;if(!M)if(E>>>0>>0)N=E;else N=(E>>>0)%(G>>>0)|0;else N=E&L;O=f[(f[g>>2]|0)+(N<<2)>>2]|0;if((O|0)!=0?(P=f[O>>2]|0,(P|0)!=0):0){if(M){M=P;while(1){O=f[M+4>>2]|0;if(!((O|0)==(E|0)|(O&L|0)==(N|0))){Q=N;R=31;break a}O=M+8|0;if((((b[O>>0]|0)==A<<24>>24?(b[O+1>>0]|0)==D<<24>>24:0)?(b[O+2>>0]|0)==F<<24>>24:0)?(b[O+3>>0]|0)==H<<24>>24:0)break a;M=f[M>>2]|0;if(!M){Q=N;R=31;break a}}}else S=P;while(1){M=f[S+4>>2]|0;if((M|0)!=(E|0)){if(M>>>0>>0)T=M;else T=(M>>>0)%(G>>>0)|0;if((T|0)!=(N|0)){Q=N;R=31;break a}}M=S+8|0;if((((b[M>>0]|0)==A<<24>>24?(b[M+1>>0]|0)==D<<24>>24:0)?(b[M+2>>0]|0)==F<<24>>24:0)?(b[M+3>>0]|0)==H<<24>>24:0)break a;S=f[S>>2]|0;if(!S){Q=N;R=31;break}}}else{Q=N;R=31}}else{Q=0;R=31}while(0);if((R|0)==31){R=0;H=dn(16)|0;F=H+8|0;D=B&-16776961|C<<16|J<<8;b[F>>0]=D;b[F+1>>0]=D>>8;b[F+2>>0]=D>>16;b[F+3>>0]=D>>24;f[H+12>>2]=y;f[H+4>>2]=E;f[H>>2]=0;U=$(((f[o>>2]|0)+1|0)>>>0);V=$(G>>>0);X=$(n[l>>2]);do if(K|$(X*V)>>0<3|(G+-1&G|0)!=0)&1;F=~~$(W($(U/X)))>>>0;Jh(g,D>>>0>>0?F:D);D=f[r>>2]|0;F=D+-1|0;if(!(F&D)){Y=D;Z=F&E;break}if(E>>>0>>0){Y=D;Z=E}else{Y=D;Z=(E>>>0)%(D>>>0)|0}}else{Y=G;Z=Q}while(0);G=(f[g>>2]|0)+(Z<<2)|0;E=f[G>>2]|0;if(!E){f[H>>2]=f[t>>2];f[t>>2]=H;f[G>>2]=t;G=f[H>>2]|0;if(G|0){K=f[G+4>>2]|0;G=Y+-1|0;if(G&Y)if(K>>>0>>0)_=K;else _=(K>>>0)%(Y>>>0)|0;else _=K&G;aa=(f[g>>2]|0)+(_<<2)|0;R=44}}else{f[H>>2]=f[E>>2];aa=E;R=44}if((R|0)==44){R=0;f[aa>>2]=H}f[o>>2]=(f[o>>2]|0)+1}E=v;G=f[E>>2]|0;K=on(G|0,f[E+4>>2]|0,y|0,0)|0;Rg((f[f[w>>2]>>2]|0)+K|0,i|0,G|0)|0;G=f[k>>2]|0;f[G+(x<<2)>>2]=y;ba=y+1|0;ca=G}else{G=f[k>>2]|0;f[G+(x<<2)>>2]=f[z+12>>2];ba=y;ca=G}x=x+1|0;da=f[m>>2]|0;if(x>>>0>=da>>>0)break;else y=ba}if((ba|0)==(da|0))ea=ca;else{y=a+84|0;if(!(b[y>>0]|0)){x=f[a+72>>2]|0;i=f[a+68>>2]|0;w=i;if((x|0)==(i|0))fa=ca;else{v=x-i>>2;i=0;do{x=w+(i<<2)|0;f[x>>2]=f[ca+(f[x>>2]<<2)>>2];i=i+1|0}while(i>>>0>>0);fa=ca}}else{b[y>>0]=0;y=a+68|0;ca=a+72|0;v=f[ca>>2]|0;i=f[y>>2]|0;w=v-i>>2;x=i;i=v;if(da>>>0<=w>>>0)if(da>>>0>>0?(v=x+(da<<2)|0,(v|0)!=(i|0)):0){f[ca>>2]=i+(~((i+-4-v|0)>>>2)<<2);ga=da}else ga=da;else{kh(y,da-w|0,1204);ga=f[m>>2]|0}w=f[k>>2]|0;if(!ga)fa=w;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[w+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);fa=w}}f[m>>2]=ba;ea=fa}if(!ea)ha=ba;else{fa=f[p>>2]|0;if((fa|0)!=(ea|0))f[p>>2]=fa+(~((fa+-4-ea|0)>>>2)<<2);br(ea);ha=ba}}else ha=0;ba=f[g+8>>2]|0;if(ba|0){ea=ba;do{ba=ea;ea=f[ea>>2]|0;br(ba)}while((ea|0)!=0)}ea=f[g>>2]|0;f[g>>2]=0;if(!ea){u=e;return ha|0}br(ea);u=e;return ha|0}function jc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=Oa,V=Oa,X=Oa,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0;e=u;u=u+80|0;g=e+48|0;h=e+32|0;i=e+16|0;j=e;k=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[k>>2]=$(1.0);l=a+80|0;m=f[l>>2]|0;f[j>>2]=0;o=j+4|0;f[o>>2]=0;f[j+8>>2]=0;if(m){if(m>>>0>1073741823)mq(j);p=m<<2;q=dn(p)|0;f[j>>2]=q;r=q+(m<<2)|0;f[j+8>>2]=r;hj(q|0,0,p|0)|0;f[o>>2]=r;r=f[d>>2]|0;d=c+48|0;p=c+40|0;q=i+4|0;m=i+8|0;s=i+12|0;t=g+4|0;v=g+12|0;w=g+8|0;x=a+40|0;y=a+64|0;z=0;A=0;while(1){B=d;C=f[B>>2]|0;D=f[B+4>>2]|0;B=p;E=on(f[B>>2]|0,f[B+4>>2]|0,r+A|0,0)|0;B=Tn(E|0,I|0,C|0,D|0)|0;D=(f[f[c>>2]>>2]|0)+B|0;B=h;C=D;E=B+16|0;do{b[B>>0]=b[C>>0]|0;B=B+1|0;C=C+1|0}while((B|0)<(E|0));Xl(i|0,D|0,16)|0;C=Ff(g,i)|0;if(!C){B=f[i>>2]|0;E=f[q>>2]|0;F=f[m>>2]|0;G=f[s>>2]|0;H=(((B^318)+239^E)+239^F)+239^G;J=f[t>>2]|0;K=(J|0)==0;a:do if(!K){L=J+-1|0;M=(L&J|0)==0;if(!M)if(H>>>0>>0)N=H;else N=(H>>>0)%(J>>>0)|0;else N=H&L;O=f[(f[g>>2]|0)+(N<<2)>>2]|0;if((O|0)!=0?(P=f[O>>2]|0,(P|0)!=0):0){if(M){M=P;while(1){O=f[M+4>>2]|0;if(!((O|0)==(H|0)|(O&L|0)==(N|0))){Q=N;R=31;break a}if((((f[M+8>>2]|0)==(B|0)?(f[M+12>>2]|0)==(E|0):0)?(f[M+16>>2]|0)==(F|0):0)?(f[M+20>>2]|0)==(G|0):0)break a;M=f[M>>2]|0;if(!M){Q=N;R=31;break a}}}else S=P;while(1){M=f[S+4>>2]|0;if((M|0)!=(H|0)){if(M>>>0>>0)T=M;else T=(M>>>0)%(J>>>0)|0;if((T|0)!=(N|0)){Q=N;R=31;break a}}if((((f[S+8>>2]|0)==(B|0)?(f[S+12>>2]|0)==(E|0):0)?(f[S+16>>2]|0)==(F|0):0)?(f[S+20>>2]|0)==(G|0):0)break a;S=f[S>>2]|0;if(!S){Q=N;R=31;break}}}else{Q=N;R=31}}else{Q=0;R=31}while(0);if((R|0)==31){R=0;D=dn(28)|0;f[D+8>>2]=B;f[D+12>>2]=E;f[D+16>>2]=F;f[D+20>>2]=G;f[D+24>>2]=z;f[D+4>>2]=H;f[D>>2]=0;U=$(((f[v>>2]|0)+1|0)>>>0);V=$(J>>>0);X=$(n[k>>2]);do if(K|$(X*V)>>0<3|(J+-1&J|0)!=0)&1;M=~~$(W($(U/X)))>>>0;Gh(g,P>>>0>>0?M:P);P=f[t>>2]|0;M=P+-1|0;if(!(M&P)){Y=P;Z=M&H;break}if(H>>>0

>>0){Y=P;Z=H}else{Y=P;Z=(H>>>0)%(P>>>0)|0}}else{Y=J;Z=Q}while(0);J=(f[g>>2]|0)+(Z<<2)|0;H=f[J>>2]|0;if(!H){f[D>>2]=f[w>>2];f[w>>2]=D;f[J>>2]=w;J=f[D>>2]|0;if(J|0){K=f[J+4>>2]|0;J=Y+-1|0;if(J&Y)if(K>>>0>>0)_=K;else _=(K>>>0)%(Y>>>0)|0;else _=K&J;aa=(f[g>>2]|0)+(_<<2)|0;R=44}}else{f[D>>2]=f[H>>2];aa=H;R=44}if((R|0)==44){R=0;f[aa>>2]=D}f[v>>2]=(f[v>>2]|0)+1}H=x;J=f[H>>2]|0;K=on(J|0,f[H+4>>2]|0,z|0,0)|0;Rg((f[f[y>>2]>>2]|0)+K|0,h|0,J|0)|0;J=f[j>>2]|0;f[J+(A<<2)>>2]=z;ba=z+1|0;ca=J}else{J=f[j>>2]|0;f[J+(A<<2)>>2]=f[C+24>>2];ba=z;ca=J}A=A+1|0;da=f[l>>2]|0;if(A>>>0>=da>>>0)break;else z=ba}if((ba|0)==(da|0))ea=ca;else{z=a+84|0;if(!(b[z>>0]|0)){A=f[a+72>>2]|0;h=f[a+68>>2]|0;y=h;if((A|0)==(h|0))fa=ca;else{x=A-h>>2;h=0;do{A=y+(h<<2)|0;f[A>>2]=f[ca+(f[A>>2]<<2)>>2];h=h+1|0}while(h>>>0>>0);fa=ca}}else{b[z>>0]=0;z=a+68|0;ca=a+72|0;x=f[ca>>2]|0;h=f[z>>2]|0;y=x-h>>2;A=h;h=x;if(da>>>0<=y>>>0)if(da>>>0>>0?(x=A+(da<<2)|0,(x|0)!=(h|0)):0){f[ca>>2]=h+(~((h+-4-x|0)>>>2)<<2);ga=da}else ga=da;else{kh(z,da-y|0,1204);ga=f[l>>2]|0}y=f[j>>2]|0;if(!ga)fa=y;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[y+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);fa=y}}f[l>>2]=ba;ea=fa}if(!ea)ha=ba;else{fa=f[o>>2]|0;if((fa|0)!=(ea|0))f[o>>2]=fa+(~((fa+-4-ea|0)>>>2)<<2);br(ea);ha=ba}}else ha=0;ba=f[g+8>>2]|0;if(ba|0){ea=ba;do{ba=ea;ea=f[ea>>2]|0;br(ba)}while((ea|0)!=0)}ea=f[g>>2]|0;f[g>>2]=0;if(!ea){u=e;return ha|0}br(ea);u=e;return ha|0}function kc(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=Oa,T=Oa,U=Oa,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0;g=u;u=u+48|0;h=g+12|0;i=g+38|0;j=g+32|0;k=g;l=h+16|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;n[l>>2]=$(1.0);m=a+80|0;o=f[m>>2]|0;f[k>>2]=0;p=k+4|0;f[p>>2]=0;f[k+8>>2]=0;if(o){if(o>>>0>1073741823)mq(k);q=o<<2;r=dn(q)|0;f[k>>2]=r;s=r+(o<<2)|0;f[k+8>>2]=s;hj(r|0,0,q|0)|0;f[p>>2]=s;s=f[e>>2]|0;e=c+48|0;q=c+40|0;r=j+2|0;o=j+4|0;t=h+4|0;v=h+12|0;w=h+8|0;x=a+40|0;y=a+64|0;z=0;A=0;while(1){B=e;C=f[B>>2]|0;D=f[B+4>>2]|0;B=q;E=on(f[B>>2]|0,f[B+4>>2]|0,s+A|0,0)|0;B=Tn(E|0,I|0,C|0,D|0)|0;D=(f[f[c>>2]>>2]|0)+B|0;b[i>>0]=b[D>>0]|0;b[i+1>>0]=b[D+1>>0]|0;b[i+2>>0]=b[D+2>>0]|0;b[i+3>>0]=b[D+3>>0]|0;b[i+4>>0]=b[D+4>>0]|0;b[i+5>>0]=b[D+5>>0]|0;Xl(j|0,D|0,6)|0;D=Pf(h,j)|0;if(!D){B=d[j>>1]|0;C=d[r>>1]|0;E=d[o>>1]|0;F=(((B^318)&65535)+239^C&65535)+239^E&65535;G=f[t>>2]|0;H=(G|0)==0;a:do if(!H){J=G+-1|0;K=(J&G|0)==0;if(!K)if(F>>>0>>0)L=F;else L=(F>>>0)%(G>>>0)|0;else L=F&J;M=f[(f[h>>2]|0)+(L<<2)>>2]|0;if((M|0)!=0?(N=f[M>>2]|0,(N|0)!=0):0){if(K){K=N;while(1){M=f[K+4>>2]|0;if(!((M|0)==(F|0)|(M&J|0)==(L|0))){O=L;P=29;break a}M=K+8|0;if(((d[M>>1]|0)==B<<16>>16?(d[M+2>>1]|0)==C<<16>>16:0)?(d[K+12>>1]|0)==E<<16>>16:0)break a;K=f[K>>2]|0;if(!K){O=L;P=29;break a}}}else Q=N;while(1){K=f[Q+4>>2]|0;if((K|0)!=(F|0)){if(K>>>0>>0)R=K;else R=(K>>>0)%(G>>>0)|0;if((R|0)!=(L|0)){O=L;P=29;break a}}K=Q+8|0;if(((d[K>>1]|0)==B<<16>>16?(d[K+2>>1]|0)==C<<16>>16:0)?(d[Q+12>>1]|0)==E<<16>>16:0)break a;Q=f[Q>>2]|0;if(!Q){O=L;P=29;break}}}else{O=L;P=29}}else{O=0;P=29}while(0);if((P|0)==29){P=0;N=dn(20)|0;d[N+8>>1]=B;d[N+10>>1]=C;d[N+12>>1]=E;f[N+16>>2]=z;f[N+4>>2]=F;f[N>>2]=0;S=$(((f[v>>2]|0)+1|0)>>>0);T=$(G>>>0);U=$(n[l>>2]);do if(H|$(U*T)>>0<3|(G+-1&G|0)!=0)&1;J=~~$(W($(S/U)))>>>0;Dh(h,K>>>0>>0?J:K);K=f[t>>2]|0;J=K+-1|0;if(!(J&K)){V=K;X=J&F;break}if(F>>>0>>0){V=K;X=F}else{V=K;X=(F>>>0)%(K>>>0)|0}}else{V=G;X=O}while(0);G=(f[h>>2]|0)+(X<<2)|0;F=f[G>>2]|0;if(!F){f[N>>2]=f[w>>2];f[w>>2]=N;f[G>>2]=w;G=f[N>>2]|0;if(G|0){H=f[G+4>>2]|0;G=V+-1|0;if(G&V)if(H>>>0>>0)Y=H;else Y=(H>>>0)%(V>>>0)|0;else Y=H&G;Z=(f[h>>2]|0)+(Y<<2)|0;P=42}}else{f[N>>2]=f[F>>2];Z=F;P=42}if((P|0)==42){P=0;f[Z>>2]=N}f[v>>2]=(f[v>>2]|0)+1}F=x;G=f[F>>2]|0;H=on(G|0,f[F+4>>2]|0,z|0,0)|0;Rg((f[f[y>>2]>>2]|0)+H|0,i|0,G|0)|0;G=f[k>>2]|0;f[G+(A<<2)>>2]=z;_=z+1|0;aa=G}else{G=f[k>>2]|0;f[G+(A<<2)>>2]=f[D+16>>2];_=z;aa=G}A=A+1|0;ba=f[m>>2]|0;if(A>>>0>=ba>>>0)break;else z=_}if((_|0)==(ba|0))ca=aa;else{z=a+84|0;if(!(b[z>>0]|0)){A=f[a+72>>2]|0;i=f[a+68>>2]|0;y=i;if((A|0)==(i|0))da=aa;else{x=A-i>>2;i=0;do{A=y+(i<<2)|0;f[A>>2]=f[aa+(f[A>>2]<<2)>>2];i=i+1|0}while(i>>>0>>0);da=aa}}else{b[z>>0]=0;z=a+68|0;aa=a+72|0;x=f[aa>>2]|0;i=f[z>>2]|0;y=x-i>>2;A=i;i=x;if(ba>>>0<=y>>>0)if(ba>>>0>>0?(x=A+(ba<<2)|0,(x|0)!=(i|0)):0){f[aa>>2]=i+(~((i+-4-x|0)>>>2)<<2);ea=ba}else ea=ba;else{kh(z,ba-y|0,1204);ea=f[m>>2]|0}y=f[k>>2]|0;if(!ea)da=y;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[y+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);da=y}}f[m>>2]=_;ca=da}if(!ca)fa=_;else{da=f[p>>2]|0;if((da|0)!=(ca|0))f[p>>2]=da+(~((da+-4-ca|0)>>>2)<<2);br(ca);fa=_}}else fa=0;_=f[h+8>>2]|0;if(_|0){ca=_;do{_=ca;ca=f[ca>>2]|0;br(_)}while((ca|0)!=0)}ca=f[h>>2]|0;f[h>>2]=0;if(!ca){u=g;return fa|0}br(ca);u=g;return fa|0}function lc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;d=u;u=u+80|0;e=d+72|0;g=d+64|0;h=d;i=d+68|0;j=d+60|0;k=a+352|0;if(b[k>>0]|0?(l=Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0,((f[l+12>>2]|0)-(f[l+8>>2]|0)|0)>0):0){l=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+8|0;m=f[f[l>>2]>>2]|0;f[e>>2]=c;l=m+4|0;n=m+8|0;o=f[n>>2]|0;if((o|0)==(f[m+12>>2]|0))Ci(l,e);else{f[o>>2]=c;f[n>>2]=o+4}o=f[e>>2]|0;p=m+16|0;q=m+20|0;m=f[q>>2]|0;r=f[p>>2]|0;s=m-r>>2;t=r;if((o|0)<(s|0)){v=t;w=o}else{r=o+1|0;f[g>>2]=-1;x=m;if(r>>>0<=s>>>0)if(r>>>0>>0?(m=t+(r<<2)|0,(m|0)!=(x|0)):0){f[q>>2]=x+(~((x+-4-m|0)>>>2)<<2);y=o;z=t}else{y=o;z=t}else{kh(p,r-s|0,g);y=f[e>>2]|0;z=f[p>>2]|0}v=z;w=y}f[v+(w<<2)>>2]=((f[n>>2]|0)-(f[l>>2]|0)>>2)+-1;A=1;u=d;return A|0}l=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+56|0;n=f[(f[(f[l>>2]|0)+84>>2]|0)+(c<<2)>>2]|0;l=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+4|0;w=f[(f[(f[l>>2]|0)+8>>2]|0)+(c<<2)>>2]|0;f[g>>2]=-1;l=a+172|0;v=f[a+176>>2]|0;y=f[l>>2]|0;z=y;a:do if((v|0)==(y|0))B=-1;else{p=(v-y|0)/136|0;s=0;while(1){if((f[z+(s*136|0)>>2]|0)==(c|0))break;r=s+1|0;if(r>>>0

>>0)s=r;else{B=-1;break a}}f[g>>2]=s;B=s}while(0);b:do if(!(b[k>>0]|0)){y=(f[w+56>>2]|0)==0;do if(!((n|0)==0|y)){if((n|0)==1?b[z+(B*136|0)+28>>0]|0:0)break;v=z+(B*136|0)+104|0;p=z+(B*136|0)+4|0;r=(f[z+(B*136|0)+60>>2]|0)-(f[z+(B*136|0)+56>>2]|0)>>2;f[e>>2]=-1;Sf(z+(B*136|0)+116|0,r,e);r=dn(80)|0;t=f[a+8>>2]|0;f[r+4>>2]=0;f[r>>2]=3164;o=r+8|0;m=r+12|0;x=m+44|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(x|0));f[o>>2]=3188;q=r+56|0;f[q>>2]=0;f[r+60>>2]=0;f[r+64>>2]=0;f[r+68>>2]=t;f[r+72>>2]=v;C=r+76|0;f[C>>2]=0;D=h+4|0;m=D+4|0;x=m+40|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(x|0));f[h>>2]=3188;m=h+48|0;f[m>>2]=0;x=h+52|0;f[x>>2]=0;f[h+56>>2]=0;f[D>>2]=p;E=f[z+(B*136|0)+68>>2]|0;F=((f[E+4>>2]|0)-(f[E>>2]|0)>>2>>>0)/3|0;b[e>>0]=0;Xg(h+24|0,F,e);F=f[D>>2]|0;E=(f[F+56>>2]|0)-(f[F+52>>2]|0)>>2;b[e>>0]=0;Xg(h+36|0,E,e);f[h+8>>2]=p;f[h+12>>2]=v;f[h+16>>2]=t;f[h+20>>2]=r;f[C>>2]=a+72;ef(o,h)|0;Yf(q,f[m>>2]|0,f[x>>2]|0);E=r;f[h>>2]=3188;F=f[m>>2]|0;if(F|0){m=f[x>>2]|0;if((m|0)!=(F|0))f[x>>2]=m+(~((m+-4-F|0)>>>2)<<2);br(F)}f[h>>2]=3208;F=f[h+36>>2]|0;if(F|0)br(F);F=f[h+24>>2]|0;if(F|0)br(F);G=0;H=E;I=42;break b}while(0);if(!y){s=f[a+12>>2]|0;E=(f[s+28>>2]|0)-(f[s+24>>2]|0)>>2;f[e>>2]=-1;Sf(z+(B*136|0)+116|0,E,e);b[(f[l>>2]|0)+((f[g>>2]|0)*136|0)+100>>0]=0;J=z+(B*136|0)+104|0;I=26}else I=24}else I=24;while(0);if((I|0)==24){J=a+40|0;I=26}if((I|0)==26){B=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+48|0;do if((Yh(f[B>>2]|0)|0)==0?(f[w+56>>2]|0)==0:0){if(b[k>>0]|0?(z=f[a+8>>2]|0,((f[z+12>>2]|0)-(f[z+8>>2]|0)|0)>=5):0){I=31;break}uf(e,a,J);K=1;L=f[e>>2]|0}else I=31;while(0);if((I|0)==31){Le(e,a,J);K=0;L=f[e>>2]|0}if(!L)M=0;else{G=K;H=L;I=42}}if((I|0)==42){I=f[g>>2]|0;if((I|0)==-1)N=a+68|0;else N=(f[l>>2]|0)+(I*136|0)+132|0;f[N>>2]=G;G=dn(76)|0;f[i>>2]=H;ml(G,i,c);c=G;G=f[i>>2]|0;f[i>>2]=0;if(G|0)Va[f[(f[G>>2]|0)+4>>2]&127](G);G=a+188|0;i=f[G>>2]|0;if((i|0)==(f[a+192>>2]|0))Ci(a+184|0,g);else{f[i>>2]=f[g>>2];f[G>>2]=i+4}i=Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0;f[j>>2]=c;a=i+12|0;G=f[a>>2]|0;if(G>>>0<(f[i+16>>2]|0)>>>0){f[j>>2]=0;f[G>>2]=c;f[a>>2]=G+4;O=j}else{yg(i+8|0,j);O=j}j=f[O>>2]|0;f[O>>2]=0;if(!j)M=1;else{Va[f[(f[j>>2]|0)+4>>2]&127](j);M=1}}A=M;u=d;return A|0}function mc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;d=u;u=u+80|0;e=d+72|0;g=d+64|0;h=d;i=d+68|0;j=d+60|0;k=a+288|0;if(b[k>>0]|0?(l=Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0,((f[l+12>>2]|0)-(f[l+8>>2]|0)|0)>0):0){l=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+8|0;m=f[f[l>>2]>>2]|0;f[e>>2]=c;l=m+4|0;n=m+8|0;o=f[n>>2]|0;if((o|0)==(f[m+12>>2]|0))Ci(l,e);else{f[o>>2]=c;f[n>>2]=o+4}o=f[e>>2]|0;p=m+16|0;q=m+20|0;m=f[q>>2]|0;r=f[p>>2]|0;s=m-r>>2;t=r;if((o|0)<(s|0)){v=t;w=o}else{r=o+1|0;f[g>>2]=-1;x=m;if(r>>>0<=s>>>0)if(r>>>0>>0?(m=t+(r<<2)|0,(m|0)!=(x|0)):0){f[q>>2]=x+(~((x+-4-m|0)>>>2)<<2);y=o;z=t}else{y=o;z=t}else{kh(p,r-s|0,g);y=f[e>>2]|0;z=f[p>>2]|0}v=z;w=y}f[v+(w<<2)>>2]=((f[n>>2]|0)-(f[l>>2]|0)>>2)+-1;A=1;u=d;return A|0}l=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+56|0;n=f[(f[(f[l>>2]|0)+84>>2]|0)+(c<<2)>>2]|0;l=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+4|0;w=f[(f[(f[l>>2]|0)+8>>2]|0)+(c<<2)>>2]|0;f[g>>2]=-1;l=a+172|0;v=f[a+176>>2]|0;y=f[l>>2]|0;z=y;a:do if((v|0)==(y|0))B=-1;else{p=(v-y|0)/136|0;s=0;while(1){if((f[z+(s*136|0)>>2]|0)==(c|0))break;r=s+1|0;if(r>>>0

>>0)s=r;else{B=-1;break a}}f[g>>2]=s;B=s}while(0);b:do if(!(b[k>>0]|0)){y=(f[w+56>>2]|0)==0;do if(!((n|0)==0|y)){if((n|0)==1?b[z+(B*136|0)+28>>0]|0:0)break;v=z+(B*136|0)+104|0;p=z+(B*136|0)+4|0;r=(f[z+(B*136|0)+60>>2]|0)-(f[z+(B*136|0)+56>>2]|0)>>2;f[e>>2]=-1;Sf(z+(B*136|0)+116|0,r,e);r=dn(80)|0;t=f[a+8>>2]|0;f[r+4>>2]=0;f[r>>2]=3164;o=r+8|0;m=r+12|0;x=m+44|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(x|0));f[o>>2]=3188;q=r+56|0;f[q>>2]=0;f[r+60>>2]=0;f[r+64>>2]=0;f[r+68>>2]=t;f[r+72>>2]=v;C=r+76|0;f[C>>2]=0;D=h+4|0;m=D+4|0;x=m+40|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(x|0));f[h>>2]=3188;m=h+48|0;f[m>>2]=0;x=h+52|0;f[x>>2]=0;f[h+56>>2]=0;f[D>>2]=p;E=f[z+(B*136|0)+68>>2]|0;F=((f[E+4>>2]|0)-(f[E>>2]|0)>>2>>>0)/3|0;b[e>>0]=0;Xg(h+24|0,F,e);F=f[D>>2]|0;E=(f[F+56>>2]|0)-(f[F+52>>2]|0)>>2;b[e>>0]=0;Xg(h+36|0,E,e);f[h+8>>2]=p;f[h+12>>2]=v;f[h+16>>2]=t;f[h+20>>2]=r;f[C>>2]=a+72;ef(o,h)|0;Yf(q,f[m>>2]|0,f[x>>2]|0);E=r;f[h>>2]=3188;F=f[m>>2]|0;if(F|0){m=f[x>>2]|0;if((m|0)!=(F|0))f[x>>2]=m+(~((m+-4-F|0)>>>2)<<2);br(F)}f[h>>2]=3208;F=f[h+36>>2]|0;if(F|0)br(F);F=f[h+24>>2]|0;if(F|0)br(F);G=0;H=E;I=42;break b}while(0);if(!y){s=f[a+12>>2]|0;E=(f[s+28>>2]|0)-(f[s+24>>2]|0)>>2;f[e>>2]=-1;Sf(z+(B*136|0)+116|0,E,e);b[(f[l>>2]|0)+((f[g>>2]|0)*136|0)+100>>0]=0;J=z+(B*136|0)+104|0;I=26}else I=24}else I=24;while(0);if((I|0)==24){J=a+40|0;I=26}if((I|0)==26){B=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+48|0;do if((Yh(f[B>>2]|0)|0)==0?(f[w+56>>2]|0)==0:0){if(b[k>>0]|0?(z=f[a+8>>2]|0,((f[z+12>>2]|0)-(f[z+8>>2]|0)|0)>=5):0){I=31;break}uf(e,a,J);K=1;L=f[e>>2]|0}else I=31;while(0);if((I|0)==31){Le(e,a,J);K=0;L=f[e>>2]|0}if(!L)M=0;else{G=K;H=L;I=42}}if((I|0)==42){I=f[g>>2]|0;if((I|0)==-1)N=a+68|0;else N=(f[l>>2]|0)+(I*136|0)+132|0;f[N>>2]=G;G=dn(76)|0;f[i>>2]=H;ml(G,i,c);c=G;G=f[i>>2]|0;f[i>>2]=0;if(G|0)Va[f[(f[G>>2]|0)+4>>2]&127](G);G=a+188|0;i=f[G>>2]|0;if((i|0)==(f[a+192>>2]|0))Ci(a+184|0,g);else{f[i>>2]=f[g>>2];f[G>>2]=i+4}i=Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0;f[j>>2]=c;a=i+12|0;G=f[a>>2]|0;if(G>>>0<(f[i+16>>2]|0)>>>0){f[j>>2]=0;f[G>>2]=c;f[a>>2]=G+4;O=j}else{yg(i+8|0,j);O=j}j=f[O>>2]|0;f[O>>2]=0;if(!j)M=1;else{Va[f[(f[j>>2]|0)+4>>2]&127](j);M=1}}A=M;u=d;return A|0}function nc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0;e=u;u=u+64|0;d=e+48|0;h=e+40|0;i=e+32|0;j=e+16|0;k=e+8|0;l=e;m=e+28|0;n=a+8|0;o=f[n>>2]|0;if((o+-2|0)>>>0<=28){f[a+72>>2]=o;p=1<>2]=p+-1;o=p+-2|0;f[a+80>>2]=o;f[a+84>>2]=(o|0)/2|0}o=a+40|0;f[a+48>>2]=g;g=a+88|0;lk(g);p=a+36|0;q=f[p>>2]|0;r=(f[q+4>>2]|0)-(f[q>>2]|0)|0;s=r>>2;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;t=k;f[t>>2]=0;f[t+4>>2]=0;t=l;f[t>>2]=0;f[t+4>>2]=0;if((r|0)<=0){u=e;return 1}r=j+4|0;t=j+8|0;v=a+84|0;w=a+80|0;x=h+4|0;y=i+4|0;z=d+4|0;A=k+4|0;B=h+4|0;C=i+4|0;D=d+4|0;E=l+4|0;F=a+76|0;a=k+4|0;G=l+4|0;H=f[q>>2]|0;if((f[q+4>>2]|0)==(H|0)){J=q;mq(J)}else{K=0;L=H}while(1){f[m>>2]=f[L+(K<<2)>>2];f[d>>2]=f[m>>2];fc(o,d,j);H=f[j>>2]|0;q=(H|0)>-1?H:0-H|0;M=f[r>>2]|0;N=(M|0)>-1?M:0-M|0;O=Tn(N|0,((N|0)<0)<<31>>31|0,q|0,((q|0)<0)<<31>>31|0)|0;q=f[t>>2]|0;N=(q|0)>-1;P=N?q:0-q|0;q=Tn(O|0,I|0,P|0,((P|0)<0)<<31>>31|0)|0;P=I;if((q|0)==0&(P|0)==0){O=f[v>>2]|0;Q=O;R=j;S=M;T=O}else{O=f[v>>2]|0;U=((O|0)<0)<<31>>31;V=on(O|0,U|0,H|0,((H|0)<0)<<31>>31|0)|0;H=zk(V|0,I|0,q|0,P|0)|0;f[j>>2]=H;V=on(O|0,U|0,M|0,((M|0)<0)<<31>>31|0)|0;M=zk(V|0,I|0,q|0,P|0)|0;f[r>>2]=M;P=O-((H|0)>-1?H:0-H|0)-((M|0)>-1?M:0-M|0)|0;Q=N?P:0-P|0;R=t;S=M;T=O}f[R>>2]=Q;O=f[j>>2]|0;do if((O|0)<=-1){if((S|0)<0){M=f[t>>2]|0;W=(M|0)>-1?M:0-M|0;X=M}else{M=f[t>>2]|0;W=(f[w>>2]|0)-((M|0)>-1?M:0-M|0)|0;X=M}if((X|0)<0){Y=(S|0)>-1?S:0-S|0;Z=W;_=X;break}else{Y=(f[w>>2]|0)-((S|0)>-1?S:0-S|0)|0;Z=W;_=X;break}}else{M=f[t>>2]|0;Y=M+T|0;Z=T+S|0;_=M}while(0);M=(Z|0)==0;P=(Y|0)==0;N=f[w>>2]|0;do if(Y|Z){H=(N|0)==(Y|0);if(!(M&H)){q=(N|0)==(Z|0);if(!(P&q)){if(M&(T|0)<(Y|0)){$=0;aa=(T<<1)-Y|0;break}if(q&(T|0)>(Y|0)){$=Z;aa=(T<<1)-Y|0;break}if(H&(T|0)>(Z|0)){$=(T<<1)-Z|0;aa=Y;break}if(P){$=(T|0)<(Z|0)?(T<<1)-Z|0:Z;aa=0}else{$=Z;aa=Y}}else{$=Z;aa=Z}}else{$=Y;aa=Y}}else{$=N;aa=N}while(0);P=0-S|0;M=0-_|0;f[j>>2]=0-O;f[r>>2]=P;f[t>>2]=M;if((O|0)<1){ba=T-_|0;ca=T-S|0}else{H=(_|0)<1?M:_;M=(S|0)<1?P:S;ba=(_|0)>0?M:N-M|0;ca=(S|0)>0?H:N-H|0}H=(ca|0)==0;M=(ba|0)==0;do if(((ba|ca|0)!=0?(P=(N|0)==(ba|0),!(H&P)):0)?(q=(N|0)==(ca|0),!(M&q)):0){if(H&(T|0)<(ba|0)){da=0;ea=(T<<1)-ba|0;break}if(q&(T|0)>(ba|0)){da=N;ea=(T<<1)-ba|0;break}if(P&(T|0)>(ca|0)){da=(T<<1)-ca|0;ea=N;break}if(M){da=(T|0)<(ca|0)?(T<<1)-ca|0:ca;ea=0}else{da=ca;ea=ba}}else{da=N;ea=N}while(0);N=K<<1;M=b+(N<<2)|0;H=M+4|0;O=f[H>>2]|0;f[h>>2]=f[M>>2];f[x>>2]=O;f[i>>2]=$;f[y>>2]=aa;Dd(d,n,h,i);O=f[d>>2]|0;f[k>>2]=O;P=f[z>>2]|0;f[A>>2]=P;q=f[H>>2]|0;f[h>>2]=f[M>>2];f[B>>2]=q;f[i>>2]=da;f[C>>2]=ea;Dd(d,n,h,i);q=f[d>>2]|0;f[l>>2]=q;M=f[D>>2]|0;f[E>>2]=M;H=f[v>>2]|0;if((H|0)>=(O|0))if((O|0)<(0-H|0))fa=(f[F>>2]|0)+O|0;else fa=O;else fa=O-(f[F>>2]|0)|0;f[k>>2]=fa;if((H|0)>=(P|0))if((P|0)<(0-H|0))ga=(f[F>>2]|0)+P|0;else ga=P;else ga=P-(f[F>>2]|0)|0;f[a>>2]=ga;if((H|0)>=(q|0))if((q|0)<(0-H|0))ha=(f[F>>2]|0)+q|0;else ha=q;else ha=q-(f[F>>2]|0)|0;f[l>>2]=ha;if((H|0)>=(M|0))if((M|0)<(0-H|0))ia=(f[F>>2]|0)+M|0;else ia=M;else ia=M-(f[F>>2]|0)|0;f[G>>2]=ia;if((((ga|0)>-1?ga:0-ga|0)+((fa|0)>-1?fa:0-fa|0)|0)<(((ha|0)>-1?ha:0-ha|0)+((ia|0)>-1?ia:0-ia|0)|0)){Vi(g,0);ja=k}else{Vi(g,1);ja=l}M=f[ja>>2]|0;if((M|0)<0)ka=(f[F>>2]|0)+M|0;else ka=M;M=c+(N<<2)|0;f[M>>2]=ka;N=f[ja+4>>2]|0;if((N|0)<0)la=(f[F>>2]|0)+N|0;else la=N;f[M+4>>2]=la;K=K+1|0;if((K|0)>=(s|0)){ma=5;break}M=f[p>>2]|0;L=f[M>>2]|0;if((f[M+4>>2]|0)-L>>2>>>0<=K>>>0){J=M;ma=6;break}}if((ma|0)==5){u=e;return 1}else if((ma|0)==6)mq(J);return 0}function oc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0;c=u;u=u+48|0;d=c+24|0;e=c+12|0;g=c;if(!b){h=0;u=c;return h|0}i=a+12|0;j=a+4|0;k=f[j>>2]|0;l=f[a>>2]|0;m=k-l>>2;n=a+16|0;o=f[n>>2]|0;p=f[i>>2]|0;q=o-p>>2;r=p;p=o;if(m>>>0<=q>>>0)if(m>>>0>>0?(o=r+(m<<2)|0,(o|0)!=(p|0)):0){f[n>>2]=p+(~((p+-4-o|0)>>>2)<<2);s=l;t=k}else{s=l;t=k}else{kh(i,m-q|0,5828);s=f[a>>2]|0;t=f[j>>2]|0}f[d>>2]=0;q=d+4|0;f[q>>2]=0;f[d+8>>2]=0;$j(d,t-s>>2);s=f[j>>2]|0;t=f[a>>2]|0;if((s|0)==(t|0)){v=s;w=s}else{m=f[d>>2]|0;k=m;l=k;o=0;p=s;s=k;k=t;t=m;while(1){m=f[k+(o<<2)>>2]|0;n=f[q>>2]|0;if(m>>>0>2>>>0){x=l;y=s;z=k;A=p}else{r=m+1|0;f[e>>2]=0;B=n-t>>2;C=t;D=n;if(r>>>0<=B>>>0)if(r>>>0>>0?(n=C+(r<<2)|0,(n|0)!=(D|0)):0){f[q>>2]=D+(~((D+-4-n|0)>>>2)<<2);E=l;F=p;G=k}else{E=l;F=p;G=k}else{kh(d,r-B|0,e);E=f[d>>2]|0;F=f[j>>2]|0;G=f[a>>2]|0}x=E;y=E;z=G;A=F}B=y+(m<<2)|0;f[B>>2]=(f[B>>2]|0)+1;o=o+1|0;if(o>>>0>=A-z>>2>>>0){v=z;w=A;break}else{l=x;p=A;s=y;k=z;t=y}}}y=w-v|0;v=y>>2;f[e>>2]=0;w=e+4|0;f[w>>2]=0;f[e+8>>2]=0;if(!v){H=0;I=0}else{if(v>>>0>536870911)mq(e);t=dn(y<<1)|0;f[w>>2]=t;f[e>>2]=t;y=t+(v<<3)|0;f[e+8>>2]=y;z=v;v=t;k=t;while(1){s=v;f[s>>2]=-1;f[s+4>>2]=-1;s=k+8|0;A=z+-1|0;if(!A)break;else{z=A;v=s;k=s}}f[w>>2]=y;H=t;I=t}t=f[q>>2]|0;y=f[d>>2]|0;k=t-y|0;v=k>>2;f[g>>2]=0;z=g+4|0;f[z>>2]=0;f[g+8>>2]=0;s=y;do if(v)if(v>>>0>1073741823)mq(g);else{A=dn(k)|0;f[g>>2]=A;p=A+(v<<2)|0;f[g+8>>2]=p;hj(A|0,0,k|0)|0;f[z>>2]=p;J=A;K=p;L=A;break}else{J=0;K=0;L=0}while(0);if((t|0)!=(y|0)){y=0;t=0;while(1){f[J+(t<<2)>>2]=y;k=t+1|0;if(k>>>0>>0){y=(f[s+(t<<2)>>2]|0)+y|0;t=k}else break}}t=f[j>>2]|0;j=f[a>>2]|0;y=j;if((t|0)!=(j|0)){k=a+40|0;a=t-j>>2;j=H;t=H;g=H;A=H;p=H;x=H;l=0;o=J;while(1){F=f[y+(l<<2)>>2]|0;G=l+1|0;E=((G>>>0)%3|0|0)==0?l+-2|0:G;if((E|0)==-1)M=-1;else M=f[y+(E<<2)>>2]|0;E=((l>>>0)%3|0|0)==0;G=(E?2:-1)+l|0;if((G|0)==-1)N=-1;else N=f[y+(G<<2)>>2]|0;if(E?(M|0)==(N|0)|((F|0)==(M|0)|(F|0)==(N|0)):0){f[k>>2]=(f[k>>2]|0)+1;O=j;P=t;Q=g;R=A;S=p;T=x;U=l+2|0;V=o}else W=51;a:do if((W|0)==51){W=0;E=f[s+(N<<2)>>2]|0;b:do if((E|0)>0){G=0;B=f[o+(N<<2)>>2]|0;while(1){m=f[p+(B<<3)>>2]|0;if((m|0)==-1){X=j;Y=t;Z=A;_=p;break b}if((m|0)==(M|0)){m=f[p+(B<<3)+4>>2]|0;if((m|0)==-1)$=-1;else $=f[y+(m<<2)>>2]|0;if((F|0)!=($|0))break}m=G+1|0;if((m|0)<(E|0)){G=m;B=B+1|0}else{X=j;Y=t;Z=A;_=p;break b}}m=f[A+(B<<3)+4>>2]|0;r=G;n=B;D=t;while(1){r=r+1|0;if((r|0)>=(E|0))break;C=n+1|0;f[D+(n<<3)>>2]=f[D+(C<<3)>>2];f[D+(n<<3)+4>>2]=f[D+(C<<3)+4>>2];if((f[j+(n<<3)>>2]|0)==-1)break;else{n=C;D=j}}f[g+(n<<3)>>2]=-1;if((m|0)==-1){X=g;Y=g;Z=g;_=g}else{D=f[i>>2]|0;f[D+(l<<2)>>2]=m;f[D+(m<<2)>>2]=l;O=g;P=g;Q=g;R=g;S=g;T=x;U=l;V=o;break a}}else{X=j;Y=t;Z=A;_=p}while(0);E=f[s+(M<<2)>>2]|0;if((E|0)>0){D=0;r=f[J+(M<<2)>>2]|0;while(1){aa=x+(r<<3)|0;if((f[aa>>2]|0)==-1)break;D=D+1|0;if((D|0)>=(E|0)){O=x;P=x;Q=x;R=x;S=x;T=x;U=l;V=J;break a}else r=r+1|0}f[aa>>2]=N;f[H+(r<<3)+4>>2]=l;O=H;P=H;Q=H;R=H;S=H;T=H;U=l;V=J}else{O=X;P=Y;Q=g;R=Z;S=_;T=x;U=l;V=o}}while(0);l=U+1|0;if(l>>>0>=a>>>0)break;else{j=O;t=P;g=Q;A=R;p=S;x=T;o=V}}}f[b>>2]=v;if(!J){ba=H;ca=I}else{if((K|0)!=(J|0))f[z>>2]=K+(~((K+-4-J|0)>>>2)<<2);br(L);L=f[e>>2]|0;ba=L;ca=L}if(ba|0){L=f[w>>2]|0;if((L|0)!=(ba|0))f[w>>2]=L+(~((L+-8-ba|0)>>>3)<<3);br(ca)}ca=f[d>>2]|0;if(ca|0){d=f[q>>2]|0;if((d|0)!=(ca|0))f[q>>2]=d+(~((d+-4-ca|0)>>>2)<<2);br(ca)}h=1;u=c;return h|0}function pc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=Oa,S=Oa,T=Oa,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0;e=u;u=u+48|0;g=e+12|0;h=e+35|0;i=e+32|0;j=e;k=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[k>>2]=$(1.0);l=a+80|0;m=f[l>>2]|0;f[j>>2]=0;o=j+4|0;f[o>>2]=0;f[j+8>>2]=0;if(m){if(m>>>0>1073741823)mq(j);p=m<<2;q=dn(p)|0;f[j>>2]=q;r=q+(m<<2)|0;f[j+8>>2]=r;hj(q|0,0,p|0)|0;f[o>>2]=r;r=f[d>>2]|0;d=c+48|0;p=c+40|0;q=i+1|0;m=i+2|0;s=g+4|0;t=g+12|0;v=g+8|0;w=a+40|0;x=a+64|0;y=0;z=0;while(1){A=d;B=f[A>>2]|0;C=f[A+4>>2]|0;A=p;D=on(f[A>>2]|0,f[A+4>>2]|0,r+y|0,0)|0;A=Tn(D|0,I|0,B|0,C|0)|0;C=(f[f[c>>2]>>2]|0)+A|0;b[h>>0]=b[C>>0]|0;b[h+1>>0]=b[C+1>>0]|0;b[h+2>>0]=b[C+2>>0]|0;Xl(i|0,C|0,3)|0;C=Uf(g,i)|0;if(!C){A=b[i>>0]|0;B=b[q>>0]|0;D=b[m>>0]|0;E=((A&255^318)+239^B&255)+239^D&255;F=f[s>>2]|0;G=(F|0)==0;a:do if(!G){H=F+-1|0;J=(H&F|0)==0;if(!J)if(E>>>0>>0)K=E;else K=(E>>>0)%(F>>>0)|0;else K=E&H;L=f[(f[g>>2]|0)+(K<<2)>>2]|0;if((L|0)!=0?(M=f[L>>2]|0,(M|0)!=0):0){if(J){J=M;while(1){L=f[J+4>>2]|0;if(!((L|0)==(E|0)|(L&H|0)==(K|0))){N=K;O=29;break a}L=J+8|0;if(((b[L>>0]|0)==A<<24>>24?(b[L+1>>0]|0)==B<<24>>24:0)?(b[L+2>>0]|0)==D<<24>>24:0)break a;J=f[J>>2]|0;if(!J){N=K;O=29;break a}}}else P=M;while(1){J=f[P+4>>2]|0;if((J|0)!=(E|0)){if(J>>>0>>0)Q=J;else Q=(J>>>0)%(F>>>0)|0;if((Q|0)!=(K|0)){N=K;O=29;break a}}J=P+8|0;if(((b[J>>0]|0)==A<<24>>24?(b[J+1>>0]|0)==B<<24>>24:0)?(b[J+2>>0]|0)==D<<24>>24:0)break a;P=f[P>>2]|0;if(!P){N=K;O=29;break}}}else{N=K;O=29}}else{N=0;O=29}while(0);if((O|0)==29){O=0;M=dn(16)|0;b[M+8>>0]=A;b[M+9>>0]=B;b[M+10>>0]=D;f[M+12>>2]=z;f[M+4>>2]=E;f[M>>2]=0;R=$(((f[t>>2]|0)+1|0)>>>0);S=$(F>>>0);T=$(n[k>>2]);do if(G|$(T*S)>>0<3|(F+-1&F|0)!=0)&1;H=~~$(W($(R/T)))>>>0;Kh(g,J>>>0>>0?H:J);J=f[s>>2]|0;H=J+-1|0;if(!(H&J)){U=J;V=H&E;break}if(E>>>0>>0){U=J;V=E}else{U=J;V=(E>>>0)%(J>>>0)|0}}else{U=F;V=N}while(0);F=(f[g>>2]|0)+(V<<2)|0;E=f[F>>2]|0;if(!E){f[M>>2]=f[v>>2];f[v>>2]=M;f[F>>2]=v;F=f[M>>2]|0;if(F|0){G=f[F+4>>2]|0;F=U+-1|0;if(F&U)if(G>>>0>>0)X=G;else X=(G>>>0)%(U>>>0)|0;else X=G&F;Y=(f[g>>2]|0)+(X<<2)|0;O=42}}else{f[M>>2]=f[E>>2];Y=E;O=42}if((O|0)==42){O=0;f[Y>>2]=M}f[t>>2]=(f[t>>2]|0)+1}E=w;F=f[E>>2]|0;G=on(F|0,f[E+4>>2]|0,z|0,0)|0;Rg((f[f[x>>2]>>2]|0)+G|0,h|0,F|0)|0;F=f[j>>2]|0;f[F+(y<<2)>>2]=z;Z=z+1|0;_=F}else{F=f[j>>2]|0;f[F+(y<<2)>>2]=f[C+12>>2];Z=z;_=F}y=y+1|0;aa=f[l>>2]|0;if(y>>>0>=aa>>>0)break;else z=Z}if((Z|0)==(aa|0))ba=_;else{z=a+84|0;if(!(b[z>>0]|0)){y=f[a+72>>2]|0;h=f[a+68>>2]|0;x=h;if((y|0)==(h|0))ca=_;else{w=y-h>>2;h=0;do{y=x+(h<<2)|0;f[y>>2]=f[_+(f[y>>2]<<2)>>2];h=h+1|0}while(h>>>0>>0);ca=_}}else{b[z>>0]=0;z=a+68|0;_=a+72|0;w=f[_>>2]|0;h=f[z>>2]|0;x=w-h>>2;y=h;h=w;if(aa>>>0<=x>>>0)if(aa>>>0>>0?(w=y+(aa<<2)|0,(w|0)!=(h|0)):0){f[_>>2]=h+(~((h+-4-w|0)>>>2)<<2);da=aa}else da=aa;else{kh(z,aa-x|0,1204);da=f[l>>2]|0}x=f[j>>2]|0;if(!da)ca=x;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[x+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);ca=x}}f[l>>2]=Z;ba=ca}if(!ba)ea=Z;else{ca=f[o>>2]|0;if((ca|0)!=(ba|0))f[o>>2]=ca+(~((ca+-4-ba|0)>>>2)<<2);br(ba);ea=Z}}else ea=0;Z=f[g+8>>2]|0;if(Z|0){ba=Z;do{Z=ba;ba=f[ba>>2]|0;br(Z)}while((ba|0)!=0)}ba=f[g>>2]|0;f[g>>2]=0;if(!ba){u=e;return ea|0}br(ba);u=e;return ea|0}function qc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0;e=u;u=u+64|0;d=e+48|0;h=e+40|0;i=e+32|0;j=e+16|0;k=e+8|0;l=e;m=e+28|0;n=a+8|0;o=f[n>>2]|0;if((o+-2|0)>>>0<=28){f[a+72>>2]=o;p=1<>2]=p+-1;o=p+-2|0;f[a+80>>2]=o;f[a+84>>2]=(o|0)/2|0}o=a+40|0;f[a+48>>2]=g;g=a+88|0;lk(g);p=a+36|0;q=f[p>>2]|0;r=(f[q+4>>2]|0)-(f[q>>2]|0)|0;s=r>>2;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;t=k;f[t>>2]=0;f[t+4>>2]=0;t=l;f[t>>2]=0;f[t+4>>2]=0;if((r|0)<=0){u=e;return 1}r=j+4|0;t=j+8|0;v=a+84|0;w=a+80|0;x=h+4|0;y=i+4|0;z=d+4|0;A=k+4|0;B=h+4|0;C=i+4|0;D=d+4|0;E=l+4|0;F=a+76|0;a=k+4|0;G=l+4|0;H=f[q>>2]|0;if((f[q+4>>2]|0)==(H|0)){J=q;mq(J)}else{K=0;L=H}while(1){f[m>>2]=f[L+(K<<2)>>2];f[d>>2]=f[m>>2];$b(o,d,j);H=f[j>>2]|0;q=(H|0)>-1?H:0-H|0;M=f[r>>2]|0;N=(M|0)>-1?M:0-M|0;O=Tn(N|0,((N|0)<0)<<31>>31|0,q|0,((q|0)<0)<<31>>31|0)|0;q=f[t>>2]|0;N=(q|0)>-1;P=N?q:0-q|0;q=Tn(O|0,I|0,P|0,((P|0)<0)<<31>>31|0)|0;P=I;if((q|0)==0&(P|0)==0){O=f[v>>2]|0;Q=O;R=j;S=M;T=O}else{O=f[v>>2]|0;U=((O|0)<0)<<31>>31;V=on(O|0,U|0,H|0,((H|0)<0)<<31>>31|0)|0;H=zk(V|0,I|0,q|0,P|0)|0;f[j>>2]=H;V=on(O|0,U|0,M|0,((M|0)<0)<<31>>31|0)|0;M=zk(V|0,I|0,q|0,P|0)|0;f[r>>2]=M;P=O-((H|0)>-1?H:0-H|0)-((M|0)>-1?M:0-M|0)|0;Q=N?P:0-P|0;R=t;S=M;T=O}f[R>>2]=Q;O=f[j>>2]|0;do if((O|0)<=-1){if((S|0)<0){M=f[t>>2]|0;W=(M|0)>-1?M:0-M|0;X=M}else{M=f[t>>2]|0;W=(f[w>>2]|0)-((M|0)>-1?M:0-M|0)|0;X=M}if((X|0)<0){Y=(S|0)>-1?S:0-S|0;Z=W;_=X;break}else{Y=(f[w>>2]|0)-((S|0)>-1?S:0-S|0)|0;Z=W;_=X;break}}else{M=f[t>>2]|0;Y=M+T|0;Z=T+S|0;_=M}while(0);M=(Z|0)==0;P=(Y|0)==0;N=f[w>>2]|0;do if(Y|Z){H=(N|0)==(Y|0);if(!(M&H)){q=(N|0)==(Z|0);if(!(P&q)){if(M&(T|0)<(Y|0)){$=0;aa=(T<<1)-Y|0;break}if(q&(T|0)>(Y|0)){$=Z;aa=(T<<1)-Y|0;break}if(H&(T|0)>(Z|0)){$=(T<<1)-Z|0;aa=Y;break}if(P){$=(T|0)<(Z|0)?(T<<1)-Z|0:Z;aa=0}else{$=Z;aa=Y}}else{$=Z;aa=Z}}else{$=Y;aa=Y}}else{$=N;aa=N}while(0);P=0-S|0;M=0-_|0;f[j>>2]=0-O;f[r>>2]=P;f[t>>2]=M;if((O|0)<1){ba=T-_|0;ca=T-S|0}else{H=(_|0)<1?M:_;M=(S|0)<1?P:S;ba=(_|0)>0?M:N-M|0;ca=(S|0)>0?H:N-H|0}H=(ca|0)==0;M=(ba|0)==0;do if(((ba|ca|0)!=0?(P=(N|0)==(ba|0),!(H&P)):0)?(q=(N|0)==(ca|0),!(M&q)):0){if(H&(T|0)<(ba|0)){da=0;ea=(T<<1)-ba|0;break}if(q&(T|0)>(ba|0)){da=N;ea=(T<<1)-ba|0;break}if(P&(T|0)>(ca|0)){da=(T<<1)-ca|0;ea=N;break}if(M){da=(T|0)<(ca|0)?(T<<1)-ca|0:ca;ea=0}else{da=ca;ea=ba}}else{da=N;ea=N}while(0);N=K<<1;M=b+(N<<2)|0;H=M+4|0;O=f[H>>2]|0;f[h>>2]=f[M>>2];f[x>>2]=O;f[i>>2]=$;f[y>>2]=aa;Dd(d,n,h,i);O=f[d>>2]|0;f[k>>2]=O;P=f[z>>2]|0;f[A>>2]=P;q=f[H>>2]|0;f[h>>2]=f[M>>2];f[B>>2]=q;f[i>>2]=da;f[C>>2]=ea;Dd(d,n,h,i);q=f[d>>2]|0;f[l>>2]=q;M=f[D>>2]|0;f[E>>2]=M;H=f[v>>2]|0;if((H|0)>=(O|0))if((O|0)<(0-H|0))fa=(f[F>>2]|0)+O|0;else fa=O;else fa=O-(f[F>>2]|0)|0;f[k>>2]=fa;if((H|0)>=(P|0))if((P|0)<(0-H|0))ga=(f[F>>2]|0)+P|0;else ga=P;else ga=P-(f[F>>2]|0)|0;f[a>>2]=ga;if((H|0)>=(q|0))if((q|0)<(0-H|0))ha=(f[F>>2]|0)+q|0;else ha=q;else ha=q-(f[F>>2]|0)|0;f[l>>2]=ha;if((H|0)>=(M|0))if((M|0)<(0-H|0))ia=(f[F>>2]|0)+M|0;else ia=M;else ia=M-(f[F>>2]|0)|0;f[G>>2]=ia;if((((ga|0)>-1?ga:0-ga|0)+((fa|0)>-1?fa:0-fa|0)|0)<(((ha|0)>-1?ha:0-ha|0)+((ia|0)>-1?ia:0-ia|0)|0)){Vi(g,0);ja=k}else{Vi(g,1);ja=l}M=f[ja>>2]|0;if((M|0)<0)ka=(f[F>>2]|0)+M|0;else ka=M;M=c+(N<<2)|0;f[M>>2]=ka;N=f[ja+4>>2]|0;if((N|0)<0)la=(f[F>>2]|0)+N|0;else la=N;f[M+4>>2]=la;K=K+1|0;if((K|0)>=(s|0)){ma=5;break}M=f[p>>2]|0;L=f[M>>2]|0;if((f[M+4>>2]|0)-L>>2>>>0<=K>>>0){J=M;ma=6;break}}if((ma|0)==5){u=e;return 1}else if((ma|0)==6)mq(J);return 0}function rc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=Oa,T=Oa,U=Oa,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0;e=u;u=u+64|0;g=e+36|0;h=e+24|0;i=e+12|0;j=e;k=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[k>>2]=$(1.0);l=a+80|0;m=f[l>>2]|0;f[j>>2]=0;o=j+4|0;f[o>>2]=0;f[j+8>>2]=0;if(m){if(m>>>0>1073741823)mq(j);p=m<<2;q=dn(p)|0;f[j>>2]=q;r=q+(m<<2)|0;f[j+8>>2]=r;hj(q|0,0,p|0)|0;f[o>>2]=r;r=f[d>>2]|0;d=c+48|0;p=c+40|0;q=i+4|0;m=i+8|0;s=g+4|0;t=g+12|0;v=g+8|0;w=a+40|0;x=a+64|0;y=0;z=0;while(1){A=d;B=f[A>>2]|0;C=f[A+4>>2]|0;A=p;D=on(f[A>>2]|0,f[A+4>>2]|0,r+z|0,0)|0;A=Tn(D|0,I|0,B|0,C|0)|0;C=(f[f[c>>2]>>2]|0)+A|0;A=h;B=C;D=A+12|0;do{b[A>>0]=b[B>>0]|0;A=A+1|0;B=B+1|0}while((A|0)<(D|0));Xl(i|0,C|0,12)|0;B=_f(g,i)|0;if(!B){A=f[i>>2]|0;D=f[q>>2]|0;E=f[m>>2]|0;F=((A^318)+239^D)+239^E;G=f[s>>2]|0;H=(G|0)==0;a:do if(!H){J=G+-1|0;K=(J&G|0)==0;if(!K)if(F>>>0>>0)L=F;else L=(F>>>0)%(G>>>0)|0;else L=F&J;M=f[(f[g>>2]|0)+(L<<2)>>2]|0;if((M|0)!=0?(N=f[M>>2]|0,(N|0)!=0):0){if(K){K=N;while(1){M=f[K+4>>2]|0;if(!((M|0)==(F|0)|(M&J|0)==(L|0))){O=L;P=29;break a}if(((f[K+8>>2]|0)==(A|0)?(f[K+12>>2]|0)==(D|0):0)?(f[K+16>>2]|0)==(E|0):0)break a;K=f[K>>2]|0;if(!K){O=L;P=29;break a}}}else Q=N;while(1){K=f[Q+4>>2]|0;if((K|0)!=(F|0)){if(K>>>0>>0)R=K;else R=(K>>>0)%(G>>>0)|0;if((R|0)!=(L|0)){O=L;P=29;break a}}if(((f[Q+8>>2]|0)==(A|0)?(f[Q+12>>2]|0)==(D|0):0)?(f[Q+16>>2]|0)==(E|0):0)break a;Q=f[Q>>2]|0;if(!Q){O=L;P=29;break}}}else{O=L;P=29}}else{O=0;P=29}while(0);if((P|0)==29){P=0;C=dn(24)|0;f[C+8>>2]=A;f[C+12>>2]=D;f[C+16>>2]=E;f[C+20>>2]=y;f[C+4>>2]=F;f[C>>2]=0;S=$(((f[t>>2]|0)+1|0)>>>0);T=$(G>>>0);U=$(n[k>>2]);do if(H|$(U*T)>>0<3|(G+-1&G|0)!=0)&1;K=~~$(W($(S/U)))>>>0;Hh(g,N>>>0>>0?K:N);N=f[s>>2]|0;K=N+-1|0;if(!(K&N)){V=N;X=K&F;break}if(F>>>0>>0){V=N;X=F}else{V=N;X=(F>>>0)%(N>>>0)|0}}else{V=G;X=O}while(0);G=(f[g>>2]|0)+(X<<2)|0;F=f[G>>2]|0;if(!F){f[C>>2]=f[v>>2];f[v>>2]=C;f[G>>2]=v;G=f[C>>2]|0;if(G|0){H=f[G+4>>2]|0;G=V+-1|0;if(G&V)if(H>>>0>>0)Y=H;else Y=(H>>>0)%(V>>>0)|0;else Y=H&G;Z=(f[g>>2]|0)+(Y<<2)|0;P=42}}else{f[C>>2]=f[F>>2];Z=F;P=42}if((P|0)==42){P=0;f[Z>>2]=C}f[t>>2]=(f[t>>2]|0)+1}F=w;G=f[F>>2]|0;H=on(G|0,f[F+4>>2]|0,y|0,0)|0;Rg((f[f[x>>2]>>2]|0)+H|0,h|0,G|0)|0;G=f[j>>2]|0;f[G+(z<<2)>>2]=y;_=y+1|0;aa=G}else{G=f[j>>2]|0;f[G+(z<<2)>>2]=f[B+20>>2];_=y;aa=G}z=z+1|0;ba=f[l>>2]|0;if(z>>>0>=ba>>>0)break;else y=_}if((_|0)==(ba|0))ca=aa;else{y=a+84|0;if(!(b[y>>0]|0)){z=f[a+72>>2]|0;h=f[a+68>>2]|0;x=h;if((z|0)==(h|0))da=aa;else{w=z-h>>2;h=0;do{z=x+(h<<2)|0;f[z>>2]=f[aa+(f[z>>2]<<2)>>2];h=h+1|0}while(h>>>0>>0);da=aa}}else{b[y>>0]=0;y=a+68|0;aa=a+72|0;w=f[aa>>2]|0;h=f[y>>2]|0;x=w-h>>2;z=h;h=w;if(ba>>>0<=x>>>0)if(ba>>>0>>0?(w=z+(ba<<2)|0,(w|0)!=(h|0)):0){f[aa>>2]=h+(~((h+-4-w|0)>>>2)<<2);ea=ba}else ea=ba;else{kh(y,ba-x|0,1204);ea=f[l>>2]|0}x=f[j>>2]|0;if(!ea)da=x;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[x+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);da=x}}f[l>>2]=_;ca=da}if(!ca)fa=_;else{da=f[o>>2]|0;if((da|0)!=(ca|0))f[o>>2]=da+(~((da+-4-ca|0)>>>2)<<2);br(ca);fa=_}}else fa=0;_=f[g+8>>2]|0;if(_|0){ca=_;do{_=ca;ca=f[ca>>2]|0;br(_)}while((ca|0)!=0)}ca=f[g>>2]|0;f[g>>2]=0;if(!ca){u=e;return fa|0}br(ca);u=e;return fa|0}function sc(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;e=u;u=u+32|0;g=e+4|0;h=e;i=e+16|0;j=c+56|0;k=f[j>>2]|0;l=(f[k+100>>2]|0)-(f[k+96>>2]|0)|0;k=(l|0)/12|0;m=c+44|0;Nh(k,f[m>>2]|0)|0;Nh(f[(f[j>>2]|0)+80>>2]|0,f[m>>2]|0)|0;n=f[c+48>>2]|0;o=dn(32)|0;f[g>>2]=o;f[g+8>>2]=-2147483616;f[g+4>>2]=21;p=o;q=14562;r=p+21|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[o+21>>0]=0;o=Oj(n,g,0)|0;if((b[g+11>>0]|0)<0)br(f[g>>2]|0);n=f[m>>2]|0;if(o){b[i>>0]=0;o=n+16|0;q=f[o+4>>2]|0;if(!((q|0)>0|(q|0)==0&(f[o>>2]|0)>>>0>0)){f[h>>2]=f[n+4>>2];f[g>>2]=f[h>>2];ye(n,g,i,i+1|0)|0}Ye(c)|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=e;return}b[i>>0]=1;c=n+16|0;o=f[c+4>>2]|0;if(!((o|0)>0|(o|0)==0&(f[c>>2]|0)>>>0>0)){f[h>>2]=f[n+4>>2];f[g>>2]=f[h>>2];ye(n,g,i,i+1|0)|0}n=f[j>>2]|0;c=f[n+80>>2]|0;if(c>>>0<256){if(!l){f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=e;return}o=i+1|0;q=i+1|0;p=i+1|0;r=0;s=n;while(1){t=f[s+96>>2]|0;v=f[m>>2]|0;b[i>>0]=f[t+(r*12|0)>>2];w=v+16|0;x=f[w>>2]|0;y=f[w+4>>2]|0;if((y|0)>0|(y|0)==0&x>>>0>0){z=x;A=v;B=y}else{f[h>>2]=f[v+4>>2];f[g>>2]=f[h>>2];ye(v,g,i,p)|0;v=f[m>>2]|0;y=v+16|0;z=f[y>>2]|0;A=v;B=f[y+4>>2]|0}b[i>>0]=f[t+(r*12|0)+4>>2];if((B|0)>0|(B|0)==0&z>>>0>0){C=B;D=z;E=A}else{f[h>>2]=f[A+4>>2];f[g>>2]=f[h>>2];ye(A,g,i,q)|0;y=f[m>>2]|0;v=y+16|0;C=f[v+4>>2]|0;D=f[v>>2]|0;E=y}b[i>>0]=f[t+(r*12|0)+8>>2];if(!((C|0)>0|(C|0)==0&D>>>0>0)){f[h>>2]=f[E+4>>2];f[g>>2]=f[h>>2];ye(E,g,i,o)|0}t=r+1|0;if(t>>>0>=k>>>0)break;r=t;s=f[j>>2]|0}f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=e;return}if(c>>>0<65536){if(!l){f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=e;return}s=i+2|0;r=i+2|0;o=i+2|0;E=0;D=n;while(1){C=f[D+96>>2]|0;q=f[m>>2]|0;d[i>>1]=f[C+(E*12|0)>>2];A=q+16|0;z=f[A>>2]|0;B=f[A+4>>2]|0;if((B|0)>0|(B|0)==0&z>>>0>0){F=B;G=z;H=q}else{f[h>>2]=f[q+4>>2];f[g>>2]=f[h>>2];ye(q,g,i,o)|0;q=f[m>>2]|0;z=q+16|0;F=f[z+4>>2]|0;G=f[z>>2]|0;H=q}d[i>>1]=f[C+(E*12|0)+4>>2];if((F|0)>0|(F|0)==0&G>>>0>0){I=F;J=G;K=H}else{f[h>>2]=f[H+4>>2];f[g>>2]=f[h>>2];ye(H,g,i,r)|0;q=f[m>>2]|0;z=q+16|0;I=f[z+4>>2]|0;J=f[z>>2]|0;K=q}d[i>>1]=f[C+(E*12|0)+8>>2];if(!((I|0)>0|(I|0)==0&J>>>0>0)){f[h>>2]=f[K+4>>2];f[g>>2]=f[h>>2];ye(K,g,i,s)|0}C=E+1|0;if(C>>>0>=k>>>0)break;E=C;D=f[j>>2]|0}f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=e;return}D=(l|0)!=0;if(c>>>0<2097152){if(D){L=0;M=n}else{f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=e;return}while(1){c=f[M+96>>2]|0;Nh(f[c+(L*12|0)>>2]|0,f[m>>2]|0)|0;Nh(f[c+(L*12|0)+4>>2]|0,f[m>>2]|0)|0;Nh(f[c+(L*12|0)+8>>2]|0,f[m>>2]|0)|0;c=L+1|0;if(c>>>0>=k>>>0)break;L=c;M=f[j>>2]|0}f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=e;return}if(!D){f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=e;return}D=0;M=n;while(1){n=(f[M+96>>2]|0)+(D*12|0)|0;L=f[m>>2]|0;c=L+16|0;l=f[c+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[c>>2]|0)>>>0>0)){f[h>>2]=f[L+4>>2];f[g>>2]=f[h>>2];ye(L,g,n,n+12|0)|0}n=D+1|0;if(n>>>0>=k>>>0)break;D=n;M=f[j>>2]|0}f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=e;return}function tc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;e=u;u=u+32|0;g=e+16|0;h=e+12|0;i=e+8|0;j=e+4|0;k=e;switch(f[c+28>>2]|0){case 9:{l=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=l;f[g>>2]=f[h>>2];m=ec(a,c,g)|0;break}case 2:{f[i>>2]=l;f[g>>2]=f[i>>2];m=Xb(a,c,g)|0;break}case 3:{f[j>>2]=l;f[g>>2]=f[j>>2];m=rc(a,c,g)|0;break}case 4:{f[k>>2]=l;f[g>>2]=f[k>>2];m=jc(a,c,g)|0;break}default:m=0}n=m;break}case 1:{m=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=m;f[g>>2]=f[h>>2];o=dc(a,c,g)|0;break}case 2:{f[i>>2]=m;f[g>>2]=f[i>>2];o=Yb(a,c,g)|0;break}case 3:{f[j>>2]=m;f[g>>2]=f[j>>2];o=pc(a,c,g)|0;break}case 4:{f[k>>2]=m;f[g>>2]=f[k>>2];o=ic(a,c,g)|0;break}default:o=0}n=o;break}case 11:case 2:{o=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=o;f[g>>2]=f[h>>2];p=dc(a,c,g)|0;break}case 2:{f[i>>2]=o;f[g>>2]=f[i>>2];p=Yb(a,c,g)|0;break}case 3:{f[j>>2]=o;f[g>>2]=f[j>>2];p=pc(a,c,g)|0;break}case 4:{f[k>>2]=o;f[g>>2]=f[k>>2];p=ic(a,c,g)|0;break}default:p=0}n=p;break}case 4:{p=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=p;f[g>>2]=f[h>>2];q=bc(a,c,g)|0;break}case 2:{f[i>>2]=p;f[g>>2]=f[i>>2];q=Vb(a,c,g)|0;break}case 3:{f[j>>2]=p;f[g>>2]=f[j>>2];q=kc(a,c,g)|0;break}case 4:{f[k>>2]=p;f[g>>2]=f[k>>2];q=gc(a,c,g)|0;break}default:q=0}n=q;break}case 3:{q=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=q;f[g>>2]=f[h>>2];r=bc(a,c,g)|0;break}case 2:{f[i>>2]=q;f[g>>2]=f[i>>2];r=Vb(a,c,g)|0;break}case 3:{f[j>>2]=q;f[g>>2]=f[j>>2];r=kc(a,c,g)|0;break}case 4:{f[k>>2]=q;f[g>>2]=f[k>>2];r=gc(a,c,g)|0;break}default:r=0}n=r;break}case 6:{r=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=r;f[g>>2]=f[h>>2];s=ec(a,c,g)|0;break}case 2:{f[i>>2]=r;f[g>>2]=f[i>>2];s=Xb(a,c,g)|0;break}case 3:{f[j>>2]=r;f[g>>2]=f[j>>2];s=rc(a,c,g)|0;break}case 4:{f[k>>2]=r;f[g>>2]=f[k>>2];s=jc(a,c,g)|0;break}default:s=0}n=s;break}case 5:{s=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=s;f[g>>2]=f[h>>2];t=ec(a,c,g)|0;break}case 2:{f[i>>2]=s;f[g>>2]=f[i>>2];t=Xb(a,c,g)|0;break}case 3:{f[j>>2]=s;f[g>>2]=f[j>>2];t=rc(a,c,g)|0;break}case 4:{f[k>>2]=s;f[g>>2]=f[k>>2];t=jc(a,c,g)|0;break}default:t=0}n=t;break}default:{v=-1;u=e;return v|0}}v=(n|0)==0?-1:n;u=e;return v|0}function uc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;e=u;u=u+32|0;g=e+16|0;h=e+12|0;i=e+29|0;j=e;k=e+28|0;if(!(f[(f[a+8>>2]|0)+80>>2]|0)){l=1;u=e;return l|0}b[i>>0]=-2;m=a+36|0;n=f[m>>2]|0;if(n)if(Ra[f[(f[a>>2]|0)+40>>2]&127](a,n)|0){n=f[m>>2]|0;o=(Qa[f[(f[n>>2]|0)+8>>2]&127](n)|0)&255;b[i>>0]=o;p=5}else q=0;else p=5;if((p|0)==5){o=d+16|0;n=o;r=f[n+4>>2]|0;if(!((r|0)>0|(r|0)==0&(f[n>>2]|0)>>>0>0)){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];ye(d,g,i,i+1|0)|0}i=f[m>>2]|0;if(i|0?(n=(Qa[f[(f[i>>2]|0)+36>>2]&127](i)|0)&255,b[j>>0]=n,n=o,i=f[n+4>>2]|0,!((i|0)>0|(i|0)==0&(f[n>>2]|0)>>>0>0)):0){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];ye(d,g,j,j+1|0)|0}n=f[a+32>>2]|0;i=b[n+24>>0]|0;r=X(f[n+80>>2]|0,i)|0;s=(f[f[n>>2]>>2]|0)+(f[n+48>>2]|0)|0;f[j>>2]=0;n=j+4|0;f[n>>2]=0;f[j+8>>2]=0;t=(r|0)==0;do if(!t)if(r>>>0>1073741823)mq(j);else{v=r<<2;w=dn(v)|0;f[j>>2]=w;x=w+(r<<2)|0;f[j+8>>2]=x;hj(w|0,0,v|0)|0;f[n>>2]=x;y=w;break}else y=0;while(0);w=f[m>>2]|0;do if(w){Ta[f[(f[w>>2]|0)+44>>2]&31](w,s,y,r,i,f[c>>2]|0)|0;x=f[m>>2]|0;if(!x){z=s;A=f[j>>2]|0;p=20;break}if(!(Qa[f[(f[x>>2]|0)+32>>2]&127](x)|0)){x=f[j>>2]|0;z=f[m>>2]|0?x:s;A=x;p=20}}else{z=s;A=y;p=20}while(0);if((p|0)==20)km(z,r,A);A=a+4|0;a=f[A>>2]|0;do if(a){z=f[a+48>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;y=dn(48)|0;f[g>>2]=y;f[g+8>>2]=-2147483600;f[g+4>>2]=34;s=y;w=9835;x=s+34|0;do{b[s>>0]=b[w>>0]|0;s=s+1|0;w=w+1|0}while((s|0)<(x|0));b[y+34>>0]=0;w=Oj(z,g,1)|0;if((b[g+11>>0]|0)<0)br(f[g>>2]|0);if(!w){if(!t){w=f[j>>2]|0;s=0;x=0;do{x=f[w+(s<<2)>>2]|x;s=s+1|0}while((s|0)!=(r|0));if(x)B=((_(x|0)|0)>>>3^3)+1|0;else B=1}else B=1;b[k>>0]=0;s=o;w=f[s>>2]|0;z=f[s+4>>2]|0;if((z|0)>0|(z|0)==0&w>>>0>0){C=z;D=w}else{f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];ye(d,g,k,k+1|0)|0;w=o;C=f[w+4>>2]|0;D=f[w>>2]|0}b[k>>0]=B;if(!((C|0)>0|(C|0)==0&D>>>0>0)){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];ye(d,g,k,k+1|0)|0}if((B|0)==(Ll(5)|0)){w=f[j>>2]|0;z=o;s=f[z+4>>2]|0;if(!((s|0)>0|(s|0)==0&(f[z>>2]|0)>>>0>0)){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];ye(d,g,w,w+(r<<2)|0)|0}p=48;break}if(t)p=48;else{w=d+4|0;z=0;do{s=(f[j>>2]|0)+(z<<2)|0;y=o;v=f[y+4>>2]|0;if(!((v|0)>0|(v|0)==0&(f[y>>2]|0)>>>0>0)){f[h>>2]=f[w>>2];f[g>>2]=f[h>>2];ye(d,g,s,s+B|0)|0}z=z+1|0}while(z>>>0>>0);p=48}}else p=27}else p=27;while(0);if((p|0)==27){b[k>>0]=1;r=o;o=f[r+4>>2]|0;if(!((o|0)>0|(o|0)==0&(f[r>>2]|0)>>>0>0)){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];ye(d,g,k,k+1|0)|0}wp(g);k=f[A>>2]|0;if(k|0)Pj(g,10-(Yh(f[k+48>>2]|0)|0)|0)|0;k=Dc(f[j>>2]|0,X((f[c+4>>2]|0)-(f[c>>2]|0)>>2,i)|0,i,g,d)|0;sj(g,f[g+4>>2]|0);if(k)p=48;else E=0}if((p|0)==48){p=f[m>>2]|0;if(!p)E=1;else{Ra[f[(f[p>>2]|0)+40>>2]&127](p,d)|0;E=1}}d=f[j>>2]|0;if(d|0){j=f[n>>2]|0;if((j|0)!=(d|0))f[n>>2]=j+(~((j+-4-d|0)>>>2)<<2);br(d)}q=E}l=q;u=e;return l|0}function vc(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;b=u;u=u+48|0;c=b+24|0;d=b+12|0;e=b;g=a+32|0;h=a+8|0;i=a+12|0;j=f[i>>2]|0;k=f[h>>2]|0;l=j-k>>2;m=a+36|0;n=f[m>>2]|0;o=f[g>>2]|0;p=n-o>>2;q=o;o=n;n=k;if(l>>>0<=p>>>0)if(l>>>0

>>0?(r=q+(l<<2)|0,(r|0)!=(o|0)):0){f[m>>2]=o+(~((o+-4-r|0)>>>2)<<2);s=n;t=k;v=j}else{s=n;t=k;v=j}else{oi(g,l-p|0);p=f[h>>2]|0;s=p;t=p;v=f[i>>2]|0}p=v-t|0;l=p>>2;f[c>>2]=0;j=c+4|0;f[j>>2]=0;k=c+8|0;f[k>>2]=0;if(l|0){if((p|0)<0)mq(c);p=((l+-1|0)>>>5)+1|0;n=dn(p<<2)|0;f[c>>2]=n;f[k>>2]=p;f[j>>2]=l;j=l>>>5;hj(n|0,0,j<<2|0)|0;p=l&31;l=n+(j<<2)|0;if(p|0)f[l>>2]=f[l>>2]&~(-1>>>(32-p|0))}p=a+20|0;l=0;j=s;s=t;t=v;while(1){if(l>>>0>2>>>0){w=0;x=0;y=l;z=s;A=j}else{B=25;break}while(1){v=x>>>5;n=1<<(x&31);do if(!(f[(f[c>>2]|0)+(v<<2)>>2]&n)){k=f[A+(x<<2)>>2]|0;if((f[k+8>>2]|0)!=(f[k+4>>2]|0)){r=0;o=1;m=A;q=k;while(1){k=f[(f[q+4>>2]|0)+(r<<2)>>2]|0;C=0;D=m;while(1){E=f[D+(x<<2)>>2]|0;if((C|0)>=(Ra[f[(f[E>>2]|0)+24>>2]&127](E,k)|0)){F=o;break}E=f[(f[h>>2]|0)+(x<<2)>>2]|0;G=Sa[f[(f[E>>2]|0)+28>>2]&31](E,k,C)|0;if((G|0)!=(x|0)?(E=f[(f[p>>2]|0)+(G<<2)>>2]|0,(1<<(E&31)&f[(f[c>>2]|0)+(E>>>5<<2)>>2]|0)==0):0){F=0;break}C=C+1|0;D=f[h>>2]|0}r=r+1|0;m=f[h>>2]|0;q=f[m+(x<<2)>>2]|0;if(r>>>0>=(f[q+8>>2]|0)-(f[q+4>>2]|0)>>2>>>0)break;else o=F}o=m;if(F)H=o;else{I=w;J=y;K=o;break}}else H=z;f[(f[g>>2]|0)+(y<<2)>>2]=x;o=(f[c>>2]|0)+(v<<2)|0;f[o>>2]=f[o>>2]|n;I=1;J=y+1|0;K=H}else{I=w;J=y;K=z}while(0);x=x+1|0;L=f[i>>2]|0;M=L-K>>2;A=K;if(x>>>0>=M>>>0)break;else{w=I;y=J;z=K}}if(J>>>0>>0&(I^1)){N=0;break}else{l=J;j=A;s=K;t=L}}if((B|0)==25){f[d>>2]=0;B=d+4|0;f[B>>2]=0;f[d+8>>2]=0;L=f[a+4>>2]|0;a=(f[L+12>>2]|0)-(f[L+8>>2]|0)|0;L=a>>2;f[e>>2]=0;K=e+4|0;f[K>>2]=0;A=e+8|0;f[A>>2]=0;if(L|0){if((a|0)<0)mq(e);a=((L+-1|0)>>>5)+1|0;J=dn(a<<2)|0;f[e>>2]=J;f[A>>2]=a;f[K>>2]=L;K=L>>>5;hj(J|0,0,K<<2|0)|0;a=L&31;L=J+(K<<2)|0;if(a|0)f[L>>2]=f[L>>2]&~(-1>>>(32-a|0))}a:do if((t|0)==(s|0))O=1;else{a=0;L=j;K=s;J=t;while(1){A=f[(f[g>>2]|0)+(a<<2)>>2]|0;l=f[L+(A<<2)>>2]|0;I=(f[l+8>>2]|0)-(f[l+4>>2]|0)|0;l=I>>2;if((I|0)<8){P=K;Q=J}else{I=f[B>>2]|0;M=f[d>>2]|0;z=I-M>>2;y=M;M=I;if(l>>>0<=z>>>0)if(l>>>0>>0?(I=y+(l<<2)|0,(I|0)!=(M|0)):0){f[B>>2]=M+(~((M+-4-I|0)>>>2)<<2);R=0}else R=0;else{oi(d,l-z|0);R=0}while(1){if((R|0)<(l|0)){S=0;T=0;U=R}else break;while(1){z=f[(f[h>>2]|0)+(A<<2)>>2]|0;I=f[(f[z+4>>2]|0)+(S<<2)>>2]|0;M=S>>>5;y=1<<(S&31);if(!(f[(f[e>>2]|0)+(M<<2)>>2]&y)){w=0;x=1;H=z;while(1){if((w|0)>=(Ra[f[(f[H>>2]|0)+24>>2]&127](H,I)|0)){V=x;break}z=f[(f[h>>2]|0)+(A<<2)>>2]|0;F=Sa[f[(f[z>>2]|0)+28>>2]&31](z,I,w)|0;z=(f[(f[e>>2]|0)+(F>>>5<<2)>>2]&1<<(F&31)|0)!=0;F=x&z;if(!z){V=F;break}w=w+1|0;x=F;H=f[(f[h>>2]|0)+(A<<2)>>2]|0}if(V){f[(f[d>>2]|0)+(U<<2)>>2]=S;H=(f[e>>2]|0)+(M<<2)|0;f[H>>2]=f[H>>2]|y;W=1;X=U+1|0}else{W=T;X=U}}else{W=T;X=U}S=S+1|0;if((S|0)>=(l|0))break;else{T=W;U=X}}if(W|(X|0)>=(l|0))R=X;else{O=0;break a}}Of(f[(f[h>>2]|0)+(A<<2)>>2]|0,d);P=f[h>>2]|0;Q=f[i>>2]|0}a=a+1|0;if(a>>>0>=Q-P>>2>>>0){O=1;break}else{L=P;K=P;J=Q}}}while(0);Q=f[e>>2]|0;if(Q|0)br(Q);Q=f[d>>2]|0;if(Q|0){d=f[B>>2]|0;if((d|0)!=(Q|0))f[B>>2]=d+(~((d+-4-Q|0)>>>2)<<2);br(Q)}N=O}O=f[c>>2]|0;if(!O){u=b;return N|0}br(O);u=b;return N|0} +function uj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=u;u=u+16|0;g=e;h=a+4|0;f[h>>2]=c;i=f[c+64>>2]|0;c=((f[i+4>>2]|0)-(f[i>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;Xg(a+24|0,c,g);c=f[h>>2]|0;h=(f[c+56>>2]|0)-(f[c+52>>2]|0)>>2;b[g>>0]=0;Xg(a+36|0,h,g);g=a+8|0;f[g>>2]=f[d>>2];f[g+4>>2]=f[d+4>>2];f[g+8>>2]=f[d+8>>2];f[g+12>>2]=f[d+12>>2];u=e;return}function vj(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a;a:do if(!(c&3)){d=a;e=4}else{g=a;h=c;while(1){if(!(b[g>>0]|0)){i=h;break a}j=g+1|0;h=j;if(!(h&3)){d=j;e=4;break}else g=j}}while(0);if((e|0)==4){e=d;while(1){k=f[e>>2]|0;if(!((k&-2139062144^-2139062144)&k+-16843009))e=e+4|0;else break}if(!((k&255)<<24>>24))l=e;else{k=e;while(1){e=k+1|0;if(!(b[e>>0]|0)){l=e;break}else k=e}}i=l}return i-c|0}function wj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e;h=a+11|0;i=b[h>>0]|0;j=i<<24>>24<0;if(j)k=f[a+4>>2]|0;else k=i&255;do if(k>>>0>=c>>>0)if(j){i=(f[a>>2]|0)+c|0;b[g>>0]=0;Hp(i,g);f[a+4>>2]=c;break}else{b[g>>0]=0;Hp(a+c|0,g);b[h>>0]=c;break}else Xi(a,c-k|0,d)|0;while(0);u=e;return}function xj(a){a=a|0;var b=0,c=0,d=0;if(!a)return;b=a+88|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=f[c+8>>2]|0;if(b|0){d=c+12|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;br(b)}br(c)}c=f[a+68>>2]|0;if(c|0){b=a+72|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);br(c)}c=a+64|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d>>2]|0;if(c|0){b=d+4|0;if((f[b>>2]|0)!=(c|0))f[b>>2]=c;br(c)}br(d)}br(a);return}function yj(a,c,d,e,g,h,i,j,k,l){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0;f[a>>2]=d;if(d|0){m=d+16|0;n=f[m+4>>2]|0;o=a+8|0;f[o>>2]=f[m>>2];f[o+4>>2]=n;n=d+24|0;d=f[n+4>>2]|0;o=a+16|0;f[o>>2]=f[n>>2];f[o+4>>2]=d}b[a+24>>0]=e;f[a+28>>2]=g;b[a+32>>0]=h&1;h=a+40|0;f[h>>2]=i;f[h+4>>2]=j;j=a+48|0;f[j>>2]=k;f[j+4>>2]=l;f[a+56>>2]=c;return}function zj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;if((f[c+76>>2]|0)>=0?(gr(c)|0)!=0:0){d=a&255;e=a&255;if((e|0)!=(b[c+75>>0]|0)?(g=c+20|0,h=f[g>>2]|0,h>>>0<(f[c+16>>2]|0)>>>0):0){f[g>>2]=h+1;b[h>>0]=d;i=e}else i=Bj(c,a)|0;fr(c);j=i}else k=3;do if((k|0)==3){i=a&255;e=a&255;if((e|0)!=(b[c+75>>0]|0)?(d=c+20|0,h=f[d>>2]|0,h>>>0<(f[c+16>>2]|0)>>>0):0){f[d>>2]=h+1;b[h>>0]=i;j=e;break}j=Bj(c,a)|0}while(0);return j|0}function Aj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;i=f[a+4>>2]|0;if((i|0)==-1){j=0;u=d;return j|0}b[h>>0]=i;i=c+16|0;a=f[i+4>>2]|0;if(!((a|0)>0|(a|0)==0&(f[i>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];ye(c,e,h,h+1|0)|0}j=1;u=d;return j|0}function Bj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0;d=u;u=u+16|0;e=d;g=c&255;b[e>>0]=g;i=a+16|0;j=f[i>>2]|0;if(!j)if(!(pl(a)|0)){k=f[i>>2]|0;l=4}else m=-1;else{k=j;l=4}do if((l|0)==4){j=a+20|0;i=f[j>>2]|0;if(i>>>0>>0?(n=c&255,(n|0)!=(b[a+75>>0]|0)):0){f[j>>2]=i+1;b[i>>0]=g;m=n;break}if((Sa[f[a+36>>2]&31](a,e,1)|0)==1)m=h[e>>0]|0;else m=-1}while(0);u=d;return m|0}function Cj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;c=dn(88)|0;d=c+60|0;e=c;g=e+60|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));f[d>>2]=c;d=c+64|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;d=Kf(c,b)|0;f[a>>2]=d?c:0;a=d?0:c;if(d)return;ui(a);br(a);return}function Dj(a,b){a=a|0;b=b|0;if(!b)return;else{Dj(a,f[b>>2]|0);Dj(a,f[b+4>>2]|0);sj(b+20|0,f[b+24>>2]|0);br(b);return}}function Ej(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=u;u=u+16|0;g=e;h=a+4|0;f[h>>2]=c;i=((f[c+4>>2]|0)-(f[c>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;Xg(a+24|0,i,g);i=f[h>>2]|0;h=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;b[g>>0]=0;Xg(a+36|0,h,g);g=a+8|0;f[g>>2]=f[d>>2];f[g+4>>2]=f[d+4>>2];f[g+8>>2]=f[d+8>>2];f[g+12>>2]=f[d+12>>2];u=e;return}function Fj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e;h=e+4|0;f[g>>2]=c;c=a+4|0;a=dn(32)|0;f[h>>2]=a;f[h+8>>2]=-2147483616;f[h+4>>2]=17;i=a;j=12932;k=i+17|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[a+17>>0]=0;Nj(wd(c,g)|0,h,d);if((b[h+11>>0]|0)>=0){u=e;return}br(f[h>>2]|0);u=e;return}function Gj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=f[a+16>>2]|0;if(((f[a+20>>2]|0)-c>>2|0)<=(b|0)){d=0;return d|0}e=f[c+(b<<2)>>2]|0;if((e|0)<0){d=0;return d|0}b=a+48|0;if((f[a+52>>2]|0)>>>0<=e>>>0)pe(b,e+1|0,0);c=(f[b>>2]|0)+(e>>>5<<2)|0;f[c>>2]=f[c>>2]|1<<(e&31);c=f[a+36>>2]|0;if((f[a+40>>2]|0)-c>>2>>>0<=e>>>0){d=1;return d|0}Pp(f[c+(e<<2)>>2]|0);d=1;return d|0}function Hj(a){a=a|0;if(!a)return;f[a>>2]=1136;sj(a+28|0,f[a+32>>2]|0);nj(a+16|0,f[a+20>>2]|0);sj(a+4|0,f[a+8>>2]|0);br(a);return}function Ij(a){a=a|0;f[a>>2]=1136;sj(a+28|0,f[a+32>>2]|0);nj(a+16|0,f[a+20>>2]|0);sj(a+4|0,f[a+8>>2]|0);return}function Jj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;if(c>>>0>0|(c|0)==0&a>>>0>4294967295){e=d;f=a;g=c;while(1){c=an(f|0,g|0,10,0)|0;e=e+-1|0;b[e>>0]=c&255|48;c=f;f=up(f|0,g|0,10,0)|0;if(!(g>>>0>9|(g|0)==9&c>>>0>4294967295))break;else g=I}h=f;i=e}else{h=a;i=d}if(!h)j=i;else{d=h;h=i;while(1){i=h+-1|0;b[i>>0]=(d>>>0)%10|0|48;if(d>>>0<10){j=i;break}else{d=(d>>>0)/10|0;h=i}}}return j|0}function Kj(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=a;while(1){d=c+1|0;if(!(tq(b[c>>0]|0)|0))break;else c=d}a=b[c>>0]|0;switch(a<<24>>24|0){case 45:{e=1;f=5;break}case 43:{e=0;f=5;break}default:{g=0;h=c;i=a}}if((f|0)==5){g=e;h=d;i=b[d>>0]|0}if(!(Pq(i<<24>>24)|0))j=0;else{i=0;d=h;while(1){h=(i*10|0)+48-(b[d>>0]|0)|0;d=d+1|0;if(!(Pq(b[d>>0]|0)|0)){j=h;break}else i=h}}return (g|0?j:0-j|0)|0}function Lj(a,c,d){a=a|0;c=c|0;d=$(d);var e=0,g=0,h=0;e=u;u=u+16|0;g=e;cl(g,d);h=mi(a,c)|0;c=h+11|0;if((b[c>>0]|0)<0){b[f[h>>2]>>0]=0;f[h+4>>2]=0}else{b[h>>0]=0;b[c>>0]=0}Ng(h,0);f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];u=e;return}function Mj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;fl(g,d&1);d=mi(a,c)|0;c=d+11|0;if((b[c>>0]|0)<0){b[f[d>>2]>>0]=0;f[d+4>>2]=0}else{b[d>>0]=0;b[c>>0]=0}Ng(d,0);f[d>>2]=f[g>>2];f[d+4>>2]=f[g+4>>2];f[d+8>>2]=f[g+8>>2];u=e;return}function Nj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;fl(g,d);d=mi(a,c)|0;c=d+11|0;if((b[c>>0]|0)<0){b[f[d>>2]>>0]=0;f[d+4>>2]=0}else{b[d>>0]=0;b[c>>0]=0}Ng(d,0);f[d>>2]=f[g>>2];f[d+4>>2]=f[g+4>>2];f[d+8>>2]=f[g+8>>2];u=e;return}function Oj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=zg(a,c)|0;if((e|0)==(a+4|0)){g=-1;h=(g|0)==-1;i=(g|0)!=0;j=h?d:i;return j|0}a=e+28|0;if((b[a+11>>0]|0)<0)k=f[a>>2]|0;else k=a;g=Kj(k)|0;h=(g|0)==-1;i=(g|0)!=0;j=h?d:i;return j|0}function Pj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;if(c>>>0>10){g=0;u=d;return g|0}h=dn(48)|0;f[e>>2]=h;f[e+8>>2]=-2147483600;f[e+4>>2]=33;i=h;j=13067;k=i+33|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[h+33>>0]=0;Nj(a,e,c);if((b[e+11>>0]|0)<0)br(f[e>>2]|0);g=1;u=d;return g|0}function Qj(a){a=a|0;f[a>>2]=1136;sj(a+28|0,f[a+32>>2]|0);nj(a+16|0,f[a+20>>2]|0);sj(a+4|0,f[a+8>>2]|0);br(a);return}function Rj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=f[b>>2]|0;if((c|0)==-1)return 1;b=c*3|0;if((b|0)==-1)return 1;c=f[a>>2]|0;a=f[c+(b<<2)>>2]|0;d=b+1|0;e=((d>>>0)%3|0|0)==0?b+-2|0:d;if((e|0)==-1)g=-1;else g=f[c+(e<<2)>>2]|0;e=(((b>>>0)%3|0|0)==0?2:-1)+b|0;if((e|0)==-1)h=-1;else h=f[c+(e<<2)>>2]|0;if((a|0)==(g|0))return 1;else return (a|0)==(h|0)|(g|0)==(h|0)|0;return 0}function Sj(a){a=a|0;f[a>>2]=2968;sj(a+28|0,f[a+32>>2]|0);Dj(a+16|0,f[a+20>>2]|0);sj(a+4|0,f[a+8>>2]|0);return}function Tj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0;d=0;while(1){if((h[15560+d>>0]|0)==(a|0)){e=2;break}g=d+1|0;if((g|0)==87){i=15648;j=87;e=5;break}else d=g}if((e|0)==2)if(!d)k=15648;else{i=15648;j=d;e=5}if((e|0)==5)while(1){e=0;d=i;do{a=d;d=d+1|0}while((b[a>>0]|0)!=0);j=j+-1|0;if(!j){k=d;break}else{i=d;e=5}}return yq(k,f[c+20>>2]|0)|0}function Uj(a,b){a=+a;b=b|0;var c=0,d=0,e=0,g=0.0,h=0.0,i=0,j=0.0;p[s>>3]=a;c=f[s>>2]|0;d=f[s+4>>2]|0;e=Wn(c|0,d|0,52)|0;switch(e&2047){case 0:{if(a!=0.0){g=+Uj(a*18446744073709551616.0,b);h=g;i=(f[b>>2]|0)+-64|0}else{h=a;i=0}f[b>>2]=i;j=h;break}case 2047:{j=a;break}default:{f[b>>2]=(e&2047)+-1022;f[s>>2]=c;f[s+4>>2]=d&-2146435073|1071644672;j=+p[s>>3]}}return +j}function Vj(a){a=a|0;f[a>>2]=2968;sj(a+28|0,f[a+32>>2]|0);Dj(a+16|0,f[a+20>>2]|0);sj(a+4|0,f[a+8>>2]|0);br(a);return}function Wj(a,b){a=+a;b=b|0;var c=0.0,d=0,e=0,g=0.0,h=0;if((b|0)<=1023)if((b|0)<-1022){c=a*2.2250738585072014e-308;d=(b|0)<-2044;e=b+2044|0;g=d?c*2.2250738585072014e-308:c;h=d?((e|0)>-1022?e:-1022):b+1022|0}else{g=a;h=b}else{c=a*8988465674311579538646525.0e283;e=(b|0)>2046;d=b+-2046|0;g=e?c*8988465674311579538646525.0e283:c;h=e?((d|0)<1023?d:1023):b+-1023|0}b=Rn(h+1023|0,0,52)|0;h=I;f[s>>2]=b;f[s+4>>2]=h;return +(g*+p[s>>3])}function Xj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;if(!(f[a+80>>2]|0)){b=0;return b|0}c=a+8|0;d=a+12|0;a=f[c>>2]|0;if(((f[d>>2]|0)-a|0)>0){e=0;g=a}else{b=1;return b|0}while(1){a=f[g+(e<<2)>>2]|0;e=e+1|0;if(!(yl(a,a)|0)){b=0;h=5;break}g=f[c>>2]|0;if((e|0)>=((f[d>>2]|0)-g>>2|0)){b=1;h=5;break}}if((h|0)==5)return b|0;return 0}function Yj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=a+36|0;d=a+40|0;e=f[c>>2]|0;if((f[d>>2]|0)==(e|0)){g=1;return g|0}h=a+60|0;a=0;i=e;while(1){e=f[i+(a<<2)>>2]|0;a=a+1|0;if(!(Sa[f[(f[e>>2]|0)+20>>2]&31](e,h,b)|0)){g=0;j=5;break}i=f[c>>2]|0;if(a>>>0>=(f[d>>2]|0)-i>>2>>>0){g=1;j=5;break}}if((j|0)==5)return g|0;return 0}function Zj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+36|0;d=a+40|0;a=f[c>>2]|0;if((f[d>>2]|0)==(a|0)){e=1;return e|0}else{g=0;h=a}while(1){a=f[h+(g<<2)>>2]|0;g=g+1|0;if(!(Ra[f[(f[a>>2]|0)+24>>2]&127](a,b)|0)){e=0;i=4;break}h=f[c>>2]|0;if(g>>>0>=(f[d>>2]|0)-h>>2>>>0){e=1;i=4;break}}if((i|0)==4)return e|0;return 0}function _j(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;f[a>>2]=0;c=a+4|0;f[c>>2]=0;f[a+8>>2]=0;d=b+4|0;e=(f[d>>2]|0)-(f[b>>2]|0)|0;g=e>>2;if(!g)return;if(g>>>0>1073741823)mq(a);h=dn(e)|0;f[c>>2]=h;f[a>>2]=h;f[a+8>>2]=h+(g<<2);g=f[b>>2]|0;b=(f[d>>2]|0)-g|0;if((b|0)<=0)return;Rg(h|0,g|0,b|0)|0;f[c>>2]=h+(b>>>2<<2);return}function $j(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=a+8|0;d=f[a>>2]|0;if((f[c>>2]|0)-d>>2>>>0>=b>>>0)return;e=a+4|0;if(b>>>0>1073741823){g=ra(8)|0;Wo(g,14941);f[g>>2]=6944;va(g|0,1080,114)}g=(f[e>>2]|0)-d|0;h=dn(b<<2)|0;if((g|0)>0)Rg(h|0,d|0,g|0)|0;f[a>>2]=h;f[e>>2]=h+(g>>2<<2);f[c>>2]=h+(b<<2);if(!d)return;br(d);return}function ak(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=a+36|0;c=a+40|0;d=f[b>>2]|0;if((f[c>>2]|0)==(d|0)){e=1;return e|0}g=a+60|0;a=0;h=d;while(1){d=f[h+(a<<2)>>2]|0;a=a+1|0;if(!(Ra[f[(f[d>>2]|0)+16>>2]&127](d,g)|0)){e=0;i=5;break}h=f[b>>2]|0;if(a>>>0>=(f[c>>2]|0)-h>>2>>>0){e=1;i=5;break}}if((i|0)==5)return e|0;return 0}function bk(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d;g=dn(16)|0;f[e>>2]=g;f[e+8>>2]=-2147483632;f[e+4>>2]=15;h=g;i=12916;j=h+15|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[g+15>>0]=0;Nj(a+4|0,e,c);if((b[e+11>>0]|0)>=0){u=d;return}br(f[e>>2]|0);u=d;return}function ck(a,b){a=a|0;b=b|0;var c=0,d=0;f[a>>2]=0;f[a+4>>2]=b;if(b|0?(c=mh(b,992,976,0)|0,c|0):0){d=dn(56)|0;Gm(d,c);c=f[a>>2]|0;f[a>>2]=d;if(!c)return;Va[f[(f[c>>2]|0)+4>>2]&127](c);return}c=dn(56)|0;Am(c,b);b=f[a>>2]|0;f[a>>2]=c;if(!b)return;Va[f[(f[b>>2]|0)+4>>2]&127](b);return}function dk(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0;d=f[a+176>>2]|0;e=f[a+172>>2]|0;a=e;if((d|0)==(e|0))return 0;g=(d-e|0)/136|0;e=0;while(1){if((f[a+(e*136|0)>>2]|0)==(c|0)){h=4;break}d=e+1|0;if(d>>>0>>0)e=d;else{h=6;break}}if((h|0)==4)return ((b[a+(e*136|0)+100>>0]|0)==0?0:a+(e*136|0)+4|0)|0;else if((h|0)==6)return 0;return 0}function ek(a,b){a=a|0;b=b|0;var c=0,d=0;c=f[a+72>>2]|0;if(!c){d=0;return d|0}f[c+4>>2]=a+60;if(!(Qa[f[(f[c>>2]|0)+12>>2]&127](c)|0)){d=0;return d|0}if(!(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)){d=0;return d|0}if(!(Ra[f[(f[a>>2]|0)+44>>2]&127](a,b)|0)){d=0;return d|0}d=Ra[f[(f[a>>2]|0)+48>>2]&127](a,b)|0;return d|0}function fk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;f[a>>2]=0;d=a+4|0;f[d>>2]=0;f[a+8>>2]=0;if(!b)return;if(b>>>0>357913941)mq(a);e=dn(b*12|0)|0;f[d>>2]=e;f[a>>2]=e;f[a+8>>2]=e+(b*12|0);a=b;b=e;do{_j(b,c);b=(f[d>>2]|0)+12|0;f[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function gk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;c=f[b>>2]|0;if(!c){d=0;return d|0}e=a+44|0;g=f[e>>2]|0;if(g>>>0<(f[a+48>>2]|0)>>>0){f[b>>2]=0;f[g>>2]=c;f[e>>2]=(f[e>>2]|0)+4;d=1;return d|0}else{Bg(a+40|0,b);d=1;return d|0}return 0}function hk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2880;f[a+40>>2]=1180;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}f[a>>2]=1460;b=a+36|0;d=f[b>>2]|0;f[b>>2]=0;if(!d){zi(a);br(a);return}Va[f[(f[d>>2]|0)+4>>2]&127](d);zi(a);br(a);return}function ik(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0;f[c>>2]=2;d=a+4|0;a=c+8|0;e=f[a>>2]|0;g=(f[c+12>>2]|0)-e|0;if(g>>>0<4294967292){Bk(a,g+4|0,0);i=f[a>>2]|0}else i=e;e=i+g|0;g=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;b[e>>0]=g;b[e+1>>0]=g>>8;b[e+2>>0]=g>>16;b[e+3>>0]=g>>24;return}function jk(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3164;b=a+8|0;f[b>>2]=3188;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);br(c)}f[b>>2]=3208;b=f[a+44>>2]|0;if(b|0)br(b);b=f[a+32>>2]|0;if(!b){br(a);return}br(b);br(a);return}function kk(a,c,d){a=a|0;c=c|0;d=$(d);var e=0,g=Oa,h=0;e=zg(a,c)|0;if((e|0)==(a+4|0)){g=d;return $(g)}a=e+28|0;if((b[a+11>>0]|0)<0)h=f[a>>2]|0;else h=a;g=$(+Xq(h));return $(g)}function lk(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=u;u=u+16|0;c=b;d=c;f[d>>2]=0;f[d+4>>2]=0;cf(a,2,c);c=f[a+12>>2]|0;d=a+16|0;e=f[d>>2]|0;if((e|0)==(c|0)){g=a+24|0;f[g>>2]=0;h=a+28|0;f[h>>2]=0;u=b;return}f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);g=a+24|0;f[g>>2]=0;h=a+28|0;f[h>>2]=0;u=b;return}function mk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=f[a+176>>2]|0;d=f[a+172>>2]|0;e=d;a:do if((c|0)!=(d|0)){g=(c-d|0)/136|0;h=0;while(1){if((f[e+(h*136|0)>>2]|0)==(b|0))break;i=h+1|0;if(i>>>0>>0)h=i;else break a}j=e+(h*136|0)+104|0;return j|0}while(0);j=a+40|0;return j|0}function nk(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3232;b=a+8|0;f[b>>2]=3256;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);br(c)}f[b>>2]=3276;b=f[a+44>>2]|0;if(b|0)br(b);b=f[a+32>>2]|0;if(!b){br(a);return}br(b);br(a);return}function ok(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2880;f[a+40>>2]=1180;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}f[a>>2]=1460;b=a+36|0;d=f[b>>2]|0;f[b>>2]=0;if(!d){zi(a);return}Va[f[(f[d>>2]|0)+4>>2]&127](d);zi(a);return}function pk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;Ec(a,b);if((b|0)<=-1)return;c=a+88|0;d=f[c>>2]|0;e=f[a+84>>2]|0;if((d-e>>2|0)<=(b|0))return;a=e+(b<<2)|0;b=a+4|0;e=d-b|0;g=e>>2;if(!g)h=d;else{Xl(a|0,b|0,e|0)|0;h=f[c>>2]|0}e=a+(g<<2)|0;if((h|0)==(e|0))return;f[c>>2]=h+(~((h+-4-e|0)>>>2)<<2);return}function qk(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=f[a+32>>2]|0;c=f[a+36>>2]|0;if((b|0)==(c|0)){d=1;return d|0}e=a+8|0;g=a+44|0;a=b;while(1){b=f[(f[e>>2]|0)+(f[a>>2]<<2)>>2]|0;a=a+4|0;if(!(Ra[f[(f[b>>2]|0)+20>>2]&127](b,f[g>>2]|0)|0)){d=0;h=5;break}if((a|0)==(c|0)){d=1;h=5;break}}if((h|0)==5)return d|0;return 0}function rk(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3164;b=a+8|0;f[b>>2]=3188;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);br(c)}f[b>>2]=3208;b=f[a+44>>2]|0;if(b|0)br(b);b=f[a+32>>2]|0;if(!b)return;br(b);return}function sk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0.0;d=u;u=u+128|0;e=d;g=e;h=g+124|0;do{f[g>>2]=0;g=g+4|0}while((g|0)<(h|0));g=e+4|0;f[g>>2]=a;h=e+8|0;f[h>>2]=-1;f[e+44>>2]=a;f[e+76>>2]=-1;Rm(e,0);i=+Lc(e,c,1);c=(f[g>>2]|0)-(f[h>>2]|0)+(f[e+108>>2]|0)|0;if(b|0)f[b>>2]=c|0?a+c|0:a;u=d;return +i}function tk(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0;a=c+16|0;g=f[a>>2]|0;do if(g){if((g|0)!=(d|0)){h=c+36|0;f[h>>2]=(f[h>>2]|0)+1;f[c+24>>2]=2;b[c+54>>0]=1;break}h=c+24|0;if((f[h>>2]|0)==2)f[h>>2]=e}else{f[a>>2]=d;f[c+24>>2]=e;f[c+36>>2]=1}while(0);return}function uk(a){a=a|0;var c=0,d=0,e=0;c=a+74|0;d=b[c>>0]|0;b[c>>0]=d+255|d;d=a+20|0;c=a+28|0;if((f[d>>2]|0)>>>0>(f[c>>2]|0)>>>0)Sa[f[a+36>>2]&31](a,0,0)|0;f[a+16>>2]=0;f[c>>2]=0;f[d>>2]=0;d=f[a>>2]|0;if(!(d&4)){c=(f[a+44>>2]|0)+(f[a+48>>2]|0)|0;f[a+8>>2]=c;f[a+4>>2]=c;e=d<<27>>31}else{f[a>>2]=d|32;e=-1}return e|0}function vk(a,c){a=a|0;c=c|0;var d=0,e=0,g=0;d=zg(a,c)|0;if((d|0)==(a+4|0)){e=0;return e|0}a=d+28|0;if((b[a+11>>0]|0)<0)g=f[a>>2]|0;else g=a;e=((Kj(g)|0)+1|0)>>>0>1;return e|0}function wk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=5840;b=f[a+96>>2]|0;if(b|0){c=a+100|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);br(b)}b=f[a+84>>2]|0;if(!b){wg(a);br(a);return}d=a+88|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b);wg(a);br(a);return}function xk(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=3232;b=a+8|0;f[b>>2]=3256;c=f[a+56>>2]|0;if(c|0){d=a+60|0;e=f[d>>2]|0;if((e|0)!=(c|0))f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);br(c)}f[b>>2]=3276;b=f[a+44>>2]|0;if(b|0)br(b);b=f[a+32>>2]|0;if(!b)return;br(b);return}function yk(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0;e=zg(a,c)|0;if((e|0)==(a+4|0)){g=d;return g|0}d=e+28|0;if((b[d+11>>0]|0)<0)h=f[d>>2]|0;else h=d;g=Kj(h)|0;return g|0}function zk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=b>>31|((b|0)<0?-1:0)<<1;f=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;g=d>>31|((d|0)<0?-1:0)<<1;h=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;i=Vn(e^a|0,f^b|0,e|0,f|0)|0;b=I;a=g^e;e=h^f;return Vn((Bd(i,b,Vn(g^c|0,h^d|0,g|0,h|0)|0,I,0)|0)^a|0,I^e|0,a|0,e|0)|0}function Ak(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0;f[a>>2]=b;h=b+16|0;i=f[h+4>>2]|0;j=a+8|0;f[j>>2]=f[h>>2];f[j+4>>2]=i;i=b+24|0;b=f[i+4>>2]|0;j=a+16|0;f[j>>2]=f[i>>2];f[j+4>>2]=b;b=a+40|0;f[b>>2]=c;f[b+4>>2]=d;d=a+48|0;f[d>>2]=e;f[d+4>>2]=g;return}function Bk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=d-e|0;h=e;e=d;if(g>>>0>=b>>>0){if(g>>>0>b>>>0?(d=h+b|0,(d|0)!=(e|0)):0)f[c>>2]=d}else ri(a,b-g|0);g=a+24|0;a=g;b=Tn(f[a>>2]|0,f[a+4>>2]|0,1,0)|0;a=g;f[a>>2]=b;f[a+4>>2]=I;return}function Ck(a,c){a=a|0;c=c|0;var d=0,e=0,g=0;d=zg(a,c)|0;if((d|0)==(a+4|0)){e=-1;return e|0}a=d+28|0;if((b[a+11>>0]|0)<0)g=f[a>>2]|0;else g=a;e=Kj(g)|0;return e|0}function Dk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=5840;b=f[a+96>>2]|0;if(b|0){c=a+100|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);br(b)}b=f[a+84>>2]|0;if(!b){wg(a);return}d=a+88|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);br(b);wg(a);return}function Ek(a){a=a|0;var c=0,d=0,e=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;b[a+24>>0]=1;c=a+68|0;d=a+28|0;e=d+40|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));f[c>>2]=a;c=a+72|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;f[c+20>>2]=0;return}function Fk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3188;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}f[a>>2]=3208;b=f[a+36>>2]|0;if(b|0)br(b);b=f[a+24>>2]|0;if(!b){br(a);return}br(b);br(a);return}function Gk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2004;b=f[a+76>>2]|0;if(b|0)br(b);f[a>>2]=1528;b=f[a+32>>2]|0;if(!b){br(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b);br(a);return}function Hk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=u;u=u+256|0;g=f;if((c|0)>(d|0)&(e&73728|0)==0){e=c-d|0;hj(g|0,b<<24>>24|0,(e>>>0<256?e:256)|0)|0;if(e>>>0>255){b=c-d|0;d=e;do{ep(a,g,256);d=d+-256|0}while(d>>>0>255);h=b&255}else h=e;ep(a,g,h)}u=f;return}function Ik(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3256;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}f[a>>2]=3276;b=f[a+36>>2]|0;if(b|0)br(b);b=f[a+24>>2]|0;if(!b){br(a);return}br(b);br(a);return}function Jk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1696;b=f[a+76>>2]|0;if(b|0)br(b);f[a>>2]=1528;b=f[a+32>>2]|0;if(!b){br(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b);br(a);return}function Kk(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0;if(qp(a,f[b+8>>2]|0,g)|0)fj(0,b,c,d,e);else{h=f[a+8>>2]|0;_a[f[(f[h>>2]|0)+20>>2]&3](h,b,c,d,e,g)}return}function Lk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3188;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}f[a>>2]=3208;b=f[a+36>>2]|0;if(b|0)br(b);b=f[a+24>>2]|0;if(!b)return;br(b);return}function Mk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2060;tj(a+108|0);f[a>>2]=1528;b=f[a+32>>2]|0;if(!b){br(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b);br(a);return}function Nk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3256;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}f[a>>2]=3276;b=f[a+36>>2]|0;if(b|0)br(b);b=f[a+24>>2]|0;if(!b)return;br(b);return}function Ok(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1752;tj(a+108|0);f[a>>2]=1528;b=f[a+32>>2]|0;if(!b){br(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b);br(a);return}function Pk(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;a:do if(!d)e=0;else{f=a;g=d;h=c;while(1){i=b[f>>0]|0;j=b[h>>0]|0;if(i<<24>>24!=j<<24>>24)break;g=g+-1|0;if(!g){e=0;break a}else{f=f+1|0;h=h+1|0}}e=(i&255)-(j&255)|0}while(0);return e|0}function Qk(a){a=a|0;if(!(f[a+44>>2]|0))return 0;if(!(f[a+48>>2]|0))return 0;if(!(f[a+24>>2]|0))return 0;if(!(f[a+28>>2]|0))return 0;if(!(f[a+32>>2]|0))return 0;else return (f[a+36>>2]|0)!=0|0;return 0}function Rk(a){a=a|0;var b=0,c=0;f[a>>2]=2004;b=f[a+76>>2]|0;if(b|0)br(b);f[a>>2]=1528;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);br(b);return}function Sk(a){a=a|0;var c=0,d=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;c=0;while(1){if((c|0)==3)break;f[a+(c<<2)>>2]=0;c=c+1|0}if((b[a+11>>0]|0)<0)d=(f[a+8>>2]&2147483647)+-1|0;else d=10;wj(a,d,0);return}function Tk(a){a=a|0;var b=0,c=0,d=0,e=0.0,g=0.0;b=f[a+8>>2]|0;if((b|0)<2){c=0;d=0;I=c;return d|0}e=+(b|0);g=+Fg(e)*e;e=+W(+(g-+p[a>>3]));c=+K(e)>=1.0?(e>0.0?~~+Y(+J(e/4294967296.0),4294967295.0)>>>0:~~+W((e-+(~~e>>>0))/4294967296.0)>>>0):0;d=~~e>>>0;I=c;return d|0}function Uk(a){a=a|0;var b=0,c=0;f[a>>2]=1696;b=f[a+76>>2]|0;if(b|0)br(b);f[a>>2]=1528;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);br(b);return}function Vk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=f[a+16>>2]|0;if(((f[a+20>>2]|0)-c>>2|0)<=(b|0)){d=0;return d|0}e=f[c+(b<<2)>>2]|0;if((e|0)<0){d=0;return d|0}b=f[(f[a+36>>2]|0)+(e<<2)>>2]|0;e=f[b+32>>2]|0;if(e|0){d=e;return d|0}d=f[b+8>>2]|0;return d|0}function Wk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1216;b=f[a+16>>2]|0;if(b|0){c=a+20|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b)}b=f[a+4>>2]|0;if(!b)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(b|0))f[d>>2]=a+(~((a+-4-b|0)>>>2)<<2);br(b);return}function Xk(a){a=a|0;var b=0,c=0;f[a>>2]=2060;tj(a+108|0);f[a>>2]=1528;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);br(b);return}function Yk(a){a=a|0;if(!(f[a+64>>2]|0))return 0;if(!(f[a+68>>2]|0))return 0;if(!(f[a+44>>2]|0))return 0;if(!(f[a+48>>2]|0))return 0;if(!(f[a+52>>2]|0))return 0;else return (f[a+56>>2]|0)!=0|0;return 0}function Zk(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if(qp(a,f[b+8>>2]|0,0)|0)tk(0,b,c,d);else{e=f[a+8>>2]|0;Ya[f[(f[e>>2]|0)+28>>2]&7](e,b,c,d)}return}function _k(a){a=a|0;var b=0,c=0;f[a>>2]=1752;tj(a+108|0);f[a>>2]=1528;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);br(b);return}function $k(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)<0){c=0;return c|0}d=f[a+4>>2]|0;if(((f[d+12>>2]|0)-(f[d+8>>2]|0)>>2|0)<=(b|0)){c=0;return c|0}d=f[(f[a+8>>2]|0)+(f[(f[a+20>>2]|0)+(b<<2)>>2]<<2)>>2]|0;c=Ra[f[(f[d>>2]|0)+36>>2]&127](d,b)|0;return c|0}function al(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)<0){c=0;return c|0}d=f[a+4>>2]|0;if(((f[d+12>>2]|0)-(f[d+8>>2]|0)>>2|0)<=(b|0)){c=0;return c|0}d=f[(f[a+8>>2]|0)+(f[(f[a+20>>2]|0)+(b<<2)>>2]<<2)>>2]|0;c=Ra[f[(f[d>>2]|0)+32>>2]&127](d,b)|0;return c|0}function bl(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0;d=b[a>>0]|0;e=b[c>>0]|0;if(d<<24>>24==0?1:d<<24>>24!=e<<24>>24){f=e;g=d}else{d=c;c=a;do{c=c+1|0;d=d+1|0;a=b[c>>0]|0;e=b[d>>0]|0}while(!(a<<24>>24==0?1:a<<24>>24!=e<<24>>24));f=e;g=a}return (g&255)-(f&255)|0}function cl(a,b){a=a|0;b=$(b);var c=0,d=0;c=u;u=u+16|0;d=c;Sk(d);qi(a,d,b);Go(d);u=c;return}function dl(a){a=a|0;var b=0,c=0,d=0,e=0,g=0;b=f[a>>2]|0;c=a+4|0;d=f[c>>2]|0;if((d|0)==(b|0))e=b;else{g=d+(~((d+-4-b|0)>>>2)<<2)|0;f[c>>2]=g;e=g}f[a+12>>2]=0;f[a+16>>2]=0;if(!b)return;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);br(b);return}function el(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=f[a+16>>2]|0;if(((f[a+20>>2]|0)-d>>2|0)<=(b|0)){e=-1;return e|0}g=f[d+(b<<2)>>2]|0;if((g|0)<0){e=-1;return e|0}e=f[(f[(f[(f[a+36>>2]|0)+(g<<2)>>2]|0)+16>>2]|0)+(c<<2)>>2]|0;return e|0}function fl(a,b){a=a|0;b=b|0;var c=0,d=0;c=u;u=u+16|0;d=c;Sk(d);vi(a,d,b);Go(d);u=c;return}function gl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;d=u;u=u+32|0;e=d;g=d+20|0;f[e>>2]=f[a+60>>2];f[e+4>>2]=0;f[e+8>>2]=b;f[e+12>>2]=g;f[e+16>>2]=c;if((ro(za(140,e|0)|0)|0)<0){f[g>>2]=-1;h=-1}else h=f[g>>2]|0;u=d;return h|0}function hl(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)==-1|(b|0)>4){c=0;return c|0}d=f[a+20+(b*12|0)>>2]|0;if(((f[a+20+(b*12|0)+4>>2]|0)-d|0)<=0){c=0;return c|0}b=f[d>>2]|0;if((b|0)==-1){c=0;return c|0}c=f[(f[a+8>>2]|0)+(b<<2)>>2]|0;return c|0}function il(a){a=a|0;if(!(f[a+40>>2]|0))return 0;if(!(f[a+24>>2]|0))return 0;if(!(f[a+28>>2]|0))return 0;if(!(f[a+32>>2]|0))return 0;else return (f[a+36>>2]|0)!=0|0;return 0}function jl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=f[a+16>>2]|0;if(((f[a+20>>2]|0)-c>>2|0)<=(b|0)){d=0;return d|0}e=f[c+(b<<2)>>2]|0;if((e|0)<0){d=0;return d|0}b=f[(f[a+36>>2]|0)+(e<<2)>>2]|0;d=(f[b+20>>2]|0)-(f[b+16>>2]|0)>>2;return d|0}function kl(a){a=a|0;var b=0;if(!(f[a+24>>2]|0)){b=0;return b|0}if(!(f[a+28>>2]|0)){b=0;return b|0}if(!(f[a+32>>2]|0)){b=0;return b|0}b=(f[a+36>>2]|0)!=0;return b|0}function ll(a){a=a|0;if(!(f[a+60>>2]|0))return 0;if(!(f[a+44>>2]|0))return 0;if(!(f[a+48>>2]|0))return 0;if(!(f[a+52>>2]|0))return 0;else return (f[a+56>>2]|0)!=0|0;return 0}function ml(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;Sg(a,c);f[a>>2]=1392;c=a+72|0;d=a+36|0;a=d+36|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(a|0));d=f[b>>2]|0;f[b>>2]=0;f[c>>2]=d;return}function nl(a,c){a=a|0;c=c|0;var d=0,e=0;d=a;e=c;c=d+64|0;do{f[d>>2]=f[e>>2];d=d+4|0;e=e+4|0}while((d|0)<(c|0));e=a+64|0;f[a+88>>2]=0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;b[e+20>>0]=0;return}function ol(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;if((a|0)==0&(c|0)==0)f=d;else{g=d;d=c;c=a;while(1){a=g+-1|0;b[a>>0]=h[15542+(c&15)>>0]|0|e;c=Wn(c|0,d|0,4)|0;d=I;if((c|0)==0&(d|0)==0){f=a;break}else g=a}}return f|0}function pl(a){a=a|0;var c=0,d=0,e=0;c=a+74|0;d=b[c>>0]|0;b[c>>0]=d+255|d;d=f[a>>2]|0;if(!(d&8)){f[a+8>>2]=0;f[a+4>>2]=0;c=f[a+44>>2]|0;f[a+28>>2]=c;f[a+20>>2]=c;f[a+16>>2]=c+(f[a+48>>2]|0);e=0}else{f[a>>2]=d|32;e=-1}return e|0}function ql(a,b){a=a|0;b=b|0;var c=0,d=0;c=f[b+88>>2]|0;if(!c){d=0;return d|0}if((f[c>>2]|0)!=2){d=0;return d|0}b=f[c+8>>2]|0;f[a+4>>2]=h[b>>0]|h[b+1>>0]<<8|h[b+2>>0]<<16|h[b+3>>0]<<24;d=1;return d|0}function rl(a){a=a|0;var b=0;if(!(f[a+44>>2]|0)){b=0;return b|0}if(!(f[a+48>>2]|0)){b=0;return b|0}if(!(f[a+52>>2]|0)){b=0;return b|0}b=(f[a+56>>2]|0)!=0;return b|0}function sl(a){a=a|0;kj(a);br(a);return}function tl(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+40>>2]=c;d=1;return d|0}function ul(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+44>>2]=c;d=1;return d|0}function vl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=d-e|0;if(g>>>0>>0){ri(a,b-g|0);return}if(g>>>0<=b>>>0)return;g=e+b|0;if((g|0)==(d|0))return;f[c>>2]=g;return}function wl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=$(e);f[a+4>>2]=b;Jf(a+8|0,c,c+(d<<2)|0);n[a+20>>2]=e;return}function xl(a,b){a=a|0;b=b|0;var c=0;if(!(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)){c=0;return c|0}if(!(Ra[f[(f[a>>2]|0)+44>>2]&127](a,b)|0)){c=0;return c|0}c=Ra[f[(f[a>>2]|0)+48>>2]&127](a,b)|0;return c|0}function yl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=u;u=u+16|0;d=c+4|0;e=c;f[e>>2]=0;f[d>>2]=f[e>>2];e=tc(a,b,d)|0;u=c;return e|0}function zl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;d=f[c>>2]|0;c=a;e=b-a>>2;while(1){if(!e)break;a=(e|0)/2|0;b=c+(a<<2)|0;g=(f[b>>2]|0)>>>0>>0;c=g?b+4|0:c;e=g?e+-1-a|0:a}return c|0}function Al(a){a=a|0;var c=0;f[a>>2]=0;c=a+8|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;b[a+24>>0]=1;f[a+28>>2]=9;c=a+40|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[a+56>>2]=-1;f[a+60>>2]=0;return}function Bl(a){a=a|0;mj(a);br(a);return}function Cl(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;if(!(Pq(b[f[a>>2]>>0]|0)|0))c=0;else{d=0;while(1){e=f[a>>2]|0;g=(d*10|0)+-48+(b[e>>0]|0)|0;h=e+1|0;f[a>>2]=h;if(!(Pq(b[h>>0]|0)|0)){c=g;break}else d=g}}return c|0}function Dl(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+60>>2]=c;d=1;return d|0}function El(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+64>>2]=c;d=1;return d|0}function Fl(a){a=a|0;var b=0,c=0;b=f[r>>2]|0;c=b+a|0;if((a|0)>0&(c|0)<(b|0)|(c|0)<0){ea()|0;ya(12);return -1}f[r>>2]=c;if((c|0)>(da()|0)?(ca()|0)==0:0){f[r>>2]=b;ya(12);return -1}return b|0}function Gl(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0;if((a|0)==0&(c|0)==0)e=d;else{f=d;d=c;c=a;while(1){a=f+-1|0;b[a>>0]=c&7|48;c=Wn(c|0,d|0,3)|0;d=I;if((c|0)==0&(d|0)==0){e=a;break}else f=a}}return e|0}function Hl(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1528;b=f[a+32>>2]|0;if(!b){br(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b);br(a);return}function Il(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;if(qp(a,f[b+8>>2]|0,g)|0)fj(0,b,c,d,e);return}function Jl(a){a=a|0;var b=0,c=0;b=f[a+64>>2]|0;if(!b)return;c=Qa[f[(f[b>>2]|0)+32>>2]&127](b)|0;if(!c)return;f[a+60>>2]=(((f[c+4>>2]|0)-(f[c>>2]|0)>>2>>>0)/3|0)-(f[c+40>>2]|0);return}function Kl(a){a=a|0;Ii(a);br(a);return}function Ll(a){a=a|0;var b=0;switch(a|0){case 11:case 2:case 1:{b=1;break}case 4:case 3:{b=2;break}case 6:case 5:{b=4;break}case 8:case 7:{b=8;break}case 9:{b=4;break}case 10:{b=8;break}default:b=-1}return b|0}function Ml(){var a=0,b=0;a=dn(40)|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;n[a+16>>2]=$(1.0);b=a+20|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;n[a+36>>2]=$(1.0);return a|0}function Nl(a,b){a=+a;b=+b;var c=0,d=0,e=0;p[s>>3]=a;c=f[s>>2]|0;d=f[s+4>>2]|0;p[s>>3]=b;e=f[s+4>>2]&-2147483648|d&2147483647;f[s>>2]=c;f[s+4>>2]=e;return +(+p[s>>3])}function Ol(a,b,c){a=a|0;b=b|0;c=+c;var d=0,e=0;d=u;u=u+16|0;e=d;p[e>>3]=c;_b(a,b,e);u=d;return}function Pl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=u;u=u+16|0;e=d;f[e>>2]=c;cc(a,b,e);u=d;return}function Ql(a,c){a=a|0;c=c|0;var d=0,e=0;if((a|0)!=(c|0)){d=b[c+11>>0]|0;e=d<<24>>24<0;Zi(a,e?f[c>>2]|0:c,e?f[c+4>>2]|0:d&255)|0}return a|0}function Rl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=a&65535;d=b&65535;e=X(d,c)|0;f=a>>>16;a=(e>>>16)+(X(d,f)|0)|0;d=b>>>16;b=X(d,c)|0;return (I=(a>>>16)+(X(d,f)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|e&65535|0)|0}function Sl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=vj(b)|0;d=dn(c+13|0)|0;f[d>>2]=c;f[d+4>>2]=c;f[d+8>>2]=0;e=Sp(d)|0;Rg(e|0,b|0,c+1|0)|0;f[a>>2]=e;return}function Tl(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)==-1|(b|0)>4){c=-1;return c|0}d=f[a+20+(b*12|0)>>2]|0;if(((f[a+20+(b*12|0)+4>>2]|0)-d|0)<=0){c=-1;return c|0}c=f[d>>2]|0;return c|0}function Ul(a){a=a|0;Li(a);br(a);return}function Vl(a){a=a|0;var b=0,c=0;f[a>>2]=1528;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);br(b);return}function Wl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(qp(a,f[b+8>>2]|0,0)|0)tk(0,b,c,d);return}function Xl(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;if((c|0)<(a|0)&(a|0)<(c+d|0)){e=a;c=c+d|0;a=a+d|0;while((d|0)>0){a=a-1|0;c=c-1|0;d=d-1|0;b[a>>0]=b[c>>0]|0}a=e}else Rg(a,c,d)|0;return a|0}function Yl(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1180;b=f[a+8>>2]|0;if(!b){br(a);return}c=a+12|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);br(b);br(a);return}function Zl(a){a=a|0;var b=0;f[a>>2]=2740;b=f[a+56>>2]|0;if(!b){br(a);return}br(b);br(a);return}function _l(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=u;u=u+16|0;e=d;f[e>>2]=f[c>>2];g=Sa[f[(f[a>>2]|0)+16>>2]&31](a,b,e)|0;if(g)f[c>>2]=f[e>>2];u=d;return g&1|0}function $l(a,b){a=a|0;b=b|0;var c=0;if(b>>>0>=2){c=0;return c|0}f[a+28>>2]=b;c=1;return c|0}function am(a){a=a|0;var b=0,c=0;f[a>>2]=3e3;b=a+64|0;c=f[b>>2]|0;f[b>>2]=0;if(!c){aj(a);return}Va[f[(f[c>>2]|0)+4>>2]&127](c);aj(a);return}function bm(){var a=0,b=0;a=mn()|0;if((a|0?(b=f[a>>2]|0,b|0):0)?(a=b+48|0,(f[a>>2]&-256|0)==1126902528?(f[a+4>>2]|0)==1129074247:0):0)Qo(f[b+12>>2]|0);Qo(bq()|0)}function cm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Bf(a,b,c,d,e,f,6)|0}function dm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Af(a,b,c,d,e,f,4)|0}function em(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Gf(a,b,c,d,e,f,2)|0}function fm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Af(a,b,c,d,e,f,3)|0}function gm(a){a=a|0;var b=0;f[a>>2]=2488;b=f[a+56>>2]|0;if(!b){br(a);return}br(b);br(a);return}function hm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Gf(a,b,c,d,e,f,1)|0}function im(a){a=a|0;var c=0;c=b[w+(a&255)>>0]|0;if((c|0)<8)return c|0;c=b[w+(a>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=b[w+(a>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return (b[w+(a>>>24)>>0]|0)+24|0}function jm(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0.0,f=0.0;if(!a){c=0.0;return +c}if((b|0)==0|(a|0)==(b|0)){c=0.0;return +c}d=+(b>>>0)/+(a>>>0);e=1.0-d;f=d*+Fg(d);c=-(f+e*+Fg(e));return +c}function km(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if((b|0)>0)d=0;else return;do{e=f[a+(d<<2)>>2]|0;f[c+(d<<2)>>2]=e<<1^e>>31;d=d+1|0}while((d|0)!=(b|0));return}function lm(a){a=a|0;var b=0,c=0;if(Eq(a)|0?(b=Zp(f[a>>2]|0)|0,a=b+8|0,c=f[a>>2]|0,f[a>>2]=c+-1,(c+-1|0)<0):0)br(b);return}function mm(a){a=a|0;var b=0;Ao(a);f[a>>2]=2880;f[a+40>>2]=1180;f[a+44>>2]=-1;b=a+48|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;return}function nm(a,c){a=a|0;c=c|0;var d=0;b[c+84>>0]=1;a=f[c+68>>2]|0;d=c+72|0;c=f[d>>2]|0;if((c|0)==(a|0))return 1;f[d>>2]=c+(~((c+-4-a|0)>>>2)<<2);return 1}function om(a){a=a|0;var b=0,c=0;b=f[a+16>>2]|0;c=(((f[a+12>>2]|0)+1-b|0)/64|0)+b<<3;a=b<<3;b=Tn(c|0,((c|0)<0)<<31>>31|0,a|0,((a|0)<0)<<31>>31|0)|0;return b|0}function pm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Bf(a,b,c,d,e,f,5)|0}function qm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Bf(a,b,c,d,e,f,9)|0}function rm(a){a=a|0;var b=0;f[a>>2]=3208;b=f[a+36>>2]|0;if(b|0)br(b);b=f[a+24>>2]|0;if(!b){br(a);return}br(b);br(a);return}function sm(a){a=a|0;var b=0;f[a>>2]=2740;b=f[a+56>>2]|0;if(!b)return;br(b);return}function tm(a){a=a|0;var b=0,c=0;f[a>>2]=1460;b=a+36|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&127](c);zi(a);br(a);return}function um(a){a=a|0;var b=0,c=0;f[a>>2]=1180;b=f[a+8>>2]|0;if(!b)return;c=a+12|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);br(b);return}function vm(a){a=a|0;var b=0;f[a>>2]=3276;b=f[a+36>>2]|0;if(b|0)br(b);b=f[a+24>>2]|0;if(!b){br(a);return}br(b);br(a);return}function wm(a){a=a|0;var c=0;f[a>>2]=1336;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=-1;c=a+16|0;f[a+32>>2]=0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;b[c+12>>0]=0;return}function xm(a){a=a|0;f[a>>2]=3296;Gi(a+8|0);br(a);return}function ym(a){a=a|0;var b=0;f[a>>2]=2488;b=f[a+56>>2]|0;if(!b)return;br(b);return}function zm(a){a=a|0;var b=0,c=0;f[a>>2]=1460;b=a+36|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&127](c);zi(a);return}function Am(a,b){a=a|0;b=b|0;f[a>>2]=2968;Vh(a+4|0);f[a+40>>2]=0;f[a+44>>2]=0;f[a>>2]=2984;f[a+48>>2]=b;f[a+52>>2]=0;return}function Bm(a){a=a|0;var b=0,c=0;f[a>>2]=3e3;b=a+64|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&127](c);aj(a);br(a);return}function Cm(a){a=a|0;var b=0,c=0,d=0;b=f[a>>2]|0;c=a+4|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);f[a+12>>2]=0;f[a+16>>2]=0;return}function Dm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=a+20|0;e=f[d>>2]|0;g=(f[a+16>>2]|0)-e|0;a=g>>>0>c>>>0?c:g;Rg(e|0,b|0,a|0)|0;f[d>>2]=(f[d>>2]|0)+a;return c|0}function Em(a){a=a|0;var b=0;f[a>>2]=3208;b=f[a+36>>2]|0;if(b|0)br(b);b=f[a+24>>2]|0;if(!b)return;br(b);return}function Fm(a){a=a|0;f[a>>2]=3296;Gi(a+8|0);return}function Gm(a,b){a=a|0;b=b|0;f[a>>2]=2968;Vh(a+4|0);f[a+40>>2]=0;f[a+44>>2]=0;f[a>>2]=2984;f[a+48>>2]=b;f[a+52>>2]=b;return}function Hm(a){a=a|0;var b=0,c=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-8-b|0)>>>3)<<3);br(b);return}function Im(a){a=a|0;var b=0,c=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);br(b);return}function Jm(a,b){a=a|0;b=b|0;var c=0;c=f[b>>2]|0;return (1<<(c&31)&f[(f[a+28>>2]|0)+(c>>>5<<2)>>2]|0)!=0|0}function Km(a,b,c){a=a|0;b=b|0;c=c|0;return Sa[f[(f[a>>2]|0)+44>>2]&31](a,b,c)|0}function Lm(a){a=a|0;var c=0;Al(a);c=a+64|0;f[a+88>>2]=0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;b[c+20>>0]=0;return}function Mm(a){a=a|0;f[a>>2]=2796;tj(a+88|0);br(a);return}function Nm(a){a=a|0;var b=0;f[a>>2]=3276;b=f[a+36>>2]|0;if(b|0)br(b);b=f[a+24>>2]|0;if(!b)return;br(b);return}function Om(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((f[b+4>>2]|0)==(c|0)?(c=b+28|0,(f[c>>2]|0)!=1):0)f[c>>2]=d;return}function Pm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=$(f);pg(a,b,c,d,e,f);return}function Qm(a){a=a|0;var b=0,c=0,d=0;b=u;u=u+16|0;c=b;if((uk(a)|0)==0?(Sa[f[a+32>>2]&31](a,c,1)|0)==1:0)d=h[c>>0]|0;else d=-1;u=b;return d|0}function Rm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;f[a+104>>2]=b;c=f[a+8>>2]|0;d=f[a+4>>2]|0;e=c-d|0;f[a+108>>2]=e;f[a+100>>2]=(b|0)!=0&(e|0)>(b|0)?d+b|0:c;return}function Sm(a){a=a|0;var b=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;b=a+16|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;return}function Tm(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=$(g);pg(f[a>>2]|0,b,c,d,e,g);return}function Um(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=$(f);Pm(a,b,c,d,e,f);return}function Vm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return cm(a,b,c,d,e,f)|0}function Wm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return dm(a,b,c,d,e,f)|0}function Xm(a){a=a|0;var b=0,c=0;if(!a)return;b=f[a>>2]|0;if(b|0){c=a+4|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;br(b)}br(a);return}function Ym(a){a=a|0;f[a>>2]=2544;tj(a+88|0);br(a);return}function Zm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return em(a,b,c,d,e,f)|0}function _m(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return fm(a,b,c,d,e,f)|0}function $m(a){a=a|0;f[a>>2]=2796;tj(a+88|0);return}function an(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e|0;Bd(a,b,c,d,g)|0;u=e;return (I=f[g+4>>2]|0,f[g>>2]|0)|0}function bn(a){a=a|0;var b=0;$n(a);f[a>>2]=5840;b=a+84|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;return}function cn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return hm(a,b,c,d,e,f)|0}function dn(a){a=a|0;var b=0,c=0;b=(a|0)==0?1:a;while(1){a=$a(b)|0;if(a|0){c=a;break}a=$p()|0;if(!a){c=0;break}Ua[a&3]()}return c|0}function en(a,b,c){a=a|0;b=b|0;c=c|0;ac(a,b,c);return}function fn(a,b,c){a=a|0;b=b|0;c=c|0;f[a+4>>2]=b;f[a+8>>2]=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(c<<2)>>2];f[a+12>>2]=c;return 1}function gn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return pm(a,b,c,d,e,f)|0}function hn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return qm(a,b,c,d,e,f)|0}function jn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=$(f);Tm(a,b,c,d,e,f);return}function kn(a){a=a|0;f[a>>2]=2544;tj(a+88|0);return}function ln(a){a=a|0;var b=0,c=0,d=0;b=u;u=u+16|0;c=b;d=dr(f[a+60>>2]|0)|0;f[c>>2]=d;d=ro(Ba(6,c|0)|0)|0;u=b;return d|0}function mn(){var a=0,b=0;a=u;u=u+16|0;if(!(Ka(18612,3)|0)){b=Ia(f[4654]|0)|0;u=a;return b|0}else Dn(17746,a);return 0}function nn(a){a=a|0;var b=0;if(!a)return;b=f[a>>2]|0;f[a>>2]=0;if(b|0)Va[f[(f[b>>2]|0)+4>>2]&127](b);br(a);return}function on(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;a=c;c=Rl(e,a)|0;f=I;return (I=(X(b,a)|0)+(X(d,e)|0)+f|f&0,c|0|0)|0}function pn(a,b){a=a|0;b=b|0;Sg(a,b);f[a>>2]=1276;b=a+36|0;a=b+40|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function qn(a){a=a|0;Gi(a);br(a);return}function rn(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;f[a+24>>2]=0;f[a+28>>2]=0;return}function sn(a){a=a|0;var b=0;b=u;u=u+16|0;wc(a);if(!(La(f[4654]|0,0)|0)){u=b;return}else Dn(17845,b)}function tn(a){a=a|0;var b=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;b=a+16|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;return}function un(a,b){a=a|0;b=b|0;return eg(a+40|0,b)|0}function vn(a,b){a=a|0;b=b|0;return $i(a,b,Aq(b)|0)|0}function wn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;f[g>>2]=d;d=Mi(a,b,c,g)|0;u=e;return d|0}function xn(a,b){a=a|0;b=b|0;return Aj(a+40|0,b)|0}function yn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return zh(a,b,c,d)|0}function zn(a){a=a|0;var b=0;f[a>>2]=3608;f[a+52>>2]=0;b=a+4|0;a=b+44|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function An(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return $g(a,b,c,d)|0}function Bn(a,b){a=a|0;b=b|0;var c=0;c=f[a+64>>2]|0;return Ra[f[(f[c>>2]|0)+24>>2]&127](c,b)|0}function Cn(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;b[a+24>>0]=0;return}function Dn(a,b){a=a|0;b=b|0;var c=0,d=0;c=u;u=u+16|0;d=c;f[d>>2]=b;b=f[1478]|0;hh(b,a,d)|0;zj(10,b)|0;Ca()}function En(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return Ta[a&31](b|0,c|0,d|0,e|0,f|0,g|0)|0}function Fn(a){a=a|0;var b=0;b=f[a+56>>2]|0;f[a+60>>2]=((f[b+100>>2]|0)-(f[b+96>>2]|0)|0)/12|0;return}function Gn(a,b){a=a|0;b=b|0;var c=0;c=f[a+64>>2]|0;return Ra[f[(f[c>>2]|0)+16>>2]&127](c,b)|0}function Hn(a,b){a=a|0;b=b|0;var c=0;c=f[a+64>>2]|0;return Ra[f[(f[c>>2]|0)+20>>2]&127](c,b)|0}function In(a,b){a=a|0;b=b|0;var c=0;c=f[a+64>>2]|0;return Ra[f[(f[c>>2]|0)+12>>2]&127](c,b)|0}function Jn(){var a=0;a=u;u=u+16|0;if(!(Ja(18616,117)|0)){u=a;return}else Dn(17795,a)}function Kn(a){a=a|0;f[a>>2]=1136;Vh(a+4|0);f[a+40>>2]=0;f[a+44>>2]=0;f[a>>2]=2944;return}function Ln(a){a=a|0;Se(a);br(a);return}function Mn(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;_a[a&3](b|0,c|0,d|0,e|0,f|0,g|0)}function Nn(a,b){a=a|0;b=b|0;var c=0;c=f[b+64>>2]|0;Wa[f[(f[c>>2]|0)+28>>2]&15](a,c);return}function On(a,b,c){a=a|0;b=b|0;c=c|0;if(b|0)hj(a|0,(zq(c)|0)&255|0,b|0)|0;return a|0}function Pn(a){a=a|0;return 4}function Qn(a,b,c){a=a|0;b=b|0;c=c|0;return Ui(0,b,c)|0}function Rn(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){I=b<>>32-c;return a<>>0;return (I=b+d+(e>>>0>>0|0)>>>0,e|0)|0}function Un(a,b){a=a|0;b=b|0;var c=0;if(!b)c=0;else c=lh(f[b>>2]|0,f[b+4>>2]|0,a)|0;return (c|0?c:a)|0}function Vn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=b-d>>>0;e=b-d-(c>>>0>a>>>0|0)>>>0;return (I=e,a-c>>>0|0)|0}function Wn(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){I=b>>>c;return a>>>c|(b&(1<>>c-32|0}function Xn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return qe(a,b,c,d)|0}function Yn(a){a=a|0;Ve(a);br(a);return}function Zn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return Oi(a,b,c,d)|0}function _n(a){a=a|0;return 5}function $n(a){a=a|0;var b=0;f[a>>2]=5880;b=a+4|0;a=b+80|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function ao(a){a=a|0;return 6}function bo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Pi(a,b,c,d)|0}function co(a,b,c){a=a|0;b=b|0;c=c|0;Fj(a,b,c);return}function eo(a,b){a=a|0;b=b|0;xi(f[a>>2]|0,b);return}function fo(a,b,c){a=a|0;b=b|0;c=c|0;co(a,b,c);return}function go(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;He(a,b,c,d,1);return}function ho(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;He(a,b,c,d,0);return}function io(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Eg(a,b,c,d)|0}function jo(a,b,c){a=a|0;b=b|0;c=c|0;return Qh(a,b,c)|0}function ko(a){a=a|0;var b=0;b=f[a+64>>2]|0;return Qa[f[(f[b>>2]|0)+32>>2]&127](b)|0}function lo(a,b,c){a=a|0;b=b|0;c=c|0;f[a+28>>2]=b;f[a+32>>2]=c;return 1}function mo(a,b){a=a|0;b=b|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;return}function no(a,b,c){a=a|0;b=b|0;c=c|0;Fj(f[a>>2]|0,b,c);return}function oo(a,b,c){a=a|0;b=b|0;c=c|0;return Ui(a,b,c)|0}function po(a,b,c){a=a|0;b=b|0;c=c|0;return Qn(a,b,c)|0}function qo(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Za[a&3](b|0,c|0,d|0,e|0,f|0)}function ro(a){a=a|0;var b=0,c=0;if(a>>>0>4294963200){b=ir()|0;f[b>>2]=0-a;c=-1}else c=a;return c|0}function so(a,b,c){a=a|0;b=b|0;c=c|0;return rh(a,b,c)|0}function to(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;return}function uo(a,b){a=a|0;b=b|0;f[a+8>>2]=b;f[a+12>>2]=-1;return 1}function vo(a,b){a=a|0;b=b|0;f[a+56>>2]=b;tp(a,b);return}function wo(a,b,c){a=a|0;b=b|0;c=c|0;no(a,b,c);return}function xo(a){a=+a;var b=0;p[s>>3]=a;b=f[s>>2]|0;I=f[s+4>>2]|0;return b|0}function yo(a,b,c){a=a|0;b=$(b);c=c|0;var d=Oa;d=$($(c|0)/b);n[a>>2]=d;return}function zo(a,b){a=a|0;b=b|0;xi(a,b);return}function Ao(a){a=a|0;wm(a);f[a>>2]=1460;f[a+36>>2]=0;return}function Bo(a){a=a|0;zn(a);f[a>>2]=3424;f[a+56>>2]=0;f[a+60>>2]=0;return}function Co(a){a=a|0;var b=0;if(!a)b=0;else b=(mh(a,1024,1112,0)|0)!=0&1;return b|0}function Do(a,b,c){a=a|0;b=b|0;c=c|0;Eo(f[a>>2]|0,b,c);return}function Eo(a,b,c){a=a|0;b=b|0;c=c|0;Fi(a+4|0,b,c);return}function Fo(a){a=a|0;var b=0;b=dn(8)|0;ck(b,a);return b|0}function Go(a){a=a|0;if((b[a+11>>0]|0)<0)br(f[a>>2]|0);return}function Ho(a){a=a|0;if(!a)return;Va[f[(f[a>>2]|0)+4>>2]&127](a);return}function Io(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Ya[a&7](b|0,c|0,d|0,e|0)}function Jo(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)Xl(a|0,b|0,c|0)|0;return a|0}function Ko(a,b,c){a=a|0;b=b|0;c=c|0;Do(a,b,c);return}function Lo(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)Rg(a|0,b|0,c|0)|0;return a|0}function Mo(a){a=a|0;f[a+52>>2]=f[(f[a+4>>2]|0)+80>>2];return}function No(a,b){a=a|0;b=b|0;eo(a,b);return}function Oo(a){a=a|0;f[a+52>>2]=f[(f[a+56>>2]|0)+80>>2];return}function Po(a,b){a=a|0;b=b|0;return -1}function Qo(a){a=a|0;var b=0;b=u;u=u+16|0;Ua[a&3]();Dn(17898,b)}function Ro(a){a=a|0;wh(a);br(a);return}function So(a,b,c){a=a|0;b=b|0;c=c|0;$o(a,b,c);return}function To(a,b){a=a|0;b=b|0;bk(f[a>>2]|0,b);return}function Uo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Sa[a&31](b|0,c|0,d|0)|0}function Vo(a,b){a=a|0;b=b|0;return (Jp(a,b)|0)<<24>>24|0}function Wo(a,b){a=a|0;b=b|0;f[a>>2]=6924;Sl(a+4|0,b);return}function Xo(a){a=a|0;Bo(a);f[a>>2]=3e3;f[a+64>>2]=0;return}function Yo(a,b){a=a|0;b=b|0;var c=0;if(!a)c=0;else c=Bi(a,b,0)|0;return c|0}function Zo(a,b){a=a|0;b=b|0;zo(a,b);return}function _o(a){a=a|0;return f[a+12>>2]|0}function $o(a,b,c){a=a|0;b=b|0;c=c|0;Eo(a,b,c);return}function ap(){var a=0;a=dn(64)|0;Al(a);return a|0}function bp(a,b){a=a|0;b=b|0;To(a,b);return}function cp(a){a=a|0;if(!a)return;Qi(a);br(a);return}function dp(a){a=a|0;return f[a+4>>2]|0}function ep(a,b,c){a=a|0;b=b|0;c=c|0;if(!(f[a>>2]&32))ai(b,c,a)|0;return}function fp(a){a=a|0;return Mp(a)|0}function gp(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Xa[a&15](b|0,c|0,d|0)}function hp(){var a=0;a=dn(96)|0;Lm(a);return a|0}function ip(a){a=a|0;return Np(a)|0}function jp(a){a=a|0;var b=0;b=u;u=u+a|0;u=u+15&-16;return b|0}function kp(a){a=a|0;var b=0;b=(Yq()|0)+188|0;return Tj(a,f[b>>2]|0)|0}function lp(a){a=a|0;return ((f[a+100>>2]|0)-(f[a+96>>2]|0)|0)/12|0|0}function mp(a,b){a=a|0;b=b|0;vp(a,b);return}function np(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;aa(3);return 0}function op(){var a=0;a=dn(12)|0;Bp(a);return a|0}function pp(a){a=a|0;zi(a);br(a);return}function qp(a,b,c){a=a|0;b=b|0;c=c|0;return (a|0)==(b|0)|0}function rp(a,b){a=a|0;b=b|0;var c=0;c=Fp(a|0)|0;return ((b|0)==0?a:c)|0}function sp(a){a=a|0;return (f[a+12>>2]|0)-(f[a+8>>2]|0)>>2|0}function tp(a,b){a=a|0;b=b|0;f[a+4>>2]=b;return}function up(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Bd(a,b,c,d,0)|0}function vp(a,b){a=a|0;b=b|0;bk(a,b);return}function wp(a){a=a|0;f[a+4>>2]=0;f[a+8>>2]=0;f[a>>2]=a+4;return}function xp(a){a=a|0;return nq(a)|0}function yp(){var a=0;a=dn(84)|0;$n(a);return a|0}function zp(a){a=a|0;gi(a);br(a);return}function Ap(a){a=a|0;return oq(a)|0}function Bp(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;return}function Cp(a){a=a|0;f[a>>2]=6924;lm(a+4|0);return}function Dp(a,b,c){a=a|0;b=b|0;c=c|0;return Ra[a&127](b|0,c|0)|0}function Ep(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;aa(10)}function Fp(a){a=a|0;return (a&255)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function Gp(a){a=a|0;Bo(a);f[a>>2]=3504;return}function Hp(a,c){a=a|0;c=c|0;b[a>>0]=b[c>>0]|0;return}function Ip(a,b,c){a=a|0;b=b|0;c=c|0;return -1}function Jp(a,c){a=a|0;c=c|0;return b[(f[a>>2]|0)+c>>0]|0}function Kp(a){a=a|0;return (f[a+4>>2]|0)-(f[a>>2]|0)|0}function Lp(a){a=a|0;aj(a);br(a);return}function Mp(a){a=a|0;return f[(f[a>>2]|0)+40>>2]|0}function Np(a){a=a|0;return f[(f[a>>2]|0)+44>>2]|0}function Op(a){a=a|0;if(!a)return;br(a);return}function Pp(a){a=a|0;b[a+28>>0]=1;return}function Qp(a,b){a=a|0;b=b|0;if(!x){x=a;y=b}}function Rp(a,b){a=a|0;b=b|0;return 1}function Sp(a){a=a|0;return a+12|0}function Tp(a,b,c){a=a|0;b=b|0;c=c|0;Wa[a&15](b|0,c|0)}function Up(a,b){a=a|0;b=b|0;f[a+80>>2]=b;return}function Vp(){var a=0;a=dn(48)|0;Fq(a);return a|0}function Wp(a){a=a|0;return vq(a+4|0)|0}function Xp(){var a=0;a=dn(108)|0;bn(a);return a|0}function Yp(a){a=a|0;return (b[a+32>>0]|0)!=0|0}function Zp(a){a=a|0;return a+-12|0}function _p(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;aa(9)}function $p(){var a=0;a=f[4655]|0;f[4655]=a+0;return a|0}function aq(a){a=a|0;return f[a+56>>2]|0}function bq(){var a=0;a=f[1708]|0;f[1708]=a+0;return a|0}function cq(a){a=a|0;wg(a);br(a);return}function dq(a){a=a|0;fr(a);br(a);return}function eq(a){a=a|0;return b[a+24>>0]|0}function fq(a,b){a=a|0;b=b|0;return 0}function gq(a){a=a|0;return f[a+48>>2]|0}function hq(a,b){a=a|0;b=b|0;return Qa[a&127](b|0)|0}function iq(a){a=a|0;return f[a+60>>2]|0}function jq(a){a=a|0;return f[a+28>>2]|0}function kq(a){a=a|0;sa(a|0)|0;bm()}function lq(a){a=a|0;Cp(a);br(a);return}function mq(a){a=a|0;Ca()}function nq(a){a=a|0;return f[a+40>>2]|0}function oq(a){a=a|0;return f[a+44>>2]|0}function pq(a,b){a=a|0;b=b|0;return $(+sk(a,b,0))}function qq(a){a=a|0;return 3}function rq(a,b){a=a|0;b=b|0;u=a;v=b}function sq(a){a=a|0;n[a>>2]=$(1.0);return}function tq(a){a=a|0;return ((a|0)==32|(a+-9|0)>>>0<5)&1|0}function uq(a){a=a|0;return f[a+80>>2]|0}function vq(a){a=a|0;return f[a>>2]|0}function wq(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;aa(8)}function xq(a,b){a=a|0;b=b|0;Va[a&127](b|0)}function yq(a,b){a=a|0;b=b|0;return Un(a,b)|0}function zq(a){a=a|0;return a&255|0}function Aq(a){a=a|0;return vj(a)|0}function Bq(a,b){a=a|0;b=b|0;return +(+sk(a,b,1))}function Cq(a,b,c){a=a|0;b=b|0;c=c|0;aa(2);return 0}function Dq(a){a=a|0;return 2}function Eq(a){a=a|0;return 1}function Fq(a){a=a|0;Kn(a);return}function Gq(a,b){a=+a;b=+b;return +(+Nl(a,b))}function Hq(a,b){a=+a;b=b|0;return +(+Wj(a,b))}function Iq(a,b){a=+a;b=b|0;return +(+Uj(a,b))}function Jq(){return 3}function Kq(a,b,c){a=a|0;b=b|0;c=c|0;aa(7)}function Lq(){return 0}function Mq(){return -1}function Nq(){return dn(1)|0}function Oq(){return 4}function Pq(a){a=a|0;return (a+-48|0)>>>0<10|0}function Qq(){return 1}function Rq(){return 2}function Sq(a,b){a=+a;b=+b;return +(+pd(a,b))}function Tq(a,b){a=a|0;b=b|0;aa(1);return 0}function Uq(a){a=a|0;Ha()}function Vq(a){a=a|0;Ua[a&3]()}function Wq(){ua()}function Xq(a){a=a|0;return +(+Bq(a,0))}function Yq(){return lr()|0}function Zq(a,b){a=a|0;b=b|0;aa(6)}function _q(a){a=a|0;return dn(a)|0}function $q(a){a=a|0;br(a);return}function ar(a){a=a|0;u=a}function br(a){a=a|0;wc(a);return}function cr(a){a=a|0;I=a}function dr(a){a=a|0;return a|0}function er(a){a=a|0;aa(0);return 0}function fr(a){a=a|0;return}function gr(a){a=a|0;return 0}function hr(){return I|0}function ir(){return 18544}function jr(){return u|0}function kr(a){a=a|0;aa(5)}function lr(){return 6040}function mr(){aa(4)} + +// EMSCRIPTEN_END_FUNCS +var Qa=[er,Dq,Eq,Eq,Dq,gb,gr,gr,gr,ak,Vf,Eq,dp,gr,gr,Eq,gr,Eq,Eq,rl,_n,ll,Eq,ao,Yk,Eq,jq,Pn,rl,Eq,rl,_n,ll,Eq,ao,Yk,Eq,jq,Pn,rl,Eq,qq,gr,dp,Eq,gr,Eq,qq,Eq,kl,Pn,kl,_n,il,Eq,ao,Qk,Eq,jq,Eq,kl,Pn,kl,_n,il,Eq,ao,Qk,Eq,jq,Eq,Dq,Eq,Eq,Cd,Eq,Je,Tg,qk,ko,_o,dp,lg,sg,$e,_o,dp,Eq,gr,gr,wi,gr,Eq,gr,Xj,ln,Wp,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er,er];var Ra=[Tq,ql,Ug,ve,xl,fq,fq,fq,Rp,kb,gj,uo,Rp,Rp,fi,bj,Uh,ek,jl,Gj,Vk,Yj,Zj,Fe,Po,fq,Zh,fq,Dl,_e,fq,El,Zg,$l,td,fq,Dl,_e,fq,El,Zg,$l,td,xn,Po,fq,Xh,sd,fq,tl,We,fq,ul,Yg,$l,sd,fq,tl,We,fq,ul,Yg,$l,un,Hn,Bn,In,Gn,Kg,dk,mk,mc,le,Jm,wf,af,Ze,Ig,dk,mk,lc,le,Jm,Rp,fq,fq,bf,nm,Xf,bf,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq,Tq];var Sa=[Cq,lo,Ip,fn,Km,fg,cj,el,ih,uc,vh,$f,Rh,Qb,Oh,vg,gl,Dm,qj,Cq,Cq,Cq,Cq,Cq,Cq,Cq,Cq,Cq,Cq,Cq,Cq,Cq];var Ta=[np,Ld,Bc,ne,Sb,bb,Cc,me,Rb,ab,Lg,ed,eb,sf,qc,id,db,qf,nc,np,np,np,np,np,np,np,np,np,np,np,np,np];var Ua=[mr,Wq,Ai,Jn];var Va=[kr,Ij,Qj,fr,$q,um,Yl,Wk,Uq,gi,zp,zi,pp,wh,Ro,zm,tm,Vl,Uq,Hl,Hl,Uk,Jk,_k,Ok,fr,$q,Uq,Li,Ul,Hl,Rk,Gk,Xk,Mk,fr,$q,Uq,Ii,Kl,zm,tm,fr,$q,$q,mj,Bl,ym,gm,kn,Ym,fr,$q,$q,kj,sl,sm,Zl,$m,Mm,fr,$q,ok,hk,Qj,Sj,Vj,Vj,am,Bm,Mc,Jl,Ve,Yn,rk,jk,Lk,Fk,Em,rm,xk,nk,Nk,Ik,Nm,vm,Fm,xm,Gi,qn,Se,Ln,aj,Uq,Lp,Oo,Fn,fr,$q,Uq,Lp,Mo,Lp,Mo,Dk,wk,rb,wg,cq,fr,dq,fr,fr,dq,Cp,lq,lq,sn,kr,kr,kr,kr,kr,kr,kr,kr,kr,kr];var Wa=[Zq,ik,Rf,Ri,Nn,ib,lb,sc,mo,ej,ej,pk,Ec,Zq,Zq,Zq];var Xa=[Kq,ze,Yi,$b,fc,Fc,$b,fc,uj,Ej,Hg,oj,ug,If,Kq,Kq];var Ya=[wq,Dg,Zf,Wl,Zk,wq,wq,wq];var Za=[_p,ij,Vg,_p];var _a=[Ep,Il,Kk,Ep];return{___cxa_can_catch:_l,___cxa_is_pointer_type:Co,___divdi3:zk,___muldi3:on,___udivdi3:up,___uremdi3:an,_bitshift64Lshr:Wn,_bitshift64Shl:Rn,_emscripten_bind_DracoInt8Array_DracoInt8Array_0:op,_emscripten_bind_DracoInt8Array_GetValue_1:Vo,_emscripten_bind_DracoInt8Array___destroy___0:Xm,_emscripten_bind_DracoInt8Array_size_0:Kp,_emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2:jo,_emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3:An,_emscripten_bind_Encoder_Encoder_0:Vp,_emscripten_bind_Encoder_GetNumberOfEncodedFaces_0:Ap,_emscripten_bind_Encoder_GetNumberOfEncodedPoints_0:xp,_emscripten_bind_Encoder_SetAttributeExplicitQuantization_5:Um,_emscripten_bind_Encoder_SetAttributeQuantization_2:fo,_emscripten_bind_Encoder_SetEncodingMethod_1:mp,_emscripten_bind_Encoder_SetSpeedOptions_2:So,_emscripten_bind_Encoder_SetTrackEncodedProperties_1:Zo,_emscripten_bind_Encoder___destroy___0:Hj,_emscripten_bind_ExpertEncoder_EncodeToDracoBuffer_2:so,_emscripten_bind_ExpertEncoder_ExpertEncoder_1:Fo,_emscripten_bind_ExpertEncoder_GetNumberOfEncodedFaces_0:ip,_emscripten_bind_ExpertEncoder_GetNumberOfEncodedPoints_0:fp,_emscripten_bind_ExpertEncoder_SetAttributeExplicitQuantization_5:jn,_emscripten_bind_ExpertEncoder_SetAttributeQuantization_2:wo,_emscripten_bind_ExpertEncoder_SetEncodingMethod_1:bp,_emscripten_bind_ExpertEncoder_SetSpeedOptions_2:Ko,_emscripten_bind_ExpertEncoder_SetTrackEncodedProperties_1:No,_emscripten_bind_ExpertEncoder___destroy___0:nn,_emscripten_bind_GeometryAttribute_GeometryAttribute_0:ap,_emscripten_bind_GeometryAttribute___destroy___0:Op,_emscripten_bind_MeshBuilder_AddFacesToMesh_3:io,_emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5:hn,_emscripten_bind_MeshBuilder_AddFloatAttribute_5:hn,_emscripten_bind_MeshBuilder_AddInt16Attribute_5:_m,_emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5:gn,_emscripten_bind_MeshBuilder_AddInt32Attribute_5:gn,_emscripten_bind_MeshBuilder_AddInt8Attribute_5:cn,_emscripten_bind_MeshBuilder_AddMetadataToMesh_2:po,_emscripten_bind_MeshBuilder_AddMetadata_2:oo,_emscripten_bind_MeshBuilder_AddUInt16Attribute_5:Wm,_emscripten_bind_MeshBuilder_AddUInt32Attribute_5:Vm,_emscripten_bind_MeshBuilder_AddUInt8Attribute_5:Zm,_emscripten_bind_MeshBuilder_MeshBuilder_0:Nq,_emscripten_bind_MeshBuilder_SetMetadataForAttribute_3:yn,_emscripten_bind_MeshBuilder___destroy___0:Op,_emscripten_bind_Mesh_Mesh_0:Xp,_emscripten_bind_Mesh___destroy___0:Ho,_emscripten_bind_Mesh_num_attributes_0:sp,_emscripten_bind_Mesh_num_faces_0:lp,_emscripten_bind_Mesh_num_points_0:uq,_emscripten_bind_Mesh_set_num_points_1:Up,_emscripten_bind_MetadataBuilder_AddDoubleEntry_3:Zn,_emscripten_bind_MetadataBuilder_AddIntEntry_3:bo,_emscripten_bind_MetadataBuilder_AddStringEntry_3:Xn,_emscripten_bind_MetadataBuilder_MetadataBuilder_0:Nq,_emscripten_bind_MetadataBuilder___destroy___0:Op,_emscripten_bind_Metadata_Metadata_0:Ml,_emscripten_bind_Metadata___destroy___0:cp,_emscripten_bind_PointAttribute_PointAttribute_0:hp,_emscripten_bind_PointAttribute___destroy___0:xj,_emscripten_bind_PointAttribute_attribute_type_0:aq,_emscripten_bind_PointAttribute_byte_offset_0:gq,_emscripten_bind_PointAttribute_byte_stride_0:nq,_emscripten_bind_PointAttribute_data_type_0:jq,_emscripten_bind_PointAttribute_normalized_0:Yp,_emscripten_bind_PointAttribute_num_components_0:eq,_emscripten_bind_PointAttribute_size_0:uq,_emscripten_bind_PointAttribute_unique_id_0:iq,_emscripten_bind_PointCloudBuilder_AddFloatAttribute_5:hn,_emscripten_bind_PointCloudBuilder_AddInt16Attribute_5:_m,_emscripten_bind_PointCloudBuilder_AddInt32Attribute_5:gn,_emscripten_bind_PointCloudBuilder_AddInt8Attribute_5:cn,_emscripten_bind_PointCloudBuilder_AddMetadata_2:oo,_emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5:Wm,_emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5:Vm,_emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5:Zm,_emscripten_bind_PointCloudBuilder_PointCloudBuilder_0:Nq,_emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3:yn,_emscripten_bind_PointCloudBuilder___destroy___0:Op,_emscripten_bind_PointCloud_PointCloud_0:yp,_emscripten_bind_PointCloud___destroy___0:Ho,_emscripten_bind_PointCloud_num_attributes_0:sp,_emscripten_bind_PointCloud_num_points_0:uq,_emscripten_bind_VoidPtr___destroy___0:Op,_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE:Mq,_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD:Lq,_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH:Qq,_emscripten_enum_draco_GeometryAttribute_Type_COLOR:Rq,_emscripten_enum_draco_GeometryAttribute_Type_GENERIC:Oq,_emscripten_enum_draco_GeometryAttribute_Type_INVALID:Mq,_emscripten_enum_draco_GeometryAttribute_Type_NORMAL:Qq,_emscripten_enum_draco_GeometryAttribute_Type_POSITION:Lq,_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD:Jq,_emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING:Qq,_emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING:Lq,_emscripten_replace_memory:Pa,_free:wc,_i64Add:Tn,_i64Subtract:Vn,_llvm_bswap_i32:Fp,_malloc:$a,_memcpy:Rg,_memmove:Xl,_memset:hj,_sbrk:Fl,dynCall_ii:hq,dynCall_iii:Dp,dynCall_iiii:Uo,dynCall_iiiiiii:En,dynCall_v:Vq,dynCall_vi:xq,dynCall_vii:Tp,dynCall_viii:gp,dynCall_viiii:Io,dynCall_viiiii:qo,dynCall_viiiiii:Mn,establishStackSpace:rq,getTempRet0:hr,runPostSets:Sn,setTempRet0:cr,setThrew:Qp,stackAlloc:jp,stackRestore:ar,stackSave:jr}}) + + +// EMSCRIPTEN_END_ASM +(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var ___cxa_can_catch=Module["___cxa_can_catch"]=asm["___cxa_can_catch"];var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=asm["___cxa_is_pointer_type"];var ___divdi3=Module["___divdi3"]=asm["___divdi3"];var ___muldi3=Module["___muldi3"]=asm["___muldi3"];var ___udivdi3=Module["___udivdi3"]=asm["___udivdi3"];var ___uremdi3=Module["___uremdi3"]=asm["___uremdi3"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _emscripten_bind_DracoInt8Array_DracoInt8Array_0=Module["_emscripten_bind_DracoInt8Array_DracoInt8Array_0"]=asm["_emscripten_bind_DracoInt8Array_DracoInt8Array_0"];var _emscripten_bind_DracoInt8Array_GetValue_1=Module["_emscripten_bind_DracoInt8Array_GetValue_1"]=asm["_emscripten_bind_DracoInt8Array_GetValue_1"];var _emscripten_bind_DracoInt8Array___destroy___0=Module["_emscripten_bind_DracoInt8Array___destroy___0"]=asm["_emscripten_bind_DracoInt8Array___destroy___0"];var _emscripten_bind_DracoInt8Array_size_0=Module["_emscripten_bind_DracoInt8Array_size_0"]=asm["_emscripten_bind_DracoInt8Array_size_0"];var _emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2=Module["_emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2"]=asm["_emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2"];var _emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3=Module["_emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3"]=asm["_emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3"];var _emscripten_bind_Encoder_Encoder_0=Module["_emscripten_bind_Encoder_Encoder_0"]=asm["_emscripten_bind_Encoder_Encoder_0"];var _emscripten_bind_Encoder_GetNumberOfEncodedFaces_0=Module["_emscripten_bind_Encoder_GetNumberOfEncodedFaces_0"]=asm["_emscripten_bind_Encoder_GetNumberOfEncodedFaces_0"];var _emscripten_bind_Encoder_GetNumberOfEncodedPoints_0=Module["_emscripten_bind_Encoder_GetNumberOfEncodedPoints_0"]=asm["_emscripten_bind_Encoder_GetNumberOfEncodedPoints_0"];var _emscripten_bind_Encoder_SetAttributeExplicitQuantization_5=Module["_emscripten_bind_Encoder_SetAttributeExplicitQuantization_5"]=asm["_emscripten_bind_Encoder_SetAttributeExplicitQuantization_5"];var _emscripten_bind_Encoder_SetAttributeQuantization_2=Module["_emscripten_bind_Encoder_SetAttributeQuantization_2"]=asm["_emscripten_bind_Encoder_SetAttributeQuantization_2"];var _emscripten_bind_Encoder_SetEncodingMethod_1=Module["_emscripten_bind_Encoder_SetEncodingMethod_1"]=asm["_emscripten_bind_Encoder_SetEncodingMethod_1"];var _emscripten_bind_Encoder_SetSpeedOptions_2=Module["_emscripten_bind_Encoder_SetSpeedOptions_2"]=asm["_emscripten_bind_Encoder_SetSpeedOptions_2"];var _emscripten_bind_Encoder_SetTrackEncodedProperties_1=Module["_emscripten_bind_Encoder_SetTrackEncodedProperties_1"]=asm["_emscripten_bind_Encoder_SetTrackEncodedProperties_1"];var _emscripten_bind_Encoder___destroy___0=Module["_emscripten_bind_Encoder___destroy___0"]=asm["_emscripten_bind_Encoder___destroy___0"];var _emscripten_bind_ExpertEncoder_EncodeToDracoBuffer_2=Module["_emscripten_bind_ExpertEncoder_EncodeToDracoBuffer_2"]=asm["_emscripten_bind_ExpertEncoder_EncodeToDracoBuffer_2"];var _emscripten_bind_ExpertEncoder_ExpertEncoder_1=Module["_emscripten_bind_ExpertEncoder_ExpertEncoder_1"]=asm["_emscripten_bind_ExpertEncoder_ExpertEncoder_1"];var _emscripten_bind_ExpertEncoder_GetNumberOfEncodedFaces_0=Module["_emscripten_bind_ExpertEncoder_GetNumberOfEncodedFaces_0"]=asm["_emscripten_bind_ExpertEncoder_GetNumberOfEncodedFaces_0"];var _emscripten_bind_ExpertEncoder_GetNumberOfEncodedPoints_0=Module["_emscripten_bind_ExpertEncoder_GetNumberOfEncodedPoints_0"]=asm["_emscripten_bind_ExpertEncoder_GetNumberOfEncodedPoints_0"];var _emscripten_bind_ExpertEncoder_SetAttributeExplicitQuantization_5=Module["_emscripten_bind_ExpertEncoder_SetAttributeExplicitQuantization_5"]=asm["_emscripten_bind_ExpertEncoder_SetAttributeExplicitQuantization_5"];var _emscripten_bind_ExpertEncoder_SetAttributeQuantization_2=Module["_emscripten_bind_ExpertEncoder_SetAttributeQuantization_2"]=asm["_emscripten_bind_ExpertEncoder_SetAttributeQuantization_2"];var _emscripten_bind_ExpertEncoder_SetEncodingMethod_1=Module["_emscripten_bind_ExpertEncoder_SetEncodingMethod_1"]=asm["_emscripten_bind_ExpertEncoder_SetEncodingMethod_1"];var _emscripten_bind_ExpertEncoder_SetSpeedOptions_2=Module["_emscripten_bind_ExpertEncoder_SetSpeedOptions_2"]=asm["_emscripten_bind_ExpertEncoder_SetSpeedOptions_2"];var _emscripten_bind_ExpertEncoder_SetTrackEncodedProperties_1=Module["_emscripten_bind_ExpertEncoder_SetTrackEncodedProperties_1"]=asm["_emscripten_bind_ExpertEncoder_SetTrackEncodedProperties_1"];var _emscripten_bind_ExpertEncoder___destroy___0=Module["_emscripten_bind_ExpertEncoder___destroy___0"]=asm["_emscripten_bind_ExpertEncoder___destroy___0"];var _emscripten_bind_GeometryAttribute_GeometryAttribute_0=Module["_emscripten_bind_GeometryAttribute_GeometryAttribute_0"]=asm["_emscripten_bind_GeometryAttribute_GeometryAttribute_0"];var _emscripten_bind_GeometryAttribute___destroy___0=Module["_emscripten_bind_GeometryAttribute___destroy___0"]=asm["_emscripten_bind_GeometryAttribute___destroy___0"];var _emscripten_bind_MeshBuilder_AddFacesToMesh_3=Module["_emscripten_bind_MeshBuilder_AddFacesToMesh_3"]=asm["_emscripten_bind_MeshBuilder_AddFacesToMesh_3"];var _emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5=Module["_emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5"]=asm["_emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5"];var _emscripten_bind_MeshBuilder_AddFloatAttribute_5=Module["_emscripten_bind_MeshBuilder_AddFloatAttribute_5"]=asm["_emscripten_bind_MeshBuilder_AddFloatAttribute_5"];var _emscripten_bind_MeshBuilder_AddInt16Attribute_5=Module["_emscripten_bind_MeshBuilder_AddInt16Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddInt16Attribute_5"];var _emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5=Module["_emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5"]=asm["_emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5"];var _emscripten_bind_MeshBuilder_AddInt32Attribute_5=Module["_emscripten_bind_MeshBuilder_AddInt32Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddInt32Attribute_5"];var _emscripten_bind_MeshBuilder_AddInt8Attribute_5=Module["_emscripten_bind_MeshBuilder_AddInt8Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddInt8Attribute_5"];var _emscripten_bind_MeshBuilder_AddMetadataToMesh_2=Module["_emscripten_bind_MeshBuilder_AddMetadataToMesh_2"]=asm["_emscripten_bind_MeshBuilder_AddMetadataToMesh_2"];var _emscripten_bind_MeshBuilder_AddMetadata_2=Module["_emscripten_bind_MeshBuilder_AddMetadata_2"]=asm["_emscripten_bind_MeshBuilder_AddMetadata_2"];var _emscripten_bind_MeshBuilder_AddUInt16Attribute_5=Module["_emscripten_bind_MeshBuilder_AddUInt16Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddUInt16Attribute_5"];var _emscripten_bind_MeshBuilder_AddUInt32Attribute_5=Module["_emscripten_bind_MeshBuilder_AddUInt32Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddUInt32Attribute_5"];var _emscripten_bind_MeshBuilder_AddUInt8Attribute_5=Module["_emscripten_bind_MeshBuilder_AddUInt8Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddUInt8Attribute_5"];var _emscripten_bind_MeshBuilder_MeshBuilder_0=Module["_emscripten_bind_MeshBuilder_MeshBuilder_0"]=asm["_emscripten_bind_MeshBuilder_MeshBuilder_0"];var _emscripten_bind_MeshBuilder_SetMetadataForAttribute_3=Module["_emscripten_bind_MeshBuilder_SetMetadataForAttribute_3"]=asm["_emscripten_bind_MeshBuilder_SetMetadataForAttribute_3"];var _emscripten_bind_MeshBuilder___destroy___0=Module["_emscripten_bind_MeshBuilder___destroy___0"]=asm["_emscripten_bind_MeshBuilder___destroy___0"];var _emscripten_bind_Mesh_Mesh_0=Module["_emscripten_bind_Mesh_Mesh_0"]=asm["_emscripten_bind_Mesh_Mesh_0"];var _emscripten_bind_Mesh___destroy___0=Module["_emscripten_bind_Mesh___destroy___0"]=asm["_emscripten_bind_Mesh___destroy___0"];var _emscripten_bind_Mesh_num_attributes_0=Module["_emscripten_bind_Mesh_num_attributes_0"]=asm["_emscripten_bind_Mesh_num_attributes_0"];var _emscripten_bind_Mesh_num_faces_0=Module["_emscripten_bind_Mesh_num_faces_0"]=asm["_emscripten_bind_Mesh_num_faces_0"];var _emscripten_bind_Mesh_num_points_0=Module["_emscripten_bind_Mesh_num_points_0"]=asm["_emscripten_bind_Mesh_num_points_0"];var _emscripten_bind_Mesh_set_num_points_1=Module["_emscripten_bind_Mesh_set_num_points_1"]=asm["_emscripten_bind_Mesh_set_num_points_1"];var _emscripten_bind_MetadataBuilder_AddDoubleEntry_3=Module["_emscripten_bind_MetadataBuilder_AddDoubleEntry_3"]=asm["_emscripten_bind_MetadataBuilder_AddDoubleEntry_3"];var _emscripten_bind_MetadataBuilder_AddIntEntry_3=Module["_emscripten_bind_MetadataBuilder_AddIntEntry_3"]=asm["_emscripten_bind_MetadataBuilder_AddIntEntry_3"];var _emscripten_bind_MetadataBuilder_AddStringEntry_3=Module["_emscripten_bind_MetadataBuilder_AddStringEntry_3"]=asm["_emscripten_bind_MetadataBuilder_AddStringEntry_3"];var _emscripten_bind_MetadataBuilder_MetadataBuilder_0=Module["_emscripten_bind_MetadataBuilder_MetadataBuilder_0"]=asm["_emscripten_bind_MetadataBuilder_MetadataBuilder_0"];var _emscripten_bind_MetadataBuilder___destroy___0=Module["_emscripten_bind_MetadataBuilder___destroy___0"]=asm["_emscripten_bind_MetadataBuilder___destroy___0"];var _emscripten_bind_Metadata_Metadata_0=Module["_emscripten_bind_Metadata_Metadata_0"]=asm["_emscripten_bind_Metadata_Metadata_0"];var _emscripten_bind_Metadata___destroy___0=Module["_emscripten_bind_Metadata___destroy___0"]=asm["_emscripten_bind_Metadata___destroy___0"];var _emscripten_bind_PointAttribute_PointAttribute_0=Module["_emscripten_bind_PointAttribute_PointAttribute_0"]=asm["_emscripten_bind_PointAttribute_PointAttribute_0"];var _emscripten_bind_PointAttribute___destroy___0=Module["_emscripten_bind_PointAttribute___destroy___0"]=asm["_emscripten_bind_PointAttribute___destroy___0"];var _emscripten_bind_PointAttribute_attribute_type_0=Module["_emscripten_bind_PointAttribute_attribute_type_0"]=asm["_emscripten_bind_PointAttribute_attribute_type_0"];var _emscripten_bind_PointAttribute_byte_offset_0=Module["_emscripten_bind_PointAttribute_byte_offset_0"]=asm["_emscripten_bind_PointAttribute_byte_offset_0"];var _emscripten_bind_PointAttribute_byte_stride_0=Module["_emscripten_bind_PointAttribute_byte_stride_0"]=asm["_emscripten_bind_PointAttribute_byte_stride_0"];var _emscripten_bind_PointAttribute_data_type_0=Module["_emscripten_bind_PointAttribute_data_type_0"]=asm["_emscripten_bind_PointAttribute_data_type_0"];var _emscripten_bind_PointAttribute_normalized_0=Module["_emscripten_bind_PointAttribute_normalized_0"]=asm["_emscripten_bind_PointAttribute_normalized_0"];var _emscripten_bind_PointAttribute_num_components_0=Module["_emscripten_bind_PointAttribute_num_components_0"]=asm["_emscripten_bind_PointAttribute_num_components_0"];var _emscripten_bind_PointAttribute_size_0=Module["_emscripten_bind_PointAttribute_size_0"]=asm["_emscripten_bind_PointAttribute_size_0"];var _emscripten_bind_PointAttribute_unique_id_0=Module["_emscripten_bind_PointAttribute_unique_id_0"]=asm["_emscripten_bind_PointAttribute_unique_id_0"];var _emscripten_bind_PointCloudBuilder_AddFloatAttribute_5=Module["_emscripten_bind_PointCloudBuilder_AddFloatAttribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddFloatAttribute_5"];var _emscripten_bind_PointCloudBuilder_AddInt16Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddInt16Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddInt16Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddInt32Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddInt32Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddInt32Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddInt8Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddInt8Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddInt8Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddMetadata_2=Module["_emscripten_bind_PointCloudBuilder_AddMetadata_2"]=asm["_emscripten_bind_PointCloudBuilder_AddMetadata_2"];var _emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5"];var _emscripten_bind_PointCloudBuilder_PointCloudBuilder_0=Module["_emscripten_bind_PointCloudBuilder_PointCloudBuilder_0"]=asm["_emscripten_bind_PointCloudBuilder_PointCloudBuilder_0"];var _emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3=Module["_emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3"]=asm["_emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3"];var _emscripten_bind_PointCloudBuilder___destroy___0=Module["_emscripten_bind_PointCloudBuilder___destroy___0"]=asm["_emscripten_bind_PointCloudBuilder___destroy___0"];var _emscripten_bind_PointCloud_PointCloud_0=Module["_emscripten_bind_PointCloud_PointCloud_0"]=asm["_emscripten_bind_PointCloud_PointCloud_0"];var _emscripten_bind_PointCloud___destroy___0=Module["_emscripten_bind_PointCloud___destroy___0"]=asm["_emscripten_bind_PointCloud___destroy___0"];var _emscripten_bind_PointCloud_num_attributes_0=Module["_emscripten_bind_PointCloud_num_attributes_0"]=asm["_emscripten_bind_PointCloud_num_attributes_0"];var _emscripten_bind_PointCloud_num_points_0=Module["_emscripten_bind_PointCloud_num_points_0"]=asm["_emscripten_bind_PointCloud_num_points_0"];var _emscripten_bind_VoidPtr___destroy___0=Module["_emscripten_bind_VoidPtr___destroy___0"]=asm["_emscripten_bind_VoidPtr___destroy___0"];var _emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=Module["_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE"]=asm["_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE"];var _emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=Module["_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD"]=asm["_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD"];var _emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=Module["_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH"]=asm["_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH"];var _emscripten_enum_draco_GeometryAttribute_Type_COLOR=Module["_emscripten_enum_draco_GeometryAttribute_Type_COLOR"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_COLOR"];var _emscripten_enum_draco_GeometryAttribute_Type_GENERIC=Module["_emscripten_enum_draco_GeometryAttribute_Type_GENERIC"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_GENERIC"];var _emscripten_enum_draco_GeometryAttribute_Type_INVALID=Module["_emscripten_enum_draco_GeometryAttribute_Type_INVALID"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_INVALID"];var _emscripten_enum_draco_GeometryAttribute_Type_NORMAL=Module["_emscripten_enum_draco_GeometryAttribute_Type_NORMAL"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_NORMAL"];var _emscripten_enum_draco_GeometryAttribute_Type_POSITION=Module["_emscripten_enum_draco_GeometryAttribute_Type_POSITION"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_POSITION"];var _emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=Module["_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD"];var _emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING=Module["_emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING"]=asm["_emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING"];var _emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING=Module["_emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING"]=asm["_emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING"];var _emscripten_replace_memory=Module["_emscripten_replace_memory"]=asm["_emscripten_replace_memory"];var _free=Module["_free"]=asm["_free"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _llvm_bswap_i32=Module["_llvm_bswap_i32"]=asm["_llvm_bswap_i32"];var _malloc=Module["_malloc"]=asm["_malloc"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _memmove=Module["_memmove"]=asm["_memmove"];var _memset=Module["_memset"]=asm["_memset"];var _sbrk=Module["_sbrk"]=asm["_sbrk"];var establishStackSpace=Module["establishStackSpace"]=asm["establishStackSpace"];var getTempRet0=Module["getTempRet0"]=asm["getTempRet0"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var setTempRet0=Module["setTempRet0"]=asm["setTempRet0"];var setThrew=Module["setThrew"]=asm["setThrew"];var stackAlloc=Module["stackAlloc"]=asm["stackAlloc"];var stackRestore=Module["stackRestore"]=asm["stackRestore"];var stackSave=Module["stackSave"]=asm["stackSave"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_v=Module["dynCall_v"]=asm["dynCall_v"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];Module["asm"]=asm;if(memoryInitializer){if(!isDataURI(memoryInitializer)){if(typeof Module["locateFile"]==="function"){memoryInitializer=Module["locateFile"](memoryInitializer)}else if(Module["memoryInitializerPrefixURL"]){memoryInitializer=Module["memoryInitializerPrefixURL"]+memoryInitializer}}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,GLOBAL_BASE)}else{addRunDependency("memory initializer");var applyMemoryInitializer=(function(data){if(data.byteLength)data=new Uint8Array(data);HEAPU8.set(data,GLOBAL_BASE);if(Module["memoryInitializerRequest"])delete Module["memoryInitializerRequest"].response;removeRunDependency("memory initializer")});function doBrowserLoad(){Module["readAsync"](memoryInitializer,applyMemoryInitializer,(function(){throw"could not load memory initializer "+memoryInitializer}))}var memoryInitializerBytes=tryParseAsDataURI(memoryInitializer);if(memoryInitializerBytes){applyMemoryInitializer(memoryInitializerBytes.buffer)}else if(Module["memoryInitializerRequest"]){function useRequest(){var request=Module["memoryInitializerRequest"];var response=request.response;if(request.status!==200&&request.status!==0){var data=tryParseAsDataURI(Module["memoryInitializerRequestURL"]);if(data){response=data.buffer}else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+request.status+", retrying "+memoryInitializer);doBrowserLoad();return}}applyMemoryInitializer(response)}if(Module["memoryInitializerRequest"].response){setTimeout(useRequest,0)}else{Module["memoryInitializerRequest"].addEventListener("load",useRequest)}}else{doBrowserLoad()}}}Module["then"]=(function(func){if(Module["calledRun"]){func(Module)}else{var old=Module["onRuntimeInitialized"];Module["onRuntimeInitialized"]=(function(){if(old)old();func(Module)})}return Module});function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};function run(args){args=args||Module["arguments"];if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);doRun()}),1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]&&status===0){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["exit"](status)}Module["quit"](status,new ExitStatus(status))}Module["exit"]=exit;function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;throw"abort("+what+"). Build with -s ASSERTIONS=1 for more info."}Module["abort"]=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}Module["noExitRuntime"]=true;run();function WrapperObject(){}WrapperObject.prototype=Object.create(WrapperObject.prototype);WrapperObject.prototype.constructor=WrapperObject;WrapperObject.prototype.__class__=WrapperObject;WrapperObject.__cache__={};Module["WrapperObject"]=WrapperObject;function getCache(__class__){return(__class__||WrapperObject).__cache__}Module["getCache"]=getCache;function wrapPointer(ptr,__class__){var cache=getCache(__class__);var ret=cache[ptr];if(ret)return ret;ret=Object.create((__class__||WrapperObject).prototype);ret.ptr=ptr;return cache[ptr]=ret}Module["wrapPointer"]=wrapPointer;function castObject(obj,__class__){return wrapPointer(obj.ptr,__class__)}Module["castObject"]=castObject;Module["NULL"]=wrapPointer(0);function destroy(obj){if(!obj["__destroy__"])throw"Error: Cannot destroy object. (Did you create it yourself?)";obj["__destroy__"]();delete getCache(obj.__class__)[obj.ptr]}Module["destroy"]=destroy;function compare(obj1,obj2){return obj1.ptr===obj2.ptr}Module["compare"]=compare;function getPointer(obj){return obj.ptr}Module["getPointer"]=getPointer;function getClass(obj){return obj.__class__}Module["getClass"]=getClass;var ensureCache={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:(function(){if(ensureCache.needed){for(var i=0;i=ensureCache.size){assert(len>0);ensureCache.needed+=len;ret=Module["_malloc"](len);ensureCache.temps.push(ret)}else{ret=ensureCache.buffer+ensureCache.pos;ensureCache.pos+=len}return ret}),copy:(function(array,view,offset){var offsetShifted=offset;var bytes=view.BYTES_PER_ELEMENT;switch(bytes){case 2:offsetShifted>>=1;break;case 4:offsetShifted>>=2;break;case 8:offsetShifted>>=3;break}for(var i=0;i>>0,$jscomp.propertyToPolyfillSymbol[h]=$jscomp.IS_SYMBOL_NATIVE? +$jscomp.global.Symbol(h):$jscomp.POLYFILL_PREFIX+l+"$"+h),$jscomp.defineProperty(p,$jscomp.propertyToPolyfillSymbol[h],{configurable:!0,writable:!0,value:n})))}; +$jscomp.polyfill("Promise",function(k){function n(){this.batch_=null}function l(f){return f instanceof h?f:new h(function(q,v){q(f)})}if(k&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return k;n.prototype.asyncExecute=function(f){if(null==this.batch_){this.batch_=[];var q=this;this.asyncExecuteFunction(function(){q.executeBatch_()})}this.batch_.push(f)}; +var p=$jscomp.global.setTimeout;n.prototype.asyncExecuteFunction=function(f){p(f,0)};n.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var f=this.batch_;this.batch_=[];for(var q=0;q=A}},"es6","es3"); +$jscomp.polyfill("Array.prototype.copyWithin",function(k){function n(l){l=Number(l);return Infinity===l||-Infinity===l?l:l|0}return k?k:function(l,p,h){var A=this.length;l=n(l);p=n(p);h=void 0===h?A:n(h);l=0>l?Math.max(A+l,0):Math.min(l,A);p=0>p?Math.max(A+p,0):Math.min(p,A);h=0>h?Math.max(A+h,0):Math.min(h,A);if(lp;)--h in this?this[--l]=this[h]:delete this[--l];return this}},"es6","es3"); +$jscomp.typedArrayCopyWithin=function(k){return k?k:Array.prototype.copyWithin};$jscomp.polyfill("Int8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"); +$jscomp.polyfill("Uint16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float64Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"); +var DracoDecoderModule=function(){var k="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(k=k||__filename);return function(n){function l(e){return a.locateFile?a.locateFile(e,U):U+e}function p(e,b,c){var d=b+c;for(c=b;e[c]&&!(c>=d);)++c;if(16g?d+=String.fromCharCode(g):(g-=65536,d+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else d+=String.fromCharCode(g)}return d}function h(e,b){return e?p(ea,e,b):""}function A(){var e=ja.buffer;a.HEAP8=Y=new Int8Array(e);a.HEAP16=new Int16Array(e);a.HEAP32=ca=new Int32Array(e);a.HEAPU8=ea=new Uint8Array(e);a.HEAPU16=new Uint16Array(e);a.HEAPU32=V=new Uint32Array(e);a.HEAPF32=new Float32Array(e);a.HEAPF64=new Float64Array(e)}function f(e){if(a.onAbort)a.onAbort(e); +e="Aborted("+e+")";da(e);wa=!0;e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info.");ka(e);throw e;}function q(e){try{if(e==P&&fa)return new Uint8Array(fa);if(ma)return ma(e);throw"both async and sync fetching of the wasm failed";}catch(b){f(b)}}function v(){if(!fa&&(xa||ha)){if("function"==typeof fetch&&!P.startsWith("file://"))return fetch(P,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+P+"'";return e.arrayBuffer()}).catch(function(){return q(P)}); +if(na)return new Promise(function(e,b){na(P,function(c){e(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return q(P)})}function z(e){for(;0>2]=b};this.get_type=function(){return V[this.ptr+4>>2]};this.set_destructor=function(b){V[this.ptr+8>>2]=b};this.get_destructor=function(){return V[this.ptr+8>>2]};this.set_refcount=function(b){ca[this.ptr>>2]=b};this.set_caught=function(b){Y[this.ptr+ +12>>0]=b?1:0};this.get_caught=function(){return 0!=Y[this.ptr+12>>0]};this.set_rethrown=function(b){Y[this.ptr+13>>0]=b?1:0};this.get_rethrown=function(){return 0!=Y[this.ptr+13>>0]};this.init=function(b,c){this.set_adjusted_ptr(0);this.set_type(b);this.set_destructor(c);this.set_refcount(0);this.set_caught(!1);this.set_rethrown(!1)};this.add_ref=function(){ca[this.ptr>>2]+=1};this.release_ref=function(){var b=ca[this.ptr>>2];ca[this.ptr>>2]=b-1;return 1===b};this.set_adjusted_ptr=function(b){V[this.ptr+ +16>>2]=b};this.get_adjusted_ptr=function(){return V[this.ptr+16>>2]};this.get_exception_ptr=function(){if(ya(this.get_type()))return V[this.excPtr>>2];var b=this.get_adjusted_ptr();return 0!==b?b:this.excPtr}}function ba(){function e(){if(!la&&(la=!0,a.calledRun=!0,!wa)){za=!0;z(oa);Aa(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)Ba.unshift(a.postRun.shift());z(Ba)}}if(!(0=d?b++:2047>=d?b+=2:55296<=d&&57343>= +d?(b+=4,++c):b+=3}b=Array(b+1);c=0;d=b.length;if(0=u){var X=e.charCodeAt(++g);u=65536+((u&1023)<<10)|X&1023}if(127>=u){if(c>=d)break;b[c++]=u}else{if(2047>=u){if(c+1>=d)break;b[c++]=192|u>>6}else{if(65535>=u){if(c+2>=d)break;b[c++]=224|u>>12}else{if(c+3>=d)break;b[c++]=240|u>>18;b[c++]=128|u>>12&63}b[c++]=128|u>>6&63}b[c++]=128|u&63}}b[c]=0}e=r.alloc(b,Y);r.copy(b,Y,e);return e}return e}function pa(e){if("object"===typeof e){var b= +r.alloc(e,Y);r.copy(e,Y,b);return b}return e}function Z(){throw"cannot construct a VoidPtr, no constructor in IDL";}function S(){this.ptr=Da();x(S)[this.ptr]=this}function Q(){this.ptr=Ea();x(Q)[this.ptr]=this}function W(){this.ptr=Fa();x(W)[this.ptr]=this}function w(){this.ptr=Ga();x(w)[this.ptr]=this}function C(){this.ptr=Ha();x(C)[this.ptr]=this}function F(){this.ptr=Ia();x(F)[this.ptr]=this}function G(){this.ptr=Ja();x(G)[this.ptr]=this}function E(){this.ptr=Ka();x(E)[this.ptr]=this}function T(){this.ptr= +La();x(T)[this.ptr]=this}function B(){throw"cannot construct a Status, no constructor in IDL";}function H(){this.ptr=Ma();x(H)[this.ptr]=this}function I(){this.ptr=Na();x(I)[this.ptr]=this}function J(){this.ptr=Oa();x(J)[this.ptr]=this}function K(){this.ptr=Pa();x(K)[this.ptr]=this}function L(){this.ptr=Qa();x(L)[this.ptr]=this}function M(){this.ptr=Ra();x(M)[this.ptr]=this}function N(){this.ptr=Sa();x(N)[this.ptr]=this}function y(){this.ptr=Ta();x(y)[this.ptr]=this}function m(){this.ptr=Ua();x(m)[this.ptr]= +this}n=void 0===n?{}:n;var a="undefined"!=typeof n?n:{},Aa,ka;a.ready=new Promise(function(e,b){Aa=e;ka=b});var Va=!1,Wa=!1;a.onRuntimeInitialized=function(){Va=!0;if(Wa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Wa=!0;if(Va&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(e){if("string"!==typeof e)return!1;e=e.split(".");return 2>e.length||3=e[1]?!0:0!=e[0]||10>>=0;if(2147483648=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,e+100663296);var g=Math;d=Math.max(e,d);g=g.min.call(g,2147483648,d+(65536-d%65536)%65536);a:{d=ja.buffer;try{ja.grow(g-d.byteLength+65535>>>16);A();var u=1;break a}catch(X){}u=void 0}if(u)return!0}return!1},f:function(e){return 52},d:function(e,b,c,d,g){return 70},c:function(e,b,c,d){for(var g=0,u=0;u>2],ab=V[b+4>>2];b+=8;for(var sa=0;sa>2]=g;return 0}};(function(){function e(g,u){a.asm=g.exports;ja=a.asm.h;A();oa.unshift(a.asm.i);aa--;a.monitorRunDependencies&&a.monitorRunDependencies(aa);0==aa&&(null!==ra&&(clearInterval(ra),ra=null),ia&&(g=ia,ia=null,g()))}function b(g){e(g.instance)}function c(g){return v().then(function(u){return WebAssembly.instantiate(u,d)}).then(function(u){return u}).then(g,function(u){da("failed to asynchronously prepare wasm: "+u);f(u)})}var d={a:xd};aa++;a.monitorRunDependencies&&a.monitorRunDependencies(aa); +if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(g){da("Module.instantiateWasm callback failed with error: "+g),ka(g)}(function(){return fa||"function"!=typeof WebAssembly.instantiateStreaming||P.startsWith("data:application/octet-stream;base64,")||P.startsWith("file://")||Ya||"function"!=typeof fetch?c(b):fetch(P,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,d).then(b,function(u){da("wasm streaming compile failed: "+u);da("falling back to ArrayBuffer instantiation"); +return c(b)})})})().catch(ka);return{}})();var bb=a._emscripten_bind_VoidPtr___destroy___0=function(){return(bb=a._emscripten_bind_VoidPtr___destroy___0=a.asm.k).apply(null,arguments)},Da=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=function(){return(Da=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=a.asm.l).apply(null,arguments)},cb=a._emscripten_bind_DecoderBuffer_Init_2=function(){return(cb=a._emscripten_bind_DecoderBuffer_Init_2=a.asm.m).apply(null,arguments)},db=a._emscripten_bind_DecoderBuffer___destroy___0= +function(){return(db=a._emscripten_bind_DecoderBuffer___destroy___0=a.asm.n).apply(null,arguments)},Ea=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Ea=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=a.asm.o).apply(null,arguments)},eb=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return(eb=a._emscripten_bind_AttributeTransformData_transform_type_0=a.asm.p).apply(null,arguments)},fb=a._emscripten_bind_AttributeTransformData___destroy___0= +function(){return(fb=a._emscripten_bind_AttributeTransformData___destroy___0=a.asm.q).apply(null,arguments)},Fa=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(Fa=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=a.asm.r).apply(null,arguments)},gb=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return(gb=a._emscripten_bind_GeometryAttribute___destroy___0=a.asm.s).apply(null,arguments)},Ga=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Ga= +a._emscripten_bind_PointAttribute_PointAttribute_0=a.asm.t).apply(null,arguments)},hb=a._emscripten_bind_PointAttribute_size_0=function(){return(hb=a._emscripten_bind_PointAttribute_size_0=a.asm.u).apply(null,arguments)},ib=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=function(){return(ib=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=a.asm.v).apply(null,arguments)},jb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return(jb=a._emscripten_bind_PointAttribute_attribute_type_0= +a.asm.w).apply(null,arguments)},kb=a._emscripten_bind_PointAttribute_data_type_0=function(){return(kb=a._emscripten_bind_PointAttribute_data_type_0=a.asm.x).apply(null,arguments)},lb=a._emscripten_bind_PointAttribute_num_components_0=function(){return(lb=a._emscripten_bind_PointAttribute_num_components_0=a.asm.y).apply(null,arguments)},mb=a._emscripten_bind_PointAttribute_normalized_0=function(){return(mb=a._emscripten_bind_PointAttribute_normalized_0=a.asm.z).apply(null,arguments)},nb=a._emscripten_bind_PointAttribute_byte_stride_0= +function(){return(nb=a._emscripten_bind_PointAttribute_byte_stride_0=a.asm.A).apply(null,arguments)},ob=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return(ob=a._emscripten_bind_PointAttribute_byte_offset_0=a.asm.B).apply(null,arguments)},pb=a._emscripten_bind_PointAttribute_unique_id_0=function(){return(pb=a._emscripten_bind_PointAttribute_unique_id_0=a.asm.C).apply(null,arguments)},qb=a._emscripten_bind_PointAttribute___destroy___0=function(){return(qb=a._emscripten_bind_PointAttribute___destroy___0= +a.asm.D).apply(null,arguments)},Ha=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Ha=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=a.asm.E).apply(null,arguments)},rb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=function(){return(rb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=a.asm.F).apply(null,arguments)},sb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0= +function(){return(sb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=a.asm.G).apply(null,arguments)},tb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(tb=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=a.asm.H).apply(null,arguments)},ub=a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(ub=a._emscripten_bind_AttributeQuantizationTransform_range_0=a.asm.I).apply(null,arguments)},vb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0= +function(){return(vb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=a.asm.J).apply(null,arguments)},Ia=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(Ia=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=a.asm.K).apply(null,arguments)},wb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(wb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=a.asm.L).apply(null, +arguments)},xb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(xb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=a.asm.M).apply(null,arguments)},yb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(yb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=a.asm.N).apply(null,arguments)},Ja=a._emscripten_bind_PointCloud_PointCloud_0=function(){return(Ja=a._emscripten_bind_PointCloud_PointCloud_0=a.asm.O).apply(null, +arguments)},zb=a._emscripten_bind_PointCloud_num_attributes_0=function(){return(zb=a._emscripten_bind_PointCloud_num_attributes_0=a.asm.P).apply(null,arguments)},Ab=a._emscripten_bind_PointCloud_num_points_0=function(){return(Ab=a._emscripten_bind_PointCloud_num_points_0=a.asm.Q).apply(null,arguments)},Bb=a._emscripten_bind_PointCloud___destroy___0=function(){return(Bb=a._emscripten_bind_PointCloud___destroy___0=a.asm.R).apply(null,arguments)},Ka=a._emscripten_bind_Mesh_Mesh_0=function(){return(Ka= +a._emscripten_bind_Mesh_Mesh_0=a.asm.S).apply(null,arguments)},Cb=a._emscripten_bind_Mesh_num_faces_0=function(){return(Cb=a._emscripten_bind_Mesh_num_faces_0=a.asm.T).apply(null,arguments)},Db=a._emscripten_bind_Mesh_num_attributes_0=function(){return(Db=a._emscripten_bind_Mesh_num_attributes_0=a.asm.U).apply(null,arguments)},Eb=a._emscripten_bind_Mesh_num_points_0=function(){return(Eb=a._emscripten_bind_Mesh_num_points_0=a.asm.V).apply(null,arguments)},Fb=a._emscripten_bind_Mesh___destroy___0=function(){return(Fb= +a._emscripten_bind_Mesh___destroy___0=a.asm.W).apply(null,arguments)},La=a._emscripten_bind_Metadata_Metadata_0=function(){return(La=a._emscripten_bind_Metadata_Metadata_0=a.asm.X).apply(null,arguments)},Gb=a._emscripten_bind_Metadata___destroy___0=function(){return(Gb=a._emscripten_bind_Metadata___destroy___0=a.asm.Y).apply(null,arguments)},Hb=a._emscripten_bind_Status_code_0=function(){return(Hb=a._emscripten_bind_Status_code_0=a.asm.Z).apply(null,arguments)},Ib=a._emscripten_bind_Status_ok_0=function(){return(Ib= +a._emscripten_bind_Status_ok_0=a.asm._).apply(null,arguments)},Jb=a._emscripten_bind_Status_error_msg_0=function(){return(Jb=a._emscripten_bind_Status_error_msg_0=a.asm.$).apply(null,arguments)},Kb=a._emscripten_bind_Status___destroy___0=function(){return(Kb=a._emscripten_bind_Status___destroy___0=a.asm.aa).apply(null,arguments)},Ma=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Ma=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=a.asm.ba).apply(null,arguments)}, +Lb=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(Lb=a._emscripten_bind_DracoFloat32Array_GetValue_1=a.asm.ca).apply(null,arguments)},Mb=a._emscripten_bind_DracoFloat32Array_size_0=function(){return(Mb=a._emscripten_bind_DracoFloat32Array_size_0=a.asm.da).apply(null,arguments)},Nb=a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Nb=a._emscripten_bind_DracoFloat32Array___destroy___0=a.asm.ea).apply(null,arguments)},Na=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0= +function(){return(Na=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=a.asm.fa).apply(null,arguments)},Ob=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Ob=a._emscripten_bind_DracoInt8Array_GetValue_1=a.asm.ga).apply(null,arguments)},Pb=a._emscripten_bind_DracoInt8Array_size_0=function(){return(Pb=a._emscripten_bind_DracoInt8Array_size_0=a.asm.ha).apply(null,arguments)},Qb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Qb=a._emscripten_bind_DracoInt8Array___destroy___0= +a.asm.ia).apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Oa=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=a.asm.ja).apply(null,arguments)},Rb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Rb=a._emscripten_bind_DracoUInt8Array_GetValue_1=a.asm.ka).apply(null,arguments)},Sb=a._emscripten_bind_DracoUInt8Array_size_0=function(){return(Sb=a._emscripten_bind_DracoUInt8Array_size_0=a.asm.la).apply(null,arguments)},Tb=a._emscripten_bind_DracoUInt8Array___destroy___0= +function(){return(Tb=a._emscripten_bind_DracoUInt8Array___destroy___0=a.asm.ma).apply(null,arguments)},Pa=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(Pa=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=a.asm.na).apply(null,arguments)},Ub=a._emscripten_bind_DracoInt16Array_GetValue_1=function(){return(Ub=a._emscripten_bind_DracoInt16Array_GetValue_1=a.asm.oa).apply(null,arguments)},Vb=a._emscripten_bind_DracoInt16Array_size_0=function(){return(Vb=a._emscripten_bind_DracoInt16Array_size_0= +a.asm.pa).apply(null,arguments)},Wb=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Wb=a._emscripten_bind_DracoInt16Array___destroy___0=a.asm.qa).apply(null,arguments)},Qa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(Qa=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=a.asm.ra).apply(null,arguments)},Xb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(Xb=a._emscripten_bind_DracoUInt16Array_GetValue_1=a.asm.sa).apply(null,arguments)}, +Yb=a._emscripten_bind_DracoUInt16Array_size_0=function(){return(Yb=a._emscripten_bind_DracoUInt16Array_size_0=a.asm.ta).apply(null,arguments)},Zb=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(Zb=a._emscripten_bind_DracoUInt16Array___destroy___0=a.asm.ua).apply(null,arguments)},Ra=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=function(){return(Ra=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=a.asm.va).apply(null,arguments)},$b=a._emscripten_bind_DracoInt32Array_GetValue_1= +function(){return($b=a._emscripten_bind_DracoInt32Array_GetValue_1=a.asm.wa).apply(null,arguments)},ac=a._emscripten_bind_DracoInt32Array_size_0=function(){return(ac=a._emscripten_bind_DracoInt32Array_size_0=a.asm.xa).apply(null,arguments)},bc=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return(bc=a._emscripten_bind_DracoInt32Array___destroy___0=a.asm.ya).apply(null,arguments)},Sa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(Sa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0= +a.asm.za).apply(null,arguments)},cc=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(cc=a._emscripten_bind_DracoUInt32Array_GetValue_1=a.asm.Aa).apply(null,arguments)},dc=a._emscripten_bind_DracoUInt32Array_size_0=function(){return(dc=a._emscripten_bind_DracoUInt32Array_size_0=a.asm.Ba).apply(null,arguments)},ec=a._emscripten_bind_DracoUInt32Array___destroy___0=function(){return(ec=a._emscripten_bind_DracoUInt32Array___destroy___0=a.asm.Ca).apply(null,arguments)},Ta=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0= +function(){return(Ta=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=a.asm.Da).apply(null,arguments)},fc=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(fc=a._emscripten_bind_MetadataQuerier_HasEntry_2=a.asm.Ea).apply(null,arguments)},gc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(gc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=a.asm.Fa).apply(null,arguments)},hc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(hc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3= +a.asm.Ga).apply(null,arguments)},ic=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(ic=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=a.asm.Ha).apply(null,arguments)},jc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(jc=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=a.asm.Ia).apply(null,arguments)},kc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(kc=a._emscripten_bind_MetadataQuerier_NumEntries_1=a.asm.Ja).apply(null,arguments)}, +lc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(lc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=a.asm.Ka).apply(null,arguments)},mc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return(mc=a._emscripten_bind_MetadataQuerier___destroy___0=a.asm.La).apply(null,arguments)},Ua=a._emscripten_bind_Decoder_Decoder_0=function(){return(Ua=a._emscripten_bind_Decoder_Decoder_0=a.asm.Ma).apply(null,arguments)},nc=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(nc= +a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=a.asm.Na).apply(null,arguments)},oc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(oc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=a.asm.Oa).apply(null,arguments)},pc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return(pc=a._emscripten_bind_Decoder_GetAttributeId_2=a.asm.Pa).apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(qc=a._emscripten_bind_Decoder_GetAttributeIdByName_2= +a.asm.Qa).apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(rc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=a.asm.Ra).apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetAttribute_2=function(){return(sc=a._emscripten_bind_Decoder_GetAttribute_2=a.asm.Sa).apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(tc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=a.asm.Ta).apply(null,arguments)}, +uc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return(uc=a._emscripten_bind_Decoder_GetMetadata_1=a.asm.Ua).apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(vc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=a.asm.Va).apply(null,arguments)},wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=function(){return(wc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=a.asm.Wa).apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2= +function(){return(xc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=a.asm.Xa).apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(yc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=a.asm.Ya).apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(zc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=a.asm.Za).apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(Ac= +a._emscripten_bind_Decoder_GetAttributeFloat_3=a.asm._a).apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(Bc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=a.asm.$a).apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(Cc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=a.asm.ab).apply(null,arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(Dc= +a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=a.asm.bb).apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(Ec=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=a.asm.cb).apply(null,arguments)},Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(Fc=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=a.asm.db).apply(null,arguments)},Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3= +function(){return(Gc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=a.asm.eb).apply(null,arguments)},Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Hc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=a.asm.fb).apply(null,arguments)},Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Ic=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=a.asm.gb).apply(null,arguments)},Jc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5= +function(){return(Jc=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=a.asm.hb).apply(null,arguments)},Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Kc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=a.asm.ib).apply(null,arguments)},Lc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Lc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=a.asm.jb).apply(null,arguments)},Mc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2= +function(){return(Mc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=a.asm.kb).apply(null,arguments)},Nc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Nc=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=a.asm.lb).apply(null,arguments)},Oc=a._emscripten_bind_Decoder___destroy___0=function(){return(Oc=a._emscripten_bind_Decoder___destroy___0=a.asm.mb).apply(null,arguments)},Pc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=function(){return(Pc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM= +a.asm.nb).apply(null,arguments)},Qc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Qc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=a.asm.ob).apply(null,arguments)},Rc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Rc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=a.asm.pb).apply(null,arguments)},Sc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM= +function(){return(Sc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=a.asm.qb).apply(null,arguments)},Tc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Tc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=a.asm.rb).apply(null,arguments)},Uc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(Uc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=a.asm.sb).apply(null,arguments)},Vc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL= +function(){return(Vc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=a.asm.tb).apply(null,arguments)},Wc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Wc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=a.asm.ub).apply(null,arguments)},Xc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Xc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=a.asm.vb).apply(null,arguments)},Yc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC= +function(){return(Yc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=a.asm.wb).apply(null,arguments)},Zc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(Zc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=a.asm.xb).apply(null,arguments)},$c=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return($c=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=a.asm.yb).apply(null,arguments)},ad=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH= +function(){return(ad=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=a.asm.zb).apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return(bd=a._emscripten_enum_draco_DataType_DT_INVALID=a.asm.Ab).apply(null,arguments)},cd=a._emscripten_enum_draco_DataType_DT_INT8=function(){return(cd=a._emscripten_enum_draco_DataType_DT_INT8=a.asm.Bb).apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_UINT8=function(){return(dd=a._emscripten_enum_draco_DataType_DT_UINT8= +a.asm.Cb).apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_INT16=function(){return(ed=a._emscripten_enum_draco_DataType_DT_INT16=a.asm.Db).apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return(fd=a._emscripten_enum_draco_DataType_DT_UINT16=a.asm.Eb).apply(null,arguments)},gd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return(gd=a._emscripten_enum_draco_DataType_DT_INT32=a.asm.Fb).apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_UINT32= +function(){return(hd=a._emscripten_enum_draco_DataType_DT_UINT32=a.asm.Gb).apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_INT64=function(){return(id=a._emscripten_enum_draco_DataType_DT_INT64=a.asm.Hb).apply(null,arguments)},jd=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return(jd=a._emscripten_enum_draco_DataType_DT_UINT64=a.asm.Ib).apply(null,arguments)},kd=a._emscripten_enum_draco_DataType_DT_FLOAT32=function(){return(kd=a._emscripten_enum_draco_DataType_DT_FLOAT32=a.asm.Jb).apply(null, +arguments)},ld=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(ld=a._emscripten_enum_draco_DataType_DT_FLOAT64=a.asm.Kb).apply(null,arguments)},md=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return(md=a._emscripten_enum_draco_DataType_DT_BOOL=a.asm.Lb).apply(null,arguments)},nd=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(nd=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=a.asm.Mb).apply(null,arguments)},od=a._emscripten_enum_draco_StatusCode_OK=function(){return(od= +a._emscripten_enum_draco_StatusCode_OK=a.asm.Nb).apply(null,arguments)},pd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(pd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=a.asm.Ob).apply(null,arguments)},qd=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(qd=a._emscripten_enum_draco_StatusCode_IO_ERROR=a.asm.Pb).apply(null,arguments)},rd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=function(){return(rd=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER= +a.asm.Qb).apply(null,arguments)},sd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(sd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=a.asm.Rb).apply(null,arguments)},td=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(td=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=a.asm.Sb).apply(null,arguments)};a._malloc=function(){return(a._malloc=a.asm.Tb).apply(null,arguments)};a._free=function(){return(a._free=a.asm.Ub).apply(null,arguments)}; +var ya=function(){return(ya=a.asm.Vb).apply(null,arguments)};a.___start_em_js=15856;a.___stop_em_js=15954;var la;ia=function b(){la||ba();la||(ia=b)};if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0=r.size?(0>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var g=0;gb.byteLength)return a.INVALID_GEOMETRY_TYPE;switch(b[7]){case 0:return a.POINT_CLOUD;case 1:return a.TRIANGULAR_MESH;default:return a.INVALID_GEOMETRY_TYPE}};return n.ready}}(); +"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule); diff --git a/node_modules/three/examples/jsm/libs/draco/gltf/draco_decoder.js b/node_modules/three/examples/jsm/libs/draco/gltf/draco_decoder.js new file mode 100644 index 0000000..7c84b0b --- /dev/null +++ b/node_modules/three/examples/jsm/libs/draco/gltf/draco_decoder.js @@ -0,0 +1,33 @@ + +var DracoDecoderModule = (() => { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; + return ( +function(DracoDecoderModule = {}) { + +var Module=typeof DracoDecoderModule!="undefined"?DracoDecoderModule:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var isRuntimeInitialized=false;var isModuleParsed=false;Module["onRuntimeInitialized"]=function(){isRuntimeInitialized=true;if(isModuleParsed){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}};Module["onModuleParsed"]=function(){isModuleParsed=true;if(isRuntimeInitialized){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}};function isVersionSupported(versionString){if(typeof versionString!=="string")return false;const version=versionString.split(".");if(version.length<2||version.length>3)return false;if(version[0]==1&&version[1]>=0&&version[1]<=5)return true;if(version[0]!=0||version[1]>10)return false;return true}Module["isVersionSupported"]=isVersionSupported;var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;function logExceptionOnExit(e){if(e instanceof ExitStatus)return;let toLog=e;err("exiting due to exception: "+toLog)}if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=(filename,binary)=>{var ret=tryParseAsDataURI(filename);if(ret){return binary?ret:ret.toString()}filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror)=>{var ret=tryParseAsDataURI(filename);if(ret){onload(ret)}filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);quit_=(status,toThrow)=>{if(keepRuntimeAlive()){process["exitCode"]=status;throw toThrow}logExceptionOnExit(toThrow);process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;var WebAssembly={Memory:function(opts){this.buffer=new ArrayBuffer(opts["initial"]*65536)},Module:function(binary){},Instance:function(module,info){this.exports=( +// EMSCRIPTEN_START_ASM +function instantiate(ia){function c(d){d.set=function(a,b){this[a]=b};d.get=function(a){return this[a]};return d}var e;var f=new Uint8Array(123);for(var a=25;a>=0;--a){f[48+a]=52+a;f[65+a]=a;f[97+a]=26+a}f[43]=62;f[47]=63;function l(m,n,o){var g,h,a=0,i=n,j=o.length,k=n+(j*3>>2)-(o[j-2]=="=")-(o[j-1]=="=");for(;a>4;if(i>2;if(i>2];o=F[c+12>>2];g=F[c+16>>2];a:{if((e|0)>=(o|0)&g>>>0>=I[c+8>>2]|(e|0)>(o|0)){break a}o=G[g+F[c>>2]|0];g=g+1|0;e=g?e:e+1|0;F[c+16>>2]=g;F[c+20>>2]=e;b:{switch(o|0){case 0:e=a;f=b;g=d;a=0;d=0;j=Z+-64|0;Z=j;F[j+56>>2]=0;F[j+48>>2]=0;F[j+52>>2]=0;F[j+40>>2]=0;F[j+44>>2]=0;F[j+32>>2]=0;F[j+36>>2]=0;F[j+24>>2]=0;F[j+28>>2]=0;F[j+16>>2]=0;F[j+20>>2]=0;F[j+8>>2]=0;F[j+12>>2]=0;c:{if(!Nd(j+8|0,c)){break c}if(!Md(j+8|0,c)|(F[j+20>>2]?0:e)){break c}hc(c,0,0);if(e){s=f<<2;t=F[j+36>>2];u=F[j+48>>2];x=F[j+24>>2];l=F[j+56>>2];i=F[j+52>>2];while(1){d:{if(l>>>0>16383){break d}while(1){if((i|0)<=0){break d}i=i-1|0;F[j+52>>2]=i;l=G[i+u|0]|l<<8;F[j+56>>2]=l;if(l>>>0<16384){continue}break}}a=l&4095;r=F[(a<<2)+x>>2];b=(r<<3)+t|0;l=(L(F[b>>2],l>>>12|0)+a|0)-F[b+4>>2]|0;F[j+56>>2]=l;if((f|0)>0){a=0;if(!G[c+36|0]|r>>>0>32){break c}o=d+f|0;e:{if(!r){ma(g+(d<<2)|0,0,s);break e}y=r&-2;z=r&1;b=F[c+32>>2];h=F[c+28>>2];q=F[c+24>>2];while(1){k=0;a=b;m=0;n=0;if((r|0)!=1){while(1){p=q+(a>>>3|0)|0;f:{if(p>>>0>=h>>>0){p=0;break f}p=G[p|0];b=a+1|0;F[c+32>>2]=b;p=p>>>(a&7)&1;a=b}p=p<>>3|0)|0;if(v>>>0>>0){m=G[v|0];b=a+1|0;F[c+32>>2]=b;m=m>>>(a&7)&1;a=b}v=k|1;k=k+2|0;m=p|m<>>3|0)|0;if(p>>>0>>0){p=G[p|0];b=a+1|0;F[c+32>>2]=b;a=p>>>(a&7)&1}else{a=0}m=a<>2]=m;d=d+1|0;if((o|0)!=(d|0)){continue}break}}d=o}w=f+w|0;if(e>>>0>w>>>0){continue}break}}D[c+36|0]=0;f=F[c+20>>2];a=0;m=F[c+32>>2]+7|0;a=m>>>0<7?1:a;m=a<<29|m>>>3;b=m+F[c+16>>2]|0;a=(a>>>3|0)+f|0;F[c+16>>2]=b;F[c+20>>2]=b>>>0>>0?a+1|0:a;a=1}b=F[j+36>>2];if(b){F[j+40>>2]=b;ja(b)}b=F[j+24>>2];if(b){F[j+28>>2]=b;ja(b)}b=F[j+8>>2];if(b){F[j+12>>2]=b;ja(b)}Z=j- -64|0;return a;case 1:break b;default:break a}}b=0;e=F[c+20>>2];o=F[c+12>>2];g=F[c+16>>2];g:{if((e|0)>=(o|0)&g>>>0>=I[c+8>>2]|(e|0)>(o|0)){break g}o=G[g+F[c>>2]|0];g=g+1|0;e=g?e:e+1|0;F[c+16>>2]=g;F[c+20>>2]=e;h:{switch(o-1|0){case 8:o=a;r=d;e=Z+-64|0;Z=e;F[e+56>>2]=0;F[e+48>>2]=0;F[e+52>>2]=0;F[e+40>>2]=0;F[e+44>>2]=0;F[e+32>>2]=0;F[e+36>>2]=0;F[e+24>>2]=0;F[e+28>>2]=0;F[e+16>>2]=0;F[e+20>>2]=0;F[e+8>>2]=0;F[e+12>>2]=0;h=e+8|0;i:{j:{if(!H[c+38>>1]){break j}if(!Ta(1,h+12|0,c)){break j}b=F[c+8>>2];d=F[c+16>>2];f=b-d|0;i=F[h+12>>2];b=F[c+12>>2]-(F[c+20>>2]+(b>>>0>>0)|0)|0;if(f>>>0>>6>>>0&(b|0)<=0|(b|0)<0){break j}b=F[h>>2];a=F[h+4>>2]-b>>2;k:{if(a>>>0>>0){qa(h,i-a|0);i=F[h+12>>2];break k}if(a>>>0<=i>>>0){break k}F[h+4>>2]=b+(i<<2)}g=1;if(!i){break i}f=F[c+16>>2];d=F[c+20>>2];s=F[h>>2];j=F[c+8>>2];n=F[c+12>>2];b=0;while(1){g=0;if((d|0)>=(n|0)&f>>>0>=j>>>0|(d|0)>(n|0)){break i}g=F[c>>2];p=G[g+f|0];a=d;f=f+1|0;a=f?a:a+1|0;F[c+16>>2]=f;d=a;F[c+20>>2]=a;a=p>>>2|0;l=0;l:{m:{n:{o:{t=p&3;switch(t|0){case 0:break m;case 3:break o;default:break n}}a=a+b|0;g=0;if(a>>>0>=i>>>0){break i}ma(s+(b<<2)|0,0,(p&252)+4|0);b=a;break l}while(1){if((f|0)==(j|0)&(d|0)==(n|0)){break j}i=G[f+g|0];f=f+1|0;d=f?d:d+1|0;F[c+16>>2]=f;F[c+20>>2]=d;a=i<<(l<<3|6)|a;l=l+1|0;if((t|0)!=(l|0)){continue}break}}F[s+(b<<2)>>2]=a}b=b+1|0;i=F[h+12>>2];if(b>>>0>>0){continue}break}a=h+16|0;n=F[h>>2];d=F[h+16>>2];b=F[h+20>>2]-d|0;p:{if(b>>>0<=32767){qa(a,8192-(b>>>2|0)|0);break p}if((b|0)==32768){break p}F[h+20>>2]=d+32768}d=h+28|0;b=F[d>>2];f=F[h+32>>2]-b>>3;q:{if(f>>>0>>0){_a(d,i-f|0);b=F[d>>2];break q}if(f>>>0>i>>>0){F[h+32>>2]=(i<<3)+b}if(!i){break j}}j=F[a>>2];f=0;d=0;while(1){g=n+(f<<2)|0;l=F[g>>2];h=(f<<3)+b|0;a=d;F[h+4>>2]=a;F[h>>2]=l;g=F[g>>2];d=g+a|0;if(d>>>0>8192){break j}r:{if(a>>>0>=d>>>0){break r}l=0;h=g&7;if(h){while(1){F[j+(a<<2)>>2]=f;a=a+1|0;l=l+1|0;if((h|0)!=(l|0)){continue}break}}if(g-1>>>0<=6){break r}while(1){g=j+(a<<2)|0;F[g>>2]=f;F[g+28>>2]=f;F[g+24>>2]=f;F[g+20>>2]=f;F[g+16>>2]=f;F[g+12>>2]=f;F[g+8>>2]=f;F[g+4>>2]=f;a=a+8|0;if((d|0)!=(a|0)){continue}break}}f=f+1|0;if((i|0)!=(f|0)){continue}break}k=(d|0)==8192}g=k}s:{if(!g|(F[e+20>>2]?0:o)){break s}d=0;k=Z-16|0;Z=k;t:{if(!Sa(1,k+8|0,c)){break t}a=F[c+8>>2];f=F[c+16>>2];g=a-f|0;j=F[k+12>>2];i=F[c+20>>2];a=F[c+12>>2]-(i+(a>>>0>>0)|0)|0;b=F[k+8>>2];if((j|0)==(a|0)&g>>>0>>0|a>>>0>>0){break t}a=i+j|0;g=b+f|0;a=g>>>0>>0?a+1|0:a;F[c+16>>2]=g;F[c+20>>2]=a;if((b|0)<=0){break t}a=f+F[c>>2]|0;F[e+48>>2]=a;c=b-1|0;f=c+a|0;g=G[f|0];u:{if(g>>>0<=63){F[e+52>>2]=c;a=G[f|0]&63;break u}v:{switch((g>>>6|0)-1|0){case 0:if(b>>>0<2){break t}b=b-2|0;F[e+52>>2]=b;a=a+b|0;a=G[a+1|0]<<8&16128|G[a|0];break u;case 1:if(b>>>0<3){break t}b=b-3|0;F[e+52>>2]=b;a=a+b|0;a=G[a+1|0]<<8|G[a+2|0]<<16&4128768|G[a|0];break u;default:break v}}b=b-4|0;F[e+52>>2]=b;a=a+b|0;a=(G[a|0]|G[a+1|0]<<8|(G[a+2|0]<<16|G[a+3|0]<<24))&1073741823}F[e+56>>2]=a+32768;d=a>>>0<8355840}Z=k+16|0;if(!d){break s}if(!o){m=1;break s}b=F[e+52>>2];a=F[e+56>>2];c=F[e+36>>2];d=F[e+48>>2];f=F[e+24>>2];while(1){w:{if(a>>>0>32767){break w}while(1){if((b|0)<=0){break w}b=b-1|0;F[e+52>>2]=b;a=G[b+d|0]|a<<8;F[e+56>>2]=a;if(a>>>0<32768){continue}break}}m=a&8191;k=F[f+(m<<2)>>2];g=c+(k<<3)|0;a=(L(F[g>>2],a>>>13|0)+m|0)-F[g+4>>2]|0;F[e+56>>2]=a;F[r+(q<<2)>>2]=k;m=1;q=q+1|0;if((o|0)!=(q|0)){continue}break}}a=F[e+36>>2];if(a){F[e+40>>2]=a;ja(a)}a=F[e+24>>2];if(a){F[e+28>>2]=a;ja(a)}a=F[e+8>>2];if(a){F[e+12>>2]=a;ja(a)}Z=e- -64|0;b=m;break g;case 9:o=a;r=d;g=Z+-64|0;Z=g;F[g+56>>2]=0;F[g+48>>2]=0;F[g+52>>2]=0;F[g+40>>2]=0;F[g+44>>2]=0;F[g+32>>2]=0;F[g+36>>2]=0;F[g+24>>2]=0;F[g+28>>2]=0;F[g+16>>2]=0;F[g+20>>2]=0;F[g+8>>2]=0;F[g+12>>2]=0;h=g+8|0;x:{y:{if(!H[c+38>>1]){break y}if(!Ta(1,h+12|0,c)){break y}b=F[c+8>>2];d=F[c+16>>2];f=b-d|0;i=F[h+12>>2];b=F[c+12>>2]-(F[c+20>>2]+(b>>>0>>0)|0)|0;if(f>>>0>>6>>>0&(b|0)<=0|(b|0)<0){break y}b=F[h>>2];a=F[h+4>>2]-b>>2;z:{if(a>>>0>>0){qa(h,i-a|0);i=F[h+12>>2];break z}if(a>>>0<=i>>>0){break z}F[h+4>>2]=b+(i<<2)}e=1;if(!i){break x}f=F[c+16>>2];d=F[c+20>>2];s=F[h>>2];j=F[c+8>>2];n=F[c+12>>2];b=0;while(1){e=0;if((d|0)>=(n|0)&f>>>0>=j>>>0|(d|0)>(n|0)){break x}t=F[c>>2];p=G[t+f|0];e=d;f=f+1|0;e=f?e:e+1|0;F[c+16>>2]=f;d=e;F[c+20>>2]=e;a=p>>>2|0;l=0;A:{B:{C:{D:{e=p&3;switch(e|0){case 0:break B;case 3:break D;default:break C}}a=a+b|0;e=0;if(a>>>0>=i>>>0){break x}ma(s+(b<<2)|0,0,(p&252)+4|0);b=a;break A}while(1){if((f|0)==(j|0)&(d|0)==(n|0)){break y}i=G[f+t|0];f=f+1|0;d=f?d:d+1|0;F[c+16>>2]=f;F[c+20>>2]=d;a=i<<(l<<3|6)|a;l=l+1|0;if((e|0)!=(l|0)){continue}break}}F[s+(b<<2)>>2]=a}b=b+1|0;i=F[h+12>>2];if(b>>>0>>0){continue}break}a=h+16|0;n=F[h>>2];d=F[h+16>>2];b=F[h+20>>2]-d|0;E:{if(b>>>0<=131071){qa(a,32768-(b>>>2|0)|0);break E}if((b|0)==131072){break E}F[h+20>>2]=d+131072}d=h+28|0;b=F[d>>2];f=F[h+32>>2]-b>>3;F:{if(f>>>0>>0){_a(d,i-f|0);b=F[d>>2];break F}if(f>>>0>i>>>0){F[h+32>>2]=(i<<3)+b}if(!i){break y}}j=F[a>>2];f=0;d=0;while(1){e=n+(f<<2)|0;l=F[e>>2];h=(f<<3)+b|0;a=d;F[h+4>>2]=a;F[h>>2]=l;e=F[e>>2];d=e+a|0;if(d>>>0>32768){break y}G:{if(a>>>0>=d>>>0){break G}l=0;h=e&7;if(h){while(1){F[j+(a<<2)>>2]=f;a=a+1|0;l=l+1|0;if((h|0)!=(l|0)){continue}break}}if(e-1>>>0<=6){break G}while(1){e=j+(a<<2)|0;F[e>>2]=f;F[e+28>>2]=f;F[e+24>>2]=f;F[e+20>>2]=f;F[e+16>>2]=f;F[e+12>>2]=f;F[e+8>>2]=f;F[e+4>>2]=f;a=a+8|0;if((d|0)!=(a|0)){continue}break}}f=f+1|0;if((i|0)!=(f|0)){continue}break}k=(d|0)==32768}e=k}H:{if(!e|(F[g+20>>2]?0:o)){break H}d=0;f=Z-16|0;Z=f;I:{if(!Sa(1,f+8|0,c)){break I}e=F[c+8>>2];b=F[c+16>>2];k=e-b|0;j=F[f+12>>2];i=F[c+20>>2];e=F[c+12>>2]-(i+(b>>>0>e>>>0)|0)|0;a=F[f+8>>2];if((j|0)==(e|0)&k>>>0>>0|e>>>0>>0){break I}e=i+j|0;k=a+b|0;e=k>>>0>>0?e+1|0:e;F[c+16>>2]=k;F[c+20>>2]=e;if((a|0)<=0){break I}b=b+F[c>>2]|0;F[g+48>>2]=b;c=a-1|0;e=c+b|0;k=G[e|0];J:{if(k>>>0<=63){F[g+52>>2]=c;a=G[e|0]&63;break J}K:{switch((k>>>6|0)-1|0){case 0:if(a>>>0<2){break I}a=a-2|0;F[g+52>>2]=a;a=a+b|0;a=G[a+1|0]<<8&16128|G[a|0];break J;case 1:if(a>>>0<3){break I}a=a-3|0;F[g+52>>2]=a;a=a+b|0;a=G[a+1|0]<<8|G[a+2|0]<<16&4128768|G[a|0];break J;default:break K}}a=a-4|0;F[g+52>>2]=a;a=a+b|0;a=(G[a|0]|G[a+1|0]<<8|(G[a+2|0]<<16|G[a+3|0]<<24))&1073741823}F[g+56>>2]=a+131072;d=a>>>0<33423360}Z=f+16|0;if(!d){break H}if(!o){m=1;break H}b=F[g+52>>2];a=F[g+56>>2];c=F[g+36>>2];d=F[g+48>>2];f=F[g+24>>2];while(1){L:{if(a>>>0>131071){break L}while(1){if((b|0)<=0){break L}b=b-1|0;F[g+52>>2]=b;a=G[b+d|0]|a<<8;F[g+56>>2]=a;if(a>>>0<131072){continue}break}}m=a&32767;e=F[f+(m<<2)>>2];k=c+(e<<3)|0;a=(L(F[k>>2],a>>>15|0)+m|0)-F[k+4>>2]|0;F[g+56>>2]=a;F[r+(q<<2)>>2]=e;m=1;q=q+1|0;if((o|0)!=(q|0)){continue}break}}a=F[g+36>>2];if(a){F[g+40>>2]=a;ja(a)}a=F[g+24>>2];if(a){F[g+28>>2]=a;ja(a)}a=F[g+8>>2];if(a){F[g+12>>2]=a;ja(a)}Z=g- -64|0;b=m;break g;case 10:o=a;r=d;g=Z+-64|0;Z=g;F[g+56>>2]=0;F[g+48>>2]=0;F[g+52>>2]=0;F[g+40>>2]=0;F[g+44>>2]=0;F[g+32>>2]=0;F[g+36>>2]=0;F[g+24>>2]=0;F[g+28>>2]=0;F[g+16>>2]=0;F[g+20>>2]=0;F[g+8>>2]=0;F[g+12>>2]=0;h=g+8|0;M:{N:{if(!H[c+38>>1]){break N}if(!Ta(1,h+12|0,c)){break N}b=F[c+8>>2];d=F[c+16>>2];f=b-d|0;i=F[h+12>>2];b=F[c+12>>2]-(F[c+20>>2]+(b>>>0>>0)|0)|0;if(f>>>0>>6>>>0&(b|0)<=0|(b|0)<0){break N}b=F[h>>2];a=F[h+4>>2]-b>>2;O:{if(a>>>0>>0){qa(h,i-a|0);i=F[h+12>>2];break O}if(a>>>0<=i>>>0){break O}F[h+4>>2]=b+(i<<2)}e=1;if(!i){break M}f=F[c+16>>2];d=F[c+20>>2];s=F[h>>2];j=F[c+8>>2];n=F[c+12>>2];b=0;while(1){e=0;if((d|0)>=(n|0)&f>>>0>=j>>>0|(d|0)>(n|0)){break M}t=F[c>>2];p=G[t+f|0];a=d;f=f+1|0;a=f?a:a+1|0;F[c+16>>2]=f;d=a;F[c+20>>2]=a;a=p>>>2|0;l=0;P:{Q:{R:{S:{u=p&3;switch(u|0){case 0:break Q;case 3:break S;default:break R}}a=a+b|0;e=0;if(a>>>0>=i>>>0){break M}ma(s+(b<<2)|0,0,(p&252)+4|0);b=a;break P}while(1){if((f|0)==(j|0)&(d|0)==(n|0)){break N}i=G[f+t|0];e=d;f=f+1|0;e=f?e:e+1|0;F[c+16>>2]=f;d=e;F[c+20>>2]=e;a=i<<(l<<3|6)|a;l=l+1|0;if((u|0)!=(l|0)){continue}break}}F[s+(b<<2)>>2]=a}b=b+1|0;i=F[h+12>>2];if(b>>>0>>0){continue}break}a=h+16|0;n=F[h>>2];d=F[h+16>>2];b=F[h+20>>2]-d|0;T:{if(b>>>0<=262143){qa(a,65536-(b>>>2|0)|0);break T}if((b|0)==262144){break T}F[h+20>>2]=d+262144}d=h+28|0;b=F[d>>2];f=F[h+32>>2]-b>>3;U:{if(f>>>0>>0){_a(d,i-f|0);b=F[d>>2];break U}if(f>>>0>i>>>0){F[h+32>>2]=(i<<3)+b}if(!i){break N}}j=F[a>>2];f=0;d=0;while(1){e=n+(f<<2)|0;l=F[e>>2];h=(f<<3)+b|0;a=d;F[h+4>>2]=a;F[h>>2]=l;e=F[e>>2];d=e+a|0;if(d>>>0>65536){break N}V:{if(a>>>0>=d>>>0){break V}l=0;h=e&7;if(h){while(1){F[j+(a<<2)>>2]=f;a=a+1|0;l=l+1|0;if((h|0)!=(l|0)){continue}break}}if(e-1>>>0<=6){break V}while(1){e=j+(a<<2)|0;F[e>>2]=f;F[e+28>>2]=f;F[e+24>>2]=f;F[e+20>>2]=f;F[e+16>>2]=f;F[e+12>>2]=f;F[e+8>>2]=f;F[e+4>>2]=f;a=a+8|0;if((d|0)!=(a|0)){continue}break}}f=f+1|0;if((i|0)!=(f|0)){continue}break}k=(d|0)==65536}e=k}W:{if(!e|(F[g+20>>2]?0:o)){break W}d=0;e=Z-16|0;Z=e;X:{if(!Sa(1,e+8|0,c)){break X}a=F[c+8>>2];f=F[c+16>>2];k=a-f|0;j=F[e+12>>2];i=F[c+20>>2];a=F[c+12>>2]-(i+(a>>>0>>0)|0)|0;b=F[e+8>>2];if((j|0)==(a|0)&k>>>0>>0|a>>>0>>0){break X}a=i+j|0;k=b+f|0;a=k>>>0>>0?a+1|0:a;F[c+16>>2]=k;F[c+20>>2]=a;if((b|0)<=0){break X}a=f+F[c>>2]|0;F[g+48>>2]=a;c=b-1|0;f=c+a|0;k=G[f|0];Y:{if(k>>>0<=63){F[g+52>>2]=c;a=G[f|0]&63;break Y}Z:{switch((k>>>6|0)-1|0){case 0:if(b>>>0<2){break X}b=b-2|0;F[g+52>>2]=b;a=a+b|0;a=G[a+1|0]<<8&16128|G[a|0];break Y;case 1:if(b>>>0<3){break X}b=b-3|0;F[g+52>>2]=b;a=a+b|0;a=G[a+1|0]<<8|G[a+2|0]<<16&4128768|G[a|0];break Y;default:break Z}}b=b-4|0;F[g+52>>2]=b;a=a+b|0;a=(G[a|0]|G[a+1|0]<<8|(G[a+2|0]<<16|G[a+3|0]<<24))&1073741823}F[g+56>>2]=a+262144;d=a>>>0<66846720}Z=e+16|0;if(!d){break W}if(!o){m=1;break W}b=F[g+52>>2];a=F[g+56>>2];c=F[g+36>>2];d=F[g+48>>2];f=F[g+24>>2];while(1){_:{if(a>>>0>262143){break _}while(1){if((b|0)<=0){break _}b=b-1|0;F[g+52>>2]=b;a=G[b+d|0]|a<<8;F[g+56>>2]=a;if(a>>>0<262144){continue}break}}m=a&65535;e=F[f+(m<<2)>>2];k=c+(e<<3)|0;a=(L(F[k>>2],a>>>16|0)+m|0)-F[k+4>>2]|0;F[g+56>>2]=a;F[r+(q<<2)>>2]=e;m=1;q=q+1|0;if((o|0)!=(q|0)){continue}break}}a=F[g+36>>2];if(a){F[g+40>>2]=a;ja(a)}a=F[g+24>>2];if(a){F[g+28>>2]=a;ja(a)}a=F[g+8>>2];if(a){F[g+12>>2]=a;ja(a)}Z=g- -64|0;b=m;break g;case 11:o=a;r=d;g=Z+-64|0;Z=g;F[g+56>>2]=0;F[g+48>>2]=0;F[g+52>>2]=0;F[g+40>>2]=0;F[g+44>>2]=0;F[g+32>>2]=0;F[g+36>>2]=0;F[g+24>>2]=0;F[g+28>>2]=0;F[g+16>>2]=0;F[g+20>>2]=0;F[g+8>>2]=0;F[g+12>>2]=0;h=g+8|0;$:{aa:{if(!H[c+38>>1]){break aa}if(!Ta(1,h+12|0,c)){break aa}b=F[c+8>>2];d=F[c+16>>2];f=b-d|0;i=F[h+12>>2];b=F[c+12>>2]-(F[c+20>>2]+(b>>>0>>0)|0)|0;if(f>>>0>>6>>>0&(b|0)<=0|(b|0)<0){break aa}b=F[h>>2];a=F[h+4>>2]-b>>2;ba:{if(a>>>0>>0){qa(h,i-a|0);i=F[h+12>>2];break ba}if(a>>>0<=i>>>0){break ba}F[h+4>>2]=b+(i<<2)}e=1;if(!i){break $}f=F[c+16>>2];d=F[c+20>>2];s=F[h>>2];j=F[c+8>>2];n=F[c+12>>2];b=0;while(1){e=0;if((d|0)>=(n|0)&f>>>0>=j>>>0|(d|0)>(n|0)){break $}t=F[c>>2];p=G[t+f|0];e=d;f=f+1|0;e=f?e:e+1|0;F[c+16>>2]=f;d=e;F[c+20>>2]=e;a=p>>>2|0;l=0;ca:{da:{ea:{fa:{e=p&3;switch(e|0){case 0:break da;case 3:break fa;default:break ea}}a=a+b|0;e=0;if(a>>>0>=i>>>0){break $}ma(s+(b<<2)|0,0,(p&252)+4|0);b=a;break ca}while(1){if((f|0)==(j|0)&(d|0)==(n|0)){break aa}i=G[f+t|0];f=f+1|0;d=f?d:d+1|0;F[c+16>>2]=f;F[c+20>>2]=d;a=i<<(l<<3|6)|a;l=l+1|0;if((e|0)!=(l|0)){continue}break}}F[s+(b<<2)>>2]=a}b=b+1|0;i=F[h+12>>2];if(b>>>0>>0){continue}break}a=h+16|0;n=F[h>>2];d=F[h+16>>2];b=F[h+20>>2]-d|0;ga:{if(b>>>0<=1048575){qa(a,262144-(b>>>2|0)|0);break ga}if((b|0)==1048576){break ga}F[h+20>>2]=d- -1048576}d=h+28|0;b=F[d>>2];f=F[h+32>>2]-b>>3;ha:{if(f>>>0>>0){_a(d,i-f|0);b=F[d>>2];break ha}if(f>>>0>i>>>0){F[h+32>>2]=(i<<3)+b}if(!i){break aa}}j=F[a>>2];f=0;d=0;while(1){e=n+(f<<2)|0;l=F[e>>2];h=(f<<3)+b|0;a=d;F[h+4>>2]=a;F[h>>2]=l;e=F[e>>2];d=e+a|0;if(d>>>0>262144){break aa}ia:{if(a>>>0>=d>>>0){break ia}l=0;h=e&7;if(h){while(1){F[j+(a<<2)>>2]=f;a=a+1|0;l=l+1|0;if((h|0)!=(l|0)){continue}break}}if(e-1>>>0<=6){break ia}while(1){e=j+(a<<2)|0;F[e>>2]=f;F[e+28>>2]=f;F[e+24>>2]=f;F[e+20>>2]=f;F[e+16>>2]=f;F[e+12>>2]=f;F[e+8>>2]=f;F[e+4>>2]=f;a=a+8|0;if((d|0)!=(a|0)){continue}break}}f=f+1|0;if((i|0)!=(f|0)){continue}break}k=(d|0)==262144}e=k}ja:{if(!e|(F[g+20>>2]?0:o)){break ja}d=0;f=Z-16|0;Z=f;ka:{if(!Sa(1,f+8|0,c)){break ka}e=F[c+8>>2];b=F[c+16>>2];k=e-b|0;j=F[f+12>>2];i=F[c+20>>2];e=F[c+12>>2]-(i+(b>>>0>e>>>0)|0)|0;a=F[f+8>>2];if((j|0)==(e|0)&k>>>0>>0|e>>>0>>0){break ka}e=i+j|0;k=a+b|0;e=k>>>0>>0?e+1|0:e;F[c+16>>2]=k;F[c+20>>2]=e;if((a|0)<=0){break ka}b=b+F[c>>2]|0;F[g+48>>2]=b;c=a-1|0;e=c+b|0;k=G[e|0];la:{if(k>>>0<=63){F[g+52>>2]=c;a=G[e|0]&63;break la}ma:{switch((k>>>6|0)-1|0){case 0:if(a>>>0<2){break ka}a=a-2|0;F[g+52>>2]=a;a=a+b|0;a=G[a+1|0]<<8&16128|G[a|0];break la;case 1:if(a>>>0<3){break ka}a=a-3|0;F[g+52>>2]=a;a=a+b|0;a=G[a+1|0]<<8|G[a+2|0]<<16&4128768|G[a|0];break la;default:break ma}}a=a-4|0;F[g+52>>2]=a;a=a+b|0;a=(G[a|0]|G[a+1|0]<<8|(G[a+2|0]<<16|G[a+3|0]<<24))&1073741823}F[g+56>>2]=a- -1048576;d=a>>>0<267386880}Z=f+16|0;if(!d){break ja}if(!o){m=1;break ja}b=F[g+52>>2];a=F[g+56>>2];c=F[g+36>>2];d=F[g+48>>2];f=F[g+24>>2];while(1){na:{if(a>>>0>1048575){break na}while(1){if((b|0)<=0){break na}b=b-1|0;F[g+52>>2]=b;a=G[b+d|0]|a<<8;F[g+56>>2]=a;if(a>>>0<1048576){continue}break}}m=a&262143;e=F[f+(m<<2)>>2];k=c+(e<<3)|0;a=(L(F[k>>2],a>>>18|0)+m|0)-F[k+4>>2]|0;F[g+56>>2]=a;F[r+(q<<2)>>2]=e;m=1;q=q+1|0;if((o|0)!=(q|0)){continue}break}}a=F[g+36>>2];if(a){F[g+40>>2]=a;ja(a)}a=F[g+24>>2];if(a){F[g+28>>2]=a;ja(a)}a=F[g+8>>2];if(a){F[g+12>>2]=a;ja(a)}Z=g- -64|0;b=m;break g;case 12:o=a;r=d;e=Z+-64|0;Z=e;F[e+56>>2]=0;F[e+48>>2]=0;F[e+52>>2]=0;F[e+40>>2]=0;F[e+44>>2]=0;F[e+32>>2]=0;F[e+36>>2]=0;F[e+24>>2]=0;F[e+28>>2]=0;F[e+16>>2]=0;F[e+20>>2]=0;F[e+8>>2]=0;F[e+12>>2]=0;h=e+8|0;oa:{pa:{if(!H[c+38>>1]){break pa}if(!Ta(1,h+12|0,c)){break pa}b=F[c+8>>2];d=F[c+16>>2];f=b-d|0;i=F[h+12>>2];b=F[c+12>>2]-(F[c+20>>2]+(b>>>0>>0)|0)|0;if(f>>>0>>6>>>0&(b|0)<=0|(b|0)<0){break pa}b=F[h>>2];a=F[h+4>>2]-b>>2;qa:{if(a>>>0>>0){qa(h,i-a|0);i=F[h+12>>2];break qa}if(a>>>0<=i>>>0){break qa}F[h+4>>2]=b+(i<<2)}g=1;if(!i){break oa}f=F[c+16>>2];d=F[c+20>>2];s=F[h>>2];j=F[c+8>>2];n=F[c+12>>2];b=0;while(1){g=0;if((d|0)>=(n|0)&f>>>0>=j>>>0|(d|0)>(n|0)){break oa}g=F[c>>2];p=G[g+f|0];a=d;f=f+1|0;a=f?a:a+1|0;F[c+16>>2]=f;d=a;F[c+20>>2]=a;a=p>>>2|0;l=0;ra:{sa:{ta:{ua:{t=p&3;switch(t|0){case 0:break sa;case 3:break ua;default:break ta}}a=a+b|0;g=0;if(a>>>0>=i>>>0){break oa}ma(s+(b<<2)|0,0,(p&252)+4|0);b=a;break ra}while(1){if((f|0)==(j|0)&(d|0)==(n|0)){break pa}i=G[f+g|0];f=f+1|0;d=f?d:d+1|0;F[c+16>>2]=f;F[c+20>>2]=d;a=i<<(l<<3|6)|a;l=l+1|0;if((t|0)!=(l|0)){continue}break}}F[s+(b<<2)>>2]=a}b=b+1|0;i=F[h+12>>2];if(b>>>0>>0){continue}break}a=h+16|0;n=F[h>>2];d=F[h+16>>2];b=F[h+20>>2]-d|0;va:{if(b>>>0<=2097151){qa(a,524288-(b>>>2|0)|0);break va}if((b|0)==2097152){break va}F[h+20>>2]=d+2097152}d=h+28|0;b=F[d>>2];f=F[h+32>>2]-b>>3;wa:{if(f>>>0>>0){_a(d,i-f|0);b=F[d>>2];break wa}if(f>>>0>i>>>0){F[h+32>>2]=(i<<3)+b}if(!i){break pa}}j=F[a>>2];f=0;d=0;while(1){g=n+(f<<2)|0;l=F[g>>2];h=(f<<3)+b|0;a=d;F[h+4>>2]=a;F[h>>2]=l;g=F[g>>2];d=g+a|0;if(d>>>0>524288){break pa}xa:{if(a>>>0>=d>>>0){break xa}l=0;h=g&7;if(h){while(1){F[j+(a<<2)>>2]=f;a=a+1|0;l=l+1|0;if((h|0)!=(l|0)){continue}break}}if(g-1>>>0<=6){break xa}while(1){g=j+(a<<2)|0;F[g>>2]=f;F[g+28>>2]=f;F[g+24>>2]=f;F[g+20>>2]=f;F[g+16>>2]=f;F[g+12>>2]=f;F[g+8>>2]=f;F[g+4>>2]=f;a=a+8|0;if((d|0)!=(a|0)){continue}break}}f=f+1|0;if((i|0)!=(f|0)){continue}break}k=(d|0)==524288}g=k}ya:{if(!g|(F[e+20>>2]?0:o)){break ya}d=0;k=Z-16|0;Z=k;za:{if(!Sa(1,k+8|0,c)){break za}a=F[c+8>>2];f=F[c+16>>2];g=a-f|0;j=F[k+12>>2];i=F[c+20>>2];a=F[c+12>>2]-(i+(a>>>0>>0)|0)|0;b=F[k+8>>2];if((j|0)==(a|0)&g>>>0>>0|a>>>0>>0){break za}a=i+j|0;g=b+f|0;a=g>>>0>>0?a+1|0:a;F[c+16>>2]=g;F[c+20>>2]=a;if((b|0)<=0){break za}a=f+F[c>>2]|0;F[e+48>>2]=a;c=b-1|0;f=c+a|0;g=G[f|0];Aa:{if(g>>>0<=63){F[e+52>>2]=c;a=G[f|0]&63;break Aa}Ba:{switch((g>>>6|0)-1|0){case 0:if(b>>>0<2){break za}b=b-2|0;F[e+52>>2]=b;a=a+b|0;a=G[a+1|0]<<8&16128|G[a|0];break Aa;case 1:if(b>>>0<3){break za}b=b-3|0;F[e+52>>2]=b;a=a+b|0;a=G[a+1|0]<<8|G[a+2|0]<<16&4128768|G[a|0];break Aa;default:break Ba}}b=b-4|0;F[e+52>>2]=b;a=a+b|0;a=(G[a|0]|G[a+1|0]<<8|(G[a+2|0]<<16|G[a+3|0]<<24))&1073741823}F[e+56>>2]=a+2097152;d=a>>>0<534773760}Z=k+16|0;if(!d){break ya}if(!o){m=1;break ya}b=F[e+52>>2];a=F[e+56>>2];c=F[e+36>>2];d=F[e+48>>2];f=F[e+24>>2];while(1){Ca:{if(a>>>0>2097151){break Ca}while(1){if((b|0)<=0){break Ca}b=b-1|0;F[e+52>>2]=b;a=G[b+d|0]|a<<8;F[e+56>>2]=a;if(a>>>0<2097152){continue}break}}m=a&524287;k=F[f+(m<<2)>>2];g=c+(k<<3)|0;a=(L(F[g>>2],a>>>19|0)+m|0)-F[g+4>>2]|0;F[e+56>>2]=a;F[r+(q<<2)>>2]=k;m=1;q=q+1|0;if((o|0)!=(q|0)){continue}break}}a=F[e+36>>2];if(a){F[e+40>>2]=a;ja(a)}a=F[e+24>>2];if(a){F[e+28>>2]=a;ja(a)}a=F[e+8>>2];if(a){F[e+12>>2]=a;ja(a)}Z=e- -64|0;b=m;break g;case 17:b=Ld(a,c,d);break g;case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:b=Z+-64|0;Z=b;F[b+56>>2]=0;F[b+48>>2]=0;F[b+52>>2]=0;F[b+40>>2]=0;F[b+44>>2]=0;F[b+32>>2]=0;F[b+36>>2]=0;F[b+24>>2]=0;F[b+28>>2]=0;F[b+16>>2]=0;F[b+20>>2]=0;F[b+8>>2]=0;F[b+12>>2]=0;Da:{if(!Nd(b+8|0,c)|(F[b+20>>2]?0:a)){break Da}if(!Md(b+8|0,c)){break Da}if(!a){f=1;break Da}m=F[b+52>>2];c=F[b+56>>2];e=F[b+36>>2];g=F[b+48>>2];o=F[b+24>>2];while(1){Ea:{if(c>>>0>16383){break Ea}while(1){if((m|0)<=0){break Ea}m=m-1|0;F[b+52>>2]=m;c=G[g+m|0]|c<<8;F[b+56>>2]=c;if(c>>>0<16384){continue}break}}f=c&4095;j=F[o+(f<<2)>>2];r=e+(j<<3)|0;c=(L(F[r>>2],c>>>12|0)+f|0)-F[r+4>>2]|0;F[b+56>>2]=c;F[(k<<2)+d>>2]=j;f=1;k=k+1|0;if((k|0)!=(a|0)){continue}break}}a=F[b+36>>2];if(a){F[b+40>>2]=a;ja(a)}a=F[b+24>>2];if(a){F[b+28>>2]=a;ja(a)}a=F[b+8>>2];if(a){F[b+12>>2]=a;ja(a)}Z=b- -64|0;b=f;break g;case 13:case 14:case 15:case 16:break h;default:break g}}b=Ld(a,c,d)}f=b}return f}function ih(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,J=0,K=0,M=0,N=0,O=0,P=0;u=Z+-64|0;Z=u;F[a+132>>2]=0;if(F[a+148>>2]){b=F[a+144>>2];if(b){while(1){f=F[b>>2];ja(b);b=f;if(b){continue}break}}b=0;F[a+144>>2]=0;f=F[a+140>>2];a:{if(!f){break a}if(f>>>0>=4){c=f&-4;while(1){e=b<<2;F[e+F[a+136>>2]>>2]=0;F[F[a+136>>2]+(e|4)>>2]=0;F[F[a+136>>2]+(e|8)>>2]=0;F[F[a+136>>2]+(e|12)>>2]=0;b=b+4|0;d=d+4|0;if((c|0)!=(d|0)){continue}break}}f=f&3;if(!f){break a}d=0;while(1){F[F[a+136>>2]+(b<<2)>>2]=0;b=b+1|0;d=d+1|0;if((f|0)!=(d|0)){continue}break}}F[a+148>>2]=0}b:{c:{if(!Da(1,u+60|0,F[F[a+4>>2]+32>>2])){break c}F[a+156>>2]=F[u+60>>2];if(!Da(1,u+56|0,F[F[a+4>>2]+32>>2])){break c}e=F[u+56>>2];if(e>>>0>1431655765|I[a+156>>2]>L(e,3)>>>0){break c}b=F[F[a+4>>2]+32>>2];c=F[b+8>>2];k=F[b+12>>2];d=F[b+20>>2];f=F[b+16>>2];if((k|0)<=(d|0)&f>>>0>=c>>>0|(d|0)>(k|0)){break c}k=G[f+F[b>>2]|0];f=f+1|0;d=f?d:d+1|0;F[b+16>>2]=f;F[b+20>>2]=d;if(!Da(1,u+52|0,b)){break c}q=F[u+52>>2];if(q>>>0>e>>>0|e>>>0>q+((q>>>0)/3|0)>>>0){break c}if(!Da(1,u+48|0,F[F[a+4>>2]+32>>2])){break c}d=F[u+48>>2];if(d>>>0>q>>>0){break c}F[a+28>>2]=F[a+24>>2];f=Zb(ka(88));b=F[a+8>>2];F[a+8>>2]=f;if(b){Za(b);if(!F[a+8>>2]){break c}}F[a+164>>2]=F[a+160>>2];Ib(a+160|0,e);F[a+176>>2]=F[a+172>>2];Ib(a+172|0,e);F[a- -64>>2]=0;F[a+92>>2]=-1;F[a+84>>2]=-1;F[a+88>>2]=-1;F[a+40>>2]=F[a+36>>2];F[a+52>>2]=F[a+48>>2];F[a+76>>2]=F[a+72>>2];A=a+216|0;Dd(A);Cd(A,k);if(!_c(F[a+8>>2],e,d+F[a+156>>2]|0)){break c}b=F[a+156>>2];D[u+8|0]=1;Ea(a+120|0,b+d|0,u+8|0);if((Bd(a,F[F[a+4>>2]+32>>2])|0)==-1){break c}c=a+232|0;b=c;F[b+144>>2]=a;f=F[($[F[F[a>>2]+32>>2]](a)|0)+32>>2];f=F[f>>2]+F[f+16>>2]|0;e=F[($[F[F[a>>2]+32>>2]](a)|0)+32>>2];e=F[e+8>>2]-F[e+16>>2]|0;O=b,P=H[F[($[F[F[a>>2]+32>>2]](a)|0)+32>>2]+38>>1],E[O+38>>1]=P;F[b>>2]=f;F[b+16>>2]=0;F[b+20>>2]=0;F[b+8>>2]=e;F[b+12>>2]=0;O=b,P=$[F[F[a>>2]+36>>2]](a)|0,F[O+148>>2]=P;F[a+372>>2]=k;F[a+384>>2]=d+F[a+156>>2];K=Ja(u+8|0);k=K;f=0;j=Z-16|0;Z=j;d:{if(!Aa(b+80|0,b)){break d}if(!yd(c)){break d}b=F[c+4>>2];F[k>>2]=F[c>>2];F[k+4>>2]=b;b=F[c+36>>2];F[k+32>>2]=F[c+32>>2];F[k+36>>2]=b;b=F[c+28>>2];F[k+24>>2]=F[c+24>>2];F[k+28>>2]=b;b=F[c+20>>2];F[k+16>>2]=F[c+16>>2];F[k+20>>2]=b;b=F[c+12>>2];F[k+8>>2]=F[c+8>>2];F[k+12>>2]=b;F[c+176>>2]=2;F[c+180>>2]=7;b=F[c+152>>2];if((b|0)<0){break d}F[j+12>>2]=0;f=2;h=F[c+156>>2];e=F[c+160>>2]-h>>2;e:{if(e>>>0>>0){Fa(c+156|0,b-e|0,j+12|0);f=F[c+176>>2];d=F[c+180>>2];break e}d=7;if(b>>>0>=e>>>0){break e}F[c+160>>2]=h+(b<<2)}e=c+184|0;d=(d-f|0)+1|0;b=F[c+188>>2];f=F[c+184>>2];s=(b-f|0)/12|0;f:{if(d>>>0>s>>>0){h=0;b=d-s|0;o=F[e+8>>2];f=F[e+4>>2];g:{if(b>>>0<=(o-f|0)/12>>>0){if(b){b=L(b,12)-12|0;b=(b-((b>>>0)%12|0)|0)+12|0;f=ma(f,0,b)+b|0}F[e+4>>2]=f;break g}h:{i:{j:{s=F[e>>2];g=(f-s|0)/12|0;d=g+b|0;if(d>>>0<357913942){o=(o-s|0)/12|0;i=o<<1;o=o>>>0>=178956970?357913941:d>>>0>>0?i:d;if(o){if(o>>>0>=357913942){break j}h=ka(L(o,12))}d=L(g,12)+h|0;b=L(b,12)-12|0;g=(b-((b>>>0)%12|0)|0)+12|0;b=ma(d,0,g);g=b+g|0;h=L(o,12)+h|0;if((f|0)==(s|0)){break i}while(1){d=d-12|0;f=f-12|0;F[d>>2]=F[f>>2];F[d+4>>2]=F[f+4>>2];F[d+8>>2]=F[f+8>>2];F[f+8>>2]=0;F[f>>2]=0;F[f+4>>2]=0;if((f|0)!=(s|0)){continue}break}F[e+8>>2]=h;b=F[e+4>>2];F[e+4>>2]=g;f=F[e>>2];F[e>>2]=d;if((b|0)==(f|0)){break h}while(1){d=b-12|0;h=F[d>>2];if(h){F[b-8>>2]=h;ja(h)}b=d;if((f|0)!=(b|0)){continue}break}break h}break b}oa();v()}F[e+8>>2]=h;F[e+4>>2]=g;F[e>>2]=b}if(f){ja(f)}}d=F[c+188>>2];break f}if(d>>>0>=s>>>0){d=b;break f}d=f+L(d,12)|0;if((d|0)!=(b|0)){while(1){f=b-12|0;h=F[f>>2];if(h){F[b-8>>2]=h;ja(h)}b=f;if((d|0)!=(b|0)){continue}break}}F[c+188>>2]=d}s=c+196|0;f=F[c+184>>2];b=(d-f|0)/12|0;o=F[c+196>>2];h=F[c+200>>2]-o>>2;k:{if(b>>>0>h>>>0){qa(s,b-h|0);f=F[c+184>>2];d=F[c+188>>2];break k}if(b>>>0>=h>>>0){break k}F[c+200>>2]=o+(b<<2)}if((d|0)==(f|0)){f=1;break d}b=0;while(1){l:{if(!Da(1,j+8|0,k)){break l}f=F[j+8>>2];d=F[c+148>>2];if(f>>>0>(F[d+4>>2]-F[d>>2]>>2>>>0)/3>>>0){break l}if(f){g=L(b,12);h=g+F[e>>2]|0;d=F[h>>2];o=F[h+4>>2]-d>>2;m:{if(o>>>0>>0){qa(h,f-o|0);d=F[g+F[e>>2]>>2];break m}if(f>>>0>=o>>>0){break m}F[h+4>>2]=(f<<2)+d}mc(f,1,k,d);F[F[s>>2]+(b<<2)>>2]=f}f=1;b=b+1|0;if(b>>>0<(F[c+188>>2]-F[c+184>>2]|0)/12>>>0){continue}break d}break}f=0}Z=j+16|0;n:{if(!f){break n}e=0;c=0;d=0;b=0;k=0;f=0;s=0;o=0;l=Z-96|0;Z=l;F[l+72>>2]=0;F[l+64>>2]=0;F[l+68>>2]=0;F[l+48>>2]=0;F[l+52>>2]=0;F[l+40>>2]=0;F[l+44>>2]=0;F[l+56>>2]=1065353216;F[l+32>>2]=0;F[l+24>>2]=0;F[l+28>>2]=0;j=a;C=F[a+124>>2];o:{p:{q:{r:{s:{if((q|0)<=0){break s}J=j+232|0;M=F[j+216>>2]!=F[j+220>>2];B=1;t:{while(1){h=s;s=h+1|0;u:{v:{w:{g=F[j+404>>2];if((g|0)==-1){F[j+400>>2]=7;break w}a=-1;i=F[j+428>>2]+(g<<2)|0;m=F[i>>2];g=m-1|0;F[i>>2]=g;if((m|0)<=0){break r}g=F[F[F[j+416>>2]+L(F[j+404>>2],12)>>2]+(g<<2)>>2];if(g>>>0>4){break r}i=F[(g<<2)+8896>>2];F[j+400>>2]=i;if(!g){if((b|0)==(c|0)){break r}i=-1;m=F[j+8>>2];B=F[m+24>>2];t=c-4|0;e=F[t>>2];g=-1;x:{if((e|0)==-1){break x}p=e+1|0;p=(p>>>0)%3|0?p:e-2|0;g=-1;if((p|0)==-1){break x}g=F[F[m>>2]+(p<<2)>>2]}n=F[B+(g<<2)>>2];if((n|0)!=-1){i=n+1|0;i=(i>>>0)%3|0?i:n-2|0}if((e|0)!=-1&F[F[m+12>>2]+(e<<2)>>2]!=-1|(e|0)==(i|0)){break r}n=F[m+12>>2];if((i|0)!=-1&F[n+(i<<2)>>2]!=-1){break r}p=L(h,3);h=p+1|0;F[n+(e<<2)>>2]=h;x=h<<2;F[x+n>>2]=e;r=p+2|0;F[n+(i<<2)>>2]=r;w=r<<2;F[w+n>>2]=i;n=-1;h=-1;y:{if((e|0)==-1){break y}z:{if((e>>>0)%3|0){e=e-1|0;break z}e=e+2|0;h=-1;if((e|0)==-1){break y}}h=F[F[m>>2]+(e<<2)>>2]}e=h;A:{if((i|0)==-1){break A}h=i+1|0;h=(h>>>0)%3|0?h:i-2|0;if((h|0)==-1){break A}n=F[F[m>>2]+(h<<2)>>2]}if((e|0)==(g|0)|(g|0)==(n|0)){break r}a=F[m>>2];F[a+(p<<2)>>2]=g;F[a+x>>2]=n;F[a+w>>2]=e;if((e|0)!=-1){F[B+(e<<2)>>2]=r}a=F[j+120>>2]+(g>>>3&536870908)|0;e=F[a>>2];O=a,P=oi(g)&e,F[O>>2]=P;F[t>>2]=p;e=b;kc(J,p);break u}B:{switch(i-1|0){case 2:case 4:if((b|0)==(c|0)){break r}r=c-4|0;e=F[r>>2];i=F[j+8>>2];m=F[i+12>>2];if((e|0)!=-1&F[m+(e<<2)>>2]!=-1){break r}c=L(h,3);n=(g|0)==3;g=c+(n?2:1)|0;t=g<<2;F[t+m>>2]=e;F[m+(e<<2)>>2]=g;Ma(i+24|0,8324);p=F[j+8>>2];m=F[p+24>>2];if(F[p+28>>2]-m>>2>(C|0)){break r}a=F[p>>2];w=a+t|0;p=F[i+28>>2];i=F[i+24>>2];t=(p-i>>2)-1|0;F[w>>2]=t;if((i|0)!=(p|0)){F[m+(t<<2)>>2]=g}g=n?c:c+2|0;w=a+(c+n<<2)|0;C:{if((e|0)==-1){F[a+(g<<2)>>2]=-1;i=-1;break C}D:{E:{F:{if((e>>>0)%3|0){i=e-1|0;break F}i=e+2|0;if((i|0)==-1){break E}}i=F[a+(i<<2)>>2];F[a+(g<<2)>>2]=i;if((i|0)==-1){break D}F[m+(i<<2)>>2]=g;break D}F[a+(g<<2)>>2]=-1}i=e+1|0;e=(i>>>0)%3|0?i:e-2|0;i=-1;if((e|0)==-1){break C}i=F[a+(e<<2)>>2]}F[w>>2]=i;F[r>>2]=c;e=b;break v;case 6:break w;case 0:break B;default:break r}}if((e|0)==(c|0)){break r}f=c-4|0;m=F[f>>2];F[l+68>>2]=f;n=F[l+44>>2];G:{if(!n){break G}g=F[l+40>>2];p=ni(n)>>>0>1;a=h&n+2147483647;H:{if(!p){break H}a=h;if(a>>>0>>0){break H}a=(h>>>0)%(n>>>0)|0}i=a;a=F[g+(i<<2)>>2];if(!a){break G}a=F[a>>2];if(!a){break G}I:{if(!p){g=n-1|0;while(1){n=F[a+4>>2];J:{if((n|0)!=(h|0)){if((i|0)==(g&n)){break J}break G}if((h|0)==F[a+8>>2]){break I}}a=F[a>>2];if(a){continue}break}break G}while(1){g=F[a+4>>2];K:{if((g|0)!=(h|0)){if(g>>>0>=n>>>0){g=(g>>>0)%(n>>>0)|0}if((g|0)==(i|0)){break K}break G}if((h|0)==F[a+8>>2]){break I}}a=F[a>>2];if(a){continue}break}break G}if((f|0)!=(k|0)){F[f>>2]=F[a+12>>2];F[l+68>>2]=c;f=c;break G}b=k-e|0;c=b>>2;d=c+1|0;if(d>>>0>=1073741824){break b}f=b>>>1|0;d=b>>>0>=2147483644?1073741823:d>>>0>>0?f:d;if(d){if(d>>>0>=1073741824){break p}f=ka(d<<2)}else{f=0}b=f+(c<<2)|0;F[b>>2]=F[a+12>>2];d=f+(d<<2)|0;f=b+4|0;if((e|0)!=(k|0)){while(1){b=b-4|0;k=k-4|0;F[b>>2]=F[k>>2];if((e|0)!=(k|0)){continue}break}}F[l+72>>2]=d;F[l+68>>2]=f;F[l+64>>2]=b;if(e){ja(e)}e=b;k=d}if((e|0)==(f|0)){break t}x=f-4|0;a=F[x>>2];if((a|0)==(m|0)){break t}i=(a|0)==-1;g=F[j+8>>2];if(!i&F[F[g+12>>2]+(a<<2)>>2]!=-1){break t}n=F[g+12>>2];if((m|0)!=-1&F[n+(m<<2)>>2]!=-1){break t}p=L(h,3);t=p+2|0;F[n+(a<<2)>>2]=t;c=t<<2;F[c+n>>2]=a;h=p+1|0;F[n+(m<<2)>>2]=h;w=h<<2;F[w+n>>2]=m;L:{M:{N:{if(!i){if((a>>>0)%3|0){h=a-1|0;break N}h=a+2|0;if((h|0)!=-1){break N}i=F[g>>2];h=-1;break M}h=-1;i=F[g>>2];F[i+(p<<2)>>2]=-1;r=-1;break L}i=F[g>>2];h=F[i+(h<<2)>>2]}F[(p<<2)+i>>2]=h;r=a+1|0;a=(r>>>0)%3|0?r:a-2|0;r=-1;if((a|0)==-1){break L}r=F[(a<<2)+i>>2]}F[i+w>>2]=r;O:{if((m|0)==-1){F[c+i>>2]=-1;r=-1;c=-1;break O}P:{Q:{R:{if((m>>>0)%3|0){a=m-1|0;break R}a=m+2|0;if((a|0)==-1){break Q}}a=F[(a<<2)+i>>2];F[c+i>>2]=a;if((a|0)==-1){break P}F[F[g+24>>2]+(a<<2)>>2]=t;break P}F[c+i>>2]=-1}r=-1;a=m+1|0;a=(a>>>0)%3|0?a:m-2|0;c=-1;if((a|0)==-1){break O}r=F[(a<<2)+i>>2];c=a}a=F[j+388>>2];t=h<<2;m=a+t|0;w=a;a=r<<2;F[m>>2]=F[m>>2]+F[w+a>>2];w=a;a=F[g+24>>2];m=w+a|0;if((h|0)!=-1){F[a+t>>2]=F[m>>2]}a=c;while(1){if((a|0)!=-1){F[(a<<2)+i>>2]=h;t=a+1|0;a=(t>>>0)%3|0?t:a-2|0;g=-1;S:{if((a|0)==-1){break S}a=F[n+(a<<2)>>2];g=-1;if((a|0)==-1){break S}g=a+1|0;g=(g>>>0)%3|0?g:a-2|0}a=g;if((c|0)!=(a|0)){continue}break t}break}F[m>>2]=-1;T:{U:{if(M){break U}if((y|0)!=(z|0)){F[z>>2]=r;z=z+4|0;F[l+28>>2]=z;break U}a=y-o|0;g=a>>2;c=g+1|0;if(c>>>0>=1073741824){break T}h=a>>>1|0;h=a>>>0>=2147483644?1073741823:c>>>0>>0?h:c;if(h){if(h>>>0>=1073741824){break p}c=ka(h<<2)}else{c=0}a=c+(g<<2)|0;F[a>>2]=r;z=a+4|0;if((o|0)!=(y|0)){while(1){a=a-4|0;y=y-4|0;F[a>>2]=F[y>>2];if((o|0)!=(y|0)){continue}break}}y=c+(h<<2)|0;F[l+32>>2]=y;F[l+28>>2]=z;F[l+24>>2]=a;if(o){ja(o)}o=a}F[x>>2]=p;c=f;kc(J,p);break u}break b}g=F[j+8>>2];Ma(g+24|0,8324);a=-1;k=F[j+8>>2];f=L(h,3);i=F[g+28>>2];m=F[g+24>>2];n=i-m|0;g=n>>2;p=g-1|0;F[F[k>>2]+(f<<2)>>2]=p;Ma(k+24|0,8324);r=f+1|0;F[F[k>>2]+(r<<2)>>2]=(F[k+28>>2]-F[k+24>>2]>>2)-1;k=F[j+8>>2];Ma(k+24|0,8324);t=f+2|0;F[F[k>>2]+(t<<2)>>2]=(F[k+28>>2]-F[k+24>>2]>>2)-1;x=F[j+8>>2];k=F[x+24>>2];if(F[x+28>>2]-k>>2>(C|0)){break r}V:{W:{if((i|0)!=(m|0)){F[k+(p<<2)>>2]=f;a=0;if((n|0)==-4){break W}}F[k+(g<<2)>>2]=r;a=g+1|0;if((a|0)==-1){break V}}F[k+(a<<2)>>2]=t}if((d|0)!=(c|0)){F[c>>2]=f;f=c+4|0;F[l+68>>2]=f;k=d;break v}a=d-b|0;k=a>>2;e=k+1|0;if(e>>>0>=1073741824){break b}c=a>>>1|0;a=a>>>0>=2147483644?1073741823:e>>>0>>0?c:e;if(a){if(a>>>0>=1073741824){break p}c=ka(a<<2)}else{c=0}e=c+(k<<2)|0;F[e>>2]=f;k=c+(a<<2)|0;f=e+4|0;if((b|0)!=(d|0)){while(1){e=e-4|0;d=d-4|0;F[e>>2]=F[d>>2];if((b|0)!=(d|0)){continue}break}}F[l+72>>2]=k;F[l+68>>2]=f;F[l+64>>2]=e;if(b){ja(b)}d=k;b=e}kc(J,F[f-4>>2]);a=F[j+40>>2];X:{if((a|0)==F[j+36>>2]){break X}c=a-12|0;g=F[c+4>>2];h=q+(h^-1)|0;if(g>>>0>h>>>0){break t}if((g|0)!=(h|0)){break X}i=G[a-4|0];g=F[c>>2];F[j+40>>2]=c;if((g|0)<0){break t}m=f-4|0;a=F[m>>2];F[l+20>>2]=q+(g^-1);c=l+20|0;F[l+88>>2]=c;Fb(l,l+40|0,c,l+88|0);g=F[l>>2];Y:{if(i&1){c=-1;if((a|0)==-1){break Y}c=a+1|0;c=(c>>>0)%3|0?c:a-2|0;break Y}c=-1;if((a|0)==-1){break Y}c=a-1|0;if((a>>>0)%3|0){break Y}c=a+2|0}F[g+12>>2]=c;a=F[j+40>>2];if((a|0)==F[j+36>>2]){break X}while(1){c=a-12|0;g=F[c+4>>2];if(g>>>0>h>>>0){break t}if((g|0)!=(h|0)){break X}i=G[a-4|0];g=F[c>>2];F[j+40>>2]=c;if((g|0)<0){break t}a=F[m>>2];F[l+20>>2]=q+(g^-1);c=l+20|0;F[l+88>>2]=c;Fb(l,l+40|0,c,l+88|0);g=F[l>>2];Z:{if(i&1){c=-1;if((a|0)==-1){break Z}c=a+1|0;c=(c>>>0)%3|0?c:a-2|0;break Z}c=-1;if((a|0)==-1){break Z}c=a-1|0;if((a>>>0)%3|0){break Z}c=a+2|0}F[g+12>>2]=c;a=F[j+40>>2];if((a|0)!=F[j+36>>2]){continue}break}}c=f}B=(q|0)>(s|0);if((q|0)!=(s|0)){continue}break}s=q;break s}a=-1;if(B){break r}}a=-1;c=F[j+8>>2];if(F[c+28>>2]-F[c+24>>2]>>2>(C|0)){break r}if((b|0)!=(f|0)){m=j+72|0;k=j+60|0;n=j+312|0;while(1){f=f-4|0;q=F[f>>2];F[l+68>>2]=f;_:{if(wa(n)){g=F[j+8>>2];o=F[g>>2];if(((F[g+4>>2]-o>>2>>>0)/3|0)<=(s|0)){a=-1;break r}b=-1;i=F[g+24>>2];a=-1;$:{if((q|0)==-1){break $}e=q+1|0;e=(e>>>0)%3|0?e:q-2|0;a=-1;if((e|0)==-1){break $}a=F[o+(e<<2)>>2]}e=a;a=F[i+(e<<2)>>2];aa:{if((a|0)==-1){h=1;c=-1;break aa}h=1;c=-1;d=a+1|0;a=(d>>>0)%3|0?d:a-2|0;if((a|0)==-1){break aa}h=0;b=a+1|0;b=(b>>>0)%3|0?b:a-2|0;if((b|0)!=-1){c=F[o+(b<<2)>>2]}b=a}a=-1;d=-1;i=F[i+(c<<2)>>2];if((i|0)!=-1){d=i+1|0;d=(d>>>0)%3|0?d:i-2|0}if((b|0)==(q|0)|(d|0)==(q|0)|((q|0)!=-1&F[F[g+12>>2]+(q<<2)>>2]!=-1|(b|0)==(d|0))){break r}if(!h&F[F[g+12>>2]+(b<<2)>>2]!=-1){break r}h=-1;g=F[g+12>>2];i=-1;ba:{if((d|0)==-1){break ba}if(F[g+(d<<2)>>2]!=-1){break r}a=d+1|0;a=(a>>>0)%3|0?a:d-2|0;i=-1;if((a|0)==-1){break ba}i=F[o+(a<<2)>>2]}a=L(s,3);F[l>>2]=a;F[g+(a<<2)>>2]=q;F[g+(q<<2)>>2]=a;a=F[l>>2]+1|0;F[g+(a<<2)>>2]=b;F[g+(b<<2)>>2]=a;a=F[l>>2]+2|0;F[g+(a<<2)>>2]=d;F[g+(d<<2)>>2]=a;a=F[l>>2];F[o+(a<<2)>>2]=c;b=a+1|0;d=o+(b<<2)|0;F[d>>2]=i;q=a+2|0;o=o+(q<<2)|0;F[o>>2]=e;a=F[j+120>>2];e=b?c:-1;c=a+(e>>>3&536870908)|0;g=F[c>>2];O=c,P=oi(e)&g,F[O>>2]=P;h=(b|0)!=-1?F[d>>2]:h;b=a+(h>>>3&536870908)|0;d=F[b>>2];O=b,P=oi(h)&d,F[O>>2]=P;d=-1;d=(q|0)!=-1?F[o>>2]:d;a=a+(d>>>3&536870908)|0;b=F[a>>2];O=a,P=oi(d)&b,F[O>>2]=P;D[l+88|0]=1;wd(k,l+88|0);Ma(m,l);s=s+1|0;b=F[l+64>>2];break _}d=F[j+64>>2];a=F[j+68>>2];if((d|0)==a<<5){if((d+1|0)<0){break b}if(d>>>0<=1073741822){a=a<<6;d=(d&-32)+32|0;a=a>>>0>d>>>0?a:d}else{a=2147483647}$a(k,a);d=F[j+64>>2]}F[j+64>>2]=d+1;a=F[j+60>>2]+(d>>>3&536870908)|0;e=F[a>>2];O=a,P=oi(d)&e,F[O>>2]=P;d=F[j+76>>2];if((d|0)!=F[j+80>>2]){F[d>>2]=q;F[j+76>>2]=d+4;break _}c=F[m>>2];a=d-c|0;o=a>>2;e=o+1|0;if(e>>>0>=1073741824){break b}h=a>>>1|0;h=a>>>0>=2147483644?1073741823:e>>>0>>0?h:e;if(h){if(h>>>0>=1073741824){break p}a=ka(h<<2)}else{a=0}e=a+(o<<2)|0;F[e>>2]=q;q=e+4|0;if((d|0)!=(c|0)){while(1){e=e-4|0;d=d-4|0;F[e>>2]=F[d>>2];if((d|0)!=(c|0)){continue}break}}F[j+80>>2]=a+(h<<2);F[j+76>>2]=q;F[j+72>>2]=e;if(!c){break _}ja(c)}if((b|0)!=(f|0)){continue}break}c=F[j+8>>2]}a=-1;if(((F[c+4>>2]-F[c>>2]>>2>>>0)/3|0)!=(s|0)){break r}a=F[c+28>>2]-F[c+24>>2]>>2;f=F[l+24>>2];h=F[l+28>>2];if((f|0)==(h|0)){break q}while(1){b=F[f>>2];k=F[c+24>>2];d=a-1|0;e=k+(d<<2)|0;if(F[e>>2]==-1){while(1){d=a-2|0;a=a-1|0;e=k+(d<<2)|0;if(F[e>>2]==-1){continue}break}}if(b>>>0<=d>>>0){F[l>>2]=c;e=F[e>>2];D[l+12|0]=1;F[l+8>>2]=e;F[l+4>>2]=e;if((e|0)!=-1){while(1){e=F[F[j+8>>2]>>2]+(e<<2)|0;if(F[e>>2]!=(d|0)){a=-1;break r}F[e>>2]=b;nc(l);e=F[l+8>>2];if((e|0)!=-1){continue}break}c=F[j+8>>2]}k=F[c+24>>2];e=k+(d<<2)|0;if((b|0)!=-1){F[k+(b<<2)>>2]=F[e>>2]}F[e>>2]=-1;e=1<>2];b=k+(b>>>3&536870908)|0;k=k+(d>>>3&536870908)|0;d=1<>2]&d){e=e|F[b>>2]}else{e=F[b>>2]&(e^-1)}F[b>>2]=e;F[k>>2]=F[k>>2]&(d^-1);a=a-1|0}f=f+4|0;if((h|0)!=(f|0)){continue}break}}f=F[l+24>>2]}if(f){ja(f)}b=F[l+48>>2];if(b){while(1){d=F[b>>2];ja(b);b=d;if(b){continue}break}}b=F[l+40>>2];F[l+40>>2]=0;if(b){ja(b)}b=F[l+64>>2];if(b){F[l+68>>2]=b;ja(b)}Z=l+96|0;break o}oa();v()}f=a;if((a|0)==-1){break n}a=K;b=F[a+16>>2];d=b+F[a>>2]|0;b=F[a+8>>2]-b|0;a=F[F[j+4>>2]+32>>2];E[a+38>>1]=H[a+38>>1];F[a>>2]=d;F[a+16>>2]=0;F[a+20>>2]=0;F[a+8>>2]=b;F[a+12>>2]=0;ca:{if(F[j+216>>2]==F[j+220>>2]){break ca}a=F[j+8>>2];if(F[a+4>>2]==F[a>>2]){break ca}b=0;while(1){if(Ad(j,b)){b=b+3|0;a=F[j+8>>2];if(b>>>0>2]-F[a>>2]>>2>>>0){continue}break ca}break}break n}if(G[j+308|0]){D[j+308|0]=0;d=F[j+292>>2];a=0;e=F[j+304>>2]+7|0;a=e>>>0<7?1:a;e=a<<29|e>>>3;b=e+F[j+288>>2]|0;a=(a>>>3|0)+d|0;F[j+288>>2]=b;F[j+292>>2]=b>>>0>>0?a+1|0:a}b=F[j+216>>2];if((b|0)!=F[j+220>>2]){a=0;while(1){e=L(a,144);Zc((e+b|0)+4|0,F[j+8>>2]);d=F[A>>2];c=d+e|0;b=F[c+132>>2];c=F[c+136>>2];if((b|0)!=(c|0)){while(1){Xc((e+F[A>>2]|0)+4|0,F[b>>2]);b=b+4|0;if((c|0)!=(b|0)){continue}break}d=F[A>>2]}if(!Yc((d+e|0)+4|0)){break n}a=a+1|0;b=F[j+216>>2];if(a>>>0<(F[j+220>>2]-b|0)/144>>>0){continue}break}}a=F[j+8>>2];Hb(j+184|0,F[a+28>>2]-F[a+24>>2]>>2);d=F[j+216>>2];if((d|0)!=F[j+220>>2]){b=0;while(1){a=L(b,144)+d|0;d=F[a+60>>2]-F[a+56>>2]>>2;c=a+104|0;a=F[j+8>>2];a=F[a+28>>2]-F[a+24>>2]>>2;Hb(c,(a|0)<(d|0)?d:a);b=b+1|0;d=F[j+216>>2];if(b>>>0<(F[j+220>>2]-d|0)/144>>>0){continue}break}}N=zd(j,f)}}Z=u- -64|0;return N|0}na();v()}function lh(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,J=0,K=0,M=0,N=0;t=Z+-64|0;Z=t;F[a+132>>2]=0;if(F[a+148>>2]){c=F[a+144>>2];if(c){while(1){b=F[c>>2];ja(c);c=b;if(b){continue}break}}c=0;F[a+144>>2]=0;b=F[a+140>>2];a:{if(!b){break a}if(b>>>0>=4){h=b&-4;while(1){e=c<<2;F[e+F[a+136>>2]>>2]=0;F[F[a+136>>2]+(e|4)>>2]=0;F[F[a+136>>2]+(e|8)>>2]=0;F[F[a+136>>2]+(e|12)>>2]=0;c=c+4|0;g=g+4|0;if((h|0)!=(g|0)){continue}break}}b=b&3;if(!b){break a}g=0;while(1){F[F[a+136>>2]+(c<<2)>>2]=0;c=c+1|0;g=g+1|0;if((b|0)!=(g|0)){continue}break}}F[a+148>>2]=0}b:{if(!Da(1,t+60|0,F[F[a+4>>2]+32>>2])){break b}F[a+156>>2]=F[t+60>>2];if(!Da(1,t+56|0,F[F[a+4>>2]+32>>2])){break b}e=F[t+56>>2];if(e>>>0>1431655765|I[a+156>>2]>L(e,3)>>>0){break b}c=F[F[a+4>>2]+32>>2];h=F[c+8>>2];m=F[c+12>>2];b=F[c+20>>2];g=F[c+16>>2];if((m|0)<=(b|0)&g>>>0>=h>>>0|(b|0)>(m|0)){break b}h=G[g+F[c>>2]|0];g=g+1|0;b=g?b:b+1|0;F[c+16>>2]=g;F[c+20>>2]=b;if(!Da(1,t+52|0,c)){break b}n=F[t+52>>2];if(n>>>0>e>>>0|e>>>0>n+((n>>>0)/3|0)>>>0){break b}if(!Da(1,t+48|0,F[F[a+4>>2]+32>>2])){break b}c=F[t+48>>2];if(c>>>0>n>>>0){break b}F[a+28>>2]=F[a+24>>2];g=Zb(ka(88));b=F[a+8>>2];F[a+8>>2]=g;if(b){Za(b);if(!F[a+8>>2]){break b}}F[a+164>>2]=F[a+160>>2];Ib(a+160|0,e);F[a+176>>2]=F[a+172>>2];Ib(a+172|0,e);F[a- -64>>2]=0;F[a+92>>2]=-1;F[a+84>>2]=-1;F[a+88>>2]=-1;F[a+40>>2]=F[a+36>>2];F[a+52>>2]=F[a+48>>2];F[a+76>>2]=F[a+72>>2];y=a+216|0;Dd(y);Cd(y,h);if(!_c(F[a+8>>2],e,c+F[a+156>>2]|0)){break b}b=F[a+156>>2];D[t+8|0]=1;Ea(a+120|0,b+c|0,t+8|0);if((Bd(a,F[F[a+4>>2]+32>>2])|0)==-1){break b}c=a+232|0;F[c+144>>2]=a;b=F[($[F[F[a>>2]+32>>2]](a)|0)+32>>2];b=F[b>>2]+F[b+16>>2]|0;g=F[($[F[F[a>>2]+32>>2]](a)|0)+32>>2];g=F[g+8>>2]-F[g+16>>2]|0;M=c,N=H[F[($[F[F[a>>2]+32>>2]](a)|0)+32>>2]+38>>1],E[M+38>>1]=N;F[c>>2]=b;F[c+16>>2]=0;F[c+20>>2]=0;F[c+8>>2]=g;F[c+12>>2]=0;F[a+372>>2]=h;C=Ja(t+8|0);h=C;m=0;d=Z-16|0;Z=d;b=F[c+4>>2];F[c+40>>2]=F[c>>2];F[c+44>>2]=b;b=F[c+36>>2];F[c+72>>2]=F[c+32>>2];F[c+76>>2]=b;g=F[c+28>>2];b=c- -64|0;F[b>>2]=F[c+24>>2];F[b+4>>2]=g;b=F[c+20>>2];F[c+56>>2]=F[c+16>>2];F[c+60>>2]=b;b=F[c+12>>2];F[c+48>>2]=F[c+8>>2];F[c+52>>2]=b;c:{d:{if(hc(c+40|0,1,d+8|0)){b=F[c+44>>2];F[c>>2]=F[c+40>>2];F[c+4>>2]=b;b=F[c+76>>2];F[c+32>>2]=F[c+72>>2];F[c+36>>2]=b;b=F[c+68>>2];F[c+24>>2]=F[c+64>>2];F[c+28>>2]=b;g=F[c+60>>2];f=g;b=F[c+56>>2];F[c+16>>2]=b;F[c+20>>2]=g;e=F[c+52>>2];g=F[c+48>>2];F[c+8>>2]=g;F[c+12>>2]=e;k=F[d+12>>2];i=e-((b>>>0>g>>>0)+f|0)|0;e=g-b|0;g=F[d+8>>2];if((k|0)==(i|0)&e>>>0>=g>>>0|i>>>0>k>>>0){break d}}break c}e=f+k|0;b=b+g|0;e=b>>>0>>0?e+1|0:e;F[c+16>>2]=b;F[c+20>>2]=e;if(!Aa(c+80|0,c)){break c}if(!yd(c)){break c}b=F[c+4>>2];F[h>>2]=F[c>>2];F[h+4>>2]=b;b=F[c+36>>2];F[h+32>>2]=F[c+32>>2];F[h+36>>2]=b;b=F[c+28>>2];F[h+24>>2]=F[c+24>>2];F[h+28>>2]=b;b=F[c+20>>2];F[h+16>>2]=F[c+16>>2];F[h+20>>2]=b;b=F[c+12>>2];F[h+8>>2]=F[c+8>>2];F[h+12>>2]=b;m=1}Z=d+16|0;e:{if(!m){break e}b=0;c=0;g=0;m=0;j=Z-96|0;Z=j;F[j+72>>2]=0;F[j+64>>2]=0;F[j+68>>2]=0;F[j+48>>2]=0;F[j+52>>2]=0;F[j+40>>2]=0;F[j+44>>2]=0;F[j+56>>2]=1065353216;F[j+32>>2]=0;F[j+24>>2]=0;F[j+28>>2]=0;h=a;B=F[a+124>>2];f:{g:{h:{i:{j:{k:{l:{m:{if((n|0)<=0){break m}J=F[h+216>>2]!=F[h+220>>2];z=1;while(1){e=m;m=e+1|0;n:{o:{p:{q:{r:{s:{t:{u:{v:{w:{x:{y:{z:{A:{B:{if(!G[h+308|0]){break B}k=F[h+296>>2];d=F[h+304>>2];a=k+(d>>>3|0)|0;l=F[h+300>>2];if(a>>>0>=l>>>0){break B}f=G[a|0];a=d+1|0;F[h+304>>2]=a;p=f>>>(d&7)&1;if(!p){break B}i=0;f=a>>>3|0;r=k+f|0;C:{if(r>>>0>=l>>>0){d=a;a=0;break C}r=G[r|0];d=d+2|0;F[h+304>>2]=d;f=d>>>3|0;a=r>>>(a&7)&1}f=f+k|0;if(f>>>0>>0){f=G[f|0];F[h+304>>2]=d+1;i=f>>>(d&7)<<1&2}f=-1;i=p|(a|i)<<1;switch(i-1|0){case 6:break y;case 0:break z;case 2:case 4:break A;default:break l}}if((c|0)==(g|0)){f=-1;break l}d=-1;i=F[h+8>>2];z=F[i+24>>2];r=c-4|0;b=F[r>>2];a=-1;D:{if((b|0)==-1){break D}k=b+1|0;k=(k>>>0)%3|0?k:b-2|0;a=-1;if((k|0)==-1){break D}a=F[F[i>>2]+(k<<2)>>2]}f=F[z+(a<<2)>>2];if((f|0)!=-1){d=f+1|0;d=(d>>>0)%3|0?d:f-2|0}if((b|0)==(d|0)){f=-1;break l}if((b|0)!=-1){f=-1;if(F[F[i+12>>2]+(b<<2)>>2]!=-1){break l}}k=F[i+12>>2];if((d|0)!=-1){f=-1;if(F[k+(d<<2)>>2]!=-1){break l}}l=L(e,3);e=l+1|0;F[k+(b<<2)>>2]=e;s=e<<2;F[s+k>>2]=b;p=l+2|0;F[k+(d<<2)>>2]=p;u=p<<2;F[u+k>>2]=d;k=-1;e=-1;E:{if((b|0)==-1){break E}F:{if((b>>>0)%3|0){b=b-1|0;break F}b=b+2|0;e=-1;if((b|0)==-1){break E}}e=F[F[i>>2]+(b<<2)>>2]}b=e;G:{if((d|0)==-1){break G}e=d+1|0;e=(e>>>0)%3|0?e:d-2|0;if((e|0)==-1){break G}k=F[F[i>>2]+(e<<2)>>2]}f=-1;if((a|0)==(b|0)|(a|0)==(k|0)){break l}e=F[i>>2];F[e+(l<<2)>>2]=a;F[e+s>>2]=k;F[e+u>>2]=b;if((b|0)!=-1){F[z+(b<<2)>>2]=p}b=F[h+120>>2]+(a>>>3&536870908)|0;e=F[b>>2];M=b,N=oi(a)&e,F[M>>2]=N;F[r>>2]=l;b=g;break n}if((c|0)==(g|0)){break l}r=c-4|0;b=F[r>>2];a=F[h+8>>2];d=F[a+12>>2];if((b|0)!=-1&F[d+(b<<2)>>2]!=-1){break l}l=(i|0)==5;i=L(e,3);p=(l?2:1)+i|0;s=p<<2;F[s+d>>2]=b;F[d+(b<<2)>>2]=p;Ma(a+24|0,8324);d=F[h+8>>2];k=F[d+24>>2];if(F[d+28>>2]-k>>2>(B|0)){break l}d=F[d>>2];u=d+s|0;f=F[a+28>>2];a=F[a+24>>2];s=(f-a>>2)-1|0;F[u>>2]=s;if((a|0)!=(f|0)){F[k+(s<<2)>>2]=p}f=l?i:i+2|0;l=d+(i+l<<2)|0;H:{if((b|0)==-1){F[d+(f<<2)>>2]=-1;a=-1;break H}I:{J:{K:{if((b>>>0)%3|0){a=b-1|0;break K}a=b+2|0;if((a|0)==-1){break J}}a=F[d+(a<<2)>>2];F[d+(f<<2)>>2]=a;if((a|0)==-1){break I}F[k+(a<<2)>>2]=f;break I}F[d+(f<<2)>>2]=-1}f=b+1|0;b=(f>>>0)%3|0?f:b-2|0;a=-1;if((b|0)==-1){break H}a=F[d+(b<<2)>>2]}F[l>>2]=a;F[r>>2]=i;b=g;break t}if((b|0)==(c|0)){break l}a=c-4|0;k=F[a>>2];F[j+68>>2]=a;l=F[j+44>>2];L:{if(!l){c=a;break L}f=F[j+40>>2];p=ni(l)>>>0>1;d=e&l+2147483647;M:{if(!p){break M}d=e;if(d>>>0>>0){break M}d=(e>>>0)%(l>>>0)|0}i=d;d=F[f+(i<<2)>>2];if(!d){c=a;break L}d=F[d>>2];if(!d){c=a;break L}N:{if(!p){f=l-1|0;while(1){l=F[d+4>>2];O:{if((l|0)!=(e|0)){if((i|0)==(f&l)){break O}c=a;break L}if((e|0)==F[d+8>>2]){break N}}d=F[d>>2];if(d){continue}break}c=a;break L}while(1){f=F[d+4>>2];P:{if((f|0)!=(e|0)){if(f>>>0>=l>>>0){f=(f>>>0)%(l>>>0)|0}if((f|0)==(i|0)){break P}c=a;break L}if((e|0)==F[d+8>>2]){break N}}d=F[d>>2];if(d){continue}break}c=a;break L}if((a|0)!=(q|0)){F[a>>2]=F[d+12>>2];F[j+68>>2]=c;break L}a=q-b|0;g=a>>2;c=g+1|0;if(c>>>0>=1073741824){break x}f=a>>>1|0;f=a>>>0>=2147483644?1073741823:c>>>0>>0?f:c;if(f){if(f>>>0>=1073741824){break j}a=ka(f<<2)}else{a=0}g=a+(g<<2)|0;F[g>>2]=F[d+12>>2];c=g+4|0;if((b|0)!=(q|0)){while(1){g=g-4|0;q=q-4|0;F[g>>2]=F[q>>2];if((b|0)!=(q|0)){continue}break}}q=a+(f<<2)|0;F[j+72>>2]=q;F[j+68>>2]=c;F[j+64>>2]=g;if(b){ja(b)}}if((c|0)==(g|0)){break p}s=c-4|0;b=F[s>>2];if((b|0)==(k|0)){break p}a=(b|0)==-1;f=F[h+8>>2];if(!a&F[F[f+12>>2]+(b<<2)>>2]!=-1){break p}l=F[f+12>>2];if((k|0)!=-1&F[l+(k<<2)>>2]!=-1){break p}p=L(e,3);r=p+2|0;F[l+(b<<2)>>2]=r;e=r<<2;F[e+l>>2]=b;d=p+1|0;F[l+(k<<2)>>2]=d;u=d<<2;F[u+l>>2]=k;if(a){break w}if((b>>>0)%3|0){d=b-1|0;break s}d=b+2|0;if((d|0)!=-1){break s}a=F[f>>2];d=-1;break r}i=F[h+8>>2];Ma(i+24|0,8324);d=F[h+8>>2];a=L(e,3);k=F[i+28>>2];l=F[i+24>>2];p=k-l|0;i=p>>2;r=i-1|0;F[F[d>>2]+(a<<2)>>2]=r;Ma(d+24|0,8324);s=a+1|0;F[F[d>>2]+(s<<2)>>2]=(F[d+28>>2]-F[d+24>>2]>>2)-1;d=F[h+8>>2];Ma(d+24|0,8324);u=a+2|0;F[F[d>>2]+(u<<2)>>2]=(F[d+28>>2]-F[d+24>>2]>>2)-1;A=F[h+8>>2];d=F[A+24>>2];if(F[A+28>>2]-d>>2>(B|0)){break l}Q:{R:{if((k|0)!=(l|0)){F[d+(r<<2)>>2]=a;f=0;if((p|0)==-4){break R}}F[d+(i<<2)>>2]=s;f=i+1|0;if((f|0)==-1){break Q}}F[d+(f<<2)>>2]=u}if((c|0)!=(q|0)){F[c>>2]=a;c=c+4|0;F[j+68>>2]=c;break t}g=c-b|0;i=g>>2;d=i+1|0;if(d>>>0>=1073741824){break v}f=g>>>1|0;d=g>>>0>=2147483644?1073741823:d>>>0>>0?f:d;if(d){if(d>>>0>=1073741824){break j}f=ka(d<<2)}else{f=0}g=f+(i<<2)|0;F[g>>2]=a;q=f+(d<<2)|0;a=g+4|0;if((b|0)!=(c|0)){while(1){g=g-4|0;c=c-4|0;F[g>>2]=F[c>>2];if((b|0)!=(c|0)){continue}break}}F[j+72>>2]=q;F[j+68>>2]=a;F[j+64>>2]=g;if(!b){break u}ja(b);break u}na();v()}d=-1;a=F[f>>2];F[a+(p<<2)>>2]=-1;i=-1;break q}na();v()}c=a;b=g}a=F[h+40>>2];if((a|0)==F[h+36>>2]){break n}d=a-12|0;i=F[d+4>>2];f=n+(e^-1)|0;if(i>>>0>f>>>0){break p}if((f|0)!=(i|0)){break n}i=G[a-4|0];e=F[d>>2];F[h+40>>2]=d;if((e|0)<0){break p}k=c-4|0;a=F[k>>2];F[j+20>>2]=n+(e^-1);e=j+20|0;F[j+88>>2]=e;Fb(j,j+40|0,e,j+88|0);d=F[j>>2];S:{if(i&1){e=-1;if((a|0)==-1){break S}e=a+1|0;e=(e>>>0)%3|0?e:a-2|0;break S}e=-1;if((a|0)==-1){break S}e=a-1|0;if((a>>>0)%3|0){break S}e=a+2|0}F[d+12>>2]=e;d=F[h+40>>2];if((d|0)==F[h+36>>2]){break n}while(1){a=d-12|0;e=F[a+4>>2];if(e>>>0>f>>>0){break p}if((f|0)!=(e|0)){break n}d=G[d-4|0];e=F[a>>2];F[h+40>>2]=a;if((e|0)<0){break p}a=F[k>>2];F[j+20>>2]=n+(e^-1);e=j+20|0;F[j+88>>2]=e;Fb(j,j+40|0,e,j+88|0);i=F[j>>2];T:{if(d&1){e=-1;if((a|0)==-1){break T}e=a+1|0;e=(e>>>0)%3|0?e:a-2|0;break T}e=-1;if((a|0)==-1){break T}e=a-1|0;if((a>>>0)%3|0){break T}e=a+2|0}F[i+12>>2]=e;d=F[h+40>>2];if((d|0)!=F[h+36>>2]){continue}break}break n}a=F[f>>2];d=F[a+(d<<2)>>2]}F[(p<<2)+a>>2]=d;A=b+1|0;b=(A>>>0)%3|0?A:b-2|0;i=-1;if((b|0)==-1){break q}i=F[(b<<2)+a>>2]}F[a+u>>2]=i;U:{if((k|0)==-1){F[a+e>>2]=-1;i=-1;e=-1;break U}V:{W:{X:{if((k>>>0)%3|0){b=k-1|0;break X}b=k+2|0;if((b|0)==-1){break W}}b=F[(b<<2)+a>>2];F[a+e>>2]=b;if((b|0)==-1){break V}F[F[f+24>>2]+(b<<2)>>2]=r;break V}F[a+e>>2]=-1}i=-1;b=k+1|0;b=(b>>>0)%3|0?b:k-2|0;e=-1;if((b|0)==-1){break U}i=F[(b<<2)+a>>2];e=b}b=F[f+24>>2];k=b+(i<<2)|0;if((d|0)!=-1){F[b+(d<<2)>>2]=F[k>>2]}b=e;while(1){if((b|0)==-1){break o}F[(b<<2)+a>>2]=d;r=b+1|0;b=(r>>>0)%3|0?r:b-2|0;f=-1;Y:{if((b|0)==-1){break Y}b=F[l+(b<<2)>>2];f=-1;if((b|0)==-1){break Y}f=b+1|0;f=(f>>>0)%3|0?f:b-2|0}b=f;if((e|0)!=(b|0)){continue}break}}f=-1;if(!z){break m}break l}F[k>>2]=-1;Z:{if(J){break Z}if((w|0)!=(x|0)){F[x>>2]=i;x=x+4|0;F[j+28>>2]=x;break Z}a=w-o|0;d=a>>2;b=d+1|0;if(b>>>0>=1073741824){break i}e=a>>>1|0;e=a>>>0>=2147483644?1073741823:b>>>0>>0?e:b;if(e){if(e>>>0>=1073741824){break j}a=ka(e<<2)}else{a=0}b=a+(d<<2)|0;F[b>>2]=i;x=b+4|0;if((o|0)!=(w|0)){while(1){b=b-4|0;w=w-4|0;F[b>>2]=F[w>>2];if((o|0)!=(w|0)){continue}break}}w=a+(e<<2)|0;F[j+32>>2]=w;F[j+28>>2]=x;F[j+24>>2]=b;if(o){ja(o)}o=b}F[s>>2]=p;b=g}z=(m|0)<(n|0);if((m|0)!=(n|0)){continue}break}m=n}f=-1;a=F[h+8>>2];if(F[a+28>>2]-F[a+24>>2]>>2>(B|0)){break l}if((c|0)!=(g|0)){l=h+72|0;e=h+60|0;w=h+312|0;while(1){c=c-4|0;i=F[c>>2];F[j+68>>2]=c;_:{if(wa(w)){q=F[h+8>>2];k=F[q>>2];if(((F[q+4>>2]-k>>2>>>0)/3|0)<=(m|0)){f=-1;break l}a=-1;f=-1;b=-1;x=F[q+24>>2];g=-1;$:{if((i|0)==-1){break $}n=i+1|0;n=(n>>>0)%3|0?n:i-2|0;g=-1;if((n|0)==-1){break $}g=F[k+(n<<2)>>2]}n=g;o=F[x+(n<<2)>>2];aa:{if((o|0)==-1){d=1;g=-1;break aa}d=1;p=o+1|0;o=(p>>>0)%3|0?p:o-2|0;g=-1;if((o|0)==-1){break aa}d=0;a=o;g=a+1|0;g=(g>>>0)%3|0?g:a-2|0;if((g|0)!=-1){g=F[k+(g<<2)>>2]}else{g=-1}}o=F[(g<<2)+x>>2];if((o|0)!=-1){b=o+1|0;b=(b>>>0)%3|0?b:o-2|0}if((a|0)==(i|0)|(b|0)==(i|0)|((i|0)!=-1&F[F[q+12>>2]+(i<<2)>>2]!=-1|(a|0)==(b|0))){break l}if(!d&F[F[q+12>>2]+(a<<2)>>2]!=-1){break l}d=-1;o=F[q+12>>2];q=-1;ba:{if((b|0)==-1){break ba}if(F[o+(b<<2)>>2]!=-1){break l}f=b+1|0;f=(f>>>0)%3|0?f:b-2|0;q=-1;if((f|0)==-1){break ba}q=F[k+(f<<2)>>2]}f=L(m,3);F[j>>2]=f;F[o+(f<<2)>>2]=i;F[o+(i<<2)>>2]=f;f=F[j>>2]+1|0;F[o+(f<<2)>>2]=a;F[o+(a<<2)>>2]=f;a=F[j>>2]+2|0;F[o+(a<<2)>>2]=b;F[o+(b<<2)>>2]=a;a=F[j>>2];F[k+(a<<2)>>2]=g;b=a+1|0;f=k+(b<<2)|0;F[f>>2]=q;o=a+2|0;i=k+(o<<2)|0;F[i>>2]=n;a=F[h+120>>2];g=b?g:-1;n=a+(g>>>3&536870908)|0;k=F[n>>2];M=n,N=oi(g)&k,F[M>>2]=N;d=(b|0)!=-1?F[f>>2]:d;b=a+(d>>>3&536870908)|0;g=F[b>>2];M=b,N=oi(d)&g,F[M>>2]=N;b=-1;b=(o|0)!=-1?F[i>>2]:b;a=a+(b>>>3&536870908)|0;g=F[a>>2];M=a,N=oi(b)&g,F[M>>2]=N;D[j+88|0]=1;wd(e,j+88|0);Ma(l,j);m=m+1|0;g=F[j+64>>2];break _}b=F[h+64>>2];a=F[h+68>>2];if((b|0)==a<<5){if((b+1|0)<0){break h}if(b>>>0<=1073741822){a=a<<6;b=(b&-32)+32|0;a=a>>>0>b>>>0?a:b}else{a=2147483647}$a(e,a);b=F[h+64>>2]}F[h+64>>2]=b+1;a=F[h+60>>2]+(b>>>3&536870908)|0;d=F[a>>2];M=a,N=oi(b)&d,F[M>>2]=N;b=F[h+76>>2];if((b|0)!=F[h+80>>2]){F[b>>2]=i;F[h+76>>2]=b+4;break _}f=F[l>>2];a=b-f|0;o=a>>2;d=o+1|0;if(d>>>0>=1073741824){break g}n=a>>>1|0;n=a>>>0>=2147483644?1073741823:d>>>0>>0?n:d;if(n){if(n>>>0>=1073741824){break j}a=ka(n<<2)}else{a=0}d=a+(o<<2)|0;F[d>>2]=i;o=d+4|0;if((b|0)!=(f|0)){while(1){d=d-4|0;b=b-4|0;F[d>>2]=F[b>>2];if((b|0)!=(f|0)){continue}break}}F[h+80>>2]=a+(n<<2);F[h+76>>2]=o;F[h+72>>2]=d;if(!f){break _}ja(f)}if((c|0)!=(g|0)){continue}break}a=F[h+8>>2]}f=-1;if(((F[a+4>>2]-F[a>>2]>>2>>>0)/3|0)!=(m|0)){break l}f=F[a+28>>2]-F[a+24>>2]>>2;c=F[j+24>>2];n=F[j+28>>2];if((c|0)==(n|0)){break k}while(1){g=F[c>>2];e=F[a+24>>2];b=f-1|0;d=e+(b<<2)|0;if(F[d>>2]==-1){while(1){b=f-2|0;f=f-1|0;d=e+(b<<2)|0;if(F[d>>2]==-1){continue}break}}if(b>>>0>=g>>>0){F[j>>2]=a;d=F[d>>2];D[j+12|0]=1;F[j+8>>2]=d;F[j+4>>2]=d;if((d|0)!=-1){while(1){a=F[F[h+8>>2]>>2]+(d<<2)|0;if(F[a>>2]!=(b|0)){f=-1;break l}F[a>>2]=g;nc(j);d=F[j+8>>2];if((d|0)!=-1){continue}break}a=F[h+8>>2]}m=F[a+24>>2];e=m+(b<<2)|0;if((g|0)!=-1){F[m+(g<<2)>>2]=F[e>>2]}F[e>>2]=-1;e=1<>2];g=m+(g>>>3&536870908)|0;d=1<>>3&536870908)|0;if(d&F[m>>2]){b=e|F[g>>2]}else{b=F[g>>2]&(e^-1)}F[g>>2]=b;F[m>>2]=F[m>>2]&(d^-1);f=f-1|0}c=c+4|0;if((n|0)!=(c|0)){continue}break}}c=F[j+24>>2]}if(c){ja(c)}a=F[j+48>>2];if(a){while(1){c=F[a>>2];ja(a);a=c;if(a){continue}break}}a=F[j+40>>2];F[j+40>>2]=0;if(a){ja(a)}a=F[j+64>>2];if(a){F[j+68>>2]=a;ja(a)}Z=j+96|0;a=f;break f}oa();v()}na();v()}na();v()}na();v()}b=a;if((a|0)==-1){break e}a=C;c=F[a+16>>2];g=c+F[a>>2]|0;c=F[a+8>>2]-c|0;a=F[F[h+4>>2]+32>>2];E[a+38>>1]=H[a+38>>1];F[a>>2]=g;F[a+16>>2]=0;F[a+20>>2]=0;F[a+8>>2]=c;F[a+12>>2]=0;ca:{if(F[h+216>>2]==F[h+220>>2]){break ca}a=F[h+8>>2];if(F[a+4>>2]==F[a>>2]){break ca}c=0;while(1){if(Ad(h,c)){c=c+3|0;a=F[h+8>>2];if(c>>>0>2]-F[a>>2]>>2>>>0){continue}break ca}break}break e}if(G[h+308|0]){D[h+308|0]=0;g=F[h+292>>2];a=0;e=F[h+304>>2]+7|0;a=e>>>0<7?1:a;c=a>>>3|0;m=a<<29|e>>>3;a=m+F[h+288>>2]|0;e=c+g|0;F[h+288>>2]=a;F[h+292>>2]=a>>>0>>0?e+1|0:e}c=F[h+216>>2];if((c|0)!=F[h+220>>2]){a=0;while(1){e=L(a,144);Zc((e+c|0)+4|0,F[h+8>>2]);g=F[y>>2];m=g+e|0;c=F[m+132>>2];m=F[m+136>>2];if((c|0)!=(m|0)){while(1){Xc((e+F[y>>2]|0)+4|0,F[c>>2]);c=c+4|0;if((m|0)!=(c|0)){continue}break}g=F[y>>2]}if(!Yc((g+e|0)+4|0)){break e}a=a+1|0;c=F[h+216>>2];if(a>>>0<(F[h+220>>2]-c|0)/144>>>0){continue}break}}a=F[h+8>>2];Hb(h+184|0,F[a+28>>2]-F[a+24>>2]>>2);g=F[h+216>>2];if((g|0)!=F[h+220>>2]){c=0;while(1){a=L(c,144)+g|0;g=F[a+60>>2]-F[a+56>>2]>>2;e=a+104|0;a=F[h+8>>2];a=F[a+28>>2]-F[a+24>>2]>>2;Hb(e,(a|0)<(g|0)?g:a);c=c+1|0;g=F[h+216>>2];if(c>>>0<(F[h+220>>2]-g|0)/144>>>0){continue}break}}K=zd(h,b)}}Z=t- -64|0;return K|0}function Cf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0,H=0,I=0,J=0,K=0,M=0,N=0,O=0;B=c;c=0;m=Z-96|0;Z=m;l=m+16|0;ma(l,0,76);F[m+92>>2]=-1;F[m+8>>2]=0;F[m>>2]=0;F[m+4>>2]=0;r=Z-16|0;Z=r;F[l+68>>2]=0;F[l+72>>2]=0;F[l>>2]=b;s=Z-16|0;Z=s;u=b;a=F[b+20>>2];a:{if((F[b+24>>2]-a|0)<=0){break a}a=F[a>>2];if((a|0)==-1){break a}c=F[F[u+8>>2]+(a<<2)>>2]}b:{c:{d:{if(!c){a=0;break d}a=F[u+100>>2];e=F[u+96>>2];F[s+8>>2]=0;F[s>>2]=0;F[s+4>>2]=0;f=a-e|0;b=(f|0)/12|0;e:{if((a|0)==(e|0)){break e}if(b>>>0>=357913942){break c}d=ka(f);F[s>>2]=d;F[s+8>>2]=d+L(b,12);a=0;n=d;f=f-12|0;d=(f-((f>>>0)%12|0)|0)+12|0;f=ma(n,0,d);F[s+4>>2]=d+f;if(G[c+84|0]){c=b>>>0<=1?1:b;h=c&1;if(b>>>0>=2){g=c&-2;c=0;while(1){d=L(a,12);b=d+e|0;i=F[b+4>>2];j=F[b>>2];d=d+f|0;F[d+8>>2]=F[b+8>>2];F[d>>2]=j;F[d+4>>2]=i;d=L(a|1,12);b=d+e|0;i=F[b+4>>2];j=F[b>>2];d=d+f|0;F[d+8>>2]=F[b+8>>2];F[d>>2]=j;F[d+4>>2]=i;a=a+2|0;c=c+2|0;if((g|0)!=(c|0)){continue}break}}if(!h){break e}b=L(a,12);a=b+e|0;c=F[a+4>>2];e=F[a>>2];b=b+f|0;F[b+8>>2]=F[a+8>>2];F[b>>2]=e;F[b+4>>2]=c;break e}h=b>>>0<=1?1:b;a=F[c+68>>2];c=0;while(1){d=L(c,12);b=d+e|0;g=F[a+(F[b>>2]<<2)>>2];i=F[a+(F[b+4>>2]<<2)>>2];d=d+f|0;F[d+8>>2]=F[a+(F[b+8>>2]<<2)>>2];F[d+4>>2]=i;F[d>>2]=g;c=c+1|0;if((h|0)!=(c|0)){continue}break}}d=0;H=Z-16|0;Z=H;h=ka(88);Zb(h);C=Z-16|0;Z=C;F[h+80>>2]=0;F[h+84>>2]=0;a=F[h+76>>2];F[h+76>>2]=0;if(a){ja(a)}F[h+68>>2]=0;F[h+72>>2]=0;b=h- -64|0;a=F[b>>2];F[b>>2]=0;if(a){ja(a)}g=F[s+4>>2];b=F[s>>2];c=(g-b|0)/12|0;a=L(c,3);f=F[h>>2];e=F[h+4>>2]-f>>2;f:{if(a>>>0>e>>>0){nd(h,a-e|0);g=F[s+4>>2];b=F[s>>2];c=(g-b|0)/12|0;break f}if(a>>>0>=e>>>0){break f}F[h+4>>2]=f+(a<<2)}g:{if((b|0)==(g|0)){break g}e=c>>>0<=1?1:c;g=e&1;a=F[h>>2];if(c>>>0>=2){i=e&-2;c=0;while(1){e=L(d,12);j=e+a|0;f=b+e|0;F[j>>2]=F[f>>2];F[a+(e|4)>>2]=F[f+4>>2];F[j+8>>2]=F[f+8>>2];f=L(d|1,12);e=f+a|0;f=b+f|0;F[e>>2]=F[f>>2];F[e+4>>2]=F[f+4>>2];F[e+8>>2]=F[f+8>>2];d=d+2|0;c=c+2|0;if((i|0)!=(c|0)){continue}break}}if(!g){break g}c=L(d,12);a=c+a|0;b=b+c|0;F[a>>2]=F[b>>2];F[a+4>>2]=F[b+4>>2];F[a+8>>2]=F[b+8>>2]}F[C+12>>2]=-1;a=0;e=0;g=0;f=Z-32|0;Z=f;h:{i:{w=C+12|0;j:{if(!w){break j}c=F[h+4>>2];j=F[h>>2];d=c-j|0;i=d>>2;n=F[h+12>>2];b=F[h+16>>2]-n>>2;k:{if(i>>>0>b>>>0){ab(h+12|0,i-b|0,10228);c=F[h+4>>2];j=F[h>>2];d=c-j|0;i=d>>2;break k}if(b>>>0<=i>>>0){break k}F[h+16>>2]=n+(i<<2)}F[f+24>>2]=0;F[f+16>>2]=0;F[f+20>>2]=0;b=(c|0)==(j|0);if(!b){if((d|0)<0){break i}e=ka(d);F[f+20>>2]=e;F[f+16>>2]=e;F[f+24>>2]=(i<<2)+e}l:{m:{n:{o:{p:{if(d){while(1){i=F[(a<<2)+j>>2];b=F[f+20>>2]-e>>2;q:{if(i>>>0>>0){break q}F[f>>2]=0;d=i+1|0;if(d>>>0>b>>>0){Fa(f+16|0,d-b|0,f);j=F[h>>2];c=F[h+4>>2];e=F[f+16>>2];break q}if(b>>>0<=d>>>0){break q}F[f+20>>2]=(d<<2)+e}b=(i<<2)+e|0;F[b>>2]=F[b>>2]+1;a=a+1|0;d=c-j|0;i=d>>2;if(a>>>0>>0){continue}break}break p}d=0;if(!b){break o}break n}if((c|0)==(j|0)){d=0;break n}if(d>>>0>=2147483645){break m}}d=ka(d<<1);ma(d,255,i<<3)}F[f+8>>2]=0;F[f>>2]=0;F[f+4>>2]=0;b=F[f+20>>2];a=b-e|0;t=a>>2;r:{s:{if((b|0)==(e|0)){break s}if((a|0)<0){break r}q=ka(a);F[f>>2]=q;F[f+8>>2]=(t<<2)+q;b=ma(q,0,a);F[f+4>>2]=b+a;c=t>>>0<=1?1:t;n=c&3;a=0;if(c-1>>>0>=3){o=c&-4;while(1){c=g<<2;F[c+b>>2]=a;x=c|4;a=F[c+e>>2]+a|0;F[x+b>>2]=a;y=c|8;a=a+F[e+x>>2]|0;F[y+b>>2]=a;c=c|12;a=a+F[e+y>>2]|0;F[c+b>>2]=a;a=a+F[c+e>>2]|0;g=g+4|0;p=p+4|0;if((o|0)!=(p|0)){continue}break}}if(!n){break s}while(1){c=g<<2;F[c+b>>2]=a;g=g+1|0;a=F[c+e>>2]+a|0;k=k+1|0;if((n|0)!=(k|0)){continue}break}}if(!i){break l}x=F[h+40>>2];y=F[h+12>>2];n=0;while(1){I=n<<2;a=I+j|0;k=-1;c=n+1|0;b=(c>>>0)%3|0?c:n-2|0;if((b|0)!=-1){k=F[(b<<2)+j>>2]}b=F[a>>2];t:{u:{if(!((n>>>0)%3|0)){p=-1;a=n+2|0;if((a|0)!=-1){p=F[(a<<2)+j>>2]}if(!((b|0)==(k|0)|(b|0)==(p|0))&(k|0)!=(p|0)){break u}x=x+1|0;F[h+40>>2]=x;c=n+3|0;break t}p=F[a-4>>2]}a=p<<2;A=F[a+e>>2];v:{w:{if((A|0)<=0){break w}a=F[a+q>>2];g=0;while(1){o=(a<<3)+d|0;z=F[o>>2];if((z|0)==-1){break w}x:{if((k|0)!=(z|0)){break x}o=F[o+4>>2];if((o|0)!=-1){z=F[(o<<2)+j>>2]}else{z=-1}if((z|0)==(b|0)){break x}while(1){y:{b=a;g=g+1|0;if((A|0)<=(g|0)){break y}a=b+1|0;J=(a<<3)+d|0;z=F[J>>2];K=(b<<3)+d|0;F[K+4>>2]=F[J+4>>2];F[K>>2]=z;if((z|0)!=-1){continue}}break}F[(b<<3)+d>>2]=-1;if((o|0)==-1){break w}F[y+I>>2]=o;F[y+(o<<2)>>2]=n;break v}a=a+1|0;g=g+1|0;if((A|0)!=(g|0)){continue}break}}a=k<<2;k=F[a+e>>2];if((k|0)<=0){break v}a=F[a+q>>2];g=0;while(1){b=(a<<3)+d|0;if(F[b>>2]==-1){F[b>>2]=p;F[b+4>>2]=n;break v}a=a+1|0;g=g+1|0;if((k|0)!=(g|0)){continue}break}}}n=c;if(n>>>0>>0){continue}break}break l}break i}na();v()}F[w>>2]=t;if(q){ja(q)}if(d){ja(d)}a=F[f+16>>2];if(!a){break j}F[f+20>>2]=a;ja(a)}Z=f+32|0;x=(w|0)!=0;if(x){k=Z-32|0;Z=k;a=F[h>>2];g=F[h+4>>2];F[k+24>>2]=0;F[k+16>>2]=0;F[k+20>>2]=0;if((a|0)==(g|0)){c=g}else{a=g-a|0;if((a|0)<0){break i}a=a>>2;b=(a-1>>>5|0)+1|0;c=ka(b<<2);F[k+24>>2]=b;F[k+20>>2]=0;F[k+16>>2]=c;Yb(k+16|0,a);g=F[h>>2];c=F[h+4>>2]}F[k+8>>2]=0;F[k>>2]=0;while(1){z:{o=0;i=0;if((c|0)==(g|0)){break z}while(1){b=F[k+16>>2];A:{if(F[b+(i>>>3&536870908)>>2]>>>i&1){break A}c=F[k>>2];F[k+4>>2]=c;e=F[h+12>>2];a=i;while(1){B:{f=a+1|0;d=a;a=(f>>>0)%3|0?f:a-2|0;if((a|0)==-1){break B}a=F[e+(a<<2)>>2];if((a|0)==-1){break B}f=a+1|0;a=(f>>>0)%3|0?f:a-2|0;if((i|0)==(a|0)|(a|0)==-1){break B}if(!(F[b+(a>>>3&536870908)>>2]>>>a&1)){continue}}break}j=d;C:{D:{E:{while(1){a=F[k+16>>2]+(j>>>3&536870908)|0;F[a>>2]=F[a>>2]|1<>>0)%3|0?a:j-2|0;g=F[h>>2];y=(j>>>0)%3|0;b=(y?-1:2)+j|0;n=F[k>>2];A=(n|0)==(c|0);F:{if(A){break F}w=F[(f<<2)+g>>2];q=F[h+12>>2];a=n;if((b|0)!=-1){e=q+(b<<2)|0;while(1){G:{if((w|0)!=F[a>>2]){break G}p=F[a+4>>2];t=F[e>>2];if((p|0)==(t|0)){break G}e=b;c=-1;a=-1;if((p|0)==-1){break C}break D}a=a+8|0;if((c|0)!=(a|0)){continue}break}break F}while(1){if((w|0)==F[a>>2]){t=-1;e=-1;p=F[a+4>>2];if((p|0)!=-1){break D}}a=a+8|0;if((c|0)!=(a|0)){continue}break}}b=F[(b<<2)+g>>2];H:{if(F[k+8>>2]!=(c|0)){F[c>>2]=b;F[c+4>>2]=f;c=c+8|0;F[k+4>>2]=c;break H}a=c-n|0;p=a>>3;e=p+1|0;if(e>>>0>=536870912){break i}g=a>>>2|0;g=a>>>0>=2147483640?536870911:e>>>0>>0?g:e;if(g){if(g>>>0>=536870912){break E}e=ka(g<<3)}else{e=0}a=e+(p<<3)|0;F[a>>2]=b;F[a+4>>2]=f;b=a+8|0;if(!A){while(1){c=c-8|0;f=F[c+4>>2];a=a-8|0;F[a>>2]=F[c>>2];F[a+4>>2]=f;if((c|0)!=(n|0)){continue}break}c=F[k>>2]}F[k+8>>2]=e+(g<<3);F[k+4>>2]=b;F[k>>2]=a;if(c){ja(c)}c=b}I:{J:{if(y){a=j-1|0;break J}a=j+2|0;if((a|0)==-1){break I}}a=F[F[h+12>>2]+(a<<2)>>2];if((a|0)==-1){break I}j=a+((a>>>0)%3|0?-1:2)|0;if((d|0)==(j|0)){break I}if((j|0)!=-1){continue}}break}g=F[h>>2];break A}oa();v()}c=F[q+(p<<2)>>2];b=e;a=p}if((t|0)!=-1){F[q+(t<<2)>>2]=-1}if((c|0)!=-1){F[q+(c<<2)>>2]=-1}F[q+(b<<2)>>2]=-1;F[q+(a<<2)>>2]=-1;o=1}i=i+1|0;c=F[h+4>>2];if(i>>>0>2>>>0){continue}break}if(o){continue}}break}a=F[k>>2];if(a){ja(a)}a=F[k+16>>2];if(a){ja(a)}Z=k+32|0;n=0;g=Z-32|0;Z=g;e=F[C+12>>2];F[h+36>>2]=e;p=h+24|0;b=F[h+24>>2];a=F[h+28>>2]-b>>2;K:{L:{if(a>>>0>>0){ab(p,e-a|0,10228);F[g+24>>2]=0;F[g+16>>2]=0;F[g+20>>2]=0;break L}if(a>>>0>e>>>0){F[h+28>>2]=b+(e<<2)}F[g+24>>2]=0;F[g+16>>2]=0;F[g+20>>2]=0;if(!e){break K}}if((e|0)<0){break i}a=(e-1>>>5|0)+1|0;b=ka(a<<2);F[g+24>>2]=a;F[g+20>>2]=0;F[g+16>>2]=b;Yb(g+16|0,e)}a=F[h>>2];b=F[h+4>>2];F[g+8>>2]=0;F[g>>2]=0;F[g+4>>2]=0;M:{if((a|0)==(b|0)){a=b}else{a=b-a|0;if((a|0)<0){break i}a=a>>2;b=(a-1>>>5|0)+1|0;c=ka(b<<2);F[g+8>>2]=b;F[g+4>>2]=0;F[g>>2]=c;Yb(g,a);b=F[h>>2];a=F[h+4>>2]}if(a-b>>>0<12){break M}N:{while(1){q=L(n,3);d=(q<<2)+b|0;f=F[d>>2];c=-1;i=q+1|0;if((i|0)!=-1){c=F[(i<<2)+b>>2]}O:{if((c|0)==(f|0)){break O}i=f;f=F[d+8>>2];if((i|0)==(f|0)|(c|0)==(f|0)){break O}k=0;i=F[g>>2];while(1){f=k+q|0;if(!(F[(f>>>3&536870908)+i>>2]>>>f&1)){a=F[(f<<2)+b>>2];c=1<>2];b=a>>>5|0;i=F[d+(b<<2)>>2];t=c&i;if(t){c=F[h+28>>2];P:{if((c|0)!=F[h+32>>2]){F[c>>2]=-1;F[h+28>>2]=c+4;break P}i=F[p>>2];b=c-i|0;o=b>>2;d=o+1|0;if(d>>>0>=1073741824){break i}j=b>>>1|0;j=b>>>0>=2147483644?1073741823:d>>>0>>0?j:d;if(j){if(j>>>0>=1073741824){break N}b=ka(j<<2)}else{b=0}d=b+(o<<2)|0;F[d>>2]=-1;o=d+4|0;if((c|0)!=(i|0)){while(1){d=d-4|0;c=c-4|0;F[d>>2]=F[c>>2];if((c|0)!=(i|0)){continue}break}}F[h+32>>2]=b+(j<<2);F[h+28>>2]=o;F[h+24>>2]=d;if(!i){break P}ja(i)}c=F[h+52>>2];Q:{if((c|0)!=F[h+56>>2]){F[c>>2]=a;F[h+52>>2]=c+4;break Q}i=F[h+48>>2];b=c-i|0;o=b>>2;d=o+1|0;if(d>>>0>=1073741824){break i}j=b>>>1|0;j=b>>>0>=2147483644?1073741823:d>>>0>>0?j:d;if(j){if(j>>>0>=1073741824){break N}b=ka(j<<2)}else{b=0}d=b+(o<<2)|0;F[d>>2]=a;a=d+4|0;if((c|0)!=(i|0)){while(1){d=d-4|0;c=c-4|0;F[d>>2]=F[c>>2];if((c|0)!=(i|0)){continue}break}}F[h+56>>2]=b+(j<<2);F[h+52>>2]=a;F[h+48>>2]=d;if(!i){break Q}ja(i)}c=F[g+20>>2];a=F[g+24>>2];if((c|0)==a<<5){if((c+1|0)<0){break i}b=g+16|0;if(c>>>0<=1073741822){a=a<<6;c=(c&-32)+32|0;a=a>>>0>c>>>0?a:c}else{a=2147483647}$a(b,a);c=F[g+20>>2]}F[g+20>>2]=c+1;d=F[g+16>>2];a=d+(c>>>3&536870908)|0;b=F[a>>2];N=a,O=oi(c)&b,F[N>>2]=O;c=1<>>5|0;i=F[(b<<2)+d>>2];a=e;e=a+1|0}F[(b<<2)+d>>2]=c|i;o=F[h+24>>2]+(a<<2)|0;j=F[h+12>>2];b=F[h>>2];i=F[g>>2];c=f;R:{S:{T:{while(1){if((c|0)==-1){break T}d=(c>>>3&536870908)+i|0;F[d>>2]=F[d>>2]|1<>2]=c;if(t){F[(c<<2)+b>>2]=a}w=c+1|0;c=(w>>>0)%3|0?w:c-2|0;d=-1;U:{if((c|0)==-1){break U}c=F[j+(c<<2)>>2];d=-1;if((c|0)==-1){break U}d=c+1|0;d=(d>>>0)%3|0?d:c-2|0}c=d;if((f|0)!=(c|0)){continue}break}if((f|0)!=-1){break R}c=1;break S}if((f>>>0)%3|0){c=f-1|0;break S}c=f+2|0;if((c|0)==-1){break R}}c=F[j+(c<<2)>>2];if((c|0)==-1){break R}V:{if((c>>>0)%3|0){c=c-1|0;break V}c=c+2|0;if((c|0)==-1){break R}}f=F[h+12>>2];b=F[h>>2];while(1){d=(c>>>3&536870908)+i|0;F[d>>2]=F[d>>2]|1<>2]=a}W:{if((c>>>0)%3|0){c=c-1|0;break W}c=c+2|0;if((c|0)==-1){break R}}c=F[f+(c<<2)>>2];if((c|0)==-1){break R}c=c+((c>>>0)%3|0?-1:2)|0;if((c|0)!=-1){continue}break}}}k=k+1|0;if((k|0)!=3){continue}break}b=F[h>>2];a=F[h+4>>2]}n=n+1|0;if(n>>>0<(a-b>>2>>>0)/3>>>0){continue}break}break M}oa();v()}c=0;F[h+44>>2]=0;a=F[g+16>>2];b=F[g+20>>2];if(b){e=b&31;b=(b>>>3&536870908)+a|0;d=a;i=0;while(1){if(!(F[d>>2]>>>c&1)){i=i+1|0;F[h+44>>2]=i}f=(c|0)==31;c=f?0:c+1|0;d=(f<<2)+d|0;if((b|0)!=(d|0)|(c|0)!=(e|0)){continue}break}}b=F[g>>2];if(b){ja(b);a=F[g+16>>2]}if(a){ja(a)}Z=g+32|0}Z=C+16|0;if(!x){F[H+8>>2]=0;Za(h);h=0}Z=H+16|0;a=h;break h}na();v()}b=F[s>>2];if(!b){break d}F[s+4>>2]=b;ja(b)}Z=s+16|0;break b}na();v()}c=F[l+4>>2];b=a;F[l+4>>2]=a;if(c){Za(c);b=F[l+4>>2]}X:{if(!b){break X}a=F[u+100>>2];c=F[u+96>>2];D[r+12|0]=0;Ea(l+56|0,(a-c|0)/12|0,r+12|0);a=F[u+100>>2];c=F[u+96>>2];if((a|0)==(c|0)){break X}while(1){if(!(F[F[l+56>>2]+(E>>>3&536870908)>>2]>>>E&1)){a=L(E,3);Vb(l,0,a);c=F[l+8>>2];e=F[l+12>>2];Vb(l,1,a+1|0);f=F[l+20>>2];d=F[l+24>>2];Vb(l,2,a+2|0);n=(c|0)==(e|0)?-1:0;a=d-f>>2;c=e-c>>2;e=a>>>0>c>>>0;c=F[l+36>>2]-F[l+32>>2]>>2>>>0>(e?a:c)>>>0?2:e?1:n;Y:{if(F[l+68>>2]<=0){break Y}F[r+12>>2]=F[l+76>>2];F[r+8>>2]=m;Qa(r+8|0,r+12|0);a=F[((c<<2)+l|0)+44>>2];if((a|0)<0){a=-1}else{e=(a>>>0)/3|0;a=F[(F[F[l>>2]+96>>2]+L(e,12)|0)+(a-L(e,3)<<2)>>2]}F[r+12>>2]=a;F[r+8>>2]=m;Qa(r+8|0,r+12|0);e=F[l+72>>2];F[l+72>>2]=e+2;if(!(e&1)){break Y}F[r+12>>2]=a;F[r+8>>2]=m;Qa(r+8|0,r+12|0);F[l+72>>2]=F[l+72>>2]+1}d=0;e=Z-16|0;Z=e;F[l+68>>2]=F[l+68>>2]+1;a=L(c,12)+l|0;a=F[a+12>>2]-F[a+8>>2]|0;if((a|0)>0){a=a>>>2|0;h=a>>>0<=1?1:a;c=F[((c<<2)+l|0)+44>>2];while(1){a=c;f=(a>>>0)/3|0;c=(a|0)==-1;g=c?-1:f;i=F[l+56>>2]+(g>>>3&536870908)|0;F[i>>2]=F[i>>2]|1<>2]=F[l+72>>2]+1;Z:{_:{$:{aa:{ba:{if(!d){ca:{if((a|0)>=0){F[e+12>>2]=F[(F[F[l>>2]+96>>2]+L(f,12)|0)+((a>>>0)%3<<2)>>2];F[e+8>>2]=m;Qa(e+8|0,e+12|0);break ca}F[e+12>>2]=-1;F[e+8>>2]=m;Qa(e+8|0,e+12|0);if(c){break ba}}c=-1;f=a+1|0;f=(f>>>0)%3|0?f:a-2|0;if((f|0)>=0){g=(f>>>0)/3|0;f=F[(F[F[l>>2]+96>>2]+L(g,12)|0)+(f-L(g,3)<<2)>>2]}else{f=-1}F[e+12>>2]=f;F[e+8>>2]=m;Qa(e+8|0,e+12|0);f=((a>>>0)%3|0?-1:2)+a|0;if((f|0)<0){break aa}c=(f>>>0)/3|0;c=F[(F[F[l>>2]+96>>2]+L(c,12)|0)+(f-L(c,3)<<2)>>2];break aa}c=(a|0)<0?-1:F[(F[F[l>>2]+96>>2]+L(f,12)|0)+((a>>>0)%3<<2)>>2];F[l+76>>2]=c;F[e+12>>2]=c;F[e+8>>2]=m;Qa(e+8|0,e+12|0);if(d&1){c=-1;if((a|0)==-1){break Z}if((L(f,3)|0)!=(a|0)){a=a-1|0;break _}a=a+2|0;break $}c=-1;if((a|0)==-1){break Z}c=a+1|0;a=(c>>>0)%3|0?c:a-2|0;break $}c=-1;F[e+12>>2]=-1;F[e+8>>2]=m;Qa(e+8|0,e+12|0)}F[l+76>>2]=c;F[e+12>>2]=c;F[e+8>>2]=m;Qa(e+8|0,e+12|0)}c=-1;if((a|0)==-1){break Z}}c=F[F[F[l+4>>2]+12>>2]+(a<<2)>>2]}d=d+1|0;if((h|0)!=(d|0)){continue}break}}Z=e+16|0;c=F[u+96>>2];a=F[u+100>>2]}E=E+1|0;if(E>>>0<(a-c|0)/12>>>0){continue}break}}Z=r+16|0;da:{if(b){a=F[B>>2];if(a){F[B+4>>2]=a;ja(a)}F[B>>2]=F[m>>2];F[B+4>>2]=F[m+4>>2];F[B+8>>2]=F[m+8>>2];M=F[m+84>>2];break da}a=F[m>>2];if(!a){break da}F[m+4>>2]=a;ja(a)}a=F[m+72>>2];if(a){ja(a)}a=F[m+48>>2];if(a){F[m+52>>2]=a;ja(a)}a=F[m+36>>2];if(a){F[m+40>>2]=a;ja(a)}a=F[m+24>>2];if(a){F[m+28>>2]=a;ja(a)}a=F[m+20>>2];F[m+20>>2]=0;if(a){Za(a)}Z=m+96|0;return M|0}function sf(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;i=b;a=0;b=0;a:{b:{switch(d-1|0){case 0:j=F[i+80>>2];h=G[c+24|0];c:{if((L(j,h)|0)!=(e|0)){break c}d=F[c+28>>2]!=1;b=G[c+84|0];if(!(d|!b)){la(f,F[F[c>>2]>>2]+F[c+48>>2]|0,e);b=1;break c}if(h){a=ka(h);ma(a,0,h)}d:{if(!j){b=1;break d}if(!d){if(h){d=0;e=0;while(1){i=d+f|0;k=F[F[c>>2]>>2];m=F[c+48>>2];g=F[c+40>>2];b=ki(g,F[c+44>>2],G[c+84|0]?e:F[F[c+68>>2]+(e<<2)>>2],0);n=b;b=b+m|0;la(i,la(a,b+k|0,g),h);d=d+h|0;b=1;e=e+1|0;if((j|0)!=(e|0)){continue}break}break d}if(b){b=1;h=F[c>>2];e=F[c+48>>2];f=F[c+40>>2];i=F[c+44>>2];if((j|0)!=1){g=j&-2;c=0;d=0;while(1){k=F[h>>2];m=ki(f,i,c,0)+e|0;k=la(a,k+m|0,f);m=F[h>>2];n=ki(f,i,c|1,0)+e|0;la(k,m+n|0,f);c=c+2|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}g=c}if(!(j&1)){break d}c=F[h>>2];d=ki(g,0,f,i)+e|0;la(a,c+d|0,f);break d}b=1;h=F[c>>2];e=F[c+48>>2];g=F[c+68>>2];f=F[c+40>>2];i=F[c+44>>2];c=0;if((j|0)!=1){k=j&-2;d=0;while(1){m=F[h>>2];n=c<<2;l=ki(f,i,F[n+g>>2],0)+e|0;m=la(a,m+l|0,f);l=F[h>>2];n=ki(f,i,F[g+(n|4)>>2],0)+e|0;la(m,l+n|0,f);c=c+2|0;d=d+2|0;if((k|0)!=(d|0)){continue}break}}if(!(j&1)){break d}d=F[h>>2];c=ki(f,i,F[g+(c<<2)>>2],0)+e|0;la(a,c+d|0,f);break d}b=0;if(!h){d=0;while(1){if(!Cb(c,G[c+84|0]?d:F[F[c+68>>2]+(d<<2)>>2],D[c+24|0],a)){break d}d=d+1|0;b=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}break d}d=0;e=0;while(1){if(!Cb(c,G[c+84|0]?e:F[F[c+68>>2]+(e<<2)>>2],D[c+24|0],a)){break d}la(d+f|0,a,h);d=d+h|0;e=e+1|0;b=j>>>0<=e>>>0;if((e|0)!=(j|0)){continue}break}}if(!a){break c}ja(a)}break a;case 2:n=G[c+24|0];l=n<<1;j=F[i+80>>2];e:{if((L(l,j)|0)!=(e|0)){break e}i=F[c+28>>2]!=3;d=G[c+84|0];if(!(i|!d)){la(f,F[F[c>>2]>>2]+F[c+48>>2]|0,e);a=1;break e}f:{if(!n){e=0;break f}e=ka(l);ma(e,0,l)}g:{if(!j){a=1;break g}if(!i){o=F[c+68>>2];k=F[c>>2];b=F[c+48>>2];i=F[c+40>>2];m=F[c+44>>2];if(n){if(!d){c=0;d=0;while(1){a=1;g=F[k>>2];p=ki(i,m,F[o+(d<<2)>>2],0)+b|0;la((c<<1)+f|0,la(e,g+p|0,i),l);c=c+n|0;d=d+1|0;if((j|0)!=(d|0)){continue}break}break g}c=0;while(1){a=1;o=F[k>>2];p=ki(g,h,i,m)+b|0;la((c<<1)+f|0,la(e,o+p|0,i),l);c=c+n|0;d=h;g=g+1|0;d=g?d:d+1|0;h=d;if((j|0)!=(g|0)|d){continue}break}break g}if(!d){a=1;c=0;if((j|0)!=1){f=j&-2;d=0;while(1){h=F[k>>2];g=c<<2;n=ki(i,m,F[g+o>>2],0)+b|0;h=la(e,h+n|0,i);n=F[k>>2];g=ki(i,m,F[o+(g|4)>>2],0)+b|0;la(h,g+n|0,i);c=c+2|0;d=d+2|0;if((f|0)!=(d|0)){continue}break}}if(!(j&1)){break g}d=F[k>>2];b=ki(i,m,F[o+(c<<2)>>2],0)+b|0;la(e,b+d|0,i);break g}n=j&1;a=1;if((j|0)!=1){j=j&-2;f=0;c=0;while(1){d=F[k>>2];l=ki(g,h,i,m)+b|0;d=la(e,d+l|0,i);l=F[k>>2];o=ki(i,m,g|1,h)+b|0;la(d,l+o|0,i);g=g+2|0;h=g>>>0<2?h+1|0:h;f=f+2|0;d=f>>>0<2?c+1|0:c;c=d;if((f|0)!=(j|0)|c){continue}break}}if(!n){break g}c=F[k>>2];b=ki(g,h,i,m)+b|0;la(e,b+c|0,i);break g}if(!n){d=0;while(1){if(!Ab(c,G[c+84|0]?d:F[F[c+68>>2]+(d<<2)>>2],D[c+24|0],e)){break g}d=d+1|0;a=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}break g}d=0;while(1){if(!Ab(c,G[c+84|0]?d:F[F[c+68>>2]+(d<<2)>>2],D[c+24|0],e)){break g}la((b<<1)+f|0,e,l);b=b+n|0;d=d+1|0;a=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}}if(!e){break e}ja(e)}b=a;break a;case 4:l=G[c+24|0];o=l<<2;j=F[i+80>>2];h:{if((L(o,j)|0)!=(e|0)){break h}i=F[c+28>>2]!=5;d=G[c+84|0];if(!(i|!d)){la(f,F[F[c>>2]>>2]+F[c+48>>2]|0,e);b=1;break h}i:{if(!l){e=0;break i}e=ka(o);ma(e,0,o)}b=1;j:{if(!j){break j}if(!i){a=F[c+68>>2];m=F[c>>2];i=F[c+48>>2];k=F[c+40>>2];n=F[c+44>>2];if(l){if(!d){c=0;d=0;while(1){g=F[m>>2];p=ki(k,n,F[a+(d<<2)>>2],0)+i|0;la((c<<2)+f|0,la(e,g+p|0,k),o);c=c+l|0;d=d+1|0;if((j|0)!=(d|0)){continue}break}break j}c=0;while(1){d=F[m>>2];p=ki(g,h,k,n)+i|0;la((c<<2)+f|0,la(e,d+p|0,k),o);c=c+l|0;g=g+1|0;a=g?h:h+1|0;h=a;if((j|0)!=(g|0)|h){continue}break}break j}if(!d){c=0;if((j|0)!=1){f=j&-2;d=0;while(1){h=F[m>>2];g=c<<2;l=ki(k,n,F[g+a>>2],0)+i|0;h=la(e,h+l|0,k);l=F[m>>2];g=ki(k,n,F[a+(g|4)>>2],0)+i|0;la(h,g+l|0,k);c=c+2|0;d=d+2|0;if((f|0)!=(d|0)){continue}break}}if(!(j&1)){break j}d=F[m>>2];a=ki(k,n,F[a+(c<<2)>>2],0)+i|0;la(e,a+d|0,k);break j}l=j&1;if((j|0)!=1){j=j&-2;f=0;c=0;while(1){a=F[m>>2];d=ki(g,h,k,n)+i|0;a=la(e,a+d|0,k);d=F[m>>2];o=ki(k,n,g|1,h)+i|0;la(a,d+o|0,k);d=h;g=g+2|0;h=g>>>0<2?d+1|0:d;f=f+2|0;a=f>>>0<2?c+1|0:c;c=a;if((f|0)!=(j|0)|c){continue}break}}if(!l){break j}a=F[m>>2];c=ki(g,h,k,n)+i|0;la(e,a+c|0,k);break j}b=0;if(!l){d=0;while(1){if(!yb(c,G[c+84|0]?d:F[F[c+68>>2]+(d<<2)>>2],D[c+24|0],e)){break j}d=d+1|0;b=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}break j}d=0;while(1){if(!yb(c,G[c+84|0]?d:F[F[c+68>>2]+(d<<2)>>2],D[c+24|0],e)){break j}la((a<<2)+f|0,e,o);a=a+l|0;d=d+1|0;b=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}}if(!e){break h}ja(e)}break a;case 1:j=F[i+80>>2];h=G[c+24|0];k:{if((L(j,h)|0)!=(e|0)){break k}d=F[c+28>>2]!=2;b=G[c+84|0];if(!(d|!b)){la(f,F[F[c>>2]>>2]+F[c+48>>2]|0,e);b=1;break k}if(h){a=ka(h);ma(a,0,h)}l:{if(!j){b=1;break l}if(!d){if(h){d=0;e=0;while(1){i=d+f|0;k=F[F[c>>2]>>2];m=F[c+48>>2];g=F[c+40>>2];b=ki(g,F[c+44>>2],G[c+84|0]?e:F[F[c+68>>2]+(e<<2)>>2],0);n=b;b=b+m|0;la(i,la(a,b+k|0,g),h);d=d+h|0;b=1;e=e+1|0;if((j|0)!=(e|0)){continue}break}break l}if(b){b=1;h=F[c>>2];e=F[c+48>>2];f=F[c+40>>2];i=F[c+44>>2];if((j|0)!=1){g=j&-2;c=0;d=0;while(1){k=F[h>>2];m=ki(f,i,c,0)+e|0;k=la(a,k+m|0,f);m=F[h>>2];n=ki(f,i,c|1,0)+e|0;la(k,m+n|0,f);c=c+2|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}g=c}if(!(j&1)){break l}c=F[h>>2];d=ki(g,0,f,i)+e|0;la(a,c+d|0,f);break l}b=1;h=F[c>>2];e=F[c+48>>2];g=F[c+68>>2];f=F[c+40>>2];i=F[c+44>>2];c=0;if((j|0)!=1){k=j&-2;d=0;while(1){m=F[h>>2];n=c<<2;l=ki(f,i,F[n+g>>2],0)+e|0;m=la(a,m+l|0,f);l=F[h>>2];n=ki(f,i,F[g+(n|4)>>2],0)+e|0;la(m,l+n|0,f);c=c+2|0;d=d+2|0;if((k|0)!=(d|0)){continue}break}}if(!(j&1)){break l}d=F[h>>2];c=ki(f,i,F[g+(c<<2)>>2],0)+e|0;la(a,c+d|0,f);break l}b=0;if(!h){d=0;while(1){if(!Bb(c,G[c+84|0]?d:F[F[c+68>>2]+(d<<2)>>2],D[c+24|0],a)){break l}d=d+1|0;b=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}break l}d=0;e=0;while(1){if(!Bb(c,G[c+84|0]?e:F[F[c+68>>2]+(e<<2)>>2],D[c+24|0],a)){break l}la(d+f|0,a,h);d=d+h|0;e=e+1|0;b=j>>>0<=e>>>0;if((e|0)!=(j|0)){continue}break}}if(!a){break k}ja(a)}break a;case 3:n=G[c+24|0];l=n<<1;j=F[i+80>>2];m:{if((L(l,j)|0)!=(e|0)){break m}i=F[c+28>>2]!=4;d=G[c+84|0];if(!(i|!d)){la(f,F[F[c>>2]>>2]+F[c+48>>2]|0,e);a=1;break m}n:{if(!n){e=0;break n}e=ka(l);ma(e,0,l)}o:{if(!j){a=1;break o}if(!i){o=F[c+68>>2];k=F[c>>2];b=F[c+48>>2];i=F[c+40>>2];m=F[c+44>>2];if(n){if(!d){c=0;d=0;while(1){a=1;g=F[k>>2];p=ki(i,m,F[o+(d<<2)>>2],0)+b|0;la((c<<1)+f|0,la(e,g+p|0,i),l);c=c+n|0;d=d+1|0;if((j|0)!=(d|0)){continue}break}break o}c=0;while(1){a=1;o=F[k>>2];p=ki(g,h,i,m)+b|0;la((c<<1)+f|0,la(e,o+p|0,i),l);c=c+n|0;d=h;g=g+1|0;d=g?d:d+1|0;h=d;if((j|0)!=(g|0)|d){continue}break}break o}if(!d){a=1;c=0;if((j|0)!=1){f=j&-2;d=0;while(1){h=F[k>>2];g=c<<2;n=ki(i,m,F[g+o>>2],0)+b|0;h=la(e,h+n|0,i);n=F[k>>2];g=ki(i,m,F[o+(g|4)>>2],0)+b|0;la(h,g+n|0,i);c=c+2|0;d=d+2|0;if((f|0)!=(d|0)){continue}break}}if(!(j&1)){break o}d=F[k>>2];b=ki(i,m,F[o+(c<<2)>>2],0)+b|0;la(e,b+d|0,i);break o}n=j&1;a=1;if((j|0)!=1){j=j&-2;f=0;c=0;while(1){d=F[k>>2];l=ki(g,h,i,m)+b|0;d=la(e,d+l|0,i);l=F[k>>2];o=ki(i,m,g|1,h)+b|0;la(d,l+o|0,i);g=g+2|0;h=g>>>0<2?h+1|0:h;f=f+2|0;d=f>>>0<2?c+1|0:c;c=d;if((f|0)!=(j|0)|c){continue}break}}if(!n){break o}c=F[k>>2];b=ki(g,h,i,m)+b|0;la(e,b+c|0,i);break o}if(!n){d=0;while(1){if(!zb(c,G[c+84|0]?d:F[F[c+68>>2]+(d<<2)>>2],D[c+24|0],e)){break o}d=d+1|0;a=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}break o}d=0;while(1){if(!zb(c,G[c+84|0]?d:F[F[c+68>>2]+(d<<2)>>2],D[c+24|0],e)){break o}la((b<<1)+f|0,e,l);b=b+n|0;d=d+1|0;a=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}}if(!e){break m}ja(e)}b=a;break a;case 5:l=G[c+24|0];o=l<<2;j=F[i+80>>2];p:{if((L(o,j)|0)!=(e|0)){break p}i=F[c+28>>2]!=6;d=G[c+84|0];if(!(i|!d)){la(f,F[F[c>>2]>>2]+F[c+48>>2]|0,e);b=1;break p}q:{if(!l){e=0;break q}e=ka(o);ma(e,0,o)}b=1;r:{if(!j){break r}if(!i){a=F[c+68>>2];m=F[c>>2];i=F[c+48>>2];k=F[c+40>>2];n=F[c+44>>2];if(l){if(!d){c=0;d=0;while(1){g=F[m>>2];p=ki(k,n,F[a+(d<<2)>>2],0)+i|0;la((c<<2)+f|0,la(e,g+p|0,k),o);c=c+l|0;d=d+1|0;if((j|0)!=(d|0)){continue}break}break r}c=0;while(1){d=F[m>>2];p=ki(g,h,k,n)+i|0;la((c<<2)+f|0,la(e,d+p|0,k),o);c=c+l|0;g=g+1|0;a=g?h:h+1|0;h=a;if((j|0)!=(g|0)|h){continue}break}break r}if(!d){c=0;if((j|0)!=1){f=j&-2;d=0;while(1){h=F[m>>2];g=c<<2;l=ki(k,n,F[g+a>>2],0)+i|0;h=la(e,h+l|0,k);l=F[m>>2];g=ki(k,n,F[a+(g|4)>>2],0)+i|0;la(h,g+l|0,k);c=c+2|0;d=d+2|0;if((f|0)!=(d|0)){continue}break}}if(!(j&1)){break r}d=F[m>>2];a=ki(k,n,F[a+(c<<2)>>2],0)+i|0;la(e,a+d|0,k);break r}l=j&1;if((j|0)!=1){j=j&-2;f=0;c=0;while(1){a=F[m>>2];d=ki(g,h,k,n)+i|0;a=la(e,a+d|0,k);d=F[m>>2];o=ki(k,n,g|1,h)+i|0;la(a,d+o|0,k);d=h;g=g+2|0;h=g>>>0<2?d+1|0:d;f=f+2|0;a=f>>>0<2?c+1|0:c;c=a;if((f|0)!=(j|0)|c){continue}break}}if(!l){break r}a=F[m>>2];c=ki(g,h,k,n)+i|0;la(e,a+c|0,k);break r}b=0;if(!l){d=0;while(1){if(!xb(c,G[c+84|0]?d:F[F[c+68>>2]+(d<<2)>>2],D[c+24|0],e)){break r}d=d+1|0;b=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}break r}d=0;while(1){if(!xb(c,G[c+84|0]?d:F[F[c+68>>2]+(d<<2)>>2],D[c+24|0],e)){break r}la((a<<2)+f|0,e,o);a=a+l|0;d=d+1|0;b=j>>>0<=d>>>0;if((d|0)!=(j|0)){continue}break}}if(!e){break p}ja(e)}break a;case 8:p=G[c+24|0];q=p<<2;k=F[i+80>>2];s:{if((L(q,k)|0)!=(e|0)){break s}i=F[c+28>>2];t:{if(!p){break t}a=ka(q);d=a;m=q-4|0;l=(m>>>2|0)+1&7;if(l){e=0;while(1){F[d>>2]=-1073741824;d=d+4|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}if(m>>>0<28){break t}e=(p<<2)+a|0;while(1){F[d+24>>2]=-1073741824;F[d+28>>2]=-1073741824;F[d+16>>2]=-1073741824;F[d+20>>2]=-1073741824;F[d+8>>2]=-1073741824;F[d+12>>2]=-1073741824;F[d>>2]=-1073741824;F[d+4>>2]=-1073741824;d=d+32|0;if((e|0)!=(d|0)){continue}break}}u:{if(!k){b=1;break u}if((i|0)==9){r=F[c+68>>2];l=F[c>>2];i=F[c+48>>2];s=G[c+84|0];m=F[c+44>>2];c=F[c+40>>2];o=c;if(p){e=0;d=0;while(1){h=(e<<2)+f|0;g=F[l>>2];b=ki(c,m,s?d:F[r+(d<<2)>>2],0)+i|0;la(h,la(a,b+g|0,o),q);e=e+p|0;b=1;d=d+1|0;if((k|0)!=(d|0)){continue}break}break u}if(!s){b=1;d=0;if((k|0)!=1){f=k&-2;e=0;while(1){h=F[l>>2];g=d<<2;j=ki(c,m,F[g+r>>2],0)+i|0;h=la(a,h+j|0,o);j=F[l>>2];g=ki(c,m,F[r+(g|4)>>2],0)+i|0;la(h,j+g|0,o);d=d+2|0;e=e+2|0;if((f|0)!=(e|0)){continue}break}}if(!(k&1)){break u}e=F[l>>2];c=ki(c,m,F[r+(d<<2)>>2],0)+i|0;la(a,c+e|0,o);break u}f=k&1;b=1;if((k|0)!=1){k=k&-2;while(1){d=F[l>>2];e=ki(g,h,c,m)+i|0;d=la(a,d+e|0,o);e=F[l>>2];p=ki(c,m,g|1,h)+i|0;la(d,e+p|0,o);g=g+2|0;h=g>>>0<2?h+1|0:h;d=j;e=n+2|0;d=e>>>0<2?d+1|0:d;n=e;j=d;if((e|0)!=(k|0)|d){continue}break}}if(!f){break u}d=F[l>>2];c=ki(g,h,c,m)+i|0;la(a,c+d|0,o);break u}if(!p){d=0;while(1){if(!lb(c,G[c+84|0]?d:F[F[c+68>>2]+(d<<2)>>2],D[c+24|0],a)){break u}d=d+1|0;b=k>>>0<=d>>>0;if((d|0)!=(k|0)){continue}break}break u}e=0;d=0;while(1){if(!lb(c,G[c+84|0]?d:F[F[c+68>>2]+(d<<2)>>2],D[c+24|0],a)){break u}la((e<<2)+f|0,a,q);e=e+p|0;d=d+1|0;b=k>>>0<=d>>>0;if((d|0)!=(k|0)){continue}break}}if(!a){break s}ja(a)}a=b;break;default:break b}}b=a}return b|0}function Pd(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;h=Z-80|0;Z=h;e=F[c+36>>2];F[h+72>>2]=F[c+32>>2];F[h+76>>2]=e;f=F[c+28>>2];e=h- -64|0;F[e>>2]=F[c+24>>2];F[e+4>>2]=f;e=F[c+20>>2];F[h+56>>2]=F[c+16>>2];F[h+60>>2]=e;e=F[c+12>>2];F[h+48>>2]=F[c+8>>2];F[h+52>>2]=e;e=F[c+4>>2];F[h+40>>2]=F[c>>2];F[h+44>>2]=e;jc(a,h+40|0,h+24|0);a:{if(F[a>>2]){break a}if(D[a+15|0]<0){ja(F[a+4>>2])}if(G[h+31|0]!=1){b=ka(32);D[b+20|0]=0;c=G[1446]|G[1447]<<8|(G[1448]<<16|G[1449]<<24);D[b+16|0]=c;D[b+17|0]=c>>>8;D[b+18|0]=c>>>16;D[b+19|0]=c>>>24;c=G[1442]|G[1443]<<8|(G[1444]<<16|G[1445]<<24);d=G[1438]|G[1439]<<8|(G[1440]<<16|G[1441]<<24);D[b+8|0]=d;D[b+9|0]=d>>>8;D[b+10|0]=d>>>16;D[b+11|0]=d>>>24;D[b+12|0]=c;D[b+13|0]=c>>>8;D[b+14|0]=c>>>16;D[b+15|0]=c>>>24;c=G[1434]|G[1435]<<8|(G[1436]<<16|G[1437]<<24);d=G[1430]|G[1431]<<8|(G[1432]<<16|G[1433]<<24);D[b|0]=d;D[b+1|0]=d>>>8;D[b+2|0]=d>>>16;D[b+3|0]=d>>>24;D[b+4|0]=c;D[b+5|0]=c>>>8;D[b+6|0]=c>>>16;D[b+7|0]=c>>>24;F[a>>2]=-1;ra(a+4|0,b,20);ja(b);break a}j=Z-16|0;Z=j;b:{c:{switch(G[h+32|0]){case 0:e=Kd(ka(48));F[e>>2]=9864;F[h+8>>2]=0;F[h+12>>2]=0;F[h>>2]=0;F[h+4>>2]=0;F[h+16>>2]=e;break b;case 1:e=Kd(ka(52));F[e+48>>2]=0;F[e>>2]=8176;F[h+8>>2]=0;F[h+12>>2]=0;F[h>>2]=0;F[h+4>>2]=0;F[h+16>>2]=e;break b;default:break c}}f=ka(32);D[f+28|0]=0;e=G[1520]|G[1521]<<8|(G[1522]<<16|G[1523]<<24);D[f+24|0]=e;D[f+25|0]=e>>>8;D[f+26|0]=e>>>16;D[f+27|0]=e>>>24;e=G[1516]|G[1517]<<8|(G[1518]<<16|G[1519]<<24);g=G[1512]|G[1513]<<8|(G[1514]<<16|G[1515]<<24);D[f+16|0]=g;D[f+17|0]=g>>>8;D[f+18|0]=g>>>16;D[f+19|0]=g>>>24;D[f+20|0]=e;D[f+21|0]=e>>>8;D[f+22|0]=e>>>16;D[f+23|0]=e>>>24;e=G[1508]|G[1509]<<8|(G[1510]<<16|G[1511]<<24);g=G[1504]|G[1505]<<8|(G[1506]<<16|G[1507]<<24);D[f+8|0]=g;D[f+9|0]=g>>>8;D[f+10|0]=g>>>16;D[f+11|0]=g>>>24;D[f+12|0]=e;D[f+13|0]=e>>>8;D[f+14|0]=e>>>16;D[f+15|0]=e>>>24;e=G[1500]|G[1501]<<8|(G[1502]<<16|G[1503]<<24);g=G[1496]|G[1497]<<8|(G[1498]<<16|G[1499]<<24);D[f|0]=g;D[f+1|0]=g>>>8;D[f+2|0]=g>>>16;D[f+3|0]=g>>>24;D[f+4|0]=e;D[f+5|0]=e>>>8;D[f+6|0]=e>>>16;D[f+7|0]=e>>>24;F[j>>2]=-1;e=j|4;ra(e,f,28);k=D[j+15|0];F[h>>2]=F[j>>2];g=h+4|0;d:{if((k|0)>=0){k=F[e+4>>2];F[g>>2]=F[e>>2];F[g+4>>2]=k;F[g+8>>2]=F[e+8>>2];F[h+16>>2]=0;break d}ra(g,F[j+4>>2],F[j+8>>2]);e=D[j+15|0];F[h+16>>2]=0;if((e|0)>=0){break d}ja(F[j+4>>2])}ja(f)}Z=j+16|0;e=F[h>>2];e:{if(e){F[a>>2]=e;a=a+4|0;if(D[h+15|0]>=0){b=h|4;c=F[b+4>>2];F[a>>2]=F[b>>2];F[a+4>>2]=c;F[a+8>>2]=F[b+8>>2];break e}ra(a,F[h+4>>2],F[h+8>>2]);break e}e=F[h+16>>2];F[h+16>>2]=0;F[e+44>>2]=d;f=Z-32|0;Z=f;F[e+32>>2]=c;F[e+40>>2]=b;F[e+4>>2]=d;jc(a,c,f+16|0);f:{if(F[a>>2]){break f}if(D[a+15|0]<0){ja(F[a+4>>2])}b=G[f+23|0];if(($[F[F[e>>2]+8>>2]](e)|0)!=(b|0)){b=ka(64);D[b+50|0]=0;c=G[1304]|G[1305]<<8;D[b+48|0]=c;D[b+49|0]=c>>>8;c=G[1300]|G[1301]<<8|(G[1302]<<16|G[1303]<<24);d=G[1296]|G[1297]<<8|(G[1298]<<16|G[1299]<<24);D[b+40|0]=d;D[b+41|0]=d>>>8;D[b+42|0]=d>>>16;D[b+43|0]=d>>>24;D[b+44|0]=c;D[b+45|0]=c>>>8;D[b+46|0]=c>>>16;D[b+47|0]=c>>>24;c=G[1292]|G[1293]<<8|(G[1294]<<16|G[1295]<<24);d=G[1288]|G[1289]<<8|(G[1290]<<16|G[1291]<<24);D[b+32|0]=d;D[b+33|0]=d>>>8;D[b+34|0]=d>>>16;D[b+35|0]=d>>>24;D[b+36|0]=c;D[b+37|0]=c>>>8;D[b+38|0]=c>>>16;D[b+39|0]=c>>>24;c=G[1284]|G[1285]<<8|(G[1286]<<16|G[1287]<<24);d=G[1280]|G[1281]<<8|(G[1282]<<16|G[1283]<<24);D[b+24|0]=d;D[b+25|0]=d>>>8;D[b+26|0]=d>>>16;D[b+27|0]=d>>>24;D[b+28|0]=c;D[b+29|0]=c>>>8;D[b+30|0]=c>>>16;D[b+31|0]=c>>>24;c=G[1276]|G[1277]<<8|(G[1278]<<16|G[1279]<<24);d=G[1272]|G[1273]<<8|(G[1274]<<16|G[1275]<<24);D[b+16|0]=d;D[b+17|0]=d>>>8;D[b+18|0]=d>>>16;D[b+19|0]=d>>>24;D[b+20|0]=c;D[b+21|0]=c>>>8;D[b+22|0]=c>>>16;D[b+23|0]=c>>>24;c=G[1268]|G[1269]<<8|(G[1270]<<16|G[1271]<<24);d=G[1264]|G[1265]<<8|(G[1266]<<16|G[1267]<<24);D[b+8|0]=d;D[b+9|0]=d>>>8;D[b+10|0]=d>>>16;D[b+11|0]=d>>>24;D[b+12|0]=c;D[b+13|0]=c>>>8;D[b+14|0]=c>>>16;D[b+15|0]=c>>>24;c=G[1260]|G[1261]<<8|(G[1262]<<16|G[1263]<<24);d=G[1256]|G[1257]<<8|(G[1258]<<16|G[1259]<<24);D[b|0]=d;D[b+1|0]=d>>>8;D[b+2|0]=d>>>16;D[b+3|0]=d>>>24;D[b+4|0]=c;D[b+5|0]=c>>>8;D[b+6|0]=c>>>16;D[b+7|0]=c>>>24;F[a>>2]=-1;ra(a+4|0,b,50);ja(b);break f}c=G[f+21|0];D[e+36|0]=c;d=G[f+22|0];D[e+37|0]=d;if((c|0)!=2){b=ka(32);D[b+26|0]=0;c=G[1427]|G[1428]<<8;D[b+24|0]=c;D[b+25|0]=c>>>8;c=G[1423]|G[1424]<<8|(G[1425]<<16|G[1426]<<24);d=G[1419]|G[1420]<<8|(G[1421]<<16|G[1422]<<24);D[b+16|0]=d;D[b+17|0]=d>>>8;D[b+18|0]=d>>>16;D[b+19|0]=d>>>24;D[b+20|0]=c;D[b+21|0]=c>>>8;D[b+22|0]=c>>>16;D[b+23|0]=c>>>24;c=G[1415]|G[1416]<<8|(G[1417]<<16|G[1418]<<24);d=G[1411]|G[1412]<<8|(G[1413]<<16|G[1414]<<24);D[b+8|0]=d;D[b+9|0]=d>>>8;D[b+10|0]=d>>>16;D[b+11|0]=d>>>24;D[b+12|0]=c;D[b+13|0]=c>>>8;D[b+14|0]=c>>>16;D[b+15|0]=c>>>24;c=G[1407]|G[1408]<<8|(G[1409]<<16|G[1410]<<24);d=G[1403]|G[1404]<<8|(G[1405]<<16|G[1406]<<24);D[b|0]=d;D[b+1|0]=d>>>8;D[b+2|0]=d>>>16;D[b+3|0]=d>>>24;D[b+4|0]=c;D[b+5|0]=c>>>8;D[b+6|0]=c>>>16;D[b+7|0]=c>>>24;F[a>>2]=-5;ra(a+4|0,b,26);ja(b);break f}b=b?2:3;if((b|0)!=(d|0)){b=ka(32);D[b+26|0]=0;c=G[1400]|G[1401]<<8;D[b+24|0]=c;D[b+25|0]=c>>>8;c=G[1396]|G[1397]<<8|(G[1398]<<16|G[1399]<<24);d=G[1392]|G[1393]<<8|(G[1394]<<16|G[1395]<<24);D[b+16|0]=d;D[b+17|0]=d>>>8;D[b+18|0]=d>>>16;D[b+19|0]=d>>>24;D[b+20|0]=c;D[b+21|0]=c>>>8;D[b+22|0]=c>>>16;D[b+23|0]=c>>>24;c=G[1388]|G[1389]<<8|(G[1390]<<16|G[1391]<<24);d=G[1384]|G[1385]<<8|(G[1386]<<16|G[1387]<<24);D[b+8|0]=d;D[b+9|0]=d>>>8;D[b+10|0]=d>>>16;D[b+11|0]=d>>>24;D[b+12|0]=c;D[b+13|0]=c>>>8;D[b+14|0]=c>>>16;D[b+15|0]=c>>>24;c=G[1380]|G[1381]<<8|(G[1382]<<16|G[1383]<<24);d=G[1376]|G[1377]<<8|(G[1378]<<16|G[1379]<<24);D[b|0]=d;D[b+1|0]=d>>>8;D[b+2|0]=d>>>16;D[b+3|0]=d>>>24;D[b+4|0]=c;D[b+5|0]=c>>>8;D[b+6|0]=c>>>16;D[b+7|0]=c>>>24;F[a>>2]=-5;ra(a+4|0,b,26);ja(b);break f}E[F[e+32>>2]+38>>1]=b|512;g:{if(E[f+26>>1]>=0){break g}j=Z-16|0;Z=j;d=ka(36);b=d;F[b+4>>2]=0;F[b+8>>2]=0;F[b+24>>2]=0;F[b+28>>2]=0;b=b+16|0;F[b>>2]=0;F[b+4>>2]=0;F[d>>2]=d+4;F[d+32>>2]=0;F[d+12>>2]=b;F[j>>2]=0;c=F[e+32>>2];k=Z-16|0;Z=k;b=0;h:{if(!d){break h}F[j>>2]=c;F[k+12>>2]=0;b=0;if(!fb(1,k+12|0,c)){break h}n=F[k+12>>2];if(n){while(1){i:{if(fb(1,k+8|0,F[j>>2])){b=ka(28);F[b+4>>2]=0;F[b+8>>2]=0;c=b+16|0;F[c>>2]=0;F[c+4>>2]=0;F[b>>2]=b+4;F[b+12>>2]=c;F[b+24>>2]=F[k+8>>2];if(Vc(j,b)){break i}Ca(b+12|0,F[b+16>>2]);Ba(b,F[b+4>>2]);ja(b)}b=0;break h}g=Z-16|0;Z=g;F[g+8>>2]=b;j:{if(!b){break j}c=F[d+28>>2];k:{if(c>>>0>2]){F[g+8>>2]=0;F[c>>2]=b;F[d+28>>2]=c+4;break k}c=0;l:{m:{n:{i=F[d+24>>2];m=F[d+28>>2]-i>>2;b=m+1|0;if(b>>>0<1073741824){i=F[d+32>>2]-i|0;l=i>>>1|0;i=i>>>0>=2147483644?1073741823:b>>>0>>0?l:b;if(i){if(i>>>0>=1073741824){break n}c=ka(i<<2)}l=F[g+8>>2];F[g+8>>2]=0;b=(m<<2)+c|0;F[b>>2]=l;i=(i<<2)+c|0;m=b+4|0;c=F[d+28>>2];l=F[d+24>>2];if((c|0)==(l|0)){break m}while(1){c=c-4|0;p=F[c>>2];F[c>>2]=0;b=b-4|0;F[b>>2]=p;if((c|0)!=(l|0)){continue}break}F[d+32>>2]=i;i=F[d+28>>2];F[d+28>>2]=m;c=F[d+24>>2];F[d+24>>2]=b;if((c|0)==(i|0)){break l}while(1){i=i-4|0;b=F[i>>2];F[i>>2]=0;if(b){Ca(b+12|0,F[b+16>>2]);Ba(b,F[b+4>>2]);ja(b)}if((c|0)!=(i|0)){continue}break}break l}na();v()}oa();v()}F[d+32>>2]=i;F[d+28>>2]=m;F[d+24>>2]=b}if(c){ja(c)}}b=F[g+8>>2];F[g+8>>2]=0;if(!b){break j}Ca(b+12|0,F[b+16>>2]);Ba(b,F[b+4>>2]);ja(b)}Z=g+16|0;o=o+1|0;if((n|0)!=(o|0)){continue}break}}b=Vc(j,d)}Z=k+16|0;o:{if(b){c=F[e+4>>2];b=F[c+4>>2];F[c+4>>2]=d;if(b){ic(b)}F[a>>2]=0;F[a+4>>2]=0;F[a+8>>2]=0;F[a+12>>2]=0;break o}b=ka(32);D[b+26|0]=0;c=G[1549]|G[1550]<<8;D[b+24|0]=c;D[b+25|0]=c>>>8;c=G[1545]|G[1546]<<8|(G[1547]<<16|G[1548]<<24);g=G[1541]|G[1542]<<8|(G[1543]<<16|G[1544]<<24);D[b+16|0]=g;D[b+17|0]=g>>>8;D[b+18|0]=g>>>16;D[b+19|0]=g>>>24;D[b+20|0]=c;D[b+21|0]=c>>>8;D[b+22|0]=c>>>16;D[b+23|0]=c>>>24;c=G[1537]|G[1538]<<8|(G[1539]<<16|G[1540]<<24);g=G[1533]|G[1534]<<8|(G[1535]<<16|G[1536]<<24);D[b+8|0]=g;D[b+9|0]=g>>>8;D[b+10|0]=g>>>16;D[b+11|0]=g>>>24;D[b+12|0]=c;D[b+13|0]=c>>>8;D[b+14|0]=c>>>16;D[b+15|0]=c>>>24;c=G[1529]|G[1530]<<8|(G[1531]<<16|G[1532]<<24);g=G[1525]|G[1526]<<8|(G[1527]<<16|G[1528]<<24);D[b|0]=g;D[b+1|0]=g>>>8;D[b+2|0]=g>>>16;D[b+3|0]=g>>>24;D[b+4|0]=c;D[b+5|0]=c>>>8;D[b+6|0]=c>>>16;D[b+7|0]=c>>>24;F[a>>2]=-1;ra(a+4|0,b,26);ja(b);F[j+8>>2]=0;ic(d)}Z=j+16|0;if(F[a>>2]){break f}if(D[a+15|0]>=0){break g}ja(F[a+4>>2])}if(!($[F[F[e>>2]+12>>2]](e)|0)){b=ka(48);D[b+33|0]=0;D[b+32|0]=G[1374];c=G[1370]|G[1371]<<8|(G[1372]<<16|G[1373]<<24);d=G[1366]|G[1367]<<8|(G[1368]<<16|G[1369]<<24);D[b+24|0]=d;D[b+25|0]=d>>>8;D[b+26|0]=d>>>16;D[b+27|0]=d>>>24;D[b+28|0]=c;D[b+29|0]=c>>>8;D[b+30|0]=c>>>16;D[b+31|0]=c>>>24;c=G[1362]|G[1363]<<8|(G[1364]<<16|G[1365]<<24);d=G[1358]|G[1359]<<8|(G[1360]<<16|G[1361]<<24);D[b+16|0]=d;D[b+17|0]=d>>>8;D[b+18|0]=d>>>16;D[b+19|0]=d>>>24;D[b+20|0]=c;D[b+21|0]=c>>>8;D[b+22|0]=c>>>16;D[b+23|0]=c>>>24;c=G[1354]|G[1355]<<8|(G[1356]<<16|G[1357]<<24);d=G[1350]|G[1351]<<8|(G[1352]<<16|G[1353]<<24);D[b+8|0]=d;D[b+9|0]=d>>>8;D[b+10|0]=d>>>16;D[b+11|0]=d>>>24;D[b+12|0]=c;D[b+13|0]=c>>>8;D[b+14|0]=c>>>16;D[b+15|0]=c>>>24;c=G[1346]|G[1347]<<8|(G[1348]<<16|G[1349]<<24);d=G[1342]|G[1343]<<8|(G[1344]<<16|G[1345]<<24);D[b|0]=d;D[b+1|0]=d>>>8;D[b+2|0]=d>>>16;D[b+3|0]=d>>>24;D[b+4|0]=c;D[b+5|0]=c>>>8;D[b+6|0]=c>>>16;D[b+7|0]=c>>>24;F[a>>2]=-1;ra(a+4|0,b,33);ja(b);break f}if(!($[F[F[e>>2]+20>>2]](e)|0)){b=Eb(f,1552);F[a>>2]=-1;c=a+4|0;if(D[b+11|0]>=0){d=F[b+4>>2];F[c>>2]=F[b>>2];F[c+4>>2]=d;F[c+8>>2]=F[b+8>>2];break f}ra(c,F[b>>2],F[b+4>>2]);if(D[b+11|0]>=0){break f}ja(F[b>>2]);break f}if(!($[F[F[e>>2]+24>>2]](e)|0)){b=Eb(f,1307);F[a>>2]=-1;c=a+4|0;if(D[b+11|0]>=0){d=F[b+4>>2];F[c>>2]=F[b>>2];F[c+4>>2]=d;F[c+8>>2]=F[b+8>>2];break f}ra(c,F[b>>2],F[b+4>>2]);if(D[b+11|0]>=0){break f}ja(F[b>>2]);break f}F[a>>2]=0;F[a+4>>2]=0;F[a+8>>2]=0;F[a+12>>2]=0}Z=f+32|0;if(!F[a>>2]){if(D[a+15|0]<0){ja(F[a+4>>2])}F[a>>2]=0;F[a+4>>2]=0;F[a+8>>2]=0;F[a+12>>2]=0}$[F[F[e>>2]+4>>2]](e)}a=F[h+16>>2];F[h+16>>2]=0;if(a){$[F[F[a>>2]+4>>2]](a)}if(D[h+15|0]>=0){break a}ja(F[h+4>>2])}Z=h+80|0}function Ub(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;l=Z-16|0;Z=l;a:{b:{c:{d:{e:{f:{g:{h:{i:{if(a>>>0<=244){g=F[2941];h=a>>>0<11?16:a+11&-8;c=h>>>3|0;b=g>>>c|0;if(b&3){c=c+((b^-1)&1)|0;a=c<<3;b=a+11804|0;d=F[a+11812>>2];a=F[d+8>>2];j:{if((b|0)==(a|0)){m=11764,n=oi(c)&g,F[m>>2]=n;break j}F[a+12>>2]=b;F[b+8>>2]=a}a=d+8|0;b=c<<3;F[d+4>>2]=b|3;b=b+d|0;F[b+4>>2]=F[b+4>>2]|1;break a}k=F[2943];if(k>>>0>=h>>>0){break i}if(b){a=2<>2];a=F[e+8>>2];k:{if((b|0)==(a|0)){g=oi(d)&g;F[2941]=g;break k}F[a+12>>2]=b;F[b+8>>2]=a}F[e+4>>2]=h|3;c=e+h|0;a=d<<3;d=a-h|0;F[c+4>>2]=d|1;F[a+e>>2]=d;if(k){b=(k&-8)+11804|0;f=F[2946];a=1<<(k>>>3);l:{if(!(a&g)){F[2941]=a|g;a=b;break l}a=F[b+8>>2]}F[b+8>>2]=f;F[a+12>>2]=f;F[f+12>>2]=b;F[f+8>>2]=a}a=e+8|0;F[2946]=c;F[2943]=d;break a}j=F[2942];if(!j){break i}c=F[(ji(0-j&j)<<2)+12068>>2];f=(F[c+4>>2]&-8)-h|0;b=c;while(1){m:{a=F[b+16>>2];if(!a){a=F[b+20>>2];if(!a){break m}}b=(F[a+4>>2]&-8)-h|0;d=b>>>0>>0;f=d?b:f;c=d?a:c;b=a;continue}break}i=F[c+24>>2];d=F[c+12>>2];if((d|0)!=(c|0)){a=F[c+8>>2];F[a+12>>2]=d;F[d+8>>2]=a;break b}b=c+20|0;a=F[b>>2];if(!a){a=F[c+16>>2];if(!a){break h}b=c+16|0}while(1){e=b;d=a;b=a+20|0;a=F[b>>2];if(a){continue}b=d+16|0;a=F[d+16>>2];if(a){continue}break}F[e>>2]=0;break b}h=-1;if(a>>>0>4294967231){break i}a=a+11|0;h=a&-8;j=F[2942];if(!j){break i}f=0-h|0;g=0;n:{if(h>>>0<256){break n}g=31;if(h>>>0>16777215){break n}a=O(a>>>8|0);g=((h>>>38-a&1)-(a<<1)|0)+62|0}b=F[(g<<2)+12068>>2];o:{p:{q:{if(!b){a=0;break q}a=0;c=h<<((g|0)!=31?25-(g>>>1|0)|0:0);while(1){r:{e=(F[b+4>>2]&-8)-h|0;if(e>>>0>=f>>>0){break r}d=b;f=e;if(e){break r}f=0;a=b;break p}e=F[b+20>>2];b=F[((c>>>29&4)+b|0)+16>>2];a=e?(e|0)==(b|0)?a:e:a;c=c<<1;if(b){continue}break}}if(!(a|d)){d=0;a=2<>2]}if(!a){break o}}while(1){b=(F[a+4>>2]&-8)-h|0;c=b>>>0>>0;f=c?b:f;d=c?a:d;b=F[a+16>>2];if(b){a=b}else{a=F[a+20>>2]}if(a){continue}break}}if(!d|F[2943]-h>>>0<=f>>>0){break i}g=F[d+24>>2];c=F[d+12>>2];if((d|0)!=(c|0)){a=F[d+8>>2];F[a+12>>2]=c;F[c+8>>2]=a;break c}b=d+20|0;a=F[b>>2];if(!a){a=F[d+16>>2];if(!a){break g}b=d+16|0}while(1){e=b;c=a;b=a+20|0;a=F[b>>2];if(a){continue}b=c+16|0;a=F[c+16>>2];if(a){continue}break}F[e>>2]=0;break c}a=F[2943];if(a>>>0>=h>>>0){d=F[2946];b=a-h|0;s:{if(b>>>0>=16){c=d+h|0;F[c+4>>2]=b|1;F[a+d>>2]=b;F[d+4>>2]=h|3;break s}F[d+4>>2]=a|3;a=a+d|0;F[a+4>>2]=F[a+4>>2]|1;c=0;b=0}F[2943]=b;F[2946]=c;a=d+8|0;break a}i=F[2944];if(i>>>0>h>>>0){b=i-h|0;F[2944]=b;c=F[2947];a=c+h|0;F[2947]=a;F[a+4>>2]=b|1;F[c+4>>2]=h|3;a=c+8|0;break a}a=0;j=h+47|0;if(F[3059]){c=F[3061]}else{F[3062]=-1;F[3063]=-1;F[3060]=4096;F[3061]=4096;F[3059]=l+12&-16^1431655768;F[3064]=0;F[3052]=0;c=4096}e=j+c|0;f=0-c|0;b=e&f;if(b>>>0<=h>>>0){break a}d=F[3051];if(d){c=F[3049];g=c+b|0;if(d>>>0>>0|c>>>0>=g>>>0){break a}}t:{if(!(G[12208]&4)){u:{v:{w:{x:{d=F[2947];if(d){a=12212;while(1){c=F[a>>2];if(c>>>0<=d>>>0&d>>>0>2]>>>0){break x}a=F[a+8>>2];if(a){continue}break}}c=eb(0);if((c|0)==-1){break u}g=b;d=F[3060];a=d-1|0;if(a&c){g=(b-c|0)+(a+c&0-d)|0}if(g>>>0<=h>>>0){break u}d=F[3051];if(d){a=F[3049];f=a+g|0;if(d>>>0>>0|a>>>0>=f>>>0){break u}}a=eb(g);if((c|0)!=(a|0)){break w}break t}g=f&e-i;c=eb(g);if((c|0)==(F[a>>2]+F[a+4>>2]|0)){break v}a=c}if((a|0)==-1){break u}if(h+48>>>0<=g>>>0){c=a;break t}c=F[3061];c=c+(j-g|0)&0-c;if((eb(c)|0)==-1){break u}g=c+g|0;c=a;break t}if((c|0)!=-1){break t}}F[3052]=F[3052]|4}c=eb(b);a=eb(0);if((c|0)==-1|(a|0)==-1|a>>>0<=c>>>0){break d}g=a-c|0;if(g>>>0<=h+40>>>0){break d}}a=F[3049]+g|0;F[3049]=a;if(a>>>0>I[3050]){F[3050]=a}y:{e=F[2947];if(e){a=12212;while(1){d=F[a>>2];b=F[a+4>>2];if((d+b|0)==(c|0)){break y}a=F[a+8>>2];if(a){continue}break}break f}a=F[2945];if(!(a>>>0<=c>>>0?a:0)){F[2945]=c}a=0;F[3054]=g;F[3053]=c;F[2949]=-1;F[2950]=F[3059];F[3056]=0;while(1){d=a<<3;b=d+11804|0;F[d+11812>>2]=b;F[d+11816>>2]=b;a=a+1|0;if((a|0)!=32){continue}break}d=g-40|0;a=c+8&7?-8-c&7:0;b=d-a|0;F[2944]=b;a=a+c|0;F[2947]=a;F[a+4>>2]=b|1;F[(c+d|0)+4>>2]=40;F[2948]=F[3063];break e}if(G[a+12|0]&8|d>>>0>e>>>0|c>>>0<=e>>>0){break f}F[a+4>>2]=b+g;a=e+8&7?-8-e&7:0;c=a+e|0;F[2947]=c;b=F[2944]+g|0;a=b-a|0;F[2944]=a;F[c+4>>2]=a|1;F[(b+e|0)+4>>2]=40;F[2948]=F[3063];break e}d=0;break b}c=0;break c}if(I[2945]>c>>>0){F[2945]=c}b=c+g|0;a=12212;z:{A:{B:{C:{D:{E:{while(1){if((b|0)!=F[a>>2]){a=F[a+8>>2];if(a){continue}break E}break}if(!(G[a+12|0]&8)){break D}}a=12212;while(1){b=F[a>>2];if(b>>>0<=e>>>0){f=b+F[a+4>>2]|0;if(f>>>0>e>>>0){break C}}a=F[a+8>>2];continue}}F[a>>2]=c;F[a+4>>2]=F[a+4>>2]+g;j=(c+8&7?-8-c&7:0)+c|0;F[j+4>>2]=h|3;g=b+(b+8&7?-8-b&7:0)|0;i=h+j|0;a=g-i|0;if((e|0)==(g|0)){F[2947]=i;a=F[2944]+a|0;F[2944]=a;F[i+4>>2]=a|1;break A}if(F[2946]==(g|0)){F[2946]=i;a=F[2943]+a|0;F[2943]=a;F[i+4>>2]=a|1;F[a+i>>2]=a;break A}f=F[g+4>>2];if((f&3)==1){e=f&-8;F:{if(f>>>0<=255){d=F[g+8>>2];b=f>>>3|0;c=F[g+12>>2];if((c|0)==(d|0)){m=11764,n=F[2941]&oi(b),F[m>>2]=n;break F}F[d+12>>2]=c;F[c+8>>2]=d;break F}h=F[g+24>>2];c=F[g+12>>2];G:{if((g|0)!=(c|0)){b=F[g+8>>2];F[b+12>>2]=c;F[c+8>>2]=b;break G}H:{f=g+20|0;b=F[f>>2];if(b){break H}f=g+16|0;b=F[f>>2];if(b){break H}c=0;break G}while(1){d=f;c=b;f=c+20|0;b=F[f>>2];if(b){continue}f=c+16|0;b=F[c+16>>2];if(b){continue}break}F[d>>2]=0}if(!h){break F}d=F[g+28>>2];b=(d<<2)+12068|0;I:{if(F[b>>2]==(g|0)){F[b>>2]=c;if(c){break I}m=11768,n=F[2942]&oi(d),F[m>>2]=n;break F}F[h+(F[h+16>>2]==(g|0)?16:20)>>2]=c;if(!c){break F}}F[c+24>>2]=h;b=F[g+16>>2];if(b){F[c+16>>2]=b;F[b+24>>2]=c}b=F[g+20>>2];if(!b){break F}F[c+20>>2]=b;F[b+24>>2]=c}g=e+g|0;f=F[g+4>>2];a=a+e|0}F[g+4>>2]=f&-2;F[i+4>>2]=a|1;F[a+i>>2]=a;if(a>>>0<=255){b=(a&-8)+11804|0;c=F[2941];a=1<<(a>>>3);J:{if(!(c&a)){F[2941]=a|c;a=b;break J}a=F[b+8>>2]}F[b+8>>2]=i;F[a+12>>2]=i;F[i+12>>2]=b;F[i+8>>2]=a;break A}f=31;if(a>>>0<=16777215){b=O(a>>>8|0);f=((a>>>38-b&1)-(b<<1)|0)+62|0}F[i+28>>2]=f;F[i+16>>2]=0;F[i+20>>2]=0;b=(f<<2)+12068|0;d=F[2942];c=1<>2]=i;break K}f=a<<((f|0)!=31?25-(f>>>1|0)|0:0);c=F[b>>2];while(1){b=c;if((F[c+4>>2]&-8)==(a|0)){break B}c=f>>>29|0;f=f<<1;d=(c&4)+b|0;c=F[d+16>>2];if(c){continue}break}F[d+16>>2]=i}F[i+24>>2]=b;F[i+12>>2]=i;F[i+8>>2]=i;break A}d=g-40|0;a=c+8&7?-8-c&7:0;b=d-a|0;F[2944]=b;a=a+c|0;F[2947]=a;F[a+4>>2]=b|1;F[(c+d|0)+4>>2]=40;F[2948]=F[3063];a=(f+(f-39&7?39-f&7:0)|0)-47|0;d=a>>>0>>0?e:a;F[d+4>>2]=27;a=F[3056];F[d+16>>2]=F[3055];F[d+20>>2]=a;a=F[3054];F[d+8>>2]=F[3053];F[d+12>>2]=a;F[3055]=d+8;F[3054]=g;F[3053]=c;F[3056]=0;a=d+24|0;while(1){F[a+4>>2]=7;b=a+8|0;a=a+4|0;if(b>>>0>>0){continue}break}if((d|0)==(e|0)){break e}F[d+4>>2]=F[d+4>>2]&-2;f=d-e|0;F[e+4>>2]=f|1;F[d>>2]=f;if(f>>>0<=255){b=(f&-8)+11804|0;c=F[2941];a=1<<(f>>>3);L:{if(!(c&a)){F[2941]=a|c;a=b;break L}a=F[b+8>>2]}F[b+8>>2]=e;F[a+12>>2]=e;F[e+12>>2]=b;F[e+8>>2]=a;break e}a=31;if(f>>>0<=16777215){a=O(f>>>8|0);a=((f>>>38-a&1)-(a<<1)|0)+62|0}F[e+28>>2]=a;F[e+16>>2]=0;F[e+20>>2]=0;b=(a<<2)+12068|0;d=F[2942];c=1<>2]=e;break M}a=f<<((a|0)!=31?25-(a>>>1|0)|0:0);d=F[b>>2];while(1){b=d;if((f|0)==(F[b+4>>2]&-8)){break z}c=a>>>29|0;a=a<<1;c=(c&4)+b|0;d=F[c+16>>2];if(d){continue}break}F[c+16>>2]=e}F[e+24>>2]=b;F[e+12>>2]=e;F[e+8>>2]=e;break e}a=F[b+8>>2];F[a+12>>2]=i;F[b+8>>2]=i;F[i+24>>2]=0;F[i+12>>2]=b;F[i+8>>2]=a}a=j+8|0;break a}a=F[b+8>>2];F[a+12>>2]=e;F[b+8>>2]=e;F[e+24>>2]=0;F[e+12>>2]=b;F[e+8>>2]=a}a=F[2944];if(a>>>0<=h>>>0){break d}b=a-h|0;F[2944]=b;c=F[2947];a=c+h|0;F[2947]=a;F[a+4>>2]=b|1;F[c+4>>2]=h|3;a=c+8|0;break a}F[2940]=48;a=0;break a}N:{if(!g){break N}b=F[d+28>>2];a=(b<<2)+12068|0;O:{if(F[a>>2]==(d|0)){F[a>>2]=c;if(c){break O}j=oi(b)&j;F[2942]=j;break N}F[g+(F[g+16>>2]==(d|0)?16:20)>>2]=c;if(!c){break N}}F[c+24>>2]=g;a=F[d+16>>2];if(a){F[c+16>>2]=a;F[a+24>>2]=c}a=F[d+20>>2];if(!a){break N}F[c+20>>2]=a;F[a+24>>2]=c}P:{if(f>>>0<=15){a=f+h|0;F[d+4>>2]=a|3;a=a+d|0;F[a+4>>2]=F[a+4>>2]|1;break P}F[d+4>>2]=h|3;e=d+h|0;F[e+4>>2]=f|1;F[e+f>>2]=f;if(f>>>0<=255){b=(f&-8)+11804|0;c=F[2941];a=1<<(f>>>3);Q:{if(!(c&a)){F[2941]=a|c;a=b;break Q}a=F[b+8>>2]}F[b+8>>2]=e;F[a+12>>2]=e;F[e+12>>2]=b;F[e+8>>2]=a;break P}a=31;if(f>>>0<=16777215){a=O(f>>>8|0);a=((f>>>38-a&1)-(a<<1)|0)+62|0}F[e+28>>2]=a;F[e+16>>2]=0;F[e+20>>2]=0;b=(a<<2)+12068|0;R:{c=1<>2]=e;break S}a=f<<((a|0)!=31?25-(a>>>1|0)|0:0);h=F[b>>2];while(1){b=h;if((F[b+4>>2]&-8)==(f|0)){break R}c=a>>>29|0;a=a<<1;c=(c&4)+b|0;h=F[c+16>>2];if(h){continue}break}F[c+16>>2]=e}F[e+24>>2]=b;F[e+12>>2]=e;F[e+8>>2]=e;break P}a=F[b+8>>2];F[a+12>>2]=e;F[b+8>>2]=e;F[e+24>>2]=0;F[e+12>>2]=b;F[e+8>>2]=a}a=d+8|0;break a}T:{if(!i){break T}b=F[c+28>>2];a=(b<<2)+12068|0;U:{if(F[a>>2]==(c|0)){F[a>>2]=d;if(d){break U}m=11768,n=oi(b)&j,F[m>>2]=n;break T}F[i+(F[i+16>>2]==(c|0)?16:20)>>2]=d;if(!d){break T}}F[d+24>>2]=i;a=F[c+16>>2];if(a){F[d+16>>2]=a;F[a+24>>2]=d}a=F[c+20>>2];if(!a){break T}F[d+20>>2]=a;F[a+24>>2]=d}V:{if(f>>>0<=15){a=f+h|0;F[c+4>>2]=a|3;a=a+c|0;F[a+4>>2]=F[a+4>>2]|1;break V}F[c+4>>2]=h|3;d=c+h|0;F[d+4>>2]=f|1;F[d+f>>2]=f;if(k){b=(k&-8)+11804|0;e=F[2946];a=1<<(k>>>3);W:{if(!(a&g)){F[2941]=a|g;a=b;break W}a=F[b+8>>2]}F[b+8>>2]=e;F[a+12>>2]=e;F[e+12>>2]=b;F[e+8>>2]=a}F[2946]=d;F[2943]=f}a=c+8|0}Z=l+16|0;return a|0}function Vc(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0;m=Z-32|0;Z=m;o=ka(12);F[o+8>>2]=0;F[o+4>>2]=b;F[o>>2]=0;s=o+12|0;b=s;a:{b:{c:{while(1){b=b-12|0;w=F[b+8>>2];j=F[b+4>>2];t=F[b>>2];if(t){if((w|0)>1e3){break a}F[m+24>>2]=0;F[m+16>>2]=0;F[m+20>>2]=0;d=1;c=F[a>>2];e=F[c+8>>2];h=F[c+12>>2];g=F[c+20>>2];f=F[c+16>>2];d:{if((h|0)<=(g|0)&f>>>0>=e>>>0|(g|0)>(h|0)){break d}e=G[f+F[c>>2]|0];h=c;c=g;f=f+1|0;c=f?c:c+1|0;F[h+16>>2]=f;F[h+20>>2]=c;Sb(m+16|0,e);if(e){c=F[a>>2];n=Tb(m+16|0);p=F[c+8>>2];g=F[c+12>>2];h=F[c+20>>2];f=F[c+16>>2];k=f+e|0;h=k>>>0>>0?h+1|0:h;if((g|0)<=(h|0)&k>>>0>p>>>0|(g|0)<(h|0)){break d}la(n,f+F[c>>2]|0,e);d=F[c+20>>2];f=e;e=e+F[c+16>>2]|0;d=f>>>0>e>>>0?d+1|0:d;F[c+16>>2]=e;F[c+20>>2]=d}j=ka(24);c=j;F[c+4>>2]=0;F[c+8>>2]=0;c=c+16|0;F[c>>2]=0;F[c+4>>2]=0;F[j>>2]=j+4;F[j+12>>2]=c;e=Z-32|0;Z=e;h=t+12|0;c=m+16|0;u=Ya(h,c);i=t+16|0;e:{if((u|0)==(i|0)){F[e+16>>2]=c;f:{g:{d=F[h+4>>2];h:{if(!d){f=h+4|0;c=f;break h}f=G[c+11|0];g=f<<24>>24<0;n=g?F[c>>2]:c;g=g?F[c+4>>2]:f;while(1){c=d;d=G[c+27|0];f=d<<24>>24<0;d=f?F[c+20>>2]:d;p=d>>>0>>0;i:{j:{k:{l:{k=p?d:g;m:{if(k){f=f?F[c+16>>2]:c+16|0;q=sa(n,f,k);if(!q){if(d>>>0>g>>>0){break m}break l}if((q|0)>=0){break l}break m}if(d>>>0<=g>>>0){break k}}f=c;d=F[c>>2];if(d){continue}break h}d=sa(f,n,k);if(d){break j}}if(p){break i}break g}if((d|0)>=0){break g}}d=F[c+4>>2];if(d){continue}break}f=c+4|0}d=ka(32);n=d+16|0;g=F[e+16>>2];n:{if(D[g+11|0]>=0){p=F[g+4>>2];F[n>>2]=F[g>>2];F[n+4>>2]=p;F[n+8>>2]=F[g+8>>2];break n}ra(n,F[g>>2],F[g+4>>2])}F[d+8>>2]=c;F[d>>2]=0;F[d+4>>2]=0;F[d+28>>2]=0;F[f>>2]=d;c=d;g=F[F[h>>2]>>2];if(g){F[h>>2]=g;c=F[f>>2]}nb(F[h+4>>2],c);F[h+8>>2]=F[h+8>>2]+1;c=1;break f}d=c;c=0}D[e+28|0]=c;F[e+24>>2]=d;d=F[e+24>>2];c=F[d+28>>2];F[d+28>>2]=j;if(!c){break e}Ca(c+12|0,F[c+16>>2]);Ba(c,F[c+4>>2]);ja(c);break e}if(!j){break e}Ca(j+12|0,F[j+16>>2]);Ba(j,F[j+4>>2]);ja(j)}Z=e+32|0;d=(i|0)!=(u|0)}if(D[m+27|0]<0){ja(F[m+16>>2])}if(d){break a}}if(!j){break a}F[m+16>>2]=0;if(!fb(1,m+16|0,F[a>>2])){break a}q=0;x=F[m+16>>2];if(x){while(1){d=0;i=Z-32|0;Z=i;F[i+24>>2]=0;F[i+16>>2]=0;F[i+20>>2]=0;c=F[a>>2];f=F[c+8>>2];o:{p:{h=F[c+12>>2];g=F[c+20>>2];e=F[c+16>>2];q:{if((h|0)<=(g|0)&e>>>0>=f>>>0|(g|0)>(h|0)){break q}f=G[e+F[c>>2]|0];h=c;c=g;e=e+1|0;c=e?c:c+1|0;F[h+16>>2]=e;F[h+20>>2]=c;Sb(i+16|0,f);if(f){e=F[a>>2];n=Tb(i+16|0);p=F[e+8>>2];g=F[e+12>>2];c=F[e+20>>2];h=F[e+16>>2];k=h+f|0;c=k>>>0>>0?c+1|0:c;if(k>>>0>p>>>0&(c|0)>=(g|0)|(c|0)>(g|0)){break q}la(n,h+F[e>>2]|0,f);c=F[e+20>>2];g=f;f=f+F[e+16>>2]|0;c=g>>>0>f>>>0?c+1|0:c;F[e+16>>2]=f;F[e+20>>2]=c}F[i+12>>2]=0;if(!fb(1,i+12|0,F[a>>2])){break q}f=F[i+12>>2];if(!f){break q}e=F[a>>2];c=F[e+8>>2];h=F[e+16>>2];g=c-h|0;c=F[e+12>>2]-(F[e+20>>2]+(c>>>0>>0)|0)|0;if((c|0)<=0&f>>>0>g>>>0|(c|0)<0){break q}F[i+8>>2]=0;F[i>>2]=0;F[i+4>>2]=0;if((f|0)<0){break p}d=ka(f);F[i>>2]=d;c=d+f|0;F[i+8>>2]=c;l=ma(d,0,f);F[i+4>>2]=c;h=F[e+12>>2];y=h;p=F[e+8>>2];c=F[e+20>>2];k=F[e+16>>2];g=f+k|0;c=g>>>0>>0?c+1|0:c;u=g;n=c;r:{if((c|0)<=(h|0)&g>>>0<=p>>>0|(c|0)<(h|0)){la(l,F[e>>2]+k|0,f);d=F[e+20>>2];c=f+F[e+16>>2]|0;d=c>>>0>>0?d+1|0:d;F[e+16>>2]=c;F[e+20>>2]=d;h=Z-48|0;Z=h;e=Ya(j,i+16|0);if((e|0)!=(j+4|0)){c=F[e+4>>2];s:{if(!c){c=e;while(1){d=F[c+8>>2];f=F[d>>2]!=(c|0);c=d;if(f){continue}break}break s}while(1){d=c;c=F[c>>2];if(c){continue}break}}if((e|0)==F[j>>2]){F[j>>2]=d}F[j+8>>2]=F[j+8>>2]-1;f=F[j+4>>2];t:{u:{g=e;d=e;e=F[d>>2];if(e){c=F[g+4>>2];if(!c){break u}while(1){d=c;c=F[c>>2];if(c){continue}break}}e=F[d+4>>2];if(e){break u}e=0;k=1;break t}F[e+8>>2]=F[d+8>>2];k=0}l=F[d+8>>2];c=F[l>>2];v:{if((d|0)==(c|0)){F[l>>2]=e;if((d|0)==(f|0)){c=0;f=e;break v}c=F[l+4>>2];break v}F[l+4>>2]=e}r=!G[d+12|0];if((d|0)!=(g|0)){l=F[g+8>>2];F[d+8>>2]=l;F[l+(((g|0)!=F[F[g+8>>2]>>2])<<2)>>2]=d;l=F[g>>2];F[d>>2]=l;F[l+8>>2]=d;l=F[g+4>>2];F[d+4>>2]=l;if(l){F[l+8>>2]=d}D[d+12|0]=G[g+12|0];f=(f|0)==(g|0)?d:f}w:{if(r|!f){break w}if(k){while(1){e=G[c+12|0];x:{d=F[c+8>>2];if(F[d>>2]!=(c|0)){if(!e){D[c+12|0]=1;D[d+12|0]=0;e=F[d+4>>2];k=F[e>>2];F[d+4>>2]=k;if(k){F[k+8>>2]=d}F[e+8>>2]=F[d+8>>2];k=F[d+8>>2];F[(((d|0)!=F[k>>2])<<2)+k>>2]=e;F[e>>2]=d;F[d+8>>2]=e;d=c;c=F[c>>2];f=(c|0)==(f|0)?d:f;c=F[c+4>>2]}y:{z:{d=F[c>>2];A:{if(!(G[d+12|0]?0:d)){e=F[c+4>>2];if(G[e+12|0]?0:e){break A}D[c+12|0]=0;c=F[c+8>>2];B:{if((f|0)==(c|0)){c=f;break B}if(G[c+12|0]){break x}}D[c+12|0]=1;break w}e=F[c+4>>2];if(!e){break z}}if(G[e+12|0]){break z}d=c;break y}D[d+12|0]=1;D[c+12|0]=0;e=F[d+4>>2];F[c>>2]=e;if(e){F[e+8>>2]=c}F[d+8>>2]=F[c+8>>2];e=F[c+8>>2];F[((F[e>>2]!=(c|0))<<2)+e>>2]=d;F[d+4>>2]=c;F[c+8>>2]=d;e=c}c=F[d+8>>2];D[d+12|0]=G[c+12|0];D[c+12|0]=1;D[e+12|0]=1;d=F[c+4>>2];e=F[d>>2];F[c+4>>2]=e;if(e){F[e+8>>2]=c}F[d+8>>2]=F[c+8>>2];e=F[c+8>>2];F[(((c|0)!=F[e>>2])<<2)+e>>2]=d;F[d>>2]=c;F[c+8>>2]=d;break w}if(!e){D[c+12|0]=1;D[d+12|0]=0;e=F[c+4>>2];F[d>>2]=e;if(e){F[e+8>>2]=d}F[c+8>>2]=F[d+8>>2];e=F[d+8>>2];F[(((d|0)!=F[e>>2])<<2)+e>>2]=c;F[c+4>>2]=d;F[d+8>>2]=c;f=(d|0)==(f|0)?c:f;c=F[d>>2]}e=F[c>>2];C:{if(!(!e|G[e+12|0])){d=c;break C}d=F[c+4>>2];if(!(G[d+12|0]?0:d)){D[c+12|0]=0;c=F[c+8>>2];if((c|0)!=(f|0)?G[c+12|0]:0){break x}D[c+12|0]=1;break w}if(e){if(!G[e+12|0]){d=c;break C}d=F[c+4>>2]}D[d+12|0]=1;D[c+12|0]=0;e=F[d>>2];F[c+4>>2]=e;if(e){F[e+8>>2]=c}F[d+8>>2]=F[c+8>>2];e=F[c+8>>2];F[((F[e>>2]!=(c|0))<<2)+e>>2]=d;F[d>>2]=c;F[c+8>>2]=d;e=c}c=F[d+8>>2];D[d+12|0]=G[c+12|0];D[c+12|0]=1;D[e+12|0]=1;d=F[c>>2];e=F[d+4>>2];F[c>>2]=e;if(e){F[e+8>>2]=c}F[d+8>>2]=F[c+8>>2];e=F[c+8>>2];F[(((c|0)!=F[e>>2])<<2)+e>>2]=d;F[d+4>>2]=c;F[c+8>>2]=d;break w}d=c;c=F[c+8>>2];c=F[(((d|0)==F[c>>2])<<2)+c>>2];continue}}D[e+12|0]=1}c=F[g+28>>2];if(c){F[g+32>>2]=c;ja(c)}if(D[g+27|0]<0){ja(F[g+16>>2])}ja(g)}F[h+8>>2]=0;F[h>>2]=0;F[h+4>>2]=0;c=F[i+4>>2];d=F[i>>2];f=c-d|0;e=0;D:{E:{if((c|0)!=(d|0)){if((f|0)<0){break E}e=ka(f);c=ma(e,0,f);g=c+f|0;F[h+8>>2]=g;F[h+4>>2]=g;F[h>>2]=c;c=d}la(e,c,f);F:{if(D[i+27|0]>=0){F[h+24>>2]=F[i+24>>2];c=F[i+20>>2];F[h+16>>2]=F[i+16>>2];F[h+20>>2]=c;break F}ra(h+16|0,F[i+16>>2],F[i+20>>2])}Tc(h+28|0,h);f=h+16|0;c=f;G:{H:{d=F[j+4>>2];I:{if(!d){e=j+4|0;c=e;break I}e=G[c+11|0];g=e<<24>>24<0;k=g?F[c>>2]:c;g=g?F[c+4>>2]:e;while(1){c=d;d=G[c+27|0];e=d<<24>>24<0;d=e?F[c+20>>2]:d;l=d>>>0>>0;J:{K:{L:{M:{r=l?d:g;N:{if(r){e=e?F[c+16>>2]:c+16|0;z=sa(k,e,r);if(!z){if(d>>>0>g>>>0){break N}break M}if((z|0)>=0){break M}break N}if(d>>>0<=g>>>0){break L}}e=c;d=F[c>>2];if(d){continue}break I}d=sa(e,k,r);if(d){break K}}if(l){break J}break H}if((d|0)>=0){break H}}d=F[c+4>>2];if(d){continue}break}e=c+4|0}d=ka(40);F[d+24>>2]=F[f+8>>2];g=F[f+4>>2];F[d+16>>2]=F[f>>2];F[d+20>>2]=g;F[f>>2]=0;F[f+4>>2]=0;F[f+8>>2]=0;Tc(d+28|0,f+12|0);F[d+8>>2]=c;F[d>>2]=0;F[d+4>>2]=0;F[e>>2]=d;c=d;f=F[F[j>>2]>>2];if(f){F[j>>2]=f;c=F[e>>2]}nb(F[j+4>>2],c);F[j+8>>2]=F[j+8>>2]+1;c=1;break G}d=c;c=0}D[h+44|0]=c;F[h+40>>2]=d;c=F[h+28>>2];if(c){F[h+32>>2]=c;ja(c)}if(D[h+27|0]<0){ja(F[h+16>>2])}c=F[h>>2];if(c){F[h+4>>2]=c;ja(c)}Z=h+48|0;break D}na();v()}d=F[i>>2];if(!d){break r}}F[i+4>>2]=d;ja(d)}d=(n|0)<=(y|0)&p>>>0>=u>>>0|(n|0)<(y|0)}if(D[i+27|0]<0){ja(F[i+16>>2])}Z=i+32|0;break o}na();v()}if(!d){break a}q=q+1|0;if((x|0)!=(q|0)){continue}break}}F[m+12>>2]=0;if(!fb(1,m+12|0,F[a>>2])){break a}c=F[a>>2];e=F[c+8>>2];f=F[c+16>>2];h=e-f|0;d=F[m+12>>2];c=F[c+12>>2]-(F[c+20>>2]+(e>>>0>>0)|0)|0;if(h>>>0>>0&(c|0)<=0|(c|0)<0){break a}if(d){q=0;h=((t|0)!=0)+w|0;while(1){O:{if(b>>>0>>0){F[b+8>>2]=h;F[b+4>>2]=0;F[b>>2]=j;b=b+12|0;d=F[m+12>>2];break O}c=b-o|0;g=(c|0)/12|0;b=g+1|0;if(b>>>0>=357913942){break c}e=(s-o|0)/12|0;f=e<<1;e=e>>>0>=178956970?357913941:b>>>0>>0?f:b;if(e){if(e>>>0>=357913942){break b}f=ka(L(e,12))}else{f=0}b=f+L(g,12)|0;F[b+8>>2]=h;F[b+4>>2]=0;F[b>>2]=j;c=pa(b+L((c|0)/-12|0,12)|0,o,c);s=f+L(e,12)|0;b=b+12|0;if(o){ja(o)}o=c}q=q+1|0;if(q>>>0>>0){continue}break}}if((b|0)!=(o|0)){continue}break}A=1;break a}na();v()}oa();v()}if(o){ja(o)}Z=m+32|0;return A}function me(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;h=Z-48|0;Z=h;a:{if((c|0)!=1){break a}i=F[a+4>>2];c=F[a+12>>2];F[h+40>>2]=0;F[h+32>>2]=0;F[h+36>>2]=0;F[h+24>>2]=0;F[h+28>>2]=0;F[h+16>>2]=0;F[h+20>>2]=0;F[h+8>>2]=0;F[h+12>>2]=0;d=h+8|0;b:{if((b|0)==-2){break b}k=F[F[F[i+4>>2]+8>>2]+(c<<2)>>2];if(($[F[F[i>>2]+8>>2]](i)|0)==1){j=Z-32|0;Z=j;l=F[F[F[i+4>>2]+8>>2]+(c<<2)>>2];c:{d:{e:{if(($[F[F[i>>2]+8>>2]](i)|0)!=1|b-1>>>0>5){break e}g=$[F[F[i>>2]+36>>2]](i)|0;f=$[F[F[i>>2]+44>>2]](i,c)|0;if(!g|!f){break e}c=$[F[F[i>>2]+40>>2]](i,c)|0;if(c){a=F[i+44>>2];F[j+12>>2]=c;F[j+8>>2]=a;F[j+20>>2]=f;F[j+16>>2]=f+12;f=j+8|0;a=0;f:{g:{switch(b-1|0){case 0:b=ka(60);F[b+4>>2]=l;F[b>>2]=2960;a=F[d+4>>2];F[b+8>>2]=F[d>>2];F[b+12>>2]=a;a=F[d+12>>2];F[b+16>>2]=F[d+8>>2];F[b+20>>2]=a;a=F[d+20>>2];F[b+24>>2]=F[d+16>>2];F[b+28>>2]=a;F[b+40>>2]=0;F[b+32>>2]=0;F[b+36>>2]=0;a=F[d+24>>2];g=F[d+28>>2];if((a|0)!=(g|0)){c=g-a|0;if((c|0)<0){break d}e=ka(c);F[b+32>>2]=e;F[b+40>>2]=(c&-4)+e;while(1){F[e>>2]=F[a>>2];e=e+4|0;a=a+4|0;if((g|0)!=(a|0)){continue}break}F[b+36>>2]=e}a=F[f+4>>2];F[b+44>>2]=F[f>>2];F[b+48>>2]=a;a=F[f+12>>2];F[b+52>>2]=F[f+8>>2];F[b+56>>2]=a;F[b>>2]=2252;a=b;break f;case 3:b=ka(112);F[b+4>>2]=l;F[b>>2]=2960;a=F[d+4>>2];F[b+8>>2]=F[d>>2];F[b+12>>2]=a;a=F[d+12>>2];F[b+16>>2]=F[d+8>>2];F[b+20>>2]=a;a=F[d+20>>2];F[b+24>>2]=F[d+16>>2];F[b+28>>2]=a;F[b+40>>2]=0;F[b+32>>2]=0;F[b+36>>2]=0;a=F[d+24>>2];g=F[d+28>>2];if((a|0)!=(g|0)){c=g-a|0;if((c|0)<0){break d}e=ka(c);F[b+32>>2]=e;F[b+40>>2]=(c&-4)+e;while(1){F[e>>2]=F[a>>2];e=e+4|0;a=a+4|0;if((g|0)!=(a|0)){continue}break}F[b+36>>2]=e}a=F[f+4>>2];F[b+44>>2]=F[f>>2];F[b+48>>2]=a;a=F[f+12>>2];F[b+52>>2]=F[f+8>>2];F[b+56>>2]=a;F[b+60>>2]=0;F[b+64>>2]=0;F[b>>2]=3016;F[b+68>>2]=0;F[b+72>>2]=0;F[b+76>>2]=0;F[b+80>>2]=0;F[b+84>>2]=0;F[b+88>>2]=0;F[b+92>>2]=0;F[b+96>>2]=0;F[b+100>>2]=0;F[b+104>>2]=0;F[b+108>>2]=0;a=b;break f;case 4:b=ka(104);F[b+4>>2]=l;F[b>>2]=2960;a=F[d+4>>2];F[b+8>>2]=F[d>>2];F[b+12>>2]=a;a=F[d+12>>2];F[b+16>>2]=F[d+8>>2];F[b+20>>2]=a;a=F[d+20>>2];F[b+24>>2]=F[d+16>>2];F[b+28>>2]=a;F[b+40>>2]=0;F[b+32>>2]=0;F[b+36>>2]=0;a=F[d+24>>2];g=F[d+28>>2];if((a|0)!=(g|0)){c=g-a|0;if((c|0)<0){break d}e=ka(c);F[b+32>>2]=e;F[b+40>>2]=(c&-4)+e;while(1){F[e>>2]=F[a>>2];e=e+4|0;a=a+4|0;if((g|0)!=(a|0)){continue}break}F[b+36>>2]=e}a=F[f+4>>2];F[b+44>>2]=F[f>>2];F[b+48>>2]=a;a=F[f+12>>2];F[b+52>>2]=F[f+8>>2];F[b+56>>2]=a;F[b+84>>2]=0;F[b+76>>2]=0;F[b+80>>2]=0;F[b+60>>2]=0;F[b+64>>2]=0;F[b>>2]=3264;a=F[f+4>>2];F[b+88>>2]=F[f>>2];F[b+92>>2]=a;a=F[f+12>>2];F[b+96>>2]=F[f+8>>2];F[b+100>>2]=a;a=b;break f;case 5:break g;default:break f}}a=ka(128);F[a+4>>2]=l;F[a>>2]=2960;b=F[d+4>>2];F[a+8>>2]=F[d>>2];F[a+12>>2]=b;b=F[d+12>>2];F[a+16>>2]=F[d+8>>2];F[a+20>>2]=b;b=F[d+20>>2];F[a+24>>2]=F[d+16>>2];F[a+28>>2]=b;F[a+40>>2]=0;F[a+32>>2]=0;F[a+36>>2]=0;h:{i:{c=F[d+28>>2];b=F[d+24>>2];if((c|0)!=(b|0)){c=c-b|0;if((c|0)<0){break i}b=ka(c);F[a+36>>2]=b;F[a+32>>2]=b;F[a+40>>2]=(c&-4)+b;e=F[d+24>>2];c=F[d+28>>2];if((e|0)!=(c|0)){while(1){F[b>>2]=F[e>>2];b=b+4|0;e=e+4|0;if((c|0)!=(e|0)){continue}break}}F[a+36>>2]=b}F[a>>2]=2904;b=F[f+4>>2];F[a+44>>2]=F[f>>2];F[a+48>>2]=b;b=F[f+12>>2];F[a+52>>2]=F[f+8>>2];F[a+56>>2]=b;b=a- -64|0;F[b>>2]=0;F[b+4>>2]=0;F[a+60>>2]=4128;F[a>>2]=3500;b=F[f+4>>2];F[a+72>>2]=F[f>>2];F[a+76>>2]=b;b=F[f+12>>2];F[a+80>>2]=F[f+8>>2];F[a+84>>2]=b;F[a+104>>2]=1065353216;F[a+108>>2]=-1;F[a+96>>2]=-1;F[a+100>>2]=-1;F[a+88>>2]=1;F[a+92>>2]=-1;F[a+60>>2]=3736;F[a+112>>2]=0;F[a+116>>2]=0;D[a+117|0]=0;D[a+118|0]=0;D[a+119|0]=0;D[a+120|0]=0;D[a+121|0]=0;D[a+122|0]=0;D[a+123|0]=0;D[a+124|0]=0;break h}na();v()}break f}e=a;break e}a=F[i+44>>2];F[j+12>>2]=g;F[j+8>>2]=a;F[j+20>>2]=f;F[j+16>>2]=f+12;f=j+8|0;a=0;j:{k:{switch(b-1|0){case 0:b=ka(60);F[b+4>>2]=l;F[b>>2]=2960;a=F[d+4>>2];F[b+8>>2]=F[d>>2];F[b+12>>2]=a;a=F[d+12>>2];F[b+16>>2]=F[d+8>>2];F[b+20>>2]=a;a=F[d+20>>2];F[b+24>>2]=F[d+16>>2];F[b+28>>2]=a;F[b+40>>2]=0;F[b+32>>2]=0;F[b+36>>2]=0;a=F[d+24>>2];g=F[d+28>>2];if((a|0)!=(g|0)){c=g-a|0;if((c|0)<0){break d}e=ka(c);F[b+32>>2]=e;F[b+40>>2]=(c&-4)+e;while(1){F[e>>2]=F[a>>2];e=e+4|0;a=a+4|0;if((g|0)!=(a|0)){continue}break}F[b+36>>2]=e}a=F[f+4>>2];F[b+44>>2]=F[f>>2];F[b+48>>2]=a;a=F[f+12>>2];F[b+52>>2]=F[f+8>>2];F[b+56>>2]=a;F[b>>2]=4156;a=b;break j;case 3:b=ka(112);F[b+4>>2]=l;F[b>>2]=2960;a=F[d+4>>2];F[b+8>>2]=F[d>>2];F[b+12>>2]=a;a=F[d+12>>2];F[b+16>>2]=F[d+8>>2];F[b+20>>2]=a;a=F[d+20>>2];F[b+24>>2]=F[d+16>>2];F[b+28>>2]=a;F[b+40>>2]=0;F[b+32>>2]=0;F[b+36>>2]=0;a=F[d+24>>2];g=F[d+28>>2];if((a|0)!=(g|0)){c=g-a|0;if((c|0)<0){break d}e=ka(c);F[b+32>>2]=e;F[b+40>>2]=(c&-4)+e;while(1){F[e>>2]=F[a>>2];e=e+4|0;a=a+4|0;if((g|0)!=(a|0)){continue}break}F[b+36>>2]=e}a=F[f+4>>2];F[b+44>>2]=F[f>>2];F[b+48>>2]=a;a=F[f+12>>2];F[b+52>>2]=F[f+8>>2];F[b+56>>2]=a;F[b+60>>2]=0;F[b+64>>2]=0;F[b>>2]=4580;F[b+68>>2]=0;F[b+72>>2]=0;F[b+76>>2]=0;F[b+80>>2]=0;F[b+84>>2]=0;F[b+88>>2]=0;F[b+92>>2]=0;F[b+96>>2]=0;F[b+100>>2]=0;F[b+104>>2]=0;F[b+108>>2]=0;a=b;break j;case 4:b=ka(104);F[b+4>>2]=l;F[b>>2]=2960;a=F[d+4>>2];F[b+8>>2]=F[d>>2];F[b+12>>2]=a;a=F[d+12>>2];F[b+16>>2]=F[d+8>>2];F[b+20>>2]=a;a=F[d+20>>2];F[b+24>>2]=F[d+16>>2];F[b+28>>2]=a;F[b+40>>2]=0;F[b+32>>2]=0;F[b+36>>2]=0;a=F[d+24>>2];g=F[d+28>>2];if((a|0)!=(g|0)){c=g-a|0;if((c|0)<0){break d}e=ka(c);F[b+32>>2]=e;F[b+40>>2]=(c&-4)+e;while(1){F[e>>2]=F[a>>2];e=e+4|0;a=a+4|0;if((g|0)!=(a|0)){continue}break}F[b+36>>2]=e}a=F[f+4>>2];F[b+44>>2]=F[f>>2];F[b+48>>2]=a;a=F[f+12>>2];F[b+52>>2]=F[f+8>>2];F[b+56>>2]=a;F[b+84>>2]=0;F[b+76>>2]=0;F[b+80>>2]=0;F[b+60>>2]=0;F[b+64>>2]=0;F[b>>2]=4816;a=F[f+4>>2];F[b+88>>2]=F[f>>2];F[b+92>>2]=a;a=F[f+12>>2];F[b+96>>2]=F[f+8>>2];F[b+100>>2]=a;a=b;break j;case 5:break k;default:break j}}a=ka(128);F[a+4>>2]=l;F[a>>2]=2960;b=F[d+4>>2];F[a+8>>2]=F[d>>2];F[a+12>>2]=b;b=F[d+12>>2];F[a+16>>2]=F[d+8>>2];F[a+20>>2]=b;b=F[d+20>>2];F[a+24>>2]=F[d+16>>2];F[a+28>>2]=b;F[a+40>>2]=0;F[a+32>>2]=0;F[a+36>>2]=0;l:{m:{c=F[d+28>>2];b=F[d+24>>2];if((c|0)!=(b|0)){c=c-b|0;if((c|0)<0){break m}b=ka(c);F[a+36>>2]=b;F[a+32>>2]=b;F[a+40>>2]=(c&-4)+b;e=F[d+24>>2];c=F[d+28>>2];if((e|0)!=(c|0)){while(1){F[b>>2]=F[e>>2];b=b+4|0;e=e+4|0;if((c|0)!=(e|0)){continue}break}}F[a+36>>2]=b}F[a>>2]=4524;b=F[f+4>>2];F[a+44>>2]=F[f>>2];F[a+48>>2]=b;b=F[f+12>>2];F[a+52>>2]=F[f+8>>2];F[a+56>>2]=b;b=a- -64|0;F[b>>2]=0;F[b+4>>2]=0;F[a+60>>2]=5624;F[a>>2]=5040;b=F[f+4>>2];F[a+72>>2]=F[f>>2];F[a+76>>2]=b;b=F[f+12>>2];F[a+80>>2]=F[f+8>>2];F[a+84>>2]=b;F[a+104>>2]=1065353216;F[a+108>>2]=-1;F[a+96>>2]=-1;F[a+100>>2]=-1;F[a+88>>2]=1;F[a+92>>2]=-1;F[a+60>>2]=5260;F[a+112>>2]=0;F[a+116>>2]=0;D[a+117|0]=0;D[a+118|0]=0;D[a+119|0]=0;D[a+120|0]=0;D[a+121|0]=0;D[a+122|0]=0;D[a+123|0]=0;D[a+124|0]=0;break l}na();v()}break j}e=a}Z=j+32|0;break c}na();v()}if(e){break b}}e=ka(44);F[e+4>>2]=k;F[e>>2]=2960;a=F[d+4>>2];F[e+8>>2]=F[d>>2];F[e+12>>2]=a;a=F[d+12>>2];F[e+16>>2]=F[d+8>>2];F[e+20>>2]=a;a=F[d+20>>2];F[e+24>>2]=F[d+16>>2];F[e+28>>2]=a;F[e+40>>2]=0;F[e+32>>2]=0;F[e+36>>2]=0;n:{c=F[d+24>>2];b=F[d+28>>2];if((c|0)!=(b|0)){a=b-c|0;if((a|0)<0){break n}k=ka(a);F[e+32>>2]=k;F[e+40>>2]=(a&-4)+k;while(1){F[k>>2]=F[c>>2];k=k+4|0;c=c+4|0;if((b|0)!=(c|0)){continue}break}F[e+36>>2]=k}F[e>>2]=5652;break b}na();v()}k=e;a=F[h+32>>2];if(!a){break a}F[h+36>>2]=a;ja(a)}Z=h+48|0;return k|0}function rf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0;m=Z-16|0;Z=m;F[m+12>>2]=b;b=ka(32);F[m>>2]=b;F[m+4>>2]=24;F[m+8>>2]=-2147483616;c=G[1196]|G[1197]<<8|(G[1198]<<16|G[1199]<<24);d=G[1192]|G[1193]<<8|(G[1194]<<16|G[1195]<<24);D[b+16|0]=d;D[b+17|0]=d>>>8;D[b+18|0]=d>>>16;D[b+19|0]=d>>>24;D[b+20|0]=c;D[b+21|0]=c>>>8;D[b+22|0]=c>>>16;D[b+23|0]=c>>>24;c=G[1188]|G[1189]<<8|(G[1190]<<16|G[1191]<<24);d=G[1184]|G[1185]<<8|(G[1186]<<16|G[1187]<<24);D[b+8|0]=d;D[b+9|0]=d>>>8;D[b+10|0]=d>>>16;D[b+11|0]=d>>>24;D[b+12|0]=c;D[b+13|0]=c>>>8;D[b+14|0]=c>>>16;D[b+15|0]=c>>>24;c=G[1180]|G[1181]<<8|(G[1182]<<16|G[1183]<<24);d=G[1176]|G[1177]<<8|(G[1178]<<16|G[1179]<<24);D[b|0]=d;D[b+1|0]=d>>>8;D[b+2|0]=d>>>16;D[b+3|0]=d>>>24;D[b+4|0]=c;D[b+5|0]=c>>>8;D[b+6|0]=c>>>16;D[b+7|0]=c>>>24;D[b+24|0]=0;l=Z-48|0;Z=l;f=F[m+12>>2];d=a;a=a+16|0;b=F[a>>2];a:{b:{if(!b){break b}c=a;while(1){e=(f|0)>F[b+16>>2];c=e?c:b;b=F[(e?b+4|0:b)>>2];if(b){continue}break}if((a|0)==(c|0)){break b}if((f|0)>=F[c+16>>2]){break a}}F[l+28>>2]=0;F[l+32>>2]=0;y=l+24|0;F[l+24>>2]=y|4;a=l+16|0;F[a>>2]=0;F[a+4>>2]=0;F[l+8>>2]=f;F[l+12>>2]=a;t=l+8|0;a=t;x=Z-16|0;Z=x;u=d+12|0;c=F[u+4>>2];c:{d:{if(!c){o=u+4|0;d=o;break d}a=F[a>>2];while(1){d=c;b=F[c+16>>2];if((b|0)>(a|0)){o=d;c=F[d>>2];if(c){continue}break d}if((a|0)<=(b|0)){g=d;a=0;break c}c=F[d+4>>2];if(c){continue}break}o=d+4|0}g=ka(32);b=F[t>>2];q=g+24|0;a=q;F[a>>2]=0;F[a+4>>2]=0;F[g+16>>2]=b;r=g+20|0;F[r>>2]=a;c=F[t+4>>2];z=t+8|0;if((c|0)!=(z|0)){while(1){p=Z-16|0;Z=p;a=p+8|0;k=c+16|0;e:{f:{g:{h:{i:{j:{k:{f=q;e=r+4|0;l:{if((f|0)==(e|0)){break l}b=G[f+27|0];h=b<<24>>24<0;i=G[k+11|0];n=i<<24>>24;j=(n|0)<0;i=j?F[k+4>>2]:i;b=h?F[f+20>>2]:b;s=i>>>0>b>>>0;w=s?b:i;if(w){j=j?F[k>>2]:k;h=h?F[f+16>>2]:f+16|0;A=sa(j,h,w);if(!A){if(b>>>0>i>>>0){break l}break k}if((A|0)>=0){break k}break l}if(b>>>0<=i>>>0){break j}}h=F[f>>2];m:{a=f;n:{if((a|0)==F[r>>2]){break n}o:{if(!h){b=f;while(1){a=F[b+8>>2];i=F[a>>2]==(b|0);b=a;if(i){continue}break}break o}b=h;while(1){a=b;b=F[b+4>>2];if(b){continue}break}}i=G[k+11|0];s=i<<24>>24;b=(s|0)<0;j=G[a+27|0];n=j<<24>>24<0;p:{i=b?F[k+4>>2]:i;j=n?F[a+20>>2]:j;w=i>>>0>>0?i:j;if(w){b=sa(n?F[a+16>>2]:a+16|0,b?F[k>>2]:k,w);if(b){break p}}if(i>>>0>j>>>0){break n}break m}if((b|0)>=0){break m}}if(!h){F[p+12>>2]=f;a=f;break e}F[p+12>>2]=a;a=a+4|0;break e}b=F[e>>2];if(!b){F[p+12>>2]=e;a=e;break e}h=(s|0)<0?F[k>>2]:k;f=e;while(1){a=b;b=G[b+27|0];e=b<<24>>24<0;b=e?F[a+20>>2]:b;k=b>>>0>>0;q:{r:{s:{t:{n=k?b:i;u:{if(n){e=e?F[a+16>>2]:a+16|0;j=sa(h,e,n);if(!j){if(b>>>0>i>>>0){break u}break t}if((j|0)>=0){break t}break u}if(b>>>0<=i>>>0){break s}}f=a;b=F[a>>2];if(b){continue}break g}b=sa(e,h,n);if(b){break r}}if(k){break q}break g}if((b|0)>=0){break g}}f=a+4|0;b=F[a+4>>2];if(b){continue}break}break g}b=sa(h,j,w);if(b){break i}}if(s){break h}break f}if((b|0)>=0){break f}}h=F[f+4>>2];v:{if(!h){b=f;while(1){a=F[b+8>>2];j=F[a>>2]!=(b|0);b=a;if(j){continue}break}break v}b=h;while(1){a=b;b=F[b>>2];if(b){continue}break}}w:{x:{if((a|0)==(e|0)){break x}j=G[a+27|0];b=j<<24>>24<0;y:{j=b?F[a+20>>2]:j;s=i>>>0>j>>>0?j:i;if(s){b=sa((n|0)<0?F[k>>2]:k,b?F[a+16>>2]:a+16|0,s);if(b){break y}}if(i>>>0>>0){break x}break w}if((b|0)>=0){break w}}if(!h){F[p+12>>2]=f;a=f+4|0;break e}F[p+12>>2]=a;break e}b=F[e>>2];if(!b){F[p+12>>2]=e;a=e;break e}h=(n|0)<0?F[k>>2]:k;f=e;while(1){a=b;b=G[b+27|0];e=b<<24>>24<0;b=e?F[a+20>>2]:b;k=b>>>0>>0;z:{A:{B:{C:{n=k?b:i;D:{if(n){e=e?F[a+16>>2]:a+16|0;j=sa(h,e,n);if(!j){if(b>>>0>i>>>0){break D}break C}if((j|0)>=0){break C}break D}if(b>>>0<=i>>>0){break B}}f=a;b=F[a>>2];if(b){continue}break g}b=sa(e,h,n);if(b){break A}}if(k){break z}break g}if((b|0)>=0){break g}}f=a+4|0;b=F[a+4>>2];if(b){continue}break}}F[p+12>>2]=a;a=f;break e}F[p+12>>2]=f;F[a>>2]=f}f=a;a=F[a>>2];if(a){b=0}else{a=ka(40);b=a+16|0;E:{if(D[c+27|0]>=0){e=F[c+20>>2];F[b>>2]=F[c+16>>2];F[b+4>>2]=e;F[b+8>>2]=F[c+24>>2];break E}ra(b,F[c+16>>2],F[c+20>>2])}b=a+28|0;F:{if(D[c+39|0]>=0){e=F[c+32>>2];F[b>>2]=F[c+28>>2];F[b+4>>2]=e;F[b+8>>2]=F[c+36>>2];break F}ra(b,F[c+28>>2],F[c+32>>2])}F[a+8>>2]=F[p+12>>2];F[a>>2]=0;F[a+4>>2]=0;F[f>>2]=a;b=a;e=F[F[r>>2]>>2];if(e){F[r>>2]=e;b=F[f>>2]}nb(F[r+4>>2],b);F[r+8>>2]=F[r+8>>2]+1;b=1}D[x+12|0]=b;F[x+8>>2]=a;Z=p+16|0;b=F[c+4>>2];G:{if(b){while(1){c=b;b=F[b>>2];if(b){continue}break G}}while(1){a=c;c=F[c+8>>2];if((a|0)!=F[c>>2]){continue}break}}if((c|0)!=(z|0)){continue}break}}F[g+8>>2]=d;F[g>>2]=0;F[g+4>>2]=0;F[o>>2]=g;c=g;a=F[F[u>>2]>>2];if(a){F[u>>2]=a;c=F[o>>2]}nb(F[u+4>>2],c);F[u+8>>2]=F[u+8>>2]+1;a=1}D[l+44|0]=a;F[l+40>>2]=g;Z=x+16|0;c=F[l+40>>2];ib(t|4,F[l+16>>2]);ib(y,F[l+28>>2])}f=Z-48|0;Z=f;d=f+8|0;g=Z-32|0;Z=g;o=g+32|0;b=o;a=g+21|0;H:{if((b|0)==(a|0)){break H}}e=b-a|0;I:{if((e|0)<=9){h=61;if((e|0)<(I[2684]<=1|0)){break I}}D[a|0]=49;b=a+1|0;h=0}F[g+12>>2]=h;F[g+8>>2]=b;h=Z-16|0;Z=h;e=Z-16|0;Z=e;J:{q=F[g+8>>2];g=q-a|0;if(g>>>0<=2147483631){K:{if(g>>>0<11){D[d+11|0]=g|G[d+11|0]&128;D[d+11|0]=G[d+11|0]&127;b=d;break K}t=e+8|0;if(g>>>0>=11){k=g+16&-16;b=k-1|0;b=(b|0)==11?k:b}else{b=10}sb(t,b+1|0);b=F[e+8>>2];F[d>>2]=b;F[d+8>>2]=F[d+8>>2]&-2147483648|F[e+12>>2]&2147483647;F[d+8>>2]=F[d+8>>2]|-2147483648;F[d+4>>2]=g}while(1){if((a|0)!=(q|0)){D[b|0]=G[a|0];b=b+1|0;a=a+1|0;continue}break}D[e+7|0]=0;D[b|0]=G[e+7|0];Z=e+16|0;break J}za();v()}Z=h+16|0;Z=o;F[f+32>>2]=m;L:{M:{a=c+20|0;d=F[a+4>>2];N:{if(!d){g=a+4|0;c=g;break N}b=G[m+11|0];c=b<<24>>24<0;e=c?F[m>>2]:m;b=c?F[m+4>>2]:b;while(1){c=d;d=G[c+27|0];g=d<<24>>24<0;d=g?F[c+20>>2]:d;o=d>>>0>>0;O:{P:{Q:{R:{h=o?d:b;S:{if(h){g=g?F[c+16>>2]:c+16|0;q=sa(e,g,h);if(!q){if(b>>>0>>0){break S}break R}if((q|0)>=0){break R}break S}if(b>>>0>=d>>>0){break Q}}g=c;d=F[c>>2];if(d){continue}break N}d=sa(g,e,h);if(d){break P}}if(o){break O}break M}if((d|0)>=0){break M}}d=F[c+4>>2];if(d){continue}break}g=c+4|0}d=ka(40);e=d+16|0;b=F[f+32>>2];T:{if(D[b+11|0]>=0){o=F[b+4>>2];F[e>>2]=F[b>>2];F[e+4>>2]=o;F[e+8>>2]=F[b+8>>2];break T}ra(e,F[b>>2],F[b+4>>2])}F[d+8>>2]=c;F[d>>2]=0;F[d+4>>2]=0;F[d+36>>2]=0;F[d+28>>2]=0;F[d+32>>2]=0;F[g>>2]=d;c=d;b=F[F[a>>2]>>2];if(b){F[a>>2]=b;c=F[g>>2]}nb(F[a+4>>2],c);F[a+8>>2]=F[a+8>>2]+1;a=1;break L}d=c;a=0}D[f+44|0]=a;F[f+40>>2]=d;a=F[f+40>>2];if(D[a+39|0]<0){ja(F[a+28>>2])}b=F[f+12>>2];F[a+28>>2]=F[f+8>>2];F[a+32>>2]=b;F[a+36>>2]=F[f+16>>2];Z=f+48|0;Z=l+48|0;if(D[m+11|0]<0){ja(F[m>>2])}Z=m+16|0}function zd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;h=Z-32|0;Z=h;g=F[F[a+4>>2]+44>>2];c=F[a+8>>2];d=F[c>>2];c=F[c+4>>2];F[h+24>>2]=0;F[h+16>>2]=0;F[h+20>>2]=0;d=(c-d>>2>>>0)/3|0;c=F[g+96>>2];f=(F[g+100>>2]-c|0)/12|0;a:{if(d>>>0>f>>>0){e=d-f|0;i=F[g+104>>2];c=F[g+100>>2];if(e>>>0<=(i-c|0)/12>>>0){b:{if(!e){break b}d=c;f=L(e,12)-12|0;i=((f>>>0)/12|0)+1&3;if(i){while(1){l=F[h+20>>2];F[d>>2]=F[h+16>>2];F[d+4>>2]=l;F[d+8>>2]=F[h+24>>2];d=d+12|0;j=j+1|0;if((i|0)!=(j|0)){continue}break}}c=L(e,12)+c|0;if(f>>>0<36){break b}while(1){f=F[h+20>>2];F[d>>2]=F[h+16>>2];F[d+4>>2]=f;F[d+8>>2]=F[h+24>>2];F[d+20>>2]=F[h+24>>2];f=F[h+20>>2];F[d+12>>2]=F[h+16>>2];F[d+16>>2]=f;F[d+32>>2]=F[h+24>>2];f=F[h+20>>2];F[d+24>>2]=F[h+16>>2];F[d+28>>2]=f;f=F[h+20>>2];F[d+36>>2]=F[h+16>>2];F[d+40>>2]=f;F[d+44>>2]=F[h+24>>2];d=d+48|0;if((d|0)!=(c|0)){continue}break}}F[g+100>>2]=c;break a}c:{f=F[g+96>>2];n=(c-f|0)/12|0;d=n+e|0;if(d>>>0<357913942){f=(i-f|0)/12|0;i=f<<1;i=f>>>0>=178956970?357913941:d>>>0>>0?i:d;if(i){if(i>>>0>=357913942){break c}l=ka(L(i,12))}f=L(n,12)+l|0;d=f;e=L(e,12);n=e-12|0;q=((n>>>0)/12|0)+1&3;if(q){while(1){r=F[h+20>>2];F[d>>2]=F[h+16>>2];F[d+4>>2]=r;F[d+8>>2]=F[h+24>>2];d=d+12|0;j=j+1|0;if((q|0)!=(j|0)){continue}break}}e=e+f|0;if(n>>>0>=36){while(1){j=F[h+20>>2];F[d>>2]=F[h+16>>2];F[d+4>>2]=j;F[d+8>>2]=F[h+24>>2];F[d+20>>2]=F[h+24>>2];j=F[h+20>>2];F[d+12>>2]=F[h+16>>2];F[d+16>>2]=j;F[d+32>>2]=F[h+24>>2];j=F[h+20>>2];F[d+24>>2]=F[h+16>>2];F[d+28>>2]=j;j=F[h+20>>2];F[d+36>>2]=F[h+16>>2];F[d+40>>2]=j;F[d+44>>2]=F[h+24>>2];d=d+48|0;if((e|0)!=(d|0)){continue}break}}j=F[g+96>>2];if((j|0)!=(c|0)){while(1){c=c-12|0;n=F[c+4>>2];f=f-12|0;d=f;F[d>>2]=F[c>>2];F[d+4>>2]=n;F[d+8>>2]=F[c+8>>2];if((c|0)!=(j|0)){continue}break}c=F[g+96>>2]}F[g+104>>2]=L(i,12)+l;F[g+100>>2]=e;F[g+96>>2]=f;if(c){ja(c)}break a}na();v()}oa();v()}if(d>>>0>=f>>>0){break a}F[g+100>>2]=c+L(d,12)}d:{if(F[a+216>>2]==F[a+220>>2]){j=F[a+4>>2];c=F[j+44>>2];d=F[c+100>>2];f=F[c+96>>2];if((d|0)!=(f|0)){c=(d-f|0)/12|0;o=c>>>0<=1?1:c;c=0;while(1){d=F[a+8>>2];i=f+L(c,12)|0;g=L(c,3);e:{f:{if((g|0)==-1){e=F[(F[d>>2]+(g<<2)|0)+4>>2];k=-1;g=1;break f}e=-1;k=F[F[d>>2]+(g<<2)>>2];l=g+1|0;if((l|0)==-1){g=0;break f}e=F[F[d>>2]+(l<<2)>>2];g=g+2|0;m=-1;if((g|0)==-1){break e}}m=F[F[d>>2]+(g<<2)>>2]}F[i+8>>2]=m;F[i+4>>2]=e;F[i>>2]=k;c=c+1|0;if((o|0)!=(c|0)){continue}break}}F[F[j+4>>2]+80>>2]=b;c=1;break d}d=0;F[h+24>>2]=0;F[h+16>>2]=0;F[h+20>>2]=0;l=F[a+8>>2];c=F[l>>2];g=F[l+4>>2];F[h+8>>2]=0;F[h>>2]=0;F[h+4>>2]=0;b=0;g:{h:{i:{j:{k:{l:{if((c|0)!=(g|0)){c=g-c|0;if((c|0)<0){break l}b=ka(c);F[h>>2]=b;F[h+8>>2]=(c&-4)+b;u=h,w=ma(b,0,c)+c|0,F[u+4>>2]=w}c=F[l+24>>2];if((F[l+28>>2]-c|0)<4){break h}f=0;while(1){g=F[(p<<2)+c>>2];m:{if((g|0)==-1){break m}n:{if(F[F[a+120>>2]+(p>>>3&536870908)>>2]>>>p&1){break n}n=F[a+216>>2];c=F[a+220>>2];if((n|0)==(c|0)){break n}e=g+2|0;i=(g>>>0)%3|0;q=i?g-1|0:e;c=(c-n|0)/144|0;r=c>>>0<=1?1:c;j=0;t=(i|0)!=0|(e|0)!=-1;while(1){s=g<<2;i=L(j,144)+n|0;c=F[s+F[F[i+68>>2]>>2]>>2];o:{if(!(F[F[i+16>>2]+(c>>>3&536870908)>>2]>>>c&1)){break o}c=-1;p:{if(!t){break p}e=F[F[l+12>>2]+(q<<2)>>2];c=-1;if((e|0)==-1){break p}c=e-1|0;if((e>>>0)%3|0){break p}c=e+2|0}if((g|0)==(c|0)){break o}e=s;s=F[i+32>>2];i=F[e+s>>2];while(1){e=0;if((c|0)==-1){break g}if((i|0)!=F[s+(c<<2)>>2]){g=c;break n}q:{r:{if((c>>>0)%3|0){e=c-1|0;break r}e=c+2|0;m=-1;if((e|0)==-1){break q}}c=F[F[l+12>>2]+(e<<2)>>2];m=-1;if((c|0)==-1){break q}m=c-1|0;if((c>>>0)%3|0){break q}m=c+2|0}c=m;if((g|0)!=(c|0)){continue}break}}j=j+1|0;if((r|0)!=(j|0)){continue}break}}i=k-f|0;e=i>>2;F[(g<<2)+b>>2]=e;s:{if(k>>>0>>0){F[k>>2]=g;k=k+4|0;F[h+20>>2]=k;break s}c=e+1|0;if(c>>>0>=1073741824){break k}d=o-f|0;k=d>>>1|0;c=d>>>0>=2147483644?1073741823:c>>>0>>0?k:c;if(c){if(c>>>0>=1073741824){break j}d=ka(c<<2)}else{d=0}e=d+(e<<2)|0;F[e>>2]=g;m=c<<2;c=pa(d,f,i);o=m+c|0;F[h+24>>2]=o;k=e+4|0;F[h+20>>2]=k;F[h+16>>2]=c;if(f){ja(f);l=F[a+8>>2]}f=c}if((g|0)==-1){break m}t:{if((g>>>0)%3|0){c=g-1|0;break t}c=g+2|0;if((c|0)==-1){break m}}c=F[F[l+12>>2]+(c<<2)>>2];if((c|0)==-1){break m}c=c+((c>>>0)%3|0?-1:2)|0;if((c|0)==-1){break m}e=g;if((c|0)==(g|0)){break m}while(1){i=c;u:{v:{c=F[a+220>>2];j=F[a+216>>2];if((c|0)==(j|0)){break v}c=(c-j|0)/144|0;n=c>>>0<=1?1:c;c=0;while(1){q=F[(j+L(c,144)|0)+32>>2];r=i<<2;if(F[q+r>>2]==F[q+(e<<2)>>2]){c=c+1|0;if((n|0)!=(c|0)){continue}break v}break}j=k-d|0;e=j>>2;F[b+r>>2]=e;if(k>>>0>>0){F[k>>2]=i;k=k+4|0;F[h+20>>2]=k;f=d;break u}c=e+1|0;if(c>>>0>=1073741824){break i}f=o-d|0;k=f>>>1|0;c=f>>>0>=2147483644?1073741823:c>>>0>>0?k:c;if(c){if(c>>>0>=1073741824){break j}f=ka(c<<2)}else{f=0}e=f+(e<<2)|0;F[e>>2]=i;m=c<<2;c=pa(f,d,j);o=m+c|0;F[h+24>>2]=o;k=e+4|0;F[h+20>>2]=k;F[h+16>>2]=c;if(!d){d=c;break u}ja(d);l=F[a+8>>2];d=c;break u}F[(i<<2)+b>>2]=F[(e<<2)+b>>2]}if((i|0)==-1){break m}w:{if((i>>>0)%3|0){c=i-1|0;break w}c=i+2|0;if((c|0)==-1){break m}}c=F[F[l+12>>2]+(c<<2)>>2];if((c|0)==-1){break m}c=c+((c>>>0)%3|0?-1:2)|0;if((c|0)==-1){break m}e=i;if((c|0)!=(g|0)){continue}break}}p=p+1|0;c=F[l+24>>2];if((p|0)>2]-c>>2){continue}break}break h}na();v()}na();v()}oa();v()}na();v()}i=F[a+4>>2];a=F[i+44>>2];c=F[a+100>>2];a=F[a+96>>2];x:{if((c|0)==(a|0)){break x}g=(c-a|0)/12|0;f=g>>>0<=1?1:g;l=f&1;c=0;if(g>>>0>=2){j=f&-2;g=0;while(1){e=L(c,12);f=e+b|0;o=F[f>>2];p=F[f+4>>2];e=a+e|0;F[e+8>>2]=F[f+8>>2];F[e>>2]=o;F[e+4>>2]=p;e=L(c|1,12);f=e+b|0;o=F[f>>2];p=F[f+4>>2];e=a+e|0;F[e+8>>2]=F[f+8>>2];F[e>>2]=o;F[e+4>>2]=p;c=c+2|0;g=g+2|0;if((j|0)!=(g|0)){continue}break}}if(!l){break x}g=L(c,12);c=g+b|0;f=F[c>>2];e=F[c+4>>2];a=a+g|0;F[a+8>>2]=F[c+8>>2];F[a>>2]=f;F[a+4>>2]=e}F[F[i+4>>2]+80>>2]=k-d>>2;e=1}c=e;if(b){ja(b)}if(!d){break d}F[h+20>>2]=d;ja(d)}Z=h+32|0;return c}function de(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,M=0,N=0,O=0,P=0;g=Z+-64|0;Z=g;F[a+8>>2]=e;y=a+32|0;f=F[y>>2];d=F[a+36>>2]-f>>2;a:{b:{if(d>>>0>>0){qa(y,e-d|0);F[g+56>>2]=0;F[g+60>>2]=0;F[g+48>>2]=0;F[g+52>>2]=0;F[g+40>>2]=0;F[g+44>>2]=0;F[g+32>>2]=0;F[g+36>>2]=0;F[g+24>>2]=0;F[g+28>>2]=0;F[g+16>>2]=0;F[g+20>>2]=0;F[g>>2]=0;break b}if(d>>>0>e>>>0){F[a+36>>2]=f+(e<<2)}F[g+56>>2]=0;F[g+60>>2]=0;F[g+48>>2]=0;F[g+52>>2]=0;F[g+40>>2]=0;F[g+44>>2]=0;F[g+32>>2]=0;F[g+36>>2]=0;F[g+24>>2]=0;F[g+28>>2]=0;F[g+16>>2]=0;F[g+20>>2]=0;F[g>>2]=0;d=0;if(!e){break a}}Fa(g+16|0,e,g);h=F[g+28>>2];d=F[g+32>>2]}F[g>>2]=0;d=d-h>>2;c:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break c}F[g+32>>2]=(e<<2)+h;break c}Fa(g+16|12,e-d|0,g)}F[g>>2]=0;f=F[g+40>>2];d=F[g+44>>2]-f>>2;d:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break d}F[g+44>>2]=f+(e<<2);break d}Fa(g+40|0,e-d|0,g)}F[g>>2]=0;f=F[g+52>>2];d=F[g+56>>2]-f>>2;e:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break e}F[g+56>>2]=f+(e<<2);break e}Fa(g+52|0,e-d|0,g)}f:{if(F[a+8>>2]<=0){break f}i=F[g+16>>2];j=F[a+32>>2];h=0;while(1){d=h<<2;f=F[d+i>>2];m=F[a+16>>2];g:{if((f|0)>(m|0)){F[d+j>>2]=m;break g}d=d+j|0;m=F[a+12>>2];if((m|0)>(f|0)){F[d>>2]=m;break g}F[d>>2]=f}h=h+1|0;d=F[a+8>>2];if((h|0)<(d|0)){continue}break}if((d|0)<=0){break f}d=0;while(1){i=d<<2;f=i+c|0;i=F[b+i>>2]+F[j+i>>2]|0;F[f>>2]=i;h:{if((i|0)>F[a+16>>2]){i=i-F[a+20>>2]|0}else{if((i|0)>=F[a+12>>2]){break h}i=i+F[a+20>>2]|0}F[f>>2]=i}d=d+1|0;if((d|0)>2]){continue}break}}H=F[a+52>>2];t=F[a+48>>2];z=ka(16);d=z;F[d>>2]=0;F[d+4>>2]=0;F[d+8>>2]=0;F[d+12>>2]=0;F[g+8>>2]=0;F[g>>2]=0;F[g+4>>2]=0;i:{if(e){if(e>>>0>=1073741824){break i}d=e<<2;r=ka(d);F[g>>2]=r;F[g+8>>2]=d+r;ma(r,0,d)}A=1;d=F[a+56>>2];B=F[d>>2];d=F[d+4>>2]-B|0;j:{if((d|0)<8){break j}w=d>>2;I=(w|0)<=2?2:w;J=w>>>0<=1?1:w;C=e&-2;D=e&1;K=e&-4;E=e&3;G=e-1|0;M=e<<2;N=e>>>0<4;A=0;m=1;while(1){k:{l:{m:{n:{if((m|0)!=(J|0)){o:{p:{f=F[(m<<2)+B>>2];if((f|0)==-1){break p}k=1;d=f+2|0;j=(f>>>0)%3|0;x=j?f-1|0:d;s=1<>2];O=n+(x>>>3&536870908)|0;i=0;P=(j|0)!=0|(d|0)!=-1;d=f;q:{while(1){r:{if(F[n+(d>>>3&536870908)>>2]>>>d&1){break r}j=F[F[F[t+64>>2]+12>>2]+(d<<2)>>2];if((j|0)==-1){break r}l=F[H>>2];h=F[t+28>>2];p=F[l+(F[h+(j<<2)>>2]<<2)>>2];if((p|0)>=(m|0)){break r}q=j+1|0;q=F[l+(F[h+(((q>>>0)%3|0?q:j-2|0)<<2)>>2]<<2)>>2];if((q|0)>=(m|0)){break r}h=F[l+(F[h+(j+((j>>>0)%3|0?-1:2)<<2)>>2]<<2)>>2];if((h|0)>=(m|0)){break r}s:{if(!e){break s}j=F[(g+16|0)+L(i,12)>>2];l=L(e,h);q=L(e,q);p=L(e,p);h=0;o=0;if(G){while(1){F[j+(h<<2)>>2]=(F[(h+l<<2)+c>>2]+F[(h+q<<2)+c>>2]|0)-F[(h+p<<2)+c>>2];u=h|1;F[j+(u<<2)>>2]=(F[(l+u<<2)+c>>2]+F[(q+u<<2)+c>>2]|0)-F[(p+u<<2)+c>>2];h=h+2|0;o=o+2|0;if((C|0)!=(o|0)){continue}break}}if(!D){break s}F[j+(h<<2)>>2]=(F[(h+l<<2)+c>>2]+F[(h+q<<2)+c>>2]|0)-F[(h+p<<2)+c>>2]}j=4;i=i+1|0;if((i|0)==4){break q}}t:{if(k&1){h=d-2|0;j=d+1|0;d=-1;j=(j>>>0)%3|0?j:h;if((j|0)==-1|F[n+(j>>>3&536870908)>>2]>>>j&1){break t}j=F[F[F[t+64>>2]+12>>2]+(j<<2)>>2];if((j|0)==-1){break t}d=j+1|0;d=(d>>>0)%3|0?d:j-2|0;break t}u:{if((d>>>0)%3|0){h=d-1|0;break u}h=d+2|0;d=-1;if((h|0)==-1){break t}}d=-1;if(F[n+(h>>>3&536870908)>>2]>>>h&1){break t}j=F[F[F[t+64>>2]+12>>2]+(h<<2)>>2];if((j|0)==-1){break t}if((j>>>0)%3|0){d=j-1|0;break t}d=j+2|0}v:{if((d|0)==(f|0)){break v}if((d|0)==-1&k){if(!P|s&F[O>>2]){break v}d=F[F[F[t+64>>2]+12>>2]+(x<<2)>>2];if((d|0)==-1){break v}k=0;d=(d>>>0)%3|0?d-1|0:d+2|0}if((d|0)!=-1){continue}}break}j=i;if((j|0)<=0){break p}}if(e){ma(r,0,M)}d=j-1|0;q=(d<<2)+z|0;d=L(d,12)+a|0;u=d;x=F[d- -64>>2];k=0;d=F[g>>2];f=0;while(1){i=F[q>>2];F[q>>2]=i+1;if(i>>>0>=x>>>0){break j}w:{if(F[F[u+60>>2]+(i>>>3&536870908)>>2]>>>i&1){break w}f=f+1|0;if(!e){break w}n=F[(g+16|0)+L(k,12)>>2];i=0;h=0;p=0;if(!N){while(1){l=h<<2;o=l+d|0;F[o>>2]=F[l+n>>2]+F[o>>2];o=l|4;s=o+d|0;F[s>>2]=F[n+o>>2]+F[s>>2];o=l|8;s=o+d|0;F[s>>2]=F[n+o>>2]+F[s>>2];l=l|12;o=l+d|0;F[o>>2]=F[l+n>>2]+F[o>>2];h=h+4|0;p=p+4|0;if((K|0)!=(p|0)){continue}break}}if(!E){break w}while(1){l=h<<2;p=l+d|0;F[p>>2]=F[l+n>>2]+F[p>>2];h=h+1|0;i=i+1|0;if((E|0)!=(i|0)){continue}break}}k=k+1|0;if((k|0)!=(j|0)){continue}break}i=L(e,m);if(!f){break o}if(!e){break l}h=0;d=0;if(G){break n}break m}i=L(e,m)}if(F[a+8>>2]<=0){break k}k=(L(m-1|0,e)<<2)+c|0;j=F[y>>2];h=0;while(1){d=h<<2;f=F[d+k>>2];n=F[a+16>>2];x:{if((f|0)>(n|0)){F[d+j>>2]=n;break x}d=d+j|0;n=F[a+12>>2];if((n|0)>(f|0)){F[d>>2]=n;break x}F[d>>2]=f}h=h+1|0;f=F[a+8>>2];if((h|0)<(f|0)){continue}break}d=0;if((f|0)<=0){break k}f=i<<2;h=f+c|0;k=b+f|0;while(1){i=d<<2;f=i+h|0;i=F[i+k>>2]+F[j+i>>2]|0;F[f>>2]=i;y:{if((i|0)>F[a+16>>2]){i=i-F[a+20>>2]|0}else{if((i|0)>=F[a+12>>2]){break y}i=i+F[a+20>>2]|0}F[f>>2]=i}d=d+1|0;if((d|0)>2]){continue}break}break k}ta();v()}while(1){j=h<<2;k=j+r|0;F[k>>2]=F[k>>2]/(f|0);j=(j|4)+r|0;F[j>>2]=F[j>>2]/(f|0);h=h+2|0;d=d+2|0;if((C|0)!=(d|0)){continue}break}}if(!D){break l}d=(h<<2)+r|0;F[d>>2]=F[d>>2]/(f|0)}if(F[a+8>>2]<=0){break k}j=F[y>>2];h=0;while(1){d=h<<2;f=F[d+r>>2];k=F[a+16>>2];z:{if((f|0)>(k|0)){F[d+j>>2]=k;break z}d=d+j|0;k=F[a+12>>2];if((k|0)>(f|0)){F[d>>2]=k;break z}F[d>>2]=f}h=h+1|0;f=F[a+8>>2];if((h|0)<(f|0)){continue}break}d=0;if((f|0)<=0){break k}f=i<<2;h=f+c|0;k=b+f|0;while(1){i=d<<2;f=i+h|0;i=F[i+k>>2]+F[j+i>>2]|0;F[f>>2]=i;A:{if((i|0)>F[a+16>>2]){i=i-F[a+20>>2]|0}else{if((i|0)>=F[a+12>>2]){break A}i=i+F[a+20>>2]|0}F[f>>2]=i}d=d+1|0;if((d|0)>2]){continue}break}}m=m+1|0;A=(w|0)<=(m|0);if((m|0)!=(I|0)){continue}break}}a=F[g>>2];if(a){ja(a)}ja(z);a=F[g+52>>2];if(a){F[g+56>>2]=a;ja(a)}a=F[g+40>>2];if(a){F[g+44>>2]=a;ja(a)}a=F[g+28>>2];if(a){F[g+32>>2]=a;ja(a)}a=F[g+16>>2];if(a){F[g+20>>2]=a;ja(a)}Z=g- -64|0;return A|0}na();v()}function $h(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0,J=0,K=0,M=0,N=0;h=Z+-64|0;Z=h;F[a+8>>2]=e;x=a+32|0;f=F[x>>2];d=F[a+36>>2]-f>>2;a:{b:{if(d>>>0>>0){qa(x,e-d|0);F[h+56>>2]=0;F[h+60>>2]=0;F[h+48>>2]=0;F[h+52>>2]=0;F[h+40>>2]=0;F[h+44>>2]=0;F[h+32>>2]=0;F[h+36>>2]=0;F[h+24>>2]=0;F[h+28>>2]=0;F[h+16>>2]=0;F[h+20>>2]=0;F[h>>2]=0;break b}if(d>>>0>e>>>0){F[a+36>>2]=f+(e<<2)}F[h+56>>2]=0;F[h+60>>2]=0;F[h+48>>2]=0;F[h+52>>2]=0;F[h+40>>2]=0;F[h+44>>2]=0;F[h+32>>2]=0;F[h+36>>2]=0;F[h+24>>2]=0;F[h+28>>2]=0;F[h+16>>2]=0;F[h+20>>2]=0;F[h>>2]=0;d=0;if(!e){break a}}Fa(h+16|0,e,h);i=F[h+28>>2];d=F[h+32>>2]}F[h>>2]=0;d=d-i>>2;c:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break c}F[h+32>>2]=(e<<2)+i;break c}Fa(h+16|12,e-d|0,h)}F[h>>2]=0;f=F[h+40>>2];d=F[h+44>>2]-f>>2;d:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break d}F[h+44>>2]=f+(e<<2);break d}Fa(h+40|0,e-d|0,h)}F[h>>2]=0;f=F[h+52>>2];d=F[h+56>>2]-f>>2;e:{if(d>>>0>=e>>>0){if(d>>>0<=e>>>0){break e}F[h+56>>2]=f+(e<<2);break e}Fa(h+52|0,e-d|0,h)}f:{if(F[a+8>>2]<=0){break f}g=F[h+16>>2];j=F[a+32>>2];i=0;while(1){d=i<<2;f=F[d+g>>2];m=F[a+16>>2];g:{if((f|0)>(m|0)){F[d+j>>2]=m;break g}d=d+j|0;m=F[a+12>>2];if((m|0)>(f|0)){F[d>>2]=m;break g}F[d>>2]=f}i=i+1|0;d=F[a+8>>2];if((i|0)<(d|0)){continue}break}if((d|0)<=0){break f}d=0;while(1){g=d<<2;f=g+c|0;g=F[b+g>>2]+F[g+j>>2]|0;F[f>>2]=g;h:{if((g|0)>F[a+16>>2]){g=g-F[a+20>>2]|0}else{if((g|0)>=F[a+12>>2]){break h}g=g+F[a+20>>2]|0}F[f>>2]=g}d=d+1|0;if((d|0)>2]){continue}break}}H=F[a+52>>2];A=F[a+48>>2];y=ka(16);d=y;F[d>>2]=0;F[d+4>>2]=0;F[d+8>>2]=0;F[d+12>>2]=0;F[h+8>>2]=0;F[h>>2]=0;F[h+4>>2]=0;i:{if(e){if(e>>>0>=1073741824){break i}d=e<<2;t=ka(d);F[h>>2]=t;F[h+8>>2]=d+t;ma(t,0,d)}z=1;d=F[a+56>>2];B=F[d>>2];d=F[d+4>>2]-B|0;j:{if((d|0)<8){break j}w=d>>2;I=(w|0)<=2?2:w;J=w>>>0<=1?1:w;C=e&-2;D=e&1;K=e&-4;E=e&3;G=e-1|0;M=e<<2;N=e>>>0<4;z=0;m=1;while(1){k:{l:{m:{n:{if((m|0)!=(J|0)){o:{p:{f=F[(m<<2)+B>>2];if((f|0)==-1){break p}n=F[A+12>>2];d=f+2|0;g=(f>>>0)%3|0;q=n+((g?f-1|0:d)<<2)|0;j=0;u=(g|0)!=0|(d|0)!=-1;k=1;d=f;q:{while(1){g=F[n+(d<<2)>>2];r:{if((g|0)==-1){break r}l=-1;p=F[H>>2];r=F[A>>2];i=p+(F[r+(g<<2)>>2]<<2)|0;o=g+1|0;o=(o>>>0)%3|0?o:g-2|0;if((o|0)!=-1){l=F[r+(o<<2)>>2]}o=F[i>>2];s:{t:{if((g>>>0)%3|0){i=g-1|0;break t}i=g+2|0;s=-1;if((i|0)==-1){break s}}s=F[r+(i<<2)>>2]}if((m|0)<=(o|0)){break r}i=F[p+(l<<2)>>2];if((i|0)>=(m|0)){break r}l=F[p+(s<<2)>>2];if((l|0)>=(m|0)){break r}g=F[(h+16|0)+L(j,12)>>2];u:{if(!e){break u}l=L(e,l);r=L(e,i);p=L(e,o);i=0;s=0;if(G){while(1){F[g+(i<<2)>>2]=(F[(i+l<<2)+c>>2]+F[(i+r<<2)+c>>2]|0)-F[(i+p<<2)+c>>2];o=i|1;F[g+(o<<2)>>2]=(F[(l+o<<2)+c>>2]+F[(o+r<<2)+c>>2]|0)-F[(o+p<<2)+c>>2];i=i+2|0;s=s+2|0;if((C|0)!=(s|0)){continue}break}}if(!D){break u}F[g+(i<<2)>>2]=(F[(i+l<<2)+c>>2]+F[(i+r<<2)+c>>2]|0)-F[(i+p<<2)+c>>2]}g=4;j=j+1|0;if((j|0)==4){break q}}v:{if(k&1){i=d+1|0;d=(i>>>0)%3|0?i:d-2|0;g=-1;if((d|0)==-1){break v}d=F[n+(d<<2)>>2];g=-1;if((d|0)==-1){break v}g=d+1|0;g=(g>>>0)%3|0?g:d-2|0;break v}w:{if((d>>>0)%3|0){i=d-1|0;break w}i=d+2|0;g=-1;if((i|0)==-1){break v}}d=F[n+(i<<2)>>2];g=-1;if((d|0)==-1){break v}g=d-1|0;if((d>>>0)%3|0){break v}g=d+2|0}d=g;x:{if((f|0)==(d|0)){break x}if((d|0)==-1&k){if(!u){break x}d=F[q>>2];if((d|0)==-1){break x}k=0;d=(d>>>0)%3|0?d-1|0:d+2|0}if((d|0)!=-1){continue}}break}g=j;if((g|0)<=0){break p}}if(e){ma(t,0,M)}d=g-1|0;r=(d<<2)+y|0;d=L(d,12)+a|0;o=d;s=F[d- -64>>2];k=0;d=F[h>>2];f=0;while(1){j=F[r>>2];F[r>>2]=j+1;if(j>>>0>=s>>>0){break j}y:{if(F[F[o+60>>2]+(j>>>3&536870908)>>2]>>>j&1){break y}f=f+1|0;if(!e){break y}j=F[(h+16|0)+L(k,12)>>2];l=0;i=0;p=0;if(!N){while(1){n=i<<2;q=n+d|0;F[q>>2]=F[j+n>>2]+F[q>>2];q=n|4;u=q+d|0;F[u>>2]=F[j+q>>2]+F[u>>2];q=n|8;u=q+d|0;F[u>>2]=F[j+q>>2]+F[u>>2];n=n|12;q=n+d|0;F[q>>2]=F[j+n>>2]+F[q>>2];i=i+4|0;p=p+4|0;if((K|0)!=(p|0)){continue}break}}if(!E){break y}while(1){n=i<<2;p=n+d|0;F[p>>2]=F[j+n>>2]+F[p>>2];i=i+1|0;l=l+1|0;if((E|0)!=(l|0)){continue}break}}k=k+1|0;if((k|0)!=(g|0)){continue}break}g=L(e,m);if(!f){break o}if(!e){break l}i=0;d=0;if(G){break n}break m}g=L(e,m)}if(F[a+8>>2]<=0){break k}k=(L(m-1|0,e)<<2)+c|0;j=F[x>>2];i=0;while(1){d=i<<2;f=F[d+k>>2];l=F[a+16>>2];z:{if((f|0)>(l|0)){F[d+j>>2]=l;break z}d=d+j|0;l=F[a+12>>2];if((l|0)>(f|0)){F[d>>2]=l;break z}F[d>>2]=f}i=i+1|0;f=F[a+8>>2];if((i|0)<(f|0)){continue}break}d=0;if((f|0)<=0){break k}f=g<<2;i=f+c|0;k=b+f|0;while(1){g=d<<2;f=g+i|0;g=F[g+k>>2]+F[g+j>>2]|0;F[f>>2]=g;A:{if((g|0)>F[a+16>>2]){g=g-F[a+20>>2]|0}else{if((g|0)>=F[a+12>>2]){break A}g=g+F[a+20>>2]|0}F[f>>2]=g}d=d+1|0;if((d|0)>2]){continue}break}break k}ta();v()}while(1){j=i<<2;k=j+t|0;F[k>>2]=F[k>>2]/(f|0);j=(j|4)+t|0;F[j>>2]=F[j>>2]/(f|0);i=i+2|0;d=d+2|0;if((C|0)!=(d|0)){continue}break}}if(!D){break l}d=(i<<2)+t|0;F[d>>2]=F[d>>2]/(f|0)}if(F[a+8>>2]<=0){break k}j=F[x>>2];i=0;while(1){d=i<<2;f=F[d+t>>2];k=F[a+16>>2];B:{if((f|0)>(k|0)){F[d+j>>2]=k;break B}d=d+j|0;k=F[a+12>>2];if((k|0)>(f|0)){F[d>>2]=k;break B}F[d>>2]=f}i=i+1|0;f=F[a+8>>2];if((i|0)<(f|0)){continue}break}d=0;if((f|0)<=0){break k}f=g<<2;i=f+c|0;k=b+f|0;while(1){g=d<<2;f=g+i|0;g=F[g+k>>2]+F[g+j>>2]|0;F[f>>2]=g;C:{if((g|0)>F[a+16>>2]){g=g-F[a+20>>2]|0}else{if((g|0)>=F[a+12>>2]){break C}g=g+F[a+20>>2]|0}F[f>>2]=g}d=d+1|0;if((d|0)>2]){continue}break}}m=m+1|0;z=(w|0)<=(m|0);if((m|0)!=(I|0)){continue}break}}a=F[h>>2];if(a){ja(a)}ja(y);a=F[h+52>>2];if(a){F[h+56>>2]=a;ja(a)}a=F[h+40>>2];if(a){F[h+44>>2]=a;ja(a)}a=F[h+28>>2];if(a){F[h+32>>2]=a;ja(a)}a=F[h+16>>2];if(a){F[h+20>>2]=a;ja(a)}Z=h- -64|0;return z|0}na();v()}function Yh(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,$=0,aa=0;a:{b:{if((e|0)!=2){break b}F[a+8>>2]=2;F[a- -64>>2]=f;M=a+32|0;e=F[M>>2];d=F[a+36>>2]-e|0;c:{if(d>>>0<=7){qa(M,2-(d>>>2|0)|0);break c}if((d|0)==8){break c}F[a+36>>2]=e+8}i=1;d=F[a+56>>2];d=F[d+4>>2]-F[d>>2]|0;if((d|0)<=0){break b}o=a+60|0;d=d>>>2|0;X=d>>>0<=1?1:d;Y=a+68|0;d=0;while(1){f=F[a+56>>2];e=F[f>>2];if(F[f+4>>2]-e>>2>>>0<=d>>>0){break a}k=Z-80|0;Z=k;f=-1;d:{e:{e=F[e+(d<<2)>>2];if((e|0)==-1){break e}i=F[o+32>>2];g=e+1|0;g=(g>>>0)%3|0?g:e-2|0;if((g|0)!=-1){f=F[F[i>>2]+(g<<2)>>2]}p=-1;e=e+((e>>>0)%3|0?-1:2)|0;if((e|0)!=-1){p=F[F[i>>2]+(e<<2)>>2]}i=F[o+36>>2];e=F[i>>2];i=F[i+4>>2]-e>>2;if(i>>>0<=f>>>0|i>>>0<=p>>>0){break e}f:{g:{h:{i:{j:{k:{j=F[e+(p<<2)>>2];f=F[e+(f<<2)>>2];if((j|0)>=(d|0)|(f|0)>=(d|0)){break k}i=(j<<3)+c|0;w=F[i+4>>2];g=(f<<3)+c|0;e=F[g+4>>2];l=F[i>>2];i=F[g>>2];if(!((l|0)!=(i|0)|(e|0)!=(w|0))){F[o+8>>2]=i;F[o+12>>2]=e;break j}p=F[F[o+4>>2]+(d<<2)>>2];F[k+72>>2]=0;F[k+76>>2]=0;g=k- -64|0;F[g>>2]=0;F[g+4>>2]=0;F[k+56>>2]=0;F[k+60>>2]=0;g=F[o>>2];if(!G[g+84|0]){p=F[F[g+68>>2]+(p<<2)>>2]}Ga(g,p,D[g+24|0],k+56|0);p=F[F[o+4>>2]+(f<<2)>>2];F[k+48>>2]=0;F[k+52>>2]=0;F[k+40>>2]=0;F[k+44>>2]=0;F[k+32>>2]=0;F[k+36>>2]=0;g=F[o>>2];if(!G[g+84|0]){p=F[F[g+68>>2]+(p<<2)>>2]}Ga(g,p,D[g+24|0],k+32|0);p=F[F[o+4>>2]+(j<<2)>>2];F[k+24>>2]=0;F[k+28>>2]=0;F[k+16>>2]=0;F[k+20>>2]=0;F[k+8>>2]=0;F[k+12>>2]=0;g=F[o>>2];if(!G[g+84|0]){p=F[F[g+68>>2]+(p<<2)>>2]}Ga(g,p,D[g+24|0],k+8|0);g=F[k+16>>2];n=F[k+40>>2];x=g-n|0;N=F[k+44>>2];g=F[k+20>>2]-(N+(g>>>0>>0)|0)|0;H=g;j=ki(x,g,x,g);q=_;g=F[k+8>>2];z=F[k+32>>2];A=g-z|0;O=F[k+36>>2];g=F[k+12>>2]-(O+(g>>>0>>0)|0)|0;I=g;h=j;j=ki(A,g,A,g);g=h+j|0;h=_+q|0;h=g>>>0>>0?h+1|0:h;j=F[k+24>>2];B=F[k+48>>2];C=j-B|0;P=F[k+52>>2];j=F[k+28>>2]-(P+(j>>>0>>0)|0)|0;J=j;m=g;g=ki(C,j,C,j);r=m+g|0;h=_+h|0;s=g>>>0>r>>>0?h+1|0:h;if(!(s|r)){break k}p=0;E=mi(-1,2147483647,r,s);f=i>>31;R=f;h=f>>31;Q=i;g=h;q=i^g;i=q-g|0;f=(f^g)-((g>>>0>q>>>0)+g|0)|0;g=f;f=e>>31;S=f;K=e;e=f>>31;q=K^e;m=q-e|0;h=f>>31;e=(h^f)-((e>>>0>q>>>0)+h|0)|0;f=(g|0)==(e|0)&i>>>0>m>>>0|e>>>0>>0;i=f?i:m;j=_;e=f?g:e;if((j|0)==(e|0)&i>>>0>E>>>0|e>>>0>j>>>0){break f}i=F[k+64>>2];T=F[k+68>>2];e=ki(i-n|0,T-((i>>>0>>0)+N|0)|0,x,H);f=_;g=F[k+56>>2];U=F[k+60>>2];j=ki(g-z|0,U-((g>>>0>>0)+O|0)|0,A,I);e=j+e|0;h=_+f|0;h=e>>>0>>0?h+1|0:h;f=e;m=F[k+72>>2];V=F[k+76>>2];e=ki(m-B|0,V-((m>>>0>>0)+P|0)|0,C,J);j=f+e|0;f=_+h|0;q=e>>>0>j>>>0?f+1|0:f;e=l;E=e-Q|0;e=(e>>31)-((e>>>0>>0)+R|0)|0;W=e;l=e>>31;y=l^E;f=y-l|0;h=e>>31;e=(h^e)-((l>>>0>y>>>0)+h|0)|0;h=e;y=w-K|0;e=(w>>31)-((w>>>0>>0)+S|0)|0;w=e;l=f;t=e>>31;u=t^y;L=u-t|0;f=e>>31;e=(f^e)-((t>>>0>u>>>0)+f|0)|0;f=(h|0)==(e|0)&l>>>0>L>>>0|e>>>0>>0;f=mi(-1,2147483647,f?l:L,f?h:e)>>>0>>0;e=_;if(f&(e|0)<=(q|0)|(e|0)<(q|0)){break f}e=I>>31;f=e;l=e^A;e=l-e|0;f=(f^I)-((f>>>0>l>>>0)+f|0)|0;h=H>>31;t=h^x;u=t-h|0;l=(h^H)-((h>>>0>t>>>0)+h|0)|0;h=(f|0)==(l|0)&e>>>0>u>>>0|f>>>0>l>>>0;e=h?e:u;f=h?f:l;h=J>>31;L=e;t=h^C;u=t-h|0;l=(h^J)-((h>>>0>t>>>0)+h|0)|0;e=(f|0)==(l|0)&e>>>0>u>>>0|f>>>0>l>>>0;f=mi(-1,2147483647,e?L:u,e?f:l)>>>0>>0;e=_;if(f&(e|0)<=(q|0)|(e|0)<(q|0)){break f}l=1;e=0;f=n;n=li(ki(j,q,x,H),_,r,s);f=f+n|0;h=_+N|0;h=f>>>0>>0?h+1|0:h;n=i-f|0;f=T-((f>>>0>i>>>0)+h|0)|0;n=ki(n,f,n,f);x=_;f=g;h=li(ki(j,q,A,I),_,r,s);i=h+z|0;g=_+O|0;g=h>>>0>i>>>0?g+1|0:g;h=f-i|0;f=U-((f>>>0>>0)+g|0)|0;g=ki(h,f,h,f);i=g+n|0;f=_+x|0;f=g>>>0>i>>>0?f+1|0:f;n=i;g=li(ki(j,q,C,J),_,r,s);i=g+B|0;h=_+P|0;h=g>>>0>i>>>0?h+1|0:h;g=m-i|0;i=V-((i>>>0>m>>>0)+h|0)|0;m=ki(g,i,g,i);i=m+n|0;g=_+f|0;f=ki(i,i>>>0>>0?g+1|0:g,r,s);i=_;m=i;if(!i&f>>>0<=1){break i}h=f;while(1){g=e<<1|l>>>31;l=l<<1;e=g;n=!i&h>>>0>7|(i|0)!=0;h=(i&3)<<30|h>>>2;i=i>>>2|0;if(n){continue}break}break h}if((d|0)>(f|0)){e=f<<1}else{if((d|0)<=0){F[o+8>>2]=0;F[o+12>>2]=0;break j}e=(d<<1)-2|0}e=(e<<2)+c|0;F[o+8>>2]=F[e>>2];F[o+12>>2]=F[e+4>>2]}p=1;break f}e=m;l=f;if(f-1|0){break g}}while(1){i=mi(f,m,l,e);h=e+_|0;e=i+l|0;h=e>>>0>>0?h+1|0:h;l=(h&1)<<31|e>>>1;e=h>>>1|0;i=ki(l,e,l,e);g=_;if((m|0)==(g|0)&f>>>0>>0|g>>>0>m>>>0){continue}break}}f=F[o+20>>2];if(!f){break f}g=f-1|0;h=F[F[o+16>>2]+(g>>>3&536870908)>>2];F[o+20>>2]=g;p=1;f=ki(j,q,y,w);i=_;n=ki(r,s,K,S);m=n+f|0;f=_+i|0;f=m>>>0>>0?f+1|0:f;i=ki(l,e,E,W);g=h>>>g&1;h=g?0-i|0:i;m=h+m|0;n=f;f=_;i=n+(g?0-(f+((i|0)!=0)|0)|0:f)|0;$=o,aa=li(m,h>>>0>m>>>0?i+1|0:i,r,s),F[$+12>>2]=aa;f=ki(j,q,E,W);i=_;j=ki(r,s,Q,R);f=j+f|0;h=_+i|0;e=ki(l,e,y,w);i=0-e|0;l=_;h=(f>>>0>>0?h+1|0:h)+(g?l:0-(((e|0)!=0)+l|0)|0)|0;i=g?e:i;f=i+f|0;$=o,aa=li(f,f>>>0>>0?h+1|0:h,r,s),F[$+8>>2]=aa}Z=k+80|0;e=p;break d}ta();v()}i=e;if(!e){return 0}l:{if(F[a+8>>2]<=0){break l}l=F[M>>2];e=0;while(1){f=e<<2;g=F[f+Y>>2];j=F[a+16>>2];m:{if((g|0)>(j|0)){F[f+l>>2]=j;break m}f=f+l|0;j=F[a+12>>2];if((j|0)>(g|0)){F[f>>2]=j;break m}F[f>>2]=g}e=e+1|0;g=F[a+8>>2];if((e|0)<(g|0)){continue}break}f=0;if((g|0)<=0){break l}e=d<<3;j=e+c|0;q=b+e|0;while(1){g=f<<2;e=g+j|0;g=F[g+q>>2]+F[g+l>>2]|0;F[e>>2]=g;n:{if((g|0)>F[a+16>>2]){g=g-F[a+20>>2]|0}else{if((g|0)>=F[a+12>>2]){break n}g=g+F[a+20>>2]|0}F[e>>2]=g}f=f+1|0;if((f|0)>2]){continue}break}}d=d+1|0;if((X|0)!=(d|0)){continue}break}}return i|0}ta();v()}function hi(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,E=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,$=0,aa=0;a:{b:{if((e|0)!=2){break b}F[a+8>>2]=2;F[a- -64>>2]=f;M=a+32|0;e=F[M>>2];d=F[a+36>>2]-e|0;c:{if(d>>>0<=7){qa(M,2-(d>>>2|0)|0);break c}if((d|0)==8){break c}F[a+36>>2]=e+8}p=1;d=F[a+56>>2];d=F[d+4>>2]-F[d>>2]|0;if((d|0)<=0){break b}o=a+60|0;d=d>>>2|0;X=d>>>0<=1?1:d;Y=a+68|0;d=0;while(1){e=F[a+56>>2];h=F[e>>2];if(F[e+4>>2]-h>>2>>>0<=d>>>0){break a}k=Z-80|0;Z=k;f=-1;h=F[h+(d<<2)>>2];e=-1;d:{if((h|0)==-1){break d}e=h+1|0;f=(e>>>0)%3|0?e:h-2|0;e=h-1|0;if((h>>>0)%3|0){break d}e=h+2|0}g=F[o+36>>2];h=F[g>>2];e:{f:{g:{h:{i:{g=F[g+4>>2]-h>>2;i=f<<2;f=F[F[o+32>>2]+28>>2];j=F[i+f>>2];if(g>>>0<=j>>>0){break i}e=F[f+(e<<2)>>2];if(e>>>0>=g>>>0){break i}j:{k:{l=F[h+(e<<2)>>2];f=F[h+(j<<2)>>2];if((l|0)>=(d|0)|(f|0)>=(d|0)){break k}h=(l<<3)+c|0;w=F[h+4>>2];g=(f<<3)+c|0;e=F[g+4>>2];j=F[h>>2];h=F[g>>2];if(!((j|0)!=(h|0)|(e|0)!=(w|0))){F[o+8>>2]=h;F[o+12>>2]=e;break j}p=F[F[o+4>>2]+(d<<2)>>2];F[k+72>>2]=0;F[k+76>>2]=0;g=k- -64|0;F[g>>2]=0;F[g+4>>2]=0;F[k+56>>2]=0;F[k+60>>2]=0;g=F[o>>2];if(!G[g+84|0]){p=F[F[g+68>>2]+(p<<2)>>2]}Ga(g,p,D[g+24|0],k+56|0);p=F[F[o+4>>2]+(f<<2)>>2];F[k+48>>2]=0;F[k+52>>2]=0;F[k+40>>2]=0;F[k+44>>2]=0;F[k+32>>2]=0;F[k+36>>2]=0;g=F[o>>2];if(!G[g+84|0]){p=F[F[g+68>>2]+(p<<2)>>2]}Ga(g,p,D[g+24|0],k+32|0);p=F[F[o+4>>2]+(l<<2)>>2];F[k+24>>2]=0;F[k+28>>2]=0;F[k+16>>2]=0;F[k+20>>2]=0;F[k+8>>2]=0;F[k+12>>2]=0;g=F[o>>2];if(!G[g+84|0]){p=F[F[g+68>>2]+(p<<2)>>2]}Ga(g,p,D[g+24|0],k+8|0);g=F[k+16>>2];n=F[k+40>>2];x=g-n|0;N=F[k+44>>2];g=F[k+20>>2]-(N+(g>>>0>>0)|0)|0;H=g;l=ki(x,g,x,g);q=_;g=F[k+8>>2];z=F[k+32>>2];A=g-z|0;O=F[k+36>>2];g=F[k+12>>2]-(O+(g>>>0>>0)|0)|0;I=g;i=l;l=ki(A,g,A,g);g=i+l|0;i=_+q|0;i=g>>>0>>0?i+1|0:i;l=F[k+24>>2];B=F[k+48>>2];C=l-B|0;P=F[k+52>>2];l=F[k+28>>2]-(P+(l>>>0>>0)|0)|0;J=l;m=g;g=ki(C,l,C,l);r=m+g|0;i=_+i|0;s=g>>>0>r>>>0?i+1|0:i;if(!(s|r)){break k}p=0;E=mi(-1,2147483647,r,s);f=h>>31;R=f;i=f>>31;Q=h;g=i;q=h^g;h=q-g|0;f=(f^g)-((g>>>0>q>>>0)+g|0)|0;g=f;f=e>>31;S=f;K=e;e=f>>31;q=K^e;m=q-e|0;i=f>>31;e=(i^f)-((e>>>0>q>>>0)+i|0)|0;f=(g|0)==(e|0)&h>>>0>m>>>0|e>>>0>>0;h=f?h:m;l=_;e=f?g:e;if((l|0)==(e|0)&h>>>0>E>>>0|e>>>0>l>>>0){break e}h=F[k+64>>2];T=F[k+68>>2];e=ki(h-n|0,T-((h>>>0>>0)+N|0)|0,x,H);f=_;g=F[k+56>>2];U=F[k+60>>2];l=ki(g-z|0,U-((g>>>0>>0)+O|0)|0,A,I);e=l+e|0;i=_+f|0;i=e>>>0>>0?i+1|0:i;f=e;m=F[k+72>>2];V=F[k+76>>2];e=ki(m-B|0,V-((m>>>0>>0)+P|0)|0,C,J);l=f+e|0;f=_+i|0;q=e>>>0>l>>>0?f+1|0:f;e=j;E=e-Q|0;e=(e>>31)-((e>>>0>>0)+R|0)|0;W=e;j=e>>31;y=j^E;f=y-j|0;i=e>>31;e=(i^e)-((j>>>0>y>>>0)+i|0)|0;i=e;y=w-K|0;e=(w>>31)-((w>>>0>>0)+S|0)|0;w=e;j=f;t=e>>31;u=t^y;L=u-t|0;f=e>>31;e=(f^e)-((t>>>0>u>>>0)+f|0)|0;f=(i|0)==(e|0)&j>>>0>L>>>0|e>>>0>>0;f=mi(-1,2147483647,f?j:L,f?i:e)>>>0>>0;e=_;if(f&(e|0)<=(q|0)|(e|0)<(q|0)){break e}e=I>>31;f=e;j=e^A;e=j-e|0;f=(f^I)-((f>>>0>j>>>0)+f|0)|0;i=H>>31;t=i^x;u=t-i|0;j=(i^H)-((i>>>0>t>>>0)+i|0)|0;i=(f|0)==(j|0)&e>>>0>u>>>0|f>>>0>j>>>0;e=i?e:u;f=i?f:j;i=J>>31;L=e;t=i^C;u=t-i|0;j=(i^J)-((i>>>0>t>>>0)+i|0)|0;e=(f|0)==(j|0)&e>>>0>u>>>0|f>>>0>j>>>0;f=mi(-1,2147483647,e?L:u,e?f:j)>>>0>>0;e=_;if(f&(e|0)<=(q|0)|(e|0)<(q|0)){break e}j=1;e=0;f=n;n=li(ki(l,q,x,H),_,r,s);f=f+n|0;i=_+N|0;i=f>>>0>>0?i+1|0:i;n=h-f|0;f=T-((f>>>0>h>>>0)+i|0)|0;n=ki(n,f,n,f);x=_;f=g;i=li(ki(l,q,A,I),_,r,s);h=i+z|0;g=_+O|0;g=h>>>0>>0?g+1|0:g;i=f-h|0;f=U-((f>>>0>>0)+g|0)|0;g=ki(i,f,i,f);h=g+n|0;f=_+x|0;f=h>>>0>>0?f+1|0:f;n=h;g=li(ki(l,q,C,J),_,r,s);h=g+B|0;i=_+P|0;i=h>>>0>>0?i+1|0:i;g=m-h|0;h=V-((h>>>0>m>>>0)+i|0)|0;m=ki(g,h,g,h);h=m+n|0;g=_+f|0;f=ki(h,h>>>0>>0?g+1|0:g,r,s);h=_;m=h;if(!h&f>>>0<=1){break h}i=f;while(1){g=e<<1|j>>>31;j=j<<1;e=g;n=!h&i>>>0>7|(h|0)!=0;i=(h&3)<<30|i>>>2;h=h>>>2|0;if(n){continue}break}break g}if((d|0)>(f|0)){e=f<<1}else{if((d|0)<=0){F[o+8>>2]=0;F[o+12>>2]=0;break j}e=(d<<1)-2|0}e=(e<<2)+c|0;F[o+8>>2]=F[e>>2];F[o+12>>2]=F[e+4>>2]}p=1;break e}ta();v()}e=m;j=f;if(f-1|0){break f}}while(1){h=mi(f,m,j,e);i=e+_|0;e=h+j|0;i=e>>>0>>0?i+1|0:i;j=(i&1)<<31|e>>>1;e=i>>>1|0;h=ki(j,e,j,e);g=_;if((m|0)==(g|0)&f>>>0>>0|g>>>0>m>>>0){continue}break}}f=F[o+20>>2];if(!f){break e}g=f-1|0;i=F[F[o+16>>2]+(g>>>3&536870908)>>2];F[o+20>>2]=g;p=1;f=ki(l,q,y,w);h=_;n=ki(r,s,K,S);m=n+f|0;f=_+h|0;f=m>>>0>>0?f+1|0:f;h=ki(j,e,E,W);g=i>>>g&1;i=g?0-h|0:h;m=i+m|0;n=f;f=_;h=n+(g?0-(f+((h|0)!=0)|0)|0:f)|0;$=o,aa=li(m,i>>>0>m>>>0?h+1|0:h,r,s),F[$+12>>2]=aa;f=ki(l,q,E,W);h=_;l=ki(r,s,Q,R);f=l+f|0;i=_+h|0;e=ki(j,e,y,w);h=0-e|0;j=_;i=(f>>>0>>0?i+1|0:i)+(g?j:0-(((e|0)!=0)+j|0)|0)|0;h=g?e:h;f=h+f|0;$=o,aa=li(f,f>>>0>>0?i+1|0:i,r,s),F[$+8>>2]=aa}Z=k+80|0;if(!p){return 0}l:{if(F[a+8>>2]<=0){break l}g=F[M>>2];e=0;while(1){f=e<<2;h=F[f+Y>>2];j=F[a+16>>2];m:{if((h|0)>(j|0)){F[f+g>>2]=j;break m}f=f+g|0;j=F[a+12>>2];if((j|0)>(h|0)){F[f>>2]=j;break m}F[f>>2]=h}e=e+1|0;h=F[a+8>>2];if((e|0)<(h|0)){continue}break}f=0;if((h|0)<=0){break l}e=d<<3;j=e+c|0;l=b+e|0;while(1){h=f<<2;e=h+j|0;h=F[h+l>>2]+F[h+g>>2]|0;F[e>>2]=h;n:{if((h|0)>F[a+16>>2]){i=h-F[a+20>>2]|0}else{if((h|0)>=F[a+12>>2]){break n}i=h+F[a+20>>2]|0}F[e>>2]=i}f=f+1|0;if((f|0)>2]){continue}break}}d=d+1|0;if((X|0)!=(d|0)){continue}break}}return p|0}ta();v()}function Gd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;n=Z-96|0;Z=n;m=F[a+4>>2];d=F[m+32>>2];j=F[d+8>>2];i=F[d+12>>2];e=i;c=F[d+20>>2];f=F[d+16>>2];a:{if((e|0)<=(c|0)&f>>>0>=j>>>0|(c|0)>(e|0)){break a}o=F[d>>2];h=G[o+f|0];g=f+1|0;e=g?c:c+1|0;F[d+16>>2]=g;F[d+20>>2]=e;if((e|0)>=(i|0)&g>>>0>=j>>>0|(e|0)>(i|0)){break a}p=G[g+o|0];g=f+2|0;e=g>>>0<2?c+1|0:c;F[d+16>>2]=g;F[d+20>>2]=e;l=h<<24>>24;b:{if((l|0)>=0){k=F[a+216>>2];if(h>>>0>=(F[a+220>>2]-k|0)/144>>>0){break a}k=k+L(h,144)|0;if(F[k>>2]<0){break b}break a}if(F[a+212>>2]>=0){break a}k=a+212|0}F[k>>2]=b;c:{d:{e:{f:{g:{h:{k=H[m+36>>1];i:{if(((k<<8|k>>>8)&65535)>>>0>=258){if((e|0)>=(i|0)&g>>>0>=j>>>0|(e|0)>(i|0)){break a}e=G[g+o|0];f=f+3|0;c=f>>>0<3?c+1|0:c;F[d+16>>2]=f;F[d+20>>2]=c;if(e>>>0>1){break a}d=e>>>0<2?e:0;if(!p){break i}if(!d){break h}break a}if(p){break g}d=0}if((l|0)<0){e=a+184|0}else{c=F[a+216>>2]+L(h,144)|0;D[c+100|0]=0;e=c+104|0}if((d|0)!=1){break e}c=Z-112|0;Z=c;g=F[F[a+4>>2]+44>>2];d=ka(120);F[d>>2]=8924;F[d+4>>2]=0;F[d+116>>2]=0;F[d+112>>2]=e;F[d+108>>2]=g;F[d+12>>2]=0;F[d+16>>2]=0;F[d+20>>2]=0;F[d+24>>2]=0;F[d+28>>2]=0;F[d+32>>2]=0;F[d+36>>2]=0;F[d+40>>2]=0;F[d+44>>2]=0;F[d+48>>2]=0;F[d+52>>2]=0;F[d+56>>2]=0;F[d+60>>2]=0;F[d+8>>2]=9136;f=d- -64|0;F[f>>2]=0;F[f+4>>2]=0;F[d+72>>2]=0;F[d+76>>2]=0;F[d+80>>2]=0;F[d+84>>2]=0;F[d+88>>2]=0;F[d+104>>2]=0;F[d+96>>2]=0;F[d+100>>2]=0;f=F[a+8>>2];F[c+48>>2]=0;F[c+52>>2]=0;F[c+40>>2]=0;F[c+44>>2]=0;j=c+32|0;F[j>>2]=0;F[j+4>>2]=0;F[c+24>>2]=0;F[c+28>>2]=0;h=c- -64|0;F[h>>2]=0;F[h+4>>2]=0;F[c+72>>2]=0;F[c+76>>2]=0;F[c+80>>2]=0;F[c+84>>2]=0;F[c+88>>2]=0;F[c+104>>2]=0;F[c+16>>2]=0;F[c+20>>2]=0;F[c+56>>2]=0;F[c+60>>2]=0;F[c+8>>2]=9136;F[c+96>>2]=0;F[c+100>>2]=0;F[c+12>>2]=f;h=F[f>>2];i=F[f+4>>2];D[c+111|0]=0;k=j;j=c+111|0;Ea(k,(i-h>>2>>>0)/3|0,j);h=F[c+12>>2];i=F[h+28>>2];h=F[h+24>>2];D[c+111|0]=0;Ea(c+44|0,i-h>>2,j);F[c+28>>2]=d;F[c+24>>2]=g;F[c+20>>2]=e;F[c+16>>2]=f;f=d+8|0;e=c+8|0;lc(f,e);j:{if((e|0)==(f|0)){F[d+92>>2]=F[e+84>>2];break j}gb(d+56|0,F[e+48>>2],F[e+52>>2]);gb(d+68|0,F[e+60>>2],F[e- -64>>2]);gb(d+80|0,F[e+72>>2],F[e+76>>2]);F[d+92>>2]=F[e+84>>2];k:{h=F[e+92>>2];j=F[e+88>>2];i=h-j|0;e=i>>2;f=F[d+104>>2];g=F[d+96>>2];if(e>>>0<=f-g>>2>>>0){i=F[d+100>>2]-g|0;f=i+j|0;m=i>>2;i=e>>>0>m>>>0?f:h;l=i-j|0;if((i|0)!=(j|0)){pa(g,j,l)}if(e>>>0>m>>>0){e=F[d+100>>2];if((h|0)!=(i|0)){while(1){F[e>>2]=F[f>>2];e=e+4|0;f=f+4|0;if((h|0)!=(f|0)){continue}break}}F[d+100>>2]=e;break k}F[d+100>>2]=g+l;break k}if(g){F[d+100>>2]=g;ja(g);F[d+104>>2]=0;F[d+96>>2]=0;F[d+100>>2]=0;f=0}l:{if((i|0)<0){break l}g=f>>>1|0;e=f>>>0>=2147483644?1073741823:e>>>0>>0?g:e;if(e>>>0>=1073741824){break l}f=e<<2;e=ka(f);F[d+96>>2]=e;F[d+104>>2]=e+f;if((h|0)!=(j|0)){f=e;e=(i-4&-4)+4|0;e=la(f,j,e)+e|0}F[d+100>>2]=e;break k}na();v()}}F[c+8>>2]=9136;e=F[c+96>>2];if(e){F[c+100>>2]=e;ja(e)}e=F[c+80>>2];if(e){F[c+84>>2]=e;ja(e)}e=F[c+68>>2];if(e){F[c+72>>2]=e;ja(e)}e=F[c+56>>2];if(e){F[c+60>>2]=e;ja(e)}F[c+8>>2]=9372;e=F[c+44>>2];if(e){ja(e)}e=F[c+32>>2];if(e){ja(e)}Z=c+112|0;break d}if((l|0)>=0){break f}break a}if((l|0)<0){break a}}e=F[a+216>>2];c=F[m+44>>2];d=ka(80);F[d>>2]=9684;F[d+4>>2]=0;F[d+76>>2]=0;F[d+68>>2]=c;F[d+8>>2]=8624;F[d+12>>2]=0;F[d+16>>2]=0;F[d+20>>2]=0;F[d+24>>2]=0;F[d+28>>2]=0;F[d+32>>2]=0;F[d+36>>2]=0;F[d+40>>2]=0;F[d+44>>2]=0;F[d+48>>2]=0;F[d+52>>2]=0;e=e+L(h,144)|0;f=e+104|0;F[d+72>>2]=f;F[d- -64>>2]=0;F[d+56>>2]=0;F[d+60>>2]=0;F[n+24>>2]=c;c=n;F[c+68>>2]=0;F[c+72>>2]=0;F[c+60>>2]=0;F[c+64>>2]=0;F[c+52>>2]=0;F[c+56>>2]=0;F[c+44>>2]=0;F[c+48>>2]=0;F[c+84>>2]=0;F[c+88>>2]=0;F[c+76>>2]=0;F[c+80>>2]=0;F[c+28>>2]=d;g=F[c+28>>2];F[c+8>>2]=F[c+24>>2];F[c+12>>2]=g;F[c+20>>2]=f;f=e+4|0;F[c+16>>2]=f;F[c+36>>2]=0;F[c+40>>2]=0;F[c+32>>2]=8624;e=F[c+20>>2];F[c>>2]=F[c+16>>2];F[c+4>>2]=e;e=c+32|0;Fd(e,f,c);c=d+8|0;lc(c,e);if((c|0)!=(e|0)){gb(d+56|0,F[e+48>>2],F[e+52>>2])}Ed(e);break c}c=Z+-64|0;Z=c;g=F[F[a+4>>2]+44>>2];d=ka(80);F[d>>2]=9392;F[d+4>>2]=0;F[d+76>>2]=0;F[d+72>>2]=e;F[d+68>>2]=g;F[d+8>>2]=9556;F[d+12>>2]=0;F[d+16>>2]=0;F[d+20>>2]=0;F[d+24>>2]=0;F[d+28>>2]=0;F[d+32>>2]=0;F[d+36>>2]=0;F[d+40>>2]=0;F[d+44>>2]=0;F[d+48>>2]=0;F[d+52>>2]=0;F[d- -64>>2]=0;j=d+56|0;f=j;F[f>>2]=0;F[f+4>>2]=0;f=F[a+8>>2];F[c+40>>2]=0;F[c+44>>2]=0;F[c+32>>2]=0;F[c+36>>2]=0;h=c+24|0;F[h>>2]=0;F[h+4>>2]=0;F[c+16>>2]=0;F[c+20>>2]=0;F[c+56>>2]=0;F[c+8>>2]=0;F[c+12>>2]=0;F[c+48>>2]=0;F[c+52>>2]=0;F[c>>2]=9556;F[c+4>>2]=f;i=F[f>>2];l=F[f+4>>2];D[c+63|0]=0;k=h;h=c+63|0;Ea(k,(l-i>>2>>>0)/3|0,h);i=F[c+4>>2];l=F[i+28>>2];i=F[i+24>>2];D[c+63|0]=0;Ea(c+36|0,l-i>>2,h);F[c+20>>2]=d;F[c+16>>2]=g;F[c+12>>2]=e;F[c+8>>2]=f;lc(d+8|0,c);gb(j,F[c+48>>2],F[c+52>>2]);F[c>>2]=9556;e=F[c+48>>2];if(e){F[c+52>>2]=e;ja(e)}F[c>>2]=9372;e=F[c+36>>2];if(e){ja(e)}e=F[c+24>>2];if(e){ja(e)}Z=c- -64|0}if(!d){break a}}d=yc(ka(64),d);c=F[a+4>>2];a=d;d=b;m:{n:{if((d|0)>=0){g=c+8|0;b=F[c+12>>2];j=F[c+8>>2];e=b-j>>2;o:{if((e|0)>(d|0)){break o}f=d+1|0;if(d>>>0>=e>>>0){Pb(g,f-e|0);break o}if(e>>>0<=f>>>0){break o}f=j+(f<<2)|0;if((f|0)!=(b|0)){while(1){b=b-4|0;e=F[b>>2];F[b>>2]=0;if(e){$[F[F[e>>2]+4>>2]](e)}if((b|0)!=(f|0)){continue}break}}F[c+12>>2]=f}c=F[g>>2]+(d<<2)|0;b=F[c>>2];F[c>>2]=a;if(b){break n}break m}b=a;if(!a){break m}}$[F[F[b>>2]+4>>2]](b)}q=(d^-1)>>>31|0}Z=n+96|0;return q|0}function Ab(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=M(0),n=M(0),o=0;a:{b:{if(!d){break b}c:{switch(F[a+28>>2]-1|0){case 0:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}E[(g<<1)+d>>1]=D[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 1:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}E[(g<<1)+d>>1]=G[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 2:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}E[(g<<1)+d>>1]=H[b>>1];b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 3:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){return 0}e=E[b>>1];if((e|0)<0){break b}E[(g<<1)+d>>1]=e;b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 4:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}e=F[b>>2];if(e+32768>>>0>65535){break b}E[(g<<1)+d>>1]=e;b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 5:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}e=F[b>>2];if(e>>>0>32767){break b}E[(g<<1)+d>>1]=e;b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 6:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;k=F[e+4>>2];while(1){if(b>>>0>=k>>>0){break b}h=F[b+4>>2];e=F[b>>2];i=e+32768|0;h=i>>>0<32768?h+1|0:h;if(!h&i>>>0>65535|h){break b}E[(g<<1)+d>>1]=e;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 7:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}k=F[b+4>>2];e=F[b>>2];if(!k&e>>>0>32767|k){break b}E[(g<<1)+d>>1]=e;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 8:d:{e:{e=G[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break e}e=F[a>>2];j=F[e>>2];g=j;f=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=F[e+4>>2];e=f-j|0;if(!G[a+32|0]){j=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=J[g>>2];if(m>=M(32767)|m>1]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}j=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=J[g>>2];if(m>=M(32767)|mM(1)){break d}e=(b<<1)+d|0;l=R(+m*32767+.5);f:{if(N(l)<2147483648){i=~~l;break f}i=-2147483648}E[e>>1]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}j=1;if(c>>>0<=e>>>0){break d}ma((e<<1)+d|0,0,c-e<<1)}return j;case 9:g:{h:{e=G[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break h}e=F[a>>2];j=F[e>>2];g=j;f=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=F[e+4>>2];e=f-j|0;if(!G[a+32|0]){j=0;if((b|0)>=(e|0)){break g}b=0;while(1){l=K[g>>3];if(l>=32767|l<-32768|l!=l){break g}o=N(l);if(o==Infinity){break g}e=(b<<1)+d|0;if(o<2147483648){i=~~l}else{i=-2147483648}E[e>>1]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}j=0;if((b|0)>=(e|0)){break g}b=0;while(1){l=K[g>>3];if(l>=32767|l<-32768|(N(l)==Infinity|l!=l)){break g}if(l<0|l>1){break g}e=(b<<1)+d|0;l=R(l*32767+.5);i:{if(N(l)<2147483648){i=~~l;break i}i=-2147483648}E[e>>1]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}j=1;if(c>>>0<=e>>>0){break g}ma((e<<1)+d|0,0,c-e<<1)}return j;case 10:break c;default:break b}}e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}E[(g<<1)+d>>1]=G[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}ma((e<<1)+d|0,0,(c&255)-e<<1)}return j}ma((e<<1)+d|0,0,(c&255)-e<<1);return 1}function yb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=M(0),n=M(0),o=0;a:{b:{if(!d){break b}c:{switch(F[a+28>>2]-1|0){case 0:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}F[(g<<2)+d>>2]=D[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 1:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}F[(g<<2)+d>>2]=G[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 2:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}F[(g<<2)+d>>2]=E[b>>1];b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 3:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}F[(g<<2)+d>>2]=H[b>>1];b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 4:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}F[(g<<2)+d>>2]=F[b>>2];b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 5:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){return 0}e=F[b>>2];if((e|0)<0){break b}F[(g<<2)+d>>2]=e;b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 6:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;k=F[e+4>>2];while(1){if(b>>>0>=k>>>0){break b}h=F[b+4>>2];e=F[b>>2];if(e- -2147483648>>>0<2147483648?h+1|0:h){break b}F[(g<<2)+d>>2]=e;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 7:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}k=F[b+4>>2];e=F[b>>2];if(!k&e>>>0>2147483647|k){break b}F[(g<<2)+d>>2]=e;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}break a;case 8:d:{e:{e=G[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break e}e=F[a>>2];j=F[e>>2];g=j;f=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=F[e+4>>2];e=f-j|0;if(!G[a+32|0]){j=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=J[g>>2];if(m>=M(2147483648)|m>2]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}j=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=J[g>>2];if(m>=M(2147483648)|mM(1)){break d}e=(b<<2)+d|0;l=R(+m*2147483647+.5);f:{if(N(l)<2147483648){i=~~l;break f}i=-2147483648}F[e>>2]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}j=1;if(c>>>0<=e>>>0){break d}ma((e<<2)+d|0,0,c-e<<2)}return j;case 9:g:{h:{e=G[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break h}e=F[a>>2];j=F[e>>2];g=j;f=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=F[e+4>>2];e=f-j|0;if(!G[a+32|0]){j=0;if((b|0)>=(e|0)){break g}b=0;while(1){l=K[g>>3];if(l>=2147483647|l<-2147483648|l!=l){break g}o=N(l);if(o==Infinity){break g}e=(b<<2)+d|0;if(o<2147483648){i=~~l}else{i=-2147483648}F[e>>2]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}j=0;if((b|0)>=(e|0)){break g}b=0;while(1){l=K[g>>3];if(l>=2147483647|l<-2147483648|(N(l)==Infinity|l!=l)){break g}if(l<0|l>1){break g}e=(b<<2)+d|0;l=R(l*2147483647+.5);i:{if(N(l)<2147483648){i=~~l;break i}i=-2147483648}F[e>>2]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}j=1;if(c>>>0<=e>>>0){break g}ma((e<<2)+d|0,0,c-e<<2)}return j;case 10:break c;default:break b}}e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}F[(g<<2)+d>>2]=G[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}j=1;if(e>>>0>=f>>>0){break b}ma((e<<2)+d|0,0,(c&255)-e<<2)}return j}ma((e<<2)+d|0,0,(c&255)-e<<2);return 1}function zb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=M(0);a:{b:{if(!d){break b}c:{switch(F[a+28>>2]-1|0){case 0:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){return 0}e=D[b|0];if((e|0)<0){break b}E[(g<<1)+d>>1]=e&255;b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 1:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}E[(g<<1)+d>>1]=G[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 2:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){return 0}e=E[b>>1];if((e|0)<0){break b}E[(g<<1)+d>>1]=e;b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 3:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}E[(g<<1)+d>>1]=H[b>>1];b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 4:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}e=F[b>>2];if(e>>>0>65535){break b}E[(g<<1)+d>>1]=e;b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 5:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}e=F[b>>2];if(e>>>0>65535){break b}E[(g<<1)+d>>1]=e;b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 6:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}k=F[b+4>>2];e=F[b>>2];if(!k&e>>>0>65535|k){break b}E[(g<<1)+d>>1]=e;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 7:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}k=F[b+4>>2];e=F[b>>2];if(!k&e>>>0>65535|k){break b}E[(g<<1)+d>>1]=e;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}break a;case 8:d:{e:{e=G[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break e}e=F[a>>2];l=F[e>>2];g=l;f=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=F[e+4>>2];e=f-l|0;if(!G[a+32|0]){l=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=J[g>>2];if(m>=M(65535)|m=M(0)){i=~~m>>>0}else{i=0}E[e>>1]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}l=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=J[g>>2];if(m>=M(65535)|mM(1)){break d}e=(b<<1)+d|0;j=R(+m*65535+.5);f:{if(j<4294967296&j>=0){i=~~j>>>0;break f}i=0}E[e>>1]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}l=1;if(c>>>0<=e>>>0){break d}ma((e<<1)+d|0,0,c-e<<1)}return l;case 9:g:{h:{e=G[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break h}e=F[a>>2];l=F[e>>2];g=l;f=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=F[e+4>>2];e=f-l|0;if(!G[a+32|0]){l=0;if((b|0)>=(e|0)){break g}b=0;while(1){j=K[g>>3];if(j>=65535|j<0|(N(j)==Infinity|j!=j)){break g}e=(b<<1)+d|0;if(j<4294967296&j>=0){i=~~j>>>0}else{i=0}E[e>>1]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}l=0;if((b|0)>=(e|0)){break g}b=0;while(1){j=K[g>>3];if(j>=65535|j<0|(N(j)==Infinity|j!=j)){break g}if(j>1){break g}e=(b<<1)+d|0;j=R(j*65535+.5);i:{if(j<4294967296&j>=0){i=~~j>>>0;break i}i=0}E[e>>1]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}l=1;if(c>>>0<=e>>>0){break g}ma((e<<1)+d|0,0,c-e<<1)}return l;case 10:break c;default:break b}}e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];k=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+k|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}E[(g<<1)+d>>1]=G[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break b}ma((e<<1)+d|0,0,(c&255)-e<<1)}return l}ma((e<<1)+d|0,0,(c&255)-e<<1);return 1}function Ga(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=M(0),l=0,m=0,n=M(0),o=0;a:{if(!d){break a}b:{c:{switch(F[a+28>>2]-1|0){case 0:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;i=D[b|0];F[e>>2]=i;F[e+4>>2]=i>>31;b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 1:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;F[e>>2]=G[b|0];F[e+4>>2]=0;b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 2:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;i=E[b>>1];F[e>>2]=i;F[e+4>>2]=i>>31;b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 3:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;F[e>>2]=H[b>>1];F[e+4>>2]=0;b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 4:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;i=F[b>>2];F[e>>2]=i;F[e+4>>2]=i>>31;b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 5:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;F[e>>2]=F[b>>2];F[e+4>>2]=0;b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 6:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}i=F[b+4>>2];e=(g<<3)+d|0;F[e>>2]=F[b>>2];F[e+4>>2]=i;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 7:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=F[b>>2];i=F[b+4>>2];if((i|0)<0){break a}j=(g<<3)+d|0;F[j>>2]=e;F[j+4>>2]=i;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 8:d:{e=G[a+24|0];f=c&255;if(!(e>>>0>>0?e:f)){break d}if(G[a+32|0]){break a}e=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);j=b;b=b+e|0;e=F[a>>2];i=F[e+4>>2];e=F[e>>2];if((b|0)>=(i-e|0)){break a}g=b+e|0;h=c&255;b=0;while(1){k=J[g>>2];if(k>=M(0x8000000000000000)|k=M(1)?~~(k>M(0)?M(P(M(R(M(k*M(2.3283064365386963e-10)))),M(4294967296))):M(S(M(M(k-M(~~k>>>0>>>0))*M(2.3283064365386963e-10)))))>>>0:0;m=~~k>>>0;break e}j=-2147483648;m=0}F[e>>2]=m;F[e+4>>2]=j;b=b+1|0;e=G[a+24|0];if(b>>>0>=(e>>>0>>0?e:h)>>>0){break d}g=g+4|0;if(i>>>0>g>>>0){continue}break}break a}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 9:f:{e=G[a+24|0];f=c&255;if(!(e>>>0>>0?e:f)){break f}if(G[a+32|0]){break a}e=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);j=b;b=b+e|0;e=F[a>>2];i=F[e+4>>2];e=F[e>>2];if((b|0)>=(i-e|0)){break a}g=b+e|0;h=c&255;b=0;while(1){l=K[g>>3];if(l>=0x8000000000000000|l<-0x8000000000000000|l!=l){break a}o=N(l);if(o==Infinity){break a}e=(b<<3)+d|0;g:{if(o<0x8000000000000000){j=N(l)>=1?~~(l>0?P(R(l*2.3283064365386963e-10),4294967295):S((l-+(~~l>>>0>>>0))*2.3283064365386963e-10))>>>0:0;m=~~l>>>0;break g}j=-2147483648;m=0}F[e>>2]=m;F[e+4>>2]=j;b=b+1|0;e=G[a+24|0];if(b>>>0>=(e>>>0>>0?e:h)>>>0){break f}g=g+8|0;if(i>>>0>g>>>0){continue}break}break a}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0;break b;case 10:break c;default:break a}}e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);j=b;b=b+i|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break a}e=(g<<3)+d|0;F[e>>2]=G[b|0];F[e+4>>2]=0;b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}if(e>>>0>=f>>>0){break a}d=(e<<3)+d|0;a=(c&255)-e|0}ma(d,0,a<<3)}}function le(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;j=a;a:{b:{c:{d:{e:{f:{g:{h:{a=F[a+8>>2];switch(F[a+28>>2]-1|0){case 4:break c;case 5:break d;case 2:break e;case 3:break f;case 0:break g;case 1:break h;default:break a}}f=G[a+24|0];c=ka(f);a=F[j+16>>2];if(F[a+80>>2]){g=F[F[a>>2]>>2]+F[a+48>>2]|0}else{g=0}if(!b){break b}if(f){o=f&252;l=f&3;h=f>>>0<4;while(1){a=0;e=0;if(!h){while(1){k=g+(d<<2)|0;D[a+c|0]=F[k>>2];D[(a|1)+c|0]=F[k+4>>2];D[(a|2)+c|0]=F[k+8>>2];D[(a|3)+c|0]=F[k+12>>2];a=a+4|0;d=d+4|0;e=e+4|0;if((o|0)!=(e|0)){continue}break}}e=0;if(l){while(1){D[a+c|0]=F[g+(d<<2)>>2];a=a+1|0;d=d+1|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}la(F[F[F[j+8>>2]+64>>2]>>2]+m|0,c,f);m=f+m|0;n=n+1|0;if((n|0)!=(b|0)){continue}break}break b}a=0;if((b|0)!=1){g=b&-2;while(1){la(F[F[F[j+8>>2]+64>>2]>>2]+a|0,c,f);a=a+f|0;la(a+F[F[F[j+8>>2]+64>>2]>>2]|0,c,f);a=a+f|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}}if(!(b&1)){break b}la(F[F[F[j+8>>2]+64>>2]>>2]+a|0,c,f);break b}f=G[a+24|0];c=ka(f);a=F[j+16>>2];if(F[a+80>>2]){g=F[F[a>>2]>>2]+F[a+48>>2]|0}else{g=0}if(!b){break b}if(f){o=f&252;l=f&3;h=f>>>0<4;while(1){a=0;e=0;if(!h){while(1){k=g+(d<<2)|0;D[a+c|0]=F[k>>2];D[(a|1)+c|0]=F[k+4>>2];D[(a|2)+c|0]=F[k+8>>2];D[(a|3)+c|0]=F[k+12>>2];a=a+4|0;d=d+4|0;e=e+4|0;if((o|0)!=(e|0)){continue}break}}e=0;if(l){while(1){D[a+c|0]=F[g+(d<<2)>>2];a=a+1|0;d=d+1|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}la(F[F[F[j+8>>2]+64>>2]>>2]+m|0,c,f);m=f+m|0;n=n+1|0;if((n|0)!=(b|0)){continue}break}break b}a=0;if((b|0)!=1){g=b&-2;while(1){la(F[F[F[j+8>>2]+64>>2]>>2]+a|0,c,f);a=a+f|0;la(a+F[F[F[j+8>>2]+64>>2]>>2]|0,c,f);a=a+f|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}}if(!(b&1)){break b}la(F[F[F[j+8>>2]+64>>2]>>2]+a|0,c,f);break b}h=G[a+24|0];i=h<<1;c=ka(i);a=F[j+16>>2];if(F[a+80>>2]){g=F[F[a>>2]>>2]+F[a+48>>2]|0}else{g=0}if(!b){break b}if(h){o=h&252;l=h&3;h=h>>>0<4;while(1){a=0;e=0;if(!h){while(1){f=a<<1;k=g+(d<<2)|0;E[f+c>>1]=F[k>>2];E[(f|2)+c>>1]=F[k+4>>2];E[(f|4)+c>>1]=F[k+8>>2];E[(f|6)+c>>1]=F[k+12>>2];a=a+4|0;d=d+4|0;e=e+4|0;if((o|0)!=(e|0)){continue}break}}e=0;if(l){while(1){E[(a<<1)+c>>1]=F[g+(d<<2)>>2];a=a+1|0;d=d+1|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}la(F[F[F[j+8>>2]+64>>2]>>2]+n|0,c,i);n=i+n|0;m=m+1|0;if((m|0)!=(b|0)){continue}break}break b}a=0;if((b|0)!=1){g=b&-2;while(1){la(F[F[F[j+8>>2]+64>>2]>>2]+a|0,c,i);a=a+i|0;la(a+F[F[F[j+8>>2]+64>>2]>>2]|0,c,i);a=a+i|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}}if(!(b&1)){break b}la(F[F[F[j+8>>2]+64>>2]>>2]+a|0,c,i);break b}h=G[a+24|0];i=h<<1;c=ka(i);a=F[j+16>>2];if(F[a+80>>2]){g=F[F[a>>2]>>2]+F[a+48>>2]|0}else{g=0}if(!b){break b}if(h){o=h&252;l=h&3;h=h>>>0<4;while(1){a=0;e=0;if(!h){while(1){f=a<<1;k=g+(d<<2)|0;E[f+c>>1]=F[k>>2];E[(f|2)+c>>1]=F[k+4>>2];E[(f|4)+c>>1]=F[k+8>>2];E[(f|6)+c>>1]=F[k+12>>2];a=a+4|0;d=d+4|0;e=e+4|0;if((o|0)!=(e|0)){continue}break}}e=0;if(l){while(1){E[(a<<1)+c>>1]=F[g+(d<<2)>>2];a=a+1|0;d=d+1|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}la(F[F[F[j+8>>2]+64>>2]>>2]+n|0,c,i);n=i+n|0;m=m+1|0;if((m|0)!=(b|0)){continue}break}break b}a=0;if((b|0)!=1){g=b&-2;while(1){la(F[F[F[j+8>>2]+64>>2]>>2]+a|0,c,i);a=a+i|0;la(a+F[F[F[j+8>>2]+64>>2]>>2]|0,c,i);a=a+i|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}}if(!(b&1)){break b}la(F[F[F[j+8>>2]+64>>2]>>2]+a|0,c,i);break b}h=G[a+24|0];i=h<<2;c=ka(i);a=F[j+16>>2];if(F[a+80>>2]){g=F[F[a>>2]>>2]+F[a+48>>2]|0}else{g=0}if(!b){break b}if(h){o=h&252;l=h&3;h=h>>>0<4;while(1){a=0;e=0;if(!h){while(1){f=a<<2;k=g+(d<<2)|0;F[f+c>>2]=F[k>>2];F[(f|4)+c>>2]=F[k+4>>2];F[(f|8)+c>>2]=F[k+8>>2];F[(f|12)+c>>2]=F[k+12>>2];a=a+4|0;d=d+4|0;e=e+4|0;if((o|0)!=(e|0)){continue}break}}e=0;if(l){while(1){F[(a<<2)+c>>2]=F[g+(d<<2)>>2];a=a+1|0;d=d+1|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}la(F[F[F[j+8>>2]+64>>2]>>2]+n|0,c,i);n=i+n|0;m=m+1|0;if((m|0)!=(b|0)){continue}break}break b}a=0;if((b|0)!=1){g=b&-2;while(1){la(F[F[F[j+8>>2]+64>>2]>>2]+a|0,c,i);a=a+i|0;la(a+F[F[F[j+8>>2]+64>>2]>>2]|0,c,i);a=a+i|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}}if(!(b&1)){break b}la(F[F[F[j+8>>2]+64>>2]>>2]+a|0,c,i);break b}h=G[a+24|0];i=h<<2;c=ka(i);a=F[j+16>>2];if(F[a+80>>2]){g=F[F[a>>2]>>2]+F[a+48>>2]|0}else{g=0}if(!b){break b}if(h){o=h&252;l=h&3;h=h>>>0<4;while(1){a=0;e=0;if(!h){while(1){f=a<<2;k=g+(d<<2)|0;F[f+c>>2]=F[k>>2];F[(f|4)+c>>2]=F[k+4>>2];F[(f|8)+c>>2]=F[k+8>>2];F[(f|12)+c>>2]=F[k+12>>2];a=a+4|0;d=d+4|0;e=e+4|0;if((o|0)!=(e|0)){continue}break}}e=0;if(l){while(1){F[(a<<2)+c>>2]=F[g+(d<<2)>>2];a=a+1|0;d=d+1|0;e=e+1|0;if((l|0)!=(e|0)){continue}break}}la(F[F[F[j+8>>2]+64>>2]>>2]+n|0,c,i);n=i+n|0;m=m+1|0;if((m|0)!=(b|0)){continue}break}break b}a=0;if((b|0)!=1){g=b&-2;while(1){la(F[F[F[j+8>>2]+64>>2]>>2]+a|0,c,i);a=a+i|0;la(a+F[F[F[j+8>>2]+64>>2]>>2]|0,c,i);a=a+i|0;d=d+2|0;if((g|0)!=(d|0)){continue}break}}if(!(b&1)){break b}la(F[F[F[j+8>>2]+64>>2]>>2]+a|0,c,i)}ja(c);c=1}return c|0}function xb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=M(0);a:{b:{if(!d){break b}c:{switch(F[a+28>>2]-1|0){case 0:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];l=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}F[(g<<2)+d>>2]=D[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 1:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];l=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}F[(g<<2)+d>>2]=G[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 2:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];l=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}F[(g<<2)+d>>2]=E[b>>1];b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 3:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];l=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}F[(g<<2)+d>>2]=H[b>>1];b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 4:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];l=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}F[(g<<2)+d>>2]=F[b>>2];b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 5:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];l=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}F[(g<<2)+d>>2]=F[b>>2];b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 6:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];l=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}e=F[b>>2];if(F[b+4>>2]){break b}F[(g<<2)+d>>2]=e;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 7:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];l=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}e=F[b>>2];if(F[b+4>>2]){break b}F[(g<<2)+d>>2]=e;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 8:d:{e:{e=G[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break e}e=F[a>>2];k=F[e>>2];g=k;f=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=F[e+4>>2];e=f-k|0;if(!G[a+32|0]){k=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=J[g>>2];if(m>=M(4294967296)|m=M(0)){i=~~m>>>0}else{i=0}F[e>>2]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}k=0;if((b|0)>=(e|0)){break d}b=0;while(1){m=J[g>>2];if(m>=M(4294967296)|mM(1)){break d}e=(b<<2)+d|0;j=R(+m*4294967295+.5);f:{if(j<4294967296&j>=0){i=~~j>>>0;break f}i=0}F[e>>2]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break e}g=g+4|0;if(f>>>0>g>>>0){continue}break}break d}k=1;if(c>>>0<=e>>>0){break d}ma((e<<2)+d|0,0,c-e<<2)}return k;case 9:g:{h:{e=G[a+24|0];c=c&255;if(!(c>>>0>e>>>0?e:c)){break h}e=F[a>>2];k=F[e>>2];g=k;f=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+f|0;g=b+g|0;f=F[e+4>>2];e=f-k|0;if(!G[a+32|0]){k=0;if((b|0)>=(e|0)){break g}b=0;while(1){j=K[g>>3];if(j>=4294967295|j<0|(N(j)==Infinity|j!=j)){break g}e=(b<<2)+d|0;if(j<4294967296&j>=0){i=~~j>>>0}else{i=0}F[e>>2]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}k=0;if((b|0)>=(e|0)){break g}b=0;while(1){j=K[g>>3];if(j>=4294967295|j<0|(N(j)==Infinity|j!=j)){break g}if(j>1){break g}e=(b<<2)+d|0;j=R(j*4294967295+.5);i:{if(j<4294967296&j>=0){i=~~j>>>0;break i}i=0}F[e>>2]=i;b=b+1|0;e=G[a+24|0];if(b>>>0>=(c>>>0>e>>>0?e:c)>>>0){break h}g=g+8|0;if(f>>>0>g>>>0){continue}break}break g}k=1;if(c>>>0<=e>>>0){break g}ma((e<<2)+d|0,0,c-e<<2)}return k;case 10:break c;default:break b}}e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];h=F[e>>2];l=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);i=b;b=b+l|0;b=b+h|0;h=F[e+4>>2];while(1){if(b>>>0>=h>>>0){break b}F[(g<<2)+d>>2]=G[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}ma((e<<2)+d|0,0,(c&255)-e<<2)}return k}ma((e<<2)+d|0,0,(c&255)-e<<2);return 1}function rd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;a:{b:{c:{d:{e:{if(F[a+92>>2]==F[a+88>>2]){break e}c=F[a+52>>2];f:{if((c|0)!=F[a+56>>2]){F[c>>2]=b;F[a+52>>2]=c+4;break f}h=F[a+48>>2];g=c-h|0;d=g>>2;f=d+1|0;if(f>>>0>=1073741824){break a}e=g>>>1|0;g=g>>>0>=2147483644?1073741823:f>>>0>>0?e:f;if(g){if(g>>>0>=1073741824){break d}e=ka(g<<2)}else{e=0}f=e+(d<<2)|0;F[f>>2]=b;d=f+4|0;if((c|0)!=(h|0)){while(1){f=f-4|0;c=c-4|0;F[f>>2]=F[c>>2];if((c|0)!=(h|0)){continue}break}}F[a+56>>2]=e+(g<<2);F[a+52>>2]=d;F[a+48>>2]=f;if(!h){break f}ja(h)}F[a+84>>2]=0;c=-1;e=-1;g:{if((b|0)==-1){break g}d=F[a+4>>2];e=b+1|0;e=(e>>>0)%3|0?e:b-2|0;if((e|0)!=-1){c=F[F[d>>2]+(e<<2)>>2]}h:{if((b>>>0)%3|0){l=b-1|0;break h}l=b+2|0;e=-1;if((l|0)==-1){break g}}e=F[F[d>>2]+(l<<2)>>2]}i=e>>>3&536870908;d=F[a+36>>2];h=d+(c>>>3&536870908)|0;g=F[h>>2];f=1<>2]=f|g;f=a+8|0;if((b|0)!=-1){d=b+1|0;d=(d>>>0)%3|0?d:b-2|0}else{d=-1}Ka(f,c,d);d=F[a+36>>2]}f=d+i|0;d=F[f>>2];c=1<>2]=c|d;d=a+8|0;c=-1;i:{if((b|0)==-1){break i}c=b-1|0;if((b>>>0)%3|0){break i}c=b+2|0}Ka(d,e,c)}c=-1;c=(b|0)!=-1?F[F[F[a+4>>2]>>2]+(b<<2)>>2]:c;f=F[a+36>>2]+(c>>>3&536870908)|0;d=F[f>>2];e=1<>2]=d|e;Ka(a+8|0,c,b)}d=F[a+84>>2];if((d|0)>2){break e}while(1){e=L(d,12)+a|0;b=F[e+52>>2];if((b|0)==F[e+48>>2]){d=d+1|0;if((d|0)!=3){continue}break e}b=b-4|0;c=F[b>>2];F[e+52>>2]=b;F[a+84>>2]=d;if((c|0)==-1){break e}f=F[a+24>>2];b=(c>>>0)/3|0;j:{if(F[f+(b>>>3&268435452)>>2]>>>b&1){break j}k:{while(1){k=(c>>>0)/3|0;b=(k>>>3&268435452)+f|0;F[b>>2]=F[b>>2]|1<>2]>>2]+(c<<2)>>2]:d;f=F[a+36>>2]+(d>>>3&536870908)|0;e=F[f>>2];b=1<>2]=b|e;i=F[(F[F[a+16>>2]+96>>2]+L(k,12)|0)+((c>>>0)%3<<2)>>2];l=F[F[a+20>>2]+4>>2];f=F[l+4>>2];t:{if((f|0)!=F[l+8>>2]){F[f>>2]=i;F[l+4>>2]=f+4;break t}j=F[l>>2];h=f-j|0;g=h>>2;e=g+1|0;if(e>>>0>=1073741824){break s}b=h>>>1|0;h=h>>>0>=2147483644?1073741823:b>>>0>e>>>0?b:e;if(h){if(h>>>0>=1073741824){break d}e=ka(h<<2)}else{e=0}b=e+(g<<2)|0;F[b>>2]=i;g=b+4|0;if((f|0)!=(j|0)){while(1){b=b-4|0;f=f-4|0;F[b>>2]=F[f>>2];if((f|0)!=(j|0)){continue}break}}F[l+8>>2]=e+(h<<2);F[l+4>>2]=g;F[l>>2]=b;if(!j){break t}ja(j)}j=F[a+12>>2];f=F[j+4>>2];u:{if((f|0)!=F[j+8>>2]){F[f>>2]=c;F[j+4>>2]=f+4;break u}i=F[j>>2];h=f-i|0;g=h>>2;e=g+1|0;if(e>>>0>=1073741824){break r}b=h>>>1|0;h=h>>>0>=2147483644?1073741823:b>>>0>e>>>0?b:e;if(h){if(h>>>0>=1073741824){break d}e=ka(h<<2)}else{e=0}b=e+(g<<2)|0;F[b>>2]=c;g=b+4|0;if((f|0)!=(i|0)){while(1){b=b-4|0;f=f-4|0;F[b>>2]=F[f>>2];if((f|0)!=(i|0)){continue}break}}F[j+8>>2]=e+(h<<2);F[j+4>>2]=g;F[j>>2]=b;if(!i){break u}ja(i)}b=F[a+12>>2];F[F[b+12>>2]+(d<<2)>>2]=F[b+24>>2];F[b+24>>2]=F[b+24>>2]+1}if((c|0)==-1){break k}g=F[a+4>>2];f=-1;b=c+1|0;b=(b>>>0)%3|0?b:c-2|0;if((b|0)!=-1){f=F[F[g+12>>2]+(b<<2)>>2]}v:{w:{if((L(k,3)|0)!=(c|0)){d=c-1|0;break w}d=c+2|0;c=-1;if((d|0)==-1){break v}}c=F[F[g+12>>2]+(d<<2)>>2]}d=(c|0)==-1;e=(c>>>0)/3|0;if((f|0)!=-1){b=(f>>>0)/3|0;b=F[F[a+24>>2]+(b>>>3&268435452)>>2]&1<>2]+(b>>>3&536870908)>>2]>>>b&1){break x}k=0;b=F[F[g>>2]+(c<<2)>>2];if(!(F[F[a+36>>2]+(b>>>3&536870908)>>2]>>>b&1)){b=F[a+88>>2]+(b<<2)|0;e=F[b>>2];F[b>>2]=e+1;k=(e|0)<=0?2:1}if(F[a+84>>2]>=(k|0)&l){break m}j=L(k,12)+a|0;b=F[j+52>>2];y:{if((b|0)!=F[j+56>>2]){F[b>>2]=c;F[j+52>>2]=b+4;break y}i=F[j+48>>2];h=b-i|0;d=h>>2;g=d+1|0;if(g>>>0>=1073741824){break c}e=h>>>1|0;g=h>>>0>=2147483644?1073741823:e>>>0>g>>>0?e:g;if(g){if(g>>>0>=1073741824){break d}e=ka(g<<2)}else{e=0}d=e+(d<<2)|0;F[d>>2]=c;c=d+4|0;if((b|0)!=(i|0)){while(1){d=d-4|0;b=b-4|0;F[d>>2]=F[b>>2];if((b|0)!=(i|0)){continue}break}}F[j+48>>2]=d;F[j+52>>2]=c;F[j+56>>2]=e+(g<<2);if(!i){break y}ja(i)}if(F[a+84>>2]<=(k|0)){break x}F[a+84>>2]=k}if(l){break k}c=-1;if((f|0)==-1){break n}}c=F[F[F[a+4>>2]>>2]+(f<<2)>>2]}b=0;if(!(F[F[a+36>>2]+(c>>>3&536870908)>>2]>>>c&1)){b=F[a+88>>2]+(c<<2)|0;c=F[b>>2];F[b>>2]=c+1;b=(c|0)<=0?2:1}if(F[a+84>>2]<(b|0)){break l}c=f}f=F[a+24>>2];continue}break}k=L(b,12)+a|0;c=F[k+52>>2];z:{if((c|0)!=F[k+56>>2]){F[c>>2]=f;F[k+52>>2]=c+4;break z}i=F[k+48>>2];h=c-i|0;d=h>>2;g=d+1|0;if(g>>>0>=1073741824){break b}e=h>>>1|0;g=h>>>0>=2147483644?1073741823:e>>>0>g>>>0?e:g;if(g){if(g>>>0>=1073741824){break d}e=ka(g<<2)}else{e=0}d=e+(d<<2)|0;F[d>>2]=f;f=d+4|0;if((c|0)!=(i|0)){while(1){d=d-4|0;c=c-4|0;F[d>>2]=F[c>>2];if((c|0)!=(i|0)){continue}break}}F[k+48>>2]=d;F[k+52>>2]=f;F[k+56>>2]=e+(g<<2);if(!i){break z}ja(i)}d=F[a+84>>2];if((d|0)<=(b|0)){break j}F[a+84>>2]=b;d=b;break j}d=F[a+84>>2]}if((d|0)<3){continue}break}}return 1}oa();v()}na();v()}na();v()}na();v()}function Mc(a){var b=0,c=0,d=0,e=0,f=0,g=0;e=Z-16|0;Z=e;F[e+12>>2]=a;a:{if(a>>>0<=211){d=F[Lc(10352,10544,e+12|0)>>2];break a}if(a>>>0>=4294967292){V();v()}f=(a>>>0)/210|0;d=L(f,210);F[e+8>>2]=a-d;g=Lc(10544,10736,e+8|0)-10544>>2;while(1){d=F[(g<<2)+10544>>2]+d|0;a=5;while(1){b:{if((a|0)==47){a=211;while(1){b=(d>>>0)/(a>>>0)|0;if(b>>>0>>0){break a}if((L(a,b)|0)==(d|0)){break b}b=a+10|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+12|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+16|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+18|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+22|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+28|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+30|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+36|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+40|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+42|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+46|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+52|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+58|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+60|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+66|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+70|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+72|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+78|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+82|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+88|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+96|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+100|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+102|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+106|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+108|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+112|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+120|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+126|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+130|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+136|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+138|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+142|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+148|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+150|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+156|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+162|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+166|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+168|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+172|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+178|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+180|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+186|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+190|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+192|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+196|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+198|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}if((L(b,c)|0)==(d|0)){break b}b=a+208|0;c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}a=a+210|0;if((L(b,c)|0)!=(d|0)){continue}break}break b}b=F[(a<<2)+10352>>2];c=(d>>>0)/(b>>>0)|0;if(b>>>0>c>>>0){break a}a=a+1|0;if((L(b,c)|0)!=(d|0)){continue}}break}d=g+1|0;a=(d|0)==48;g=a?0:d;f=a+f|0;d=L(f,210);continue}}Z=e+16|0;return d}function lb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=M(0),k=0,l=0;a:{if(!d){break a}b:{c:{switch(F[a+28>>2]-1|0){case 0:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];g=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=F[e+4>>2];i=G[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=M(D[b|0]);J[(h<<2)+d>>2]=i?M(j/M(127)):j;b=b+1|0;h=h+1|0;e=G[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 1:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];g=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=F[e+4>>2];i=G[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=M(G[b|0]);J[(h<<2)+d>>2]=i?M(j/M(255)):j;b=b+1|0;h=h+1|0;e=G[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 2:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];g=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=F[e+4>>2];i=G[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=M(E[b>>1]);J[(h<<2)+d>>2]=i?M(j/M(32767)):j;b=b+2|0;h=h+1|0;e=G[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 3:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];g=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=F[e+4>>2];i=G[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=M(H[b>>1]);J[(h<<2)+d>>2]=i?M(j/M(65535)):j;b=b+2|0;h=h+1|0;e=G[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 4:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];g=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=F[e+4>>2];i=G[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=M(F[b>>2]);J[(h<<2)+d>>2]=i?M(j*M(4.656612873077393e-10)):j;b=b+4|0;h=h+1|0;e=G[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 5:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];g=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=F[e+4>>2];i=G[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=M(I[b>>2]);J[(h<<2)+d>>2]=i?M(j*M(2.3283064365386963e-10)):j;b=b+4|0;h=h+1|0;e=G[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 6:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];g=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=F[e+4>>2];i=G[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=M(+I[b>>2]+ +F[b+4>>2]*4294967296);J[(h<<2)+d>>2]=i?M(j*M(10842021724855044e-35)):j;b=b+8|0;h=h+1|0;e=G[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 7:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];g=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=F[e+4>>2];i=G[a+32|0];while(1){if(b>>>0>=g>>>0){break a}j=M(+I[b>>2]+ +I[b+4>>2]*4294967296);J[(h<<2)+d>>2]=i?M(j*M(5.421010862427522e-20)):j;b=b+8|0;h=h+1|0;e=G[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 8:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];g=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=F[e+4>>2];while(1){if(b>>>0>=g>>>0){break a}J[(h<<2)+d>>2]=J[b>>2];b=b+4|0;h=h+1|0;e=G[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 9:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];g=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=F[e+4>>2];while(1){if(b>>>0>=g>>>0){break a}J[(h<<2)+d>>2]=K[b>>3];b=b+8|0;h=h+1|0;e=G[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0;break b;case 10:break c;default:break a}}e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[a>>2];g=F[e>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);k=b;b=b+i|0;b=b+g|0;g=F[e+4>>2];while(1){if(b>>>0>=g>>>0){break a}J[(h<<2)+d>>2]=G[b|0]?M(1):M(0);b=b+1|0;h=h+1|0;e=G[a+24|0];if(h>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}l=1;if(e>>>0>=f>>>0){break a}d=(e<<2)+d|0;a=(c&255)-e|0}ma(d,0,a<<2)}return l}function Cb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=M(0),m=M(0);a:{b:{if(!d){break b}c:{switch(F[a+28>>2]-1|0){case 0:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}D[d+g|0]=G[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 1:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){return 0}e=D[b|0];if((e|0)<0){break b}D[d+g|0]=e;b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 2:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}e=H[b>>1];if((e+128&65535)>>>0>255){break b}D[d+g|0]=e;b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 3:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}e=H[b>>1];if(e>>>0>127){break b}D[d+g|0]=e;b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 4:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}e=F[b>>2];if(e+128>>>0>255){break b}D[d+g|0]=e;b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 5:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}e=F[b>>2];if(e>>>0>127){break b}D[d+g|0]=e;b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 6:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}i=F[b+4>>2];e=F[b>>2];h=e+128|0;i=h>>>0<128?i+1|0:i;if(!i&h>>>0>255|i){break b}D[d+g|0]=e;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 7:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}i=F[b+4>>2];e=F[b>>2];if(!i&e>>>0>127|i){break b}D[d+g|0]=e;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 8:e=G[a+24|0];c=c&255;d:{if(c>>>0>e>>>0?e:c){e=F[F[a>>2]>>2];f=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+f|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break d}l=J[b>>2];if(l>=M(127)|lM(1)){break d}j=R(+l*127+.5);if(!(N(j)<2147483648)){break f}h=~~j;break e}if(!(m>>0<(c>>>0>e>>>0?e:c)>>>0){continue}break}}k=1;if(c>>>0<=e>>>0){break d}ma(d+e|0,0,c-e|0)}return k;case 9:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}j=K[b>>3];if(j>=127|j<-128|(N(j)==Infinity|j!=j)){break b}e=d+g|0;if(G[a+32|0]){if(j<0|j>1){break b}j=R(j*127+.5)}g:{if(N(j)<2147483648){h=~~j;break g}h=-2147483648}D[e|0]=h;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 10:break c;default:break b}}e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}D[d+g|0]=G[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}ma(d+e|0,0,(c&255)-e|0)}return k}ma(d+e|0,0,(c&255)-e|0);return 1}function Bb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=M(0);a:{b:{if(!d){break b}c:{switch(F[a+28>>2]-1|0){case 0:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){return 0}e=D[b|0];if((e|0)<0){break b}D[d+g|0]=e;b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 1:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}D[d+g|0]=G[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 2:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}e=H[b>>1];if(e>>>0>255){break b}D[d+g|0]=e;b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 3:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}e=H[b>>1];if(e>>>0>255){break b}D[d+g|0]=e;b=b+2|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 4:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}e=F[b>>2];if(e>>>0>255){break b}D[d+g|0]=e;b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 5:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}e=F[b>>2];if(e>>>0>255){break b}D[d+g|0]=e;b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 6:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}i=F[b+4>>2];e=F[b>>2];if(!i&e>>>0>255|i){break b}D[d+g|0]=e;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 7:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}i=F[b+4>>2];e=F[b>>2];if(!i&e>>>0>255|i){break b}D[d+g|0]=e;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 8:e=G[a+24|0];c=c&255;d:{if(c>>>0>e>>>0?e:c){e=F[F[a>>2]>>2];f=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+f|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break d}l=J[b>>2];if(l>=M(255)|lM(1)){break d}j=R(+l*255+.5);if(!(j<4294967296&j>=0)){break f}h=~~j>>>0;break e}if(!(l=M(0))){break f}h=~~l>>>0;break e}h=0}D[e|0]=h;b=b+4|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(c>>>0>e>>>0?e:c)>>>0){continue}break}}k=1;if(c>>>0<=e>>>0){break d}ma(d+e|0,0,c-e|0)}return k;case 9:e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}j=K[b>>3];if(j>=255|j<0|(N(j)==Infinity|j!=j)){break b}e=d+g|0;if(G[a+32|0]){if(j>1){break b}j=R(j*255+.5)}g:{if(j<4294967296&j>=0){h=~~j>>>0;break g}h=0}D[e|0]=h;b=b+8|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}break a;case 10:break c;default:break b}}e=G[a+24|0];f=c&255;if(e>>>0>>0?e:f){e=F[F[a>>2]>>2];i=F[a+48>>2];b=ki(F[a+40>>2],F[a+44>>2],b,0);h=b;b=b+i|0;b=b+e|0;while(1){if(I[F[a>>2]+4>>2]<=b>>>0){break b}D[d+g|0]=G[b|0];b=b+1|0;g=g+1|0;e=G[a+24|0];if(g>>>0<(e>>>0>>0?e:f)>>>0){continue}break}}k=1;if(e>>>0>=f>>>0){break b}ma(d+e|0,0,(c&255)-e|0)}return k}ma(d+e|0,0,(c&255)-e|0);return 1}function jc(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;e=Z-48|0;Z=e;f=H[5053]|H[5054]<<16;d=H[5051]|H[5052]<<16;E[e+38>>1]=d;E[e+40>>1]=d>>>16;E[e+42>>1]=f;E[e+44>>1]=f>>>16;d=F[2525];F[e+32>>2]=F[2524];F[e+36>>2]=d;d=F[2523];F[e+24>>2]=F[2522];F[e+28>>2]=d;d=F[2521];F[e+16>>2]=F[2520];F[e+20>>2]=d;g=F[b+8>>2];i=F[b+12>>2];h=F[b+20>>2];d=F[b+16>>2];f=d+5|0;h=f>>>0<5?h+1|0:h;a:{b:{if(g>>>0>>0&(h|0)>=(i|0)|(h|0)>(i|0)){d=ya(e+16|0);if(d>>>0>=2147483632){break a}c:{d:{if(d>>>0>=11){b=(d|15)+1|0;c=ka(b);F[e+8>>2]=b|-2147483648;F[e>>2]=c;F[e+4>>2]=d;b=c+d|0;break d}D[e+11|0]=d;b=d+e|0;c=e;if(!d){break c}}la(c,e+16|0,d)}D[b|0]=0;F[a>>2]=-2;b=a+4|0;if(D[e+11|0]>=0){a=F[e+4>>2];F[b>>2]=F[e>>2];F[b+4>>2]=a;F[b+8>>2]=F[e+8>>2];break b}ra(b,F[e>>2],F[e+4>>2]);if(D[e+11|0]>=0){break b}ja(F[e>>2]);break b}f=d+F[b>>2]|0;d=G[f|0]|G[f+1|0]<<8|(G[f+2|0]<<16|G[f+3|0]<<24);D[c|0]=d;D[c+1|0]=d>>>8;D[c+2|0]=d>>>16;D[c+3|0]=d>>>24;D[c+4|0]=G[f+4|0];d=F[b+20>>2];f=F[b+16>>2]+5|0;d=f>>>0<5?d+1|0:d;F[b+16>>2]=f;F[b+20>>2]=d;if(sa(c,1250,5)){d=ka(32);D[d+17|0]=0;D[d+16|0]=G[1494];c=G[1490]|G[1491]<<8|(G[1492]<<16|G[1493]<<24);b=G[1486]|G[1487]<<8|(G[1488]<<16|G[1489]<<24);D[d+8|0]=b;D[d+9|0]=b>>>8;D[d+10|0]=b>>>16;D[d+11|0]=b>>>24;D[d+12|0]=c;D[d+13|0]=c>>>8;D[d+14|0]=c>>>16;D[d+15|0]=c>>>24;c=G[1482]|G[1483]<<8|(G[1484]<<16|G[1485]<<24);b=G[1478]|G[1479]<<8|(G[1480]<<16|G[1481]<<24);D[d|0]=b;D[d+1|0]=b>>>8;D[d+2|0]=b>>>16;D[d+3|0]=b>>>24;D[d+4|0]=c;D[d+5|0]=c>>>8;D[d+6|0]=c>>>16;D[d+7|0]=c>>>24;F[a>>2]=-1;ra(a+4|0,d,17);ja(d);break b}g=F[b+12>>2];if((g|0)<=(d|0)&I[b+8>>2]<=f>>>0|(d|0)>(g|0)){d=ya(e+16|0);if(d>>>0>=2147483632){break a}e:{f:{if(d>>>0>=11){b=(d|15)+1|0;c=ka(b);F[e+8>>2]=b|-2147483648;F[e>>2]=c;F[e+4>>2]=d;b=c+d|0;break f}D[e+11|0]=d;b=d+e|0;c=e;if(!d){break e}}la(c,e+16|0,d)}D[b|0]=0;F[a>>2]=-2;b=a+4|0;if(D[e+11|0]>=0){a=F[e+4>>2];F[b>>2]=F[e>>2];F[b+4>>2]=a;F[b+8>>2]=F[e+8>>2];break b}ra(b,F[e>>2],F[e+4>>2]);if(D[e+11|0]>=0){break b}ja(F[e>>2]);break b}D[c+5|0]=G[f+F[b>>2]|0];g=F[b+20>>2];d=F[b+16>>2]+1|0;g=d?g:g+1|0;F[b+16>>2]=d;F[b+20>>2]=g;f=F[b+12>>2];if((f|0)<=(g|0)&I[b+8>>2]<=d>>>0|(g|0)>(f|0)){d=ya(e+16|0);if(d>>>0>=2147483632){break a}g:{h:{if(d>>>0>=11){b=(d|15)+1|0;c=ka(b);F[e+8>>2]=b|-2147483648;F[e>>2]=c;F[e+4>>2]=d;b=c+d|0;break h}D[e+11|0]=d;b=d+e|0;c=e;if(!d){break g}}la(c,e+16|0,d)}D[b|0]=0;F[a>>2]=-2;b=a+4|0;if(D[e+11|0]>=0){a=F[e+4>>2];F[b>>2]=F[e>>2];F[b+4>>2]=a;F[b+8>>2]=F[e+8>>2];break b}ra(b,F[e>>2],F[e+4>>2]);if(D[e+11|0]>=0){break b}ja(F[e>>2]);break b}D[c+6|0]=G[d+F[b>>2]|0];h=F[b+20>>2];d=F[b+16>>2]+1|0;h=d?h:h+1|0;F[b+16>>2]=d;F[b+20>>2]=h;f=F[b+12>>2];if((f|0)<=(h|0)&I[b+8>>2]<=d>>>0|(f|0)<(h|0)){d=ya(e+16|0);if(d>>>0>=2147483632){break a}i:{j:{if(d>>>0>=11){b=(d|15)+1|0;c=ka(b);F[e+8>>2]=b|-2147483648;F[e>>2]=c;F[e+4>>2]=d;b=c+d|0;break j}D[e+11|0]=d;b=d+e|0;c=e;if(!d){break i}}la(c,e+16|0,d)}D[b|0]=0;F[a>>2]=-2;b=a+4|0;if(D[e+11|0]>=0){a=F[e+4>>2];F[b>>2]=F[e>>2];F[b+4>>2]=a;F[b+8>>2]=F[e+8>>2];break b}ra(b,F[e>>2],F[e+4>>2]);if(D[e+11|0]>=0){break b}ja(F[e>>2]);break b}D[c+7|0]=G[d+F[b>>2]|0];g=F[b+20>>2];d=F[b+16>>2]+1|0;g=d?g:g+1|0;F[b+16>>2]=d;F[b+20>>2]=g;f=F[b+12>>2];if((f|0)<=(g|0)&I[b+8>>2]<=d>>>0|(g|0)>(f|0)){c=Eb(e,e+16|0);F[a>>2]=-2;b=a+4|0;if(D[c+11|0]>=0){a=F[c+4>>2];F[b>>2]=F[c>>2];F[b+4>>2]=a;F[b+8>>2]=F[c+8>>2];break b}ra(b,F[c>>2],F[c+4>>2]);if(D[c+11|0]>=0){break b}ja(F[c>>2]);break b}D[c+8|0]=G[d+F[b>>2]|0];d=F[b+20>>2];g=F[b+16>>2];f=g+1|0;i=f?d:d+1|0;F[b+16>>2]=f;F[b+20>>2]=i;i=F[b+8>>2];h=F[b+12>>2];g=g+3|0;d=g>>>0<3?d+1|0:d;if(g>>>0>i>>>0&(d|0)>=(h|0)|(d|0)>(h|0)){c=Eb(e,e+16|0);F[a>>2]=-2;b=a+4|0;if(D[c+11|0]>=0){a=F[c+4>>2];F[b>>2]=F[c>>2];F[b+4>>2]=a;F[b+8>>2]=F[c+8>>2];break b}ra(b,F[c>>2],F[c+4>>2]);if(D[c+11|0]>=0){break b}ja(F[c>>2]);break b}d=c;c=F[b>>2]+f|0;E[d+10>>1]=G[c|0]|G[c+1|0]<<8;g=F[b+20>>2];c=F[b+16>>2]+2|0;g=c>>>0<2?g+1|0:g;F[b+16>>2]=c;F[b+20>>2]=g;F[a+8>>2]=0;F[a+12>>2]=0;F[a>>2]=0;F[a+4>>2]=0}Z=e+48|0;return}za();v()}function Mb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0;e=Z-96|0;Z=e;f=F[a+16>>2];D[e+92|0]=1;F[e+88>>2]=b;F[e+84>>2]=b;F[e+80>>2]=f;j=F[a+20>>2];d=F[j>>2];a:{b:{f=F[F[f+28>>2]+(b<<2)>>2];if(f>>>0>2]-d>>2>>>0){d=F[F[a+8>>2]+(F[d+(f<<2)>>2]<<2)>>2];f=F[a+4>>2];if(!G[f+84|0]){d=F[F[f+68>>2]+(d<<2)>>2]}F[e+72>>2]=0;F[e+76>>2]=0;j=e- -64|0;F[j>>2]=0;F[j+4>>2]=0;F[e+56>>2]=0;F[e+60>>2]=0;Ga(f,d,D[f+24|0],e+56|0);if((b|0)!=-1){f=b+1|0;j=(f>>>0)%3|0?f:b-2|0;m=((b>>>0)%3|0?-1:2)+b|0;while(1){d=j;f=m;c:{if(!F[a+28>>2]){break c}f=b+1|0;d=(f>>>0)%3|0?f:b-2|0;f=b-1|0;if((b>>>0)%3|0){break c}f=b+2|0}n=F[a+20>>2];b=F[n>>2];d=F[F[F[a+16>>2]+28>>2]+(d<<2)>>2];if(d>>>0>=F[n+4>>2]-b>>2>>>0){break b}d=F[F[a+8>>2]+(F[b+(d<<2)>>2]<<2)>>2];b=F[a+4>>2];if(!G[b+84|0]){d=F[F[b+68>>2]+(d<<2)>>2]}F[e+48>>2]=0;F[e+52>>2]=0;F[e+40>>2]=0;F[e+44>>2]=0;F[e+32>>2]=0;F[e+36>>2]=0;Ga(b,d,D[b+24|0],e+32|0);d=F[a+20>>2];b=F[d>>2];f=F[F[F[a+16>>2]+28>>2]+(f<<2)>>2];if(f>>>0>=F[d+4>>2]-b>>2>>>0){break a}d=F[F[a+8>>2]+(F[b+(f<<2)>>2]<<2)>>2];b=F[a+4>>2];if(!G[b+84|0]){d=F[F[b+68>>2]+(d<<2)>>2]}F[e+24>>2]=0;F[e+28>>2]=0;F[e+16>>2]=0;F[e+20>>2]=0;F[e+8>>2]=0;F[e+12>>2]=0;Ga(b,d,D[b+24|0],e+8|0);g=F[e+8>>2];b=F[e+56>>2];d=g-b|0;p=F[e+60>>2];t=F[e+12>>2]-(p+(b>>>0>g>>>0)|0)|0;h=F[e+40>>2];f=F[e+64>>2];n=h-f|0;u=F[e+68>>2];y=F[e+44>>2]-(u+(f>>>0>h>>>0)|0)|0;g=ki(d,t,n,y);w=o-g|0;x=i-(_+(g>>>0>o>>>0)|0)|0;i=w;h=F[e+16>>2];g=h-f|0;u=F[e+20>>2]-((f>>>0>h>>>0)+u|0)|0;k=F[e+32>>2];h=k-b|0;w=F[e+36>>2]-((b>>>0>k>>>0)+p|0)|0;b=ki(g,u,h,w);o=i+b|0;i=_+x|0;i=b>>>0>o>>>0?i+1|0:i;b=l;l=d;p=t;k=F[e+48>>2];f=F[e+72>>2];d=k-f|0;t=F[e+76>>2];x=F[e+52>>2]-(t+(f>>>0>k>>>0)|0)|0;l=ki(l,p,d,x);k=b+l|0;b=_+q|0;b=k>>>0>>0?b+1|0:b;l=F[e+24>>2];p=l-f|0;f=F[e+28>>2]-((f>>>0>l>>>0)+t|0)|0;q=ki(p,f,h,w);l=k-q|0;q=b-(_+(k>>>0>>0)|0)|0;b=ki(g,u,d,x);d=r-b|0;b=s-(_+(b>>>0>r>>>0)|0)|0;s=ki(p,f,n,y);r=s+d|0;b=_+b|0;s=r>>>0>>0?b+1|0:b;b=F[e+88>>2];f=F[e+80>>2];d:{if(G[e+92|0]){e:{f:{g:{h:{if((b|0)==-1){break h}d=b+1|0;b=(d>>>0)%3|0?d:b-2|0;if((b|0)==-1|F[F[f>>2]+(b>>>3&536870908)>>2]>>>b&1){break h}b=F[F[F[f+64>>2]+12>>2]+(b<<2)>>2];if((b|0)!=-1){break g}}F[e+88>>2]=-1;break f}d=b+1|0;b=(d>>>0)%3|0?d:b-2|0;F[e+88>>2]=b;if((b|0)!=-1){break e}}b=F[e+84>>2];d=-1;i:{if((b|0)==-1){break i}j:{if((b>>>0)%3|0){b=b-1|0;break j}b=b+2|0;d=-1;if((b|0)==-1){break i}}d=-1;if(F[F[f>>2]+(b>>>3&536870908)>>2]>>>b&1){break i}b=F[F[F[f+64>>2]+12>>2]+(b<<2)>>2];d=-1;if((b|0)==-1){break i}d=b-1|0;if((b>>>0)%3|0){break i}d=b+2|0}D[e+92|0]=0;F[e+88>>2]=d;break d}if((b|0)!=F[e+84>>2]){break d}F[e+88>>2]=-1;break d}d=-1;k:{if((b|0)==-1){break k}l:{if((b>>>0)%3|0){b=b-1|0;break l}b=b+2|0;d=-1;if((b|0)==-1){break k}}d=-1;if(F[F[f>>2]+(b>>>3&536870908)>>2]>>>b&1){break k}b=F[F[F[f+64>>2]+12>>2]+(b<<2)>>2];d=-1;if((b|0)==-1){break k}d=b-1|0;if((b>>>0)%3|0){break k}d=b+2|0}F[e+88>>2]=d}b=F[e+88>>2];if((b|0)!=-1){continue}break}}b=s>>31;f=b^r;d=f-b|0;b=(b^s)-((b>>>0>f>>>0)+b|0)|0;m=-1;f=2147483647;g=q>>31;h=g^l;j=h-g|0;n=(g^q)-((h>>>0>>0)+g|0)|0;h=n;k=j^-1;g=h^2147483647;n=i;m:{n:{if(!F[a+28>>2]){if((b|0)==(g|0)&d>>>0>k>>>0|b>>>0>g>>>0){break m}b=b+h|0;a=d+j|0;b=a>>>0>>0?b+1|0:b;f=a;g=i;a=g>>31;d=a;m=d^o;a=m-d|0;i=a;d=(d^g)-((d>>>0>m>>>0)+d|0)|0;a=a+f|0;d=d^2147483647;i=(d|0)==(b|0)&(i^-1)>>>0>>0|b>>>0>d>>>0;a=i?-1:a;if(!(i&0)&(a|0)<=536870912|(a|0)<536870912){break m}b=0;a=a>>>29|0;break n}o:{if((b|0)==(g|0)&d>>>0>k>>>0|b>>>0>g>>>0){break o}b=b+h|0;a=d+j|0;b=a>>>0>>0?b+1|0:b;k=i;d=i>>31;h=d^o;i=h-d|0;j=(d^k)-((d>>>0>h>>>0)+d|0)|0;g=j^2147483647;d=a;a=i;if((g|0)==(b|0)&d>>>0>(a^-1)>>>0|b>>>0>g>>>0){break o}b=b+j|0;m=a+d|0;b=m>>>0>>0?b+1|0:b;f=b;if(!b&m>>>0<536870913){break m}}b=f>>>29|0;a=(f&536870911)<<3|m>>>29}o=li(o,n,a,b);l=li(l,q,a,b);r=li(r,s,a,b)}F[c+8>>2]=o;F[c+4>>2]=l;F[c>>2]=r;Z=e+96|0;return}ta();v()}ta();v()}ta();v()}function te(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=Z-16|0;Z=g;f=1;m=$[F[F[a>>2]+24>>2]](a)|0;a:{if((m|0)<=0){break a}r=a+48|0;f=0;while(1){b:{c:{if(!F[($[F[F[a>>2]+28>>2]](a)|0)+40>>2]){break c}o=l<<2;d=F[o+F[a+36>>2]>>2];c=F[d+8>>2];e=bb(d);if(!e){break c}h=F[($[F[F[a>>2]+28>>2]](a)|0)+40>>2];F[g+12>>2]=F[c+56>>2];d=ka(32);F[g>>2]=d;F[g+4>>2]=24;F[g+8>>2]=-2147483616;c=G[1196]|G[1197]<<8|(G[1198]<<16|G[1199]<<24);b=G[1192]|G[1193]<<8|(G[1194]<<16|G[1195]<<24);D[d+16|0]=b;D[d+17|0]=b>>>8;D[d+18|0]=b>>>16;D[d+19|0]=b>>>24;D[d+20|0]=c;D[d+21|0]=c>>>8;D[d+22|0]=c>>>16;D[d+23|0]=c>>>24;c=G[1188]|G[1189]<<8|(G[1190]<<16|G[1191]<<24);b=G[1184]|G[1185]<<8|(G[1186]<<16|G[1187]<<24);D[d+8|0]=b;D[d+9|0]=b>>>8;D[d+10|0]=b>>>16;D[d+11|0]=b>>>24;D[d+12|0]=c;D[d+13|0]=c>>>8;D[d+14|0]=c>>>16;D[d+15|0]=c>>>24;c=G[1180]|G[1181]<<8|(G[1182]<<16|G[1183]<<24);b=G[1176]|G[1177]<<8|(G[1178]<<16|G[1179]<<24);D[d|0]=b;D[d+1|0]=b>>>8;D[d+2|0]=b>>>16;D[d+3|0]=b>>>24;D[d+4|0]=c;D[d+5|0]=c>>>8;D[d+6|0]=c>>>16;D[d+7|0]=c>>>24;D[d+24|0]=0;c=h+16|0;b=F[c>>2];d:{e:{if(!b){break e}i=F[g+12>>2];d=c;while(1){k=(i|0)>F[b+16>>2];d=k?d:b;b=F[(k?b+4|0:b)>>2];if(b){continue}break}if((c|0)==(d|0)|(i|0)>2]){break e}b=F[d+24>>2];if(!b){break e}i=d+20|0;d=G[g+11|0];c=d<<24>>24<0;k=c?F[g>>2]:g;d=c?F[g+4>>2]:d;while(1){c=G[b+27|0];j=c<<24>>24<0;c=j?F[b+20>>2]:c;p=c>>>0>>0;f:{g:{h:{i:{j:{k:{n=p?c:d;if(n){j=j?F[b+16>>2]:b+16|0;q=sa(k,j,n);if(q){break k}if(c>>>0<=d>>>0){break j}break f}if(c>>>0<=d>>>0){break i}break f}if((q|0)<0){break f}}c=sa(j,k,n);if(c){break h}}if(p){break g}d=gc(i,g);break d}if((c|0)<0){break g}d=gc(i,g);break d}b=b+4|0}b=F[b>>2];if(b){continue}break}}d=gc(h,g)}if(D[g+11|0]<0){ja(F[g>>2])}if(!d){break c}d=0;c=F[F[o+F[a+36>>2]>>2]+8>>2];if(!F[c+64>>2]){b=ka(32);F[b+16>>2]=0;F[b+20>>2]=0;F[b+8>>2]=0;F[b>>2]=0;F[b+4>>2]=0;F[b+24>>2]=0;F[b+28>>2]=0;f=F[c+64>>2];F[c+64>>2]=b;if(f){b=F[f>>2];if(b){F[f+4>>2]=b;ja(b)}ja(f);b=F[c+64>>2]}F[c>>2]=b;f=F[b+20>>2];F[c+8>>2]=F[b+16>>2];F[c+12>>2]=f;f=F[b+24>>2];b=F[b+28>>2];F[c+48>>2]=0;F[c+52>>2]=0;F[c+40>>2]=0;F[c+44>>2]=0;F[c+16>>2]=f;F[c+20>>2]=b}l:{D[c+24|0]=G[e+24|0];F[c+28>>2]=F[e+28>>2];D[c+32|0]=G[e+32|0];b=F[e+44>>2];F[c+40>>2]=F[e+40>>2];F[c+44>>2]=b;b=F[e+52>>2];F[c+48>>2]=F[e+48>>2];F[c+52>>2]=b;F[c+56>>2]=F[e+56>>2];b=F[e+12>>2];F[c+8>>2]=F[e+8>>2];F[c+12>>2]=b;b=F[e+20>>2];F[c+16>>2]=F[e+16>>2];F[c+20>>2]=b;F[c+60>>2]=F[e+60>>2];f=F[e>>2];m:{if(!f){F[c>>2]=0;b=1;break m}h=F[c>>2];b=0;if(!h){break m}b=F[f>>2];f=F[f+4>>2]-b|0;md(h,b,f,0);b=1}if(!b){break l}D[c+84|0]=G[e+84|0];F[c+80>>2]=F[e+80>>2];if((c|0)!=(e|0)){gb(c+68|0,F[e+68>>2],F[e+72>>2])}n:{h=F[e+88>>2];o:{if(h){f=ka(40);e=F[h>>2];F[f+16>>2]=0;F[f+8>>2]=0;F[f+12>>2]=0;F[f>>2]=e;e=F[h+12>>2];b=F[h+8>>2];if((e|0)!=(b|0)){b=e-b|0;if((b|0)<0){break n}e=ka(b);F[f+12>>2]=e;F[f+8>>2]=e;F[f+16>>2]=b+e;b=F[h+8>>2];i=F[h+12>>2];p:{if((b|0)==(i|0)){break p}k=i+(b^-1)|0;j=i-b&7;if(j){while(1){D[e|0]=G[b|0];e=e+1|0;b=b+1|0;d=d+1|0;if((j|0)!=(d|0)){continue}break}}if(k>>>0<7){break p}while(1){D[e|0]=G[b|0];D[e+1|0]=G[b+1|0];D[e+2|0]=G[b+2|0];D[e+3|0]=G[b+3|0];D[e+4|0]=G[b+4|0];D[e+5|0]=G[b+5|0];D[e+6|0]=G[b+6|0];D[e+7|0]=G[b+7|0];e=e+8|0;b=b+8|0;if((i|0)!=(b|0)){continue}break}}F[f+12>>2]=e}d=F[h+36>>2];F[f+32>>2]=F[h+32>>2];F[f+36>>2]=d;d=F[h+28>>2];F[f+24>>2]=F[h+24>>2];F[f+28>>2]=d;e=F[c+88>>2];F[c+88>>2]=f;if(e){break o}break l}e=F[c+88>>2];F[c+88>>2]=0;if(!e){break l}}d=F[e+8>>2];if(d){F[e+12>>2]=d;ja(d)}ja(e);break l}na();v()}break b}d=F[F[a+36>>2]+(l<<2)>>2];if(!($[F[F[d>>2]+24>>2]](d,r)|0)){break a}}l=l+1|0;f=(m|0)<=(l|0);if((l|0)!=(m|0)){continue}break}}Z=g+16|0;return f|0}function Jg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=Z-32|0;Z=f;a:{if(!hb(1,f+28|0,F[a+32>>2])){break a}if(!hb(1,f+24|0,F[a+32>>2])){break a}l=F[f+28>>2];if(l>>>0>1431655765){break a}d=F[a+32>>2];c=d;i=F[c+8>>2];b=F[c+16>>2];h=F[c+12>>2];c=F[c+20>>2];g=li(i-b|0,h-(c+(b>>>0>i>>>0)|0)|0,3,0);if(!_&g>>>0>>0){break a}n=F[f+24>>2];g=ki(l,0,3,0);if(!_&g>>>0>>0|((c|0)>=(h|0)&b>>>0>=i>>>0|(c|0)>(h|0))){break a}i=G[b+F[d>>2]|0];b=b+1|0;c=b?c:c+1|0;F[d+16>>2]=b;F[d+20>>2]=c;b:{c:{if(!i){d=0;c=Z-32|0;Z=c;F[c+24>>2]=0;F[c+16>>2]=0;F[c+20>>2]=0;d:{e:{b=L(l,3);if(b){if(b>>>0>=1073741824){break e}i=L(l,12);d=ka(i);ma(d,0,i)}b=mc(b,1,F[a+32>>2],d);f:{g:{if(!(!l|!b)){i=0;while(1){h:{g=e;b=(i<<2)+d|0;h=F[b>>2];e=h>>>1|0;h=g+(h&1?0-e|0:e)|0;if((h|0)<0){break h}F[c>>2]=h;e=F[b+4>>2];g=e>>>1|0;h=h+(e&1?0-g|0:g)|0;if((h|0)<0){break h}F[c+4>>2]=h;b=F[b+8>>2];e=b>>>1|0;e=h+(b&1?0-e|0:e)|0;if((e|0)<0){break h}F[c+8>>2]=e;mb(F[a+44>>2]+96|0,c);i=i+3|0;b=1;j=j+1|0;if((j|0)!=(l|0)){continue}break g}break}b=0;break g}if(!d){break f}}ja(d)}Z=c+32|0;break d}na();v()}if(b){break c}break a}if(n>>>0<=255){if(!l){break c}while(1){i:{F[f+16>>2]=0;F[f+8>>2]=0;F[f+12>>2]=0;d=F[a+32>>2];b=d;i=F[b+16>>2];e=F[b+8>>2];c=F[b+20>>2];g=F[b+12>>2];b=g;if(e>>>0<=i>>>0&(c|0)>=(b|0)|(b|0)<(c|0)){break i}j=F[d>>2];m=G[j+i|0];b=c;h=i+1|0;b=h?b:b+1|0;F[d+16>>2]=h;F[d+20>>2]=b;F[f+8>>2]=m;m=e>>>0>>0&(c|0)>=(g|0)|(c|0)>(g|0);e=m?i:e;g=m?c:g;if((e|0)==(h|0)&(g|0)==(b|0)){break i}m=G[h+j|0];b=c;h=i+2|0;b=h>>>0<2?b+1|0:b;F[d+16>>2]=h;F[d+20>>2]=b;F[f+12>>2]=m;if((e|0)==(h|0)&(b|0)==(g|0)){break i}h=G[h+j|0];b=c;c=i+3|0;b=c>>>0<3?b+1|0:b;F[d+16>>2]=c;F[d+20>>2]=b;F[f+16>>2]=h;mb(F[a+44>>2]+96|0,f+8|0);k=k+1|0;if((l|0)!=(k|0)){continue}break c}break}k=0;break a}if(n>>>0<=65535){if(!l){break c}while(1){j:{F[f+16>>2]=0;F[f+8>>2]=0;F[f+12>>2]=0;j=F[a+32>>2];b=j;c=F[b+8>>2];d=F[b+12>>2];h=F[b+16>>2];b=F[b+20>>2];i=b;e=h+2|0;b=e>>>0<2?b+1|0:b;if(c>>>0>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break j}m=F[j>>2];g=m+h|0;g=G[g|0]|G[g+1|0]<<8;F[j+16>>2]=e;F[j+20>>2]=b;F[f+8>>2]=g;b=i;g=h+4|0;b=g>>>0<4?b+1|0:b;if(c>>>0>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break j}e=e+m|0;e=G[e|0]|G[e+1|0]<<8;F[j+16>>2]=g;F[j+20>>2]=b;F[f+12>>2]=e;e=c;b=i;c=h+6|0;b=c>>>0<6?b+1|0:b;if(c>>>0>e>>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break j}d=g+m|0;d=G[d|0]|G[d+1|0]<<8;F[j+16>>2]=c;F[j+20>>2]=b;F[f+16>>2]=d;mb(F[a+44>>2]+96|0,f+8|0);k=k+1|0;if((l|0)!=(k|0)){continue}break c}break}k=0;break a}k:{if(n>>>0>2097151){break k}b=H[a+36>>1];if(((b<<8|b>>>8)&65535)>>>0<514){break k}if(!l){break c}while(1){l:{F[f+16>>2]=0;F[f+8>>2]=0;F[f+12>>2]=0;if(!hb(1,f+4|0,F[a+32>>2])){break l}F[f+8>>2]=F[f+4>>2];if(!hb(1,f+4|0,F[a+32>>2])){break l}F[f+12>>2]=F[f+4>>2];if(!hb(1,f+4|0,F[a+32>>2])){break l}F[f+16>>2]=F[f+4>>2];mb(F[a+44>>2]+96|0,f+8|0);k=k+1|0;if((l|0)!=(k|0)){continue}break c}break}k=0;break a}if(!l){break c}while(1){F[f+16>>2]=0;F[f+8>>2]=0;F[f+12>>2]=0;j=F[a+32>>2];b=j;c=F[b+8>>2];d=F[b+12>>2];h=F[b+16>>2];b=F[b+20>>2];i=b;e=h+4|0;b=e>>>0<4?b+1|0:b;if(c>>>0>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break b}m=F[j>>2];g=m+h|0;g=G[g|0]|G[g+1|0]<<8|(G[g+2|0]<<16|G[g+3|0]<<24);F[j+16>>2]=e;F[j+20>>2]=b;F[f+8>>2]=g;b=i;g=h+8|0;b=g>>>0<8?b+1|0:b;if(c>>>0>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break b}e=e+m|0;e=G[e|0]|G[e+1|0]<<8|(G[e+2|0]<<16|G[e+3|0]<<24);F[j+16>>2]=g;F[j+20>>2]=b;F[f+12>>2]=e;e=c;b=i;c=h+12|0;b=c>>>0<12?b+1|0:b;if(c>>>0>e>>>0&(b|0)>=(d|0)|(b|0)>(d|0)){break b}d=g+m|0;d=G[d|0]|G[d+1|0]<<8|(G[d+2|0]<<16|G[d+3|0]<<24);F[j+16>>2]=c;F[j+20>>2]=b;F[f+16>>2]=d;mb(F[a+44>>2]+96|0,f+8|0);k=k+1|0;if((l|0)!=(k|0)){continue}break}}F[F[a+4>>2]+80>>2]=n;k=1;break a}k=0}Z=f+32|0;return k|0}function Ld(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=Z+-64|0;Z=g;F[g+56>>2]=0;F[g+48>>2]=0;F[g+52>>2]=0;F[g+40>>2]=0;F[g+44>>2]=0;F[g+32>>2]=0;F[g+36>>2]=0;F[g+24>>2]=0;F[g+28>>2]=0;F[g+16>>2]=0;F[g+20>>2]=0;F[g+8>>2]=0;F[g+12>>2]=0;h=g+8|0;a:{b:{if(!H[b+38>>1]){break b}if(!Ta(1,h+12|0,b)){break b}e=F[b+8>>2];f=F[b+16>>2];j=e-f|0;k=F[h+12>>2];e=F[b+12>>2]-(F[b+20>>2]+(e>>>0>>0)|0)|0;if(j>>>0>>6>>>0&(e|0)<=0|(e|0)<0){break b}e=F[h>>2];d=F[h+4>>2]-e>>2;c:{if(d>>>0>>0){qa(h,k-d|0);k=F[h+12>>2];break c}if(d>>>0<=k>>>0){break c}F[h+4>>2]=e+(k<<2)}i=1;if(!k){break a}e=F[b+16>>2];d=F[b+20>>2];r=F[h>>2];l=F[b+8>>2];o=F[b+12>>2];j=0;while(1){i=0;if((d|0)>=(o|0)&e>>>0>=l>>>0|(d|0)>(o|0)){break a}i=F[b>>2];p=G[i+e|0];e=e+1|0;d=e?d:d+1|0;F[b+16>>2]=e;F[b+20>>2]=d;f=p>>>2|0;m=0;d:{e:{f:{g:{s=p&3;switch(s|0){case 3:break g;case 0:break e;default:break f}}f=f+j|0;i=0;if(f>>>0>=k>>>0){break a}ma(r+(j<<2)|0,0,(p&252)+4|0);j=f;break d}while(1){if((e|0)==(l|0)&(d|0)==(o|0)){break b}k=G[e+i|0];e=e+1|0;d=e?d:d+1|0;F[b+16>>2]=e;F[b+20>>2]=d;f=k<<(m<<3|6)|f;m=m+1|0;if((s|0)!=(m|0)){continue}break}}F[r+(j<<2)>>2]=f}j=j+1|0;k=F[h+12>>2];if(j>>>0>>0){continue}break}d=h+16|0;o=F[h>>2];f=F[h+16>>2];e=F[h+20>>2]-f|0;h:{if(e>>>0<=4194303){qa(d,1048576-(e>>>2|0)|0);break h}if((e|0)==4194304){break h}F[h+20>>2]=f+4194304}e=h+28|0;j=F[e>>2];f=F[h+32>>2]-j>>3;i:{if(f>>>0>>0){_a(e,k-f|0);j=F[e>>2];break i}if(f>>>0>k>>>0){F[h+32>>2]=(k<<3)+j}if(!k){break b}}l=F[d>>2];d=0;i=0;while(1){e=o+(d<<2)|0;h=F[e>>2];m=(d<<3)+j|0;f=i;F[m+4>>2]=f;F[m>>2]=h;e=F[e>>2];i=e+f|0;if(i>>>0>1048576){break b}j:{if(f>>>0>=i>>>0){break j}m=0;h=e&7;if(h){while(1){F[l+(f<<2)>>2]=d;f=f+1|0;m=m+1|0;if((h|0)!=(m|0)){continue}break}}if(e-1>>>0<=6){break j}while(1){e=l+(f<<2)|0;F[e>>2]=d;F[e+28>>2]=d;F[e+24>>2]=d;F[e+20>>2]=d;F[e+16>>2]=d;F[e+12>>2]=d;F[e+8>>2]=d;F[e+4>>2]=d;f=f+8|0;if((i|0)!=(f|0)){continue}break}}d=d+1|0;if((k|0)!=(d|0)){continue}break}n=(i|0)==1048576}i=n}k:{if(!i|(F[g+20>>2]?0:a)){break k}i=0;j=Z-16|0;Z=j;l:{if(!Sa(1,j+8|0,b)){break l}d=F[b+8>>2];f=F[b+16>>2];l=d-f|0;n=F[j+12>>2];h=F[b+20>>2];d=F[b+12>>2]-(h+(d>>>0>>0)|0)|0;e=F[j+8>>2];if((n|0)==(d|0)&e>>>0>l>>>0|d>>>0>>0){break l}d=h+n|0;l=e+f|0;d=l>>>0>>0?d+1|0:d;F[b+16>>2]=l;F[b+20>>2]=d;if((e|0)<=0){break l}b=f+F[b>>2]|0;F[g+48>>2]=b;d=e-1|0;f=d+b|0;l=G[f|0];m:{if(l>>>0<=63){F[g+52>>2]=d;b=G[f|0]&63;break m}n:{switch((l>>>6|0)-1|0){case 0:if(e>>>0<2){break l}d=e-2|0;F[g+52>>2]=d;b=b+d|0;b=G[b+1|0]<<8&16128|G[b|0];break m;case 1:if(e>>>0<3){break l}d=e-3|0;F[g+52>>2]=d;b=b+d|0;b=G[b+1|0]<<8|G[b+2|0]<<16&4128768|G[b|0];break m;default:break n}}d=e-4|0;F[g+52>>2]=d;b=b+d|0;b=(G[b|0]|G[b+1|0]<<8|(G[b+2|0]<<16|G[b+3|0]<<24))&1073741823}F[g+56>>2]=b+4194304;i=b>>>0<1069547520}Z=j+16|0;if(!i){break k}if(!a){t=1;break k}b=F[g+52>>2];f=F[g+56>>2];d=F[g+36>>2];e=F[g+48>>2];j=F[g+24>>2];while(1){o:{if(f>>>0>4194303){break o}while(1){if((b|0)<=0){break o}b=b-1|0;F[g+52>>2]=b;f=G[b+e|0]|f<<8;F[g+56>>2]=f;if(f>>>0<4194304){continue}break}}i=f&1048575;l=F[j+(i<<2)>>2];n=d+(l<<3)|0;f=(L(F[n>>2],f>>>20|0)+i|0)-F[n+4>>2]|0;F[g+56>>2]=f;F[(q<<2)+c>>2]=l;t=1;q=q+1|0;if((q|0)!=(a|0)){continue}break}}a=F[g+36>>2];if(a){F[g+40>>2]=a;ja(a)}a=F[g+24>>2];if(a){F[g+28>>2]=a;ja(a)}a=F[g+8>>2];if(a){F[g+12>>2]=a;ja(a)}Z=g- -64|0;return t}function kh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=M(0),f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=M(0),p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;if(F[c>>2]==F[c+4>>2]){m=F[d+80>>2];u=Z-16|0;Z=u;g=F[a+4>>2];k=G[b+24|0];h=F[d+48>>2];n=F[F[d>>2]>>2];c=u+8|0;F[c>>2]=1065353216;d=c;J[c>>2]=M(-1<>2];c=ka(k<<2);a:{if(!m|!k){break a}p=h+n|0;o=J[d>>2];n=F[a+8>>2];v=F[b>>2];d=F[b+48>>2];g=F[b+40>>2];w=F[b+44>>2];if(!G[b+84|0]){f=F[b+68>>2];s=k&254;t=k&1;a=0;while(1){b=F[v>>2];l=ki(g,w,F[f+(i<<2)>>2],0)+d|0;h=la(c,b+l|0,g);b=0;q=0;if((k|0)!=1){while(1){l=p+(a<<2)|0;j=b<<2;e=M(R(M(M(o*M(J[j+h>>2]-J[n+j>>2]))+M(.5))));b:{if(M(N(e))>2]=r;j=j|4;e=M(R(M(M(o*M(J[j+h>>2]-J[n+j>>2]))+M(.5))));c:{if(M(N(e))>2]=j;b=b+2|0;a=a+2|0;q=q+2|0;if((s|0)!=(q|0)){continue}break}}if(t){l=p+(a<<2)|0;b=b<<2;e=M(R(M(M(o*M(J[b+h>>2]-J[b+n>>2]))+M(.5))));d:{if(M(N(e))>2]=b;a=a+1|0}i=i+1|0;if((m|0)!=(i|0)){continue}break}break a}s=k&254;t=k&1;a=0;while(1){b=F[v>>2];h=ki(g,w,i,l)+d|0;j=la(c,b+h|0,g);b=0;q=0;if((k|0)!=1){while(1){h=p+(a<<2)|0;f=b<<2;e=M(R(M(M(o*M(J[f+j>>2]-J[f+n>>2]))+M(.5))));e:{if(M(N(e))>2]=r;f=f|4;e=M(R(M(M(o*M(J[f+j>>2]-J[f+n>>2]))+M(.5))));f:{if(M(N(e))>2]=f;b=b+2|0;a=a+2|0;q=q+2|0;if((s|0)!=(q|0)){continue}break}}if(t){h=p+(a<<2)|0;b=b<<2;e=M(R(M(M(o*M(J[b+j>>2]-J[b+n>>2]))+M(.5))));g:{if(M(N(e))>2]=b;a=a+1|0}b=l;i=i+1|0;b=i?b:b+1|0;l=b;if((i|0)!=(m|0)|b){continue}break}}ja(c);Z=u+16|0;return 1}j=Z-16|0;Z=j;m=F[a+4>>2];i=G[b+24|0];g=F[d+48>>2];h=F[F[d>>2]>>2];d=j+8|0;F[d>>2]=1065353216;l=d;J[d>>2]=M(-1<>2];d=ka(i<<2);m=F[c+4>>2];q=F[c>>2];h:{if(!i|(m|0)==(q|0)){break h}n=h+g|0;c=m-q>>2;u=c>>>0<=1?1:c;o=J[l>>2];h=F[a+8>>2];v=F[b>>2];l=F[b+48>>2];m=F[b+40>>2];w=F[b+44>>2];if(G[b+84|0]){s=i&254;t=i&1;a=0;c=0;while(1){b=F[v>>2];g=ki(m,w,F[q+(c<<2)>>2],0)+l|0;p=la(d,b+g|0,m);b=0;k=0;if((i|0)!=1){while(1){g=n+(a<<2)|0;f=b<<2;e=M(R(M(M(o*M(J[f+p>>2]-J[h+f>>2]))+M(.5))));i:{if(M(N(e))>2]=r;f=f|4;e=M(R(M(M(o*M(J[f+p>>2]-J[h+f>>2]))+M(.5))));j:{if(M(N(e))>2]=f;b=b+2|0;a=a+2|0;k=k+2|0;if((s|0)!=(k|0)){continue}break}}if(t){g=n+(a<<2)|0;b=b<<2;e=M(R(M(M(o*M(J[b+p>>2]-J[b+h>>2]))+M(.5))));k:{if(M(N(e))>2]=b;a=a+1|0}c=c+1|0;if((u|0)!=(c|0)){continue}break}break h}s=F[b+68>>2];t=i&254;x=i&1;a=0;c=0;while(1){b=F[v>>2];g=ki(m,w,F[s+(F[q+(c<<2)>>2]<<2)>>2],0)+l|0;p=la(d,b+g|0,m);b=0;k=0;if((i|0)!=1){while(1){g=n+(a<<2)|0;f=b<<2;e=M(R(M(M(o*M(J[f+p>>2]-J[h+f>>2]))+M(.5))));l:{if(M(N(e))>2]=r;f=f|4;e=M(R(M(M(o*M(J[f+p>>2]-J[h+f>>2]))+M(.5))));m:{if(M(N(e))>2]=f;b=b+2|0;a=a+2|0;k=k+2|0;if((t|0)!=(k|0)){continue}break}}if(x){g=n+(a<<2)|0;b=b<<2;e=M(R(M(M(o*M(J[b+p>>2]-J[b+h>>2]))+M(.5))));n:{if(M(N(e))>2]=b;a=a+1|0}c=c+1|0;if((u|0)!=(c|0)){continue}break}}ja(d);Z=j+16|0;return 1} +function Cd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=F[a+4>>2];e=F[a>>2];f=(c-e|0)/144|0;if(f>>>0>>0){e=a;b=b-f|0;h=F[a+8>>2];c=F[a+4>>2];a:{if(b>>>0<=(h-c|0)/144>>>0){b:{if(!b){break b}a=c;f=b&7;if(f){while(1){va(a);a=a+144|0;d=d+1|0;if((f|0)!=(d|0)){continue}break}}c=L(b,144)+c|0;if((b-1&268435455)>>>0<7){break b}while(1){va(a);va(a+144|0);va(a+288|0);va(a+432|0);va(a+576|0);va(a+720|0);va(a+864|0);va(a+1008|0);a=a+1152|0;if((c|0)!=(a|0)){continue}break}}F[e+4>>2]=c;break a}c:{d:{e:{a=c;c=F[e>>2];i=(a-c|0)/144|0;a=i+b|0;if(a>>>0<29826162){c=(h-c|0)/144|0;f=c<<1;f=c>>>0>=14913080?29826161:a>>>0>>0?f:a;if(f){if(f>>>0>=29826162){break e}g=ka(L(f,144))}c=L(i,144)+g|0;a=c;h=b&7;if(h){while(1){va(a);a=a+144|0;d=d+1|0;if((h|0)!=(d|0)){continue}break}}h=L(b,144)+c|0;if((b-1&268435455)>>>0>=7){while(1){va(a);va(a+144|0);va(a+288|0);va(a+432|0);va(a+576|0);va(a+720|0);va(a+864|0);va(a+1008|0);a=a+1152|0;if((h|0)!=(a|0)){continue}break}}b=L(f,144)+g|0;d=F[e+4>>2];f=F[e>>2];if((d|0)==(f|0)){break d}while(1){c=c-144|0;d=d-144|0;a=d;F[c>>2]=F[a>>2];F[c+4>>2]=F[a+4>>2];F[c+8>>2]=F[a+8>>2];F[c+12>>2]=F[a+12>>2];F[a+12>>2]=0;F[a+4>>2]=0;F[a+8>>2]=0;F[c+16>>2]=F[a+16>>2];F[c+20>>2]=F[a+20>>2];F[c+24>>2]=F[a+24>>2];F[a+24>>2]=0;F[a+16>>2]=0;F[a+20>>2]=0;g=G[a+28|0];F[c+40>>2]=0;F[c+32>>2]=0;F[c+36>>2]=0;D[c+28|0]=g;F[c+32>>2]=F[a+32>>2];F[c+36>>2]=F[a+36>>2];F[c+40>>2]=F[a+40>>2];F[a+40>>2]=0;F[a+32>>2]=0;F[a+36>>2]=0;F[c+52>>2]=0;F[c+44>>2]=0;F[c+48>>2]=0;F[c+44>>2]=F[a+44>>2];F[c+48>>2]=F[a+48>>2];F[c+52>>2]=F[a+52>>2];F[a+52>>2]=0;F[a+44>>2]=0;F[a+48>>2]=0;g=c- -64|0;F[g>>2]=0;F[c+56>>2]=0;F[c+60>>2]=0;F[c+56>>2]=F[a+56>>2];F[c+60>>2]=F[a+60>>2];i=g;g=a- -64|0;F[i>>2]=F[g>>2];F[g>>2]=0;F[a+56>>2]=0;F[a+60>>2]=0;F[c+68>>2]=F[a+68>>2];g=F[a+72>>2];F[c+84>>2]=0;F[c+76>>2]=0;F[c+80>>2]=0;F[c+72>>2]=g;F[c+76>>2]=F[a+76>>2];F[c+80>>2]=F[a+80>>2];F[c+84>>2]=F[a+84>>2];F[a+84>>2]=0;F[a+76>>2]=0;F[a+80>>2]=0;F[c+96>>2]=0;F[c+88>>2]=0;F[c+92>>2]=0;F[c+88>>2]=F[a+88>>2];F[c+92>>2]=F[a+92>>2];F[c+96>>2]=F[a+96>>2];F[a+96>>2]=0;F[a+88>>2]=0;F[a+92>>2]=0;g=G[a+100|0];F[c+112>>2]=0;F[c+104>>2]=0;F[c+108>>2]=0;D[c+100|0]=g;F[c+104>>2]=F[a+104>>2];F[c+108>>2]=F[a+108>>2];F[c+112>>2]=F[a+112>>2];F[a+112>>2]=0;F[a+104>>2]=0;F[a+108>>2]=0;F[c+124>>2]=0;F[c+116>>2]=0;F[c+120>>2]=0;F[c+116>>2]=F[a+116>>2];F[c+120>>2]=F[a+120>>2];F[c+124>>2]=F[a+124>>2];F[a+124>>2]=0;F[a+116>>2]=0;F[a+120>>2]=0;g=F[a+128>>2];F[c+140>>2]=0;F[c+132>>2]=0;F[c+136>>2]=0;F[c+128>>2]=g;F[c+132>>2]=F[a+132>>2];F[c+136>>2]=F[a+136>>2];F[c+140>>2]=F[a+140>>2];F[a+140>>2]=0;F[a+132>>2]=0;F[a+136>>2]=0;if((a|0)!=(f|0)){continue}break}F[e+8>>2]=b;a=F[e+4>>2];F[e+4>>2]=h;d=F[e>>2];F[e>>2]=c;if((a|0)==(d|0)){break c}while(1){b=a-144|0;c=F[b+132>>2];if(c){F[a-8>>2]=c;ja(c)}c=F[a-28>>2];if(c){F[a-24>>2]=c;ja(c)}c=F[a-40>>2];if(c){F[a-36>>2]=c;ja(c)}Gb(a-140|0);a=b;if((d|0)!=(a|0)){continue}break}break c}na();v()}oa();v()}F[e+8>>2]=b;F[e+4>>2]=h;F[e>>2]=c}if(d){ja(d)}}return}if(b>>>0>>0){e=e+L(b,144)|0;if((e|0)!=(c|0)){while(1){b=c-144|0;d=F[b+132>>2];if(d){F[c-8>>2]=d;ja(d)}d=F[c-28>>2];if(d){F[c-24>>2]=d;ja(d)}d=F[c-40>>2];if(d){F[c-36>>2]=d;ja(d)}Gb(c-140|0);c=b;if((e|0)!=(c|0)){continue}break}}F[a+4>>2]=e}}function Yc(a){var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;F[a+56>>2]=F[a+52>>2];F[a+44>>2]=F[a+40>>2];b=F[a+64>>2];c=F[b+24>>2];if((c|0)==F[b+28>>2]){return 1}a:{b:{c:{while(1){g=i;i=F[(k<<2)+c>>2];d:{if((i|0)==-1){i=g;break d}b=F[a+56>>2];e:{if((b|0)!=F[a+60>>2]){F[b>>2]=g;F[a+56>>2]=b+4;break e}d=F[a+52>>2];e=b-d|0;h=e>>2;c=h+1|0;if(c>>>0>=1073741824){break c}f=e>>>1|0;f=e>>>0>=2147483644?1073741823:c>>>0>>0?f:c;if(f){if(f>>>0>=1073741824){break b}e=ka(f<<2)}else{e=0}c=e+(h<<2)|0;F[c>>2]=g;h=c+4|0;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;F[c>>2]=F[b>>2];if((b|0)!=(d|0)){continue}break}}F[a+60>>2]=e+(f<<2);F[a+56>>2]=h;F[a+52>>2]=c;if(!d){break e}ja(d)}f:{g:{if(!(F[F[a+12>>2]+(k>>>3&536870908)>>2]>>>k&1)){break g}e=i+1|0;e=(e>>>0)%3|0?e:i-2|0;if((e|0)==-1|F[F[a>>2]+(e>>>3&536870908)>>2]>>>e&1){break g}e=F[F[F[a+64>>2]+12>>2]+(e<<2)>>2];if((e|0)==-1){break g}b=e+1|0;b=(b>>>0)%3|0?b:e-2|0;if((b|0)==-1){break g}c=F[a+64>>2];f=F[a>>2];while(1){e=b;b=-1;d=e+1|0;d=(d>>>0)%3|0?d:e-2|0;h:{if((d|0)==-1|F[f+(d>>>3&536870908)>>2]>>>d&1){break h}d=F[F[c+12>>2]+(d<<2)>>2];if((d|0)==-1){break h}b=d+1|0;b=(b>>>0)%3|0?b:d-2|0}if((b|0)!=(i|0)){if((b|0)==-1){break f}continue}break}return 0}e=i}F[F[a+28>>2]+(e<<2)>>2]=g;b=F[a+44>>2];i:{if((b|0)!=F[a+48>>2]){F[b>>2]=e;F[a+44>>2]=b+4;break i}d=F[a+40>>2];i=b-d|0;h=i>>2;c=h+1|0;if(c>>>0>=1073741824){break a}f=i>>>1|0;f=i>>>0>=2147483644?1073741823:c>>>0>>0?f:c;if(f){if(f>>>0>=1073741824){break b}i=ka(f<<2)}else{i=0}c=i+(h<<2)|0;F[c>>2]=e;h=c+4|0;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;F[c>>2]=F[b>>2];if((b|0)!=(d|0)){continue}break}}F[a+48>>2]=i+(f<<2);F[a+44>>2]=h;F[a+40>>2]=c;if(!d){break i}ja(d)}i=g+1|0;b=F[a+64>>2];if((e|0)==-1){break d}j:{if((e>>>0)%3|0){c=e-1|0;break j}c=e+2|0;if((c|0)==-1){break d}}d=F[F[b+12>>2]+(c<<2)>>2];if((d|0)==-1){break d}f=d+((d>>>0)%3|0?-1:2)|0;if((f|0)==-1|(e|0)==(f|0)){break d}while(1){b=f+1|0;b=(b>>>0)%3|0?b:f-2|0;if(F[F[a>>2]+(b>>>3&536870908)>>2]>>>b&1){b=F[a+56>>2];k:{if((b|0)!=F[a+60>>2]){F[b>>2]=i;F[a+56>>2]=b+4;break k}d=F[a+52>>2];g=b-d|0;j=g>>2;c=j+1|0;if(c>>>0>=1073741824){break c}h=g>>>1|0;h=g>>>0>=2147483644?1073741823:c>>>0>>0?h:c;if(h){if(h>>>0>=1073741824){break b}g=ka(h<<2)}else{g=0}c=g+(j<<2)|0;F[c>>2]=i;j=c+4|0;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;F[c>>2]=F[b>>2];if((b|0)!=(d|0)){continue}break}}F[a+60>>2]=g+(h<<2);F[a+56>>2]=j;F[a+52>>2]=c;if(!d){break k}ja(d)}d=i+1|0;b=F[a+44>>2];l:{if((b|0)!=F[a+48>>2]){F[b>>2]=f;F[a+44>>2]=b+4;break l}h=F[a+40>>2];g=b-h|0;l=g>>2;c=l+1|0;if(c>>>0>=1073741824){break a}j=g>>>1|0;j=g>>>0>=2147483644?1073741823:c>>>0>>0?j:c;if(j){if(j>>>0>=1073741824){break b}g=ka(j<<2)}else{g=0}c=g+(l<<2)|0;F[c>>2]=f;l=c+4|0;if((b|0)!=(h|0)){while(1){c=c-4|0;b=b-4|0;F[c>>2]=F[b>>2];if((b|0)!=(h|0)){continue}break}}F[a+48>>2]=g+(j<<2);F[a+44>>2]=l;F[a+40>>2]=c;if(!h){break l}ja(h)}g=i;i=d}F[F[a+28>>2]+(f<<2)>>2]=g;b=F[a+64>>2];m:{if((f>>>0)%3|0){c=f-1|0;break m}c=f+2|0;if((c|0)==-1){break d}}d=F[F[b+12>>2]+(c<<2)>>2];if((d|0)==-1){break d}f=d+((d>>>0)%3|0?-1:2)|0;if((f|0)==-1){break d}if((e|0)!=(f|0)){continue}break}}k=k+1|0;c=F[b+24>>2];if(k>>>0>2]-c>>2>>>0){continue}break}return 1}na();v()}oa();v()}na();v()}function Kb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0,x=0,y=0;f=Z-96|0;Z=f;e=F[a+16>>2];D[f+92|0]=1;F[f+88>>2]=b;F[f+84>>2]=b;F[f+80>>2]=e;a:{if((b|0)==-1){break a}j=F[a+20>>2];d=F[j>>2];e=F[F[e>>2]+(b<<2)>>2];if(e>>>0>=F[j+4>>2]-d>>2>>>0){break a}e=F[F[a+8>>2]+(F[d+(e<<2)>>2]<<2)>>2];d=F[a+4>>2];if(!G[d+84|0]){e=F[F[d+68>>2]+(e<<2)>>2]}F[f+72>>2]=0;F[f+76>>2]=0;j=f- -64|0;F[j>>2]=0;F[j+4>>2]=0;F[f+56>>2]=0;F[f+60>>2]=0;Ga(d,e,D[d+24|0],f+56|0);e=b+1|0;j=(e>>>0)%3|0?e:b-2|0;n=((b>>>0)%3|0?-1:2)+b|0;b:{c:{while(1){d=j;e=n;d:{if(!F[a+28>>2]){break d}e=b+1|0;d=(e>>>0)%3|0?e:b-2|0;e=b-1|0;if((b>>>0)%3|0){break d}e=b+2|0}if((d|0)==-1){break b}m=F[a+20>>2];b=F[m>>2];d=F[F[F[a+16>>2]>>2]+(d<<2)>>2];if(d>>>0>=F[m+4>>2]-b>>2>>>0){break b}d=F[F[a+8>>2]+(F[(d<<2)+b>>2]<<2)>>2];b=F[a+4>>2];if(!G[b+84|0]){d=F[F[b+68>>2]+(d<<2)>>2]}F[f+48>>2]=0;F[f+52>>2]=0;F[f+40>>2]=0;F[f+44>>2]=0;F[f+32>>2]=0;F[f+36>>2]=0;Ga(b,d,D[b+24|0],f+32|0);if((e|0)==-1){break c}d=F[a+20>>2];b=F[d>>2];e=F[F[F[a+16>>2]>>2]+(e<<2)>>2];if(e>>>0>=F[d+4>>2]-b>>2>>>0){break c}d=F[F[a+8>>2]+(F[b+(e<<2)>>2]<<2)>>2];b=F[a+4>>2];if(!G[b+84|0]){d=F[F[b+68>>2]+(d<<2)>>2]}F[f+24>>2]=0;F[f+28>>2]=0;F[f+16>>2]=0;F[f+20>>2]=0;F[f+8>>2]=0;F[f+12>>2]=0;Ga(b,d,D[b+24|0],f+8|0);g=F[f+8>>2];b=F[f+56>>2];d=g-b|0;p=F[f+60>>2];t=F[f+12>>2]-(p+(b>>>0>g>>>0)|0)|0;i=F[f+40>>2];e=F[f+64>>2];m=i-e|0;u=F[f+68>>2];y=F[f+44>>2]-(u+(e>>>0>i>>>0)|0)|0;g=ki(d,t,m,y);w=o-g|0;x=h-(_+(g>>>0>o>>>0)|0)|0;h=w;i=F[f+16>>2];g=i-e|0;u=F[f+20>>2]-((e>>>0>i>>>0)+u|0)|0;k=F[f+32>>2];i=k-b|0;w=F[f+36>>2]-((b>>>0>k>>>0)+p|0)|0;b=ki(g,u,i,w);o=h+b|0;h=_+x|0;h=b>>>0>o>>>0?h+1|0:h;b=l;l=d;p=t;k=F[f+48>>2];e=F[f+72>>2];d=k-e|0;t=F[f+76>>2];x=F[f+52>>2]-(t+(e>>>0>k>>>0)|0)|0;l=ki(l,p,d,x);k=b+l|0;b=_+q|0;b=k>>>0>>0?b+1|0:b;l=F[f+24>>2];p=l-e|0;e=F[f+28>>2]-((e>>>0>l>>>0)+t|0)|0;q=ki(p,e,i,w);l=k-q|0;q=b-(_+(k>>>0>>0)|0)|0;b=ki(g,u,d,x);d=r-b|0;b=s-(_+(b>>>0>r>>>0)|0)|0;s=ki(p,e,m,y);r=s+d|0;b=_+b|0;s=r>>>0>>0?b+1|0:b;nc(f+80|0);b=F[f+88>>2];if((b|0)!=-1){continue}break}b=s>>31;e=b^r;d=e-b|0;b=(b^s)-((b>>>0>e>>>0)+b|0)|0;n=-1;e=2147483647;m=q>>31;g=m;i=g^l;j=i-g|0;m=(g^q)-((i>>>0>>0)+g|0)|0;i=m;k=j^-1;g=i^2147483647;m=h;e:{f:{if(!F[a+28>>2]){if((b|0)==(g|0)&d>>>0>k>>>0|b>>>0>g>>>0){break e}b=b+i|0;a=d+j|0;b=a>>>0>>0?b+1|0:b;e=a;g=h;a=g>>31;d=a;n=d^o;a=n-d|0;h=a;d=(d^g)-((d>>>0>n>>>0)+d|0)|0;a=a+e|0;d=d^2147483647;h=(d|0)==(b|0)&(h^-1)>>>0>>0|b>>>0>d>>>0;a=h?-1:a;if(!(h&0)&(a|0)<=536870912|(a|0)<536870912){break e}b=0;a=a>>>29|0;break f}g:{if((b|0)==(g|0)&d>>>0>k>>>0|b>>>0>g>>>0){break g}b=b+i|0;a=d+j|0;b=a>>>0>>0?b+1|0:b;k=h;h=h>>31;g=h;i=g^o;h=i-g|0;j=(g^k)-((g>>>0>i>>>0)+g|0)|0;g=j^2147483647;d=a;a=h;if((g|0)==(b|0)&d>>>0>(a^-1)>>>0|b>>>0>g>>>0){break g}b=b+j|0;n=a+d|0;b=n>>>0>>0?b+1|0:b;e=b;if(!b&n>>>0<536870913){break e}}b=e>>>29|0;a=(e&536870911)<<3|n>>>29}o=li(o,m,a,b);l=li(l,q,a,b);r=li(r,s,a,b)}F[c+8>>2]=o;F[c+4>>2]=l;F[c>>2]=r;Z=f+96|0;return}ta();v()}ta();v()}ta();v()}function Nc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:{if((b|0)<0){break a}c=F[a+12>>2];d=F[a+8>>2];if(c-d>>2>>>0<=b>>>0){break a}d=d+(b<<2)|0;e=F[d>>2];i=F[e+60>>2];f=F[e+56>>2];e=d+4|0;if((e|0)!=(c|0)){while(1){h=F[e>>2];F[e>>2]=0;g=F[d>>2];F[d>>2]=h;if(g){xa(g)}d=d+4|0;e=e+4|0;if((e|0)!=(c|0)){continue}break}c=F[a+12>>2]}if((c|0)!=(d|0)){while(1){c=c-4|0;e=F[c>>2];F[c>>2]=0;if(e){xa(e)}if((c|0)!=(d|0)){continue}break}}F[a+12>>2]=d;g=F[a+4>>2];b:{if(!g|(i|0)<0){break b}c=F[g+24>>2];d=F[g+28>>2];if((c|0)==(d|0)){break b}while(1){if((i|0)==F[F[c>>2]+24>>2]){d=c+4|0;i=F[g+28>>2];if((d|0)!=(i|0)){while(1){h=F[d>>2];F[d>>2]=0;e=F[c>>2];F[c>>2]=h;if(e){Ca(e+12|0,F[e+16>>2]);Ba(e,F[e+4>>2]);ja(e)}c=c+4|0;d=d+4|0;if((i|0)!=(d|0)){continue}break}d=F[g+28>>2]}if((c|0)!=(d|0)){while(1){d=d-4|0;e=F[d>>2];F[d>>2]=0;if(e){Ca(e+12|0,F[e+16>>2]);Ba(e,F[e+4>>2]);ja(e)}if((c|0)!=(d|0)){continue}break}}F[g+28>>2]=c;break b}c=c+4|0;if((d|0)!=(c|0)){continue}break}}c:{if((f|0)>4){break c}d:{e=L(f,12)+a|0;c=F[e+20>>2];d=F[e+24>>2];if((c|0)==(d|0)){break d}while(1){if(F[c>>2]==(b|0)){break d}c=c+4|0;if((d|0)!=(c|0)){continue}break}break c}if((c|0)==(d|0)){break c}f=c;c=c+4|0;pa(f,c,d-c|0);F[e+24>>2]=d-4}c=F[a+24>>2];d=F[a+20>>2];e:{if((c|0)==(d|0)){break e}e=c-d|0;c=e>>2;g=c>>>0<=1?1:c;i=g&1;c=0;if(e>>>0>=8){g=g&-2;e=0;while(1){f=c<<2;h=f+d|0;j=F[h>>2];if((j|0)>(b|0)){F[h>>2]=j-1}f=d+(f|4)|0;h=F[f>>2];if((h|0)>(b|0)){F[f>>2]=h-1}c=c+2|0;e=e+2|0;if((g|0)!=(e|0)){continue}break}}if(!i){break e}c=d+(c<<2)|0;d=F[c>>2];if((d|0)<=(b|0)){break e}F[c>>2]=d-1}c=F[a+36>>2];d=F[a+32>>2];f:{if((c|0)==(d|0)){break f}e=c-d|0;c=e>>2;g=c>>>0<=1?1:c;i=g&1;c=0;if(e>>>0>=8){g=g&-2;e=0;while(1){f=c<<2;h=f+d|0;j=F[h>>2];if((j|0)>(b|0)){F[h>>2]=j-1}f=d+(f|4)|0;h=F[f>>2];if((h|0)>(b|0)){F[f>>2]=h-1}c=c+2|0;e=e+2|0;if((g|0)!=(e|0)){continue}break}}if(!i){break f}c=d+(c<<2)|0;d=F[c>>2];if((d|0)<=(b|0)){break f}F[c>>2]=d-1}c=F[a+48>>2];d=F[a+44>>2];g:{if((c|0)==(d|0)){break g}e=c-d|0;c=e>>2;g=c>>>0<=1?1:c;i=g&1;c=0;if(e>>>0>=8){g=g&-2;e=0;while(1){f=c<<2;h=f+d|0;j=F[h>>2];if((j|0)>(b|0)){F[h>>2]=j-1}f=d+(f|4)|0;h=F[f>>2];if((h|0)>(b|0)){F[f>>2]=h-1}c=c+2|0;e=e+2|0;if((g|0)!=(e|0)){continue}break}}if(!i){break g}c=d+(c<<2)|0;d=F[c>>2];if((d|0)<=(b|0)){break g}F[c>>2]=d-1}c=F[a+60>>2];d=F[a+56>>2];h:{if((c|0)==(d|0)){break h}e=c-d|0;c=e>>2;g=c>>>0<=1?1:c;i=g&1;c=0;if(e>>>0>=8){g=g&-2;e=0;while(1){f=c<<2;h=f+d|0;j=F[h>>2];if((j|0)>(b|0)){F[h>>2]=j-1}f=d+(f|4)|0;h=F[f>>2];if((h|0)>(b|0)){F[f>>2]=h-1}c=c+2|0;e=e+2|0;if((g|0)!=(e|0)){continue}break}}if(!i){break h}c=d+(c<<2)|0;d=F[c>>2];if((d|0)<=(b|0)){break h}F[c>>2]=d-1}c=F[a+72>>2];a=F[a+68>>2];if((c|0)==(a|0)){break a}d=c-a|0;c=d>>2;e=c>>>0<=1?1:c;g=e&1;c=0;if(d>>>0>=8){d=e&-2;e=0;while(1){i=c<<2;f=i+a|0;h=F[f>>2];if((h|0)>(b|0)){F[f>>2]=h-1}i=a+(i|4)|0;f=F[i>>2];if((f|0)>(b|0)){F[i>>2]=f-1}c=c+2|0;e=e+2|0;if((d|0)!=(e|0)){continue}break}}if(!g){break a}f=b;a=a+(c<<2)|0;b=F[a>>2];if((f|0)>=(b|0)){break a}F[a>>2]=b-1}}function ja(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;a:{if(!a){break a}d=a-8|0;b=F[a-4>>2];a=b&-8;f=d+a|0;b:{if(b&1){break b}if(!(b&3)){break a}b=F[d>>2];d=d-b|0;if(d>>>0>>0<=255){e=F[d+8>>2];b=b>>>3|0;c=F[d+12>>2];if((c|0)==(e|0)){i=11764,j=F[2941]&oi(b),F[i>>2]=j;break b}F[e+12>>2]=c;F[c+8>>2]=e;break b}h=F[d+24>>2];b=F[d+12>>2];c:{if((d|0)!=(b|0)){c=F[d+8>>2];F[c+12>>2]=b;F[b+8>>2]=c;break c}d:{e=d+20|0;c=F[e>>2];if(c){break d}e=d+16|0;c=F[e>>2];if(c){break d}b=0;break c}while(1){g=e;b=c;e=b+20|0;c=F[e>>2];if(c){continue}e=b+16|0;c=F[b+16>>2];if(c){continue}break}F[g>>2]=0}if(!h){break b}e=F[d+28>>2];c=(e<<2)+12068|0;e:{if(F[c>>2]==(d|0)){F[c>>2]=b;if(b){break e}i=11768,j=F[2942]&oi(e),F[i>>2]=j;break b}F[h+(F[h+16>>2]==(d|0)?16:20)>>2]=b;if(!b){break b}}F[b+24>>2]=h;c=F[d+16>>2];if(c){F[b+16>>2]=c;F[c+24>>2]=b}c=F[d+20>>2];if(!c){break b}F[b+20>>2]=c;F[c+24>>2]=b;break b}b=F[f+4>>2];if((b&3)!=3){break b}F[2943]=a;F[f+4>>2]=b&-2;F[d+4>>2]=a|1;F[a+d>>2]=a;return}if(d>>>0>=f>>>0){break a}b=F[f+4>>2];if(!(b&1)){break a}f:{if(!(b&2)){if(F[2947]==(f|0)){F[2947]=d;a=F[2944]+a|0;F[2944]=a;F[d+4>>2]=a|1;if(F[2946]!=(d|0)){break a}F[2943]=0;F[2946]=0;return}if(F[2946]==(f|0)){F[2946]=d;a=F[2943]+a|0;F[2943]=a;F[d+4>>2]=a|1;F[a+d>>2]=a;return}a=(b&-8)+a|0;g:{if(b>>>0<=255){e=F[f+8>>2];b=b>>>3|0;c=F[f+12>>2];if((c|0)==(e|0)){i=11764,j=F[2941]&oi(b),F[i>>2]=j;break g}F[e+12>>2]=c;F[c+8>>2]=e;break g}h=F[f+24>>2];b=F[f+12>>2];h:{if((f|0)!=(b|0)){c=F[f+8>>2];F[c+12>>2]=b;F[b+8>>2]=c;break h}i:{e=f+20|0;c=F[e>>2];if(c){break i}e=f+16|0;c=F[e>>2];if(c){break i}b=0;break h}while(1){g=e;b=c;e=b+20|0;c=F[e>>2];if(c){continue}e=b+16|0;c=F[b+16>>2];if(c){continue}break}F[g>>2]=0}if(!h){break g}e=F[f+28>>2];c=(e<<2)+12068|0;j:{if(F[c>>2]==(f|0)){F[c>>2]=b;if(b){break j}i=11768,j=F[2942]&oi(e),F[i>>2]=j;break g}F[h+(F[h+16>>2]==(f|0)?16:20)>>2]=b;if(!b){break g}}F[b+24>>2]=h;c=F[f+16>>2];if(c){F[b+16>>2]=c;F[c+24>>2]=b}c=F[f+20>>2];if(!c){break g}F[b+20>>2]=c;F[c+24>>2]=b}F[d+4>>2]=a|1;F[a+d>>2]=a;if(F[2946]!=(d|0)){break f}F[2943]=a;return}F[f+4>>2]=b&-2;F[d+4>>2]=a|1;F[a+d>>2]=a}if(a>>>0<=255){b=(a&-8)+11804|0;c=F[2941];a=1<<(a>>>3);k:{if(!(c&a)){F[2941]=a|c;a=b;break k}a=F[b+8>>2]}F[b+8>>2]=d;F[a+12>>2]=d;F[d+12>>2]=b;F[d+8>>2]=a;return}e=31;if(a>>>0<=16777215){b=O(a>>>8|0);e=((a>>>38-b&1)-(b<<1)|0)+62|0}F[d+28>>2]=e;F[d+16>>2]=0;F[d+20>>2]=0;g=(e<<2)+12068|0;l:{m:{c=F[2942];b=1<>2]=d;F[d+24>>2]=g;break n}e=a<<((e|0)!=31?25-(e>>>1|0)|0:0);b=F[g>>2];while(1){c=b;if((F[b+4>>2]&-8)==(a|0)){break m}b=e>>>29|0;e=e<<1;g=c+(b&4)|0;b=F[g+16>>2];if(b){continue}break}F[g+16>>2]=d;F[d+24>>2]=c}F[d+12>>2]=d;F[d+8>>2]=d;break l}a=F[c+8>>2];F[a+12>>2]=d;F[c+8>>2]=d;F[d+24>>2]=0;F[d+12>>2]=c;F[d+8>>2]=a}a=F[2949]-1|0;F[2949]=a?a:-1}}function di(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;F[a+8>>2]=e;n=a+32|0;h=F[n>>2];f=F[a+36>>2]-h>>2;a:{if(f>>>0>>0){qa(n,e-f|0);d=F[a+8>>2];break a}d=e;if(d>>>0>=f>>>0){break a}F[a+36>>2]=h+(e<<2);d=e}s=F[a+52>>2];p=F[a+48>>2];f=0;h=e>>>0>1073741823?-1:e<<2;m=ma(ka(h),0,h);b:{if((d|0)<=0){break b}g=F[a+32>>2];while(1){d=f<<2;h=F[d+m>>2];j=F[a+16>>2];c:{if((h|0)>(j|0)){F[d+g>>2]=j;break c}d=d+g|0;j=F[a+12>>2];if((j|0)>(h|0)){F[d>>2]=j;break c}F[d>>2]=h}d=F[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}if((d|0)<=0){break b}f=0;while(1){h=f<<2;d=h+c|0;h=F[b+h>>2]+F[g+h>>2]|0;F[d>>2]=h;d:{if((h|0)>F[a+16>>2]){i=h-F[a+20>>2]|0}else{if((h|0)>=F[a+12>>2]){break d}i=h+F[a+20>>2]|0}F[d>>2]=i}d=F[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}}f=F[a+56>>2];q=F[f>>2];f=F[f+4>>2]-q|0;if((f|0)>=5){o=f>>>2|0;t=o>>>0<=2?2:o;u=e&-2;w=e&1;h=1;while(1){e:{f:{if((h|0)!=(o|0)){r=L(e,h);f=F[(h<<2)+q>>2];if((f|0)==-1){break f}f=F[F[p+12>>2]+(f<<2)>>2];if((f|0)==-1){break f}j=F[s>>2];g=F[p>>2];k=F[j+(F[g+(f<<2)>>2]<<2)>>2];i=f+1|0;i=(i>>>0)%3|0?i:f-2|0;if((i|0)!=-1){i=F[g+(i<<2)>>2]}else{i=-1}g:{h:{if((f>>>0)%3|0){f=f-1|0;break h}f=f+2|0;l=-1;if((f|0)==-1){break g}}l=F[g+(f<<2)>>2]}if((h|0)<=(k|0)){break f}f=F[(i<<2)+j>>2];if((f|0)>=(h|0)){break f}g=F[j+(l<<2)>>2];if((g|0)>=(h|0)){break f}i:{if((e|0)<=0){break i}g=L(e,g);j=L(e,f);k=L(e,k);f=0;l=0;if((e|0)!=1){while(1){F[(f<<2)+m>>2]=(F[(f+g<<2)+c>>2]+F[(f+j<<2)+c>>2]|0)-F[(f+k<<2)+c>>2];i=f|1;F[(i<<2)+m>>2]=(F[(g+i<<2)+c>>2]+F[(j+i<<2)+c>>2]|0)-F[(i+k<<2)+c>>2];f=f+2|0;l=l+2|0;if((u|0)!=(l|0)){continue}break}}if(!w){break i}F[(f<<2)+m>>2]=(F[(f+g<<2)+c>>2]+F[(f+j<<2)+c>>2]|0)-F[(f+k<<2)+c>>2]}if((d|0)<=0){break e}j=F[n>>2];f=0;while(1){d=f<<2;g=F[d+m>>2];k=F[a+16>>2];j:{if((g|0)>(k|0)){F[d+j>>2]=k;break j}d=d+j|0;k=F[a+12>>2];if((k|0)>(g|0)){F[d>>2]=k;break j}F[d>>2]=g}d=F[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}f=0;if((d|0)<=0){break e}d=r<<2;k=d+c|0;i=b+d|0;while(1){g=f<<2;d=g+k|0;g=F[g+i>>2]+F[g+j>>2]|0;F[d>>2]=g;k:{if((g|0)>F[a+16>>2]){l=g-F[a+20>>2]|0}else{if((g|0)>=F[a+12>>2]){break k}l=g+F[a+20>>2]|0}F[d>>2]=l}d=F[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}break e}ta();v()}if((d|0)<=0){break e}k=(L(h-1|0,e)<<2)+c|0;j=F[n>>2];f=0;while(1){d=f<<2;g=F[d+k>>2];i=F[a+16>>2];l:{if((g|0)>(i|0)){F[d+j>>2]=i;break l}d=d+j|0;i=F[a+12>>2];if((i|0)>(g|0)){F[d>>2]=i;break l}F[d>>2]=g}d=F[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}f=0;if((d|0)<=0){break e}d=r<<2;k=d+c|0;i=b+d|0;while(1){g=f<<2;d=g+k|0;g=F[g+i>>2]+F[g+j>>2]|0;F[d>>2]=g;m:{if((g|0)>F[a+16>>2]){l=g-F[a+20>>2]|0}else{if((g|0)>=F[a+12>>2]){break m}l=g+F[a+20>>2]|0}F[d>>2]=l}d=F[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}}h=h+1|0;if((t|0)!=(h|0)){continue}break}}ja(m);return 1}function od(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((b|0)==-1){return 1}g=(b>>>0)/3|0;if(!(F[F[a+24>>2]+(g>>>3&268435452)>>2]>>>g&1)){e=F[a+48>>2];F[a+52>>2]=e;a:{if((e|0)!=F[a+56>>2]){F[e>>2]=b;F[a+52>>2]=e+4;break a}d=ka(4);F[d>>2]=b;c=d+4|0;F[a+56>>2]=c;F[a+52>>2]=c;F[a+48>>2]=d;if(!e){break a}ja(e)}c=b+1|0;i=(c>>>0)%3|0?c:b-2|0;c=F[F[a+4>>2]+28>>2];k=F[(i<<2)+c>>2];if((k|0)==-1){return 0}e=(b-L(g,3)|0?-1:2)+b|0;j=F[c+(e<<2)>>2];if((j|0)==-1){return 0}b=F[a+36>>2];g=b+(k>>>3&536870908)|0;d=F[g>>2];c=1<>2]=c|d;Ka(a+8|0,k,i);b=F[a+36>>2]}d=(j>>>3&536870908)+b|0;c=F[d>>2];b=1<>2]=b|c;Ka(a+8|0,j,e)}f=F[a+52>>2];if((f|0)==F[a+48>>2]){return 1}k=a+8|0;while(1){b:{c:{f=f-4|0;b=F[f>>2];if((b|0)==-1){break c}c=(b>>>0)/3|0;g=F[a+24>>2]+(c>>>3&268435452)|0;d=F[g>>2];c=1<>2]=c|d;h=F[a+4>>2];c=F[F[h+28>>2]+(b<<2)>>2];if((c|0)==-1){return 0}while(1){d=b;d:{e:{j=F[a+36>>2]+(c>>>3&536870908)|0;i=F[j>>2];e=1<>2]+(c<<2)>>2];g:{if((g|0)==-1){break g}b=g+1|0;b=(b>>>0)%3|0?b:g-2|0;if((b|0)==-1|F[F[h>>2]+(b>>>3&536870908)>>2]>>>b&1){break g}g=F[F[F[h+64>>2]+12>>2]+(b<<2)>>2];if((g|0)!=-1){break f}}F[j>>2]=e|i;Ka(k,c,d);h=F[a+4>>2];break e}F[j>>2]=e|i;Ka(k,c,d);h=F[a+4>>2];b=g+1|0;if((((b>>>0)%3|0?b:g-2|0)|0)==-1){break e}b=-1;h:{if((d|0)==-1){break h}c=d+1|0;c=(c>>>0)%3|0?c:d-2|0;if((c|0)==-1|F[F[h>>2]+(c>>>3&536870908)>>2]>>>c&1){break h}b=F[F[F[h+64>>2]+12>>2]+(c<<2)>>2]}c=(b>>>0)/3|0;d=1<>2];e=c>>>5|0;j=F[f+(e<<2)>>2];break d}i:{j:{if((d|0)==-1){break j}c=-1;b=d+1|0;b=(b>>>0)%3|0?b:d-2|0;if(!((b|0)==-1|F[F[h>>2]+(b>>>3&536870908)>>2]>>>b&1)){c=F[F[F[h+64>>2]+12>>2]+(b<<2)>>2]}k:{l:{if((d>>>0)%3|0){f=d-1|0;break l}f=d+2|0;b=-1;if((f|0)==-1){break k}}b=-1;if(F[F[h>>2]+(f>>>3&536870908)>>2]>>>f&1){break k}b=F[F[F[h+64>>2]+12>>2]+(f<<2)>>2]}g=(b|0)==-1;i=g?-1:(b>>>0)/3|0;if((c|0)!=-1){f=F[a+24>>2];d=(c>>>0)/3|0;e=d>>>5|0;j=F[f+(e<<2)>>2];d=1<>2];e=i>>>5|0;j=F[f+(e<<2)>>2];if(!(d&j)){break d}}f=F[a+52>>2]-4|0;F[a+52>>2]=f;break b}if(g){b=c;break d}if(F[(i>>>3&536870908)+f>>2]>>>i&1){b=c;break d}h=F[a+52>>2];F[h-4>>2]=b;if(F[a+56>>2]!=(h|0)){F[h>>2]=c;f=h+4|0;break c}m:{i=F[a+48>>2];e=h-i|0;g=e>>2;d=g+1|0;if(d>>>0<1073741824){b=e>>>1|0;e=e>>>0>=2147483644?1073741823:b>>>0>d>>>0?b:d;if(e){if(e>>>0>=1073741824){break m}d=ka(e<<2)}else{d=0}b=d+(g<<2)|0;F[b>>2]=c;f=b+4|0;if((h|0)!=(i|0)){while(1){b=b-4|0;h=h-4|0;F[b>>2]=F[h>>2];if((h|0)!=(i|0)){continue}break}}F[a+56>>2]=d+(e<<2);F[a+52>>2]=f;F[a+48>>2]=b;if(!i){break b}ja(i);f=F[a+52>>2];break b}na();v()}oa();v()}F[(e<<2)+f>>2]=d|j;c=F[F[h+28>>2]+(b<<2)>>2];if((c|0)!=-1){continue}break}return 0}F[a+52>>2]=f}if(F[a+48>>2]!=(f|0)){continue}break}}return 1}function he(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,w=0;F[a+8>>2]=e;m=a+32|0;h=F[m>>2];f=F[a+36>>2]-h>>2;a:{if(f>>>0>>0){qa(m,e-f|0);d=F[a+8>>2];break a}d=e;if(d>>>0>=f>>>0){break a}F[a+36>>2]=h+(e<<2);d=e}s=F[a+52>>2];n=F[a+48>>2];f=0;h=e>>>0>1073741823?-1:e<<2;l=ma(ka(h),0,h);b:{if((d|0)<=0){break b}g=F[a+32>>2];while(1){d=f<<2;h=F[d+l>>2];i=F[a+16>>2];c:{if((h|0)>(i|0)){F[d+g>>2]=i;break c}d=d+g|0;i=F[a+12>>2];if((i|0)>(h|0)){F[d>>2]=i;break c}F[d>>2]=h}d=F[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}if((d|0)<=0){break b}f=0;while(1){h=f<<2;d=h+c|0;h=F[b+h>>2]+F[g+h>>2]|0;F[d>>2]=h;d:{if((h|0)>F[a+16>>2]){h=h-F[a+20>>2]|0}else{if((h|0)>=F[a+12>>2]){break d}h=h+F[a+20>>2]|0}F[d>>2]=h}d=F[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}}f=F[a+56>>2];q=F[f>>2];f=F[f+4>>2]-q|0;if((f|0)>=5){o=f>>>2|0;t=o>>>0<=2?2:o;u=e&-2;w=e&1;h=1;while(1){e:{f:{if((h|0)!=(o|0)){r=L(e,h);f=F[(h<<2)+q>>2];if((f|0)==-1|F[F[n>>2]+(f>>>3&536870908)>>2]>>>f&1){break f}f=F[F[F[n+64>>2]+12>>2]+(f<<2)>>2];if((f|0)==-1){break f}i=F[s>>2];g=F[n+28>>2];k=F[i+(F[g+(f<<2)>>2]<<2)>>2];if((k|0)>=(h|0)){break f}j=f+1|0;j=F[i+(F[g+(((j>>>0)%3|0?j:f-2|0)<<2)>>2]<<2)>>2];if((j|0)>=(h|0)){break f}f=F[i+(F[g+(f+((f>>>0)%3|0?-1:2)<<2)>>2]<<2)>>2];if((f|0)>=(h|0)){break f}g:{if((e|0)<=0){break g}g=L(e,f);i=L(e,j);k=L(e,k);f=0;p=0;if((e|0)!=1){while(1){F[(f<<2)+l>>2]=(F[(f+g<<2)+c>>2]+F[(f+i<<2)+c>>2]|0)-F[(f+k<<2)+c>>2];j=f|1;F[(j<<2)+l>>2]=(F[(g+j<<2)+c>>2]+F[(i+j<<2)+c>>2]|0)-F[(k+j<<2)+c>>2];f=f+2|0;p=p+2|0;if((u|0)!=(p|0)){continue}break}}if(!w){break g}F[(f<<2)+l>>2]=(F[(f+g<<2)+c>>2]+F[(f+i<<2)+c>>2]|0)-F[(f+k<<2)+c>>2]}if((d|0)<=0){break e}i=F[m>>2];f=0;while(1){d=f<<2;g=F[d+l>>2];k=F[a+16>>2];h:{if((g|0)>(k|0)){F[d+i>>2]=k;break h}d=d+i|0;k=F[a+12>>2];if((k|0)>(g|0)){F[d>>2]=k;break h}F[d>>2]=g}d=F[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}f=0;if((d|0)<=0){break e}d=r<<2;k=d+c|0;j=b+d|0;while(1){g=f<<2;d=g+k|0;g=F[g+j>>2]+F[g+i>>2]|0;F[d>>2]=g;i:{if((g|0)>F[a+16>>2]){g=g-F[a+20>>2]|0}else{if((g|0)>=F[a+12>>2]){break i}g=g+F[a+20>>2]|0}F[d>>2]=g}d=F[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}break e}ta();v()}if((d|0)<=0){break e}k=(L(h-1|0,e)<<2)+c|0;i=F[m>>2];f=0;while(1){d=f<<2;g=F[d+k>>2];j=F[a+16>>2];j:{if((g|0)>(j|0)){F[d+i>>2]=j;break j}d=d+i|0;j=F[a+12>>2];if((j|0)>(g|0)){F[d>>2]=j;break j}F[d>>2]=g}d=F[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}f=0;if((d|0)<=0){break e}d=r<<2;k=d+c|0;j=b+d|0;while(1){g=f<<2;d=g+k|0;g=F[g+j>>2]+F[g+i>>2]|0;F[d>>2]=g;k:{if((g|0)>F[a+16>>2]){g=g-F[a+20>>2]|0}else{if((g|0)>=F[a+12>>2]){break k}g=g+F[a+20>>2]|0}F[d>>2]=g}d=F[a+8>>2];f=f+1|0;if((d|0)>(f|0)){continue}break}}h=h+1|0;if((t|0)!=(h|0)){continue}break}}ja(l);return 1}function Fb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=M(0),k=0,l=0,m=M(0);i=F[c>>2];a:{b:{f=F[b+4>>2];if(!f){break b}g=ni(f);c:{if(g>>>0>=2){e=i;if(f>>>0<=e>>>0){e=(i>>>0)%(f>>>0)|0}c=F[F[b>>2]+(e<<2)>>2];if(!c){break b}if(g>>>0<=1){break c}while(1){c=F[c>>2];if(!c){break b}g=F[c+4>>2];if((g|0)!=(i|0)){if(f>>>0<=g>>>0){g=(g>>>0)%(f>>>0)|0}if((e|0)!=(g|0)){break b}}if(F[c+8>>2]!=(i|0)){continue}break}b=0;break a}e=f-1&i;c=F[F[b>>2]+(e<<2)>>2];if(!c){break b}}h=f-1|0;while(1){c=F[c>>2];if(!c){break b}g=F[c+4>>2];if((g|0)!=(i|0)&(g&h)!=(e|0)){break b}if(F[c+8>>2]!=(i|0)){continue}break}b=0;break a}c=ka(16);d=F[F[d>>2]>>2];F[c+12>>2]=0;F[c+8>>2]=d;F[c+4>>2]=i;F[c>>2]=0;m=M(F[b+12>>2]+1>>>0);j=J[b+16>>2];d:{if(m>M(j*M(f>>>0))?0:f){break d}e=2;d=(f-1&f)!=0|f>>>0<3|f<<1;j=M(S(M(m/j)));e:{if(j=M(0)){g=~~j>>>0;break e}g=0}d=d>>>0>g>>>0?d:g;f:{if((d|0)==1){break f}if(!(d&d-1)){e=d;break f}e=Mc(d);f=F[b+4>>2]}g:{if(e>>>0<=f>>>0){if(e>>>0>=f>>>0){break g}g=f>>>0<3;j=M(S(M(M(I[b+12>>2])/J[b+16>>2])));h:{if(j=M(0)){d=~~j>>>0;break h}d=0}i:{j:{if(g){break j}if(ni(f)>>>0>1){break j}d=d>>>0<2?d:1<<32-O(d-1|0);break i}d=Mc(d)}e=d>>>0>>0?e:d;if(f>>>0<=e>>>0){break g}}f=0;g=0;h=e;k:{l:{m:{n:{if(e){if(h>>>0>=1073741824){break n}d=ka(h<<2);e=F[b>>2];F[b>>2]=d;if(e){ja(e)}F[b+4>>2]=h;d=0;if(h>>>0>=4){e=h&-4;while(1){k=d<<2;F[k+F[b>>2]>>2]=0;F[F[b>>2]+(k|4)>>2]=0;F[F[b>>2]+(k|8)>>2]=0;F[F[b>>2]+(k|12)>>2]=0;d=d+4|0;g=g+4|0;if((e|0)!=(g|0)){continue}break}}e=h&3;if(e){while(1){F[F[b>>2]+(d<<2)>>2]=0;d=d+1|0;f=f+1|0;if((e|0)!=(f|0)){continue}break}}e=F[b+8>>2];if(!e){break k}d=b+8|0;f=F[e+4>>2];g=ni(h);if(g>>>0<2){break m}f=f>>>0>=h>>>0?(f>>>0)%(h>>>0)|0:f;F[F[b>>2]+(f<<2)>>2]=d;d=F[e>>2];if(!d){break k}if(g>>>0<=1){break l}while(1){g=F[d+4>>2];if(h>>>0<=g>>>0){g=(g>>>0)%(h>>>0)|0}o:{if((f|0)==(g|0)){e=d;break o}l=g<<2;k=l+F[b>>2]|0;if(!F[k>>2]){F[k>>2]=e;e=d;f=g;break o}F[e>>2]=F[d>>2];F[d>>2]=F[F[l+F[b>>2]>>2]>>2];F[F[l+F[b>>2]>>2]>>2]=d}d=F[e>>2];if(d){continue}break}break k}d=F[b>>2];F[b>>2]=0;if(d){ja(d)}F[b+4>>2]=0;break k}oa();v()}f=h-1&f;F[F[b>>2]+(f<<2)>>2]=d;d=F[e>>2];if(!d){break k}}k=h-1|0;while(1){g=k&F[d+4>>2];p:{if((g|0)==(f|0)){e=d;break p}l=g<<2;h=l+F[b>>2]|0;if(F[h>>2]){F[e>>2]=F[d>>2];F[d>>2]=F[F[l+F[b>>2]>>2]>>2];F[F[l+F[b>>2]>>2]>>2]=d;break p}F[h>>2]=e;e=d;f=g}d=F[e>>2];if(d){continue}break}}}f=F[b+4>>2];d=f-1|0;if(!(d&f)){e=d&i;break d}if(f>>>0>i>>>0){e=i;break d}e=(i>>>0)%(f>>>0)|0}e=F[b>>2]+(e<<2)|0;d=F[e>>2];q:{r:{if(!d){d=b+8|0;F[c>>2]=F[d>>2];F[b+8>>2]=c;F[e>>2]=d;d=F[c>>2];if(!d){break q}d=F[d+4>>2];e=f-1|0;s:{if(!(e&f)){d=d&e;break s}if(d>>>0>>0){break s}d=(d>>>0)%(f>>>0)|0}d=F[b>>2]+(d<<2)|0;break r}F[c>>2]=F[d>>2]}F[d>>2]=c}F[b+12>>2]=F[b+12>>2]+1;b=1}D[a+4|0]=b;F[a>>2]=c}function Vb(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;j=L(b,12)+a|0;F[j+12>>2]=F[j+8>>2];m=(c|0)==-1?-1:(c>>>0)/3|0;d=1;k=c;a:{b:{c:{while(1){d:{l=d;if(!d){if((k|0)==-1){break d}if((Wc(a,((k>>>0)%3|0?-1:2)+k|0)|0)==-1){break a}c=k+1|0;d=(c>>>0)%3|0?c:k-2|0;if((d|0)==-1){break a}c=d+1|0;c=(c>>>0)%3|0?c:d-2|0;if((c|0)==-1){break a}d=F[F[F[a+4>>2]+12>>2]+(c<<2)>>2];if((d|0)==-1){break a}c=d+1|0;c=(c>>>0)%3|0?c:d-2|0;if((c|0)==-1){break a}m=(c>>>0)/3|0}e:{d=F[a+56>>2]+(m>>>3&536870908)|0;h=F[d>>2];e=1<>2]=e|h;d=F[j+12>>2];f:{if((d|0)!=F[j+16>>2]){F[d>>2]=m;F[j+12>>2]=d+4;break f}n=F[j+8>>2];h=d-n|0;e=h>>2;i=e+1|0;if(i>>>0>=1073741824){break c}g=h>>>1|0;i=h>>>0>=2147483644?1073741823:i>>>0>>0?g:i;if(i){if(i>>>0>=1073741824){break b}g=ka(i<<2)}else{g=0}h=g+(e<<2)|0;F[h>>2]=m;e=h+4|0;if((d|0)!=(n|0)){while(1){h=h-4|0;d=d-4|0;F[h>>2]=F[d>>2];if((d|0)!=(n|0)){continue}break}}F[j+8>>2]=h;F[j+12>>2]=e;F[j+16>>2]=g+(i<<2);if(!n){break f}ja(n)}g=f+1|0;g:{h:{i:{if(!f){break i}if(g&1){if((c|0)==-1){c=-1;break g}d=c+1|0;c=(d>>>0)%3|0?d:c-2|0;break i}k=l?k:c;if((c|0)==-1){c=-1;break g}if((c>>>0)%3|0){d=c-1|0;break h}c=c+2|0}d=c;c=-1;if((d|0)==-1){break g}}c=F[F[F[a+4>>2]+12>>2]+(d<<2)>>2];h=-1;f=-1;e=d+1|0;e=(e>>>0)%3|0?e:d-2|0;if((e|0)>=0){f=(e>>>0)/3|0;f=F[(F[F[a>>2]+96>>2]+L(f,12)|0)+(e-L(f,3)<<2)>>2]}j:{if((c|0)==-1){break j}i=((c>>>0)%3|0?-1:2)+c|0;if((i|0)<0){break j}e=(i>>>0)/3|0;h=F[(F[F[a>>2]+96>>2]+L(e,12)|0)+(i-L(e,3)<<2)>>2]}if((f|0)!=(h|0)){c=-1;break g}k:{l:{f=((d>>>0)%3|0?-1:2)+d|0;if((f|0)>=0){d=(f>>>0)/3|0;if((c|0)!=-1){break l}c=-1;break g}d=-1;if((c|0)!=-1){break k}c=-1;break g}d=F[(F[F[a>>2]+96>>2]+L(d,12)|0)+(f-L(d,3)<<2)>>2]}f=c+1|0;e=(f>>>0)%3|0?f:c-2|0;if((e|0)>=0){f=(e>>>0)/3|0;f=F[(F[F[a>>2]+96>>2]+L(f,12)|0)+(e-L(f,3)<<2)>>2]}else{f=-1}if((f|0)!=(d|0)){c=-1;break g}f=g;m=(c>>>0)/3|0;d=F[a+56>>2]+(m>>>3&268435452)|0;h=F[d>>2];e=1<>2]-4|0;g=F[l>>2];d=F[a+56>>2]+(g>>>3&536870908)|0;c=F[d>>2];o=d,p=oi(g)&c,F[o>>2]=p;F[j+12>>2]=l;break a}d=0;if(l){continue}break a}break}k=-1;Wc(a,-1);break a}na();v()}oa();v()}F[((b<<2)+a|0)+44>>2]=k;b=F[j+12>>2];i=F[j+8>>2];m:{if((b|0)==(i|0)){break m}c=b-i|0;b=c>>2;b=b>>>0<=1?1:b;k=b&1;e=F[a+56>>2];d=0;if(c>>>0>=8){f=b&-2;c=0;while(1){l=d<<2;g=F[l+i>>2];b=e+(g>>>3&536870908)|0;a=F[b>>2];o=b,p=oi(g)&a,F[o>>2]=p;g=F[i+(l|4)>>2];b=e+(g>>>3&536870908)|0;a=F[b>>2];o=b,p=oi(g)&a,F[o>>2]=p;d=d+2|0;c=c+2|0;if((f|0)!=(c|0)){continue}break}}if(!k){break m}c=F[i+(d<<2)>>2];b=e+(c>>>3&536870908)|0;a=F[b>>2];o=b,p=oi(c)&a,F[o>>2]=p}}function pd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((b|0)==-1){return 1}g=(b>>>0)/3|0;if(!(F[F[a+24>>2]+(g>>>3&268435452)>>2]>>>g&1)){f=F[a+48>>2];F[a+52>>2]=f;a:{if((f|0)!=F[a+56>>2]){F[f>>2]=b;F[a+52>>2]=f+4;break a}d=ka(4);F[d>>2]=b;c=d+4|0;F[a+56>>2]=c;F[a+52>>2]=c;F[a+48>>2]=d;if(!f){break a}ja(f)}e=-1;d=F[a+4>>2];c=b+1|0;i=(c>>>0)%3|0?c:b-2|0;if((i|0)!=-1){e=F[F[d>>2]+(i<<2)>>2]}b:{h=b-L(g,3)|0;if(h){c=b-1|0;break b}c=b+2|0;if((c|0)!=-1){break b}return 0}if((e|0)==-1){return 0}j=F[F[d>>2]+(c<<2)>>2];if((j|0)==-1){return 0}c=F[a+36>>2];f=c+(e>>>3&536870908)|0;g=F[f>>2];d=1<>2]=d|g;Ka(a+8|0,e,i);c=F[a+36>>2]}g=(j>>>3&536870908)+c|0;d=F[g>>2];c=1<>2]=c|d;Ka(a+8|0,j,(h?-1:2)+b|0)}c=F[a+52>>2];if((c|0)==F[a+48>>2]){return 1}j=a+8|0;while(1){c:{d:{c=c-4|0;b=F[c>>2];if((b|0)==-1){break d}d=(b>>>0)/3|0;f=F[a+24>>2]+(d>>>3&268435452)|0;g=F[f>>2];d=1<>2]=d|g;while(1){i=F[a+4>>2];e=F[F[i>>2]+(b<<2)>>2];if((e|0)==-1){return 0}e:{f:{h=F[a+36>>2]+(e>>>3&536870908)|0;f=F[h>>2];g=1<>2]+(e<<2)>>2];h:{if((d|0)==-1){break h}c=d+1|0;c=(c>>>0)%3|0?c:d-2|0;if((c|0)==-1){break h}d=F[F[i+12>>2]+(c<<2)>>2];if((d|0)!=-1){break g}}F[h>>2]=f|g;Ka(j,e,b);break f}F[h>>2]=f|g;Ka(j,e,b);c=d+1|0;if((((c>>>0)%3|0?c:d-2|0)|0)==-1){break f}c=b-2|0;d=b+1|0;b=-1;c=(d>>>0)%3|0?d:c;if((c|0)!=-1){b=F[F[F[a+4>>2]+12>>2]+(c<<2)>>2]}c=(b>>>0)/3|0;d=1<>2];f=c>>>5|0;i=F[e+(f<<2)>>2];break e}c=-1;g=F[a+4>>2];d=b+1|0;d=(d>>>0)%3|0?d:b-2|0;if((d|0)!=-1){c=F[F[g+12>>2]+(d<<2)>>2]}i:{j:{if((b>>>0)%3|0){e=b-1|0;break j}e=b+2|0;b=-1;if((e|0)==-1){break i}}b=F[F[g+12>>2]+(e<<2)>>2]}g=(b|0)==-1;h=g?-1:(b>>>0)/3|0;k:{if((c|0)!=-1){e=F[a+24>>2];d=(c>>>0)/3|0;f=d>>>5|0;i=F[e+(f<<2)>>2];d=1<>2];f=h>>>5|0;i=F[e+(f<<2)>>2];if(!(d&i)){break e}}c=F[a+52>>2]-4|0;F[a+52>>2]=c;break c}if(g){b=c;break e}if(F[(h>>>3&536870908)+e>>2]>>>h&1){b=c;break e}e=F[a+52>>2];F[e-4>>2]=b;if(F[a+56>>2]!=(e|0)){F[e>>2]=c;c=e+4|0;break d}l:{h=F[a+48>>2];f=e-h|0;g=f>>2;d=g+1|0;if(d>>>0<1073741824){b=f>>>1|0;f=f>>>0>=2147483644?1073741823:b>>>0>d>>>0?b:d;if(f){if(f>>>0>=1073741824){break l}d=ka(f<<2)}else{d=0}b=d+(g<<2)|0;F[b>>2]=c;c=b+4|0;if((e|0)!=(h|0)){while(1){b=b-4|0;e=e-4|0;F[b>>2]=F[e>>2];if((e|0)!=(h|0)){continue}break}}F[a+56>>2]=d+(f<<2);F[a+52>>2]=c;F[a+48>>2]=b;if(!h){break c}ja(h);c=F[a+52>>2];break c}na();v()}oa();v()}F[(f<<2)+e>>2]=d|i;if((b|0)!=-1){continue}break}return 0}F[a+52>>2]=c}if(F[a+48>>2]!=(c|0)){continue}break}}return 1}function ee(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;h=Z-32|0;Z=h;a:{b:{if(!Oa(1,h+28|0,b)){break b}d=F[h+28>>2];c=F[F[a+48>>2]+64>>2];if(d>>>0>F[c+4>>2]-F[c>>2]>>2>>>0){break b}c:{if(d){Na(a+60|0,d);c=h+8|0;F[c>>2]=0;F[c+4>>2]=0;D[c+5|0]=0;D[c+6|0]=0;D[c+7|0]=0;D[c+8|0]=0;D[c+9|0]=0;D[c+10|0]=0;D[c+11|0]=0;D[c+12|0]=0;if(!Aa(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|F[g>>2]}else{i=F[g>>2]&(f^-1)}F[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}if(!Oa(1,h+28|0,b)){break b}d=F[h+28>>2];c=F[F[a+48>>2]+64>>2];if(d>>>0>F[c+4>>2]-F[c>>2]>>2>>>0){break b}if(d){e=0;Na(a+72|0,d);c=h+8|0;F[c>>2]=0;F[c+4>>2]=0;D[c+5|0]=0;D[c+6|0]=0;D[c+7|0]=0;D[c+8|0]=0;D[c+9|0]=0;D[c+10|0]=0;D[c+11|0]=0;D[c+12|0]=0;if(!Aa(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|F[g>>2]}else{i=F[g>>2]&(f^-1)}F[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}if(!Oa(1,h+28|0,b)){break b}d=F[h+28>>2];c=F[F[a+48>>2]+64>>2];if(d>>>0>F[c+4>>2]-F[c>>2]>>2>>>0){break b}if(d){e=0;Na(a+84|0,d);c=h+8|0;F[c>>2]=0;F[c+4>>2]=0;D[c+5|0]=0;D[c+6|0]=0;D[c+7|0]=0;D[c+8|0]=0;D[c+9|0]=0;D[c+10|0]=0;D[c+11|0]=0;D[c+12|0]=0;if(!Aa(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|F[g>>2]}else{i=F[g>>2]&(f^-1)}F[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}if(!Oa(1,h+28|0,b)){break b}d=F[h+28>>2];c=F[F[a+48>>2]+64>>2];if(d>>>0>F[c+4>>2]-F[c>>2]>>2>>>0){break b}if(d){e=0;Na(a+96|0,d);c=h+8|0;F[c>>2]=0;F[c+4>>2]=0;D[c+5|0]=0;D[c+6|0]=0;D[c+7|0]=0;D[c+8|0]=0;D[c+9|0]=0;D[c+10|0]=0;D[c+11|0]=0;D[c+12|0]=0;if(!Aa(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|F[g>>2]}else{i=F[g>>2]&(f^-1)}F[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}e=0;c=F[b+8>>2];f=F[b+12>>2];d=c;c=F[b+20>>2];i=c;g=F[b+16>>2];j=g+4|0;c=j>>>0<4?c+1|0:c;if(d>>>0>>0&(c|0)>=(f|0)|(c|0)>(f|0)){break a}m=F[b>>2];k=m+g|0;l=G[k|0]|G[k+1|0]<<8|(G[k+2|0]<<16|G[k+3|0]<<24);F[b+16>>2]=j;F[b+20>>2]=c;k=d;d=f;c=i;f=g+8|0;c=f>>>0<8?c+1|0:c;if(f>>>0>k>>>0&(c|0)>=(d|0)|(c|0)>(d|0)){break a}d=j+m|0;d=G[d|0]|G[d+1|0]<<8|(G[d+2|0]<<16|G[d+3|0]<<24);F[b+16>>2]=f;F[b+20>>2]=c;if((d|0)<(l|0)){break a}F[a+16>>2]=d;F[a+12>>2]=l;c=(d>>31)-((l>>31)+(d>>>0>>0)|0)|0;b=d-l|0;if(!c&b>>>0>2147483646|c){break a}e=1;b=b+1|0;F[a+20>>2]=b;c=b>>>1|0;F[a+24>>2]=c;F[a+28>>2]=0-c;if(b&1){break a}F[a+24>>2]=c-1;break a}}e=0}Z=h+32|0;return e|0}function ai(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;h=Z-32|0;Z=h;a:{b:{if(!Oa(1,h+28|0,b)){break b}d=F[h+28>>2];c=F[a+48>>2];if(d>>>0>F[c+4>>2]-F[c>>2]>>2>>>0){break b}c:{if(d){Na(a+60|0,d);c=h+8|0;F[c>>2]=0;F[c+4>>2]=0;D[c+5|0]=0;D[c+6|0]=0;D[c+7|0]=0;D[c+8|0]=0;D[c+9|0]=0;D[c+10|0]=0;D[c+11|0]=0;D[c+12|0]=0;if(!Aa(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|F[g>>2]}else{i=F[g>>2]&(f^-1)}F[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}if(!Oa(1,h+28|0,b)){break b}d=F[h+28>>2];c=F[a+48>>2];if(d>>>0>F[c+4>>2]-F[c>>2]>>2>>>0){break b}if(d){e=0;Na(a+72|0,d);c=h+8|0;F[c>>2]=0;F[c+4>>2]=0;D[c+5|0]=0;D[c+6|0]=0;D[c+7|0]=0;D[c+8|0]=0;D[c+9|0]=0;D[c+10|0]=0;D[c+11|0]=0;D[c+12|0]=0;if(!Aa(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|F[g>>2]}else{i=F[g>>2]&(f^-1)}F[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}if(!Oa(1,h+28|0,b)){break b}d=F[h+28>>2];c=F[a+48>>2];if(d>>>0>F[c+4>>2]-F[c>>2]>>2>>>0){break b}if(d){e=0;Na(a+84|0,d);c=h+8|0;F[c>>2]=0;F[c+4>>2]=0;D[c+5|0]=0;D[c+6|0]=0;D[c+7|0]=0;D[c+8|0]=0;D[c+9|0]=0;D[c+10|0]=0;D[c+11|0]=0;D[c+12|0]=0;if(!Aa(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|F[g>>2]}else{i=F[g>>2]&(f^-1)}F[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}if(!Oa(1,h+28|0,b)){break b}d=F[h+28>>2];c=F[a+48>>2];if(d>>>0>F[c+4>>2]-F[c>>2]>>2>>>0){break b}if(d){e=0;Na(a+96|0,d);c=h+8|0;F[c>>2]=0;F[c+4>>2]=0;D[c+5|0]=0;D[c+6|0]=0;D[c+7|0]=0;D[c+8|0]=0;D[c+9|0]=0;D[c+10|0]=0;D[c+11|0]=0;D[c+12|0]=0;if(!Aa(c,b)){break c}while(1){f=1<>2]+(e>>>3&536870908)|0;if(j){i=f|F[g>>2]}else{i=F[g>>2]&(f^-1)}F[g>>2]=i;e=e+1|0;if((d|0)!=(e|0)){continue}break}}e=0;c=F[b+8>>2];f=F[b+12>>2];d=c;c=F[b+20>>2];i=c;g=F[b+16>>2];j=g+4|0;c=j>>>0<4?c+1|0:c;if(d>>>0>>0&(c|0)>=(f|0)|(c|0)>(f|0)){break a}m=F[b>>2];k=m+g|0;l=G[k|0]|G[k+1|0]<<8|(G[k+2|0]<<16|G[k+3|0]<<24);F[b+16>>2]=j;F[b+20>>2]=c;k=d;d=f;c=i;f=g+8|0;c=f>>>0<8?c+1|0:c;if(f>>>0>k>>>0&(c|0)>=(d|0)|(c|0)>(d|0)){break a}d=j+m|0;d=G[d|0]|G[d+1|0]<<8|(G[d+2|0]<<16|G[d+3|0]<<24);F[b+16>>2]=f;F[b+20>>2]=c;if((d|0)<(l|0)){break a}F[a+16>>2]=d;F[a+12>>2]=l;c=(d>>31)-((l>>31)+(d>>>0>>0)|0)|0;b=d-l|0;if(!c&b>>>0>2147483646|c){break a}e=1;b=b+1|0;F[a+20>>2]=b;c=b>>>1|0;F[a+24>>2]=c;F[a+28>>2]=0-c;if(b&1){break a}F[a+24>>2]=c-1;break a}}e=0}Z=h+32|0;return e|0}function uh(a){a=a|0;var b=0,c=0,d=0,e=0;c=F[a+32>>2];d=F[c+16>>2];e=F[c+12>>2];b=F[c+20>>2];if(I[c+8>>2]>d>>>0&(e|0)>=(b|0)|(b|0)<(e|0)){e=G[F[c>>2]+d|0];d=d+1|0;b=d?b:b+1|0;F[c+16>>2]=d;F[c+20>>2]=b;b=F[a+48>>2];F[a+48>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}a:{b:{c:{d:{switch(e|0){case 0:b=ka(384);F[b>>2]=8284;ma(b+4|0,0,80);F[b+96>>2]=0;F[b+100>>2]=0;F[b+92>>2]=-1;F[b+84>>2]=-1;F[b+88>>2]=-1;F[b+104>>2]=0;F[b+108>>2]=0;F[b+112>>2]=0;F[b+116>>2]=0;F[b+120>>2]=0;F[b+124>>2]=0;F[b+128>>2]=0;F[b+132>>2]=0;F[b+136>>2]=0;F[b+140>>2]=0;F[b+144>>2]=0;F[b+148>>2]=0;F[b+156>>2]=0;F[b+160>>2]=0;F[b+152>>2]=1065353216;F[b+164>>2]=0;F[b+168>>2]=0;F[b+172>>2]=0;F[b+176>>2]=0;F[b+180>>2]=0;F[b+184>>2]=0;F[b+188>>2]=0;F[b+192>>2]=0;F[b+196>>2]=0;F[b+200>>2]=0;F[b+204>>2]=0;F[b+208>>2]=0;F[b+212>>2]=-1;F[b+216>>2]=0;F[b+220>>2]=0;F[b+224>>2]=0;Ja(b+232|0);Ja(b+272|0);c=b+312|0;F[c>>2]=0;F[c+4>>2]=0;D[c+5|0]=0;D[c+6|0]=0;D[c+7|0]=0;D[c+8|0]=0;D[c+9|0]=0;D[c+10|0]=0;D[c+11|0]=0;D[c+12|0]=0;Ja(b+328|0);F[b+376>>2]=0;F[b+368>>2]=0;F[b+372>>2]=0;break c;case 2:break d;default:break b}}b=ka(440);F[b>>2]=8336;ma(b+4|0,0,80);F[b+96>>2]=0;F[b+100>>2]=0;F[b+92>>2]=-1;F[b+84>>2]=-1;F[b+88>>2]=-1;F[b+104>>2]=0;F[b+108>>2]=0;F[b+112>>2]=0;F[b+116>>2]=0;F[b+120>>2]=0;F[b+124>>2]=0;F[b+128>>2]=0;F[b+132>>2]=0;F[b+136>>2]=0;F[b+140>>2]=0;F[b+144>>2]=0;F[b+148>>2]=0;F[b+156>>2]=0;F[b+160>>2]=0;F[b+152>>2]=1065353216;F[b+164>>2]=0;F[b+168>>2]=0;F[b+172>>2]=0;F[b+176>>2]=0;F[b+180>>2]=0;F[b+184>>2]=0;F[b+188>>2]=0;F[b+192>>2]=0;F[b+196>>2]=0;F[b+200>>2]=0;F[b+204>>2]=0;F[b+208>>2]=0;F[b+212>>2]=-1;F[b+216>>2]=0;F[b+220>>2]=0;F[b+224>>2]=0;Ja(b+232|0);Ja(b+272|0);c=b+312|0;F[c>>2]=0;F[c+4>>2]=0;D[c+5|0]=0;D[c+6|0]=0;D[c+7|0]=0;D[c+8|0]=0;D[c+9|0]=0;D[c+10|0]=0;D[c+11|0]=0;D[c+12|0]=0;Ja(b+328|0);F[b+392>>2]=0;F[b+396>>2]=0;F[b+384>>2]=0;F[b+388>>2]=0;F[b+376>>2]=0;F[b+380>>2]=0;F[b+368>>2]=0;F[b+372>>2]=0;F[b+416>>2]=0;F[b+420>>2]=0;F[b+408>>2]=2;F[b+412>>2]=7;F[b+400>>2]=-1;F[b+404>>2]=-1;F[b+424>>2]=0;F[b+428>>2]=0;F[b+432>>2]=0;F[b+436>>2]=0}c=F[a+48>>2];F[a+48>>2]=b;if(!c){break a}$[F[F[c>>2]+4>>2]](c)}b=F[a+48>>2];if(b){break a}return 0}a=$[F[F[b>>2]+8>>2]](b,a)|0}else{a=0}return a|0}function ei(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;g=Z-32|0;Z=g;F[a+68>>2]=f;d=F[a+56>>2];e=F[d>>2];d=F[d+4>>2];F[g+24>>2]=0;F[g+16>>2]=0;F[g+20>>2]=0;a:{d=d-e|0;if((d|0)>0){m=a+60|0;d=d>>>2|0;n=d>>>0<=1?1:d;o=a+112|0;while(1){e=F[a+56>>2];d=F[e>>2];if(F[e+4>>2]-d>>2>>>0<=j>>>0){break a}Mb(m,F[d+(j<<2)>>2],g+16|0);i=F[g+20>>2];d=i>>31;h=F[g+16>>2];e=h>>31;f=(d^i)-d+((e^h)-e)|0;k=F[g+24>>2];d=k>>31;e=(d^k)-d|0;d=0;l=e;e=e+f|0;d=l>>>0>e>>>0?1:d;b:{if(!(d|e)){F[g+16>>2]=F[a+108>>2];break b}f=F[a+108>>2];l=f>>31;h=li(ki(f,l,h,h>>31),_,e,d);F[g+16>>2]=h;d=li(ki(f,l,i,i>>31),_,e,d);F[g+20>>2]=d;e=d;d=d>>31;e=(e^d)-d|0;d=h>>31;d=e+((d^h)-d|0)|0;if((k|0)>=0){F[g+24>>2]=f-d;break b}F[g+24>>2]=d-f}d=wa(o);f=F[g+16>>2];c:{if(d){F[g+24>>2]=0-F[g+24>>2];e=0-F[g+20>>2]|0;F[g+20>>2]=e;f=0-f|0;F[g+16>>2]=f;break c}e=F[g+20>>2]}d:{if((f|0)>=0){f=F[a+108>>2];d=f+F[g+24>>2]|0;f=e+f|0;break d}e:{if((e|0)<0){d=F[g+24>>2];f=d>>31;f=(d^f)-f|0;break e}d=F[g+24>>2];f=d>>31;f=F[a+100>>2]+(f-(d^f)|0)|0}if((d|0)<0){d=e>>31;d=(d^e)-d|0;break d}d=e>>31;d=F[a+100>>2]+(d-(d^e)|0)|0}e=F[a+100>>2];f:{if(!(d|f)){d=e;f=d;break f}if(!((d|0)!=(e|0)|f)){f=d;break f}if(!((e|0)!=(f|0)|d)){d=f;break f}g:{if(f){break g}i=F[a+108>>2];if((i|0)>=(d|0)){break g}d=(i<<1)-d|0;f=0;break f}h:{if((e|0)!=(f|0)){break h}i=F[a+108>>2];if((i|0)<=(d|0)){break h}d=(i<<1)-d|0;break f}i:{if((d|0)!=(e|0)){break i}e=F[a+108>>2];if((e|0)<=(f|0)){break i}f=(e<<1)-f|0;break f}if(d){break f}d=0;e=F[a+108>>2];if((e|0)>=(f|0)){break f}f=(e<<1)-f|0}F[g+12>>2]=d;F[g+8>>2]=f;j:{if(F[a+8>>2]<=0){break j}i=F[a+32>>2];f=0;while(1){d=f<<2;e=F[d+(g+8|0)>>2];h=F[a+16>>2];k:{if((e|0)>(h|0)){F[d+i>>2]=h;break k}d=d+i|0;h=F[a+12>>2];if((h|0)>(e|0)){F[d>>2]=h;break k}F[d>>2]=e}f=f+1|0;e=F[a+8>>2];if((f|0)<(e|0)){continue}break}d=0;if((e|0)<=0){break j}e=j<<3;h=e+c|0;k=b+e|0;while(1){f=d<<2;e=f+h|0;f=F[f+k>>2]+F[f+i>>2]|0;F[e>>2]=f;l:{if((f|0)>F[a+16>>2]){f=f-F[a+20>>2]|0}else{if((f|0)>=F[a+12>>2]){break l}f=f+F[a+20>>2]|0}F[e>>2]=f}d=d+1|0;if((d|0)>2]){continue}break}}j=j+1|0;if((n|0)!=(j|0)){continue}break}}Z=g+32|0;return 1}ta();v()}function Vh(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;g=Z-32|0;Z=g;F[a+68>>2]=f;d=F[a+56>>2];e=F[d>>2];d=F[d+4>>2];F[g+24>>2]=0;F[g+16>>2]=0;F[g+20>>2]=0;a:{d=d-e|0;if((d|0)>0){m=a+60|0;d=d>>>2|0;n=d>>>0<=1?1:d;o=a+112|0;while(1){e=F[a+56>>2];d=F[e>>2];if(F[e+4>>2]-d>>2>>>0<=j>>>0){break a}Kb(m,F[d+(j<<2)>>2],g+16|0);i=F[g+20>>2];d=i>>31;h=F[g+16>>2];e=h>>31;f=(d^i)-d+((e^h)-e)|0;k=F[g+24>>2];d=k>>31;e=(d^k)-d|0;d=0;l=e;e=e+f|0;d=l>>>0>e>>>0?1:d;b:{if(!(d|e)){F[g+16>>2]=F[a+108>>2];break b}f=F[a+108>>2];l=f>>31;h=li(ki(f,l,h,h>>31),_,e,d);F[g+16>>2]=h;d=li(ki(f,l,i,i>>31),_,e,d);F[g+20>>2]=d;e=d;d=d>>31;e=(e^d)-d|0;d=h>>31;d=e+((d^h)-d|0)|0;if((k|0)>=0){F[g+24>>2]=f-d;break b}F[g+24>>2]=d-f}d=wa(o);f=F[g+16>>2];c:{if(d){F[g+24>>2]=0-F[g+24>>2];e=0-F[g+20>>2]|0;F[g+20>>2]=e;f=0-f|0;F[g+16>>2]=f;break c}e=F[g+20>>2]}d:{if((f|0)>=0){f=F[a+108>>2];d=f+F[g+24>>2]|0;f=e+f|0;break d}e:{if((e|0)<0){d=F[g+24>>2];f=d>>31;f=(d^f)-f|0;break e}d=F[g+24>>2];f=d>>31;f=F[a+100>>2]+(f-(d^f)|0)|0}if((d|0)<0){d=e>>31;d=(d^e)-d|0;break d}d=e>>31;d=F[a+100>>2]+(d-(d^e)|0)|0}e=F[a+100>>2];f:{if(!(d|f)){d=e;f=d;break f}if(!((d|0)!=(e|0)|f)){f=d;break f}if(!((e|0)!=(f|0)|d)){d=f;break f}g:{if(f){break g}i=F[a+108>>2];if((i|0)>=(d|0)){break g}d=(i<<1)-d|0;f=0;break f}h:{if((e|0)!=(f|0)){break h}i=F[a+108>>2];if((i|0)<=(d|0)){break h}d=(i<<1)-d|0;break f}i:{if((d|0)!=(e|0)){break i}e=F[a+108>>2];if((e|0)<=(f|0)){break i}f=(e<<1)-f|0;break f}if(d){break f}d=0;e=F[a+108>>2];if((e|0)>=(f|0)){break f}f=(e<<1)-f|0}F[g+12>>2]=d;F[g+8>>2]=f;j:{if(F[a+8>>2]<=0){break j}i=F[a+32>>2];f=0;while(1){d=f<<2;e=F[d+(g+8|0)>>2];h=F[a+16>>2];k:{if((e|0)>(h|0)){F[d+i>>2]=h;break k}d=d+i|0;h=F[a+12>>2];if((h|0)>(e|0)){F[d>>2]=h;break k}F[d>>2]=e}f=f+1|0;e=F[a+8>>2];if((f|0)<(e|0)){continue}break}d=0;if((e|0)<=0){break j}e=j<<3;h=e+c|0;k=b+e|0;while(1){f=d<<2;e=f+h|0;f=F[f+k>>2]+F[f+i>>2]|0;F[e>>2]=f;l:{if((f|0)>F[a+16>>2]){f=f-F[a+20>>2]|0}else{if((f|0)>=F[a+12>>2]){break l}f=f+F[a+20>>2]|0}F[e>>2]=f}d=d+1|0;if((d|0)>2]){continue}break}}j=j+1|0;if((n|0)!=(j|0)){continue}break}}Z=g+32|0;return 1}ta();v()}function $a(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;h=Z-32|0;Z=h;a:{b:{if(F[a+8>>2]<<5>>>0>=b>>>0){break b}if((b|0)<0){break a}b=(b-1>>>5|0)+1|0;c=ka(b<<2);F[h+24>>2]=b;F[h+20>>2]=0;F[h+16>>2]=c;b=F[a>>2];F[h+12>>2]=0;F[h+8>>2]=b;c=F[a+4>>2];F[h+4>>2]=c&31;F[h>>2]=b+(c>>>3&536870908);e=Z-32|0;Z=e;i=F[h+4>>2];g=F[h+12>>2];j=F[h>>2];d=F[h+8>>2];b=(i-g|0)+(j-d<<3)|0;f=F[h+20>>2];c=b+f|0;F[h+20>>2]=c;if(!((c-1^f-1)>>>0<32?f:0)){F[F[h+16>>2]+((c>>>0>=33?c-1>>>5|0:0)<<2)>>2]=0}c=F[h+16>>2]+(f>>>3&536870908)|0;f=f&31;c:{if((f|0)==(g|0)){if((b|0)<=0){break c}if(g){i=32-g|0;f=(b|0)<(i|0)?b:i;i=-1<>>i-f;F[c>>2]=F[c>>2]&(i^-1)|i&F[d>>2];d=d+4|0;c=(g+f>>>3&536870908)+c|0;b=b-f|0}g=(b|0)/32|0;if(b+31>>>0>=63){pa(c,d,g<<2)}b=b-(g<<5)|0;if((b|0)<=0){break c}f=c;c=g<<2;g=f+c|0;b=-1>>>32-b|0;F[g>>2]=F[g>>2]&(b^-1)|b&F[c+d>>2];break c}F[e+28>>2]=g;F[e+24>>2]=d;F[e+20>>2]=i;F[e+16>>2]=j;F[e+12>>2]=f;F[e+8>>2]=c;b=F[e+28>>2];c=F[e+24>>2];g=(F[e+20>>2]-b|0)+(F[e+16>>2]-c<<3)|0;d:{if((g|0)<=0){b=F[e+12>>2];d=F[e+8>>2];break d}e:{if(!b){b=F[e+12>>2];break e}d=F[e+12>>2];j=32-d|0;k=32-b|0;f=(g|0)<(k|0)?g:k;i=f>>>0>j>>>0?j:f;l=F[e+8>>2];m=F[l>>2]&(-1<>>j-i^-1);j=F[c>>2]&(-1<>>k-f);F[l>>2]=m|(b>>>0>>0?j<>>b-d|0);c=d+i|0;b=c&31;F[e+12>>2]=b;d=l+(c>>>3&536870908)|0;F[e+8>>2]=d;c=f-i|0;if((c|0)>0){F[d>>2]=F[d>>2]&(-1>>>32-c^-1)|j>>>i+F[e+28>>2];F[e+12>>2]=c;b=c}g=g-f|0;c=F[e+24>>2]+4|0;F[e+24>>2]=c}i=-1<=32){j=i^-1;while(1){d=F[e+8>>2];c=F[c>>2];F[d>>2]=j&F[d>>2]|c<>2]=d+4;F[d+4>>2]=i&F[d+4>>2]|c>>>f;c=F[e+24>>2]+4|0;F[e+24>>2]=c;d=g>>>0>63;g=g-32|0;if(d){continue}break}}d=F[e+8>>2];if((g|0)<=0){break d}j=f;f=(g|0)>(f|0)?f:g;j=F[d>>2]&(i&-1>>>j-f^-1);i=F[c>>2]&-1>>>32-g;F[d>>2]=j|i<>2]=c;d=(b>>>3&536870908)+d|0;F[e+8>>2]=d;b=g-f|0;if((b|0)<=0){b=c;break d}F[d>>2]=F[d>>2]&(-1>>>32-b^-1)|i>>>f;F[e+12>>2]=b}F[e+4>>2]=b;F[e>>2]=d}Z=e+32|0;b=F[a>>2];F[a>>2]=F[h+16>>2];F[h+16>>2]=b;c=F[a+4>>2];F[a+4>>2]=F[h+20>>2];F[h+20>>2]=c;c=F[a+8>>2];F[a+8>>2]=F[h+24>>2];F[h+24>>2]=c;if(!b){break b}ja(b)}Z=h+32|0;return}na();v()}function xc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;n=$[F[F[a>>2]+44>>2]](a)|0;a:{if((n|0)<=0){break a}i=F[b+4>>2]-F[b>>2]>>2;e=Z+-64|0;Z=e;f=kb(e);d=L(F[2541],n);cc(f,F[F[a+8>>2]+56>>2],n&255,5,0,d,d>>31);f=bc(ka(96),f);D[f+84|0]=1;F[f+72>>2]=F[f+68>>2];ac(f,i);F[f+60>>2]=F[F[a+8>>2]+60>>2];d=F[a+16>>2];F[a+16>>2]=f;if(d){xa(d)}Z=e- -64|0;h=F[a+16>>2];if(!F[h+80>>2]){break a}j=F[F[h>>2]>>2];if(!j){break a}m=F[c+12>>2];e=m;d=F[c+20>>2];g=F[c+8>>2];k=F[c+16>>2];if((e|0)<=(d|0)&g>>>0<=k>>>0|(d|0)>(e|0)){break a}l=L(i,n);i=j+F[h+48>>2]|0;h=F[c>>2];j=G[h+k|0];e=k+1|0;f=e?d:d+1|0;F[c+16>>2]=e;F[c+20>>2]=f;b:{c:{if(j){if(mc(l,n,c,i)){break c}break a}if((f|0)>=(m|0)&e>>>0>=g>>>0|(f|0)>(m|0)){break a}g=G[e+h|0];f=k+2|0;d=f>>>0<2?d+1|0:d;F[c+16>>2]=f;F[c+20>>2]=d;d=F[F[a+16>>2]+64>>2];d=F[d+4>>2]-F[d>>2]|0;if((g|0)==F[2541]){e=l<<2;if(e>>>0>d>>>0){break a}g=F[c+8>>2];k=F[c+12>>2];j=F[c+20>>2];d=F[c+16>>2];f=e+d|0;j=f>>>0>>0?j+1|0:j;if(f>>>0>g>>>0&(j|0)>=(k|0)|(j|0)>(k|0)){break a}la(i,d+F[c>>2]|0,e);f=F[c+20>>2];d=e+F[c+16>>2]|0;f=d>>>0>>0?f+1|0:f;F[c+16>>2]=d;F[c+20>>2]=f;break c}if(d>>>0>>0){break a}d=F[c+8>>2];f=F[c+16>>2];e=d-f|0;m=d>>>0>>0;d=F[c+20>>2];k=F[c+12>>2]-(m+d|0)|0;m=ki(g,0,l,0)>>>0>e>>>0;e=_;if(m&(e|0)>=(k|0)|(e|0)>(k|0)){break a}e=1;if(!l){break b}h=0;while(1){k=F[c+8>>2];j=F[c+12>>2];e=f+g|0;d=e>>>0>>0?d+1|0:d;if(e>>>0>k>>>0&(d|0)>=(j|0)|(d|0)>(j|0)){return 0}la(i+(h<<2)|0,F[c>>2]+f|0,g);d=F[c+20>>2];f=g+F[c+16>>2]|0;d=f>>>0>>0?d+1|0:d;F[c+16>>2]=f;F[c+20>>2]=d;h=h+1|0;if((l|0)!=(h|0)){continue}break}}e=1;if(!l){break b}d=F[a+20>>2];if(d){e=0;if($[F[F[d>>2]+32>>2]](d)|0){break b}}g=0;h=0;d:{if((l|0)<=0){break d}if((l|0)!=1){f=l&-2;while(1){e=g<<2;d=F[e+i>>2];F[e+i>>2]=0-(d&1)^d>>>1;d=e|4;e=F[d+i>>2];F[d+i>>2]=0-(e&1)^e>>>1;g=g+2|0;h=h+2|0;if((f|0)!=(h|0)){continue}break}}if(!(l&1)){break d}d=g<<2;f=F[d+i>>2];F[d+i>>2]=0-(f&1)^f>>>1}e=0}d=e;f=F[a+20>>2];e:{if(!f){break e}if(!($[F[F[f>>2]+40>>2]](f,c)|0)){break a}if(d){break e}a=F[a+20>>2];if(!($[F[F[a>>2]+44>>2]](a,i,i,l,n,F[b>>2])|0)){break a}}o=1}return o|0}function Lh(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=Z-48|0;Z=g;d=F[a+8>>2];if(d-2>>>0<=28){F[a+76>>2]=d;e=-1<>2]=d;F[a+80>>2]=e^-1;F[a+92>>2]=(d|0)/2;J[a+88>>2]=M(2)/M(d|0)}F[a+52>>2]=f;d=F[a+40>>2];e=F[d>>2];d=F[d+4>>2];F[g+16>>2]=0;F[g+8>>2]=0;F[g+12>>2]=0;a:{d=d-e|0;if((d|0)>0){m=a+8|0;n=a+44|0;d=d>>>2|0;o=d>>>0<=1?1:d;p=a+96|0;while(1){e=F[a+40>>2];d=F[e>>2];if(F[e+4>>2]-d>>2>>>0<=j>>>0){break a}Mb(n,F[d+(j<<2)>>2],g+8|0);h=F[g+12>>2];d=h>>31;i=F[g+8>>2];e=i>>31;f=(d^h)-d+((e^i)-e)|0;l=F[g+16>>2];d=l>>31;e=(d^l)-d|0;d=0;k=e;e=e+f|0;d=k>>>0>e>>>0?1:d;b:{if(!(d|e)){F[g+8>>2]=F[a+92>>2];break b}f=F[a+92>>2];k=f>>31;i=li(ki(f,k,i,i>>31),_,e,d);F[g+8>>2]=i;d=li(ki(f,k,h,h>>31),_,e,d);F[g+12>>2]=d;e=d>>31;e=(d^e)-e|0;d=i>>31;d=e+((d^i)-d|0)|0;if((l|0)>=0){F[g+16>>2]=f-d;break b}F[g+16>>2]=d-f}d=wa(p);f=F[g+8>>2];c:{if(d){F[g+16>>2]=0-F[g+16>>2];e=0-F[g+12>>2]|0;F[g+12>>2]=e;f=0-f|0;F[g+8>>2]=f;break c}e=F[g+12>>2]}d:{if((f|0)>=0){f=F[a+92>>2];d=f+F[g+16>>2]|0;f=e+f|0;break d}e:{if((e|0)<0){d=F[g+16>>2];f=d>>31;f=(d^f)-f|0;break e}d=F[g+16>>2];f=d>>31;f=F[a+84>>2]+(f-(d^f)|0)|0}if((d|0)<0){d=e>>31;d=(d^e)-d|0;break d}d=e>>31;d=F[a+84>>2]+(d-(d^e)|0)|0}e=F[a+84>>2];f:{if(!(d|f)){d=e;f=d;break f}if(!((d|0)!=(e|0)|f)){f=d;break f}if(!((e|0)!=(f|0)|d)){d=f;break f}g:{if(f){break g}h=F[a+92>>2];if((h|0)>=(d|0)){break g}d=(h<<1)-d|0;f=0;break f}h:{if((e|0)!=(f|0)){break h}h=F[a+92>>2];if((h|0)<=(d|0)){break h}d=(h<<1)-d|0;break f}i:{if((d|0)!=(e|0)){break i}e=F[a+92>>2];if((e|0)<=(f|0)){break i}f=(e<<1)-f|0;break f}if(d){break f}d=0;e=F[a+92>>2];if((e|0)>=(f|0)){break f}f=(e<<1)-f|0}e=j<<3;h=e+b|0;i=F[h>>2];h=F[h+4>>2];F[g+36>>2]=d;F[g+32>>2]=f;F[g+24>>2]=i;F[g+28>>2]=h;Jb(g+40|0,m,g+32|0,g+24|0);d=c+e|0;F[d>>2]=F[g+40>>2];F[d+4>>2]=F[g+44>>2];j=j+1|0;if((o|0)!=(j|0)){continue}break}}Z=g+48|0;return 1}ta();v()}function Hh(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=Z-48|0;Z=g;d=F[a+8>>2];if(d-2>>>0<=28){F[a+76>>2]=d;e=-1<>2]=d;F[a+80>>2]=e^-1;F[a+92>>2]=(d|0)/2;J[a+88>>2]=M(2)/M(d|0)}F[a+52>>2]=f;d=F[a+40>>2];e=F[d>>2];d=F[d+4>>2];F[g+16>>2]=0;F[g+8>>2]=0;F[g+12>>2]=0;a:{d=d-e|0;if((d|0)>0){m=a+8|0;n=a+44|0;d=d>>>2|0;o=d>>>0<=1?1:d;p=a+96|0;while(1){e=F[a+40>>2];d=F[e>>2];if(F[e+4>>2]-d>>2>>>0<=j>>>0){break a}Kb(n,F[d+(j<<2)>>2],g+8|0);h=F[g+12>>2];d=h>>31;i=F[g+8>>2];e=i>>31;f=(d^h)-d+((e^i)-e)|0;l=F[g+16>>2];d=l>>31;e=(d^l)-d|0;d=0;k=e;e=e+f|0;d=k>>>0>e>>>0?1:d;b:{if(!(d|e)){F[g+8>>2]=F[a+92>>2];break b}f=F[a+92>>2];k=f>>31;i=li(ki(f,k,i,i>>31),_,e,d);F[g+8>>2]=i;d=li(ki(f,k,h,h>>31),_,e,d);F[g+12>>2]=d;e=d>>31;e=(d^e)-e|0;d=i>>31;d=e+((d^i)-d|0)|0;if((l|0)>=0){F[g+16>>2]=f-d;break b}F[g+16>>2]=d-f}d=wa(p);f=F[g+8>>2];c:{if(d){F[g+16>>2]=0-F[g+16>>2];e=0-F[g+12>>2]|0;F[g+12>>2]=e;f=0-f|0;F[g+8>>2]=f;break c}e=F[g+12>>2]}d:{if((f|0)>=0){f=F[a+92>>2];d=f+F[g+16>>2]|0;f=e+f|0;break d}e:{if((e|0)<0){d=F[g+16>>2];f=d>>31;f=(d^f)-f|0;break e}d=F[g+16>>2];f=d>>31;f=F[a+84>>2]+(f-(d^f)|0)|0}if((d|0)<0){d=e>>31;d=(d^e)-d|0;break d}d=e>>31;d=F[a+84>>2]+(d-(d^e)|0)|0}e=F[a+84>>2];f:{if(!(d|f)){d=e;f=d;break f}if(!((d|0)!=(e|0)|f)){f=d;break f}if(!((e|0)!=(f|0)|d)){d=f;break f}g:{if(f){break g}h=F[a+92>>2];if((h|0)>=(d|0)){break g}d=(h<<1)-d|0;f=0;break f}h:{if((e|0)!=(f|0)){break h}h=F[a+92>>2];if((h|0)<=(d|0)){break h}d=(h<<1)-d|0;break f}i:{if((d|0)!=(e|0)){break i}e=F[a+92>>2];if((e|0)<=(f|0)){break i}f=(e<<1)-f|0;break f}if(d){break f}d=0;e=F[a+92>>2];if((e|0)>=(f|0)){break f}f=(e<<1)-f|0}e=j<<3;h=e+b|0;i=F[h>>2];h=F[h+4>>2];F[g+36>>2]=d;F[g+32>>2]=f;F[g+24>>2]=i;F[g+28>>2]=h;Jb(g+40|0,m,g+32|0,g+24|0);d=c+e|0;F[d>>2]=F[g+40>>2];F[d+4>>2]=F[g+44>>2];j=j+1|0;if((o|0)!=(j|0)){continue}break}}Z=g+48|0;return 1}ta();v()}function Nd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;a:{if(!H[b+38>>1]){break a}if(!Ta(1,a+12|0,b)){break a}d=F[b+8>>2];e=F[b+16>>2];g=d-e|0;f=F[a+12>>2];d=F[b+12>>2]-(F[b+20>>2]+(d>>>0>>0)|0)|0;if(g>>>0>>6>>>0&(d|0)<=0|(d|0)<0){break a}d=F[a>>2];c=F[a+4>>2]-d>>2;b:{if(c>>>0>>0){qa(a,f-c|0);f=F[a+12>>2];break b}if(c>>>0<=f>>>0){break b}F[a+4>>2]=d+(f<<2)}if(!f){return 1}d=F[b+16>>2];c=F[b+20>>2];l=F[a>>2];j=F[b+8>>2];i=F[b+12>>2];g=0;while(1){if((c|0)>=(i|0)&d>>>0>=j>>>0|(c|0)>(i|0)){return 0}m=F[b>>2];k=G[m+d|0];d=d+1|0;c=d?c:c+1|0;F[b+16>>2]=d;F[b+20>>2]=c;e=k>>>2|0;h=0;c:{d:{e:{f:{n=k&3;switch(n|0){case 3:break f;case 0:break d;default:break e}}e=e+g|0;if(e>>>0>=f>>>0){return 0}ma(l+(g<<2)|0,0,(k&252)+4|0);g=e;break c}while(1){if((d|0)==(j|0)&(c|0)==(i|0)){break a}f=G[d+m|0];d=d+1|0;c=d?c:c+1|0;F[b+16>>2]=d;F[b+20>>2]=c;e=f<<(h<<3|6)|e;h=h+1|0;if((n|0)!=(h|0)){continue}break}}F[l+(g<<2)>>2]=e}f=F[a+12>>2];g=g+1|0;if(f>>>0>g>>>0){continue}break}b=a+16|0;j=F[a>>2];d=F[a+16>>2];c=F[a+20>>2]-d|0;g:{if(c>>>0<=16383){qa(b,4096-(c>>>2|0)|0);break g}if((c|0)==16384){break g}F[a+20>>2]=d+16384}c=a+28|0;g=F[c>>2];d=F[a+32>>2]-g>>3;h:{if(d>>>0>>0){_a(c,f-d|0);g=F[c>>2];break h}if(d>>>0>f>>>0){F[a+32>>2]=(f<<3)+g}if(!f){break a}}d=F[b>>2];b=0;a=0;while(1){c=j+(b<<2)|0;h=F[c>>2];e=a;i=(b<<3)+g|0;F[i+4>>2]=a;F[i>>2]=h;c=F[c>>2];a=c+a|0;if(a>>>0>4096){break a}i:{if(a>>>0<=e>>>0){break i}h=0;i=c&7;if(i){while(1){F[d+(e<<2)>>2]=b;e=e+1|0;h=h+1|0;if((i|0)!=(h|0)){continue}break}}if(c-1>>>0<=6){break i}while(1){c=d+(e<<2)|0;F[c>>2]=b;F[c+28>>2]=b;F[c+24>>2]=b;F[c+20>>2]=b;F[c+16>>2]=b;F[c+12>>2]=b;F[c+8>>2]=b;F[c+4>>2]=b;e=e+8|0;if((e|0)!=(a|0)){continue}break}}b=b+1|0;if((f|0)!=(b|0)){continue}break}o=(a|0)==4096}return o}function qf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;f=Z-32|0;Z=f;e=f+8|0;c=Z-80|0;Z=c;a=F[b+36>>2];F[c+72>>2]=F[b+32>>2];F[c+76>>2]=a;d=F[b+28>>2];a=c- -64|0;F[a>>2]=F[b+24>>2];F[a+4>>2]=d;a=F[b+20>>2];F[c+56>>2]=F[b+16>>2];F[c+60>>2]=a;a=F[b+12>>2];F[c+48>>2]=F[b+8>>2];F[c+52>>2]=a;a=F[b+4>>2];F[c+40>>2]=F[b>>2];F[c+44>>2]=a;jc(c+8|0,c+40|0,c+24|0);a=F[c+8>>2];a:{if(a){F[e>>2]=a;a=e+4|0;if(D[c+23|0]>=0){b=c+8|4;e=F[b+4>>2];F[a>>2]=F[b>>2];F[a+4>>2]=e;F[a+8>>2]=F[b+8>>2];break a}ra(a,F[c+12>>2],F[c+16>>2]);if(D[c+23|0]>=0){break a}ja(F[c+12>>2]);break a}if(D[c+23|0]<0){ja(F[c+12>>2])}a=G[c+31|0];if(a>>>0>=2){b=ka(32);D[b+26|0]=0;a=G[1475]|G[1476]<<8;D[b+24|0]=a;D[b+25|0]=a>>>8;a=G[1471]|G[1472]<<8|(G[1473]<<16|G[1474]<<24);d=G[1467]|G[1468]<<8|(G[1469]<<16|G[1470]<<24);D[b+16|0]=d;D[b+17|0]=d>>>8;D[b+18|0]=d>>>16;D[b+19|0]=d>>>24;D[b+20|0]=a;D[b+21|0]=a>>>8;D[b+22|0]=a>>>16;D[b+23|0]=a>>>24;a=G[1463]|G[1464]<<8|(G[1465]<<16|G[1466]<<24);d=G[1459]|G[1460]<<8|(G[1461]<<16|G[1462]<<24);D[b+8|0]=d;D[b+9|0]=d>>>8;D[b+10|0]=d>>>16;D[b+11|0]=d>>>24;D[b+12|0]=a;D[b+13|0]=a>>>8;D[b+14|0]=a>>>16;D[b+15|0]=a>>>24;a=G[1455]|G[1456]<<8|(G[1457]<<16|G[1458]<<24);d=G[1451]|G[1452]<<8|(G[1453]<<16|G[1454]<<24);D[b|0]=d;D[b+1|0]=d>>>8;D[b+2|0]=d>>>16;D[b+3|0]=d>>>24;D[b+4|0]=a;D[b+5|0]=a>>>8;D[b+6|0]=a>>>16;D[b+7|0]=a>>>24;F[c+8>>2]=-1;a=c+8|4;ra(a,b,26);d=D[c+23|0];F[e>>2]=F[c+8>>2];e=e+4|0;if((d|0)>=0){d=F[a+4>>2];F[e>>2]=F[a>>2];F[e+4>>2]=d;F[e+8>>2]=F[a+8>>2];ja(b);break a}ra(e,F[c+12>>2],F[c+16>>2]);if(D[c+23|0]<0){ja(F[c+12>>2])}ja(b);break a}F[e>>2]=0;F[e+4>>2]=0;F[e+16>>2]=a;F[e+8>>2]=0;F[e+12>>2]=0}Z=c+80|0;a=F[f+24>>2];if(D[f+23|0]<0){ja(F[f+12>>2])}Z=f+32|0;return a|0}function Ph(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;e=Z-32|0;Z=e;a:{if((c|0)!=3){break a}c=F[a+4>>2];f=F[a+12>>2];F[e+24>>2]=-1;F[e+16>>2]=-1;F[e+20>>2]=1065353216;F[e+8>>2]=-1;F[e+12>>2]=-1;if((b|0)==-2){break a}i=F[F[F[c+4>>2]+8>>2]+(f<<2)>>2];if(($[F[F[c>>2]+8>>2]](c)|0)==1){h=F[F[F[c+4>>2]+8>>2]+(f<<2)>>2];b:{if(($[F[F[c>>2]+8>>2]](c)|0)!=1|b-1>>>0>5){break b}g=$[F[F[c>>2]+36>>2]](c)|0;a=$[F[F[c>>2]+44>>2]](c,f)|0;if(!g|!a){break b}f=$[F[F[c>>2]+40>>2]](c,f)|0;c:{if(f){if((b|0)!=6){break b}b=F[c+44>>2];d=ka(112);F[d+4>>2]=h;c=F[e+12>>2];F[d+8>>2]=F[e+8>>2];F[d+12>>2]=c;c=F[e+20>>2];F[d+16>>2]=F[e+16>>2];F[d+20>>2]=c;F[d+24>>2]=F[e+24>>2];F[d+40>>2]=a;c=a+12|0;F[d+36>>2]=c;F[d+32>>2]=f;F[d+28>>2]=b;F[d+68>>2]=a;F[d- -64>>2]=c;F[d+60>>2]=f;F[d+56>>2]=b;F[d+48>>2]=0;F[d+52>>2]=0;F[d>>2]=5928;F[d+88>>2]=1065353216;F[d+92>>2]=-1;F[d+80>>2]=-1;F[d+84>>2]=-1;F[d+72>>2]=1;F[d+76>>2]=-1;F[d+44>>2]=6492;a=d+96|0;break c}if((b|0)!=6){break b}b=F[c+44>>2];d=ka(112);F[d+4>>2]=h;c=F[e+12>>2];F[d+8>>2]=F[e+8>>2];F[d+12>>2]=c;c=F[e+20>>2];F[d+16>>2]=F[e+16>>2];F[d+20>>2]=c;F[d+24>>2]=F[e+24>>2];F[d+40>>2]=a;c=a+12|0;F[d+36>>2]=c;F[d+32>>2]=g;F[d+28>>2]=b;F[d+68>>2]=a;F[d- -64>>2]=c;F[d+60>>2]=g;F[d+56>>2]=b;F[d+48>>2]=0;F[d+52>>2]=0;F[d>>2]=6932;F[d+88>>2]=1065353216;F[d+92>>2]=-1;F[d+80>>2]=-1;F[d+84>>2]=-1;F[d+72>>2]=1;F[d+76>>2]=-1;F[d+44>>2]=7352;a=d+96|0}F[a>>2]=0;F[a+4>>2]=0;D[a+5|0]=0;D[a+6|0]=0;D[a+7|0]=0;D[a+8|0]=0;D[a+9|0]=0;D[a+10|0]=0;D[a+11|0]=0;D[a+12|0]=0}if(d){break a}}d=ka(28);F[d+4>>2]=i;a=F[e+12>>2];F[d+8>>2]=F[e+8>>2];F[d+12>>2]=a;a=F[e+20>>2];F[d+16>>2]=F[e+16>>2];F[d+20>>2]=a;F[d+24>>2]=F[e+24>>2];F[d>>2]=7764}Z=e+32|0;return d|0}function $c(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f=Z-80|0;Z=f;a:{if(!Wb(1,f+76|0,b)){break a}k=F[f+76>>2];if(!k){break a}c=F[b+8>>2];e=F[b+16>>2];c=ki(c-e|0,F[b+12>>2]-(F[b+20>>2]+(c>>>0>>0)|0)|0,5,0);e=_;if(c>>>0>>0&(e|0)<=0|(e|0)<0){break a}c=F[a+4>>2];d=F[a+8>>2]-c>>2;b:{if(d>>>0>>0){qa(a+4|0,k-d|0);break b}if(d>>>0<=k>>>0){break b}F[a+8>>2]=c+(k<<2)}p=a+16|0;l=F[a+32>>2];while(1){g=F[b+12>>2];c=g;d=F[b+20>>2];h=F[b+8>>2];e=F[b+16>>2];if((c|0)<=(d|0)&h>>>0<=e>>>0|(c|0)<(d|0)){d=0;break a}m=F[b>>2];q=G[m+e|0];c=d;i=e+1|0;c=i?c:c+1|0;F[b+16>>2]=i;F[b+20>>2]=c;if(h>>>0<=i>>>0&(c|0)>=(g|0)|(c|0)>(g|0)){d=0;break a}i=G[i+m|0];c=d;j=e+2|0;c=j>>>0<2?c+1|0:c;F[b+16>>2]=j;F[b+20>>2]=c;if(h>>>0<=j>>>0&(c|0)>=(g|0)|(c|0)>(g|0)){d=0;break a}j=G[j+m|0];c=d;n=e+3|0;c=n>>>0<3?c+1|0:c;F[b+16>>2]=n;F[b+20>>2]=c;if(h>>>0<=n>>>0&(c|0)>=(g|0)|(c|0)>(g|0)){d=0;break a}h=G[m+n|0];c=d;d=e+4|0;c=d>>>0<4?c+1|0:c;F[b+16>>2]=d;F[b+20>>2]=c;if(q>>>0>4){d=0;break a}if((i-12&255)>>>0<245){d=0;break a}if(!j){d=0;break a}c=kb(f+8|0);g=(h|0)!=0;d=i-1|0;if(d>>>0<=10){d=F[(d<<2)+10148>>2]}else{d=-1}d=L(d,j);cc(c,q,j,i,g,d,d>>31);if(Wb(1,f+4|0,b)){e=F[f+4>>2];F[f+68>>2]=e;d=bc(ka(96),c);$[F[F[l>>2]+8>>2]](l,F[l+12>>2]-F[l+8>>2]>>2,d);d=(F[l+12>>2]-F[l+8>>2]>>2)-1|0;h=d<<2;F[F[h+F[l+8>>2]>>2]+60>>2]=e;F[F[a+4>>2]+(o<<2)>>2]=d;c=F[a+16>>2];e=F[a+20>>2]-c>>2;c:{if((e|0)>(d|0)){break c}F[f>>2]=-1;d=d+1|0;if(d>>>0>e>>>0){Fa(p,d-e|0,f);c=F[p>>2];break c}if(d>>>0>=e>>>0){break c}F[a+20>>2]=(d<<2)+c}F[c+h>>2]=o;d=1;o=o+1|0;if((o|0)!=(k|0)){continue}break a}break}d=0}Z=f+80|0;return d|0}function Oc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;k=Z-16|0;Z=k;F[k+8>>2]=c;h=F[a+12>>2];d=F[a+8>>2];g=h-d>>2;a:{if((g|0)>(b|0)){break a}e=b+1|0;if(e>>>0>g>>>0){l=e-g|0;f=F[a+16>>2];d=F[a+12>>2];if(l>>>0<=f-d>>2>>>0){if(l){e=d;d=l<<2;d=ma(e,0,d)+d|0}F[a+12>>2]=d;break a}b:{c:{d:{m=F[a+8>>2];g=d-m>>2;i=g+l|0;if(i>>>0<1073741824){e=f-m|0;f=e>>>1|0;e=e>>>0>=2147483644?1073741823:f>>>0>i>>>0?f:i;if(e){if(e>>>0>=1073741824){break d}j=ka(e<<2)}h=(g<<2)+j|0;f=l<<2;i=ma(h,0,f);g=f+i|0;e=(e<<2)+j|0;if((d|0)==(m|0)){break c}while(1){d=d-4|0;f=F[d>>2];F[d>>2]=0;h=h-4|0;F[h>>2]=f;if((d|0)!=(m|0)){continue}break}F[a+16>>2]=e;e=F[a+12>>2];F[a+12>>2]=g;d=F[a+8>>2];F[a+8>>2]=h;if((d|0)==(e|0)){break b}while(1){e=e-4|0;f=F[e>>2];F[e>>2]=0;if(f){xa(f)}if((d|0)!=(e|0)){continue}break}break b}na();v()}oa();v()}F[a+16>>2]=e;F[a+12>>2]=g;F[a+8>>2]=i}if(d){ja(d)}break a}if(e>>>0>=g>>>0){break a}d=d+(e<<2)|0;if((d|0)!=(h|0)){while(1){h=h-4|0;c=F[h>>2];F[h>>2]=0;if(c){xa(c)}if((d|0)!=(h|0)){continue}break}c=F[k+8>>2]}F[a+12>>2]=d}e:{f:{d=F[c+56>>2];g:{if((d|0)>4){break g}j=L(d,12)+a|0;d=F[j+24>>2];if((d|0)!=F[j+28>>2]){F[d>>2]=b;F[j+24>>2]=d+4;break g}i=F[j+20>>2];g=d-i|0;f=g>>2;e=f+1|0;if(e>>>0>=1073741824){break f}d=g>>>1|0;e=g>>>0>=2147483644?1073741823:d>>>0>e>>>0?d:e;if(e){if(e>>>0>=1073741824){break e}d=ka(e<<2)}else{d=0}f=d+(f<<2)|0;F[f>>2]=b;d=pa(d,i,g);F[j+20>>2]=d;F[j+24>>2]=f+4;F[j+28>>2]=d+(e<<2);if(!i){break g}ja(i)}F[c+60>>2]=b;a=F[a+8>>2];F[k+8>>2]=0;a=a+(b<<2)|0;b=F[a>>2];F[a>>2]=c;if(b){xa(b)}a=F[k+8>>2];F[k+8>>2]=0;if(a){xa(a)}Z=k+16|0;return}na();v()}oa();v()}function Pf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=c;d=a;a:{if(F[a+12>>2]==(b|0)){break a}a=b;b=F[d+4>>2];e=F[d>>2];if((b|0)!=(e|0)){while(1){c=b-12|0;if(D[b-1|0]<0){ja(F[c>>2])}b=c;if((e|0)!=(b|0)){continue}break}}F[d+12>>2]=a;F[d+4>>2]=e;c=F[a>>2];j=a+4|0;if((c|0)==(j|0)){break a}while(1){a=F[d+4>>2];b:{if((a|0)!=F[d+8>>2]){c:{if(D[c+27|0]>=0){b=F[c+20>>2];F[a>>2]=F[c+16>>2];F[a+4>>2]=b;F[a+8>>2]=F[c+24>>2];break c}ra(a,F[c+16>>2],F[c+20>>2])}F[d+4>>2]=a+12;break b}g=0;d:{e:{f:{a=F[d+4>>2];e=F[d>>2];f=(a-e|0)/12|0;b=f+1|0;if(b>>>0<357913942){h=(F[d+8>>2]-e|0)/12|0;k=h<<1;b=h>>>0>=178956970?357913941:b>>>0>>0?k:b;if(b){if(b>>>0>=357913942){break f}g=ka(L(b,12))}h=L(b,12);b=L(f,12)+g|0;g:{if(D[c+27|0]>=0){f=F[c+20>>2];F[b>>2]=F[c+16>>2];F[b+4>>2]=f;F[b+8>>2]=F[c+24>>2];break g}ra(b,F[c+16>>2],F[c+20>>2]);e=F[d>>2];a=F[d+4>>2]}g=g+h|0;f=b+12|0;if((a|0)==(e|0)){break e}while(1){a=a-12|0;h=F[a+4>>2];b=b-12|0;F[b>>2]=F[a>>2];F[b+4>>2]=h;F[b+8>>2]=F[a+8>>2];F[a>>2]=0;F[a+4>>2]=0;F[a+8>>2]=0;if((a|0)!=(e|0)){continue}break}F[d+8>>2]=g;a=F[d+4>>2];F[d+4>>2]=f;e=F[d>>2];F[d>>2]=b;if((a|0)==(e|0)){break d}while(1){b=a-12|0;if(D[a-1|0]<0){ja(F[b>>2])}a=b;if((e|0)!=(b|0)){continue}break}break d}na();v()}oa();v()}F[d+8>>2]=g;F[d+4>>2]=f;F[d>>2]=b}if(e){ja(e)}}b=F[c+4>>2];h:{if(b){while(1){a=b;b=F[b>>2];if(b){continue}break h}}while(1){a=F[c+8>>2];b=F[a>>2]!=(c|0);c=a;if(b){continue}break}}c=a;if((j|0)!=(a|0)){continue}break}}a=0;i:{if((i|0)<0){break i}b=F[d>>2];if((F[d+4>>2]-b|0)/12>>>0<=i>>>0){break i}a=b+L(i,12)|0;a=D[a+11|0]<0?F[a>>2]:a}return a|0}function Ad(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;i=Z-16|0;Z=i;F[i>>2]=b;f=-1;a:{if((b|0)==-1){F[i+4>>2]=-1;break a}f=b+1|0;F[i+4>>2]=(f>>>0)%3|0?f:b-2|0;if((b>>>0)%3|0){f=b-1|0;break a}f=b+2|0}F[i+8>>2]=f;n=(b>>>0)/3|0;b:{c:{d:{while(1){e:{f:{j=F[(l<<2)+i>>2];if((j|0)!=-1){f=F[F[F[a+8>>2]+12>>2]+(j<<2)>>2];if((f|0)!=-1){break f}}f=0;g=F[a+216>>2];if((g|0)==F[a+220>>2]){break e}while(1){g=L(f,144)+g|0;d=F[g+136>>2];c=F[g+140>>2];g:{if(d>>>0>>0){F[d>>2]=j;F[g+136>>2]=d+4;break g}e=d;d=F[g+132>>2];k=e-d|0;e=k>>2;h=e+1|0;if(h>>>0>=1073741824){break d}m=e<<2;c=c-d|0;e=c>>>1|0;h=c>>>0>=2147483644?1073741823:h>>>0>>0?e:h;if(h){if(h>>>0>=1073741824){break c}c=ka(h<<2)}else{c=0}e=m+c|0;F[e>>2]=j;c=pa(c,d,k);F[g+132>>2]=c;F[g+136>>2]=e+4;F[g+140>>2]=c+(h<<2);if(!d){break g}ja(d)}f=f+1|0;g=F[a+216>>2];if(f>>>0<(F[a+220>>2]-g|0)/144>>>0){continue}break}break e}if((b|0)==-1|(f>>>0)/3>>>0>>0){break e}f=0;if(F[a+220>>2]==F[a+216>>2]){break e}while(1){h:{if(!wa(F[a+368>>2]+(f<<4)|0)){break h}g=F[a+216>>2]+L(f,144)|0;d=F[g+136>>2];c=F[g+140>>2];if(d>>>0>>0){F[d>>2]=j;F[g+136>>2]=d+4;break h}e=d;d=F[g+132>>2];k=e-d|0;e=k>>2;h=e+1|0;if(h>>>0>=1073741824){break b}m=e<<2;c=c-d|0;e=c>>>1|0;h=c>>>0>=2147483644?1073741823:h>>>0>>0?e:h;if(h){if(h>>>0>=1073741824){break c}c=ka(h<<2)}else{c=0}e=m+c|0;F[e>>2]=j;c=pa(c,d,k);F[g+132>>2]=c;F[g+136>>2]=e+4;F[g+140>>2]=c+(h<<2);if(!d){break h}ja(d)}f=f+1|0;if(f>>>0<(F[a+220>>2]-F[a+216>>2]|0)/144>>>0){continue}break}}l=l+1|0;if((l|0)!=3){continue}break}Z=i+16|0;return 1}na();v()}oa();v()}na();v()}function Bd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;h=Z-16|0;Z=h;m=-1;a:{b:{c:{if(!Da(1,h+12|0,b)){break c}j=F[h+12>>2];if(j){c=F[a+8>>2];if((F[c+4>>2]-F[c>>2]>>2>>>0)/3>>>0>>0){break c}while(1){if(!Da(1,h+8|0,b)){break c}c=F[h+8>>2];if(!Da(1,h+8|0,b)){break c}g=c+g|0;c=F[h+8>>2];if(g>>>0>>0){break c}e=g-c|0;c=F[a+40>>2];d:{if((c|0)!=F[a+44>>2]){F[c+4>>2]=g;F[c>>2]=e;F[a+40>>2]=c+12;j=F[h+12>>2];break d}d=c;c=F[a+36>>2];l=d-c|0;d=(l|0)/12|0;f=d+1|0;if(f>>>0>=357913942){break b}i=d<<1;f=d>>>0>=178956970?357913941:f>>>0>>0?i:f;if(f){if(f>>>0>=357913942){break a}i=ka(L(f,12))}else{i=0}d=i+L(d,12)|0;F[d+4>>2]=g;F[d>>2]=e;e=pa(d+L((l|0)/-12|0,12)|0,c,l);F[a+44>>2]=i+L(f,12);F[a+40>>2]=d+12;F[a+36>>2]=e;if(!c){break d}ja(c)}k=k+1|0;if(k>>>0>>0){continue}break}g=0;hc(b,0,0);if(j){while(1){c=G[b+36|0];d=H[F[a+4>>2]+36>>1];e:{f:{if(((d<<8|d>>>8)&65535)>>>0<=513){if(!c){break e}e=0;d=F[b+32>>2];k=d>>>3|0;f=F[b+24>>2];c=k+f|0;i=F[b+28>>2];g:{if(c>>>0>=i>>>0){c=d;break g}e=G[c|0];c=d+1|0;F[b+32>>2]=c;k=c>>>3|0;e=e>>>(d&7)&1}if(i>>>0>f+k>>>0){break f}break e}if(!c){break e}e=0;c=F[b+32>>2];d=F[b+24>>2]+(c>>>3|0)|0;if(d>>>0>=I[b+28>>2]){break e}e=G[d|0]>>>(c&7)&1}F[b+32>>2]=c+1}c=F[a+36>>2]+L(g,12)|0;D[c+8|0]=G[c+8|0]&254|e&1;g=g+1|0;if((j|0)!=(g|0)){continue}break}}D[b+36|0]=0;d=F[b+20>>2];a=0;e=F[b+32>>2]+7|0;a=e>>>0<7?1:a;e=a<<29|e>>>3;c=e+F[b+16>>2]|0;a=(a>>>3|0)+d|0;F[b+16>>2]=c;F[b+20>>2]=c>>>0>>0?a+1|0:a}m=F[b+16>>2]}Z=h+16|0;return m}na();v()}oa();v()}function xf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;m=Z-16|0;Z=m;l=F[b+80>>2];e=G[c+24|0];a=L(l,e);a:{b:{c:{d:{b=F[c+28>>2];if(!(!G[c+84|0]|(b|0)!=1&(b|0)!=2)){b=F[c+48>>2];c=F[F[c>>2]>>2];F[m+8>>2]=0;F[m>>2]=0;F[m+4>>2]=0;if(a){if((a|0)<0){break d}f=ka(a);h=la(f,b+c|0,a)+a|0}a=F[d>>2];if(a){F[d+4>>2]=a;ja(a)}F[d+8>>2]=h;F[d+4>>2]=h;F[d>>2]=f;b=1;break a}if(e){f=ka(e);ma(f,0,e)}e:{i=F[d+4>>2];b=F[d>>2];g=i-b|0;f:{if(g>>>0>>0){k=a-g|0;j=F[d+8>>2];if(k>>>0<=j-i>>>0){n=d,o=ma(i,0,k)+k|0,F[n+4>>2]=o;break f}if((a|0)<0){break e}i=j-b|0;j=i<<1;i=i>>>0>=1073741823?2147483647:a>>>0>>0?j:a;j=ka(i);ma(j+g|0,0,k);g=pa(j,b,g);F[d+8>>2]=g+i;F[d+4>>2]=a+g;F[d>>2]=g;if(!b){break f}ja(b);break f}if(a>>>0>=g>>>0){break f}F[d+4>>2]=a+b}if(!l){b=1;break c}if(!e){b=0;a=0;while(1){if(!Cb(c,G[c+84|0]?a:F[F[c+68>>2]+(a<<2)>>2],D[c+24|0],f)){break c}a=a+1|0;b=l>>>0<=a>>>0;if((a|0)!=(l|0)){continue}break}break c}i=e&252;g=e&3;b=0;j=e>>>0<4;e=0;while(1){if(!Cb(c,G[c+84|0]?e:F[F[c+68>>2]+(e<<2)>>2],D[c+24|0],f)){break c}b=0;a=0;k=0;if(!j){while(1){D[F[d>>2]+h|0]=G[a+f|0];D[(F[d>>2]+h|0)+1|0]=G[(a|1)+f|0];D[(F[d>>2]+h|0)+2|0]=G[(a|2)+f|0];D[(F[d>>2]+h|0)+3|0]=G[(a|3)+f|0];a=a+4|0;h=h+4|0;k=k+4|0;if((i|0)!=(k|0)){continue}break}}if(g){while(1){D[F[d>>2]+h|0]=G[a+f|0];a=a+1|0;h=h+1|0;b=b+1|0;if((g|0)!=(b|0)){continue}break}}e=e+1|0;b=l>>>0<=e>>>0;if((e|0)!=(l|0)){continue}break}break b}na();v()}na();v()}if(!f){break a}}ja(f)}Z=m+16|0;return b&1}function wf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;m=Z-16|0;Z=m;l=F[b+80>>2];e=G[c+24|0];a=L(l,e);a:{b:{c:{d:{b=F[c+28>>2];if(!(!G[c+84|0]|(b|0)!=1&(b|0)!=2)){b=F[c+48>>2];c=F[F[c>>2]>>2];F[m+8>>2]=0;F[m>>2]=0;F[m+4>>2]=0;if(a){if((a|0)<0){break d}f=ka(a);h=la(f,b+c|0,a)+a|0}a=F[d>>2];if(a){F[d+4>>2]=a;ja(a)}F[d+8>>2]=h;F[d+4>>2]=h;F[d>>2]=f;b=1;break a}if(e){f=ka(e);ma(f,0,e)}e:{i=F[d+4>>2];b=F[d>>2];g=i-b|0;f:{if(g>>>0>>0){k=a-g|0;j=F[d+8>>2];if(k>>>0<=j-i>>>0){n=d,o=ma(i,0,k)+k|0,F[n+4>>2]=o;break f}if((a|0)<0){break e}i=j-b|0;j=i<<1;i=i>>>0>=1073741823?2147483647:a>>>0>>0?j:a;j=ka(i);ma(j+g|0,0,k);g=pa(j,b,g);F[d+8>>2]=g+i;F[d+4>>2]=a+g;F[d>>2]=g;if(!b){break f}ja(b);break f}if(a>>>0>=g>>>0){break f}F[d+4>>2]=a+b}if(!l){b=1;break c}if(!e){b=0;a=0;while(1){if(!Bb(c,G[c+84|0]?a:F[F[c+68>>2]+(a<<2)>>2],D[c+24|0],f)){break c}a=a+1|0;b=l>>>0<=a>>>0;if((a|0)!=(l|0)){continue}break}break c}i=e&252;g=e&3;b=0;j=e>>>0<4;e=0;while(1){if(!Bb(c,G[c+84|0]?e:F[F[c+68>>2]+(e<<2)>>2],D[c+24|0],f)){break c}b=0;a=0;k=0;if(!j){while(1){D[F[d>>2]+h|0]=G[a+f|0];D[(F[d>>2]+h|0)+1|0]=G[(a|1)+f|0];D[(F[d>>2]+h|0)+2|0]=G[(a|2)+f|0];D[(F[d>>2]+h|0)+3|0]=G[(a|3)+f|0];a=a+4|0;h=h+4|0;k=k+4|0;if((i|0)!=(k|0)){continue}break}}if(g){while(1){D[F[d>>2]+h|0]=G[a+f|0];a=a+1|0;h=h+1|0;b=b+1|0;if((g|0)!=(b|0)){continue}break}}e=e+1|0;b=l>>>0<=e>>>0;if((e|0)!=(l|0)){continue}break}break b}na();v()}na();v()}if(!f){break a}}ja(f)}Z=m+16|0;return b&1}function Jb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;k=F[b+16>>2];h=F[c+4>>2]-k|0;e=F[c>>2]-k|0;F[c>>2]=e;f=h;F[c+4>>2]=f;l=F[b+16>>2];f=f>>31;g=(h^f)-f|0;f=e>>31;m=l>>>0>=g+((f^e)-f|0)>>>0;a:{if(m){f=h;break a}b:{c:{if((e|0)>=0){g=1;j=1;if((h|0)>=0){break b}i=1;g=-1;j=-1;if(e){break c}break b}i=-1;g=-1;j=-1;if((h|0)<=0){break b}}g=(h|0)<=0?-1:1;j=i}n=L(j,l);f=(e<<1)-n|0;i=(L(g,j)|0)>=0;e=L(g,l);f=((i?0-f|0:f)+e|0)/2|0;F[c+4>>2]=f;e=(h<<1)-e|0;e=((i?0-e|0:e)+n|0)/2|0;F[c>>2]=e}d:{e:{f:{g:{h:{i:{j:{if(e){if((e|0)<0){break j}if((f|0)>=0){break i}break f}if(f){break h}j=1;g=0;f=0;i=0;break d}j=1;if((f|0)>0){break g}i=(f|0)>0?3:0;g=f;f=e;break d}g=0-f|0;f=0-e|0;i=2;break e}if((f|0)<=0){break f}}f=0-f|0;g=e;i=3;break e}g=0-e|0;i=1}F[c>>2]=f;F[c+4>>2]=g;j=0}e=F[d>>2]+f|0;h=F[b+16>>2];k:{if((e|0)>(h|0)){e=e-F[b+4>>2]|0;break k}if((0-h|0)<=(e|0)){break k}e=F[b+4>>2]+e|0}c=F[d+4>>2]+g|0;l:{if((h|0)<(c|0)){c=c-F[b+4>>2]|0;break l}if((0-h|0)<=(c|0)){break l}c=F[b+4>>2]+c|0}m:{if(j){b=c;break m}b=c;n:{o:{p:{d=4-i|0;switch((d>>>0<4?d:0-i|0)-1|0){case 2:break n;case 1:break o;case 0:break p;default:break m}}b=0-e|0;e=c;break m}b=0-c|0;e=0-e|0;break m}b=e;e=0-c|0}q:{if(m){c=b;break q}r:{s:{if((e|0)>=0){c=1;f=1;if((b|0)>=0){break r}d=1;c=-1;f=-1;if(e){break s}break r}d=-1;c=-1;f=-1;if((b|0)<=0){break r}}c=(b|0)<=0?-1:1;f=d}d=e<<1;e=L(f,h);d=d-e|0;f=(L(c,f)|0)>=0;g=f?0-d|0:d;d=L(c,h);c=(g+d|0)/2|0;b=(b<<1)-d|0;e=(e+(f?0-b|0:b)|0)/2|0}b=a;F[b>>2]=e+k;F[b+4>>2]=c+k}function Uh(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;F[a+8>>2]=e;m=a+32|0;h=F[m>>2];g=F[a+36>>2]-h>>2;a:{if(g>>>0>>0){qa(m,e-g|0);f=F[a+8>>2];break a}f=e;if(f>>>0>=g>>>0){break a}F[a+36>>2]=h+(e<<2);f=e}g=e>>>0>1073741823?-1:e<<2;n=ma(ka(g),0,g);b:{if((f|0)<=0){break b}h=F[a+32>>2];while(1){f=i<<2;g=F[f+n>>2];j=F[a+16>>2];c:{if((g|0)>(j|0)){F[f+h>>2]=j;break c}f=f+h|0;j=F[a+12>>2];if((j|0)>(g|0)){F[f>>2]=j;break c}F[f>>2]=g}f=F[a+8>>2];i=i+1|0;if((f|0)>(i|0)){continue}break}if((f|0)<=0){break b}i=0;while(1){g=i<<2;f=g+c|0;g=F[b+g>>2]+F[g+h>>2]|0;F[f>>2]=g;d:{if((g|0)>F[a+16>>2]){g=g-F[a+20>>2]|0}else{if((g|0)>=F[a+12>>2]){break d}g=g+F[a+20>>2]|0}F[f>>2]=g}f=F[a+8>>2];i=i+1|0;if((f|0)>(i|0)){continue}break}}if(!((d|0)<=(e|0)|(f|0)<=0)){p=0-e<<2;g=e;while(1){e:{if((f|0)<=0){break e}l=g<<2;o=l+c|0;q=o+p|0;j=F[m>>2];i=0;while(1){f=i<<2;h=F[f+q>>2];k=F[a+16>>2];f:{if((h|0)>(k|0)){F[f+j>>2]=k;break f}f=f+j|0;k=F[a+12>>2];if((k|0)>(h|0)){F[f>>2]=k;break f}F[f>>2]=h}f=F[a+8>>2];i=i+1|0;if((f|0)>(i|0)){continue}break}i=0;if((f|0)<=0){break e}l=b+l|0;while(1){h=i<<2;f=h+o|0;h=F[h+l>>2]+F[h+j>>2]|0;F[f>>2]=h;g:{if((h|0)>F[a+16>>2]){h=h-F[a+20>>2]|0}else{if((h|0)>=F[a+12>>2]){break g}h=h+F[a+20>>2]|0}F[f>>2]=h}f=F[a+8>>2];i=i+1|0;if((f|0)>(i|0)){continue}break}}g=e+g|0;if((g|0)<(d|0)){continue}break}}ja(n);return 1}function yf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;j=F[b+80>>2];b=G[c+24|0];g=L(j,b);a:{if(!b){break a}h=b<<2;f=ka(h);a=f;k=b&7;if(k){while(1){F[a>>2]=-1073741824;a=a+4|0;e=e+1|0;if((k|0)!=(e|0)){continue}break}}if((b-1&1073741823)>>>0<7){break a}e=f+h|0;while(1){F[a+24>>2]=-1073741824;F[a+28>>2]=-1073741824;F[a+16>>2]=-1073741824;F[a+20>>2]=-1073741824;F[a+8>>2]=-1073741824;F[a+12>>2]=-1073741824;F[a>>2]=-1073741824;F[a+4>>2]=-1073741824;a=a+32|0;if((e|0)!=(a|0)){continue}break}}e=F[d>>2];a=F[d+4>>2]-e>>2;b:{if(a>>>0>>0){qa(d,g-a|0);break b}if(a>>>0<=g>>>0){break b}F[d+4>>2]=e+(g<<2)}c:{d:{e:{if(!j){i=1;break e}if(!b){a=0;while(1){if(!lb(c,G[c+84|0]?a:F[F[c+68>>2]+(a<<2)>>2],D[c+24|0],f)){break e}a=a+1|0;i=j>>>0<=a>>>0;if((a|0)!=(j|0)){continue}break}break e}n=b&252;k=b&3;o=b>>>0<4;e=0;b=0;while(1){if(!lb(c,G[c+84|0]?b:F[F[c+68>>2]+(b<<2)>>2],D[c+24|0],f)){break e}m=F[d>>2];i=0;a=0;l=0;if(!o){while(1){g=(e<<2)+m|0;h=a<<2;J[g>>2]=J[h+f>>2];J[g+4>>2]=J[(h|4)+f>>2];J[g+8>>2]=J[(h|8)+f>>2];J[g+12>>2]=J[(h|12)+f>>2];a=a+4|0;e=e+4|0;l=l+4|0;if((n|0)!=(l|0)){continue}break}}if(k){while(1){J[(e<<2)+m>>2]=J[(a<<2)+f>>2];a=a+1|0;e=e+1|0;i=i+1|0;if((k|0)!=(i|0)){continue}break}}b=b+1|0;i=j>>>0<=b>>>0;if((b|0)!=(j|0)){continue}break}break d}if(!f){break c}}ja(f)}return i|0}function $d(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;k=Z-16|0;Z=k;c=F[b+20>>2];d=F[b+16>>2];e=d+4|0;c=e>>>0<4?c+1|0:c;g=F[b+12>>2];a:{if(I[b+8>>2]>>0&(g|0)<=(c|0)|(c|0)>(g|0)){break a}d=d+F[b>>2]|0;h=G[d|0]|G[d+1|0]<<8|(G[d+2|0]<<16|G[d+3|0]<<24);F[b+16>>2]=e;F[b+20>>2]=c;if((h|0)<0){break a}Na(a+76|0,h);c=k;F[c>>2]=0;F[c+4>>2]=0;D[c+5|0]=0;D[c+6|0]=0;D[c+7|0]=0;D[c+8|0]=0;D[c+9|0]=0;D[c+10|0]=0;D[c+11|0]=0;D[c+12|0]=0;b:{if(!Aa(c,b)){break b}if(h){g=1;while(1){d=1<>2]+(i>>>3&536870908)|0;e=e^g;if(e&1){d=F[f>>2]&(d^-1)}else{d=d|F[f>>2]}g=e^1;F[f>>2]=d;i=i+1|0;if((h|0)!=(i|0)){continue}break}}i=0;c=F[b+8>>2];e=F[b+12>>2];f=e;e=F[b+20>>2];g=e;l=F[b+16>>2];d=l+4|0;e=d>>>0<4?e+1|0:e;h=d;if(d>>>0>c>>>0&(e|0)>=(f|0)|(e|0)>(f|0)){break b}m=F[b>>2];d=m+l|0;j=G[d|0]|G[d+1|0]<<8|(G[d+2|0]<<16|G[d+3|0]<<24);F[b+16>>2]=h;F[b+20>>2]=e;d=c;c=g;e=l+8|0;c=e>>>0<8?c+1|0:c;if(d>>>0>>0&(c|0)>=(f|0)|(c|0)>(f|0)){break b}d=h+m|0;d=G[d|0]|G[d+1|0]<<8|(G[d+2|0]<<16|G[d+3|0]<<24);F[b+16>>2]=e;F[b+20>>2]=c;if((d|0)<(j|0)){break b}F[a+16>>2]=d;F[a+12>>2]=j;c=(d>>31)-((j>>31)+(d>>>0>>0)|0)|0;b=d-j|0;if(!c&b>>>0>2147483646|c){break b}i=1;c=b+1|0;F[a+20>>2]=c;b=c>>>1|0;F[a+24>>2]=b;F[a+28>>2]=0-b;if(c&1){break b}F[a+24>>2]=b-1}}Z=k+16|0;return i|0}function tf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;a=0;k=Z-16|0;Z=k;j=F[b+80>>2];e=G[c+24|0];b=L(j,e);a:{b:{c:{d:{f=F[c+28>>2];if(!(!G[c+84|0]|(f|0)!=5&(f|0)!=6)){e=F[c+48>>2];c=F[F[c>>2]>>2];F[k+8>>2]=0;F[k>>2]=0;F[k+4>>2]=0;if(b){if((b|0)<0){break d}b=b<<2;a=ka(b);g=la(a,c+e|0,b)+b|0}b=F[d>>2];if(b){F[d+4>>2]=b;ja(b)}F[d+8>>2]=g;F[d+4>>2]=g;F[d>>2]=a;h=1;break a}if(e){f=e<<2;a=ka(f);ma(a,0,f)}i=F[d>>2];f=F[d+4>>2]-i>>2;e:{if(f>>>0>>0){qa(d,b-f|0);break e}if(b>>>0>=f>>>0){break e}F[d+4>>2]=i+(b<<2)}if(!j){h=1;break c}if(!e){b=0;while(1){if(!xb(c,G[c+84|0]?b:F[F[c+68>>2]+(b<<2)>>2],D[c+24|0],a)){break c}b=b+1|0;h=j>>>0<=b>>>0;if((b|0)!=(j|0)){continue}break}break c}o=e&252;m=e&3;p=e>>>0<4;e=0;while(1){if(!xb(c,G[c+84|0]?e:F[F[c+68>>2]+(e<<2)>>2],D[c+24|0],a)){break c}n=F[d>>2];l=0;b=0;h=0;if(!p){while(1){f=(g<<2)+n|0;i=b<<2;F[f>>2]=F[i+a>>2];F[f+4>>2]=F[(i|4)+a>>2];F[f+8>>2]=F[(i|8)+a>>2];F[f+12>>2]=F[(i|12)+a>>2];b=b+4|0;g=g+4|0;h=h+4|0;if((o|0)!=(h|0)){continue}break}}if(m){while(1){F[(g<<2)+n>>2]=F[(b<<2)+a>>2];b=b+1|0;g=g+1|0;l=l+1|0;if((l|0)!=(m|0)){continue}break}}e=e+1|0;h=j>>>0<=e>>>0;if((e|0)!=(j|0)){continue}break}break b}na();v()}if(!a){break a}}ja(a)}Z=k+16|0;return h|0}function cd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;a=0;k=Z-16|0;Z=k;j=F[b+80>>2];e=G[c+24|0];b=L(j,e);a:{b:{c:{d:{f=F[c+28>>2];if(!(!G[c+84|0]|(f|0)!=5&(f|0)!=6)){e=F[c+48>>2];c=F[F[c>>2]>>2];F[k+8>>2]=0;F[k>>2]=0;F[k+4>>2]=0;if(b){if((b|0)<0){break d}b=b<<2;a=ka(b);g=la(a,c+e|0,b)+b|0}b=F[d>>2];if(b){F[d+4>>2]=b;ja(b)}F[d+8>>2]=g;F[d+4>>2]=g;F[d>>2]=a;h=1;break a}if(e){f=e<<2;a=ka(f);ma(a,0,f)}i=F[d>>2];f=F[d+4>>2]-i>>2;e:{if(f>>>0>>0){qa(d,b-f|0);break e}if(b>>>0>=f>>>0){break e}F[d+4>>2]=i+(b<<2)}if(!j){h=1;break c}if(!e){b=0;while(1){if(!yb(c,G[c+84|0]?b:F[F[c+68>>2]+(b<<2)>>2],D[c+24|0],a)){break c}b=b+1|0;h=j>>>0<=b>>>0;if((b|0)!=(j|0)){continue}break}break c}o=e&252;m=e&3;p=e>>>0<4;e=0;while(1){if(!yb(c,G[c+84|0]?e:F[F[c+68>>2]+(e<<2)>>2],D[c+24|0],a)){break c}n=F[d>>2];l=0;b=0;h=0;if(!p){while(1){f=(g<<2)+n|0;i=b<<2;F[f>>2]=F[i+a>>2];F[f+4>>2]=F[(i|4)+a>>2];F[f+8>>2]=F[(i|8)+a>>2];F[f+12>>2]=F[(i|12)+a>>2];b=b+4|0;g=g+4|0;h=h+4|0;if((o|0)!=(h|0)){continue}break}}if(m){while(1){F[(g<<2)+n>>2]=F[(b<<2)+a>>2];b=b+1|0;g=g+1|0;l=l+1|0;if((l|0)!=(m|0)){continue}break}}e=e+1|0;h=j>>>0<=e>>>0;if((e|0)!=(j|0)){continue}break}break b}na();v()}if(!a){break a}}ja(a)}Z=k+16|0;return h|0}function vf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;a=0;k=Z-16|0;Z=k;j=F[b+80>>2];e=G[c+24|0];b=L(j,e);a:{b:{c:{d:{f=F[c+28>>2];if(!(!G[c+84|0]|(f|0)!=3&(f|0)!=4)){e=F[c+48>>2];c=F[F[c>>2]>>2];F[k+8>>2]=0;F[k>>2]=0;F[k+4>>2]=0;if(b){if((b|0)<0){break d}b=b<<1;a=ka(b);g=la(a,c+e|0,b)+b|0}b=F[d>>2];if(b){F[d+4>>2]=b;ja(b)}F[d+8>>2]=g;F[d+4>>2]=g;F[d>>2]=a;h=1;break a}if(e){f=e<<1;a=ka(f);ma(a,0,f)}i=F[d>>2];f=F[d+4>>2]-i>>1;e:{if(f>>>0>>0){kd(d,b-f|0);break e}if(b>>>0>=f>>>0){break e}F[d+4>>2]=i+(b<<1)}if(!j){h=1;break c}if(!e){b=0;while(1){if(!Ab(c,G[c+84|0]?b:F[F[c+68>>2]+(b<<2)>>2],D[c+24|0],a)){break c}b=b+1|0;h=j>>>0<=b>>>0;if((b|0)!=(j|0)){continue}break}break c}o=e&252;m=e&3;p=e>>>0<4;e=0;while(1){if(!Ab(c,G[c+84|0]?e:F[F[c+68>>2]+(e<<2)>>2],D[c+24|0],a)){break c}n=F[d>>2];l=0;b=0;h=0;if(!p){while(1){f=(g<<1)+n|0;i=b<<1;E[f>>1]=H[i+a>>1];E[f+2>>1]=H[(i|2)+a>>1];E[f+4>>1]=H[(i|4)+a>>1];E[f+6>>1]=H[(i|6)+a>>1];b=b+4|0;g=g+4|0;h=h+4|0;if((o|0)!=(h|0)){continue}break}}if(m){while(1){E[(g<<1)+n>>1]=H[(b<<1)+a>>1];b=b+1|0;g=g+1|0;l=l+1|0;if((l|0)!=(m|0)){continue}break}}e=e+1|0;h=j>>>0<=e>>>0;if((e|0)!=(j|0)){continue}break}break b}na();v()}if(!a){break a}}ja(a)}Z=k+16|0;return h|0}function uf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;a=0;k=Z-16|0;Z=k;j=F[b+80>>2];e=G[c+24|0];b=L(j,e);a:{b:{c:{d:{f=F[c+28>>2];if(!(!G[c+84|0]|(f|0)!=3&(f|0)!=4)){e=F[c+48>>2];c=F[F[c>>2]>>2];F[k+8>>2]=0;F[k>>2]=0;F[k+4>>2]=0;if(b){if((b|0)<0){break d}b=b<<1;a=ka(b);g=la(a,c+e|0,b)+b|0}b=F[d>>2];if(b){F[d+4>>2]=b;ja(b)}F[d+8>>2]=g;F[d+4>>2]=g;F[d>>2]=a;h=1;break a}if(e){f=e<<1;a=ka(f);ma(a,0,f)}i=F[d>>2];f=F[d+4>>2]-i>>1;e:{if(f>>>0>>0){kd(d,b-f|0);break e}if(b>>>0>=f>>>0){break e}F[d+4>>2]=i+(b<<1)}if(!j){h=1;break c}if(!e){b=0;while(1){if(!zb(c,G[c+84|0]?b:F[F[c+68>>2]+(b<<2)>>2],D[c+24|0],a)){break c}b=b+1|0;h=j>>>0<=b>>>0;if((b|0)!=(j|0)){continue}break}break c}o=e&252;m=e&3;p=e>>>0<4;e=0;while(1){if(!zb(c,G[c+84|0]?e:F[F[c+68>>2]+(e<<2)>>2],D[c+24|0],a)){break c}n=F[d>>2];l=0;b=0;h=0;if(!p){while(1){f=(g<<1)+n|0;i=b<<1;E[f>>1]=H[i+a>>1];E[f+2>>1]=H[(i|2)+a>>1];E[f+4>>1]=H[(i|4)+a>>1];E[f+6>>1]=H[(i|6)+a>>1];b=b+4|0;g=g+4|0;h=h+4|0;if((o|0)!=(h|0)){continue}break}}if(m){while(1){E[(g<<1)+n>>1]=H[(b<<1)+a>>1];b=b+1|0;g=g+1|0;l=l+1|0;if((l|0)!=(m|0)){continue}break}}e=e+1|0;h=j>>>0<=e>>>0;if((e|0)!=(j|0)){continue}break}break b}na();v()}if(!a){break a}}ja(a)}Z=k+16|0;return h|0}function kc(a,b){var c=0,d=0,e=0,f=0,g=0;f=-1;d=-1;a:{if((b|0)==-1){break a}d=b+1|0;f=(d>>>0)%3|0?d:b-2|0;d=b-1|0;if((b>>>0)%3|0){break a}d=b+2|0}b:{c:{d:{switch(F[a+168>>2]){case 0:case 1:e=F[a+148>>2];c=1;b=F[a+156>>2];g=b+(((f|0)==-1?-1:F[F[e>>2]+(f<<2)>>2])<<2)|0;F[g>>2]=F[g>>2]+1;b=(((d|0)==-1?-1:F[F[e>>2]+(d<<2)>>2])<<2)+b|0;break c;case 5:e=F[a+148>>2];c=-1;c=((b|0)!=-1?F[F[e>>2]+(b<<2)>>2]:c)<<2;b=F[a+156>>2];c=c+b|0;F[c>>2]=F[c>>2]+1;c=(((f|0)==-1?-1:F[F[e>>2]+(f<<2)>>2])<<2)+b|0;F[c>>2]=F[c>>2]+1;c=2;b=(((d|0)==-1?-1:F[F[e>>2]+(d<<2)>>2])<<2)+b|0;break c;case 3:e=F[a+148>>2];c=-1;c=((b|0)!=-1?F[F[e>>2]+(b<<2)>>2]:c)<<2;b=F[a+156>>2];c=c+b|0;F[c>>2]=F[c>>2]+1;c=(((f|0)==-1?-1:F[F[e>>2]+(f<<2)>>2])<<2)+b|0;F[c>>2]=F[c>>2]+2;c=1;b=(((d|0)==-1?-1:F[F[e>>2]+(d<<2)>>2])<<2)+b|0;break c;case 7:break d;default:break b}}e=F[a+148>>2];c=-1;c=((b|0)!=-1?F[F[e>>2]+(b<<2)>>2]:c)<<2;b=F[a+156>>2];c=c+b|0;F[c>>2]=F[c>>2]+2;c=(((f|0)==-1?-1:F[F[e>>2]+(f<<2)>>2])<<2)+b|0;F[c>>2]=F[c>>2]+2;c=2;b=(((d|0)==-1?-1:F[F[e>>2]+(d<<2)>>2])<<2)+b|0}F[b>>2]=F[b>>2]+c}c=a;b=F[F[a+156>>2]+(((f|0)==-1?-1:F[F[F[a+148>>2]>>2]+(f<<2)>>2])<<2)>>2];d=F[a+180>>2];a=F[a+176>>2];F[c+172>>2]=(a|0)<=(b|0)?((b|0)<(d|0)?b:d)-a|0:0}function Dg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;a:{b=F[a+32>>2];f=F[b+8>>2];h=F[b+12>>2];g=F[b+20>>2];c=F[b+16>>2];e=0;b:{if((h|0)<=(g|0)&c>>>0>=f>>>0|(g|0)>(h|0)){break b}f=G[F[b>>2]+c|0];e=b;b=g;c=c+1|0;b=c?b:b+1|0;F[e+16>>2]=c;F[e+20>>2]=b;c:{if(!f){break c}while(1){if($[F[F[a>>2]+16>>2]](a,d)|0){d=d+1|0;if((f|0)!=(d|0)){continue}break c}break}return 0}d=F[a+8>>2];b=F[a+12>>2];if((d|0)!=(b|0)){while(1){c=F[d>>2];if(!($[F[F[c>>2]+8>>2]](c,a,F[a+4>>2])|0)){break a}d=d+4|0;if((b|0)!=(d|0)){continue}break}}d:{if(!f){break d}d=0;while(1){b=F[F[a+8>>2]+(d<<2)>>2];if(!($[F[F[b>>2]+12>>2]](b,F[a+32>>2])|0)){break a}d=d+1|0;if((f|0)!=(d|0)){continue}break}if(!f){break d}i=a+20|0;b=0;while(1){d=0;j=b<<2;c=F[j+F[a+8>>2]>>2];k=$[F[F[c>>2]+24>>2]](c)|0;if((k|0)>0){while(1){c=F[F[a+8>>2]+j>>2];c=$[F[F[c>>2]+20>>2]](c,d)|0;e=F[a+20>>2];g=F[a+24>>2]-e>>2;e:{if(c>>>0>>0){break e}h=c+1|0;if(h>>>0>g>>>0){qa(i,h-g|0);e=F[i>>2];break e}if(g>>>0<=h>>>0){break e}F[a+24>>2]=(h<<2)+e}F[(c<<2)+e>>2]=b;d=d+1|0;if((k|0)!=(d|0)){continue}break}}b=b+1|0;if((f|0)!=(b|0)){continue}break}}e=0;if(!($[F[F[a>>2]+28>>2]](a)|0)){break b}e=$[F[F[a>>2]+32>>2]](a)|0}return e|0}return 0}function Ye(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;Oc(a,b,c);c=F[a+84>>2];d=F[a+88>>2]-c>>2;a:{if((d|0)>(b|0)){break a}b=b+1|0;if(b>>>0>d>>>0){b:{d=b-d|0;e=F[a+92>>2];c=F[a+88>>2];if(d>>>0<=e-c>>2>>>0){c:{if(!d){break c}b=c;e=d&7;if(e){while(1){F[b>>2]=1;b=b+4|0;f=f+1|0;if((e|0)!=(f|0)){continue}break}}c=(d<<2)+c|0;if((d-1&1073741823)>>>0<7){break c}while(1){F[b+24>>2]=1;F[b+28>>2]=1;F[b+16>>2]=1;F[b+20>>2]=1;F[b+8>>2]=1;F[b+12>>2]=1;F[b>>2]=1;F[b+4>>2]=1;b=b+32|0;if((c|0)!=(b|0)){continue}break}}F[a+88>>2]=c;break b}d:{b=c;c=F[a+84>>2];i=b-c|0;g=i>>2;b=g+d|0;if(b>>>0<1073741824){e=e-c|0;h=e>>>1|0;e=e>>>0>=2147483644?1073741823:b>>>0>>0?h:b;if(e){if(e>>>0>=1073741824){break d}j=ka(e<<2)}g=(g<<2)+j|0;b=g;h=d&7;if(h){while(1){F[b>>2]=1;b=b+4|0;f=f+1|0;if((h|0)!=(f|0)){continue}break}}f=g+(d<<2)|0;if((d-1&1073741823)>>>0>=7){while(1){F[b+24>>2]=1;F[b+28>>2]=1;F[b+16>>2]=1;F[b+20>>2]=1;F[b+8>>2]=1;F[b+12>>2]=1;F[b>>2]=1;F[b+4>>2]=1;b=b+32|0;if((f|0)!=(b|0)){continue}break}}b=pa(j,c,i);F[a+88>>2]=f;F[a+84>>2]=b;F[a+92>>2]=b+(e<<2);if(c){ja(c)}break b}na();v()}oa();v()}return}if(b>>>0>=d>>>0){break a}F[a+88>>2]=c+(b<<2)}}function ab(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=F[a+8>>2];e=F[a+4>>2];if(d-e>>2>>>0>=b>>>0){a:{if(!b){break a}d=e;g=b&7;if(g){while(1){F[d>>2]=F[c>>2];d=d+4|0;f=f+1|0;if((g|0)!=(f|0)){continue}break}}e=(b<<2)+e|0;if((b-1&1073741823)>>>0<7){break a}while(1){F[d>>2]=F[c>>2];F[d+4>>2]=F[c>>2];F[d+8>>2]=F[c>>2];F[d+12>>2]=F[c>>2];F[d+16>>2]=F[c>>2];F[d+20>>2]=F[c>>2];F[d+24>>2]=F[c>>2];F[d+28>>2]=F[c>>2];d=d+32|0;if((e|0)!=(d|0)){continue}break}}F[a+4>>2]=e;return}b:{i=F[a>>2];f=e-i>>2;h=f+b|0;if(h>>>0<1073741824){j=d-i|0;d=j>>>1|0;h=j>>>0>=2147483644?1073741823:d>>>0>h>>>0?d:h;if(h){if(h>>>0>=1073741824){break b}k=ka(h<<2)}f=(f<<2)+k|0;d=f;j=b&7;if(j){while(1){F[d>>2]=F[c>>2];d=d+4|0;g=g+1|0;if((j|0)!=(g|0)){continue}break}}g=(b<<2)+f|0;if((b-1&1073741823)>>>0>=7){while(1){F[d>>2]=F[c>>2];F[d+4>>2]=F[c>>2];F[d+8>>2]=F[c>>2];F[d+12>>2]=F[c>>2];F[d+16>>2]=F[c>>2];F[d+20>>2]=F[c>>2];F[d+24>>2]=F[c>>2];F[d+28>>2]=F[c>>2];d=d+32|0;if((g|0)!=(d|0)){continue}break}}if((e|0)!=(i|0)){while(1){f=f-4|0;e=e-4|0;F[f>>2]=F[e>>2];if((e|0)!=(i|0)){continue}break}}F[a+8>>2]=(h<<2)+k;F[a+4>>2]=g;F[a>>2]=f;if(i){ja(i)}return}na();v()}oa();v()}function Xb(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=F[a+8>>2];e=F[a>>2];if(d-e>>2>>>0>=b>>>0){f=F[a+4>>2];h=f-e>>2;i=b>>>0>h>>>0?h:b;a:{if(!i){break a}d=e;g=i;j=g&7;if(j){while(1){F[d>>2]=F[c>>2];g=g-1|0;d=d+4|0;k=k+1|0;if((k|0)!=(j|0)){continue}break}}if(i>>>0<8){break a}while(1){F[d>>2]=F[c>>2];F[d+4>>2]=F[c>>2];F[d+8>>2]=F[c>>2];F[d+12>>2]=F[c>>2];F[d+16>>2]=F[c>>2];F[d+20>>2]=F[c>>2];F[d+24>>2]=F[c>>2];F[d+28>>2]=F[c>>2];d=d+32|0;g=g-8|0;if(g){continue}break}}if(b>>>0>h>>>0){b=(b-h<<2)+f|0;while(1){F[f>>2]=F[c>>2];f=f+4|0;if((b|0)!=(f|0)){continue}break}F[a+4>>2]=b;return}F[a+4>>2]=e+(b<<2);return}if(e){F[a+4>>2]=e;ja(e);F[a+8>>2]=0;F[a>>2]=0;F[a+4>>2]=0;d=0}b:{if(b>>>0>=1073741824){break b}e=d>>>1|0;d=d>>>0>=2147483644?1073741823:b>>>0>>0?e:b;if(d>>>0>=1073741824){break b}d=d<<2;e=ka(d);F[a>>2]=e;F[a+8>>2]=d+e;c=F[c>>2];d=e;g=b&7;if(g){while(1){F[d>>2]=c;d=d+4|0;f=f+1|0;if((g|0)!=(f|0)){continue}break}}e=e+(b<<2)|0;if((b-1&1073741823)>>>0>=7){while(1){F[d+28>>2]=c;F[d+24>>2]=c;F[d+20>>2]=c;F[d+16>>2]=c;F[d+12>>2]=c;F[d+8>>2]=c;F[d+4>>2]=c;F[d>>2]=c;d=d+32|0;if((e|0)!=(d|0)){continue}break}}F[a+4>>2]=e;return}na();v()}function Ka(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;f=(c>>>0)/3|0;j=F[(F[F[a+8>>2]+96>>2]+L(f,12)|0)+(c-L(f,3)<<2)>>2];a:{h=F[F[a+12>>2]+4>>2];e=F[h+4>>2];if((e|0)!=F[h+8>>2]){F[e>>2]=j;F[h+4>>2]=e+4;break a}b:{i=F[h>>2];f=e-i|0;g=f>>2;d=g+1|0;if(d>>>0<1073741824){k=g<<2;g=f>>>1|0;g=f>>>0>=2147483644?1073741823:d>>>0>>0?g:d;if(g){if(g>>>0>=1073741824){break b}f=ka(g<<2)}else{f=0}d=k+f|0;F[d>>2]=j;j=d+4|0;if((e|0)!=(i|0)){while(1){d=d-4|0;e=e-4|0;F[d>>2]=F[e>>2];if((e|0)!=(i|0)){continue}break}}F[h+8>>2]=f+(g<<2);F[h+4>>2]=j;F[h>>2]=d;if(i){ja(i)}break a}na();v()}oa();v()}c:{d:{h=F[a+4>>2];e=F[h+4>>2];e:{if((e|0)!=F[h+8>>2]){F[e>>2]=c;F[h+4>>2]=e+4;break e}i=F[h>>2];f=e-i|0;j=f>>2;d=j+1|0;if(d>>>0>=1073741824){break d}g=f>>>1|0;g=f>>>0>=2147483644?1073741823:d>>>0>>0?g:d;if(g){if(g>>>0>=1073741824){break c}f=ka(g<<2)}else{f=0}d=f+(j<<2)|0;F[d>>2]=c;c=d+4|0;if((e|0)!=(i|0)){while(1){d=d-4|0;e=e-4|0;F[d>>2]=F[e>>2];if((e|0)!=(i|0)){continue}break}}F[h+8>>2]=f+(g<<2);F[h+4>>2]=c;F[h>>2]=d;if(!i){break e}ja(i)}a=F[a+4>>2];F[F[a+12>>2]+(b<<2)>>2]=F[a+24>>2];F[a+24>>2]=F[a+24>>2]+1;return}na();v()}oa();v()}function pb(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0;h=d-c|0;if((h|0)<=0){return}a:{e=F[a+8>>2];i=F[a+4>>2];if((e-i|0)>=(h|0)){j=i-b|0;if((j|0)>=(h|0)){f=i;g=d;break a}f=i;g=c+j|0;if((g|0)!=(d|0)){e=g;while(1){D[f|0]=G[e|0];f=f+1|0;e=e+1|0;if((e|0)!=(d|0)){continue}break}}F[a+4>>2]=f;if((j|0)>0){break a}return}k=F[a>>2];g=(i-k|0)+h|0;if((g|0)>=0){j=b-k|0;f=e-k|0;e=f<<1;f=f>>>0>=1073741823?2147483647:e>>>0>g>>>0?e:g;if(f){e=ka(f)}else{e=0}g=j+e|0;if((c|0)!=(d|0)){g=la(g,c,h)+h|0}d=pa(e,k,j);c=i-b|0;b=pa(g,b,c);F[a+8>>2]=e+f;F[a+4>>2]=b+c;F[a>>2]=d;if(k){ja(k)}return}na();v()}e=f;d=e-h|0;if(i>>>0>d>>>0){while(1){D[e|0]=G[d|0];e=e+1|0;d=d+1|0;if(i>>>0>d>>>0){continue}break}}F[a+4>>2]=e;a=b+h|0;if((a|0)!=(f|0)){a=f-a|0;pa(f-a|0,b,a)}if((c|0)==(g|0)){return}f=(c^-1)+g|0;a=g-c&7;b:{if(!a){e=b;break b}d=0;e=b;while(1){D[e|0]=G[c|0];e=e+1|0;c=c+1|0;d=d+1|0;if((a|0)!=(d|0)){continue}break}}if(f>>>0<7){return}while(1){D[e|0]=G[c|0];D[e+1|0]=G[c+1|0];D[e+2|0]=G[c+2|0];D[e+3|0]=G[c+3|0];D[e+4|0]=G[c+4|0];D[e+5|0]=G[c+5|0];D[e+6|0]=G[c+6|0];D[e+7|0]=G[c+7|0];e=e+8|0;c=c+8|0;if((g|0)!=(c|0)){continue}break}}function la(a,b,c){var d=0,e=0,f=0;if(c>>>0>=512){Y(a|0,b|0,c|0);return a}e=a+c|0;a:{if(!((a^b)&3)){b:{if(!(a&3)){c=a;break b}if(!c){c=a;break b}c=a;while(1){D[c|0]=G[b|0];b=b+1|0;c=c+1|0;if(!(c&3)){break b}if(c>>>0>>0){continue}break}}d=e&-4;c:{if(d>>>0<64){break c}f=d+-64|0;if(f>>>0>>0){break c}while(1){F[c>>2]=F[b>>2];F[c+4>>2]=F[b+4>>2];F[c+8>>2]=F[b+8>>2];F[c+12>>2]=F[b+12>>2];F[c+16>>2]=F[b+16>>2];F[c+20>>2]=F[b+20>>2];F[c+24>>2]=F[b+24>>2];F[c+28>>2]=F[b+28>>2];F[c+32>>2]=F[b+32>>2];F[c+36>>2]=F[b+36>>2];F[c+40>>2]=F[b+40>>2];F[c+44>>2]=F[b+44>>2];F[c+48>>2]=F[b+48>>2];F[c+52>>2]=F[b+52>>2];F[c+56>>2]=F[b+56>>2];F[c+60>>2]=F[b+60>>2];b=b- -64|0;c=c- -64|0;if(f>>>0>=c>>>0){continue}break}}if(c>>>0>=d>>>0){break a}while(1){F[c>>2]=F[b>>2];b=b+4|0;c=c+4|0;if(d>>>0>c>>>0){continue}break}break a}if(e>>>0<4){c=a;break a}d=e-4|0;if(d>>>0>>0){c=a;break a}c=a;while(1){D[c|0]=G[b|0];D[c+1|0]=G[b+1|0];D[c+2|0]=G[b+2|0];D[c+3|0]=G[b+3|0];b=b+4|0;c=c+4|0;if(d>>>0>=c>>>0){continue}break}}if(c>>>0>>0){while(1){D[c|0]=G[b|0];b=b+1|0;c=c+1|0;if((e|0)!=(c|0)){continue}break}}return a}function sd(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;F[a>>2]=8336;d=a+232|0;b=F[d+196>>2];if(b){F[d+200>>2]=b;ja(b)}c=F[d+184>>2];if(c){b=c;e=F[d+188>>2];if((b|0)!=(e|0)){while(1){b=e-12|0;f=F[b>>2];if(f){F[e-8>>2]=f;ja(f)}e=b;if((b|0)!=(c|0)){continue}break}b=F[d+184>>2]}F[d+188>>2]=c;ja(b)}b=F[d+156>>2];if(b){F[d+160>>2]=b;ja(b)}c=F[d+136>>2];F[d+136>>2]=0;if(c){e=c-4|0;b=F[e>>2];if(b){b=c+(b<<4)|0;while(1){b=b-16|0;if((c|0)!=(b|0)){continue}break}}ja(e)}td(a+216|0);b=F[a+196>>2];if(b){F[a+200>>2]=b;ja(b)}b=F[a+184>>2];if(b){F[a+188>>2]=b;ja(b)}b=F[a+172>>2];if(b){F[a+176>>2]=b;ja(b)}b=F[a+160>>2];if(b){F[a+164>>2]=b;ja(b)}b=F[a+144>>2];if(b){while(1){c=F[b>>2];ja(b);b=c;if(b){continue}break}}b=F[a+136>>2];F[a+136>>2]=0;if(b){ja(b)}b=F[a+120>>2];if(b){ja(b)}b=F[a+108>>2];if(b){ja(b)}b=F[a+96>>2];if(b){ja(b)}b=F[a+72>>2];if(b){F[a+76>>2]=b;ja(b)}b=F[a+60>>2];if(b){ja(b)}b=F[a+48>>2];if(b){F[a+52>>2]=b;ja(b)}b=F[a+36>>2];if(b){F[a+40>>2]=b;ja(b)}b=F[a+24>>2];if(b){F[a+28>>2]=b;ja(b)}b=F[a+12>>2];if(b){F[a+16>>2]=b;ja(b)}b=F[a+8>>2];F[a+8>>2]=0;if(b){Za(b)}return a|0}function Fa(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=F[a+8>>2];e=F[a+4>>2];if(d-e>>2>>>0>=b>>>0){a:{if(!b){break a}d=e;f=b&7;if(f){while(1){F[d>>2]=F[c>>2];d=d+4|0;h=h+1|0;if((f|0)!=(h|0)){continue}break}}e=(b<<2)+e|0;if((b-1&1073741823)>>>0<7){break a}while(1){F[d>>2]=F[c>>2];F[d+4>>2]=F[c>>2];F[d+8>>2]=F[c>>2];F[d+12>>2]=F[c>>2];F[d+16>>2]=F[c>>2];F[d+20>>2]=F[c>>2];F[d+24>>2]=F[c>>2];F[d+28>>2]=F[c>>2];d=d+32|0;if((e|0)!=(d|0)){continue}break}}F[a+4>>2]=e;return}b:{i=F[a>>2];j=e-i|0;f=j>>2;g=f+b|0;if(g>>>0<1073741824){d=d-i|0;e=d>>>1|0;g=d>>>0>=2147483644?1073741823:e>>>0>g>>>0?e:g;if(g){if(g>>>0>=1073741824){break b}k=ka(g<<2)}f=(f<<2)+k|0;d=f;e=b&7;if(e){while(1){F[d>>2]=F[c>>2];d=d+4|0;h=h+1|0;if((e|0)!=(h|0)){continue}break}}e=f+(b<<2)|0;if((b-1&1073741823)>>>0>=7){while(1){F[d>>2]=F[c>>2];F[d+4>>2]=F[c>>2];F[d+8>>2]=F[c>>2];F[d+12>>2]=F[c>>2];F[d+16>>2]=F[c>>2];F[d+20>>2]=F[c>>2];F[d+24>>2]=F[c>>2];F[d+28>>2]=F[c>>2];d=d+32|0;if((e|0)!=(d|0)){continue}break}}b=pa(k,i,j);F[a+4>>2]=e;F[a>>2]=b;F[a+8>>2]=b+(g<<2);if(i){ja(i)}return}na();v()}oa();v()}function Sb(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;if(G[a+11|0]>>>7|0){d=F[a+4>>2]}else{d=G[a+11|0]&127}if(d>>>0>>0){h=Z-16|0;Z=h;b=b-d|0;if(b){g=G[a+11|0]>>>7|0?(F[a+8>>2]&2147483647)-1|0:10;if(G[a+11|0]>>>7|0){d=F[a+4>>2]}else{d=G[a+11|0]&127}i=d+b|0;if(g-d>>>0>>0){a:{e=Z-16|0;Z=e;c=i-g|0;if(c>>>0<=2147483631-g>>>0){if(G[a+11|0]>>>7|0){f=F[a>>2]}else{f=a}if(g>>>0<1073741799){F[e+12>>2]=g<<1;F[e>>2]=c+g;c=Z-16|0;Z=c;Z=c+16|0;c=e+12|0;c=F[(I[e>>2]>2]?c:e)>>2];if(c>>>0>=11){j=c+16&-16;c=j-1|0;c=(c|0)==11?j:c}else{c=10}c=c+1|0}else{c=2147483631}sb(e,c);c=F[e>>2];if(d){db(c,f,d)}if((g|0)!=10){ja(f)}F[a>>2]=c;F[a+8>>2]=F[a+8>>2]&-2147483648|F[e+4>>2]&2147483647;F[a+8>>2]=F[a+8>>2]|-2147483648;Z=e+16|0;break a}za();v()}}f=d;if(G[a+11|0]>>>7|0){d=F[a>>2]}else{d=a}f=f+d|0;e=Z-16|0;Z=e;D[e+15|0]=0;while(1){if(b){D[f|0]=G[e+15|0];b=b-1|0;f=f+1|0;continue}break}Z=e+16|0;Ic(a,i);D[h+15|0]=0;D[d+i|0]=G[h+15|0]}Z=h+16|0;return}if(G[a+11|0]>>>7|0){d=F[a>>2]}else{d=a}f=Z-16|0;Z=f;Ic(a,b);D[f+15|0]=0;D[b+d|0]=G[f+15|0];Z=f+16|0}function Zc(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;g=Z-16|0;Z=g;a:{b:{if(b){F[a+88>>2]=0;F[a+92>>2]=0;d=F[a+84>>2];F[a+84>>2]=0;if(d){ja(d)}F[a+76>>2]=0;F[a+80>>2]=0;d=F[a+72>>2];F[a+72>>2]=0;if(d){ja(d)}d=F[b>>2];c=F[b+4>>2];D[g+15|0]=0;Ea(a,c-d>>2,g+15|0);d=F[b+28>>2];c=F[b+24>>2];D[g+14|0]=0;Ea(a+12|0,d-c>>2,g+14|0);Xb(a+28|0,F[b+4>>2]-F[b>>2]>>2,10284);c=F[b+28>>2]-F[b+24>>2]|0;f=c>>2;e=F[a+52>>2];c:{if(f>>>0<=F[a+60>>2]-e>>2>>>0){break c}if((c|0)<0){break b}d=F[a+56>>2];c=ka(c);f=c+(f<<2)|0;h=c+(d-e&-4)|0;c=h;if((d|0)!=(e|0)){while(1){c=c-4|0;d=d-4|0;F[c>>2]=F[d>>2];if((d|0)!=(e|0)){continue}break}}F[a+60>>2]=f;F[a+56>>2]=h;F[a+52>>2]=c;if(!e){break c}ja(e)}c=F[b+28>>2]-F[b+24>>2]|0;f=c>>2;e=F[a+40>>2];d:{if(f>>>0<=F[a+48>>2]-e>>2>>>0){break d}if((c|0)<0){break a}d=F[a+44>>2];c=ka(c);f=c+(f<<2)|0;h=c+(d-e&-4)|0;c=h;if((d|0)!=(e|0)){while(1){c=c-4|0;d=d-4|0;F[c>>2]=F[d>>2];if((d|0)!=(e|0)){continue}break}}F[a+48>>2]=f;F[a+44>>2]=h;F[a+40>>2]=c;if(!e){break d}ja(e)}D[a+24|0]=1;F[a+64>>2]=b}Z=g+16|0;return}na();v()}na();v()}function nb(a,b){var c=0,d=0,e=0;c=(a|0)==(b|0);D[b+12|0]=c;a:{if(c){break a}while(1){d=F[b+8>>2];if(G[d+12|0]){break a}b:{c=F[d+8>>2];e=F[c>>2];if((e|0)==(d|0)){e=F[c+4>>2];if(!(!e|G[e+12|0])){break b}c:{if(F[d>>2]==(b|0)){b=d;break c}b=F[d+4>>2];a=F[b>>2];F[d+4>>2]=a;if(a){F[a+8>>2]=d;c=F[d+8>>2]}F[b+8>>2]=c;a=F[d+8>>2];F[((F[a>>2]!=(d|0))<<2)+a>>2]=b;F[b>>2]=d;F[d+8>>2]=b;c=F[b+8>>2];d=F[c>>2]}D[b+12|0]=1;D[c+12|0]=0;a=F[d+4>>2];F[c>>2]=a;if(a){F[a+8>>2]=c}F[d+8>>2]=F[c+8>>2];a=F[c+8>>2];F[((F[a>>2]!=(c|0))<<2)+a>>2]=d;F[d+4>>2]=c;F[c+8>>2]=d;return}if(!(G[e+12|0]|!e)){break b}d:{if(F[d>>2]!=(b|0)){b=d;break d}a=F[b+4>>2];F[d>>2]=a;if(a){F[a+8>>2]=d;c=F[d+8>>2]}F[b+8>>2]=c;a=F[d+8>>2];F[((F[a>>2]!=(d|0))<<2)+a>>2]=b;F[b+4>>2]=d;F[d+8>>2]=b;c=F[b+8>>2]}D[b+12|0]=1;D[c+12|0]=0;a=F[c+4>>2];b=F[a>>2];F[c+4>>2]=b;if(b){F[b+8>>2]=c}F[a+8>>2]=F[c+8>>2];b=F[c+8>>2];F[((F[b>>2]!=(c|0))<<2)+b>>2]=a;F[a>>2]=c;F[c+8>>2]=a;break a}D[d+12|0]=1;D[c+12|0]=(a|0)==(c|0);D[e+12|0]=1;b=c;if((c|0)!=(a|0)){continue}break}}}function mi(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a:{b:{c:{d:{e:{f:{g:{h:{i:{j:{k:{if(b){if(!c){break k}if(!d){break j}e=O(d)-O(b)|0;if(e>>>0<=31){break i}break c}if((d|0)==1|d>>>0>1){break c}_=0;a=(a>>>0)/(c>>>0)|0;break a}if(!a){break h}if(!d|d-1&d){break g}a=b>>>ji(d)|0;_=0;break a}if(!(c-1&c)){break f}h=(O(c)+33|0)-O(b)|0;g=0-h|0;break d}h=e+1|0;g=63-e|0;break d}_=0;a=(b>>>0)/(d>>>0)|0;break a}e=O(d)-O(b)|0;if(e>>>0<31){break e}break c}if((c|0)==1){break b}d=ji(c);c=d&31;if((d&63)>>>0>=32){a=b>>>c|0}else{e=b>>>c|0;a=((1<>>c}_=e;break a}h=e+1|0;g=63-e|0}e=h&63;f=e&31;if(e>>>0>=32){e=0;i=b>>>f|0}else{e=b>>>f|0;i=((1<>>f}g=g&63;f=g&31;if(g>>>0>=32){b=a<>>32-f|b<>>31;e=i<<1|b>>>31;f=m-(j+(e>>>0>g>>>0)|0)>>31;k=c&f;i=e-k|0;e=j-((d&f)+(e>>>0>>0)|0)|0;b=b<<1|a>>>31;a=l|a<<1;l=f&1;h=h-1|0;if(h){continue}break}}_=b<<1|a>>>31;a=l|a<<1;break a}a=0;b=0}_=b}return a}function yh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;c=F[b+88>>2];if(!(!c|F[c>>2]!=1)){e=F[c+8>>2];F[a+4>>2]=G[e|0]|G[e+1|0]<<8|(G[e+2|0]<<16|G[e+3|0]<<24);f=a+8|0;d=G[b+24|0];h=F[a+8>>2];g=F[a+12>>2]-h>>2;a:{if(d>>>0>g>>>0){qa(f,d-g|0);d=G[b+24|0];e=F[c+8>>2];break a}if(d>>>0>=g>>>0){break a}F[a+12>>2]=h+(d<<2)}b:{if(!d){b=4;break b}h=d&3;f=F[f>>2];c:{if(d-1>>>0<3){b=4;d=0;break c}k=d&252;d=0;b=4;while(1){g=d<<2;c=b+e|0;F[g+f>>2]=G[c|0]|G[c+1|0]<<8|(G[c+2|0]<<16|G[c+3|0]<<24);F[f+(g|4)>>2]=G[c+4|0]|G[c+5|0]<<8|(G[c+6|0]<<16|G[c+7|0]<<24);F[f+(g|8)>>2]=G[c+8|0]|G[c+9|0]<<8|(G[c+10|0]<<16|G[c+11|0]<<24);F[f+(g|12)>>2]=G[c+12|0]|G[c+13|0]<<8|(G[c+14|0]<<16|G[c+15|0]<<24);d=d+4|0;b=b+16|0;i=i+4|0;if((k|0)!=(i|0)){continue}break}}if(!h){break b}while(1){c=b+e|0;F[f+(d<<2)>>2]=G[c|0]|G[c+1|0]<<8|(G[c+2|0]<<16|G[c+3|0]<<24);d=d+1|0;b=b+4|0;j=j+1|0;if((h|0)!=(j|0)){continue}break}}d=a;a=b+e|0;F[d+20>>2]=G[a|0]|G[a+1|0]<<8|(G[a+2|0]<<16|G[a+3|0]<<24);d=1}return d|0}function Yg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0,h=0;g=Z-16|0;Z=g;e=F[a+4>>2];d=F[e>>2];a:{b=F[a+12>>2];c=F[b+28>>2]-F[b+24>>2]|0;f=c>>2;b:{if(f>>>0<=F[e+8>>2]-d>>2>>>0){break b}if((c|0)<0){break a}b=F[e+4>>2];c=ka(c);f=c+(f<<2)|0;h=c+(b-d&-4)|0;c=h;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;F[c>>2]=F[b>>2];if((b|0)!=(d|0)){continue}break}}F[e+8>>2]=f;F[e+4>>2]=h;F[e>>2]=c;if(!d){break b}ja(d)}b=F[a+12>>2];c=F[b+28>>2];b=F[b+24>>2];F[g+12>>2]=0;b=c-b>>2;d=a+96|0;e=F[d>>2];c=F[a+100>>2]-e>>2;c:{if(b>>>0>c>>>0){Fa(d,b-c|0,g+12|0);break c}if(b>>>0>=c>>>0){break c}F[a+100>>2]=e+(b<<2)}e=a+8|0;b=F[a+116>>2];d:{if(b){d=F[b>>2];if((d|0)==F[b+4>>2]){c=1;break d}b=0;while(1){c=rd(e,F[(b<<2)+d>>2]);if(!c){break d}f=F[a+116>>2];d=F[f>>2];b=b+1|0;if(b>>>0>2]-d>>2>>>0){continue}break}break d}c=1;a=F[a+12>>2];a=F[a+4>>2]-F[a>>2]|0;if(a>>>0<12){break d}a=(a>>2>>>0)/3|0;b=0;while(1){c=rd(e,L(b,3));if(!c){break d}b=b+1|0;if((a|0)!=(b|0)){continue}break}}Z=g+16|0;return c|0}na();v()}function md(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;a:{b:{c:{if(!b){if((d|0)<0){break a}f=F[a+4>>2];b=F[a>>2];d=f-b|0;if(c>>>0>d>>>0){g=c-d|0;e=F[a+8>>2];if(g>>>0<=e-f>>>0){i=a,j=ma(f,0,g)+g|0,F[i+4>>2]=j;break c}if((c|0)<0){break b}f=e-b|0;e=f<<1;f=f>>>0>=1073741823?2147483647:c>>>0>>0?e:c;e=ka(f);ma(e+d|0,0,g);d=pa(e,b,d);F[a+8>>2]=d+f;F[a+4>>2]=c+d;F[a>>2]=d;if(!b){break c}ja(b);break c}if(c>>>0>=d>>>0){break c}F[a+4>>2]=b+c;break c}if((d|0)<0){break a}e=F[a+4>>2];f=F[a>>2];g=e-f|0;d:{if((d|0)<=0&c>>>0<=g>>>0|(d|0)<0){break d}if(c>>>0>g>>>0){d=c-g|0;h=F[a+8>>2];if(d>>>0<=h-e>>>0){i=a,j=ma(e,0,d)+d|0,F[i+4>>2]=j;break d}if((c|0)<0){break b}e=h-f|0;h=e<<1;e=e>>>0>=1073741823?2147483647:c>>>0>>0?h:c;h=ka(e);ma(h+g|0,0,d);d=pa(h,f,g);F[a+8>>2]=d+e;F[a+4>>2]=c+d;F[a>>2]=d;if(!f){break d}ja(f);break d}if(c>>>0>=g>>>0){break d}F[a+4>>2]=c+f}if(!c){break c}pa(F[a>>2],b,c)}b=F[a+28>>2];c=F[a+24>>2]+1|0;b=c?b:b+1|0;F[a+24>>2]=c;F[a+28>>2]=b;g=1;break a}na();v()}return g}function Lg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;k=F[a+12>>2];c=F[a+68>>2];d=F[c+80>>2];D[b+84|0]=0;n=b+68|0;i=F[b+68>>2];e=F[b+72>>2]-i>>2;a:{if(e>>>0>>0){ab(n,d-e|0,9124);c=F[a+68>>2];d=F[c+80>>2];break a}if(d>>>0>=e>>>0){break a}F[b+72>>2]=i+(d<<2)}b=F[c+100>>2];e=F[c+96>>2];i=(b-e|0)/12|0;m=1;b:{if((b|0)==(e|0)){break b}k=F[k+28>>2];f=F[k>>2];if((f|0)==-1){return 0}o=i>>>0<=1?1:i;c=e;b=0;m=0;while(1){g=F[c>>2];if(g>>>0>=d>>>0){break b}j=F[F[a+72>>2]+12>>2];h=F[j+(f<<2)>>2];if(h>>>0>=d>>>0){break b}f=F[n>>2];F[f+(g<<2)>>2]=h;g=k+(l<<2)|0;h=F[g+4>>2];if((h|0)==-1){break b}l=F[c+4>>2];if(l>>>0>=d>>>0){break b}h=F[(h<<2)+j>>2];if(h>>>0>=d>>>0){break b}F[f+(l<<2)>>2]=h;g=F[g+8>>2];if((g|0)==-1){break b}c=F[c+8>>2];if(c>>>0>=d>>>0){break b}j=F[(g<<2)+j>>2];if(j>>>0>=d>>>0){break b}F[f+(c<<2)>>2]=j;b=b+1|0;m=i>>>0<=b>>>0;if((b|0)==(o|0)){break b}c=e+L(b,12)|0;l=L(b,3);f=F[k+(l<<2)>>2];if((f|0)!=-1){continue}break}}return m|0}function ag(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;h=F[d+80>>2];e=Z-48|0;Z=e;a=F[a+4>>2];m=a-2|0;a:{if(m>>>0>28){break a}j=F[F[d>>2]>>2]+F[d+48>>2]|0;F[e+16>>2]=a;a=-1<>2]=a^-1;a=-2-a|0;F[e+24>>2]=a;F[e+32>>2]=(a|0)/2;J[e+28>>2]=M(2)/M(a|0);f=F[c>>2];if((f|0)!=F[c+4>>2]){a=0;d=0;while(1){g=F[(d<<2)+f>>2];h=e+36|0;k=F[F[b>>2]>>2];l=F[b+48>>2];f=F[b+40>>2];i=F[b+44>>2];if(!G[b+84|0]){g=F[F[b+68>>2]+(g<<2)>>2]}g=ki(f,i,g,0);i=g;g=g+l|0;la(h,g+k|0,f);Kc(e+16|0,h,e+12|0,e+8|0);f=a<<2;F[f+j>>2]=F[e+12>>2];F[(f|4)+j>>2]=F[e+8>>2];a=a+2|0;d=d+1|0;f=F[c>>2];if(d>>>0>2]-f>>2>>>0){continue}break}break a}if(!h){break a}d=0;a=0;while(1){k=e+36|0;l=F[F[b>>2]>>2];i=F[b+48>>2];c=F[b+40>>2];f=ki(c,F[b+44>>2],G[b+84|0]?a:F[F[b+68>>2]+(a<<2)>>2],0);g=f;f=f+i|0;la(k,f+l|0,c);Kc(e+16|0,k,e+12|0,e+8|0);c=d<<2;F[c+j>>2]=F[e+12>>2];F[(c|4)+j>>2]=F[e+8>>2];d=d+2|0;a=a+1|0;if((h|0)!=(a|0)){continue}break}}Z=e+48|0;return m>>>0<29|0}function Zg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=F[a+12>>2];d=F[a+108>>2];e=F[d+80>>2];D[b+84|0]=0;m=b+68|0;h=F[b+68>>2];f=F[b+72>>2]-h>>2;a:{if(f>>>0>>0){ab(m,e-f|0,9124);d=F[a+108>>2];e=F[d+80>>2];break a}if(e>>>0>=f>>>0){break a}F[b+72>>2]=h+(e<<2)}b=F[d+100>>2];f=F[d+96>>2];h=(b-f|0)/12|0;k=1;b:{if((b|0)==(f|0)){break b}n=h>>>0<=1?1:h;o=F[c>>2];c=0;d=f;b=0;k=0;while(1){c=(c<<2)+o|0;i=F[c>>2];if((i|0)==-1){break b}g=F[d>>2];if(g>>>0>=e>>>0){break b}l=F[F[a+112>>2]+12>>2];j=F[l+(i<<2)>>2];if(j>>>0>=e>>>0){break b}i=F[m>>2];F[i+(g<<2)>>2]=j;g=F[c+4>>2];if((g|0)==-1){break b}j=F[d+4>>2];if(j>>>0>=e>>>0){break b}g=F[(g<<2)+l>>2];if(g>>>0>=e>>>0){break b}F[i+(j<<2)>>2]=g;c=F[c+8>>2];if((c|0)==-1){break b}d=F[d+8>>2];if(d>>>0>=e>>>0){break b}c=F[(c<<2)+l>>2];if(c>>>0>=e>>>0){break b}F[i+(d<<2)>>2]=c;b=b+1|0;k=h>>>0<=b>>>0;if((b|0)==(n|0)){break b}c=L(b,3);d=f+L(b,12)|0;if((b|0)!=1431655765){continue}break}}return k|0}function xd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=M(0),j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;k=Z-16|0;Z=k;if(F[c+28>>2]==9){d=F[a+4>>2];h=G[c+24|0];e=h<<2;f=ka(e);l=k+8|0;F[l>>2]=1065353216;i=J[a+20>>2];d=-1<0){J[l>>2]=i/M(d|0)}o=(d|0)>0;a:{if(!o){break a}j=F[c+80>>2];if(!j){break a}if(h){p=F[F[b>>2]>>2]+F[b+48>>2]|0;t=h&254;u=h&1;b=0;while(1){m=F[a+8>>2];i=J[l>>2];d=0;n=0;if((h|0)!=1){while(1){g=d<<2;q=(b<<2)+p|0;J[g+f>>2]=M(i*M(F[q>>2]))+J[g+m>>2];g=g|4;J[g+f>>2]=M(i*M(F[q+4>>2]))+J[g+m>>2];d=d+2|0;b=b+2|0;n=n+2|0;if((t|0)!=(n|0)){continue}break}}if(u){d=d<<2;J[d+f>>2]=M(i*M(F[(b<<2)+p>>2]))+J[d+m>>2];b=b+1|0}la(F[F[c+64>>2]>>2]+r|0,f,e);r=e+r|0;s=s+1|0;if((s|0)!=(j|0)){continue}break}break a}b=0;if((j|0)!=1){a=j&-2;d=0;while(1){la(F[F[c+64>>2]>>2]+b|0,f,e);b=b+e|0;la(b+F[F[c+64>>2]>>2]|0,f,e);b=b+e|0;d=d+2|0;if((a|0)!=(d|0)){continue}break}}if(!(j&1)){break a}la(F[F[c+64>>2]>>2]+b|0,f,e)}ja(f)}Z=k+16|0;return o|0}function Rg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=F[a+12>>2];d=F[a+68>>2];e=F[d+80>>2];D[b+84|0]=0;m=b+68|0;h=F[b+68>>2];f=F[b+72>>2]-h>>2;a:{if(f>>>0>>0){ab(m,e-f|0,9124);d=F[a+68>>2];e=F[d+80>>2];break a}if(e>>>0>=f>>>0){break a}F[b+72>>2]=h+(e<<2)}b=F[d+100>>2];f=F[d+96>>2];h=(b-f|0)/12|0;k=1;b:{if((b|0)==(f|0)){break b}n=h>>>0<=1?1:h;o=F[c>>2];c=0;d=f;b=0;k=0;while(1){c=(c<<2)+o|0;i=F[c>>2];if((i|0)==-1){break b}g=F[d>>2];if(g>>>0>=e>>>0){break b}l=F[F[a+72>>2]+12>>2];j=F[l+(i<<2)>>2];if(j>>>0>=e>>>0){break b}i=F[m>>2];F[i+(g<<2)>>2]=j;g=F[c+4>>2];if((g|0)==-1){break b}j=F[d+4>>2];if(j>>>0>=e>>>0){break b}g=F[(g<<2)+l>>2];if(g>>>0>=e>>>0){break b}F[i+(j<<2)>>2]=g;c=F[c+8>>2];if((c|0)==-1){break b}d=F[d+8>>2];if(d>>>0>=e>>>0){break b}c=F[(c<<2)+l>>2];if(c>>>0>=e>>>0){break b}F[i+(d<<2)>>2]=c;b=b+1|0;k=h>>>0<=b>>>0;if((b|0)==(n|0)){break b}c=L(b,3);d=f+L(b,12)|0;if((b|0)!=1431655765){continue}break}}return k|0}function Na(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;d=Z-16|0;Z=d;a:{f=F[a+4>>2];b:{if(f>>>0>>0){e=b-f|0;c=F[a+8>>2];g=c<<5;c:{if(!(e>>>0>g>>>0|f>>>0>g-e>>>0)){F[a+4>>2]=b;h=f&31;b=F[a>>2]+(f>>>3&536870908)|0;break c}F[d+8>>2]=0;F[d>>2]=0;F[d+4>>2]=0;if((b|0)<0){break a}if(g>>>0<=1073741822){c=c<<6;b=b+31&-32;b=b>>>0>>0?c:b}else{b=2147483647}$a(d,b);f=F[a+4>>2];F[d+4>>2]=f+e;i=F[a>>2];b=F[d>>2];d:{if((f|0)<=0){break d}c=f>>>5|0;if(f>>>0>=32){pa(b,i,c<<2)}g=c<<2;b=g+b|0;h=f&31;if(h){c=-1>>>32-h|0;F[b>>2]=F[b>>2]&(c^-1)|F[i+g>>2]&c}i=F[a>>2]}F[a>>2]=F[d>>2];F[d>>2]=i;c=F[a+4>>2];F[a+4>>2]=F[d+4>>2];F[d+4>>2]=c;c=F[a+8>>2];F[a+8>>2]=F[d+8>>2];F[d+8>>2]=c;if(!i){break c}ja(i)}if(!e){break b}if(h){c=32-h|0;a=c>>>0>>0?c:e;F[b>>2]=F[b>>2]&(-1<>>c-a^-1);e=e-a|0;b=b+4|0}a=e>>>5|0;if(e>>>0>=32){ma(b,0,a<<2)}if((e&-32)==(e|0)){break b}a=(a<<2)+b|0;F[a>>2]=F[a>>2]&(-1>>>32-(e&31)^-1);break b}F[a+4>>2]=b}Z=d+16|0;return}na();v()}function Aa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;i=Z-16|0;Z=i;f=F[b+20>>2];h=F[b+12>>2];c=F[b+16>>2];a:{if((f|0)>=(h|0)&c>>>0>=I[b+8>>2]|(f|0)>(h|0)){break a}D[a+12|0]=G[c+F[b>>2]|0];c=F[b+20>>2];f=F[b+16>>2]+1|0;c=f?c:c+1|0;F[b+16>>2]=f;F[b+20>>2]=c;if(!Qd(1,i+12|0,b)){break a}h=F[b+8>>2];f=F[b+16>>2];g=h-f|0;c=F[i+12>>2];d=f>>>0>h>>>0;h=F[b+20>>2];e=F[b+12>>2]-(d+h|0)|0;if(g>>>0>>0&(e|0)<=0|(e|0)<0|(c|0)<=0){break a}g=f+F[b>>2]|0;F[a>>2]=g;b:{c:{e=c-1|0;j=e+g|0;d=G[j|0];d:{if(d>>>0<=63){F[a+4>>2]=e;d=G[j|0]&63;break d}e:{switch((d>>>6|0)-1|0){case 1:break c;case 0:break e;default:break a}}if(c>>>0<2){break a}e=c-2|0;F[a+4>>2]=e;g=g+e|0;d=G[g+1|0]<<8&16128|G[g|0]}F[a+8>>2]=d+4096;break b}if(c>>>0<3){break a}e=c-3|0;F[a+4>>2]=e;d=a;a=g+e|0;a=G[a+1|0]<<8|G[a+2|0]<<16&4128768|G[a|0];F[d+8>>2]=a+4096;if(a>>>0>1044479){break a}}a=h;d=c;c=c+f|0;a=d>>>0>c>>>0?a+1|0:a;F[b+16>>2]=c;F[b+20>>2]=a;k=1}Z=i+16|0;return k}function qd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;e=F[a+12>>2];i=F[a+8>>2];d=e-i>>2;b=G[b+24|0];a:{if(d>>>0>>0){qa(a+8|0,b-d|0);i=F[a+8>>2];e=F[a+12>>2];break a}if(b>>>0>=d>>>0){break a}e=(b<<2)+i|0;F[a+12>>2]=e}b=0;f=F[c+8>>2];h=F[c+12>>2];j=F[c+20>>2];e=e-i|0;d=F[c+16>>2];g=e+d|0;j=e>>>0>g>>>0?j+1|0:j;b:{if(f>>>0>>0&(h|0)<=(j|0)|(h|0)<(j|0)){break b}la(i,d+F[c>>2]|0,e);d=F[c+20>>2];g=e;e=e+F[c+16>>2]|0;d=g>>>0>e>>>0?d+1|0:d;F[c+16>>2]=e;F[c+20>>2]=d;f=F[c+8>>2];h=F[c+12>>2];g=e+4|0;d=g>>>0<4?d+1|0:d;if(f>>>0>>0&(d|0)>=(h|0)|(d|0)>(h|0)){break b}d=e+F[c>>2]|0;F[a+20>>2]=G[d|0]|G[d+1|0]<<8|(G[d+2|0]<<16|G[d+3|0]<<24);d=F[c+20>>2];g=d;f=d;e=F[c+16>>2];d=e+4|0;f=d>>>0<4?f+1|0:f;F[c+16>>2]=d;F[c+20>>2]=f;h=F[c+12>>2];if((f|0)>=(h|0)&d>>>0>=I[c+8>>2]|(f|0)>(h|0)){break b}f=G[d+F[c>>2]|0];d=g;e=e+5|0;d=e>>>0<5?d+1|0:d;F[c+16>>2]=e;F[c+20>>2]=d;if(f-1>>>0>29){break b}F[a+4>>2]=f;b=1}return b|0}function Kc(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;j=+J[b>>2];k=+J[b+4>>2];l=+J[b+8>>2];g=N(j)+N(k)+N(l);a:{if(!(g>1e-6)){j=1;k=0;e=0;break a}g=1/g;k=g*k;j=g*j;e=g*l<0}h=F[a+16>>2];l=+(h|0);g=R(j*l+.5);b:{if(N(g)<2147483648){m=~~g;break b}m=-2147483648}f=m>>31;i=(f^m)-f|0;g=R(k*l+.5);c:{if(N(g)<2147483648){f=~~g;break c}f=-2147483648}b=f>>31;b=h-(i+((f^b)-b|0)|0)|0;i=(b|0)>0?b:0;e=e?0-i|0:i;f=f+(b>>31&((f|0)>0?b:0-b|0))|0;d:{if((m|0)>=0){b=e+h|0;a=F[a+8>>2];e=h+f|0;break d}b=f>>31;b=(b^f)-b|0;a=F[a+8>>2];b=(e|0)<0?b:a-b|0;e=(f|0)<0?i:a-i|0}e:{if(!(b|e)){b=a;break e}if(!((a|0)!=(b|0)|e)){b=a;break e}if(!((a|0)!=(e|0)|b)){b=a;break e}if(!((b|0)<=(h|0)|e)){b=(h<<1)-b|0;a=0;break e}if(!((a|0)!=(e|0)|(b|0)>=(h|0))){b=(h<<1)-b|0;break e}if(!((a|0)!=(b|0)|(e|0)>=(h|0))){b=a;a=(h<<1)-e|0;break e}if(b){a=e;break e}b=0;if((e|0)<=(h|0)){a=e;break e}a=(h<<1)-e|0}F[c>>2]=a;F[d>>2]=b}function ye(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a:{if(!$c(a,b)){break a}h=a+36|0;g=$[F[F[a>>2]+24>>2]](a)|0;e=F[a+40>>2];d=F[a+36>>2];c=e-d>>2;b:{if(g>>>0>c>>>0){Pb(h,g-c|0);break b}if(c>>>0<=g>>>0){break b}d=d+(g<<2)|0;if((d|0)!=(e|0)){while(1){e=e-4|0;c=F[e>>2];F[e>>2]=0;if(c){$[F[F[c>>2]+4>>2]](c)}if((d|0)!=(e|0)){continue}break}}F[a+40>>2]=d}c=1;if((g|0)<=0){break a}e=0;while(1){c:{c=F[b+20>>2];f=F[b+12>>2];d=F[b+16>>2];if((c|0)>=(f|0)&d>>>0>=I[b+8>>2]|(c|0)>(f|0)){break c}f=G[F[b>>2]+d|0];d=d+1|0;c=d?c:c+1|0;F[b+16>>2]=d;F[b+20>>2]=c;d=$[F[F[a>>2]+48>>2]](a,f)|0;f=e<<2;i=f+F[a+36>>2]|0;c=F[i>>2];F[i>>2]=d;if(c){$[F[F[c>>2]+4>>2]](c)}c=F[F[h>>2]+f>>2];if(!c){break c}if(!(k=c,l=$[F[F[a>>2]+28>>2]](a)|0,m=$[F[F[a>>2]+20>>2]](a,e)|0,j=F[F[c>>2]+8>>2],$[j](k|0,l|0,m|0)|0)){break c}c=1;e=e+1|0;if((g|0)!=(e|0)){continue}break a}break}c=0}return c|0}function Xc(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;g=F[a>>2];c=g+(b>>>3&536870908)|0;F[c>>2]=F[c>>2]|1<>2];e=(b|0)==-1;d=-1;a:{if(e){break a}c=b+1|0;c=(c>>>0)%3|0?c:b-2|0;d=-1;if((c|0)==-1){break a}d=F[F[f>>2]+(c<<2)>>2]}c=F[a+12>>2];h=(d>>>3&536870908)+c|0;F[h>>2]=F[h>>2]|1<>>0)%3|0){e=b-1|0;break e}e=b+2|0;d=-1;if((e|0)==-1){break d}}d=F[F[f>>2]+(e<<2)>>2]}e=(d>>>3&536870908)+c|0;F[e>>2]=F[e>>2]|1<>2]+(b<<2)>>2];if((b|0)==-1){break b}D[a+24|0]=0;a=(b>>>3&536870908)+g|0;F[a>>2]=F[a>>2]|1<>>0)%3|0?a:b-2|0;if((a|0)!=-1){d=F[F[f>>2]+(a<<2)>>2]}a=c+(d>>>3&536870908)|0;F[a>>2]=F[a>>2]|1<>>0)%3|0){b=b-1|0;break g}b=b+2|0;a=-1;if((b|0)==-1){break f}}a=F[F[f>>2]+(b<<2)>>2]}b=1<>>3&536870908)|0;c=F[a>>2];break c}a=c+536870908|0;b=F[c+536870908>>2];c=-2147483648}F[a>>2]=b|c}}function zc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=M(0),f=M(0),g=M(0),h=M(0),i=M(0),j=0,k=M(0),l=M(0),m=M(0),n=M(0),o=0;a:{if(F[c+28>>2]!=9|G[c+24|0]!=3){break a}a=F[a+4>>2];if(a-2>>>0>28){break a}o=1;j=F[c+80>>2];if(!j){break a}k=M(M(2)/M((1<>2]>>2]+F[c+48>>2]|0;a=F[F[b>>2]>>2]+F[b+48>>2]|0;b=0;while(1){g=M(0);l=M(0);m=M(0);e=M(M(M(F[a>>2])*k)+M(-1));f=M(M(M(F[a+4>>2])*k)+M(-1));i=M(M(M(1)-M(N(e)))-M(N(f)));h=M(Q(M(-i),M(0)));n=M(-h);f=M(f+(f>>8;D[c+10|0]=d>>>16;D[c+11|0]=d>>>24;d=(w(l),y(2));D[c+4|0]=d;D[c+5|0]=d>>>8;D[c+6|0]=d>>>16;D[c+7|0]=d>>>24;d=(w(g),y(2));D[c|0]=d;D[c+1|0]=d>>>8;D[c+2|0]=d>>>16;D[c+3|0]=d>>>24;c=c+12|0;b=b+1|0;if((j|0)!=(b|0)){continue}break}}return o|0}function Md(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;g=Z-16|0;Z=g;a:{if(!Sa(1,g+8|0,b)){break a}d=F[b+8>>2];e=F[b+16>>2];f=d-e|0;h=F[g+12>>2];c=d>>>0>>0;d=F[b+20>>2];i=F[b+12>>2]-(c+d|0)|0;c=F[g+8>>2];if((h|0)==(i|0)&c>>>0>f>>>0|h>>>0>i>>>0){break a}d=d+h|0;f=c+e|0;d=f>>>0>>0?d+1|0:d;F[b+16>>2]=f;F[b+20>>2]=d;if((c|0)<=0){break a}b=F[b>>2]+e|0;F[a+40>>2]=b;e=c-1|0;d=b+e|0;f=G[d|0];b:{if(f>>>0<=63){F[a+44>>2]=e;b=G[d|0]&63;break b}c:{switch((f>>>6|0)-1|0){case 0:if(c>>>0<2){break a}c=c-2|0;F[a+44>>2]=c;b=b+c|0;b=G[b+1|0]<<8&16128|G[b|0];break b;case 1:if(c>>>0<3){break a}c=c-3|0;F[a+44>>2]=c;b=b+c|0;b=G[b+1|0]<<8|G[b+2|0]<<16&4128768|G[b|0];break b;default:break c}}c=c-4|0;F[a+44>>2]=c;b=b+c|0;b=(G[b|0]|G[b+1|0]<<8|(G[b+2|0]<<16|G[b+3|0]<<24))&1073741823}F[a+48>>2]=b+16384;j=b>>>0<4177920}Z=g+16|0;return j}function Tf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;a:{a=Z-32|0;Z=a;e=ya(c);if(e>>>0<2147483632){b:{c:{if(e>>>0>=11){g=(e|15)+1|0;f=ka(g);F[a+24>>2]=g|-2147483648;F[a+16>>2]=f;F[a+20>>2]=e;g=e+f|0;break c}D[a+27|0]=e;f=a+16|0;g=e+f|0;if(!e){break b}}la(f,c,e)}D[g|0]=0;F[a+8>>2]=0;F[a>>2]=0;F[a+4>>2]=0;d:{c=Ya(b,a+16|0);if((c|0)==(b+4|0)){break d}b=F[c+28>>2];e=F[c+32>>2];if((b|0)==(e|0)){break d}b=e-b|0;if(b&3){break d}e=b>>>2|0;f=F[a+4>>2];b=F[a>>2];g=f-b>>2;e:{if(e>>>0>g>>>0){qa(a,e-g|0);b=F[a>>2];f=F[a+4>>2];break e}if(e>>>0>=g>>>0){break e}f=(e<<2)+b|0;F[a+4>>2]=f}if((b|0)!=(f|0)){e=b;b=F[c+28>>2];la(e,b,F[c+32>>2]-b|0);break d}ta();v()}b=F[d>>2];if(b){F[d+4>>2]=b;ja(b)}F[d>>2]=F[a>>2];F[d+4>>2]=F[a+4>>2];F[d+8>>2]=F[a+8>>2];if(D[a+27|0]<0){ja(F[a+16>>2])}Z=a+32|0;break a}za();v()}}function ud(a){a=a|0;var b=0,c=0,d=0,e=0;F[a>>2]=8284;d=F[a+368>>2];F[a+368>>2]=0;if(d){e=d-4|0;b=F[e>>2];if(b){c=(b<<4)+d|0;while(1){c=c-16|0;if((d|0)!=(c|0)){continue}break}}ja(e)}td(a+216|0);b=F[a+196>>2];if(b){F[a+200>>2]=b;ja(b)}b=F[a+184>>2];if(b){F[a+188>>2]=b;ja(b)}b=F[a+172>>2];if(b){F[a+176>>2]=b;ja(b)}b=F[a+160>>2];if(b){F[a+164>>2]=b;ja(b)}c=F[a+144>>2];if(c){while(1){b=F[c>>2];ja(c);c=b;if(b){continue}break}}b=F[a+136>>2];F[a+136>>2]=0;if(b){ja(b)}b=F[a+120>>2];if(b){ja(b)}b=F[a+108>>2];if(b){ja(b)}b=F[a+96>>2];if(b){ja(b)}b=F[a+72>>2];if(b){F[a+76>>2]=b;ja(b)}b=F[a+60>>2];if(b){ja(b)}b=F[a+48>>2];if(b){F[a+52>>2]=b;ja(b)}b=F[a+36>>2];if(b){F[a+40>>2]=b;ja(b)}b=F[a+24>>2];if(b){F[a+28>>2]=b;ja(b)}b=F[a+12>>2];if(b){F[a+16>>2]=b;ja(b)}b=F[a+8>>2];F[a+8>>2]=0;if(b){Za(b)}return a|0}function Vf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=Z-16|0;Z=d;a:{e=ya(c);if(e>>>0<2147483632){b:{c:{if(e>>>0>=11){f=(e|15)+1|0;a=ka(f);F[d+8>>2]=f|-2147483648;F[d>>2]=a;F[d+4>>2]=e;f=a+e|0;break c}D[d+11|0]=e;f=d+e|0;a=d;if(!e){break b}}la(a,c,e)}D[f|0]=0;c=G[d+11|0];e=c<<24>>24;b=F[b+4>>2];a=0;d:{if(!b){break d}a=c;c=(e|0)<0;a=c?F[d+4>>2]:a;f=c?F[d>>2]:d;while(1){c=G[b+27|0];g=c<<24>>24<0;c=g?F[b+20>>2]:c;i=c>>>0>>0;e:{f:{g:{h:{i:{j:{h=i?c:a;if(h){g=g?F[b+16>>2]:b+16|0;j=sa(f,g,h);if(j){break j}if(a>>>0>=c>>>0){break i}break e}if(a>>>0>=c>>>0){break h}break e}if((j|0)<0){break e}}c=sa(g,f,h);if(c){break g}}if(i){break f}a=1;break d}if((c|0)<0){break f}a=1;break d}b=b+4|0}b=F[b>>2];if(b){continue}break}a=0}if((e|0)<0){ja(F[d>>2])}Z=d+16|0;break a}za();v()}return a|0}function lc(a,b){var c=0,d=0;c=F[b+8>>2];F[a+4>>2]=F[b+4>>2];F[a+8>>2]=c;F[a+20>>2]=F[b+20>>2];c=F[b+16>>2];F[a+12>>2]=F[b+12>>2];F[a+16>>2]=c;a:{b:{if((a|0)!=(b|0)){c=F[b+28>>2];if(c){d=F[a+24>>2];if(F[a+32>>2]<<5>>>0>>0){if(d){ja(d);F[a+32>>2]=0;F[a+24>>2]=0;F[a+28>>2]=0;c=F[b+28>>2]}if((c|0)<0){break b}c=(c-1>>>5|0)+1|0;d=ka(c<<2);F[a+32>>2]=c;F[a+28>>2]=0;F[a+24>>2]=d;c=F[b+28>>2]}pa(d,F[b+24>>2],(c-1>>>3&536870908)+4|0);c=F[b+28>>2]}else{c=0}F[a+28>>2]=c;c=F[b+40>>2];if(c){d=F[a+36>>2];if(F[a+44>>2]<<5>>>0>>0){if(d){ja(d);F[a+44>>2]=0;F[a+36>>2]=0;F[a+40>>2]=0;c=F[b+40>>2]}if((c|0)<0){break a}c=(c-1>>>5|0)+1|0;d=ka(c<<2);F[a+44>>2]=c;F[a+40>>2]=0;F[a+36>>2]=d;c=F[b+40>>2]}pa(d,F[b+36>>2],(c-1>>>3&536870908)+4|0);b=F[b+40>>2]}else{b=0}F[a+40>>2]=b}return}na();v()}na();v()}function nc(a){var b=0,c=0,d=0;b=F[a+8>>2];d=F[a>>2];a:{if(G[a+12|0]){b:{c:{d:{e:{if((b|0)==-1){break e}c=b+1|0;b=(c>>>0)%3|0?c:b-2|0;if((b|0)==-1){break e}b=F[F[d+12>>2]+(b<<2)>>2];if((b|0)!=-1){break d}}F[a+8>>2]=-1;break c}c=b+1|0;b=(c>>>0)%3|0?c:b-2|0;F[a+8>>2]=b;if((b|0)!=-1){break b}}c=F[a+4>>2];b=-1;f:{if((c|0)==-1){break f}g:{if((c>>>0)%3|0){c=c-1|0;break g}c=c+2|0;b=-1;if((c|0)==-1){break f}}c=F[F[d+12>>2]+(c<<2)>>2];b=-1;if((c|0)==-1){break f}b=c-1|0;if((c>>>0)%3|0){break f}b=c+2|0}D[a+12|0]=0;F[a+8>>2]=b;return}if((b|0)!=F[a+4>>2]){break a}F[a+8>>2]=-1;return}c=-1;h:{if((b|0)==-1){break h}i:{if((b>>>0)%3|0){b=b-1|0;break i}b=b+2|0;c=-1;if((b|0)==-1){break h}}b=F[F[d+12>>2]+(b<<2)>>2];c=-1;if((b|0)==-1){break h}c=b-1|0;if((b>>>0)%3|0){break h}c=b+2|0}F[a+8>>2]=c}}function Od(a){var b=0,c=0,d=0;b=ka(32);D[b+26|0]=0;c=G[1475]|G[1476]<<8;D[b+24|0]=c;D[b+25|0]=c>>>8;c=G[1471]|G[1472]<<8|(G[1473]<<16|G[1474]<<24);d=G[1467]|G[1468]<<8|(G[1469]<<16|G[1470]<<24);D[b+16|0]=d;D[b+17|0]=d>>>8;D[b+18|0]=d>>>16;D[b+19|0]=d>>>24;D[b+20|0]=c;D[b+21|0]=c>>>8;D[b+22|0]=c>>>16;D[b+23|0]=c>>>24;c=G[1463]|G[1464]<<8|(G[1465]<<16|G[1466]<<24);d=G[1459]|G[1460]<<8|(G[1461]<<16|G[1462]<<24);D[b+8|0]=d;D[b+9|0]=d>>>8;D[b+10|0]=d>>>16;D[b+11|0]=d>>>24;D[b+12|0]=c;D[b+13|0]=c>>>8;D[b+14|0]=c>>>16;D[b+15|0]=c>>>24;c=G[1455]|G[1456]<<8|(G[1457]<<16|G[1458]<<24);d=G[1451]|G[1452]<<8|(G[1453]<<16|G[1454]<<24);D[b|0]=d;D[b+1|0]=d>>>8;D[b+2|0]=d>>>16;D[b+3|0]=d>>>24;D[b+4|0]=c;D[b+5|0]=c>>>8;D[b+6|0]=c>>>16;D[b+7|0]=c>>>24;F[a>>2]=-1;ra(a+4|0,b,26);ja(b)}function Kg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;e=F[a+4>>2];d=F[e>>2];a:{b=F[a+12>>2];c=F[b+56>>2]-F[b+52>>2]|0;f=c>>2;b:{if(f>>>0<=F[e+8>>2]-d>>2>>>0){break b}if((c|0)<0){break a}b=F[e+4>>2];c=ka(c);f=c+(f<<2)|0;g=c+(b-d&-4)|0;c=g;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;F[c>>2]=F[b>>2];if((b|0)!=(d|0)){continue}break}}F[e+8>>2]=f;F[e+4>>2]=g;F[e>>2]=c;if(!d){break b}ja(d)}e=a+8|0;b=F[a+76>>2];c:{if(b){d=F[b>>2];if((d|0)==F[b+4>>2]){return 1}b=0;while(1){c=od(e,F[(b<<2)+d>>2]);if(!c){break c}f=F[a+76>>2];d=F[f>>2];b=b+1|0;if(b>>>0>2]-d>>2>>>0){continue}break}break c}c=1;a=F[F[a+12>>2]+64>>2];a=F[a+4>>2]-F[a>>2]|0;if(a>>>0<12){break c}a=(a>>2>>>0)/3|0;b=0;while(1){c=od(e,L(b,3));if(!c){break c}b=b+1|0;if((a|0)!=(b|0)){continue}break}}return c|0}na();v()}function Qg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0,g=0;e=F[a+4>>2];d=F[e>>2];a:{b=F[a+12>>2];c=F[b+28>>2]-F[b+24>>2]|0;f=c>>2;b:{if(f>>>0<=F[e+8>>2]-d>>2>>>0){break b}if((c|0)<0){break a}b=F[e+4>>2];c=ka(c);f=c+(f<<2)|0;g=c+(b-d&-4)|0;c=g;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;F[c>>2]=F[b>>2];if((b|0)!=(d|0)){continue}break}}F[e+8>>2]=f;F[e+4>>2]=g;F[e>>2]=c;if(!d){break b}ja(d)}e=a+8|0;b=F[a+76>>2];c:{if(b){d=F[b>>2];if((d|0)==F[b+4>>2]){return 1}b=0;while(1){c=pd(e,F[(b<<2)+d>>2]);if(!c){break c}f=F[a+76>>2];d=F[f>>2];b=b+1|0;if(b>>>0>2]-d>>2>>>0){continue}break}break c}c=1;a=F[a+12>>2];a=F[a+4>>2]-F[a>>2]|0;if(a>>>0<12){break c}a=(a>>2>>>0)/3|0;b=0;while(1){c=pd(e,L(b,3));if(!c){break c}b=b+1|0;if((a|0)!=(b|0)){continue}break}}return c|0}na();v()}function pa(a,b,c){var d=0,e=0;a:{if((a|0)==(b|0)){break a}e=a+c|0;if(b-e>>>0<=0-(c<<1)>>>0){return la(a,b,c)}d=(a^b)&3;b:{c:{if(a>>>0>>0){if(d){d=a;break b}if(!(a&3)){d=a;break c}d=a;while(1){if(!c){break a}D[d|0]=G[b|0];b=b+1|0;c=c-1|0;d=d+1|0;if(d&3){continue}break}break c}d:{if(d){break d}if(e&3){while(1){if(!c){break a}c=c-1|0;d=c+a|0;D[d|0]=G[b+c|0];if(d&3){continue}break}}if(c>>>0<=3){break d}while(1){c=c-4|0;F[c+a>>2]=F[b+c>>2];if(c>>>0>3){continue}break}}if(!c){break a}while(1){c=c-1|0;D[c+a|0]=G[b+c|0];if(c){continue}break}break a}if(c>>>0<=3){break b}while(1){F[d>>2]=F[b>>2];b=b+4|0;d=d+4|0;c=c-4|0;if(c>>>0>3){continue}break}}if(!c){break a}while(1){D[d|0]=G[b|0];d=d+1|0;b=b+1|0;c=c-1|0;if(c){continue}break}}return a}function Pb(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;d=F[a+8>>2];c=F[a+4>>2];if(d-c>>2>>>0>=b>>>0){if(b){b=b<<2;c=ma(c,0,b)+b|0}F[a+4>>2]=c;return}a:{b:{c:{g=F[a>>2];f=c-g>>2;e=f+b|0;if(e>>>0<1073741824){d=d-g|0;h=d>>>1|0;e=d>>>0>=2147483644?1073741823:e>>>0>>0?h:e;if(e){if(e>>>0>=1073741824){break c}i=ka(e<<2)}d=(f<<2)+i|0;f=b<<2;b=ma(d,0,f);f=b+f|0;e=(e<<2)+i|0;if((c|0)==(g|0)){break b}while(1){c=c-4|0;b=F[c>>2];F[c>>2]=0;d=d-4|0;F[d>>2]=b;if((c|0)!=(g|0)){continue}break}F[a+8>>2]=e;b=F[a+4>>2];F[a+4>>2]=f;c=F[a>>2];F[a>>2]=d;if((b|0)==(c|0)){break a}while(1){b=b-4|0;a=F[b>>2];F[b>>2]=0;if(a){$[F[F[a>>2]+4>>2]](a)}if((b|0)!=(c|0)){continue}break}break a}na();v()}oa();v()}F[a+8>>2]=e;F[a+4>>2]=f;F[a>>2]=b}if(c){ja(c)}}function Yd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=F[b+8>>2];d=F[b+12>>2];g=d;d=F[b+20>>2];k=d;h=F[b+16>>2];c=h+4|0;d=c>>>0<4?d+1|0:d;i=c;a:{if(c>>>0>e>>>0&(d|0)>=(g|0)|(d|0)>(g|0)){break a}j=F[b>>2];c=j+h|0;f=G[c|0]|G[c+1|0]<<8|(G[c+2|0]<<16|G[c+3|0]<<24);F[b+16>>2]=i;F[b+20>>2]=d;c=e;e=k;d=h+8|0;e=d>>>0<8?e+1|0:e;if(c>>>0>>0&(e|0)>=(g|0)|(e|0)>(g|0)){break a}c=i+j|0;c=G[c|0]|G[c+1|0]<<8|(G[c+2|0]<<16|G[c+3|0]<<24);F[b+16>>2]=d;F[b+20>>2]=e;if((c|0)<(f|0)){break a}F[a+16>>2]=c;F[a+12>>2]=f;d=(c>>31)-((f>>31)+(c>>>0>>0)|0)|0;e=c-f|0;if(!d&e>>>0>2147483646|d){break a}d=e+1|0;F[a+20>>2]=d;e=d>>>1|0;F[a+24>>2]=e;F[a+28>>2]=0-e;if(!(d&1)){F[a+24>>2]=e-1}l=Aa(a+112|0,b)}return l|0}function Wc(a,b){var c=0,d=0,e=0,f=0;d=-1;e=-1;f=-1;a:{b:{if((b|0)==-1){break b}e=F[F[F[a+4>>2]+12>>2]+(b<<2)>>2];c=b+1|0;c=(c>>>0)%3|0?c:b-2|0;if((c|0)>=0){f=(c>>>0)/3|0;f=F[(F[F[a>>2]+96>>2]+L(f,12)|0)+(c-L(f,3)<<2)>>2]}c:{if((e|0)==-1){break c}c=((e>>>0)%3|0?-1:2)+e|0;if((c|0)<0){break c}d=(c>>>0)/3|0;d=F[(F[F[a>>2]+96>>2]+L(d,12)|0)+(c-L(d,3)<<2)>>2]}c=-1;if((d|0)!=(f|0)){break a}f=-1;d:{b=((b>>>0)%3|0?-1:2)+b|0;if((b|0)>=0){d=(b>>>0)/3|0;d=F[(F[F[a>>2]+96>>2]+L(d,12)|0)+(b-L(d,3)<<2)>>2];if((e|0)==-1){break b}break d}d=-1;if((e|0)!=-1){break d}break b}b=e+1|0;b=(b>>>0)%3|0?b:e-2|0;if((b|0)<0){break b}c=F[F[a>>2]+96>>2];a=(b>>>0)/3|0;f=F[(c+L(a,12)|0)+(b-L(a,3)<<2)>>2]}c=(d|0)!=(f|0)?-1:e}return c}function Fc(a,b){var c=0,d=0,e=0;c=Z+-64|0;Z=c;d=F[a>>2];e=F[d-4>>2];d=F[d-8>>2];F[c+32>>2]=0;F[c+36>>2]=0;F[c+40>>2]=0;F[c+44>>2]=0;F[c+48>>2]=0;F[c+52>>2]=0;D[c+55|0]=0;D[c+56|0]=0;D[c+57|0]=0;D[c+58|0]=0;D[c+59|0]=0;D[c+60|0]=0;D[c+61|0]=0;D[c+62|0]=0;F[c+24>>2]=0;F[c+28>>2]=0;F[c+20>>2]=0;F[c+16>>2]=11020;F[c+12>>2]=a;F[c+8>>2]=b;a=a+d|0;d=0;a:{if(La(e,b,0)){F[c+56>>2]=1;$[F[F[e>>2]+20>>2]](e,c+8|0,a,a,1,0);d=F[c+32>>2]==1?a:0;break a}$[F[F[e>>2]+24>>2]](e,c+8|0,a,1,0);b:{switch(F[c+44>>2]){case 0:d=F[c+48>>2]==1?F[c+36>>2]==1?F[c+40>>2]==1?F[c+28>>2]:0:0:0;break a;case 1:break b;default:break a}}if(F[c+32>>2]!=1){if(F[c+48>>2]|F[c+36>>2]!=1|F[c+40>>2]!=1){break a}}d=F[c+24>>2]}Z=c- -64|0;return d}function ma(a,b,c){var d=0,e=0,f=0,g=0;a:{if(!c){break a}D[a|0]=b;d=a+c|0;D[d-1|0]=b;if(c>>>0<3){break a}D[a+2|0]=b;D[a+1|0]=b;D[d-3|0]=b;D[d-2|0]=b;if(c>>>0<7){break a}D[a+3|0]=b;D[d-4|0]=b;if(c>>>0<9){break a}d=0-a&3;e=d+a|0;b=L(b&255,16843009);F[e>>2]=b;d=c-d&-4;c=d+e|0;F[c-4>>2]=b;if(d>>>0<9){break a}F[e+8>>2]=b;F[e+4>>2]=b;F[c-8>>2]=b;F[c-12>>2]=b;if(d>>>0<25){break a}F[e+24>>2]=b;F[e+20>>2]=b;F[e+16>>2]=b;F[e+12>>2]=b;F[c-16>>2]=b;F[c-20>>2]=b;F[c-24>>2]=b;F[c-28>>2]=b;g=e&4|24;c=d-g|0;if(c>>>0<32){break a}d=ki(b,0,1,1);f=_;b=e+g|0;while(1){F[b+24>>2]=d;F[b+28>>2]=f;F[b+16>>2]=d;F[b+20>>2]=f;F[b+8>>2]=d;F[b+12>>2]=f;F[b>>2]=d;F[b+4>>2]=f;b=b+32|0;c=c-32|0;if(c>>>0>31){continue}break}}return a}function ie(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=F[b+8>>2];e=F[b+12>>2];g=e;e=F[b+20>>2];k=e;h=F[b+16>>2];c=h+4|0;e=c>>>0<4?e+1|0:e;i=c;a:{if(c>>>0>d>>>0&(e|0)>=(g|0)|(e|0)>(g|0)){break a}j=F[b>>2];c=j+h|0;f=G[c|0]|G[c+1|0]<<8|(G[c+2|0]<<16|G[c+3|0]<<24);F[b+16>>2]=i;F[b+20>>2]=e;c=d;d=k;e=h+8|0;d=e>>>0<8?d+1|0:d;if(c>>>0>>0&(d|0)>=(g|0)|(d|0)>(g|0)){break a}c=i+j|0;c=G[c|0]|G[c+1|0]<<8|(G[c+2|0]<<16|G[c+3|0]<<24);F[b+16>>2]=e;F[b+20>>2]=d;if((c|0)<(f|0)){break a}F[a+16>>2]=c;F[a+12>>2]=f;d=(c>>31)-((f>>31)+(c>>>0>>0)|0)|0;b=c-f|0;if(!d&b>>>0>2147483646|d){break a}l=1;d=b+1|0;F[a+20>>2]=d;b=d>>>1|0;F[a+24>>2]=b;F[a+28>>2]=0-b;if(d&1){break a}F[a+24>>2]=b-1}return l|0}function Uc(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=Z-16|0;Z=d;f=F[a+24>>2];k=F[a+28>>2];a:{if((f|0)!=(k|0)){while(1){F[d+8>>2]=0;F[d>>2]=0;F[d+4>>2]=0;a=Sc(F[f>>2],b,d);g=G[d+11|0];h=g<<24>>24;i=3;b:{c:{d:{if(!a){break d}i=0;a=G[c+11|0];e=a<<24>>24;j=(h|0)<0?F[d+4>>2]:g;if((j|0)!=(((e|0)<0?F[c+4>>2]:a)|0)){break d}a=(e|0)<0?F[c>>2]:c;e=(h|0)<0;e:{if(!e){e=d;if(!h){break e}while(1){if(G[e|0]!=G[a|0]){break d}a=a+1|0;e=e+1|0;g=g-1|0;if(g){continue}break}break e}if(!j){break e}if(sa(e?F[d>>2]:d,a,j)){break c}}l=F[f>>2];i=1}if((h|0)>=0){break b}}ja(F[d>>2])}f:{switch(i|0){case 0:case 3:break f;default:break a}}f=f+4|0;if((k|0)!=(f|0)){continue}break}}l=0}Z=d+16|0;return l}function gb(a,b,c){var d=0,e=0,f=0,g=0,h=0,i=0;f=c-b|0;h=f>>2;d=F[a+8>>2];e=F[a>>2];if(h>>>0<=d-e>>2>>>0){d=F[a+4>>2];g=d-e|0;f=g+b|0;i=g>>2;g=i>>>0>>0?f:c;if((g|0)!=(b|0)){while(1){F[e>>2]=F[b>>2];e=e+4|0;b=b+4|0;if((g|0)!=(b|0)){continue}break}}if(h>>>0>i>>>0){if((c|0)!=(g|0)){while(1){F[d>>2]=F[f>>2];d=d+4|0;f=f+4|0;if((f|0)!=(c|0)){continue}break}}F[a+4>>2]=d;return}F[a+4>>2]=e;return}if(e){F[a+4>>2]=e;ja(e);F[a+8>>2]=0;F[a>>2]=0;F[a+4>>2]=0;d=0}a:{if((f|0)<0){break a}e=d>>>1|0;d=d>>>0>=2147483644?1073741823:e>>>0>h>>>0?e:h;if(d>>>0>=1073741824){break a}e=d<<2;d=ka(e);F[a>>2]=d;F[a+8>>2]=d+e;if((b|0)!=(c|0)){c=b;b=(f-4&-4)+4|0;d=la(d,c,b)+b|0}F[a+4>>2]=d;return}na();v()}function Ea(a,b,c){var d=0,e=0,f=0;e=Z-16|0;Z=e;F[a+4>>2]=0;a:{b:{if(!b){break b}f=F[a+8>>2];d=f<<5;c:{if(d>>>0>=b>>>0){F[a+4>>2]=b;break c}F[e+8>>2]=0;F[e>>2]=0;F[e+4>>2]=0;if((b|0)<0){break a}if(d>>>0<=1073741822){f=f<<6;d=b+31&-32;d=d>>>0>>0?f:d}else{d=2147483647}$a(e,d);f=F[a>>2];F[a>>2]=F[e>>2];F[e>>2]=f;d=F[a+4>>2];F[a+4>>2]=b;F[e+4>>2]=d;d=F[a+8>>2];F[a+8>>2]=F[e+8>>2];F[e+8>>2]=d;if(!f){break c}ja(f)}d=b>>>5|0;a=F[a>>2];if(G[c|0]){if(b>>>0>=32){ma(a,255,d<<2)}if((b&-32)==(b|0)){break b}a=a+(d<<2)|0;F[a>>2]=F[a>>2]|-1>>>32-(b&31);break b}if(b>>>0>=32){ma(a,0,d<<2)}if((b&-32)==(b|0)){break b}a=a+(d<<2)|0;F[a>>2]=F[a>>2]&(-1>>>32-(b&31)^-1)}Z=e+16|0;return}na();v()}function If(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=Z-32|0;Z=e;a:{b:{f=ya(c);if(f>>>0<2147483632){c:{d:{if(f>>>0>=11){a=(f|15)+1|0;g=ka(a);F[e+24>>2]=a|-2147483648;F[e+16>>2]=g;F[e+20>>2]=f;a=f+g|0;break d}D[e+27|0]=f;g=e+16|0;a=f+g|0;if(!f){break c}}la(g,c,f)}D[a|0]=0;c=ya(d);if(c>>>0>=2147483632){break b}e:{f:{if(c>>>0>=11){f=(c|15)+1|0;a=ka(f);F[e+8>>2]=f|-2147483648;F[e>>2]=a;F[e+4>>2]=c;g=a+c|0;break f}D[e+11|0]=c;g=c+e|0;a=e;if(!c){break e}}la(a,d,c)}D[g|0]=0;c=F[b+4>>2];a=-1;g:{if(!c){break g}c=Uc(c,e+16|0,e);a=-1;if(!c){break g}a=Pc(b,F[c+24>>2])}if(D[e+11|0]<0){ja(F[e>>2])}if(D[e+27|0]<0){ja(F[e+16>>2])}Z=e+32|0;break a}za();v()}za();v()}return a|0}function se(a,b){a=a|0;b=b|0;a=0;a:{switch(b|0){case 0:a=ka(20);F[a+12>>2]=-1;F[a+16>>2]=0;F[a+4>>2]=0;F[a+8>>2]=0;F[a>>2]=1920;return a|0;case 1:a=ka(24);F[a+12>>2]=-1;F[a+16>>2]=0;F[a+4>>2]=0;F[a+8>>2]=0;F[a>>2]=1920;F[a+20>>2]=0;F[a>>2]=2136;return a|0;case 2:a=ka(48);F[a+12>>2]=-1;F[a+16>>2]=0;F[a+4>>2]=0;F[a+8>>2]=0;F[a>>2]=1920;F[a+20>>2]=0;F[a>>2]=2136;F[a+24>>2]=1624;F[a>>2]=7948;F[a+32>>2]=0;F[a+36>>2]=0;F[a+28>>2]=-1;F[a+40>>2]=0;F[a+44>>2]=0;return a|0;case 3:a=ka(32);F[a+12>>2]=-1;F[a+16>>2]=0;F[a+4>>2]=0;F[a+8>>2]=0;F[a>>2]=1920;F[a+20>>2]=0;F[a>>2]=2136;F[a+24>>2]=1032;F[a>>2]=5812;F[a+28>>2]=-1;break;default:break a}}return a|0}function Be(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=F[b>>2];b=F[b+4>>2];d=F[F[a+8>>2]+40>>2];j=d;m=ka((d|0)<0?-1:d);i=b-f|0;e=1;a:{if((i|0)<4){break a}b=0;g=F[c+16>>2];k=d;f=g+d|0;d=0+F[c+20>>2]|0;d=f>>>0>>0?d+1|0:d;h=F[c+12>>2];e=0;if(I[c+8>>2]>>0&(d|0)>=(h|0)|(d|0)>(h|0)){break a}e=i>>2;i=(e|0)<=1?1:e;while(1){b:{g=la(m,F[c>>2]+g|0,j);F[c+16>>2]=f;F[c+20>>2]=d;la(F[F[F[a+8>>2]+64>>2]>>2]+b|0,g,j);l=l+1|0;if((i|0)==(l|0)){break b}b=b+j|0;d=n+F[c+20>>2]|0;g=F[c+16>>2];f=k+g|0;d=f>>>0>>0?d+1|0:d;h=F[c+12>>2];if((d|0)<=(h|0)&I[c+8>>2]>=f>>>0|(d|0)<(h|0)){continue}}break}e=(e|0)<=(l|0)}ja(m);return e|0}function mh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;F[b>>2]=1;f=b+8|0;c=F[b+8>>2];d=F[b+12>>2]-c|0;if(d>>>0<=4294967291){Db(f,d+4|0);c=F[f>>2]}c=c+d|0;d=F[a+4>>2];D[c|0]=d;D[c+1|0]=d>>>8;D[c+2|0]=d>>>16;D[c+3|0]=d>>>24;c=F[a+8>>2];if((c|0)!=F[a+12>>2]){d=0;while(1){g=(d<<2)+c|0;c=F[b+8>>2];e=F[b+12>>2]-c|0;if(e>>>0<=4294967291){Db(f,e+4|0);c=F[f>>2]}c=c+e|0;e=F[g>>2];D[c|0]=e;D[c+1|0]=e>>>8;D[c+2|0]=e>>>16;D[c+3|0]=e>>>24;d=d+1|0;c=F[a+8>>2];if(d>>>0>2]-c>>2>>>0){continue}break}}c=F[b+12>>2];b=F[b+8>>2];c=c-b|0;if(c>>>0<=4294967291){Db(f,c+4|0);b=F[f>>2]}b=b+c|0;a=F[a+20>>2];D[b|0]=a;D[b+1|0]=a>>>8;D[b+2|0]=a>>>16;D[b+3|0]=a>>>24}function mb(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;c=F[a+4>>2];if((c|0)!=F[a+8>>2]){e=F[b+4>>2];F[c>>2]=F[b>>2];F[c+4>>2]=e;F[c+8>>2]=F[b+8>>2];F[a+4>>2]=c+12;return}a:{g=F[a>>2];d=(c-g|0)/12|0;e=d+1|0;if(e>>>0<357913942){f=d<<1;f=d>>>0>=178956970?357913941:e>>>0>>0?f:e;if(f){if(f>>>0>=357913942){break a}e=ka(L(f,12))}else{e=0}d=e+L(d,12)|0;h=F[b+4>>2];F[d>>2]=F[b>>2];F[d+4>>2]=h;F[d+8>>2]=F[b+8>>2];b=d+12|0;if((c|0)!=(g|0)){while(1){c=c-12|0;h=F[c+4>>2];d=d-12|0;F[d>>2]=F[c>>2];F[d+4>>2]=h;F[d+8>>2]=F[c+8>>2];if((c|0)!=(g|0)){continue}break}c=F[a>>2]}F[a+8>>2]=e+L(f,12);F[a+4>>2]=b;F[a>>2]=d;if(c){ja(c)}return}na();v()}oa();v()}function ne(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;h=F[c+12>>2];f=h;e=F[c+20>>2];i=F[c+8>>2];g=F[c+16>>2];a:{if((f|0)<=(e|0)&i>>>0<=g>>>0|(e|0)>(f|0)){break a}j=F[c>>2];k=D[j+g|0];d=e;f=g+1|0;d=f?d:d+1|0;F[c+16>>2]=f;F[c+20>>2]=d;b:{if((k|0)==-2){break b}if((d|0)>=(h|0)&f>>>0>=i>>>0|(d|0)>(h|0)){break a}d=D[f+j|0];g=g+2|0;e=g>>>0<2?e+1|0:e;F[c+16>>2]=g;F[c+20>>2]=e;if((d-4&255)>>>0<251){break a}e=$[F[F[a>>2]+40>>2]](a,k,d)|0;d=F[a+20>>2];F[a+20>>2]=e;if(!d){break b}$[F[F[d>>2]+4>>2]](d)}d=F[a+20>>2];if(d){if(!($[F[F[a>>2]+28>>2]](a,d)|0)){break a}}l=$[F[F[a>>2]+36>>2]](a,b,c)|0}return l|0}function Bf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;a:{if(I[b+80>>2]>65535){break a}a=F[b+100>>2];b=F[b+96>>2];e=(a-b|0)/12|0;f=L(e,6);g=(f|0)==(c|0);if((a|0)==(b|0)|(c|0)!=(f|0)){break a}g=1;c=e>>>0<=1?1:e;i=c&1;a=0;if(e>>>0>=2){j=c&-2;c=0;while(1){f=L(a,6);h=f+d|0;e=b+L(a,12)|0;E[h>>1]=F[e>>2];E[(f|2)+d>>1]=F[e+4>>2];E[h+4>>1]=F[e+8>>2];f=a|1;e=L(f,6)+d|0;f=b+L(f,12)|0;E[e>>1]=F[f>>2];E[e+2>>1]=F[f+4>>2];E[e+4>>1]=F[f+8>>2];a=a+2|0;c=c+2|0;if((j|0)!=(c|0)){continue}break}}if(!i){break a}c=L(a,6)+d|0;a=b+L(a,12)|0;E[c>>1]=F[a>>2];E[c+2>>1]=F[a+4>>2];E[c+4>>1]=F[a+8>>2]}return g|0}function Gh(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=Z-32|0;Z=f;h=e>>>0>1073741823?-1:e<<2;h=ma(ka(h),0,h);g=F[b>>2];i=F[b+4>>2];k=F[h+4>>2];F[f+16>>2]=F[h>>2];F[f+20>>2]=k;F[f+8>>2]=g;F[f+12>>2]=i;i=a+8|0;Jb(f+24|0,i,f+16|0,f+8|0);F[c>>2]=F[f+24>>2];F[c+4>>2]=F[f+28>>2];if((d|0)>(e|0)){k=0-e<<2;a=e;while(1){g=a<<2;j=g+b|0;m=F[j>>2];j=F[j+4>>2];g=c+g|0;l=g+k|0;n=F[l+4>>2];F[f+16>>2]=F[l>>2];F[f+20>>2]=n;F[f+8>>2]=m;F[f+12>>2]=j;Jb(f+24|0,i,f+16|0,f+8|0);F[g>>2]=F[f+24>>2];F[g+4>>2]=F[f+28>>2];a=a+e|0;if((d|0)>(a|0)){continue}break}}ja(h);Z=f+32|0;return 1}function Sf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;a=Z-32|0;Z=a;F[a+24>>2]=0;F[a+28>>2]=0;a:{d=ya(c);if(d>>>0<2147483632){b:{c:{if(d>>>0>=11){e=(d|15)+1|0;f=ka(e);F[a+16>>2]=e|-2147483648;F[a+8>>2]=f;F[a+12>>2]=d;e=d+f|0;break c}D[a+19|0]=d;f=a+8|0;e=f+d|0;if(!d){break b}}la(f,c,d)}D[e|0]=0;c=b+4|0;b=Ya(b,a+8|0);d:{if((c|0)==(b|0)){break d}c=F[b+32>>2];b=F[b+28>>2];if((c-b|0)!=8){break d}c=G[b+4|0]|G[b+5|0]<<8|(G[b+6|0]<<16|G[b+7|0]<<24);F[a+24>>2]=G[b|0]|G[b+1|0]<<8|(G[b+2|0]<<16|G[b+3|0]<<24);F[a+28>>2]=c}g=K[a+24>>3];if(D[a+19|0]<0){ja(F[a+8>>2])}Z=a+32|0;break a}za();v()}return+g}function Gc(a,b,c,d,e,f,g){var h=0,i=0,j=0;h=Z-16|0;Z=h;if((b^-1)+2147483631>>>0>=c>>>0){if(G[a+11|0]>>>7|0){i=F[a>>2]}else{i=a}if(b>>>0<1073741799){F[h+12>>2]=b<<1;F[h>>2]=b+c;c=Z-16|0;Z=c;Z=c+16|0;c=h+12|0;c=F[(I[h>>2]>2]?c:h)>>2];if(c>>>0>=11){j=c+16&-16;c=j-1|0;c=(c|0)==11?j:c}else{c=10}c=c+1|0}else{c=2147483631}sb(h,c);c=F[h>>2];if(f){db(c,g,f)}g=d-e|0;if((d|0)!=(e|0)){db(c+f|0,e+i|0,g)}if((b|0)!=10){ja(i)}F[a>>2]=c;F[a+8>>2]=F[a+8>>2]&-2147483648|F[h+4>>2]&2147483647;F[a+8>>2]=F[a+8>>2]|-2147483648;b=a;a=f+g|0;F[b+4>>2]=a;D[h+12|0]=0;D[a+c|0]=G[h+12|0];Z=h+16|0;return}za();v()}function _c(a,b,c){var d=0,e=0,f=0,g=0;a:{f=b>>>0<1431655766&(b|c)>=0;b:{if(!f){break b}b=L(b,3);Xb(a,b,10224);Xb(a+12|0,b,10228);d=F[a+24>>2];c:{if(F[a+32>>2]-d>>2>>>0>=c>>>0){break c}if(c>>>0>=1073741824){break a}b=F[a+28>>2];e=c<<2;c=ka(e);e=c+e|0;g=c+(b-d&-4)|0;c=g;if((b|0)!=(d|0)){while(1){c=c-4|0;b=b-4|0;F[c>>2]=F[b>>2];if((b|0)!=(d|0)){continue}break}}F[a+32>>2]=e;F[a+28>>2]=g;F[a+24>>2]=c;if(!d){break c}ja(d)}F[a+80>>2]=0;F[a+84>>2]=0;b=F[a+76>>2];F[a+76>>2]=0;if(b){ja(b)}F[a+68>>2]=0;F[a+72>>2]=0;b=a- -64|0;a=F[b>>2];F[b>>2]=0;if(!a){break b}ja(a)}return f}na();v()}function yd(a){var b=0,c=0,d=0,e=0,f=0;f=1;c=F[a+140>>2];a:{if((c|0)<=0){break a}b=c<<4;d=ka(c>>>0>268435455?-1:b|4);F[d>>2]=c;d=d+4|0;c=d+b|0;b=d;while(1){F[b>>2]=0;F[b+4>>2]=0;D[b+5|0]=0;D[b+6|0]=0;D[b+7|0]=0;D[b+8|0]=0;D[b+9|0]=0;D[b+10|0]=0;D[b+11|0]=0;D[b+12|0]=0;b=b+16|0;if((c|0)!=(b|0)){continue}break}e=F[a+136>>2];F[a+136>>2]=d;if(e){c=e-4|0;d=F[c>>2];if(d){b=(d<<4)+e|0;while(1){b=b-16|0;if((e|0)!=(b|0)){continue}break}}ja(c)}b=0;if(F[a+140>>2]<=0){break a}while(1){f=Aa(F[a+136>>2]+(b<<4)|0,a);if(!f){break a}b=b+1|0;if((b|0)>2]){continue}break}}return f} +function Sd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=F[b+8>>2];c=F[b+12>>2];g=c;c=F[b+20>>2];i=c;h=F[b+16>>2];f=h+4|0;c=f>>>0<4?c+1|0:c;a:{if(d>>>0>>0&(c|0)>=(g|0)|(c|0)>(g|0)){break a}e=h+F[b>>2]|0;e=G[e|0]|G[e+1|0]<<8|(G[e+2|0]<<16|G[e+3|0]<<24);F[b+16>>2]=f;F[b+20>>2]=c;f=d;d=i;c=h+8|0;d=c>>>0<8?d+1|0:d;if(c>>>0>f>>>0&(d|0)>=(g|0)|(d|0)>(g|0)){break a}F[b+16>>2]=c;F[b+20>>2]=d;if(!(e&1)){break a}d=O(e)^31;if(d-1>>>0>28){break a}F[a+8>>2]=d+1;d=-2<>2]=c;F[a+12>>2]=d^-1;F[a+24>>2]=c>>1;J[a+20>>2]=M(2)/M(c|0);j=Aa(a+96|0,b)}return j|0}function bc(a,b){var c=0;c=F[b+4>>2];F[a>>2]=F[b>>2];F[a+4>>2]=c;c=F[b+60>>2];F[a+56>>2]=F[b+56>>2];F[a+60>>2]=c;c=F[b+52>>2];F[a+48>>2]=F[b+48>>2];F[a+52>>2]=c;c=F[b+44>>2];F[a+40>>2]=F[b+40>>2];F[a+44>>2]=c;c=F[b+36>>2];F[a+32>>2]=F[b+32>>2];F[a+36>>2]=c;c=F[b+28>>2];F[a+24>>2]=F[b+24>>2];F[a+28>>2]=c;c=F[b+20>>2];F[a+16>>2]=F[b+16>>2];F[a+20>>2]=c;c=F[b+12>>2];F[a+8>>2]=F[b+8>>2];F[a+12>>2]=c;F[a+88>>2]=0;F[a+64>>2]=0;F[a+68>>2]=0;F[a+72>>2]=0;F[a+76>>2]=0;D[a+77|0]=0;D[a+78|0]=0;D[a+79|0]=0;D[a+80|0]=0;D[a+81|0]=0;D[a+82|0]=0;D[a+83|0]=0;D[a+84|0]=0;return a}function ac(a,b){var c=0,d=0,e=0,f=0,g=0;a:{if(F[a+64>>2]){break a}c=ka(32);F[c+16>>2]=0;F[c+20>>2]=0;F[c+8>>2]=0;F[c>>2]=0;F[c+4>>2]=0;F[c+24>>2]=0;F[c+28>>2]=0;d=F[a+64>>2];F[a+64>>2]=c;if(!d){break a}c=F[d>>2];if(c){F[d+4>>2]=c;ja(c)}ja(d)}d=F[a+64>>2];c=F[a+28>>2]-1|0;if(c>>>0<=10){c=F[(c<<2)+10148>>2]}else{c=-1}c=L(c,G[a+24|0]);f=c>>31;g=md(d,0,ki(c,f,b,0),_);if(g){d=F[a+64>>2];F[a>>2]=d;e=F[d+20>>2];F[a+8>>2]=F[d+16>>2];F[a+12>>2]=e;e=F[d+24>>2];d=F[d+28>>2];F[a+48>>2]=0;F[a+52>>2]=0;F[a+40>>2]=c;F[a+44>>2]=f;F[a+16>>2]=e;F[a+20>>2]=d;F[a+80>>2]=b}return g}function Af(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;a=F[b+100>>2];b=F[b+96>>2];h=a-b|0;a:{if((h|0)!=(c|0)|(a|0)==(b|0)){break a}g=(c|0)/12|0;e=g>>>0<=1?1:g;j=e&1;a=0;if(g>>>0>=2){k=e&-2;g=0;while(1){e=L(a,12);i=e+d|0;f=b+e|0;F[i>>2]=F[f>>2];F[(e|4)+d>>2]=F[f+4>>2];F[i+8>>2]=F[f+8>>2];f=L(a|1,12);e=f+d|0;f=b+f|0;F[e>>2]=F[f>>2];F[e+4>>2]=F[f+4>>2];F[e+8>>2]=F[f+8>>2];a=a+2|0;g=g+2|0;if((k|0)!=(g|0)){continue}break}}if(!j){break a}e=d;d=L(a,12);a=e+d|0;b=b+d|0;F[a>>2]=F[b>>2];F[a+4>>2]=F[b+4>>2];F[a+8>>2]=F[b+8>>2]}return(c|0)==(h|0)|0}function Kh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=F[b+8>>2];d=F[b+12>>2];g=d;d=F[b+20>>2];i=d;h=F[b+16>>2];f=h+4|0;d=f>>>0<4?d+1|0:d;a:{if(c>>>0>>0&(d|0)>=(g|0)|(d|0)>(g|0)){break a}e=h+F[b>>2]|0;e=G[e|0]|G[e+1|0]<<8|(G[e+2|0]<<16|G[e+3|0]<<24);F[b+16>>2]=f;F[b+20>>2]=d;f=c;c=i;d=h+8|0;c=d>>>0<8?c+1|0:c;if(d>>>0>f>>>0&(c|0)>=(g|0)|(c|0)>(g|0)){break a}F[b+16>>2]=d;F[b+20>>2]=c;if(!(e&1)){break a}b=O(e)^31;if(b-1>>>0>28){break a}j=1;F[a+8>>2]=b+1;b=-2<>2]=c;F[a+12>>2]=b^-1;F[a+24>>2]=c>>1;J[a+20>>2]=M(2)/M(c|0)}return j|0}function Ya(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;f=a+4|0;a=F[a+4>>2];a:{b:{if(!a){break b}d=G[b+11|0];c=d<<24>>24<0;g=c?F[b>>2]:b;d=c?F[b+4>>2]:d;b=f;while(1){e=G[a+27|0];c=e<<24>>24<0;e=c?F[a+20>>2]:e;h=e>>>0>d>>>0;i=h?d:e;c:{if(i){c=sa(c?F[a+16>>2]:a+16|0,g,i);if(c){break c}}c=d>>>0>e>>>0?-1:h}c=(c|0)<0;b=c?b:a;a=F[(c?a+4|0:a)>>2];if(a){continue}break}if((b|0)==(f|0)){break b}c=G[b+27|0];a=c<<24>>24<0;d:{c=a?F[b+20>>2]:c;e=c>>>0>>0?c:d;if(e){a=sa(g,a?F[b+16>>2]:b+16|0,e);if(a){break d}}if(c>>>0>d>>>0){break b}break a}if((a|0)>=0){break a}}b=f}return b}function Oe(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;if(La(a,F[b+8>>2],e)){if(!(F[b+28>>2]==1|F[b+4>>2]!=(c|0))){F[b+28>>2]=d}return}a:{if(La(a,F[b>>2],e)){if(!(F[b+16>>2]!=(c|0)&F[b+20>>2]!=(c|0))){if((d|0)!=1){break a}F[b+32>>2]=1;return}F[b+32>>2]=d;b:{if(F[b+44>>2]==4){break b}E[b+52>>1]=0;a=F[a+8>>2];$[F[F[a>>2]+20>>2]](a,b,c,c,1,e);if(G[b+53|0]){F[b+44>>2]=3;if(!G[b+52|0]){break b}break a}F[b+44>>2]=4}F[b+20>>2]=c;F[b+40>>2]=F[b+40>>2]+1;if(F[b+36>>2]!=1|F[b+24>>2]!=2){break a}D[b+54|0]=1;return}a=F[a+8>>2];$[F[F[a>>2]+24>>2]](a,b,c,d,e)}}function Ig(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;f=ka(64);c=ka(12);F[c+8>>2]=F[F[a+4>>2]+80>>2];F[c>>2]=9968;F[c+4>>2]=0;f=yc(f,c);a:{b:{if((b|0)<0){c=f;break b}h=a+8|0;c=F[a+12>>2];e=F[a+8>>2];g=c-e>>2;c:{if((g|0)>(b|0)){break c}d=b+1|0;if(b>>>0>=g>>>0){Pb(h,d-g|0);break c}if(d>>>0>=g>>>0){break c}e=e+(d<<2)|0;if((e|0)!=(c|0)){while(1){c=c-4|0;d=F[c>>2];F[c>>2]=0;if(d){$[F[F[d>>2]+4>>2]](d)}if((c|0)!=(e|0)){continue}break}}F[a+12>>2]=e}a=F[h>>2]+(b<<2)|0;c=F[a>>2];F[a>>2]=f;if(!c){break a}}$[F[F[c>>2]+4>>2]](c)}return(b^-1)>>>31|0}function we(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;c=F[a+60>>2];a:{if(!c){break a}F[c+4>>2]=a+48;if(!($[F[F[c>>2]+12>>2]](c)|0)){break a}b:{c=$[F[F[a>>2]+24>>2]](a)|0;if((c|0)<=0){break b}while(1){c:{f=F[($[F[F[a>>2]+28>>2]](a)|0)+4>>2];g=$[F[F[a>>2]+20>>2]](a,d)|0;e=F[a+60>>2];if(!($[F[F[e>>2]+8>>2]](e,F[F[f+8>>2]+(g<<2)>>2])|0)){break c}d=d+1|0;if((c|0)!=(d|0)){continue}break b}break}return 0}d=0;if(!($[F[F[a>>2]+36>>2]](a,b)|0)){break a}if(!($[F[F[a>>2]+40>>2]](a,b)|0)){break a}d=$[F[F[a>>2]+44>>2]](a)|0}return d|0}function Id(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=F[a+216>>2];if((c|0)!=F[a+220>>2]){while(1){a:{c=F[L(e,144)+c>>2];if((c|0)<0){break a}d=F[a+4>>2];f=F[d+8>>2];if((c|0)>=F[d+12>>2]-f>>2){break a}d=0;c=F[(c<<2)+f>>2];if(($[F[F[c>>2]+24>>2]](c)|0)<=0){break a}while(1){if(($[F[F[c>>2]+20>>2]](c,d)|0)!=(b|0)){d=d+1|0;if(($[F[F[c>>2]+24>>2]](c)|0)>(d|0)){continue}break a}break}a=F[a+216>>2]+L(e,144)|0;return(G[a+100|0]?a+4|0:0)|0}e=e+1|0;c=F[a+216>>2];if(e>>>0<(F[a+220>>2]-c|0)/144>>>0){continue}break}}return 0}function nd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=F[a+8>>2];d=F[a+4>>2];if(c-d>>2>>>0>=b>>>0){if(b){b=b<<2;d=ma(d,0,b)+b|0}F[a+4>>2]=d;return}a:{f=F[a>>2];g=d-f>>2;e=g+b|0;if(e>>>0<1073741824){c=c-f|0;h=c>>>1|0;e=c>>>0>=2147483644?1073741823:e>>>0>>0?h:e;if(e){if(e>>>0>=1073741824){break a}i=ka(e<<2)}c=(g<<2)+i|0;b=b<<2;b=ma(c,0,b)+b|0;if((d|0)!=(f|0)){while(1){c=c-4|0;d=d-4|0;F[c>>2]=F[d>>2];if((d|0)!=(f|0)){continue}break}}F[a+8>>2]=(e<<2)+i;F[a+4>>2]=b;F[a>>2]=c;if(f){ja(f)}return}na();v()}oa();v()}function bb(a){var b=0,c=0,d=0,e=0,f=0;d=F[a+8>>2];a:{if(G[d+84|0]){break a}b=F[a+16>>2];if(!b|!G[b+84|0]){break a}c=F[d+72>>2];e=F[d+68>>2];D[b+84|0]=0;c=c-e>>2;f=F[b+68>>2];e=F[b+72>>2]-f>>2;b:{if(c>>>0>e>>>0){ab(b+68|0,c-e|0,2004);d=F[a+8>>2];break b}if(c>>>0>=e>>>0){break b}F[b+72>>2]=f+(c<<2)}if(G[d+84|0]){break a}c=F[d+68>>2];if((c|0)==F[d+72>>2]){break a}e=F[F[a+16>>2]+68>>2];b=0;while(1){f=b<<2;F[f+e>>2]=F[c+f>>2];b=b+1|0;c=F[d+68>>2];if(b>>>0>2]-c>>2>>>0){continue}break}}return F[a+16>>2]}function Lf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;e=Z+-64|0;Z=e;f=Ja(e+8|0);F[f+16>>2]=0;F[f+20>>2]=0;F[f>>2]=b;F[f+8>>2]=c;F[f+12>>2]=0;b=e+48|0;Pd(b,a,f,d);F[a+24>>2]=F[e+48>>2];f=a+24|0;a:{if((f|0)==(b|0)){break a}b=a+28|0;c=e+48|4;g=G[e+63|0];d=g<<24>>24;if(D[a+39|0]>=0){if((d|0)>=0){a=F[c+4>>2];F[b>>2]=F[c>>2];F[b+4>>2]=a;F[b+8>>2]=F[c+8>>2];break a}qb(b,F[e+52>>2],F[e+56>>2]);break a}a=(d|0)<0;rb(b,a?F[e+52>>2]:c,a?F[e+56>>2]:g)}if(D[e+63|0]<0){ja(F[e+52>>2])}Z=e- -64|0;return f|0}function Jf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;a=Z-32|0;Z=a;a:{d=ya(c);if(d>>>0<2147483632){b:{c:{if(d>>>0>=11){e=(d|15)+1|0;f=ka(e);F[a+24>>2]=e|-2147483648;F[a+16>>2]=f;F[a+20>>2]=d;e=d+f|0;break c}D[a+27|0]=d;f=a+16|0;e=f+d|0;if(!d){break b}}la(f,c,d)}D[e|0]=0;D[a+4|0]=0;F[a>>2]=1701667182;D[a+11|0]=4;d=F[b+4>>2];c=-1;d:{if(!d){break d}d=Uc(d,a,a+16|0);c=-1;if(!d){break d}c=Pc(b,F[d+24>>2])}b=c;if(D[a+11|0]<0){ja(F[a>>2])}if(D[a+27|0]<0){ja(F[a+16>>2])}Z=a+32|0;break a}za();v()}return b|0}function Hd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=F[a+216>>2];if((c|0)!=F[a+220>>2]){while(1){a:{c=F[L(e,144)+c>>2];if((c|0)<0){break a}d=F[a+4>>2];f=F[d+8>>2];if((c|0)>=F[d+12>>2]-f>>2){break a}d=0;c=F[(c<<2)+f>>2];if(($[F[F[c>>2]+24>>2]](c)|0)<=0){break a}while(1){if(($[F[F[c>>2]+20>>2]](c,d)|0)!=(b|0)){d=d+1|0;if(($[F[F[c>>2]+24>>2]](c)|0)>(d|0)){continue}break a}break}return(F[a+216>>2]+L(e,144)|0)+104|0}e=e+1|0;c=F[a+216>>2];if(e>>>0<(F[a+220>>2]-c|0)/144>>>0){continue}break}}return a+184|0}function Uf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0;d=Z-16|0;Z=d;F[d+12>>2]=0;a:{e=ya(c);if(e>>>0<2147483632){b:{c:{if(e>>>0>=11){f=(e|15)+1|0;a=ka(f);F[d+8>>2]=f|-2147483648;F[d>>2]=a;F[d+4>>2]=e;f=a+e|0;break c}D[d+11|0]=e;f=d+e|0;a=d;if(!e){break b}}la(a,c,e)}D[f|0]=0;a=Ya(b,d);d:{if((a|0)==(b+4|0)){break d}b=F[a+32>>2];a=F[a+28>>2];if((b-a|0)!=4){break d}F[d+12>>2]=G[a|0]|G[a+1|0]<<8|(G[a+2|0]<<16|G[a+3|0]<<24)}a=F[d+12>>2];if(D[d+11|0]<0){ja(F[d>>2])}Z=d+16|0;break a}za();v()}return a|0}function Mf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;d=Z+-64|0;Z=d;e=Ja(d+8|0);F[e+16>>2]=0;F[e+20>>2]=0;F[e>>2]=b;F[e+8>>2]=c;F[e+12>>2]=0;b=d+48|0;Od(b);F[a+24>>2]=F[d+48>>2];f=a+24|0;a:{if((b|0)==(f|0)){break a}b=a+28|0;c=d+48|4;g=G[d+63|0];e=g<<24>>24;if(D[a+39|0]>=0){if((e|0)>=0){a=F[c+4>>2];F[b>>2]=F[c>>2];F[b+4>>2]=a;F[b+8>>2]=F[c+8>>2];break a}qb(b,F[d+52>>2],F[d+56>>2]);break a}a=(e|0)<0;rb(b,a?F[d+52>>2]:c,a?F[d+56>>2]:g)}if(D[d+63|0]<0){ja(F[d+52>>2])}Z=d- -64|0;return f|0}function Ce(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;e=1;a:{if(($[F[F[b>>2]+20>>2]](b)|0)<=0){break a}while(1){e=0;d=Qc(F[F[a+4>>2]+4>>2],$[F[F[b>>2]+24>>2]](b,f)|0);if((d|0)==-1){break a}g=F[a+4>>2];c=0;b:{if((d|0)<0){break b}h=F[g+4>>2];if((d|0)>=F[h+12>>2]-F[h+8>>2]>>2){break b}c=F[F[g+8>>2]+(F[F[g+20>>2]+(d<<2)>>2]<<2)>>2];c=$[F[F[c>>2]+32>>2]](c,d)|0}if(!c){break a}if(!($[F[F[b>>2]+28>>2]](b,c)|0)){break a}e=1;f=f+1|0;if(($[F[F[b>>2]+20>>2]](b)|0)>(f|0)){continue}break}}return e|0}function Db(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;a:{c=F[a+4>>2];e=F[a>>2];d=c-e|0;b:{if(d>>>0>>0){g=b-d|0;f=F[a+8>>2];if(g>>>0<=f-c>>>0){h=a,i=ma(c,0,g)+g|0,F[h+4>>2]=i;break b}if((b|0)<0){break a}c=f-e|0;f=c<<1;c=c>>>0>=1073741823?2147483647:b>>>0>>0?f:b;f=ka(c);ma(f+d|0,0,g);d=pa(f,e,d);F[a+8>>2]=d+c;F[a+4>>2]=b+d;F[a>>2]=d;if(!e){break b}ja(e);break b}if(b>>>0>=d>>>0){break b}F[a+4>>2]=b+e}b=F[a+28>>2];c=b;d=b+1|0;b=F[a+24>>2]+1|0;e=b?c:d;F[a+24>>2]=b;F[a+28>>2]=e;return}na();v()}function Ma(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;e=F[a+4>>2];if((e|0)!=F[a+8>>2]){F[e>>2]=F[b>>2];F[a+4>>2]=e+4;return}a:{g=F[a>>2];f=e-g|0;c=f>>2;d=c+1|0;if(d>>>0<1073741824){h=c<<2;c=f>>>1|0;c=f>>>0>=2147483644?1073741823:c>>>0>d>>>0?c:d;if(c){if(c>>>0>=1073741824){break a}f=ka(c<<2)}else{f=0}d=h+f|0;F[d>>2]=F[b>>2];b=d+4|0;if((e|0)!=(g|0)){while(1){d=d-4|0;e=e-4|0;F[d>>2]=F[e>>2];if((e|0)!=(g|0)){continue}break}}F[a+8>>2]=f+(c<<2);F[a+4>>2]=b;F[a>>2]=d;if(g){ja(g)}return}na();v()}oa();v()}function va(a){F[a>>2]=-1;F[a+4>>2]=0;F[a+8>>2]=0;F[a+32>>2]=0;F[a+36>>2]=0;D[a+28|0]=1;F[a+20>>2]=0;F[a+24>>2]=0;F[a+12>>2]=0;F[a+16>>2]=0;F[a+40>>2]=0;F[a+44>>2]=0;F[a+48>>2]=0;F[a+52>>2]=0;F[a+56>>2]=0;F[a+60>>2]=0;F[a+64>>2]=0;F[a+68>>2]=0;F[a+76>>2]=0;F[a+80>>2]=0;F[a+84>>2]=0;F[a+88>>2]=0;F[a+92>>2]=0;F[a+96>>2]=0;F[a+72>>2]=a+4;F[a+104>>2]=0;F[a+108>>2]=0;D[a+100|0]=1;F[a+112>>2]=0;F[a+116>>2]=0;F[a+120>>2]=0;F[a+124>>2]=0;F[a+128>>2]=0;F[a+132>>2]=0;F[a+136>>2]=0;F[a+140>>2]=0}function Hb(a,b){var c=0,d=0,e=0,f=0;d=F[a+12>>2];c=F[a+16>>2]-d>>2;a:{if(c>>>0>>0){qa(a+12|0,b-c|0);break a}if(b>>>0>=c>>>0){break a}F[a+16>>2]=d+(b<<2)}b:{c=F[a>>2];c:{if(F[a+8>>2]-c>>2>>>0>=b>>>0){break c}if(b>>>0>=1073741824){break b}d=F[a+4>>2];e=b<<2;b=ka(e);e=b+e|0;f=b+(d-c&-4)|0;b=f;if((c|0)!=(d|0)){while(1){b=b-4|0;d=d-4|0;F[b>>2]=F[d>>2];if((c|0)!=(d|0)){continue}break}}F[a+8>>2]=e;F[a+4>>2]=f;F[a>>2]=b;if(!c){break c}ja(c)}return}na();v()}function tb(a){a=a|0;var b=0,c=0,d=0;F[a>>2]=10300;b=F[a+68>>2];if(b){F[a+72>>2]=b;ja(b)}b=F[a+56>>2];if(b){F[a+60>>2]=b;ja(b)}b=F[a+44>>2];if(b){F[a+48>>2]=b;ja(b)}b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}b=F[a+20>>2];if(b){F[a+24>>2]=b;ja(b)}b=F[a+8>>2];if(b){d=b;c=F[a+12>>2];if((b|0)!=(c|0)){while(1){c=c-4|0;d=F[c>>2];F[c>>2]=0;if(d){xa(d)}if((b|0)!=(c|0)){continue}break}d=F[a+8>>2]}F[a+12>>2]=b;ja(d)}b=F[a+4>>2];F[a+4>>2]=0;if(b){ic(b)}return a|0}function qa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;e=F[a+8>>2];c=F[a+4>>2];if(e-c>>2>>>0>=b>>>0){if(b){b=b<<2;c=ma(c,0,b)+b|0}F[a+4>>2]=c;return}a:{f=c;c=F[a>>2];g=f-c|0;h=g>>2;d=h+b|0;if(d>>>0<1073741824){e=e-c|0;f=e>>>1|0;d=e>>>0>=2147483644?1073741823:d>>>0>>0?f:d;if(d){if(d>>>0>=1073741824){break a}i=ka(d<<2)}b=b<<2;e=ma((h<<2)+i|0,0,b);f=d<<2;d=pa(i,c,g);F[a+8>>2]=f+d;F[a+4>>2]=b+e;F[a>>2]=d;if(c){ja(c)}return}na();v()}oa();v()}function gc(a,b){var c=0,d=0,e=0,f=0;c=a+4|0;a=Ya(a,b);a:{if((c|0)==(a|0)){break a}b=a+28|0;b=D[a+39|0]<0?F[b>>2]:b;while(1){a=b;b=a+1|0;c=D[a|0];if((c|0)==32|c-9>>>0<5){continue}break}b:{c:{d:{c=D[a|0];switch(c-43|0){case 0:break c;case 2:break d;default:break b}}e=1}c=D[b|0];a=b}if(c-48>>>0<10){while(1){d=(L(d,10)-D[a|0]|0)+48|0;b=D[a+1|0];a=a+1|0;if(b-48>>>0<10){continue}break}}a=e?d:0-d|0;if((a|0)==-1){break a}f=(a|0)!=0}return f}function Qa(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;a=F[a>>2];c=F[a+4>>2];e=F[a+8>>2];if(c>>>0>>0){F[c>>2]=F[b>>2];F[a+4>>2]=c+4;return}a:{d=c;c=F[a>>2];g=d-c|0;d=g>>2;f=d+1|0;if(f>>>0<1073741824){h=d<<2;e=e-c|0;d=e>>>1|0;f=e>>>0>=2147483644?1073741823:f>>>0>>0?d:f;if(f){if(f>>>0>=1073741824){break a}e=ka(f<<2)}else{e=0}d=h+e|0;F[d>>2]=F[b>>2];b=pa(e,c,g);F[a+8>>2]=b+(f<<2);F[a+4>>2]=d+4;F[a>>2]=b;if(c){ja(c)}return}na();v()}oa();v()}function db(a,b,c){var d=0,e=0,f=0,g=0,h=0;f=Z-16|0;Z=f;d=Z-32|0;Z=d;e=Z-16|0;Z=e;F[e+12>>2]=b;F[e+8>>2]=b+c;F[d+24>>2]=F[e+12>>2];F[d+28>>2]=F[e+8>>2];Z=e+16|0;c=Z-16|0;Z=c;h=F[d+28>>2];e=F[d+24>>2];g=h-e|0;if((e|0)!=(h|0)){pa(a,e,g)}F[c+12>>2]=e+g;F[c+8>>2]=a+g;F[d+16>>2]=F[c+12>>2];F[d+20>>2]=F[c+8>>2];Z=c+16|0;F[d+12>>2]=(F[d+16>>2]-b|0)+b;F[d+8>>2]=(F[d+20>>2]-a|0)+a;F[f+8>>2]=F[d+12>>2];F[f+12>>2]=F[d+8>>2];Z=d+32|0;Z=f+16|0}function _a(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0;e=F[a+8>>2];c=F[a+4>>2];if(e-c>>3>>>0>=b>>>0){if(b){b=b<<3;c=ma(c,0,b)+b|0}F[a+4>>2]=c;return}a:{f=c;c=F[a>>2];g=f-c|0;h=g>>3;d=h+b|0;if(d>>>0<536870912){e=e-c|0;f=e>>>2|0;d=e>>>0>=2147483640?536870911:d>>>0>>0?f:d;if(d){if(d>>>0>=536870912){break a}i=ka(d<<3)}b=b<<3;e=ma((h<<3)+i|0,0,b);f=d<<3;d=pa(i,c,g);F[a+8>>2]=f+d;F[a+4>>2]=b+e;F[a>>2]=d;if(c){ja(c)}return}na();v()}oa();v()}function re(a){a=a|0;var b=0,c=0,d=0;F[a>>2]=2016;b=F[a+60>>2];F[a+60>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}b=F[a+48>>2];if(b){F[a+52>>2]=b;ja(b)}d=F[a+36>>2];if(d){c=F[a+40>>2];b=d;if((c|0)!=(b|0)){while(1){c=c-4|0;b=F[c>>2];F[c>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}b=F[a+36>>2]}F[a+40>>2]=d;ja(b)}F[a>>2]=1776;b=F[a+16>>2];if(b){F[a+20>>2]=b;ja(b)}b=F[a+4>>2];if(b){F[a+8>>2]=b;ja(b)}return a|0}function qe(a){a=a|0;var b=0,c=0,d=0;F[a>>2]=2016;b=F[a+60>>2];F[a+60>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}b=F[a+48>>2];if(b){F[a+52>>2]=b;ja(b)}d=F[a+36>>2];if(d){c=F[a+40>>2];b=d;if((c|0)!=(b|0)){while(1){c=c-4|0;b=F[c>>2];F[c>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}b=F[a+36>>2]}F[a+40>>2]=d;ja(b)}F[a>>2]=1776;b=F[a+16>>2];if(b){F[a+20>>2]=b;ja(b)}b=F[a+4>>2];if(b){F[a+8>>2]=b;ja(b)}ja(a)}function Eg(a){a=a|0;var b=0,c=0,d=0,e=0,f=0;a:{b=F[a+8>>2];b:{if((b|0)<0){break b}c=F[a+4>>2];e=F[c>>2];d=F[c+4>>2]-e>>2;c:{if(d>>>0>>0){nd(c,b-d|0);f=F[a+8>>2];break c}f=b;if(b>>>0>=d>>>0){break c}F[c+4>>2]=e+(b<<2);f=b}d=f;if((d|0)<=0){break b}a=F[a+4>>2];c=F[a>>2];e=F[a+4>>2]-c>>2;a=0;while(1){if((a|0)==(e|0)){break a}F[c+(a<<2)>>2]=a;a=a+1|0;if((d|0)!=(a|0)){continue}break}}return(b^-1)>>>31|0}ta();v()}function fh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;d=Z-16|0;Z=d;e=F[a+4>>2];a:{if((e|0)==-1){break a}c=F[b+20>>2];if(!!F[b+16>>2]&(c|0)>=0|(c|0)>0){break a}pb(b,F[b+4>>2],F[a+8>>2],F[a+12>>2]);c=F[b+20>>2];if(!!F[b+16>>2]&(c|0)>=0|(c|0)>0){break a}pb(b,F[b+4>>2],a+20|0,a+24|0);c=F[b+20>>2];f=F[b+16>>2];D[d+15|0]=F[a+4>>2];if(!!f&(c|0)>=0|(c|0)>0){break a}pb(b,F[b+4>>2],d+15|0,d+16|0)}Z=d+16|0;return(e|0)!=-1|0}function kd(a,b){var c=0,d=0,e=0,f=0,g=0,h=0;e=F[a+8>>2];c=F[a+4>>2];if(e-c>>1>>>0>=b>>>0){if(b){b=b<<1;c=ma(c,0,b)+b|0}F[a+4>>2]=c;return}a:{f=c;c=F[a>>2];g=f-c|0;f=g>>1;d=f+b|0;if((d|0)>=0){e=e-c|0;d=e>>>0>=2147483646?2147483647:d>>>0>>0?e:d;if(d){if((d|0)<0){break a}h=ka(d<<1)}b=b<<1;e=ma((f<<1)+h|0,0,b);f=d<<1;d=pa(h,c,g);F[a+8>>2]=f+d;F[a+4>>2]=b+e;F[a>>2]=d;if(c){ja(c)}return}na();v()}oa();v()}function of(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=Z-16|0;Z=d;Pd(d,a,b,c);F[a+24>>2]=F[d>>2];e=a+24|0;a:{if((e|0)==(d|0)){break a}b=a+28|0;c=d|4;f=G[d+15|0];g=f<<24>>24;if(D[a+39|0]>=0){if((g|0)>=0){a=F[c+4>>2];F[b>>2]=F[c>>2];F[b+4>>2]=a;F[b+8>>2]=F[c+8>>2];break a}qb(b,F[d+4>>2],F[d+8>>2]);break a}a=(g|0)<0;rb(b,a?F[d+4>>2]:c,a?F[d+8>>2]:f)}if(D[d+15|0]<0){ja(F[d+4>>2])}Z=d+16|0;return e|0}function ra(a,b,c){var d=0,e=0,f=0,g=0;e=Z-16|0;Z=e;a:{b:{if(c>>>0<11){d=a;D[a+11|0]=G[a+11|0]&128|c;D[a+11|0]=G[a+11|0]&127;break b}if(c>>>0>2147483631){break a}g=e+8|0;if(c>>>0>=11){f=c+16&-16;d=f-1|0;d=(d|0)==11?f:d}else{d=10}sb(g,d+1|0);d=F[e+8>>2];F[a>>2]=d;F[a+8>>2]=F[a+8>>2]&-2147483648|F[e+12>>2]&2147483647;F[a+8>>2]=F[a+8>>2]|-2147483648;F[a+4>>2]=c}db(d,b,c+1|0);Z=e+16|0;return}za();v()}function pf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;b=Z-16|0;Z=b;Od(b);F[a+24>>2]=F[b>>2];e=a+24|0;a:{if((e|0)==(b|0)){break a}c=a+28|0;d=b|4;f=G[b+15|0];g=f<<24>>24;if(D[a+39|0]>=0){if((g|0)>=0){a=F[d+4>>2];F[c>>2]=F[d>>2];F[c+4>>2]=a;F[c+8>>2]=F[d+8>>2];break a}qb(c,F[b+4>>2],F[b+8>>2]);break a}a=(g|0)<0;rb(c,a?F[b+4>>2]:d,a?F[b+8>>2]:f)}if(D[b+15|0]<0){ja(F[b+4>>2])}Z=b+16|0;return e|0}function Rf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=Z-16|0;Z=d;a:{e=ya(c);if(e>>>0<2147483632){b:{c:{if(e>>>0>=11){g=(e|15)+1|0;f=ka(g);F[d+8>>2]=g|-2147483648;F[d>>2]=f;F[d+4>>2]=e;g=e+f|0;break c}D[d+11|0]=e;g=d+e|0;f=d;if(!e){break b}}la(f,c,e)}D[g|0]=0;f=a+16|0;c=Sc(b,d,f);b=F[a+16>>2];a=D[a+27|0];if(D[d+11|0]<0){ja(F[d>>2])}Z=d+16|0;a=c?(a|0)<0?b:f:0;break a}za();v()}return a|0}function Yb(a,b){var c=0,d=0,e=0;c=F[a+4>>2];d=c+b|0;F[a+4>>2]=d;if(!((d-1^c-1)>>>0<32?c:0)){F[F[a>>2]+((d>>>0>=33?d-1>>>5|0:0)<<2)>>2]=0}a:{if(!b){break a}a=F[a>>2]+(c>>>3&536870908)|0;c=c&31;if(c){d=32-c|0;e=b>>>0>d>>>0?d:b;F[a>>2]=F[a>>2]&(-1<>>d-e^-1);b=b-e|0;a=a+4|0}c=b>>>5|0;if(b>>>0>=32){ma(a,0,c<<2)}if((b&-32)==(b|0)){break a}a=(c<<2)+a|0;F[a>>2]=F[a>>2]&(-1>>>32-(b&31)^-1)}}function ld(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>10){break a}d=F[c+20>>2];f=F[c+12>>2];e=F[c+16>>2];if((d|0)>=(f|0)&e>>>0>=I[c+8>>2]|(d|0)>(f|0)){break a}f=D[e+F[c>>2]|0];e=e+1|0;d=e?d:d+1|0;F[c+16>>2]=e;F[c+20>>2]=d;d=f;b:{if((d|0)<0){if(!ld(a+1|0,b,c)){break a}a=F[b>>2];d=d&127|a<<7;a=F[b+4>>2]<<7|a>>>25;break b}d=d&255;a=0}F[b>>2]=d;F[b+4>>2]=a;g=1}return g}function Sa(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>10){break a}d=F[c+20>>2];f=F[c+12>>2];e=F[c+16>>2];if((d|0)>=(f|0)&e>>>0>=I[c+8>>2]|(d|0)>(f|0)){break a}f=D[e+F[c>>2]|0];e=e+1|0;d=e?d:d+1|0;F[c+16>>2]=e;F[c+20>>2]=d;d=f;b:{if((d|0)<0){if(!Sa(a+1|0,b,c)){break a}a=F[b>>2];d=d&127|a<<7;a=F[b+4>>2]<<7|a>>>25;break b}d=d&255;a=0}F[b>>2]=d;F[b+4>>2]=a;g=1}return g}function Ne(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;if(La(a,F[b+8>>2],e)){if(!(F[b+28>>2]==1|F[b+4>>2]!=(c|0))){F[b+28>>2]=d}return}a:{if(!La(a,F[b>>2],e)){break a}if(!(F[b+16>>2]!=(c|0)&F[b+20>>2]!=(c|0))){if((d|0)!=1){break a}F[b+32>>2]=1;return}F[b+20>>2]=c;F[b+32>>2]=d;F[b+40>>2]=F[b+40>>2]+1;if(!(F[b+36>>2]!=1|F[b+24>>2]!=2)){D[b+54|0]=1}F[b+44>>2]=4}}function jg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;e=Z+-64|0;Z=e;d=$[F[F[a>>2]+44>>2]](a,b)|0;a=$[F[F[a>>2]+40>>2]](a,b)|0;f=kb(e);g=F[b+56>>2];h=d&255;i=a;a=a-1|0;if(a>>>0<=10){a=F[(a<<2)+10148>>2]}else{a=-1}d=L(a,d);cc(f,g,h,i,0,d,d>>31);a=bc(ka(96),f);ac(a,c);D[a+84|0]=1;F[a+72>>2]=F[a+68>>2];F[a+60>>2]=F[b+60>>2];Z=e- -64|0;return a|0}function rh(a){a=a|0;var b=0,c=0,d=0;F[a>>2]=8176;b=F[a+48>>2];F[a+48>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}F[a>>2]=10032;b=F[a+20>>2];if(b){F[a+24>>2]=b;ja(b)}d=F[a+8>>2];if(d){c=F[a+12>>2];b=d;if((c|0)!=(b|0)){while(1){c=c-4|0;b=F[c>>2];F[c>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}b=F[a+8>>2]}F[a+12>>2]=d;ja(b)}return a|0}function Dc(a,b,c,d){D[a+53|0]=1;a:{if(F[a+4>>2]!=(c|0)){break a}D[a+52|0]=1;c=F[a+16>>2];b:{if(!c){F[a+36>>2]=1;F[a+24>>2]=d;F[a+16>>2]=b;if((d|0)!=1){break a}if(F[a+48>>2]==1){break b}break a}if((b|0)==(c|0)){c=F[a+24>>2];if((c|0)==2){F[a+24>>2]=d;c=d}if(F[a+48>>2]!=1){break a}if((c|0)==1){break b}break a}F[a+36>>2]=F[a+36>>2]+1}D[a+54|0]=1}}function qh(a){a=a|0;var b=0,c=0,d=0;F[a>>2]=8176;b=F[a+48>>2];F[a+48>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}F[a>>2]=10032;b=F[a+20>>2];if(b){F[a+24>>2]=b;ja(b)}d=F[a+8>>2];if(d){c=F[a+12>>2];b=d;if((c|0)!=(b|0)){while(1){c=c-4|0;b=F[c>>2];F[c>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}b=F[a+8>>2]}F[a+12>>2]=d;ja(b)}ja(a)}function Se(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;e=Z+-64|0;Z=e;d=1;a:{if(La(a,b,0)){break a}d=0;if(!b){break a}b=Fc(b,11068);d=0;if(!b){break a}d=e+8|0;ma(d|4,0,52);F[e+56>>2]=1;F[e+20>>2]=-1;F[e+16>>2]=a;F[e+8>>2]=b;$[F[F[b>>2]+28>>2]](b,d,F[c>>2],1);a=F[e+32>>2];if((a|0)==1){F[c>>2]=F[e+24>>2]}d=(a|0)==1}Z=e- -64|0;return d|0}function Fd(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=Z-16|0;Z=d;F[a+4>>2]=b;b=F[b+64>>2];e=F[b>>2];b=F[b+4>>2];D[d+15|0]=0;Ea(a+24|0,(b-e>>2>>>0)/3|0,d+15|0);b=F[a+4>>2];e=F[b+56>>2];b=F[b+52>>2];D[d+14|0]=0;Ea(a+36|0,e-b>>2,d+14|0);b=F[c+12>>2];F[a+16>>2]=F[c+8>>2];F[a+20>>2]=b;b=F[c+4>>2];F[a+8>>2]=F[c>>2];F[a+12>>2]=b;Z=d+16|0}function zf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;a=Z-16|0;Z=a;f=D[b+24|0];e=F[2555];F[a+8>>2]=F[2554];F[a+12>>2]=e;e=F[2553];F[a>>2]=F[2552];F[a+4>>2]=e;e=lb(b,c,f,a);if(e){b=0;if(f){c=(f&255)<<2;b=ka(c);g=la(b,a,c)+c|0}c=F[d>>2];if(c){F[d+4>>2]=c;ja(c)}F[d+8>>2]=g;F[d+4>>2]=g;F[d>>2]=b}Z=a+16|0;return e|0}function wd(a,b){var c=0,d=0;a:{c=F[a+4>>2];d=F[a+8>>2];if((c|0)==d<<5){if((c+1|0)<0){break a}if(c>>>0<=1073741822){d=d<<6;c=(c&-32)+32|0;c=c>>>0>>0?d:c}else{c=2147483647}$a(a,c);c=F[a+4>>2]}F[a+4>>2]=c+1;d=1<>2]+(c>>>3&536870908)|0;if(G[b|0]){F[a>>2]=d|F[a>>2];return}F[a>>2]=F[a>>2]&(d^-1);return}na();v()}function Zb(a){var b=0;F[a>>2]=0;F[a+4>>2]=0;F[a+56>>2]=0;F[a+48>>2]=0;F[a+52>>2]=0;F[a+40>>2]=0;F[a+44>>2]=0;F[a+32>>2]=0;F[a+36>>2]=0;F[a+24>>2]=0;F[a+28>>2]=0;F[a+16>>2]=0;F[a+20>>2]=0;F[a+8>>2]=0;F[a+12>>2]=0;b=a- -64|0;F[b>>2]=0;F[b+4>>2]=0;F[a+72>>2]=0;F[a+76>>2]=0;F[a+80>>2]=0;F[a+84>>2]=0;F[a+60>>2]=a;return a}function ve(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;f=$[F[F[a>>2]+24>>2]](a)|0;c=1;a:{if((f|0)<=0){break a}d=F[F[a+36>>2]>>2];g=a+48|0;c=0;if(!($[F[F[d>>2]+16>>2]](d,g,b)|0)){break a}while(1){e=e+1|0;if((f|0)!=(e|0)){d=F[F[a+36>>2]+(e<<2)>>2];if($[F[F[d>>2]+16>>2]](d,g,b)|0){continue}}break}c=(e|0)>=(f|0)}return c|0}function ue(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;f=$[F[F[a>>2]+24>>2]](a)|0;c=1;a:{if((f|0)<=0){break a}d=F[F[a+36>>2]>>2];g=a+48|0;c=0;if(!($[F[F[d>>2]+20>>2]](d,g,b)|0)){break a}while(1){e=e+1|0;if((f|0)!=(e|0)){d=F[F[a+36>>2]+(e<<2)>>2];if($[F[F[d>>2]+20>>2]](d,g,b)|0){continue}}break}c=(e|0)>=(f|0)}return c|0}function bh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=Z-16|0;Z=d;F[a+4>>2]=b;e=F[b>>2];b=F[b+4>>2];D[d+15|0]=0;Ea(a+24|0,(b-e>>2>>>0)/3|0,d+15|0);b=F[a+4>>2];e=F[b+28>>2];b=F[b+24>>2];D[d+14|0]=0;Ea(a+36|0,e-b>>2,d+14|0);b=F[c+12>>2];F[a+16>>2]=F[c+8>>2];F[a+20>>2]=b;b=F[c+4>>2];F[a+8>>2]=F[c>>2];F[a+12>>2]=b;Z=d+16|0}function hb(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=F[c+20>>2];e=F[c+12>>2];f=F[c+16>>2];if((d|0)>=(e|0)&f>>>0>=I[c+8>>2]|(d|0)>(e|0)){break a}e=G[F[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;F[c+16>>2]=f;F[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!hb(a+1|0,b,c)){break a}e=d&127|F[b>>2]<<7}F[b>>2]=e;g=1}return g}function fb(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=F[c+20>>2];e=F[c+12>>2];f=F[c+16>>2];if((d|0)>=(e|0)&f>>>0>=I[c+8>>2]|(d|0)>(e|0)){break a}e=G[F[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;F[c+16>>2]=f;F[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!fb(a+1|0,b,c)){break a}e=d&127|F[b>>2]<<7}F[b>>2]=e;g=1}return g}function Wb(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=F[c+20>>2];e=F[c+12>>2];f=F[c+16>>2];if((d|0)>=(e|0)&f>>>0>=I[c+8>>2]|(d|0)>(e|0)){break a}e=G[F[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;F[c+16>>2]=f;F[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!Wb(a+1|0,b,c)){break a}e=d&127|F[b>>2]<<7}F[b>>2]=e;g=1}return g}function Ta(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=F[c+20>>2];e=F[c+12>>2];f=F[c+16>>2];if((d|0)>=(e|0)&f>>>0>=I[c+8>>2]|(d|0)>(e|0)){break a}e=G[F[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;F[c+16>>2]=f;F[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!Ta(a+1|0,b,c)){break a}e=d&127|F[b>>2]<<7}F[b>>2]=e;g=1}return g}function Qd(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=F[c+20>>2];e=F[c+12>>2];f=F[c+16>>2];if((d|0)>=(e|0)&f>>>0>=I[c+8>>2]|(d|0)>(e|0)){break a}e=G[F[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;F[c+16>>2]=f;F[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!Qd(a+1|0,b,c)){break a}e=d&127|F[b>>2]<<7}F[b>>2]=e;g=1}return g}function Oa(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=F[c+20>>2];e=F[c+12>>2];f=F[c+16>>2];if((d|0)>=(e|0)&f>>>0>=I[c+8>>2]|(d|0)>(e|0)){break a}e=G[F[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;F[c+16>>2]=f;F[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!Oa(a+1|0,b,c)){break a}e=d&127|F[b>>2]<<7}F[b>>2]=e;g=1}return g}function Da(a,b,c){var d=0,e=0,f=0,g=0;a:{if(a>>>0>5){break a}d=F[c+20>>2];e=F[c+12>>2];f=F[c+16>>2];if((d|0)>=(e|0)&f>>>0>=I[c+8>>2]|(d|0)>(e|0)){break a}e=G[F[c>>2]+f|0];f=f+1|0;d=f?d:d+1|0;F[c+16>>2]=f;F[c+20>>2]=d;d=e<<24>>24;if((d|0)<0){if(!Da(a+1|0,b,c)){break a}e=d&127|F[b>>2]<<7}F[b>>2]=e;g=1}return g}function sa(a,b,c){var d=0,e=0;a:{b:{if(c>>>0>=4){if((a|b)&3){break b}while(1){if(F[a>>2]!=F[b>>2]){break b}b=b+4|0;a=a+4|0;c=c-4|0;if(c>>>0>3){continue}break}}if(!c){break a}}while(1){d=G[a|0];e=G[b|0];if((d|0)==(e|0)){b=b+1|0;a=a+1|0;c=c-1|0;if(c){continue}break a}break}return d-e|0}return 0}function td(a){var b=0,c=0,d=0,e=0;d=F[a>>2];if(d){e=d;c=F[a+4>>2];if((d|0)!=(c|0)){while(1){e=c-144|0;b=F[e+132>>2];if(b){F[c-8>>2]=b;ja(b)}b=F[c-28>>2];if(b){F[c-24>>2]=b;ja(b)}b=F[c-40>>2];if(b){F[c-36>>2]=b;ja(b)}Gb(c-140|0);c=e;if((d|0)!=(c|0)){continue}break}e=F[a>>2]}F[a+4>>2]=d;ja(e)}}function Ef(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=F[b+4>>2];a:{if(!d){break a}b=F[F[F[b+8>>2]+(c<<2)>>2]+60>>2];if((b|0)<0){break a}a=F[d+24>>2];c=F[d+28>>2];if((a|0)==(c|0)){break a}b:{while(1){e=F[a>>2];if((b|0)==F[e+24>>2]){break b}a=a+4|0;if((c|0)!=(a|0)){continue}break}e=0}}return e|0}function ic(a){var b=0,c=0,d=0;if(a){d=F[a+24>>2];if(d){b=d;c=F[a+28>>2];if((b|0)!=(c|0)){while(1){c=c-4|0;b=F[c>>2];F[c>>2]=0;if(b){Ca(b+12|0,F[b+16>>2]);Ba(b,F[b+4>>2]);ja(b)}if((c|0)!=(d|0)){continue}break}b=F[a+24>>2]}F[a+28>>2]=d;ja(b)}Ca(a+12|0,F[a+16>>2]);Ba(a,F[a+4>>2]);ja(a)}}function $g(a){a=a|0;var b=0;F[a+8>>2]=9136;F[a>>2]=8924;b=F[a+96>>2];if(b){F[a+100>>2]=b;ja(b)}b=F[a+80>>2];if(b){F[a+84>>2]=b;ja(b)}b=F[a+68>>2];if(b){F[a+72>>2]=b;ja(b)}b=F[a+56>>2];if(b){F[a+60>>2]=b;ja(b)}F[a+8>>2]=9372;b=F[a+44>>2];if(b){ja(b)}b=F[a+32>>2];if(b){ja(b)}return a|0}function _g(a){a=a|0;var b=0;F[a+8>>2]=9136;F[a>>2]=8924;b=F[a+96>>2];if(b){F[a+100>>2]=b;ja(b)}b=F[a+80>>2];if(b){F[a+84>>2]=b;ja(b)}b=F[a+68>>2];if(b){F[a+72>>2]=b;ja(b)}b=F[a+56>>2];if(b){F[a+60>>2]=b;ja(b)}F[a+8>>2]=9372;b=F[a+44>>2];if(b){ja(b)}b=F[a+32>>2];if(b){ja(b)}ja(a)}function wh(a){a=a|0;var b=0,c=0,d=0;F[a>>2]=10032;b=F[a+20>>2];if(b){F[a+24>>2]=b;ja(b)}d=F[a+8>>2];if(d){c=F[a+12>>2];b=d;if((c|0)!=(b|0)){while(1){c=c-4|0;b=F[c>>2];F[c>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}b=F[a+8>>2]}F[a+12>>2]=d;ja(b)}return a|0}function uc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;h=F[c+8>>2];e=F[c+16>>2];g=F[c+12>>2];f=g;d=F[c+20>>2];if(h>>>0>e>>>0&(f|0)>=(d|0)|(d|0)<(f|0)){b=G[F[c>>2]+e|0];i=e+1|0;f=i?d:d+1|0;F[c+16>>2]=i;F[c+20>>2]=f;F[a+4>>2]=b}return e>>>0>>0&(d|0)<=(g|0)|(d|0)<(g|0)}function La(a,b,c){var d=0;if(!c){return F[a+4>>2]==F[b+4>>2]}if((a|0)==(b|0)){return 1}d=F[a+4>>2];a=G[d|0];c=F[b+4>>2];b=G[c|0];a:{if(!a|(b|0)!=(a|0)){break a}while(1){b=G[c+1|0];a=G[d+1|0];if(!a){break a}c=c+1|0;d=d+1|0;if((a|0)==(b|0)){continue}break}}return(a|0)==(b|0)}function Gg(a){a=a|0;var b=0,c=0,d=0;F[a>>2]=10032;b=F[a+20>>2];if(b){F[a+24>>2]=b;ja(b)}d=F[a+8>>2];if(d){c=F[a+12>>2];b=d;if((c|0)!=(b|0)){while(1){c=c-4|0;b=F[c>>2];F[c>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}if((c|0)!=(d|0)){continue}break}b=F[a+8>>2]}F[a+12>>2]=d;ja(b)}ja(a)}function Gf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=F[b+12>>2];b=F[b+8>>2];a=0;a:{if((d|0)==(b|0)){break a}a=d-b>>2;d=a>>>0<=1?1:a;a=0;b:{while(1){e=F[b+(a<<2)>>2];if(F[e+60>>2]==(c|0)){break b}a=a+1|0;if((d|0)!=(a|0)){continue}break}a=0;break a}a=(a|0)!=-1?e:0}return a|0}function ah(a){a=a|0;var b=0;F[a>>2]=9136;b=F[a+88>>2];if(b){F[a+92>>2]=b;ja(b)}b=F[a+72>>2];if(b){F[a+76>>2]=b;ja(b)}b=F[a+60>>2];if(b){F[a- -64>>2]=b;ja(b)}b=F[a+48>>2];if(b){F[a+52>>2]=b;ja(b)}F[a>>2]=9372;b=F[a+36>>2];if(b){ja(b)}b=F[a+24>>2];if(b){ja(b)}return a|0}function Tc(a,b){var c=0,d=0,e=0;F[a+8>>2]=0;F[a>>2]=0;F[a+4>>2]=0;a:{c=F[b+4>>2];d=F[b>>2];b:{if((c|0)==(d|0)){a=c;break b}c=c-d|0;if((c|0)<0){break a}d=c;e=ka(c);c=ma(e,0,c);d=d+c|0;F[a+8>>2]=d;F[a+4>>2]=d;F[a>>2]=c;c=F[b>>2];a=F[b+4>>2]}la(e,c,a-c|0);return}na();v()}function Dd(a){var b=0,c=0,d=0,e=0;c=F[a+4>>2];d=F[a>>2];if((c|0)!=(d|0)){while(1){e=c-144|0;b=F[e+132>>2];if(b){F[c-8>>2]=b;ja(b)}b=F[c-28>>2];if(b){F[c-24>>2]=b;ja(b)}b=F[c-40>>2];if(b){F[c-36>>2]=b;ja(b)}Gb(c-140|0);c=e;if((d|0)!=(c|0)){continue}break}}F[a+4>>2]=d}function Xg(a){a=a|0;var b=0;F[a>>2]=9136;b=F[a+88>>2];if(b){F[a+92>>2]=b;ja(b)}b=F[a+72>>2];if(b){F[a+76>>2]=b;ja(b)}b=F[a+60>>2];if(b){F[a- -64>>2]=b;ja(b)}b=F[a+48>>2];if(b){F[a+52>>2]=b;ja(b)}F[a>>2]=9372;b=F[a+36>>2];if(b){ja(b)}b=F[a+24>>2];if(b){ja(b)}ja(a)}function Za(a){var b=0;if(a){b=F[a+76>>2];if(b){F[a+80>>2]=b;ja(b)}b=F[a- -64>>2];if(b){F[a+68>>2]=b;ja(b)}b=F[a+48>>2];if(b){F[a+52>>2]=b;ja(b)}b=F[a+24>>2];if(b){F[a+28>>2]=b;ja(b)}b=F[a+12>>2];if(b){F[a+16>>2]=b;ja(b)}b=F[a>>2];if(b){F[a+4>>2]=b;ja(b)}ja(a)}}function Gb(a){var b=0;b=F[a+84>>2];if(b){F[a+88>>2]=b;ja(b)}b=F[a+72>>2];if(b){F[a+76>>2]=b;ja(b)}b=F[a+52>>2];if(b){F[a+56>>2]=b;ja(b)}b=F[a+40>>2];if(b){F[a+44>>2]=b;ja(b)}b=F[a+28>>2];if(b){F[a+32>>2]=b;ja(b)}b=F[a+12>>2];if(b){ja(b)}a=F[a>>2];if(a){ja(a)}}function Lc(a,b,c){var d=0,e=0,f=0,g=0;f=Z-16|0;Z=f;d=Z-16|0;Z=d;b=b-a>>2;while(1){if(b){F[d+12>>2]=a;e=b>>>1|0;F[d+12>>2]=F[d+12>>2]+(e<<2);g=(e^-1)+b|0;b=e;e=I[F[d+12>>2]>>2]>2];b=e?g:b;a=e?F[d+12>>2]+4|0:a;continue}break}Z=d+16|0;Z=f+16|0;return a}function id(a,b){var c=0,d=0;d=ka(40);F[d>>2]=-1;c=d+8|0;F[c+16>>2]=0;F[c+20>>2]=0;F[c+8>>2]=0;F[c>>2]=0;F[c+4>>2]=0;F[c+24>>2]=0;F[c+28>>2]=0;$[F[F[a>>2]+16>>2]](a,d);a=F[b+88>>2];F[b+88>>2]=d;if(a){b=F[a+8>>2];if(b){F[a+12>>2]=b;ja(b)}ja(a)}return 1}function ya(a){var b=0,c=0,d=0;b=a;a:{if(b&3){while(1){if(!G[b|0]){break a}b=b+1|0;if(b&3){continue}break}}while(1){c=b;b=b+4|0;d=F[c>>2];if(!((d^-1)&d-16843009&-2139062144)){continue}break}while(1){b=c;c=b+1|0;if(G[b|0]){continue}break}}return b-a|0}function wa(a){var b=0,c=0,d=0,e=0,f=0;d=G[a+12|0];c=F[a+8>>2];a:{if(c>>>0>4095){break a}b=F[a+4>>2];if((b|0)<=0){break a}b=b-1|0;F[a+4>>2]=b;c=G[b+F[a>>2]|0]|c<<8}d=0-d&255;b=L(d,c>>>8|0);e=c&255;f=e>>>0>>0;F[a+8>>2]=f?b+e|0:c-(b+d|0)|0;return f}function yc(a,b){F[a+4>>2]=0;F[a+8>>2]=0;F[a>>2]=1776;F[a+12>>2]=0;F[a+16>>2]=0;F[a+20>>2]=0;F[a+24>>2]=0;F[a+28>>2]=0;F[a+32>>2]=0;F[a+36>>2]=0;F[a+40>>2]=0;F[a>>2]=2016;F[a+60>>2]=b;F[a+44>>2]=0;F[a+48>>2]=0;F[a+52>>2]=0;F[a+56>>2]=0;return a}function Eb(a,b){var c=0,d=0,e=0;c=ya(b);if(c>>>0<2147483632){a:{b:{if(c>>>0>=11){d=(c|15)+1|0;e=ka(d);F[a+8>>2]=d|-2147483648;F[a>>2]=e;F[a+4>>2]=c;d=c+e|0;break b}D[a+11|0]=c;d=a+c|0;e=a;if(!c){break a}}pa(e,b,c)}D[d|0]=0;return a}za();v()}function Of(a){a=a|0;var b=0,c=0,d=0;if(a){if(D[a+27|0]<0){ja(F[a+16>>2])}b=F[a>>2];if(b){c=b;d=F[a+4>>2];if((b|0)!=(d|0)){while(1){c=d-12|0;if(D[d-1|0]<0){ja(F[c>>2])}d=c;if((d|0)!=(b|0)){continue}break}c=F[a>>2]}F[a+4>>2]=b;ja(c)}ja(a)}}function xa(a){a=a|0;var b=0,c=0;if(a){b=F[a+88>>2];F[a+88>>2]=0;if(b){c=F[b+8>>2];if(c){F[b+12>>2]=c;ja(c)}ja(b)}b=F[a+68>>2];if(b){F[a+72>>2]=b;ja(b)}b=F[a+64>>2];F[a+64>>2]=0;if(b){c=F[b>>2];if(c){F[b+4>>2]=c;ja(c)}ja(b)}ja(a)}}function Ib(a,b){var c=0,d=0,e=0;a:{c=F[a>>2];b:{if(F[a+8>>2]-c>>2>>>0>=b>>>0){break b}if(b>>>0>=1073741824){break a}d=F[a+4>>2]-c|0;e=b<<2;b=pa(ka(e),c,d);F[a+8>>2]=b+e;F[a+4>>2]=b+d;F[a>>2]=b;if(!c){break b}ja(c)}return}na();v()}function Df(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;b=F[b+96>>2];a=ka(12);b=b+L(c,12)|0;c=F[b+4>>2];F[a>>2]=F[b>>2];F[a+4>>2]=c;F[a+8>>2]=F[b+8>>2];b=F[d>>2];if(b){F[d+4>>2]=b;ja(b)}F[d>>2]=a;a=a+12|0;F[d+8>>2]=a;F[d+4>>2]=a;return 1}function Ah(a){a=a|0;var b=0;F[a+24>>2]=1624;F[a>>2]=7948;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}F[a>>2]=2136;b=F[a+20>>2];F[a+20>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}F[a>>2]=1920;b=F[a+16>>2];F[a+16>>2]=0;if(b){xa(b)}return a|0}function li(a,b,c,d){var e=0,f=0,g=0,h=0;f=b^d;g=f>>31;e=b>>31;a=a^e;h=a-e|0;e=(b^e)-((a>>>0>>0)+e|0)|0;a=d>>31;b=c^a;f=f>>31;a=mi(h,e,b-a|0,(a^d)-((a>>>0>b>>>0)+a|0)|0)^f;b=a-f|0;_=(g^_)-((a>>>0>>0)+g|0)|0;return b}function zh(a){a=a|0;var b=0;F[a+24>>2]=1624;F[a>>2]=7948;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}F[a>>2]=2136;b=F[a+20>>2];F[a+20>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}F[a>>2]=1920;b=F[a+16>>2];F[a+16>>2]=0;if(b){xa(b)}ja(a)}function rb(a,b,c){var d=0,e=0,f=0;e=Z-16|0;Z=e;d=F[a+8>>2]&2147483647;a:{if(d>>>0>c>>>0){d=F[a>>2];F[a+4>>2]=c;db(d,b,c);D[e+15|0]=0;D[c+d|0]=G[e+15|0];break a}f=a;a=F[a+4>>2];Gc(f,d-1|0,(c-d|0)+1|0,a,a,c,b)}Z=e+16|0}function xe(a,b){a=a|0;b=b|0;var c=0,d=0;c=Z-16|0;Z=c;a=F[a+4>>2];a:{if((a|0)==-1){break a}D[c+15|0]=a;d=F[b+20>>2];if(!!F[b+16>>2]&(d|0)>=0|(d|0)>0){break a}pb(b,F[b+4>>2],c+15|0,c+16|0)}Z=c+16|0;return(a|0)!=-1|0}function ki(a,b,c,d){var e=0,f=0,g=0,h=0,i=0,j=0;e=c>>>16|0;f=a>>>16|0;j=L(e,f);g=c&65535;h=a&65535;i=L(g,h);f=(i>>>16|0)+L(f,g)|0;e=(f&65535)+L(e,h)|0;_=(L(b,c)+j|0)+L(a,d)+(f>>>16)+(e>>>16)|0;return i&65535|e<<16}function qb(a,b,c){var d=0,e=0;d=Z-16|0;Z=d;a:{if(c>>>0<=10){D[a+11|0]=G[a+11|0]&128|c;D[a+11|0]=G[a+11|0]&127;db(a,b,c);D[d+15|0]=0;D[a+c|0]=G[d+15|0];break a}e=a;a=G[a+11|0]&127;Gc(e,10,c-10|0,a,a,c,b)}Z=d+16|0}function Ec(a,b,c){var d=0;d=F[a+16>>2];if(!d){F[a+36>>2]=1;F[a+24>>2]=c;F[a+16>>2]=b;return}a:{if((b|0)==(d|0)){if(F[a+24>>2]!=2){break a}F[a+24>>2]=c;return}D[a+54|0]=1;F[a+24>>2]=2;F[a+36>>2]=F[a+36>>2]+1}}function vg(){var a=0;a=kb(ka(96));F[a+64>>2]=0;F[a+68>>2]=0;F[a+88>>2]=0;F[a+72>>2]=0;F[a+76>>2]=0;D[a+77|0]=0;D[a+78|0]=0;D[a+79|0]=0;D[a+80|0]=0;D[a+81|0]=0;D[a+82|0]=0;D[a+83|0]=0;D[a+84|0]=0;return a|0}function jh(a,b){a=a|0;b=b|0;var c=0,d=0;F[b>>2]=2;c=F[b+8>>2];d=F[b+12>>2]-c|0;if(d>>>0<=4294967291){Db(b+8|0,d+4|0);c=F[b+8>>2]}b=c+d|0;a=F[a+4>>2];D[b|0]=a;D[b+1|0]=a>>>8;D[b+2|0]=a>>>16;D[b+3|0]=a>>>24}function ge(a){a=a|0;var b=0;F[a>>2]=3016;b=F[a+96>>2];if(b){ja(b)}b=F[a+84>>2];if(b){ja(b)}b=F[a+72>>2];if(b){ja(b)}b=F[a+60>>2];if(b){ja(b)}F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}return a|0}function ci(a){a=a|0;var b=0;F[a>>2]=4580;b=F[a+96>>2];if(b){ja(b)}b=F[a+84>>2];if(b){ja(b)}b=F[a+72>>2];if(b){ja(b)}b=F[a+60>>2];if(b){ja(b)}F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}return a|0}function Cg(a){a=a|0;var b=0,c=0,d=0;b=F[a+8>>2];d=F[a+12>>2];if((b|0)==(d|0)){return 1}while(1){c=F[b>>2];c=$[F[F[c>>2]+16>>2]](c,F[a+32>>2])|0;if(c){b=b+4|0;if((d|0)!=(b|0)){continue}}break}return c|0}function Pc(a,b){var c=0,d=0;c=F[a+8>>2];a=F[a+12>>2];if((c|0)!=(a|0)){a=a-c>>2;d=a>>>0<=1?1:a;a=0;while(1){if(F[F[(a<<2)+c>>2]+60>>2]==(b|0)){return a}a=a+1|0;if((d|0)!=(a|0)){continue}break}}return-1}function fe(a){a=a|0;var b=0;F[a>>2]=3016;b=F[a+96>>2];if(b){ja(b)}b=F[a+84>>2];if(b){ja(b)}b=F[a+72>>2];if(b){ja(b)}b=F[a+60>>2];if(b){ja(b)}F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}ja(a)}function bi(a){a=a|0;var b=0;F[a>>2]=4580;b=F[a+96>>2];if(b){ja(b)}b=F[a+84>>2];if(b){ja(b)}b=F[a+72>>2];if(b){ja(b)}b=F[a+60>>2];if(b){ja(b)}F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}ja(a)}function Sc(a,b,c){var d=0,e=0;d=a+4|0;a=Ya(a,b);a:{if((d|0)==(a|0)){break a}b=F[a+32>>2];d=F[a+28>>2];if((b|0)==(d|0)){break a}Sb(c,b-d|0);c=Tb(c);b=F[a+28>>2];la(c,b,F[a+32>>2]-b|0);e=1}return e}function Kd(a){F[a+40>>2]=0;F[a+4>>2]=0;F[a+8>>2]=0;F[a>>2]=10032;F[a+12>>2]=0;F[a+16>>2]=0;F[a+20>>2]=0;F[a+24>>2]=0;F[a+28>>2]=0;F[a+32>>2]=0;E[a+36>>1]=0;F[a+44>>2]=0;F[a>>2]=8080;return a}function kb(a){F[a+8>>2]=0;F[a+12>>2]=0;F[a>>2]=0;F[a+40>>2]=0;F[a+44>>2]=0;F[a+28>>2]=9;D[a+24|0]=1;F[a+56>>2]=-1;F[a+60>>2]=0;F[a+16>>2]=0;F[a+20>>2]=0;F[a+48>>2]=0;F[a+52>>2]=0;return a}function pe(a,b){a=a|0;b=b|0;var c=0,d=0;d=F[a+16>>2];c=0;a:{if(F[a+20>>2]-d>>2<=(b|0)){break a}b=F[(b<<2)+d>>2];c=0;if((b|0)<0){break a}c=bb(F[F[a+36>>2]+(b<<2)>>2])}return c|0}function Nf(){var a=0,b=0;a=ka(40);F[a+4>>2]=0;F[a+8>>2]=0;F[a+24>>2]=0;F[a+28>>2]=0;b=a+16|0;F[b>>2]=0;F[b+4>>2]=0;F[a>>2]=a+4;F[a+12>>2]=b;F[a+32>>2]=0;F[a+36>>2]=0;return a|0}function Xe(a,b){a=a|0;b=b|0;var c=0,d=0;Nc(a,b);a:{if((b|0)<0){break a}d=F[a+88>>2];c=F[a+84>>2];if(d-c>>2<=(b|0)){break a}c=(b<<2)+c|0;b=c+4|0;pa(c,b,d-b|0);F[a+88>>2]=d-4}}function eb(a){var b=0,c=0;b=F[2909];c=a+7&-8;a=b+c|0;a:{if(a>>>0<=b>>>0?c:0){break a}if(a>>>0>aa()<<16>>>0){if(!(X(a|0)|0)){break a}}F[2909]=a;return b}F[2940]=48;return-1}function Th(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;F[a+4>>2]=b;b=F[F[F[b+4>>2]+8>>2]+(c<<2)>>2];F[a+12>>2]=c;F[a+8>>2]=b;a=F[a+8>>2];if(G[a+24|0]==3){d=F[a+28>>2]==9}return d|0}function Tg(a){a=a|0;var b=0;F[a+8>>2]=9556;F[a>>2]=9392;b=F[a+56>>2];if(b){F[a+60>>2]=b;ja(b)}F[a+8>>2]=9372;b=F[a+44>>2];if(b){ja(b)}b=F[a+32>>2];if(b){ja(b)}return a|0}function Ng(a){a=a|0;var b=0;F[a+8>>2]=8624;F[a>>2]=9684;b=F[a+56>>2];if(b){F[a+60>>2]=b;ja(b)}F[a+8>>2]=8876;b=F[a+44>>2];if(b){ja(b)}b=F[a+32>>2];if(b){ja(b)}return a|0}function Ee(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=F[a+8>>2];a:{if(!G[d+24|0]){break a}if(!ac(d,F[b+4>>2]-F[b>>2]>>2)){break a}e=$[F[F[a>>2]+32>>2]](a,b,c)|0}return e|0}function Fh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;F[a+4>>2]=b;d=F[F[F[b+4>>2]+8>>2]+(c<<2)>>2];F[a+12>>2]=c;F[a+8>>2]=d;return F[F[F[F[b+4>>2]+8>>2]+(c<<2)>>2]+28>>2]==9|0}function Ca(a,b){if(b){Ca(a,F[b>>2]);Ca(a,F[b+4>>2]);a=F[b+28>>2];F[b+28>>2]=0;if(a){Ca(a+12|0,F[a+16>>2]);Ba(a,F[a+4>>2]);ja(a)}if(D[b+27|0]<0){ja(F[b+16>>2])}ja(b)}}function Sg(a){a=a|0;var b=0;F[a+8>>2]=9556;F[a>>2]=9392;b=F[a+56>>2];if(b){F[a+60>>2]=b;ja(b)}F[a+8>>2]=9372;b=F[a+44>>2];if(b){ja(b)}b=F[a+32>>2];if(b){ja(b)}ja(a)}function Mg(a){a=a|0;var b=0;F[a+8>>2]=8624;F[a>>2]=9684;b=F[a+56>>2];if(b){F[a+60>>2]=b;ja(b)}F[a+8>>2]=8876;b=F[a+44>>2];if(b){ja(b)}b=F[a+32>>2];if(b){ja(b)}ja(a)}function Hc(a,b){var c=0,d=0,e=0,f=0;F[a>>2]=11356;F[a>>2]=11468;c=ya(b);d=ka(c+13|0);F[d+8>>2]=0;F[d+4>>2]=c;F[d>>2]=c;e=a,f=la(d+12|0,b,c+1|0),F[e+4>>2]=f;return a}function hc(a,b,c){a:{if(b){b=0;if(!ld(1,c,a)){break a}}D[a+36|0]=1;F[a+32>>2]=0;b=F[a+16>>2];c=b+F[a>>2]|0;F[a+24>>2]=c;F[a+28>>2]=c+(F[a+8>>2]-b|0);b=1}return b}function Ue(a,b){a=a|0;b=b|0;var c=0;a:{if(!($[F[F[a>>2]+36>>2]](a,b)|0)){break a}if(!($[F[F[a>>2]+40>>2]](a,b)|0)){break a}c=$[F[F[a>>2]+44>>2]](a)|0}return c|0}function _d(a){a=a|0;var b=0;a:{if(!F[a- -64>>2]|!F[a+68>>2]|(!F[a+44>>2]|!F[a+48>>2])){break a}if(!F[a+52>>2]|!F[a+56>>2]){break a}b=F[a+92>>2]!=-1}return b|0}function ii(a,b){a=a|0;b=b|0;var c=0;b=F[b+88>>2];if(!(!b|F[b>>2]!=2)){c=a;a=F[b+8>>2];F[c+4>>2]=G[a|0]|G[a+1|0]<<8|(G[a+2|0]<<16|G[a+3|0]<<24);c=1}return c|0}function wc(a){a=a|0;var b=0;F[a>>2]=2136;b=F[a+20>>2];F[a+20>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}F[a>>2]=1920;b=F[a+16>>2];F[a+16>>2]=0;if(b){xa(b)}return a|0}function Ud(a){a=a|0;var b=0;a:{if(!F[a+48>>2]|!F[a+52>>2]|(!F[a+28>>2]|!F[a+32>>2])){break a}if(!F[a+36>>2]|!F[a+40>>2]){break a}b=F[a+76>>2]!=-1}return b|0}function Ug(a){a=a|0;var b=0;F[a>>2]=9556;b=F[a+48>>2];if(b){F[a+52>>2]=b;ja(b)}F[a>>2]=9372;b=F[a+36>>2];if(b){ja(b)}b=F[a+24>>2];if(b){ja(b)}return a|0}function Ed(a){a=a|0;var b=0;F[a>>2]=8624;b=F[a+48>>2];if(b){F[a+52>>2]=b;ja(b)}F[a>>2]=8876;b=F[a+36>>2];if(b){ja(b)}b=F[a+24>>2];if(b){ja(b)}return a|0}function vc(a){a=a|0;var b=0;F[a>>2]=2136;b=F[a+20>>2];F[a+20>>2]=0;if(b){$[F[F[b>>2]+4>>2]](b)}F[a>>2]=1920;b=F[a+16>>2];F[a+16>>2]=0;if(b){xa(b)}ja(a)}function yg(){var a=0,b=0;b=ka(40);F[b>>2]=-1;a=b+8|0;F[a+16>>2]=0;F[a+20>>2]=0;F[a+8>>2]=0;F[a>>2]=0;F[a+4>>2]=0;F[a+24>>2]=0;F[a+28>>2]=0;return b|0}function eh(a){a=a|0;var b=0;F[a>>2]=8624;b=F[a+48>>2];if(b){F[a+52>>2]=b;ja(b)}F[a>>2]=8876;b=F[a+36>>2];if(b){ja(b)}b=F[a+24>>2];if(b){ja(b)}ja(a)}function Og(a){a=a|0;var b=0;F[a>>2]=9556;b=F[a+48>>2];if(b){F[a+52>>2]=b;ja(b)}F[a>>2]=9372;b=F[a+36>>2];if(b){ja(b)}b=F[a+24>>2];if(b){ja(b)}ja(a)}function Ja(a){F[a+8>>2]=0;F[a+12>>2]=0;F[a>>2]=0;F[a+16>>2]=0;F[a+20>>2]=0;F[a+32>>2]=0;F[a+24>>2]=0;F[a+28>>2]=0;E[a+38>>1]=0;D[a+36|0]=0;return a}function Me(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if(La(a,F[b+8>>2],f)){Dc(b,c,d,e);return}a=F[a+8>>2];$[F[F[a>>2]+20>>2]](a,b,c,d,e,f)}function Eh(a,b,c){a=a|0;b=b|0;c=c|0;a:{if(G[F[a+4>>2]+36|0]>=2){b=0;if(!($[F[F[a>>2]+52>>2]](a)|0)){break a}}b=id(a+24|0,F[a+16>>2])}return b|0}function hg(){var a=0;a=Rc(ka(108));F[a+84>>2]=0;F[a+88>>2]=0;F[a>>2]=10240;F[a+92>>2]=0;F[a+96>>2]=0;F[a+100>>2]=0;F[a+104>>2]=0;return a|0}function Qc(a,b){var c=0;c=-1;a:{if((b|0)==-1|(b|0)>4){break a}b=L(b,12)+a|0;a=F[b+20>>2];if((F[b+24>>2]-a|0)<=0){break a}c=F[a>>2]}return c}function cc(a,b,c,d,e,f,g){F[a>>2]=0;F[a+56>>2]=b;F[a+48>>2]=0;F[a+52>>2]=0;F[a+40>>2]=f;F[a+44>>2]=g;D[a+32|0]=e;F[a+28>>2]=d;D[a+24|0]=c}function Sh(a,b,c){a=a|0;b=b|0;c=c|0;a:{if(G[F[a+4>>2]+36|0]>=2){b=0;if(!uc(a+24|0,bb(a),c)){break a}}b=id(a+24|0,F[a+16>>2])}return b|0}function _e(a){a=a|0;var b=0;F[a>>2]=10240;b=F[a+96>>2];if(b){F[a+100>>2]=b;ja(b)}b=F[a+84>>2];if(b){F[a+88>>2]=b;ja(b)}return tb(a)|0}function Tb(a){var b=0;if(G[a+11|0]>>>7|0){b=F[a+4>>2]}else{b=G[a+11|0]&127}if(!b){sc(1222);v()}if(G[a+11|0]>>>7|0){a=F[a>>2]}return a}function Ze(a){a=a|0;var b=0;F[a>>2]=10240;b=F[a+96>>2];if(b){F[a+100>>2]=b;ja(b)}b=F[a+84>>2];if(b){F[a+88>>2]=b;ja(b)}ja(tb(a))}function ce(a){a=a|0;var b=0;F[a>>2]=3264;b=F[a+76>>2];if(b){ja(b)}F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}return a|0}function _h(a){a=a|0;var b=0;F[a>>2]=4816;b=F[a+76>>2];if(b){ja(b)}F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}return a|0}function Ba(a,b){if(b){Ba(a,F[b>>2]);Ba(a,F[b+4>>2]);a=F[b+28>>2];if(a){F[b+32>>2]=a;ja(a)}if(D[b+27|0]<0){ja(F[b+16>>2])}ja(b)}}function Wf(){var a=0;a=ka(28);F[a>>2]=0;F[a+4>>2]=0;F[a+24>>2]=0;F[a+16>>2]=0;F[a+20>>2]=0;F[a+8>>2]=0;F[a+12>>2]=0;return a|0}function We(a){a=a|0;var b=0;F[a>>2]=1776;b=F[a+16>>2];if(b){F[a+20>>2]=b;ja(b)}b=F[a+4>>2];if(b){F[a+8>>2]=b;ja(b)}return a|0}function fg(){var a=0,b=0;a=ka(24);F[a+4>>2]=0;F[a+8>>2]=0;b=a+16|0;F[b>>2]=0;F[b+4>>2]=0;F[a>>2]=a+4;F[a+12>>2]=b;return a|0}function Pe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(La(a,F[b+8>>2],0)){Ec(b,c,d);return}a=F[a+8>>2];$[F[F[a>>2]+28>>2]](a,b,c,d)}function be(a){a=a|0;var b=0;F[a>>2]=3264;b=F[a+76>>2];if(b){ja(b)}F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}ja(a)}function Zh(a){a=a|0;var b=0;F[a>>2]=4816;b=F[a+76>>2];if(b){ja(b)}F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}ja(a)}function ka(a){var b=0;a=a?a:1;a:{while(1){b=Ub(a);if(b){break a}b=F[3065];if(b){$[b|0]();continue}break}V();v()}return b}function ib(a,b){if(b){ib(a,F[b>>2]);ib(a,F[b+4>>2]);if(D[b+39|0]<0){ja(F[b+28>>2])}if(D[b+27|0]<0){ja(F[b+16>>2])}ja(b)}}function Cc(a){a=a|0;var b=0,c=0;F[a>>2]=11468;b=F[a+4>>2]-12|0;c=F[b+8>>2]-1|0;F[b+8>>2]=c;if((c|0)<0){ja(b)}return a|0}function ng(){var a=0;a=ka(24);F[a+8>>2]=0;F[a+12>>2]=0;F[a+4>>2]=-1;F[a>>2]=1624;F[a+16>>2]=0;F[a+20>>2]=0;return a|0}function Ac(a,b,c){a=a|0;b=b|0;c=c|0;F[a+4>>2]=b;b=F[F[F[b+4>>2]+8>>2]+(c<<2)>>2];F[a+12>>2]=c;F[a+8>>2]=b;return 1}function pc(a){a=a|0;var b=0;if(!(!F[a+60>>2]|!F[a+44>>2]|(!F[a+48>>2]|!F[a+52>>2]))){b=F[a+56>>2]!=0}return b|0}function Ic(a,b){if(G[a+11|0]>>>7|0){F[a+4>>2]=b;return}D[a+11|0]=G[a+11|0]&128|b;D[a+11|0]=G[a+11|0]&127}function gi(a){a=a|0;var b=0;F[a>>2]=3500;F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}return a|0}function Xh(a){a=a|0;var b=0;F[a>>2]=5040;F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}return a|0}function nf(a){a=a|0;if(a){if(D[a+39|0]<0){ja(F[a+28>>2])}$b(a+12|0,F[a+16>>2]);ib(a,F[a+4>>2]);ja(a)}}function dh(a){a=a|0;var b=0;F[a>>2]=8876;b=F[a+36>>2];if(b){ja(b)}b=F[a+24>>2];if(b){ja(b)}return a|0}function Wg(a){a=a|0;var b=0;F[a>>2]=9372;b=F[a+36>>2];if(b){ja(b)}b=F[a+24>>2];if(b){ja(b)}return a|0}function ob(a){a=a|0;var b=0;if(!(!F[a+52>>2]|(!F[a+44>>2]|!F[a+48>>2]))){b=F[a+56>>2]!=0}return b|0}function oc(a,b){a=a|0;b=b|0;var c=0;if(!(F[b+56>>2]|!b|G[b+24|0]!=3)){F[a+60>>2]=b;c=1}return c|0}function fi(a){a=a|0;var b=0;F[a>>2]=3500;F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}ja(a)}function Wh(a){a=a|0;var b=0;F[a>>2]=5040;F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}ja(a)}function zg(a,b,c){a=a|0;b=b|0;c=c|0;F[a+16>>2]=0;F[a+20>>2]=0;F[a>>2]=b;F[a+8>>2]=c;F[a+12>>2]=0}function ch(a){a=a|0;var b=0;F[a>>2]=8876;b=F[a+36>>2];if(b){ja(b)}b=F[a+24>>2];if(b){ja(b)}ja(a)}function Zd(a,b){a=a|0;b=b|0;var c=0;if(!(F[b+56>>2]|G[b+24|0]!=3)){F[a- -64>>2]=b;c=1}return c|0}function Vg(a){a=a|0;var b=0;F[a>>2]=9372;b=F[a+36>>2];if(b){ja(b)}b=F[a+24>>2];if(b){ja(b)}ja(a)}function Td(a,b){a=a|0;b=b|0;var c=0;if(!(F[b+56>>2]|G[b+24|0]!=3)){F[a+48>>2]=b;c=1}return c|0}function Le(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;if(La(a,F[b+8>>2],f)){Dc(b,c,d,e)}}function oa(){var a=0;a=Rb(4);F[a>>2]=11356;F[a>>2]=11316;F[a>>2]=11336;W(a|0,11448,14);v()}function je(a){a=a|0;var b=0;F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}return a|0}function Ae(a){a=a|0;var b=0;F[a>>2]=1920;b=F[a+16>>2];F[a+16>>2]=0;if(b){xa(b)}return a|0}function Pg(a){a=a|0;var b=0;F[a>>2]=1624;b=F[a+8>>2];if(b){F[a+12>>2]=b;ja(b)}return a|0}function Ch(a){a=a|0;var b=0;b=bb(a);return qd(a+24|0,b?b:F[a+8>>2],F[F[a+4>>2]+32>>2])|0}function ze(a){a=a|0;var b=0;F[a>>2]=1920;b=F[a+16>>2];F[a+16>>2]=0;if(b){xa(b)}ja(a)}function Ob(a){a=a|0;var b=0;F[a>>2]=2960;b=F[a+32>>2];if(b){F[a+36>>2]=b;ja(b)}ja(a)}function Hg(a){a=a|0;var b=0;F[a>>2]=1624;b=F[a+8>>2];if(b){F[a+12>>2]=b;ja(b)}ja(a)}function oe(a,b){a=a|0;b=b|0;return $[F[F[a>>2]+48>>2]](a,F[b+4>>2]-F[b>>2]>>2)|0}function $b(a,b){if(b){$b(a,F[b>>2]);$b(a,F[b+4>>2]);ib(b+20|0,F[b+24>>2]);ja(b)}}function xg(a){a=a|0;var b=0;if(a){b=F[a+8>>2];if(b){F[a+12>>2]=b;ja(b)}ja(a)}}function xh(a){a=a|0;if(!F[a+44>>2]){return 0}return $[F[F[a>>2]+48>>2]](a)|0}function ni(a){var b=0;while(1){if(a){a=a-1&a;b=b+1|0;continue}break}return b}function Qe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(La(a,F[b+8>>2],0)){Ec(b,c,d)}}function vh(a,b){a=a|0;b=b|0;a=F[a+48>>2];return $[F[F[a>>2]+20>>2]](a,b)|0}function oi(a){var b=0;b=a&31;a=0-a&31;return(-1>>>b&-2)<>>a} +function oh(a,b){a=a|0;b=b|0;a=F[a+48>>2];return $[F[F[a>>2]+12>>2]](a,b)|0}function nh(a,b){a=a|0;b=b|0;a=F[a+48>>2];return $[F[F[a>>2]+16>>2]](a,b)|0}function Xa(){var a=0;a=ka(12);F[a>>2]=0;F[a+4>>2]=0;F[a+8>>2]=0;return a|0}function Wa(a){a=a|0;var b=0;if(a){b=F[a>>2];if(b){F[a+4>>2]=b;ja(b)}ja(a)}}function mf(a,b,c){a=a|0;b=b|0;c=c|0;F[a+32>>2]=c;F[a+28>>2]=b;return 1}function eg(a){a=a|0;if(a){Ca(a+12|0,F[a+16>>2]);Ba(a,F[a+4>>2]);ja(a)}}function Lb(a,b){a=a|0;b=b|0;if(b>>>0<=1){F[a+28>>2]=b}return b>>>0<2|0}function Fg(a,b){a=a|0;b=b|0;D[b+84|0]=1;F[b+72>>2]=F[b+68>>2];return 1}function kg(){var a=0;a=ka(8);F[a+4>>2]=-1;F[a>>2]=1032;return a|0}function Hf(a,b,c){a=a|0;b=b|0;c=c|0;return F[F[b+8>>2]+(c<<2)>>2]}function th(a){a=a|0;a=F[a+48>>2];return $[F[F[a>>2]+24>>2]](a)|0}function sh(a){a=a|0;a=F[a+48>>2];return $[F[F[a>>2]+28>>2]](a)|0}function ph(a){a=a|0;a=F[a+48>>2];return $[F[F[a>>2]+36>>2]](a)|0}function Rh(a,b){a=a|0;b=b|0;return zc(a+24|0,bb(a),F[a+8>>2])|0}function Bh(a,b){a=a|0;b=b|0;return xd(a+24|0,bb(a),F[a+8>>2])|0}function bg(a){a=a|0;if(a){if(D[a+15|0]<0){ja(F[a+4>>2])}ja(a)}}function Ke(a){a=a|0;if(!a){return 0}return(Fc(a,11164)|0)!=0|0}function Fe(a,b){a=a|0;b=b|0;F[a+12>>2]=-1;F[a+8>>2]=b;return 1}function hd(a,b){a=a|0;b=b|0;return $[F[F[a>>2]+12>>2]](a,b)|0}function Dh(a,b){a=a|0;b=b|0;return $[F[F[a>>2]+56>>2]](a,b)|0}function sc(a){a=Hc(Rb(8),a);F[a>>2]=11568;W(a|0,11600,1);v()}function mg(a,b){a=a|0;b=b|0;return M(J[F[a+8>>2]+(b<<2)>>2])}function Rd(a){a=Hc(Rb(8),a);F[a>>2]=11516;W(a|0,11548,1);v()}function $f(a,b){a=a|0;b=b|0;return M(J[F[a>>2]+(b<<2)>>2])}function gg(a){a=a|0;return(F[a+100>>2]-F[a+96>>2]|0)/12|0}function cg(a){a=a|0;return(D[a+15|0]<0?F[a+4>>2]:a+4|0)|0}function Re(a,b){a=a|0;b=b|0;return F[F[a+4>>2]+(b<<2)>>2]}function dd(a,b){a=a|0;b=b|0;return F[F[a>>2]+(b<<2)>>2]}function Yf(a,b){a=a|0;b=b|0;return E[F[a>>2]+(b<<1)>>1]}function Xf(a,b){a=a|0;b=b|0;return H[F[a>>2]+(b<<1)>>1]}function Vd(a,b,c){a=a|0;b=b|0;c=c|0;return xc(a,b,c)|0}function sb(a,b){var c=0;c=ka(b);F[a+4>>2]=b;F[a>>2]=c}function Kf(a,b,c){a=a|0;b=b|0;c=c|0;return Qc(b,c)|0}function Rc(a){F[a>>2]=10300;ma(a+4|0,0,80);return a}function ji(a){if(a){return 31-O(a-1^a)|0}return 32}function gd(a){a=a|0;return F[a+12>>2]-F[a+8>>2]>>2}function _f(a,b){a=a|0;b=b|0;return D[F[a>>2]+b|0]}function Zf(a,b){a=a|0;b=b|0;return G[F[a>>2]+b|0]}function Ie(a){a=a|0;return F[a+8>>2]-F[a+4>>2]>>2}function wb(a){a=a|0;if(a){$[F[F[a>>2]+4>>2]](a)}}function Jd(a,b){a=a|0;b=b|0;F[a+4>>2]=b;return 1}function ed(a){a=a|0;return F[a+4>>2]-F[a>>2]>>1}function dc(a){a=a|0;return F[a+4>>2]-F[a>>2]>>2}function fd(a){a=a|0;return F[a+4>>2]-F[a>>2]|0}function ke(a){a=a|0;return G[F[a+8>>2]+24|0]}function Qf(a,b){a=a|0;b=b|0;return F[b+8>>2]}function Ff(a,b){a=a|0;b=b|0;return F[b+4>>2]}function De(a,b,c){a=a|0;b=b|0;c=c|0;return 1}function Bg(a,b){a=a|0;b=b|0;return G[b+24|0]}function Oh(a){a=a|0;F[a>>2]=5928;return a|0}function Jh(a){a=a|0;F[a>>2]=6932;return a|0}function lg(a){a=a|0;return M(J[a+20>>2])}function Nh(a){a=a|0;F[a>>2]=5928;ja(a)}function Ih(a){a=a|0;F[a>>2]=6932;ja(a)}function ug(a){a=a|0;return F[a+88>>2]}function tg(a){a=a|0;return F[a+56>>2]}function qg(a){a=a|0;return F[a+40>>2]}function pg(a){a=a|0;return F[a+48>>2]}function og(a){a=a|0;return F[a+60>>2]}function ec(a){a=a|0;return F[a+80>>2]}function cb(a){a=a|0;return F[a+28>>2]}function vd(a){a=a|0;return F[a+8>>2]}function tc(a,b){a=a|0;b=b|0;return-1}function sg(a){a=a|0;return D[a+24|0]}function rg(a){a=a|0;return G[a+32|0]}function dg(a){a=a|0;return!F[a>>2]|0}function Wd(a,b){a=a|0;b=b|0;return 6}function Va(a){a=a|0;return F[a+4>>2]}function Rb(a){return Ub(a+80|0)+80|0}function Qh(a,b){a=a|0;b=b|0;return 2}function Ia(a,b){a=a|0;b=b|0;return 0}function Bc(a,b){a=a|0;b=b|0;return 1}function jd(a){a=a|0;return F[a>>2]}function wg(){return kb(ka(64))|0}function ig(){return Rc(ka(84))|0}function fc(a){a=a|0;if(a){ja(a)}}function Ag(){return Ja(ka(40))|0}function Qb(a){a=a|0;Cc(a);ja(a)}function Je(a){a=a|0;return 1161}function He(a){a=a|0;return 1235}function Ge(a){a=a|0;return 1201}function Pa(a){a=a|0;return a|0}function hh(a){a=a|0;ja(ud(a))}function gh(a){a=a|0;ja(sd(a))}function Ve(a){a=a|0;ja(tb(a))}function ua(a){a=a|0;return 1}function rc(a){a=a|0;return 4}function qc(a){a=a|0;return 5}function Xd(a){a=a|0;return 2}function Ua(a){a=a|0;return 0}function Nb(a){a=a|0;return 6}function Mh(a){a=a|0;return 3}function za(){Rd(1222);v()}function ta(){sc(1154);v()}function na(){Rd(1154);v()}function Ha(a){a=a|0;ja(a)}function Ra(a){a=a|0;v()}function ff(){return 10}function ef(){return 11}function df(){return 12}function vb(){return-1}function ub(){return 1}function lf(){return 5}function kf(){return 6}function jf(){return 7}function jb(){return 0}function hf(){return 8}function gf(){return 9}function cf(){return-2}function bf(){return-3}function bd(){return 3}function af(){return-4}function ad(){return 4}function _b(){return 2}function $e(){return-5}function Te(){V();v()}function Jc(a){a=a|0}function ae(){} +// EMSCRIPTEN_END_FUNCS +e=G;p(q);var $=c([null,Cc,Pa,Ha,Xd,ii,jh,ag,zc,xe,uc,jg,Wd,Qh,Pa,Pg,Hg,ua,yh,mh,kh,xd,fh,qd,Wd,Bg,We,Ra,mf,$c,Ue,Re,Ie,cb,Ia,Te,Bc,ua,Ae,ze,Ac,Fe,Ee,De,Bc,Ce,Be,re,qe,ye,we,pe,ve,ue,te,se,wc,vc,Ac,oe,ne,xc,me,ke,le,je,Ob,ua,Va,ob,Ua,tc,Ia,Ua,ua,ie,he,Ra,Ra,ge,fe,rc,ob,ee,de,ce,be,qc,pc,ua,Ia,oc,$d,hi,gi,fi,Nb,_d,ua,Ia,Zd,Yd,ei,Pa,Ha,Lb,cb,Mb,Ra,Ob,ua,ob,di,Ra,ci,bi,rc,ob,ai,$h,_h,Zh,qc,pc,ua,Ia,oc,$d,Yh,Xh,Wh,Nb,_d,ua,Ia,Zd,Yd,Vh,Pa,Ha,Lb,cb,Kb,Ra,Ob,Ua,ua,Uh,wc,vc,Th,Sh,Vd,Ph,Xd,Rh,Oh,Nh,Nb,Va,Ud,ua,Ia,Td,ua,Mh,Sd,Lh,Pa,Ha,Lb,cb,Mb,Jh,Ih,Nb,Ud,ua,Ia,Td,Sd,Hh,Pa,Ha,Lb,cb,Kb,Pa,Ha,Ua,ua,Ua,tc,Ia,Kh,Gh,Ah,zh,Fh,Eh,Vd,Dh,Ch,Bh,wh,Ra,ua,ua,xh,Dg,Cg,ua,Ua,Ia,Ia,rh,qh,uh,vh,sh,ph,oh,nh,th,ud,hh,Jd,Id,Hd,Gd,lh,ua,Va,vd,sd,gh,Jd,Id,Hd,Gd,ih,ua,Va,vd,Ed,eh,Fd,dh,ch,$g,_g,Zg,Yg,ah,Xg,bh,Wg,Vg,Tg,Sg,Rg,Qg,Ug,Og,Ng,Mg,Lg,Kg,Gg,Ig,Jg,Pa,Ha,Fg,Eg,Ra,Ua,ua,_e,Ze,Ye,Xe,tb,Ve,Oc,Nc,Pa,Ha,Jc,Jc,Se,Le,Ne,Qe,Ha,Me,Oe,Pe,Ha,He,Ha,Ge,Ha,Je,Qb,Va,Qb,Qb]);function aa(){return C.byteLength/65536|0}function fa(ga){ga=ga|0;var ba=aa()|0;var ca=ba+ga|0;if(ba=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||16777216;assert(INITIAL_MEMORY>=65536,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+INITIAL_MEMORY+"! (STACK_SIZE="+65536+")");if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_MEMORY/65536,"maximum":2147483648/65536})}updateMemoryViews();INITIAL_MEMORY=wasmMemory.buffer.byteLength;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function keepRuntimeAlive(){return noExitRuntime}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;wasmBinaryFile="draco_decoder_gltf.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}var binary=tryParseAsDataURI(file);if(binary){return binary}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(wasmBinaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmTable=Module["asm"]["g"];addOnInit(Module["asm"]["f"]);removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e)}}instantiateAsync().catch(readyPromiseReject);return{}}function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module)}}function intArrayToString(array){var ret=[];for(var i=0;i255){chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;return prev===1};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw ptr}function _abort(){abort("")}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest,src,src+num)}function getHeapMax(){return 2147483648}function emscripten_realloc_buffer(size){var b=wasmMemory.buffer;try{wasmMemory.grow(size-b.byteLength+65535>>>16);updateMemoryViews();return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var decodeBase64=typeof atob=="function"?atob:function(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run();function WrapperObject(){}WrapperObject.prototype=Object.create(WrapperObject.prototype);WrapperObject.prototype.constructor=WrapperObject;WrapperObject.prototype.__class__=WrapperObject;WrapperObject.__cache__={};Module["WrapperObject"]=WrapperObject;function getCache(__class__){return(__class__||WrapperObject).__cache__}Module["getCache"]=getCache;function wrapPointer(ptr,__class__){var cache=getCache(__class__);var ret=cache[ptr];if(ret)return ret;ret=Object.create((__class__||WrapperObject).prototype);ret.ptr=ptr;return cache[ptr]=ret}Module["wrapPointer"]=wrapPointer;function castObject(obj,__class__){return wrapPointer(obj.ptr,__class__)}Module["castObject"]=castObject;Module["NULL"]=wrapPointer(0);function destroy(obj){if(!obj["__destroy__"])throw"Error: Cannot destroy object. (Did you create it yourself?)";obj["__destroy__"]();delete getCache(obj.__class__)[obj.ptr]}Module["destroy"]=destroy;function compare(obj1,obj2){return obj1.ptr===obj2.ptr}Module["compare"]=compare;function getPointer(obj){return obj.ptr}Module["getPointer"]=getPointer;function getClass(obj){return obj.__class__}Module["getClass"]=getClass;var ensureCache={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(ensureCache.needed){for(var i=0;i=ensureCache.size){assert(len>0);ensureCache.needed+=len;ret=Module["_malloc"](len);ensureCache.temps.push(ret)}else{ret=ensureCache.buffer+ensureCache.pos;ensureCache.pos+=len}return ret},copy:function(array,view,offset){offset>>>=0;var bytes=view.BYTES_PER_ELEMENT;switch(bytes){case 2:offset>>>=1;break;case 4:offset>>>=2;break;case 8:offset>>>=3;break}for(var i=0;i3)return false;if(version[0]==1&&version[1]>=0&&version[1]<=3)return true;if(version[0]!=0||version[1]>10)return false;return true}Module["isVersionSupported"]=isVersionSupported;var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}Module["arguments"]=[];Module["thisProgram"]="./this.program";Module["quit"]=(function(status,toThrow){throw toThrow});Module["preRun"]=[];Module["postRun"]=[];var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("Module['ENVIRONMENT'] value is not valid. must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER}if(ENVIRONMENT_IS_NODE){var nodeFS;var nodePath;Module["read"]=function shell_read(filename,binary){var ret;ret=tryParseAsDataURI(filename);if(!ret){if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);ret=nodeFS["readFileSync"](filename)}return binary?ret:ret.toString()};Module["readBinary"]=function readBinary(filename){var ret=Module["read"](filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){Module["thisProgram"]=process["argv"][1].replace(/\\/g,"/")}Module["arguments"]=process["argv"].slice(2);process["on"]("uncaughtException",(function(ex){if(!(ex instanceof ExitStatus)){throw ex}}));process["on"]("unhandledRejection",(function(reason,p){process["exit"](1)}));Module["inspect"]=(function(){return"[Emscripten Module object]"})}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){Module["read"]=function shell_read(f){var data=tryParseAsDataURI(f);if(data){return intArrayToString(data)}return read(f)}}Module["readBinary"]=function readBinary(f){var data;data=tryParseAsDataURI(f);if(data){return data}if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){Module["arguments"]=scriptArgs}else if(typeof arguments!="undefined"){Module["arguments"]=arguments}if(typeof quit==="function"){Module["quit"]=(function(status,toThrow){quit(status)})}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){Module["read"]=function shell_read(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){Module["readBinary"]=function readBinary(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}Module["readAsync"]=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)};Module["setWindowTitle"]=(function(title){document.title=title})}Module["print"]=typeof console!=="undefined"?console.log.bind(console):typeof print!=="undefined"?print:null;Module["printErr"]=typeof printErr!=="undefined"?printErr:typeof console!=="undefined"&&console.warn.bind(console)||Module["print"];Module.print=Module["print"];Module.printErr=Module["printErr"];for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=undefined;var STACK_ALIGN=16;function staticAlloc(size){assert(!staticSealed);var ret=STATICTOP;STATICTOP=STATICTOP+size+15&-16;return ret}function dynamicAlloc(size){assert(DYNAMICTOP_PTR);var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;HEAP32[DYNAMICTOP_PTR>>2]=end;if(end>=TOTAL_MEMORY){var success=enlargeMemory();if(!success){HEAP32[DYNAMICTOP_PTR>>2]=ret;return 0}}return ret}function alignMemory(size,factor){if(!factor)factor=STACK_ALIGN;var ret=size=Math.ceil(size/factor)*factor;return ret}function getNativeTypeSize(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return 4}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;Module.printErr(text)}}var jsCallStartIndex=1;var functionPointers=new Array(0);var funcWrappers={};function dynCall(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}var GLOBAL_BASE=8;var ABORT=0;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort("Assertion failed: "+text)}}function getCFunc(ident){var func=Module["_"+ident];assert(func,"Cannot call unknown function "+ident+", make sure it is exported");return func}var JSfuncs={"stackSave":(function(){stackSave()}),"stackRestore":(function(){stackRestore()}),"arrayToC":(function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}),"stringToC":(function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret})};var toC={"string":JSfuncs["stringToC"],"array":JSfuncs["arrayToC"]};function ccall(ident,returnType,argTypes,args,opts){var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i>0]=value;break;case"i8":HEAP8[ptr>>0]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble- +(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;default:abort("invalid type for setValue: "+type)}}var ALLOC_STATIC=2;var ALLOC_NONE=4;function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==="number"){zeroinit=true;size=slab}else{zeroinit=false;size=slab.length}var singleType=typeof types==="string"?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr}else{ret=[typeof _malloc==="function"?_malloc:staticAlloc,stackAlloc,staticAlloc,dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length))}if(zeroinit){var stop;ptr=ret;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0}stop=ret+size;while(ptr>0]=0}return ret}if(singleType==="i8"){if(slab.subarray||slab.slice){HEAPU8.set(slab,ret)}else{HEAPU8.set(new Uint8Array(slab),ret)}return ret}var i=0,type,typeSize,previousType;while(i>0];hasUtf|=t;if(t==0&&!length)break;i++;if(length&&i==length)break}if(!length)length=i;var ret="";if(hasUtf<128){var MAX_CHUNK=1024;var curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK}return ret}return UTF8ToString(ptr)}var UTF8Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(u8Array,idx){var endPtr=idx;while(u8Array[endPtr])++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var u0,u1,u2,u3,u4,u5;var str="";while(1){u0=u8Array[idx++];if(!u0)return str;if(!(u0&128)){str+=String.fromCharCode(u0);continue}u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u3=u8Array[idx++]&63;if((u0&248)==240){u0=(u0&7)<<18|u1<<12|u2<<6|u3}else{u4=u8Array[idx++]&63;if((u0&252)==248){u0=(u0&3)<<24|u1<<18|u2<<12|u3<<6|u4}else{u5=u8Array[idx++]&63;u0=(u0&1)<<30|u1<<24|u2<<18|u3<<12|u4<<6|u5}}}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}}function UTF8ToString(ptr){return UTF8ArrayToString(HEAPU8,ptr)}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=2097151){if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else if(u<=67108863){if(outIdx+4>=endIdx)break;outU8Array[outIdx++]=248|u>>24;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+5>=endIdx)break;outU8Array[outIdx++]=252|u>>30;outU8Array[outIdx++]=128|u>>24&63;outU8Array[outIdx++]=128|u>>18&63;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127){++len}else if(u<=2047){len+=2}else if(u<=65535){len+=3}else if(u<=2097151){len+=4}else if(u<=67108863){len+=5}else{len+=6}}return len}var UTF16Decoder=typeof TextDecoder!=="undefined"?new TextDecoder("utf-16le"):undefined;function demangle(func){return func}function demangleAll(text){var regex=/__Z[\w\d_]+/g;return text.replace(regex,(function(x){var y=demangle(x);return x===y?x:x+" ["+y+"]"}))}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return"(no stack trace available)"}}return err.stack.toString()}var WASM_PAGE_SIZE=65536;var ASMJS_PAGE_SIZE=16777216;var MIN_TOTAL_MEMORY=16777216;function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBuffer(buf){Module["buffer"]=buffer=buf}function updateGlobalBufferViews(){Module["HEAP8"]=HEAP8=new Int8Array(buffer);Module["HEAP16"]=HEAP16=new Int16Array(buffer);Module["HEAP32"]=HEAP32=new Int32Array(buffer);Module["HEAPU8"]=HEAPU8=new Uint8Array(buffer);Module["HEAPU16"]=HEAPU16=new Uint16Array(buffer);Module["HEAPU32"]=HEAPU32=new Uint32Array(buffer);Module["HEAPF32"]=HEAPF32=new Float32Array(buffer);Module["HEAPF64"]=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed;var STACK_BASE,STACKTOP,STACK_MAX;var DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0;staticSealed=false;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}if(!Module["reallocBuffer"])Module["reallocBuffer"]=(function(size){var ret;try{if(ArrayBuffer.transfer){ret=ArrayBuffer.transfer(buffer,size)}else{var oldHEAP8=HEAP8;ret=new ArrayBuffer(size);var temp=new Int8Array(ret);temp.set(oldHEAP8)}}catch(e){return false}var success=_emscripten_replace_memory(ret);if(!success)return false;return ret});function enlargeMemory(){var PAGE_MULTIPLE=Module["usingWasm"]?WASM_PAGE_SIZE:ASMJS_PAGE_SIZE;var LIMIT=2147483648-PAGE_MULTIPLE;if(HEAP32[DYNAMICTOP_PTR>>2]>LIMIT){return false}var OLD_TOTAL_MEMORY=TOTAL_MEMORY;TOTAL_MEMORY=Math.max(TOTAL_MEMORY,MIN_TOTAL_MEMORY);while(TOTAL_MEMORY>2]){if(TOTAL_MEMORY<=536870912){TOTAL_MEMORY=alignUp(2*TOTAL_MEMORY,PAGE_MULTIPLE)}else{TOTAL_MEMORY=Math.min(alignUp((3*TOTAL_MEMORY+2147483648)/4,PAGE_MULTIPLE),LIMIT)}}var replacement=Module["reallocBuffer"](TOTAL_MEMORY);if(!replacement||replacement.byteLength!=TOTAL_MEMORY){TOTAL_MEMORY=OLD_TOTAL_MEMORY;return false}updateGlobalBuffer(replacement);updateGlobalBufferViews();return true}var byteLength;try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get);byteLength(new ArrayBuffer(4))}catch(e){byteLength=(function(buffer){return buffer.byteLength})}var TOTAL_STACK=Module["TOTAL_STACK"]||5242880;var TOTAL_MEMORY=Module["TOTAL_MEMORY"]||16777216;if(TOTAL_MEMORY0){var callback=callbacks.shift();if(typeof callback=="function"){callback();continue}var func=callback.func;if(typeof func==="number"){if(callback.arg===undefined){Module["dynCall_v"](func)}else{Module["dynCall_vi"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);runtimeExited=true}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPreMain(cb){__ATMAIN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}var Math_abs=Math.abs;var Math_cos=Math.cos;var Math_sin=Math.sin;var Math_tan=Math.tan;var Math_acos=Math.acos;var Math_asin=Math.asin;var Math_atan=Math.atan;var Math_atan2=Math.atan2;var Math_exp=Math.exp;var Math_log=Math.log;var Math_sqrt=Math.sqrt;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_imul=Math.imul;var Math_fround=Math.fround;var Math_round=Math.round;var Math_min=Math.min;var Math_max=Math.max;var Math_clz32=Math.clz32;var Math_trunc=Math.trunc;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module["preloadedImages"]={};Module["preloadedAudios"]={};var memoryInitializer=null;var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}STATIC_BASE=GLOBAL_BASE;STATICTOP=STATIC_BASE+19728;__ATINIT__.push();memoryInitializer="data:application/octet-stream;base64,HBwAAGQcAAAYAAAAAAAAAPQbAACLHAAAHBwAAKgcAAAYAAAAAAAAAPQbAADRHAAAHBwAAO0cAAAwAAAAAAAAAPQbAAAPHQAAHBwAADQdAAAwAAAAAAAAABwcAADsKQAASAAAAAAAAAAcHAAAZB0AAIAAAAAAAAAAHBwAAL0dAACQAAAAAAAAABwcAAARHgAAoAAAAAAAAAAcHAAARR4AALAAAAAAAAAA9BsAAHAeAAAcHAAAlB4AAMgAAAAAAAAA9BsAADIfAAAcHAAA0B8AAOAAAAAAAAAAHBwAAGggAACAAAAAAAAAABwcAADxIAAA4AAAAAAAAAAcHAAAiyEAAOAAAAAAAAAAHBwAAB0iAADgAAAAAAAAABwcAADDIgAA4AAAAAAAAAAcHAAAXiMAAOAAAAAAAAAAHBwAAPQjAABQAQAAAAAAAPQbAACfJAAAHBwAAEolAABoAQAAAAAAABwcAADvJQAAgAAAAAAAAAAcHAAAhSYAAGgBAAAAAAAAHBwAACwnAABoAQAAAAAAABwcAADLJwAAaAEAAAAAAAAcHAAAfigAAGgBAAAAAAAAHBwAACYpAABoAQAAAAAAABwcAADaNwAAYAAAAAAAAAAcHAAAGCoAAOgBAAAAAAAAHBwAAIkqAACQAAAAAAAAABwcAAD1KgAACAIAAAAAAAD0GwAAqysAABwcAABhLAAAIAIAAAAAAAAcHAAAES0AAOgBAAAAAAAAHBwAALItAAAgAgAAAAAAABwcAABkLgAAIAIAAAAAAAAcHAAADi8AACACAAAAAAAAHBwAAMwvAAAgAgAAAAAAABwcAAB/MAAAIAIAAAAAAAAcHAAALTEAAJACAAAAAAAA9BsAAPAxAAAcHAAAszIAAKgCAAAAAAAAHBwAAHAzAADoAQAAAAAAABwcAAAeNAAAqAIAAAAAAAAcHAAA3TQAAKgCAAAAAAAAHBwAAJQ1AACoAgAAAAAAABwcAABfNgAAqAIAAAAAAAAcHAAAHzcAAKgCAAAAAAAAHBwAAAU4AABgAAAAAAAAABwcAAAJOQAAmAMAAAAAAAAcHAAACzwAAIADAAAAAAAA9BsAACo5AAAcHAAAcjkAAFADAAAAAAAA9BsAADw6AAD0GwAAVjoAABwcAACROgAAUAMAAAAAAAAcHAAATjsAAFADAAAAAAAA9BsAAFc8AAAcHAAAhTwAAIADAAAAAAAAHBwAANg8AADIAwAAAAAAABwcAAAePQAAmAMAAAAAAAAcHAAABD0AAFADAAAAAAAA9BsAAD49AAAcHAAAFD4AAMgDAAAAAAAAHBwAADY+AADIAwAAAAAAABwcAACVPgAAAAQAAAAAAAD0GwAA5z4AAPQbAAAWSQAAHBwAAHZJAAAgBAAAAAAAABwcAAAjSQAAMAQAAAAAAAD0GwAAREkAABwcAABRSQAAEAQAAAAAAAAcHAAAWEoAAAgEAAAAAAAAHBwAAGhKAABIBAAAAAAAABwcAACdSgAAIAQAAAAAAAAcHAAAeUoAAGgEAAAAAAAAAAAAAAgAAAABAAAAAgAAAAEAAAABAAAAAQAAAAAAAAAgAAAAAwAAAAQAAAACAAAAAgAAAAIAAAD//////////wAAAAAwAAAABQAAAAYAAAABAAAAAwAAAAEAAAAEAAAABQAAAAIAAAAGAAAABwAAAAMAAAABAAAACAAAAAAAAAA4AAAABwAAAAgAAAABAAAAAwAAAAQAAAAEAAAABQAAAAIAAAAGAAAABwAAAAUAAAAJAAAACgAAAAAAAABIAAAACQAAAAoAAAADAAAACwAAAAwAAAAEAAAADQAAAAYAAAAHAAAADgAAAA8AAAAFAAAAAAAAAFAAAAALAAAADAAAAAYAAAAQAAAACAAAABEAAAASAAAABwAAABMAAAAUAAAACQAAABUAAAAWAAAACgAAAAEAAAAAAAAAYAAAAA0AAAAOAAAACAAAAAsAAAAXAAAABAAAAA0AAAAGAAAACwAAAA4AAAAPAAAACQAAAAIAAAAKAAAA/////wAAAACAAAAADwAAABAAAAABAAAADAAAAAEAAAANAAAAGAAAABkAAAAOAAAADwAAABoAAAABAAAAAAAAAHAAAAAPAAAAEQAAABAAAAAMAAAAEQAAAA0AAAAYAAAAGQAAAA4AAAAPAAAAGgAAAAEAAAAAAAAAMAEAAA8AAAASAAAAEgAAAAwAAAATAAAADQAAABgAAAAZAAAADgAAAA8AAAAaAAAAAgAAAAAAAAAgAQAADwAAABMAAAAUAAAADAAAABUAAAANAAAAGAAAABkAAAAOAAAADwAAABoAAAADAAAAAAAAAAABAAAUAAAAFQAAABYAAAAMAAAAFwAAABgAAAAbAAAAHAAAAA4AAAAPAAAAHQAAAAQAAAAAAAAA8AAAABYAAAAXAAAAGQAAAAwAAAAaAAAAGwAAAB4AAAAfAAAADgAAAA8AAAAgAAAABQAAAAAAAADQAAAAGAAAABkAAAAcAAAADAAAAB0AAAAeAAAAIQAAACIAAAAOAAAADwAAACMAAAAGAAAAAAAAALgAAAAaAAAAGwAAACQAAAAfAAAAAwAAAAAAAADgAAAADwAAABwAAAABAAAADAAAAAEAAAANAAAAGAAAABkAAAAOAAAADwAAABoAAAABAAAAAAAAABABAAAdAAAAHgAAACAAAAAMAAAAIQAAAA0AAAAYAAAAGQAAAA4AAAAPAAAAJQAAAAcAAAAAAAAAuAEAAA8AAAAfAAAAIgAAAAwAAAAjAAAADQAAABgAAAAZAAAADgAAAA8AAAAaAAAACAAAAAAAAACoAQAADwAAACAAAAAkAAAADAAAACUAAAANAAAAGAAAABkAAAAOAAAADwAAABoAAAAJAAAAAAAAAIgBAAAhAAAAIgAAACYAAAAMAAAAJwAAACgAAAAmAAAAJwAAAA4AAAAPAAAAKAAAAAoAAAAAAAAAeAEAACMAAAAkAAAAKQAAAAwAAAAqAAAAKwAAACkAAAAqAAAADgAAAA8AAAArAAAACwAAAAAAAABYAQAAJQAAACYAAAAsAAAADAAAAC0AAAAuAAAALAAAAC0AAAAOAAAADwAAAC4AAAAMAAAAAAAAAEABAAAnAAAAKAAAAC8AAAAvAAAABAAAAAAAAABoAQAADwAAACkAAAABAAAADAAAAAEAAAANAAAAGAAAABkAAAAOAAAADwAAABoAAAABAAAAAAAAAJgBAAAqAAAAKwAAADAAAAAMAAAAMQAAAA0AAAAYAAAAGQAAAA4AAAAPAAAAMAAAAA0AAAAAAAAAyAEAACwAAAAtAAAACwAAAAsAAAAXAAAABAAAADEAAAAyAAAAMwAAAA4AAAAPAAAACQAAAAUAAAAMAAAAAAAAANgBAAAuAAAALwAAADQAAAA1AAAANgAAADcAAAAyAAAAMwAAADgAAAA5AAAANAAAAA4AAAAAAAAAcAIAAC4AAAAwAAAAOgAAADUAAAA7AAAANwAAADIAAAAzAAAAOAAAADkAAAA0AAAADwAAAAAAAABgAgAALgAAADEAAAA8AAAANQAAAD0AAAA3AAAAMgAAADMAAAA4AAAAOQAAADQAAAAQAAAAAAAAAFACAAAyAAAAMwAAAD4AAAA1AAAAPwAAADcAAAAyAAAAMwAAADgAAAA5AAAANQAAABEAAAAAAAAAQAIAADQAAAA1AAAAQAAAADUAAABBAAAAQgAAADYAAAA3AAAAOAAAADkAAAA4AAAAEgAAAAAAAAAwAgAANgAAADcAAABDAAAANQAAAEQAAABFAAAAOQAAADoAAAA4AAAAOQAAADsAAAATAAAAAAAAABACAAA4AAAAOQAAAEYAAAA1AAAARwAAAEgAAAA8AAAAPQAAADgAAAA5AAAAPgAAABQAAAAAAAAA+AEAADoAAAA7AAAAPwAAAEkAAAAGAAAAAAAAAPgCAAAuAAAAPAAAAEoAAAA1AAAASwAAADcAAAAyAAAAMwAAADgAAAA5AAAANAAAABUAAAAAAAAA6AIAAC4AAAA9AAAATAAAADUAAABNAAAANwAAADIAAAAzAAAAOAAAADkAAAA0AAAAFgAAAAAAAADYAgAAPgAAAD8AAABOAAAANQAAAE8AAAA3AAAAMgAAADMAAAA4AAAAOQAAAEAAAAAXAAAAAAAAAMgCAABAAAAAQQAAAFAAAAA1AAAAUQAAAFIAAABBAAAAQgAAADgAAAA5AAAAQwAAABgAAAAAAAAAuAIAAEIAAABDAAAAUwAAADUAAABUAAAAVQAAAEQAAABFAAAAOAAAADkAAABGAAAAGQAAAAAAAACYAgAARAAAAEUAAABWAAAANQAAAFcAAABYAAAARwAAAEgAAAA4AAAAOQAAAEkAAAAaAAAAAAAAAIACAABGAAAARwAAAEoAAABZAAAABwAAAAAAAAAIAwAASAAAAEkAAAANAAAACwAAABcAAAAEAAAASwAAAFoAAABbAAAADgAAAA8AAAAJAAAAAgAAAA4AAAAAAAAAGAMAAEoAAABLAAAAXAAAAF0AAABeAAAAXwAAAGAAAABhAAAAYgAAAEwAAABNAAAAYwAAAGQAAABOAAAATwAAAGUAAAAAAAAAKAMAAEwAAABNAAAAUAAAAFEAAABSAAAAUwAAAFQAAABmAAAAZwAAAFUAAABoAAAAAQAAAAMAAAAAAAAAAwAAAAAAAAADAAAAAAAAAAMAAAAAAAAAQAMAAE4AAABPAAAAVgAAAGkAAAAAAAAAOAMAAFAAAABRAAAAUgAAAP////8AAAAAYAMAAFMAAABUAAAAVwAAAGoAAAAAAAAAWAMAAFUAAABWAAAAVwAAAAAAAABwAwAAWAAAAFkAAABYAAAAawAAAAAAAACIAwAAWgAAAFsAAABZAAAAWgAAAFsAAABcAAAAXQAAAGwAAABtAAAAXgAAAG4AAAAAAAAAAQAAAAUAAAACAAAABQAAAAMAAAAFAAAABAAAAAAAAACYAwAAXAAAAF0AAABcAAAAAQAAAG8AAABfAAAAYAAAAGEAAABiAAAAAQAAAF8AAABjAAAAcAAAAGAAAABhAAAAAQAAAAAAAACoAwAAXAAAAF4AAABcAAAAcQAAAG8AAABfAAAAYAAAAGEAAABiAAAAYgAAAF8AAABjAAAAcAAAAGAAAABhAAAAcgAAAAAAAAC4AwAAXwAAAGAAAABjAAAAcwAAAAAAAADIAwAAXAAAAGEAAAB0AAAAAQAAAG8AAABfAAAAdQAAAGEAAABiAAAAAQAAAF8AAABjAAAAAAAAANADAABcAAAAYgAAAHQAAAB2AAAAbwAAAF8AAAB3AAAAYQAAAGIAAABkAAAAXwAAAGMAAAAAAAAA4AMAAFwAAABjAAAAdAAAAHgAAABvAAAAXwAAAHkAAABhAAAAYgAAAGUAAABfAAAAYwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAFZVVVUCAAAAAAAAAAIAAACamZmZAwAAAFZVVVUDAAAAJUmSJAMAAAAAAAAAAwAAAMhxHMcEAAAAmpmZmQQAAABGF110BAAAAFZVVVUEAAAAPLETOwQAAAAlSZIkBAAAABIREREEAAAAAAAAAAQAAADi4eHhBQAAAMhxHMcFAAAAy2sorwUAAACamZmZBQAAAIdhGIYFAAAARhdddAUAAACRhSxkBQAAAFZVVVUFAAAAexSuRwUAAAA8sRM7BQAAANtLaC8FAAAAJUmSJAUAAAASlnsaBQAAABIREREFAAAAhRBCCAUAAAAAAAAABQAAAAgffPAGAAAA4uHh4QYAAADVQR3UBgAAAMhxHMcGAAAATZHPugYAAADLayivBgAAAKVBGqQGAAAAmpmZmQYAAAD6GJyPBgAAAIdhGIYGAAAAGPQFfQYAAABGF110BgAAAG3BFmwGAAAAkYUsZAYAAAC6gphcBgAAAFZVVVUGAAAAcwpeTgYAAAB7FK5HBgAAAEJBQUEGAAAAPLETOwYAAACzzyE1BgAAANtLaC8GAAAAnxLkKQYAAAAlSZIkBgAAAN1HcB8GAAAAEpZ7GgYAAAD45bEVBgAAABIREREGAAAA/BSXDAYAAACFEEIIBgAAAAVBEAQGAAAAAAAAAAYAAAD5gR/4BwAAAAgffPAHAAAAwBoT6QcAAADi4eHhBwAAAGwH5toHAAAA1UEd1AcAAACRaIXNBwAAAMhxHMcHAAAAOXDgwAcAAABNkc+6BwAAAE8b6LQHAAAAy2sorwcAAAAH9o6pBwAAAKVBGqQHAAAAUunIngcAAACamZmZBwAAAM4Pi5QHAAAA+hicjwcAAAD3kMuKBwAAAIdhGIYHAAAAgoGBgQcAAAAY9AV9BwAAABjIpHgHAAAARhdddAcAAADBBS5wBwAAAG3BFmwHAAAAaYEWaAcAAACRhSxkBwAAAAYWWGAHAAAAuoKYXAcAAAAJI+1YBwAAAFZVVVUHAAAAr37QUQcAAABzCl5OBwAAAAZq/UoHAAAAexSuRwcAAABXhm9EBwAAAEJBQUEHAAAAz8siPgcAAAA8sRM7BwAAADmBEzgHAAAAs88hNQcAAACjND4yBwAAANtLaC8HAAAA2bSfLAcAAACfEuQpBwAAAIkLNScHAAAAJUmSJAcAAAATePshBwAAAN1HcB8HAAAA22rwHAcAAAASlnsaBwAAABmBERgHAAAA+OWxFQcAAAAUgVwTBwAAABIREREHAAAAv1bPDgcAAAD8FJcMBwAAAKcQaAoHAAAAhRBCCAcAAAAw3SQGBwAAAAVBEAQHAAAAEQgEAgcAAAAAAAAABwAAACDwB/wIAAAA+YEf+AgAAADlWUb0CAAAAAgffPAIAAAAMXvA7AgAAADAGhPpCAAAAJGsc+UIAAAA4uHh4QgAAABAbl3eCAAAAGwH5toIAAAATGV71wgAAADVQR3UCAAAAPdYy9AIAAAAkWiFzQgAAABWMEvKCAAAAMhxHMcIAAAAHfD4wwgAAAA5cODACAAAAJq40r0IAAAATZHPuggAAADew9a3CAAAAE8b6LQIAAAAB2QDsggAAADLayivCAAAAK0BV6wIAAAAB/aOqQgAAABuGtCmCAAAAKVBGqQIAAAAmD9toQgAAABS6cieCAAAAO8ULZwIAAAAmpmZmQgAAACBTw6XCAAAAM4Pi5QIAAAAnrQPkggAAAD6GJyPCAAAANQYMI0IAAAA95DLiggAAAALX26ICAAAAIdhGIYIAAAArHfJgwgAAACCgYGBCAAAANFfQH8IAAAAGPQFfQgAAACPINJ6CAAAABjIpHgIAAAARM59dggAAABGF110CAAAAPWHQnIIAAAAwQUucAgAAAC1dh9uCAAAAG3BFmwIAAAAFs0TaggAAABpgRZoCAAAAKbGHmYIAAAAkYUsZAgAAABxpz9iCAAAAAYWWGAIAAAAjrt1XggAAAC6gphcCAAAALFWwFoIAAAACSPtWAgAAADG0x5XCAAAAFZVVVUIAAAAkJSQUwgAAACvftBRCAAAAFEBFVAIAAAAcwpeTggAAABziKtMCAAAAAZq/UoIAAAAPJ5TSQgAAAB7FK5HCAAAAIC8DEYIAAAAV4ZvRAgAAABeYtZCCAAAAEJBQUEIAAAA/BOwPwgAAADPyyI+CAAAAEhamTwIAAAAPLETOwgAAADCwpE5CAAAADmBEzgIAAAAPt+YNggAAACzzyE1CAAAALZFrjMIAAAAozQ+MggAAAAUkNEwCAAAANtLaC8IAAAABVwCLggAAADZtJ8sCAAAANFKQCsIAAAAnxLkKQgAAAApAYsoCAAAAIkLNScIAAAACSfiJQgAAAAlSZIkCAAAAIpnRSMIAAAAE3j7IQgAAADHcLQgCAAAAN1HcB8IAAAAtPMuHggAAADbavAcCAAAAAWktBsIAAAAEpZ7GggAAAAJOEUZCAAAABmBERgIAAAAlWjgFggAAAD45bEVCAAAAOHwhRQIAAAAFIFcEwgAAAB2jjUSCAAAABIREREIAAAAEAHvDwgAAAC/Vs8OCAAAAIkKsg0IAAAA/BSXDAgAAADDbn4LCAAAAKcQaAoIAAAAkfNTCQgAAACFEEIICAAAAKVgMgcIAAAAMN0kBggAAAB+fxkFCAAAAAVBEAQIAAAAUhsJAwgAAAARCAQCCAAAAAIBAQEIAAAA/////wAAAADwAwAAZAAAAGUAAAAIAAAAAwAAAHoAAABmAAAACQAAAP////8AAAAAAAQAAGcAAABoAAAACgAAAAQAAAB6AAAAZgAAAAsAAAD/////VBgAAAUAAAAAAAAAAAAAAHsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8AAAAQAAAACE0AAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAP//////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANxMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAABkAAAA6AMAABAnAACghgEAQEIPAICWmAAA4fUFX3CJAP8JLw8AAAAAAgAAAAMAAAAFAAAABwAAAAsAAAANAAAAEQAAABMAAAAXAAAAHQAAAB8AAAAlAAAAKQAAACsAAAAvAAAANQAAADsAAAA9AAAAQwAAAEcAAABJAAAATwAAAFMAAABZAAAAYQAAAGUAAABnAAAAawAAAG0AAABxAAAAfwAAAIMAAACJAAAAiwAAAJUAAACXAAAAnQAAAKMAAACnAAAArQAAALMAAAC1AAAAvwAAAMEAAADFAAAAxwAAANMAAAABAAAACwAAAA0AAAARAAAAEwAAABcAAAAdAAAAHwAAACUAAAApAAAAKwAAAC8AAAA1AAAAOwAAAD0AAABDAAAARwAAAEkAAABPAAAAUwAAAFkAAABhAAAAZQAAAGcAAABrAAAAbQAAAHEAAAB5AAAAfwAAAIMAAACJAAAAiwAAAI8AAACVAAAAlwAAAJ0AAACjAAAApwAAAKkAAACtAAAAswAAALUAAAC7AAAAvwAAAMEAAADFAAAAxwAAANEAAAACAAAAAAAAABAEAABpAAAAagAAAGsAAABsAAAAEgAAAAEAAAABAAAAAQAAAAAAAAA4BAAAaQAAAG0AAABrAAAAbAAAABIAAAACAAAAAgAAAAIAAAAAAAAASAQAAG4AAABvAAAAfAAAAAAAAABYBAAAbgAAAHAAAAB8AAAATjVkcmFjbzI4QXR0cmlidXRlT2N0YWhlZHJvblRyYW5zZm9ybUUATjVkcmFjbzE4QXR0cmlidXRlVHJhbnNmb3JtRQBONWRyYWNvMzBBdHRyaWJ1dGVRdWFudGl6YXRpb25UcmFuc2Zvcm1FAE41ZHJhY28xN0F0dHJpYnV0ZXNFbmNvZGVyRQBONWRyYWNvMjNLZFRyZWVBdHRyaWJ1dGVzRW5jb2RlckUATjVkcmFjbzI2U2VxdWVudGlhbEF0dHJpYnV0ZUVuY29kZXJFAE41ZHJhY28zN1NlcXVlbnRpYWxBdHRyaWJ1dGVFbmNvZGVyc0NvbnRyb2xsZXJFAE41ZHJhY28yOFByZWRpY3Rpb25TY2hlbWVEZWx0YUVuY29kZXJJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFRUUATjVkcmFjbzIzUHJlZGljdGlvblNjaGVtZUVuY29kZXJJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFRUUATjVkcmFjbzM3UHJlZGljdGlvblNjaGVtZVR5cGVkRW5jb2RlckludGVyZmFjZUlpaUVFAE41ZHJhY28zMlByZWRpY3Rpb25TY2hlbWVFbmNvZGVySW50ZXJmYWNlRQBONWRyYWNvMjVQcmVkaWN0aW9uU2NoZW1lSW50ZXJmYWNlRQBONWRyYWNvNDhNZXNoUHJlZGljdGlvblNjaGVtZUdlb21ldHJpY05vcm1hbFByZWRpY3RvckFyZWFJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMTFDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280OE1lc2hQcmVkaWN0aW9uU2NoZW1lR2VvbWV0cmljTm9ybWFsUHJlZGljdG9yQmFzZUlpTlNfMzdQcmVkaWN0aW9uU2NoZW1lV3JhcEVuY29kaW5nVHJhbnNmb3JtSWlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18xMUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQyTWVzaFByZWRpY3Rpb25TY2hlbWVHZW9tZXRyaWNOb3JtYWxFbmNvZGVySWlOU18zN1ByZWRpY3Rpb25TY2hlbWVXcmFwRW5jb2RpbmdUcmFuc2Zvcm1JaWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzExQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvMjdNZXNoUHJlZGljdGlvblNjaGVtZUVuY29kZXJJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMTFDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280NE1lc2hQcmVkaWN0aW9uU2NoZW1lVGV4Q29vcmRzUG9ydGFibGVFbmNvZGVySWlOU18zN1ByZWRpY3Rpb25TY2hlbWVXcmFwRW5jb2RpbmdUcmFuc2Zvcm1JaWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzExQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvMzZNZXNoUHJlZGljdGlvblNjaGVtZVRleENvb3Jkc0VuY29kZXJJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMTFDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY281Nk1lc2hQcmVkaWN0aW9uU2NoZW1lQ29uc3RyYWluZWRNdWx0aVBhcmFsbGVsb2dyYW1FbmNvZGVySWlOU18zN1ByZWRpY3Rpb25TY2hlbWVXcmFwRW5jb2RpbmdUcmFuc2Zvcm1JaWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzExQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNDVNZXNoUHJlZGljdGlvblNjaGVtZU11bHRpUGFyYWxsZWxvZ3JhbUVuY29kZXJJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMTFDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280ME1lc2hQcmVkaWN0aW9uU2NoZW1lUGFyYWxsZWxvZ3JhbUVuY29kZXJJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMTFDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280OE1lc2hQcmVkaWN0aW9uU2NoZW1lR2VvbWV0cmljTm9ybWFsUHJlZGljdG9yQXJlYUlpTlNfMzdQcmVkaWN0aW9uU2NoZW1lV3JhcEVuY29kaW5nVHJhbnNmb3JtSWlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18yNE1lc2hBdHRyaWJ1dGVDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280OE1lc2hQcmVkaWN0aW9uU2NoZW1lR2VvbWV0cmljTm9ybWFsUHJlZGljdG9yQmFzZUlpTlNfMzdQcmVkaWN0aW9uU2NoZW1lV3JhcEVuY29kaW5nVHJhbnNmb3JtSWlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18yNE1lc2hBdHRyaWJ1dGVDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280Mk1lc2hQcmVkaWN0aW9uU2NoZW1lR2VvbWV0cmljTm9ybWFsRW5jb2RlcklpTlNfMzdQcmVkaWN0aW9uU2NoZW1lV3JhcEVuY29kaW5nVHJhbnNmb3JtSWlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18yNE1lc2hBdHRyaWJ1dGVDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY28yN01lc2hQcmVkaWN0aW9uU2NoZW1lRW5jb2RlcklpTlNfMzdQcmVkaWN0aW9uU2NoZW1lV3JhcEVuY29kaW5nVHJhbnNmb3JtSWlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18yNE1lc2hBdHRyaWJ1dGVDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280NE1lc2hQcmVkaWN0aW9uU2NoZW1lVGV4Q29vcmRzUG9ydGFibGVFbmNvZGVySWlOU18zN1ByZWRpY3Rpb25TY2hlbWVXcmFwRW5jb2RpbmdUcmFuc2Zvcm1JaWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzM2TWVzaFByZWRpY3Rpb25TY2hlbWVUZXhDb29yZHNFbmNvZGVySWlOU18zN1ByZWRpY3Rpb25TY2hlbWVXcmFwRW5jb2RpbmdUcmFuc2Zvcm1JaWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzU2TWVzaFByZWRpY3Rpb25TY2hlbWVDb25zdHJhaW5lZE11bHRpUGFyYWxsZWxvZ3JhbUVuY29kZXJJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMjRNZXNoQXR0cmlidXRlQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNDVNZXNoUHJlZGljdGlvblNjaGVtZU11bHRpUGFyYWxsZWxvZ3JhbUVuY29kZXJJaU5TXzM3UHJlZGljdGlvblNjaGVtZVdyYXBFbmNvZGluZ1RyYW5zZm9ybUlpaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMjRNZXNoQXR0cmlidXRlQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNDBNZXNoUHJlZGljdGlvblNjaGVtZVBhcmFsbGVsb2dyYW1FbmNvZGVySWlOU18zN1ByZWRpY3Rpb25TY2hlbWVXcmFwRW5jb2RpbmdUcmFuc2Zvcm1JaWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFRUUAdXNlX2J1aWx0X2luX2F0dHJpYnV0ZV9jb21wcmVzc2lvbgBONWRyYWNvMzNTZXF1ZW50aWFsSW50ZWdlckF0dHJpYnV0ZUVuY29kZXJFAE41ZHJhY28yOFByZWRpY3Rpb25TY2hlbWVEZWx0YUVuY29kZXJJaU5TXzYyUHJlZGljdGlvblNjaGVtZU5vcm1hbE9jdGFoZWRyb25DYW5vbmljYWxpemVkRW5jb2RpbmdUcmFuc2Zvcm1JaUVFRUUATjVkcmFjbzIzUHJlZGljdGlvblNjaGVtZUVuY29kZXJJaU5TXzYyUHJlZGljdGlvblNjaGVtZU5vcm1hbE9jdGFoZWRyb25DYW5vbmljYWxpemVkRW5jb2RpbmdUcmFuc2Zvcm1JaUVFRUUATjVkcmFjbzQ4TWVzaFByZWRpY3Rpb25TY2hlbWVHZW9tZXRyaWNOb3JtYWxQcmVkaWN0b3JBcmVhSWlOU182MlByZWRpY3Rpb25TY2hlbWVOb3JtYWxPY3RhaGVkcm9uQ2Fub25pY2FsaXplZEVuY29kaW5nVHJhbnNmb3JtSWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzExQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNDhNZXNoUHJlZGljdGlvblNjaGVtZUdlb21ldHJpY05vcm1hbFByZWRpY3RvckJhc2VJaU5TXzYyUHJlZGljdGlvblNjaGVtZU5vcm1hbE9jdGFoZWRyb25DYW5vbmljYWxpemVkRW5jb2RpbmdUcmFuc2Zvcm1JaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMTFDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY280Mk1lc2hQcmVkaWN0aW9uU2NoZW1lR2VvbWV0cmljTm9ybWFsRW5jb2RlcklpTlNfNjJQcmVkaWN0aW9uU2NoZW1lTm9ybWFsT2N0YWhlZHJvbkNhbm9uaWNhbGl6ZWRFbmNvZGluZ1RyYW5zZm9ybUlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18xMUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzI3TWVzaFByZWRpY3Rpb25TY2hlbWVFbmNvZGVySWlOU182MlByZWRpY3Rpb25TY2hlbWVOb3JtYWxPY3RhaGVkcm9uQ2Fub25pY2FsaXplZEVuY29kaW5nVHJhbnNmb3JtSWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzExQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNDRNZXNoUHJlZGljdGlvblNjaGVtZVRleENvb3Jkc1BvcnRhYmxlRW5jb2RlcklpTlNfNjJQcmVkaWN0aW9uU2NoZW1lTm9ybWFsT2N0YWhlZHJvbkNhbm9uaWNhbGl6ZWRFbmNvZGluZ1RyYW5zZm9ybUlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18xMUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzM2TWVzaFByZWRpY3Rpb25TY2hlbWVUZXhDb29yZHNFbmNvZGVySWlOU182MlByZWRpY3Rpb25TY2hlbWVOb3JtYWxPY3RhaGVkcm9uQ2Fub25pY2FsaXplZEVuY29kaW5nVHJhbnNmb3JtSWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzExQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNTZNZXNoUHJlZGljdGlvblNjaGVtZUNvbnN0cmFpbmVkTXVsdGlQYXJhbGxlbG9ncmFtRW5jb2RlcklpTlNfNjJQcmVkaWN0aW9uU2NoZW1lTm9ybWFsT2N0YWhlZHJvbkNhbm9uaWNhbGl6ZWRFbmNvZGluZ1RyYW5zZm9ybUlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18xMUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQ1TWVzaFByZWRpY3Rpb25TY2hlbWVNdWx0aVBhcmFsbGVsb2dyYW1FbmNvZGVySWlOU182MlByZWRpY3Rpb25TY2hlbWVOb3JtYWxPY3RhaGVkcm9uQ2Fub25pY2FsaXplZEVuY29kaW5nVHJhbnNmb3JtSWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzExQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNDBNZXNoUHJlZGljdGlvblNjaGVtZVBhcmFsbGVsb2dyYW1FbmNvZGVySWlOU182MlByZWRpY3Rpb25TY2hlbWVOb3JtYWxPY3RhaGVkcm9uQ2Fub25pY2FsaXplZEVuY29kaW5nVHJhbnNmb3JtSWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzExQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNDhNZXNoUHJlZGljdGlvblNjaGVtZUdlb21ldHJpY05vcm1hbFByZWRpY3RvckFyZWFJaU5TXzYyUHJlZGljdGlvblNjaGVtZU5vcm1hbE9jdGFoZWRyb25DYW5vbmljYWxpemVkRW5jb2RpbmdUcmFuc2Zvcm1JaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMjRNZXNoQXR0cmlidXRlQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNDhNZXNoUHJlZGljdGlvblNjaGVtZUdlb21ldHJpY05vcm1hbFByZWRpY3RvckJhc2VJaU5TXzYyUHJlZGljdGlvblNjaGVtZU5vcm1hbE9jdGFoZWRyb25DYW5vbmljYWxpemVkRW5jb2RpbmdUcmFuc2Zvcm1JaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMjRNZXNoQXR0cmlidXRlQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNDJNZXNoUHJlZGljdGlvblNjaGVtZUdlb21ldHJpY05vcm1hbEVuY29kZXJJaU5TXzYyUHJlZGljdGlvblNjaGVtZU5vcm1hbE9jdGFoZWRyb25DYW5vbmljYWxpemVkRW5jb2RpbmdUcmFuc2Zvcm1JaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMjRNZXNoQXR0cmlidXRlQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvMjdNZXNoUHJlZGljdGlvblNjaGVtZUVuY29kZXJJaU5TXzYyUHJlZGljdGlvblNjaGVtZU5vcm1hbE9jdGFoZWRyb25DYW5vbmljYWxpemVkRW5jb2RpbmdUcmFuc2Zvcm1JaUVFTlNfMjRNZXNoUHJlZGljdGlvblNjaGVtZURhdGFJTlNfMjRNZXNoQXR0cmlidXRlQ29ybmVyVGFibGVFRUVFRQBONWRyYWNvNDRNZXNoUHJlZGljdGlvblNjaGVtZVRleENvb3Jkc1BvcnRhYmxlRW5jb2RlcklpTlNfNjJQcmVkaWN0aW9uU2NoZW1lTm9ybWFsT2N0YWhlZHJvbkNhbm9uaWNhbGl6ZWRFbmNvZGluZ1RyYW5zZm9ybUlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18yNE1lc2hBdHRyaWJ1dGVDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY28zNk1lc2hQcmVkaWN0aW9uU2NoZW1lVGV4Q29vcmRzRW5jb2RlcklpTlNfNjJQcmVkaWN0aW9uU2NoZW1lTm9ybWFsT2N0YWhlZHJvbkNhbm9uaWNhbGl6ZWRFbmNvZGluZ1RyYW5zZm9ybUlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18yNE1lc2hBdHRyaWJ1dGVDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY281Nk1lc2hQcmVkaWN0aW9uU2NoZW1lQ29uc3RyYWluZWRNdWx0aVBhcmFsbGVsb2dyYW1FbmNvZGVySWlOU182MlByZWRpY3Rpb25TY2hlbWVOb3JtYWxPY3RhaGVkcm9uQ2Fub25pY2FsaXplZEVuY29kaW5nVHJhbnNmb3JtSWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQ1TWVzaFByZWRpY3Rpb25TY2hlbWVNdWx0aVBhcmFsbGVsb2dyYW1FbmNvZGVySWlOU182MlByZWRpY3Rpb25TY2hlbWVOb3JtYWxPY3RhaGVkcm9uQ2Fub25pY2FsaXplZEVuY29kaW5nVHJhbnNmb3JtSWlFRU5TXzI0TWVzaFByZWRpY3Rpb25TY2hlbWVEYXRhSU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFRUUATjVkcmFjbzQwTWVzaFByZWRpY3Rpb25TY2hlbWVQYXJhbGxlbG9ncmFtRW5jb2RlcklpTlNfNjJQcmVkaWN0aW9uU2NoZW1lTm9ybWFsT2N0YWhlZHJvbkNhbm9uaWNhbGl6ZWRFbmNvZGluZ1RyYW5zZm9ybUlpRUVOU18yNE1lc2hQcmVkaWN0aW9uU2NoZW1lRGF0YUlOU18yNE1lc2hBdHRyaWJ1dGVDb3JuZXJUYWJsZUVFRUVFAE41ZHJhY28zMlNlcXVlbnRpYWxOb3JtYWxBdHRyaWJ1dGVFbmNvZGVyRQBONWRyYWNvMzhTZXF1ZW50aWFsUXVhbnRpemF0aW9uQXR0cmlidXRlRW5jb2RlckUAcHJlZGljdGlvbl9zY2hlbWUAZW5jb2Rpbmdfc3BlZWQAZGVjb2Rpbmdfc3BlZWQAcXVhbnRpemF0aW9uX29yaWdpbgBxdWFudGl6YXRpb25fcmFuZ2UAIABlbmNvZGluZ19tZXRob2QAcXVhbnRpemF0aW9uX2JpdHMASW52YWxpZCBlbmNvZGluZyBtZXRob2QuAHN0YW5kYXJkX2VkZ2VicmVha2VyAHByZWRpY3RpdmVfZWRnZWJyZWFrZXIAZWRnZWJyZWFrZXJfbWV0aG9kAE41ZHJhY28yMk1lc2hFZGdlQnJlYWtlckVuY29kZXJFAE41ZHJhY28yOUNvcm5lclRhYmxlVHJhdmVyc2FsUHJvY2Vzc29ySU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFAE41ZHJhY28yMk1lc2hUcmF2ZXJzYWxTZXF1ZW5jZXJJTlNfMjBFZGdlQnJlYWtlclRyYXZlcnNlcklOU18yOUNvcm5lclRhYmxlVHJhdmVyc2FsUHJvY2Vzc29ySU5TXzI0TWVzaEF0dHJpYnV0ZUNvcm5lclRhYmxlRUVFTlNfMzZNZXNoQXR0cmlidXRlSW5kaWNlc0VuY29kaW5nT2JzZXJ2ZXJJUzNfRUVOU18xOUVkZ2VCcmVha2VyT2JzZXJ2ZXJFRUVFRQBONWRyYWNvMTVQb2ludHNTZXF1ZW5jZXJFAE41ZHJhY28yOUNvcm5lclRhYmxlVHJhdmVyc2FsUHJvY2Vzc29ySU5TXzExQ29ybmVyVGFibGVFRUUATjVkcmFjbzIyTWVzaFRyYXZlcnNhbFNlcXVlbmNlcklOU18yMEVkZ2VCcmVha2VyVHJhdmVyc2VySU5TXzI5Q29ybmVyVGFibGVUcmF2ZXJzYWxQcm9jZXNzb3JJTlNfMTFDb3JuZXJUYWJsZUVFRU5TXzM2TWVzaEF0dHJpYnV0ZUluZGljZXNFbmNvZGluZ09ic2VydmVySVMzX0VFTlNfMTlFZGdlQnJlYWtlck9ic2VydmVyRUVFRUUATjVkcmFjbzIyTWVzaFRyYXZlcnNhbFNlcXVlbmNlcklOU18yNVByZWRpY3Rpb25EZWdyZWVUcmF2ZXJzZXJJTlNfMjlDb3JuZXJUYWJsZVRyYXZlcnNhbFByb2Nlc3NvcklOU18xMUNvcm5lclRhYmxlRUVFTlNfMzZNZXNoQXR0cmlidXRlSW5kaWNlc0VuY29kaW5nT2JzZXJ2ZXJJUzNfRUVFRUVFAHNwbGl0X21lc2hfb25fc2VhbXMATjVkcmFjbzI2TWVzaEVkZ2VCcmVha2VyRW5jb2RlckltcGxJTlNfMzFNZXNoRWRnZUJyZWFrZXJUcmF2ZXJzYWxFbmNvZGVyRUVFAE41ZHJhY28zNU1lc2hFZGdlQnJlYWtlckVuY29kZXJJbXBsSW50ZXJmYWNlRQBONWRyYWNvMjZNZXNoRWRnZUJyZWFrZXJFbmNvZGVySW1wbElOU18zOE1lc2hFZGdlQnJlYWtlclRyYXZlcnNhbFZhbGVuY2VFbmNvZGVyRUVFAE41ZHJhY28xMU1lc2hFbmNvZGVyRQBjb21wcmVzc19jb25uZWN0aXZpdHkATjVkcmFjbzE1TGluZWFyU2VxdWVuY2VyRQBONWRyYWNvMjFNZXNoU2VxdWVudGlhbEVuY29kZXJFAE41ZHJhY28xN1BvaW50Q2xvdWRFbmNvZGVyRQBJbnZhbGlkIGlucHV0IGdlb21ldHJ5LgBGYWlsZWQgdG8gaW5pdGlhbGl6ZSBlbmNvZGVyLgBGYWlsZWQgdG8gZW5jb2RlIGludGVybmFsIGRhdGEuAEZhaWxlZCB0byBlbmNvZGUgZ2VvbWV0cnkgZGF0YS4ARmFpbGVkIHRvIGVuY29kZSBwb2ludCBhdHRyaWJ1dGVzLgBGYWlsZWQgdG8gZW5jb2RlIG1ldGFkYXRhLgBEUkFDTwBONWRyYWNvMjNQb2ludENsb3VkS2RUcmVlRW5jb2RlckUATjVkcmFjbzI3UG9pbnRDbG91ZFNlcXVlbnRpYWxFbmNvZGVyRQBzeW1ib2xfZW5jb2RpbmdfbWV0aG9kAHN5bWJvbF9lbmNvZGluZ19jb21wcmVzc2lvbl9sZXZlbABONWRyYWNvNE1lc2hFAGFsbG9jYXRvcjxUPjo6YWxsb2NhdGUoc2l6ZV90IG4pICduJyBleGNlZWRzIG1heGltdW0gc3VwcG9ydGVkIHNpemUATjVkcmFjbzEwUG9pbnRDbG91ZEUAEQAKABEREQAAAAAFAAAAAAAACQAAAAALAAAAAAAAAAARAA8KERERAwoHAAETCQsLAAAJBgsAAAsABhEAAAAREREAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAEQAKChEREQAKAAACAAkLAAAACQALAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAADAAAAAAJDAAAAAAADAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAANAAAABA0AAAAACQ4AAAAAAA4AAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAADwAAAAAPAAAAAAkQAAAAAAAQAAAQAAASAAAAEhISAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAASEhIAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAKAAAAAAoAAAAACQsAAAAAAAsAAAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAMAAAAAAkMAAAAAAAMAAAMAAAtKyAgIDBYMHgAKG51bGwpAC0wWCswWCAwWC0weCsweCAweABpbmYASU5GAE5BTgAwMTIzNDU2Nzg5QUJDREVGLgBUISIZDQECAxFLHAwQBAsdEh4naG5vcHFiIAUGDxMUFRoIFgcoJBcYCQoOGx8lI4OCfSYqKzw9Pj9DR0pNWFlaW1xdXl9gYWNkZWZnaWprbHJzdHl6e3wASWxsZWdhbCBieXRlIHNlcXVlbmNlAERvbWFpbiBlcnJvcgBSZXN1bHQgbm90IHJlcHJlc2VudGFibGUATm90IGEgdHR5AFBlcm1pc3Npb24gZGVuaWVkAE9wZXJhdGlvbiBub3QgcGVybWl0dGVkAE5vIHN1Y2ggZmlsZSBvciBkaXJlY3RvcnkATm8gc3VjaCBwcm9jZXNzAEZpbGUgZXhpc3RzAFZhbHVlIHRvbyBsYXJnZSBmb3IgZGF0YSB0eXBlAE5vIHNwYWNlIGxlZnQgb24gZGV2aWNlAE91dCBvZiBtZW1vcnkAUmVzb3VyY2UgYnVzeQBJbnRlcnJ1cHRlZCBzeXN0ZW0gY2FsbABSZXNvdXJjZSB0ZW1wb3JhcmlseSB1bmF2YWlsYWJsZQBJbnZhbGlkIHNlZWsAQ3Jvc3MtZGV2aWNlIGxpbmsAUmVhZC1vbmx5IGZpbGUgc3lzdGVtAERpcmVjdG9yeSBub3QgZW1wdHkAQ29ubmVjdGlvbiByZXNldCBieSBwZWVyAE9wZXJhdGlvbiB0aW1lZCBvdXQAQ29ubmVjdGlvbiByZWZ1c2VkAEhvc3QgaXMgZG93bgBIb3N0IGlzIHVucmVhY2hhYmxlAEFkZHJlc3MgaW4gdXNlAEJyb2tlbiBwaXBlAEkvTyBlcnJvcgBObyBzdWNoIGRldmljZSBvciBhZGRyZXNzAEJsb2NrIGRldmljZSByZXF1aXJlZABObyBzdWNoIGRldmljZQBOb3QgYSBkaXJlY3RvcnkASXMgYSBkaXJlY3RvcnkAVGV4dCBmaWxlIGJ1c3kARXhlYyBmb3JtYXQgZXJyb3IASW52YWxpZCBhcmd1bWVudABBcmd1bWVudCBsaXN0IHRvbyBsb25nAFN5bWJvbGljIGxpbmsgbG9vcABGaWxlbmFtZSB0b28gbG9uZwBUb28gbWFueSBvcGVuIGZpbGVzIGluIHN5c3RlbQBObyBmaWxlIGRlc2NyaXB0b3JzIGF2YWlsYWJsZQBCYWQgZmlsZSBkZXNjcmlwdG9yAE5vIGNoaWxkIHByb2Nlc3MAQmFkIGFkZHJlc3MARmlsZSB0b28gbGFyZ2UAVG9vIG1hbnkgbGlua3MATm8gbG9ja3MgYXZhaWxhYmxlAFJlc291cmNlIGRlYWRsb2NrIHdvdWxkIG9jY3VyAFN0YXRlIG5vdCByZWNvdmVyYWJsZQBQcmV2aW91cyBvd25lciBkaWVkAE9wZXJhdGlvbiBjYW5jZWxlZABGdW5jdGlvbiBub3QgaW1wbGVtZW50ZWQATm8gbWVzc2FnZSBvZiBkZXNpcmVkIHR5cGUASWRlbnRpZmllciByZW1vdmVkAERldmljZSBub3QgYSBzdHJlYW0ATm8gZGF0YSBhdmFpbGFibGUARGV2aWNlIHRpbWVvdXQAT3V0IG9mIHN0cmVhbXMgcmVzb3VyY2VzAExpbmsgaGFzIGJlZW4gc2V2ZXJlZABQcm90b2NvbCBlcnJvcgBCYWQgbWVzc2FnZQBGaWxlIGRlc2NyaXB0b3IgaW4gYmFkIHN0YXRlAE5vdCBhIHNvY2tldABEZXN0aW5hdGlvbiBhZGRyZXNzIHJlcXVpcmVkAE1lc3NhZ2UgdG9vIGxhcmdlAFByb3RvY29sIHdyb25nIHR5cGUgZm9yIHNvY2tldABQcm90b2NvbCBub3QgYXZhaWxhYmxlAFByb3RvY29sIG5vdCBzdXBwb3J0ZWQAU29ja2V0IHR5cGUgbm90IHN1cHBvcnRlZABOb3Qgc3VwcG9ydGVkAFByb3RvY29sIGZhbWlseSBub3Qgc3VwcG9ydGVkAEFkZHJlc3MgZmFtaWx5IG5vdCBzdXBwb3J0ZWQgYnkgcHJvdG9jb2wAQWRkcmVzcyBub3QgYXZhaWxhYmxlAE5ldHdvcmsgaXMgZG93bgBOZXR3b3JrIHVucmVhY2hhYmxlAENvbm5lY3Rpb24gcmVzZXQgYnkgbmV0d29yawBDb25uZWN0aW9uIGFib3J0ZWQATm8gYnVmZmVyIHNwYWNlIGF2YWlsYWJsZQBTb2NrZXQgaXMgY29ubmVjdGVkAFNvY2tldCBub3QgY29ubmVjdGVkAENhbm5vdCBzZW5kIGFmdGVyIHNvY2tldCBzaHV0ZG93bgBPcGVyYXRpb24gYWxyZWFkeSBpbiBwcm9ncmVzcwBPcGVyYXRpb24gaW4gcHJvZ3Jlc3MAU3RhbGUgZmlsZSBoYW5kbGUAUmVtb3RlIEkvTyBlcnJvcgBRdW90YSBleGNlZWRlZABObyBtZWRpdW0gZm91bmQAV3JvbmcgbWVkaXVtIHR5cGUATm8gZXJyb3IgaW5mb3JtYXRpb24AAGluZmluaXR5AG5hbgAlZAAlZgB0ZXJtaW5hdGluZyB3aXRoICVzIGV4Y2VwdGlvbiBvZiB0eXBlICVzOiAlcwB0ZXJtaW5hdGluZyB3aXRoICVzIGV4Y2VwdGlvbiBvZiB0eXBlICVzAHRlcm1pbmF0aW5nIHdpdGggJXMgZm9yZWlnbiBleGNlcHRpb24AdGVybWluYXRpbmcAdW5jYXVnaHQAU3Q5ZXhjZXB0aW9uAE4xMF9fY3h4YWJpdjExNl9fc2hpbV90eXBlX2luZm9FAFN0OXR5cGVfaW5mbwBOMTBfX2N4eGFiaXYxMjBfX3NpX2NsYXNzX3R5cGVfaW5mb0UATjEwX19jeHhhYml2MTE3X19jbGFzc190eXBlX2luZm9FAHB0aHJlYWRfb25jZSBmYWlsdXJlIGluIF9fY3hhX2dldF9nbG9iYWxzX2Zhc3QoKQBjYW5ub3QgY3JlYXRlIHB0aHJlYWQga2V5IGZvciBfX2N4YV9nZXRfZ2xvYmFscygpAGNhbm5vdCB6ZXJvIG91dCB0aHJlYWQgdmFsdWUgZm9yIF9fY3hhX2dldF9nbG9iYWxzKCkAdGVybWluYXRlX2hhbmRsZXIgdW5leHBlY3RlZGx5IHJldHVybmVkAFN0MTFsb2dpY19lcnJvcgBTdDEybGVuZ3RoX2Vycm9yAE4xMF9fY3h4YWJpdjExOV9fcG9pbnRlcl90eXBlX2luZm9FAE4xMF9fY3h4YWJpdjExN19fcGJhc2VfdHlwZV9pbmZvRQ==";var tempDoublePtr=STATICTOP;STATICTOP+=16;function ___cxa_allocate_exception(size){return _malloc(size)}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:(function(adjusted){if(!adjusted||EXCEPTIONS.infos[adjusted])return adjusted;for(var ptr in EXCEPTIONS.infos){var info=EXCEPTIONS.infos[ptr];if(info.adjusted===adjusted){return ptr}}return adjusted}),addRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount++}),decRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];assert(info.refcount>0);info.refcount--;if(info.refcount===0&&!info.rethrown){if(info.destructor){Module["dynCall_vi"](info.destructor,ptr)}delete EXCEPTIONS.infos[ptr];___cxa_free_exception(ptr)}}),clearRef:(function(ptr){if(!ptr)return;var info=EXCEPTIONS.infos[ptr];info.refcount=0})};function ___cxa_begin_catch(ptr){var info=EXCEPTIONS.infos[ptr];if(info&&!info.caught){info.caught=true;__ZSt18uncaught_exceptionv.uncaught_exception--}if(info)info.rethrown=false;EXCEPTIONS.caught.push(ptr);EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(ptr));return ptr}function ___cxa_pure_virtual(){ABORT=true;throw"Pure virtual function called!"}function ___resumeException(ptr){if(!EXCEPTIONS.last){EXCEPTIONS.last=ptr}throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}function ___cxa_find_matching_catch(){var thrown=EXCEPTIONS.last;if(!thrown){return(setTempRet0(0),0)|0}var info=EXCEPTIONS.infos[thrown];var throwntype=info.type;if(!throwntype){return(setTempRet0(0),thrown)|0}var typeArray=Array.prototype.slice.call(arguments);var pointer=Module["___cxa_is_pointer_type"](throwntype);if(!___cxa_find_matching_catch.buffer)___cxa_find_matching_catch.buffer=_malloc(4);HEAP32[___cxa_find_matching_catch.buffer>>2]=thrown;thrown=___cxa_find_matching_catch.buffer;for(var i=0;i>2];info.adjusted=thrown;return(setTempRet0(typeArray[i]),thrown)|0}}thrown=HEAP32[thrown>>2];return(setTempRet0(throwntype),thrown)|0}function ___cxa_throw(ptr,type,destructor){EXCEPTIONS.infos[ptr]={ptr:ptr,adjusted:ptr,type:type,destructor:destructor,refcount:0,caught:false,rethrown:false};EXCEPTIONS.last=ptr;if(!("uncaught_exception"in __ZSt18uncaught_exceptionv)){__ZSt18uncaught_exceptionv.uncaught_exception=1}else{__ZSt18uncaught_exceptionv.uncaught_exception++}throw ptr+" - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch."}var cttz_i8=allocate([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",ALLOC_STATIC);function ___gxx_personality_v0(){}var SYSCALLS={varargs:0,get:(function(varargs){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret}),getStr:(function(){var ret=Pointer_stringify(SYSCALLS.get());return ret}),get64:(function(){var low=SYSCALLS.get(),high=SYSCALLS.get();if(low>=0)assert(high===0);else assert(high===-1);return low}),getZero:(function(){assert(SYSCALLS.get()===0)})};function ___syscall140(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(),offset_high=SYSCALLS.get(),offset_low=SYSCALLS.get(),result=SYSCALLS.get(),whence=SYSCALLS.get();var offset=offset_low;FS.llseek(stream,offset,whence);HEAP32[result>>2]=stream.position;if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS==="undefined"||!(e instanceof FS.ErrnoError))abort(e);return-e.errno}}function flush_NO_FILESYSTEM(){var fflush=Module["_fflush"];if(fflush)fflush(0);var printChar=___syscall146.printChar;if(!printChar)return;var buffers=___syscall146.buffers;if(buffers[1].length)printChar(1,10);if(buffers[2].length)printChar(2,10)}function ___syscall146(which,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.get(),iov=SYSCALLS.get(),iovcnt=SYSCALLS.get();var ret=0;if(!___syscall146.buffers){___syscall146.buffers=[null,[],[]];___syscall146.printChar=(function(stream,curr){var buffer=___syscall146.buffers[stream];assert(buffer);if(curr===0||curr===10){(stream===1?Module["print"]:Module["printErr"])(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}})}for(var i=0;i>2];var len=HEAP32[iov+(i*8+4)>>2];for(var j=0;j>2]=PTHREAD_SPECIFIC_NEXT_KEY;PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0;PTHREAD_SPECIFIC_NEXT_KEY++;return 0}function _pthread_once(ptr,func){if(!_pthread_once.seen)_pthread_once.seen={};if(ptr in _pthread_once.seen)return;Module["dynCall_v"](func);_pthread_once.seen[ptr]=1}function _pthread_setspecific(key,value){if(!(key in PTHREAD_SPECIFIC)){return ERRNO_CODES.EINVAL}PTHREAD_SPECIFIC[key]=value;return 0}function ___setErrNo(value){if(Module["___errno_location"])HEAP32[Module["___errno_location"]()>>2]=value;return value}DYNAMICTOP_PTR=staticAlloc(4);STACK_BASE=STACKTOP=alignMemory(STATICTOP);STACK_MAX=STACK_BASE+TOTAL_STACK;DYNAMIC_BASE=alignMemory(STACK_MAX);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;staticSealed=true;var ASSERTIONS=false;function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}function intArrayToString(array){var ret=[];for(var i=0;i255){if(ASSERTIONS){assert(false,"Character code "+chr+" ("+String.fromCharCode(chr)+") at offset "+i+" not in 0x00-0xFF.")}chr&=255}ret.push(String.fromCharCode(chr))}return ret.join("")}var decodeBase64=typeof atob==="function"?atob:(function(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i2147483648)return false;b=new a(newBuffer);d=new c(newBuffer);f=new e(newBuffer);h=new g(newBuffer);j=new i(newBuffer);l=new k(newBuffer);n=new m(newBuffer);p=new o(newBuffer);buffer=newBuffer;return true} +// EMSCRIPTEN_START_FUNCS +function be(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;h=u;u=u+16|0;i=h+4|0;j=h;f[a+72>>2]=e;f[a+64>>2]=g;g=Lq(e>>>0>1073741823?-1:e<<2)|0;k=a+68|0;l=f[k>>2]|0;f[k>>2]=g;if(l|0)Mq(l);l=a+8|0;Mh(l,b,d,e);d=a+56|0;g=f[d>>2]|0;m=f[g+4>>2]|0;n=f[g>>2]|0;o=m-n|0;if((o|0)<=0){u=h;return 1}p=(o>>>2)+-1|0;o=a+16|0;q=a+32|0;r=a+12|0;s=a+28|0;t=a+20|0;v=a+24|0;if(m-n>>2>>>0>p>>>0){w=p;x=n}else{y=g;aq(y)}while(1){f[j>>2]=f[x+(w<<2)>>2];f[i>>2]=f[j>>2];Cc(a,i,b,w);g=X(w,e)|0;n=b+(g<<2)|0;p=c+(g<<2)|0;g=f[l>>2]|0;if((g|0)>0){m=0;z=f[k>>2]|0;A=g;while(1){if((A|0)>0){g=0;do{B=f[z+(g<<2)>>2]|0;C=f[o>>2]|0;if((B|0)>(C|0)){D=f[q>>2]|0;f[D+(g<<2)>>2]=C;E=D}else{D=f[r>>2]|0;C=f[q>>2]|0;f[C+(g<<2)>>2]=(B|0)<(D|0)?D:B;E=C}g=g+1|0}while((g|0)<(f[l>>2]|0));F=E}else F=f[q>>2]|0;g=(f[n+(m<<2)>>2]|0)-(f[F+(m<<2)>>2]|0)|0;C=p+(m<<2)|0;f[C>>2]=g;if((g|0)>=(f[s>>2]|0)){if((g|0)>(f[v>>2]|0)){G=g-(f[t>>2]|0)|0;H=21}}else{G=(f[t>>2]|0)+g|0;H=21}if((H|0)==21){H=0;f[C>>2]=G}m=m+1|0;A=f[l>>2]|0;if((m|0)>=(A|0))break;else z=F}}w=w+-1|0;if((w|0)<=-1){H=5;break}z=f[d>>2]|0;x=f[z>>2]|0;if((f[z+4>>2]|0)-x>>2>>>0<=w>>>0){y=z;H=6;break}}if((H|0)==5){u=h;return 1}else if((H|0)==6)aq(y);return 0}function ce(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;Uc(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=4194304;if(d){d=c;c=4194304;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<20)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Mf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function de(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;Vc(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=4194304;if(d){d=c;c=4194304;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<20)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Mf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function ee(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;Wc(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=4194304;if(d){d=c;c=4194304;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<20)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Mf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function fe(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;Xc(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=4194304;if(d){d=c;c=4194304;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<20)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Mf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function ge(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;Yc(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=4194304;if(d){d=c;c=4194304;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<20)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Mf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function he(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;Zc(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=2097152;if(d){d=c;c=2097152;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<19)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Nf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function ie(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;_c(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=1048576;if(d){d=c;c=1048576;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<18)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Of(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function je(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=Oa,t=Oa,u=Oa,v=0,w=0,x=0,y=0,z=0;c=f[b>>2]|0;b=a+4|0;d=f[b>>2]|0;e=(d|0)==0;a:do if(!e){g=d+-1|0;h=(g&d|0)==0;if(!h)if(c>>>0>>0)i=c;else i=(c>>>0)%(d>>>0)|0;else i=g&c;j=f[(f[a>>2]|0)+(i<<2)>>2]|0;if(!j)k=i;else{if(h){h=j;while(1){l=f[h>>2]|0;if(!l){k=i;break a}m=f[l+4>>2]|0;if(!((m|0)==(c|0)|(m&g|0)==(i|0))){k=i;break a}if((f[l+8>>2]|0)==(c|0)){o=l;break}else h=l}p=o+12|0;return p|0}else q=j;while(1){h=f[q>>2]|0;if(!h){k=i;break a}g=f[h+4>>2]|0;if((g|0)!=(c|0)){if(g>>>0>>0)r=g;else r=(g>>>0)%(d>>>0)|0;if((r|0)!=(i|0)){k=i;break a}}if((f[h+8>>2]|0)==(c|0)){o=h;break}else q=h}p=o+12|0;return p|0}}else k=0;while(0);q=ln(16)|0;f[q+8>>2]=c;f[q+12>>2]=0;f[q+4>>2]=c;f[q>>2]=0;i=a+12|0;s=$(((f[i>>2]|0)+1|0)>>>0);t=$(d>>>0);u=$(n[a+16>>2]);do if(e|$(u*t)>>0<3|(d+-1&d|0)!=0)&1;j=~~$(W($(s/u)))>>>0;Hi(a,r>>>0>>0?j:r);r=f[b>>2]|0;j=r+-1|0;if(!(j&r)){v=r;w=j&c;break}if(c>>>0>>0){v=r;w=c}else{v=r;w=(c>>>0)%(r>>>0)|0}}else{v=d;w=k}while(0);k=(f[a>>2]|0)+(w<<2)|0;w=f[k>>2]|0;if(!w){d=a+8|0;f[q>>2]=f[d>>2];f[d>>2]=q;f[k>>2]=d;d=f[q>>2]|0;if(d|0){k=f[d+4>>2]|0;d=v+-1|0;if(d&v)if(k>>>0>>0)x=k;else x=(k>>>0)%(v>>>0)|0;else x=k&d;y=(f[a>>2]|0)+(x<<2)|0;z=30}}else{f[q>>2]=f[w>>2];y=w;z=30}if((z|0)==30)f[y>>2]=q;f[i>>2]=(f[i>>2]|0)+1;o=q;p=o+12|0;return p|0}function ke(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;$c(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=262144;if(d){d=c;c=262144;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<16)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Rf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function le(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;ad(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=131072;if(d){d=c;c=131072;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<15)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Sf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function me(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;bd(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=32768;if(d){d=c;c=32768;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<13)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}Uf(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function ne(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;cd(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}_f(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function oe(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;dd(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}_f(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function pe(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;ed(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}_f(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function qe(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;fd(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}_f(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function re(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;gd(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}_f(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function se(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;hd(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}_f(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function te(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;id(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}_f(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function ue(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;g=u;u=u+64|0;h=g+48|0;i=g;j=d+1|0;f[h>>2]=0;k=h+4|0;f[k>>2]=0;f[h+8>>2]=0;do if(j)if(j>>>0>536870911)aq(h);else{l=ln(j<<3)|0;f[h>>2]=l;m=l+(j<<3)|0;f[h+8>>2]=m;sj(l|0,0,(d<<3)+8|0)|0;f[k>>2]=m;n=l;o=m;break}else{n=0;o=0}while(0);d=(c|0)>0;if(d){j=0;do{m=n+(f[a+(j<<2)>>2]<<3)|0;l=m;p=Vn(f[l>>2]|0,f[l+4>>2]|0,1,0)|0;l=m;f[l>>2]=p;f[l+4>>2]=I;j=j+1|0}while((j|0)!=(c|0))}j=i+40|0;l=j;f[l>>2]=0;f[l+4>>2]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;f[i+16>>2]=0;f[i+20>>2]=0;jd(i,n,o-n>>3,e)|0;n=i+16|0;o=Tn(f[n>>2]|0,f[n+4>>2]|0,1)|0;n=(f[e+4>>2]|0)-(f[e>>2]|0)|0;l=j;f[l>>2]=n;f[l+4>>2]=0;l=Vn(o|0,I|0,39,0)|0;o=Yn(l|0,I|0,3)|0;l=Vn(o|0,I|0,8,0)|0;o=Vn(l|0,I|0,n|0,0)|0;Cl(e,o,I);o=i+24|0;f[o>>2]=(f[e>>2]|0)+(f[j>>2]|0);j=i+28|0;f[j>>2]=0;n=i+32|0;f[n>>2]=16384;if(d){d=c;c=16384;do{l=d;d=d+-1|0;p=f[a+(d<<2)>>2]|0;m=f[i>>2]|0;q=f[m+(p<<3)>>2]|0;r=q<<10;if(c>>>0>>0)s=c;else{t=c;while(1){v=f[o>>2]|0;w=f[j>>2]|0;f[j>>2]=w+1;b[v+w>>0]=t;w=(f[n>>2]|0)>>>8;f[n>>2]=w;if(w>>>0>>0){s=w;break}else t=w}}c=(((s>>>0)/(q>>>0)|0)<<12)+((s>>>0)%(q>>>0)|0)+(f[m+(p<<3)+4>>2]|0)|0;f[n>>2]=c}while((l|0)>1)}_f(i,e);e=f[i>>2]|0;if(e|0){c=i+4|0;i=f[c>>2]|0;if((i|0)!=(e|0))f[c>>2]=i+(~((i+-8-e|0)>>>3)<<3);Oq(e)}e=f[h>>2]|0;if(!e){u=g;return 1}h=f[k>>2]|0;if((h|0)!=(e|0))f[k>>2]=h+(~((h+-8-e|0)>>>3)<<3);Oq(e);u=g;return 1}function ve(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0;c=u;u=u+16|0;d=c+4|0;e=c;f[a+64>>2]=b;g=a+128|0;f[g>>2]=2;h=a+132|0;f[h>>2]=7;i=Qa[f[(f[b>>2]|0)+32>>2]&127](b)|0;b=a+88|0;f[b>>2]=i;j=a+104|0;k=(f[i+28>>2]|0)-(f[i+24>>2]|0)>>2;i=a+108|0;l=f[i>>2]|0;m=f[j>>2]|0;n=l-m>>2;o=m;p=l;if(k>>>0<=n>>>0)if(k>>>0>>0?(q=o+(k<<2)|0,(q|0)!=(p|0)):0){o=p+(~((p+-4-q|0)>>>2)<<2)|0;f[i>>2]=o;r=o;s=m}else{r=l;s=m}else{Ci(j,k-n|0);r=f[i>>2]|0;s=f[j>>2]|0}if((r|0)!=(s|0)){s=0;do{r=f[b>>2]|0;f[e>>2]=s;f[d>>2]=f[e>>2];n=hh(r,d)|0;r=f[j>>2]|0;f[r+(s<<2)>>2]=n;s=s+1|0}while(s>>>0<(f[i>>2]|0)-r>>2>>>0)}i=a+92|0;s=f[b>>2]|0;j=f[s>>2]|0;d=(f[s+4>>2]|0)-j>>2;e=a+96|0;r=f[e>>2]|0;n=f[i>>2]|0;k=r-n>>2;m=n;n=r;if(d>>>0<=k>>>0)if(d>>>0>>0?(r=m+(d<<2)|0,(r|0)!=(n|0)):0){f[e>>2]=n+(~((n+-4-r|0)>>>2)<<2);t=s;v=j}else{t=s;v=j}else{Ci(i,d-k|0);k=f[b>>2]|0;t=k;v=f[k>>2]|0}k=f[t+4>>2]|0;if((k|0)!=(v|0)){v=f[i>>2]|0;i=f[t>>2]|0;t=k-i>>2;k=0;do{f[v+(k<<2)>>2]=f[i+(k<<2)>>2];k=k+1|0}while(k>>>0>>0)}t=(f[h>>2]|0)-(f[g>>2]|0)+1|0;g=a+136|0;h=a+140|0;a=f[h>>2]|0;k=f[g>>2]|0;i=(a-k|0)/12|0;v=a;if(t>>>0>i>>>0){Kf(g,t-i|0);u=c;return 1}if(t>>>0>=i>>>0){u=c;return 1}i=k+(t*12|0)|0;if((i|0)==(v|0)){u=c;return 1}else w=v;while(1){v=w+-12|0;f[h>>2]=v;t=f[v>>2]|0;if(!t)x=v;else{v=w+-8|0;k=f[v>>2]|0;if((k|0)!=(t|0))f[v>>2]=k+(~((k+-4-t|0)>>>2)<<2);Oq(t);x=f[h>>2]|0}if((x|0)==(i|0))break;else w=x}u=c;return 1}function we(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;e=f[b>>2]|0;g=f[b+4>>2]|0;h=((f[c>>2]|0)-e<<3)+(f[c+4>>2]|0)-g|0;c=e;if((h|0)<=0){i=d+4|0;j=f[d>>2]|0;f[a>>2]=j;k=a+4|0;l=f[i>>2]|0;f[k>>2]=l;return}if(!g){e=d+4|0;m=h;n=e;o=f[e>>2]|0;p=c}else{e=32-g|0;q=(h|0)<(e|0)?h:e;r=-1>>>(e-q|0)&-1<>2];e=d+4|0;s=f[e>>2]|0;t=32-s|0;u=t>>>0>>0?t:q;v=f[d>>2]|0;w=f[v>>2]&~(-1>>>(t-u|0)&-1<>2]=w;s=f[e>>2]|0;f[v>>2]=(s>>>0>g>>>0?r<>>(g-s|0))|w;w=(f[e>>2]|0)+u|0;s=v+(w>>>5<<2)|0;f[d>>2]=s;v=w&31;f[e>>2]=v;w=q-u|0;if((w|0)>0){f[s>>2]=f[s>>2]&~(-1>>>(32-w|0))|r>>>(g+u|0);f[e>>2]=w;x=w}else x=v;v=c+4|0;f[b>>2]=v;m=h-q|0;n=e;o=x;p=v}v=32-o|0;x=-1<31){o=~x;e=f[d>>2]|0;q=~m;h=m+((q|0)>-64?q:-64)+32|0;q=(h>>>5)+1|0;c=m+-32-(h&-32)|0;h=m;w=p;u=f[e>>2]|0;g=e;while(1){r=f[w>>2]|0;s=u&o;f[g>>2]=s;f[g>>2]=s|r<>2];g=g+4|0;u=f[g>>2]&x|r>>>v;f[g>>2]=u;if((h|0)<=63)break;else{h=h+-32|0;w=w+4|0}}w=p+(q<<2)|0;f[b>>2]=w;f[d>>2]=e+(q<<2);y=c;z=w}else{y=m;z=p}if((y|0)<=0){i=n;j=f[d>>2]|0;f[a>>2]=j;k=a+4|0;l=f[i>>2]|0;f[k>>2]=l;return}p=f[z>>2]&-1>>>(32-y|0);z=(v|0)<(y|0)?v:y;m=f[d>>2]|0;w=f[m>>2]&~(-1<>2]&-1>>>(v-z|0));f[m>>2]=w;f[m>>2]=w|p<>2];w=(f[n>>2]|0)+z|0;v=m+(w>>>5<<2)|0;f[d>>2]=v;f[n>>2]=w&31;w=y-z|0;if((w|0)<=0){i=n;j=f[d>>2]|0;f[a>>2]=j;k=a+4|0;l=f[i>>2]|0;f[k>>2]=l;return}f[v>>2]=f[v>>2]&~(-1>>>(32-w|0))|p>>>z;f[n>>2]=w;i=n;j=f[d>>2]|0;f[a>>2]=j;k=a+4|0;l=f[i>>2]|0;f[k>>2]=l;return}function xe(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=f[b>>2]|0;g=b+4|0;h=f[g>>2]|0;i=((f[c>>2]|0)-e<<3)+(f[c+4>>2]|0)-h|0;c=e;if((i|0)<=0){j=d+4|0;k=f[d>>2]|0;f[a>>2]=k;l=a+4|0;m=f[j>>2]|0;f[l>>2]=m;return}if(!h){e=d+4|0;n=i;o=e;p=c;q=f[e>>2]|0}else{e=32-h|0;r=(i|0)<(e|0)?i:e;s=-1>>>(e-r|0)&-1<>2];c=d+4|0;h=f[c>>2]|0;e=32-h|0;t=e>>>0>>0?e:r;u=f[d>>2]|0;v=f[u>>2]&~(-1>>>(e-t|0)&-1<>2]=v;h=f[c>>2]|0;e=f[g>>2]|0;f[u>>2]=(h>>>0>e>>>0?s<>>(e-h|0))|v;v=(f[c>>2]|0)+t|0;h=u+(v>>>5<<2)|0;f[d>>2]=h;u=v&31;f[c>>2]=u;v=r-t|0;if((v|0)>0){e=f[h>>2]&~(-1>>>(32-v|0));f[h>>2]=e;f[h>>2]=e|s>>>((f[g>>2]|0)+t|0);f[c>>2]=v;w=v}else w=u;u=(f[b>>2]|0)+4|0;f[b>>2]=u;n=i-r|0;o=c;p=u;q=w}w=32-q|0;u=-1<31){q=~u;c=~n;r=n+((c|0)>-64?c:-64)+32&-32;c=n;i=p;while(1){v=f[i>>2]|0;t=f[d>>2]|0;g=f[t>>2]&q;f[t>>2]=g;f[t>>2]=g|v<>2];g=t+4|0;f[d>>2]=g;f[g>>2]=f[g>>2]&u|v>>>w;i=(f[b>>2]|0)+4|0;f[b>>2]=i;if((c|0)<=63)break;else c=c+-32|0}x=n+-32-r|0;y=i}else{x=n;y=p}if((x|0)<=0){j=o;k=f[d>>2]|0;f[a>>2]=k;l=a+4|0;m=f[j>>2]|0;f[l>>2]=m;return}p=f[y>>2]&-1>>>(32-x|0);y=(w|0)<(x|0)?w:x;n=f[d>>2]|0;i=f[n>>2]&~(-1<>2]&-1>>>(w-y|0));f[n>>2]=i;f[n>>2]=i|p<>2];i=(f[o>>2]|0)+y|0;w=n+(i>>>5<<2)|0;f[d>>2]=w;f[o>>2]=i&31;i=x-y|0;if((i|0)<=0){j=o;k=f[d>>2]|0;f[a>>2]=k;l=a+4|0;m=f[j>>2]|0;f[l>>2]=m;return}f[w>>2]=f[w>>2]&~(-1>>>(32-i|0))|p>>>y;f[o>>2]=i;j=o;k=f[d>>2]|0;f[a>>2]=k;l=a+4|0;m=f[j>>2]|0;f[l>>2]=m;return}function ye(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+9|0;i=d+8|0;j=f[(f[a+184>>2]|0)+(c<<2)>>2]&255;b[h>>0]=j;c=a+4|0;k=f[(f[c>>2]|0)+44>>2]|0;l=k+16|0;m=f[l+4>>2]|0;if((m|0)>0|(m|0)==0&(f[l>>2]|0)>>>0>0)n=j;else{f[g>>2]=f[k+4>>2];f[e>>2]=f[g>>2];Me(k,e,h,h+1|0)|0;n=b[h>>0]|0}a:do if(n<<24>>24>-1){k=a+172|0;j=f[(f[k>>2]|0)+((n<<24>>24)*136|0)>>2]|0;l=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+52|0;m=b[h>>0]|0;o=f[k>>2]|0;k=f[o+(m*136|0)+132>>2]|0;switch(f[(f[(f[l>>2]|0)+84>>2]|0)+(j<<2)>>2]|0){case 0:{p=k;q=7;break a;break}case 1:{if(b[o+(m*136|0)+28>>0]|0){p=k;q=7;break a}break}default:{}}m=f[(f[c>>2]|0)+44>>2]|0;b[i>>0]=1;o=m+16|0;j=f[o+4>>2]|0;if(!((j|0)>0|(j|0)==0&(f[o>>2]|0)>>>0>0)){f[g>>2]=f[m+4>>2];f[e>>2]=f[g>>2];Me(m,e,i,i+1|0)|0}r=k}else{p=f[a+68>>2]|0;q=7}while(0);if((q|0)==7){q=f[(f[c>>2]|0)+44>>2]|0;b[i>>0]=0;a=q+16|0;h=f[a+4>>2]|0;if(!((h|0)>0|(h|0)==0&(f[a>>2]|0)>>>0>0)){f[g>>2]=f[q+4>>2];f[e>>2]=f[g>>2];Me(q,e,i,i+1|0)|0}r=p}p=f[(f[c>>2]|0)+44>>2]|0;b[i>>0]=r;r=p+16|0;c=f[r+4>>2]|0;if((c|0)>0|(c|0)==0&(f[r>>2]|0)>>>0>0){u=d;return 1}f[g>>2]=f[p+4>>2];f[e>>2]=f[g>>2];Me(p,e,i,i+1|0)|0;u=d;return 1}function ze(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;h=u;u=u+16|0;i=h+4|0;j=h;k=a+60|0;f[a+64>>2]=g;g=a+8|0;Mh(g,b,d,e);d=a+56|0;l=f[d>>2]|0;m=f[l+4>>2]|0;n=f[l>>2]|0;o=m-n|0;if((o|0)<=0){u=h;return 1}p=(o>>>2)+-1|0;o=a+68|0;q=a+16|0;r=a+32|0;s=a+12|0;t=a+28|0;v=a+20|0;w=a+24|0;if(m-n>>2>>>0>p>>>0){x=p;y=n}else{z=l;aq(z)}while(1){f[j>>2]=f[y+(x<<2)>>2];f[i>>2]=f[j>>2];ub(k,i,b,x);l=X(x,e)|0;n=b+(l<<2)|0;p=c+(l<<2)|0;l=f[g>>2]|0;if((l|0)>0){m=0;a=o;A=l;while(1){if((A|0)>0){l=0;do{B=f[a+(l<<2)>>2]|0;C=f[q>>2]|0;if((B|0)>(C|0)){D=f[r>>2]|0;f[D+(l<<2)>>2]=C;E=D}else{D=f[s>>2]|0;C=f[r>>2]|0;f[C+(l<<2)>>2]=(B|0)<(D|0)?D:B;E=C}l=l+1|0}while((l|0)<(f[g>>2]|0));F=E}else F=f[r>>2]|0;l=(f[n+(m<<2)>>2]|0)-(f[F+(m<<2)>>2]|0)|0;C=p+(m<<2)|0;f[C>>2]=l;if((l|0)>=(f[t>>2]|0)){if((l|0)>(f[w>>2]|0)){G=l-(f[v>>2]|0)|0;H=18}}else{G=(f[v>>2]|0)+l|0;H=18}if((H|0)==18){H=0;f[C>>2]=G}m=m+1|0;A=f[g>>2]|0;if((m|0)>=(A|0))break;else a=F}}x=x+-1|0;if((x|0)<=-1){H=3;break}a=f[d>>2]|0;y=f[a>>2]|0;if((f[a+4>>2]|0)-y>>2>>>0<=x>>>0){z=a;H=4;break}}if((H|0)==3){u=h;return 1}else if((H|0)==4)aq(z);return 0}function Ae(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;h=u;u=u+16|0;i=h+4|0;j=h;k=a+60|0;f[a+64>>2]=g;g=a+8|0;Mh(g,b,d,e);d=a+56|0;l=f[d>>2]|0;m=f[l+4>>2]|0;n=f[l>>2]|0;o=m-n|0;if((o|0)<=0){u=h;return 1}p=(o>>>2)+-1|0;o=a+68|0;q=a+16|0;r=a+32|0;s=a+12|0;t=a+28|0;v=a+20|0;w=a+24|0;if(m-n>>2>>>0>p>>>0){x=p;y=n}else{z=l;aq(z)}while(1){f[j>>2]=f[y+(x<<2)>>2];f[i>>2]=f[j>>2];tb(k,i,b,x);l=X(x,e)|0;n=b+(l<<2)|0;p=c+(l<<2)|0;l=f[g>>2]|0;if((l|0)>0){m=0;a=o;A=l;while(1){if((A|0)>0){l=0;do{B=f[a+(l<<2)>>2]|0;C=f[q>>2]|0;if((B|0)>(C|0)){D=f[r>>2]|0;f[D+(l<<2)>>2]=C;E=D}else{D=f[s>>2]|0;C=f[r>>2]|0;f[C+(l<<2)>>2]=(B|0)<(D|0)?D:B;E=C}l=l+1|0}while((l|0)<(f[g>>2]|0));F=E}else F=f[r>>2]|0;l=(f[n+(m<<2)>>2]|0)-(f[F+(m<<2)>>2]|0)|0;C=p+(m<<2)|0;f[C>>2]=l;if((l|0)>=(f[t>>2]|0)){if((l|0)>(f[w>>2]|0)){G=l-(f[v>>2]|0)|0;H=18}}else{G=(f[v>>2]|0)+l|0;H=18}if((H|0)==18){H=0;f[C>>2]=G}m=m+1|0;A=f[g>>2]|0;if((m|0)>=(A|0))break;else a=F}}x=x+-1|0;if((x|0)<=-1){H=3;break}a=f[d>>2]|0;y=f[a>>2]|0;if((f[a+4>>2]|0)-y>>2>>>0<=x>>>0){z=a;H=4;break}}if((H|0)==3){u=h;return 1}else if((H|0)==4)aq(z);return 0}function Be(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+12|0;g=f[e>>2]|0;h=(f[g+4>>2]|0)-(f[g>>2]|0)>>2;if(!h){u=b;return 1}i=a+152|0;j=a+140|0;k=a+144|0;l=a+148|0;a=0;m=g;while(1){f[d>>2]=(a>>>0)/3|0;f[c>>2]=f[d>>2];if(!(_j(m,c)|0)?(g=f[e>>2]|0,(f[(f[g+12>>2]|0)+(a<<2)>>2]|0)==-1):0){n=a+1|0;o=((n>>>0)%3|0|0)==0?a+-2|0:n;if((o|0)==-1)p=-1;else p=f[(f[g>>2]|0)+(o<<2)>>2]|0;o=f[i>>2]|0;if((f[o+(p<<2)>>2]|0)==-1){g=f[k>>2]|0;n=f[l>>2]|0;if((g|0)==(n<<5|0)){if((g+1|0)<0){q=11;break}r=n<<6;n=g+32&-32;vi(j,g>>>0<1073741823?(r>>>0>>0?n:r):2147483647);s=f[k>>2]|0;t=f[i>>2]|0}else{s=g;t=o}f[k>>2]=s+1;o=(f[j>>2]|0)+(s>>>5<<2)|0;f[o>>2]=f[o>>2]&~(1<<(s&31));o=t+(p<<2)|0;if((f[o>>2]|0)==-1){r=a;n=o;while(1){f[n>>2]=g;o=r+1|0;a:do if((r|0)!=-1?(v=((o>>>0)%3|0|0)==0?r+-2|0:o,(v|0)!=-1):0){w=f[e>>2]|0;x=f[w+12>>2]|0;y=v;while(1){v=f[x+(y<<2)>>2]|0;if((v|0)==-1)break;z=v+1|0;A=((z>>>0)%3|0|0)==0?v+-2|0:z;if((A|0)==-1){B=-1;C=-1;break a}else y=A}x=y+1|0;A=((x>>>0)%3|0|0)==0?y+-2|0:x;if((A|0)==-1){B=y;C=-1}else{B=y;C=f[(f[w>>2]|0)+(A<<2)>>2]|0}}else{B=-1;C=-1}while(0);n=t+(C<<2)|0;if((f[n>>2]|0)!=-1)break;else r=B}}}}r=a+1|0;if(r>>>0>=h>>>0){q=3;break}a=r;m=f[e>>2]|0}if((q|0)==3){u=b;return 1}else if((q|0)==11)aq(j);return 0}function Ce(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=u;u=u+32|0;e=d+8|0;g=d;h=a+4|0;i=f[h>>2]|0;if(i>>>0>=b>>>0){f[h>>2]=b;u=d;return}j=a+8|0;k=f[j>>2]|0;l=k<<5;m=b-i|0;if(l>>>0>>0|i>>>0>(l-m|0)>>>0){f[e>>2]=0;n=e+4|0;f[n>>2]=0;o=e+8|0;f[o>>2]=0;if((b|0)<0)aq(a);p=k<<6;k=b+31&-32;vi(e,l>>>0<1073741823?(p>>>0>>0?k:p):2147483647);p=f[h>>2]|0;f[n>>2]=p+m;k=f[a>>2]|0;l=k;q=f[e>>2]|0;r=(l+(p>>>5<<2)-k<<3)+(p&31)|0;if((r|0)>0){p=r>>>5;im(q|0,k|0,p<<2|0)|0;k=r&31;r=q+(p<<2)|0;s=r;if(!k){t=0;v=s}else{w=-1>>>(32-k|0);f[r>>2]=f[r>>2]&~w|f[l+(p<<2)>>2]&w;t=k;v=s}}else{t=0;v=q}f[g>>2]=v;f[g+4>>2]=t;t=g;g=f[t>>2]|0;v=f[t+4>>2]|0;t=f[a>>2]|0;f[a>>2]=f[e>>2];f[e>>2]=t;e=f[h>>2]|0;f[h>>2]=f[n>>2];f[n>>2]=e;e=f[j>>2]|0;f[j>>2]=f[o>>2];f[o>>2]=e;if(t|0)Oq(t);x=g;y=v}else{v=(f[a>>2]|0)+(i>>>5<<2)|0;f[h>>2]=b;x=v;y=i&31}if(!m){u=d;return}i=(y|0)==0;v=x;if(c){if(i){z=m;A=x;B=v}else{c=32-y|0;b=c>>>0>m>>>0?m:c;f[v>>2]=f[v>>2]|-1>>>(c-b|0)&-1<>>5;sj(A|0,-1,c<<2|0)|0;A=z&31;z=B+(c<<2)|0;if(!A){u=d;return}f[z>>2]=f[z>>2]|-1>>>(32-A|0);u=d;return}else{if(i){C=m;D=x;E=v}else{x=32-y|0;i=x>>>0>m>>>0?m:x;f[v>>2]=f[v>>2]&~(-1>>>(x-i|0)&-1<>>5;sj(D|0,0,y<<2|0)|0;D=C&31;C=E+(y<<2)|0;if(!D){u=d;return}f[C>>2]=f[C>>2]&~(-1>>>(32-D|0));u=d;return}}function De(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0;a=u;u=u+48|0;g=a+36|0;h=a+24|0;i=a+12|0;j=a;if(!c){k=0;u=a;return k|0}f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;l=Gj(d)|0;if(l>>>0>4294967279)aq(g);if(l>>>0<11){b[g+11>>0]=l;if(!l)m=g;else{n=g;o=7}}else{p=l+16&-16;q=ln(p)|0;f[g>>2]=q;f[g+8>>2]=p|-2147483648;f[g+4>>2]=l;n=q;o=7}if((o|0)==7){kh(n|0,d|0,l|0)|0;m=n}b[m+l>>0]=0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;l=Gj(e)|0;if(l>>>0>4294967279)aq(h);if(l>>>0<11){b[h+11>>0]=l;if(!l)r=h;else{s=h;o=13}}else{m=l+16&-16;n=ln(m)|0;f[h>>2]=n;f[h+8>>2]=m|-2147483648;f[h+4>>2]=l;s=n;o=13}if((o|0)==13){kh(s|0,e|0,l|0)|0;r=s}b[r+l>>0]=0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;l=Gj(d)|0;if(l>>>0>4294967279)aq(i);if(l>>>0<11){b[i+11>>0]=l;if(!l)t=i;else{v=i;o=19}}else{r=l+16&-16;s=ln(r)|0;f[i>>2]=s;f[i+8>>2]=r|-2147483648;f[i+4>>2]=l;v=s;o=19}if((o|0)==19){kh(v|0,d|0,l|0)|0;t=v}b[t+l>>0]=0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;l=Gj(e)|0;if(l>>>0>4294967279)aq(j);if(l>>>0<11){b[j+11>>0]=l;if(!l)w=j;else{x=j;o=25}}else{t=l+16&-16;v=ln(t)|0;f[j>>2]=v;f[j+8>>2]=t|-2147483648;f[j+4>>2]=l;x=v;o=25}if((o|0)==25){kh(x|0,e|0,l|0)|0;w=x}b[w+l>>0]=0;mn(c,i,j);if((b[j+11>>0]|0)<0)Oq(f[j>>2]|0);if((b[i+11>>0]|0)<0)Oq(f[i>>2]|0);if((b[h+11>>0]|0)<0)Oq(f[h>>2]|0);if((b[g+11>>0]|0)<0)Oq(f[g>>2]|0);k=1;u=a;return k|0}function Ee(a,c){a=a|0;c=c|0;var d=0,e=0,g=0;f[a>>2]=f[c>>2];d=c+4|0;f[a+4>>2]=f[d>>2];e=c+8|0;f[a+8>>2]=f[e>>2];g=c+12|0;f[a+12>>2]=f[g>>2];f[d>>2]=0;f[e>>2]=0;f[g>>2]=0;g=c+16|0;f[a+16>>2]=f[g>>2];e=c+20|0;f[a+20>>2]=f[e>>2];d=c+24|0;f[a+24>>2]=f[d>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;b[a+28>>0]=b[c+28>>0]|0;d=a+32|0;e=c+32|0;f[d>>2]=0;g=a+36|0;f[g>>2]=0;f[a+40>>2]=0;f[d>>2]=f[e>>2];d=c+36|0;f[g>>2]=f[d>>2];g=c+40|0;f[a+40>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;e=a+44|0;d=c+44|0;f[e>>2]=0;g=a+48|0;f[g>>2]=0;f[a+52>>2]=0;f[e>>2]=f[d>>2];e=c+48|0;f[g>>2]=f[e>>2];g=c+52|0;f[a+52>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;d=a+56|0;e=c+56|0;f[d>>2]=0;g=a+60|0;f[g>>2]=0;f[a+64>>2]=0;f[d>>2]=f[e>>2];d=c+60|0;f[g>>2]=f[d>>2];g=c+64|0;f[a+64>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;f[a+68>>2]=f[c+68>>2];f[a+72>>2]=f[c+72>>2];e=a+76|0;d=c+76|0;f[e>>2]=0;g=a+80|0;f[g>>2]=0;f[a+84>>2]=0;f[e>>2]=f[d>>2];e=c+80|0;f[g>>2]=f[e>>2];g=c+84|0;f[a+84>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;d=a+88|0;e=c+88|0;f[d>>2]=0;g=a+92|0;f[g>>2]=0;f[a+96>>2]=0;f[d>>2]=f[e>>2];d=c+92|0;f[g>>2]=f[d>>2];g=c+96|0;f[a+96>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;b[a+100>>0]=b[c+100>>0]|0;e=a+104|0;d=c+104|0;f[e>>2]=0;g=a+108|0;f[g>>2]=0;f[a+112>>2]=0;f[e>>2]=f[d>>2];e=c+108|0;f[g>>2]=f[e>>2];g=c+112|0;f[a+112>>2]=f[g>>2];f[g>>2]=0;f[e>>2]=0;f[d>>2]=0;d=a+116|0;e=c+116|0;f[d>>2]=0;g=a+120|0;f[g>>2]=0;f[a+124>>2]=0;f[d>>2]=f[e>>2];d=c+120|0;f[g>>2]=f[d>>2];g=c+124|0;f[a+124>>2]=f[g>>2];f[g>>2]=0;f[d>>2]=0;f[e>>2]=0;f[a+128>>2]=f[c+128>>2];f[a+132>>2]=f[c+132>>2];return}function Fe(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;h=u;u=u+48|0;i=h+36|0;j=h+24|0;k=h+8|0;l=h+4|0;m=h;n=e+4|0;Rh(i,c,(f[n>>2]|0)-(f[e>>2]|0)>>2,2,g,d,1);g=f[i>>2]|0;o=(f[f[g>>2]>>2]|0)+(f[g+48>>2]|0)|0;f[k>>2]=-1;f[k+4>>2]=-1;f[k+8>>2]=-1;f[k+12>>2]=-1;p=f[c+4>>2]|0;if((p+-2|0)>>>0<=28){f[k>>2]=p;c=1<>2]=c+-1;p=c+-2|0;f[k+8>>2]=p;f[k+12>>2]=(p|0)/2|0;p=f[e>>2]|0;if((f[n>>2]|0)==(p|0))q=g;else{c=d+84|0;r=d+68|0;s=d+48|0;t=d+40|0;v=0;w=0;x=p;while(1){p=f[x+(v<<2)>>2]|0;if(!(b[c>>0]|0))y=f[(f[r>>2]|0)+(p<<2)>>2]|0;else y=p;p=s;z=f[p>>2]|0;A=f[p+4>>2]|0;p=t;B=f[p>>2]|0;C=un(B|0,f[p+4>>2]|0,y|0,0)|0;p=Vn(C|0,I|0,z|0,A|0)|0;kh(j|0,(f[f[d>>2]>>2]|0)+p|0,B|0)|0;rf(k,j,l,m);f[o+(w<<2)>>2]=f[l>>2];f[o+((w|1)<<2)>>2]=f[m>>2];v=v+1|0;x=f[e>>2]|0;if(v>>>0>=(f[n>>2]|0)-x>>2>>>0)break;else w=w+2|0}q=f[i>>2]|0}f[a>>2]=q;f[i>>2]=0;u=h;return}f[a>>2]=0;f[i>>2]=0;if(!g){u=h;return}i=g+88|0;a=f[i>>2]|0;f[i>>2]=0;if(a|0){i=f[a+8>>2]|0;if(i|0){q=a+12|0;if((f[q>>2]|0)!=(i|0))f[q>>2]=i;Oq(i)}Oq(a)}a=f[g+68>>2]|0;if(a|0){i=g+72|0;q=f[i>>2]|0;if((q|0)!=(a|0))f[i>>2]=q+(~((q+-4-a|0)>>>2)<<2);Oq(a)}a=g+64|0;q=f[a>>2]|0;f[a>>2]=0;if(q|0){a=f[q>>2]|0;if(a|0){i=q+4|0;if((f[i>>2]|0)!=(a|0))f[i>>2]=a;Oq(a)}Oq(q)}Oq(g);u=h;return}function Ge(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;if(((e-h|0)/136|0)>>>0>=c>>>0){i=c;j=h;do{f[j>>2]=-1;Ok(j+4|0);b[j+100>>0]=1;k=j+104|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;f[k+24>>2]=0;j=(f[g>>2]|0)+136|0;f[g>>2]=j;i=i+-1|0}while((i|0)!=0);return}i=f[a>>2]|0;j=(h-i|0)/136|0;h=j+c|0;if(h>>>0>31580641)aq(a);k=(e-i|0)/136|0;i=k<<1;e=k>>>0<15790320?(i>>>0>>0?h:i):31580641;do if(e)if(e>>>0>31580641){i=ra(8)|0;Oo(i,16035);f[i>>2]=7256;va(i|0,1112,110)}else{l=ln(e*136|0)|0;break}else l=0;while(0);i=l+(j*136|0)|0;j=i;h=l+(e*136|0)|0;e=c;c=j;l=i;do{f[l>>2]=-1;Ok(l+4|0);b[l+100>>0]=1;k=l+104|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;f[k+24>>2]=0;l=c+136|0;c=l;e=e+-1|0}while((e|0)!=0);e=f[a>>2]|0;l=f[g>>2]|0;if((l|0)==(e|0)){m=j;n=e;o=e}else{k=l;l=j;j=i;do{k=k+-136|0;Ee(j+-136|0,k);j=l+-136|0;l=j}while((k|0)!=(e|0));m=l;n=f[a>>2]|0;o=f[g>>2]|0}f[a>>2]=m;f[g>>2]=c;f[d>>2]=h;h=n;if((o|0)!=(h|0)){d=o;do{o=f[d+-20>>2]|0;if(o|0){c=d+-16|0;g=f[c>>2]|0;if((g|0)!=(o|0))f[c>>2]=g+(~((g+-4-o|0)>>>2)<<2);Oq(o)}o=f[d+-32>>2]|0;if(o|0){g=d+-28|0;c=f[g>>2]|0;if((c|0)!=(o|0))f[g>>2]=c+(~((c+-4-o|0)>>>2)<<2);Oq(o)}Mi(d+-132|0);d=d+-136|0}while((d|0)!=(h|0))}if(!n)return;Oq(n);return}function He(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=f[b>>2]|0;b=a+12|0;d=(c|0)==-1;e=c+1|0;do if(!d){g=((e>>>0)%3|0|0)==0?c+-2|0:e;if(!((c>>>0)%3|0)){h=g;i=c+2|0;break}else{h=g;i=c+-1|0;break}}else{h=-1;i=-1}while(0);e=d?-1:(c>>>0)/3|0;g=a+28|0;j=(f[g>>2]|0)+(e>>>5<<2)|0;f[j>>2]=1<<(e&31)|f[j>>2];j=a+172|0;e=a+176|0;k=a+280|0;if(((!d?(d=f[(f[(f[b>>2]|0)+12>>2]|0)+(c<<2)>>2]|0,(d|0)!=-1):0)?(a=(d>>>0)/3|0,(f[(f[g>>2]|0)+(a>>>5<<2)>>2]&1<<(a&31)|0)==0):0)?(a=f[j>>2]|0,(f[e>>2]|0)!=(a|0)):0){d=c>>>5;l=1<<(c&31);c=0;m=a;do{a=(f[k>>2]|0)+(c<<5)|0;if(!(l&f[(f[m+(c*136|0)+4>>2]|0)+(d<<2)>>2]))fj(a,0);else fj(a,1);c=c+1|0;m=f[j>>2]|0}while(c>>>0<(((f[e>>2]|0)-m|0)/136|0)>>>0)}if((((h|0)!=-1?(m=f[(f[(f[b>>2]|0)+12>>2]|0)+(h<<2)>>2]|0,(m|0)!=-1):0)?(c=(m>>>0)/3|0,(f[(f[g>>2]|0)+(c>>>5<<2)>>2]&1<<(c&31)|0)==0):0)?(c=f[j>>2]|0,(f[e>>2]|0)!=(c|0)):0){m=h>>>5;d=1<<(h&31);h=0;l=c;do{c=(f[k>>2]|0)+(h<<5)|0;if(!(d&f[(f[l+(h*136|0)+4>>2]|0)+(m<<2)>>2]))fj(c,0);else fj(c,1);h=h+1|0;l=f[j>>2]|0}while(h>>>0<(((f[e>>2]|0)-l|0)/136|0)>>>0)}if((i|0)==-1)return 1;l=f[(f[(f[b>>2]|0)+12>>2]|0)+(i<<2)>>2]|0;if((l|0)==-1)return 1;b=(l>>>0)/3|0;if(f[(f[g>>2]|0)+(b>>>5<<2)>>2]&1<<(b&31)|0)return 1;b=f[j>>2]|0;if((f[e>>2]|0)==(b|0))return 1;g=i>>>5;l=1<<(i&31);i=0;h=b;do{b=(f[k>>2]|0)+(i<<5)|0;if(!(l&f[(f[h+(i*136|0)+4>>2]|0)+(g<<2)>>2]))fj(b,0);else fj(b,1);i=i+1|0;h=f[j>>2]|0}while(i>>>0<(((f[e>>2]|0)-h|0)/136|0)>>>0);return 1}function Ie(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;i=a+4|0;j=a+8|0;ci((f[j>>2]|0)-(f[i>>2]|0)>>2,c)|0;k=f[i>>2]|0;if((f[j>>2]|0)==(k|0)){u=d;return 1}l=a+32|0;a=c+16|0;m=c+4|0;n=h+1|0;o=h+1|0;p=h+1|0;q=h+1|0;r=0;s=k;do{k=f[(f[(f[l>>2]|0)+8>>2]|0)+(f[s+(r<<2)>>2]<<2)>>2]|0;b[h>>0]=f[k+56>>2];t=a;v=f[t>>2]|0;w=f[t+4>>2]|0;if((w|0)>0|(w|0)==0&v>>>0>0){x=w;y=v}else{f[g>>2]=f[m>>2];f[e>>2]=f[g>>2];Me(c,e,h,q)|0;v=a;x=f[v+4>>2]|0;y=f[v>>2]|0}b[h>>0]=f[k+28>>2];if((x|0)>0|(x|0)==0&y>>>0>0){z=x;A=y}else{f[g>>2]=f[m>>2];f[e>>2]=f[g>>2];Me(c,e,h,p)|0;v=a;z=f[v+4>>2]|0;A=f[v>>2]|0}b[h>>0]=b[k+24>>0]|0;if((z|0)>0|(z|0)==0&A>>>0>0){B=z;C=A}else{f[g>>2]=f[m>>2];f[e>>2]=f[g>>2];Me(c,e,h,o)|0;v=a;B=f[v+4>>2]|0;C=f[v>>2]|0}b[h>>0]=b[k+32>>0]|0;if(!((B|0)>0|(B|0)==0&C>>>0>0)){f[g>>2]=f[m>>2];f[e>>2]=f[g>>2];Me(c,e,h,n)|0}ci(f[k+60>>2]|0,c)|0;r=r+1|0;s=f[i>>2]|0}while(r>>>0<(f[j>>2]|0)-s>>2>>>0);u=d;return 1}function Je(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=Oa,D=Oa,E=Oa,F=Oa;h=u;u=u+16|0;i=h;j=e+4|0;k=b[d+24>>0]|0;l=k<<24>>24;Rh(a,c,(f[j>>2]|0)-(f[e>>2]|0)>>2,l,g,d,1);g=f[a>>2]|0;a=(f[f[g>>2]>>2]|0)+(f[g+48>>2]|0)|0;g=f[c+4>>2]|0;Ap(i);Ko(i,$(n[c+20>>2]),(1<>>0>1073741823?-1:l<<2)|0;m=f[j>>2]|0;j=f[e>>2]|0;e=j;if((m|0)==(j|0)){Mq(g);u=h;return}o=d+68|0;p=d+48|0;q=d+40|0;r=c+8|0;c=i+4|0;s=(b[d+84>>0]|0)==0;t=m-j>>2;if(k<<24>>24>0){v=0;w=0}else{k=0;do{j=f[e+(k<<2)>>2]|0;if(s)x=f[(f[o>>2]|0)+(j<<2)>>2]|0;else x=j;j=p;m=f[j>>2]|0;y=f[j+4>>2]|0;j=q;z=f[j>>2]|0;A=un(z|0,f[j+4>>2]|0,x|0,0)|0;j=Vn(A|0,I|0,m|0,y|0)|0;kh(g|0,(f[f[d>>2]>>2]|0)+j|0,z|0)|0;k=k+1|0}while(k>>>0>>0);Mq(g);u=h;return}while(1){k=f[e+(v<<2)>>2]|0;if(s)B=f[(f[o>>2]|0)+(k<<2)>>2]|0;else B=k;k=p;x=f[k>>2]|0;z=f[k+4>>2]|0;k=q;j=f[k>>2]|0;y=un(j|0,f[k+4>>2]|0,B|0,0)|0;k=Vn(y|0,I|0,x|0,z|0)|0;kh(g|0,(f[f[d>>2]>>2]|0)+k|0,j|0)|0;j=f[r>>2]|0;C=$(n[i>>2]);k=0;z=w;while(1){D=$(n[g+(k<<2)>>2]);E=$(D-$(n[j+(k<<2)>>2]));x=E<$(0.0);D=$(-E);F=$((x?D:E)/C);y=~~$(J($($(F*$(f[c>>2]|0))+$(.5))));f[a+(z<<2)>>2]=x?0-y|0:y;k=k+1|0;if((k|0)==(l|0))break;else z=z+1|0}v=v+1|0;if(v>>>0>=t>>>0)break;else w=w+l|0}Mq(g);u=h;return}function Ke(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0;d=u;u=u+32|0;e=d+16|0;g=d+12|0;h=d+8|0;i=d+4|0;j=d;lp(a);f[a+16>>2]=0;f[a+20>>2]=0;f[a+12>>2]=a+16;k=a+24|0;lp(k);if((a|0)!=(b|0)){f[h>>2]=f[b>>2];f[i>>2]=b+4;f[g>>2]=f[h>>2];f[e>>2]=f[i>>2];Oc(a,g,e)}l=b+24|0;if((k|0)!=(l|0)){f[h>>2]=f[l>>2];f[i>>2]=b+28;f[g>>2]=f[h>>2];f[e>>2]=f[i>>2];Oc(k,g,e)}f[j>>2]=0;k=c+8|0;l=c+12|0;c=f[l>>2]|0;m=f[k>>2]|0;if((c-m|0)<=0){u=d;return}n=b+16|0;b=m;m=c;c=0;while(1){o=f[(f[b+(c<<2)>>2]|0)+56>>2]|0;p=f[n>>2]|0;if(p){q=n;r=p;a:while(1){p=r;while(1){if((f[p+16>>2]|0)>=(o|0))break;s=f[p+4>>2]|0;if(!s){t=q;break a}else p=s}r=f[p>>2]|0;if(!r){t=p;break}else q=p}if((t|0)!=(n|0)?(o|0)>=(f[t+16>>2]|0):0){q=t+20|0;r=Hd(a,j)|0;if((r|0)!=(q|0)){f[h>>2]=f[q>>2];f[i>>2]=t+24;f[g>>2]=f[h>>2];f[e>>2]=f[i>>2];Oc(r,g,e)}v=f[j>>2]|0;w=f[k>>2]|0;x=f[l>>2]|0}else{v=c;w=b;x=m}}else{v=c;w=b;x=m}c=v+1|0;f[j>>2]=c;if((c|0)>=(x-w>>2|0))break;else{b=w;m=x}}u=d;return}function Le(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;i=a+12|0;ci(f[i>>2]|0,c)|0;if(!(f[i>>2]|0)){j=1;u=d;return j|0}k=c+16|0;l=c+4|0;m=h+1|0;n=h+1|0;o=h+1|0;p=0;while(1){q=f[a>>2]|0;r=f[q+(p<<3)>>2]|0;if(r>>>0>63)if(r>>>0>16383)if(r>>>0>4194303){j=0;s=20;break}else{t=2;s=13}else{t=1;s=13}else if(!r){v=p+1|0;w=0;while(1){if(f[q+(v+w<<3)>>2]|0){x=w;break}y=w+1|0;if(y>>>0<63)w=y;else{x=y;break}}b[h>>0]=x<<2|3;w=k;v=f[w+4>>2]|0;if(!((v|0)>0|(v|0)==0&(f[w>>2]|0)>>>0>0)){f[g>>2]=f[l>>2];f[e>>2]=f[g>>2];Me(c,e,h,o)|0}z=x+p|0}else{t=0;s=13}if((s|0)==13){s=0;b[h>>0]=t|r<<2;w=k;v=f[w+4>>2]|0;if(!((v|0)>0|(v|0)==0&(f[w>>2]|0)>>>0>0)){f[g>>2]=f[l>>2];f[e>>2]=f[g>>2];Me(c,e,h,n)|0}if(!t)z=p;else{w=0;do{w=w+1|0;b[h>>0]=r>>>((w<<3)+-2|0);v=k;q=f[v+4>>2]|0;if(!((q|0)>0|(q|0)==0&(f[v>>2]|0)>>>0>0)){f[g>>2]=f[l>>2];f[e>>2]=f[g>>2];Me(c,e,h,m)|0}}while((w|0)<(t|0));z=p}}p=z+1|0;if(p>>>0>=(f[i>>2]|0)>>>0){j=1;s=20;break}}if((s|0)==20){u=d;return j|0}return 0}function Me(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;g=f[a>>2]|0;h=g;i=(f[c>>2]|0)-h|0;c=g+i|0;j=e-d|0;if((j|0)<=0){k=c;return k|0}l=a+8|0;m=f[l>>2]|0;n=a+4|0;o=f[n>>2]|0;p=o;if((j|0)<=(m-p|0)){q=p-c|0;if((j|0)>(q|0)){r=d+q|0;if((r|0)==(e|0))s=o;else{t=r;u=o;while(1){b[u>>0]=b[t>>0]|0;t=t+1|0;v=(f[n>>2]|0)+1|0;f[n>>2]=v;if((t|0)==(e|0)){s=v;break}else u=v}}if((q|0)>0){w=r;x=s}else{k=c;return k|0}}else{w=e;x=o}s=x-(c+j)|0;r=c+s|0;if(r>>>0>>0){q=r;r=x;do{b[r>>0]=b[q>>0]|0;q=q+1|0;r=(f[n>>2]|0)+1|0;f[n>>2]=r}while((q|0)!=(o|0))}if(s|0)im(x+(0-s)|0,c|0,s|0)|0;if((w|0)==(d|0)){k=c;return k|0}else{y=d;z=c}while(1){b[z>>0]=b[y>>0]|0;y=y+1|0;if((y|0)==(w|0)){k=c;break}else z=z+1|0}return k|0}z=p-h+j|0;if((z|0)<0)aq(a);j=m-h|0;h=j<<1;m=j>>>0<1073741823?(h>>>0>>0?z:h):2147483647;h=c;if(!m)A=0;else A=ln(m)|0;z=A+i|0;i=z;j=A+m|0;if((d|0)==(e|0)){B=i;C=g}else{g=d;d=i;i=z;do{b[i>>0]=b[g>>0]|0;i=d+1|0;d=i;g=g+1|0}while((g|0)!=(e|0));B=d;C=f[a>>2]|0}d=h-C|0;e=z+(0-d)|0;if((d|0)>0)kh(e|0,C|0,d|0)|0;d=(f[n>>2]|0)-h|0;if((d|0)>0){h=B;kh(h|0,c|0,d|0)|0;D=h+d|0;E=f[a>>2]|0}else{D=B;E=C}f[a>>2]=e;f[n>>2]=D;f[l>>2]=j;if(!E){k=z;return k|0}Oq(E);k=z;return k|0}function Ne(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=u;u=u+16|0;g=e;h=f[(f[c+4>>2]|0)+(d<<2)>>2]|0;d=f[c+28>>2]|0;c=f[(f[(f[d+4>>2]|0)+8>>2]|0)+(h<<2)>>2]|0;switch(f[c+28>>2]|0){case 5:case 6:case 3:case 4:case 1:case 2:{i=ln(40)|0;zo(i);j=i;k=j;f[a>>2]=k;u=e;return}case 9:{l=3;break}default:{}}if((l|0)==3){i=f[d+48>>2]|0;d=ln(32)|0;f[g>>2]=d;f[g+8>>2]=-2147483616;f[g+4>>2]=17;m=d;n=14495;o=m+17|0;do{b[m>>0]=b[n>>0]|0;m=m+1|0;n=n+1|0}while((m|0)<(o|0));b[d+17>>0]=0;d=i+16|0;n=f[d>>2]|0;if(n){p=d;q=n;a:while(1){n=q;while(1){if((f[n+16>>2]|0)>=(h|0))break;r=f[n+4>>2]|0;if(!r){s=p;break a}else n=r}q=f[n>>2]|0;if(!q){s=n;break}else p=n}if(((s|0)!=(d|0)?(h|0)>=(f[s+16>>2]|0):0)?(h=s+20|0,(Jh(h,g)|0)!=0):0)t=Hk(h,g,-1)|0;else l=12}else l=12;if((l|0)==12)t=Hk(i,g,-1)|0;if((b[g+11>>0]|0)<0)Oq(f[g>>2]|0);if((t|0)>0)if((f[c+56>>2]|0)==1){c=ln(48)|0;m=c;o=m+48|0;do{f[m>>2]=0;m=m+4|0}while((m|0)<(o|0));zo(c);f[c>>2]=2496;f[c+40>>2]=1168;f[c+44>>2]=-1;j=c;k=j;f[a>>2]=k;u=e;return}else{c=ln(64)|0;ym(c);j=c;k=j;f[a>>2]=k;u=e;return}}c=ln(36)|0;Hm(c);j=c;k=j;f[a>>2]=k;u=e;return}function Oe(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=(c|0)==(a|0);b[c+12>>0]=d&1;if(d)return;else e=c;while(1){g=e+8|0;h=f[g>>2]|0;c=h+12|0;if(b[c>>0]|0){i=23;break}j=h+8|0;k=f[j>>2]|0;d=f[k>>2]|0;if((d|0)==(h|0)){l=f[k+4>>2]|0;if(!l){i=7;break}m=l+12|0;if(!(b[m>>0]|0))n=m;else{i=7;break}}else{if(!d){i=16;break}m=d+12|0;if(!(b[m>>0]|0))n=m;else{i=16;break}}b[c>>0]=1;c=(k|0)==(a|0);b[k+12>>0]=c&1;b[n>>0]=1;if(c){i=23;break}else e=k}if((i|0)==7){if((f[h>>2]|0)==(e|0)){o=h;p=k}else{n=h+4|0;a=f[n>>2]|0;c=f[a>>2]|0;f[n>>2]=c;if(!c)q=k;else{f[c+8>>2]=h;q=f[j>>2]|0}f[a+8>>2]=q;q=f[j>>2]|0;f[((f[q>>2]|0)==(h|0)?q:q+4|0)>>2]=a;f[a>>2]=h;f[j>>2]=a;o=a;p=f[a+8>>2]|0}b[o+12>>0]=1;b[p+12>>0]=0;o=f[p>>2]|0;a=o+4|0;q=f[a>>2]|0;f[p>>2]=q;if(q|0)f[q+8>>2]=p;q=p+8|0;f[o+8>>2]=f[q>>2];c=f[q>>2]|0;f[((f[c>>2]|0)==(p|0)?c:c+4|0)>>2]=o;f[a>>2]=p;f[q>>2]=o;return}else if((i|0)==16){if((f[h>>2]|0)==(e|0)){o=e+4|0;q=f[o>>2]|0;f[h>>2]=q;if(!q)r=k;else{f[q+8>>2]=h;r=f[j>>2]|0}f[g>>2]=r;r=f[j>>2]|0;f[((f[r>>2]|0)==(h|0)?r:r+4|0)>>2]=e;f[o>>2]=h;f[j>>2]=e;s=e;t=f[e+8>>2]|0}else{s=h;t=k}b[s+12>>0]=1;b[t+12>>0]=0;s=t+4|0;k=f[s>>2]|0;h=f[k>>2]|0;f[s>>2]=h;if(h|0)f[h+8>>2]=t;h=t+8|0;f[k+8>>2]=f[h>>2];s=f[h>>2]|0;f[((f[s>>2]|0)==(t|0)?s:s+4|0)>>2]=k;f[k>>2]=t;f[h>>2]=k;return}else if((i|0)==23)return}function Pe(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;d=f[b>>2]|0;b=a+12|0;e=(d|0)==-1;do if(e){g=1;h=-1;i=-1}else{j=d+(((d>>>0)%3|0|0)==0?2:-1)|0;if((j|0)!=-1){k=f[(f[b>>2]|0)+12>>2]|0;l=j;while(1){j=f[k+(l<<2)>>2]|0;if((j|0)==-1){m=0;n=l;break}o=j+1|0;l=((o>>>0)%3|0|0)==0?j+-2|0:o;if((l|0)==-1){m=1;n=-1;break}}if(e){g=m;h=-1;i=n;break}else{p=m;q=n}}else{p=1;q=-1}g=p;h=f[(f[f[b>>2]>>2]|0)+(d<<2)>>2]|0;i=q}while(0);if(c){c=(f[a+84>>2]|0)+(h>>>5<<2)|0;f[c>>2]=f[c>>2]|1<<(h&31);r=1}else r=0;c=f[(f[a+152>>2]|0)+(h<<2)>>2]|0;q=(f[a+140>>2]|0)+(c>>>5<<2)|0;f[q>>2]=f[q>>2]|1<<(c&31);if(!g){g=(((i>>>0)%3|0|0)==0?2:-1)+i|0;if((g|0)==-1){s=-1;t=i}else{s=f[(f[f[b>>2]>>2]|0)+(g<<2)>>2]|0;t=i}}else{s=-1;t=-1}if((s|0)==(h|0)){u=r;return u|0}i=f[a+84>>2]|0;a=r;r=s;s=t;while(1){t=i+(r>>>5<<2)|0;f[t>>2]=f[t>>2]|1<<(r&31);t=a+1|0;g=s+1|0;a:do if((s|0)!=-1?(c=((g>>>0)%3|0|0)==0?s+-2|0:g,(c|0)!=-1):0){q=f[b>>2]|0;d=f[q+12>>2]|0;p=c;while(1){c=f[d+(p<<2)>>2]|0;if((c|0)==-1)break;n=c+1|0;m=((n>>>0)%3|0|0)==0?c+-2|0:n;if((m|0)==-1){v=-1;w=-1;break a}else p=m}d=(((p>>>0)%3|0|0)==0?2:-1)+p|0;if((d|0)==-1){v=-1;w=p}else{v=f[(f[q>>2]|0)+(d<<2)>>2]|0;w=p}}else{v=-1;w=-1}while(0);if((v|0)==(h|0)){u=t;break}else{a=t;r=v;s=w}}return u|0}function Qe(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=Oa,C=Oa,D=Oa,E=Oa;g=u;u=u+16|0;h=g;i=b[d+24>>0]|0;j=i<<24>>24;Rh(a,c,e,j,0,d,1);k=f[a>>2]|0;a=(f[f[k>>2]>>2]|0)+(f[k+48>>2]|0)|0;k=f[c+4>>2]|0;Ap(h);Ko(h,$(n[c+20>>2]),(1<>>0>1073741823?-1:j<<2)|0;if(!e){Mq(k);u=g;return}l=d+68|0;m=d+48|0;o=d+40|0;p=c+8|0;c=h+4|0;q=(b[d+84>>0]|0)==0;if(i<<24>>24>0){r=0;s=0}else{i=0;do{if(q)t=f[(f[l>>2]|0)+(i<<2)>>2]|0;else t=i;v=m;w=f[v>>2]|0;x=f[v+4>>2]|0;v=o;y=f[v>>2]|0;z=un(y|0,f[v+4>>2]|0,t|0,0)|0;v=Vn(z|0,I|0,w|0,x|0)|0;kh(k|0,(f[f[d>>2]>>2]|0)+v|0,y|0)|0;i=i+1|0}while((i|0)!=(e|0));Mq(k);u=g;return}while(1){if(q)A=f[(f[l>>2]|0)+(s<<2)>>2]|0;else A=s;i=m;t=f[i>>2]|0;y=f[i+4>>2]|0;i=o;v=f[i>>2]|0;x=un(v|0,f[i+4>>2]|0,A|0,0)|0;i=Vn(x|0,I|0,t|0,y|0)|0;kh(k|0,(f[f[d>>2]>>2]|0)+i|0,v|0)|0;v=f[p>>2]|0;B=$(n[h>>2]);i=0;y=r;while(1){C=$(n[k+(i<<2)>>2]);D=$(C-$(n[v+(i<<2)>>2]));t=D<$(0.0);C=$(-D);E=$((t?C:D)/B);x=~~$(J($($(E*$(f[c>>2]|0))+$(.5))));f[a+(y<<2)>>2]=t?0-x|0:x;i=i+1|0;if((i|0)==(j|0))break;else y=y+1|0}s=s+1|0;if((s|0)==(e|0))break;else r=r+j|0}Mq(k);u=g;return}function Re(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;c=a+4|0;d=f[c>>2]|0;e=a+100|0;if(d>>>0<(f[e>>2]|0)>>>0){f[c>>2]=d+1;g=h[d>>0]|0}else g=Si(a)|0;switch(g|0){case 43:case 45:{d=(g|0)==45&1;i=f[c>>2]|0;if(i>>>0<(f[e>>2]|0)>>>0){f[c>>2]=i+1;j=h[i>>0]|0}else j=Si(a)|0;if((b|0)!=0&(j+-48|0)>>>0>9?(f[e>>2]|0)!=0:0){f[c>>2]=(f[c>>2]|0)+-1;k=d;l=j}else{k=d;l=j}break}default:{k=0;l=g}}if((l+-48|0)>>>0>9)if(!(f[e>>2]|0)){m=-2147483648;n=0}else{f[c>>2]=(f[c>>2]|0)+-1;m=-2147483648;n=0}else{g=0;j=l;while(1){g=j+-48+(g*10|0)|0;l=f[c>>2]|0;if(l>>>0<(f[e>>2]|0)>>>0){f[c>>2]=l+1;o=h[l>>0]|0}else o=Si(a)|0;if(!((o+-48|0)>>>0<10&(g|0)<214748364))break;else j=o}j=((g|0)<0)<<31>>31;if((o+-48|0)>>>0<10){l=o;d=g;b=j;while(1){i=un(d|0,b|0,10,0)|0;p=I;q=Vn(l|0,((l|0)<0)<<31>>31|0,-48,-1)|0;r=Vn(q|0,I|0,i|0,p|0)|0;p=I;i=f[c>>2]|0;if(i>>>0<(f[e>>2]|0)>>>0){f[c>>2]=i+1;s=h[i>>0]|0}else s=Si(a)|0;if((s+-48|0)>>>0<10&((p|0)<21474836|(p|0)==21474836&r>>>0<2061584302)){l=s;d=r;b=p}else{t=s;u=r;v=p;break}}}else{t=o;u=g;v=j}if((t+-48|0)>>>0<10)do{t=f[c>>2]|0;if(t>>>0<(f[e>>2]|0)>>>0){f[c>>2]=t+1;w=h[t>>0]|0}else w=Si(a)|0}while((w+-48|0)>>>0<10);if(f[e>>2]|0)f[c>>2]=(f[c>>2]|0)+-1;c=(k|0)!=0;k=Xn(0,0,u|0,v|0)|0;m=c?I:v;n=c?k:u}I=m;return n|0}function Se(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;b=a+1176|0;c=f[b>>2]|0;if(c|0){d=a+1180|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);Oq(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}Oq(g)}g=a+1164|0;b=f[g>>2]|0;if(b|0){j=a+1168|0;h=f[j>>2]|0;if((h|0)==(b|0))l=b;else{c=h;while(1){h=c+-12|0;f[j>>2]=h;d=f[h>>2]|0;if(!d)m=h;else{h=c+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);Oq(d);m=f[j>>2]|0}if((m|0)==(b|0))break;else c=m}l=f[g>>2]|0}Oq(l)}l=f[a+1152>>2]|0;if(l|0){g=a+1156|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);Oq(l)}l=f[a+1140>>2]|0;if(l|0){m=a+1144|0;g=f[m>>2]|0;if((g|0)!=(l|0))f[m>>2]=g+(~((g+-4-l|0)>>>2)<<2);Oq(l)}l=f[a+1128>>2]|0;if(!l){n=a+1108|0;jl(n);o=a+1088|0;jl(o);p=a+1068|0;jl(p);q=a+1036|0;Fj(q);r=a+12|0;Nh(r);return}g=a+1132|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);Oq(l);n=a+1108|0;jl(n);o=a+1088|0;jl(o);p=a+1068|0;jl(p);q=a+1036|0;Fj(q);r=a+12|0;Nh(r);return}function Te(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=u;u=u+16|0;e=d;g=a+4|0;h=f[g>>2]|0;i=f[(f[a>>2]|0)+52>>2]|0;if(!h){if(!(Sa[i&31](a,c,0)|0)){j=0;u=d;return j|0}}else if(!(Sa[i&31](a,c,f[(f[h+4>>2]|0)+80>>2]|0)|0)){j=0;u=d;return j|0}if(!(b[a+28>>0]|0)){j=1;u=d;return j|0}h=f[a+8>>2]|0;i=f[a+32>>2]|0;a=f[h+80>>2]|0;f[e>>2]=0;k=e+4|0;f[k>>2]=0;f[e+8>>2]=0;do if(a)if(a>>>0>1073741823)aq(e);else{l=a<<2;m=ln(l)|0;f[e>>2]=m;n=m+(a<<2)|0;f[e+8>>2]=n;sj(m|0,0,l|0)|0;f[k>>2]=n;o=m;p=n;q=m;break}else{o=0;p=0;q=0}while(0);e=f[c+4>>2]|0;a=f[c>>2]|0;c=a;a:do if((e|0)!=(a|0)){m=e-a>>2;if(b[h+84>>0]|0){n=0;while(1){f[o+(f[c+(n<<2)>>2]<<2)>>2]=n;n=n+1|0;if(n>>>0>=m>>>0)break a}}n=f[h+68>>2]|0;l=0;do{f[o+(f[n+(f[c+(l<<2)>>2]<<2)>>2]<<2)>>2]=l;l=l+1|0}while(l>>>0>>0)}while(0);c=f[(f[(f[g>>2]|0)+4>>2]|0)+80>>2]|0;b:do if(c|0){g=f[i+68>>2]|0;if(b[h+84>>0]|0){a=0;while(1){f[g+(a<<2)>>2]=f[o+(a<<2)>>2];a=a+1|0;if(a>>>0>=c>>>0)break b}}a=f[h+68>>2]|0;e=0;do{f[g+(e<<2)>>2]=f[o+(f[a+(e<<2)>>2]<<2)>>2];e=e+1|0}while(e>>>0>>0)}while(0);if(o|0){if((p|0)!=(o|0))f[k>>2]=p+(~((p+-4-o|0)>>>2)<<2);Oq(q)}j=1;u=d;return j|0}function Ue(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=u;u=u+16|0;d=c;f[a>>2]=0;f[a+8>>2]=b;Oh(a+12|0);wn(a+1036|0);vo(a+1068|0);vo(a+1088|0);vo(a+1108|0);e=a+1128|0;f[e>>2]=0;g=a+1132|0;f[g>>2]=0;f[a+1136>>2]=0;h=(b|0)==0;do if(!h)if(b>>>0>1073741823)aq(e);else{i=b<<2;j=ln(i)|0;f[e>>2]=j;k=j+(b<<2)|0;f[a+1136>>2]=k;sj(j|0,0,i|0)|0;f[g>>2]=k;break}while(0);g=a+1140|0;f[g>>2]=0;e=a+1144|0;f[e>>2]=0;f[a+1148>>2]=0;if(!h){k=b<<2;i=ln(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+1148>>2]=g;sj(i|0,0,k|0)|0;f[e>>2]=g}g=a+1152|0;f[g>>2]=0;e=a+1156|0;f[e>>2]=0;f[a+1160>>2]=0;if(!h){k=b<<2;i=ln(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+1160>>2]=g;sj(i|0,0,k|0)|0;f[e>>2]=g}g=b<<5|1;f[d>>2]=0;e=d+4|0;f[e>>2]=0;f[d+8>>2]=0;if(!h){k=b<<2;i=ln(k)|0;f[d>>2]=i;j=i+(b<<2)|0;f[d+8>>2]=j;sj(i|0,0,k|0)|0;f[e>>2]=j}lk(a+1164|0,g,d);j=f[d>>2]|0;if(j|0){k=f[e>>2]|0;if((k|0)!=(j|0))f[e>>2]=k+(~((k+-4-j|0)>>>2)<<2);Oq(j)}f[d>>2]=0;j=d+4|0;f[j>>2]=0;f[d+8>>2]=0;if(!h){h=b<<2;k=ln(h)|0;f[d>>2]=k;e=k+(b<<2)|0;f[d+8>>2]=e;sj(k|0,0,h|0)|0;f[j>>2]=e}lk(a+1176|0,g,d);g=f[d>>2]|0;if(!g){u=c;return}d=f[j>>2]|0;if((d|0)!=(g|0))f[j>>2]=d+(~((d+-4-g|0)>>>2)<<2);Oq(g);u=c;return}function Ve(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0.0,E=0.0;g=u;u=u+16|0;h=g;i=b+16|0;f[a>>2]=f[i>>2];f[a+4>>2]=f[i+4>>2];f[a+8>>2]=f[i+8>>2];f[a+12>>2]=f[i+12>>2];f[a+16>>2]=f[i+16>>2];f[a+20>>2]=f[i+20>>2];j=a+8|0;f[j>>2]=(f[j>>2]|0)+d;j=(d|0)>0;if(j){k=b+4|0;l=a+16|0;m=a+12|0;n=f[b>>2]|0;o=n;q=0;r=o;s=n;n=o;while(1){o=f[c+(q<<2)>>2]|0;t=f[k>>2]|0;if(t-s>>2>>>0>o>>>0){v=r;w=n}else{x=o+1|0;f[h>>2]=0;y=t-s>>2;z=s;A=t;if(x>>>0<=y>>>0)if(x>>>0>>0?(t=z+(x<<2)|0,(t|0)!=(A|0)):0){f[k>>2]=A+(~((A+-4-t|0)>>>2)<<2);B=r}else B=r;else{Ch(b,x-y|0,h);B=f[b>>2]|0}v=B;w=B}y=w+(o<<2)|0;x=f[y>>2]|0;s=w;if((x|0)<=1)if((x|0)==0?(f[l>>2]=(f[l>>2]|0)+1,o>>>0>(f[m>>2]|0)>>>0):0){f[m>>2]=o;C=0.0}else C=0.0;else{D=+(x|0);C=+Zg(D)*D}x=(f[y>>2]|0)+1|0;f[y>>2]=x;D=+(x|0);E=+Zg(D)*D-C;p[a>>3]=+p[a>>3]+E;q=q+1|0;if((q|0)==(d|0))break;else{r=v;n=w}}}if(e){f[i>>2]=f[a>>2];f[i+4>>2]=f[a+4>>2];f[i+8>>2]=f[a+8>>2];f[i+12>>2]=f[a+12>>2];f[i+16>>2]=f[a+16>>2];u=g;return}if(!j){u=g;return}j=f[b>>2]|0;b=0;do{a=j+(f[c+(b<<2)>>2]<<2)|0;f[a>>2]=(f[a>>2]|0)+-1;b=b+1|0}while((b|0)!=(d|0));u=g;return}function We(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0.0;a:do if(b>>>0<=20)do switch(b|0){case 9:{d=(f[c>>2]|0)+(4-1)&~(4-1);e=f[d>>2]|0;f[c>>2]=d+4;f[a>>2]=e;break a;break}case 10:{e=(f[c>>2]|0)+(4-1)&~(4-1);d=f[e>>2]|0;f[c>>2]=e+4;e=a;f[e>>2]=d;f[e+4>>2]=((d|0)<0)<<31>>31;break a;break}case 11:{d=(f[c>>2]|0)+(4-1)&~(4-1);e=f[d>>2]|0;f[c>>2]=d+4;d=a;f[d>>2]=e;f[d+4>>2]=0;break a;break}case 12:{d=(f[c>>2]|0)+(8-1)&~(8-1);e=d;g=f[e>>2]|0;h=f[e+4>>2]|0;f[c>>2]=d+8;d=a;f[d>>2]=g;f[d+4>>2]=h;break a;break}case 13:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=(d&65535)<<16>>16;d=a;f[d>>2]=h;f[d+4>>2]=((h|0)<0)<<31>>31;break a;break}case 14:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=a;f[h>>2]=d&65535;f[h+4>>2]=0;break a;break}case 15:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=(d&255)<<24>>24;d=a;f[d>>2]=h;f[d+4>>2]=((h|0)<0)<<31>>31;break a;break}case 16:{h=(f[c>>2]|0)+(4-1)&~(4-1);d=f[h>>2]|0;f[c>>2]=h+4;h=a;f[h>>2]=d&255;f[h+4>>2]=0;break a;break}case 17:{h=(f[c>>2]|0)+(8-1)&~(8-1);i=+p[h>>3];f[c>>2]=h+8;p[a>>3]=i;break a;break}case 18:{h=(f[c>>2]|0)+(8-1)&~(8-1);i=+p[h>>3];f[c>>2]=h+8;p[a>>3]=i;break a;break}default:break a}while(0);while(0);return}function Xe(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;c=u;u=u+16|0;d=c+4|0;e=c;g=c+8|0;if(!(Qa[f[(f[a>>2]|0)+32>>2]&127](a)|0)){h=0;u=c;return h|0}i=a+44|0;j=f[i>>2]|0;k=a+8|0;l=a+12|0;m=f[l>>2]|0;n=f[k>>2]|0;b[g>>0]=(m-n|0)>>>2;o=j+16|0;p=f[o+4>>2]|0;if((p|0)>0|(p|0)==0&(f[o>>2]|0)>>>0>0){q=k;r=n;s=m}else{f[e>>2]=f[j+4>>2];f[d>>2]=f[e>>2];Me(j,d,g,g+1|0)|0;q=k;r=f[k>>2]|0;s=f[l>>2]|0}a:do if((r|0)!=(s|0)){l=a+4|0;k=r;while(1){g=f[k>>2]|0;k=k+4|0;if(!(Sa[f[(f[g>>2]|0)+8>>2]&31](g,a,f[l>>2]|0)|0)){h=0;break}if((k|0)==(s|0))break a}u=c;return h|0}while(0);if(!(xc(a)|0)){h=0;u=c;return h|0}s=a+32|0;r=f[s>>2]|0;k=a+36|0;l=f[k>>2]|0;b:do if((r|0)!=(l|0)){g=r;do{if(!(Ra[f[(f[a>>2]|0)+40>>2]&127](a,f[g>>2]|0)|0)){h=0;t=18;break}g=g+4|0}while((g|0)!=(l|0));if((t|0)==18){u=c;return h|0}g=f[s>>2]|0;d=f[k>>2]|0;if((g|0)!=(d|0)){j=g;while(1){g=f[(f[q>>2]|0)+(f[j>>2]<<2)>>2]|0;j=j+4|0;if(!(Ra[f[(f[g>>2]|0)+12>>2]&127](g,f[i>>2]|0)|0)){h=0;break}if((j|0)==(d|0))break b}u=c;return h|0}}while(0);h=Qa[f[(f[a>>2]|0)+44>>2]&127](a)|0;u=c;return h|0}function Ye(a,b){a=a|0;b=b|0;ld(a,b);ld(a+32|0,b);ld(a+64|0,b);ld(a+96|0,b);ld(a+128|0,b);ld(a+160|0,b);ld(a+192|0,b);ld(a+224|0,b);ld(a+256|0,b);ld(a+288|0,b);ld(a+320|0,b);ld(a+352|0,b);ld(a+384|0,b);ld(a+416|0,b);ld(a+448|0,b);ld(a+480|0,b);ld(a+512|0,b);ld(a+544|0,b);ld(a+576|0,b);ld(a+608|0,b);ld(a+640|0,b);ld(a+672|0,b);ld(a+704|0,b);ld(a+736|0,b);ld(a+768|0,b);ld(a+800|0,b);ld(a+832|0,b);ld(a+864|0,b);ld(a+896|0,b);ld(a+928|0,b);ld(a+960|0,b);ld(a+992|0,b);ld(a+1024|0,b);return}function Ze(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0;c=u;u=u+32|0;d=c;e=a+4|0;g=f[a>>2]|0;h=(f[e>>2]|0)-g>>2;i=h+1|0;if(i>>>0>1073741823)aq(a);j=a+8|0;k=(f[j>>2]|0)-g|0;g=k>>1;l=k>>2>>>0<536870911?(g>>>0>>0?i:g):1073741823;f[d+12>>2]=0;f[d+16>>2]=a+8;do if(l)if(l>>>0>1073741823){g=ra(8)|0;Oo(g,16035);f[g>>2]=7256;va(g|0,1112,110)}else{m=ln(l<<2)|0;break}else m=0;while(0);f[d>>2]=m;g=m+(h<<2)|0;h=d+8|0;i=d+4|0;f[i>>2]=g;k=m+(l<<2)|0;l=d+12|0;f[l>>2]=k;m=f[b>>2]|0;f[b>>2]=0;f[g>>2]=m;m=g+4|0;f[h>>2]=m;b=f[a>>2]|0;n=f[e>>2]|0;if((n|0)==(b|0)){o=g;p=l;q=h;r=b;s=m;t=n;v=k;w=o;f[a>>2]=w;f[i>>2]=r;f[e>>2]=s;f[q>>2]=t;x=f[j>>2]|0;f[j>>2]=v;f[p>>2]=x;f[d>>2]=r;ki(d);u=c;return}else{y=n;z=g}do{y=y+-4|0;g=f[y>>2]|0;f[y>>2]=0;f[z+-4>>2]=g;z=(f[i>>2]|0)+-4|0;f[i>>2]=z}while((y|0)!=(b|0));o=z;p=l;q=h;r=f[a>>2]|0;s=f[h>>2]|0;t=f[e>>2]|0;v=f[l>>2]|0;w=o;f[a>>2]=w;f[i>>2]=r;f[e>>2]=s;f[q>>2]=t;x=f[j>>2]|0;f[j>>2]=v;f[p>>2]=x;f[d>>2]=r;ki(d);u=c;return}function _e(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+32|0;e=d+12|0;g=d;h=nl(c,0)|0;if(!h){f[a>>2]=0;u=d;return}i=f[c+100>>2]|0;j=f[c+96>>2]|0;c=i-j|0;k=(c|0)/12|0;f[e>>2]=0;l=e+4|0;f[l>>2]=0;f[e+8>>2]=0;m=j;do if(c)if(k>>>0>357913941)aq(e);else{n=ln(c)|0;f[e>>2]=n;f[e+8>>2]=n+(k*12|0);sj(n|0,0,c|0)|0;f[l>>2]=n+c;o=n;break}else o=0;while(0);f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;a:do if((i|0)!=(j|0)){c=g+4|0;n=g+8|0;if(b[h+84>>0]|0){p=0;while(1){q=m+(p*12|0)|0;f[g>>2]=f[q>>2];f[g+4>>2]=f[q+4>>2];f[g+8>>2]=f[q+8>>2];f[o+(p*12|0)>>2]=f[g>>2];f[o+(p*12|0)+4>>2]=f[c>>2];f[o+(p*12|0)+8>>2]=f[n>>2];p=p+1|0;if(p>>>0>=k>>>0)break a}}p=f[h+68>>2]|0;q=0;do{r=f[p+(f[m+(q*12|0)>>2]<<2)>>2]|0;f[g>>2]=r;s=f[p+(f[m+(q*12|0)+4>>2]<<2)>>2]|0;f[c>>2]=s;t=f[p+(f[m+(q*12|0)+8>>2]<<2)>>2]|0;f[n>>2]=t;f[o+(q*12|0)>>2]=r;f[o+(q*12|0)+4>>2]=s;f[o+(q*12|0)+8>>2]=t;q=q+1|0}while(q>>>0>>0)}while(0);Kj(a,e);a=f[e>>2]|0;if(a|0){e=f[l>>2]|0;if((e|0)!=(a|0))f[l>>2]=e+(~(((e+-12-a|0)>>>0)/12|0)*12|0);Oq(a)}u=d;return}function $e(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=u;u=u+16|0;d=c;f[a>>2]=0;f[a+8>>2]=b;wn(a+12|0);vo(a+44|0);vo(a+64|0);vo(a+84|0);e=a+104|0;f[e>>2]=0;g=a+108|0;f[g>>2]=0;f[a+112>>2]=0;h=(b|0)==0;do if(!h)if(b>>>0>1073741823)aq(e);else{i=b<<2;j=ln(i)|0;f[e>>2]=j;k=j+(b<<2)|0;f[a+112>>2]=k;sj(j|0,0,i|0)|0;f[g>>2]=k;break}while(0);g=a+116|0;f[g>>2]=0;e=a+120|0;f[e>>2]=0;f[a+124>>2]=0;if(!h){k=b<<2;i=ln(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+124>>2]=g;sj(i|0,0,k|0)|0;f[e>>2]=g}g=a+128|0;f[g>>2]=0;e=a+132|0;f[e>>2]=0;f[a+136>>2]=0;if(!h){k=b<<2;i=ln(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+136>>2]=g;sj(i|0,0,k|0)|0;f[e>>2]=g}g=b<<5|1;f[d>>2]=0;e=d+4|0;f[e>>2]=0;f[d+8>>2]=0;if(!h){k=b<<2;i=ln(k)|0;f[d>>2]=i;j=i+(b<<2)|0;f[d+8>>2]=j;sj(i|0,0,k|0)|0;f[e>>2]=j}lk(a+140|0,g,d);j=f[d>>2]|0;if(j|0){k=f[e>>2]|0;if((k|0)!=(j|0))f[e>>2]=k+(~((k+-4-j|0)>>>2)<<2);Oq(j)}f[d>>2]=0;j=d+4|0;f[j>>2]=0;f[d+8>>2]=0;if(!h){h=b<<2;k=ln(h)|0;f[d>>2]=k;e=k+(b<<2)|0;f[d+8>>2]=e;sj(k|0,0,h|0)|0;f[j>>2]=e}lk(a+152|0,g,d);g=f[d>>2]|0;if(!g){u=c;return}d=f[j>>2]|0;if((d|0)!=(g|0))f[j>>2]=d+(~((d+-4-g|0)>>>2)<<2);Oq(g);u=c;return}function af(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=u;u=u+16|0;d=c;f[a>>2]=0;f[a+8>>2]=b;vo(a+12|0);vo(a+32|0);vo(a+52|0);vo(a+72|0);e=a+92|0;f[e>>2]=0;g=a+96|0;f[g>>2]=0;f[a+100>>2]=0;h=(b|0)==0;do if(!h)if(b>>>0>1073741823)aq(e);else{i=b<<2;j=ln(i)|0;f[e>>2]=j;k=j+(b<<2)|0;f[a+100>>2]=k;sj(j|0,0,i|0)|0;f[g>>2]=k;break}while(0);g=a+104|0;f[g>>2]=0;e=a+108|0;f[e>>2]=0;f[a+112>>2]=0;if(!h){k=b<<2;i=ln(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+112>>2]=g;sj(i|0,0,k|0)|0;f[e>>2]=g}g=a+116|0;f[g>>2]=0;e=a+120|0;f[e>>2]=0;f[a+124>>2]=0;if(!h){k=b<<2;i=ln(k)|0;f[g>>2]=i;g=i+(b<<2)|0;f[a+124>>2]=g;sj(i|0,0,k|0)|0;f[e>>2]=g}g=b<<5|1;f[d>>2]=0;e=d+4|0;f[e>>2]=0;f[d+8>>2]=0;if(!h){k=b<<2;i=ln(k)|0;f[d>>2]=i;j=i+(b<<2)|0;f[d+8>>2]=j;sj(i|0,0,k|0)|0;f[e>>2]=j}lk(a+128|0,g,d);j=f[d>>2]|0;if(j|0){k=f[e>>2]|0;if((k|0)!=(j|0))f[e>>2]=k+(~((k+-4-j|0)>>>2)<<2);Oq(j)}f[d>>2]=0;j=d+4|0;f[j>>2]=0;f[d+8>>2]=0;if(!h){h=b<<2;k=ln(h)|0;f[d>>2]=k;e=k+(b<<2)|0;f[d+8>>2]=e;sj(k|0,0,h|0)|0;f[j>>2]=e}lk(a+140|0,g,d);g=f[d>>2]|0;if(!g){u=c;return}d=f[j>>2]|0;if((d|0)!=(g|0))f[j>>2]=d+(~((d+-4-g|0)>>>2)<<2);Oq(g);u=c;return}function bf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;d=ln(40)|0;e=d+16|0;pj(e,c);pj(d+28|0,c+12|0);c=a+4|0;g=f[c>>2]|0;do if(g){h=b[d+27>>0]|0;i=h<<24>>24<0;j=i?f[d+20>>2]|0:h&255;h=i?f[e>>2]|0:e;i=g;while(1){k=i+16|0;l=b[k+11>>0]|0;m=l<<24>>24<0;n=m?f[i+20>>2]|0:l&255;l=n>>>0>>0?n:j;if((l|0)!=0?(o=Vk(h,m?f[k>>2]|0:k,l)|0,(o|0)!=0):0)if((o|0)<0)p=7;else p=9;else if(j>>>0>>0)p=7;else p=9;if((p|0)==7){p=0;n=f[i>>2]|0;if(!n){p=8;break}else q=n}else if((p|0)==9){p=0;r=i+4|0;n=f[r>>2]|0;if(!n){p=11;break}else q=n}i=q}if((p|0)==8){s=i;t=i;break}else if((p|0)==11){s=i;t=r;break}}else{s=c;t=c}while(0);f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=s;f[t>>2]=d;s=f[f[a>>2]>>2]|0;if(!s){u=d;v=a+4|0;w=f[v>>2]|0;Oe(w,u);x=a+8|0;y=f[x>>2]|0;z=y+1|0;f[x>>2]=z;return d|0}f[a>>2]=s;u=f[t>>2]|0;v=a+4|0;w=f[v>>2]|0;Oe(w,u);x=a+8|0;y=f[x>>2]|0;z=y+1|0;f[x>>2]=z;return d|0}function cf(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3680;wi(a+200|0);b=f[a+184>>2]|0;if(b|0){c=a+188|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}kj(a+172|0);b=f[a+152>>2]|0;if(b|0){d=a+156|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+140>>2]|0;if(b|0)Oq(b);b=f[a+128>>2]|0;if(b|0){c=b;do{b=c;c=f[c>>2]|0;Oq(b)}while((c|0)!=0)}c=a+120|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)Oq(b);b=f[a+108>>2]|0;if(b|0){c=a+112|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);Oq(b)}b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+84>>2]|0;if(b|0)Oq(b);b=f[a+72>>2]|0;if(b|0){c=a+76|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+40>>2]|0;if(b|0){c=a+44|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+28>>2]|0;if(b|0)Oq(b);b=f[a+16>>2]|0;if(b|0){d=a+20|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=a+12|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;Ii(a);Oq(a);return}function df(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a+140|0;c=f[b>>2]|0;if(c|0){d=a+144|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);Oq(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}Oq(g)}g=a+128|0;b=f[g>>2]|0;if(b|0){j=a+132|0;h=f[j>>2]|0;if((h|0)==(b|0))l=b;else{c=h;while(1){h=c+-12|0;f[j>>2]=h;d=f[h>>2]|0;if(!d)m=h;else{h=c+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);Oq(d);m=f[j>>2]|0}if((m|0)==(b|0))break;else c=m}l=f[g>>2]|0}Oq(l)}l=f[a+116>>2]|0;if(l|0){g=a+120|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);Oq(l)}l=f[a+104>>2]|0;if(l|0){m=a+108|0;g=f[m>>2]|0;if((g|0)!=(l|0))f[m>>2]=g+(~((g+-4-l|0)>>>2)<<2);Oq(l)}l=f[a+92>>2]|0;if(!l){n=a+72|0;jl(n);o=a+52|0;jl(o);p=a+32|0;jl(p);q=a+12|0;jl(q);return}g=a+96|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);Oq(l);n=a+72|0;jl(n);o=a+52|0;jl(o);p=a+32|0;jl(p);q=a+12|0;jl(q);return}function ef(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a+152|0;c=f[b>>2]|0;if(c|0){d=a+156|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);Oq(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}Oq(g)}g=a+140|0;b=f[g>>2]|0;if(b|0){j=a+144|0;h=f[j>>2]|0;if((h|0)==(b|0))l=b;else{c=h;while(1){h=c+-12|0;f[j>>2]=h;d=f[h>>2]|0;if(!d)m=h;else{h=c+-8|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);Oq(d);m=f[j>>2]|0}if((m|0)==(b|0))break;else c=m}l=f[g>>2]|0}Oq(l)}l=f[a+128>>2]|0;if(l|0){g=a+132|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);Oq(l)}l=f[a+116>>2]|0;if(l|0){m=a+120|0;g=f[m>>2]|0;if((g|0)!=(l|0))f[m>>2]=g+(~((g+-4-l|0)>>>2)<<2);Oq(l)}l=f[a+104>>2]|0;if(!l){n=a+84|0;jl(n);o=a+64|0;jl(o);p=a+44|0;jl(p);q=a+12|0;Fj(q);return}g=a+108|0;m=f[g>>2]|0;if((m|0)!=(l|0))f[g>>2]=m+(~((m+-4-l|0)>>>2)<<2);Oq(l);n=a+84|0;jl(n);o=a+64|0;jl(o);p=a+44|0;jl(p);q=a+12|0;Fj(q);return}function ff(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3480;uj(a+200|0);b=f[a+184>>2]|0;if(b|0){c=a+188|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}kj(a+172|0);b=f[a+152>>2]|0;if(b|0){d=a+156|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+140>>2]|0;if(b|0)Oq(b);b=f[a+128>>2]|0;if(b|0){c=b;do{b=c;c=f[c>>2]|0;Oq(b)}while((c|0)!=0)}c=a+120|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0)Oq(b);b=f[a+108>>2]|0;if(b|0){c=a+112|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);Oq(b)}b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+84>>2]|0;if(b|0)Oq(b);b=f[a+72>>2]|0;if(b|0){c=a+76|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+40>>2]|0;if(b|0){c=a+44|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+28>>2]|0;if(b|0)Oq(b);b=f[a+16>>2]|0;if(b|0){d=a+20|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=a+12|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;Ii(a);Oq(a);return}function gf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=u;u=u+144|0;g=e+136|0;h=e+104|0;i=e;j=ln(124)|0;k=f[c+8>>2]|0;f[j+4>>2]=0;f[j>>2]=3656;f[j+12>>2]=3636;f[j+100>>2]=0;f[j+104>>2]=0;f[j+108>>2]=0;l=j+16|0;m=l+80|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));f[j+112>>2]=k;f[j+116>>2]=d;n=j+120|0;f[n>>2]=0;o=j;f[h>>2]=3636;p=h+4|0;q=p+4|0;f[q>>2]=0;f[q+4>>2]=0;f[q+8>>2]=0;f[q+12>>2]=0;f[q+16>>2]=0;f[q+20>>2]=0;q=f[c+12>>2]|0;f[i+4>>2]=3636;f[i+92>>2]=0;f[i+96>>2]=0;f[i+100>>2]=0;l=i+8|0;m=l+80|0;do{f[l>>2]=0;l=l+4|0}while((l|0)<(m|0));l=q;f[p>>2]=l;m=((f[l+4>>2]|0)-(f[q>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;qh(h+8|0,m,g);Va[f[(f[h>>2]|0)+8>>2]&127](h);f[i>>2]=f[p>>2];fg(i+4|0,h)|0;f[i+36>>2]=q;f[i+40>>2]=d;f[i+44>>2]=k;f[i+48>>2]=j;f[n>>2]=c+72;Sg(j,i);f[a>>2]=o;Qi(i);f[h>>2]=3636;i=f[h+20>>2]|0;if(i|0)Oq(i);i=f[h+8>>2]|0;if(!i){u=e;return}Oq(i);u=e;return}function hf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+48|0;d=c+44|0;e=c+40|0;g=c+36|0;h=c+32|0;i=c;f[h>>2]=f[a+60>>2];j=b+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)){f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,h,h+4|0)|0}wn(i);tk(i);if((f[h>>2]|0)>0){k=a+56|0;l=1;m=0;do{n=l;l=(f[(f[k>>2]|0)+(m>>>5<<2)>>2]&1<<(m&31)|0)!=0;fj(i,n^l^1);m=m+1|0}while((m|0)<(f[h>>2]|0))}ld(i,b);f[g>>2]=f[a+12>>2];h=j;m=f[h>>2]|0;l=f[h+4>>2]|0;if((l|0)>0|(l|0)==0&m>>>0>0){o=l;p=m}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;m=j;o=f[m+4>>2]|0;p=f[m>>2]|0}f[g>>2]=f[a+20>>2];if((o|0)>0|(o|0)==0&p>>>0>0){Fj(i);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;Fj(i);u=c;return 1}function jf(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;g=u;u=u+16|0;h=g;if((f[c+56>>2]|0)==-1){i=-1;u=g;return i|0}j=ln(96)|0;tl(j,c);f[h>>2]=j;j=vh(a,h)|0;c=f[h>>2]|0;f[h>>2]=0;if(c|0){h=c+88|0;k=f[h>>2]|0;f[h>>2]=0;if(k|0){h=f[k+8>>2]|0;if(h|0){l=k+12|0;if((f[l>>2]|0)!=(h|0))f[l>>2]=h;Oq(h)}Oq(k)}k=f[c+68>>2]|0;if(k|0){h=c+72|0;l=f[h>>2]|0;if((l|0)!=(k|0))f[h>>2]=l+(~((l+-4-k|0)>>>2)<<2);Oq(k)}k=c+64|0;l=f[k>>2]|0;f[k>>2]=0;if(l|0){k=f[l>>2]|0;if(k|0){h=l+4|0;if((f[h>>2]|0)!=(k|0))f[h>>2]=k;Oq(k)}Oq(l)}Oq(c)}c=a+8|0;l=(f[c>>2]|0)+(j<<2)|0;k=f[l>>2]|0;do if(!d){h=f[a+80>>2]|0;b[k+84>>0]=0;m=k+68|0;n=k+72|0;o=f[n>>2]|0;p=f[m>>2]|0;q=o-p>>2;r=o;if(h>>>0>q>>>0){Ch(m,h-q|0,6220);break}if(h>>>0>>0?(q=p+(h<<2)|0,(q|0)!=(r|0)):0)f[n>>2]=r+(~((r+-4-q|0)>>>2)<<2)}else{b[k+84>>0]=1;q=f[k+68>>2]|0;r=k+72|0;n=f[r>>2]|0;if((n|0)==(q|0))s=k;else{f[r>>2]=n+(~((n+-4-q|0)>>>2)<<2);s=f[l>>2]|0}f[s+80>>2]=f[a+80>>2]}while(0);if(!e){i=j;u=g;return i|0}Bj(f[(f[c>>2]|0)+(j<<2)>>2]|0,e)|0;i=j;u=g;return i|0}function kf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;d=u;u=u+32|0;h=d+24|0;i=d+16|0;j=d;k=d+8|0;f[a+52>>2]=e;f[a+44>>2]=g;g=Lq(e>>>0>1073741823?-1:e<<2)|0;l=a+48|0;m=f[l>>2]|0;f[l>>2]=g;if(m|0)Mq(m);m=a+36|0;g=f[m>>2]|0;n=f[g+4>>2]|0;o=f[g>>2]|0;p=n-o|0;if((p|0)<=0){u=d;return 1}q=(p>>>2)+-1|0;p=a+8|0;r=i+4|0;s=j+4|0;t=h+4|0;if(n-o>>2>>>0>q>>>0){v=q;w=o}else{x=g;aq(x)}while(1){f[k>>2]=f[w+(v<<2)>>2];f[h>>2]=f[k>>2];Bc(a,h,b,v);g=X(v,e)|0;o=b+(g<<2)|0;q=f[l>>2]|0;n=c+(g<<2)|0;g=f[o+4>>2]|0;y=f[q>>2]|0;z=f[q+4>>2]|0;f[i>>2]=f[o>>2];f[r>>2]=g;f[j>>2]=y;f[s>>2]=z;Od(h,p,i,j);f[n>>2]=f[h>>2];f[n+4>>2]=f[t>>2];v=v+-1|0;if((v|0)<=-1){A=5;break}n=f[m>>2]|0;w=f[n>>2]|0;if((f[n+4>>2]|0)-w>>2>>>0<=v>>>0){x=n;A=6;break}}if((A|0)==5){u=d;return 1}else if((A|0)==6)aq(x);return 0}function lf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=f[c>>2]|0;c=f[d>>2]|0;e=f[a+4>>2]|0;g=f[d+4>>2]|0;h=e+-1|0;i=(h&e|0)==0;if(!i)if(g>>>0>>0)j=g;else j=(g>>>0)%(e>>>0)|0;else j=h&g;g=(f[a>>2]|0)+(j<<2)|0;k=f[g>>2]|0;while(1){l=f[k>>2]|0;if((l|0)==(d|0))break;else k=l}if((k|0)!=(a+8|0)){l=f[k+4>>2]|0;if(!i)if(l>>>0>>0)m=l;else m=(l>>>0)%(e>>>0)|0;else m=l&h;if((m|0)==(j|0)){n=c;o=21}else o=13}else o=13;do if((o|0)==13){if(c|0){m=f[c+4>>2]|0;if(!i)if(m>>>0>>0)p=m;else p=(m>>>0)%(e>>>0)|0;else p=m&h;if((p|0)==(j|0)){q=c;r=c;o=22;break}}f[g>>2]=0;n=f[d>>2]|0;o=21}while(0);if((o|0)==21){g=n;if(!n)s=g;else{q=n;r=g;o=22}}if((o|0)==22){o=f[q+4>>2]|0;if(!i)if(o>>>0>>0)t=o;else t=(o>>>0)%(e>>>0)|0;else t=o&h;if((t|0)==(j|0))s=r;else{f[(f[a>>2]|0)+(t<<2)>>2]=k;s=f[d>>2]|0}}f[k>>2]=s;f[d>>2]=0;s=a+12|0;f[s>>2]=(f[s>>2]|0)+-1;if(!d)return c|0;s=d+8|0;a=f[d+20>>2]|0;if(a|0){k=d+24|0;if((f[k>>2]|0)!=(a|0))f[k>>2]=a;Oq(a)}if((b[s+11>>0]|0)<0)Oq(f[s>>2]|0);Oq(d);return c|0}function mf(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;b=u;u=u+16|0;c=b+4|0;d=b;f[c>>2]=0;e=c+4|0;f[e>>2]=0;f[c+8>>2]=0;g=a+52|0;h=f[g>>2]|0;i=(f[h+100>>2]|0)-(f[h+96>>2]|0)|0;j=(i|0)/12|0;if(!i){k=0;l=0}else{i=c+8|0;m=0;n=0;o=h;h=0;p=0;while(1){q=f[o+96>>2]|0;r=f[q+(n*12|0)>>2]|0;s=r-m|0;t=((s|0)>-1?s:0-s|0)<<1|s>>>31;f[d>>2]=t;if((h|0)==(p|0)){Ri(c,d);v=f[e>>2]|0;w=f[i>>2]|0}else{f[h>>2]=t;t=h+4|0;f[e>>2]=t;v=t;w=p}t=f[q+(n*12|0)+4>>2]|0;s=t-r|0;r=((s|0)>-1?s:0-s|0)<<1|s>>>31;f[d>>2]=r;if((v|0)==(w|0)){Ri(c,d);x=f[e>>2]|0;y=f[i>>2]|0}else{f[v>>2]=r;r=v+4|0;f[e>>2]=r;x=r;y=w}r=f[q+(n*12|0)+8>>2]|0;q=r-t|0;t=((q|0)>-1?q:0-q|0)<<1|q>>>31;f[d>>2]=t;if((x|0)==(y|0))Ri(c,d);else{f[x>>2]=t;f[e>>2]=x+4}t=n+1|0;if(t>>>0>=j>>>0)break;m=r;n=t;o=f[g>>2]|0;h=f[e>>2]|0;p=f[i>>2]|0}k=f[c>>2]|0;l=f[e>>2]|0}Mc(k,l-k>>2,1,0,f[a+44>>2]|0)|0;a=f[c>>2]|0;if(!a){u=b;return 1}c=f[e>>2]|0;if((c|0)!=(a|0))f[e>>2]=c+(~((c+-4-a|0)>>>2)<<2);Oq(a);u=b;return 1}function nf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+48|0;d=c+44|0;e=c+40|0;g=c+36|0;h=c+32|0;i=c;f[h>>2]=f[a+80>>2];j=b+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)){f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,h,h+4|0)|0}wn(i);tk(i);if((f[h>>2]|0)>0){k=a+76|0;l=1;m=0;do{n=l;l=(f[(f[k>>2]|0)+(m>>>5<<2)>>2]&1<<(m&31)|0)!=0;fj(i,n^l^1);m=m+1|0}while((m|0)<(f[h>>2]|0))}ld(i,b);f[g>>2]=f[a+12>>2];h=j;m=f[h>>2]|0;l=f[h+4>>2]|0;if((l|0)>0|(l|0)==0&m>>>0>0){o=l;p=m}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;m=j;o=f[m+4>>2]|0;p=f[m>>2]|0}f[g>>2]=f[a+16>>2];if((o|0)>0|(o|0)==0&p>>>0>0){Fj(i);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;Fj(i);u=c;return 1}function of(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=u;u=u+16|0;d=c+12|0;e=c+8|0;g=c+4|0;h=c;if(!b){i=ln(76)|0;j=ln(12)|0;k=f[(f[a+4>>2]|0)+80>>2]|0;f[j+4>>2]=0;f[j>>2]=3908;f[j+8>>2]=k;f[h>>2]=j;rl(i,h,0);j=i;f[g>>2]=j;i=a+12|0;k=f[i>>2]|0;if(k>>>0<(f[a+16>>2]|0)>>>0){f[g>>2]=0;f[k>>2]=j;f[i>>2]=k+4;l=g}else{Qg(a+8|0,g);l=g}g=f[l>>2]|0;f[l>>2]=0;if(g|0)Va[f[(f[g>>2]|0)+4>>2]&127](g);g=f[h>>2]|0;f[h>>2]=0;if(!g){u=c;return 1}Va[f[(f[g>>2]|0)+4>>2]&127](g);u=c;return 1}g=f[f[a+8>>2]>>2]|0;f[d>>2]=b;a=g+4|0;h=g+8|0;l=f[h>>2]|0;if((l|0)==(f[g+12>>2]|0))Ri(a,d);else{f[l>>2]=b;f[h>>2]=l+4}l=f[d>>2]|0;b=g+16|0;k=g+20|0;g=f[k>>2]|0;i=f[b>>2]|0;j=g-i>>2;m=i;if((l|0)<(j|0)){n=m;o=l}else{i=l+1|0;f[e>>2]=-1;p=g;if(i>>>0<=j>>>0)if(i>>>0>>0?(g=m+(i<<2)|0,(g|0)!=(p|0)):0){f[k>>2]=p+(~((p+-4-g|0)>>>2)<<2);q=l;r=m}else{q=l;r=m}else{Ch(b,i-j|0,e);q=f[d>>2]|0;r=f[b>>2]|0}n=r;o=q}f[n+(o<<2)>>2]=((f[h>>2]|0)-(f[a>>2]|0)>>2)+-1;u=c;return 1}function pf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;d=u;u=u+32|0;h=d+24|0;i=d+16|0;j=d;k=d+8|0;f[a+52>>2]=e;f[a+44>>2]=g;g=Lq(e>>>0>1073741823?-1:e<<2)|0;l=a+48|0;m=f[l>>2]|0;f[l>>2]=g;if(m|0)Mq(m);m=a+36|0;g=f[m>>2]|0;n=f[g+4>>2]|0;o=f[g>>2]|0;p=n-o|0;if((p|0)<=0){u=d;return 1}q=(p>>>2)+-1|0;p=a+8|0;r=i+4|0;s=j+4|0;t=h+4|0;if(n-o>>2>>>0>q>>>0){v=q;w=o}else{x=g;aq(x)}while(1){f[k>>2]=f[w+(v<<2)>>2];f[h>>2]=f[k>>2];Ac(a,h,b,v);g=X(v,e)|0;o=b+(g<<2)|0;q=f[l>>2]|0;n=c+(g<<2)|0;g=f[o+4>>2]|0;y=f[q>>2]|0;z=f[q+4>>2]|0;f[i>>2]=f[o>>2];f[r>>2]=g;f[j>>2]=y;f[s>>2]=z;Od(h,p,i,j);f[n>>2]=f[h>>2];f[n+4>>2]=f[t>>2];v=v+-1|0;if((v|0)<=-1){A=5;break}n=f[m>>2]|0;w=f[n>>2]|0;if((f[n+4>>2]|0)-w>>2>>>0<=v>>>0){x=n;A=6;break}}if((A|0)==5){u=d;return 1}else if((A|0)==6)aq(x);return 0}function qf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=a+8|0;e=f[d>>2]|0;g=f[a>>2]|0;h=g;do if(e-g>>3>>>0>=b>>>0){i=a+4|0;j=f[i>>2]|0;k=j-g>>3;l=k>>>0>>0;m=l?k:b;n=j;if(m|0){j=m;m=h;while(1){o=c;p=f[o+4>>2]|0;q=m;f[q>>2]=f[o>>2];f[q+4>>2]=p;j=j+-1|0;if(!j)break;else m=m+8|0}}if(!l){m=h+(b<<3)|0;if((m|0)==(n|0))return;else{r=i;s=n+(~((n+-8-m|0)>>>3)<<3)|0;break}}else{m=b-k|0;j=m;p=n;while(1){q=c;o=f[q+4>>2]|0;t=p;f[t>>2]=f[q>>2];f[t+4>>2]=o;j=j+-1|0;if(!j)break;else p=p+8|0}r=i;s=n+(m<<3)|0;break}}else{p=g;if(!g)u=e;else{j=a+4|0;k=f[j>>2]|0;if((k|0)!=(h|0))f[j>>2]=k+(~((k+-8-g|0)>>>3)<<3);Oq(p);f[d>>2]=0;f[j>>2]=0;f[a>>2]=0;u=0}if(b>>>0>536870911)aq(a);j=u>>2;p=u>>3>>>0<268435455?(j>>>0>>0?b:j):536870911;if(p>>>0>536870911)aq(a);j=ln(p<<3)|0;k=a+4|0;f[k>>2]=j;f[a>>2]=j;f[d>>2]=j+(p<<3);p=b;l=j;while(1){o=c;t=f[o+4>>2]|0;q=l;f[q>>2]=f[o>>2];f[q+4>>2]=t;p=p+-1|0;if(!p)break;else l=l+8|0}r=k;s=j+(b<<3)|0}while(0);f[r>>2]=s;return}function rf(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;e=+$(n[b>>2]);g=+K(+e);h=+$(n[b+4>>2]);i=g+ +K(+h);g=+$(n[b+8>>2]);j=i+ +K(+g);b=j>1.0e-06;i=1.0/j;k=f[a+12>>2]|0;j=+(k|0);l=~~+J(+((b?i*e:1.0)*j+.5));m=~~+J(+((b?i*h:0.0)*j+.5));o=(l|0)>-1;p=k-(o?l:0-l|0)-((m|0)>-1?m:0-m|0)|0;l=(p|0)<0;q=(l?((m|0)>0?p:0-p|0):0)+m|0;m=l?0:p;p=(b?i*g:0.0)<0.0?0-m|0:m;do if(!o){if((q|0)<0)r=(p|0)>-1?p:0-p|0;else r=(f[a+8>>2]|0)-((p|0)>-1?p:0-p|0)|0;if((p|0)<0){s=(q|0)>-1?q:0-q|0;t=r;break}else{s=(f[a+8>>2]|0)-((q|0)>-1?q:0-q|0)|0;t=r;break}}else{s=k+p|0;t=k+q|0}while(0);q=(t|0)==0;p=(s|0)==0;r=f[a+8>>2]|0;if(!(s|t)){u=r;v=r;f[c>>2]=u;f[d>>2]=v;return}a=(r|0)==(s|0);if(q&a){u=s;v=s;f[c>>2]=u;f[d>>2]=v;return}o=(r|0)==(t|0);if(p&o){u=t;v=t;f[c>>2]=u;f[d>>2]=v;return}if(q&(k|0)<(s|0)){u=0;v=(k<<1)-s|0;f[c>>2]=u;f[d>>2]=v;return}if(o&(k|0)>(s|0)){u=t;v=(k<<1)-s|0;f[c>>2]=u;f[d>>2]=v;return}if(a&(k|0)>(t|0)){u=(k<<1)-t|0;v=s;f[c>>2]=u;f[d>>2]=v;return}if(!p){u=t;v=s;f[c>>2]=u;f[d>>2]=v;return}u=(k|0)<(t|0)?(k<<1)-t|0:t;v=0;f[c>>2]=u;f[d>>2]=v;return}function sf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+32|0;h=g+12|0;i=g;f[a>>2]=f[d>>2];d=a+4|0;f[d>>2]=(f[c>>2]|0)-(f[b>>2]|0);j=e+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)?(k=e+4|0,f[i>>2]=f[k>>2],f[h>>2]=f[i>>2],Me(e,h,a,a+4|0)|0,l=j,j=f[l+4>>2]|0,!((j|0)>0|(j|0)==0&(f[l>>2]|0)>>>0>0)):0){f[i>>2]=f[k>>2];f[h>>2]=f[i>>2];Me(e,h,d,d+4|0)|0;m=i}else m=i;if(!(f[d>>2]|0)){u=g;return 1}d=a+12|0;Gg(d);m=a+1068|0;Mm(m);k=a+1088|0;Mm(k);l=a+1108|0;Mm(l);f[i>>2]=f[b>>2];f[i+4>>2]=f[b+4>>2];f[i+8>>2]=f[b+8>>2];f[h>>2]=f[c>>2];f[h+4>>2]=f[c+4>>2];f[h+8>>2]=f[c+8>>2];ib(a,i,h);Ye(d,e);Bg(m,e);Bg(k,e);Bg(l,e);u=g;return 1}function tf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+32|0;h=g+12|0;i=g;f[a>>2]=f[d>>2];d=a+4|0;f[d>>2]=(f[c>>2]|0)-(f[b>>2]|0);j=e+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)?(k=e+4|0,f[i>>2]=f[k>>2],f[h>>2]=f[i>>2],Me(e,h,a,a+4|0)|0,l=j,j=f[l+4>>2]|0,!((j|0)>0|(j|0)==0&(f[l>>2]|0)>>>0>0)):0){f[i>>2]=f[k>>2];f[h>>2]=f[i>>2];Me(e,h,d,d+4|0)|0;m=i}else m=i;if(!(f[d>>2]|0)){u=g;return 1}d=a+12|0;Gg(d);m=a+1068|0;Mm(m);k=a+1088|0;Mm(k);l=a+1108|0;Mm(l);f[i>>2]=f[b>>2];f[i+4>>2]=f[b+4>>2];f[i+8>>2]=f[b+8>>2];f[h>>2]=f[c>>2];f[h+4>>2]=f[c+4>>2];f[h+8>>2]=f[c+8>>2];kb(a,i,h);Ye(d,e);Bg(m,e);Bg(k,e);Bg(l,e);u=g;return 1}function uf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;c=u;u=u+32|0;d=c;e=a+8|0;g=f[e>>2]|0;h=a+4|0;i=f[h>>2]|0;j=i;if(g-i>>2>>>0>=b>>>0){sj(i|0,0,b<<2|0)|0;f[h>>2]=i+(b<<2);u=c;return}k=f[a>>2]|0;l=i-k>>2;m=l+b|0;n=k;if(m>>>0>1073741823)aq(a);o=g-k|0;p=o>>1;q=o>>2>>>0<536870911?(p>>>0>>0?m:p):1073741823;f[d+12>>2]=0;f[d+16>>2]=a+8;do if(q)if(q>>>0>1073741823){p=ra(8)|0;Oo(p,16035);f[p>>2]=7256;va(p|0,1112,110)}else{r=ln(q<<2)|0;break}else r=0;while(0);f[d>>2]=r;p=r+(l<<2)|0;l=d+8|0;m=d+4|0;f[m>>2]=p;o=r+(q<<2)|0;q=d+12|0;f[q>>2]=o;r=p+(b<<2)|0;sj(p|0,0,b<<2|0)|0;f[l>>2]=r;if((j|0)==(n|0)){s=p;t=q;v=l;w=k;x=r;y=i;z=o;A=g}else{g=j;j=p;do{g=g+-4|0;p=f[g>>2]|0;f[g>>2]=0;f[j+-4>>2]=p;j=(f[m>>2]|0)+-4|0;f[m>>2]=j}while((g|0)!=(n|0));s=j;t=q;v=l;w=f[a>>2]|0;x=f[l>>2]|0;y=f[h>>2]|0;z=f[q>>2]|0;A=f[e>>2]|0}f[a>>2]=s;f[m>>2]=w;f[h>>2]=x;f[v>>2]=y;f[e>>2]=z;f[t>>2]=A;f[d>>2]=w;ki(d);u=c;return}function vf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=f[a+8>>2]|0;e=a+76|0;g=f[e>>2]|0;h=f[g+80>>2]|0;b[c+84>>0]=0;i=c+68|0;j=c+72|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0)if(h>>>0>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{Ch(i,h-m|0,3600);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+80|0;a=c+68|0;c=f[o+96>>2]|0;o=0;while(1){h=o*3|0;if((h|0)==-1)r=-1;else r=f[(f[d>>2]|0)+(h<<2)>>2]|0;i=f[(f[m>>2]|0)+12>>2]|0;g=f[i+(r<<2)>>2]|0;if(g>>>0>=p>>>0){q=0;s=12;break}k=f[a>>2]|0;f[k+(f[c+(o*12|0)>>2]<<2)>>2]=g;g=h+1|0;if((g|0)==-1)t=-1;else t=f[(f[d>>2]|0)+(g<<2)>>2]|0;g=f[i+(t<<2)>>2]|0;if(g>>>0>=p>>>0){q=0;s=12;break}f[k+(f[c+(o*12|0)+4>>2]<<2)>>2]=g;g=h+2|0;if((g|0)==-1)u=-1;else u=f[(f[d>>2]|0)+(g<<2)>>2]|0;g=f[i+(u<<2)>>2]|0;if(g>>>0>=p>>>0){q=0;s=12;break}f[k+(f[c+(o*12|0)+8>>2]<<2)>>2]=g;o=o+1|0;if(o>>>0>=e>>>0){q=1;s=12;break}}if((s|0)==12)return q|0;return 0}function wf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=f[a+8>>2]|0;e=a+112|0;g=f[e>>2]|0;h=f[g+80>>2]|0;b[c+84>>0]=0;i=c+68|0;j=c+72|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0)if(h>>>0>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{Ch(i,h-m|0,3600);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=a+116|0;a=c+68|0;c=f[o+96>>2]|0;o=0;while(1){h=o*3|0;if((h|0)==-1)r=-1;else r=f[(f[d>>2]|0)+(h<<2)>>2]|0;i=f[(f[m>>2]|0)+12>>2]|0;g=f[i+(r<<2)>>2]|0;if(g>>>0>=p>>>0){q=0;s=12;break}k=f[a>>2]|0;f[k+(f[c+(o*12|0)>>2]<<2)>>2]=g;g=h+1|0;if((g|0)==-1)t=-1;else t=f[(f[d>>2]|0)+(g<<2)>>2]|0;g=f[i+(t<<2)>>2]|0;if(g>>>0>=p>>>0){q=0;s=12;break}f[k+(f[c+(o*12|0)+4>>2]<<2)>>2]=g;g=h+2|0;if((g|0)==-1)u=-1;else u=f[(f[d>>2]|0)+(g<<2)>>2]|0;g=f[i+(u<<2)>>2]|0;if(g>>>0>=p>>>0){q=0;s=12;break}f[k+(f[c+(o*12|0)+8>>2]<<2)>>2]=g;o=o+1|0;if(o>>>0>=e>>>0){q=1;s=12;break}}if((s|0)==12)return q|0;return 0}function xf(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=u;u=u+16|0;h=d;i=f[a+124>>2]|0;if(!i){u=d;return}j=i+-1|0;k=(j&i|0)==0;if(!k)if(i>>>0>g>>>0)l=g;else l=(g>>>0)%(i>>>0)|0;else l=j&g;m=f[(f[a+120>>2]|0)+(l<<2)>>2]|0;if(!m){u=d;return}n=f[m>>2]|0;if(!n){u=d;return}a:do if(k){m=n;while(1){o=f[m+4>>2]|0;p=(o|0)==(g|0);if(!(p|(o&j|0)==(l|0))){q=24;break}if(p?(f[m+8>>2]|0)==(g|0):0){r=m;break a}m=f[m>>2]|0;if(!m){q=24;break}}if((q|0)==24){u=d;return}}else{m=n;while(1){p=f[m+4>>2]|0;if((p|0)==(g|0)){if((f[m+8>>2]|0)==(g|0)){r=m;break a}}else{if(p>>>0>>0)s=p;else s=(p>>>0)%(i>>>0)|0;if((s|0)!=(l|0)){q=24;break}}m=f[m>>2]|0;if(!m){q=24;break}}if((q|0)==24){u=d;return}}while(0);q=f[r+12>>2]|0;if((q|0)==-1){u=d;return}f[h>>2]=q;f[h+4>>2]=c;b[h+8>>0]=e&1;e=a+112|0;c=f[e>>2]|0;if((c|0)==(f[a+116>>2]|0))yi(a+108|0,h);else{f[c>>2]=f[h>>2];f[c+4>>2]=f[h+4>>2];f[c+8>>2]=f[h+8>>2];f[e>>2]=(f[e>>2]|0)+12}u=d;return}function yf(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=d[b>>1]|0;e=d[b+2>>1]|0;g=d[b+4>>1]|0;h=d[b+6>>1]|0;b=((((c^318)&65535)+239^e&65535)+239^g&65535)+239^h&65535;i=f[a+4>>2]|0;if(!i){j=0;return j|0}k=i+-1|0;l=(k&i|0)==0;if(!l)if(b>>>0>>0)m=b;else m=(b>>>0)%(i>>>0)|0;else m=b&k;n=f[(f[a>>2]|0)+(m<<2)>>2]|0;if(!n){j=0;return j|0}a=f[n>>2]|0;if(!a){j=0;return j|0}if(l){l=a;while(1){n=f[l+4>>2]|0;o=(n|0)==(b|0);if(!(o|(n&k|0)==(m|0))){j=0;p=25;break}if((((o?(o=l+8|0,(d[o>>1]|0)==c<<16>>16):0)?(d[o+2>>1]|0)==e<<16>>16:0)?(d[l+12>>1]|0)==g<<16>>16:0)?(d[o+6>>1]|0)==h<<16>>16:0){j=l;p=25;break}l=f[l>>2]|0;if(!l){j=0;p=25;break}}if((p|0)==25)return j|0}else q=a;while(1){a=f[q+4>>2]|0;if((a|0)==(b|0)){l=q+8|0;if((((d[l>>1]|0)==c<<16>>16?(d[l+2>>1]|0)==e<<16>>16:0)?(d[q+12>>1]|0)==g<<16>>16:0)?(d[l+6>>1]|0)==h<<16>>16:0){j=q;p=25;break}}else{if(a>>>0>>0)r=a;else r=(a>>>0)%(i>>>0)|0;if((r|0)!=(m|0)){j=0;p=25;break}}q=f[q>>2]|0;if(!q){j=0;p=25;break}}if((p|0)==25)return j|0;return 0}function zf(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+32|0;h=g+12|0;i=g;f[a>>2]=f[d>>2];d=a+4|0;f[d>>2]=(f[c>>2]|0)-(f[b>>2]|0);j=e+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)?(k=e+4|0,f[i>>2]=f[k>>2],f[h>>2]=f[i>>2],Me(e,h,a,a+4|0)|0,l=j,j=f[l+4>>2]|0,!((j|0)>0|(j|0)==0&(f[l>>2]|0)>>>0>0)):0){f[i>>2]=f[k>>2];f[h>>2]=f[i>>2];Me(e,h,d,d+4|0)|0;m=i}else m=i;if(!(f[d>>2]|0)){u=g;return 1}d=a+12|0;Mm(d);m=a+32|0;Mm(m);k=a+52|0;Mm(k);l=a+72|0;Mm(l);f[i>>2]=f[b>>2];f[i+4>>2]=f[b+4>>2];f[i+8>>2]=f[b+8>>2];f[h>>2]=f[c>>2];f[h+4>>2]=f[c+4>>2];f[h+8>>2]=f[c+8>>2];hb(a,i,h);Bg(d,e);Bg(m,e);Bg(k,e);Bg(l,e);u=g;return 1}function Af(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+32|0;h=g+12|0;i=g;f[a>>2]=f[d>>2];d=a+4|0;f[d>>2]=(f[c>>2]|0)-(f[b>>2]|0);j=e+16|0;k=j;l=f[k+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0)?(k=e+4|0,f[i>>2]=f[k>>2],f[h>>2]=f[i>>2],Me(e,h,a,a+4|0)|0,l=j,j=f[l+4>>2]|0,!((j|0)>0|(j|0)==0&(f[l>>2]|0)>>>0>0)):0){f[i>>2]=f[k>>2];f[h>>2]=f[i>>2];Me(e,h,d,d+4|0)|0;m=i}else m=i;if(!(f[d>>2]|0)){u=g;return 1}d=a+12|0;tk(d);m=a+44|0;Mm(m);k=a+64|0;Mm(k);l=a+84|0;Mm(l);f[i>>2]=f[b>>2];f[i+4>>2]=f[b+4>>2];f[i+8>>2]=f[b+8>>2];f[h>>2]=f[c>>2];f[h+4>>2]=f[c+4>>2];f[h+8>>2]=f[c+8>>2];lb(a,i,h);ld(d,e);Bg(m,e);Bg(k,e);Bg(l,e);u=g;return 1}function Bf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;a=u;u=u+16|0;e=a+4|0;g=a;h=a+8|0;i=d+11|0;j=b[i>>0]|0;k=j<<24>>24<0;if(k){l=f[d+4>>2]|0;if(l>>>0>255){m=0;u=a;return m|0}else n=l}else n=j&255;if(!n){b[h>>0]=0;n=c+16|0;l=f[n+4>>2]|0;if(!((l|0)>0|(l|0)==0&(f[n>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Me(c,e,h,h+1|0)|0}m=1;u=a;return m|0}n=d+4|0;l=f[n>>2]|0;b[h>>0]=k?l:j&255;k=c+16|0;o=k;p=f[o>>2]|0;q=f[o+4>>2]|0;if((q|0)>0|(q|0)==0&p>>>0>0){r=j;s=q;t=p;v=l}else{f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Me(c,e,h,h+1|0)|0;h=k;r=b[i>>0]|0;s=f[h+4>>2]|0;t=f[h>>2]|0;v=f[n>>2]|0}n=r<<24>>24<0;h=n?f[d>>2]|0:d;if(!((s|0)>0|(s|0)==0&t>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Me(c,e,h,h+(n?v:r&255)|0)|0}m=1;u=a;return m|0}function Cf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=a+4|0;d=f[a>>2]|0;e=((f[c>>2]|0)-d|0)/24|0;g=e+1|0;if(g>>>0>178956970)aq(a);h=a+8|0;i=((f[h>>2]|0)-d|0)/24|0;d=i<<1;j=i>>>0<89478485?(d>>>0>>0?g:d):178956970;do if(j)if(j>>>0>178956970){d=ra(8)|0;Oo(d,16035);f[d>>2]=7256;va(d|0,1112,110)}else{k=ln(j*24|0)|0;break}else k=0;while(0);d=k+(e*24|0)|0;g=d;i=k+(j*24|0)|0;f[d>>2]=1196;f[k+(e*24|0)+4>>2]=f[b+4>>2];fk(k+(e*24|0)+8|0,b+8|0);f[k+(e*24|0)+20>>2]=f[b+20>>2];b=d+24|0;e=f[a>>2]|0;k=f[c>>2]|0;if((k|0)==(e|0)){l=g;m=e;n=e}else{j=k;k=g;g=d;do{f[g+-24>>2]=1196;f[g+-20>>2]=f[j+-20>>2];d=g+-16|0;o=j+-16|0;f[d>>2]=0;p=g+-12|0;f[p>>2]=0;f[g+-8>>2]=0;f[d>>2]=f[o>>2];d=j+-12|0;f[p>>2]=f[d>>2];p=j+-8|0;f[g+-8>>2]=f[p>>2];f[p>>2]=0;f[d>>2]=0;f[o>>2]=0;f[g+-4>>2]=f[j+-4>>2];j=j+-24|0;g=k+-24|0;k=g}while((j|0)!=(e|0));l=k;m=f[a>>2]|0;n=f[c>>2]|0}f[a>>2]=l;f[c>>2]=b;f[h>>2]=i;i=m;if((n|0)!=(i|0)){h=n;do{h=h+-24|0;Va[f[f[h>>2]>>2]&127](h)}while((h|0)!=(i|0))}if(!m)return;Oq(m);return}function Df(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+32|0;d=c+24|0;e=c+16|0;g=c+8|0;h=c;f[a>>2]=3588;f[a+4>>2]=f[b+4>>2];i=a+8|0;j=b+8|0;f[i>>2]=0;k=a+12|0;f[k>>2]=0;l=a+16|0;f[l>>2]=0;m=b+12|0;n=f[m>>2]|0;do if(n|0)if((n|0)<0)aq(i);else{o=((n+-1|0)>>>5)+1|0;p=ln(o<<2)|0;f[i>>2]=p;f[k>>2]=0;f[l>>2]=o;o=f[j>>2]|0;f[g>>2]=o;f[g+4>>2]=0;p=f[m>>2]|0;f[h>>2]=o+(p>>>5<<2);f[h+4>>2]=p&31;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[d>>2]=f[h>>2];f[d+4>>2]=f[h+4>>2];Tf(i,e,d);break}while(0);i=a+20|0;f[i>>2]=0;m=a+24|0;f[m>>2]=0;j=a+28|0;f[j>>2]=0;a=b+24|0;l=f[a>>2]|0;if(!l){u=c;return}if((l|0)<0)aq(i);k=((l+-1|0)>>>5)+1|0;l=ln(k<<2)|0;f[i>>2]=l;f[m>>2]=0;f[j>>2]=k;k=f[b+20>>2]|0;f[g>>2]=k;f[g+4>>2]=0;b=f[a>>2]|0;f[h>>2]=k+(b>>>5<<2);f[h+4>>2]=b&31;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[d>>2]=f[h>>2];f[d+4>>2]=f[h+4>>2];Tf(i,e,d);u=c;return}function Ef(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=b[c>>0]|0;e=b[c+1>>0]|0;g=b[c+2>>0]|0;h=b[c+3>>0]|0;c=(((d&255^318)+239^e&255)+239^g&255)+239^h&255;i=f[a+4>>2]|0;if(!i){j=0;return j|0}k=i+-1|0;l=(k&i|0)==0;if(!l)if(c>>>0>>0)m=c;else m=(c>>>0)%(i>>>0)|0;else m=c&k;n=f[(f[a>>2]|0)+(m<<2)>>2]|0;if(!n){j=0;return j|0}a=f[n>>2]|0;if(!a){j=0;return j|0}if(l){l=a;while(1){n=f[l+4>>2]|0;o=(n|0)==(c|0);if(!(o|(n&k|0)==(m|0))){j=0;p=25;break}if((((o?(o=l+8|0,(b[o>>0]|0)==d<<24>>24):0)?(b[o+1>>0]|0)==e<<24>>24:0)?(b[o+2>>0]|0)==g<<24>>24:0)?(b[o+3>>0]|0)==h<<24>>24:0){j=l;p=25;break}l=f[l>>2]|0;if(!l){j=0;p=25;break}}if((p|0)==25)return j|0}else q=a;while(1){a=f[q+4>>2]|0;if((a|0)==(c|0)){l=q+8|0;if((((b[l>>0]|0)==d<<24>>24?(b[l+1>>0]|0)==e<<24>>24:0)?(b[l+2>>0]|0)==g<<24>>24:0)?(b[l+3>>0]|0)==h<<24>>24:0){j=q;p=25;break}}else{if(a>>>0>>0)r=a;else r=(a>>>0)%(i>>>0)|0;if((r|0)!=(m|0)){j=0;p=25;break}}q=f[q>>2]|0;if(!q){j=0;p=25;break}}if((p|0)==25)return j|0;return 0}function Ff(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+32|0;d=c+24|0;e=c+16|0;g=c+8|0;h=c;f[a>>2]=3636;f[a+4>>2]=f[b+4>>2];i=a+8|0;j=b+8|0;f[i>>2]=0;k=a+12|0;f[k>>2]=0;l=a+16|0;f[l>>2]=0;m=b+12|0;n=f[m>>2]|0;do if(n|0)if((n|0)<0)aq(i);else{o=((n+-1|0)>>>5)+1|0;p=ln(o<<2)|0;f[i>>2]=p;f[k>>2]=0;f[l>>2]=o;o=f[j>>2]|0;f[g>>2]=o;f[g+4>>2]=0;p=f[m>>2]|0;f[h>>2]=o+(p>>>5<<2);f[h+4>>2]=p&31;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[d>>2]=f[h>>2];f[d+4>>2]=f[h+4>>2];Tf(i,e,d);break}while(0);i=a+20|0;f[i>>2]=0;m=a+24|0;f[m>>2]=0;j=a+28|0;f[j>>2]=0;a=b+24|0;l=f[a>>2]|0;if(!l){u=c;return}if((l|0)<0)aq(i);k=((l+-1|0)>>>5)+1|0;l=ln(k<<2)|0;f[i>>2]=l;f[m>>2]=0;f[j>>2]=k;k=f[b+20>>2]|0;f[g>>2]=k;f[g+4>>2]=0;b=f[a>>2]|0;f[h>>2]=k+(b>>>5<<2);f[h+4>>2]=b&31;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[d>>2]=f[h>>2];f[d+4>>2]=f[h+4>>2];Tf(i,e,d);u=c;return}function Gf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;d=u;u=u+32|0;h=d+24|0;i=d+16|0;j=d;k=d+8|0;l=a+40|0;f[a+44>>2]=g;g=a+36|0;m=f[g>>2]|0;n=f[m+4>>2]|0;o=f[m>>2]|0;p=n-o|0;if((p|0)<=0){u=d;return 1}q=(p>>>2)+-1|0;p=a+8|0;r=a+48|0;s=a+52|0;a=i+4|0;t=j+4|0;v=h+4|0;if(n-o>>2>>>0>q>>>0){w=q;x=o}else{y=m;aq(y)}while(1){f[k>>2]=f[x+(w<<2)>>2];f[h>>2]=f[k>>2];ub(l,h,b,w);m=X(w,e)|0;o=b+(m<<2)|0;q=c+(m<<2)|0;m=f[o+4>>2]|0;n=f[r>>2]|0;z=f[s>>2]|0;f[i>>2]=f[o>>2];f[a>>2]=m;f[j>>2]=n;f[t>>2]=z;Od(h,p,i,j);f[q>>2]=f[h>>2];f[q+4>>2]=f[v>>2];w=w+-1|0;if((w|0)<=-1){A=3;break}q=f[g>>2]|0;x=f[q>>2]|0;if((f[q+4>>2]|0)-x>>2>>>0<=w>>>0){y=q;A=4;break}}if((A|0)==3){u=d;return 1}else if((A|0)==4)aq(y);return 0}function Hf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=u;u=u+32|0;i=h;j=h+16|0;k=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;do if((c+-1|0)>>>0<6&(Qa[f[(f[b>>2]|0)+8>>2]&127](b)|0)==1){l=Qa[f[(f[b>>2]|0)+48>>2]&127](b)|0;m=Ra[f[(f[b>>2]|0)+56>>2]&127](b,d)|0;if((l|0)==0|(m|0)==0){f[a>>2]=0;u=h;return}n=Ra[f[(f[b>>2]|0)+52>>2]&127](b,d)|0;if(!n){f[i>>2]=f[b+52>>2];f[i+4>>2]=l;f[i+12>>2]=m;f[i+8>>2]=m+12;Cd(a,j,c,k,e,i,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}else{f[i>>2]=f[b+52>>2];f[i+4>>2]=n;f[i+12>>2]=m;f[i+8>>2]=m+12;Ad(a,j,c,k,e,i,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}}while(0);f[a>>2]=0;u=h;return}function If(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;d=u;u=u+32|0;h=d+24|0;i=d+16|0;j=d;k=d+8|0;l=a+40|0;f[a+44>>2]=g;g=a+36|0;m=f[g>>2]|0;n=f[m+4>>2]|0;o=f[m>>2]|0;p=n-o|0;if((p|0)<=0){u=d;return 1}q=(p>>>2)+-1|0;p=a+8|0;r=a+48|0;s=a+52|0;a=i+4|0;t=j+4|0;v=h+4|0;if(n-o>>2>>>0>q>>>0){w=q;x=o}else{y=m;aq(y)}while(1){f[k>>2]=f[x+(w<<2)>>2];f[h>>2]=f[k>>2];tb(l,h,b,w);m=X(w,e)|0;o=b+(m<<2)|0;q=c+(m<<2)|0;m=f[o+4>>2]|0;n=f[r>>2]|0;z=f[s>>2]|0;f[i>>2]=f[o>>2];f[a>>2]=m;f[j>>2]=n;f[t>>2]=z;Od(h,p,i,j);f[q>>2]=f[h>>2];f[q+4>>2]=f[v>>2];w=w+-1|0;if((w|0)<=-1){A=3;break}q=f[g>>2]|0;x=f[q>>2]|0;if((f[q+4>>2]|0)-x>>2>>>0<=w>>>0){y=q;A=4;break}}if((A|0)==3){u=d;return 1}else if((A|0)==4)aq(y);return 0}function Jf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=f[b>>2]|0;b=f[c>>2]|0;e=b-d>>2;g=a+8|0;h=f[g>>2]|0;i=f[a>>2]|0;j=i;k=b;if(e>>>0<=h-i>>2>>>0){l=a+4|0;m=(f[l>>2]|0)-i>>2;n=e>>>0>m>>>0;o=n?d+(m<<2)|0:b;b=o-d|0;m=b>>2;if(m|0)im(i|0,d|0,b|0)|0;b=j+(m<<2)|0;if(!n){n=f[l>>2]|0;if((n|0)==(b|0))return;f[l>>2]=n+(~((n+-4-b|0)>>>2)<<2);return}b=f[c>>2]|0;c=o;if((b|0)==(c|0))return;n=f[l>>2]|0;m=b+-4-o|0;o=c;c=n;while(1){f[c>>2]=f[o>>2];o=o+4|0;if((o|0)==(b|0))break;else c=c+4|0}f[l>>2]=n+((m>>>2)+1<<2);return}m=i;if(!i)p=h;else{h=a+4|0;n=f[h>>2]|0;if((n|0)!=(j|0))f[h>>2]=n+(~((n+-4-i|0)>>>2)<<2);Oq(m);f[g>>2]=0;f[h>>2]=0;f[a>>2]=0;p=0}if(e>>>0>1073741823)aq(a);h=p>>1;m=p>>2>>>0<536870911?(h>>>0>>0?e:h):1073741823;if(m>>>0>1073741823)aq(a);h=ln(m<<2)|0;e=a+4|0;f[e>>2]=h;f[a>>2]=h;f[g>>2]=h+(m<<2);m=d;if((k|0)==(m|0))return;g=k+-4-d|0;d=m;m=h;while(1){f[m>>2]=f[d>>2];d=d+4|0;if((d|0)==(k|0))break;else m=m+4|0}f[e>>2]=h+((g>>>2)+1<<2);return}function Kf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(((d-g|0)/12|0)>>>0>=b>>>0){sj(g|0,0,b*12|0)|0;f[e>>2]=h+(b*12|0);return}i=f[a>>2]|0;j=(g-i|0)/12|0;g=j+b|0;k=i;if(g>>>0>357913941)aq(a);l=(d-i|0)/12|0;d=l<<1;m=l>>>0<178956970?(d>>>0>>0?g:d):357913941;do if(m)if(m>>>0>357913941){d=ra(8)|0;Oo(d,16035);f[d>>2]=7256;va(d|0,1112,110)}else{n=ln(m*12|0)|0;break}else n=0;while(0);d=n+(j*12|0)|0;j=d;g=n+(m*12|0)|0;sj(d|0,0,b*12|0)|0;m=d+(b*12|0)|0;if((h|0)==(k|0)){o=j;p=i;q=h}else{i=h;h=j;j=d;do{d=j+-12|0;b=i;i=i+-12|0;f[d>>2]=0;n=j+-8|0;f[n>>2]=0;f[j+-4>>2]=0;f[d>>2]=f[i>>2];d=b+-8|0;f[n>>2]=f[d>>2];n=b+-4|0;f[j+-4>>2]=f[n>>2];f[n>>2]=0;f[d>>2]=0;f[i>>2]=0;j=h+-12|0;h=j}while((i|0)!=(k|0));o=h;p=f[a>>2]|0;q=f[e>>2]|0}f[a>>2]=o;f[e>>2]=m;f[c>>2]=g;g=p;if((q|0)!=(g|0)){c=q;do{q=c;c=c+-12|0;m=f[c>>2]|0;if(m|0){e=q+-8|0;q=f[e>>2]|0;if((q|0)!=(m|0))f[e>>2]=q+(~((q+-4-m|0)>>>2)<<2);Oq(m)}}while((c|0)!=(g|0))}if(!p)return;Oq(p);return}function Lf(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=f[e>>2]|0;gk(f[a+4>>2]|0,(f[g+28>>2]|0)-(f[g+24>>2]|0)>>2);g=a+100|0;h=f[e>>2]|0;i=(f[h+28>>2]|0)-(f[h+24>>2]|0)>>2;f[c>>2]=0;h=a+104|0;j=f[h>>2]|0;k=f[g>>2]|0;l=j-k>>2;m=k;k=j;if(i>>>0<=l>>>0){if(i>>>0>>0?(j=m+(i<<2)|0,(j|0)!=(k|0)):0)f[h>>2]=k+(~((k+-4-j|0)>>>2)<<2)}else Ch(g,i-l|0,c);l=a+120|0;a=f[l>>2]|0;if(!a){i=f[e>>2]|0;g=(f[i+4>>2]|0)-(f[i>>2]|0)>>2;i=(g>>>0)/3|0;if(g>>>0<=2){u=b;return 1}g=0;do{f[d>>2]=g*3;f[c>>2]=f[d>>2];wb(e,c);g=g+1|0}while((g|0)<(i|0));u=b;return 1}else{i=f[a>>2]|0;if((f[a+4>>2]|0)==(i|0)){u=b;return 1}a=0;g=i;do{f[d>>2]=f[g+(a<<2)>>2];f[c>>2]=f[d>>2];wb(e,c);a=a+1|0;i=f[l>>2]|0;g=f[i>>2]|0}while(a>>>0<(f[i+4>>2]|0)-g>>2>>>0);u=b;return 1}return 0}function Mf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-4194304|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-4177920|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+4194304|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1077936128|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Gn(e);yh(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;im(h+a|0,h|0,o|0)|0;kh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Vn(a|0,0,o|0,k|0)|0;k=Vn(h|0,I|0,g|0,j|0)|0;Cl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)Oq(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;Oq(c);u=d;return}function Nf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-2097152|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-2080768|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+6291456|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1075838976|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Gn(e);yh(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;im(h+a|0,h|0,o|0)|0;kh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Vn(a|0,0,o|0,k|0)|0;k=Vn(h|0,I|0,g|0,j|0)|0;Cl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)Oq(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;Oq(c);u=d;return}function Of(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-1048576|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1032192|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+7340032|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1074790400|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Gn(e);yh(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;im(h+a|0,h|0,o|0)|0;kh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Vn(a|0,0,o|0,k|0)|0;k=Vn(h|0,I|0,g|0,j|0)|0;Cl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)Oq(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;Oq(c);u=d;return}function Pf(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;a=u;u=u+96|0;j=a;if(!c){k=-1;u=a;return k|0}Tm(j);Jj(j,d,0,g&255,i,0,g<<1,0,0,0);i=jf(c,j,1,e)|0;d=f[(f[c+8>>2]|0)+(i<<2)>>2]|0;if(e|0){l=d+84|0;m=d+68|0;n=d+40|0;o=d+64|0;d=0;do{if(!(b[l>>0]|0))p=f[(f[m>>2]|0)+(d<<2)>>2]|0;else p=d;q=h+((X(d,g)|0)<<1)|0;r=n;s=f[r>>2]|0;t=un(s|0,f[r+4>>2]|0,p|0,0)|0;kh((f[f[o>>2]>>2]|0)+t|0,q|0,s|0)|0;d=d+1|0}while((d|0)!=(e|0))}d=c+80|0;c=f[d>>2]|0;if(c)if((c|0)==(e|0))v=10;else w=-1;else{f[d>>2]=e;v=10}if((v|0)==10)w=i;i=j+88|0;v=f[i>>2]|0;f[i>>2]=0;if(v|0){i=f[v+8>>2]|0;if(i|0){e=v+12|0;if((f[e>>2]|0)!=(i|0))f[e>>2]=i;Oq(i)}Oq(v)}v=f[j+68>>2]|0;if(v|0){i=j+72|0;e=f[i>>2]|0;if((e|0)!=(v|0))f[i>>2]=e+(~((e+-4-v|0)>>>2)<<2);Oq(v)}v=j+64|0;j=f[v>>2]|0;f[v>>2]=0;if(j|0){v=f[j>>2]|0;if(v|0){e=j+4|0;if((f[e>>2]|0)!=(v|0))f[e>>2]=v;Oq(v)}Oq(j)}k=w;u=a;return k|0}function Qf(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;a=u;u=u+96|0;j=a;if(!c){k=-1;u=a;return k|0}Tm(j);Jj(j,d,0,g&255,i,0,g<<2,0,0,0);i=jf(c,j,1,e)|0;d=f[(f[c+8>>2]|0)+(i<<2)>>2]|0;if(e|0){l=d+84|0;m=d+68|0;n=d+40|0;o=d+64|0;d=0;do{if(!(b[l>>0]|0))p=f[(f[m>>2]|0)+(d<<2)>>2]|0;else p=d;q=h+((X(d,g)|0)<<2)|0;r=n;s=f[r>>2]|0;t=un(s|0,f[r+4>>2]|0,p|0,0)|0;kh((f[f[o>>2]>>2]|0)+t|0,q|0,s|0)|0;d=d+1|0}while((d|0)!=(e|0))}d=c+80|0;c=f[d>>2]|0;if(c)if((c|0)==(e|0))v=10;else w=-1;else{f[d>>2]=e;v=10}if((v|0)==10)w=i;i=j+88|0;v=f[i>>2]|0;f[i>>2]=0;if(v|0){i=f[v+8>>2]|0;if(i|0){e=v+12|0;if((f[e>>2]|0)!=(i|0))f[e>>2]=i;Oq(i)}Oq(v)}v=f[j+68>>2]|0;if(v|0){i=j+72|0;e=f[i>>2]|0;if((e|0)!=(v|0))f[i>>2]=e+(~((e+-4-v|0)>>>2)<<2);Oq(v)}v=j+64|0;j=f[v>>2]|0;f[v>>2]=0;if(j|0){v=f[j>>2]|0;if(v|0){e=j+4|0;if((f[e>>2]|0)!=(v|0))f[e>>2]=v;Oq(v)}Oq(j)}k=w;u=a;return k|0}function Rf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-262144|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-245760|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+8126464|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1074003968|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Gn(e);yh(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;im(h+a|0,h|0,o|0)|0;kh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Vn(a|0,0,o|0,k|0)|0;k=Vn(h|0,I|0,g|0,j|0)|0;Cl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)Oq(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;Oq(c);u=d;return}function Sf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-131072|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-114688|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+8257536|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1073872896|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Gn(e);yh(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;im(h+a|0,h|0,o|0)|0;kh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Vn(a|0,0,o|0,k|0)|0;k=Vn(h|0,I|0,g|0,j|0)|0;Cl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)Oq(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;Oq(c);u=d;return}function Tf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;d=u;u=u+48|0;e=d+40|0;g=d+32|0;h=d+8|0;i=d;j=d+24|0;k=d+16|0;l=a+4|0;m=f[l>>2]|0;n=b;b=f[n>>2]|0;o=f[n+4>>2]|0;n=c;c=f[n>>2]|0;p=f[n+4>>2]|0;n=c-b<<3;f[l>>2]=m-o+p+n;l=(f[a>>2]|0)+(m>>>5<<2)|0;a=m&31;m=l;if((a|0)!=(o|0)){q=h;f[q>>2]=b;f[q+4>>2]=o;q=i;f[q>>2]=c;f[q+4>>2]=p;f[j>>2]=m;f[j+4>>2]=a;f[g>>2]=f[h>>2];f[g+4>>2]=f[h+4>>2];f[e>>2]=f[i>>2];f[e+4>>2]=f[i+4>>2];we(k,g,e,j);u=d;return}j=p-o+n|0;n=b;if((j|0)>0){if(!o){r=j;s=0;t=l;v=b;w=n}else{b=32-o|0;p=(j|0)<(b|0)?j:b;e=-1>>>(b-p|0)&-1<>2]=f[l>>2]&~e|f[n>>2]&e;e=p+o|0;b=n+4|0;r=j-p|0;s=e&31;t=l+(e>>>5<<2)|0;v=b;w=b}b=(r|0)/32|0;im(t|0,v|0,b<<2|0)|0;v=r-(b<<5)|0;r=t+(b<<2)|0;t=r;if((v|0)>0){e=-1>>>(32-v|0);f[r>>2]=f[r>>2]&~e|f[w+(b<<2)>>2]&e;x=v;y=t}else{x=s;y=t}}else{x=o;y=m}f[k>>2]=y;f[k+4>>2]=x;u=d;return}function Uf(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-32768|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-16384|0;b[m>>0]=n;b[m+1>>0]=n>>>8;o=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;n=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+8355840|0;b[n>>0]=m;b[n+1>>0]=m>>>8;b[n+2>>0]=m>>>16;o=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;n=j+-1073774592|0;b[m>>0]=n;b[m+1>>0]=n>>>8;b[m+2>>0]=n>>>16;b[m+3>>0]=n>>>24;o=(f[l>>2]|0)+4|0;break}else{o=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;o=(f[l>>2]|0)+1|0}while(0);k=((o|0)<0)<<31>>31;Gn(e);yh(o,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;im(h+a|0,h|0,o|0)|0;kh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Vn(a|0,0,o|0,k|0)|0;k=Vn(h|0,I|0,g|0,j|0)|0;Cl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)Oq(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;Oq(c);u=d;return}function Vf(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=f[b>>2]|0;d=f[b+4>>2]|0;e=f[b+8>>2]|0;g=f[b+12>>2]|0;b=(((c^318)+239^d)+239^e)+239^g;h=f[a+4>>2]|0;if(!h){i=0;return i|0}j=h+-1|0;k=(j&h|0)==0;if(!k)if(b>>>0>>0)l=b;else l=(b>>>0)%(h>>>0)|0;else l=b&j;m=f[(f[a>>2]|0)+(l<<2)>>2]|0;if(!m){i=0;return i|0}a=f[m>>2]|0;if(!a){i=0;return i|0}if(k){k=a;while(1){m=f[k+4>>2]|0;n=(m|0)==(b|0);if(!(n|(m&j|0)==(l|0))){i=0;o=25;break}if((((n?(f[k+8>>2]|0)==(c|0):0)?(f[k+12>>2]|0)==(d|0):0)?(f[k+16>>2]|0)==(e|0):0)?(f[k+20>>2]|0)==(g|0):0){i=k;o=25;break}k=f[k>>2]|0;if(!k){i=0;o=25;break}}if((o|0)==25)return i|0}else p=a;while(1){a=f[p+4>>2]|0;if((a|0)==(b|0)){if((((f[p+8>>2]|0)==(c|0)?(f[p+12>>2]|0)==(d|0):0)?(f[p+16>>2]|0)==(e|0):0)?(f[p+20>>2]|0)==(g|0):0){i=p;o=25;break}}else{if(a>>>0>>0)q=a;else q=(a>>>0)%(h>>>0)|0;if((q|0)!=(l|0)){i=0;o=25;break}}p=f[p>>2]|0;if(!p){i=0;o=25;break}}if((o|0)==25)return i|0;return 0}function Wf(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;a=u;u=u+96|0;j=a;if(!c){k=-1;u=a;return k|0}Tm(j);Jj(j,d,0,g&255,i,0,g,0,0,0);i=jf(c,j,1,e)|0;d=f[(f[c+8>>2]|0)+(i<<2)>>2]|0;if(e|0){l=d+84|0;m=d+68|0;n=d+40|0;o=d+64|0;d=0;do{if(!(b[l>>0]|0))p=f[(f[m>>2]|0)+(d<<2)>>2]|0;else p=d;q=h+(X(d,g)|0)|0;r=n;s=f[r>>2]|0;t=un(s|0,f[r+4>>2]|0,p|0,0)|0;kh((f[f[o>>2]>>2]|0)+t|0,q|0,s|0)|0;d=d+1|0}while((d|0)!=(e|0))}d=c+80|0;c=f[d>>2]|0;if(c)if((c|0)==(e|0))v=10;else w=-1;else{f[d>>2]=e;v=10}if((v|0)==10)w=i;i=j+88|0;v=f[i>>2]|0;f[i>>2]=0;if(v|0){i=f[v+8>>2]|0;if(i|0){e=v+12|0;if((f[e>>2]|0)!=(i|0))f[e>>2]=i;Oq(i)}Oq(v)}v=f[j+68>>2]|0;if(v|0){i=j+72|0;e=f[i>>2]|0;if((e|0)!=(v|0))f[i>>2]=e+(~((e+-4-v|0)>>>2)<<2);Oq(v)}v=j+64|0;j=f[v>>2]|0;f[v>>2]=0;if(j|0){v=f[j>>2]|0;if(v|0){e=j+4|0;if((f[e>>2]|0)!=(v|0))f[e>>2]=v;Oq(v)}Oq(j)}k=w;u=a;return k|0}function Xf(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=u;u=u+32|0;i=h;j=h+16|0;k=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;do if((c+-1|0)>>>0<6&(Qa[f[(f[b>>2]|0)+8>>2]&127](b)|0)==1){l=Qa[f[(f[b>>2]|0)+48>>2]&127](b)|0;m=Ra[f[(f[b>>2]|0)+56>>2]&127](b,d)|0;if((l|0)==0|(m|0)==0){f[a>>2]=0;u=h;return}n=Ra[f[(f[b>>2]|0)+52>>2]&127](b,d)|0;if(!n){f[i>>2]=f[b+52>>2];f[i+4>>2]=l;f[i+12>>2]=m;f[i+8>>2]=m+12;qd(a,j,c,k,e,i,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}else{f[i>>2]=f[b+52>>2];f[i+4>>2]=n;f[i+12>>2]=m;f[i+8>>2]=m+12;pd(a,j,c,k,e,i,g);if(!(f[a>>2]|0)){f[a>>2]=0;break}u=h;return}}while(0);f[a>>2]=0;u=h;return}function Yf(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=f[d>>2]|0;g=f[d+4>>2]|0;if((e|0)==(g|0)){h=0;i=a+12|0;j=a+8|0}else{d=f[c>>2]|0;c=a+8|0;k=a+12|0;a=0;l=e;while(1){e=f[l>>2]|0;m=f[d+(e<<2)>>2]|0;if(m>>>0>>0)n=a;else{o=f[c>>2]|0;p=(f[k>>2]|0)-o|0;q=o;if((p|0)>0){o=p>>>2;p=0;do{r=f[q+(p<<2)>>2]|0;s=f[r+68>>2]|0;if(!(b[r+84>>0]|0))t=f[s+(e<<2)>>2]|0;else t=e;f[s+(m<<2)>>2]=t;p=p+1|0}while((p|0)<(o|0))}n=m+1|0}l=l+4|0;if((l|0)==(g|0)){h=n;i=k;j=c;break}else a=n}}n=f[i>>2]|0;a=f[j>>2]|0;if((n-a|0)>0){u=0;v=a;w=n}else return;while(1){n=f[v+(u<<2)>>2]|0;b[n+84>>0]=0;a=n+68|0;c=n+72|0;n=f[c>>2]|0;k=f[a>>2]|0;g=n-k>>2;l=k;k=n;if(h>>>0<=g>>>0)if(h>>>0>>0?(n=l+(h<<2)|0,(n|0)!=(k|0)):0){f[c>>2]=k+(~((k+-4-n|0)>>>2)<<2);x=v;y=w}else{x=v;y=w}else{Ch(a,h-g|0,6220);x=f[j>>2]|0;y=f[i>>2]|0}u=u+1|0;if((u|0)>=(y-x>>2|0))break;else{v=x;w=y}}return}function Zf(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=b;e=c-d>>2;g=a+8|0;h=f[g>>2]|0;i=f[a>>2]|0;j=i;if(e>>>0<=h-i>>2>>>0){k=a+4|0;l=(f[k>>2]|0)-i>>2;m=e>>>0>l>>>0;n=b+(l<<2)|0;l=m?n:c;o=l;p=o-d|0;q=p>>2;if(q|0)im(i|0,b|0,p|0)|0;p=j+(q<<2)|0;if(!m){m=f[k>>2]|0;if((m|0)==(p|0))return;f[k>>2]=m+(~((m+-4-p|0)>>>2)<<2);return}if((l|0)==(c|0))return;l=f[k>>2]|0;p=((c+-4-o|0)>>>2)+1|0;o=n;n=l;while(1){f[n>>2]=f[o>>2];o=o+4|0;if((o|0)==(c|0))break;else n=n+4|0}f[k>>2]=l+(p<<2);return}p=i;if(!i)r=h;else{h=a+4|0;l=f[h>>2]|0;if((l|0)!=(j|0))f[h>>2]=l+(~((l+-4-i|0)>>>2)<<2);Oq(p);f[g>>2]=0;f[h>>2]=0;f[a>>2]=0;r=0}if(e>>>0>1073741823)aq(a);h=r>>1;p=r>>2>>>0<536870911?(h>>>0>>0?e:h):1073741823;if(p>>>0>1073741823)aq(a);h=ln(p<<2)|0;e=a+4|0;f[e>>2]=h;f[a>>2]=h;f[g>>2]=h+(p<<2);if((b|0)==(c|0))return;p=((c+-4-d|0)>>>2)+1|0;d=b;b=h;while(1){f[b>>2]=f[d>>2];d=d+4|0;if((d|0)==(c|0))break;else b=b+4|0}f[e>>2]=h+(p<<2);return}function _f(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=u;u=u+32|0;e=d;g=a+40|0;h=(f[c>>2]|0)+(f[g>>2]|0)|0;i=a+24|0;j=f[a+32>>2]|0;k=j+-16384|0;do if(k>>>0>=64){if(k>>>0<16384){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;b[m>>0]=j;b[m+1>>0]=j>>>8;n=(f[l>>2]|0)+2|0;break}if(k>>>0<4194304){l=a+28|0;m=(f[i>>2]|0)+(f[l>>2]|0)|0;o=j+8372224|0;b[m>>0]=o;b[m+1>>0]=o>>>8;b[m+2>>0]=o>>>16;n=(f[l>>2]|0)+3|0;break}if(k>>>0<1073741824){l=a+28|0;o=(f[i>>2]|0)+(f[l>>2]|0)|0;m=j+-1073758208|0;b[o>>0]=m;b[o+1>>0]=m>>>8;b[o+2>>0]=m>>>16;b[o+3>>0]=m>>>24;n=(f[l>>2]|0)+4|0;break}else{n=f[a+28>>2]|0;break}}else{l=a+28|0;b[(f[i>>2]|0)+(f[l>>2]|0)>>0]=k;n=(f[l>>2]|0)+1|0}while(0);k=((n|0)<0)<<31>>31;Gn(e);yh(n,k,e)|0;i=e+4|0;a=(f[i>>2]|0)-(f[e>>2]|0)|0;im(h+a|0,h|0,n|0)|0;kh(h|0,f[e>>2]|0,a|0)|0;h=g;g=f[h>>2]|0;j=f[h+4>>2]|0;h=Vn(a|0,0,n|0,k|0)|0;k=Vn(h|0,I|0,g|0,j|0)|0;Cl(c,k,I);k=e+12|0;c=f[k>>2]|0;f[k>>2]=0;if(c|0)Oq(c);c=f[e>>2]|0;if(!c){u=d;return}if((f[i>>2]|0)!=(c|0))f[i>>2]=c;Oq(c);u=d;return}function $f(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=b;e=c-d>>2;g=a+8|0;h=f[g>>2]|0;i=f[a>>2]|0;j=i;if(e>>>0<=h-i>>2>>>0){k=a+4|0;l=(f[k>>2]|0)-i>>2;m=e>>>0>l>>>0;n=b+(l<<2)|0;l=m?n:c;o=l;p=o-d|0;q=p>>2;if(q|0)im(i|0,b|0,p|0)|0;p=j+(q<<2)|0;if(!m){m=f[k>>2]|0;if((m|0)==(p|0))return;f[k>>2]=m+(~((m+-4-p|0)>>>2)<<2);return}if((l|0)==(c|0))return;l=f[k>>2]|0;p=c+-4-o|0;o=n;n=l;while(1){f[n>>2]=f[o>>2];o=o+4|0;if((o|0)==(c|0))break;else n=n+4|0}f[k>>2]=l+((p>>>2)+1<<2);return}p=i;if(!i)r=h;else{h=a+4|0;l=f[h>>2]|0;if((l|0)!=(j|0))f[h>>2]=l+(~((l+-4-i|0)>>>2)<<2);Oq(p);f[g>>2]=0;f[h>>2]=0;f[a>>2]=0;r=0}if(e>>>0>1073741823)aq(a);h=r>>1;p=r>>2>>>0<536870911?(h>>>0>>0?e:h):1073741823;if(p>>>0>1073741823)aq(a);h=ln(p<<2)|0;e=a+4|0;f[e>>2]=h;f[a>>2]=h;f[g>>2]=h+(p<<2);if((b|0)==(c|0))return;p=c+-4-d|0;d=b;b=h;while(1){f[b>>2]=f[d>>2];d=d+4|0;if((d|0)==(c|0))break;else b=b+4|0}f[e>>2]=h+((p>>>2)+1<<2);return}function ag(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0;g=u;u=u+80|0;h=g;i=g+64|0;Il(h);j=f[(f[a+8>>2]|0)+56>>2]|0;k=X(Vl(5)|0,d)|0;Jj(h,j,0,d&255,5,0,k,((k|0)<0)<<31>>31,0,0);k=ln(96)|0;tl(k,h);Bj(k,c)|0;f[i>>2]=k;gj(a,i);k=f[i>>2]|0;f[i>>2]=0;if(k|0){i=k+88|0;c=f[i>>2]|0;f[i>>2]=0;if(c|0){i=f[c+8>>2]|0;if(i|0){h=c+12|0;if((f[h>>2]|0)!=(i|0))f[h>>2]=i;Oq(i)}Oq(c)}c=f[k+68>>2]|0;if(c|0){i=k+72|0;h=f[i>>2]|0;if((h|0)!=(c|0))f[i>>2]=h+(~((h+-4-c|0)>>>2)<<2);Oq(c)}c=k+64|0;h=f[c>>2]|0;f[c>>2]=0;if(h|0){c=f[h>>2]|0;if(c|0){i=h+4|0;if((f[i>>2]|0)!=(c|0))f[i>>2]=c;Oq(c)}Oq(h)}Oq(k)}if(!e){u=g;return}k=f[a+32>>2]|0;b[k+84>>0]=0;a=k+68|0;h=k+72|0;k=f[h>>2]|0;c=f[a>>2]|0;i=k-c>>2;d=k;if(i>>>0>>0){Ch(a,e-i|0,1532);u=g;return}if(i>>>0<=e>>>0){u=g;return}i=c+(e<<2)|0;if((i|0)==(d|0)){u=g;return}f[h>>2]=d+(~((d+-4-i|0)>>>2)<<2);u=g;return}function bg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;c=u;u=u+16|0;d=c+4|0;e=c;g=a+4|0;h=f[g>>2]|0;i=a+8|0;j=f[i>>2]|0;if((j|0)==(h|0))k=h;else{l=j+(~((j+-4-h|0)>>>2)<<2)|0;f[i>>2]=l;k=l}l=a+16|0;h=f[l>>2]|0;j=a+20|0;m=f[j>>2]|0;n=h;if((m|0)!=(h|0))f[j>>2]=m+(~((m+-4-n|0)>>>2)<<2);m=f[b>>2]|0;h=f[b+4>>2]|0;if((m|0)==(h|0)){u=c;return}b=a+12|0;a=m;m=k;k=n;while(1){n=f[a>>2]|0;f[d>>2]=n;if((m|0)==(f[b>>2]|0)){Ri(g,d);o=f[l>>2]|0}else{f[m>>2]=n;f[i>>2]=m+4;o=k}n=f[d>>2]|0;p=f[j>>2]|0;q=p-o>>2;r=o;if((n|0)<(q|0)){s=r;t=n;v=o}else{w=n+1|0;f[e>>2]=-1;x=p;if(w>>>0<=q>>>0)if(w>>>0>>0?(p=r+(w<<2)|0,(p|0)!=(x|0)):0){f[j>>2]=x+(~((x+-4-p|0)>>>2)<<2);y=n;z=r;A=o}else{y=n;z=r;A=o}else{Ch(l,w-q|0,e);q=f[l>>2]|0;y=f[d>>2]|0;z=q;A=q}s=z;t=y;v=A}m=f[i>>2]|0;f[s+(t<<2)>>2]=(m-(f[g>>2]|0)>>2)+-1;a=a+4|0;if((a|0)==(h|0))break;else k=v}u=c;return}function cg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;c=u;u=u+16|0;d=c;e=a+76|0;g=f[e>>2]|0;h=a+80|0;i=f[h>>2]|0;if((i|0)!=(g|0))f[h>>2]=i+(~((i+-4-g|0)>>>2)<<2);f[e>>2]=0;f[h>>2]=0;f[a+84>>2]=0;if(g|0)Oq(g);g=a+64|0;h=f[g>>2]|0;e=a+68|0;if((f[e>>2]|0)!=(h|0))f[e>>2]=h;f[g>>2]=0;f[e>>2]=0;f[a+72>>2]=0;if(h|0)Oq(h);h=b+4|0;e=f[h>>2]|0;g=f[b>>2]|0;i=((e-g|0)/12|0)*3|0;j=a+4|0;k=f[j>>2]|0;l=f[a>>2]|0;m=k-l>>2;n=l;l=k;k=g;if(i>>>0<=m>>>0)if(i>>>0>>0?(o=n+(i<<2)|0,(o|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-o|0)>>>2)<<2);p=e;q=g;r=k}else{p=e;q=g;r=k}else{Ci(a,i-m|0);m=f[b>>2]|0;p=f[h>>2]|0;q=m;r=m}if((p|0)!=(q|0)){q=f[a>>2]|0;m=(p-r|0)/12|0;p=0;do{h=p*3|0;f[q+(h<<2)>>2]=f[r+(p*12|0)>>2];f[q+(h+1<<2)>>2]=f[r+(p*12|0)+4>>2];f[q+(h+2<<2)>>2]=f[r+(p*12|0)+8>>2];p=p+1|0}while(p>>>0>>0)}f[d>>2]=-1;if(!(rc(a,d)|0)){s=0;u=c;return s|0}eb(a,f[d>>2]|0)|0;s=1;u=c;return s|0}function dg(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=d[b>>1]|0;e=d[b+2>>1]|0;g=d[b+4>>1]|0;b=(((c^318)&65535)+239^e&65535)+239^g&65535;h=f[a+4>>2]|0;if(!h){i=0;return i|0}j=h+-1|0;k=(j&h|0)==0;if(!k)if(b>>>0>>0)l=b;else l=(b>>>0)%(h>>>0)|0;else l=b&j;m=f[(f[a>>2]|0)+(l<<2)>>2]|0;if(!m){i=0;return i|0}a=f[m>>2]|0;if(!a){i=0;return i|0}if(k){k=a;while(1){m=f[k+4>>2]|0;n=(m|0)==(b|0);if(!(n|(m&j|0)==(l|0))){i=0;o=23;break}if(((n?(n=k+8|0,(d[n>>1]|0)==c<<16>>16):0)?(d[n+2>>1]|0)==e<<16>>16:0)?(d[k+12>>1]|0)==g<<16>>16:0){i=k;o=23;break}k=f[k>>2]|0;if(!k){i=0;o=23;break}}if((o|0)==23)return i|0}else p=a;while(1){a=f[p+4>>2]|0;if((a|0)==(b|0)){k=p+8|0;if(((d[k>>1]|0)==c<<16>>16?(d[k+2>>1]|0)==e<<16>>16:0)?(d[p+12>>1]|0)==g<<16>>16:0){i=p;o=23;break}}else{if(a>>>0>>0)q=a;else q=(a>>>0)%(h>>>0)|0;if((q|0)!=(l|0)){i=0;o=23;break}}p=f[p>>2]|0;if(!p){i=0;o=23;break}}if((o|0)==23)return i|0;return 0}function eg(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=u;u=u+32|0;d=c;e=a+16|0;g=e;h=f[g>>2]|0;i=f[g+4>>2]|0;if(!((i|0)>0|(i|0)==0&h>>>0>0)){u=c;return}g=Vn(f[(f[a+12>>2]|0)+4>>2]|0,0,7,0)|0;j=Yn(g|0,I|0,3)|0;g=I;if(!(b[a+24>>0]|0)){k=a+4|0;l=k;m=k;n=h;o=i}else{k=f[a>>2]|0;p=a+4|0;q=k+((f[p>>2]|0)-k)|0;k=Vn(h|0,i|0,8,0)|0;i=q+(0-k)|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;b[d+24>>0]=0;yh(j,g,d)|0;k=d+4|0;q=(f[k>>2]|0)-(f[d>>2]|0)|0;im(i+q|0,i+8|0,j|0)|0;kh(i|0,f[d>>2]|0,q|0)|0;i=e;h=Vn(f[i>>2]|0,f[i+4>>2]|0,8-q|0,0)|0;q=e;f[q>>2]=h;f[q+4>>2]=I;q=d+12|0;h=f[q>>2]|0;f[q>>2]=0;if(h|0)Oq(h);h=f[d>>2]|0;if(h|0){if((f[k>>2]|0)!=(h|0))f[k>>2]=h;Oq(h)}h=e;l=p;m=p;n=f[h>>2]|0;o=f[h+4>>2]|0}h=f[l>>2]|0;l=f[a>>2]|0;p=h-l|0;k=Xn(j|0,g|0,n|0,o|0)|0;o=Vn(k|0,I|0,p|0,0)|0;k=l;l=h;if(p>>>0>=o>>>0){if(p>>>0>o>>>0?(h=k+o|0,(h|0)!=(l|0)):0)f[m>>2]=h}else Fi(a,o-p|0);p=e;f[p>>2]=0;f[p+4>>2]=0;u=c;return}function fg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f[a+4>>2]=f[b+4>>2];c=a+8|0;d=b+8|0;if((a|0)==(b|0))return a|0;e=b+12|0;g=f[e>>2]|0;if(!g)h=0;else{i=a+16|0;do if(g>>>0>f[i>>2]<<5>>>0){j=f[c>>2]|0;if(!j)k=g;else{Oq(j);f[c>>2]=0;f[i>>2]=0;f[a+12>>2]=0;k=f[e>>2]|0}if((k|0)<0)aq(c);else{j=((k+-1|0)>>>5)+1|0;l=ln(j<<2)|0;f[c>>2]=l;f[a+12>>2]=0;f[i>>2]=j;m=f[e>>2]|0;n=l;break}}else{m=g;n=f[c>>2]|0}while(0);im(n|0,f[d>>2]|0,((m+-1|0)>>>5<<2)+4|0)|0;h=f[e>>2]|0}f[a+12>>2]=h;h=a+20|0;e=b+20|0;m=b+24|0;b=f[m>>2]|0;if(!b)o=0;else{d=a+28|0;do if(b>>>0>f[d>>2]<<5>>>0){n=f[h>>2]|0;if(!n)p=b;else{Oq(n);f[h>>2]=0;f[d>>2]=0;f[a+24>>2]=0;p=f[m>>2]|0}if((p|0)<0)aq(h);else{n=((p+-1|0)>>>5)+1|0;c=ln(n<<2)|0;f[h>>2]=c;f[a+24>>2]=0;f[d>>2]=n;q=f[m>>2]|0;r=c;break}}else{q=b;r=f[h>>2]|0}while(0);im(r|0,f[e>>2]|0,((q+-1|0)>>>5<<2)+4|0)|0;o=f[m>>2]|0}f[a+24>>2]=o;return a|0}function gg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f[c>>2]=1;d=a+4|0;e=c+8|0;g=c+12|0;c=f[e>>2]|0;i=(f[g>>2]|0)-c|0;if(i>>>0<4294967292){Lk(e,i+4|0,0);j=f[e>>2]|0}else j=c;c=j+i|0;i=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;b[c>>0]=i;b[c+1>>0]=i>>8;b[c+2>>0]=i>>16;b[c+3>>0]=i>>24;i=a+8|0;c=a+12|0;d=f[i>>2]|0;if((f[c>>2]|0)!=(d|0)){j=0;k=d;do{d=k+(j<<2)|0;l=f[e>>2]|0;m=(f[g>>2]|0)-l|0;if(m>>>0<4294967292){Lk(e,m+4|0,0);n=f[e>>2]|0}else n=l;l=n+m|0;m=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;b[l>>0]=m;b[l+1>>0]=m>>8;b[l+2>>0]=m>>16;b[l+3>>0]=m>>24;j=j+1|0;k=f[i>>2]|0}while(j>>>0<(f[c>>2]|0)-k>>2>>>0)}k=a+20|0;a=f[e>>2]|0;c=(f[g>>2]|0)-a|0;if(c>>>0<4294967292){Lk(e,c+4|0,0);o=f[e>>2]|0;p=o+c|0;q=h[k>>0]|h[k+1>>0]<<8|h[k+2>>0]<<16|h[k+3>>0]<<24;b[p>>0]=q;b[p+1>>0]=q>>8;b[p+2>>0]=q>>16;b[p+3>>0]=q>>24;return}else{o=a;p=o+c|0;q=h[k>>0]|h[k+1>>0]<<8|h[k+2>>0]<<16|h[k+3>>0]<<24;b[p>>0]=q;b[p+1>>0]=q>>8;b[p+2>>0]=q>>16;b[p+3>>0]=q>>24;return}}function hg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+8|0;e=f[d>>2]|0;g=f[a>>2]|0;h=g;do if(e-g>>2>>>0>=b>>>0){i=a+4|0;j=f[i>>2]|0;k=j-g>>2;l=k>>>0>>0;m=l?k:b;n=j;if(m|0){j=m;m=h;while(1){f[m>>2]=f[c>>2];j=j+-1|0;if(!j)break;else m=m+4|0}}if(!l){m=h+(b<<2)|0;if((m|0)==(n|0))return;else{o=i;p=n+(~((n+-4-m|0)>>>2)<<2)|0;break}}else{m=b-k|0;j=m;q=n;while(1){f[q>>2]=f[c>>2];j=j+-1|0;if(!j)break;else q=q+4|0}o=i;p=n+(m<<2)|0;break}}else{q=g;if(!g)r=e;else{j=a+4|0;k=f[j>>2]|0;if((k|0)!=(h|0))f[j>>2]=k+(~((k+-4-g|0)>>>2)<<2);Oq(q);f[d>>2]=0;f[j>>2]=0;f[a>>2]=0;r=0}if(b>>>0>1073741823)aq(a);j=r>>1;q=r>>2>>>0<536870911?(j>>>0>>0?b:j):1073741823;if(q>>>0>1073741823)aq(a);j=ln(q<<2)|0;k=a+4|0;f[k>>2]=j;f[a>>2]=j;f[d>>2]=j+(q<<2);q=b;l=j;while(1){f[l>>2]=f[c>>2];q=q+-1|0;if(!q)break;else l=l+4|0}o=k;p=j+(b<<2)|0}while(0);f[o>>2]=p;return}function ig(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=jh(a,b,c,d,g)|0;i=f[e>>2]|0;j=f[d>>2]|0;k=f[g>>2]|0;g=f[k>>2]|0;l=(f[k+4>>2]|0)-g>>3;if(l>>>0<=i>>>0)aq(k);m=g;if(l>>>0<=j>>>0)aq(k);if((f[m+(i<<3)>>2]|0)>>>0>=(f[m+(j<<3)>>2]|0)>>>0){n=h;return n|0}f[d>>2]=i;f[e>>2]=j;j=f[d>>2]|0;e=f[c>>2]|0;if(l>>>0<=j>>>0)aq(k);if(l>>>0<=e>>>0)aq(k);if((f[m+(j<<3)>>2]|0)>>>0>=(f[m+(e<<3)>>2]|0)>>>0){n=h+1|0;return n|0}f[c>>2]=j;f[d>>2]=e;e=f[c>>2]|0;d=f[b>>2]|0;if(l>>>0<=e>>>0)aq(k);if(l>>>0<=d>>>0)aq(k);if((f[m+(e<<3)>>2]|0)>>>0>=(f[m+(d<<3)>>2]|0)>>>0){n=h+2|0;return n|0}f[b>>2]=e;f[c>>2]=d;d=f[b>>2]|0;c=f[a>>2]|0;if(l>>>0<=d>>>0)aq(k);if(l>>>0<=c>>>0)aq(k);if((f[m+(d<<3)>>2]|0)>>>0>=(f[m+(c<<3)>>2]|0)>>>0){n=h+3|0;return n|0}f[a>>2]=d;f[b>>2]=c;n=h+4|0;return n|0}function jg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=b[c>>0]|0;e=b[c+1>>0]|0;g=b[c+2>>0]|0;c=((d&255^318)+239^e&255)+239^g&255;h=f[a+4>>2]|0;if(!h){i=0;return i|0}j=h+-1|0;k=(j&h|0)==0;if(!k)if(c>>>0>>0)l=c;else l=(c>>>0)%(h>>>0)|0;else l=c&j;m=f[(f[a>>2]|0)+(l<<2)>>2]|0;if(!m){i=0;return i|0}a=f[m>>2]|0;if(!a){i=0;return i|0}if(k){k=a;while(1){m=f[k+4>>2]|0;n=(m|0)==(c|0);if(!(n|(m&j|0)==(l|0))){i=0;o=23;break}if(((n?(n=k+8|0,(b[n>>0]|0)==d<<24>>24):0)?(b[n+1>>0]|0)==e<<24>>24:0)?(b[n+2>>0]|0)==g<<24>>24:0){i=k;o=23;break}k=f[k>>2]|0;if(!k){i=0;o=23;break}}if((o|0)==23)return i|0}else p=a;while(1){a=f[p+4>>2]|0;if((a|0)==(c|0)){k=p+8|0;if(((b[k>>0]|0)==d<<24>>24?(b[k+1>>0]|0)==e<<24>>24:0)?(b[k+2>>0]|0)==g<<24>>24:0){i=p;o=23;break}}else{if(a>>>0>>0)q=a;else q=(a>>>0)%(h>>>0)|0;if((q|0)!=(l|0)){i=0;o=23;break}}p=f[p>>2]|0;if(!p){i=0;o=23;break}}if((o|0)==23)return i|0;return 0}function kg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=u;u=u+16|0;c=b;d=a+36|0;e=a+4|0;g=a+8|0;h=(f[g>>2]|0)-(f[e>>2]|0)>>2;i=a+40|0;j=f[i>>2]|0;k=f[d>>2]|0;l=j-k>>2;m=k;k=j;if(h>>>0<=l>>>0){if(h>>>0>>0?(j=m+(h<<2)|0,(j|0)!=(k|0)):0){m=k;do{k=m+-4|0;f[i>>2]=k;n=f[k>>2]|0;f[k>>2]=0;if(n|0)Va[f[(f[n>>2]|0)+4>>2]&127](n);m=f[i>>2]|0}while((m|0)!=(j|0))}}else Eg(d,h-l|0);if((f[g>>2]|0)==(f[e>>2]|0)){o=1;u=b;return o|0}l=a+52|0;h=a+48|0;j=0;while(1){Xa[f[(f[a>>2]|0)+56>>2]&15](c,a,j);m=(f[d>>2]|0)+(j<<2)|0;i=f[c>>2]|0;f[c>>2]=0;n=f[m>>2]|0;f[m>>2]=i;if(n|0)Va[f[(f[n>>2]|0)+4>>2]&127](n);n=f[c>>2]|0;f[c>>2]=0;if(n|0)Va[f[(f[n>>2]|0)+4>>2]&127](n);n=f[(f[d>>2]|0)+(j<<2)>>2]|0;if(!n){o=0;p=19;break}if(j>>>0<(f[l>>2]|0)>>>0?f[(f[h>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)|0:0)Bp(n);j=j+1|0;if(j>>>0>=(f[g>>2]|0)-(f[e>>2]|0)>>2>>>0){o=1;p=19;break}}if((p|0)==19){u=b;return o|0}return 0}function lg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=u;u=u+16|0;e=d+4|0;g=d;ci(f[c+12>>2]|0,b)|0;h=f[c+8>>2]|0;a:do if(h|0){i=b+16|0;j=b+4|0;k=h;while(1){l=k;if(!(Bf(0,b,l+8|0)|0)){m=0;break}n=l+20|0;o=(f[l+24>>2]|0)-(f[n>>2]|0)|0;ci(o,b)|0;l=f[n>>2]|0;n=i;p=f[n+4>>2]|0;if(!((p|0)>0|(p|0)==0&(f[n>>2]|0)>>>0>0)){f[g>>2]=f[j>>2];f[e>>2]=f[g>>2];Me(b,e,l,l+o|0)|0}k=f[k>>2]|0;if(!k)break a}u=d;return m|0}while(0);ci(f[c+32>>2]|0,b)|0;e=f[c+28>>2]|0;if(!e){m=1;u=d;return m|0}else q=e;while(1){e=q;if(!(Bf(0,b,e+8|0)|0)){m=0;r=10;break}lg(a,b,f[e+20>>2]|0)|0;q=f[q>>2]|0;if(!q){m=1;r=10;break}}if((r|0)==10){u=d;return m|0}return 0}function mg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;h=a+8|0;i=a+12|0;j=f[h>>2]|0;if((f[i>>2]|0)==(j|0)){k=ln(76)|0;vn(k,b);l=k;f[g>>2]=l;k=f[i>>2]|0;if(k>>>0<(f[a+16>>2]|0)>>>0){f[g>>2]=0;f[k>>2]=l;f[i>>2]=k+4;m=g}else{Qg(h,g);m=g}g=f[m>>2]|0;f[m>>2]=0;if(!g){u=c;return 1}Va[f[(f[g>>2]|0)+4>>2]&127](g);u=c;return 1}g=f[j>>2]|0;f[d>>2]=b;j=g+4|0;m=g+8|0;h=f[m>>2]|0;if((h|0)==(f[g+12>>2]|0))Ri(j,d);else{f[h>>2]=b;f[m>>2]=h+4}h=f[d>>2]|0;b=g+16|0;k=g+20|0;g=f[k>>2]|0;i=f[b>>2]|0;l=g-i>>2;a=i;if((h|0)<(l|0)){n=a;o=h}else{i=h+1|0;f[e>>2]=-1;p=g;if(i>>>0<=l>>>0)if(i>>>0>>0?(g=a+(i<<2)|0,(g|0)!=(p|0)):0){f[k>>2]=p+(~((p+-4-g|0)>>>2)<<2);q=h;r=a}else{q=h;r=a}else{Ch(b,i-l|0,e);q=f[d>>2]|0;r=f[b>>2]|0}n=r;o=q}f[n+(o<<2)>>2]=((f[m>>2]|0)-(f[j>>2]|0)>>2)+-1;u=c;return 1}function ng(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=c;e=b;g=d-e|0;h=g>>2;i=a+8|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(h>>>0>j-k>>2>>>0){m=k;if(!k)n=j;else{j=a+4|0;o=f[j>>2]|0;if((o|0)!=(l|0))f[j>>2]=o+(~((o+-4-k|0)>>>2)<<2);Oq(m);f[i>>2]=0;f[j>>2]=0;f[a>>2]=0;n=0}if(h>>>0>1073741823)aq(a);j=n>>1;m=n>>2>>>0<536870911?(j>>>0>>0?h:j):1073741823;if(m>>>0>1073741823)aq(a);j=ln(m<<2)|0;n=a+4|0;f[n>>2]=j;f[a>>2]=j;f[i>>2]=j+(m<<2);if((g|0)<=0)return;kh(j|0,b|0,g|0)|0;f[n>>2]=j+(g>>>2<<2);return}g=a+4|0;a=f[g>>2]|0;j=a-k>>2;k=h>>>0>j>>>0;h=k?b+(j<<2)|0:c;c=a;j=a;if((h|0)==(b|0))p=l;else{a=h+-4-e|0;e=b;b=l;while(1){f[b>>2]=f[e>>2];e=e+4|0;if((e|0)==(h|0))break;else b=b+4|0}p=l+((a>>>2)+1<<2)|0}if(k){k=d-h|0;if((k|0)<=0)return;kh(j|0,h|0,k|0)|0;f[g>>2]=(f[g>>2]|0)+(k>>>2<<2);return}else{if((p|0)==(c|0))return;f[g>>2]=c+(~((c+-4-p|0)>>>2)<<2);return}}function og(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=f[a+8>>2]|0;e=a+76|0;g=f[e>>2]|0;h=f[g+80>>2]|0;b[c+84>>0]=0;i=c+68|0;j=c+72|0;k=f[j>>2]|0;l=f[i>>2]|0;m=k-l>>2;n=l;l=k;if(h>>>0<=m>>>0)if(h>>>0>>0?(k=n+(h<<2)|0,(k|0)!=(l|0)):0){f[j>>2]=l+(~((l+-4-k|0)>>>2)<<2);o=g;p=h}else{o=g;p=h}else{Ch(i,h-m|0,3600);m=f[e>>2]|0;o=m;p=f[m+80>>2]|0}m=(f[o+100>>2]|0)-(f[o+96>>2]|0)|0;e=(m|0)/12|0;if(!m){q=1;return q|0}m=c+68|0;c=f[o+96>>2]|0;o=f[d+28>>2]|0;d=f[(f[a+80>>2]|0)+12>>2]|0;a=0;while(1){h=a*3|0;i=f[d+(f[o+(h<<2)>>2]<<2)>>2]|0;if(i>>>0>=p>>>0){q=0;r=10;break}g=f[m>>2]|0;f[g+(f[c+(a*12|0)>>2]<<2)>>2]=i;i=f[d+(f[o+(h+1<<2)>>2]<<2)>>2]|0;if(i>>>0>=p>>>0){q=0;r=10;break}f[g+(f[c+(a*12|0)+4>>2]<<2)>>2]=i;i=f[d+(f[o+(h+2<<2)>>2]<<2)>>2]|0;if(i>>>0>=p>>>0){q=0;r=10;break}f[g+(f[c+(a*12|0)+8>>2]<<2)>>2]=i;a=a+1|0;if(a>>>0>=e>>>0){q=1;r=10;break}}if((r|0)==10)return q|0;return 0}function pg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=u;u=u+16|0;g=e;if(!(xh(a,c,d)|0)){h=0;u=e;return h|0}if((b[(f[a+8>>2]|0)+24>>0]|0)!=3){h=0;u=e;return h|0}i=f[c+48>>2]|0;c=ln(32)|0;f[g>>2]=c;f[g+8>>2]=-2147483616;f[g+4>>2]=17;j=c;k=14495;l=j+17|0;do{b[j>>0]=b[k>>0]|0;j=j+1|0;k=k+1|0}while((j|0)<(l|0));b[c+17>>0]=0;c=i+16|0;k=f[c>>2]|0;if(k){j=c;l=k;a:while(1){k=l;while(1){if((f[k+16>>2]|0)>=(d|0))break;m=f[k+4>>2]|0;if(!m){n=j;break a}else k=m}l=f[k>>2]|0;if(!l){n=k;break}else j=k}if(((n|0)!=(c|0)?(f[n+16>>2]|0)<=(d|0):0)?(d=n+20|0,(Jh(d,g)|0)!=0):0)o=Hk(d,g,-1)|0;else p=12}else p=12;if((p|0)==12)o=Hk(i,g,-1)|0;if((b[g+11>>0]|0)<0)Oq(f[g>>2]|0);if((o|0)<1){h=0;u=e;return h|0}ip(a+40|0,o);h=1;u=e;return h|0}function qg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=f[b>>2]|0;d=f[b+4>>2]|0;e=f[b+8>>2]|0;b=((c^318)+239^d)+239^e;g=f[a+4>>2]|0;if(!g){h=0;return h|0}i=g+-1|0;j=(i&g|0)==0;if(!j)if(b>>>0>>0)k=b;else k=(b>>>0)%(g>>>0)|0;else k=b&i;l=f[(f[a>>2]|0)+(k<<2)>>2]|0;if(!l){h=0;return h|0}a=f[l>>2]|0;if(!a){h=0;return h|0}if(j){j=a;while(1){l=f[j+4>>2]|0;m=(l|0)==(b|0);if(!(m|(l&i|0)==(k|0))){h=0;n=23;break}if(((m?(f[j+8>>2]|0)==(c|0):0)?(f[j+12>>2]|0)==(d|0):0)?(f[j+16>>2]|0)==(e|0):0){h=j;n=23;break}j=f[j>>2]|0;if(!j){h=0;n=23;break}}if((n|0)==23)return h|0}else o=a;while(1){a=f[o+4>>2]|0;if((a|0)==(b|0)){if(((f[o+8>>2]|0)==(c|0)?(f[o+12>>2]|0)==(d|0):0)?(f[o+16>>2]|0)==(e|0):0){h=o;n=23;break}}else{if(a>>>0>>0)p=a;else p=(a>>>0)%(g>>>0)|0;if((p|0)!=(k|0)){h=0;n=23;break}}o=f[o>>2]|0;if(!o){h=0;n=23;break}}if((n|0)==23)return h|0;return 0}function rg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=c;g=d-e|0;h=a+8|0;i=f[h>>2]|0;j=f[a>>2]|0;k=j;if(g>>>0>(i-j|0)>>>0){if(!j)l=i;else{i=a+4|0;if((f[i>>2]|0)!=(k|0))f[i>>2]=k;Oq(k);f[h>>2]=0;f[i>>2]=0;f[a>>2]=0;l=0}if((g|0)<0)aq(a);i=l<<1;m=l>>>0<1073741823?(i>>>0>>0?g:i):2147483647;if((m|0)<0)aq(a);i=ln(m)|0;l=a+4|0;f[l>>2]=i;f[a>>2]=i;f[h>>2]=i+m;if((c|0)==(d|0))return;else{n=c;o=i}do{b[o>>0]=b[n>>0]|0;n=n+1|0;o=(f[l>>2]|0)+1|0;f[l>>2]=o}while((n|0)!=(d|0));return}n=a+4|0;a=(f[n>>2]|0)-j|0;j=g>>>0>a>>>0;g=c+a|0;a=j?g:d;if((a|0)==(c|0))p=k;else{o=c;c=k;while(1){b[c>>0]=b[o>>0]|0;o=o+1|0;if((o|0)==(a|0))break;else c=c+1|0}p=k+(a-e)|0}if(!j){if((f[n>>2]|0)==(p|0))return;f[n>>2]=p;return}if((a|0)==(d|0))return;a=g;g=f[n>>2]|0;do{b[g>>0]=b[a>>0]|0;a=a+1|0;g=(f[n>>2]|0)+1|0;f[n>>2]=g}while((a|0)!=(d|0));return}function sg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=c>>>1&1431655765|c<<1&-1431655766;c=d>>>2&858993459|d<<2&-858993460;d=c>>>4&252645135|c<<4&-252645136;c=d>>>8&16711935|d<<8&-16711936;d=32-b|0;e=(c>>>16|c<<16)>>>d;c=e-(e>>>1&1431655765)|0;g=(c>>>2&858993459)+(c&858993459)|0;c=(X((g>>>4)+g&252645135,16843009)|0)>>>24;g=b-c|0;h=f[a>>2]|0;i=h;j=Vn(f[i>>2]|0,f[i+4>>2]|0,g|0,((g|0)<0)<<31>>31|0)|0;g=h;f[g>>2]=j;f[g+4>>2]=I;g=h+8|0;h=g;j=Vn(f[h>>2]|0,f[h+4>>2]|0,c|0,0)|0;c=g;f[c>>2]=j;f[c+4>>2]=I;c=a+28|0;j=f[c>>2]|0;g=32-j|0;h=a+24|0;do if((g|0)>=(b|0)){i=-1>>>d<>2]&~i|i&e<>2]=k;i=j+b|0;f[c>>2]=i;if((i|0)!=32)return;i=a+16|0;l=f[i>>2]|0;if((l|0)==(f[a+20>>2]|0)){Ri(a+12|0,h);m=0;n=0;break}else{f[l>>2]=k;f[i>>2]=l+4;m=0;n=0;break}}else{l=-1>>>j<>2]&~l|l&e<>2]=i;l=a+16|0;k=f[l>>2]|0;if((k|0)==(f[a+20>>2]|0))Ri(a+12|0,h);else{f[k>>2]=i;f[l>>2]=k+4}k=b-g|0;m=k;n=-1>>>(32-k|0)&e>>>g}while(0);f[h>>2]=n;f[c>>2]=m;return}function tg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;e=c&255;g=(d|0)!=0;a:do if(g&(a&3|0)!=0){h=c&255;i=a;j=d;while(1){if((b[i>>0]|0)==h<<24>>24){k=i;l=j;m=6;break a}n=i+1|0;o=j+-1|0;p=(o|0)!=0;if(p&(n&3|0)!=0){i=n;j=o}else{q=n;r=o;s=p;m=5;break}}}else{q=a;r=d;s=g;m=5}while(0);if((m|0)==5)if(s){k=q;l=r;m=6}else{t=q;u=0}b:do if((m|0)==6){q=c&255;if((b[k>>0]|0)==q<<24>>24){t=k;u=l}else{r=X(e,16843009)|0;c:do if(l>>>0>3){s=k;g=l;while(1){d=f[s>>2]^r;if((d&-2139062144^-2139062144)&d+-16843009|0)break;d=s+4|0;a=g+-4|0;if(a>>>0>3){s=d;g=a}else{v=d;w=a;m=11;break c}}x=s;y=g}else{v=k;w=l;m=11}while(0);if((m|0)==11)if(!w){t=v;u=0;break}else{x=v;y=w}while(1){if((b[x>>0]|0)==q<<24>>24){t=x;u=y;break b}r=x+1|0;y=y+-1|0;if(!y){t=r;u=0;break}else x=r}}}while(0);return (u|0?t:0)|0}function ug(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=e;do if((d|0)==(e|0)){h=a+8|0;i=f[h>>2]|0;j=a+12|0;k=f[j>>2]|0;l=k;if(i>>>0>>0){k=i;m=((l-k>>2)+1|0)/2|0;n=i+(m<<2)|0;o=k-d|0;k=o>>2;p=n+(0-k<<2)|0;if(!k){q=n;r=i}else{im(p|0,d|0,o|0)|0;q=p;r=f[h>>2]|0}f[c>>2]=q;f[h>>2]=r+(m<<2);s=q;break}m=l-g>>1;l=(m|0)==0?1:m;if(l>>>0>1073741823){m=ra(8)|0;Oo(m,16035);f[m>>2]=7256;va(m|0,1112,110)}m=ln(l<<2)|0;p=m;o=m+((l+3|0)>>>2<<2)|0;n=o;k=m+(l<<2)|0;if((d|0)==(i|0)){t=n;u=d}else{l=o;m=n;v=d;do{f[l>>2]=f[v>>2];l=m+4|0;m=l;v=v+4|0}while((v|0)!=(i|0));t=m;u=f[a>>2]|0}f[a>>2]=p;f[c>>2]=n;f[h>>2]=t;f[j>>2]=k;if(!u)s=o;else{Oq(u);s=f[c>>2]|0}}else s=d;while(0);f[s+-4>>2]=f[b>>2];f[c>>2]=(f[c>>2]|0)+-4;return}function vg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;i=a+4|0;if((f[i>>2]|0)==-1){j=0;u=d;return j|0}k=f[a+8>>2]|0;l=c+16|0;m=l;n=f[m>>2]|0;o=f[m+4>>2]|0;if(!((o|0)>0|(o|0)==0&n>>>0>0)){m=(f[a+12>>2]|0)-k|0;p=c+4|0;f[g>>2]=f[p>>2];f[e>>2]=f[g>>2];Me(c,e,k,k+m|0)|0;m=l;k=f[m>>2]|0;q=f[m+4>>2]|0;m=a+20|0;if((q|0)>0|(q|0)==0&k>>>0>0){r=q;s=k;t=g}else{f[g>>2]=f[p>>2];f[e>>2]=f[g>>2];Me(c,e,m,m+4|0)|0;m=l;r=f[m+4>>2]|0;s=f[m>>2]|0;t=g}}else{r=o;s=n;t=g}b[h>>0]=f[i>>2];if(!((r|0)>0|(r|0)==0&s>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Me(c,e,h,h+1|0)|0}j=1;u=d;return j|0}function wg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0;e=u;u=u+16|0;g=e+4|0;h=e;i=a+8|0;a=f[i>>2]|0;j=f[a+40>>2]|0;k=Lq((j|0)>-1?j:-1)|0;l=c+4|0;m=f[l>>2]|0;n=f[c>>2]|0;if((m|0)==(n|0)){Mq(k);u=e;return 1}o=d+16|0;p=d+4|0;q=k+j|0;j=0;r=n;n=a;s=a;a=m;while(1){m=f[r+(j<<2)>>2]|0;if(!(b[n+84>>0]|0))t=f[(f[n+68>>2]|0)+(m<<2)>>2]|0;else t=m;m=s+48|0;v=f[m>>2]|0;w=f[m+4>>2]|0;m=s+40|0;x=f[m>>2]|0;y=un(x|0,f[m+4>>2]|0,t|0,0)|0;m=Vn(y|0,I|0,v|0,w|0)|0;kh(k|0,(f[f[s>>2]>>2]|0)+m|0,x|0)|0;x=o;m=f[x+4>>2]|0;if((m|0)>0|(m|0)==0&(f[x>>2]|0)>>>0>0){z=r;A=a}else{f[h>>2]=f[p>>2];f[g>>2]=f[h>>2];Me(d,g,k,q)|0;z=f[c>>2]|0;A=f[l>>2]|0}x=j+1|0;if(x>>>0>=A-z>>2>>>0)break;m=f[i>>2]|0;j=x;r=z;n=m;s=m;a=A}Mq(k);u=e;return 1}function xg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=(f[b>>2]|0)*3|0;if((d|0)==-1){e=0;g=-1;f[c>>2]=g;return e|0}b=f[a+12>>2]|0;h=f[b+12>>2]|0;if((f[h+(d<<2)>>2]|0)==-1){e=0;g=d;f[c>>2]=g;return e|0}i=f[b>>2]|0;b=f[a+152>>2]|0;if((f[b+(f[i+(d<<2)>>2]<<2)>>2]|0)==-1){a=d+1|0;j=((a>>>0)%3|0|0)==0?d+-2|0:a;if((j|0)==-1){e=0;g=-1;f[c>>2]=g;return e|0}if((f[h+(j<<2)>>2]|0)==-1){e=0;g=j;f[c>>2]=g;return e|0}if((f[b+(f[i+(j<<2)>>2]<<2)>>2]|0)==-1){a=j+1|0;k=((a>>>0)%3|0|0)==0?j+-2|0:a;if((k|0)==-1){e=0;g=-1;f[c>>2]=g;return e|0}if((f[h+(k<<2)>>2]|0)==-1){e=0;g=k;f[c>>2]=g;return e|0}if((f[b+(f[i+(k<<2)>>2]<<2)>>2]|0)==-1){i=k+1|0;e=1;g=((i>>>0)%3|0|0)==0?k+-2|0:i;f[c>>2]=g;return e|0}else l=k}else l=j}else l=d;while(1){d=(((l>>>0)%3|0|0)==0?2:-1)+l|0;if((d|0)==-1)break;j=f[h+(d<<2)>>2]|0;if((j|0)==-1)break;d=j+(((j>>>0)%3|0|0)==0?2:-1)|0;if((d|0)==-1)break;else l=d}e=0;g=(((l>>>0)%3|0|0)==0?2:-1)+l|0;f[c>>2]=g;return e|0}function yg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=a+4|0;g=f[e>>2]|0;if(!g){f[c>>2]=e;h=e;return h|0}e=b[d+11>>0]|0;i=e<<24>>24<0;j=i?f[d+4>>2]|0:e&255;e=i?f[d>>2]|0:d;d=a+4|0;a=g;while(1){g=a+16|0;i=b[g+11>>0]|0;k=i<<24>>24<0;l=k?f[a+20>>2]|0:i&255;i=l>>>0>>0;m=i?l:j;if((m|0)!=0?(n=Vk(e,k?f[g>>2]|0:g,m)|0,(n|0)!=0):0)if((n|0)<0)o=8;else o=10;else if(j>>>0>>0)o=8;else o=10;if((o|0)==8){o=0;n=f[a>>2]|0;if(!n){o=9;break}else{p=a;q=n}}else if((o|0)==10){o=0;n=j>>>0>>0?j:l;if((n|0)!=0?(l=Vk(k?f[g>>2]|0:g,e,n)|0,(l|0)!=0):0){if((l|0)>=0){o=16;break}}else o=12;if((o|0)==12?(o=0,!i):0){o=16;break}r=a+4|0;i=f[r>>2]|0;if(!i){o=15;break}else{p=r;q=i}}d=p;a=q}if((o|0)==9){f[c>>2]=a;h=a;return h|0}else if((o|0)==15){f[c>>2]=a;h=r;return h|0}else if((o|0)==16){f[c>>2]=a;h=d;return h|0}return 0}function zg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;d=u;u=u+32|0;e=d+24|0;g=d+16|0;h=d+8|0;i=d;j=a+4|0;k=f[j>>2]|0;l=f[b>>2]|0;m=f[b+4>>2]|0;b=f[c>>2]|0;n=f[c+4>>2]|0;c=b-l<<3;f[j>>2]=k-m+n+c;j=(f[a>>2]|0)+(k>>>5<<2)|0;a=k&31;k=j;if((m|0)!=(a|0)){f[e>>2]=l;f[e+4>>2]=m;f[g>>2]=b;f[g+4>>2]=n;f[h>>2]=k;f[h+4>>2]=a;xe(i,e,g,h);u=d;return}h=n-m+c|0;c=l;if((h|0)>0){if(!m){o=h;p=j;q=0;r=l;s=c}else{l=32-m|0;n=(h|0)<(l|0)?h:l;g=-1>>>(l-n|0)&-1<>2]=f[j>>2]&~g|f[c>>2]&g;g=n+m|0;l=c+4|0;o=h-n|0;p=j+(g>>>5<<2)|0;q=g&31;r=l;s=l}l=(o|0)/32|0;im(p|0,r|0,l<<2|0)|0;r=o-(l<<5)|0;o=p+(l<<2)|0;p=o;if((r|0)>0){g=-1>>>(32-r|0);f[o>>2]=f[o>>2]&~g|f[s+(l<<2)>>2]&g;t=r;v=p}else{t=q;v=p}}else{t=m;v=k}f[i>>2]=v;f[i+4>>2]=t;u=d;return}function Ag(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;c=a+8|0;d=f[c>>2]|0;e=a+12|0;g=f[e>>2]|0;h=g;do if((d|0)==(g|0)){i=a+4|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(j>>>0>k>>>0){m=j;n=((m-l>>2)+1|0)/-2|0;o=j+(n<<2)|0;p=d-m|0;m=p>>2;if(!m)q=j;else{im(o|0,j|0,p|0)|0;q=f[i>>2]|0}p=o+(m<<2)|0;f[c>>2]=p;f[i>>2]=q+(n<<2);r=p;break}p=h-l>>1;l=(p|0)==0?1:p;if(l>>>0>1073741823){p=ra(8)|0;Oo(p,16035);f[p>>2]=7256;va(p|0,1112,110)}p=ln(l<<2)|0;n=p;m=p+(l>>>2<<2)|0;o=m;s=p+(l<<2)|0;if((j|0)==(d|0)){t=o;u=k}else{k=m;m=o;l=j;do{f[k>>2]=f[l>>2];k=m+4|0;m=k;l=l+4|0}while((l|0)!=(d|0));t=m;u=f[a>>2]|0}f[a>>2]=n;f[i>>2]=o;f[c>>2]=t;f[e>>2]=s;if(!u)r=t;else{Oq(u);r=f[c>>2]|0}}else r=d;while(0);f[r>>2]=f[b>>2];f[c>>2]=(f[c>>2]|0)+4;return}function Bg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;h=a+12|0;i=a+4|0;j=f[i>>2]|0;if((j|0)==(f[a+8>>2]|0)){Ri(a,h);k=f[i>>2]|0}else{f[j>>2]=f[h>>2];l=j+4|0;f[i>>2]=l;k=l}l=f[a>>2]|0;f[g>>2]=k-l;k=b+16|0;j=k;m=f[j+4>>2]|0;if(!((m|0)>0|(m|0)==0&(f[j>>2]|0)>>>0>0)){f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;j=f[a>>2]|0;m=f[g>>2]|0;g=k;k=f[g+4>>2]|0;if((k|0)>0|(k|0)==0&(f[g>>2]|0)>>>0>0){n=j;o=e}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,j,j+m|0)|0;n=f[a>>2]|0;o=e}}else{n=l;o=e}e=f[i>>2]|0;if((e|0)==(n|0)){f[h>>2]=0;p=a+16|0;f[p>>2]=0;u=c;return}f[i>>2]=e+(~((e+-4-n|0)>>>2)<<2);f[h>>2]=0;p=a+16|0;f[p>>2]=0;u=c;return}function Cg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=c;g=d-e|0;h=a+8|0;i=f[h>>2]|0;j=f[a>>2]|0;k=j;if(g>>>0>(i-j|0)>>>0){if(!j)l=i;else{i=a+4|0;if((f[i>>2]|0)!=(k|0))f[i>>2]=k;Oq(k);f[h>>2]=0;f[i>>2]=0;f[a>>2]=0;l=0}if((g|0)<0)aq(a);i=l<<1;m=l>>>0<1073741823?(i>>>0>>0?g:i):2147483647;if((m|0)<0)aq(a);i=ln(m)|0;l=a+4|0;f[l>>2]=i;f[a>>2]=i;f[h>>2]=i+m;if((c|0)==(d|0))return;else{n=c;o=i}do{b[o>>0]=b[n>>0]|0;n=n+1|0;o=(f[l>>2]|0)+1|0;f[l>>2]=o}while((n|0)!=(d|0));return}else{n=a+4|0;a=(f[n>>2]|0)-j|0;j=g>>>0>a>>>0;g=c+a|0;a=j?g:d;o=a-e|0;if(o|0)im(k|0,c|0,o|0)|0;c=k+o|0;if(!j){if((f[n>>2]|0)==(c|0))return;f[n>>2]=c;return}if((a|0)==(d|0))return;a=g;g=f[n>>2]|0;do{b[g>>0]=b[a>>0]|0;a=a+1|0;g=(f[n>>2]|0)+1|0;f[n>>2]=g}while((a|0)!=(d|0));return}}function Dg(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+16|0;d=c;if(b[a+352>>0]|0){u=c;return 1}e=a+8|0;g=f[e>>2]|0;h=(f[g+12>>2]|0)-(f[g+8>>2]|0)|0;g=h>>2;i=a+172|0;Gi(i,g+-1|0);if(!((g|0)!=1&(h|0)>0)){u=c;return 1}h=a+12|0;a=0;j=0;while(1){k=f[(f[(f[e>>2]|0)+8>>2]|0)+(a<<2)>>2]|0;if(!(f[k+56>>2]|0))l=j;else{m=f[i>>2]|0;f[m+(j*136|0)>>2]=a;n=f[m+(j*136|0)+104>>2]|0;o=m+(j*136|0)+108|0;p=f[o>>2]|0;if((p|0)!=(n|0))f[o>>2]=p+(~((p+-4-n|0)>>>2)<<2);n=f[h>>2]|0;gk(m+(j*136|0)+104|0,(f[n+4>>2]|0)-(f[n>>2]|0)>>2);n=(f[i>>2]|0)+(j*136|0)+116|0;m=f[h>>2]|0;p=(f[m+4>>2]|0)-(f[m>>2]|0)>>2;f[d>>2]=-1;hg(n,p,d);p=f[i>>2]|0;f[p+(j*136|0)+128>>2]=0;Gc(p+(j*136|0)+4|0,f[e>>2]|0,f[h>>2]|0,k)|0;l=j+1|0}a=a+1|0;if((a|0)>=(g|0))break;else j=l}u=c;return 1}function Eg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(d-g>>2>>>0>=b>>>0){sj(g|0,0,b<<2|0)|0;f[e>>2]=g+(b<<2);return}i=f[a>>2]|0;j=g-i>>2;g=j+b|0;k=i;if(g>>>0>1073741823)aq(a);l=d-i|0;d=l>>1;m=l>>2>>>0<536870911?(d>>>0>>0?g:d):1073741823;do if(m)if(m>>>0>1073741823){d=ra(8)|0;Oo(d,16035);f[d>>2]=7256;va(d|0,1112,110)}else{n=ln(m<<2)|0;break}else n=0;while(0);d=n+(j<<2)|0;sj(d|0,0,b<<2|0)|0;b=d;j=n+(m<<2)|0;m=n+(g<<2)|0;if((h|0)==(k|0)){o=b;p=i;q=h}else{i=h;h=b;b=d;do{i=i+-4|0;d=f[i>>2]|0;f[i>>2]=0;f[b+-4>>2]=d;b=h+-4|0;h=b}while((i|0)!=(k|0));o=h;p=f[a>>2]|0;q=f[e>>2]|0}f[a>>2]=o;f[e>>2]=m;f[c>>2]=j;j=p;if((q|0)!=(j|0)){c=q;do{c=c+-4|0;q=f[c>>2]|0;f[c>>2]=0;if(q|0)Va[f[(f[q>>2]|0)+4>>2]&127](q)}while((c|0)!=(j|0))}if(!p)return;Oq(p);return}function Fg(a,c,d,e,g,h){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=$(h);var i=0,j=0,k=0,l=0,m=0,n=0;i=u;u=u+16|0;j=i;k=i+4|0;f[j>>2]=c;c=ln(32)|0;f[k>>2]=c;f[k+8>>2]=-2147483616;f[k+4>>2]=17;l=c;m=14495;n=l+17|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[c+17>>0]=0;Xj(Hd(a,j)|0,k,d);if((b[k+11>>0]|0)<0)Oq(f[k>>2]|0);d=ln(32)|0;f[k>>2]=d;f[k+8>>2]=-2147483616;f[k+4>>2]=19;l=d;m=14438;n=l+19|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[d+19>>0]=0;si(Hd(a,j)|0,k,g,e);if((b[k+11>>0]|0)<0)Oq(f[k>>2]|0);e=ln(32)|0;f[k>>2]=e;f[k+8>>2]=-2147483616;f[k+4>>2]=18;l=e;m=14458;n=l+18|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[e+18>>0]=0;Tj(Hd(a,j)|0,k,h);if((b[k+11>>0]|0)>=0){u=i;return}Oq(f[k>>2]|0);u=i;return}function Gg(a){a=a|0;tk(a);tk(a+32|0);tk(a+64|0);tk(a+96|0);tk(a+128|0);tk(a+160|0);tk(a+192|0);tk(a+224|0);tk(a+256|0);tk(a+288|0);tk(a+320|0);tk(a+352|0);tk(a+384|0);tk(a+416|0);tk(a+448|0);tk(a+480|0);tk(a+512|0);tk(a+544|0);tk(a+576|0);tk(a+608|0);tk(a+640|0);tk(a+672|0);tk(a+704|0);tk(a+736|0);tk(a+768|0);tk(a+800|0);tk(a+832|0);tk(a+864|0);tk(a+896|0);tk(a+928|0);tk(a+960|0);tk(a+992|0);tk(a+1024|0);return}function Hg(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;c=u;u=u+16|0;d=c;if(b[a+288>>0]|0){u=c;return 1}e=a+8|0;g=f[e>>2]|0;h=(f[g+12>>2]|0)-(f[g+8>>2]|0)|0;g=h>>2;i=a+172|0;Gi(i,g+-1|0);if(!((g|0)!=1&(h|0)>0)){u=c;return 1}h=a+12|0;a=0;j=0;while(1){k=f[(f[(f[e>>2]|0)+8>>2]|0)+(a<<2)>>2]|0;if(!(f[k+56>>2]|0))l=j;else{m=f[i>>2]|0;f[m+(j*136|0)>>2]=a;n=f[m+(j*136|0)+104>>2]|0;o=m+(j*136|0)+108|0;p=f[o>>2]|0;if((p|0)!=(n|0))f[o>>2]=p+(~((p+-4-n|0)>>>2)<<2);n=f[h>>2]|0;gk(m+(j*136|0)+104|0,(f[n+4>>2]|0)-(f[n>>2]|0)>>2);n=(f[i>>2]|0)+(j*136|0)+116|0;m=f[h>>2]|0;p=(f[m+4>>2]|0)-(f[m>>2]|0)>>2;f[d>>2]=-1;hg(n,p,d);p=f[i>>2]|0;f[p+(j*136|0)+128>>2]=0;Gc(p+(j*136|0)+4|0,f[e>>2]|0,f[h>>2]|0,k)|0;l=j+1|0}a=a+1|0;if((a|0)>=(g|0))break;else j=l}u=c;return 1}function Ig(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=c;e=b;g=d-e|0;h=g>>2;i=a+8|0;j=f[i>>2]|0;k=f[a>>2]|0;l=k;if(h>>>0<=j-k>>2>>>0){m=a+4|0;n=(f[m>>2]|0)-k>>2;o=h>>>0>n>>>0;p=o?b+(n<<2)|0:c;c=p;n=c-e|0;e=n>>2;if(e|0)im(k|0,b|0,n|0)|0;n=l+(e<<2)|0;if(o){o=d-c|0;if((o|0)<=0)return;kh(f[m>>2]|0,p|0,o|0)|0;f[m>>2]=(f[m>>2]|0)+(o>>>2<<2);return}else{o=f[m>>2]|0;if((o|0)==(n|0))return;f[m>>2]=o+(~((o+-4-n|0)>>>2)<<2);return}}n=k;if(!k)q=j;else{j=a+4|0;o=f[j>>2]|0;if((o|0)!=(l|0))f[j>>2]=o+(~((o+-4-k|0)>>>2)<<2);Oq(n);f[i>>2]=0;f[j>>2]=0;f[a>>2]=0;q=0}if(h>>>0>1073741823)aq(a);j=q>>1;n=q>>2>>>0<536870911?(j>>>0>>0?h:j):1073741823;if(n>>>0>1073741823)aq(a);j=ln(n<<2)|0;h=a+4|0;f[h>>2]=j;f[a>>2]=j;f[i>>2]=j+(n<<2);if((g|0)<=0)return;kh(j|0,b|0,g|0)|0;f[h>>2]=j+(g>>>2<<2);return}function Jg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0.0,r=0.0,s=0.0,t=0,v=0.0;e=u;u=u+16|0;g=e;h=c+1|0;f[g>>2]=0;i=g+4|0;f[i>>2]=0;f[g+8>>2]=0;do if(h)if(h>>>0>1073741823)aq(g);else{j=ln(h<<2)|0;f[g>>2]=j;k=j+(h<<2)|0;f[g+8>>2]=k;sj(j|0,0,(c<<2)+4|0)|0;f[i>>2]=k;l=j;m=k;n=j;break}else{l=0;m=0;n=0}while(0);if((b|0)>0){g=0;do{j=l+(f[a+(g<<2)>>2]<<2)|0;f[j>>2]=(f[j>>2]|0)+1;g=g+1|0}while((g|0)!=(b|0))}o=+(b|0);if((c|0)<0){p=0;q=0.0}else{c=0;r=0.0;b=0;while(1){g=f[l+(b<<2)>>2]|0;s=+(g|0);if((g|0)>0){t=c+1|0;v=r+ +Zg(s/o)*s}else{t=c;v=r}b=b+1|0;if((b|0)==(h|0)){p=t;q=v;break}else{c=t;r=v}}}if(d|0)f[d>>2]=p;v=-q;p=~~v>>>0;d=+K(v)>=1.0?(v>0.0?~~+Y(+J(v/4294967296.0),4294967295.0)>>>0:~~+W((v-+(~~v>>>0))/4294967296.0)>>>0):0;if(!l){I=d;u=e;return p|0}if((m|0)!=(l|0))f[i>>2]=m+(~((m+-4-l|0)>>>2)<<2);Oq(n);I=d;u=e;return p|0}function Kg(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=u;u=u+16|0;g=e+4|0;h=e;i=ln(32)|0;f[a>>2]=i;f[a+4>>2]=c+4;c=a+8|0;b[c>>0]=0;f[i+16>>2]=f[d>>2];a=i+20|0;f[i+24>>2]=0;f[i+28>>2]=0;j=i+24|0;f[a>>2]=j;i=f[d+4>>2]|0;k=d+8|0;if((i|0)==(k|0)){b[c>>0]=1;u=e;return}d=j;j=i;while(1){i=j+16|0;f[h>>2]=d;f[g>>2]=f[h>>2];ph(a,g,i,i)|0;i=f[j+4>>2]|0;if(!i){l=j+8|0;m=f[l>>2]|0;if((f[m>>2]|0)==(j|0))n=m;else{m=l;do{l=f[m>>2]|0;m=l+8|0;o=f[m>>2]|0}while((f[o>>2]|0)!=(l|0));n=o}}else{m=i;while(1){o=f[m>>2]|0;if(!o)break;else m=o}n=m}if((n|0)==(k|0))break;else j=n}b[c>>0]=1;u=e;return}function Lg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d;f[e>>2]=b;g=a+8|0;if(((f[a+12>>2]|0)-(f[g>>2]|0)>>2|0)<=(b|0))Bh(g,b+1|0);h=f[(f[c>>2]|0)+56>>2]|0;do if((h|0)<5){i=a+20+(h*12|0)+4|0;j=f[i>>2]|0;if((j|0)==(f[a+20+(h*12|0)+8>>2]|0)){Ri(a+20+(h*12|0)|0,e);break}else{f[j>>2]=b;f[i>>2]=j+4;break}}while(0);b=f[c>>2]|0;h=f[e>>2]|0;f[b+60>>2]=h;e=(f[g>>2]|0)+(h<<2)|0;f[c>>2]=0;c=f[e>>2]|0;f[e>>2]=b;if(!c){u=d;return}b=c+88|0;e=f[b>>2]|0;f[b>>2]=0;if(e|0){b=f[e+8>>2]|0;if(b|0){h=e+12|0;if((f[h>>2]|0)!=(b|0))f[h>>2]=b;Oq(b)}Oq(e)}e=f[c+68>>2]|0;if(e|0){b=c+72|0;h=f[b>>2]|0;if((h|0)!=(e|0))f[b>>2]=h+(~((h+-4-e|0)>>>2)<<2);Oq(e)}e=c+64|0;h=f[e>>2]|0;f[e>>2]=0;if(h|0){e=f[h>>2]|0;if(e|0){b=h+4|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;Oq(e)}Oq(h)}Oq(c);u=d;return}function Mg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=f[e>>2]|0;gk(f[a+4>>2]|0,(f[g+56>>2]|0)-(f[g+52>>2]|0)>>2);g=a+84|0;a=f[g>>2]|0;if(!a){h=f[(f[e>>2]|0)+64>>2]|0;i=(f[h+4>>2]|0)-(f[h>>2]|0)>>2;h=(i>>>0)/3|0;if(i>>>0<=2){u=b;return 1}i=0;do{f[d>>2]=i*3;f[c>>2]=f[d>>2];Zb(e,c);i=i+1|0}while((i|0)<(h|0));u=b;return 1}else{h=f[a>>2]|0;if((f[a+4>>2]|0)==(h|0)){u=b;return 1}a=0;i=h;do{f[d>>2]=f[i+(a<<2)>>2];f[c>>2]=f[d>>2];Zb(e,c);a=a+1|0;h=f[g>>2]|0;i=f[h>>2]|0}while(a>>>0<(f[h+4>>2]|0)-i>>2>>>0);u=b;return 1}return 0}function Ng(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0;d=u;u=u+48|0;e=d+16|0;g=d;h=d+32|0;i=a+28|0;j=f[i>>2]|0;f[h>>2]=j;k=a+20|0;l=(f[k>>2]|0)-j|0;f[h+4>>2]=l;f[h+8>>2]=b;f[h+12>>2]=c;b=l+c|0;l=a+60|0;f[g>>2]=f[l>>2];f[g+4>>2]=h;f[g+8>>2]=2;j=to(Aa(146,g|0)|0)|0;a:do if((b|0)!=(j|0)){g=2;m=b;n=h;o=j;while(1){if((o|0)<0)break;m=m-o|0;p=f[n+4>>2]|0;q=o>>>0>p>>>0;r=q?n+8|0:n;s=g+(q<<31>>31)|0;t=o-(q?p:0)|0;f[r>>2]=(f[r>>2]|0)+t;p=r+4|0;f[p>>2]=(f[p>>2]|0)-t;f[e>>2]=f[l>>2];f[e+4>>2]=r;f[e+8>>2]=s;o=to(Aa(146,e|0)|0)|0;if((m|0)==(o|0)){v=3;break a}else{g=s;n=r}}f[a+16>>2]=0;f[i>>2]=0;f[k>>2]=0;f[a>>2]=f[a>>2]|32;if((g|0)==2)w=0;else w=c-(f[n+4>>2]|0)|0}else v=3;while(0);if((v|0)==3){v=f[a+44>>2]|0;f[a+16>>2]=v+(f[a+48>>2]|0);a=v;f[i>>2]=a;f[k>>2]=a;w=c}u=d;return w|0}function Og(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=6192;b=f[a+68>>2]|0;if(b|0){c=a+72|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+56>>2]|0;if(b|0){d=a+60|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+44>>2]|0;if(b|0){c=a+48|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+32>>2]|0;if(b|0){d=a+36|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+20>>2]|0;if(b|0){c=a+24|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}hi(a+8|0);b=a+4|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;b=a+40|0;d=f[b>>2]|0;if(d|0){c=a+44|0;e=f[c>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[c>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0){bj(i);Oq(i)}h=f[c>>2]|0}while((h|0)!=(d|0));g=f[b>>2]|0}Oq(g)}bj(a);Oq(a);return}function Pg(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a+12|0;d=f[a>>2]|0;e=a+8|0;g=f[e>>2]|0;h=(g|0)==-1;if(!(b[c>>0]|0)){do if(((!h?(i=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(i|0)!=-1):0)?(f[(f[d>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)==0:0)?(j=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(i<<2)>>2]|0,(j|0)!=-1):0)if(!((j>>>0)%3|0)){k=j+2|0;break}else{k=j+-1|0;break}else k=-1;while(0);f[e>>2]=k;return}k=g+1|0;if(((!h?(h=((k>>>0)%3|0|0)==0?g+-2|0:k,(h|0)!=-1):0)?(f[(f[d>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)|0)==0:0)?(k=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(h<<2)>>2]|0,h=k+1|0,(k|0)!=-1):0){g=((h>>>0)%3|0|0)==0?k+-2|0:h;f[e>>2]=g;if((g|0)!=-1){if((g|0)!=(f[a+4>>2]|0))return;f[e>>2]=-1;return}}else f[e>>2]=-1;g=f[a+4>>2]|0;do if((((g|0)!=-1?(a=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(a|0)!=-1):0)?(f[(f[d>>2]|0)+(a>>>5<<2)>>2]&1<<(a&31)|0)==0:0)?(h=f[(f[(f[d+64>>2]|0)+12>>2]|0)+(a<<2)>>2]|0,(h|0)!=-1):0)if(!((h>>>0)%3|0)){l=h+2|0;break}else{l=h+-1|0;break}else l=-1;while(0);f[e>>2]=l;b[c>>0]=0;return}function Qg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d>>2;g=e+1|0;if(g>>>0>1073741823)aq(a);h=a+8|0;i=(f[h>>2]|0)-d|0;d=i>>1;j=i>>2>>>0<536870911?(d>>>0>>0?g:d):1073741823;do if(j)if(j>>>0>1073741823){d=ra(8)|0;Oo(d,16035);f[d>>2]=7256;va(d|0,1112,110)}else{k=ln(j<<2)|0;break}else k=0;while(0);d=k+(e<<2)|0;e=d;g=k+(j<<2)|0;j=f[b>>2]|0;f[b>>2]=0;f[d>>2]=j;j=d+4|0;b=f[a>>2]|0;k=f[c>>2]|0;if((k|0)==(b|0)){l=e;m=b;n=b}else{i=k;k=e;e=d;do{i=i+-4|0;d=f[i>>2]|0;f[i>>2]=0;f[e+-4>>2]=d;e=k+-4|0;k=e}while((i|0)!=(b|0));l=k;m=f[a>>2]|0;n=f[c>>2]|0}f[a>>2]=l;f[c>>2]=j;f[h>>2]=g;g=m;if((n|0)!=(g|0)){h=n;do{h=h+-4|0;n=f[h>>2]|0;f[h>>2]=0;if(n|0)Va[f[(f[n>>2]|0)+4>>2]&127](n)}while((h|0)!=(g|0))}if(!m)return;Oq(m);return}function Rg(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=a+4|0;a=f[d>>2]|0;do if(a|0){e=b[c+11>>0]|0;g=e<<24>>24<0;h=g?f[c+4>>2]|0:e&255;e=g?f[c>>2]|0:c;g=d;i=a;a:while(1){j=i;while(1){k=j+16|0;l=b[k+11>>0]|0;m=l<<24>>24<0;n=m?f[j+20>>2]|0:l&255;l=h>>>0>>0?h:n;if((l|0)!=0?(o=Vk(m?f[k>>2]|0:k,e,l)|0,(o|0)!=0):0){if((o|0)>=0)break}else p=6;if((p|0)==6?(p=0,n>>>0>=h>>>0):0)break;n=f[j+4>>2]|0;if(!n){q=g;break a}else j=n}i=f[j>>2]|0;if(!i){q=j;break}else g=j}if((q|0)!=(d|0)){g=q+16|0;i=b[g+11>>0]|0;n=i<<24>>24<0;o=n?f[q+20>>2]|0:i&255;i=o>>>0>>0?o:h;if(i|0?(l=Vk(e,n?f[g>>2]|0:g,i)|0,l|0):0){if((l|0)<0)break;else r=q;return r|0}if(h>>>0>=o>>>0){r=q;return r|0}}}while(0);r=d;return r|0}function Sg(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=a+8|0;f[c>>2]=f[b>>2];fg(a+12|0,b+4|0)|0;d=a+44|0;e=b+36|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];if((c|0)==(b|0)){f[a+96>>2]=f[b+88>>2];return}else{ng(a+60|0,f[b+52>>2]|0,f[b+56>>2]|0);ng(a+72|0,f[b+64>>2]|0,f[b+68>>2]|0);ng(a+84|0,f[b+76>>2]|0,f[b+80>>2]|0);f[a+96>>2]=f[b+88>>2];Ig(a+100|0,f[b+92>>2]|0,f[b+96>>2]|0);return}}function Tg(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;if(((e-h|0)/12|0)>>>0>=b>>>0){i=b;j=h;do{f[j>>2]=f[c>>2];f[j+4>>2]=f[c+4>>2];f[j+8>>2]=f[c+8>>2];j=(f[g>>2]|0)+12|0;f[g>>2]=j;i=i+-1|0}while((i|0)!=0);return}i=f[a>>2]|0;j=(h-i|0)/12|0;h=j+b|0;if(h>>>0>357913941)aq(a);k=(e-i|0)/12|0;i=k<<1;e=k>>>0<178956970?(i>>>0>>0?h:i):357913941;do if(e)if(e>>>0>357913941){i=ra(8)|0;Oo(i,16035);f[i>>2]=7256;va(i|0,1112,110)}else{l=ln(e*12|0)|0;break}else l=0;while(0);i=l+(j*12|0)|0;j=l+(e*12|0)|0;e=b;b=i;l=i;do{f[b>>2]=f[c>>2];f[b+4>>2]=f[c+4>>2];f[b+8>>2]=f[c+8>>2];b=l+12|0;l=b;e=e+-1|0}while((e|0)!=0);e=f[a>>2]|0;b=(f[g>>2]|0)-e|0;c=i+(((b|0)/-12|0)*12|0)|0;if((b|0)>0)kh(c|0,e|0,b|0)|0;f[a>>2]=c;f[g>>2]=l;f[d>>2]=j;if(!e)return;Oq(e);return}function Ug(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d>>2;g=e+1|0;if(g>>>0>1073741823)aq(a);h=a+8|0;i=(f[h>>2]|0)-d|0;d=i>>1;j=i>>2>>>0<536870911?(d>>>0>>0?g:d):1073741823;do if(j)if(j>>>0>1073741823){d=ra(8)|0;Oo(d,16035);f[d>>2]=7256;va(d|0,1112,110)}else{k=ln(j<<2)|0;break}else k=0;while(0);d=k+(e<<2)|0;e=d;g=k+(j<<2)|0;j=f[b>>2]|0;f[b>>2]=0;f[d>>2]=j;j=d+4|0;b=f[a>>2]|0;k=f[c>>2]|0;if((k|0)==(b|0)){l=e;m=b;n=b}else{i=k;k=e;e=d;do{i=i+-4|0;d=f[i>>2]|0;f[i>>2]=0;f[e+-4>>2]=d;e=k+-4|0;k=e}while((i|0)!=(b|0));l=k;m=f[a>>2]|0;n=f[c>>2]|0}f[a>>2]=l;f[c>>2]=j;f[h>>2]=g;g=m;if((n|0)!=(g|0)){h=n;do{h=h+-4|0;n=f[h>>2]|0;f[h>>2]=0;if(n|0){bj(n);Oq(n)}}while((h|0)!=(g|0))}if(!m)return;Oq(m);return}function Vg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=f[b>>2]|0;g=f[a>>2]|0;h=f[d>>2]|0;d=f[h>>2]|0;i=(f[h+4>>2]|0)-d>>3;if(i>>>0<=e>>>0)aq(h);j=d;if(i>>>0<=g>>>0)aq(h);d=f[j+(e<<3)>>2]|0;k=f[c>>2]|0;if(i>>>0<=k>>>0)aq(h);l=j+(g<<3)|0;m=(f[j+(k<<3)>>2]|0)>>>0>>0;if(d>>>0<(f[l>>2]|0)>>>0){if(m){f[a>>2]=k;f[c>>2]=g;n=1;return n|0}f[a>>2]=e;f[b>>2]=g;d=f[c>>2]|0;if(i>>>0<=d>>>0)aq(h);if((f[j+(d<<3)>>2]|0)>>>0>=(f[l>>2]|0)>>>0){n=1;return n|0}f[b>>2]=d;f[c>>2]=g;n=2;return n|0}if(!m){n=0;return n|0}f[b>>2]=k;f[c>>2]=e;e=f[b>>2]|0;c=f[a>>2]|0;if(i>>>0<=e>>>0)aq(h);if(i>>>0<=c>>>0)aq(h);if((f[j+(e<<3)>>2]|0)>>>0>=(f[j+(c<<3)>>2]|0)>>>0){n=1;return n|0}f[a>>2]=e;f[b>>2]=c;n=2;return n|0}function Wg(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=u;u=u+16|0;c=b+4|0;d=b;e=a+8|0;g=f[e>>2]|0;gk(f[a+4>>2]|0,(f[g+28>>2]|0)-(f[g+24>>2]|0)>>2);g=a+84|0;a=f[g>>2]|0;if(!a){h=f[e>>2]|0;i=(f[h+4>>2]|0)-(f[h>>2]|0)>>2;h=(i>>>0)/3|0;if(i>>>0<=2){u=b;return 1}i=0;do{f[d>>2]=i*3;f[c>>2]=f[d>>2];dc(e,c);i=i+1|0}while((i|0)<(h|0));u=b;return 1}else{h=f[a>>2]|0;if((f[a+4>>2]|0)==(h|0)){u=b;return 1}a=0;i=h;do{f[d>>2]=f[i+(a<<2)>>2];f[c>>2]=f[d>>2];dc(e,c);a=a+1|0;h=f[g>>2]|0;i=f[h>>2]|0}while(a>>>0<(f[h+4>>2]|0)-i>>2>>>0);u=b;return 1}return 0}function Xg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;a=u;u=u+16|0;e=a;if(!b){g=0;u=a;return g|0}h=b+96|0;i=b+100|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;b=f[i>>2]|0;j=f[h>>2]|0;k=(b-j|0)/12|0;l=j;j=b;if(k>>>0>=c>>>0){if(k>>>0>c>>>0?(b=l+(c*12|0)|0,(b|0)!=(j|0)):0)f[i>>2]=j+(~(((j+-12-b|0)>>>0)/12|0)*12|0);if(!c){g=1;u=a;return g|0}}else Tg(h,c-k|0,e);k=0;b=f[h>>2]|0;while(1){j=k*3|0;l=f[d+(j<<2)>>2]|0;m=f[d+(j+1<<2)>>2]|0;n=f[d+(j+2<<2)>>2]|0;j=((f[i>>2]|0)-b|0)/12|0;o=k;k=k+1|0;if(o>>>0>>0){p=b;q=b}else{f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;Tg(h,k-j|0,e);j=f[h>>2]|0;p=j;q=j}f[p+(o*12|0)>>2]=l;f[p+(o*12|0)+4>>2]=m;f[p+(o*12|0)+8>>2]=n;if((k|0)==(c|0)){g=1;break}else b=q}u=a;return g|0}function Yg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0;e=u;u=u+80|0;g=e+36|0;h=e;ao(g,c);Ke(h,b,c);Ph(g,h);Ej(h+24|0,f[h+28>>2]|0);Oj(h+12|0,f[h+16>>2]|0);Ej(h,f[h+4>>2]|0);cj(a,g,d);Ej(g+24|0,f[g+28>>2]|0);Oj(g+12|0,f[g+16>>2]|0);Ej(g,f[g+4>>2]|0);u=e;return}function Zg(a){a=+a;var b=0,c=0,d=0,e=0.0,g=0,h=0,i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,q=0.0,r=0.0,t=0.0;p[s>>3]=a;b=f[s>>2]|0;c=f[s+4>>2]|0;d=(c|0)<0;do if(d|c>>>0<1048576){if((b|0)==0&(c&2147483647|0)==0){e=-1.0/(a*a);break}if(d){e=(a-a)/0.0;break}else{p[s>>3]=a*18014398509481984.0;g=f[s+4>>2]|0;h=-1077;i=g;j=f[s>>2]|0;k=g;l=9;break}}else if(c>>>0<=2146435071)if((b|0)==0&0==0&(c|0)==1072693248)e=0.0;else{h=-1023;i=c;j=b;k=c;l=9}else e=a;while(0);if((l|0)==9){l=i+614242|0;f[s>>2]=j;f[s+4>>2]=(l&1048575)+1072079006;a=+p[s>>3]+-1.0;m=a*a*.5;n=a/(a+2.0);o=n*n;q=o*o;p[s>>3]=a-m;j=f[s+4>>2]|0;f[s>>2]=0;f[s+4>>2]=j;r=+p[s>>3];t=a-r-m+n*(m+(q*(q*(q*.15313837699209373+.22222198432149784)+.3999999999940942)+o*(q*(q*(q*.14798198605116586+.1818357216161805)+.2857142874366239)+.6666666666666735)));q=r*1.4426950407214463;o=+(h+(l>>>20)|0);m=q+o;e=m+(q+(o-m)+(t*1.4426950407214463+(t+r)*1.6751713164886512e-10))}return +e}function _g(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=u;u=u+16|0;e=d;g=ln(32)|0;f[e>>2]=g;f[e+8>>2]=-2147483616;f[e+4>>2]=17;h=g;i=14390;j=h+17|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[g+17>>0]=0;g=c+16|0;i=f[g>>2]|0;if(i){h=g;j=i;a:while(1){i=j;while(1){if((f[i+16>>2]|0)>=(a|0))break;k=f[i+4>>2]|0;if(!k){l=h;break a}else i=k}j=f[i>>2]|0;if(!j){l=i;break}else h=i}if(((l|0)!=(g|0)?(f[l+16>>2]|0)<=(a|0):0)?(a=l+20|0,(Jh(a,e)|0)!=0):0)m=a;else n=10}else n=10;if((n|0)==10)m=c;c=Hk(m,e,-1)|0;if((b[e+11>>0]|0)>=0){o=(c|0)==-1;p=c>>>0>6;q=p?-2:c;r=o?-1:q;u=d;return r|0}Oq(f[e>>2]|0);o=(c|0)==-1;p=c>>>0>6;q=p?-2:c;r=o?-1:q;u=d;return r|0}function $g(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;d=u;u=u+16|0;e=d;g=f[c>>2]|0;f[c>>2]=0;f[e>>2]=g;Lg(a,b,e);g=f[e>>2]|0;f[e>>2]=0;if(g|0){e=g+88|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0){e=f[c+8>>2]|0;if(e|0){h=c+12|0;if((f[h>>2]|0)!=(e|0))f[h>>2]=e;Oq(e)}Oq(c)}c=f[g+68>>2]|0;if(c|0){e=g+72|0;h=f[e>>2]|0;if((h|0)!=(c|0))f[e>>2]=h+(~((h+-4-c|0)>>>2)<<2);Oq(c)}c=g+64|0;h=f[c>>2]|0;f[c>>2]=0;if(h|0){c=f[h>>2]|0;if(c|0){e=h+4|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;Oq(c)}Oq(h)}Oq(g)}g=a+84|0;h=a+88|0;a=f[h>>2]|0;c=f[g>>2]|0;e=a-c>>2;if((e|0)>(b|0)){u=d;return}i=b+1|0;b=a;if(i>>>0>e>>>0){Fh(g,i-e|0);u=d;return}if(i>>>0>=e>>>0){u=d;return}e=c+(i<<2)|0;if((e|0)==(b|0)){u=d;return}f[h>>2]=b+(~((b+-4-e|0)>>>2)<<2);u=d;return}function ah(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;g=a+4|0;f[g>>2]=c;f[a+8>>2]=f[c+52>>2];h=f[a+184>>2]|0;i=a+188|0;j=f[i>>2]|0;if((j|0)!=(h|0))f[i>>2]=j+(~((j+-4-h|0)>>>2)<<2);h=f[c+48>>2]|0;c=ln(32)|0;f[e>>2]=c;f[e+8>>2]=-2147483616;f[e+4>>2]=19;j=c;i=15351;k=j+19|0;do{b[j>>0]=b[i>>0]|0;j=j+1|0;i=i+1|0}while((j|0)<(k|0));b[c+19>>0]=0;c=(Jh(h,e)|0)==0;if((b[e+11>>0]|0)<0)Oq(f[e>>2]|0);h=f[(f[g>>2]|0)+48>>2]|0;if(c){c=(mi(h)|0)>5&1;b[a+352>>0]=c;u=d;return 1}c=ln(32)|0;f[e>>2]=c;f[e+8>>2]=-2147483616;f[e+4>>2]=19;j=c;i=15351;k=j+19|0;do{b[j>>0]=b[i>>0]|0;j=j+1|0;i=i+1|0}while((j|0)<(k|0));b[c+19>>0]=0;c=(Yj(h,e,0)|0)&1;b[a+352>>0]=c;if((b[e+11>>0]|0)<0)Oq(f[e>>2]|0);u=d;return 1}function bh(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0;c=a+108|0;d=(f[a+112>>2]|0)-(f[c>>2]|0)|0;e=(d|0)/12|0;g=a+4|0;ci(e,f[(f[g>>2]|0)+44>>2]|0)|0;if(!d)return 1;d=0;a=0;while(1){i=f[c>>2]|0;j=i+(d*12|0)+4|0;ci((f[j>>2]|0)-a|0,f[(f[g>>2]|0)+44>>2]|0)|0;ci((f[j>>2]|0)-(f[i+(d*12|0)>>2]|0)|0,f[(f[g>>2]|0)+44>>2]|0)|0;d=d+1|0;if(d>>>0>=e>>>0)break;else a=f[j>>2]|0}zi(f[(f[g>>2]|0)+44>>2]|0,e,0,0)|0;a=0;do{d=f[(f[g>>2]|0)+44>>2]|0;j=d+16|0;i=f[j+4>>2]|0;if((i|0)>0|(i|0)==0&(f[j>>2]|0)>>>0>0){j=f[d+12>>2]|0;d=j+4|0;i=f[d>>2]|0;k=b[(f[c>>2]|0)+(a*12|0)+8>>0]&1;l=i>>>3;m=i&7;i=(f[j>>2]|0)+l|0;b[i>>0]=(1<>0]|0);i=(f[j>>2]|0)+l|0;b[i>>0]=k<>0]|0);f[d>>2]=(f[d>>2]|0)+1}a=a+1|0}while(a>>>0>>0);eg(f[(f[g>>2]|0)+44>>2]|0);return 1}function ch(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0;e=u;u=u+80|0;g=e+36|0;h=e;io(g,c);Ke(h,b,c);Ph(g,h);Ej(h+24|0,f[h+28>>2]|0);Oj(h+12|0,f[h+16>>2]|0);Ej(h,f[h+4>>2]|0);cj(a,g,d);Ej(g+24|0,f[g+28>>2]|0);Oj(g+12|0,f[g+16>>2]|0);Ej(g,f[g+4>>2]|0);u=e;return}function dh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;g=a+4|0;f[g>>2]=c;f[a+8>>2]=f[c+52>>2];h=f[a+184>>2]|0;i=a+188|0;j=f[i>>2]|0;if((j|0)!=(h|0))f[i>>2]=j+(~((j+-4-h|0)>>>2)<<2);h=f[c+48>>2]|0;c=ln(32)|0;f[e>>2]=c;f[e+8>>2]=-2147483616;f[e+4>>2]=19;j=c;i=15351;k=j+19|0;do{b[j>>0]=b[i>>0]|0;j=j+1|0;i=i+1|0}while((j|0)<(k|0));b[c+19>>0]=0;c=(Jh(h,e)|0)==0;if((b[e+11>>0]|0)<0)Oq(f[e>>2]|0);h=f[(f[g>>2]|0)+48>>2]|0;if(c){c=(mi(h)|0)>5&1;b[a+288>>0]=c;u=d;return 1}c=ln(32)|0;f[e>>2]=c;f[e+8>>2]=-2147483616;f[e+4>>2]=19;j=c;i=15351;k=j+19|0;do{b[j>>0]=b[i>>0]|0;j=j+1|0;i=i+1|0}while((j|0)<(k|0));b[c+19>>0]=0;c=(Yj(h,e,0)|0)&1;b[a+288>>0]=c;if((b[e+11>>0]|0)<0)Oq(f[e>>2]|0);u=d;return 1}function eh(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=u;u=u+32|0;h=g+16|0;i=g+8|0;j=g;k=d-e|0;d=a+8|0;if((k|0)>0){a=0-e|0;l=i+4|0;m=j+4|0;n=h+4|0;o=k;do{k=b+(o<<2)|0;p=k+(a<<2)|0;q=c+(o<<2)|0;r=f[k+4>>2]|0;s=f[p>>2]|0;t=f[p+4>>2]|0;f[i>>2]=f[k>>2];f[l>>2]=r;f[j>>2]=s;f[m>>2]=t;Od(h,d,i,j);f[q>>2]=f[h>>2];f[q+4>>2]=f[n>>2];o=o-e|0}while((o|0)>0)}o=e>>>0>1073741823?-1:e<<2;e=Lq(o)|0;sj(e|0,0,o|0)|0;o=f[b+4>>2]|0;n=f[e>>2]|0;m=f[e+4>>2]|0;f[i>>2]=f[b>>2];f[i+4>>2]=o;f[j>>2]=n;f[j+4>>2]=m;Od(h,d,i,j);f[c>>2]=f[h>>2];f[c+4>>2]=f[h+4>>2];Mq(e);u=g;return 1}function fh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+32|0;d=c+12|0;e=c;g=f[b+100>>2]|0;h=f[b+96>>2]|0;b=g-h|0;i=(b|0)/12|0;f[d>>2]=0;j=d+4|0;f[j>>2]=0;f[d+8>>2]=0;k=h;do if(b)if(i>>>0>357913941)aq(d);else{l=ln(b)|0;f[d>>2]=l;f[d+8>>2]=l+(i*12|0);sj(l|0,0,b|0)|0;f[j>>2]=l+b;m=l;break}else m=0;while(0);f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;if((g|0)!=(h|0)){h=e+4|0;g=e+8|0;b=0;do{l=k+(b*12|0)|0;f[e>>2]=f[l>>2];f[e+4>>2]=f[l+4>>2];f[e+8>>2]=f[l+8>>2];f[m+(b*12|0)>>2]=f[e>>2];f[m+(b*12|0)+4>>2]=f[h>>2];f[m+(b*12|0)+8>>2]=f[g>>2];b=b+1|0}while(b>>>0>>0)}Kj(a,d);a=f[d>>2]|0;if(!a){u=c;return}d=f[j>>2]|0;if((d|0)!=(a|0))f[j>>2]=d+(~(((d+-12-a|0)>>>0)/12|0)*12|0);Oq(a);u=c;return}function gh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;if(c>>>0>4294967279)aq(a);d=a+11|0;e=b[d>>0]|0;g=e<<24>>24<0;if(g){h=f[a+4>>2]|0;i=(f[a+8>>2]&2147483647)+-1|0}else{h=e&255;i=10}j=h>>>0>c>>>0?h:c;c=j>>>0<11;k=c?10:(j+16&-16)+-1|0;do if((k|0)!=(i|0)){do if(c){j=f[a>>2]|0;if(g){l=0;m=j;n=a;o=13}else{Fo(a,j,(e&255)+1|0)|0;Oq(j);o=16}}else{j=k+1|0;p=ln(j)|0;if(g){l=1;m=f[a>>2]|0;n=p;o=13;break}else{Fo(p,a,(e&255)+1|0)|0;q=p;r=j;s=a+4|0;o=15;break}}while(0);if((o|0)==13){j=a+4|0;Fo(n,m,(f[j>>2]|0)+1|0)|0;Oq(m);if(l){q=n;r=k+1|0;s=j;o=15}else o=16}if((o|0)==15){f[a+8>>2]=r|-2147483648;f[s>>2]=h;f[a>>2]=q;break}else if((o|0)==16){b[d>>0]=h;break}}while(0);return}function hh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=f[b>>2]|0;if((c|0)==-1){d=-1;return d|0}b=f[(f[a+24>>2]|0)+(c<<2)>>2]|0;if((b|0)==-1){d=0;return d|0}c=a+12|0;a=0;e=0;g=b;a:while(1){b:do if(e){h=a+1|0;i=(((g>>>0)%3|0|0)==0?2:-1)+g|0;if((i|0)==-1){d=h;j=15;break a}k=f[(f[c>>2]|0)+(i<<2)>>2]|0;if((k|0)==-1){d=h;j=15;break a}if(!((k>>>0)%3|0)){l=k+2|0;m=h;break}else{l=k+-1|0;m=h;break}}else{h=a;k=g;while(1){i=h+1|0;n=k+1|0;o=((n>>>0)%3|0|0)==0?k+-2|0:n;if((o|0)==-1){l=b;m=i;break b}n=f[(f[c>>2]|0)+(o<<2)>>2]|0;o=n+1|0;if((n|0)==-1){l=b;m=i;break b}k=((o>>>0)%3|0|0)==0?n+-2|0:o;if((k|0)==-1){l=b;m=i;break b}if((k|0)==(b|0)){d=i;j=15;break a}else h=i}}while(0);if((l|0)==-1){d=m;j=15;break}else{a=m;e=1;g=l}}if((j|0)==15)return d|0;return 0}function ih(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=a+8|0;Vg(a,a+4|0,d,c)|0;e=a+12|0;if((e|0)==(b|0))return;g=f[c>>2]|0;c=f[g>>2]|0;h=(f[g+4>>2]|0)-c>>3;i=c;c=e;e=d;a:while(1){d=f[c>>2]|0;j=f[e>>2]|0;if(h>>>0<=d>>>0){k=5;break}if(h>>>0<=j>>>0){k=7;break}l=i+(d<<3)|0;if((f[l>>2]|0)>>>0<(f[i+(j<<3)>>2]|0)>>>0){m=e;n=c;o=j;while(1){f[n>>2]=o;if((m|0)==(a|0)){p=a;break}j=m+-4|0;o=f[j>>2]|0;if(h>>>0<=o>>>0){k=11;break a}if((f[l>>2]|0)>>>0>=(f[i+(o<<3)>>2]|0)>>>0){p=m;break}else{q=m;m=j;n=q}}f[p>>2]=d}n=c+4|0;if((n|0)==(b|0)){k=3;break}else{m=c;c=n;e=m}}if((k|0)==3)return;else if((k|0)==5)aq(g);else if((k|0)==7)aq(g);else if((k|0)==11)aq(g)}function jh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=Vg(a,b,c,e)|0;h=f[d>>2]|0;i=f[c>>2]|0;j=f[e>>2]|0;e=f[j>>2]|0;k=(f[j+4>>2]|0)-e>>3;if(k>>>0<=h>>>0)aq(j);l=e;if(k>>>0<=i>>>0)aq(j);if((f[l+(h<<3)>>2]|0)>>>0>=(f[l+(i<<3)>>2]|0)>>>0){m=g;return m|0}f[c>>2]=h;f[d>>2]=i;i=f[c>>2]|0;d=f[b>>2]|0;if(k>>>0<=i>>>0)aq(j);if(k>>>0<=d>>>0)aq(j);if((f[l+(i<<3)>>2]|0)>>>0>=(f[l+(d<<3)>>2]|0)>>>0){m=g+1|0;return m|0}f[b>>2]=i;f[c>>2]=d;d=f[b>>2]|0;c=f[a>>2]|0;if(k>>>0<=d>>>0)aq(j);if(k>>>0<=c>>>0)aq(j);if((f[l+(d<<3)>>2]|0)>>>0>=(f[l+(c<<3)>>2]|0)>>>0){m=g+2|0;return m|0}f[a>>2]=d;f[b>>2]=c;m=g+3|0;return m|0}function kh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0;if((d|0)>=8192)return Da(a|0,c|0,d|0)|0;e=a|0;g=a+d|0;if((a&3)==(c&3)){while(a&3){if(!d)return e|0;b[a>>0]=b[c>>0]|0;a=a+1|0;c=c+1|0;d=d-1|0}h=g&-4|0;d=h-64|0;while((a|0)<=(d|0)){f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];f[a+12>>2]=f[c+12>>2];f[a+16>>2]=f[c+16>>2];f[a+20>>2]=f[c+20>>2];f[a+24>>2]=f[c+24>>2];f[a+28>>2]=f[c+28>>2];f[a+32>>2]=f[c+32>>2];f[a+36>>2]=f[c+36>>2];f[a+40>>2]=f[c+40>>2];f[a+44>>2]=f[c+44>>2];f[a+48>>2]=f[c+48>>2];f[a+52>>2]=f[c+52>>2];f[a+56>>2]=f[c+56>>2];f[a+60>>2]=f[c+60>>2];a=a+64|0;c=c+64|0}while((a|0)<(h|0)){f[a>>2]=f[c>>2];a=a+4|0;c=c+4|0}}else{h=g-4|0;while((a|0)<(h|0)){b[a>>0]=b[c>>0]|0;b[a+1>>0]=b[c+1>>0]|0;b[a+2>>0]=b[c+2>>0]|0;b[a+3>>0]=b[c+3>>0]|0;a=a+4|0;c=c+4|0}}while((a|0)<(g|0)){b[a>>0]=b[c>>0]|0;a=a+1|0;c=c+1|0}return e|0}function lh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;c=u;u=u+16|0;d=c+4|0;e=c;f[a>>2]=1232;g=a+4|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;f[g+16>>2]=0;f[g+20>>2]=0;f[g+24>>2]=0;f[g+28>>2]=0;f[d>>2]=b;b=a+4|0;g=a+8|0;Ri(b,d);h=f[d>>2]|0;i=a+20|0;j=f[i>>2]|0;k=a+16|0;a=f[k>>2]|0;l=j-a>>2;m=a;if((h|0)<(l|0)){n=m;o=h;p=f[g>>2]|0;q=f[b>>2]|0;r=p-q|0;s=r>>2;t=s+-1|0;v=n+(o<<2)|0;f[v>>2]=t;u=c;return}a=h+1|0;f[e>>2]=-1;w=j;if(a>>>0<=l>>>0)if(a>>>0>>0?(j=m+(a<<2)|0,(j|0)!=(w|0)):0){f[i>>2]=w+(~((w+-4-j|0)>>>2)<<2);x=h;y=m}else{x=h;y=m}else{Ch(k,a-l|0,e);x=f[d>>2]|0;y=f[k>>2]|0}n=y;o=x;p=f[g>>2]|0;q=f[b>>2]|0;r=p-q|0;s=r>>2;t=s+-1|0;v=n+(o<<2)|0;f[v>>2]=t;u=c;return}function mh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=a+4|0;c=f[b>>2]|0;d=(f[c+12>>2]|0)-(f[c+8>>2]|0)|0;c=d>>2;a:do if((d|0)>0){e=0;while(1){if(!(Ra[f[(f[a>>2]|0)+36>>2]&127](a,e)|0)){g=0;break}e=e+1|0;h=f[b>>2]|0;i=(f[h+12>>2]|0)-(f[h+8>>2]|0)>>2;if((e|0)>=(i|0)){j=i;break a}}return g|0}else j=c;while(0);c=a+20|0;b=a+24|0;d=f[b>>2]|0;e=f[c>>2]|0;i=d-e>>2;h=e;e=d;if(j>>>0<=i>>>0){if(j>>>0>>0?(d=h+(j<<2)|0,(d|0)!=(e|0)):0)f[b>>2]=e+(~((e+-4-d|0)>>>2)<<2)}else Ci(c,j-i|0);i=f[a+12>>2]|0;j=f[a+8>>2]|0;a=j;if((i|0)==(j|0)){g=1;return g|0}d=i-j>>2;j=0;do{i=f[a+(j<<2)>>2]|0;e=f[i+8>>2]|0;b=f[i+4>>2]|0;i=b;if((e|0)!=(b|0)?(h=f[c>>2]|0,k=e-b>>2,f[h+(f[i>>2]<<2)>>2]=j,k>>>0>1):0){b=1;do{f[h+(f[i+(b<<2)>>2]<<2)>>2]=j;b=b+1|0}while(b>>>0>>0)}j=j+1|0}while(j>>>0>>0);g=1;return g|0}function nh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=f[c+88>>2]|0;if(!d){e=0;return e|0}if((f[d>>2]|0)!=1){e=0;return e|0}g=d+8|0;d=f[g>>2]|0;f[a+4>>2]=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;i=a+8|0;j=c+24|0;c=b[j>>0]|0;k=c<<24>>24;l=a+12|0;m=f[l>>2]|0;n=f[i>>2]|0;o=m-n>>2;p=n;n=m;if(o>>>0>=k>>>0)if(o>>>0>k>>>0?(m=p+(k<<2)|0,(m|0)!=(n|0)):0){f[l>>2]=n+(~((n+-4-m|0)>>>2)<<2);q=c;r=d}else{q=c;r=d}else{Ci(i,k-o|0);q=b[j>>0]|0;r=f[g>>2]|0}g=r+4|0;j=h[g>>0]|h[g+1>>0]<<8|h[g+2>>0]<<16|h[g+3>>0]<<24;if(q<<24>>24>0){g=f[i>>2]|0;i=q<<24>>24;q=j;o=4;k=0;while(1){f[g+(k<<2)>>2]=q;o=o+4|0;k=k+1|0;d=r+o|0;c=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;if((k|0)>=(i|0)){s=c;break}else q=c}}else s=j;f[a+20>>2]=s;e=1;return e|0}function oh(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;do if(!(fp(a,f[c+8>>2]|0,g)|0)){if(!(fp(a,f[c>>2]|0,g)|0)){h=f[a+8>>2]|0;Za[f[(f[h>>2]|0)+24>>2]&3](h,c,d,e,g);break}if((f[c+16>>2]|0)!=(d|0)?(h=c+20|0,(f[h>>2]|0)!=(d|0)):0){f[c+32>>2]=e;i=c+44|0;if((f[i>>2]|0)==4)break;j=c+52|0;b[j>>0]=0;k=c+53|0;b[k>>0]=0;l=f[a+8>>2]|0;_a[f[(f[l>>2]|0)+20>>2]&3](l,c,d,d,1,g);if(b[k>>0]|0)if(!(b[j>>0]|0)){m=3;n=11}else o=3;else{m=4;n=11}if((n|0)==11){f[h>>2]=d;h=c+40|0;f[h>>2]=(f[h>>2]|0)+1;if((f[c+36>>2]|0)==1?(f[c+24>>2]|0)==2:0){b[c+54>>0]=1;o=m}else o=m}f[i>>2]=o;break}if((e|0)==1)f[c+32>>2]=1}else Vm(0,c,d,e);while(0);return}function ph(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e+12|0;h=e+8|0;i=e;f[i>>2]=f[b>>2];f[g>>2]=f[i>>2];i=Kd(a,g,h,e+4|0,c)|0;c=f[i>>2]|0;if(c|0){j=c;u=e;return j|0}c=ln(40)|0;pj(c+16|0,d);pj(c+28|0,d+12|0);d=f[h>>2]|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=d;f[i>>2]=c;d=f[f[a>>2]>>2]|0;if(!d)k=c;else{f[a>>2]=d;k=f[i>>2]|0}Oe(f[a+4>>2]|0,k);k=a+8|0;f[k>>2]=(f[k>>2]|0)+1;j=c;u=e;return j|0}function qh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=u;u=u+16|0;g=e;h=a+4|0;f[h>>2]=0;if(!c){u=e;return}i=a+8|0;j=f[i>>2]|0;k=j<<5;if(k>>>0>>0){f[g>>2]=0;l=g+4|0;f[l>>2]=0;m=g+8|0;f[m>>2]=0;if((c|0)<0)aq(a);n=j<<6;j=c+31&-32;vi(g,k>>>0<1073741823?(n>>>0>>0?j:n):2147483647);n=f[a>>2]|0;f[a>>2]=f[g>>2];f[g>>2]=n;g=f[h>>2]|0;f[h>>2]=c;f[l>>2]=g;g=f[i>>2]|0;f[i>>2]=f[m>>2];f[m>>2]=g;if(n|0)Oq(n);o=a}else{f[h>>2]=c;o=a}a=f[o>>2]|0;o=a;h=a;a=c>>>5;n=a<<2;if(!(b[d>>0]|0)){sj(h|0,0,n|0)|0;d=c&31;g=o+(a<<2)|0;if(!d){u=e;return}f[g>>2]=f[g>>2]&~(-1>>>(32-d|0));u=e;return}else{sj(h|0,-1,n|0)|0;n=c&31;c=o+(a<<2)|0;if(!n){u=e;return}f[c>>2]=f[c>>2]|-1>>>(32-n|0);u=e;return}}function rh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;f[g>>2]=f[a+12>>2];h=b+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&j>>>0>0){l=k;m=j}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;j=h;l=f[j+4>>2]|0;m=f[j>>2]|0}f[g>>2]=f[a+20>>2];if((l|0)>0|(l|0)==0&m>>>0>0){n=a+88|0;ld(n,b);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;n=a+88|0;ld(n,b);u=c;return 1}function sh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;f[g>>2]=f[a+12>>2];h=b+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&j>>>0>0){l=k;m=j}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;j=h;l=f[j+4>>2]|0;m=f[j>>2]|0}f[g>>2]=f[a+16>>2];if((l|0)>0|(l|0)==0&m>>>0>0){n=a+108|0;ld(n,b);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;n=a+108|0;ld(n,b);u=c;return 1}function th(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;c=a+32|0;d=f[a+64>>2]|0;e=(Qa[f[(f[d>>2]|0)+40>>2]&127](d)|0)+52|0;d=f[e>>2]|0;zi(c,(((f[d+100>>2]|0)-(f[d+96>>2]|0)|0)/12|0)*3|0,0,1)|0;d=a+68|0;e=f[d>>2]|0;g=(f[a+72>>2]|0)-e|0;if((g|0)<=0){eg(c);return}i=a+48|0;j=a+44|0;a=(g>>>2)+-1|0;g=e;while(1){e=f[g+(a<<2)>>2]|0;k=f[3524+(e<<2)>>2]|0;l=i;m=f[l+4>>2]|0;if((m|0)>0|(m|0)==0&(f[l>>2]|0)>>>0>0?(l=f[j>>2]|0,171>>>e&1|0):0){m=l+4|0;n=0;o=f[m>>2]|0;do{p=o>>>3;q=o&7;r=(f[l>>2]|0)+p|0;b[r>>0]=(1<>0]|0);r=(f[l>>2]|0)+p|0;b[r>>0]=(e>>>n&1)<>0]|0);o=(f[m>>2]|0)+1|0;f[m>>2]=o;n=n+1|0}while((n|0)!=(k|0))}k=a+-1|0;if((k|0)<=-1)break;a=k;g=f[d>>2]|0}eg(c);return}function uh(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;g=u;u=u+48|0;h=g;i=g+32|0;if(!c){j=0;u=g;return j|0}Gn(h);do if((dm(c,0)|0)!=-1){if(d){if(!(Qa[f[(f[c>>2]|0)+16>>2]&127](c)|0)){k=0;break}Va[f[(f[c>>2]|0)+20>>2]&127](c)}Yg(i,a,c,h);l=(f[i>>2]|0)==0;m=i+4|0;if((b[m+11>>0]|0)<0)Oq(f[m>>2]|0);if(l){l=f[h>>2]|0;m=h+4|0;rg(e,l,l+((f[m>>2]|0)-l)|0);k=(f[m>>2]|0)-(f[h>>2]|0)|0}else k=0}else k=0;while(0);e=h+12|0;i=f[e>>2]|0;f[e>>2]=0;if(i|0)Oq(i);i=f[h>>2]|0;if(i|0){e=h+4|0;if((f[e>>2]|0)!=(i|0))f[e>>2]=i;Oq(i)}j=k;u=g;return j|0}function vh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=u;u=u+16|0;d=c;e=f[(f[a>>2]|0)+8>>2]|0;g=a+8|0;h=a+12|0;i=(f[h>>2]|0)-(f[g>>2]|0)>>2;j=f[b>>2]|0;f[b>>2]=0;f[d>>2]=j;Xa[e&15](a,i,d);i=f[d>>2]|0;f[d>>2]=0;if(!i){k=f[h>>2]|0;l=f[g>>2]|0;m=k-l|0;n=m>>2;o=n+-1|0;u=c;return o|0}d=i+88|0;a=f[d>>2]|0;f[d>>2]=0;if(a|0){d=f[a+8>>2]|0;if(d|0){e=a+12|0;if((f[e>>2]|0)!=(d|0))f[e>>2]=d;Oq(d)}Oq(a)}a=f[i+68>>2]|0;if(a|0){d=i+72|0;e=f[d>>2]|0;if((e|0)!=(a|0))f[d>>2]=e+(~((e+-4-a|0)>>>2)<<2);Oq(a)}a=i+64|0;e=f[a>>2]|0;f[a>>2]=0;if(e|0){a=f[e>>2]|0;if(a|0){d=e+4|0;if((f[d>>2]|0)!=(a|0))f[d>>2]=a;Oq(a)}Oq(e)}Oq(i);k=f[h>>2]|0;l=f[g>>2]|0;m=k-l|0;n=m>>2;o=n+-1|0;u=c;return o|0}function wh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;if(d-g>>3>>>0>=b>>>0){h=b;i=g;do{j=i;f[j>>2]=0;f[j+4>>2]=0;i=(f[e>>2]|0)+8|0;f[e>>2]=i;h=h+-1|0}while((h|0)!=0);return}h=f[a>>2]|0;i=g-h>>3;g=i+b|0;if(g>>>0>536870911)aq(a);j=d-h|0;h=j>>2;d=j>>3>>>0<268435455?(h>>>0>>0?g:h):536870911;do if(d)if(d>>>0>536870911){h=ra(8)|0;Oo(h,16035);f[h>>2]=7256;va(h|0,1112,110)}else{k=ln(d<<3)|0;break}else k=0;while(0);h=k+(i<<3)|0;i=k+(d<<3)|0;d=b;b=h;k=h;do{g=b;f[g>>2]=0;f[g+4>>2]=0;b=k+8|0;k=b;d=d+-1|0}while((d|0)!=0);d=f[a>>2]|0;b=(f[e>>2]|0)-d|0;g=h+(0-(b>>3)<<3)|0;if((b|0)>0)kh(g|0,d|0,b|0)|0;f[a>>2]=g;f[e>>2]=k;f[c>>2]=i;if(!d)return;Oq(d);return}function xh(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;d=u;u=u+16|0;e=d;if(!(bn(a,b,c)|0)){g=0;u=d;return g|0}if((Qa[f[(f[a>>2]|0)+32>>2]&127](a)|0)<<24>>24==1?((f[(f[a+8>>2]|0)+28>>2]|0)+-1|0)>>>0>=6:0){g=0;u=d;return g|0}h=_g(c,f[b+48>>2]|0)|0;Xa[f[(f[a>>2]|0)+48>>2]&15](e,a,h);h=a+36|0;b=f[e>>2]|0;f[e>>2]=0;c=f[h>>2]|0;f[h>>2]=b;if(!c){f[e>>2]=0;i=b}else{Va[f[(f[c>>2]|0)+4>>2]&127](c);c=f[e>>2]|0;f[e>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&127](c);i=f[h>>2]|0}if(!i){g=1;u=d;return g|0}if(Ra[f[(f[a>>2]|0)+36>>2]&127](a,i)|0){g=1;u=d;return g|0}i=f[h>>2]|0;f[h>>2]=0;if(!i){g=1;u=d;return g|0}Va[f[(f[i>>2]|0)+4>>2]&127](i);g=1;u=d;return g|0}function yh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=u;u=u+16|0;g=e+4|0;h=e;i=e+8|0;j=a&255;b[i>>0]=j&127;do if(c>>>0>0|(c|0)==0&a>>>0>127){b[i>>0]=j|-128;k=d+16|0;l=f[k+4>>2]|0;if((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0){m=0;break}else{f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Me(d,g,i,i+1|0)|0;k=Yn(a|0,c|0,7)|0;m=yh(k,I,d)|0;break}}else{k=d+16|0;l=f[k+4>>2]|0;if((l|0)>0|(l|0)==0&(f[k>>2]|0)>>>0>0){m=0;break}f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Me(d,g,i,i+1|0)|0;n=1;u=e;return n|0}while(0);n=m;u=e;return n|0}function zh(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0;g=f[(f[(f[d+4>>2]|0)+8>>2]|0)+(c<<2)>>2]|0;if((b|0)==-1)h=Xi(c,d)|0;else h=b;if((h|0)==-2)i=0;else{do if((Qa[f[(f[d>>2]|0)+8>>2]&127](d)|0)==1){Xf(a,d,h,c,e,514);if(!(f[a>>2]|0)){f[a>>2]=0;break}else return}while(0);c=ln(44)|0;f[c>>2]=1544;f[c+4>>2]=g;g=c+8|0;f[g>>2]=f[e>>2];f[g+4>>2]=f[e+4>>2];f[g+8>>2]=f[e+8>>2];f[g+12>>2]=f[e+12>>2];f[g+16>>2]=f[e+16>>2];f[g+20>>2]=f[e+20>>2];fk(c+32|0,e+24|0);f[c>>2]=1600;i=c}f[a>>2]=i;return}function Ah(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=u;u=u+224|0;g=e+120|0;h=e+80|0;i=e;j=e+136|0;k=h;l=k+40|0;do{f[k>>2]=0;k=k+4|0}while((k|0)<(l|0));f[g>>2]=f[d>>2];if((qb(0,c,g,i,h)|0)<0)m=-1;else{if((f[a+76>>2]|0)>-1)n=Tq(a)|0;else n=0;d=f[a>>2]|0;k=d&32;if((b[a+74>>0]|0)<1)f[a>>2]=d&-33;d=a+48|0;if(!(f[d>>2]|0)){l=a+44|0;o=f[l>>2]|0;f[l>>2]=j;p=a+28|0;f[p>>2]=j;q=a+20|0;f[q>>2]=j;f[d>>2]=80;r=a+16|0;f[r>>2]=j+80;j=qb(a,c,g,i,h)|0;if(!o)s=j;else{Sa[f[a+36>>2]&31](a,0,0)|0;t=(f[q>>2]|0)==0?-1:j;f[l>>2]=o;f[d>>2]=0;f[r>>2]=0;f[p>>2]=0;f[q>>2]=0;s=t}}else s=qb(a,c,g,i,h)|0;h=f[a>>2]|0;f[a>>2]=h|k;if(n|0)Sq(a);m=(h&32|0)==0?s:-1}u=e;return m|0}function Bh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=d-e>>2;h=d;if(g>>>0>>0){uf(a,b-g|0);return}if(g>>>0<=b>>>0)return;g=e+(b<<2)|0;if((g|0)==(h|0))return;else i=h;do{h=i+-4|0;f[c>>2]=h;b=f[h>>2]|0;f[h>>2]=0;if(b|0){h=b+88|0;e=f[h>>2]|0;f[h>>2]=0;if(e|0){h=f[e+8>>2]|0;if(h|0){a=e+12|0;if((f[a>>2]|0)!=(h|0))f[a>>2]=h;Oq(h)}Oq(e)}e=f[b+68>>2]|0;if(e|0){h=b+72|0;a=f[h>>2]|0;if((a|0)!=(e|0))f[h>>2]=a+(~((a+-4-e|0)>>>2)<<2);Oq(e)}e=b+64|0;a=f[e>>2]|0;f[e>>2]=0;if(a|0){e=f[a>>2]|0;if(e|0){h=a+4|0;if((f[h>>2]|0)!=(e|0))f[h>>2]=e;Oq(e)}Oq(a)}Oq(b)}i=f[c>>2]|0}while((i|0)!=(g|0));return}function Ch(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;i=h;if(e-h>>2>>>0>=b>>>0){j=b;k=i;while(1){f[k>>2]=f[c>>2];j=j+-1|0;if(!j)break;else k=k+4|0}f[g>>2]=i+(b<<2);return}i=f[a>>2]|0;k=h-i|0;h=k>>2;j=h+b|0;if(j>>>0>1073741823)aq(a);l=e-i|0;e=l>>1;m=l>>2>>>0<536870911?(e>>>0>>0?j:e):1073741823;do if(m)if(m>>>0>1073741823){e=ra(8)|0;Oo(e,16035);f[e>>2]=7256;va(e|0,1112,110)}else{e=ln(m<<2)|0;n=e;o=e;break}else{n=0;o=0}while(0);e=n+(h<<2)|0;h=n+(m<<2)|0;m=b;j=e;while(1){f[j>>2]=f[c>>2];m=m+-1|0;if(!m)break;else j=j+4|0}if((k|0)>0)kh(o|0,i|0,k|0)|0;f[a>>2]=n;f[g>>2]=e+(b<<2);f[d>>2]=h;if(!i)return;Oq(i);return}function Dh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=(f[a>>2]|0)+1794895138|0;g=gp(f[a+8>>2]|0,e)|0;h=gp(f[a+12>>2]|0,e)|0;i=gp(f[a+16>>2]|0,e)|0;a:do if((g>>>0>>2>>>0?(j=c-(g<<2)|0,h>>>0>>0&i>>>0>>0):0)?((i|h)&3|0)==0:0){j=h>>>2;k=i>>>2;l=0;m=g;while(1){n=m>>>1;o=l+n|0;p=o<<1;q=p+j|0;r=gp(f[a+(q<<2)>>2]|0,e)|0;s=gp(f[a+(q+1<<2)>>2]|0,e)|0;if(!(s>>>0>>0&r>>>0<(c-s|0)>>>0)){t=0;break a}if(b[a+(s+r)>>0]|0){t=0;break a}r=hl(d,a+s|0)|0;if(!r)break;s=(r|0)<0;if((m|0)==1){t=0;break a}else{l=s?l:o;m=s?n:m-n|0}}m=p+k|0;l=gp(f[a+(m<<2)>>2]|0,e)|0;j=gp(f[a+(m+1<<2)>>2]|0,e)|0;if(j>>>0>>0&l>>>0<(c-j|0)>>>0)t=(b[a+(j+l)>>0]|0)==0?a+j|0:0;else t=0}else t=0;while(0);return t|0}function Eh(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;h=u;u=u+64|0;i=h;j=f[a>>2]|0;k=a+(f[j+-8>>2]|0)|0;l=f[j+-4>>2]|0;f[i>>2]=e;f[i+4>>2]=a;f[i+8>>2]=c;f[i+12>>2]=g;g=i+16|0;c=i+20|0;a=i+24|0;j=i+28|0;m=i+32|0;n=i+40|0;o=g;p=o+36|0;do{f[o>>2]=0;o=o+4|0}while((o|0)<(p|0));d[g+36>>1]=0;b[g+38>>0]=0;a:do if(fp(l,e,0)|0){f[i+48>>2]=1;_a[f[(f[l>>2]|0)+20>>2]&3](l,i,k,k,1,0);q=(f[a>>2]|0)==1?k:0}else{Za[f[(f[l>>2]|0)+24>>2]&3](l,i,k,1,0);switch(f[i+36>>2]|0){case 0:{q=(f[n>>2]|0)==1&(f[j>>2]|0)==1&(f[m>>2]|0)==1?f[c>>2]|0:0;break a;break}case 1:break;default:{q=0;break a}}if((f[a>>2]|0)!=1?!((f[n>>2]|0)==0&(f[j>>2]|0)==1&(f[m>>2]|0)==1):0){q=0;break}q=f[g>>2]|0}while(0);u=h;return q|0}function Fh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;h=g;if(d-g>>2>>>0>=b>>>0){i=b;j=h;while(1){f[j>>2]=1;i=i+-1|0;if(!i)break;else j=j+4|0}f[e>>2]=h+(b<<2);return}h=f[a>>2]|0;j=g-h|0;g=j>>2;i=g+b|0;if(i>>>0>1073741823)aq(a);k=d-h|0;d=k>>1;l=k>>2>>>0<536870911?(d>>>0>>0?i:d):1073741823;do if(l)if(l>>>0>1073741823){d=ra(8)|0;Oo(d,16035);f[d>>2]=7256;va(d|0,1112,110)}else{d=ln(l<<2)|0;m=d;n=d;break}else{m=0;n=0}while(0);d=m+(g<<2)|0;g=m+(l<<2)|0;l=b;i=d;while(1){f[i>>2]=1;l=l+-1|0;if(!l)break;else i=i+4|0}if((j|0)>0)kh(n|0,h|0,j|0)|0;f[a>>2]=m;f[e>>2]=d+(b<<2);f[c>>2]=g;if(!h)return;Oq(h);return}function Gh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;if(!c){g=0;u=d;return g|0}h=a+84|0;i=f[h>>2]|0;j=a+88|0;k=f[j>>2]|0;if((k|0)!=(i|0))f[j>>2]=k+(~((k+-4-i|0)>>>2)<<2);f[h>>2]=0;f[j>>2]=0;f[a+92>>2]=0;if(i|0)Oq(i);i=a+72|0;j=f[i>>2]|0;h=a+76|0;if((f[h>>2]|0)!=(j|0))f[h>>2]=j;f[i>>2]=0;f[h>>2]=0;f[a+80>>2]=0;if(j|0)Oq(j);j=c+4|0;h=(f[j>>2]|0)-(f[c>>2]|0)>>2;b[e>>0]=0;qh(a,h,e);h=c+24|0;i=c+28|0;k=(f[i>>2]|0)-(f[h>>2]|0)>>2;b[e>>0]=0;qh(a+12|0,k,e);hg(a+28|0,(f[j>>2]|0)-(f[c>>2]|0)>>2,6180);gk(a+52|0,(f[i>>2]|0)-(f[h>>2]|0)>>2);gk(a+40|0,(f[i>>2]|0)-(f[h>>2]|0)>>2);f[a+64>>2]=c;b[a+24>>0]=1;g=1;u=d;return g|0}function Hh(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a+12|0;d=f[a>>2]|0;e=a+8|0;g=f[e>>2]|0;h=(g|0)==-1;if(!(b[c>>0]|0)){do if((!h?(i=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(i|0)!=-1):0)?(j=f[(f[d+12>>2]|0)+(i<<2)>>2]|0,(j|0)!=-1):0)if(!((j>>>0)%3|0)){k=j+2|0;break}else{k=j+-1|0;break}else k=-1;while(0);f[e>>2]=k;return}k=g+1|0;if((!h?(h=((k>>>0)%3|0|0)==0?g+-2|0:k,(h|0)!=-1):0)?(k=f[(f[d+12>>2]|0)+(h<<2)>>2]|0,h=k+1|0,(k|0)!=-1):0){g=((h>>>0)%3|0|0)==0?k+-2|0:h;f[e>>2]=g;if((g|0)!=-1){if((g|0)!=(f[a+4>>2]|0))return;f[e>>2]=-1;return}}else f[e>>2]=-1;g=f[a+4>>2]|0;do if(((g|0)!=-1?(a=(((g>>>0)%3|0|0)==0?2:-1)+g|0,(a|0)!=-1):0)?(h=f[(f[d+12>>2]|0)+(a<<2)>>2]|0,(h|0)!=-1):0)if(!((h>>>0)%3|0)){l=h+2|0;break}else{l=h+-1|0;break}else l=-1;while(0);f[e>>2]=l;b[c>>0]=0;return}function Ih(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Td(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+20>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;Td(a,e);return}function Jh(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=f[a+4>>2]|0;if(!d){e=0;return e|0}a=b[c+11>>0]|0;g=a<<24>>24<0;h=g?f[c+4>>2]|0:a&255;a=g?f[c>>2]|0:c;c=d;while(1){d=c+16|0;g=b[d+11>>0]|0;i=g<<24>>24<0;j=i?f[c+20>>2]|0:g&255;g=j>>>0>>0;k=g?j:h;if((k|0)!=0?(l=Vk(a,i?f[d>>2]|0:d,k)|0,(l|0)!=0):0)if((l|0)<0)m=7;else m=8;else if(h>>>0>>0)m=7;else m=8;if((m|0)==7){m=0;n=c}else if((m|0)==8){m=0;l=h>>>0>>0?h:j;if((l|0)!=0?(j=Vk(i?f[d>>2]|0:d,a,l)|0,(j|0)!=0):0){if((j|0)>=0){e=1;m=14;break}}else m=10;if((m|0)==10?(m=0,!g):0){e=1;m=14;break}n=c+4|0}c=f[n>>2]|0;if(!c){e=0;m=14;break}}if((m|0)==14)return e|0;return 0}function Kh(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=u;u=u+16|0;g=e+4|0;h=e;i=f[a+8>>2]|0;j=i+24|0;k=b[j>>0]|0;l=c+4|0;ag(a,(f[l>>2]|0)-(f[c>>2]|0)>>2,k,d);d=f[a+32>>2]|0;a=(f[f[d>>2]>>2]|0)+(f[d+48>>2]|0)|0;d=f[c>>2]|0;c=f[l>>2]|0;if((d|0)==(c|0)){m=1;u=e;return m|0}l=i+84|0;n=i+68|0;o=0;p=d;while(1){d=f[p>>2]|0;if(!(b[l>>0]|0))q=f[(f[n>>2]|0)+(d<<2)>>2]|0;else q=d;f[h>>2]=q;d=b[j>>0]|0;f[g>>2]=f[h>>2];if(!(Qb(i,g,d,a+(o<<2)|0)|0)){m=0;r=7;break}p=p+4|0;if((p|0)==(c|0)){m=1;r=7;break}else o=o+k|0}if((r|0)==7){u=e;return m|0}return 0}function Lh(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;f[a>>2]=1408;b=a+72|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&127](c);c=f[a+60>>2]|0;if(c|0){b=a+64|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);Oq(c)}c=f[a+48>>2]|0;if(c|0)Oq(c);c=a+36|0;d=f[c>>2]|0;if(d|0){b=a+40|0;e=f[b>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-4|0;f[b>>2]=e;i=f[e>>2]|0;f[e>>2]=0;if(i|0)Va[f[(f[i>>2]|0)+4>>2]&127](i);h=f[b>>2]|0}while((h|0)!=(d|0));g=f[c>>2]|0}Oq(g)}f[a>>2]=1232;g=f[a+16>>2]|0;if(g|0){c=a+20|0;d=f[c>>2]|0;if((d|0)!=(g|0))f[c>>2]=d+(~((d+-4-g|0)>>>2)<<2);Oq(g)}g=f[a+4>>2]|0;if(!g)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(g|0))f[d>>2]=a+(~((a+-4-g|0)>>>2)<<2);Oq(g);return}function Mh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f[a>>2]=d;e=a+24|0;g=a+28|0;h=f[g>>2]|0;i=f[e>>2]|0;j=h-i>>2;k=i;i=h;if(j>>>0>=d>>>0){if(j>>>0>d>>>0?(h=k+(d<<2)|0,(h|0)!=(i|0)):0)f[g>>2]=i+(~((i+-4-h|0)>>>2)<<2)}else Ci(e,d-j|0);if(!c)return;j=f[b>>2]|0;if((c|0)>1){d=j;e=j;h=1;while(1){i=f[b+(h<<2)>>2]|0;g=(i|0)<(e|0);k=g?i:e;l=g?d:(i|0)>(d|0)?i:d;h=h+1|0;if((h|0)==(c|0)){m=l;n=k;break}else{d=l;e=k}}}else{m=j;n=j}f[a+4>>2]=n;f[a+8>>2]=m;j=Xn(m|0,((m|0)<0)<<31>>31|0,n|0,((n|0)<0)<<31>>31|0)|0;n=I;if(!(n>>>0<0|(n|0)==0&j>>>0<2147483647))return;n=j+1|0;f[a+12>>2]=n;j=(n|0)/2|0;m=a+16|0;f[m>>2]=j;f[a+20>>2]=0-j;if(n&1|0)return;f[m>>2]=j+-1;return}function Nh(a){a=a|0;Fj(a+992|0);Fj(a+960|0);Fj(a+928|0);Fj(a+896|0);Fj(a+864|0);Fj(a+832|0);Fj(a+800|0);Fj(a+768|0);Fj(a+736|0);Fj(a+704|0);Fj(a+672|0);Fj(a+640|0);Fj(a+608|0);Fj(a+576|0);Fj(a+544|0);Fj(a+512|0);Fj(a+480|0);Fj(a+448|0);Fj(a+416|0);Fj(a+384|0);Fj(a+352|0);Fj(a+320|0);Fj(a+288|0);Fj(a+256|0);Fj(a+224|0);Fj(a+192|0);Fj(a+160|0);Fj(a+128|0);Fj(a+96|0);Fj(a+64|0);Fj(a+32|0);Fj(a);return}function Oh(a){a=a|0;wn(a);wn(a+32|0);wn(a+64|0);wn(a+96|0);wn(a+128|0);wn(a+160|0);wn(a+192|0);wn(a+224|0);wn(a+256|0);wn(a+288|0);wn(a+320|0);wn(a+352|0);wn(a+384|0);wn(a+416|0);wn(a+448|0);wn(a+480|0);wn(a+512|0);wn(a+544|0);wn(a+576|0);wn(a+608|0);wn(a+640|0);wn(a+672|0);wn(a+704|0);wn(a+736|0);wn(a+768|0);wn(a+800|0);wn(a+832|0);wn(a+864|0);wn(a+896|0);wn(a+928|0);wn(a+960|0);wn(a+992|0);return}function Ph(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=u;u=u+16|0;d=c+12|0;e=c+8|0;g=c+4|0;h=c;i=(a|0)==(b|0);if(!i){f[g>>2]=f[b>>2];f[h>>2]=b+4;f[e>>2]=f[g>>2];f[d>>2]=f[h>>2];Oc(a,e,d)}if(!i){f[g>>2]=f[b+12>>2];f[h>>2]=b+16;f[e>>2]=f[g>>2];f[d>>2]=f[h>>2];Hc(a+12|0,e,d)}if(i){u=c;return}f[g>>2]=f[b+24>>2];f[h>>2]=b+28;f[e>>2]=f[g>>2];f[d>>2]=f[h>>2];Oc(a+24|0,e,d);u=c;return}function Qh(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;a=u;u=u+16|0;e=a;if((c|0)<0|((b|0)==0|(d|0)==0)){g=0;u=a;return g|0}h=f[b+8>>2]|0;if(((f[b+12>>2]|0)-h>>2|0)<=(c|0)){g=0;u=a;return g|0}i=b+4|0;if(!(f[i>>2]|0)){j=ln(52)|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;n[j+16>>2]=$(1.0);k=j+20|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;n[j+36>>2]=$(1.0);f[j+40>>2]=0;f[j+44>>2]=0;f[j+48>>2]=0;f[b+4>>2]=j}j=f[(f[h+(c<<2)>>2]|0)+60>>2]|0;c=ln(44)|0;Ub(c,d);f[c+40>>2]=j;j=f[i>>2]|0;f[e>>2]=c;mk(j,e)|0;j=f[e>>2]|0;f[e>>2]=0;if(!j){g=1;u=a;return g|0}bj(j);Oq(j);g=1;u=a;return g|0}function Rh(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0;c=u;u=u+64|0;j=c;k=i?6:5;Il(j);i=f[h+56>>2]|0;h=X(Vl(k)|0,e)|0;Jj(j,i,0,e&255,k,0,h,((h|0)<0)<<31>>31,0,0);h=ln(96)|0;tl(h,j);f[a>>2]=h;Bj(h,d)|0;d=h+84|0;if(!g){b[d>>0]=1;a=f[h+68>>2]|0;j=h+72|0;k=f[j>>2]|0;if((k|0)==(a|0)){u=c;return}f[j>>2]=k+(~((k+-4-a|0)>>>2)<<2);u=c;return}b[d>>0]=0;d=h+68|0;a=h+72|0;h=f[a>>2]|0;k=f[d>>2]|0;j=h-k>>2;e=h;if(j>>>0>>0){Ch(d,g-j|0,1216);u=c;return}if(j>>>0<=g>>>0){u=c;return}j=k+(g<<2)|0;if((j|0)==(e|0)){u=c;return}f[a>>2]=e+(~((e+-4-j|0)>>>2)<<2);u=c;return}function Sh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){rd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;rd(a,e);return}function Th(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){vd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;vd(a,e);return}function Uh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Fd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;Fd(a,e);return}function Vh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Pd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;Pd(a,e);return}function Wh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){ud(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;ud(a,e);return}function Xh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){zd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;zd(a,e);return}function Yh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Jd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;Jd(a,e);return}function Zh(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){sd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;sd(a,e);return}function _h(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){wd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;wd(a,e);return}function $h(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Gd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;Gd(a,e);return}function ai(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Qd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;Qd(a,e);return}function bi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=u;u=u+16|0;h=g;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;i=ln(16)|0;f[h>>2]=i;f[h+8>>2]=-2147483632;f[h+4>>2]=15;j=i;k=14479;l=j+15|0;do{b[j>>0]=b[k>>0]|0;j=j+1|0;k=k+1|0}while((j|0)<(l|0));b[i+15>>0]=0;i=Hk(c,h,-1)|0;if((b[h+11>>0]|0)<0)Oq(f[h>>2]|0);switch(i|0){case -1:{if((mi(c)|0)==10)m=6;else m=5;break}case 1:{m=5;break}default:m=6}if((m|0)==5){i=ln(60)|0;Lo(i);n=i}else if((m|0)==6){m=ln(56)|0;tp(m);n=m}xo(n,d);Md(a,n,c,e);Va[f[(f[n>>2]|0)+4>>2]&127](n);u=g;return}function ci(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;b[h>>0]=a&127;do if(a>>>0>127){b[h>>0]=a|128;i=c+16|0;j=f[i+4>>2]|0;if((j|0)>0|(j|0)==0&(f[i>>2]|0)>>>0>0){k=0;break}else{f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Me(c,e,h,h+1|0)|0;k=ci(a>>>7,c)|0;break}}else{i=c+16|0;j=f[i+4>>2]|0;if((j|0)>0|(j|0)==0&(f[i>>2]|0)>>>0>0){k=0;break}f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Me(c,e,h,h+1|0)|0;l=1;u=d;return l|0}while(0);l=k;u=d;return l|0} +function vc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;e=u;u=u+32|0;g=e+16|0;h=e+12|0;i=e+8|0;j=e+4|0;k=e;switch(f[c+28>>2]|0){case 9:{l=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=l;f[g>>2]=f[h>>2];m=hc(a,c,g)|0;break}case 2:{f[i>>2]=l;f[g>>2]=f[i>>2];m=Wb(a,c,g)|0;break}case 3:{f[j>>2]=l;f[g>>2]=f[j>>2];m=uc(a,c,g)|0;break}case 4:{f[k>>2]=l;f[g>>2]=f[k>>2];m=mc(a,c,g)|0;break}default:m=0}n=m;break}case 1:{m=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=m;f[g>>2]=f[h>>2];o=gc(a,c,g)|0;break}case 2:{f[i>>2]=m;f[g>>2]=f[i>>2];o=Xb(a,c,g)|0;break}case 3:{f[j>>2]=m;f[g>>2]=f[j>>2];o=sc(a,c,g)|0;break}case 4:{f[k>>2]=m;f[g>>2]=f[k>>2];o=lc(a,c,g)|0;break}default:o=0}n=o;break}case 11:case 2:{o=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=o;f[g>>2]=f[h>>2];p=gc(a,c,g)|0;break}case 2:{f[i>>2]=o;f[g>>2]=f[i>>2];p=Xb(a,c,g)|0;break}case 3:{f[j>>2]=o;f[g>>2]=f[j>>2];p=sc(a,c,g)|0;break}case 4:{f[k>>2]=o;f[g>>2]=f[k>>2];p=lc(a,c,g)|0;break}default:p=0}n=p;break}case 4:{p=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=p;f[g>>2]=f[h>>2];q=ec(a,c,g)|0;break}case 2:{f[i>>2]=p;f[g>>2]=f[i>>2];q=Vb(a,c,g)|0;break}case 3:{f[j>>2]=p;f[g>>2]=f[j>>2];q=nc(a,c,g)|0;break}case 4:{f[k>>2]=p;f[g>>2]=f[k>>2];q=jc(a,c,g)|0;break}default:q=0}n=q;break}case 3:{q=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=q;f[g>>2]=f[h>>2];r=ec(a,c,g)|0;break}case 2:{f[i>>2]=q;f[g>>2]=f[i>>2];r=Vb(a,c,g)|0;break}case 3:{f[j>>2]=q;f[g>>2]=f[j>>2];r=nc(a,c,g)|0;break}case 4:{f[k>>2]=q;f[g>>2]=f[k>>2];r=jc(a,c,g)|0;break}default:r=0}n=r;break}case 6:{r=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=r;f[g>>2]=f[h>>2];s=hc(a,c,g)|0;break}case 2:{f[i>>2]=r;f[g>>2]=f[i>>2];s=Wb(a,c,g)|0;break}case 3:{f[j>>2]=r;f[g>>2]=f[j>>2];s=uc(a,c,g)|0;break}case 4:{f[k>>2]=r;f[g>>2]=f[k>>2];s=mc(a,c,g)|0;break}default:s=0}n=s;break}case 5:{s=f[d>>2]|0;switch(b[c+24>>0]|0){case 1:{f[h>>2]=s;f[g>>2]=f[h>>2];t=hc(a,c,g)|0;break}case 2:{f[i>>2]=s;f[g>>2]=f[i>>2];t=Wb(a,c,g)|0;break}case 3:{f[j>>2]=s;f[g>>2]=f[j>>2];t=uc(a,c,g)|0;break}case 4:{f[k>>2]=s;f[g>>2]=f[k>>2];t=mc(a,c,g)|0;break}default:t=0}n=t;break}default:{v=-1;u=e;return v|0}}v=(n|0)==0?-1:n;u=e;return v|0}function wc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;e=u;u=u+32|0;g=e+16|0;h=e+12|0;i=e+29|0;j=e;k=e+28|0;if(!(f[(f[a+8>>2]|0)+80>>2]|0)){l=1;u=e;return l|0}b[i>>0]=-2;m=a+36|0;n=f[m>>2]|0;if(n)if(Ra[f[(f[a>>2]|0)+40>>2]&127](a,n)|0){n=f[m>>2]|0;o=(Qa[f[(f[n>>2]|0)+8>>2]&127](n)|0)&255;b[i>>0]=o;p=5}else q=0;else p=5;if((p|0)==5){o=d+16|0;n=o;r=f[n+4>>2]|0;if(!((r|0)>0|(r|0)==0&(f[n>>2]|0)>>>0>0)){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Me(d,g,i,i+1|0)|0}i=f[m>>2]|0;if(i|0?(n=(Qa[f[(f[i>>2]|0)+36>>2]&127](i)|0)&255,b[j>>0]=n,n=o,i=f[n+4>>2]|0,!((i|0)>0|(i|0)==0&(f[n>>2]|0)>>>0>0)):0){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Me(d,g,j,j+1|0)|0}n=f[a+32>>2]|0;i=b[n+24>>0]|0;r=X(f[n+80>>2]|0,i)|0;s=(f[f[n>>2]>>2]|0)+(f[n+48>>2]|0)|0;f[j>>2]=0;n=j+4|0;f[n>>2]=0;f[j+8>>2]=0;t=(r|0)==0;do if(!t)if(r>>>0>1073741823)aq(j);else{v=r<<2;w=ln(v)|0;f[j>>2]=w;x=w+(r<<2)|0;f[j+8>>2]=x;sj(w|0,0,v|0)|0;f[n>>2]=x;y=w;break}else y=0;while(0);w=f[m>>2]|0;do if(w){Ta[f[(f[w>>2]|0)+44>>2]&31](w,s,y,r,i,f[c>>2]|0)|0;x=f[m>>2]|0;if(!x){z=s;A=f[j>>2]|0;p=20;break}if(!(Qa[f[(f[x>>2]|0)+32>>2]&127](x)|0)){x=f[j>>2]|0;z=f[m>>2]|0?x:s;A=x;p=20}}else{z=s;A=y;p=20}while(0);if((p|0)==20)xm(z,r,A);A=a+4|0;a=f[A>>2]|0;do if(a){z=f[a+48>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;y=ln(48)|0;f[g>>2]=y;f[g+8>>2]=-2147483600;f[g+4>>2]=34;s=y;w=10697;x=s+34|0;do{b[s>>0]=b[w>>0]|0;s=s+1|0;w=w+1|0}while((s|0)<(x|0));b[y+34>>0]=0;w=Yj(z,g,1)|0;if((b[g+11>>0]|0)<0)Oq(f[g>>2]|0);if(!w){if(!t){w=f[j>>2]|0;s=0;x=0;do{x=f[w+(s<<2)>>2]|x;s=s+1|0}while((s|0)!=(r|0));if(x)B=((_(x|0)|0)>>>3^3)+1|0;else B=1}else B=1;b[k>>0]=0;s=o;w=f[s>>2]|0;z=f[s+4>>2]|0;if((z|0)>0|(z|0)==0&w>>>0>0){C=z;D=w}else{f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Me(d,g,k,k+1|0)|0;w=o;C=f[w+4>>2]|0;D=f[w>>2]|0}b[k>>0]=B;if(!((C|0)>0|(C|0)==0&D>>>0>0)){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Me(d,g,k,k+1|0)|0}if((B|0)==(Vl(5)|0)){w=f[j>>2]|0;z=o;s=f[z+4>>2]|0;if(!((s|0)>0|(s|0)==0&(f[z>>2]|0)>>>0>0)){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Me(d,g,w,w+(r<<2)|0)|0}p=48;break}if(t)p=48;else{w=d+4|0;z=0;do{s=(f[j>>2]|0)+(z<<2)|0;y=o;v=f[y+4>>2]|0;if(!((v|0)>0|(v|0)==0&(f[y>>2]|0)>>>0>0)){f[h>>2]=f[w>>2];f[g>>2]=f[h>>2];Me(d,g,s,s+B|0)|0}z=z+1|0}while(z>>>0>>0);p=48}}else p=27}else p=27;while(0);if((p|0)==27){b[k>>0]=1;r=o;o=f[r+4>>2]|0;if(!((o|0)>0|(o|0)==0&(f[r>>2]|0)>>>0>0)){f[h>>2]=f[d+4>>2];f[g>>2]=f[h>>2];Me(d,g,k,k+1|0)|0}lp(g);k=f[A>>2]|0;if(k|0)Zj(g,10-(mi(f[k+48>>2]|0)|0)|0)|0;k=Mc(f[j>>2]|0,X((f[c+4>>2]|0)-(f[c>>2]|0)>>2,i)|0,i,g,d)|0;Ej(g,f[g+4>>2]|0);if(k)p=48;else E=0}if((p|0)==48){p=f[m>>2]|0;if(!p)E=1;else{Ra[f[(f[p>>2]|0)+40>>2]&127](p,d)|0;E=1}}d=f[j>>2]|0;if(d|0){j=f[n>>2]|0;if((j|0)!=(d|0))f[n>>2]=j+(~((j+-4-d|0)>>>2)<<2);Oq(d)}q=E}l=q;u=e;return l|0}function xc(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;b=u;u=u+48|0;c=b+24|0;d=b+12|0;e=b;g=a+32|0;h=a+8|0;i=a+12|0;j=f[i>>2]|0;k=f[h>>2]|0;l=j-k>>2;m=a+36|0;n=f[m>>2]|0;o=f[g>>2]|0;p=n-o>>2;q=o;o=n;n=k;if(l>>>0<=p>>>0)if(l>>>0

>>0?(r=q+(l<<2)|0,(r|0)!=(o|0)):0){f[m>>2]=o+(~((o+-4-r|0)>>>2)<<2);s=n;t=k;v=j}else{s=n;t=k;v=j}else{Ci(g,l-p|0);p=f[h>>2]|0;s=p;t=p;v=f[i>>2]|0}p=v-t|0;l=p>>2;f[c>>2]=0;j=c+4|0;f[j>>2]=0;k=c+8|0;f[k>>2]=0;if(l|0){if((p|0)<0)aq(c);p=((l+-1|0)>>>5)+1|0;n=ln(p<<2)|0;f[c>>2]=n;f[k>>2]=p;f[j>>2]=l;j=l>>>5;sj(n|0,0,j<<2|0)|0;p=l&31;l=n+(j<<2)|0;if(p|0)f[l>>2]=f[l>>2]&~(-1>>>(32-p|0))}p=a+20|0;l=0;j=s;s=t;t=v;while(1){if(l>>>0>2>>>0){w=0;x=0;y=l;z=s;A=j}else{B=25;break}while(1){v=x>>>5;n=1<<(x&31);do if(!(f[(f[c>>2]|0)+(v<<2)>>2]&n)){k=f[A+(x<<2)>>2]|0;if((f[k+8>>2]|0)!=(f[k+4>>2]|0)){r=0;o=1;m=A;q=k;while(1){k=f[(f[q+4>>2]|0)+(r<<2)>>2]|0;C=0;D=m;while(1){E=f[D+(x<<2)>>2]|0;if((C|0)>=(Ra[f[(f[E>>2]|0)+24>>2]&127](E,k)|0)){F=o;break}E=f[(f[h>>2]|0)+(x<<2)>>2]|0;G=Sa[f[(f[E>>2]|0)+28>>2]&31](E,k,C)|0;if((G|0)!=(x|0)?(E=f[(f[p>>2]|0)+(G<<2)>>2]|0,(1<<(E&31)&f[(f[c>>2]|0)+(E>>>5<<2)>>2]|0)==0):0){F=0;break}C=C+1|0;D=f[h>>2]|0}r=r+1|0;m=f[h>>2]|0;q=f[m+(x<<2)>>2]|0;if(r>>>0>=(f[q+8>>2]|0)-(f[q+4>>2]|0)>>2>>>0)break;else o=F}o=m;if(F)H=o;else{I=w;J=y;K=o;break}}else H=z;f[(f[g>>2]|0)+(y<<2)>>2]=x;o=(f[c>>2]|0)+(v<<2)|0;f[o>>2]=f[o>>2]|n;I=1;J=y+1|0;K=H}else{I=w;J=y;K=z}while(0);x=x+1|0;L=f[i>>2]|0;M=L-K>>2;A=K;if(x>>>0>=M>>>0)break;else{w=I;y=J;z=K}}if(J>>>0>>0&(I^1)){N=0;break}else{l=J;j=A;s=K;t=L}}if((B|0)==25){f[d>>2]=0;B=d+4|0;f[B>>2]=0;f[d+8>>2]=0;L=f[a+4>>2]|0;a=(f[L+12>>2]|0)-(f[L+8>>2]|0)|0;L=a>>2;f[e>>2]=0;K=e+4|0;f[K>>2]=0;A=e+8|0;f[A>>2]=0;if(L|0){if((a|0)<0)aq(e);a=((L+-1|0)>>>5)+1|0;J=ln(a<<2)|0;f[e>>2]=J;f[A>>2]=a;f[K>>2]=L;K=L>>>5;sj(J|0,0,K<<2|0)|0;a=L&31;L=J+(K<<2)|0;if(a|0)f[L>>2]=f[L>>2]&~(-1>>>(32-a|0))}a:do if((t|0)==(s|0))O=1;else{a=0;L=j;K=s;J=t;while(1){A=f[(f[g>>2]|0)+(a<<2)>>2]|0;l=f[L+(A<<2)>>2]|0;I=(f[l+8>>2]|0)-(f[l+4>>2]|0)|0;l=I>>2;if((I|0)<8){P=K;Q=J}else{I=f[B>>2]|0;M=f[d>>2]|0;z=I-M>>2;y=M;M=I;if(l>>>0<=z>>>0)if(l>>>0>>0?(I=y+(l<<2)|0,(I|0)!=(M|0)):0){f[B>>2]=M+(~((M+-4-I|0)>>>2)<<2);R=0}else R=0;else{Ci(d,l-z|0);R=0}while(1){if((R|0)<(l|0)){S=0;T=0;U=R}else break;while(1){z=f[(f[h>>2]|0)+(A<<2)>>2]|0;I=f[(f[z+4>>2]|0)+(S<<2)>>2]|0;M=S>>>5;y=1<<(S&31);if(!(f[(f[e>>2]|0)+(M<<2)>>2]&y)){w=0;x=1;H=z;while(1){if((w|0)>=(Ra[f[(f[H>>2]|0)+24>>2]&127](H,I)|0)){V=x;break}z=f[(f[h>>2]|0)+(A<<2)>>2]|0;F=Sa[f[(f[z>>2]|0)+28>>2]&31](z,I,w)|0;z=(f[(f[e>>2]|0)+(F>>>5<<2)>>2]&1<<(F&31)|0)!=0;F=x&z;if(!z){V=F;break}w=w+1|0;x=F;H=f[(f[h>>2]|0)+(A<<2)>>2]|0}if(V){f[(f[d>>2]|0)+(U<<2)>>2]=S;H=(f[e>>2]|0)+(M<<2)|0;f[H>>2]=f[H>>2]|y;W=1;X=U+1|0}else{W=T;X=U}}else{W=T;X=U}S=S+1|0;if((S|0)>=(l|0))break;else{T=W;U=X}}if(W|(X|0)>=(l|0))R=X;else{O=0;break a}}bg(f[(f[h>>2]|0)+(A<<2)>>2]|0,d);P=f[h>>2]|0;Q=f[i>>2]|0}a=a+1|0;if(a>>>0>=Q-P>>2>>>0){O=1;break}else{L=P;K=P;J=Q}}}while(0);Q=f[e>>2]|0;if(Q|0)Oq(Q);Q=f[d>>2]|0;if(Q|0){d=f[B>>2]|0;if((d|0)!=(Q|0))f[B>>2]=d+(~((d+-4-Q|0)>>>2)<<2);Oq(Q)}N=O}O=f[c>>2]|0;if(!O){u=b;return N|0}Oq(O);u=b;return N|0}function yc(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!a)return;b=a+-8|0;c=f[4788]|0;d=f[a+-4>>2]|0;a=d&-8;e=b+a|0;do if(!(d&1)){g=f[b>>2]|0;if(!(d&3))return;h=b+(0-g)|0;i=g+a|0;if(h>>>0>>0)return;if((f[4789]|0)==(h|0)){j=e+4|0;k=f[j>>2]|0;if((k&3|0)!=3){l=h;m=i;n=h;break}f[4786]=i;f[j>>2]=k&-2;f[h+4>>2]=i|1;f[h+i>>2]=i;return}k=g>>>3;if(g>>>0<256){g=f[h+8>>2]|0;j=f[h+12>>2]|0;if((j|0)==(g|0)){f[4784]=f[4784]&~(1<>2]=j;f[j+8>>2]=g;l=h;m=i;n=h;break}}g=f[h+24>>2]|0;j=f[h+12>>2]|0;do if((j|0)==(h|0)){k=h+16|0;o=k+4|0;p=f[o>>2]|0;if(!p){q=f[k>>2]|0;if(!q){r=0;break}else{s=q;t=k}}else{s=p;t=o}while(1){o=s+20|0;p=f[o>>2]|0;if(p|0){s=p;t=o;continue}o=s+16|0;p=f[o>>2]|0;if(!p)break;else{s=p;t=o}}f[t>>2]=0;r=s}else{o=f[h+8>>2]|0;f[o+12>>2]=j;f[j+8>>2]=o;r=j}while(0);if(g){j=f[h+28>>2]|0;o=19440+(j<<2)|0;if((f[o>>2]|0)==(h|0)){f[o>>2]=r;if(!r){f[4785]=f[4785]&~(1<>2]|0)!=(h|0)&1)<<2)>>2]=r;if(!r){l=h;m=i;n=h;break}}f[r+24>>2]=g;j=h+16|0;o=f[j>>2]|0;if(o|0){f[r+16>>2]=o;f[o+24>>2]=r}o=f[j+4>>2]|0;if(o){f[r+20>>2]=o;f[o+24>>2]=r;l=h;m=i;n=h}else{l=h;m=i;n=h}}else{l=h;m=i;n=h}}else{l=b;m=a;n=b}while(0);if(n>>>0>=e>>>0)return;b=e+4|0;a=f[b>>2]|0;if(!(a&1))return;if(!(a&2)){if((f[4790]|0)==(e|0)){r=(f[4787]|0)+m|0;f[4787]=r;f[4790]=l;f[l+4>>2]=r|1;if((l|0)!=(f[4789]|0))return;f[4789]=0;f[4786]=0;return}if((f[4789]|0)==(e|0)){r=(f[4786]|0)+m|0;f[4786]=r;f[4789]=n;f[l+4>>2]=r|1;f[n+r>>2]=r;return}r=(a&-8)+m|0;s=a>>>3;do if(a>>>0<256){t=f[e+8>>2]|0;c=f[e+12>>2]|0;if((c|0)==(t|0)){f[4784]=f[4784]&~(1<>2]=c;f[c+8>>2]=t;break}}else{t=f[e+24>>2]|0;c=f[e+12>>2]|0;do if((c|0)==(e|0)){d=e+16|0;o=d+4|0;j=f[o>>2]|0;if(!j){p=f[d>>2]|0;if(!p){u=0;break}else{v=p;w=d}}else{v=j;w=o}while(1){o=v+20|0;j=f[o>>2]|0;if(j|0){v=j;w=o;continue}o=v+16|0;j=f[o>>2]|0;if(!j)break;else{v=j;w=o}}f[w>>2]=0;u=v}else{o=f[e+8>>2]|0;f[o+12>>2]=c;f[c+8>>2]=o;u=c}while(0);if(t|0){c=f[e+28>>2]|0;h=19440+(c<<2)|0;if((f[h>>2]|0)==(e|0)){f[h>>2]=u;if(!u){f[4785]=f[4785]&~(1<>2]|0)!=(e|0)&1)<<2)>>2]=u;if(!u)break}f[u+24>>2]=t;c=e+16|0;h=f[c>>2]|0;if(h|0){f[u+16>>2]=h;f[h+24>>2]=u}h=f[c+4>>2]|0;if(h|0){f[u+20>>2]=h;f[h+24>>2]=u}}}while(0);f[l+4>>2]=r|1;f[n+r>>2]=r;if((l|0)==(f[4789]|0)){f[4786]=r;return}else x=r}else{f[b>>2]=a&-2;f[l+4>>2]=m|1;f[n+m>>2]=m;x=m}m=x>>>3;if(x>>>0<256){n=19176+(m<<1<<2)|0;a=f[4784]|0;b=1<>2]|0;z=b}f[z>>2]=l;f[y+12>>2]=l;f[l+8>>2]=y;f[l+12>>2]=n;return}n=x>>>8;if(n)if(x>>>0>16777215)A=31;else{y=(n+1048320|0)>>>16&8;z=n<>>16&4;b=z<>>16&2;a=14-(n|y|z)+(b<>>15)|0;A=x>>>(a+7|0)&1|a<<1}else A=0;a=19440+(A<<2)|0;f[l+28>>2]=A;f[l+20>>2]=0;f[l+16>>2]=0;z=f[4785]|0;b=1<>>1)|0);n=f[a>>2]|0;while(1){if((f[n+4>>2]&-8|0)==(x|0)){B=73;break}C=n+16+(y>>>31<<2)|0;m=f[C>>2]|0;if(!m){B=72;break}else{y=y<<1;n=m}}if((B|0)==72){f[C>>2]=l;f[l+24>>2]=n;f[l+12>>2]=l;f[l+8>>2]=l;break}else if((B|0)==73){y=n+8|0;t=f[y>>2]|0;f[t+12>>2]=l;f[y>>2]=l;f[l+8>>2]=t;f[l+12>>2]=n;f[l+24>>2]=0;break}}else{f[4785]=z|b;f[a>>2]=l;f[l+24>>2]=a;f[l+12>>2]=l;f[l+8>>2]=l}while(0);l=(f[4792]|0)+-1|0;f[4792]=l;if(!l)D=19592;else return;while(1){l=f[D>>2]|0;if(!l)break;else D=l+8|0}f[4792]=-1;return}function zc(a){a=a|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;c=u;u=u+32|0;e=c+4|0;g=c;h=c+16|0;i=a+52|0;j=f[i>>2]|0;k=(f[j+100>>2]|0)-(f[j+96>>2]|0)|0;j=(k|0)/12|0;l=a+44|0;ci(j,f[l>>2]|0)|0;ci(f[(f[i>>2]|0)+80>>2]|0,f[l>>2]|0)|0;m=f[a+48>>2]|0;n=ln(32)|0;f[e>>2]=n;f[e+8>>2]=-2147483616;f[e+4>>2]=21;o=n;p=15598;q=o+21|0;do{b[o>>0]=b[p>>0]|0;o=o+1|0;p=p+1|0}while((o|0)<(q|0));b[n+21>>0]=0;n=Yj(m,e,0)|0;if((b[e+11>>0]|0)<0)Oq(f[e>>2]|0);m=f[l>>2]|0;if(n){b[h>>0]=0;n=m+16|0;p=f[n+4>>2]|0;if(!((p|0)>0|(p|0)==0&(f[n>>2]|0)>>>0>0)){f[g>>2]=f[m+4>>2];f[e>>2]=f[g>>2];Me(m,e,h,h+1|0)|0}mf(a)|0;u=c;return 1}b[h>>0]=1;a=m+16|0;n=f[a+4>>2]|0;if(!((n|0)>0|(n|0)==0&(f[a>>2]|0)>>>0>0)){f[g>>2]=f[m+4>>2];f[e>>2]=f[g>>2];Me(m,e,h,h+1|0)|0}m=f[i>>2]|0;a=f[m+80>>2]|0;if(a>>>0<256){if(!k){u=c;return 1}n=h+1|0;p=h+1|0;o=h+1|0;q=0;r=m;while(1){s=f[r+96>>2]|0;t=f[l>>2]|0;b[h>>0]=f[s+(q*12|0)>>2];v=t+16|0;w=f[v>>2]|0;x=f[v+4>>2]|0;if((x|0)>0|(x|0)==0&w>>>0>0){y=w;z=t;A=x}else{f[g>>2]=f[t+4>>2];f[e>>2]=f[g>>2];Me(t,e,h,o)|0;t=f[l>>2]|0;x=t+16|0;y=f[x>>2]|0;z=t;A=f[x+4>>2]|0}b[h>>0]=f[s+(q*12|0)+4>>2];if((A|0)>0|(A|0)==0&y>>>0>0){B=A;C=y;D=z}else{f[g>>2]=f[z+4>>2];f[e>>2]=f[g>>2];Me(z,e,h,p)|0;x=f[l>>2]|0;t=x+16|0;B=f[t+4>>2]|0;C=f[t>>2]|0;D=x}b[h>>0]=f[s+(q*12|0)+8>>2];if(!((B|0)>0|(B|0)==0&C>>>0>0)){f[g>>2]=f[D+4>>2];f[e>>2]=f[g>>2];Me(D,e,h,n)|0}s=q+1|0;if(s>>>0>=j>>>0)break;q=s;r=f[i>>2]|0}u=c;return 1}if(a>>>0<65536){if(!k){u=c;return 1}r=h+2|0;q=h+2|0;n=h+2|0;D=0;C=m;while(1){B=f[C+96>>2]|0;p=f[l>>2]|0;d[h>>1]=f[B+(D*12|0)>>2];z=p+16|0;y=f[z>>2]|0;A=f[z+4>>2]|0;if((A|0)>0|(A|0)==0&y>>>0>0){E=A;F=y;G=p}else{f[g>>2]=f[p+4>>2];f[e>>2]=f[g>>2];Me(p,e,h,n)|0;p=f[l>>2]|0;y=p+16|0;E=f[y+4>>2]|0;F=f[y>>2]|0;G=p}d[h>>1]=f[B+(D*12|0)+4>>2];if((E|0)>0|(E|0)==0&F>>>0>0){H=E;I=F;J=G}else{f[g>>2]=f[G+4>>2];f[e>>2]=f[g>>2];Me(G,e,h,q)|0;p=f[l>>2]|0;y=p+16|0;H=f[y+4>>2]|0;I=f[y>>2]|0;J=p}d[h>>1]=f[B+(D*12|0)+8>>2];if(!((H|0)>0|(H|0)==0&I>>>0>0)){f[g>>2]=f[J+4>>2];f[e>>2]=f[g>>2];Me(J,e,h,r)|0}B=D+1|0;if(B>>>0>=j>>>0)break;D=B;C=f[i>>2]|0}u=c;return 1}C=(k|0)!=0;if(a>>>0<2097152){if(C){K=0;L=m}else{u=c;return 1}while(1){a=f[L+96>>2]|0;ci(f[a+(K*12|0)>>2]|0,f[l>>2]|0)|0;ci(f[a+(K*12|0)+4>>2]|0,f[l>>2]|0)|0;ci(f[a+(K*12|0)+8>>2]|0,f[l>>2]|0)|0;a=K+1|0;if(a>>>0>=j>>>0)break;K=a;L=f[i>>2]|0}u=c;return 1}if(!C){u=c;return 1}C=0;L=m;while(1){m=(f[L+96>>2]|0)+(C*12|0)|0;K=f[l>>2]|0;a=K+16|0;k=f[a+4>>2]|0;if(!((k|0)>0|(k|0)==0&(f[a>>2]|0)>>>0>0)){f[g>>2]=f[K+4>>2];f[e>>2]=f[g>>2];Me(K,e,m,m+12|0)|0}m=C+1|0;if(m>>>0>=j>>>0)break;C=m;L=f[i>>2]|0}u=c;return 1}function Ac(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=Oa,w=Oa,x=Oa,y=Oa,z=0,A=0,B=0,C=Oa,D=Oa,E=Oa,F=Oa,G=Oa,H=Oa,I=Oa,K=Oa,M=Oa,N=Oa,O=Oa,P=0,Q=Oa,R=Oa,S=0;g=u;u=u+48|0;h=g+40|0;i=g+36|0;j=g+24|0;k=g+12|0;l=g;m=a+28|0;o=f[c>>2]|0;c=o+1|0;if((o|0)!=-1){p=((c>>>0)%3|0|0)==0?o+-2|0:c;c=o+(((o>>>0)%3|0|0)==0?2:-1)|0;if((p|0)==-1)q=-1;else q=f[(f[f[m>>2]>>2]|0)+(p<<2)>>2]|0;if((c|0)==-1){r=-1;s=q}else{r=f[(f[f[m>>2]>>2]|0)+(c<<2)>>2]|0;s=q}}else{r=-1;s=-1}q=f[a+32>>2]|0;c=f[q>>2]|0;m=(f[q+4>>2]|0)-c>>2;if(m>>>0<=s>>>0)aq(q);p=c;c=f[p+(s<<2)>>2]|0;if(m>>>0<=r>>>0)aq(q);q=f[p+(r<<2)>>2]|0;r=(c|0)<(e|0);if(!(r&(q|0)<(e|0))){do if(r)t=c;else{if((e|0)>0){t=e+-1|0;break}p=a+52|0;if((f[p>>2]|0)<=0){u=g;return}m=f[a+48>>2]|0;s=0;do{f[m+(s<<2)>>2]=0;s=s+1|0}while((s|0)<(f[p>>2]|0));u=g;return}while(0);r=a+52|0;p=f[r>>2]|0;s=X(p,t)|0;if((p|0)<=0){u=g;return}p=f[a+48>>2]|0;t=0;do{f[p+(t<<2)>>2]=f[d+(t+s<<2)>>2];t=t+1|0}while((t|0)<(f[r>>2]|0));u=g;return}r=a+52|0;t=f[r>>2]|0;s=X(t,c)|0;v=$(f[d+(s<<2)>>2]|0);w=$(f[d+(s+1<<2)>>2]|0);s=X(t,q)|0;x=$(f[d+(s<<2)>>2]|0);y=$(f[d+(s+1<<2)>>2]|0);if(!(x!=v|y!=w)){s=f[a+48>>2]|0;f[s>>2]=~~x;f[s+4>>2]=~~y;u=g;return}s=a+44|0;t=f[(f[s>>2]|0)+(e<<2)>>2]|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;p=a+40|0;m=f[p>>2]|0;if(!(b[m+84>>0]|0))z=f[(f[m+68>>2]|0)+(t<<2)>>2]|0;else z=t;f[i>>2]=z;z=b[m+24>>0]|0;f[h>>2]=f[i>>2];mb(m,h,z,j)|0;z=f[(f[s>>2]|0)+(c<<2)>>2]|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;c=f[p>>2]|0;if(!(b[c+84>>0]|0))A=f[(f[c+68>>2]|0)+(z<<2)>>2]|0;else A=z;f[i>>2]=A;A=b[c+24>>0]|0;f[h>>2]=f[i>>2];mb(c,h,A,k)|0;A=f[(f[s>>2]|0)+(q<<2)>>2]|0;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;q=f[p>>2]|0;if(!(b[q+84>>0]|0))B=f[(f[q+68>>2]|0)+(A<<2)>>2]|0;else B=A;f[i>>2]=B;B=b[q+24>>0]|0;f[h>>2]=f[i>>2];mb(q,h,B,l)|0;C=$(n[l>>2]);D=$(n[k>>2]);E=$(C-D);C=$(n[l+4>>2]);F=$(n[k+4>>2]);G=$(C-F);C=$(n[l+8>>2]);H=$(n[k+8>>2]);I=$(C-H);C=$($(n[j>>2])-D);D=$($(n[j+4>>2])-F);F=$($(n[j+8>>2])-H);H=$($($($(E*E)+$(0.0))+$(G*G))+$(I*I));if(H>$(0.0)){K=$($($($($(E*C)+$(0.0))+$(G*D))+$(I*F))/H);M=$(C-$(E*K));E=$(D-$(G*K));G=$(F-$(I*K));N=K;O=$(L($($($(G*G)+$($(E*E)+$($(M*M)+$(0.0))))/H)))}else{N=$(0.0);O=$(0.0)}H=$(x-v);x=$(y-w);y=$($(H*N)+v);v=$(H*O);H=$($(x*N)+w);w=$(x*O);O=$(y-w);x=$(H+v);N=$(y+w);w=$(H-v);j=X(f[r>>2]|0,e)|0;v=$(f[d+(j<<2)>>2]|0);H=$(f[d+(j+1<<2)>>2]|0);y=$(v-O);M=$(H-x);E=$(v-N);v=$(H-w);j=$($($(y*y)+$(0.0))+$(M*M))<$($($(E*E)+$(0.0))+$(v*v));d=a+56|0;e=a+60|0;r=f[e>>2]|0;k=f[a+64>>2]|0;l=(r|0)==(k<<5|0);if(j){do if(l)if((r+1|0)<0)aq(d);else{j=k<<6;B=r+32&-32;vi(d,r>>>0<1073741823?(j>>>0>>0?B:j):2147483647);P=f[e>>2]|0;break}else P=r;while(0);f[e>>2]=P+1;j=(f[d>>2]|0)+(P>>>5<<2)|0;f[j>>2]=f[j>>2]|1<<(P&31);Q=O;R=x}else{do if(l)if((r+1|0)<0)aq(d);else{P=k<<6;j=r+32&-32;vi(d,r>>>0<1073741823?(P>>>0>>0?j:P):2147483647);S=f[e>>2]|0;break}else S=r;while(0);f[e>>2]=S+1;e=(f[d>>2]|0)+(S>>>5<<2)|0;f[e>>2]=f[e>>2]&~(1<<(S&31));Q=N;R=w}S=~~+J(+(+Q+.5));e=f[a+48>>2]|0;f[e>>2]=S;S=~~+J(+(+R+.5));f[e+4>>2]=S;u=g;return}function Bc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=Oa,v=Oa,w=Oa,x=Oa,y=0,z=0,A=0,B=Oa,C=Oa,D=Oa,E=Oa,F=Oa,G=Oa,H=Oa,I=Oa,K=Oa,M=Oa,N=Oa,O=0,P=Oa,Q=Oa,R=0;g=u;u=u+48|0;h=g+40|0;i=g+36|0;j=g+24|0;k=g+12|0;l=g;m=a+28|0;o=f[c>>2]|0;c=o+1|0;do if((o|0)!=-1){p=((c>>>0)%3|0|0)==0?o+-2|0:c;if(!((o>>>0)%3|0)){q=o+2|0;r=p;break}else{q=o+-1|0;r=p;break}}else{q=-1;r=-1}while(0);o=f[(f[m>>2]|0)+28>>2]|0;m=f[o+(r<<2)>>2]|0;r=f[o+(q<<2)>>2]|0;q=f[a+32>>2]|0;o=f[q>>2]|0;c=(f[q+4>>2]|0)-o>>2;if(c>>>0<=m>>>0)aq(q);p=o;o=f[p+(m<<2)>>2]|0;if(c>>>0<=r>>>0)aq(q);q=f[p+(r<<2)>>2]|0;r=(o|0)<(e|0);if(!(r&(q|0)<(e|0))){do if(r)s=o;else{if((e|0)>0){s=e+-1|0;break}p=a+52|0;if((f[p>>2]|0)<=0){u=g;return}c=f[a+48>>2]|0;m=0;do{f[c+(m<<2)>>2]=0;m=m+1|0}while((m|0)<(f[p>>2]|0));u=g;return}while(0);r=a+52|0;p=f[r>>2]|0;m=X(p,s)|0;if((p|0)<=0){u=g;return}p=f[a+48>>2]|0;s=0;do{f[p+(s<<2)>>2]=f[d+(s+m<<2)>>2];s=s+1|0}while((s|0)<(f[r>>2]|0));u=g;return}r=a+52|0;s=f[r>>2]|0;m=X(s,o)|0;t=$(f[d+(m<<2)>>2]|0);v=$(f[d+(m+1<<2)>>2]|0);m=X(s,q)|0;w=$(f[d+(m<<2)>>2]|0);x=$(f[d+(m+1<<2)>>2]|0);if(!(w!=t|x!=v)){m=f[a+48>>2]|0;f[m>>2]=~~w;f[m+4>>2]=~~x;u=g;return}m=a+44|0;s=f[(f[m>>2]|0)+(e<<2)>>2]|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;p=a+40|0;c=f[p>>2]|0;if(!(b[c+84>>0]|0))y=f[(f[c+68>>2]|0)+(s<<2)>>2]|0;else y=s;f[i>>2]=y;y=b[c+24>>0]|0;f[h>>2]=f[i>>2];mb(c,h,y,j)|0;y=f[(f[m>>2]|0)+(o<<2)>>2]|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;o=f[p>>2]|0;if(!(b[o+84>>0]|0))z=f[(f[o+68>>2]|0)+(y<<2)>>2]|0;else z=y;f[i>>2]=z;z=b[o+24>>0]|0;f[h>>2]=f[i>>2];mb(o,h,z,k)|0;z=f[(f[m>>2]|0)+(q<<2)>>2]|0;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;q=f[p>>2]|0;if(!(b[q+84>>0]|0))A=f[(f[q+68>>2]|0)+(z<<2)>>2]|0;else A=z;f[i>>2]=A;A=b[q+24>>0]|0;f[h>>2]=f[i>>2];mb(q,h,A,l)|0;B=$(n[l>>2]);C=$(n[k>>2]);D=$(B-C);B=$(n[l+4>>2]);E=$(n[k+4>>2]);F=$(B-E);B=$(n[l+8>>2]);G=$(n[k+8>>2]);H=$(B-G);B=$($(n[j>>2])-C);C=$($(n[j+4>>2])-E);E=$($(n[j+8>>2])-G);G=$($($($(D*D)+$(0.0))+$(F*F))+$(H*H));if(G>$(0.0)){I=$($($($($(D*B)+$(0.0))+$(F*C))+$(H*E))/G);K=$(B-$(D*I));D=$(C-$(F*I));F=$(E-$(H*I));M=I;N=$(L($($($(F*F)+$($(D*D)+$($(K*K)+$(0.0))))/G)))}else{M=$(0.0);N=$(0.0)}G=$(w-t);w=$(x-v);x=$($(G*M)+t);t=$(G*N);G=$($(w*M)+v);v=$(w*N);N=$(x-v);w=$(G+t);M=$(x+v);v=$(G-t);j=X(f[r>>2]|0,e)|0;t=$(f[d+(j<<2)>>2]|0);G=$(f[d+(j+1<<2)>>2]|0);x=$(t-N);K=$(G-w);D=$(t-M);t=$(G-v);j=$($($(x*x)+$(0.0))+$(K*K))<$($($(D*D)+$(0.0))+$(t*t));d=a+56|0;e=a+60|0;r=f[e>>2]|0;k=f[a+64>>2]|0;l=(r|0)==(k<<5|0);if(j){do if(l)if((r+1|0)<0)aq(d);else{j=k<<6;A=r+32&-32;vi(d,r>>>0<1073741823?(j>>>0>>0?A:j):2147483647);O=f[e>>2]|0;break}else O=r;while(0);f[e>>2]=O+1;j=(f[d>>2]|0)+(O>>>5<<2)|0;f[j>>2]=f[j>>2]|1<<(O&31);P=N;Q=w}else{do if(l)if((r+1|0)<0)aq(d);else{O=k<<6;j=r+32&-32;vi(d,r>>>0<1073741823?(O>>>0>>0?j:O):2147483647);R=f[e>>2]|0;break}else R=r;while(0);f[e>>2]=R+1;e=(f[d>>2]|0)+(R>>>5<<2)|0;f[e>>2]=f[e>>2]&~(1<<(R&31));P=M;Q=v}R=~~+J(+(+P+.5));e=f[a+48>>2]|0;f[e>>2]=R;R=~~+J(+(+Q+.5));f[e+4>>2]=R;u=g;return}function Cc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=Oa,w=Oa,x=Oa,y=Oa,z=0,A=0,B=0,C=Oa,D=Oa,E=Oa,F=Oa,G=Oa,H=Oa,I=Oa,K=Oa,M=Oa,N=Oa,O=Oa,P=0,Q=Oa,R=Oa,S=0;g=u;u=u+48|0;h=g+40|0;i=g+36|0;j=g+24|0;k=g+12|0;l=g;m=a+48|0;o=f[c>>2]|0;c=o+1|0;if((o|0)!=-1){p=((c>>>0)%3|0|0)==0?o+-2|0:c;c=o+(((o>>>0)%3|0|0)==0?2:-1)|0;if((p|0)==-1)q=-1;else q=f[(f[f[m>>2]>>2]|0)+(p<<2)>>2]|0;if((c|0)==-1){r=-1;s=q}else{r=f[(f[f[m>>2]>>2]|0)+(c<<2)>>2]|0;s=q}}else{r=-1;s=-1}q=f[a+52>>2]|0;c=f[q>>2]|0;m=(f[q+4>>2]|0)-c>>2;if(m>>>0<=s>>>0)aq(q);p=c;c=f[p+(s<<2)>>2]|0;if(m>>>0<=r>>>0)aq(q);q=f[p+(r<<2)>>2]|0;r=(c|0)<(e|0);if(!(r&(q|0)<(e|0))){do if(r)t=c;else{if((e|0)>0){t=e+-1|0;break}p=a+72|0;if((f[p>>2]|0)<=0){u=g;return}m=f[a+68>>2]|0;s=0;do{f[m+(s<<2)>>2]=0;s=s+1|0}while((s|0)<(f[p>>2]|0));u=g;return}while(0);r=a+72|0;p=f[r>>2]|0;s=X(p,t)|0;if((p|0)<=0){u=g;return}p=f[a+68>>2]|0;t=0;do{f[p+(t<<2)>>2]=f[d+(t+s<<2)>>2];t=t+1|0}while((t|0)<(f[r>>2]|0));u=g;return}r=a+72|0;t=f[r>>2]|0;s=X(t,c)|0;v=$(f[d+(s<<2)>>2]|0);w=$(f[d+(s+1<<2)>>2]|0);s=X(t,q)|0;x=$(f[d+(s<<2)>>2]|0);y=$(f[d+(s+1<<2)>>2]|0);if(!(x!=v|y!=w)){s=f[a+68>>2]|0;f[s>>2]=~~x;f[s+4>>2]=~~y;u=g;return}s=a+64|0;t=f[(f[s>>2]|0)+(e<<2)>>2]|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;p=a+60|0;m=f[p>>2]|0;if(!(b[m+84>>0]|0))z=f[(f[m+68>>2]|0)+(t<<2)>>2]|0;else z=t;f[i>>2]=z;z=b[m+24>>0]|0;f[h>>2]=f[i>>2];mb(m,h,z,j)|0;z=f[(f[s>>2]|0)+(c<<2)>>2]|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;c=f[p>>2]|0;if(!(b[c+84>>0]|0))A=f[(f[c+68>>2]|0)+(z<<2)>>2]|0;else A=z;f[i>>2]=A;A=b[c+24>>0]|0;f[h>>2]=f[i>>2];mb(c,h,A,k)|0;A=f[(f[s>>2]|0)+(q<<2)>>2]|0;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;q=f[p>>2]|0;if(!(b[q+84>>0]|0))B=f[(f[q+68>>2]|0)+(A<<2)>>2]|0;else B=A;f[i>>2]=B;B=b[q+24>>0]|0;f[h>>2]=f[i>>2];mb(q,h,B,l)|0;C=$(n[l>>2]);D=$(n[k>>2]);E=$(C-D);C=$(n[l+4>>2]);F=$(n[k+4>>2]);G=$(C-F);C=$(n[l+8>>2]);H=$(n[k+8>>2]);I=$(C-H);C=$($(n[j>>2])-D);D=$($(n[j+4>>2])-F);F=$($(n[j+8>>2])-H);H=$($($($(E*E)+$(0.0))+$(G*G))+$(I*I));if(H>$(0.0)){K=$($($($($(E*C)+$(0.0))+$(G*D))+$(I*F))/H);M=$(C-$(E*K));E=$(D-$(G*K));G=$(F-$(I*K));N=K;O=$(L($($($(G*G)+$($(E*E)+$($(M*M)+$(0.0))))/H)))}else{N=$(0.0);O=$(0.0)}H=$(x-v);x=$(y-w);y=$($(H*N)+v);v=$(H*O);H=$($(x*N)+w);w=$(x*O);O=$(y-w);x=$(H+v);N=$(y+w);w=$(H-v);j=X(f[r>>2]|0,e)|0;v=$(f[d+(j<<2)>>2]|0);H=$(f[d+(j+1<<2)>>2]|0);y=$(v-O);M=$(H-x);E=$(v-N);v=$(H-w);j=$($($(y*y)+$(0.0))+$(M*M))<$($($(E*E)+$(0.0))+$(v*v));d=a+76|0;e=a+80|0;r=f[e>>2]|0;k=f[a+84>>2]|0;l=(r|0)==(k<<5|0);if(j){do if(l)if((r+1|0)<0)aq(d);else{j=k<<6;B=r+32&-32;vi(d,r>>>0<1073741823?(j>>>0>>0?B:j):2147483647);P=f[e>>2]|0;break}else P=r;while(0);f[e>>2]=P+1;j=(f[d>>2]|0)+(P>>>5<<2)|0;f[j>>2]=f[j>>2]|1<<(P&31);Q=O;R=x}else{do if(l)if((r+1|0)<0)aq(d);else{P=k<<6;j=r+32&-32;vi(d,r>>>0<1073741823?(P>>>0>>0?j:P):2147483647);S=f[e>>2]|0;break}else S=r;while(0);f[e>>2]=S+1;e=(f[d>>2]|0)+(S>>>5<<2)|0;f[e>>2]=f[e>>2]&~(1<<(S&31));Q=N;R=w}S=~~+J(+(+Q+.5));e=f[a+68>>2]|0;f[e>>2]=S;S=~~+J(+(+R+.5));f[e+4>>2]=S;u=g;return}function Dc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=Oa,v=Oa,w=Oa,x=Oa,y=0,z=0,A=0,B=Oa,C=Oa,D=Oa,E=Oa,F=Oa,G=Oa,H=Oa,I=Oa,K=Oa,M=Oa,N=Oa,O=0,P=Oa,Q=Oa,R=0;g=u;u=u+48|0;h=g+40|0;i=g+36|0;j=g+24|0;k=g+12|0;l=g;m=a+48|0;o=f[c>>2]|0;c=o+1|0;do if((o|0)!=-1){p=((c>>>0)%3|0|0)==0?o+-2|0:c;if(!((o>>>0)%3|0)){q=o+2|0;r=p;break}else{q=o+-1|0;r=p;break}}else{q=-1;r=-1}while(0);o=f[(f[m>>2]|0)+28>>2]|0;m=f[o+(r<<2)>>2]|0;r=f[o+(q<<2)>>2]|0;q=f[a+52>>2]|0;o=f[q>>2]|0;c=(f[q+4>>2]|0)-o>>2;if(c>>>0<=m>>>0)aq(q);p=o;o=f[p+(m<<2)>>2]|0;if(c>>>0<=r>>>0)aq(q);q=f[p+(r<<2)>>2]|0;r=(o|0)<(e|0);if(!(r&(q|0)<(e|0))){do if(r)s=o;else{if((e|0)>0){s=e+-1|0;break}p=a+72|0;if((f[p>>2]|0)<=0){u=g;return}c=f[a+68>>2]|0;m=0;do{f[c+(m<<2)>>2]=0;m=m+1|0}while((m|0)<(f[p>>2]|0));u=g;return}while(0);r=a+72|0;p=f[r>>2]|0;m=X(p,s)|0;if((p|0)<=0){u=g;return}p=f[a+68>>2]|0;s=0;do{f[p+(s<<2)>>2]=f[d+(s+m<<2)>>2];s=s+1|0}while((s|0)<(f[r>>2]|0));u=g;return}r=a+72|0;s=f[r>>2]|0;m=X(s,o)|0;t=$(f[d+(m<<2)>>2]|0);v=$(f[d+(m+1<<2)>>2]|0);m=X(s,q)|0;w=$(f[d+(m<<2)>>2]|0);x=$(f[d+(m+1<<2)>>2]|0);if(!(w!=t|x!=v)){m=f[a+68>>2]|0;f[m>>2]=~~w;f[m+4>>2]=~~x;u=g;return}m=a+64|0;s=f[(f[m>>2]|0)+(e<<2)>>2]|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;p=a+60|0;c=f[p>>2]|0;if(!(b[c+84>>0]|0))y=f[(f[c+68>>2]|0)+(s<<2)>>2]|0;else y=s;f[i>>2]=y;y=b[c+24>>0]|0;f[h>>2]=f[i>>2];mb(c,h,y,j)|0;y=f[(f[m>>2]|0)+(o<<2)>>2]|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;o=f[p>>2]|0;if(!(b[o+84>>0]|0))z=f[(f[o+68>>2]|0)+(y<<2)>>2]|0;else z=y;f[i>>2]=z;z=b[o+24>>0]|0;f[h>>2]=f[i>>2];mb(o,h,z,k)|0;z=f[(f[m>>2]|0)+(q<<2)>>2]|0;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;q=f[p>>2]|0;if(!(b[q+84>>0]|0))A=f[(f[q+68>>2]|0)+(z<<2)>>2]|0;else A=z;f[i>>2]=A;A=b[q+24>>0]|0;f[h>>2]=f[i>>2];mb(q,h,A,l)|0;B=$(n[l>>2]);C=$(n[k>>2]);D=$(B-C);B=$(n[l+4>>2]);E=$(n[k+4>>2]);F=$(B-E);B=$(n[l+8>>2]);G=$(n[k+8>>2]);H=$(B-G);B=$($(n[j>>2])-C);C=$($(n[j+4>>2])-E);E=$($(n[j+8>>2])-G);G=$($($($(D*D)+$(0.0))+$(F*F))+$(H*H));if(G>$(0.0)){I=$($($($($(D*B)+$(0.0))+$(F*C))+$(H*E))/G);K=$(B-$(D*I));D=$(C-$(F*I));F=$(E-$(H*I));M=I;N=$(L($($($(F*F)+$($(D*D)+$($(K*K)+$(0.0))))/G)))}else{M=$(0.0);N=$(0.0)}G=$(w-t);w=$(x-v);x=$($(G*M)+t);t=$(G*N);G=$($(w*M)+v);v=$(w*N);N=$(x-v);w=$(G+t);M=$(x+v);v=$(G-t);j=X(f[r>>2]|0,e)|0;t=$(f[d+(j<<2)>>2]|0);G=$(f[d+(j+1<<2)>>2]|0);x=$(t-N);K=$(G-w);D=$(t-M);t=$(G-v);j=$($($(x*x)+$(0.0))+$(K*K))<$($($(D*D)+$(0.0))+$(t*t));d=a+76|0;e=a+80|0;r=f[e>>2]|0;k=f[a+84>>2]|0;l=(r|0)==(k<<5|0);if(j){do if(l)if((r+1|0)<0)aq(d);else{j=k<<6;A=r+32&-32;vi(d,r>>>0<1073741823?(j>>>0>>0?A:j):2147483647);O=f[e>>2]|0;break}else O=r;while(0);f[e>>2]=O+1;j=(f[d>>2]|0)+(O>>>5<<2)|0;f[j>>2]=f[j>>2]|1<<(O&31);P=N;Q=w}else{do if(l)if((r+1|0)<0)aq(d);else{O=k<<6;j=r+32&-32;vi(d,r>>>0<1073741823?(O>>>0>>0?j:O):2147483647);R=f[e>>2]|0;break}else R=r;while(0);f[e>>2]=R+1;e=(f[d>>2]|0)+(R>>>5<<2)|0;f[e>>2]=f[e>>2]&~(1<<(R&31));P=M;Q=v}R=~~+J(+(+P+.5));e=f[a+68>>2]|0;f[e>>2]=R;R=~~+J(+(+Q+.5));f[e+4>>2]=R;u=g;return}function Ec(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=Oa,F=Oa,G=Oa,H=0,I=0,J=0,K=0;d=b[c+11>>0]|0;e=d<<24>>24<0;g=e?f[c>>2]|0:c;i=e?f[c+4>>2]|0:d&255;if(i>>>0>3){d=g;e=i;j=i;while(1){k=X(h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24,1540483477)|0;e=(X(k>>>24^k,1540483477)|0)^(X(e,1540483477)|0);j=j+-4|0;if(j>>>0<=3)break;else d=d+4|0}d=i+-4|0;j=d&-4;l=d-j|0;m=g+(j+4)|0;o=e}else{l=i;m=g;o=i}switch(l|0){case 3:{p=h[m+2>>0]<<16^o;q=6;break}case 2:{p=o;q=6;break}case 1:{r=o;q=7;break}default:s=o}if((q|0)==6){r=h[m+1>>0]<<8^p;q=7}if((q|0)==7)s=X(r^h[m>>0],1540483477)|0;m=X(s>>>13^s,1540483477)|0;s=m>>>15^m;m=a+4|0;r=f[m>>2]|0;p=(r|0)==0;a:do if(!p){o=r+-1|0;l=(o&r|0)==0;if(!l)if(s>>>0>>0)t=s;else t=(s>>>0)%(r>>>0)|0;else t=s&o;e=f[(f[a>>2]|0)+(t<<2)>>2]|0;if((e|0)!=0?(j=f[e>>2]|0,(j|0)!=0):0){e=(i|0)==0;if(l){if(e){l=j;while(1){d=f[l+4>>2]|0;if(!((d|0)==(s|0)|(d&o|0)==(t|0))){u=t;break a}d=b[l+8+11>>0]|0;if(!((d<<24>>24<0?f[l+12>>2]|0:d&255)|0)){v=l;break}l=f[l>>2]|0;if(!l){u=t;break a}}w=v+20|0;return w|0}else x=j;b:while(1){l=f[x+4>>2]|0;if(!((l|0)==(s|0)|(l&o|0)==(t|0))){u=t;break a}l=x+8|0;d=b[l+11>>0]|0;k=d<<24>>24<0;y=d&255;do if(((k?f[x+12>>2]|0:y)|0)==(i|0)){d=f[l>>2]|0;if(k)if(!(Vk(d,g,i)|0)){v=x;q=63;break b}else break;if((b[g>>0]|0)==(d&255)<<24>>24){d=l;z=y;A=g;do{z=z+-1|0;d=d+1|0;if(!z){v=x;q=63;break b}A=A+1|0}while((b[d>>0]|0)==(b[A>>0]|0))}}while(0);x=f[x>>2]|0;if(!x){u=t;break a}}if((q|0)==63){w=v+20|0;return w|0}}if(e){o=j;while(1){y=f[o+4>>2]|0;if((y|0)!=(s|0)){if(y>>>0>>0)B=y;else B=(y>>>0)%(r>>>0)|0;if((B|0)!=(t|0)){u=t;break a}}y=b[o+8+11>>0]|0;if(!((y<<24>>24<0?f[o+12>>2]|0:y&255)|0)){v=o;break}o=f[o>>2]|0;if(!o){u=t;break a}}w=v+20|0;return w|0}else C=j;c:while(1){o=f[C+4>>2]|0;if((o|0)!=(s|0)){if(o>>>0>>0)D=o;else D=(o>>>0)%(r>>>0)|0;if((D|0)!=(t|0)){u=t;break a}}o=C+8|0;e=b[o+11>>0]|0;y=e<<24>>24<0;l=e&255;do if(((y?f[C+12>>2]|0:l)|0)==(i|0)){e=f[o>>2]|0;if(y)if(!(Vk(e,g,i)|0)){v=C;q=63;break c}else break;if((b[g>>0]|0)==(e&255)<<24>>24){e=o;k=l;A=g;do{k=k+-1|0;e=e+1|0;if(!k){v=C;q=63;break c}A=A+1|0}while((b[e>>0]|0)==(b[A>>0]|0))}}while(0);C=f[C>>2]|0;if(!C){u=t;break a}}if((q|0)==63){w=v+20|0;return w|0}}else u=t}else u=0;while(0);t=ln(24)|0;pj(t+8|0,c);f[t+20>>2]=0;f[t+4>>2]=s;f[t>>2]=0;c=a+12|0;E=$(((f[c>>2]|0)+1|0)>>>0);F=$(r>>>0);G=$(n[a+16>>2]);do if(p|$(G*F)>>0<3|(r+-1&r|0)!=0)&1;g=~~$(W($(E/G)))>>>0;ei(a,C>>>0>>0?g:C);C=f[m>>2]|0;g=C+-1|0;if(!(g&C)){H=C;I=g&s;break}if(s>>>0>>0){H=C;I=s}else{H=C;I=(s>>>0)%(C>>>0)|0}}else{H=r;I=u}while(0);u=(f[a>>2]|0)+(I<<2)|0;I=f[u>>2]|0;if(!I){r=a+8|0;f[t>>2]=f[r>>2];f[r>>2]=t;f[u>>2]=r;r=f[t>>2]|0;if(r|0){u=f[r+4>>2]|0;r=H+-1|0;if(r&H)if(u>>>0>>0)J=u;else J=(u>>>0)%(H>>>0)|0;else J=u&r;K=(f[a>>2]|0)+(J<<2)|0;q=61}}else{f[t>>2]=f[I>>2];K=I;q=61}if((q|0)==61)f[K>>2]=t;f[c>>2]=(f[c>>2]|0)+1;v=t;w=v+20|0;return w|0}function Fc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0.0,G=0.0,H=0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0,Q=0.0,R=0.0,S=0,T=0.0,U=0,V=0,W=0,X=0.0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0.0,da=0,ea=0.0;g=a+4|0;i=f[g>>2]|0;j=a+100|0;if(i>>>0<(f[j>>2]|0)>>>0){f[g>>2]=i+1;k=h[i>>0]|0;l=0}else{k=Si(a)|0;l=0}a:while(1){switch(k|0){case 46:{m=8;break a;break}case 48:break;default:{n=0;o=0;p=1.0;q=0.0;r=0;s=k;t=l;u=0;v=0;w=0;x=0;break a}}i=f[g>>2]|0;if(i>>>0<(f[j>>2]|0)>>>0){f[g>>2]=i+1;k=h[i>>0]|0;l=1;continue}else{k=Si(a)|0;l=1;continue}}if((m|0)==8){k=f[g>>2]|0;if(k>>>0<(f[j>>2]|0)>>>0){f[g>>2]=k+1;y=h[k>>0]|0}else y=Si(a)|0;if((y|0)==48){k=0;i=0;while(1){z=f[g>>2]|0;if(z>>>0<(f[j>>2]|0)>>>0){f[g>>2]=z+1;A=h[z>>0]|0}else A=Si(a)|0;z=Vn(k|0,i|0,-1,-1)|0;B=I;if((A|0)==48){k=z;i=B}else{n=1;o=0;p=1.0;q=0.0;r=0;s=A;t=1;u=0;v=0;w=z;x=B;break}}}else{n=1;o=0;p=1.0;q=0.0;r=0;s=y;t=l;u=0;v=0;w=0;x=0}}while(1){l=s+-48|0;y=s|32;if(l>>>0>=10){A=(s|0)==46;if(!(A|(y+-97|0)>>>0<6)){C=s;break}if(A)if(!n){D=1;E=o;F=p;G=q;H=r;J=t;K=v;L=u;M=v;N=u}else{C=46;break}else m=20}else m=20;if((m|0)==20){m=0;A=(s|0)>57?y+-87|0:l;do if(!((u|0)<0|(u|0)==0&v>>>0<8))if((u|0)<0|(u|0)==0&v>>>0<14){O=p*.0625;P=o;Q=O;R=q+O*+(A|0);S=r;break}else{l=(o|0)!=0|(A|0)==0;P=l?o:1;Q=p;R=l?q:q+p*.5;S=r;break}else{P=o;Q=p;R=q;S=A+(r<<4)|0}while(0);A=Vn(v|0,u|0,1,0)|0;D=n;E=P;F=Q;G=R;H=S;J=1;K=w;L=x;M=A;N=I}A=f[g>>2]|0;if(A>>>0<(f[j>>2]|0)>>>0){f[g>>2]=A+1;n=D;o=E;p=F;q=G;r=H;s=h[A>>0]|0;t=J;u=N;v=M;w=K;x=L;continue}else{n=D;o=E;p=F;q=G;r=H;s=Si(a)|0;t=J;u=N;v=M;w=K;x=L;continue}}do if(!t){L=(f[j>>2]|0)==0;if(!L)f[g>>2]=(f[g>>2]|0)+-1;if(e){if(!L)f[g>>2]=(f[g>>2]|0)+-1;if(!((n|0)==0|L))f[g>>2]=(f[g>>2]|0)+-1}else Ym(a,0);T=+(d|0)*0.0}else{L=(n|0)==0;K=L?v:w;M=L?u:x;if((u|0)<0|(u|0)==0&v>>>0<8){L=r;N=v;J=u;while(1){s=L<<4;H=N;N=Vn(N|0,J|0,1,0)|0;if(!((J|0)<0|(J|0)==0&H>>>0<7)){U=s;break}else{L=s;J=I}}}else U=r;if((C|32|0)==112){J=Re(a,e)|0;L=I;if((J|0)==0&(L|0)==-2147483648){if(!e){Ym(a,0);T=0.0;break}if(!(f[j>>2]|0)){V=0;W=0}else{f[g>>2]=(f[g>>2]|0)+-1;V=0;W=0}}else{V=J;W=L}}else if(!(f[j>>2]|0)){V=0;W=0}else{f[g>>2]=(f[g>>2]|0)+-1;V=0;W=0}L=Tn(K|0,M|0,2)|0;J=Vn(L|0,I|0,-32,-1)|0;L=Vn(J|0,I|0,V|0,W|0)|0;J=I;if(!U){T=+(d|0)*0.0;break}N=0-c|0;s=((N|0)<0)<<31>>31;if((J|0)>(s|0)|(J|0)==(s|0)&L>>>0>N>>>0){N=Vq()|0;f[N>>2]=34;T=+(d|0)*1797693134862315708145274.0e284*1797693134862315708145274.0e284;break}N=c+-106|0;s=((N|0)<0)<<31>>31;if((J|0)<(s|0)|(J|0)==(s|0)&L>>>0>>0){N=Vq()|0;f[N>>2]=34;T=+(d|0)*2.2250738585072014e-308*2.2250738585072014e-308;break}if((U|0)>-1){G=q;N=U;s=L;H=J;while(1){E=!(G>=.5);o=N<<1|(E^1)&1;F=G+(E?G:G+-1.0);E=Vn(s|0,H|0,-1,-1)|0;D=I;if((o|0)>-1){G=F;N=o;s=E;H=D}else{X=F;Y=o;Z=E;_=D;break}}}else{X=q;Y=U;Z=L;_=J}H=((b|0)<0)<<31>>31;s=Xn(32,0,c|0,((c|0)<0)<<31>>31|0)|0;N=Vn(s|0,I|0,Z|0,_|0)|0;s=I;if((s|0)<(H|0)|(s|0)==(H|0)&N>>>0>>0)if((N|0)>0){$=N;m=59}else{aa=0;ba=84;m=61}else{$=b;m=59}if((m|0)==59)if(($|0)<53){aa=$;ba=84-$|0;m=61}else{ca=0.0;da=$;ea=+(d|0)}if((m|0)==61){G=+(d|0);ca=+rq(+bk(1.0,ba),G);da=aa;ea=G}N=(Y&1|0)==0&(X!=0.0&(da|0)<32);G=(N?0.0:X)*ea+(ca+ea*+((Y+(N&1)|0)>>>0))-ca;if(!(G!=0.0)){N=Vq()|0;f[N>>2]=34}T=+sq(G,Z)}while(0);return +T}function Gc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;g=u;u=u+16|0;h=g+4|0;i=g;if(!(Gh(a,d)|0)){j=0;u=g;return j|0}d=a+84|0;k=f[d>>2]|0;l=a+88|0;m=f[l>>2]|0;if((m|0)!=(k|0))f[l>>2]=m+(~((m+-4-k|0)>>>2)<<2);f[d>>2]=0;f[l>>2]=0;f[a+92>>2]=0;if(k|0)Oq(k);k=a+72|0;l=f[k>>2]|0;d=a+76|0;if((f[d>>2]|0)!=(l|0))f[d>>2]=l;f[k>>2]=0;f[d>>2]=0;f[a+80>>2]=0;if(l|0)Oq(l);l=a+64|0;d=f[l>>2]|0;if((f[d+4>>2]|0)!=(f[d>>2]|0)){k=a+12|0;m=e+84|0;n=e+68|0;o=c+96|0;p=a+24|0;q=0;r=d;do{f[i>>2]=(q>>>0)/3|0;f[h>>2]=f[i>>2];d=_j(r,h)|0;r=f[l>>2]|0;do if(!d){s=f[(f[r+12>>2]|0)+(q<<2)>>2]|0;if((s|0)==-1){t=(f[a>>2]|0)+(q>>>5<<2)|0;f[t>>2]=f[t>>2]|1<<(q&31);t=q+1|0;v=((t>>>0)%3|0|0)==0?q+-2|0:t;if((v|0)==-1)w=-1;else w=f[(f[r>>2]|0)+(v<<2)>>2]|0;v=(f[k>>2]|0)+(w>>>5<<2)|0;f[v>>2]=f[v>>2]|1<<(w&31);v=(((q>>>0)%3|0|0)==0?2:-1)+q|0;if((v|0)==-1)x=-1;else x=f[(f[r>>2]|0)+(v<<2)>>2]|0;v=(f[k>>2]|0)+(x>>>5<<2)|0;f[v>>2]=f[v>>2]|1<<(x&31);break}if(s>>>0>=q>>>0){v=q+1|0;t=((v>>>0)%3|0|0)==0?q+-2|0:v;y=s+(((s>>>0)%3|0|0)==0?2:-1)|0;z=(t|0)==-1;if(!(b[m>>0]|0)){if(z)A=-1;else A=f[(f[o>>2]|0)+(((t|0)/3|0)*12|0)+(((t|0)%3|0)<<2)>>2]|0;B=(y|0)==-1;if(B)C=-1;else C=f[(f[o>>2]|0)+(((y|0)/3|0)*12|0)+(((y|0)%3|0)<<2)>>2]|0;D=f[n>>2]|0;if((f[D+(A<<2)>>2]|0)==(f[D+(C<<2)>>2]|0)){E=t+1|0;if(z)F=-1;else F=((E>>>0)%3|0|0)==0?t+-2|0:E;do if(!B)if(!((y>>>0)%3|0)){G=y+2|0;break}else{G=y+-1|0;break}else G=-1;while(0);if((F|0)==-1)H=-1;else H=f[(f[o>>2]|0)+(((F|0)/3|0)*12|0)+(((F|0)%3|0)<<2)>>2]|0;if((G|0)==-1)I=-1;else I=f[(f[o>>2]|0)+(((G|0)/3|0)*12|0)+(((G|0)%3|0)<<2)>>2]|0;if((f[D+(H<<2)>>2]|0)==(f[D+(I<<2)>>2]|0))break}}else{if(z)J=-1;else J=f[(f[o>>2]|0)+(((t|0)/3|0)*12|0)+(((t|0)%3|0)<<2)>>2]|0;B=(y|0)==-1;if(B)K=-1;else K=f[(f[o>>2]|0)+(((y|0)/3|0)*12|0)+(((y|0)%3|0)<<2)>>2]|0;if((J|0)==(K|0)){E=t+1|0;if(z)L=-1;else L=((E>>>0)%3|0|0)==0?t+-2|0:E;do if(!B)if(!((y>>>0)%3|0)){M=y+2|0;break}else{M=y+-1|0;break}else M=-1;while(0);if((L|0)==-1)N=-1;else N=f[(f[o>>2]|0)+(((L|0)/3|0)*12|0)+(((L|0)%3|0)<<2)>>2]|0;if((M|0)==-1)O=-1;else O=f[(f[o>>2]|0)+(((M|0)/3|0)*12|0)+(((M|0)%3|0)<<2)>>2]|0;if((N|0)==(O|0))break}}b[p>>0]=0;y=f[a>>2]|0;B=y+(q>>>5<<2)|0;f[B>>2]=f[B>>2]|1<<(q&31);B=y+(s>>>5<<2)|0;f[B>>2]=f[B>>2]|1<<(s&31);B=((v>>>0)%3|0|0)==0?q+-2|0:v;if((B|0)==-1)P=-1;else P=f[(f[r>>2]|0)+(B<<2)>>2]|0;B=(f[k>>2]|0)+(P>>>5<<2)|0;f[B>>2]=f[B>>2]|1<<(P&31);B=(((q>>>0)%3|0|0)==0?2:-1)+q|0;if((B|0)==-1)Q=-1;else Q=f[(f[r>>2]|0)+(B<<2)>>2]|0;B=(f[k>>2]|0)+(Q>>>5<<2)|0;f[B>>2]=f[B>>2]|1<<(Q&31);B=s+1|0;y=((B>>>0)%3|0|0)==0?s+-2|0:B;if((y|0)==-1)R=-1;else R=f[(f[r>>2]|0)+(y<<2)>>2]|0;y=(f[k>>2]|0)+(R>>>5<<2)|0;f[y>>2]=f[y>>2]|1<<(R&31);y=(((s>>>0)%3|0|0)==0?2:-1)+s|0;if((y|0)==-1)S=-1;else S=f[(f[r>>2]|0)+(y<<2)>>2]|0;y=(f[k>>2]|0)+(S>>>5<<2)|0;f[y>>2]=f[y>>2]|1<<(S&31)}}while(0);q=q+1|0}while(q>>>0<(f[r+4>>2]|0)-(f[r>>2]|0)>>2>>>0)}if((c|0)!=0&(e|0)!=0){Qc(a,c,e);j=1;u=g;return j|0}else{md(a,0,0);j=1;u=g;return j|0}return 0}function Hc(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;d=u;u=u+32|0;e=d+12|0;g=d+8|0;h=d+4|0;i=d;j=a+8|0;a:do if(f[j>>2]|0?(k=f[a>>2]|0,l=a+4|0,f[a>>2]=l,f[(f[l>>2]|0)+8>>2]=0,f[l>>2]=0,f[j>>2]=0,m=f[k+4>>2]|0,n=(m|0)==0?k:m,n|0):0){m=a+4|0;k=n;n=f[b>>2]|0;while(1){if((n|0)==(f[c>>2]|0))break;o=k+16|0;f[o>>2]=f[n+16>>2];if((k|0)!=(n|0)){f[h>>2]=f[n+20>>2];f[i>>2]=n+24;f[g>>2]=f[h>>2];f[e>>2]=f[i>>2];Oc(k+20|0,g,e)}p=k+8|0;q=f[p>>2]|0;do if(q){r=f[q>>2]|0;if((r|0)==(k|0)){f[q>>2]=0;s=f[q+4>>2]|0;if(!s){t=q;break}else v=s;while(1){s=f[v>>2]|0;if(s|0){v=s;continue}s=f[v+4>>2]|0;if(!s)break;else v=s}t=v;break}else{f[q+4>>2]=0;if(!r){t=q;break}else w=r;while(1){s=f[w>>2]|0;if(s|0){w=s;continue}s=f[w+4>>2]|0;if(!s)break;else w=s}t=w;break}}else t=0;while(0);q=f[l>>2]|0;do if(q){r=f[o>>2]|0;s=q;while(1){if((r|0)<(f[s+16>>2]|0)){x=f[s>>2]|0;if(!x){y=22;break}else z=x}else{A=s+4|0;x=f[A>>2]|0;if(!x){y=25;break}else z=x}s=z}if((y|0)==22){y=0;B=s;C=s;break}else if((y|0)==25){y=0;B=s;C=A;break}}else{B=l;C=l}while(0);f[k>>2]=0;f[k+4>>2]=0;f[p>>2]=B;f[C>>2]=k;q=f[f[a>>2]>>2]|0;if(!q)D=k;else{f[a>>2]=q;D=f[C>>2]|0}Oe(f[m>>2]|0,D);f[j>>2]=(f[j>>2]|0)+1;q=f[n+4>>2]|0;if(!q){o=n+8|0;r=f[o>>2]|0;if((f[r>>2]|0)==(n|0))E=r;else{r=o;do{o=f[r>>2]|0;r=o+8|0;x=f[r>>2]|0}while((f[x>>2]|0)!=(o|0));E=x}}else{r=q;while(1){p=f[r>>2]|0;if(!p)break;else r=p}E=r}f[b>>2]=E;if(!t)break a;else{k=t;n=E}}n=f[k+8>>2]|0;if(!n)F=k;else{m=n;while(1){n=f[m+8>>2]|0;if(!n)break;else m=n}F=m}Oj(a,F)}while(0);F=f[b>>2]|0;E=f[c>>2]|0;if((F|0)==(E|0)){u=d;return}c=a+4|0;t=a+4|0;D=F;while(1){Kg(e,a,D+16|0);F=f[c>>2]|0;do if(F){C=f[e>>2]|0;B=f[C+16>>2]|0;A=F;while(1){if((B|0)<(f[A+16>>2]|0)){z=f[A>>2]|0;if(!z){y=43;break}else G=z}else{H=A+4|0;z=f[H>>2]|0;if(!z){y=46;break}else G=z}A=G}if((y|0)==43){y=0;I=A;J=A;K=C;break}else if((y|0)==46){y=0;I=A;J=H;K=C;break}}else{I=c;J=c;K=f[e>>2]|0}while(0);f[K>>2]=0;f[K+4>>2]=0;f[K+8>>2]=I;f[J>>2]=K;F=f[f[a>>2]>>2]|0;if(!F)L=K;else{f[a>>2]=F;L=f[J>>2]|0}Oe(f[t>>2]|0,L);f[j>>2]=(f[j>>2]|0)+1;F=f[D+4>>2]|0;if(!F){m=D+8|0;B=f[m>>2]|0;if((f[B>>2]|0)==(D|0))M=B;else{B=m;do{m=f[B>>2]|0;B=m+8|0;r=f[B>>2]|0}while((f[r>>2]|0)!=(m|0));M=r}}else{B=F;while(1){r=f[B>>2]|0;if(!r)break;else B=r}M=B}f[b>>2]=M;if((M|0)==(E|0))break;else D=M}u=d;return}function Ic(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0;g=u;u=u+32|0;d=g+16|0;h=g+8|0;i=g;j=f[a+28>>2]|0;k=f[a+32>>2]|0;l=e>>>0>1073741823?-1:e<<2;m=Lq(l)|0;sj(m|0,0,l|0)|0;n=Lq(l)|0;sj(n|0,0,l|0)|0;l=a+36|0;o=f[l>>2]|0;p=f[o+4>>2]|0;q=f[o>>2]|0;r=p-q|0;a:do if((r|0)>4){s=r>>2;t=(e|0)>0;v=a+8|0;w=h+4|0;x=i+4|0;y=d+4|0;z=m+4|0;A=h+4|0;B=i+4|0;C=d+4|0;D=j+12|0;E=e<<2;F=s+-1|0;if(p-q>>2>>>0>F>>>0){G=s;H=F;I=q}else{J=o;aq(J)}while(1){F=f[I+(H<<2)>>2]|0;if(t)sj(m|0,0,E|0)|0;if((F|0)!=-1){s=f[D>>2]|0;K=0;L=F;while(1){M=f[s+(L<<2)>>2]|0;if((M|0)!=-1){N=f[j>>2]|0;O=f[k>>2]|0;P=f[O+(f[N+(M<<2)>>2]<<2)>>2]|0;Q=M+1|0;R=((Q>>>0)%3|0|0)==0?M+-2|0:Q;if((R|0)==-1)S=-1;else S=f[N+(R<<2)>>2]|0;R=f[O+(S<<2)>>2]|0;Q=(((M>>>0)%3|0|0)==0?2:-1)+M|0;if((Q|0)==-1)T=-1;else T=f[N+(Q<<2)>>2]|0;Q=f[O+(T<<2)>>2]|0;if((P|0)<(H|0)&(R|0)<(H|0)&(Q|0)<(H|0)){O=X(P,e)|0;P=X(R,e)|0;R=X(Q,e)|0;if(t){Q=0;do{f[n+(Q<<2)>>2]=(f[b+(Q+R<<2)>>2]|0)+(f[b+(Q+P<<2)>>2]|0)-(f[b+(Q+O<<2)>>2]|0);Q=Q+1|0}while((Q|0)!=(e|0));if(t){Q=0;do{O=m+(Q<<2)|0;f[O>>2]=(f[O>>2]|0)+(f[n+(Q<<2)>>2]|0);Q=Q+1|0}while((Q|0)!=(e|0))}}U=K+1|0}else U=K}else U=K;Q=(((L>>>0)%3|0|0)==0?2:-1)+L|0;do if((Q|0)!=-1?(O=f[s+(Q<<2)>>2]|0,(O|0)!=-1):0)if(!((O>>>0)%3|0)){V=O+2|0;break}else{V=O+-1|0;break}else V=-1;while(0);L=(V|0)==(F|0)?-1:V;if((L|0)==-1)break;else K=U}K=X(H,e)|0;if(!U){W=K;Y=30}else{if(t){L=0;do{F=m+(L<<2)|0;f[F>>2]=(f[F>>2]|0)/(U|0)|0;L=L+1|0}while((L|0)!=(e|0))}L=b+(K<<2)|0;F=c+(K<<2)|0;s=f[L+4>>2]|0;Q=f[m>>2]|0;O=f[z>>2]|0;f[h>>2]=f[L>>2];f[A>>2]=s;f[i>>2]=Q;f[B>>2]=O;Od(d,v,h,i);f[F>>2]=f[d>>2];f[F+4>>2]=f[C>>2]}}else{W=X(H,e)|0;Y=30}if((Y|0)==30){Y=0;F=b+(W<<2)|0;O=b+((X(G+-2|0,e)|0)<<2)|0;Q=c+(W<<2)|0;s=f[F+4>>2]|0;L=f[O>>2]|0;P=f[O+4>>2]|0;f[h>>2]=f[F>>2];f[w>>2]=s;f[i>>2]=L;f[x>>2]=P;Od(d,v,h,i);f[Q>>2]=f[d>>2];f[Q+4>>2]=f[y>>2]}if((G|0)<=2)break a;Q=f[l>>2]|0;I=f[Q>>2]|0;P=H+-1|0;if((f[Q+4>>2]|0)-I>>2>>>0<=P>>>0){J=Q;break}else{Q=H;H=P;G=Q}}aq(J)}while(0);if((e|0)<=0){Z=a+8|0;_=b+4|0;$=f[b>>2]|0;aa=f[_>>2]|0;ba=m+4|0;ca=f[m>>2]|0;da=f[ba>>2]|0;f[h>>2]=$;ea=h+4|0;f[ea>>2]=aa;f[i>>2]=ca;fa=i+4|0;f[fa>>2]=da;Od(d,Z,h,i);ga=f[d>>2]|0;f[c>>2]=ga;ha=d+4|0;ia=f[ha>>2]|0;ja=c+4|0;f[ja>>2]=ia;Mq(n);Mq(m);u=g;return 1}sj(m|0,0,e<<2|0)|0;Z=a+8|0;_=b+4|0;$=f[b>>2]|0;aa=f[_>>2]|0;ba=m+4|0;ca=f[m>>2]|0;da=f[ba>>2]|0;f[h>>2]=$;ea=h+4|0;f[ea>>2]=aa;f[i>>2]=ca;fa=i+4|0;f[fa>>2]=da;Od(d,Z,h,i);ga=f[d>>2]|0;f[c>>2]=ga;ha=d+4|0;ia=f[ha>>2]|0;ja=c+4|0;f[ja>>2]=ia;Mq(n);Mq(m);u=g;return 1}function Jc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;g=a+8|0;Mh(g,b,d,e);d=e>>>0>1073741823?-1:e<<2;h=Lq(d)|0;sj(h|0,0,d|0)|0;d=f[a+48>>2]|0;i=f[a+56>>2]|0;j=f[i>>2]|0;k=(f[i+4>>2]|0)-j|0;l=k>>2;a:do if((k|0)>4){m=f[a+52>>2]|0;n=a+16|0;o=a+32|0;p=a+12|0;q=a+28|0;r=a+20|0;s=a+24|0;t=d+12|0;u=(e|0)>0;v=j;w=l;while(1){x=w;w=w+-1|0;if(l>>>0<=w>>>0)break;y=f[v+(w<<2)>>2]|0;z=X(w,e)|0;if((y|0)!=-1?(A=f[(f[t>>2]|0)+(y<<2)>>2]|0,(A|0)!=-1):0){y=f[d>>2]|0;B=f[m>>2]|0;C=f[B+(f[y+(A<<2)>>2]<<2)>>2]|0;D=A+1|0;E=((D>>>0)%3|0|0)==0?A+-2|0:D;if((E|0)==-1)F=-1;else F=f[y+(E<<2)>>2]|0;E=f[B+(F<<2)>>2]|0;D=(((A>>>0)%3|0|0)==0?2:-1)+A|0;if((D|0)==-1)G=-1;else G=f[y+(D<<2)>>2]|0;D=f[B+(G<<2)>>2]|0;if((C|0)<(w|0)&(E|0)<(w|0)&(D|0)<(w|0)){B=X(C,e)|0;C=X(E,e)|0;E=X(D,e)|0;if(u){D=0;do{f[h+(D<<2)>>2]=(f[b+(D+E<<2)>>2]|0)+(f[b+(D+C<<2)>>2]|0)-(f[b+(D+B<<2)>>2]|0);D=D+1|0}while((D|0)!=(e|0))}D=b+(z<<2)|0;B=c+(z<<2)|0;C=f[g>>2]|0;if((C|0)>0){E=0;y=h;A=C;while(1){if((A|0)>0){C=0;do{H=f[y+(C<<2)>>2]|0;I=f[n>>2]|0;if((H|0)>(I|0)){J=f[o>>2]|0;f[J+(C<<2)>>2]=I;K=J}else{J=f[p>>2]|0;I=f[o>>2]|0;f[I+(C<<2)>>2]=(H|0)<(J|0)?J:H;K=I}C=C+1|0}while((C|0)<(f[g>>2]|0));L=K}else L=f[o>>2]|0;C=(f[D+(E<<2)>>2]|0)-(f[L+(E<<2)>>2]|0)|0;I=B+(E<<2)|0;f[I>>2]=C;if((C|0)>=(f[q>>2]|0)){if((C|0)>(f[s>>2]|0)){M=C-(f[r>>2]|0)|0;N=42}}else{M=(f[r>>2]|0)+C|0;N=42}if((N|0)==42){N=0;f[I>>2]=M}E=E+1|0;A=f[g>>2]|0;if((E|0)>=(A|0))break;else y=L}}}else N=16}else N=16;if((N|0)==16?(N=0,y=b+(z<<2)|0,A=c+(z<<2)|0,E=f[g>>2]|0,(E|0)>0):0){B=0;D=b+((X(x+-2|0,e)|0)<<2)|0;I=E;while(1){if((I|0)>0){E=0;do{C=f[D+(E<<2)>>2]|0;H=f[n>>2]|0;if((C|0)>(H|0)){J=f[o>>2]|0;f[J+(E<<2)>>2]=H;O=J}else{J=f[p>>2]|0;H=f[o>>2]|0;f[H+(E<<2)>>2]=(C|0)<(J|0)?J:C;O=H}E=E+1|0}while((E|0)<(f[g>>2]|0));P=O}else P=f[o>>2]|0;E=(f[y+(B<<2)>>2]|0)-(f[P+(B<<2)>>2]|0)|0;H=A+(B<<2)|0;f[H>>2]=E;if((E|0)>=(f[q>>2]|0)){if((E|0)>(f[s>>2]|0)){Q=E-(f[r>>2]|0)|0;N=29}}else{Q=(f[r>>2]|0)+E|0;N=29}if((N|0)==29){N=0;f[H>>2]=Q}B=B+1|0;I=f[g>>2]|0;if((B|0)>=(I|0))break;else D=P}}if((x|0)<=2)break a}aq(i)}while(0);if((e|0)>0)sj(h|0,0,e<<2|0)|0;e=f[g>>2]|0;if((e|0)<=0){Mq(h);return 1}i=a+16|0;P=a+32|0;Q=a+12|0;O=a+28|0;L=a+20|0;M=a+24|0;a=0;K=h;G=e;while(1){if((G|0)>0){e=0;do{F=f[K+(e<<2)>>2]|0;d=f[i>>2]|0;if((F|0)>(d|0)){l=f[P>>2]|0;f[l+(e<<2)>>2]=d;R=l}else{l=f[Q>>2]|0;d=f[P>>2]|0;f[d+(e<<2)>>2]=(F|0)<(l|0)?l:F;R=d}e=e+1|0}while((e|0)<(f[g>>2]|0));S=R}else S=f[P>>2]|0;e=(f[b+(a<<2)>>2]|0)-(f[S+(a<<2)>>2]|0)|0;d=c+(a<<2)|0;f[d>>2]=e;if((e|0)>=(f[O>>2]|0)){if((e|0)>(f[M>>2]|0)){T=e-(f[L>>2]|0)|0;N=56}}else{T=(f[L>>2]|0)+e|0;N=56}if((N|0)==56){N=0;f[d>>2]=T}a=a+1|0;G=f[g>>2]|0;if((a|0)>=(G|0))break;else K=S}Mq(h);return 1}function Kc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0;g=u;u=u+32|0;d=g+16|0;h=g+8|0;i=g;j=f[a+28>>2]|0;k=f[a+32>>2]|0;l=e>>>0>1073741823?-1:e<<2;m=Lq(l)|0;sj(m|0,0,l|0)|0;n=Lq(l)|0;sj(n|0,0,l|0)|0;l=a+36|0;o=f[l>>2]|0;p=f[o+4>>2]|0;q=f[o>>2]|0;r=p-q|0;a:do if((r|0)>4){s=r>>2;t=(e|0)>0;v=a+8|0;w=h+4|0;x=i+4|0;y=d+4|0;z=m+4|0;A=h+4|0;B=i+4|0;C=d+4|0;D=j+64|0;E=j+28|0;F=e<<2;G=s+-1|0;if(p-q>>2>>>0>G>>>0){H=s;I=G;J=q}else{K=o;aq(K)}while(1){G=f[J+(I<<2)>>2]|0;if(t)sj(m|0,0,F|0)|0;if((G|0)!=-1){s=f[j>>2]|0;L=0;M=G;while(1){if(((f[s+(M>>>5<<2)>>2]&1<<(M&31)|0)==0?(N=f[(f[(f[D>>2]|0)+12>>2]|0)+(M<<2)>>2]|0,(N|0)!=-1):0)?(O=f[E>>2]|0,P=f[k>>2]|0,Q=f[P+(f[O+(N<<2)>>2]<<2)>>2]|0,R=N+1|0,S=f[P+(f[O+((((R>>>0)%3|0|0)==0?N+-2|0:R)<<2)>>2]<<2)>>2]|0,R=f[P+(f[O+((((N>>>0)%3|0|0)==0?2:-1)+N<<2)>>2]<<2)>>2]|0,(Q|0)<(I|0)&(S|0)<(I|0)&(R|0)<(I|0)):0){N=X(Q,e)|0;Q=X(S,e)|0;S=X(R,e)|0;if(t){R=0;do{f[n+(R<<2)>>2]=(f[b+(R+S<<2)>>2]|0)+(f[b+(R+Q<<2)>>2]|0)-(f[b+(R+N<<2)>>2]|0);R=R+1|0}while((R|0)!=(e|0));if(t){R=0;do{N=m+(R<<2)|0;f[N>>2]=(f[N>>2]|0)+(f[n+(R<<2)>>2]|0);R=R+1|0}while((R|0)!=(e|0))}}T=L+1|0}else T=L;R=(((M>>>0)%3|0|0)==0?2:-1)+M|0;do if(((R|0)!=-1?(f[s+(R>>>5<<2)>>2]&1<<(R&31)|0)==0:0)?(N=f[(f[(f[D>>2]|0)+12>>2]|0)+(R<<2)>>2]|0,(N|0)!=-1):0)if(!((N>>>0)%3|0)){U=N+2|0;break}else{U=N+-1|0;break}else U=-1;while(0);M=(U|0)==(G|0)?-1:U;if((M|0)==-1)break;else L=T}L=X(I,e)|0;if(!T){V=L;W=28}else{if(t){M=0;do{G=m+(M<<2)|0;f[G>>2]=(f[G>>2]|0)/(T|0)|0;M=M+1|0}while((M|0)!=(e|0))}M=b+(L<<2)|0;G=c+(L<<2)|0;s=f[M+4>>2]|0;R=f[m>>2]|0;N=f[z>>2]|0;f[h>>2]=f[M>>2];f[A>>2]=s;f[i>>2]=R;f[B>>2]=N;Od(d,v,h,i);f[G>>2]=f[d>>2];f[G+4>>2]=f[C>>2]}}else{V=X(I,e)|0;W=28}if((W|0)==28){W=0;G=b+(V<<2)|0;N=b+((X(H+-2|0,e)|0)<<2)|0;R=c+(V<<2)|0;s=f[G+4>>2]|0;M=f[N>>2]|0;Q=f[N+4>>2]|0;f[h>>2]=f[G>>2];f[w>>2]=s;f[i>>2]=M;f[x>>2]=Q;Od(d,v,h,i);f[R>>2]=f[d>>2];f[R+4>>2]=f[y>>2]}if((H|0)<=2)break a;R=f[l>>2]|0;J=f[R>>2]|0;Q=I+-1|0;if((f[R+4>>2]|0)-J>>2>>>0<=Q>>>0){K=R;break}else{R=I;I=Q;H=R}}aq(K)}while(0);if((e|0)<=0){Y=a+8|0;Z=b+4|0;_=f[b>>2]|0;$=f[Z>>2]|0;aa=m+4|0;ba=f[m>>2]|0;ca=f[aa>>2]|0;f[h>>2]=_;da=h+4|0;f[da>>2]=$;f[i>>2]=ba;ea=i+4|0;f[ea>>2]=ca;Od(d,Y,h,i);fa=f[d>>2]|0;f[c>>2]=fa;ga=d+4|0;ha=f[ga>>2]|0;ia=c+4|0;f[ia>>2]=ha;Mq(n);Mq(m);u=g;return 1}sj(m|0,0,e<<2|0)|0;Y=a+8|0;Z=b+4|0;_=f[b>>2]|0;$=f[Z>>2]|0;aa=m+4|0;ba=f[m>>2]|0;ca=f[aa>>2]|0;f[h>>2]=_;da=h+4|0;f[da>>2]=$;f[i>>2]=ba;ea=i+4|0;f[ea>>2]=ca;Od(d,Y,h,i);fa=f[d>>2]|0;f[c>>2]=fa;ga=d+4|0;ha=f[ga>>2]|0;ia=c+4|0;f[ia>>2]=ha;Mq(n);Mq(m);u=g;return 1}function Lc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;g=a+8|0;Mh(g,b,d,e);d=e>>>0>1073741823?-1:e<<2;h=Lq(d)|0;sj(h|0,0,d|0)|0;d=f[a+48>>2]|0;i=f[a+56>>2]|0;j=f[i>>2]|0;k=(f[i+4>>2]|0)-j|0;l=k>>2;a:do if((k|0)>4){m=f[a+52>>2]|0;n=a+16|0;o=a+32|0;p=a+12|0;q=a+28|0;r=a+20|0;s=a+24|0;t=d+64|0;u=d+28|0;v=(e|0)>0;w=j;x=l;while(1){y=x;x=x+-1|0;if(l>>>0<=x>>>0)break;z=f[w+(x<<2)>>2]|0;A=X(x,e)|0;if((((z|0)!=-1?(f[(f[d>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)==0:0)?(B=f[(f[(f[t>>2]|0)+12>>2]|0)+(z<<2)>>2]|0,(B|0)!=-1):0)?(z=f[u>>2]|0,C=f[m>>2]|0,D=f[C+(f[z+(B<<2)>>2]<<2)>>2]|0,E=B+1|0,F=f[C+(f[z+((((E>>>0)%3|0|0)==0?B+-2|0:E)<<2)>>2]<<2)>>2]|0,E=f[C+(f[z+((((B>>>0)%3|0|0)==0?2:-1)+B<<2)>>2]<<2)>>2]|0,(D|0)<(x|0)&(F|0)<(x|0)&(E|0)<(x|0)):0){B=X(D,e)|0;D=X(F,e)|0;F=X(E,e)|0;if(v){E=0;do{f[h+(E<<2)>>2]=(f[b+(E+F<<2)>>2]|0)+(f[b+(E+D<<2)>>2]|0)-(f[b+(E+B<<2)>>2]|0);E=E+1|0}while((E|0)!=(e|0))}E=b+(A<<2)|0;B=c+(A<<2)|0;D=f[g>>2]|0;if((D|0)>0){F=0;z=h;C=D;while(1){if((C|0)>0){D=0;do{G=f[z+(D<<2)>>2]|0;H=f[n>>2]|0;if((G|0)>(H|0)){I=f[o>>2]|0;f[I+(D<<2)>>2]=H;J=I}else{I=f[p>>2]|0;H=f[o>>2]|0;f[H+(D<<2)>>2]=(G|0)<(I|0)?I:G;J=H}D=D+1|0}while((D|0)<(f[g>>2]|0));K=J}else K=f[o>>2]|0;D=(f[E+(F<<2)>>2]|0)-(f[K+(F<<2)>>2]|0)|0;H=B+(F<<2)|0;f[H>>2]=D;if((D|0)>=(f[q>>2]|0)){if((D|0)>(f[s>>2]|0)){L=D-(f[r>>2]|0)|0;M=39}}else{L=(f[r>>2]|0)+D|0;M=39}if((M|0)==39){M=0;f[H>>2]=L}F=F+1|0;C=f[g>>2]|0;if((F|0)>=(C|0))break;else z=K}}}else M=13;if((M|0)==13?(M=0,z=b+(A<<2)|0,C=c+(A<<2)|0,F=f[g>>2]|0,(F|0)>0):0){B=0;E=b+((X(y+-2|0,e)|0)<<2)|0;H=F;while(1){if((H|0)>0){F=0;do{D=f[E+(F<<2)>>2]|0;G=f[n>>2]|0;if((D|0)>(G|0)){I=f[o>>2]|0;f[I+(F<<2)>>2]=G;N=I}else{I=f[p>>2]|0;G=f[o>>2]|0;f[G+(F<<2)>>2]=(D|0)<(I|0)?I:D;N=G}F=F+1|0}while((F|0)<(f[g>>2]|0));O=N}else O=f[o>>2]|0;F=(f[z+(B<<2)>>2]|0)-(f[O+(B<<2)>>2]|0)|0;G=C+(B<<2)|0;f[G>>2]=F;if((F|0)>=(f[q>>2]|0)){if((F|0)>(f[s>>2]|0)){P=F-(f[r>>2]|0)|0;M=26}}else{P=(f[r>>2]|0)+F|0;M=26}if((M|0)==26){M=0;f[G>>2]=P}B=B+1|0;H=f[g>>2]|0;if((B|0)>=(H|0))break;else E=O}}if((y|0)<=2)break a}aq(i)}while(0);if((e|0)>0)sj(h|0,0,e<<2|0)|0;e=f[g>>2]|0;if((e|0)<=0){Mq(h);return 1}i=a+16|0;O=a+32|0;P=a+12|0;N=a+28|0;K=a+20|0;L=a+24|0;a=0;J=h;d=e;while(1){if((d|0)>0){e=0;do{l=f[J+(e<<2)>>2]|0;j=f[i>>2]|0;if((l|0)>(j|0)){k=f[O>>2]|0;f[k+(e<<2)>>2]=j;Q=k}else{k=f[P>>2]|0;j=f[O>>2]|0;f[j+(e<<2)>>2]=(l|0)<(k|0)?k:l;Q=j}e=e+1|0}while((e|0)<(f[g>>2]|0));R=Q}else R=f[O>>2]|0;e=(f[b+(a<<2)>>2]|0)-(f[R+(a<<2)>>2]|0)|0;j=c+(a<<2)|0;f[j>>2]=e;if((e|0)>=(f[N>>2]|0)){if((e|0)>(f[L>>2]|0)){S=e-(f[K>>2]|0)|0;M=53}}else{S=(f[K>>2]|0)+e|0;M=53}if((M|0)==53){M=0;f[j>>2]=S}a=a+1|0;d=f[g>>2]|0;if((a|0)>=(d|0))break;else J=R}Mq(h);return 1}function Mc(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0;h=u;u=u+48|0;i=h+28|0;j=h+24|0;k=h;l=h+12|0;m=h+40|0;if((c|0)<0){n=0;u=h;return n|0}if(!c){n=1;u=h;return n|0}o=(d|0)>1;p=o?d:1;f[k>>2]=0;d=k+4|0;f[d>>2]=0;f[k+8>>2]=0;gk(k,c);q=k+8|0;if(o){o=0;r=0;while(1){s=1;t=f[a+(r<<2)>>2]|0;do{v=f[a+(s+r<<2)>>2]|0;t=t>>>0>>0?v:t;s=s+1|0}while((s|0)!=(p|0));s=(_(t|0)|0)^31;v=t>>>0>o>>>0?t:o;w=(t|0)==0?1:s+1|0;f[i>>2]=w;s=f[d>>2]|0;if(s>>>0<(f[q>>2]|0)>>>0){f[s>>2]=w;f[d>>2]=s+4}else Ri(k,i);r=r+p|0;if((r|0)>=(c|0)){x=v;break}else o=v}}else{o=0;r=0;while(1){v=f[a+(o<<2)>>2]|0;s=(_(v|0)|0)^31;w=v>>>0>r>>>0?v:r;y=(v|0)==0?1:s+1|0;f[i>>2]=y;s=f[d>>2]|0;if(s>>>0<(f[q>>2]|0)>>>0){f[s>>2]=y;f[d>>2]=s+4}else Ri(k,i);o=o+p|0;if((o|0)>=(c|0)){x=w;break}else r=w}}f[l>>2]=0;r=l+4|0;f[r>>2]=0;f[l+8>>2]=0;o=f[k>>2]|0;q=(f[d>>2]|0)-o|0;w=q>>2;if(w){if(w>>>0>1073741823)aq(l);s=ln(q)|0;f[r>>2]=s;f[l>>2]=s;f[l+8>>2]=s+(w<<2);w=s;if((q|0)>0){y=s+(q>>>2<<2)|0;kh(s|0,o|0,q|0)|0;f[r>>2]=y;q=y-w>>2;if((y|0)==(s|0)){z=q;A=s;B=0;C=0}else{y=0;o=0;v=0;while(1){D=Vn(o|0,v|0,f[s+(y<<2)>>2]|0,0)|0;E=I;y=y+1|0;if(y>>>0>=q>>>0){z=q;A=s;B=D;C=E;break}else{o=D;v=E}}}}else{F=w;G=18}}else{F=0;G=18}if((G|0)==18){z=0;A=F;B=0;C=0}F=Jg(A,z,32,i)|0;z=I;A=f[i>>2]<<3;w=Tn(A|0,((A|0)<0)<<31>>31|0,1)|0;A=I;v=un(B|0,C|0,p|0,0)|0;C=Vn(F|0,z|0,v|0,I|0)|0;v=Vn(C|0,I|0,w|0,A|0)|0;A=I;w=f[l>>2]|0;if(w|0){l=f[r>>2]|0;if((l|0)!=(w|0))f[r>>2]=l+(~((l+-4-w|0)>>>2)<<2);Oq(w)}w=Jg(a,c,x,i)|0;l=f[i>>2]|0;r=((x-l|0)/64|0)+l<<3;C=l<<3;z=Vn(w|0,I|0,C|0,((C|0)<0)<<31>>31|0)|0;C=Vn(z|0,I|0,r|0,((r|0)<0)<<31>>31|0)|0;r=I;z=(_((x>>>0>1?x:1)|0)|0)^30;if(e){f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;w=ln(32)|0;f[i>>2]=w;f[i+8>>2]=-2147483616;f[i+4>>2]=22;F=w;B=15964;o=F+22|0;do{b[F>>0]=b[B>>0]|0;F=F+1|0;B=B+1|0}while((F|0)<(o|0));b[w+22>>0]=0;w=(Jh(e,i)|0)==0;if((b[i+11>>0]|0)<0)Oq(f[i>>2]|0);if(!w){f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;w=ln(32)|0;f[i>>2]=w;f[i+8>>2]=-2147483616;f[i+4>>2]=22;F=w;B=15964;o=F+22|0;do{b[F>>0]=b[B>>0]|0;F=F+1|0;B=B+1|0}while((F|0)<(o|0));b[w+22>>0]=0;w=Mk(e,i)|0;if((b[i+11>>0]|0)<0)Oq(f[i>>2]|0);H=w}else G=32}else G=32;if((G|0)==32)H=z>>>0<18&((A|0)>(r|0)|(A|0)==(r|0)&v>>>0>=C>>>0)&1;b[m>>0]=H;C=g+16|0;v=f[C+4>>2]|0;if(!((v|0)>0|(v|0)==0&(f[C>>2]|0)>>>0>0)){f[j>>2]=f[g+4>>2];f[i>>2]=f[j>>2];Me(g,i,m,m+1|0)|0}switch(H|0){case 0:{J=td(a,c,p,k,g)|0;break}case 1:{J=Tc(a,c,x,l,e,g)|0;break}default:J=0}g=f[k>>2]|0;if(g|0){k=f[d>>2]|0;if((k|0)!=(g|0))f[d>>2]=k+(~((k+-4-g|0)>>>2)<<2);Oq(g)}n=J;u=h;return n|0}function Nc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;if((b|0)<0)return;c=a+12|0;d=f[c>>2]|0;e=f[a+8>>2]|0;g=e;h=d;if(d-e>>2>>>0<=b>>>0)return;e=g+(b<<2)|0;d=f[(f[e>>2]|0)+56>>2]|0;i=f[(f[g+(b<<2)>>2]|0)+60>>2]|0;g=e+4|0;if((g|0)!=(h|0)){j=g;g=e;do{k=f[j>>2]|0;f[j>>2]=0;l=f[g>>2]|0;f[g>>2]=k;if(l|0){k=l+88|0;m=f[k>>2]|0;f[k>>2]=0;if(m|0){k=f[m+8>>2]|0;if(k|0){n=m+12|0;if((f[n>>2]|0)!=(k|0))f[n>>2]=k;Oq(k)}Oq(m)}m=f[l+68>>2]|0;if(m|0){k=l+72|0;n=f[k>>2]|0;if((n|0)!=(m|0))f[k>>2]=n+(~((n+-4-m|0)>>>2)<<2);Oq(m)}m=l+64|0;n=f[m>>2]|0;f[m>>2]=0;if(n|0){m=f[n>>2]|0;if(m|0){k=n+4|0;if((f[k>>2]|0)!=(m|0))f[k>>2]=m;Oq(m)}Oq(n)}Oq(l)}j=j+4|0;g=g+4|0}while((j|0)!=(h|0));j=f[c>>2]|0;if((j|0)!=(g|0)){o=g;p=j;q=24}}else{o=e;p=h;q=24}if((q|0)==24){q=p;do{p=q+-4|0;f[c>>2]=p;h=f[p>>2]|0;f[p>>2]=0;if(h|0){p=h+88|0;e=f[p>>2]|0;f[p>>2]=0;if(e|0){p=f[e+8>>2]|0;if(p|0){j=e+12|0;if((f[j>>2]|0)!=(p|0))f[j>>2]=p;Oq(p)}Oq(e)}e=f[h+68>>2]|0;if(e|0){p=h+72|0;j=f[p>>2]|0;if((j|0)!=(e|0))f[p>>2]=j+(~((j+-4-e|0)>>>2)<<2);Oq(e)}e=h+64|0;j=f[e>>2]|0;f[e>>2]=0;if(j|0){e=f[j>>2]|0;if(e|0){p=j+4|0;if((f[p>>2]|0)!=(e|0))f[p>>2]=e;Oq(e)}Oq(j)}Oq(h)}q=f[c>>2]|0}while((q|0)!=(o|0))}o=f[a+4>>2]|0;a:do if(o|0){q=o+44|0;c=f[q>>2]|0;h=f[o+40>>2]|0;while(1){if((h|0)==(c|0))break a;r=h+4|0;if((f[(f[h>>2]|0)+40>>2]|0)==(i|0))break;else h=r}if((r|0)!=(c|0)){j=r;e=h;do{p=f[j>>2]|0;f[j>>2]=0;g=f[e>>2]|0;f[e>>2]=p;if(g|0){bj(g);Oq(g)}j=j+4|0;e=e+4|0}while((j|0)!=(c|0));j=f[q>>2]|0;if((j|0)==(e|0))break;else{s=e;t=j}}else{s=h;t=c}j=t;do{g=j+-4|0;f[q>>2]=g;p=f[g>>2]|0;f[g>>2]=0;if(p|0){bj(p);Oq(p)}j=f[q>>2]|0}while((j|0)!=(s|0))}while(0);b:do if((d|0)<5){s=f[a+20+(d*12|0)>>2]|0;t=a+20+(d*12|0)+4|0;r=f[t>>2]|0;i=r;c:do if((s|0)==(r|0))u=s;else{o=s;while(1){if((f[o>>2]|0)==(b|0)){u=o;break c}o=o+4|0;if((o|0)==(r|0))break b}}while(0);if((u|0)!=(r|0)){s=u+4|0;o=i-s|0;j=o>>2;if(!j)v=r;else{im(u|0,s|0,o|0)|0;v=f[t>>2]|0}o=u+(j<<2)|0;if((v|0)!=(o|0))f[t>>2]=v+(~((v+-4-o|0)>>>2)<<2)}}while(0);v=f[a+24>>2]|0;u=f[a+20>>2]|0;d=u;if((v|0)!=(u|0)){o=v-u>>2;u=0;do{v=d+(u<<2)|0;j=f[v>>2]|0;if((j|0)>(b|0))f[v>>2]=j+-1;u=u+1|0}while(u>>>0>>0)}o=f[a+36>>2]|0;u=f[a+32>>2]|0;d=u;if((o|0)!=(u|0)){j=o-u>>2;u=0;do{o=d+(u<<2)|0;v=f[o>>2]|0;if((v|0)>(b|0))f[o>>2]=v+-1;u=u+1|0}while(u>>>0>>0)}j=f[a+48>>2]|0;u=f[a+44>>2]|0;d=u;if((j|0)!=(u|0)){v=j-u>>2;u=0;do{j=d+(u<<2)|0;o=f[j>>2]|0;if((o|0)>(b|0))f[j>>2]=o+-1;u=u+1|0}while(u>>>0>>0)}v=f[a+60>>2]|0;u=f[a+56>>2]|0;d=u;if((v|0)!=(u|0)){o=v-u>>2;u=0;do{v=d+(u<<2)|0;j=f[v>>2]|0;if((j|0)>(b|0))f[v>>2]=j+-1;u=u+1|0}while(u>>>0>>0)}o=f[a+72>>2]|0;u=f[a+68>>2]|0;a=u;if((o|0)==(u|0))return;d=o-u>>2;u=0;do{o=a+(u<<2)|0;j=f[o>>2]|0;if((j|0)>(b|0))f[o>>2]=j+-1;u=u+1|0}while(u>>>0>>0);return}function Oc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;e=a+8|0;a:do if(f[e>>2]|0?(g=f[a>>2]|0,h=a+4|0,f[a>>2]=h,f[(f[h>>2]|0)+8>>2]=0,f[h>>2]=0,f[e>>2]=0,i=f[g+4>>2]|0,j=(i|0)==0?g:i,j|0):0){i=a+4|0;g=j;j=f[c>>2]|0;while(1){if((j|0)==(f[d>>2]|0))break;k=g+16|0;am(k,j+16|0)|0;am(g+28|0,j+28|0)|0;l=g+8|0;m=f[l>>2]|0;do if(m){n=f[m>>2]|0;if((n|0)==(g|0)){f[m>>2]=0;o=f[m+4>>2]|0;if(!o){p=m;break}else q=o;while(1){o=f[q>>2]|0;if(o|0){q=o;continue}o=f[q+4>>2]|0;if(!o)break;else q=o}p=q;break}else{f[m+4>>2]=0;if(!n){p=m;break}else r=n;while(1){o=f[r>>2]|0;if(o|0){r=o;continue}o=f[r+4>>2]|0;if(!o)break;else r=o}p=r;break}}else p=0;while(0);m=f[h>>2]|0;do if(m){n=b[k+11>>0]|0;o=n<<24>>24<0;s=o?f[g+20>>2]|0:n&255;n=o?f[k>>2]|0:k;o=m;while(1){t=o+16|0;u=b[t+11>>0]|0;v=u<<24>>24<0;w=v?f[o+20>>2]|0:u&255;u=w>>>0>>0?w:s;if((u|0)!=0?(x=Vk(n,v?f[t>>2]|0:t,u)|0,(x|0)!=0):0)if((x|0)<0)y=22;else y=24;else if(s>>>0>>0)y=22;else y=24;if((y|0)==22){y=0;w=f[o>>2]|0;if(!w){y=23;break}else z=w}else if((y|0)==24){y=0;A=o+4|0;w=f[A>>2]|0;if(!w){y=26;break}else z=w}o=z}if((y|0)==23){y=0;B=o;C=o;break}else if((y|0)==26){y=0;B=A;C=o;break}}else{B=h;C=h}while(0);f[g>>2]=0;f[g+4>>2]=0;f[l>>2]=C;f[B>>2]=g;m=f[f[a>>2]>>2]|0;if(!m)D=g;else{f[a>>2]=m;D=f[B>>2]|0}Oe(f[i>>2]|0,D);f[e>>2]=(f[e>>2]|0)+1;m=f[j+4>>2]|0;if(!m){k=j+8|0;s=f[k>>2]|0;if((f[s>>2]|0)==(j|0))E=s;else{s=k;do{k=f[s>>2]|0;s=k+8|0;n=f[s>>2]|0}while((f[n>>2]|0)!=(k|0));E=n}}else{s=m;while(1){l=f[s>>2]|0;if(!l)break;else s=l}E=s}f[c>>2]=E;if(!p)break a;else{g=p;j=E}}j=f[g+8>>2]|0;if(!j)F=g;else{i=j;while(1){j=f[i+8>>2]|0;if(!j)break;else i=j}F=i}Ej(a,F)}while(0);F=f[c>>2]|0;E=f[d>>2]|0;if((F|0)==(E|0))return;else G=F;while(1){bf(a,G+16|0)|0;F=f[G+4>>2]|0;if(!F){d=G+8|0;p=f[d>>2]|0;if((f[p>>2]|0)==(G|0))H=p;else{p=d;do{d=f[p>>2]|0;p=d+8|0;e=f[p>>2]|0}while((f[e>>2]|0)!=(d|0));H=e}}else{p=F;while(1){i=f[p>>2]|0;if(!i)break;else p=i}H=p}f[c>>2]=H;if((H|0)==(E|0))break;else G=H}return}function Pc(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;b=u;u=u+32|0;c=b+4|0;d=b;e=a+16|0;g=f[e>>2]|0;if(g>>>0>112){f[e>>2]=g+-113;g=a+4|0;e=f[g>>2]|0;h=f[e>>2]|0;i=e+4|0;f[g>>2]=i;e=a+8|0;j=f[e>>2]|0;k=a+12|0;l=f[k>>2]|0;m=l;do if((j|0)==(l|0)){n=f[a>>2]|0;o=n;if(i>>>0>n>>>0){p=i;q=((p-o>>2)+1|0)/-2|0;r=i+(q<<2)|0;s=j-p|0;p=s>>2;if(!p)t=i;else{im(r|0,i|0,s|0)|0;t=f[g>>2]|0}s=r+(p<<2)|0;f[e>>2]=s;f[g>>2]=t+(q<<2);v=s;break}s=m-o>>1;o=(s|0)==0?1:s;if(o>>>0>1073741823){s=ra(8)|0;Oo(s,16035);f[s>>2]=7256;va(s|0,1112,110)}s=ln(o<<2)|0;q=s;p=s+(o>>>2<<2)|0;r=p;w=s+(o<<2)|0;if((i|0)==(j|0)){x=r;y=n}else{n=p;p=r;o=i;do{f[n>>2]=f[o>>2];n=p+4|0;p=n;o=o+4|0}while((o|0)!=(j|0));x=p;y=f[a>>2]|0}f[a>>2]=q;f[g>>2]=r;f[e>>2]=x;f[k>>2]=w;if(!y)v=x;else{Oq(y);v=f[e>>2]|0}}else v=j;while(0);f[v>>2]=h;f[e>>2]=(f[e>>2]|0)+4;u=b;return}e=a+8|0;h=f[e>>2]|0;v=a+4|0;j=h-(f[v>>2]|0)|0;y=a+12|0;x=f[y>>2]|0;k=x-(f[a>>2]|0)|0;if(j>>>0>=k>>>0){g=k>>1;k=(g|0)==0?1:g;f[c+12>>2]=0;f[c+16>>2]=a+12;if(k>>>0>1073741823){g=ra(8)|0;Oo(g,16035);f[g>>2]=7256;va(g|0,1112,110)}g=ln(k<<2)|0;f[c>>2]=g;i=g+(j>>2<<2)|0;j=c+8|0;f[j>>2]=i;m=c+4|0;f[m>>2]=i;i=c+12|0;f[i>>2]=g+(k<<2);k=ln(4068)|0;f[d>>2]=k;Ag(c,d);d=f[e>>2]|0;while(1){z=f[v>>2]|0;if((d|0)==(z|0))break;k=d+-4|0;ug(c,k);d=k}k=z;z=f[a>>2]|0;f[a>>2]=f[c>>2];f[c>>2]=z;f[v>>2]=f[m>>2];f[m>>2]=k;m=f[e>>2]|0;f[e>>2]=f[j>>2];f[j>>2]=m;g=f[y>>2]|0;f[y>>2]=f[i>>2];f[i>>2]=g;g=m;if((d|0)!=(g|0))f[j>>2]=g+(~((g+-4-k|0)>>>2)<<2);if(z|0)Oq(z);u=b;return}if((x|0)!=(h|0)){h=ln(4068)|0;f[c>>2]=h;Ag(a,c);u=b;return}h=ln(4068)|0;f[c>>2]=h;ug(a,c);c=f[v>>2]|0;h=f[c>>2]|0;x=c+4|0;f[v>>2]=x;c=f[e>>2]|0;z=f[y>>2]|0;k=z;do if((c|0)==(z|0)){g=f[a>>2]|0;j=g;if(x>>>0>g>>>0){d=x;m=((d-j>>2)+1|0)/-2|0;i=x+(m<<2)|0;t=c-d|0;d=t>>2;if(!d)A=x;else{im(i|0,x|0,t|0)|0;A=f[v>>2]|0}t=i+(d<<2)|0;f[e>>2]=t;f[v>>2]=A+(m<<2);B=t;break}t=k-j>>1;j=(t|0)==0?1:t;if(j>>>0>1073741823){t=ra(8)|0;Oo(t,16035);f[t>>2]=7256;va(t|0,1112,110)}t=ln(j<<2)|0;m=t;d=t+(j>>>2<<2)|0;i=d;l=t+(j<<2)|0;if((x|0)==(c|0)){C=i;D=g}else{g=d;d=i;j=x;do{f[g>>2]=f[j>>2];g=d+4|0;d=g;j=j+4|0}while((j|0)!=(c|0));C=d;D=f[a>>2]|0}f[a>>2]=m;f[v>>2]=i;f[e>>2]=C;f[y>>2]=l;if(!D)B=C;else{Oq(D);B=f[e>>2]|0}}else B=c;while(0);f[B>>2]=h;f[e>>2]=(f[e>>2]|0)+4;u=b;return}function Qc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;e=u;u=u+16|0;g=e+8|0;h=e+4|0;i=e;j=a+64|0;k=f[j>>2]|0;if((f[k+28>>2]|0)==(f[k+24>>2]|0)){u=e;return}l=c+96|0;c=a+52|0;m=d+84|0;n=d+68|0;d=a+56|0;o=a+60|0;p=a+12|0;q=a+28|0;r=a+40|0;s=a+44|0;t=a+48|0;v=0;w=0;x=k;while(1){k=f[(f[x+24>>2]|0)+(w<<2)>>2]|0;if((k|0)==-1){y=v;z=x}else{A=v+1|0;B=f[(f[l>>2]|0)+(((k|0)/3|0)*12|0)+(((k|0)%3|0)<<2)>>2]|0;if(!(b[m>>0]|0))C=f[(f[n>>2]|0)+(B<<2)>>2]|0;else C=B;f[g>>2]=C;B=f[d>>2]|0;if(B>>>0<(f[o>>2]|0)>>>0){f[B>>2]=C;f[d>>2]=B+4}else Ri(c,g);f[g>>2]=k;f[h>>2]=0;a:do if(!(f[(f[p>>2]|0)+(w>>>5<<2)>>2]&1<<(w&31)))D=k;else{B=k+1|0;E=((B>>>0)%3|0|0)==0?k+-2|0:B;if(((E|0)!=-1?(f[(f[a>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)==0:0)?(B=f[(f[(f[j>>2]|0)+12>>2]|0)+(E<<2)>>2]|0,E=B+1|0,(B|0)!=-1):0){F=((E>>>0)%3|0|0)==0?B+-2|0:E;f[h>>2]=F;if((F|0)==-1){D=k;break}else G=F;while(1){f[g>>2]=G;F=G+1|0;E=((F>>>0)%3|0|0)==0?G+-2|0:F;if((E|0)==-1)break;if(f[(f[a>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)break;F=f[(f[(f[j>>2]|0)+12>>2]|0)+(E<<2)>>2]|0;E=F+1|0;if((F|0)==-1)break;B=((E>>>0)%3|0|0)==0?F+-2|0:E;f[h>>2]=B;if((B|0)==-1){D=G;break a}else G=B}f[h>>2]=-1;D=G;break}f[h>>2]=-1;D=k}while(0);f[(f[q>>2]|0)+(D<<2)>>2]=v;k=f[s>>2]|0;if((k|0)==(f[t>>2]|0))Ri(r,g);else{f[k>>2]=f[g>>2];f[s>>2]=k+4}k=f[j>>2]|0;B=f[g>>2]|0;b:do if(((B|0)!=-1?(E=(((B>>>0)%3|0|0)==0?2:-1)+B|0,(E|0)!=-1):0)?(F=f[(f[k+12>>2]|0)+(E<<2)>>2]|0,(F|0)!=-1):0){E=F+(((F>>>0)%3|0|0)==0?2:-1)|0;f[h>>2]=E;if((E|0)!=-1&(E|0)!=(B|0)){F=A;H=v;I=E;while(1){E=I+1|0;J=((E>>>0)%3|0|0)==0?I+-2|0:E;do if(f[(f[a>>2]|0)+(J>>>5<<2)>>2]&1<<(J&31)){E=F+1|0;K=f[(f[l>>2]|0)+(((I|0)/3|0)*12|0)+(((I|0)%3|0)<<2)>>2]|0;if(!(b[m>>0]|0))L=f[(f[n>>2]|0)+(K<<2)>>2]|0;else L=K;f[i>>2]=L;K=f[d>>2]|0;if(K>>>0<(f[o>>2]|0)>>>0){f[K>>2]=L;f[d>>2]=K+4}else Ri(c,i);K=f[s>>2]|0;if((K|0)==(f[t>>2]|0)){Ri(r,h);M=E;N=F;break}else{f[K>>2]=f[h>>2];f[s>>2]=K+4;M=E;N=F;break}}else{M=F;N=H}while(0);f[(f[q>>2]|0)+(f[h>>2]<<2)>>2]=N;O=f[j>>2]|0;J=f[h>>2]|0;if((J|0)==-1)break;E=(((J>>>0)%3|0|0)==0?2:-1)+J|0;if((E|0)==-1)break;J=f[(f[O+12>>2]|0)+(E<<2)>>2]|0;if((J|0)==-1)break;I=J+(((J>>>0)%3|0|0)==0?2:-1)|0;f[h>>2]=I;if(!((I|0)!=-1?(I|0)!=(f[g>>2]|0):0)){P=M;Q=O;break b}else{F=M;H=N}}f[h>>2]=-1;P=M;Q=O}else{P=A;Q=k}}else R=28;while(0);if((R|0)==28){R=0;f[h>>2]=-1;P=A;Q=k}y=P;z=Q}w=w+1|0;if(w>>>0>=(f[z+28>>2]|0)-(f[z+24>>2]|0)>>2>>>0)break;else{v=y;x=z}}u=e;return}function Rc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0.0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,D=0,E=0,F=0;switch(c|0){case 0:{e=-149;g=24;i=4;break}case 1:{e=-1074;g=53;i=4;break}case 2:{e=-1074;g=53;i=4;break}default:j=0.0}a:do if((i|0)==4){c=a+4|0;k=a+100|0;do{l=f[c>>2]|0;if(l>>>0<(f[k>>2]|0)>>>0){f[c>>2]=l+1;m=h[l>>0]|0}else m=Si(a)|0}while((eq(m)|0)!=0);b:do switch(m|0){case 43:case 45:{l=1-(((m|0)==45&1)<<1)|0;n=f[c>>2]|0;if(n>>>0<(f[k>>2]|0)>>>0){f[c>>2]=n+1;o=h[n>>0]|0;p=l;break b}else{o=Si(a)|0;p=l;break b}break}default:{o=m;p=1}}while(0);l=0;n=o;while(1){if((n|32|0)!=(b[18546+l>>0]|0)){q=l;r=n;break}do if(l>>>0<7){s=f[c>>2]|0;if(s>>>0<(f[k>>2]|0)>>>0){f[c>>2]=s+1;t=h[s>>0]|0;break}else{t=Si(a)|0;break}}else t=n;while(0);s=l+1|0;if(s>>>0<8){l=s;n=t}else{q=s;r=t;break}}c:do switch(q|0){case 8:break;case 3:{i=23;break}default:{n=(d|0)!=0;if(n&q>>>0>3)if((q|0)==8)break c;else{i=23;break c}d:do if(!q){l=0;s=r;while(1){if((s|32|0)!=(b[18555+l>>0]|0)){u=l;v=s;break d}do if(l>>>0<2){w=f[c>>2]|0;if(w>>>0<(f[k>>2]|0)>>>0){f[c>>2]=w+1;x=h[w>>0]|0;break}else{x=Si(a)|0;break}}else x=s;while(0);w=l+1|0;if(w>>>0<3){l=w;s=x}else{u=w;v=x;break}}}else{u=q;v=r}while(0);switch(u|0){case 3:{s=f[c>>2]|0;if(s>>>0<(f[k>>2]|0)>>>0){f[c>>2]=s+1;y=h[s>>0]|0}else y=Si(a)|0;if((y|0)==40)z=1;else{if(!(f[k>>2]|0)){j=B;break a}f[c>>2]=(f[c>>2]|0)+-1;j=B;break a}while(1){s=f[c>>2]|0;if(s>>>0<(f[k>>2]|0)>>>0){f[c>>2]=s+1;A=h[s>>0]|0}else A=Si(a)|0;if(!((A+-48|0)>>>0<10|(A+-65|0)>>>0<26)?!((A|0)==95|(A+-97|0)>>>0<26):0)break;z=z+1|0}if((A|0)==41){j=B;break a}s=(f[k>>2]|0)==0;if(!s)f[c>>2]=(f[c>>2]|0)+-1;if(!n){l=Vq()|0;f[l>>2]=22;Ym(a,0);j=0.0;break a}if(!z){j=B;break a}else D=z;while(1){D=D+-1|0;if(!s)f[c>>2]=(f[c>>2]|0)+-1;if(!D){j=B;break a}}break}case 0:{if((v|0)==48){s=f[c>>2]|0;if(s>>>0<(f[k>>2]|0)>>>0){f[c>>2]=s+1;E=h[s>>0]|0}else E=Si(a)|0;if((E|32|0)==120){j=+Fc(a,g,e,p,d);break a}if(!(f[k>>2]|0))F=48;else{f[c>>2]=(f[c>>2]|0)+-1;F=48}}else F=v;j=+nb(a,F,g,e,p,d);break a;break}default:{if(f[k>>2]|0)f[c>>2]=(f[c>>2]|0)+-1;s=Vq()|0;f[s>>2]=22;Ym(a,0);j=0.0;break a}}}}while(0);if((i|0)==23){s=(f[k>>2]|0)==0;if(!s)f[c>>2]=(f[c>>2]|0)+-1;if((d|0)!=0&q>>>0>3){n=q;do{if(!s)f[c>>2]=(f[c>>2]|0)+-1;n=n+-1|0}while(n>>>0>3)}}j=+$($(p|0)*$(C))}while(0);return +j}function Sc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;g=u;u=u+16|0;h=g;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;i=ln(16)|0;f[h>>2]=i;f[h+8>>2]=-2147483632;f[h+4>>2]=15;j=i;k=14479;l=j+15|0;do{b[j>>0]=b[k>>0]|0;j=j+1|0;k=k+1|0}while((j|0)<(l|0));b[i+15>>0]=0;i=Hk(c,h,-1)|0;if((b[h+11>>0]|0)<0)Oq(f[h>>2]|0);switch(i|0){case 0:{m=ln(52)|0;j=m;l=j+52|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(l|0));Zn(m);n=4044;o=m;break}case -1:{if((mi(c)|0)==10){m=ln(52)|0;j=m;l=j+52|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(l|0));Zn(m);n=4044;o=m}else p=6;break}default:p=6}a:do if((p|0)==6){m=d+8|0;q=d+12|0;r=f[q>>2]|0;s=f[m>>2]|0;b:do if((r-s|0)>0){t=h+8|0;v=h+4|0;w=c+16|0;x=h+11|0;y=0;z=s;A=r;c:while(1){B=f[(f[z+(y<<2)>>2]|0)+28>>2]|0;switch(B|0){case 9:{p=12;break}case 6:case 5:case 4:case 2:{C=z;D=A;break}default:{if((B|2|0)!=3)break c;if((B|0)==9)p=12;else{C=z;D=A}}}if((p|0)==12){p=0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;B=ln(32)|0;f[h>>2]=B;f[t>>2]=-2147483616;f[v>>2]=17;j=B;k=14495;l=j+17|0;do{b[j>>0]=b[k>>0]|0;j=j+1|0;k=k+1|0}while((j|0)<(l|0));b[B+17>>0]=0;E=f[w>>2]|0;if(E){F=w;G=E;d:while(1){E=G;while(1){if((f[E+16>>2]|0)>=0)break;H=f[E+4>>2]|0;if(!H){I=F;break d}else E=H}G=f[E>>2]|0;if(!G){I=E;break}else F=E}if(((I|0)!=(w|0)?(f[I+16>>2]|0)<=0:0)?(F=I+20|0,(Jh(F,h)|0)!=0):0)J=Hk(F,h,-1)|0;else p=21}else p=21;if((p|0)==21){p=0;J=Hk(c,h,-1)|0}if((b[x>>0]|0)<0)Oq(f[h>>2]|0);if((J|0)<1)break;C=f[m>>2]|0;D=f[q>>2]|0}y=y+1|0;if((y|0)>=(D-C>>2|0))break b;else{z=C;A=D}}if((i|0)!=1){A=ln(52)|0;j=A;l=j+52|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(l|0));Zn(A);n=4044;o=A;break a}f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;z=ln(32)|0;f[h>>2]=z;f[h+8>>2]=-2147483616;f[h+4>>2]=24;j=z;k=14513;l=j+24|0;do{b[j>>0]=b[k>>0]|0;j=j+1|0;k=k+1|0}while((j|0)<(l|0));b[z+24>>0]=0;f[a>>2]=-1;pj(a+4|0,h);if((b[h+11>>0]|0)<0)Oq(f[h>>2]|0);u=g;return}while(0);q=ln(52)|0;j=q;l=j+52|0;do{f[j>>2]=0;j=j+4|0}while((j|0)<(l|0));Zn(q);n=3988;o=q}while(0);f[o>>2]=n;ip(o,d);Md(a,o,c,e);Va[f[(f[o>>2]|0)+4>>2]&127](o);u=g;return}function Tc(a,c,d,e,g,h){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;i=u;u=u+32|0;j=i+4|0;k=i;l=i+16|0;m=(_(e|0)|0)^31;if((e|0)>0)if(m>>>0>17){n=0;u=i;return n|0}else o=m+1|0;else o=1;do if(g){m=ln(48)|0;f[j>>2]=m;f[j+8>>2]=-2147483600;f[j+4>>2]=33;e=m;p=15987;q=e+33|0;do{b[e>>0]=b[p>>0]|0;e=e+1|0;p=p+1|0}while((e|0)<(q|0));b[m+33>>0]=0;r=(Jh(g,j)|0)==0;if((b[j+11>>0]|0)<0)Oq(f[j>>2]|0);if(!r){r=ln(48)|0;f[j>>2]=r;f[j+8>>2]=-2147483600;f[j+4>>2]=33;e=r;p=15987;q=e+33|0;do{b[e>>0]=b[p>>0]|0;e=e+1|0;p=p+1|0}while((e|0)<(q|0));b[r+33>>0]=0;p=Mk(g,j)|0;if((b[j+11>>0]|0)<0)Oq(f[j>>2]|0);if((p|0)<4){s=o+-2|0;break}if((p|0)<6){s=o+-1|0;break}if((p|0)>9){s=o+2|0;break}else{s=o+((p|0)>7&1)|0;break}}else s=o}else s=o;while(0);o=(s|0)>1?s:1;s=(o|0)<18?o:18;b[l>>0]=s;o=h+16|0;g=f[o+4>>2]|0;if(!((g|0)>0|(g|0)==0&(f[o>>2]|0)>>>0>0)){f[k>>2]=f[h+4>>2];f[j>>2]=f[k>>2];Me(h,j,l,l+1|0)|0}do switch(s&31){case 1:case 0:{n=ue(a,c,d,h)|0;u=i;return n|0}case 2:{n=te(a,c,d,h)|0;u=i;return n|0}case 3:{n=se(a,c,d,h)|0;u=i;return n|0}case 4:{n=re(a,c,d,h)|0;u=i;return n|0}case 5:{n=qe(a,c,d,h)|0;u=i;return n|0}case 6:{n=pe(a,c,d,h)|0;u=i;return n|0}case 7:{n=oe(a,c,d,h)|0;u=i;return n|0}case 8:{n=ne(a,c,d,h)|0;u=i;return n|0}case 9:{n=me(a,c,d,h)|0;u=i;return n|0}case 10:{n=le(a,c,d,h)|0;u=i;return n|0}case 11:{n=ke(a,c,d,h)|0;u=i;return n|0}case 12:{n=ie(a,c,d,h)|0;u=i;return n|0}case 13:{n=he(a,c,d,h)|0;u=i;return n|0}case 14:{n=ge(a,c,d,h)|0;u=i;return n|0}case 15:{n=fe(a,c,d,h)|0;u=i;return n|0}case 16:{n=ee(a,c,d,h)|0;u=i;return n|0}case 17:{n=de(a,c,d,h)|0;u=i;return n|0}case 18:{n=ce(a,c,d,h)|0;u=i;return n|0}default:{n=0;u=i;return n|0}}while(0);return 0}function Uc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;xb(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function Vc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;yb(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function Wc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;zb(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function Xc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Ab(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function Yc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*1048576.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==1048576){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Fb(z,A,g);a:do if((x|0)<1048576){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=1048576-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>1048576;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-1048576|0;m=x;while(1){v=1048576.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==1048576){C=p;D=1048576;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=1048576){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*9.5367431640625e-07)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function Zc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*524288.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==524288){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Bb(z,A,g);a:do if((x|0)<524288){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=524288-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>524288;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-524288|0;m=x;while(1){v=524288.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==524288){C=p;D=524288;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=524288){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*1.9073486328125e-06)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function _c(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*262144.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==262144){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Cb(z,A,g);a:do if((x|0)<262144){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=262144-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>262144;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-262144|0;m=x;while(1){v=262144.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==262144){C=p;D=262144;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=262144){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*3.814697265625e-06)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function $c(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*65536.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==65536){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Db(z,A,g);a:do if((x|0)<65536){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=65536-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>65536;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-65536|0;m=x;while(1){v=65536.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==65536){C=p;D=65536;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=65536){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*.0000152587890625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function ad(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*32768.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==32768){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Eb(z,A,g);a:do if((x|0)<32768){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=32768-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>32768;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-32768|0;m=x;while(1){v=32768.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==32768){C=p;D=32768;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=32768){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*.000030517578125)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function bd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*8192.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==8192){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Gb(z,A,g);a:do if((x|0)<8192){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=8192-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>8192;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-8192|0;m=x;while(1){v=8192.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==8192){C=p;D=8192;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=8192){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*.0001220703125)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function cd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Hb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function dd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Ib(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function ed(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Jb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function fd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Kb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function gd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Lb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function hd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Mb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function id(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Nb(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function jd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;e=u;u=u+16|0;g=e;h=e+4|0;if((c|0)>0){i=0;j=0;k=0;l=0;while(1){m=b+(j<<3)|0;n=f[m>>2]|0;o=f[m+4>>2]|0;m=Vn(n|0,o|0,k|0,l|0)|0;p=I;q=(n|0)==0&(o|0)==0?i:j;j=j+1|0;if((j|0)==(c|0)){r=q;s=p;t=m;break}else{i=q;k=m;l=p}}}else{r=0;s=0;t=0}l=r+1|0;f[a+12>>2]=l;k=a+4|0;i=f[k>>2]|0;c=f[a>>2]|0;j=i-c>>3;p=c;c=i;if(l>>>0<=j>>>0){if(l>>>0>>0?(i=p+(l<<3)|0,(i|0)!=(c|0)):0)f[k>>2]=c+(~((c+-8-i|0)>>>3)<<3)}else wh(a,l-j|0);v=+(t>>>0)+4294967296.0*+(s>>>0);s=(r|0)<0;if(!s){t=f[a>>2]|0;j=0;i=0;do{c=b+(i<<3)|0;k=f[c>>2]|0;p=f[c+4>>2]|0;c=~~((+(k>>>0)+4294967296.0*+(p>>>0))/v*4096.0+.5)>>>0;m=((k|0)!=0|(p|0)!=0)&(c|0)==0?1:c;f[t+(i<<3)>>2]=m;j=m+j|0;i=i+1|0}while((i|0)!=(l|0));if((j|0)==4096){if(s){w=0;u=e;return w|0}}else{x=j;y=12}}else{x=0;y=12}if((y|0)==12){f[h>>2]=0;j=h+4|0;f[j>>2]=0;f[h+8>>2]=0;do if(l)if(l>>>0>1073741823)aq(h);else{i=l<<2;t=ln(i)|0;f[h>>2]=t;m=t+(l<<2)|0;f[h+8>>2]=m;sj(t|0,0,i|0)|0;f[j>>2]=m;z=t;A=m;break}else{z=0;A=0}while(0);if(!s?(f[z>>2]=0,r|0):0){m=1;do{f[z+(m<<2)>>2]=m;m=m+1|0}while((m|0)!=(l|0))}f[g>>2]=a;Ob(z,A,g);a:do if((x|0)<4096){g=(f[a>>2]|0)+(f[(f[j>>2]|0)+-4>>2]<<3)|0;f[g>>2]=4096-x+(f[g>>2]|0);B=0}else{g=f[h>>2]|0;if((r|0)<=0){A=(x|0)>4096;while(1)if(!A){B=0;break a}}A=f[a>>2]|0;z=x+-4096|0;m=x;while(1){v=4096.0/+(m|0);t=r;i=z;c=m;while(1){p=A+(f[g+(t<<2)>>2]<<3)|0;k=f[p>>2]|0;if(k>>>0<2){y=28;break}q=k-~~+J(+(v*+(k>>>0)))|0;o=(q|0)==0?1:q;q=(o|0)<(k|0)?o:k+-1|0;o=(q|0)>(i|0)?i:q;f[p>>2]=k-o;k=c-o|0;p=i-o|0;if((k|0)==4096){C=p;D=4096;break}if((t|0)>1){t=t+-1|0;i=p;c=k}else{C=p;D=k;break}}if((y|0)==28){y=0;if((t|0)==(r|0)){B=1;break a}else{C=i;D=c}}if((C|0)>0){z=C;m=D}else{B=0;break}}}while(0);D=f[h>>2]|0;if(D|0){h=f[j>>2]|0;if((h|0)!=(D|0))f[j>>2]=h+(~((h+-4-D|0)>>>2)<<2);Oq(D)}if((B|0)!=0|s){w=0;u=e;return w|0}}B=f[a>>2]|0;D=0;h=0;do{f[B+(D<<3)+4>>2]=h;h=(f[B+(D<<3)>>2]|0)+h|0;D=D+1|0}while((D|0)!=(l|0));if((h|0)!=4096){w=0;u=e;return w|0}if(s)E=0.0;else{s=f[a>>2]|0;h=0;v=0.0;while(1){D=f[s+(h<<3)>>2]|0;if(!D)F=v;else{B=b+(h<<3)|0;G=+((f[B>>2]|0)>>>0)+4294967296.0*+((f[B+4>>2]|0)>>>0);F=v+ +Zg(+(D>>>0)*.000244140625)*G}h=h+1|0;if((h|0)==(l|0)){E=F;break}else v=F}}F=+W(+-E);l=+K(F)>=1.0?(F>0.0?~~+Y(+J(F/4294967296.0),4294967295.0)>>>0:~~+W((F-+(~~F>>>0))/4294967296.0)>>>0):0;h=a+16|0;f[h>>2]=~~F>>>0;f[h+4>>2]=l;w=Le(a,d)|0;u=e;return w|0}function kd(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0;g=u;u=u+32|0;d=g+16|0;h=g+8|0;i=g;j=e>>>0>1073741823?-1:e<<2;k=Lq(j)|0;sj(k|0,0,j|0)|0;j=f[a+28>>2]|0;l=a+36|0;m=f[l>>2]|0;n=f[m+4>>2]|0;o=f[m>>2]|0;p=n-o|0;a:do if((p|0)>4){q=p>>2;r=f[a+32>>2]|0;s=a+8|0;t=h+4|0;v=i+4|0;w=d+4|0;x=j+12|0;y=(e|0)>0;z=k+4|0;A=h+4|0;B=i+4|0;C=d+4|0;D=q+-1|0;if(n-o>>2>>>0>D>>>0){E=q;F=D;G=o}else{H=m;aq(H)}while(1){D=f[G+(F<<2)>>2]|0;q=X(F,e)|0;if((D|0)!=-1?(I=f[(f[x>>2]|0)+(D<<2)>>2]|0,(I|0)!=-1):0){D=f[j>>2]|0;J=f[r>>2]|0;K=f[J+(f[D+(I<<2)>>2]<<2)>>2]|0;L=I+1|0;M=((L>>>0)%3|0|0)==0?I+-2|0:L;if((M|0)==-1)N=-1;else N=f[D+(M<<2)>>2]|0;M=f[J+(N<<2)>>2]|0;L=(((I>>>0)%3|0|0)==0?2:-1)+I|0;if((L|0)==-1)O=-1;else O=f[D+(L<<2)>>2]|0;L=f[J+(O<<2)>>2]|0;if((K|0)<(F|0)&(M|0)<(F|0)&(L|0)<(F|0)){J=X(K,e)|0;K=X(M,e)|0;M=X(L,e)|0;if(y){L=0;do{f[k+(L<<2)>>2]=(f[b+(L+M<<2)>>2]|0)+(f[b+(L+K<<2)>>2]|0)-(f[b+(L+J<<2)>>2]|0);L=L+1|0}while((L|0)!=(e|0))}L=b+(q<<2)|0;J=c+(q<<2)|0;K=f[L+4>>2]|0;M=f[k>>2]|0;D=f[z>>2]|0;f[h>>2]=f[L>>2];f[A>>2]=K;f[i>>2]=M;f[B>>2]=D;Od(d,s,h,i);f[J>>2]=f[d>>2];f[J+4>>2]=f[C>>2]}else P=15}else P=15;if((P|0)==15){P=0;J=b+(q<<2)|0;D=b+((X(E+-2|0,e)|0)<<2)|0;M=c+(q<<2)|0;K=f[J+4>>2]|0;L=f[D>>2]|0;I=f[D+4>>2]|0;f[h>>2]=f[J>>2];f[t>>2]=K;f[i>>2]=L;f[v>>2]=I;Od(d,s,h,i);f[M>>2]=f[d>>2];f[M+4>>2]=f[w>>2]}if((E|0)<=2)break a;M=f[l>>2]|0;G=f[M>>2]|0;I=F+-1|0;if((f[M+4>>2]|0)-G>>2>>>0<=I>>>0){H=M;break}else{M=F;F=I;E=M}}aq(H)}while(0);if((e|0)<=0){Q=a+8|0;R=b+4|0;S=f[b>>2]|0;T=f[R>>2]|0;U=k+4|0;V=f[k>>2]|0;W=f[U>>2]|0;f[h>>2]=S;Y=h+4|0;f[Y>>2]=T;f[i>>2]=V;Z=i+4|0;f[Z>>2]=W;Od(d,Q,h,i);_=f[d>>2]|0;f[c>>2]=_;$=d+4|0;aa=f[$>>2]|0;ba=c+4|0;f[ba>>2]=aa;Mq(k);u=g;return 1}sj(k|0,0,e<<2|0)|0;Q=a+8|0;R=b+4|0;S=f[b>>2]|0;T=f[R>>2]|0;U=k+4|0;V=f[k>>2]|0;W=f[U>>2]|0;f[h>>2]=S;Y=h+4|0;f[Y>>2]=T;f[i>>2]=V;Z=i+4|0;f[Z>>2]=W;Od(d,Q,h,i);_=f[d>>2]|0;f[c>>2]=_;$=d+4|0;aa=f[$>>2]|0;ba=c+4|0;f[ba>>2]=aa;Mq(k);u=g;return 1}function ld(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0;d=u;u=u+32|0;e=d;g=d+20|0;h=d+24|0;i=d+8|0;j=f[a>>2]|0;k=j+8|0;l=j;j=f[l>>2]|0;m=f[l+4>>2]|0;l=Vn(j|0,m|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=I;n=Vn(l|0,k|0,(l|0)==0&(k|0)==0&1|0,0)|0;k=~~((+(j>>>0)+4294967296.0*+(m>>>0))/(+(n>>>0)+4294967296.0*+(I>>>0))*256.0+.5)>>>0;n=k>>>0<255?k:255;k=n+((n|0)==0&1)&255;b[h>>0]=k;n=a+12|0;m=a+16|0;j=((f[m>>2]|0)-(f[n>>2]|0)<<1)+64|0;f[i>>2]=0;l=i+4|0;f[l>>2]=0;f[i+8>>2]=0;if(!j)o=0;else{if((j|0)<0)aq(i);p=ln(j)|0;f[l>>2]=p;f[i>>2]=p;f[i+8>>2]=p+j;q=j;j=p;do{b[j>>0]=0;j=(f[l>>2]|0)+1|0;f[l>>2]=j;q=q+-1|0}while((q|0)!=0);o=f[i>>2]|0}q=a+28|0;j=(f[q>>2]|0)+-1|0;a:do if((j|0)>-1){p=a+24|0;r=j;s=4096;t=0;v=k;while(1){w=(f[p>>2]&1<>>0>>0){y=t;z=s}else{b[o+t>>0]=s;y=t+1|0;z=s>>>8}un(f[4092+(x<<3)>>2]|0,0,z|0,0)|0;A=z+(w?0:0-v&255)+(X((z+I|0)>>>(f[4092+(x<<3)+4>>2]|0),256-x|0)|0)|0;x=r+-1|0;if((x|0)<=-1){B=A;C=y;break a}r=x;s=A;t=y;v=b[h>>0]|0}}else{B=4096;C=0}while(0);y=f[m>>2]|0;if((f[n>>2]|0)==(y|0)){D=B;E=C}else{z=B;B=C;C=y;while(1){C=C+-4|0;y=f[C>>2]|0;k=31;j=z;v=B;while(1){t=b[h>>0]|0;s=(1<>>0>>0){F=v;G=j}else{b[o+v>>0]=j;F=v+1|0;G=j>>>8}un(f[4092+(r<<3)>>2]|0,0,G|0,0)|0;j=G+(s?0:0-t&255)+(X((G+I|0)>>>(f[4092+(r<<3)+4>>2]|0),256-r|0)|0)|0;if((k|0)<=0)break;else{k=k+-1|0;v=F}}if((f[n>>2]|0)==(C|0)){D=j;E=F;break}else{z=j;B=F}}}F=D+-4096|0;do if(F>>>0>=64){if(F>>>0<16384){B=o+E|0;z=D+12288|0;b[B>>0]=z;H=2;J=z>>>8;K=B+1|0;L=25;break}if(F>>>0<4194304){B=o+E|0;z=D+8384512|0;b[B>>0]=z;b[B+1>>0]=z>>>8;H=3;J=z>>>16;K=B+2|0;L=25}else M=E}else{H=1;J=F;K=o+E|0;L=25}while(0);if((L|0)==25){b[K>>0]=J;M=H+E|0}E=c+16|0;H=E;J=f[H+4>>2]|0;if(!((J|0)>0|(J|0)==0&(f[H>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Me(c,e,h,h+1|0)|0}ci(M,c)|0;h=f[i>>2]|0;H=E;E=f[H+4>>2]|0;if(!((E|0)>0|(E|0)==0&(f[H>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Me(c,e,h,h+M|0)|0}M=e;f[M>>2]=0;f[M+4>>2]=0;qf(a,2,e);e=f[a+12>>2]|0;M=f[m>>2]|0;if((M|0)!=(e|0))f[m>>2]=M+(~((M+-4-e|0)>>>2)<<2);f[a+24>>2]=0;f[q>>2]=0;q=f[i>>2]|0;if(!q){u=d;return}if((f[l>>2]|0)!=(q|0))f[l>>2]=q;Oq(q);u=d;return}function md(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;c=u;u=u+16|0;b=c+8|0;d=c+4|0;e=c;g=a+64|0;h=f[g>>2]|0;if((f[h+28>>2]|0)==(f[h+24>>2]|0)){u=c;return}i=a+52|0;j=a+56|0;k=a+60|0;l=a+12|0;m=a+28|0;n=a+40|0;o=a+44|0;p=a+48|0;q=0;r=0;s=h;while(1){h=f[(f[s+24>>2]|0)+(r<<2)>>2]|0;if((h|0)==-1){t=q;v=s}else{w=q+1|0;f[b>>2]=q;x=f[j>>2]|0;if((x|0)==(f[k>>2]|0))Ri(i,b);else{f[x>>2]=q;f[j>>2]=x+4}f[d>>2]=h;f[e>>2]=0;a:do if(!(f[(f[l>>2]|0)+(r>>>5<<2)>>2]&1<<(r&31)))y=h;else{x=h+1|0;z=((x>>>0)%3|0|0)==0?h+-2|0:x;if(((z|0)!=-1?(f[(f[a>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)==0:0)?(x=f[(f[(f[g>>2]|0)+12>>2]|0)+(z<<2)>>2]|0,z=x+1|0,(x|0)!=-1):0){A=((z>>>0)%3|0|0)==0?x+-2|0:z;f[e>>2]=A;if((A|0)==-1){y=h;break}else B=A;while(1){f[d>>2]=B;A=B+1|0;z=((A>>>0)%3|0|0)==0?B+-2|0:A;if((z|0)==-1)break;if(f[(f[a>>2]|0)+(z>>>5<<2)>>2]&1<<(z&31)|0)break;A=f[(f[(f[g>>2]|0)+12>>2]|0)+(z<<2)>>2]|0;z=A+1|0;if((A|0)==-1)break;x=((z>>>0)%3|0|0)==0?A+-2|0:z;f[e>>2]=x;if((x|0)==-1){y=B;break a}else B=x}f[e>>2]=-1;y=B;break}f[e>>2]=-1;y=h}while(0);f[(f[m>>2]|0)+(y<<2)>>2]=f[b>>2];h=f[o>>2]|0;if((h|0)==(f[p>>2]|0))Ri(n,d);else{f[h>>2]=f[d>>2];f[o>>2]=h+4}h=f[g>>2]|0;x=f[d>>2]|0;b:do if(((x|0)!=-1?(z=(((x>>>0)%3|0|0)==0?2:-1)+x|0,(z|0)!=-1):0)?(A=f[(f[h+12>>2]|0)+(z<<2)>>2]|0,(A|0)!=-1):0){z=A+(((A>>>0)%3|0|0)==0?2:-1)|0;f[e>>2]=z;if((z|0)!=-1&(z|0)!=(x|0)){A=w;C=z;while(1){z=C+1|0;D=((z>>>0)%3|0|0)==0?C+-2|0:z;do if(f[(f[a>>2]|0)+(D>>>5<<2)>>2]&1<<(D&31)){z=A+1|0;f[b>>2]=A;E=f[j>>2]|0;if((E|0)==(f[k>>2]|0))Ri(i,b);else{f[E>>2]=A;f[j>>2]=E+4}E=f[o>>2]|0;if((E|0)==(f[p>>2]|0)){Ri(n,e);F=z;break}else{f[E>>2]=f[e>>2];f[o>>2]=E+4;F=z;break}}else F=A;while(0);f[(f[m>>2]|0)+(f[e>>2]<<2)>>2]=f[b>>2];G=f[g>>2]|0;D=f[e>>2]|0;if((D|0)==-1)break;z=(((D>>>0)%3|0|0)==0?2:-1)+D|0;if((z|0)==-1)break;D=f[(f[G+12>>2]|0)+(z<<2)>>2]|0;if((D|0)==-1)break;C=D+(((D>>>0)%3|0|0)==0?2:-1)|0;f[e>>2]=C;if(!((C|0)!=-1?(C|0)!=(f[d>>2]|0):0)){H=F;I=G;break b}else A=F}f[e>>2]=-1;H=F;I=G}else{H=w;I=h}}else J=26;while(0);if((J|0)==26){J=0;f[e>>2]=-1;H=w;I=h}t=H;v=I}r=r+1|0;if(r>>>0>=(f[v+28>>2]|0)-(f[v+24>>2]|0)>>2>>>0)break;else{q=t;s=v}}u=c;return}function nd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;h=a+124|0;f[h>>2]=(f[h>>2]|0)+1;h=a+88|0;i=a+120|0;j=f[i>>2]|0;k=j+1|0;do if((j|0)!=-1){l=((k>>>0)%3|0|0)==0?j+-2|0:k;if(!((j>>>0)%3|0)){m=j+2|0;n=l;break}else{m=j+-1|0;n=l;break}}else{m=-1;n=-1}while(0);k=a+104|0;l=a+92|0;o=f[l>>2]|0;p=o+(n<<2)|0;q=f[k>>2]|0;r=q+(f[p>>2]<<2)|0;s=f[r>>2]|0;switch(b|0){case 1:case 0:{f[r>>2]=s+-1;r=q+(f[o+(m<<2)>>2]<<2)|0;f[r>>2]=(f[r>>2]|0)+-1;if((b|0)==1){if((m|0)!=-1?(r=f[(f[(f[h>>2]|0)+12>>2]|0)+(m<<2)>>2]|0,(r|0)!=-1):0){t=a+64|0;v=1;w=r;while(1){r=f[t>>2]|0;x=f[(f[r>>2]|0)+36>>2]|0;f[e>>2]=(w>>>0)/3|0;f[d>>2]=f[e>>2];if(Ra[x&127](r,d)|0){y=v;break}r=w+1|0;x=((r>>>0)%3|0|0)==0?w+-2|0:r;if((x|0)==-1){z=12;break}w=f[(f[(f[h>>2]|0)+12>>2]|0)+(x<<2)>>2]|0;x=v+1|0;if((w|0)==-1){y=x;break}else v=x}if((z|0)==12)y=v+1|0;A=y;B=f[k>>2]|0;C=f[l>>2]|0}else{A=1;B=q;C=o}f[B+(f[C+(f[i>>2]<<2)>>2]<<2)>>2]=A;A=a+108|0;i=f[A>>2]|0;C=i-B>>2;B=i;if((n|0)!=-1?(i=f[(f[(f[h>>2]|0)+12>>2]|0)+(n<<2)>>2]|0,(i|0)!=-1):0){n=a+64|0;y=1;v=i;while(1){i=f[n>>2]|0;w=f[(f[i>>2]|0)+36>>2]|0;f[g>>2]=(v>>>0)/3|0;f[d>>2]=f[g>>2];if(Ra[w&127](i,d)|0){D=y;break}i=v+1|0;f[(f[l>>2]|0)+((((i>>>0)%3|0|0)==0?v+-2|0:i)<<2)>>2]=C;i=(((v>>>0)%3|0|0)==0?2:-1)+v|0;if((i|0)==-1){z=20;break}v=f[(f[(f[h>>2]|0)+12>>2]|0)+(i<<2)>>2]|0;i=y+1|0;if((v|0)==-1){D=i;break}else y=i}if((z|0)==20)D=y+1|0;E=D;F=f[A>>2]|0}else{E=1;F=B}f[d>>2]=E;if(F>>>0<(f[a+112>>2]|0)>>>0){f[F>>2]=E;f[A>>2]=F+4}else Ri(k,d)}break}case 5:{k=q+(f[o+(j<<2)>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-1;k=q+(f[p>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-1;k=q+(f[o+(m<<2)>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-2;break}case 3:{k=q+(f[o+(j<<2)>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-1;k=q+(f[p>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-2;k=q+(f[o+(m<<2)>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-1;break}case 7:{k=q+(f[o+(j<<2)>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-2;k=q+(f[p>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-2;k=q+(f[o+(m<<2)>>2]<<2)|0;f[k>>2]=(f[k>>2]|0)+-2;break}default:{}}k=a+116|0;m=f[k>>2]|0;if((m|0)==-1){f[k>>2]=b;u=c;return}o=f[a+128>>2]|0;if((s|0)<(o|0))G=o;else{q=f[a+132>>2]|0;G=(s|0)>(q|0)?q:s}s=G-o|0;o=f[a+136>>2]|0;a=f[3724+(m<<2)>>2]|0;f[d>>2]=a;m=o+(s*12|0)+4|0;G=f[m>>2]|0;if(G>>>0<(f[o+(s*12|0)+8>>2]|0)>>>0){f[G>>2]=a;f[m>>2]=G+4}else Ri(o+(s*12|0)|0,d);f[k>>2]=b;u=c;return}function od(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0;g=u;u=u+32|0;d=g+16|0;h=g+8|0;i=g;j=e>>>0>1073741823?-1:e<<2;k=Lq(j)|0;sj(k|0,0,j|0)|0;j=f[a+28>>2]|0;l=a+36|0;m=f[l>>2]|0;n=f[m+4>>2]|0;o=f[m>>2]|0;p=n-o|0;a:do if((p|0)>4){q=p>>2;r=f[a+32>>2]|0;s=a+8|0;t=h+4|0;v=i+4|0;w=d+4|0;x=j+64|0;y=j+28|0;z=(e|0)>0;A=k+4|0;B=h+4|0;C=i+4|0;D=d+4|0;E=q+-1|0;if(n-o>>2>>>0>E>>>0){F=q;G=E;H=o}else{I=m;aq(I)}while(1){E=f[H+(G<<2)>>2]|0;q=X(G,e)|0;if((((E|0)!=-1?(f[(f[j>>2]|0)+(E>>>5<<2)>>2]&1<<(E&31)|0)==0:0)?(J=f[(f[(f[x>>2]|0)+12>>2]|0)+(E<<2)>>2]|0,(J|0)!=-1):0)?(E=f[y>>2]|0,K=f[r>>2]|0,L=f[K+(f[E+(J<<2)>>2]<<2)>>2]|0,M=J+1|0,N=f[K+(f[E+((((M>>>0)%3|0|0)==0?J+-2|0:M)<<2)>>2]<<2)>>2]|0,M=f[K+(f[E+((((J>>>0)%3|0|0)==0?2:-1)+J<<2)>>2]<<2)>>2]|0,(L|0)<(G|0)&(N|0)<(G|0)&(M|0)<(G|0)):0){J=X(L,e)|0;L=X(N,e)|0;N=X(M,e)|0;if(z){M=0;do{f[k+(M<<2)>>2]=(f[b+(M+N<<2)>>2]|0)+(f[b+(M+L<<2)>>2]|0)-(f[b+(M+J<<2)>>2]|0);M=M+1|0}while((M|0)!=(e|0))}M=b+(q<<2)|0;J=c+(q<<2)|0;L=f[M+4>>2]|0;N=f[k>>2]|0;E=f[A>>2]|0;f[h>>2]=f[M>>2];f[B>>2]=L;f[i>>2]=N;f[C>>2]=E;Od(d,s,h,i);f[J>>2]=f[d>>2];f[J+4>>2]=f[D>>2]}else{J=b+(q<<2)|0;E=b+((X(F+-2|0,e)|0)<<2)|0;N=c+(q<<2)|0;L=f[J+4>>2]|0;M=f[E>>2]|0;K=f[E+4>>2]|0;f[h>>2]=f[J>>2];f[t>>2]=L;f[i>>2]=M;f[v>>2]=K;Od(d,s,h,i);f[N>>2]=f[d>>2];f[N+4>>2]=f[w>>2]}if((F|0)<=2)break a;N=f[l>>2]|0;H=f[N>>2]|0;K=G+-1|0;if((f[N+4>>2]|0)-H>>2>>>0<=K>>>0){I=N;break}else{N=G;G=K;F=N}}aq(I)}while(0);if((e|0)<=0){O=a+8|0;P=b+4|0;Q=f[b>>2]|0;R=f[P>>2]|0;S=k+4|0;T=f[k>>2]|0;U=f[S>>2]|0;f[h>>2]=Q;V=h+4|0;f[V>>2]=R;f[i>>2]=T;W=i+4|0;f[W>>2]=U;Od(d,O,h,i);Y=f[d>>2]|0;f[c>>2]=Y;Z=d+4|0;_=f[Z>>2]|0;$=c+4|0;f[$>>2]=_;Mq(k);u=g;return 1}sj(k|0,0,e<<2|0)|0;O=a+8|0;P=b+4|0;Q=f[b>>2]|0;R=f[P>>2]|0;S=k+4|0;T=f[k>>2]|0;U=f[S>>2]|0;f[h>>2]=Q;V=h+4|0;f[V>>2]=R;f[i>>2]=T;W=i+4|0;f[W>>2]=U;Od(d,O,h,i);Y=f[d>>2]|0;f[c>>2]=Y;Z=d+4|0;_=f[Z>>2]|0;$=c+4|0;f[$>>2]=_;Mq(k);u=g;return 1}function pd(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0;switch(c|0){case 1:{c=ln(60)|0;f[c>>2]=1544;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];fk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2076;i=c;f[a>>2]=i;return}case 2:{c=ln(60)|0;f[c>>2]=1544;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];fk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2132;i=c;f[a>>2]=i;return}case 4:{c=ln(168)|0;Ti(c,d,e,g);i=c;f[a>>2]=i;return}case 3:{c=ln(88)|0;f[c>>2]=1544;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];fk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2188;h=c+60|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;f[h+16>>2]=0;f[h+20>>2]=0;f[h+24>>2]=0;i=c;f[a>>2]=i;return}case 5:{c=ln(104)|0;f[c>>2]=1544;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];fk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2244;f[c+60>>2]=0;f[c+64>>2]=0;f[c+76>>2]=0;f[c+80>>2]=0;f[c+84>>2]=0;h=c+88|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=ln(140)|0;f[c>>2]=1544;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];fk(c+32|0,e+24|0);e=c+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=2300;f[c+64>>2]=0;f[c+68>>2]=0;e=c+72|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+60>>2]=2356;f[c+88>>2]=1;g=c+92|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;wn(c+108|0);i=c;f[a>>2]=i;return}default:{i=0;f[a>>2]=i;return}}}function qd(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0;switch(c|0){case 1:{c=ln(60)|0;f[c>>2]=1544;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];fk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1656;i=c;f[a>>2]=i;return}case 2:{c=ln(60)|0;f[c>>2]=1544;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];fk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1712;i=c;f[a>>2]=i;return}case 4:{c=ln(168)|0;Ui(c,d,e,g);i=c;f[a>>2]=i;return}case 3:{c=ln(88)|0;f[c>>2]=1544;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];fk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1768;h=c+60|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;f[h+16>>2]=0;f[h+20>>2]=0;f[h+24>>2]=0;i=c;f[a>>2]=i;return}case 5:{c=ln(104)|0;f[c>>2]=1544;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[h+16>>2]=f[e+16>>2];f[h+20>>2]=f[e+20>>2];fk(c+32|0,e+24|0);h=c+44|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=1824;f[c+60>>2]=0;f[c+64>>2]=0;f[c+76>>2]=0;f[c+80>>2]=0;f[c+84>>2]=0;h=c+88|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=ln(140)|0;f[c>>2]=1544;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];f[d+16>>2]=f[e+16>>2];f[d+20>>2]=f[e+20>>2];fk(c+32|0,e+24|0);e=c+44|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=1880;f[c+64>>2]=0;f[c+68>>2]=0;e=c+72|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+60>>2]=1936;f[c+88>>2]=1;g=c+92|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;wn(c+108|0);i=c;f[a>>2]=i;return}default:{i=0;f[a>>2]=i;return}}}function rd(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;c=a+4|0;if(!b){e=f[a>>2]|0;f[a>>2]=0;if(e|0)Oq(e);f[c>>2]=0;return}if(b>>>0>1073741823){e=ra(8)|0;Oo(e,16035);f[e>>2]=7256;va(e|0,1112,110)}e=ln(b<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)Oq(g);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;g=f[c>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=b+-1|0;i=(h&b|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(b>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=c;c=f[g>>2]|0;if(!c)return;else{k=j;l=g;m=c;n=g}a:while(1){g=l;c=m;j=n;b:while(1){c:do if(i){e=c;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=q+2|0;v=e+12|0;w=q+6|0;x=f[e>>2]|0;d:do if(!x)y=e;else{z=d[q>>1]|0;A=e;B=x;while(1){C=B+8|0;if(z<<16>>16!=(d[C>>1]|0)){y=A;break d}if((d[u>>1]|0)!=(d[C+2>>1]|0)){y=A;break d}if((d[v>>1]|0)!=(d[B+12>>1]|0)){y=A;break d}if((d[w>>1]|0)!=(d[C+6>>1]|0)){y=A;break d}C=f[B>>2]|0;if(!C){y=B;break}else{D=B;B=C;A=D}}}while(0);f[j>>2]=f[y>>2];f[y>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){E=43;break a}}}else{e=c;while(1){w=f[e+4>>2]|0;if(w>>>0>>0)F=w;else F=(w>>>0)%(b>>>0)|0;if((F|0)==(k|0)){p=e;break c}w=(f[a>>2]|0)+(F<<2)|0;if(!(f[w>>2]|0)){r=e;s=F;t=w;break b}w=e+8|0;v=w+2|0;u=e+12|0;x=w+6|0;q=f[e>>2]|0;e:do if(!q)G=e;else{A=d[w>>1]|0;B=e;z=q;while(1){D=z+8|0;if(A<<16>>16!=(d[D>>1]|0)){G=B;break e}if((d[v>>1]|0)!=(d[D+2>>1]|0)){G=B;break e}if((d[u>>1]|0)!=(d[z+12>>1]|0)){G=B;break e}if((d[x>>1]|0)!=(d[D+6>>1]|0)){G=B;break e}D=f[z>>2]|0;if(!D){G=z;break}else{C=z;z=D;B=C}}}while(0);f[j>>2]=f[G>>2];f[G>>2]=f[f[(f[a>>2]|0)+(F<<2)>>2]>>2];f[f[(f[a>>2]|0)+(F<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){E=43;break a}}}while(0);c=f[p>>2]|0;if(!c){E=43;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){E=43;break}else{k=s;l=r;n=r}}if((E|0)==43)return}function sd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)Oq(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;Oo(e,16035);f[e>>2]=7256;va(e|0,1112,110)}e=ln(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)Oq(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){c:do if(i){e=d;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=q+1|0;v=q+2|0;w=q+3|0;x=f[e>>2]|0;d:do if(!x)y=e;else{z=b[q>>0]|0;A=e;B=x;while(1){C=B+8|0;if(z<<24>>24!=(b[C>>0]|0)){y=A;break d}if((b[u>>0]|0)!=(b[C+1>>0]|0)){y=A;break d}if((b[v>>0]|0)!=(b[C+2>>0]|0)){y=A;break d}if((b[w>>0]|0)!=(b[C+3>>0]|0)){y=A;break d}C=f[B>>2]|0;if(!C){y=B;break}else{D=B;B=C;A=D}}}while(0);f[j>>2]=f[y>>2];f[y>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){E=43;break a}}}else{e=d;while(1){w=f[e+4>>2]|0;if(w>>>0>>0)F=w;else F=(w>>>0)%(c>>>0)|0;if((F|0)==(k|0)){p=e;break c}w=(f[a>>2]|0)+(F<<2)|0;if(!(f[w>>2]|0)){r=e;s=F;t=w;break b}w=e+8|0;v=w+1|0;u=w+2|0;x=w+3|0;q=f[e>>2]|0;e:do if(!q)G=e;else{A=b[w>>0]|0;B=e;z=q;while(1){D=z+8|0;if(A<<24>>24!=(b[D>>0]|0)){G=B;break e}if((b[v>>0]|0)!=(b[D+1>>0]|0)){G=B;break e}if((b[u>>0]|0)!=(b[D+2>>0]|0)){G=B;break e}if((b[x>>0]|0)!=(b[D+3>>0]|0)){G=B;break e}D=f[z>>2]|0;if(!D){G=z;break}else{C=z;z=D;B=C}}}while(0);f[j>>2]=f[G>>2];f[G>>2]=f[f[(f[a>>2]|0)+(F<<2)>>2]>>2];f[f[(f[a>>2]|0)+(F<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){E=43;break a}}}while(0);d=f[p>>2]|0;if(!d){E=43;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){E=43;break}else{k=s;l=r;n=r}}if((E|0)==43)return}function td(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0;i=u;u=u+352|0;j=i+340|0;k=i+336|0;l=i+80|0;m=i+48|0;n=i;sj(l|0,0,256)|0;o=f[e+4>>2]|0;p=f[e>>2]|0;q=p;if((o|0)!=(p|0)){r=o-p>>2;p=0;do{o=l+(f[q+(p<<2)>>2]<<3)|0;s=o;t=Vn(f[s>>2]|0,f[s+4>>2]|0,1,0)|0;s=o;f[s>>2]=t;f[s+4>>2]=I;p=p+1|0}while(p>>>0>>0)}Gn(m);r=Tn(c|0,((c|0)<0)<<31>>31|0,5)|0;p=I;q=n+40|0;s=q;f[s>>2]=0;f[s+4>>2]=0;f[n>>2]=0;f[n+4>>2]=0;f[n+8>>2]=0;f[n+12>>2]=0;f[n+16>>2]=0;f[n+20>>2]=0;fd(n,l,32,g)|0;l=n+16|0;s=Tn(f[l>>2]|0,f[l+4>>2]|0,1)|0;l=g+4|0;t=(f[l>>2]|0)-(f[g>>2]|0)|0;o=q;f[o>>2]=t;f[o+4>>2]=0;o=Vn(s|0,I|0,39,0)|0;s=Yn(o|0,I|0,3)|0;o=Vn(s|0,I|0,8,0)|0;s=Vn(o|0,I|0,t|0,0)|0;Cl(g,s,I);s=n+24|0;f[s>>2]=(f[g>>2]|0)+(f[q>>2]|0);q=n+28|0;f[q>>2]=0;t=n+32|0;f[t>>2]=16384;zi(m,r,p,0)|0;p=c-d|0;if((p|0)>-1){c=(d|0)>0;r=m+16|0;o=m+12|0;v=p;do{w=f[e>>2]|0;x=f[w+(((v|0)/(d|0)|0)<<2)>>2]|0;y=f[n>>2]|0;z=f[y+(x<<3)>>2]|0;A=f[t>>2]|0;B=z<<10;if(A>>>0>>0){C=A;D=w}else{w=A;do{A=f[s>>2]|0;E=f[q>>2]|0;f[q>>2]=E+1;b[A+E>>0]=w;w=(f[t>>2]|0)>>>8;f[t>>2]=w}while(w>>>0>=B>>>0);C=w;D=f[e>>2]|0}f[t>>2]=(((C>>>0)/(z>>>0)|0)<<12)+((C>>>0)%(z>>>0)|0)+(f[y+(x<<3)+4>>2]|0);B=p-v|0;E=f[D+(((B|0)/(d|0)|0)<<2)>>2]|0;if(c&(E|0)>0){A=0;do{F=f[a+(A+B<<2)>>2]|0;G=r;H=f[G+4>>2]|0;if((H|0)>0|(H|0)==0&(f[G>>2]|0)>>>0>0){G=f[o>>2]|0;H=G+4|0;J=0;K=f[H>>2]|0;do{L=K>>>3;M=K&7;N=(f[G>>2]|0)+L|0;b[N>>0]=(1<>0]|0);N=(f[G>>2]|0)+L|0;b[N>>0]=(F>>>J&1)<>0]|0);K=(f[H>>2]|0)+1|0;f[H>>2]=K;J=J+1|0}while((J|0)!=(E|0))}A=A+1|0}while((A|0)!=(d|0))}v=v-d|0}while((v|0)>-1)}_f(n,g);eg(m);v=f[m>>2]|0;d=m+4|0;o=g+16|0;r=f[o+4>>2]|0;if(!((r|0)>0|(r|0)==0&(f[o>>2]|0)>>>0>0)){o=(f[d>>2]|0)-v|0;f[k>>2]=f[l>>2];f[j>>2]=f[k>>2];Me(g,j,v,v+o|0)|0}o=f[n>>2]|0;if(o|0){v=n+4|0;n=f[v>>2]|0;if((n|0)!=(o|0))f[v>>2]=n+(~((n+-8-o|0)>>>3)<<3);Oq(o)}o=m+12|0;n=f[o>>2]|0;f[o>>2]=0;if(n|0)Oq(n);n=f[m>>2]|0;if(!n){u=i;return 1}if((f[d>>2]|0)!=(n|0))f[d>>2]=n;Oq(n);u=i;return 1}function ud(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)Oq(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;Oo(d,16035);f[d>>2]=7256;va(d|0,1112,110)}d=ln(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)Oq(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){e=k;c=l;i=m;b:while(1){c:do if(h){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0)){o=d;break c}p=(f[a>>2]|0)+(n<<2)|0;if(!(f[p>>2]|0)){q=d;r=n;s=p;break b}p=d+12|0;t=d+16|0;u=d+20|0;v=f[d>>2]|0;d:do if(!v)w=d;else{x=f[d+8>>2]|0;y=d;z=v;while(1){if((x|0)!=(f[z+8>>2]|0)){w=y;break d}if((f[p>>2]|0)!=(f[z+12>>2]|0)){w=y;break d}if((f[t>>2]|0)!=(f[z+16>>2]|0)){w=y;break d}if((f[u>>2]|0)!=(f[z+20>>2]|0)){w=y;break d}A=f[z>>2]|0;if(!A){w=z;break}else{B=z;z=A;y=B}}}while(0);f[i>>2]=f[w>>2];f[w>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){C=43;break a}}}else{d=c;while(1){u=f[d+4>>2]|0;if(u>>>0>>0)D=u;else D=(u>>>0)%(b>>>0)|0;if((D|0)==(j|0)){o=d;break c}u=(f[a>>2]|0)+(D<<2)|0;if(!(f[u>>2]|0)){q=d;r=D;s=u;break b}u=d+12|0;t=d+16|0;p=d+20|0;v=f[d>>2]|0;e:do if(!v)E=d;else{y=f[d+8>>2]|0;z=d;x=v;while(1){if((y|0)!=(f[x+8>>2]|0)){E=z;break e}if((f[u>>2]|0)!=(f[x+12>>2]|0)){E=z;break e}if((f[t>>2]|0)!=(f[x+16>>2]|0)){E=z;break e}if((f[p>>2]|0)!=(f[x+20>>2]|0)){E=z;break e}B=f[x>>2]|0;if(!B){E=x;break}else{A=x;x=B;z=A}}}while(0);f[i>>2]=f[E>>2];f[E>>2]=f[f[(f[a>>2]|0)+(D<<2)>>2]>>2];f[f[(f[a>>2]|0)+(D<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){C=43;break a}}}while(0);c=f[o>>2]|0;if(!c){C=43;break a}else{e=o;i=o}}f[s>>2]=i;l=f[q>>2]|0;if(!l){C=43;break}else{j=r;k=q;m=q}}if((C|0)==43)return}function vd(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;c=a+4|0;if(!b){e=f[a>>2]|0;f[a>>2]=0;if(e|0)Oq(e);f[c>>2]=0;return}if(b>>>0>1073741823){e=ra(8)|0;Oo(e,16035);f[e>>2]=7256;va(e|0,1112,110)}e=ln(b<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)Oq(g);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;g=f[c>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=b+-1|0;i=(h&b|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(b>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=c;c=f[g>>2]|0;if(!c)return;else{k=j;l=g;m=c;n=g}a:while(1){g=l;c=m;j=n;b:while(1){c:do if(i){e=c;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=e+12|0;v=f[e>>2]|0;d:do if(!v)w=e;else{x=d[q>>1]|0;y=q+2|0;z=e;A=v;while(1){B=A+8|0;if(x<<16>>16!=(d[B>>1]|0)){w=z;break d}if((d[y>>1]|0)!=(d[B+2>>1]|0)){w=z;break d}if((d[u>>1]|0)!=(d[A+12>>1]|0)){w=z;break d}B=f[A>>2]|0;if(!B){w=A;break}else{C=A;A=B;z=C}}}while(0);f[j>>2]=f[w>>2];f[w>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){D=41;break a}}}else{e=c;while(1){u=f[e+4>>2]|0;if(u>>>0>>0)E=u;else E=(u>>>0)%(b>>>0)|0;if((E|0)==(k|0)){p=e;break c}u=(f[a>>2]|0)+(E<<2)|0;if(!(f[u>>2]|0)){r=e;s=E;t=u;break b}u=e+8|0;v=e+12|0;q=f[e>>2]|0;e:do if(!q)F=e;else{z=d[u>>1]|0;A=u+2|0;y=e;x=q;while(1){C=x+8|0;if(z<<16>>16!=(d[C>>1]|0)){F=y;break e}if((d[A>>1]|0)!=(d[C+2>>1]|0)){F=y;break e}if((d[v>>1]|0)!=(d[x+12>>1]|0)){F=y;break e}C=f[x>>2]|0;if(!C){F=x;break}else{B=x;x=C;y=B}}}while(0);f[j>>2]=f[F>>2];f[F>>2]=f[f[(f[a>>2]|0)+(E<<2)>>2]>>2];f[f[(f[a>>2]|0)+(E<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){D=41;break a}}}while(0);c=f[p>>2]|0;if(!c){D=41;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){D=41;break}else{k=s;l=r;n=r}}if((D|0)==41)return}function wd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)Oq(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;Oo(e,16035);f[e>>2]=7256;va(e|0,1112,110)}e=ln(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)Oq(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){c:do if(i){e=d;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=q+1|0;v=q+2|0;w=f[e>>2]|0;d:do if(!w)x=e;else{y=b[q>>0]|0;z=e;A=w;while(1){B=A+8|0;if(y<<24>>24!=(b[B>>0]|0)){x=z;break d}if((b[u>>0]|0)!=(b[B+1>>0]|0)){x=z;break d}if((b[v>>0]|0)!=(b[B+2>>0]|0)){x=z;break d}B=f[A>>2]|0;if(!B){x=A;break}else{C=A;A=B;z=C}}}while(0);f[j>>2]=f[x>>2];f[x>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){D=41;break a}}}else{e=d;while(1){v=f[e+4>>2]|0;if(v>>>0>>0)E=v;else E=(v>>>0)%(c>>>0)|0;if((E|0)==(k|0)){p=e;break c}v=(f[a>>2]|0)+(E<<2)|0;if(!(f[v>>2]|0)){r=e;s=E;t=v;break b}v=e+8|0;u=v+1|0;w=v+2|0;q=f[e>>2]|0;e:do if(!q)F=e;else{z=b[v>>0]|0;A=e;y=q;while(1){C=y+8|0;if(z<<24>>24!=(b[C>>0]|0)){F=A;break e}if((b[u>>0]|0)!=(b[C+1>>0]|0)){F=A;break e}if((b[w>>0]|0)!=(b[C+2>>0]|0)){F=A;break e}C=f[y>>2]|0;if(!C){F=y;break}else{B=y;y=C;A=B}}}while(0);f[j>>2]=f[F>>2];f[F>>2]=f[f[(f[a>>2]|0)+(E<<2)>>2]>>2];f[f[(f[a>>2]|0)+(E<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){D=41;break a}}}while(0);d=f[p>>2]|0;if(!d){D=41;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){D=41;break}else{k=s;l=r;n=r}}if((D|0)==41)return}function xd(a,b){a=+a;b=+b;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0.0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0.0;p[s>>3]=a;c=f[s>>2]|0;d=f[s+4>>2]|0;p[s>>3]=b;e=f[s>>2]|0;g=f[s+4>>2]|0;h=Yn(c|0,d|0,52)|0;i=h&2047;h=Yn(e|0,g|0,52)|0;j=h&2047;h=d&-2147483648;k=Tn(e|0,g|0,1)|0;l=I;a:do if(!((k|0)==0&(l|0)==0)?(m=yo(b)|0,n=I&2147483647,!((i|0)==2047|(n>>>0>2146435072|(n|0)==2146435072&m>>>0>0))):0){m=Tn(c|0,d|0,1)|0;n=I;if(!(n>>>0>l>>>0|(n|0)==(l|0)&m>>>0>k>>>0))return +((m|0)==(k|0)&(n|0)==(l|0)?a*0.0:a);if(!i){n=Tn(c|0,d|0,12)|0;m=I;if((m|0)>-1|(m|0)==-1&n>>>0>4294967295){o=0;q=n;n=m;while(1){m=o+-1|0;q=Tn(q|0,n|0,1)|0;n=I;if(!((n|0)>-1|(n|0)==-1&q>>>0>4294967295)){r=m;break}else o=m}}else r=0;o=Tn(c|0,d|0,1-r|0)|0;t=r;u=o;v=I}else{t=i;u=c;v=d&1048575|1048576}if(!j){o=Tn(e|0,g|0,12)|0;q=I;if((q|0)>-1|(q|0)==-1&o>>>0>4294967295){n=0;m=o;o=q;while(1){q=n+-1|0;m=Tn(m|0,o|0,1)|0;o=I;if(!((o|0)>-1|(o|0)==-1&m>>>0>4294967295)){w=q;break}else n=q}}else w=0;n=Tn(e|0,g|0,1-w|0)|0;x=w;y=n;z=I}else{x=j;y=e;z=g&1048575|1048576}n=Xn(u|0,v|0,y|0,z|0)|0;m=I;o=(m|0)>-1|(m|0)==-1&n>>>0>4294967295;b:do if((t|0)>(x|0)){q=t;A=m;B=o;C=u;D=v;E=n;while(1){if(B)if((E|0)==0&(A|0)==0)break;else{F=E;G=A}else{F=C;G=D}H=Tn(F|0,G|0,1)|0;J=I;K=q+-1|0;L=Xn(H|0,J|0,y|0,z|0)|0;M=I;N=(M|0)>-1|(M|0)==-1&L>>>0>4294967295;if((K|0)>(x|0)){q=K;A=M;B=N;C=H;D=J;E=L}else{O=K;P=N;Q=L;R=M;S=H;T=J;break b}}U=a*0.0;break a}else{O=t;P=o;Q=n;R=m;S=u;T=v}while(0);if(P)if((Q|0)==0&(R|0)==0){U=a*0.0;break}else{V=R;W=Q}else{V=T;W=S}if(V>>>0<1048576|(V|0)==1048576&W>>>0<0){m=O;n=W;o=V;while(1){E=Tn(n|0,o|0,1)|0;D=I;C=m+-1|0;if(D>>>0<1048576|(D|0)==1048576&E>>>0<0){m=C;n=E;o=D}else{X=C;Y=E;Z=D;break}}}else{X=O;Y=W;Z=V}if((X|0)>0){o=Vn(Y|0,Z|0,0,-1048576)|0;n=I;m=Tn(X|0,0,52)|0;_=n|I;$=o|m}else{m=Yn(Y|0,Z|0,1-X|0)|0;_=I;$=m}f[s>>2]=$;f[s+4>>2]=_|h;U=+p[s>>3]}else aa=3;while(0);if((aa|0)==3){ba=a*b;U=ba/ba}return +U}function yd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;d=u;u=u+32|0;e=d+8|0;g=d;h=c+4|0;i=f[(f[h>>2]|0)+48>>2]|0;j=c+12|0;c=f[j>>2]|0;k=ln(32)|0;f[e>>2]=k;f[e+8>>2]=-2147483616;f[e+4>>2]=17;l=k;m=14495;n=l+17|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[k+17>>0]=0;k=i+16|0;m=f[k>>2]|0;if(m){l=k;n=m;a:while(1){m=n;while(1){if((f[m+16>>2]|0)>=(c|0))break;o=f[m+4>>2]|0;if(!o){p=l;break a}else m=o}n=f[m>>2]|0;if(!n){p=m;break}else l=m}if(((p|0)!=(k|0)?(c|0)>=(f[p+16>>2]|0):0)?(c=p+20|0,(Jh(c,e)|0)!=0):0)q=Hk(c,e,-1)|0;else r=10}else r=10;if((r|0)==10)q=Hk(i,e,-1)|0;if((b[e+11>>0]|0)<0)Oq(f[e>>2]|0);f[e>>2]=-1;f[e+4>>2]=-1;f[e+8>>2]=-1;f[e+12>>2]=-1;i=(_((1<>>0<=28){f[e>>2]=i+1;q=2<>2]=q+-1;i=q+-2|0;f[e+8>>2]=i;f[e+12>>2]=(i|0)/2|0}switch(Xi(f[j>>2]|0,f[h>>2]|0)|0){case 6:{i=f[j>>2]|0;q=f[h>>2]|0;c=f[(f[(f[q+4>>2]|0)+8>>2]|0)+(i<<2)>>2]|0;do if((Qa[f[(f[q>>2]|0)+8>>2]&127](q)|0)==1){Hf(g,q,6,i,e,514);p=f[g>>2]|0;if(!p){f[g>>2]=0;s=g;r=21;break}else{t=g;v=p;break}}else{s=g;r=21}while(0);if((r|0)==21){i=ln(24)|0;f[i+4>>2]=c;c=i+8|0;f[c>>2]=f[e>>2];f[c+4>>2]=f[e+4>>2];f[c+8>>2]=f[e+8>>2];f[c+12>>2]=f[e+12>>2];f[i>>2]=2560;c=i;f[g>>2]=c;t=s;v=c}f[a>>2]=v;f[t>>2]=0;u=d;return}case 0:{t=f[j>>2]|0;j=f[h>>2]|0;h=f[(f[(f[j+4>>2]|0)+8>>2]|0)+(t<<2)>>2]|0;do if((Qa[f[(f[j>>2]|0)+8>>2]&127](j)|0)==1){Hf(g,j,0,t,e,514);v=f[g>>2]|0;if(!v){f[g>>2]=0;w=g;r=28;break}else{x=g;y=v;break}}else{w=g;r=28}while(0);if((r|0)==28){r=ln(24)|0;f[r+4>>2]=h;h=r+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];f[r>>2]=2560;e=r;f[g>>2]=e;x=w;y=e}f[a>>2]=y;f[x>>2]=0;u=d;return}default:{f[a>>2]=0;u=d;return}}}function zd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)Oq(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;Oo(d,16035);f[d>>2]=7256;va(d|0,1112,110)}d=ln(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)Oq(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){e=k;c=l;i=m;b:while(1){c:do if(h){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0)){o=d;break c}p=(f[a>>2]|0)+(n<<2)|0;if(!(f[p>>2]|0)){q=d;r=n;s=p;break b}p=d+12|0;t=d+16|0;u=f[d>>2]|0;d:do if(!u)v=d;else{w=f[d+8>>2]|0;x=d;y=u;while(1){if((w|0)!=(f[y+8>>2]|0)){v=x;break d}if((f[p>>2]|0)!=(f[y+12>>2]|0)){v=x;break d}if((f[t>>2]|0)!=(f[y+16>>2]|0)){v=x;break d}z=f[y>>2]|0;if(!z){v=y;break}else{A=y;y=z;x=A}}}while(0);f[i>>2]=f[v>>2];f[v>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){B=41;break a}}}else{d=c;while(1){t=f[d+4>>2]|0;if(t>>>0>>0)C=t;else C=(t>>>0)%(b>>>0)|0;if((C|0)==(j|0)){o=d;break c}t=(f[a>>2]|0)+(C<<2)|0;if(!(f[t>>2]|0)){q=d;r=C;s=t;break b}t=d+12|0;p=d+16|0;u=f[d>>2]|0;e:do if(!u)D=d;else{x=f[d+8>>2]|0;y=d;w=u;while(1){if((x|0)!=(f[w+8>>2]|0)){D=y;break e}if((f[t>>2]|0)!=(f[w+12>>2]|0)){D=y;break e}if((f[p>>2]|0)!=(f[w+16>>2]|0)){D=y;break e}A=f[w>>2]|0;if(!A){D=w;break}else{z=w;w=A;y=z}}}while(0);f[i>>2]=f[D>>2];f[D>>2]=f[f[(f[a>>2]|0)+(C<<2)>>2]>>2];f[f[(f[a>>2]|0)+(C<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){B=41;break a}}}while(0);c=f[o>>2]|0;if(!c){B=41;break a}else{e=o;i=o}}f[s>>2]=i;l=f[q>>2]|0;if(!l){B=41;break}else{j=r;k=q;m=q}}if((B|0)==41)return}function Ad(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0;switch(c|0){case 1:{c=ln(40)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2980;i=c;f[a>>2]=i;return}case 2:{c=ln(40)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=3036;i=c;f[a>>2]=i;return}case 4:{c=ln(152)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=3092;h=c+96|0;b=c+40|0;j=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(j|0));Zm(h);f[c+136>>2]=0;f[c+140>>2]=0;f[c+144>>2]=0;i=c;f[a>>2]=i;return}case 3:{c=ln(68)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=3148;h=c+40|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;f[h+16>>2]=0;f[h+20>>2]=0;f[h+24>>2]=0;i=c;f[a>>2]=i;return}case 5:{c=ln(84)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=3204;f[c+40>>2]=0;f[c+44>>2]=0;f[c+56>>2]=0;f[c+60>>2]=0;f[c+64>>2]=0;h=c+68|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=ln(120)|0;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];e=c+24|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=3260;f[c+44>>2]=0;f[c+48>>2]=0;e=c+52|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+40>>2]=3316;f[c+68>>2]=1;g=c+72|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;wn(c+88|0);i=c;f[a>>2]=i;return}default:{i=0;f[a>>2]=i;return}}}function Bd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)Oq(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;Oo(e,16035);f[e>>2]=7256;va(e|0,1112,110)}e=ln(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)Oq(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){o=d;while(1){e=f[o+4>>2]|0;if(!i)if(e>>>0>>0)p=e;else p=(e>>>0)%(c>>>0)|0;else p=e&h;if((p|0)==(k|0))break;q=(f[a>>2]|0)+(p<<2)|0;if(!(f[q>>2]|0))break b;e=f[o>>2]|0;c:do if(!e)r=o;else{s=o+8|0;t=b[s+11>>0]|0;u=t<<24>>24<0;v=t&255;t=u?f[o+12>>2]|0:v;w=(t|0)==0;if(u){u=o;x=e;while(1){y=x+8|0;z=b[y+11>>0]|0;A=z<<24>>24<0;if((t|0)!=((A?f[x+12>>2]|0:z&255)|0)){r=u;break c}if(!w?Vk(f[s>>2]|0,A?f[y>>2]|0:y,t)|0:0){r=u;break c}y=f[x>>2]|0;if(!y){r=x;break c}else{A=x;x=y;u=A}}}if(w){u=o;x=e;while(1){A=b[x+8+11>>0]|0;if((A<<24>>24<0?f[x+12>>2]|0:A&255)|0){r=u;break c}A=f[x>>2]|0;if(!A){r=x;break c}else{y=x;x=A;u=y}}}u=o;x=e;while(1){w=x+8|0;y=b[w+11>>0]|0;A=y<<24>>24<0;if((t|0)!=((A?f[x+12>>2]|0:y&255)|0)){r=u;break c}y=A?f[w>>2]|0:w;if((b[y>>0]|0)==(f[s>>2]&255)<<24>>24){B=s;C=v;D=y}else{r=u;break c}while(1){C=C+-1|0;B=B+1|0;if(!C)break;D=D+1|0;if((b[B>>0]|0)!=(b[D>>0]|0)){r=u;break c}}y=f[x>>2]|0;if(!y){r=x;break}else{w=x;x=y;u=w}}}while(0);f[j>>2]=f[r>>2];f[r>>2]=f[f[(f[a>>2]|0)+(p<<2)>>2]>>2];f[f[(f[a>>2]|0)+(p<<2)>>2]>>2]=o;e=f[g>>2]|0;if(!e){E=43;break a}else o=e}d=f[o>>2]|0;if(!d){E=43;break a}else{g=o;j=o}}f[q>>2]=j;m=f[o>>2]|0;if(!m){E=43;break}else{k=p;l=o;n=o}}if((E|0)==43)return}function Cd(a,b,c,d,e,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;var i=0,j=0;switch(c|0){case 1:{c=ln(40)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2616;i=c;f[a>>2]=i;return}case 2:{c=ln(40)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2672;i=c;f[a>>2]=i;return}case 4:{c=ln(152)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2728;h=c+96|0;b=c+40|0;j=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(j|0));Zm(h);f[c+136>>2]=0;f[c+140>>2]=0;f[c+144>>2]=0;i=c;f[a>>2]=i;return}case 3:{c=ln(68)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2784;h=c+40|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;f[h+16>>2]=0;f[h+20>>2]=0;f[h+24>>2]=0;i=c;f[a>>2]=i;return}case 5:{c=ln(84)|0;f[c+4>>2]=d;h=c+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[h+12>>2]=f[e+12>>2];h=c+24|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];f[c>>2]=2840;f[c+40>>2]=0;f[c+44>>2]=0;f[c+56>>2]=0;f[c+60>>2]=0;f[c+64>>2]=0;h=c+68|0;f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];f[h+12>>2]=f[g+12>>2];i=c;f[a>>2]=i;return}case 6:{c=ln(120)|0;f[c+4>>2]=d;d=c+8|0;f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];f[d+8>>2]=f[e+8>>2];f[d+12>>2]=f[e+12>>2];e=c+24|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c>>2]=2896;f[c+44>>2]=0;f[c+48>>2]=0;e=c+52|0;f[e>>2]=f[g>>2];f[e+4>>2]=f[g+4>>2];f[e+8>>2]=f[g+8>>2];f[e+12>>2]=f[g+12>>2];f[c+40>>2]=2952;f[c+68>>2]=1;g=c+72|0;f[g>>2]=-1;f[g+4>>2]=-1;f[g+8>>2]=-1;f[g+12>>2]=-1;wn(c+88|0);i=c;f[a>>2]=i;return}default:{i=0;f[a>>2]=i;return}}}function Dd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+48|0;d=c+8|0;e=c+4|0;g=c;h=a+44|0;ci(f[h>>2]|0,b)|0;if(f[h>>2]|0){wn(d);tk(d);i=(f[h>>2]|0)+-1|0;if((i|0)>-1){h=a+40|0;j=i;do{fj(d,(f[(f[h>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)|0)!=0);j=j+-1|0}while((j|0)>-1)}ld(d,b);Fj(d)}j=a+56|0;ci(f[j>>2]|0,b)|0;if(f[j>>2]|0){wn(d);tk(d);h=(f[j>>2]|0)+-2|0;if((h|0)>-1){j=a+52|0;i=h;do{fj(d,(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)!=0);h=i+1|0;fj(d,(f[(f[j>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)|0)!=0);i=i+-2|0}while((i|0)>-1)}ld(d,b);Fj(d)}i=a+68|0;ci(f[i>>2]|0,b)|0;if(f[i>>2]|0){wn(d);tk(d);j=(f[i>>2]|0)+-3|0;if((j|0)>-1){i=a+64|0;h=j;do{fj(d,(f[(f[i>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)|0)!=0);j=h+1|0;fj(d,(f[(f[i>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)|0)!=0);j=h+2|0;fj(d,(f[(f[i>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)|0)!=0);h=h+-3|0}while((h|0)>-1)}ld(d,b);Fj(d)}h=a+80|0;ci(f[h>>2]|0,b)|0;if(f[h>>2]|0){wn(d);tk(d);i=(f[h>>2]|0)+-4|0;if((i|0)>-1){h=a+76|0;j=i;do{fj(d,(f[(f[h>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)|0)!=0);i=j+1|0;fj(d,(f[(f[h>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)!=0);i=j+2|0;fj(d,(f[(f[h>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)!=0);i=j+3|0;fj(d,(f[(f[h>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)!=0);j=j+-4|0}while((j|0)>-1)}ld(d,b);Fj(d)}f[g>>2]=f[a+12>>2];j=b+16|0;h=j;i=f[h>>2]|0;k=f[h+4>>2]|0;if((k|0)>0|(k|0)==0&i>>>0>0){l=k;m=i}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;i=j;l=f[i+4>>2]|0;m=f[i>>2]|0}f[g>>2]=f[a+20>>2];if((l|0)>0|(l|0)==0&m>>>0>0){u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;u=c;return 1}function Ed(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+48|0;d=c+8|0;e=c+4|0;g=c;h=a+64|0;ci(f[h>>2]|0,b)|0;if(f[h>>2]|0){wn(d);tk(d);i=(f[h>>2]|0)+-1|0;if((i|0)>-1){h=a+60|0;j=i;do{fj(d,(f[(f[h>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)|0)!=0);j=j+-1|0}while((j|0)>-1)}ld(d,b);Fj(d)}j=a+76|0;ci(f[j>>2]|0,b)|0;if(f[j>>2]|0){wn(d);tk(d);h=(f[j>>2]|0)+-2|0;if((h|0)>-1){j=a+72|0;i=h;do{fj(d,(f[(f[j>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)!=0);h=i+1|0;fj(d,(f[(f[j>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)|0)!=0);i=i+-2|0}while((i|0)>-1)}ld(d,b);Fj(d)}i=a+88|0;ci(f[i>>2]|0,b)|0;if(f[i>>2]|0){wn(d);tk(d);j=(f[i>>2]|0)+-3|0;if((j|0)>-1){i=a+84|0;h=j;do{fj(d,(f[(f[i>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)|0)!=0);j=h+1|0;fj(d,(f[(f[i>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)|0)!=0);j=h+2|0;fj(d,(f[(f[i>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)|0)!=0);h=h+-3|0}while((h|0)>-1)}ld(d,b);Fj(d)}h=a+100|0;ci(f[h>>2]|0,b)|0;if(f[h>>2]|0){wn(d);tk(d);i=(f[h>>2]|0)+-4|0;if((i|0)>-1){h=a+96|0;j=i;do{fj(d,(f[(f[h>>2]|0)+(j>>>5<<2)>>2]&1<<(j&31)|0)!=0);i=j+1|0;fj(d,(f[(f[h>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)!=0);i=j+2|0;fj(d,(f[(f[h>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)!=0);i=j+3|0;fj(d,(f[(f[h>>2]|0)+(i>>>5<<2)>>2]&1<<(i&31)|0)!=0);j=j+-4|0}while((j|0)>-1)}ld(d,b);Fj(d)}f[g>>2]=f[a+12>>2];j=b+16|0;h=j;i=f[h>>2]|0;k=f[h+4>>2]|0;if((k|0)>0|(k|0)==0&i>>>0>0){l=k;m=i}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;i=j;l=f[i+4>>2]|0;m=f[i>>2]|0}f[g>>2]=f[a+16>>2];if((l|0)>0|(l|0)==0&m>>>0>0){u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;u=c;return 1}function Fd(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;c=a+4|0;if(!b){e=f[a>>2]|0;f[a>>2]=0;if(e|0)Oq(e);f[c>>2]=0;return}if(b>>>0>1073741823){e=ra(8)|0;Oo(e,16035);f[e>>2]=7256;va(e|0,1112,110)}e=ln(b<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)Oq(g);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;g=f[c>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=b+-1|0;i=(h&b|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(b>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=c;c=f[g>>2]|0;if(!c)return;else{k=j;l=g;m=c;n=g}a:while(1){g=l;c=m;j=n;b:while(1){c:do if(i){e=c;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=f[e>>2]|0;d:do if(!u)v=e;else{w=d[q>>1]|0;x=q+2|0;y=e;z=u;while(1){A=z+8|0;if(w<<16>>16!=(d[A>>1]|0)){v=y;break d}if((d[x>>1]|0)!=(d[A+2>>1]|0)){v=y;break d}A=f[z>>2]|0;if(!A){v=z;break}else{B=z;z=A;y=B}}}while(0);f[j>>2]=f[v>>2];f[v>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){C=39;break a}}}else{e=c;while(1){u=f[e+4>>2]|0;if(u>>>0>>0)D=u;else D=(u>>>0)%(b>>>0)|0;if((D|0)==(k|0)){p=e;break c}u=(f[a>>2]|0)+(D<<2)|0;if(!(f[u>>2]|0)){r=e;s=D;t=u;break b}u=e+8|0;q=f[e>>2]|0;e:do if(!q)E=e;else{y=d[u>>1]|0;z=u+2|0;x=e;w=q;while(1){B=w+8|0;if(y<<16>>16!=(d[B>>1]|0)){E=x;break e}if((d[z>>1]|0)!=(d[B+2>>1]|0)){E=x;break e}B=f[w>>2]|0;if(!B){E=w;break}else{A=w;w=B;x=A}}}while(0);f[j>>2]=f[E>>2];f[E>>2]=f[f[(f[a>>2]|0)+(D<<2)>>2]>>2];f[f[(f[a>>2]|0)+(D<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){C=39;break a}}}while(0);c=f[p>>2]|0;if(!c){C=39;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){C=39;break}else{k=s;l=r;n=r}}if((C|0)==39)return}function Gd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)Oq(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;Oo(e,16035);f[e>>2]=7256;va(e|0,1112,110)}e=ln(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)Oq(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){g=l;d=m;j=n;b:while(1){c:do if(i){e=d;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0)){p=e;break c}q=(f[a>>2]|0)+(o<<2)|0;if(!(f[q>>2]|0)){r=e;s=o;t=q;break b}q=e+8|0;u=f[e>>2]|0;d:do if(!u)v=e;else{w=b[q>>0]|0;x=q+1|0;y=e;z=u;while(1){A=z+8|0;if(w<<24>>24!=(b[A>>0]|0)){v=y;break d}if((b[x>>0]|0)!=(b[A+1>>0]|0)){v=y;break d}A=f[z>>2]|0;if(!A){v=z;break}else{B=z;z=A;y=B}}}while(0);f[j>>2]=f[v>>2];f[v>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){C=39;break a}}}else{e=d;while(1){u=f[e+4>>2]|0;if(u>>>0>>0)D=u;else D=(u>>>0)%(c>>>0)|0;if((D|0)==(k|0)){p=e;break c}u=(f[a>>2]|0)+(D<<2)|0;if(!(f[u>>2]|0)){r=e;s=D;t=u;break b}u=e+8|0;q=f[e>>2]|0;e:do if(!q)E=e;else{y=b[u>>0]|0;z=u+1|0;x=e;w=q;while(1){B=w+8|0;if(y<<24>>24!=(b[B>>0]|0)){E=x;break e}if((b[z>>0]|0)!=(b[B+1>>0]|0)){E=x;break e}B=f[w>>2]|0;if(!B){E=w;break}else{A=w;w=B;x=A}}}while(0);f[j>>2]=f[E>>2];f[E>>2]=f[f[(f[a>>2]|0)+(D<<2)>>2]>>2];f[f[(f[a>>2]|0)+(D<<2)>>2]>>2]=e;e=f[g>>2]|0;if(!e){C=39;break a}}}while(0);d=f[p>>2]|0;if(!d){C=39;break a}else{g=p;j=p}}f[t>>2]=j;m=f[r>>2]|0;if(!m){C=39;break}else{k=s;l=r;n=r}}if((C|0)==39)return}function Hd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;c=u;u=u+48|0;d=c+32|0;e=c+28|0;g=c+16|0;h=c;i=a+16|0;j=f[i>>2]|0;if(j|0){k=f[b>>2]|0;l=i;m=j;a:while(1){j=m;while(1){if((f[j+16>>2]|0)>=(k|0))break;n=f[j+4>>2]|0;if(!n){o=l;break a}else j=n}m=f[j>>2]|0;if(!m){o=j;break}else l=j}if((o|0)!=(i|0)?(k|0)>=(f[o+16>>2]|0):0){p=o;q=p+20|0;u=c;return q|0}}lp(g);f[h>>2]=f[b>>2];b=h+4|0;f[h+8>>2]=0;o=h+12|0;f[o>>2]=0;k=h+8|0;f[b>>2]=k;l=f[g>>2]|0;m=g+4|0;if((l|0)!=(m|0)){n=k;r=l;while(1){l=r+16|0;f[e>>2]=n;f[d>>2]=f[e>>2];ph(b,d,l,l)|0;l=f[r+4>>2]|0;if(!l){s=r+8|0;t=f[s>>2]|0;if((f[t>>2]|0)==(r|0))v=t;else{t=s;do{s=f[t>>2]|0;t=s+8|0;w=f[t>>2]|0}while((f[w>>2]|0)!=(s|0));v=w}}else{t=l;while(1){j=f[t>>2]|0;if(!j)break;else t=j}v=t}if((v|0)==(m|0))break;else r=v}}v=a+12|0;r=f[i>>2]|0;do if(r){d=f[h>>2]|0;e=a+16|0;n=r;while(1){l=f[n+16>>2]|0;if((d|0)<(l|0)){j=f[n>>2]|0;if(!j){x=23;break}else{y=n;z=j}}else{if((l|0)>=(d|0)){x=27;break}A=n+4|0;l=f[A>>2]|0;if(!l){x=26;break}else{y=A;z=l}}e=y;n=z}if((x|0)==23){B=n;C=n;break}else if((x|0)==26){B=n;C=A;break}else if((x|0)==27){B=n;C=e;break}}else{B=i;C=i}while(0);i=f[C>>2]|0;if(!i){x=ln(32)|0;f[x+16>>2]=f[h>>2];A=x+20|0;f[A>>2]=f[b>>2];z=x+24|0;y=f[h+8>>2]|0;f[z>>2]=y;r=f[o>>2]|0;f[x+28>>2]=r;if(!r)f[A>>2]=z;else{f[y+8>>2]=z;f[b>>2]=k;f[k>>2]=0;f[o>>2]=0}f[x>>2]=0;f[x+4>>2]=0;f[x+8>>2]=B;f[C>>2]=x;B=f[f[v>>2]>>2]|0;if(!B)D=x;else{f[v>>2]=B;D=f[C>>2]|0}Oe(f[a+16>>2]|0,D);D=a+20|0;f[D>>2]=(f[D>>2]|0)+1;E=x}else E=i;Ej(h+4|0,f[k>>2]|0);Ej(g,f[m>>2]|0);p=E;q=p+20|0;u=c;return q|0}function Id(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;d=b[c+11>>0]|0;e=d<<24>>24<0;g=e?f[c>>2]|0:c;i=e?f[c+4>>2]|0:d&255;if(i>>>0>3){d=g;c=i;e=i;while(1){j=X(h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24,1540483477)|0;c=(X(j>>>24^j,1540483477)|0)^(X(c,1540483477)|0);e=e+-4|0;if(e>>>0<=3)break;else d=d+4|0}d=i+-4|0;e=d&-4;k=d-e|0;l=g+(e+4)|0;m=c}else{k=i;l=g;m=i}switch(k|0){case 3:{n=h[l+2>>0]<<16^m;o=6;break}case 2:{n=m;o=6;break}case 1:{p=m;o=7;break}default:q=m}if((o|0)==6){p=h[l+1>>0]<<8^n;o=7}if((o|0)==7)q=X(p^h[l>>0],1540483477)|0;l=X(q>>>13^q,1540483477)|0;q=l>>>15^l;l=f[a+4>>2]|0;if(!l){r=0;return r|0}p=l+-1|0;n=(p&l|0)==0;if(!n)if(q>>>0>>0)s=q;else s=(q>>>0)%(l>>>0)|0;else s=q&p;m=f[(f[a>>2]|0)+(s<<2)>>2]|0;if(!m){r=0;return r|0}a=f[m>>2]|0;if(!a){r=0;return r|0}m=(i|0)==0;if(n){n=a;a:while(1){k=f[n+4>>2]|0;c=(k|0)==(q|0);if(!(c|(k&p|0)==(s|0))){r=0;o=40;break}do if(c?(k=n+8|0,e=b[k+11>>0]|0,d=e<<24>>24<0,j=e&255,((d?f[n+12>>2]|0:j)|0)==(i|0)):0){e=f[k>>2]|0;t=d?e:k;if(d){if(m){r=n;o=40;break a}if(!(Vk(t,g,i)|0)){r=n;o=40;break a}else break}if(m){r=n;o=40;break a}if((b[g>>0]|0)==(e&255)<<24>>24){e=k;k=j;j=g;do{k=k+-1|0;e=e+1|0;if(!k){r=n;o=40;break a}j=j+1|0}while((b[e>>0]|0)==(b[j>>0]|0))}}while(0);n=f[n>>2]|0;if(!n){r=0;o=40;break}}if((o|0)==40)return r|0}else u=a;b:while(1){a=f[u+4>>2]|0;do if((a|0)==(q|0)){n=u+8|0;p=b[n+11>>0]|0;c=p<<24>>24<0;j=p&255;if(((c?f[u+12>>2]|0:j)|0)==(i|0)){p=f[n>>2]|0;e=c?p:n;if(c){if(m){r=u;o=40;break b}if(!(Vk(e,g,i)|0)){r=u;o=40;break b}else break}if(m){r=u;o=40;break b}if((b[g>>0]|0)==(p&255)<<24>>24){p=n;n=j;j=g;do{n=n+-1|0;p=p+1|0;if(!n){r=u;o=40;break b}j=j+1|0}while((b[p>>0]|0)==(b[j>>0]|0))}}}else{if(a>>>0>>0)v=a;else v=(a>>>0)%(l>>>0)|0;if((v|0)!=(s|0)){r=0;o=40;break b}}while(0);u=f[u>>2]|0;if(!u){r=0;o=40;break}}if((o|0)==40)return r|0;return 0}function Jd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)Oq(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;Oo(d,16035);f[d>>2]=7256;va(d|0,1112,110)}d=ln(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)Oq(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){e=k;c=l;i=m;b:while(1){c:do if(h){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0)){o=d;break c}p=(f[a>>2]|0)+(n<<2)|0;if(!(f[p>>2]|0)){q=d;r=n;s=p;break b}p=d+12|0;t=f[d>>2]|0;d:do if(!t)u=d;else{v=f[d+8>>2]|0;w=d;x=t;while(1){if((v|0)!=(f[x+8>>2]|0)){u=w;break d}if((f[p>>2]|0)!=(f[x+12>>2]|0)){u=w;break d}y=f[x>>2]|0;if(!y){u=x;break}else{z=x;x=y;w=z}}}while(0);f[i>>2]=f[u>>2];f[u>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){A=39;break a}}}else{d=c;while(1){p=f[d+4>>2]|0;if(p>>>0>>0)B=p;else B=(p>>>0)%(b>>>0)|0;if((B|0)==(j|0)){o=d;break c}p=(f[a>>2]|0)+(B<<2)|0;if(!(f[p>>2]|0)){q=d;r=B;s=p;break b}p=d+12|0;t=f[d>>2]|0;e:do if(!t)C=d;else{w=f[d+8>>2]|0;x=d;v=t;while(1){if((w|0)!=(f[v+8>>2]|0)){C=x;break e}if((f[p>>2]|0)!=(f[v+12>>2]|0)){C=x;break e}z=f[v>>2]|0;if(!z){C=v;break}else{y=v;v=z;x=y}}}while(0);f[i>>2]=f[C>>2];f[C>>2]=f[f[(f[a>>2]|0)+(B<<2)>>2]>>2];f[f[(f[a>>2]|0)+(B<<2)>>2]>>2]=d;d=f[e>>2]|0;if(!d){A=39;break a}}}while(0);c=f[o>>2]|0;if(!c){A=39;break a}else{e=o;i=o}}f[s>>2]=i;l=f[q>>2]|0;if(!l){A=39;break}else{j=r;k=q;m=q}}if((A|0)==39)return}function Kd(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;h=a+4|0;i=f[c>>2]|0;c=i;do if((i|0)!=(h|0)){j=i+16|0;k=b[j+11>>0]|0;l=k<<24>>24<0;m=l?f[i+20>>2]|0:k&255;k=b[g+11>>0]|0;n=k<<24>>24<0;o=n?f[g+4>>2]|0:k&255;k=m>>>0>>0;p=k?m:o;if((p|0)!=0?(q=Vk(n?f[g>>2]|0:g,l?f[j>>2]|0:j,p)|0,(q|0)!=0):0){if((q|0)<0)break}else r=4;if((r|0)==4?o>>>0>>0:0)break;q=o>>>0>>0?o:m;if((q|0)!=0?(m=Vk(l?f[j>>2]|0:j,n?f[g>>2]|0:g,q)|0,(m|0)!=0):0){if((m|0)>=0)r=37}else r=21;if((r|0)==21?!k:0)r=37;if((r|0)==37){f[d>>2]=c;f[e>>2]=c;s=e;return s|0}k=f[i+4>>2]|0;m=(k|0)==0;if(m){q=i+8|0;j=f[q>>2]|0;if((f[j>>2]|0)==(i|0))t=j;else{j=q;do{q=f[j>>2]|0;j=q+8|0;l=f[j>>2]|0}while((f[l>>2]|0)!=(q|0));t=l}}else{j=k;while(1){l=f[j>>2]|0;if(!l)break;else j=l}t=j}do if((t|0)!=(h|0)){k=t+16|0;l=b[k+11>>0]|0;q=l<<24>>24<0;p=q?f[t+20>>2]|0:l&255;l=p>>>0>>0?p:o;if((l|0)!=0?(u=Vk(n?f[g>>2]|0:g,q?f[k>>2]|0:k,l)|0,(u|0)!=0):0){if((u|0)<0)break}else r=31;if((r|0)==31?o>>>0

>>0:0)break;s=yg(a,d,g)|0;return s|0}while(0);if(m){f[d>>2]=c;s=i+4|0;return s|0}else{f[d>>2]=t;s=t;return s|0}}while(0);t=f[i>>2]|0;do if((f[a>>2]|0)==(i|0))v=c;else{if(!t){h=i;while(1){e=f[h+8>>2]|0;if((f[e>>2]|0)==(h|0))h=e;else{w=e;break}}}else{h=t;while(1){m=f[h+4>>2]|0;if(!m){w=h;break}else h=m}}h=w;m=w+16|0;e=b[g+11>>0]|0;o=e<<24>>24<0;n=o?f[g+4>>2]|0:e&255;e=b[m+11>>0]|0;j=e<<24>>24<0;p=j?f[w+20>>2]|0:e&255;e=n>>>0

>>0?n:p;if((e|0)!=0?(u=Vk(j?f[m>>2]|0:m,o?f[g>>2]|0:g,e)|0,(u|0)!=0):0){if((u|0)<0){v=h;break}}else r=13;if((r|0)==13?p>>>0>>0:0){v=h;break}s=yg(a,d,g)|0;return s|0}while(0);if(!t){f[d>>2]=i;s=i;return s|0}else{f[d>>2]=v;s=v+4|0;return s|0}return 0}function Ld(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;g=a;h=b;i=h;j=c;k=d;l=k;if(!i){m=(e|0)!=0;if(!l){if(m){f[e>>2]=(g>>>0)%(j>>>0);f[e+4>>2]=0}n=0;o=(g>>>0)/(j>>>0)>>>0;return (I=n,o)|0}else{if(!m){n=0;o=0;return (I=n,o)|0}f[e>>2]=a|0;f[e+4>>2]=b&0;n=0;o=0;return (I=n,o)|0}}m=(l|0)==0;do if(j){if(!m){p=(_(l|0)|0)-(_(i|0)|0)|0;if(p>>>0<=31){q=p+1|0;r=31-p|0;s=p-31>>31;t=q;u=g>>>(q>>>0)&s|i<>>(q>>>0)&s;w=0;x=g<>2]=a|0;f[e+4>>2]=h|b&0;n=0;o=0;return (I=n,o)|0}r=j-1|0;if(r&j|0){s=(_(j|0)|0)+33-(_(i|0)|0)|0;q=64-s|0;p=32-s|0;y=p>>31;z=s-32|0;A=z>>31;t=s;u=p-1>>31&i>>>(z>>>0)|(i<>>(s>>>0))&A;v=A&i>>>(s>>>0);w=g<>>(z>>>0))&y|g<>31;break}if(e|0){f[e>>2]=r&g;f[e+4>>2]=0}if((j|0)==1){n=h|b&0;o=a|0|0;return (I=n,o)|0}else{r=vm(j|0)|0;n=i>>>(r>>>0)|0;o=i<<32-r|g>>>(r>>>0)|0;return (I=n,o)|0}}else{if(m){if(e|0){f[e>>2]=(i>>>0)%(j>>>0);f[e+4>>2]=0}n=0;o=(i>>>0)/(j>>>0)>>>0;return (I=n,o)|0}if(!g){if(e|0){f[e>>2]=0;f[e+4>>2]=(i>>>0)%(l>>>0)}n=0;o=(i>>>0)/(l>>>0)>>>0;return (I=n,o)|0}r=l-1|0;if(!(r&l)){if(e|0){f[e>>2]=a|0;f[e+4>>2]=r&i|b&0}n=0;o=i>>>((vm(l|0)|0)>>>0);return (I=n,o)|0}r=(_(l|0)|0)-(_(i|0)|0)|0;if(r>>>0<=30){s=r+1|0;p=31-r|0;t=s;u=i<>>(s>>>0);v=i>>>(s>>>0);w=0;x=g<>2]=a|0;f[e+4>>2]=h|b&0;n=0;o=0;return (I=n,o)|0}while(0);if(!t){B=x;C=w;D=v;E=u;F=0;G=0}else{b=c|0|0;c=k|d&0;d=Vn(b|0,c|0,-1,-1)|0;k=I;h=x;x=w;w=v;v=u;u=t;t=0;do{a=h;h=x>>>31|h<<1;x=t|x<<1;g=v<<1|a>>>31|0;a=v>>>31|w<<1|0;Xn(d|0,k|0,g|0,a|0)|0;i=I;l=i>>31|((i|0)<0?-1:0)<<1;t=l&1;v=Xn(g|0,a|0,l&b|0,(((i|0)<0?-1:0)>>31|((i|0)<0?-1:0)<<1)&c|0)|0;w=I;u=u-1|0}while((u|0)!=0);B=h;C=x;D=w;E=v;F=0;G=t}t=C;C=0;if(e|0){f[e>>2]=E;f[e+4>>2]=D}n=(t|0)>>>31|(B|C)<<1|(C<<1|t>>>31)&0|F;o=(t<<1|0>>>31)&-2|G;return (I=n,o)|0}function Md(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=u;u=u+16|0;h=g;f[c+48>>2]=d;f[c+44>>2]=e;e=f[c+8>>2]|0;d=c+12|0;i=f[d>>2]|0;if((i|0)!=(e|0)){j=i;do{i=j+-4|0;f[d>>2]=i;k=f[i>>2]|0;f[i>>2]=0;if(k|0)Va[f[(f[k>>2]|0)+4>>2]&127](k);j=f[d>>2]|0}while((j|0)!=(e|0))}e=f[c+20>>2]|0;j=c+24|0;d=f[j>>2]|0;if((d|0)!=(e|0))f[j>>2]=d+(~((d+-4-e|0)>>>2)<<2);e=f[c+32>>2]|0;d=c+36|0;j=f[d>>2]|0;if((j|0)!=(e|0))f[d>>2]=j+(~((j+-4-e|0)>>>2)<<2);if(!(f[c+4>>2]|0)){e=ln(32)|0;f[h>>2]=e;f[h+8>>2]=-2147483616;f[h+4>>2]=23;l=e;m=15706;n=l+23|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[e+23>>0]=0;f[a>>2]=-1;pj(a+4|0,h);if((b[h+11>>0]|0)<0)Oq(f[h>>2]|0);u=g;return}Ud(a,c);if(f[a>>2]|0){u=g;return}e=a+4|0;j=e+11|0;if((b[j>>0]|0)<0)Oq(f[e>>2]|0);Wi(a,c);if(f[a>>2]|0){u=g;return}if((b[j>>0]|0)<0)Oq(f[e>>2]|0);if(!(Qa[f[(f[c>>2]|0)+16>>2]&127](c)|0)){j=ln(32)|0;f[h>>2]=j;f[h+8>>2]=-2147483616;f[h+4>>2]=29;l=j;m=15730;n=l+29|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[j+29>>0]=0;f[a>>2]=-1;pj(e,h);if((b[h+11>>0]|0)<0)Oq(f[h>>2]|0);u=g;return}if(!(Qa[f[(f[c>>2]|0)+20>>2]&127](c)|0)){j=ln(32)|0;f[h>>2]=j;f[h+8>>2]=-2147483616;f[h+4>>2]=31;l=j;m=15760;n=l+31|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[j+31>>0]=0;f[a>>2]=-1;pj(e,h);if((b[h+11>>0]|0)<0)Oq(f[h>>2]|0);u=g;return}if(!(Qa[f[(f[c>>2]|0)+24>>2]&127](c)|0)){j=ln(32)|0;f[h>>2]=j;f[h+8>>2]=-2147483616;f[h+4>>2]=31;l=j;m=15792;n=l+31|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[j+31>>0]=0;f[a>>2]=-1;pj(e,h);if((b[h+11>>0]|0)<0)Oq(f[h>>2]|0);u=g;return}if(Qa[f[(f[c>>2]|0)+28>>2]&127](c)|0){f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=g;return}c=ln(48)|0;f[h>>2]=c;f[h+8>>2]=-2147483600;f[h+4>>2]=34;l=c;m=15824;n=l+34|0;do{b[l>>0]=b[m>>0]|0;l=l+1|0;m=m+1|0}while((l|0)<(n|0));b[c+34>>0]=0;f[a>>2]=-1;pj(e,h);if((b[h+11>>0]|0)<0)Oq(f[h>>2]|0);u=g;return}function Nd(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;c=u;u=u+32|0;d=c+4|0;e=c;g=c+16|0;h=a+48|0;i=f[h>>2]|0;j=ln(32)|0;f[d>>2]=j;f[d+8>>2]=-2147483616;f[d+4>>2]=20;k=j;l=14538;m=k+20|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[j+20>>0]=0;j=Fk(i+24|0,d)|0;if((b[d+11>>0]|0)<0)Oq(f[d>>2]|0);i=f[h>>2]|0;n=ln(32)|0;f[d>>2]=n;f[d+8>>2]=-2147483616;f[d+4>>2]=22;k=n;l=14559;m=k+22|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[n+22>>0]=0;n=Fk(i+24|0,d)|0;if((b[d+11>>0]|0)<0)Oq(f[d>>2]|0);i=a+56|0;o=f[i>>2]|0;f[i>>2]=0;if(o|0)Va[f[(f[o>>2]|0)+4>>2]&127](o);o=f[a+52>>2]|0;p=(((f[o+100>>2]|0)-(f[o+96>>2]|0)|0)/12|0)>>>0<1e3;o=f[h>>2]|0;q=ln(32)|0;f[d>>2]=q;f[d+8>>2]=-2147483616;f[d+4>>2]=18;k=q;l=14582;m=k+18|0;do{b[k>>0]=b[l>>0]|0;k=k+1|0;l=l+1|0}while((k|0)<(m|0));b[q+18>>0]=0;q=Hk(o,d,-1)|0;if((b[d+11>>0]|0)<0)Oq(f[d>>2]|0);switch(q|0){case -1:{if(j?p|((mi(f[h>>2]|0)|0)>4|n^1):0)r=13;else r=17;break}case 0:{if(j)r=13;else r=21;break}case 2:{r=17;break}default:r=21}if((r|0)==13){j=f[a+44>>2]|0;b[g>>0]=0;n=j+16|0;h=f[n+4>>2]|0;if(!((h|0)>0|(h|0)==0&(f[n>>2]|0)>>>0>0)){f[e>>2]=f[j+4>>2];f[d>>2]=f[e>>2];Me(j,d,g,g+1|0)|0}j=ln(296)|0;_i(j);n=f[i>>2]|0;f[i>>2]=j;if(!n)s=j;else{Va[f[(f[n>>2]|0)+4>>2]&127](n);r=21}}else if((r|0)==17){n=f[a+44>>2]|0;b[g>>0]=2;j=n+16|0;h=f[j+4>>2]|0;if(!((h|0)>0|(h|0)==0&(f[j>>2]|0)>>>0>0)){f[e>>2]=f[n+4>>2];f[d>>2]=f[e>>2];Me(n,d,g,g+1|0)|0}g=ln(360)|0;xi(g);d=f[i>>2]|0;f[i>>2]=g;if(!d)s=g;else{Va[f[(f[d>>2]|0)+4>>2]&127](d);r=21}}if((r|0)==21){r=f[i>>2]|0;if(!r){t=0;u=c;return t|0}else s=r}t=Ra[f[(f[s>>2]|0)+8>>2]&127](s,a)|0;u=c;return t|0}function Od(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;e=b+12|0;g=f[e>>2]|0;h=c+4|0;i=(f[h>>2]|0)-g|0;j=c;f[j>>2]=(f[c>>2]|0)-g;f[j+4>>2]=i;i=(f[d>>2]|0)-g|0;j=d+4|0;k=(f[j>>2]|0)-g|0;g=d;f[g>>2]=i;f[g+4>>2]=k;g=f[e>>2]|0;if((((k|0)>-1?k:0-k|0)+((i|0)>-1?i:0-i|0)|0)>(g|0)){l=f[c>>2]|0;m=f[h>>2]|0;if((l|0)>-1)if((m|0)<=-1)if((l|0)<1){n=-1;o=-1}else p=6;else{n=1;o=1}else if((m|0)<1){n=-1;o=-1}else p=6;if((p|0)==6){n=(l|0)>0?1:-1;o=(m|0)>0?1:-1}q=X(g,n)|0;r=X(g,o)|0;g=(l<<1)-q|0;f[c>>2]=g;l=(m<<1)-r|0;f[h>>2]=l;if((X(n,o)|0)>-1){o=0-l|0;f[c>>2]=o;s=0-g|0;t=o}else{f[c>>2]=l;s=g;t=l}f[c>>2]=(t+q|0)/2|0;f[h>>2]=(s+r|0)/2|0;r=f[d>>2]|0;s=f[j>>2]|0;if((r|0)>-1)if((s|0)<=-1)if((r|0)<1){u=-1;v=-1}else p=14;else{u=1;v=1}else if((s|0)<1){u=-1;v=-1}else p=14;if((p|0)==14){u=(r|0)>0?1:-1;v=(s|0)>0?1:-1}q=f[e>>2]|0;e=X(q,u)|0;t=X(q,v)|0;q=(r<<1)-e|0;f[d>>2]=q;r=(s<<1)-t|0;f[j>>2]=r;if((X(u,v)|0)>-1){v=0-r|0;f[d>>2]=v;w=0-q|0;x=v}else{f[d>>2]=r;w=q;x=r}r=(x+e|0)/2|0;f[d>>2]=r;e=(w+t|0)/2|0;f[j>>2]=e;y=r;z=e}else{y=i;z=k}if(!y)if(!z){A=y;B=z}else p=22;else if((y|0)<0&(z|0)<1){A=y;B=z}else p=22;if((p|0)==22){if(!y)C=(z|0)==0?0:(z|0)>0?3:1;else C=(y|0)>0?(z>>31)+2|0:(z|0)<1?0:3;z=f[c>>2]|0;y=f[h>>2]|0;switch(C|0){case 1:{C=c;f[C>>2]=y;f[C+4>>2]=0-z;D=f[j>>2]|0;E=0-(f[d>>2]|0)|0;break}case 2:{C=c;f[C>>2]=0-z;f[C+4>>2]=0-y;D=0-(f[d>>2]|0)|0;E=0-(f[j>>2]|0)|0;break}case 3:{C=c;f[C>>2]=0-y;f[C+4>>2]=z;D=0-(f[j>>2]|0)|0;E=f[d>>2]|0;break}default:{C=c;f[C>>2]=z;f[C+4>>2]=y;D=f[d>>2]|0;E=f[j>>2]|0}}j=d;f[j>>2]=D;f[j+4>>2]=E;A=D;B=E}E=(f[c>>2]|0)-A|0;f[a>>2]=E;A=(f[h>>2]|0)-B|0;B=a+4|0;f[B>>2]=A;if((E|0)<0)F=(f[b+4>>2]|0)+E|0;else F=E;f[a>>2]=F;if((A|0)>=0){G=A;f[B>>2]=G;return}G=(f[b+4>>2]|0)+A|0;f[B>>2]=G;return}function Pd(a,b){a=a|0;b=b|0;var c=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;c=a+4|0;if(!b){e=f[a>>2]|0;f[a>>2]=0;if(e|0)Oq(e);f[c>>2]=0;return}if(b>>>0>1073741823){e=ra(8)|0;Oo(e,16035);f[e>>2]=7256;va(e|0,1112,110)}e=ln(b<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)Oq(g);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;g=f[c>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=b+-1|0;i=(h&b|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(b>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=c;c=f[g>>2]|0;if(!c)return;else{k=j;l=g;m=c;n=g}a:while(1){b:do if(i){g=l;c=m;j=n;while(1){e=c;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0))break;p=(f[a>>2]|0)+(o<<2)|0;if(!(f[p>>2]|0)){q=e;r=j;s=o;t=p;break b}p=e+8|0;u=e;while(1){v=f[u>>2]|0;if(!v)break;if((d[p>>1]|0)==(d[v+8>>1]|0))u=v;else break}f[j>>2]=v;f[u>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;p=f[g>>2]|0;if(!p){w=37;break a}else e=p}c=f[e>>2]|0;if(!c){w=37;break a}else{g=e;j=e}}}else{j=l;g=m;c=n;while(1){p=g;while(1){x=f[p+4>>2]|0;if(x>>>0>>0)y=x;else y=(x>>>0)%(b>>>0)|0;if((y|0)==(k|0))break;x=(f[a>>2]|0)+(y<<2)|0;if(!(f[x>>2]|0)){q=p;r=c;s=y;t=x;break b}x=p+8|0;z=p;while(1){A=f[z>>2]|0;if(!A)break;if((d[x>>1]|0)==(d[A+8>>1]|0))z=A;else break}f[c>>2]=A;f[z>>2]=f[f[(f[a>>2]|0)+(y<<2)>>2]>>2];f[f[(f[a>>2]|0)+(y<<2)>>2]>>2]=p;x=f[j>>2]|0;if(!x){w=37;break a}else p=x}g=f[p>>2]|0;if(!g){w=37;break a}else{j=p;c=p}}}while(0);f[t>>2]=r;m=f[q>>2]|0;if(!m){w=37;break}else{k=s;l=q;n=q}}if((w|0)==37)return}function Qd(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)Oq(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;Oo(e,16035);f[e>>2]=7256;va(e|0,1112,110)}e=ln(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)Oq(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;else{k=j;l=g;m=d;n=g}a:while(1){b:do if(i){g=l;d=m;j=n;while(1){e=d;while(1){o=f[e+4>>2]&h;if((o|0)==(k|0))break;p=(f[a>>2]|0)+(o<<2)|0;if(!(f[p>>2]|0)){q=e;r=j;s=o;t=p;break b}p=e+8|0;u=e;while(1){v=f[u>>2]|0;if(!v)break;if((b[p>>0]|0)==(b[v+8>>0]|0))u=v;else break}f[j>>2]=v;f[u>>2]=f[f[(f[a>>2]|0)+(o<<2)>>2]>>2];f[f[(f[a>>2]|0)+(o<<2)>>2]>>2]=e;p=f[g>>2]|0;if(!p){w=37;break a}else e=p}d=f[e>>2]|0;if(!d){w=37;break a}else{g=e;j=e}}}else{j=l;g=m;d=n;while(1){p=g;while(1){x=f[p+4>>2]|0;if(x>>>0>>0)y=x;else y=(x>>>0)%(c>>>0)|0;if((y|0)==(k|0))break;x=(f[a>>2]|0)+(y<<2)|0;if(!(f[x>>2]|0)){q=p;r=d;s=y;t=x;break b}x=p+8|0;z=p;while(1){A=f[z>>2]|0;if(!A)break;if((b[x>>0]|0)==(b[A+8>>0]|0))z=A;else break}f[d>>2]=A;f[z>>2]=f[f[(f[a>>2]|0)+(y<<2)>>2]>>2];f[f[(f[a>>2]|0)+(y<<2)>>2]>>2]=p;x=f[j>>2]|0;if(!x){w=37;break a}else p=x}g=f[p>>2]|0;if(!g){w=37;break a}else{j=p;d=p}}}while(0);f[t>>2]=r;m=f[q>>2]|0;if(!m){w=37;break}else{k=s;l=q;n=q}}if((w|0)==37)return}function Rd(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;g=f[c>>2]|0;c=f[b>>2]|0;h=g-c|0;i=a+8|0;j=f[i>>2]|0;if(h>>>0<64){if(j>>>0<=1){k=0;return k|0}l=f[e>>2]|0;m=0;n=1;while(1){o=(f[l+(m<<2)>>2]|0)>>>0>(f[l+(n<<2)>>2]|0)>>>0?n:m;n=n+1|0;if(n>>>0>=j>>>0){k=o;break}else m=o}return k|0}if(j){j=f[a+1128>>2]|0;m=f[e>>2]|0;e=f[a+1140>>2]|0;n=f[d>>2]|0;d=b+4|0;l=b+8|0;if((g|0)==(c|0)){b=0;do{o=j+(b<<2)|0;f[o>>2]=0;p=(f[a>>2]|0)-(f[m+(b<<2)>>2]|0)|0;f[e+(b<<2)>>2]=p;if(p|0){p=f[o>>2]|0;q=h-p|0;f[o>>2]=q>>>0

>>0?p:q}b=b+1|0;q=f[i>>2]|0}while(b>>>0>>0);r=q}else{b=0;do{q=j+(b<<2)|0;f[q>>2]=0;p=(f[a>>2]|0)-(f[m+(b<<2)>>2]|0)|0;f[e+(b<<2)>>2]=p;if(p|0){o=(f[n+(b<<2)>>2]|0)+(1<>2]|0;s=f[(f[d>>2]|0)+24>>2]|0;t=c;u=f[q>>2]|0;do{v=s+((X(t,p)|0)<<2)+(b<<2)|0;u=u+((f[v>>2]|0)>>>0>>0&1)|0;f[q>>2]=u;t=t+1|0}while((t|0)!=(g|0));t=h-u|0;f[q>>2]=t>>>0>>0?u:t}b=b+1|0;t=f[i>>2]|0}while(b>>>0>>0);r=t}if(r){b=f[a+1140>>2]|0;i=a+1128|0;h=0;g=0;c=0;while(1){if(!(f[b+(g<<2)>>2]|0)){w=h;x=c}else{d=f[(f[i>>2]|0)+(g<<2)>>2]|0;l=h>>>0>>0;w=l?d:h;x=l?g:c}g=g+1|0;if(g>>>0>=r>>>0){y=x;break}else{h=w;c=x}}}else y=0}else y=0;x=a+1088|0;c=a+1104|0;w=f[c>>2]|0;h=32-w|0;if((h|0)<4){r=y&15;g=4-h|0;f[c>>2]=g;h=a+1100|0;i=f[h>>2]|r>>>g;f[h>>2]=i;g=a+1092|0;b=f[g>>2]|0;if((b|0)==(f[a+1096>>2]|0))Ri(x,h);else{f[b>>2]=i;f[g>>2]=b+4}f[h>>2]=r<<32-(f[c>>2]|0);k=y;return k|0}r=a+1100|0;h=f[r>>2]|y<<28>>>w;f[r>>2]=h;b=w+4|0;f[c>>2]=b;if((b|0)!=32){k=y;return k|0}b=a+1092|0;w=f[b>>2]|0;if((w|0)==(f[a+1096>>2]|0))Ri(x,r);else{f[w>>2]=h;f[b>>2]=w+4}f[r>>2]=0;f[c>>2]=0;k=y;return k|0}function Sd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;c=a+4|0;if(!b){d=f[a>>2]|0;f[a>>2]=0;if(d|0)Oq(d);f[c>>2]=0;return}if(b>>>0>1073741823){d=ra(8)|0;Oo(d,16035);f[d>>2]=7256;va(d|0,1112,110)}d=ln(b<<2)|0;e=f[a>>2]|0;f[a>>2]=d;if(e|0)Oq(e);f[c>>2]=b;c=0;do{f[(f[a>>2]|0)+(c<<2)>>2]=0;c=c+1|0}while((c|0)!=(b|0));c=a+8|0;e=f[c>>2]|0;if(!e)return;d=f[e+4>>2]|0;g=b+-1|0;h=(g&b|0)==0;if(!h)if(d>>>0>>0)i=d;else i=(d>>>0)%(b>>>0)|0;else i=d&g;f[(f[a>>2]|0)+(i<<2)>>2]=c;c=f[e>>2]|0;if(!c)return;else{j=i;k=e;l=c;m=e}a:while(1){b:do if(h){e=k;c=l;i=m;while(1){d=c;while(1){n=f[d+4>>2]&g;if((n|0)==(j|0))break;o=(f[a>>2]|0)+(n<<2)|0;if(!(f[o>>2]|0)){p=d;q=i;r=n;s=o;break b}o=d+8|0;t=d;while(1){u=f[t>>2]|0;if(!u)break;if((f[o>>2]|0)==(f[u+8>>2]|0))t=u;else break}f[i>>2]=u;f[t>>2]=f[f[(f[a>>2]|0)+(n<<2)>>2]>>2];f[f[(f[a>>2]|0)+(n<<2)>>2]>>2]=d;o=f[e>>2]|0;if(!o){v=37;break a}else d=o}c=f[d>>2]|0;if(!c){v=37;break a}else{e=d;i=d}}}else{i=k;e=l;c=m;while(1){o=e;while(1){w=f[o+4>>2]|0;if(w>>>0>>0)x=w;else x=(w>>>0)%(b>>>0)|0;if((x|0)==(j|0))break;w=(f[a>>2]|0)+(x<<2)|0;if(!(f[w>>2]|0)){p=o;q=c;r=x;s=w;break b}w=o+8|0;y=o;while(1){z=f[y>>2]|0;if(!z)break;if((f[w>>2]|0)==(f[z+8>>2]|0))y=z;else break}f[c>>2]=z;f[y>>2]=f[f[(f[a>>2]|0)+(x<<2)>>2]>>2];f[f[(f[a>>2]|0)+(x<<2)>>2]>>2]=o;w=f[i>>2]|0;if(!w){v=37;break a}else o=w}e=f[o>>2]|0;if(!e){v=37;break a}else{i=o;c=o}}}while(0);f[s>>2]=q;l=f[p>>2]|0;if(!l){v=37;break}else{j=r;k=p;m=p}}if((v|0)==37)return}function Td(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;d=a+4|0;if(!c){e=f[a>>2]|0;f[a>>2]=0;if(e|0)Oq(e);f[d>>2]=0;return}if(c>>>0>1073741823){e=ra(8)|0;Oo(e,16035);f[e>>2]=7256;va(e|0,1112,110)}e=ln(c<<2)|0;g=f[a>>2]|0;f[a>>2]=e;if(g|0)Oq(g);f[d>>2]=c;d=0;do{f[(f[a>>2]|0)+(d<<2)>>2]=0;d=d+1|0}while((d|0)!=(c|0));d=a+8|0;g=f[d>>2]|0;if(!g)return;e=f[g+4>>2]|0;h=c+-1|0;i=(h&c|0)==0;if(!i)if(e>>>0>>0)j=e;else j=(e>>>0)%(c>>>0)|0;else j=e&h;f[(f[a>>2]|0)+(j<<2)>>2]=d;d=f[g>>2]|0;if(!d)return;e=a+24|0;k=j;j=g;l=d;d=g;a:while(1){g=j;m=l;n=d;b:while(1){o=m;while(1){p=f[o+4>>2]|0;if(!i)if(p>>>0>>0)q=p;else q=(p>>>0)%(c>>>0)|0;else q=p&h;if((q|0)==(k|0))break;r=(f[a>>2]|0)+(q<<2)|0;if(!(f[r>>2]|0))break b;p=f[o>>2]|0;c:do if(!p)s=o;else{t=f[o+8>>2]|0;u=f[e>>2]|0;v=f[u+8>>2]|0;w=(f[u+12>>2]|0)-v|0;u=v;v=w>>>2;if((w|0)>0){x=o;y=p}else{w=p;while(1){z=f[w>>2]|0;if(!z){s=w;break c}else w=z}}while(1){w=f[y+8>>2]|0;z=0;do{A=f[u+(z<<2)>>2]|0;if(!(b[A+84>>0]|0)){B=f[A+68>>2]|0;C=f[B+(w<<2)>>2]|0;D=f[B+(t<<2)>>2]|0}else{C=w;D=t}z=z+1|0;if((D|0)!=(C|0)){s=x;break c}}while((z|0)<(v|0));z=f[y>>2]|0;if(!z){s=y;break}else{w=y;y=z;x=w}}}while(0);f[n>>2]=f[s>>2];f[s>>2]=f[f[(f[a>>2]|0)+(q<<2)>>2]>>2];f[f[(f[a>>2]|0)+(q<<2)>>2]>>2]=o;p=f[g>>2]|0;if(!p){E=38;break a}else o=p}m=f[o>>2]|0;if(!m){E=38;break a}else{g=o;n=o}}f[r>>2]=n;l=f[o>>2]|0;if(!l){E=38;break}else{k=q;j=o;d=o}}if((E|0)==38)return}function Ud(a,c){a=a|0;c=c|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0;e=u;u=u+16|0;g=e+4|0;h=e;i=e+12|0;j=e+11|0;k=e+10|0;l=e+8|0;m=c+44|0;n=f[m>>2]|0;o=n+16|0;p=f[o+4>>2]|0;if(!((p|0)>0|(p|0)==0&(f[o>>2]|0)>>>0>0)){f[h>>2]=f[n+4>>2];f[g>>2]=f[h>>2];Me(n,g,15886,15891)|0}n=Qa[f[(f[c>>2]|0)+8>>2]&127](c)|0;b[i>>0]=n;b[j>>0]=2;b[k>>0]=(n&255|0)==0?3:2;n=f[m>>2]|0;o=n+16|0;p=f[o+4>>2]|0;if(!((p|0)>0|(p|0)==0&(f[o>>2]|0)>>>0>0)){f[h>>2]=f[n+4>>2];f[g>>2]=f[h>>2];Me(n,g,j,j+1|0)|0;j=f[m>>2]|0;o=j+16|0;p=f[o+4>>2]|0;if(!((p|0)>0|(p|0)==0&(f[o>>2]|0)>>>0>0)){f[h>>2]=f[j+4>>2];f[g>>2]=f[h>>2];Me(j,g,k,k+1|0)|0;k=f[m>>2]|0;o=k+16|0;p=f[o+4>>2]|0;if((p|0)>0|(p|0)==0&(f[o>>2]|0)>>>0>0){q=h;r=k}else{f[h>>2]=f[k+4>>2];f[g>>2]=f[h>>2];Me(k,g,i,i+1|0)|0;q=h;r=f[m>>2]|0}}else{s=h;t=j;v=6}}else{s=h;t=n;v=6}if((v|0)==6){q=h;r=t}t=Qa[f[(f[c>>2]|0)+12>>2]&127](c)|0;b[l>>0]=t;t=r+16|0;q=f[t+4>>2]|0;if(!((q|0)>0|(q|0)==0&(f[t>>2]|0)>>>0>0)){f[h>>2]=f[r+4>>2];f[g>>2]=f[h>>2];Me(r,g,l,l+1|0)|0}d[l>>1]=(f[(f[c+4>>2]|0)+4>>2]|0)==0?0:-32768;c=f[m>>2]|0;m=c+16|0;r=f[m+4>>2]|0;if((r|0)>0|(r|0)==0&(f[m>>2]|0)>>>0>0){f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=e;return}f[h>>2]=f[c+4>>2];f[g>>2]=f[h>>2];Me(c,g,l,l+2|0)|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=e;return}function Vd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0;e=u;u=u+176|0;g=e+136|0;h=e+104|0;i=e;j=e+72|0;k=ln(88)|0;l=f[c+8>>2]|0;f[k+4>>2]=0;f[k>>2]=3612;m=k+12|0;f[m>>2]=3636;n=k+64|0;f[n>>2]=0;f[k+68>>2]=0;f[k+72>>2]=0;o=k+16|0;p=o+44|0;do{f[o>>2]=0;o=o+4|0}while((o|0)<(p|0));f[k+76>>2]=l;f[k+80>>2]=d;q=k+84|0;f[q>>2]=0;r=k;f[h>>2]=3636;s=h+4|0;t=s+4|0;f[t>>2]=0;f[t+4>>2]=0;f[t+8>>2]=0;f[t+12>>2]=0;f[t+16>>2]=0;f[t+20>>2]=0;t=f[c+12>>2]|0;v=i+4|0;f[v>>2]=3636;w=i+56|0;f[w>>2]=0;x=i+60|0;f[x>>2]=0;f[i+64>>2]=0;o=i+8|0;p=o+44|0;do{f[o>>2]=0;o=o+4|0}while((o|0)<(p|0));o=t;f[s>>2]=o;s=((f[o+4>>2]|0)-(f[t>>2]|0)>>2>>>0)/3|0;b[g>>0]=0;qh(h+8|0,s,g);Va[f[(f[h>>2]|0)+8>>2]&127](h);Ff(j,h);Ff(g,j);f[i>>2]=f[g+4>>2];s=i+4|0;fg(s,g)|0;f[g>>2]=3636;o=f[g+20>>2]|0;if(o|0)Oq(o);o=f[g+8>>2]|0;if(o|0)Oq(o);f[i+36>>2]=t;f[i+40>>2]=d;f[i+44>>2]=l;f[i+48>>2]=k;f[j>>2]=3636;l=f[j+20>>2]|0;if(l|0)Oq(l);l=f[j+8>>2]|0;if(l|0)Oq(l);f[q>>2]=c+72;f[k+8>>2]=f[i>>2];fg(m,s)|0;s=k+44|0;k=i+36|0;f[s>>2]=f[k>>2];f[s+4>>2]=f[k+4>>2];f[s+8>>2]=f[k+8>>2];f[s+12>>2]=f[k+12>>2];b[s+16>>0]=b[k+16>>0]|0;ng(n,f[w>>2]|0,f[x>>2]|0);f[a>>2]=r;r=f[w>>2]|0;if(r|0){w=f[x>>2]|0;if((w|0)!=(r|0))f[x>>2]=w+(~((w+-4-r|0)>>>2)<<2);Oq(r)}f[v>>2]=3636;v=f[i+24>>2]|0;if(v|0)Oq(v);v=f[i+12>>2]|0;if(v|0)Oq(v);f[h>>2]=3636;v=f[h+20>>2]|0;if(v|0)Oq(v);v=f[h+8>>2]|0;if(!v){u=e;return}Oq(v);u=e;return}function Wd(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=Oa,x=0,y=Oa,z=Oa,A=Oa;e=u;u=u+16|0;g=e;h=a+4|0;if((f[h>>2]|0)!=-1){i=0;u=e;return i|0}f[h>>2]=d;d=b[c+24>>0]|0;h=d<<24>>24;j=a+20|0;n[j>>2]=$(0.0);f[g>>2]=0;k=g+4|0;f[k>>2]=0;f[g+8>>2]=0;do if(d<<24>>24)if(d<<24>>24<0)aq(g);else{l=h<<2;m=ln(l)|0;f[g>>2]=m;o=m+(h<<2)|0;f[g+8>>2]=o;sj(m|0,0,l|0)|0;l=m+(h<<2)|0;f[k>>2]=l;p=m;q=l;r=o;break}else{p=0;q=0;r=0}while(0);k=a+8|0;g=f[k>>2]|0;o=a+12|0;if(!g)s=a+16|0;else{l=f[o>>2]|0;if((l|0)!=(g|0))f[o>>2]=l+(~((l+-4-g|0)>>>2)<<2);Oq(g);g=a+16|0;f[g>>2]=0;f[o>>2]=0;f[k>>2]=0;s=g}f[k>>2]=p;f[o>>2]=q;f[s>>2]=r;r=h>>>0>1073741823?-1:h<<2;s=Lq(r)|0;q=Lq(r)|0;r=c+48|0;o=f[r>>2]|0;g=c+40|0;a=f[g>>2]|0;l=f[c>>2]|0;kh(q|0,(f[l>>2]|0)+o|0,a|0)|0;kh(p|0,(f[l>>2]|0)+o|0,a|0)|0;a=r;r=f[a>>2]|0;o=f[a+4>>2]|0;a=g;g=f[a>>2]|0;l=f[a+4>>2]|0;a=f[c>>2]|0;kh(s|0,(f[a>>2]|0)+r|0,g|0)|0;p=f[c+80>>2]|0;a:do if(p>>>0>1){if(d<<24>>24<=0){c=1;while(1){m=un(g|0,l|0,c|0,0)|0;t=Vn(m|0,I|0,r|0,o|0)|0;kh(q|0,(f[a>>2]|0)+t|0,g|0)|0;c=c+1|0;if(c>>>0>=p>>>0)break a}}c=f[k>>2]|0;t=1;do{m=un(g|0,l|0,t|0,0)|0;v=Vn(m|0,I|0,r|0,o|0)|0;kh(q|0,(f[a>>2]|0)+v|0,g|0)|0;v=0;do{m=c+(v<<2)|0;w=$(n[m>>2]);x=q+(v<<2)|0;y=$(n[x>>2]);if(w>y){n[m>>2]=y;z=$(n[x>>2])}else z=y;x=s+(v<<2)|0;if($(n[x>>2])>2]=z;v=v+1|0}while((v|0)!=(h|0));t=t+1|0}while(t>>>0

>>0)}while(0);if(d<<24>>24>0){d=f[k>>2]|0;k=0;z=$(n[j>>2]);while(1){y=$(n[s+(k<<2)>>2]);w=$(y-$(n[d+(k<<2)>>2]));if(w>z){n[j>>2]=w;A=w}else A=z;k=k+1|0;if((k|0)==(h|0))break;else z=A}}Mq(q);Mq(s);i=1;u=e;return i|0}function Xd(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;g=a+8|0;Mh(g,b,d,e);h=d-e|0;if((h|0)>0){d=0-e|0;i=a+16|0;j=a+32|0;k=a+12|0;l=a+28|0;m=a+20|0;n=a+24|0;o=h;h=f[g>>2]|0;while(1){p=b+(o<<2)|0;q=c+(o<<2)|0;if((h|0)>0){r=0;s=p+(d<<2)|0;t=h;while(1){if((t|0)>0){u=0;do{v=f[s+(u<<2)>>2]|0;w=f[i>>2]|0;if((v|0)>(w|0)){x=f[j>>2]|0;f[x+(u<<2)>>2]=w;y=x}else{x=f[k>>2]|0;w=f[j>>2]|0;f[w+(u<<2)>>2]=(v|0)<(x|0)?x:v;y=w}u=u+1|0}while((u|0)<(f[g>>2]|0));z=y}else z=f[j>>2]|0;u=(f[p+(r<<2)>>2]|0)-(f[z+(r<<2)>>2]|0)|0;w=q+(r<<2)|0;f[w>>2]=u;if((u|0)>=(f[l>>2]|0)){if((u|0)>(f[n>>2]|0)){A=u-(f[m>>2]|0)|0;B=31}}else{A=(f[m>>2]|0)+u|0;B=31}if((B|0)==31){B=0;f[w>>2]=A}r=r+1|0;w=f[g>>2]|0;if((r|0)>=(w|0)){C=w;break}else{s=z;t=w}}}else C=h;o=o-e|0;if((o|0)<=0){D=C;break}else h=C}}else D=f[g>>2]|0;C=e>>>0>1073741823?-1:e<<2;e=Lq(C)|0;sj(e|0,0,C|0)|0;if((D|0)<=0){Mq(e);return 1}C=a+16|0;h=a+32|0;o=a+12|0;z=a+28|0;A=a+20|0;m=a+24|0;a=0;n=e;l=D;while(1){if((l|0)>0){D=0;do{j=f[n+(D<<2)>>2]|0;y=f[C>>2]|0;if((j|0)>(y|0)){k=f[h>>2]|0;f[k+(D<<2)>>2]=y;E=k}else{k=f[o>>2]|0;y=f[h>>2]|0;f[y+(D<<2)>>2]=(j|0)<(k|0)?k:j;E=y}D=D+1|0}while((D|0)<(f[g>>2]|0));F=E}else F=f[h>>2]|0;D=(f[b+(a<<2)>>2]|0)-(f[F+(a<<2)>>2]|0)|0;y=c+(a<<2)|0;f[y>>2]=D;if((D|0)>=(f[z>>2]|0)){if((D|0)>(f[m>>2]|0)){G=D-(f[A>>2]|0)|0;B=16}}else{G=(f[A>>2]|0)+D|0;B=16}if((B|0)==16){B=0;f[y>>2]=G}a=a+1|0;l=f[g>>2]|0;if((a|0)>=(l|0))break;else n=F}Mq(e);return 1}function Yd(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;e=f[a>>2]|0;g=e;h=(f[b>>2]|0)-g|0;b=e+(h>>2<<2)|0;i=f[c>>2]|0;c=f[d>>2]|0;d=c-i|0;j=d>>2;k=i;l=c;if((d|0)<=0){m=b;return m|0}d=a+8|0;n=f[d>>2]|0;o=a+4|0;p=f[o>>2]|0;q=p;if((j|0)<=(n-q>>2|0)){r=b;s=q-r|0;t=s>>2;if((j|0)>(t|0)){u=k+(t<<2)|0;t=u;if((u|0)==(l|0))v=p;else{w=l+-4-t|0;x=u;u=p;while(1){f[u>>2]=f[x>>2];x=x+4|0;if((x|0)==(l|0))break;else u=u+4|0}u=p+((w>>>2)+1<<2)|0;f[o>>2]=u;v=u}if((s|0)>0){y=t;z=v}else{m=b;return m|0}}else{y=c;z=p}c=z-(b+(j<<2))>>2;v=b+(c<<2)|0;if(v>>>0

>>0){t=(p+(0-c<<2)+~r|0)>>>2;r=v;s=z;while(1){f[s>>2]=f[r>>2];r=r+4|0;if(r>>>0>=p>>>0)break;else s=s+4|0}f[o>>2]=z+(t+1<<2)}if(c|0){c=v;v=z;do{c=c+-4|0;v=v+-4|0;f[v>>2]=f[c>>2]}while((c|0)!=(b|0))}c=y;if((k|0)==(c|0)){m=b;return m|0}else{A=b;B=k}while(1){f[A>>2]=f[B>>2];B=B+4|0;if((B|0)==(c|0)){m=b;break}else A=A+4|0}return m|0}A=(q-g>>2)+j|0;if(A>>>0>1073741823)aq(a);j=n-g|0;g=j>>1;n=j>>2>>>0<536870911?(g>>>0>>0?A:g):1073741823;g=b;A=h>>2;do if(n)if(n>>>0>1073741823){j=ra(8)|0;Oo(j,16035);f[j>>2]=7256;va(j|0,1112,110)}else{j=ln(n<<2)|0;C=j;D=j;break}else{C=0;D=0}while(0);j=D+(A<<2)|0;A=D+(n<<2)|0;if((l|0)==(k|0))E=j;else{n=((l+-4-i|0)>>>2)+1|0;i=k;k=j;while(1){f[k>>2]=f[i>>2];i=i+4|0;if((i|0)==(l|0))break;else k=k+4|0}E=j+(n<<2)|0}if((h|0)>0)kh(C|0,e|0,h|0)|0;h=q-g|0;if((h|0)>0){kh(E|0,b|0,h|0)|0;F=E+(h>>>2<<2)|0}else F=E;f[a>>2]=D;f[o>>2]=F;f[d>>2]=A;if(!e){m=j;return m|0}Oq(e);m=j;return m|0}function Zd(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;c=u;u=u+48|0;d=c+40|0;e=c+36|0;g=c+32|0;h=c;i=a+60|0;ci(f[i>>2]|0,b)|0;wn(h);tk(h);j=f[a+56>>2]|0;k=f[i>>2]|0;i=k>>>5;l=j+(i<<2)|0;m=k&31;k=(i|0)!=0;a:do if(i|m|0){if(!m){n=1;o=j;p=k;while(1){if(p){q=n;r=0;while(1){s=(f[o>>2]&1<>2]&1<>2]&1<>2]&1<>2]=f[a+12>>2];m=b+16|0;w=m;v=f[w>>2]|0;j=f[w+4>>2]|0;if((j|0)>0|(j|0)==0&v>>>0>0){x=j;y=v}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;v=m;x=f[v+4>>2]|0;y=f[v>>2]|0}f[g>>2]=f[a+20>>2];if((x|0)>0|(x|0)==0&y>>>0>0){Fj(h);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;Fj(h);u=c;return 1}function _d(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;switch(b-a>>2|0){case 2:{d=b+-4|0;e=f[d>>2]|0;g=f[a>>2]|0;h=f[c>>2]|0;i=f[h>>2]|0;j=(f[h+4>>2]|0)-i>>3;if(j>>>0<=e>>>0)aq(h);k=i;if(j>>>0<=g>>>0)aq(h);if((f[k+(e<<3)>>2]|0)>>>0>=(f[k+(g<<3)>>2]|0)>>>0){l=1;return l|0}f[a>>2]=e;f[d>>2]=g;l=1;return l|0}case 3:{Vg(a,a+4|0,b+-4|0,c)|0;l=1;return l|0}case 4:{jh(a,a+4|0,a+8|0,b+-4|0,c)|0;l=1;return l|0}case 5:{ig(a,a+4|0,a+8|0,a+12|0,b+-4|0,c)|0;l=1;return l|0}case 1:case 0:{l=1;return l|0}default:{g=a+8|0;Vg(a,a+4|0,g,c)|0;d=a+12|0;a:do if((d|0)!=(b|0)){e=f[c>>2]|0;k=f[e>>2]|0;h=(f[e+4>>2]|0)-k>>3;j=k;k=d;i=0;m=g;b:while(1){n=f[k>>2]|0;o=f[m>>2]|0;if(h>>>0<=n>>>0){p=14;break}if(h>>>0<=o>>>0){p=16;break}q=j+(n<<3)|0;if((f[q>>2]|0)>>>0<(f[j+(o<<3)>>2]|0)>>>0){r=m;s=k;t=o;while(1){f[s>>2]=t;if((r|0)==(a|0)){u=a;break}o=r+-4|0;t=f[o>>2]|0;if(h>>>0<=t>>>0){p=20;break b}if((f[q>>2]|0)>>>0>=(f[j+(t<<3)>>2]|0)>>>0){u=r;break}else{v=r;r=o;s=v}}f[u>>2]=n;s=i+1|0;if((s|0)==8){w=0;x=(k+4|0)==(b|0);break a}else y=s}else y=i;s=k+4|0;if((s|0)==(b|0)){w=1;x=0;break a}else{r=k;k=s;i=y;m=r}}if((p|0)==14)aq(e);else if((p|0)==16)aq(e);else if((p|0)==20)aq(e)}else{w=1;x=0}while(0);l=x|w;return l|0}}return 0}function $d(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0;c=u;u=u+48|0;d=c+40|0;e=c+36|0;g=c+32|0;h=c;i=a+80|0;ci(f[i>>2]|0,b)|0;wn(h);tk(h);j=f[a+76>>2]|0;k=f[i>>2]|0;i=k>>>5;l=j+(i<<2)|0;m=k&31;k=(i|0)!=0;a:do if(i|m|0){if(!m){n=1;o=j;p=k;while(1){if(p){q=n;r=0;while(1){s=(f[o>>2]&1<>2]&1<>2]&1<>2]&1<>2]=f[a+12>>2];m=b+16|0;w=m;v=f[w>>2]|0;j=f[w+4>>2]|0;if((j|0)>0|(j|0)==0&v>>>0>0){x=j;y=v}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;v=m;x=f[v+4>>2]|0;y=f[v>>2]|0}f[g>>2]=f[a+16>>2];if((x|0)>0|(x|0)==0&y>>>0>0){Fj(h);u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;Fj(h);u=c;return 1}function ae(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;h=u;u=u+16|0;i=h+4|0;j=h;f[a+72>>2]=e;f[a+64>>2]=g;g=Lq(e>>>0>1073741823?-1:e<<2)|0;k=a+68|0;l=f[k>>2]|0;f[k>>2]=g;if(l|0)Mq(l);l=a+8|0;Mh(l,b,d,e);d=a+56|0;g=f[d>>2]|0;m=f[g+4>>2]|0;n=f[g>>2]|0;o=m-n|0;if((o|0)<=0){u=h;return 1}p=(o>>>2)+-1|0;o=a+16|0;q=a+32|0;r=a+12|0;s=a+28|0;t=a+20|0;v=a+24|0;if(m-n>>2>>>0>p>>>0){w=p;x=n}else{y=g;aq(y)}while(1){f[j>>2]=f[x+(w<<2)>>2];f[i>>2]=f[j>>2];Dc(a,i,b,w);g=X(w,e)|0;n=b+(g<<2)|0;p=c+(g<<2)|0;g=f[l>>2]|0;if((g|0)>0){m=0;z=f[k>>2]|0;A=g;while(1){if((A|0)>0){g=0;do{B=f[z+(g<<2)>>2]|0;C=f[o>>2]|0;if((B|0)>(C|0)){D=f[q>>2]|0;f[D+(g<<2)>>2]=C;E=D}else{D=f[r>>2]|0;C=f[q>>2]|0;f[C+(g<<2)>>2]=(B|0)<(D|0)?D:B;E=C}g=g+1|0}while((g|0)<(f[l>>2]|0));F=E}else F=f[q>>2]|0;g=(f[n+(m<<2)>>2]|0)-(f[F+(m<<2)>>2]|0)|0;C=p+(m<<2)|0;f[C>>2]=g;if((g|0)>=(f[s>>2]|0)){if((g|0)>(f[v>>2]|0)){G=g-(f[t>>2]|0)|0;H=21}}else{G=(f[t>>2]|0)+g|0;H=21}if((H|0)==21){H=0;f[C>>2]=G}m=m+1|0;A=f[l>>2]|0;if((m|0)>=(A|0))break;else z=F}}w=w+-1|0;if((w|0)<=-1){H=5;break}z=f[d>>2]|0;x=f[z>>2]|0;if((f[z+4>>2]|0)-x>>2>>>0<=w>>>0){y=z;H=6;break}}if((H|0)==5){u=h;return 1}else if((H|0)==6)aq(y);return 0} +function $a(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0;b=u;u=u+16|0;c=b;do if(a>>>0<245){d=a>>>0<11?16:a+11&-8;e=d>>>3;g=f[4784]|0;h=g>>>e;if(h&3|0){i=(h&1^1)+e|0;j=19176+(i<<1<<2)|0;k=j+8|0;l=f[k>>2]|0;m=l+8|0;n=f[m>>2]|0;if((n|0)==(j|0))f[4784]=g&~(1<>2]=j;f[k>>2]=n}n=i<<3;f[l+4>>2]=n|3;i=l+n+4|0;f[i>>2]=f[i>>2]|1;o=m;u=b;return o|0}m=f[4786]|0;if(d>>>0>m>>>0){if(h|0){i=2<>>12&16;e=i>>>n;i=e>>>5&8;h=e>>>i;e=h>>>2&4;l=h>>>e;h=l>>>1&2;k=l>>>h;l=k>>>1&1;j=(i|n|e|h|l)+(k>>>l)|0;l=19176+(j<<1<<2)|0;k=l+8|0;h=f[k>>2]|0;e=h+8|0;n=f[e>>2]|0;if((n|0)==(l|0)){i=g&~(1<>2]=l;f[k>>2]=n;p=g}n=j<<3;j=n-d|0;f[h+4>>2]=d|3;k=h+d|0;f[k+4>>2]=j|1;f[h+n>>2]=j;if(m|0){n=f[4789]|0;h=m>>>3;l=19176+(h<<1<<2)|0;i=1<>2]|0;r=i}f[r>>2]=n;f[q+12>>2]=n;f[n+8>>2]=q;f[n+12>>2]=l}f[4786]=j;f[4789]=k;o=e;u=b;return o|0}e=f[4785]|0;if(e){k=(e&0-e)+-1|0;j=k>>>12&16;l=k>>>j;k=l>>>5&8;n=l>>>k;l=n>>>2&4;i=n>>>l;n=i>>>1&2;h=i>>>n;i=h>>>1&1;s=f[19440+((k|j|l|n|i)+(h>>>i)<<2)>>2]|0;i=(f[s+4>>2]&-8)-d|0;h=f[s+16+(((f[s+16>>2]|0)==0&1)<<2)>>2]|0;if(!h){t=s;v=i}else{n=s;s=i;i=h;while(1){h=(f[i+4>>2]&-8)-d|0;l=h>>>0>>0;j=l?h:s;h=l?i:n;i=f[i+16+(((f[i+16>>2]|0)==0&1)<<2)>>2]|0;if(!i){t=h;v=j;break}else{n=h;s=j}}}s=t+d|0;if(s>>>0>t>>>0){n=f[t+24>>2]|0;i=f[t+12>>2]|0;do if((i|0)==(t|0)){j=t+20|0;h=f[j>>2]|0;if(!h){l=t+16|0;k=f[l>>2]|0;if(!k){w=0;break}else{x=k;y=l}}else{x=h;y=j}while(1){j=x+20|0;h=f[j>>2]|0;if(h|0){x=h;y=j;continue}j=x+16|0;h=f[j>>2]|0;if(!h)break;else{x=h;y=j}}f[y>>2]=0;w=x}else{j=f[t+8>>2]|0;f[j+12>>2]=i;f[i+8>>2]=j;w=i}while(0);do if(n|0){i=f[t+28>>2]|0;j=19440+(i<<2)|0;if((t|0)==(f[j>>2]|0)){f[j>>2]=w;if(!w){f[4785]=e&~(1<>2]|0)!=(t|0)&1)<<2)>>2]=w;if(!w)break}f[w+24>>2]=n;i=f[t+16>>2]|0;if(i|0){f[w+16>>2]=i;f[i+24>>2]=w}i=f[t+20>>2]|0;if(i|0){f[w+20>>2]=i;f[i+24>>2]=w}}while(0);if(v>>>0<16){n=v+d|0;f[t+4>>2]=n|3;e=t+n+4|0;f[e>>2]=f[e>>2]|1}else{f[t+4>>2]=d|3;f[s+4>>2]=v|1;f[s+v>>2]=v;if(m|0){e=f[4789]|0;n=m>>>3;i=19176+(n<<1<<2)|0;j=1<>2]|0;A=j}f[A>>2]=e;f[z+12>>2]=e;f[e+8>>2]=z;f[e+12>>2]=i}f[4786]=v;f[4789]=s}o=t+8|0;u=b;return o|0}else B=d}else B=d}else B=d}else if(a>>>0<=4294967231){i=a+11|0;e=i&-8;j=f[4785]|0;if(j){n=0-e|0;h=i>>>8;if(h)if(e>>>0>16777215)C=31;else{i=(h+1048320|0)>>>16&8;l=h<>>16&4;k=l<>>16&2;D=14-(h|i|l)+(k<>>15)|0;C=e>>>(D+7|0)&1|D<<1}else C=0;D=f[19440+(C<<2)>>2]|0;a:do if(!D){E=0;F=0;G=n;H=57}else{l=0;k=n;i=D;h=e<<((C|0)==31?0:25-(C>>>1)|0);I=0;while(1){J=(f[i+4>>2]&-8)-e|0;if(J>>>0>>0)if(!J){K=0;L=i;M=i;H=61;break a}else{N=i;O=J}else{N=l;O=k}J=f[i+20>>2]|0;i=f[i+16+(h>>>31<<2)>>2]|0;P=(J|0)==0|(J|0)==(i|0)?I:J;J=(i|0)==0;if(J){E=P;F=N;G=O;H=57;break}else{l=N;k=O;h=h<<((J^1)&1);I=P}}}while(0);if((H|0)==57){if((E|0)==0&(F|0)==0){D=2<>>12&16;d=D>>>n;D=d>>>5&8;s=d>>>D;d=s>>>2&4;g=s>>>d;s=g>>>1&2;m=g>>>s;g=m>>>1&1;Q=0;R=f[19440+((D|n|d|s|g)+(m>>>g)<<2)>>2]|0}else{Q=F;R=E}if(!R){S=Q;T=G}else{K=G;L=R;M=Q;H=61}}if((H|0)==61)while(1){H=0;g=(f[L+4>>2]&-8)-e|0;m=g>>>0>>0;s=m?g:K;g=m?L:M;L=f[L+16+(((f[L+16>>2]|0)==0&1)<<2)>>2]|0;if(!L){S=g;T=s;break}else{K=s;M=g;H=61}}if((S|0)!=0?T>>>0<((f[4786]|0)-e|0)>>>0:0){g=S+e|0;if(g>>>0<=S>>>0){o=0;u=b;return o|0}s=f[S+24>>2]|0;m=f[S+12>>2]|0;do if((m|0)==(S|0)){d=S+20|0;n=f[d>>2]|0;if(!n){D=S+16|0;I=f[D>>2]|0;if(!I){U=0;break}else{V=I;W=D}}else{V=n;W=d}while(1){d=V+20|0;n=f[d>>2]|0;if(n|0){V=n;W=d;continue}d=V+16|0;n=f[d>>2]|0;if(!n)break;else{V=n;W=d}}f[W>>2]=0;U=V}else{d=f[S+8>>2]|0;f[d+12>>2]=m;f[m+8>>2]=d;U=m}while(0);do if(s){m=f[S+28>>2]|0;d=19440+(m<<2)|0;if((S|0)==(f[d>>2]|0)){f[d>>2]=U;if(!U){d=j&~(1<>2]|0)!=(S|0)&1)<<2)>>2]=U;if(!U){X=j;break}}f[U+24>>2]=s;d=f[S+16>>2]|0;if(d|0){f[U+16>>2]=d;f[d+24>>2]=U}d=f[S+20>>2]|0;if(d){f[U+20>>2]=d;f[d+24>>2]=U;X=j}else X=j}else X=j;while(0);do if(T>>>0>=16){f[S+4>>2]=e|3;f[g+4>>2]=T|1;f[g+T>>2]=T;j=T>>>3;if(T>>>0<256){s=19176+(j<<1<<2)|0;d=f[4784]|0;m=1<>2]|0;Z=m}f[Z>>2]=g;f[Y+12>>2]=g;f[g+8>>2]=Y;f[g+12>>2]=s;break}s=T>>>8;if(s)if(T>>>0>16777215)_=31;else{m=(s+1048320|0)>>>16&8;d=s<>>16&4;j=d<>>16&2;n=14-(s|m|d)+(j<>>15)|0;_=T>>>(n+7|0)&1|n<<1}else _=0;n=19440+(_<<2)|0;f[g+28>>2]=_;d=g+16|0;f[d+4>>2]=0;f[d>>2]=0;d=1<<_;if(!(X&d)){f[4785]=X|d;f[n>>2]=g;f[g+24>>2]=n;f[g+12>>2]=g;f[g+8>>2]=g;break}d=T<<((_|0)==31?0:25-(_>>>1)|0);j=f[n>>2]|0;while(1){if((f[j+4>>2]&-8|0)==(T|0)){H=97;break}$=j+16+(d>>>31<<2)|0;n=f[$>>2]|0;if(!n){H=96;break}else{d=d<<1;j=n}}if((H|0)==96){f[$>>2]=g;f[g+24>>2]=j;f[g+12>>2]=g;f[g+8>>2]=g;break}else if((H|0)==97){d=j+8|0;n=f[d>>2]|0;f[n+12>>2]=g;f[d>>2]=g;f[g+8>>2]=n;f[g+12>>2]=j;f[g+24>>2]=0;break}}else{n=T+e|0;f[S+4>>2]=n|3;d=S+n+4|0;f[d>>2]=f[d>>2]|1}while(0);o=S+8|0;u=b;return o|0}else B=e}else B=e}else B=-1;while(0);S=f[4786]|0;if(S>>>0>=B>>>0){T=S-B|0;$=f[4789]|0;if(T>>>0>15){_=$+B|0;f[4789]=_;f[4786]=T;f[_+4>>2]=T|1;f[$+S>>2]=T;f[$+4>>2]=B|3}else{f[4786]=0;f[4789]=0;f[$+4>>2]=S|3;T=$+S+4|0;f[T>>2]=f[T>>2]|1}o=$+8|0;u=b;return o|0}$=f[4787]|0;if($>>>0>B>>>0){T=$-B|0;f[4787]=T;S=f[4790]|0;_=S+B|0;f[4790]=_;f[_+4>>2]=T|1;f[S+4>>2]=B|3;o=S+8|0;u=b;return o|0}if(!(f[4902]|0)){f[4904]=4096;f[4903]=4096;f[4905]=-1;f[4906]=-1;f[4907]=0;f[4895]=0;f[4902]=c&-16^1431655768;aa=4096}else aa=f[4904]|0;c=B+48|0;S=B+47|0;T=aa+S|0;_=0-aa|0;aa=T&_;if(aa>>>0<=B>>>0){o=0;u=b;return o|0}X=f[4894]|0;if(X|0?(Y=f[4892]|0,Z=Y+aa|0,Z>>>0<=Y>>>0|Z>>>0>X>>>0):0){o=0;u=b;return o|0}b:do if(!(f[4895]&4)){X=f[4790]|0;c:do if(X){Z=19584;while(1){Y=f[Z>>2]|0;if(Y>>>0<=X>>>0?(ba=Z+4|0,(Y+(f[ba>>2]|0)|0)>>>0>X>>>0):0)break;Y=f[Z+8>>2]|0;if(!Y){H=118;break c}else Z=Y}j=T-$&_;if(j>>>0<2147483647){Y=Nl(j|0)|0;if((Y|0)==((f[Z>>2]|0)+(f[ba>>2]|0)|0))if((Y|0)==(-1|0))ca=j;else{da=j;ea=Y;H=135;break b}else{fa=Y;ga=j;H=126}}else ca=0}else H=118;while(0);do if((H|0)==118){X=Nl(0)|0;if((X|0)!=(-1|0)?(e=X,j=f[4903]|0,Y=j+-1|0,U=((Y&e|0)==0?0:(Y+e&0-j)-e|0)+aa|0,e=f[4892]|0,j=U+e|0,U>>>0>B>>>0&U>>>0<2147483647):0){Y=f[4894]|0;if(Y|0?j>>>0<=e>>>0|j>>>0>Y>>>0:0){ca=0;break}Y=Nl(U|0)|0;if((Y|0)==(X|0)){da=U;ea=X;H=135;break b}else{fa=Y;ga=U;H=126}}else ca=0}while(0);do if((H|0)==126){U=0-ga|0;if(!(c>>>0>ga>>>0&(ga>>>0<2147483647&(fa|0)!=(-1|0))))if((fa|0)==(-1|0)){ca=0;break}else{da=ga;ea=fa;H=135;break b}Y=f[4904]|0;X=S-ga+Y&0-Y;if(X>>>0>=2147483647){da=ga;ea=fa;H=135;break b}if((Nl(X|0)|0)==(-1|0)){Nl(U|0)|0;ca=0;break}else{da=X+ga|0;ea=fa;H=135;break b}}while(0);f[4895]=f[4895]|4;ha=ca;H=133}else{ha=0;H=133}while(0);if(((H|0)==133?aa>>>0<2147483647:0)?(ca=Nl(aa|0)|0,aa=Nl(0)|0,fa=aa-ca|0,ga=fa>>>0>(B+40|0)>>>0,!((ca|0)==(-1|0)|ga^1|ca>>>0>>0&((ca|0)!=(-1|0)&(aa|0)!=(-1|0))^1)):0){da=ga?fa:ha;ea=ca;H=135}if((H|0)==135){ca=(f[4892]|0)+da|0;f[4892]=ca;if(ca>>>0>(f[4893]|0)>>>0)f[4893]=ca;ca=f[4790]|0;do if(ca){ha=19584;while(1){ia=f[ha>>2]|0;ja=ha+4|0;ka=f[ja>>2]|0;if((ea|0)==(ia+ka|0)){H=143;break}fa=f[ha+8>>2]|0;if(!fa)break;else ha=fa}if(((H|0)==143?(f[ha+12>>2]&8|0)==0:0)?ea>>>0>ca>>>0&ia>>>0<=ca>>>0:0){f[ja>>2]=ka+da;fa=(f[4787]|0)+da|0;ga=ca+8|0;aa=(ga&7|0)==0?0:0-ga&7;ga=ca+aa|0;S=fa-aa|0;f[4790]=ga;f[4787]=S;f[ga+4>>2]=S|1;f[ca+fa+4>>2]=40;f[4791]=f[4906];break}if(ea>>>0<(f[4788]|0)>>>0)f[4788]=ea;fa=ea+da|0;S=19584;while(1){if((f[S>>2]|0)==(fa|0)){H=151;break}ga=f[S+8>>2]|0;if(!ga){la=19584;break}else S=ga}if((H|0)==151)if(!(f[S+12>>2]&8)){f[S>>2]=ea;ha=S+4|0;f[ha>>2]=(f[ha>>2]|0)+da;ha=ea+8|0;ga=ea+((ha&7|0)==0?0:0-ha&7)|0;ha=fa+8|0;aa=fa+((ha&7|0)==0?0:0-ha&7)|0;ha=ga+B|0;c=aa-ga-B|0;f[ga+4>>2]=B|3;do if((ca|0)!=(aa|0)){if((f[4789]|0)==(aa|0)){ba=(f[4786]|0)+c|0;f[4786]=ba;f[4789]=ha;f[ha+4>>2]=ba|1;f[ha+ba>>2]=ba;break}ba=f[aa+4>>2]|0;if((ba&3|0)==1){_=ba&-8;$=ba>>>3;d:do if(ba>>>0<256){T=f[aa+8>>2]|0;X=f[aa+12>>2]|0;if((X|0)==(T|0)){f[4784]=f[4784]&~(1<<$);break}else{f[T+12>>2]=X;f[X+8>>2]=T;break}}else{T=f[aa+24>>2]|0;X=f[aa+12>>2]|0;do if((X|0)==(aa|0)){U=aa+16|0;Y=U+4|0;j=f[Y>>2]|0;if(!j){e=f[U>>2]|0;if(!e){ma=0;break}else{na=e;oa=U}}else{na=j;oa=Y}while(1){Y=na+20|0;j=f[Y>>2]|0;if(j|0){na=j;oa=Y;continue}Y=na+16|0;j=f[Y>>2]|0;if(!j)break;else{na=j;oa=Y}}f[oa>>2]=0;ma=na}else{Y=f[aa+8>>2]|0;f[Y+12>>2]=X;f[X+8>>2]=Y;ma=X}while(0);if(!T)break;X=f[aa+28>>2]|0;Y=19440+(X<<2)|0;do if((f[Y>>2]|0)!=(aa|0)){f[T+16+(((f[T+16>>2]|0)!=(aa|0)&1)<<2)>>2]=ma;if(!ma)break d}else{f[Y>>2]=ma;if(ma|0)break;f[4785]=f[4785]&~(1<>2]=T;X=aa+16|0;Y=f[X>>2]|0;if(Y|0){f[ma+16>>2]=Y;f[Y+24>>2]=ma}Y=f[X+4>>2]|0;if(!Y)break;f[ma+20>>2]=Y;f[Y+24>>2]=ma}while(0);pa=aa+_|0;qa=_+c|0}else{pa=aa;qa=c}$=pa+4|0;f[$>>2]=f[$>>2]&-2;f[ha+4>>2]=qa|1;f[ha+qa>>2]=qa;$=qa>>>3;if(qa>>>0<256){ba=19176+($<<1<<2)|0;Z=f[4784]|0;Y=1<<$;if(!(Z&Y)){f[4784]=Z|Y;ra=ba;sa=ba+8|0}else{Y=ba+8|0;ra=f[Y>>2]|0;sa=Y}f[sa>>2]=ha;f[ra+12>>2]=ha;f[ha+8>>2]=ra;f[ha+12>>2]=ba;break}ba=qa>>>8;do if(!ba)ta=0;else{if(qa>>>0>16777215){ta=31;break}Y=(ba+1048320|0)>>>16&8;Z=ba<>>16&4;X=Z<<$;Z=(X+245760|0)>>>16&2;j=14-($|Y|Z)+(X<>>15)|0;ta=qa>>>(j+7|0)&1|j<<1}while(0);ba=19440+(ta<<2)|0;f[ha+28>>2]=ta;_=ha+16|0;f[_+4>>2]=0;f[_>>2]=0;_=f[4785]|0;j=1<>2]=ha;f[ha+24>>2]=ba;f[ha+12>>2]=ha;f[ha+8>>2]=ha;break}j=qa<<((ta|0)==31?0:25-(ta>>>1)|0);_=f[ba>>2]|0;while(1){if((f[_+4>>2]&-8|0)==(qa|0)){H=192;break}ua=_+16+(j>>>31<<2)|0;ba=f[ua>>2]|0;if(!ba){H=191;break}else{j=j<<1;_=ba}}if((H|0)==191){f[ua>>2]=ha;f[ha+24>>2]=_;f[ha+12>>2]=ha;f[ha+8>>2]=ha;break}else if((H|0)==192){j=_+8|0;ba=f[j>>2]|0;f[ba+12>>2]=ha;f[j>>2]=ha;f[ha+8>>2]=ba;f[ha+12>>2]=_;f[ha+24>>2]=0;break}}else{ba=(f[4787]|0)+c|0;f[4787]=ba;f[4790]=ha;f[ha+4>>2]=ba|1}while(0);o=ga+8|0;u=b;return o|0}else la=19584;while(1){ha=f[la>>2]|0;if(ha>>>0<=ca>>>0?(va=ha+(f[la+4>>2]|0)|0,va>>>0>ca>>>0):0)break;la=f[la+8>>2]|0}ga=va+-47|0;ha=ga+8|0;c=ga+((ha&7|0)==0?0:0-ha&7)|0;ha=ca+16|0;ga=c>>>0>>0?ca:c;c=ga+8|0;aa=da+-40|0;fa=ea+8|0;S=(fa&7|0)==0?0:0-fa&7;fa=ea+S|0;ba=aa-S|0;f[4790]=fa;f[4787]=ba;f[fa+4>>2]=ba|1;f[ea+aa+4>>2]=40;f[4791]=f[4906];aa=ga+4|0;f[aa>>2]=27;f[c>>2]=f[4896];f[c+4>>2]=f[4897];f[c+8>>2]=f[4898];f[c+12>>2]=f[4899];f[4896]=ea;f[4897]=da;f[4899]=0;f[4898]=c;c=ga+24|0;do{ba=c;c=c+4|0;f[c>>2]=7}while((ba+8|0)>>>0>>0);if((ga|0)!=(ca|0)){c=ga-ca|0;f[aa>>2]=f[aa>>2]&-2;f[ca+4>>2]=c|1;f[ga>>2]=c;ba=c>>>3;if(c>>>0<256){fa=19176+(ba<<1<<2)|0;S=f[4784]|0;j=1<>2]|0;xa=j}f[xa>>2]=ca;f[wa+12>>2]=ca;f[ca+8>>2]=wa;f[ca+12>>2]=fa;break}fa=c>>>8;if(fa)if(c>>>0>16777215)ya=31;else{j=(fa+1048320|0)>>>16&8;S=fa<>>16&4;ba=S<>>16&2;Z=14-(fa|j|S)+(ba<>>15)|0;ya=c>>>(Z+7|0)&1|Z<<1}else ya=0;Z=19440+(ya<<2)|0;f[ca+28>>2]=ya;f[ca+20>>2]=0;f[ha>>2]=0;S=f[4785]|0;ba=1<>2]=ca;f[ca+24>>2]=Z;f[ca+12>>2]=ca;f[ca+8>>2]=ca;break}ba=c<<((ya|0)==31?0:25-(ya>>>1)|0);S=f[Z>>2]|0;while(1){if((f[S+4>>2]&-8|0)==(c|0)){H=213;break}za=S+16+(ba>>>31<<2)|0;Z=f[za>>2]|0;if(!Z){H=212;break}else{ba=ba<<1;S=Z}}if((H|0)==212){f[za>>2]=ca;f[ca+24>>2]=S;f[ca+12>>2]=ca;f[ca+8>>2]=ca;break}else if((H|0)==213){ba=S+8|0;c=f[ba>>2]|0;f[c+12>>2]=ca;f[ba>>2]=ca;f[ca+8>>2]=c;f[ca+12>>2]=S;f[ca+24>>2]=0;break}}}else{c=f[4788]|0;if((c|0)==0|ea>>>0>>0)f[4788]=ea;f[4896]=ea;f[4897]=da;f[4899]=0;f[4793]=f[4902];f[4792]=-1;f[4797]=19176;f[4796]=19176;f[4799]=19184;f[4798]=19184;f[4801]=19192;f[4800]=19192;f[4803]=19200;f[4802]=19200;f[4805]=19208;f[4804]=19208;f[4807]=19216;f[4806]=19216;f[4809]=19224;f[4808]=19224;f[4811]=19232;f[4810]=19232;f[4813]=19240;f[4812]=19240;f[4815]=19248;f[4814]=19248;f[4817]=19256;f[4816]=19256;f[4819]=19264;f[4818]=19264;f[4821]=19272;f[4820]=19272;f[4823]=19280;f[4822]=19280;f[4825]=19288;f[4824]=19288;f[4827]=19296;f[4826]=19296;f[4829]=19304;f[4828]=19304;f[4831]=19312;f[4830]=19312;f[4833]=19320;f[4832]=19320;f[4835]=19328;f[4834]=19328;f[4837]=19336;f[4836]=19336;f[4839]=19344;f[4838]=19344;f[4841]=19352;f[4840]=19352;f[4843]=19360;f[4842]=19360;f[4845]=19368;f[4844]=19368;f[4847]=19376;f[4846]=19376;f[4849]=19384;f[4848]=19384;f[4851]=19392;f[4850]=19392;f[4853]=19400;f[4852]=19400;f[4855]=19408;f[4854]=19408;f[4857]=19416;f[4856]=19416;f[4859]=19424;f[4858]=19424;c=da+-40|0;ba=ea+8|0;ha=(ba&7|0)==0?0:0-ba&7;ba=ea+ha|0;ga=c-ha|0;f[4790]=ba;f[4787]=ga;f[ba+4>>2]=ga|1;f[ea+c+4>>2]=40;f[4791]=f[4906]}while(0);ea=f[4787]|0;if(ea>>>0>B>>>0){da=ea-B|0;f[4787]=da;ea=f[4790]|0;ca=ea+B|0;f[4790]=ca;f[ca+4>>2]=da|1;f[ea+4>>2]=B|3;o=ea+8|0;u=b;return o|0}}ea=Vq()|0;f[ea>>2]=12;o=0;u=b;return o|0}function ab(a,c,d,e,g,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0.0,Wa=0.0,Xa=0.0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0;i=u;u=u+240|0;j=i+104|0;k=i+224|0;l=i+176|0;m=i+160|0;n=i+228|0;o=i+72|0;p=i+40|0;q=i+132|0;r=i;s=i+172|0;t=i+156|0;v=i+152|0;w=i+148|0;x=i+144|0;y=i+128|0;z=a+8|0;Mh(z,c,e,g);e=f[a+48>>2]|0;A=f[a+52>>2]|0;B=l;C=B+48|0;do{f[B>>2]=0;B=B+4|0}while((B|0)<(C|0));if(!g){D=0;E=0}else{Ci(l,g);D=f[l+12>>2]|0;E=f[l+16>>2]|0}B=l+16|0;C=E-D>>2;F=D;D=E;if(C>>>0>=g>>>0){if(C>>>0>g>>>0?(E=F+(g<<2)|0,(E|0)!=(D|0)):0)f[B>>2]=D+(~((D+-4-E|0)>>>2)<<2)}else Ci(l+12|0,g-C|0);C=l+24|0;E=l+28|0;D=f[E>>2]|0;B=f[C>>2]|0;F=D-B>>2;G=B;B=D;if(F>>>0>=g>>>0){if(F>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[E>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else Ci(C,g-F|0);F=l+36|0;C=l+40|0;D=f[C>>2]|0;B=f[F>>2]|0;E=D-B>>2;G=B;B=D;if(E>>>0>=g>>>0){if(E>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[C>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else Ci(F,g-E|0);f[m>>2]=0;E=m+4|0;f[E>>2]=0;f[m+8>>2]=0;F=(g|0)==0;do if(!F)if(g>>>0>1073741823)aq(m);else{D=g<<2;B=ln(D)|0;f[m>>2]=B;C=B+(g<<2)|0;f[m+8>>2]=C;sj(B|0,0,D|0)|0;f[E>>2]=C;break}while(0);C=a+152|0;D=a+156|0;B=f[D>>2]|0;G=f[C>>2]|0;H=B-G>>2;L=G;G=B;if(H>>>0>=g>>>0){if(H>>>0>g>>>0?(B=L+(g<<2)|0,(B|0)!=(G|0)):0)f[D>>2]=G+(~((G+-4-B|0)>>>2)<<2)}else Ci(C,g-H|0);f[o>>2]=0;f[o+4>>2]=0;f[o+8>>2]=0;f[o+12>>2]=0;f[o+16>>2]=0;f[o+20>>2]=0;f[o+24>>2]=0;f[o+28>>2]=0;f[p>>2]=0;f[p+4>>2]=0;f[p+8>>2]=0;f[p+12>>2]=0;f[p+16>>2]=0;f[p+20>>2]=0;f[p+24>>2]=0;f[p+28>>2]=0;f[q>>2]=0;H=q+4|0;f[H>>2]=0;f[q+8>>2]=0;if(F){M=0;N=0;O=0;P=0}else{F=g<<2;B=ln(F)|0;f[q>>2]=B;G=B+(g<<2)|0;f[q+8>>2]=G;sj(B|0,0,F|0)|0;f[H>>2]=G;M=B;N=G;O=G;P=B}B=a+56|0;G=f[B>>2]|0;F=f[G+4>>2]|0;D=f[G>>2]|0;L=F-D|0;a:do if((L|0)>4){Q=L>>2;R=e+64|0;S=e+28|0;T=(g|0)>0;U=r+4|0;V=r+8|0;Z=r+12|0;_=a+152|0;$=a+112|0;aa=r+16|0;ba=r+28|0;ca=a+16|0;da=a+32|0;ea=a+12|0;fa=a+28|0;ga=a+20|0;ha=a+24|0;ia=r+28|0;ja=r+16|0;ka=r+20|0;la=r+32|0;ma=n+1|0;na=g<<2;oa=(g|0)==1;pa=Q+-1|0;if(F-D>>2>>>0>pa>>>0){qa=Q;ra=pa;sa=D;ta=P;ua=O;va=M;wa=M;xa=N;ya=M;za=N}else{Aa=G;aq(Aa)}b:while(1){pa=f[sa+(ra<<2)>>2]|0;Q=(((pa>>>0)%3|0|0)==0?2:-1)+pa|0;Ba=Q>>>5;Ca=1<<(Q&31);Da=(pa|0)==-1|(Q|0)==-1;Ea=1;Fa=0;Ga=pa;c:while(1){Ha=Ea^1;Ia=Fa;Ja=Ga;while(1){if((Ja|0)==-1){Ka=Ia;break c}La=f[l+(Ia*12|0)>>2]|0;if(((f[(f[e>>2]|0)+(Ja>>>5<<2)>>2]&1<<(Ja&31)|0)==0?(Ma=f[(f[(f[R>>2]|0)+12>>2]|0)+(Ja<<2)>>2]|0,(Ma|0)!=-1):0)?(Na=f[S>>2]|0,Oa=f[A>>2]|0,Pa=f[Oa+(f[Na+(Ma<<2)>>2]<<2)>>2]|0,Qa=Ma+1|0,Ra=f[Oa+(f[Na+((((Qa>>>0)%3|0|0)==0?Ma+-2|0:Qa)<<2)>>2]<<2)>>2]|0,Qa=f[Oa+(f[Na+((((Ma>>>0)%3|0|0)==0?2:-1)+Ma<<2)>>2]<<2)>>2]|0,(Pa|0)<(ra|0)&(Ra|0)<(ra|0)&(Qa|0)<(ra|0)):0){Ma=X(Pa,g)|0;Pa=X(Ra,g)|0;Ra=X(Qa,g)|0;if(T){Qa=0;do{f[La+(Qa<<2)>>2]=(f[c+(Qa+Ra<<2)>>2]|0)+(f[c+(Qa+Pa<<2)>>2]|0)-(f[c+(Qa+Ma<<2)>>2]|0);Qa=Qa+1|0}while((Qa|0)!=(g|0))}Qa=Ia+1|0;if((Qa|0)==4){Ka=4;break c}else Sa=Qa}else Sa=Ia;do if(Ea){Qa=Ja+1|0;Ma=((Qa>>>0)%3|0|0)==0?Ja+-2|0:Qa;if(((Ma|0)!=-1?(f[(f[e>>2]|0)+(Ma>>>5<<2)>>2]&1<<(Ma&31)|0)==0:0)?(Qa=f[(f[(f[R>>2]|0)+12>>2]|0)+(Ma<<2)>>2]|0,Ma=Qa+1|0,(Qa|0)!=-1):0)Ta=((Ma>>>0)%3|0|0)==0?Qa+-2|0:Ma;else Ta=-1}else{Ma=(((Ja>>>0)%3|0|0)==0?2:-1)+Ja|0;if(((Ma|0)!=-1?(f[(f[e>>2]|0)+(Ma>>>5<<2)>>2]&1<<(Ma&31)|0)==0:0)?(Qa=f[(f[(f[R>>2]|0)+12>>2]|0)+(Ma<<2)>>2]|0,(Qa|0)!=-1):0)if(!((Qa>>>0)%3|0)){Ta=Qa+2|0;break}else{Ta=Qa+-1|0;break}else Ta=-1}while(0);if((Ta|0)==(pa|0)){Ka=Sa;break c}if((Ta|0)!=-1|Ha){Ia=Sa;Ja=Ta}else break}if(Da){Ea=0;Fa=Sa;Ga=-1;continue}if(f[(f[e>>2]|0)+(Ba<<2)>>2]&Ca|0){Ea=0;Fa=Sa;Ga=-1;continue}Ja=f[(f[(f[R>>2]|0)+12>>2]|0)+(Q<<2)>>2]|0;if((Ja|0)==-1){Ea=0;Fa=Sa;Ga=-1;continue}if(!((Ja>>>0)%3|0)){Ea=0;Fa=Sa;Ga=Ja+2|0;continue}else{Ea=0;Fa=Sa;Ga=Ja+-1|0;continue}}Ga=X(ra,g)|0;f[r>>2]=0;f[U>>2]=0;b[V>>0]=0;f[Z>>2]=0;f[Z+4>>2]=0;f[Z+8>>2]=0;f[Z+12>>2]=0;f[Z+16>>2]=0;f[Z+20>>2]=0;f[Z+24>>2]=0;Fa=Ka+-1|0;Ea=p+(Fa<<3)|0;Q=Ea;Ca=Vn(f[Q>>2]|0,f[Q+4>>2]|0,Ka|0,((Ka|0)<0)<<31>>31|0)|0;Q=I;Ba=Ea;f[Ba>>2]=Ca;f[Ba+4>>2]=Q;Ba=c+((X(qa+-2|0,g)|0)<<2)|0;Ea=c+(Ga<<2)|0;Da=f[_>>2]|0;if(T){pa=0;Ja=0;while(1){Ia=(f[Ba+(pa<<2)>>2]|0)-(f[Ea+(pa<<2)>>2]|0)|0;Ha=((Ia|0)>-1?Ia:0-Ia|0)+Ja|0;f[va+(pa<<2)>>2]=Ia;f[Da+(pa<<2)>>2]=Ia<<1^Ia>>31;pa=pa+1|0;if((pa|0)==(g|0)){Ua=Ha;break}else Ja=Ha}}else Ua=0;mo(j,$,Da,g);Ja=Zk(j)|0;pa=I;Ha=Bm(j)|0;Ia=I;Qa=o+(Fa<<3)|0;Ma=Qa;Pa=f[Ma>>2]|0;Ra=f[Ma+4>>2]|0;Va=+wm(Ca,Pa);Ma=Vn(Ha|0,Ia|0,Ja|0,pa|0)|0;Wa=+(Ca>>>0)+4294967296.0*+(Q|0);Xa=+W(+(Va*Wa));pa=Vn(Ma|0,I|0,~~Xa>>>0|0,(+K(Xa)>=1.0?(Xa>0.0?~~+Y(+J(Xa/4294967296.0),4294967295.0)>>>0:~~+W((Xa-+(~~Xa>>>0))/4294967296.0)>>>0):0)|0)|0;Ma=r;f[Ma>>2]=pa;f[Ma+4>>2]=Ua;b[V>>0]=0;f[Z>>2]=0;$f(aa,Ba,Ba+(g<<2)|0);f[s>>2]=ta;f[t>>2]=ua;f[k>>2]=f[s>>2];f[j>>2]=f[t>>2];Jf(ba,k,j);if((Ka|0)<1){Ya=za;Za=ya;_a=xa;$a=wa;ab=ua;bb=ta;cb=ta}else{Ma=n+Ka|0;pa=f[q>>2]|0;Ja=pa;Ia=f[H>>2]|0;Ha=Ma+-1|0;La=(Ha|0)==(n|0);Na=Ma+-2|0;Oa=ma>>>0>>0;db=~Ka;eb=Ka+2+((db|0)>-2?db:-2)|0;db=Ia;fb=Ha>>>0>n>>>0;gb=0;hb=1;while(1){gb=gb+1|0;sj(n|0,1,eb|0)|0;sj(n|0,0,gb|0)|0;ib=Vn(Pa|0,Ra|0,hb|0,0)|0;d:while(1){if(T){sj(f[m>>2]|0,0,na|0)|0;jb=f[m>>2]|0;kb=0;lb=0;while(1){if(!(b[n+kb>>0]|0)){mb=f[l+(kb*12|0)>>2]|0;nb=0;do{ob=jb+(nb<<2)|0;f[ob>>2]=(f[ob>>2]|0)+(f[mb+(nb<<2)>>2]|0);nb=nb+1|0}while((nb|0)!=(g|0));pb=(1<>0]|0))rb=(1<>2]|0;do if(T){f[kb>>2]=(f[kb>>2]|0)/(hb|0)|0;if(!oa){lb=1;do{jb=kb+(lb<<2)|0;f[jb>>2]=(f[jb>>2]|0)/(hb|0)|0;lb=lb+1|0}while((lb|0)!=(g|0));lb=f[_>>2]|0;if(T)sb=lb;else{tb=0;ub=lb;break}}else sb=f[_>>2]|0;lb=0;jb=0;while(1){nb=(f[kb+(lb<<2)>>2]|0)-(f[Ea+(lb<<2)>>2]|0)|0;mb=((nb|0)>-1?nb:0-nb|0)+jb|0;f[pa+(lb<<2)>>2]=nb;f[sb+(lb<<2)>>2]=nb<<1^nb>>31;lb=lb+1|0;if((lb|0)==(g|0)){tb=mb;ub=sb;break}else jb=mb}}else{tb=0;ub=f[_>>2]|0}while(0);mo(j,$,ub,g);kb=Zk(j)|0;jb=I;lb=Bm(j)|0;mb=I;Xa=+wm(Ca,ib);nb=Vn(lb|0,mb|0,kb|0,jb|0)|0;Va=+W(+(Xa*Wa));jb=Vn(nb|0,I|0,~~Va>>>0|0,(+K(Va)>=1.0?(Va>0.0?~~+Y(+J(Va/4294967296.0),4294967295.0)>>>0:~~+W((Va-+(~~Va>>>0))/4294967296.0)>>>0):0)|0)|0;nb=f[r>>2]|0;if(!((nb|0)<=(jb|0)?!((nb|0)>=(jb|0)?(tb|0)<(f[U>>2]|0):0):0)){nb=r;f[nb>>2]=jb;f[nb+4>>2]=tb;b[V>>0]=qb;f[Z>>2]=hb;f[v>>2]=f[m>>2];f[w>>2]=f[E>>2];f[k>>2]=f[v>>2];f[j>>2]=f[w>>2];Jf(aa,k,j);f[x>>2]=Ja;f[y>>2]=Ia;f[k>>2]=f[x>>2];f[j>>2]=f[y>>2];Jf(ba,k,j)}if(La)break;vb=b[Ha>>0]|0;nb=-1;jb=vb;while(1){kb=nb+-1|0;wb=Ma+kb|0;mb=jb;jb=b[wb>>0]|0;if((jb&255)<(mb&255))break;if((wb|0)==(n|0)){xb=84;break d}else nb=kb}kb=Ma+nb|0;if((jb&255)<(vb&255)){yb=Ha;zb=vb}else{mb=Ma;lb=Ha;while(1){ob=lb+-1|0;if((jb&255)<(h[mb+-2>>0]|0)){yb=ob;zb=1;break}else{Ab=lb;lb=ob;mb=Ab}}}b[wb>>0]=zb;b[yb>>0]=jb;if((nb|0)<-1){Bb=kb;Cb=Ha}else continue;while(1){mb=b[Bb>>0]|0;b[Bb>>0]=b[Cb>>0]|0;b[Cb>>0]=mb;mb=Bb+1|0;lb=Cb+-1|0;if(mb>>>0>>0){Bb=mb;Cb=lb}else continue d}}if(((xb|0)==84?(xb=0,fb):0)?(ib=b[n>>0]|0,b[n>>0]=vb,b[Ha>>0]=ib,Oa):0){ib=Na;kb=ma;do{nb=b[kb>>0]|0;b[kb>>0]=b[ib>>0]|0;b[ib>>0]=nb;kb=kb+1|0;ib=ib+-1|0}while(kb>>>0>>0)}if((hb|0)>=(Ka|0)){Ya=db;Za=pa;_a=db;$a=pa;ab=Ia;bb=Ja;cb=pa;break}else hb=hb+1|0}}hb=f[Z>>2]|0;pa=Vn(Pa|0,Ra|0,hb|0,((hb|0)<0)<<31>>31|0)|0;hb=Qa;f[hb>>2]=pa;f[hb+4>>2]=I;if(T){hb=f[ba>>2]|0;pa=f[C>>2]|0;Ja=0;do{Ia=f[hb+(Ja<<2)>>2]|0;f[pa+(Ja<<2)>>2]=Ia<<1^Ia>>31;Ja=Ja+1|0}while((Ja|0)!=(g|0));Db=pa}else Db=f[C>>2]|0;lo(j,$,Db,g);if((Ka|0)>0){Eb=a+60+(Fa*12|0)|0;pa=a+60+(Fa*12|0)+4|0;Ja=a+60+(Fa*12|0)+8|0;hb=0;do{Qa=f[pa>>2]|0;Ra=f[Ja>>2]|0;Pa=(Qa|0)==(Ra<<5|0);if(!(1<>0])){if(Pa){if((Qa+1|0)<0){xb=108;break b}Ia=Ra<<6;db=Qa+32&-32;vi(Eb,Qa>>>0<1073741823?(Ia>>>0>>0?db:Ia):2147483647);Fb=f[pa>>2]|0}else Fb=Qa;f[pa>>2]=Fb+1;Ia=(f[Eb>>2]|0)+(Fb>>>5<<2)|0;f[Ia>>2]=f[Ia>>2]|1<<(Fb&31)}else{if(Pa){if((Qa+1|0)<0){xb=113;break b}Pa=Ra<<6;Ra=Qa+32&-32;vi(Eb,Qa>>>0<1073741823?(Pa>>>0>>0?Ra:Pa):2147483647);Gb=f[pa>>2]|0}else Gb=Qa;f[pa>>2]=Gb+1;Qa=(f[Eb>>2]|0)+(Gb>>>5<<2)|0;f[Qa>>2]=f[Qa>>2]&~(1<<(Gb&31))}hb=hb+1|0}while((hb|0)<(Ka|0))}hb=d+(Ga<<2)|0;pa=f[z>>2]|0;if((pa|0)>0){Ja=0;Fa=f[aa>>2]|0;Qa=pa;while(1){if((Qa|0)>0){pa=0;do{Pa=f[Fa+(pa<<2)>>2]|0;Ra=f[ca>>2]|0;if((Pa|0)>(Ra|0)){Ia=f[da>>2]|0;f[Ia+(pa<<2)>>2]=Ra;Hb=Ia}else{Ia=f[ea>>2]|0;Ra=f[da>>2]|0;f[Ra+(pa<<2)>>2]=(Pa|0)<(Ia|0)?Ia:Pa;Hb=Ra}pa=pa+1|0}while((pa|0)<(f[z>>2]|0));Ib=Hb}else Ib=f[da>>2]|0;pa=(f[Ea+(Ja<<2)>>2]|0)-(f[Ib+(Ja<<2)>>2]|0)|0;Ra=hb+(Ja<<2)|0;f[Ra>>2]=pa;do if((pa|0)<(f[fa>>2]|0)){Jb=(f[ga>>2]|0)+pa|0;xb=103}else{if((pa|0)<=(f[ha>>2]|0))break;Jb=pa-(f[ga>>2]|0)|0;xb=103}while(0);if((xb|0)==103){xb=0;f[Ra>>2]=Jb}Ja=Ja+1|0;Qa=f[z>>2]|0;if((Ja|0)>=(Qa|0))break;else Fa=Ib}}Fa=f[ia>>2]|0;if(Fa|0){Qa=f[la>>2]|0;if((Qa|0)!=(Fa|0))f[la>>2]=Qa+(~((Qa+-4-Fa|0)>>>2)<<2);Oq(Fa)}Fa=f[ja>>2]|0;if(Fa|0){Qa=f[ka>>2]|0;if((Qa|0)!=(Fa|0))f[ka>>2]=Qa+(~((Qa+-4-Fa|0)>>>2)<<2);Oq(Fa)}if((qa|0)<=2){Kb=$a;Lb=_a;break a}Fa=f[B>>2]|0;sa=f[Fa>>2]|0;Qa=ra+-1|0;if((f[Fa+4>>2]|0)-sa>>2>>>0<=Qa>>>0){Aa=Fa;xb=18;break}else{Fa=ra;ra=Qa;ta=bb;ua=ab;va=cb;wa=$a;xa=_a;ya=Za;za=Ya;qa=Fa}}if((xb|0)==18)aq(Aa);else if((xb|0)==108)aq(Eb);else if((xb|0)==113)aq(Eb)}else{Kb=M;Lb=N}while(0);N=f[l>>2]|0;if((g|0)>0?(f[N>>2]=0,(g|0)!=1):0){M=1;do{f[N+(M<<2)>>2]=0;M=M+1|0}while((M|0)!=(g|0))}g=f[z>>2]|0;if((g|0)>0){M=a+16|0;Eb=a+32|0;Aa=a+12|0;qa=a+28|0;Ya=a+20|0;za=a+24|0;a=0;Za=N;N=g;while(1){if((N|0)>0){g=0;do{ya=f[Za+(g<<2)>>2]|0;_a=f[M>>2]|0;if((ya|0)>(_a|0)){xa=f[Eb>>2]|0;f[xa+(g<<2)>>2]=_a;Mb=xa}else{xa=f[Aa>>2]|0;_a=f[Eb>>2]|0;f[_a+(g<<2)>>2]=(ya|0)<(xa|0)?xa:ya;Mb=_a}g=g+1|0}while((g|0)<(f[z>>2]|0));Nb=Mb}else Nb=f[Eb>>2]|0;g=(f[c+(a<<2)>>2]|0)-(f[Nb+(a<<2)>>2]|0)|0;_a=d+(a<<2)|0;f[_a>>2]=g;if((g|0)>=(f[qa>>2]|0)){if((g|0)>(f[za>>2]|0)){Ob=g-(f[Ya>>2]|0)|0;xb=139}}else{Ob=(f[Ya>>2]|0)+g|0;xb=139}if((xb|0)==139){xb=0;f[_a>>2]=Ob}a=a+1|0;N=f[z>>2]|0;if((a|0)>=(N|0))break;else Za=Nb}}if(Kb|0){if((Lb|0)!=(Kb|0))f[H>>2]=Lb+(~((Lb+-4-Kb|0)>>>2)<<2);Oq(Kb)}Kb=f[m>>2]|0;if(Kb|0){m=f[E>>2]|0;if((m|0)!=(Kb|0))f[E>>2]=m+(~((m+-4-Kb|0)>>>2)<<2);Oq(Kb)}Kb=f[l+36>>2]|0;if(Kb|0){m=l+40|0;E=f[m>>2]|0;if((E|0)!=(Kb|0))f[m>>2]=E+(~((E+-4-Kb|0)>>>2)<<2);Oq(Kb)}Kb=f[l+24>>2]|0;if(Kb|0){E=l+28|0;m=f[E>>2]|0;if((m|0)!=(Kb|0))f[E>>2]=m+(~((m+-4-Kb|0)>>>2)<<2);Oq(Kb)}Kb=f[l+12>>2]|0;if(Kb|0){m=l+16|0;E=f[m>>2]|0;if((E|0)!=(Kb|0))f[m>>2]=E+(~((E+-4-Kb|0)>>>2)<<2);Oq(Kb)}Kb=f[l>>2]|0;if(!Kb){u=i;return 1}E=l+4|0;l=f[E>>2]|0;if((l|0)!=(Kb|0))f[E>>2]=l+(~((l+-4-Kb|0)>>>2)<<2);Oq(Kb);u=i;return 1}function bb(a,c,d,e,g,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0.0,Wa=0.0,Xa=0.0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0;i=u;u=u+240|0;j=i+104|0;k=i+224|0;l=i+176|0;m=i+160|0;n=i+228|0;o=i+72|0;p=i+40|0;q=i+132|0;r=i;s=i+172|0;t=i+156|0;v=i+152|0;w=i+148|0;x=i+144|0;y=i+128|0;z=a+8|0;Mh(z,c,e,g);e=f[a+48>>2]|0;A=f[a+52>>2]|0;B=l;C=B+48|0;do{f[B>>2]=0;B=B+4|0}while((B|0)<(C|0));if(!g){D=0;E=0}else{Ci(l,g);D=f[l+12>>2]|0;E=f[l+16>>2]|0}B=l+16|0;C=E-D>>2;F=D;D=E;if(C>>>0>=g>>>0){if(C>>>0>g>>>0?(E=F+(g<<2)|0,(E|0)!=(D|0)):0)f[B>>2]=D+(~((D+-4-E|0)>>>2)<<2)}else Ci(l+12|0,g-C|0);C=l+24|0;E=l+28|0;D=f[E>>2]|0;B=f[C>>2]|0;F=D-B>>2;G=B;B=D;if(F>>>0>=g>>>0){if(F>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[E>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else Ci(C,g-F|0);F=l+36|0;C=l+40|0;D=f[C>>2]|0;B=f[F>>2]|0;E=D-B>>2;G=B;B=D;if(E>>>0>=g>>>0){if(E>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[C>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else Ci(F,g-E|0);f[m>>2]=0;E=m+4|0;f[E>>2]=0;f[m+8>>2]=0;F=(g|0)==0;do if(!F)if(g>>>0>1073741823)aq(m);else{D=g<<2;B=ln(D)|0;f[m>>2]=B;C=B+(g<<2)|0;f[m+8>>2]=C;sj(B|0,0,D|0)|0;f[E>>2]=C;break}while(0);C=a+152|0;D=a+156|0;B=f[D>>2]|0;G=f[C>>2]|0;H=B-G>>2;L=G;G=B;if(H>>>0>=g>>>0){if(H>>>0>g>>>0?(B=L+(g<<2)|0,(B|0)!=(G|0)):0)f[D>>2]=G+(~((G+-4-B|0)>>>2)<<2)}else Ci(C,g-H|0);f[o>>2]=0;f[o+4>>2]=0;f[o+8>>2]=0;f[o+12>>2]=0;f[o+16>>2]=0;f[o+20>>2]=0;f[o+24>>2]=0;f[o+28>>2]=0;f[p>>2]=0;f[p+4>>2]=0;f[p+8>>2]=0;f[p+12>>2]=0;f[p+16>>2]=0;f[p+20>>2]=0;f[p+24>>2]=0;f[p+28>>2]=0;f[q>>2]=0;H=q+4|0;f[H>>2]=0;f[q+8>>2]=0;if(F){M=0;N=0;O=0;P=0}else{F=g<<2;B=ln(F)|0;f[q>>2]=B;G=B+(g<<2)|0;f[q+8>>2]=G;sj(B|0,0,F|0)|0;f[H>>2]=G;M=B;N=G;O=G;P=B}B=a+56|0;G=f[B>>2]|0;F=f[G+4>>2]|0;D=f[G>>2]|0;L=F-D|0;a:do if((L|0)>4){Q=L>>2;R=e+12|0;S=(g|0)>0;T=r+4|0;U=r+8|0;V=r+12|0;Z=a+152|0;_=a+112|0;$=r+16|0;aa=r+28|0;ba=a+16|0;ca=a+32|0;da=a+12|0;ea=a+28|0;fa=a+20|0;ga=a+24|0;ha=r+28|0;ia=r+16|0;ja=r+20|0;ka=r+32|0;la=n+1|0;ma=g<<2;na=(g|0)==1;oa=Q+-1|0;if(F-D>>2>>>0>oa>>>0){pa=Q;qa=oa;ra=D;sa=P;ta=O;ua=M;va=M;wa=N;xa=M;ya=N}else{za=G;aq(za)}b:while(1){oa=f[ra+(qa<<2)>>2]|0;Q=(((oa>>>0)%3|0|0)==0?2:-1)+oa|0;Aa=(oa|0)==-1|(Q|0)==-1;Ba=1;Ca=0;Da=oa;c:while(1){Ea=Ba^1;Fa=Ca;Ga=Da;while(1){if((Ga|0)==-1){Ha=Fa;break c}Ia=f[l+(Fa*12|0)>>2]|0;Ja=f[R>>2]|0;Ka=f[Ja+(Ga<<2)>>2]|0;if((Ka|0)!=-1){La=f[e>>2]|0;Ma=f[A>>2]|0;Na=f[Ma+(f[La+(Ka<<2)>>2]<<2)>>2]|0;Oa=Ka+1|0;Pa=((Oa>>>0)%3|0|0)==0?Ka+-2|0:Oa;if((Pa|0)==-1)Qa=-1;else Qa=f[La+(Pa<<2)>>2]|0;Pa=f[Ma+(Qa<<2)>>2]|0;Oa=(((Ka>>>0)%3|0|0)==0?2:-1)+Ka|0;if((Oa|0)==-1)Ra=-1;else Ra=f[La+(Oa<<2)>>2]|0;Oa=f[Ma+(Ra<<2)>>2]|0;if((Na|0)<(qa|0)&(Pa|0)<(qa|0)&(Oa|0)<(qa|0)){Ma=X(Na,g)|0;Na=X(Pa,g)|0;Pa=X(Oa,g)|0;if(S){Oa=0;do{f[Ia+(Oa<<2)>>2]=(f[c+(Oa+Pa<<2)>>2]|0)+(f[c+(Oa+Na<<2)>>2]|0)-(f[c+(Oa+Ma<<2)>>2]|0);Oa=Oa+1|0}while((Oa|0)!=(g|0))}Oa=Fa+1|0;if((Oa|0)==4){Ha=4;break c}else Sa=Oa}else Sa=Fa}else Sa=Fa;do if(Ba){Oa=Ga+1|0;Ma=((Oa>>>0)%3|0|0)==0?Ga+-2|0:Oa;if((Ma|0)!=-1?(Oa=f[Ja+(Ma<<2)>>2]|0,Ma=Oa+1|0,(Oa|0)!=-1):0)Ta=((Ma>>>0)%3|0|0)==0?Oa+-2|0:Ma;else Ta=-1}else{Ma=(((Ga>>>0)%3|0|0)==0?2:-1)+Ga|0;if((Ma|0)!=-1?(Oa=f[Ja+(Ma<<2)>>2]|0,(Oa|0)!=-1):0)if(!((Oa>>>0)%3|0)){Ta=Oa+2|0;break}else{Ta=Oa+-1|0;break}else Ta=-1}while(0);if((Ta|0)==(oa|0)){Ha=Sa;break c}if((Ta|0)!=-1|Ea){Fa=Sa;Ga=Ta}else break}if(Aa){Ba=0;Ca=Sa;Da=-1;continue}Ga=f[Ja+(Q<<2)>>2]|0;if((Ga|0)==-1){Ba=0;Ca=Sa;Da=-1;continue}if(!((Ga>>>0)%3|0)){Ba=0;Ca=Sa;Da=Ga+2|0;continue}else{Ba=0;Ca=Sa;Da=Ga+-1|0;continue}}Da=X(qa,g)|0;f[r>>2]=0;f[T>>2]=0;b[U>>0]=0;f[V>>2]=0;f[V+4>>2]=0;f[V+8>>2]=0;f[V+12>>2]=0;f[V+16>>2]=0;f[V+20>>2]=0;f[V+24>>2]=0;Ca=Ha+-1|0;Ba=p+(Ca<<3)|0;Q=Ba;Aa=Vn(f[Q>>2]|0,f[Q+4>>2]|0,Ha|0,((Ha|0)<0)<<31>>31|0)|0;Q=I;oa=Ba;f[oa>>2]=Aa;f[oa+4>>2]=Q;oa=c+((X(pa+-2|0,g)|0)<<2)|0;Ba=c+(Da<<2)|0;Ga=f[Z>>2]|0;if(S){Fa=0;Ea=0;while(1){Oa=(f[oa+(Fa<<2)>>2]|0)-(f[Ba+(Fa<<2)>>2]|0)|0;Ma=((Oa|0)>-1?Oa:0-Oa|0)+Ea|0;f[ua+(Fa<<2)>>2]=Oa;f[Ga+(Fa<<2)>>2]=Oa<<1^Oa>>31;Fa=Fa+1|0;if((Fa|0)==(g|0)){Ua=Ma;break}else Ea=Ma}}else Ua=0;mo(j,_,Ga,g);Ea=Zk(j)|0;Fa=I;Ma=Bm(j)|0;Oa=I;Na=o+(Ca<<3)|0;Pa=Na;Ia=f[Pa>>2]|0;La=f[Pa+4>>2]|0;Va=+wm(Aa,Ia);Pa=Vn(Ma|0,Oa|0,Ea|0,Fa|0)|0;Wa=+(Aa>>>0)+4294967296.0*+(Q|0);Xa=+W(+(Va*Wa));Fa=Vn(Pa|0,I|0,~~Xa>>>0|0,(+K(Xa)>=1.0?(Xa>0.0?~~+Y(+J(Xa/4294967296.0),4294967295.0)>>>0:~~+W((Xa-+(~~Xa>>>0))/4294967296.0)>>>0):0)|0)|0;Pa=r;f[Pa>>2]=Fa;f[Pa+4>>2]=Ua;b[U>>0]=0;f[V>>2]=0;$f($,oa,oa+(g<<2)|0);f[s>>2]=sa;f[t>>2]=ta;f[k>>2]=f[s>>2];f[j>>2]=f[t>>2];Jf(aa,k,j);if((Ha|0)<1){Ya=ya;Za=xa;_a=wa;$a=va;ab=ta;bb=sa;cb=sa}else{Pa=n+Ha|0;Fa=f[q>>2]|0;Ea=Fa;Oa=f[H>>2]|0;Ma=Pa+-1|0;Ka=(Ma|0)==(n|0);db=Pa+-2|0;eb=la>>>0>>0;fb=~Ha;gb=Ha+2+((fb|0)>-2?fb:-2)|0;fb=Oa;hb=Ma>>>0>n>>>0;ib=0;jb=1;while(1){ib=ib+1|0;sj(n|0,1,gb|0)|0;sj(n|0,0,ib|0)|0;kb=Vn(Ia|0,La|0,jb|0,0)|0;d:while(1){if(S){sj(f[m>>2]|0,0,ma|0)|0;lb=f[m>>2]|0;mb=0;nb=0;while(1){if(!(b[n+mb>>0]|0)){ob=f[l+(mb*12|0)>>2]|0;pb=0;do{qb=lb+(pb<<2)|0;f[qb>>2]=(f[qb>>2]|0)+(f[ob+(pb<<2)>>2]|0);pb=pb+1|0}while((pb|0)!=(g|0));rb=(1<>0]|0))tb=(1<>2]|0;do if(S){f[mb>>2]=(f[mb>>2]|0)/(jb|0)|0;if(!na){nb=1;do{lb=mb+(nb<<2)|0;f[lb>>2]=(f[lb>>2]|0)/(jb|0)|0;nb=nb+1|0}while((nb|0)!=(g|0));nb=f[Z>>2]|0;if(S)ub=nb;else{vb=0;wb=nb;break}}else ub=f[Z>>2]|0;nb=0;lb=0;while(1){pb=(f[mb+(nb<<2)>>2]|0)-(f[Ba+(nb<<2)>>2]|0)|0;ob=((pb|0)>-1?pb:0-pb|0)+lb|0;f[Fa+(nb<<2)>>2]=pb;f[ub+(nb<<2)>>2]=pb<<1^pb>>31;nb=nb+1|0;if((nb|0)==(g|0)){vb=ob;wb=ub;break}else lb=ob}}else{vb=0;wb=f[Z>>2]|0}while(0);mo(j,_,wb,g);mb=Zk(j)|0;lb=I;nb=Bm(j)|0;ob=I;Xa=+wm(Aa,kb);pb=Vn(nb|0,ob|0,mb|0,lb|0)|0;Va=+W(+(Xa*Wa));lb=Vn(pb|0,I|0,~~Va>>>0|0,(+K(Va)>=1.0?(Va>0.0?~~+Y(+J(Va/4294967296.0),4294967295.0)>>>0:~~+W((Va-+(~~Va>>>0))/4294967296.0)>>>0):0)|0)|0;pb=f[r>>2]|0;if(!((pb|0)<=(lb|0)?!((pb|0)>=(lb|0)?(vb|0)<(f[T>>2]|0):0):0)){pb=r;f[pb>>2]=lb;f[pb+4>>2]=vb;b[U>>0]=sb;f[V>>2]=jb;f[v>>2]=f[m>>2];f[w>>2]=f[E>>2];f[k>>2]=f[v>>2];f[j>>2]=f[w>>2];Jf($,k,j);f[x>>2]=Ea;f[y>>2]=Oa;f[k>>2]=f[x>>2];f[j>>2]=f[y>>2];Jf(aa,k,j)}if(Ka)break;xb=b[Ma>>0]|0;pb=-1;lb=xb;while(1){mb=pb+-1|0;yb=Pa+mb|0;ob=lb;lb=b[yb>>0]|0;if((lb&255)<(ob&255))break;if((yb|0)==(n|0)){zb=84;break d}else pb=mb}mb=Pa+pb|0;if((lb&255)<(xb&255)){Ab=Ma;Bb=xb}else{ob=Pa;nb=Ma;while(1){qb=nb+-1|0;if((lb&255)<(h[ob+-2>>0]|0)){Ab=qb;Bb=1;break}else{Cb=nb;nb=qb;ob=Cb}}}b[yb>>0]=Bb;b[Ab>>0]=lb;if((pb|0)<-1){Db=mb;Eb=Ma}else continue;while(1){ob=b[Db>>0]|0;b[Db>>0]=b[Eb>>0]|0;b[Eb>>0]=ob;ob=Db+1|0;nb=Eb+-1|0;if(ob>>>0>>0){Db=ob;Eb=nb}else continue d}}if(((zb|0)==84?(zb=0,hb):0)?(kb=b[n>>0]|0,b[n>>0]=xb,b[Ma>>0]=kb,eb):0){kb=db;mb=la;do{pb=b[mb>>0]|0;b[mb>>0]=b[kb>>0]|0;b[kb>>0]=pb;mb=mb+1|0;kb=kb+-1|0}while(mb>>>0>>0)}if((jb|0)>=(Ha|0)){Ya=fb;Za=Fa;_a=fb;$a=Fa;ab=Oa;bb=Ea;cb=Fa;break}else jb=jb+1|0}}jb=f[V>>2]|0;Fa=Vn(Ia|0,La|0,jb|0,((jb|0)<0)<<31>>31|0)|0;jb=Na;f[jb>>2]=Fa;f[jb+4>>2]=I;if(S){jb=f[aa>>2]|0;Fa=f[C>>2]|0;Ea=0;do{Oa=f[jb+(Ea<<2)>>2]|0;f[Fa+(Ea<<2)>>2]=Oa<<1^Oa>>31;Ea=Ea+1|0}while((Ea|0)!=(g|0));Fb=Fa}else Fb=f[C>>2]|0;lo(j,_,Fb,g);if((Ha|0)>0){Gb=a+60+(Ca*12|0)|0;Fa=a+60+(Ca*12|0)+4|0;Ea=a+60+(Ca*12|0)+8|0;jb=0;do{Na=f[Fa>>2]|0;La=f[Ea>>2]|0;Ia=(Na|0)==(La<<5|0);if(!(1<>0])){if(Ia){if((Na+1|0)<0){zb=108;break b}Oa=La<<6;fb=Na+32&-32;vi(Gb,Na>>>0<1073741823?(Oa>>>0>>0?fb:Oa):2147483647);Hb=f[Fa>>2]|0}else Hb=Na;f[Fa>>2]=Hb+1;Oa=(f[Gb>>2]|0)+(Hb>>>5<<2)|0;f[Oa>>2]=f[Oa>>2]|1<<(Hb&31)}else{if(Ia){if((Na+1|0)<0){zb=113;break b}Ia=La<<6;La=Na+32&-32;vi(Gb,Na>>>0<1073741823?(Ia>>>0>>0?La:Ia):2147483647);Ib=f[Fa>>2]|0}else Ib=Na;f[Fa>>2]=Ib+1;Na=(f[Gb>>2]|0)+(Ib>>>5<<2)|0;f[Na>>2]=f[Na>>2]&~(1<<(Ib&31))}jb=jb+1|0}while((jb|0)<(Ha|0))}jb=d+(Da<<2)|0;Fa=f[z>>2]|0;if((Fa|0)>0){Ea=0;Ca=f[$>>2]|0;Na=Fa;while(1){if((Na|0)>0){Fa=0;do{Ia=f[Ca+(Fa<<2)>>2]|0;La=f[ba>>2]|0;if((Ia|0)>(La|0)){Oa=f[ca>>2]|0;f[Oa+(Fa<<2)>>2]=La;Jb=Oa}else{Oa=f[da>>2]|0;La=f[ca>>2]|0;f[La+(Fa<<2)>>2]=(Ia|0)<(Oa|0)?Oa:Ia;Jb=La}Fa=Fa+1|0}while((Fa|0)<(f[z>>2]|0));Kb=Jb}else Kb=f[ca>>2]|0;Fa=(f[Ba+(Ea<<2)>>2]|0)-(f[Kb+(Ea<<2)>>2]|0)|0;La=jb+(Ea<<2)|0;f[La>>2]=Fa;do if((Fa|0)<(f[ea>>2]|0)){Lb=(f[fa>>2]|0)+Fa|0;zb=103}else{if((Fa|0)<=(f[ga>>2]|0))break;Lb=Fa-(f[fa>>2]|0)|0;zb=103}while(0);if((zb|0)==103){zb=0;f[La>>2]=Lb}Ea=Ea+1|0;Na=f[z>>2]|0;if((Ea|0)>=(Na|0))break;else Ca=Kb}}Ca=f[ha>>2]|0;if(Ca|0){Na=f[ka>>2]|0;if((Na|0)!=(Ca|0))f[ka>>2]=Na+(~((Na+-4-Ca|0)>>>2)<<2);Oq(Ca)}Ca=f[ia>>2]|0;if(Ca|0){Na=f[ja>>2]|0;if((Na|0)!=(Ca|0))f[ja>>2]=Na+(~((Na+-4-Ca|0)>>>2)<<2);Oq(Ca)}if((pa|0)<=2){Mb=$a;Nb=_a;break a}Ca=f[B>>2]|0;ra=f[Ca>>2]|0;Na=qa+-1|0;if((f[Ca+4>>2]|0)-ra>>2>>>0<=Na>>>0){za=Ca;zb=18;break}else{Ca=qa;qa=Na;sa=bb;ta=ab;ua=cb;va=$a;wa=_a;xa=Za;ya=Ya;pa=Ca}}if((zb|0)==18)aq(za);else if((zb|0)==108)aq(Gb);else if((zb|0)==113)aq(Gb)}else{Mb=M;Nb=N}while(0);N=f[l>>2]|0;if((g|0)>0?(f[N>>2]=0,(g|0)!=1):0){M=1;do{f[N+(M<<2)>>2]=0;M=M+1|0}while((M|0)!=(g|0))}g=f[z>>2]|0;if((g|0)>0){M=a+16|0;Gb=a+32|0;za=a+12|0;pa=a+28|0;Ya=a+20|0;ya=a+24|0;a=0;Za=N;N=g;while(1){if((N|0)>0){g=0;do{xa=f[Za+(g<<2)>>2]|0;_a=f[M>>2]|0;if((xa|0)>(_a|0)){wa=f[Gb>>2]|0;f[wa+(g<<2)>>2]=_a;Ob=wa}else{wa=f[za>>2]|0;_a=f[Gb>>2]|0;f[_a+(g<<2)>>2]=(xa|0)<(wa|0)?wa:xa;Ob=_a}g=g+1|0}while((g|0)<(f[z>>2]|0));Pb=Ob}else Pb=f[Gb>>2]|0;g=(f[c+(a<<2)>>2]|0)-(f[Pb+(a<<2)>>2]|0)|0;_a=d+(a<<2)|0;f[_a>>2]=g;if((g|0)>=(f[pa>>2]|0)){if((g|0)>(f[ya>>2]|0)){Qb=g-(f[Ya>>2]|0)|0;zb=139}}else{Qb=(f[Ya>>2]|0)+g|0;zb=139}if((zb|0)==139){zb=0;f[_a>>2]=Qb}a=a+1|0;N=f[z>>2]|0;if((a|0)>=(N|0))break;else Za=Pb}}if(Mb|0){if((Nb|0)!=(Mb|0))f[H>>2]=Nb+(~((Nb+-4-Mb|0)>>>2)<<2);Oq(Mb)}Mb=f[m>>2]|0;if(Mb|0){m=f[E>>2]|0;if((m|0)!=(Mb|0))f[E>>2]=m+(~((m+-4-Mb|0)>>>2)<<2);Oq(Mb)}Mb=f[l+36>>2]|0;if(Mb|0){m=l+40|0;E=f[m>>2]|0;if((E|0)!=(Mb|0))f[m>>2]=E+(~((E+-4-Mb|0)>>>2)<<2);Oq(Mb)}Mb=f[l+24>>2]|0;if(Mb|0){E=l+28|0;m=f[E>>2]|0;if((m|0)!=(Mb|0))f[E>>2]=m+(~((m+-4-Mb|0)>>>2)<<2);Oq(Mb)}Mb=f[l+12>>2]|0;if(Mb|0){m=l+16|0;E=f[m>>2]|0;if((E|0)!=(Mb|0))f[m>>2]=E+(~((E+-4-Mb|0)>>>2)<<2);Oq(Mb)}Mb=f[l>>2]|0;if(!Mb){u=i;return 1}E=l+4|0;l=f[E>>2]|0;if((l|0)!=(Mb|0))f[E>>2]=l+(~((l+-4-Mb|0)>>>2)<<2);Oq(Mb);u=i;return 1}function cb(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;b=u;u=u+16|0;c=b;d=b+8|0;e=b+4|0;f[d>>2]=a;do if(a>>>0>=212){g=(a>>>0)/210|0;h=g*210|0;f[e>>2]=a-h;i=0;j=g;g=(Hl(6952,7144,e,c)|0)-6952>>2;k=h;a:while(1){l=(f[6952+(g<<2)>>2]|0)+k|0;h=5;while(1){if(h>>>0>=47){m=211;n=i;o=8;break}p=f[6760+(h<<2)>>2]|0;q=(l>>>0)/(p>>>0)|0;if(q>>>0

>>0){o=106;break a}if((l|0)==(X(q,p)|0)){r=i;break}else h=h+1|0}b:do if((o|0)==8){c:while(1){o=0;h=(l>>>0)/(m>>>0)|0;do if(h>>>0>=m>>>0)if((l|0)!=(X(h,m)|0)){p=m+10|0;q=(l>>>0)/(p>>>0)|0;if(q>>>0>=p>>>0)if((l|0)!=(X(q,p)|0)){q=m+12|0;s=(l>>>0)/(q>>>0)|0;if(s>>>0>=q>>>0)if((l|0)!=(X(s,q)|0)){s=m+16|0;t=(l>>>0)/(s>>>0)|0;if(t>>>0>=s>>>0)if((l|0)!=(X(t,s)|0)){t=m+18|0;v=(l>>>0)/(t>>>0)|0;if(v>>>0>=t>>>0)if((l|0)!=(X(v,t)|0)){v=m+22|0;w=(l>>>0)/(v>>>0)|0;if(w>>>0>=v>>>0)if((l|0)!=(X(w,v)|0)){w=m+28|0;x=(l>>>0)/(w>>>0)|0;if(x>>>0>=w>>>0)if((l|0)==(X(x,w)|0)){y=w;z=9;A=n}else{x=m+30|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+36|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+40|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+42|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+46|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+52|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+58|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+60|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+66|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+70|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+72|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+78|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+82|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+88|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+96|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+100|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+102|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+106|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+108|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+112|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+120|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+126|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+130|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+136|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+138|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+142|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+148|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+150|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+156|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+162|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+166|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+168|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+172|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+178|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+180|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+186|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+190|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+192|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+196|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+198|0;B=(l>>>0)/(x>>>0)|0;if(B>>>0>>0){y=x;z=1;A=l;break}if((l|0)==(X(B,x)|0)){y=x;z=9;A=n;break}x=m+208|0;B=(l>>>0)/(x>>>0)|0;C=B>>>0>>0;D=(l|0)==(X(B,x)|0);y=C|D?x:m+210|0;z=C?1:D?9:0;A=C?l:n}else{y=w;z=1;A=l}}else{y=v;z=9;A=n}else{y=v;z=1;A=l}}else{y=t;z=9;A=n}else{y=t;z=1;A=l}}else{y=s;z=9;A=n}else{y=s;z=1;A=l}}else{y=q;z=9;A=n}else{y=q;z=1;A=l}}else{y=p;z=9;A=n}else{y=p;z=1;A=l}}else{y=m;z=9;A=n}else{y=m;z=1;A=l}while(0);switch(z&15){case 9:{r=A;break b;break}case 0:{m=y;n=A;o=8;break}default:break c}}if(!z)r=A;else{o=107;break a}}while(0);h=g+1|0;p=(h|0)==48;q=j+(p&1)|0;i=r;j=q;g=p?0:h;k=q*210|0}if((o|0)==106){f[d>>2]=l;E=l;break}else if((o|0)==107){f[d>>2]=l;E=A;break}}else{k=Hl(6760,6952,d,c)|0;E=f[k>>2]|0}while(0);u=b;return E|0}function db(a,c,d,e,g,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0.0,Ua=0.0,Va=0.0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0;i=u;u=u+256|0;e=i+104|0;j=i+240|0;k=i+224|0;l=i+160|0;m=i+140|0;n=i+248|0;o=i+72|0;p=i+40|0;q=i+128|0;r=i;s=i+232|0;t=i+220|0;v=i+216|0;w=i+212|0;x=i+208|0;y=i+152|0;z=f[a+28>>2]|0;A=f[a+32>>2]|0;B=l;C=B+48|0;do{f[B>>2]=0;B=B+4|0}while((B|0)<(C|0));if(!g){D=0;E=0}else{Ci(l,g);D=f[l+12>>2]|0;E=f[l+16>>2]|0}B=l+16|0;C=E-D>>2;F=D;D=E;if(C>>>0>=g>>>0){if(C>>>0>g>>>0?(E=F+(g<<2)|0,(E|0)!=(D|0)):0)f[B>>2]=D+(~((D+-4-E|0)>>>2)<<2)}else Ci(l+12|0,g-C|0);C=l+24|0;E=l+28|0;D=f[E>>2]|0;B=f[C>>2]|0;F=D-B>>2;G=B;B=D;if(F>>>0>=g>>>0){if(F>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[E>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else Ci(C,g-F|0);F=l+36|0;C=l+40|0;D=f[C>>2]|0;B=f[F>>2]|0;E=D-B>>2;G=B;B=D;if(E>>>0>=g>>>0){if(E>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[C>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else Ci(F,g-E|0);f[m>>2]=0;E=m+4|0;f[E>>2]=0;f[m+8>>2]=0;F=(g|0)==0;do if(!F)if(g>>>0>1073741823)aq(m);else{D=g<<2;B=ln(D)|0;f[m>>2]=B;C=B+(g<<2)|0;f[m+8>>2]=C;sj(B|0,0,D|0)|0;f[E>>2]=C;break}while(0);C=a+136|0;D=a+140|0;B=f[D>>2]|0;G=f[C>>2]|0;H=B-G>>2;L=G;G=B;if(H>>>0>=g>>>0){if(H>>>0>g>>>0?(B=L+(g<<2)|0,(B|0)!=(G|0)):0)f[D>>2]=G+(~((G+-4-B|0)>>>2)<<2)}else Ci(C,g-H|0);f[o>>2]=0;f[o+4>>2]=0;f[o+8>>2]=0;f[o+12>>2]=0;f[o+16>>2]=0;f[o+20>>2]=0;f[o+24>>2]=0;f[o+28>>2]=0;f[p>>2]=0;f[p+4>>2]=0;f[p+8>>2]=0;f[p+12>>2]=0;f[p+16>>2]=0;f[p+20>>2]=0;f[p+24>>2]=0;f[p+28>>2]=0;f[q>>2]=0;H=q+4|0;f[H>>2]=0;f[q+8>>2]=0;if(F){M=0;N=0;O=0;P=0}else{F=g<<2;B=ln(F)|0;f[q>>2]=B;G=B+(g<<2)|0;f[q+8>>2]=G;sj(B|0,0,F|0)|0;f[H>>2]=G;M=B;N=G;O=G;P=B}B=a+36|0;G=f[B>>2]|0;F=f[G+4>>2]|0;D=f[G>>2]|0;L=F-D|0;a:do if((L|0)>4){Q=L>>2;R=z+64|0;S=z+28|0;T=(g|0)>0;U=r+4|0;V=r+8|0;Z=r+12|0;_=a+136|0;$=a+96|0;aa=r+16|0;ba=r+28|0;ca=a+8|0;da=j+4|0;ea=k+4|0;fa=e+4|0;ga=r+28|0;ha=r+16|0;ia=r+20|0;ja=r+32|0;ka=n+1|0;la=g<<2;ma=(g|0)==1;na=Q+-1|0;if(F-D>>2>>>0>na>>>0){oa=Q;pa=na;qa=D;ra=P;sa=O;ta=M;ua=M;va=N;wa=M;xa=N}else{ya=G;aq(ya)}b:while(1){na=f[qa+(pa<<2)>>2]|0;Q=(((na>>>0)%3|0|0)==0?2:-1)+na|0;za=Q>>>5;Aa=1<<(Q&31);Ba=(na|0)==-1|(Q|0)==-1;Ca=1;Da=0;Ea=na;c:while(1){Fa=Ca^1;Ga=Da;Ha=Ea;while(1){if((Ha|0)==-1){Ia=Ga;break c}Ja=f[l+(Ga*12|0)>>2]|0;if(((f[(f[z>>2]|0)+(Ha>>>5<<2)>>2]&1<<(Ha&31)|0)==0?(Ka=f[(f[(f[R>>2]|0)+12>>2]|0)+(Ha<<2)>>2]|0,(Ka|0)!=-1):0)?(La=f[S>>2]|0,Ma=f[A>>2]|0,Na=f[Ma+(f[La+(Ka<<2)>>2]<<2)>>2]|0,Oa=Ka+1|0,Pa=f[Ma+(f[La+((((Oa>>>0)%3|0|0)==0?Ka+-2|0:Oa)<<2)>>2]<<2)>>2]|0,Oa=f[Ma+(f[La+((((Ka>>>0)%3|0|0)==0?2:-1)+Ka<<2)>>2]<<2)>>2]|0,(Na|0)<(pa|0)&(Pa|0)<(pa|0)&(Oa|0)<(pa|0)):0){Ka=X(Na,g)|0;Na=X(Pa,g)|0;Pa=X(Oa,g)|0;if(T){Oa=0;do{f[Ja+(Oa<<2)>>2]=(f[c+(Oa+Pa<<2)>>2]|0)+(f[c+(Oa+Na<<2)>>2]|0)-(f[c+(Oa+Ka<<2)>>2]|0);Oa=Oa+1|0}while((Oa|0)!=(g|0))}Oa=Ga+1|0;if((Oa|0)==4){Ia=4;break c}else Qa=Oa}else Qa=Ga;do if(Ca){Oa=Ha+1|0;Ka=((Oa>>>0)%3|0|0)==0?Ha+-2|0:Oa;if(((Ka|0)!=-1?(f[(f[z>>2]|0)+(Ka>>>5<<2)>>2]&1<<(Ka&31)|0)==0:0)?(Oa=f[(f[(f[R>>2]|0)+12>>2]|0)+(Ka<<2)>>2]|0,Ka=Oa+1|0,(Oa|0)!=-1):0)Ra=((Ka>>>0)%3|0|0)==0?Oa+-2|0:Ka;else Ra=-1}else{Ka=(((Ha>>>0)%3|0|0)==0?2:-1)+Ha|0;if(((Ka|0)!=-1?(f[(f[z>>2]|0)+(Ka>>>5<<2)>>2]&1<<(Ka&31)|0)==0:0)?(Oa=f[(f[(f[R>>2]|0)+12>>2]|0)+(Ka<<2)>>2]|0,(Oa|0)!=-1):0)if(!((Oa>>>0)%3|0)){Ra=Oa+2|0;break}else{Ra=Oa+-1|0;break}else Ra=-1}while(0);if((Ra|0)==(na|0)){Ia=Qa;break c}if((Ra|0)!=-1|Fa){Ga=Qa;Ha=Ra}else break}if(Ba){Ca=0;Da=Qa;Ea=-1;continue}if(f[(f[z>>2]|0)+(za<<2)>>2]&Aa|0){Ca=0;Da=Qa;Ea=-1;continue}Ha=f[(f[(f[R>>2]|0)+12>>2]|0)+(Q<<2)>>2]|0;if((Ha|0)==-1){Ca=0;Da=Qa;Ea=-1;continue}if(!((Ha>>>0)%3|0)){Ca=0;Da=Qa;Ea=Ha+2|0;continue}else{Ca=0;Da=Qa;Ea=Ha+-1|0;continue}}Ea=X(pa,g)|0;f[r>>2]=0;f[U>>2]=0;b[V>>0]=0;f[Z>>2]=0;f[Z+4>>2]=0;f[Z+8>>2]=0;f[Z+12>>2]=0;f[Z+16>>2]=0;f[Z+20>>2]=0;f[Z+24>>2]=0;Da=Ia+-1|0;Ca=p+(Da<<3)|0;Q=Ca;Aa=Vn(f[Q>>2]|0,f[Q+4>>2]|0,Ia|0,((Ia|0)<0)<<31>>31|0)|0;Q=I;za=Ca;f[za>>2]=Aa;f[za+4>>2]=Q;za=c+((X(oa+-2|0,g)|0)<<2)|0;Ca=c+(Ea<<2)|0;Ba=f[_>>2]|0;if(T){na=0;Ha=0;while(1){Ga=(f[za+(na<<2)>>2]|0)-(f[Ca+(na<<2)>>2]|0)|0;Fa=((Ga|0)>-1?Ga:0-Ga|0)+Ha|0;f[ta+(na<<2)>>2]=Ga;f[Ba+(na<<2)>>2]=Ga<<1^Ga>>31;na=na+1|0;if((na|0)==(g|0)){Sa=Fa;break}else Ha=Fa}}else Sa=0;mo(e,$,Ba,g);Ha=Zk(e)|0;na=I;Fa=Bm(e)|0;Ga=I;Oa=o+(Da<<3)|0;Ka=Oa;Na=f[Ka>>2]|0;Pa=f[Ka+4>>2]|0;Ta=+wm(Aa,Na);Ka=Vn(Fa|0,Ga|0,Ha|0,na|0)|0;Ua=+(Aa>>>0)+4294967296.0*+(Q|0);Va=+W(+(Ta*Ua));na=Vn(Ka|0,I|0,~~Va>>>0|0,(+K(Va)>=1.0?(Va>0.0?~~+Y(+J(Va/4294967296.0),4294967295.0)>>>0:~~+W((Va-+(~~Va>>>0))/4294967296.0)>>>0):0)|0)|0;Ka=r;f[Ka>>2]=na;f[Ka+4>>2]=Sa;b[V>>0]=0;f[Z>>2]=0;$f(aa,za,za+(g<<2)|0);f[s>>2]=ra;f[t>>2]=sa;f[j>>2]=f[s>>2];f[e>>2]=f[t>>2];Jf(ba,j,e);if((Ia|0)<1){Wa=xa;Xa=wa;Ya=va;Za=ua;_a=sa;$a=ra;ab=ra}else{Ka=n+Ia|0;na=f[q>>2]|0;Ha=na;Ga=f[H>>2]|0;Fa=Ka+-1|0;Ja=(Fa|0)==(n|0);La=Ka+-2|0;Ma=ka>>>0>>0;bb=~Ia;cb=Ia+2+((bb|0)>-2?bb:-2)|0;bb=Ga;db=Fa>>>0>n>>>0;eb=0;fb=1;while(1){eb=eb+1|0;sj(n|0,1,cb|0)|0;sj(n|0,0,eb|0)|0;gb=Vn(Na|0,Pa|0,fb|0,0)|0;d:while(1){if(T){sj(f[m>>2]|0,0,la|0)|0;hb=f[m>>2]|0;ib=0;jb=0;while(1){if(!(b[n+ib>>0]|0)){kb=f[l+(ib*12|0)>>2]|0;lb=0;do{mb=hb+(lb<<2)|0;f[mb>>2]=(f[mb>>2]|0)+(f[kb+(lb<<2)>>2]|0);lb=lb+1|0}while((lb|0)!=(g|0));nb=(1<>0]|0))pb=(1<>2]|0;do if(T){f[ib>>2]=(f[ib>>2]|0)/(fb|0)|0;if(!ma){jb=1;do{hb=ib+(jb<<2)|0;f[hb>>2]=(f[hb>>2]|0)/(fb|0)|0;jb=jb+1|0}while((jb|0)!=(g|0));jb=f[_>>2]|0;if(T)qb=jb;else{rb=0;sb=jb;break}}else qb=f[_>>2]|0;jb=0;hb=0;while(1){lb=(f[ib+(jb<<2)>>2]|0)-(f[Ca+(jb<<2)>>2]|0)|0;kb=((lb|0)>-1?lb:0-lb|0)+hb|0;f[na+(jb<<2)>>2]=lb;f[qb+(jb<<2)>>2]=lb<<1^lb>>31;jb=jb+1|0;if((jb|0)==(g|0)){rb=kb;sb=qb;break}else hb=kb}}else{rb=0;sb=f[_>>2]|0}while(0);mo(e,$,sb,g);ib=Zk(e)|0;hb=I;jb=Bm(e)|0;kb=I;Va=+wm(Aa,gb);lb=Vn(jb|0,kb|0,ib|0,hb|0)|0;Ta=+W(+(Va*Ua));hb=Vn(lb|0,I|0,~~Ta>>>0|0,(+K(Ta)>=1.0?(Ta>0.0?~~+Y(+J(Ta/4294967296.0),4294967295.0)>>>0:~~+W((Ta-+(~~Ta>>>0))/4294967296.0)>>>0):0)|0)|0;lb=f[r>>2]|0;if(!((lb|0)<=(hb|0)?!((lb|0)>=(hb|0)?(rb|0)<(f[U>>2]|0):0):0)){lb=r;f[lb>>2]=hb;f[lb+4>>2]=rb;b[V>>0]=ob;f[Z>>2]=fb;f[v>>2]=f[m>>2];f[w>>2]=f[E>>2];f[j>>2]=f[v>>2];f[e>>2]=f[w>>2];Jf(aa,j,e);f[x>>2]=Ha;f[y>>2]=Ga;f[j>>2]=f[x>>2];f[e>>2]=f[y>>2];Jf(ba,j,e)}if(Ja)break;tb=b[Fa>>0]|0;lb=-1;hb=tb;while(1){ib=lb+-1|0;ub=Ka+ib|0;kb=hb;hb=b[ub>>0]|0;if((hb&255)<(kb&255))break;if((ub|0)==(n|0)){vb=84;break d}else lb=ib}ib=Ka+lb|0;if((hb&255)<(tb&255)){wb=Fa;xb=tb}else{kb=Ka;jb=Fa;while(1){mb=jb+-1|0;if((hb&255)<(h[kb+-2>>0]|0)){wb=mb;xb=1;break}else{yb=jb;jb=mb;kb=yb}}}b[ub>>0]=xb;b[wb>>0]=hb;if((lb|0)<-1){zb=ib;Ab=Fa}else continue;while(1){kb=b[zb>>0]|0;b[zb>>0]=b[Ab>>0]|0;b[Ab>>0]=kb;kb=zb+1|0;jb=Ab+-1|0;if(kb>>>0>>0){zb=kb;Ab=jb}else continue d}}if(((vb|0)==84?(vb=0,db):0)?(gb=b[n>>0]|0,b[n>>0]=tb,b[Fa>>0]=gb,Ma):0){gb=La;ib=ka;do{lb=b[ib>>0]|0;b[ib>>0]=b[gb>>0]|0;b[gb>>0]=lb;ib=ib+1|0;gb=gb+-1|0}while(ib>>>0>>0)}if((fb|0)>=(Ia|0)){Wa=bb;Xa=na;Ya=bb;Za=na;_a=Ga;$a=Ha;ab=na;break}else fb=fb+1|0}}fb=f[Z>>2]|0;na=Vn(Na|0,Pa|0,fb|0,((fb|0)<0)<<31>>31|0)|0;fb=Oa;f[fb>>2]=na;f[fb+4>>2]=I;if(T){fb=f[ba>>2]|0;na=f[C>>2]|0;Ha=0;do{Ga=f[fb+(Ha<<2)>>2]|0;f[na+(Ha<<2)>>2]=Ga<<1^Ga>>31;Ha=Ha+1|0}while((Ha|0)!=(g|0));Bb=na}else Bb=f[C>>2]|0;lo(e,$,Bb,g);if((Ia|0)>0){Cb=a+40+(Da*12|0)|0;na=a+40+(Da*12|0)+4|0;Ha=a+40+(Da*12|0)+8|0;fb=0;do{Oa=f[na>>2]|0;Pa=f[Ha>>2]|0;Na=(Oa|0)==(Pa<<5|0);if(!(1<>0])){if(Na){if((Oa+1|0)<0){vb=95;break b}Ga=Pa<<6;bb=Oa+32&-32;vi(Cb,Oa>>>0<1073741823?(Ga>>>0>>0?bb:Ga):2147483647);Db=f[na>>2]|0}else Db=Oa;f[na>>2]=Db+1;Ga=(f[Cb>>2]|0)+(Db>>>5<<2)|0;f[Ga>>2]=f[Ga>>2]|1<<(Db&31)}else{if(Na){if((Oa+1|0)<0){vb=100;break b}Na=Pa<<6;Pa=Oa+32&-32;vi(Cb,Oa>>>0<1073741823?(Na>>>0>>0?Pa:Na):2147483647);Eb=f[na>>2]|0}else Eb=Oa;f[na>>2]=Eb+1;Oa=(f[Cb>>2]|0)+(Eb>>>5<<2)|0;f[Oa>>2]=f[Oa>>2]&~(1<<(Eb&31))}fb=fb+1|0}while((fb|0)<(Ia|0))}fb=f[aa>>2]|0;na=d+(Ea<<2)|0;Ha=f[Ca+4>>2]|0;Da=f[fb>>2]|0;Oa=f[fb+4>>2]|0;f[j>>2]=f[Ca>>2];f[da>>2]=Ha;f[k>>2]=Da;f[ea>>2]=Oa;Od(e,ca,j,k);f[na>>2]=f[e>>2];f[na+4>>2]=f[fa>>2];na=f[ga>>2]|0;if(na|0){Oa=f[ja>>2]|0;if((Oa|0)!=(na|0))f[ja>>2]=Oa+(~((Oa+-4-na|0)>>>2)<<2);Oq(na)}na=f[ha>>2]|0;if(na|0){Oa=f[ia>>2]|0;if((Oa|0)!=(na|0))f[ia>>2]=Oa+(~((Oa+-4-na|0)>>>2)<<2);Oq(na)}if((oa|0)<=2){Fb=Za;Gb=Ya;break a}na=f[B>>2]|0;qa=f[na>>2]|0;Oa=pa+-1|0;if((f[na+4>>2]|0)-qa>>2>>>0<=Oa>>>0){ya=na;vb=18;break}else{na=pa;pa=Oa;ra=$a;sa=_a;ta=ab;ua=Za;va=Ya;wa=Xa;xa=Wa;oa=na}}if((vb|0)==18)aq(ya);else if((vb|0)==95)aq(Cb);else if((vb|0)==100)aq(Cb)}else{Fb=M;Gb=N}while(0);if((g|0)>0)sj(f[l>>2]|0,0,g<<2|0)|0;g=f[l>>2]|0;N=f[c+4>>2]|0;M=f[g>>2]|0;Cb=f[g+4>>2]|0;f[j>>2]=f[c>>2];f[j+4>>2]=N;f[k>>2]=M;f[k+4>>2]=Cb;Od(e,a+8|0,j,k);f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];if(Fb|0){if((Gb|0)!=(Fb|0))f[H>>2]=Gb+(~((Gb+-4-Fb|0)>>>2)<<2);Oq(Fb)}Fb=f[m>>2]|0;if(Fb|0){m=f[E>>2]|0;if((m|0)!=(Fb|0))f[E>>2]=m+(~((m+-4-Fb|0)>>>2)<<2);Oq(Fb)}Fb=f[l+36>>2]|0;if(Fb|0){m=l+40|0;E=f[m>>2]|0;if((E|0)!=(Fb|0))f[m>>2]=E+(~((E+-4-Fb|0)>>>2)<<2);Oq(Fb)}Fb=f[l+24>>2]|0;if(Fb|0){E=l+28|0;m=f[E>>2]|0;if((m|0)!=(Fb|0))f[E>>2]=m+(~((m+-4-Fb|0)>>>2)<<2);Oq(Fb)}Fb=f[l+12>>2]|0;if(Fb|0){m=l+16|0;E=f[m>>2]|0;if((E|0)!=(Fb|0))f[m>>2]=E+(~((E+-4-Fb|0)>>>2)<<2);Oq(Fb)}Fb=f[l>>2]|0;if(!Fb){u=i;return 1}E=l+4|0;l=f[E>>2]|0;if((l|0)!=(Fb|0))f[E>>2]=l+(~((l+-4-Fb|0)>>>2)<<2);Oq(Fb);u=i;return 1}function eb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0;c=u;u=u+32|0;d=c+16|0;e=c+4|0;g=c;f[a+36>>2]=b;h=a+24|0;i=a+28|0;j=f[i>>2]|0;k=f[h>>2]|0;l=j-k>>2;m=k;k=j;if(l>>>0>=b>>>0){if(l>>>0>b>>>0?(j=m+(b<<2)|0,(j|0)!=(k|0)):0)f[i>>2]=k+(~((k+-4-j|0)>>>2)<<2)}else Ch(h,b-l|0,6140);f[d>>2]=0;l=d+4|0;f[l>>2]=0;j=d+8|0;f[j>>2]=0;if(b){if((b|0)<0)aq(d);k=((b+-1|0)>>>5)+1|0;m=ln(k<<2)|0;f[d>>2]=m;f[j>>2]=k;f[l>>2]=b;k=b>>>5;sj(m|0,0,k<<2|0)|0;n=b&31;o=m+(k<<2)|0;k=m;if(!n){p=b;q=k;r=m}else{f[o>>2]=f[o>>2]&~(-1>>>(32-n|0));p=b;q=k;r=m}}else{p=0;q=0;r=0}m=a+4|0;k=f[a>>2]|0;n=(f[m>>2]|0)-k|0;o=n>>2;f[e>>2]=0;s=e+4|0;f[s>>2]=0;t=e+8|0;f[t>>2]=0;do if(o){if((n|0)<0)aq(e);v=((o+-1|0)>>>5)+1|0;w=ln(v<<2)|0;f[e>>2]=w;f[t>>2]=v;f[s>>2]=o;v=o>>>5;sj(w|0,0,v<<2|0)|0;x=o&31;y=w+(v<<2)|0;if(x|0)f[y>>2]=f[y>>2]&~(-1>>>(32-x|0));if(o>>>0>2){x=a+12|0;y=a+32|0;v=a+52|0;w=a+56|0;z=a+48|0;A=b;B=k;C=0;D=q;E=r;a:while(1){F=B;G=C*3|0;if((G|0)!=-1){H=f[F+(G<<2)>>2]|0;I=G+1|0;J=((I>>>0)%3|0|0)==0?G+-2|0:I;if((J|0)==-1)K=-1;else K=f[F+(J<<2)>>2]|0;J=(((G>>>0)%3|0|0)==0?2:-1)+G|0;if((J|0)==-1)L=-1;else L=f[F+(J<<2)>>2]|0;if((H|0)!=(K|0)?!((H|0)==(L|0)|(K|0)==(L|0)):0){H=0;J=A;F=E;I=D;while(1){M=H+G|0;if(!(f[(f[e>>2]|0)+(M>>>5<<2)>>2]&1<<(M&31))){N=f[(f[a>>2]|0)+(M<<2)>>2]|0;f[g>>2]=N;if(!(f[F+(N>>>5<<2)>>2]&1<<(N&31))){O=0;P=J;Q=N}else{N=f[i>>2]|0;if((N|0)==(f[y>>2]|0))Ri(h,6140);else{f[N>>2]=-1;f[i>>2]=N+4}N=f[v>>2]|0;if((N|0)==(f[w>>2]|0))Ri(z,g);else{f[N>>2]=f[g>>2];f[v>>2]=N+4}N=f[l>>2]|0;R=f[j>>2]|0;if((N|0)==(R<<5|0)){if((N+1|0)<0){S=50;break a}T=R<<6;R=N+32&-32;vi(d,N>>>0<1073741823?(T>>>0>>0?R:T):2147483647);U=f[l>>2]|0}else U=N;f[l>>2]=U+1;N=(f[d>>2]|0)+(U>>>5<<2)|0;f[N>>2]=f[N>>2]&~(1<<(U&31));f[g>>2]=J;O=1;P=J+1|0;Q=J}N=f[d>>2]|0;T=N+(Q>>>5<<2)|0;f[T>>2]=f[T>>2]|1<<(Q&31);T=N;b:do if(O){R=M;while(1){if((R|0)==-1){S=64;break b}V=(f[e>>2]|0)+(R>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(R&31);V=f[g>>2]|0;f[(f[h>>2]|0)+(V<<2)>>2]=R;f[(f[a>>2]|0)+(R<<2)>>2]=V;V=R+1|0;W=((V>>>0)%3|0|0)==0?R+-2|0:V;do if((W|0)==-1)X=-1;else{V=f[(f[x>>2]|0)+(W<<2)>>2]|0;Y=V+1|0;if((V|0)==-1){X=-1;break}X=((Y>>>0)%3|0|0)==0?V+-2|0:Y}while(0);if((X|0)==(M|0))break;else R=X}}else{R=M;while(1){if((R|0)==-1){S=64;break b}W=(f[e>>2]|0)+(R>>>5<<2)|0;f[W>>2]=f[W>>2]|1<<(R&31);f[(f[h>>2]|0)+(f[g>>2]<<2)>>2]=R;W=R+1|0;Y=((W>>>0)%3|0|0)==0?R+-2|0:W;do if((Y|0)==-1)Z=-1;else{W=f[(f[x>>2]|0)+(Y<<2)>>2]|0;V=W+1|0;if((W|0)==-1){Z=-1;break}Z=((V>>>0)%3|0|0)==0?W+-2|0:V}while(0);if((Z|0)==(M|0))break;else R=Z}}while(0);c:do if((S|0)==64){S=0;if((M|0)==-1)break;R=(((M>>>0)%3|0|0)==0?2:-1)+M|0;if((R|0)==-1)break;Y=f[(f[x>>2]|0)+(R<<2)>>2]|0;if((Y|0)==-1)break;R=Y+(((Y>>>0)%3|0|0)==0?2:-1)|0;if((R|0)==-1)break;if(!O){Y=R;while(1){V=(f[e>>2]|0)+(Y>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(Y&31);V=(((Y>>>0)%3|0|0)==0?2:-1)+Y|0;if((V|0)==-1)break c;W=f[(f[x>>2]|0)+(V<<2)>>2]|0;if((W|0)==-1)break c;Y=W+(((W>>>0)%3|0|0)==0?2:-1)|0;if((Y|0)==-1)break c}}Y=f[a>>2]|0;W=R;do{V=(f[e>>2]|0)+(W>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(W&31);f[Y+(W<<2)>>2]=f[g>>2];V=(((W>>>0)%3|0|0)==0?2:-1)+W|0;if((V|0)==-1)break c;_=f[(f[x>>2]|0)+(V<<2)>>2]|0;if((_|0)==-1)break c;W=_+(((_>>>0)%3|0|0)==0?2:-1)|0}while((W|0)!=-1)}while(0);$=P;aa=T;ba=N}else{$=J;aa=I;ba=F}if((H|0)<2){H=H+1|0;J=$;F=ba;I=aa}else{ca=$;da=aa;ea=ba;break}}}else{ca=A;da=D;ea=E}}else{ca=A;da=D;ea=E}C=C+1|0;B=f[a>>2]|0;if(C>>>0>=(((f[m>>2]|0)-B>>2>>>0)/3|0)>>>0){S=18;break}else{A=ca;D=da;E=ea}}if((S|0)==18){fa=da;ga=f[l>>2]|0;break}else if((S|0)==50)aq(d)}else{fa=q;ga=p}}else{fa=q;ga=p}while(0);p=a+44|0;f[p>>2]=0;a=fa;fa=ga>>>5;q=a+(fa<<2)|0;S=ga&31;ga=(fa|0)!=0;d:do if(fa|S|0)if(!S){l=a;da=0;ea=ga;while(1){e:do if(ea){if(!(f[l>>2]&1)){ca=da+1|0;f[p>>2]=ca;ha=ca}else ha=da;if(!(f[l>>2]&2)){ca=ha+1|0;f[p>>2]=ca;ia=ca}else ia=ha;if(!(f[l>>2]&4)){ca=ia+1|0;f[p>>2]=ca;ja=ca}else ja=ia;if(!(f[l>>2]&8)){ca=ja+1|0;f[p>>2]=ca;ka=ca}else ka=ja;if(!(f[l>>2]&16)){ca=ka+1|0;f[p>>2]=ca;la=ca}else la=ka;if(!(f[l>>2]&32)){ca=la+1|0;f[p>>2]=ca;ma=ca}else ma=la;if(!(f[l>>2]&64)){ca=ma+1|0;f[p>>2]=ca;na=ca}else na=ma;if(!(f[l>>2]&128)){ca=na+1|0;f[p>>2]=ca;oa=ca}else oa=na;if(!(f[l>>2]&256)){ca=oa+1|0;f[p>>2]=ca;pa=ca}else pa=oa;if(!(f[l>>2]&512)){ca=pa+1|0;f[p>>2]=ca;qa=ca}else qa=pa;if(!(f[l>>2]&1024)){ca=qa+1|0;f[p>>2]=ca;ra=ca}else ra=qa;if(!(f[l>>2]&2048)){ca=ra+1|0;f[p>>2]=ca;sa=ca}else sa=ra;if(!(f[l>>2]&4096)){ca=sa+1|0;f[p>>2]=ca;ta=ca}else ta=sa;if(!(f[l>>2]&8192)){ca=ta+1|0;f[p>>2]=ca;ua=ca}else ua=ta;if(!(f[l>>2]&16384)){ca=ua+1|0;f[p>>2]=ca;va=ca}else va=ua;if(!(f[l>>2]&32768)){ca=va+1|0;f[p>>2]=ca;wa=ca}else wa=va;if(!(f[l>>2]&65536)){ca=wa+1|0;f[p>>2]=ca;xa=ca}else xa=wa;if(!(f[l>>2]&131072)){ca=xa+1|0;f[p>>2]=ca;ya=ca}else ya=xa;if(!(f[l>>2]&262144)){ca=ya+1|0;f[p>>2]=ca;za=ca}else za=ya;if(!(f[l>>2]&524288)){ca=za+1|0;f[p>>2]=ca;Aa=ca}else Aa=za;if(!(f[l>>2]&1048576)){ca=Aa+1|0;f[p>>2]=ca;Ba=ca}else Ba=Aa;if(!(f[l>>2]&2097152)){ca=Ba+1|0;f[p>>2]=ca;Ca=ca}else Ca=Ba;if(!(f[l>>2]&4194304)){ca=Ca+1|0;f[p>>2]=ca;Da=ca}else Da=Ca;if(!(f[l>>2]&8388608)){ca=Da+1|0;f[p>>2]=ca;Ea=ca}else Ea=Da;if(!(f[l>>2]&16777216)){ca=Ea+1|0;f[p>>2]=ca;Fa=ca}else Fa=Ea;if(!(f[l>>2]&33554432)){ca=Fa+1|0;f[p>>2]=ca;Ga=ca}else Ga=Fa;if(!(f[l>>2]&67108864)){ca=Ga+1|0;f[p>>2]=ca;Ha=ca}else Ha=Ga;if(!(f[l>>2]&134217728)){ca=Ha+1|0;f[p>>2]=ca;Ia=ca}else Ia=Ha;if(!(f[l>>2]&268435456)){ca=Ia+1|0;f[p>>2]=ca;Ja=ca}else Ja=Ia;if(!(f[l>>2]&536870912)){ca=Ja+1|0;f[p>>2]=ca;Ka=ca}else Ka=Ja;if(!(f[l>>2]&1073741824)){ca=Ka+1|0;f[p>>2]=ca;La=ca}else La=Ka;if((f[l>>2]|0)<=-1){Ma=La;break}ca=La+1|0;f[p>>2]=ca;Ma=ca}else{ca=0;m=da;while(1){if(!(f[l>>2]&1<>2]=ba;Na=ba}else Na=m;if((ca|0)==31){Ma=Na;break e}ca=ca+1|0;if(!ca)break d;else m=Na}}while(0);l=l+4|0;if((q|0)==(l|0))break;else{da=Ma;ea=1}}}else{if(ga){ea=0;da=a;l=0;while(1){if(!(f[da>>2]&1)){m=l+1|0;f[p>>2]=m;Oa=m;Pa=m}else{Oa=l;Pa=ea}if(!(f[da>>2]&2)){m=Oa+1|0;f[p>>2]=m;Qa=m;Ra=m}else{Qa=Oa;Ra=Pa}if(!(f[da>>2]&4)){m=Qa+1|0;f[p>>2]=m;Sa=m;Ta=m}else{Sa=Qa;Ta=Ra}if(!(f[da>>2]&8)){m=Sa+1|0;f[p>>2]=m;Ua=m;Va=m}else{Ua=Sa;Va=Ta}if(!(f[da>>2]&16)){m=Ua+1|0;f[p>>2]=m;Wa=m;Xa=m}else{Wa=Ua;Xa=Va}if(!(f[da>>2]&32)){m=Wa+1|0;f[p>>2]=m;Ya=m;Za=m}else{Ya=Wa;Za=Xa}if(!(f[da>>2]&64)){m=Ya+1|0;f[p>>2]=m;_a=m;$a=m}else{_a=Ya;$a=Za}if(!(f[da>>2]&128)){m=_a+1|0;f[p>>2]=m;ab=m;bb=m}else{ab=_a;bb=$a}if(!(f[da>>2]&256)){m=ab+1|0;f[p>>2]=m;cb=m;db=m}else{cb=ab;db=bb}if(!(f[da>>2]&512)){m=cb+1|0;f[p>>2]=m;eb=m;fb=m}else{eb=cb;fb=db}if(!(f[da>>2]&1024)){m=eb+1|0;f[p>>2]=m;gb=m;hb=m}else{gb=eb;hb=fb}if(!(f[da>>2]&2048)){m=gb+1|0;f[p>>2]=m;ib=m;jb=m}else{ib=gb;jb=hb}if(!(f[da>>2]&4096)){m=ib+1|0;f[p>>2]=m;kb=m;lb=m}else{kb=ib;lb=jb}if(!(f[da>>2]&8192)){m=kb+1|0;f[p>>2]=m;mb=m;nb=m}else{mb=kb;nb=lb}if(!(f[da>>2]&16384)){m=mb+1|0;f[p>>2]=m;ob=m;pb=m}else{ob=mb;pb=nb}if(!(f[da>>2]&32768)){m=ob+1|0;f[p>>2]=m;qb=m;rb=m}else{qb=ob;rb=pb}if(!(f[da>>2]&65536)){m=qb+1|0;f[p>>2]=m;sb=m;tb=m}else{sb=qb;tb=rb}if(!(f[da>>2]&131072)){m=sb+1|0;f[p>>2]=m;ub=m;vb=m}else{ub=sb;vb=tb}if(!(f[da>>2]&262144)){m=ub+1|0;f[p>>2]=m;wb=m;xb=m}else{wb=ub;xb=vb}if(!(f[da>>2]&524288)){m=wb+1|0;f[p>>2]=m;yb=m;zb=m}else{yb=wb;zb=xb}if(!(f[da>>2]&1048576)){m=yb+1|0;f[p>>2]=m;Ab=m;Bb=m}else{Ab=yb;Bb=zb}if(!(f[da>>2]&2097152)){m=Ab+1|0;f[p>>2]=m;Cb=m;Db=m}else{Cb=Ab;Db=Bb}if(!(f[da>>2]&4194304)){m=Cb+1|0;f[p>>2]=m;Eb=m;Fb=m}else{Eb=Cb;Fb=Db}if(!(f[da>>2]&8388608)){m=Eb+1|0;f[p>>2]=m;Gb=m;Hb=m}else{Gb=Eb;Hb=Fb}if(!(f[da>>2]&16777216)){m=Gb+1|0;f[p>>2]=m;Ib=m;Jb=m}else{Ib=Gb;Jb=Hb}if(!(f[da>>2]&33554432)){m=Ib+1|0;f[p>>2]=m;Kb=m;Lb=m}else{Kb=Ib;Lb=Jb}if(!(f[da>>2]&67108864)){m=Kb+1|0;f[p>>2]=m;Mb=m;Nb=m}else{Mb=Kb;Nb=Lb}if(!(f[da>>2]&134217728)){m=Mb+1|0;f[p>>2]=m;Ob=m;Pb=m}else{Ob=Mb;Pb=Nb}if(!(f[da>>2]&268435456)){m=Ob+1|0;f[p>>2]=m;Qb=m;Rb=m}else{Qb=Ob;Rb=Pb}if(!(f[da>>2]&536870912)){m=Qb+1|0;f[p>>2]=m;Sb=m;Tb=m}else{Sb=Qb;Tb=Rb}if(!(f[da>>2]&1073741824)){m=Sb+1|0;f[p>>2]=m;Ub=m;Vb=m}else{Ub=Sb;Vb=Tb}if((f[da>>2]|0)>-1){m=Ub+1|0;f[p>>2]=m;Wb=m;Xb=m}else{Wb=Ub;Xb=Vb}m=da+4|0;if((q|0)==(m|0)){Yb=m;Zb=Xb;break}else{ea=Xb;da=m;l=Wb}}}else{Yb=a;Zb=0}l=0;da=Zb;while(1){if(!(f[Yb>>2]&1<>2]=ea;_b=ea}else _b=da;l=l+1|0;if((l|0)==(S|0))break;else da=_b}}while(0);_b=f[e>>2]|0;if(_b|0)Oq(_b);_b=f[d>>2]|0;if(!_b){u=c;return 1}Oq(_b);u=c;return 1}function fb(a,c,d,e,g,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0.0,Ua=0.0,Va=0.0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0;i=u;u=u+256|0;e=i+104|0;j=i+240|0;k=i+224|0;l=i+160|0;m=i+140|0;n=i+248|0;o=i+72|0;p=i+40|0;q=i+128|0;r=i;s=i+232|0;t=i+220|0;v=i+216|0;w=i+212|0;x=i+208|0;y=i+152|0;z=f[a+28>>2]|0;A=f[a+32>>2]|0;B=l;C=B+48|0;do{f[B>>2]=0;B=B+4|0}while((B|0)<(C|0));if(!g){D=0;E=0}else{Ci(l,g);D=f[l+12>>2]|0;E=f[l+16>>2]|0}B=l+16|0;C=E-D>>2;F=D;D=E;if(C>>>0>=g>>>0){if(C>>>0>g>>>0?(E=F+(g<<2)|0,(E|0)!=(D|0)):0)f[B>>2]=D+(~((D+-4-E|0)>>>2)<<2)}else Ci(l+12|0,g-C|0);C=l+24|0;E=l+28|0;D=f[E>>2]|0;B=f[C>>2]|0;F=D-B>>2;G=B;B=D;if(F>>>0>=g>>>0){if(F>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[E>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else Ci(C,g-F|0);F=l+36|0;C=l+40|0;D=f[C>>2]|0;B=f[F>>2]|0;E=D-B>>2;G=B;B=D;if(E>>>0>=g>>>0){if(E>>>0>g>>>0?(D=G+(g<<2)|0,(D|0)!=(B|0)):0)f[C>>2]=B+(~((B+-4-D|0)>>>2)<<2)}else Ci(F,g-E|0);f[m>>2]=0;E=m+4|0;f[E>>2]=0;f[m+8>>2]=0;F=(g|0)==0;do if(!F)if(g>>>0>1073741823)aq(m);else{D=g<<2;B=ln(D)|0;f[m>>2]=B;C=B+(g<<2)|0;f[m+8>>2]=C;sj(B|0,0,D|0)|0;f[E>>2]=C;break}while(0);C=a+136|0;D=a+140|0;B=f[D>>2]|0;G=f[C>>2]|0;H=B-G>>2;L=G;G=B;if(H>>>0>=g>>>0){if(H>>>0>g>>>0?(B=L+(g<<2)|0,(B|0)!=(G|0)):0)f[D>>2]=G+(~((G+-4-B|0)>>>2)<<2)}else Ci(C,g-H|0);f[o>>2]=0;f[o+4>>2]=0;f[o+8>>2]=0;f[o+12>>2]=0;f[o+16>>2]=0;f[o+20>>2]=0;f[o+24>>2]=0;f[o+28>>2]=0;f[p>>2]=0;f[p+4>>2]=0;f[p+8>>2]=0;f[p+12>>2]=0;f[p+16>>2]=0;f[p+20>>2]=0;f[p+24>>2]=0;f[p+28>>2]=0;f[q>>2]=0;H=q+4|0;f[H>>2]=0;f[q+8>>2]=0;if(F){M=0;N=0;O=0;P=0}else{F=g<<2;B=ln(F)|0;f[q>>2]=B;G=B+(g<<2)|0;f[q+8>>2]=G;sj(B|0,0,F|0)|0;f[H>>2]=G;M=B;N=G;O=G;P=B}B=a+36|0;G=f[B>>2]|0;F=f[G+4>>2]|0;D=f[G>>2]|0;L=F-D|0;a:do if((L|0)>4){Q=L>>2;R=z+12|0;S=(g|0)>0;T=r+4|0;U=r+8|0;V=r+12|0;Z=a+136|0;_=a+96|0;$=r+16|0;aa=r+28|0;ba=a+8|0;ca=j+4|0;da=k+4|0;ea=e+4|0;fa=r+28|0;ga=r+16|0;ha=r+20|0;ia=r+32|0;ja=n+1|0;ka=g<<2;la=(g|0)==1;ma=Q+-1|0;if(F-D>>2>>>0>ma>>>0){na=Q;oa=ma;pa=P;qa=O;ra=M;sa=M;ta=N;ua=M;va=N;wa=D}else{xa=G;aq(xa)}b:while(1){ma=f[wa+(oa<<2)>>2]|0;Q=(((ma>>>0)%3|0|0)==0?2:-1)+ma|0;ya=(ma|0)==-1|(Q|0)==-1;za=1;Aa=0;Ba=ma;c:while(1){Ca=za^1;Da=Aa;Ea=Ba;while(1){if((Ea|0)==-1){Fa=Da;break c}Ga=f[l+(Da*12|0)>>2]|0;Ha=f[R>>2]|0;Ia=f[Ha+(Ea<<2)>>2]|0;if((Ia|0)!=-1){Ja=f[z>>2]|0;Ka=f[A>>2]|0;La=f[Ka+(f[Ja+(Ia<<2)>>2]<<2)>>2]|0;Ma=Ia+1|0;Na=((Ma>>>0)%3|0|0)==0?Ia+-2|0:Ma;if((Na|0)==-1)Oa=-1;else Oa=f[Ja+(Na<<2)>>2]|0;Na=f[Ka+(Oa<<2)>>2]|0;Ma=(((Ia>>>0)%3|0|0)==0?2:-1)+Ia|0;if((Ma|0)==-1)Pa=-1;else Pa=f[Ja+(Ma<<2)>>2]|0;Ma=f[Ka+(Pa<<2)>>2]|0;if((La|0)<(oa|0)&(Na|0)<(oa|0)&(Ma|0)<(oa|0)){Ka=X(La,g)|0;La=X(Na,g)|0;Na=X(Ma,g)|0;if(S){Ma=0;do{f[Ga+(Ma<<2)>>2]=(f[c+(Ma+Na<<2)>>2]|0)+(f[c+(Ma+La<<2)>>2]|0)-(f[c+(Ma+Ka<<2)>>2]|0);Ma=Ma+1|0}while((Ma|0)!=(g|0))}Ma=Da+1|0;if((Ma|0)==4){Fa=4;break c}else Qa=Ma}else Qa=Da}else Qa=Da;do if(za){Ma=Ea+1|0;Ka=((Ma>>>0)%3|0|0)==0?Ea+-2|0:Ma;if((Ka|0)!=-1?(Ma=f[Ha+(Ka<<2)>>2]|0,Ka=Ma+1|0,(Ma|0)!=-1):0)Ra=((Ka>>>0)%3|0|0)==0?Ma+-2|0:Ka;else Ra=-1}else{Ka=(((Ea>>>0)%3|0|0)==0?2:-1)+Ea|0;if((Ka|0)!=-1?(Ma=f[Ha+(Ka<<2)>>2]|0,(Ma|0)!=-1):0)if(!((Ma>>>0)%3|0)){Ra=Ma+2|0;break}else{Ra=Ma+-1|0;break}else Ra=-1}while(0);if((Ra|0)==(ma|0)){Fa=Qa;break c}if((Ra|0)!=-1|Ca){Da=Qa;Ea=Ra}else break}if(ya){za=0;Aa=Qa;Ba=-1;continue}Ea=f[Ha+(Q<<2)>>2]|0;if((Ea|0)==-1){za=0;Aa=Qa;Ba=-1;continue}if(!((Ea>>>0)%3|0)){za=0;Aa=Qa;Ba=Ea+2|0;continue}else{za=0;Aa=Qa;Ba=Ea+-1|0;continue}}Ba=X(oa,g)|0;f[r>>2]=0;f[T>>2]=0;b[U>>0]=0;f[V>>2]=0;f[V+4>>2]=0;f[V+8>>2]=0;f[V+12>>2]=0;f[V+16>>2]=0;f[V+20>>2]=0;f[V+24>>2]=0;Aa=Fa+-1|0;za=p+(Aa<<3)|0;Q=za;ya=Vn(f[Q>>2]|0,f[Q+4>>2]|0,Fa|0,((Fa|0)<0)<<31>>31|0)|0;Q=I;ma=za;f[ma>>2]=ya;f[ma+4>>2]=Q;ma=c+((X(na+-2|0,g)|0)<<2)|0;za=c+(Ba<<2)|0;Ea=f[Z>>2]|0;if(S){Da=0;Ca=0;while(1){Ma=(f[ma+(Da<<2)>>2]|0)-(f[za+(Da<<2)>>2]|0)|0;Ka=((Ma|0)>-1?Ma:0-Ma|0)+Ca|0;f[ra+(Da<<2)>>2]=Ma;f[Ea+(Da<<2)>>2]=Ma<<1^Ma>>31;Da=Da+1|0;if((Da|0)==(g|0)){Sa=Ka;break}else Ca=Ka}}else Sa=0;mo(e,_,Ea,g);Ca=Zk(e)|0;Da=I;Ka=Bm(e)|0;Ma=I;La=o+(Aa<<3)|0;Na=La;Ga=f[Na>>2]|0;Ja=f[Na+4>>2]|0;Ta=+wm(ya,Ga);Na=Vn(Ka|0,Ma|0,Ca|0,Da|0)|0;Ua=+(ya>>>0)+4294967296.0*+(Q|0);Va=+W(+(Ta*Ua));Da=Vn(Na|0,I|0,~~Va>>>0|0,(+K(Va)>=1.0?(Va>0.0?~~+Y(+J(Va/4294967296.0),4294967295.0)>>>0:~~+W((Va-+(~~Va>>>0))/4294967296.0)>>>0):0)|0)|0;Na=r;f[Na>>2]=Da;f[Na+4>>2]=Sa;b[U>>0]=0;f[V>>2]=0;$f($,ma,ma+(g<<2)|0);f[s>>2]=pa;f[t>>2]=qa;f[j>>2]=f[s>>2];f[e>>2]=f[t>>2];Jf(aa,j,e);if((Fa|0)<1){Wa=va;Xa=ua;Ya=ta;Za=sa;_a=qa;$a=pa;ab=pa}else{Na=n+Fa|0;Da=f[q>>2]|0;Ca=Da;Ma=f[H>>2]|0;Ka=Na+-1|0;Ia=(Ka|0)==(n|0);bb=Na+-2|0;cb=ja>>>0>>0;db=~Fa;eb=Fa+2+((db|0)>-2?db:-2)|0;db=Ma;fb=Ka>>>0>n>>>0;gb=0;hb=1;while(1){gb=gb+1|0;sj(n|0,1,eb|0)|0;sj(n|0,0,gb|0)|0;ib=Vn(Ga|0,Ja|0,hb|0,0)|0;d:while(1){if(S){sj(f[m>>2]|0,0,ka|0)|0;jb=f[m>>2]|0;kb=0;lb=0;while(1){if(!(b[n+kb>>0]|0)){mb=f[l+(kb*12|0)>>2]|0;nb=0;do{ob=jb+(nb<<2)|0;f[ob>>2]=(f[ob>>2]|0)+(f[mb+(nb<<2)>>2]|0);nb=nb+1|0}while((nb|0)!=(g|0));pb=(1<>0]|0))rb=(1<>2]|0;do if(S){f[kb>>2]=(f[kb>>2]|0)/(hb|0)|0;if(!la){lb=1;do{jb=kb+(lb<<2)|0;f[jb>>2]=(f[jb>>2]|0)/(hb|0)|0;lb=lb+1|0}while((lb|0)!=(g|0));lb=f[Z>>2]|0;if(S)sb=lb;else{tb=0;ub=lb;break}}else sb=f[Z>>2]|0;lb=0;jb=0;while(1){nb=(f[kb+(lb<<2)>>2]|0)-(f[za+(lb<<2)>>2]|0)|0;mb=((nb|0)>-1?nb:0-nb|0)+jb|0;f[Da+(lb<<2)>>2]=nb;f[sb+(lb<<2)>>2]=nb<<1^nb>>31;lb=lb+1|0;if((lb|0)==(g|0)){tb=mb;ub=sb;break}else jb=mb}}else{tb=0;ub=f[Z>>2]|0}while(0);mo(e,_,ub,g);kb=Zk(e)|0;jb=I;lb=Bm(e)|0;mb=I;Va=+wm(ya,ib);nb=Vn(lb|0,mb|0,kb|0,jb|0)|0;Ta=+W(+(Va*Ua));jb=Vn(nb|0,I|0,~~Ta>>>0|0,(+K(Ta)>=1.0?(Ta>0.0?~~+Y(+J(Ta/4294967296.0),4294967295.0)>>>0:~~+W((Ta-+(~~Ta>>>0))/4294967296.0)>>>0):0)|0)|0;nb=f[r>>2]|0;if(!((nb|0)<=(jb|0)?!((nb|0)>=(jb|0)?(tb|0)<(f[T>>2]|0):0):0)){nb=r;f[nb>>2]=jb;f[nb+4>>2]=tb;b[U>>0]=qb;f[V>>2]=hb;f[v>>2]=f[m>>2];f[w>>2]=f[E>>2];f[j>>2]=f[v>>2];f[e>>2]=f[w>>2];Jf($,j,e);f[x>>2]=Ca;f[y>>2]=Ma;f[j>>2]=f[x>>2];f[e>>2]=f[y>>2];Jf(aa,j,e)}if(Ia)break;vb=b[Ka>>0]|0;nb=-1;jb=vb;while(1){kb=nb+-1|0;wb=Na+kb|0;mb=jb;jb=b[wb>>0]|0;if((jb&255)<(mb&255))break;if((wb|0)==(n|0)){xb=84;break d}else nb=kb}kb=Na+nb|0;if((jb&255)<(vb&255)){yb=Ka;zb=vb}else{mb=Na;lb=Ka;while(1){ob=lb+-1|0;if((jb&255)<(h[mb+-2>>0]|0)){yb=ob;zb=1;break}else{Ab=lb;lb=ob;mb=Ab}}}b[wb>>0]=zb;b[yb>>0]=jb;if((nb|0)<-1){Bb=kb;Cb=Ka}else continue;while(1){mb=b[Bb>>0]|0;b[Bb>>0]=b[Cb>>0]|0;b[Cb>>0]=mb;mb=Bb+1|0;lb=Cb+-1|0;if(mb>>>0>>0){Bb=mb;Cb=lb}else continue d}}if(((xb|0)==84?(xb=0,fb):0)?(ib=b[n>>0]|0,b[n>>0]=vb,b[Ka>>0]=ib,cb):0){ib=bb;kb=ja;do{nb=b[kb>>0]|0;b[kb>>0]=b[ib>>0]|0;b[ib>>0]=nb;kb=kb+1|0;ib=ib+-1|0}while(kb>>>0>>0)}if((hb|0)>=(Fa|0)){Wa=db;Xa=Da;Ya=db;Za=Da;_a=Ma;$a=Ca;ab=Da;break}else hb=hb+1|0}}hb=f[V>>2]|0;Da=Vn(Ga|0,Ja|0,hb|0,((hb|0)<0)<<31>>31|0)|0;hb=La;f[hb>>2]=Da;f[hb+4>>2]=I;if(S){hb=f[aa>>2]|0;Da=f[C>>2]|0;Ca=0;do{Ma=f[hb+(Ca<<2)>>2]|0;f[Da+(Ca<<2)>>2]=Ma<<1^Ma>>31;Ca=Ca+1|0}while((Ca|0)!=(g|0));Db=Da}else Db=f[C>>2]|0;lo(e,_,Db,g);if((Fa|0)>0){Eb=a+40+(Aa*12|0)|0;Da=a+40+(Aa*12|0)+4|0;Ca=a+40+(Aa*12|0)+8|0;hb=0;do{La=f[Da>>2]|0;Ja=f[Ca>>2]|0;Ga=(La|0)==(Ja<<5|0);if(!(1<>0])){if(Ga){if((La+1|0)<0){xb=95;break b}Ma=Ja<<6;db=La+32&-32;vi(Eb,La>>>0<1073741823?(Ma>>>0>>0?db:Ma):2147483647);Fb=f[Da>>2]|0}else Fb=La;f[Da>>2]=Fb+1;Ma=(f[Eb>>2]|0)+(Fb>>>5<<2)|0;f[Ma>>2]=f[Ma>>2]|1<<(Fb&31)}else{if(Ga){if((La+1|0)<0){xb=100;break b}Ga=Ja<<6;Ja=La+32&-32;vi(Eb,La>>>0<1073741823?(Ga>>>0>>0?Ja:Ga):2147483647);Gb=f[Da>>2]|0}else Gb=La;f[Da>>2]=Gb+1;La=(f[Eb>>2]|0)+(Gb>>>5<<2)|0;f[La>>2]=f[La>>2]&~(1<<(Gb&31))}hb=hb+1|0}while((hb|0)<(Fa|0))}hb=f[$>>2]|0;Da=d+(Ba<<2)|0;Ca=f[za+4>>2]|0;Aa=f[hb>>2]|0;La=f[hb+4>>2]|0;f[j>>2]=f[za>>2];f[ca>>2]=Ca;f[k>>2]=Aa;f[da>>2]=La;Od(e,ba,j,k);f[Da>>2]=f[e>>2];f[Da+4>>2]=f[ea>>2];Da=f[fa>>2]|0;if(Da|0){La=f[ia>>2]|0;if((La|0)!=(Da|0))f[ia>>2]=La+(~((La+-4-Da|0)>>>2)<<2);Oq(Da)}Da=f[ga>>2]|0;if(Da|0){La=f[ha>>2]|0;if((La|0)!=(Da|0))f[ha>>2]=La+(~((La+-4-Da|0)>>>2)<<2);Oq(Da)}if((na|0)<=2){Hb=Za;Ib=Ya;break a}Da=f[B>>2]|0;wa=f[Da>>2]|0;La=oa+-1|0;if((f[Da+4>>2]|0)-wa>>2>>>0<=La>>>0){xa=Da;xb=18;break}else{Da=oa;oa=La;pa=$a;qa=_a;ra=ab;sa=Za;ta=Ya;ua=Xa;va=Wa;na=Da}}if((xb|0)==18)aq(xa);else if((xb|0)==95)aq(Eb);else if((xb|0)==100)aq(Eb)}else{Hb=M;Ib=N}while(0);if((g|0)>0)sj(f[l>>2]|0,0,g<<2|0)|0;g=f[l>>2]|0;N=f[c+4>>2]|0;M=f[g>>2]|0;Eb=f[g+4>>2]|0;f[j>>2]=f[c>>2];f[j+4>>2]=N;f[k>>2]=M;f[k+4>>2]=Eb;Od(e,a+8|0,j,k);f[d>>2]=f[e>>2];f[d+4>>2]=f[e+4>>2];if(Hb|0){if((Ib|0)!=(Hb|0))f[H>>2]=Ib+(~((Ib+-4-Hb|0)>>>2)<<2);Oq(Hb)}Hb=f[m>>2]|0;if(Hb|0){m=f[E>>2]|0;if((m|0)!=(Hb|0))f[E>>2]=m+(~((m+-4-Hb|0)>>>2)<<2);Oq(Hb)}Hb=f[l+36>>2]|0;if(Hb|0){m=l+40|0;E=f[m>>2]|0;if((E|0)!=(Hb|0))f[m>>2]=E+(~((E+-4-Hb|0)>>>2)<<2);Oq(Hb)}Hb=f[l+24>>2]|0;if(Hb|0){E=l+28|0;m=f[E>>2]|0;if((m|0)!=(Hb|0))f[E>>2]=m+(~((m+-4-Hb|0)>>>2)<<2);Oq(Hb)}Hb=f[l+12>>2]|0;if(Hb|0){m=l+16|0;E=f[m>>2]|0;if((E|0)!=(Hb|0))f[m>>2]=E+(~((E+-4-Hb|0)>>>2)<<2);Oq(Hb)}Hb=f[l>>2]|0;if(!Hb){u=i;return 1}E=l+4|0;l=f[E>>2]|0;if((l|0)!=(Hb|0))f[E>>2]=l+(~((l+-4-Hb|0)>>>2)<<2);Oq(Hb);u=i;return 1}function gb(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=Oa,La=0,Ma=0,Na=0,Pa=0,Qa=Oa,Ra=0,Sa=0,Ta=0,Ua=0,Va=0;c=u;u=u+80|0;d=c+60|0;e=c+48|0;g=c+24|0;h=c+12|0;i=c;j=a+28|0;k=f[j>>2]|0;l=f[k+4>>2]|0;m=f[l+80>>2]|0;o=a+4|0;p=a+8|0;q=f[p>>2]|0;r=f[o>>2]|0;s=(q|0)==(r|0);t=r;if(s){f[a+72>>2]=0;v=1;u=c;return v|0}w=f[l+8>>2]|0;x=q-r>>2;r=0;q=0;do{r=r+(b[(f[w+(f[t+(q<<2)>>2]<<2)>>2]|0)+24>>0]|0)|0;q=q+1|0}while(q>>>0>>0);f[a+72>>2]=r;if(s){v=1;u=c;return v|0}s=g+4|0;r=g+8|0;x=d+8|0;q=d+4|0;w=d+11|0;y=g+12|0;z=d+8|0;A=d+4|0;B=d+11|0;C=h+4|0;D=h+8|0;E=i+8|0;F=i+4|0;G=d+11|0;H=d+4|0;I=i+11|0;J=d+8|0;K=d+4|0;L=d+11|0;M=d+11|0;N=d+4|0;O=h+8|0;P=a+40|0;Q=a+44|0;R=a+36|0;S=a+64|0;T=a+68|0;U=a+60|0;V=g+8|0;W=g+20|0;X=e+8|0;Y=e+4|0;Z=e+11|0;_=g+4|0;aa=g+8|0;ba=h+4|0;ca=h+8|0;da=h+8|0;ea=a+52|0;fa=a+56|0;ga=a+48|0;a=g+8|0;ha=0;ia=t;t=l;l=k;a:while(1){k=f[ia+(ha<<2)>>2]|0;ja=f[(f[t+8>>2]|0)+(k<<2)>>2]|0;switch(f[ja+28>>2]|0){case 9:{f[g>>2]=1196;f[s>>2]=-1;f[r>>2]=0;f[r+4>>2]=0;f[r+8>>2]=0;f[r+12>>2]=0;ka=f[l+48>>2]|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;la=ln(32)|0;f[d>>2]=la;f[x>>2]=-2147483616;f[q>>2]=17;ma=la;na=14495;oa=ma+17|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[la+17>>0]=0;pa=ka+16|0;qa=f[pa>>2]|0;if(qa){ra=pa;sa=qa;b:while(1){qa=sa;while(1){if((f[qa+16>>2]|0)>=(k|0))break;ta=f[qa+4>>2]|0;if(!ta){ua=ra;break b}else qa=ta}sa=f[qa>>2]|0;if(!sa){ua=qa;break}else ra=qa}if(((ua|0)!=(pa|0)?(k|0)>=(f[ua+16>>2]|0):0)?(ra=ua+20|0,(Jh(ra,d)|0)!=0):0)va=Hk(ra,d,-1)|0;else wa=17}else wa=17;if((wa|0)==17){wa=0;va=Hk(ka,d,-1)|0}if((b[w>>0]|0)<0)Oq(f[d>>2]|0);if((va|0)<1)xa=1;else{ra=f[(f[j>>2]|0)+48>>2]|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;sa=ln(32)|0;f[d>>2]=sa;f[z>>2]=-2147483616;f[A>>2]=19;ma=sa;na=14438;oa=ma+19|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[sa+19>>0]=0;ka=ra+16|0;pa=f[ka>>2]|0;if(pa){la=ka;ta=pa;c:while(1){pa=ta;while(1){if((f[pa+16>>2]|0)>=(k|0))break;ya=f[pa+4>>2]|0;if(!ya){za=la;break c}else pa=ya}ta=f[pa>>2]|0;if(!ta){za=pa;break}else la=pa}if((za|0)!=(ka|0)?(k|0)>=(f[za+16>>2]|0):0)Aa=za+20|0;else wa=29}else wa=29;if((wa|0)==29){wa=0;Aa=ra}if(!(Jh(Aa,d)|0))Ba=0;else{la=f[(f[j>>2]|0)+48>>2]|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;ta=ln(32)|0;f[e>>2]=ta;f[X>>2]=-2147483616;f[Y>>2]=18;ma=ta;na=14458;oa=ma+18|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[ta+18>>0]=0;ra=la+16|0;ka=f[ra>>2]|0;if(ka){sa=ra;qa=ka;d:while(1){ka=qa;while(1){if((f[ka+16>>2]|0)>=(k|0))break;ya=f[ka+4>>2]|0;if(!ya){Ca=sa;break d}else ka=ya}qa=f[ka>>2]|0;if(!qa){Ca=ka;break}else sa=ka}if((Ca|0)!=(ra|0)?(k|0)>=(f[Ca+16>>2]|0):0)Da=Ca+20|0;else wa=39}else wa=39;if((wa|0)==39){wa=0;Da=la}sa=(Jh(Da,e)|0)!=0;if((b[Z>>0]|0)<0)Oq(f[e>>2]|0);Ba=sa}if((b[B>>0]|0)<0)Oq(f[d>>2]|0);if(Ba){sa=ja+24|0;qa=b[sa>>0]|0;ta=qa<<24>>24;f[h>>2]=0;f[C>>2]=0;f[D>>2]=0;if(!(qa<<24>>24))Ea=0;else{if(qa<<24>>24<0){wa=48;break a}qa=ta<<2;pa=ln(qa)|0;f[h>>2]=pa;ya=pa+(ta<<2)|0;f[O>>2]=ya;sj(pa|0,0,qa|0)|0;f[C>>2]=ya;Ea=pa}pa=f[(f[j>>2]|0)+48>>2]|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;ya=ln(32)|0;f[i>>2]=ya;f[E>>2]=-2147483616;f[F>>2]=19;ma=ya;na=14438;oa=ma+19|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[ya+19>>0]=0;la=b[sa>>0]|0;ra=la<<24>>24;qa=pa+16|0;ta=f[qa>>2]|0;if(ta){Fa=qa;Ga=ta;e:while(1){ta=Ga;while(1){if((f[ta+16>>2]|0)>=(k|0))break;Ha=f[ta+4>>2]|0;if(!Ha){Ia=Fa;break e}else ta=Ha}Ga=f[ta>>2]|0;if(!Ga){Ia=ta;break}else Fa=ta}if(((Ia|0)!=(qa|0)?(k|0)>=(f[Ia+16>>2]|0):0)?(Fa=Ia+20|0,(Jh(Fa,i)|0)!=0):0){Ga=Rg(Fa,i)|0;if((Ga|0)!=(Ia+24|0)){pj(d,Ga+28|0);Ga=b[M>>0]|0;Fa=Ga<<24>>24<0;if(!((Fa?f[N>>2]|0:Ga&255)|0))Ja=Ga;else{if(la<<24>>24>0){ya=Fa?f[d>>2]|0:d;Fa=0;do{Ka=$(bq(ya,e));ka=ya;ya=f[e>>2]|0;if((ka|0)==(ya|0))break;n[Ea+(Fa<<2)>>2]=Ka;Fa=Fa+1|0}while((Fa|0)<(ra|0));La=b[M>>0]|0}else La=Ga;Ja=La}if(Ja<<24>>24<0)Oq(f[d>>2]|0)}}else wa=69}else wa=69;if((wa|0)==69?(wa=0,Fa=Rg(pa,i)|0,(Fa|0)!=(pa+4|0)):0){pj(d,Fa+28|0);Fa=b[G>>0]|0;ya=Fa<<24>>24<0;if(!((ya?f[H>>2]|0:Fa&255)|0))Ma=Fa;else{if(la<<24>>24>0){qa=ya?f[d>>2]|0:d;ya=0;do{Ka=$(bq(qa,e));ka=qa;qa=f[e>>2]|0;if((ka|0)==(qa|0))break;n[Ea+(ya<<2)>>2]=Ka;ya=ya+1|0}while((ya|0)<(ra|0));Na=b[G>>0]|0}else Na=Fa;Ma=Na}if(Ma<<24>>24<0)Oq(f[d>>2]|0)}if((b[I>>0]|0)<0)Oq(f[i>>2]|0);ra=f[(f[j>>2]|0)+48>>2]|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;ya=ln(32)|0;f[d>>2]=ya;f[J>>2]=-2147483616;f[K>>2]=18;ma=ya;na=14458;oa=ma+18|0;do{b[ma>>0]=b[na>>0]|0;ma=ma+1|0;na=na+1|0}while((ma|0)<(oa|0));b[ya+18>>0]=0;na=ra+16|0;ma=f[na>>2]|0;do if(ma){oa=na;Fa=ma;f:while(1){qa=Fa;while(1){if((f[qa+16>>2]|0)>=(k|0))break;la=f[qa+4>>2]|0;if(!la){Pa=oa;break f}else qa=la}Fa=f[qa>>2]|0;if(!Fa){Pa=qa;break}else oa=qa}if((Pa|0)!=(na|0)?(k|0)>=(f[Pa+16>>2]|0):0){oa=Pa+20|0;if(!(Jh(oa,d)|0)){wa=91;break}Qa=$(sk(oa,d,$(1.0)))}else wa=91}else wa=91;while(0);if((wa|0)==91){wa=0;Qa=$(sk(ra,d,$(1.0)))}if((b[L>>0]|0)<0)Oq(f[d>>2]|0);Dl(g,va,f[h>>2]|0,b[sa>>0]|0,Qa);k=f[h>>2]|0;if(k|0){na=f[C>>2]|0;if((na|0)!=(k|0))f[C>>2]=na+(~((na+-4-k|0)>>>2)<<2);Oq(k)}}else Wd(g,ja,va)|0;k=f[P>>2]|0;if((k|0)==(f[Q>>2]|0))Cf(R,g);else{f[k>>2]=1196;f[k+4>>2]=f[s>>2];Ra=k+8|0;f[Ra>>2]=0;na=k+12|0;f[na>>2]=0;f[k+16>>2]=0;ma=(f[y>>2]|0)-(f[V>>2]|0)|0;ya=ma>>2;if(ya|0){if(ya>>>0>1073741823){wa=103;break a}oa=ln(ma)|0;f[na>>2]=oa;f[Ra>>2]=oa;f[k+16>>2]=oa+(ya<<2);ya=f[V>>2]|0;ma=(f[y>>2]|0)-ya|0;if((ma|0)>0){kh(oa|0,ya|0,ma|0)|0;f[na>>2]=oa+(ma>>>2<<2)}}f[k+20>>2]=f[W>>2];f[P>>2]=(f[P>>2]|0)+24}Qe(d,g,ja,m);k=f[S>>2]|0;if(k>>>0<(f[T>>2]|0)>>>0){ma=f[d>>2]|0;f[d>>2]=0;f[k>>2]=ma;f[S>>2]=k+4}else Ze(U,d);k=f[d>>2]|0;f[d>>2]=0;if(k|0){ma=k+88|0;oa=f[ma>>2]|0;f[ma>>2]=0;if(oa|0){ma=f[oa+8>>2]|0;if(ma|0){na=oa+12|0;if((f[na>>2]|0)!=(ma|0))f[na>>2]=ma;Oq(ma)}Oq(oa)}oa=f[k+68>>2]|0;if(oa|0){ma=k+72|0;na=f[ma>>2]|0;if((na|0)!=(oa|0))f[ma>>2]=na+(~((na+-4-oa|0)>>>2)<<2);Oq(oa)}oa=k+64|0;na=f[oa>>2]|0;f[oa>>2]=0;if(na|0){oa=f[na>>2]|0;if(oa|0){ma=na+4|0;if((f[ma>>2]|0)!=(oa|0))f[ma>>2]=oa;Oq(oa)}Oq(na)}Oq(k)}xa=0}f[g>>2]=1196;k=f[r>>2]|0;if(k|0){na=f[y>>2]|0;if((na|0)!=(k|0))f[y>>2]=na+(~((na+-4-k|0)>>>2)<<2);Oq(k)}if(xa|0){v=0;wa=169;break a}break}case 1:case 3:case 5:{k=ja+24|0;na=b[k>>0]|0;oa=na<<24>>24;f[g>>2]=0;f[_>>2]=0;f[aa>>2]=0;if(!(na<<24>>24))Sa=0;else{if(na<<24>>24<0){wa=137;break a}na=ln(oa<<2)|0;f[_>>2]=na;f[g>>2]=na;ma=na+(oa<<2)|0;f[a>>2]=ma;ya=oa;oa=na;while(1){f[oa>>2]=2147483647;ya=ya+-1|0;if(!ya)break;else oa=oa+4|0}f[_>>2]=ma;Sa=b[k>>0]|0}oa=Sa<<24>>24;f[h>>2]=0;f[ba>>2]=0;f[ca>>2]=0;if(!(Sa<<24>>24))Ta=0;else{if(Sa<<24>>24<0){wa=144;break a}ya=oa<<2;sa=ln(ya)|0;f[h>>2]=sa;ra=sa+(oa<<2)|0;f[da>>2]=ra;sj(sa|0,0,ya|0)|0;f[ba>>2]=ra;Ta=sa}sa=ja+80|0;ra=b[k>>0]|0;g:do if(!(f[sa>>2]|0))Ua=ra;else{ya=0;oa=ra;na=Ta;while(1){f[e>>2]=ya;f[d>>2]=f[e>>2];Qb(ja,d,oa,na)|0;Fa=b[k>>0]|0;if(Fa<<24>>24>0){ta=f[g>>2]|0;la=f[h>>2]|0;pa=Fa<<24>>24;Ga=0;do{ka=ta+(Ga<<2)|0;Ha=f[la+(Ga<<2)>>2]|0;if((f[ka>>2]|0)>(Ha|0))f[ka>>2]=Ha;Ga=Ga+1|0}while((Ga|0)<(pa|0))}pa=ya+1|0;if(pa>>>0>=(f[sa>>2]|0)>>>0){Ua=Fa;break g}ya=pa;oa=Fa;na=f[h>>2]|0}}while(0);if(Ua<<24>>24>0){sa=0;ja=Ua;while(1){ra=(f[g>>2]|0)+(sa<<2)|0;ma=f[ea>>2]|0;if((ma|0)==(f[fa>>2]|0)){Ri(ga,ra);Va=b[k>>0]|0}else{f[ma>>2]=f[ra>>2];f[ea>>2]=ma+4;Va=ja}sa=sa+1|0;if((sa|0)>=(Va<<24>>24|0))break;else ja=Va}}ja=f[h>>2]|0;if(ja|0){sa=f[ba>>2]|0;if((sa|0)!=(ja|0))f[ba>>2]=sa+(~((sa+-4-ja|0)>>>2)<<2);Oq(ja)}ja=f[g>>2]|0;if(ja|0){sa=f[_>>2]|0;if((sa|0)!=(ja|0))f[_>>2]=sa+(~((sa+-4-ja|0)>>>2)<<2);Oq(ja)}break}default:{}}ja=ha+1|0;sa=f[o>>2]|0;if(ja>>>0>=(f[p>>2]|0)-sa>>2>>>0){v=1;wa=169;break}k=f[j>>2]|0;ha=ja;ia=sa;t=f[k+4>>2]|0;l=k}if((wa|0)==48)aq(h);else if((wa|0)==103)aq(Ra);else if((wa|0)==137)aq(g);else if((wa|0)==144)aq(h);else if((wa|0)==169){u=c;return v|0}return 0}function hb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0;d=u;u=u+32|0;e=d;g=a+8|0;h=f[g>>2]|0;f[e>>2]=0;i=e+4|0;f[i>>2]=0;f[e+8>>2]=0;do if(h)if(h>>>0>1073741823)aq(e);else{j=h<<2;k=ln(j)|0;f[e>>2]=k;l=k+(h<<2)|0;f[e+8>>2]=l;sj(k|0,0,j|0)|0;f[i>>2]=l;m=l;n=k;break}else{m=0;n=0}while(0);k=a+128|0;l=f[k>>2]|0;j=f[l>>2]|0;o=l+4|0;if(!j){p=l+8|0;q=n;r=m;s=h}else{h=f[o>>2]|0;if((h|0)!=(j|0))f[o>>2]=h+(~((h+-4-j|0)>>>2)<<2);Oq(j);j=l+8|0;f[j>>2]=0;f[o>>2]=0;f[l>>2]=0;p=j;q=f[e>>2]|0;r=f[i>>2]|0;s=f[g>>2]|0}f[l>>2]=q;f[o>>2]=r;f[p>>2]=f[e+8>>2];f[e>>2]=0;p=e+4|0;f[p>>2]=0;f[e+8>>2]=0;do if(s)if(s>>>0>1073741823)aq(e);else{r=s<<2;o=ln(r)|0;f[e>>2]=o;q=o+(s<<2)|0;f[e+8>>2]=q;sj(o|0,0,r|0)|0;f[p>>2]=q;t=q;v=o;break}else{t=0;v=0}while(0);s=a+140|0;o=f[s>>2]|0;q=f[o>>2]|0;r=o+4|0;if(!q){w=o+8|0;x=v;y=t}else{t=f[r>>2]|0;if((t|0)!=(q|0))f[r>>2]=t+(~((t+-4-q|0)>>>2)<<2);Oq(q);q=o+8|0;f[q>>2]=0;f[r>>2]=0;f[o>>2]=0;w=q;x=f[e>>2]|0;y=f[p>>2]|0}f[o>>2]=x;f[r>>2]=y;f[w>>2]=f[e+8>>2];w=f[b>>2]|0;y=b+4|0;r=f[y>>2]|0;x=f[y+4>>2]|0;y=f[c>>2]|0;o=c+4|0;p=f[o>>2]|0;q=f[o+4>>2]|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;f[e+20>>2]=0;o=e+8|0;t=e+4|0;v=e+16|0;l=e+20|0;i=r;Pc(e);j=f[t>>2]|0;h=(f[l>>2]|0)+(f[v>>2]|0)|0;if((f[o>>2]|0)==(j|0))z=0;else z=(f[j+(((h>>>0)/113|0)<<2)>>2]|0)+(((h>>>0)%113|0)*36|0)|0;f[z>>2]=w;h=z+4|0;f[h>>2]=r;f[h+4>>2]=x;f[z+12>>2]=y;h=z+16|0;f[h>>2]=p;f[h+4>>2]=q;f[z+24>>2]=0;f[z+28>>2]=y-w;f[z+32>>2]=0;z=(f[l>>2]|0)+1|0;f[l>>2]=z;if(z|0){w=a+116|0;y=a+48|0;h=a+44|0;j=a+36|0;m=a+40|0;n=a+32|0;A=b+8|0;B=c+8|0;C=a+28|0;D=a+24|0;E=a+16|0;F=a+20|0;G=a+12|0;H=a+88|0;I=a+84|0;J=a+76|0;K=a+80|0;L=a+72|0;M=i+4|0;N=i+24|0;O=i+24|0;P=p+24|0;Q=z;while(1){z=f[v>>2]|0;R=Q+-1|0;S=R+z|0;T=f[t>>2]|0;U=f[T+(((S>>>0)/113|0)<<2)>>2]|0;V=(S>>>0)%113|0;S=f[U+(V*36|0)>>2]|0;W=f[U+(V*36|0)+12>>2]|0;Y=f[U+(V*36|0)+24>>2]|0;Z=f[U+(V*36|0)+32>>2]|0;f[l>>2]=R;R=f[o>>2]|0;V=R-T>>2;if((1-Q-z+((V|0)==0?0:(V*113|0)+-1|0)|0)>>>0>225){Oq(f[R+-4>>2]|0);f[o>>2]=(f[o>>2]|0)+-4}f[b>>2]=S;f[c>>2]=W;R=f[k>>2]|0;V=((f[g>>2]|0)+-1|0)==(Y|0)?0:Y+1|0;Y=(f[s>>2]|0)+(Z*12|0)|0;z=W-S|0;T=(f[a>>2]|0)-(f[(f[Y>>2]|0)+(V<<2)>>2]|0)|0;a:do if(T){if(z>>>0<3){U=f[w>>2]|0;f[U>>2]=V;$=f[g>>2]|0;if($>>>0>1){aa=1;ba=$;ca=V;while(1){ca=(ca|0)==(ba+-1|0)?0:ca+1|0;f[U+(aa<<2)>>2]=ca;aa=aa+1|0;da=f[g>>2]|0;if(aa>>>0>=da>>>0){ea=da;break}else ba=da}}else ea=$;if(!z){fa=99;break}else{ga=0;ha=ea}while(1){ba=(f[N>>2]|0)+((X(f[M>>2]|0,S+ga|0)|0)<<2)|0;if(!ha)ia=0;else{aa=0;do{ca=f[(f[w>>2]|0)+(aa<<2)>>2]|0;U=(f[a>>2]|0)-(f[(f[Y>>2]|0)+(ca<<2)>>2]|0)|0;do if(U|0){da=f[y>>2]|0;ja=32-da|0;ka=32-U|0;la=f[ba+(ca<<2)>>2]<(ja|0)){ma=la>>>ka;ka=U-ja|0;f[y>>2]=ka;ja=f[h>>2]|ma>>>ka;f[h>>2]=ja;ka=f[j>>2]|0;if((ka|0)==(f[m>>2]|0))Ri(n,h);else{f[ka>>2]=ja;f[j>>2]=ka+4}f[h>>2]=ma<<32-(f[y>>2]|0);break}ma=f[h>>2]|la>>>da;f[h>>2]=ma;la=da+U|0;f[y>>2]=la;if((la|0)!=32)break;la=f[j>>2]|0;if((la|0)==(f[m>>2]|0))Ri(n,h);else{f[la>>2]=ma;f[j>>2]=la+4}f[h>>2]=0;f[y>>2]=0}while(0);aa=aa+1|0;U=f[g>>2]|0}while(aa>>>0>>0);ia=U}ga=ga+1|0;if(ga>>>0>=z>>>0){fa=99;break a}else ha=ia}}$=Z+1|0;Ig(R+($*12|0)|0,f[R+(Z*12|0)>>2]|0,f[R+(Z*12|0)+4>>2]|0);aa=(f[(f[k>>2]|0)+($*12|0)>>2]|0)+(V<<2)|0;ba=(f[aa>>2]|0)+(1<>2]=ba;aa=f[A>>2]|0;U=f[B>>2]|0;b:do if((W|0)==(S|0))na=S;else{ca=f[O>>2]|0;if(!aa){if((f[ca+(V<<2)>>2]|0)>>>0>>0){na=W;break}else{oa=W;pa=S}while(1){la=oa;do{la=la+-1|0;if((pa|0)==(la|0)){na=pa;break b}ma=(f[P>>2]|0)+((X(la,U)|0)<<2)+(V<<2)|0}while((f[ma>>2]|0)>>>0>=ba>>>0);pa=pa+1|0;if((pa|0)==(la|0)){na=la;break b}else oa=la}}else{qa=W;ra=S}while(1){ma=ra;while(1){sa=ca+((X(ma,aa)|0)<<2)|0;if((f[sa+(V<<2)>>2]|0)>>>0>=ba>>>0){ta=qa;break}da=ma+1|0;if((da|0)==(qa|0)){na=qa;break b}else ma=da}while(1){ta=ta+-1|0;if((ma|0)==(ta|0)){na=ma;break b}ua=(f[P>>2]|0)+((X(ta,U)|0)<<2)|0;if((f[ua+(V<<2)>>2]|0)>>>0>>0){va=0;break}}do{la=sa+(va<<2)|0;da=ua+(va<<2)|0;ka=f[la>>2]|0;f[la>>2]=f[da>>2];f[da>>2]=ka;va=va+1|0}while((va|0)!=(aa|0));ra=ma+1|0;if((ra|0)==(ta|0)){na=ta;break}else qa=ta}}while(0);ba=(_(z|0)|0)^31;U=na-S|0;ca=W-na|0;ka=U>>>0>>0;if((U|0)!=(ca|0)){da=f[H>>2]|0;if(ka)f[I>>2]=f[I>>2]|1<<31-da;la=da+1|0;f[H>>2]=la;if((la|0)==32){la=f[J>>2]|0;if((la|0)==(f[K>>2]|0))Ri(L,I);else{f[la>>2]=f[I>>2];f[J>>2]=la+4}f[H>>2]=0;f[I>>2]=0}}la=z>>>1;do if(ka){da=f[C>>2]|0;ja=32-da|0;wa=32-ba|0;xa=la-U<(ja|0)){ya=xa>>>wa;wa=ba-ja|0;f[C>>2]=wa;ja=f[D>>2]|ya>>>wa;f[D>>2]=ja;wa=f[E>>2]|0;if((wa|0)==(f[F>>2]|0))Ri(G,D);else{f[wa>>2]=ja;f[E>>2]=wa+4}f[D>>2]=ya<<32-(f[C>>2]|0);break}ya=f[D>>2]|xa>>>da;f[D>>2]=ya;xa=da+ba|0;f[C>>2]=xa;if((xa|0)==32){xa=f[E>>2]|0;if((xa|0)==(f[F>>2]|0))Ri(G,D);else{f[xa>>2]=ya;f[E>>2]=xa+4}f[D>>2]=0;f[C>>2]=0}}else{xa=f[C>>2]|0;ya=32-xa|0;da=32-ba|0;wa=la-ca<(ya|0)){ja=wa>>>da;da=ba-ya|0;f[C>>2]=da;ya=f[D>>2]|ja>>>da;f[D>>2]=ya;da=f[E>>2]|0;if((da|0)==(f[F>>2]|0))Ri(G,D);else{f[da>>2]=ya;f[E>>2]=da+4}f[D>>2]=ja<<32-(f[C>>2]|0);break}ja=f[D>>2]|wa>>>xa;f[D>>2]=ja;wa=xa+ba|0;f[C>>2]=wa;if((wa|0)==32){wa=f[E>>2]|0;if((wa|0)==(f[F>>2]|0))Ri(G,D);else{f[wa>>2]=ja;f[E>>2]=wa+4}f[D>>2]=0;f[C>>2]=0}}while(0);ba=f[s>>2]|0;la=f[ba+(Z*12|0)>>2]|0;ka=la+(V<<2)|0;f[ka>>2]=(f[ka>>2]|0)+1;Ig(ba+($*12|0)|0,la,f[ba+(Z*12|0)+4>>2]|0);if((na|0)!=(S|0)){ba=f[o>>2]|0;la=f[t>>2]|0;ka=ba-la>>2;wa=f[v>>2]|0;ja=f[l>>2]|0;if((((ka|0)==0?0:(ka*113|0)+-1|0)|0)==(ja+wa|0)){Pc(e);za=f[v>>2]|0;Aa=f[l>>2]|0;Ba=f[o>>2]|0;Ca=f[t>>2]|0}else{za=wa;Aa=ja;Ba=ba;Ca=la}la=Aa+za|0;if((Ba|0)==(Ca|0))Da=0;else Da=(f[Ca+(((la>>>0)/113|0)<<2)>>2]|0)+(((la>>>0)%113|0)*36|0)|0;f[Da>>2]=S;la=Da+4|0;f[la>>2]=r;f[la+4>>2]=x;f[Da+12>>2]=na;f[Da+16>>2]=i;f[Da+20>>2]=aa;f[Da+24>>2]=V;f[Da+28>>2]=U;f[Da+32>>2]=Z;f[l>>2]=(f[l>>2]|0)+1}if((W|0)!=(na|0)){la=f[o>>2]|0;ba=f[t>>2]|0;ja=la-ba>>2;wa=f[v>>2]|0;ka=f[l>>2]|0;if((((ja|0)==0?0:(ja*113|0)+-1|0)|0)==(ka+wa|0)){Pc(e);Ea=f[v>>2]|0;Fa=f[l>>2]|0;Ga=f[o>>2]|0;Ha=f[t>>2]|0}else{Ea=wa;Fa=ka;Ga=la;Ha=ba}ba=Fa+Ea|0;if((Ga|0)==(Ha|0))Ia=0;else Ia=(f[Ha+(((ba>>>0)/113|0)<<2)>>2]|0)+(((ba>>>0)%113|0)*36|0)|0;f[Ia>>2]=na;f[Ia+4>>2]=i;f[Ia+8>>2]=aa;f[Ia+12>>2]=W;ba=Ia+16|0;f[ba>>2]=p;f[ba+4>>2]=q;f[Ia+24>>2]=V;f[Ia+28>>2]=ca;f[Ia+32>>2]=$;ba=(f[l>>2]|0)+1|0;f[l>>2]=ba;Ja=ba}else fa=99}else fa=99;while(0);if((fa|0)==99){fa=0;Ja=f[l>>2]|0}if(!Ja)break;else Q=Ja}}Ja=f[t>>2]|0;Q=f[v>>2]|0;Ia=Ja+(((Q>>>0)/113|0)<<2)|0;q=f[o>>2]|0;p=q;i=Ja;if((q|0)==(Ja|0)){Ka=0;La=0}else{na=(f[Ia>>2]|0)+(((Q>>>0)%113|0)*36|0)|0;Ka=na;La=na}na=Ia;Ia=La;c:while(1){La=Ia;do{Q=La;if((Ka|0)==(Q|0))break c;La=Q+36|0}while((La-(f[na>>2]|0)|0)!=4068);La=na+4|0;na=La;Ia=f[La>>2]|0}f[l>>2]=0;l=p-i>>2;if(l>>>0>2){i=Ja;do{Oq(f[i>>2]|0);i=(f[t>>2]|0)+4|0;f[t>>2]=i;Ma=f[o>>2]|0;Na=Ma-i>>2}while(Na>>>0>2);Oa=Na;Pa=i;Qa=Ma}else{Oa=l;Pa=Ja;Qa=q}switch(Oa|0){case 1:{Ra=56;fa=113;break}case 2:{Ra=113;fa=113;break}default:{}}if((fa|0)==113)f[v>>2]=Ra;if((Pa|0)!=(Qa|0)){Ra=Pa;do{Oq(f[Ra>>2]|0);Ra=Ra+4|0}while((Ra|0)!=(Qa|0));Qa=f[t>>2]|0;t=f[o>>2]|0;if((t|0)!=(Qa|0))f[o>>2]=t+(~((t+-4-Qa|0)>>>2)<<2)}Qa=f[e>>2]|0;if(!Qa){u=d;return}Oq(Qa);u=d;return}function ib(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0;d=u;u=u+48|0;e=d+36|0;g=d+24|0;h=d;i=a+8|0;j=f[i>>2]|0;f[e>>2]=0;k=e+4|0;f[k>>2]=0;f[e+8>>2]=0;do if(j)if(j>>>0>1073741823)aq(e);else{l=j<<2;m=ln(l)|0;f[e>>2]=m;n=m+(j<<2)|0;f[e+8>>2]=n;sj(m|0,0,l|0)|0;f[k>>2]=n;o=n;p=m;break}else{o=0;p=0}while(0);m=a+1164|0;n=f[m>>2]|0;l=f[n>>2]|0;q=n+4|0;if(!l){r=n+8|0;s=p;t=o;v=j}else{j=f[q>>2]|0;if((j|0)!=(l|0))f[q>>2]=j+(~((j+-4-l|0)>>>2)<<2);Oq(l);l=n+8|0;f[l>>2]=0;f[q>>2]=0;f[n>>2]=0;r=l;s=f[e>>2]|0;t=f[k>>2]|0;v=f[i>>2]|0}f[n>>2]=s;f[q>>2]=t;f[r>>2]=f[e+8>>2];f[e>>2]=0;r=e+4|0;f[r>>2]=0;f[e+8>>2]=0;do if(v)if(v>>>0>1073741823)aq(e);else{t=v<<2;q=ln(t)|0;f[e>>2]=q;s=q+(v<<2)|0;f[e+8>>2]=s;sj(q|0,0,t|0)|0;f[r>>2]=s;w=s;x=q;break}else{w=0;x=0}while(0);v=a+1176|0;q=f[v>>2]|0;s=f[q>>2]|0;t=q+4|0;if(!s){y=q+8|0;z=x;A=w}else{w=f[t>>2]|0;if((w|0)!=(s|0))f[t>>2]=w+(~((w+-4-s|0)>>>2)<<2);Oq(s);s=q+8|0;f[s>>2]=0;f[t>>2]=0;f[q>>2]=0;y=s;z=f[e>>2]|0;A=f[r>>2]|0}f[q>>2]=z;f[t>>2]=A;f[y>>2]=f[e+8>>2];y=f[b>>2]|0;A=b+4|0;t=f[A>>2]|0;z=f[A+4>>2]|0;A=f[c>>2]|0;q=c+4|0;r=f[q>>2]|0;s=f[q+4>>2]|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;f[h+16>>2]=0;f[h+20>>2]=0;q=h+8|0;w=h+4|0;x=h+16|0;n=h+20|0;k=t;Pc(h);l=f[w>>2]|0;j=(f[n>>2]|0)+(f[x>>2]|0)|0;if((f[q>>2]|0)==(l|0))B=0;else B=(f[l+(((j>>>0)/113|0)<<2)>>2]|0)+(((j>>>0)%113|0)*36|0)|0;f[B>>2]=y;j=B+4|0;f[j>>2]=t;f[j+4>>2]=z;f[B+12>>2]=A;j=B+16|0;f[j>>2]=r;f[j+4>>2]=s;f[B+24>>2]=0;f[B+28>>2]=A-y;f[B+32>>2]=0;B=(f[n>>2]|0)+1|0;f[n>>2]=B;if(B|0){y=a+1152|0;A=a+1084|0;j=a+1080|0;l=a+1072|0;o=a+1076|0;p=a+1068|0;C=b+8|0;D=c+8|0;E=a+1124|0;F=a+1120|0;G=a+1112|0;H=a+1116|0;I=a+1108|0;J=k+4|0;K=k+24|0;L=k+24|0;M=r+24|0;N=B;while(1){B=f[x>>2]|0;O=N+-1|0;P=O+B|0;Q=f[w>>2]|0;R=f[Q+(((P>>>0)/113|0)<<2)>>2]|0;S=(P>>>0)%113|0;P=f[R+(S*36|0)>>2]|0;T=f[R+(S*36|0)+12>>2]|0;U=f[R+(S*36|0)+24>>2]|0;V=f[R+(S*36|0)+32>>2]|0;f[n>>2]=O;O=f[q>>2]|0;S=O-Q>>2;if((1-N-B+((S|0)==0?0:(S*113|0)+-1|0)|0)>>>0>225){Oq(f[O+-4>>2]|0);f[q>>2]=(f[q>>2]|0)+-4}f[b>>2]=P;f[c>>2]=T;O=f[m>>2]|0;S=O+(V*12|0)|0;B=(f[v>>2]|0)+(V*12|0)|0;f[g>>2]=f[b>>2];f[g+4>>2]=f[b+4>>2];f[g+8>>2]=f[b+8>>2];f[e>>2]=f[c>>2];f[e+4>>2]=f[c+4>>2];f[e+8>>2]=f[c+8>>2];Q=Rd(a,g,e,S,B,U)|0;U=T-P|0;R=(f[a>>2]|0)-(f[(f[B>>2]|0)+(Q<<2)>>2]|0)|0;a:do if(R){if(U>>>0<3){W=f[y>>2]|0;f[W>>2]=Q;Y=f[i>>2]|0;if(Y>>>0>1){Z=1;$=Y;aa=Q;while(1){aa=(aa|0)==($+-1|0)?0:aa+1|0;f[W+(Z<<2)>>2]=aa;Z=Z+1|0;ba=f[i>>2]|0;if(Z>>>0>=ba>>>0){ca=ba;break}else $=ba}}else ca=Y;if(!U){da=87;break}else{ea=0;fa=ca}while(1){$=(f[K>>2]|0)+((X(f[J>>2]|0,P+ea|0)|0)<<2)|0;if(!fa)ga=0;else{Z=0;do{aa=f[(f[y>>2]|0)+(Z<<2)>>2]|0;W=(f[a>>2]|0)-(f[(f[B>>2]|0)+(aa<<2)>>2]|0)|0;do if(W|0){ba=f[A>>2]|0;ha=32-ba|0;ia=32-W|0;ja=f[$+(aa<<2)>>2]<(ha|0)){ka=ja>>>ia;ia=W-ha|0;f[A>>2]=ia;ha=f[j>>2]|ka>>>ia;f[j>>2]=ha;ia=f[l>>2]|0;if((ia|0)==(f[o>>2]|0))Ri(p,j);else{f[ia>>2]=ha;f[l>>2]=ia+4}f[j>>2]=ka<<32-(f[A>>2]|0);break}ka=f[j>>2]|ja>>>ba;f[j>>2]=ka;ja=ba+W|0;f[A>>2]=ja;if((ja|0)!=32)break;ja=f[l>>2]|0;if((ja|0)==(f[o>>2]|0))Ri(p,j);else{f[ja>>2]=ka;f[l>>2]=ja+4}f[j>>2]=0;f[A>>2]=0}while(0);Z=Z+1|0;W=f[i>>2]|0}while(Z>>>0>>0);ga=W}ea=ea+1|0;if(ea>>>0>=U>>>0){da=87;break a}else fa=ga}}Y=V+1|0;Z=f[m>>2]|0;$=Z+(Y*12|0)|0;if(($|0)==(S|0))la=Z;else{Ig($,f[S>>2]|0,f[O+(V*12|0)+4>>2]|0);la=f[m>>2]|0}$=(f[la+(Y*12|0)>>2]|0)+(Q<<2)|0;Z=(f[$>>2]|0)+(1<>2]=Z;$=f[C>>2]|0;W=f[D>>2]|0;b:do if((T|0)==(P|0))ma=P;else{aa=f[L>>2]|0;if(!$){if((f[aa+(Q<<2)>>2]|0)>>>0>>0){ma=T;break}else{na=T;oa=P}while(1){ja=na;do{ja=ja+-1|0;if((oa|0)==(ja|0)){ma=oa;break b}ka=(f[M>>2]|0)+((X(ja,W)|0)<<2)+(Q<<2)|0}while((f[ka>>2]|0)>>>0>=Z>>>0);oa=oa+1|0;if((oa|0)==(ja|0)){ma=ja;break b}else na=ja}}else{pa=T;qa=P}while(1){ka=qa;while(1){ra=aa+((X(ka,$)|0)<<2)|0;if((f[ra+(Q<<2)>>2]|0)>>>0>=Z>>>0){sa=pa;break}ba=ka+1|0;if((ba|0)==(pa|0)){ma=pa;break b}else ka=ba}while(1){sa=sa+-1|0;if((ka|0)==(sa|0)){ma=ka;break b}ta=(f[M>>2]|0)+((X(sa,W)|0)<<2)|0;if((f[ta+(Q<<2)>>2]|0)>>>0>>0){ua=0;break}}do{ja=ra+(ua<<2)|0;ba=ta+(ua<<2)|0;ia=f[ja>>2]|0;f[ja>>2]=f[ba>>2];f[ba>>2]=ia;ua=ua+1|0}while((ua|0)!=($|0));qa=ka+1|0;if((qa|0)==(sa|0)){ma=sa;break}else pa=sa}}while(0);Z=(_(U|0)|0)^31;W=ma-P|0;aa=T-ma|0;ia=W>>>0>>0;if((W|0)!=(aa|0)){ba=f[E>>2]|0;if(ia)f[F>>2]=f[F>>2]|1<<31-ba;ja=ba+1|0;f[E>>2]=ja;if((ja|0)==32){ja=f[G>>2]|0;if((ja|0)==(f[H>>2]|0))Ri(I,F);else{f[ja>>2]=f[F>>2];f[G>>2]=ja+4}f[E>>2]=0;f[F>>2]=0}}ja=U>>>1;if(ia){ia=ja-W|0;if(Z|0){ba=0;ha=1<>>1}}}else{ha=ja-aa|0;if(Z|0){ba=0;ia=1<>>1}}}ia=f[v>>2]|0;Z=f[ia+(V*12|0)>>2]|0;ba=Z+(Q<<2)|0;f[ba>>2]=(f[ba>>2]|0)+1;Ig(ia+(Y*12|0)|0,Z,f[ia+(V*12|0)+4>>2]|0);if((ma|0)!=(P|0)){ia=f[q>>2]|0;Z=f[w>>2]|0;ba=ia-Z>>2;ha=f[x>>2]|0;ja=f[n>>2]|0;if((((ba|0)==0?0:(ba*113|0)+-1|0)|0)==(ja+ha|0)){Pc(h);va=f[x>>2]|0;wa=f[n>>2]|0;xa=f[q>>2]|0;ya=f[w>>2]|0}else{va=ha;wa=ja;xa=ia;ya=Z}Z=wa+va|0;if((xa|0)==(ya|0))za=0;else za=(f[ya+(((Z>>>0)/113|0)<<2)>>2]|0)+(((Z>>>0)%113|0)*36|0)|0;f[za>>2]=P;Z=za+4|0;f[Z>>2]=t;f[Z+4>>2]=z;f[za+12>>2]=ma;f[za+16>>2]=k;f[za+20>>2]=$;f[za+24>>2]=Q;f[za+28>>2]=W;f[za+32>>2]=V;f[n>>2]=(f[n>>2]|0)+1}if((T|0)!=(ma|0)){Z=f[q>>2]|0;ia=f[w>>2]|0;ja=Z-ia>>2;ha=f[x>>2]|0;ba=f[n>>2]|0;if((((ja|0)==0?0:(ja*113|0)+-1|0)|0)==(ba+ha|0)){Pc(h);Aa=f[x>>2]|0;Ba=f[n>>2]|0;Ca=f[q>>2]|0;Da=f[w>>2]|0}else{Aa=ha;Ba=ba;Ca=Z;Da=ia}ia=Ba+Aa|0;if((Ca|0)==(Da|0))Ea=0;else Ea=(f[Da+(((ia>>>0)/113|0)<<2)>>2]|0)+(((ia>>>0)%113|0)*36|0)|0;f[Ea>>2]=ma;f[Ea+4>>2]=k;f[Ea+8>>2]=$;f[Ea+12>>2]=T;ia=Ea+16|0;f[ia>>2]=r;f[ia+4>>2]=s;f[Ea+24>>2]=Q;f[Ea+28>>2]=aa;f[Ea+32>>2]=Y;ia=(f[n>>2]|0)+1|0;f[n>>2]=ia;Fa=ia}else da=87}else da=87;while(0);if((da|0)==87){da=0;Fa=f[n>>2]|0}if(!Fa)break;else N=Fa}}Fa=f[w>>2]|0;N=f[x>>2]|0;Ea=Fa+(((N>>>0)/113|0)<<2)|0;s=f[q>>2]|0;r=s;k=Fa;if((s|0)==(Fa|0)){Ga=0;Ha=0}else{ma=(f[Ea>>2]|0)+(((N>>>0)%113|0)*36|0)|0;Ga=ma;Ha=ma}ma=Ea;Ea=Ha;c:while(1){Ha=Ea;do{N=Ha;if((Ga|0)==(N|0))break c;Ha=N+36|0}while((Ha-(f[ma>>2]|0)|0)!=4068);Ha=ma+4|0;ma=Ha;Ea=f[Ha>>2]|0}f[n>>2]=0;n=r-k>>2;if(n>>>0>2){k=Fa;do{Oq(f[k>>2]|0);k=(f[w>>2]|0)+4|0;f[w>>2]=k;Ia=f[q>>2]|0;Ja=Ia-k>>2}while(Ja>>>0>2);Ka=Ja;La=k;Ma=Ia}else{Ka=n;La=Fa;Ma=s}switch(Ka|0){case 1:{Na=56;da=101;break}case 2:{Na=113;da=101;break}default:{}}if((da|0)==101)f[x>>2]=Na;if((La|0)!=(Ma|0)){Na=La;do{Oq(f[Na>>2]|0);Na=Na+4|0}while((Na|0)!=(Ma|0));Ma=f[w>>2]|0;w=f[q>>2]|0;if((w|0)!=(Ma|0))f[q>>2]=w+(~((w+-4-Ma|0)>>>2)<<2)}Ma=f[h>>2]|0;if(!Ma){u=d;return}Oq(Ma);u=d;return}function jb(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0;d=u;u=u+1424|0;e=d+1408|0;g=d+1396|0;h=d+1420|0;i=d+1200|0;j=d+12|0;k=d;l=d+1384|0;m=d+1372|0;n=d+1360|0;o=d+1348|0;p=d+1336|0;q=d+1324|0;r=d+1312|0;s=d+1300|0;t=d+1288|0;v=d+1276|0;w=d+1264|0;x=d+1252|0;y=d+1240|0;z=d+1228|0;A=a+28|0;B=10-(mi(f[(f[A>>2]|0)+48>>2]|0)|0)|0;C=(B|0)<6?B:6;b[h>>0]=C;if((C&255|0)==6?(f[a+72>>2]|0)>15:0)b[h>>0]=5;C=c+16|0;B=f[C+4>>2]|0;if(!((B|0)>0|(B|0)==0&(f[C>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Me(c,e,h,h+1|0)|0}C=f[A>>2]|0;B=f[(f[C+4>>2]|0)+80>>2]|0;D=a+72|0;E=f[D>>2]|0;f[i>>2]=B;F=i+4|0;f[F>>2]=E;f[i+8>>2]=E<<2;G=i+12|0;H=X(E,B)|0;f[G>>2]=0;J=i+16|0;f[J>>2]=0;f[i+20>>2]=0;do if(H)if(H>>>0>1073741823)aq(G);else{K=H<<2;L=ln(K)|0;f[G>>2]=L;M=L+(H<<2)|0;f[i+20>>2]=M;sj(L|0,0,K|0)|0;f[J>>2]=M;N=L;break}else N=0;while(0);H=i+24|0;f[H>>2]=N;G=a+4|0;L=a+8|0;M=f[G>>2]|0;a:do if((f[L>>2]|0)!=(M|0)){K=j+4|0;O=j+8|0;P=j+8|0;Q=(B|0)==0;R=j+4|0;S=j+8|0;T=k+4|0;U=k+8|0;V=k+8|0;W=a+48|0;Y=j+8|0;Z=a+60|0;$=0;aa=0;ba=0;ca=0;da=M;ea=C;b:while(1){fa=f[(f[(f[ea+4>>2]|0)+8>>2]|0)+(f[da+(ca<<2)>>2]<<2)>>2]|0;switch(f[fa+28>>2]|0){case 1:case 3:case 5:case 2:case 4:case 6:{ga=fa;ha=aa;break}case 9:{ga=f[(f[Z>>2]|0)+(aa<<2)>>2]|0;ha=aa+1|0;break}default:{ia=0;break a}}if(!ga){ia=0;break a}c:do switch(f[ga+28>>2]|0){case 6:{if(Q){ja=ba;ka=ga+24|0;break c}fa=ga+84|0;la=ga+68|0;ma=ga+48|0;na=ga+40|0;oa=ga+24|0;pa=0;do{if(!(b[fa>>0]|0))qa=f[(f[la>>2]|0)+(pa<<2)>>2]|0;else qa=pa;ra=ma;sa=f[ra>>2]|0;ta=f[ra+4>>2]|0;ra=na;ua=un(f[ra>>2]|0,f[ra+4>>2]|0,qa|0,0)|0;ra=Vn(ua|0,I|0,sa|0,ta|0)|0;kh((f[H>>2]|0)+((X(f[F>>2]|0,pa)|0)<<2)+($<<2)|0,(f[f[ga>>2]>>2]|0)+ra|0,b[oa>>0]<<2|0)|0;pa=pa+1|0}while((pa|0)!=(B|0));ja=ba;ka=oa;break}case 1:case 3:case 5:{oa=ga+24|0;pa=b[oa>>0]|0;na=pa<<24>>24;f[j>>2]=0;f[R>>2]=0;f[S>>2]=0;if(!(pa<<24>>24))va=0;else{if(pa<<24>>24<0){wa=24;break b}pa=na<<2;ma=ln(pa)|0;f[j>>2]=ma;la=ma+(na<<2)|0;f[Y>>2]=la;sj(ma|0,0,pa|0)|0;f[R>>2]=la;va=b[oa>>0]|0}la=va<<24>>24;f[k>>2]=0;f[T>>2]=0;f[U>>2]=0;if(!(va<<24>>24)){xa=0;ya=0}else{if(va<<24>>24<0){wa=30;break b}pa=la<<2;ma=ln(pa)|0;f[k>>2]=ma;na=ma+(la<<2)|0;f[V>>2]=na;sj(ma|0,0,pa|0)|0;f[T>>2]=na;xa=ma;ya=ma}if(Q){za=ya;Aa=xa}else{ma=ga+84|0;na=ga+68|0;pa=0;do{if(!(b[ma>>0]|0))Ba=f[(f[na>>2]|0)+(pa<<2)>>2]|0;else Ba=pa;la=f[j>>2]|0;f[g>>2]=Ba;fa=b[oa>>0]|0;f[e>>2]=f[g>>2];Qb(ga,e,fa,la)|0;la=b[oa>>0]|0;fa=la<<24>>24;if(la<<24>>24>0){la=f[j>>2]|0;ra=f[W>>2]|0;ta=f[k>>2]|0;sa=0;do{f[ta+(sa<<2)>>2]=(f[la+(sa<<2)>>2]|0)-(f[ra+(sa+ba<<2)>>2]|0);sa=sa+1|0}while((sa|0)<(fa|0));Ca=ta}else Ca=f[k>>2]|0;kh((f[H>>2]|0)+((X(f[F>>2]|0,pa)|0)<<2)+($<<2)|0,Ca|0,fa<<2|0)|0;pa=pa+1|0}while(pa>>>0>>0);pa=f[k>>2]|0;za=pa;Aa=pa}pa=ba+(b[oa>>0]|0)|0;if(za|0){na=f[T>>2]|0;if((na|0)!=(za|0))f[T>>2]=na+(~((na+-4-za|0)>>>2)<<2);Oq(Aa)}na=f[j>>2]|0;if(na|0){ma=f[R>>2]|0;if((ma|0)!=(na|0))f[R>>2]=ma+(~((ma+-4-na|0)>>>2)<<2);Oq(na)}ja=pa;ka=oa;break}default:{pa=ga+24|0;na=b[pa>>0]|0;ma=na<<24>>24;f[j>>2]=0;f[K>>2]=0;f[O>>2]=0;if(!(na<<24>>24)){Da=0;Ea=0}else{if(na<<24>>24<0){wa=53;break b}na=ma<<2;ta=ln(na)|0;f[j>>2]=ta;sa=ta+(ma<<2)|0;f[P>>2]=sa;sj(ta|0,0,na|0)|0;f[K>>2]=sa;Da=ta;Ea=ta}if(Q){Fa=Ea;Ga=Da}else{ta=ga+84|0;sa=ga+68|0;na=0;do{if(!(b[ta>>0]|0))Ha=f[(f[sa>>2]|0)+(na<<2)>>2]|0;else Ha=na;ma=f[j>>2]|0;f[g>>2]=Ha;ra=b[pa>>0]|0;f[e>>2]=f[g>>2];Pb(ga,e,ra,ma)|0;kh((f[H>>2]|0)+((X(f[F>>2]|0,na)|0)<<2)+($<<2)|0,f[j>>2]|0,b[pa>>0]<<2|0)|0;na=na+1|0}while(na>>>0>>0);na=f[j>>2]|0;Fa=na;Ga=na}if(Fa|0){na=f[K>>2]|0;if((na|0)!=(Fa|0))f[K>>2]=na+(~((na+-4-Fa|0)>>>2)<<2);Oq(Ga)}ja=ba;ka=pa}}while(0);na=ca+1|0;sa=f[G>>2]|0;if(na>>>0>=(f[L>>2]|0)-sa>>2>>>0){wa=66;break}$=$+(b[ka>>0]|0)|0;aa=ha;ba=ja;ca=na;da=sa;ea=f[A>>2]|0}if((wa|0)==24)aq(j);else if((wa|0)==30)aq(k);else if((wa|0)==53)aq(j);else if((wa|0)==66){Ia=f[D>>2]|0;Ja=f[H>>2]|0;wa=67;break}}else{Ia=E;Ja=N;wa=67}while(0);d:do if((wa|0)==67){N=X(Ia,B)|0;if((N|0)>0){E=0;H=0;while(1){D=f[Ja+(E<<2)>>2]|0;if(!D)Ka=H;else{A=(_(D|0)|0)^31;Ka=(A|0)<(H|0)?H:A+1|0}E=E+1|0;if((E|0)>=(N|0)){La=Ka;break}else H=Ka}}else La=0;switch(b[h>>0]|0){case 6:{Ue(j,Ia);f[l>>2]=0;f[l+4>>2]=i;H=f[F>>2]|0;f[l+8>>2]=H;f[m>>2]=f[i>>2];f[m+4>>2]=i;f[m+8>>2]=H;f[k>>2]=La;f[g>>2]=f[l>>2];f[g+4>>2]=f[l+4>>2];f[g+8>>2]=f[l+8>>2];f[e>>2]=f[m>>2];f[e+4>>2]=f[m+4>>2];f[e+8>>2]=f[m+8>>2];H=sf(j,g,e,k,c)|0;Se(j);if(!H){ia=0;break d}break}case 5:{Ue(j,Ia);f[n>>2]=0;f[n+4>>2]=i;H=f[F>>2]|0;f[n+8>>2]=H;f[o>>2]=f[i>>2];f[o+4>>2]=i;f[o+8>>2]=H;f[k>>2]=La;f[g>>2]=f[n>>2];f[g+4>>2]=f[n+4>>2];f[g+8>>2]=f[n+8>>2];f[e>>2]=f[o>>2];f[e+4>>2]=f[o+4>>2];f[e+8>>2]=f[o+8>>2];H=tf(j,g,e,k,c)|0;Se(j);if(!H){ia=0;break d}break}case 4:{Ue(j,Ia);f[p>>2]=0;f[p+4>>2]=i;H=f[F>>2]|0;f[p+8>>2]=H;f[q>>2]=f[i>>2];f[q+4>>2]=i;f[q+8>>2]=H;f[k>>2]=La;f[g>>2]=f[p>>2];f[g+4>>2]=f[p+4>>2];f[g+8>>2]=f[p+8>>2];f[e>>2]=f[q>>2];f[e+4>>2]=f[q+4>>2];f[e+8>>2]=f[q+8>>2];H=tf(j,g,e,k,c)|0;Se(j);if(!H){ia=0;break d}break}case 3:{$e(j,Ia);f[r>>2]=0;f[r+4>>2]=i;H=f[F>>2]|0;f[r+8>>2]=H;f[s>>2]=f[i>>2];f[s+4>>2]=i;f[s+8>>2]=H;f[k>>2]=La;f[g>>2]=f[r>>2];f[g+4>>2]=f[r+4>>2];f[g+8>>2]=f[r+8>>2];f[e>>2]=f[s>>2];f[e+4>>2]=f[s+4>>2];f[e+8>>2]=f[s+8>>2];H=Af(j,g,e,k,c)|0;ef(j);if(!H){ia=0;break d}break}case 2:{$e(j,Ia);f[t>>2]=0;f[t+4>>2]=i;H=f[F>>2]|0;f[t+8>>2]=H;f[v>>2]=f[i>>2];f[v+4>>2]=i;f[v+8>>2]=H;f[k>>2]=La;f[g>>2]=f[t>>2];f[g+4>>2]=f[t+4>>2];f[g+8>>2]=f[t+8>>2];f[e>>2]=f[v>>2];f[e+4>>2]=f[v+4>>2];f[e+8>>2]=f[v+8>>2];H=Af(j,g,e,k,c)|0;ef(j);if(!H){ia=0;break d}break}case 1:{af(j,Ia);f[w>>2]=0;f[w+4>>2]=i;H=f[F>>2]|0;f[w+8>>2]=H;f[x>>2]=f[i>>2];f[x+4>>2]=i;f[x+8>>2]=H;f[k>>2]=La;f[g>>2]=f[w>>2];f[g+4>>2]=f[w+4>>2];f[g+8>>2]=f[w+8>>2];f[e>>2]=f[x>>2];f[e+4>>2]=f[x+4>>2];f[e+8>>2]=f[x+8>>2];H=zf(j,g,e,k,c)|0;df(j);if(!H){ia=0;break d}break}case 0:{af(j,Ia);f[y>>2]=0;f[y+4>>2]=i;H=f[F>>2]|0;f[y+8>>2]=H;f[z>>2]=f[i>>2];f[z+4>>2]=i;f[z+8>>2]=H;f[k>>2]=La;f[g>>2]=f[y>>2];f[g+4>>2]=f[y+4>>2];f[g+8>>2]=f[y+8>>2];f[e>>2]=f[z>>2];f[e+4>>2]=f[z+4>>2];f[e+8>>2]=f[z+8>>2];H=zf(j,g,e,k,c)|0;df(j);if(!H){ia=0;break d}break}default:{ia=0;break d}}ia=1}while(0);j=f[i+12>>2]|0;if(!j){u=d;return ia|0}i=f[J>>2]|0;if((i|0)!=(j|0))f[J>>2]=i+(~((i+-4-j|0)>>>2)<<2);Oq(j);u=d;return ia|0}function kb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0;d=u;u=u+32|0;e=d;g=a+8|0;h=f[g>>2]|0;f[e>>2]=0;i=e+4|0;f[i>>2]=0;f[e+8>>2]=0;do if(h)if(h>>>0>1073741823)aq(e);else{j=h<<2;k=ln(j)|0;f[e>>2]=k;l=k+(h<<2)|0;f[e+8>>2]=l;sj(k|0,0,j|0)|0;f[i>>2]=l;m=l;n=k;break}else{m=0;n=0}while(0);k=a+1164|0;l=f[k>>2]|0;j=f[l>>2]|0;o=l+4|0;if(!j){p=l+8|0;q=n;r=m;s=h}else{h=f[o>>2]|0;if((h|0)!=(j|0))f[o>>2]=h+(~((h+-4-j|0)>>>2)<<2);Oq(j);j=l+8|0;f[j>>2]=0;f[o>>2]=0;f[l>>2]=0;p=j;q=f[e>>2]|0;r=f[i>>2]|0;s=f[g>>2]|0}f[l>>2]=q;f[o>>2]=r;f[p>>2]=f[e+8>>2];f[e>>2]=0;p=e+4|0;f[p>>2]=0;f[e+8>>2]=0;do if(s)if(s>>>0>1073741823)aq(e);else{r=s<<2;o=ln(r)|0;f[e>>2]=o;q=o+(s<<2)|0;f[e+8>>2]=q;sj(o|0,0,r|0)|0;f[p>>2]=q;t=q;v=o;break}else{t=0;v=0}while(0);s=a+1176|0;o=f[s>>2]|0;q=f[o>>2]|0;r=o+4|0;if(!q){w=o+8|0;x=v;y=t}else{t=f[r>>2]|0;if((t|0)!=(q|0))f[r>>2]=t+(~((t+-4-q|0)>>>2)<<2);Oq(q);q=o+8|0;f[q>>2]=0;f[r>>2]=0;f[o>>2]=0;w=q;x=f[e>>2]|0;y=f[p>>2]|0}f[o>>2]=x;f[r>>2]=y;f[w>>2]=f[e+8>>2];w=f[b>>2]|0;y=b+4|0;r=f[y>>2]|0;x=f[y+4>>2]|0;y=f[c>>2]|0;o=c+4|0;p=f[o>>2]|0;q=f[o+4>>2]|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;f[e+20>>2]=0;o=e+8|0;t=e+4|0;v=e+16|0;l=e+20|0;i=r;Pc(e);j=f[t>>2]|0;h=(f[l>>2]|0)+(f[v>>2]|0)|0;if((f[o>>2]|0)==(j|0))z=0;else z=(f[j+(((h>>>0)/113|0)<<2)>>2]|0)+(((h>>>0)%113|0)*36|0)|0;f[z>>2]=w;h=z+4|0;f[h>>2]=r;f[h+4>>2]=x;f[z+12>>2]=y;h=z+16|0;f[h>>2]=p;f[h+4>>2]=q;f[z+24>>2]=0;f[z+28>>2]=y-w;f[z+32>>2]=0;z=(f[l>>2]|0)+1|0;f[l>>2]=z;if(z|0){w=a+1152|0;y=a+1084|0;h=a+1080|0;j=a+1072|0;m=a+1076|0;n=a+1068|0;A=b+8|0;B=c+8|0;C=a+1124|0;D=a+1120|0;E=a+1112|0;F=a+1116|0;G=a+1108|0;H=i+4|0;I=i+24|0;J=i+24|0;K=p+24|0;L=z;while(1){z=f[v>>2]|0;M=L+-1|0;N=M+z|0;O=f[t>>2]|0;P=f[O+(((N>>>0)/113|0)<<2)>>2]|0;Q=(N>>>0)%113|0;N=f[P+(Q*36|0)>>2]|0;R=f[P+(Q*36|0)+12>>2]|0;S=f[P+(Q*36|0)+24>>2]|0;T=f[P+(Q*36|0)+32>>2]|0;f[l>>2]=M;M=f[o>>2]|0;Q=M-O>>2;if((1-L-z+((Q|0)==0?0:(Q*113|0)+-1|0)|0)>>>0>225){Oq(f[M+-4>>2]|0);f[o>>2]=(f[o>>2]|0)+-4}f[b>>2]=N;f[c>>2]=R;M=f[k>>2]|0;Q=((f[g>>2]|0)+-1|0)==(S|0)?0:S+1|0;S=(f[s>>2]|0)+(T*12|0)|0;z=R-N|0;O=(f[a>>2]|0)-(f[(f[S>>2]|0)+(Q<<2)>>2]|0)|0;a:do if(O){if(z>>>0<3){P=f[w>>2]|0;f[P>>2]=Q;U=f[g>>2]|0;if(U>>>0>1){V=1;W=U;Y=Q;while(1){Y=(Y|0)==(W+-1|0)?0:Y+1|0;f[P+(V<<2)>>2]=Y;V=V+1|0;Z=f[g>>2]|0;if(V>>>0>=Z>>>0){$=Z;break}else W=Z}}else $=U;if(!z){aa=85;break}else{ba=0;ca=$}while(1){W=(f[I>>2]|0)+((X(f[H>>2]|0,N+ba|0)|0)<<2)|0;if(!ca)da=0;else{V=0;do{Y=f[(f[w>>2]|0)+(V<<2)>>2]|0;P=(f[a>>2]|0)-(f[(f[S>>2]|0)+(Y<<2)>>2]|0)|0;do if(P|0){Z=f[y>>2]|0;ea=32-Z|0;fa=32-P|0;ga=f[W+(Y<<2)>>2]<(ea|0)){ha=ga>>>fa;fa=P-ea|0;f[y>>2]=fa;ea=f[h>>2]|ha>>>fa;f[h>>2]=ea;fa=f[j>>2]|0;if((fa|0)==(f[m>>2]|0))Ri(n,h);else{f[fa>>2]=ea;f[j>>2]=fa+4}f[h>>2]=ha<<32-(f[y>>2]|0);break}ha=f[h>>2]|ga>>>Z;f[h>>2]=ha;ga=Z+P|0;f[y>>2]=ga;if((ga|0)!=32)break;ga=f[j>>2]|0;if((ga|0)==(f[m>>2]|0))Ri(n,h);else{f[ga>>2]=ha;f[j>>2]=ga+4}f[h>>2]=0;f[y>>2]=0}while(0);V=V+1|0;P=f[g>>2]|0}while(V>>>0

>>0);da=P}ba=ba+1|0;if(ba>>>0>=z>>>0){aa=85;break a}else ca=da}}U=T+1|0;Ig(M+(U*12|0)|0,f[M+(T*12|0)>>2]|0,f[M+(T*12|0)+4>>2]|0);V=(f[(f[k>>2]|0)+(U*12|0)>>2]|0)+(Q<<2)|0;W=(f[V>>2]|0)+(1<>2]=W;V=f[A>>2]|0;P=f[B>>2]|0;b:do if((R|0)==(N|0))ia=N;else{Y=f[J>>2]|0;if(!V){if((f[Y+(Q<<2)>>2]|0)>>>0>>0){ia=R;break}else{ja=R;ka=N}while(1){ga=ja;do{ga=ga+-1|0;if((ka|0)==(ga|0)){ia=ka;break b}ha=(f[K>>2]|0)+((X(ga,P)|0)<<2)+(Q<<2)|0}while((f[ha>>2]|0)>>>0>=W>>>0);ka=ka+1|0;if((ka|0)==(ga|0)){ia=ga;break b}else ja=ga}}else{la=R;ma=N}while(1){ha=ma;while(1){na=Y+((X(ha,V)|0)<<2)|0;if((f[na+(Q<<2)>>2]|0)>>>0>=W>>>0){oa=la;break}Z=ha+1|0;if((Z|0)==(la|0)){ia=la;break b}else ha=Z}while(1){oa=oa+-1|0;if((ha|0)==(oa|0)){ia=ha;break b}pa=(f[K>>2]|0)+((X(oa,P)|0)<<2)|0;if((f[pa+(Q<<2)>>2]|0)>>>0>>0){qa=0;break}}do{ga=na+(qa<<2)|0;Z=pa+(qa<<2)|0;fa=f[ga>>2]|0;f[ga>>2]=f[Z>>2];f[Z>>2]=fa;qa=qa+1|0}while((qa|0)!=(V|0));ma=ha+1|0;if((ma|0)==(oa|0)){ia=oa;break}else la=oa}}while(0);W=(_(z|0)|0)^31;P=ia-N|0;Y=R-ia|0;fa=P>>>0>>0;if((P|0)!=(Y|0)){Z=f[C>>2]|0;if(fa)f[D>>2]=f[D>>2]|1<<31-Z;ga=Z+1|0;f[C>>2]=ga;if((ga|0)==32){ga=f[E>>2]|0;if((ga|0)==(f[F>>2]|0))Ri(G,D);else{f[ga>>2]=f[D>>2];f[E>>2]=ga+4}f[C>>2]=0;f[D>>2]=0}}ga=z>>>1;if(fa){fa=ga-P|0;if(W|0){Z=0;ea=1<>>1}}}else{ea=ga-Y|0;if(W|0){Z=0;fa=1<>>1}}}fa=f[s>>2]|0;W=f[fa+(T*12|0)>>2]|0;Z=W+(Q<<2)|0;f[Z>>2]=(f[Z>>2]|0)+1;Ig(fa+(U*12|0)|0,W,f[fa+(T*12|0)+4>>2]|0);if((ia|0)!=(N|0)){fa=f[o>>2]|0;W=f[t>>2]|0;Z=fa-W>>2;ea=f[v>>2]|0;ga=f[l>>2]|0;if((((Z|0)==0?0:(Z*113|0)+-1|0)|0)==(ga+ea|0)){Pc(e);ra=f[v>>2]|0;sa=f[l>>2]|0;ta=f[o>>2]|0;ua=f[t>>2]|0}else{ra=ea;sa=ga;ta=fa;ua=W}W=sa+ra|0;if((ta|0)==(ua|0))va=0;else va=(f[ua+(((W>>>0)/113|0)<<2)>>2]|0)+(((W>>>0)%113|0)*36|0)|0;f[va>>2]=N;W=va+4|0;f[W>>2]=r;f[W+4>>2]=x;f[va+12>>2]=ia;f[va+16>>2]=i;f[va+20>>2]=V;f[va+24>>2]=Q;f[va+28>>2]=P;f[va+32>>2]=T;f[l>>2]=(f[l>>2]|0)+1}if((R|0)!=(ia|0)){W=f[o>>2]|0;fa=f[t>>2]|0;ga=W-fa>>2;ea=f[v>>2]|0;Z=f[l>>2]|0;if((((ga|0)==0?0:(ga*113|0)+-1|0)|0)==(Z+ea|0)){Pc(e);wa=f[v>>2]|0;xa=f[l>>2]|0;ya=f[o>>2]|0;za=f[t>>2]|0}else{wa=ea;xa=Z;ya=W;za=fa}fa=xa+wa|0;if((ya|0)==(za|0))Aa=0;else Aa=(f[za+(((fa>>>0)/113|0)<<2)>>2]|0)+(((fa>>>0)%113|0)*36|0)|0;f[Aa>>2]=ia;f[Aa+4>>2]=i;f[Aa+8>>2]=V;f[Aa+12>>2]=R;fa=Aa+16|0;f[fa>>2]=p;f[fa+4>>2]=q;f[Aa+24>>2]=Q;f[Aa+28>>2]=Y;f[Aa+32>>2]=U;fa=(f[l>>2]|0)+1|0;f[l>>2]=fa;Ba=fa}else aa=85}else aa=85;while(0);if((aa|0)==85){aa=0;Ba=f[l>>2]|0}if(!Ba)break;else L=Ba}}Ba=f[t>>2]|0;L=f[v>>2]|0;Aa=Ba+(((L>>>0)/113|0)<<2)|0;q=f[o>>2]|0;p=q;i=Ba;if((q|0)==(Ba|0)){Ca=0;Da=0}else{ia=(f[Aa>>2]|0)+(((L>>>0)%113|0)*36|0)|0;Ca=ia;Da=ia}ia=Aa;Aa=Da;c:while(1){Da=Aa;do{L=Da;if((Ca|0)==(L|0))break c;Da=L+36|0}while((Da-(f[ia>>2]|0)|0)!=4068);Da=ia+4|0;ia=Da;Aa=f[Da>>2]|0}f[l>>2]=0;l=p-i>>2;if(l>>>0>2){i=Ba;do{Oq(f[i>>2]|0);i=(f[t>>2]|0)+4|0;f[t>>2]=i;Ea=f[o>>2]|0;Fa=Ea-i>>2}while(Fa>>>0>2);Ga=Fa;Ha=i;Ia=Ea}else{Ga=l;Ha=Ba;Ia=q}switch(Ga|0){case 1:{Ja=56;aa=99;break}case 2:{Ja=113;aa=99;break}default:{}}if((aa|0)==99)f[v>>2]=Ja;if((Ha|0)!=(Ia|0)){Ja=Ha;do{Oq(f[Ja>>2]|0);Ja=Ja+4|0}while((Ja|0)!=(Ia|0));Ia=f[t>>2]|0;t=f[o>>2]|0;if((t|0)!=(Ia|0))f[o>>2]=t+(~((t+-4-Ia|0)>>>2)<<2)}Ia=f[e>>2]|0;if(!Ia){u=d;return}Oq(Ia);u=d;return}function lb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0;d=u;u=u+32|0;e=d;g=a+8|0;h=f[g>>2]|0;f[e>>2]=0;i=e+4|0;f[i>>2]=0;f[e+8>>2]=0;do if(h)if(h>>>0>1073741823)aq(e);else{j=h<<2;k=ln(j)|0;f[e>>2]=k;l=k+(h<<2)|0;f[e+8>>2]=l;sj(k|0,0,j|0)|0;f[i>>2]=l;m=l;n=k;break}else{m=0;n=0}while(0);k=a+140|0;l=f[k>>2]|0;j=f[l>>2]|0;o=l+4|0;if(!j){p=l+8|0;q=n;r=m;s=h}else{h=f[o>>2]|0;if((h|0)!=(j|0))f[o>>2]=h+(~((h+-4-j|0)>>>2)<<2);Oq(j);j=l+8|0;f[j>>2]=0;f[o>>2]=0;f[l>>2]=0;p=j;q=f[e>>2]|0;r=f[i>>2]|0;s=f[g>>2]|0}f[l>>2]=q;f[o>>2]=r;f[p>>2]=f[e+8>>2];f[e>>2]=0;p=e+4|0;f[p>>2]=0;f[e+8>>2]=0;do if(s)if(s>>>0>1073741823)aq(e);else{r=s<<2;o=ln(r)|0;f[e>>2]=o;q=o+(s<<2)|0;f[e+8>>2]=q;sj(o|0,0,r|0)|0;f[p>>2]=q;t=q;v=o;break}else{t=0;v=0}while(0);s=a+152|0;o=f[s>>2]|0;q=f[o>>2]|0;r=o+4|0;if(!q){w=o+8|0;x=v;y=t}else{t=f[r>>2]|0;if((t|0)!=(q|0))f[r>>2]=t+(~((t+-4-q|0)>>>2)<<2);Oq(q);q=o+8|0;f[q>>2]=0;f[r>>2]=0;f[o>>2]=0;w=q;x=f[e>>2]|0;y=f[p>>2]|0}f[o>>2]=x;f[r>>2]=y;f[w>>2]=f[e+8>>2];w=f[b>>2]|0;y=b+4|0;r=f[y>>2]|0;x=f[y+4>>2]|0;y=f[c>>2]|0;o=c+4|0;p=f[o>>2]|0;q=f[o+4>>2]|0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;f[e+20>>2]=0;o=e+8|0;t=e+4|0;v=e+16|0;l=e+20|0;i=r;Pc(e);j=f[t>>2]|0;h=(f[l>>2]|0)+(f[v>>2]|0)|0;if((f[o>>2]|0)==(j|0))z=0;else z=(f[j+(((h>>>0)/113|0)<<2)>>2]|0)+(((h>>>0)%113|0)*36|0)|0;f[z>>2]=w;h=z+4|0;f[h>>2]=r;f[h+4>>2]=x;f[z+12>>2]=y;h=z+16|0;f[h>>2]=p;f[h+4>>2]=q;f[z+24>>2]=0;f[z+28>>2]=y-w;f[z+32>>2]=0;z=(f[l>>2]|0)+1|0;f[l>>2]=z;if(z|0){w=a+128|0;y=a+60|0;h=a+56|0;j=a+48|0;m=a+52|0;n=a+44|0;A=b+8|0;B=c+8|0;C=a+12|0;D=a+100|0;E=a+96|0;F=a+88|0;G=a+92|0;H=a+84|0;I=i+4|0;J=i+24|0;K=i+24|0;L=p+24|0;M=z;while(1){z=f[v>>2]|0;N=M+-1|0;O=N+z|0;P=f[t>>2]|0;Q=f[P+(((O>>>0)/113|0)<<2)>>2]|0;R=(O>>>0)%113|0;O=f[Q+(R*36|0)>>2]|0;S=f[Q+(R*36|0)+12>>2]|0;T=f[Q+(R*36|0)+24>>2]|0;U=f[Q+(R*36|0)+32>>2]|0;f[l>>2]=N;N=f[o>>2]|0;R=N-P>>2;if((1-M-z+((R|0)==0?0:(R*113|0)+-1|0)|0)>>>0>225){Oq(f[N+-4>>2]|0);f[o>>2]=(f[o>>2]|0)+-4}f[b>>2]=O;f[c>>2]=S;N=f[k>>2]|0;R=((f[g>>2]|0)+-1|0)==(T|0)?0:T+1|0;T=(f[s>>2]|0)+(U*12|0)|0;z=S-O|0;P=(f[a>>2]|0)-(f[(f[T>>2]|0)+(R<<2)>>2]|0)|0;a:do if(P){if(z>>>0<3){Q=f[w>>2]|0;f[Q>>2]=R;V=f[g>>2]|0;if(V>>>0>1){W=1;Y=V;Z=R;while(1){Z=(Z|0)==(Y+-1|0)?0:Z+1|0;f[Q+(W<<2)>>2]=Z;W=W+1|0;$=f[g>>2]|0;if(W>>>0>=$>>>0){aa=$;break}else Y=$}}else aa=V;if(!z){ba=81;break}else{ca=0;da=aa}while(1){Y=(f[J>>2]|0)+((X(f[I>>2]|0,O+ca|0)|0)<<2)|0;if(!da)ea=0;else{W=0;do{Z=f[(f[w>>2]|0)+(W<<2)>>2]|0;Q=(f[a>>2]|0)-(f[(f[T>>2]|0)+(Z<<2)>>2]|0)|0;do if(Q|0){$=f[y>>2]|0;fa=32-$|0;ga=32-Q|0;ha=f[Y+(Z<<2)>>2]<(fa|0)){ia=ha>>>ga;ga=Q-fa|0;f[y>>2]=ga;fa=f[h>>2]|ia>>>ga;f[h>>2]=fa;ga=f[j>>2]|0;if((ga|0)==(f[m>>2]|0))Ri(n,h);else{f[ga>>2]=fa;f[j>>2]=ga+4}f[h>>2]=ia<<32-(f[y>>2]|0);break}ia=f[h>>2]|ha>>>$;f[h>>2]=ia;ha=$+Q|0;f[y>>2]=ha;if((ha|0)!=32)break;ha=f[j>>2]|0;if((ha|0)==(f[m>>2]|0))Ri(n,h);else{f[ha>>2]=ia;f[j>>2]=ha+4}f[h>>2]=0;f[y>>2]=0}while(0);W=W+1|0;Q=f[g>>2]|0}while(W>>>0>>0);ea=Q}ca=ca+1|0;if(ca>>>0>=z>>>0){ba=81;break a}else da=ea}}V=U+1|0;Ig(N+(V*12|0)|0,f[N+(U*12|0)>>2]|0,f[N+(U*12|0)+4>>2]|0);W=(f[(f[k>>2]|0)+(V*12|0)>>2]|0)+(R<<2)|0;Y=(f[W>>2]|0)+(1<>2]=Y;W=f[A>>2]|0;Q=f[B>>2]|0;b:do if((S|0)==(O|0))ja=O;else{Z=f[K>>2]|0;if(!W){if((f[Z+(R<<2)>>2]|0)>>>0>>0){ja=S;break}else{ka=S;la=O}while(1){ha=ka;do{ha=ha+-1|0;if((la|0)==(ha|0)){ja=la;break b}ia=(f[L>>2]|0)+((X(ha,Q)|0)<<2)+(R<<2)|0}while((f[ia>>2]|0)>>>0>=Y>>>0);la=la+1|0;if((la|0)==(ha|0)){ja=ha;break b}else ka=ha}}else{ma=S;na=O}while(1){ia=na;while(1){oa=Z+((X(ia,W)|0)<<2)|0;if((f[oa+(R<<2)>>2]|0)>>>0>=Y>>>0){pa=ma;break}$=ia+1|0;if(($|0)==(ma|0)){ja=ma;break b}else ia=$}while(1){pa=pa+-1|0;if((ia|0)==(pa|0)){ja=ia;break b}qa=(f[L>>2]|0)+((X(pa,Q)|0)<<2)|0;if((f[qa+(R<<2)>>2]|0)>>>0>>0){ra=0;break}}do{ha=oa+(ra<<2)|0;$=qa+(ra<<2)|0;ga=f[ha>>2]|0;f[ha>>2]=f[$>>2];f[$>>2]=ga;ra=ra+1|0}while((ra|0)!=(W|0));na=ia+1|0;if((na|0)==(pa|0)){ja=pa;break}else ma=pa}}while(0);Y=(_(z|0)|0)^31;Q=ja-O|0;Z=S-ja|0;ga=Q>>>0>>0;if((Q|0)!=(Z|0)){$=f[D>>2]|0;if(ga)f[E>>2]=f[E>>2]|1<<31-$;ha=$+1|0;f[D>>2]=ha;if((ha|0)==32){ha=f[F>>2]|0;if((ha|0)==(f[G>>2]|0))Ri(H,E);else{f[ha>>2]=f[E>>2];f[F>>2]=ha+4}f[D>>2]=0;f[E>>2]=0}}ha=z>>>1;if(ga)sg(C,Y,ha-Q|0);else sg(C,Y,ha-Z|0);ha=f[s>>2]|0;Y=f[ha+(U*12|0)>>2]|0;ga=Y+(R<<2)|0;f[ga>>2]=(f[ga>>2]|0)+1;Ig(ha+(V*12|0)|0,Y,f[ha+(U*12|0)+4>>2]|0);if((ja|0)!=(O|0)){ha=f[o>>2]|0;Y=f[t>>2]|0;ga=ha-Y>>2;$=f[v>>2]|0;fa=f[l>>2]|0;if((((ga|0)==0?0:(ga*113|0)+-1|0)|0)==(fa+$|0)){Pc(e);sa=f[v>>2]|0;ta=f[l>>2]|0;ua=f[o>>2]|0;va=f[t>>2]|0}else{sa=$;ta=fa;ua=ha;va=Y}Y=ta+sa|0;if((ua|0)==(va|0))wa=0;else wa=(f[va+(((Y>>>0)/113|0)<<2)>>2]|0)+(((Y>>>0)%113|0)*36|0)|0;f[wa>>2]=O;Y=wa+4|0;f[Y>>2]=r;f[Y+4>>2]=x;f[wa+12>>2]=ja;f[wa+16>>2]=i;f[wa+20>>2]=W;f[wa+24>>2]=R;f[wa+28>>2]=Q;f[wa+32>>2]=U;f[l>>2]=(f[l>>2]|0)+1}if((S|0)!=(ja|0)){Q=f[o>>2]|0;Y=f[t>>2]|0;ha=Q-Y>>2;fa=f[v>>2]|0;$=f[l>>2]|0;if((((ha|0)==0?0:(ha*113|0)+-1|0)|0)==($+fa|0)){Pc(e);xa=f[v>>2]|0;ya=f[l>>2]|0;za=f[o>>2]|0;Aa=f[t>>2]|0}else{xa=fa;ya=$;za=Q;Aa=Y}Y=ya+xa|0;if((za|0)==(Aa|0))Ba=0;else Ba=(f[Aa+(((Y>>>0)/113|0)<<2)>>2]|0)+(((Y>>>0)%113|0)*36|0)|0;f[Ba>>2]=ja;f[Ba+4>>2]=i;f[Ba+8>>2]=W;f[Ba+12>>2]=S;Y=Ba+16|0;f[Y>>2]=p;f[Y+4>>2]=q;f[Ba+24>>2]=R;f[Ba+28>>2]=Z;f[Ba+32>>2]=V;Z=(f[l>>2]|0)+1|0;f[l>>2]=Z;Ca=Z}else ba=81}else ba=81;while(0);if((ba|0)==81){ba=0;Ca=f[l>>2]|0}if(!Ca)break;else M=Ca}}Ca=f[t>>2]|0;M=f[v>>2]|0;Ba=Ca+(((M>>>0)/113|0)<<2)|0;q=f[o>>2]|0;p=q;i=Ca;if((q|0)==(Ca|0)){Da=0;Ea=0}else{ja=(f[Ba>>2]|0)+(((M>>>0)%113|0)*36|0)|0;Da=ja;Ea=ja}ja=Ba;Ba=Ea;c:while(1){Ea=Ba;do{M=Ea;if((Da|0)==(M|0))break c;Ea=M+36|0}while((Ea-(f[ja>>2]|0)|0)!=4068);Ea=ja+4|0;ja=Ea;Ba=f[Ea>>2]|0}f[l>>2]=0;l=p-i>>2;if(l>>>0>2){i=Ca;do{Oq(f[i>>2]|0);i=(f[t>>2]|0)+4|0;f[t>>2]=i;Fa=f[o>>2]|0;Ga=Fa-i>>2}while(Ga>>>0>2);Ha=Ga;Ia=i;Ja=Fa}else{Ha=l;Ia=Ca;Ja=q}switch(Ha|0){case 1:{Ka=56;ba=95;break}case 2:{Ka=113;ba=95;break}default:{}}if((ba|0)==95)f[v>>2]=Ka;if((Ia|0)!=(Ja|0)){Ka=Ia;do{Oq(f[Ka>>2]|0);Ka=Ka+4|0}while((Ka|0)!=(Ja|0));Ja=f[t>>2]|0;t=f[o>>2]|0;if((t|0)!=(Ja|0))f[o>>2]=t+(~((t+-4-Ja|0)>>>2)<<2)}Ja=f[e>>2]|0;if(!Ja){u=d;return}Oq(Ja);u=d;return}function mb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=Oa,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=un(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Vn(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;if(!(b[a+32>>0]|0)){r=o;m=0;while(1){s=$(b[r>>0]|0);n[g+(m<<2)>>2]=s;m=m+1|0;q=b[k>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){t=q;break}else r=r+1|0}}else{r=o;m=0;while(1){s=$($(b[r>>0]|0)/$(127.0));n[g+(m<<2)>>2]=s;m=m+1|0;q=b[k>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){t=q;break}else r=r+1|0}}}else t=l;r=t<<24>>24;if(t<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 2:{r=a+24|0;m=b[r>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){k=f[f[a>>2]>>2]|0;o=a+40|0;q=un(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;u=Vn(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=k+u|0;if(!(b[a+32>>0]|0)){u=o;k=0;while(1){s=$(h[u>>0]|0);n[g+(k<<2)>>2]=s;k=k+1|0;q=b[r>>0]|0;if((k|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){v=q;break}else u=u+1|0}}else{u=o;k=0;while(1){s=$($(h[u>>0]|0)/$(255.0));n[g+(k<<2)>>2]=s;k=k+1|0;l=b[r>>0]|0;if((k|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){v=l;break}else u=u+1|0}}}else v=m;u=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 3:{u=a+48|0;k=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Vn(un(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,k|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;l=0;while(1){s=$(d[u>>1]|0);n[g+(l<<2)>>2]=s;l=l+1|0;q=b[r>>0]|0;if((l|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){w=q;break}else u=u+2|0}}else{u=o;l=0;while(1){s=$($(d[u>>1]|0)/$(32767.0));n[g+(l<<2)>>2]=s;l=l+1|0;m=b[r>>0]|0;if((l|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else u=u+2|0}}else w=k;u=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 4:{u=a+48|0;l=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Vn(un(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,l|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;l=b[r>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;m=0;while(1){s=$(j[u>>1]|0);n[g+(m<<2)>>2]=s;m=m+1|0;q=b[r>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){x=q;break}else u=u+2|0}}else{u=o;m=0;while(1){s=$($(j[u>>1]|0)/$(65535.0));n[g+(m<<2)>>2]=s;m=m+1|0;k=b[r>>0]|0;if((m|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){x=k;break}else u=u+2|0}}else x=l;u=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 5:{u=a+48|0;m=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Vn(un(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,m|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;m=b[r>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;k=0;while(1){s=$(f[u>>2]|0);n[g+(k<<2)>>2]=s;k=k+1|0;q=b[r>>0]|0;if((k|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){y=q;break}else u=u+4|0}}else{u=o;k=0;while(1){s=$($(f[u>>2]|0)*$(4.65661287e-10));n[g+(k<<2)>>2]=s;k=k+1|0;l=b[r>>0]|0;if((k|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){y=l;break}else u=u+4|0}}else y=m;u=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 6:{u=a+48|0;k=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Vn(un(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,k|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;l=0;while(1){s=$((f[u>>2]|0)>>>0);n[g+(l<<2)>>2]=s;l=l+1|0;q=b[r>>0]|0;if((l|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){z=q;break}else u=u+4|0}}else{u=o;l=0;while(1){s=$($((f[u>>2]|0)>>>0)*$(2.32830644e-10));n[g+(l<<2)>>2]=s;l=l+1|0;m=b[r>>0]|0;if((l|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){z=m;break}else u=u+4|0}}else z=k;u=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 7:{u=a+48|0;l=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Vn(un(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,l|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;l=b[r>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;m=0;while(1){q=u;s=$(+((f[q>>2]|0)>>>0)+4294967296.0*+(f[q+4>>2]|0));n[g+(m<<2)>>2]=s;m=m+1|0;q=b[r>>0]|0;if((m|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else u=u+8|0}}else{u=o;m=0;while(1){k=u;s=$($(+((f[k>>2]|0)>>>0)+4294967296.0*+(f[k+4>>2]|0))*$(1.08420217e-19));n[g+(m<<2)>>2]=s;m=m+1|0;k=b[r>>0]|0;if((m|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){A=k;break}else u=u+8|0}}else A=l;u=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 8:{u=a+48|0;m=f[u>>2]|0;r=f[u+4>>2]|0;u=a+40|0;o=(Vn(un(f[u>>2]|0,f[u+4>>2]|0,f[c>>2]|0,0)|0,I|0,m|0,r|0)|0)+(f[f[a>>2]>>2]|0)|0;r=a+24|0;m=b[r>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0)if(!(b[a+32>>0]|0)){u=o;k=0;while(1){q=u;s=$(+((f[q>>2]|0)>>>0)+4294967296.0*+((f[q+4>>2]|0)>>>0));n[g+(k<<2)>>2]=s;k=k+1|0;q=b[r>>0]|0;if((k|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){B=q;break}else u=u+8|0}}else{u=o;k=0;while(1){l=u;s=$($(+((f[l>>2]|0)>>>0)+4294967296.0*+((f[l+4>>2]|0)>>>0))*$(5.42101086e-20));n[g+(k<<2)>>2]=s;k=k+1|0;l=b[r>>0]|0;if((k|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){B=l;break}else u=u+8|0}}else B=m;u=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(u<<2)|0,0,(e<<24>>24)-u<<2|0)|0;i=1;return i|0}case 9:{u=a+24|0;k=b[u>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){r=f[f[a>>2]>>2]|0;o=a+40|0;l=un(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;q=Vn(l|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=r+q|0;q=0;while(1){f[g+(q<<2)>>2]=f[o>>2];q=q+1|0;r=b[u>>0]|0;if((q|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){C=r;break}else o=o+4|0}}else C=k;o=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 10:{o=a+24|0;q=b[o>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){u=f[f[a>>2]>>2]|0;m=a+40|0;r=un(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;l=Vn(r|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=u+l|0;l=0;while(1){s=$(+p[m>>3]);n[g+(l<<2)>>2]=s;l=l+1|0;u=b[o>>0]|0;if((l|0)>=((u<<24>>24>e<<24>>24?e:u)<<24>>24|0)){D=u;break}else m=m+8|0}}else D=q;m=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 11:{m=a+24|0;l=b[m>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){o=f[f[a>>2]>>2]|0;k=a+40|0;u=un(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;r=Vn(u|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=o+r|0;r=0;while(1){s=$((b[k>>0]|0)!=0&1);n[g+(r<<2)>>2]=s;r=r+1|0;o=b[m>>0]|0;if((r|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){E=o;break}else k=k+1|0}}else E=l;k=E<<24>>24;if(E<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function nb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0.0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0.0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0.0,kb=0.0,lb=0.0,mb=0.0,nb=0.0,ob=0.0,pb=0.0,qb=0.0,rb=0.0,sb=0.0,tb=0;i=u;u=u+512|0;j=i;k=d+c|0;l=0-k|0;m=a+4|0;n=a+100|0;o=b;b=0;a:while(1){switch(o|0){case 46:{p=6;break a;break}case 48:break;default:{q=0;r=o;s=b;t=0;v=0;break a}}w=f[m>>2]|0;if(w>>>0<(f[n>>2]|0)>>>0){f[m>>2]=w+1;o=h[w>>0]|0;b=1;continue}else{o=Si(a)|0;b=1;continue}}if((p|0)==6){o=f[m>>2]|0;if(o>>>0<(f[n>>2]|0)>>>0){f[m>>2]=o+1;x=h[o>>0]|0}else x=Si(a)|0;if((x|0)==48){o=0;w=0;while(1){y=Vn(o|0,w|0,-1,-1)|0;z=I;A=f[m>>2]|0;if(A>>>0<(f[n>>2]|0)>>>0){f[m>>2]=A+1;B=h[A>>0]|0}else B=Si(a)|0;if((B|0)==48){o=y;w=z}else{q=1;r=B;s=1;t=y;v=z;break}}}else{q=1;r=x;s=b;t=0;v=0}}f[j>>2]=0;b=r+-48|0;x=(r|0)==46;b:do if(x|b>>>0<10){B=j+496|0;w=0;o=0;z=0;y=q;A=s;C=r;D=x;E=b;F=t;G=v;H=0;J=0;c:while(1){do if(D)if(!y){L=w;M=o;N=1;O=z;P=A;Q=H;R=J;S=H;T=J}else break c;else{U=Vn(H|0,J|0,1,0)|0;V=I;W=(C|0)!=48;if((o|0)>=125){if(!W){L=w;M=o;N=y;O=z;P=A;Q=F;R=G;S=U;T=V;break}f[B>>2]=f[B>>2]|1;L=w;M=o;N=y;O=z;P=A;Q=F;R=G;S=U;T=V;break}Y=j+(o<<2)|0;if(!w)Z=E;else Z=C+-48+((f[Y>>2]|0)*10|0)|0;f[Y>>2]=Z;Y=w+1|0;_=(Y|0)==9;L=_?0:Y;M=o+(_&1)|0;N=y;O=W?U:z;P=1;Q=F;R=G;S=U;T=V}while(0);V=f[m>>2]|0;if(V>>>0<(f[n>>2]|0)>>>0){f[m>>2]=V+1;$=h[V>>0]|0}else $=Si(a)|0;E=$+-48|0;D=($|0)==46;if(!(D|E>>>0<10)){aa=L;ba=M;ca=O;da=N;ea=$;fa=P;ga=S;ha=Q;ia=T;ja=R;p=29;break b}else{w=L;o=M;z=O;y=N;A=P;C=$;F=Q;G=R;H=S;J=T}}ka=w;la=o;ma=z;na=H;oa=J;pa=F;qa=G;ra=(A|0)!=0;p=37}else{aa=0;ba=0;ca=0;da=q;ea=r;fa=s;ga=0;ha=t;ia=0;ja=v;p=29}while(0);do if((p|0)==29){v=(da|0)==0;t=v?ga:ha;s=v?ia:ja;v=(fa|0)!=0;if(!(v&(ea|32|0)==101))if((ea|0)>-1){ka=aa;la=ba;ma=ca;na=ga;oa=ia;pa=t;qa=s;ra=v;p=37;break}else{sa=aa;ta=ba;ua=ca;va=ga;wa=ia;xa=v;ya=t;za=s;p=39;break}v=Re(a,g)|0;r=I;if((v|0)==0&(r|0)==-2147483648){if(!g){Ym(a,0);Aa=0.0;break}if(!(f[n>>2]|0)){Ba=0;Ca=0}else{f[m>>2]=(f[m>>2]|0)+-1;Ba=0;Ca=0}}else{Ba=v;Ca=r}r=Vn(Ba|0,Ca|0,t|0,s|0)|0;Da=aa;Ea=ba;Fa=ca;Ga=r;Ha=ga;Ia=I;Ja=ia;p=41}while(0);if((p|0)==37)if(f[n>>2]|0){f[m>>2]=(f[m>>2]|0)+-1;if(ra){Da=ka;Ea=la;Fa=ma;Ga=pa;Ha=na;Ia=qa;Ja=oa;p=41}else p=40}else{sa=ka;ta=la;ua=ma;va=na;wa=oa;xa=ra;ya=pa;za=qa;p=39}if((p|0)==39)if(xa){Da=sa;Ea=ta;Fa=ua;Ga=ya;Ha=va;Ia=za;Ja=wa;p=41}else p=40;do if((p|0)==40){wa=Vq()|0;f[wa>>2]=22;Ym(a,0);Aa=0.0}else if((p|0)==41){wa=f[j>>2]|0;if(!wa){Aa=+(e|0)*0.0;break}if(((Ja|0)<0|(Ja|0)==0&Ha>>>0<10)&((Ga|0)==(Ha|0)&(Ia|0)==(Ja|0))?(c|0)>30|(wa>>>c|0)==0:0){Aa=+(e|0)*+(wa>>>0);break}wa=(d|0)/-2|0;za=((wa|0)<0)<<31>>31;if((Ia|0)>(za|0)|(Ia|0)==(za|0)&Ga>>>0>wa>>>0){wa=Vq()|0;f[wa>>2]=34;Aa=+(e|0)*1797693134862315708145274.0e284*1797693134862315708145274.0e284;break}wa=d+-106|0;za=((wa|0)<0)<<31>>31;if((Ia|0)<(za|0)|(Ia|0)==(za|0)&Ga>>>0>>0){wa=Vq()|0;f[wa>>2]=34;Aa=+(e|0)*2.2250738585072014e-308*2.2250738585072014e-308;break}if(!Da)Ka=Ea;else{if((Da|0)<9){wa=j+(Ea<<2)|0;za=Da;va=f[wa>>2]|0;while(1){va=va*10|0;if((za|0)>=8)break;else za=za+1|0}f[wa>>2]=va}Ka=Ea+1|0}if((Fa|0)<9?(Fa|0)<=(Ga|0)&(Ga|0)<18:0){if((Ga|0)==9){Aa=+(e|0)*+((f[j>>2]|0)>>>0);break}if((Ga|0)<9){Aa=+(e|0)*+((f[j>>2]|0)>>>0)/+(f[6720+(8-Ga<<2)>>2]|0);break}za=c+27+(X(Ga,-3)|0)|0;A=f[j>>2]|0;if((za|0)>30|(A>>>za|0)==0){Aa=+(e|0)*+(A>>>0)*+(f[6720+(Ga+-10<<2)>>2]|0);break}}A=(Ga|0)%9|0;if(!A){La=0;Ma=Ka;Na=0;Oa=Ga}else{za=(Ga|0)>-1?A:A+9|0;A=f[6720+(8-za<<2)>>2]|0;if(Ka){G=1e9/(A|0)|0;F=0;J=0;H=Ga;z=0;do{o=j+(z<<2)|0;w=f[o>>2]|0;ya=((w>>>0)/(A>>>0)|0)+F|0;f[o>>2]=ya;F=X(G,(w>>>0)%(A>>>0)|0)|0;w=(z|0)==(J|0)&(ya|0)==0;H=w?H+-9|0:H;J=w?J+1&127:J;z=z+1|0}while((z|0)!=(Ka|0));if(!F){Pa=J;Qa=Ka;Ra=H}else{f[j+(Ka<<2)>>2]=F;Pa=J;Qa=Ka+1|0;Ra=H}}else{Pa=0;Qa=0;Ra=Ga}La=0;Ma=Qa;Na=Pa;Oa=9-za+Ra|0}d:while(1){z=(Oa|0)<18;A=(Oa|0)==18;G=j+(Na<<2)|0;va=La;wa=Ma;while(1){if(!z){if(!A){Sa=va;Ta=Na;Ua=Oa;Va=wa;break d}if((f[G>>2]|0)>>>0>=9007199){Sa=va;Ta=Na;Ua=18;Va=wa;break d}}w=0;Wa=wa;ya=wa+127|0;while(1){o=ya&127;ua=j+(o<<2)|0;ta=Tn(f[ua>>2]|0,0,29)|0;sa=Vn(ta|0,I|0,w|0,0)|0;ta=I;if(ta>>>0>0|(ta|0)==0&sa>>>0>1e9){xa=jp(sa|0,ta|0,1e9,0)|0;qa=hn(sa|0,ta|0,1e9,0)|0;Xa=xa;Ya=qa}else{Xa=0;Ya=sa}f[ua>>2]=Ya;ua=(o|0)==(Na|0);Wa=(Ya|0)==0&(((o|0)!=(Wa+127&127|0)|ua)^1)?o:Wa;if(ua)break;else{w=Xa;ya=o+-1|0}}va=va+-29|0;if(Xa|0)break;else wa=Wa}wa=Na+127&127;G=Wa+127&127;A=j+((Wa+126&127)<<2)|0;if((wa|0)==(Wa|0)){f[A>>2]=f[A>>2]|f[j+(G<<2)>>2];Za=G}else Za=Wa;f[j+(wa<<2)>>2]=Xa;La=va;Ma=Za;Na=wa;Oa=Oa+9|0}e:while(1){za=Va+1&127;H=j+((Va+127&127)<<2)|0;J=Sa;F=Ta;wa=Ua;while(1){G=(wa|0)==18;A=(wa|0)>27?9:1;_a=J;$a=F;while(1){z=0;while(1){ya=z+$a&127;if((ya|0)==(Va|0)){ab=2;p=88;break}w=f[j+(ya<<2)>>2]|0;ya=f[6752+(z<<2)>>2]|0;if(w>>>0>>0){ab=2;p=88;break}if(w>>>0>ya>>>0)break;ya=z+1|0;if((z|0)<1)z=ya;else{ab=ya;p=88;break}}if((p|0)==88?(p=0,G&(ab|0)==2):0){bb=0.0;cb=0;db=Va;break e}eb=A+_a|0;if(($a|0)==(Va|0)){_a=eb;$a=Va}else break}G=(1<>>A;fb=0;gb=$a;hb=wa;ya=$a;do{w=j+(ya<<2)|0;o=f[w>>2]|0;ua=(o>>>A)+fb|0;f[w>>2]=ua;fb=X(o&G,z)|0;o=(ya|0)==(gb|0)&(ua|0)==0;hb=o?hb+-9|0:hb;gb=o?gb+1&127:gb;ya=ya+1&127}while((ya|0)!=(Va|0));if(!fb){J=eb;F=gb;wa=hb;continue}if((za|0)!=(gb|0))break;f[H>>2]=f[H>>2]|1;J=eb;F=gb;wa=hb}f[j+(Va<<2)>>2]=fb;Sa=eb;Ta=gb;Ua=hb;Va=za}while(1){wa=cb+$a&127;F=db+1&127;if((wa|0)==(db|0)){f[j+(F+-1<<2)>>2]=0;ib=F}else ib=db;bb=bb*1.0e9+ +((f[j+(wa<<2)>>2]|0)>>>0);cb=cb+1|0;if((cb|0)==2)break;else db=ib}jb=+(e|0);kb=bb*jb;wa=_a+53|0;F=wa-d|0;J=(F|0)<(c|0);H=J?((F|0)>0?F:0):c;if((H|0)<53){lb=+rq(+bk(1.0,105-H|0),kb);mb=+Dq(kb,+bk(1.0,53-H|0));nb=lb;ob=mb;pb=lb+(kb-mb)}else{nb=0.0;ob=0.0;pb=kb}va=$a+2&127;if((va|0)!=(ib|0)){ya=f[j+(va<<2)>>2]|0;do if(ya>>>0>=5e8){if((ya|0)!=5e8){qb=jb*.75+ob;break}if(($a+3&127|0)==(ib|0)){qb=jb*.5+ob;break}else{qb=jb*.75+ob;break}}else{if((ya|0)==0?($a+3&127|0)==(ib|0):0){qb=ob;break}qb=jb*.25+ob}while(0);if((53-H|0)>1?!(+Dq(qb,1.0)!=0.0):0)rb=qb+1.0;else rb=qb}else rb=ob;jb=pb+rb-nb;do if((wa&2147483647|0)>(-2-k|0)){ya=!(+K(+jb)>=9007199254740992.0);va=_a+((ya^1)&1)|0;kb=ya?jb:jb*.5;if((va+50|0)<=(l|0)?!(rb!=0.0&(J&((H|0)!=(F|0)|ya))):0){sb=kb;tb=va;break}ya=Vq()|0;f[ya>>2]=34;sb=kb;tb=va}else{sb=jb;tb=_a}while(0);Aa=+sq(sb,tb)}while(0);u=i;return +Aa}function ob(a,c,d,e,g,i){a=a|0;c=+c;d=d|0;e=e|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0,D=0.0,E=0,F=0,G=0,H=0.0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0.0,ga=0.0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0;j=u;u=u+560|0;k=j+8|0;l=j;m=j+524|0;n=m;o=j+512|0;f[l>>2]=0;p=o+12|0;yo(c)|0;if((I|0)<0){q=-c;r=1;s=16605}else{q=c;r=(g&2049|0)!=0&1;s=(g&2048|0)==0?((g&1|0)==0?16606:16611):16608}yo(q)|0;do if(0==0&(I&2146435072|0)==2146435072){t=(i&32|0)!=0;v=r+3|0;Qk(a,32,d,v,g&-65537);Xo(a,s,r);Xo(a,q!=q|0.0!=0.0?(t?18555:16632):t?16624:16628,3);Qk(a,32,d,v,g^8192);w=v}else{c=+tq(q,l)*2.0;v=c!=0.0;if(v)f[l>>2]=(f[l>>2]|0)+-1;t=i|32;if((t|0)==97){x=i&32;y=(x|0)==0?s:s+9|0;z=r|2;A=12-e|0;do if(!(e>>>0>11|(A|0)==0)){B=8.0;C=A;do{C=C+-1|0;B=B*16.0}while((C|0)!=0);if((b[y>>0]|0)==45){D=-(B+(-c-B));break}else{D=c+B-B;break}}else D=c;while(0);A=f[l>>2]|0;C=(A|0)<0?0-A|0:A;E=Rj(C,((C|0)<0)<<31>>31,p)|0;if((E|0)==(p|0)){C=o+11|0;b[C>>0]=48;F=C}else F=E;b[F+-1>>0]=(A>>31&2)+43;A=F+-2|0;b[A>>0]=i+15;E=(e|0)<1;C=(g&8|0)==0;G=m;H=D;while(1){J=~~H;K=G+1|0;b[G>>0]=x|h[16636+J>>0];H=(H-+(J|0))*16.0;if((K-n|0)==1?!(C&(E&H==0.0)):0){b[K>>0]=46;L=G+2|0}else L=K;if(!(H!=0.0))break;else G=L}G=L;if((e|0)!=0?(-2-n+G|0)<(e|0):0){M=G-n|0;N=e+2|0}else{E=G-n|0;M=E;N=E}E=p-A|0;G=E+z+N|0;Qk(a,32,d,G,g);Xo(a,y,z);Qk(a,48,d,G,g^65536);Xo(a,m,M);Qk(a,48,N-M|0,0,0);Xo(a,A,E);Qk(a,32,d,G,g^8192);w=G;break}G=(e|0)<0?6:e;if(v){E=(f[l>>2]|0)+-28|0;f[l>>2]=E;O=c*268435456.0;P=E}else{O=c;P=f[l>>2]|0}E=(P|0)<0?k:k+288|0;C=E;H=O;do{x=~~H>>>0;f[C>>2]=x;C=C+4|0;H=(H-+(x>>>0))*1.0e9}while(H!=0.0);if((P|0)>0){v=E;A=C;z=P;while(1){y=(z|0)<29?z:29;x=A+-4|0;if(x>>>0>=v>>>0){K=x;x=0;do{J=Tn(f[K>>2]|0,0,y|0)|0;Q=Vn(J|0,I|0,x|0,0)|0;J=I;R=hn(Q|0,J|0,1e9,0)|0;f[K>>2]=R;x=jp(Q|0,J|0,1e9,0)|0;K=K+-4|0}while(K>>>0>=v>>>0);if(x){K=v+-4|0;f[K>>2]=x;S=K}else S=v}else S=v;K=A;while(1){if(K>>>0<=S>>>0)break;J=K+-4|0;if(!(f[J>>2]|0))K=J;else break}x=(f[l>>2]|0)-y|0;f[l>>2]=x;if((x|0)>0){v=S;A=K;z=x}else{T=S;U=K;V=x;break}}}else{T=E;U=C;V=P}if((V|0)<0){z=((G+25|0)/9|0)+1|0;A=(t|0)==102;v=T;x=U;J=V;while(1){Q=0-J|0;R=(Q|0)<9?Q:9;if(v>>>0>>0){Q=(1<>>R;Y=0;Z=v;do{_=f[Z>>2]|0;f[Z>>2]=(_>>>R)+Y;Y=X(_&Q,W)|0;Z=Z+4|0}while(Z>>>0>>0);Z=(f[v>>2]|0)==0?v+4|0:v;if(!Y){$=Z;aa=x}else{f[x>>2]=Y;$=Z;aa=x+4|0}}else{$=(f[v>>2]|0)==0?v+4|0:v;aa=x}Z=A?E:$;W=(aa-Z>>2|0)>(z|0)?Z+(z<<2)|0:aa;J=(f[l>>2]|0)+R|0;f[l>>2]=J;if((J|0)>=0){ba=$;ca=W;break}else{v=$;x=W}}}else{ba=T;ca=U}x=E;if(ba>>>0>>0){v=(x-ba>>2)*9|0;J=f[ba>>2]|0;if(J>>>0<10)da=v;else{z=v;v=10;while(1){v=v*10|0;A=z+1|0;if(J>>>0>>0){da=A;break}else z=A}}}else da=0;z=(t|0)==103;v=(G|0)!=0;J=G-((t|0)!=102?da:0)+((v&z)<<31>>31)|0;if((J|0)<(((ca-x>>2)*9|0)+-9|0)){A=J+9216|0;J=E+4+(((A|0)/9|0)+-1024<<2)|0;C=(A|0)%9|0;if((C|0)<8){A=C;C=10;while(1){W=C*10|0;if((A|0)<7){A=A+1|0;C=W}else{ea=W;break}}}else ea=10;C=f[J>>2]|0;A=(C>>>0)%(ea>>>0)|0;t=(J+4|0)==(ca|0);if(!(t&(A|0)==0)){B=(((C>>>0)/(ea>>>0)|0)&1|0)==0?9007199254740992.0:9007199254740994.0;W=(ea|0)/2|0;H=A>>>0>>0?.5:t&(A|0)==(W|0)?1.0:1.5;if(!r){fa=H;ga=B}else{W=(b[s>>0]|0)==45;fa=W?-H:H;ga=W?-B:B}W=C-A|0;f[J>>2]=W;if(ga+fa!=ga){A=W+ea|0;f[J>>2]=A;if(A>>>0>999999999){A=ba;W=J;while(1){C=W+-4|0;f[W>>2]=0;if(C>>>0>>0){t=A+-4|0;f[t>>2]=0;ha=t}else ha=A;t=(f[C>>2]|0)+1|0;f[C>>2]=t;if(t>>>0>999999999){A=ha;W=C}else{ia=ha;ja=C;break}}}else{ia=ba;ja=J}W=(x-ia>>2)*9|0;A=f[ia>>2]|0;if(A>>>0<10){ka=ja;la=W;ma=ia}else{C=W;W=10;while(1){W=W*10|0;t=C+1|0;if(A>>>0>>0){ka=ja;la=t;ma=ia;break}else C=t}}}else{ka=J;la=da;ma=ba}}else{ka=J;la=da;ma=ba}C=ka+4|0;na=la;oa=ca>>>0>C>>>0?C:ca;pa=ma}else{na=da;oa=ca;pa=ba}C=oa;while(1){if(C>>>0<=pa>>>0){qa=0;break}W=C+-4|0;if(!(f[W>>2]|0))C=W;else{qa=1;break}}J=0-na|0;do if(z){W=G+((v^1)&1)|0;if((W|0)>(na|0)&(na|0)>-5){ra=i+-1|0;sa=W+-1-na|0}else{ra=i+-2|0;sa=W+-1|0}W=g&8;if(!W){if(qa?(A=f[C+-4>>2]|0,(A|0)!=0):0)if(!((A>>>0)%10|0)){t=0;Z=10;while(1){Z=Z*10|0;Q=t+1|0;if((A>>>0)%(Z>>>0)|0|0){ta=Q;break}else t=Q}}else ta=0;else ta=9;t=((C-x>>2)*9|0)+-9|0;if((ra|32|0)==102){Z=t-ta|0;A=(Z|0)>0?Z:0;ua=ra;va=(sa|0)<(A|0)?sa:A;wa=0;break}else{A=t+na-ta|0;t=(A|0)>0?A:0;ua=ra;va=(sa|0)<(t|0)?sa:t;wa=0;break}}else{ua=ra;va=sa;wa=W}}else{ua=i;va=G;wa=g&8}while(0);G=va|wa;x=(G|0)!=0&1;v=(ua|32|0)==102;if(v){xa=0;ya=(na|0)>0?na:0}else{z=(na|0)<0?J:na;t=Rj(z,((z|0)<0)<<31>>31,p)|0;z=p;if((z-t|0)<2){A=t;while(1){Z=A+-1|0;b[Z>>0]=48;if((z-Z|0)<2)A=Z;else{za=Z;break}}}else za=t;b[za+-1>>0]=(na>>31&2)+43;A=za+-2|0;b[A>>0]=ua;xa=A;ya=z-A|0}A=r+1+va+x+ya|0;Qk(a,32,d,A,g);Xo(a,s,r);Qk(a,48,d,A,g^65536);if(v){J=pa>>>0>E>>>0?E:pa;Z=m+9|0;R=Z;Y=m+8|0;Q=J;do{K=Rj(f[Q>>2]|0,0,Z)|0;if((Q|0)==(J|0))if((K|0)==(Z|0)){b[Y>>0]=48;Aa=Y}else Aa=K;else if(K>>>0>m>>>0){sj(m|0,48,K-n|0)|0;y=K;while(1){_=y+-1|0;if(_>>>0>m>>>0)y=_;else{Aa=_;break}}}else Aa=K;Xo(a,Aa,R-Aa|0);Q=Q+4|0}while(Q>>>0<=E>>>0);if(G|0)Xo(a,16652,1);if(Q>>>0>>0&(va|0)>0){E=va;R=Q;while(1){Y=Rj(f[R>>2]|0,0,Z)|0;if(Y>>>0>m>>>0){sj(m|0,48,Y-n|0)|0;J=Y;while(1){v=J+-1|0;if(v>>>0>m>>>0)J=v;else{Ba=v;break}}}else Ba=Y;Xo(a,Ba,(E|0)<9?E:9);R=R+4|0;J=E+-9|0;if(!(R>>>0>>0&(E|0)>9)){Ca=J;break}else E=J}}else Ca=va;Qk(a,48,Ca+9|0,9,0)}else{E=qa?C:pa+4|0;if((va|0)>-1){R=m+9|0;Z=(wa|0)==0;Q=R;G=0-n|0;J=m+8|0;K=va;v=pa;while(1){x=Rj(f[v>>2]|0,0,R)|0;if((x|0)==(R|0)){b[J>>0]=48;Da=J}else Da=x;do if((v|0)==(pa|0)){x=Da+1|0;Xo(a,Da,1);if(Z&(K|0)<1){Ea=x;break}Xo(a,16652,1);Ea=x}else{if(Da>>>0<=m>>>0){Ea=Da;break}sj(m|0,48,Da+G|0)|0;x=Da;while(1){z=x+-1|0;if(z>>>0>m>>>0)x=z;else{Ea=z;break}}}while(0);Y=Q-Ea|0;Xo(a,Ea,(K|0)>(Y|0)?Y:K);x=K-Y|0;v=v+4|0;if(!(v>>>0>>0&(x|0)>-1)){Fa=x;break}else K=x}}else Fa=va;Qk(a,48,Fa+18|0,18,0);Xo(a,xa,p-xa|0)}Qk(a,32,d,A,g^8192);w=A}while(0);u=j;return ((w|0)<(d|0)?d:w)|0}function pb(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0;c=u;u=u+64|0;d=c+56|0;e=c+52|0;g=c+48|0;h=c+60|0;i=c;j=c+44|0;k=c+40|0;l=c+36|0;m=c+32|0;n=c+28|0;o=c+24|0;p=c+20|0;q=c+16|0;r=c+12|0;if(!(b[a+288>>0]|0)){_e(d,f[a+8>>2]|0);s=a+12|0;t=f[d>>2]|0;f[d>>2]=0;v=f[s>>2]|0;f[s>>2]=t;if(v){Ii(v);Oq(v);v=f[d>>2]|0;f[d>>2]=0;if(v|0){Ii(v);Oq(v)}}else f[d>>2]=0}else{fh(d,f[a+8>>2]|0);v=a+12|0;t=f[d>>2]|0;f[d>>2]=0;s=f[v>>2]|0;f[v>>2]=t;if(s){Ii(s);Oq(s);s=f[d>>2]|0;f[d>>2]=0;if(s|0){Ii(s);Oq(s)}}else f[d>>2]=0}s=a+12|0;t=f[s>>2]|0;if(!t){w=0;u=c;return w|0}if((((f[t+4>>2]|0)-(f[t>>2]|0)>>2>>>0)/3|0|0)==(f[t+40>>2]|0)){w=0;u=c;return w|0}v=a+200|0;f[a+264>>2]=a;x=a+4|0;ci(((f[t+28>>2]|0)-(f[t+24>>2]|0)>>2)-(f[t+44>>2]|0)|0,f[(f[x>>2]|0)+44>>2]|0)|0;t=f[s>>2]|0;ci((((f[t+4>>2]|0)-(f[t>>2]|0)>>2>>>0)/3|0)-(f[t+40>>2]|0)|0,f[(f[x>>2]|0)+44>>2]|0)|0;t=a+28|0;y=a+8|0;z=f[y>>2]|0;A=((f[z+100>>2]|0)-(f[z+96>>2]|0)|0)/12|0;b[d>>0]=0;qh(t,A,d);A=f[s>>2]|0;z=(f[A+28>>2]|0)-(f[A+24>>2]|0)>>2;f[d>>2]=-1;hg(a+52|0,z,d);z=a+40|0;A=f[z>>2]|0;B=a+44|0;C=f[B>>2]|0;if((C|0)!=(A|0))f[B>>2]=C+(~((C+-4-A|0)>>>2)<<2);A=f[s>>2]|0;C=(f[A+4>>2]|0)-(f[A>>2]|0)>>2;gk(z,C-((C>>>0)%3|0)|0);C=a+84|0;z=f[s>>2]|0;A=(f[z+28>>2]|0)-(f[z+24>>2]|0)>>2;b[d>>0]=0;qh(C,A,d);A=a+96|0;z=f[A>>2]|0;B=a+100|0;D=f[B>>2]|0;if((D|0)!=(z|0))f[B>>2]=D+(~((D+-4-z|0)>>>2)<<2);f[a+164>>2]=-1;z=a+168|0;f[z>>2]=0;D=f[a+108>>2]|0;E=a+112|0;F=f[E>>2]|0;if((F|0)!=(D|0))f[E>>2]=F+(~(((F+-12-D|0)>>>0)/12|0)*12|0);D=a+132|0;if(f[D>>2]|0){F=a+128|0;E=f[F>>2]|0;if(E|0){G=E;do{E=G;G=f[G>>2]|0;Oq(E)}while((G|0)!=0)}f[F>>2]=0;F=f[a+124>>2]|0;if(F|0){G=a+120|0;E=0;do{f[(f[G>>2]|0)+(E<<2)>>2]=0;E=E+1|0}while((E|0)!=(F|0))}f[D>>2]=0}f[a+144>>2]=0;D=f[s>>2]|0;F=(f[D+28>>2]|0)-(f[D+24>>2]|0)>>2;f[d>>2]=-1;hg(a+152|0,F,d);F=a+72|0;D=f[F>>2]|0;E=a+76|0;G=f[E>>2]|0;if((G|0)!=(D|0))f[E>>2]=G+(~((G+-4-D|0)>>>2)<<2);D=f[s>>2]|0;gk(F,((f[D+4>>2]|0)-(f[D>>2]|0)>>2>>>0)/3|0);f[a+64>>2]=0;if(!(Be(a)|0)){w=0;u=c;return w|0}if(!(Hg(a)|0)){w=0;u=c;return w|0}D=a+172|0;G=a+176|0;H=(((f[G>>2]|0)-(f[D>>2]|0)|0)/136|0)&255;b[h>>0]=H;I=f[(f[x>>2]|0)+44>>2]|0;J=I+16|0;K=f[J+4>>2]|0;if((K|0)>0|(K|0)==0&(f[J>>2]|0)>>>0>0)L=H;else{f[e>>2]=f[I+4>>2];f[d>>2]=f[e>>2];Me(I,d,h,h+1|0)|0;L=b[h>>0]|0}h=a+284|0;f[h>>2]=L&255;L=f[s>>2]|0;I=(f[L+4>>2]|0)-(f[L>>2]|0)|0;L=I>>2;dj(v);f[i>>2]=0;H=i+4|0;f[H>>2]=0;f[i+8>>2]=0;a:do if((I|0)>0){J=a+104|0;K=i+8|0;M=0;b:while(1){N=(M>>>0)/3|0;O=N>>>5;P=1<<(N&31);if((f[(f[t>>2]|0)+(O<<2)>>2]&P|0)==0?(Q=f[s>>2]|0,f[j>>2]=N,f[d>>2]=f[j>>2],!(_j(Q,d)|0)):0){f[e>>2]=0;f[k>>2]=N;f[d>>2]=f[k>>2];N=xg(a,d,e)|0;fj(v,N);Q=f[e>>2]|0;R=(Q|0)==-1;do if(N){do if(R){S=-1;T=-1;U=-1}else{V=f[f[s>>2]>>2]|0;W=f[V+(Q<<2)>>2]|0;X=Q+1|0;Y=((X>>>0)%3|0|0)==0?Q+-2|0:X;if((Y|0)==-1)Z=-1;else Z=f[V+(Y<<2)>>2]|0;Y=(((Q>>>0)%3|0|0)==0?2:-1)+Q|0;if((Y|0)==-1){S=W;T=-1;U=Z;break}S=W;T=f[V+(Y<<2)>>2]|0;U=Z}while(0);Y=f[C>>2]|0;V=Y+(S>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(S&31);V=Y+(U>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(U&31);V=Y+(T>>>5<<2)|0;f[V>>2]=f[V>>2]|1<<(T&31);f[d>>2]=1;V=f[B>>2]|0;if(V>>>0<(f[J>>2]|0)>>>0){f[V>>2]=1;f[B>>2]=V+4}else Ri(A,d);V=(f[t>>2]|0)+(O<<2)|0;f[V>>2]=f[V>>2]|P;V=Q+1|0;if(R)_=-1;else _=((V>>>0)%3|0|0)==0?Q+-2|0:V;f[d>>2]=_;Y=f[H>>2]|0;if(Y>>>0<(f[K>>2]|0)>>>0){f[Y>>2]=_;f[H>>2]=Y+4}else Ri(i,d);if(R)break;Y=((V>>>0)%3|0|0)==0?Q+-2|0:V;if((Y|0)==-1)break;V=f[(f[(f[s>>2]|0)+12>>2]|0)+(Y<<2)>>2]|0;Y=(V|0)==-1;W=Y?-1:(V>>>0)/3|0;if(Y)break;if(f[(f[t>>2]|0)+(W>>>5<<2)>>2]&1<<(W&31)|0)break;f[l>>2]=V;f[d>>2]=f[l>>2];if(!(kc(a,d)|0))break b}else{V=Q+1|0;if(R)$=-1;else $=((V>>>0)%3|0|0)==0?Q+-2|0:V;f[m>>2]=$;f[d>>2]=f[m>>2];Pe(a,d,1)|0;f[n>>2]=f[e>>2];f[d>>2]=f[n>>2];if(!(kc(a,d)|0))break b}while(0)}M=M+1|0;if((M|0)>=(L|0)){aa=62;break a}}ba=0}else aa=62;while(0);if((aa|0)==62){aa=f[F>>2]|0;L=f[E>>2]|0;n=L;if((aa|0)!=(L|0)?(m=L+-4|0,aa>>>0>>0):0){L=aa;aa=m;do{m=f[L>>2]|0;f[L>>2]=f[aa>>2];f[aa>>2]=m;L=L+4|0;aa=aa+-4|0}while(L>>>0>>0)}f[o>>2]=n;f[p>>2]=f[i>>2];f[q>>2]=f[H>>2];f[g>>2]=f[o>>2];f[e>>2]=f[p>>2];f[d>>2]=f[q>>2];Yd(F,g,e,d)|0;if((f[G>>2]|0)!=(f[D>>2]|0)?(D=f[y>>2]|0,y=((f[D+100>>2]|0)-(f[D+96>>2]|0)|0)/12|0,b[d>>0]=0,qh(t,y,d),y=f[F>>2]|0,F=f[E>>2]|0,(y|0)!=(F|0)):0){E=y;do{f[r>>2]=f[E>>2];f[d>>2]=f[r>>2];He(a,d)|0;E=E+4|0}while((E|0)!=(F|0))}th(v);F=a+232|0;ld(v,F);v=a+280|0;E=f[v>>2]|0;if((E|0?(f[h>>2]|0)>0:0)?(ld(E,F),(f[h>>2]|0)>1):0){E=1;do{ld((f[v>>2]|0)+(E<<5)|0,F);E=E+1|0}while((E|0)<(f[h>>2]|0))}ci((f[a+272>>2]|0)-(f[a+268>>2]|0)>>2,f[(f[x>>2]|0)+44>>2]|0)|0;ci(f[z>>2]|0,f[(f[x>>2]|0)+44>>2]|0)|0;if(bh(a)|0){z=f[(f[x>>2]|0)+44>>2]|0;x=f[F>>2]|0;F=z+16|0;h=f[F+4>>2]|0;if(!((h|0)>0|(h|0)==0&(f[F>>2]|0)>>>0>0)){F=(f[a+236>>2]|0)-x|0;f[e>>2]=f[z+4>>2];f[d>>2]=f[e>>2];Me(z,d,x,x+F|0)|0}ba=1}else ba=0}F=f[i>>2]|0;if(F|0){i=f[H>>2]|0;if((i|0)!=(F|0))f[H>>2]=i+(~((i+-4-F|0)>>>2)<<2);Oq(F)}w=ba;u=c;return w|0}function qb(a,c,e,g,h){a=a|0;c=c|0;e=e|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0;i=u;u=u+64|0;j=i+16|0;k=i;l=i+24|0;m=i+8|0;n=i+20|0;f[j>>2]=c;c=(a|0)!=0;o=l+40|0;q=o;r=l+39|0;l=m+4|0;s=0;t=0;v=0;a:while(1){do if((t|0)>-1)if((s|0)>(2147483647-t|0)){w=Vq()|0;f[w>>2]=75;x=-1;break}else{x=s+t|0;break}else x=t;while(0);w=f[j>>2]|0;y=b[w>>0]|0;if(!(y<<24>>24)){z=88;break}else{A=y;B=w}b:while(1){switch(A<<24>>24){case 37:{C=B;D=B;z=9;break b;break}case 0:{E=B;break b;break}default:{}}y=B+1|0;f[j>>2]=y;A=b[y>>0]|0;B=y}c:do if((z|0)==9)while(1){z=0;if((b[D+1>>0]|0)!=37){E=C;break c}y=C+1|0;D=D+2|0;f[j>>2]=D;if((b[D>>0]|0)!=37){E=y;break}else{C=y;z=9}}while(0);y=E-w|0;if(c)Xo(a,w,y);if(y|0){s=y;t=x;continue}y=(Aq(b[(f[j>>2]|0)+1>>0]|0)|0)==0;F=f[j>>2]|0;if(!y?(b[F+2>>0]|0)==36:0){G=(b[F+1>>0]|0)+-48|0;H=1;J=3}else{G=-1;H=v;J=1}y=F+J|0;f[j>>2]=y;F=b[y>>0]|0;K=(F<<24>>24)+-32|0;if(K>>>0>31|(1<>24)+-32|K;P=F+1|0;f[j>>2]=P;Q=b[P>>0]|0;R=(Q<<24>>24)+-32|0;if(R>>>0>31|(1<>24==42){if((Aq(b[N+1>>0]|0)|0)!=0?(F=f[j>>2]|0,(b[F+2>>0]|0)==36):0){O=F+1|0;f[h+((b[O>>0]|0)+-48<<2)>>2]=10;S=f[g+((b[O>>0]|0)+-48<<3)>>2]|0;T=1;U=F+3|0}else{if(H|0){V=-1;break}if(c){F=(f[e>>2]|0)+(4-1)&~(4-1);O=f[F>>2]|0;f[e>>2]=F+4;W=O}else W=0;S=W;T=0;U=(f[j>>2]|0)+1|0}f[j>>2]=U;O=(S|0)<0;X=O?0-S|0:S;Y=O?L|8192:L;Z=T;_=U}else{O=Ll(j)|0;if((O|0)<0){V=-1;break}X=O;Y=L;Z=H;_=f[j>>2]|0}do if((b[_>>0]|0)==46){if((b[_+1>>0]|0)!=42){f[j>>2]=_+1;O=Ll(j)|0;$=O;aa=f[j>>2]|0;break}if(Aq(b[_+2>>0]|0)|0?(O=f[j>>2]|0,(b[O+3>>0]|0)==36):0){F=O+2|0;f[h+((b[F>>0]|0)+-48<<2)>>2]=10;K=f[g+((b[F>>0]|0)+-48<<3)>>2]|0;F=O+4|0;f[j>>2]=F;$=K;aa=F;break}if(Z|0){V=-1;break a}if(c){F=(f[e>>2]|0)+(4-1)&~(4-1);K=f[F>>2]|0;f[e>>2]=F+4;ba=K}else ba=0;K=(f[j>>2]|0)+2|0;f[j>>2]=K;$=ba;aa=K}else{$=-1;aa=_}while(0);K=0;F=aa;while(1){if(((b[F>>0]|0)+-65|0)>>>0>57){V=-1;break a}O=F;F=F+1|0;f[j>>2]=F;ca=b[(b[O>>0]|0)+-65+(16124+(K*58|0))>>0]|0;da=ca&255;if((da+-1|0)>>>0>=8)break;else K=da}if(!(ca<<24>>24)){V=-1;break}O=(G|0)>-1;do if(ca<<24>>24==19)if(O){V=-1;break a}else z=50;else{if(O){f[h+(G<<2)>>2]=da;P=g+(G<<3)|0;Q=f[P+4>>2]|0;y=k;f[y>>2]=f[P>>2];f[y+4>>2]=Q;z=50;break}if(!c){V=0;break a}We(k,da,e);ea=f[j>>2]|0}while(0);if((z|0)==50){z=0;if(c)ea=F;else{s=0;t=x;v=Z;continue}}O=b[ea+-1>>0]|0;Q=(K|0)!=0&(O&15|0)==3?O&-33:O;O=Y&-65537;y=(Y&8192|0)==0?Y:O;d:do switch(Q|0){case 110:{switch((K&255)<<24>>24){case 0:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 1:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 2:{P=f[k>>2]|0;f[P>>2]=x;f[P+4>>2]=((x|0)<0)<<31>>31;s=0;t=x;v=Z;continue a;break}case 3:{d[f[k>>2]>>1]=x;s=0;t=x;v=Z;continue a;break}case 4:{b[f[k>>2]>>0]=x;s=0;t=x;v=Z;continue a;break}case 6:{f[f[k>>2]>>2]=x;s=0;t=x;v=Z;continue a;break}case 7:{P=f[k>>2]|0;f[P>>2]=x;f[P+4>>2]=((x|0)<0)<<31>>31;s=0;t=x;v=Z;continue a;break}default:{s=0;t=x;v=Z;continue a}}break}case 112:{fa=120;ga=$>>>0>8?$:8;ha=y|8;z=62;break}case 88:case 120:{fa=Q;ga=$;ha=y;z=62;break}case 111:{P=k;R=f[P>>2]|0;ia=f[P+4>>2]|0;P=Ol(R,ia,o)|0;ja=q-P|0;ka=P;la=0;ma=16588;na=(y&8|0)==0|($|0)>(ja|0)?$:ja+1|0;oa=y;pa=R;qa=ia;z=68;break}case 105:case 100:{ia=k;R=f[ia>>2]|0;ja=f[ia+4>>2]|0;if((ja|0)<0){ia=Xn(0,0,R|0,ja|0)|0;P=I;ra=k;f[ra>>2]=ia;f[ra+4>>2]=P;sa=1;ta=16588;ua=ia;va=P;z=67;break d}else{sa=(y&2049|0)!=0&1;ta=(y&2048|0)==0?((y&1|0)==0?16588:16590):16589;ua=R;va=ja;z=67;break d}break}case 117:{ja=k;sa=0;ta=16588;ua=f[ja>>2]|0;va=f[ja+4>>2]|0;z=67;break}case 99:{b[r>>0]=f[k>>2];wa=r;xa=0;ya=16588;za=o;Aa=1;Ba=O;break}case 109:{ja=Vq()|0;Ca=$o(f[ja>>2]|0)|0;z=72;break}case 115:{ja=f[k>>2]|0;Ca=ja|0?ja:16598;z=72;break}case 67:{f[m>>2]=f[k>>2];f[l>>2]=0;f[k>>2]=m;Da=-1;Ea=m;z=76;break}case 83:{ja=f[k>>2]|0;if(!$){Qk(a,32,X,0,y);Fa=0;z=85}else{Da=$;Ea=ja;z=76}break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{s=ob(a,+p[k>>3],X,$,y,Q)|0;t=x;v=Z;continue a;break}default:{wa=w;xa=0;ya=16588;za=o;Aa=$;Ba=y}}while(0);e:do if((z|0)==62){z=0;w=k;Q=f[w>>2]|0;K=f[w+4>>2]|0;w=ul(Q,K,o,fa&32)|0;F=(ha&8|0)==0|(Q|0)==0&(K|0)==0;ka=w;la=F?0:2;ma=F?16588:16588+(fa>>4)|0;na=ga;oa=ha;pa=Q;qa=K;z=68}else if((z|0)==67){z=0;ka=Rj(ua,va,o)|0;la=sa;ma=ta;na=$;oa=y;pa=ua;qa=va;z=68}else if((z|0)==72){z=0;K=tg(Ca,0,$)|0;Q=(K|0)==0;wa=Ca;xa=0;ya=16588;za=Q?Ca+$|0:K;Aa=Q?$:K-Ca|0;Ba=O}else if((z|0)==76){z=0;K=Ea;Q=0;F=0;while(1){w=f[K>>2]|0;if(!w){Ga=Q;Ha=F;break}ja=Po(n,w)|0;if((ja|0)<0|ja>>>0>(Da-Q|0)>>>0){Ga=Q;Ha=ja;break}w=ja+Q|0;if(Da>>>0>w>>>0){K=K+4|0;Q=w;F=ja}else{Ga=w;Ha=ja;break}}if((Ha|0)<0){V=-1;break a}Qk(a,32,X,Ga,y);if(!Ga){Fa=0;z=85}else{F=Ea;Q=0;while(1){K=f[F>>2]|0;if(!K){Fa=Ga;z=85;break e}ja=Po(n,K)|0;Q=ja+Q|0;if((Q|0)>(Ga|0)){Fa=Ga;z=85;break e}Xo(a,n,ja);if(Q>>>0>=Ga>>>0){Fa=Ga;z=85;break}else F=F+4|0}}}while(0);if((z|0)==68){z=0;O=(pa|0)!=0|(qa|0)!=0;F=(na|0)!=0|O;Q=q-ka+((O^1)&1)|0;wa=F?ka:o;xa=la;ya=ma;za=o;Aa=F?((na|0)>(Q|0)?na:Q):na;Ba=(na|0)>-1?oa&-65537:oa}else if((z|0)==85){z=0;Qk(a,32,X,Fa,y^8192);s=(X|0)>(Fa|0)?X:Fa;t=x;v=Z;continue}Q=za-wa|0;F=(Aa|0)<(Q|0)?Q:Aa;O=F+xa|0;ja=(X|0)<(O|0)?O:X;Qk(a,32,ja,O,Ba);Xo(a,ya,xa);Qk(a,48,ja,O,Ba^65536);Qk(a,48,F,Q,0);Xo(a,wa,Q);Qk(a,32,ja,O,Ba^8192);s=ja;t=x;v=Z}f:do if((z|0)==88)if(!a)if(v){Z=1;while(1){t=f[h+(Z<<2)>>2]|0;if(!t){Ia=Z;break}We(g+(Z<<3)|0,t,e);t=Z+1|0;if((Z|0)<9)Z=t;else{Ia=t;break}}if((Ia|0)<10){Z=Ia;while(1){if(f[h+(Z<<2)>>2]|0){V=-1;break f}if((Z|0)<9)Z=Z+1|0;else{V=1;break}}}else V=1}else V=0;else V=x;while(0);u=i;return V|0}function rb(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0;c=u;u=u+64|0;d=c+56|0;e=c+52|0;g=c+48|0;h=c+60|0;i=c;j=c+44|0;k=c+40|0;l=c+36|0;m=c+32|0;n=c+28|0;o=c+24|0;p=c+20|0;q=c+16|0;r=c+12|0;if(!(b[a+352>>0]|0)){_e(d,f[a+8>>2]|0);s=a+12|0;t=f[d>>2]|0;f[d>>2]=0;v=f[s>>2]|0;f[s>>2]=t;if(v){Ii(v);Oq(v);v=f[d>>2]|0;f[d>>2]=0;if(v|0){Ii(v);Oq(v)}}else f[d>>2]=0}else{fh(d,f[a+8>>2]|0);v=a+12|0;t=f[d>>2]|0;f[d>>2]=0;s=f[v>>2]|0;f[v>>2]=t;if(s){Ii(s);Oq(s);s=f[d>>2]|0;f[d>>2]=0;if(s|0){Ii(s);Oq(s)}}else f[d>>2]=0}s=a+12|0;t=f[s>>2]|0;if(!t){w=0;u=c;return w|0}if((((f[t+4>>2]|0)-(f[t>>2]|0)>>2>>>0)/3|0|0)==(f[t+40>>2]|0)){w=0;u=c;return w|0}t=a+200|0;ve(t,a)|0;v=f[s>>2]|0;x=a+4|0;ci(((f[v+28>>2]|0)-(f[v+24>>2]|0)>>2)-(f[v+44>>2]|0)|0,f[(f[x>>2]|0)+44>>2]|0)|0;v=f[s>>2]|0;ci((((f[v+4>>2]|0)-(f[v>>2]|0)>>2>>>0)/3|0)-(f[v+40>>2]|0)|0,f[(f[x>>2]|0)+44>>2]|0)|0;v=a+28|0;y=a+8|0;z=f[y>>2]|0;A=((f[z+100>>2]|0)-(f[z+96>>2]|0)|0)/12|0;b[d>>0]=0;qh(v,A,d);A=f[s>>2]|0;z=(f[A+28>>2]|0)-(f[A+24>>2]|0)>>2;f[d>>2]=-1;hg(a+52|0,z,d);z=a+40|0;A=f[z>>2]|0;B=a+44|0;C=f[B>>2]|0;if((C|0)!=(A|0))f[B>>2]=C+(~((C+-4-A|0)>>>2)<<2);A=f[s>>2]|0;C=(f[A+4>>2]|0)-(f[A>>2]|0)>>2;gk(z,C-((C>>>0)%3|0)|0);C=a+84|0;z=f[s>>2]|0;A=(f[z+28>>2]|0)-(f[z+24>>2]|0)>>2;b[d>>0]=0;qh(C,A,d);A=a+96|0;z=f[A>>2]|0;B=a+100|0;D=f[B>>2]|0;if((D|0)!=(z|0))f[B>>2]=D+(~((D+-4-z|0)>>>2)<<2);f[a+164>>2]=-1;z=a+168|0;f[z>>2]=0;D=f[a+108>>2]|0;E=a+112|0;F=f[E>>2]|0;if((F|0)!=(D|0))f[E>>2]=F+(~(((F+-12-D|0)>>>0)/12|0)*12|0);D=a+132|0;if(f[D>>2]|0){F=a+128|0;E=f[F>>2]|0;if(E|0){G=E;do{E=G;G=f[G>>2]|0;Oq(E)}while((G|0)!=0)}f[F>>2]=0;F=f[a+124>>2]|0;if(F|0){G=a+120|0;E=0;do{f[(f[G>>2]|0)+(E<<2)>>2]=0;E=E+1|0}while((E|0)!=(F|0))}f[D>>2]=0}f[a+144>>2]=0;D=f[s>>2]|0;F=(f[D+28>>2]|0)-(f[D+24>>2]|0)>>2;f[d>>2]=-1;hg(a+152|0,F,d);F=a+72|0;D=f[F>>2]|0;E=a+76|0;G=f[E>>2]|0;if((G|0)!=(D|0))f[E>>2]=G+(~((G+-4-D|0)>>>2)<<2);D=f[s>>2]|0;gk(F,((f[D+4>>2]|0)-(f[D>>2]|0)>>2>>>0)/3|0);f[a+64>>2]=0;if(!(Be(a)|0)){w=0;u=c;return w|0}if(!(Dg(a)|0)){w=0;u=c;return w|0}D=a+172|0;G=a+176|0;H=(((f[G>>2]|0)-(f[D>>2]|0)|0)/136|0)&255;b[h>>0]=H;I=f[(f[x>>2]|0)+44>>2]|0;J=I+16|0;K=f[J+4>>2]|0;if((K|0)>0|(K|0)==0&(f[J>>2]|0)>>>0>0)L=H;else{f[e>>2]=f[I+4>>2];f[d>>2]=f[e>>2];Me(I,d,h,h+1|0)|0;L=b[h>>0]|0}f[a+284>>2]=L&255;L=f[s>>2]|0;h=(f[L+4>>2]|0)-(f[L>>2]|0)|0;L=h>>2;dj(t);f[i>>2]=0;I=i+4|0;f[I>>2]=0;f[i+8>>2]=0;a:do if((h|0)>0){H=a+104|0;J=i+8|0;K=0;b:while(1){M=(K>>>0)/3|0;N=M>>>5;O=1<<(M&31);if((f[(f[v>>2]|0)+(N<<2)>>2]&O|0)==0?(P=f[s>>2]|0,f[j>>2]=M,f[d>>2]=f[j>>2],!(_j(P,d)|0)):0){f[e>>2]=0;f[k>>2]=M;f[d>>2]=f[k>>2];M=xg(a,d,e)|0;fj(t,M);P=f[e>>2]|0;Q=(P|0)==-1;do if(M){do if(Q){R=-1;S=-1;T=-1}else{U=f[f[s>>2]>>2]|0;V=f[U+(P<<2)>>2]|0;W=P+1|0;X=((W>>>0)%3|0|0)==0?P+-2|0:W;if((X|0)==-1)Y=-1;else Y=f[U+(X<<2)>>2]|0;X=(((P>>>0)%3|0|0)==0?2:-1)+P|0;if((X|0)==-1){R=-1;S=Y;T=V;break}R=f[U+(X<<2)>>2]|0;S=Y;T=V}while(0);V=f[C>>2]|0;X=V+(T>>>5<<2)|0;f[X>>2]=f[X>>2]|1<<(T&31);X=V+(S>>>5<<2)|0;f[X>>2]=f[X>>2]|1<<(S&31);X=V+(R>>>5<<2)|0;f[X>>2]=f[X>>2]|1<<(R&31);f[d>>2]=1;X=f[B>>2]|0;if(X>>>0<(f[H>>2]|0)>>>0){f[X>>2]=1;f[B>>2]=X+4}else Ri(A,d);X=(f[v>>2]|0)+(N<<2)|0;f[X>>2]=f[X>>2]|O;X=P+1|0;if(Q)Z=-1;else Z=((X>>>0)%3|0|0)==0?P+-2|0:X;f[d>>2]=Z;V=f[I>>2]|0;if(V>>>0<(f[J>>2]|0)>>>0){f[V>>2]=Z;f[I>>2]=V+4}else Ri(i,d);if(Q)break;V=((X>>>0)%3|0|0)==0?P+-2|0:X;if((V|0)==-1)break;X=f[(f[(f[s>>2]|0)+12>>2]|0)+(V<<2)>>2]|0;V=(X|0)==-1;U=V?-1:(X>>>0)/3|0;if(V)break;if(f[(f[v>>2]|0)+(U>>>5<<2)>>2]&1<<(U&31)|0)break;f[l>>2]=X;f[d>>2]=f[l>>2];if(!(Yb(a,d)|0))break b}else{X=P+1|0;if(Q)_=-1;else _=((X>>>0)%3|0|0)==0?P+-2|0:X;f[m>>2]=_;f[d>>2]=f[m>>2];Pe(a,d,1)|0;f[n>>2]=f[e>>2];f[d>>2]=f[n>>2];if(!(Yb(a,d)|0))break b}while(0)}K=K+1|0;if((K|0)>=(L|0)){$=62;break a}}aa=0}else $=62;while(0);if(($|0)==62){$=f[F>>2]|0;L=f[E>>2]|0;n=L;if(($|0)!=(L|0)?(m=L+-4|0,$>>>0>>0):0){L=$;$=m;do{m=f[L>>2]|0;f[L>>2]=f[$>>2];f[$>>2]=m;L=L+4|0;$=$+-4|0}while(L>>>0<$>>>0)}f[o>>2]=n;f[p>>2]=f[i>>2];f[q>>2]=f[I>>2];f[g>>2]=f[o>>2];f[e>>2]=f[p>>2];f[d>>2]=f[q>>2];Yd(F,g,e,d)|0;if((f[G>>2]|0)!=(f[D>>2]|0)?(D=f[y>>2]|0,y=((f[D+100>>2]|0)-(f[D+96>>2]|0)|0)/12|0,b[d>>0]=0,qh(v,y,d),y=f[F>>2]|0,F=f[E>>2]|0,(y|0)!=(F|0)):0){E=y;do{f[r>>2]=f[E>>2];f[d>>2]=f[r>>2];He(a,d)|0;E=E+4|0}while((E|0)!=(F|0))}pi(t);ci(f[a+324>>2]|0,f[(f[x>>2]|0)+44>>2]|0)|0;ci(f[z>>2]|0,f[(f[x>>2]|0)+44>>2]|0)|0;if(bh(a)|0){z=f[(f[x>>2]|0)+44>>2]|0;x=f[a+232>>2]|0;t=z+16|0;F=f[t+4>>2]|0;if(!((F|0)>0|(F|0)==0&(f[t>>2]|0)>>>0>0)){t=(f[a+236>>2]|0)-x|0;f[e>>2]=f[z+4>>2];f[d>>2]=f[e>>2];Me(z,d,x,x+t|0)|0}aa=1}else aa=0}t=f[i>>2]|0;if(t|0){i=f[I>>2]|0;if((i|0)!=(t|0))f[I>>2]=i+(~((i+-4-t|0)>>>2)<<2);Oq(t)}w=aa;u=c;return w|0}function sb(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=Oa,ma=Oa,na=Oa,oa=0,pa=0,qa=0,ra=0,sa=0;c=u;u=u+64|0;d=c+28|0;e=c+16|0;g=c+4|0;h=c;i=a;j=a+80|0;k=f[j>>2]|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=i;l=d+20|0;n[l>>2]=$(1.0);f[d+24>>2]=i;Ih(d,k);k=f[j>>2]|0;f[e>>2]=0;i=e+4|0;f[i>>2]=0;f[e+8>>2]=0;m=(k|0)==0;do if(!m)if(k>>>0>1073741823)aq(e);else{o=k<<2;p=ln(o)|0;f[e>>2]=p;q=p+(k<<2)|0;f[e+8>>2]=q;sj(p|0,0,o|0)|0;f[i>>2]=q;break}while(0);f[g>>2]=0;k=g+4|0;f[k>>2]=0;f[g+8>>2]=0;f[h>>2]=0;if(!m){m=d+16|0;q=d+4|0;o=d+12|0;p=d+8|0;r=g+8|0;s=d+24|0;t=0;v=0;while(1){w=f[m>>2]|0;x=f[w+8>>2]|0;y=(f[w+12>>2]|0)-x|0;w=(y|0)>0;z=x;if(w){x=y>>>2;A=0;B=0;while(1){C=f[z+(A<<2)>>2]|0;if(!(b[C+84>>0]|0))D=f[(f[C+68>>2]|0)+(v<<2)>>2]|0;else D=v;C=D+239^B;A=A+1|0;if((A|0)>=(x|0)){E=C;break}else B=C}}else E=0;B=f[q>>2]|0;x=(B|0)==0;a:do if(!x){A=B+-1|0;C=(A&B|0)==0;if(!C)if(E>>>0>>0)F=E;else F=(E>>>0)%(B>>>0)|0;else F=A&E;G=f[(f[d>>2]|0)+(F<<2)>>2]|0;if((G|0)!=0?(H=f[G>>2]|0,(H|0)!=0):0){G=f[s>>2]|0;I=G+8|0;J=G+12|0;b:do if(C){G=H;while(1){K=f[G+4>>2]|0;L=(K|0)==(E|0);if(!(L|(K&A|0)==(F|0))){M=44;break a}c:do if(L){K=f[G+8>>2]|0;N=f[I>>2]|0;O=(f[J>>2]|0)-N|0;P=N;if((O|0)<=0){Q=G;break b}N=O>>>2;O=0;while(1){R=f[P+(O<<2)>>2]|0;if(!(b[R+84>>0]|0)){S=f[R+68>>2]|0;T=f[S+(v<<2)>>2]|0;U=f[S+(K<<2)>>2]|0}else{T=v;U=K}O=O+1|0;if((U|0)!=(T|0))break c;if((O|0)>=(N|0)){V=G;M=42;break b}}}while(0);G=f[G>>2]|0;if(!G){M=44;break a}}}else{G=H;while(1){L=f[G+4>>2]|0;d:do if((L|0)!=(E|0)){if(L>>>0>>0)X=L;else X=(L>>>0)%(B>>>0)|0;if((X|0)!=(F|0)){M=44;break a}}else{N=f[G+8>>2]|0;O=f[I>>2]|0;K=(f[J>>2]|0)-O|0;P=O;if((K|0)<=0){Q=G;break b}O=K>>>2;K=0;while(1){S=f[P+(K<<2)>>2]|0;if(!(b[S+84>>0]|0)){R=f[S+68>>2]|0;Y=f[R+(v<<2)>>2]|0;Z=f[R+(N<<2)>>2]|0}else{Y=v;Z=N}K=K+1|0;if((Z|0)!=(Y|0))break d;if((K|0)>=(O|0)){V=G;M=42;break b}}}while(0);G=f[G>>2]|0;if(!G){M=44;break a}}}while(0);if((M|0)==42){M=0;if(!V){M=44;break}else Q=V}f[(f[e>>2]|0)+(v<<2)>>2]=f[Q+12>>2];_=t}else M=44}else M=44;while(0);do if((M|0)==44){M=0;if(w){J=y>>>2;I=0;H=0;while(1){A=f[z+(I<<2)>>2]|0;if(!(b[A+84>>0]|0))aa=f[(f[A+68>>2]|0)+(v<<2)>>2]|0;else aa=v;A=aa+239^H;I=I+1|0;if((I|0)>=(J|0)){ba=A;break}else H=A}}else ba=0;e:do if(!x){H=B+-1|0;J=(H&B|0)==0;if(!J)if(ba>>>0>>0)ca=ba;else ca=(ba>>>0)%(B>>>0)|0;else ca=H&ba;I=f[(f[d>>2]|0)+(ca<<2)>>2]|0;if((I|0)!=0?(A=f[I>>2]|0,(A|0)!=0):0){I=f[s>>2]|0;C=I+8|0;G=I+12|0;if(J){J=A;while(1){I=f[J+4>>2]|0;if(!((I|0)==(ba|0)|(I&H|0)==(ca|0))){da=ca;M=76;break e}I=f[J+8>>2]|0;L=f[C>>2]|0;O=(f[G>>2]|0)-L|0;K=L;if((O|0)<=0){ea=v;break e}L=O>>>2;O=0;while(1){N=f[K+(O<<2)>>2]|0;if(!(b[N+84>>0]|0)){P=f[N+68>>2]|0;fa=f[P+(v<<2)>>2]|0;ga=f[P+(I<<2)>>2]|0}else{fa=v;ga=I}O=O+1|0;if((ga|0)!=(fa|0))break;if((O|0)>=(L|0)){ea=v;break e}}J=f[J>>2]|0;if(!J){da=ca;M=76;break e}}}else ha=A;while(1){J=f[ha+4>>2]|0;if((J|0)!=(ba|0)){if(J>>>0>>0)ia=J;else ia=(J>>>0)%(B>>>0)|0;if((ia|0)!=(ca|0)){da=ca;M=76;break e}}J=f[ha+8>>2]|0;H=f[C>>2]|0;L=(f[G>>2]|0)-H|0;O=H;if((L|0)<=0){ea=v;break e}H=L>>>2;L=0;while(1){I=f[O+(L<<2)>>2]|0;if(!(b[I+84>>0]|0)){K=f[I+68>>2]|0;ja=f[K+(v<<2)>>2]|0;ka=f[K+(J<<2)>>2]|0}else{ja=v;ka=J}L=L+1|0;if((ka|0)!=(ja|0))break;if((L|0)>=(H|0)){ea=v;break e}}ha=f[ha>>2]|0;if(!ha){da=ca;M=76;break}}}else{da=ca;M=76}}else{da=0;M=76}while(0);if((M|0)==76){M=0;G=ln(16)|0;f[G+8>>2]=v;f[G+12>>2]=t;f[G+4>>2]=ba;f[G>>2]=0;la=$(((f[o>>2]|0)+1|0)>>>0);ma=$(B>>>0);na=$(n[l>>2]);do if(x|$(na*ma)>>0<3|(B+-1&B|0)!=0)&1;A=~~$(W($(la/na)))>>>0;Ih(d,C>>>0>>0?A:C);C=f[q>>2]|0;A=C+-1|0;if(!(A&C)){oa=C;pa=A&ba;break}if(ba>>>0>>0){oa=C;pa=ba}else{oa=C;pa=(ba>>>0)%(C>>>0)|0}}else{oa=B;pa=da}while(0);C=(f[d>>2]|0)+(pa<<2)|0;A=f[C>>2]|0;if(!A){f[G>>2]=f[p>>2];f[p>>2]=G;f[C>>2]=p;C=f[G>>2]|0;if(C|0){H=f[C+4>>2]|0;C=oa+-1|0;if(C&oa)if(H>>>0>>0)qa=H;else qa=(H>>>0)%(oa>>>0)|0;else qa=H&C;ra=(f[d>>2]|0)+(qa<<2)|0;M=89}}else{f[G>>2]=f[A>>2];ra=A;M=89}if((M|0)==89){M=0;f[ra>>2]=G}f[o>>2]=(f[o>>2]|0)+1;ea=f[h>>2]|0}A=t+1|0;f[(f[e>>2]|0)+(ea<<2)>>2]=t;C=f[k>>2]|0;if((C|0)==(f[r>>2]|0)){Ri(g,h);_=A;break}else{f[C>>2]=f[h>>2];f[k>>2]=C+4;_=A;break}}while(0);v=(f[h>>2]|0)+1|0;f[h>>2]=v;sa=f[j>>2]|0;if(v>>>0>=sa>>>0)break;else t=_}if((_|0)!=(sa|0)){Xa[f[(f[a>>2]|0)+24>>2]&15](a,e,g);f[j>>2]=_}}_=f[g>>2]|0;if(_|0){g=f[k>>2]|0;if((g|0)!=(_|0))f[k>>2]=g+(~((g+-4-_|0)>>>2)<<2);Oq(_)}_=f[e>>2]|0;if(_|0){e=f[i>>2]|0;if((e|0)!=(_|0))f[i>>2]=e+(~((e+-4-_|0)>>>2)<<2);Oq(_)}_=f[d+8>>2]|0;if(_|0){e=_;do{_=e;e=f[e>>2]|0;Oq(_)}while((e|0)!=0)}e=f[d>>2]|0;f[d>>2]=0;if(!e){u=c;return}Oq(e);u=c;return}function tb(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0;g=u;u=u+80|0;h=g+76|0;i=g+72|0;j=g+48|0;k=g+24|0;l=g;m=a+32|0;n=f[c>>2]|0;c=n+1|0;if((n|0)!=-1){o=((c>>>0)%3|0|0)==0?n+-2|0:c;c=(((n>>>0)%3|0|0)==0?2:-1)+n|0;if((o|0)==-1)p=-1;else p=f[(f[f[m>>2]>>2]|0)+(o<<2)>>2]|0;if((c|0)==-1){q=p;r=-1}else{q=p;r=f[(f[f[m>>2]>>2]|0)+(c<<2)>>2]|0}}else{q=-1;r=-1}c=f[a+36>>2]|0;m=f[c>>2]|0;p=(f[c+4>>2]|0)-m>>2;if(p>>>0<=q>>>0)aq(c);o=m;m=f[o+(q<<2)>>2]|0;if(p>>>0<=r>>>0)aq(c);c=f[o+(r<<2)>>2]|0;r=(m|0)<(e|0);do if(r&(c|0)<(e|0)){o=m<<1;p=f[d+(o<<2)>>2]|0;q=((p|0)<0)<<31>>31;n=f[d+((o|1)<<2)>>2]|0;o=((n|0)<0)<<31>>31;s=c<<1;t=f[d+(s<<2)>>2]|0;v=f[d+((s|1)<<2)>>2]|0;if(!((t|0)!=(p|0)|(v|0)!=(n|0))){f[a+8>>2]=p;f[a+12>>2]=n;u=g;return}s=a+4|0;w=f[(f[s>>2]|0)+(e<<2)>>2]|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;f[j+16>>2]=0;f[j+20>>2]=0;x=f[a>>2]|0;if(!(b[x+84>>0]|0))y=f[(f[x+68>>2]|0)+(w<<2)>>2]|0;else y=w;f[i>>2]=y;w=b[x+24>>0]|0;f[h>>2]=f[i>>2];vb(x,h,w,j)|0;w=f[(f[s>>2]|0)+(m<<2)>>2]|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;x=f[a>>2]|0;if(!(b[x+84>>0]|0))z=f[(f[x+68>>2]|0)+(w<<2)>>2]|0;else z=w;f[i>>2]=z;w=b[x+24>>0]|0;f[h>>2]=f[i>>2];vb(x,h,w,k)|0;w=f[(f[s>>2]|0)+(c<<2)>>2]|0;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;f[l+12>>2]=0;f[l+16>>2]=0;f[l+20>>2]=0;s=f[a>>2]|0;if(!(b[s+84>>0]|0))A=f[(f[s+68>>2]|0)+(w<<2)>>2]|0;else A=w;f[i>>2]=A;w=b[s+24>>0]|0;f[h>>2]=f[i>>2];vb(s,h,w,l)|0;w=l;s=k;x=f[s>>2]|0;B=f[s+4>>2]|0;s=Xn(f[w>>2]|0,f[w+4>>2]|0,x|0,B|0)|0;w=I;C=l+8|0;D=k+8|0;E=f[D>>2]|0;F=f[D+4>>2]|0;D=Xn(f[C>>2]|0,f[C+4>>2]|0,E|0,F|0)|0;C=I;G=l+16|0;H=k+16|0;J=f[H>>2]|0;K=f[H+4>>2]|0;H=Xn(f[G>>2]|0,f[G+4>>2]|0,J|0,K|0)|0;G=I;L=un(s|0,w|0,s|0,w|0)|0;M=I;N=un(D|0,C|0,D|0,C|0)|0;O=Vn(N|0,I|0,L|0,M|0)|0;M=I;L=un(H|0,G|0,H|0,G|0)|0;N=Vn(O|0,M|0,L|0,I|0)|0;L=I;if((N|0)==0&(L|0)==0)break;M=j;O=Xn(f[M>>2]|0,f[M+4>>2]|0,x|0,B|0)|0;B=I;x=j+8|0;M=Xn(f[x>>2]|0,f[x+4>>2]|0,E|0,F|0)|0;F=I;E=j+16|0;x=Xn(f[E>>2]|0,f[E+4>>2]|0,J|0,K|0)|0;K=I;J=un(O|0,B|0,s|0,w|0)|0;E=I;P=un(M|0,F|0,D|0,C|0)|0;Q=Vn(P|0,I|0,J|0,E|0)|0;E=I;J=un(x|0,K|0,H|0,G|0)|0;P=Vn(Q|0,E|0,J|0,I|0)|0;J=I;E=Xn(t|0,((t|0)<0)<<31>>31|0,p|0,q|0)|0;t=I;Q=Xn(v|0,((v|0)<0)<<31>>31|0,n|0,o|0)|0;v=I;R=un(N|0,L|0,p|0,q|0)|0;q=I;p=un(N|0,L|0,n|0,o|0)|0;o=I;n=un(P|0,J|0,E|0,t|0)|0;S=I;T=un(P|0,J|0,Q|0,v|0)|0;U=I;V=Vn(n|0,S|0,R|0,q|0)|0;q=I;R=Vn(T|0,U|0,p|0,o|0)|0;o=I;p=un(P|0,J|0,s|0,w|0)|0;w=I;s=un(P|0,J|0,D|0,C|0)|0;C=I;D=un(P|0,J|0,H|0,G|0)|0;G=I;H=Ik(p|0,w|0,N|0,L|0)|0;w=I;p=Ik(s|0,C|0,N|0,L|0)|0;C=I;s=Ik(D|0,G|0,N|0,L|0)|0;G=I;D=Xn(O|0,B|0,H|0,w|0)|0;w=I;H=Xn(M|0,F|0,p|0,C|0)|0;C=I;p=Xn(x|0,K|0,s|0,G|0)|0;G=I;s=un(D|0,w|0,D|0,w|0)|0;w=I;D=un(H|0,C|0,H|0,C|0)|0;C=Vn(D|0,I|0,s|0,w|0)|0;w=I;s=un(p|0,G|0,p|0,G|0)|0;G=Vn(C|0,w|0,s|0,I|0)|0;s=I;w=Xn(0,0,E|0,t|0)|0;t=I;E=un(G|0,s|0,N|0,L|0)|0;s=I;switch(E|0){case 0:{if(!s){W=0;X=0}else{Y=1;Z=0;_=E;$=s;aa=23}break}case 1:{if(!s){ba=1;ca=0;aa=24}else{Y=1;Z=0;_=E;$=s;aa=23}break}default:{Y=1;Z=0;_=E;$=s;aa=23}}if((aa|0)==23)while(1){aa=0;G=Tn(Y|0,Z|0,1)|0;C=I;p=_;_=Yn(_|0,$|0,2)|0;if(!($>>>0>0|($|0)==0&p>>>0>7)){ba=G;ca=C;aa=24;break}else{Y=G;Z=C;$=I;aa=23}}if((aa|0)==24)while(1){aa=0;C=jp(E|0,s|0,ba|0,ca|0)|0;G=Vn(C|0,I|0,ba|0,ca|0)|0;C=Yn(G|0,I|0,1)|0;G=I;p=un(C|0,G|0,C|0,G|0)|0;D=I;if(D>>>0>s>>>0|(D|0)==(s|0)&p>>>0>E>>>0){ba=C;ca=G;aa=24}else{W=C;X=G;break}}E=un(W|0,X|0,Q|0,v|0)|0;s=I;G=un(W|0,X|0,w|0,t|0)|0;C=I;p=Vn(E|0,s|0,V|0,q|0)|0;D=I;H=Vn(G|0,C|0,R|0,o|0)|0;K=I;x=Ik(p|0,D|0,N|0,L|0)|0;D=I;p=Ik(H|0,K|0,N|0,L|0)|0;K=I;H=Xn(V|0,q|0,E|0,s|0)|0;s=I;E=Xn(R|0,o|0,G|0,C|0)|0;C=I;G=Ik(H|0,s|0,N|0,L|0)|0;s=I;H=Ik(E|0,C|0,N|0,L|0)|0;C=I;E=e<<1;F=f[d+(E<<2)>>2]|0;M=((F|0)<0)<<31>>31;B=f[d+((E|1)<<2)>>2]|0;E=((B|0)<0)<<31>>31;O=Xn(F|0,M|0,x|0,D|0)|0;J=I;P=Xn(B|0,E|0,p|0,K|0)|0;U=I;T=un(O|0,J|0,O|0,J|0)|0;J=I;O=un(P|0,U|0,P|0,U|0)|0;U=Vn(O|0,I|0,T|0,J|0)|0;J=I;T=Xn(F|0,M|0,G|0,s|0)|0;M=I;F=Xn(B|0,E|0,H|0,C|0)|0;E=I;B=un(T|0,M|0,T|0,M|0)|0;M=I;T=un(F|0,E|0,F|0,E|0)|0;E=Vn(T|0,I|0,B|0,M|0)|0;M=I;B=a+16|0;T=a+20|0;F=f[T>>2]|0;O=f[a+24>>2]|0;P=(F|0)==(O<<5|0);if(J>>>0>>0|(J|0)==(M|0)&U>>>0>>0){do if(P)if((F+1|0)<0)aq(B);else{E=O<<6;U=F+32&-32;vi(B,F>>>0<1073741823?(E>>>0>>0?U:E):2147483647);da=f[T>>2]|0;break}else da=F;while(0);f[T>>2]=da+1;L=(f[B>>2]|0)+(da>>>5<<2)|0;f[L>>2]=f[L>>2]|1<<(da&31);ea=x;fa=p;ga=K;ha=D}else{do if(P)if((F+1|0)<0)aq(B);else{L=O<<6;N=F+32&-32;vi(B,F>>>0<1073741823?(L>>>0>>0?N:L):2147483647);ia=f[T>>2]|0;break}else ia=F;while(0);f[T>>2]=ia+1;F=(f[B>>2]|0)+(ia>>>5<<2)|0;f[F>>2]=f[F>>2]&~(1<<(ia&31));ea=G;fa=H;ga=C;ha=s}f[a+8>>2]=ea;f[a+12>>2]=fa;u=g;return}while(0);do if(r)ja=m<<1;else{if((e|0)>0){ja=(e<<1)+-2|0;break}fa=a+8|0;f[fa>>2]=0;f[fa+4>>2]=0;u=g;return}while(0);f[a+8>>2]=f[d+(ja<<2)>>2];f[a+12>>2]=f[d+(ja+1<<2)>>2];u=g;return}function ub(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0;g=u;u=u+80|0;h=g+76|0;i=g+72|0;j=g+48|0;k=g+24|0;l=g;m=a+32|0;n=f[c>>2]|0;c=n+1|0;do if((n|0)!=-1){o=((c>>>0)%3|0|0)==0?n+-2|0:c;if(!((n>>>0)%3|0)){p=n+2|0;q=o;break}else{p=n+-1|0;q=o;break}}else{p=-1;q=-1}while(0);n=f[(f[m>>2]|0)+28>>2]|0;m=f[n+(q<<2)>>2]|0;q=f[n+(p<<2)>>2]|0;p=f[a+36>>2]|0;n=f[p>>2]|0;c=(f[p+4>>2]|0)-n>>2;if(c>>>0<=m>>>0)aq(p);o=n;n=f[o+(m<<2)>>2]|0;if(c>>>0<=q>>>0)aq(p);p=f[o+(q<<2)>>2]|0;q=(n|0)<(e|0);do if(q&(p|0)<(e|0)){o=n<<1;c=f[d+(o<<2)>>2]|0;m=((c|0)<0)<<31>>31;r=f[d+((o|1)<<2)>>2]|0;o=((r|0)<0)<<31>>31;s=p<<1;t=f[d+(s<<2)>>2]|0;v=f[d+((s|1)<<2)>>2]|0;if(!((t|0)!=(c|0)|(v|0)!=(r|0))){f[a+8>>2]=c;f[a+12>>2]=r;u=g;return}s=a+4|0;w=f[(f[s>>2]|0)+(e<<2)>>2]|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;f[j+16>>2]=0;f[j+20>>2]=0;x=f[a>>2]|0;if(!(b[x+84>>0]|0))y=f[(f[x+68>>2]|0)+(w<<2)>>2]|0;else y=w;f[i>>2]=y;w=b[x+24>>0]|0;f[h>>2]=f[i>>2];vb(x,h,w,j)|0;w=f[(f[s>>2]|0)+(n<<2)>>2]|0;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;x=f[a>>2]|0;if(!(b[x+84>>0]|0))z=f[(f[x+68>>2]|0)+(w<<2)>>2]|0;else z=w;f[i>>2]=z;w=b[x+24>>0]|0;f[h>>2]=f[i>>2];vb(x,h,w,k)|0;w=f[(f[s>>2]|0)+(p<<2)>>2]|0;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;f[l+12>>2]=0;f[l+16>>2]=0;f[l+20>>2]=0;s=f[a>>2]|0;if(!(b[s+84>>0]|0))A=f[(f[s+68>>2]|0)+(w<<2)>>2]|0;else A=w;f[i>>2]=A;w=b[s+24>>0]|0;f[h>>2]=f[i>>2];vb(s,h,w,l)|0;w=l;s=k;x=f[s>>2]|0;B=f[s+4>>2]|0;s=Xn(f[w>>2]|0,f[w+4>>2]|0,x|0,B|0)|0;w=I;C=l+8|0;D=k+8|0;E=f[D>>2]|0;F=f[D+4>>2]|0;D=Xn(f[C>>2]|0,f[C+4>>2]|0,E|0,F|0)|0;C=I;G=l+16|0;H=k+16|0;J=f[H>>2]|0;K=f[H+4>>2]|0;H=Xn(f[G>>2]|0,f[G+4>>2]|0,J|0,K|0)|0;G=I;L=un(s|0,w|0,s|0,w|0)|0;M=I;N=un(D|0,C|0,D|0,C|0)|0;O=Vn(N|0,I|0,L|0,M|0)|0;M=I;L=un(H|0,G|0,H|0,G|0)|0;N=Vn(O|0,M|0,L|0,I|0)|0;L=I;if((N|0)==0&(L|0)==0)break;M=j;O=Xn(f[M>>2]|0,f[M+4>>2]|0,x|0,B|0)|0;B=I;x=j+8|0;M=Xn(f[x>>2]|0,f[x+4>>2]|0,E|0,F|0)|0;F=I;E=j+16|0;x=Xn(f[E>>2]|0,f[E+4>>2]|0,J|0,K|0)|0;K=I;J=un(O|0,B|0,s|0,w|0)|0;E=I;P=un(M|0,F|0,D|0,C|0)|0;Q=Vn(P|0,I|0,J|0,E|0)|0;E=I;J=un(x|0,K|0,H|0,G|0)|0;P=Vn(Q|0,E|0,J|0,I|0)|0;J=I;E=Xn(t|0,((t|0)<0)<<31>>31|0,c|0,m|0)|0;t=I;Q=Xn(v|0,((v|0)<0)<<31>>31|0,r|0,o|0)|0;v=I;R=un(N|0,L|0,c|0,m|0)|0;m=I;c=un(N|0,L|0,r|0,o|0)|0;o=I;r=un(P|0,J|0,E|0,t|0)|0;S=I;T=un(P|0,J|0,Q|0,v|0)|0;U=I;V=Vn(r|0,S|0,R|0,m|0)|0;m=I;R=Vn(T|0,U|0,c|0,o|0)|0;o=I;c=un(P|0,J|0,s|0,w|0)|0;w=I;s=un(P|0,J|0,D|0,C|0)|0;C=I;D=un(P|0,J|0,H|0,G|0)|0;G=I;H=Ik(c|0,w|0,N|0,L|0)|0;w=I;c=Ik(s|0,C|0,N|0,L|0)|0;C=I;s=Ik(D|0,G|0,N|0,L|0)|0;G=I;D=Xn(O|0,B|0,H|0,w|0)|0;w=I;H=Xn(M|0,F|0,c|0,C|0)|0;C=I;c=Xn(x|0,K|0,s|0,G|0)|0;G=I;s=un(D|0,w|0,D|0,w|0)|0;w=I;D=un(H|0,C|0,H|0,C|0)|0;C=Vn(D|0,I|0,s|0,w|0)|0;w=I;s=un(c|0,G|0,c|0,G|0)|0;G=Vn(C|0,w|0,s|0,I|0)|0;s=I;w=Xn(0,0,E|0,t|0)|0;t=I;E=un(G|0,s|0,N|0,L|0)|0;s=I;switch(E|0){case 0:{if(!s){W=0;X=0}else{Y=1;Z=0;_=E;$=s;aa=22}break}case 1:{if(!s){ba=1;ca=0;aa=23}else{Y=1;Z=0;_=E;$=s;aa=22}break}default:{Y=1;Z=0;_=E;$=s;aa=22}}if((aa|0)==22)while(1){aa=0;G=Tn(Y|0,Z|0,1)|0;C=I;c=_;_=Yn(_|0,$|0,2)|0;if(!($>>>0>0|($|0)==0&c>>>0>7)){ba=G;ca=C;aa=23;break}else{Y=G;Z=C;$=I;aa=22}}if((aa|0)==23)while(1){aa=0;C=jp(E|0,s|0,ba|0,ca|0)|0;G=Vn(C|0,I|0,ba|0,ca|0)|0;C=Yn(G|0,I|0,1)|0;G=I;c=un(C|0,G|0,C|0,G|0)|0;D=I;if(D>>>0>s>>>0|(D|0)==(s|0)&c>>>0>E>>>0){ba=C;ca=G;aa=23}else{W=C;X=G;break}}E=un(W|0,X|0,Q|0,v|0)|0;s=I;G=un(W|0,X|0,w|0,t|0)|0;C=I;c=Vn(E|0,s|0,V|0,m|0)|0;D=I;H=Vn(G|0,C|0,R|0,o|0)|0;K=I;x=Ik(c|0,D|0,N|0,L|0)|0;D=I;c=Ik(H|0,K|0,N|0,L|0)|0;K=I;H=Xn(V|0,m|0,E|0,s|0)|0;s=I;E=Xn(R|0,o|0,G|0,C|0)|0;C=I;G=Ik(H|0,s|0,N|0,L|0)|0;s=I;H=Ik(E|0,C|0,N|0,L|0)|0;C=I;E=e<<1;F=f[d+(E<<2)>>2]|0;M=((F|0)<0)<<31>>31;B=f[d+((E|1)<<2)>>2]|0;E=((B|0)<0)<<31>>31;O=Xn(F|0,M|0,x|0,D|0)|0;J=I;P=Xn(B|0,E|0,c|0,K|0)|0;U=I;T=un(O|0,J|0,O|0,J|0)|0;J=I;O=un(P|0,U|0,P|0,U|0)|0;U=Vn(O|0,I|0,T|0,J|0)|0;J=I;T=Xn(F|0,M|0,G|0,s|0)|0;M=I;F=Xn(B|0,E|0,H|0,C|0)|0;E=I;B=un(T|0,M|0,T|0,M|0)|0;M=I;T=un(F|0,E|0,F|0,E|0)|0;E=Vn(T|0,I|0,B|0,M|0)|0;M=I;B=a+16|0;T=a+20|0;F=f[T>>2]|0;O=f[a+24>>2]|0;P=(F|0)==(O<<5|0);if(J>>>0>>0|(J|0)==(M|0)&U>>>0>>0){do if(P)if((F+1|0)<0)aq(B);else{E=O<<6;U=F+32&-32;vi(B,F>>>0<1073741823?(E>>>0>>0?U:E):2147483647);da=f[T>>2]|0;break}else da=F;while(0);f[T>>2]=da+1;L=(f[B>>2]|0)+(da>>>5<<2)|0;f[L>>2]=f[L>>2]|1<<(da&31);ea=x;fa=c;ga=K;ha=D}else{do if(P)if((F+1|0)<0)aq(B);else{L=O<<6;N=F+32&-32;vi(B,F>>>0<1073741823?(L>>>0>>0?N:L):2147483647);ia=f[T>>2]|0;break}else ia=F;while(0);f[T>>2]=ia+1;F=(f[B>>2]|0)+(ia>>>5<<2)|0;f[F>>2]=f[F>>2]&~(1<<(ia&31));ea=G;fa=H;ga=C;ha=s}f[a+8>>2]=ea;f[a+12>>2]=fa;u=g;return}while(0);do if(q)ja=n<<1;else{if((e|0)>0){ja=(e<<1)+-2|0;break}fa=a+8|0;f[fa>>2]=0;f[fa+4>>2]=0;u=g;return}while(0);f[a+8>>2]=f[d+(ja<<2)>>2];f[a+12>>2]=f[d+(ja+1<<2)>>2];u=g;return}function vb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=Oa,D=0,E=0.0,F=0,G=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=un(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Vn(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){m=b[o>>0]|0;q=g+(r<<3)|0;f[q>>2]=m;f[q+4>>2]=((m|0)<0)<<31>>31;r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(o<<3)|0,0,(e<<24>>24)-o<<3|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=un(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Vn(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=g+(t<<3)|0;f[k>>2]=h[m>>0];f[k+4>>2]=0;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(m<<3)|0,0,(e<<24>>24)-m<<3|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=un(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Vn(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){o=d[l>>1]|0;k=g+(q<<3)|0;f[k>>2]=o;f[k+4>>2]=((o|0)<0)<<31>>31;q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(l<<3)|0,0,(e<<24>>24)-l<<3|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=un(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Vn(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){m=g+(k<<3)|0;f[m>>2]=j[r>>1];f[m+4>>2]=0;k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(r<<3)|0,0,(e<<24>>24)-r<<3|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=un(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=Vn(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){l=f[t>>2]|0;m=g+(o<<3)|0;f[m>>2]=l;f[m+4>>2]=((l|0)<0)<<31>>31;o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(t<<3)|0,0,(e<<24>>24)-t<<3|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=un(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=Vn(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){r=g+(m<<3)|0;f[r>>2]=f[q>>2];f[r+4>>2]=0;m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(q<<3)|0,0,(e<<24>>24)-q<<3|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=un(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=Vn(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){t=k;r=f[t+4>>2]|0;z=g+(l<<3)|0;f[z>>2]=f[t>>2];f[z+4>>2]=r;l=l+1|0;r=b[q>>0]|0;if((l|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){A=r;break}else k=k+8|0}}else A=m;k=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(k<<3)|0,0,(e<<24>>24)-k<<3|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;r=un(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;z=Vn(r|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+z|0;z=0;while(1){q=o;r=f[q+4>>2]|0;t=g+(z<<3)|0;f[t>>2]=f[q>>2];f[t+4>>2]=r;z=z+1|0;r=b[k>>0]|0;if((z|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){B=r;break}else o=o+8|0}}else B=l;o=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(o<<3)|0,0,(e<<24>>24)-o<<3|0)|0;i=1;return i|0}case 9:{o=a+24|0;z=b[o>>0]|0;if((z<<24>>24>e<<24>>24?e:z)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;r=un(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Vn(r|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){C=$(n[m>>2]);k=+K(+C)>=1.0?(+C>0.0?~~+Y(+J(+C/4294967296.0),4294967295.0)>>>0:~~+W((+C-+(~~+C>>>0))/4294967296.0)>>>0):0;r=g+(t<<3)|0;f[r>>2]=~~+C>>>0;f[r+4>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){D=k;break}else m=m+4|0}}else D=z;m=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(m<<3)|0,0,(e<<24>>24)-m<<3|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=un(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;r=Vn(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+r|0;r=0;while(1){E=+p[l>>3];o=+K(E)>=1.0?(E>0.0?~~+Y(+J(E/4294967296.0),4294967295.0)>>>0:~~+W((E-+(~~E>>>0))/4294967296.0)>>>0):0;k=g+(r<<3)|0;f[k>>2]=~~E>>>0;f[k+4>>2]=o;r=r+1|0;o=b[m>>0]|0;if((r|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){F=o;break}else l=l+8|0}}else F=t;l=F<<24>>24;if(F<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(l<<3)|0,0,(e<<24>>24)-l<<3|0)|0;i=1;return i|0}case 11:{l=a+24|0;r=b[l>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){m=f[f[a>>2]>>2]|0;z=a+40|0;o=un(f[z>>2]|0,f[z+4>>2]|0,f[c>>2]|0,0)|0;z=a+48|0;k=Vn(o|0,I|0,f[z>>2]|0,f[z+4>>2]|0)|0;z=m+k|0;k=0;while(1){m=g+(k<<3)|0;f[m>>2]=h[z>>0];f[m+4>>2]=0;k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){G=m;break}else z=z+1|0}}else G=r;z=G<<24>>24;if(G<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(z<<3)|0,0,(e<<24>>24)-z<<3|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function wb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;c=u;u=u+16|0;d=c+8|0;e=c;if((f[a+96>>2]|0)==(f[a+92>>2]|0)){u=c;return}g=a+56|0;h=f[g>>2]|0;if((h|0)==(f[a+60>>2]|0)){Ri(a+52|0,b);i=b}else{f[h>>2]=f[b>>2];f[g>>2]=h+4;i=b}b=a+88|0;f[b>>2]=0;h=f[a>>2]|0;g=f[i>>2]|0;j=g+1|0;if((g|0)!=-1){k=((j>>>0)%3|0|0)==0?g+-2|0:j;if((k|0)==-1)l=-1;else l=f[(f[h>>2]|0)+(k<<2)>>2]|0;k=(((g>>>0)%3|0|0)==0?2:-1)+g|0;if((k|0)==-1){m=l;n=-1}else{m=l;n=f[(f[h>>2]|0)+(k<<2)>>2]|0}}else{m=-1;n=-1}k=a+24|0;h=f[k>>2]|0;l=h+(m>>>5<<2)|0;g=1<<(m&31);j=f[l>>2]|0;if(!(j&g)){f[l>>2]=j|g;g=f[i>>2]|0;j=g+1|0;if((g|0)==-1)o=-1;else o=((j>>>0)%3|0|0)==0?g+-2|0:j;f[e>>2]=o;j=f[(f[(f[a+44>>2]|0)+96>>2]|0)+(((o>>>0)/3|0)*12|0)+(((o>>>0)%3|0)<<2)>>2]|0;o=f[a+48>>2]|0;f[d>>2]=j;g=f[o+4>>2]|0;o=g+4|0;l=f[o>>2]|0;if((l|0)==(f[g+8>>2]|0))Ri(g,d);else{f[l>>2]=j;f[o>>2]=l+4}l=a+40|0;o=f[l>>2]|0;j=o+4|0;g=f[j>>2]|0;if((g|0)==(f[o+8>>2]|0)){Ri(o,e);p=f[l>>2]|0}else{f[g>>2]=f[e>>2];f[j>>2]=g+4;p=o}o=p+24|0;f[(f[p+12>>2]|0)+(m<<2)>>2]=f[o>>2];f[o>>2]=(f[o>>2]|0)+1;q=f[k>>2]|0}else q=h;h=q+(n>>>5<<2)|0;q=1<<(n&31);o=f[h>>2]|0;if(!(o&q)){f[h>>2]=o|q;q=f[i>>2]|0;do if((q|0)!=-1)if(!((q>>>0)%3|0)){r=q+2|0;break}else{r=q+-1|0;break}else r=-1;while(0);f[e>>2]=r;q=f[(f[(f[a+44>>2]|0)+96>>2]|0)+(((r>>>0)/3|0)*12|0)+(((r>>>0)%3|0)<<2)>>2]|0;r=f[a+48>>2]|0;f[d>>2]=q;o=f[r+4>>2]|0;r=o+4|0;h=f[r>>2]|0;if((h|0)==(f[o+8>>2]|0))Ri(o,d);else{f[h>>2]=q;f[r>>2]=h+4}h=a+40|0;r=f[h>>2]|0;q=r+4|0;o=f[q>>2]|0;if((o|0)==(f[r+8>>2]|0)){Ri(r,e);s=f[h>>2]|0}else{f[o>>2]=f[e>>2];f[q>>2]=o+4;s=r}r=s+24|0;f[(f[s+12>>2]|0)+(n<<2)>>2]=f[r>>2];f[r>>2]=(f[r>>2]|0)+1}r=f[i>>2]|0;if((r|0)==-1)t=-1;else t=f[(f[f[a>>2]>>2]|0)+(r<<2)>>2]|0;r=(f[k>>2]|0)+(t>>>5<<2)|0;n=1<<(t&31);s=f[r>>2]|0;if(!(n&s)){f[r>>2]=s|n;n=f[i>>2]|0;f[e>>2]=n;s=f[(f[(f[a+44>>2]|0)+96>>2]|0)+(((n>>>0)/3|0)*12|0)+(((n>>>0)%3|0)<<2)>>2]|0;n=f[a+48>>2]|0;f[d>>2]=s;r=f[n+4>>2]|0;n=r+4|0;o=f[n>>2]|0;if((o|0)==(f[r+8>>2]|0))Ri(r,d);else{f[o>>2]=s;f[n>>2]=o+4}o=a+40|0;n=f[o>>2]|0;s=n+4|0;r=f[s>>2]|0;if((r|0)==(f[n+8>>2]|0)){Ri(n,e);v=f[o>>2]|0}else{f[r>>2]=f[e>>2];f[s>>2]=r+4;v=n}n=v+24|0;f[(f[v+12>>2]|0)+(t<<2)>>2]=f[n>>2];f[n>>2]=(f[n>>2]|0)+1}n=f[b>>2]|0;a:do if((n|0)<3){t=a+12|0;v=a+44|0;r=a+48|0;s=a+40|0;o=a+92|0;q=n;while(1){h=q;while(1){w=a+52+(h*12|0)+4|0;x=f[w>>2]|0;if((f[a+52+(h*12|0)>>2]|0)!=(x|0))break;if((h|0)<2)h=h+1|0;else break a}m=x+-4|0;p=f[m>>2]|0;f[w>>2]=m;f[b>>2]=h;f[i>>2]=p;if((p|0)==-1)break;m=(p>>>0)/3|0;g=f[t>>2]|0;do if(!(f[g+(m>>>5<<2)>>2]&1<<(m&31))){j=p;l=g;b:while(1){y=(j>>>0)/3|0;z=l+(y>>>5<<2)|0;f[z>>2]=1<<(y&31)|f[z>>2];z=f[i>>2]|0;if((z|0)==-1)A=-1;else A=f[(f[f[a>>2]>>2]|0)+(z<<2)>>2]|0;y=(f[k>>2]|0)+(A>>>5<<2)|0;B=1<<(A&31);C=f[y>>2]|0;if(!(B&C)){f[y>>2]=C|B;B=f[i>>2]|0;f[e>>2]=B;C=f[(f[(f[v>>2]|0)+96>>2]|0)+(((B>>>0)/3|0)*12|0)+(((B>>>0)%3|0)<<2)>>2]|0;B=f[r>>2]|0;f[d>>2]=C;y=f[B+4>>2]|0;B=y+4|0;D=f[B>>2]|0;if((D|0)==(f[y+8>>2]|0))Ri(y,d);else{f[D>>2]=C;f[B>>2]=D+4}D=f[s>>2]|0;B=D+4|0;C=f[B>>2]|0;if((C|0)==(f[D+8>>2]|0)){Ri(D,e);E=f[s>>2]|0}else{f[C>>2]=f[e>>2];f[B>>2]=C+4;E=D}D=E+24|0;f[(f[E+12>>2]|0)+(A<<2)>>2]=f[D>>2];f[D>>2]=(f[D>>2]|0)+1;F=f[i>>2]|0}else F=z;z=f[a>>2]|0;if((F|0)==-1){G=93;break}D=F+1|0;C=((D>>>0)%3|0|0)==0?F+-2|0:D;if((C|0)==-1)H=-1;else H=f[(f[z+12>>2]|0)+(C<<2)>>2]|0;C=(((F>>>0)%3|0|0)==0?2:-1)+F|0;if((C|0)==-1)I=-1;else I=f[(f[z+12>>2]|0)+(C<<2)>>2]|0;C=(H|0)==-1;D=C?-1:(H>>>0)/3|0;B=(I|0)==-1;y=B?-1:(I>>>0)/3|0;if(C)J=1;else J=(f[(f[t>>2]|0)+(D>>>5<<2)>>2]&1<<(D&31)|0)!=0;do if(B)if(J){G=93;break b}else G=82;else{if(f[(f[t>>2]|0)+(y>>>5<<2)>>2]&1<<(y&31)|0)if(J){G=93;break b}else{G=82;break}D=f[(f[z>>2]|0)+(I<<2)>>2]|0;if(!(1<<(D&31)&f[(f[k>>2]|0)+(D>>>5<<2)>>2])){K=(f[o>>2]|0)+(D<<2)|0;D=f[K>>2]|0;f[K>>2]=D+1;L=(D|0)>0?1:2}else L=0;if(J?(L|0)<=(f[b>>2]|0):0){M=I;break}f[d>>2]=I;D=a+52+(L*12|0)+4|0;K=f[D>>2]|0;if((K|0)==(f[a+52+(L*12|0)+8>>2]|0))Ri(a+52+(L*12|0)|0,d);else{f[K>>2]=I;f[D>>2]=K+4}if((f[b>>2]|0)>(L|0))f[b>>2]=L;if(J){G=93;break b}else G=82}while(0);if((G|0)==82){G=0;if(C)N=-1;else N=f[(f[f[a>>2]>>2]|0)+(H<<2)>>2]|0;if(!(1<<(N&31)&f[(f[k>>2]|0)+(N>>>5<<2)>>2])){z=(f[o>>2]|0)+(N<<2)|0;y=f[z>>2]|0;f[z>>2]=y+1;O=(y|0)>0?1:2}else O=0;if((O|0)>(f[b>>2]|0))break;else M=H}f[i>>2]=M;j=M;l=f[t>>2]|0}if((G|0)==93){G=0;P=f[b>>2]|0;break}f[d>>2]=H;l=a+52+(O*12|0)+4|0;j=f[l>>2]|0;if((j|0)==(f[a+52+(O*12|0)+8>>2]|0))Ri(a+52+(O*12|0)|0,d);else{f[j>>2]=H;f[l>>2]=j+4}j=f[b>>2]|0;if((j|0)>(O|0)){f[b>>2]=O;Q=O}else Q=j;P=Q}else P=h;while(0);if((P|0)<3)q=P;else break a}u=c;return}while(0);f[i>>2]=-1;u=c;return}function xb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}xb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;xb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function yb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}yb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;yb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function zb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}zb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;zb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Ab(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Ab(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Ab(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}} +function Bb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Bb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Bb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Cb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Cb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Cb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Db(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Db(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Db(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Eb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Eb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Eb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Fb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Fb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Fb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Gb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Gb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Gb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Hb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Hb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Hb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Ib(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Ib(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Ib(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Jb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Jb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Jb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Kb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Kb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Kb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Lb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Lb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Lb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Mb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Mb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Mb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Nb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Nb(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Nb(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Ob(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;d=a;a=b;a:while(1){b=a;e=a+-4|0;g=d;while(1){h=g;b:while(1){i=h;j=b-i|0;k=j>>2;switch(k|0){case 2:{l=5;break a;break}case 3:{l=11;break a;break}case 4:{l=12;break a;break}case 5:{l=13;break a;break}case 1:case 0:{l=84;break a;break}default:{}}if((j|0)<124){l=15;break a}m=h+(((k|0)/2|0)<<2)|0;if((j|0)>3996){j=(k|0)/4|0;n=ig(h,h+(j<<2)|0,m,m+(j<<2)|0,e,c)|0}else n=Vg(h,m,e,c)|0;o=f[h>>2]|0;j=f[m>>2]|0;p=f[c>>2]|0;k=f[p>>2]|0;q=(f[p+4>>2]|0)-k>>3;if(q>>>0<=o>>>0){l=20;break a}r=k;if(q>>>0<=j>>>0){l=22;break a}k=f[r+(o<<3)>>2]|0;s=f[r+(j<<3)>>2]|0;if(k>>>0>>0){t=e;u=n;break}else v=e;while(1){v=v+-4|0;if((h|0)==(v|0))break;w=f[v>>2]|0;if(q>>>0<=w>>>0){l=51;break a}if((f[r+(w<<3)>>2]|0)>>>0>>0){l=53;break b}}s=h+4|0;j=f[e>>2]|0;if(q>>>0<=j>>>0){l=26;break a}if(k>>>0<(f[r+(j<<3)>>2]|0)>>>0)x=s;else{if((s|0)==(e|0)){l=84;break a}else y=s;while(1){z=f[y>>2]|0;if(q>>>0<=z>>>0){l=32;break a}if(k>>>0<(f[r+(z<<3)>>2]|0)>>>0)break;s=y+4|0;if((s|0)==(e|0)){l=84;break a}else y=s}f[y>>2]=j;f[e>>2]=z;x=y+4|0}if((x|0)==(e|0)){l=84;break a}r=f[h>>2]|0;A=f[c>>2]|0;k=f[A>>2]|0;q=(f[A+4>>2]|0)-k>>3;if(q>>>0<=r>>>0){l=38;break a}s=k;k=e;B=x;C=r;while(1){r=s+(C<<3)|0;D=q>>>0>C>>>0;E=B;while(1){F=f[E>>2]|0;if(q>>>0<=F>>>0){l=40;break a}G=f[r>>2]|0;if(G>>>0<(f[s+(F<<3)>>2]|0)>>>0)break;if(D)E=E+4|0;else{l=38;break a}}if(q>>>0>C>>>0)H=k;else{l=46;break a}do{H=H+-4|0;I=f[H>>2]|0;if(q>>>0<=I>>>0){l=47;break a}}while(G>>>0<(f[s+(I<<3)>>2]|0)>>>0);if(E>>>0>=H>>>0){h=E;continue b}D=f[E>>2]|0;f[E>>2]=I;f[H>>2]=D;C=f[h>>2]|0;if(q>>>0<=C>>>0){l=38;break a}else{k=H;B=E+4|0}}}if((l|0)==53){l=0;f[h>>2]=w;f[v>>2]=o;t=v;u=n+1|0}B=h+4|0;c:do if(B>>>0>>0){k=f[B>>2]|0;C=f[c>>2]|0;q=f[C>>2]|0;s=(f[C+4>>2]|0)-q>>3;if(s>>>0>k>>>0){J=t;K=B;L=u;M=m;N=s;O=q;P=C;Q=k}else{R=C;l=57;break a}while(1){C=f[c>>2]|0;k=C+4|0;q=f[M>>2]|0;s=K;j=O;D=N;S=P;r=Q;while(1){F=j;if(D>>>0<=q>>>0){l=59;break a}if((f[F+(r<<3)>>2]|0)>>>0>=(f[F+(q<<3)>>2]|0)>>>0)break;F=s+4|0;T=f[F>>2]|0;j=f[C>>2]|0;D=(f[k>>2]|0)-j>>3;if(D>>>0<=T>>>0){R=C;l=57;break a}else{s=F;S=C;r=T}}C=f[M>>2]|0;O=f[S>>2]|0;N=(f[S+4>>2]|0)-O>>3;D=O;j=D+(C<<3)|0;if(N>>>0>C>>>0)U=J;else{l=65;break a}do{U=U+-4|0;V=f[U>>2]|0;if(N>>>0<=V>>>0){l=66;break a}}while((f[D+(V<<3)>>2]|0)>>>0>=(f[j>>2]|0)>>>0);if(s>>>0>U>>>0){W=M;X=L;Y=s;break c}f[s>>2]=V;f[U>>2]=r;K=s+4|0;Q=f[K>>2]|0;if(N>>>0<=Q>>>0){R=S;l=57;break a}else{J=U;L=L+1|0;M=(M|0)==(s|0)?U:M;P=S}}}else{W=m;X=u;Y=B}while(0);if((Y|0)!=(W|0)){B=f[W>>2]|0;j=f[Y>>2]|0;Z=f[c>>2]|0;D=f[Z>>2]|0;C=(f[Z+4>>2]|0)-D>>3;if(C>>>0<=B>>>0){l=72;break a}k=D;if(C>>>0<=j>>>0){l=74;break a}if((f[k+(B<<3)>>2]|0)>>>0<(f[k+(j<<3)>>2]|0)>>>0){f[Y>>2]=B;f[W>>2]=j;_=X+1|0}else _=X}else _=X;if(!_){$=_d(h,Y,c)|0;j=Y+4|0;if(_d(j,a,c)|0){l=83;break}if($){g=j;continue}}j=Y;if((j-i|0)>=(b-j|0)){l=82;break}Ob(h,Y,c);g=Y+4|0}if((l|0)==82){l=0;Ob(Y+4|0,a,c);d=h;a=Y;continue}else if((l|0)==83){l=0;if($){l=84;break}else{d=h;a=Y;continue}}}switch(l|0){case 5:{l=f[e>>2]|0;Y=f[h>>2]|0;d=f[c>>2]|0;$=f[d>>2]|0;i=(f[d+4>>2]|0)-$>>3;if(i>>>0<=l>>>0)aq(d);_=$;if(i>>>0<=Y>>>0)aq(d);if((f[_+(l<<3)>>2]|0)>>>0>=(f[_+(Y<<3)>>2]|0)>>>0)return;f[h>>2]=l;f[e>>2]=Y;return}case 11:{Vg(h,h+4|0,e,c)|0;return}case 12:{jh(h,h+4|0,h+8|0,e,c)|0;return}case 13:{ig(h,h+4|0,h+8|0,h+12|0,e,c)|0;return}case 15:{ih(h,a,c);return}case 20:{aq(p);break}case 22:{aq(p);break}case 26:{aq(p);break}case 32:{aq(p);break}case 38:{aq(A);break}case 40:{aq(A);break}case 46:{aq(A);break}case 47:{aq(A);break}case 51:{aq(p);break}case 57:{aq(R);break}case 59:{aq(S);break}case 65:{if(N>>>0>(f[J+-4>>2]|0)>>>0)aq(S);else aq(S);break}case 66:{aq(S);break}case 72:{aq(Z);break}case 74:{aq(Z);break}case 84:return}}function Pb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=un(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Vn(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){f[g+(r<<2)>>2]=b[o>>0];r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=un(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Vn(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){f[g+(t<<2)>>2]=h[m>>0];t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=un(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Vn(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=d[l>>1];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=un(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Vn(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=j[r>>1];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=un(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=Vn(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){f[g+(o<<2)>>2]=f[t>>2];o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(t<<2)|0,0,(e<<24>>24)-t<<2|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=un(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=Vn(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){f[g+(m<<2)>>2]=f[q>>2];m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(q<<2)|0,0,(e<<24>>24)-q<<2|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=un(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=Vn(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){f[g+(l<<2)>>2]=f[k>>2];l=l+1|0;t=b[q>>0]|0;if((l|0)>=((t<<24>>24>e<<24>>24?e:t)<<24>>24|0)){z=t;break}else k=k+8|0}}else z=m;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;t=un(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Vn(t|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+r|0;r=0;while(1){f[g+(r<<2)>>2]=f[o>>2];r=r+1|0;q=b[k>>0]|0;if((r|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else o=o+8|0}}else A=l;o=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 9:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=un(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Vn(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=~~$(n[m>>2])>>>0;f[g+(t<<2)>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else m=m+4|0}}else B=r;m=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=un(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Vn(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=~~+p[l>>3]>>>0;q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){C=o;break}else l=l+8|0}}else C=t;l=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 11:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=un(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Vn(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=h[r>>0];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){D=m;break}else r=r+1|0}}else D=q;r=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function Qb(a,c,e,g){a=a|0;c=c|0;e=e|0;g=g|0;var i=0,k=0,l=0,m=0,o=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;if(!g){i=0;return i|0}do switch(f[a+28>>2]|0){case 1:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){m=f[f[a>>2]>>2]|0;o=a+40|0;q=un(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Vn(q|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=m+r|0;r=0;while(1){f[g+(r<<2)>>2]=b[o>>0];r=r+1|0;m=b[k>>0]|0;if((r|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){s=m;break}else o=o+1|0}}else s=l;o=s<<24>>24;if(s<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 2:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=un(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Vn(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){f[g+(t<<2)>>2]=h[m>>0];t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){u=k;break}else m=m+1|0}}else u=r;m=u<<24>>24;if(u<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 3:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=un(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Vn(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=d[l>>1];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){v=o;break}else l=l+2|0}}else v=t;l=v<<24>>24;if(v<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 4:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=un(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Vn(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=j[r>>1];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){w=m;break}else r=r+2|0}}else w=q;r=w<<24>>24;if(w<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}case 5:{r=a+24|0;k=b[r>>0]|0;if((k<<24>>24>e<<24>>24?e:k)<<24>>24>0){l=f[f[a>>2]>>2]|0;t=a+40|0;m=un(f[t>>2]|0,f[t+4>>2]|0,f[c>>2]|0,0)|0;t=a+48|0;o=Vn(m|0,I|0,f[t>>2]|0,f[t+4>>2]|0)|0;t=l+o|0;o=0;while(1){f[g+(o<<2)>>2]=f[t>>2];o=o+1|0;l=b[r>>0]|0;if((o|0)>=((l<<24>>24>e<<24>>24?e:l)<<24>>24|0)){x=l;break}else t=t+4|0}}else x=k;t=x<<24>>24;if(x<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(t<<2)|0,0,(e<<24>>24)-t<<2|0)|0;i=1;return i|0}case 6:{t=a+24|0;o=b[t>>0]|0;if((o<<24>>24>e<<24>>24?e:o)<<24>>24>0){r=f[f[a>>2]>>2]|0;q=a+40|0;l=un(f[q>>2]|0,f[q+4>>2]|0,f[c>>2]|0,0)|0;q=a+48|0;m=Vn(l|0,I|0,f[q>>2]|0,f[q+4>>2]|0)|0;q=r+m|0;m=0;while(1){f[g+(m<<2)>>2]=f[q>>2];m=m+1|0;r=b[t>>0]|0;if((m|0)>=((r<<24>>24>e<<24>>24?e:r)<<24>>24|0)){y=r;break}else q=q+4|0}}else y=o;q=y<<24>>24;if(y<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(q<<2)|0,0,(e<<24>>24)-q<<2|0)|0;i=1;return i|0}case 7:{q=a+24|0;m=b[q>>0]|0;if((m<<24>>24>e<<24>>24?e:m)<<24>>24>0){t=f[f[a>>2]>>2]|0;k=a+40|0;r=un(f[k>>2]|0,f[k+4>>2]|0,f[c>>2]|0,0)|0;k=a+48|0;l=Vn(r|0,I|0,f[k>>2]|0,f[k+4>>2]|0)|0;k=t+l|0;l=0;while(1){f[g+(l<<2)>>2]=f[k>>2];l=l+1|0;t=b[q>>0]|0;if((l|0)>=((t<<24>>24>e<<24>>24?e:t)<<24>>24|0)){z=t;break}else k=k+8|0}}else z=m;k=z<<24>>24;if(z<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(k<<2)|0,0,(e<<24>>24)-k<<2|0)|0;i=1;return i|0}case 8:{k=a+24|0;l=b[k>>0]|0;if((l<<24>>24>e<<24>>24?e:l)<<24>>24>0){q=f[f[a>>2]>>2]|0;o=a+40|0;t=un(f[o>>2]|0,f[o+4>>2]|0,f[c>>2]|0,0)|0;o=a+48|0;r=Vn(t|0,I|0,f[o>>2]|0,f[o+4>>2]|0)|0;o=q+r|0;r=0;while(1){f[g+(r<<2)>>2]=f[o>>2];r=r+1|0;q=b[k>>0]|0;if((r|0)>=((q<<24>>24>e<<24>>24?e:q)<<24>>24|0)){A=q;break}else o=o+8|0}}else A=l;o=A<<24>>24;if(A<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(o<<2)|0,0,(e<<24>>24)-o<<2|0)|0;i=1;return i|0}case 9:{o=a+24|0;r=b[o>>0]|0;if((r<<24>>24>e<<24>>24?e:r)<<24>>24>0){k=f[f[a>>2]>>2]|0;m=a+40|0;q=un(f[m>>2]|0,f[m+4>>2]|0,f[c>>2]|0,0)|0;m=a+48|0;t=Vn(q|0,I|0,f[m>>2]|0,f[m+4>>2]|0)|0;m=k+t|0;t=0;while(1){k=~~$(n[m>>2]);f[g+(t<<2)>>2]=k;t=t+1|0;k=b[o>>0]|0;if((t|0)>=((k<<24>>24>e<<24>>24?e:k)<<24>>24|0)){B=k;break}else m=m+4|0}}else B=r;m=B<<24>>24;if(B<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(m<<2)|0,0,(e<<24>>24)-m<<2|0)|0;i=1;return i|0}case 10:{m=a+24|0;t=b[m>>0]|0;if((t<<24>>24>e<<24>>24?e:t)<<24>>24>0){o=f[f[a>>2]>>2]|0;l=a+40|0;k=un(f[l>>2]|0,f[l+4>>2]|0,f[c>>2]|0,0)|0;l=a+48|0;q=Vn(k|0,I|0,f[l>>2]|0,f[l+4>>2]|0)|0;l=o+q|0;q=0;while(1){f[g+(q<<2)>>2]=~~+p[l>>3];q=q+1|0;o=b[m>>0]|0;if((q|0)>=((o<<24>>24>e<<24>>24?e:o)<<24>>24|0)){C=o;break}else l=l+8|0}}else C=t;l=C<<24>>24;if(C<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(l<<2)|0,0,(e<<24>>24)-l<<2|0)|0;i=1;return i|0}case 11:{l=a+24|0;q=b[l>>0]|0;if((q<<24>>24>e<<24>>24?e:q)<<24>>24>0){m=f[f[a>>2]>>2]|0;r=a+40|0;o=un(f[r>>2]|0,f[r+4>>2]|0,f[c>>2]|0,0)|0;r=a+48|0;k=Vn(o|0,I|0,f[r>>2]|0,f[r+4>>2]|0)|0;r=m+k|0;k=0;while(1){f[g+(k<<2)>>2]=h[r>>0];k=k+1|0;m=b[l>>0]|0;if((k|0)>=((m<<24>>24>e<<24>>24?e:m)<<24>>24|0)){D=m;break}else r=r+1|0}}else D=q;r=D<<24>>24;if(D<<24>>24>=e<<24>>24){i=1;return i|0}sj(g+(r<<2)|0,0,(e<<24>>24)-r<<2|0)|0;i=1;return i|0}default:{i=0;return i|0}}while(0);return 0}function Rb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=Oa,J=0,K=0,L=0,M=0,N=Oa;e=u;u=u+48|0;g=e+36|0;h=e+24|0;i=e+12|0;j=e;if(!(xh(a,c,d)|0)){k=0;u=e;return k|0}l=f[(f[(f[c+4>>2]|0)+8>>2]|0)+(d<<2)>>2]|0;if((f[l+28>>2]|0)!=9){k=0;u=e;return k|0}m=c+48|0;c=f[m>>2]|0;o=ln(32)|0;f[g>>2]=o;f[g+8>>2]=-2147483616;f[g+4>>2]=17;p=o;q=14495;r=p+17|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[o+17>>0]=0;o=c+16|0;s=f[o>>2]|0;if(s){t=o;v=s;a:while(1){s=v;while(1){if((f[s+16>>2]|0)>=(d|0))break;w=f[s+4>>2]|0;if(!w){x=t;break a}else s=w}v=f[s>>2]|0;if(!v){x=s;break}else t=s}if(((x|0)!=(o|0)?(f[x+16>>2]|0)<=(d|0):0)?(o=x+20|0,(Jh(o,g)|0)!=0):0)y=Hk(o,g,-1)|0;else z=12}else z=12;if((z|0)==12)y=Hk(c,g,-1)|0;if((b[g+11>>0]|0)<0)Oq(f[g>>2]|0);if((y|0)<1){k=0;u=e;return k|0}c=f[m>>2]|0;o=ln(32)|0;f[g>>2]=o;f[g+8>>2]=-2147483616;f[g+4>>2]=19;p=o;q=14438;r=p+19|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[o+19>>0]=0;o=c+16|0;x=f[o>>2]|0;if(x){t=o;v=x;b:while(1){x=v;while(1){if((f[x+16>>2]|0)>=(d|0))break;w=f[x+4>>2]|0;if(!w){A=t;break b}else x=w}v=f[x>>2]|0;if(!v){A=x;break}else t=x}if((A|0)!=(o|0)?(f[A+16>>2]|0)<=(d|0):0)B=A+20|0;else z=24}else z=24;if((z|0)==24)B=c;if(!(Jh(B,g)|0))C=0;else{B=f[m>>2]|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;c=ln(32)|0;f[h>>2]=c;f[h+8>>2]=-2147483616;f[h+4>>2]=18;p=c;q=14458;r=p+18|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[c+18>>0]=0;c=B+16|0;A=f[c>>2]|0;if(A){o=c;t=A;c:while(1){A=t;while(1){if((f[A+16>>2]|0)>=(d|0))break;v=f[A+4>>2]|0;if(!v){D=o;break c}else A=v}t=f[A>>2]|0;if(!t){D=A;break}else o=A}if((D|0)!=(c|0)?(f[D+16>>2]|0)<=(d|0):0)E=D+20|0;else z=34}else z=34;if((z|0)==34)E=B;B=(Jh(E,h)|0)!=0;if((b[h+11>>0]|0)<0)Oq(f[h>>2]|0);C=B}if((b[g+11>>0]|0)<0)Oq(f[g>>2]|0);if(!C){Wd(a+40|0,l,y)|0;k=1;u=e;return k|0}C=l+24|0;l=b[C>>0]|0;B=l<<24>>24;f[i>>2]=0;E=i+4|0;f[E>>2]=0;f[i+8>>2]=0;do if(l<<24>>24)if(l<<24>>24<0)aq(i);else{D=B<<2;c=ln(D)|0;f[i>>2]=c;o=c+(B<<2)|0;f[i+8>>2]=o;sj(c|0,0,D|0)|0;f[E>>2]=o;F=c;break}else F=0;while(0);B=f[m>>2]|0;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;l=ln(32)|0;f[j>>2]=l;f[j+8>>2]=-2147483616;f[j+4>>2]=19;p=l;q=14438;r=p+19|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[l+19>>0]=0;l=b[C>>0]|0;c=l<<24>>24;o=B+16|0;D=f[o>>2]|0;if(D){t=o;x=D;d:while(1){D=x;while(1){if((f[D+16>>2]|0)>=(d|0))break;v=f[D+4>>2]|0;if(!v){G=t;break d}else D=v}x=f[D>>2]|0;if(!x){G=D;break}else t=D}if(((G|0)!=(o|0)?(f[G+16>>2]|0)<=(d|0):0)?(o=G+20|0,(Jh(o,j)|0)!=0):0){t=Rg(o,j)|0;if((t|0)!=(G+24|0)){pj(g,t+28|0);t=g+11|0;G=b[t>>0]|0;o=G<<24>>24<0;if(!((o?f[g+4>>2]|0:G&255)|0))H=G;else{if(l<<24>>24>0){x=o?f[g>>2]|0:g;o=0;do{I=$(bq(x,h));A=x;x=f[h>>2]|0;if((A|0)==(x|0))break;n[F+(o<<2)>>2]=I;o=o+1|0}while((o|0)<(c|0));J=b[t>>0]|0}else J=G;H=J}if(H<<24>>24<0)Oq(f[g>>2]|0)}}else z=64}else z=64;if((z|0)==64?(H=Rg(B,j)|0,(H|0)!=(B+4|0)):0){pj(g,H+28|0);H=g+11|0;B=b[H>>0]|0;J=B<<24>>24<0;if(!((J?f[g+4>>2]|0:B&255)|0))K=B;else{if(l<<24>>24>0){l=J?f[g>>2]|0:g;J=0;do{I=$(bq(l,h));G=l;l=f[h>>2]|0;if((G|0)==(l|0))break;n[F+(J<<2)>>2]=I;J=J+1|0}while((J|0)<(c|0));L=b[H>>0]|0}else L=B;K=L}if(K<<24>>24<0)Oq(f[g>>2]|0)}if((b[j+11>>0]|0)<0)Oq(f[j>>2]|0);j=f[m>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;m=ln(32)|0;f[g>>2]=m;f[g+8>>2]=-2147483616;f[g+4>>2]=18;p=m;q=14458;r=p+18|0;do{b[p>>0]=b[q>>0]|0;p=p+1|0;q=q+1|0}while((p|0)<(r|0));b[m+18>>0]=0;m=j+16|0;q=f[m>>2]|0;if(q){p=m;r=q;e:while(1){q=r;while(1){if((f[q+16>>2]|0)>=(d|0))break;K=f[q+4>>2]|0;if(!K){M=p;break e}else q=K}r=f[q>>2]|0;if(!r){M=q;break}else p=q}if(((M|0)!=(m|0)?(f[M+16>>2]|0)<=(d|0):0)?(d=M+20|0,(Jh(d,g)|0)!=0):0)N=$(sk(d,g,$(1.0)));else z=86}else z=86;if((z|0)==86)N=$(sk(j,g,$(1.0)));if((b[g+11>>0]|0)<0)Oq(f[g>>2]|0);Dl(a+40|0,y,f[i>>2]|0,b[C>>0]|0,N);C=f[i>>2]|0;if(C|0){i=f[E>>2]|0;if((i|0)!=(C|0))f[E>>2]=i+(~((i+-4-C|0)>>>2)<<2);Oq(C)}k=1;u=e;return k|0}function Sb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0;e=u;u=u+64|0;d=e+48|0;h=e+36|0;i=e+24|0;j=e+16|0;k=e+8|0;l=e;m=e+32|0;n=a+60|0;f[a+68>>2]=g;g=a+108|0;tk(g);o=a+56|0;p=f[o>>2]|0;q=(f[p+4>>2]|0)-(f[p>>2]|0)|0;r=q>>2;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;s=i;f[s>>2]=0;f[s+4>>2]=0;s=j;f[s>>2]=0;f[s+4>>2]=0;s=k;f[s>>2]=0;f[s+4>>2]=0;s=l;f[s>>2]=0;f[s+4>>2]=0;if((q|0)<=0){u=e;return 1}q=h+4|0;s=h+8|0;t=a+104|0;v=i+4|0;w=a+100|0;x=j+4|0;y=a+8|0;z=a+16|0;A=a+32|0;B=a+12|0;C=a+28|0;D=a+20|0;E=a+24|0;F=a+96|0;a=k+4|0;G=l+4|0;H=f[p>>2]|0;if((f[p+4>>2]|0)==(H|0)){J=p;aq(J)}else{K=0;L=H}while(1){f[m>>2]=f[L+(K<<2)>>2];f[d>>2]=f[m>>2];ic(n,d,h);H=f[h>>2]|0;p=(H|0)>-1?H:0-H|0;M=f[q>>2]|0;N=(M|0)>-1?M:0-M|0;O=Vn(N|0,((N|0)<0)<<31>>31|0,p|0,((p|0)<0)<<31>>31|0)|0;p=f[s>>2]|0;N=(p|0)>-1;P=N?p:0-p|0;p=Vn(O|0,I|0,P|0,((P|0)<0)<<31>>31|0)|0;P=I;if((p|0)==0&(P|0)==0){O=f[t>>2]|0;Q=O;R=h;S=M;T=O}else{O=f[t>>2]|0;U=((O|0)<0)<<31>>31;V=un(O|0,U|0,H|0,((H|0)<0)<<31>>31|0)|0;H=Ik(V|0,I|0,p|0,P|0)|0;f[h>>2]=H;V=un(O|0,U|0,M|0,((M|0)<0)<<31>>31|0)|0;M=Ik(V|0,I|0,p|0,P|0)|0;f[q>>2]=M;P=O-((H|0)>-1?H:0-H|0)-((M|0)>-1?M:0-M|0)|0;Q=N?P:0-P|0;R=s;S=M;T=O}f[R>>2]=Q;O=f[h>>2]|0;do if((O|0)<=-1){if((S|0)<0){M=f[s>>2]|0;W=(M|0)>-1?M:0-M|0;X=M}else{M=f[s>>2]|0;W=(f[w>>2]|0)-((M|0)>-1?M:0-M|0)|0;X=M}if((X|0)<0){Y=(S|0)>-1?S:0-S|0;Z=W;_=X;break}else{Y=(f[w>>2]|0)-((S|0)>-1?S:0-S|0)|0;Z=W;_=X;break}}else{M=f[s>>2]|0;Y=M+T|0;Z=T+S|0;_=M}while(0);M=(Z|0)==0;P=(Y|0)==0;N=f[w>>2]|0;do if(Y|Z){H=(N|0)==(Y|0);if(!(M&H)){p=(N|0)==(Z|0);if(!(P&p)){if(M&(T|0)<(Y|0)){$=0;aa=(T<<1)-Y|0;break}if(p&(T|0)>(Y|0)){$=Z;aa=(T<<1)-Y|0;break}if(H&(T|0)>(Z|0)){$=(T<<1)-Z|0;aa=Y;break}if(P){$=(T|0)<(Z|0)?(T<<1)-Z|0:Z;aa=0}else{$=Z;aa=Y}}else{$=Z;aa=Z}}else{$=Y;aa=Y}}else{$=N;aa=N}while(0);f[i>>2]=$;f[v>>2]=aa;P=0-S|0;M=0-_|0;f[h>>2]=0-O;f[q>>2]=P;f[s>>2]=M;if((O|0)<1){ba=T-_|0;ca=T-S|0}else{H=(_|0)<1?M:_;M=(S|0)<1?P:S;ba=(_|0)>0?M:N-M|0;ca=(S|0)>0?H:N-H|0}H=(ca|0)==0;M=(ba|0)==0;do if(((ba|ca|0)!=0?(P=(N|0)==(ba|0),!(H&P)):0)?(p=(N|0)==(ca|0),!(M&p)):0){if(H&(T|0)<(ba|0)){da=0;ea=(T<<1)-ba|0;break}if(p&(T|0)>(ba|0)){da=N;ea=(T<<1)-ba|0;break}if(P&(T|0)>(ca|0)){da=(T<<1)-ca|0;ea=N;break}if(M){da=(T|0)<(ca|0)?(T<<1)-ca|0:ca;ea=0}else{da=ca;ea=ba}}else{da=N;ea=N}while(0);f[j>>2]=da;f[x>>2]=ea;N=K<<1;M=b+(N<<2)|0;H=f[y>>2]|0;if((H|0)>0){O=0;P=i;p=H;while(1){if((p|0)>0){H=0;do{V=f[P+(H<<2)>>2]|0;U=f[z>>2]|0;if((V|0)>(U|0)){fa=f[A>>2]|0;f[fa+(H<<2)>>2]=U;ga=fa}else{fa=f[B>>2]|0;U=f[A>>2]|0;f[U+(H<<2)>>2]=(V|0)<(fa|0)?fa:V;ga=U}H=H+1|0;U=f[y>>2]|0}while((H|0)<(U|0));ha=ga;ia=U}else{ha=f[A>>2]|0;ia=p}H=(f[M+(O<<2)>>2]|0)-(f[ha+(O<<2)>>2]|0)|0;U=k+(O<<2)|0;f[U>>2]=H;ja=f[C>>2]|0;if((H|0)>=(ja|0)){if((H|0)>(f[E>>2]|0)){ka=H-(f[D>>2]|0)|0;la=52}}else{ka=(f[D>>2]|0)+H|0;la=52}if((la|0)==52){la=0;f[U>>2]=ka}O=O+1|0;if((O|0)>=(ia|0))break;else{P=ha;p=ia}}if((ia|0)>0){p=0;P=j;O=ia;U=ja;while(1){if((O|0)>0){H=0;do{V=f[P+(H<<2)>>2]|0;fa=f[z>>2]|0;if((V|0)>(fa|0))f[ha+(H<<2)>>2]=fa;else{fa=f[B>>2]|0;f[ha+(H<<2)>>2]=(V|0)<(fa|0)?fa:V}H=H+1|0;ma=f[y>>2]|0}while((H|0)<(ma|0));na=f[C>>2]|0;oa=ma}else{na=U;oa=O}H=(f[M+(p<<2)>>2]|0)-(f[ha+(p<<2)>>2]|0)|0;V=l+(p<<2)|0;f[V>>2]=H;if((H|0)>=(na|0)){if((H|0)>(f[E>>2]|0)){pa=H-(f[D>>2]|0)|0;la=65}}else{pa=(f[D>>2]|0)+H|0;la=65}if((la|0)==65){la=0;f[V>>2]=pa}p=p+1|0;if((p|0)>=(oa|0))break;else{P=ha;O=oa;U=na}}}}U=f[k>>2]|0;O=f[t>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))qa=(f[F>>2]|0)+U|0;else qa=U;else qa=U-(f[F>>2]|0)|0;f[k>>2]=qa;U=f[a>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))ra=(f[F>>2]|0)+U|0;else ra=U;else ra=U-(f[F>>2]|0)|0;f[a>>2]=ra;U=f[l>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))sa=(f[F>>2]|0)+U|0;else sa=U;else sa=U-(f[F>>2]|0)|0;f[l>>2]=sa;U=f[G>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))ta=(f[F>>2]|0)+U|0;else ta=U;else ta=U-(f[F>>2]|0)|0;f[G>>2]=ta;if((((ra|0)>-1?ra:0-ra|0)+((qa|0)>-1?qa:0-qa|0)|0)<(((sa|0)>-1?sa:0-sa|0)+((ta|0)>-1?ta:0-ta|0)|0)){fj(g,0);ua=k}else{fj(g,1);ua=l}U=f[ua>>2]|0;if((U|0)<0)va=(f[F>>2]|0)+U|0;else va=U;U=c+(N<<2)|0;f[U>>2]=va;O=f[ua+4>>2]|0;if((O|0)<0)wa=(f[F>>2]|0)+O|0;else wa=O;f[U+4>>2]=wa;K=K+1|0;if((K|0)>=(r|0)){la=3;break}U=f[o>>2]|0;L=f[U>>2]|0;if((f[U+4>>2]|0)-L>>2>>>0<=K>>>0){J=U;la=4;break}}if((la|0)==3){u=e;return 1}else if((la|0)==4)aq(J);return 0}function Tb(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0;e=u;u=u+64|0;d=e+48|0;h=e+36|0;i=e+24|0;j=e+16|0;k=e+8|0;l=e;m=e+32|0;n=a+60|0;f[a+68>>2]=g;g=a+108|0;tk(g);o=a+56|0;p=f[o>>2]|0;q=(f[p+4>>2]|0)-(f[p>>2]|0)|0;r=q>>2;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;s=i;f[s>>2]=0;f[s+4>>2]=0;s=j;f[s>>2]=0;f[s+4>>2]=0;s=k;f[s>>2]=0;f[s+4>>2]=0;s=l;f[s>>2]=0;f[s+4>>2]=0;if((q|0)<=0){u=e;return 1}q=h+4|0;s=h+8|0;t=a+104|0;v=i+4|0;w=a+100|0;x=j+4|0;y=a+8|0;z=a+16|0;A=a+32|0;B=a+12|0;C=a+28|0;D=a+20|0;E=a+24|0;F=a+96|0;a=k+4|0;G=l+4|0;H=f[p>>2]|0;if((f[p+4>>2]|0)==(H|0)){J=p;aq(J)}else{K=0;L=H}while(1){f[m>>2]=f[L+(K<<2)>>2];f[d>>2]=f[m>>2];$b(n,d,h);H=f[h>>2]|0;p=(H|0)>-1?H:0-H|0;M=f[q>>2]|0;N=(M|0)>-1?M:0-M|0;O=Vn(N|0,((N|0)<0)<<31>>31|0,p|0,((p|0)<0)<<31>>31|0)|0;p=f[s>>2]|0;N=(p|0)>-1;P=N?p:0-p|0;p=Vn(O|0,I|0,P|0,((P|0)<0)<<31>>31|0)|0;P=I;if((p|0)==0&(P|0)==0){O=f[t>>2]|0;Q=O;R=h;S=M;T=O}else{O=f[t>>2]|0;U=((O|0)<0)<<31>>31;V=un(O|0,U|0,H|0,((H|0)<0)<<31>>31|0)|0;H=Ik(V|0,I|0,p|0,P|0)|0;f[h>>2]=H;V=un(O|0,U|0,M|0,((M|0)<0)<<31>>31|0)|0;M=Ik(V|0,I|0,p|0,P|0)|0;f[q>>2]=M;P=O-((H|0)>-1?H:0-H|0)-((M|0)>-1?M:0-M|0)|0;Q=N?P:0-P|0;R=s;S=M;T=O}f[R>>2]=Q;O=f[h>>2]|0;do if((O|0)<=-1){if((S|0)<0){M=f[s>>2]|0;W=(M|0)>-1?M:0-M|0;X=M}else{M=f[s>>2]|0;W=(f[w>>2]|0)-((M|0)>-1?M:0-M|0)|0;X=M}if((X|0)<0){Y=(S|0)>-1?S:0-S|0;Z=W;_=X;break}else{Y=(f[w>>2]|0)-((S|0)>-1?S:0-S|0)|0;Z=W;_=X;break}}else{M=f[s>>2]|0;Y=M+T|0;Z=T+S|0;_=M}while(0);M=(Z|0)==0;P=(Y|0)==0;N=f[w>>2]|0;do if(Y|Z){H=(N|0)==(Y|0);if(!(M&H)){p=(N|0)==(Z|0);if(!(P&p)){if(M&(T|0)<(Y|0)){$=0;aa=(T<<1)-Y|0;break}if(p&(T|0)>(Y|0)){$=Z;aa=(T<<1)-Y|0;break}if(H&(T|0)>(Z|0)){$=(T<<1)-Z|0;aa=Y;break}if(P){$=(T|0)<(Z|0)?(T<<1)-Z|0:Z;aa=0}else{$=Z;aa=Y}}else{$=Z;aa=Z}}else{$=Y;aa=Y}}else{$=N;aa=N}while(0);f[i>>2]=$;f[v>>2]=aa;P=0-S|0;M=0-_|0;f[h>>2]=0-O;f[q>>2]=P;f[s>>2]=M;if((O|0)<1){ba=T-_|0;ca=T-S|0}else{H=(_|0)<1?M:_;M=(S|0)<1?P:S;ba=(_|0)>0?M:N-M|0;ca=(S|0)>0?H:N-H|0}H=(ca|0)==0;M=(ba|0)==0;do if(((ba|ca|0)!=0?(P=(N|0)==(ba|0),!(H&P)):0)?(p=(N|0)==(ca|0),!(M&p)):0){if(H&(T|0)<(ba|0)){da=0;ea=(T<<1)-ba|0;break}if(p&(T|0)>(ba|0)){da=N;ea=(T<<1)-ba|0;break}if(P&(T|0)>(ca|0)){da=(T<<1)-ca|0;ea=N;break}if(M){da=(T|0)<(ca|0)?(T<<1)-ca|0:ca;ea=0}else{da=ca;ea=ba}}else{da=N;ea=N}while(0);f[j>>2]=da;f[x>>2]=ea;N=K<<1;M=b+(N<<2)|0;H=f[y>>2]|0;if((H|0)>0){O=0;P=i;p=H;while(1){if((p|0)>0){H=0;do{V=f[P+(H<<2)>>2]|0;U=f[z>>2]|0;if((V|0)>(U|0)){fa=f[A>>2]|0;f[fa+(H<<2)>>2]=U;ga=fa}else{fa=f[B>>2]|0;U=f[A>>2]|0;f[U+(H<<2)>>2]=(V|0)<(fa|0)?fa:V;ga=U}H=H+1|0;U=f[y>>2]|0}while((H|0)<(U|0));ha=ga;ia=U}else{ha=f[A>>2]|0;ia=p}H=(f[M+(O<<2)>>2]|0)-(f[ha+(O<<2)>>2]|0)|0;U=k+(O<<2)|0;f[U>>2]=H;ja=f[C>>2]|0;if((H|0)>=(ja|0)){if((H|0)>(f[E>>2]|0)){ka=H-(f[D>>2]|0)|0;la=52}}else{ka=(f[D>>2]|0)+H|0;la=52}if((la|0)==52){la=0;f[U>>2]=ka}O=O+1|0;if((O|0)>=(ia|0))break;else{P=ha;p=ia}}if((ia|0)>0){p=0;P=j;O=ia;U=ja;while(1){if((O|0)>0){H=0;do{V=f[P+(H<<2)>>2]|0;fa=f[z>>2]|0;if((V|0)>(fa|0))f[ha+(H<<2)>>2]=fa;else{fa=f[B>>2]|0;f[ha+(H<<2)>>2]=(V|0)<(fa|0)?fa:V}H=H+1|0;ma=f[y>>2]|0}while((H|0)<(ma|0));na=f[C>>2]|0;oa=ma}else{na=U;oa=O}H=(f[M+(p<<2)>>2]|0)-(f[ha+(p<<2)>>2]|0)|0;V=l+(p<<2)|0;f[V>>2]=H;if((H|0)>=(na|0)){if((H|0)>(f[E>>2]|0)){pa=H-(f[D>>2]|0)|0;la=65}}else{pa=(f[D>>2]|0)+H|0;la=65}if((la|0)==65){la=0;f[V>>2]=pa}p=p+1|0;if((p|0)>=(oa|0))break;else{P=ha;O=oa;U=na}}}}U=f[k>>2]|0;O=f[t>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))qa=(f[F>>2]|0)+U|0;else qa=U;else qa=U-(f[F>>2]|0)|0;f[k>>2]=qa;U=f[a>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))ra=(f[F>>2]|0)+U|0;else ra=U;else ra=U-(f[F>>2]|0)|0;f[a>>2]=ra;U=f[l>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))sa=(f[F>>2]|0)+U|0;else sa=U;else sa=U-(f[F>>2]|0)|0;f[l>>2]=sa;U=f[G>>2]|0;if((O|0)>=(U|0))if((U|0)<(0-O|0))ta=(f[F>>2]|0)+U|0;else ta=U;else ta=U-(f[F>>2]|0)|0;f[G>>2]=ta;if((((ra|0)>-1?ra:0-ra|0)+((qa|0)>-1?qa:0-qa|0)|0)<(((sa|0)>-1?sa:0-sa|0)+((ta|0)>-1?ta:0-ta|0)|0)){fj(g,0);ua=k}else{fj(g,1);ua=l}U=f[ua>>2]|0;if((U|0)<0)va=(f[F>>2]|0)+U|0;else va=U;U=c+(N<<2)|0;f[U>>2]=va;O=f[ua+4>>2]|0;if((O|0)<0)wa=(f[F>>2]|0)+O|0;else wa=O;f[U+4>>2]=wa;K=K+1|0;if((K|0)>=(r|0)){la=3;break}U=f[o>>2]|0;L=f[U>>2]|0;if((f[U+4>>2]|0)-L>>2>>>0<=K>>>0){J=U;la=4;break}}if((la|0)==3){u=e;return 1}else if((la|0)==4)aq(J);return 0}function Ub(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=Oa,V=Oa,Y=Oa,Z=0,_=0,aa=0,ba=0;d=u;u=u+16|0;e=d;g=a+16|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;n[g>>2]=$(1.0);i=a+20|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[a+36>>2]=$(1.0);j=f[c+8>>2]|0;a:do if(j|0){k=a+4|0;l=a+12|0;m=a+8|0;o=j;p=j;while(1){q=o+8|0;r=b[q+11>>0]|0;s=r<<24>>24<0;t=s?f[q>>2]|0:q;v=s?f[o+12>>2]|0:r&255;if(v>>>0>3){r=t;s=v;w=v;while(1){x=X(h[r>>0]|h[r+1>>0]<<8|h[r+2>>0]<<16|h[r+3>>0]<<24,1540483477)|0;s=(X(x>>>24^x,1540483477)|0)^(X(s,1540483477)|0);w=w+-4|0;if(w>>>0<=3)break;else r=r+4|0}r=v+-4|0;w=r&-4;y=r-w|0;z=t+(w+4)|0;A=s}else{y=v;z=t;A=v}switch(y|0){case 3:{B=h[z+2>>0]<<16^A;C=8;break}case 2:{B=A;C=8;break}case 1:{D=A;C=9;break}default:E=A}if((C|0)==8){C=0;D=h[z+1>>0]<<8^B;C=9}if((C|0)==9){C=0;E=X(D^h[z>>0],1540483477)|0}w=X(E>>>13^E,1540483477)|0;r=w>>>15^w;w=f[k>>2]|0;x=(w|0)==0;b:do if(!x){F=w+-1|0;G=(F&w|0)==0;if(!G)if(r>>>0>>0)H=r;else H=(r>>>0)%(w>>>0)|0;else H=r&F;I=f[(f[a>>2]|0)+(H<<2)>>2]|0;if((I|0)!=0?(J=f[I>>2]|0,(J|0)!=0):0){I=(v|0)==0;if(G){if(I){G=J;while(1){K=f[G+4>>2]|0;if(!((K|0)==(r|0)|(K&F|0)==(H|0))){L=H;C=50;break b}K=b[G+8+11>>0]|0;if(!((K<<24>>24<0?f[G+12>>2]|0:K&255)|0))break b;G=f[G>>2]|0;if(!G){L=H;C=50;break b}}}else M=J;while(1){G=f[M+4>>2]|0;if(!((G|0)==(r|0)|(G&F|0)==(H|0))){L=H;C=50;break b}G=M+8|0;K=b[G+11>>0]|0;N=K<<24>>24<0;O=K&255;do if(((N?f[M+12>>2]|0:O)|0)==(v|0)){K=f[G>>2]|0;if(N)if(!(Vk(K,t,v)|0))break b;else break;if((b[t>>0]|0)==(K&255)<<24>>24){K=G;P=O;Q=t;do{P=P+-1|0;K=K+1|0;if(!P)break b;Q=Q+1|0}while((b[K>>0]|0)==(b[Q>>0]|0))}}while(0);M=f[M>>2]|0;if(!M){L=H;C=50;break b}}}if(I){F=J;while(1){O=f[F+4>>2]|0;if((O|0)!=(r|0)){if(O>>>0>>0)R=O;else R=(O>>>0)%(w>>>0)|0;if((R|0)!=(H|0)){L=H;C=50;break b}}O=b[F+8+11>>0]|0;if(!((O<<24>>24<0?f[F+12>>2]|0:O&255)|0))break b;F=f[F>>2]|0;if(!F){L=H;C=50;break b}}}else S=J;while(1){F=f[S+4>>2]|0;if((F|0)!=(r|0)){if(F>>>0>>0)T=F;else T=(F>>>0)%(w>>>0)|0;if((T|0)!=(H|0)){L=H;C=50;break b}}F=S+8|0;I=b[F+11>>0]|0;O=I<<24>>24<0;G=I&255;do if(((O?f[S+12>>2]|0:G)|0)==(v|0)){I=f[F>>2]|0;if(O)if(!(Vk(I,t,v)|0))break b;else break;if((b[t>>0]|0)==(I&255)<<24>>24){I=F;N=G;Q=t;do{N=N+-1|0;I=I+1|0;if(!N)break b;Q=Q+1|0}while((b[I>>0]|0)==(b[Q>>0]|0))}}while(0);S=f[S>>2]|0;if(!S){L=H;C=50;break}}}else{L=H;C=50}}else{L=0;C=50}while(0);if((C|0)==50){C=0;Di(e,a,r,q);U=$(((f[l>>2]|0)+1|0)>>>0);V=$(w>>>0);Y=$(n[g>>2]);do if(x|$(Y*V)>>0<3|(w+-1&w|0)!=0)&1;v=~~$(W($(U/Y)))>>>0;ei(a,t>>>0>>0?v:t);t=f[k>>2]|0;v=t+-1|0;if(!(v&t)){Z=t;_=v&r;break}if(r>>>0>>0){Z=t;_=r}else{Z=t;_=(r>>>0)%(t>>>0)|0}}else{Z=w;_=L}while(0);w=f[(f[a>>2]|0)+(_<<2)>>2]|0;if(!w){f[f[e>>2]>>2]=f[m>>2];f[m>>2]=f[e>>2];f[(f[a>>2]|0)+(_<<2)>>2]=m;r=f[e>>2]|0;x=f[r>>2]|0;if(x|0){q=f[x+4>>2]|0;x=Z+-1|0;if(x&Z)if(q>>>0>>0)aa=q;else aa=(q>>>0)%(Z>>>0)|0;else aa=q&x;f[(f[a>>2]|0)+(aa<<2)>>2]=r}}else{f[f[e>>2]>>2]=f[w>>2];f[w>>2]=f[e>>2]}f[l>>2]=(f[l>>2]|0)+1}w=f[p>>2]|0;if(!w)break a;else{o=w;p=w}}}while(0);e=f[c+28>>2]|0;if(!e){u=d;return}else ba=e;do{e=ba;c=ln(40)|0;Ub(c,f[e+20>>2]|0);aa=Ec(i,e+8|0)|0;e=f[aa>>2]|0;f[aa>>2]=c;if(e|0){c=f[e+28>>2]|0;if(c|0){aa=c;do{c=aa;aa=f[aa>>2]|0;ri(c+8|0);Oq(c)}while((aa|0)!=0)}aa=e+20|0;c=f[aa>>2]|0;f[aa>>2]=0;if(c|0)Oq(c);c=f[e+8>>2]|0;if(c|0){aa=c;do{c=aa;aa=f[aa>>2]|0;a=c+8|0;Z=f[c+20>>2]|0;if(Z|0){_=c+24|0;if((f[_>>2]|0)!=(Z|0))f[_>>2]=Z;Oq(Z)}if((b[a+11>>0]|0)<0)Oq(f[a>>2]|0);Oq(c)}while((aa|0)!=0)}aa=f[e>>2]|0;f[e>>2]=0;if(aa|0)Oq(aa);Oq(e)}ba=f[ba>>2]|0}while((ba|0)!=0);u=d;return}function Vb(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=Oa,fa=Oa,ga=Oa,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0;g=u;u=u+48|0;i=g+16|0;j=g+12|0;k=g;l=i+16|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[l>>2]=$(1.0);m=a+80|0;o=f[m>>2]|0;f[k>>2]=0;p=k+4|0;f[p>>2]=0;f[k+8>>2]=0;if(o){if(o>>>0>1073741823)aq(k);q=o<<2;r=ln(q)|0;f[k>>2]=r;s=r+(o<<2)|0;f[k+8>>2]=s;sj(r|0,0,q|0)|0;f[p>>2]=s;s=c+48|0;q=c+40|0;o=i+4|0;t=i+12|0;v=i+8|0;w=a+40|0;x=a+64|0;y=f[e>>2]|0;e=r;z=0;A=0;B=r;C=r;D=0;E=r;while(1){r=s;F=f[r>>2]|0;G=f[r+4>>2]|0;r=q;H=un(f[r>>2]|0,f[r+4>>2]|0,y+z|0,0)|0;r=Vn(H|0,I|0,F|0,G|0)|0;G=(f[f[c>>2]>>2]|0)+r|0;r=h[G>>0]|h[G+1>>0]<<8|h[G+2>>0]<<16|h[G+3>>0]<<24;f[j>>2]=r;G=r&65535;F=r>>>16;H=F&65535;J=(r&65535^318)+239^F;F=(D|0)==0;a:do if(!F){K=D+-1|0;L=(K&D|0)==0;if(!L)if(J>>>0>>0)M=J;else M=(J>>>0)%(D>>>0)|0;else M=J&K;N=f[(f[i>>2]|0)+(M<<2)>>2]|0;do if(N|0?(O=f[N>>2]|0,O|0):0){b:do if(L){P=O;while(1){Q=f[P+4>>2]|0;R=(Q|0)==(J|0);if(!(R|(Q&K|0)==(M|0))){S=27;break b}if((R?(R=P+8|0,(d[R>>1]|0)==G<<16>>16):0)?(d[R+2>>1]|0)==H<<16>>16:0){T=P;S=26;break b}P=f[P>>2]|0;if(!P){S=27;break}}}else{P=O;while(1){R=f[P+4>>2]|0;if((R|0)==(J|0)){Q=P+8|0;if((d[Q>>1]|0)==G<<16>>16?(d[Q+2>>1]|0)==H<<16>>16:0){T=P;S=26;break b}}else{if(R>>>0>>0)U=R;else U=(R>>>0)%(D>>>0)|0;if((U|0)!=(M|0)){S=27;break b}}P=f[P>>2]|0;if(!P){S=27;break}}}while(0);if((S|0)==26){S=0;f[E+(z<<2)>>2]=f[T+12>>2];V=e;X=A;Y=C;Z=B;_=E;break a}else if((S|0)==27){S=0;if(F){aa=0;S=46;break a}else break}}while(0);K=D+-1|0;L=(K&D|0)==0;if(!L)if(J>>>0>>0)ba=J;else ba=(J>>>0)%(D>>>0)|0;else ba=K&J;N=f[(f[i>>2]|0)+(ba<<2)>>2]|0;if((N|0)!=0?(O=f[N>>2]|0,(O|0)!=0):0){if(L){L=O;while(1){N=f[L+4>>2]|0;if(!((N|0)==(J|0)|(N&K|0)==(ba|0))){aa=ba;S=46;break a}N=L+8|0;if((d[N>>1]|0)==G<<16>>16?(d[N+2>>1]|0)==H<<16>>16:0){S=61;break a}L=f[L>>2]|0;if(!L){aa=ba;S=46;break a}}}else ca=O;while(1){L=f[ca+4>>2]|0;if((L|0)!=(J|0)){if(L>>>0>>0)da=L;else da=(L>>>0)%(D>>>0)|0;if((da|0)!=(ba|0)){aa=ba;S=46;break a}}L=ca+8|0;if((d[L>>1]|0)==G<<16>>16?(d[L+2>>1]|0)==H<<16>>16:0){S=61;break a}ca=f[ca>>2]|0;if(!ca){aa=ba;S=46;break}}}else{aa=ba;S=46}}else{aa=0;S=46}while(0);if((S|0)==46){S=0;H=ln(16)|0;G=H+8|0;d[G>>1]=r;d[G+2>>1]=r>>>16;f[H+12>>2]=A;f[H+4>>2]=J;f[H>>2]=0;ea=$(((f[t>>2]|0)+1|0)>>>0);fa=$(D>>>0);ga=$(n[l>>2]);do if(F|$(ga*fa)>>0<3|(D+-1&D|0)!=0)&1;O=~~$(W($(ea/ga)))>>>0;Uh(i,G>>>0>>0?O:G);G=f[o>>2]|0;O=G+-1|0;if(!(O&G)){ha=G;ia=O&J;break}if(J>>>0>>0){ha=G;ia=J}else{ha=G;ia=(J>>>0)%(G>>>0)|0}}else{ha=D;ia=aa}while(0);J=(f[i>>2]|0)+(ia<<2)|0;F=f[J>>2]|0;if(!F){f[H>>2]=f[v>>2];f[v>>2]=H;f[J>>2]=v;J=f[H>>2]|0;if(J|0){r=f[J+4>>2]|0;J=ha+-1|0;if(J&ha)if(r>>>0>>0)ja=r;else ja=(r>>>0)%(ha>>>0)|0;else ja=r&J;ka=(f[i>>2]|0)+(ja<<2)|0;S=59}}else{f[H>>2]=f[F>>2];ka=F;S=59}if((S|0)==59){S=0;f[ka>>2]=H}f[t>>2]=(f[t>>2]|0)+1;S=61}if((S|0)==61){S=0;F=w;J=f[F>>2]|0;r=un(J|0,f[F+4>>2]|0,A|0,0)|0;kh((f[f[x>>2]>>2]|0)+r|0,j|0,J|0)|0;J=f[k>>2]|0;f[J+(z<<2)>>2]=A;V=J;X=A+1|0;Y=J;Z=J;_=J}J=z+1|0;la=f[m>>2]|0;if(J>>>0>=la>>>0)break;e=V;z=J;A=X;B=Z;C=Y;D=f[o>>2]|0;E=_}if((X|0)==(la|0))ma=Z;else{Z=a+84|0;if(!(b[Z>>0]|0)){_=f[a+72>>2]|0;E=f[a+68>>2]|0;o=E;if((_|0)==(E|0))na=V;else{D=_-E>>2;E=0;do{_=o+(E<<2)|0;f[_>>2]=f[Y+(f[_>>2]<<2)>>2];E=E+1|0}while(E>>>0>>0);na=V}}else{b[Z>>0]=0;Z=a+68|0;V=a+72|0;D=f[V>>2]|0;E=f[Z>>2]|0;Y=D-E>>2;o=E;E=D;if(la>>>0<=Y>>>0)if(la>>>0>>0?(D=o+(la<<2)|0,(D|0)!=(E|0)):0){f[V>>2]=E+(~((E+-4-D|0)>>>2)<<2);oa=la}else oa=la;else{Ch(Z,la-Y|0,1220);oa=f[m>>2]|0}Y=f[k>>2]|0;if(!oa)na=Y;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[Y+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);na=Y}}f[m>>2]=X;ma=na}if(!ma)pa=X;else{na=f[p>>2]|0;if((na|0)!=(ma|0))f[p>>2]=na+(~((na+-4-ma|0)>>>2)<<2);Oq(ma);pa=X}}else pa=0;X=f[i+8>>2]|0;if(X|0){ma=X;do{X=ma;ma=f[ma>>2]|0;Oq(X)}while((ma|0)!=0)}ma=f[i>>2]|0;f[i>>2]=0;if(!ma){u=g;return pa|0}Oq(ma);u=g;return pa|0}function Wb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=Oa,da=Oa,ea=Oa,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0;e=u;u=u+48|0;g=e+20|0;i=e;j=e+8|0;k=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[k>>2]=$(1.0);l=a+80|0;m=f[l>>2]|0;f[j>>2]=0;o=j+4|0;f[o>>2]=0;f[j+8>>2]=0;if(m){if(m>>>0>1073741823)aq(j);p=m<<2;q=ln(p)|0;f[j>>2]=q;r=q+(m<<2)|0;f[j+8>>2]=r;sj(q|0,0,p|0)|0;f[o>>2]=r;r=c+48|0;p=c+40|0;m=g+4|0;s=g+12|0;t=g+8|0;v=a+40|0;w=a+64|0;x=f[d>>2]|0;d=q;y=0;z=0;A=q;B=q;C=q;q=0;while(1){D=r;E=f[D>>2]|0;F=f[D+4>>2]|0;D=p;G=un(f[D>>2]|0,f[D+4>>2]|0,x+y|0,0)|0;D=Vn(G|0,I|0,E|0,F|0)|0;F=(f[f[c>>2]>>2]|0)+D|0;D=F;E=h[D>>0]|h[D+1>>0]<<8|h[D+2>>0]<<16|h[D+3>>0]<<24;D=F+4|0;F=h[D>>0]|h[D+1>>0]<<8|h[D+2>>0]<<16|h[D+3>>0]<<24;D=i;f[D>>2]=E;f[D+4>>2]=F;D=(E^318)+239^F;G=(q|0)==0;a:do if(!G){H=q+-1|0;J=(H&q|0)==0;if(!J)if(D>>>0>>0)K=D;else K=(D>>>0)%(q>>>0)|0;else K=D&H;L=f[(f[g>>2]|0)+(K<<2)>>2]|0;do if(L|0?(M=f[L>>2]|0,M|0):0){b:do if(J){N=M;while(1){O=f[N+4>>2]|0;P=(O|0)==(D|0);if(!(P|(O&H|0)==(K|0))){Q=27;break b}if((P?(f[N+8>>2]|0)==(E|0):0)?(f[N+12>>2]|0)==(F|0):0){R=N;Q=26;break b}N=f[N>>2]|0;if(!N){Q=27;break}}}else{N=M;while(1){P=f[N+4>>2]|0;if((P|0)==(D|0)){if((f[N+8>>2]|0)==(E|0)?(f[N+12>>2]|0)==(F|0):0){R=N;Q=26;break b}}else{if(P>>>0>>0)S=P;else S=(P>>>0)%(q>>>0)|0;if((S|0)!=(K|0)){Q=27;break b}}N=f[N>>2]|0;if(!N){Q=27;break}}}while(0);if((Q|0)==26){Q=0;f[A+(y<<2)>>2]=f[R+16>>2];T=d;U=z;V=C;X=B;Y=A;break a}else if((Q|0)==27){Q=0;if(G){Z=0;Q=46;break a}else break}}while(0);H=q+-1|0;J=(H&q|0)==0;if(!J)if(D>>>0>>0)_=D;else _=(D>>>0)%(q>>>0)|0;else _=H&D;L=f[(f[g>>2]|0)+(_<<2)>>2]|0;if((L|0)!=0?(M=f[L>>2]|0,(M|0)!=0):0){if(J){J=M;while(1){L=f[J+4>>2]|0;if(!((L|0)==(D|0)|(L&H|0)==(_|0))){Z=_;Q=46;break a}if((f[J+8>>2]|0)==(E|0)?(f[J+12>>2]|0)==(F|0):0){Q=61;break a}J=f[J>>2]|0;if(!J){Z=_;Q=46;break a}}}else aa=M;while(1){J=f[aa+4>>2]|0;if((J|0)!=(D|0)){if(J>>>0>>0)ba=J;else ba=(J>>>0)%(q>>>0)|0;if((ba|0)!=(_|0)){Z=_;Q=46;break a}}if((f[aa+8>>2]|0)==(E|0)?(f[aa+12>>2]|0)==(F|0):0){Q=61;break a}aa=f[aa>>2]|0;if(!aa){Z=_;Q=46;break}}}else{Z=_;Q=46}}else{Z=0;Q=46}while(0);if((Q|0)==46){Q=0;M=ln(20)|0;J=M+8|0;f[J>>2]=E;f[J+4>>2]=F;f[M+16>>2]=z;f[M+4>>2]=D;f[M>>2]=0;ca=$(((f[s>>2]|0)+1|0)>>>0);da=$(q>>>0);ea=$(n[k>>2]);do if(G|$(ea*da)>>0<3|(q+-1&q|0)!=0)&1;H=~~$(W($(ca/ea)))>>>0;Yh(g,J>>>0>>0?H:J);J=f[m>>2]|0;H=J+-1|0;if(!(H&J)){fa=J;ga=H&D;break}if(D>>>0>>0){fa=J;ga=D}else{fa=J;ga=(D>>>0)%(J>>>0)|0}}else{fa=q;ga=Z}while(0);D=(f[g>>2]|0)+(ga<<2)|0;G=f[D>>2]|0;if(!G){f[M>>2]=f[t>>2];f[t>>2]=M;f[D>>2]=t;D=f[M>>2]|0;if(D|0){F=f[D+4>>2]|0;D=fa+-1|0;if(D&fa)if(F>>>0>>0)ha=F;else ha=(F>>>0)%(fa>>>0)|0;else ha=F&D;ia=(f[g>>2]|0)+(ha<<2)|0;Q=59}}else{f[M>>2]=f[G>>2];ia=G;Q=59}if((Q|0)==59){Q=0;f[ia>>2]=M}f[s>>2]=(f[s>>2]|0)+1;Q=61}if((Q|0)==61){Q=0;G=v;D=f[G>>2]|0;F=un(D|0,f[G+4>>2]|0,z|0,0)|0;kh((f[f[w>>2]>>2]|0)+F|0,i|0,D|0)|0;D=f[j>>2]|0;f[D+(y<<2)>>2]=z;T=D;U=z+1|0;V=D;X=D;Y=D}D=y+1|0;ja=f[l>>2]|0;if(D>>>0>=ja>>>0)break;d=T;y=D;z=U;A=Y;B=X;C=V;q=f[m>>2]|0}if((U|0)==(ja|0))ka=X;else{X=a+84|0;if(!(b[X>>0]|0)){m=f[a+72>>2]|0;q=f[a+68>>2]|0;C=q;if((m|0)==(q|0))la=T;else{B=m-q>>2;q=0;do{m=C+(q<<2)|0;f[m>>2]=f[V+(f[m>>2]<<2)>>2];q=q+1|0}while(q>>>0>>0);la=T}}else{b[X>>0]=0;X=a+68|0;T=a+72|0;B=f[T>>2]|0;q=f[X>>2]|0;V=B-q>>2;C=q;q=B;if(ja>>>0<=V>>>0)if(ja>>>0>>0?(B=C+(ja<<2)|0,(B|0)!=(q|0)):0){f[T>>2]=q+(~((q+-4-B|0)>>>2)<<2);ma=ja}else ma=ja;else{Ch(X,ja-V|0,1220);ma=f[l>>2]|0}V=f[j>>2]|0;if(!ma)la=V;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[V+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);la=V}}f[l>>2]=U;ka=la}if(!ka)na=U;else{la=f[o>>2]|0;if((la|0)!=(ka|0))f[o>>2]=la+(~((la+-4-ka|0)>>>2)<<2);Oq(ka);na=U}}else na=0;U=f[g+8>>2]|0;if(U|0){ka=U;do{U=ka;ka=f[ka>>2]|0;Oq(U)}while((ka|0)!=0)}ka=f[g>>2]|0;f[g>>2]=0;if(!ka){u=e;return na|0}Oq(ka);u=e;return na|0}function Xb(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=Oa,fa=Oa,ga=Oa,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0;g=u;u=u+48|0;i=g+12|0;j=g+32|0;k=g;l=i+16|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[l>>2]=$(1.0);m=a+80|0;o=f[m>>2]|0;f[k>>2]=0;p=k+4|0;f[p>>2]=0;f[k+8>>2]=0;if(o){if(o>>>0>1073741823)aq(k);q=o<<2;r=ln(q)|0;f[k>>2]=r;s=r+(o<<2)|0;f[k+8>>2]=s;sj(r|0,0,q|0)|0;f[p>>2]=s;s=c+48|0;q=c+40|0;o=i+4|0;t=i+12|0;v=i+8|0;w=a+40|0;x=a+64|0;y=f[e>>2]|0;e=r;z=0;A=0;B=r;C=r;D=0;E=r;while(1){r=s;F=f[r>>2]|0;G=f[r+4>>2]|0;r=q;H=un(f[r>>2]|0,f[r+4>>2]|0,y+z|0,0)|0;r=Vn(H|0,I|0,F|0,G|0)|0;G=(f[f[c>>2]>>2]|0)+r|0;r=h[G>>0]|h[G+1>>0]<<8;d[j>>1]=r;G=r&255;F=(r&65535)>>>8;H=F&255;J=((r&255^318)+239<<16>>16^F)&65535;F=(D|0)==0;a:do if(!F){K=D+-1|0;L=(K&D|0)==0;if(!L)if(D>>>0>J>>>0)M=J;else M=(J>>>0)%(D>>>0)|0;else M=K&J;N=f[(f[i>>2]|0)+(M<<2)>>2]|0;do if(N|0?(O=f[N>>2]|0,O|0):0){b:do if(L){P=O;while(1){Q=f[P+4>>2]|0;R=(Q|0)==(J|0);if(!(R|(Q&K|0)==(M|0))){S=27;break b}if((R?(R=P+8|0,(b[R>>0]|0)==G<<24>>24):0)?(b[R+1>>0]|0)==H<<24>>24:0){T=P;S=26;break b}P=f[P>>2]|0;if(!P){S=27;break}}}else{P=O;while(1){R=f[P+4>>2]|0;if((R|0)==(J|0)){Q=P+8|0;if((b[Q>>0]|0)==G<<24>>24?(b[Q+1>>0]|0)==H<<24>>24:0){T=P;S=26;break b}}else{if(R>>>0>>0)U=R;else U=(R>>>0)%(D>>>0)|0;if((U|0)!=(M|0)){S=27;break b}}P=f[P>>2]|0;if(!P){S=27;break}}}while(0);if((S|0)==26){S=0;f[E+(z<<2)>>2]=f[T+12>>2];V=e;X=A;Y=C;Z=B;_=E;break a}else if((S|0)==27){S=0;if(F){aa=0;S=46;break a}else break}}while(0);K=D+-1|0;L=(K&D|0)==0;if(!L)if(D>>>0>J>>>0)ba=J;else ba=(J>>>0)%(D>>>0)|0;else ba=K&J;N=f[(f[i>>2]|0)+(ba<<2)>>2]|0;if((N|0)!=0?(O=f[N>>2]|0,(O|0)!=0):0){if(L){L=O;while(1){N=f[L+4>>2]|0;if(!((N|0)==(J|0)|(N&K|0)==(ba|0))){aa=ba;S=46;break a}N=L+8|0;if((b[N>>0]|0)==G<<24>>24?(b[N+1>>0]|0)==H<<24>>24:0){S=61;break a}L=f[L>>2]|0;if(!L){aa=ba;S=46;break a}}}else ca=O;while(1){L=f[ca+4>>2]|0;if((L|0)!=(J|0)){if(L>>>0>>0)da=L;else da=(L>>>0)%(D>>>0)|0;if((da|0)!=(ba|0)){aa=ba;S=46;break a}}L=ca+8|0;if((b[L>>0]|0)==G<<24>>24?(b[L+1>>0]|0)==H<<24>>24:0){S=61;break a}ca=f[ca>>2]|0;if(!ca){aa=ba;S=46;break}}}else{aa=ba;S=46}}else{aa=0;S=46}while(0);if((S|0)==46){S=0;H=ln(16)|0;G=H+8|0;b[G>>0]=r;b[G+1>>0]=r>>8;f[H+12>>2]=A;f[H+4>>2]=J;f[H>>2]=0;ea=$(((f[t>>2]|0)+1|0)>>>0);fa=$(D>>>0);ga=$(n[l>>2]);do if(F|$(ga*fa)>>0<3|(D+-1&D|0)!=0)&1;O=~~$(W($(ea/ga)))>>>0;$h(i,G>>>0>>0?O:G);G=f[o>>2]|0;O=G+-1|0;if(!(O&G)){ha=G;ia=O&J;break}if(G>>>0>J>>>0){ha=G;ia=J}else{ha=G;ia=(J>>>0)%(G>>>0)|0}}else{ha=D;ia=aa}while(0);J=(f[i>>2]|0)+(ia<<2)|0;F=f[J>>2]|0;if(!F){f[H>>2]=f[v>>2];f[v>>2]=H;f[J>>2]=v;J=f[H>>2]|0;if(J|0){r=f[J+4>>2]|0;J=ha+-1|0;if(J&ha)if(r>>>0>>0)ja=r;else ja=(r>>>0)%(ha>>>0)|0;else ja=r&J;ka=(f[i>>2]|0)+(ja<<2)|0;S=59}}else{f[H>>2]=f[F>>2];ka=F;S=59}if((S|0)==59){S=0;f[ka>>2]=H}f[t>>2]=(f[t>>2]|0)+1;S=61}if((S|0)==61){S=0;F=w;J=f[F>>2]|0;r=un(J|0,f[F+4>>2]|0,A|0,0)|0;kh((f[f[x>>2]>>2]|0)+r|0,j|0,J|0)|0;J=f[k>>2]|0;f[J+(z<<2)>>2]=A;V=J;X=A+1|0;Y=J;Z=J;_=J}J=z+1|0;la=f[m>>2]|0;if(J>>>0>=la>>>0)break;e=V;z=J;A=X;B=Z;C=Y;D=f[o>>2]|0;E=_}if((X|0)==(la|0))ma=Z;else{Z=a+84|0;if(!(b[Z>>0]|0)){_=f[a+72>>2]|0;E=f[a+68>>2]|0;o=E;if((_|0)==(E|0))na=V;else{D=_-E>>2;E=0;do{_=o+(E<<2)|0;f[_>>2]=f[Y+(f[_>>2]<<2)>>2];E=E+1|0}while(E>>>0>>0);na=V}}else{b[Z>>0]=0;Z=a+68|0;V=a+72|0;D=f[V>>2]|0;E=f[Z>>2]|0;Y=D-E>>2;o=E;E=D;if(la>>>0<=Y>>>0)if(la>>>0>>0?(D=o+(la<<2)|0,(D|0)!=(E|0)):0){f[V>>2]=E+(~((E+-4-D|0)>>>2)<<2);oa=la}else oa=la;else{Ch(Z,la-Y|0,1220);oa=f[m>>2]|0}Y=f[k>>2]|0;if(!oa)na=Y;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[Y+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);na=Y}}f[m>>2]=X;ma=na}if(!ma)pa=X;else{na=f[p>>2]|0;if((na|0)!=(ma|0))f[p>>2]=na+(~((na+-4-ma|0)>>>2)<<2);Oq(ma);pa=X}}else pa=0;X=f[i+8>>2]|0;if(X|0){ma=X;do{X=ma;ma=f[ma>>2]|0;Oq(X)}while((ma|0)!=0)}ma=f[i>>2]|0;f[i>>2]=0;if(!ma){u=g;return pa|0}Oq(ma);u=g;return pa|0}function Yb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0;c=u;u=u+16|0;d=c+8|0;e=c;g=c+4|0;h=a+16|0;i=f[h>>2]|0;j=a+20|0;k=f[j>>2]|0;if((k|0)==(i|0))l=i;else{m=k+(~((k+-4-i|0)>>>2)<<2)|0;f[j>>2]=m;l=m}m=a+24|0;if((l|0)==(f[m>>2]|0)){Ri(h,b);n=f[h>>2]|0;o=f[j>>2]|0}else{f[l>>2]=f[b>>2];k=l+4|0;f[j>>2]=k;n=i;o=k}k=f[a+8>>2]|0;i=(f[k+100>>2]|0)-(f[k+96>>2]|0)|0;k=(i|0)/12|0;if((n|0)==(o|0)){u=c;return 1}n=a+28|0;l=(i|0)>0;i=a+164|0;p=a+12|0;q=a+76|0;r=a+80|0;s=a+72|0;t=a+200|0;v=a+320|0;w=a+152|0;x=a+84|0;y=a+324|0;z=a+292|0;A=a+304|0;B=a+316|0;C=a+328|0;D=a+336|0;E=a+332|0;F=a+168|0;G=a+140|0;H=a+120|0;I=o;do{o=f[I+-4>>2]|0;f[b>>2]=o;a:do if((o|0)!=-1?(J=(o>>>0)/3|0,K=f[n>>2]|0,(f[K+(J>>>5<<2)>>2]&1<<(J&31)|0)==0):0){if(l){J=0;L=K;b:while(1){K=J+1|0;f[i>>2]=(f[i>>2]|0)+1;M=f[b>>2]|0;N=(M|0)==-1?-1:(M>>>0)/3|0;M=L+(N>>>5<<2)|0;f[M>>2]=1<<(N&31)|f[M>>2];M=f[q>>2]|0;if((M|0)==(f[r>>2]|0))Ri(s,b);else{f[M>>2]=f[b>>2];f[q>>2]=M+4}f[v>>2]=f[b>>2];M=f[b>>2]|0;if((M|0)==-1)O=-1;else O=f[(f[f[p>>2]>>2]|0)+(M<<2)>>2]|0;P=(f[(f[w>>2]|0)+(O<<2)>>2]|0)!=-1;Q=(f[x>>2]|0)+(O>>>5<<2)|0;R=1<<(O&31);S=f[Q>>2]|0;do if(!(S&R)){f[Q>>2]=S|R;if(P){T=f[b>>2]|0;U=38;break}f[y>>2]=(f[y>>2]|0)+1;V=f[v>>2]|0;W=V+1|0;do if((V|0)!=-1){X=((W>>>0)%3|0|0)==0?V+-2|0:W;if(!((V>>>0)%3|0)){Y=V+2|0;Z=X;break}else{Y=V+-1|0;Z=X;break}}else{Y=-1;Z=-1}while(0);V=f[z>>2]|0;W=f[A>>2]|0;X=W+(f[V+(Z<<2)>>2]<<2)|0;_=f[X>>2]|0;f[X>>2]=_+-1;X=W+(f[V+(Y<<2)>>2]<<2)|0;f[X>>2]=(f[X>>2]|0)+-1;X=f[B>>2]|0;if((X|0)!=-1){V=f[C>>2]|0;if((_|0)<(V|0))$=V;else{W=f[E>>2]|0;$=(_|0)>(W|0)?W:_}_=$-V|0;V=f[D>>2]|0;W=f[3724+(X<<2)>>2]|0;f[d>>2]=W;X=V+(_*12|0)+4|0;aa=f[X>>2]|0;if(aa>>>0<(f[V+(_*12|0)+8>>2]|0)>>>0){f[aa>>2]=W;f[X>>2]=aa+4}else Ri(V+(_*12|0)|0,d)}f[B>>2]=0;_=f[b>>2]|0;V=_+1|0;if((_|0)!=-1?(aa=((V>>>0)%3|0|0)==0?_+-2|0:V,(aa|0)!=-1):0)ba=f[(f[(f[p>>2]|0)+12>>2]|0)+(aa<<2)>>2]|0;else ba=-1;f[b>>2]=ba}else{T=M;U=38}while(0);if((U|0)==38){U=0;M=T+1|0;if((T|0)==-1){U=43;break}R=((M>>>0)%3|0|0)==0?T+-2|0:M;if((R|0)==-1)ca=-1;else ca=f[(f[(f[p>>2]|0)+12>>2]|0)+(R<<2)>>2]|0;f[e>>2]=ca;R=(((T>>>0)%3|0|0)==0?2:-1)+T|0;if((R|0)==-1)da=-1;else da=f[(f[(f[p>>2]|0)+12>>2]|0)+(R<<2)>>2]|0;R=(ca|0)==-1;S=R?-1:(ca>>>0)/3|0;ea=(da|0)==-1;fa=ea?-1:(da>>>0)/3|0;Q=((M>>>0)%3|0|0)==0?T+-2|0:M;if(((Q|0)!=-1?(M=f[(f[p>>2]|0)+12>>2]|0,aa=f[M+(Q<<2)>>2]|0,(aa|0)!=-1):0)?(Q=(aa>>>0)/3|0,aa=f[n>>2]|0,(f[aa+(Q>>>5<<2)>>2]&1<<(Q&31)|0)==0):0){Q=(((T>>>0)%3|0|0)==0?2:-1)+T|0;do if((Q|0)!=-1){V=f[M+(Q<<2)>>2]|0;if((V|0)==-1)break;_=(V>>>0)/3|0;if(!(f[aa+(_>>>5<<2)>>2]&1<<(_&31))){U=62;break b}}while(0);if(!ea)xf(a,f[i>>2]|0,N,0,fa);nd(t,3);ga=f[e>>2]|0}else{if(!R){xf(a,f[i>>2]|0,N,1,S);aa=f[b>>2]|0;if((aa|0)==-1){U=52;break}else ha=aa}else ha=T;aa=(((ha>>>0)%3|0|0)==0?2:-1)+ha|0;if((aa|0)==-1){U=52;break}Q=f[(f[(f[p>>2]|0)+12>>2]|0)+(aa<<2)>>2]|0;if((Q|0)==-1){U=52;break}aa=(Q>>>0)/3|0;if(f[(f[n>>2]|0)+(aa>>>5<<2)>>2]&1<<(aa&31)|0){U=52;break}nd(t,5);ga=da}f[b>>2]=ga}if((K|0)>=(k|0))break a;J=K;L=f[n>>2]|0}do if((U|0)==43){U=0;f[e>>2]=-1;U=54}else if((U|0)==52){U=0;if(ea)U=54;else{xf(a,f[i>>2]|0,N,0,fa);U=54}}else if((U|0)==62){U=0;nd(t,1);f[F>>2]=(f[F>>2]|0)+1;if(P?(L=f[(f[w>>2]|0)+(O<<2)>>2]|0,(1<<(L&31)&f[(f[G>>2]|0)+(L>>>5<<2)>>2]|0)==0):0){f[g>>2]=f[b>>2];f[d>>2]=f[g>>2];Pe(a,d,0)|0}L=f[i>>2]|0;f[d>>2]=N;J=je(H,d)|0;f[J>>2]=L;L=f[j>>2]|0;f[L+-4>>2]=da;if((L|0)==(f[m>>2]|0)){Ri(h,e);break}else{f[L>>2]=f[e>>2];f[j>>2]=L+4;break}}while(0);if((U|0)==54){U=0;nd(t,7);f[j>>2]=(f[j>>2]|0)+-4}}}else U=11;while(0);if((U|0)==11){U=0;f[j>>2]=I+-4}I=f[j>>2]|0}while((f[h>>2]|0)!=(I|0));u=c;return 1}function Zb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;c=u;u=u+16|0;d=c+8|0;e=c;g=f[b>>2]|0;if((g|0)==-1){u=c;return}h=(g>>>0)/3|0;i=a+12|0;if(f[(f[i>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)|0){u=c;return}h=a+56|0;j=f[h>>2]|0;k=a+60|0;l=f[k>>2]|0;if((l|0)==(j|0))m=j;else{n=l+(~((l+-4-j|0)>>>2)<<2)|0;f[k>>2]=n;m=n}n=a+64|0;if((m|0)==(f[n>>2]|0))Ri(h,b);else{f[m>>2]=g;f[k>>2]=m+4}m=f[a>>2]|0;g=f[b>>2]|0;j=g+1|0;do if((g|0)!=-1){l=f[m+28>>2]|0;o=f[l+((((j>>>0)%3|0|0)==0?g+-2|0:j)<<2)>>2]|0;if(!((g>>>0)%3|0)){p=o;q=g+2|0;r=l;break}else{p=o;q=g+-1|0;r=l;break}}else{l=f[m+28>>2]|0;p=f[l+-4>>2]|0;q=-1;r=l}while(0);m=f[r+(q<<2)>>2]|0;q=a+24|0;r=f[q>>2]|0;g=r+(p>>>5<<2)|0;j=1<<(p&31);l=f[g>>2]|0;if(!(l&j)){f[g>>2]=l|j;j=f[b>>2]|0;l=j+1|0;if((j|0)==-1)s=-1;else s=((l>>>0)%3|0|0)==0?j+-2|0:l;f[e>>2]=s;l=f[(f[(f[a+44>>2]|0)+96>>2]|0)+(((s>>>0)/3|0)*12|0)+(((s>>>0)%3|0)<<2)>>2]|0;s=f[a+48>>2]|0;f[d>>2]=l;j=f[s+4>>2]|0;s=j+4|0;g=f[s>>2]|0;if((g|0)==(f[j+8>>2]|0))Ri(j,d);else{f[g>>2]=l;f[s>>2]=g+4}g=a+40|0;s=f[g>>2]|0;l=s+4|0;j=f[l>>2]|0;if((j|0)==(f[s+8>>2]|0)){Ri(s,e);t=f[g>>2]|0}else{f[j>>2]=f[e>>2];f[l>>2]=j+4;t=s}s=t+24|0;f[(f[t+12>>2]|0)+(p<<2)>>2]=f[s>>2];f[s>>2]=(f[s>>2]|0)+1;v=f[q>>2]|0}else v=r;r=v+(m>>>5<<2)|0;v=1<<(m&31);s=f[r>>2]|0;if(!(s&v)){f[r>>2]=s|v;v=f[b>>2]|0;do if((v|0)!=-1)if(!((v>>>0)%3|0)){w=v+2|0;break}else{w=v+-1|0;break}else w=-1;while(0);f[e>>2]=w;v=f[(f[(f[a+44>>2]|0)+96>>2]|0)+(((w>>>0)/3|0)*12|0)+(((w>>>0)%3|0)<<2)>>2]|0;w=f[a+48>>2]|0;f[d>>2]=v;s=f[w+4>>2]|0;w=s+4|0;r=f[w>>2]|0;if((r|0)==(f[s+8>>2]|0))Ri(s,d);else{f[r>>2]=v;f[w>>2]=r+4}r=a+40|0;w=f[r>>2]|0;v=w+4|0;s=f[v>>2]|0;if((s|0)==(f[w+8>>2]|0)){Ri(w,e);x=f[r>>2]|0}else{f[s>>2]=f[e>>2];f[v>>2]=s+4;x=w}w=x+24|0;f[(f[x+12>>2]|0)+(m<<2)>>2]=f[w>>2];f[w>>2]=(f[w>>2]|0)+1}w=f[h>>2]|0;m=f[k>>2]|0;if((w|0)==(m|0)){u=c;return}x=a+44|0;s=a+48|0;v=a+40|0;r=m;m=w;while(1){w=f[r+-4>>2]|0;f[b>>2]=w;p=(w>>>0)/3|0;if((w|0)!=-1?(w=f[i>>2]|0,(f[w+(p>>>5<<2)>>2]&1<<(p&31)|0)==0):0){t=p;p=w;w=f[a>>2]|0;a:while(1){j=p+(t>>>5<<2)|0;f[j>>2]=f[j>>2]|1<<(t&31);j=f[b>>2]|0;l=f[(f[w+28>>2]|0)+(j<<2)>>2]|0;g=(f[q>>2]|0)+(l>>>5<<2)|0;o=1<<(l&31);y=f[g>>2]|0;if(!(o&y)){z=f[(f[w+40>>2]|0)+(l<<2)>>2]|0;if((z|0)==-1)A=1;else{B=f[(f[f[w+64>>2]>>2]|0)+(z<<2)>>2]|0;A=(1<<(B&31)&f[(f[w+12>>2]|0)+(B>>>5<<2)>>2]|0)!=0}f[g>>2]=y|o;o=f[b>>2]|0;f[e>>2]=o;y=f[(f[(f[x>>2]|0)+96>>2]|0)+(((o>>>0)/3|0)*12|0)+(((o>>>0)%3|0)<<2)>>2]|0;o=f[s>>2]|0;f[d>>2]=y;g=f[o+4>>2]|0;o=g+4|0;B=f[o>>2]|0;if((B|0)==(f[g+8>>2]|0))Ri(g,d);else{f[B>>2]=y;f[o>>2]=B+4}B=f[v>>2]|0;o=B+4|0;y=f[o>>2]|0;if((y|0)==(f[B+8>>2]|0)){Ri(B,e);C=f[v>>2]|0}else{f[y>>2]=f[e>>2];f[o>>2]=y+4;C=B}B=C+24|0;f[(f[C+12>>2]|0)+(l<<2)>>2]=f[B>>2];f[B>>2]=(f[B>>2]|0)+1;B=f[a>>2]|0;l=f[b>>2]|0;if(A){D=l;E=B;F=57}else{y=l+1|0;do if((l|0)==-1)G=-1;else{o=((y>>>0)%3|0|0)==0?l+-2|0:y;if((o|0)==-1){G=-1;break}if(f[(f[B>>2]|0)+(o>>>5<<2)>>2]&1<<(o&31)|0){G=-1;break}G=f[(f[(f[B+64>>2]|0)+12>>2]|0)+(o<<2)>>2]|0}while(0);f[b>>2]=G;H=(G>>>0)/3|0;I=B}}else{D=j;E=w;F=57}if((F|0)==57){F=0;y=D+1|0;if((D|0)==-1){F=58;break}l=((y>>>0)%3|0|0)==0?D+-2|0:y;if((l|0)!=-1?(f[(f[E>>2]|0)+(l>>>5<<2)>>2]&1<<(l&31)|0)==0:0)J=f[(f[(f[E+64>>2]|0)+12>>2]|0)+(l<<2)>>2]|0;else J=-1;f[d>>2]=J;l=(((D>>>0)%3|0|0)==0?2:-1)+D|0;if((l|0)!=-1?(f[(f[E>>2]|0)+(l>>>5<<2)>>2]&1<<(l&31)|0)==0:0)K=f[(f[(f[E+64>>2]|0)+12>>2]|0)+(l<<2)>>2]|0;else K=-1;l=(J|0)==-1;y=(J>>>0)/3|0;o=l?-1:y;g=(K|0)==-1;z=(K>>>0)/3|0;L=g?-1:z;do if(!l){M=f[i>>2]|0;if(f[M+(o>>>5<<2)>>2]&1<<(o&31)|0){F=67;break}if(g){N=J;O=y;break}if(!(f[M+(L>>>5<<2)>>2]&1<<(L&31))){F=72;break a}else{N=J;O=y}}else F=67;while(0);if((F|0)==67){F=0;if(g){F=69;break}if(!(f[(f[i>>2]|0)+(L>>>5<<2)>>2]&1<<(L&31))){N=K;O=z}else{F=69;break}}f[b>>2]=N;H=O;I=E}t=H;p=f[i>>2]|0;w=I}do if((F|0)==58){F=0;f[d>>2]=-1;F=69}else if((F|0)==72){F=0;w=f[k>>2]|0;f[w+-4>>2]=K;if((w|0)==(f[n>>2]|0)){Ri(h,d);P=f[k>>2]|0;break}else{f[w>>2]=f[d>>2];p=w+4|0;f[k>>2]=p;P=p;break}}while(0);if((F|0)==69){F=0;p=(f[k>>2]|0)+-4|0;f[k>>2]=p;P=p}Q=f[h>>2]|0;R=P}else{p=r+-4|0;f[k>>2]=p;Q=m;R=p}if((Q|0)==(R|0))break;else{r=R;m=Q}}u=c;return}function _b(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=Oa,K=Oa,L=Oa,M=0,N=0,O=0,P=0;e=u;u=u+64|0;g=e+40|0;i=e+16|0;j=e;k=Id(a,c)|0;if(k|0){f[i>>2]=k;f[g>>2]=f[i>>2];lf(a,g)|0}f[j>>2]=0;k=j+4|0;f[k>>2]=0;f[j+8>>2]=0;Fi(j,8);l=d;d=l;m=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;d=l+4|0;l=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;d=f[j>>2]|0;o=d;b[o>>0]=m;b[o+1>>0]=m>>8;b[o+2>>0]=m>>16;b[o+3>>0]=m>>24;m=d+4|0;b[m>>0]=l;b[m+1>>0]=l>>8;b[m+2>>0]=l>>16;b[m+3>>0]=l>>24;pj(i,c);c=i+12|0;f[c>>2]=0;l=i+16|0;f[l>>2]=0;f[i+20>>2]=0;m=f[k>>2]|0;d=f[j>>2]|0;o=m-d|0;if(!o){p=d;q=m;r=0}else{Fi(c,o);p=f[j>>2]|0;q=f[k>>2]|0;r=f[c>>2]|0}kh(r|0,p|0,q-p|0)|0;p=i+11|0;q=b[p>>0]|0;r=q<<24>>24<0;c=r?f[i>>2]|0:i;o=r?f[i+4>>2]|0:q&255;if(o>>>0>3){q=c;r=o;m=o;while(1){d=X(h[q>>0]|h[q+1>>0]<<8|h[q+2>>0]<<16|h[q+3>>0]<<24,1540483477)|0;r=(X(d>>>24^d,1540483477)|0)^(X(r,1540483477)|0);m=m+-4|0;if(m>>>0<=3)break;else q=q+4|0}q=o+-4|0;m=q&-4;s=q-m|0;t=c+(m+4)|0;v=r}else{s=o;t=c;v=o}switch(s|0){case 3:{w=h[t+2>>0]<<16^v;x=10;break}case 2:{w=v;x=10;break}case 1:{y=v;x=11;break}default:z=v}if((x|0)==10){y=h[t+1>>0]<<8^w;x=11}if((x|0)==11)z=X(y^h[t>>0],1540483477)|0;t=X(z>>>13^z,1540483477)|0;z=t>>>15^t;t=a+4|0;y=f[t>>2]|0;w=(y|0)==0;a:do if(!w){v=y+-1|0;s=(v&y|0)==0;if(!s)if(z>>>0>>0)A=z;else A=(z>>>0)%(y>>>0)|0;else A=z&v;r=f[(f[a>>2]|0)+(A<<2)>>2]|0;if((r|0)!=0?(m=f[r>>2]|0,(m|0)!=0):0){r=(o|0)==0;if(s){if(r){s=m;while(1){q=f[s+4>>2]|0;if(!((q|0)==(z|0)|(q&v|0)==(A|0))){B=A;x=52;break a}q=b[s+8+11>>0]|0;if(!((q<<24>>24<0?f[s+12>>2]|0:q&255)|0))break a;s=f[s>>2]|0;if(!s){B=A;x=52;break a}}}else C=m;while(1){s=f[C+4>>2]|0;if(!((s|0)==(z|0)|(s&v|0)==(A|0))){B=A;x=52;break a}s=C+8|0;q=b[s+11>>0]|0;d=q<<24>>24<0;D=q&255;do if(((d?f[C+12>>2]|0:D)|0)==(o|0)){q=f[s>>2]|0;if(d)if(!(Vk(q,c,o)|0))break a;else break;if((b[c>>0]|0)==(q&255)<<24>>24){q=s;E=D;F=c;do{E=E+-1|0;q=q+1|0;if(!E)break a;F=F+1|0}while((b[q>>0]|0)==(b[F>>0]|0))}}while(0);C=f[C>>2]|0;if(!C){B=A;x=52;break a}}}if(r){v=m;while(1){D=f[v+4>>2]|0;if((D|0)!=(z|0)){if(D>>>0>>0)G=D;else G=(D>>>0)%(y>>>0)|0;if((G|0)!=(A|0)){B=A;x=52;break a}}D=b[v+8+11>>0]|0;if(!((D<<24>>24<0?f[v+12>>2]|0:D&255)|0))break a;v=f[v>>2]|0;if(!v){B=A;x=52;break a}}}else H=m;while(1){v=f[H+4>>2]|0;if((v|0)!=(z|0)){if(v>>>0>>0)I=v;else I=(v>>>0)%(y>>>0)|0;if((I|0)!=(A|0)){B=A;x=52;break a}}v=H+8|0;r=b[v+11>>0]|0;D=r<<24>>24<0;s=r&255;do if(((D?f[H+12>>2]|0:s)|0)==(o|0)){r=f[v>>2]|0;if(D)if(!(Vk(r,c,o)|0))break a;else break;if((b[c>>0]|0)==(r&255)<<24>>24){r=v;d=s;F=c;do{d=d+-1|0;r=r+1|0;if(!d)break a;F=F+1|0}while((b[r>>0]|0)==(b[F>>0]|0))}}while(0);H=f[H>>2]|0;if(!H){B=A;x=52;break}}}else{B=A;x=52}}else{B=0;x=52}while(0);if((x|0)==52){oi(g,a,z,i);x=a+12|0;J=$(((f[x>>2]|0)+1|0)>>>0);K=$(y>>>0);L=$(n[a+16>>2]);do if(w|$(L*K)>>0<3|(y+-1&y|0)!=0)&1;H=~~$(W($(J/L)))>>>0;ei(a,A>>>0>>0?H:A);A=f[t>>2]|0;H=A+-1|0;if(!(H&A)){M=A;N=H&z;break}if(z>>>0>>0){M=A;N=z}else{M=A;N=(z>>>0)%(A>>>0)|0}}else{M=y;N=B}while(0);B=f[(f[a>>2]|0)+(N<<2)>>2]|0;if(!B){y=a+8|0;f[f[g>>2]>>2]=f[y>>2];f[y>>2]=f[g>>2];f[(f[a>>2]|0)+(N<<2)>>2]=y;y=f[g>>2]|0;N=f[y>>2]|0;if(!N)O=g;else{z=f[N+4>>2]|0;N=M+-1|0;if(N&M)if(z>>>0>>0)P=z;else P=(z>>>0)%(M>>>0)|0;else P=z&N;f[(f[a>>2]|0)+(P<<2)>>2]=y;O=g}}else{f[f[g>>2]>>2]=f[B>>2];f[B>>2]=f[g>>2];O=g}f[x>>2]=(f[x>>2]|0)+1;f[O>>2]=0}O=f[i+12>>2]|0;if(O|0){if((f[l>>2]|0)!=(O|0))f[l>>2]=O;Oq(O)}if((b[p>>0]|0)<0)Oq(f[i>>2]|0);i=f[j>>2]|0;if(!i){u=e;return}if((f[k>>2]|0)!=(i|0))f[k>>2]=i;Oq(i);u=e;return}function $b(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0;e=u;u=u+96|0;g=e+92|0;h=e+88|0;i=e+72|0;j=e+48|0;k=e+24|0;l=e;m=a+16|0;n=f[m>>2]|0;o=f[c>>2]|0;f[i>>2]=n;f[i+4>>2]=o;c=i+8|0;f[c>>2]=o;b[i+12>>0]=1;p=(o|0)==-1;if(p)q=-1;else q=f[(f[n>>2]|0)+(o<<2)>>2]|0;n=a+20|0;r=f[n>>2]|0;s=f[r>>2]|0;if((f[r+4>>2]|0)-s>>2>>>0<=q>>>0)aq(r);r=a+8|0;t=f[(f[r>>2]|0)+(f[s+(q<<2)>>2]<<2)>>2]|0;q=a+4|0;s=f[q>>2]|0;if(!(b[s+84>>0]|0))v=f[(f[s+68>>2]|0)+(t<<2)>>2]|0;else v=t;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;f[j+16>>2]=0;f[j+20>>2]=0;f[h>>2]=v;v=b[s+24>>0]|0;f[g>>2]=f[h>>2];vb(s,g,v,j)|0;v=a+28|0;a=(f[v>>2]|0)==0;a:do if(!p){s=k+8|0;t=j+8|0;w=k+16|0;x=j+16|0;y=l+8|0;z=l+16|0;A=o;B=o;C=0;D=0;E=0;F=0;G=0;H=0;J=a;K=o;while(1){do if(J){L=K+1|0;if((K|0)==-1){M=A;N=-1;O=-1;P=-1;break}Q=((L>>>0)%3|0|0)==0?K+-2|0:L;if((A|0)!=-1)if(!((A>>>0)%3|0)){R=A;S=A+2|0;T=Q;U=A;V=19;break}else{R=A;S=A+-1|0;T=Q;U=A;V=19;break}else{R=-1;S=-1;T=Q;U=-1;V=19}}else{Q=B+1|0;L=((Q>>>0)%3|0|0)==0?B+-2|0:Q;if(!((B>>>0)%3|0)){R=A;S=B+2|0;T=L;U=K;V=19;break}else{R=A;S=B+-1|0;T=L;U=K;V=19;break}}while(0);if((V|0)==19){V=0;if((T|0)==-1){M=R;N=-1;O=S;P=U}else{M=R;N=f[(f[f[m>>2]>>2]|0)+(T<<2)>>2]|0;O=S;P=U}}W=f[n>>2]|0;L=f[W>>2]|0;if((f[W+4>>2]|0)-L>>2>>>0<=N>>>0){V=22;break}Q=f[(f[r>>2]|0)+(f[L+(N<<2)>>2]<<2)>>2]|0;L=f[q>>2]|0;if(!(b[L+84>>0]|0))X=f[(f[L+68>>2]|0)+(Q<<2)>>2]|0;else X=Q;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;f[h>>2]=X;Q=b[L+24>>0]|0;f[g>>2]=f[h>>2];vb(L,g,Q,k)|0;if((O|0)==-1)Y=-1;else Y=f[(f[f[m>>2]>>2]|0)+(O<<2)>>2]|0;Z=f[n>>2]|0;Q=f[Z>>2]|0;if((f[Z+4>>2]|0)-Q>>2>>>0<=Y>>>0){V=28;break}L=f[(f[r>>2]|0)+(f[Q+(Y<<2)>>2]<<2)>>2]|0;Q=f[q>>2]|0;if(!(b[Q+84>>0]|0))_=f[(f[Q+68>>2]|0)+(L<<2)>>2]|0;else _=L;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;f[l+12>>2]=0;f[l+16>>2]=0;f[l+20>>2]=0;f[h>>2]=_;L=b[Q+24>>0]|0;f[g>>2]=f[h>>2];vb(Q,g,L,l)|0;L=k;Q=j;$=f[Q>>2]|0;aa=f[Q+4>>2]|0;Q=Xn(f[L>>2]|0,f[L+4>>2]|0,$|0,aa|0)|0;L=I;ba=s;ca=t;da=f[ca>>2]|0;ea=f[ca+4>>2]|0;ca=Xn(f[ba>>2]|0,f[ba+4>>2]|0,da|0,ea|0)|0;ba=I;fa=w;ga=x;ha=f[ga>>2]|0;ia=f[ga+4>>2]|0;ga=Xn(f[fa>>2]|0,f[fa+4>>2]|0,ha|0,ia|0)|0;fa=I;ja=l;ka=Xn(f[ja>>2]|0,f[ja+4>>2]|0,$|0,aa|0)|0;aa=I;$=y;ja=Xn(f[$>>2]|0,f[$+4>>2]|0,da|0,ea|0)|0;ea=I;da=z;$=Xn(f[da>>2]|0,f[da+4>>2]|0,ha|0,ia|0)|0;ia=I;ha=un($|0,ia|0,ca|0,ba|0)|0;da=I;la=un(ja|0,ea|0,ga|0,fa|0)|0;ma=I;na=un(ka|0,aa|0,ga|0,fa|0)|0;fa=I;ga=un($|0,ia|0,Q|0,L|0)|0;ia=I;$=un(ja|0,ea|0,Q|0,L|0)|0;L=I;Q=un(ka|0,aa|0,ca|0,ba|0)|0;ba=I;ca=Xn(C|0,D|0,la|0,ma|0)|0;ma=Vn(ca|0,I|0,ha|0,da|0)|0;da=I;ha=Vn(na|0,fa|0,E|0,F|0)|0;fa=Xn(ha|0,I|0,ga|0,ia|0)|0;ia=I;ga=Xn(G|0,H|0,Q|0,ba|0)|0;ba=Vn(ga|0,I|0,$|0,L|0)|0;L=I;Hh(i);B=f[c>>2]|0;$=(f[v>>2]|0)==0;if((B|0)==-1){oa=$;pa=da;qa=ma;ra=ia;sa=fa;ta=L;ua=ba;break a}else{A=M;C=ma;D=da;E=fa;F=ia;G=ba;H=L;J=$;K=P}}if((V|0)==22)aq(W);else if((V|0)==28)aq(Z)}else{oa=a;pa=0;qa=0;ra=0;sa=0;ta=0;ua=0}while(0);a=(pa|0)>-1|(pa|0)==-1&qa>>>0>4294967295;Z=Xn(0,0,qa|0,pa|0)|0;V=a?pa:I;W=(ra|0)>-1|(ra|0)==-1&sa>>>0>4294967295;P=Xn(0,0,sa|0,ra|0)|0;M=W?ra:I;v=(ta|0)>-1|(ta|0)==-1&ua>>>0>4294967295;c=Xn(0,0,ua|0,ta|0)|0;i=Vn((W?sa:P)|0,M|0,(v?ua:c)|0,(v?ta:I)|0)|0;v=Vn(i|0,I|0,(a?qa:Z)|0,V|0)|0;V=I;if(oa){if((v|0)<=536870912){va=qa;wa=sa;xa=ua;f[d>>2]=va;ya=d+4|0;f[ya>>2]=wa;za=d+8|0;f[za>>2]=xa;u=e;return}oa=Yn(v|0,V|0,29)|0;Z=oa&7;oa=Ik(qa|0,pa|0,Z|0,0)|0;a=Ik(sa|0,ra|0,Z|0,0)|0;i=Ik(ua|0,ta|0,Z|0,0)|0;va=oa;wa=a;xa=i;f[d>>2]=va;ya=d+4|0;f[ya>>2]=wa;za=d+8|0;f[za>>2]=xa;u=e;return}else{if(!((V|0)>0|(V|0)==0&v>>>0>536870912)){va=qa;wa=sa;xa=ua;f[d>>2]=va;ya=d+4|0;f[ya>>2]=wa;za=d+8|0;f[za>>2]=xa;u=e;return}i=Yn(v|0,V|0,29)|0;V=I;v=Ik(qa|0,pa|0,i|0,V|0)|0;pa=Ik(sa|0,ra|0,i|0,V|0)|0;ra=Ik(ua|0,ta|0,i|0,V|0)|0;va=v;wa=pa;xa=ra;f[d>>2]=va;ya=d+4|0;f[ya>>2]=wa;za=d+8|0;f[za>>2]=xa;u=e;return}}function ac(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=Oa,M=Oa,N=Oa,O=0,P=0,Q=0,R=0;e=u;u=u+64|0;g=e+40|0;i=e+16|0;j=e;k=Id(a,c)|0;if(k|0){f[i>>2]=k;f[g>>2]=f[i>>2];lf(a,g)|0}f[j>>2]=0;k=j+4|0;f[k>>2]=0;f[j+8>>2]=0;l=d+11|0;m=b[l>>0]|0;o=d+4|0;p=f[o>>2]|0;q=m<<24>>24<0?p:m&255;if(!q){r=m;s=p;t=0}else{Fi(j,q);r=b[l>>0]|0;s=f[o>>2]|0;t=f[j>>2]|0}o=r<<24>>24<0;kh(t|0,(o?f[d>>2]|0:d)|0,(o?s:r&255)|0)|0;pj(i,c);c=i+12|0;f[c>>2]=0;r=i+16|0;f[r>>2]=0;f[i+20>>2]=0;s=f[k>>2]|0;o=f[j>>2]|0;d=s-o|0;if(!d){v=o;w=s;x=0}else{Fi(c,d);v=f[j>>2]|0;w=f[k>>2]|0;x=f[c>>2]|0}kh(x|0,v|0,w-v|0)|0;v=i+11|0;w=b[v>>0]|0;x=w<<24>>24<0;c=x?f[i>>2]|0:i;d=x?f[i+4>>2]|0:w&255;if(d>>>0>3){w=c;x=d;s=d;while(1){o=X(h[w>>0]|h[w+1>>0]<<8|h[w+2>>0]<<16|h[w+3>>0]<<24,1540483477)|0;x=(X(o>>>24^o,1540483477)|0)^(X(x,1540483477)|0);s=s+-4|0;if(s>>>0<=3)break;else w=w+4|0}w=d+-4|0;s=w&-4;y=w-s|0;z=c+(s+4)|0;A=x}else{y=d;z=c;A=d}switch(y|0){case 3:{B=h[z+2>>0]<<16^A;C=12;break}case 2:{B=A;C=12;break}case 1:{D=A;C=13;break}default:E=A}if((C|0)==12){D=h[z+1>>0]<<8^B;C=13}if((C|0)==13)E=X(D^h[z>>0],1540483477)|0;z=X(E>>>13^E,1540483477)|0;E=z>>>15^z;z=a+4|0;D=f[z>>2]|0;B=(D|0)==0;a:do if(!B){A=D+-1|0;y=(A&D|0)==0;if(!y)if(E>>>0>>0)F=E;else F=(E>>>0)%(D>>>0)|0;else F=E&A;x=f[(f[a>>2]|0)+(F<<2)>>2]|0;if((x|0)!=0?(s=f[x>>2]|0,(s|0)!=0):0){x=(d|0)==0;if(y){if(x){y=s;while(1){w=f[y+4>>2]|0;if(!((w|0)==(E|0)|(w&A|0)==(F|0))){G=F;C=54;break a}w=b[y+8+11>>0]|0;if(!((w<<24>>24<0?f[y+12>>2]|0:w&255)|0))break a;y=f[y>>2]|0;if(!y){G=F;C=54;break a}}}else H=s;while(1){y=f[H+4>>2]|0;if(!((y|0)==(E|0)|(y&A|0)==(F|0))){G=F;C=54;break a}y=H+8|0;w=b[y+11>>0]|0;o=w<<24>>24<0;t=w&255;do if(((o?f[H+12>>2]|0:t)|0)==(d|0)){w=f[y>>2]|0;if(o)if(!(Vk(w,c,d)|0))break a;else break;if((b[c>>0]|0)==(w&255)<<24>>24){w=y;l=t;q=c;do{l=l+-1|0;w=w+1|0;if(!l)break a;q=q+1|0}while((b[w>>0]|0)==(b[q>>0]|0))}}while(0);H=f[H>>2]|0;if(!H){G=F;C=54;break a}}}if(x){A=s;while(1){t=f[A+4>>2]|0;if((t|0)!=(E|0)){if(t>>>0>>0)I=t;else I=(t>>>0)%(D>>>0)|0;if((I|0)!=(F|0)){G=F;C=54;break a}}t=b[A+8+11>>0]|0;if(!((t<<24>>24<0?f[A+12>>2]|0:t&255)|0))break a;A=f[A>>2]|0;if(!A){G=F;C=54;break a}}}else J=s;while(1){A=f[J+4>>2]|0;if((A|0)!=(E|0)){if(A>>>0>>0)K=A;else K=(A>>>0)%(D>>>0)|0;if((K|0)!=(F|0)){G=F;C=54;break a}}A=J+8|0;x=b[A+11>>0]|0;t=x<<24>>24<0;y=x&255;do if(((t?f[J+12>>2]|0:y)|0)==(d|0)){x=f[A>>2]|0;if(t)if(!(Vk(x,c,d)|0))break a;else break;if((b[c>>0]|0)==(x&255)<<24>>24){x=A;o=y;q=c;do{o=o+-1|0;x=x+1|0;if(!o)break a;q=q+1|0}while((b[x>>0]|0)==(b[q>>0]|0))}}while(0);J=f[J>>2]|0;if(!J){G=F;C=54;break}}}else{G=F;C=54}}else{G=0;C=54}while(0);if((C|0)==54){oi(g,a,E,i);C=a+12|0;L=$(((f[C>>2]|0)+1|0)>>>0);M=$(D>>>0);N=$(n[a+16>>2]);do if(B|$(N*M)>>0<3|(D+-1&D|0)!=0)&1;J=~~$(W($(L/N)))>>>0;ei(a,F>>>0>>0?J:F);F=f[z>>2]|0;J=F+-1|0;if(!(J&F)){O=F;P=J&E;break}if(E>>>0>>0){O=F;P=E}else{O=F;P=(E>>>0)%(F>>>0)|0}}else{O=D;P=G}while(0);G=f[(f[a>>2]|0)+(P<<2)>>2]|0;if(!G){D=a+8|0;f[f[g>>2]>>2]=f[D>>2];f[D>>2]=f[g>>2];f[(f[a>>2]|0)+(P<<2)>>2]=D;D=f[g>>2]|0;P=f[D>>2]|0;if(!P)Q=g;else{E=f[P+4>>2]|0;P=O+-1|0;if(P&O)if(E>>>0>>0)R=E;else R=(E>>>0)%(O>>>0)|0;else R=E&P;f[(f[a>>2]|0)+(R<<2)>>2]=D;Q=g}}else{f[f[g>>2]>>2]=f[G>>2];f[G>>2]=f[g>>2];Q=g}f[C>>2]=(f[C>>2]|0)+1;f[Q>>2]=0}Q=f[i+12>>2]|0;if(Q|0){if((f[r>>2]|0)!=(Q|0))f[r>>2]=Q;Oq(Q)}if((b[v>>0]|0)<0)Oq(f[i>>2]|0);i=f[j>>2]|0;if(!i){u=e;return}if((f[k>>2]|0)!=(i|0))f[k>>2]=i;Oq(i);u=e;return}function bc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;d=u;u=u+192|0;e=d+152|0;g=d+144|0;h=d+72|0;i=d;j=d+112|0;k=d+108|0;l=d+104|0;m=a+352|0;if(b[m>>0]|0?(n=Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0,((f[n+12>>2]|0)-(f[n+8>>2]|0)|0)>0):0){n=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+8|0;o=f[f[n>>2]>>2]|0;f[e>>2]=c;n=o+4|0;p=o+8|0;q=f[p>>2]|0;if((q|0)==(f[o+12>>2]|0))Ri(n,e);else{f[q>>2]=c;f[p>>2]=q+4}q=f[e>>2]|0;r=o+16|0;s=o+20|0;o=f[s>>2]|0;t=f[r>>2]|0;v=o-t>>2;w=t;if((q|0)<(v|0)){x=w;y=q}else{t=q+1|0;f[g>>2]=-1;z=o;if(t>>>0<=v>>>0)if(t>>>0>>0?(o=w+(t<<2)|0,(o|0)!=(z|0)):0){f[s>>2]=z+(~((z+-4-o|0)>>>2)<<2);A=q;B=w}else{A=q;B=w}else{Ch(r,t-v|0,g);A=f[e>>2]|0;B=f[r>>2]|0}x=B;y=A}f[x+(y<<2)>>2]=((f[p>>2]|0)-(f[n>>2]|0)>>2)+-1;C=1;u=d;return C|0}n=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+52|0;p=f[(f[(f[n>>2]|0)+84>>2]|0)+(c<<2)>>2]|0;n=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+4|0;y=f[(f[(f[n>>2]|0)+8>>2]|0)+(c<<2)>>2]|0;f[g>>2]=-1;n=a+172|0;x=f[a+176>>2]|0;A=f[n>>2]|0;B=A;a:do if((x|0)==(A|0))D=-1;else{r=(x-A|0)/136|0;v=0;while(1){if((f[B+(v*136|0)>>2]|0)==(c|0))break;t=v+1|0;if(t>>>0>>0)v=t;else{D=-1;break a}}f[g>>2]=v;D=v}while(0);b:do if(!(b[m>>0]|0)){A=(f[y+56>>2]|0)==0;do if(!((p|0)==0|A)){if((p|0)==1?b[B+(D*136|0)+28>>0]|0:0)break;x=ln(88)|0;r=f[a+8>>2]|0;t=B+(D*136|0)+104|0;f[x+4>>2]=0;f[x>>2]=3564;w=x+12|0;f[w>>2]=3588;q=x+64|0;f[q>>2]=0;f[x+68>>2]=0;f[x+72>>2]=0;o=x+16|0;z=o+44|0;do{f[o>>2]=0;o=o+4|0}while((o|0)<(z|0));f[x+76>>2]=r;f[x+80>>2]=t;s=x+84|0;f[s>>2]=0;f[h>>2]=3588;E=h+4|0;F=E+4|0;f[F>>2]=0;f[F+4>>2]=0;f[F+8>>2]=0;f[F+12>>2]=0;f[F+16>>2]=0;f[F+20>>2]=0;F=B+(D*136|0)+4|0;G=i+4|0;f[G>>2]=3588;H=i+56|0;f[H>>2]=0;I=i+60|0;f[I>>2]=0;f[i+64>>2]=0;o=i+8|0;z=o+44|0;do{f[o>>2]=0;o=o+4|0}while((o|0)<(z|0));f[E>>2]=F;o=f[B+(D*136|0)+68>>2]|0;z=((f[o+4>>2]|0)-(f[o>>2]|0)>>2>>>0)/3|0;b[e>>0]=0;qh(h+8|0,z,e);Va[f[(f[h>>2]|0)+8>>2]&127](h);Df(j,h);Df(e,j);f[i>>2]=f[e+4>>2];z=i+4|0;fg(z,e)|0;f[e>>2]=3588;o=f[e+20>>2]|0;if(o|0)Oq(o);o=f[e+8>>2]|0;if(o|0)Oq(o);f[i+36>>2]=F;f[i+40>>2]=t;f[i+44>>2]=r;f[i+48>>2]=x;f[j>>2]=3588;o=f[j+20>>2]|0;if(o|0)Oq(o);o=f[j+8>>2]|0;if(o|0)Oq(o);f[s>>2]=a+72;f[x+8>>2]=f[i>>2];fg(w,z)|0;z=x+44|0;o=i+36|0;f[z>>2]=f[o>>2];f[z+4>>2]=f[o+4>>2];f[z+8>>2]=f[o+8>>2];f[z+12>>2]=f[o+12>>2];b[z+16>>0]=b[o+16>>0]|0;ng(q,f[H>>2]|0,f[I>>2]|0);o=x;z=f[H>>2]|0;if(z|0){J=f[I>>2]|0;if((J|0)!=(z|0))f[I>>2]=J+(~((J+-4-z|0)>>>2)<<2);Oq(z)}f[G>>2]=3588;z=f[i+24>>2]|0;if(z|0)Oq(z);z=f[i+12>>2]|0;if(z|0)Oq(z);f[h>>2]=3588;z=f[h+20>>2]|0;if(z|0)Oq(z);z=f[h+8>>2]|0;if(z|0)Oq(z);K=0;L=o;M=54;break b}while(0);if(!A){b[B+(D*136|0)+100>>0]=0;N=B+(D*136|0)+104|0;M=26}else M=24}else M=24;while(0);if((M|0)==24){N=a+40|0;M=26}if((M|0)==26){D=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+48|0;do if((mi(f[D>>2]|0)|0)==0?(f[y+56>>2]|0)==0:0){if(b[m>>0]|0?(B=f[a+8>>2]|0,((f[B+12>>2]|0)-(f[B+8>>2]|0)|0)>4):0){M=31;break}gf(e,a,N);O=1;P=f[e>>2]|0}else M=31;while(0);if((M|0)==31){Vd(e,a,N);O=0;P=f[e>>2]|0}if(!P)Q=0;else{K=O;L=P;M=54}}if((M|0)==54){M=f[g>>2]|0;if((M|0)==-1)R=a+68|0;else R=(f[n>>2]|0)+(M*136|0)+132|0;f[R>>2]=K;K=ln(76)|0;f[k>>2]=L;rl(K,k,c);c=K;K=f[k>>2]|0;f[k>>2]=0;if(K|0)Va[f[(f[K>>2]|0)+4>>2]&127](K);K=a+188|0;k=f[K>>2]|0;if((k|0)==(f[a+192>>2]|0))Ri(a+184|0,g);else{f[k>>2]=f[g>>2];f[K>>2]=k+4}k=Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0;f[l>>2]=c;a=k+12|0;K=f[a>>2]|0;if(K>>>0<(f[k+16>>2]|0)>>>0){f[l>>2]=0;f[K>>2]=c;f[a>>2]=K+4;S=l}else{Qg(k+8|0,l);S=l}l=f[S>>2]|0;f[S>>2]=0;if(!l)Q=1;else{Va[f[(f[l>>2]|0)+4>>2]&127](l);Q=1}}C=Q;u=d;return C|0}function cc(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;d=u;u=u+192|0;e=d+152|0;g=d+144|0;h=d+72|0;i=d;j=d+112|0;k=d+108|0;l=d+104|0;m=a+288|0;if(b[m>>0]|0?(n=Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0,((f[n+12>>2]|0)-(f[n+8>>2]|0)|0)>0):0){n=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+8|0;o=f[f[n>>2]>>2]|0;f[e>>2]=c;n=o+4|0;p=o+8|0;q=f[p>>2]|0;if((q|0)==(f[o+12>>2]|0))Ri(n,e);else{f[q>>2]=c;f[p>>2]=q+4}q=f[e>>2]|0;r=o+16|0;s=o+20|0;o=f[s>>2]|0;t=f[r>>2]|0;v=o-t>>2;w=t;if((q|0)<(v|0)){x=w;y=q}else{t=q+1|0;f[g>>2]=-1;z=o;if(t>>>0<=v>>>0)if(t>>>0>>0?(o=w+(t<<2)|0,(o|0)!=(z|0)):0){f[s>>2]=z+(~((z+-4-o|0)>>>2)<<2);A=q;B=w}else{A=q;B=w}else{Ch(r,t-v|0,g);A=f[e>>2]|0;B=f[r>>2]|0}x=B;y=A}f[x+(y<<2)>>2]=((f[p>>2]|0)-(f[n>>2]|0)>>2)+-1;C=1;u=d;return C|0}n=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+52|0;p=f[(f[(f[n>>2]|0)+84>>2]|0)+(c<<2)>>2]|0;n=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+4|0;y=f[(f[(f[n>>2]|0)+8>>2]|0)+(c<<2)>>2]|0;f[g>>2]=-1;n=a+172|0;x=f[a+176>>2]|0;A=f[n>>2]|0;B=A;a:do if((x|0)==(A|0))D=-1;else{r=(x-A|0)/136|0;v=0;while(1){if((f[B+(v*136|0)>>2]|0)==(c|0))break;t=v+1|0;if(t>>>0>>0)v=t;else{D=-1;break a}}f[g>>2]=v;D=v}while(0);b:do if(!(b[m>>0]|0)){A=(f[y+56>>2]|0)==0;do if(!((p|0)==0|A)){if((p|0)==1?b[B+(D*136|0)+28>>0]|0:0)break;x=ln(88)|0;r=f[a+8>>2]|0;t=B+(D*136|0)+104|0;f[x+4>>2]=0;f[x>>2]=3564;w=x+12|0;f[w>>2]=3588;q=x+64|0;f[q>>2]=0;f[x+68>>2]=0;f[x+72>>2]=0;o=x+16|0;z=o+44|0;do{f[o>>2]=0;o=o+4|0}while((o|0)<(z|0));f[x+76>>2]=r;f[x+80>>2]=t;s=x+84|0;f[s>>2]=0;f[h>>2]=3588;E=h+4|0;F=E+4|0;f[F>>2]=0;f[F+4>>2]=0;f[F+8>>2]=0;f[F+12>>2]=0;f[F+16>>2]=0;f[F+20>>2]=0;F=B+(D*136|0)+4|0;G=i+4|0;f[G>>2]=3588;H=i+56|0;f[H>>2]=0;I=i+60|0;f[I>>2]=0;f[i+64>>2]=0;o=i+8|0;z=o+44|0;do{f[o>>2]=0;o=o+4|0}while((o|0)<(z|0));f[E>>2]=F;o=f[B+(D*136|0)+68>>2]|0;z=((f[o+4>>2]|0)-(f[o>>2]|0)>>2>>>0)/3|0;b[e>>0]=0;qh(h+8|0,z,e);Va[f[(f[h>>2]|0)+8>>2]&127](h);Df(j,h);Df(e,j);f[i>>2]=f[e+4>>2];z=i+4|0;fg(z,e)|0;f[e>>2]=3588;o=f[e+20>>2]|0;if(o|0)Oq(o);o=f[e+8>>2]|0;if(o|0)Oq(o);f[i+36>>2]=F;f[i+40>>2]=t;f[i+44>>2]=r;f[i+48>>2]=x;f[j>>2]=3588;o=f[j+20>>2]|0;if(o|0)Oq(o);o=f[j+8>>2]|0;if(o|0)Oq(o);f[s>>2]=a+72;f[x+8>>2]=f[i>>2];fg(w,z)|0;z=x+44|0;o=i+36|0;f[z>>2]=f[o>>2];f[z+4>>2]=f[o+4>>2];f[z+8>>2]=f[o+8>>2];f[z+12>>2]=f[o+12>>2];b[z+16>>0]=b[o+16>>0]|0;ng(q,f[H>>2]|0,f[I>>2]|0);o=x;z=f[H>>2]|0;if(z|0){J=f[I>>2]|0;if((J|0)!=(z|0))f[I>>2]=J+(~((J+-4-z|0)>>>2)<<2);Oq(z)}f[G>>2]=3588;z=f[i+24>>2]|0;if(z|0)Oq(z);z=f[i+12>>2]|0;if(z|0)Oq(z);f[h>>2]=3588;z=f[h+20>>2]|0;if(z|0)Oq(z);z=f[h+8>>2]|0;if(z|0)Oq(z);K=0;L=o;M=54;break b}while(0);if(!A){b[B+(D*136|0)+100>>0]=0;N=B+(D*136|0)+104|0;M=26}else M=24}else M=24;while(0);if((M|0)==24){N=a+40|0;M=26}if((M|0)==26){D=(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)+48|0;do if((mi(f[D>>2]|0)|0)==0?(f[y+56>>2]|0)==0:0){if(b[m>>0]|0?(B=f[a+8>>2]|0,((f[B+12>>2]|0)-(f[B+8>>2]|0)|0)>4):0){M=31;break}gf(e,a,N);O=1;P=f[e>>2]|0}else M=31;while(0);if((M|0)==31){Vd(e,a,N);O=0;P=f[e>>2]|0}if(!P)Q=0;else{K=O;L=P;M=54}}if((M|0)==54){M=f[g>>2]|0;if((M|0)==-1)R=a+68|0;else R=(f[n>>2]|0)+(M*136|0)+132|0;f[R>>2]=K;K=ln(76)|0;f[k>>2]=L;rl(K,k,c);c=K;K=f[k>>2]|0;f[k>>2]=0;if(K|0)Va[f[(f[K>>2]|0)+4>>2]&127](K);K=a+188|0;k=f[K>>2]|0;if((k|0)==(f[a+192>>2]|0))Ri(a+184|0,g);else{f[k>>2]=f[g>>2];f[K>>2]=k+4}k=Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0;f[l>>2]=c;a=k+12|0;K=f[a>>2]|0;if(K>>>0<(f[k+16>>2]|0)>>>0){f[l>>2]=0;f[K>>2]=c;f[a>>2]=K+4;S=l}else{Qg(k+8|0,l);S=l}l=f[S>>2]|0;f[S>>2]=0;if(!l)Q=1;else{Va[f[(f[l>>2]|0)+4>>2]&127](l);Q=1}}C=Q;u=d;return C|0}function dc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;c=u;u=u+16|0;d=c+8|0;e=c;g=f[b>>2]|0;if((g|0)==-1){u=c;return}h=(g>>>0)/3|0;i=a+12|0;if(f[(f[i>>2]|0)+(h>>>5<<2)>>2]&1<<(h&31)|0){u=c;return}h=a+56|0;j=f[h>>2]|0;k=a+60|0;l=f[k>>2]|0;if((l|0)==(j|0))m=j;else{n=l+(~((l+-4-j|0)>>>2)<<2)|0;f[k>>2]=n;m=n}n=a+64|0;if((m|0)==(f[n>>2]|0))Ri(h,b);else{f[m>>2]=g;f[k>>2]=m+4}m=f[a>>2]|0;g=f[b>>2]|0;j=g+1|0;if((g|0)!=-1){l=((j>>>0)%3|0|0)==0?g+-2|0:j;if((l|0)==-1)o=-1;else o=f[(f[m>>2]|0)+(l<<2)>>2]|0;l=(((g>>>0)%3|0|0)==0?2:-1)+g|0;if((l|0)==-1){p=o;q=-1}else{p=o;q=f[(f[m>>2]|0)+(l<<2)>>2]|0}}else{p=-1;q=-1}l=a+24|0;m=f[l>>2]|0;o=m+(p>>>5<<2)|0;g=1<<(p&31);j=f[o>>2]|0;if(!(j&g)){f[o>>2]=j|g;g=f[b>>2]|0;j=g+1|0;if((g|0)==-1)r=-1;else r=((j>>>0)%3|0|0)==0?g+-2|0:j;f[e>>2]=r;j=f[(f[(f[a+44>>2]|0)+96>>2]|0)+(((r>>>0)/3|0)*12|0)+(((r>>>0)%3|0)<<2)>>2]|0;r=f[a+48>>2]|0;f[d>>2]=j;g=f[r+4>>2]|0;r=g+4|0;o=f[r>>2]|0;if((o|0)==(f[g+8>>2]|0))Ri(g,d);else{f[o>>2]=j;f[r>>2]=o+4}o=a+40|0;r=f[o>>2]|0;j=r+4|0;g=f[j>>2]|0;if((g|0)==(f[r+8>>2]|0)){Ri(r,e);s=f[o>>2]|0}else{f[g>>2]=f[e>>2];f[j>>2]=g+4;s=r}r=s+24|0;f[(f[s+12>>2]|0)+(p<<2)>>2]=f[r>>2];f[r>>2]=(f[r>>2]|0)+1;t=f[l>>2]|0}else t=m;m=t+(q>>>5<<2)|0;t=1<<(q&31);r=f[m>>2]|0;if(!(r&t)){f[m>>2]=r|t;t=f[b>>2]|0;do if((t|0)!=-1)if(!((t>>>0)%3|0)){v=t+2|0;break}else{v=t+-1|0;break}else v=-1;while(0);f[e>>2]=v;t=f[(f[(f[a+44>>2]|0)+96>>2]|0)+(((v>>>0)/3|0)*12|0)+(((v>>>0)%3|0)<<2)>>2]|0;v=f[a+48>>2]|0;f[d>>2]=t;r=f[v+4>>2]|0;v=r+4|0;m=f[v>>2]|0;if((m|0)==(f[r+8>>2]|0))Ri(r,d);else{f[m>>2]=t;f[v>>2]=m+4}m=a+40|0;v=f[m>>2]|0;t=v+4|0;r=f[t>>2]|0;if((r|0)==(f[v+8>>2]|0)){Ri(v,e);w=f[m>>2]|0}else{f[r>>2]=f[e>>2];f[t>>2]=r+4;w=v}v=w+24|0;f[(f[w+12>>2]|0)+(q<<2)>>2]=f[v>>2];f[v>>2]=(f[v>>2]|0)+1}v=f[h>>2]|0;q=f[k>>2]|0;if((v|0)==(q|0)){u=c;return}w=a+44|0;r=a+48|0;t=a+40|0;m=q;q=v;while(1){v=f[m+-4>>2]|0;f[b>>2]=v;p=(v>>>0)/3|0;if((v|0)!=-1?(v=f[i>>2]|0,(f[v+(p>>>5<<2)>>2]&1<<(p&31)|0)==0):0){s=p;p=v;a:while(1){v=p+(s>>>5<<2)|0;f[v>>2]=f[v>>2]|1<<(s&31);v=f[b>>2]|0;if((v|0)==-1)x=-1;else x=f[(f[f[a>>2]>>2]|0)+(v<<2)>>2]|0;g=(f[l>>2]|0)+(x>>>5<<2)|0;j=1<<(x&31);o=f[g>>2]|0;do if(!(j&o)){y=f[a>>2]|0;z=f[(f[y+24>>2]|0)+(x<<2)>>2]|0;A=z+1|0;if(((z|0)!=-1?(B=((A>>>0)%3|0|0)==0?z+-2|0:A,(B|0)!=-1):0)?(A=f[(f[y+12>>2]|0)+(B<<2)>>2]|0,B=A+1|0,(A|0)!=-1):0)C=((((B>>>0)%3|0|0)==0?A+-2|0:B)|0)==-1;else C=1;f[g>>2]=o|j;B=f[b>>2]|0;f[e>>2]=B;A=f[(f[(f[w>>2]|0)+96>>2]|0)+(((B>>>0)/3|0)*12|0)+(((B>>>0)%3|0)<<2)>>2]|0;B=f[r>>2]|0;f[d>>2]=A;y=f[B+4>>2]|0;B=y+4|0;z=f[B>>2]|0;if((z|0)==(f[y+8>>2]|0))Ri(y,d);else{f[z>>2]=A;f[B>>2]=z+4}z=f[t>>2]|0;B=z+4|0;A=f[B>>2]|0;if((A|0)==(f[z+8>>2]|0)){Ri(z,e);D=f[t>>2]|0}else{f[A>>2]=f[e>>2];f[B>>2]=A+4;D=z}z=D+24|0;f[(f[D+12>>2]|0)+(x<<2)>>2]=f[z>>2];f[z>>2]=(f[z>>2]|0)+1;if(C){E=f[b>>2]|0;F=60;break}z=f[a>>2]|0;A=f[b>>2]|0;do if((A|0)==-1)G=-1;else{B=A+1|0;y=((B>>>0)%3|0|0)==0?A+-2|0:B;if((y|0)==-1){G=-1;break}G=f[(f[z+12>>2]|0)+(y<<2)>>2]|0}while(0);f[b>>2]=G;H=(G>>>0)/3|0}else{E=v;F=60}while(0);if((F|0)==60){F=0;v=f[a>>2]|0;if((E|0)==-1){F=61;break}j=E+1|0;o=((j>>>0)%3|0|0)==0?E+-2|0:j;if((o|0)==-1)I=-1;else I=f[(f[v+12>>2]|0)+(o<<2)>>2]|0;f[d>>2]=I;o=(((E>>>0)%3|0|0)==0?2:-1)+E|0;if((o|0)==-1)J=-1;else J=f[(f[v+12>>2]|0)+(o<<2)>>2]|0;o=(I|0)==-1;v=(I>>>0)/3|0;j=o?-1:v;g=(J|0)==-1;z=(J>>>0)/3|0;A=g?-1:z;do if(!o){y=f[i>>2]|0;if(f[y+(j>>>5<<2)>>2]&1<<(j&31)|0){F=68;break}if(g){K=I;L=v;break}if(!(f[y+(A>>>5<<2)>>2]&1<<(A&31))){F=73;break a}else{K=I;L=v}}else F=68;while(0);if((F|0)==68){F=0;if(g){F=70;break}if(!(f[(f[i>>2]|0)+(A>>>5<<2)>>2]&1<<(A&31))){K=J;L=z}else{F=70;break}}f[b>>2]=K;H=L}s=H;p=f[i>>2]|0}do if((F|0)==61){F=0;f[d>>2]=-1;F=70}else if((F|0)==73){F=0;p=f[k>>2]|0;f[p+-4>>2]=J;if((p|0)==(f[n>>2]|0)){Ri(h,d);M=f[k>>2]|0;break}else{f[p>>2]=f[d>>2];s=p+4|0;f[k>>2]=s;M=s;break}}while(0);if((F|0)==70){F=0;s=(f[k>>2]|0)+-4|0;f[k>>2]=s;M=s}N=f[h>>2]|0;O=M}else{s=m+-4|0;f[k>>2]=s;N=q;O=s}if((N|0)==(O|0))break;else{m=O;q=N}}u=c;return}function ec(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=Oa,fa=Oa,ga=Oa,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0;g=u;u=u+48|0;i=g+12|0;j=g+32|0;k=g;l=i+16|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[l>>2]=$(1.0);m=a+80|0;o=f[m>>2]|0;f[k>>2]=0;p=k+4|0;f[p>>2]=0;f[k+8>>2]=0;if(o){if(o>>>0>1073741823)aq(k);q=o<<2;r=ln(q)|0;f[k>>2]=r;s=r+(o<<2)|0;f[k+8>>2]=s;sj(r|0,0,q|0)|0;f[p>>2]=s;s=c+48|0;q=c+40|0;o=i+4|0;t=i+12|0;v=i+8|0;w=a+40|0;x=a+64|0;y=f[e>>2]|0;e=0;z=r;A=0;B=0;C=r;D=r;E=r;while(1){r=s;F=f[r>>2]|0;G=f[r+4>>2]|0;r=q;H=un(f[r>>2]|0,f[r+4>>2]|0,y+A|0,0)|0;r=Vn(H|0,I|0,F|0,G|0)|0;G=(f[f[c>>2]>>2]|0)+r|0;r=h[G>>0]|h[G+1>>0]<<8;d[j>>1]=r;G=(r^318)&65535;a:do if(e){F=e+-1|0;H=(F&e|0)==0;if(!H)if(e>>>0>G>>>0)J=G;else J=(G>>>0)%(e>>>0)|0;else J=F&G;K=f[i>>2]|0;L=f[K+(J<<2)>>2]|0;b:do if(L|0?(M=f[L>>2]|0,M|0):0){c:do if(H){N=M;while(1){O=f[N+4>>2]|0;P=(O|0)==(G|0);if(!(P|(O&F|0)==(J|0)))break b;if(P?(d[N+8>>1]|0)==r<<16>>16:0){Q=N;break c}N=f[N>>2]|0;if(!N)break b}}else{N=M;while(1){P=f[N+4>>2]|0;if((P|0)==(G|0)){if((d[N+8>>1]|0)==r<<16>>16){Q=N;break c}}else{if(P>>>0>>0)R=P;else R=(P>>>0)%(e>>>0)|0;if((R|0)!=(J|0))break b}N=f[N>>2]|0;if(!N)break b}}while(0);f[E+(A<<2)>>2]=f[Q+12>>2];S=z;T=B;U=D;V=C;X=E;break a}while(0);if(!H)if(e>>>0>G>>>0)Y=G;else Y=(G>>>0)%(e>>>0)|0;else Y=F&G;L=f[K+(Y<<2)>>2]|0;if(!L){Z=Y;_=e;aa=0;ba=40}else{if(H){M=L;while(1){M=f[M>>2]|0;if(!M){Z=Y;_=e;aa=0;ba=40;break a}N=f[M+4>>2]|0;if(!((N|0)==(G|0)|(N&F|0)==(Y|0))){Z=Y;_=e;aa=0;ba=40;break a}if((d[M+8>>1]|0)==r<<16>>16){ba=55;break a}}}else ca=L;while(1){ca=f[ca>>2]|0;if(!ca){Z=Y;_=e;aa=0;ba=40;break a}M=f[ca+4>>2]|0;if((M|0)!=(G|0)){if(M>>>0>>0)da=M;else da=(M>>>0)%(e>>>0)|0;if((da|0)!=(Y|0)){Z=Y;_=e;aa=0;ba=40;break a}}if((d[ca+8>>1]|0)==r<<16>>16){ba=55;break}}}}else{Z=0;_=0;aa=1;ba=40}while(0);if((ba|0)==40){ba=0;L=ln(16)|0;d[L+8>>1]=r;f[L+12>>2]=B;f[L+4>>2]=G;f[L>>2]=0;ea=$(((f[t>>2]|0)+1|0)>>>0);fa=$(_>>>0);ga=$(n[l>>2]);do if(aa|$(ga*fa)>>0<3|(_+-1&_|0)!=0)&1;F=~~$(W($(ea/ga)))>>>0;Vh(i,M>>>0>>0?F:M);M=f[o>>2]|0;F=M+-1|0;if(!(F&M)){ha=M;ia=F&G;break}if(M>>>0>G>>>0){ha=M;ia=G}else{ha=M;ia=(G>>>0)%(M>>>0)|0}}else{ha=_;ia=Z}while(0);G=(f[i>>2]|0)+(ia<<2)|0;r=f[G>>2]|0;if(!r){f[L>>2]=f[v>>2];f[v>>2]=L;f[G>>2]=v;G=f[L>>2]|0;if(G|0){M=f[G+4>>2]|0;G=ha+-1|0;if(G&ha)if(M>>>0>>0)ja=M;else ja=(M>>>0)%(ha>>>0)|0;else ja=M&G;ka=(f[i>>2]|0)+(ja<<2)|0;ba=53}}else{f[L>>2]=f[r>>2];ka=r;ba=53}if((ba|0)==53){ba=0;f[ka>>2]=L}f[t>>2]=(f[t>>2]|0)+1;ba=55}if((ba|0)==55){ba=0;r=w;G=f[r>>2]|0;M=un(G|0,f[r+4>>2]|0,B|0,0)|0;kh((f[f[x>>2]>>2]|0)+M|0,j|0,G|0)|0;G=f[k>>2]|0;f[G+(A<<2)>>2]=B;S=G;T=B+1|0;U=G;V=G;X=G}G=A+1|0;la=f[m>>2]|0;if(G>>>0>=la>>>0)break;e=f[o>>2]|0;z=S;A=G;B=T;C=V;D=U;E=X}if((T|0)==(la|0))ma=V;else{V=a+84|0;if(!(b[V>>0]|0)){X=f[a+72>>2]|0;E=f[a+68>>2]|0;D=E;if((X|0)==(E|0))na=S;else{C=X-E>>2;E=0;do{X=D+(E<<2)|0;f[X>>2]=f[U+(f[X>>2]<<2)>>2];E=E+1|0}while(E>>>0>>0);na=S}}else{b[V>>0]=0;V=a+68|0;S=a+72|0;C=f[S>>2]|0;E=f[V>>2]|0;U=C-E>>2;D=E;E=C;if(la>>>0<=U>>>0)if(la>>>0>>0?(C=D+(la<<2)|0,(C|0)!=(E|0)):0){f[S>>2]=E+(~((E+-4-C|0)>>>2)<<2);oa=la}else oa=la;else{Ch(V,la-U|0,1220);oa=f[m>>2]|0}U=f[k>>2]|0;if(!oa)na=U;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[U+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);na=U}}f[m>>2]=T;ma=na}if(!ma)pa=T;else{na=f[p>>2]|0;if((na|0)!=(ma|0))f[p>>2]=na+(~((na+-4-ma|0)>>>2)<<2);Oq(ma);pa=T}}else pa=0;T=f[i+8>>2]|0;if(T|0){ma=T;do{T=ma;ma=f[ma>>2]|0;Oq(T)}while((ma|0)!=0)}ma=f[i>>2]|0;f[i>>2]=0;if(!ma){u=g;return pa|0}Oq(ma);u=g;return pa|0}function fc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=Oa,K=Oa,L=Oa,M=0,N=0,O=0,P=0;e=u;u=u+64|0;g=e+40|0;i=e+16|0;j=e;k=Id(a,c)|0;if(k|0){f[i>>2]=k;f[g>>2]=f[i>>2];lf(a,g)|0}f[j>>2]=0;k=j+4|0;f[k>>2]=0;f[j+8>>2]=0;Fi(j,4);l=f[j>>2]|0;m=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;b[l>>0]=m;b[l+1>>0]=m>>8;b[l+2>>0]=m>>16;b[l+3>>0]=m>>24;pj(i,c);c=i+12|0;f[c>>2]=0;m=i+16|0;f[m>>2]=0;f[i+20>>2]=0;l=f[k>>2]|0;d=f[j>>2]|0;o=l-d|0;if(!o){p=d;q=l;r=0}else{Fi(c,o);p=f[j>>2]|0;q=f[k>>2]|0;r=f[c>>2]|0}kh(r|0,p|0,q-p|0)|0;p=i+11|0;q=b[p>>0]|0;r=q<<24>>24<0;c=r?f[i>>2]|0:i;o=r?f[i+4>>2]|0:q&255;if(o>>>0>3){q=c;r=o;l=o;while(1){d=X(h[q>>0]|h[q+1>>0]<<8|h[q+2>>0]<<16|h[q+3>>0]<<24,1540483477)|0;r=(X(d>>>24^d,1540483477)|0)^(X(r,1540483477)|0);l=l+-4|0;if(l>>>0<=3)break;else q=q+4|0}q=o+-4|0;l=q&-4;s=q-l|0;t=c+(l+4)|0;v=r}else{s=o;t=c;v=o}switch(s|0){case 3:{w=h[t+2>>0]<<16^v;x=10;break}case 2:{w=v;x=10;break}case 1:{y=v;x=11;break}default:z=v}if((x|0)==10){y=h[t+1>>0]<<8^w;x=11}if((x|0)==11)z=X(y^h[t>>0],1540483477)|0;t=X(z>>>13^z,1540483477)|0;z=t>>>15^t;t=a+4|0;y=f[t>>2]|0;w=(y|0)==0;a:do if(!w){v=y+-1|0;s=(v&y|0)==0;if(!s)if(z>>>0>>0)A=z;else A=(z>>>0)%(y>>>0)|0;else A=z&v;r=f[(f[a>>2]|0)+(A<<2)>>2]|0;if((r|0)!=0?(l=f[r>>2]|0,(l|0)!=0):0){r=(o|0)==0;if(s){if(r){s=l;while(1){q=f[s+4>>2]|0;if(!((q|0)==(z|0)|(q&v|0)==(A|0))){B=A;x=52;break a}q=b[s+8+11>>0]|0;if(!((q<<24>>24<0?f[s+12>>2]|0:q&255)|0))break a;s=f[s>>2]|0;if(!s){B=A;x=52;break a}}}else C=l;while(1){s=f[C+4>>2]|0;if(!((s|0)==(z|0)|(s&v|0)==(A|0))){B=A;x=52;break a}s=C+8|0;q=b[s+11>>0]|0;d=q<<24>>24<0;D=q&255;do if(((d?f[C+12>>2]|0:D)|0)==(o|0)){q=f[s>>2]|0;if(d)if(!(Vk(q,c,o)|0))break a;else break;if((b[c>>0]|0)==(q&255)<<24>>24){q=s;E=D;F=c;do{E=E+-1|0;q=q+1|0;if(!E)break a;F=F+1|0}while((b[q>>0]|0)==(b[F>>0]|0))}}while(0);C=f[C>>2]|0;if(!C){B=A;x=52;break a}}}if(r){v=l;while(1){D=f[v+4>>2]|0;if((D|0)!=(z|0)){if(D>>>0>>0)G=D;else G=(D>>>0)%(y>>>0)|0;if((G|0)!=(A|0)){B=A;x=52;break a}}D=b[v+8+11>>0]|0;if(!((D<<24>>24<0?f[v+12>>2]|0:D&255)|0))break a;v=f[v>>2]|0;if(!v){B=A;x=52;break a}}}else H=l;while(1){v=f[H+4>>2]|0;if((v|0)!=(z|0)){if(v>>>0>>0)I=v;else I=(v>>>0)%(y>>>0)|0;if((I|0)!=(A|0)){B=A;x=52;break a}}v=H+8|0;r=b[v+11>>0]|0;D=r<<24>>24<0;s=r&255;do if(((D?f[H+12>>2]|0:s)|0)==(o|0)){r=f[v>>2]|0;if(D)if(!(Vk(r,c,o)|0))break a;else break;if((b[c>>0]|0)==(r&255)<<24>>24){r=v;d=s;F=c;do{d=d+-1|0;r=r+1|0;if(!d)break a;F=F+1|0}while((b[r>>0]|0)==(b[F>>0]|0))}}while(0);H=f[H>>2]|0;if(!H){B=A;x=52;break}}}else{B=A;x=52}}else{B=0;x=52}while(0);if((x|0)==52){oi(g,a,z,i);x=a+12|0;J=$(((f[x>>2]|0)+1|0)>>>0);K=$(y>>>0);L=$(n[a+16>>2]);do if(w|$(L*K)>>0<3|(y+-1&y|0)!=0)&1;H=~~$(W($(J/L)))>>>0;ei(a,A>>>0>>0?H:A);A=f[t>>2]|0;H=A+-1|0;if(!(H&A)){M=A;N=H&z;break}if(z>>>0>>0){M=A;N=z}else{M=A;N=(z>>>0)%(A>>>0)|0}}else{M=y;N=B}while(0);B=f[(f[a>>2]|0)+(N<<2)>>2]|0;if(!B){y=a+8|0;f[f[g>>2]>>2]=f[y>>2];f[y>>2]=f[g>>2];f[(f[a>>2]|0)+(N<<2)>>2]=y;y=f[g>>2]|0;N=f[y>>2]|0;if(!N)O=g;else{z=f[N+4>>2]|0;N=M+-1|0;if(N&M)if(z>>>0>>0)P=z;else P=(z>>>0)%(M>>>0)|0;else P=z&N;f[(f[a>>2]|0)+(P<<2)>>2]=y;O=g}}else{f[f[g>>2]>>2]=f[B>>2];f[B>>2]=f[g>>2];O=g}f[x>>2]=(f[x>>2]|0)+1;f[O>>2]=0}O=f[i+12>>2]|0;if(O|0){if((f[m>>2]|0)!=(O|0))f[m>>2]=O;Oq(O)}if((b[p>>0]|0)<0)Oq(f[i>>2]|0);i=f[j>>2]|0;if(!i){u=e;return}if((f[k>>2]|0)!=(i|0))f[k>>2]=i;Oq(i);u=e;return}function gc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=Oa,da=Oa,ea=Oa,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0;e=u;u=u+48|0;g=e+12|0;h=e+32|0;i=e;j=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[j>>2]=$(1.0);k=a+80|0;l=f[k>>2]|0;f[i>>2]=0;m=i+4|0;f[m>>2]=0;f[i+8>>2]=0;if(l){if(l>>>0>1073741823)aq(i);o=l<<2;p=ln(o)|0;f[i>>2]=p;q=p+(l<<2)|0;f[i+8>>2]=q;sj(p|0,0,o|0)|0;f[m>>2]=q;q=c+48|0;o=c+40|0;l=g+4|0;r=g+12|0;s=g+8|0;t=a+40|0;v=a+64|0;w=f[d>>2]|0;d=0;x=p;y=0;z=0;A=p;B=p;C=p;while(1){p=q;D=f[p>>2]|0;E=f[p+4>>2]|0;p=o;F=un(f[p>>2]|0,f[p+4>>2]|0,w+y|0,0)|0;p=Vn(F|0,I|0,D|0,E|0)|0;E=b[(f[f[c>>2]>>2]|0)+p>>0]|0;b[h>>0]=E;p=E&255^318;a:do if(d){D=d+-1|0;F=(D&d|0)==0;if(!F)if(p>>>0>>0)G=p;else G=(p>>>0)%(d>>>0)|0;else G=D&p;H=f[g>>2]|0;J=f[H+(G<<2)>>2]|0;b:do if(J|0?(K=f[J>>2]|0,K|0):0){c:do if(F){L=K;while(1){M=f[L+4>>2]|0;N=(M|0)==(p|0);if(!(N|(M&D|0)==(G|0)))break b;if(N?(b[L+8>>0]|0)==E<<24>>24:0){O=L;break c}L=f[L>>2]|0;if(!L)break b}}else{L=K;while(1){N=f[L+4>>2]|0;if((N|0)==(p|0)){if((b[L+8>>0]|0)==E<<24>>24){O=L;break c}}else{if(N>>>0>>0)P=N;else P=(N>>>0)%(d>>>0)|0;if((P|0)!=(G|0))break b}L=f[L>>2]|0;if(!L)break b}}while(0);f[C+(y<<2)>>2]=f[O+12>>2];Q=x;R=z;S=B;T=A;U=C;break a}while(0);if(!F)if(p>>>0>>0)V=p;else V=(p>>>0)%(d>>>0)|0;else V=D&p;J=f[H+(V<<2)>>2]|0;if(!J){X=V;Y=d;Z=0;_=40}else{if(F){K=J;while(1){K=f[K>>2]|0;if(!K){X=V;Y=d;Z=0;_=40;break a}L=f[K+4>>2]|0;if(!((L|0)==(p|0)|(L&D|0)==(V|0))){X=V;Y=d;Z=0;_=40;break a}if((b[K+8>>0]|0)==E<<24>>24){_=55;break a}}}else aa=J;while(1){aa=f[aa>>2]|0;if(!aa){X=V;Y=d;Z=0;_=40;break a}K=f[aa+4>>2]|0;if((K|0)!=(p|0)){if(K>>>0>>0)ba=K;else ba=(K>>>0)%(d>>>0)|0;if((ba|0)!=(V|0)){X=V;Y=d;Z=0;_=40;break a}}if((b[aa+8>>0]|0)==E<<24>>24){_=55;break}}}}else{X=0;Y=0;Z=1;_=40}while(0);if((_|0)==40){_=0;J=ln(16)|0;b[J+8>>0]=E;f[J+12>>2]=z;f[J+4>>2]=p;f[J>>2]=0;ca=$(((f[r>>2]|0)+1|0)>>>0);da=$(Y>>>0);ea=$(n[j>>2]);do if(Z|$(ea*da)>>0<3|(Y+-1&Y|0)!=0)&1;D=~~$(W($(ca/ea)))>>>0;ai(g,K>>>0>>0?D:K);K=f[l>>2]|0;D=K+-1|0;if(!(D&K)){fa=K;ga=D&p;break}if(p>>>0>>0){fa=K;ga=p}else{fa=K;ga=(p>>>0)%(K>>>0)|0}}else{fa=Y;ga=X}while(0);p=(f[g>>2]|0)+(ga<<2)|0;E=f[p>>2]|0;if(!E){f[J>>2]=f[s>>2];f[s>>2]=J;f[p>>2]=s;p=f[J>>2]|0;if(p|0){K=f[p+4>>2]|0;p=fa+-1|0;if(p&fa)if(K>>>0>>0)ha=K;else ha=(K>>>0)%(fa>>>0)|0;else ha=K&p;ia=(f[g>>2]|0)+(ha<<2)|0;_=53}}else{f[J>>2]=f[E>>2];ia=E;_=53}if((_|0)==53){_=0;f[ia>>2]=J}f[r>>2]=(f[r>>2]|0)+1;_=55}if((_|0)==55){_=0;E=t;p=f[E>>2]|0;K=un(p|0,f[E+4>>2]|0,z|0,0)|0;kh((f[f[v>>2]>>2]|0)+K|0,h|0,p|0)|0;p=f[i>>2]|0;f[p+(y<<2)>>2]=z;Q=p;R=z+1|0;S=p;T=p;U=p}p=y+1|0;ja=f[k>>2]|0;if(p>>>0>=ja>>>0)break;d=f[l>>2]|0;x=Q;y=p;z=R;A=T;B=S;C=U}if((R|0)==(ja|0))ka=T;else{T=a+84|0;if(!(b[T>>0]|0)){U=f[a+72>>2]|0;C=f[a+68>>2]|0;B=C;if((U|0)==(C|0))la=Q;else{A=U-C>>2;C=0;do{U=B+(C<<2)|0;f[U>>2]=f[S+(f[U>>2]<<2)>>2];C=C+1|0}while(C>>>0>>0);la=Q}}else{b[T>>0]=0;T=a+68|0;Q=a+72|0;A=f[Q>>2]|0;C=f[T>>2]|0;S=A-C>>2;B=C;C=A;if(ja>>>0<=S>>>0)if(ja>>>0>>0?(A=B+(ja<<2)|0,(A|0)!=(C|0)):0){f[Q>>2]=C+(~((C+-4-A|0)>>>2)<<2);ma=ja}else ma=ja;else{Ch(T,ja-S|0,1220);ma=f[k>>2]|0}S=f[i>>2]|0;if(!ma)la=S;else{i=f[a+68>>2]|0;a=0;do{f[i+(a<<2)>>2]=f[S+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);la=S}}f[k>>2]=R;ka=la}if(!ka)na=R;else{la=f[m>>2]|0;if((la|0)!=(ka|0))f[m>>2]=la+(~((la+-4-ka|0)>>>2)<<2);Oq(ka);na=R}}else na=0;R=f[g+8>>2]|0;if(R|0){ka=R;do{R=ka;ka=f[ka>>2]|0;Oq(R)}while((ka|0)!=0)}ka=f[g>>2]|0;f[g>>2]=0;if(!ka){u=e;return na|0}Oq(ka);u=e;return na|0}function hc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=Oa,ea=Oa,fa=Oa,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0;e=u;u=u+48|0;g=e+16|0;i=e+12|0;j=e;k=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[k>>2]=$(1.0);l=a+80|0;m=f[l>>2]|0;f[j>>2]=0;o=j+4|0;f[o>>2]=0;f[j+8>>2]=0;if(m){if(m>>>0>1073741823)aq(j);p=m<<2;q=ln(p)|0;f[j>>2]=q;r=q+(m<<2)|0;f[j+8>>2]=r;sj(q|0,0,p|0)|0;f[o>>2]=r;r=c+48|0;p=c+40|0;m=g+4|0;s=g+12|0;t=g+8|0;v=a+40|0;w=a+64|0;x=f[d>>2]|0;d=0;y=q;z=0;A=0;B=q;C=q;D=q;while(1){q=r;E=f[q>>2]|0;F=f[q+4>>2]|0;q=p;G=un(f[q>>2]|0,f[q+4>>2]|0,x+z|0,0)|0;q=Vn(G|0,I|0,E|0,F|0)|0;F=(f[f[c>>2]>>2]|0)+q|0;q=h[F>>0]|h[F+1>>0]<<8|h[F+2>>0]<<16|h[F+3>>0]<<24;f[i>>2]=q;F=q^318;a:do if(d){E=d+-1|0;G=(E&d|0)==0;if(!G)if(F>>>0>>0)H=F;else H=(F>>>0)%(d>>>0)|0;else H=E&F;J=f[g>>2]|0;K=f[J+(H<<2)>>2]|0;b:do if(K|0?(L=f[K>>2]|0,L|0):0){c:do if(G){M=L;while(1){N=f[M+4>>2]|0;O=(N|0)==(F|0);if(!(O|(N&E|0)==(H|0)))break b;if(O?(f[M+8>>2]|0)==(q|0):0){P=M;break c}M=f[M>>2]|0;if(!M)break b}}else{M=L;while(1){O=f[M+4>>2]|0;if((O|0)==(F|0)){if((f[M+8>>2]|0)==(q|0)){P=M;break c}}else{if(O>>>0>>0)Q=O;else Q=(O>>>0)%(d>>>0)|0;if((Q|0)!=(H|0))break b}M=f[M>>2]|0;if(!M)break b}}while(0);f[D+(z<<2)>>2]=f[P+12>>2];R=y;S=A;T=C;U=B;V=D;break a}while(0);if(!G)if(F>>>0>>0)X=F;else X=(F>>>0)%(d>>>0)|0;else X=E&F;K=f[J+(X<<2)>>2]|0;if(!K){Y=X;Z=d;_=0;aa=40}else{if(G){L=K;while(1){L=f[L>>2]|0;if(!L){Y=X;Z=d;_=0;aa=40;break a}M=f[L+4>>2]|0;if(!((M|0)==(F|0)|(M&E|0)==(X|0))){Y=X;Z=d;_=0;aa=40;break a}if((f[L+8>>2]|0)==(q|0)){aa=55;break a}}}else ba=K;while(1){ba=f[ba>>2]|0;if(!ba){Y=X;Z=d;_=0;aa=40;break a}L=f[ba+4>>2]|0;if((L|0)!=(F|0)){if(L>>>0>>0)ca=L;else ca=(L>>>0)%(d>>>0)|0;if((ca|0)!=(X|0)){Y=X;Z=d;_=0;aa=40;break a}}if((f[ba+8>>2]|0)==(q|0)){aa=55;break}}}}else{Y=0;Z=0;_=1;aa=40}while(0);if((aa|0)==40){aa=0;K=ln(16)|0;f[K+8>>2]=q;f[K+12>>2]=A;f[K+4>>2]=F;f[K>>2]=0;da=$(((f[s>>2]|0)+1|0)>>>0);ea=$(Z>>>0);fa=$(n[k>>2]);do if(_|$(fa*ea)>>0<3|(Z+-1&Z|0)!=0)&1;E=~~$(W($(da/fa)))>>>0;Hi(g,L>>>0>>0?E:L);L=f[m>>2]|0;E=L+-1|0;if(!(E&L)){ga=L;ha=E&F;break}if(F>>>0>>0){ga=L;ha=F}else{ga=L;ha=(F>>>0)%(L>>>0)|0}}else{ga=Z;ha=Y}while(0);F=(f[g>>2]|0)+(ha<<2)|0;q=f[F>>2]|0;if(!q){f[K>>2]=f[t>>2];f[t>>2]=K;f[F>>2]=t;F=f[K>>2]|0;if(F|0){L=f[F+4>>2]|0;F=ga+-1|0;if(F&ga)if(L>>>0>>0)ia=L;else ia=(L>>>0)%(ga>>>0)|0;else ia=L&F;ja=(f[g>>2]|0)+(ia<<2)|0;aa=53}}else{f[K>>2]=f[q>>2];ja=q;aa=53}if((aa|0)==53){aa=0;f[ja>>2]=K}f[s>>2]=(f[s>>2]|0)+1;aa=55}if((aa|0)==55){aa=0;q=v;F=f[q>>2]|0;L=un(F|0,f[q+4>>2]|0,A|0,0)|0;kh((f[f[w>>2]>>2]|0)+L|0,i|0,F|0)|0;F=f[j>>2]|0;f[F+(z<<2)>>2]=A;R=F;S=A+1|0;T=F;U=F;V=F}F=z+1|0;ka=f[l>>2]|0;if(F>>>0>=ka>>>0)break;d=f[m>>2]|0;y=R;z=F;A=S;B=U;C=T;D=V}if((S|0)==(ka|0))la=U;else{U=a+84|0;if(!(b[U>>0]|0)){V=f[a+72>>2]|0;D=f[a+68>>2]|0;C=D;if((V|0)==(D|0))ma=R;else{B=V-D>>2;D=0;do{V=C+(D<<2)|0;f[V>>2]=f[T+(f[V>>2]<<2)>>2];D=D+1|0}while(D>>>0>>0);ma=R}}else{b[U>>0]=0;U=a+68|0;R=a+72|0;B=f[R>>2]|0;D=f[U>>2]|0;T=B-D>>2;C=D;D=B;if(ka>>>0<=T>>>0)if(ka>>>0>>0?(B=C+(ka<<2)|0,(B|0)!=(D|0)):0){f[R>>2]=D+(~((D+-4-B|0)>>>2)<<2);na=ka}else na=ka;else{Ch(U,ka-T|0,1220);na=f[l>>2]|0}T=f[j>>2]|0;if(!na)ma=T;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[T+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);ma=T}}f[l>>2]=S;la=ma}if(!la)oa=S;else{ma=f[o>>2]|0;if((ma|0)!=(la|0))f[o>>2]=ma+(~((ma+-4-la|0)>>>2)<<2);Oq(la);oa=S}}else oa=0;S=f[g+8>>2]|0;if(S|0){la=S;do{S=la;la=f[la>>2]|0;Oq(S)}while((la|0)!=0)}la=f[g>>2]|0;f[g>>2]=0;if(!la){u=e;return oa|0}Oq(la);u=e;return oa|0}function ic(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0;e=u;u=u+96|0;g=e+92|0;h=e+88|0;i=e+72|0;j=e+48|0;k=e+24|0;l=e;m=a+16|0;n=f[m>>2]|0;o=f[c>>2]|0;f[i>>2]=n;f[i+4>>2]=o;c=i+8|0;f[c>>2]=o;b[i+12>>0]=1;p=f[(f[n+28>>2]|0)+(o<<2)>>2]|0;n=a+20|0;q=f[n>>2]|0;r=f[q>>2]|0;if((f[q+4>>2]|0)-r>>2>>>0<=p>>>0)aq(q);q=a+8|0;s=f[(f[q>>2]|0)+(f[r+(p<<2)>>2]<<2)>>2]|0;p=a+4|0;r=f[p>>2]|0;if(!(b[r+84>>0]|0))t=f[(f[r+68>>2]|0)+(s<<2)>>2]|0;else t=s;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;f[j+12>>2]=0;f[j+16>>2]=0;f[j+20>>2]=0;f[h>>2]=t;t=b[r+24>>0]|0;f[g>>2]=f[h>>2];vb(r,g,t,j)|0;t=a+28|0;a=(f[t>>2]|0)==0;a:do if((o|0)!=-1){r=k+8|0;s=j+8|0;v=k+16|0;w=j+16|0;x=l+8|0;y=l+16|0;z=o;A=o;B=0;C=0;D=0;E=0;F=0;G=0;H=a;J=o;while(1){do if(H){K=J+1|0;if((J|0)!=-1){L=((K>>>0)%3|0|0)==0?J+-2|0:K;if((z|0)!=-1)if(!((z>>>0)%3|0)){M=z;N=z+2|0;O=L;P=z;break}else{M=z;N=z+-1|0;O=L;P=z;break}else{M=-1;N=-1;O=L;P=-1}}else{M=z;N=-1;O=-1;P=-1}}else{L=A+1|0;K=((L>>>0)%3|0|0)==0?A+-2|0:L;if(!((A>>>0)%3|0)){M=z;N=A+2|0;O=K;P=J;break}else{M=z;N=A+-1|0;O=K;P=J;break}}while(0);K=f[(f[(f[m>>2]|0)+28>>2]|0)+(O<<2)>>2]|0;Q=f[n>>2]|0;L=f[Q>>2]|0;if((f[Q+4>>2]|0)-L>>2>>>0<=K>>>0){R=17;break}S=f[(f[q>>2]|0)+(f[L+(K<<2)>>2]<<2)>>2]|0;K=f[p>>2]|0;if(!(b[K+84>>0]|0))T=f[(f[K+68>>2]|0)+(S<<2)>>2]|0;else T=S;f[k>>2]=0;f[k+4>>2]=0;f[k+8>>2]=0;f[k+12>>2]=0;f[k+16>>2]=0;f[k+20>>2]=0;f[h>>2]=T;S=b[K+24>>0]|0;f[g>>2]=f[h>>2];vb(K,g,S,k)|0;S=f[(f[(f[m>>2]|0)+28>>2]|0)+(N<<2)>>2]|0;U=f[n>>2]|0;K=f[U>>2]|0;if((f[U+4>>2]|0)-K>>2>>>0<=S>>>0){R=21;break}L=f[(f[q>>2]|0)+(f[K+(S<<2)>>2]<<2)>>2]|0;S=f[p>>2]|0;if(!(b[S+84>>0]|0))V=f[(f[S+68>>2]|0)+(L<<2)>>2]|0;else V=L;f[l>>2]=0;f[l+4>>2]=0;f[l+8>>2]=0;f[l+12>>2]=0;f[l+16>>2]=0;f[l+20>>2]=0;f[h>>2]=V;L=b[S+24>>0]|0;f[g>>2]=f[h>>2];vb(S,g,L,l)|0;L=k;S=j;K=f[S>>2]|0;W=f[S+4>>2]|0;S=Xn(f[L>>2]|0,f[L+4>>2]|0,K|0,W|0)|0;L=I;X=r;Y=s;Z=f[Y>>2]|0;_=f[Y+4>>2]|0;Y=Xn(f[X>>2]|0,f[X+4>>2]|0,Z|0,_|0)|0;X=I;$=v;aa=w;ba=f[aa>>2]|0;ca=f[aa+4>>2]|0;aa=Xn(f[$>>2]|0,f[$+4>>2]|0,ba|0,ca|0)|0;$=I;da=l;ea=Xn(f[da>>2]|0,f[da+4>>2]|0,K|0,W|0)|0;W=I;K=x;da=Xn(f[K>>2]|0,f[K+4>>2]|0,Z|0,_|0)|0;_=I;Z=y;K=Xn(f[Z>>2]|0,f[Z+4>>2]|0,ba|0,ca|0)|0;ca=I;ba=un(K|0,ca|0,Y|0,X|0)|0;Z=I;fa=un(da|0,_|0,aa|0,$|0)|0;ga=I;ha=un(ea|0,W|0,aa|0,$|0)|0;$=I;aa=un(K|0,ca|0,S|0,L|0)|0;ca=I;K=un(da|0,_|0,S|0,L|0)|0;L=I;S=un(ea|0,W|0,Y|0,X|0)|0;X=I;Y=Xn(B|0,C|0,fa|0,ga|0)|0;ga=Vn(Y|0,I|0,ba|0,Z|0)|0;Z=I;ba=Vn(ha|0,$|0,D|0,E|0)|0;$=Xn(ba|0,I|0,aa|0,ca|0)|0;ca=I;aa=Xn(F|0,G|0,S|0,X|0)|0;X=Vn(aa|0,I|0,K|0,L|0)|0;L=I;Pg(i);A=f[c>>2]|0;K=(f[t>>2]|0)==0;if((A|0)==-1){ia=K;ja=Z;ka=ga;la=ca;ma=$;na=L;oa=X;break a}else{z=M;B=ga;C=Z;D=$;E=ca;F=X;G=L;H=K;J=P}}if((R|0)==17)aq(Q);else if((R|0)==21)aq(U)}else{ia=a;ja=0;ka=0;la=0;ma=0;na=0;oa=0}while(0);a=(ja|0)>-1|(ja|0)==-1&ka>>>0>4294967295;U=Xn(0,0,ka|0,ja|0)|0;R=a?ja:I;Q=(la|0)>-1|(la|0)==-1&ma>>>0>4294967295;P=Xn(0,0,ma|0,la|0)|0;M=Q?la:I;t=(na|0)>-1|(na|0)==-1&oa>>>0>4294967295;c=Xn(0,0,oa|0,na|0)|0;i=Vn((Q?ma:P)|0,M|0,(t?oa:c)|0,(t?na:I)|0)|0;t=Vn(i|0,I|0,(a?ka:U)|0,R|0)|0;R=I;if(ia){if((t|0)<=536870912){pa=ka;qa=ma;ra=oa;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}ia=Yn(t|0,R|0,29)|0;U=ia&7;ia=Ik(ka|0,ja|0,U|0,0)|0;a=Ik(ma|0,la|0,U|0,0)|0;i=Ik(oa|0,na|0,U|0,0)|0;pa=ia;qa=a;ra=i;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}else{if(!((R|0)>0|(R|0)==0&t>>>0>536870912)){pa=ka;qa=ma;ra=oa;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}i=Yn(t|0,R|0,29)|0;R=I;t=Ik(ka|0,ja|0,i|0,R|0)|0;ja=Ik(ma|0,la|0,i|0,R|0)|0;la=Ik(oa|0,na|0,i|0,R|0)|0;pa=t;qa=ja;ra=la;f[d>>2]=pa;sa=d+4|0;f[sa>>2]=qa;ta=d+8|0;f[ta>>2]=ra;u=e;return}}function jc(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=Oa,V=Oa,X=Oa,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0;g=u;u=u+48|0;i=g+28|0;j=g+8|0;k=g;l=g+16|0;m=i+16|0;f[i>>2]=0;f[i+4>>2]=0;f[i+8>>2]=0;f[i+12>>2]=0;n[m>>2]=$(1.0);o=a+80|0;p=f[o>>2]|0;f[l>>2]=0;q=l+4|0;f[q>>2]=0;f[l+8>>2]=0;if(p){if(p>>>0>1073741823)aq(l);r=p<<2;s=ln(r)|0;f[l>>2]=s;t=s+(p<<2)|0;f[l+8>>2]=t;sj(s|0,0,r|0)|0;f[q>>2]=t;t=f[e>>2]|0;e=c+48|0;r=c+40|0;s=i+4|0;p=i+12|0;v=i+8|0;w=a+40|0;x=a+64|0;y=0;z=0;while(1){A=e;B=f[A>>2]|0;C=f[A+4>>2]|0;A=r;D=un(f[A>>2]|0,f[A+4>>2]|0,t+y|0,0)|0;A=Vn(D|0,I|0,B|0,C|0)|0;C=(f[f[c>>2]>>2]|0)+A|0;A=C;B=h[A>>0]|h[A+1>>0]<<8|h[A+2>>0]<<16|h[A+3>>0]<<24;A=C+4|0;C=h[A>>0]|h[A+1>>0]<<8|h[A+2>>0]<<16|h[A+3>>0]<<24;A=j;f[A>>2]=B;f[A+4>>2]=C;A=k;f[A>>2]=B;f[A+4>>2]=C;C=yf(i,k)|0;if(!C){A=k;B=f[A>>2]|0;D=f[A+4>>2]|0;A=B&65535;E=Yn(B|0,D|0,16)|0;F=E&65535;G=D&65535;H=Yn(B|0,D|0,48)|0;J=H&65535;K=((((A^318)&65535)+239^E&65535)+239^D&65535)+239^H&65535;H=f[s>>2]|0;E=(H|0)==0;a:do if(!E){L=H+-1|0;M=(L&H|0)==0;if(!M)if(K>>>0>>0)N=K;else N=(K>>>0)%(H>>>0)|0;else N=K&L;O=f[(f[i>>2]|0)+(N<<2)>>2]|0;if((O|0)!=0?(P=f[O>>2]|0,(P|0)!=0):0){if(M){M=P;while(1){O=f[M+4>>2]|0;if(!((O|0)==(K|0)|(O&L|0)==(N|0))){Q=N;R=31;break a}O=M+8|0;if((((d[O>>1]|0)==A<<16>>16?(d[O+2>>1]|0)==F<<16>>16:0)?(d[M+12>>1]|0)==G<<16>>16:0)?(d[O+6>>1]|0)==J<<16>>16:0)break a;M=f[M>>2]|0;if(!M){Q=N;R=31;break a}}}else S=P;while(1){M=f[S+4>>2]|0;if((M|0)!=(K|0)){if(M>>>0>>0)T=M;else T=(M>>>0)%(H>>>0)|0;if((T|0)!=(N|0)){Q=N;R=31;break a}}M=S+8|0;if((((d[M>>1]|0)==A<<16>>16?(d[M+2>>1]|0)==F<<16>>16:0)?(d[S+12>>1]|0)==G<<16>>16:0)?(d[M+6>>1]|0)==J<<16>>16:0)break a;S=f[S>>2]|0;if(!S){Q=N;R=31;break}}}else{Q=N;R=31}}else{Q=0;R=31}while(0);if((R|0)==31){R=0;J=ln(20)|0;G=J+8|0;F=G;d[F>>1]=B;d[F+2>>1]=B>>>16;F=G+4|0;d[F>>1]=D;d[F+2>>1]=D>>>16;f[J+16>>2]=z;f[J+4>>2]=K;f[J>>2]=0;U=$(((f[p>>2]|0)+1|0)>>>0);V=$(H>>>0);X=$(n[m>>2]);do if(E|$(X*V)>>0<3|(H+-1&H|0)!=0)&1;G=~~$(W($(U/X)))>>>0;Sh(i,F>>>0>>0?G:F);F=f[s>>2]|0;G=F+-1|0;if(!(G&F)){Y=F;Z=G&K;break}if(K>>>0>>0){Y=F;Z=K}else{Y=F;Z=(K>>>0)%(F>>>0)|0}}else{Y=H;Z=Q}while(0);H=(f[i>>2]|0)+(Z<<2)|0;K=f[H>>2]|0;if(!K){f[J>>2]=f[v>>2];f[v>>2]=J;f[H>>2]=v;H=f[J>>2]|0;if(H|0){E=f[H+4>>2]|0;H=Y+-1|0;if(H&Y)if(E>>>0>>0)_=E;else _=(E>>>0)%(Y>>>0)|0;else _=E&H;aa=(f[i>>2]|0)+(_<<2)|0;R=44}}else{f[J>>2]=f[K>>2];aa=K;R=44}if((R|0)==44){R=0;f[aa>>2]=J}f[p>>2]=(f[p>>2]|0)+1}K=w;H=f[K>>2]|0;E=un(H|0,f[K+4>>2]|0,z|0,0)|0;kh((f[f[x>>2]>>2]|0)+E|0,j|0,H|0)|0;H=f[l>>2]|0;f[H+(y<<2)>>2]=z;ba=z+1|0;ca=H}else{H=f[l>>2]|0;f[H+(y<<2)>>2]=f[C+16>>2];ba=z;ca=H}y=y+1|0;da=f[o>>2]|0;if(y>>>0>=da>>>0)break;else z=ba}if((ba|0)==(da|0))ea=ca;else{z=a+84|0;if(!(b[z>>0]|0)){y=f[a+72>>2]|0;j=f[a+68>>2]|0;x=j;if((y|0)==(j|0))fa=ca;else{w=y-j>>2;j=0;do{y=x+(j<<2)|0;f[y>>2]=f[ca+(f[y>>2]<<2)>>2];j=j+1|0}while(j>>>0>>0);fa=ca}}else{b[z>>0]=0;z=a+68|0;ca=a+72|0;w=f[ca>>2]|0;j=f[z>>2]|0;x=w-j>>2;y=j;j=w;if(da>>>0<=x>>>0)if(da>>>0>>0?(w=y+(da<<2)|0,(w|0)!=(j|0)):0){f[ca>>2]=j+(~((j+-4-w|0)>>>2)<<2);ga=da}else ga=da;else{Ch(z,da-x|0,1220);ga=f[o>>2]|0}x=f[l>>2]|0;if(!ga)fa=x;else{l=f[a+68>>2]|0;a=0;do{f[l+(a<<2)>>2]=f[x+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);fa=x}}f[o>>2]=ba;ea=fa}if(!ea)ha=ba;else{fa=f[q>>2]|0;if((fa|0)!=(ea|0))f[q>>2]=fa+(~((fa+-4-ea|0)>>>2)<<2);Oq(ea);ha=ba}}else ha=0;ba=f[i+8>>2]|0;if(ba|0){ea=ba;do{ba=ea;ea=f[ea>>2]|0;Oq(ba)}while((ea|0)!=0)}ea=f[i>>2]|0;f[i>>2]=0;if(!ea){u=g;return ha|0}Oq(ea);u=g;return ha|0}function kc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;c=u;u=u+16|0;d=c+8|0;e=c;g=c+4|0;h=a+16|0;i=f[h>>2]|0;j=a+20|0;k=f[j>>2]|0;if((k|0)==(i|0))l=i;else{m=k+(~((k+-4-i|0)>>>2)<<2)|0;f[j>>2]=m;l=m}m=a+24|0;if((l|0)==(f[m>>2]|0)){Ri(h,b);n=f[h>>2]|0;o=f[j>>2]|0}else{f[l>>2]=f[b>>2];k=l+4|0;f[j>>2]=k;n=i;o=k}k=f[a+8>>2]|0;i=(f[k+100>>2]|0)-(f[k+96>>2]|0)|0;k=(i|0)/12|0;if((n|0)==(o|0)){u=c;return 1}n=a+28|0;l=(i|0)>0;i=a+164|0;p=a+12|0;q=a+76|0;r=a+80|0;s=a+72|0;t=a+152|0;v=a+84|0;w=a+272|0;x=a+276|0;y=a+268|0;z=a+168|0;A=a+140|0;B=a+120|0;C=o;do{o=f[C+-4>>2]|0;f[b>>2]=o;a:do if((o|0)!=-1?(D=(o>>>0)/3|0,E=f[n>>2]|0,(f[E+(D>>>5<<2)>>2]&1<<(D&31)|0)==0):0){if(l){D=0;F=E;b:while(1){E=D+1|0;f[i>>2]=(f[i>>2]|0)+1;G=f[b>>2]|0;H=(G|0)==-1?-1:(G>>>0)/3|0;G=F+(H>>>5<<2)|0;f[G>>2]=1<<(H&31)|f[G>>2];G=f[q>>2]|0;if((G|0)==(f[r>>2]|0))Ri(s,b);else{f[G>>2]=f[b>>2];f[q>>2]=G+4}G=f[b>>2]|0;if((G|0)==-1)I=-1;else I=f[(f[f[p>>2]>>2]|0)+(G<<2)>>2]|0;J=(f[(f[t>>2]|0)+(I<<2)>>2]|0)!=-1;K=(f[v>>2]|0)+(I>>>5<<2)|0;L=1<<(I&31);M=f[K>>2]|0;do if(!(M&L)){f[K>>2]=M|L;if(J){N=f[b>>2]|0;O=30;break}f[d>>2]=0;P=f[w>>2]|0;if((P|0)==(f[x>>2]|0))Ri(y,d);else{f[P>>2]=0;f[w>>2]=P+4}P=f[b>>2]|0;Q=P+1|0;if((P|0)!=-1?(R=((Q>>>0)%3|0|0)==0?P+-2|0:Q,(R|0)!=-1):0)S=f[(f[(f[p>>2]|0)+12>>2]|0)+(R<<2)>>2]|0;else S=-1;f[b>>2]=S}else{N=G;O=30}while(0);if((O|0)==30){O=0;G=N+1|0;if((N|0)==-1){O=35;break}L=((G>>>0)%3|0|0)==0?N+-2|0:G;if((L|0)==-1)T=-1;else T=f[(f[(f[p>>2]|0)+12>>2]|0)+(L<<2)>>2]|0;f[e>>2]=T;L=(((N>>>0)%3|0|0)==0?2:-1)+N|0;if((L|0)==-1)U=-1;else U=f[(f[(f[p>>2]|0)+12>>2]|0)+(L<<2)>>2]|0;L=(T|0)==-1;M=L?-1:(T>>>0)/3|0;V=(U|0)==-1;W=V?-1:(U>>>0)/3|0;K=((G>>>0)%3|0|0)==0?N+-2|0:G;if(((K|0)!=-1?(G=f[(f[p>>2]|0)+12>>2]|0,R=f[G+(K<<2)>>2]|0,(R|0)!=-1):0)?(K=(R>>>0)/3|0,R=f[n>>2]|0,(f[R+(K>>>5<<2)>>2]&1<<(K&31)|0)==0):0){K=(((N>>>0)%3|0|0)==0?2:-1)+N|0;do if((K|0)!=-1){Q=f[G+(K<<2)>>2]|0;if((Q|0)==-1)break;P=(Q>>>0)/3|0;if(!(f[R+(P>>>5<<2)>>2]&1<<(P&31))){O=63;break b}}while(0);if(!V)xf(a,f[i>>2]|0,H,0,W);f[d>>2]=3;R=f[w>>2]|0;if((R|0)==(f[x>>2]|0))Ri(y,d);else{f[R>>2]=3;f[w>>2]=R+4}X=f[e>>2]|0}else{if(!L){xf(a,f[i>>2]|0,H,1,M);R=f[b>>2]|0;if((R|0)==-1){O=44;break}else Y=R}else Y=N;R=(((Y>>>0)%3|0|0)==0?2:-1)+Y|0;if((R|0)==-1){O=44;break}K=f[(f[(f[p>>2]|0)+12>>2]|0)+(R<<2)>>2]|0;if((K|0)==-1){O=44;break}R=(K>>>0)/3|0;if(f[(f[n>>2]|0)+(R>>>5<<2)>>2]&1<<(R&31)|0){O=44;break}f[d>>2]=5;R=f[w>>2]|0;if((R|0)==(f[x>>2]|0))Ri(y,d);else{f[R>>2]=5;f[w>>2]=R+4}X=U}f[b>>2]=X}if((E|0)>=(k|0))break a;D=E;F=f[n>>2]|0}do if((O|0)==35){O=0;f[e>>2]=-1;O=46}else if((O|0)==44){O=0;if(V)O=46;else{xf(a,f[i>>2]|0,H,0,W);O=46}}else if((O|0)==63){O=0;f[d>>2]=1;F=f[w>>2]|0;if((F|0)==(f[x>>2]|0))Ri(y,d);else{f[F>>2]=1;f[w>>2]=F+4}f[z>>2]=(f[z>>2]|0)+1;if(J?(F=f[(f[t>>2]|0)+(I<<2)>>2]|0,(1<<(F&31)&f[(f[A>>2]|0)+(F>>>5<<2)>>2]|0)==0):0){f[g>>2]=f[b>>2];f[d>>2]=f[g>>2];Pe(a,d,0)|0}F=f[i>>2]|0;f[d>>2]=H;D=je(B,d)|0;f[D>>2]=F;F=f[j>>2]|0;f[F+-4>>2]=U;if((F|0)==(f[m>>2]|0)){Ri(h,e);break}else{f[F>>2]=f[e>>2];f[j>>2]=F+4;break}}while(0);if((O|0)==46){O=0;f[d>>2]=7;F=f[w>>2]|0;if((F|0)==(f[x>>2]|0))Ri(y,d);else{f[F>>2]=7;f[w>>2]=F+4}f[j>>2]=(f[j>>2]|0)+-4}}}else O=11;while(0);if((O|0)==11){O=0;f[j>>2]=C+-4}C=f[j>>2]|0}while((f[h>>2]|0)!=(C|0));u=c;return 1}function lc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=Oa,V=Oa,X=Oa,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0;e=u;u=u+48|0;g=e+20|0;i=e+16|0;j=e+12|0;k=e;l=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[l>>2]=$(1.0);m=a+80|0;o=f[m>>2]|0;f[k>>2]=0;p=k+4|0;f[p>>2]=0;f[k+8>>2]=0;if(o){if(o>>>0>1073741823)aq(k);q=o<<2;r=ln(q)|0;f[k>>2]=r;s=r+(o<<2)|0;f[k+8>>2]=s;sj(r|0,0,q|0)|0;f[p>>2]=s;s=f[d>>2]|0;d=c+48|0;q=c+40|0;r=g+4|0;o=g+12|0;t=g+8|0;v=a+40|0;w=a+64|0;x=0;y=0;while(1){z=d;A=f[z>>2]|0;B=f[z+4>>2]|0;z=q;C=un(f[z>>2]|0,f[z+4>>2]|0,s+x|0,0)|0;z=Vn(C|0,I|0,A|0,B|0)|0;B=(f[f[c>>2]>>2]|0)+z|0;z=h[B>>0]|h[B+1>>0]<<8|h[B+2>>0]<<16|h[B+3>>0]<<24;f[i>>2]=z;f[j>>2]=z;z=Ef(g,j)|0;if(!z){B=f[j>>2]|0;A=B&255;C=B>>>8;D=C&255;E=B>>>16;F=E&255;G=B>>>24;H=G&255;J=C&255;C=E&255;E=(((B&255^318)+239^J)+239^C)+239^G;G=f[r>>2]|0;K=(G|0)==0;a:do if(!K){L=G+-1|0;M=(L&G|0)==0;if(!M)if(E>>>0>>0)N=E;else N=(E>>>0)%(G>>>0)|0;else N=E&L;O=f[(f[g>>2]|0)+(N<<2)>>2]|0;if((O|0)!=0?(P=f[O>>2]|0,(P|0)!=0):0){if(M){M=P;while(1){O=f[M+4>>2]|0;if(!((O|0)==(E|0)|(O&L|0)==(N|0))){Q=N;R=31;break a}O=M+8|0;if((((b[O>>0]|0)==A<<24>>24?(b[O+1>>0]|0)==D<<24>>24:0)?(b[O+2>>0]|0)==F<<24>>24:0)?(b[O+3>>0]|0)==H<<24>>24:0)break a;M=f[M>>2]|0;if(!M){Q=N;R=31;break a}}}else S=P;while(1){M=f[S+4>>2]|0;if((M|0)!=(E|0)){if(M>>>0>>0)T=M;else T=(M>>>0)%(G>>>0)|0;if((T|0)!=(N|0)){Q=N;R=31;break a}}M=S+8|0;if((((b[M>>0]|0)==A<<24>>24?(b[M+1>>0]|0)==D<<24>>24:0)?(b[M+2>>0]|0)==F<<24>>24:0)?(b[M+3>>0]|0)==H<<24>>24:0)break a;S=f[S>>2]|0;if(!S){Q=N;R=31;break}}}else{Q=N;R=31}}else{Q=0;R=31}while(0);if((R|0)==31){R=0;H=ln(16)|0;F=H+8|0;D=B&-16776961|C<<16|J<<8;b[F>>0]=D;b[F+1>>0]=D>>8;b[F+2>>0]=D>>16;b[F+3>>0]=D>>24;f[H+12>>2]=y;f[H+4>>2]=E;f[H>>2]=0;U=$(((f[o>>2]|0)+1|0)>>>0);V=$(G>>>0);X=$(n[l>>2]);do if(K|$(X*V)>>0<3|(G+-1&G|0)!=0)&1;F=~~$(W($(U/X)))>>>0;Zh(g,D>>>0>>0?F:D);D=f[r>>2]|0;F=D+-1|0;if(!(F&D)){Y=D;Z=F&E;break}if(E>>>0>>0){Y=D;Z=E}else{Y=D;Z=(E>>>0)%(D>>>0)|0}}else{Y=G;Z=Q}while(0);G=(f[g>>2]|0)+(Z<<2)|0;E=f[G>>2]|0;if(!E){f[H>>2]=f[t>>2];f[t>>2]=H;f[G>>2]=t;G=f[H>>2]|0;if(G|0){K=f[G+4>>2]|0;G=Y+-1|0;if(G&Y)if(K>>>0>>0)_=K;else _=(K>>>0)%(Y>>>0)|0;else _=K&G;aa=(f[g>>2]|0)+(_<<2)|0;R=44}}else{f[H>>2]=f[E>>2];aa=E;R=44}if((R|0)==44){R=0;f[aa>>2]=H}f[o>>2]=(f[o>>2]|0)+1}E=v;G=f[E>>2]|0;K=un(G|0,f[E+4>>2]|0,y|0,0)|0;kh((f[f[w>>2]>>2]|0)+K|0,i|0,G|0)|0;G=f[k>>2]|0;f[G+(x<<2)>>2]=y;ba=y+1|0;ca=G}else{G=f[k>>2]|0;f[G+(x<<2)>>2]=f[z+12>>2];ba=y;ca=G}x=x+1|0;da=f[m>>2]|0;if(x>>>0>=da>>>0)break;else y=ba}if((ba|0)==(da|0))ea=ca;else{y=a+84|0;if(!(b[y>>0]|0)){x=f[a+72>>2]|0;i=f[a+68>>2]|0;w=i;if((x|0)==(i|0))fa=ca;else{v=x-i>>2;i=0;do{x=w+(i<<2)|0;f[x>>2]=f[ca+(f[x>>2]<<2)>>2];i=i+1|0}while(i>>>0>>0);fa=ca}}else{b[y>>0]=0;y=a+68|0;ca=a+72|0;v=f[ca>>2]|0;i=f[y>>2]|0;w=v-i>>2;x=i;i=v;if(da>>>0<=w>>>0)if(da>>>0>>0?(v=x+(da<<2)|0,(v|0)!=(i|0)):0){f[ca>>2]=i+(~((i+-4-v|0)>>>2)<<2);ga=da}else ga=da;else{Ch(y,da-w|0,1220);ga=f[m>>2]|0}w=f[k>>2]|0;if(!ga)fa=w;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[w+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);fa=w}}f[m>>2]=ba;ea=fa}if(!ea)ha=ba;else{fa=f[p>>2]|0;if((fa|0)!=(ea|0))f[p>>2]=fa+(~((fa+-4-ea|0)>>>2)<<2);Oq(ea);ha=ba}}else ha=0;ba=f[g+8>>2]|0;if(ba|0){ea=ba;do{ba=ea;ea=f[ea>>2]|0;Oq(ba)}while((ea|0)!=0)}ea=f[g>>2]|0;f[g>>2]=0;if(!ea){u=e;return ha|0}Oq(ea);u=e;return ha|0}function mc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=Oa,V=Oa,X=Oa,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0;e=u;u=u+80|0;g=e+48|0;h=e+32|0;i=e+16|0;j=e;k=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[k>>2]=$(1.0);l=a+80|0;m=f[l>>2]|0;f[j>>2]=0;o=j+4|0;f[o>>2]=0;f[j+8>>2]=0;if(m){if(m>>>0>1073741823)aq(j);p=m<<2;q=ln(p)|0;f[j>>2]=q;r=q+(m<<2)|0;f[j+8>>2]=r;sj(q|0,0,p|0)|0;f[o>>2]=r;r=f[d>>2]|0;d=c+48|0;p=c+40|0;q=i+4|0;m=i+8|0;s=i+12|0;t=g+4|0;v=g+12|0;w=g+8|0;x=a+40|0;y=a+64|0;z=0;A=0;while(1){B=d;C=f[B>>2]|0;D=f[B+4>>2]|0;B=p;E=un(f[B>>2]|0,f[B+4>>2]|0,r+A|0,0)|0;B=Vn(E|0,I|0,C|0,D|0)|0;D=(f[f[c>>2]>>2]|0)+B|0;B=h;C=D;E=B+16|0;do{b[B>>0]=b[C>>0]|0;B=B+1|0;C=C+1|0}while((B|0)<(E|0));im(i|0,D|0,16)|0;C=Vf(g,i)|0;if(!C){B=f[i>>2]|0;E=f[q>>2]|0;F=f[m>>2]|0;G=f[s>>2]|0;H=(((B^318)+239^E)+239^F)+239^G;J=f[t>>2]|0;K=(J|0)==0;a:do if(!K){L=J+-1|0;M=(L&J|0)==0;if(!M)if(H>>>0>>0)N=H;else N=(H>>>0)%(J>>>0)|0;else N=H&L;O=f[(f[g>>2]|0)+(N<<2)>>2]|0;if((O|0)!=0?(P=f[O>>2]|0,(P|0)!=0):0){if(M){M=P;while(1){O=f[M+4>>2]|0;if(!((O|0)==(H|0)|(O&L|0)==(N|0))){Q=N;R=31;break a}if((((f[M+8>>2]|0)==(B|0)?(f[M+12>>2]|0)==(E|0):0)?(f[M+16>>2]|0)==(F|0):0)?(f[M+20>>2]|0)==(G|0):0)break a;M=f[M>>2]|0;if(!M){Q=N;R=31;break a}}}else S=P;while(1){M=f[S+4>>2]|0;if((M|0)!=(H|0)){if(M>>>0>>0)T=M;else T=(M>>>0)%(J>>>0)|0;if((T|0)!=(N|0)){Q=N;R=31;break a}}if((((f[S+8>>2]|0)==(B|0)?(f[S+12>>2]|0)==(E|0):0)?(f[S+16>>2]|0)==(F|0):0)?(f[S+20>>2]|0)==(G|0):0)break a;S=f[S>>2]|0;if(!S){Q=N;R=31;break}}}else{Q=N;R=31}}else{Q=0;R=31}while(0);if((R|0)==31){R=0;D=ln(28)|0;f[D+8>>2]=B;f[D+12>>2]=E;f[D+16>>2]=F;f[D+20>>2]=G;f[D+24>>2]=z;f[D+4>>2]=H;f[D>>2]=0;U=$(((f[v>>2]|0)+1|0)>>>0);V=$(J>>>0);X=$(n[k>>2]);do if(K|$(X*V)>>0<3|(J+-1&J|0)!=0)&1;M=~~$(W($(U/X)))>>>0;Wh(g,P>>>0>>0?M:P);P=f[t>>2]|0;M=P+-1|0;if(!(M&P)){Y=P;Z=M&H;break}if(H>>>0

>>0){Y=P;Z=H}else{Y=P;Z=(H>>>0)%(P>>>0)|0}}else{Y=J;Z=Q}while(0);J=(f[g>>2]|0)+(Z<<2)|0;H=f[J>>2]|0;if(!H){f[D>>2]=f[w>>2];f[w>>2]=D;f[J>>2]=w;J=f[D>>2]|0;if(J|0){K=f[J+4>>2]|0;J=Y+-1|0;if(J&Y)if(K>>>0>>0)_=K;else _=(K>>>0)%(Y>>>0)|0;else _=K&J;aa=(f[g>>2]|0)+(_<<2)|0;R=44}}else{f[D>>2]=f[H>>2];aa=H;R=44}if((R|0)==44){R=0;f[aa>>2]=D}f[v>>2]=(f[v>>2]|0)+1}H=x;J=f[H>>2]|0;K=un(J|0,f[H+4>>2]|0,z|0,0)|0;kh((f[f[y>>2]>>2]|0)+K|0,h|0,J|0)|0;J=f[j>>2]|0;f[J+(A<<2)>>2]=z;ba=z+1|0;ca=J}else{J=f[j>>2]|0;f[J+(A<<2)>>2]=f[C+24>>2];ba=z;ca=J}A=A+1|0;da=f[l>>2]|0;if(A>>>0>=da>>>0)break;else z=ba}if((ba|0)==(da|0))ea=ca;else{z=a+84|0;if(!(b[z>>0]|0)){A=f[a+72>>2]|0;h=f[a+68>>2]|0;y=h;if((A|0)==(h|0))fa=ca;else{x=A-h>>2;h=0;do{A=y+(h<<2)|0;f[A>>2]=f[ca+(f[A>>2]<<2)>>2];h=h+1|0}while(h>>>0>>0);fa=ca}}else{b[z>>0]=0;z=a+68|0;ca=a+72|0;x=f[ca>>2]|0;h=f[z>>2]|0;y=x-h>>2;A=h;h=x;if(da>>>0<=y>>>0)if(da>>>0>>0?(x=A+(da<<2)|0,(x|0)!=(h|0)):0){f[ca>>2]=h+(~((h+-4-x|0)>>>2)<<2);ga=da}else ga=da;else{Ch(z,da-y|0,1220);ga=f[l>>2]|0}y=f[j>>2]|0;if(!ga)fa=y;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[y+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);fa=y}}f[l>>2]=ba;ea=fa}if(!ea)ha=ba;else{fa=f[o>>2]|0;if((fa|0)!=(ea|0))f[o>>2]=fa+(~((fa+-4-ea|0)>>>2)<<2);Oq(ea);ha=ba}}else ha=0;ba=f[g+8>>2]|0;if(ba|0){ea=ba;do{ba=ea;ea=f[ea>>2]|0;Oq(ba)}while((ea|0)!=0)}ea=f[g>>2]|0;f[g>>2]=0;if(!ea){u=e;return ha|0}Oq(ea);u=e;return ha|0}function nc(a,c,e){a=a|0;c=c|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=Oa,T=Oa,U=Oa,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0;g=u;u=u+48|0;h=g+12|0;i=g+38|0;j=g+32|0;k=g;l=h+16|0;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;f[h+12>>2]=0;n[l>>2]=$(1.0);m=a+80|0;o=f[m>>2]|0;f[k>>2]=0;p=k+4|0;f[p>>2]=0;f[k+8>>2]=0;if(o){if(o>>>0>1073741823)aq(k);q=o<<2;r=ln(q)|0;f[k>>2]=r;s=r+(o<<2)|0;f[k+8>>2]=s;sj(r|0,0,q|0)|0;f[p>>2]=s;s=f[e>>2]|0;e=c+48|0;q=c+40|0;r=j+2|0;o=j+4|0;t=h+4|0;v=h+12|0;w=h+8|0;x=a+40|0;y=a+64|0;z=0;A=0;while(1){B=e;C=f[B>>2]|0;D=f[B+4>>2]|0;B=q;E=un(f[B>>2]|0,f[B+4>>2]|0,s+A|0,0)|0;B=Vn(E|0,I|0,C|0,D|0)|0;D=(f[f[c>>2]>>2]|0)+B|0;b[i>>0]=b[D>>0]|0;b[i+1>>0]=b[D+1>>0]|0;b[i+2>>0]=b[D+2>>0]|0;b[i+3>>0]=b[D+3>>0]|0;b[i+4>>0]=b[D+4>>0]|0;b[i+5>>0]=b[D+5>>0]|0;im(j|0,D|0,6)|0;D=dg(h,j)|0;if(!D){B=d[j>>1]|0;C=d[r>>1]|0;E=d[o>>1]|0;F=(((B^318)&65535)+239^C&65535)+239^E&65535;G=f[t>>2]|0;H=(G|0)==0;a:do if(!H){J=G+-1|0;K=(J&G|0)==0;if(!K)if(F>>>0>>0)L=F;else L=(F>>>0)%(G>>>0)|0;else L=F&J;M=f[(f[h>>2]|0)+(L<<2)>>2]|0;if((M|0)!=0?(N=f[M>>2]|0,(N|0)!=0):0){if(K){K=N;while(1){M=f[K+4>>2]|0;if(!((M|0)==(F|0)|(M&J|0)==(L|0))){O=L;P=29;break a}M=K+8|0;if(((d[M>>1]|0)==B<<16>>16?(d[M+2>>1]|0)==C<<16>>16:0)?(d[K+12>>1]|0)==E<<16>>16:0)break a;K=f[K>>2]|0;if(!K){O=L;P=29;break a}}}else Q=N;while(1){K=f[Q+4>>2]|0;if((K|0)!=(F|0)){if(K>>>0>>0)R=K;else R=(K>>>0)%(G>>>0)|0;if((R|0)!=(L|0)){O=L;P=29;break a}}K=Q+8|0;if(((d[K>>1]|0)==B<<16>>16?(d[K+2>>1]|0)==C<<16>>16:0)?(d[Q+12>>1]|0)==E<<16>>16:0)break a;Q=f[Q>>2]|0;if(!Q){O=L;P=29;break}}}else{O=L;P=29}}else{O=0;P=29}while(0);if((P|0)==29){P=0;N=ln(20)|0;d[N+8>>1]=B;d[N+10>>1]=C;d[N+12>>1]=E;f[N+16>>2]=z;f[N+4>>2]=F;f[N>>2]=0;S=$(((f[v>>2]|0)+1|0)>>>0);T=$(G>>>0);U=$(n[l>>2]);do if(H|$(U*T)>>0<3|(G+-1&G|0)!=0)&1;J=~~$(W($(S/U)))>>>0;Th(h,K>>>0>>0?J:K);K=f[t>>2]|0;J=K+-1|0;if(!(J&K)){V=K;X=J&F;break}if(F>>>0>>0){V=K;X=F}else{V=K;X=(F>>>0)%(K>>>0)|0}}else{V=G;X=O}while(0);G=(f[h>>2]|0)+(X<<2)|0;F=f[G>>2]|0;if(!F){f[N>>2]=f[w>>2];f[w>>2]=N;f[G>>2]=w;G=f[N>>2]|0;if(G|0){H=f[G+4>>2]|0;G=V+-1|0;if(G&V)if(H>>>0>>0)Y=H;else Y=(H>>>0)%(V>>>0)|0;else Y=H&G;Z=(f[h>>2]|0)+(Y<<2)|0;P=42}}else{f[N>>2]=f[F>>2];Z=F;P=42}if((P|0)==42){P=0;f[Z>>2]=N}f[v>>2]=(f[v>>2]|0)+1}F=x;G=f[F>>2]|0;H=un(G|0,f[F+4>>2]|0,z|0,0)|0;kh((f[f[y>>2]>>2]|0)+H|0,i|0,G|0)|0;G=f[k>>2]|0;f[G+(A<<2)>>2]=z;_=z+1|0;aa=G}else{G=f[k>>2]|0;f[G+(A<<2)>>2]=f[D+16>>2];_=z;aa=G}A=A+1|0;ba=f[m>>2]|0;if(A>>>0>=ba>>>0)break;else z=_}if((_|0)==(ba|0))ca=aa;else{z=a+84|0;if(!(b[z>>0]|0)){A=f[a+72>>2]|0;i=f[a+68>>2]|0;y=i;if((A|0)==(i|0))da=aa;else{x=A-i>>2;i=0;do{A=y+(i<<2)|0;f[A>>2]=f[aa+(f[A>>2]<<2)>>2];i=i+1|0}while(i>>>0>>0);da=aa}}else{b[z>>0]=0;z=a+68|0;aa=a+72|0;x=f[aa>>2]|0;i=f[z>>2]|0;y=x-i>>2;A=i;i=x;if(ba>>>0<=y>>>0)if(ba>>>0>>0?(x=A+(ba<<2)|0,(x|0)!=(i|0)):0){f[aa>>2]=i+(~((i+-4-x|0)>>>2)<<2);ea=ba}else ea=ba;else{Ch(z,ba-y|0,1220);ea=f[m>>2]|0}y=f[k>>2]|0;if(!ea)da=y;else{k=f[a+68>>2]|0;a=0;do{f[k+(a<<2)>>2]=f[y+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);da=y}}f[m>>2]=_;ca=da}if(!ca)fa=_;else{da=f[p>>2]|0;if((da|0)!=(ca|0))f[p>>2]=da+(~((da+-4-ca|0)>>>2)<<2);Oq(ca);fa=_}}else fa=0;_=f[h+8>>2]|0;if(_|0){ca=_;do{_=ca;ca=f[ca>>2]|0;Oq(_)}while((ca|0)!=0)}ca=f[h>>2]|0;f[h>>2]=0;if(!ca){u=g;return fa|0}Oq(ca);u=g;return fa|0}function oc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0,_=0;g=a+8|0;Mh(g,b,d,e);d=f[a+48>>2]|0;h=f[a+52>>2]|0;i=e>>>0>1073741823?-1:e<<2;j=Lq(i)|0;sj(j|0,0,i|0)|0;k=Lq(i)|0;sj(k|0,0,i|0)|0;i=f[a+56>>2]|0;l=i+4|0;m=f[l>>2]|0;n=f[i>>2]|0;o=m-n|0;a:do if((o|0)>4){p=o>>2;q=(e|0)>0;r=a+16|0;s=a+32|0;t=a+12|0;u=a+28|0;v=a+20|0;w=a+24|0;x=d+12|0;y=e<<2;z=p+-1|0;if(m-n>>2>>>0>z>>>0){A=p;B=z;C=n}else aq(i);while(1){z=f[C+(B<<2)>>2]|0;if(q)sj(j|0,0,y|0)|0;if((z|0)!=-1){p=f[x>>2]|0;D=0;E=z;while(1){F=f[p+(E<<2)>>2]|0;if((F|0)!=-1){G=f[d>>2]|0;H=f[h>>2]|0;I=f[H+(f[G+(F<<2)>>2]<<2)>>2]|0;J=F+1|0;K=((J>>>0)%3|0|0)==0?F+-2|0:J;if((K|0)==-1)L=-1;else L=f[G+(K<<2)>>2]|0;K=f[H+(L<<2)>>2]|0;J=(((F>>>0)%3|0|0)==0?2:-1)+F|0;if((J|0)==-1)M=-1;else M=f[G+(J<<2)>>2]|0;J=f[H+(M<<2)>>2]|0;if((I|0)<(B|0)&(K|0)<(B|0)&(J|0)<(B|0)){H=X(I,e)|0;I=X(K,e)|0;K=X(J,e)|0;if(q){J=0;do{f[k+(J<<2)>>2]=(f[b+(J+K<<2)>>2]|0)+(f[b+(J+I<<2)>>2]|0)-(f[b+(J+H<<2)>>2]|0);J=J+1|0}while((J|0)!=(e|0));if(q){J=0;do{H=j+(J<<2)|0;f[H>>2]=(f[H>>2]|0)+(f[k+(J<<2)>>2]|0);J=J+1|0}while((J|0)!=(e|0))}}N=D+1|0}else N=D}else N=D;J=(((E>>>0)%3|0|0)==0?2:-1)+E|0;do if((J|0)!=-1?(H=f[p+(J<<2)>>2]|0,(H|0)!=-1):0)if(!((H>>>0)%3|0)){O=H+2|0;break}else{O=H+-1|0;break}else O=-1;while(0);E=(O|0)==(z|0)?-1:O;if((E|0)==-1)break;else D=N}D=X(B,e)|0;if(N){if(q){E=0;do{z=j+(E<<2)|0;f[z>>2]=(f[z>>2]|0)/(N|0)|0;E=E+1|0}while((E|0)!=(e|0))}E=b+(D<<2)|0;z=c+(D<<2)|0;p=f[g>>2]|0;if((p|0)>0){J=0;H=j;I=p;while(1){if((I|0)>0){p=0;do{K=f[H+(p<<2)>>2]|0;G=f[r>>2]|0;if((K|0)>(G|0)){F=f[s>>2]|0;f[F+(p<<2)>>2]=G;P=F}else{F=f[t>>2]|0;G=f[s>>2]|0;f[G+(p<<2)>>2]=(K|0)<(F|0)?F:K;P=G}p=p+1|0}while((p|0)<(f[g>>2]|0));Q=P}else Q=f[s>>2]|0;p=(f[E+(J<<2)>>2]|0)-(f[Q+(J<<2)>>2]|0)|0;G=z+(J<<2)|0;f[G>>2]=p;if((p|0)>=(f[u>>2]|0)){if((p|0)>(f[w>>2]|0)){R=p-(f[v>>2]|0)|0;S=57}}else{R=(f[v>>2]|0)+p|0;S=57}if((S|0)==57){S=0;f[G>>2]=R}J=J+1|0;I=f[g>>2]|0;if((J|0)>=(I|0))break;else H=Q}}}else{T=D;S=30}}else{T=X(B,e)|0;S=30}if((S|0)==30?(S=0,H=b+(T<<2)|0,I=c+(T<<2)|0,J=f[g>>2]|0,(J|0)>0):0){z=0;E=b+((X(A+-2|0,e)|0)<<2)|0;G=J;while(1){if((G|0)>0){J=0;do{p=f[E+(J<<2)>>2]|0;K=f[r>>2]|0;if((p|0)>(K|0)){F=f[s>>2]|0;f[F+(J<<2)>>2]=K;U=F}else{F=f[t>>2]|0;K=f[s>>2]|0;f[K+(J<<2)>>2]=(p|0)<(F|0)?F:p;U=K}J=J+1|0}while((J|0)<(f[g>>2]|0));V=U}else V=f[s>>2]|0;J=(f[H+(z<<2)>>2]|0)-(f[V+(z<<2)>>2]|0)|0;K=I+(z<<2)|0;f[K>>2]=J;if((J|0)>=(f[u>>2]|0)){if((J|0)>(f[w>>2]|0)){W=J-(f[v>>2]|0)|0;S=42}}else{W=(f[v>>2]|0)+J|0;S=42}if((S|0)==42){S=0;f[K>>2]=W}z=z+1|0;G=f[g>>2]|0;if((z|0)>=(G|0))break;else E=V}}if((A|0)<=2)break a;C=f[i>>2]|0;E=B+-1|0;if((f[l>>2]|0)-C>>2>>>0<=E>>>0)break;else{G=B;B=E;A=G}}aq(i)}while(0);if((e|0)>0)sj(j|0,0,e<<2|0)|0;e=f[g>>2]|0;if((e|0)<=0){Mq(k);Mq(j);return 1}i=a+16|0;A=a+32|0;B=a+12|0;C=a+28|0;l=a+20|0;V=a+24|0;a=0;W=j;U=e;while(1){if((U|0)>0){e=0;do{T=f[W+(e<<2)>>2]|0;Q=f[i>>2]|0;if((T|0)>(Q|0)){R=f[A>>2]|0;f[R+(e<<2)>>2]=Q;Y=R}else{R=f[B>>2]|0;Q=f[A>>2]|0;f[Q+(e<<2)>>2]=(T|0)<(R|0)?R:T;Y=Q}e=e+1|0}while((e|0)<(f[g>>2]|0));Z=Y}else Z=f[A>>2]|0;e=(f[b+(a<<2)>>2]|0)-(f[Z+(a<<2)>>2]|0)|0;Q=c+(a<<2)|0;f[Q>>2]=e;if((e|0)>=(f[C>>2]|0)){if((e|0)>(f[V>>2]|0)){_=e-(f[l>>2]|0)|0;S=72}}else{_=(f[l>>2]|0)+e|0;S=72}if((S|0)==72){S=0;f[Q>>2]=_}a=a+1|0;U=f[g>>2]|0;if((a|0)>=(U|0))break;else W=Z}Mq(k);Mq(j);return 1}function pc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,Y=0,Z=0;g=a+8|0;Mh(g,b,d,e);d=f[a+48>>2]|0;h=f[a+52>>2]|0;i=e>>>0>1073741823?-1:e<<2;j=Lq(i)|0;sj(j|0,0,i|0)|0;k=Lq(i)|0;sj(k|0,0,i|0)|0;i=f[a+56>>2]|0;l=i+4|0;m=f[l>>2]|0;n=f[i>>2]|0;o=m-n|0;a:do if((o|0)>4){p=o>>2;q=(e|0)>0;r=a+16|0;s=a+32|0;t=a+12|0;u=a+28|0;v=a+20|0;w=a+24|0;x=d+64|0;y=d+28|0;z=e<<2;A=p+-1|0;if(m-n>>2>>>0>A>>>0){B=p;C=A;D=n}else aq(i);while(1){A=f[D+(C<<2)>>2]|0;if(q)sj(j|0,0,z|0)|0;if((A|0)!=-1){p=f[d>>2]|0;E=0;F=A;while(1){if(((f[p+(F>>>5<<2)>>2]&1<<(F&31)|0)==0?(G=f[(f[(f[x>>2]|0)+12>>2]|0)+(F<<2)>>2]|0,(G|0)!=-1):0)?(H=f[y>>2]|0,I=f[h>>2]|0,J=f[I+(f[H+(G<<2)>>2]<<2)>>2]|0,K=G+1|0,L=f[I+(f[H+((((K>>>0)%3|0|0)==0?G+-2|0:K)<<2)>>2]<<2)>>2]|0,K=f[I+(f[H+((((G>>>0)%3|0|0)==0?2:-1)+G<<2)>>2]<<2)>>2]|0,(J|0)<(C|0)&(L|0)<(C|0)&(K|0)<(C|0)):0){G=X(J,e)|0;J=X(L,e)|0;L=X(K,e)|0;if(q){K=0;do{f[k+(K<<2)>>2]=(f[b+(K+L<<2)>>2]|0)+(f[b+(K+J<<2)>>2]|0)-(f[b+(K+G<<2)>>2]|0);K=K+1|0}while((K|0)!=(e|0));if(q){K=0;do{G=j+(K<<2)|0;f[G>>2]=(f[G>>2]|0)+(f[k+(K<<2)>>2]|0);K=K+1|0}while((K|0)!=(e|0))}}M=E+1|0}else M=E;K=(((F>>>0)%3|0|0)==0?2:-1)+F|0;do if(((K|0)!=-1?(f[p+(K>>>5<<2)>>2]&1<<(K&31)|0)==0:0)?(G=f[(f[(f[x>>2]|0)+12>>2]|0)+(K<<2)>>2]|0,(G|0)!=-1):0)if(!((G>>>0)%3|0)){N=G+2|0;break}else{N=G+-1|0;break}else N=-1;while(0);F=(N|0)==(A|0)?-1:N;if((F|0)==-1)break;else E=M}E=X(C,e)|0;if(M){if(q){F=0;do{A=j+(F<<2)|0;f[A>>2]=(f[A>>2]|0)/(M|0)|0;F=F+1|0}while((F|0)!=(e|0))}F=b+(E<<2)|0;A=c+(E<<2)|0;p=f[g>>2]|0;if((p|0)>0){K=0;G=j;J=p;while(1){if((J|0)>0){p=0;do{L=f[G+(p<<2)>>2]|0;H=f[r>>2]|0;if((L|0)>(H|0)){I=f[s>>2]|0;f[I+(p<<2)>>2]=H;O=I}else{I=f[t>>2]|0;H=f[s>>2]|0;f[H+(p<<2)>>2]=(L|0)<(I|0)?I:L;O=H}p=p+1|0}while((p|0)<(f[g>>2]|0));P=O}else P=f[s>>2]|0;p=(f[F+(K<<2)>>2]|0)-(f[P+(K<<2)>>2]|0)|0;H=A+(K<<2)|0;f[H>>2]=p;if((p|0)>=(f[u>>2]|0)){if((p|0)>(f[w>>2]|0)){Q=p-(f[v>>2]|0)|0;R=55}}else{Q=(f[v>>2]|0)+p|0;R=55}if((R|0)==55){R=0;f[H>>2]=Q}K=K+1|0;J=f[g>>2]|0;if((K|0)>=(J|0))break;else G=P}}}else{S=E;R=28}}else{S=X(C,e)|0;R=28}if((R|0)==28?(R=0,G=b+(S<<2)|0,J=c+(S<<2)|0,K=f[g>>2]|0,(K|0)>0):0){A=0;F=b+((X(B+-2|0,e)|0)<<2)|0;H=K;while(1){if((H|0)>0){K=0;do{p=f[F+(K<<2)>>2]|0;L=f[r>>2]|0;if((p|0)>(L|0)){I=f[s>>2]|0;f[I+(K<<2)>>2]=L;T=I}else{I=f[t>>2]|0;L=f[s>>2]|0;f[L+(K<<2)>>2]=(p|0)<(I|0)?I:p;T=L}K=K+1|0}while((K|0)<(f[g>>2]|0));U=T}else U=f[s>>2]|0;K=(f[G+(A<<2)>>2]|0)-(f[U+(A<<2)>>2]|0)|0;L=J+(A<<2)|0;f[L>>2]=K;if((K|0)>=(f[u>>2]|0)){if((K|0)>(f[w>>2]|0)){V=K-(f[v>>2]|0)|0;R=40}}else{V=(f[v>>2]|0)+K|0;R=40}if((R|0)==40){R=0;f[L>>2]=V}A=A+1|0;H=f[g>>2]|0;if((A|0)>=(H|0))break;else F=U}}if((B|0)<=2)break a;D=f[i>>2]|0;F=C+-1|0;if((f[l>>2]|0)-D>>2>>>0<=F>>>0)break;else{H=C;C=F;B=H}}aq(i)}while(0);if((e|0)>0)sj(j|0,0,e<<2|0)|0;e=f[g>>2]|0;if((e|0)<=0){Mq(k);Mq(j);return 1}i=a+16|0;B=a+32|0;C=a+12|0;D=a+28|0;l=a+20|0;U=a+24|0;a=0;V=j;T=e;while(1){if((T|0)>0){e=0;do{S=f[V+(e<<2)>>2]|0;P=f[i>>2]|0;if((S|0)>(P|0)){Q=f[B>>2]|0;f[Q+(e<<2)>>2]=P;W=Q}else{Q=f[C>>2]|0;P=f[B>>2]|0;f[P+(e<<2)>>2]=(S|0)<(Q|0)?Q:S;W=P}e=e+1|0}while((e|0)<(f[g>>2]|0));Y=W}else Y=f[B>>2]|0;e=(f[b+(a<<2)>>2]|0)-(f[Y+(a<<2)>>2]|0)|0;P=c+(a<<2)|0;f[P>>2]=e;if((e|0)>=(f[D>>2]|0)){if((e|0)>(f[U>>2]|0)){Z=e-(f[l>>2]|0)|0;R=70}}else{Z=(f[l>>2]|0)+e|0;R=70}if((R|0)==70){R=0;f[P>>2]=Z}a=a+1|0;T=f[g>>2]|0;if((a|0)>=(T|0))break;else V=Y}Mq(k);Mq(j);return 1}function qc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0;e=u;u=u+64|0;d=e+48|0;h=e+40|0;i=e+32|0;j=e+16|0;k=e+8|0;l=e;m=e+28|0;n=a+8|0;o=f[n>>2]|0;if((o+-2|0)>>>0<=28){f[a+72>>2]=o;p=1<>2]=p+-1;o=p+-2|0;f[a+80>>2]=o;f[a+84>>2]=(o|0)/2|0}o=a+40|0;f[a+48>>2]=g;g=a+88|0;tk(g);p=a+36|0;q=f[p>>2]|0;r=(f[q+4>>2]|0)-(f[q>>2]|0)|0;s=r>>2;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;t=k;f[t>>2]=0;f[t+4>>2]=0;t=l;f[t>>2]=0;f[t+4>>2]=0;if((r|0)<=0){u=e;return 1}r=j+4|0;t=j+8|0;v=a+84|0;w=a+80|0;x=h+4|0;y=i+4|0;z=d+4|0;A=k+4|0;B=h+4|0;C=i+4|0;D=d+4|0;E=l+4|0;F=a+76|0;a=k+4|0;G=l+4|0;H=f[q>>2]|0;if((f[q+4>>2]|0)==(H|0)){J=q;aq(J)}else{K=0;L=H}while(1){f[m>>2]=f[L+(K<<2)>>2];f[d>>2]=f[m>>2];ic(o,d,j);H=f[j>>2]|0;q=(H|0)>-1?H:0-H|0;M=f[r>>2]|0;N=(M|0)>-1?M:0-M|0;O=Vn(N|0,((N|0)<0)<<31>>31|0,q|0,((q|0)<0)<<31>>31|0)|0;q=f[t>>2]|0;N=(q|0)>-1;P=N?q:0-q|0;q=Vn(O|0,I|0,P|0,((P|0)<0)<<31>>31|0)|0;P=I;if((q|0)==0&(P|0)==0){O=f[v>>2]|0;Q=O;R=j;S=M;T=O}else{O=f[v>>2]|0;U=((O|0)<0)<<31>>31;V=un(O|0,U|0,H|0,((H|0)<0)<<31>>31|0)|0;H=Ik(V|0,I|0,q|0,P|0)|0;f[j>>2]=H;V=un(O|0,U|0,M|0,((M|0)<0)<<31>>31|0)|0;M=Ik(V|0,I|0,q|0,P|0)|0;f[r>>2]=M;P=O-((H|0)>-1?H:0-H|0)-((M|0)>-1?M:0-M|0)|0;Q=N?P:0-P|0;R=t;S=M;T=O}f[R>>2]=Q;O=f[j>>2]|0;do if((O|0)<=-1){if((S|0)<0){M=f[t>>2]|0;W=(M|0)>-1?M:0-M|0;X=M}else{M=f[t>>2]|0;W=(f[w>>2]|0)-((M|0)>-1?M:0-M|0)|0;X=M}if((X|0)<0){Y=(S|0)>-1?S:0-S|0;Z=W;_=X;break}else{Y=(f[w>>2]|0)-((S|0)>-1?S:0-S|0)|0;Z=W;_=X;break}}else{M=f[t>>2]|0;Y=M+T|0;Z=T+S|0;_=M}while(0);M=(Z|0)==0;P=(Y|0)==0;N=f[w>>2]|0;do if(Y|Z){H=(N|0)==(Y|0);if(!(M&H)){q=(N|0)==(Z|0);if(!(P&q)){if(M&(T|0)<(Y|0)){$=0;aa=(T<<1)-Y|0;break}if(q&(T|0)>(Y|0)){$=Z;aa=(T<<1)-Y|0;break}if(H&(T|0)>(Z|0)){$=(T<<1)-Z|0;aa=Y;break}if(P){$=(T|0)<(Z|0)?(T<<1)-Z|0:Z;aa=0}else{$=Z;aa=Y}}else{$=Z;aa=Z}}else{$=Y;aa=Y}}else{$=N;aa=N}while(0);P=0-S|0;M=0-_|0;f[j>>2]=0-O;f[r>>2]=P;f[t>>2]=M;if((O|0)<1){ba=T-_|0;ca=T-S|0}else{H=(_|0)<1?M:_;M=(S|0)<1?P:S;ba=(_|0)>0?M:N-M|0;ca=(S|0)>0?H:N-H|0}H=(ca|0)==0;M=(ba|0)==0;do if(((ba|ca|0)!=0?(P=(N|0)==(ba|0),!(H&P)):0)?(q=(N|0)==(ca|0),!(M&q)):0){if(H&(T|0)<(ba|0)){da=0;ea=(T<<1)-ba|0;break}if(q&(T|0)>(ba|0)){da=N;ea=(T<<1)-ba|0;break}if(P&(T|0)>(ca|0)){da=(T<<1)-ca|0;ea=N;break}if(M){da=(T|0)<(ca|0)?(T<<1)-ca|0:ca;ea=0}else{da=ca;ea=ba}}else{da=N;ea=N}while(0);N=K<<1;M=b+(N<<2)|0;H=M+4|0;O=f[H>>2]|0;f[h>>2]=f[M>>2];f[x>>2]=O;f[i>>2]=$;f[y>>2]=aa;Od(d,n,h,i);O=f[d>>2]|0;f[k>>2]=O;P=f[z>>2]|0;f[A>>2]=P;q=f[H>>2]|0;f[h>>2]=f[M>>2];f[B>>2]=q;f[i>>2]=da;f[C>>2]=ea;Od(d,n,h,i);q=f[d>>2]|0;f[l>>2]=q;M=f[D>>2]|0;f[E>>2]=M;H=f[v>>2]|0;if((H|0)>=(O|0))if((O|0)<(0-H|0))fa=(f[F>>2]|0)+O|0;else fa=O;else fa=O-(f[F>>2]|0)|0;f[k>>2]=fa;if((H|0)>=(P|0))if((P|0)<(0-H|0))ga=(f[F>>2]|0)+P|0;else ga=P;else ga=P-(f[F>>2]|0)|0;f[a>>2]=ga;if((H|0)>=(q|0))if((q|0)<(0-H|0))ha=(f[F>>2]|0)+q|0;else ha=q;else ha=q-(f[F>>2]|0)|0;f[l>>2]=ha;if((H|0)>=(M|0))if((M|0)<(0-H|0))ia=(f[F>>2]|0)+M|0;else ia=M;else ia=M-(f[F>>2]|0)|0;f[G>>2]=ia;if((((ga|0)>-1?ga:0-ga|0)+((fa|0)>-1?fa:0-fa|0)|0)<(((ha|0)>-1?ha:0-ha|0)+((ia|0)>-1?ia:0-ia|0)|0)){fj(g,0);ja=k}else{fj(g,1);ja=l}M=f[ja>>2]|0;if((M|0)<0)ka=(f[F>>2]|0)+M|0;else ka=M;M=c+(N<<2)|0;f[M>>2]=ka;N=f[ja+4>>2]|0;if((N|0)<0)la=(f[F>>2]|0)+N|0;else la=N;f[M+4>>2]=la;K=K+1|0;if((K|0)>=(s|0)){ma=5;break}M=f[p>>2]|0;L=f[M>>2]|0;if((f[M+4>>2]|0)-L>>2>>>0<=K>>>0){J=M;ma=6;break}}if((ma|0)==5){u=e;return 1}else if((ma|0)==6)aq(J);return 0}function rc(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0;c=u;u=u+48|0;d=c+24|0;e=c+12|0;g=c;if(!b){h=0;u=c;return h|0}i=a+12|0;j=a+4|0;k=f[j>>2]|0;l=f[a>>2]|0;m=k-l>>2;n=a+16|0;o=f[n>>2]|0;p=f[i>>2]|0;q=o-p>>2;r=p;p=o;if(m>>>0<=q>>>0)if(m>>>0>>0?(o=r+(m<<2)|0,(o|0)!=(p|0)):0){f[n>>2]=p+(~((p+-4-o|0)>>>2)<<2);s=l;t=k}else{s=l;t=k}else{Ch(i,m-q|0,6140);s=f[a>>2]|0;t=f[j>>2]|0}f[d>>2]=0;q=d+4|0;f[q>>2]=0;f[d+8>>2]=0;gk(d,t-s>>2);s=f[j>>2]|0;t=f[a>>2]|0;if((s|0)==(t|0)){v=s;w=s}else{m=f[d>>2]|0;k=m;l=k;o=0;p=s;s=k;k=t;t=m;while(1){m=f[k+(o<<2)>>2]|0;n=f[q>>2]|0;if(m>>>0>2>>>0){x=l;y=s;z=k;A=p}else{r=m+1|0;f[e>>2]=0;B=n-t>>2;C=t;D=n;if(r>>>0<=B>>>0)if(r>>>0>>0?(n=C+(r<<2)|0,(n|0)!=(D|0)):0){f[q>>2]=D+(~((D+-4-n|0)>>>2)<<2);E=l;F=p;G=k}else{E=l;F=p;G=k}else{Ch(d,r-B|0,e);E=f[d>>2]|0;F=f[j>>2]|0;G=f[a>>2]|0}x=E;y=E;z=G;A=F}B=y+(m<<2)|0;f[B>>2]=(f[B>>2]|0)+1;o=o+1|0;if(o>>>0>=A-z>>2>>>0){v=z;w=A;break}else{l=x;p=A;s=y;k=z;t=y}}}y=w-v|0;v=y>>2;f[e>>2]=0;w=e+4|0;f[w>>2]=0;f[e+8>>2]=0;if(!v){H=0;I=0}else{if(v>>>0>536870911)aq(e);t=ln(y<<1)|0;f[w>>2]=t;f[e>>2]=t;y=t+(v<<3)|0;f[e+8>>2]=y;z=v;v=t;k=t;while(1){s=v;f[s>>2]=-1;f[s+4>>2]=-1;s=k+8|0;A=z+-1|0;if(!A)break;else{z=A;v=s;k=s}}f[w>>2]=y;H=t;I=t}t=f[q>>2]|0;y=f[d>>2]|0;k=t-y|0;v=k>>2;f[g>>2]=0;z=g+4|0;f[z>>2]=0;f[g+8>>2]=0;s=y;do if(v)if(v>>>0>1073741823)aq(g);else{A=ln(k)|0;f[g>>2]=A;p=A+(v<<2)|0;f[g+8>>2]=p;sj(A|0,0,k|0)|0;f[z>>2]=p;J=A;K=p;L=A;break}else{J=0;K=0;L=0}while(0);if((t|0)!=(y|0)){y=0;t=0;while(1){f[J+(t<<2)>>2]=y;k=t+1|0;if(k>>>0>>0){y=(f[s+(t<<2)>>2]|0)+y|0;t=k}else break}}t=f[j>>2]|0;j=f[a>>2]|0;y=j;if((t|0)!=(j|0)){k=a+40|0;a=t-j>>2;j=H;t=H;g=H;A=H;p=H;x=H;l=0;o=J;while(1){F=f[y+(l<<2)>>2]|0;G=l+1|0;E=((G>>>0)%3|0|0)==0?l+-2|0:G;if((E|0)==-1)M=-1;else M=f[y+(E<<2)>>2]|0;E=((l>>>0)%3|0|0)==0;G=(E?2:-1)+l|0;if((G|0)==-1)N=-1;else N=f[y+(G<<2)>>2]|0;if(E?(M|0)==(N|0)|((F|0)==(M|0)|(F|0)==(N|0)):0){f[k>>2]=(f[k>>2]|0)+1;O=j;P=t;Q=g;R=A;S=p;T=x;U=l+2|0;V=o}else W=51;a:do if((W|0)==51){W=0;E=f[s+(N<<2)>>2]|0;b:do if((E|0)>0){G=0;B=f[o+(N<<2)>>2]|0;while(1){m=f[p+(B<<3)>>2]|0;if((m|0)==-1){X=j;Y=t;Z=A;_=p;break b}if((m|0)==(M|0)){m=f[p+(B<<3)+4>>2]|0;if((m|0)==-1)$=-1;else $=f[y+(m<<2)>>2]|0;if((F|0)!=($|0))break}m=G+1|0;if((m|0)<(E|0)){G=m;B=B+1|0}else{X=j;Y=t;Z=A;_=p;break b}}m=f[A+(B<<3)+4>>2]|0;r=G;n=B;D=t;while(1){r=r+1|0;if((r|0)>=(E|0))break;C=n+1|0;f[D+(n<<3)>>2]=f[D+(C<<3)>>2];f[D+(n<<3)+4>>2]=f[D+(C<<3)+4>>2];if((f[j+(n<<3)>>2]|0)==-1)break;else{n=C;D=j}}f[g+(n<<3)>>2]=-1;if((m|0)==-1){X=g;Y=g;Z=g;_=g}else{D=f[i>>2]|0;f[D+(l<<2)>>2]=m;f[D+(m<<2)>>2]=l;O=g;P=g;Q=g;R=g;S=g;T=x;U=l;V=o;break a}}else{X=j;Y=t;Z=A;_=p}while(0);E=f[s+(M<<2)>>2]|0;if((E|0)>0){D=0;r=f[J+(M<<2)>>2]|0;while(1){aa=x+(r<<3)|0;if((f[aa>>2]|0)==-1)break;D=D+1|0;if((D|0)>=(E|0)){O=x;P=x;Q=x;R=x;S=x;T=x;U=l;V=J;break a}else r=r+1|0}f[aa>>2]=N;f[H+(r<<3)+4>>2]=l;O=H;P=H;Q=H;R=H;S=H;T=H;U=l;V=J}else{O=X;P=Y;Q=g;R=Z;S=_;T=x;U=l;V=o}}while(0);l=U+1|0;if(l>>>0>=a>>>0)break;else{j=O;t=P;g=Q;A=R;p=S;x=T;o=V}}}f[b>>2]=v;if(!J){ba=H;ca=I}else{if((K|0)!=(J|0))f[z>>2]=K+(~((K+-4-J|0)>>>2)<<2);Oq(L);L=f[e>>2]|0;ba=L;ca=L}if(ba|0){L=f[w>>2]|0;if((L|0)!=(ba|0))f[w>>2]=L+(~((L+-8-ba|0)>>>3)<<3);Oq(ca)}ca=f[d>>2]|0;if(ca|0){d=f[q>>2]|0;if((d|0)!=(ca|0))f[q>>2]=d+(~((d+-4-ca|0)>>>2)<<2);Oq(ca)}h=1;u=c;return h|0}function sc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=Oa,S=Oa,T=Oa,U=0,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0;e=u;u=u+48|0;g=e+12|0;h=e+35|0;i=e+32|0;j=e;k=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[k>>2]=$(1.0);l=a+80|0;m=f[l>>2]|0;f[j>>2]=0;o=j+4|0;f[o>>2]=0;f[j+8>>2]=0;if(m){if(m>>>0>1073741823)aq(j);p=m<<2;q=ln(p)|0;f[j>>2]=q;r=q+(m<<2)|0;f[j+8>>2]=r;sj(q|0,0,p|0)|0;f[o>>2]=r;r=f[d>>2]|0;d=c+48|0;p=c+40|0;q=i+1|0;m=i+2|0;s=g+4|0;t=g+12|0;v=g+8|0;w=a+40|0;x=a+64|0;y=0;z=0;while(1){A=d;B=f[A>>2]|0;C=f[A+4>>2]|0;A=p;D=un(f[A>>2]|0,f[A+4>>2]|0,r+y|0,0)|0;A=Vn(D|0,I|0,B|0,C|0)|0;C=(f[f[c>>2]>>2]|0)+A|0;b[h>>0]=b[C>>0]|0;b[h+1>>0]=b[C+1>>0]|0;b[h+2>>0]=b[C+2>>0]|0;im(i|0,C|0,3)|0;C=jg(g,i)|0;if(!C){A=b[i>>0]|0;B=b[q>>0]|0;D=b[m>>0]|0;E=((A&255^318)+239^B&255)+239^D&255;F=f[s>>2]|0;G=(F|0)==0;a:do if(!G){H=F+-1|0;J=(H&F|0)==0;if(!J)if(E>>>0>>0)K=E;else K=(E>>>0)%(F>>>0)|0;else K=E&H;L=f[(f[g>>2]|0)+(K<<2)>>2]|0;if((L|0)!=0?(M=f[L>>2]|0,(M|0)!=0):0){if(J){J=M;while(1){L=f[J+4>>2]|0;if(!((L|0)==(E|0)|(L&H|0)==(K|0))){N=K;O=29;break a}L=J+8|0;if(((b[L>>0]|0)==A<<24>>24?(b[L+1>>0]|0)==B<<24>>24:0)?(b[L+2>>0]|0)==D<<24>>24:0)break a;J=f[J>>2]|0;if(!J){N=K;O=29;break a}}}else P=M;while(1){J=f[P+4>>2]|0;if((J|0)!=(E|0)){if(J>>>0>>0)Q=J;else Q=(J>>>0)%(F>>>0)|0;if((Q|0)!=(K|0)){N=K;O=29;break a}}J=P+8|0;if(((b[J>>0]|0)==A<<24>>24?(b[J+1>>0]|0)==B<<24>>24:0)?(b[J+2>>0]|0)==D<<24>>24:0)break a;P=f[P>>2]|0;if(!P){N=K;O=29;break}}}else{N=K;O=29}}else{N=0;O=29}while(0);if((O|0)==29){O=0;M=ln(16)|0;b[M+8>>0]=A;b[M+9>>0]=B;b[M+10>>0]=D;f[M+12>>2]=z;f[M+4>>2]=E;f[M>>2]=0;R=$(((f[t>>2]|0)+1|0)>>>0);S=$(F>>>0);T=$(n[k>>2]);do if(G|$(T*S)>>0<3|(F+-1&F|0)!=0)&1;H=~~$(W($(R/T)))>>>0;_h(g,J>>>0>>0?H:J);J=f[s>>2]|0;H=J+-1|0;if(!(H&J)){U=J;V=H&E;break}if(E>>>0>>0){U=J;V=E}else{U=J;V=(E>>>0)%(J>>>0)|0}}else{U=F;V=N}while(0);F=(f[g>>2]|0)+(V<<2)|0;E=f[F>>2]|0;if(!E){f[M>>2]=f[v>>2];f[v>>2]=M;f[F>>2]=v;F=f[M>>2]|0;if(F|0){G=f[F+4>>2]|0;F=U+-1|0;if(F&U)if(G>>>0>>0)X=G;else X=(G>>>0)%(U>>>0)|0;else X=G&F;Y=(f[g>>2]|0)+(X<<2)|0;O=42}}else{f[M>>2]=f[E>>2];Y=E;O=42}if((O|0)==42){O=0;f[Y>>2]=M}f[t>>2]=(f[t>>2]|0)+1}E=w;F=f[E>>2]|0;G=un(F|0,f[E+4>>2]|0,z|0,0)|0;kh((f[f[x>>2]>>2]|0)+G|0,h|0,F|0)|0;F=f[j>>2]|0;f[F+(y<<2)>>2]=z;Z=z+1|0;_=F}else{F=f[j>>2]|0;f[F+(y<<2)>>2]=f[C+12>>2];Z=z;_=F}y=y+1|0;aa=f[l>>2]|0;if(y>>>0>=aa>>>0)break;else z=Z}if((Z|0)==(aa|0))ba=_;else{z=a+84|0;if(!(b[z>>0]|0)){y=f[a+72>>2]|0;h=f[a+68>>2]|0;x=h;if((y|0)==(h|0))ca=_;else{w=y-h>>2;h=0;do{y=x+(h<<2)|0;f[y>>2]=f[_+(f[y>>2]<<2)>>2];h=h+1|0}while(h>>>0>>0);ca=_}}else{b[z>>0]=0;z=a+68|0;_=a+72|0;w=f[_>>2]|0;h=f[z>>2]|0;x=w-h>>2;y=h;h=w;if(aa>>>0<=x>>>0)if(aa>>>0>>0?(w=y+(aa<<2)|0,(w|0)!=(h|0)):0){f[_>>2]=h+(~((h+-4-w|0)>>>2)<<2);da=aa}else da=aa;else{Ch(z,aa-x|0,1220);da=f[l>>2]|0}x=f[j>>2]|0;if(!da)ca=x;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[x+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);ca=x}}f[l>>2]=Z;ba=ca}if(!ba)ea=Z;else{ca=f[o>>2]|0;if((ca|0)!=(ba|0))f[o>>2]=ca+(~((ca+-4-ba|0)>>>2)<<2);Oq(ba);ea=Z}}else ea=0;Z=f[g+8>>2]|0;if(Z|0){ba=Z;do{Z=ba;ba=f[ba>>2]|0;Oq(Z)}while((ba|0)!=0)}ba=f[g>>2]|0;f[g>>2]=0;if(!ba){u=e;return ea|0}Oq(ba);u=e;return ea|0}function tc(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0;e=u;u=u+64|0;d=e+48|0;h=e+40|0;i=e+32|0;j=e+16|0;k=e+8|0;l=e;m=e+28|0;n=a+8|0;o=f[n>>2]|0;if((o+-2|0)>>>0<=28){f[a+72>>2]=o;p=1<>2]=p+-1;o=p+-2|0;f[a+80>>2]=o;f[a+84>>2]=(o|0)/2|0}o=a+40|0;f[a+48>>2]=g;g=a+88|0;tk(g);p=a+36|0;q=f[p>>2]|0;r=(f[q+4>>2]|0)-(f[q>>2]|0)|0;s=r>>2;f[j>>2]=0;f[j+4>>2]=0;f[j+8>>2]=0;t=k;f[t>>2]=0;f[t+4>>2]=0;t=l;f[t>>2]=0;f[t+4>>2]=0;if((r|0)<=0){u=e;return 1}r=j+4|0;t=j+8|0;v=a+84|0;w=a+80|0;x=h+4|0;y=i+4|0;z=d+4|0;A=k+4|0;B=h+4|0;C=i+4|0;D=d+4|0;E=l+4|0;F=a+76|0;a=k+4|0;G=l+4|0;H=f[q>>2]|0;if((f[q+4>>2]|0)==(H|0)){J=q;aq(J)}else{K=0;L=H}while(1){f[m>>2]=f[L+(K<<2)>>2];f[d>>2]=f[m>>2];$b(o,d,j);H=f[j>>2]|0;q=(H|0)>-1?H:0-H|0;M=f[r>>2]|0;N=(M|0)>-1?M:0-M|0;O=Vn(N|0,((N|0)<0)<<31>>31|0,q|0,((q|0)<0)<<31>>31|0)|0;q=f[t>>2]|0;N=(q|0)>-1;P=N?q:0-q|0;q=Vn(O|0,I|0,P|0,((P|0)<0)<<31>>31|0)|0;P=I;if((q|0)==0&(P|0)==0){O=f[v>>2]|0;Q=O;R=j;S=M;T=O}else{O=f[v>>2]|0;U=((O|0)<0)<<31>>31;V=un(O|0,U|0,H|0,((H|0)<0)<<31>>31|0)|0;H=Ik(V|0,I|0,q|0,P|0)|0;f[j>>2]=H;V=un(O|0,U|0,M|0,((M|0)<0)<<31>>31|0)|0;M=Ik(V|0,I|0,q|0,P|0)|0;f[r>>2]=M;P=O-((H|0)>-1?H:0-H|0)-((M|0)>-1?M:0-M|0)|0;Q=N?P:0-P|0;R=t;S=M;T=O}f[R>>2]=Q;O=f[j>>2]|0;do if((O|0)<=-1){if((S|0)<0){M=f[t>>2]|0;W=(M|0)>-1?M:0-M|0;X=M}else{M=f[t>>2]|0;W=(f[w>>2]|0)-((M|0)>-1?M:0-M|0)|0;X=M}if((X|0)<0){Y=(S|0)>-1?S:0-S|0;Z=W;_=X;break}else{Y=(f[w>>2]|0)-((S|0)>-1?S:0-S|0)|0;Z=W;_=X;break}}else{M=f[t>>2]|0;Y=M+T|0;Z=T+S|0;_=M}while(0);M=(Z|0)==0;P=(Y|0)==0;N=f[w>>2]|0;do if(Y|Z){H=(N|0)==(Y|0);if(!(M&H)){q=(N|0)==(Z|0);if(!(P&q)){if(M&(T|0)<(Y|0)){$=0;aa=(T<<1)-Y|0;break}if(q&(T|0)>(Y|0)){$=Z;aa=(T<<1)-Y|0;break}if(H&(T|0)>(Z|0)){$=(T<<1)-Z|0;aa=Y;break}if(P){$=(T|0)<(Z|0)?(T<<1)-Z|0:Z;aa=0}else{$=Z;aa=Y}}else{$=Z;aa=Z}}else{$=Y;aa=Y}}else{$=N;aa=N}while(0);P=0-S|0;M=0-_|0;f[j>>2]=0-O;f[r>>2]=P;f[t>>2]=M;if((O|0)<1){ba=T-_|0;ca=T-S|0}else{H=(_|0)<1?M:_;M=(S|0)<1?P:S;ba=(_|0)>0?M:N-M|0;ca=(S|0)>0?H:N-H|0}H=(ca|0)==0;M=(ba|0)==0;do if(((ba|ca|0)!=0?(P=(N|0)==(ba|0),!(H&P)):0)?(q=(N|0)==(ca|0),!(M&q)):0){if(H&(T|0)<(ba|0)){da=0;ea=(T<<1)-ba|0;break}if(q&(T|0)>(ba|0)){da=N;ea=(T<<1)-ba|0;break}if(P&(T|0)>(ca|0)){da=(T<<1)-ca|0;ea=N;break}if(M){da=(T|0)<(ca|0)?(T<<1)-ca|0:ca;ea=0}else{da=ca;ea=ba}}else{da=N;ea=N}while(0);N=K<<1;M=b+(N<<2)|0;H=M+4|0;O=f[H>>2]|0;f[h>>2]=f[M>>2];f[x>>2]=O;f[i>>2]=$;f[y>>2]=aa;Od(d,n,h,i);O=f[d>>2]|0;f[k>>2]=O;P=f[z>>2]|0;f[A>>2]=P;q=f[H>>2]|0;f[h>>2]=f[M>>2];f[B>>2]=q;f[i>>2]=da;f[C>>2]=ea;Od(d,n,h,i);q=f[d>>2]|0;f[l>>2]=q;M=f[D>>2]|0;f[E>>2]=M;H=f[v>>2]|0;if((H|0)>=(O|0))if((O|0)<(0-H|0))fa=(f[F>>2]|0)+O|0;else fa=O;else fa=O-(f[F>>2]|0)|0;f[k>>2]=fa;if((H|0)>=(P|0))if((P|0)<(0-H|0))ga=(f[F>>2]|0)+P|0;else ga=P;else ga=P-(f[F>>2]|0)|0;f[a>>2]=ga;if((H|0)>=(q|0))if((q|0)<(0-H|0))ha=(f[F>>2]|0)+q|0;else ha=q;else ha=q-(f[F>>2]|0)|0;f[l>>2]=ha;if((H|0)>=(M|0))if((M|0)<(0-H|0))ia=(f[F>>2]|0)+M|0;else ia=M;else ia=M-(f[F>>2]|0)|0;f[G>>2]=ia;if((((ga|0)>-1?ga:0-ga|0)+((fa|0)>-1?fa:0-fa|0)|0)<(((ha|0)>-1?ha:0-ha|0)+((ia|0)>-1?ia:0-ia|0)|0)){fj(g,0);ja=k}else{fj(g,1);ja=l}M=f[ja>>2]|0;if((M|0)<0)ka=(f[F>>2]|0)+M|0;else ka=M;M=c+(N<<2)|0;f[M>>2]=ka;N=f[ja+4>>2]|0;if((N|0)<0)la=(f[F>>2]|0)+N|0;else la=N;f[M+4>>2]=la;K=K+1|0;if((K|0)>=(s|0)){ma=5;break}M=f[p>>2]|0;L=f[M>>2]|0;if((f[M+4>>2]|0)-L>>2>>>0<=K>>>0){J=M;ma=6;break}}if((ma|0)==5){u=e;return 1}else if((ma|0)==6)aq(J);return 0}function uc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0,p=0,q=0,r=0,s=0,t=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=Oa,T=Oa,U=Oa,V=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0;e=u;u=u+64|0;g=e+36|0;h=e+24|0;i=e+12|0;j=e;k=g+16|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;f[g+12>>2]=0;n[k>>2]=$(1.0);l=a+80|0;m=f[l>>2]|0;f[j>>2]=0;o=j+4|0;f[o>>2]=0;f[j+8>>2]=0;if(m){if(m>>>0>1073741823)aq(j);p=m<<2;q=ln(p)|0;f[j>>2]=q;r=q+(m<<2)|0;f[j+8>>2]=r;sj(q|0,0,p|0)|0;f[o>>2]=r;r=f[d>>2]|0;d=c+48|0;p=c+40|0;q=i+4|0;m=i+8|0;s=g+4|0;t=g+12|0;v=g+8|0;w=a+40|0;x=a+64|0;y=0;z=0;while(1){A=d;B=f[A>>2]|0;C=f[A+4>>2]|0;A=p;D=un(f[A>>2]|0,f[A+4>>2]|0,r+z|0,0)|0;A=Vn(D|0,I|0,B|0,C|0)|0;C=(f[f[c>>2]>>2]|0)+A|0;A=h;B=C;D=A+12|0;do{b[A>>0]=b[B>>0]|0;A=A+1|0;B=B+1|0}while((A|0)<(D|0));im(i|0,C|0,12)|0;B=qg(g,i)|0;if(!B){A=f[i>>2]|0;D=f[q>>2]|0;E=f[m>>2]|0;F=((A^318)+239^D)+239^E;G=f[s>>2]|0;H=(G|0)==0;a:do if(!H){J=G+-1|0;K=(J&G|0)==0;if(!K)if(F>>>0>>0)L=F;else L=(F>>>0)%(G>>>0)|0;else L=F&J;M=f[(f[g>>2]|0)+(L<<2)>>2]|0;if((M|0)!=0?(N=f[M>>2]|0,(N|0)!=0):0){if(K){K=N;while(1){M=f[K+4>>2]|0;if(!((M|0)==(F|0)|(M&J|0)==(L|0))){O=L;P=29;break a}if(((f[K+8>>2]|0)==(A|0)?(f[K+12>>2]|0)==(D|0):0)?(f[K+16>>2]|0)==(E|0):0)break a;K=f[K>>2]|0;if(!K){O=L;P=29;break a}}}else Q=N;while(1){K=f[Q+4>>2]|0;if((K|0)!=(F|0)){if(K>>>0>>0)R=K;else R=(K>>>0)%(G>>>0)|0;if((R|0)!=(L|0)){O=L;P=29;break a}}if(((f[Q+8>>2]|0)==(A|0)?(f[Q+12>>2]|0)==(D|0):0)?(f[Q+16>>2]|0)==(E|0):0)break a;Q=f[Q>>2]|0;if(!Q){O=L;P=29;break}}}else{O=L;P=29}}else{O=0;P=29}while(0);if((P|0)==29){P=0;C=ln(24)|0;f[C+8>>2]=A;f[C+12>>2]=D;f[C+16>>2]=E;f[C+20>>2]=y;f[C+4>>2]=F;f[C>>2]=0;S=$(((f[t>>2]|0)+1|0)>>>0);T=$(G>>>0);U=$(n[k>>2]);do if(H|$(U*T)>>0<3|(G+-1&G|0)!=0)&1;K=~~$(W($(S/U)))>>>0;Xh(g,N>>>0>>0?K:N);N=f[s>>2]|0;K=N+-1|0;if(!(K&N)){V=N;X=K&F;break}if(F>>>0>>0){V=N;X=F}else{V=N;X=(F>>>0)%(N>>>0)|0}}else{V=G;X=O}while(0);G=(f[g>>2]|0)+(X<<2)|0;F=f[G>>2]|0;if(!F){f[C>>2]=f[v>>2];f[v>>2]=C;f[G>>2]=v;G=f[C>>2]|0;if(G|0){H=f[G+4>>2]|0;G=V+-1|0;if(G&V)if(H>>>0>>0)Y=H;else Y=(H>>>0)%(V>>>0)|0;else Y=H&G;Z=(f[g>>2]|0)+(Y<<2)|0;P=42}}else{f[C>>2]=f[F>>2];Z=F;P=42}if((P|0)==42){P=0;f[Z>>2]=C}f[t>>2]=(f[t>>2]|0)+1}F=w;G=f[F>>2]|0;H=un(G|0,f[F+4>>2]|0,y|0,0)|0;kh((f[f[x>>2]>>2]|0)+H|0,h|0,G|0)|0;G=f[j>>2]|0;f[G+(z<<2)>>2]=y;_=y+1|0;aa=G}else{G=f[j>>2]|0;f[G+(z<<2)>>2]=f[B+20>>2];_=y;aa=G}z=z+1|0;ba=f[l>>2]|0;if(z>>>0>=ba>>>0)break;else y=_}if((_|0)==(ba|0))ca=aa;else{y=a+84|0;if(!(b[y>>0]|0)){z=f[a+72>>2]|0;h=f[a+68>>2]|0;x=h;if((z|0)==(h|0))da=aa;else{w=z-h>>2;h=0;do{z=x+(h<<2)|0;f[z>>2]=f[aa+(f[z>>2]<<2)>>2];h=h+1|0}while(h>>>0>>0);da=aa}}else{b[y>>0]=0;y=a+68|0;aa=a+72|0;w=f[aa>>2]|0;h=f[y>>2]|0;x=w-h>>2;z=h;h=w;if(ba>>>0<=x>>>0)if(ba>>>0>>0?(w=z+(ba<<2)|0,(w|0)!=(h|0)):0){f[aa>>2]=h+(~((h+-4-w|0)>>>2)<<2);ea=ba}else ea=ba;else{Ch(y,ba-x|0,1220);ea=f[l>>2]|0}x=f[j>>2]|0;if(!ea)da=x;else{j=f[a+68>>2]|0;a=0;do{f[j+(a<<2)>>2]=f[x+(a<<2)>>2];a=a+1|0}while(a>>>0>>0);da=x}}f[l>>2]=_;ca=da}if(!ca)fa=_;else{da=f[o>>2]|0;if((da|0)!=(ca|0))f[o>>2]=da+(~((da+-4-ca|0)>>>2)<<2);Oq(ca);fa=_}}else fa=0;_=f[g+8>>2]|0;if(_|0){ca=_;do{_=ca;ca=f[ca>>2]|0;Oq(_)}while((ca|0)!=0)}ca=f[g>>2]|0;f[g>>2]=0;if(!ca){u=e;return fa|0}Oq(ca);u=e;return fa|0} +function di(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=u;u=u+16|0;e=d;Je(e,a+40|0,f[a+8>>2]|0,b,c);gj(a,e);a=f[e>>2]|0;f[e>>2]=0;if(!a){u=d;return 1}e=a+88|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0){e=f[c+8>>2]|0;if(e|0){b=c+12|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;Oq(e)}Oq(c)}c=f[a+68>>2]|0;if(c|0){e=a+72|0;b=f[e>>2]|0;if((b|0)!=(c|0))f[e>>2]=b+(~((b+-4-c|0)>>>2)<<2);Oq(c)}c=a+64|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0){c=f[b>>2]|0;if(c|0){e=b+4|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;Oq(c)}Oq(b)}Oq(a);u=d;return 1}function ei(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Bd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;Bd(a,e);return}function fi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0;e=u;u=u+48|0;g=e;h=e+32|0;if(!c){i=0;u=e;return i|0}Gn(g);if((dm(c,0)|0)!=-1?Qa[f[(f[c>>2]|0)+16>>2]&127](c)|0:0){Va[f[(f[c>>2]|0)+20>>2]&127](c);ch(h,a,c,g);c=(f[h>>2]|0)==0;a=h+4|0;if((b[a+11>>0]|0)<0)Oq(f[a>>2]|0);if(c){c=f[g>>2]|0;a=g+4|0;rg(d,c,c+((f[a>>2]|0)-c)|0);j=(f[a>>2]|0)-(f[g>>2]|0)|0}else j=0}else j=0;a=g+12|0;c=f[a>>2]|0;f[a>>2]=0;if(c|0)Oq(c);c=f[g>>2]|0;if(c|0){a=g+4|0;if((f[a>>2]|0)!=(c|0))f[a>>2]=c;Oq(c)}i=j;u=e;return i|0}function gi(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=u;u=u+16|0;e=d;Fe(e,a+40|0,f[a+8>>2]|0,b,c);gj(a,e);a=f[e>>2]|0;f[e>>2]=0;if(!a){u=d;return 1}e=a+88|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0){e=f[c+8>>2]|0;if(e|0){b=c+12|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;Oq(e)}Oq(c)}c=f[a+68>>2]|0;if(c|0){e=a+72|0;b=f[e>>2]|0;if((b|0)!=(c|0))f[e>>2]=b+(~((b+-4-c|0)>>>2)<<2);Oq(c)}c=a+64|0;b=f[c>>2]|0;f[c>>2]=0;if(b|0){c=f[b>>2]|0;if(c|0){e=b+4|0;if((f[e>>2]|0)!=(c|0))f[e>>2]=c;Oq(c)}Oq(b)}Oq(a);u=d;return 1}function hi(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;d=f[c>>2]|0;if((d|0)==(b|0))e=b;else{g=d;do{d=g+-4|0;f[c>>2]=d;h=f[d>>2]|0;f[d>>2]=0;if(h|0){d=h+88|0;i=f[d>>2]|0;f[d>>2]=0;if(i|0){d=f[i+8>>2]|0;if(d|0){j=i+12|0;if((f[j>>2]|0)!=(d|0))f[j>>2]=d;Oq(d)}Oq(i)}i=f[h+68>>2]|0;if(i|0){d=h+72|0;j=f[d>>2]|0;if((j|0)!=(i|0))f[d>>2]=j+(~((j+-4-i|0)>>>2)<<2);Oq(i)}i=h+64|0;j=f[i>>2]|0;f[i>>2]=0;if(j|0){i=f[j>>2]|0;if(i|0){d=j+4|0;if((f[d>>2]|0)!=(i|0))f[d>>2]=i;Oq(i)}Oq(j)}Oq(h)}g=f[c>>2]|0}while((g|0)!=(b|0));e=f[a>>2]|0}Oq(e);return}function ii(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;if(!(Ie(a,c)|0)){i=0;u=d;return i|0}j=a+36|0;k=a+40|0;a=f[j>>2]|0;if((f[k>>2]|0)==(a|0)){i=1;u=d;return i|0}l=c+16|0;m=c+4|0;n=h+1|0;o=0;p=a;do{a=f[p+(o<<2)>>2]|0;q=Qa[f[(f[a>>2]|0)+32>>2]&127](a)|0;b[h>>0]=q;q=l;a=f[q+4>>2]|0;if(!((a|0)>0|(a|0)==0&(f[q>>2]|0)>>>0>0)){f[g>>2]=f[m>>2];f[e>>2]=f[g>>2];Me(c,e,h,n)|0}o=o+1|0;p=f[j>>2]|0}while(o>>>0<(f[k>>2]|0)-p>>2>>>0);i=1;u=d;return i|0}function ji(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=u;u=u+16|0;d=c;lp(a);f[a+16>>2]=0;f[a+20>>2]=0;f[a+12>>2]=a+16;e=a+24|0;lp(e);f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;a=ln(32)|0;f[d>>2]=a;f[d+8>>2]=-2147483616;f[d+4>>2]=20;g=a;h=14538;i=g+20|0;do{b[g>>0]=b[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(i|0));b[a+20>>0]=0;Vj(e,d,1);if((b[d+11>>0]|0)<0)Oq(f[d>>2]|0);f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;a=ln(32)|0;f[d>>2]=a;f[d+8>>2]=-2147483616;f[d+4>>2]=22;g=a;h=14559;i=g+22|0;do{b[g>>0]=b[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(i|0));b[a+22>>0]=0;Vj(e,d,1);if((b[d+11>>0]|0)>=0){u=c;return}Oq(f[d>>2]|0);u=c;return}function ki(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=f[a+4>>2]|0;c=a+8|0;d=f[c>>2]|0;if((d|0)!=(b|0)){e=d;do{d=e+-4|0;f[c>>2]=d;g=f[d>>2]|0;f[d>>2]=0;if(g|0){d=g+88|0;h=f[d>>2]|0;f[d>>2]=0;if(h|0){d=f[h+8>>2]|0;if(d|0){i=h+12|0;if((f[i>>2]|0)!=(d|0))f[i>>2]=d;Oq(d)}Oq(h)}h=f[g+68>>2]|0;if(h|0){d=g+72|0;i=f[d>>2]|0;if((i|0)!=(h|0))f[d>>2]=i+(~((i+-4-h|0)>>>2)<<2);Oq(h)}h=g+64|0;i=f[h>>2]|0;f[h>>2]=0;if(i|0){h=f[i>>2]|0;if(h|0){d=i+4|0;if((f[d>>2]|0)!=(h|0))f[d>>2]=h;Oq(h)}Oq(i)}Oq(g)}e=f[c>>2]|0}while((e|0)!=(b|0))}b=f[a>>2]|0;if(!b)return;Oq(b);return}function li(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;f[g>>2]=f[a+12>>2];h=b+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&j>>>0>0){l=k;m=j}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;j=h;l=f[j+4>>2]|0;m=f[j>>2]|0}f[g>>2]=f[a+20>>2];if((l|0)>0|(l|0)==0&m>>>0>0){u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;u=c;return 1}function mi(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=u;u=u+16|0;d=c;e=ln(16)|0;f[d>>2]=e;f[d+8>>2]=-2147483632;f[d+4>>2]=14;g=e;h=14408;i=g+14|0;do{b[g>>0]=b[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(i|0));b[e+14>>0]=0;e=Hk(a,d,-1)|0;if((b[d+11>>0]|0)<0)Oq(f[d>>2]|0);j=ln(16)|0;f[d>>2]=j;f[d+8>>2]=-2147483632;f[d+4>>2]=14;g=j;h=14423;i=g+14|0;do{b[g>>0]=b[h>>0]|0;g=g+1|0;h=h+1|0}while((g|0)<(i|0));b[j+14>>0]=0;j=Hk(a,d,-1)|0;if((b[d+11>>0]|0)>=0){k=(e|0)<(j|0);l=k?j:e;m=(l|0)==-1;n=m?5:l;u=c;return n|0}Oq(f[d>>2]|0);k=(e|0)<(j|0);l=k?j:e;m=(l|0)==-1;n=m?5:l;u=c;return n|0}function ni(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+16|0;d=c+8|0;e=c+4|0;g=c;f[g>>2]=f[a+12>>2];h=b+16|0;i=h;j=f[i>>2]|0;k=f[i+4>>2]|0;if((k|0)>0|(k|0)==0&j>>>0>0){l=k;m=j}else{f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;j=h;l=f[j+4>>2]|0;m=f[j>>2]|0}f[g>>2]=f[a+16>>2];if((l|0)>0|(l|0)==0&m>>>0>0){u=c;return 1}f[e>>2]=f[b+4>>2];f[d>>2]=f[e>>2];Me(b,d,g,g+4|0)|0;u=c;return 1}function oi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=ln(32)|0;f[a>>2]=g;f[a+4>>2]=c+8;c=a+8|0;b[c>>0]=0;h=g+8|0;f[h>>2]=f[e>>2];f[h+4>>2]=f[e+4>>2];f[h+8>>2]=f[e+8>>2];f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;h=g+20|0;i=e+12|0;f[h>>2]=0;f[g+24>>2]=0;f[g+28>>2]=0;g=e+16|0;e=f[g>>2]|0;j=f[i>>2]|0;k=e-j|0;if(!k){l=j;m=e;n=0}else{Fi(h,k);l=f[i>>2]|0;m=f[g>>2]|0;n=f[h>>2]|0}kh(n|0,l|0,m-l|0)|0;b[c>>0]=1;c=f[a>>2]|0;f[c+4>>2]=d;f[c>>2]=0;return}function pi(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0;b=a+32|0;ld(a,b);c=a+80|0;d=f[c>>2]|0;if((d|0?(e=a+84|0,(f[e>>2]|0)>0):0)?(ld(d,b),(f[e>>2]|0)>1):0){d=1;do{ld((f[c>>2]|0)+(d<<5)|0,b);d=d+1|0}while((d|0)<(f[e>>2]|0))}e=a+136|0;d=a+140|0;a=f[e>>2]|0;if((f[d>>2]|0)==(a|0))return;c=0;g=a;while(1){a=g;ci((f[a+(c*12|0)+4>>2]|0)-(f[a+(c*12|0)>>2]|0)>>2,b)|0;a=f[e>>2]|0;h=f[a+(c*12|0)>>2]|0;i=(f[a+(c*12|0)+4>>2]|0)-h>>2;if(!i)j=a;else{Mc(h,i,1,0,b)|0;j=f[e>>2]|0}c=c+1|0;if(c>>>0>=(((f[d>>2]|0)-j|0)/12|0)>>>0)break;else g=j}return}function qi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=d+16|0;g=f[e>>2]|0;if(!g)if(!(vl(d)|0)){h=f[e>>2]|0;i=5}else j=0;else{h=g;i=5}a:do if((i|0)==5){g=d+20|0;e=f[g>>2]|0;k=e;if((h-e|0)>>>0>>0){j=Sa[f[d+36>>2]&31](d,a,c)|0;break}b:do if((b[d+75>>0]|0)>-1){e=c;while(1){if(!e){l=0;m=a;n=c;o=k;break b}p=e+-1|0;if((b[a+p>>0]|0)==10)break;else e=p}p=Sa[f[d+36>>2]&31](d,a,e)|0;if(p>>>0>>0){j=p;break a}l=e;m=a+e|0;n=c-e|0;o=f[g>>2]|0}else{l=0;m=a;n=c;o=k}while(0);kh(o|0,m|0,n|0)|0;f[g>>2]=(f[g>>2]|0)+n;j=l+n|0}while(0);return j|0}function ri(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+12|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d+28>>2]|0;if(c|0){e=c;do{c=e;e=f[e>>2]|0;ri(c+8|0);Oq(c)}while((e|0)!=0)}e=d+20|0;c=f[e>>2]|0;f[e>>2]=0;if(c|0)Oq(c);c=f[d+8>>2]|0;if(c|0){e=c;do{c=e;e=f[e>>2]|0;g=c+8|0;h=f[c+20>>2]|0;if(h|0){i=c+24|0;if((f[i>>2]|0)!=(h|0))f[i>>2]=h;Oq(h)}if((b[g+11>>0]|0)<0)Oq(f[g>>2]|0);Oq(c)}while((e|0)!=0)}e=f[d>>2]|0;f[d>>2]=0;if(e|0)Oq(e);Oq(d)}if((b[a+11>>0]|0)>=0)return;Oq(f[a>>2]|0);return}function si(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,o=0;g=u;u=u+32|0;h=g+12|0;i=g;f[h>>2]=0;f[h+4>>2]=0;f[h+8>>2]=0;if((e|0)>0){j=i+11|0;k=i+4|0;l=0;do{if((l|0)>0)An(h,14477)|0;il(i,$(n[d+(l<<2)>>2]));m=b[j>>0]|0;o=m<<24>>24<0;lj(h,o?f[i>>2]|0:i,o?f[k>>2]|0:m&255)|0;if((b[j>>0]|0)<0)Oq(f[i>>2]|0);l=l+1|0}while((l|0)<(e|0))}am(Ai(a,c)|0,h)|0;if((b[h+11>>0]|0)>=0){u=g;return}Oq(f[h>>2]|0);u=g;return}function ti(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=u;u=u+16|0;d=c;if((Qa[f[(f[b>>2]|0)+20>>2]&127](b)|0)<=0){e=1;u=c;return e|0}g=a+4|0;h=a+20|0;i=a+24|0;j=a+16|0;a=0;while(1){k=f[(f[g>>2]|0)+4>>2]|0;l=dm(k,Ra[f[(f[b>>2]|0)+24>>2]&127](b,a)|0)|0;f[d>>2]=l;if((l|0)==-1)break;k=f[h>>2]|0;if((k|0)==(f[i>>2]|0))Ri(j,d);else{f[k>>2]=l;f[h>>2]=k+4}gl(f[g>>2]|0,f[d>>2]|0)|0;a=a+1|0;if((a|0)>=(Qa[f[(f[b>>2]|0)+20>>2]&127](b)|0)){e=1;m=9;break}}if((m|0)==9){u=c;return e|0}e=0;u=c;return e|0}function ui(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;f[a>>2]=1292;hi(a+60|0);b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=a+36|0;d=f[b>>2]|0;if(d|0){c=a+40|0;e=f[c>>2]|0;if((e|0)==(d|0))g=d;else{h=e;do{e=h+-24|0;f[c>>2]=e;Va[f[f[e>>2]>>2]&127](e);h=f[c>>2]|0}while((h|0)!=(d|0));g=f[b>>2]|0}Oq(g)}f[a>>2]=1232;g=f[a+16>>2]|0;if(g|0){b=a+20|0;d=f[b>>2]|0;if((d|0)!=(g|0))f[b>>2]=d+(~((d+-4-g|0)>>>2)<<2);Oq(g)}g=f[a+4>>2]|0;if(!g)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(g|0))f[d>>2]=a+(~((a+-4-g|0)>>>2)<<2);Oq(g);return}function vi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=u;u=u+32|0;d=c+16|0;e=c+8|0;g=c;h=a+8|0;if(f[h>>2]<<5>>>0>=b>>>0){u=c;return}f[d>>2]=0;i=d+4|0;f[i>>2]=0;j=d+8|0;f[j>>2]=0;if((b|0)<0)aq(d);k=((b+-1|0)>>>5)+1|0;b=ln(k<<2)|0;f[d>>2]=b;f[i>>2]=0;f[j>>2]=k;k=f[a>>2]|0;f[e>>2]=k;f[e+4>>2]=0;b=a+4|0;l=f[b>>2]|0;f[g>>2]=k+(l>>>5<<2);f[g+4>>2]=l&31;zg(d,e,g);g=f[a>>2]|0;f[a>>2]=f[d>>2];f[d>>2]=g;d=f[b>>2]|0;f[b>>2]=f[i>>2];f[i>>2]=d;d=f[h>>2]|0;f[h>>2]=f[j>>2];f[j>>2]=d;if(g|0)Oq(g);u=c;return}function wi(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;b=a+136|0;c=f[b>>2]|0;if(c|0){d=a+140|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e;while(1){e=h+-12|0;f[d>>2]=e;i=f[e>>2]|0;if(!i)j=e;else{e=h+-8|0;k=f[e>>2]|0;if((k|0)!=(i|0))f[e>>2]=k+(~((k+-4-i|0)>>>2)<<2);Oq(i);j=f[d>>2]|0}if((j|0)==(c|0))break;else h=j}g=f[b>>2]|0}Oq(g)}g=f[a+104>>2]|0;if(g|0){b=a+108|0;j=f[b>>2]|0;if((j|0)!=(g|0))f[b>>2]=j+(~((j+-4-g|0)>>>2)<<2);Oq(g)}g=f[a+92>>2]|0;if(!g){uj(a);return}j=a+96|0;b=f[j>>2]|0;if((b|0)!=(g|0))f[j>>2]=b+(~((b+-4-g|0)>>>2)<<2);Oq(g);uj(a);return}function xi(a){a=a|0;var c=0,d=0,e=0,g=0;f[a>>2]=3680;c=a+72|0;d=a+136|0;e=a+4|0;g=e+64|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));e=c;g=e+64|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));n[d>>2]=$(1.0);d=a+140|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;f[a+164>>2]=-1;d=a+168|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;f[d+24>>2]=0;wn(a+200|0);Gn(a+232|0);d=a+316|0;e=a+264|0;g=e+52|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));f[d>>2]=-1;f[a+320>>2]=-1;f[a+324>>2]=0;f[a+328>>2]=2;f[a+332>>2]=7;f[a+336>>2]=0;f[a+340>>2]=0;f[a+344>>2]=0;b[a+352>>0]=0;return}function yi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d|0;g=(e|0)/12|0;h=g+1|0;if(h>>>0>357913941)aq(a);i=a+8|0;j=((f[i>>2]|0)-d|0)/12|0;k=j<<1;l=j>>>0<178956970?(k>>>0>>0?h:k):357913941;do if(l)if(l>>>0>357913941){k=ra(8)|0;Oo(k,16035);f[k>>2]=7256;va(k|0,1112,110)}else{m=ln(l*12|0)|0;break}else m=0;while(0);k=m+(g*12|0)|0;f[k>>2]=f[b>>2];f[k+4>>2]=f[b+4>>2];f[k+8>>2]=f[b+8>>2];b=k+(((e|0)/-12|0)*12|0)|0;if((e|0)>0)kh(b|0,d|0,e|0)|0;f[a>>2]=b;f[c>>2]=k+12;f[i>>2]=m+(l*12|0);if(!d)return;Oq(d);return}function zi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=a+16|0;h=g;i=f[h+4>>2]|0;if((d|0)<0|(d|0)==0&c>>>0<1|((i|0)>0|(i|0)==0&(f[h>>2]|0)>>>0>0)){j=0;return j|0}b[a+24>>0]=e&1;h=Vn(c|0,d|0,7,0)|0;d=Ik(h|0,I|0,8,0)|0;h=I;c=g;f[c>>2]=d;f[c+4>>2]=h;c=a+4|0;g=f[c>>2]|0;i=f[a>>2]|0;k=g-i|0;l=Vn(k|0,0,8,0)|0;m=e?l:k;l=Vn(m|0,(e?I:0)|0,d|0,h|0)|0;h=i;i=g;if(k>>>0>=l>>>0)if(k>>>0>l>>>0?(g=h+l|0,(g|0)!=(i|0)):0){f[c>>2]=g;n=h}else n=h;else{Fi(a,l-k|0);n=f[a>>2]|0}k=ln(8)|0;f[k>>2]=n+m;f[k+4>>2]=0;m=a+12|0;a=f[m>>2]|0;f[m>>2]=k;if(!a){j=1;return j|0}Oq(a);j=1;return j|0}function Ai(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=u;u=u+16|0;d=c;e=yg(a,d,b)|0;g=f[e>>2]|0;if(g|0){h=g;i=h+28|0;u=c;return i|0}g=ln(40)|0;pj(g+16|0,b);b=g+28|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;b=f[d>>2]|0;f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=b;f[e>>2]=g;b=f[f[a>>2]>>2]|0;if(!b)j=g;else{f[a>>2]=b;j=f[e>>2]|0}Oe(f[a+4>>2]|0,j);j=a+8|0;f[j>>2]=(f[j>>2]|0)+1;h=g;i=h+28|0;u=c;return i|0}function Bi(a,c,d,e,g,h,i,j){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0;k=u;u=u+16|0;l=k;if((-18-c|0)>>>0>>0)aq(a);if((b[a+11>>0]|0)<0)m=f[a>>2]|0;else m=a;if(c>>>0<2147483623){n=d+c|0;d=c<<1;o=n>>>0>>0?d:n;p=o>>>0<11?11:o+16&-16}else p=-17;o=ln(p)|0;if(g|0)Fo(o,m,g)|0;if(i|0)Fo(o+g|0,j,i)|0;j=e-h|0;e=j-g|0;if(e|0)Fo(o+g+i|0,m+g+h|0,e)|0;if((c|0)!=10)Oq(m);f[a>>2]=o;f[a+8>>2]=p|-2147483648;p=j+i|0;f[a+4>>2]=p;b[l>>0]=0;up(o+p|0,l);u=k;return}function Ci(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+8|0;d=f[c>>2]|0;e=a+4|0;g=f[e>>2]|0;if(d-g>>2>>>0>=b>>>0){sj(g|0,0,b<<2|0)|0;f[e>>2]=g+(b<<2);return}h=f[a>>2]|0;i=g-h|0;g=i>>2;j=g+b|0;if(j>>>0>1073741823)aq(a);k=d-h|0;d=k>>1;l=k>>2>>>0<536870911?(d>>>0>>0?j:d):1073741823;do if(l)if(l>>>0>1073741823){d=ra(8)|0;Oo(d,16035);f[d>>2]=7256;va(d|0,1112,110)}else{d=ln(l<<2)|0;m=d;n=d;break}else{m=0;n=0}while(0);d=m+(g<<2)|0;sj(d|0,0,b<<2|0)|0;if((i|0)>0)kh(n|0,h|0,i|0)|0;f[a>>2]=m;f[e>>2]=d+(b<<2);f[c>>2]=m+(l<<2);if(!h)return;Oq(h);return}function Di(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=ln(32)|0;f[a>>2]=g;f[a+4>>2]=c+8;c=a+8|0;b[c>>0]=0;pj(g+8|0,e);h=g+20|0;i=e+12|0;f[h>>2]=0;f[g+24>>2]=0;f[g+28>>2]=0;g=e+16|0;e=f[g>>2]|0;j=f[i>>2]|0;k=e-j|0;if(!k){l=j;m=e;n=0}else{Fi(h,k);l=f[i>>2]|0;m=f[g>>2]|0;n=f[h>>2]|0}kh(n|0,l|0,m-l|0)|0;b[c>>0]=1;c=f[a>>2]|0;f[c+4>>2]=d;f[c>>2]=0;return}function Ei(a,c,d){a=a|0;c=c|0;d=$(d);var e=0,g=0,h=0,i=0,j=0,k=0.0,l=0,m=0,n=0,o=0;e=u;u=u+16|0;g=e;h=c+11|0;i=b[h>>0]|0;if(i<<24>>24<0)j=f[c+4>>2]|0;else j=i&255;k=+d;l=j;j=i;while(1){if(j<<24>>24<0)m=f[c>>2]|0;else m=c;p[g>>3]=k;n=Bn(m,l+1|0,18562,g)|0;if((n|0)>-1)if(n>>>0>l>>>0)o=n;else break;else o=l<<1|1;Hj(c,o,0);l=o;j=b[h>>0]|0}Hj(c,n,0);f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];a=0;while(1){if((a|0)==3)break;f[c+(a<<2)>>2]=0;a=a+1|0}u=e;return}function Fi(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;d=a+8|0;e=f[d>>2]|0;g=a+4|0;h=f[g>>2]|0;if((e-h|0)>>>0>=c>>>0){i=c;j=h;do{b[j>>0]=0;j=(f[g>>2]|0)+1|0;f[g>>2]=j;i=i+-1|0}while((i|0)!=0);return}i=f[a>>2]|0;j=h-i|0;h=j+c|0;if((h|0)<0)aq(a);k=e-i|0;i=k<<1;e=k>>>0<1073741823?(i>>>0>>0?h:i):2147483647;if(!e)l=0;else l=ln(e)|0;i=l+j|0;j=l+e|0;e=c;c=i;l=i;do{b[l>>0]=0;l=c+1|0;c=l;e=e+-1|0}while((e|0)!=0);e=f[a>>2]|0;l=(f[g>>2]|0)-e|0;h=i+(0-l)|0;if((l|0)>0)kh(h|0,e|0,l|0)|0;f[a>>2]=h;f[g>>2]=c;f[d>>2]=j;if(!e)return;Oq(e);return}function Gi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=(d-e|0)/136|0;h=d;if(g>>>0>>0){Ge(a,b-g|0);return}if(g>>>0<=b>>>0)return;g=e+(b*136|0)|0;if((g|0)==(h|0))return;else i=h;do{f[c>>2]=i+-136;h=f[i+-20>>2]|0;if(h|0){b=i+-16|0;e=f[b>>2]|0;if((e|0)!=(h|0))f[b>>2]=e+(~((e+-4-h|0)>>>2)<<2);Oq(h)}h=f[i+-32>>2]|0;if(h|0){e=i+-28|0;b=f[e>>2]|0;if((b|0)!=(h|0))f[e>>2]=b+(~((b+-4-h|0)>>>2)<<2);Oq(h)}Mi(i+-132|0);i=f[c>>2]|0}while((i|0)!=(g|0));return}function Hi(a,b){a=a|0;b=b|0;var c=0,d=Oa,e=0,g=0;if((b|0)!=1)if(!(b+-1&b))c=b;else c=cb(b)|0;else c=2;b=f[a+4>>2]|0;if(c>>>0>b>>>0){Sd(a,c);return}if(c>>>0>=b>>>0)return;d=$((f[a+12>>2]|0)>>>0);e=~~$(W($(d/$(n[a+16>>2]))))>>>0;if(b>>>0>2&(b+-1&b|0)==0)g=1<<32-(_(e+-1|0)|0);else g=cb(e)|0;e=c>>>0>>0?g:c;if(e>>>0>=b>>>0)return;Sd(a,e);return}function Ii(a){a=a|0;var b=0,c=0,d=0;b=f[a+76>>2]|0;if(b|0){c=a+80|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+64>>2]|0;if(b|0){d=a+68|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;Oq(b)}b=f[a+48>>2]|0;if(b|0){d=a+52|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+24>>2]|0;if(b|0){c=a+28|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+12>>2]|0;if(b|0){d=a+16|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a>>2]|0;if(!b)return;c=a+4|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);Oq(b);return}function Ji(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=u;u=u+16|0;g=e;h=c+11|0;i=b[h>>0]|0;if(i<<24>>24<0)j=f[c+4>>2]|0;else j=i&255;k=j;j=i;while(1){if(j<<24>>24<0)l=f[c>>2]|0;else l=c;f[g>>2]=d;m=Bn(l,k+1|0,18559,g)|0;if((m|0)>-1)if(m>>>0>k>>>0)n=m;else break;else n=k<<1|1;Hj(c,n,0);k=n;j=b[h>>0]|0}Hj(c,m,0);f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2];a=0;while(1){if((a|0)==3)break;f[c+(a<<2)>>2]=0;a=a+1|0}u=e;return}function Ki(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;b=a+8|0;c=f[b>>2]|0;if((c|0)<0){d=0;return d|0}e=a+4|0;a=f[e>>2]|0;g=a+4|0;h=f[g>>2]|0;i=f[a>>2]|0;j=h-i>>2;k=i;i=h;if(c>>>0<=j>>>0)if(c>>>0>>0?(h=k+(c<<2)|0,(h|0)!=(i|0)):0){f[g>>2]=i+(~((i+-4-h|0)>>>2)<<2);l=c}else l=c;else{Ci(a,c-j|0);l=f[b>>2]|0}if((l|0)<=0){d=1;return d|0}b=f[e>>2]|0;e=f[b>>2]|0;j=(f[b+4>>2]|0)-e>>2;c=e;e=0;while(1){if(j>>>0<=e>>>0){m=10;break}f[c+(e<<2)>>2]=e;e=e+1|0;if((e|0)>=(l|0)){d=1;m=12;break}}if((m|0)==10)aq(b);else if((m|0)==12)return d|0;return 0}function Li(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e;h=ln(16)|0;f[g>>2]=h;f[g+8>>2]=-2147483632;f[g+4>>2]=14;i=h;j=14408;k=i+14|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[h+14>>0]=0;Xj(a,g,c);if((b[g+11>>0]|0)<0)Oq(f[g>>2]|0);c=ln(16)|0;f[g>>2]=c;f[g+8>>2]=-2147483632;f[g+4>>2]=14;i=c;j=14423;k=i+14|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[c+14>>0]=0;Xj(a,g,d);if((b[g+11>>0]|0)>=0){u=e;return}Oq(f[g>>2]|0);u=e;return}function Mi(a){a=a|0;var b=0,c=0,d=0;b=f[a+84>>2]|0;if(b|0){c=a+88|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+72>>2]|0;if(b|0){d=a+76|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;Oq(b)}b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+40>>2]|0;if(b|0){c=a+44|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+28>>2]|0;if(b|0){d=a+32|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+12>>2]|0;if(b|0)Oq(b);b=f[a>>2]|0;if(!b)return;Oq(b);return}function Ni(a){a=a|0;var b=0,c=0,d=0,e=0;f[a>>2]=1352;b=a+32|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=c+88|0;d=f[b>>2]|0;f[b>>2]=0;if(d|0){b=f[d+8>>2]|0;if(b|0){e=d+12|0;if((f[e>>2]|0)!=(b|0))f[e>>2]=b;Oq(b)}Oq(d)}d=f[c+68>>2]|0;if(d|0){b=c+72|0;e=f[b>>2]|0;if((e|0)!=(d|0))f[b>>2]=e+(~((e+-4-d|0)>>>2)<<2);Oq(d)}d=c+64|0;e=f[d>>2]|0;f[d>>2]=0;if(e|0){d=f[e>>2]|0;if(d|0){b=e+4|0;if((f[b>>2]|0)!=(d|0))f[b>>2]=d;Oq(d)}Oq(e)}Oq(c)}c=f[a+16>>2]|0;if(!c)return;e=a+20|0;a=f[e>>2]|0;if((a|0)!=(c|0))f[e>>2]=a+(~((a+-4-c|0)>>>2)<<2);Oq(c);return}function Oi(){var a=0,b=0,c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0;a=u;u=u+48|0;b=a+32|0;c=a+24|0;d=a+16|0;e=a;g=a+36|0;a=sn()|0;if(a|0?(h=f[a>>2]|0,h|0):0){a=h+48|0;i=f[a>>2]|0;j=f[a+4>>2]|0;if(!((i&-256|0)==1126902528&(j|0)==1129074247)){f[c>>2]=18701;Hn(18651,c)}if((i|0)==1126902529&(j|0)==1129074247)k=f[h+44>>2]|0;else k=h+80|0;f[g>>2]=k;k=f[h>>2]|0;h=f[k+4>>2]|0;if(Sa[f[(f[258]|0)+16>>2]&31](1032,k,g)|0){k=f[g>>2]|0;g=Qa[f[(f[k>>2]|0)+8>>2]&127](k)|0;f[e>>2]=18701;f[e+4>>2]=h;f[e+8>>2]=g;Hn(18565,e)}else{f[d>>2]=18701;f[d+4>>2]=h;Hn(18610,d)}}Hn(18689,b)}function Pi(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;do if(a){if(c>>>0<128){b[a>>0]=c;e=1;break}d=(Jq()|0)+188|0;if(!(f[f[d>>2]>>2]|0))if((c&-128|0)==57216){b[a>>0]=c;e=1;break}else{d=Vq()|0;f[d>>2]=84;e=-1;break}if(c>>>0<2048){b[a>>0]=c>>>6|192;b[a+1>>0]=c&63|128;e=2;break}if(c>>>0<55296|(c&-8192|0)==57344){b[a>>0]=c>>>12|224;b[a+1>>0]=c>>>6&63|128;b[a+2>>0]=c&63|128;e=3;break}if((c+-65536|0)>>>0<1048576){b[a>>0]=c>>>18|240;b[a+1>>0]=c>>>12&63|128;b[a+2>>0]=c>>>6&63|128;b[a+3>>0]=c&63|128;e=4;break}else{d=Vq()|0;f[d>>2]=84;e=-1;break}}else e=1;while(0);return e|0}function Qi(a){a=a|0;var b=0,c=0,d=0;b=f[a+92>>2]|0;if(b|0){c=a+96|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+76>>2]|0;if(b|0){d=a+80|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+64>>2]|0;if(b|0){c=a+68|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+52>>2]|0;if(b|0){d=a+56|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}f[a+4>>2]=3636;b=f[a+24>>2]|0;if(b|0)Oq(b);b=f[a+12>>2]|0;if(!b)return;Oq(b);return}function Ri(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;c=a+4|0;d=f[a>>2]|0;e=(f[c>>2]|0)-d|0;g=e>>2;h=g+1|0;if(h>>>0>1073741823)aq(a);i=a+8|0;j=(f[i>>2]|0)-d|0;k=j>>1;l=j>>2>>>0<536870911?(k>>>0>>0?h:k):1073741823;do if(l)if(l>>>0>1073741823){k=ra(8)|0;Oo(k,16035);f[k>>2]=7256;va(k|0,1112,110)}else{k=ln(l<<2)|0;m=k;n=k;break}else{m=0;n=0}while(0);k=m+(g<<2)|0;f[k>>2]=f[b>>2];if((e|0)>0)kh(n|0,d|0,e|0)|0;f[a>>2]=m;f[c>>2]=k+4;f[i>>2]=m+(l<<2);if(!d)return;Oq(d);return}function Si(a){a=a|0;var c=0,d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c=a+104|0;d=f[c>>2]|0;if((d|0)!=0?(f[a+108>>2]|0)>=(d|0):0)e=4;else{d=Wm(a)|0;if((d|0)>=0){g=f[c>>2]|0;c=a+8|0;if(g){i=f[c>>2]|0;j=f[a+4>>2]|0;k=g-(f[a+108>>2]|0)|0;g=i;if((i-j|0)<(k|0)){l=g;m=g}else{l=j+(k+-1)|0;m=g}}else{g=f[c>>2]|0;l=g;m=g}f[a+100>>2]=l;l=a+4|0;if(!m)n=f[l>>2]|0;else{g=f[l>>2]|0;l=a+108|0;f[l>>2]=m+1-g+(f[l>>2]|0);n=g}g=n+-1|0;if((d|0)==(h[g>>0]|0|0))o=d;else{b[g>>0]=d;o=d}}else e=4}if((e|0)==4){f[a+100>>2]=0;o=-1}return o|0}function Ti(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;f[a>>2]=1544;f[a+4>>2]=b;b=a+8|0;f[b>>2]=f[c>>2];f[b+4>>2]=f[c+4>>2];f[b+8>>2]=f[c+8>>2];f[b+12>>2]=f[c+12>>2];f[b+16>>2]=f[c+16>>2];f[b+20>>2]=f[c+20>>2];fk(a+32|0,c+24|0);f[a>>2]=2384;c=a+44|0;f[c>>2]=f[d>>2];f[c+4>>2]=f[d+4>>2];f[c+8>>2]=f[d+8>>2];f[c+12>>2]=f[d+12>>2];f[a>>2]=2440;d=a+112|0;c=a+60|0;b=c+52|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(b|0));Zm(d);f[a+152>>2]=0;f[a+156>>2]=0;f[a+160>>2]=0;return}function Ui(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;f[a>>2]=1544;f[a+4>>2]=b;b=a+8|0;f[b>>2]=f[c>>2];f[b+4>>2]=f[c+4>>2];f[b+8>>2]=f[c+8>>2];f[b+12>>2]=f[c+12>>2];f[b+16>>2]=f[c+16>>2];f[b+20>>2]=f[c+20>>2];fk(a+32|0,c+24|0);f[a>>2]=1964;c=a+44|0;f[c>>2]=f[d>>2];f[c+4>>2]=f[d+4>>2];f[c+8>>2]=f[d+8>>2];f[c+12>>2]=f[d+12>>2];f[a>>2]=2020;d=a+112|0;c=a+60|0;b=c+52|0;do{f[c>>2]=0;c=c+4|0}while((c|0)<(b|0));Zm(d);f[a+152>>2]=0;f[a+156>>2]=0;f[a+160>>2]=0;return}function Vi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2440;b=f[a+152>>2]|0;if(b|0){c=a+156|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+112>>2]|0;if(b|0){d=a+116|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+96>>2]|0;if(b|0)Oq(b);b=f[a+84>>2]|0;if(b|0)Oq(b);b=f[a+72>>2]|0;if(b|0)Oq(b);b=f[a+60>>2]|0;if(b|0)Oq(b);f[a>>2]=1544;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);Oq(b);return}function Wi(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0;d=u;u=u+16|0;e=d;g=f[(f[c+4>>2]|0)+4>>2]|0;if(!g){f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;u=d;return}if(!(Dj(d+12|0,f[c+44>>2]|0,g)|0)){g=ln(32)|0;f[e>>2]=g;f[e+8>>2]=-2147483616;f[e+4>>2]=26;c=g;h=15859;i=c+26|0;do{b[c>>0]=b[h>>0]|0;c=c+1|0;h=h+1|0}while((c|0)<(i|0));b[g+26>>0]=0;f[a>>2]=-1;pj(a+4|0,e);if((b[e+11>>0]|0)<0)Oq(f[e>>2]|0)}else{f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0}u=d;return}function Xi(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;c=b+48|0;if((mi(f[c>>2]|0)|0)>9){d=0;return d|0}if((Qa[f[(f[b>>2]|0)+8>>2]&127](b)|0)!=1){d=0;return d|0}e=b+4|0;b=(f[(f[(f[e>>2]|0)+8>>2]|0)+(a<<2)>>2]|0)+56|0;a=f[b>>2]|0;do if((a|0)==3)if((mi(f[c>>2]|0)|0)<4){d=5;return d|0}else{g=f[b>>2]|0;break}else g=a;while(0);a=mi(f[c>>2]|0)|0;if((g|0)==1){d=(a|0)<4?6:0;return d|0}if((a|0)>7){d=0;return d|0}if((mi(f[c>>2]|0)|0)>1){d=1;return d|0}else return ((f[(f[e>>2]|0)+80>>2]|0)>>>0<40?1:4)|0;return 0}function Yi(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2020;b=f[a+152>>2]|0;if(b|0){c=a+156|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+112>>2]|0;if(b|0){d=a+116|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+96>>2]|0;if(b|0)Oq(b);b=f[a+84>>2]|0;if(b|0)Oq(b);b=f[a+72>>2]|0;if(b|0)Oq(b);b=f[a+60>>2]|0;if(b|0)Oq(b);f[a>>2]=1544;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);Oq(b);return}function Zi(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=u;u=u+128|0;h=g+124|0;i=g;j=i;k=6596;l=j+124|0;do{f[j>>2]=f[k>>2];j=j+4|0;k=k+4|0}while((j|0)<(l|0));if((c+-1|0)>>>0>2147483646)if(!c){m=h;n=1;o=4}else{h=Vq()|0;f[h>>2]=75;p=-1}else{m=a;n=c;o=4}if((o|0)==4){o=-2-m|0;c=n>>>0>o>>>0?o:n;f[i+48>>2]=c;n=i+20|0;f[n>>2]=m;f[i+44>>2]=m;o=m+c|0;m=i+16|0;f[m>>2]=o;f[i+28>>2]=o;o=Ah(i,d,e)|0;if(!c)p=o;else{c=f[n>>2]|0;b[c+(((c|0)==(f[m>>2]|0))<<31>>31)>>0]=0;p=o}}u=g;return p|0}function _i(a){a=a|0;var c=0,d=0,e=0,g=0;f[a>>2]=3480;c=a+72|0;d=a+136|0;e=a+4|0;g=e+64|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));e=c;g=e+64|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));n[d>>2]=$(1.0);d=a+140|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;f[a+164>>2]=-1;d=a+168|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;f[d+24>>2]=0;wn(a+200|0);Gn(a+232|0);d=a+264|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;b[d+24>>0]=0;return}function $i(a,c,d,e){a=a|0;c=c|0;d=d|0;e=+e;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a=u;u=u+16|0;g=a;if(!c){h=0;u=a;return h|0}f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;i=Gj(d)|0;if(i>>>0>4294967279)aq(g);if(i>>>0<11){b[g+11>>0]=i;if(!i)j=g;else{k=g;l=7}}else{m=i+16&-16;n=ln(m)|0;f[g>>2]=n;f[g+8>>2]=m|-2147483648;f[g+4>>2]=i;k=n;l=7}if((l|0)==7){kh(k|0,d|0,i|0)|0;j=k}b[j+i>>0]=0;Zl(c,g,e);if((b[g+11>>0]|0)<0)Oq(f[g>>2]|0);h=1;u=a;return h|0}function aj(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a=u;u=u+16|0;g=a;if(!c){h=0;u=a;return h|0}f[g>>2]=0;f[g+4>>2]=0;f[g+8>>2]=0;i=Gj(d)|0;if(i>>>0>4294967279)aq(g);if(i>>>0<11){b[g+11>>0]=i;if(!i)j=g;else{k=g;l=7}}else{m=i+16&-16;n=ln(m)|0;f[g>>2]=n;f[g+8>>2]=m|-2147483648;f[g+4>>2]=i;k=n;l=7}if((l|0)==7){kh(k|0,d|0,i|0)|0;j=k}b[j+i>>0]=0;$l(c,g,e);if((b[g+11>>0]|0)<0)Oq(f[g>>2]|0);h=1;u=a;return h|0}function bj(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;c=f[a+28>>2]|0;if(c|0){d=c;do{c=d;d=f[d>>2]|0;e=c+8|0;g=c+20|0;h=f[g>>2]|0;f[g>>2]=0;if(h|0){bj(h);Oq(h)}if((b[e+11>>0]|0)<0)Oq(f[e>>2]|0);Oq(c)}while((d|0)!=0)}d=a+20|0;c=f[d>>2]|0;f[d>>2]=0;if(c|0)Oq(c);c=f[a+8>>2]|0;if(c|0){d=c;do{c=d;d=f[d>>2]|0;e=c+8|0;h=f[c+20>>2]|0;if(h|0){g=c+24|0;if((f[g>>2]|0)!=(h|0))f[g>>2]=h;Oq(h)}if((b[e+11>>0]|0)<0)Oq(f[e>>2]|0);Oq(c)}while((d|0)!=0)}d=f[a>>2]|0;f[a>>2]=0;if(!d)return;Oq(d);return}function cj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0;e=u;u=u+16|0;g=e;h=f[c+36>>2]|0;if(!h){i=ln(32)|0;f[g>>2]=i;f[g+8>>2]=-2147483616;f[g+4>>2]=23;j=i;k=15706;l=j+23|0;do{b[j>>0]=b[k>>0]|0;j=j+1|0;k=k+1|0}while((j|0)<(l|0));b[i+23>>0]=0;f[a>>2]=-1;pj(a+4|0,g);if((b[g+11>>0]|0)<0)Oq(f[g>>2]|0);u=e;return}g=f[c+40>>2]|0;if(!g){Sc(a,c,h,d);u=e;return}else{bi(a,c,g,d);u=e;return}}function dj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;tk(a);b=a+84|0;c=f[b>>2]|0;if((c|0)<=0)return;d=c<<5;e=Lq(c>>>0>134217727|d>>>0>4294967291?-1:d+4|0)|0;f[e>>2]=c;d=e+4|0;e=d+(c<<5)|0;c=d;do{wn(c);c=c+32|0}while((c|0)!=(e|0));e=a+80|0;a=f[e>>2]|0;f[e>>2]=d;if(a|0){d=a+-4|0;c=f[d>>2]|0;if(c|0){g=a+(c<<5)|0;do{g=g+-32|0;Fj(g)}while((g|0)!=(a|0))}Mq(d)}if((f[b>>2]|0)>0)h=0;else return;do{tk((f[e>>2]|0)+(h<<5)|0);h=h+1|0}while((h|0)<(f[b>>2]|0));return}function ej(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;if(!b){d=0;return d|0}if(f[b+4>>2]|0){d=0;return d|0}a=ln(52)|0;Ub(a,c);f[a+40>>2]=0;f[a+44>>2]=0;f[a+48>>2]=0;c=b+4|0;b=f[c>>2]|0;f[c>>2]=a;if(!b){d=1;return d|0}a=b+40|0;c=f[a>>2]|0;if(c|0){e=b+44|0;g=f[e>>2]|0;if((g|0)==(c|0))h=c;else{i=g;do{g=i+-4|0;f[e>>2]=g;j=f[g>>2]|0;f[g>>2]=0;if(j|0){bj(j);Oq(j)}i=f[e>>2]|0}while((i|0)!=(c|0));h=f[a>>2]|0}Oq(h)}bj(b);Oq(b);d=1;return d|0}function fj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=f[a>>2]|0;if(b){b=c+8|0;d=b;e=Vn(f[d>>2]|0,f[d+4>>2]|0,1,0)|0;d=b;f[d>>2]=e;f[d+4>>2]=I;d=a+28|0;e=f[d>>2]|0;b=a+24|0;f[b>>2]=f[b>>2]|1<>2]|0,f[e+4>>2]|0,1,0)|0;e=c;f[e>>2]=d;f[e+4>>2]=I;e=a+28|0;g=e;h=f[e>>2]|0}e=h+1|0;f[g>>2]=e;if((e|0)!=32)return;e=a+24|0;h=a+16|0;d=f[h>>2]|0;if((d|0)==(f[a+20>>2]|0))Ri(a+12|0,e);else{f[d>>2]=f[e>>2];f[h>>2]=d+4}f[g>>2]=0;f[e>>2]=0;return}function gj(a,b){a=a|0;b=b|0;var c=0,d=0;c=a+32|0;a=f[b>>2]|0;f[b>>2]=0;b=f[c>>2]|0;f[c>>2]=a;if(!b)return;a=b+88|0;c=f[a>>2]|0;f[a>>2]=0;if(c|0){a=f[c+8>>2]|0;if(a|0){d=c+12|0;if((f[d>>2]|0)!=(a|0))f[d>>2]=a;Oq(a)}Oq(c)}c=f[b+68>>2]|0;if(c|0){a=b+72|0;d=f[a>>2]|0;if((d|0)!=(c|0))f[a>>2]=d+(~((d+-4-c|0)>>>2)<<2);Oq(c)}c=b+64|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d>>2]|0;if(c|0){a=d+4|0;if((f[a>>2]|0)!=(c|0))f[a>>2]=c;Oq(c)}Oq(d)}Oq(b);return}function hj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+16|0;g=e;if(c|0){h=a+11|0;i=b[h>>0]|0;if(i<<24>>24<0){j=f[a+4>>2]|0;k=(f[a+8>>2]&2147483647)+-1|0}else{j=i&255;k=10}if((k-j|0)>>>0>>0){xj(a,k,c-k+j|0,j,j,0,0);l=b[h>>0]|0}else l=i;if(l<<24>>24<0)m=f[a>>2]|0;else m=a;Qn(m+j|0,c,d)|0;d=j+c|0;if((b[h>>0]|0)<0)f[a+4>>2]=d;else b[h>>0]=d;b[g>>0]=0;up(m+d|0,g)}u=e;return a|0}function ij(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+48|0;e=d+4|0;g=d;h=f[b+12>>2]|0;i=f[b+4>>2]|0;b=e;j=b+36|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(j|0));zh(g,c,h,i,e);i=f[e+24>>2]|0;if(!i){k=f[g>>2]|0;f[a>>2]=k;u=d;return}h=e+28|0;e=f[h>>2]|0;if((e|0)!=(i|0))f[h>>2]=e+(~((e+-4-i|0)>>>2)<<2);Oq(i);k=f[g>>2]|0;f[a>>2]=k;u=d;return}function jj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+16|0;g=e;h=a+11|0;i=b[h>>0]|0;j=i<<24>>24<0;if(j)k=(f[a+8>>2]&2147483647)+-1|0;else k=10;do if(k>>>0>=d>>>0){if(j)l=f[a>>2]|0;else l=a;Eo(l,c,d)|0;b[g>>0]=0;up(l+d|0,g);if((b[h>>0]|0)<0){f[a+4>>2]=d;break}else{b[h>>0]=d;break}}else{if(j)m=f[a+4>>2]|0;else m=i&255;Bi(a,k,d-k|0,m,0,m,d,c)}while(0);u=e;return a|0}function kj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;d=f[c>>2]|0;if((d|0)==(b|0))e=b;else{g=d;do{f[c>>2]=g+-136;d=f[g+-20>>2]|0;if(d|0){h=g+-16|0;i=f[h>>2]|0;if((i|0)!=(d|0))f[h>>2]=i+(~((i+-4-d|0)>>>2)<<2);Oq(d)}d=f[g+-32>>2]|0;if(d|0){i=g+-28|0;h=f[i>>2]|0;if((h|0)!=(d|0))f[i>>2]=h+(~((h+-4-d|0)>>>2)<<2);Oq(d)}Mi(g+-132|0);g=f[c>>2]|0}while((g|0)!=(b|0));e=f[a>>2]|0}Oq(e);return}function lj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=u;u=u+16|0;g=e;h=a+11|0;i=b[h>>0]|0;j=i<<24>>24<0;if(j){k=f[a+4>>2]|0;l=(f[a+8>>2]&2147483647)+-1|0}else{k=i&255;l=10}if((l-k|0)>>>0>=d>>>0){if(d|0){if(j)m=f[a>>2]|0;else m=a;Fo(m+k|0,c,d)|0;j=k+d|0;if((b[h>>0]|0)<0)f[a+4>>2]=j;else b[h>>0]=j;b[g>>0]=0;up(m+j|0,g)}}else Bi(a,l,d-l+k|0,k,k,0,d,c);u=e;return a|0}function mj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;f[a>>2]=3932;b=f[a+32>>2]|0;if(b|0){c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+20>>2]|0;if(b|0){d=a+24|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=a+8|0;c=f[b>>2]|0;if(!c)return;d=a+12|0;a=f[d>>2]|0;if((a|0)==(c|0))e=c;else{g=a;do{a=g+-4|0;f[d>>2]=a;h=f[a>>2]|0;f[a>>2]=0;if(h|0)Va[f[(f[h>>2]|0)+4>>2]&127](h);g=f[d>>2]|0}while((g|0)!=(c|0));e=f[b>>2]|0}Oq(e);return}function nj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+4|0;if((Qa[f[(f[b>>2]|0)+20>>2]&127](b)|0)<=0){d=1;return d|0}a=0;while(1){e=f[(f[c>>2]|0)+4>>2]|0;g=dm(e,Ra[f[(f[b>>2]|0)+24>>2]&127](b,a)|0)|0;if((g|0)==-1){d=0;h=6;break}e=f[(f[b>>2]|0)+28>>2]|0;i=fl(f[c>>2]|0,g)|0;a=a+1|0;if(!(Ra[e&127](b,i)|0)){d=0;h=6;break}if((a|0)>=(Qa[f[(f[b>>2]|0)+20>>2]&127](b)|0)){d=1;h=6;break}}if((h|0)==6)return d|0;return 0}function oj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;if(!(ho(a,b,c)|0)){d=0;return d|0}if(!(Qa[f[(f[a>>2]|0)+52>>2]&127](a)|0)){d=0;return d|0}c=a+4|0;e=a+8|0;g=f[c>>2]|0;if((f[e>>2]|0)==(g|0)){d=1;return d|0}h=a+36|0;a=0;i=g;while(1){g=f[(f[h>>2]|0)+(a<<2)>>2]|0;if(!(Sa[f[(f[g>>2]|0)+8>>2]&31](g,b,f[i+(a<<2)>>2]|0)|0)){d=0;j=7;break}a=a+1|0;i=f[c>>2]|0;if(a>>>0>=(f[e>>2]|0)-i>>2>>>0){d=1;j=7;break}}if((j|0)==7)return d|0;return 0}function pj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;if((b[c+11>>0]|0)<0){g=f[c>>2]|0;h=f[c+4>>2]|0;if(h>>>0>4294967279)aq(a);if(h>>>0<11){b[a+11>>0]=h;i=a}else{j=h+16&-16;k=ln(j)|0;f[a>>2]=k;f[a+8>>2]=j|-2147483648;f[a+4>>2]=h;i=k}Fo(i,g,h)|0;b[e>>0]=0;up(i+h|0,e)}else{f[a>>2]=f[c>>2];f[a+4>>2]=f[c+4>>2];f[a+8>>2]=f[c+8>>2]}u=d;return}function qj(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0;b[c+53>>0]=1;do if((f[c+4>>2]|0)==(e|0)){b[c+52>>0]=1;a=c+16|0;h=f[a>>2]|0;if(!h){f[a>>2]=d;f[c+24>>2]=g;f[c+36>>2]=1;if(!((g|0)==1?(f[c+48>>2]|0)==1:0))break;b[c+54>>0]=1;break}if((h|0)!=(d|0)){h=c+36|0;f[h>>2]=(f[h>>2]|0)+1;b[c+54>>0]=1;break}h=c+24|0;a=f[h>>2]|0;if((a|0)==2){f[h>>2]=g;i=g}else i=a;if((i|0)==1?(f[c+48>>2]|0)==1:0)b[c+54>>0]=1}while(0);return}function rj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=a+36|0;d=a+40|0;e=f[c>>2]|0;if((f[d>>2]|0)!=(e|0)){g=0;h=e;do{vg(h+(g*24|0)|0,b)|0;g=g+1|0;h=f[c>>2]|0}while(g>>>0<(((f[d>>2]|0)-h|0)/24|0)>>>0)}h=a+48|0;d=a+52|0;a=f[h>>2]|0;if((f[d>>2]|0)==(a|0))return 1;else{i=0;j=a}do{a=f[j+(i<<2)>>2]|0;ci(a<<1^a>>31,b)|0;i=i+1|0;j=f[h>>2]|0}while(i>>>0<(f[d>>2]|0)-j>>2>>>0);return 1}function sj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;e=a+d|0;c=c&255;if((d|0)>=67){while(a&3){b[a>>0]=c;a=a+1|0}g=e&-4|0;h=g-64|0;i=c|c<<8|c<<16|c<<24;while((a|0)<=(h|0)){f[a>>2]=i;f[a+4>>2]=i;f[a+8>>2]=i;f[a+12>>2]=i;f[a+16>>2]=i;f[a+20>>2]=i;f[a+24>>2]=i;f[a+28>>2]=i;f[a+32>>2]=i;f[a+36>>2]=i;f[a+40>>2]=i;f[a+44>>2]=i;f[a+48>>2]=i;f[a+52>>2]=i;f[a+56>>2]=i;f[a+60>>2]=i;a=a+64|0}while((a|0)<(g|0)){f[a>>2]=i;a=a+4|0}}while((a|0)<(e|0)){b[a>>0]=c;a=a+1|0}return e-d|0}function tj(a,c,d,e,g){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0;do if(!(fp(a,f[c+8>>2]|0,g)|0)){if(fp(a,f[c>>2]|0,g)|0){if((f[c+16>>2]|0)!=(d|0)?(h=c+20|0,(f[h>>2]|0)!=(d|0)):0){f[c+32>>2]=e;f[h>>2]=d;h=c+40|0;f[h>>2]=(f[h>>2]|0)+1;if((f[c+36>>2]|0)==1?(f[c+24>>2]|0)==2:0)b[c+54>>0]=1;f[c+44>>2]=4;break}if((e|0)==1)f[c+32>>2]=1}}else Vm(0,c,d,e);while(0);return}function uj(a){a=a|0;var b=0,c=0,d=0,e=0;b=a+80|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=c+-4|0;d=f[b>>2]|0;if(d|0){e=c+(d<<5)|0;do{e=e+-32|0;Fj(e)}while((e|0)!=(c|0))}Mq(b)}b=f[a+68>>2]|0;if(b|0){c=a+72|0;e=f[c>>2]|0;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);Oq(b)}b=a+44|0;e=f[b>>2]|0;f[b>>2]=0;if(e|0)Oq(e);e=f[a+32>>2]|0;if(!e){Fj(a);return}b=a+36|0;if((f[b>>2]|0)!=(e|0))f[b>>2]=e;Oq(e);Fj(a);return}function vj(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3092;b=f[a+136>>2]|0;if(b|0){c=a+140|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+76>>2]|0;if(b|0)Oq(b);b=f[a+64>>2]|0;if(b|0)Oq(b);b=f[a+52>>2]|0;if(b|0)Oq(b);b=f[a+40>>2]|0;if(!b)return;Oq(b);return}function wj(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0;if((d|0)<0){e=0;return e|0}do if(!b){d=a+4|0;g=f[d>>2]|0;h=f[a>>2]|0;i=g-h|0;if(i>>>0>>0){Fi(a,c-i|0);break}if(i>>>0>c>>>0?(i=h+c|0,(i|0)!=(g|0)):0)f[d>>2]=i}else Cg(a,b,b+c|0);while(0);c=a+24|0;a=c;b=Vn(f[a>>2]|0,f[a+4>>2]|0,1,0)|0;a=c;f[a>>2]=b;f[a+4>>2]=I;e=1;return e|0}function xj(a,c,d,e,g,h,i){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0;if((-17-c|0)>>>0>>0)aq(a);if((b[a+11>>0]|0)<0)j=f[a>>2]|0;else j=a;if(c>>>0<2147483623){k=d+c|0;d=c<<1;l=k>>>0>>0?d:k;m=l>>>0<11?11:l+16&-16}else m=-17;l=ln(m)|0;if(g|0)Fo(l,j,g)|0;k=e-h-g|0;if(k|0)Fo(l+g+i|0,j+g+h|0,k)|0;if((c|0)!=10)Oq(j);f[a>>2]=l;f[a+8>>2]=m|-2147483648;return}function yj(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2728;b=f[a+136>>2]|0;if(b|0){c=a+140|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+96>>2]|0;if(b|0){d=a+100|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+76>>2]|0;if(b|0)Oq(b);b=f[a+64>>2]|0;if(b|0)Oq(b);b=f[a+52>>2]|0;if(b|0)Oq(b);b=f[a+40>>2]|0;if(!b)return;Oq(b);return}function zj(a,b){a=a|0;b=b|0;if(!b)return;else{zj(a,f[b>>2]|0);zj(a,f[b+4>>2]|0);Ej(b+20|0,f[b+24>>2]|0);Oq(b);return}}function Aj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;Yf(a,b,c);c=f[a+100>>2]|0;d=f[a+96>>2]|0;a=d;if((c|0)==(d|0))return;e=f[b>>2]|0;b=(c-d|0)/12|0;d=0;do{c=a+(d*12|0)|0;f[c>>2]=f[e+(f[c>>2]<<2)>>2];c=a+(d*12|0)+4|0;f[c>>2]=f[e+(f[c>>2]<<2)>>2];c=a+(d*12|0)+8|0;f[c>>2]=f[e+(f[c>>2]<<2)>>2];d=d+1|0}while(d>>>0>>0);return}function Bj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=a+64|0;if((f[d>>2]|0)==0?(e=ln(32)|0,yn(e),g=f[d>>2]|0,f[d>>2]=e,g|0):0){e=f[g>>2]|0;if(e|0){h=g+4|0;if((f[h>>2]|0)!=(e|0))f[h>>2]=e;Oq(e)}Oq(g)}g=Vl(f[a+28>>2]|0)|0;e=X(g,b[a+24>>0]|0)|0;g=((e|0)<0)<<31>>31;h=f[d>>2]|0;i=un(e|0,g|0,c|0,0)|0;if(!(wj(h,0,i,I)|0)){j=0;return j|0}Kk(a,f[d>>2]|0,e,g,0,0);f[a+80>>2]=c;j=1;return j|0}function Cj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+64|0;e=d;if(!(fp(a,b,0)|0))if((b|0)!=0?(g=Eh(b,1056,1040,0)|0,(g|0)!=0):0){b=e+4|0;h=b+52|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(h|0));f[e>>2]=g;f[e+8>>2]=a;f[e+12>>2]=-1;f[e+48>>2]=1;Ya[f[(f[g>>2]|0)+28>>2]&3](g,e,f[c>>2]|0,1);if((f[e+24>>2]|0)==1){f[c>>2]=f[e+16>>2];i=1}else i=0;j=i}else j=0;else j=1;u=d;return j|0}function Dj(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;if(!c){d=0;return d|0}e=c+40|0;g=c+44|0;ci((f[g>>2]|0)-(f[e>>2]|0)>>2,b)|0;h=f[e>>2]|0;e=f[g>>2]|0;if((h|0)!=(e|0)){g=h;do{h=f[g>>2]|0;if(h|0){ci(f[h+40>>2]|0,b)|0;lg(a,b,h)|0}g=g+4|0}while((g|0)!=(e|0))}lg(a,b,c)|0;d=1;return d|0}function Ej(a,c){a=a|0;c=c|0;var d=0;if(!c)return;Ej(a,f[c>>2]|0);Ej(a,f[c+4>>2]|0);a=c+16|0;d=c+28|0;if((b[d+11>>0]|0)<0)Oq(f[d>>2]|0);if((b[a+11>>0]|0)<0)Oq(f[a>>2]|0);Oq(c);return}function Fj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=u;u=u+16|0;c=b;d=c;f[d>>2]=0;f[d+4>>2]=0;qf(a,2,c);c=f[a+12>>2]|0;d=a+16|0;e=f[d>>2]|0;if((e|0)==(c|0))g=c;else{h=e+(~((e+-4-c|0)>>>2)<<2)|0;f[d>>2]=h;g=h}f[a+24>>2]=0;f[a+28>>2]=0;if(c|0){if((g|0)!=(c|0))f[d>>2]=g+(~((g+-4-c|0)>>>2)<<2);Oq(c)}c=f[a>>2]|0;if(!c){u=b;return}g=a+4|0;a=f[g>>2]|0;if((a|0)!=(c|0))f[g>>2]=a+(~((a+-8-c|0)>>>3)<<3);Oq(c);u=b;return}function Gj(a){a=a|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0,k=0,l=0;c=a;a:do if(!(c&3)){d=a;e=4}else{g=a;h=c;while(1){if(!(b[g>>0]|0)){i=h;break a}j=g+1|0;h=j;if(!(h&3)){d=j;e=4;break}else g=j}}while(0);if((e|0)==4){e=d;while(1){k=f[e>>2]|0;if(!((k&-2139062144^-2139062144)&k+-16843009))e=e+4|0;else break}if(!((k&255)<<24>>24))l=e;else{k=e;while(1){e=k+1|0;if(!(b[e>>0]|0)){l=e;break}else k=e}}i=l}return i-c|0}function Hj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e;h=a+11|0;i=b[h>>0]|0;j=i<<24>>24<0;if(j)k=f[a+4>>2]|0;else k=i&255;do if(k>>>0>=c>>>0)if(j){i=(f[a>>2]|0)+c|0;b[g>>0]=0;up(i,g);f[a+4>>2]=c;break}else{b[g>>0]=0;up(a+c|0,g);b[h>>0]=c;break}else hj(a,c-k|0,d)|0;while(0);u=e;return}function Ij(a){a=a|0;var b=0,c=0,d=0;if(!a)return;b=a+88|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0){b=f[c+8>>2]|0;if(b|0){d=c+12|0;if((f[d>>2]|0)!=(b|0))f[d>>2]=b;Oq(b)}Oq(c)}c=f[a+68>>2]|0;if(c|0){b=a+72|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);Oq(c)}c=a+64|0;d=f[c>>2]|0;f[c>>2]=0;if(d|0){c=f[d>>2]|0;if(c|0){b=d+4|0;if((f[b>>2]|0)!=(c|0))f[b>>2]=c;Oq(c)}Oq(d)}Oq(a);return}function Jj(a,c,d,e,g,h,i,j,k,l){a=a|0;c=c|0;d=d|0;e=e|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0;f[a>>2]=d;if(d|0){m=d+16|0;n=f[m+4>>2]|0;o=a+8|0;f[o>>2]=f[m>>2];f[o+4>>2]=n;n=d+24|0;d=f[n+4>>2]|0;o=a+16|0;f[o>>2]=f[n>>2];f[o+4>>2]=d}b[a+24>>0]=e;f[a+28>>2]=g;b[a+32>>0]=h&1;h=a+40|0;f[h>>2]=i;f[h+4>>2]=j;j=a+48|0;f[j>>2]=k;f[j+4>>2]=l;f[a+56>>2]=c;return}function Kj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;c=ln(88)|0;d=c+60|0;e=c;g=e+60|0;do{f[e>>2]=0;e=e+4|0}while((e|0)<(g|0));f[d>>2]=c;d=c+64|0;f[d>>2]=0;f[d+4>>2]=0;f[d+8>>2]=0;f[d+12>>2]=0;f[d+16>>2]=0;f[d+20>>2]=0;d=cg(c,b)|0;f[a>>2]=d?c:0;a=d?0:c;if(d)return;Ii(a);Oq(a);return}function Lj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;if((f[c+76>>2]|0)>=0?(Tq(c)|0)!=0:0){d=a&255;e=a&255;if((e|0)!=(b[c+75>>0]|0)?(g=c+20|0,h=f[g>>2]|0,h>>>0<(f[c+16>>2]|0)>>>0):0){f[g>>2]=h+1;b[h>>0]=d;i=e}else i=Nj(c,a)|0;Sq(c);j=i}else k=3;do if((k|0)==3){i=a&255;e=a&255;if((e|0)!=(b[c+75>>0]|0)?(d=c+20|0,h=f[d>>2]|0,h>>>0<(f[c+16>>2]|0)>>>0):0){f[d>>2]=h+1;b[h>>0]=i;j=e;break}j=Nj(c,a)|0}while(0);return j|0}function Mj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d+4|0;g=d;h=d+8|0;i=f[a+4>>2]|0;if((i|0)==-1){j=0;u=d;return j|0}b[h>>0]=i;i=c+16|0;a=f[i+4>>2]|0;if(!((a|0)>0|(a|0)==0&(f[i>>2]|0)>>>0>0)){f[g>>2]=f[c+4>>2];f[e>>2]=f[g>>2];Me(c,e,h,h+1|0)|0}j=1;u=d;return j|0}function Nj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0;d=u;u=u+16|0;e=d;g=c&255;b[e>>0]=g;i=a+16|0;j=f[i>>2]|0;if(!j)if(!(vl(a)|0)){k=f[i>>2]|0;l=4}else m=-1;else{k=j;l=4}do if((l|0)==4){j=a+20|0;i=f[j>>2]|0;if(i>>>0>>0?(n=c&255,(n|0)!=(b[a+75>>0]|0)):0){f[j>>2]=i+1;b[i>>0]=g;m=n;break}if((Sa[f[a+36>>2]&31](a,e,1)|0)==1)m=h[e>>0]|0;else m=-1}while(0);u=d;return m|0}function Oj(a,b){a=a|0;b=b|0;if(!b)return;else{Oj(a,f[b>>2]|0);Oj(a,f[b+4>>2]|0);Ej(b+20|0,f[b+24>>2]|0);Oq(b);return}}function Pj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=u;u=u+16|0;g=e;h=e+4|0;f[g>>2]=c;c=ln(32)|0;f[h>>2]=c;f[h+8>>2]=-2147483616;f[h+4>>2]=17;i=c;j=14495;k=i+17|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[c+17>>0]=0;Xj(Hd(a,g)|0,h,d);if((b[h+11>>0]|0)>=0){u=e;return}Oq(f[h>>2]|0);u=e;return}function Qj(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=f[a+16>>2]|0;if(((f[a+20>>2]|0)-c>>2|0)<=(b|0)){d=0;return d|0}e=f[c+(b<<2)>>2]|0;if((e|0)<0){d=0;return d|0}b=a+48|0;if((f[a+52>>2]|0)>>>0<=e>>>0)Ce(b,e+1|0,0);c=(f[b>>2]|0)+(e>>>5<<2)|0;f[c>>2]=f[c>>2]|1<<(e&31);c=f[a+36>>2]|0;if((f[a+40>>2]|0)-c>>2>>>0<=e>>>0){d=1;return d|0}Bp(f[c+(e<<2)>>2]|0);d=1;return d|0}function Rj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;if(c>>>0>0|(c|0)==0&a>>>0>4294967295){e=d;f=a;g=c;while(1){c=hn(f|0,g|0,10,0)|0;e=e+-1|0;b[e>>0]=c&255|48;c=f;f=jp(f|0,g|0,10,0)|0;if(!(g>>>0>9|(g|0)==9&c>>>0>4294967295))break;else g=I}h=f;i=e}else{h=a;i=d}if(!h)j=i;else{d=h;h=i;while(1){i=h+-1|0;b[i>>0]=(d>>>0)%10|0|48;if(d>>>0<10){j=i;break}else{d=(d>>>0)/10|0;h=i}}}return j|0}function Sj(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=a;while(1){d=c+1|0;if(!(eq(b[c>>0]|0)|0))break;else c=d}a=b[c>>0]|0;switch(a<<24>>24|0){case 45:{e=1;f=5;break}case 43:{e=0;f=5;break}default:{g=0;h=c;i=a}}if((f|0)==5){g=e;h=d;i=b[d>>0]|0}if(!(Aq(i<<24>>24)|0))j=0;else{i=0;d=h;while(1){h=(i*10|0)+48-(b[d>>0]|0)|0;d=d+1|0;if(!(Aq(b[d>>0]|0)|0)){j=h;break}else i=h}}return (g|0?j:0-j|0)|0}function Tj(a,c,d){a=a|0;c=c|0;d=$(d);var e=0,g=0,h=0;e=u;u=u+16|0;g=e;il(g,d);h=Ai(a,c)|0;c=h+11|0;if((b[c>>0]|0)<0){b[f[h>>2]>>0]=0;f[h+4>>2]=0}else{b[h>>0]=0;b[c>>0]=0}gh(h,0);f[h>>2]=f[g>>2];f[h+4>>2]=f[g+4>>2];f[h+8>>2]=f[g+8>>2];u=e;return}function Uj(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=u;u=u+16|0;c=b+8|0;d=b+4|0;e=b;f[e>>2]=f[(f[a+4>>2]|0)+80>>2];g=f[a+44>>2]|0;a=g+16|0;h=f[a+4>>2]|0;if((h|0)>0|(h|0)==0&(f[a>>2]|0)>>>0>0){u=b;return 1}f[d>>2]=f[g+4>>2];f[c>>2]=f[d>>2];Me(g,c,e,e+4|0)|0;u=b;return 1}function Vj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;ll(g,d&1);d=Ai(a,c)|0;c=d+11|0;if((b[c>>0]|0)<0){b[f[d>>2]>>0]=0;f[d+4>>2]=0}else{b[d>>0]=0;b[c>>0]=0}gh(d,0);f[d>>2]=f[g>>2];f[d+4>>2]=f[g+4>>2];f[d+8>>2]=f[g+8>>2];u=e;return}function Wj(a){a=a|0;if(!a)return;Ej(a+24|0,f[a+28>>2]|0);zj(a+12|0,f[a+16>>2]|0);Ej(a,f[a+4>>2]|0);Oq(a);return}function Xj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;ll(g,d);d=Ai(a,c)|0;c=d+11|0;if((b[c>>0]|0)<0){b[f[d>>2]>>0]=0;f[d+4>>2]=0}else{b[d>>0]=0;b[c>>0]=0}gh(d,0);f[d>>2]=f[g>>2];f[d+4>>2]=f[g+4>>2];f[d+8>>2]=f[g+8>>2];u=e;return}function Yj(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0,i=0,j=0,k=0;e=Rg(a,c)|0;if((e|0)==(a+4|0)){g=-1;h=(g|0)==-1;i=(g|0)!=0;j=h?d:i;return j|0}a=e+28|0;if((b[a+11>>0]|0)<0)k=f[a>>2]|0;else k=a;g=Sj(k)|0;h=(g|0)==-1;i=(g|0)!=0;j=h?d:i;return j|0}function Zj(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0,k=0;d=u;u=u+16|0;e=d;if(c>>>0>10){g=0;u=d;return g|0}h=ln(48)|0;f[e>>2]=h;f[e+8>>2]=-2147483600;f[e+4>>2]=33;i=h;j=15987;k=i+33|0;do{b[i>>0]=b[j>>0]|0;i=i+1|0;j=j+1|0}while((i|0)<(k|0));b[h+33>>0]=0;Xj(a,e,c);if((b[e+11>>0]|0)<0)Oq(f[e>>2]|0);g=1;u=d;return g|0}function _j(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=f[b>>2]|0;if((c|0)==-1)return 1;b=c*3|0;if((b|0)==-1)return 1;c=f[a>>2]|0;a=f[c+(b<<2)>>2]|0;d=b+1|0;e=((d>>>0)%3|0|0)==0?b+-2|0:d;if((e|0)==-1)g=-1;else g=f[c+(e<<2)>>2]|0;e=(((b>>>0)%3|0|0)==0?2:-1)+b|0;if((e|0)==-1)h=-1;else h=f[c+(e<<2)>>2]|0;if((a|0)==(g|0))return 1;else return (a|0)==(h|0)|(g|0)==(h|0)|0;return 0}function $j(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0,j=0,k=0;d=0;while(1){if((h[16654+d>>0]|0)==(a|0)){e=2;break}g=d+1|0;if((g|0)==87){i=16742;j=87;e=5;break}else d=g}if((e|0)==2)if(!d)k=16742;else{i=16742;j=d;e=5}if((e|0)==5)while(1){e=0;d=i;do{a=d;d=d+1|0}while((b[a>>0]|0)!=0);j=j+-1|0;if(!j){k=d;break}else{i=d;e=5}}return jq(k,f[c+20>>2]|0)|0}function ak(a,b){a=+a;b=b|0;var c=0,d=0,e=0,g=0.0,h=0.0,i=0,j=0.0;p[s>>3]=a;c=f[s>>2]|0;d=f[s+4>>2]|0;e=Yn(c|0,d|0,52)|0;switch(e&2047){case 0:{if(a!=0.0){g=+ak(a*18446744073709551616.0,b);h=g;i=(f[b>>2]|0)+-64|0}else{h=a;i=0}f[b>>2]=i;j=h;break}case 2047:{j=a;break}default:{f[b>>2]=(e&2047)+-1022;f[s>>2]=c;f[s+4>>2]=d&-2146435073|1071644672;j=+p[s>>3]}}return +j}function bk(a,b){a=+a;b=b|0;var c=0.0,d=0,e=0,g=0.0,h=0;if((b|0)<=1023)if((b|0)<-1022){c=a*2.2250738585072014e-308;d=(b|0)<-2044;e=b+2044|0;g=d?c*2.2250738585072014e-308:c;h=d?((e|0)>-1022?e:-1022):b+1022|0}else{g=a;h=b}else{c=a*8988465674311579538646525.0e283;e=(b|0)>2046;d=b+-2046|0;g=e?c*8988465674311579538646525.0e283:c;h=e?((d|0)<1023?d:1023):b+-1023|0}b=Tn(h+1023|0,0,52)|0;h=I;f[s>>2]=b;f[s+4>>2]=h;return +(g*+p[s>>3])}function ck(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;if(!(f[a+80>>2]|0)){b=0;return b|0}c=a+8|0;d=a+12|0;a=f[c>>2]|0;if(((f[d>>2]|0)-a|0)>0){e=0;g=a}else{b=1;return b|0}while(1){a=f[g+(e<<2)>>2]|0;e=e+1|0;if(!(Gl(a,a)|0)){b=0;h=5;break}g=f[c>>2]|0;if((e|0)>=((f[d>>2]|0)-g>>2|0)){b=1;h=5;break}}if((h|0)==5)return b|0;return 0}function dk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=a+36|0;d=a+40|0;e=f[c>>2]|0;if((f[d>>2]|0)==(e|0)){g=1;return g|0}h=a+60|0;a=0;i=e;while(1){e=f[i+(a<<2)>>2]|0;a=a+1|0;if(!(Sa[f[(f[e>>2]|0)+20>>2]&31](e,h,b)|0)){g=0;j=5;break}i=f[c>>2]|0;if(a>>>0>=(f[d>>2]|0)-i>>2>>>0){g=1;j=5;break}}if((j|0)==5)return g|0;return 0}function ek(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0;c=a+36|0;d=a+40|0;a=f[c>>2]|0;if((f[d>>2]|0)==(a|0)){e=1;return e|0}else{g=0;h=a}while(1){a=f[h+(g<<2)>>2]|0;g=g+1|0;if(!(Ra[f[(f[a>>2]|0)+24>>2]&127](a,b)|0)){e=0;i=4;break}h=f[c>>2]|0;if(g>>>0>=(f[d>>2]|0)-h>>2>>>0){e=1;i=4;break}}if((i|0)==4)return e|0;return 0}function fk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;f[a>>2]=0;c=a+4|0;f[c>>2]=0;f[a+8>>2]=0;d=b+4|0;e=(f[d>>2]|0)-(f[b>>2]|0)|0;g=e>>2;if(!g)return;if(g>>>0>1073741823)aq(a);h=ln(e)|0;f[c>>2]=h;f[a>>2]=h;f[a+8>>2]=h+(g<<2);g=f[b>>2]|0;b=(f[d>>2]|0)-g|0;if((b|0)<=0)return;kh(h|0,g|0,b|0)|0;f[c>>2]=h+(b>>>2<<2);return}function gk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;c=a+8|0;d=f[a>>2]|0;if((f[c>>2]|0)-d>>2>>>0>=b>>>0)return;e=a+4|0;if(b>>>0>1073741823){g=ra(8)|0;Oo(g,16035);f[g>>2]=7256;va(g|0,1112,110)}g=(f[e>>2]|0)-d|0;h=ln(b<<2)|0;if((g|0)>0)kh(h|0,d|0,g|0)|0;f[a>>2]=h;f[e>>2]=h+(g>>2<<2);f[c>>2]=h+(b<<2);if(!d)return;Oq(d);return}function hk(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0,i=0;b=a+36|0;c=a+40|0;d=f[b>>2]|0;if((f[c>>2]|0)==(d|0)){e=1;return e|0}g=a+60|0;a=0;h=d;while(1){d=f[h+(a<<2)>>2]|0;a=a+1|0;if(!(Ra[f[(f[d>>2]|0)+16>>2]&127](d,g)|0)){e=0;i=5;break}h=f[b>>2]|0;if(a>>>0>=(f[c>>2]|0)-h>>2>>>0){e=1;i=5;break}}if((i|0)==5)return e|0;return 0}function ik(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0;d=f[a+176>>2]|0;e=f[a+172>>2]|0;a=e;if((d|0)==(e|0))return 0;g=(d-e|0)/136|0;e=0;while(1){if((f[a+(e*136|0)>>2]|0)==(c|0)){h=4;break}d=e+1|0;if(d>>>0>>0)e=d;else{h=6;break}}if((h|0)==4)return ((b[a+(e*136|0)+100>>0]|0)==0?0:a+(e*136|0)+4|0)|0;else if((h|0)==6)return 0;return 0}function jk(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,h=0,i=0,j=0;d=u;u=u+16|0;e=d;g=ln(16)|0;f[e>>2]=g;f[e+8>>2]=-2147483632;f[e+4>>2]=15;h=g;i=14479;j=h+15|0;do{b[h>>0]=b[i>>0]|0;h=h+1|0;i=i+1|0}while((h|0)<(j|0));b[g+15>>0]=0;Xj(a,e,c);if((b[e+11>>0]|0)>=0){u=d;return}Oq(f[e>>2]|0);u=d;return}function kk(a,b){a=a|0;b=b|0;var c=0,d=0;c=f[a+72>>2]|0;if(!c){d=0;return d|0}f[c+4>>2]=a+60;if(!(Qa[f[(f[c>>2]|0)+12>>2]&127](c)|0)){d=0;return d|0}if(!(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)){d=0;return d|0}if(!(Ra[f[(f[a>>2]|0)+44>>2]&127](a,b)|0)){d=0;return d|0}d=Ra[f[(f[a>>2]|0)+48>>2]&127](a,b)|0;return d|0}function lk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;f[a>>2]=0;d=a+4|0;f[d>>2]=0;f[a+8>>2]=0;if(!b)return;if(b>>>0>357913941)aq(a);e=ln(b*12|0)|0;f[d>>2]=e;f[a>>2]=e;f[a+8>>2]=e+(b*12|0);a=b;b=e;do{fk(b,c);b=(f[d>>2]|0)+12|0;f[d>>2]=b;a=a+-1|0}while((a|0)!=0);return}function mk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0;c=f[b>>2]|0;if(!c){d=0;return d|0}e=a+44|0;g=f[e>>2]|0;if(g>>>0<(f[a+48>>2]|0)>>>0){f[b>>2]=0;f[g>>2]=c;f[e>>2]=(f[e>>2]|0)+4;d=1;return d|0}else{Ug(a+40|0,b);d=1;return d|0}return 0}function nk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3564;b=f[a+64>>2]|0;if(b|0){c=a+68|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}f[a+12>>2]=3588;b=f[a+32>>2]|0;if(b|0)Oq(b);b=f[a+20>>2]|0;if(!b){Oq(a);return}Oq(b);Oq(a);return}function ok(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3344;f[a+40>>2]=1196;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}f[a>>2]=1476;b=a+36|0;d=f[b>>2]|0;f[b>>2]=0;if(!d){Ni(a);Oq(a);return}Va[f[(f[d>>2]|0)+4>>2]&127](d);Ni(a);Oq(a);return}function pk(a,c){a=a|0;c=c|0;var d=0,e=0,g=0,i=0;f[c>>2]=2;d=a+4|0;a=c+8|0;e=f[a>>2]|0;g=(f[c+12>>2]|0)-e|0;if(g>>>0<4294967292){Lk(a,g+4|0,0);i=f[a>>2]|0}else i=e;e=i+g|0;g=h[d>>0]|h[d+1>>0]<<8|h[d+2>>0]<<16|h[d+3>>0]<<24;b[e>>0]=g;b[e+1>>0]=g>>8;b[e+2>>0]=g>>16;b[e+3>>0]=g>>24;return}function qk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3612;b=f[a+64>>2]|0;if(b|0){c=a+68|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}f[a+12>>2]=3636;b=f[a+32>>2]|0;if(b|0)Oq(b);b=f[a+20>>2]|0;if(!b){Oq(a);return}Oq(b);Oq(a);return}function rk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2188;b=f[a+76>>2]|0;if(b|0)Oq(b);b=a+68|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Mq(c);f[a>>2]=1544;c=f[a+32>>2]|0;if(!c){Oq(a);return}b=a+36|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);Oq(c);Oq(a);return}function sk(a,c,d){a=a|0;c=c|0;d=$(d);var e=0,g=Oa,h=0;e=Rg(a,c)|0;if((e|0)==(a+4|0)){g=d;return $(g)}a=e+28|0;if((b[a+11>>0]|0)<0)h=f[a>>2]|0;else h=a;g=$(+Iq(h));return $(g)}function tk(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=u;u=u+16|0;c=b;d=c;f[d>>2]=0;f[d+4>>2]=0;qf(a,2,c);c=f[a+12>>2]|0;d=a+16|0;e=f[d>>2]|0;if((e|0)==(c|0)){g=a+24|0;f[g>>2]=0;h=a+28|0;f[h>>2]=0;u=b;return}f[d>>2]=e+(~((e+-4-c|0)>>>2)<<2);g=a+24|0;f[g>>2]=0;h=a+28|0;f[h>>2]=0;u=b;return}function uk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0,i=0,j=0;c=f[a+176>>2]|0;d=f[a+172>>2]|0;e=d;a:do if((c|0)!=(d|0)){g=(c-d|0)/136|0;h=0;while(1){if((f[e+(h*136|0)>>2]|0)==(b|0))break;i=h+1|0;if(i>>>0>>0)h=i;else break a}j=e+(h*136|0)+104|0;return j|0}while(0);j=a+40|0;return j|0}function vk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3564;b=f[a+64>>2]|0;if(b|0){c=a+68|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}f[a+12>>2]=3588;b=f[a+32>>2]|0;if(b|0)Oq(b);b=f[a+20>>2]|0;if(!b)return;Oq(b);return}function wk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1768;b=f[a+76>>2]|0;if(b|0)Oq(b);b=a+68|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Mq(c);f[a>>2]=1544;c=f[a+32>>2]|0;if(!c){Oq(a);return}b=a+36|0;d=f[b>>2]|0;if((d|0)!=(c|0))f[b>>2]=d+(~((d+-4-c|0)>>>2)<<2);Oq(c);Oq(a);return}function xk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3344;f[a+40>>2]=1196;b=f[a+48>>2]|0;if(b|0){c=a+52|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}f[a>>2]=1476;b=a+36|0;d=f[b>>2]|0;f[b>>2]=0;if(!d){Ni(a);return}Va[f[(f[d>>2]|0)+4>>2]&127](d);Ni(a);return}function yk(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,g=0,h=0;Nc(a,b);if((b|0)<=-1)return;c=a+88|0;d=f[c>>2]|0;e=f[a+84>>2]|0;if((d-e>>2|0)<=(b|0))return;a=e+(b<<2)|0;b=a+4|0;e=d-b|0;g=e>>2;if(!g)h=d;else{im(a|0,b|0,e|0)|0;h=f[c>>2]|0}e=a+(g<<2)|0;if((h|0)==(e|0))return;f[c>>2]=h+(~((h+-4-e|0)>>>2)<<2);return}function zk(a){a=a|0;var b=0,c=0,d=0,e=0,g=0,h=0;b=f[a+32>>2]|0;c=f[a+36>>2]|0;if((b|0)==(c|0)){d=1;return d|0}e=a+8|0;g=a+44|0;a=b;while(1){b=f[(f[e>>2]|0)+(f[a>>2]<<2)>>2]|0;a=a+4|0;if(!(Ra[f[(f[b>>2]|0)+20>>2]&127](b,f[g>>2]|0)|0)){d=0;h=5;break}if((a|0)==(c|0)){d=1;h=5;break}}if((h|0)==5)return d|0;return 0}function Ak(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=3612;b=f[a+64>>2]|0;if(b|0){c=a+68|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}f[a+12>>2]=3636;b=f[a+32>>2]|0;if(b|0)Oq(b);b=f[a+20>>2]|0;if(!b)return;Oq(b);return}function Bk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0,i=0.0;d=u;u=u+128|0;e=d;g=e;h=g+124|0;do{f[g>>2]=0;g=g+4|0}while((g|0)<(h|0));g=e+4|0;f[g>>2]=a;h=e+8|0;f[h>>2]=-1;f[e+44>>2]=a;f[e+76>>2]=-1;Ym(e,0);i=+Rc(e,c,1);c=(f[g>>2]|0)-(f[h>>2]|0)+(f[e+108>>2]|0)|0;if(b|0)f[b>>2]=c|0?a+c|0:a;u=d;return +i}function Ck(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var g=0,h=0;a=c+16|0;g=f[a>>2]|0;do if(g){if((g|0)!=(d|0)){h=c+36|0;f[h>>2]=(f[h>>2]|0)+1;f[c+24>>2]=2;b[c+54>>0]=1;break}h=c+24|0;if((f[h>>2]|0)==2)f[h>>2]=e}else{f[a>>2]=d;f[c+24>>2]=e;f[c+36>>2]=1}while(0);return}function Dk(a){a=a|0;var b=0,c=0;f[a>>2]=2188;b=f[a+76>>2]|0;if(b|0)Oq(b);b=a+68|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Mq(c);f[a>>2]=1544;c=f[a+32>>2]|0;if(!c)return;b=a+36|0;a=f[b>>2]|0;if((a|0)!=(c|0))f[b>>2]=a+(~((a+-4-c|0)>>>2)<<2);Oq(c);return}function Ek(a){a=a|0;var c=0,d=0,e=0;c=a+74|0;d=b[c>>0]|0;b[c>>0]=d+255|d;d=a+20|0;c=a+28|0;if((f[d>>2]|0)>>>0>(f[c>>2]|0)>>>0)Sa[f[a+36>>2]&31](a,0,0)|0;f[a+16>>2]=0;f[c>>2]=0;f[d>>2]=0;d=f[a>>2]|0;if(!(d&4)){c=(f[a+44>>2]|0)+(f[a+48>>2]|0)|0;f[a+8>>2]=c;f[a+4>>2]=c;e=d<<27>>31}else{f[a>>2]=d|32;e=-1}return e|0}function Fk(a,c){a=a|0;c=c|0;var d=0,e=0,g=0;d=Rg(a,c)|0;if((d|0)==(a+4|0)){e=0;return e|0}a=d+28|0;if((b[a+11>>0]|0)<0)g=f[a>>2]|0;else g=a;e=((Sj(g)|0)+1|0)>>>0>1;return e|0}function Gk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=6152;b=f[a+96>>2]|0;if(b|0){c=a+100|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);Oq(b)}b=f[a+84>>2]|0;if(!b){Og(a);Oq(a);return}d=a+88|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b);Og(a);Oq(a);return}function Hk(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,g=0,h=0;e=Rg(a,c)|0;if((e|0)==(a+4|0)){g=d;return g|0}d=e+28|0;if((b[d+11>>0]|0)<0)h=f[d>>2]|0;else h=d;g=Sj(h)|0;return g|0}function Ik(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=b>>31|((b|0)<0?-1:0)<<1;f=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;g=d>>31|((d|0)<0?-1:0)<<1;h=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;i=Xn(e^a|0,f^b|0,e|0,f|0)|0;b=I;a=g^e;e=h^f;return Xn((Ld(i,b,Xn(g^c|0,h^d|0,g|0,h|0)|0,I,0)|0)^a|0,I^e|0,a|0,e|0)|0}function Jk(a){a=a|0;var b=0,c=0;f[a>>2]=1768;b=f[a+76>>2]|0;if(b|0)Oq(b);b=a+68|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Mq(c);f[a>>2]=1544;c=f[a+32>>2]|0;if(!c)return;b=a+36|0;a=f[b>>2]|0;if((a|0)!=(c|0))f[b>>2]=a+(~((a+-4-c|0)>>>2)<<2);Oq(c);return}function Kk(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0,i=0,j=0;f[a>>2]=b;h=b+16|0;i=f[h+4>>2]|0;j=a+8|0;f[j>>2]=f[h>>2];f[j+4>>2]=i;i=b+24|0;b=f[i+4>>2]|0;j=a+16|0;f[j>>2]=f[i>>2];f[j+4>>2]=b;b=a+40|0;f[b>>2]=c;f[b+4>>2]=d;d=a+48|0;f[d>>2]=e;f[d+4>>2]=g;return}function Lk(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=d-e|0;h=e;e=d;if(g>>>0>=b>>>0){if(g>>>0>b>>>0?(d=h+b|0,(d|0)!=(e|0)):0)f[c>>2]=d}else Fi(a,b-g|0);g=a+24|0;a=g;b=Vn(f[a>>2]|0,f[a+4>>2]|0,1,0)|0;a=g;f[a>>2]=b;f[a+4>>2]=I;return}function Mk(a,c){a=a|0;c=c|0;var d=0,e=0,g=0;d=Rg(a,c)|0;if((d|0)==(a+4|0)){e=-1;return e|0}a=d+28|0;if((b[a+11>>0]|0)<0)g=f[a>>2]|0;else g=a;e=Sj(g)|0;return e|0}function Nk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=6152;b=f[a+96>>2]|0;if(b|0){c=a+100|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~(((d+-12-b|0)>>>0)/12|0)*12|0);Oq(b)}b=f[a+84>>2]|0;if(!b){Og(a);return}d=a+88|0;c=f[d>>2]|0;if((c|0)!=(b|0))f[d>>2]=c+(~((c+-4-b|0)>>>2)<<2);Oq(b);Og(a);return}function Ok(a){a=a|0;var c=0,d=0,e=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;b[a+24>>0]=1;c=a+68|0;d=a+28|0;e=d+40|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(e|0));f[c>>2]=a;c=a+72|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;f[c+20>>2]=0;return}function Pk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2244;b=f[a+76>>2]|0;if(b|0)Oq(b);f[a>>2]=1544;b=f[a+32>>2]|0;if(!b){Oq(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b);Oq(a);return}function Qk(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=u;u=u+256|0;g=f;if((c|0)>(d|0)&(e&73728|0)==0){e=c-d|0;sj(g|0,b<<24>>24|0,(e>>>0<256?e:256)|0)|0;if(e>>>0>255){b=c-d|0;d=e;do{Xo(a,g,256);d=d+-256|0}while(d>>>0>255);h=b&255}else h=e;Xo(a,g,h)}u=f;return}function Rk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1824;b=f[a+76>>2]|0;if(b|0)Oq(b);f[a>>2]=1544;b=f[a+32>>2]|0;if(!b){Oq(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b);Oq(a);return}function Sk(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;var h=0;if(fp(a,f[b+8>>2]|0,g)|0)qj(0,b,c,d,e);else{h=f[a+8>>2]|0;_a[f[(f[h>>2]|0)+20>>2]&3](h,b,c,d,e,g)}return}function Tk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=2300;Fj(a+108|0);f[a>>2]=1544;b=f[a+32>>2]|0;if(!b){Oq(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b);Oq(a);return}function Uk(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1880;Fj(a+108|0);f[a>>2]=1544;b=f[a+32>>2]|0;if(!b){Oq(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b);Oq(a);return}function Vk(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;a:do if(!d)e=0;else{f=a;g=d;h=c;while(1){i=b[f>>0]|0;j=b[h>>0]|0;if(i<<24>>24!=j<<24>>24)break;g=g+-1|0;if(!g){e=0;break a}else{f=f+1|0;h=h+1|0}}e=(i&255)-(j&255)|0}while(0);return e|0}function Wk(a){a=a|0;if(!(f[a+44>>2]|0))return 0;if(!(f[a+48>>2]|0))return 0;if(!(f[a+24>>2]|0))return 0;if(!(f[a+28>>2]|0))return 0;if(!(f[a+32>>2]|0))return 0;else return (f[a+36>>2]|0)!=0|0;return 0}function Xk(a){a=a|0;var b=0,c=0;f[a>>2]=2244;b=f[a+76>>2]|0;if(b|0)Oq(b);f[a>>2]=1544;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);Oq(b);return}function Yk(a){a=a|0;var c=0,d=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;c=0;while(1){if((c|0)==3)break;f[a+(c<<2)>>2]=0;c=c+1|0}if((b[a+11>>0]|0)<0)d=(f[a+8>>2]&2147483647)+-1|0;else d=10;Hj(a,d,0);return}function Zk(a){a=a|0;var b=0,c=0,d=0,e=0.0,g=0.0;b=f[a+8>>2]|0;if((b|0)<2){c=0;d=0;I=c;return d|0}e=+(b|0);g=+Zg(e)*e;e=+W(+(g-+p[a>>3]));c=+K(e)>=1.0?(e>0.0?~~+Y(+J(e/4294967296.0),4294967295.0)>>>0:~~+W((e-+(~~e>>>0))/4294967296.0)>>>0):0;d=~~e>>>0;I=c;return d|0}function _k(a){a=a|0;var b=0,c=0;f[a>>2]=1824;b=f[a+76>>2]|0;if(b|0)Oq(b);f[a>>2]=1544;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);Oq(b);return}function $k(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=f[a+16>>2]|0;if(((f[a+20>>2]|0)-c>>2|0)<=(b|0)){d=0;return d|0}e=f[c+(b<<2)>>2]|0;if((e|0)<0){d=0;return d|0}b=f[(f[a+36>>2]|0)+(e<<2)>>2]|0;e=f[b+32>>2]|0;if(e|0){d=e;return d|0}d=f[b+8>>2]|0;return d|0}function al(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1232;b=f[a+16>>2]|0;if(b|0){c=a+20|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b)}b=f[a+4>>2]|0;if(!b)return;d=a+8|0;a=f[d>>2]|0;if((a|0)!=(b|0))f[d>>2]=a+(~((a+-4-b|0)>>>2)<<2);Oq(b);return}function bl(a){a=a|0;var b=0,c=0;f[a>>2]=2300;Fj(a+108|0);f[a>>2]=1544;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);Oq(b);return}function cl(a){a=a|0;if(!(f[a+64>>2]|0))return 0;if(!(f[a+68>>2]|0))return 0;if(!(f[a+44>>2]|0))return 0;if(!(f[a+48>>2]|0))return 0;if(!(f[a+52>>2]|0))return 0;else return (f[a+56>>2]|0)!=0|0;return 0}function dl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if(fp(a,f[b+8>>2]|0,0)|0)Ck(0,b,c,d);else{e=f[a+8>>2]|0;Ya[f[(f[e>>2]|0)+28>>2]&3](e,b,c,d)}return}function el(a){a=a|0;var b=0,c=0;f[a>>2]=1880;Fj(a+108|0);f[a>>2]=1544;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);Oq(b);return}function fl(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)<0){c=0;return c|0}d=f[a+4>>2]|0;if(((f[d+12>>2]|0)-(f[d+8>>2]|0)>>2|0)<=(b|0)){c=0;return c|0}d=f[(f[a+8>>2]|0)+(f[(f[a+20>>2]|0)+(b<<2)>>2]<<2)>>2]|0;c=Ra[f[(f[d>>2]|0)+36>>2]&127](d,b)|0;return c|0}function gl(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)<0){c=0;return c|0}d=f[a+4>>2]|0;if(((f[d+12>>2]|0)-(f[d+8>>2]|0)>>2|0)<=(b|0)){c=0;return c|0}d=f[(f[a+8>>2]|0)+(f[(f[a+20>>2]|0)+(b<<2)>>2]<<2)>>2]|0;c=Ra[f[(f[d>>2]|0)+32>>2]&127](d,b)|0;return c|0}function hl(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0;d=b[a>>0]|0;e=b[c>>0]|0;if(d<<24>>24==0?1:d<<24>>24!=e<<24>>24){f=e;g=d}else{d=c;c=a;do{c=c+1|0;d=d+1|0;a=b[c>>0]|0;e=b[d>>0]|0}while(!(a<<24>>24==0?1:a<<24>>24!=e<<24>>24));f=e;g=a}return (g&255)-(f&255)|0}function il(a,b){a=a|0;b=$(b);var c=0,d=0;c=u;u=u+16|0;d=c;Yk(d);Ei(a,d,b);Bo(d);u=c;return}function jl(a){a=a|0;var b=0,c=0,d=0,e=0,g=0;b=f[a>>2]|0;c=a+4|0;d=f[c>>2]|0;if((d|0)==(b|0))e=b;else{g=d+(~((d+-4-b|0)>>>2)<<2)|0;f[c>>2]=g;e=g}f[a+12>>2]=0;f[a+16>>2]=0;if(!b)return;if((e|0)!=(b|0))f[c>>2]=e+(~((e+-4-b|0)>>>2)<<2);Oq(b);return}function kl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=f[a+16>>2]|0;if(((f[a+20>>2]|0)-d>>2|0)<=(b|0)){e=-1;return e|0}g=f[d+(b<<2)>>2]|0;if((g|0)<0){e=-1;return e|0}e=f[(f[(f[(f[a+36>>2]|0)+(g<<2)>>2]|0)+16>>2]|0)+(c<<2)>>2]|0;return e|0}function ll(a,b){a=a|0;b=b|0;var c=0,d=0;c=u;u=u+16|0;d=c;Yk(d);Ji(a,d,b);Bo(d);u=c;return}function ml(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0,h=0;d=u;u=u+32|0;e=d;g=d+20|0;f[e>>2]=f[a+60>>2];f[e+4>>2]=0;f[e+8>>2]=b;f[e+12>>2]=g;f[e+16>>2]=c;if((to(za(140,e|0)|0)|0)<0){f[g>>2]=-1;h=-1}else h=f[g>>2]|0;u=d;return h|0}function nl(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)==-1|(b|0)>4){c=0;return c|0}d=f[a+20+(b*12|0)>>2]|0;if(((f[a+20+(b*12|0)+4>>2]|0)-d|0)<=0){c=0;return c|0}b=f[d>>2]|0;if((b|0)==-1){c=0;return c|0}c=f[(f[a+8>>2]|0)+(b<<2)>>2]|0;return c|0}function ol(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=f[a+16>>2]|0;if(((f[a+20>>2]|0)-c>>2|0)<=(b|0)){d=0;return d|0}e=f[c+(b<<2)>>2]|0;if((e|0)<0){d=0;return d|0}b=f[(f[a+36>>2]|0)+(e<<2)>>2]|0;d=(f[b+20>>2]|0)-(f[b+16>>2]|0)>>2;return d|0}function pl(a){a=a|0;if(!(f[a+40>>2]|0))return 0;if(!(f[a+24>>2]|0))return 0;if(!(f[a+28>>2]|0))return 0;if(!(f[a+32>>2]|0))return 0;else return (f[a+36>>2]|0)!=0|0;return 0}function ql(a){a=a|0;var b=0;if(!(f[a+24>>2]|0)){b=0;return b|0}if(!(f[a+28>>2]|0)){b=0;return b|0}if(!(f[a+32>>2]|0)){b=0;return b|0}b=(f[a+36>>2]|0)!=0;return b|0}function rl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;lh(a,c);f[a>>2]=1408;c=a+72|0;d=a+36|0;a=d+36|0;do{f[d>>2]=0;d=d+4|0}while((d|0)<(a|0));d=f[b>>2]|0;f[b>>2]=0;f[c>>2]=d;return}function sl(a){a=a|0;var b=0,c=0;f[a>>2]=3148;b=f[a+56>>2]|0;if(b|0)Oq(b);b=a+48|0;c=f[b>>2]|0;f[b>>2]=0;if(!c){Oq(a);return}Mq(c);Oq(a);return}function tl(a,c){a=a|0;c=c|0;var d=0,e=0;d=a;e=c;c=d+64|0;do{f[d>>2]=f[e>>2];d=d+4|0;e=e+4|0}while((d|0)<(c|0));e=a+64|0;f[a+88>>2]=0;f[e>>2]=0;f[e+4>>2]=0;f[e+8>>2]=0;f[e+12>>2]=0;f[e+16>>2]=0;b[e+20>>0]=0;return}function ul(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;if((a|0)==0&(c|0)==0)f=d;else{g=d;d=c;c=a;while(1){a=g+-1|0;b[a>>0]=h[16636+(c&15)>>0]|0|e;c=Yn(c|0,d|0,4)|0;d=I;if((c|0)==0&(d|0)==0){f=a;break}else g=a}}return f|0}function vl(a){a=a|0;var c=0,d=0,e=0;c=a+74|0;d=b[c>>0]|0;b[c>>0]=d+255|d;d=f[a>>2]|0;if(!(d&8)){f[a+8>>2]=0;f[a+4>>2]=0;c=f[a+44>>2]|0;f[a+28>>2]=c;f[a+20>>2]=c;f[a+16>>2]=c+(f[a+48>>2]|0);e=0}else{f[a>>2]=d|32;e=-1}return e|0}function wl(a){a=a|0;if(!(f[a+60>>2]|0))return 0;if(!(f[a+44>>2]|0))return 0;if(!(f[a+48>>2]|0))return 0;if(!(f[a+52>>2]|0))return 0;else return (f[a+56>>2]|0)!=0|0;return 0}function xl(a,b){a=a|0;b=b|0;var c=0,d=0;c=f[b+88>>2]|0;if(!c){d=0;return d|0}if((f[c>>2]|0)!=2){d=0;return d|0}b=f[c+8>>2]|0;f[a+4>>2]=h[b>>0]|h[b+1>>0]<<8|h[b+2>>0]<<16|h[b+3>>0]<<24;d=1;return d|0}function yl(a){a=a|0;var b=0;if(!(f[a+44>>2]|0)){b=0;return b|0}if(!(f[a+48>>2]|0)){b=0;return b|0}if(!(f[a+52>>2]|0)){b=0;return b|0}b=(f[a+56>>2]|0)!=0;return b|0}function zl(a){a=a|0;vj(a);Oq(a);return}function Al(a){a=a|0;var b=0,c=0;f[a>>2]=2784;b=f[a+56>>2]|0;if(b|0)Oq(b);b=a+48|0;c=f[b>>2]|0;f[b>>2]=0;if(!c){Oq(a);return}Mq(c);Oq(a);return}function Bl(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+44>>2]=c;d=1;return d|0}function Cl(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;c=a+4|0;d=f[c>>2]|0;e=f[a>>2]|0;g=d-e|0;if(g>>>0>>0){Fi(a,b-g|0);return}if(g>>>0<=b>>>0)return;g=e+b|0;if((g|0)==(d|0))return;f[c>>2]=g;return}function Dl(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=$(e);f[a+4>>2]=b;Zf(a+8|0,c,c+(d<<2)|0);n[a+20>>2]=e;return}function El(a,b){a=a|0;b=b|0;var c=0;if(!(Qa[f[(f[a>>2]|0)+40>>2]&127](a)|0)){c=0;return c|0}if(!(Ra[f[(f[a>>2]|0)+44>>2]&127](a,b)|0)){c=0;return c|0}c=Ra[f[(f[a>>2]|0)+48>>2]&127](a,b)|0;return c|0}function Fl(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+40>>2]=c;d=1;return d|0}function Gl(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=u;u=u+16|0;d=c+4|0;e=c;f[e>>2]=0;f[d>>2]=f[e>>2];e=vc(a,b,d)|0;u=c;return e|0}function Hl(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;d=f[c>>2]|0;c=a;e=b-a>>2;while(1){if(!e)break;a=(e|0)/2|0;b=c+(a<<2)|0;g=(f[b>>2]|0)>>>0>>0;c=g?b+4|0:c;e=g?e+-1-a|0:a}return c|0}function Il(a){a=a|0;var c=0;f[a>>2]=0;c=a+8|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;b[a+24>>0]=1;f[a+28>>2]=9;c=a+40|0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[a+56>>2]=-1;f[a+60>>2]=0;return}function Jl(a){a=a|0;yj(a);Oq(a);return}function Kl(a){a=a|0;var b=0;f[a>>2]=3148;b=f[a+56>>2]|0;if(b|0)Oq(b);b=a+48|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;Mq(a);return}function Ll(a){a=a|0;var c=0,d=0,e=0,g=0,h=0;if(!(Aq(b[f[a>>2]>>0]|0)|0))c=0;else{d=0;while(1){e=f[a>>2]|0;g=(d*10|0)+-48+(b[e>>0]|0)|0;h=e+1|0;f[a>>2]=h;if(!(Aq(b[h>>0]|0)|0)){c=g;break}else d=g}}return c|0}function Ml(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+64>>2]=c;d=1;return d|0}function Nl(a){a=a|0;var b=0,c=0;b=f[r>>2]|0;c=b+a|0;if((a|0)>0&(c|0)<(b|0)|(c|0)<0){ea()|0;ya(12);return -1}f[r>>2]=c;if((c|0)>(da()|0)?(ca()|0)==0:0){f[r>>2]=b;ya(12);return -1}return b|0}function Ol(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0;if((a|0)==0&(c|0)==0)e=d;else{f=d;d=c;c=a;while(1){a=f+-1|0;b[a>>0]=c&7|48;c=Yn(c|0,d|0,3)|0;d=I;if((c|0)==0&(d|0)==0){e=a;break}else f=a}}return e|0}function Pl(a,c){a=a|0;c=c|0;var d=0;if(f[c+56>>2]|0){d=0;return d|0}if((b[c+24>>0]|0)!=3){d=0;return d|0}f[a+60>>2]=c;d=1;return d|0}function Ql(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1544;b=f[a+32>>2]|0;if(!b){Oq(a);return}c=a+36|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b);Oq(a);return}function Rl(a,b,c,d,e,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;g=g|0;if(fp(a,f[b+8>>2]|0,g)|0)qj(0,b,c,d,e);return}function Sl(a){a=a|0;var b=0;f[a>>2]=2784;b=f[a+56>>2]|0;if(b|0)Oq(b);b=a+48|0;a=f[b>>2]|0;f[b>>2]=0;if(!a)return;Mq(a);return}function Tl(a){a=a|0;var c=0,d=0,e=0,g=0;c=u;u=u+16|0;d=c;e=f[a+4>>2]|0;g=(f[e+56>>2]|0)-(f[e+52>>2]|0)>>2;b[d>>0]=0;qh(a+20|0,g,d);u=c;return}function Ul(a){a=a|0;Vi(a);Oq(a);return}function Vl(a){a=a|0;var b=0;switch(a|0){case 11:case 2:case 1:{b=1;break}case 4:case 3:{b=2;break}case 6:case 5:{b=4;break}case 8:case 7:{b=8;break}case 9:{b=4;break}case 10:{b=8;break}default:b=-1}return b|0}function Wl(a){a=a|0;var c=0,d=0,e=0,g=0;c=u;u=u+16|0;d=c;e=f[a+4>>2]|0;g=(f[e+28>>2]|0)-(f[e+24>>2]|0)>>2;b[d>>0]=0;qh(a+20|0,g,d);u=c;return}function Xl(){var a=0,b=0;a=ln(40)|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;n[a+16>>2]=$(1.0);b=a+20|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;n[a+36>>2]=$(1.0);return a|0}function Yl(a,b){a=+a;b=+b;var c=0,d=0,e=0;p[s>>3]=a;c=f[s>>2]|0;d=f[s+4>>2]|0;p[s>>3]=b;e=f[s+4>>2]&-2147483648|d&2147483647;f[s>>2]=c;f[s+4>>2]=e;return +(+p[s>>3])}function Zl(a,b,c){a=a|0;b=b|0;c=+c;var d=0,e=0;d=u;u=u+16|0;e=d;p[e>>3]=c;_b(a,b,e);u=d;return}function _l(a){a=a|0;f[a>>2]=3656;Qi(a+8|0);Oq(a);return}function $l(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=u;u=u+16|0;e=d;f[e>>2]=c;fc(a,b,e);u=d;return}function am(a,c){a=a|0;c=c|0;var d=0,e=0;if((a|0)!=(c|0)){d=b[c+11>>0]|0;e=d<<24>>24<0;jj(a,e?f[c>>2]|0:c,e?f[c+4>>2]|0:d&255)|0}return a|0}function bm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=a&65535;d=b&65535;e=X(d,c)|0;f=a>>>16;a=(e>>>16)+(X(d,f)|0)|0;d=b>>>16;b=X(d,c)|0;return (I=(a>>>16)+(X(d,f)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|e&65535|0)|0}function cm(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=Gj(b)|0;d=ln(c+13|0)|0;f[d>>2]=c;f[d+4>>2]=c;f[d+8>>2]=0;e=Fp(d)|0;kh(e|0,b|0,c+1|0)|0;f[a>>2]=e;return}function dm(a,b){a=a|0;b=b|0;var c=0,d=0;if((b|0)==-1|(b|0)>4){c=-1;return c|0}d=f[a+20+(b*12|0)>>2]|0;if(((f[a+20+(b*12|0)+4>>2]|0)-d|0)<=0){c=-1;return c|0}c=f[d>>2]|0;return c|0}function em(a){a=a|0;Yi(a);Oq(a);return}function fm(a){a=a|0;f[a>>2]=3656;Qi(a+8|0);return}function gm(a){a=a|0;var b=0,c=0;f[a>>2]=1544;b=f[a+32>>2]|0;if(!b)return;c=a+36|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);Oq(b);return}function hm(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if(fp(a,f[b+8>>2]|0,0)|0)Ck(0,b,c,d);return}function im(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;if((c|0)<(a|0)&(a|0)<(c+d|0)){e=a;c=c+d|0;a=a+d|0;while((d|0)>0){a=a-1|0;c=c-1|0;d=d-1|0;b[a>>0]=b[c>>0]|0}a=e}else kh(a,c,d)|0;return a|0}function jm(a){a=a|0;var b=0,c=0,d=0;f[a>>2]=1196;b=f[a+8>>2]|0;if(!b){Oq(a);return}c=a+12|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);Oq(b);Oq(a);return}function km(a){a=a|0;var b=0;f[a>>2]=3204;b=f[a+56>>2]|0;if(!b){Oq(a);return}Oq(b);Oq(a);return}function lm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=u;u=u+16|0;e=d;f[e>>2]=f[c>>2];g=Sa[f[(f[a>>2]|0)+16>>2]&31](a,b,e)|0;if(g)f[c>>2]=f[e>>2];u=d;return g&1|0}function mm(a,b){a=a|0;b=b|0;var c=0;if(b>>>0>=2){c=0;return c|0}f[a+28>>2]=b;c=1;return c|0}function nm(a){a=a|0;var b=0,c=0;f[a>>2]=3408;b=a+56|0;c=f[b>>2]|0;f[b>>2]=0;if(!c){mj(a);return}Va[f[(f[c>>2]|0)+4>>2]&127](c);mj(a);return}function om(){var a=0,b=0;a=sn()|0;if((a|0?(b=f[a>>2]|0,b|0):0)?(a=b+48|0,(f[a>>2]&-256|0)==1126902528?(f[a+4>>2]|0)==1129074247:0):0)Ho(f[b+12>>2]|0);Ho(Qp()|0)}function pm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Qf(a,b,c,d,e,f,6)|0}function qm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Pf(a,b,c,d,e,f,4)|0}function rm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Wf(a,b,c,d,e,f,2)|0}function sm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Pf(a,b,c,d,e,f,3)|0}function tm(a){a=a|0;var b=0;f[a>>2]=2840;b=f[a+56>>2]|0;if(!b){Oq(a);return}Oq(b);Oq(a);return}function um(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Wf(a,b,c,d,e,f,1)|0}function vm(a){a=a|0;var c=0;c=b[w+(a&255)>>0]|0;if((c|0)<8)return c|0;c=b[w+(a>>8&255)>>0]|0;if((c|0)<8)return c+8|0;c=b[w+(a>>16&255)>>0]|0;if((c|0)<8)return c+16|0;return (b[w+(a>>>24)>>0]|0)+24|0}function wm(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0.0,f=0.0;if(!a){c=0.0;return +c}if((b|0)==0|(a|0)==(b|0)){c=0.0;return +c}d=+(b>>>0)/+(a>>>0);e=1.0-d;f=d*+Zg(d);c=-(f+e*+Zg(e));return +c}function xm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if((b|0)>0)d=0;else return;do{e=f[a+(d<<2)>>2]|0;f[c+(d<<2)>>2]=e<<1^e>>31;d=d+1|0}while((d|0)!=(b|0));return}function ym(a){a=a|0;var b=0;zo(a);f[a>>2]=3344;f[a+40>>2]=1196;f[a+44>>2]=-1;b=a+48|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;return}function zm(a,c){a=a|0;c=c|0;var d=0;b[c+84>>0]=1;a=f[c+68>>2]|0;d=c+72|0;c=f[d>>2]|0;if((c|0)==(a|0))return 1;f[d>>2]=c+(~((c+-4-a|0)>>>2)<<2);return 1}function Am(a){a=a|0;var b=0,c=0;if(pq(a)|0?(b=Mp(f[a>>2]|0)|0,a=b+8|0,c=f[a>>2]|0,f[a>>2]=c+-1,(c+-1|0)<0):0)Oq(b);return}function Bm(a){a=a|0;var b=0,c=0;b=f[a+16>>2]|0;c=(((f[a+12>>2]|0)+1-b|0)/64|0)+b<<3;a=b<<3;b=Vn(c|0,((c|0)<0)<<31>>31|0,a|0,((a|0)<0)<<31>>31|0)|0;return b|0}function Cm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Qf(a,b,c,d,e,f,5)|0}function Dm(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Qf(a,b,c,d,e,f,9)|0}function Em(a){a=a|0;var b=0;f[a>>2]=3204;b=f[a+56>>2]|0;if(!b)return;Oq(b);return}function Fm(a){a=a|0;var b=0,c=0;f[a>>2]=1476;b=a+36|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&127](c);Ni(a);Oq(a);return}function Gm(a){a=a|0;var b=0,c=0;f[a>>2]=1196;b=f[a+8>>2]|0;if(!b)return;c=a+12|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);Oq(b);return}function Hm(a){a=a|0;var c=0;f[a>>2]=1352;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=-1;c=a+16|0;f[a+32>>2]=0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;b[c+12>>0]=0;return}function Im(a){a=a|0;var b=0;f[a>>2]=2840;b=f[a+56>>2]|0;if(!b)return;Oq(b);return}function Jm(a){a=a|0;var b=0,c=0;f[a>>2]=1476;b=a+36|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&127](c);Ni(a);return}function Km(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=$(f);Fg(a,b,c,d,e,f);return}function Lm(a){a=a|0;var b=0,c=0;f[a>>2]=3408;b=a+56|0;c=f[b>>2]|0;f[b>>2]=0;if(c|0)Va[f[(f[c>>2]|0)+4>>2]&127](c);mj(a);Oq(a);return}function Mm(a){a=a|0;var b=0,c=0,d=0;b=f[a>>2]|0;c=a+4|0;d=f[c>>2]|0;if((d|0)!=(b|0))f[c>>2]=d+(~((d+-4-b|0)>>>2)<<2);f[a+12>>2]=0;f[a+16>>2]=0;return}function Nm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,g=0;d=a+20|0;e=f[d>>2]|0;g=(f[a+16>>2]|0)-e|0;a=g>>>0>c>>>0?c:g;kh(e|0,b|0,a|0)|0;f[d>>2]=(f[d>>2]|0)+a;return c|0}function Om(a){a=a|0;var b=0;f[a>>2]=3588;b=f[a+20>>2]|0;if(b|0)Oq(b);b=f[a+8>>2]|0;if(!b){Oq(a);return}Oq(b);Oq(a);return}function Pm(a){a=a|0;var b=0,c=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-8-b|0)>>>3)<<3);Oq(b);return}function Qm(a){a=a|0;var b=0,c=0;b=f[a>>2]|0;if(!b)return;c=a+4|0;a=f[c>>2]|0;if((a|0)!=(b|0))f[c>>2]=a+(~((a+-4-b|0)>>>2)<<2);Oq(b);return}function Rm(a,b){a=a|0;b=b|0;var c=0;c=f[b>>2]|0;return (1<<(c&31)&f[(f[a+28>>2]|0)+(c>>>5<<2)>>2]|0)!=0|0}function Sm(a,b,c){a=a|0;b=b|0;c=c|0;return Sa[f[(f[a>>2]|0)+44>>2]&31](a,b,c)|0}function Tm(a){a=a|0;var c=0;Il(a);c=a+64|0;f[a+88>>2]=0;f[c>>2]=0;f[c+4>>2]=0;f[c+8>>2]=0;f[c+12>>2]=0;f[c+16>>2]=0;b[c+20>>0]=0;return}function Um(a){a=a|0;f[a>>2]=3260;Fj(a+88|0);Oq(a);return}function Vm(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;if((f[b+4>>2]|0)==(c|0)?(c=b+28|0,(f[c>>2]|0)!=1):0)f[c>>2]=d;return}function Wm(a){a=a|0;var b=0,c=0,d=0;b=u;u=u+16|0;c=b;if((Ek(a)|0)==0?(Sa[f[a+32>>2]&31](a,c,1)|0)==1:0)d=h[c>>0]|0;else d=-1;u=b;return d|0}function Xm(a){a=a|0;var b=0;f[a>>2]=3636;b=f[a+20>>2]|0;if(b|0)Oq(b);b=f[a+8>>2]|0;if(!b){Oq(a);return}Oq(b);Oq(a);return}function Ym(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;f[a+104>>2]=b;c=f[a+8>>2]|0;d=f[a+4>>2]|0;e=c-d|0;f[a+108>>2]=e;f[a+100>>2]=(b|0)!=0&(e|0)>(b|0)?d+b|0:c;return}function Zm(a){a=a|0;var b=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;b=a+16|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;return}function _m(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=$(f);Km(a,b,c,d,e,f);return}function $m(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return pm(a,b,c,d,e,f)|0}function an(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return qm(a,b,c,d,e,f)|0}function bn(a,b,c){a=a|0;b=b|0;c=c|0;f[a+4>>2]=b;f[a+8>>2]=f[(f[(f[b+4>>2]|0)+8>>2]|0)+(c<<2)>>2];f[a+12>>2]=c;return 1}function cn(a){a=a|0;var b=0,c=0;if(!a)return;b=f[a>>2]|0;if(b|0){c=a+4|0;if((f[c>>2]|0)!=(b|0))f[c>>2]=b;Oq(b)}Oq(a);return}function dn(a){a=a|0;f[a>>2]=2896;Fj(a+88|0);Oq(a);return}function en(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return rm(a,b,c,d,e,f)|0}function fn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return sm(a,b,c,d,e,f)|0}function gn(a){a=a|0;f[a>>2]=3260;Fj(a+88|0);return}function hn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e|0;Ld(a,b,c,d,g)|0;u=e;return (I=f[g+4>>2]|0,f[g>>2]|0)|0}function jn(a){a=a|0;var b=0;eo(a);f[a>>2]=6152;b=a+84|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;f[b+16>>2]=0;f[b+20>>2]=0;return}function kn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return um(a,b,c,d,e,f)|0}function ln(a){a=a|0;var b=0,c=0;b=(a|0)==0?1:a;while(1){a=$a(b)|0;if(a|0){c=a;break}a=Op()|0;if(!a){c=0;break}Ua[a&3]()}return c|0}function mn(a,b,c){a=a|0;b=b|0;c=c|0;ac(a,b,c);return}function nn(a){a=a|0;var b=0;f[a>>2]=3588;b=f[a+20>>2]|0;if(b|0)Oq(b);b=f[a+8>>2]|0;if(!b)return;Oq(b);return}function on(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Cm(a,b,c,d,e,f)|0}function pn(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Dm(a,b,c,d,e,f)|0}function qn(a){a=a|0;f[a>>2]=2896;Fj(a+88|0);return}function rn(a){a=a|0;var b=0,c=0,d=0;b=u;u=u+16|0;c=b;d=Qq(f[a+60>>2]|0)|0;f[c>>2]=d;d=to(Ba(6,c|0)|0)|0;u=b;return d|0}function sn(){var a=0,b=0;a=u;u=u+16|0;if(!(Ka(19700,3)|0)){b=Ia(f[4926]|0)|0;u=a;return b|0}else Hn(18840,a);return 0}function tn(a){a=a|0;var b=0;f[a>>2]=3636;b=f[a+20>>2]|0;if(b|0)Oq(b);b=f[a+8>>2]|0;if(!b)return;Oq(b);return}function un(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;a=c;c=bm(e,a)|0;f=I;return (I=(X(b,a)|0)+(X(d,e)|0)+f|f&0,c|0|0)|0}function vn(a,b){a=a|0;b=b|0;lh(a,b);f[a>>2]=1292;b=a+36|0;a=b+40|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function wn(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;f[a+24>>2]=0;f[a+28>>2]=0;return}function xn(a){a=a|0;var b=0;b=u;u=u+16|0;yc(a);if(!(La(f[4926]|0,0)|0)){u=b;return}else Hn(18939,b)}function yn(a){a=a|0;var b=0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;b=a+16|0;f[b>>2]=0;f[b+4>>2]=0;f[b+8>>2]=0;f[b+12>>2]=0;return}function zn(a,b){a=a|0;b=b|0;return vg(a+40|0,b)|0}function An(a,b){a=a|0;b=b|0;return lj(a,b,lq(b)|0)|0}function Bn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,g=0;e=u;u=u+16|0;g=e;f[g>>2]=d;d=Zi(a,b,c,g)|0;u=e;return d|0}function Cn(a,b){a=a|0;b=b|0;return Mj(a+40|0,b)|0}function Dn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Qh(a,b,c,d)|0}function En(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return uh(a,b,c,d)|0}function Fn(a,b){a=a|0;b=b|0;var c=0;c=f[a+56>>2]|0;return Ra[f[(f[c>>2]|0)+24>>2]&127](c,b)|0}function Gn(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;f[a+20>>2]=0;b[a+24>>0]=0;return}function Hn(a,b){a=a|0;b=b|0;var c=0,d=0;c=u;u=u+16|0;d=c;f[d>>2]=b;b=f[1556]|0;Ah(b,a,d)|0;Lj(10,b)|0;Ca()}function In(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;return Ta[a&31](b|0,c|0,d|0,e|0,f|0,g|0)|0}function Jn(a,b){a=a|0;b=b|0;var c=0;c=f[a+56>>2]|0;return Ra[f[(f[c>>2]|0)+16>>2]&127](c,b)|0}function Kn(a,b){a=a|0;b=b|0;var c=0;c=f[a+56>>2]|0;return Ra[f[(f[c>>2]|0)+20>>2]&127](c,b)|0}function Ln(a,b){a=a|0;b=b|0;var c=0;c=f[a+56>>2]|0;return Ra[f[(f[c>>2]|0)+12>>2]&127](c,b)|0}function Mn(){var a=0;a=u;u=u+16|0;if(!(Ja(19704,113)|0)){u=a;return}else Hn(18889,a)}function Nn(a,b,c){a=a|0;b=b|0;c=c|0;Pj(a,b,c);return}function On(a){a=a|0;cf(a);Oq(a);return}function Pn(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;_a[a&3](b|0,c|0,d|0,e|0,f|0,g|0)}function Qn(a,b,c){a=a|0;b=b|0;c=c|0;if(b|0)sj(a|0,(kq(c)|0)&255|0,b|0)|0;return a|0}function Rn(a){a=a|0;return 4}function Sn(a,b,c){a=a|0;b=b|0;c=c|0;return ej(0,b,c)|0}function Tn(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){I=b<>>32-c;return a<>>0;return (I=b+d+(e>>>0>>0|0)>>>0,e|0)|0}function Wn(a,b){a=a|0;b=b|0;var c=0;if(!b)c=0;else c=Dh(f[b>>2]|0,f[b+4>>2]|0,a)|0;return (c|0?c:a)|0}function Xn(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=b-d>>>0;e=b-d-(c>>>0>a>>>0|0)>>>0;return (I=e,a-c>>>0|0)|0}function Yn(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){I=b>>>c;return a>>>c|(b&(1<>>c-32|0}function Zn(a){a=a|0;var b=0;f[a>>2]=3932;b=a+4|0;a=b+44|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function _n(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return De(a,b,c,d)|0}function $n(a){a=a|0;ff(a);Oq(a);return}function ao(a,b){a=a|0;b=b|0;ji(a);f[a+36>>2]=b;f[a+40>>2]=0;return}function bo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=+d;return $i(a,b,c,d)|0}function co(a){a=a|0;return 5}function eo(a){a=a|0;var b=0;f[a>>2]=6192;b=a+4|0;a=b+80|0;do{f[b>>2]=0;b=b+4|0}while((b|0)<(a|0));return}function fo(a){a=a|0;return 6}function go(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return aj(a,b,c,d)|0}function ho(a,b,c){a=a|0;b=b|0;c=c|0;f[a+28>>2]=b;f[a+32>>2]=c;return 1}function io(a,b){a=a|0;b=b|0;ji(a);f[a+36>>2]=b;f[a+40>>2]=b;return}function jo(a,b,c){a=a|0;b=b|0;c=c|0;Nn(a,b,c);return}function ko(a){a=a|0;var b=0;b=f[a+56>>2]|0;return Qa[f[(f[b>>2]|0)+28>>2]&127](b)|0}function lo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Ve(a,b,c,d,1);return}function mo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Ve(a,b,c,d,0);return}function no(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Xg(a,b,c,d)|0}function oo(a,b,c){a=a|0;b=b|0;c=c|0;return fi(a,b,c)|0}function po(a){a=a|0;var b=0;b=f[a+56>>2]|0;return Qa[f[(f[b>>2]|0)+32>>2]&127](b)|0}function qo(a,b,c){a=a|0;b=b|0;c=c|0;return ej(a,b,c)|0}function ro(a,b,c){a=a|0;b=b|0;c=c|0;return Sn(a,b,c)|0}function so(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Za[a&3](b|0,c|0,d|0,e|0,f|0)}function to(a){a=a|0;var b=0,c=0;if(a>>>0>4294963200){b=Vq()|0;f[b>>2]=0-a;c=-1}else c=a;return c|0}function uo(a,b,c){a=a|0;b=b|0;c=c|0;Li(a,b,c);return}function vo(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;f[a+12>>2]=0;f[a+16>>2]=0;return}function wo(a,b){a=a|0;b=b|0;f[a+8>>2]=b;f[a+12>>2]=-1;return 1}function xo(a,b){a=a|0;b=b|0;f[a+52>>2]=b;ip(a,b);return}function yo(a){a=+a;var b=0;p[s>>3]=a;b=f[s>>2]|0;I=f[s+4>>2]|0;return b|0}function zo(a){a=a|0;Hm(a);f[a>>2]=1476;f[a+36>>2]=0;return}function Ao(a){a=a|0;var b=0;if(!a)b=0;else b=(Eh(a,1056,1144,0)|0)!=0&1;return b|0}function Bo(a){a=a|0;if((b[a+11>>0]|0)<0)Oq(f[a>>2]|0);return}function Co(a){a=a|0;if(!a)return;Va[f[(f[a>>2]|0)+4>>2]&127](a);return}function Do(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Ya[a&3](b|0,c|0,d|0,e|0)}function Eo(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)im(a|0,b|0,c|0)|0;return a|0}function Fo(a,b,c){a=a|0;b=b|0;c=c|0;if(c|0)kh(a|0,b|0,c|0)|0;return a|0}function Go(a,b){a=a|0;b=b|0;return -1}function Ho(a){a=a|0;var b=0;b=u;u=u+16|0;Ua[a&3]();Hn(18992,b)}function Io(a){a=a|0;Lh(a);Oq(a);return}function Jo(a,b,c){a=a|0;b=b|0;c=c|0;Ro(a,b,c);return}function Ko(a,b,c){a=a|0;b=$(b);c=c|0;f[a+4>>2]=c;n[a>>2]=b;return}function Lo(a){a=a|0;To(a);f[a>>2]=3408;f[a+56>>2]=0;return}function Mo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Sa[a&31](b|0,c|0,d|0)|0}function No(a,b){a=a|0;b=b|0;return (wp(a,b)|0)<<24>>24|0}function Oo(a,b){a=a|0;b=b|0;f[a>>2]=7236;cm(a+4|0,b);return}function Po(a,b){a=a|0;b=b|0;var c=0;if(!a)c=0;else c=Pi(a,b,0)|0;return c|0}function Qo(a){a=a|0;return f[a+12>>2]|0}function Ro(a,b,c){a=a|0;b=b|0;c=c|0;uo(a,b,c);return}function So(){var a=0;a=ln(64)|0;Il(a);return a|0}function To(a){a=a|0;Zn(a);f[a>>2]=3764;f[a+52>>2]=0;return}function Uo(a){a=a|0;if(!a)return;bj(a);Oq(a);return}function Vo(a){a=a|0;return Qa[f[(f[a>>2]|0)+60>>2]&127](a)|0}function Wo(a){a=a|0;return f[a+4>>2]|0}function Xo(a,b,c){a=a|0;b=b|0;c=c|0;if(!(f[a>>2]&32))qi(b,c,a)|0;return}function Yo(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Xa[a&15](b|0,c|0,d|0)}function Zo(){var a=0;a=ln(96)|0;Tm(a);return a|0}function _o(a){a=a|0;var b=0;b=u;u=u+a|0;u=u+15&-16;return b|0}function $o(a){a=a|0;var b=0;b=(Jq()|0)+188|0;return $j(a,f[b>>2]|0)|0}function ap(a){a=a|0;return ((f[a+100>>2]|0)-(f[a+96>>2]|0)|0)/12|0|0}function bp(a,b){a=a|0;b=b|0;kp(a,b);return}function cp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;aa(3);return 0}function dp(){var a=0;a=ln(12)|0;op(a);return a|0}function ep(a){a=a|0;Ni(a);Oq(a);return}function fp(a,b,c){a=a|0;b=b|0;c=c|0;return (a|0)==(b|0)|0}function gp(a,b){a=a|0;b=b|0;var c=0;c=sp(a|0)|0;return ((b|0)==0?a:c)|0}function hp(a){a=a|0;return (f[a+12>>2]|0)-(f[a+8>>2]|0)>>2|0}function ip(a,b){a=a|0;b=b|0;f[a+4>>2]=b;return}function jp(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Ld(a,b,c,d,0)|0}function kp(a,b){a=a|0;b=b|0;jk(a,b);return}function lp(a){a=a|0;f[a+4>>2]=0;f[a+8>>2]=0;f[a>>2]=a+4;return}function mp(){var a=0;a=ln(84)|0;eo(a);return a|0}function np(a){a=a|0;ui(a);Oq(a);return}function op(a){a=a|0;f[a>>2]=0;f[a+4>>2]=0;f[a+8>>2]=0;return}function pp(a){a=a|0;f[a>>2]=7236;Am(a+4|0);return}function qp(a,b,c){a=a|0;b=b|0;c=c|0;return Ra[a&127](b|0,c|0)|0}function rp(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;aa(10)}function sp(a){a=a|0;return (a&255)<<24|(a>>8&255)<<16|(a>>16&255)<<8|a>>>24|0}function tp(a){a=a|0;To(a);f[a>>2]=3836;return}function up(a,c){a=a|0;c=c|0;b[a>>0]=b[c>>0]|0;return}function vp(a,b,c){a=a|0;b=b|0;c=c|0;return -1}function wp(a,c){a=a|0;c=c|0;return b[(f[a>>2]|0)+c>>0]|0}function xp(a){a=a|0;return (f[a+4>>2]|0)-(f[a>>2]|0)|0}function yp(a){a=a|0;mj(a);Oq(a);return}function zp(a){a=a|0;if(!a)return;Oq(a);return}function Ap(a){a=a|0;n[a>>2]=$(1.0);f[a+4>>2]=1;return}function Bp(a){a=a|0;b[a+28>>0]=1;return}function Cp(a,b){a=a|0;b=b|0;if(!x){x=a;y=b}}function Dp(a){a=a|0;ji(a);return}function Ep(a,b){a=a|0;b=b|0;return 1}function Fp(a){a=a|0;return a+12|0}function Gp(a,b){a=a|0;b=b|0;f[a+80>>2]=b;return}function Hp(a,b,c){a=a|0;b=b|0;c=c|0;Wa[a&7](b|0,c|0)}function Ip(){var a=0;a=ln(36)|0;qq(a);return a|0}function Jp(a){a=a|0;return gq(a+4|0)|0}function Kp(){var a=0;a=ln(108)|0;jn(a);return a|0}function Lp(a){a=a|0;return (b[a+32>>0]|0)!=0|0}function Mp(a){a=a|0;return a+-12|0}function Np(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;aa(9)}function Op(){var a=0;a=f[4927]|0;f[4927]=a+0;return a|0}function Pp(a){a=a|0;return f[a+56>>2]|0}function Qp(){var a=0;a=f[1786]|0;f[1786]=a+0;return a|0}function Rp(a){a=a|0;Og(a);Oq(a);return}function Sp(a){a=a|0;Sq(a);Oq(a);return}function Tp(a){a=a|0;return b[a+24>>0]|0}function Up(a,b){a=a|0;b=b|0;return 0}function Vp(a){a=a|0;return f[a+40>>2]|0}function Wp(a){a=a|0;return f[a+48>>2]|0}function Xp(a,b){a=a|0;b=b|0;return Qa[a&127](b|0)|0}function Yp(a){a=a|0;return f[a+60>>2]|0}function Zp(a){a=a|0;return f[a+28>>2]|0}function _p(a){a=a|0;sa(a|0)|0;om()}function $p(a){a=a|0;pp(a);Oq(a);return}function aq(a){a=a|0;Ca()}function bq(a,b){a=a|0;b=b|0;return $(+Bk(a,b,0))}function cq(a){a=a|0;return 3}function dq(a,b){a=a|0;b=b|0;u=a;v=b}function eq(a){a=a|0;return ((a|0)==32|(a+-9|0)>>>0<5)&1|0}function fq(a){a=a|0;return f[a+80>>2]|0}function gq(a){a=a|0;return f[a>>2]|0}function hq(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;aa(8)}function iq(a,b){a=a|0;b=b|0;Va[a&127](b|0)}function jq(a,b){a=a|0;b=b|0;return Wn(a,b)|0}function kq(a){a=a|0;return a&255|0}function lq(a){a=a|0;return Gj(a)|0}function mq(a,b){a=a|0;b=b|0;return +(+Bk(a,b,1))}function nq(a,b,c){a=a|0;b=b|0;c=c|0;aa(2);return 0}function oq(a){a=a|0;return 2}function pq(a){a=a|0;return 1}function qq(a){a=a|0;Dp(a);return}function rq(a,b){a=+a;b=+b;return +(+Yl(a,b))}function sq(a,b){a=+a;b=b|0;return +(+bk(a,b))}function tq(a,b){a=+a;b=b|0;return +(+ak(a,b))}function uq(){return 3}function vq(a,b,c){a=a|0;b=b|0;c=c|0;aa(7)}function wq(){return 0}function xq(){return -1}function yq(){return ln(1)|0}function zq(){return 4}function Aq(a){a=a|0;return (a+-48|0)>>>0<10|0}function Bq(){return 1}function Cq(){return 2}function Dq(a,b){a=+a;b=+b;return +(+xd(a,b))}function Eq(a,b){a=a|0;b=b|0;aa(1);return 0}function Fq(a){a=a|0;Ha()}function Gq(a){a=a|0;Ua[a&3]()}function Hq(){ua()}function Iq(a){a=a|0;return +(+mq(a,0))}function Jq(){return Yq()|0}function Kq(a,b){a=a|0;b=b|0;aa(6)}function Lq(a){a=a|0;return ln(a)|0}function Mq(a){a=a|0;Oq(a);return}function Nq(a){a=a|0;u=a}function Oq(a){a=a|0;yc(a);return}function Pq(a){a=a|0;I=a}function Qq(a){a=a|0;return a|0}function Rq(a){a=a|0;aa(0);return 0}function Sq(a){a=a|0;return}function Tq(a){a=a|0;return 0}function Uq(){return I|0}function Vq(){return 19632}function Wq(){return u|0}function Xq(a){a=a|0;aa(5)}function Yq(){return 6352}function Zq(){aa(4)} + +// EMSCRIPTEN_END_FUNCS +var Qa=[Rq,oq,pq,pq,oq,gb,Tq,Tq,Tq,hk,kg,pq,Wo,Tq,Tq,pq,Tq,pq,pq,yl,oq,yl,cq,wl,pq,co,wl,pq,fo,cl,pq,Zp,Rn,yl,pq,yl,oq,yl,cq,wl,pq,co,wl,pq,fo,cl,pq,Zp,Rn,yl,pq,cq,Tq,Wo,pq,Tq,pq,cq,pq,ql,oq,ql,Rn,ql,cq,pl,pq,co,pl,pq,fo,Wk,pq,Zp,pq,ql,oq,ql,Rn,ql,cq,pl,pq,co,pl,pq,fo,Wk,pq,Zp,pq,oq,pq,pq,Nd,pq,Vo,Xe,mh,zk,po,ko,pb,Qo,Wo,Mg,Wg,Lf,rb,Qo,Wo,pq,Tq,Tq,zc,Ki,Tq,pq,pq,Uj,Tq,Uj,ck,rn,Jp,Rq,Rq,Rq];var Ra=[Eq,xl,nh,Ie,El,Up,Up,Up,Ep,jb,rj,wo,Ep,Ep,ti,nj,ii,kk,ol,Qj,$k,dk,ek,Te,Go,Up,ni,Up,Pl,$d,Up,Pl,nf,Up,Ml,sh,mm,Ed,Up,Pl,$d,Up,Pl,nf,Up,Ml,sh,mm,Ed,Cn,Go,Up,li,Dd,Up,Fl,Zd,Up,Fl,hf,Up,Bl,rh,mm,Dd,Up,Fl,Zd,Up,Fl,hf,Up,Bl,rh,mm,zn,Kn,Fn,Ln,Jn,dh,ik,uk,cc,ye,Rm,og,vf,wf,ah,ik,uk,bc,ye,Rm,Ep,Up,Up,of,zm,mg,of,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq,Eq];var Sa=[nq,ho,vp,bn,Sm,wg,oj,kl,xh,wc,Kh,pg,gi,Rb,di,Ng,ml,Nm,Cj,nq,nq,nq,nq,nq,nq,nq,nq,nq,nq,nq,nq,nq];var Ta=[cp,Xd,Jc,oc,be,Ae,Tb,bb,Lc,pc,ae,ze,Sb,ab,eh,kd,Ic,fb,pf,If,tc,od,Kc,db,kf,Gf,qc,cp,cp,cp,cp,cp];var Ua=[Zq,Hq,Oi,Mn];var Va=[Xq,Sq,Mq,Gm,jm,al,Fq,ui,np,Ni,ep,Lh,Io,Jm,Fm,gm,Fq,Ql,Ql,Ql,Jk,wk,_k,Rk,el,Uk,Sq,Mq,Fq,Yi,em,Ql,Ql,Dk,rk,Xk,Pk,bl,Tk,Sq,Mq,Fq,Vi,Ul,Jm,Fm,Sq,Mq,Mq,Mq,yj,Jl,Sl,Al,Im,tm,qn,dn,Sq,Mq,Mq,Mq,vj,zl,Kl,sl,Em,km,gn,Um,Sq,Mq,xk,ok,nm,Lm,ff,$n,vk,nk,nn,Om,Tl,Ak,qk,tn,Xm,Wl,fm,_l,cf,On,mj,Fq,yp,Sq,Mq,Fq,yp,yp,Nk,Gk,sb,Og,Rp,Sq,Sp,Sq,Sq,Sp,pp,$p,$p,xn,Xq,Xq,Xq,Xq,Xq,Xq,Xq,Xq,Xq,Xq,Xq,Xq,Xq,Xq];var Wa=[Kq,pk,gg,yk,Nc,Kq,Kq,Kq];var Xa=[vq,Ne,ij,$b,ic,yd,$b,ic,$g,Aj,Lg,Yf,vq,vq,vq,vq];var Ya=[hq,hm,dl,hq];var Za=[Np,tj,oh,Np];var _a=[rp,Rl,Sk,rp];return{___cxa_can_catch:lm,___cxa_is_pointer_type:Ao,___divdi3:Ik,___muldi3:un,___udivdi3:jp,___uremdi3:hn,_bitshift64Lshr:Yn,_bitshift64Shl:Tn,_emscripten_bind_DracoInt8Array_DracoInt8Array_0:dp,_emscripten_bind_DracoInt8Array_GetValue_1:No,_emscripten_bind_DracoInt8Array___destroy___0:cn,_emscripten_bind_DracoInt8Array_size_0:xp,_emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2:oo,_emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3:En,_emscripten_bind_Encoder_Encoder_0:Ip,_emscripten_bind_Encoder_SetAttributeExplicitQuantization_5:_m,_emscripten_bind_Encoder_SetAttributeQuantization_2:jo,_emscripten_bind_Encoder_SetEncodingMethod_1:bp,_emscripten_bind_Encoder_SetSpeedOptions_2:Jo,_emscripten_bind_Encoder___destroy___0:Wj,_emscripten_bind_GeometryAttribute_GeometryAttribute_0:So,_emscripten_bind_GeometryAttribute___destroy___0:zp,_emscripten_bind_MeshBuilder_AddFacesToMesh_3:no,_emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5:pn,_emscripten_bind_MeshBuilder_AddFloatAttribute_5:pn,_emscripten_bind_MeshBuilder_AddInt16Attribute_5:fn,_emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5:on,_emscripten_bind_MeshBuilder_AddInt32Attribute_5:on,_emscripten_bind_MeshBuilder_AddInt8Attribute_5:kn,_emscripten_bind_MeshBuilder_AddMetadataToMesh_2:ro,_emscripten_bind_MeshBuilder_AddMetadata_2:qo,_emscripten_bind_MeshBuilder_AddUInt16Attribute_5:an,_emscripten_bind_MeshBuilder_AddUInt32Attribute_5:$m,_emscripten_bind_MeshBuilder_AddUInt8Attribute_5:en,_emscripten_bind_MeshBuilder_MeshBuilder_0:yq,_emscripten_bind_MeshBuilder_SetMetadataForAttribute_3:Dn,_emscripten_bind_MeshBuilder___destroy___0:zp,_emscripten_bind_Mesh_Mesh_0:Kp,_emscripten_bind_Mesh___destroy___0:Co,_emscripten_bind_Mesh_num_attributes_0:hp,_emscripten_bind_Mesh_num_faces_0:ap,_emscripten_bind_Mesh_num_points_0:fq,_emscripten_bind_Mesh_set_num_points_1:Gp,_emscripten_bind_MetadataBuilder_AddDoubleEntry_3:bo,_emscripten_bind_MetadataBuilder_AddIntEntry_3:go,_emscripten_bind_MetadataBuilder_AddStringEntry_3:_n,_emscripten_bind_MetadataBuilder_MetadataBuilder_0:yq,_emscripten_bind_MetadataBuilder___destroy___0:zp,_emscripten_bind_Metadata_Metadata_0:Xl,_emscripten_bind_Metadata___destroy___0:Uo,_emscripten_bind_PointAttribute_PointAttribute_0:Zo,_emscripten_bind_PointAttribute___destroy___0:Ij,_emscripten_bind_PointAttribute_attribute_type_0:Pp,_emscripten_bind_PointAttribute_byte_offset_0:Wp,_emscripten_bind_PointAttribute_byte_stride_0:Vp,_emscripten_bind_PointAttribute_data_type_0:Zp,_emscripten_bind_PointAttribute_normalized_0:Lp,_emscripten_bind_PointAttribute_num_components_0:Tp,_emscripten_bind_PointAttribute_size_0:fq,_emscripten_bind_PointAttribute_unique_id_0:Yp,_emscripten_bind_PointCloudBuilder_AddFloatAttribute_5:pn,_emscripten_bind_PointCloudBuilder_AddInt16Attribute_5:fn,_emscripten_bind_PointCloudBuilder_AddInt32Attribute_5:on,_emscripten_bind_PointCloudBuilder_AddInt8Attribute_5:kn,_emscripten_bind_PointCloudBuilder_AddMetadata_2:qo,_emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5:an,_emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5:$m,_emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5:en,_emscripten_bind_PointCloudBuilder_PointCloudBuilder_0:yq,_emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3:Dn,_emscripten_bind_PointCloudBuilder___destroy___0:zp,_emscripten_bind_PointCloud_PointCloud_0:mp,_emscripten_bind_PointCloud___destroy___0:Co,_emscripten_bind_PointCloud_num_attributes_0:hp,_emscripten_bind_PointCloud_num_points_0:fq,_emscripten_bind_VoidPtr___destroy___0:zp,_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE:xq,_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD:wq,_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH:Bq,_emscripten_enum_draco_GeometryAttribute_Type_COLOR:Cq,_emscripten_enum_draco_GeometryAttribute_Type_GENERIC:zq,_emscripten_enum_draco_GeometryAttribute_Type_INVALID:xq,_emscripten_enum_draco_GeometryAttribute_Type_NORMAL:Bq,_emscripten_enum_draco_GeometryAttribute_Type_POSITION:wq,_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD:uq,_emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING:Bq,_emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING:wq,_emscripten_replace_memory:Pa,_free:yc,_i64Add:Vn,_i64Subtract:Xn,_llvm_bswap_i32:sp,_malloc:$a,_memcpy:kh,_memmove:im,_memset:sj,_sbrk:Nl,dynCall_ii:Xp,dynCall_iii:qp,dynCall_iiii:Mo,dynCall_iiiiiii:In,dynCall_v:Gq,dynCall_vi:iq,dynCall_vii:Hp,dynCall_viii:Yo,dynCall_viiii:Do,dynCall_viiiii:so,dynCall_viiiiii:Pn,establishStackSpace:dq,getTempRet0:Uq,runPostSets:Un,setTempRet0:Pq,setThrew:Cp,stackAlloc:_o,stackRestore:Nq,stackSave:Wq}}) + + +// EMSCRIPTEN_END_ASM +(Module.asmGlobalArg,Module.asmLibraryArg,buffer);var ___cxa_can_catch=Module["___cxa_can_catch"]=asm["___cxa_can_catch"];var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=asm["___cxa_is_pointer_type"];var ___divdi3=Module["___divdi3"]=asm["___divdi3"];var ___muldi3=Module["___muldi3"]=asm["___muldi3"];var ___udivdi3=Module["___udivdi3"]=asm["___udivdi3"];var ___uremdi3=Module["___uremdi3"]=asm["___uremdi3"];var _bitshift64Lshr=Module["_bitshift64Lshr"]=asm["_bitshift64Lshr"];var _bitshift64Shl=Module["_bitshift64Shl"]=asm["_bitshift64Shl"];var _emscripten_bind_DracoInt8Array_DracoInt8Array_0=Module["_emscripten_bind_DracoInt8Array_DracoInt8Array_0"]=asm["_emscripten_bind_DracoInt8Array_DracoInt8Array_0"];var _emscripten_bind_DracoInt8Array_GetValue_1=Module["_emscripten_bind_DracoInt8Array_GetValue_1"]=asm["_emscripten_bind_DracoInt8Array_GetValue_1"];var _emscripten_bind_DracoInt8Array___destroy___0=Module["_emscripten_bind_DracoInt8Array___destroy___0"]=asm["_emscripten_bind_DracoInt8Array___destroy___0"];var _emscripten_bind_DracoInt8Array_size_0=Module["_emscripten_bind_DracoInt8Array_size_0"]=asm["_emscripten_bind_DracoInt8Array_size_0"];var _emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2=Module["_emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2"]=asm["_emscripten_bind_Encoder_EncodeMeshToDracoBuffer_2"];var _emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3=Module["_emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3"]=asm["_emscripten_bind_Encoder_EncodePointCloudToDracoBuffer_3"];var _emscripten_bind_Encoder_Encoder_0=Module["_emscripten_bind_Encoder_Encoder_0"]=asm["_emscripten_bind_Encoder_Encoder_0"];var _emscripten_bind_Encoder_SetAttributeExplicitQuantization_5=Module["_emscripten_bind_Encoder_SetAttributeExplicitQuantization_5"]=asm["_emscripten_bind_Encoder_SetAttributeExplicitQuantization_5"];var _emscripten_bind_Encoder_SetAttributeQuantization_2=Module["_emscripten_bind_Encoder_SetAttributeQuantization_2"]=asm["_emscripten_bind_Encoder_SetAttributeQuantization_2"];var _emscripten_bind_Encoder_SetEncodingMethod_1=Module["_emscripten_bind_Encoder_SetEncodingMethod_1"]=asm["_emscripten_bind_Encoder_SetEncodingMethod_1"];var _emscripten_bind_Encoder_SetSpeedOptions_2=Module["_emscripten_bind_Encoder_SetSpeedOptions_2"]=asm["_emscripten_bind_Encoder_SetSpeedOptions_2"];var _emscripten_bind_Encoder___destroy___0=Module["_emscripten_bind_Encoder___destroy___0"]=asm["_emscripten_bind_Encoder___destroy___0"];var _emscripten_bind_GeometryAttribute_GeometryAttribute_0=Module["_emscripten_bind_GeometryAttribute_GeometryAttribute_0"]=asm["_emscripten_bind_GeometryAttribute_GeometryAttribute_0"];var _emscripten_bind_GeometryAttribute___destroy___0=Module["_emscripten_bind_GeometryAttribute___destroy___0"]=asm["_emscripten_bind_GeometryAttribute___destroy___0"];var _emscripten_bind_MeshBuilder_AddFacesToMesh_3=Module["_emscripten_bind_MeshBuilder_AddFacesToMesh_3"]=asm["_emscripten_bind_MeshBuilder_AddFacesToMesh_3"];var _emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5=Module["_emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5"]=asm["_emscripten_bind_MeshBuilder_AddFloatAttributeToMesh_5"];var _emscripten_bind_MeshBuilder_AddFloatAttribute_5=Module["_emscripten_bind_MeshBuilder_AddFloatAttribute_5"]=asm["_emscripten_bind_MeshBuilder_AddFloatAttribute_5"];var _emscripten_bind_MeshBuilder_AddInt16Attribute_5=Module["_emscripten_bind_MeshBuilder_AddInt16Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddInt16Attribute_5"];var _emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5=Module["_emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5"]=asm["_emscripten_bind_MeshBuilder_AddInt32AttributeToMesh_5"];var _emscripten_bind_MeshBuilder_AddInt32Attribute_5=Module["_emscripten_bind_MeshBuilder_AddInt32Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddInt32Attribute_5"];var _emscripten_bind_MeshBuilder_AddInt8Attribute_5=Module["_emscripten_bind_MeshBuilder_AddInt8Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddInt8Attribute_5"];var _emscripten_bind_MeshBuilder_AddMetadataToMesh_2=Module["_emscripten_bind_MeshBuilder_AddMetadataToMesh_2"]=asm["_emscripten_bind_MeshBuilder_AddMetadataToMesh_2"];var _emscripten_bind_MeshBuilder_AddMetadata_2=Module["_emscripten_bind_MeshBuilder_AddMetadata_2"]=asm["_emscripten_bind_MeshBuilder_AddMetadata_2"];var _emscripten_bind_MeshBuilder_AddUInt16Attribute_5=Module["_emscripten_bind_MeshBuilder_AddUInt16Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddUInt16Attribute_5"];var _emscripten_bind_MeshBuilder_AddUInt32Attribute_5=Module["_emscripten_bind_MeshBuilder_AddUInt32Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddUInt32Attribute_5"];var _emscripten_bind_MeshBuilder_AddUInt8Attribute_5=Module["_emscripten_bind_MeshBuilder_AddUInt8Attribute_5"]=asm["_emscripten_bind_MeshBuilder_AddUInt8Attribute_5"];var _emscripten_bind_MeshBuilder_MeshBuilder_0=Module["_emscripten_bind_MeshBuilder_MeshBuilder_0"]=asm["_emscripten_bind_MeshBuilder_MeshBuilder_0"];var _emscripten_bind_MeshBuilder_SetMetadataForAttribute_3=Module["_emscripten_bind_MeshBuilder_SetMetadataForAttribute_3"]=asm["_emscripten_bind_MeshBuilder_SetMetadataForAttribute_3"];var _emscripten_bind_MeshBuilder___destroy___0=Module["_emscripten_bind_MeshBuilder___destroy___0"]=asm["_emscripten_bind_MeshBuilder___destroy___0"];var _emscripten_bind_Mesh_Mesh_0=Module["_emscripten_bind_Mesh_Mesh_0"]=asm["_emscripten_bind_Mesh_Mesh_0"];var _emscripten_bind_Mesh___destroy___0=Module["_emscripten_bind_Mesh___destroy___0"]=asm["_emscripten_bind_Mesh___destroy___0"];var _emscripten_bind_Mesh_num_attributes_0=Module["_emscripten_bind_Mesh_num_attributes_0"]=asm["_emscripten_bind_Mesh_num_attributes_0"];var _emscripten_bind_Mesh_num_faces_0=Module["_emscripten_bind_Mesh_num_faces_0"]=asm["_emscripten_bind_Mesh_num_faces_0"];var _emscripten_bind_Mesh_num_points_0=Module["_emscripten_bind_Mesh_num_points_0"]=asm["_emscripten_bind_Mesh_num_points_0"];var _emscripten_bind_Mesh_set_num_points_1=Module["_emscripten_bind_Mesh_set_num_points_1"]=asm["_emscripten_bind_Mesh_set_num_points_1"];var _emscripten_bind_MetadataBuilder_AddDoubleEntry_3=Module["_emscripten_bind_MetadataBuilder_AddDoubleEntry_3"]=asm["_emscripten_bind_MetadataBuilder_AddDoubleEntry_3"];var _emscripten_bind_MetadataBuilder_AddIntEntry_3=Module["_emscripten_bind_MetadataBuilder_AddIntEntry_3"]=asm["_emscripten_bind_MetadataBuilder_AddIntEntry_3"];var _emscripten_bind_MetadataBuilder_AddStringEntry_3=Module["_emscripten_bind_MetadataBuilder_AddStringEntry_3"]=asm["_emscripten_bind_MetadataBuilder_AddStringEntry_3"];var _emscripten_bind_MetadataBuilder_MetadataBuilder_0=Module["_emscripten_bind_MetadataBuilder_MetadataBuilder_0"]=asm["_emscripten_bind_MetadataBuilder_MetadataBuilder_0"];var _emscripten_bind_MetadataBuilder___destroy___0=Module["_emscripten_bind_MetadataBuilder___destroy___0"]=asm["_emscripten_bind_MetadataBuilder___destroy___0"];var _emscripten_bind_Metadata_Metadata_0=Module["_emscripten_bind_Metadata_Metadata_0"]=asm["_emscripten_bind_Metadata_Metadata_0"];var _emscripten_bind_Metadata___destroy___0=Module["_emscripten_bind_Metadata___destroy___0"]=asm["_emscripten_bind_Metadata___destroy___0"];var _emscripten_bind_PointAttribute_PointAttribute_0=Module["_emscripten_bind_PointAttribute_PointAttribute_0"]=asm["_emscripten_bind_PointAttribute_PointAttribute_0"];var _emscripten_bind_PointAttribute___destroy___0=Module["_emscripten_bind_PointAttribute___destroy___0"]=asm["_emscripten_bind_PointAttribute___destroy___0"];var _emscripten_bind_PointAttribute_attribute_type_0=Module["_emscripten_bind_PointAttribute_attribute_type_0"]=asm["_emscripten_bind_PointAttribute_attribute_type_0"];var _emscripten_bind_PointAttribute_byte_offset_0=Module["_emscripten_bind_PointAttribute_byte_offset_0"]=asm["_emscripten_bind_PointAttribute_byte_offset_0"];var _emscripten_bind_PointAttribute_byte_stride_0=Module["_emscripten_bind_PointAttribute_byte_stride_0"]=asm["_emscripten_bind_PointAttribute_byte_stride_0"];var _emscripten_bind_PointAttribute_data_type_0=Module["_emscripten_bind_PointAttribute_data_type_0"]=asm["_emscripten_bind_PointAttribute_data_type_0"];var _emscripten_bind_PointAttribute_normalized_0=Module["_emscripten_bind_PointAttribute_normalized_0"]=asm["_emscripten_bind_PointAttribute_normalized_0"];var _emscripten_bind_PointAttribute_num_components_0=Module["_emscripten_bind_PointAttribute_num_components_0"]=asm["_emscripten_bind_PointAttribute_num_components_0"];var _emscripten_bind_PointAttribute_size_0=Module["_emscripten_bind_PointAttribute_size_0"]=asm["_emscripten_bind_PointAttribute_size_0"];var _emscripten_bind_PointAttribute_unique_id_0=Module["_emscripten_bind_PointAttribute_unique_id_0"]=asm["_emscripten_bind_PointAttribute_unique_id_0"];var _emscripten_bind_PointCloudBuilder_AddFloatAttribute_5=Module["_emscripten_bind_PointCloudBuilder_AddFloatAttribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddFloatAttribute_5"];var _emscripten_bind_PointCloudBuilder_AddInt16Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddInt16Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddInt16Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddInt32Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddInt32Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddInt32Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddInt8Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddInt8Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddInt8Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddMetadata_2=Module["_emscripten_bind_PointCloudBuilder_AddMetadata_2"]=asm["_emscripten_bind_PointCloudBuilder_AddMetadata_2"];var _emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddUInt16Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddUInt32Attribute_5"];var _emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5=Module["_emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5"]=asm["_emscripten_bind_PointCloudBuilder_AddUInt8Attribute_5"];var _emscripten_bind_PointCloudBuilder_PointCloudBuilder_0=Module["_emscripten_bind_PointCloudBuilder_PointCloudBuilder_0"]=asm["_emscripten_bind_PointCloudBuilder_PointCloudBuilder_0"];var _emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3=Module["_emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3"]=asm["_emscripten_bind_PointCloudBuilder_SetMetadataForAttribute_3"];var _emscripten_bind_PointCloudBuilder___destroy___0=Module["_emscripten_bind_PointCloudBuilder___destroy___0"]=asm["_emscripten_bind_PointCloudBuilder___destroy___0"];var _emscripten_bind_PointCloud_PointCloud_0=Module["_emscripten_bind_PointCloud_PointCloud_0"]=asm["_emscripten_bind_PointCloud_PointCloud_0"];var _emscripten_bind_PointCloud___destroy___0=Module["_emscripten_bind_PointCloud___destroy___0"]=asm["_emscripten_bind_PointCloud___destroy___0"];var _emscripten_bind_PointCloud_num_attributes_0=Module["_emscripten_bind_PointCloud_num_attributes_0"]=asm["_emscripten_bind_PointCloud_num_attributes_0"];var _emscripten_bind_PointCloud_num_points_0=Module["_emscripten_bind_PointCloud_num_points_0"]=asm["_emscripten_bind_PointCloud_num_points_0"];var _emscripten_bind_VoidPtr___destroy___0=Module["_emscripten_bind_VoidPtr___destroy___0"]=asm["_emscripten_bind_VoidPtr___destroy___0"];var _emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=Module["_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE"]=asm["_emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE"];var _emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=Module["_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD"]=asm["_emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD"];var _emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=Module["_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH"]=asm["_emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH"];var _emscripten_enum_draco_GeometryAttribute_Type_COLOR=Module["_emscripten_enum_draco_GeometryAttribute_Type_COLOR"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_COLOR"];var _emscripten_enum_draco_GeometryAttribute_Type_GENERIC=Module["_emscripten_enum_draco_GeometryAttribute_Type_GENERIC"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_GENERIC"];var _emscripten_enum_draco_GeometryAttribute_Type_INVALID=Module["_emscripten_enum_draco_GeometryAttribute_Type_INVALID"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_INVALID"];var _emscripten_enum_draco_GeometryAttribute_Type_NORMAL=Module["_emscripten_enum_draco_GeometryAttribute_Type_NORMAL"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_NORMAL"];var _emscripten_enum_draco_GeometryAttribute_Type_POSITION=Module["_emscripten_enum_draco_GeometryAttribute_Type_POSITION"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_POSITION"];var _emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=Module["_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD"]=asm["_emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD"];var _emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING=Module["_emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING"]=asm["_emscripten_enum_draco_MeshEncoderMethod_MESH_EDGEBREAKER_ENCODING"];var _emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING=Module["_emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING"]=asm["_emscripten_enum_draco_MeshEncoderMethod_MESH_SEQUENTIAL_ENCODING"];var _emscripten_replace_memory=Module["_emscripten_replace_memory"]=asm["_emscripten_replace_memory"];var _free=Module["_free"]=asm["_free"];var _i64Add=Module["_i64Add"]=asm["_i64Add"];var _i64Subtract=Module["_i64Subtract"]=asm["_i64Subtract"];var _llvm_bswap_i32=Module["_llvm_bswap_i32"]=asm["_llvm_bswap_i32"];var _malloc=Module["_malloc"]=asm["_malloc"];var _memcpy=Module["_memcpy"]=asm["_memcpy"];var _memmove=Module["_memmove"]=asm["_memmove"];var _memset=Module["_memset"]=asm["_memset"];var _sbrk=Module["_sbrk"]=asm["_sbrk"];var establishStackSpace=Module["establishStackSpace"]=asm["establishStackSpace"];var getTempRet0=Module["getTempRet0"]=asm["getTempRet0"];var runPostSets=Module["runPostSets"]=asm["runPostSets"];var setTempRet0=Module["setTempRet0"]=asm["setTempRet0"];var setThrew=Module["setThrew"]=asm["setThrew"];var stackAlloc=Module["stackAlloc"]=asm["stackAlloc"];var stackRestore=Module["stackRestore"]=asm["stackRestore"];var stackSave=Module["stackSave"]=asm["stackSave"];var dynCall_ii=Module["dynCall_ii"]=asm["dynCall_ii"];var dynCall_iii=Module["dynCall_iii"]=asm["dynCall_iii"];var dynCall_iiii=Module["dynCall_iiii"]=asm["dynCall_iiii"];var dynCall_iiiiiii=Module["dynCall_iiiiiii"]=asm["dynCall_iiiiiii"];var dynCall_v=Module["dynCall_v"]=asm["dynCall_v"];var dynCall_vi=Module["dynCall_vi"]=asm["dynCall_vi"];var dynCall_vii=Module["dynCall_vii"]=asm["dynCall_vii"];var dynCall_viii=Module["dynCall_viii"]=asm["dynCall_viii"];var dynCall_viiii=Module["dynCall_viiii"]=asm["dynCall_viiii"];var dynCall_viiiii=Module["dynCall_viiiii"]=asm["dynCall_viiiii"];var dynCall_viiiiii=Module["dynCall_viiiiii"]=asm["dynCall_viiiiii"];Module["asm"]=asm;if(memoryInitializer){if(!isDataURI(memoryInitializer)){if(typeof Module["locateFile"]==="function"){memoryInitializer=Module["locateFile"](memoryInitializer)}else if(Module["memoryInitializerPrefixURL"]){memoryInitializer=Module["memoryInitializerPrefixURL"]+memoryInitializer}}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=Module["readBinary"](memoryInitializer);HEAPU8.set(data,GLOBAL_BASE)}else{addRunDependency("memory initializer");var applyMemoryInitializer=(function(data){if(data.byteLength)data=new Uint8Array(data);HEAPU8.set(data,GLOBAL_BASE);if(Module["memoryInitializerRequest"])delete Module["memoryInitializerRequest"].response;removeRunDependency("memory initializer")});function doBrowserLoad(){Module["readAsync"](memoryInitializer,applyMemoryInitializer,(function(){throw"could not load memory initializer "+memoryInitializer}))}var memoryInitializerBytes=tryParseAsDataURI(memoryInitializer);if(memoryInitializerBytes){applyMemoryInitializer(memoryInitializerBytes.buffer)}else if(Module["memoryInitializerRequest"]){function useRequest(){var request=Module["memoryInitializerRequest"];var response=request.response;if(request.status!==200&&request.status!==0){var data=tryParseAsDataURI(Module["memoryInitializerRequestURL"]);if(data){response=data.buffer}else{console.warn("a problem seems to have happened with Module.memoryInitializerRequest, status: "+request.status+", retrying "+memoryInitializer);doBrowserLoad();return}}applyMemoryInitializer(response)}if(Module["memoryInitializerRequest"].response){setTimeout(useRequest,0)}else{Module["memoryInitializerRequest"].addEventListener("load",useRequest)}}else{doBrowserLoad()}}}Module["then"]=(function(func){if(Module["calledRun"]){func(Module)}else{var old=Module["onRuntimeInitialized"];Module["onRuntimeInitialized"]=(function(){if(old)old();func(Module)})}return Module});function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}ExitStatus.prototype=new Error;ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;dependenciesFulfilled=function runCaller(){if(!Module["calledRun"])run();if(!Module["calledRun"])dependenciesFulfilled=runCaller};function run(args){args=args||Module["arguments"];if(runDependencies>0){return}preRun();if(runDependencies>0)return;if(Module["calledRun"])return;function doRun(){if(Module["calledRun"])return;Module["calledRun"]=true;if(ABORT)return;ensureInitRuntime();preMain();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout((function(){setTimeout((function(){Module["setStatus"]("")}),1);doRun()}),1)}else{doRun()}}Module["run"]=run;function exit(status,implicit){if(implicit&&Module["noExitRuntime"]&&status===0){return}if(Module["noExitRuntime"]){}else{ABORT=true;EXITSTATUS=status;STACKTOP=initialStackTop;exitRuntime();if(Module["onExit"])Module["onExit"](status)}if(ENVIRONMENT_IS_NODE){process["exit"](status)}Module["quit"](status,new ExitStatus(status))}Module["exit"]=exit;function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}if(what!==undefined){Module.print(what);Module.printErr(what);what=JSON.stringify(what)}else{what=""}ABORT=true;EXITSTATUS=1;throw"abort("+what+"). Build with -s ASSERTIONS=1 for more info."}Module["abort"]=abort;if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}Module["noExitRuntime"]=true;run();function WrapperObject(){}WrapperObject.prototype=Object.create(WrapperObject.prototype);WrapperObject.prototype.constructor=WrapperObject;WrapperObject.prototype.__class__=WrapperObject;WrapperObject.__cache__={};Module["WrapperObject"]=WrapperObject;function getCache(__class__){return(__class__||WrapperObject).__cache__}Module["getCache"]=getCache;function wrapPointer(ptr,__class__){var cache=getCache(__class__);var ret=cache[ptr];if(ret)return ret;ret=Object.create((__class__||WrapperObject).prototype);ret.ptr=ptr;return cache[ptr]=ret}Module["wrapPointer"]=wrapPointer;function castObject(obj,__class__){return wrapPointer(obj.ptr,__class__)}Module["castObject"]=castObject;Module["NULL"]=wrapPointer(0);function destroy(obj){if(!obj["__destroy__"])throw"Error: Cannot destroy object. (Did you create it yourself?)";obj["__destroy__"]();delete getCache(obj.__class__)[obj.ptr]}Module["destroy"]=destroy;function compare(obj1,obj2){return obj1.ptr===obj2.ptr}Module["compare"]=compare;function getPointer(obj){return obj.ptr}Module["getPointer"]=getPointer;function getClass(obj){return obj.__class__}Module["getClass"]=getClass;var ensureCache={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:(function(){if(ensureCache.needed){for(var i=0;i=ensureCache.size){assert(len>0);ensureCache.needed+=len;ret=Module["_malloc"](len);ensureCache.temps.push(ret)}else{ret=ensureCache.buffer+ensureCache.pos;ensureCache.pos+=len}return ret}),copy:(function(array,view,offset){var offsetShifted=offset;var bytes=view.BYTES_PER_ELEMENT;switch(bytes){case 2:offsetShifted>>=1;break;case 4:offsetShifted>>=2;break;case 8:offsetShifted>>=3;break}for(var i=0;i>>0,$jscomp.propertyToPolyfillSymbol[l]=$jscomp.IS_SYMBOL_NATIVE? +$jscomp.global.Symbol(l):$jscomp.POLYFILL_PREFIX+k+"$"+l),$jscomp.defineProperty(p,$jscomp.propertyToPolyfillSymbol[l],{configurable:!0,writable:!0,value:n})))}; +$jscomp.polyfill("Promise",function(h){function n(){this.batch_=null}function k(f){return f instanceof l?f:new l(function(q,u){q(f)})}if(h&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return h;n.prototype.asyncExecute=function(f){if(null==this.batch_){this.batch_=[];var q=this;this.asyncExecuteFunction(function(){q.executeBatch_()})}this.batch_.push(f)}; +var p=$jscomp.global.setTimeout;n.prototype.asyncExecuteFunction=function(f){p(f,0)};n.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var f=this.batch_;this.batch_=[];for(var q=0;q=y}},"es6","es3"); +$jscomp.polyfill("Array.prototype.copyWithin",function(h){function n(k){k=Number(k);return Infinity===k||-Infinity===k?k:k|0}return h?h:function(k,p,l){var y=this.length;k=n(k);p=n(p);l=void 0===l?y:n(l);k=0>k?Math.max(y+k,0):Math.min(k,y);p=0>p?Math.max(y+p,0):Math.min(p,y);l=0>l?Math.max(y+l,0):Math.min(l,y);if(kp;)--l in this?this[--k]=this[l]:delete this[--k];return this}},"es6","es3"); +$jscomp.typedArrayCopyWithin=function(h){return h?h:Array.prototype.copyWithin};$jscomp.polyfill("Int8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"); +$jscomp.polyfill("Uint16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float64Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5"); +var DracoDecoderModule=function(){var h="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(h=h||__filename);return function(n){function k(e){return a.locateFile?a.locateFile(e,U):U+e}function p(e,b){if(e){var c=ia;var d=e+b;for(b=e;c[b]&&!(b>=d);)++b;if(16g?d+=String.fromCharCode(g):(g-=65536,d+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else d+=String.fromCharCode(g)}c=d}}else c="";return c}function l(){var e=ja.buffer;a.HEAP8=W=new Int8Array(e);a.HEAP16=new Int16Array(e);a.HEAP32=ca=new Int32Array(e);a.HEAPU8=ia=new Uint8Array(e);a.HEAPU16=new Uint16Array(e);a.HEAPU32=Y=new Uint32Array(e);a.HEAPF32=new Float32Array(e);a.HEAPF64=new Float64Array(e)}function y(e){if(a.onAbort)a.onAbort(e); +e="Aborted("+e+")";da(e);sa=!0;e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info.");ka(e);throw e;}function f(e){try{if(e==P&&ea)return new Uint8Array(ea);if(ma)return ma(e);throw"both async and sync fetching of the wasm failed";}catch(b){y(b)}}function q(){if(!ea&&(ta||fa)){if("function"==typeof fetch&&!P.startsWith("file://"))return fetch(P,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+P+"'";return e.arrayBuffer()}).catch(function(){return f(P)}); +if(na)return new Promise(function(e,b){na(P,function(c){e(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return f(P)})}function u(e){for(;0>2]=b};this.get_type=function(){return Y[this.ptr+4>>2]};this.set_destructor=function(b){Y[this.ptr+8>>2]=b};this.get_destructor=function(){return Y[this.ptr+8>>2]};this.set_refcount=function(b){ca[this.ptr>>2]=b};this.set_caught=function(b){W[this.ptr+ +12>>0]=b?1:0};this.get_caught=function(){return 0!=W[this.ptr+12>>0]};this.set_rethrown=function(b){W[this.ptr+13>>0]=b?1:0};this.get_rethrown=function(){return 0!=W[this.ptr+13>>0]};this.init=function(b,c){this.set_adjusted_ptr(0);this.set_type(b);this.set_destructor(c);this.set_refcount(0);this.set_caught(!1);this.set_rethrown(!1)};this.add_ref=function(){ca[this.ptr>>2]+=1};this.release_ref=function(){var b=ca[this.ptr>>2];ca[this.ptr>>2]=b-1;return 1===b};this.set_adjusted_ptr=function(b){Y[this.ptr+ +16>>2]=b};this.get_adjusted_ptr=function(){return Y[this.ptr+16>>2]};this.get_exception_ptr=function(){if(ua(this.get_type()))return Y[this.excPtr>>2];var b=this.get_adjusted_ptr();return 0!==b?b:this.excPtr}}function F(){function e(){if(!la&&(la=!0,a.calledRun=!0,!sa)){va=!0;u(oa);wa(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)xa.unshift(a.postRun.shift());u(xa)}}if(!(0=d?b++:2047>=d?b+=2:55296<=d&&57343>= +d?(b+=4,++c):b+=3}b=Array(b+1);c=0;d=b.length;if(0=t){var aa=e.charCodeAt(++g);t=65536+((t&1023)<<10)|aa&1023}if(127>=t){if(c>=d)break;b[c++]=t}else{if(2047>=t){if(c+1>=d)break;b[c++]=192|t>>6}else{if(65535>=t){if(c+2>=d)break;b[c++]=224|t>>12}else{if(c+3>=d)break;b[c++]=240|t>>18;b[c++]=128|t>>12&63}b[c++]=128|t>>6&63}b[c++]=128|t&63}}b[c]=0}e=r.alloc(b,W);r.copy(b,W,e);return e}return e}function Z(e){if("object"=== +typeof e){var b=r.alloc(e,W);r.copy(e,W,b);return b}return e}function X(){throw"cannot construct a VoidPtr, no constructor in IDL";}function S(){this.ptr=za();w(S)[this.ptr]=this}function Q(){this.ptr=Aa();w(Q)[this.ptr]=this}function V(){this.ptr=Ba();w(V)[this.ptr]=this}function x(){this.ptr=Ca();w(x)[this.ptr]=this}function D(){this.ptr=Da();w(D)[this.ptr]=this}function G(){this.ptr=Ea();w(G)[this.ptr]=this}function H(){this.ptr=Fa();w(H)[this.ptr]=this}function E(){this.ptr=Ga();w(E)[this.ptr]= +this}function T(){this.ptr=Ha();w(T)[this.ptr]=this}function C(){throw"cannot construct a Status, no constructor in IDL";}function I(){this.ptr=Ia();w(I)[this.ptr]=this}function J(){this.ptr=Ja();w(J)[this.ptr]=this}function K(){this.ptr=Ka();w(K)[this.ptr]=this}function L(){this.ptr=La();w(L)[this.ptr]=this}function M(){this.ptr=Ma();w(M)[this.ptr]=this}function N(){this.ptr=Na();w(N)[this.ptr]=this}function O(){this.ptr=Oa();w(O)[this.ptr]=this}function z(){this.ptr=Pa();w(z)[this.ptr]=this}function m(){this.ptr= +Qa();w(m)[this.ptr]=this}n=void 0===n?{}:n;var a="undefined"!=typeof n?n:{},wa,ka;a.ready=new Promise(function(e,b){wa=e;ka=b});var Ra=!1,Sa=!1;a.onRuntimeInitialized=function(){Ra=!0;if(Sa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Sa=!0;if(Ra&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(e){if("string"!==typeof e)return!1;e=e.split(".");return 2>e.length||3=e[1]?!0:0!=e[0]||10< +e[1]?!1:!0};var Ta=Object.assign({},a),ta="object"==typeof window,fa="function"==typeof importScripts,Ua="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,U="";if(Ua){var Va=require("fs"),pa=require("path");U=fa?pa.dirname(U)+"/":__dirname+"/";var Wa=function(e,b){e=e.startsWith("file://")?new URL(e):pa.normalize(e);return Va.readFileSync(e,b?void 0:"utf8")};var ma=function(e){e=Wa(e,!0);e.buffer||(e=new Uint8Array(e));return e};var na=function(e, +b,c){e=e.startsWith("file://")?new URL(e):pa.normalize(e);Va.readFile(e,function(d,g){d?c(d):b(g.buffer)})};1>>=0;if(2147483648=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,e+100663296);var g=Math;d=Math.max(e,d);g=g.min.call(g,2147483648,d+(65536-d%65536)%65536);a:{d=ja.buffer;try{ja.grow(g-d.byteLength+65535>>>16);l();var t=1;break a}catch(aa){}t=void 0}if(t)return!0}return!1}};(function(){function e(g,t){a.asm=g.exports;ja=a.asm.e;l();oa.unshift(a.asm.f);ba--;a.monitorRunDependencies&&a.monitorRunDependencies(ba);0==ba&&(null!==qa&&(clearInterval(qa),qa=null),ha&&(g=ha,ha=null,g()))}function b(g){e(g.instance)} +function c(g){return q().then(function(t){return WebAssembly.instantiate(t,d)}).then(function(t){return t}).then(g,function(t){da("failed to asynchronously prepare wasm: "+t);y(t)})}var d={a:qd};ba++;a.monitorRunDependencies&&a.monitorRunDependencies(ba);if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(g){da("Module.instantiateWasm callback failed with error: "+g),ka(g)}(function(){return ea||"function"!=typeof WebAssembly.instantiateStreaming||P.startsWith("data:application/octet-stream;base64,")|| +P.startsWith("file://")||Ua||"function"!=typeof fetch?c(b):fetch(P,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,d).then(b,function(t){da("wasm streaming compile failed: "+t);da("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ka);return{}})();var Xa=a._emscripten_bind_VoidPtr___destroy___0=function(){return(Xa=a._emscripten_bind_VoidPtr___destroy___0=a.asm.h).apply(null,arguments)},za=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0= +function(){return(za=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=a.asm.i).apply(null,arguments)},Ya=a._emscripten_bind_DecoderBuffer_Init_2=function(){return(Ya=a._emscripten_bind_DecoderBuffer_Init_2=a.asm.j).apply(null,arguments)},Za=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return(Za=a._emscripten_bind_DecoderBuffer___destroy___0=a.asm.k).apply(null,arguments)},Aa=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Aa=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0= +a.asm.l).apply(null,arguments)},$a=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return($a=a._emscripten_bind_AttributeTransformData_transform_type_0=a.asm.m).apply(null,arguments)},ab=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return(ab=a._emscripten_bind_AttributeTransformData___destroy___0=a.asm.n).apply(null,arguments)},Ba=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(Ba=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0= +a.asm.o).apply(null,arguments)},bb=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return(bb=a._emscripten_bind_GeometryAttribute___destroy___0=a.asm.p).apply(null,arguments)},Ca=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Ca=a._emscripten_bind_PointAttribute_PointAttribute_0=a.asm.q).apply(null,arguments)},cb=a._emscripten_bind_PointAttribute_size_0=function(){return(cb=a._emscripten_bind_PointAttribute_size_0=a.asm.r).apply(null,arguments)},db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0= +function(){return(db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=a.asm.s).apply(null,arguments)},eb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return(eb=a._emscripten_bind_PointAttribute_attribute_type_0=a.asm.t).apply(null,arguments)},fb=a._emscripten_bind_PointAttribute_data_type_0=function(){return(fb=a._emscripten_bind_PointAttribute_data_type_0=a.asm.u).apply(null,arguments)},gb=a._emscripten_bind_PointAttribute_num_components_0=function(){return(gb=a._emscripten_bind_PointAttribute_num_components_0= +a.asm.v).apply(null,arguments)},hb=a._emscripten_bind_PointAttribute_normalized_0=function(){return(hb=a._emscripten_bind_PointAttribute_normalized_0=a.asm.w).apply(null,arguments)},ib=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return(ib=a._emscripten_bind_PointAttribute_byte_stride_0=a.asm.x).apply(null,arguments)},jb=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return(jb=a._emscripten_bind_PointAttribute_byte_offset_0=a.asm.y).apply(null,arguments)},kb=a._emscripten_bind_PointAttribute_unique_id_0= +function(){return(kb=a._emscripten_bind_PointAttribute_unique_id_0=a.asm.z).apply(null,arguments)},lb=a._emscripten_bind_PointAttribute___destroy___0=function(){return(lb=a._emscripten_bind_PointAttribute___destroy___0=a.asm.A).apply(null,arguments)},Da=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Da=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=a.asm.B).apply(null,arguments)},mb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1= +function(){return(mb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=a.asm.C).apply(null,arguments)},nb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(nb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=a.asm.D).apply(null,arguments)},ob=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(ob=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=a.asm.E).apply(null,arguments)},pb= +a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(pb=a._emscripten_bind_AttributeQuantizationTransform_range_0=a.asm.F).apply(null,arguments)},qb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(qb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=a.asm.G).apply(null,arguments)},Ea=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(Ea=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0= +a.asm.H).apply(null,arguments)},rb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(rb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=a.asm.I).apply(null,arguments)},sb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(sb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=a.asm.J).apply(null,arguments)},tb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(tb= +a._emscripten_bind_AttributeOctahedronTransform___destroy___0=a.asm.K).apply(null,arguments)},Fa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return(Fa=a._emscripten_bind_PointCloud_PointCloud_0=a.asm.L).apply(null,arguments)},ub=a._emscripten_bind_PointCloud_num_attributes_0=function(){return(ub=a._emscripten_bind_PointCloud_num_attributes_0=a.asm.M).apply(null,arguments)},vb=a._emscripten_bind_PointCloud_num_points_0=function(){return(vb=a._emscripten_bind_PointCloud_num_points_0=a.asm.N).apply(null, +arguments)},wb=a._emscripten_bind_PointCloud___destroy___0=function(){return(wb=a._emscripten_bind_PointCloud___destroy___0=a.asm.O).apply(null,arguments)},Ga=a._emscripten_bind_Mesh_Mesh_0=function(){return(Ga=a._emscripten_bind_Mesh_Mesh_0=a.asm.P).apply(null,arguments)},xb=a._emscripten_bind_Mesh_num_faces_0=function(){return(xb=a._emscripten_bind_Mesh_num_faces_0=a.asm.Q).apply(null,arguments)},yb=a._emscripten_bind_Mesh_num_attributes_0=function(){return(yb=a._emscripten_bind_Mesh_num_attributes_0= +a.asm.R).apply(null,arguments)},zb=a._emscripten_bind_Mesh_num_points_0=function(){return(zb=a._emscripten_bind_Mesh_num_points_0=a.asm.S).apply(null,arguments)},Ab=a._emscripten_bind_Mesh___destroy___0=function(){return(Ab=a._emscripten_bind_Mesh___destroy___0=a.asm.T).apply(null,arguments)},Ha=a._emscripten_bind_Metadata_Metadata_0=function(){return(Ha=a._emscripten_bind_Metadata_Metadata_0=a.asm.U).apply(null,arguments)},Bb=a._emscripten_bind_Metadata___destroy___0=function(){return(Bb=a._emscripten_bind_Metadata___destroy___0= +a.asm.V).apply(null,arguments)},Cb=a._emscripten_bind_Status_code_0=function(){return(Cb=a._emscripten_bind_Status_code_0=a.asm.W).apply(null,arguments)},Db=a._emscripten_bind_Status_ok_0=function(){return(Db=a._emscripten_bind_Status_ok_0=a.asm.X).apply(null,arguments)},Eb=a._emscripten_bind_Status_error_msg_0=function(){return(Eb=a._emscripten_bind_Status_error_msg_0=a.asm.Y).apply(null,arguments)},Fb=a._emscripten_bind_Status___destroy___0=function(){return(Fb=a._emscripten_bind_Status___destroy___0= +a.asm.Z).apply(null,arguments)},Ia=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Ia=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=a.asm._).apply(null,arguments)},Gb=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(Gb=a._emscripten_bind_DracoFloat32Array_GetValue_1=a.asm.$).apply(null,arguments)},Hb=a._emscripten_bind_DracoFloat32Array_size_0=function(){return(Hb=a._emscripten_bind_DracoFloat32Array_size_0=a.asm.aa).apply(null,arguments)},Ib= +a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Ib=a._emscripten_bind_DracoFloat32Array___destroy___0=a.asm.ba).apply(null,arguments)},Ja=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(Ja=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=a.asm.ca).apply(null,arguments)},Jb=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Jb=a._emscripten_bind_DracoInt8Array_GetValue_1=a.asm.da).apply(null,arguments)},Kb=a._emscripten_bind_DracoInt8Array_size_0= +function(){return(Kb=a._emscripten_bind_DracoInt8Array_size_0=a.asm.ea).apply(null,arguments)},Lb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Lb=a._emscripten_bind_DracoInt8Array___destroy___0=a.asm.fa).apply(null,arguments)},Ka=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Ka=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=a.asm.ga).apply(null,arguments)},Mb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Mb=a._emscripten_bind_DracoUInt8Array_GetValue_1= +a.asm.ha).apply(null,arguments)},Nb=a._emscripten_bind_DracoUInt8Array_size_0=function(){return(Nb=a._emscripten_bind_DracoUInt8Array_size_0=a.asm.ia).apply(null,arguments)},Ob=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Ob=a._emscripten_bind_DracoUInt8Array___destroy___0=a.asm.ja).apply(null,arguments)},La=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(La=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=a.asm.ka).apply(null,arguments)},Pb=a._emscripten_bind_DracoInt16Array_GetValue_1= +function(){return(Pb=a._emscripten_bind_DracoInt16Array_GetValue_1=a.asm.la).apply(null,arguments)},Qb=a._emscripten_bind_DracoInt16Array_size_0=function(){return(Qb=a._emscripten_bind_DracoInt16Array_size_0=a.asm.ma).apply(null,arguments)},Rb=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Rb=a._emscripten_bind_DracoInt16Array___destroy___0=a.asm.na).apply(null,arguments)},Ma=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(Ma=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0= +a.asm.oa).apply(null,arguments)},Sb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(Sb=a._emscripten_bind_DracoUInt16Array_GetValue_1=a.asm.pa).apply(null,arguments)},Tb=a._emscripten_bind_DracoUInt16Array_size_0=function(){return(Tb=a._emscripten_bind_DracoUInt16Array_size_0=a.asm.qa).apply(null,arguments)},Ub=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(Ub=a._emscripten_bind_DracoUInt16Array___destroy___0=a.asm.ra).apply(null,arguments)},Na=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0= +function(){return(Na=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=a.asm.sa).apply(null,arguments)},Vb=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(Vb=a._emscripten_bind_DracoInt32Array_GetValue_1=a.asm.ta).apply(null,arguments)},Wb=a._emscripten_bind_DracoInt32Array_size_0=function(){return(Wb=a._emscripten_bind_DracoInt32Array_size_0=a.asm.ua).apply(null,arguments)},Xb=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return(Xb=a._emscripten_bind_DracoInt32Array___destroy___0= +a.asm.va).apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(Oa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=a.asm.wa).apply(null,arguments)},Yb=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(Yb=a._emscripten_bind_DracoUInt32Array_GetValue_1=a.asm.xa).apply(null,arguments)},Zb=a._emscripten_bind_DracoUInt32Array_size_0=function(){return(Zb=a._emscripten_bind_DracoUInt32Array_size_0=a.asm.ya).apply(null,arguments)},$b=a._emscripten_bind_DracoUInt32Array___destroy___0= +function(){return($b=a._emscripten_bind_DracoUInt32Array___destroy___0=a.asm.za).apply(null,arguments)},Pa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Pa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=a.asm.Aa).apply(null,arguments)},ac=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(ac=a._emscripten_bind_MetadataQuerier_HasEntry_2=a.asm.Ba).apply(null,arguments)},bc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(bc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2= +a.asm.Ca).apply(null,arguments)},cc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(cc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=a.asm.Da).apply(null,arguments)},dc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(dc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=a.asm.Ea).apply(null,arguments)},ec=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(ec=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=a.asm.Fa).apply(null, +arguments)},fc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(fc=a._emscripten_bind_MetadataQuerier_NumEntries_1=a.asm.Ga).apply(null,arguments)},gc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(gc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=a.asm.Ha).apply(null,arguments)},hc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return(hc=a._emscripten_bind_MetadataQuerier___destroy___0=a.asm.Ia).apply(null,arguments)},Qa=a._emscripten_bind_Decoder_Decoder_0= +function(){return(Qa=a._emscripten_bind_Decoder_Decoder_0=a.asm.Ja).apply(null,arguments)},ic=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(ic=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=a.asm.Ka).apply(null,arguments)},jc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(jc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=a.asm.La).apply(null,arguments)},kc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return(kc=a._emscripten_bind_Decoder_GetAttributeId_2= +a.asm.Ma).apply(null,arguments)},lc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(lc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=a.asm.Na).apply(null,arguments)},mc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(mc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=a.asm.Oa).apply(null,arguments)},nc=a._emscripten_bind_Decoder_GetAttribute_2=function(){return(nc=a._emscripten_bind_Decoder_GetAttribute_2=a.asm.Pa).apply(null,arguments)}, +oc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(oc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=a.asm.Qa).apply(null,arguments)},pc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return(pc=a._emscripten_bind_Decoder_GetMetadata_1=a.asm.Ra).apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(qc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=a.asm.Sa).apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetFaceFromMesh_3= +function(){return(rc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=a.asm.Ta).apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return(sc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=a.asm.Ua).apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(tc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=a.asm.Va).apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(uc= +a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=a.asm.Wa).apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(vc=a._emscripten_bind_Decoder_GetAttributeFloat_3=a.asm.Xa).apply(null,arguments)},wc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(wc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=a.asm.Ya).apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(xc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3= +a.asm.Za).apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(yc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=a.asm._a).apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(zc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=a.asm.$a).apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(Ac=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3= +a.asm.ab).apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(Bc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=a.asm.bb).apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Cc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=a.asm.cb).apply(null,arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Dc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3= +a.asm.db).apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return(Ec=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=a.asm.eb).apply(null,arguments)},Fc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Fc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=a.asm.fb).apply(null,arguments)},Gc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Gc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1= +a.asm.gb).apply(null,arguments)},Hc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(Hc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=a.asm.hb).apply(null,arguments)},Ic=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Ic=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=a.asm.ib).apply(null,arguments)},Jc=a._emscripten_bind_Decoder___destroy___0=function(){return(Jc=a._emscripten_bind_Decoder___destroy___0=a.asm.jb).apply(null,arguments)},Kc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM= +function(){return(Kc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=a.asm.kb).apply(null,arguments)},Lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=a.asm.lb).apply(null,arguments)},Mc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Mc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM= +a.asm.mb).apply(null,arguments)},Nc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return(Nc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=a.asm.nb).apply(null,arguments)},Oc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Oc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=a.asm.ob).apply(null,arguments)},Pc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(Pc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION= +a.asm.pb).apply(null,arguments)},Qc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(Qc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=a.asm.qb).apply(null,arguments)},Rc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Rc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=a.asm.rb).apply(null,arguments)},Sc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Sc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD= +a.asm.sb).apply(null,arguments)},Tc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(Tc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=a.asm.tb).apply(null,arguments)},Uc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(Uc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=a.asm.ub).apply(null,arguments)},Vc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(Vc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD= +a.asm.vb).apply(null,arguments)},Wc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(Wc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=a.asm.wb).apply(null,arguments)},Xc=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return(Xc=a._emscripten_enum_draco_DataType_DT_INVALID=a.asm.xb).apply(null,arguments)},Yc=a._emscripten_enum_draco_DataType_DT_INT8=function(){return(Yc=a._emscripten_enum_draco_DataType_DT_INT8=a.asm.yb).apply(null,arguments)},Zc= +a._emscripten_enum_draco_DataType_DT_UINT8=function(){return(Zc=a._emscripten_enum_draco_DataType_DT_UINT8=a.asm.zb).apply(null,arguments)},$c=a._emscripten_enum_draco_DataType_DT_INT16=function(){return($c=a._emscripten_enum_draco_DataType_DT_INT16=a.asm.Ab).apply(null,arguments)},ad=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return(ad=a._emscripten_enum_draco_DataType_DT_UINT16=a.asm.Bb).apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return(bd=a._emscripten_enum_draco_DataType_DT_INT32= +a.asm.Cb).apply(null,arguments)},cd=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return(cd=a._emscripten_enum_draco_DataType_DT_UINT32=a.asm.Db).apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_INT64=function(){return(dd=a._emscripten_enum_draco_DataType_DT_INT64=a.asm.Eb).apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return(ed=a._emscripten_enum_draco_DataType_DT_UINT64=a.asm.Fb).apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_FLOAT32= +function(){return(fd=a._emscripten_enum_draco_DataType_DT_FLOAT32=a.asm.Gb).apply(null,arguments)},gd=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(gd=a._emscripten_enum_draco_DataType_DT_FLOAT64=a.asm.Hb).apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return(hd=a._emscripten_enum_draco_DataType_DT_BOOL=a.asm.Ib).apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(id=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT= +a.asm.Jb).apply(null,arguments)},jd=a._emscripten_enum_draco_StatusCode_OK=function(){return(jd=a._emscripten_enum_draco_StatusCode_OK=a.asm.Kb).apply(null,arguments)},kd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(kd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=a.asm.Lb).apply(null,arguments)},ld=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(ld=a._emscripten_enum_draco_StatusCode_IO_ERROR=a.asm.Mb).apply(null,arguments)},md=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER= +function(){return(md=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=a.asm.Nb).apply(null,arguments)},nd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(nd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=a.asm.Ob).apply(null,arguments)},od=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(od=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=a.asm.Pb).apply(null,arguments)};a._malloc=function(){return(a._malloc=a.asm.Qb).apply(null,arguments)}; +a._free=function(){return(a._free=a.asm.Rb).apply(null,arguments)};var ua=function(){return(ua=a.asm.Sb).apply(null,arguments)};a.___start_em_js=11660;a.___stop_em_js=11758;var la;ha=function b(){la||F();la||(ha=b)};if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0=r.size?(0>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var g=0;gb.byteLength)return a.INVALID_GEOMETRY_TYPE;switch(b[7]){case 0:return a.POINT_CLOUD;case 1:return a.TRIANGULAR_MESH;default:return a.INVALID_GEOMETRY_TYPE}};return n.ready}}();"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule); diff --git a/node_modules/three/examples/jsm/libs/ecsy.module.js b/node_modules/three/examples/jsm/libs/ecsy.module.js new file mode 100644 index 0000000..6f67599 --- /dev/null +++ b/node_modules/three/examples/jsm/libs/ecsy.module.js @@ -0,0 +1,1792 @@ +/** + * Return the name of a component + * @param {Component} Component + * @private + */ + +/** + * Get a key from a list of components + * @param {Array(Component)} Components Array of components to generate the key + * @private + */ +function queryKey(Components) { + var ids = []; + for (var n = 0; n < Components.length; n++) { + var T = Components[n]; + + if (!componentRegistered(T)) { + throw new Error(`Tried to create a query with an unregistered component`); + } + + if (typeof T === "object") { + var operator = T.operator === "not" ? "!" : T.operator; + ids.push(operator + T.Component._typeId); + } else { + ids.push(T._typeId); + } + } + + return ids.sort().join("-"); +} + +// Detector for browser's "window" +const hasWindow = typeof window !== "undefined"; + +// performance.now() "polyfill" +const now = + hasWindow && typeof window.performance !== "undefined" + ? performance.now.bind(performance) + : Date.now.bind(Date); + +function componentRegistered(T) { + return ( + (typeof T === "object" && T.Component._typeId !== undefined) || + (T.isComponent && T._typeId !== undefined) + ); +} + +class SystemManager { + constructor(world) { + this._systems = []; + this._executeSystems = []; // Systems that have `execute` method + this.world = world; + this.lastExecutedSystem = null; + } + + registerSystem(SystemClass, attributes) { + if (!SystemClass.isSystem) { + throw new Error( + `System '${SystemClass.name}' does not extend 'System' class` + ); + } + + if (this.getSystem(SystemClass) !== undefined) { + console.warn(`System '${SystemClass.getName()}' already registered.`); + return this; + } + + var system = new SystemClass(this.world, attributes); + if (system.init) system.init(attributes); + system.order = this._systems.length; + this._systems.push(system); + if (system.execute) { + this._executeSystems.push(system); + this.sortSystems(); + } + return this; + } + + unregisterSystem(SystemClass) { + let system = this.getSystem(SystemClass); + if (system === undefined) { + console.warn( + `Can unregister system '${SystemClass.getName()}'. It doesn't exist.` + ); + return this; + } + + this._systems.splice(this._systems.indexOf(system), 1); + + if (system.execute) { + this._executeSystems.splice(this._executeSystems.indexOf(system), 1); + } + + // @todo Add system.unregister() call to free resources + return this; + } + + sortSystems() { + this._executeSystems.sort((a, b) => { + return a.priority - b.priority || a.order - b.order; + }); + } + + getSystem(SystemClass) { + return this._systems.find((s) => s instanceof SystemClass); + } + + getSystems() { + return this._systems; + } + + removeSystem(SystemClass) { + var index = this._systems.indexOf(SystemClass); + if (!~index) return; + + this._systems.splice(index, 1); + } + + executeSystem(system, delta, time) { + if (system.initialized) { + if (system.canExecute()) { + let startTime = now(); + system.execute(delta, time); + system.executeTime = now() - startTime; + this.lastExecutedSystem = system; + system.clearEvents(); + } + } + } + + stop() { + this._executeSystems.forEach((system) => system.stop()); + } + + execute(delta, time, forcePlay) { + this._executeSystems.forEach( + (system) => + (forcePlay || system.enabled) && this.executeSystem(system, delta, time) + ); + } + + stats() { + var stats = { + numSystems: this._systems.length, + systems: {}, + }; + + for (var i = 0; i < this._systems.length; i++) { + var system = this._systems[i]; + var systemStats = (stats.systems[system.getName()] = { + queries: {}, + executeTime: system.executeTime, + }); + for (var name in system.ctx) { + systemStats.queries[name] = system.ctx[name].stats(); + } + } + + return stats; + } +} + +class ObjectPool { + // @todo Add initial size + constructor(T, initialSize) { + this.freeList = []; + this.count = 0; + this.T = T; + this.isObjectPool = true; + + if (typeof initialSize !== "undefined") { + this.expand(initialSize); + } + } + + acquire() { + // Grow the list by 20%ish if we're out + if (this.freeList.length <= 0) { + this.expand(Math.round(this.count * 0.2) + 1); + } + + var item = this.freeList.pop(); + + return item; + } + + release(item) { + item.reset(); + this.freeList.push(item); + } + + expand(count) { + for (var n = 0; n < count; n++) { + var clone = new this.T(); + clone._pool = this; + this.freeList.push(clone); + } + this.count += count; + } + + totalSize() { + return this.count; + } + + totalFree() { + return this.freeList.length; + } + + totalUsed() { + return this.count - this.freeList.length; + } +} + +/** + * @private + * @class EventDispatcher + */ +class EventDispatcher { + constructor() { + this._listeners = {}; + this.stats = { + fired: 0, + handled: 0, + }; + } + + /** + * Add an event listener + * @param {String} eventName Name of the event to listen + * @param {Function} listener Callback to trigger when the event is fired + */ + addEventListener(eventName, listener) { + let listeners = this._listeners; + if (listeners[eventName] === undefined) { + listeners[eventName] = []; + } + + if (listeners[eventName].indexOf(listener) === -1) { + listeners[eventName].push(listener); + } + } + + /** + * Check if an event listener is already added to the list of listeners + * @param {String} eventName Name of the event to check + * @param {Function} listener Callback for the specified event + */ + hasEventListener(eventName, listener) { + return ( + this._listeners[eventName] !== undefined && + this._listeners[eventName].indexOf(listener) !== -1 + ); + } + + /** + * Remove an event listener + * @param {String} eventName Name of the event to remove + * @param {Function} listener Callback for the specified event + */ + removeEventListener(eventName, listener) { + var listenerArray = this._listeners[eventName]; + if (listenerArray !== undefined) { + var index = listenerArray.indexOf(listener); + if (index !== -1) { + listenerArray.splice(index, 1); + } + } + } + + /** + * Dispatch an event + * @param {String} eventName Name of the event to dispatch + * @param {Entity} entity (Optional) Entity to emit + * @param {Component} component + */ + dispatchEvent(eventName, entity, component) { + this.stats.fired++; + + var listenerArray = this._listeners[eventName]; + if (listenerArray !== undefined) { + var array = listenerArray.slice(0); + + for (var i = 0; i < array.length; i++) { + array[i].call(this, entity, component); + } + } + } + + /** + * Reset stats counters + */ + resetCounters() { + this.stats.fired = this.stats.handled = 0; + } +} + +class Query { + /** + * @param {Array(Component)} Components List of types of components to query + */ + constructor(Components, manager) { + this.Components = []; + this.NotComponents = []; + + Components.forEach((component) => { + if (typeof component === "object") { + this.NotComponents.push(component.Component); + } else { + this.Components.push(component); + } + }); + + if (this.Components.length === 0) { + throw new Error("Can't create a query without components"); + } + + this.entities = []; + + this.eventDispatcher = new EventDispatcher(); + + // This query is being used by a reactive system + this.reactive = false; + + this.key = queryKey(Components); + + // Fill the query with the existing entities + for (var i = 0; i < manager._entities.length; i++) { + var entity = manager._entities[i]; + if (this.match(entity)) { + // @todo ??? this.addEntity(entity); => preventing the event to be generated + entity.queries.push(this); + this.entities.push(entity); + } + } + } + + /** + * Add entity to this query + * @param {Entity} entity + */ + addEntity(entity) { + entity.queries.push(this); + this.entities.push(entity); + + this.eventDispatcher.dispatchEvent(Query.prototype.ENTITY_ADDED, entity); + } + + /** + * Remove entity from this query + * @param {Entity} entity + */ + removeEntity(entity) { + let index = this.entities.indexOf(entity); + if (~index) { + this.entities.splice(index, 1); + + index = entity.queries.indexOf(this); + entity.queries.splice(index, 1); + + this.eventDispatcher.dispatchEvent( + Query.prototype.ENTITY_REMOVED, + entity + ); + } + } + + match(entity) { + return ( + entity.hasAllComponents(this.Components) && + !entity.hasAnyComponents(this.NotComponents) + ); + } + + toJSON() { + return { + key: this.key, + reactive: this.reactive, + components: { + included: this.Components.map((C) => C.name), + not: this.NotComponents.map((C) => C.name), + }, + numEntities: this.entities.length, + }; + } + + /** + * Return stats for this query + */ + stats() { + return { + numComponents: this.Components.length, + numEntities: this.entities.length, + }; + } +} + +Query.prototype.ENTITY_ADDED = "Query#ENTITY_ADDED"; +Query.prototype.ENTITY_REMOVED = "Query#ENTITY_REMOVED"; +Query.prototype.COMPONENT_CHANGED = "Query#COMPONENT_CHANGED"; + +/** + * @private + * @class QueryManager + */ +class QueryManager { + constructor(world) { + this._world = world; + + // Queries indexed by a unique identifier for the components it has + this._queries = {}; + } + + onEntityRemoved(entity) { + for (var queryName in this._queries) { + var query = this._queries[queryName]; + if (entity.queries.indexOf(query) !== -1) { + query.removeEntity(entity); + } + } + } + + /** + * Callback when a component is added to an entity + * @param {Entity} entity Entity that just got the new component + * @param {Component} Component Component added to the entity + */ + onEntityComponentAdded(entity, Component) { + // @todo Use bitmask for checking components? + + // Check each indexed query to see if we need to add this entity to the list + for (var queryName in this._queries) { + var query = this._queries[queryName]; + + if ( + !!~query.NotComponents.indexOf(Component) && + ~query.entities.indexOf(entity) + ) { + query.removeEntity(entity); + continue; + } + + // Add the entity only if: + // Component is in the query + // and Entity has ALL the components of the query + // and Entity is not already in the query + if ( + !~query.Components.indexOf(Component) || + !query.match(entity) || + ~query.entities.indexOf(entity) + ) + continue; + + query.addEntity(entity); + } + } + + /** + * Callback when a component is removed from an entity + * @param {Entity} entity Entity to remove the component from + * @param {Component} Component Component to remove from the entity + */ + onEntityComponentRemoved(entity, Component) { + for (var queryName in this._queries) { + var query = this._queries[queryName]; + + if ( + !!~query.NotComponents.indexOf(Component) && + !~query.entities.indexOf(entity) && + query.match(entity) + ) { + query.addEntity(entity); + continue; + } + + if ( + !!~query.Components.indexOf(Component) && + !!~query.entities.indexOf(entity) && + !query.match(entity) + ) { + query.removeEntity(entity); + continue; + } + } + } + + /** + * Get a query for the specified components + * @param {Component} Components Components that the query should have + */ + getQuery(Components) { + var key = queryKey(Components); + var query = this._queries[key]; + if (!query) { + this._queries[key] = query = new Query(Components, this._world); + } + return query; + } + + /** + * Return some stats from this class + */ + stats() { + var stats = {}; + for (var queryName in this._queries) { + stats[queryName] = this._queries[queryName].stats(); + } + return stats; + } +} + +class Component { + constructor(props) { + if (props !== false) { + const schema = this.constructor.schema; + + for (const key in schema) { + if (props && props.hasOwnProperty(key)) { + this[key] = props[key]; + } else { + const schemaProp = schema[key]; + if (schemaProp.hasOwnProperty("default")) { + this[key] = schemaProp.type.clone(schemaProp.default); + } else { + const type = schemaProp.type; + this[key] = type.clone(type.default); + } + } + } + + if ( props !== undefined) { + this.checkUndefinedAttributes(props); + } + } + + this._pool = null; + } + + copy(source) { + const schema = this.constructor.schema; + + for (const key in schema) { + const prop = schema[key]; + + if (source.hasOwnProperty(key)) { + this[key] = prop.type.copy(source[key], this[key]); + } + } + + // @DEBUG + { + this.checkUndefinedAttributes(source); + } + + return this; + } + + clone() { + return new this.constructor().copy(this); + } + + reset() { + const schema = this.constructor.schema; + + for (const key in schema) { + const schemaProp = schema[key]; + + if (schemaProp.hasOwnProperty("default")) { + this[key] = schemaProp.type.copy(schemaProp.default, this[key]); + } else { + const type = schemaProp.type; + this[key] = type.copy(type.default, this[key]); + } + } + } + + dispose() { + if (this._pool) { + this._pool.release(this); + } + } + + getName() { + return this.constructor.getName(); + } + + checkUndefinedAttributes(src) { + const schema = this.constructor.schema; + + // Check that the attributes defined in source are also defined in the schema + Object.keys(src).forEach((srcKey) => { + if (!schema.hasOwnProperty(srcKey)) { + console.warn( + `Trying to set attribute '${srcKey}' not defined in the '${this.constructor.name}' schema. Please fix the schema, the attribute value won't be set` + ); + } + }); + } +} + +Component.schema = {}; +Component.isComponent = true; +Component.getName = function () { + return this.displayName || this.name; +}; + +class SystemStateComponent extends Component {} + +SystemStateComponent.isSystemStateComponent = true; + +class EntityPool extends ObjectPool { + constructor(entityManager, entityClass, initialSize) { + super(entityClass, undefined); + this.entityManager = entityManager; + + if (typeof initialSize !== "undefined") { + this.expand(initialSize); + } + } + + expand(count) { + for (var n = 0; n < count; n++) { + var clone = new this.T(this.entityManager); + clone._pool = this; + this.freeList.push(clone); + } + this.count += count; + } +} + +/** + * @private + * @class EntityManager + */ +class EntityManager { + constructor(world) { + this.world = world; + this.componentsManager = world.componentsManager; + + // All the entities in this instance + this._entities = []; + this._nextEntityId = 0; + + this._entitiesByNames = {}; + + this._queryManager = new QueryManager(this); + this.eventDispatcher = new EventDispatcher(); + this._entityPool = new EntityPool( + this, + this.world.options.entityClass, + this.world.options.entityPoolSize + ); + + // Deferred deletion + this.entitiesWithComponentsToRemove = []; + this.entitiesToRemove = []; + this.deferredRemovalEnabled = true; + } + + getEntityByName(name) { + return this._entitiesByNames[name]; + } + + /** + * Create a new entity + */ + createEntity(name) { + var entity = this._entityPool.acquire(); + entity.alive = true; + entity.name = name || ""; + if (name) { + if (this._entitiesByNames[name]) { + console.warn(`Entity name '${name}' already exist`); + } else { + this._entitiesByNames[name] = entity; + } + } + + this._entities.push(entity); + this.eventDispatcher.dispatchEvent(ENTITY_CREATED, entity); + return entity; + } + + // COMPONENTS + + /** + * Add a component to an entity + * @param {Entity} entity Entity where the component will be added + * @param {Component} Component Component to be added to the entity + * @param {Object} values Optional values to replace the default attributes + */ + entityAddComponent(entity, Component, values) { + // @todo Probably define Component._typeId with a default value and avoid using typeof + if ( + typeof Component._typeId === "undefined" && + !this.world.componentsManager._ComponentsMap[Component._typeId] + ) { + throw new Error( + `Attempted to add unregistered component "${Component.getName()}"` + ); + } + + if (~entity._ComponentTypes.indexOf(Component)) { + { + console.warn( + "Component type already exists on entity.", + entity, + Component.getName() + ); + } + return; + } + + entity._ComponentTypes.push(Component); + + if (Component.__proto__ === SystemStateComponent) { + entity.numStateComponents++; + } + + var componentPool = this.world.componentsManager.getComponentsPool( + Component + ); + + var component = componentPool + ? componentPool.acquire() + : new Component(values); + + if (componentPool && values) { + component.copy(values); + } + + entity._components[Component._typeId] = component; + + this._queryManager.onEntityComponentAdded(entity, Component); + this.world.componentsManager.componentAddedToEntity(Component); + + this.eventDispatcher.dispatchEvent(COMPONENT_ADDED, entity, Component); + } + + /** + * Remove a component from an entity + * @param {Entity} entity Entity which will get removed the component + * @param {*} Component Component to remove from the entity + * @param {Bool} immediately If you want to remove the component immediately instead of deferred (Default is false) + */ + entityRemoveComponent(entity, Component, immediately) { + var index = entity._ComponentTypes.indexOf(Component); + if (!~index) return; + + this.eventDispatcher.dispatchEvent(COMPONENT_REMOVE, entity, Component); + + if (immediately) { + this._entityRemoveComponentSync(entity, Component, index); + } else { + if (entity._ComponentTypesToRemove.length === 0) + this.entitiesWithComponentsToRemove.push(entity); + + entity._ComponentTypes.splice(index, 1); + entity._ComponentTypesToRemove.push(Component); + + entity._componentsToRemove[Component._typeId] = + entity._components[Component._typeId]; + delete entity._components[Component._typeId]; + } + + // Check each indexed query to see if we need to remove it + this._queryManager.onEntityComponentRemoved(entity, Component); + + if (Component.__proto__ === SystemStateComponent) { + entity.numStateComponents--; + + // Check if the entity was a ghost waiting for the last system state component to be removed + if (entity.numStateComponents === 0 && !entity.alive) { + entity.remove(); + } + } + } + + _entityRemoveComponentSync(entity, Component, index) { + // Remove T listing on entity and property ref, then free the component. + entity._ComponentTypes.splice(index, 1); + var component = entity._components[Component._typeId]; + delete entity._components[Component._typeId]; + component.dispose(); + this.world.componentsManager.componentRemovedFromEntity(Component); + } + + /** + * Remove all the components from an entity + * @param {Entity} entity Entity from which the components will be removed + */ + entityRemoveAllComponents(entity, immediately) { + let Components = entity._ComponentTypes; + + for (let j = Components.length - 1; j >= 0; j--) { + if (Components[j].__proto__ !== SystemStateComponent) + this.entityRemoveComponent(entity, Components[j], immediately); + } + } + + /** + * Remove the entity from this manager. It will clear also its components + * @param {Entity} entity Entity to remove from the manager + * @param {Bool} immediately If you want to remove the component immediately instead of deferred (Default is false) + */ + removeEntity(entity, immediately) { + var index = this._entities.indexOf(entity); + + if (!~index) throw new Error("Tried to remove entity not in list"); + + entity.alive = false; + this.entityRemoveAllComponents(entity, immediately); + + if (entity.numStateComponents === 0) { + // Remove from entity list + this.eventDispatcher.dispatchEvent(ENTITY_REMOVED, entity); + this._queryManager.onEntityRemoved(entity); + if (immediately === true) { + this._releaseEntity(entity, index); + } else { + this.entitiesToRemove.push(entity); + } + } + } + + _releaseEntity(entity, index) { + this._entities.splice(index, 1); + + if (this._entitiesByNames[entity.name]) { + delete this._entitiesByNames[entity.name]; + } + entity._pool.release(entity); + } + + /** + * Remove all entities from this manager + */ + removeAllEntities() { + for (var i = this._entities.length - 1; i >= 0; i--) { + this.removeEntity(this._entities[i]); + } + } + + processDeferredRemoval() { + if (!this.deferredRemovalEnabled) { + return; + } + + for (let i = 0; i < this.entitiesToRemove.length; i++) { + let entity = this.entitiesToRemove[i]; + let index = this._entities.indexOf(entity); + this._releaseEntity(entity, index); + } + this.entitiesToRemove.length = 0; + + for (let i = 0; i < this.entitiesWithComponentsToRemove.length; i++) { + let entity = this.entitiesWithComponentsToRemove[i]; + while (entity._ComponentTypesToRemove.length > 0) { + let Component = entity._ComponentTypesToRemove.pop(); + + var component = entity._componentsToRemove[Component._typeId]; + delete entity._componentsToRemove[Component._typeId]; + component.dispose(); + this.world.componentsManager.componentRemovedFromEntity(Component); + + //this._entityRemoveComponentSync(entity, Component, index); + } + } + + this.entitiesWithComponentsToRemove.length = 0; + } + + /** + * Get a query based on a list of components + * @param {Array(Component)} Components List of components that will form the query + */ + queryComponents(Components) { + return this._queryManager.getQuery(Components); + } + + // EXTRAS + + /** + * Return number of entities + */ + count() { + return this._entities.length; + } + + /** + * Return some stats + */ + stats() { + var stats = { + numEntities: this._entities.length, + numQueries: Object.keys(this._queryManager._queries).length, + queries: this._queryManager.stats(), + numComponentPool: Object.keys(this.componentsManager._componentPool) + .length, + componentPool: {}, + eventDispatcher: this.eventDispatcher.stats, + }; + + for (var ecsyComponentId in this.componentsManager._componentPool) { + var pool = this.componentsManager._componentPool[ecsyComponentId]; + stats.componentPool[pool.T.getName()] = { + used: pool.totalUsed(), + size: pool.count, + }; + } + + return stats; + } +} + +const ENTITY_CREATED = "EntityManager#ENTITY_CREATE"; +const ENTITY_REMOVED = "EntityManager#ENTITY_REMOVED"; +const COMPONENT_ADDED = "EntityManager#COMPONENT_ADDED"; +const COMPONENT_REMOVE = "EntityManager#COMPONENT_REMOVE"; + +class ComponentManager { + constructor() { + this.Components = []; + this._ComponentsMap = {}; + + this._componentPool = {}; + this.numComponents = {}; + this.nextComponentId = 0; + } + + hasComponent(Component) { + return this.Components.indexOf(Component) !== -1; + } + + registerComponent(Component, objectPool) { + if (this.Components.indexOf(Component) !== -1) { + console.warn( + `Component type: '${Component.getName()}' already registered.` + ); + return; + } + + const schema = Component.schema; + + if (!schema) { + throw new Error( + `Component "${Component.getName()}" has no schema property.` + ); + } + + for (const propName in schema) { + const prop = schema[propName]; + + if (!prop.type) { + throw new Error( + `Invalid schema for component "${Component.getName()}". Missing type for "${propName}" property.` + ); + } + } + + Component._typeId = this.nextComponentId++; + this.Components.push(Component); + this._ComponentsMap[Component._typeId] = Component; + this.numComponents[Component._typeId] = 0; + + if (objectPool === undefined) { + objectPool = new ObjectPool(Component); + } else if (objectPool === false) { + objectPool = undefined; + } + + this._componentPool[Component._typeId] = objectPool; + } + + componentAddedToEntity(Component) { + this.numComponents[Component._typeId]++; + } + + componentRemovedFromEntity(Component) { + this.numComponents[Component._typeId]--; + } + + getComponentsPool(Component) { + return this._componentPool[Component._typeId]; + } +} + +const Version = "0.3.1"; + +const proxyMap = new WeakMap(); + +const proxyHandler = { + set(target, prop) { + throw new Error( + `Tried to write to "${target.constructor.getName()}#${String( + prop + )}" on immutable component. Use .getMutableComponent() to modify a component.` + ); + }, +}; + +function wrapImmutableComponent(T, component) { + if (component === undefined) { + return undefined; + } + + let wrappedComponent = proxyMap.get(component); + + if (!wrappedComponent) { + wrappedComponent = new Proxy(component, proxyHandler); + proxyMap.set(component, wrappedComponent); + } + + return wrappedComponent; +} + +class Entity { + constructor(entityManager) { + this._entityManager = entityManager || null; + + // Unique ID for this entity + this.id = entityManager._nextEntityId++; + + // List of components types the entity has + this._ComponentTypes = []; + + // Instance of the components + this._components = {}; + + this._componentsToRemove = {}; + + // Queries where the entity is added + this.queries = []; + + // Used for deferred removal + this._ComponentTypesToRemove = []; + + this.alive = false; + + //if there are state components on a entity, it can't be removed completely + this.numStateComponents = 0; + } + + // COMPONENTS + + getComponent(Component, includeRemoved) { + var component = this._components[Component._typeId]; + + if (!component && includeRemoved === true) { + component = this._componentsToRemove[Component._typeId]; + } + + return wrapImmutableComponent(Component, component) + ; + } + + getRemovedComponent(Component) { + const component = this._componentsToRemove[Component._typeId]; + + return wrapImmutableComponent(Component, component) + ; + } + + getComponents() { + return this._components; + } + + getComponentsToRemove() { + return this._componentsToRemove; + } + + getComponentTypes() { + return this._ComponentTypes; + } + + getMutableComponent(Component) { + var component = this._components[Component._typeId]; + + if (!component) { + return; + } + + for (var i = 0; i < this.queries.length; i++) { + var query = this.queries[i]; + // @todo accelerate this check. Maybe having query._Components as an object + // @todo add Not components + if (query.reactive && query.Components.indexOf(Component) !== -1) { + query.eventDispatcher.dispatchEvent( + Query.prototype.COMPONENT_CHANGED, + this, + component + ); + } + } + return component; + } + + addComponent(Component, values) { + this._entityManager.entityAddComponent(this, Component, values); + return this; + } + + removeComponent(Component, forceImmediate) { + this._entityManager.entityRemoveComponent(this, Component, forceImmediate); + return this; + } + + hasComponent(Component, includeRemoved) { + return ( + !!~this._ComponentTypes.indexOf(Component) || + (includeRemoved === true && this.hasRemovedComponent(Component)) + ); + } + + hasRemovedComponent(Component) { + return !!~this._ComponentTypesToRemove.indexOf(Component); + } + + hasAllComponents(Components) { + for (var i = 0; i < Components.length; i++) { + if (!this.hasComponent(Components[i])) return false; + } + return true; + } + + hasAnyComponents(Components) { + for (var i = 0; i < Components.length; i++) { + if (this.hasComponent(Components[i])) return true; + } + return false; + } + + removeAllComponents(forceImmediate) { + return this._entityManager.entityRemoveAllComponents(this, forceImmediate); + } + + copy(src) { + // TODO: This can definitely be optimized + for (var ecsyComponentId in src._components) { + var srcComponent = src._components[ecsyComponentId]; + this.addComponent(srcComponent.constructor); + var component = this.getComponent(srcComponent.constructor); + component.copy(srcComponent); + } + + return this; + } + + clone() { + return new Entity(this._entityManager).copy(this); + } + + reset() { + this.id = this._entityManager._nextEntityId++; + this._ComponentTypes.length = 0; + this.queries.length = 0; + + for (var ecsyComponentId in this._components) { + delete this._components[ecsyComponentId]; + } + } + + remove(forceImmediate) { + return this._entityManager.removeEntity(this, forceImmediate); + } +} + +const DEFAULT_OPTIONS = { + entityPoolSize: 0, + entityClass: Entity, +}; + +class World { + constructor(options = {}) { + this.options = Object.assign({}, DEFAULT_OPTIONS, options); + + this.componentsManager = new ComponentManager(this); + this.entityManager = new EntityManager(this); + this.systemManager = new SystemManager(this); + + this.enabled = true; + + this.eventQueues = {}; + + if (hasWindow && typeof CustomEvent !== "undefined") { + var event = new CustomEvent("ecsy-world-created", { + detail: { world: this, version: Version }, + }); + window.dispatchEvent(event); + } + + this.lastTime = now() / 1000; + } + + registerComponent(Component, objectPool) { + this.componentsManager.registerComponent(Component, objectPool); + return this; + } + + registerSystem(System, attributes) { + this.systemManager.registerSystem(System, attributes); + return this; + } + + hasRegisteredComponent(Component) { + return this.componentsManager.hasComponent(Component); + } + + unregisterSystem(System) { + this.systemManager.unregisterSystem(System); + return this; + } + + getSystem(SystemClass) { + return this.systemManager.getSystem(SystemClass); + } + + getSystems() { + return this.systemManager.getSystems(); + } + + execute(delta, time) { + if (!delta) { + time = now() / 1000; + delta = time - this.lastTime; + this.lastTime = time; + } + + if (this.enabled) { + this.systemManager.execute(delta, time); + this.entityManager.processDeferredRemoval(); + } + } + + stop() { + this.enabled = false; + } + + play() { + this.enabled = true; + } + + createEntity(name) { + return this.entityManager.createEntity(name); + } + + stats() { + var stats = { + entities: this.entityManager.stats(), + system: this.systemManager.stats(), + }; + + return stats; + } +} + +class System { + canExecute() { + if (this._mandatoryQueries.length === 0) return true; + + for (let i = 0; i < this._mandatoryQueries.length; i++) { + var query = this._mandatoryQueries[i]; + if (query.entities.length === 0) { + return false; + } + } + + return true; + } + + getName() { + return this.constructor.getName(); + } + + constructor(world, attributes) { + this.world = world; + this.enabled = true; + + // @todo Better naming :) + this._queries = {}; + this.queries = {}; + + this.priority = 0; + + // Used for stats + this.executeTime = 0; + + if (attributes && attributes.priority) { + this.priority = attributes.priority; + } + + this._mandatoryQueries = []; + + this.initialized = true; + + if (this.constructor.queries) { + for (var queryName in this.constructor.queries) { + var queryConfig = this.constructor.queries[queryName]; + var Components = queryConfig.components; + if (!Components || Components.length === 0) { + throw new Error("'components' attribute can't be empty in a query"); + } + + // Detect if the components have already been registered + let unregisteredComponents = Components.filter( + (Component) => !componentRegistered(Component) + ); + + if (unregisteredComponents.length > 0) { + throw new Error( + `Tried to create a query '${ + this.constructor.name + }.${queryName}' with unregistered components: [${unregisteredComponents + .map((c) => c.getName()) + .join(", ")}]` + ); + } + + var query = this.world.entityManager.queryComponents(Components); + + this._queries[queryName] = query; + if (queryConfig.mandatory === true) { + this._mandatoryQueries.push(query); + } + this.queries[queryName] = { + results: query.entities, + }; + + // Reactive configuration added/removed/changed + var validEvents = ["added", "removed", "changed"]; + + const eventMapping = { + added: Query.prototype.ENTITY_ADDED, + removed: Query.prototype.ENTITY_REMOVED, + changed: Query.prototype.COMPONENT_CHANGED, // Query.prototype.ENTITY_CHANGED + }; + + if (queryConfig.listen) { + validEvents.forEach((eventName) => { + if (!this.execute) { + console.warn( + `System '${this.getName()}' has defined listen events (${validEvents.join( + ", " + )}) for query '${queryName}' but it does not implement the 'execute' method.` + ); + } + + // Is the event enabled on this system's query? + if (queryConfig.listen[eventName]) { + let event = queryConfig.listen[eventName]; + + if (eventName === "changed") { + query.reactive = true; + if (event === true) { + // Any change on the entity from the components in the query + let eventList = (this.queries[queryName][eventName] = []); + query.eventDispatcher.addEventListener( + Query.prototype.COMPONENT_CHANGED, + (entity) => { + // Avoid duplicates + if (eventList.indexOf(entity) === -1) { + eventList.push(entity); + } + } + ); + } else if (Array.isArray(event)) { + let eventList = (this.queries[queryName][eventName] = []); + query.eventDispatcher.addEventListener( + Query.prototype.COMPONENT_CHANGED, + (entity, changedComponent) => { + // Avoid duplicates + if ( + event.indexOf(changedComponent.constructor) !== -1 && + eventList.indexOf(entity) === -1 + ) { + eventList.push(entity); + } + } + ); + } + } else { + let eventList = (this.queries[queryName][eventName] = []); + + query.eventDispatcher.addEventListener( + eventMapping[eventName], + (entity) => { + // @fixme overhead? + if (eventList.indexOf(entity) === -1) + eventList.push(entity); + } + ); + } + } + }); + } + } + } + } + + stop() { + this.executeTime = 0; + this.enabled = false; + } + + play() { + this.enabled = true; + } + + // @question rename to clear queues? + clearEvents() { + for (let queryName in this.queries) { + var query = this.queries[queryName]; + if (query.added) { + query.added.length = 0; + } + if (query.removed) { + query.removed.length = 0; + } + if (query.changed) { + if (Array.isArray(query.changed)) { + query.changed.length = 0; + } else { + for (let name in query.changed) { + query.changed[name].length = 0; + } + } + } + } + } + + toJSON() { + var json = { + name: this.getName(), + enabled: this.enabled, + executeTime: this.executeTime, + priority: this.priority, + queries: {}, + }; + + if (this.constructor.queries) { + var queries = this.constructor.queries; + for (let queryName in queries) { + let query = this.queries[queryName]; + let queryDefinition = queries[queryName]; + let jsonQuery = (json.queries[queryName] = { + key: this._queries[queryName].key, + }); + + jsonQuery.mandatory = queryDefinition.mandatory === true; + jsonQuery.reactive = + queryDefinition.listen && + (queryDefinition.listen.added === true || + queryDefinition.listen.removed === true || + queryDefinition.listen.changed === true || + Array.isArray(queryDefinition.listen.changed)); + + if (jsonQuery.reactive) { + jsonQuery.listen = {}; + + const methods = ["added", "removed", "changed"]; + methods.forEach((method) => { + if (query[method]) { + jsonQuery.listen[method] = { + entities: query[method].length, + }; + } + }); + } + } + } + + return json; + } +} + +System.isSystem = true; +System.getName = function () { + return this.displayName || this.name; +}; + +function Not(Component) { + return { + operator: "not", + Component: Component, + }; +} + +class TagComponent extends Component { + constructor() { + super(false); + } +} + +TagComponent.isTagComponent = true; + +const copyValue = (src) => src; + +const cloneValue = (src) => src; + +const copyArray = (src, dest) => { + if (!src) { + return src; + } + + if (!dest) { + return src.slice(); + } + + dest.length = 0; + + for (let i = 0; i < src.length; i++) { + dest.push(src[i]); + } + + return dest; +}; + +const cloneArray = (src) => src && src.slice(); + +const copyJSON = (src) => JSON.parse(JSON.stringify(src)); + +const cloneJSON = (src) => JSON.parse(JSON.stringify(src)); + +const copyCopyable = (src, dest) => { + if (!src) { + return src; + } + + if (!dest) { + return src.clone(); + } + + return dest.copy(src); +}; + +const cloneClonable = (src) => src && src.clone(); + +function createType(typeDefinition) { + var mandatoryProperties = ["name", "default", "copy", "clone"]; + + var undefinedProperties = mandatoryProperties.filter((p) => { + return !typeDefinition.hasOwnProperty(p); + }); + + if (undefinedProperties.length > 0) { + throw new Error( + `createType expects a type definition with the following properties: ${undefinedProperties.join( + ", " + )}` + ); + } + + typeDefinition.isType = true; + + return typeDefinition; +} + +/** + * Standard types + */ +const Types = { + Number: createType({ + name: "Number", + default: 0, + copy: copyValue, + clone: cloneValue, + }), + + Boolean: createType({ + name: "Boolean", + default: false, + copy: copyValue, + clone: cloneValue, + }), + + String: createType({ + name: "String", + default: "", + copy: copyValue, + clone: cloneValue, + }), + + Array: createType({ + name: "Array", + default: [], + copy: copyArray, + clone: cloneArray, + }), + + Ref: createType({ + name: "Ref", + default: undefined, + copy: copyValue, + clone: cloneValue, + }), + + JSON: createType({ + name: "JSON", + default: null, + copy: copyJSON, + clone: cloneJSON, + }), +}; + +function generateId(length) { + var result = ""; + var characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + var charactersLength = characters.length; + for (var i = 0; i < length; i++) { + result += characters.charAt(Math.floor(Math.random() * charactersLength)); + } + return result; +} + +function injectScript(src, onLoad) { + var script = document.createElement("script"); + // @todo Use link to the ecsy-devtools repo? + script.src = src; + script.onload = onLoad; + (document.head || document.documentElement).appendChild(script); +} + +/* global Peer */ + +function hookConsoleAndErrors(connection) { + var wrapFunctions = ["error", "warning", "log"]; + wrapFunctions.forEach((key) => { + if (typeof console[key] === "function") { + var fn = console[key].bind(console); + console[key] = (...args) => { + connection.send({ + method: "console", + type: key, + args: JSON.stringify(args), + }); + return fn.apply(null, args); + }; + } + }); + + window.addEventListener("error", (error) => { + connection.send({ + method: "error", + error: JSON.stringify({ + message: error.error.message, + stack: error.error.stack, + }), + }); + }); +} + +function includeRemoteIdHTML(remoteId) { + let infoDiv = document.createElement("div"); + infoDiv.style.cssText = ` + align-items: center; + background-color: #333; + color: #aaa; + display:flex; + font-family: Arial; + font-size: 1.1em; + height: 40px; + justify-content: center; + left: 0; + opacity: 0.9; + position: absolute; + right: 0; + text-align: center; + top: 0; + `; + + infoDiv.innerHTML = `Open ECSY devtools to connect to this page using the code: ${remoteId} `; + document.body.appendChild(infoDiv); + + return infoDiv; +} + +function enableRemoteDevtools(remoteId) { + if (!hasWindow) { + console.warn("Remote devtools not available outside the browser"); + return; + } + + window.generateNewCode = () => { + window.localStorage.clear(); + remoteId = generateId(6); + window.localStorage.setItem("ecsyRemoteId", remoteId); + window.location.reload(false); + }; + + remoteId = remoteId || window.localStorage.getItem("ecsyRemoteId"); + if (!remoteId) { + remoteId = generateId(6); + window.localStorage.setItem("ecsyRemoteId", remoteId); + } + + let infoDiv = includeRemoteIdHTML(remoteId); + + window.__ECSY_REMOTE_DEVTOOLS_INJECTED = true; + window.__ECSY_REMOTE_DEVTOOLS = {}; + + let Version = ""; + + // This is used to collect the worlds created before the communication is being established + let worldsBeforeLoading = []; + let onWorldCreated = (e) => { + var world = e.detail.world; + Version = e.detail.version; + worldsBeforeLoading.push(world); + }; + window.addEventListener("ecsy-world-created", onWorldCreated); + + let onLoaded = () => { + // var peer = new Peer(remoteId); + var peer = new Peer(remoteId, { + host: "peerjs.ecsy.io", + secure: true, + port: 443, + config: { + iceServers: [ + { url: "stun:stun.l.google.com:19302" }, + { url: "stun:stun1.l.google.com:19302" }, + { url: "stun:stun2.l.google.com:19302" }, + { url: "stun:stun3.l.google.com:19302" }, + { url: "stun:stun4.l.google.com:19302" }, + ], + }, + debug: 3, + }); + + peer.on("open", (/* id */) => { + peer.on("connection", (connection) => { + window.__ECSY_REMOTE_DEVTOOLS.connection = connection; + connection.on("open", function () { + // infoDiv.style.visibility = "hidden"; + infoDiv.innerHTML = "Connected"; + + // Receive messages + connection.on("data", function (data) { + if (data.type === "init") { + var script = document.createElement("script"); + script.setAttribute("type", "text/javascript"); + script.onload = () => { + script.parentNode.removeChild(script); + + // Once the script is injected we don't need to listen + window.removeEventListener( + "ecsy-world-created", + onWorldCreated + ); + worldsBeforeLoading.forEach((world) => { + var event = new CustomEvent("ecsy-world-created", { + detail: { world: world, version: Version }, + }); + window.dispatchEvent(event); + }); + }; + script.innerHTML = data.script; + (document.head || document.documentElement).appendChild(script); + script.onload(); + + hookConsoleAndErrors(connection); + } else if (data.type === "executeScript") { + let value = eval(data.script); + if (data.returnEval) { + connection.send({ + method: "evalReturn", + value: value, + }); + } + } + }); + }); + }); + }); + }; + + // Inject PeerJS script + injectScript( + "https://cdn.jsdelivr.net/npm/peerjs@0.3.20/dist/peer.min.js", + onLoaded + ); +} + +if (hasWindow) { + const urlParams = new URLSearchParams(window.location.search); + + // @todo Provide a way to disable it if needed + if (urlParams.has("enable-remote-devtools")) { + enableRemoteDevtools(); + } +} + +export { Component, Not, ObjectPool, System, SystemStateComponent, TagComponent, Types, Version, World, Entity as _Entity, cloneArray, cloneClonable, cloneJSON, cloneValue, copyArray, copyCopyable, copyJSON, copyValue, createType, enableRemoteDevtools }; diff --git a/node_modules/three/examples/jsm/libs/fflate.module.js b/node_modules/three/examples/jsm/libs/fflate.module.js new file mode 100644 index 0000000..0638389 --- /dev/null +++ b/node_modules/three/examples/jsm/libs/fflate.module.js @@ -0,0 +1,2672 @@ +/*! +fflate - fast JavaScript compression/decompression + +Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE +version 0.8.2 +*/ + +// DEFLATE is a complex format; to read this code, you should probably check the RFC first: +// https://tools.ietf.org/html/rfc1951 +// You may also wish to take a look at the guide I made about this program: +// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad +// Some of the following code is similar to that of UZIP.js: +// https://github.com/photopea/UZIP.js +// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size. +// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint +// is better for memory in most engines (I *think*). +var ch2 = {}; +var wk = (function (c, id, msg, transfer, cb) { + var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([ + c + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})' + ], { type: 'text/javascript' })))); + w.onmessage = function (e) { + var d = e.data, ed = d.$e$; + if (ed) { + var err = new Error(ed[0]); + err['code'] = ed[1]; + err.stack = ed[2]; + cb(err, null); + } + else + cb(null, d); + }; + w.postMessage(msg, transfer); + return w; +}); + +// aliases for shorter compressed code (most minifers don't do this) +var u8 = Uint8Array, u16 = Uint16Array, i32 = Int32Array; +// fixed length extra bits +var fleb = new u8([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, /* unused */ 0, 0, /* impossible */ 0]); +// fixed distance extra bits +var fdeb = new u8([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, /* unused */ 0, 0]); +// code length index map +var clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); +// get base, reverse index map from extra bits +var freb = function (eb, start) { + var b = new u16(31); + for (var i = 0; i < 31; ++i) { + b[i] = start += 1 << eb[i - 1]; + } + // numbers here are at max 18 bits + var r = new i32(b[30]); + for (var i = 1; i < 30; ++i) { + for (var j = b[i]; j < b[i + 1]; ++j) { + r[j] = ((j - b[i]) << 5) | i; + } + } + return { b: b, r: r }; +}; +var _a = freb(fleb, 2), fl = _a.b, revfl = _a.r; +// we can ignore the fact that the other numbers are wrong; they never happen anyway +fl[28] = 258, revfl[258] = 28; +var _b = freb(fdeb, 0), fd = _b.b, revfd = _b.r; +// map of value to reverse (assuming 16 bits) +var rev = new u16(32768); +for (var i = 0; i < 32768; ++i) { + // reverse table algorithm from SO + var x = ((i & 0xAAAA) >> 1) | ((i & 0x5555) << 1); + x = ((x & 0xCCCC) >> 2) | ((x & 0x3333) << 2); + x = ((x & 0xF0F0) >> 4) | ((x & 0x0F0F) << 4); + rev[i] = (((x & 0xFF00) >> 8) | ((x & 0x00FF) << 8)) >> 1; +} +// create huffman tree from u8 "map": index -> code length for code index +// mb (max bits) must be at most 15 +// TODO: optimize/split up? +var hMap = (function (cd, mb, r) { + var s = cd.length; + // index + var i = 0; + // u16 "map": index -> # of codes with bit length = index + var l = new u16(mb); + // length of cd must be 288 (total # of codes) + for (; i < s; ++i) { + if (cd[i]) + ++l[cd[i] - 1]; + } + // u16 "map": index -> minimum code for bit length = index + var le = new u16(mb); + for (i = 1; i < mb; ++i) { + le[i] = (le[i - 1] + l[i - 1]) << 1; + } + var co; + if (r) { + // u16 "map": index -> number of actual bits, symbol for code + co = new u16(1 << mb); + // bits to remove for reverser + var rvb = 15 - mb; + for (i = 0; i < s; ++i) { + // ignore 0 lengths + if (cd[i]) { + // num encoding both symbol and bits read + var sv = (i << 4) | cd[i]; + // free bits + var r_1 = mb - cd[i]; + // start value + var v = le[cd[i] - 1]++ << r_1; + // m is end value + for (var m = v | ((1 << r_1) - 1); v <= m; ++v) { + // every 16 bit value starting with the code yields the same result + co[rev[v] >> rvb] = sv; + } + } + } + } + else { + co = new u16(s); + for (i = 0; i < s; ++i) { + if (cd[i]) { + co[i] = rev[le[cd[i] - 1]++] >> (15 - cd[i]); + } + } + } + return co; +}); +// fixed length tree +var flt = new u8(288); +for (var i = 0; i < 144; ++i) + flt[i] = 8; +for (var i = 144; i < 256; ++i) + flt[i] = 9; +for (var i = 256; i < 280; ++i) + flt[i] = 7; +for (var i = 280; i < 288; ++i) + flt[i] = 8; +// fixed distance tree +var fdt = new u8(32); +for (var i = 0; i < 32; ++i) + fdt[i] = 5; +// fixed length map +var flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1); +// fixed distance map +var fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1); +// find max of array +var max = function (a) { + var m = a[0]; + for (var i = 1; i < a.length; ++i) { + if (a[i] > m) + m = a[i]; + } + return m; +}; +// read d, starting at bit p and mask with m +var bits = function (d, p, m) { + var o = (p / 8) | 0; + return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m; +}; +// read d, starting at bit p continuing for at least 16 bits +var bits16 = function (d, p) { + var o = (p / 8) | 0; + return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7)); +}; +// get end of byte +var shft = function (p) { return ((p + 7) / 8) | 0; }; +// typed array slice - allows garbage collector to free original reference, +// while being more compatible than .slice +var slc = function (v, s, e) { + if (s == null || s < 0) + s = 0; + if (e == null || e > v.length) + e = v.length; + // can't use .constructor in case user-supplied + return new u8(v.subarray(s, e)); +}; +/** + * Codes for errors generated within this library + */ +export var FlateErrorCode = { + UnexpectedEOF: 0, + InvalidBlockType: 1, + InvalidLengthLiteral: 2, + InvalidDistance: 3, + StreamFinished: 4, + NoStreamHandler: 5, + InvalidHeader: 6, + NoCallback: 7, + InvalidUTF8: 8, + ExtraFieldTooLong: 9, + InvalidDate: 10, + FilenameTooLong: 11, + StreamFinishing: 12, + InvalidZipData: 13, + UnknownCompressionMethod: 14 +}; +// error codes +var ec = [ + 'unexpected EOF', + 'invalid block type', + 'invalid length/literal', + 'invalid distance', + 'stream finished', + 'no stream handler', + , + 'no callback', + 'invalid UTF-8 data', + 'extra field too long', + 'date not in range 1980-2099', + 'filename too long', + 'stream finishing', + 'invalid zip data' + // determined by unknown compression method +]; +; +var err = function (ind, msg, nt) { + var e = new Error(msg || ec[ind]); + e.code = ind; + if (Error.captureStackTrace) + Error.captureStackTrace(e, err); + if (!nt) + throw e; + return e; +}; +// expands raw DEFLATE data +var inflt = function (dat, st, buf, dict) { + // source length dict length + var sl = dat.length, dl = dict ? dict.length : 0; + if (!sl || st.f && !st.l) + return buf || new u8(0); + var noBuf = !buf; + // have to estimate size + var resize = noBuf || st.i != 2; + // no state + var noSt = st.i; + // Assumes roughly 33% compression ratio average + if (noBuf) + buf = new u8(sl * 3); + // ensure buffer can fit at least l elements + var cbuf = function (l) { + var bl = buf.length; + // need to increase size to fit + if (l > bl) { + // Double or set to necessary, whichever is greater + var nbuf = new u8(Math.max(bl * 2, l)); + nbuf.set(buf); + buf = nbuf; + } + }; + // last chunk bitpos bytes + var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n; + // total bits + var tbts = sl * 8; + do { + if (!lm) { + // BFINAL - this is only 1 when last chunk is next + final = bits(dat, pos, 1); + // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman + var type = bits(dat, pos + 1, 3); + pos += 3; + if (!type) { + // go to end of byte boundary + var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l; + if (t > sl) { + if (noSt) + err(0); + break; + } + // ensure size + if (resize) + cbuf(bt + l); + // Copy over uncompressed data + buf.set(dat.subarray(s, t), bt); + // Get new bitpos, update byte count + st.b = bt += l, st.p = pos = t * 8, st.f = final; + continue; + } + else if (type == 1) + lm = flrm, dm = fdrm, lbt = 9, dbt = 5; + else if (type == 2) { + // literal lengths + var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4; + var tl = hLit + bits(dat, pos + 5, 31) + 1; + pos += 14; + // length+distance tree + var ldt = new u8(tl); + // code length tree + var clt = new u8(19); + for (var i = 0; i < hcLen; ++i) { + // use index map to get real code + clt[clim[i]] = bits(dat, pos + i * 3, 7); + } + pos += hcLen * 3; + // code lengths bits + var clb = max(clt), clbmsk = (1 << clb) - 1; + // code lengths map + var clm = hMap(clt, clb, 1); + for (var i = 0; i < tl;) { + var r = clm[bits(dat, pos, clbmsk)]; + // bits read + pos += r & 15; + // symbol + var s = r >> 4; + // code length to copy + if (s < 16) { + ldt[i++] = s; + } + else { + // copy count + var c = 0, n = 0; + if (s == 16) + n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1]; + else if (s == 17) + n = 3 + bits(dat, pos, 7), pos += 3; + else if (s == 18) + n = 11 + bits(dat, pos, 127), pos += 7; + while (n--) + ldt[i++] = c; + } + } + // length tree distance tree + var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit); + // max length bits + lbt = max(lt); + // max dist bits + dbt = max(dt); + lm = hMap(lt, lbt, 1); + dm = hMap(dt, dbt, 1); + } + else + err(1); + if (pos > tbts) { + if (noSt) + err(0); + break; + } + } + // Make sure the buffer can hold this + the largest possible addition + // Maximum chunk size (practically, theoretically infinite) is 2^17 + if (resize) + cbuf(bt + 131072); + var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1; + var lpos = pos; + for (;; lpos = pos) { + // bits read, code + var c = lm[bits16(dat, pos) & lms], sym = c >> 4; + pos += c & 15; + if (pos > tbts) { + if (noSt) + err(0); + break; + } + if (!c) + err(2); + if (sym < 256) + buf[bt++] = sym; + else if (sym == 256) { + lpos = pos, lm = null; + break; + } + else { + var add = sym - 254; + // no extra bits needed if less + if (sym > 264) { + // index + var i = sym - 257, b = fleb[i]; + add = bits(dat, pos, (1 << b) - 1) + fl[i]; + pos += b; + } + // dist + var d = dm[bits16(dat, pos) & dms], dsym = d >> 4; + if (!d) + err(3); + pos += d & 15; + var dt = fd[dsym]; + if (dsym > 3) { + var b = fdeb[dsym]; + dt += bits16(dat, pos) & (1 << b) - 1, pos += b; + } + if (pos > tbts) { + if (noSt) + err(0); + break; + } + if (resize) + cbuf(bt + 131072); + var end = bt + add; + if (bt < dt) { + var shift = dl - dt, dend = Math.min(dt, end); + if (shift + bt < 0) + err(3); + for (; bt < dend; ++bt) + buf[bt] = dict[shift + bt]; + } + for (; bt < end; ++bt) + buf[bt] = buf[bt - dt]; + } + } + st.l = lm, st.p = lpos, st.b = bt, st.f = final; + if (lm) + final = 1, st.m = lbt, st.d = dm, st.n = dbt; + } while (!final); + // don't reallocate for streams or user buffers + return bt != buf.length && noBuf ? slc(buf, 0, bt) : buf.subarray(0, bt); +}; +// starting at p, write the minimum number of bits that can hold v to d +var wbits = function (d, p, v) { + v <<= p & 7; + var o = (p / 8) | 0; + d[o] |= v; + d[o + 1] |= v >> 8; +}; +// starting at p, write the minimum number of bits (>8) that can hold v to d +var wbits16 = function (d, p, v) { + v <<= p & 7; + var o = (p / 8) | 0; + d[o] |= v; + d[o + 1] |= v >> 8; + d[o + 2] |= v >> 16; +}; +// creates code lengths from a frequency table +var hTree = function (d, mb) { + // Need extra info to make a tree + var t = []; + for (var i = 0; i < d.length; ++i) { + if (d[i]) + t.push({ s: i, f: d[i] }); + } + var s = t.length; + var t2 = t.slice(); + if (!s) + return { t: et, l: 0 }; + if (s == 1) { + var v = new u8(t[0].s + 1); + v[t[0].s] = 1; + return { t: v, l: 1 }; + } + t.sort(function (a, b) { return a.f - b.f; }); + // after i2 reaches last ind, will be stopped + // freq must be greater than largest possible number of symbols + t.push({ s: -1, f: 25001 }); + var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2; + t[0] = { s: -1, f: l.f + r.f, l: l, r: r }; + // efficient algorithm from UZIP.js + // i0 is lookbehind, i2 is lookahead - after processing two low-freq + // symbols that combined have high freq, will start processing i2 (high-freq, + // non-composite) symbols instead + // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/ + while (i1 != s - 1) { + l = t[t[i0].f < t[i2].f ? i0++ : i2++]; + r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++]; + t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r }; + } + var maxSym = t2[0].s; + for (var i = 1; i < s; ++i) { + if (t2[i].s > maxSym) + maxSym = t2[i].s; + } + // code lengths + var tr = new u16(maxSym + 1); + // max bits in tree + var mbt = ln(t[i1 - 1], tr, 0); + if (mbt > mb) { + // more algorithms from UZIP.js + // TODO: find out how this code works (debt) + // ind debt + var i = 0, dt = 0; + // left cost + var lft = mbt - mb, cst = 1 << lft; + t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; }); + for (; i < s; ++i) { + var i2_1 = t2[i].s; + if (tr[i2_1] > mb) { + dt += cst - (1 << (mbt - tr[i2_1])); + tr[i2_1] = mb; + } + else + break; + } + dt >>= lft; + while (dt > 0) { + var i2_2 = t2[i].s; + if (tr[i2_2] < mb) + dt -= 1 << (mb - tr[i2_2]++ - 1); + else + ++i; + } + for (; i >= 0 && dt; --i) { + var i2_3 = t2[i].s; + if (tr[i2_3] == mb) { + --tr[i2_3]; + ++dt; + } + } + mbt = mb; + } + return { t: new u8(tr), l: mbt }; +}; +// get the max length and assign length codes +var ln = function (n, l, d) { + return n.s == -1 + ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1)) + : (l[n.s] = d); +}; +// length codes generation +var lc = function (c) { + var s = c.length; + // Note that the semicolon was intentional + while (s && !c[--s]) + ; + var cl = new u16(++s); + // ind num streak + var cli = 0, cln = c[0], cls = 1; + var w = function (v) { cl[cli++] = v; }; + for (var i = 1; i <= s; ++i) { + if (c[i] == cln && i != s) + ++cls; + else { + if (!cln && cls > 2) { + for (; cls > 138; cls -= 138) + w(32754); + if (cls > 2) { + w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305); + cls = 0; + } + } + else if (cls > 3) { + w(cln), --cls; + for (; cls > 6; cls -= 6) + w(8304); + if (cls > 2) + w(((cls - 3) << 5) | 8208), cls = 0; + } + while (cls--) + w(cln); + cls = 1; + cln = c[i]; + } + } + return { c: cl.subarray(0, cli), n: s }; +}; +// calculate the length of output from tree, code lengths +var clen = function (cf, cl) { + var l = 0; + for (var i = 0; i < cl.length; ++i) + l += cf[i] * cl[i]; + return l; +}; +// writes a fixed block +// returns the new bit pos +var wfblk = function (out, pos, dat) { + // no need to write 00 as type: TypedArray defaults to 0 + var s = dat.length; + var o = shft(pos + 2); + out[o] = s & 255; + out[o + 1] = s >> 8; + out[o + 2] = out[o] ^ 255; + out[o + 3] = out[o + 1] ^ 255; + for (var i = 0; i < s; ++i) + out[o + i + 4] = dat[i]; + return (o + 4 + s) * 8; +}; +// writes a block +var wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) { + wbits(out, p++, final); + ++lf[256]; + var _a = hTree(lf, 15), dlt = _a.t, mlb = _a.l; + var _b = hTree(df, 15), ddt = _b.t, mdb = _b.l; + var _c = lc(dlt), lclt = _c.c, nlc = _c.n; + var _d = lc(ddt), lcdt = _d.c, ndc = _d.n; + var lcfreq = new u16(19); + for (var i = 0; i < lclt.length; ++i) + ++lcfreq[lclt[i] & 31]; + for (var i = 0; i < lcdt.length; ++i) + ++lcfreq[lcdt[i] & 31]; + var _e = hTree(lcfreq, 7), lct = _e.t, mlcb = _e.l; + var nlcc = 19; + for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc) + ; + var flen = (bl + 5) << 3; + var ftlen = clen(lf, flt) + clen(df, fdt) + eb; + var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]; + if (bs >= 0 && flen <= ftlen && flen <= dtlen) + return wfblk(out, p, dat.subarray(bs, bs + bl)); + var lm, ll, dm, dl; + wbits(out, p, 1 + (dtlen < ftlen)), p += 2; + if (dtlen < ftlen) { + lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt; + var llm = hMap(lct, mlcb, 0); + wbits(out, p, nlc - 257); + wbits(out, p + 5, ndc - 1); + wbits(out, p + 10, nlcc - 4); + p += 14; + for (var i = 0; i < nlcc; ++i) + wbits(out, p + 3 * i, lct[clim[i]]); + p += 3 * nlcc; + var lcts = [lclt, lcdt]; + for (var it = 0; it < 2; ++it) { + var clct = lcts[it]; + for (var i = 0; i < clct.length; ++i) { + var len = clct[i] & 31; + wbits(out, p, llm[len]), p += lct[len]; + if (len > 15) + wbits(out, p, (clct[i] >> 5) & 127), p += clct[i] >> 12; + } + } + } + else { + lm = flm, ll = flt, dm = fdm, dl = fdt; + } + for (var i = 0; i < li; ++i) { + var sym = syms[i]; + if (sym > 255) { + var len = (sym >> 18) & 31; + wbits16(out, p, lm[len + 257]), p += ll[len + 257]; + if (len > 7) + wbits(out, p, (sym >> 23) & 31), p += fleb[len]; + var dst = sym & 31; + wbits16(out, p, dm[dst]), p += dl[dst]; + if (dst > 3) + wbits16(out, p, (sym >> 5) & 8191), p += fdeb[dst]; + } + else { + wbits16(out, p, lm[sym]), p += ll[sym]; + } + } + wbits16(out, p, lm[256]); + return p + ll[256]; +}; +// deflate options (nice << 13) | chain +var deo = /*#__PURE__*/ new i32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]); +// empty +var et = /*#__PURE__*/ new u8(0); +// compresses data into a raw DEFLATE buffer +var dflt = function (dat, lvl, plvl, pre, post, st) { + var s = st.z || dat.length; + var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post); + // writing to this writes to the output buffer + var w = o.subarray(pre, o.length - post); + var lst = st.l; + var pos = (st.r || 0) & 7; + if (lvl) { + if (pos) + w[0] = st.r >> 3; + var opt = deo[lvl - 1]; + var n = opt >> 13, c = opt & 8191; + var msk_1 = (1 << plvl) - 1; + // prev 2-byte val map curr 2-byte val map + var prev = st.p || new u16(32768), head = st.h || new u16(msk_1 + 1); + var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1; + var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; }; + // 24576 is an arbitrary number of maximum symbols per block + // 424 buffer for last block + var syms = new i32(25000); + // length/literal freq distance freq + var lf = new u16(288), df = new u16(32); + // l/lcnt exbits index l/lind waitdx blkpos + var lc_1 = 0, eb = 0, i = st.i || 0, li = 0, wi = st.w || 0, bs = 0; + for (; i + 2 < s; ++i) { + // hash value + var hv = hsh(i); + // index mod 32768 previous index mod + var imod = i & 32767, pimod = head[hv]; + prev[imod] = pimod; + head[hv] = imod; + // We always should modify head and prev, but only add symbols if + // this data is not yet processed ("wait" for wait index) + if (wi <= i) { + // bytes remaining + var rem = s - i; + if ((lc_1 > 7000 || li > 24576) && (rem > 423 || !lst)) { + pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos); + li = lc_1 = eb = 0, bs = i; + for (var j = 0; j < 286; ++j) + lf[j] = 0; + for (var j = 0; j < 30; ++j) + df[j] = 0; + } + // len dist chain + var l = 2, d = 0, ch_1 = c, dif = imod - pimod & 32767; + if (rem > 2 && hv == hsh(i - dif)) { + var maxn = Math.min(n, rem) - 1; + var maxd = Math.min(32767, i); + // max possible length + // not capped at dif because decompressors implement "rolling" index population + var ml = Math.min(258, rem); + while (dif <= maxd && --ch_1 && imod != pimod) { + if (dat[i + l] == dat[i + l - dif]) { + var nl = 0; + for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl) + ; + if (nl > l) { + l = nl, d = dif; + // break out early when we reach "nice" (we are satisfied enough) + if (nl > maxn) + break; + // now, find the rarest 2-byte sequence within this + // length of literals and search for that instead. + // Much faster than just using the start + var mmd = Math.min(dif, nl - 2); + var md = 0; + for (var j = 0; j < mmd; ++j) { + var ti = i - dif + j & 32767; + var pti = prev[ti]; + var cd = ti - pti & 32767; + if (cd > md) + md = cd, pimod = ti; + } + } + } + // check the previous match + imod = pimod, pimod = prev[imod]; + dif += imod - pimod & 32767; + } + } + // d will be nonzero only when a match was found + if (d) { + // store both dist and len data in one int32 + // Make sure this is recognized as a len/dist with 28th bit (2^28) + syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d]; + var lin = revfl[l] & 31, din = revfd[d] & 31; + eb += fleb[lin] + fdeb[din]; + ++lf[257 + lin]; + ++df[din]; + wi = i + l; + ++lc_1; + } + else { + syms[li++] = dat[i]; + ++lf[dat[i]]; + } + } + } + for (i = Math.max(i, wi); i < s; ++i) { + syms[li++] = dat[i]; + ++lf[dat[i]]; + } + pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos); + if (!lst) { + st.r = (pos & 7) | w[(pos / 8) | 0] << 3; + // shft(pos) now 1 less if pos & 7 != 0 + pos -= 7; + st.h = head, st.p = prev, st.i = i, st.w = wi; + } + } + else { + for (var i = st.w || 0; i < s + lst; i += 65535) { + // end + var e = i + 65535; + if (e >= s) { + // write final block + w[(pos / 8) | 0] = lst; + e = s; + } + pos = wfblk(w, pos + 1, dat.subarray(i, e)); + } + st.i = s; + } + return slc(o, 0, pre + shft(pos) + post); +}; +// CRC32 table +var crct = /*#__PURE__*/ (function () { + var t = new Int32Array(256); + for (var i = 0; i < 256; ++i) { + var c = i, k = 9; + while (--k) + c = ((c & 1) && -306674912) ^ (c >>> 1); + t[i] = c; + } + return t; +})(); +// CRC32 +var crc = function () { + var c = -1; + return { + p: function (d) { + // closures have awful performance + var cr = c; + for (var i = 0; i < d.length; ++i) + cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8); + c = cr; + }, + d: function () { return ~c; } + }; +}; +// Adler32 +var adler = function () { + var a = 1, b = 0; + return { + p: function (d) { + // closures have awful performance + var n = a, m = b; + var l = d.length | 0; + for (var i = 0; i != l;) { + var e = Math.min(i + 2655, l); + for (; i < e; ++i) + m += n += d[i]; + n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16); + } + a = n, b = m; + }, + d: function () { + a %= 65521, b %= 65521; + return (a & 255) << 24 | (a & 0xFF00) << 8 | (b & 255) << 8 | (b >> 8); + } + }; +}; +; +// deflate with opts +var dopt = function (dat, opt, pre, post, st) { + if (!st) { + st = { l: 1 }; + if (opt.dictionary) { + var dict = opt.dictionary.subarray(-32768); + var newDat = new u8(dict.length + dat.length); + newDat.set(dict); + newDat.set(dat, dict.length); + dat = newDat; + st.w = dict.length; + } + } + return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? (st.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 20) : (12 + opt.mem), pre, post, st); +}; +// Walmart object spread +var mrg = function (a, b) { + var o = {}; + for (var k in a) + o[k] = a[k]; + for (var k in b) + o[k] = b[k]; + return o; +}; +// worker clone +// This is possibly the craziest part of the entire codebase, despite how simple it may seem. +// The only parameter to this function is a closure that returns an array of variables outside of the function scope. +// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization. +// We will return an object mapping of true variable name to value (basically, the current scope as a JS object). +// The reason we can't just use the original variable names is minifiers mangling the toplevel scope. +// This took me three weeks to figure out how to do. +var wcln = function (fn, fnStr, td) { + var dt = fn(); + var st = fn.toString(); + var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\s+/g, '').split(','); + for (var i = 0; i < dt.length; ++i) { + var v = dt[i], k = ks[i]; + if (typeof v == 'function') { + fnStr += ';' + k + '='; + var st_1 = v.toString(); + if (v.prototype) { + // for global objects + if (st_1.indexOf('[native code]') != -1) { + var spInd = st_1.indexOf(' ', 8) + 1; + fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd)); + } + else { + fnStr += st_1; + for (var t in v.prototype) + fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString(); + } + } + else + fnStr += st_1; + } + else + td[k] = v; + } + return fnStr; +}; +var ch = []; +// clone bufs +var cbfs = function (v) { + var tl = []; + for (var k in v) { + if (v[k].buffer) { + tl.push((v[k] = new v[k].constructor(v[k])).buffer); + } + } + return tl; +}; +// use a worker to execute code +var wrkr = function (fns, init, id, cb) { + if (!ch[id]) { + var fnStr = '', td_1 = {}, m = fns.length - 1; + for (var i = 0; i < m; ++i) + fnStr = wcln(fns[i], fnStr, td_1); + ch[id] = { c: wcln(fns[m], fnStr, td_1), e: td_1 }; + } + var td = mrg({}, ch[id].e); + return wk(ch[id].c + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb); +}; +// base async inflate fn +var bInflt = function () { return [u8, u16, i32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gopt]; }; +var bDflt = function () { return [u8, u16, i32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; }; +// gzip extra +var gze = function () { return [gzh, gzhl, wbytes, crc, crct]; }; +// gunzip extra +var guze = function () { return [gzs, gzl]; }; +// zlib extra +var zle = function () { return [zlh, wbytes, adler]; }; +// unzlib extra +var zule = function () { return [zls]; }; +// post buf +var pbf = function (msg) { return postMessage(msg, [msg.buffer]); }; +// get opts +var gopt = function (o) { return o && { + out: o.size && new u8(o.size), + dictionary: o.dictionary +}; }; +// async helper +var cbify = function (dat, opts, fns, init, id, cb) { + var w = wrkr(fns, init, id, function (err, dat) { + w.terminate(); + cb(err, dat); + }); + w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []); + return function () { w.terminate(); }; +}; +// auto stream +var astrm = function (strm) { + strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); }; + return function (ev) { + if (ev.data.length) { + strm.push(ev.data[0], ev.data[1]); + postMessage([ev.data[0].length]); + } + else + strm.flush(); + }; +}; +// async stream attach +var astrmify = function (fns, strm, opts, init, id, flush, ext) { + var t; + var w = wrkr(fns, init, id, function (err, dat) { + if (err) + w.terminate(), strm.ondata.call(strm, err); + else if (!Array.isArray(dat)) + ext(dat); + else if (dat.length == 1) { + strm.queuedSize -= dat[0]; + if (strm.ondrain) + strm.ondrain(dat[0]); + } + else { + if (dat[1]) + w.terminate(); + strm.ondata.call(strm, err, dat[0], dat[1]); + } + }); + w.postMessage(opts); + strm.queuedSize = 0; + strm.push = function (d, f) { + if (!strm.ondata) + err(5); + if (t) + strm.ondata(err(4, 0, 1), null, !!f); + strm.queuedSize += d.length; + w.postMessage([d, t = f], [d.buffer]); + }; + strm.terminate = function () { w.terminate(); }; + if (flush) { + strm.flush = function () { w.postMessage([]); }; + } +}; +// read 2 bytes +var b2 = function (d, b) { return d[b] | (d[b + 1] << 8); }; +// read 4 bytes +var b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; }; +var b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); }; +// write bytes +var wbytes = function (d, b, v) { + for (; v; ++b) + d[b] = v, v >>>= 8; +}; +// gzip header +var gzh = function (c, o) { + var fn = o.filename; + c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix + if (o.mtime != 0) + wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000)); + if (fn) { + c[3] = 8; + for (var i = 0; i <= fn.length; ++i) + c[i + 10] = fn.charCodeAt(i); + } +}; +// gzip footer: -8 to -4 = CRC, -4 to -0 is length +// gzip start +var gzs = function (d) { + if (d[0] != 31 || d[1] != 139 || d[2] != 8) + err(6, 'invalid gzip data'); + var flg = d[3]; + var st = 10; + if (flg & 4) + st += (d[10] | d[11] << 8) + 2; + for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++]) + ; + return st + (flg & 2); +}; +// gzip length +var gzl = function (d) { + var l = d.length; + return (d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16 | d[l - 1] << 24) >>> 0; +}; +// gzip header length +var gzhl = function (o) { return 10 + (o.filename ? o.filename.length + 1 : 0); }; +// zlib header +var zlh = function (c, o) { + var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2; + c[0] = 120, c[1] = (fl << 6) | (o.dictionary && 32); + c[1] |= 31 - ((c[0] << 8) | c[1]) % 31; + if (o.dictionary) { + var h = adler(); + h.p(o.dictionary); + wbytes(c, 2, h.d()); + } +}; +// zlib start +var zls = function (d, dict) { + if ((d[0] & 15) != 8 || (d[0] >> 4) > 7 || ((d[0] << 8 | d[1]) % 31)) + err(6, 'invalid zlib data'); + if ((d[1] >> 5 & 1) == +!dict) + err(6, 'invalid zlib data: ' + (d[1] & 32 ? 'need' : 'unexpected') + ' dictionary'); + return (d[1] >> 3 & 4) + 2; +}; +function StrmOpt(opts, cb) { + if (typeof opts == 'function') + cb = opts, opts = {}; + this.ondata = cb; + return opts; +} +/** + * Streaming DEFLATE compression + */ +var Deflate = /*#__PURE__*/ (function () { + function Deflate(opts, cb) { + if (typeof opts == 'function') + cb = opts, opts = {}; + this.ondata = cb; + this.o = opts || {}; + this.s = { l: 0, i: 32768, w: 32768, z: 32768 }; + // Buffer length must always be 0 mod 32768 for index calculations to be correct when modifying head and prev + // 98304 = 32768 (lookback) + 65536 (common chunk size) + this.b = new u8(98304); + if (this.o.dictionary) { + var dict = this.o.dictionary.subarray(-32768); + this.b.set(dict, 32768 - dict.length); + this.s.i = 32768 - dict.length; + } + } + Deflate.prototype.p = function (c, f) { + this.ondata(dopt(c, this.o, 0, 0, this.s), f); + }; + /** + * Pushes a chunk to be deflated + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + Deflate.prototype.push = function (chunk, final) { + if (!this.ondata) + err(5); + if (this.s.l) + err(4); + var endLen = chunk.length + this.s.z; + if (endLen > this.b.length) { + if (endLen > 2 * this.b.length - 32768) { + var newBuf = new u8(endLen & -32768); + newBuf.set(this.b.subarray(0, this.s.z)); + this.b = newBuf; + } + var split = this.b.length - this.s.z; + this.b.set(chunk.subarray(0, split), this.s.z); + this.s.z = this.b.length; + this.p(this.b, false); + this.b.set(this.b.subarray(-32768)); + this.b.set(chunk.subarray(split), 32768); + this.s.z = chunk.length - split + 32768; + this.s.i = 32766, this.s.w = 32768; + } + else { + this.b.set(chunk, this.s.z); + this.s.z += chunk.length; + } + this.s.l = final & 1; + if (this.s.z > this.s.w + 8191 || final) { + this.p(this.b, final || false); + this.s.w = this.s.i, this.s.i -= 2; + } + }; + /** + * Flushes buffered uncompressed data. Useful to immediately retrieve the + * deflated output for small inputs. + */ + Deflate.prototype.flush = function () { + if (!this.ondata) + err(5); + if (this.s.l) + err(4); + this.p(this.b, false); + this.s.w = this.s.i, this.s.i -= 2; + }; + return Deflate; +}()); +export { Deflate }; +/** + * Asynchronous streaming DEFLATE compression + */ +var AsyncDeflate = /*#__PURE__*/ (function () { + function AsyncDeflate(opts, cb) { + astrmify([ + bDflt, + function () { return [astrm, Deflate]; } + ], this, StrmOpt.call(this, opts, cb), function (ev) { + var strm = new Deflate(ev.data); + onmessage = astrm(strm); + }, 6, 1); + } + return AsyncDeflate; +}()); +export { AsyncDeflate }; +export function deflate(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return cbify(data, opts, [ + bDflt, + ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb); +} +/** + * Compresses data with DEFLATE without any wrapper + * @param data The data to compress + * @param opts The compression options + * @returns The deflated version of the data + */ +export function deflateSync(data, opts) { + return dopt(data, opts || {}, 0, 0); +} +/** + * Streaming DEFLATE decompression + */ +var Inflate = /*#__PURE__*/ (function () { + function Inflate(opts, cb) { + // no StrmOpt here to avoid adding to workerizer + if (typeof opts == 'function') + cb = opts, opts = {}; + this.ondata = cb; + var dict = opts && opts.dictionary && opts.dictionary.subarray(-32768); + this.s = { i: 0, b: dict ? dict.length : 0 }; + this.o = new u8(32768); + this.p = new u8(0); + if (dict) + this.o.set(dict); + } + Inflate.prototype.e = function (c) { + if (!this.ondata) + err(5); + if (this.d) + err(4); + if (!this.p.length) + this.p = c; + else if (c.length) { + var n = new u8(this.p.length + c.length); + n.set(this.p), n.set(c, this.p.length), this.p = n; + } + }; + Inflate.prototype.c = function (final) { + this.s.i = +(this.d = final || false); + var bts = this.s.b; + var dt = inflt(this.p, this.s, this.o); + this.ondata(slc(dt, bts, this.s.b), this.d); + this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length; + this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7; + }; + /** + * Pushes a chunk to be inflated + * @param chunk The chunk to push + * @param final Whether this is the final chunk + */ + Inflate.prototype.push = function (chunk, final) { + this.e(chunk), this.c(final); + }; + return Inflate; +}()); +export { Inflate }; +/** + * Asynchronous streaming DEFLATE decompression + */ +var AsyncInflate = /*#__PURE__*/ (function () { + function AsyncInflate(opts, cb) { + astrmify([ + bInflt, + function () { return [astrm, Inflate]; } + ], this, StrmOpt.call(this, opts, cb), function (ev) { + var strm = new Inflate(ev.data); + onmessage = astrm(strm); + }, 7, 0); + } + return AsyncInflate; +}()); +export { AsyncInflate }; +export function inflate(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return cbify(data, opts, [ + bInflt + ], function (ev) { return pbf(inflateSync(ev.data[0], gopt(ev.data[1]))); }, 1, cb); +} +/** + * Expands DEFLATE data with no wrapper + * @param data The data to decompress + * @param opts The decompression options + * @returns The decompressed version of the data + */ +export function inflateSync(data, opts) { + return inflt(data, { i: 2 }, opts && opts.out, opts && opts.dictionary); +} +// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize. +/** + * Streaming GZIP compression + */ +var Gzip = /*#__PURE__*/ (function () { + function Gzip(opts, cb) { + this.c = crc(); + this.l = 0; + this.v = 1; + Deflate.call(this, opts, cb); + } + /** + * Pushes a chunk to be GZIPped + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + Gzip.prototype.push = function (chunk, final) { + this.c.p(chunk); + this.l += chunk.length; + Deflate.prototype.push.call(this, chunk, final); + }; + Gzip.prototype.p = function (c, f) { + var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, this.s); + if (this.v) + gzh(raw, this.o), this.v = 0; + if (f) + wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l); + this.ondata(raw, f); + }; + /** + * Flushes buffered uncompressed data. Useful to immediately retrieve the + * GZIPped output for small inputs. + */ + Gzip.prototype.flush = function () { + Deflate.prototype.flush.call(this); + }; + return Gzip; +}()); +export { Gzip }; +/** + * Asynchronous streaming GZIP compression + */ +var AsyncGzip = /*#__PURE__*/ (function () { + function AsyncGzip(opts, cb) { + astrmify([ + bDflt, + gze, + function () { return [astrm, Deflate, Gzip]; } + ], this, StrmOpt.call(this, opts, cb), function (ev) { + var strm = new Gzip(ev.data); + onmessage = astrm(strm); + }, 8, 1); + } + return AsyncGzip; +}()); +export { AsyncGzip }; +export function gzip(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return cbify(data, opts, [ + bDflt, + gze, + function () { return [gzipSync]; } + ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb); +} +/** + * Compresses data with GZIP + * @param data The data to compress + * @param opts The compression options + * @returns The gzipped version of the data + */ +export function gzipSync(data, opts) { + if (!opts) + opts = {}; + var c = crc(), l = data.length; + c.p(data); + var d = dopt(data, opts, gzhl(opts), 8), s = d.length; + return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d; +} +/** + * Streaming single or multi-member GZIP decompression + */ +var Gunzip = /*#__PURE__*/ (function () { + function Gunzip(opts, cb) { + this.v = 1; + this.r = 0; + Inflate.call(this, opts, cb); + } + /** + * Pushes a chunk to be GUNZIPped + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + Gunzip.prototype.push = function (chunk, final) { + Inflate.prototype.e.call(this, chunk); + this.r += chunk.length; + if (this.v) { + var p = this.p.subarray(this.v - 1); + var s = p.length > 3 ? gzs(p) : 4; + if (s > p.length) { + if (!final) + return; + } + else if (this.v > 1 && this.onmember) { + this.onmember(this.r - p.length); + } + this.p = p.subarray(s), this.v = 0; + } + // necessary to prevent TS from using the closure value + // This allows for workerization to function correctly + Inflate.prototype.c.call(this, final); + // process concatenated GZIP + if (this.s.f && !this.s.l && !final) { + this.v = shft(this.s.p) + 9; + this.s = { i: 0 }; + this.o = new u8(0); + this.push(new u8(0), final); + } + }; + return Gunzip; +}()); +export { Gunzip }; +/** + * Asynchronous streaming single or multi-member GZIP decompression + */ +var AsyncGunzip = /*#__PURE__*/ (function () { + function AsyncGunzip(opts, cb) { + var _this = this; + astrmify([ + bInflt, + guze, + function () { return [astrm, Inflate, Gunzip]; } + ], this, StrmOpt.call(this, opts, cb), function (ev) { + var strm = new Gunzip(ev.data); + strm.onmember = function (offset) { return postMessage(offset); }; + onmessage = astrm(strm); + }, 9, 0, function (offset) { return _this.onmember && _this.onmember(offset); }); + } + return AsyncGunzip; +}()); +export { AsyncGunzip }; +export function gunzip(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return cbify(data, opts, [ + bInflt, + guze, + function () { return [gunzipSync]; } + ], function (ev) { return pbf(gunzipSync(ev.data[0], ev.data[1])); }, 3, cb); +} +/** + * Expands GZIP data + * @param data The data to decompress + * @param opts The decompression options + * @returns The decompressed version of the data + */ +export function gunzipSync(data, opts) { + var st = gzs(data); + if (st + 8 > data.length) + err(6, 'invalid gzip data'); + return inflt(data.subarray(st, -8), { i: 2 }, opts && opts.out || new u8(gzl(data)), opts && opts.dictionary); +} +/** + * Streaming Zlib compression + */ +var Zlib = /*#__PURE__*/ (function () { + function Zlib(opts, cb) { + this.c = adler(); + this.v = 1; + Deflate.call(this, opts, cb); + } + /** + * Pushes a chunk to be zlibbed + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + Zlib.prototype.push = function (chunk, final) { + this.c.p(chunk); + Deflate.prototype.push.call(this, chunk, final); + }; + Zlib.prototype.p = function (c, f) { + var raw = dopt(c, this.o, this.v && (this.o.dictionary ? 6 : 2), f && 4, this.s); + if (this.v) + zlh(raw, this.o), this.v = 0; + if (f) + wbytes(raw, raw.length - 4, this.c.d()); + this.ondata(raw, f); + }; + /** + * Flushes buffered uncompressed data. Useful to immediately retrieve the + * zlibbed output for small inputs. + */ + Zlib.prototype.flush = function () { + Deflate.prototype.flush.call(this); + }; + return Zlib; +}()); +export { Zlib }; +/** + * Asynchronous streaming Zlib compression + */ +var AsyncZlib = /*#__PURE__*/ (function () { + function AsyncZlib(opts, cb) { + astrmify([ + bDflt, + zle, + function () { return [astrm, Deflate, Zlib]; } + ], this, StrmOpt.call(this, opts, cb), function (ev) { + var strm = new Zlib(ev.data); + onmessage = astrm(strm); + }, 10, 1); + } + return AsyncZlib; +}()); +export { AsyncZlib }; +export function zlib(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return cbify(data, opts, [ + bDflt, + zle, + function () { return [zlibSync]; } + ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb); +} +/** + * Compress data with Zlib + * @param data The data to compress + * @param opts The compression options + * @returns The zlib-compressed version of the data + */ +export function zlibSync(data, opts) { + if (!opts) + opts = {}; + var a = adler(); + a.p(data); + var d = dopt(data, opts, opts.dictionary ? 6 : 2, 4); + return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d; +} +/** + * Streaming Zlib decompression + */ +var Unzlib = /*#__PURE__*/ (function () { + function Unzlib(opts, cb) { + Inflate.call(this, opts, cb); + this.v = opts && opts.dictionary ? 2 : 1; + } + /** + * Pushes a chunk to be unzlibbed + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + Unzlib.prototype.push = function (chunk, final) { + Inflate.prototype.e.call(this, chunk); + if (this.v) { + if (this.p.length < 6 && !final) + return; + this.p = this.p.subarray(zls(this.p, this.v - 1)), this.v = 0; + } + if (final) { + if (this.p.length < 4) + err(6, 'invalid zlib data'); + this.p = this.p.subarray(0, -4); + } + // necessary to prevent TS from using the closure value + // This allows for workerization to function correctly + Inflate.prototype.c.call(this, final); + }; + return Unzlib; +}()); +export { Unzlib }; +/** + * Asynchronous streaming Zlib decompression + */ +var AsyncUnzlib = /*#__PURE__*/ (function () { + function AsyncUnzlib(opts, cb) { + astrmify([ + bInflt, + zule, + function () { return [astrm, Inflate, Unzlib]; } + ], this, StrmOpt.call(this, opts, cb), function (ev) { + var strm = new Unzlib(ev.data); + onmessage = astrm(strm); + }, 11, 0); + } + return AsyncUnzlib; +}()); +export { AsyncUnzlib }; +export function unzlib(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return cbify(data, opts, [ + bInflt, + zule, + function () { return [unzlibSync]; } + ], function (ev) { return pbf(unzlibSync(ev.data[0], gopt(ev.data[1]))); }, 5, cb); +} +/** + * Expands Zlib data + * @param data The data to decompress + * @param opts The decompression options + * @returns The decompressed version of the data + */ +export function unzlibSync(data, opts) { + return inflt(data.subarray(zls(data, opts && opts.dictionary), -4), { i: 2 }, opts && opts.out, opts && opts.dictionary); +} +// Default algorithm for compression (used because having a known output size allows faster decompression) +export { gzip as compress, AsyncGzip as AsyncCompress }; +export { gzipSync as compressSync, Gzip as Compress }; +/** + * Streaming GZIP, Zlib, or raw DEFLATE decompression + */ +var Decompress = /*#__PURE__*/ (function () { + function Decompress(opts, cb) { + this.o = StrmOpt.call(this, opts, cb) || {}; + this.G = Gunzip; + this.I = Inflate; + this.Z = Unzlib; + } + // init substream + // overriden by AsyncDecompress + Decompress.prototype.i = function () { + var _this = this; + this.s.ondata = function (dat, final) { + _this.ondata(dat, final); + }; + }; + /** + * Pushes a chunk to be decompressed + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + Decompress.prototype.push = function (chunk, final) { + if (!this.ondata) + err(5); + if (!this.s) { + if (this.p && this.p.length) { + var n = new u8(this.p.length + chunk.length); + n.set(this.p), n.set(chunk, this.p.length); + } + else + this.p = chunk; + if (this.p.length > 2) { + this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8) + ? new this.G(this.o) + : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31)) + ? new this.I(this.o) + : new this.Z(this.o); + this.i(); + this.s.push(this.p, final); + this.p = null; + } + } + else + this.s.push(chunk, final); + }; + return Decompress; +}()); +export { Decompress }; +/** + * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression + */ +var AsyncDecompress = /*#__PURE__*/ (function () { + function AsyncDecompress(opts, cb) { + Decompress.call(this, opts, cb); + this.queuedSize = 0; + this.G = AsyncGunzip; + this.I = AsyncInflate; + this.Z = AsyncUnzlib; + } + AsyncDecompress.prototype.i = function () { + var _this = this; + this.s.ondata = function (err, dat, final) { + _this.ondata(err, dat, final); + }; + this.s.ondrain = function (size) { + _this.queuedSize -= size; + if (_this.ondrain) + _this.ondrain(size); + }; + }; + /** + * Pushes a chunk to be decompressed + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + AsyncDecompress.prototype.push = function (chunk, final) { + this.queuedSize += chunk.length; + Decompress.prototype.push.call(this, chunk, final); + }; + return AsyncDecompress; +}()); +export { AsyncDecompress }; +export function decompress(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + return (data[0] == 31 && data[1] == 139 && data[2] == 8) + ? gunzip(data, opts, cb) + : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31)) + ? inflate(data, opts, cb) + : unzlib(data, opts, cb); +} +/** + * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format + * @param data The data to decompress + * @param opts The decompression options + * @returns The decompressed version of the data + */ +export function decompressSync(data, opts) { + return (data[0] == 31 && data[1] == 139 && data[2] == 8) + ? gunzipSync(data, opts) + : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31)) + ? inflateSync(data, opts) + : unzlibSync(data, opts); +} +// flatten a directory structure +var fltn = function (d, p, t, o) { + for (var k in d) { + var val = d[k], n = p + k, op = o; + if (Array.isArray(val)) + op = mrg(o, val[1]), val = val[0]; + if (val instanceof u8) + t[n] = [val, op]; + else { + t[n += '/'] = [new u8(0), op]; + fltn(val, n, t, o); + } + } +}; +// text encoder +var te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder(); +// text decoder +var td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder(); +// text decoder stream +var tds = 0; +try { + td.decode(et, { stream: true }); + tds = 1; +} +catch (e) { } +// decode UTF8 +var dutf8 = function (d) { + for (var r = '', i = 0;;) { + var c = d[i++]; + var eb = (c > 127) + (c > 223) + (c > 239); + if (i + eb > d.length) + return { s: r, r: slc(d, i - 1) }; + if (!eb) + r += String.fromCharCode(c); + else if (eb == 3) { + c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536, + r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023)); + } + else if (eb & 1) + r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63)); + else + r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)); + } +}; +/** + * Streaming UTF-8 decoding + */ +var DecodeUTF8 = /*#__PURE__*/ (function () { + /** + * Creates a UTF-8 decoding stream + * @param cb The callback to call whenever data is decoded + */ + function DecodeUTF8(cb) { + this.ondata = cb; + if (tds) + this.t = new TextDecoder(); + else + this.p = et; + } + /** + * Pushes a chunk to be decoded from UTF-8 binary + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + DecodeUTF8.prototype.push = function (chunk, final) { + if (!this.ondata) + err(5); + final = !!final; + if (this.t) { + this.ondata(this.t.decode(chunk, { stream: true }), final); + if (final) { + if (this.t.decode().length) + err(8); + this.t = null; + } + return; + } + if (!this.p) + err(4); + var dat = new u8(this.p.length + chunk.length); + dat.set(this.p); + dat.set(chunk, this.p.length); + var _a = dutf8(dat), s = _a.s, r = _a.r; + if (final) { + if (r.length) + err(8); + this.p = null; + } + else + this.p = r; + this.ondata(s, final); + }; + return DecodeUTF8; +}()); +export { DecodeUTF8 }; +/** + * Streaming UTF-8 encoding + */ +var EncodeUTF8 = /*#__PURE__*/ (function () { + /** + * Creates a UTF-8 decoding stream + * @param cb The callback to call whenever data is encoded + */ + function EncodeUTF8(cb) { + this.ondata = cb; + } + /** + * Pushes a chunk to be encoded to UTF-8 + * @param chunk The string data to push + * @param final Whether this is the last chunk + */ + EncodeUTF8.prototype.push = function (chunk, final) { + if (!this.ondata) + err(5); + if (this.d) + err(4); + this.ondata(strToU8(chunk), this.d = final || false); + }; + return EncodeUTF8; +}()); +export { EncodeUTF8 }; +/** + * Converts a string into a Uint8Array for use with compression/decompression methods + * @param str The string to encode + * @param latin1 Whether or not to interpret the data as Latin-1. This should + * not need to be true unless decoding a binary string. + * @returns The string encoded in UTF-8/Latin-1 binary + */ +export function strToU8(str, latin1) { + if (latin1) { + var ar_1 = new u8(str.length); + for (var i = 0; i < str.length; ++i) + ar_1[i] = str.charCodeAt(i); + return ar_1; + } + if (te) + return te.encode(str); + var l = str.length; + var ar = new u8(str.length + (str.length >> 1)); + var ai = 0; + var w = function (v) { ar[ai++] = v; }; + for (var i = 0; i < l; ++i) { + if (ai + 5 > ar.length) { + var n = new u8(ai + 8 + ((l - i) << 1)); + n.set(ar); + ar = n; + } + var c = str.charCodeAt(i); + if (c < 128 || latin1) + w(c); + else if (c < 2048) + w(192 | (c >> 6)), w(128 | (c & 63)); + else if (c > 55295 && c < 57344) + c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023), + w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63)); + else + w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63)); + } + return slc(ar, 0, ai); +} +/** + * Converts a Uint8Array to a string + * @param dat The data to decode to string + * @param latin1 Whether or not to interpret the data as Latin-1. This should + * not need to be true unless encoding to binary string. + * @returns The original UTF-8/Latin-1 string + */ +export function strFromU8(dat, latin1) { + if (latin1) { + var r = ''; + for (var i = 0; i < dat.length; i += 16384) + r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384)); + return r; + } + else if (td) { + return td.decode(dat); + } + else { + var _a = dutf8(dat), s = _a.s, r = _a.r; + if (r.length) + err(8); + return s; + } +} +; +// deflate bit flag +var dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; }; +// skip local zip header +var slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); }; +// read zip header +var zh = function (d, b, z) { + var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20); + var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2]; + return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off]; +}; +// read zip64 extra field +var z64e = function (d, b) { + for (; b2(d, b) != 1; b += 4 + b2(d, b + 2)) + ; + return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)]; +}; +// extra field length +var exfl = function (ex) { + var le = 0; + if (ex) { + for (var k in ex) { + var l = ex[k].length; + if (l > 65535) + err(9); + le += l + 4; + } + } + return le; +}; +// write zip header +var wzh = function (d, b, f, fn, u, c, ce, co) { + var fl = fn.length, ex = f.extra, col = co && co.length; + var exl = exfl(ex); + wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4; + if (ce != null) + d[b++] = 20, d[b++] = f.os; + d[b] = 20, b += 2; // spec compliance? what's that? + d[b++] = (f.flag << 1) | (c < 0 && 8), d[b++] = u && 8; + d[b++] = f.compression & 255, d[b++] = f.compression >> 8; + var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980; + if (y < 0 || y > 119) + err(10); + wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >> 1)), b += 4; + if (c != -1) { + wbytes(d, b, f.crc); + wbytes(d, b + 4, c < 0 ? -c - 2 : c); + wbytes(d, b + 8, f.size); + } + wbytes(d, b + 12, fl); + wbytes(d, b + 14, exl), b += 16; + if (ce != null) { + wbytes(d, b, col); + wbytes(d, b + 6, f.attrs); + wbytes(d, b + 10, ce), b += 14; + } + d.set(fn, b); + b += fl; + if (exl) { + for (var k in ex) { + var exf = ex[k], l = exf.length; + wbytes(d, b, +k); + wbytes(d, b + 2, l); + d.set(exf, b + 4), b += 4 + l; + } + } + if (col) + d.set(co, b), b += col; + return b; +}; +// write zip footer (end of central directory) +var wzf = function (o, b, c, d, e) { + wbytes(o, b, 0x6054B50); // skip disk + wbytes(o, b + 8, c); + wbytes(o, b + 10, c); + wbytes(o, b + 12, d); + wbytes(o, b + 16, e); +}; +/** + * A pass-through stream to keep data uncompressed in a ZIP archive. + */ +var ZipPassThrough = /*#__PURE__*/ (function () { + /** + * Creates a pass-through stream that can be added to ZIP archives + * @param filename The filename to associate with this data stream + */ + function ZipPassThrough(filename) { + this.filename = filename; + this.c = crc(); + this.size = 0; + this.compression = 0; + } + /** + * Processes a chunk and pushes to the output stream. You can override this + * method in a subclass for custom behavior, but by default this passes + * the data through. You must call this.ondata(err, chunk, final) at some + * point in this method. + * @param chunk The chunk to process + * @param final Whether this is the last chunk + */ + ZipPassThrough.prototype.process = function (chunk, final) { + this.ondata(null, chunk, final); + }; + /** + * Pushes a chunk to be added. If you are subclassing this with a custom + * compression algorithm, note that you must push data from the source + * file only, pre-compression. + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + ZipPassThrough.prototype.push = function (chunk, final) { + if (!this.ondata) + err(5); + this.c.p(chunk); + this.size += chunk.length; + if (final) + this.crc = this.c.d(); + this.process(chunk, final || false); + }; + return ZipPassThrough; +}()); +export { ZipPassThrough }; +// I don't extend because TypeScript extension adds 1kB of runtime bloat +/** + * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate + * for better performance + */ +var ZipDeflate = /*#__PURE__*/ (function () { + /** + * Creates a DEFLATE stream that can be added to ZIP archives + * @param filename The filename to associate with this data stream + * @param opts The compression options + */ + function ZipDeflate(filename, opts) { + var _this = this; + if (!opts) + opts = {}; + ZipPassThrough.call(this, filename); + this.d = new Deflate(opts, function (dat, final) { + _this.ondata(null, dat, final); + }); + this.compression = 8; + this.flag = dbf(opts.level); + } + ZipDeflate.prototype.process = function (chunk, final) { + try { + this.d.push(chunk, final); + } + catch (e) { + this.ondata(e, null, final); + } + }; + /** + * Pushes a chunk to be deflated + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + ZipDeflate.prototype.push = function (chunk, final) { + ZipPassThrough.prototype.push.call(this, chunk, final); + }; + return ZipDeflate; +}()); +export { ZipDeflate }; +/** + * Asynchronous streaming DEFLATE compression for ZIP archives + */ +var AsyncZipDeflate = /*#__PURE__*/ (function () { + /** + * Creates an asynchronous DEFLATE stream that can be added to ZIP archives + * @param filename The filename to associate with this data stream + * @param opts The compression options + */ + function AsyncZipDeflate(filename, opts) { + var _this = this; + if (!opts) + opts = {}; + ZipPassThrough.call(this, filename); + this.d = new AsyncDeflate(opts, function (err, dat, final) { + _this.ondata(err, dat, final); + }); + this.compression = 8; + this.flag = dbf(opts.level); + this.terminate = this.d.terminate; + } + AsyncZipDeflate.prototype.process = function (chunk, final) { + this.d.push(chunk, final); + }; + /** + * Pushes a chunk to be deflated + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + AsyncZipDeflate.prototype.push = function (chunk, final) { + ZipPassThrough.prototype.push.call(this, chunk, final); + }; + return AsyncZipDeflate; +}()); +export { AsyncZipDeflate }; +// TODO: Better tree shaking +/** + * A zippable archive to which files can incrementally be added + */ +var Zip = /*#__PURE__*/ (function () { + /** + * Creates an empty ZIP archive to which files can be added + * @param cb The callback to call whenever data for the generated ZIP archive + * is available + */ + function Zip(cb) { + this.ondata = cb; + this.u = []; + this.d = 1; + } + /** + * Adds a file to the ZIP archive + * @param file The file stream to add + */ + Zip.prototype.add = function (file) { + var _this = this; + if (!this.ondata) + err(5); + // finishing or finished + if (this.d & 2) + this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false); + else { + var f = strToU8(file.filename), fl_1 = f.length; + var com = file.comment, o = com && strToU8(com); + var u = fl_1 != file.filename.length || (o && (com.length != o.length)); + var hl_1 = fl_1 + exfl(file.extra) + 30; + if (fl_1 > 65535) + this.ondata(err(11, 0, 1), null, false); + var header = new u8(hl_1); + wzh(header, 0, file, f, u, -1); + var chks_1 = [header]; + var pAll_1 = function () { + for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) { + var chk = chks_2[_i]; + _this.ondata(null, chk, false); + } + chks_1 = []; + }; + var tr_1 = this.d; + this.d = 0; + var ind_1 = this.u.length; + var uf_1 = mrg(file, { + f: f, + u: u, + o: o, + t: function () { + if (file.terminate) + file.terminate(); + }, + r: function () { + pAll_1(); + if (tr_1) { + var nxt = _this.u[ind_1 + 1]; + if (nxt) + nxt.r(); + else + _this.d = 1; + } + tr_1 = 1; + } + }); + var cl_1 = 0; + file.ondata = function (err, dat, final) { + if (err) { + _this.ondata(err, dat, final); + _this.terminate(); + } + else { + cl_1 += dat.length; + chks_1.push(dat); + if (final) { + var dd = new u8(16); + wbytes(dd, 0, 0x8074B50); + wbytes(dd, 4, file.crc); + wbytes(dd, 8, cl_1); + wbytes(dd, 12, file.size); + chks_1.push(dd); + uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size; + if (tr_1) + uf_1.r(); + tr_1 = 1; + } + else if (tr_1) + pAll_1(); + } + }; + this.u.push(uf_1); + } + }; + /** + * Ends the process of adding files and prepares to emit the final chunks. + * This *must* be called after adding all desired files for the resulting + * ZIP file to work properly. + */ + Zip.prototype.end = function () { + var _this = this; + if (this.d & 2) { + this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true); + return; + } + if (this.d) + this.e(); + else + this.u.push({ + r: function () { + if (!(_this.d & 1)) + return; + _this.u.splice(-1, 1); + _this.e(); + }, + t: function () { } + }); + this.d = 3; + }; + Zip.prototype.e = function () { + var bt = 0, l = 0, tl = 0; + for (var _i = 0, _a = this.u; _i < _a.length; _i++) { + var f = _a[_i]; + tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0); + } + var out = new u8(tl + 22); + for (var _b = 0, _c = this.u; _b < _c.length; _b++) { + var f = _c[_b]; + wzh(out, bt, f, f.f, f.u, -f.c - 2, l, f.o); + bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b; + } + wzf(out, bt, this.u.length, tl, l); + this.ondata(null, out, true); + this.d = 2; + }; + /** + * A method to terminate any internal workers used by the stream. Subsequent + * calls to add() will fail. + */ + Zip.prototype.terminate = function () { + for (var _i = 0, _a = this.u; _i < _a.length; _i++) { + var f = _a[_i]; + f.t(); + } + this.d = 2; + }; + return Zip; +}()); +export { Zip }; +export function zip(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + var r = {}; + fltn(data, '', r, opts); + var k = Object.keys(r); + var lft = k.length, o = 0, tot = 0; + var slft = lft, files = new Array(lft); + var term = []; + var tAll = function () { + for (var i = 0; i < term.length; ++i) + term[i](); + }; + var cbd = function (a, b) { + mt(function () { cb(a, b); }); + }; + mt(function () { cbd = cb; }); + var cbf = function () { + var out = new u8(tot + 22), oe = o, cdl = tot - o; + tot = 0; + for (var i = 0; i < slft; ++i) { + var f = files[i]; + try { + var l = f.c.length; + wzh(out, tot, f, f.f, f.u, l); + var badd = 30 + f.f.length + exfl(f.extra); + var loc = tot + badd; + out.set(f.c, loc); + wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l; + } + catch (e) { + return cbd(e, null); + } + } + wzf(out, o, files.length, cdl, oe); + cbd(null, out); + }; + if (!lft) + cbf(); + var _loop_1 = function (i) { + var fn = k[i]; + var _a = r[fn], file = _a[0], p = _a[1]; + var c = crc(), size = file.length; + c.p(file); + var f = strToU8(fn), s = f.length; + var com = p.comment, m = com && strToU8(com), ms = m && m.length; + var exl = exfl(p.extra); + var compression = p.level == 0 ? 0 : 8; + var cbl = function (e, d) { + if (e) { + tAll(); + cbd(e, null); + } + else { + var l = d.length; + files[i] = mrg(p, { + size: size, + crc: c.d(), + c: d, + f: f, + m: m, + u: s != fn.length || (m && (com.length != ms)), + compression: compression + }); + o += 30 + s + exl + l; + tot += 76 + 2 * (s + exl) + (ms || 0) + l; + if (!--lft) + cbf(); + } + }; + if (s > 65535) + cbl(err(11, 0, 1), null); + if (!compression) + cbl(null, file); + else if (size < 160000) { + try { + cbl(null, deflateSync(file, p)); + } + catch (e) { + cbl(e, null); + } + } + else + term.push(deflate(file, p, cbl)); + }; + // Cannot use lft because it can decrease + for (var i = 0; i < slft; ++i) { + _loop_1(i); + } + return tAll; +} +/** + * Synchronously creates a ZIP file. Prefer using `zip` for better performance + * with more than one file. + * @param data The directory structure for the ZIP archive + * @param opts The main options, merged with per-file options + * @returns The generated ZIP archive + */ +export function zipSync(data, opts) { + if (!opts) + opts = {}; + var r = {}; + var files = []; + fltn(data, '', r, opts); + var o = 0; + var tot = 0; + for (var fn in r) { + var _a = r[fn], file = _a[0], p = _a[1]; + var compression = p.level == 0 ? 0 : 8; + var f = strToU8(fn), s = f.length; + var com = p.comment, m = com && strToU8(com), ms = m && m.length; + var exl = exfl(p.extra); + if (s > 65535) + err(11); + var d = compression ? deflateSync(file, p) : file, l = d.length; + var c = crc(); + c.p(file); + files.push(mrg(p, { + size: file.length, + crc: c.d(), + c: d, + f: f, + m: m, + u: s != fn.length || (m && (com.length != ms)), + o: o, + compression: compression + })); + o += 30 + s + exl + l; + tot += 76 + 2 * (s + exl) + (ms || 0) + l; + } + var out = new u8(tot + 22), oe = o, cdl = tot - o; + for (var i = 0; i < files.length; ++i) { + var f = files[i]; + wzh(out, f.o, f, f.f, f.u, f.c.length); + var badd = 30 + f.f.length + exfl(f.extra); + out.set(f.c, f.o + badd); + wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0); + } + wzf(out, o, files.length, cdl, oe); + return out; +} +/** + * Streaming pass-through decompression for ZIP archives + */ +var UnzipPassThrough = /*#__PURE__*/ (function () { + function UnzipPassThrough() { + } + UnzipPassThrough.prototype.push = function (data, final) { + this.ondata(null, data, final); + }; + UnzipPassThrough.compression = 0; + return UnzipPassThrough; +}()); +export { UnzipPassThrough }; +/** + * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for + * better performance. + */ +var UnzipInflate = /*#__PURE__*/ (function () { + /** + * Creates a DEFLATE decompression that can be used in ZIP archives + */ + function UnzipInflate() { + var _this = this; + this.i = new Inflate(function (dat, final) { + _this.ondata(null, dat, final); + }); + } + UnzipInflate.prototype.push = function (data, final) { + try { + this.i.push(data, final); + } + catch (e) { + this.ondata(e, null, final); + } + }; + UnzipInflate.compression = 8; + return UnzipInflate; +}()); +export { UnzipInflate }; +/** + * Asynchronous streaming DEFLATE decompression for ZIP archives + */ +var AsyncUnzipInflate = /*#__PURE__*/ (function () { + /** + * Creates a DEFLATE decompression that can be used in ZIP archives + */ + function AsyncUnzipInflate(_, sz) { + var _this = this; + if (sz < 320000) { + this.i = new Inflate(function (dat, final) { + _this.ondata(null, dat, final); + }); + } + else { + this.i = new AsyncInflate(function (err, dat, final) { + _this.ondata(err, dat, final); + }); + this.terminate = this.i.terminate; + } + } + AsyncUnzipInflate.prototype.push = function (data, final) { + if (this.i.terminate) + data = slc(data, 0); + this.i.push(data, final); + }; + AsyncUnzipInflate.compression = 8; + return AsyncUnzipInflate; +}()); +export { AsyncUnzipInflate }; +/** + * A ZIP archive decompression stream that emits files as they are discovered + */ +var Unzip = /*#__PURE__*/ (function () { + /** + * Creates a ZIP decompression stream + * @param cb The callback to call whenever a file in the ZIP archive is found + */ + function Unzip(cb) { + this.onfile = cb; + this.k = []; + this.o = { + 0: UnzipPassThrough + }; + this.p = et; + } + /** + * Pushes a chunk to be unzipped + * @param chunk The chunk to push + * @param final Whether this is the last chunk + */ + Unzip.prototype.push = function (chunk, final) { + var _this = this; + if (!this.onfile) + err(5); + if (!this.p) + err(4); + if (this.c > 0) { + var len = Math.min(this.c, chunk.length); + var toAdd = chunk.subarray(0, len); + this.c -= len; + if (this.d) + this.d.push(toAdd, !this.c); + else + this.k[0].push(toAdd); + chunk = chunk.subarray(len); + if (chunk.length) + return this.push(chunk, final); + } + else { + var f = 0, i = 0, is = void 0, buf = void 0; + if (!this.p.length) + buf = chunk; + else if (!chunk.length) + buf = this.p; + else { + buf = new u8(this.p.length + chunk.length); + buf.set(this.p), buf.set(chunk, this.p.length); + } + var l = buf.length, oc = this.c, add = oc && this.d; + var _loop_2 = function () { + var _a; + var sig = b4(buf, i); + if (sig == 0x4034B50) { + f = 1, is = i; + this_1.d = null; + this_1.c = 0; + var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28); + if (l > i + 30 + fnl + es) { + var chks_3 = []; + this_1.k.unshift(chks_3); + f = 2; + var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22); + var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u); + if (sc_1 == 4294967295) { + _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1]; + } + else if (dd) + sc_1 = -1; + i += es; + this_1.c = sc_1; + var d_1; + var file_1 = { + name: fn_1, + compression: cmp_1, + start: function () { + if (!file_1.ondata) + err(5); + if (!sc_1) + file_1.ondata(null, et, true); + else { + var ctr = _this.o[cmp_1]; + if (!ctr) + file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false); + d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1); + d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); }; + for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) { + var dat = chks_4[_i]; + d_1.push(dat, false); + } + if (_this.k[0] == chks_3 && _this.c) + _this.d = d_1; + else + d_1.push(et, true); + } + }, + terminate: function () { + if (d_1 && d_1.terminate) + d_1.terminate(); + } + }; + if (sc_1 >= 0) + file_1.size = sc_1, file_1.originalSize = su_1; + this_1.onfile(file_1); + } + return "break"; + } + else if (oc) { + if (sig == 0x8074B50) { + is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0; + return "break"; + } + else if (sig == 0x2014B50) { + is = i -= 4, f = 3, this_1.c = 0; + return "break"; + } + } + }; + var this_1 = this; + for (; i < l - 4; ++i) { + var state_1 = _loop_2(); + if (state_1 === "break") + break; + } + this.p = et; + if (oc < 0) { + var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i); + if (add) + add.push(dat, !!f); + else + this.k[+(f == 2)].push(dat); + } + if (f & 2) + return this.push(buf.subarray(i), final); + this.p = buf.subarray(i); + } + if (final) { + if (this.c) + err(13); + this.p = null; + } + }; + /** + * Registers a decoder with the stream, allowing for files compressed with + * the compression type provided to be expanded correctly + * @param decoder The decoder constructor + */ + Unzip.prototype.register = function (decoder) { + this.o[decoder.compression] = decoder; + }; + return Unzip; +}()); +export { Unzip }; +var mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); }; +export function unzip(data, opts, cb) { + if (!cb) + cb = opts, opts = {}; + if (typeof cb != 'function') + err(7); + var term = []; + var tAll = function () { + for (var i = 0; i < term.length; ++i) + term[i](); + }; + var files = {}; + var cbd = function (a, b) { + mt(function () { cb(a, b); }); + }; + mt(function () { cbd = cb; }); + var e = data.length - 22; + for (; b4(data, e) != 0x6054B50; --e) { + if (!e || data.length - e > 65558) { + cbd(err(13, 0, 1), null); + return tAll; + } + } + ; + var lft = b2(data, e + 8); + if (lft) { + var c = lft; + var o = b4(data, e + 16); + var z = o == 4294967295 || c == 65535; + if (z) { + var ze = b4(data, e - 12); + z = b4(data, ze) == 0x6064B50; + if (z) { + c = lft = b4(data, ze + 32); + o = b4(data, ze + 48); + } + } + var fltr = opts && opts.filter; + var _loop_3 = function (i) { + var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off); + o = no; + var cbl = function (e, d) { + if (e) { + tAll(); + cbd(e, null); + } + else { + if (d) + files[fn] = d; + if (!--lft) + cbd(null, files); + } + }; + if (!fltr || fltr({ + name: fn, + size: sc, + originalSize: su, + compression: c_1 + })) { + if (!c_1) + cbl(null, slc(data, b, b + sc)); + else if (c_1 == 8) { + var infl = data.subarray(b, b + sc); + // Synchronously decompress under 512KB, or barely-compressed data + if (su < 524288 || sc > 0.8 * su) { + try { + cbl(null, inflateSync(infl, { out: new u8(su) })); + } + catch (e) { + cbl(e, null); + } + } + else + term.push(inflate(infl, { size: su }, cbl)); + } + else + cbl(err(14, 'unknown compression type ' + c_1, 1), null); + } + else + cbl(null, null); + }; + for (var i = 0; i < c; ++i) { + _loop_3(i); + } + } + else + cbd(null, {}); + return tAll; +} +/** + * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better + * performance with more than one file. + * @param data The raw compressed ZIP file + * @param opts The ZIP extraction options + * @returns The decompressed files + */ +export function unzipSync(data, opts) { + var files = {}; + var e = data.length - 22; + for (; b4(data, e) != 0x6054B50; --e) { + if (!e || data.length - e > 65558) + err(13); + } + ; + var c = b2(data, e + 8); + if (!c) + return {}; + var o = b4(data, e + 16); + var z = o == 4294967295 || c == 65535; + if (z) { + var ze = b4(data, e - 12); + z = b4(data, ze) == 0x6064B50; + if (z) { + c = b4(data, ze + 32); + o = b4(data, ze + 48); + } + } + var fltr = opts && opts.filter; + for (var i = 0; i < c; ++i) { + var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off); + o = no; + if (!fltr || fltr({ + name: fn, + size: sc, + originalSize: su, + compression: c_2 + })) { + if (!c_2) + files[fn] = slc(data, b, b + sc); + else if (c_2 == 8) + files[fn] = inflateSync(data.subarray(b, b + sc), { out: new u8(su) }); + else + err(14, 'unknown compression type ' + c_2); + } + } + return files; +} diff --git a/node_modules/three/examples/jsm/libs/ktx-parse.module.js b/node_modules/three/examples/jsm/libs/ktx-parse.module.js new file mode 100644 index 0000000..c1d66bc --- /dev/null +++ b/node_modules/three/examples/jsm/libs/ktx-parse.module.js @@ -0,0 +1 @@ +const t=0,e=1,n=2,i=3,s=0,a=0,r=2,o=0,l=1,f=160,U=161,c=162,h=163,_=0,p=1,g=0,y=1,x=2,u=3,b=4,d=5,m=6,w=7,D=8,B=9,L=10,A=11,k=12,v=13,S=14,I=15,O=16,T=17,V=18,E=0,F=1,P=2,C=3,z=4,M=5,W=6,N=7,H=8,K=9,X=10,j=11,R=0,Y=1,q=2,G=13,J=14,Q=15,Z=128,$=64,tt=32,et=16,nt=0,it=1,st=2,at=3,rt=4,ot=5,lt=6,ft=7,Ut=8,ct=9,ht=10,_t=13,pt=14,gt=15,yt=16,xt=17,ut=20,bt=21,dt=22,mt=23,wt=24,Dt=27,Bt=28,Lt=29,At=30,kt=31,vt=34,St=35,It=36,Ot=37,Tt=38,Vt=41,Et=42,Ft=43,Pt=44,Ct=45,zt=48,Mt=49,Wt=50,Nt=58,Ht=59,Kt=62,Xt=63,jt=64,Rt=65,Yt=68,qt=69,Gt=70,Jt=71,Qt=74,Zt=75,$t=76,te=77,ee=78,ne=81,ie=82,se=83,ae=84,re=85,oe=88,le=89,fe=90,Ue=91,ce=92,he=95,_e=96,pe=97,ge=98,ye=99,xe=100,ue=101,be=102,de=103,me=104,we=105,De=106,Be=107,Le=108,Ae=109,ke=110,ve=111,Se=112,Ie=113,Oe=114,Te=115,Ve=116,Ee=117,Fe=118,Pe=119,Ce=120,ze=121,Me=122,We=123,Ne=124,He=125,Ke=126,Xe=127,je=128,Re=129,Ye=130,qe=131,Ge=132,Je=133,Qe=134,Ze=135,$e=136,tn=137,en=138,nn=139,sn=140,an=141,rn=142,on=143,ln=144,fn=145,Un=146,cn=147,hn=148,_n=149,pn=150,gn=151,yn=152,xn=153,un=154,bn=155,dn=156,mn=157,wn=158,Dn=159,Bn=160,Ln=161,An=162,kn=163,vn=164,Sn=165,In=166,On=167,Tn=168,Vn=169,En=170,Fn=171,Pn=172,Cn=173,zn=174,Mn=175,Wn=176,Nn=177,Hn=178,Kn=179,Xn=180,jn=181,Rn=182,Yn=183,qn=184,Gn=1000156007,Jn=1000156008,Qn=1000156009,Zn=1000156010,$n=1000156011,ti=1000156017,ei=1000156018,ni=1000156019,ii=1000156020,si=1000156021,ai=1000054e3,ri=1000054001,oi=1000054002,li=1000054003,fi=1000054004,Ui=1000054005,ci=1000054006,hi=1000054007,_i=1000066e3,pi=1000066001,gi=1000066002,yi=1000066003,xi=1000066004,ui=1000066005,bi=1000066006,di=1000066007,mi=1000066008,wi=1000066009,Di=1000066010,Bi=1000066011,Li=1000066012,Ai=1000066013,ki=100034e4,vi=1000340001;class Si{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class Ii{constructor(t,e,n,i){this._dataView=new DataView(t.buffer,t.byteOffset+e,n),this._littleEndian=i,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_nextInt32(){const t=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const n=this._offset;let i=0;for(;this._dataView.getUint8(this._offset)!==e&&i0?c+a.byteLength:0;h%8&&(h+=8-h%8);const _=[],p=new DataView(new ArrayBuffer(3*t.levels.length*8));let g=(h||c+a.byteLength)+n.byteLength;for(let e=0;e0?h:0),!0),x.setBigUint64(60,BigInt(n.byteLength),!0),new Uint8Array(Fi([new Uint8Array(Ti).buffer,y,p.buffer,o,a,h>0?new ArrayBuffer(h-(c+a.byteLength)):new ArrayBuffer(0),n,..._]))}export{Q as KHR_DF_CHANNEL_RGBSDA_ALPHA,q as KHR_DF_CHANNEL_RGBSDA_BLUE,J as KHR_DF_CHANNEL_RGBSDA_DEPTH,Y as KHR_DF_CHANNEL_RGBSDA_GREEN,R as KHR_DF_CHANNEL_RGBSDA_RED,G as KHR_DF_CHANNEL_RGBSDA_STENCIL,p as KHR_DF_FLAG_ALPHA_PREMULTIPLIED,_ as KHR_DF_FLAG_ALPHA_STRAIGHT,s as KHR_DF_KHR_DESCRIPTORTYPE_BASICFORMAT,c as KHR_DF_MODEL_ASTC,f as KHR_DF_MODEL_ETC1,h as KHR_DF_MODEL_ETC1S,U as KHR_DF_MODEL_ETC2,l as KHR_DF_MODEL_RGBSDA,o as KHR_DF_MODEL_UNSPECIFIED,W as KHR_DF_PRIMARIES_ACES,N as KHR_DF_PRIMARIES_ACESCC,j as KHR_DF_PRIMARIES_ADOBERGB,z as KHR_DF_PRIMARIES_BT2020,P as KHR_DF_PRIMARIES_BT601_EBU,C as KHR_DF_PRIMARIES_BT601_SMPTE,F as KHR_DF_PRIMARIES_BT709,M as KHR_DF_PRIMARIES_CIEXYZ,X as KHR_DF_PRIMARIES_DISPLAYP3,H as KHR_DF_PRIMARIES_NTSC1953,K as KHR_DF_PRIMARIES_PAL525,E as KHR_DF_PRIMARIES_UNSPECIFIED,tt as KHR_DF_SAMPLE_DATATYPE_EXPONENT,Z as KHR_DF_SAMPLE_DATATYPE_FLOAT,et as KHR_DF_SAMPLE_DATATYPE_LINEAR,$ as KHR_DF_SAMPLE_DATATYPE_SIGNED,O as KHR_DF_TRANSFER_ACESCC,T as KHR_DF_TRANSFER_ACESCCT,V as KHR_DF_TRANSFER_ADOBERGB,w as KHR_DF_TRANSFER_BT1886,k as KHR_DF_TRANSFER_DCIP3,B as KHR_DF_TRANSFER_HLG_EOTF,D as KHR_DF_TRANSFER_HLG_OETF,u as KHR_DF_TRANSFER_ITU,y as KHR_DF_TRANSFER_LINEAR,b as KHR_DF_TRANSFER_NTSC,S as KHR_DF_TRANSFER_PAL625_EOTF,v as KHR_DF_TRANSFER_PAL_OETF,L as KHR_DF_TRANSFER_PQ_EOTF,A as KHR_DF_TRANSFER_PQ_OETF,d as KHR_DF_TRANSFER_SLOG,m as KHR_DF_TRANSFER_SLOG2,x as KHR_DF_TRANSFER_SRGB,I as KHR_DF_TRANSFER_ST240,g as KHR_DF_TRANSFER_UNSPECIFIED,a as KHR_DF_VENDORID_KHRONOS,r as KHR_DF_VERSION,e as KHR_SUPERCOMPRESSION_BASISLZ,t as KHR_SUPERCOMPRESSION_NONE,i as KHR_SUPERCOMPRESSION_ZLIB,n as KHR_SUPERCOMPRESSION_ZSTD,Si as KTX2Container,Ut as VK_FORMAT_A1R5G5B5_UNORM_PACK16,qt as VK_FORMAT_A2B10G10R10_SINT_PACK32,Rt as VK_FORMAT_A2B10G10R10_SNORM_PACK32,Yt as VK_FORMAT_A2B10G10R10_UINT_PACK32,jt as VK_FORMAT_A2B10G10R10_UNORM_PACK32,Xt as VK_FORMAT_A2R10G10B10_SINT_PACK32,Ht as VK_FORMAT_A2R10G10B10_SNORM_PACK32,Kt as VK_FORMAT_A2R10G10B10_UINT_PACK32,Nt as VK_FORMAT_A2R10G10B10_UNORM_PACK32,vi as VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT,ki as VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT,Bi as VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT,Xn as VK_FORMAT_ASTC_10x10_SRGB_BLOCK,Kn as VK_FORMAT_ASTC_10x10_UNORM_BLOCK,mi as VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT,zn as VK_FORMAT_ASTC_10x5_SRGB_BLOCK,Cn as VK_FORMAT_ASTC_10x5_UNORM_BLOCK,wi as VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT,Wn as VK_FORMAT_ASTC_10x6_SRGB_BLOCK,Mn as VK_FORMAT_ASTC_10x6_UNORM_BLOCK,Di as VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT,Hn as VK_FORMAT_ASTC_10x8_SRGB_BLOCK,Nn as VK_FORMAT_ASTC_10x8_UNORM_BLOCK,Li as VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT,Rn as VK_FORMAT_ASTC_12x10_SRGB_BLOCK,jn as VK_FORMAT_ASTC_12x10_UNORM_BLOCK,Ai as VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT,qn as VK_FORMAT_ASTC_12x12_SRGB_BLOCK,Yn as VK_FORMAT_ASTC_12x12_UNORM_BLOCK,_i as VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT,wn as VK_FORMAT_ASTC_4x4_SRGB_BLOCK,mn as VK_FORMAT_ASTC_4x4_UNORM_BLOCK,pi as VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT,Bn as VK_FORMAT_ASTC_5x4_SRGB_BLOCK,Dn as VK_FORMAT_ASTC_5x4_UNORM_BLOCK,gi as VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT,An as VK_FORMAT_ASTC_5x5_SRGB_BLOCK,Ln as VK_FORMAT_ASTC_5x5_UNORM_BLOCK,yi as VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT,vn as VK_FORMAT_ASTC_6x5_SRGB_BLOCK,kn as VK_FORMAT_ASTC_6x5_UNORM_BLOCK,xi as VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT,In as VK_FORMAT_ASTC_6x6_SRGB_BLOCK,Sn as VK_FORMAT_ASTC_6x6_UNORM_BLOCK,ui as VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT,Tn as VK_FORMAT_ASTC_8x5_SRGB_BLOCK,On as VK_FORMAT_ASTC_8x5_UNORM_BLOCK,bi as VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT,En as VK_FORMAT_ASTC_8x6_SRGB_BLOCK,Vn as VK_FORMAT_ASTC_8x6_UNORM_BLOCK,di as VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT,Pn as VK_FORMAT_ASTC_8x8_SRGB_BLOCK,Fn as VK_FORMAT_ASTC_8x8_UNORM_BLOCK,Me as VK_FORMAT_B10G11R11_UFLOAT_PACK32,$n as VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16,si as VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16,at as VK_FORMAT_B4G4R4A4_UNORM_PACK16,ft as VK_FORMAT_B5G5R5A1_UNORM_PACK16,ot as VK_FORMAT_B5G6R5_UNORM_PACK16,Mt as VK_FORMAT_B8G8R8A8_SINT,Ct as VK_FORMAT_B8G8R8A8_SNORM,Wt as VK_FORMAT_B8G8R8A8_SRGB,zt as VK_FORMAT_B8G8R8A8_UINT,Pt as VK_FORMAT_B8G8R8A8_UNORM,St as VK_FORMAT_B8G8R8_SINT,kt as VK_FORMAT_B8G8R8_SNORM,It as VK_FORMAT_B8G8R8_SRGB,vt as VK_FORMAT_B8G8R8_UINT,At as VK_FORMAT_B8G8R8_UNORM,Qe as VK_FORMAT_BC1_RGBA_SRGB_BLOCK,Je as VK_FORMAT_BC1_RGBA_UNORM_BLOCK,Ge as VK_FORMAT_BC1_RGB_SRGB_BLOCK,qe as VK_FORMAT_BC1_RGB_UNORM_BLOCK,$e as VK_FORMAT_BC2_SRGB_BLOCK,Ze as VK_FORMAT_BC2_UNORM_BLOCK,en as VK_FORMAT_BC3_SRGB_BLOCK,tn as VK_FORMAT_BC3_UNORM_BLOCK,sn as VK_FORMAT_BC4_SNORM_BLOCK,nn as VK_FORMAT_BC4_UNORM_BLOCK,rn as VK_FORMAT_BC5_SNORM_BLOCK,an as VK_FORMAT_BC5_UNORM_BLOCK,ln as VK_FORMAT_BC6H_SFLOAT_BLOCK,on as VK_FORMAT_BC6H_UFLOAT_BLOCK,Un as VK_FORMAT_BC7_SRGB_BLOCK,fn as VK_FORMAT_BC7_UNORM_BLOCK,Ne as VK_FORMAT_D16_UNORM,je as VK_FORMAT_D16_UNORM_S8_UINT,Re as VK_FORMAT_D24_UNORM_S8_UINT,Ke as VK_FORMAT_D32_SFLOAT,Ye as VK_FORMAT_D32_SFLOAT_S8_UINT,We as VK_FORMAT_E5B9G9R9_UFLOAT_PACK32,dn as VK_FORMAT_EAC_R11G11_SNORM_BLOCK,bn as VK_FORMAT_EAC_R11G11_UNORM_BLOCK,un as VK_FORMAT_EAC_R11_SNORM_BLOCK,xn as VK_FORMAT_EAC_R11_UNORM_BLOCK,pn as VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK,_n as VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK,yn as VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK,gn as VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK,hn as VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK,cn as VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK,Zn as VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16,ii as VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16,fi as VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG,ai as VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG,Ui as VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG,ri as VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG,ci as VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG,oi as VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG,hi as VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG,li as VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG,Qn as VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16,Jn as VK_FORMAT_R10X6G10X6_UNORM_2PACK16,Gn as VK_FORMAT_R10X6_UNORM_PACK16,ni as VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16,ei as VK_FORMAT_R12X4G12X4_UNORM_2PACK16,ti as VK_FORMAT_R12X4_UNORM_PACK16,pe as VK_FORMAT_R16G16B16A16_SFLOAT,_e as VK_FORMAT_R16G16B16A16_SINT,ce as VK_FORMAT_R16G16B16A16_SNORM,he as VK_FORMAT_R16G16B16A16_UINT,Ue as VK_FORMAT_R16G16B16A16_UNORM,fe as VK_FORMAT_R16G16B16_SFLOAT,le as VK_FORMAT_R16G16B16_SINT,re as VK_FORMAT_R16G16B16_SNORM,oe as VK_FORMAT_R16G16B16_UINT,ae as VK_FORMAT_R16G16B16_UNORM,se as VK_FORMAT_R16G16_SFLOAT,ie as VK_FORMAT_R16G16_SINT,ee as VK_FORMAT_R16G16_SNORM,ne as VK_FORMAT_R16G16_UINT,te as VK_FORMAT_R16G16_UNORM,$t as VK_FORMAT_R16_SFLOAT,Zt as VK_FORMAT_R16_SINT,Jt as VK_FORMAT_R16_SNORM,Qt as VK_FORMAT_R16_UINT,Gt as VK_FORMAT_R16_UNORM,Ae as VK_FORMAT_R32G32B32A32_SFLOAT,Le as VK_FORMAT_R32G32B32A32_SINT,Be as VK_FORMAT_R32G32B32A32_UINT,De as VK_FORMAT_R32G32B32_SFLOAT,we as VK_FORMAT_R32G32B32_SINT,me as VK_FORMAT_R32G32B32_UINT,de as VK_FORMAT_R32G32_SFLOAT,be as VK_FORMAT_R32G32_SINT,ue as VK_FORMAT_R32G32_UINT,xe as VK_FORMAT_R32_SFLOAT,ye as VK_FORMAT_R32_SINT,ge as VK_FORMAT_R32_UINT,st as VK_FORMAT_R4G4B4A4_UNORM_PACK16,it as VK_FORMAT_R4G4_UNORM_PACK8,lt as VK_FORMAT_R5G5B5A1_UNORM_PACK16,rt as VK_FORMAT_R5G6B5_UNORM_PACK16,ze as VK_FORMAT_R64G64B64A64_SFLOAT,Ce as VK_FORMAT_R64G64B64A64_SINT,Pe as VK_FORMAT_R64G64B64A64_UINT,Fe as VK_FORMAT_R64G64B64_SFLOAT,Ee as VK_FORMAT_R64G64B64_SINT,Ve as VK_FORMAT_R64G64B64_UINT,Te as VK_FORMAT_R64G64_SFLOAT,Oe as VK_FORMAT_R64G64_SINT,Ie as VK_FORMAT_R64G64_UINT,Se as VK_FORMAT_R64_SFLOAT,ve as VK_FORMAT_R64_SINT,ke as VK_FORMAT_R64_UINT,Et as VK_FORMAT_R8G8B8A8_SINT,Tt as VK_FORMAT_R8G8B8A8_SNORM,Ft as VK_FORMAT_R8G8B8A8_SRGB,Vt as VK_FORMAT_R8G8B8A8_UINT,Ot as VK_FORMAT_R8G8B8A8_UNORM,Bt as VK_FORMAT_R8G8B8_SINT,wt as VK_FORMAT_R8G8B8_SNORM,Lt as VK_FORMAT_R8G8B8_SRGB,Dt as VK_FORMAT_R8G8B8_UINT,mt as VK_FORMAT_R8G8B8_UNORM,bt as VK_FORMAT_R8G8_SINT,xt as VK_FORMAT_R8G8_SNORM,dt as VK_FORMAT_R8G8_SRGB,ut as VK_FORMAT_R8G8_UINT,yt as VK_FORMAT_R8G8_UNORM,pt as VK_FORMAT_R8_SINT,ht as VK_FORMAT_R8_SNORM,gt as VK_FORMAT_R8_SRGB,_t as VK_FORMAT_R8_UINT,ct as VK_FORMAT_R8_UNORM,Xe as VK_FORMAT_S8_UINT,nt as VK_FORMAT_UNDEFINED,He as VK_FORMAT_X8_D24_UNORM_PACK32,Pi as read,Mi as write}; diff --git a/node_modules/three/examples/jsm/libs/lil-gui.module.min.js b/node_modules/three/examples/jsm/libs/lil-gui.module.min.js new file mode 100644 index 0000000..c76a5ef --- /dev/null +++ b/node_modules/three/examples/jsm/libs/lil-gui.module.min.js @@ -0,0 +1,8 @@ +/** + * lil-gui + * https://lil-gui.georgealways.com + * @version 0.17.0 + * @author George Michael Brower + * @license MIT + */ +class t{constructor(i,e,s,n,l="div"){this.parent=i,this.object=e,this.property=s,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement("div"),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),t.nextNameID=t.nextNameID||0,this.$name.id="lil-gui-name-"+ ++t.nextNameID,this.$widget=document.createElement(l),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(s)}name(t){return this._name=t,this.$name.innerHTML=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),void 0!==this._onChange&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),void 0!==this._onFinishChange&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled||(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t)),this}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){const i=this.parent.add(this.object,this.property,t);return i.name(this._name),this.destroy(),i}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,void 0!==this._listenCallbackID&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.object[this.property]=t,this._callOnChange(),this.updateDisplay(),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class i extends t{constructor(t,i,e){super(t,i,e,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function e(t){let i,e;return(i=t.match(/(#|0x)?([a-f0-9]{6})/i))?e=i[2]:(i=t.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?e=parseInt(i[1]).toString(16).padStart(2,0)+parseInt(i[2]).toString(16).padStart(2,0)+parseInt(i[3]).toString(16).padStart(2,0):(i=t.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(e=i[1]+i[1]+i[2]+i[2]+i[3]+i[3]),!!e&&"#"+e}const s={isPrimitive:!0,match:t=>"string"==typeof t,fromHexString:e,toHexString:e},n={isPrimitive:!0,match:t=>"number"==typeof t,fromHexString:t=>parseInt(t.substring(1),16),toHexString:t=>"#"+t.toString(16).padStart(6,0)},l={isPrimitive:!1,match:Array.isArray,fromHexString(t,i,e=1){const s=n.fromHexString(t);i[0]=(s>>16&255)/255*e,i[1]=(s>>8&255)/255*e,i[2]=(255&s)/255*e},toHexString:([t,i,e],s=1)=>n.toHexString(t*(s=255/s)<<16^i*s<<8^e*s<<0)},r={isPrimitive:!1,match:t=>Object(t)===t,fromHexString(t,i,e=1){const s=n.fromHexString(t);i.r=(s>>16&255)/255*e,i.g=(s>>8&255)/255*e,i.b=(255&s)/255*e},toHexString:({r:t,g:i,b:e},s=1)=>n.toHexString(t*(s=255/s)<<16^i*s<<8^e*s<<0)},o=[s,n,l,r];class a extends t{constructor(t,i,s,n){var l;super(t,i,s,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=(l=this.initialValue,o.find(t=>t.match(l))),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{const t=e(this.$text.value);t&&this._setValueFromHexString(t)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){const i=this._format.fromHexString(t);this.setValue(i)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class h extends t{constructor(t,i,e){super(t,i,e,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",t=>{t.preventDefault(),this.getValue().call(this.object)}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class d extends t{constructor(t,i,e,s,n,l){super(t,i,e,"number"),this._initInput(),this.min(s),this.max(n);const r=void 0!==l;this.step(r?l:this._getImplicitStep(),r),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,i=!0){return this._step=t,this._stepExplicit=i,this}updateDisplay(){const t=this.getValue();if(this._hasSlider){let i=(t-this._min)/(this._max-this._min);i=Math.max(0,Math.min(i,1)),this.$fill.style.width=100*i+"%"}return this._inputFocused||(this.$input.value=void 0===this._decimals?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$disable=this.$input;const t=t=>{const i=parseFloat(this.$input.value);isNaN(i)||(this._snapClampSetValue(i+t),this.$input.value=this.getValue())};let i,e,s,n,l,r=!1;const o=t=>{if(r){const s=t.clientX-i,n=t.clientY-e;Math.abs(n)>5?(t.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(s)>5&&a()}if(!r){const i=t.clientY-s;l-=i*this._step*this._arrowKeyMultiplier(t),n+l>this._max?l=this._max-n:n+l{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",a)};this.$input.addEventListener("input",()=>{let t=parseFloat(this.$input.value);isNaN(t)||(this._stepExplicit&&(t=this._snap(t)),this.setValue(this._clamp(t)))}),this.$input.addEventListener("keydown",i=>{"Enter"===i.code&&this.$input.blur(),"ArrowUp"===i.code&&(i.preventDefault(),t(this._step*this._arrowKeyMultiplier(i))),"ArrowDown"===i.code&&(i.preventDefault(),t(this._step*this._arrowKeyMultiplier(i)*-1))}),this.$input.addEventListener("wheel",i=>{this._inputFocused&&(i.preventDefault(),t(this._step*this._normalizeMouseWheel(i)))},{passive:!1}),this.$input.addEventListener("mousedown",t=>{i=t.clientX,e=s=t.clientY,r=!0,n=this.getValue(),l=0,window.addEventListener("mousemove",o),window.addEventListener("mouseup",a)}),this.$input.addEventListener("focus",()=>{this._inputFocused=!0}),this.$input.addEventListener("blur",()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()})}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const t=t=>{const i=this.$slider.getBoundingClientRect();let e=(s=t,n=i.left,l=i.right,r=this._min,o=this._max,(s-n)/(l-n)*(o-r)+r);var s,n,l,r,o;this._snapClampSetValue(e)},i=i=>{t(i.clientX)},e=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",e)};let s,n,l=!1;const r=i=>{i.preventDefault(),this._setDraggingStyle(!0),t(i.touches[0].clientX),l=!1},o=i=>{if(l){const t=i.touches[0].clientX-s,e=i.touches[0].clientY-n;Math.abs(t)>Math.abs(e)?r(i):(window.removeEventListener("touchmove",o),window.removeEventListener("touchend",a))}else i.preventDefault(),t(i.touches[0].clientX)},a=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",o),window.removeEventListener("touchend",a)},h=this._callOnFinishChange.bind(this);let d;this.$slider.addEventListener("mousedown",s=>{this._setDraggingStyle(!0),t(s.clientX),window.addEventListener("mousemove",i),window.addEventListener("mouseup",e)}),this.$slider.addEventListener("touchstart",t=>{t.touches.length>1||(this._hasScrollBar?(s=t.touches[0].clientX,n=t.touches[0].clientY,l=!0):r(t),window.addEventListener("touchmove",o,{passive:!1}),window.addEventListener("touchend",a))},{passive:!1}),this.$slider.addEventListener("wheel",t=>{if(Math.abs(t.deltaX)this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){const t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return void 0!==this._min}get _hasMax(){return void 0!==this._max}}class c extends t{constructor(t,i,e,s){super(t,i,e,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this._values=Array.isArray(s)?s:Object.values(s),this._names=Array.isArray(s)?s:Object.keys(s),this._names.forEach(t=>{const i=document.createElement("option");i.innerHTML=t,this.$select.appendChild(i)}),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.updateDisplay()}updateDisplay(){const t=this.getValue(),i=this._values.indexOf(t);return this.$select.selectedIndex=i,this.$display.innerHTML=-1===i?t:this._names[i],this}}class u extends t{constructor(t,i,e){super(t,i,e,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",t=>{"Enter"===t.code&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}let p=!1;class g{constructor({parent:t,autoPlace:i=void 0===t,container:e,width:s,title:n="Controls",injectStyles:l=!0,touchStyles:r=!0}={}){if(this.parent=t,this.root=t?t.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",t=>{"Enter"!==t.code&&"Space"!==t.code||(t.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(n),r&&this.domElement.classList.add("allow-touch-styles"),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),!p&&l&&(!function(t){const i=document.createElement("style");i.innerHTML=t;const e=document.querySelector("head link[rel=stylesheet], head style");e?document.head.insertBefore(i,e):document.head.appendChild(i)}('.lil-gui{--background-color:#1f1f1f;--text-color:#ebebeb;--title-background-color:#111;--title-text-color:#ebebeb;--widget-color:#424242;--hover-color:#4f4f4f;--focus-color:#595959;--number-color:#2cc9ff;--string-color:#a2db3c;--font-size:11px;--input-font-size:11px;--font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;--font-family-mono:Menlo,Monaco,Consolas,"Droid Sans Mono",monospace;--padding:4px;--spacing:4px;--widget-height:20px;--name-width:45%;--slider-knob-width:2px;--slider-input-width:27%;--color-input-width:27%;--slider-input-min-width:45px;--color-input-min-width:45px;--folder-indent:7px;--widget-padding:0 0 0 3px;--widget-border-radius:2px;--checkbox-size:calc(var(--widget-height)*0.75);--scrollbar-width:5px;background-color:var(--background-color);color:var(--text-color);font-family:var(--font-family);font-size:var(--font-size);font-style:normal;font-weight:400;line-height:1;text-align:left;touch-action:manipulation;user-select:none;-webkit-user-select:none}.lil-gui,.lil-gui *{box-sizing:border-box;margin:0;padding:0}.lil-gui.root{display:flex;flex-direction:column;width:var(--width,245px)}.lil-gui.root>.title{background:var(--title-background-color);color:var(--title-text-color)}.lil-gui.root>.children{overflow-x:hidden;overflow-y:auto}.lil-gui.root>.children::-webkit-scrollbar{background:var(--background-color);height:var(--scrollbar-width);width:var(--scrollbar-width)}.lil-gui.root>.children::-webkit-scrollbar-thumb{background:var(--focus-color);border-radius:var(--scrollbar-width)}.lil-gui.force-touch-styles{--widget-height:28px;--padding:6px;--spacing:6px;--font-size:13px;--input-font-size:16px;--folder-indent:10px;--scrollbar-width:7px;--slider-input-min-width:50px;--color-input-min-width:65px}.lil-gui.autoPlace{max-height:100%;position:fixed;right:15px;top:0;z-index:1001}.lil-gui .controller{align-items:center;display:flex;margin:var(--spacing) 0;padding:0 var(--padding)}.lil-gui .controller.disabled{opacity:.5}.lil-gui .controller.disabled,.lil-gui .controller.disabled *{pointer-events:none!important}.lil-gui .controller>.name{flex-shrink:0;line-height:var(--widget-height);min-width:var(--name-width);padding-right:var(--spacing);white-space:pre}.lil-gui .controller .widget{align-items:center;display:flex;min-height:var(--widget-height);position:relative;width:100%}.lil-gui .controller.string input{color:var(--string-color)}.lil-gui .controller.boolean .widget{cursor:pointer}.lil-gui .controller.color .display{border-radius:var(--widget-border-radius);height:var(--widget-height);position:relative;width:100%}.lil-gui .controller.color input[type=color]{cursor:pointer;height:100%;opacity:0;width:100%}.lil-gui .controller.color input[type=text]{flex-shrink:0;font-family:var(--font-family-mono);margin-left:var(--spacing);min-width:var(--color-input-min-width);width:var(--color-input-width)}.lil-gui .controller.option select{max-width:100%;opacity:0;position:absolute;width:100%}.lil-gui .controller.option .display{background:var(--widget-color);border-radius:var(--widget-border-radius);height:var(--widget-height);line-height:var(--widget-height);max-width:100%;overflow:hidden;padding-left:.55em;padding-right:1.75em;pointer-events:none;position:relative;word-break:break-all}.lil-gui .controller.option .display.active{background:var(--focus-color)}.lil-gui .controller.option .display:after{bottom:0;content:"↕";font-family:lil-gui;padding-right:.375em;position:absolute;right:0;top:0}.lil-gui .controller.option .widget,.lil-gui .controller.option select{cursor:pointer}.lil-gui .controller.number input{color:var(--number-color)}.lil-gui .controller.number.hasSlider input{flex-shrink:0;margin-left:var(--spacing);min-width:var(--slider-input-min-width);width:var(--slider-input-width)}.lil-gui .controller.number .slider{background-color:var(--widget-color);border-radius:var(--widget-border-radius);cursor:ew-resize;height:var(--widget-height);overflow:hidden;padding-right:var(--slider-knob-width);touch-action:pan-y;width:100%}.lil-gui .controller.number .slider.active{background-color:var(--focus-color)}.lil-gui .controller.number .slider.active .fill{opacity:.95}.lil-gui .controller.number .fill{border-right:var(--slider-knob-width) solid var(--number-color);box-sizing:content-box;height:100%}.lil-gui-dragging .lil-gui{--hover-color:var(--widget-color)}.lil-gui-dragging *{cursor:ew-resize!important}.lil-gui-dragging.lil-gui-vertical *{cursor:ns-resize!important}.lil-gui .title{--title-height:calc(var(--widget-height) + var(--spacing)*1.25);-webkit-tap-highlight-color:transparent;text-decoration-skip:objects;cursor:pointer;font-weight:600;height:var(--title-height);line-height:calc(var(--title-height) - 4px);outline:none;padding:0 var(--padding)}.lil-gui .title:before{content:"▾";display:inline-block;font-family:lil-gui;padding-right:2px}.lil-gui .title:active{background:var(--title-background-color);opacity:.75}.lil-gui.root>.title:focus{text-decoration:none!important}.lil-gui.closed>.title:before{content:"▸"}.lil-gui.closed>.children{opacity:0;transform:translateY(-7px)}.lil-gui.closed:not(.transition)>.children{display:none}.lil-gui.transition>.children{overflow:hidden;pointer-events:none;transition-duration:.3s;transition-property:height,opacity,transform;transition-timing-function:cubic-bezier(.2,.6,.35,1)}.lil-gui .children:empty:before{content:"Empty";display:block;font-style:italic;height:var(--widget-height);line-height:var(--widget-height);margin:var(--spacing) 0;opacity:.5;padding:0 var(--padding)}.lil-gui.root>.children>.lil-gui>.title{border-width:0;border-bottom:1px solid var(--widget-color);border-left:0 solid var(--widget-color);border-right:0 solid var(--widget-color);border-top:1px solid var(--widget-color);transition:border-color .3s}.lil-gui.root>.children>.lil-gui.closed>.title{border-bottom-color:transparent}.lil-gui+.controller{border-top:1px solid var(--widget-color);margin-top:0;padding-top:var(--spacing)}.lil-gui .lil-gui .lil-gui>.title{border:none}.lil-gui .lil-gui .lil-gui>.children{border:none;border-left:2px solid var(--widget-color);margin-left:var(--folder-indent)}.lil-gui .lil-gui .controller{border:none}.lil-gui input{-webkit-tap-highlight-color:transparent;background:var(--widget-color);border:0;border-radius:var(--widget-border-radius);color:var(--text-color);font-family:var(--font-family);font-size:var(--input-font-size);height:var(--widget-height);outline:none;width:100%}.lil-gui input:disabled{opacity:1}.lil-gui input[type=number],.lil-gui input[type=text]{padding:var(--widget-padding)}.lil-gui input[type=number]:focus,.lil-gui input[type=text]:focus{background:var(--focus-color)}.lil-gui input::-webkit-inner-spin-button,.lil-gui input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.lil-gui input[type=number]{-moz-appearance:textfield}.lil-gui input[type=checkbox]{appearance:none;-webkit-appearance:none;border-radius:var(--widget-border-radius);cursor:pointer;height:var(--checkbox-size);text-align:center;width:var(--checkbox-size)}.lil-gui input[type=checkbox]:checked:before{content:"✓";font-family:lil-gui;font-size:var(--checkbox-size);line-height:var(--checkbox-size)}.lil-gui button{-webkit-tap-highlight-color:transparent;background:var(--widget-color);border:1px solid var(--widget-color);border-radius:var(--widget-border-radius);color:var(--text-color);cursor:pointer;font-family:var(--font-family);font-size:var(--font-size);height:var(--widget-height);line-height:calc(var(--widget-height) - 4px);outline:none;text-align:center;text-transform:none;width:100%}.lil-gui button:active{background:var(--focus-color)}@font-face{font-family:lil-gui;src:url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff")}@media (pointer:coarse){.lil-gui.allow-touch-styles{--widget-height:28px;--padding:6px;--spacing:6px;--font-size:13px;--input-font-size:16px;--folder-indent:10px;--scrollbar-width:7px;--slider-input-min-width:50px;--color-input-min-width:65px}}@media (hover:hover){.lil-gui .controller.color .display:hover:before{border:1px solid #fff9;border-radius:var(--widget-border-radius);bottom:0;content:" ";display:block;left:0;position:absolute;right:0;top:0}.lil-gui .controller.option .display.focus{background:var(--focus-color)}.lil-gui .controller.option .widget:hover .display{background:var(--hover-color)}.lil-gui .controller.number .slider:hover{background-color:var(--hover-color)}body:not(.lil-gui-dragging) .lil-gui .title:hover{background:var(--title-background-color);opacity:.85}.lil-gui .title:focus{text-decoration:underline var(--focus-color)}.lil-gui input:hover{background:var(--hover-color)}.lil-gui input:active{background:var(--focus-color)}.lil-gui input[type=checkbox]:focus{box-shadow:inset 0 0 0 1px var(--focus-color)}.lil-gui button:hover{background:var(--hover-color);border-color:var(--hover-color)}.lil-gui button:focus{border-color:var(--focus-color)}}'),p=!0),e?e.appendChild(this.domElement):i&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),s&&this.domElement.style.setProperty("--width",s+"px"),this.domElement.addEventListener("keydown",t=>t.stopPropagation()),this.domElement.addEventListener("keyup",t=>t.stopPropagation())}add(t,e,s,n,l){if(Object(s)===s)return new c(this,t,e,s);const r=t[e];switch(typeof r){case"number":return new d(this,t,e,s,n,l);case"boolean":return new i(this,t,e);case"string":return new u(this,t,e);case"function":return new h(this,t,e)}console.error("gui.add failed\n\tproperty:",e,"\n\tobject:",t,"\n\tvalue:",r)}addColor(t,i,e=1){return new a(this,t,i,e)}addFolder(t){return new g({parent:this,title:t})}load(t,i=!0){return t.controllers&&this.controllers.forEach(i=>{i instanceof h||i._name in t.controllers&&i.load(t.controllers[i._name])}),i&&t.folders&&this.folders.forEach(i=>{i._title in t.folders&&i.load(t.folders[i._title])}),this}save(t=!0){const i={controllers:{},folders:{}};return this.controllers.forEach(t=>{if(!(t instanceof h)){if(t._name in i.controllers)throw new Error(`Cannot save GUI with duplicate property "${t._name}"`);i.controllers[t._name]=t.save()}}),t&&this.folders.forEach(t=>{if(t._title in i.folders)throw new Error(`Cannot save GUI with duplicate folder "${t._title}"`);i.folders[t._title]=t.save()}),i}open(t=!0){return this._closed=!t,this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(t=!0){return this._closed=!t,this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{const i=this.$children.clientHeight;this.$children.style.height=i+"px",this.domElement.classList.add("transition");const e=t=>{t.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",e))};this.$children.addEventListener("transitionend",e);const s=t?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!t),requestAnimationFrame(()=>{this.$children.style.height=s+"px"})}),this}title(t){return this._title=t,this.$title.innerHTML=t,this}reset(t=!0){return(t?this.controllersRecursive():this.controllers).forEach(t=>t.reset()),this}onChange(t){return this._onChange=t,this}_callOnChange(t){this.parent&&this.parent._callOnChange(t),void 0!==this._onChange&&this._onChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(t){this.parent&&this.parent._callOnFinishChange(t),void 0!==this._onFinishChange&&this._onFinishChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(t=>t.destroy())}controllersRecursive(){let t=Array.from(this.controllers);return this.folders.forEach(i=>{t=t.concat(i.controllersRecursive())}),t}foldersRecursive(){let t=Array.from(this.folders);return this.folders.forEach(i=>{t=t.concat(i.foldersRecursive())}),t}}export default g;export{i as BooleanController,a as ColorController,t as Controller,h as FunctionController,g as GUI,d as NumberController,c as OptionController,u as StringController}; diff --git a/node_modules/three/examples/jsm/libs/lottie_canvas.module.js b/node_modules/three/examples/jsm/libs/lottie_canvas.module.js new file mode 100644 index 0000000..512a84c --- /dev/null +++ b/node_modules/three/examples/jsm/libs/lottie_canvas.module.js @@ -0,0 +1,14849 @@ +const lottie = {}; + +if (typeof document !== 'undefined') { + +const svgNS = 'http://www.w3.org/2000/svg'; + +let locationHref = ''; +let _useWebWorker = false; + +const initialDefaultFrame = -999999; + +const setWebWorker = (flag) => { _useWebWorker = !!flag; }; +const getWebWorker = () => _useWebWorker; + +const setLocationHref = (value) => { locationHref = value; }; +const getLocationHref = () => locationHref; + +function createTag(type) { + // return {appendChild:function(){},setAttribute:function(){},style:{}} + return document.createElement(type); +} + +function extendPrototype(sources, destination) { + var i; + var len = sources.length; + var sourcePrototype; + for (i = 0; i < len; i += 1) { + sourcePrototype = sources[i].prototype; + for (var attr in sourcePrototype) { + if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr]; + } + } +} + +function getDescriptor(object, prop) { + return Object.getOwnPropertyDescriptor(object, prop); +} + +function createProxyFunction(prototype) { + function ProxyFunction() {} + ProxyFunction.prototype = prototype; + return ProxyFunction; +} + +// import Howl from '../../3rd_party/howler'; + +const audioControllerFactory = (function () { + function AudioController(audioFactory) { + this.audios = []; + this.audioFactory = audioFactory; + this._volume = 1; + this._isMuted = false; + } + + AudioController.prototype = { + addAudio: function (audio) { + this.audios.push(audio); + }, + pause: function () { + var i; + var len = this.audios.length; + for (i = 0; i < len; i += 1) { + this.audios[i].pause(); + } + }, + resume: function () { + var i; + var len = this.audios.length; + for (i = 0; i < len; i += 1) { + this.audios[i].resume(); + } + }, + setRate: function (rateValue) { + var i; + var len = this.audios.length; + for (i = 0; i < len; i += 1) { + this.audios[i].setRate(rateValue); + } + }, + createAudio: function (assetPath) { + if (this.audioFactory) { + return this.audioFactory(assetPath); + } if (window.Howl) { + return new window.Howl({ + src: [assetPath], + }); + } + return { + isPlaying: false, + play: function () { this.isPlaying = true; }, + seek: function () { this.isPlaying = false; }, + playing: function () {}, + rate: function () {}, + setVolume: function () {}, + }; + }, + setAudioFactory: function (audioFactory) { + this.audioFactory = audioFactory; + }, + setVolume: function (value) { + this._volume = value; + this._updateVolume(); + }, + mute: function () { + this._isMuted = true; + this._updateVolume(); + }, + unmute: function () { + this._isMuted = false; + this._updateVolume(); + }, + getVolume: function () { + return this._volume; + }, + _updateVolume: function () { + var i; + var len = this.audios.length; + for (i = 0; i < len; i += 1) { + this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1)); + } + }, + }; + + return function () { + return new AudioController(); + }; +}()); + +const createTypedArray = (function () { + function createRegularArray(type, len) { + var i = 0; + var arr = []; + var value; + switch (type) { + case 'int16': + case 'uint8c': + value = 1; + break; + default: + value = 1.1; + break; + } + for (i = 0; i < len; i += 1) { + arr.push(value); + } + return arr; + } + function createTypedArrayFactory(type, len) { + if (type === 'float32') { + return new Float32Array(len); + } if (type === 'int16') { + return new Int16Array(len); + } if (type === 'uint8c') { + return new Uint8ClampedArray(len); + } + return createRegularArray(type, len); + } + if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') { + return createTypedArrayFactory; + } + return createRegularArray; +}()); + +function createSizedArray(len) { + return Array.apply(null, { length: len }); +} + +let subframeEnabled = true; +let expressionsPlugin = null; +let idPrefix$1 = ''; +const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); +let _shouldRoundValues = false; +const bmPow = Math.pow; +const bmSqrt = Math.sqrt; +const bmFloor = Math.floor; +const bmMax = Math.max; +const bmMin = Math.min; + +const BMMath = {}; +(function () { + var propertyNames = ['abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atanh', 'atan2', 'ceil', 'cbrt', 'expm1', 'clz32', 'cos', 'cosh', 'exp', 'floor', 'fround', 'hypot', 'imul', 'log', 'log1p', 'log2', 'log10', 'max', 'min', 'pow', 'random', 'round', 'sign', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'E', 'LN10', 'LN2', 'LOG10E', 'LOG2E', 'PI', 'SQRT1_2', 'SQRT2']; + var i; + var len = propertyNames.length; + for (i = 0; i < len; i += 1) { + BMMath[propertyNames[i]] = Math[propertyNames[i]]; + } +}()); + +function ProjectInterface$1() { return {}; } +BMMath.random = Math.random; +BMMath.abs = function (val) { + var tOfVal = typeof val; + if (tOfVal === 'object' && val.length) { + var absArr = createSizedArray(val.length); + var i; + var len = val.length; + for (i = 0; i < len; i += 1) { + absArr[i] = Math.abs(val[i]); + } + return absArr; + } + return Math.abs(val); +}; +let defaultCurveSegments = 150; +const degToRads = Math.PI / 180; +const roundCorner = 0.5519; + +function roundValues(flag) { + _shouldRoundValues = !!flag; +} + +function bmRnd(value) { + if (_shouldRoundValues) { + return Math.round(value); + } + return value; +} + +function styleDiv(element) { + element.style.position = 'absolute'; + element.style.top = 0; + element.style.left = 0; + element.style.display = 'block'; + element.style.transformOrigin = '0 0'; + element.style.webkitTransformOrigin = '0 0'; + element.style.backfaceVisibility = 'visible'; + element.style.webkitBackfaceVisibility = 'visible'; + element.style.transformStyle = 'preserve-3d'; + element.style.webkitTransformStyle = 'preserve-3d'; + element.style.mozTransformStyle = 'preserve-3d'; +} + +function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) { + this.type = type; + this.currentTime = currentTime; + this.totalTime = totalTime; + this.direction = frameMultiplier < 0 ? -1 : 1; +} + +function BMCompleteEvent(type, frameMultiplier) { + this.type = type; + this.direction = frameMultiplier < 0 ? -1 : 1; +} + +function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) { + this.type = type; + this.currentLoop = currentLoop; + this.totalLoops = totalLoops; + this.direction = frameMultiplier < 0 ? -1 : 1; +} + +function BMSegmentStartEvent(type, firstFrame, totalFrames) { + this.type = type; + this.firstFrame = firstFrame; + this.totalFrames = totalFrames; +} + +function BMDestroyEvent(type, target) { + this.type = type; + this.target = target; +} + +function BMRenderFrameErrorEvent(nativeError, currentTime) { + this.type = 'renderFrameError'; + this.nativeError = nativeError; + this.currentTime = currentTime; +} + +function BMConfigErrorEvent(nativeError) { + this.type = 'configError'; + this.nativeError = nativeError; +} + +function BMAnimationConfigErrorEvent(type, nativeError) { + this.type = type; + this.nativeError = nativeError; +} + +const createElementID = (function () { + var _count = 0; + return function createID() { + _count += 1; + return idPrefix$1 + '__lottie_element_' + _count; + }; +}()); + +function HSVtoRGB(h, s, v) { + var r; + var g; + var b; + var i; + var f; + var p; + var q; + var t; + i = Math.floor(h * 6); + f = h * 6 - i; + p = v * (1 - s); + q = v * (1 - f * s); + t = v * (1 - (1 - f) * s); + switch (i % 6) { + case 0: r = v; g = t; b = p; break; + case 1: r = q; g = v; b = p; break; + case 2: r = p; g = v; b = t; break; + case 3: r = p; g = q; b = v; break; + case 4: r = t; g = p; b = v; break; + case 5: r = v; g = p; b = q; break; + default: break; + } + return [r, + g, + b]; +} + +function RGBtoHSV(r, g, b) { + var max = Math.max(r, g, b); + var min = Math.min(r, g, b); + var d = max - min; + var h; + var s = (max === 0 ? 0 : d / max); + var v = max / 255; + + switch (max) { + case min: h = 0; break; + case r: h = (g - b) + d * (g < b ? 6 : 0); h /= 6 * d; break; + case g: h = (b - r) + d * 2; h /= 6 * d; break; + case b: h = (r - g) + d * 4; h /= 6 * d; break; + default: break; + } + + return [ + h, + s, + v, + ]; +} + +function addSaturationToRGB(color, offset) { + var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255); + hsv[1] += offset; + if (hsv[1] > 1) { + hsv[1] = 1; + } else if (hsv[1] <= 0) { + hsv[1] = 0; + } + return HSVtoRGB(hsv[0], hsv[1], hsv[2]); +} + +function addBrightnessToRGB(color, offset) { + var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255); + hsv[2] += offset; + if (hsv[2] > 1) { + hsv[2] = 1; + } else if (hsv[2] < 0) { + hsv[2] = 0; + } + return HSVtoRGB(hsv[0], hsv[1], hsv[2]); +} + +function addHueToRGB(color, offset) { + var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255); + hsv[0] += offset / 360; + if (hsv[0] > 1) { + hsv[0] -= 1; + } else if (hsv[0] < 0) { + hsv[0] += 1; + } + return HSVtoRGB(hsv[0], hsv[1], hsv[2]); +} + +const rgbToHex = (function () { + var colorMap = []; + var i; + var hex; + for (i = 0; i < 256; i += 1) { + hex = i.toString(16); + colorMap[i] = hex.length === 1 ? '0' + hex : hex; + } + + return function (r, g, b) { + if (r < 0) { + r = 0; + } + if (g < 0) { + g = 0; + } + if (b < 0) { + b = 0; + } + return '#' + colorMap[r] + colorMap[g] + colorMap[b]; + }; +}()); + +const setSubframeEnabled = (flag) => { subframeEnabled = !!flag; }; +const getSubframeEnabled = () => subframeEnabled; +const setExpressionsPlugin = (value) => { expressionsPlugin = value; }; +const getExpressionsPlugin = () => expressionsPlugin; +const setDefaultCurveSegments = (value) => { defaultCurveSegments = value; }; +const getDefaultCurveSegments = () => defaultCurveSegments; +const setIdPrefix = (value) => { idPrefix$1 = value; }; +const getIdPrefix = () => idPrefix$1; + +function createNS(type) { + // return {appendChild:function(){},setAttribute:function(){},style:{}} + return document.createElementNS(svgNS, type); +} + +const dataManager = (function () { + var _counterId = 1; + var processes = []; + var workerFn; + var workerInstance; + var workerProxy = { + onmessage: function () { + + }, + postMessage: function (path) { + workerFn({ + data: path, + }); + }, + }; + var _workerSelf = { + postMessage: function (data) { + workerProxy.onmessage({ + data: data, + }); + }, + }; + function createWorker(fn) { + if (window.Worker && window.Blob && getWebWorker()) { + var blob = new Blob(['var _workerSelf = self; self.onmessage = ', fn.toString()], { type: 'text/javascript' }); + // var blob = new Blob(['self.onmessage = ', fn.toString()], { type: 'text/javascript' }); + var url = URL.createObjectURL(blob); + return new Worker(url); + } + workerFn = fn; + return workerProxy; + } + + function setupWorker() { + if (!workerInstance) { + workerInstance = createWorker(function workerStart(e) { + function dataFunctionManager() { + function completeLayers(layers, comps) { + var layerData; + var i; + var len = layers.length; + var j; + var jLen; + var k; + var kLen; + for (i = 0; i < len; i += 1) { + layerData = layers[i]; + if (('ks' in layerData) && !layerData.completed) { + layerData.completed = true; + if (layerData.tt) { + layers[i - 1].td = layerData.tt; + } + if (layerData.hasMask) { + var maskProps = layerData.masksProperties; + jLen = maskProps.length; + for (j = 0; j < jLen; j += 1) { + if (maskProps[j].pt.k.i) { + convertPathsToAbsoluteValues(maskProps[j].pt.k); + } else { + kLen = maskProps[j].pt.k.length; + for (k = 0; k < kLen; k += 1) { + if (maskProps[j].pt.k[k].s) { + convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]); + } + if (maskProps[j].pt.k[k].e) { + convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]); + } + } + } + } + } + if (layerData.ty === 0) { + layerData.layers = findCompLayers(layerData.refId, comps); + completeLayers(layerData.layers, comps); + } else if (layerData.ty === 4) { + completeShapes(layerData.shapes); + } else if (layerData.ty === 5) { + completeText(layerData); + } + } + } + } + + function completeChars(chars, assets) { + if (chars) { + var i = 0; + var len = chars.length; + for (i = 0; i < len; i += 1) { + if (chars[i].t === 1) { + // var compData = findComp(chars[i].data.refId, assets); + chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); + // chars[i].data.ip = 0; + // chars[i].data.op = 99999; + // chars[i].data.st = 0; + // chars[i].data.sr = 1; + // chars[i].w = compData.w; + // chars[i].data.ks = { + // a: { k: [0, 0, 0], a: 0 }, + // p: { k: [0, -compData.h, 0], a: 0 }, + // r: { k: 0, a: 0 }, + // s: { k: [100, 100], a: 0 }, + // o: { k: 100, a: 0 }, + // }; + completeLayers(chars[i].data.layers, assets); + } + } + } + } + + function findComp(id, comps) { + var i = 0; + var len = comps.length; + while (i < len) { + if (comps[i].id === id) { + return comps[i]; + } + i += 1; + } + return null; + } + + function findCompLayers(id, comps) { + var comp = findComp(id, comps); + if (comp) { + if (!comp.layers.__used) { + comp.layers.__used = true; + return comp.layers; + } + return JSON.parse(JSON.stringify(comp.layers)); + } + return null; + } + + function completeShapes(arr) { + var i; + var len = arr.length; + var j; + var jLen; + for (i = len - 1; i >= 0; i -= 1) { + if (arr[i].ty === 'sh') { + if (arr[i].ks.k.i) { + convertPathsToAbsoluteValues(arr[i].ks.k); + } else { + jLen = arr[i].ks.k.length; + for (j = 0; j < jLen; j += 1) { + if (arr[i].ks.k[j].s) { + convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]); + } + if (arr[i].ks.k[j].e) { + convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]); + } + } + } + } else if (arr[i].ty === 'gr') { + completeShapes(arr[i].it); + } + } + } + + function convertPathsToAbsoluteValues(path) { + var i; + var len = path.i.length; + for (i = 0; i < len; i += 1) { + path.i[i][0] += path.v[i][0]; + path.i[i][1] += path.v[i][1]; + path.o[i][0] += path.v[i][0]; + path.o[i][1] += path.v[i][1]; + } + } + + function checkVersion(minimum, animVersionString) { + var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100]; + if (minimum[0] > animVersion[0]) { + return true; + } if (animVersion[0] > minimum[0]) { + return false; + } + if (minimum[1] > animVersion[1]) { + return true; + } if (animVersion[1] > minimum[1]) { + return false; + } + if (minimum[2] > animVersion[2]) { + return true; + } if (animVersion[2] > minimum[2]) { + return false; + } + return null; + } + + var checkText = (function () { + var minimumVersion = [4, 4, 14]; + + function updateTextLayer(textLayer) { + var documentData = textLayer.t.d; + textLayer.t.d = { + k: [ + { + s: documentData, + t: 0, + }, + ], + }; + } + + function iterateLayers(layers) { + var i; + var len = layers.length; + for (i = 0; i < len; i += 1) { + if (layers[i].ty === 5) { + updateTextLayer(layers[i]); + } + } + } + + return function (animationData) { + if (checkVersion(minimumVersion, animationData.v)) { + iterateLayers(animationData.layers); + if (animationData.assets) { + var i; + var len = animationData.assets.length; + for (i = 0; i < len; i += 1) { + if (animationData.assets[i].layers) { + iterateLayers(animationData.assets[i].layers); + } + } + } + } + }; + }()); + + var checkChars = (function () { + var minimumVersion = [4, 7, 99]; + return function (animationData) { + if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) { + var i; + var len = animationData.chars.length; + for (i = 0; i < len; i += 1) { + var charData = animationData.chars[i]; + if (charData.data && charData.data.shapes) { + completeShapes(charData.data.shapes); + charData.data.ip = 0; + charData.data.op = 99999; + charData.data.st = 0; + charData.data.sr = 1; + charData.data.ks = { + p: { k: [0, 0], a: 0 }, + s: { k: [100, 100], a: 0 }, + a: { k: [0, 0], a: 0 }, + r: { k: 0, a: 0 }, + o: { k: 100, a: 0 }, + }; + if (!animationData.chars[i].t) { + charData.data.shapes.push( + { + ty: 'no', + } + ); + charData.data.shapes[0].it.push( + { + p: { k: [0, 0], a: 0 }, + s: { k: [100, 100], a: 0 }, + a: { k: [0, 0], a: 0 }, + r: { k: 0, a: 0 }, + o: { k: 100, a: 0 }, + sk: { k: 0, a: 0 }, + sa: { k: 0, a: 0 }, + ty: 'tr', + } + ); + } + } + } + } + }; + }()); + + var checkPathProperties = (function () { + var minimumVersion = [5, 7, 15]; + + function updateTextLayer(textLayer) { + var pathData = textLayer.t.p; + if (typeof pathData.a === 'number') { + pathData.a = { + a: 0, + k: pathData.a, + }; + } + if (typeof pathData.p === 'number') { + pathData.p = { + a: 0, + k: pathData.p, + }; + } + if (typeof pathData.r === 'number') { + pathData.r = { + a: 0, + k: pathData.r, + }; + } + } + + function iterateLayers(layers) { + var i; + var len = layers.length; + for (i = 0; i < len; i += 1) { + if (layers[i].ty === 5) { + updateTextLayer(layers[i]); + } + } + } + + return function (animationData) { + if (checkVersion(minimumVersion, animationData.v)) { + iterateLayers(animationData.layers); + if (animationData.assets) { + var i; + var len = animationData.assets.length; + for (i = 0; i < len; i += 1) { + if (animationData.assets[i].layers) { + iterateLayers(animationData.assets[i].layers); + } + } + } + } + }; + }()); + + var checkColors = (function () { + var minimumVersion = [4, 1, 9]; + + function iterateShapes(shapes) { + var i; + var len = shapes.length; + var j; + var jLen; + for (i = 0; i < len; i += 1) { + if (shapes[i].ty === 'gr') { + iterateShapes(shapes[i].it); + } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') { + if (shapes[i].c.k && shapes[i].c.k[0].i) { + jLen = shapes[i].c.k.length; + for (j = 0; j < jLen; j += 1) { + if (shapes[i].c.k[j].s) { + shapes[i].c.k[j].s[0] /= 255; + shapes[i].c.k[j].s[1] /= 255; + shapes[i].c.k[j].s[2] /= 255; + shapes[i].c.k[j].s[3] /= 255; + } + if (shapes[i].c.k[j].e) { + shapes[i].c.k[j].e[0] /= 255; + shapes[i].c.k[j].e[1] /= 255; + shapes[i].c.k[j].e[2] /= 255; + shapes[i].c.k[j].e[3] /= 255; + } + } + } else { + shapes[i].c.k[0] /= 255; + shapes[i].c.k[1] /= 255; + shapes[i].c.k[2] /= 255; + shapes[i].c.k[3] /= 255; + } + } + } + } + + function iterateLayers(layers) { + var i; + var len = layers.length; + for (i = 0; i < len; i += 1) { + if (layers[i].ty === 4) { + iterateShapes(layers[i].shapes); + } + } + } + + return function (animationData) { + if (checkVersion(minimumVersion, animationData.v)) { + iterateLayers(animationData.layers); + if (animationData.assets) { + var i; + var len = animationData.assets.length; + for (i = 0; i < len; i += 1) { + if (animationData.assets[i].layers) { + iterateLayers(animationData.assets[i].layers); + } + } + } + } + }; + }()); + + var checkShapes = (function () { + var minimumVersion = [4, 4, 18]; + + function completeClosingShapes(arr) { + var i; + var len = arr.length; + var j; + var jLen; + for (i = len - 1; i >= 0; i -= 1) { + if (arr[i].ty === 'sh') { + if (arr[i].ks.k.i) { + arr[i].ks.k.c = arr[i].closed; + } else { + jLen = arr[i].ks.k.length; + for (j = 0; j < jLen; j += 1) { + if (arr[i].ks.k[j].s) { + arr[i].ks.k[j].s[0].c = arr[i].closed; + } + if (arr[i].ks.k[j].e) { + arr[i].ks.k[j].e[0].c = arr[i].closed; + } + } + } + } else if (arr[i].ty === 'gr') { + completeClosingShapes(arr[i].it); + } + } + } + + function iterateLayers(layers) { + var layerData; + var i; + var len = layers.length; + var j; + var jLen; + var k; + var kLen; + for (i = 0; i < len; i += 1) { + layerData = layers[i]; + if (layerData.hasMask) { + var maskProps = layerData.masksProperties; + jLen = maskProps.length; + for (j = 0; j < jLen; j += 1) { + if (maskProps[j].pt.k.i) { + maskProps[j].pt.k.c = maskProps[j].cl; + } else { + kLen = maskProps[j].pt.k.length; + for (k = 0; k < kLen; k += 1) { + if (maskProps[j].pt.k[k].s) { + maskProps[j].pt.k[k].s[0].c = maskProps[j].cl; + } + if (maskProps[j].pt.k[k].e) { + maskProps[j].pt.k[k].e[0].c = maskProps[j].cl; + } + } + } + } + } + if (layerData.ty === 4) { + completeClosingShapes(layerData.shapes); + } + } + } + + return function (animationData) { + if (checkVersion(minimumVersion, animationData.v)) { + iterateLayers(animationData.layers); + if (animationData.assets) { + var i; + var len = animationData.assets.length; + for (i = 0; i < len; i += 1) { + if (animationData.assets[i].layers) { + iterateLayers(animationData.assets[i].layers); + } + } + } + } + }; + }()); + + function completeData(animationData) { + if (animationData.__complete) { + return; + } + checkColors(animationData); + checkText(animationData); + checkChars(animationData); + checkPathProperties(animationData); + checkShapes(animationData); + completeLayers(animationData.layers, animationData.assets); + completeChars(animationData.chars, animationData.assets); + animationData.__complete = true; + } + + function completeText(data) { + if (data.t.a.length === 0 && !('m' in data.t.p)) { + // data.singleShape = true; + } + } + + var moduleOb = {}; + moduleOb.completeData = completeData; + moduleOb.checkColors = checkColors; + moduleOb.checkChars = checkChars; + moduleOb.checkPathProperties = checkPathProperties; + moduleOb.checkShapes = checkShapes; + moduleOb.completeLayers = completeLayers; + + return moduleOb; + } + if (!_workerSelf.dataManager) { + _workerSelf.dataManager = dataFunctionManager(); + } + + if (!_workerSelf.assetLoader) { + _workerSelf.assetLoader = (function () { + function formatResponse(xhr) { + // using typeof doubles the time of execution of this method, + // so if available, it's better to use the header to validate the type + var contentTypeHeader = xhr.getResponseHeader('content-type'); + if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) { + return xhr.response; + } + if (xhr.response && typeof xhr.response === 'object') { + return xhr.response; + } if (xhr.response && typeof xhr.response === 'string') { + return JSON.parse(xhr.response); + } if (xhr.responseText) { + return JSON.parse(xhr.responseText); + } + return null; + } + + function loadAsset(path, fullPath, callback, errorCallback) { + var response; + var xhr = new XMLHttpRequest(); + // set responseType after calling open or IE will break. + try { + // This crashes on Android WebView prior to KitKat + xhr.responseType = 'json'; + } catch (err) {} // eslint-disable-line no-empty + xhr.onreadystatechange = function () { + if (xhr.readyState === 4) { + if (xhr.status === 200) { + response = formatResponse(xhr); + callback(response); + } else { + try { + response = formatResponse(xhr); + callback(response); + } catch (err) { + if (errorCallback) { + errorCallback(err); + } + } + } + } + }; + try { + xhr.open('GET', path, true); + } catch (error) { + xhr.open('GET', fullPath + '/' + path, true); + } + xhr.send(); + } + return { + load: loadAsset, + }; + }()); + } + + if (e.data.type === 'loadAnimation') { + _workerSelf.assetLoader.load( + e.data.path, + e.data.fullPath, + function (data) { + _workerSelf.dataManager.completeData(data); + _workerSelf.postMessage({ + id: e.data.id, + payload: data, + status: 'success', + }); + }, + function () { + _workerSelf.postMessage({ + id: e.data.id, + status: 'error', + }); + } + ); + } else if (e.data.type === 'complete') { + var animation = e.data.animation; + _workerSelf.dataManager.completeData(animation); + _workerSelf.postMessage({ + id: e.data.id, + payload: animation, + status: 'success', + }); + } else if (e.data.type === 'loadData') { + _workerSelf.assetLoader.load( + e.data.path, + e.data.fullPath, + function (data) { + _workerSelf.postMessage({ + id: e.data.id, + payload: data, + status: 'success', + }); + }, + function () { + _workerSelf.postMessage({ + id: e.data.id, + status: 'error', + }); + } + ); + } + }); + + workerInstance.onmessage = function (event) { + var data = event.data; + var id = data.id; + var process = processes[id]; + processes[id] = null; + if (data.status === 'success') { + process.onComplete(data.payload); + } else if (process.onError) { + process.onError(); + } + }; + } + } + + function createProcess(onComplete, onError) { + _counterId += 1; + var id = 'processId_' + _counterId; + processes[id] = { + onComplete: onComplete, + onError: onError, + }; + return id; + } + + function loadAnimation(path, onComplete, onError) { + setupWorker(); + var processId = createProcess(onComplete, onError); + workerInstance.postMessage({ + type: 'loadAnimation', + path: path, + fullPath: window.location.origin + window.location.pathname, + id: processId, + }); + } + + function loadData(path, onComplete, onError) { + setupWorker(); + var processId = createProcess(onComplete, onError); + workerInstance.postMessage({ + type: 'loadData', + path: path, + fullPath: window.location.origin + window.location.pathname, + id: processId, + }); + } + + function completeAnimation(anim, onComplete, onError) { + setupWorker(); + var processId = createProcess(onComplete, onError); + workerInstance.postMessage({ + type: 'complete', + animation: anim, + id: processId, + }); + } + + return { + loadAnimation: loadAnimation, + loadData: loadData, + completeAnimation: completeAnimation, + }; +}()); + +const ImagePreloader = (function () { + var proxyImage = (function () { + var canvas = createTag('canvas'); + canvas.width = 1; + canvas.height = 1; + var ctx = canvas.getContext('2d'); + ctx.fillStyle = 'rgba(0,0,0,0)'; + ctx.fillRect(0, 0, 1, 1); + return canvas; + }()); + + function imageLoaded() { + this.loadedAssets += 1; + if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) { + if (this.imagesLoadedCb) { + this.imagesLoadedCb(null); + } + } + } + function footageLoaded() { + this.loadedFootagesCount += 1; + if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) { + if (this.imagesLoadedCb) { + this.imagesLoadedCb(null); + } + } + } + + function getAssetsPath(assetData, assetsPath, originalPath) { + var path = ''; + if (assetData.e) { + path = assetData.p; + } else if (assetsPath) { + var imagePath = assetData.p; + if (imagePath.indexOf('images/') !== -1) { + imagePath = imagePath.split('/')[1]; + } + path = assetsPath + imagePath; + } else { + path = originalPath; + path += assetData.u ? assetData.u : ''; + path += assetData.p; + } + return path; + } + + function testImageLoaded(img) { + var _count = 0; + var intervalId = setInterval(function () { + var box = img.getBBox(); + if (box.width || _count > 500) { + this._imageLoaded(); + clearInterval(intervalId); + } + _count += 1; + }.bind(this), 50); + } + + function createImageData(assetData) { + var path = getAssetsPath(assetData, this.assetsPath, this.path); + var img = createNS('image'); + if (isSafari) { + this.testImageLoaded(img); + } else { + img.addEventListener('load', this._imageLoaded, false); + } + img.addEventListener('error', function () { + ob.img = proxyImage; + this._imageLoaded(); + }.bind(this), false); + img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path); + if (this._elementHelper.append) { + this._elementHelper.append(img); + } else { + this._elementHelper.appendChild(img); + } + var ob = { + img: img, + assetData: assetData, + }; + return ob; + } + + function createImgData(assetData) { + var path = getAssetsPath(assetData, this.assetsPath, this.path); + var img = createTag('img'); + img.crossOrigin = 'anonymous'; + img.addEventListener('load', this._imageLoaded, false); + img.addEventListener('error', function () { + ob.img = proxyImage; + this._imageLoaded(); + }.bind(this), false); + img.src = path; + var ob = { + img: img, + assetData: assetData, + }; + return ob; + } + + function createFootageData(data) { + var ob = { + assetData: data, + }; + var path = getAssetsPath(data, this.assetsPath, this.path); + dataManager.loadData(path, function (footageData) { + ob.img = footageData; + this._footageLoaded(); + }.bind(this), function () { + ob.img = {}; + this._footageLoaded(); + }.bind(this)); + return ob; + } + + function loadAssets(assets, cb) { + this.imagesLoadedCb = cb; + var i; + var len = assets.length; + for (i = 0; i < len; i += 1) { + if (!assets[i].layers) { + if (!assets[i].t || assets[i].t === 'seq') { + this.totalImages += 1; + this.images.push(this._createImageData(assets[i])); + } else if (assets[i].t === 3) { + this.totalFootages += 1; + this.images.push(this.createFootageData(assets[i])); + } + } + } + } + + function setPath(path) { + this.path = path || ''; + } + + function setAssetsPath(path) { + this.assetsPath = path || ''; + } + + function getAsset(assetData) { + var i = 0; + var len = this.images.length; + while (i < len) { + if (this.images[i].assetData === assetData) { + return this.images[i].img; + } + i += 1; + } + return null; + } + + function destroy() { + this.imagesLoadedCb = null; + this.images.length = 0; + } + + function loadedImages() { + return this.totalImages === this.loadedAssets; + } + + function loadedFootages() { + return this.totalFootages === this.loadedFootagesCount; + } + + function setCacheType(type, elementHelper) { + if (type === 'svg') { + this._elementHelper = elementHelper; + this._createImageData = this.createImageData.bind(this); + } else { + this._createImageData = this.createImgData.bind(this); + } + } + + function ImagePreloaderFactory() { + this._imageLoaded = imageLoaded.bind(this); + this._footageLoaded = footageLoaded.bind(this); + this.testImageLoaded = testImageLoaded.bind(this); + this.createFootageData = createFootageData.bind(this); + this.assetsPath = ''; + this.path = ''; + this.totalImages = 0; + this.totalFootages = 0; + this.loadedAssets = 0; + this.loadedFootagesCount = 0; + this.imagesLoadedCb = null; + this.images = []; + } + + ImagePreloaderFactory.prototype = { + loadAssets: loadAssets, + setAssetsPath: setAssetsPath, + setPath: setPath, + loadedImages: loadedImages, + loadedFootages: loadedFootages, + destroy: destroy, + getAsset: getAsset, + createImgData: createImgData, + createImageData: createImageData, + imageLoaded: imageLoaded, + footageLoaded: footageLoaded, + setCacheType: setCacheType, + }; + + return ImagePreloaderFactory; +}()); + +function BaseEvent() {} +BaseEvent.prototype = { + triggerEvent: function (eventName, args) { + if (this._cbs[eventName]) { + var callbacks = this._cbs[eventName]; + for (var i = 0; i < callbacks.length; i += 1) { + callbacks[i](args); + } + } + }, + addEventListener: function (eventName, callback) { + if (!this._cbs[eventName]) { + this._cbs[eventName] = []; + } + this._cbs[eventName].push(callback); + + return function () { + this.removeEventListener(eventName, callback); + }.bind(this); + }, + removeEventListener: function (eventName, callback) { + if (!callback) { + this._cbs[eventName] = null; + } else if (this._cbs[eventName]) { + var i = 0; + var len = this._cbs[eventName].length; + while (i < len) { + if (this._cbs[eventName][i] === callback) { + this._cbs[eventName].splice(i, 1); + i -= 1; + len -= 1; + } + i += 1; + } + if (!this._cbs[eventName].length) { + this._cbs[eventName] = null; + } + } + }, +}; + +const markerParser = ( + + function () { + function parsePayloadLines(payload) { + var lines = payload.split('\r\n'); + var keys = {}; + var line; + var keysCount = 0; + for (var i = 0; i < lines.length; i += 1) { + line = lines[i].split(':'); + if (line.length === 2) { + keys[line[0]] = line[1].trim(); + keysCount += 1; + } + } + if (keysCount === 0) { + throw new Error(); + } + return keys; + } + + return function (_markers) { + var markers = []; + for (var i = 0; i < _markers.length; i += 1) { + var _marker = _markers[i]; + var markerData = { + time: _marker.tm, + duration: _marker.dr, + }; + try { + markerData.payload = JSON.parse(_markers[i].cm); + } catch (_) { + try { + markerData.payload = parsePayloadLines(_markers[i].cm); + } catch (__) { + markerData.payload = { + name: _markers[i].cm, + }; + } + } + markers.push(markerData); + } + return markers; + }; + }()); + +const ProjectInterface = (function () { + function registerComposition(comp) { + this.compositions.push(comp); + } + + return function () { + function _thisProjectFunction(name) { + var i = 0; + var len = this.compositions.length; + while (i < len) { + if (this.compositions[i].data && this.compositions[i].data.nm === name) { + if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) { + this.compositions[i].prepareFrame(this.currentFrame); + } + return this.compositions[i].compInterface; + } + i += 1; + } + return null; + } + + _thisProjectFunction.compositions = []; + _thisProjectFunction.currentFrame = 0; + + _thisProjectFunction.registerComposition = registerComposition; + + return _thisProjectFunction; + }; +}()); + +const renderers = {}; + +const registerRenderer = (key, value) => { + renderers[key] = value; +}; + +function getRenderer(key) { + return renderers[key]; +} + +const AnimationItem = function () { + this._cbs = []; + this.name = ''; + this.path = ''; + this.isLoaded = false; + this.currentFrame = 0; + this.currentRawFrame = 0; + this.firstFrame = 0; + this.totalFrames = 0; + this.frameRate = 0; + this.frameMult = 0; + this.playSpeed = 1; + this.playDirection = 1; + this.playCount = 0; + this.animationData = {}; + this.assets = []; + this.isPaused = true; + this.autoplay = false; + this.loop = true; + this.renderer = null; + this.animationID = createElementID(); + this.assetsPath = ''; + this.timeCompleted = 0; + this.segmentPos = 0; + this.isSubframeEnabled = getSubframeEnabled(); + this.segments = []; + this._idle = true; + this._completedLoop = false; + this.projectInterface = ProjectInterface(); + this.imagePreloader = new ImagePreloader(); + this.audioController = audioControllerFactory(); + this.markers = []; + this.configAnimation = this.configAnimation.bind(this); + this.onSetupError = this.onSetupError.bind(this); + this.onSegmentComplete = this.onSegmentComplete.bind(this); + this.drawnFrameEvent = new BMEnterFrameEvent('drawnFrame', 0, 0, 0); +}; + +extendPrototype([BaseEvent], AnimationItem); + +AnimationItem.prototype.setParams = function (params) { + if (params.wrapper || params.container) { + this.wrapper = params.wrapper || params.container; + } + var animType = 'svg'; + if (params.animType) { + animType = params.animType; + } else if (params.renderer) { + animType = params.renderer; + } + const RendererClass = getRenderer(animType); + this.renderer = new RendererClass(this, params.rendererSettings); + this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs); + this.renderer.setProjectInterface(this.projectInterface); + this.animType = animType; + if (params.loop === '' + || params.loop === null + || params.loop === undefined + || params.loop === true) { + this.loop = true; + } else if (params.loop === false) { + this.loop = false; + } else { + this.loop = parseInt(params.loop, 10); + } + this.autoplay = 'autoplay' in params ? params.autoplay : true; + this.name = params.name ? params.name : ''; + this.autoloadSegments = Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true; + this.assetsPath = params.assetsPath; + this.initialSegment = params.initialSegment; + if (params.audioFactory) { + this.audioController.setAudioFactory(params.audioFactory); + } + if (params.animationData) { + this.setupAnimation(params.animationData); + } else if (params.path) { + if (params.path.lastIndexOf('\\') !== -1) { + this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1); + } else { + this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1); + } + this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1); + this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json')); + dataManager.loadAnimation( + params.path, + this.configAnimation, + this.onSetupError + ); + } +}; + +AnimationItem.prototype.onSetupError = function () { + this.trigger('data_failed'); +}; + +AnimationItem.prototype.setupAnimation = function (data) { + dataManager.completeAnimation( + data, + this.configAnimation + ); +}; + +AnimationItem.prototype.setData = function (wrapper, animationData) { + if (animationData) { + if (typeof animationData !== 'object') { + animationData = JSON.parse(animationData); + } + } + var params = { + wrapper: wrapper, + animationData: animationData, + }; + var wrapperAttributes = wrapper.attributes; + + params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-animation-path').value + : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-path').value + : wrapperAttributes.getNamedItem('bm-path') + ? wrapperAttributes.getNamedItem('bm-path').value + : ''; + params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-anim-type').value + : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-type').value + : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('bm-type').value + : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-renderer').value + : wrapperAttributes.getNamedItem('bm-renderer') + ? wrapperAttributes.getNamedItem('bm-renderer').value + : 'canvas'; + + var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-anim-loop').value + : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-loop').value + : wrapperAttributes.getNamedItem('bm-loop') + ? wrapperAttributes.getNamedItem('bm-loop').value + : ''; + if (loop === 'false') { + params.loop = false; + } else if (loop === 'true') { + params.loop = true; + } else if (loop !== '') { + params.loop = parseInt(loop, 10); + } + var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-anim-autoplay').value + : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-autoplay').value + : wrapperAttributes.getNamedItem('bm-autoplay') + ? wrapperAttributes.getNamedItem('bm-autoplay').value + : true; + params.autoplay = autoplay !== 'false'; + + params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-name').value + : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-name').value + : wrapperAttributes.getNamedItem('bm-name') + ? wrapperAttributes.getNamedItem('bm-name').value + : ''; + var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-anim-prerender').value + : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-prerender').value + : wrapperAttributes.getNamedItem('bm-prerender') + ? wrapperAttributes.getNamedItem('bm-prerender').value + : ''; + + if (prerender === 'false') { + params.prerender = false; + } + this.setParams(params); +}; + +AnimationItem.prototype.includeLayers = function (data) { + if (data.op > this.animationData.op) { + this.animationData.op = data.op; + this.totalFrames = Math.floor(data.op - this.animationData.ip); + } + var layers = this.animationData.layers; + var i; + var len = layers.length; + var newLayers = data.layers; + var j; + var jLen = newLayers.length; + for (j = 0; j < jLen; j += 1) { + i = 0; + while (i < len) { + if (layers[i].id === newLayers[j].id) { + layers[i] = newLayers[j]; + break; + } + i += 1; + } + } + if (data.chars || data.fonts) { + this.renderer.globalData.fontManager.addChars(data.chars); + this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs); + } + if (data.assets) { + len = data.assets.length; + for (i = 0; i < len; i += 1) { + this.animationData.assets.push(data.assets[i]); + } + } + this.animationData.__complete = false; + dataManager.completeAnimation( + this.animationData, + this.onSegmentComplete + ); +}; + +AnimationItem.prototype.onSegmentComplete = function (data) { + this.animationData = data; + var expressionsPlugin = getExpressionsPlugin(); + if (expressionsPlugin) { + expressionsPlugin.initExpressions(this); + } + this.loadNextSegment(); +}; + +AnimationItem.prototype.loadNextSegment = function () { + var segments = this.animationData.segments; + if (!segments || segments.length === 0 || !this.autoloadSegments) { + this.trigger('data_ready'); + this.timeCompleted = this.totalFrames; + return; + } + var segment = segments.shift(); + this.timeCompleted = segment.time * this.frameRate; + var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json'; + this.segmentPos += 1; + dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () { + this.trigger('data_failed'); + }.bind(this)); +}; + +AnimationItem.prototype.loadSegments = function () { + var segments = this.animationData.segments; + if (!segments) { + this.timeCompleted = this.totalFrames; + } + this.loadNextSegment(); +}; + +AnimationItem.prototype.imagesLoaded = function () { + this.trigger('loaded_images'); + this.checkLoaded(); +}; + +AnimationItem.prototype.preloadImages = function () { + this.imagePreloader.setAssetsPath(this.assetsPath); + this.imagePreloader.setPath(this.path); + this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this)); +}; + +AnimationItem.prototype.configAnimation = function (animData) { + if (!this.renderer) { + return; + } + try { + this.animationData = animData; + if (this.initialSegment) { + this.totalFrames = Math.floor(this.initialSegment[1] - this.initialSegment[0]); + this.firstFrame = Math.round(this.initialSegment[0]); + } else { + this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip); + this.firstFrame = Math.round(this.animationData.ip); + } + this.renderer.configAnimation(animData); + if (!animData.assets) { + animData.assets = []; + } + + this.assets = this.animationData.assets; + this.frameRate = this.animationData.fr; + this.frameMult = this.animationData.fr / 1000; + this.renderer.searchExtraCompositions(animData.assets); + this.markers = markerParser(animData.markers || []); + this.trigger('config_ready'); + this.preloadImages(); + this.loadSegments(); + this.updaFrameModifier(); + this.waitForFontsLoaded(); + if (this.isPaused) { + this.audioController.pause(); + } + } catch (error) { + this.triggerConfigError(error); + } +}; + +AnimationItem.prototype.waitForFontsLoaded = function () { + if (!this.renderer) { + return; + } + if (this.renderer.globalData.fontManager.isLoaded) { + this.checkLoaded(); + } else { + setTimeout(this.waitForFontsLoaded.bind(this), 20); + } +}; + +AnimationItem.prototype.checkLoaded = function () { + if (!this.isLoaded + && this.renderer.globalData.fontManager.isLoaded + && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') + && (this.imagePreloader.loadedFootages()) + ) { + this.isLoaded = true; + var expressionsPlugin = getExpressionsPlugin(); + if (expressionsPlugin) { + expressionsPlugin.initExpressions(this); + } + this.renderer.initItems(); + setTimeout(function () { + this.trigger('DOMLoaded'); + }.bind(this), 0); + this.gotoFrame(); + if (this.autoplay) { + this.play(); + } + } +}; + +AnimationItem.prototype.resize = function () { + this.renderer.updateContainerSize(); +}; + +AnimationItem.prototype.setSubframe = function (flag) { + this.isSubframeEnabled = !!flag; +}; + +AnimationItem.prototype.gotoFrame = function () { + this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame; // eslint-disable-line no-bitwise + + if (this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted) { + this.currentFrame = this.timeCompleted; + } + this.trigger('enterFrame'); + this.renderFrame(); + this.trigger('drawnFrame'); +}; + +AnimationItem.prototype.renderFrame = function () { + if (this.isLoaded === false || !this.renderer) { + return; + } + try { + this.renderer.renderFrame(this.currentFrame + this.firstFrame); + } catch (error) { + this.triggerRenderFrameError(error); + } +}; + +AnimationItem.prototype.play = function (name) { + if (name && this.name !== name) { + return; + } + if (this.isPaused === true) { + this.isPaused = false; + this.trigger('_pause'); + this.audioController.resume(); + if (this._idle) { + this._idle = false; + this.trigger('_active'); + } + } +}; + +AnimationItem.prototype.pause = function (name) { + if (name && this.name !== name) { + return; + } + if (this.isPaused === false) { + this.isPaused = true; + this.trigger('_play'); + this._idle = true; + this.trigger('_idle'); + this.audioController.pause(); + } +}; + +AnimationItem.prototype.togglePause = function (name) { + if (name && this.name !== name) { + return; + } + if (this.isPaused === true) { + this.play(); + } else { + this.pause(); + } +}; + +AnimationItem.prototype.stop = function (name) { + if (name && this.name !== name) { + return; + } + this.pause(); + this.playCount = 0; + this._completedLoop = false; + this.setCurrentRawFrameValue(0); +}; + +AnimationItem.prototype.getMarkerData = function (markerName) { + var marker; + for (var i = 0; i < this.markers.length; i += 1) { + marker = this.markers[i]; + if (marker.payload && marker.payload.name === markerName) { + return marker; + } + } + return null; +}; + +AnimationItem.prototype.goToAndStop = function (value, isFrame, name) { + if (name && this.name !== name) { + return; + } + var numValue = Number(value); + if (isNaN(numValue)) { + var marker = this.getMarkerData(value); + if (marker) { + this.goToAndStop(marker.time, true); + } + } else if (isFrame) { + this.setCurrentRawFrameValue(value); + } else { + this.setCurrentRawFrameValue(value * this.frameModifier); + } + this.pause(); +}; + +AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) { + if (name && this.name !== name) { + return; + } + var numValue = Number(value); + if (isNaN(numValue)) { + var marker = this.getMarkerData(value); + if (marker) { + if (!marker.duration) { + this.goToAndStop(marker.time, true); + } else { + this.playSegments([marker.time, marker.time + marker.duration], true); + } + } + } else { + this.goToAndStop(numValue, isFrame, name); + } + this.play(); +}; + +AnimationItem.prototype.advanceTime = function (value) { + if (this.isPaused === true || this.isLoaded === false) { + return; + } + var nextValue = this.currentRawFrame + value * this.frameModifier; + var _isComplete = false; + // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations. + // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop. + if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) { + if (!this.loop || this.playCount === this.loop) { + if (!this.checkSegments(nextValue > this.totalFrames ? nextValue % this.totalFrames : 0)) { + _isComplete = true; + nextValue = this.totalFrames - 1; + } + } else if (nextValue >= this.totalFrames) { + this.playCount += 1; + if (!this.checkSegments(nextValue % this.totalFrames)) { + this.setCurrentRawFrameValue(nextValue % this.totalFrames); + this._completedLoop = true; + this.trigger('loopComplete'); + } + } else { + this.setCurrentRawFrameValue(nextValue); + } + } else if (nextValue < 0) { + if (!this.checkSegments(nextValue % this.totalFrames)) { + if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) { // eslint-disable-line no-plusplus + this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames)); + if (!this._completedLoop) { + this._completedLoop = true; + } else { + this.trigger('loopComplete'); + } + } else { + _isComplete = true; + nextValue = 0; + } + } + } else { + this.setCurrentRawFrameValue(nextValue); + } + if (_isComplete) { + this.setCurrentRawFrameValue(nextValue); + this.pause(); + this.trigger('complete'); + } +}; + +AnimationItem.prototype.adjustSegment = function (arr, offset) { + this.playCount = 0; + if (arr[1] < arr[0]) { + if (this.frameModifier > 0) { + if (this.playSpeed < 0) { + this.setSpeed(-this.playSpeed); + } else { + this.setDirection(-1); + } + } + this.totalFrames = arr[0] - arr[1]; + this.timeCompleted = this.totalFrames; + this.firstFrame = arr[1]; + this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset); + } else if (arr[1] > arr[0]) { + if (this.frameModifier < 0) { + if (this.playSpeed < 0) { + this.setSpeed(-this.playSpeed); + } else { + this.setDirection(1); + } + } + this.totalFrames = arr[1] - arr[0]; + this.timeCompleted = this.totalFrames; + this.firstFrame = arr[0]; + this.setCurrentRawFrameValue(0.001 + offset); + } + this.trigger('segmentStart'); +}; +AnimationItem.prototype.setSegment = function (init, end) { + var pendingFrame = -1; + if (this.isPaused) { + if (this.currentRawFrame + this.firstFrame < init) { + pendingFrame = init; + } else if (this.currentRawFrame + this.firstFrame > end) { + pendingFrame = end - init; + } + } + + this.firstFrame = init; + this.totalFrames = end - init; + this.timeCompleted = this.totalFrames; + if (pendingFrame !== -1) { + this.goToAndStop(pendingFrame, true); + } +}; + +AnimationItem.prototype.playSegments = function (arr, forceFlag) { + if (forceFlag) { + this.segments.length = 0; + } + if (typeof arr[0] === 'object') { + var i; + var len = arr.length; + for (i = 0; i < len; i += 1) { + this.segments.push(arr[i]); + } + } else { + this.segments.push(arr); + } + if (this.segments.length && forceFlag) { + this.adjustSegment(this.segments.shift(), 0); + } + if (this.isPaused) { + this.play(); + } +}; + +AnimationItem.prototype.resetSegments = function (forceFlag) { + this.segments.length = 0; + this.segments.push([this.animationData.ip, this.animationData.op]); + if (forceFlag) { + this.checkSegments(0); + } +}; +AnimationItem.prototype.checkSegments = function (offset) { + if (this.segments.length) { + this.adjustSegment(this.segments.shift(), offset); + return true; + } + return false; +}; + +AnimationItem.prototype.destroy = function (name) { + if ((name && this.name !== name) || !this.renderer) { + return; + } + this.renderer.destroy(); + this.imagePreloader.destroy(); + this.trigger('destroy'); + this._cbs = null; + this.onEnterFrame = null; + this.onLoopComplete = null; + this.onComplete = null; + this.onSegmentStart = null; + this.onDestroy = null; + this.renderer = null; + this.renderer = null; + this.imagePreloader = null; + this.projectInterface = null; +}; + +AnimationItem.prototype.setCurrentRawFrameValue = function (value) { + this.currentRawFrame = value; + this.gotoFrame(); +}; + +AnimationItem.prototype.setSpeed = function (val) { + this.playSpeed = val; + this.updaFrameModifier(); +}; + +AnimationItem.prototype.setDirection = function (val) { + this.playDirection = val < 0 ? -1 : 1; + this.updaFrameModifier(); +}; + +AnimationItem.prototype.setVolume = function (val, name) { + if (name && this.name !== name) { + return; + } + this.audioController.setVolume(val); +}; + +AnimationItem.prototype.getVolume = function () { + return this.audioController.getVolume(); +}; + +AnimationItem.prototype.mute = function (name) { + if (name && this.name !== name) { + return; + } + this.audioController.mute(); +}; + +AnimationItem.prototype.unmute = function (name) { + if (name && this.name !== name) { + return; + } + this.audioController.unmute(); +}; + +AnimationItem.prototype.updaFrameModifier = function () { + this.frameModifier = this.frameMult * this.playSpeed * this.playDirection; + this.audioController.setRate(this.playSpeed * this.playDirection); +}; + +AnimationItem.prototype.getPath = function () { + return this.path; +}; + +AnimationItem.prototype.getAssetsPath = function (assetData) { + var path = ''; + if (assetData.e) { + path = assetData.p; + } else if (this.assetsPath) { + var imagePath = assetData.p; + if (imagePath.indexOf('images/') !== -1) { + imagePath = imagePath.split('/')[1]; + } + path = this.assetsPath + imagePath; + } else { + path = this.path; + path += assetData.u ? assetData.u : ''; + path += assetData.p; + } + return path; +}; + +AnimationItem.prototype.getAssetData = function (id) { + var i = 0; + var len = this.assets.length; + while (i < len) { + if (id === this.assets[i].id) { + return this.assets[i]; + } + i += 1; + } + return null; +}; + +AnimationItem.prototype.hide = function () { + this.renderer.hide(); +}; + +AnimationItem.prototype.show = function () { + this.renderer.show(); +}; + +AnimationItem.prototype.getDuration = function (isFrame) { + return isFrame ? this.totalFrames : this.totalFrames / this.frameRate; +}; + +AnimationItem.prototype.updateDocumentData = function (path, documentData, index) { + try { + var element = this.renderer.getElementByPath(path); + element.updateDocumentData(documentData, index); + } catch (error) { + // TODO: decide how to handle catch case + } +}; + +AnimationItem.prototype.trigger = function (name) { + if (this._cbs && this._cbs[name]) { + switch (name) { + case 'enterFrame': + this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier)); + break; + case 'drawnFrame': + this.drawnFrameEvent.currentTime = this.currentFrame; + this.drawnFrameEvent.totalTime = this.totalFrames; + this.drawnFrameEvent.direction = this.frameModifier; + this.triggerEvent(name, this.drawnFrameEvent); + break; + case 'loopComplete': + this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult)); + break; + case 'complete': + this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult)); + break; + case 'segmentStart': + this.triggerEvent(name, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames)); + break; + case 'destroy': + this.triggerEvent(name, new BMDestroyEvent(name, this)); + break; + default: + this.triggerEvent(name); + } + } + if (name === 'enterFrame' && this.onEnterFrame) { + this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult)); + } + if (name === 'loopComplete' && this.onLoopComplete) { + this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult)); + } + if (name === 'complete' && this.onComplete) { + this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult)); + } + if (name === 'segmentStart' && this.onSegmentStart) { + this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.firstFrame, this.totalFrames)); + } + if (name === 'destroy' && this.onDestroy) { + this.onDestroy.call(this, new BMDestroyEvent(name, this)); + } +}; + +AnimationItem.prototype.triggerRenderFrameError = function (nativeError) { + var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame); + this.triggerEvent('error', error); + + if (this.onError) { + this.onError.call(this, error); + } +}; + +AnimationItem.prototype.triggerConfigError = function (nativeError) { + var error = new BMConfigErrorEvent(nativeError, this.currentFrame); + this.triggerEvent('error', error); + + if (this.onError) { + this.onError.call(this, error); + } +}; + +const animationManager = (function () { + var moduleOb = {}; + var registeredAnimations = []; + var initTime = 0; + var len = 0; + var playingAnimationsNum = 0; + var _stopped = true; + var _isFrozen = false; + + function removeElement(ev) { + var i = 0; + var animItem = ev.target; + while (i < len) { + if (registeredAnimations[i].animation === animItem) { + registeredAnimations.splice(i, 1); + i -= 1; + len -= 1; + if (!animItem.isPaused) { + subtractPlayingCount(); + } + } + i += 1; + } + } + + function registerAnimation(element, animationData) { + if (!element) { + return null; + } + var i = 0; + while (i < len) { + if (registeredAnimations[i].elem === element && registeredAnimations[i].elem !== null) { + return registeredAnimations[i].animation; + } + i += 1; + } + var animItem = new AnimationItem(); + setupAnimation(animItem, element); + animItem.setData(element, animationData); + return animItem; + } + + function getRegisteredAnimations() { + var i; + var lenAnims = registeredAnimations.length; + var animations = []; + for (i = 0; i < lenAnims; i += 1) { + animations.push(registeredAnimations[i].animation); + } + return animations; + } + + function addPlayingCount() { + playingAnimationsNum += 1; + activate(); + } + + function subtractPlayingCount() { + playingAnimationsNum -= 1; + } + + function setupAnimation(animItem, element) { + animItem.addEventListener('destroy', removeElement); + animItem.addEventListener('_active', addPlayingCount); + animItem.addEventListener('_idle', subtractPlayingCount); + registeredAnimations.push({ elem: element, animation: animItem }); + len += 1; + } + + function loadAnimation(params) { + var animItem = new AnimationItem(); + setupAnimation(animItem, null); + animItem.setParams(params); + return animItem; + } + + function setSpeed(val, animation) { + var i; + for (i = 0; i < len; i += 1) { + registeredAnimations[i].animation.setSpeed(val, animation); + } + } + + function setDirection(val, animation) { + var i; + for (i = 0; i < len; i += 1) { + registeredAnimations[i].animation.setDirection(val, animation); + } + } + + function play(animation) { + var i; + for (i = 0; i < len; i += 1) { + registeredAnimations[i].animation.play(animation); + } + } + function resume(nowTime) { + var elapsedTime = nowTime - initTime; + var i; + for (i = 0; i < len; i += 1) { + registeredAnimations[i].animation.advanceTime(elapsedTime); + } + initTime = nowTime; + if (playingAnimationsNum && !_isFrozen) { + window.requestAnimationFrame(resume); + } else { + _stopped = true; + } + } + + function first(nowTime) { + initTime = nowTime; + window.requestAnimationFrame(resume); + } + + function pause(animation) { + var i; + for (i = 0; i < len; i += 1) { + registeredAnimations[i].animation.pause(animation); + } + } + + function goToAndStop(value, isFrame, animation) { + var i; + for (i = 0; i < len; i += 1) { + registeredAnimations[i].animation.goToAndStop(value, isFrame, animation); + } + } + + function stop(animation) { + var i; + for (i = 0; i < len; i += 1) { + registeredAnimations[i].animation.stop(animation); + } + } + + function togglePause(animation) { + var i; + for (i = 0; i < len; i += 1) { + registeredAnimations[i].animation.togglePause(animation); + } + } + + function destroy(animation) { + var i; + for (i = (len - 1); i >= 0; i -= 1) { + registeredAnimations[i].animation.destroy(animation); + } + } + + function searchAnimations(animationData, standalone, renderer) { + var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), + [].slice.call(document.getElementsByClassName('bodymovin'))); + var i; + var lenAnims = animElements.length; + for (i = 0; i < lenAnims; i += 1) { + if (renderer) { + animElements[i].setAttribute('data-bm-type', renderer); + } + registerAnimation(animElements[i], animationData); + } + if (standalone && lenAnims === 0) { + if (!renderer) { + renderer = 'svg'; + } + var body = document.getElementsByTagName('body')[0]; + body.innerText = ''; + var div = createTag('div'); + div.style.width = '100%'; + div.style.height = '100%'; + div.setAttribute('data-bm-type', renderer); + body.appendChild(div); + registerAnimation(div, animationData); + } + } + + function resize() { + var i; + for (i = 0; i < len; i += 1) { + registeredAnimations[i].animation.resize(); + } + } + + function activate() { + if (!_isFrozen && playingAnimationsNum) { + if (_stopped) { + window.requestAnimationFrame(first); + _stopped = false; + } + } + } + + function freeze() { + _isFrozen = true; + } + + function unfreeze() { + _isFrozen = false; + activate(); + } + + function setVolume(val, animation) { + var i; + for (i = 0; i < len; i += 1) { + registeredAnimations[i].animation.setVolume(val, animation); + } + } + + function mute(animation) { + var i; + for (i = 0; i < len; i += 1) { + registeredAnimations[i].animation.mute(animation); + } + } + + function unmute(animation) { + var i; + for (i = 0; i < len; i += 1) { + registeredAnimations[i].animation.unmute(animation); + } + } + + moduleOb.registerAnimation = registerAnimation; + moduleOb.loadAnimation = loadAnimation; + moduleOb.setSpeed = setSpeed; + moduleOb.setDirection = setDirection; + moduleOb.play = play; + moduleOb.pause = pause; + moduleOb.stop = stop; + moduleOb.togglePause = togglePause; + moduleOb.searchAnimations = searchAnimations; + moduleOb.resize = resize; + // moduleOb.start = start; + moduleOb.goToAndStop = goToAndStop; + moduleOb.destroy = destroy; + moduleOb.freeze = freeze; + moduleOb.unfreeze = unfreeze; + moduleOb.setVolume = setVolume; + moduleOb.mute = mute; + moduleOb.unmute = unmute; + moduleOb.getRegisteredAnimations = getRegisteredAnimations; + return moduleOb; +}()); + +/* eslint-disable */ +const BezierFactory = (function () { + /** + * BezierEasing - use bezier curve for transition easing function + * by Gaëtan Renaudeau 2014 - 2015 – MIT License + * + * Credits: is based on Firefox's nsSMILKeySpline.cpp + * Usage: + * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ]) + * spline.get(x) => returns the easing value | x must be in [0, 1] range + * + */ + + var ob = {}; + ob.getBezierEasing = getBezierEasing; + var beziers = {}; + + function getBezierEasing(a, b, c, d, nm) { + var str = nm || ('bez_' + a + '_' + b + '_' + c + '_' + d).replace(/\./g, 'p'); + if (beziers[str]) { + return beziers[str]; + } + var bezEasing = new BezierEasing([a, b, c, d]); + beziers[str] = bezEasing; + return bezEasing; + } + + // These values are established by empiricism with tests (tradeoff: performance VS precision) + var NEWTON_ITERATIONS = 4; + var NEWTON_MIN_SLOPE = 0.001; + var SUBDIVISION_PRECISION = 0.0000001; + var SUBDIVISION_MAX_ITERATIONS = 10; + + var kSplineTableSize = 11; + var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0); + + var float32ArraySupported = typeof Float32Array === 'function'; + + function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; } + function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; } + function C(aA1) { return 3.0 * aA1; } + + // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2. + function calcBezier(aT, aA1, aA2) { + return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; + } + + // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2. + function getSlope(aT, aA1, aA2) { + return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); + } + + function binarySubdivide(aX, aA, aB, mX1, mX2) { + var currentX, + currentT, + i = 0; + do { + currentT = aA + (aB - aA) / 2.0; + currentX = calcBezier(currentT, mX1, mX2) - aX; + if (currentX > 0.0) { + aB = currentT; + } else { + aA = currentT; + } + } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS); + return currentT; + } + + function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) { + for (var i = 0; i < NEWTON_ITERATIONS; ++i) { + var currentSlope = getSlope(aGuessT, mX1, mX2); + if (currentSlope === 0.0) return aGuessT; + var currentX = calcBezier(aGuessT, mX1, mX2) - aX; + aGuessT -= currentX / currentSlope; + } + return aGuessT; + } + + /** + * points is an array of [ mX1, mY1, mX2, mY2 ] + */ + function BezierEasing(points) { + this._p = points; + this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize); + this._precomputed = false; + + this.get = this.get.bind(this); + } + + BezierEasing.prototype = { + + get: function (x) { + var mX1 = this._p[0], + mY1 = this._p[1], + mX2 = this._p[2], + mY2 = this._p[3]; + if (!this._precomputed) this._precompute(); + if (mX1 === mY1 && mX2 === mY2) return x; // linear + // Because JavaScript number are imprecise, we should guarantee the extremes are right. + if (x === 0) return 0; + if (x === 1) return 1; + return calcBezier(this._getTForX(x), mY1, mY2); + }, + + // Private part + + _precompute: function () { + var mX1 = this._p[0], + mY1 = this._p[1], + mX2 = this._p[2], + mY2 = this._p[3]; + this._precomputed = true; + if (mX1 !== mY1 || mX2 !== mY2) { this._calcSampleValues(); } + }, + + _calcSampleValues: function () { + var mX1 = this._p[0], + mX2 = this._p[2]; + for (var i = 0; i < kSplineTableSize; ++i) { + this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2); + } + }, + + /** + * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection. + */ + _getTForX: function (aX) { + var mX1 = this._p[0], + mX2 = this._p[2], + mSampleValues = this._mSampleValues; + + var intervalStart = 0.0; + var currentSample = 1; + var lastSample = kSplineTableSize - 1; + + for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) { + intervalStart += kSampleStepSize; + } + --currentSample; + + // Interpolate to provide an initial guess for t + var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]); + var guessForT = intervalStart + dist * kSampleStepSize; + + var initialSlope = getSlope(guessForT, mX1, mX2); + if (initialSlope >= NEWTON_MIN_SLOPE) { + return newtonRaphsonIterate(aX, guessForT, mX1, mX2); + } if (initialSlope === 0.0) { + return guessForT; + } + return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2); + }, + }; + + return ob; +}()); + +const pooling = (function () { + function double(arr) { + return arr.concat(createSizedArray(arr.length)); + } + + return { + double: double, + }; +}()); + +const poolFactory = (function () { + return function (initialLength, _create, _release) { + var _length = 0; + var _maxLength = initialLength; + var pool = createSizedArray(_maxLength); + + var ob = { + newElement: newElement, + release: release, + }; + + function newElement() { + var element; + if (_length) { + _length -= 1; + element = pool[_length]; + } else { + element = _create(); + } + return element; + } + + function release(element) { + if (_length === _maxLength) { + pool = pooling.double(pool); + _maxLength *= 2; + } + if (_release) { + _release(element); + } + pool[_length] = element; + _length += 1; + } + + return ob; + }; +}()); + +const bezierLengthPool = (function () { + function create() { + return { + addedLength: 0, + percents: createTypedArray('float32', getDefaultCurveSegments()), + lengths: createTypedArray('float32', getDefaultCurveSegments()), + }; + } + return poolFactory(8, create); +}()); + +const segmentsLengthPool = (function () { + function create() { + return { + lengths: [], + totalLength: 0, + }; + } + + function release(element) { + var i; + var len = element.lengths.length; + for (i = 0; i < len; i += 1) { + bezierLengthPool.release(element.lengths[i]); + } + element.lengths.length = 0; + } + + return poolFactory(8, create, release); +}()); + +function bezFunction() { + var math = Math; + + function pointOnLine2D(x1, y1, x2, y2, x3, y3) { + var det1 = (x1 * y2) + (y1 * x3) + (x2 * y3) - (x3 * y2) - (y3 * x1) - (x2 * y1); + return det1 > -0.001 && det1 < 0.001; + } + + function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) { + if (z1 === 0 && z2 === 0 && z3 === 0) { + return pointOnLine2D(x1, y1, x2, y2, x3, y3); + } + var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2)); + var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2)); + var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2)); + var diffDist; + if (dist1 > dist2) { + if (dist1 > dist3) { + diffDist = dist1 - dist2 - dist3; + } else { + diffDist = dist3 - dist2 - dist1; + } + } else if (dist3 > dist2) { + diffDist = dist3 - dist2 - dist1; + } else { + diffDist = dist2 - dist1 - dist3; + } + return diffDist > -0.0001 && diffDist < 0.0001; + } + + var getBezierLength = (function () { + return function (pt1, pt2, pt3, pt4) { + var curveSegments = getDefaultCurveSegments(); + var k; + var i; + var len; + var ptCoord; + var perc; + var addedLength = 0; + var ptDistance; + var point = []; + var lastPoint = []; + var lengthData = bezierLengthPool.newElement(); + len = pt3.length; + for (k = 0; k < curveSegments; k += 1) { + perc = k / (curveSegments - 1); + ptDistance = 0; + for (i = 0; i < len; i += 1) { + ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i]; + point[i] = ptCoord; + if (lastPoint[i] !== null) { + ptDistance += bmPow(point[i] - lastPoint[i], 2); + } + lastPoint[i] = point[i]; + } + if (ptDistance) { + ptDistance = bmSqrt(ptDistance); + addedLength += ptDistance; + } + lengthData.percents[k] = perc; + lengthData.lengths[k] = addedLength; + } + lengthData.addedLength = addedLength; + return lengthData; + }; + }()); + + function getSegmentsLength(shapeData) { + var segmentsLength = segmentsLengthPool.newElement(); + var closed = shapeData.c; + var pathV = shapeData.v; + var pathO = shapeData.o; + var pathI = shapeData.i; + var i; + var len = shapeData._length; + var lengths = segmentsLength.lengths; + var totalLength = 0; + for (i = 0; i < len - 1; i += 1) { + lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]); + totalLength += lengths[i].addedLength; + } + if (closed && len) { + lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]); + totalLength += lengths[i].addedLength; + } + segmentsLength.totalLength = totalLength; + return segmentsLength; + } + + function BezierData(length) { + this.segmentLength = 0; + this.points = new Array(length); + } + + function PointData(partial, point) { + this.partialLength = partial; + this.point = point; + } + + var buildBezierData = (function () { + var storedData = {}; + + return function (pt1, pt2, pt3, pt4) { + var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p'); + if (!storedData[bezierName]) { + var curveSegments = getDefaultCurveSegments(); + var k; + var i; + var len; + var ptCoord; + var perc; + var addedLength = 0; + var ptDistance; + var point; + var lastPoint = null; + if (pt1.length === 2 && (pt1[0] !== pt2[0] || pt1[1] !== pt2[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt1[0] + pt3[0], pt1[1] + pt3[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt2[0] + pt4[0], pt2[1] + pt4[1])) { + curveSegments = 2; + } + var bezierData = new BezierData(curveSegments); + len = pt3.length; + for (k = 0; k < curveSegments; k += 1) { + point = createSizedArray(len); + perc = k / (curveSegments - 1); + ptDistance = 0; + for (i = 0; i < len; i += 1) { + ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i]; + point[i] = ptCoord; + if (lastPoint !== null) { + ptDistance += bmPow(point[i] - lastPoint[i], 2); + } + } + ptDistance = bmSqrt(ptDistance); + addedLength += ptDistance; + bezierData.points[k] = new PointData(ptDistance, point); + lastPoint = point; + } + bezierData.segmentLength = addedLength; + storedData[bezierName] = bezierData; + } + return storedData[bezierName]; + }; + }()); + + function getDistancePerc(perc, bezierData) { + var percents = bezierData.percents; + var lengths = bezierData.lengths; + var len = percents.length; + var initPos = bmFloor((len - 1) * perc); + var lengthPos = perc * bezierData.addedLength; + var lPerc = 0; + if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) { + return percents[initPos]; + } + var dir = lengths[initPos] > lengthPos ? -1 : 1; + var flag = true; + while (flag) { + if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) { + lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]); + flag = false; + } else { + initPos += dir; + } + if (initPos < 0 || initPos >= len - 1) { + // FIX for TypedArrays that don't store floating point values with enough accuracy + if (initPos === len - 1) { + return percents[initPos]; + } + flag = false; + } + } + return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc; + } + + function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) { + var t1 = getDistancePerc(percent, bezierData); + var u1 = 1 - t1; + var ptX = math.round((u1 * u1 * u1 * pt1[0] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[0] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[0] + t1 * t1 * t1 * pt2[0]) * 1000) / 1000; + var ptY = math.round((u1 * u1 * u1 * pt1[1] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[1] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[1] + t1 * t1 * t1 * pt2[1]) * 1000) / 1000; + return [ptX, ptY]; + } + + var bezierSegmentPoints = createTypedArray('float32', 8); + + function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) { + if (startPerc < 0) { + startPerc = 0; + } else if (startPerc > 1) { + startPerc = 1; + } + var t0 = getDistancePerc(startPerc, bezierData); + endPerc = endPerc > 1 ? 1 : endPerc; + var t1 = getDistancePerc(endPerc, bezierData); + var i; + var len = pt1.length; + var u0 = 1 - t0; + var u1 = 1 - t1; + var u0u0u0 = u0 * u0 * u0; + var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase + var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase + var t0t0t0 = t0 * t0 * t0; + // + var u0u0u1 = u0 * u0 * u1; + var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase + var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase + var t0t0t1 = t0 * t0 * t1; + // + var u0u1u1 = u0 * u1 * u1; + var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase + var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase + var t0t1t1 = t0 * t1 * t1; + // + var u1u1u1 = u1 * u1 * u1; + var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase + var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase + var t1t1t1 = t1 * t1 * t1; + for (i = 0; i < len; i += 1) { + bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase + bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase + bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase + bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase + } + + return bezierSegmentPoints; + } + + return { + getSegmentsLength: getSegmentsLength, + getNewSegment: getNewSegment, + getPointInSegment: getPointInSegment, + buildBezierData: buildBezierData, + pointOnLine2D: pointOnLine2D, + pointOnLine3D: pointOnLine3D, + }; +} + +const bez = bezFunction(); + +const PropertyFactory = (function () { + var initFrame = initialDefaultFrame; + var mathAbs = Math.abs; + + function interpolateValue(frameNum, caching) { + var offsetTime = this.offsetTime; + var newValue; + if (this.propType === 'multidimensional') { + newValue = createTypedArray('float32', this.pv.length); + } + var iterationIndex = caching.lastIndex; + var i = iterationIndex; + var len = this.keyframes.length - 1; + var flag = true; + var keyData; + var nextKeyData; + var keyframeMetadata; + + while (flag) { + keyData = this.keyframes[i]; + nextKeyData = this.keyframes[i + 1]; + if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) { + if (keyData.h) { + keyData = nextKeyData; + } + iterationIndex = 0; + break; + } + if ((nextKeyData.t - offsetTime) > frameNum) { + iterationIndex = i; + break; + } + if (i < len - 1) { + i += 1; + } else { + iterationIndex = 0; + flag = false; + } + } + keyframeMetadata = this.keyframesMetadata[i] || {}; + + var k; + var kLen; + var perc; + var jLen; + var j; + var fnc; + var nextKeyTime = nextKeyData.t - offsetTime; + var keyTime = keyData.t - offsetTime; + var endValue; + if (keyData.to) { + if (!keyframeMetadata.bezierData) { + keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti); + } + var bezierData = keyframeMetadata.bezierData; + if (frameNum >= nextKeyTime || frameNum < keyTime) { + var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0; + kLen = bezierData.points[ind].point.length; + for (k = 0; k < kLen; k += 1) { + newValue[k] = bezierData.points[ind].point[k]; + } + // caching._lastKeyframeIndex = -1; + } else { + if (keyframeMetadata.__fnct) { + fnc = keyframeMetadata.__fnct; + } else { + fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get; + keyframeMetadata.__fnct = fnc; + } + perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime)); + var distanceInLine = bezierData.segmentLength * perc; + + var segmentPerc; + var addedLength = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastAddedLength : 0; + j = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastPoint : 0; + flag = true; + jLen = bezierData.points.length; + while (flag) { + addedLength += bezierData.points[j].partialLength; + if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) { + kLen = bezierData.points[j].point.length; + for (k = 0; k < kLen; k += 1) { + newValue[k] = bezierData.points[j].point[k]; + } + break; + } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) { + segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength; + kLen = bezierData.points[j].point.length; + for (k = 0; k < kLen; k += 1) { + newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc; + } + break; + } + if (j < jLen - 1) { + j += 1; + } else { + flag = false; + } + } + caching._lastPoint = j; + caching._lastAddedLength = addedLength - bezierData.points[j].partialLength; + caching._lastKeyframeIndex = i; + } + } else { + var outX; + var outY; + var inX; + var inY; + var keyValue; + len = keyData.s.length; + endValue = nextKeyData.s || keyData.e; + if (this.sh && keyData.h !== 1) { + if (frameNum >= nextKeyTime) { + newValue[0] = endValue[0]; + newValue[1] = endValue[1]; + newValue[2] = endValue[2]; + } else if (frameNum <= keyTime) { + newValue[0] = keyData.s[0]; + newValue[1] = keyData.s[1]; + newValue[2] = keyData.s[2]; + } else { + var quatStart = createQuaternion(keyData.s); + var quatEnd = createQuaternion(endValue); + var time = (frameNum - keyTime) / (nextKeyTime - keyTime); + quaternionToEuler(newValue, slerp(quatStart, quatEnd, time)); + } + } else { + for (i = 0; i < len; i += 1) { + if (keyData.h !== 1) { + if (frameNum >= nextKeyTime) { + perc = 1; + } else if (frameNum < keyTime) { + perc = 0; + } else { + if (keyData.o.x.constructor === Array) { + if (!keyframeMetadata.__fnct) { + keyframeMetadata.__fnct = []; + } + if (!keyframeMetadata.__fnct[i]) { + outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i]; + outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i]; + inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i]; + inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i]; + fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get; + keyframeMetadata.__fnct[i] = fnc; + } else { + fnc = keyframeMetadata.__fnct[i]; + } + } else if (!keyframeMetadata.__fnct) { + outX = keyData.o.x; + outY = keyData.o.y; + inX = keyData.i.x; + inY = keyData.i.y; + fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get; + keyData.keyframeMetadata = fnc; + } else { + fnc = keyframeMetadata.__fnct; + } + perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime)); + } + } + + endValue = nextKeyData.s || keyData.e; + keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc; + + if (this.propType === 'multidimensional') { + newValue[i] = keyValue; + } else { + newValue = keyValue; + } + } + } + } + caching.lastIndex = iterationIndex; + return newValue; + } + + // based on @Toji's https://github.com/toji/gl-matrix/ + function slerp(a, b, t) { + var out = []; + var ax = a[0]; + var ay = a[1]; + var az = a[2]; + var aw = a[3]; + var bx = b[0]; + var by = b[1]; + var bz = b[2]; + var bw = b[3]; + + var omega; + var cosom; + var sinom; + var scale0; + var scale1; + + cosom = ax * bx + ay * by + az * bz + aw * bw; + if (cosom < 0.0) { + cosom = -cosom; + bx = -bx; + by = -by; + bz = -bz; + bw = -bw; + } + if ((1.0 - cosom) > 0.000001) { + omega = Math.acos(cosom); + sinom = Math.sin(omega); + scale0 = Math.sin((1.0 - t) * omega) / sinom; + scale1 = Math.sin(t * omega) / sinom; + } else { + scale0 = 1.0 - t; + scale1 = t; + } + out[0] = scale0 * ax + scale1 * bx; + out[1] = scale0 * ay + scale1 * by; + out[2] = scale0 * az + scale1 * bz; + out[3] = scale0 * aw + scale1 * bw; + + return out; + } + + function quaternionToEuler(out, quat) { + var qx = quat[0]; + var qy = quat[1]; + var qz = quat[2]; + var qw = quat[3]; + var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz); + var attitude = Math.asin(2 * qx * qy + 2 * qz * qw); + var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz); + out[0] = heading / degToRads; + out[1] = attitude / degToRads; + out[2] = bank / degToRads; + } + + function createQuaternion(values) { + var heading = values[0] * degToRads; + var attitude = values[1] * degToRads; + var bank = values[2] * degToRads; + var c1 = Math.cos(heading / 2); + var c2 = Math.cos(attitude / 2); + var c3 = Math.cos(bank / 2); + var s1 = Math.sin(heading / 2); + var s2 = Math.sin(attitude / 2); + var s3 = Math.sin(bank / 2); + var w = c1 * c2 * c3 - s1 * s2 * s3; + var x = s1 * s2 * c3 + c1 * c2 * s3; + var y = s1 * c2 * c3 + c1 * s2 * s3; + var z = c1 * s2 * c3 - s1 * c2 * s3; + + return [x, y, z, w]; + } + + function getValueAtCurrentTime() { + var frameNum = this.comp.renderedFrame - this.offsetTime; + var initTime = this.keyframes[0].t - this.offsetTime; + var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime; + if (!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))) { + if (this._caching.lastFrame >= frameNum) { + this._caching._lastKeyframeIndex = -1; + this._caching.lastIndex = 0; + } + + var renderResult = this.interpolateValue(frameNum, this._caching); + this.pv = renderResult; + } + this._caching.lastFrame = frameNum; + return this.pv; + } + + function setVValue(val) { + var multipliedValue; + if (this.propType === 'unidimensional') { + multipliedValue = val * this.mult; + if (mathAbs(this.v - multipliedValue) > 0.00001) { + this.v = multipliedValue; + this._mdf = true; + } + } else { + var i = 0; + var len = this.v.length; + while (i < len) { + multipliedValue = val[i] * this.mult; + if (mathAbs(this.v[i] - multipliedValue) > 0.00001) { + this.v[i] = multipliedValue; + this._mdf = true; + } + i += 1; + } + } + } + + function processEffectsSequence() { + if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) { + return; + } + if (this.lock) { + this.setVValue(this.pv); + return; + } + this.lock = true; + this._mdf = this._isFirstFrame; + var i; + var len = this.effectsSequence.length; + var finalValue = this.kf ? this.pv : this.data.k; + for (i = 0; i < len; i += 1) { + finalValue = this.effectsSequence[i](finalValue); + } + this.setVValue(finalValue); + this._isFirstFrame = false; + this.lock = false; + this.frameId = this.elem.globalData.frameId; + } + + function addEffect(effectFunction) { + this.effectsSequence.push(effectFunction); + this.container.addDynamicProperty(this); + } + + function ValueProperty(elem, data, mult, container) { + this.propType = 'unidimensional'; + this.mult = mult || 1; + this.data = data; + this.v = mult ? data.k * mult : data.k; + this.pv = data.k; + this._mdf = false; + this.elem = elem; + this.container = container; + this.comp = elem.comp; + this.k = false; + this.kf = false; + this.vel = 0; + this.effectsSequence = []; + this._isFirstFrame = true; + this.getValue = processEffectsSequence; + this.setVValue = setVValue; + this.addEffect = addEffect; + } + + function MultiDimensionalProperty(elem, data, mult, container) { + this.propType = 'multidimensional'; + this.mult = mult || 1; + this.data = data; + this._mdf = false; + this.elem = elem; + this.container = container; + this.comp = elem.comp; + this.k = false; + this.kf = false; + this.frameId = -1; + var i; + var len = data.k.length; + this.v = createTypedArray('float32', len); + this.pv = createTypedArray('float32', len); + this.vel = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + this.v[i] = data.k[i] * this.mult; + this.pv[i] = data.k[i]; + } + this._isFirstFrame = true; + this.effectsSequence = []; + this.getValue = processEffectsSequence; + this.setVValue = setVValue; + this.addEffect = addEffect; + } + + function KeyframedValueProperty(elem, data, mult, container) { + this.propType = 'unidimensional'; + this.keyframes = data.k; + this.keyframesMetadata = []; + this.offsetTime = elem.data.st; + this.frameId = -1; + this._caching = { + lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1, + }; + this.k = true; + this.kf = true; + this.data = data; + this.mult = mult || 1; + this.elem = elem; + this.container = container; + this.comp = elem.comp; + this.v = initFrame; + this.pv = initFrame; + this._isFirstFrame = true; + this.getValue = processEffectsSequence; + this.setVValue = setVValue; + this.interpolateValue = interpolateValue; + this.effectsSequence = [getValueAtCurrentTime.bind(this)]; + this.addEffect = addEffect; + } + + function KeyframedMultidimensionalProperty(elem, data, mult, container) { + this.propType = 'multidimensional'; + var i; + var len = data.k.length; + var s; + var e; + var to; + var ti; + for (i = 0; i < len - 1; i += 1) { + if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) { + s = data.k[i].s; + e = data.k[i + 1].s; + to = data.k[i].to; + ti = data.k[i].ti; + if ((s.length === 2 && !(s[0] === e[0] && s[1] === e[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], s[0] + to[0], s[1] + to[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], e[0] + ti[0], e[1] + ti[1])) || (s.length === 3 && !(s[0] === e[0] && s[1] === e[1] && s[2] === e[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], s[0] + to[0], s[1] + to[1], s[2] + to[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], e[0] + ti[0], e[1] + ti[1], e[2] + ti[2]))) { + data.k[i].to = null; + data.k[i].ti = null; + } + if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) { + if (s.length === 2 || (s[2] === e[2] && to[2] === 0 && ti[2] === 0)) { + data.k[i].to = null; + data.k[i].ti = null; + } + } + } + } + this.effectsSequence = [getValueAtCurrentTime.bind(this)]; + this.data = data; + this.keyframes = data.k; + this.keyframesMetadata = []; + this.offsetTime = elem.data.st; + this.k = true; + this.kf = true; + this._isFirstFrame = true; + this.mult = mult || 1; + this.elem = elem; + this.container = container; + this.comp = elem.comp; + this.getValue = processEffectsSequence; + this.setVValue = setVValue; + this.interpolateValue = interpolateValue; + this.frameId = -1; + var arrLen = data.k[0].s.length; + this.v = createTypedArray('float32', arrLen); + this.pv = createTypedArray('float32', arrLen); + for (i = 0; i < arrLen; i += 1) { + this.v[i] = initFrame; + this.pv[i] = initFrame; + } + this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray('float32', arrLen) }; + this.addEffect = addEffect; + } + + function getProp(elem, data, type, mult, container) { + var p; + if (!data.k.length) { + p = new ValueProperty(elem, data, mult, container); + } else if (typeof (data.k[0]) === 'number') { + p = new MultiDimensionalProperty(elem, data, mult, container); + } else { + switch (type) { + case 0: + p = new KeyframedValueProperty(elem, data, mult, container); + break; + case 1: + p = new KeyframedMultidimensionalProperty(elem, data, mult, container); + break; + default: + break; + } + } + if (p.effectsSequence.length) { + container.addDynamicProperty(p); + } + return p; + } + + var ob = { + getProp: getProp, + }; + return ob; +}()); + +function DynamicPropertyContainer() {} +DynamicPropertyContainer.prototype = { + addDynamicProperty: function (prop) { + if (this.dynamicProperties.indexOf(prop) === -1) { + this.dynamicProperties.push(prop); + this.container.addDynamicProperty(this); + this._isAnimated = true; + } + }, + iterateDynamicProperties: function () { + this._mdf = false; + var i; + var len = this.dynamicProperties.length; + for (i = 0; i < len; i += 1) { + this.dynamicProperties[i].getValue(); + if (this.dynamicProperties[i]._mdf) { + this._mdf = true; + } + } + }, + initDynamicPropertyContainer: function (container) { + this.container = container; + this.dynamicProperties = []; + this._mdf = false; + this._isAnimated = false; + }, +}; + +const pointPool = (function () { + function create() { + return createTypedArray('float32', 2); + } + return poolFactory(8, create); +}()); + +function ShapePath() { + this.c = false; + this._length = 0; + this._maxLength = 8; + this.v = createSizedArray(this._maxLength); + this.o = createSizedArray(this._maxLength); + this.i = createSizedArray(this._maxLength); +} + +ShapePath.prototype.setPathData = function (closed, len) { + this.c = closed; + this.setLength(len); + var i = 0; + while (i < len) { + this.v[i] = pointPool.newElement(); + this.o[i] = pointPool.newElement(); + this.i[i] = pointPool.newElement(); + i += 1; + } +}; + +ShapePath.prototype.setLength = function (len) { + while (this._maxLength < len) { + this.doubleArrayLength(); + } + this._length = len; +}; + +ShapePath.prototype.doubleArrayLength = function () { + this.v = this.v.concat(createSizedArray(this._maxLength)); + this.i = this.i.concat(createSizedArray(this._maxLength)); + this.o = this.o.concat(createSizedArray(this._maxLength)); + this._maxLength *= 2; +}; + +ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) { + var arr; + this._length = Math.max(this._length, pos + 1); + if (this._length >= this._maxLength) { + this.doubleArrayLength(); + } + switch (type) { + case 'v': + arr = this.v; + break; + case 'i': + arr = this.i; + break; + case 'o': + arr = this.o; + break; + default: + arr = []; + break; + } + if (!arr[pos] || (arr[pos] && !replace)) { + arr[pos] = pointPool.newElement(); + } + arr[pos][0] = x; + arr[pos][1] = y; +}; + +ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) { + this.setXYAt(vX, vY, 'v', pos, replace); + this.setXYAt(oX, oY, 'o', pos, replace); + this.setXYAt(iX, iY, 'i', pos, replace); +}; + +ShapePath.prototype.reverse = function () { + var newPath = new ShapePath(); + newPath.setPathData(this.c, this._length); + var vertices = this.v; + var outPoints = this.o; + var inPoints = this.i; + var init = 0; + if (this.c) { + newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false); + init = 1; + } + var cnt = this._length - 1; + var len = this._length; + + var i; + for (i = init; i < len; i += 1) { + newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false); + cnt -= 1; + } + return newPath; +}; + +const shapePool = (function () { + function create() { + return new ShapePath(); + } + + function release(shapePath) { + var len = shapePath._length; + var i; + for (i = 0; i < len; i += 1) { + pointPool.release(shapePath.v[i]); + pointPool.release(shapePath.i[i]); + pointPool.release(shapePath.o[i]); + shapePath.v[i] = null; + shapePath.i[i] = null; + shapePath.o[i] = null; + } + shapePath._length = 0; + shapePath.c = false; + } + + function clone(shape) { + var cloned = factory.newElement(); + var i; + var len = shape._length === undefined ? shape.v.length : shape._length; + cloned.setLength(len); + cloned.c = shape.c; + + for (i = 0; i < len; i += 1) { + cloned.setTripleAt(shape.v[i][0], shape.v[i][1], shape.o[i][0], shape.o[i][1], shape.i[i][0], shape.i[i][1], i); + } + return cloned; + } + + var factory = poolFactory(4, create, release); + factory.clone = clone; + + return factory; +}()); + +function ShapeCollection() { + this._length = 0; + this._maxLength = 4; + this.shapes = createSizedArray(this._maxLength); +} + +ShapeCollection.prototype.addShape = function (shapeData) { + if (this._length === this._maxLength) { + this.shapes = this.shapes.concat(createSizedArray(this._maxLength)); + this._maxLength *= 2; + } + this.shapes[this._length] = shapeData; + this._length += 1; +}; + +ShapeCollection.prototype.releaseShapes = function () { + var i; + for (i = 0; i < this._length; i += 1) { + shapePool.release(this.shapes[i]); + } + this._length = 0; +}; + +const shapeCollectionPool = (function () { + var ob = { + newShapeCollection: newShapeCollection, + release: release, + }; + + var _length = 0; + var _maxLength = 4; + var pool = createSizedArray(_maxLength); + + function newShapeCollection() { + var shapeCollection; + if (_length) { + _length -= 1; + shapeCollection = pool[_length]; + } else { + shapeCollection = new ShapeCollection(); + } + return shapeCollection; + } + + function release(shapeCollection) { + var i; + var len = shapeCollection._length; + for (i = 0; i < len; i += 1) { + shapePool.release(shapeCollection.shapes[i]); + } + shapeCollection._length = 0; + + if (_length === _maxLength) { + pool = pooling.double(pool); + _maxLength *= 2; + } + pool[_length] = shapeCollection; + _length += 1; + } + + return ob; +}()); + +const ShapePropertyFactory = (function () { + var initFrame = -999999; + + function interpolateShape(frameNum, previousValue, caching) { + var iterationIndex = caching.lastIndex; + var keyPropS; + var keyPropE; + var isHold; + var j; + var k; + var jLen; + var kLen; + var perc; + var vertexValue; + var kf = this.keyframes; + if (frameNum < kf[0].t - this.offsetTime) { + keyPropS = kf[0].s[0]; + isHold = true; + iterationIndex = 0; + } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) { + keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0]; + /* if(kf[kf.length - 1].s){ + keyPropS = kf[kf.length - 1].s[0]; + }else{ + keyPropS = kf[kf.length - 2].e[0]; + } */ + isHold = true; + } else { + var i = iterationIndex; + var len = kf.length - 1; + var flag = true; + var keyData; + var nextKeyData; + var keyframeMetadata; + while (flag) { + keyData = kf[i]; + nextKeyData = kf[i + 1]; + if ((nextKeyData.t - this.offsetTime) > frameNum) { + break; + } + if (i < len - 1) { + i += 1; + } else { + flag = false; + } + } + keyframeMetadata = this.keyframesMetadata[i] || {}; + isHold = keyData.h === 1; + iterationIndex = i; + if (!isHold) { + if (frameNum >= nextKeyData.t - this.offsetTime) { + perc = 1; + } else if (frameNum < keyData.t - this.offsetTime) { + perc = 0; + } else { + var fnc; + if (keyframeMetadata.__fnct) { + fnc = keyframeMetadata.__fnct; + } else { + fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get; + keyframeMetadata.__fnct = fnc; + } + perc = fnc((frameNum - (keyData.t - this.offsetTime)) / ((nextKeyData.t - this.offsetTime) - (keyData.t - this.offsetTime))); + } + keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0]; + } + keyPropS = keyData.s[0]; + } + jLen = previousValue._length; + kLen = keyPropS.i[0].length; + caching.lastIndex = iterationIndex; + + for (j = 0; j < jLen; j += 1) { + for (k = 0; k < kLen; k += 1) { + vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc; + previousValue.i[j][k] = vertexValue; + vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc; + previousValue.o[j][k] = vertexValue; + vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc; + previousValue.v[j][k] = vertexValue; + } + } + } + + function interpolateShapeCurrentTime() { + var frameNum = this.comp.renderedFrame - this.offsetTime; + var initTime = this.keyframes[0].t - this.offsetTime; + var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime; + var lastFrame = this._caching.lastFrame; + if (!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))) { + /// / + this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0; + this.interpolateShape(frameNum, this.pv, this._caching); + /// / + } + this._caching.lastFrame = frameNum; + return this.pv; + } + + function resetShape() { + this.paths = this.localShapeCollection; + } + + function shapesEqual(shape1, shape2) { + if (shape1._length !== shape2._length || shape1.c !== shape2.c) { + return false; + } + var i; + var len = shape1._length; + for (i = 0; i < len; i += 1) { + if (shape1.v[i][0] !== shape2.v[i][0] + || shape1.v[i][1] !== shape2.v[i][1] + || shape1.o[i][0] !== shape2.o[i][0] + || shape1.o[i][1] !== shape2.o[i][1] + || shape1.i[i][0] !== shape2.i[i][0] + || shape1.i[i][1] !== shape2.i[i][1]) { + return false; + } + } + return true; + } + + function setVValue(newPath) { + if (!shapesEqual(this.v, newPath)) { + this.v = shapePool.clone(newPath); + this.localShapeCollection.releaseShapes(); + this.localShapeCollection.addShape(this.v); + this._mdf = true; + this.paths = this.localShapeCollection; + } + } + + function processEffectsSequence() { + if (this.elem.globalData.frameId === this.frameId) { + return; + } if (!this.effectsSequence.length) { + this._mdf = false; + return; + } + if (this.lock) { + this.setVValue(this.pv); + return; + } + this.lock = true; + this._mdf = false; + var finalValue; + if (this.kf) { + finalValue = this.pv; + } else if (this.data.ks) { + finalValue = this.data.ks.k; + } else { + finalValue = this.data.pt.k; + } + var i; + var len = this.effectsSequence.length; + for (i = 0; i < len; i += 1) { + finalValue = this.effectsSequence[i](finalValue); + } + this.setVValue(finalValue); + this.lock = false; + this.frameId = this.elem.globalData.frameId; + } + + function ShapeProperty(elem, data, type) { + this.propType = 'shape'; + this.comp = elem.comp; + this.container = elem; + this.elem = elem; + this.data = data; + this.k = false; + this.kf = false; + this._mdf = false; + var pathData = type === 3 ? data.pt.k : data.ks.k; + this.v = shapePool.clone(pathData); + this.pv = shapePool.clone(this.v); + this.localShapeCollection = shapeCollectionPool.newShapeCollection(); + this.paths = this.localShapeCollection; + this.paths.addShape(this.v); + this.reset = resetShape; + this.effectsSequence = []; + } + + function addEffect(effectFunction) { + this.effectsSequence.push(effectFunction); + this.container.addDynamicProperty(this); + } + + ShapeProperty.prototype.interpolateShape = interpolateShape; + ShapeProperty.prototype.getValue = processEffectsSequence; + ShapeProperty.prototype.setVValue = setVValue; + ShapeProperty.prototype.addEffect = addEffect; + + function KeyframedShapeProperty(elem, data, type) { + this.propType = 'shape'; + this.comp = elem.comp; + this.elem = elem; + this.container = elem; + this.offsetTime = elem.data.st; + this.keyframes = type === 3 ? data.pt.k : data.ks.k; + this.keyframesMetadata = []; + this.k = true; + this.kf = true; + var len = this.keyframes[0].s[0].i.length; + this.v = shapePool.newElement(); + this.v.setPathData(this.keyframes[0].s[0].c, len); + this.pv = shapePool.clone(this.v); + this.localShapeCollection = shapeCollectionPool.newShapeCollection(); + this.paths = this.localShapeCollection; + this.paths.addShape(this.v); + this.lastFrame = initFrame; + this.reset = resetShape; + this._caching = { lastFrame: initFrame, lastIndex: 0 }; + this.effectsSequence = [interpolateShapeCurrentTime.bind(this)]; + } + KeyframedShapeProperty.prototype.getValue = processEffectsSequence; + KeyframedShapeProperty.prototype.interpolateShape = interpolateShape; + KeyframedShapeProperty.prototype.setVValue = setVValue; + KeyframedShapeProperty.prototype.addEffect = addEffect; + + var EllShapeProperty = (function () { + var cPoint = roundCorner; + + function EllShapePropertyFactory(elem, data) { + this.v = shapePool.newElement(); + this.v.setPathData(true, 4); + this.localShapeCollection = shapeCollectionPool.newShapeCollection(); + this.paths = this.localShapeCollection; + this.localShapeCollection.addShape(this.v); + this.d = data.d; + this.elem = elem; + this.comp = elem.comp; + this.frameId = -1; + this.initDynamicPropertyContainer(elem); + this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this); + this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this); + if (this.dynamicProperties.length) { + this.k = true; + } else { + this.k = false; + this.convertEllToPath(); + } + } + + EllShapePropertyFactory.prototype = { + reset: resetShape, + getValue: function () { + if (this.elem.globalData.frameId === this.frameId) { + return; + } + this.frameId = this.elem.globalData.frameId; + this.iterateDynamicProperties(); + + if (this._mdf) { + this.convertEllToPath(); + } + }, + convertEllToPath: function () { + var p0 = this.p.v[0]; + var p1 = this.p.v[1]; + var s0 = this.s.v[0] / 2; + var s1 = this.s.v[1] / 2; + var _cw = this.d !== 3; + var _v = this.v; + _v.v[0][0] = p0; + _v.v[0][1] = p1 - s1; + _v.v[1][0] = _cw ? p0 + s0 : p0 - s0; + _v.v[1][1] = p1; + _v.v[2][0] = p0; + _v.v[2][1] = p1 + s1; + _v.v[3][0] = _cw ? p0 - s0 : p0 + s0; + _v.v[3][1] = p1; + _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint; + _v.i[0][1] = p1 - s1; + _v.i[1][0] = _cw ? p0 + s0 : p0 - s0; + _v.i[1][1] = p1 - s1 * cPoint; + _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint; + _v.i[2][1] = p1 + s1; + _v.i[3][0] = _cw ? p0 - s0 : p0 + s0; + _v.i[3][1] = p1 + s1 * cPoint; + _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint; + _v.o[0][1] = p1 - s1; + _v.o[1][0] = _cw ? p0 + s0 : p0 - s0; + _v.o[1][1] = p1 + s1 * cPoint; + _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint; + _v.o[2][1] = p1 + s1; + _v.o[3][0] = _cw ? p0 - s0 : p0 + s0; + _v.o[3][1] = p1 - s1 * cPoint; + }, + }; + + extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory); + + return EllShapePropertyFactory; + }()); + + var StarShapeProperty = (function () { + function StarShapePropertyFactory(elem, data) { + this.v = shapePool.newElement(); + this.v.setPathData(true, 0); + this.elem = elem; + this.comp = elem.comp; + this.data = data; + this.frameId = -1; + this.d = data.d; + this.initDynamicPropertyContainer(elem); + if (data.sy === 1) { + this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this); + this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this); + this.convertToPath = this.convertStarToPath; + } else { + this.convertToPath = this.convertPolygonToPath; + } + this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this); + this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this); + this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this); + this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this); + this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this); + this.localShapeCollection = shapeCollectionPool.newShapeCollection(); + this.localShapeCollection.addShape(this.v); + this.paths = this.localShapeCollection; + if (this.dynamicProperties.length) { + this.k = true; + } else { + this.k = false; + this.convertToPath(); + } + } + + StarShapePropertyFactory.prototype = { + reset: resetShape, + getValue: function () { + if (this.elem.globalData.frameId === this.frameId) { + return; + } + this.frameId = this.elem.globalData.frameId; + this.iterateDynamicProperties(); + if (this._mdf) { + this.convertToPath(); + } + }, + convertStarToPath: function () { + var numPts = Math.floor(this.pt.v) * 2; + var angle = (Math.PI * 2) / numPts; + /* this.v.v.length = numPts; + this.v.i.length = numPts; + this.v.o.length = numPts; */ + var longFlag = true; + var longRad = this.or.v; + var shortRad = this.ir.v; + var longRound = this.os.v; + var shortRound = this.is.v; + var longPerimSegment = (2 * Math.PI * longRad) / (numPts * 2); + var shortPerimSegment = (2 * Math.PI * shortRad) / (numPts * 2); + var i; + var rad; + var roundness; + var perimSegment; + var currentAng = -Math.PI / 2; + currentAng += this.r.v; + var dir = this.data.d === 3 ? -1 : 1; + this.v._length = 0; + for (i = 0; i < numPts; i += 1) { + rad = longFlag ? longRad : shortRad; + roundness = longFlag ? longRound : shortRound; + perimSegment = longFlag ? longPerimSegment : shortPerimSegment; + var x = rad * Math.cos(currentAng); + var y = rad * Math.sin(currentAng); + var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y); + var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y); + x += +this.p.v[0]; + y += +this.p.v[1]; + this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true); + + /* this.v.v[i] = [x,y]; + this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir]; + this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir]; + this.v._length = numPts; */ + longFlag = !longFlag; + currentAng += angle * dir; + } + }, + convertPolygonToPath: function () { + var numPts = Math.floor(this.pt.v); + var angle = (Math.PI * 2) / numPts; + var rad = this.or.v; + var roundness = this.os.v; + var perimSegment = (2 * Math.PI * rad) / (numPts * 4); + var i; + var currentAng = -Math.PI * 0.5; + var dir = this.data.d === 3 ? -1 : 1; + currentAng += this.r.v; + this.v._length = 0; + for (i = 0; i < numPts; i += 1) { + var x = rad * Math.cos(currentAng); + var y = rad * Math.sin(currentAng); + var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y); + var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y); + x += +this.p.v[0]; + y += +this.p.v[1]; + this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true); + currentAng += angle * dir; + } + this.paths.length = 0; + this.paths[0] = this.v; + }, + + }; + extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory); + + return StarShapePropertyFactory; + }()); + + var RectShapeProperty = (function () { + function RectShapePropertyFactory(elem, data) { + this.v = shapePool.newElement(); + this.v.c = true; + this.localShapeCollection = shapeCollectionPool.newShapeCollection(); + this.localShapeCollection.addShape(this.v); + this.paths = this.localShapeCollection; + this.elem = elem; + this.comp = elem.comp; + this.frameId = -1; + this.d = data.d; + this.initDynamicPropertyContainer(elem); + this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this); + this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this); + this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this); + if (this.dynamicProperties.length) { + this.k = true; + } else { + this.k = false; + this.convertRectToPath(); + } + } + + RectShapePropertyFactory.prototype = { + convertRectToPath: function () { + var p0 = this.p.v[0]; + var p1 = this.p.v[1]; + var v0 = this.s.v[0] / 2; + var v1 = this.s.v[1] / 2; + var round = bmMin(v0, v1, this.r.v); + var cPoint = round * (1 - roundCorner); + this.v._length = 0; + + if (this.d === 2 || this.d === 1) { + this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true); + this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true); + if (round !== 0) { + this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true); + this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true); + this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true); + this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true); + this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true); + this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true); + } else { + this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2); + this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3); + } + } else { + this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true); + if (round !== 0) { + this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true); + this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true); + this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true); + this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true); + this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true); + this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true); + this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true); + } else { + this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true); + this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true); + this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true); + } + } + }, + getValue: function () { + if (this.elem.globalData.frameId === this.frameId) { + return; + } + this.frameId = this.elem.globalData.frameId; + this.iterateDynamicProperties(); + if (this._mdf) { + this.convertRectToPath(); + } + }, + reset: resetShape, + }; + extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory); + + return RectShapePropertyFactory; + }()); + + function getShapeProp(elem, data, type) { + var prop; + if (type === 3 || type === 4) { + var dataProp = type === 3 ? data.pt : data.ks; + var keys = dataProp.k; + if (keys.length) { + prop = new KeyframedShapeProperty(elem, data, type); + } else { + prop = new ShapeProperty(elem, data, type); + } + } else if (type === 5) { + prop = new RectShapeProperty(elem, data); + } else if (type === 6) { + prop = new EllShapeProperty(elem, data); + } else if (type === 7) { + prop = new StarShapeProperty(elem, data); + } + if (prop.k) { + elem.addDynamicProperty(prop); + } + return prop; + } + + function getConstructorFunction() { + return ShapeProperty; + } + + function getKeyframedConstructorFunction() { + return KeyframedShapeProperty; + } + + var ob = {}; + ob.getShapeProp = getShapeProp; + ob.getConstructorFunction = getConstructorFunction; + ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction; + return ob; +}()); + +/*! + Transformation Matrix v2.0 + (c) Epistemex 2014-2015 + www.epistemex.com + By Ken Fyrstenberg + Contributions by leeoniya. + License: MIT, header required. + */ + +/** + * 2D transformation matrix object initialized with identity matrix. + * + * The matrix can synchronize a canvas context by supplying the context + * as an argument, or later apply current absolute transform to an + * existing context. + * + * All values are handled as floating point values. + * + * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix + * @prop {number} a - scale x + * @prop {number} b - shear y + * @prop {number} c - shear x + * @prop {number} d - scale y + * @prop {number} e - translate x + * @prop {number} f - translate y + * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context + * @constructor + */ + +const Matrix = (function () { + var _cos = Math.cos; + var _sin = Math.sin; + var _tan = Math.tan; + var _rnd = Math.round; + + function reset() { + this.props[0] = 1; + this.props[1] = 0; + this.props[2] = 0; + this.props[3] = 0; + this.props[4] = 0; + this.props[5] = 1; + this.props[6] = 0; + this.props[7] = 0; + this.props[8] = 0; + this.props[9] = 0; + this.props[10] = 1; + this.props[11] = 0; + this.props[12] = 0; + this.props[13] = 0; + this.props[14] = 0; + this.props[15] = 1; + return this; + } + + function rotate(angle) { + if (angle === 0) { + return this; + } + var mCos = _cos(angle); + var mSin = _sin(angle); + return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + + function rotateX(angle) { + if (angle === 0) { + return this; + } + var mCos = _cos(angle); + var mSin = _sin(angle); + return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1); + } + + function rotateY(angle) { + if (angle === 0) { + return this; + } + var mCos = _cos(angle); + var mSin = _sin(angle); + return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1); + } + + function rotateZ(angle) { + if (angle === 0) { + return this; + } + var mCos = _cos(angle); + var mSin = _sin(angle); + return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + + function shear(sx, sy) { + return this._t(1, sy, sx, 1, 0, 0); + } + + function skew(ax, ay) { + return this.shear(_tan(ax), _tan(ay)); + } + + function skewFromAxis(ax, angle) { + var mCos = _cos(angle); + var mSin = _sin(angle); + return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) + ._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) + ._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0); + } + + function scale(sx, sy, sz) { + if (!sz && sz !== 0) { + sz = 1; + } + if (sx === 1 && sy === 1 && sz === 1) { + return this; + } + return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1); + } + + function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) { + this.props[0] = a; + this.props[1] = b; + this.props[2] = c; + this.props[3] = d; + this.props[4] = e; + this.props[5] = f; + this.props[6] = g; + this.props[7] = h; + this.props[8] = i; + this.props[9] = j; + this.props[10] = k; + this.props[11] = l; + this.props[12] = m; + this.props[13] = n; + this.props[14] = o; + this.props[15] = p; + return this; + } + + function translate(tx, ty, tz) { + tz = tz || 0; + if (tx !== 0 || ty !== 0 || tz !== 0) { + return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1); + } + return this; + } + + function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) { + var _p = this.props; + + if (a2 === 1 && b2 === 0 && c2 === 0 && d2 === 0 && e2 === 0 && f2 === 1 && g2 === 0 && h2 === 0 && i2 === 0 && j2 === 0 && k2 === 1 && l2 === 0) { + // NOTE: commenting this condition because TurboFan deoptimizes code when present + // if(m2 !== 0 || n2 !== 0 || o2 !== 0){ + _p[12] = _p[12] * a2 + _p[15] * m2; + _p[13] = _p[13] * f2 + _p[15] * n2; + _p[14] = _p[14] * k2 + _p[15] * o2; + _p[15] *= p2; + // } + this._identityCalculated = false; + return this; + } + + var a1 = _p[0]; + var b1 = _p[1]; + var c1 = _p[2]; + var d1 = _p[3]; + var e1 = _p[4]; + var f1 = _p[5]; + var g1 = _p[6]; + var h1 = _p[7]; + var i1 = _p[8]; + var j1 = _p[9]; + var k1 = _p[10]; + var l1 = _p[11]; + var m1 = _p[12]; + var n1 = _p[13]; + var o1 = _p[14]; + var p1 = _p[15]; + + /* matrix order (canvas compatible): + * ace + * bdf + * 001 + */ + _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2; + _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2; + _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2; + _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2; + + _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2; + _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2; + _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2; + _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2; + + _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2; + _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2; + _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2; + _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2; + + _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2; + _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2; + _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2; + _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2; + + this._identityCalculated = false; + return this; + } + + function isIdentity() { + if (!this._identityCalculated) { + this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1); + this._identityCalculated = true; + } + return this._identity; + } + + function equals(matr) { + var i = 0; + while (i < 16) { + if (matr.props[i] !== this.props[i]) { + return false; + } + i += 1; + } + return true; + } + + function clone(matr) { + var i; + for (i = 0; i < 16; i += 1) { + matr.props[i] = this.props[i]; + } + return matr; + } + + function cloneFromProps(props) { + var i; + for (i = 0; i < 16; i += 1) { + this.props[i] = props[i]; + } + } + + function applyToPoint(x, y, z) { + return { + x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12], + y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13], + z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14], + }; + /* return { + x: x * me.a + y * me.c + me.e, + y: x * me.b + y * me.d + me.f + }; */ + } + function applyToX(x, y, z) { + return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12]; + } + function applyToY(x, y, z) { + return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13]; + } + function applyToZ(x, y, z) { + return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]; + } + + function getInverseMatrix() { + var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4]; + var a = this.props[5] / determinant; + var b = -this.props[1] / determinant; + var c = -this.props[4] / determinant; + var d = this.props[0] / determinant; + var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant; + var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant; + var inverseMatrix = new Matrix(); + inverseMatrix.props[0] = a; + inverseMatrix.props[1] = b; + inverseMatrix.props[4] = c; + inverseMatrix.props[5] = d; + inverseMatrix.props[12] = e; + inverseMatrix.props[13] = f; + return inverseMatrix; + } + + function inversePoint(pt) { + var inverseMatrix = this.getInverseMatrix(); + return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0); + } + + function inversePoints(pts) { + var i; + var len = pts.length; + var retPts = []; + for (i = 0; i < len; i += 1) { + retPts[i] = inversePoint(pts[i]); + } + return retPts; + } + + function applyToTriplePoints(pt1, pt2, pt3) { + var arr = createTypedArray('float32', 6); + if (this.isIdentity()) { + arr[0] = pt1[0]; + arr[1] = pt1[1]; + arr[2] = pt2[0]; + arr[3] = pt2[1]; + arr[4] = pt3[0]; + arr[5] = pt3[1]; + } else { + var p0 = this.props[0]; + var p1 = this.props[1]; + var p4 = this.props[4]; + var p5 = this.props[5]; + var p12 = this.props[12]; + var p13 = this.props[13]; + arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12; + arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13; + arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12; + arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13; + arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12; + arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13; + } + return arr; + } + + function applyToPointArray(x, y, z) { + var arr; + if (this.isIdentity()) { + arr = [x, y, z]; + } else { + arr = [ + x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12], + x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13], + x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14], + ]; + } + return arr; + } + + function applyToPointStringified(x, y) { + if (this.isIdentity()) { + return x + ',' + y; + } + var _p = this.props; + return Math.round((x * _p[0] + y * _p[4] + _p[12]) * 100) / 100 + ',' + Math.round((x * _p[1] + y * _p[5] + _p[13]) * 100) / 100; + } + + function toCSS() { + // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed. + /* if(this.isIdentity()) { + return ''; + } */ + var i = 0; + var props = this.props; + var cssValue = 'matrix3d('; + var v = 10000; + while (i < 16) { + cssValue += _rnd(props[i] * v) / v; + cssValue += i === 15 ? ')' : ','; + i += 1; + } + return cssValue; + } + + function roundMatrixProperty(val) { + var v = 10000; + if ((val < 0.000001 && val > 0) || (val > -0.000001 && val < 0)) { + return _rnd(val * v) / v; + } + return val; + } + + function to2dCSS() { + // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed. + /* if(this.isIdentity()) { + return ''; + } */ + var props = this.props; + var _a = roundMatrixProperty(props[0]); + var _b = roundMatrixProperty(props[1]); + var _c = roundMatrixProperty(props[4]); + var _d = roundMatrixProperty(props[5]); + var _e = roundMatrixProperty(props[12]); + var _f = roundMatrixProperty(props[13]); + return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')'; + } + + return function () { + this.reset = reset; + this.rotate = rotate; + this.rotateX = rotateX; + this.rotateY = rotateY; + this.rotateZ = rotateZ; + this.skew = skew; + this.skewFromAxis = skewFromAxis; + this.shear = shear; + this.scale = scale; + this.setTransform = setTransform; + this.translate = translate; + this.transform = transform; + this.applyToPoint = applyToPoint; + this.applyToX = applyToX; + this.applyToY = applyToY; + this.applyToZ = applyToZ; + this.applyToPointArray = applyToPointArray; + this.applyToTriplePoints = applyToTriplePoints; + this.applyToPointStringified = applyToPointStringified; + this.toCSS = toCSS; + this.to2dCSS = to2dCSS; + this.clone = clone; + this.cloneFromProps = cloneFromProps; + this.equals = equals; + this.inversePoints = inversePoints; + this.inversePoint = inversePoint; + this.getInverseMatrix = getInverseMatrix; + this._t = this.transform; + this.isIdentity = isIdentity; + this._identity = true; + this._identityCalculated = false; + + this.props = createTypedArray('float32', 16); + this.reset(); + }; +}()); + +var standalone = '__[STANDALONE]__'; +var animationData = '__[ANIMATIONDATA]__'; +var renderer = ''; + +function setLocation(href) { + setLocationHref(href); +} + +function searchAnimations() { + if (standalone === true) { + animationManager.searchAnimations(animationData, standalone, renderer); + } else { + animationManager.searchAnimations(); + } +} + +function setSubframeRendering(flag) { + setSubframeEnabled(flag); +} + +function setPrefix(prefix) { + setIdPrefix(prefix); +} + +function loadAnimation(params) { + if (standalone === true) { + params.animationData = JSON.parse(animationData); + } + return animationManager.loadAnimation(params); +} + +function setQuality(value) { + if (typeof value === 'string') { + switch (value) { + case 'high': + setDefaultCurveSegments(200); + break; + default: + case 'medium': + setDefaultCurveSegments(50); + break; + case 'low': + setDefaultCurveSegments(10); + break; + } + } else if (!isNaN(value) && value > 1) { + setDefaultCurveSegments(value); + } + if (getDefaultCurveSegments() >= 50) { + roundValues(false); + } else { + roundValues(true); + } +} + +function inBrowser() { + return typeof navigator !== 'undefined'; +} + +function installPlugin(type, plugin) { + if (type === 'expressions') { + setExpressionsPlugin(plugin); + } +} + +function getFactory(name) { + switch (name) { + case 'propertyFactory': + return PropertyFactory; + case 'shapePropertyFactory': + return ShapePropertyFactory; + case 'matrix': + return Matrix; + default: + return null; + } +} + +lottie.play = animationManager.play; +lottie.pause = animationManager.pause; +lottie.setLocationHref = setLocation; +lottie.togglePause = animationManager.togglePause; +lottie.setSpeed = animationManager.setSpeed; +lottie.setDirection = animationManager.setDirection; +lottie.stop = animationManager.stop; +lottie.searchAnimations = searchAnimations; +lottie.registerAnimation = animationManager.registerAnimation; +lottie.loadAnimation = loadAnimation; +lottie.setSubframeRendering = setSubframeRendering; +lottie.resize = animationManager.resize; +// lottie.start = start; +lottie.goToAndStop = animationManager.goToAndStop; +lottie.destroy = animationManager.destroy; +lottie.setQuality = setQuality; +lottie.inBrowser = inBrowser; +lottie.installPlugin = installPlugin; +lottie.freeze = animationManager.freeze; +lottie.unfreeze = animationManager.unfreeze; +lottie.setVolume = animationManager.setVolume; +lottie.mute = animationManager.mute; +lottie.unmute = animationManager.unmute; +lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations; +lottie.useWebWorker = setWebWorker; +lottie.setIDPrefix = setPrefix; +lottie.__getFactory = getFactory; +lottie.version = '[[BM_VERSION]]'; + +function checkReady() { + if (document.readyState === 'complete') { + clearInterval(readyStateCheckInterval); + searchAnimations(); + } +} + +function getQueryVariable(variable) { + var vars = queryString.split('&'); + for (var i = 0; i < vars.length; i += 1) { + var pair = vars[i].split('='); + if (decodeURIComponent(pair[0]) == variable) { // eslint-disable-line eqeqeq + return decodeURIComponent(pair[1]); + } + } + return null; +} +var queryString = ''; +if (standalone) { + var scripts = document.getElementsByTagName('script'); + var index = scripts.length - 1; + var myScript = scripts[index] || { + src: '', + }; + queryString = myScript.src ? myScript.src.replace(/^[^\?]+\??/, '') : ''; // eslint-disable-line no-useless-escape + renderer = getQueryVariable('renderer'); +} +var readyStateCheckInterval = setInterval(checkReady, 100); + +// this adds bodymovin to the window object for backwards compatibility +try { + if (!(typeof exports === 'object' && typeof module !== 'undefined') + && !(typeof define === 'function' && define.amd) // eslint-disable-line no-undef + ) { + window.bodymovin = lottie; + } +} catch (err) { + // +} + +const ShapeModifiers = (function () { + var ob = {}; + var modifiers = {}; + ob.registerModifier = registerModifier; + ob.getModifier = getModifier; + + function registerModifier(nm, factory) { + if (!modifiers[nm]) { + modifiers[nm] = factory; + } + } + + function getModifier(nm, elem, data) { + return new modifiers[nm](elem, data); + } + + return ob; +}()); + +function ShapeModifier() {} +ShapeModifier.prototype.initModifierProperties = function () {}; +ShapeModifier.prototype.addShapeToModifier = function () {}; +ShapeModifier.prototype.addShape = function (data) { + if (!this.closed) { + // Adding shape to dynamic properties. It covers the case where a shape has no effects applied, to reset it's _mdf state on every tick. + data.sh.container.addDynamicProperty(data.sh); + var shapeData = { shape: data.sh, data: data, localShapeCollection: shapeCollectionPool.newShapeCollection() }; + this.shapes.push(shapeData); + this.addShapeToModifier(shapeData); + if (this._isAnimated) { + data.setAsAnimated(); + } + } +}; +ShapeModifier.prototype.init = function (elem, data) { + this.shapes = []; + this.elem = elem; + this.initDynamicPropertyContainer(elem); + this.initModifierProperties(elem, data); + this.frameId = initialDefaultFrame; + this.closed = false; + this.k = false; + if (this.dynamicProperties.length) { + this.k = true; + } else { + this.getValue(true); + } +}; +ShapeModifier.prototype.processKeys = function () { + if (this.elem.globalData.frameId === this.frameId) { + return; + } + this.frameId = this.elem.globalData.frameId; + this.iterateDynamicProperties(); +}; + +extendPrototype([DynamicPropertyContainer], ShapeModifier); + +function TrimModifier() { +} +extendPrototype([ShapeModifier], TrimModifier); +TrimModifier.prototype.initModifierProperties = function (elem, data) { + this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this); + this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this); + this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this); + this.sValue = 0; + this.eValue = 0; + this.getValue = this.processKeys; + this.m = data.m; + this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length; +}; + +TrimModifier.prototype.addShapeToModifier = function (shapeData) { + shapeData.pathsData = []; +}; + +TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) { + var segments = []; + if (e <= 1) { + segments.push({ + s: s, + e: e, + }); + } else if (s >= 1) { + segments.push({ + s: s - 1, + e: e - 1, + }); + } else { + segments.push({ + s: s, + e: 1, + }); + segments.push({ + s: 0, + e: e - 1, + }); + } + var shapeSegments = []; + var i; + var len = segments.length; + var segmentOb; + for (i = 0; i < len; i += 1) { + segmentOb = segments[i]; + if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) { + var shapeS; + var shapeE; + if (segmentOb.s * totalModifierLength <= addedLength) { + shapeS = 0; + } else { + shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength; + } + if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) { + shapeE = 1; + } else { + shapeE = ((segmentOb.e * totalModifierLength - addedLength) / shapeLength); + } + shapeSegments.push([shapeS, shapeE]); + } + } + if (!shapeSegments.length) { + shapeSegments.push([0, 0]); + } + return shapeSegments; +}; + +TrimModifier.prototype.releasePathsData = function (pathsData) { + var i; + var len = pathsData.length; + for (i = 0; i < len; i += 1) { + segmentsLengthPool.release(pathsData[i]); + } + pathsData.length = 0; + return pathsData; +}; + +TrimModifier.prototype.processShapes = function (_isFirstFrame) { + var s; + var e; + if (this._mdf || _isFirstFrame) { + var o = (this.o.v % 360) / 360; + if (o < 0) { + o += 1; + } + if (this.s.v > 1) { + s = 1 + o; + } else if (this.s.v < 0) { + s = 0 + o; + } else { + s = this.s.v + o; + } + if (this.e.v > 1) { + e = 1 + o; + } else if (this.e.v < 0) { + e = 0 + o; + } else { + e = this.e.v + o; + } + + if (s > e) { + var _s = s; + s = e; + e = _s; + } + s = Math.round(s * 10000) * 0.0001; + e = Math.round(e * 10000) * 0.0001; + this.sValue = s; + this.eValue = e; + } else { + s = this.sValue; + e = this.eValue; + } + var shapePaths; + var i; + var len = this.shapes.length; + var j; + var jLen; + var pathsData; + var pathData; + var totalShapeLength; + var totalModifierLength = 0; + + if (e === s) { + for (i = 0; i < len; i += 1) { + this.shapes[i].localShapeCollection.releaseShapes(); + this.shapes[i].shape._mdf = true; + this.shapes[i].shape.paths = this.shapes[i].localShapeCollection; + if (this._mdf) { + this.shapes[i].pathsData.length = 0; + } + } + } else if (!((e === 1 && s === 0) || (e === 0 && s === 1))) { + var segments = []; + var shapeData; + var localShapeCollection; + for (i = 0; i < len; i += 1) { + shapeData = this.shapes[i]; + // if shape hasn't changed and trim properties haven't changed, cached previous path can be used + if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) { + shapeData.shape.paths = shapeData.localShapeCollection; + } else { + shapePaths = shapeData.shape.paths; + jLen = shapePaths._length; + totalShapeLength = 0; + if (!shapeData.shape._mdf && shapeData.pathsData.length) { + totalShapeLength = shapeData.totalShapeLength; + } else { + pathsData = this.releasePathsData(shapeData.pathsData); + for (j = 0; j < jLen; j += 1) { + pathData = bez.getSegmentsLength(shapePaths.shapes[j]); + pathsData.push(pathData); + totalShapeLength += pathData.totalLength; + } + shapeData.totalShapeLength = totalShapeLength; + shapeData.pathsData = pathsData; + } + + totalModifierLength += totalShapeLength; + shapeData.shape._mdf = true; + } + } + var shapeS = s; + var shapeE = e; + var addedLength = 0; + var edges; + for (i = len - 1; i >= 0; i -= 1) { + shapeData = this.shapes[i]; + if (shapeData.shape._mdf) { + localShapeCollection = shapeData.localShapeCollection; + localShapeCollection.releaseShapes(); + // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group + if (this.m === 2 && len > 1) { + edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength); + addedLength += shapeData.totalShapeLength; + } else { + edges = [[shapeS, shapeE]]; + } + jLen = edges.length; + for (j = 0; j < jLen; j += 1) { + shapeS = edges[j][0]; + shapeE = edges[j][1]; + segments.length = 0; + if (shapeE <= 1) { + segments.push({ + s: shapeData.totalShapeLength * shapeS, + e: shapeData.totalShapeLength * shapeE, + }); + } else if (shapeS >= 1) { + segments.push({ + s: shapeData.totalShapeLength * (shapeS - 1), + e: shapeData.totalShapeLength * (shapeE - 1), + }); + } else { + segments.push({ + s: shapeData.totalShapeLength * shapeS, + e: shapeData.totalShapeLength, + }); + segments.push({ + s: 0, + e: shapeData.totalShapeLength * (shapeE - 1), + }); + } + var newShapesData = this.addShapes(shapeData, segments[0]); + if (segments[0].s !== segments[0].e) { + if (segments.length > 1) { + var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1]; + if (lastShapeInCollection.c) { + var lastShape = newShapesData.pop(); + this.addPaths(newShapesData, localShapeCollection); + newShapesData = this.addShapes(shapeData, segments[1], lastShape); + } else { + this.addPaths(newShapesData, localShapeCollection); + newShapesData = this.addShapes(shapeData, segments[1]); + } + } + this.addPaths(newShapesData, localShapeCollection); + } + } + shapeData.shape.paths = localShapeCollection; + } + } + } else if (this._mdf) { + for (i = 0; i < len; i += 1) { + // Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween. + // Don't remove this even if it's losing cached info. + this.shapes[i].pathsData.length = 0; + this.shapes[i].shape._mdf = true; + } + } +}; + +TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) { + var i; + var len = newPaths.length; + for (i = 0; i < len; i += 1) { + localShapeCollection.addShape(newPaths[i]); + } +}; + +TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) { + shapePath.setXYAt(pt2[0], pt2[1], 'o', pos); + shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1); + if (newShape) { + shapePath.setXYAt(pt1[0], pt1[1], 'v', pos); + } + shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1); +}; + +TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) { + shapePath.setXYAt(points[1], points[5], 'o', pos); + shapePath.setXYAt(points[2], points[6], 'i', pos + 1); + if (newShape) { + shapePath.setXYAt(points[0], points[4], 'v', pos); + } + shapePath.setXYAt(points[3], points[7], 'v', pos + 1); +}; + +TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) { + var pathsData = shapeData.pathsData; + var shapePaths = shapeData.shape.paths.shapes; + var i; + var len = shapeData.shape.paths._length; + var j; + var jLen; + var addedLength = 0; + var currentLengthData; + var segmentCount; + var lengths; + var segment; + var shapes = []; + var initPos; + var newShape = true; + if (!shapePath) { + shapePath = shapePool.newElement(); + segmentCount = 0; + initPos = 0; + } else { + segmentCount = shapePath._length; + initPos = shapePath._length; + } + shapes.push(shapePath); + for (i = 0; i < len; i += 1) { + lengths = pathsData[i].lengths; + shapePath.c = shapePaths[i].c; + jLen = shapePaths[i].c ? lengths.length : lengths.length + 1; + for (j = 1; j < jLen; j += 1) { + currentLengthData = lengths[j - 1]; + if (addedLength + currentLengthData.addedLength < shapeSegment.s) { + addedLength += currentLengthData.addedLength; + shapePath.c = false; + } else if (addedLength > shapeSegment.e) { + shapePath.c = false; + break; + } else { + if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) { + this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape); + newShape = false; + } else { + segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[j], shapePaths[i].o[j - 1], shapePaths[i].i[j], (shapeSegment.s - addedLength) / currentLengthData.addedLength, (shapeSegment.e - addedLength) / currentLengthData.addedLength, lengths[j - 1]); + this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); + // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape); + newShape = false; + shapePath.c = false; + } + addedLength += currentLengthData.addedLength; + segmentCount += 1; + } + } + if (shapePaths[i].c && lengths.length) { + currentLengthData = lengths[j - 1]; + if (addedLength <= shapeSegment.e) { + var segmentLength = lengths[j - 1].addedLength; + if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) { + this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape); + newShape = false; + } else { + segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[0], shapePaths[i].o[j - 1], shapePaths[i].i[0], (shapeSegment.s - addedLength) / segmentLength, (shapeSegment.e - addedLength) / segmentLength, lengths[j - 1]); + this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); + // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape); + newShape = false; + shapePath.c = false; + } + } else { + shapePath.c = false; + } + addedLength += currentLengthData.addedLength; + segmentCount += 1; + } + if (shapePath._length) { + shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos); + shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1); + } + if (addedLength > shapeSegment.e) { + break; + } + if (i < len - 1) { + shapePath = shapePool.newElement(); + newShape = true; + shapes.push(shapePath); + segmentCount = 0; + } + } + return shapes; +}; + +function PuckerAndBloatModifier() {} +extendPrototype([ShapeModifier], PuckerAndBloatModifier); +PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) { + this.getValue = this.processKeys; + this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this); + this._isAnimated = !!this.amount.effectsSequence.length; +}; + +PuckerAndBloatModifier.prototype.processPath = function (path, amount) { + var percent = amount / 100; + var centerPoint = [0, 0]; + var pathLength = path._length; + var i = 0; + for (i = 0; i < pathLength; i += 1) { + centerPoint[0] += path.v[i][0]; + centerPoint[1] += path.v[i][1]; + } + centerPoint[0] /= pathLength; + centerPoint[1] /= pathLength; + var clonedPath = shapePool.newElement(); + clonedPath.c = path.c; + var vX; + var vY; + var oX; + var oY; + var iX; + var iY; + for (i = 0; i < pathLength; i += 1) { + vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent; + vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent; + oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent; + oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent; + iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent; + iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent; + clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i); + } + return clonedPath; +}; + +PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) { + var shapePaths; + var i; + var len = this.shapes.length; + var j; + var jLen; + var amount = this.amount.v; + + if (amount !== 0) { + var shapeData; + var localShapeCollection; + for (i = 0; i < len; i += 1) { + shapeData = this.shapes[i]; + localShapeCollection = shapeData.localShapeCollection; + if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) { + localShapeCollection.releaseShapes(); + shapeData.shape._mdf = true; + shapePaths = shapeData.shape.paths.shapes; + jLen = shapeData.shape.paths._length; + for (j = 0; j < jLen; j += 1) { + localShapeCollection.addShape(this.processPath(shapePaths[j], amount)); + } + } + shapeData.shape.paths = shapeData.localShapeCollection; + } + } + if (!this.dynamicProperties.length) { + this._mdf = false; + } +}; + +const TransformPropertyFactory = (function () { + var defaultVector = [0, 0]; + + function applyToMatrix(mat) { + var _mdf = this._mdf; + this.iterateDynamicProperties(); + this._mdf = this._mdf || _mdf; + if (this.a) { + mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]); + } + if (this.s) { + mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]); + } + if (this.sk) { + mat.skewFromAxis(-this.sk.v, this.sa.v); + } + if (this.r) { + mat.rotate(-this.r.v); + } else { + mat.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]) + .rotateY(this.or.v[1]) + .rotateX(this.or.v[0]); + } + if (this.data.p.s) { + if (this.data.p.z) { + mat.translate(this.px.v, this.py.v, -this.pz.v); + } else { + mat.translate(this.px.v, this.py.v, 0); + } + } else { + mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]); + } + } + function processKeys(forceRender) { + if (this.elem.globalData.frameId === this.frameId) { + return; + } + if (this._isDirty) { + this.precalculateMatrix(); + this._isDirty = false; + } + + this.iterateDynamicProperties(); + + if (this._mdf || forceRender) { + var frameRate; + this.v.cloneFromProps(this.pre.props); + if (this.appliedTransformations < 1) { + this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]); + } + if (this.appliedTransformations < 2) { + this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]); + } + if (this.sk && this.appliedTransformations < 3) { + this.v.skewFromAxis(-this.sk.v, this.sa.v); + } + if (this.r && this.appliedTransformations < 4) { + this.v.rotate(-this.r.v); + } else if (!this.r && this.appliedTransformations < 4) { + this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]) + .rotateY(this.or.v[1]) + .rotateX(this.or.v[0]); + } + if (this.autoOriented) { + var v1; + var v2; + frameRate = this.elem.globalData.frameRate; + if (this.p && this.p.keyframes && this.p.getValueAtTime) { + if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) { + v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0); + v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0); + } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) { + v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / frameRate), 0); + v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0); + } else { + v1 = this.p.pv; + v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime); + } + } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) { + v1 = []; + v2 = []; + var px = this.px; + var py = this.py; + if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) { + v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0); + v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0); + v2[0] = px.getValueAtTime((px.keyframes[0].t) / frameRate, 0); + v2[1] = py.getValueAtTime((py.keyframes[0].t) / frameRate, 0); + } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) { + v1[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t / frameRate), 0); + v1[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t / frameRate), 0); + v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0); + v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0); + } else { + v1 = [px.pv, py.pv]; + v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime); + v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime); + } + } else { + v2 = defaultVector; + v1 = v2; + } + this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0])); + } + if (this.data.p && this.data.p.s) { + if (this.data.p.z) { + this.v.translate(this.px.v, this.py.v, -this.pz.v); + } else { + this.v.translate(this.px.v, this.py.v, 0); + } + } else { + this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]); + } + } + this.frameId = this.elem.globalData.frameId; + } + + function precalculateMatrix() { + if (!this.a.k) { + this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]); + this.appliedTransformations = 1; + } else { + return; + } + if (!this.s.effectsSequence.length) { + this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]); + this.appliedTransformations = 2; + } else { + return; + } + if (this.sk) { + if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) { + this.pre.skewFromAxis(-this.sk.v, this.sa.v); + this.appliedTransformations = 3; + } else { + return; + } + } + if (this.r) { + if (!this.r.effectsSequence.length) { + this.pre.rotate(-this.r.v); + this.appliedTransformations = 4; + } + } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) { + this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]) + .rotateY(this.or.v[1]) + .rotateX(this.or.v[0]); + this.appliedTransformations = 4; + } + } + + function autoOrient() { + // + // var prevP = this.getValueAtTime(); + } + + function addDynamicProperty(prop) { + this._addDynamicProperty(prop); + this.elem.addDynamicProperty(prop); + this._isDirty = true; + } + + function TransformProperty(elem, data, container) { + this.elem = elem; + this.frameId = -1; + this.propType = 'transform'; + this.data = data; + this.v = new Matrix(); + // Precalculated matrix with non animated properties + this.pre = new Matrix(); + this.appliedTransformations = 0; + this.initDynamicPropertyContainer(container || elem); + if (data.p && data.p.s) { + this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this); + this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this); + if (data.p.z) { + this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this); + } + } else { + this.p = PropertyFactory.getProp(elem, data.p || { k: [0, 0, 0] }, 1, 0, this); + } + if (data.rx) { + this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this); + this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this); + this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this); + if (data.or.k[0].ti) { + var i; + var len = data.or.k.length; + for (i = 0; i < len; i += 1) { + data.or.k[i].to = null; + data.or.k[i].ti = null; + } + } + this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); + // sh Indicates it needs to be capped between -180 and 180 + this.or.sh = true; + } else { + this.r = PropertyFactory.getProp(elem, data.r || { k: 0 }, 0, degToRads, this); + } + if (data.sk) { + this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this); + this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this); + } + this.a = PropertyFactory.getProp(elem, data.a || { k: [0, 0, 0] }, 1, 0, this); + this.s = PropertyFactory.getProp(elem, data.s || { k: [100, 100, 100] }, 1, 0.01, this); + // Opacity is not part of the transform properties, that's why it won't use this.dynamicProperties. That way transforms won't get updated if opacity changes. + if (data.o) { + this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem); + } else { + this.o = { _mdf: false, v: 1 }; + } + this._isDirty = true; + if (!this.dynamicProperties.length) { + this.getValue(true); + } + } + + TransformProperty.prototype = { + applyToMatrix: applyToMatrix, + getValue: processKeys, + precalculateMatrix: precalculateMatrix, + autoOrient: autoOrient, + }; + + extendPrototype([DynamicPropertyContainer], TransformProperty); + TransformProperty.prototype.addDynamicProperty = addDynamicProperty; + TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty; + + function getTransformProperty(elem, data, container) { + return new TransformProperty(elem, data, container); + } + + return { + getTransformProperty: getTransformProperty, + }; +}()); + +function RepeaterModifier() {} +extendPrototype([ShapeModifier], RepeaterModifier); + +RepeaterModifier.prototype.initModifierProperties = function (elem, data) { + this.getValue = this.processKeys; + this.c = PropertyFactory.getProp(elem, data.c, 0, null, this); + this.o = PropertyFactory.getProp(elem, data.o, 0, null, this); + this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this); + this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this); + this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this); + this.data = data; + if (!this.dynamicProperties.length) { + this.getValue(true); + } + this._isAnimated = !!this.dynamicProperties.length; + this.pMatrix = new Matrix(); + this.rMatrix = new Matrix(); + this.sMatrix = new Matrix(); + this.tMatrix = new Matrix(); + this.matrix = new Matrix(); +}; + +RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) { + var dir = inv ? -1 : 1; + var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc); + var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc); + pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]); + rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]); + rMatrix.rotate(-transform.r.v * dir * perc); + rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]); + sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]); + sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY); + sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]); +}; + +RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) { + this.elem = elem; + this.arr = arr; + this.pos = pos; + this.elemsData = elemsData; + this._currentCopies = 0; + this._elements = []; + this._groups = []; + this.frameId = -1; + this.initDynamicPropertyContainer(elem); + this.initModifierProperties(elem, arr[pos]); + while (pos > 0) { + pos -= 1; + // this._elements.unshift(arr.splice(pos,1)[0]); + this._elements.unshift(arr[pos]); + } + if (this.dynamicProperties.length) { + this.k = true; + } else { + this.getValue(true); + } +}; + +RepeaterModifier.prototype.resetElements = function (elements) { + var i; + var len = elements.length; + for (i = 0; i < len; i += 1) { + elements[i]._processed = false; + if (elements[i].ty === 'gr') { + this.resetElements(elements[i].it); + } + } +}; + +RepeaterModifier.prototype.cloneElements = function (elements) { + var newElements = JSON.parse(JSON.stringify(elements)); + this.resetElements(newElements); + return newElements; +}; + +RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) { + var i; + var len = elements.length; + for (i = 0; i < len; i += 1) { + elements[i]._render = renderFlag; + if (elements[i].ty === 'gr') { + this.changeGroupRender(elements[i].it, renderFlag); + } + } +}; + +RepeaterModifier.prototype.processShapes = function (_isFirstFrame) { + var items; + var itemsTransform; + var i; + var dir; + var cont; + var hasReloaded = false; + if (this._mdf || _isFirstFrame) { + var copies = Math.ceil(this.c.v); + if (this._groups.length < copies) { + while (this._groups.length < copies) { + var group = { + it: this.cloneElements(this._elements), + ty: 'gr', + }; + group.it.push({ + a: { a: 0, ix: 1, k: [0, 0] }, nm: 'Transform', o: { a: 0, ix: 7, k: 100 }, p: { a: 0, ix: 2, k: [0, 0] }, r: { a: 1, ix: 6, k: [{ s: 0, e: 0, t: 0 }, { s: 0, e: 0, t: 1 }] }, s: { a: 0, ix: 3, k: [100, 100] }, sa: { a: 0, ix: 5, k: 0 }, sk: { a: 0, ix: 4, k: 0 }, ty: 'tr', + }); + + this.arr.splice(0, 0, group); + this._groups.splice(0, 0, group); + this._currentCopies += 1; + } + this.elem.reloadShapes(); + hasReloaded = true; + } + cont = 0; + var renderFlag; + for (i = 0; i <= this._groups.length - 1; i += 1) { + renderFlag = cont < copies; + this._groups[i]._render = renderFlag; + this.changeGroupRender(this._groups[i].it, renderFlag); + if (!renderFlag) { + var elems = this.elemsData[i].it; + var transformData = elems[elems.length - 1]; + if (transformData.transform.op.v !== 0) { + transformData.transform.op._mdf = true; + transformData.transform.op.v = 0; + } else { + transformData.transform.op._mdf = false; + } + } + cont += 1; + } + + this._currentCopies = copies; + /// / + + var offset = this.o.v; + var offsetModulo = offset % 1; + var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset); + var pProps = this.pMatrix.props; + var rProps = this.rMatrix.props; + var sProps = this.sMatrix.props; + this.pMatrix.reset(); + this.rMatrix.reset(); + this.sMatrix.reset(); + this.tMatrix.reset(); + this.matrix.reset(); + var iteration = 0; + + if (offset > 0) { + while (iteration < roundOffset) { + this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false); + iteration += 1; + } + if (offsetModulo) { + this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false); + iteration += offsetModulo; + } + } else if (offset < 0) { + while (iteration > roundOffset) { + this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true); + iteration -= 1; + } + if (offsetModulo) { + this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true); + iteration -= offsetModulo; + } + } + i = this.data.m === 1 ? 0 : this._currentCopies - 1; + dir = this.data.m === 1 ? 1 : -1; + cont = this._currentCopies; + var j; + var jLen; + while (cont) { + items = this.elemsData[i].it; + itemsTransform = items[items.length - 1].transform.mProps.v.props; + jLen = itemsTransform.length; + items[items.length - 1].transform.mProps._mdf = true; + items[items.length - 1].transform.op._mdf = true; + items[items.length - 1].transform.op.v = this._currentCopies === 1 + ? this.so.v + : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1)); + + if (iteration !== 0) { + if ((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)) { + this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false); + } + this.matrix.transform(rProps[0], rProps[1], rProps[2], rProps[3], rProps[4], rProps[5], rProps[6], rProps[7], rProps[8], rProps[9], rProps[10], rProps[11], rProps[12], rProps[13], rProps[14], rProps[15]); + this.matrix.transform(sProps[0], sProps[1], sProps[2], sProps[3], sProps[4], sProps[5], sProps[6], sProps[7], sProps[8], sProps[9], sProps[10], sProps[11], sProps[12], sProps[13], sProps[14], sProps[15]); + this.matrix.transform(pProps[0], pProps[1], pProps[2], pProps[3], pProps[4], pProps[5], pProps[6], pProps[7], pProps[8], pProps[9], pProps[10], pProps[11], pProps[12], pProps[13], pProps[14], pProps[15]); + + for (j = 0; j < jLen; j += 1) { + itemsTransform[j] = this.matrix.props[j]; + } + this.matrix.reset(); + } else { + this.matrix.reset(); + for (j = 0; j < jLen; j += 1) { + itemsTransform[j] = this.matrix.props[j]; + } + } + iteration += 1; + cont -= 1; + i += dir; + } + } else { + cont = this._currentCopies; + i = 0; + dir = 1; + while (cont) { + items = this.elemsData[i].it; + itemsTransform = items[items.length - 1].transform.mProps.v.props; + items[items.length - 1].transform.mProps._mdf = false; + items[items.length - 1].transform.op._mdf = false; + cont -= 1; + i += dir; + } + } + return hasReloaded; +}; + +RepeaterModifier.prototype.addShape = function () {}; + +function RoundCornersModifier() {} +extendPrototype([ShapeModifier], RoundCornersModifier); +RoundCornersModifier.prototype.initModifierProperties = function (elem, data) { + this.getValue = this.processKeys; + this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this); + this._isAnimated = !!this.rd.effectsSequence.length; +}; + +RoundCornersModifier.prototype.processPath = function (path, round) { + var clonedPath = shapePool.newElement(); + clonedPath.c = path.c; + var i; + var len = path._length; + var currentV; + var currentI; + var currentO; + var closerV; + var distance; + var newPosPerc; + var index = 0; + var vX; + var vY; + var oX; + var oY; + var iX; + var iY; + for (i = 0; i < len; i += 1) { + currentV = path.v[i]; + currentO = path.o[i]; + currentI = path.i[i]; + if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) { + if ((i === 0 || i === len - 1) && !path.c) { + clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index); + /* clonedPath.v[index] = currentV; + clonedPath.o[index] = currentO; + clonedPath.i[index] = currentI; */ + index += 1; + } else { + if (i === 0) { + closerV = path.v[len - 1]; + } else { + closerV = path.v[i - 1]; + } + distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2)); + newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0; + iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc; + vX = iX; + iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc; + vY = iY; + oX = vX - (vX - currentV[0]) * roundCorner; + oY = vY - (vY - currentV[1]) * roundCorner; + clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index); + index += 1; + + if (i === len - 1) { + closerV = path.v[0]; + } else { + closerV = path.v[i + 1]; + } + distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2)); + newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0; + oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc; + vX = oX; + oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc; + vY = oY; + iX = vX - (vX - currentV[0]) * roundCorner; + iY = vY - (vY - currentV[1]) * roundCorner; + clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index); + index += 1; + } + } else { + clonedPath.setTripleAt(path.v[i][0], path.v[i][1], path.o[i][0], path.o[i][1], path.i[i][0], path.i[i][1], index); + index += 1; + } + } + return clonedPath; +}; + +RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) { + var shapePaths; + var i; + var len = this.shapes.length; + var j; + var jLen; + var rd = this.rd.v; + + if (rd !== 0) { + var shapeData; + var localShapeCollection; + for (i = 0; i < len; i += 1) { + shapeData = this.shapes[i]; + localShapeCollection = shapeData.localShapeCollection; + if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) { + localShapeCollection.releaseShapes(); + shapeData.shape._mdf = true; + shapePaths = shapeData.shape.paths.shapes; + jLen = shapeData.shape.paths._length; + for (j = 0; j < jLen; j += 1) { + localShapeCollection.addShape(this.processPath(shapePaths[j], rd)); + } + } + shapeData.shape.paths = shapeData.localShapeCollection; + } + } + if (!this.dynamicProperties.length) { + this._mdf = false; + } +}; + +function getFontProperties(fontData) { + var styles = fontData.fStyle ? fontData.fStyle.split(' ') : []; + + var fWeight = 'normal'; var + fStyle = 'normal'; + var len = styles.length; + var styleName; + for (var i = 0; i < len; i += 1) { + styleName = styles[i].toLowerCase(); + switch (styleName) { + case 'italic': + fStyle = 'italic'; + break; + case 'bold': + fWeight = '700'; + break; + case 'black': + fWeight = '900'; + break; + case 'medium': + fWeight = '500'; + break; + case 'regular': + case 'normal': + fWeight = '400'; + break; + case 'light': + case 'thin': + fWeight = '200'; + break; + default: + break; + } + } + + return { + style: fStyle, + weight: fontData.fWeight || fWeight, + }; +} + +const FontManager = (function () { + var maxWaitingTime = 5000; + var emptyChar = { + w: 0, + size: 0, + shapes: [], + data: { + shapes: [], + }, + }; + var combinedCharacters = []; + // Hindi characters + combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, + 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, + 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]); + + var surrogateModifiers = [ + 'd83cdffb', + 'd83cdffc', + 'd83cdffd', + 'd83cdffe', + 'd83cdfff', + ]; + + var zeroWidthJoiner = [65039, 8205]; + + function trimFontOptions(font) { + var familyArray = font.split(','); + var i; + var len = familyArray.length; + var enabledFamilies = []; + for (i = 0; i < len; i += 1) { + if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') { + enabledFamilies.push(familyArray[i]); + } + } + return enabledFamilies.join(','); + } + + function setUpNode(font, family) { + var parentNode = createTag('span'); + // Node is invisible to screen readers. + parentNode.setAttribute('aria-hidden', true); + parentNode.style.fontFamily = family; + var node = createTag('span'); + // Characters that vary significantly among different fonts + node.innerText = 'giItT1WQy@!-/#'; + // Visible - so we can measure it - but not on the screen + parentNode.style.position = 'absolute'; + parentNode.style.left = '-10000px'; + parentNode.style.top = '-10000px'; + // Large font size makes even subtle changes obvious + parentNode.style.fontSize = '300px'; + // Reset any font properties + parentNode.style.fontVariant = 'normal'; + parentNode.style.fontStyle = 'normal'; + parentNode.style.fontWeight = 'normal'; + parentNode.style.letterSpacing = '0'; + parentNode.appendChild(node); + document.body.appendChild(parentNode); + + // Remember width with no applied web font + var width = node.offsetWidth; + node.style.fontFamily = trimFontOptions(font) + ', ' + family; + return { node: node, w: width, parent: parentNode }; + } + + function checkLoadedFonts() { + var i; + var len = this.fonts.length; + var node; + var w; + var loadedCount = len; + for (i = 0; i < len; i += 1) { + if (this.fonts[i].loaded) { + loadedCount -= 1; + } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) { + this.fonts[i].loaded = true; + } else { + node = this.fonts[i].monoCase.node; + w = this.fonts[i].monoCase.w; + if (node.offsetWidth !== w) { + loadedCount -= 1; + this.fonts[i].loaded = true; + } else { + node = this.fonts[i].sansCase.node; + w = this.fonts[i].sansCase.w; + if (node.offsetWidth !== w) { + loadedCount -= 1; + this.fonts[i].loaded = true; + } + } + if (this.fonts[i].loaded) { + this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent); + this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent); + } + } + } + + if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) { + setTimeout(this.checkLoadedFontsBinded, 20); + } else { + setTimeout(this.setIsLoadedBinded, 10); + } + } + + function createHelper(fontData, def) { + var engine = (document.body && def) ? 'svg' : 'canvas'; + var helper; + var fontProps = getFontProperties(fontData); + if (engine === 'svg') { + var tHelper = createNS('text'); + tHelper.style.fontSize = '100px'; + // tHelper.style.fontFamily = fontData.fFamily; + tHelper.setAttribute('font-family', fontData.fFamily); + tHelper.setAttribute('font-style', fontProps.style); + tHelper.setAttribute('font-weight', fontProps.weight); + tHelper.textContent = '1'; + if (fontData.fClass) { + tHelper.style.fontFamily = 'inherit'; + tHelper.setAttribute('class', fontData.fClass); + } else { + tHelper.style.fontFamily = fontData.fFamily; + } + def.appendChild(tHelper); + helper = tHelper; + } else { + var tCanvasHelper = new OffscreenCanvas(500, 500).getContext('2d'); + tCanvasHelper.font = fontProps.style + ' ' + fontProps.weight + ' 100px ' + fontData.fFamily; + helper = tCanvasHelper; + } + function measure(text) { + if (engine === 'svg') { + helper.textContent = text; + return helper.getComputedTextLength(); + } + return helper.measureText(text).width; + } + return { + measureText: measure, + }; + } + + function addFonts(fontData, defs) { + if (!fontData) { + this.isLoaded = true; + return; + } + if (this.chars) { + this.isLoaded = true; + this.fonts = fontData.list; + return; + } + if (!document.body) { + this.isLoaded = true; + fontData.list.forEach((data) => { + data.helper = createHelper(data); + data.cache = {}; + }); + this.fonts = fontData.list; + return; + } + + var fontArr = fontData.list; + var i; + var len = fontArr.length; + var _pendingFonts = len; + for (i = 0; i < len; i += 1) { + var shouldLoadFont = true; + var loadedSelector; + var j; + fontArr[i].loaded = false; + fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace'); + fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif'); + if (!fontArr[i].fPath) { + fontArr[i].loaded = true; + _pendingFonts -= 1; + } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) { + loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]'); + + if (loadedSelector.length > 0) { + shouldLoadFont = false; + } + + if (shouldLoadFont) { + var s = createTag('style'); + s.setAttribute('f-forigin', fontArr[i].fOrigin); + s.setAttribute('f-origin', fontArr[i].origin); + s.setAttribute('f-family', fontArr[i].fFamily); + s.type = 'text/css'; + s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}"; + defs.appendChild(s); + } + } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) { + loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'); + + for (j = 0; j < loadedSelector.length; j += 1) { + if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) { + // Font is already loaded + shouldLoadFont = false; + } + } + + if (shouldLoadFont) { + var l = createTag('link'); + l.setAttribute('f-forigin', fontArr[i].fOrigin); + l.setAttribute('f-origin', fontArr[i].origin); + l.type = 'text/css'; + l.rel = 'stylesheet'; + l.href = fontArr[i].fPath; + document.body.appendChild(l); + } + } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) { + loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'); + + for (j = 0; j < loadedSelector.length; j += 1) { + if (fontArr[i].fPath === loadedSelector[j].src) { + // Font is already loaded + shouldLoadFont = false; + } + } + + if (shouldLoadFont) { + var sc = createTag('link'); + sc.setAttribute('f-forigin', fontArr[i].fOrigin); + sc.setAttribute('f-origin', fontArr[i].origin); + sc.setAttribute('rel', 'stylesheet'); + sc.setAttribute('href', fontArr[i].fPath); + defs.appendChild(sc); + } + } + fontArr[i].helper = createHelper(fontArr[i], defs); + fontArr[i].cache = {}; + this.fonts.push(fontArr[i]); + } + if (_pendingFonts === 0) { + this.isLoaded = true; + } else { + // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas. + // Adding this timeout seems to fix it + setTimeout(this.checkLoadedFonts.bind(this), 100); + } + } + + function addChars(chars) { + if (!chars) { + return; + } + if (!this.chars) { + this.chars = []; + } + var i; + var len = chars.length; + var j; + var jLen = this.chars.length; + var found; + for (i = 0; i < len; i += 1) { + j = 0; + found = false; + while (j < jLen) { + if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) { + found = true; + } + j += 1; + } + if (!found) { + this.chars.push(chars[i]); + jLen += 1; + } + } + } + + function getCharData(char, style, font) { + var i = 0; + var len = this.chars.length; + while (i < len) { + if (this.chars[i].ch === char && this.chars[i].style === style && this.chars[i].fFamily === font) { + return this.chars[i]; + } + i += 1; + } + if (((typeof char === 'string' && char.charCodeAt(0) !== 13) || !char) + && console + && console.warn // eslint-disable-line no-console + && !this._warned + ) { + this._warned = true; + console.warn('Missing character from exported characters list: ', char, style, font); // eslint-disable-line no-console + } + return emptyChar; + } + + function measureText(char, fontName, size) { + var fontData = this.getFontByName(fontName); + var index = char.charCodeAt(0); + if (!fontData.cache[index + 1]) { + var tHelper = fontData.helper; + if (char === ' ') { + var doubleSize = tHelper.measureText('|' + char + '|'); + var singleSize = tHelper.measureText('||'); + fontData.cache[index + 1] = (doubleSize - singleSize) / 100; + } else { + fontData.cache[index + 1] = tHelper.measureText(char) / 100; + } + } + return fontData.cache[index + 1] * size; + } + + function getFontByName(name) { + var i = 0; + var len = this.fonts.length; + while (i < len) { + if (this.fonts[i].fName === name) { + return this.fonts[i]; + } + i += 1; + } + return this.fonts[0]; + } + + function isModifier(firstCharCode, secondCharCode) { + var sum = firstCharCode.toString(16) + secondCharCode.toString(16); + return surrogateModifiers.indexOf(sum) !== -1; + } + + function isZeroWidthJoiner(firstCharCode, secondCharCode) { + if (!secondCharCode) { + return firstCharCode === zeroWidthJoiner[1]; + } + return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1]; + } + + function isCombinedCharacter(char) { + return combinedCharacters.indexOf(char) !== -1; + } + + function setIsLoaded() { + this.isLoaded = true; + } + + var Font = function () { + this.fonts = []; + this.chars = null; + this.typekitLoaded = 0; + this.isLoaded = false; + this._warned = false; + this.initTime = Date.now(); + this.setIsLoadedBinded = this.setIsLoaded.bind(this); + this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this); + }; + Font.isModifier = isModifier; + Font.isZeroWidthJoiner = isZeroWidthJoiner; + Font.isCombinedCharacter = isCombinedCharacter; + + var fontPrototype = { + addChars: addChars, + addFonts: addFonts, + getCharData: getCharData, + getFontByName: getFontByName, + measureText: measureText, + checkLoadedFonts: checkLoadedFonts, + setIsLoaded: setIsLoaded, + }; + + Font.prototype = fontPrototype; + + return Font; +}()); + +function RenderableElement() { + +} + +RenderableElement.prototype = { + initRenderable: function () { + // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange + this.isInRange = false; + // layer's display state + this.hidden = false; + // If layer's transparency equals 0, it can be hidden + this.isTransparent = false; + // list of animated components + this.renderableComponents = []; + }, + addRenderableComponent: function (component) { + if (this.renderableComponents.indexOf(component) === -1) { + this.renderableComponents.push(component); + } + }, + removeRenderableComponent: function (component) { + if (this.renderableComponents.indexOf(component) !== -1) { + this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1); + } + }, + prepareRenderableFrame: function (num) { + this.checkLayerLimits(num); + }, + checkTransparency: function () { + if (this.finalTransform.mProp.o.v <= 0) { + if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) { + this.isTransparent = true; + this.hide(); + } + } else if (this.isTransparent) { + this.isTransparent = false; + this.show(); + } + }, + /** + * @function + * Initializes frame related properties. + * + * @param {number} num + * current frame number in Layer's time + * + */ + checkLayerLimits: function (num) { + if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) { + if (this.isInRange !== true) { + this.globalData._mdf = true; + this._mdf = true; + this.isInRange = true; + this.show(); + } + } else if (this.isInRange !== false) { + this.globalData._mdf = true; + this.isInRange = false; + this.hide(); + } + }, + renderRenderable: function () { + var i; + var len = this.renderableComponents.length; + for (i = 0; i < len; i += 1) { + this.renderableComponents[i].renderFrame(this._isFirstFrame); + } + /* this.maskManager.renderFrame(this.finalTransform.mat); + this.renderableEffectsManager.renderFrame(this._isFirstFrame); */ + }, + sourceRectAtTime: function () { + return { + top: 0, + left: 0, + width: 100, + height: 100, + }; + }, + getLayerSize: function () { + if (this.data.ty === 5) { + return { w: this.data.textData.width, h: this.data.textData.height }; + } + return { w: this.data.width, h: this.data.height }; + }, +}; + +const MaskManagerInterface = (function () { + function MaskInterface(mask, data) { + this._mask = mask; + this._data = data; + } + Object.defineProperty(MaskInterface.prototype, 'maskPath', { + get: function () { + if (this._mask.prop.k) { + this._mask.prop.getValue(); + } + return this._mask.prop; + }, + }); + Object.defineProperty(MaskInterface.prototype, 'maskOpacity', { + get: function () { + if (this._mask.op.k) { + this._mask.op.getValue(); + } + return this._mask.op.v * 100; + }, + }); + + var MaskManager = function (maskManager) { + var _masksInterfaces = createSizedArray(maskManager.viewData.length); + var i; + var len = maskManager.viewData.length; + for (i = 0; i < len; i += 1) { + _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]); + } + + var maskFunction = function (name) { + i = 0; + while (i < len) { + if (maskManager.masksProperties[i].nm === name) { + return _masksInterfaces[i]; + } + i += 1; + } + return null; + }; + return maskFunction; + }; + return MaskManager; +}()); + +const ExpressionPropertyInterface = (function () { + var defaultUnidimensionalValue = { pv: 0, v: 0, mult: 1 }; + var defaultMultidimensionalValue = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 }; + + function completeProperty(expressionValue, property, type) { + Object.defineProperty(expressionValue, 'velocity', { + get: function () { + return property.getVelocityAtTime(property.comp.currentFrame); + }, + }); + expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0; + expressionValue.key = function (pos) { + if (!expressionValue.numKeys) { + return 0; + } + var value = ''; + if ('s' in property.keyframes[pos - 1]) { + value = property.keyframes[pos - 1].s; + } else if ('e' in property.keyframes[pos - 2]) { + value = property.keyframes[pos - 2].e; + } else { + value = property.keyframes[pos - 2].s; + } + var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers + valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate; + valueProp.value = type === 'unidimensional' ? value[0] : value; + return valueProp; + }; + expressionValue.valueAtTime = property.getValueAtTime; + expressionValue.speedAtTime = property.getSpeedAtTime; + expressionValue.velocityAtTime = property.getVelocityAtTime; + expressionValue.propertyGroup = property.propertyGroup; + } + + function UnidimensionalPropertyInterface(property) { + if (!property || !('pv' in property)) { + property = defaultUnidimensionalValue; + } + var mult = 1 / property.mult; + var val = property.pv * mult; + var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers + expressionValue.value = val; + completeProperty(expressionValue, property, 'unidimensional'); + + return function () { + if (property.k) { + property.getValue(); + } + val = property.v * mult; + if (expressionValue.value !== val) { + expressionValue = new Number(val); // eslint-disable-line no-new-wrappers + expressionValue.value = val; + completeProperty(expressionValue, property, 'unidimensional'); + } + return expressionValue; + }; + } + + function MultidimensionalPropertyInterface(property) { + if (!property || !('pv' in property)) { + property = defaultMultidimensionalValue; + } + var mult = 1 / property.mult; + var len = (property.data && property.data.l) || property.pv.length; + var expressionValue = createTypedArray('float32', len); + var arrValue = createTypedArray('float32', len); + expressionValue.value = arrValue; + completeProperty(expressionValue, property, 'multidimensional'); + + return function () { + if (property.k) { + property.getValue(); + } + for (var i = 0; i < len; i += 1) { + arrValue[i] = property.v[i] * mult; + expressionValue[i] = arrValue[i]; + } + return expressionValue; + }; + } + + // TODO: try to avoid using this getter + function defaultGetter() { + return defaultUnidimensionalValue; + } + + return function (property) { + if (!property) { + return defaultGetter; + } if (property.propType === 'unidimensional') { + return UnidimensionalPropertyInterface(property); + } + return MultidimensionalPropertyInterface(property); + }; +}()); + +const TransformExpressionInterface = (function () { + return function (transform) { + function _thisFunction(name) { + switch (name) { + case 'scale': + case 'Scale': + case 'ADBE Scale': + case 6: + return _thisFunction.scale; + case 'rotation': + case 'Rotation': + case 'ADBE Rotation': + case 'ADBE Rotate Z': + case 10: + return _thisFunction.rotation; + case 'ADBE Rotate X': + return _thisFunction.xRotation; + case 'ADBE Rotate Y': + return _thisFunction.yRotation; + case 'position': + case 'Position': + case 'ADBE Position': + case 2: + return _thisFunction.position; + case 'ADBE Position_0': + return _thisFunction.xPosition; + case 'ADBE Position_1': + return _thisFunction.yPosition; + case 'ADBE Position_2': + return _thisFunction.zPosition; + case 'anchorPoint': + case 'AnchorPoint': + case 'Anchor Point': + case 'ADBE AnchorPoint': + case 1: + return _thisFunction.anchorPoint; + case 'opacity': + case 'Opacity': + case 11: + return _thisFunction.opacity; + default: + return null; + } + } + Object.defineProperty(_thisFunction, 'rotation', { + get: ExpressionPropertyInterface(transform.r || transform.rz), + }); + + Object.defineProperty(_thisFunction, 'zRotation', { + get: ExpressionPropertyInterface(transform.rz || transform.r), + }); + + Object.defineProperty(_thisFunction, 'xRotation', { + get: ExpressionPropertyInterface(transform.rx), + }); + + Object.defineProperty(_thisFunction, 'yRotation', { + get: ExpressionPropertyInterface(transform.ry), + }); + Object.defineProperty(_thisFunction, 'scale', { + get: ExpressionPropertyInterface(transform.s), + }); + var _px; + var _py; + var _pz; + var _transformFactory; + if (transform.p) { + _transformFactory = ExpressionPropertyInterface(transform.p); + } else { + _px = ExpressionPropertyInterface(transform.px); + _py = ExpressionPropertyInterface(transform.py); + if (transform.pz) { + _pz = ExpressionPropertyInterface(transform.pz); + } + } + Object.defineProperty(_thisFunction, 'position', { + get: function () { + if (transform.p) { + return _transformFactory(); + } + return [ + _px(), + _py(), + _pz ? _pz() : 0]; + }, + }); + + Object.defineProperty(_thisFunction, 'xPosition', { + get: ExpressionPropertyInterface(transform.px), + }); + + Object.defineProperty(_thisFunction, 'yPosition', { + get: ExpressionPropertyInterface(transform.py), + }); + + Object.defineProperty(_thisFunction, 'zPosition', { + get: ExpressionPropertyInterface(transform.pz), + }); + + Object.defineProperty(_thisFunction, 'anchorPoint', { + get: ExpressionPropertyInterface(transform.a), + }); + + Object.defineProperty(_thisFunction, 'opacity', { + get: ExpressionPropertyInterface(transform.o), + }); + + Object.defineProperty(_thisFunction, 'skew', { + get: ExpressionPropertyInterface(transform.sk), + }); + + Object.defineProperty(_thisFunction, 'skewAxis', { + get: ExpressionPropertyInterface(transform.sa), + }); + + Object.defineProperty(_thisFunction, 'orientation', { + get: ExpressionPropertyInterface(transform.or), + }); + + return _thisFunction; + }; +}()); + +const LayerExpressionInterface = (function () { + function getMatrix(time) { + var toWorldMat = new Matrix(); + if (time !== undefined) { + var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time); + propMatrix.clone(toWorldMat); + } else { + var transformMat = this._elem.finalTransform.mProp; + transformMat.applyToMatrix(toWorldMat); + } + return toWorldMat; + } + + function toWorldVec(arr, time) { + var toWorldMat = this.getMatrix(time); + toWorldMat.props[12] = 0; + toWorldMat.props[13] = 0; + toWorldMat.props[14] = 0; + return this.applyPoint(toWorldMat, arr); + } + + function toWorld(arr, time) { + var toWorldMat = this.getMatrix(time); + return this.applyPoint(toWorldMat, arr); + } + + function fromWorldVec(arr, time) { + var toWorldMat = this.getMatrix(time); + toWorldMat.props[12] = 0; + toWorldMat.props[13] = 0; + toWorldMat.props[14] = 0; + return this.invertPoint(toWorldMat, arr); + } + + function fromWorld(arr, time) { + var toWorldMat = this.getMatrix(time); + return this.invertPoint(toWorldMat, arr); + } + + function applyPoint(matrix, arr) { + if (this._elem.hierarchy && this._elem.hierarchy.length) { + var i; + var len = this._elem.hierarchy.length; + for (i = 0; i < len; i += 1) { + this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix); + } + } + return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0); + } + + function invertPoint(matrix, arr) { + if (this._elem.hierarchy && this._elem.hierarchy.length) { + var i; + var len = this._elem.hierarchy.length; + for (i = 0; i < len; i += 1) { + this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix); + } + } + return matrix.inversePoint(arr); + } + + function fromComp(arr) { + var toWorldMat = new Matrix(); + toWorldMat.reset(); + this._elem.finalTransform.mProp.applyToMatrix(toWorldMat); + if (this._elem.hierarchy && this._elem.hierarchy.length) { + var i; + var len = this._elem.hierarchy.length; + for (i = 0; i < len; i += 1) { + this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat); + } + return toWorldMat.inversePoint(arr); + } + return toWorldMat.inversePoint(arr); + } + + function sampleImage() { + return [1, 1, 1, 1]; + } + + return function (elem) { + var transformInterface; + + function _registerMaskInterface(maskManager) { + _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem); + } + function _registerEffectsInterface(effects) { + _thisLayerFunction.effect = effects; + } + + function _thisLayerFunction(name) { + switch (name) { + case 'ADBE Root Vectors Group': + case 'Contents': + case 2: + return _thisLayerFunction.shapeInterface; + case 1: + case 6: + case 'Transform': + case 'transform': + case 'ADBE Transform Group': + return transformInterface; + case 4: + case 'ADBE Effect Parade': + case 'effects': + case 'Effects': + return _thisLayerFunction.effect; + case 'ADBE Text Properties': + return _thisLayerFunction.textInterface; + default: + return null; + } + } + _thisLayerFunction.getMatrix = getMatrix; + _thisLayerFunction.invertPoint = invertPoint; + _thisLayerFunction.applyPoint = applyPoint; + _thisLayerFunction.toWorld = toWorld; + _thisLayerFunction.toWorldVec = toWorldVec; + _thisLayerFunction.fromWorld = fromWorld; + _thisLayerFunction.fromWorldVec = fromWorldVec; + _thisLayerFunction.toComp = toWorld; + _thisLayerFunction.fromComp = fromComp; + _thisLayerFunction.sampleImage = sampleImage; + _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem); + _thisLayerFunction._elem = elem; + transformInterface = TransformExpressionInterface(elem.finalTransform.mProp); + var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint'); + Object.defineProperties(_thisLayerFunction, { + hasParent: { + get: function () { + return elem.hierarchy.length; + }, + }, + parent: { + get: function () { + return elem.hierarchy[0].layerInterface; + }, + }, + rotation: getDescriptor(transformInterface, 'rotation'), + scale: getDescriptor(transformInterface, 'scale'), + position: getDescriptor(transformInterface, 'position'), + opacity: getDescriptor(transformInterface, 'opacity'), + anchorPoint: anchorPointDescriptor, + anchor_point: anchorPointDescriptor, + transform: { + get: function () { + return transformInterface; + }, + }, + active: { + get: function () { + return elem.isInRange; + }, + }, + }); + + _thisLayerFunction.startTime = elem.data.st; + _thisLayerFunction.index = elem.data.ind; + _thisLayerFunction.source = elem.data.refId; + _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100; + _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100; + _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate; + _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate; + _thisLayerFunction._name = elem.data.nm; + + _thisLayerFunction.registerMaskInterface = _registerMaskInterface; + _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface; + return _thisLayerFunction; + }; +}()); + +const propertyGroupFactory = (function () { + return function (interfaceFunction, parentPropertyGroup) { + return function (val) { + val = val === undefined ? 1 : val; + if (val <= 0) { + return interfaceFunction; + } + return parentPropertyGroup(val - 1); + }; + }; +}()); + +const PropertyInterface = (function () { + return function (propertyName, propertyGroup) { + var interfaceFunction = { + _name: propertyName, + }; + + function _propertyGroup(val) { + val = val === undefined ? 1 : val; + if (val <= 0) { + return interfaceFunction; + } + return propertyGroup(val - 1); + } + + return _propertyGroup; + }; +}()); + +const EffectsExpressionInterface = (function () { + var ob = { + createEffectsInterface: createEffectsInterface, + }; + + function createEffectsInterface(elem, propertyGroup) { + if (elem.effectsManager) { + var effectElements = []; + var effectsData = elem.data.ef; + var i; + var len = elem.effectsManager.effectElements.length; + for (i = 0; i < len; i += 1) { + effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem)); + } + + var effects = elem.data.ef || []; + var groupInterface = function (name) { + i = 0; + len = effects.length; + while (i < len) { + if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) { + return effectElements[i]; + } + i += 1; + } + return null; + }; + Object.defineProperty(groupInterface, 'numProperties', { + get: function () { + return effects.length; + }, + }); + return groupInterface; + } + return null; + } + + function createGroupInterface(data, elements, propertyGroup, elem) { + function groupInterface(name) { + var effects = data.ef; + var i = 0; + var len = effects.length; + while (i < len) { + if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) { + if (effects[i].ty === 5) { + return effectElements[i]; + } + return effectElements[i](); + } + i += 1; + } + throw new Error(); + } + var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup); + + var effectElements = []; + var i; + var len = data.ef.length; + for (i = 0; i < len; i += 1) { + if (data.ef[i].ty === 5) { + effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem)); + } else { + effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup)); + } + } + + if (data.mn === 'ADBE Color Control') { + Object.defineProperty(groupInterface, 'color', { + get: function () { + return effectElements[0](); + }, + }); + } + Object.defineProperties(groupInterface, { + numProperties: { + get: function () { + return data.np; + }, + }, + _name: { value: data.nm }, + propertyGroup: { value: _propertyGroup }, + }); + groupInterface.enabled = data.en !== 0; + groupInterface.active = groupInterface.enabled; + return groupInterface; + } + + function createValueInterface(element, type, elem, propertyGroup) { + var expressionProperty = ExpressionPropertyInterface(element.p); + function interfaceFunction() { + if (type === 10) { + return elem.comp.compInterface(element.p.v); + } + return expressionProperty(); + } + + if (element.p.setGroupProperty) { + element.p.setGroupProperty(PropertyInterface('', propertyGroup)); + } + + return interfaceFunction; + } + + return ob; +}()); + +const CompExpressionInterface = (function () { + return function (comp) { + function _thisLayerFunction(name) { + var i = 0; + var len = comp.layers.length; + while (i < len) { + if (comp.layers[i].nm === name || comp.layers[i].ind === name) { + return comp.elements[i].layerInterface; + } + i += 1; + } + return null; + // return {active:false}; + } + Object.defineProperty(_thisLayerFunction, '_name', { value: comp.data.nm }); + _thisLayerFunction.layer = _thisLayerFunction; + _thisLayerFunction.pixelAspect = 1; + _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h; + _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w; + _thisLayerFunction.pixelAspect = 1; + _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate; + _thisLayerFunction.displayStartTime = 0; + _thisLayerFunction.numLayers = comp.layers.length; + return _thisLayerFunction; + }; +}()); + +const ShapePathInterface = ( + + function () { + return function pathInterfaceFactory(shape, view, propertyGroup) { + var prop = view.sh; + + function interfaceFunction(val) { + if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) { + return interfaceFunction.path; + } + return null; + } + + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + prop.setGroupProperty(PropertyInterface('Path', _propertyGroup)); + Object.defineProperties(interfaceFunction, { + path: { + get: function () { + if (prop.k) { + prop.getValue(); + } + return prop; + }, + }, + shape: { + get: function () { + if (prop.k) { + prop.getValue(); + } + return prop; + }, + }, + _name: { value: shape.nm }, + ix: { value: shape.ix }, + propertyIndex: { value: shape.ix }, + mn: { value: shape.mn }, + propertyGroup: { value: propertyGroup }, + }); + return interfaceFunction; + }; + }() +); + +const ShapeExpressionInterface = (function () { + function iterateElements(shapes, view, propertyGroup) { + var arr = []; + var i; + var len = shapes ? shapes.length : 0; + for (i = 0; i < len; i += 1) { + if (shapes[i].ty === 'gr') { + arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'fl') { + arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'st') { + arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'tm') { + arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'tr') { + // arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup)); + } else if (shapes[i].ty === 'el') { + arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'sr') { + arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'sh') { + arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'rc') { + arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'rd') { + arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'rp') { + arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'gf') { + arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else { + arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup)); + } + } + return arr; + } + + function contentsInterfaceFactory(shape, view, propertyGroup) { + var interfaces; + var interfaceFunction = function _interfaceFunction(value) { + var i = 0; + var len = interfaces.length; + while (i < len) { + if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) { + return interfaces[i]; + } + i += 1; + } + if (typeof value === 'number') { + return interfaces[value - 1]; + } + return null; + }; + + interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup); + interfaceFunction.numProperties = interfaces.length; + var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup); + interfaceFunction.transform = transformInterface; + interfaceFunction.propertyIndex = shape.cix; + interfaceFunction._name = shape.nm; + + return interfaceFunction; + } + + function groupInterfaceFactory(shape, view, propertyGroup) { + var interfaceFunction = function _interfaceFunction(value) { + switch (value) { + case 'ADBE Vectors Group': + case 'Contents': + case 2: + return interfaceFunction.content; + // Not necessary for now. Keeping them here in case a new case appears + // case 'ADBE Vector Transform Group': + // case 3: + default: + return interfaceFunction.transform; + } + }; + interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup); + var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup); + interfaceFunction.content = content; + interfaceFunction.transform = transformInterface; + Object.defineProperty(interfaceFunction, '_name', { + get: function () { + return shape.nm; + }, + }); + // interfaceFunction.content = interfaceFunction; + interfaceFunction.numProperties = shape.np; + interfaceFunction.propertyIndex = shape.ix; + interfaceFunction.nm = shape.nm; + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + function fillInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(val) { + if (val === 'Color' || val === 'color') { + return interfaceFunction.color; + } if (val === 'Opacity' || val === 'opacity') { + return interfaceFunction.opacity; + } + return null; + } + Object.defineProperties(interfaceFunction, { + color: { + get: ExpressionPropertyInterface(view.c), + }, + opacity: { + get: ExpressionPropertyInterface(view.o), + }, + _name: { value: shape.nm }, + mn: { value: shape.mn }, + }); + + view.c.setGroupProperty(PropertyInterface('Color', propertyGroup)); + view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup)); + return interfaceFunction; + } + + function gradientFillInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(val) { + if (val === 'Start Point' || val === 'start point') { + return interfaceFunction.startPoint; + } + if (val === 'End Point' || val === 'end point') { + return interfaceFunction.endPoint; + } + if (val === 'Opacity' || val === 'opacity') { + return interfaceFunction.opacity; + } + return null; + } + Object.defineProperties(interfaceFunction, { + startPoint: { + get: ExpressionPropertyInterface(view.s), + }, + endPoint: { + get: ExpressionPropertyInterface(view.e), + }, + opacity: { + get: ExpressionPropertyInterface(view.o), + }, + type: { + get: function () { + return 'a'; + }, + }, + _name: { value: shape.nm }, + mn: { value: shape.mn }, + }); + + view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup)); + view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup)); + view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup)); + return interfaceFunction; + } + function defaultInterfaceFactory() { + function interfaceFunction() { + return null; + } + return interfaceFunction; + } + + function strokeInterfaceFactory(shape, view, propertyGroup) { + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup); + function addPropertyToDashOb(i) { + Object.defineProperty(dashOb, shape.d[i].nm, { + get: ExpressionPropertyInterface(view.d.dataProps[i].p), + }); + } + var i; + var len = shape.d ? shape.d.length : 0; + var dashOb = {}; + for (i = 0; i < len; i += 1) { + addPropertyToDashOb(i); + view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup); + } + + function interfaceFunction(val) { + if (val === 'Color' || val === 'color') { + return interfaceFunction.color; + } if (val === 'Opacity' || val === 'opacity') { + return interfaceFunction.opacity; + } if (val === 'Stroke Width' || val === 'stroke width') { + return interfaceFunction.strokeWidth; + } + return null; + } + Object.defineProperties(interfaceFunction, { + color: { + get: ExpressionPropertyInterface(view.c), + }, + opacity: { + get: ExpressionPropertyInterface(view.o), + }, + strokeWidth: { + get: ExpressionPropertyInterface(view.w), + }, + dash: { + get: function () { + return dashOb; + }, + }, + _name: { value: shape.nm }, + mn: { value: shape.mn }, + }); + + view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup)); + view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup)); + view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup)); + return interfaceFunction; + } + + function trimInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(val) { + if (val === shape.e.ix || val === 'End' || val === 'end') { + return interfaceFunction.end; + } + if (val === shape.s.ix) { + return interfaceFunction.start; + } + if (val === shape.o.ix) { + return interfaceFunction.offset; + } + return null; + } + + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + interfaceFunction.propertyIndex = shape.ix; + + view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup)); + view.e.setGroupProperty(PropertyInterface('End', _propertyGroup)); + view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup)); + interfaceFunction.propertyIndex = shape.ix; + interfaceFunction.propertyGroup = propertyGroup; + + Object.defineProperties(interfaceFunction, { + start: { + get: ExpressionPropertyInterface(view.s), + }, + end: { + get: ExpressionPropertyInterface(view.e), + }, + offset: { + get: ExpressionPropertyInterface(view.o), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + function transformInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(value) { + if (shape.a.ix === value || value === 'Anchor Point') { + return interfaceFunction.anchorPoint; + } + if (shape.o.ix === value || value === 'Opacity') { + return interfaceFunction.opacity; + } + if (shape.p.ix === value || value === 'Position') { + return interfaceFunction.position; + } + if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') { + return interfaceFunction.rotation; + } + if (shape.s.ix === value || value === 'Scale') { + return interfaceFunction.scale; + } + if ((shape.sk && shape.sk.ix === value) || value === 'Skew') { + return interfaceFunction.skew; + } + if ((shape.sa && shape.sa.ix === value) || value === 'Skew Axis') { + return interfaceFunction.skewAxis; + } + return null; + } + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup)); + view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup)); + view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup)); + view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup)); + view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup)); + if (view.transform.mProps.sk) { + view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup)); + view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup)); + } + view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup)); + Object.defineProperties(interfaceFunction, { + opacity: { + get: ExpressionPropertyInterface(view.transform.mProps.o), + }, + position: { + get: ExpressionPropertyInterface(view.transform.mProps.p), + }, + anchorPoint: { + get: ExpressionPropertyInterface(view.transform.mProps.a), + }, + scale: { + get: ExpressionPropertyInterface(view.transform.mProps.s), + }, + rotation: { + get: ExpressionPropertyInterface(view.transform.mProps.r), + }, + skew: { + get: ExpressionPropertyInterface(view.transform.mProps.sk), + }, + skewAxis: { + get: ExpressionPropertyInterface(view.transform.mProps.sa), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.ty = 'tr'; + interfaceFunction.mn = shape.mn; + interfaceFunction.propertyGroup = propertyGroup; + return interfaceFunction; + } + + function ellipseInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(value) { + if (shape.p.ix === value) { + return interfaceFunction.position; + } + if (shape.s.ix === value) { + return interfaceFunction.size; + } + return null; + } + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + interfaceFunction.propertyIndex = shape.ix; + var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh; + prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup)); + prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup)); + + Object.defineProperties(interfaceFunction, { + size: { + get: ExpressionPropertyInterface(prop.s), + }, + position: { + get: ExpressionPropertyInterface(prop.p), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + function starInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(value) { + if (shape.p.ix === value) { + return interfaceFunction.position; + } + if (shape.r.ix === value) { + return interfaceFunction.rotation; + } + if (shape.pt.ix === value) { + return interfaceFunction.points; + } + if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') { + return interfaceFunction.outerRadius; + } + if (shape.os.ix === value) { + return interfaceFunction.outerRoundness; + } + if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) { + return interfaceFunction.innerRadius; + } + if (shape.is && shape.is.ix === value) { + return interfaceFunction.innerRoundness; + } + return null; + } + + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh; + interfaceFunction.propertyIndex = shape.ix; + prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup)); + prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup)); + prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup)); + prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup)); + prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup)); + if (shape.ir) { + prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup)); + prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup)); + } + + Object.defineProperties(interfaceFunction, { + position: { + get: ExpressionPropertyInterface(prop.p), + }, + rotation: { + get: ExpressionPropertyInterface(prop.r), + }, + points: { + get: ExpressionPropertyInterface(prop.pt), + }, + outerRadius: { + get: ExpressionPropertyInterface(prop.or), + }, + outerRoundness: { + get: ExpressionPropertyInterface(prop.os), + }, + innerRadius: { + get: ExpressionPropertyInterface(prop.ir), + }, + innerRoundness: { + get: ExpressionPropertyInterface(prop.is), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + function rectInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(value) { + if (shape.p.ix === value) { + return interfaceFunction.position; + } + if (shape.r.ix === value) { + return interfaceFunction.roundness; + } + if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') { + return interfaceFunction.size; + } + return null; + } + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + + var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh; + interfaceFunction.propertyIndex = shape.ix; + prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup)); + prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup)); + prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup)); + + Object.defineProperties(interfaceFunction, { + position: { + get: ExpressionPropertyInterface(prop.p), + }, + roundness: { + get: ExpressionPropertyInterface(prop.r), + }, + size: { + get: ExpressionPropertyInterface(prop.s), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + function roundedInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(value) { + if (shape.r.ix === value || value === 'Round Corners 1') { + return interfaceFunction.radius; + } + return null; + } + + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + var prop = view; + interfaceFunction.propertyIndex = shape.ix; + prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup)); + + Object.defineProperties(interfaceFunction, { + radius: { + get: ExpressionPropertyInterface(prop.rd), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + function repeaterInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(value) { + if (shape.c.ix === value || value === 'Copies') { + return interfaceFunction.copies; + } if (shape.o.ix === value || value === 'Offset') { + return interfaceFunction.offset; + } + return null; + } + + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + var prop = view; + interfaceFunction.propertyIndex = shape.ix; + prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup)); + prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup)); + Object.defineProperties(interfaceFunction, { + copies: { + get: ExpressionPropertyInterface(prop.c), + }, + offset: { + get: ExpressionPropertyInterface(prop.o), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + return function (shapes, view, propertyGroup) { + var interfaces; + function _interfaceFunction(value) { + if (typeof value === 'number') { + value = value === undefined ? 1 : value; + if (value === 0) { + return propertyGroup; + } + return interfaces[value - 1]; + } + var i = 0; + var len = interfaces.length; + while (i < len) { + if (interfaces[i]._name === value) { + return interfaces[i]; + } + i += 1; + } + return null; + } + function parentGroupWrapper() { + return propertyGroup; + } + _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper); + interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup); + _interfaceFunction.numProperties = interfaces.length; + _interfaceFunction._name = 'Contents'; + return _interfaceFunction; + }; +}()); + +const TextExpressionInterface = (function () { + return function (elem) { + var _prevValue; + var _sourceText; + function _thisLayerFunction(name) { + switch (name) { + case 'ADBE Text Document': + return _thisLayerFunction.sourceText; + default: + return null; + } + } + Object.defineProperty(_thisLayerFunction, 'sourceText', { + get: function () { + elem.textProperty.getValue(); + var stringValue = elem.textProperty.currentData.t; + if (stringValue !== _prevValue) { + elem.textProperty.currentData.t = _prevValue; + _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers + // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive + _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers + } + return _sourceText; + }, + }); + return _thisLayerFunction; + }; +}()); + +const getBlendMode = (function () { + var blendModeEnums = { + 0: 'source-over', + 1: 'multiply', + 2: 'screen', + 3: 'overlay', + 4: 'darken', + 5: 'lighten', + 6: 'color-dodge', + 7: 'color-burn', + 8: 'hard-light', + 9: 'soft-light', + 10: 'difference', + 11: 'exclusion', + 12: 'hue', + 13: 'saturation', + 14: 'color', + 15: 'luminosity', + }; + + return function (mode) { + return blendModeEnums[mode] || ''; + }; +}()); + +function SliderEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); +} +function AngleEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); +} +function ColorEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container); +} +function PointEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container); +} +function LayerIndexEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); +} +function MaskIndexEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); +} +function CheckboxEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); +} +function NoValueEffect() { + this.p = {}; +} + +function EffectsManager(data, element) { + var effects = data.ef || []; + this.effectElements = []; + var i; + var len = effects.length; + var effectItem; + for (i = 0; i < len; i += 1) { + effectItem = new GroupEffect(effects[i], element); + this.effectElements.push(effectItem); + } +} + +function GroupEffect(data, element) { + this.init(data, element); +} + +extendPrototype([DynamicPropertyContainer], GroupEffect); + +GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties; + +GroupEffect.prototype.init = function (data, element) { + this.data = data; + this.effectElements = []; + this.initDynamicPropertyContainer(element); + var i; + var len = this.data.ef.length; + var eff; + var effects = this.data.ef; + for (i = 0; i < len; i += 1) { + eff = null; + switch (effects[i].ty) { + case 0: + eff = new SliderEffect(effects[i], element, this); + break; + case 1: + eff = new AngleEffect(effects[i], element, this); + break; + case 2: + eff = new ColorEffect(effects[i], element, this); + break; + case 3: + eff = new PointEffect(effects[i], element, this); + break; + case 4: + case 7: + eff = new CheckboxEffect(effects[i], element, this); + break; + case 10: + eff = new LayerIndexEffect(effects[i], element, this); + break; + case 11: + eff = new MaskIndexEffect(effects[i], element, this); + break; + case 5: + eff = new EffectsManager(effects[i], element, this); + break; + // case 6: + default: + eff = new NoValueEffect(effects[i], element, this); + break; + } + if (eff) { + this.effectElements.push(eff); + } + } +}; + +function BaseElement() { +} + +BaseElement.prototype = { + checkMasks: function () { + if (!this.data.hasMask) { + return false; + } + var i = 0; + var len = this.data.masksProperties.length; + while (i < len) { + if ((this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false)) { + return true; + } + i += 1; + } + return false; + }, + initExpressions: function () { + this.layerInterface = LayerExpressionInterface(this); + if (this.data.hasMask && this.maskManager) { + this.layerInterface.registerMaskInterface(this.maskManager); + } + var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface); + this.layerInterface.registerEffectsInterface(effectsInterface); + + if (this.data.ty === 0 || this.data.xt) { + this.compInterface = CompExpressionInterface(this); + } else if (this.data.ty === 4) { + this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface); + this.layerInterface.content = this.layerInterface.shapeInterface; + } else if (this.data.ty === 5) { + this.layerInterface.textInterface = TextExpressionInterface(this); + this.layerInterface.text = this.layerInterface.textInterface; + } + }, + setBlendMode: function () { + var blendModeValue = getBlendMode(this.data.bm); + var elem = this.baseElement || this.layerElement; + + elem.style['mix-blend-mode'] = blendModeValue; + }, + initBaseData: function (data, globalData, comp) { + this.globalData = globalData; + this.comp = comp; + this.data = data; + this.layerId = createElementID(); + + // Stretch factor for old animations missing this property. + if (!this.data.sr) { + this.data.sr = 1; + } + // effects manager + this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties); + }, + getType: function () { + return this.type; + }, + sourceRectAtTime: function () {}, +}; + +/** + * @file + * Handles element's layer frame update. + * Checks layer in point and out point + * + */ + +function FrameElement() {} + +FrameElement.prototype = { + /** + * @function + * Initializes frame related properties. + * + */ + initFrame: function () { + // set to true when inpoint is rendered + this._isFirstFrame = false; + // list of animated properties + this.dynamicProperties = []; + // If layer has been modified in current tick this will be true + this._mdf = false; + }, + /** + * @function + * Calculates all dynamic values + * + * @param {number} num + * current frame number in Layer's time + * @param {boolean} isVisible + * if layers is currently in range + * + */ + prepareProperties: function (num, isVisible) { + var i; + var len = this.dynamicProperties.length; + for (i = 0; i < len; i += 1) { + if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) { + this.dynamicProperties[i].getValue(); + if (this.dynamicProperties[i]._mdf) { + this.globalData._mdf = true; + this._mdf = true; + } + } + } + }, + addDynamicProperty: function (prop) { + if (this.dynamicProperties.indexOf(prop) === -1) { + this.dynamicProperties.push(prop); + } + }, +}; + +const FootageInterface = (function () { + var outlineInterfaceFactory = (function (elem) { + var currentPropertyName = ''; + var currentProperty = elem.getFootageData(); + function init() { + currentPropertyName = ''; + currentProperty = elem.getFootageData(); + return searchProperty; + } + function searchProperty(value) { + if (currentProperty[value]) { + currentPropertyName = value; + currentProperty = currentProperty[value]; + if (typeof currentProperty === 'object') { + return searchProperty; + } + return currentProperty; + } + var propertyNameIndex = value.indexOf(currentPropertyName); + if (propertyNameIndex !== -1) { + var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10); + currentProperty = currentProperty[index]; + if (typeof currentProperty === 'object') { + return searchProperty; + } + return currentProperty; + } + return ''; + } + return init; + }); + + var dataInterfaceFactory = function (elem) { + function interfaceFunction(value) { + if (value === 'Outline') { + return interfaceFunction.outlineInterface(); + } + return null; + } + + interfaceFunction._name = 'Outline'; + interfaceFunction.outlineInterface = outlineInterfaceFactory(elem); + return interfaceFunction; + }; + + return function (elem) { + function _interfaceFunction(value) { + if (value === 'Data') { + return _interfaceFunction.dataInterface; + } + return null; + } + + _interfaceFunction._name = 'Data'; + _interfaceFunction.dataInterface = dataInterfaceFactory(elem); + return _interfaceFunction; + }; +}()); + +function FootageElement(data, globalData, comp) { + this.initFrame(); + this.initRenderable(); + this.assetData = globalData.getAssetData(data.refId); + this.footageData = globalData.imageLoader.getAsset(this.assetData); + this.initBaseData(data, globalData, comp); +} + +FootageElement.prototype.prepareFrame = function () { +}; + +extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement); + +FootageElement.prototype.getBaseElement = function () { + return null; +}; + +FootageElement.prototype.renderFrame = function () { +}; + +FootageElement.prototype.destroy = function () { +}; + +FootageElement.prototype.initExpressions = function () { + this.layerInterface = FootageInterface(this); +}; + +FootageElement.prototype.getFootageData = function () { + return this.footageData; +}; + +function AudioElement(data, globalData, comp) { + this.initFrame(); + this.initRenderable(); + this.assetData = globalData.getAssetData(data.refId); + this.initBaseData(data, globalData, comp); + this._isPlaying = false; + this._canPlay = false; + var assetPath = this.globalData.getAssetsPath(this.assetData); + this.audio = this.globalData.audioController.createAudio(assetPath); + this._currentTime = 0; + this.globalData.audioController.addAudio(this); + this._volumeMultiplier = 1; + this._volume = 1; + this._previousVolume = null; + this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true }; + this.lv = PropertyFactory.getProp(this, data.au && data.au.lv ? data.au.lv : { k: [100] }, 1, 0.01, this); +} + +AudioElement.prototype.prepareFrame = function (num) { + this.prepareRenderableFrame(num, true); + this.prepareProperties(num, true); + if (!this.tm._placeholder) { + var timeRemapped = this.tm.v; + this._currentTime = timeRemapped; + } else { + this._currentTime = num / this.data.sr; + } + this._volume = this.lv.v[0]; + var totalVolume = this._volume * this._volumeMultiplier; + if (this._previousVolume !== totalVolume) { + this._previousVolume = totalVolume; + this.audio.volume(totalVolume); + } +}; + +extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement); + +AudioElement.prototype.renderFrame = function () { + if (this.isInRange && this._canPlay) { + if (!this._isPlaying) { + this.audio.play(); + this.audio.seek(this._currentTime / this.globalData.frameRate); + this._isPlaying = true; + } else if (!this.audio.playing() + || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1 + ) { + this.audio.seek(this._currentTime / this.globalData.frameRate); + } + } +}; + +AudioElement.prototype.show = function () { + // this.audio.play() +}; + +AudioElement.prototype.hide = function () { + this.audio.pause(); + this._isPlaying = false; +}; + +AudioElement.prototype.pause = function () { + this.audio.pause(); + this._isPlaying = false; + this._canPlay = false; +}; + +AudioElement.prototype.resume = function () { + this._canPlay = true; +}; + +AudioElement.prototype.setRate = function (rateValue) { + this.audio.rate(rateValue); +}; + +AudioElement.prototype.volume = function (volumeValue) { + this._volumeMultiplier = volumeValue; + this._previousVolume = volumeValue * this._volume; + this.audio.volume(this._previousVolume); +}; + +AudioElement.prototype.getBaseElement = function () { + return null; +}; + +AudioElement.prototype.destroy = function () { +}; + +AudioElement.prototype.sourceRectAtTime = function () { +}; + +AudioElement.prototype.initExpressions = function () { +}; + +function BaseRenderer() {} +BaseRenderer.prototype.checkLayers = function (num) { + var i; + var len = this.layers.length; + var data; + this.completeLayers = true; + for (i = len - 1; i >= 0; i -= 1) { + if (!this.elements[i]) { + data = this.layers[i]; + if (data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st)) { + this.buildItem(i); + } + } + this.completeLayers = this.elements[i] ? this.completeLayers : false; + } + this.checkPendingElements(); +}; + +BaseRenderer.prototype.createItem = function (layer) { + switch (layer.ty) { + case 2: + return this.createImage(layer); + case 0: + return this.createComp(layer); + case 1: + return this.createSolid(layer); + case 3: + return this.createNull(layer); + case 4: + return this.createShape(layer); + case 5: + return this.createText(layer); + case 6: + return this.createAudio(layer); + case 13: + return this.createCamera(layer); + case 15: + return this.createFootage(layer); + default: + return this.createNull(layer); + } +}; + +BaseRenderer.prototype.createCamera = function () { + throw new Error('You\'re using a 3d camera. Try the html renderer.'); +}; + +BaseRenderer.prototype.createAudio = function (data) { + return new AudioElement(data, this.globalData, this); +}; + +BaseRenderer.prototype.createFootage = function (data) { + return new FootageElement(data, this.globalData, this); +}; + +BaseRenderer.prototype.buildAllItems = function () { + var i; + var len = this.layers.length; + for (i = 0; i < len; i += 1) { + this.buildItem(i); + } + this.checkPendingElements(); +}; + +BaseRenderer.prototype.includeLayers = function (newLayers) { + this.completeLayers = false; + var i; + var len = newLayers.length; + var j; + var jLen = this.layers.length; + for (i = 0; i < len; i += 1) { + j = 0; + while (j < jLen) { + if (this.layers[j].id === newLayers[i].id) { + this.layers[j] = newLayers[i]; + break; + } + j += 1; + } + } +}; + +BaseRenderer.prototype.setProjectInterface = function (pInterface) { + this.globalData.projectInterface = pInterface; +}; + +BaseRenderer.prototype.initItems = function () { + if (!this.globalData.progressiveLoad) { + this.buildAllItems(); + } +}; +BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) { + var elements = this.elements; + var layers = this.layers; + var i = 0; + var len = layers.length; + while (i < len) { + if (layers[i].ind == parentName) { // eslint-disable-line eqeqeq + if (!elements[i] || elements[i] === true) { + this.buildItem(i); + this.addPendingElement(element); + } else { + hierarchy.push(elements[i]); + elements[i].setAsParent(); + if (layers[i].parent !== undefined) { + this.buildElementParenting(element, layers[i].parent, hierarchy); + } else { + element.setHierarchy(hierarchy); + } + } + } + i += 1; + } +}; + +BaseRenderer.prototype.addPendingElement = function (element) { + this.pendingElements.push(element); +}; + +BaseRenderer.prototype.searchExtraCompositions = function (assets) { + var i; + var len = assets.length; + for (i = 0; i < len; i += 1) { + if (assets[i].xt) { + var comp = this.createComp(assets[i]); + comp.initExpressions(); + this.globalData.projectInterface.registerComposition(comp); + } + } +}; + +BaseRenderer.prototype.getElementByPath = function (path) { + var pathValue = path.shift(); + var element; + if (typeof pathValue === 'number') { + element = this.elements[pathValue]; + } else { + var i; + var len = this.elements.length; + for (i = 0; i < len; i += 1) { + if (this.elements[i].data.nm === pathValue) { + element = this.elements[i]; + break; + } + } + } + if (path.length === 0) { + return element; + } + return element.getElementByPath(path); +}; + +BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) { + this.globalData.fontManager = new FontManager(); + this.globalData.fontManager.addChars(animData.chars); + this.globalData.fontManager.addFonts(animData.fonts, fontsContainer); + this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem); + this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem); + this.globalData.imageLoader = this.animationItem.imagePreloader; + this.globalData.audioController = this.animationItem.audioController; + this.globalData.frameId = 0; + this.globalData.frameRate = animData.fr; + this.globalData.nm = animData.nm; + this.globalData.compSize = { + w: animData.w, + h: animData.h, + }; +}; + +function TransformElement() {} + +TransformElement.prototype = { + initTransform: function () { + this.finalTransform = { + mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { o: 0 }, + _matMdf: false, + _opMdf: false, + mat: new Matrix(), + }; + if (this.data.ao) { + this.finalTransform.mProp.autoOriented = true; + } + + // TODO: check TYPE 11: Guided elements + if (this.data.ty !== 11) { + // this.createElements(); + } + }, + renderTransform: function () { + this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame; + this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame; + + if (this.hierarchy) { + var mat; + var finalMat = this.finalTransform.mat; + var i = 0; + var len = this.hierarchy.length; + // Checking if any of the transformation matrices in the hierarchy chain has changed. + if (!this.finalTransform._matMdf) { + while (i < len) { + if (this.hierarchy[i].finalTransform.mProp._mdf) { + this.finalTransform._matMdf = true; + break; + } + i += 1; + } + } + + if (this.finalTransform._matMdf) { + mat = this.finalTransform.mProp.v.props; + finalMat.cloneFromProps(mat); + for (i = 0; i < len; i += 1) { + mat = this.hierarchy[i].finalTransform.mProp.v.props; + finalMat.transform(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5], mat[6], mat[7], mat[8], mat[9], mat[10], mat[11], mat[12], mat[13], mat[14], mat[15]); + } + } + } + }, + globalToLocal: function (pt) { + var transforms = []; + transforms.push(this.finalTransform); + var flag = true; + var comp = this.comp; + while (flag) { + if (comp.finalTransform) { + if (comp.data.hasMask) { + transforms.splice(0, 0, comp.finalTransform); + } + comp = comp.comp; + } else { + flag = false; + } + } + var i; + var len = transforms.length; + var ptNew; + for (i = 0; i < len; i += 1) { + ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); + // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]); + pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0]; + } + return pt; + }, + mHelper: new Matrix(), +}; + +function MaskElement(data, element, globalData) { + this.data = data; + this.element = element; + this.globalData = globalData; + this.storedData = []; + this.masksProperties = this.data.masksProperties || []; + this.maskElement = null; + var defs = this.globalData.defs; + var i; + var len = this.masksProperties ? this.masksProperties.length : 0; + this.viewData = createSizedArray(len); + this.solidPath = ''; + + var path; + var properties = this.masksProperties; + var count = 0; + var currentMasks = []; + var j; + var jLen; + var layerId = createElementID(); + var rect; + var expansor; + var feMorph; + var x; + var maskType = 'clipPath'; + var maskRef = 'clip-path'; + for (i = 0; i < len; i += 1) { + if ((properties[i].mode !== 'a' && properties[i].mode !== 'n') || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) { + maskType = 'mask'; + maskRef = 'mask'; + } + + if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) { + rect = createNS('rect'); + rect.setAttribute('fill', '#ffffff'); + rect.setAttribute('width', this.element.comp.data.w || 0); + rect.setAttribute('height', this.element.comp.data.h || 0); + currentMasks.push(rect); + } else { + rect = null; + } + + path = createNS('path'); + if (properties[i].mode === 'n') { + // TODO move this to a factory or to a constructor + this.viewData[i] = { + op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element), + prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3), + elem: path, + lastPath: '', + }; + defs.appendChild(path); + } else { + count += 1; + + path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff'); + path.setAttribute('clip-rule', 'nonzero'); + var filterID; + + if (properties[i].x.k !== 0) { + maskType = 'mask'; + maskRef = 'mask'; + x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element); + filterID = createElementID(); + expansor = createNS('filter'); + expansor.setAttribute('id', filterID); + feMorph = createNS('feMorphology'); + feMorph.setAttribute('operator', 'erode'); + feMorph.setAttribute('in', 'SourceGraphic'); + feMorph.setAttribute('radius', '0'); + expansor.appendChild(feMorph); + defs.appendChild(expansor); + path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff'); + } else { + feMorph = null; + x = null; + } + + // TODO move this to a factory or to a constructor + this.storedData[i] = { + elem: path, + x: x, + expan: feMorph, + lastPath: '', + lastOperator: '', + filterId: filterID, + lastRadius: 0, + }; + if (properties[i].mode === 'i') { + jLen = currentMasks.length; + var g = createNS('g'); + for (j = 0; j < jLen; j += 1) { + g.appendChild(currentMasks[j]); + } + var mask = createNS('mask'); + mask.setAttribute('mask-type', 'alpha'); + mask.setAttribute('id', layerId + '_' + count); + mask.appendChild(path); + defs.appendChild(mask); + g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')'); + + currentMasks.length = 0; + currentMasks.push(g); + } else { + currentMasks.push(path); + } + if (properties[i].inv && !this.solidPath) { + this.solidPath = this.createLayerSolidPath(); + } + // TODO move this to a factory or to a constructor + this.viewData[i] = { + elem: path, + lastPath: '', + op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element), + prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3), + invRect: rect, + }; + if (!this.viewData[i].prop.k) { + this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]); + } + } + } + + this.maskElement = createNS(maskType); + + len = currentMasks.length; + for (i = 0; i < len; i += 1) { + this.maskElement.appendChild(currentMasks[i]); + } + + if (count > 0) { + this.maskElement.setAttribute('id', layerId); + this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')'); + defs.appendChild(this.maskElement); + } + if (this.viewData.length) { + this.element.addRenderableComponent(this); + } +} + +MaskElement.prototype.getMaskProperty = function (pos) { + return this.viewData[pos].prop; +}; + +MaskElement.prototype.renderFrame = function (isFirstFrame) { + var finalMat = this.element.finalTransform.mat; + var i; + var len = this.masksProperties.length; + for (i = 0; i < len; i += 1) { + if (this.viewData[i].prop._mdf || isFirstFrame) { + this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]); + } + if (this.viewData[i].op._mdf || isFirstFrame) { + this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v); + } + if (this.masksProperties[i].mode !== 'n') { + if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) { + this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS()); + } + if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) { + var feMorph = this.storedData[i].expan; + if (this.storedData[i].x.v < 0) { + if (this.storedData[i].lastOperator !== 'erode') { + this.storedData[i].lastOperator = 'erode'; + this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')'); + } + feMorph.setAttribute('radius', -this.storedData[i].x.v); + } else { + if (this.storedData[i].lastOperator !== 'dilate') { + this.storedData[i].lastOperator = 'dilate'; + this.storedData[i].elem.setAttribute('filter', null); + } + this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2); + } + } + } + } +}; + +MaskElement.prototype.getMaskelement = function () { + return this.maskElement; +}; + +MaskElement.prototype.createLayerSolidPath = function () { + var path = 'M0,0 '; + path += ' h' + this.globalData.compSize.w; + path += ' v' + this.globalData.compSize.h; + path += ' h-' + this.globalData.compSize.w; + path += ' v-' + this.globalData.compSize.h + ' '; + return path; +}; + +MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) { + var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1]; + var i; + var len; + len = pathNodes._length; + for (i = 1; i < len; i += 1) { + // pathString += " C"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + " "+pathNodes.i[i][0]+','+pathNodes.i[i][1] + " "+pathNodes.v[i][0]+','+pathNodes.v[i][1]; + pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[i][0] + ',' + pathNodes.i[i][1] + ' ' + pathNodes.v[i][0] + ',' + pathNodes.v[i][1]; + } + // pathString += " C"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + " "+pathNodes.i[0][0]+','+pathNodes.i[0][1] + " "+pathNodes.v[0][0]+','+pathNodes.v[0][1]; + if (pathNodes.c && len > 1) { + pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[0][0] + ',' + pathNodes.i[0][1] + ' ' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1]; + } + // pathNodes.__renderedString = pathString; + + if (viewData.lastPath !== pathString) { + var pathShapeValue = ''; + if (viewData.elem) { + if (pathNodes.c) { + pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString; + } + viewData.elem.setAttribute('d', pathShapeValue); + } + viewData.lastPath = pathString; + } +}; + +MaskElement.prototype.destroy = function () { + this.element = null; + this.globalData = null; + this.maskElement = null; + this.data = null; + this.masksProperties = null; +}; + +const filtersFactory = (function () { + var ob = {}; + ob.createFilter = createFilter; + ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter; + + function createFilter(filId, skipCoordinates) { + var fil = createNS('filter'); + fil.setAttribute('id', filId); + if (skipCoordinates !== true) { + fil.setAttribute('filterUnits', 'objectBoundingBox'); + fil.setAttribute('x', '0%'); + fil.setAttribute('y', '0%'); + fil.setAttribute('width', '100%'); + fil.setAttribute('height', '100%'); + } + return fil; + } + + function createAlphaToLuminanceFilter() { + var feColorMatrix = createNS('feColorMatrix'); + feColorMatrix.setAttribute('type', 'matrix'); + feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB'); + feColorMatrix.setAttribute('values', '0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1'); + return feColorMatrix; + } + + return ob; +}()); + +const featureSupport = (function () { + var ob = { + maskType: true, + }; + if (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\/\d./i.test(navigator.userAgent)) { + ob.maskType = false; + } + return ob; +}()); + +var registeredEffects = {}; +var idPrefix = 'filter_result_'; + +function SVGEffects(elem) { + var i; + var source = 'SourceGraphic'; + var len = elem.data.ef ? elem.data.ef.length : 0; + var filId = createElementID(); + var fil = filtersFactory.createFilter(filId, true); + var count = 0; + this.filters = []; + var filterManager; + for (i = 0; i < len; i += 1) { + filterManager = null; + var type = elem.data.ef[i].ty; + if (registeredEffects[type]) { + var Effect = registeredEffects[type].effect; + filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem, idPrefix + count, source); + source = idPrefix + count; + if (registeredEffects[type].countsAsEffect) { + count += 1; + } + } + if (filterManager) { + this.filters.push(filterManager); + } + } + if (count) { + elem.globalData.defs.appendChild(fil); + elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')'); + } + if (this.filters.length) { + elem.addRenderableComponent(this); + } +} + +SVGEffects.prototype.renderFrame = function (_isFirstFrame) { + var i; + var len = this.filters.length; + for (i = 0; i < len; i += 1) { + this.filters[i].renderFrame(_isFirstFrame); + } +}; + +function registerEffect(id, effect, countsAsEffect) { + registeredEffects[id] = { + effect, + countsAsEffect, + }; +} + +function SVGBaseElement() { +} + +SVGBaseElement.prototype = { + initRendererElement: function () { + this.layerElement = createNS('g'); + }, + createContainerElements: function () { + this.matteElement = createNS('g'); + this.transformedElement = this.layerElement; + this.maskedElement = this.layerElement; + this._sizeChanged = false; + var layerElementParent = null; + // If this layer acts as a mask for the following layer + var filId; + var fil; + var gg; + if (this.data.td) { + if (this.data.td == 3 || this.data.td == 1) { // eslint-disable-line eqeqeq + var masker = createNS('mask'); + masker.setAttribute('id', this.layerId); + masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha'); // eslint-disable-line eqeqeq + masker.appendChild(this.layerElement); + layerElementParent = masker; + this.globalData.defs.appendChild(masker); + // This is only for IE and Edge when mask if of type alpha + if (!featureSupport.maskType && this.data.td == 1) { // eslint-disable-line eqeqeq + masker.setAttribute('mask-type', 'luminance'); + filId = createElementID(); + fil = filtersFactory.createFilter(filId); + this.globalData.defs.appendChild(fil); + fil.appendChild(filtersFactory.createAlphaToLuminanceFilter()); + gg = createNS('g'); + gg.appendChild(this.layerElement); + layerElementParent = gg; + masker.appendChild(gg); + gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')'); + } + } else if (this.data.td == 2) { // eslint-disable-line eqeqeq + var maskGroup = createNS('mask'); + maskGroup.setAttribute('id', this.layerId); + maskGroup.setAttribute('mask-type', 'alpha'); + var maskGrouper = createNS('g'); + maskGroup.appendChild(maskGrouper); + filId = createElementID(); + fil = filtersFactory.createFilter(filId); + /// / + + // This solution doesn't work on Android when meta tag with viewport attribute is set + /* var feColorMatrix = createNS('feColorMatrix'); + feColorMatrix.setAttribute('type', 'matrix'); + feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB'); + feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1'); + fil.appendChild(feColorMatrix); */ + /// / + var feCTr = createNS('feComponentTransfer'); + feCTr.setAttribute('in', 'SourceGraphic'); + fil.appendChild(feCTr); + var feFunc = createNS('feFuncA'); + feFunc.setAttribute('type', 'table'); + feFunc.setAttribute('tableValues', '1.0 0.0'); + feCTr.appendChild(feFunc); + /// / + this.globalData.defs.appendChild(fil); + var alphaRect = createNS('rect'); + alphaRect.setAttribute('width', this.comp.data.w); + alphaRect.setAttribute('height', this.comp.data.h); + alphaRect.setAttribute('x', '0'); + alphaRect.setAttribute('y', '0'); + alphaRect.setAttribute('fill', '#ffffff'); + alphaRect.setAttribute('opacity', '0'); + maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')'); + maskGrouper.appendChild(alphaRect); + maskGrouper.appendChild(this.layerElement); + layerElementParent = maskGrouper; + if (!featureSupport.maskType) { + maskGroup.setAttribute('mask-type', 'luminance'); + fil.appendChild(filtersFactory.createAlphaToLuminanceFilter()); + gg = createNS('g'); + maskGrouper.appendChild(alphaRect); + gg.appendChild(this.layerElement); + layerElementParent = gg; + maskGrouper.appendChild(gg); + } + this.globalData.defs.appendChild(maskGroup); + } + } else if (this.data.tt) { + this.matteElement.appendChild(this.layerElement); + layerElementParent = this.matteElement; + this.baseElement = this.matteElement; + } else { + this.baseElement = this.layerElement; + } + if (this.data.ln) { + this.layerElement.setAttribute('id', this.data.ln); + } + if (this.data.cl) { + this.layerElement.setAttribute('class', this.data.cl); + } + // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped + if (this.data.ty === 0 && !this.data.hd) { + var cp = createNS('clipPath'); + var pt = createNS('path'); + pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z'); + var clipId = createElementID(); + cp.setAttribute('id', clipId); + cp.appendChild(pt); + this.globalData.defs.appendChild(cp); + + if (this.checkMasks()) { + var cpGroup = createNS('g'); + cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')'); + cpGroup.appendChild(this.layerElement); + this.transformedElement = cpGroup; + if (layerElementParent) { + layerElementParent.appendChild(this.transformedElement); + } else { + this.baseElement = this.transformedElement; + } + } else { + this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')'); + } + } + if (this.data.bm !== 0) { + this.setBlendMode(); + } + }, + renderElement: function () { + if (this.finalTransform._matMdf) { + this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS()); + } + if (this.finalTransform._opMdf) { + this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v); + } + }, + destroyBaseElement: function () { + this.layerElement = null; + this.matteElement = null; + this.maskManager.destroy(); + }, + getBaseElement: function () { + if (this.data.hd) { + return null; + } + return this.baseElement; + }, + createRenderableComponents: function () { + this.maskManager = new MaskElement(this.data, this, this.globalData); + this.renderableEffectsManager = new SVGEffects(this); + }, + setMatte: function (id) { + if (!this.matteElement) { + return; + } + this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')'); + }, +}; + +/** + * @file + * Handles AE's layer parenting property. + * + */ + +function HierarchyElement() {} + +HierarchyElement.prototype = { + /** + * @function + * Initializes hierarchy properties + * + */ + initHierarchy: function () { + // element's parent list + this.hierarchy = []; + // if element is parent of another layer _isParent will be true + this._isParent = false; + this.checkParenting(); + }, + /** + * @function + * Sets layer's hierarchy. + * @param {array} hierarch + * layer's parent list + * + */ + setHierarchy: function (hierarchy) { + this.hierarchy = hierarchy; + }, + /** + * @function + * Sets layer as parent. + * + */ + setAsParent: function () { + this._isParent = true; + }, + /** + * @function + * Searches layer's parenting chain + * + */ + checkParenting: function () { + if (this.data.parent !== undefined) { + this.comp.buildElementParenting(this, this.data.parent, []); + } + }, +}; + +function RenderableDOMElement() {} + +(function () { + var _prototype = { + initElement: function (data, globalData, comp) { + this.initFrame(); + this.initBaseData(data, globalData, comp); + this.initTransform(data, globalData, comp); + this.initHierarchy(); + this.initRenderable(); + this.initRendererElement(); + this.createContainerElements(); + this.createRenderableComponents(); + this.createContent(); + this.hide(); + }, + hide: function () { + // console.log('HIDE', this); + if (!this.hidden && (!this.isInRange || this.isTransparent)) { + var elem = this.baseElement || this.layerElement; + elem.style.display = 'none'; + this.hidden = true; + } + }, + show: function () { + // console.log('SHOW', this); + if (this.isInRange && !this.isTransparent) { + if (!this.data.hd) { + var elem = this.baseElement || this.layerElement; + elem.style.display = 'block'; + } + this.hidden = false; + this._isFirstFrame = true; + } + }, + renderFrame: function () { + // If it is exported as hidden (data.hd === true) no need to render + // If it is not visible no need to render + if (this.data.hd || this.hidden) { + return; + } + this.renderTransform(); + this.renderRenderable(); + this.renderElement(); + this.renderInnerContent(); + if (this._isFirstFrame) { + this._isFirstFrame = false; + } + }, + renderInnerContent: function () {}, + prepareFrame: function (num) { + this._mdf = false; + this.prepareRenderableFrame(num); + this.prepareProperties(num, this.isInRange); + this.checkTransparency(); + }, + destroy: function () { + this.innerElem = null; + this.destroyBaseElement(); + }, + }; + extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement); +}()); + +function IImageElement(data, globalData, comp) { + this.assetData = globalData.getAssetData(data.refId); + this.initElement(data, globalData, comp); + this.sourceRect = { + top: 0, left: 0, width: this.assetData.w, height: this.assetData.h, + }; +} + +extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement); + +IImageElement.prototype.createContent = function () { + var assetPath = this.globalData.getAssetsPath(this.assetData); + + this.innerElem = createNS('image'); + this.innerElem.setAttribute('width', this.assetData.w + 'px'); + this.innerElem.setAttribute('height', this.assetData.h + 'px'); + this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio); + this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath); + + this.layerElement.appendChild(this.innerElem); +}; + +IImageElement.prototype.sourceRectAtTime = function () { + return this.sourceRect; +}; + +function ProcessedElement(element, position) { + this.elem = element; + this.pos = position; +} + +function IShapeElement() { +} + +IShapeElement.prototype = { + addShapeToModifiers: function (data) { + var i; + var len = this.shapeModifiers.length; + for (i = 0; i < len; i += 1) { + this.shapeModifiers[i].addShape(data); + } + }, + isShapeInAnimatedModifiers: function (data) { + var i = 0; + var len = this.shapeModifiers.length; + while (i < len) { + if (this.shapeModifiers[i].isAnimatedWithShape(data)) { + return true; + } + } + return false; + }, + renderModifiers: function () { + if (!this.shapeModifiers.length) { + return; + } + var i; + var len = this.shapes.length; + for (i = 0; i < len; i += 1) { + this.shapes[i].sh.reset(); + } + + len = this.shapeModifiers.length; + var shouldBreakProcess; + for (i = len - 1; i >= 0; i -= 1) { + shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); + // workaround to fix cases where a repeater resets the shape so the following processes get called twice + // TODO: find a better solution for this + if (shouldBreakProcess) { + break; + } + } + }, + + searchProcessedElement: function (elem) { + var elements = this.processedElements; + var i = 0; + var len = elements.length; + while (i < len) { + if (elements[i].elem === elem) { + return elements[i].pos; + } + i += 1; + } + return 0; + }, + addProcessedElement: function (elem, pos) { + var elements = this.processedElements; + var i = elements.length; + while (i) { + i -= 1; + if (elements[i].elem === elem) { + elements[i].pos = pos; + return; + } + } + elements.push(new ProcessedElement(elem, pos)); + }, + prepareFrame: function (num) { + this.prepareRenderableFrame(num); + this.prepareProperties(num, this.isInRange); + }, +}; + +const lineCapEnum = { + 1: 'butt', + 2: 'round', + 3: 'square', +}; + +const lineJoinEnum = { + 1: 'miter', + 2: 'round', + 3: 'bevel', +}; + +function SVGShapeData(transformers, level, shape) { + this.caches = []; + this.styles = []; + this.transformers = transformers; + this.lStr = ''; + this.sh = shape; + this.lvl = level; + // TODO find if there are some cases where _isAnimated can be false. + // For now, since shapes add up with other shapes. They have to be calculated every time. + // One way of finding out is checking if all styles associated to this shape depend only of this shape + this._isAnimated = !!shape.k; + // TODO: commenting this for now since all shapes are animated + var i = 0; + var len = transformers.length; + while (i < len) { + if (transformers[i].mProps.dynamicProperties.length) { + this._isAnimated = true; + break; + } + i += 1; + } +} + +SVGShapeData.prototype.setAsAnimated = function () { + this._isAnimated = true; +}; + +function SVGStyleData(data, level) { + this.data = data; + this.type = data.ty; + this.d = ''; + this.lvl = level; + this._mdf = false; + this.closed = data.hd === true; + this.pElem = createNS('path'); + this.msElem = null; +} + +SVGStyleData.prototype.reset = function () { + this.d = ''; + this._mdf = false; +}; + +function DashProperty(elem, data, renderer, container) { + this.elem = elem; + this.frameId = -1; + this.dataProps = createSizedArray(data.length); + this.renderer = renderer; + this.k = false; + this.dashStr = ''; + this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0); + this.dashoffset = createTypedArray('float32', 1); + this.initDynamicPropertyContainer(container); + var i; + var len = data.length || 0; + var prop; + for (i = 0; i < len; i += 1) { + prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this); + this.k = prop.k || this.k; + this.dataProps[i] = { n: data[i].n, p: prop }; + } + if (!this.k) { + this.getValue(true); + } + this._isAnimated = this.k; +} + +DashProperty.prototype.getValue = function (forceRender) { + if (this.elem.globalData.frameId === this.frameId && !forceRender) { + return; + } + this.frameId = this.elem.globalData.frameId; + this.iterateDynamicProperties(); + this._mdf = this._mdf || forceRender; + if (this._mdf) { + var i = 0; + var len = this.dataProps.length; + if (this.renderer === 'svg') { + this.dashStr = ''; + } + for (i = 0; i < len; i += 1) { + if (this.dataProps[i].n !== 'o') { + if (this.renderer === 'svg') { + this.dashStr += ' ' + this.dataProps[i].p.v; + } else { + this.dashArray[i] = this.dataProps[i].p.v; + } + } else { + this.dashoffset[0] = this.dataProps[i].p.v; + } + } + } +}; +extendPrototype([DynamicPropertyContainer], DashProperty); + +function SVGStrokeStyleData(elem, data, styleOb) { + this.initDynamicPropertyContainer(elem); + this.getValue = this.iterateDynamicProperties; + this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this); + this.w = PropertyFactory.getProp(elem, data.w, 0, null, this); + this.d = new DashProperty(elem, data.d || {}, 'svg', this); + this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this); + this.style = styleOb; + this._isAnimated = !!this._isAnimated; +} + +extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData); + +function SVGFillStyleData(elem, data, styleOb) { + this.initDynamicPropertyContainer(elem); + this.getValue = this.iterateDynamicProperties; + this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this); + this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this); + this.style = styleOb; +} + +extendPrototype([DynamicPropertyContainer], SVGFillStyleData); + +function SVGNoStyleData(elem, data, styleOb) { + this.initDynamicPropertyContainer(elem); + this.getValue = this.iterateDynamicProperties; + this.style = styleOb; +} + +extendPrototype([DynamicPropertyContainer], SVGNoStyleData); + +function GradientProperty(elem, data, container) { + this.data = data; + this.c = createTypedArray('uint8c', data.p * 4); + var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p * 4) : data.k.k.length - data.p * 4; + this.o = createTypedArray('float32', cLength); + this._cmdf = false; + this._omdf = false; + this._collapsable = this.checkCollapsable(); + this._hasOpacity = cLength; + this.initDynamicPropertyContainer(container); + this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this); + this.k = this.prop.k; + this.getValue(true); +} + +GradientProperty.prototype.comparePoints = function (values, points) { + var i = 0; + var len = this.o.length / 2; + var diff; + while (i < len) { + diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]); + if (diff > 0.01) { + return false; + } + i += 1; + } + return true; +}; + +GradientProperty.prototype.checkCollapsable = function () { + if (this.o.length / 2 !== this.c.length / 4) { + return false; + } + if (this.data.k.k[0].s) { + var i = 0; + var len = this.data.k.k.length; + while (i < len) { + if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) { + return false; + } + i += 1; + } + } else if (!this.comparePoints(this.data.k.k, this.data.p)) { + return false; + } + return true; +}; + +GradientProperty.prototype.getValue = function (forceRender) { + this.prop.getValue(); + this._mdf = false; + this._cmdf = false; + this._omdf = false; + if (this.prop._mdf || forceRender) { + var i; + var len = this.data.p * 4; + var mult; + var val; + for (i = 0; i < len; i += 1) { + mult = i % 4 === 0 ? 100 : 255; + val = Math.round(this.prop.v[i] * mult); + if (this.c[i] !== val) { + this.c[i] = val; + this._cmdf = !forceRender; + } + } + if (this.o.length) { + len = this.prop.v.length; + for (i = this.data.p * 4; i < len; i += 1) { + mult = i % 2 === 0 ? 100 : 1; + val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i]; + if (this.o[i - this.data.p * 4] !== val) { + this.o[i - this.data.p * 4] = val; + this._omdf = !forceRender; + } + } + } + this._mdf = !forceRender; + } +}; + +extendPrototype([DynamicPropertyContainer], GradientProperty); + +function SVGGradientFillStyleData(elem, data, styleOb) { + this.initDynamicPropertyContainer(elem); + this.getValue = this.iterateDynamicProperties; + this.initGradientData(elem, data, styleOb); +} + +SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) { + this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this); + this.s = PropertyFactory.getProp(elem, data.s, 1, null, this); + this.e = PropertyFactory.getProp(elem, data.e, 1, null, this); + this.h = PropertyFactory.getProp(elem, data.h || { k: 0 }, 0, 0.01, this); + this.a = PropertyFactory.getProp(elem, data.a || { k: 0 }, 0, degToRads, this); + this.g = new GradientProperty(elem, data.g, this); + this.style = styleOb; + this.stops = []; + this.setGradientData(styleOb.pElem, data); + this.setGradientOpacity(data, styleOb); + this._isAnimated = !!this._isAnimated; +}; + +SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) { + var gradientId = createElementID(); + var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient'); + gfill.setAttribute('id', gradientId); + gfill.setAttribute('spreadMethod', 'pad'); + gfill.setAttribute('gradientUnits', 'userSpaceOnUse'); + var stops = []; + var stop; + var j; + var jLen; + jLen = data.g.p * 4; + for (j = 0; j < jLen; j += 4) { + stop = createNS('stop'); + gfill.appendChild(stop); + stops.push(stop); + } + pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')'); + this.gf = gfill; + this.cst = stops; +}; + +SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) { + if (this.g._hasOpacity && !this.g._collapsable) { + var stop; + var j; + var jLen; + var mask = createNS('mask'); + var maskElement = createNS('path'); + mask.appendChild(maskElement); + var opacityId = createElementID(); + var maskId = createElementID(); + mask.setAttribute('id', maskId); + var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient'); + opFill.setAttribute('id', opacityId); + opFill.setAttribute('spreadMethod', 'pad'); + opFill.setAttribute('gradientUnits', 'userSpaceOnUse'); + jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length; + var stops = this.stops; + for (j = data.g.p * 4; j < jLen; j += 2) { + stop = createNS('stop'); + stop.setAttribute('stop-color', 'rgb(255,255,255)'); + opFill.appendChild(stop); + stops.push(stop); + } + maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')'); + if (data.ty === 'gs') { + maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]); + maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]); + if (data.lj === 1) { + maskElement.setAttribute('stroke-miterlimit', data.ml); + } + } + this.of = opFill; + this.ms = mask; + this.ost = stops; + this.maskId = maskId; + styleOb.msElem = maskElement; + } +}; + +extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData); + +function SVGGradientStrokeStyleData(elem, data, styleOb) { + this.initDynamicPropertyContainer(elem); + this.getValue = this.iterateDynamicProperties; + this.w = PropertyFactory.getProp(elem, data.w, 0, null, this); + this.d = new DashProperty(elem, data.d || {}, 'svg', this); + this.initGradientData(elem, data, styleOb); + this._isAnimated = !!this._isAnimated; +} + +extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData); + +function ShapeGroupData() { + this.it = []; + this.prevViewData = []; + this.gr = createNS('g'); +} + +function SVGTransformData(mProps, op, container) { + this.transform = { + mProps: mProps, + op: op, + container: container, + }; + this.elements = []; + this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length; +} + +const buildShapeString = function (pathNodes, length, closed, mat) { + if (length === 0) { + return ''; + } + var _o = pathNodes.o; + var _i = pathNodes.i; + var _v = pathNodes.v; + var i; + var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]); + for (i = 1; i < length; i += 1) { + shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[i][0], _i[i][1]) + ' ' + mat.applyToPointStringified(_v[i][0], _v[i][1]); + } + if (closed && length) { + shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[0][0], _i[0][1]) + ' ' + mat.applyToPointStringified(_v[0][0], _v[0][1]); + shapeString += 'z'; + } + return shapeString; +}; + +const SVGElementsRenderer = (function () { + var _identityMatrix = new Matrix(); + var _matrixHelper = new Matrix(); + + var ob = { + createRenderFunction: createRenderFunction, + }; + + function createRenderFunction(data) { + switch (data.ty) { + case 'fl': + return renderFill; + case 'gf': + return renderGradient; + case 'gs': + return renderGradientStroke; + case 'st': + return renderStroke; + case 'sh': + case 'el': + case 'rc': + case 'sr': + return renderPath; + case 'tr': + return renderContentTransform; + case 'no': + return renderNoop; + default: + return null; + } + } + + function renderContentTransform(styleData, itemData, isFirstFrame) { + if (isFirstFrame || itemData.transform.op._mdf) { + itemData.transform.container.setAttribute('opacity', itemData.transform.op.v); + } + if (isFirstFrame || itemData.transform.mProps._mdf) { + itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS()); + } + } + + function renderNoop() { + + } + + function renderPath(styleData, itemData, isFirstFrame) { + var j; + var jLen; + var pathStringTransformed; + var redraw; + var pathNodes; + var l; + var lLen = itemData.styles.length; + var lvl = itemData.lvl; + var paths; + var mat; + var props; + var iterations; + var k; + for (l = 0; l < lLen; l += 1) { + redraw = itemData.sh._mdf || isFirstFrame; + if (itemData.styles[l].lvl < lvl) { + mat = _matrixHelper.reset(); + iterations = lvl - itemData.styles[l].lvl; + k = itemData.transformers.length - 1; + while (!redraw && iterations > 0) { + redraw = itemData.transformers[k].mProps._mdf || redraw; + iterations -= 1; + k -= 1; + } + if (redraw) { + iterations = lvl - itemData.styles[l].lvl; + k = itemData.transformers.length - 1; + while (iterations > 0) { + props = itemData.transformers[k].mProps.v.props; + mat.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]); + iterations -= 1; + k -= 1; + } + } + } else { + mat = _identityMatrix; + } + paths = itemData.sh.paths; + jLen = paths._length; + if (redraw) { + pathStringTransformed = ''; + for (j = 0; j < jLen; j += 1) { + pathNodes = paths.shapes[j]; + if (pathNodes && pathNodes._length) { + pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat); + } + } + itemData.caches[l] = pathStringTransformed; + } else { + pathStringTransformed = itemData.caches[l]; + } + itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed; + itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf; + } + } + + function renderFill(styleData, itemData, isFirstFrame) { + var styleElem = itemData.style; + + if (itemData.c._mdf || isFirstFrame) { + styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')'); + } + if (itemData.o._mdf || isFirstFrame) { + styleElem.pElem.setAttribute('fill-opacity', itemData.o.v); + } + } + + function renderGradientStroke(styleData, itemData, isFirstFrame) { + renderGradient(styleData, itemData, isFirstFrame); + renderStroke(styleData, itemData, isFirstFrame); + } + + function renderGradient(styleData, itemData, isFirstFrame) { + var gfill = itemData.gf; + var hasOpacity = itemData.g._hasOpacity; + var pt1 = itemData.s.v; + var pt2 = itemData.e.v; + + if (itemData.o._mdf || isFirstFrame) { + var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity'; + itemData.style.pElem.setAttribute(attr, itemData.o.v); + } + if (itemData.s._mdf || isFirstFrame) { + var attr1 = styleData.t === 1 ? 'x1' : 'cx'; + var attr2 = attr1 === 'x1' ? 'y1' : 'cy'; + gfill.setAttribute(attr1, pt1[0]); + gfill.setAttribute(attr2, pt1[1]); + if (hasOpacity && !itemData.g._collapsable) { + itemData.of.setAttribute(attr1, pt1[0]); + itemData.of.setAttribute(attr2, pt1[1]); + } + } + var stops; + var i; + var len; + var stop; + if (itemData.g._cmdf || isFirstFrame) { + stops = itemData.cst; + var cValues = itemData.g.c; + len = stops.length; + for (i = 0; i < len; i += 1) { + stop = stops[i]; + stop.setAttribute('offset', cValues[i * 4] + '%'); + stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')'); + } + } + if (hasOpacity && (itemData.g._omdf || isFirstFrame)) { + var oValues = itemData.g.o; + if (itemData.g._collapsable) { + stops = itemData.cst; + } else { + stops = itemData.ost; + } + len = stops.length; + for (i = 0; i < len; i += 1) { + stop = stops[i]; + if (!itemData.g._collapsable) { + stop.setAttribute('offset', oValues[i * 2] + '%'); + } + stop.setAttribute('stop-opacity', oValues[i * 2 + 1]); + } + } + if (styleData.t === 1) { + if (itemData.e._mdf || isFirstFrame) { + gfill.setAttribute('x2', pt2[0]); + gfill.setAttribute('y2', pt2[1]); + if (hasOpacity && !itemData.g._collapsable) { + itemData.of.setAttribute('x2', pt2[0]); + itemData.of.setAttribute('y2', pt2[1]); + } + } + } else { + var rad; + if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) { + rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2)); + gfill.setAttribute('r', rad); + if (hasOpacity && !itemData.g._collapsable) { + itemData.of.setAttribute('r', rad); + } + } + if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) { + if (!rad) { + rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2)); + } + var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]); + + var percent = itemData.h.v; + if (percent >= 1) { + percent = 0.99; + } else if (percent <= -1) { + percent = -0.99; + } + var dist = rad * percent; + var x = Math.cos(ang + itemData.a.v) * dist + pt1[0]; + var y = Math.sin(ang + itemData.a.v) * dist + pt1[1]; + gfill.setAttribute('fx', x); + gfill.setAttribute('fy', y); + if (hasOpacity && !itemData.g._collapsable) { + itemData.of.setAttribute('fx', x); + itemData.of.setAttribute('fy', y); + } + } + // gfill.setAttribute('fy','200'); + } + } + + function renderStroke(styleData, itemData, isFirstFrame) { + var styleElem = itemData.style; + var d = itemData.d; + if (d && (d._mdf || isFirstFrame) && d.dashStr) { + styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr); + styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]); + } + if (itemData.c && (itemData.c._mdf || isFirstFrame)) { + styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')'); + } + if (itemData.o._mdf || isFirstFrame) { + styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v); + } + if (itemData.w._mdf || isFirstFrame) { + styleElem.pElem.setAttribute('stroke-width', itemData.w.v); + if (styleElem.msElem) { + styleElem.msElem.setAttribute('stroke-width', itemData.w.v); + } + } + } + + return ob; +}()); + +function SVGShapeElement(data, globalData, comp) { + // List of drawable elements + this.shapes = []; + // Full shape data + this.shapesData = data.shapes; + // List of styles that will be applied to shapes + this.stylesList = []; + // List of modifiers that will be applied to shapes + this.shapeModifiers = []; + // List of items in shape tree + this.itemsData = []; + // List of items in previous shape tree + this.processedElements = []; + // List of animated components + this.animatedContents = []; + this.initElement(data, globalData, comp); + // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties. + // List of elements that have been created + this.prevViewData = []; + // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties. +} + +extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement); + +SVGShapeElement.prototype.initSecondaryElement = function () { +}; + +SVGShapeElement.prototype.identityMatrix = new Matrix(); + +SVGShapeElement.prototype.buildExpressionInterface = function () {}; + +SVGShapeElement.prototype.createContent = function () { + this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true); + this.filterUniqueShapes(); +}; + +/* +This method searches for multiple shapes that affect a single element and one of them is animated +*/ +SVGShapeElement.prototype.filterUniqueShapes = function () { + var i; + var len = this.shapes.length; + var shape; + var j; + var jLen = this.stylesList.length; + var style; + var tempShapes = []; + var areAnimated = false; + for (j = 0; j < jLen; j += 1) { + style = this.stylesList[j]; + areAnimated = false; + tempShapes.length = 0; + for (i = 0; i < len; i += 1) { + shape = this.shapes[i]; + if (shape.styles.indexOf(style) !== -1) { + tempShapes.push(shape); + areAnimated = shape._isAnimated || areAnimated; + } + } + if (tempShapes.length > 1 && areAnimated) { + this.setShapesAsAnimated(tempShapes); + } + } +}; + +SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) { + var i; + var len = shapes.length; + for (i = 0; i < len; i += 1) { + shapes[i].setAsAnimated(); + } +}; + +SVGShapeElement.prototype.createStyleElement = function (data, level) { + // TODO: prevent drawing of hidden styles + var elementData; + var styleOb = new SVGStyleData(data, level); + + var pathElement = styleOb.pElem; + if (data.ty === 'st') { + elementData = new SVGStrokeStyleData(this, data, styleOb); + } else if (data.ty === 'fl') { + elementData = new SVGFillStyleData(this, data, styleOb); + } else if (data.ty === 'gf' || data.ty === 'gs') { + var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData; + elementData = new GradientConstructor(this, data, styleOb); + this.globalData.defs.appendChild(elementData.gf); + if (elementData.maskId) { + this.globalData.defs.appendChild(elementData.ms); + this.globalData.defs.appendChild(elementData.of); + pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')'); + } + } else if (data.ty === 'no') { + elementData = new SVGNoStyleData(this, data, styleOb); + } + + if (data.ty === 'st' || data.ty === 'gs') { + pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]); + pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]); + pathElement.setAttribute('fill-opacity', '0'); + if (data.lj === 1) { + pathElement.setAttribute('stroke-miterlimit', data.ml); + } + } + + if (data.r === 2) { + pathElement.setAttribute('fill-rule', 'evenodd'); + } + + if (data.ln) { + pathElement.setAttribute('id', data.ln); + } + if (data.cl) { + pathElement.setAttribute('class', data.cl); + } + if (data.bm) { + pathElement.style['mix-blend-mode'] = getBlendMode(data.bm); + } + this.stylesList.push(styleOb); + this.addToAnimatedContents(data, elementData); + return elementData; +}; + +SVGShapeElement.prototype.createGroupElement = function (data) { + var elementData = new ShapeGroupData(); + if (data.ln) { + elementData.gr.setAttribute('id', data.ln); + } + if (data.cl) { + elementData.gr.setAttribute('class', data.cl); + } + if (data.bm) { + elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm); + } + return elementData; +}; + +SVGShapeElement.prototype.createTransformElement = function (data, container) { + var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this); + var elementData = new SVGTransformData(transformProperty, transformProperty.o, container); + this.addToAnimatedContents(data, elementData); + return elementData; +}; + +SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) { + var ty = 4; + if (data.ty === 'rc') { + ty = 5; + } else if (data.ty === 'el') { + ty = 6; + } else if (data.ty === 'sr') { + ty = 7; + } + var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this); + var elementData = new SVGShapeData(ownTransformers, level, shapeProperty); + this.shapes.push(elementData); + this.addShapeToModifiers(elementData); + this.addToAnimatedContents(data, elementData); + return elementData; +}; + +SVGShapeElement.prototype.addToAnimatedContents = function (data, element) { + var i = 0; + var len = this.animatedContents.length; + while (i < len) { + if (this.animatedContents[i].element === element) { + return; + } + i += 1; + } + this.animatedContents.push({ + fn: SVGElementsRenderer.createRenderFunction(data), + element: element, + data: data, + }); +}; + +SVGShapeElement.prototype.setElementStyles = function (elementData) { + var arr = elementData.styles; + var j; + var jLen = this.stylesList.length; + for (j = 0; j < jLen; j += 1) { + if (!this.stylesList[j].closed) { + arr.push(this.stylesList[j]); + } + } +}; + +SVGShapeElement.prototype.reloadShapes = function () { + this._isFirstFrame = true; + var i; + var len = this.itemsData.length; + for (i = 0; i < len; i += 1) { + this.prevViewData[i] = this.itemsData[i]; + } + this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true); + this.filterUniqueShapes(); + len = this.dynamicProperties.length; + for (i = 0; i < len; i += 1) { + this.dynamicProperties[i].getValue(); + } + this.renderModifiers(); +}; + +SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) { + var ownTransformers = [].concat(transformers); + var i; + var len = arr.length - 1; + var j; + var jLen; + var ownStyles = []; + var ownModifiers = []; + var currentTransform; + var modifier; + var processedPos; + for (i = len; i >= 0; i -= 1) { + processedPos = this.searchProcessedElement(arr[i]); + if (!processedPos) { + arr[i]._render = render; + } else { + itemsData[i] = prevViewData[processedPos - 1]; + } + if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') { + if (!processedPos) { + itemsData[i] = this.createStyleElement(arr[i], level); + } else { + itemsData[i].style.closed = false; + } + if (arr[i]._render) { + if (itemsData[i].style.pElem.parentNode !== container) { + container.appendChild(itemsData[i].style.pElem); + } + } + ownStyles.push(itemsData[i].style); + } else if (arr[i].ty === 'gr') { + if (!processedPos) { + itemsData[i] = this.createGroupElement(arr[i]); + } else { + jLen = itemsData[i].it.length; + for (j = 0; j < jLen; j += 1) { + itemsData[i].prevViewData[j] = itemsData[i].it[j]; + } + } + this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render); + if (arr[i]._render) { + if (itemsData[i].gr.parentNode !== container) { + container.appendChild(itemsData[i].gr); + } + } + } else if (arr[i].ty === 'tr') { + if (!processedPos) { + itemsData[i] = this.createTransformElement(arr[i], container); + } + currentTransform = itemsData[i].transform; + ownTransformers.push(currentTransform); + } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') { + if (!processedPos) { + itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level); + } + this.setElementStyles(itemsData[i]); + } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb') { + if (!processedPos) { + modifier = ShapeModifiers.getModifier(arr[i].ty); + modifier.init(this, arr[i]); + itemsData[i] = modifier; + this.shapeModifiers.push(modifier); + } else { + modifier = itemsData[i]; + modifier.closed = false; + } + ownModifiers.push(modifier); + } else if (arr[i].ty === 'rp') { + if (!processedPos) { + modifier = ShapeModifiers.getModifier(arr[i].ty); + itemsData[i] = modifier; + modifier.init(this, arr, i, itemsData); + this.shapeModifiers.push(modifier); + render = false; + } else { + modifier = itemsData[i]; + modifier.closed = true; + } + ownModifiers.push(modifier); + } + this.addProcessedElement(arr[i], i + 1); + } + len = ownStyles.length; + for (i = 0; i < len; i += 1) { + ownStyles[i].closed = true; + } + len = ownModifiers.length; + for (i = 0; i < len; i += 1) { + ownModifiers[i].closed = true; + } +}; + +SVGShapeElement.prototype.renderInnerContent = function () { + this.renderModifiers(); + var i; + var len = this.stylesList.length; + for (i = 0; i < len; i += 1) { + this.stylesList[i].reset(); + } + this.renderShape(); + for (i = 0; i < len; i += 1) { + if (this.stylesList[i]._mdf || this._isFirstFrame) { + if (this.stylesList[i].msElem) { + this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); + // Adding M0 0 fixes same mask bug on all browsers + this.stylesList[i].d = 'M0 0' + this.stylesList[i].d; + } + this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0'); + } + } +}; + +SVGShapeElement.prototype.renderShape = function () { + var i; + var len = this.animatedContents.length; + var animatedContent; + for (i = 0; i < len; i += 1) { + animatedContent = this.animatedContents[i]; + if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) { + animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame); + } + } +}; + +SVGShapeElement.prototype.destroy = function () { + this.destroyBaseElement(); + this.shapesData = null; + this.itemsData = null; +}; + +function LetterProps(o, sw, sc, fc, m, p) { + this.o = o; + this.sw = sw; + this.sc = sc; + this.fc = fc; + this.m = m; + this.p = p; + this._mdf = { + o: true, + sw: !!sw, + sc: !!sc, + fc: !!fc, + m: true, + p: true, + }; +} + +LetterProps.prototype.update = function (o, sw, sc, fc, m, p) { + this._mdf.o = false; + this._mdf.sw = false; + this._mdf.sc = false; + this._mdf.fc = false; + this._mdf.m = false; + this._mdf.p = false; + var updated = false; + + if (this.o !== o) { + this.o = o; + this._mdf.o = true; + updated = true; + } + if (this.sw !== sw) { + this.sw = sw; + this._mdf.sw = true; + updated = true; + } + if (this.sc !== sc) { + this.sc = sc; + this._mdf.sc = true; + updated = true; + } + if (this.fc !== fc) { + this.fc = fc; + this._mdf.fc = true; + updated = true; + } + if (this.m !== m) { + this.m = m; + this._mdf.m = true; + updated = true; + } + if (p.length && (this.p[0] !== p[0] || this.p[1] !== p[1] || this.p[4] !== p[4] || this.p[5] !== p[5] || this.p[12] !== p[12] || this.p[13] !== p[13])) { + this.p = p; + this._mdf.p = true; + updated = true; + } + return updated; +}; + +function TextProperty(elem, data) { + this._frameId = initialDefaultFrame; + this.pv = ''; + this.v = ''; + this.kf = false; + this._isFirstFrame = true; + this._mdf = false; + this.data = data; + this.elem = elem; + this.comp = this.elem.comp; + this.keysIndex = 0; + this.canResize = false; + this.minimumFontSize = 1; + this.effectsSequence = []; + this.currentData = { + ascent: 0, + boxWidth: this.defaultBoxWidth, + f: '', + fStyle: '', + fWeight: '', + fc: '', + j: '', + justifyOffset: '', + l: [], + lh: 0, + lineWidths: [], + ls: '', + of: '', + s: '', + sc: '', + sw: 0, + t: 0, + tr: 0, + sz: 0, + ps: null, + fillColorAnim: false, + strokeColorAnim: false, + strokeWidthAnim: false, + yOffset: 0, + finalSize: 0, + finalText: [], + finalLineHeight: 0, + __complete: false, + + }; + this.copyData(this.currentData, this.data.d.k[0].s); + + if (!this.searchProperty()) { + this.completeTextData(this.currentData); + } +} + +TextProperty.prototype.defaultBoxWidth = [0, 0]; + +TextProperty.prototype.copyData = function (obj, data) { + for (var s in data) { + if (Object.prototype.hasOwnProperty.call(data, s)) { + obj[s] = data[s]; + } + } + return obj; +}; + +TextProperty.prototype.setCurrentData = function (data) { + if (!data.__complete) { + this.completeTextData(data); + } + this.currentData = data; + this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth; + this._mdf = true; +}; + +TextProperty.prototype.searchProperty = function () { + return this.searchKeyframes(); +}; + +TextProperty.prototype.searchKeyframes = function () { + this.kf = this.data.d.k.length > 1; + if (this.kf) { + this.addEffect(this.getKeyframeValue.bind(this)); + } + return this.kf; +}; + +TextProperty.prototype.addEffect = function (effectFunction) { + this.effectsSequence.push(effectFunction); + this.elem.addDynamicProperty(this); +}; + +TextProperty.prototype.getValue = function (_finalValue) { + if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) { + return; + } + this.currentData.t = this.data.d.k[this.keysIndex].s.t; + var currentValue = this.currentData; + var currentIndex = this.keysIndex; + if (this.lock) { + this.setCurrentData(this.currentData); + return; + } + this.lock = true; + this._mdf = false; + var i; var + len = this.effectsSequence.length; + var finalValue = _finalValue || this.data.d.k[this.keysIndex].s; + for (i = 0; i < len; i += 1) { + // Checking if index changed to prevent creating a new object every time the expression updates. + if (currentIndex !== this.keysIndex) { + finalValue = this.effectsSequence[i](finalValue, finalValue.t); + } else { + finalValue = this.effectsSequence[i](this.currentData, finalValue.t); + } + } + if (currentValue !== finalValue) { + this.setCurrentData(finalValue); + } + this.v = this.currentData; + this.pv = this.v; + this.lock = false; + this.frameId = this.elem.globalData.frameId; +}; + +TextProperty.prototype.getKeyframeValue = function () { + var textKeys = this.data.d.k; + var frameNum = this.elem.comp.renderedFrame; + var i = 0; var + len = textKeys.length; + while (i <= len - 1) { + if (i === len - 1 || textKeys[i + 1].t > frameNum) { + break; + } + i += 1; + } + if (this.keysIndex !== i) { + this.keysIndex = i; + } + return this.data.d.k[this.keysIndex].s; +}; + +TextProperty.prototype.buildFinalText = function (text) { + var charactersArray = []; + var i = 0; + var len = text.length; + var charCode; + var secondCharCode; + var shouldCombine = false; + while (i < len) { + charCode = text.charCodeAt(i); + if (FontManager.isCombinedCharacter(charCode)) { + charactersArray[charactersArray.length - 1] += text.charAt(i); + } else if (charCode >= 0xD800 && charCode <= 0xDBFF) { + secondCharCode = text.charCodeAt(i + 1); + if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) { + if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) { + charactersArray[charactersArray.length - 1] += text.substr(i, 2); + shouldCombine = false; + } else { + charactersArray.push(text.substr(i, 2)); + } + i += 1; + } else { + charactersArray.push(text.charAt(i)); + } + } else if (charCode > 0xDBFF) { + secondCharCode = text.charCodeAt(i + 1); + if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) { + shouldCombine = true; + charactersArray[charactersArray.length - 1] += text.substr(i, 2); + i += 1; + } else { + charactersArray.push(text.charAt(i)); + } + } else if (FontManager.isZeroWidthJoiner(charCode)) { + charactersArray[charactersArray.length - 1] += text.charAt(i); + shouldCombine = true; + } else { + charactersArray.push(text.charAt(i)); + } + i += 1; + } + return charactersArray; +}; + +TextProperty.prototype.completeTextData = function (documentData) { + documentData.__complete = true; + var fontManager = this.elem.globalData.fontManager; + var data = this.data; + var letters = []; + var i; var + len; + var newLineFlag; var index = 0; var + val; + var anchorGrouping = data.m.g; + var currentSize = 0; var currentPos = 0; var currentLine = 0; var + lineWidths = []; + var lineWidth = 0; + var maxLineWidth = 0; + var j; var + jLen; + var fontData = fontManager.getFontByName(documentData.f); + var charData; var + cLength = 0; + + var fontProps = getFontProperties(fontData); + documentData.fWeight = fontProps.weight; + documentData.fStyle = fontProps.style; + documentData.finalSize = documentData.s; + documentData.finalText = this.buildFinalText(documentData.t); + len = documentData.finalText.length; + documentData.finalLineHeight = documentData.lh; + var trackingOffset = (documentData.tr / 1000) * documentData.finalSize; + var charCode; + if (documentData.sz) { + var flag = true; + var boxWidth = documentData.sz[0]; + var boxHeight = documentData.sz[1]; + var currentHeight; var + finalText; + while (flag) { + finalText = this.buildFinalText(documentData.t); + currentHeight = 0; + lineWidth = 0; + len = finalText.length; + trackingOffset = (documentData.tr / 1000) * documentData.finalSize; + var lastSpaceIndex = -1; + for (i = 0; i < len; i += 1) { + charCode = finalText[i].charCodeAt(0); + newLineFlag = false; + if (finalText[i] === ' ') { + lastSpaceIndex = i; + } else if (charCode === 13 || charCode === 3) { + lineWidth = 0; + newLineFlag = true; + currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2; + } + if (fontManager.chars) { + charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily); + cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100; + } else { + // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily; + cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize); + } + if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') { + if (lastSpaceIndex === -1) { + len += 1; + } else { + i = lastSpaceIndex; + } + currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2; + finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r'); + // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i); + lastSpaceIndex = -1; + lineWidth = 0; + } else { + lineWidth += cLength; + lineWidth += trackingOffset; + } + } + currentHeight += (fontData.ascent * documentData.finalSize) / 100; + if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) { + documentData.finalSize -= 1; + documentData.finalLineHeight = (documentData.finalSize * documentData.lh) / documentData.s; + } else { + documentData.finalText = finalText; + len = documentData.finalText.length; + flag = false; + } + } + } + lineWidth = -trackingOffset; + cLength = 0; + var uncollapsedSpaces = 0; + var currentChar; + for (i = 0; i < len; i += 1) { + newLineFlag = false; + currentChar = documentData.finalText[i]; + charCode = currentChar.charCodeAt(0); + if (charCode === 13 || charCode === 3) { + uncollapsedSpaces = 0; + lineWidths.push(lineWidth); + maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth; + lineWidth = -2 * trackingOffset; + val = ''; + newLineFlag = true; + currentLine += 1; + } else { + val = currentChar; + } + if (fontManager.chars) { + charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily); + cLength = newLineFlag ? 0 : (charData.w * documentData.finalSize) / 100; + } else { + // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize); + // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily; + cLength = fontManager.measureText(val, documentData.f, documentData.finalSize); + } + + // + if (currentChar === ' ') { + uncollapsedSpaces += cLength + trackingOffset; + } else { + lineWidth += cLength + trackingOffset + uncollapsedSpaces; + uncollapsedSpaces = 0; + } + letters.push({ + l: cLength, an: cLength, add: currentSize, n: newLineFlag, anIndexes: [], val: val, line: currentLine, animatorJustifyOffset: 0, + }); + if (anchorGrouping == 2) { // eslint-disable-line eqeqeq + currentSize += cLength; + if (val === '' || val === ' ' || i === len - 1) { + if (val === '' || val === ' ') { + currentSize -= cLength; + } + while (currentPos <= i) { + letters[currentPos].an = currentSize; + letters[currentPos].ind = index; + letters[currentPos].extra = cLength; + currentPos += 1; + } + index += 1; + currentSize = 0; + } + } else if (anchorGrouping == 3) { // eslint-disable-line eqeqeq + currentSize += cLength; + if (val === '' || i === len - 1) { + if (val === '') { + currentSize -= cLength; + } + while (currentPos <= i) { + letters[currentPos].an = currentSize; + letters[currentPos].ind = index; + letters[currentPos].extra = cLength; + currentPos += 1; + } + currentSize = 0; + index += 1; + } + } else { + letters[index].ind = index; + letters[index].extra = 0; + index += 1; + } + } + documentData.l = letters; + maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth; + lineWidths.push(lineWidth); + if (documentData.sz) { + documentData.boxWidth = documentData.sz[0]; + documentData.justifyOffset = 0; + } else { + documentData.boxWidth = maxLineWidth; + switch (documentData.j) { + case 1: + documentData.justifyOffset = -documentData.boxWidth; + break; + case 2: + documentData.justifyOffset = -documentData.boxWidth / 2; + break; + default: + documentData.justifyOffset = 0; + } + } + documentData.lineWidths = lineWidths; + + var animators = data.a; var animatorData; var + letterData; + jLen = animators.length; + var based; var ind; var + indexes = []; + for (j = 0; j < jLen; j += 1) { + animatorData = animators[j]; + if (animatorData.a.sc) { + documentData.strokeColorAnim = true; + } + if (animatorData.a.sw) { + documentData.strokeWidthAnim = true; + } + if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) { + documentData.fillColorAnim = true; + } + ind = 0; + based = animatorData.s.b; + for (i = 0; i < len; i += 1) { + letterData = letters[i]; + letterData.anIndexes[j] = ind; + if ((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== ' ') || (based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))) { // eslint-disable-line eqeqeq + if (animatorData.s.rn === 1) { + indexes.push(ind); + } + ind += 1; + } + } + data.a[j].s.totalChars = ind; + var currentInd = -1; var + newInd; + if (animatorData.s.rn === 1) { + for (i = 0; i < len; i += 1) { + letterData = letters[i]; + if (currentInd != letterData.anIndexes[j]) { // eslint-disable-line eqeqeq + currentInd = letterData.anIndexes[j]; + newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0]; + } + letterData.anIndexes[j] = newInd; + } + } + } + documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2; + documentData.ls = documentData.ls || 0; + documentData.ascent = (fontData.ascent * documentData.finalSize) / 100; +}; + +TextProperty.prototype.updateDocumentData = function (newData, index) { + index = index === undefined ? this.keysIndex : index; + var dData = this.copyData({}, this.data.d.k[index].s); + dData = this.copyData(dData, newData); + this.data.d.k[index].s = dData; + this.recalculate(index); + this.elem.addDynamicProperty(this); +}; + +TextProperty.prototype.recalculate = function (index) { + var dData = this.data.d.k[index].s; + dData.__complete = false; + this.keysIndex = 0; + this._isFirstFrame = true; + this.getValue(dData); +}; + +TextProperty.prototype.canResizeFont = function (_canResize) { + this.canResize = _canResize; + this.recalculate(this.keysIndex); + this.elem.addDynamicProperty(this); +}; + +TextProperty.prototype.setMinimumFontSize = function (_fontValue) { + this.minimumFontSize = Math.floor(_fontValue) || 1; + this.recalculate(this.keysIndex); + this.elem.addDynamicProperty(this); +}; + +const TextSelectorProp = (function () { + var max = Math.max; + var min = Math.min; + var floor = Math.floor; + + function TextSelectorPropFactory(elem, data) { + this._currentTextLength = -1; + this.k = false; + this.data = data; + this.elem = elem; + this.comp = elem.comp; + this.finalS = 0; + this.finalE = 0; + this.initDynamicPropertyContainer(elem); + this.s = PropertyFactory.getProp(elem, data.s || { k: 0 }, 0, 0, this); + if ('e' in data) { + this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this); + } else { + this.e = { v: 100 }; + } + this.o = PropertyFactory.getProp(elem, data.o || { k: 0 }, 0, 0, this); + this.xe = PropertyFactory.getProp(elem, data.xe || { k: 0 }, 0, 0, this); + this.ne = PropertyFactory.getProp(elem, data.ne || { k: 0 }, 0, 0, this); + this.sm = PropertyFactory.getProp(elem, data.sm || { k: 100 }, 0, 0, this); + this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this); + if (!this.dynamicProperties.length) { + this.getValue(); + } + } + + TextSelectorPropFactory.prototype = { + getMult: function (ind) { + if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) { + this.getValue(); + } + var x1 = 0; + var y1 = 0; + var x2 = 1; + var y2 = 1; + if (this.ne.v > 0) { + x1 = this.ne.v / 100.0; + } else { + y1 = -this.ne.v / 100.0; + } + if (this.xe.v > 0) { + x2 = 1.0 - this.xe.v / 100.0; + } else { + y2 = 1.0 + this.xe.v / 100.0; + } + var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get; + + var mult = 0; + var s = this.finalS; + var e = this.finalE; + var type = this.data.sh; + if (type === 2) { + if (e === s) { + mult = ind >= e ? 1 : 0; + } else { + mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1)); + } + mult = easer(mult); + } else if (type === 3) { + if (e === s) { + mult = ind >= e ? 0 : 1; + } else { + mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1)); + } + + mult = easer(mult); + } else if (type === 4) { + if (e === s) { + mult = 0; + } else { + mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1)); + if (mult < 0.5) { + mult *= 2; + } else { + mult = 1 - 2 * (mult - 0.5); + } + } + mult = easer(mult); + } else if (type === 5) { + if (e === s) { + mult = 0; + } else { + var tot = e - s; + /* ind += 0.5; + mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */ + ind = min(max(0, ind + 0.5 - s), e - s); + var x = -tot / 2 + ind; + var a = tot / 2; + mult = Math.sqrt(1 - (x * x) / (a * a)); + } + mult = easer(mult); + } else if (type === 6) { + if (e === s) { + mult = 0; + } else { + ind = min(max(0, ind + 0.5 - s), e - s); + mult = (1 + (Math.cos((Math.PI + Math.PI * 2 * (ind) / (e - s))))) / 2; // eslint-disable-line + } + mult = easer(mult); + } else { + if (ind >= floor(s)) { + if (ind - s < 0) { + mult = max(0, min(min(e, 1) - (s - ind), 1)); + } else { + mult = max(0, min(e - ind, 1)); + } + } + mult = easer(mult); + } + // Smoothness implementation. + // The smoothness represents a reduced range of the original [0; 1] range. + // if smoothness is 25%, the new range will be [0.375; 0.625] + // Steps are: + // - find the lower value of the new range (threshold) + // - if multiplier is smaller than that value, floor it to 0 + // - if it is larger, + // - subtract the threshold + // - divide it by the smoothness (this will return the range to [0; 1]) + // Note: If it doesn't work on some scenarios, consider applying it before the easer. + if (this.sm.v !== 100) { + var smoothness = this.sm.v * 0.01; + if (smoothness === 0) { + smoothness = 0.00000001; + } + var threshold = 0.5 - smoothness * 0.5; + if (mult < threshold) { + mult = 0; + } else { + mult = (mult - threshold) / smoothness; + if (mult > 1) { + mult = 1; + } + } + } + return mult * this.a.v; + }, + getValue: function (newCharsFlag) { + this.iterateDynamicProperties(); + this._mdf = newCharsFlag || this._mdf; + this._currentTextLength = this.elem.textProperty.currentData.l.length || 0; + if (newCharsFlag && this.data.r === 2) { + this.e.v = this._currentTextLength; + } + var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars; + var o = this.o.v / divisor; + var s = this.s.v / divisor + o; + var e = (this.e.v / divisor) + o; + if (s > e) { + var _s = s; + s = e; + e = _s; + } + this.finalS = s; + this.finalE = e; + }, + }; + extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory); + + function getTextSelectorProp(elem, data, arr) { + return new TextSelectorPropFactory(elem, data, arr); + } + + return { + getTextSelectorProp: getTextSelectorProp, + }; +}()); + +function TextAnimatorDataProperty(elem, animatorProps, container) { + var defaultData = { propType: false }; + var getProp = PropertyFactory.getProp; + var textAnimatorAnimatables = animatorProps.a; + this.a = { + r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData, + rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData, + ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData, + sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData, + sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData, + s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData, + a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData, + o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData, + p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData, + sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData, + sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData, + fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData, + fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData, + fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData, + fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData, + t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData, + }; + + this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container); + this.s.t = animatorProps.s.t; +} + +function TextAnimatorProperty(textData, renderType, elem) { + this._isFirstFrame = true; + this._hasMaskedPath = false; + this._frameId = -1; + this._textData = textData; + this._renderType = renderType; + this._elem = elem; + this._animatorsData = createSizedArray(this._textData.a.length); + this._pathData = {}; + this._moreOptions = { + alignment: {}, + }; + this.renderedLetters = []; + this.lettersChangedFlag = false; + this.initDynamicPropertyContainer(elem); +} + +TextAnimatorProperty.prototype.searchProperties = function () { + var i; + var len = this._textData.a.length; + var animatorProps; + var getProp = PropertyFactory.getProp; + for (i = 0; i < len; i += 1) { + animatorProps = this._textData.a[i]; + this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this); + } + if (this._textData.p && 'm' in this._textData.p) { + this._pathData = { + a: getProp(this._elem, this._textData.p.a, 0, 0, this), + f: getProp(this._elem, this._textData.p.f, 0, 0, this), + l: getProp(this._elem, this._textData.p.l, 0, 0, this), + r: getProp(this._elem, this._textData.p.r, 0, 0, this), + p: getProp(this._elem, this._textData.p.p, 0, 0, this), + m: this._elem.maskManager.getMaskProperty(this._textData.p.m), + }; + this._hasMaskedPath = true; + } else { + this._hasMaskedPath = false; + } + this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this); +}; + +TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) { + this.lettersChangedFlag = lettersChangedFlag; + if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) { + return; + } + this._isFirstFrame = false; + var alignment = this._moreOptions.alignment.v; + var animators = this._animatorsData; + var textData = this._textData; + var matrixHelper = this.mHelper; + var renderType = this._renderType; + var renderedLettersCount = this.renderedLetters.length; + var xPos; + var yPos; + var i; + var len; + var letters = documentData.l; + var pathInfo; + var currentLength; + var currentPoint; + var segmentLength; + var flag; + var pointInd; + var segmentInd; + var prevPoint; + var points; + var segments; + var partialLength; + var totalLength; + var perc; + var tanAngle; + var mask; + if (this._hasMaskedPath) { + mask = this._pathData.m; + if (!this._pathData.n || this._pathData._mdf) { + var paths = mask.v; + if (this._pathData.r.v) { + paths = paths.reverse(); + } + // TODO: release bezier data cached from previous pathInfo: this._pathData.pi + pathInfo = { + tLength: 0, + segments: [], + }; + len = paths._length - 1; + var bezierData; + totalLength = 0; + for (i = 0; i < len; i += 1) { + bezierData = bez.buildBezierData(paths.v[i], + paths.v[i + 1], + [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], + [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]); + pathInfo.tLength += bezierData.segmentLength; + pathInfo.segments.push(bezierData); + totalLength += bezierData.segmentLength; + } + i = len; + if (mask.v.c) { + bezierData = bez.buildBezierData(paths.v[i], + paths.v[0], + [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], + [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]); + pathInfo.tLength += bezierData.segmentLength; + pathInfo.segments.push(bezierData); + totalLength += bezierData.segmentLength; + } + this._pathData.pi = pathInfo; + } + pathInfo = this._pathData.pi; + + currentLength = this._pathData.f.v; + segmentInd = 0; + pointInd = 1; + segmentLength = 0; + flag = true; + segments = pathInfo.segments; + if (currentLength < 0 && mask.v.c) { + if (pathInfo.tLength < Math.abs(currentLength)) { + currentLength = -Math.abs(currentLength) % pathInfo.tLength; + } + segmentInd = segments.length - 1; + points = segments[segmentInd].points; + pointInd = points.length - 1; + while (currentLength < 0) { + currentLength += points[pointInd].partialLength; + pointInd -= 1; + if (pointInd < 0) { + segmentInd -= 1; + points = segments[segmentInd].points; + pointInd = points.length - 1; + } + } + } + points = segments[segmentInd].points; + prevPoint = points[pointInd - 1]; + currentPoint = points[pointInd]; + partialLength = currentPoint.partialLength; + } + + len = letters.length; + xPos = 0; + yPos = 0; + var yOff = documentData.finalSize * 1.2 * 0.714; + var firstLine = true; + var animatorProps; + var animatorSelector; + var j; + var jLen; + var letterValue; + + jLen = animators.length; + + var mult; + var ind = -1; + var offf; + var xPathPos; + var yPathPos; + var initPathPos = currentLength; + var initSegmentInd = segmentInd; + var initPointInd = pointInd; + var currentLine = -1; + var elemOpacity; + var sc; + var sw; + var fc; + var k; + var letterSw; + var letterSc; + var letterFc; + var letterM = ''; + var letterP = this.defaultPropsArray; + var letterO; + + // + if (documentData.j === 2 || documentData.j === 1) { + var animatorJustifyOffset = 0; + var animatorFirstCharOffset = 0; + var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1; + var lastIndex = 0; + var isNewLine = true; + + for (i = 0; i < len; i += 1) { + if (letters[i].n) { + if (animatorJustifyOffset) { + animatorJustifyOffset += animatorFirstCharOffset; + } + while (lastIndex < i) { + letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset; + lastIndex += 1; + } + animatorJustifyOffset = 0; + isNewLine = true; + } else { + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + if (animatorProps.t.propType) { + if (isNewLine && documentData.j === 2) { + animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult; + } + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + if (mult.length) { + animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult; + } else { + animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult; + } + } + } + isNewLine = false; + } + } + if (animatorJustifyOffset) { + animatorJustifyOffset += animatorFirstCharOffset; + } + while (lastIndex < i) { + letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset; + lastIndex += 1; + } + } + // + + for (i = 0; i < len; i += 1) { + matrixHelper.reset(); + elemOpacity = 1; + if (letters[i].n) { + xPos = 0; + yPos += documentData.yOffset; + yPos += firstLine ? 1 : 0; + currentLength = initPathPos; + firstLine = false; + if (this._hasMaskedPath) { + segmentInd = initSegmentInd; + pointInd = initPointInd; + points = segments[segmentInd].points; + prevPoint = points[pointInd - 1]; + currentPoint = points[pointInd]; + partialLength = currentPoint.partialLength; + segmentLength = 0; + } + letterM = ''; + letterFc = ''; + letterSw = ''; + letterO = ''; + letterP = this.defaultPropsArray; + } else { + if (this._hasMaskedPath) { + if (currentLine !== letters[i].line) { + switch (documentData.j) { + case 1: + currentLength += totalLength - documentData.lineWidths[letters[i].line]; + break; + case 2: + currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2; + break; + default: + break; + } + currentLine = letters[i].line; + } + if (ind !== letters[i].ind) { + if (letters[ind]) { + currentLength += letters[ind].extra; + } + currentLength += letters[i].an / 2; + ind = letters[i].ind; + } + currentLength += (alignment[0] * letters[i].an) * 0.005; + var animatorOffset = 0; + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + if (animatorProps.p.propType) { + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + if (mult.length) { + animatorOffset += animatorProps.p.v[0] * mult[0]; + } else { + animatorOffset += animatorProps.p.v[0] * mult; + } + } + if (animatorProps.a.propType) { + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + if (mult.length) { + animatorOffset += animatorProps.a.v[0] * mult[0]; + } else { + animatorOffset += animatorProps.a.v[0] * mult; + } + } + } + flag = true; + // Force alignment only works with a single line for now + if (this._pathData.a.v) { + currentLength = letters[0].an * 0.5 + ((totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind) / (len - 1); + currentLength += this._pathData.f.v; + } + while (flag) { + if (segmentLength + partialLength >= currentLength + animatorOffset || !points) { + perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength; + xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc; + yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc; + matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, -(alignment[1] * yOff) * 0.01); + flag = false; + } else if (points) { + segmentLength += currentPoint.partialLength; + pointInd += 1; + if (pointInd >= points.length) { + pointInd = 0; + segmentInd += 1; + if (!segments[segmentInd]) { + if (mask.v.c) { + pointInd = 0; + segmentInd = 0; + points = segments[segmentInd].points; + } else { + segmentLength -= currentPoint.partialLength; + points = null; + } + } else { + points = segments[segmentInd].points; + } + } + if (points) { + prevPoint = currentPoint; + currentPoint = points[pointInd]; + partialLength = currentPoint.partialLength; + } + } + } + offf = letters[i].an / 2 - letters[i].add; + matrixHelper.translate(-offf, 0, 0); + } else { + offf = letters[i].an / 2 - letters[i].add; + matrixHelper.translate(-offf, 0, 0); + + // Grouping alignment + matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, (-alignment[1] * yOff) * 0.01, 0); + } + + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + if (animatorProps.t.propType) { + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine" + if (xPos !== 0 || documentData.j !== 0) { + if (this._hasMaskedPath) { + if (mult.length) { + currentLength += animatorProps.t.v * mult[0]; + } else { + currentLength += animatorProps.t.v * mult; + } + } else if (mult.length) { + xPos += animatorProps.t.v * mult[0]; + } else { + xPos += animatorProps.t.v * mult; + } + } + } + } + if (documentData.strokeWidthAnim) { + sw = documentData.sw || 0; + } + if (documentData.strokeColorAnim) { + if (documentData.sc) { + sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]]; + } else { + sc = [0, 0, 0]; + } + } + if (documentData.fillColorAnim && documentData.fc) { + fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]]; + } + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + if (animatorProps.a.propType) { + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + + if (mult.length) { + matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]); + } else { + matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult); + } + } + } + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + if (animatorProps.s.propType) { + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + if (mult.length) { + matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult[0]), 1 + ((animatorProps.s.v[1] - 1) * mult[1]), 1); + } else { + matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult), 1 + ((animatorProps.s.v[1] - 1) * mult), 1); + } + } + } + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + if (animatorProps.sk.propType) { + if (mult.length) { + matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]); + } else { + matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult); + } + } + if (animatorProps.r.propType) { + if (mult.length) { + matrixHelper.rotateZ(-animatorProps.r.v * mult[2]); + } else { + matrixHelper.rotateZ(-animatorProps.r.v * mult); + } + } + if (animatorProps.ry.propType) { + if (mult.length) { + matrixHelper.rotateY(animatorProps.ry.v * mult[1]); + } else { + matrixHelper.rotateY(animatorProps.ry.v * mult); + } + } + if (animatorProps.rx.propType) { + if (mult.length) { + matrixHelper.rotateX(animatorProps.rx.v * mult[0]); + } else { + matrixHelper.rotateX(animatorProps.rx.v * mult); + } + } + if (animatorProps.o.propType) { + if (mult.length) { + elemOpacity += ((animatorProps.o.v) * mult[0] - elemOpacity) * mult[0]; + } else { + elemOpacity += ((animatorProps.o.v) * mult - elemOpacity) * mult; + } + } + if (documentData.strokeWidthAnim && animatorProps.sw.propType) { + if (mult.length) { + sw += animatorProps.sw.v * mult[0]; + } else { + sw += animatorProps.sw.v * mult; + } + } + if (documentData.strokeColorAnim && animatorProps.sc.propType) { + for (k = 0; k < 3; k += 1) { + if (mult.length) { + sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0]; + } else { + sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult; + } + } + } + if (documentData.fillColorAnim && documentData.fc) { + if (animatorProps.fc.propType) { + for (k = 0; k < 3; k += 1) { + if (mult.length) { + fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0]; + } else { + fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult; + } + } + } + if (animatorProps.fh.propType) { + if (mult.length) { + fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]); + } else { + fc = addHueToRGB(fc, animatorProps.fh.v * mult); + } + } + if (animatorProps.fs.propType) { + if (mult.length) { + fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]); + } else { + fc = addSaturationToRGB(fc, animatorProps.fs.v * mult); + } + } + if (animatorProps.fb.propType) { + if (mult.length) { + fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]); + } else { + fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult); + } + } + } + } + + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + + if (animatorProps.p.propType) { + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + if (this._hasMaskedPath) { + if (mult.length) { + matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]); + } else { + matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult); + } + } else if (mult.length) { + matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]); + } else { + matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult); + } + } + } + if (documentData.strokeWidthAnim) { + letterSw = sw < 0 ? 0 : sw; + } + if (documentData.strokeColorAnim) { + letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')'; + } + if (documentData.fillColorAnim && documentData.fc) { + letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')'; + } + + if (this._hasMaskedPath) { + matrixHelper.translate(0, -documentData.ls); + + matrixHelper.translate(0, (alignment[1] * yOff) * 0.01 + yPos, 0); + if (this._pathData.p.v) { + tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]); + var rot = (Math.atan(tanAngle) * 180) / Math.PI; + if (currentPoint.point[0] < prevPoint.point[0]) { + rot += 180; + } + matrixHelper.rotate((-rot * Math.PI) / 180); + } + matrixHelper.translate(xPathPos, yPathPos, 0); + currentLength -= (alignment[0] * letters[i].an) * 0.005; + if (letters[i + 1] && ind !== letters[i + 1].ind) { + currentLength += letters[i].an / 2; + currentLength += (documentData.tr * 0.001) * documentData.finalSize; + } + } else { + matrixHelper.translate(xPos, yPos, 0); + + if (documentData.ps) { + // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0); + matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0); + } + switch (documentData.j) { + case 1: + matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0); + break; + case 2: + matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0); + break; + default: + break; + } + matrixHelper.translate(0, -documentData.ls); + matrixHelper.translate(offf, 0, 0); + matrixHelper.translate((alignment[0] * letters[i].an) * 0.005, (alignment[1] * yOff) * 0.01, 0); + xPos += letters[i].l + (documentData.tr * 0.001) * documentData.finalSize; + } + if (renderType === 'html') { + letterM = matrixHelper.toCSS(); + } else if (renderType === 'svg') { + letterM = matrixHelper.to2dCSS(); + } else { + letterP = [matrixHelper.props[0], matrixHelper.props[1], matrixHelper.props[2], matrixHelper.props[3], matrixHelper.props[4], matrixHelper.props[5], matrixHelper.props[6], matrixHelper.props[7], matrixHelper.props[8], matrixHelper.props[9], matrixHelper.props[10], matrixHelper.props[11], matrixHelper.props[12], matrixHelper.props[13], matrixHelper.props[14], matrixHelper.props[15]]; + } + letterO = elemOpacity; + } + + if (renderedLettersCount <= i) { + letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP); + this.renderedLetters.push(letterValue); + renderedLettersCount += 1; + this.lettersChangedFlag = true; + } else { + letterValue = this.renderedLetters[i]; + this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag; + } + } +}; + +TextAnimatorProperty.prototype.getValue = function () { + if (this._elem.globalData.frameId === this._frameId) { + return; + } + this._frameId = this._elem.globalData.frameId; + this.iterateDynamicProperties(); +}; + +TextAnimatorProperty.prototype.mHelper = new Matrix(); +TextAnimatorProperty.prototype.defaultPropsArray = []; +extendPrototype([DynamicPropertyContainer], TextAnimatorProperty); + +function ITextElement() { +} + +ITextElement.prototype.initElement = function (data, globalData, comp) { + this.lettersChangedFlag = true; + this.initFrame(); + this.initBaseData(data, globalData, comp); + this.textProperty = new TextProperty(this, data.t, this.dynamicProperties); + this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this); + this.initTransform(data, globalData, comp); + this.initHierarchy(); + this.initRenderable(); + this.initRendererElement(); + this.createContainerElements(); + this.createRenderableComponents(); + this.createContent(); + this.hide(); + this.textAnimator.searchProperties(this.dynamicProperties); +}; + +ITextElement.prototype.prepareFrame = function (num) { + this._mdf = false; + this.prepareRenderableFrame(num); + this.prepareProperties(num, this.isInRange); + if (this.textProperty._mdf || this.textProperty._isFirstFrame) { + this.buildNewText(); + this.textProperty._isFirstFrame = false; + this.textProperty._mdf = false; + } +}; + +ITextElement.prototype.createPathShape = function (matrixHelper, shapes) { + var j; + var jLen = shapes.length; + var pathNodes; + var shapeStr = ''; + for (j = 0; j < jLen; j += 1) { + if (shapes[j].ty === 'sh') { + pathNodes = shapes[j].ks.k; + shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper); + } + } + return shapeStr; +}; + +ITextElement.prototype.updateDocumentData = function (newData, index) { + this.textProperty.updateDocumentData(newData, index); +}; + +ITextElement.prototype.canResizeFont = function (_canResize) { + this.textProperty.canResizeFont(_canResize); +}; + +ITextElement.prototype.setMinimumFontSize = function (_fontSize) { + this.textProperty.setMinimumFontSize(_fontSize); +}; + +ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) { + if (documentData.ps) { + matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0); + } + matrixHelper.translate(0, -documentData.ls, 0); + switch (documentData.j) { + case 1: + matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0); + break; + case 2: + matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0); + break; + default: + break; + } + matrixHelper.translate(xPos, yPos, 0); +}; + +ITextElement.prototype.buildColor = function (colorData) { + return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')'; +}; + +ITextElement.prototype.emptyProp = new LetterProps(); + +ITextElement.prototype.destroy = function () { + +}; + +var emptyShapeData = { + shapes: [], +}; + +function SVGTextLottieElement(data, globalData, comp) { + this.textSpans = []; + this.renderType = 'svg'; + this.initElement(data, globalData, comp); +} + +extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement); + +SVGTextLottieElement.prototype.createContent = function () { + if (this.data.singleShape && !this.globalData.fontManager.chars) { + this.textContainer = createNS('text'); + } +}; + +SVGTextLottieElement.prototype.buildTextContents = function (textArray) { + var i = 0; + var len = textArray.length; + var textContents = []; + var currentTextContent = ''; + while (i < len) { + if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) { + textContents.push(currentTextContent); + currentTextContent = ''; + } else { + currentTextContent += textArray[i]; + } + i += 1; + } + textContents.push(currentTextContent); + return textContents; +}; + +SVGTextLottieElement.prototype.buildShapeData = function (data, scale) { + // data should probably be cloned to apply scale separately to each instance of a text on different layers + // but since text internal content gets only rendered once and then it's never rerendered, + // it's probably safe not to clone data and reuse always the same instance even if the object is mutated. + // Avoiding cloning is preferred since cloning each character shape data is expensive + if (data.shapes && data.shapes.length) { + var shape = data.shapes[0]; + if (shape.it) { + var shapeItem = shape.it[shape.it.length - 1]; + if (shapeItem.s) { + shapeItem.s.k[0] = scale; + shapeItem.s.k[1] = scale; + } + } + } + return data; +}; + +SVGTextLottieElement.prototype.buildNewText = function () { + this.addDynamicProperty(this); + var i; + var len; + + var documentData = this.textProperty.currentData; + this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0); + if (documentData.fc) { + this.layerElement.setAttribute('fill', this.buildColor(documentData.fc)); + } else { + this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)'); + } + if (documentData.sc) { + this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc)); + this.layerElement.setAttribute('stroke-width', documentData.sw); + } + this.layerElement.setAttribute('font-size', documentData.finalSize); + var fontData = this.globalData.fontManager.getFontByName(documentData.f); + if (fontData.fClass) { + this.layerElement.setAttribute('class', fontData.fClass); + } else { + this.layerElement.setAttribute('font-family', fontData.fFamily); + var fWeight = documentData.fWeight; + var fStyle = documentData.fStyle; + this.layerElement.setAttribute('font-style', fStyle); + this.layerElement.setAttribute('font-weight', fWeight); + } + this.layerElement.setAttribute('aria-label', documentData.t); + + var letters = documentData.l || []; + var usesGlyphs = !!this.globalData.fontManager.chars; + len = letters.length; + + var tSpan; + var matrixHelper = this.mHelper; + var shapeStr = ''; + var singleShape = this.data.singleShape; + var xPos = 0; + var yPos = 0; + var firstLine = true; + var trackingOffset = documentData.tr * 0.001 * documentData.finalSize; + if (singleShape && !usesGlyphs && !documentData.sz) { + var tElement = this.textContainer; + var justify = 'start'; + switch (documentData.j) { + case 1: + justify = 'end'; + break; + case 2: + justify = 'middle'; + break; + default: + justify = 'start'; + break; + } + tElement.setAttribute('text-anchor', justify); + tElement.setAttribute('letter-spacing', trackingOffset); + var textContent = this.buildTextContents(documentData.finalText); + len = textContent.length; + yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0; + for (i = 0; i < len; i += 1) { + tSpan = this.textSpans[i].span || createNS('tspan'); + tSpan.textContent = textContent[i]; + tSpan.setAttribute('x', 0); + tSpan.setAttribute('y', yPos); + tSpan.style.display = 'inherit'; + tElement.appendChild(tSpan); + if (!this.textSpans[i]) { + this.textSpans[i] = { + span: null, + glyph: null, + }; + } + this.textSpans[i].span = tSpan; + yPos += documentData.finalLineHeight; + } + + this.layerElement.appendChild(tElement); + } else { + var cachedSpansLength = this.textSpans.length; + var charData; + for (i = 0; i < len; i += 1) { + if (!this.textSpans[i]) { + this.textSpans[i] = { + span: null, + childSpan: null, + glyph: null, + }; + } + if (!usesGlyphs || !singleShape || i === 0) { + tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text'); + if (cachedSpansLength <= i) { + tSpan.setAttribute('stroke-linecap', 'butt'); + tSpan.setAttribute('stroke-linejoin', 'round'); + tSpan.setAttribute('stroke-miterlimit', '4'); + this.textSpans[i].span = tSpan; + if (usesGlyphs) { + var childSpan = createNS('g'); + tSpan.appendChild(childSpan); + this.textSpans[i].childSpan = childSpan; + } + this.textSpans[i].span = tSpan; + this.layerElement.appendChild(tSpan); + } + tSpan.style.display = 'inherit'; + } + + matrixHelper.reset(); + if (singleShape) { + if (letters[i].n) { + xPos = -trackingOffset; + yPos += documentData.yOffset; + yPos += firstLine ? 1 : 0; + firstLine = false; + } + this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos); + xPos += letters[i].l || 0; + // xPos += letters[i].val === ' ' ? 0 : trackingOffset; + xPos += trackingOffset; + } + if (usesGlyphs) { + charData = this.globalData.fontManager.getCharData( + documentData.finalText[i], + fontData.fStyle, + this.globalData.fontManager.getFontByName(documentData.f).fFamily + ); + var glyphElement; + // t === 1 means the character has been replaced with an animated shaped + if (charData.t === 1) { + glyphElement = new SVGCompElement(charData.data, this.globalData, this); + } else { + var data = emptyShapeData; + if (charData.data && charData.data.shapes) { + data = this.buildShapeData(charData.data, documentData.finalSize); + } + glyphElement = new SVGShapeElement(data, this.globalData, this); + } + if (this.textSpans[i].glyph) { + var glyph = this.textSpans[i].glyph; + this.textSpans[i].childSpan.removeChild(glyph.layerElement); + glyph.destroy(); + } + this.textSpans[i].glyph = glyphElement; + glyphElement._debug = true; + glyphElement.prepareFrame(0); + glyphElement.renderFrame(); + this.textSpans[i].childSpan.appendChild(glyphElement.layerElement); + // when using animated shapes, the layer will be scaled instead of replacing the internal scale + // this might have issues with strokes and might need a different solution + if (charData.t === 1) { + this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')'); + } + } else { + if (singleShape) { + tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')'); + } + tSpan.textContent = letters[i].val; + tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); + } + // + } + if (singleShape && tSpan) { + tSpan.setAttribute('d', shapeStr); + } + } + while (i < this.textSpans.length) { + this.textSpans[i].span.style.display = 'none'; + i += 1; + } + + this._sizeChanged = true; +}; + +SVGTextLottieElement.prototype.sourceRectAtTime = function () { + this.prepareFrame(this.comp.renderedFrame - this.data.st); + this.renderInnerContent(); + if (this._sizeChanged) { + this._sizeChanged = false; + var textBox = this.layerElement.getBBox(); + this.bbox = { + top: textBox.y, + left: textBox.x, + width: textBox.width, + height: textBox.height, + }; + } + return this.bbox; +}; + +SVGTextLottieElement.prototype.getValue = function () { + var i; + var len = this.textSpans.length; + var glyphElement; + this.renderedFrame = this.comp.renderedFrame; + for (i = 0; i < len; i += 1) { + glyphElement = this.textSpans[i].glyph; + if (glyphElement) { + glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st); + if (glyphElement._mdf) { + this._mdf = true; + } + } + } +}; + +SVGTextLottieElement.prototype.renderInnerContent = function () { + if (!this.data.singleShape || this._mdf) { + this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag); + if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) { + this._sizeChanged = true; + var i; + var len; + var renderedLetters = this.textAnimator.renderedLetters; + + var letters = this.textProperty.currentData.l; + + len = letters.length; + var renderedLetter; + var textSpan; + var glyphElement; + for (i = 0; i < len; i += 1) { + if (!letters[i].n) { + renderedLetter = renderedLetters[i]; + textSpan = this.textSpans[i].span; + glyphElement = this.textSpans[i].glyph; + if (glyphElement) { + glyphElement.renderFrame(); + } + if (renderedLetter._mdf.m) { + textSpan.setAttribute('transform', renderedLetter.m); + } + if (renderedLetter._mdf.o) { + textSpan.setAttribute('opacity', renderedLetter.o); + } + if (renderedLetter._mdf.sw) { + textSpan.setAttribute('stroke-width', renderedLetter.sw); + } + if (renderedLetter._mdf.sc) { + textSpan.setAttribute('stroke', renderedLetter.sc); + } + if (renderedLetter._mdf.fc) { + textSpan.setAttribute('fill', renderedLetter.fc); + } + } + } + } + } +}; + +function ISolidElement(data, globalData, comp) { + this.initElement(data, globalData, comp); +} +extendPrototype([IImageElement], ISolidElement); + +ISolidElement.prototype.createContent = function () { + var rect = createNS('rect'); + /// /rect.style.width = this.data.sw; + /// /rect.style.height = this.data.sh; + /// /rect.style.fill = this.data.sc; + rect.setAttribute('width', this.data.sw); + rect.setAttribute('height', this.data.sh); + rect.setAttribute('fill', this.data.sc); + this.layerElement.appendChild(rect); +}; + +function NullElement(data, globalData, comp) { + this.initFrame(); + this.initBaseData(data, globalData, comp); + this.initFrame(); + this.initTransform(data, globalData, comp); + this.initHierarchy(); +} + +NullElement.prototype.prepareFrame = function (num) { + this.prepareProperties(num, true); +}; + +NullElement.prototype.renderFrame = function () { +}; + +NullElement.prototype.getBaseElement = function () { + return null; +}; + +NullElement.prototype.destroy = function () { +}; + +NullElement.prototype.sourceRectAtTime = function () { +}; + +NullElement.prototype.hide = function () { +}; + +extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement); + +function SVGRendererBase() { +} + +extendPrototype([BaseRenderer], SVGRendererBase); + +SVGRendererBase.prototype.createNull = function (data) { + return new NullElement(data, this.globalData, this); +}; + +SVGRendererBase.prototype.createShape = function (data) { + return new SVGShapeElement(data, this.globalData, this); +}; + +SVGRendererBase.prototype.createText = function (data) { + return new SVGTextLottieElement(data, this.globalData, this); +}; + +SVGRendererBase.prototype.createImage = function (data) { + return new IImageElement(data, this.globalData, this); +}; + +SVGRendererBase.prototype.createSolid = function (data) { + return new ISolidElement(data, this.globalData, this); +}; + +SVGRendererBase.prototype.configAnimation = function (animData) { + this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); + if (this.renderConfig.viewBoxSize) { + this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize); + } else { + this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h); + } + + if (!this.renderConfig.viewBoxOnly) { + this.svgElement.setAttribute('width', animData.w); + this.svgElement.setAttribute('height', animData.h); + this.svgElement.style.width = '100%'; + this.svgElement.style.height = '100%'; + this.svgElement.style.transform = 'translate3d(0,0,0)'; + this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility; + } + if (this.renderConfig.width) { + this.svgElement.setAttribute('width', this.renderConfig.width); + } + if (this.renderConfig.height) { + this.svgElement.setAttribute('height', this.renderConfig.height); + } + if (this.renderConfig.className) { + this.svgElement.setAttribute('class', this.renderConfig.className); + } + if (this.renderConfig.id) { + this.svgElement.setAttribute('id', this.renderConfig.id); + } + if (this.renderConfig.focusable !== undefined) { + this.svgElement.setAttribute('focusable', this.renderConfig.focusable); + } + this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); + // this.layerElement.style.transform = 'translate3d(0,0,0)'; + // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px"; + this.animationItem.wrapper.appendChild(this.svgElement); + // Mask animation + var defs = this.globalData.defs; + + this.setupGlobalData(animData, defs); + this.globalData.progressiveLoad = this.renderConfig.progressiveLoad; + this.data = animData; + + var maskElement = createNS('clipPath'); + var rect = createNS('rect'); + rect.setAttribute('width', animData.w); + rect.setAttribute('height', animData.h); + rect.setAttribute('x', 0); + rect.setAttribute('y', 0); + var maskId = createElementID(); + maskElement.setAttribute('id', maskId); + maskElement.appendChild(rect); + this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')'); + + defs.appendChild(maskElement); + this.layers = animData.layers; + this.elements = createSizedArray(animData.layers.length); +}; + +SVGRendererBase.prototype.destroy = function () { + if (this.animationItem.wrapper) { + this.animationItem.wrapper.innerText = ''; + } + this.layerElement = null; + this.globalData.defs = null; + var i; + var len = this.layers ? this.layers.length : 0; + for (i = 0; i < len; i += 1) { + if (this.elements[i]) { + this.elements[i].destroy(); + } + } + this.elements.length = 0; + this.destroyed = true; + this.animationItem = null; +}; + +SVGRendererBase.prototype.updateContainerSize = function () { +}; + +SVGRendererBase.prototype.buildItem = function (pos) { + var elements = this.elements; + if (elements[pos] || this.layers[pos].ty === 99) { + return; + } + elements[pos] = true; + var element = this.createItem(this.layers[pos]); + + elements[pos] = element; + if (getExpressionsPlugin()) { + if (this.layers[pos].ty === 0) { + this.globalData.projectInterface.registerComposition(element); + } + element.initExpressions(); + } + this.appendElementInPos(element, pos); + if (this.layers[pos].tt) { + if (!this.elements[pos - 1] || this.elements[pos - 1] === true) { + this.buildItem(pos - 1); + this.addPendingElement(element); + } else { + element.setMatte(elements[pos - 1].layerId); + } + } +}; + +SVGRendererBase.prototype.checkPendingElements = function () { + while (this.pendingElements.length) { + var element = this.pendingElements.pop(); + element.checkParenting(); + if (element.data.tt) { + var i = 0; + var len = this.elements.length; + while (i < len) { + if (this.elements[i] === element) { + element.setMatte(this.elements[i - 1].layerId); + break; + } + i += 1; + } + } + } +}; + +SVGRendererBase.prototype.renderFrame = function (num) { + if (this.renderedFrame === num || this.destroyed) { + return; + } + if (num === null) { + num = this.renderedFrame; + } else { + this.renderedFrame = num; + } + // console.log('-------'); + // console.log('FRAME ',num); + this.globalData.frameNum = num; + this.globalData.frameId += 1; + this.globalData.projectInterface.currentFrame = num; + this.globalData._mdf = false; + var i; + var len = this.layers.length; + if (!this.completeLayers) { + this.checkLayers(num); + } + for (i = len - 1; i >= 0; i -= 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].prepareFrame(num - this.layers[i].st); + } + } + if (this.globalData._mdf) { + for (i = 0; i < len; i += 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].renderFrame(); + } + } + } +}; + +SVGRendererBase.prototype.appendElementInPos = function (element, pos) { + var newElement = element.getBaseElement(); + if (!newElement) { + return; + } + var i = 0; + var nextElement; + while (i < pos) { + if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) { + nextElement = this.elements[i].getBaseElement(); + } + i += 1; + } + if (nextElement) { + this.layerElement.insertBefore(newElement, nextElement); + } else { + this.layerElement.appendChild(newElement); + } +}; + +SVGRendererBase.prototype.hide = function () { + this.layerElement.style.display = 'none'; +}; + +SVGRendererBase.prototype.show = function () { + this.layerElement.style.display = 'block'; +}; + +function ICompElement() {} + +extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement); + +ICompElement.prototype.initElement = function (data, globalData, comp) { + this.initFrame(); + this.initBaseData(data, globalData, comp); + this.initTransform(data, globalData, comp); + this.initRenderable(); + this.initHierarchy(); + this.initRendererElement(); + this.createContainerElements(); + this.createRenderableComponents(); + if (this.data.xt || !globalData.progressiveLoad) { + this.buildAllItems(); + } + this.hide(); +}; + +/* ICompElement.prototype.hide = function(){ + if(!this.hidden){ + this.hideElement(); + var i,len = this.elements.length; + for( i = 0; i < len; i+=1 ){ + if(this.elements[i]){ + this.elements[i].hide(); + } + } + } +}; */ + +ICompElement.prototype.prepareFrame = function (num) { + this._mdf = false; + this.prepareRenderableFrame(num); + this.prepareProperties(num, this.isInRange); + if (!this.isInRange && !this.data.xt) { + return; + } + + if (!this.tm._placeholder) { + var timeRemapped = this.tm.v; + if (timeRemapped === this.data.op) { + timeRemapped = this.data.op - 1; + } + this.renderedFrame = timeRemapped; + } else { + this.renderedFrame = num / this.data.sr; + } + var i; + var len = this.elements.length; + if (!this.completeLayers) { + this.checkLayers(this.renderedFrame); + } + // This iteration needs to be backwards because of how expressions connect between each other + for (i = len - 1; i >= 0; i -= 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st); + if (this.elements[i]._mdf) { + this._mdf = true; + } + } + } +}; + +ICompElement.prototype.renderInnerContent = function () { + var i; + var len = this.layers.length; + for (i = 0; i < len; i += 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].renderFrame(); + } + } +}; + +ICompElement.prototype.setElements = function (elems) { + this.elements = elems; +}; + +ICompElement.prototype.getElements = function () { + return this.elements; +}; + +ICompElement.prototype.destroyElements = function () { + var i; + var len = this.layers.length; + for (i = 0; i < len; i += 1) { + if (this.elements[i]) { + this.elements[i].destroy(); + } + } +}; + +ICompElement.prototype.destroy = function () { + this.destroyElements(); + this.destroyBaseElement(); +}; + +function SVGCompElement(data, globalData, comp) { + this.layers = data.layers; + this.supports3d = true; + this.completeLayers = false; + this.pendingElements = []; + this.elements = this.layers ? createSizedArray(this.layers.length) : []; + this.initElement(data, globalData, comp); + this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true }; +} + +extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement); + +SVGCompElement.prototype.createComp = function (data) { + return new SVGCompElement(data, this.globalData, this); +}; + +function SVGRenderer(animationItem, config) { + this.animationItem = animationItem; + this.layers = null; + this.renderedFrame = -1; + this.svgElement = createNS('svg'); + var ariaLabel = ''; + if (config && config.title) { + var titleElement = createNS('title'); + var titleId = createElementID(); + titleElement.setAttribute('id', titleId); + titleElement.textContent = config.title; + this.svgElement.appendChild(titleElement); + ariaLabel += titleId; + } + if (config && config.description) { + var descElement = createNS('desc'); + var descId = createElementID(); + descElement.setAttribute('id', descId); + descElement.textContent = config.description; + this.svgElement.appendChild(descElement); + ariaLabel += ' ' + descId; + } + if (ariaLabel) { + this.svgElement.setAttribute('aria-labelledby', ariaLabel); + } + var defs = createNS('defs'); + this.svgElement.appendChild(defs); + var maskElement = createNS('g'); + this.svgElement.appendChild(maskElement); + this.layerElement = maskElement; + this.renderConfig = { + preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet', + imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice', + contentVisibility: (config && config.contentVisibility) || 'visible', + progressiveLoad: (config && config.progressiveLoad) || false, + hideOnTransparent: !((config && config.hideOnTransparent === false)), + viewBoxOnly: (config && config.viewBoxOnly) || false, + viewBoxSize: (config && config.viewBoxSize) || false, + className: (config && config.className) || '', + id: (config && config.id) || '', + focusable: config && config.focusable, + filterSize: { + width: (config && config.filterSize && config.filterSize.width) || '100%', + height: (config && config.filterSize && config.filterSize.height) || '100%', + x: (config && config.filterSize && config.filterSize.x) || '0%', + y: (config && config.filterSize && config.filterSize.y) || '0%', + }, + width: (config && config.width), + height: (config && config.height), + }; + + this.globalData = { + _mdf: false, + frameNum: -1, + defs: defs, + renderConfig: this.renderConfig, + }; + this.elements = []; + this.pendingElements = []; + this.destroyed = false; + this.rendererType = 'svg'; +} + +extendPrototype([SVGRendererBase], SVGRenderer); + +SVGRenderer.prototype.createComp = function (data) { + return new SVGCompElement(data, this.globalData, this); +}; + +function CVContextData() { + this.saved = []; + this.cArrPos = 0; + this.cTr = new Matrix(); + this.cO = 1; + var i; + var len = 15; + this.savedOp = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + this.saved[i] = createTypedArray('float32', 16); + } + this._length = len; +} + +CVContextData.prototype.duplicate = function () { + var newLength = this._length * 2; + var currentSavedOp = this.savedOp; + this.savedOp = createTypedArray('float32', newLength); + this.savedOp.set(currentSavedOp); + var i = 0; + for (i = this._length; i < newLength; i += 1) { + this.saved[i] = createTypedArray('float32', 16); + } + this._length = newLength; +}; + +CVContextData.prototype.reset = function () { + this.cArrPos = 0; + this.cTr.reset(); + this.cO = 1; +}; + +function ShapeTransformManager() { + this.sequences = {}; + this.sequenceList = []; + this.transform_key_count = 0; +} + +ShapeTransformManager.prototype = { + addTransformSequence: function (transforms) { + var i; + var len = transforms.length; + var key = '_'; + for (i = 0; i < len; i += 1) { + key += transforms[i].transform.key + '_'; + } + var sequence = this.sequences[key]; + if (!sequence) { + sequence = { + transforms: [].concat(transforms), + finalTransform: new Matrix(), + _mdf: false, + }; + this.sequences[key] = sequence; + this.sequenceList.push(sequence); + } + return sequence; + }, + processSequence: function (sequence, isFirstFrame) { + var i = 0; + var len = sequence.transforms.length; + var _mdf = isFirstFrame; + while (i < len && !isFirstFrame) { + if (sequence.transforms[i].transform.mProps._mdf) { + _mdf = true; + break; + } + i += 1; + } + if (_mdf) { + var props; + sequence.finalTransform.reset(); + for (i = len - 1; i >= 0; i -= 1) { + props = sequence.transforms[i].transform.mProps.v.props; + sequence.finalTransform.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]); + } + } + sequence._mdf = _mdf; + }, + processSequences: function (isFirstFrame) { + var i; + var len = this.sequenceList.length; + for (i = 0; i < len; i += 1) { + this.processSequence(this.sequenceList[i], isFirstFrame); + } + }, + getNewKey: function () { + this.transform_key_count += 1; + return '_' + this.transform_key_count; + }, +}; + +function CVEffects() { + +} +CVEffects.prototype.renderFrame = function () {}; + +function CVMaskElement(data, element) { + this.data = data; + this.element = element; + this.masksProperties = this.data.masksProperties || []; + this.viewData = createSizedArray(this.masksProperties.length); + var i; + var len = this.masksProperties.length; + var hasMasks = false; + for (i = 0; i < len; i += 1) { + if (this.masksProperties[i].mode !== 'n') { + hasMasks = true; + } + this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3); + } + this.hasMasks = hasMasks; + if (hasMasks) { + this.element.addRenderableComponent(this); + } +} + +CVMaskElement.prototype.renderFrame = function () { + if (!this.hasMasks) { + return; + } + var transform = this.element.finalTransform.mat; + var ctx = this.element.canvasContext; + var i; + var len = this.masksProperties.length; + var pt; + var pts; + var data; + ctx.beginPath(); + for (i = 0; i < len; i += 1) { + if (this.masksProperties[i].mode !== 'n') { + if (this.masksProperties[i].inv) { + ctx.moveTo(0, 0); + ctx.lineTo(this.element.globalData.compSize.w, 0); + ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h); + ctx.lineTo(0, this.element.globalData.compSize.h); + ctx.lineTo(0, 0); + } + data = this.viewData[i].v; + pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0); + ctx.moveTo(pt[0], pt[1]); + var j; + var jLen = data._length; + for (j = 1; j < jLen; j += 1) { + pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]); + ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]); + } + pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]); + ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]); + } + } + this.element.globalData.renderer.save(true); + ctx.clip(); +}; + +CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty; + +CVMaskElement.prototype.destroy = function () { + this.element = null; +}; + +function CVBaseElement() { +} + +CVBaseElement.prototype = { + createElements: function () {}, + initRendererElement: function () {}, + createContainerElements: function () { + this.canvasContext = this.globalData.canvasContext; + this.renderableEffectsManager = new CVEffects(this); + }, + createContent: function () {}, + setBlendMode: function () { + var globalData = this.globalData; + if (globalData.blendMode !== this.data.bm) { + globalData.blendMode = this.data.bm; + var blendModeValue = getBlendMode(this.data.bm); + globalData.canvasContext.globalCompositeOperation = blendModeValue; + } + }, + createRenderableComponents: function () { + this.maskManager = new CVMaskElement(this.data, this); + }, + hideElement: function () { + if (!this.hidden && (!this.isInRange || this.isTransparent)) { + this.hidden = true; + } + }, + showElement: function () { + if (this.isInRange && !this.isTransparent) { + this.hidden = false; + this._isFirstFrame = true; + this.maskManager._isFirstFrame = true; + } + }, + renderFrame: function () { + if (this.hidden || this.data.hd) { + return; + } + this.renderTransform(); + this.renderRenderable(); + this.setBlendMode(); + var forceRealStack = this.data.ty === 0; + this.globalData.renderer.save(forceRealStack); + this.globalData.renderer.ctxTransform(this.finalTransform.mat.props); + this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v); + this.renderInnerContent(); + this.globalData.renderer.restore(forceRealStack); + if (this.maskManager.hasMasks) { + this.globalData.renderer.restore(true); + } + if (this._isFirstFrame) { + this._isFirstFrame = false; + } + }, + destroy: function () { + this.canvasContext = null; + this.data = null; + this.globalData = null; + this.maskManager.destroy(); + }, + mHelper: new Matrix(), +}; +CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement; +CVBaseElement.prototype.show = CVBaseElement.prototype.showElement; + +function CVShapeData(element, data, styles, transformsManager) { + this.styledShapes = []; + this.tr = [0, 0, 0, 0, 0, 0]; + var ty = 4; + if (data.ty === 'rc') { + ty = 5; + } else if (data.ty === 'el') { + ty = 6; + } else if (data.ty === 'sr') { + ty = 7; + } + this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element); + var i; + var len = styles.length; + var styledShape; + for (i = 0; i < len; i += 1) { + if (!styles[i].closed) { + styledShape = { + transforms: transformsManager.addTransformSequence(styles[i].transforms), + trNodes: [], + }; + this.styledShapes.push(styledShape); + styles[i].elements.push(styledShape); + } + } +} + +CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated; + +function CVShapeElement(data, globalData, comp) { + this.shapes = []; + this.shapesData = data.shapes; + this.stylesList = []; + this.itemsData = []; + this.prevViewData = []; + this.shapeModifiers = []; + this.processedElements = []; + this.transformsManager = new ShapeTransformManager(); + this.initElement(data, globalData, comp); +} + +extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement); + +CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement; + +CVShapeElement.prototype.transformHelper = { opacity: 1, _opMdf: false }; + +CVShapeElement.prototype.dashResetter = []; + +CVShapeElement.prototype.createContent = function () { + this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []); +}; + +CVShapeElement.prototype.createStyleElement = function (data, transforms) { + var styleElem = { + data: data, + type: data.ty, + preTransforms: this.transformsManager.addTransformSequence(transforms), + transforms: [], + elements: [], + closed: data.hd === true, + }; + var elementData = {}; + if (data.ty === 'fl' || data.ty === 'st') { + elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this); + if (!elementData.c.k) { + styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')'; + } + } else if (data.ty === 'gf' || data.ty === 'gs') { + elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this); + elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this); + elementData.h = PropertyFactory.getProp(this, data.h || { k: 0 }, 0, 0.01, this); + elementData.a = PropertyFactory.getProp(this, data.a || { k: 0 }, 0, degToRads, this); + elementData.g = new GradientProperty(this, data.g, this); + } + elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this); + if (data.ty === 'st' || data.ty === 'gs') { + styleElem.lc = lineCapEnum[data.lc || 2]; + styleElem.lj = lineJoinEnum[data.lj || 2]; + if (data.lj == 1) { // eslint-disable-line eqeqeq + styleElem.ml = data.ml; + } + elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this); + if (!elementData.w.k) { + styleElem.wi = elementData.w.v; + } + if (data.d) { + var d = new DashProperty(this, data.d, 'canvas', this); + elementData.d = d; + if (!elementData.d.k) { + styleElem.da = elementData.d.dashArray; + styleElem.do = elementData.d.dashoffset[0]; + } + } + } else { + styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero'; + } + this.stylesList.push(styleElem); + elementData.style = styleElem; + return elementData; +}; + +CVShapeElement.prototype.createGroupElement = function () { + var elementData = { + it: [], + prevViewData: [], + }; + return elementData; +}; + +CVShapeElement.prototype.createTransformElement = function (data) { + var elementData = { + transform: { + opacity: 1, + _opMdf: false, + key: this.transformsManager.getNewKey(), + op: PropertyFactory.getProp(this, data.o, 0, 0.01, this), + mProps: TransformPropertyFactory.getTransformProperty(this, data, this), + }, + }; + return elementData; +}; + +CVShapeElement.prototype.createShapeElement = function (data) { + var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager); + + this.shapes.push(elementData); + this.addShapeToModifiers(elementData); + return elementData; +}; + +CVShapeElement.prototype.reloadShapes = function () { + this._isFirstFrame = true; + var i; + var len = this.itemsData.length; + for (i = 0; i < len; i += 1) { + this.prevViewData[i] = this.itemsData[i]; + } + this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []); + len = this.dynamicProperties.length; + for (i = 0; i < len; i += 1) { + this.dynamicProperties[i].getValue(); + } + this.renderModifiers(); + this.transformsManager.processSequences(this._isFirstFrame); +}; + +CVShapeElement.prototype.addTransformToStyleList = function (transform) { + var i; + var len = this.stylesList.length; + for (i = 0; i < len; i += 1) { + if (!this.stylesList[i].closed) { + this.stylesList[i].transforms.push(transform); + } + } +}; + +CVShapeElement.prototype.removeTransformFromStyleList = function () { + var i; + var len = this.stylesList.length; + for (i = 0; i < len; i += 1) { + if (!this.stylesList[i].closed) { + this.stylesList[i].transforms.pop(); + } + } +}; + +CVShapeElement.prototype.closeStyles = function (styles) { + var i; + var len = styles.length; + for (i = 0; i < len; i += 1) { + styles[i].closed = true; + } +}; + +CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) { + var i; + var len = arr.length - 1; + var j; + var jLen; + var ownStyles = []; + var ownModifiers = []; + var processedPos; + var modifier; + var currentTransform; + var ownTransforms = [].concat(transforms); + for (i = len; i >= 0; i -= 1) { + processedPos = this.searchProcessedElement(arr[i]); + if (!processedPos) { + arr[i]._shouldRender = shouldRender; + } else { + itemsData[i] = prevViewData[processedPos - 1]; + } + if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') { + if (!processedPos) { + itemsData[i] = this.createStyleElement(arr[i], ownTransforms); + } else { + itemsData[i].style.closed = false; + } + + ownStyles.push(itemsData[i].style); + } else if (arr[i].ty === 'gr') { + if (!processedPos) { + itemsData[i] = this.createGroupElement(arr[i]); + } else { + jLen = itemsData[i].it.length; + for (j = 0; j < jLen; j += 1) { + itemsData[i].prevViewData[j] = itemsData[i].it[j]; + } + } + this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms); + } else if (arr[i].ty === 'tr') { + if (!processedPos) { + currentTransform = this.createTransformElement(arr[i]); + itemsData[i] = currentTransform; + } + ownTransforms.push(itemsData[i]); + this.addTransformToStyleList(itemsData[i]); + } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') { + if (!processedPos) { + itemsData[i] = this.createShapeElement(arr[i]); + } + } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb') { + if (!processedPos) { + modifier = ShapeModifiers.getModifier(arr[i].ty); + modifier.init(this, arr[i]); + itemsData[i] = modifier; + this.shapeModifiers.push(modifier); + } else { + modifier = itemsData[i]; + modifier.closed = false; + } + ownModifiers.push(modifier); + } else if (arr[i].ty === 'rp') { + if (!processedPos) { + modifier = ShapeModifiers.getModifier(arr[i].ty); + itemsData[i] = modifier; + modifier.init(this, arr, i, itemsData); + this.shapeModifiers.push(modifier); + shouldRender = false; + } else { + modifier = itemsData[i]; + modifier.closed = true; + } + ownModifiers.push(modifier); + } + this.addProcessedElement(arr[i], i + 1); + } + this.removeTransformFromStyleList(); + this.closeStyles(ownStyles); + len = ownModifiers.length; + for (i = 0; i < len; i += 1) { + ownModifiers[i].closed = true; + } +}; + +CVShapeElement.prototype.renderInnerContent = function () { + this.transformHelper.opacity = 1; + this.transformHelper._opMdf = false; + this.renderModifiers(); + this.transformsManager.processSequences(this._isFirstFrame); + this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true); +}; + +CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) { + if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) { + groupTransform.opacity = parentTransform.opacity; + groupTransform.opacity *= groupTransform.op.v; + groupTransform._opMdf = true; + } +}; + +CVShapeElement.prototype.drawLayer = function () { + var i; + var len = this.stylesList.length; + var j; + var jLen; + var k; + var kLen; + var elems; + var nodes; + var renderer = this.globalData.renderer; + var ctx = this.globalData.canvasContext; + var type; + var currentStyle; + for (i = 0; i < len; i += 1) { + currentStyle = this.stylesList[i]; + type = currentStyle.type; + + // Skipping style when + // Stroke width equals 0 + // style should not be rendered (extra unused repeaters) + // current opacity equals 0 + // global opacity equals 0 + if (!(((type === 'st' || type === 'gs') && currentStyle.wi === 0) || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) { + renderer.save(); + elems = currentStyle.elements; + if (type === 'st' || type === 'gs') { + ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd; + ctx.lineWidth = currentStyle.wi; + ctx.lineCap = currentStyle.lc; + ctx.lineJoin = currentStyle.lj; + ctx.miterLimit = currentStyle.ml || 0; + } else { + ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd; + } + renderer.ctxOpacity(currentStyle.coOp); + if (type !== 'st' && type !== 'gs') { + ctx.beginPath(); + } + renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props); + jLen = elems.length; + for (j = 0; j < jLen; j += 1) { + if (type === 'st' || type === 'gs') { + ctx.beginPath(); + if (currentStyle.da) { + ctx.setLineDash(currentStyle.da); + ctx.lineDashOffset = currentStyle.do; + } + } + nodes = elems[j].trNodes; + kLen = nodes.length; + + for (k = 0; k < kLen; k += 1) { + if (nodes[k].t === 'm') { + ctx.moveTo(nodes[k].p[0], nodes[k].p[1]); + } else if (nodes[k].t === 'c') { + ctx.bezierCurveTo(nodes[k].pts[0], nodes[k].pts[1], nodes[k].pts[2], nodes[k].pts[3], nodes[k].pts[4], nodes[k].pts[5]); + } else { + ctx.closePath(); + } + } + if (type === 'st' || type === 'gs') { + ctx.stroke(); + if (currentStyle.da) { + ctx.setLineDash(this.dashResetter); + } + } + } + if (type !== 'st' && type !== 'gs') { + ctx.fill(currentStyle.r); + } + renderer.restore(); + } + } +}; + +CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) { + var i; + var len = items.length - 1; + var groupTransform; + groupTransform = parentTransform; + for (i = len; i >= 0; i -= 1) { + if (items[i].ty === 'tr') { + groupTransform = data[i].transform; + this.renderShapeTransform(parentTransform, groupTransform); + } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') { + this.renderPath(items[i], data[i]); + } else if (items[i].ty === 'fl') { + this.renderFill(items[i], data[i], groupTransform); + } else if (items[i].ty === 'st') { + this.renderStroke(items[i], data[i], groupTransform); + } else if (items[i].ty === 'gf' || items[i].ty === 'gs') { + this.renderGradientFill(items[i], data[i], groupTransform); + } else if (items[i].ty === 'gr') { + this.renderShape(groupTransform, items[i].it, data[i].it); + } else if (items[i].ty === 'tm') { + // + } + } + if (isMain) { + this.drawLayer(); + } +}; + +CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) { + if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) { + var shapeNodes = styledShape.trNodes; + var paths = shape.paths; + var i; + var len; + var j; + var jLen = paths._length; + shapeNodes.length = 0; + var groupTransformMat = styledShape.transforms.finalTransform; + for (j = 0; j < jLen; j += 1) { + var pathNodes = paths.shapes[j]; + if (pathNodes && pathNodes.v) { + len = pathNodes._length; + for (i = 1; i < len; i += 1) { + if (i === 1) { + shapeNodes.push({ + t: 'm', + p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0), + }); + } + shapeNodes.push({ + t: 'c', + pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i]), + }); + } + if (len === 1) { + shapeNodes.push({ + t: 'm', + p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0), + }); + } + if (pathNodes.c && len) { + shapeNodes.push({ + t: 'c', + pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0]), + }); + shapeNodes.push({ + t: 'z', + }); + } + } + } + styledShape.trNodes = shapeNodes; + } +}; + +CVShapeElement.prototype.renderPath = function (pathData, itemData) { + if (pathData.hd !== true && pathData._shouldRender) { + var i; + var len = itemData.styledShapes.length; + for (i = 0; i < len; i += 1) { + this.renderStyledShape(itemData.styledShapes[i], itemData.sh); + } + } +}; + +CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) { + var styleElem = itemData.style; + + if (itemData.c._mdf || this._isFirstFrame) { + styleElem.co = 'rgb(' + + bmFloor(itemData.c.v[0]) + ',' + + bmFloor(itemData.c.v[1]) + ',' + + bmFloor(itemData.c.v[2]) + ')'; + } + if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) { + styleElem.coOp = itemData.o.v * groupTransform.opacity; + } +}; + +CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) { + var styleElem = itemData.style; + var grd; + if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || (styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf))) { + var ctx = this.globalData.canvasContext; + var pt1 = itemData.s.v; + var pt2 = itemData.e.v; + if (styleData.t === 1) { + grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]); + } else { + var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2)); + var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]); + + var percent = itemData.h.v; + if (percent >= 1) { + percent = 0.99; + } else if (percent <= -1) { + percent = -0.99; + } + var dist = rad * percent; + var x = Math.cos(ang + itemData.a.v) * dist + pt1[0]; + var y = Math.sin(ang + itemData.a.v) * dist + pt1[1]; + grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad); + } + + var i; + var len = styleData.g.p; + var cValues = itemData.g.c; + var opacity = 1; + + for (i = 0; i < len; i += 1) { + if (itemData.g._hasOpacity && itemData.g._collapsable) { + opacity = itemData.g.o[i * 2 + 1]; + } + grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')'); + } + styleElem.grd = grd; + } + styleElem.coOp = itemData.o.v * groupTransform.opacity; +}; + +CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) { + var styleElem = itemData.style; + var d = itemData.d; + if (d && (d._mdf || this._isFirstFrame)) { + styleElem.da = d.dashArray; + styleElem.do = d.dashoffset[0]; + } + if (itemData.c._mdf || this._isFirstFrame) { + styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')'; + } + if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) { + styleElem.coOp = itemData.o.v * groupTransform.opacity; + } + if (itemData.w._mdf || this._isFirstFrame) { + styleElem.wi = itemData.w.v; + } +}; + +CVShapeElement.prototype.destroy = function () { + this.shapesData = null; + this.globalData = null; + this.canvasContext = null; + this.stylesList.length = 0; + this.itemsData.length = 0; +}; + +function CVTextElement(data, globalData, comp) { + this.textSpans = []; + this.yOffset = 0; + this.fillColorAnim = false; + this.strokeColorAnim = false; + this.strokeWidthAnim = false; + this.stroke = false; + this.fill = false; + this.justifyOffset = 0; + this.currentRender = null; + this.renderType = 'canvas'; + this.values = { + fill: 'rgba(0,0,0,0)', + stroke: 'rgba(0,0,0,0)', + sWidth: 0, + fValue: '', + }; + this.initElement(data, globalData, comp); +} +extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement); + +CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d'); + +CVTextElement.prototype.buildNewText = function () { + var documentData = this.textProperty.currentData; + this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0); + + var hasFill = false; + if (documentData.fc) { + hasFill = true; + this.values.fill = this.buildColor(documentData.fc); + } else { + this.values.fill = 'rgba(0,0,0,0)'; + } + this.fill = hasFill; + var hasStroke = false; + if (documentData.sc) { + hasStroke = true; + this.values.stroke = this.buildColor(documentData.sc); + this.values.sWidth = documentData.sw; + } + var fontData = this.globalData.fontManager.getFontByName(documentData.f); + var i; + var len; + var letters = documentData.l; + var matrixHelper = this.mHelper; + this.stroke = hasStroke; + this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily; + len = documentData.finalText.length; + // this.tHelper.font = this.values.fValue; + var charData; + var shapeData; + var k; + var kLen; + var shapes; + var j; + var jLen; + var pathNodes; + var commands; + var pathArr; + var singleShape = this.data.singleShape; + var trackingOffset = documentData.tr * 0.001 * documentData.finalSize; + var xPos = 0; + var yPos = 0; + var firstLine = true; + var cnt = 0; + for (i = 0; i < len; i += 1) { + charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily); + shapeData = (charData && charData.data) || {}; + matrixHelper.reset(); + if (singleShape && letters[i].n) { + xPos = -trackingOffset; + yPos += documentData.yOffset; + yPos += firstLine ? 1 : 0; + firstLine = false; + } + shapes = shapeData.shapes ? shapeData.shapes[0].it : []; + jLen = shapes.length; + matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100); + if (singleShape) { + this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos); + } + commands = createSizedArray(jLen - 1); + var commandsCounter = 0; + for (j = 0; j < jLen; j += 1) { + if (shapes[j].ty === 'sh') { + kLen = shapes[j].ks.k.i.length; + pathNodes = shapes[j].ks.k; + pathArr = []; + for (k = 1; k < kLen; k += 1) { + if (k === 1) { + pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0)); + } + pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToY(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToX(pathNodes.v[k][0], pathNodes.v[k][1], 0), matrixHelper.applyToY(pathNodes.v[k][0], pathNodes.v[k][1], 0)); + } + pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToY(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0)); + commands[commandsCounter] = pathArr; + commandsCounter += 1; + } + } + if (singleShape) { + xPos += letters[i].l; + xPos += trackingOffset; + } + if (this.textSpans[cnt]) { + this.textSpans[cnt].elem = commands; + } else { + this.textSpans[cnt] = { elem: commands }; + } + cnt += 1; + } +}; + +CVTextElement.prototype.renderInnerContent = function () { + var ctx = this.canvasContext; + ctx.font = this.values.fValue; + ctx.lineCap = 'butt'; + ctx.lineJoin = 'miter'; + ctx.miterLimit = 4; + + if (!this.data.singleShape) { + this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag); + } + + var i; + var len; + var j; + var jLen; + var k; + var kLen; + var renderedLetters = this.textAnimator.renderedLetters; + + var letters = this.textProperty.currentData.l; + + len = letters.length; + var renderedLetter; + var lastFill = null; + var lastStroke = null; + var lastStrokeW = null; + var commands; + var pathArr; + for (i = 0; i < len; i += 1) { + if (!letters[i].n) { + renderedLetter = renderedLetters[i]; + if (renderedLetter) { + this.globalData.renderer.save(); + this.globalData.renderer.ctxTransform(renderedLetter.p); + this.globalData.renderer.ctxOpacity(renderedLetter.o); + } + if (this.fill) { + if (renderedLetter && renderedLetter.fc) { + if (lastFill !== renderedLetter.fc) { + lastFill = renderedLetter.fc; + ctx.fillStyle = renderedLetter.fc; + } + } else if (lastFill !== this.values.fill) { + lastFill = this.values.fill; + ctx.fillStyle = this.values.fill; + } + commands = this.textSpans[i].elem; + jLen = commands.length; + this.globalData.canvasContext.beginPath(); + for (j = 0; j < jLen; j += 1) { + pathArr = commands[j]; + kLen = pathArr.length; + this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]); + for (k = 2; k < kLen; k += 6) { + this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]); + } + } + this.globalData.canvasContext.closePath(); + this.globalData.canvasContext.fill(); + /// ctx.fillText(this.textSpans[i].val,0,0); + } + if (this.stroke) { + if (renderedLetter && renderedLetter.sw) { + if (lastStrokeW !== renderedLetter.sw) { + lastStrokeW = renderedLetter.sw; + ctx.lineWidth = renderedLetter.sw; + } + } else if (lastStrokeW !== this.values.sWidth) { + lastStrokeW = this.values.sWidth; + ctx.lineWidth = this.values.sWidth; + } + if (renderedLetter && renderedLetter.sc) { + if (lastStroke !== renderedLetter.sc) { + lastStroke = renderedLetter.sc; + ctx.strokeStyle = renderedLetter.sc; + } + } else if (lastStroke !== this.values.stroke) { + lastStroke = this.values.stroke; + ctx.strokeStyle = this.values.stroke; + } + commands = this.textSpans[i].elem; + jLen = commands.length; + this.globalData.canvasContext.beginPath(); + for (j = 0; j < jLen; j += 1) { + pathArr = commands[j]; + kLen = pathArr.length; + this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]); + for (k = 2; k < kLen; k += 6) { + this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]); + } + } + this.globalData.canvasContext.closePath(); + this.globalData.canvasContext.stroke(); + /// ctx.strokeText(letters[i].val,0,0); + } + if (renderedLetter) { + this.globalData.renderer.restore(); + } + } + } +}; + +function CVImageElement(data, globalData, comp) { + this.assetData = globalData.getAssetData(data.refId); + this.img = globalData.imageLoader.getAsset(this.assetData); + this.initElement(data, globalData, comp); +} +extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement); + +CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement; +CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame; + +CVImageElement.prototype.createContent = function () { + if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) { + var canvas = createTag('canvas'); + canvas.width = this.assetData.w; + canvas.height = this.assetData.h; + var ctx = canvas.getContext('2d'); + + var imgW = this.img.width; + var imgH = this.img.height; + var imgRel = imgW / imgH; + var canvasRel = this.assetData.w / this.assetData.h; + var widthCrop; + var heightCrop; + var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio; + if ((imgRel > canvasRel && par === 'xMidYMid slice') || (imgRel < canvasRel && par !== 'xMidYMid slice')) { + heightCrop = imgH; + widthCrop = heightCrop * canvasRel; + } else { + widthCrop = imgW; + heightCrop = widthCrop / canvasRel; + } + ctx.drawImage(this.img, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h); + this.img = canvas; + } +}; + +CVImageElement.prototype.renderInnerContent = function () { + this.canvasContext.drawImage(this.img, 0, 0); +}; + +CVImageElement.prototype.destroy = function () { + this.img = null; +}; + +function CVSolidElement(data, globalData, comp) { + this.initElement(data, globalData, comp); +} +extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement); + +CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement; +CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame; + +CVSolidElement.prototype.renderInnerContent = function () { + var ctx = this.canvasContext; + ctx.fillStyle = this.data.sc; + ctx.fillRect(0, 0, this.data.sw, this.data.sh); + // +}; + +function CanvasRendererBase(animationItem, config) { + this.animationItem = animationItem; + this.renderConfig = { + clearCanvas: (config && config.clearCanvas !== undefined) ? config.clearCanvas : true, + context: (config && config.context) || null, + progressiveLoad: (config && config.progressiveLoad) || false, + preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet', + imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice', + contentVisibility: (config && config.contentVisibility) || 'visible', + className: (config && config.className) || '', + id: (config && config.id) || '', + }; + this.renderConfig.dpr = (config && config.dpr) || 1; + if (this.animationItem.wrapper) { + this.renderConfig.dpr = (config && config.dpr) || window.devicePixelRatio || 1; + } + this.renderedFrame = -1; + this.globalData = { + frameNum: -1, + _mdf: false, + renderConfig: this.renderConfig, + currentGlobalAlpha: -1, + }; + this.contextData = new CVContextData(); + this.elements = []; + this.pendingElements = []; + this.transformMat = new Matrix(); + this.completeLayers = false; + this.rendererType = 'canvas'; +} +extendPrototype([BaseRenderer], CanvasRendererBase); + +CanvasRendererBase.prototype.createShape = function (data) { + return new CVShapeElement(data, this.globalData, this); +}; + +CanvasRendererBase.prototype.createText = function (data) { + return new CVTextElement(data, this.globalData, this); +}; + +CanvasRendererBase.prototype.createImage = function (data) { + return new CVImageElement(data, this.globalData, this); +}; + +CanvasRendererBase.prototype.createSolid = function (data) { + return new CVSolidElement(data, this.globalData, this); +}; + +CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull; + +CanvasRendererBase.prototype.ctxTransform = function (props) { + if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) { + return; + } + if (!this.renderConfig.clearCanvas) { + this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]); + return; + } + this.transformMat.cloneFromProps(props); + var cProps = this.contextData.cTr.props; + this.transformMat.transform(cProps[0], cProps[1], cProps[2], cProps[3], cProps[4], cProps[5], cProps[6], cProps[7], cProps[8], cProps[9], cProps[10], cProps[11], cProps[12], cProps[13], cProps[14], cProps[15]); + // this.contextData.cTr.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]); + this.contextData.cTr.cloneFromProps(this.transformMat.props); + var trProps = this.contextData.cTr.props; + this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]); +}; + +CanvasRendererBase.prototype.ctxOpacity = function (op) { + /* if(op === 1){ + return; + } */ + if (!this.renderConfig.clearCanvas) { + this.canvasContext.globalAlpha *= op < 0 ? 0 : op; + this.globalData.currentGlobalAlpha = this.contextData.cO; + return; + } + this.contextData.cO *= op < 0 ? 0 : op; + if (this.globalData.currentGlobalAlpha !== this.contextData.cO) { + this.canvasContext.globalAlpha = this.contextData.cO; + this.globalData.currentGlobalAlpha = this.contextData.cO; + } +}; + +CanvasRendererBase.prototype.reset = function () { + if (!this.renderConfig.clearCanvas) { + this.canvasContext.restore(); + return; + } + this.contextData.reset(); +}; + +CanvasRendererBase.prototype.save = function (actionFlag) { + if (!this.renderConfig.clearCanvas) { + this.canvasContext.save(); + return; + } + if (actionFlag) { + this.canvasContext.save(); + } + var props = this.contextData.cTr.props; + if (this.contextData._length <= this.contextData.cArrPos) { + this.contextData.duplicate(); + } + var i; + var arr = this.contextData.saved[this.contextData.cArrPos]; + for (i = 0; i < 16; i += 1) { + arr[i] = props[i]; + } + this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO; + this.contextData.cArrPos += 1; +}; + +CanvasRendererBase.prototype.restore = function (actionFlag) { + if (!this.renderConfig.clearCanvas) { + this.canvasContext.restore(); + return; + } + if (actionFlag) { + this.canvasContext.restore(); + this.globalData.blendMode = 'source-over'; + } + this.contextData.cArrPos -= 1; + var popped = this.contextData.saved[this.contextData.cArrPos]; + var i; + var arr = this.contextData.cTr.props; + for (i = 0; i < 16; i += 1) { + arr[i] = popped[i]; + } + this.canvasContext.setTransform(popped[0], popped[1], popped[4], popped[5], popped[12], popped[13]); + popped = this.contextData.savedOp[this.contextData.cArrPos]; + this.contextData.cO = popped; + if (this.globalData.currentGlobalAlpha !== popped) { + this.canvasContext.globalAlpha = popped; + this.globalData.currentGlobalAlpha = popped; + } +}; + +CanvasRendererBase.prototype.configAnimation = function (animData) { + if (this.animationItem.wrapper) { + this.animationItem.container = createTag('canvas'); + var containerStyle = this.animationItem.container.style; + containerStyle.width = '100%'; + containerStyle.height = '100%'; + var origin = '0px 0px 0px'; + containerStyle.transformOrigin = origin; + containerStyle.mozTransformOrigin = origin; + containerStyle.webkitTransformOrigin = origin; + containerStyle['-webkit-transform'] = origin; + containerStyle.contentVisibility = this.renderConfig.contentVisibility; + this.animationItem.wrapper.appendChild(this.animationItem.container); + this.canvasContext = this.animationItem.container.getContext('2d'); + if (this.renderConfig.className) { + this.animationItem.container.setAttribute('class', this.renderConfig.className); + } + if (this.renderConfig.id) { + this.animationItem.container.setAttribute('id', this.renderConfig.id); + } + } else { + this.canvasContext = this.renderConfig.context; + } + this.data = animData; + this.layers = animData.layers; + this.transformCanvas = { + w: animData.w, + h: animData.h, + sx: 0, + sy: 0, + tx: 0, + ty: 0, + }; + this.setupGlobalData(animData, document.body); + this.globalData.canvasContext = this.canvasContext; + this.globalData.renderer = this; + this.globalData.isDashed = false; + this.globalData.progressiveLoad = this.renderConfig.progressiveLoad; + this.globalData.transformCanvas = this.transformCanvas; + this.elements = createSizedArray(animData.layers.length); + + this.updateContainerSize(); +}; + +CanvasRendererBase.prototype.updateContainerSize = function () { + this.reset(); + var elementWidth; + var elementHeight; + if (this.animationItem.wrapper && this.animationItem.container) { + elementWidth = this.animationItem.wrapper.offsetWidth; + elementHeight = this.animationItem.wrapper.offsetHeight; + this.animationItem.container.setAttribute('width', elementWidth * this.renderConfig.dpr); + this.animationItem.container.setAttribute('height', elementHeight * this.renderConfig.dpr); + } else { + elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr; + elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr; + } + var elementRel; + var animationRel; + if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) { + var par = this.renderConfig.preserveAspectRatio.split(' '); + var fillType = par[1] || 'meet'; + var pos = par[0] || 'xMidYMid'; + var xPos = pos.substr(0, 4); + var yPos = pos.substr(4); + elementRel = elementWidth / elementHeight; + animationRel = this.transformCanvas.w / this.transformCanvas.h; + if ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice')) { + this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr); + this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr); + } else { + this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr); + this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr); + } + + if (xPos === 'xMid' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) { + this.transformCanvas.tx = ((elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2) * this.renderConfig.dpr; + } else if (xPos === 'xMax' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) { + this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr; + } else { + this.transformCanvas.tx = 0; + } + if (yPos === 'YMid' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) { + this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2) * this.renderConfig.dpr; + } else if (yPos === 'YMax' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) { + this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w))) * this.renderConfig.dpr; + } else { + this.transformCanvas.ty = 0; + } + } else if (this.renderConfig.preserveAspectRatio === 'none') { + this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr); + this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr); + this.transformCanvas.tx = 0; + this.transformCanvas.ty = 0; + } else { + this.transformCanvas.sx = this.renderConfig.dpr; + this.transformCanvas.sy = this.renderConfig.dpr; + this.transformCanvas.tx = 0; + this.transformCanvas.ty = 0; + } + this.transformCanvas.props = [this.transformCanvas.sx, 0, 0, 0, 0, this.transformCanvas.sy, 0, 0, 0, 0, 1, 0, this.transformCanvas.tx, this.transformCanvas.ty, 0, 1]; + /* var i, len = this.elements.length; + for(i=0;i= 0; i -= 1) { + if (this.elements[i]) { + this.elements[i].destroy(); + } + } + this.elements.length = 0; + this.globalData.canvasContext = null; + this.animationItem.container = null; + this.destroyed = true; +}; + +CanvasRendererBase.prototype.renderFrame = function (num, forceRender) { + if ((this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender) || this.destroyed || num === -1) { + return; + } + this.renderedFrame = num; + this.globalData.frameNum = num - this.animationItem._isFirstFrame; + this.globalData.frameId += 1; + this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender; + this.globalData.projectInterface.currentFrame = num; + + // console.log('--------'); + // console.log('NEW: ',num); + var i; + var len = this.layers.length; + if (!this.completeLayers) { + this.checkLayers(num); + } + + for (i = 0; i < len; i += 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].prepareFrame(num - this.layers[i].st); + } + } + if (this.globalData._mdf) { + if (this.renderConfig.clearCanvas === true) { + this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h); + } else { + this.save(); + } + for (i = len - 1; i >= 0; i -= 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].renderFrame(); + } + } + if (this.renderConfig.clearCanvas !== true) { + this.restore(); + } + } +}; + +CanvasRendererBase.prototype.buildItem = function (pos) { + var elements = this.elements; + if (elements[pos] || this.layers[pos].ty === 99) { + return; + } + var element = this.createItem(this.layers[pos], this, this.globalData); + elements[pos] = element; + element.initExpressions(); + /* if(this.layers[pos].ty === 0){ + element.resize(this.globalData.transformCanvas); + } */ +}; + +CanvasRendererBase.prototype.checkPendingElements = function () { + while (this.pendingElements.length) { + var element = this.pendingElements.pop(); + element.checkParenting(); + } +}; + +CanvasRendererBase.prototype.hide = function () { + this.animationItem.container.style.display = 'none'; +}; + +CanvasRendererBase.prototype.show = function () { + this.animationItem.container.style.display = 'block'; +}; + +function CVCompElement(data, globalData, comp) { + this.completeLayers = false; + this.layers = data.layers; + this.pendingElements = []; + this.elements = createSizedArray(this.layers.length); + this.initElement(data, globalData, comp); + this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true }; +} + +extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement); + +CVCompElement.prototype.renderInnerContent = function () { + var ctx = this.canvasContext; + ctx.beginPath(); + ctx.moveTo(0, 0); + ctx.lineTo(this.data.w, 0); + ctx.lineTo(this.data.w, this.data.h); + ctx.lineTo(0, this.data.h); + ctx.lineTo(0, 0); + ctx.clip(); + var i; + var len = this.layers.length; + for (i = len - 1; i >= 0; i -= 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].renderFrame(); + } + } +}; + +CVCompElement.prototype.destroy = function () { + var i; + var len = this.layers.length; + for (i = len - 1; i >= 0; i -= 1) { + if (this.elements[i]) { + this.elements[i].destroy(); + } + } + this.layers = null; + this.elements = null; +}; + +CVCompElement.prototype.createComp = function (data) { + return new CVCompElement(data, this.globalData, this); +}; + +function CanvasRenderer(animationItem, config) { + this.animationItem = animationItem; + this.renderConfig = { + clearCanvas: (config && config.clearCanvas !== undefined) ? config.clearCanvas : true, + context: (config && config.context) || null, + progressiveLoad: (config && config.progressiveLoad) || false, + preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet', + imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice', + contentVisibility: (config && config.contentVisibility) || 'visible', + className: (config && config.className) || '', + id: (config && config.id) || '', + }; + this.renderConfig.dpr = (config && config.dpr) || 1; + if (this.animationItem.wrapper) { + this.renderConfig.dpr = (config && config.dpr) || window.devicePixelRatio || 1; + } + this.renderedFrame = -1; + this.globalData = { + frameNum: -1, + _mdf: false, + renderConfig: this.renderConfig, + currentGlobalAlpha: -1, + }; + this.contextData = new CVContextData(); + this.elements = []; + this.pendingElements = []; + this.transformMat = new Matrix(); + this.completeLayers = false; + this.rendererType = 'canvas'; +} +extendPrototype([CanvasRendererBase], CanvasRenderer); + +CanvasRenderer.prototype.createComp = function (data) { + return new CVCompElement(data, this.globalData, this); +}; + +// Registering renderers +registerRenderer('canvas', CanvasRenderer); + +// Registering shape modifiers +ShapeModifiers.registerModifier('tm', TrimModifier); +ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier); +ShapeModifiers.registerModifier('rp', RepeaterModifier); +ShapeModifiers.registerModifier('rd', RoundCornersModifier); + +const Expressions = (function () { + var ob = {}; + ob.initExpressions = initExpressions; + + function initExpressions(animation) { + var stackCount = 0; + var registers = []; + + function pushExpression() { + stackCount += 1; + } + + function popExpression() { + stackCount -= 1; + if (stackCount === 0) { + releaseInstances(); + } + } + + function registerExpressionProperty(expression) { + if (registers.indexOf(expression) === -1) { + registers.push(expression); + } + } + + function releaseInstances() { + var i; + var len = registers.length; + for (i = 0; i < len; i += 1) { + registers[i].release(); + } + registers.length = 0; + } + + animation.renderer.compInterface = CompExpressionInterface(animation.renderer); + animation.renderer.globalData.projectInterface.registerComposition(animation.renderer); + animation.renderer.globalData.pushExpression = pushExpression; + animation.renderer.globalData.popExpression = popExpression; + animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty; + } + return ob; +}()); + +/* eslint-disable */ +/* + Copyright 2014 David Bau. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + */ + +function seedRandom(pool, math) { +// +// The following constants are related to IEEE 754 limits. +// + var global = this, + width = 256, // each RC4 output is 0 <= x < 256 + chunks = 6, // at least six RC4 outputs for each double + digits = 52, // there are 52 significant digits in a double + rngname = 'random', // rngname: name for Math.random and Math.seedrandom + startdenom = math.pow(width, chunks), + significance = math.pow(2, digits), + overflow = significance * 2, + mask = width - 1, + nodecrypto; // node.js crypto module, initialized at the bottom. + +// +// seedrandom() +// This is the seedrandom function described above. +// + function seedrandom(seed, options, callback) { + var key = []; + options = (options === true) ? { entropy: true } : (options || {}); + + // Flatten the seed string or build one from local entropy if needed. + var shortseed = mixkey(flatten( + options.entropy ? [seed, tostring(pool)] : + (seed === null) ? autoseed() : seed, 3), key); + + // Use the seed to initialize an ARC4 generator. + var arc4 = new ARC4(key); + + // This function returns a random double in [0, 1) that contains + // randomness in every bit of the mantissa of the IEEE 754 value. + var prng = function() { + var n = arc4.g(chunks), // Start with a numerator n < 2 ^ 48 + d = startdenom, // and denominator d = 2 ^ 48. + x = 0; // and no 'extra last byte'. + while (n < significance) { // Fill up all significant digits by + n = (n + x) * width; // shifting numerator and + d *= width; // denominator and generating a + x = arc4.g(1); // new least-significant-byte. + } + while (n >= overflow) { // To avoid rounding up, before adding + n /= 2; // last byte, shift everything + d /= 2; // right using integer math until + x >>>= 1; // we have exactly the desired bits. + } + return (n + x) / d; // Form the number within [0, 1). + }; + + prng.int32 = function() { return arc4.g(4) | 0; }; + prng.quick = function() { return arc4.g(4) / 0x100000000; }; + prng.double = prng; + + // Mix the randomness into accumulated entropy. + mixkey(tostring(arc4.S), pool); + + // Calling convention: what to return as a function of prng, seed, is_math. + return (options.pass || callback || + function(prng, seed, is_math_call, state) { + if (state) { + // Load the arc4 state from the given state if it has an S array. + if (state.S) { copy(state, arc4); } + // Only provide the .state method if requested via options.state. + prng.state = function() { return copy(arc4, {}); }; + } + + // If called as a method of Math (Math.seedrandom()), mutate + // Math.random because that is how seedrandom.js has worked since v1.0. + if (is_math_call) { math[rngname] = prng; return seed; } + + // Otherwise, it is a newer calling convention, so return the + // prng directly. + else return prng; + })( + prng, + shortseed, + 'global' in options ? options.global : (this == math), + options.state); + } + math['seed' + rngname] = seedrandom; + +// +// ARC4 +// +// An ARC4 implementation. The constructor takes a key in the form of +// an array of at most (width) integers that should be 0 <= x < (width). +// +// The g(count) method returns a pseudorandom integer that concatenates +// the next (count) outputs from ARC4. Its return value is a number x +// that is in the range 0 <= x < (width ^ count). +// + function ARC4(key) { + var t, keylen = key.length, + me = this, i = 0, j = me.i = me.j = 0, s = me.S = []; + + // The empty key [] is treated as [0]. + if (!keylen) { key = [keylen++]; } + + // Set up S using the standard key scheduling algorithm. + while (i < width) { + s[i] = i++; + } + for (i = 0; i < width; i++) { + s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))]; + s[j] = t; + } + + // The "g" method returns the next (count) outputs as one number. + me.g = function(count) { + // Using instance members instead of closure state nearly doubles speed. + var t, r = 0, + i = me.i, j = me.j, s = me.S; + while (count--) { + t = s[i = mask & (i + 1)]; + r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))]; + } + me.i = i; me.j = j; + return r; + // For robust unpredictability, the function call below automatically + // discards an initial batch of values. This is called RC4-drop[256]. + // See http://google.com/search?q=rsa+fluhrer+response&btnI + }; + } + +// +// copy() +// Copies internal state of ARC4 to or from a plain object. +// + function copy(f, t) { + t.i = f.i; + t.j = f.j; + t.S = f.S.slice(); + return t; + } + +// +// flatten() +// Converts an object tree to nested arrays of strings. +// + function flatten(obj, depth) { + var result = [], typ = (typeof obj), prop; + if (depth && typ == 'object') { + for (prop in obj) { + try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {} + } + } + return (result.length ? result : typ == 'string' ? obj : obj + '\0'); + } + +// +// mixkey() +// Mixes a string seed into a key that is an array of integers, and +// returns a shortened string seed that is equivalent to the result key. +// + function mixkey(seed, key) { + var stringseed = seed + '', smear, j = 0; + while (j < stringseed.length) { + key[mask & j] = + mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++)); + } + return tostring(key); + } + +// +// autoseed() +// Returns an object for autoseeding, using window.crypto and Node crypto +// module if available. +// + function autoseed() { + try { + if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); } + var out = new Uint8Array(width); + (global.crypto || global.msCrypto).getRandomValues(out); + return tostring(out); + } catch (e) { + var browser = global.navigator, + plugins = browser && browser.plugins; + return [+new Date(), global, plugins, global.screen, tostring(pool)]; + } + } + +// +// tostring() +// Converts an array of charcodes to a string +// + function tostring(a) { + return String.fromCharCode.apply(0, a); + } + +// +// When seedrandom.js is loaded, we immediately mix a few bits +// from the built-in RNG into the entropy pool. Because we do +// not want to interfere with deterministic PRNG state later, +// seedrandom will not call math.random on its own again after +// initialization. +// + mixkey(math.random(), pool); + +// +// Nodejs and AMD support: export the implementation as a module using +// either convention. +// + +// End anonymous scope, and pass initial values. +}; + +function initialize$2(BMMath) { + seedRandom([], BMMath); +} + +var propTypes = { + SHAPE: 'shape', +}; + +/* eslint-disable camelcase */ + +const ExpressionManager = (function () { + 'use strict'; + + var ob = {}; + var Math = BMMath; + var window = null; + var document = null; + var XMLHttpRequest = null; + var fetch = null; + var frames = null; + initialize$2(BMMath); + + function $bm_isInstanceOfArray(arr) { + return arr.constructor === Array || arr.constructor === Float32Array; + } + + function isNumerable(tOfV, v) { + return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number; + } + + function $bm_neg(a) { + var tOfA = typeof a; + if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) { + return -a; + } + if ($bm_isInstanceOfArray(a)) { + var i; + var lenA = a.length; + var retArr = []; + for (i = 0; i < lenA; i += 1) { + retArr[i] = -a[i]; + } + return retArr; + } + if (a.propType) { + return a.v; + } + return -a; + } + + var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get; + var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get; + var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get; + + function sum(a, b) { + var tOfA = typeof a; + var tOfB = typeof b; + if (tOfA === 'string' || tOfB === 'string') { + return a + b; + } + if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) { + return a + b; + } + if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) { + a = a.slice(0); + a[0] += b; + return a; + } + if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) { + b = b.slice(0); + b[0] = a + b[0]; + return b; + } + if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) { + var i = 0; + var lenA = a.length; + var lenB = b.length; + var retArr = []; + while (i < lenA || i < lenB) { + if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) { + retArr[i] = a[i] + b[i]; + } else { + retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i]; + } + i += 1; + } + return retArr; + } + return 0; + } + var add = sum; + + function sub(a, b) { + var tOfA = typeof a; + var tOfB = typeof b; + if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) { + if (tOfA === 'string') { + a = parseInt(a, 10); + } + if (tOfB === 'string') { + b = parseInt(b, 10); + } + return a - b; + } + if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) { + a = a.slice(0); + a[0] -= b; + return a; + } + if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) { + b = b.slice(0); + b[0] = a - b[0]; + return b; + } + if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) { + var i = 0; + var lenA = a.length; + var lenB = b.length; + var retArr = []; + while (i < lenA || i < lenB) { + if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) { + retArr[i] = a[i] - b[i]; + } else { + retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i]; + } + i += 1; + } + return retArr; + } + return 0; + } + + function mul(a, b) { + var tOfA = typeof a; + var tOfB = typeof b; + var arr; + if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) { + return a * b; + } + + var i; + var len; + if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) { + len = a.length; + arr = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + arr[i] = a[i] * b; + } + return arr; + } + if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) { + len = b.length; + arr = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + arr[i] = a * b[i]; + } + return arr; + } + return 0; + } + + function div(a, b) { + var tOfA = typeof a; + var tOfB = typeof b; + var arr; + if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) { + return a / b; + } + var i; + var len; + if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) { + len = a.length; + arr = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + arr[i] = a[i] / b; + } + return arr; + } + if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) { + len = b.length; + arr = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + arr[i] = a / b[i]; + } + return arr; + } + return 0; + } + function mod(a, b) { + if (typeof a === 'string') { + a = parseInt(a, 10); + } + if (typeof b === 'string') { + b = parseInt(b, 10); + } + return a % b; + } + var $bm_sum = sum; + var $bm_sub = sub; + var $bm_mul = mul; + var $bm_div = div; + var $bm_mod = mod; + + function clamp(num, min, max) { + if (min > max) { + var mm = max; + max = min; + min = mm; + } + return Math.min(Math.max(num, min), max); + } + + function radiansToDegrees(val) { + return val / degToRads; + } + var radians_to_degrees = radiansToDegrees; + + function degreesToRadians(val) { + return val * degToRads; + } + var degrees_to_radians = radiansToDegrees; + + var helperLengthArray = [0, 0, 0, 0, 0, 0]; + + function length(arr1, arr2) { + if (typeof arr1 === 'number' || arr1 instanceof Number) { + arr2 = arr2 || 0; + return Math.abs(arr1 - arr2); + } + if (!arr2) { + arr2 = helperLengthArray; + } + var i; + var len = Math.min(arr1.length, arr2.length); + var addedLength = 0; + for (i = 0; i < len; i += 1) { + addedLength += Math.pow(arr2[i] - arr1[i], 2); + } + return Math.sqrt(addedLength); + } + + function normalize(vec) { + return div(vec, length(vec)); + } + + function rgbToHsl(val) { + var r = val[0]; var g = val[1]; var b = val[2]; + var max = Math.max(r, g, b); + var min = Math.min(r, g, b); + var h; + var s; + var l = (max + min) / 2; + + if (max === min) { + h = 0; // achromatic + s = 0; // achromatic + } else { + var d = max - min; + s = l > 0.5 ? d / (2 - max - min) : d / (max + min); + switch (max) { + case r: h = (g - b) / d + (g < b ? 6 : 0); break; + case g: h = (b - r) / d + 2; break; + case b: h = (r - g) / d + 4; break; + default: break; + } + h /= 6; + } + + return [h, s, l, val[3]]; + } + + function hue2rgb(p, q, t) { + if (t < 0) t += 1; + if (t > 1) t -= 1; + if (t < 1 / 6) return p + (q - p) * 6 * t; + if (t < 1 / 2) return q; + if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; + return p; + } + + function hslToRgb(val) { + var h = val[0]; + var s = val[1]; + var l = val[2]; + + var r; + var g; + var b; + + if (s === 0) { + r = l; // achromatic + b = l; // achromatic + g = l; // achromatic + } else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = hue2rgb(p, q, h + 1 / 3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - 1 / 3); + } + + return [r, g, b, val[3]]; + } + + function linear(t, tMin, tMax, value1, value2) { + if (value1 === undefined || value2 === undefined) { + value1 = tMin; + value2 = tMax; + tMin = 0; + tMax = 1; + } + if (tMax < tMin) { + var _tMin = tMax; + tMax = tMin; + tMin = _tMin; + } + if (t <= tMin) { + return value1; + } if (t >= tMax) { + return value2; + } + var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin); + if (!value1.length) { + return value1 + (value2 - value1) * perc; + } + var i; + var len = value1.length; + var arr = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + arr[i] = value1[i] + (value2[i] - value1[i]) * perc; + } + return arr; + } + function random(min, max) { + if (max === undefined) { + if (min === undefined) { + min = 0; + max = 1; + } else { + max = min; + min = undefined; + } + } + if (max.length) { + var i; + var len = max.length; + if (!min) { + min = createTypedArray('float32', len); + } + var arr = createTypedArray('float32', len); + var rnd = BMMath.random(); + for (i = 0; i < len; i += 1) { + arr[i] = min[i] + rnd * (max[i] - min[i]); + } + return arr; + } + if (min === undefined) { + min = 0; + } + var rndm = BMMath.random(); + return min + rndm * (max - min); + } + + function createPath(points, inTangents, outTangents, closed) { + var i; + var len = points.length; + var path = shapePool.newElement(); + path.setPathData(!!closed, len); + var arrPlaceholder = [0, 0]; + var inVertexPoint; + var outVertexPoint; + for (i = 0; i < len; i += 1) { + inVertexPoint = (inTangents && inTangents[i]) ? inTangents[i] : arrPlaceholder; + outVertexPoint = (outTangents && outTangents[i]) ? outTangents[i] : arrPlaceholder; + path.setTripleAt(points[i][0], points[i][1], outVertexPoint[0] + points[i][0], outVertexPoint[1] + points[i][1], inVertexPoint[0] + points[i][0], inVertexPoint[1] + points[i][1], i, true); + } + return path; + } + + function initiateExpression(elem, data, property) { + var val = data.x; + var needsVelocity = /velocity(?![\w\d])/.test(val); + var _needsRandom = val.indexOf('random') !== -1; + var elemType = elem.data.ty; + var transform; + var $bm_transform; + var content; + var effect; + var thisProperty = property; + thisProperty.valueAtTime = thisProperty.getValueAtTime; + Object.defineProperty(thisProperty, 'value', { + get: function () { + return thisProperty.v; + }, + }); + elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate; + elem.comp.displayStartTime = 0; + var inPoint = elem.data.ip / elem.comp.globalData.frameRate; + var outPoint = elem.data.op / elem.comp.globalData.frameRate; + var width = elem.data.sw ? elem.data.sw : 0; + var height = elem.data.sh ? elem.data.sh : 0; + var name = elem.data.nm; + var loopIn; + var loop_in; + var loopOut; + var loop_out; + var smooth; + var toWorld; + var fromWorld; + var fromComp; + var toComp; + var fromCompToSurface; + var position; + var rotation; + var anchorPoint; + var scale; + var thisLayer; + var thisComp; + var mask; + var valueAtTime; + var velocityAtTime; + + var scoped_bm_rt; + // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls + var expression_function = eval('[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]')[0]; // eslint-disable-line no-eval + var numKeys = property.kf ? data.k.length : 0; + + var active = !this.data || this.data.hd !== true; + + var wiggle = function wiggle(freq, amp) { + var iWiggle; + var j; + var lenWiggle = this.pv.length ? this.pv.length : 1; + var addedAmps = createTypedArray('float32', lenWiggle); + freq = 5; + var iterations = Math.floor(time * freq); + iWiggle = 0; + j = 0; + while (iWiggle < iterations) { + // var rnd = BMMath.random(); + for (j = 0; j < lenWiggle; j += 1) { + addedAmps[j] += -amp + amp * 2 * BMMath.random(); + // addedAmps[j] += -amp + amp*2*rnd; + } + iWiggle += 1; + } + // var rnd2 = BMMath.random(); + var periods = time * freq; + var perc = periods - Math.floor(periods); + var arr = createTypedArray('float32', lenWiggle); + if (lenWiggle > 1) { + for (j = 0; j < lenWiggle; j += 1) { + arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; + // arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc; + // arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc); + } + return arr; + } + return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc; + }.bind(this); + + if (thisProperty.loopIn) { + loopIn = thisProperty.loopIn.bind(thisProperty); + loop_in = loopIn; + } + + if (thisProperty.loopOut) { + loopOut = thisProperty.loopOut.bind(thisProperty); + loop_out = loopOut; + } + + if (thisProperty.smooth) { + smooth = thisProperty.smooth.bind(thisProperty); + } + + function loopInDuration(type, duration) { + return loopIn(type, duration, true); + } + + function loopOutDuration(type, duration) { + return loopOut(type, duration, true); + } + + if (this.getValueAtTime) { + valueAtTime = this.getValueAtTime.bind(this); + } + + if (this.getVelocityAtTime) { + velocityAtTime = this.getVelocityAtTime.bind(this); + } + + var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface); + + function lookAt(elem1, elem2) { + var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]]; + var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads; + var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads; + return [yaw, pitch, 0]; + } + + function easeOut(t, tMin, tMax, val1, val2) { + return applyEase(easeOutBez, t, tMin, tMax, val1, val2); + } + + function easeIn(t, tMin, tMax, val1, val2) { + return applyEase(easeInBez, t, tMin, tMax, val1, val2); + } + + function ease(t, tMin, tMax, val1, val2) { + return applyEase(easeInOutBez, t, tMin, tMax, val1, val2); + } + + function applyEase(fn, t, tMin, tMax, val1, val2) { + if (val1 === undefined) { + val1 = tMin; + val2 = tMax; + } else { + t = (t - tMin) / (tMax - tMin); + } + if (t > 1) { + t = 1; + } else if (t < 0) { + t = 0; + } + var mult = fn(t); + if ($bm_isInstanceOfArray(val1)) { + var iKey; + var lenKey = val1.length; + var arr = createTypedArray('float32', lenKey); + for (iKey = 0; iKey < lenKey; iKey += 1) { + arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey]; + } + return arr; + } + return (val2 - val1) * mult + val1; + } + + function nearestKey(time) { + var iKey; + var lenKey = data.k.length; + var index; + var keyTime; + if (!data.k.length || typeof (data.k[0]) === 'number') { + index = 0; + keyTime = 0; + } else { + index = -1; + time *= elem.comp.globalData.frameRate; + if (time < data.k[0].t) { + index = 1; + keyTime = data.k[0].t; + } else { + for (iKey = 0; iKey < lenKey - 1; iKey += 1) { + if (time === data.k[iKey].t) { + index = iKey + 1; + keyTime = data.k[iKey].t; + break; + } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) { + if (time - data.k[iKey].t > data.k[iKey + 1].t - time) { + index = iKey + 2; + keyTime = data.k[iKey + 1].t; + } else { + index = iKey + 1; + keyTime = data.k[iKey].t; + } + break; + } + } + if (index === -1) { + index = iKey + 1; + keyTime = data.k[iKey].t; + } + } + } + var obKey = {}; + obKey.index = index; + obKey.time = keyTime / elem.comp.globalData.frameRate; + return obKey; + } + + function key(ind) { + var obKey; + var iKey; + var lenKey; + if (!data.k.length || typeof (data.k[0]) === 'number') { + throw new Error('The property has no keyframe at index ' + ind); + } + ind -= 1; + obKey = { + time: data.k[ind].t / elem.comp.globalData.frameRate, + value: [], + }; + var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e; + + lenKey = arr.length; + for (iKey = 0; iKey < lenKey; iKey += 1) { + obKey[iKey] = arr[iKey]; + obKey.value[iKey] = arr[iKey]; + } + return obKey; + } + + function framesToTime(fr, fps) { + if (!fps) { + fps = elem.comp.globalData.frameRate; + } + return fr / fps; + } + + function timeToFrames(t, fps) { + if (!t && t !== 0) { + t = time; + } + if (!fps) { + fps = elem.comp.globalData.frameRate; + } + return t * fps; + } + + function seedRandom(seed) { + BMMath.seedrandom(randSeed + seed); + } + + function sourceRectAtTime() { + return elem.sourceRectAtTime(); + } + + function substring(init, end) { + if (typeof value === 'string') { + if (end === undefined) { + return value.substring(init); + } + return value.substring(init, end); + } + return ''; + } + + function substr(init, end) { + if (typeof value === 'string') { + if (end === undefined) { + return value.substr(init); + } + return value.substr(init, end); + } + return ''; + } + + function posterizeTime(framesPerSecond) { + time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond; + value = valueAtTime(time); + } + + var time; + var velocity; + var value; + var text; + var textIndex; + var textTotal; + var selectorValue; + var index = elem.data.ind; + var hasParent = !!(elem.hierarchy && elem.hierarchy.length); + var parent; + var randSeed = Math.floor(Math.random() * 1000000); + var globalData = elem.globalData; + function executeExpression(_value) { + // globalData.pushExpression(); + value = _value; + if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') { + return value; + } + if (this.propType === 'textSelector') { + textIndex = this.textIndex; + textTotal = this.textTotal; + selectorValue = this.selectorValue; + } + if (!thisLayer) { + text = elem.layerInterface.text; + thisLayer = elem.layerInterface; + thisComp = elem.comp.compInterface; + toWorld = thisLayer.toWorld.bind(thisLayer); + fromWorld = thisLayer.fromWorld.bind(thisLayer); + fromComp = thisLayer.fromComp.bind(thisLayer); + toComp = thisLayer.toComp.bind(thisLayer); + mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null; + fromCompToSurface = fromComp; + } + if (!transform) { + transform = elem.layerInterface('ADBE Transform Group'); + $bm_transform = transform; + if (transform) { + anchorPoint = transform.anchorPoint; + /* position = transform.position; + rotation = transform.rotation; + scale = transform.scale; */ + } + } + + if (elemType === 4 && !content) { + content = thisLayer('ADBE Root Vectors Group'); + } + if (!effect) { + effect = thisLayer(4); + } + hasParent = !!(elem.hierarchy && elem.hierarchy.length); + if (hasParent && !parent) { + parent = elem.hierarchy[0].layerInterface; + } + time = this.comp.renderedFrame / this.comp.globalData.frameRate; + if (_needsRandom) { + seedRandom(randSeed + time); + } + if (needsVelocity) { + velocity = velocityAtTime(time); + } + expression_function(); + this.frameExpressionId = elem.globalData.frameId; + + // TODO: Check if it's possible to return on ShapeInterface the .v value + // Changed this to a ternary operation because Rollup failed compiling it correctly + scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE + ? scoped_bm_rt.v + : scoped_bm_rt; + return scoped_bm_rt; + } + // Bundlers will see these as dead code and unless we reference them + executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, time, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData]; + return executeExpression; + } + + ob.initiateExpression = initiateExpression; + ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath]; + return ob; +}()); + +const expressionHelpers = (function () { + function searchExpressions(elem, data, prop) { + if (data.x) { + prop.k = true; + prop.x = true; + prop.initiateExpression = ExpressionManager.initiateExpression; + prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop)); + } + } + + function getValueAtTime(frameNum) { + frameNum *= this.elem.globalData.frameRate; + frameNum -= this.offsetTime; + if (frameNum !== this._cachingAtTime.lastFrame) { + this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0; + this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime); + this._cachingAtTime.lastFrame = frameNum; + } + return this._cachingAtTime.value; + } + + function getSpeedAtTime(frameNum) { + var delta = -0.01; + var v1 = this.getValueAtTime(frameNum); + var v2 = this.getValueAtTime(frameNum + delta); + var speed = 0; + if (v1.length) { + var i; + for (i = 0; i < v1.length; i += 1) { + speed += Math.pow(v2[i] - v1[i], 2); + } + speed = Math.sqrt(speed) * 100; + } else { + speed = 0; + } + return speed; + } + + function getVelocityAtTime(frameNum) { + if (this.vel !== undefined) { + return this.vel; + } + var delta = -0.001; + // frameNum += this.elem.data.st; + var v1 = this.getValueAtTime(frameNum); + var v2 = this.getValueAtTime(frameNum + delta); + var velocity; + if (v1.length) { + velocity = createTypedArray('float32', v1.length); + var i; + for (i = 0; i < v1.length; i += 1) { + // removing frameRate + // if needed, don't add it here + // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta); + velocity[i] = (v2[i] - v1[i]) / delta; + } + } else { + velocity = (v2 - v1) / delta; + } + return velocity; + } + + function getStaticValueAtTime() { + return this.pv; + } + + function setGroupProperty(propertyGroup) { + this.propertyGroup = propertyGroup; + } + + return { + searchExpressions: searchExpressions, + getSpeedAtTime: getSpeedAtTime, + getVelocityAtTime: getVelocityAtTime, + getValueAtTime: getValueAtTime, + getStaticValueAtTime: getStaticValueAtTime, + setGroupProperty: setGroupProperty, + }; +}()); + +function addPropertyDecorator() { + function loopOut(type, duration, durationFlag) { + if (!this.k || !this.keyframes) { + return this.pv; + } + type = type ? type.toLowerCase() : ''; + var currentFrame = this.comp.renderedFrame; + var keyframes = this.keyframes; + var lastKeyFrame = keyframes[keyframes.length - 1].t; + if (currentFrame <= lastKeyFrame) { + return this.pv; + } + var cycleDuration; + var firstKeyFrame; + if (!durationFlag) { + if (!duration || duration > keyframes.length - 1) { + duration = keyframes.length - 1; + } + firstKeyFrame = keyframes[keyframes.length - 1 - duration].t; + cycleDuration = lastKeyFrame - firstKeyFrame; + } else { + if (!duration) { + cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip); + } else { + cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration); + } + firstKeyFrame = lastKeyFrame - cycleDuration; + } + var i; + var len; + var ret; + if (type === 'pingpong') { + var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration); + if (iterations % 2 !== 0) { + return this.getValueAtTime(((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line + } + } else if (type === 'offset') { + var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0); + var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0); + var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line + var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration); + if (this.pv.length) { + ret = new Array(initV.length); + len = ret.length; + for (i = 0; i < len; i += 1) { + ret[i] = (endV[i] - initV[i]) * repeats + current[i]; + } + return ret; + } + return (endV - initV) * repeats + current; + } else if (type === 'continue') { + var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0); + var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0); + if (this.pv.length) { + ret = new Array(lastValue.length); + len = ret.length; + for (i = 0; i < len; i += 1) { + ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line + } + return ret; + } + return lastValue + (lastValue - nextLastValue) * (((currentFrame - lastKeyFrame)) / 0.001); + } + return this.getValueAtTime((((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line + + } + + function loopIn(type, duration, durationFlag) { + if (!this.k) { + return this.pv; + } + type = type ? type.toLowerCase() : ''; + var currentFrame = this.comp.renderedFrame; + var keyframes = this.keyframes; + var firstKeyFrame = keyframes[0].t; + if (currentFrame >= firstKeyFrame) { + return this.pv; + } + var cycleDuration; + var lastKeyFrame; + if (!durationFlag) { + if (!duration || duration > keyframes.length - 1) { + duration = keyframes.length - 1; + } + lastKeyFrame = keyframes[duration].t; + cycleDuration = lastKeyFrame - firstKeyFrame; + } else { + if (!duration) { + cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame); + } else { + cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration); + } + lastKeyFrame = firstKeyFrame + cycleDuration; + } + var i; + var len; + var ret; + if (type === 'pingpong') { + var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration); + if (iterations % 2 === 0) { + return this.getValueAtTime((((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line + } + } else if (type === 'offset') { + var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0); + var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0); + var current = this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration) + firstKeyFrame) / this.comp.globalData.frameRate, 0); + var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1; + if (this.pv.length) { + ret = new Array(initV.length); + len = ret.length; + for (i = 0; i < len; i += 1) { + ret[i] = current[i] - (endV[i] - initV[i]) * repeats; + } + return ret; + } + return current - (endV - initV) * repeats; + } else if (type === 'continue') { + var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0); + var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0); + if (this.pv.length) { + ret = new Array(firstValue.length); + len = ret.length; + for (i = 0; i < len; i += 1) { + ret[i] = firstValue[i] + ((firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame)) / 0.001; + } + return ret; + } + return firstValue + ((firstValue - nextFirstValue) * (firstKeyFrame - currentFrame)) / 0.001; + } + return this.getValueAtTime(((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame))) / this.comp.globalData.frameRate, 0); // eslint-disable-line + + } + + function smooth(width, samples) { + if (!this.k) { + return this.pv; + } + width = (width || 0.4) * 0.5; + samples = Math.floor(samples || 5); + if (samples <= 1) { + return this.pv; + } + var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate; + var initFrame = currentTime - width; + var endFrame = currentTime + width; + var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1; + var i = 0; + var j = 0; + var value; + if (this.pv.length) { + value = createTypedArray('float32', this.pv.length); + } else { + value = 0; + } + var sampleValue; + while (i < samples) { + sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency); + if (this.pv.length) { + for (j = 0; j < this.pv.length; j += 1) { + value[j] += sampleValue[j]; + } + } else { + value += sampleValue; + } + i += 1; + } + if (this.pv.length) { + for (j = 0; j < this.pv.length; j += 1) { + value[j] /= samples; + } + } else { + value /= samples; + } + return value; + } + + function getTransformValueAtTime(time) { + if (!this._transformCachingAtTime) { + this._transformCachingAtTime = { + v: new Matrix(), + }; + } + /// / + var matrix = this._transformCachingAtTime.v; + matrix.cloneFromProps(this.pre.props); + if (this.appliedTransformations < 1) { + var anchor = this.a.getValueAtTime(time); + matrix.translate( + -anchor[0] * this.a.mult, + -anchor[1] * this.a.mult, + anchor[2] * this.a.mult + ); + } + if (this.appliedTransformations < 2) { + var scale = this.s.getValueAtTime(time); + matrix.scale( + scale[0] * this.s.mult, + scale[1] * this.s.mult, + scale[2] * this.s.mult + ); + } + if (this.sk && this.appliedTransformations < 3) { + var skew = this.sk.getValueAtTime(time); + var skewAxis = this.sa.getValueAtTime(time); + matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult); + } + if (this.r && this.appliedTransformations < 4) { + var rotation = this.r.getValueAtTime(time); + matrix.rotate(-rotation * this.r.mult); + } else if (!this.r && this.appliedTransformations < 4) { + var rotationZ = this.rz.getValueAtTime(time); + var rotationY = this.ry.getValueAtTime(time); + var rotationX = this.rx.getValueAtTime(time); + var orientation = this.or.getValueAtTime(time); + matrix.rotateZ(-rotationZ * this.rz.mult) + .rotateY(rotationY * this.ry.mult) + .rotateX(rotationX * this.rx.mult) + .rotateZ(-orientation[2] * this.or.mult) + .rotateY(orientation[1] * this.or.mult) + .rotateX(orientation[0] * this.or.mult); + } + if (this.data.p && this.data.p.s) { + var positionX = this.px.getValueAtTime(time); + var positionY = this.py.getValueAtTime(time); + if (this.data.p.z) { + var positionZ = this.pz.getValueAtTime(time); + matrix.translate( + positionX * this.px.mult, + positionY * this.py.mult, + -positionZ * this.pz.mult + ); + } else { + matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0); + } + } else { + var position = this.p.getValueAtTime(time); + matrix.translate( + position[0] * this.p.mult, + position[1] * this.p.mult, + -position[2] * this.p.mult + ); + } + return matrix; + /// / + } + + function getTransformStaticValueAtTime() { + return this.v.clone(new Matrix()); + } + + var getTransformProperty = TransformPropertyFactory.getTransformProperty; + TransformPropertyFactory.getTransformProperty = function (elem, data, container) { + var prop = getTransformProperty(elem, data, container); + if (prop.dynamicProperties.length) { + prop.getValueAtTime = getTransformValueAtTime.bind(prop); + } else { + prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop); + } + prop.setGroupProperty = expressionHelpers.setGroupProperty; + return prop; + }; + + var propertyGetProp = PropertyFactory.getProp; + PropertyFactory.getProp = function (elem, data, type, mult, container) { + var prop = propertyGetProp(elem, data, type, mult, container); + // prop.getVelocityAtTime = getVelocityAtTime; + // prop.loopOut = loopOut; + // prop.loopIn = loopIn; + if (prop.kf) { + prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop); + } else { + prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop); + } + prop.setGroupProperty = expressionHelpers.setGroupProperty; + prop.loopOut = loopOut; + prop.loopIn = loopIn; + prop.smooth = smooth; + prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop); + prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop); + prop.numKeys = data.a === 1 ? data.k.length : 0; + prop.propertyIndex = data.ix; + var value = 0; + if (type !== 0) { + value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length); + } + prop._cachingAtTime = { + lastFrame: initialDefaultFrame, + lastIndex: 0, + value: value, + }; + expressionHelpers.searchExpressions(elem, data, prop); + if (prop.k) { + container.addDynamicProperty(prop); + } + + return prop; + }; + + function getShapeValueAtTime(frameNum) { + // For now this caching object is created only when needed instead of creating it when the shape is initialized. + if (!this._cachingAtTime) { + this._cachingAtTime = { + shapeValue: shapePool.clone(this.pv), + lastIndex: 0, + lastTime: initialDefaultFrame, + }; + } + + frameNum *= this.elem.globalData.frameRate; + frameNum -= this.offsetTime; + if (frameNum !== this._cachingAtTime.lastTime) { + this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0; + this._cachingAtTime.lastTime = frameNum; + this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime); + } + return this._cachingAtTime.shapeValue; + } + + var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction(); + var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction(); + + function ShapeExpressions() {} + ShapeExpressions.prototype = { + vertices: function (prop, time) { + if (this.k) { + this.getValue(); + } + var shapePath = this.v; + if (time !== undefined) { + shapePath = this.getValueAtTime(time, 0); + } + var i; + var len = shapePath._length; + var vertices = shapePath[prop]; + var points = shapePath.v; + var arr = createSizedArray(len); + for (i = 0; i < len; i += 1) { + if (prop === 'i' || prop === 'o') { + arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]]; + } else { + arr[i] = [vertices[i][0], vertices[i][1]]; + } + } + return arr; + }, + points: function (time) { + return this.vertices('v', time); + }, + inTangents: function (time) { + return this.vertices('i', time); + }, + outTangents: function (time) { + return this.vertices('o', time); + }, + isClosed: function () { + return this.v.c; + }, + pointOnPath: function (perc, time) { + var shapePath = this.v; + if (time !== undefined) { + shapePath = this.getValueAtTime(time, 0); + } + if (!this._segmentsLength) { + this._segmentsLength = bez.getSegmentsLength(shapePath); + } + + var segmentsLength = this._segmentsLength; + var lengths = segmentsLength.lengths; + var lengthPos = segmentsLength.totalLength * perc; + var i = 0; + var len = lengths.length; + var accumulatedLength = 0; + var pt; + while (i < len) { + if (accumulatedLength + lengths[i].addedLength > lengthPos) { + var initIndex = i; + var endIndex = (shapePath.c && i === len - 1) ? 0 : i + 1; + var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength; + pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]); + break; + } else { + accumulatedLength += lengths[i].addedLength; + } + i += 1; + } + if (!pt) { + pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]]; + } + return pt; + }, + vectorOnPath: function (perc, time, vectorType) { + // perc doesn't use triple equality because it can be a Number object as well as a primitive. + if (perc == 1) { // eslint-disable-line eqeqeq + perc = this.v.c; + } else if (perc == 0) { // eslint-disable-line eqeqeq + perc = 0.999; + } + var pt1 = this.pointOnPath(perc, time); + var pt2 = this.pointOnPath(perc + 0.001, time); + var xLength = pt2[0] - pt1[0]; + var yLength = pt2[1] - pt1[1]; + var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2)); + if (magnitude === 0) { + return [0, 0]; + } + var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude]; + return unitVector; + }, + tangentOnPath: function (perc, time) { + return this.vectorOnPath(perc, time, 'tangent'); + }, + normalOnPath: function (perc, time) { + return this.vectorOnPath(perc, time, 'normal'); + }, + setGroupProperty: expressionHelpers.setGroupProperty, + getValueAtTime: expressionHelpers.getStaticValueAtTime, + }; + extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction); + extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction); + KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime; + KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression; + + var propertyGetShapeProp = ShapePropertyFactory.getShapeProp; + ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) { + var prop = propertyGetShapeProp(elem, data, type, arr, trims); + prop.propertyIndex = data.ix; + prop.lock = false; + if (type === 3) { + expressionHelpers.searchExpressions(elem, data.pt, prop); + } else if (type === 4) { + expressionHelpers.searchExpressions(elem, data.ks, prop); + } + if (prop.k) { + elem.addDynamicProperty(prop); + } + return prop; + }; +} + +function initialize$1() { + addPropertyDecorator(); +} + +function addDecorator() { + function searchExpressions() { + if (this.data.d.x) { + this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this); + this.addEffect(this.getExpressionValue.bind(this)); + return true; + } + return null; + } + + TextProperty.prototype.getExpressionValue = function (currentValue, text) { + var newValue = this.calculateExpression(text); + if (currentValue.t !== newValue) { + var newData = {}; + this.copyData(newData, currentValue); + newData.t = newValue.toString(); + newData.__complete = false; + return newData; + } + return currentValue; + }; + + TextProperty.prototype.searchProperty = function () { + var isKeyframed = this.searchKeyframes(); + var hasExpressions = this.searchExpressions(); + this.kf = isKeyframed || hasExpressions; + return this.kf; + }; + + TextProperty.prototype.searchExpressions = searchExpressions; +} + +function initialize() { + addDecorator(); +} + +// Registering expression plugin +setExpressionsPlugin(Expressions); +initialize$1(); +initialize(); + +} + +export { lottie as default }; diff --git a/node_modules/three/examples/jsm/libs/meshopt_decoder.module.js b/node_modules/three/examples/jsm/libs/meshopt_decoder.module.js new file mode 100644 index 0000000..d0933a9 --- /dev/null +++ b/node_modules/three/examples/jsm/libs/meshopt_decoder.module.js @@ -0,0 +1,178 @@ +// This file is part of meshoptimizer library and is distributed under the terms of MIT License. +// Copyright (C) 2016-2022, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com) +var MeshoptDecoder = (function() { + "use strict"; + + // Built with clang version 14.0.4 + // Built from meshoptimizer 0.18 + var wasm_base = "b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq:P8Yqdbk;3sezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhDcbhqinaqae9pmeaDaeaq9RaqaDfae6Egkcsfgocl4cifcd4hxdndndndnaoc9WGgmTmbcbhPcehsawcjdfhzalhHinaraH9Rax6midnaraHaxfgl9RcK6mbczhoinawcj;cbfaogifgoc9WfhOdndndndndnaHaic9WfgAco4fRbbaAci4coG4ciGPlbedibkaO9cb83ibaOcwf9cb83ibxikaOalRblalRbbgAco4gCaCciSgCE86bbaocGfalclfaCfgORbbaAcl4ciGgCaCciSgCE86bbaocVfaOaCfgORbbaAcd4ciGgCaCciSgCE86bbaoc7faOaCfgORbbaAciGgAaAciSgAE86bbaoctfaOaAfgARbbalRbegOco4gCaCciSgCE86bbaoc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc93faAaCfgARbbaOciGgOaOciSgOE86bbaoc94faAaOfgARbbalRbdgOco4gCaCciSgCE86bbaoc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc97faAaCfgARbbaOciGgOaOciSgOE86bbaoc98faAaOfgORbbalRbiglco4gAaAciSgAE86bbaoc99faOaAfgORbbalcl4ciGgAaAciSgAE86bbaoc9:faOaAfgORbbalcd4ciGgAaAciSgAE86bbaocufaOaAfgoRbbalciGglalciSglE86bbaoalfhlxdkaOalRbwalRbbgAcl4gCaCcsSgCE86bbaocGfalcwfaCfgORbbaAcsGgAaAcsSgAE86bbaocVfaOaAfgORbbalRbegAcl4gCaCcsSgCE86bbaoc7faOaCfgORbbaAcsGgAaAcsSgAE86bbaoctfaOaAfgORbbalRbdgAcl4gCaCcsSgCE86bbaoc91faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc4faOaAfgORbbalRbigAcl4gCaCcsSgCE86bbaoc93faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc94faOaAfgORbbalRblgAcl4gCaCcsSgCE86bbaoc95faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc96faOaAfgORbbalRbvgAcl4gCaCcsSgCE86bbaoc97faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc98faOaAfgORbbalRbogAcl4gCaCcsSgCE86bbaoc99faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc9:faOaAfgORbbalRbrglcl4gAaAcsSgAE86bbaocufaOaAfgoRbbalcsGglalcsSglE86bbaoalfhlxekaOal8Pbb83bbaOcwfalcwf8Pbb83bbalczfhlkdnaiam9pmbaiczfhoaral9RcL0mekkaiam6mialTmidnakTmbawaPfRbbhOcbhoazhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkkazcefhzaPcefgPad6hsalhHaPad9hmexvkkcbhlasceGmdxikalaxad2fhCdnakTmbcbhHcehsawcjdfhminaral9Rax6mialTmdalaxfhlawaHfRbbhOcbhoamhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkamcefhmaHcefgHad6hsaHad9hmbkaChlxikcbhocehsinaral9Rax6mdalTmealaxfhlaocefgoad6hsadao9hmbkaChlxdkcbhlasceGTmekc9:hoxikabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqalmbkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;ebf8Kjjjjbaok;yzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;siliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabavcefciGaiVcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:Ohkxekcjjjj94hkkabavcdfciGaiVcetfak87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:Ohqxekcjjjj94hqkabavcufciGaiVcetfaq87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohqxekcjjjj94hqkabavciGaiVcetfaq87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2geTmbinababydbgdcwtcw91:Yadce91cjjj;8ifcjjj98G::NUdbabclfhbaecufgembkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfhiaeczfheadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb"; + var wasm_simd = "b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;t9tqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk;h8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhwcbhDinaDae9pmeawaeaD9RaDawfae6Egqcsfgoc9WGgkci2hxakcethmaocl4cifcd4hPabaDad2fhscbhzdnincehHalhOcbhAdninaraO9RaP6miavcj;cbfaAak2fhCaOaPfhlcbhidnakc;ab6mbaral9Rc;Gb6mbcbhoinaCaofhidndndndndnaOaoco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklbalczfhlkdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklzalczfhlkdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklaalczfhlkdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalclfaYpQbfaXc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalcwfaYpQbfaXc:q:yjjbfRbbfhlxekaialpbbbpkl8Walczfhlkaoc;abfhiaocjefak0meaihoaral9Rc;Fb0mbkkdndnaiak9pmbaici4hoinaral9RcK6mdaCaifhXdndndndndnaOaico4fRbbaocoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpklbxikaXalpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaXalpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaXalpbbbpklbalczfhlkaocdfhoaiczfgiak6mbkkalTmbaAci6hHalhOaAcefgohAaoclSmdxekkcbhlaHceGmdkdnakTmbavcjdfazfhiavazfpbdbhYcbhXinaiavcj;cbfaXfgopblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLaoakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEaoamfpblbg3cep9Ta3aQp9op9Hp9rg3aoaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfhiaXczfgXak6mbkkazclfgzad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfhDc9:hoalmexikkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk;uzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:EPliuo97eue978Jjjjjbca9Rhidndnadcl9hmbdnaec98GglTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalae9pmeaiaeciGgvcdtgdVcbczad9R;8kbaiabalcdtfglad;8qbbdnavTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkalaiad;8qbbskdnaec98GgxTmbcbhvabhdinadczfglalpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oawaopmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgvax6mbkkaxae9pmbaiaeciGgvcitgdfcbcaad9R;8kbaiabaxcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oawaopmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalae9pmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbhdabheinaeaepbbbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepkbbaeczfheadclfgdav6mbkkdnaval9pmbaialciGgdcdtgeVcbc;abae9R;8kbaiabavcdtfgvae;8qbbdnadTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepklbkavaiae;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb"; + + var detector = new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]); + var wasmpack = new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]); + + if (typeof WebAssembly !== 'object') { + return { + supported: false, + }; + } + + var wasm = WebAssembly.validate(detector) ? wasm_simd : wasm_base; + + var instance; + + var ready = + WebAssembly.instantiate(unpack(wasm), {}) + .then(function(result) { + instance = result.instance; + instance.exports.__wasm_call_ctors(); + }); + + function unpack(data) { + var result = new Uint8Array(data.length); + for (var i = 0; i < data.length; ++i) { + var ch = data.charCodeAt(i); + result[i] = ch > 96 ? ch - 97 : ch > 64 ? ch - 39 : ch + 4; + } + var write = 0; + for (var i = 0; i < data.length; ++i) { + result[write++] = (result[i] < 60) ? wasmpack[result[i]] : (result[i] - 60) * 64 + result[++i]; + } + return result.buffer.slice(0, write); + } + + function decode(fun, target, count, size, source, filter) { + var sbrk = instance.exports.sbrk; + var count4 = (count + 3) & ~3; + var tp = sbrk(count4 * size); + var sp = sbrk(source.length); + var heap = new Uint8Array(instance.exports.memory.buffer); + heap.set(source, sp); + var res = fun(tp, count, size, sp, source.length); + if (res == 0 && filter) { + filter(tp, count4, size); + } + target.set(heap.subarray(tp, tp + count * size)); + sbrk(tp - sbrk(0)); + if (res != 0) { + throw new Error("Malformed buffer data: " + res); + } + } + + var filters = { + NONE: "", + OCTAHEDRAL: "meshopt_decodeFilterOct", + QUATERNION: "meshopt_decodeFilterQuat", + EXPONENTIAL: "meshopt_decodeFilterExp", + }; + + var decoders = { + ATTRIBUTES: "meshopt_decodeVertexBuffer", + TRIANGLES: "meshopt_decodeIndexBuffer", + INDICES: "meshopt_decodeIndexSequence", + }; + + var workers = []; + var requestId = 0; + + function createWorker(url) { + var worker = { + object: new Worker(url), + pending: 0, + requests: {} + }; + + worker.object.onmessage = function(event) { + var data = event.data; + + worker.pending -= data.count; + worker.requests[data.id][data.action](data.value); + + delete worker.requests[data.id]; + }; + + return worker; + } + + function initWorkers(count) { + var source = + "var instance; var ready = WebAssembly.instantiate(new Uint8Array([" + new Uint8Array(unpack(wasm)) + "]), {})" + + ".then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });" + + "self.onmessage = workerProcess;" + + decode.toString() + workerProcess.toString(); + + var blob = new Blob([source], {type: 'text/javascript'}); + var url = URL.createObjectURL(blob); + + for (var i = 0; i < count; ++i) { + workers[i] = createWorker(url); + } + + URL.revokeObjectURL(url); + } + + function decodeWorker(count, size, source, mode, filter) { + var worker = workers[0]; + + for (var i = 1; i < workers.length; ++i) { + if (workers[i].pending < worker.pending) { + worker = workers[i]; + } + } + + return new Promise(function (resolve, reject) { + var data = new Uint8Array(source); + var id = requestId++; + + worker.pending += count; + worker.requests[id] = { resolve: resolve, reject: reject }; + worker.object.postMessage({ id: id, count: count, size: size, source: data, mode: mode, filter: filter }, [ data.buffer ]); + }); + } + + function workerProcess(event) { + ready.then(function() { + var data = event.data; + try { + var target = new Uint8Array(data.count * data.size); + decode(instance.exports[data.mode], target, data.count, data.size, data.source, instance.exports[data.filter]); + self.postMessage({ id: data.id, count: data.count, action: "resolve", value: target }, [ target.buffer ]); + } catch (error) { + self.postMessage({ id: data.id, count: data.count, action: "reject", value: error }); + } + }); + } + + return { + ready: ready, + supported: true, + useWorkers: function(count) { + initWorkers(count); + }, + decodeVertexBuffer: function(target, count, size, source, filter) { + decode(instance.exports.meshopt_decodeVertexBuffer, target, count, size, source, instance.exports[filters[filter]]); + }, + decodeIndexBuffer: function(target, count, size, source) { + decode(instance.exports.meshopt_decodeIndexBuffer, target, count, size, source); + }, + decodeIndexSequence: function(target, count, size, source) { + decode(instance.exports.meshopt_decodeIndexSequence, target, count, size, source); + }, + decodeGltfBuffer: function(target, count, size, source, mode, filter) { + decode(instance.exports[decoders[mode]], target, count, size, source, instance.exports[filters[filter]]); + }, + decodeGltfBufferAsync: function(count, size, source, mode, filter) { + if (workers.length > 0) { + return decodeWorker(count, size, source, decoders[mode], filters[filter]); + } + + return ready.then(function() { + var target = new Uint8Array(count * size); + decode(instance.exports[decoders[mode]], target, count, size, source, instance.exports[filters[filter]]); + return target; + }); + } + }; +})(); + +export { MeshoptDecoder }; diff --git a/node_modules/three/examples/jsm/libs/mikktspace.module.js b/node_modules/three/examples/jsm/libs/mikktspace.module.js new file mode 100644 index 0000000..0a1baaa --- /dev/null +++ b/node_modules/three/examples/jsm/libs/mikktspace.module.js @@ -0,0 +1,128 @@ +const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; + +let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); + +cachedTextDecoder.decode(); + +let cachegetUint8Memory0 = null; +function getUint8Memory0() { + if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) { + cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer); + } + return cachegetUint8Memory0; +} + +function getStringFromWasm0(ptr, len) { + return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); +} + +const heap = new Array(32).fill(undefined); + +heap.push(undefined, null, true, false); + +let heap_next = heap.length; + +function addHeapObject(obj) { + if (heap_next === heap.length) heap.push(heap.length + 1); + const idx = heap_next; + heap_next = heap[idx]; + + heap[idx] = obj; + return idx; +} + +function getObject(idx) { return heap[idx]; } + +function dropObject(idx) { + if (idx < 36) return; + heap[idx] = heap_next; + heap_next = idx; +} + +function takeObject(idx) { + const ret = getObject(idx); + dropObject(idx); + return ret; +} + +let cachegetFloat32Memory0 = null; +function getFloat32Memory0() { + if (cachegetFloat32Memory0 === null || cachegetFloat32Memory0.buffer !== wasm.memory.buffer) { + cachegetFloat32Memory0 = new Float32Array(wasm.memory.buffer); + } + return cachegetFloat32Memory0; +} + +let WASM_VECTOR_LEN = 0; + +function passArrayF32ToWasm0(arg, malloc) { + const ptr = malloc(arg.length * 4); + getFloat32Memory0().set(arg, ptr / 4); + WASM_VECTOR_LEN = arg.length; + return ptr; +} + +let cachegetInt32Memory0 = null; +function getInt32Memory0() { + if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) { + cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer); + } + return cachegetInt32Memory0; +} + +function getArrayF32FromWasm0(ptr, len) { + return getFloat32Memory0().subarray(ptr / 4, ptr / 4 + len); +} +/** +* Generates vertex tangents for the given position/normal/texcoord attributes. +* @param {Float32Array} position +* @param {Float32Array} normal +* @param {Float32Array} texcoord +* @returns {Float32Array} +*/ +export function generateTangents(position, normal, texcoord) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + var ptr0 = passArrayF32ToWasm0(position, wasm.__wbindgen_malloc); + var len0 = WASM_VECTOR_LEN; + var ptr1 = passArrayF32ToWasm0(normal, wasm.__wbindgen_malloc); + var len1 = WASM_VECTOR_LEN; + var ptr2 = passArrayF32ToWasm0(texcoord, wasm.__wbindgen_malloc); + var len2 = WASM_VECTOR_LEN; + wasm.generateTangents(retptr, ptr0, len0, ptr1, len1, ptr2, len2); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var v3 = getArrayF32FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 4); + return v3; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } +} + +export const __wbindgen_string_new = function(arg0, arg1) { + var ret = getStringFromWasm0(arg0, arg1); + return addHeapObject(ret); +}; + +export const __wbindgen_rethrow = function(arg0) { + throw takeObject(arg0); +}; + +// + +const wasmDataURI = 'data:application/octet-stream;base64,AGFzbQEAAAABiQEWYAN/f38AYAJ/fwBgAn9/AX9gAX8AYAN/f38Bf2AEf39/fwBgAX8Bf2AFf39/f38Bf2ABfwF+YAV/f39/fwBgBH9/f38Bf2ACf38BfWAAAGAHf39/f39/fwBgBX9/fX1/AGACfn8Bf2ABfQF/YAN9fX0Bf2ADf39/AX5gAX8BfWAAAXxgAXwBfAJiAhkuL21pa2t0c3BhY2VfbW9kdWxlX2JnLmpzFV9fd2JpbmRnZW5fc3RyaW5nX25ldwACGS4vbWlra3RzcGFjZV9tb2R1bGVfYmcuanMSX193YmluZGdlbl9yZXRocm93AAMDeXgGAwkABQQCFAcCEwkVAgULBwUPAAAFAAAAAAABBQ4ADQABAQUAAAsBAAAABQIFAgUFAwEBAQEAAQUEERIHAAIAAAABAAAEAAMDAQADAAoGBgMDAwMDAwMBAgMBAwMBAQEKAQEEAgIAAQAMAgIGEAECBgIGCAgIAwEEBQFwASEhBQMBABEGCQF/AUGAgMAACwdlBQZtZW1vcnkCABBnZW5lcmF0ZVRhbmdlbnRzACEfX193YmluZGdlbl9hZGRfdG9fc3RhY2tfcG9pbnRlcgBuEV9fd2JpbmRnZW5fbWFsbG9jAFAPX193YmluZGdlbl9mcmVlAGQJJgEAQQELIHg6cXJ4MnN0eHhEYHh1eXhlD0B3Xh0kS2lddnVtbHh3CvXrAXiUUQQqfwN+Cn0BfCMAQeAGayIBJAAgACgCCCIIQQluIRMQCSE4AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAhBCU8EQCABQbgDaiATQQNsIgpBARA4IAEgCjYCyAMgASABKQO4AzcDwAMgAUHgA2pByAAQWhogAUGYBmogAUHgA2pByAAQTiABQdADaiABQZgGaiATEEUgASgC0AMhDiABKALYAyEMIAFBwANqKAIAIQMCQAJAAkACQAJAAkACQCAAKAIIQQlPBEAgASgCyAMhBSAOQcYAaiEEA0AgAiAMRg0CIARBAjoAACAEQX5qQYACOwEAIARBemogCTYCACAEQXJqIAI2AgAgAkEAEGYhBiAJIAVPDQMgAyAGNgIAIAJBARBmIQYgCUEBaiAFTw0EIANBBGogBjYCACACQQIQZiEGIAlBAmogBU8NBSADQQhqIAY2AgAgBEHIAGohBCADQQxqIQMgCUEDaiEJIAJBAWoiAiAAKAIIQQluSQ0ACwsgOLYhNiATQX9qISUgDkE8aiECQQAhBANAIAQgDEYNBSACQQA2AgAgAkHIAGohAiATIARBAWoiBEcNAAsgAUHAA2ooAgAhBSABQbADakEAEGEgAUG4BWogACABKAKwAyABKAK0AxAxIAEqAsAFIS8gASoCvAUhMiABKgK4BSE0IApBAk8NBSAvITAgMiEuIDQhMQwGCyAMIAxB7IXAABA/AAsgCSAFQfyFwAAQPwALIAlBAWogBUGMhsAAED8ACyAJQQJqIAVBnIbAABA/AAsgDCAMQayGwAAQPwALIAVBBGohAiAKQX9qIQQgNCExIDIhLiAvITADQCABQagDaiACKAIAEGEgAUGYBmogACABKAKoAyABKAKsAxAxAkAgNCABKgKYBiIzXgRAIDMhNAwBCyAxIDNdQQFzDQAgMyExCwJAIDIgASoCnAYiM14EQCAzITIMAQsgLiAzXUEBcw0AIDMhLgsCQCAvIAEqAqAGIjNeBEAgMyEvDAELIDAgM11BAXMNACAzITALIAJBBGohAiAEQX9qIgQNAAsgASAvOALABSABIDI4ArwFIAEgNDgCuAULIAEgMDgC6AMgASAuOALkAyABIDE4AuADIAFBoAZqIAFBwAVqKAIANgIAIAEgASkDuAU3A5gGIAFBiAZqIAFB4ANqIAFBmAZqEBVBASEGAn8gAUG4BWpBBHIgASoCjAYiLyABKgKIBiIyXkEBcyAvIAEqApAGIi9eRXJFDQAaQQEhCyAvIDJeQQFzBEBBACEGIDEhLiABQbgFagwBC0EAIQsgMCEuQQAhBiABQcAFagsqAgAhMCABQaADaiAKQQEQOCABIAo2AtAFIAEgASkDoAM3A8gFIAFBmANqQYAQQQEQOCABQYAQNgLgBSABIAEpA5gDNwPYBSABQZADakGAEEEBEDggAUGAEDYC8AUgASABKQOQAzcD6AUgAUGIA2pBgBBBARA4IAFBgBA2AoAGIAEgASkDiAM3A/gFIAhBCU8EQCABQZgGakEAQQRBCCAGGyALG2ohByAFIQIgCiEDA0AgAUGAA2ogAigCABBhIAFBmAZqIAAgASgCgAMgASgChAMQMSAwIC4gByoCABA8IQQgAUHoBWooAgAgASgC8AUiESAETQ0WIARBAnRqIgQgBCgCAEEBajYCACACQQRqIQIgA0F/aiIDDQALCyABQdgFaigCACABKALgBUUNFUEAIQJBADYCAEEBIQQDQCABQfgCaiABQdgFahBjIAEoAvwCIgMgBEF/aiIHTQ0UIAEoAvgCIAJqKAIAIQMgAUHwAmogAUHoBWoQYyABKAL0AiINIAdNDRMgASgC8AIgAmooAgAhByABQdgFaigCACENIAEoAuAFIhEgBE0NEiACIA1qQQRqIAMgB2o2AgAgAkEEaiECIARBAWoiBEGAEEcNAAsgCEEJTwRAQQAhBCABQZgGakEAQQRBCCAGGyALG2ohCCAFIQMDQCABQegCaiADKAIAEGEgAUGYBmogACABKALoAiABKALsAhAxIDAgLiAIKgIAEDwhAiABQeACaiABQdgFahBjIAEoAuQCIgYgAk0NEiABQcgFaigCACABKALQBSINIAJBAnQiBiABKALgAmooAgAiC00NESABQdgCaiABQfgFahBjIAEoAtwCIg0gAk0NECALQQJ0aiABKALYAiAGaigCAEECdGogBDYCACABQfgFaigCACELIAEoAoAGIgcgAk0NDyAGIAtqIgIgAigCAEEBajYCACADQQRqIQMgCiAEQQFqIgRHDQALCyABQdACaiABQegFahBjIAEoAtQCRQ0MIAEoAtACKAIAIQNBBCECQQEhBANAIAFByAJqIAFB6AVqEGMgASgCzAIiCiAETQ0MIAMgASgCyAIgAmooAgBJBEAgAUHAAmogAUHoBWoQYyABKALEAiIDIARNDQwgASgCwAIgAmooAgAhAwsgAkEEaiECIARBAWoiBEGAEEcNAAsgAUHgA2oiAkIANwIAIAJBCGpCADcCACABQaAGaiABQegDaikDADcDACABIAEpA+ADNwOYBiABQYgGaiABQZgGaiADEEEgASgCiAYhCiABKAKQBiELQQAhBgNAIAFBuAJqIAFB2AVqEGMgASgCvAIiAyAGTQ0KIAFByAVqKAIAIQIgASgC0AUiBCAGQQJ0IgggASgCuAJqKAIAIgNNDQkgAUGwAmogAUHoBWoQYyABKAK0AiIEIAZNDQggASgCsAIgCGooAgAiCEECTwRAIAIgA0ECdGohBEEAIQMgCiECA0AgAUGoAmogBSAEKAIAIgdBAnRqKAIAEGEgAUGYBmogACABKAKoAiABKAKsAhAxIAMgC0YNCSACIAEoApgGNgIAIAJBBGogASgCnAY2AgAgASgCoAYhDSACQQxqIAc2AgAgAkEIaiANNgIAIARBBGohBCACQRBqIQIgCCADQQFqIgNHDQALIAUgCiAAQQAgCEF/ahAECyAGQQFqIgZBgBBHDQALIBNBASATQQFLGyEFIA5BPGohAyABQYgGahBSIAFB+AVqKAIAGiABQfgFahBWIAFB6AVqKAIAGiABQegFahBWIAFB2AVqKAIAGiABQdgFahBWIAFByAVqKAIAGiABQcgFahBWQQAhAkEAIQRBACEGQQAhBwNAIAFBoAJqIAFBwANqEGMgASgCpAIiCiAETQ0GIAEoAqACIAJqKAIAIQogAUGYAmogAUHAA2oQYyABKAKcAiILIARBAWpNDQUgASgCmAIgAmpBBGooAgAhCyABQZACaiABQcADahBjIAEoApQCIgggBEECak0NBCABKAKQAiACakEIaigCACEIIAFBiAJqIAoQYSABQYgGaiAAIAEoAogCIAEoAowCEDEgAUGAAmogCxBhIAFB4ANqIAAgASgCgAIgASgChAIQMSABQfgBaiAIEGEgAUGYBmogACABKAL4ASABKAL8ARAxAkACQCABQYgGaiABQeADahALDQAgAUGIBmogAUGYBmoQCw0AIAFB4ANqIAFBmAZqEAtFDQELIAwgBk0NBCADIAMoAgBBAXI2AgAgB0EBaiEHCyACQQxqIQIgBEEDaiEEIANByABqIQMgBSAGQQFqIgZHDQALIA4gAUHAA2ooAgAgEyAHayIKIBMQECABQcADaigCACELAkACQCAKRQRAQX8hBgwBC0EAIQYDQCAOIAZByABsaiIDQn83AgAgA0EIakF/NgIAIANBDGpCADcCACADQRRqQQA2AgAgA0E8aiADQRhqIQIgAygCPCEEQQMhAwNAIAJCADcCACACQRhqQgA3AgAgAkEQakIANwIAIAJBCGpCADcCACAEQQRyIQQgA0F/aiIDDQALIAQ2AgAgBkEBaiIGIApHDQALIAFBpAZqIQYgAUHsA2ohDEEAIQUDQCABQfABaiALIAVBDGxqIgMoAgAQYSABQagFaiAAIAEoAvABIAEoAvQBEDEgAUHoAWogA0EEaiICKAIAEGEgAUG4BWogACABKALoASABKALsARAxIAFB4AFqIANBCGoiBCgCABBhIAFByAVqIAAgASgC4AEgASgC5AEQMSABQdgBaiADKAIAEGEgACABKALYASABKALcARA9ISsgAUHQAWogAigCABBhIAAgASgC0AEgASgC1AEQPSEsIAFByAFqIAQoAgAQYSAAIAEoAsgBIAEoAswBED0hLSABQegDaiIDIAFBwAVqKAIANgIAIAEgASkDuAU3A+ADIAFBoAZqIgQgAUGwBWoiAigCADYCACABIAEpA6gFNwOYBiABQdgFaiABQeADaiABQZgGahAVIAMgAUHQBWooAgA2AgAgASABKQPIBTcD4AMgBCACKAIANgIAIAEgASkDqAU3A5gGIAFB6AVqIAFB4ANqIAFBmAZqEBUgAyABQeAFaiIIKAIANgIAIAEgASkD2AU3A+ADIAFBwAFqIAFB4ANqIAwQaCAtQiCIp74gK0IgiKe+IjCTIS4gASgCwAEiAiABKALEASIHRwRAA0AgAiAuIAIqAgCUOAIAIAcgAkEEaiICRw0ACwsgLEIgiKe+IDCTITAgBCABQfAFaiIHKAIANgIAIAEgASkD6AU3A5gGIAFBuAFqIAFBmAZqIAYQaCABKAK4ASICIAEoArwBIg1HBEADQCACIDAgAioCAJQ4AgAgDSACQQRqIgJHDQALCyAtp74gK6e+Ii+TITEgAUH4BWogAUHgA2ogAUGYBmoQFSADIAgoAgA2AgAgASABKQPYBTcD4AMgAUGwAWogAUHgA2ogDBBoIAEoArABIgIgASgCtAEiA0cEQCAxjCEyA0AgAiACKgIAIDKUOAIAIAMgAkEEaiICRw0ACwsgLKe+IC+TIS8gBCAHKAIANgIAIAEgASkD6AU3A5gGIAFBqAFqIAFBmAZqIAYQaCABKAKoASICIAEoAqwBIgNHBEADQCACIC8gAioCAJQ4AgAgAyACQQRqIgJHDQALCyABQYgGaiABQeADaiABQZgGahAWIA4gBUHIAGxqIgMgAygCPCAvIC6UIDAgMZSTIi5DAAAAAF5BA3RyNgI8AkAgLhBvRQ0AIAFB+AVqEAwgAUGIBmoQDCEvQwAAgD9DAACAvyADQTxqIggoAgBBCHEbITCRIjEQbwRAIAQgAUGABmooAgA2AgAgASABKQP4BTcDmAYgAUGgAWogAUGYBmogBhBoIAEoAqABIgIgASgCpAEiB0cEQCAwIDGVITIDQCACIDIgAioCAJQ4AgAgByACQQRqIgJHDQALCyADIAEpA5gGNwIYIANBIGogBCgCADYCAAsgL5EiLxBvBEAgBCABQZAGaigCADYCACABIAEpA4gGNwOYBiABQZgBaiABQZgGaiAGEGggASgCmAEiAiABKAKcASIHRwRAIDAgL5UhMANAIAIgMCACKgIAlDgCACAHIAJBBGoiAkcNAAsLIAMgASkDmAY3AiQgA0EsaiAEKAIANgIACyADIC8gLosiLpU4AjQgAyAxIC6VIi44AjAgLhBvRQ0AIANBNGoqAgAQb0UNACAIIAgoAgBBe3E2AgALIAVBAWoiBSAKRw0ACyAKQX9qIgZFDQELQQAhAgNAAn8gAkEBaiIDIA4gAkHIAGxqIgUoAjggBUGAAWooAgBHDQAaIA4gA0HIAGxqKAI8IgQgBSgCPCIFckEBcSAFQQhxQQN2IARBCHFBA3ZGckUEQAJAAkAgBEEEcQ0AIAAgCyACQQxsahAoIAAgCyADQQxsahAoYEEBc0UNACADIQUgAiEDDAELIAIhBQsgDiADQcgAbGoiAyADKAI8QXdxIgQ2AjwgAyAOIAVByABsaigCPEEIcSAEcjYCPAsgAkECagsiAiAGSQ0ACwsgAUHgA2oiA0EANgIIIANCADcCACABQaAGaiIDIAFB6ANqIgIoAgA2AgAgASABKQPgAzcDmAYgAUGIBmogAUGYBmogCkEDbCIbEEIgDiABKAKIBiALIAoQBiABQYgGahBVIAFB4ANqIgVCADcCACAFQQVqQgA3AAAgAyACKQMANwMAIAEgASkD4AM3A5gGIAFBqARqIAFBmAZqIBsQQSABQZABaiAbQQEQOCABIBs2AsAEIAEgASkDkAE3A7gEIAEoAtADIgsgASgCqAQiDiABQbgEaigCACABQcADaigCACAKEBIhBiABQeADahBKIAEoAoAEIQMgAS0AhAQhAiABQbAGakKAgICAgICAwD83AwAgASACOgC8BiABIAM2ArgGIAFCgICAgICAgMA/NwOoBiABQoCAgICAgIDAPzcDoAYgAUKAgID8AzcDmAYgAUHIBGogAUGYBmogCRBGIAEoAsgEIRQgASgC0AQhIiABQcADaigCACEcAkAgBkEBSA0AQQAhAiAOIQQgBiEDA0AgBCgCACIFIAIgAiAFSRshAiAEQRBqIQQgA0F/aiIDDQALIAJFDQAgAUHgA2oQSiABQZgGaiABQeADakEoEE4gAUHYBGogAUGYBmogAhBGIAFB4ANqIgNCgICAgMAANwIAIANBCGpCADcCACABQaAGaiIDIAFB6ANqKQMANwMAIAEgASkD4AM3A5gGIAFB6ARqIAFBmAZqIAIQQyABQYgBaiACQQEQOCABIAI2AoAFIAEgASkDiAE3A/gEIAFBlAZqIRkgAUGoBmohFSABQaQGaiEeIAFB4ANqQQRyIREDQAJAIA4gI0EEdGoiDSgCAEEBSA0AIA1BDGohJiANQQhqIScgDUEEaiEkQQAhH0EAIQwCQAJAAkACQANAICQoAgAgH0ECdGooAgAhAiABQgA3A+gDIAFCgICAgMAANwPgAyABQQA2ApAFIAFCADcDiAUgAUEANgKgBSABQgA3A5gFIAFBADYCsAUgAUIANwOoBSABQYABaiAcAn8gDSALIAJByABsaiIIKAIMRgRAQQEhIEEADAELIA0gCEEQaigCAEYEQEEBISBBAQwBC0ECQX8gCEEUaigCACANRiIgGwsiKCACQQNsakECdGooAgAQYSABQYgFaiAAIAEoAoABIAEoAoQBEC8gAUGQBmoiBCAIQSBqKAIANgIAIAEgCCkCGDcDiAYgAUGIBWogCEEYahARIS4gAyABQZAFaiIQKAIANgIAIAEgASkDiAU3A5gGIAFB+ABqIAFBmAZqIB4QaCABKAJ4IgIgASgCfCIFRwRAA0AgAiAuIAIqAgCUOAIAIAUgAkEEaiICRw0ACwsgAUGYBWogAUGIBmogAUGYBmoQFSAEIAhBLGooAgA2AgAgASAIKQIkNwOIBiABQYgFaiAIQSRqEBEhLiADIBAoAgA2AgAgASABKQOIBTcDmAYgAUHwAGogAUGYBmogHhBoIAEoAnAiAiABKAJ0IgVHBEADQCACIC4gAioCAJQ4AgAgBSACQQRqIgJHDQALCyABQagFaiABQYgGaiABQZgGahAVIAMgAUGgBWoiAigCADYCACABIAEpA5gFNwOYBiABQZgGahBRBEAgAyACKAIANgIAIAEgASkDmAU3A5gGIAFBmAVqIAFBmAZqECMLIAMgAUGwBWoiAigCADYCACABIAEpA6gFNwOYBiABQZgGahBRBEAgAyACKAIANgIAIAEgASkDqAU3A5gGIAFBqAVqIAFBmAZqECMLQQAhBUEAIQkCQAJAAkACQAJAAkACQCANKAIAQQFIDQAgCCgCOCEWIAhBPGohGkEAIQcDQCALICQoAgAgB0ECdGooAgAiEkHIAGxqIg8oAjghFyAEIA9BIGooAgA2AgAgASAPKQIYNwOIBiABQYgFaiAPQRhqEBEhLiADIBAoAgA2AgAgASABKQOIBTcDmAYgAUHoAGogAUGYBmogHhBoIAEoAmgiAiABKAJsIhhHBEADQCACIC4gAioCAJQ4AgAgGCACQQRqIgJHDQALCyABQegFaiABQYgGaiABQZgGahAVIAQgD0EsaigCADYCACABIA8pAiQ3A4gGIAFBiAVqIA9BJGoQESEuIAMgECgCADYCACABIAEpA4gFNwOYBiABQeAAaiABQZgGaiAeEGggASgCYCICIAEoAmQiGEcEQANAIAIgLiACKgIAlDgCACAYIAJBBGoiAkcNAAsLIAFB+AVqIAFBiAZqIAFBmAZqEBUgAyABQfAFaiICKAIANgIAIAEgASkD6AU3A5gGIAFBmAZqEFEEQCADIAIoAgA2AgAgASABKQPoBTcDmAYgAUHoBWogAUGYBmoQIwsgAyABQYAGaiICKAIANgIAIAEgASkD+AU3A5gGIAFBmAZqEFEEQCADIAIoAgA2AgAgASABKQP4BTcDmAYgAUH4BWogAUGYBmoQIwsgDygCPCAaKAIAckEEcSAWIBdGckVBACABQZgFaiABQegFahARIDZeQQFzIAFBqAVqIAFB+AVqEBEgNl5BAXNyG0UEQCABQfgEaigCACABKAKABSIPIAlNDQMgCUECdGogEjYCACAJQQFqIQkLIAdBAWoiByANKAIASA0ACyAJQQFNDQAgAUH4BGooAgBBACAJQX9qQcrLgRMQHgsgASAJNgLgAyABQZgGaiABQfgEahA5IBEoAgAaIBEQViARQQhqIAMoAgA2AgAgESABKQOYBjcCACAMBEADQCABKALwBCICIAVNDQMgBSABQeADaiABKALoBCAFQQR0ahAwIgJBAXNqIQUgAkVBACAFIAxJGw0ACyACDQYLIAEoAvAEIgIgDE0NAiAMQQR0IgIgASgC6ARqIAk2AgAgAUGYBmogERA5IAEoAvAEIgcgDE0NAyABKALoBCACaiICQQRqIgcoAgAaIAcQViACQQxqIAMoAgA2AgAgAiABKQOYBjcCBCARKAIAISkgJygCACEaIAFBmAZqQSUQWhogCUEBSARAQwAAAAAhLgwFC0EAIQdDAAAAACEuA0AgCyApIAdBAnRqKAIAIgJByABsaiIPLQA8QQRxRQRAQQAhEiABQQA2AsAFIAFCADcDuAUgAUEANgLQBSABQgA3A8gFIAFBADYC4AUgAUIANwPYBQJ/IBogHCACQQNsIhdBAnRqIgIoAgBGBEBBACEQQQEMAQtBASESQQEhEEEBIAJBBGooAgAgGkYNABpBAkF/IAJBCGooAgAiAiAaRiISGyEQIAIgGkcLIR0gAUHYAGogHCAQIBdqQQJ0aiIqKAIAEGEgAUG4BWogACABKAJYIAEoAlwQLyABQYAGaiIWIA9BIGooAgA2AgAgASAPKQIYNwP4BSABQbgFaiAPQRhqEBEhMCAEIAFBwAVqIhgoAgA2AgAgASABKQO4BTcDiAYgAUHQAGogAUGIBmogGRBoIAEoAlAiAiABKAJUIiFHBEADQCACIDAgAioCAJQ4AgAgISACQQRqIgJHDQALCyABQegFaiABQfgFaiABQYgGahAVIAEqAugFITMgASoC7AUhLyABKgLwBSEyIBYgD0EsaigCADYCACABIA8pAiQ3A/gFIAFBuAVqIA9BJGoQESEwIAQgGCgCADYCACABIAEpA7gFNwOIBiABQcgAaiABQYgGaiAZEGggASgCSCICIAEoAkwiIUcEQANAIAIgMCACKgIAlDgCACAhIAJBBGoiAkcNAAsLIAFB6AVqIAFB+AVqIAFBiAZqEBUgASoC6AUhNCABKgLsBSEwIAEqAvAFITEgASAyOAKQBiABIC84AowGIAEgMzgCiAYgAUGIBmoQUQRAIAEgMjgCkAYgASAvOAKMBiABIDM4AogGIAFB+AVqIAFBiAZqECMgASoC+AUhMyABKgKABiEyIAEqAvwFIS8LIAEgMTgCkAYgASAwOAKMBiABIDQ4AogGIAFBiAZqEFEEQCABIDE4ApAGIAEgMDgCjAYgASA0OAKIBiABQfgFaiABQYgGahAjIAEqAvgFITQgASoCgAYhMSABKgL8BSEwCyAcIBBBAWpBACAdGyAXakECdGooAgAhHSAqKAIAIQIgAUFAayAcIBBBf2pBAiASGyAXakECdGooAgAQYSABQYgGaiAAIAEoAkAgASgCRBAxIAEpA4gGISsgASgCkAYhFyABQThqIAIQYSABQYgGaiAAIAEoAjggASgCPBAxIAEoAogGIQIgASgCjAYhECABKAKQBiESIAFBMGogHRBhIAFBiAZqIAAgASgCMCABKAI0EDEgASkDiAYhLCABKAKQBiEdIAEgFzYCgAYgASArNwP4BSABIBI2ApAGIAEgEDYCjAYgASACNgKIBiABQcgFaiABQfgFaiABQYgGahAVIAEgHTYCgAYgASAsNwP4BSABIBI2ApAGIAEgEDYCjAYgASACNgKIBiABQdgFaiABQfgFaiABQYgGahAVIBYgAUHQBWoiECgCADYCACABIAEpA8gFNwP4BSABQbgFaiABQcgFahARITUgBCAYKAIANgIAIAEgASkDuAU3A4gGIAFBKGogAUGIBmogGRBoIAEoAigiAiABKAIsIhJHBEADQCACIDUgAioCAJQ4AgAgEiACQQRqIgJHDQALCyABQcgFaiABQfgFaiABQYgGahAVIAQgECgCADYCACABIAEpA8gFNwOIBiABQYgGahBRBEAgBCAQKAIANgIAIAEgASkDyAU3A4gGIAFByAVqIAFBiAZqECMLIBYgAUHgBWoiECgCADYCACABIAEpA9gFNwP4BSABQbgFaiABQdgFahARITUgBCAYKAIANgIAIAEgASkDuAU3A4gGIAFBIGogAUGIBmogGRBoIAEoAiAiAiABKAIkIhJHBEADQCACIDUgAioCAJQ4AgAgEiACQQRqIgJHDQALCyABQdgFaiABQfgFaiABQYgGahAVIAQgECgCADYCACABIAEpA9gFNwOIBiABQYgGahBRBEAgBCAQKAIANgIAIAEgASkD2AU3A4gGIAFB2AVqIAFBiAZqECMLQwAAgD8gAUHIBWogAUHYBWoQESI1QwAAgL+XIDVDAACAP14buxAOIA8qAjQhNSAPKgIwITcgFiADKAIANgIAIAEgASkDmAY3A/gFIAEgMjgCkAYgASAvOAKMBiABIDM4AogGIAFBGGogAUGIBmogGRBotiEvIAEoAhgiAiABKAIcIg9HBEADQCACIAIqAgAgL5Q4AgAgDyACQQRqIgJHDQALCyABQZgGaiABQfgFaiABQYgGahAWIBYgFUEIaiIPKAIANgIAIAEgFSkCADcD+AUgASAxOAKQBiABIDA4AowGIAEgNDgCiAYgAUEQaiABQYgGaiAZEGggASgCECICIAEoAhQiEEcEQANAIAIgAioCACAvlDgCACAQIAJBBGoiAkcNAAsLIAFB6AVqIAFB+AVqIAFBiAZqEBYgDyABQfAFaigCADYCACAVIAEpA+gFNwIAIAEgNyAvlCABKgKkBpI4AqQGIAEgNSAvlCABKgK0BpI4ArQGIC4gL5IhLgsgCSAHQQFqIgdHDQALDAQLIAkgD0HcgsAAED8ACyAFIAJB7ILAABA/AAsgDCACQfyCwAAQPwALIAwgB0GMg8AAED8ACyAEIAMoAgA2AgAgASABKQOYBjcDiAYgAUGIBmoQUQRAIAQgAygCADYCACABIAEpA5gGNwOIBiABQZgGaiABQYgGahAjCyAEIBVBCGoiAigCADYCACABIBUpAgA3A4gGIAFBiAZqEFEEQCAEIAIoAgA2AgAgASAVKQIANwOIBiABQfgFaiABQYgGahAjIAIgAUGABmooAgA2AgAgFSABKQP4BTcCAAsgLkMAAAAAXkEBc0UEQCABIAEqAqQGIC6VOAKkBiABIAEqArQGIC6VOAK0BgsgASgC4AQiAiAMTQ0DIAEoAtgEIAxBKGxqIAFBmAZqQSgQTiAMQQFqIQwLICAEQCAIKAJAIAggKGpBxABqLQAAaiICICJPDQICfyAUIAJBKGxqIgIoAiBBAUcEQCABKALgBCIEIAVNDQYgAiABKALYBCAFQShsakEoEDsaQQEMAQsgASgC4AQiBCAFTQ0GIAFBmAZqIAIgASgC2AQgBUEobGoQBSACIAFBmAZqQSgQTkECCyEFIAJBIGogBTYCACACICYtAAA6ACQgESgCABogERBWIB9BAWoiHyANKAIASA0BDAYLC0F/QQRBrIPAABA/AAsgAiAiQbyDwAAQPwALIAwgAkGcg8AAED8ACyAFIARBzIPAABA/AAsgBSAEQdyDwAAQPwALICNBAWoiIyAGRw0ACyABQfgEaigCABogAUH4BGoQViABQegEahBJIAFB6ARqEFIgAUHYBGoQVCABKALIBCEUIAEoAtADIQsLIAFBwANqKAIAIQUgCiATSARAIBtBAUghCSAKIQMDQCALIANByABsaiIELQA8QQJxRQRAIANBA2whDCAEQUBrIQhBACEGA0ACQCAJDQAgBSAGIAxqQQJ0aigCACEOQQAhAgNAAkAgAiAOIAUgAkECdGooAgAiB0ciDWohAiAHIA5GDQAgAiAbSA0BCwsgDQ0AIBQgCCgCACAEIAZqQcQAai0AAGpBKGxqIBQgCyACQQNuIg5ByABsaiIHKAJAIAcgAiAOQQNsa2pBxABqLQAAakEobGpBKBA7GgsgBkEBaiIGQQNHDQALCyADICVGIANBAWohA0UNAAsLIApBAU4EQCALQcQAaiEEQQAhBQNAAkAgCyAFQcgAbGoiAy0APEECcUUNACABQQA2AugDIAFCADcD4AMgAUEIaiADKAI4IgYCf0EBQQEgA0HFAGotAABBH3F0QQEgAy0AREEfcXRyQQEgA0HGAGotAABBH3F0ciICQQJxRQ0AGkECIAJBBHFFDQAaQQBBAyACQQhxGwsiDhBmEGEgAUGYBmogACABKAIIIAEoAgwQMSABQegDaiABQaAGaigCADYCACABIAEpA5gGNwPgAyADQUBrIQNBACECA0AgASAGIAIgBGotAAAiCRBmEGEgAUGYBmogACABKAIAIAEoAgQQMSABQZgGaiABQeADahALBEAgFCADKAIAIgMgDmpBKGxqIBQgAyAJakEobGpBKBA7GgwCCyACQQFqIgJBA0cNAAsLIARByABqIQQgBUEBaiIFIApHDQALCyABKALQBCEFQQAhBkEAIQkDQEEAIAUgCWsiAyADIAVLGyEKIBQgCUEobGohDkEAIQNBACEEA0AgBCAKRg0DIAMgDmoiAikCACErIAEgAkEIaigCADYC6AMgASArNwLgAyAAIAFB4ANqIAJBDGoqAgAgAkEcaioCACACQSRqLQAAEB8gBEEBaiEEIANBKGoiA0H4AEcNAAsgBCAJaiEJIAZBAWoiBiATRw0ACyABQcgEahBUIAFBuARqKAIAGiABQbgEahBWIAFBqARqEFIgAUHQA2oQUyABQcADaigCABogAUHAA2oQVkEBIQILIAFB4AZqJAAgAg8LIAQgCWogBUHMgsAAED8ACyAGIAxBvILAABA/AAsgBEECaiAIQayCwAAQPwALIARBAWogC0GcgsAAED8ACyAEIApBjILAABA/AAsgCyALQdyFwAAQPwALIAYgBEHMhcAAED8ACyADIARBvIXAABA/AAsgBiADQayFwAAQPwALIAQgA0GchcAAED8ACyAEIApBjIXAABA/AAtBAEEAQfyEwAAQPwALIAIgB0HshMAAED8ACyACIA1B3ITAABA/AAsgCyANQcyEwAAQPwALIAIgBkG8hMAAED8ACyAEIBFBrITAABA/AAsgBEF/aiANQZyEwAAQPwALIARBf2ogA0GMhMAAED8ACyAEIBFB7IPAABA/AAtBAEEAQfyDwAAQPwALvQECAX8CfCMAQTBrIgEkAAJAAkBBgAhEAAAAAACAdz4iAkQxY2IaYbTgPSIDob1CNIinQf8PcWtBEEoNAAwBC0GACEQA0HLPpXd3PkRzcAMuihmzOyIDob1CNIinQf8PcWtBMkgEQEQA0HLPpXd3PiECDAELRM7Ocs+ld3c+IgJE7TI+8kfXGbsiA6EaCyAARM7Ocs+ld3c+OQMAIABBAjYCCCAAIAJEzs5yz6V3dz6hIAOhOQMQIAFBMGokAAuHCQMIfwN+CH0jAEGgAWsiBSQAIAVBOGogASADQQR0aiIHQQhqKAIAIgY2AgAgBUHIAGogBjYCACAFIAcpAgAiDTcDMCAFIA03A0BBASEMIANBAWoiCiAETARAIAEgCkEEdGohCQNAQQAhBkEAIQgDQAJAAkAgBUEwaiAGaioCACAGIAlqKgIAIhBeBEAgBUEwaiAIQQJ0aiEHDAELIAVBQGsgBmoiByoCACAQXUEBcw0BCyAHIBA4AgALIAhBAWohCCAGQQRqIgZBDEcNAAsgCUEQaiEJIApBAWoiCiAETA0ACwsCQCAFKgJEIAUqAjSTIhIgBSoCQCAFKgIwkyIQXkEBc0VBACASIAUqAkggBSoCOJMiEV4bDQBBACEMIBEgEF5BAXMNAEECIQwLAkAgDEECdCIGIAVBQGtqKgIAIhIgBUEwaiAGaioCACIQkkMAAAA/lCIRIBJgRUEAIBEgEF9BAXMbRQRAIAMgBEoNASADIQcDQCAFQShqIAAgASAHQQR0aigCDEECdGoiCigCACIGEGEgBUHQAGogAiAFKAIoIAUoAiwQMSAFQSBqIAYQYSAFQeAAaiACIAUoAiAgBSgCJBAvIAVBGGogBhBhIAIgBSgCGCAFKAIcED0hDQJAIAcgA0wNACANp74hEyANQiCIp74hFEEBIQkgBSoCaCEVIAUqAmQhFiAFKgJgIRcgBSoCWCERIAUqAlQhEiAFKgJQIRAgAyEGA0AgBUEQaiAAIAEgBkEEdGooAgxBAnRqIggoAgAiCxBhIAVB8ABqIAIgBSgCECAFKAIUEDEgBUEIaiALEGEgBUGAAWogAiAFKAIIIAUoAgwQLyAFIAsQYSACIAUoAgAgBSgCBBA9IQ0CQAJAIBAgBSoCcFwNACASIAUqAnRcDQAgESAFKgJ4XA0AIBcgBSoCgAFcDQAgFiAFKgKEAVwgFCANQiCIp75cciATIA2nvlxyDQAgFSAFKgKIAVwNAEEAIQkMAQsgBkEBaiEGCyAGIAdIQQAgCUEBcRsNAAsgCUEBcQ0AIAogCCgCADYCAAsgB0EBaiIHIARMDQALDAELIAMiCCAEIgZIBEAgDEECdCEJA0BBASEHAkAgCCAGTg0AA0AgCCABIAhBBHRqIAlqKgIAIBFdIgdqIQggB0EBcw0BIAggBkgNAAsLAkAgCCAGTg0AA0ACQCAGIAEgBkEEdGogCWoqAgAgEV0iC0EBcyIKayEGIAsNACAIIAZIDQELCyAHIApyDQAgASAIQQR0aiIHKQIAIQ4gASAGQQR0aiILQQhqIgopAgAhDyAHIAspAgA3AgAgB0EIaiIHKQIAIQ0gByAPNwIAIAogDTcCACALIA43AgAgBkF/aiEGIAhBAWohCAsgCCAGSA0ACwsCQCAGIAhHBEAgBiEHIAghBgwBCyABIAZBBHRqIAxBAnRqKgIAIBFdRQRAIAZBf2ohBwwBCyAGIQcgBkEBaiEGCyAHIANKBEAgACABIAIgAyAHEAQLIAYgBE4NACAAIAEgAiAGIAQQBAsgBUGgAWokAAunCAMNfwF+An0jAEEwayIDJAAgAEElEFoiBUEQaiEHAkACQCABKgIMIAIqAgxcDQAgASoCHCACKgIcXA0AIAJBDGohCCABQQxqIQlBfCEGIAIhCiACIQAgASELIAEhBANAIAZBAWoiDiAGTwRAAkAgBCAJRgRAIAtBEGohDCAJQQxqIQkgC0EMaiILIQQMAQsgBEEEaiEMCwJAIAAgCEYEQCAKQRBqIQ0gCEEMaiEIIApBDGoiCiEADAELIABBBGohDQsgACoCACERIAQqAgAgDiEGIA0hACAMIQQgEVsNAQwCCwsgAkEcaiEIIAFBHGohCUF8IQYgAkEQaiIKIQAgAUEQaiIOIQsgDiEEAkADQCAGQQFqIg8gBkkNAQJAIAQgCUYEQCALQRBqIQwgCUEMaiEJIAtBDGoiCyEEDAELIARBBGohDAsCQCAAIAhGBEAgCkEQaiENIAhBDGohCCAKQQxqIgohAAwBCyAAQQRqIQ0LIAAqAgAhESAEKgIAIA8hBiANIQAgDCEEIBFbDQALDAELIAUgASgCHDYCHCAFIAEpAgA3AgAgByAOKQIANwIAIAVBCGogAUEIaikCADcCACAHQQhqIA5BCGooAgA2AgAMAQsgBSABKgIMIAIqAgySQwAAAD+UOAIMIAUgASoCHCACKgIckkMAAAA/lDgCHCADQRhqIgwgAUEIaigCACIANgIAIAMgASkCACIQNwMQIAUgEDcCACAFQQhqIAA2AgAgA0EoaiINIAJBCGooAgA2AgAgAyACKQIANwMgIANBCGpBAEEDEGggAygCCCIAIAMoAgwiBEkEQCAEIABrIQYgBSAAQQJ0IgRqIQAgA0EgaiAEaiEEA0AgACAEKgIAIAAqAgCSOAIAIABBBGohACAEQQRqIQQgBkF/aiIGDQALCyAMIAFBGGooAgA2AgAgAyABKQIQNwMQIA0gAkEYaigCADYCACADIAIpAhA3AyAgA0EAQQMQaCADKAIAIgAgAygCBCIBSQRAIAEgAGshBiAAQQJ0IgEgA0EQamohACADQSBqIAFqIQQDQCAAIAQqAgAgACoCAJI4AgAgAEEEaiEAIARBBGohBCAGQX9qIgYNAAsLIAcgAykDEDcCACAHQQhqIANBGGooAgA2AgACQAJAIAUqAgCLQwAAgABeDQAgBSoCBItDAACAAF4NACAFKgIIi0MAAIAAXkUNAQsgA0EoaiAFQQhqKAIANgIAIAMgBSkCADcDICAFIANBIGoQIwsCQCAFKgIQi0MAAIAAXg0AIAUqAhSLQwAAgABeDQAgBSoCGItDAACAAF5BAXMNAQsgA0EoaiAHQQhqIgAoAgA2AgAgAyAHKQIANwMgIANBEGogA0EgahAjIAAgA0EYaigCADYCACAHIAMpAxA3AgALIANBMGokAAuuBgENfyADQQFOBEAgAiEGIAEhBwNAIAlBA2whEEEBIQggBiEFQQAhBANAIAJBACAIIARBGEYbIBBqQQJ0aigCACEKIAUoAgAhDSAEIAdqIg9BCGogCTYCACAPQQRqIAogDSANIApIIgsbNgIAIA8gDSAKIAsbNgIAIAhBAWohCCAFQQRqIQUgBEEMaiIEQSRHDQALIAZBDGohBiAHQSRqIQcgCUEBaiIJIANHDQALC0EAIQYgAUEAIANBA2wiDEF/akEAQcrLgRMQDSAMQQJOBEAgAUEMaiEEQQEhBQNAIAEgBkEMbGooAgAgBCgCAEcEQCABIAYgBUF/akEBQcrLgRMQDSAFIQYLIARBDGohBCAMIAVBAWoiBUcNAAsgAUEQaiEEQQAhBkEBIQUDQAJAIAEgBkEMbGoiAygCACAEQXxqKAIARgRAIAMoAgQgBCgCAEYNAQsgASAGIAVBf2pBAkHKy4ETEA0gBSEGCyAEQQxqIQQgDCAFQQFqIgVHDQALCyAMQQFOBEBBACEDA0AgASADQQxsaiIGKAIEIQ4gAiAGKAIIIg1BDGxqIgcoAgQhCwJAIAcoAgAiBSAGKAIAIgpGIAUgDkZyRQRAIAcoAgghBkEBIQQMAQtBACEEIAogC0YgCyAORnJFBEAgBygCCCELQQIhBCAFIQYMAQsgCyEGIAUhCwsCQCADQQFqIgMgDE4NACAAIA1ByABsaiAEQQJ0aiIPKAIAQX9HDQBBACEJQQEhCCADIQUCQANAAkAgCiABIAVBDGxqIgcoAgBHDQAgDiAHKAIERw0AIAhBAXFFDQIgAiAHKAIIIhBBDGxqIggoAgQhBwJAIAgoAgAiBCAKRiAEIA5GckUEQCAIKAIIIQRBASEJIAchCAwBC0EAIQkgByAKRiAHIA5GckUEQCAIKAIIIQhBAiEJDAELIAQhCCAHIQQLIAUgBiAIRyAEIAtHciAAIBBByABsaiAJQQJ0aigCAEF/R3IiCGoiBSAMSA0BCwsgCEEBcQ0BCyAPIAEgBUEMbGooAggiBjYCACAAIAZByABsaiAJQQJ0aiANNgIACyADIAxHDQALCwvqBAEHf0ErQYCAxAAgACgCACIDQQFxIgQbIQYgAiAEaiEEQfCPwABBACADQQRxGyEHAkACQCAAKAIIQQFHBEAgACAGIAcQRw0BDAILIABBDGooAgAiBSAETQRAIAAgBiAHEEcNAQwCCwJAAkACQAJAIANBCHEEQCAAKAIEIQggAEEwNgIEIAAtACAhCSAAQQE6ACAgACAGIAcQRw0FQQAhAyAFIARrIgQhBUEBIAAtACAiBiAGQQNGG0EDcUEBaw4DAgECAwtBACEDIAUgBGsiBCEFAkACQAJAQQEgAC0AICIIIAhBA0YbQQNxQQFrDgMBAAECCyAEQQF2IQMgBEEBakEBdiEFDAELQQAhBSAEIQMLIANBAWohAwNAIANBf2oiA0UNBCAAKAIYIAAoAgQgACgCHCgCEBECAEUNAAtBAQ8LIARBAXYhAyAEQQFqQQF2IQUMAQtBACEFIAQhAwsgA0EBaiEDAkADQCADQX9qIgNFDQEgACgCGCAAKAIEIAAoAhwoAhARAgBFDQALQQEPCyAAKAIEIQQgACgCGCABIAIgACgCHCgCDBEEAA0BIAVBAWohAyAAKAIcIQEgACgCGCECA0AgA0F/aiIDBEAgAiAEIAEoAhARAgBFDQEMAwsLIAAgCToAICAAIAg2AgRBAA8LIAAoAgQhBCAAIAYgBxBHDQAgACgCGCABIAIgACgCHCgCDBEEAA0AIAVBAWohAyAAKAIcIQEgACgCGCEAA0AgA0F/aiIDRQRAQQAPCyAAIAQgASgCEBECAEUNAAsLQQEPCyAAKAIYIAEgAiAAQRxqKAIAKAIMEQQAC/0FAQt/IwBBMGsiAiQAIAJBJGpB2I3AADYCACACQQM6ACggAkKAgICAgAQ3AwggAiAANgIgIAJBADYCGCACQQA2AhACfwJAAkACQCABKAIIIgMEQCABKAIAIQUgASgCBCIHIAFBDGooAgAiBCAEIAdLGyIERQ0BIAAgBSgCACAFKAIEQeSNwAAoAgARBAANAyAFQQxqIQAgASgCFCEGIAEoAhAhCyAEIQgDQCACIANBHGotAAA6ACggAiADQQRqKQIAQiCJNwMIIANBGGooAgAhAUEAIQlBACEKAkACQAJAIANBFGooAgBBAWsOAgACAQsgASAGTwRAIAEgBkG4ksAAED8ACyABQQN0IAtqIgwoAgRBHkcNASAMKAIAKAIAIQELQQEhCgsgAiABNgIUIAIgCjYCECADQRBqKAIAIQECQAJAAkAgA0EMaigCAEEBaw4CAAIBCyABIAZPBEAgASAGQbiSwAAQPwALIAFBA3QgC2oiCigCBEEeRw0BIAooAgAoAgAhAQtBASEJCyACIAE2AhwgAiAJNgIYIAMoAgAiASAGSQRAIAsgAUEDdGoiASgCACACQQhqIAEoAgQRAgANBSAIQX9qIghFDQQgA0EgaiEDIABBfGohASAAKAIAIQkgAEEIaiEAIAIoAiAgASgCACAJIAIoAiQoAgwRBABFDQEMBQsLIAEgBkGoksAAED8ACyABKAIAIQUgASgCBCIHIAFBFGooAgAiBCAEIAdLGyIERQ0AIAEoAhAhAyAAIAUoAgAgBSgCBEHkjcAAKAIAEQQADQIgBUEMaiEAIAQhAQNAIAMoAgAgAkEIaiADQQRqKAIAEQIADQMgAUF/aiIBRQ0CIANBCGohAyAAQXxqIQggACgCACEGIABBCGohACACKAIgIAgoAgAgBiACKAIkKAIMEQQARQ0ACwwCC0EAIQQLIAcgBEsEQCACKAIgIAUgBEEDdGoiACgCACAAKAIEIAIoAiQoAgwRBAANAQtBAAwBC0EBCyACQTBqJAAL1AQCAX8FfCMAQSBrIgAkAAJ8AkACQAJAAkAgAEEIahADIAArAxghBCAAKwMIIQEgACgCEEEDcQ4DAQIDAAsgASABIAEgAaIiAaIiAkRJVVVVVVXFP6IgASAERAAAAAAAAOA/oiACIAEgASABoqIgAUR81c9aOtnlPaJE65wriublWr6goiABIAFEff6xV+Mdxz6iRNVhwRmgASq/oKJEpvgQERERgT+goKKhoiAEoaChDAMLRAAAAAAAAPA/IAEgAaIiAkQAAAAAAADgP6IiA6EiBUQAAAAAAADwPyAFoSADoSACIAIgAiACRJAVyxmgAfo+okR3UcEWbMFWv6CiRExVVVVVVaU/oKIgAiACoiIDIAOiIAIgAkTUOIi+6fqovaJExLG0vZ7uIT6gokStUpyAT36SvqCioKIgASAEoqGgoAwCCyABIAEgASABoiIBoiICRElVVVVVVcU/oiABIAREAAAAAAAA4D+iIAIgASABIAGioiABRHzVz1o62eU9okTrnCuK5uVavqCiIAEgAUR9/rFX4x3HPqJE1WHBGaABKr+gokSm+BARERGBP6CgoqGiIAShoKGaDAELRAAAAAAAAPA/IAEgAaIiAkQAAAAAAADgP6IiA6EiBUQAAAAAAADwPyAFoSADoSACIAIgAiACRJAVyxmgAfo+okR3UcEWbMFWv6CiRExVVVVVVaU/oKIgAiACoiIDIAOiIAIgAkTUOIi+6fqovaJExLG0vZ7uIT6gokStUpyAT36SvqCioKIgASAEoqGgoJoMAAsgAEEgaiQAC7EEAQh/AkAgAigCACIFBEAgAUF/aiEKIABBAnQhCUEAIAFrIQsDQCAFQQhqIQYgBSgCCCIHQQFxBEADQCAGIAdBfnE2AgACf0EAIAUoAgQiB0F8cSIGRQ0AGkEAIAYgBi0AAEEBcRsLIQECQCAFKAIAIghBfHEiDEUNAEEAIAwgCEECcRsiCEUNACAIIAgoAgRBA3EgBnI2AgQgBSgCBCIHQXxxIQYLIAUgBgR/IAYgBigCAEEDcSAFKAIAQXxxcjYCACAFKAIEBSAHC0EDcTYCBCAFIAUoAgAiBUEDcTYCACAFQQJxBEAgASABKAIAQQJyNgIACyACIAE2AgAgAUEIaiEGIAEiBSgCCCIHQQFxDQALCwJAIAUoAgBBfHEiASAGayAJSQ0AIAYgAyAAIAQoAhARAgBBAnRqQQhqIAEgCWsgC3EiAUsEQCAGIApxDQEgAiAGKAIAQXxxNgIAIAUhAQwECyABQQA2AgAgAUF4aiIBQgA3AgAgASAFKAIAQXxxNgIAAkAgBSgCACIAQXxxIgJFDQBBACACIABBAnEbIgBFDQAgACAAKAIEQQNxIAFyNgIECyABIAEoAgRBA3EgBXI2AgQgBSAFKAIAQQNxIAFyNgIAIAYgBigCAEF+cTYCACAFKAIAIgBBAnFFDQMgBSAAQX1xNgIAIAEgASgCAEECcjYCAAwDCyACIAUoAggiBTYCACAFDQALC0EADwsgASABKAIAQQFyNgIAIAFBCGoLvQQCC38CfSMAQfAAayICJAAgAkEwaiAAEF8gAkFAayABEF8gAkHYAGogAkE4aikDADcDACACIAIpAzA3A1AgAkEQaiACQcgAaikDADcDACACIAIpA0A3AwggAkHgAGoiACACQQhqIgEpAgA3AgAgAEEIaiABQQhqKQIANwIAIAJBCGogAkHQAGogAkHgAGoQTCACQSRqKAIAIgMgAigCFCIEayELIAQgA0F/c2ohDCACQRxqKAIAIQcgAkEgaigCACEIIAIoAhghACACKAIMIQkgAigCECEGIAIoAgghAQJ/A0ACQAJAIAQEfwJAAkAgASAGRgRAIAlBEGohBSAGQQxqIQYgCUEMaiIJIQEMAQsgAUEEaiEFIAFFDQELIAMEfyAAIAhGBEAgB0EQaiEKIAhBDGohCCAHQQxqIgchAAwFCyAAQQRqIQogAA0EIARBf2ohDCAKIQAgA0F/agVBAAshASACIAY2AhAgAiAFNgIIIAIgDDYCFCACIAE2AiQMAgsgAyELIAUhASAEQX9qBUEACyEFIAIgBjYCECACIAE2AgggAiAFNgIUIAIgCzYCJAsgAiAJNgIMIAIgCDYCICACIAA2AhggAiAHNgIcQQEMAgsgBEF/aiEEIANBf2ohAyAAKgIAIQ0gASoCACAKIQAgBSEBIA1bDQALIAIgBjYCECACIAU2AgggAiAENgIUIAIgAzYCJCACIAk2AgwgAiAINgIgIAIgCjYCGCACIAc2AhxBAAsgAkHwAGokAAuUAQIDfwJ9IwBBIGsiASQAIAFBGGpBAEEBEGggASgCGCICIAEoAhwiA0kEQCAAKgIAIgQgBJQgAEEEaioCACIEIASUkiAAQQhqKgIAIgQgBJSSIQVDAAAAACEEA0ACQCACRQRAIAJBAWohAgwBC0G8hsAAQcSHwAAQXAALIAQgBZIhBCACIANHDQALCyABQSBqJAAgBAvAAwIJfwJ+IANBAnQhDAJAA0AgAiABa0EBaiIFQQJIDQEgBUECRwRAIAAgBCAEIAR3IARBACAEa3hyakEDaiIEIAVwIAFqQQxsaiAMaigCACENIAIhBiABIQUDQCAMIAVBDGwiCGohByAFIQoDQCAIQQxqIQggCkEBaiEKIAAgB2ogB0EMaiEHKAIAIA1IDQALIApBf2ohBSAMIAZBDGwiCWohByAGIQsDQCAJQXRqIQkgC0F/aiELIAAgB2ogB0F0aiEHKAIAIA1KDQALIAUgC0EBaiIGTARAIAAgCGoiBkF0aiIFKQIAIQ4gACAJaiIHQRRqIggoAgAhCSAFIAdBDGoiBykCADcCACAGQXxqKAIAIQYgBUEIaiAJNgIAIAggBjYCACAHIA43AgAgCyEGIAohBQsgBSAGTA0ACyAGIAFKBEAgACABIAYgAyAEEA0LIAUiASACSA0BDAILCyAAIAFBDGxqIgEgA0ECdCIDaigCACAAIAJBDGxqIgAgA2ooAgBMDQAgASkCBCEOIAApAgAhDyABQQhqIABBCGooAgA2AgAgASgCACECIAEgDzcCACAAIA43AgQgACACNgIACwvFBQMBfwF+AnwCfAJAAkAgAL0iAkIgiKdB/////wdxIgFB//+//wNNBEAgAUGAgID/A0kNASACQn9XDQJEAAAAAAAA8D8gAKFEAAAAAAAA4D+iIgAgAJ8iBL1CgICAgHCDvyIDIAOioSAEIAOgoyAEIAAgACAAIAAgACAARAn3/Q3hPQI/okSIsgF14O9JP6CiRDuPaLUogqS/oKJEVUSIDlXByT+gokR9b+sDEtbUv6CiRFVVVVVVVcU/oKIgACAAIAAgAESCki6xxbizP6JEWQGNG2wG5r+gokTIilmc5SoAQKCiREstihwnOgPAoKJEAAAAAAAA8D+go6KgIAOgIgAgAKAPCyACpyABQYCAwIB8anIEQEQAAAAAAAAAACAAIAChow8LRAAAAAAAAAAARBgtRFT7IQlAIAJCf1UbDwtEGC1EVPsh+T8gAUGBgIDjA0kNARpEB1wUMyamkTwgACAAoiIDIAMgAyADIAMgA0QJ9/0N4T0CP6JEiLIBdeDvST+gokQ7j2i1KIKkv6CiRFVEiA5Vwck/oKJEfW/rAxLW1L+gokRVVVVVVVXFP6CiIAMgAyADIANEgpIuscW4sz+iRFkBjRtsBua/oKJEyIpZnOUqAECgokRLLYocJzoDwKCiRAAAAAAAAPA/oKMgAKKhIAChRBgtRFT7Ifk/oA8LRBgtRFT7Ifk/IABEAAAAAAAA8D+gRAAAAAAAAOA/oiIAnyIDIAMgACAAIAAgACAAIABECff9DeE9Aj+iRIiyAXXg70k/oKJEO49otSiCpL+gokRVRIgOVcHJP6CiRH1v6wMS1tS/oKJEVVVVVVVVxT+goiAAIAAgACAARIKSLrHFuLM/okRZAY0bbAbmv6CiRMiKWZzlKgBAoKJESy2KHCc6A8CgokQAAAAAAADwP6CjokQHXBQzJqaRvKCgoSIAIACgCwu6AwEEfyMAQRBrIgIkACAAKAIAIQQCQAJAAkACfwJAAkAgAUGAAU8EQCACQQA2AgwgAUGAEEkNASACQQxqIQAgAUGAgARJBEAgAiABQT9xQYABcjoADiACIAFBDHZB4AFyOgAMIAIgAUEGdkE/cUGAAXI6AA1BAyEBDAYLIAIgAUE/cUGAAXI6AA8gAiABQRJ2QfABcjoADCACIAFBBnZBP3FBgAFyOgAOIAIgAUEMdkE/cUGAAXI6AA1BBCEBDAULIAQoAggiACAEQQRqKAIARwRAIAQoAgAhBQwECwJAIABBAWoiAyAASQ0AIABBAXQiBSADIAUgA0sbIgNBCCADQQhLGyEDIAAEQCADQQBIDQEgBCgCACIFRQ0DIAUgAEEBIAMQYgwECyADQQBODQILEGsACyACIAFBP3FBgAFyOgANIAIgAUEGdkHAAXI6AAwgAkEMaiEAQQIhAQwDCyADQQEQZwsiBQRAIAQgBTYCACAEQQRqIAM2AgAgBCgCCCEADAELIANBARBwAAsgACAFaiABOgAAIAQgBCgCCEEBajYCCAwBCyAEIAAgACABahAiCyACQRBqJABBAAuRAwEKfyMAQdAAayIKJAAgA0F/aiIHQQFOBEADQCAEQQFqIQYCfyAGIAAgBEHIAGxqIgUoAjggBUGAAWooAgBHDQAaIAUoAjwiCEEBcSAAIAZByABsaiIGKAI8IglBAXFHBEAgBkE8aiAJQQJyNgIAIAVBPGogCEECcjYCAAsgBEECagsiBCAHSA0ACwsCQCACQQFIDQBBACEHIAEhBkEBIQQDQAJ/AkAgACAHQcgAbGoiCS0APEEBcQRAIAQgA0gNAQwECyAHQQJqIgUgBCAEIAVIGwwBCwNAAkAgACAEQcgAbGooAjxBAXEiBSAEaiEEIAVFDQAgBCADSA0BCwsgBQ0CIARBAWogASAEQQxsaiEMQQAhCANAIAYgCGoiCygCACENIAsgCCAMaiILKAIANgIAIAsgDTYCACAIQQRqIghBDEcNAAsgCkEIaiAJQcgAEE4gCSAAIARByABsaiIEQcgAEDsaIAQgCkEIakHIABBOCyEEIAZBDGohBiAHQQFqIgcgAkcNAAsLIApB0ABqJAALOQIBfwF9IwBBEGsiAiQAIAAqAgAgASoCAJQgACoCBCABKgIElJIgACoCCCABKgIIlJIgAkEQaiQAC8oCAQ1/IARBAUgEQEEADwsgACEKIAMhCwNAIAAgCUHIAGxqIhBBPGohD0F/IQ1BACEHA0ACQCAPLQAAQQRxDQAgByAKaiIOQQxqIgUoAgANACAHIAtqKAIAIQYgBSABIAhBBHRqIhE2AgAgESAGNgIIIAUoAgAgDy0AAEEDdkEBcToADCAFKAIAQQA2AgAgBSgCACACIAxBAnRqNgIEIAUoAgAiBigCBCAGKAIAQQJ0aiAJNgIAIAYgBigCAEEBajYCACAQIA1BAiAHG0ECdGooAgAhBiAOKAIAIg5BAE4EQCADIAAgDiAFKAIAEBcLIAZBAE4EQCADIAAgBiAFKAIAEBcLIAhBAWohCCAFKAIAKAIAIAxqIQwLIA1BAWohDSAHQQRqIgdBDEcNAAsgCkHIAGohCiALQQxqIQsgCUEBaiIJIARHDQALIAgLygIBA38gACgCACIEQQA2AgAgBEF4aiIFIAUoAgBBfnE2AgACQAJAIAIgAygCFBEGAEUNAAJAIARBfGoiAygCAEF8cSIABEAgACgCACIGQQFxRQ0BCyAFKAIAIgBBfHEiAkUNAUEAIAIgAEECcRsiAEUNASAALQAAQQFxDQEgBCAAKAIIQXxxNgIAIAAgBUEBcjYCCA8LAkACQCAFKAIAIgRBfHEiAkUEQCAAIQEMAQsgACEBQQAgAiAEQQJxGyIERQ0AIAQgBCgCBEEDcSAAcjYCBCADKAIAIgJBfHEiAUUNASAFKAIAQXxxIQIgASgCACEGCyABIAZBA3EgAnI2AgAgAygCACECCyADIAJBA3E2AgAgBSAFKAIAIgFBA3E2AgAgAUECcUUNASAAIAAoAgBBAnI2AgAPCyAEIAEoAgA2AgAgASAFNgIACwu3AgIFfwF+IwBBMGsiBCQAQSchAgJAIABCkM4AVARAIAAhBwwBCwNAIARBCWogAmoiA0F8aiAAIABCkM4AgCIHQpDOAH59pyIFQf//A3FB5ABuIgZBAXRBxJDAAGovAAA7AAAgA0F+aiAFIAZB5ABsa0H//wNxQQF0QcSQwABqLwAAOwAAIAJBfGohAiAAQv/B1y9WIAchAA0ACwsgB6ciA0HjAEoEQCACQX5qIgIgBEEJamogB6ciAyADQf//A3FB5ABuIgNB5ABsa0H//wNxQQF0QcSQwABqLwAAOwAACwJAIANBCk4EQCACQX5qIgIgBEEJamogA0EBdEHEkMAAai8AADsAAAwBCyACQX9qIgIgBEEJamogA0EwajoAAAsgASAEQQlqIAJqQScgAmsQByAEQTBqJAALqAEBA38jAEEwayIDJAAgA0EoaiIEIAFBCGooAgA2AgAgAyABKQIANwMgIAAgAykDIDcCACAAQQhqIAQoAgA2AgAgA0EIakEAQQMQaCADKAIIIgEgAygCDCIESQRAIAQgAWshBCAAIAFBAnQiBWohASACIAVqIQADQCABIAEqAgAgACoCAJM4AgAgAUEEaiEBIABBBGohACAEQX9qIgQNAAsLIANBMGokAAuoAQEDfyMAQTBrIgMkACADQShqIgQgAUEIaigCADYCACADIAEpAgA3AyAgACADKQMgNwIAIABBCGogBCgCADYCACADQQhqQQBBAxBoIAMoAggiASADKAIMIgRJBEAgBCABayEEIAAgAUECdCIFaiEBIAIgBWohAANAIAEgACoCACABKgIAkjgCACABQQRqIQEgAEEEaiEAIARBf2oiBA0ACwsgA0EwaiQAC7wCAQd/AkADQEEAIQZBACEHAkAgAygCCCIEIAAgAkEMbGoiBSgCAEYNAEEBIQcgBCAFKAIERgRAQQEhBgwBC0ECIQYgBSgCCCAERw0CCwJAIANFDQAgASACQcgAbGoiBCAGQQJ0aiIIQQxqIgkoAgANAAJAIAQoAjwiBUEEcUUNACAEKAIMDQAgBEEQaigCAA0AIARBFGooAgANACAEQTxqIgogBUF3cSIFNgIAIAogAy0ADEEDdCAFciIFNgIACyAFQQhxQQN2IAMtAAxBAEdzDQAgAygCBCADKAIAQQJ0aiACNgIAIAMgAygCAEEBajYCACAJIAM2AgAgBCAGQX9qQQIgBxtBAnRqKAIAIQIgCCgCACIEQQBOBEAgACABIAQgAxAXCyACQX9KDQELCw8LQX9BA0GkjcAAED8AC6oCAgN/AX4jAEEwayIDJAACfwJAAkAgACgCBCIEIAFrIAJJBEAgASACaiICIAFJDQJBBCEBAkAgBEEBdCIFIAIgBSACSxsiAkEEIAJBBEsbrULIAH4iBkIgiKdFBEAgBqchAgwBCyAAKAIEIQRBACEBCwJAIAQEQCAAKAIAIQUgA0EoakEENgIAIAMgBEHIAGw2AiQgAyAFNgIgDAELIANBADYCIAsgA0EQaiACIAEgA0EgahAtIANBGGooAgAhASADKAIUIQIgAygCEEEBRg0BIAAgAjYCACAAIAFByABuNgIECyADQTBqJAAPCyADQQhqIAIgARBoIAMoAgghASADKAIMDAELIAMgAkEAEGggAygCACEBIAMoAgQLIgAEQCABIAAQcAALEGsAC6cCAgN/AX4jAEEwayIDJAACfwJAAkAgACgCBCIEIAFrIAJJBEAgASACaiICIAFJDQJBBCEBAkAgBEEBdCIFIAIgBSACSxsiAkEEIAJBBEsbrUIofiIGQiCIp0UEQCAGpyECDAELIAAoAgQhBEEAIQELAkAgBARAIAAoAgAhBSADQShqQQQ2AgAgAyAEQShsNgIkIAMgBTYCIAwBCyADQQA2AiALIANBEGogAiABIANBIGoQLSADQRhqKAIAIQEgAygCFCECIAMoAhBBAUYNASAAIAI2AgAgACABQShuNgIECyADQTBqJAAPCyADQQhqIAIgARBoIAMoAgghASADKAIMDAELIAMgAkEAEGggAygCACEBIAMoAgQLIgAEQCABIAAQcAALEGsAC6cCAgN/AX4jAEEwayIDJAACfwJAAkAgACgCBCIEIAFrIAJJBEAgASACaiICIAFJDQJBBCEBAkAgBEEBdCIFIAIgBSACSxsiAkEEIAJBBEsbrUIMfiIGQiCIp0UEQCAGpyECDAELIAAoAgQhBEEAIQELAkAgBARAIAAoAgAhBSADQShqQQQ2AgAgAyAEQQxsNgIkIAMgBTYCIAwBCyADQQA2AiALIANBEGogAiABIANBIGoQLSADQRhqKAIAIQEgAygCFCECIAMoAhBBAUYNASAAIAI2AgAgACABQQxuNgIECyADQTBqJAAPCyADQQhqIAIgARBoIAMoAgghASADKAIMDAELIAMgAkEAEGggAygCACEBIAMoAgQLIgAEQCABIAAQcAALEGsAC6gCAQN/IwBBMGsiAyQAAn8CQAJAIAAoAgQiBCABayACSQRAIAEgAmoiAiABSQ0CQQQhAQJAIARBAXQiBSACIAUgAksbIgJBBCACQQRLGyICQf////8DcSACRgRAIAJBAnQhAgwBCyAAKAIEIQRBACEBCwJAIAQEQCAAKAIAIQUgA0EoakEENgIAIAMgBEECdDYCJCADIAU2AiAMAQsgA0EANgIgCyADQRBqIAIgASADQSBqEC0gA0EYaigCACEBIAMoAhQhAiADKAIQQQFGDQEgACACNgIAIAAgAUECdjYCBAsgA0EwaiQADwsgA0EIaiACIAEQaCADKAIIIQEgAygCDAwBCyADIAJBABBoIAMoAgAhASADKAIECyIABEAgASAAEHAACxBrAAuoAgEDfyMAQTBrIgMkAAJ/AkACQCAAKAIEIgQgAWsgAkkEQCABIAJqIgIgAUkNAkEEIQECQCAEQQF0IgUgAiAFIAJLGyICQQQgAkEESxsiAkH/////AHEgAkYEQCACQQR0IQIMAQsgACgCBCEEQQAhAQsCQCAEBEAgACgCACEFIANBKGpBBDYCACADIARBBHQ2AiQgAyAFNgIgDAELIANBADYCIAsgA0EQaiACIAEgA0EgahAtIANBGGooAgAhASADKAIUIQIgAygCEEEBRg0BIAAgAjYCACAAIAFBBHY2AgQLIANBMGokAA8LIANBCGogAiABEGggAygCCCEBIAMoAgwMAQsgAyACQQAQaCADKAIAIQEgAygCBAsiAARAIAEgABBwAAsQawALsgIBBX8jAEFAaiICJAAgASgCBCIDRQRAIAFBBGohAyABKAIAIQQgAkEANgIgIAJCATcDGCACIAJBGGo2AiQgAkE4aiAEQRBqKQIANwMAIAJBMGogBEEIaikCADcDACACIAQpAgA3AyggAkEkaiACQShqEAgaIAJBEGoiBCACKAIgNgIAIAIgAikDGDcDCAJAIAEoAgQiBUUNACABQQhqKAIAIgZFDQAgBSAGQQEQagsgAyACKQMINwIAIANBCGogBCgCADYCACADKAIAIQMLIAFBATYCBCABQQxqKAIAIQQgAUEIaiIBKAIAIQUgAUIANwIAQQxBBBBnIgFFBEBBDEEEEHAACyABIAQ2AgggASAFNgIEIAEgAzYCACAAQZCPwAA2AgQgACABNgIAIAJBQGskAAuNAgELfyAAQXxqIQwCQANAIAIgAWsiBEEBaiIFIARJDQEgACADIAMgA3cgA0EAIANreHJqQQNqIgMgBXAgAWpBAnRqKAIAIQogAiEFIAEhBANAIAwgBEECdGohCCAEIQYDQCAGQQFqIQYgCEEEaiIIKAIAIg0gCkgNAAsgBkF/aiEEIAAgBUECdGohCSAFIQcDQCAHQX9qIQcgCSgCACELIAlBfGoiDiEJIAsgCkoNAAsgBCAHQQFqIgVMBEAgCCALNgIAIA5BBGogDTYCACAHIQUgBiEECyAEIAVMDQALIAUgAUoEQCAAIAEgBSADEB4LIAQhASAEIAJIDQALDwtB0IrAAEE5QbSKwAAQSAALmgIBBH8gAEEkaiEFIAEoAgghBiABKAIEIQcgASgCACEIIABBLGooAgAiASAAQShqKAIARgRAIAUgAUEBEBsgACgCLCEBCyAAKAIkIAFBAnRqIAg2AgAgACAAKAIsQQFqIgE2AiwgACgCKCABRgRAIAUgAUEBEBsgACgCLCEBCyAAKAIkIAFBAnRqIAc2AgAgACAAKAIsQQFqIgE2AiwgACgCKCABRgRAIAUgAUEBEBsgACgCLCEBCyAAKAIkIAFBAnRqIAY2AgAgACAAKAIsQQFqIgE2AiwgACgCKCABRgRAIAUgAUEBEBsgACgCLCEBCyAAKAIkIAFBAnRqQYCAgPwDQYCAgPx7IAQbNgIAIAAgACgCLEEBajYCLAv9AQIJfwF+IwBBIGsiBCQAIAAgACgCCCABEBwgACgCACAAKAIIIQUgBEEIakEBIAEQaCAFQQR0aiEDIAQoAggiBiAEKAIMIgdJBEAgByAGayEIIAJBBGohCSAEQRhqIQoDQCACKAIAIQsgBEEQaiAJEDkgAyALNgIAIANBBGogBCkDEDcCACADQQxqIAooAgA2AgAgA0EQaiEDIAhBf2oiCA0ACyAFIAdqIAZrIQULAkAgAQRAIAIpAgAhDCADQQhqIAJBCGopAgA3AgAgAyAMNwIAIAAgBUEBajYCCAwBCyAAIAU2AgggAkEEaiIAKAIAGiAAEFYLIARBIGokAAuAAgIBfwF+IwBBMGsiByQAIAdBLGpBADYCACAHQSBqIAY2AgAgB0EcaiAGNgIAIAdBFGogBDYCACAHQRBqIAQ2AgAgB0IENwIkIAcgBTYCGCAHIAM2AgwgByACNgIIIAcgAjYCBCAHIAE2AgAgB0EYaiEBIAdBDGohAyAHEAIEQCAHKAIkIQIgBykDKCEIIAcQViADEFYgARBWIAcgCDcCBCAHIAI2AgAgCKcgCEIgiKciBEsEQCAHIAQQKSAHKAIIIQQgBygCACECCyAAIAQ2AgQgACACNgIAIAdBMGokAA8LQYyBwABBHBAAIAcQViADEFYgARBWIAdBJGoQVhABAAvYAQEDfwJAIABBBGooAgAiBCAAQQhqKAIAIgNrIAIgAWsiBU8EQCAAKAIAIQQMAQsCfwJAAkAgAyAFaiICIANJDQAgBEEBdCIDIAIgAyACSxsiAkEIIAJBCEsbIQIgBARAIAJBAEgNASAAKAIAIgNFDQIgAyAEQQEgAhBiDAMLIAJBAE4NAQsQawALIAJBARBnCyIEBEAgACAENgIAIABBBGogAjYCACAAQQhqKAIAIQMMAQsgAkEBEHAACyADIARqIAEgBRBOIABBCGoiACAAKAIAIAVqNgIAC9kBAgV/An0jAEEQayICJAAgAkEIakEAQQEQaAJAIAIoAggiBCACKAIMIgVJBEAgASoCACIHIAeUIAFBBGoqAgAiByAHlJIgAUEIaioCACIHIAeUkiEIQwAAAAAhBwNAIAQNAiAIIAeSIQcgBEEBaiEGQQEhBCAFIAZHDQALCyAAIAEpAgA3AgAgAEEIaiABQQhqKAIANgIAQwAAgD8gB5GVIQcDQCAAIANqIgEgByABKgIAlDgCACADQQRqIgNBDEcNAAsgAkEQaiQADwtBiYvAAEGQjMAAEFwAC90BAQR/IwBBQGoiAiQAIAFBBGohBCABKAIERQRAIAEoAgAhAyACQQA2AiAgAkIBNwMYIAIgAkEYajYCJCACQThqIANBEGopAgA3AwAgAkEwaiADQQhqKQIANwMAIAIgAykCADcDKCACQSRqIAJBKGoQCBogAkEQaiIDIAIoAiA2AgAgAiACKQMYNwMIAkAgASgCBCIFRQ0AIAFBCGooAgAiAUUNACAFIAFBARBqCyAEIAIpAwg3AgAgBEEIaiADKAIANgIACyAAQZCPwAA2AgQgACAENgIAIAJBQGskAAuYAgECfyMAQSBrIgQkAEEBIQVB1J3AAEHUncAAKAIAQQFqNgIAAkACQAJAQdidwAAoAgBBAUcEQEHYncAAQoGAgIAQNwMADAELQdydwABB3J3AACgCAEEBaiIFNgIAIAVBAksNAQsgBCADNgIcIAQgAjYCGCAEQfCNwAA2AhQgBEHwjcAANgIQQcidwAAoAgAiAkF/TA0AQcidwAAgAkEBaiICNgIAQcidwABB0J3AACgCACIDBH9BzJ3AACgCACAEQQhqIAAgASgCEBEBACAEIAQpAwg3AxAgBEEQaiADKAIMEQEAQcidwAAoAgAFIAILQX9qNgIAIAVBAU0NAQsACyMAQRBrIgIkACACIAE2AgwgAiAANgIIAAvEAQIGfwF+IwBBEGsiBSQAIAAgACgCCCABEBogACgCACAAKAIIIQQgBUEIakEBIAEQaCAEQQxsaiEDIAUoAggiBiAFKAIMIgdJBEAgByAGayEIA0AgAikCACEJIANBCGogAkEIaigCADYCACADIAk3AgAgA0EMaiEDIAhBf2oiCA0ACyAEIAdqIAZrIQQLIAAgAQR/IAIpAgAhCSADQQhqIAJBCGooAgA2AgAgAyAJNwIAIARBAWoFIAQLNgIIIAVBEGokAAvEAQIGfwF+IwBBEGsiBSQAIAAgACgCCCABEBwgACgCACAAKAIIIQQgBUEIakEBIAEQaCAEQQR0aiEDIAUoAggiBiAFKAIMIgdJBEAgByAGayEIA0AgAikCACEJIANBCGogAkEIaikCADcCACADIAk3AgAgA0EQaiEDIAhBf2oiCA0ACyAEIAdqIAZrIQQLIAAgAQR/IAIpAgAhCSADQQhqIAJBCGopAgA3AgAgAyAJNwIAIARBAWoFIAQLNgIIIAVBEGokAAuqAQMBfwN+An0jAEEgayICJAAgAkEYaiABKAIAEGEgACACKAIYIAIoAhwQPSEDIAJBEGogASgCBBBhIAAgAigCECACKAIUED0hBCACQQhqIAEoAggQYSAAIAIoAgggAigCDBA9IQUgAkEgaiQAIASnviADp74iBpMgBUIgiKe+IANCIIinviIHk5QgBEIgiKe+IAeTIAWnviAGk5STIgaMIAYgBkMAAAAAXRsLsQEBBX8jAEEQayIDJAACQCAAKAIEIgIgAU8EQAJAIAIEQCACQQJ0IQIgACgCACEEAkAgAUECdCIFRQRAQQQhBiACRQ0BIAQgAkEEEGoMAQsgBCACQQQgBRBiIgZFDQILIAAgBjYCACAAIAFB/////wNxNgIECyADQRBqJAAPCyADQQhqIAVBBBBoIAMoAgwiAEUNASADKAIIIAAQcAALQcWIwABBJEHsiMAAEEgACxBrAAu2AQEBfyMAQRBrIgMkAAJAIABFDQAgAyAANgIEIAFFDQACQCACQQRLDQAgAUEDakECdkF/aiIAQf8BSw0AIANBoJXAADYCCCADIABBAnRBpJXAAGoiACgCADYCDCADQQRqIANBDGogA0EIakGUicAAEBMgACADKAIMNgIADAELIANBoJXAACgCADYCDCADQQRqIANBDGpB/IjAAEH8iMAAEBNBoJXAACADKAIMNgIACyADQRBqJAALmQEBBn8jAEEQayIFJAAgACAAKAIIIAEQGCAAKAIAIAAoAgghAyAFQQhqQQEgARBoIANByABsaiEEIAUoAggiBiAFKAIMIgdJBEAgByAGayEIA0AgBCACQcgAEDtByABqIQQgCEF/aiIIDQALIAMgB2ogBmshAwsgACABBH8gBCACQcgAEDsaIANBAWoFIAMLNgIIIAVBEGokAAuVAQEGfyMAQRBrIgUkACAAIAAoAgggARAZIAAoAgAgACgCCCEDIAVBCGpBASABEGggA0EobGohBCAFKAIIIgYgBSgCDCIHSQRAIAcgBmshCANAIAQgAkEoEDtBKGohBCAIQX9qIggNAAsgAyAHaiAGayEDCyAAIAEEfyAEIAJBKBA7GiADQQFqBSADCzYCCCAFQRBqJAALqgEBAn8CQAJAAkAgAgRAQQEhBCABQQBODQEMAgsgACABNgIEQQEhBAwBCwJAAkACQAJAAkAgAygCACIFRQRAIAFFDQEMAwsgAygCBCIDDQEgAQ0CCyACIQMMAwsgBSADIAIgARBiIgNFDQEMAgsgASACEGciAw0BCyAAIAE2AgQgAiEBDAILIAAgAzYCBEEAIQQMAQtBACEBCyAAIAQ2AgAgAEEIaiABNgIAC7IBAQJ/IwBBEGsiAiQAAkAgAEUNACAAQQNqQQJ2IQACQCABQQRLDQAgAEF/aiIDQf8BSw0AIAJBoJXAADYCBCACIANBAnRBpJXAAGoiAygCADYCDCAAIAEgAkEMaiACQQRqQZSJwAAQPiEBIAMgAigCDDYCAAwBCyACQaCVwAAoAgA2AgggACABIAJBCGpB/IjAAEH8iMAAED4hAUGglcAAIAIoAgg2AgALIAJBEGokACABC5cBAQJ/AkACQCABQRRqKAIAIgQgA0EDbCACQQlsaiICSwRAIAQgAkEBaiIDTQ0BIAQgAkECaiIFTQ0CIAAgASgCDCIBIAJBAnRqKAIANgIAIAAgASAFQQJ0aigCADYCCCAAIAEgA0ECdGooAgA2AgQPCyACIARBvIDAABA/AAsgAyAEQcyAwAAQPwALIAUgBEHcgMAAED8AC5MBAQZ/AkACQAJAIAAoAgAiBCABKAIARw0AIARFBEBBAQ8LIABBDGooAgAhBQNAIAUgAk0NAiABKAIMIgMgAk0NAyACIAJBAnQiAyAAKAIEaigCACIGIAEoAgQgA2ooAgAiB0YiA2oiAiAETw0BIAYgB0YNAAsLIAMPCyACIAVBhI3AABA/AAsgAiADQZSNwAAQPwALlAEBAn8CQAJAIAEoAggiBCADQQNsIAJBCWxqIgJLBEAgBCACQQFqIgNNDQEgBCACQQJqIgVNDQIgACABKAIAIgEgAkECdGooAgA2AgAgACABIAVBAnRqKAIANgIIIAAgASADQQJ0aigCADYCBA8LIAIgBEGMgMAAED8ACyADIARBnIDAABA/AAsgBSAEQayAwAAQPwALiwEBAX8jAEEQayIDJAAgAyABKAIAIgEoAgA2AgwgAkECaiICIAJsIgJBgBAgAkGAEEsbIgRBBCADQQxqQayJwABBrInAABA+IQIgASADKAIMNgIAIAIEfyACQgA3AgQgAiACIARBAnRqQQJyNgIAQQAFQQELIQEgACACNgIEIAAgATYCACADQRBqJAALogEBA38jAEEQayIBJAAgACgCACICQRRqKAIAIQMCQAJ/AkACQCACKAIEDgIAAQMLIAMNAkEAIQJB8I3AAAwBCyADDQEgAigCACIDKAIEIQIgAygCAAshAyABIAI2AgQgASADNgIAIAFB/I7AACAAKAIEKAIIIAAoAggQJQALIAFBADYCBCABIAI2AgAgAUHojsAAIAAoAgQoAgggACgCCBAlAAtTAgF/AX4CQCABrUIMfiIDQiCIpw0AIAOnIgFBf0wNAAJAIAEEQCABQQQQZyICDQEgAUEEEHAAC0EEIQILIAAgAjYCACAAIAFBDG42AgQPCxBrAAtTAgF/AX4CQCABrUIofiIDQiCIpw0AIAOnIgFBf0wNAAJAIAEEQCABQQQQZyICDQEgAUEEEHAAC0EEIQILIAAgAjYCACAAIAFBKG42AgQPCxBrAAtVAgF/AX4CQCABrULIAH4iA0IgiKcNACADpyIBQX9MDQACQCABBEAgAUEEEGciAg0BIAFBBBBwAAtBBCECCyAAIAI2AgAgACABQcgAbjYCBA8LEGsAC1MBAX8CQCABIAFB/////wBxRw0AIAFBBHQiAUF/TA0AAkAgAQRAIAFBBBBnIgINASABQQQQcAALQQQhAgsgACACNgIAIAAgAUEEdjYCBA8LEGsAC4MBAQF/AkAgASABQf////8DcUcNACABQQJ0IgFBf0wNAAJAAkACQAJAIAIEQCABDQEMAwsgAUUNAiABQQQQZyICDQMMAQsgASICQQQQLiIDBEAgAyACEFoaCyADIgINAgsgAUEEEHAAC0EEIQILIAAgAjYCACAAIAFBAnY2AgQPCxBrAAt0AgJ/AX4jAEEQayICJAAgAkEIaiABEGMgAigCCCEDIAIgAigCDCIBQQAQOCACKQMAIQQgAEEANgIIIAAgBDcCACAAQQAgARAbIAAoAgAgACgCCEECdGogAyABQQJ0EE4gACABIAAoAghqNgIIIAJBEGokAAtxAAJ/IAJBAnQiASADQQN0QYCAAWoiAiABIAJLG0GHgARqIgFBEHZAACICQX9GBEBBACEDQQEMAQsgAkEQdCIDQgA3AwAgA0EANgIIIAMgAyABQYCAfHFqQQJyNgIAQQALIQIgACADNgIEIAAgAjYCAAtvAQF/AkAgASAATwRAIAJFDQEgACEDA0AgAyABLQAAOgAAIAFBAWohASADQQFqIQMgAkF/aiICDQALDAELIAJFDQAgAUF/aiEBIABBf2ohAwNAIAIgA2ogASACai0AADoAACACQX9qIgINAAsLIAALbwECfwJ/IAIgAJMgASAAk5VDAAAARZQiAEMAAADPYCIDQQFzIABD////Tl9FckUEQCAAqAwBC0H/////B0GAgICAeCADGyIEIARBACAAQ////05fGyADGwsiA0EAIANBAEobIgNB/w8gA0H/D0gbC2YBAX8CQCAAQSBqKAIAIgMgAUEGbCACQQF0aiIBSwRAIAMgAUEBciICTQ0BIAAoAhgiACACQQJ0ajUCAEIghiAAIAFBAnRqNQIAhA8LIAEgA0HsgMAAED8ACyACIANB/IDAABA/AAtrAQJ/IwBBEGsiBiQAAkAgACABIAIgAyAEEAoiBQ0AIAZBCGogAyAAIAEgBCgCDBEFAEEAIQUgBigCCA0AIAYoAgwiBSACKAIANgIIIAIgBTYCACAAIAEgAiADIAQQCiEFCyAGQRBqJAAgBQtsAQF/IwBBMGsiAyQAIAMgATYCBCADIAA2AgAgA0EcakECNgIAIANBLGpBHTYCACADQgI3AgwgA0G0kMAANgIIIANBHTYCJCADIANBIGo2AhggAyADNgIoIAMgA0EEajYCICADQQhqIAIQWQALVAEBfyMAQSBrIgIkACACIAAoAgA2AgQgAkEYaiABQRBqKQIANwMAIAJBEGogAUEIaikCADcDACACIAEpAgA3AwggAkEEaiACQQhqEAggAkEgaiQAC1kCAX8BfiMAQSBrIgMkACADQQhqIAIQNyADKQMIIQQgAEEANgIIIAAgBDcCACADQRhqIAFBCGopAgA3AwAgAyABKQIANwMQIAAgAiADQRBqECcgA0EgaiQAC1kCAX8BfiMAQSBrIgMkACADQQhqIAIQNCADKQMIIQQgAEEANgIIIAAgBDcCACADQRhqIAFBCGooAgA2AgAgAyABKQIANwMQIAAgAiADQRBqECYgA0EgaiQAC1kCAX8BfiMAQSBrIgMkACADQQhqIAIQNyADKQMIIQQgAEEANgIIIAAgBDcCACADQRhqIAFBCGopAgA3AwAgAyABKQIANwMQIAAgAiADQRBqECAgA0EgaiQAC1QBAn8gASgCACECIAFBADYCAAJAIAIEQCABKAIEIQNBCEEEEGciAUUNASABIAM2AgQgASACNgIAIABByI3AADYCBCAAIAE2AgAPCwALQQhBBBBwAAtKAgF/AX4jAEHQAGsiAyQAIAMgAhA2IAMpAwAhBCAAQQA2AgggACAENwIAIANBCGogAUHIABBOIAAgAiADQQhqECsgA0HQAGokAAtHAgF/AX4jAEEwayIDJAAgAyACEDUgAykDACEEIABBADYCCCAAIAQ3AgAgA0EIaiABQSgQTiAAIAIgA0EIahAsIANBMGokAAtKAAJ/IAFBgIDEAEcEQEEBIAAoAhggASAAQRxqKAIAKAIQEQIADQEaCyACRQRAQQAPCyAAKAIYIAJBACAAQRxqKAIAKAIMEQQACwtHAQF/IwBBIGsiAyQAIANBFGpBADYCACADQfCPwAA2AhAgA0IBNwIEIAMgATYCHCADIAA2AhggAyADQRhqNgIAIAMgAhBZAAs8AQF/IAAoAggiAQRAIAFBBHQhASAAKAIAQQRqIQADQCAAKAIAGiAAEFYgAEEQaiEAIAFBcGoiAQ0ACwsLOAAgAEIANwIAIABBCGpBADYCACAAQSRqQQA6AAAgAEEcakIANwIAIABBFGpCADcCACAAQgA3AgwLRAECfyABKAIEIQIgASgCACEDQQhBBBBnIgFFBEBBCEEEEHAACyABIAI2AgQgASADNgIAIABBoI/AADYCBCAAIAE2AgALPQAgAEIANwIgIAAgASkCADcCACAAIAIpAgA3AhAgAEEIaiABQQhqKQIANwIAIABBGGogAkEIaikCADcCAAtbAQN/IwBBEGsiASQAIAAoAgwiAkUEQEGAjsAAQStByI7AABBIAAsgACgCCCIDRQRAQYCOwABBK0HYjsAAEEgACyABIAI2AgggASAANgIEIAEgAzYCACABEFgACysAIAIEQANAIAAgAS0AADoAACABQQFqIQEgAEEBaiEAIAJBf2oiAg0ACwsLKQEBfyADIAIQLiIEBEAgBCAAIAMgASABIANLGxBOIAAgASACECoLIAQLLAACQCAAQXxNBEAgAEUEQEEEIQAMAgsgACAAQX1JQQJ0EGciAA0BCwALIAALNwEBf0EBIQECQCAAKgIAi0MAAIAAXg0AIAAqAgSLQwAAgABeDQAgACoCCItDAACAAF4hAQsgAQsmAQF/AkAgACgCBCIBRQ0AIAAoAgAgAUEEdCIBRQ0AIAFBBBBqCwsnAQF/AkAgACgCBCIBRQ0AIAAoAgAgAUHIAGwiAUUNACABQQQQagsLJgEBfwJAIAAoAgQiAUUNACAAKAIAIAFBKGwiAUUNACABQQQQagsLJgEBfwJAIAAoAgQiAUUNACAAKAIAIAFBDGwiAUUNACABQQQQagsLJgEBfwJAIAAoAgQiAUUNACAAKAIAIAFBAnQiAUUNACABQQQQagsLLAEBfyMAQRBrIgEkACABQQhqIABBCGooAgA2AgAgASAAKQIANwMAIAEQWwALLAEBfyMAQRBrIgEkACABQQhqIABBCGooAgA2AgAgASAAKQIANwMAIAEQMwALNAEBfyMAQRBrIgIkACACIAE2AgwgAiAANgIIIAJB8I/AADYCBCACQfCPwAA2AgAgAhBNAAspAQF/IAEEQCAAIQIDQCACQQA6AAAgAkEBaiECIAFBf2oiAQ0ACwsgAAsrAQF/IwBBEGsiASQAIAEgACkCADcDCCABQQhqQbSNwABBACAAKAIIECUACycBAX8jAEEQayICJAAgAiABNgIIIAJBHTYCBCACIAA2AgAgAhBXAAsmAQF/AkAgACgCACIBRQ0AIABBBGooAgAiAEUNACABIABBARBqCwsmAQF/AkAgACgCBCIBRQ0AIABBCGooAgAiAEUNACABIABBARBqCwshACAAQQM2AgwgACABNgIEIAAgATYCACAAIAFBDGo2AggLHQAgASgCAEUEQAALIABByI3AADYCBCAAIAE2AgALFgAgACABQQNxNgIEIAAgAUECdjYCAAsMACAAIAEgAiADEE8LFgAgACABKAIINgIEIAAgASgCADYCAAsPACABBEAgACABQQQQagsLEgAgACgCACABIAEgAmoQIkEACw0AIAFBA3EgAEECdHILCAAgACABEC4LEAAgACACNgIEIAAgATYCAAsTACAAQaCPwAA2AgQgACABNgIACwoAIAAgASACECoLEQBBzI/AAEERQeCPwAAQSAALDgAgACgCABoDQAwACwALCwAgADUCACABEBQLCwAgACMAaiQAIwALCwAgAItDAACAAF4LGQAgACABQcSdwAAoAgAiAEEPIAAbEQEAAAsFAEGABAsEAEEBCwQAIAELBABBAAsNAEL0+Z7m7qOq+f4ACw0AQve47vqqzNXu5QALDABC6dCi28yi6rtGCwMAAQsDAAELC6QVAgBBgIDAAAvBCnNyYy9saWIucnMAAAAAEAAKAAAANgAAAA0AAAAAABAACgAAADcAAAANAAAAAAAQAAoAAAA4AAAADQAAAAAAEAAKAAAAPgAAAA0AAAAAABAACgAAAD8AAAANAAAAAAAQAAoAAABAAAAADQAAAAAAEAAKAAAARgAAAA0AAAAAABAACgAAAEcAAAANAAAARmFpbGVkIHRvIGdlbmVyYXRlIHRhbmdlbnRzLi9Vc2Vycy9kb25tY2N1cmR5Ly5jYXJnby9yZWdpc3RyeS9zcmMvZ2l0aHViLmNvbS0xZWNjNjI5OWRiOWVjODIzL21pa2t0c3BhY2UtMC4yLjAvc3JjL2dlbmVyYXRlZC5ycwCoABAAYwAAANcAAAASAAAAqAAQAGMAAADYAAAAEgAAAKgAEABjAAAA2QAAABIAAACoABAAYwAAAN4AAAANAAAAqAAQAGMAAAAjAQAAOAAAAKgAEABjAAAA/QEAABUAAACoABAAYwAAAA8CAABAAAAAqAAQAGMAAAAVAgAAEQAAAKgAEABjAAAAFgIAABEAAACoABAAYwAAABgCAAARAAAAqAAQAGMAAAAjAgAAGQAAAKgAEABjAAAAJAIAADIAAACoABAAYwAAACoCAAAcAAAAqAAQAGMAAAAmAgAANAAAAKgAEABjAAAAvQUAAAkAAACoABAAYwAAAMAFAAAFAAAAqAAQAGMAAADDBQAAHAAAAKgAEABjAAAAwwUAADMAAACoABAAYwAAAMMFAAAJAAAAqAAQAGMAAADTBQAAIwAAAKgAEABjAAAA0wUAABcAAACoABAAYwAAANQFAAAYAAAAqAAQAGMAAADVBQAACQAAAKgAEABjAAAA3AUAABEAAACoABAAYwAAAN8FAAAYAAAAqAAQAGMAAADgBQAAGQAAAKgAEABjAAAA6AUAAC0AAACoABAAYwAAAOgFAAAhAAAAqAAQAGMAAADpBQAAGAAAAKgAEABjAAAA8gUAABEAAACoABAAYwAAAKcGAAANAAAAqAAQAGMAAACuBgAAEQAAAKgAEABjAAAArwYAABEAAACoABAAYwAAALAGAAARAAAAqAAQAGMAAAD9BgAACQAAAE1hdHJpeCBzbGljaW5nIG91dCBvZiBib3VuZHMuL1VzZXJzL2Rvbm1jY3VyZHkvLmNhcmdvL3JlZ2lzdHJ5L3NyYy9naXRodWIuY29tLTFlY2M2Mjk5ZGI5ZWM4MjMvbmFsZ2VicmEtMC4xOS4wL3NyYy9iYXNlL21hdHJpeF9zbGljZS5ycwBZAxAAagAAAOMAAAAJAAAAL1VzZXJzL2Rvbm1jY3VyZHkvLnJ1c3R1cC90b29sY2hhaW5zL3N0YWJsZS14ODZfNjQtYXBwbGUtZGFyd2luL2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvYWxsb2Mvc3JjL3Jhd192ZWMucnNUcmllZCB0byBzaHJpbmsgdG8gYSBsYXJnZXIgY2FwYWNpdHkAAADUAxAAcQAAAMUBAAAJAAAAAQAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAQAAAAEAAAABgAAAAcAAAAIAAAACQAAAAAAAAABAAAAAgAAAAMAAAAEAAAAL1VzZXJzL2Rvbm1jY3VyZHkvLnJ1c3R1cC90b29sY2hhaW5zL3N0YWJsZS14ODZfNjQtYXBwbGUtZGFyd2luL2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvbnVtL21vZC5yc8QEEABwAAAAnQIAAAUAQdCKwAAL0AphdHRlbXB0IHRvIGNhbGN1bGF0ZSB0aGUgcmVtYWluZGVyIHdpdGggYSBkaXZpc29yIG9mIHplcm9NYXRyaXggc2xpY2luZyBvdXQgb2YgYm91bmRzLi9Vc2Vycy9kb25tY2N1cmR5Ly5jYXJnby9yZWdpc3RyeS9zcmMvZ2l0aHViLmNvbS0xZWNjNjI5OWRiOWVjODIzL25hbGdlYnJhLTAuMTkuMC9zcmMvYmFzZS9tYXRyaXhfc2xpY2UucnOmBRAAagAAAOMAAAAJAAAAL1VzZXJzL2Rvbm1jY3VyZHkvLmNhcmdvL3JlZ2lzdHJ5L3NyYy9naXRodWIuY29tLTFlY2M2Mjk5ZGI5ZWM4MjMvbWlra3RzcGFjZS0wLjIuMC9zcmMvZ2VuZXJhdGVkLnJzACAGEABjAAAA2wIAABkAAAAgBhAAYwAAANsCAAAyAAAAIAYQAGMAAAB+AwAACAAAAAoAAAAIAAAABAAAAAsAAAAMAAAADQAAAAgAAAAEAAAADgAAABAAAAAEAAAABAAAABEAAAASAAAAEwAAABAAAAAAAAAAAQAAABQAAABjYWxsZWQgYE9wdGlvbjo6dW53cmFwKClgIG9uIGEgYE5vbmVgIHZhbHVlbGlicmFyeS9zdGQvc3JjL3Bhbmlja2luZy5ycwArBxAAHAAAAO0BAAAfAAAAKwcQABwAAADuAQAAHgAAABUAAAAQAAAABAAAABYAAAAXAAAAEAAAAAgAAAAEAAAAGAAAABkAAAAaAAAADAAAAAQAAAAbAAAAEAAAAAgAAAAEAAAAHAAAAGxpYnJhcnkvYWxsb2Mvc3JjL3Jhd192ZWMucnNjYXBhY2l0eSBvdmVyZmxvdwAAALAHEAAcAAAAHgIAAAUAAAAfAAAAAAAAAAEAAAAgAAAAaW5kZXggb3V0IG9mIGJvdW5kczogdGhlIGxlbiBpcyAgYnV0IHRoZSBpbmRleCBpcyAAAAAIEAAgAAAAIAgQABIAAAAwMDAxMDIwMzA0MDUwNjA3MDgwOTEwMTExMjEzMTQxNTE2MTcxODE5MjAyMTIyMjMyNDI1MjYyNzI4MjkzMDMxMzIzMzM0MzUzNjM3MzgzOTQwNDE0MjQzNDQ0NTQ2NDc0ODQ5NTA1MTUyNTM1NDU1NTY1NzU4NTk2MDYxNjI2MzY0NjU2NjY3Njg2OTcwNzE3MjczNzQ3NTc2Nzc3ODc5ODA4MTgyODM4NDg1ODY4Nzg4ODk5MDkxOTI5Mzk0OTU5Njk3OTg5OWxpYnJhcnkvY29yZS9zcmMvZm10L21vZC5ycwAMCRAAGwAAAFUEAAARAAAADAkQABsAAABfBAAAJAAAAAMAAAAEAAAABAAAAAYAAACD+aIARE5uAPwpFQDRVycA3TT1AGLbwAA8mZUAQZBDAGNR/gC73qsAt2HFADpuJADSTUIASQbgAAnqLgAcktEA6x3+ACmxHADoPqcA9TWCAES7LgCc6YQAtCZwAEF+XwDWkTkAU4M5AJz0OQCLX4QAKPm9APgfOwDe/5cAD5gFABEv7wAKWosAbR9tAM9+NgAJyycARk+3AJ5mPwAt6l8Auid1AOXrxwA9e/EA9zkHAJJSigD7a+oAH7FfAAhdjQAwA1YAe/xGAPCrawAgvM8ANvSaAOOpHQBeYZEACBvmAIWZZQCgFF8AjUBoAIDY/wAnc00ABgYxAMpWFQDJqHMAe+JgAGuMwAAAAABA+yH5PwAAAAAtRHQ+AAAAgJhG+DwAAABgUcx4OwAAAICDG/A5AAAAQCAlejgAAACAIoLjNgAAAAAd82k1AHsJcHJvZHVjZXJzAghsYW5ndWFnZQEEUnVzdAAMcHJvY2Vzc2VkLWJ5AwVydXN0Yx0xLjQ5LjAgKGUxODg0YThlMyAyMDIwLTEyLTI5KQZ3YWxydXMGMC4xOC4wDHdhc20tYmluZGdlbhIwLjIuNzMgKDNjZWZlMmM4Mik='; + +export let wasm; + +export let isReady = false; + +export const ready = fetch(wasmDataURI) + .then((res) => res.arrayBuffer()) + .then((buffer) => WebAssembly.instantiate(buffer, { + './mikktspace_module_bg.js': {__wbindgen_string_new, __wbindgen_rethrow} + })) + .then((result) => { + wasm = result.instance.exports; + isReady = true; + }); diff --git a/node_modules/three/examples/jsm/libs/mmdparser.module.js b/node_modules/three/examples/jsm/libs/mmdparser.module.js new file mode 100644 index 0000000..5a587f1 --- /dev/null +++ b/node_modules/three/examples/jsm/libs/mmdparser.module.js @@ -0,0 +1,11530 @@ +/** + * @author Takahiro / https://github.com/takahirox + * + * Simple CharsetEncoder. + */ + +function CharsetEncoder() { +} + +/* + * Converts from Shift_JIS Uint8Array data to Unicode strings. + */ +CharsetEncoder.prototype.s2u = function(uint8Array) { + var t = this.s2uTable; + var str = ''; + var p = 0; + + while(p < uint8Array.length) { + var key = uint8Array[p++]; + + if(! ((key >= 0x00 && key <= 0x7e) || + (key >= 0xa1 && key <= 0xdf)) && + p < uint8Array.length) { + key = (key << 8) | uint8Array[p++]; + } + + if(t[key] === undefined) { + console.error('unknown char code ' + key + '.'); + return str; + } + + str += String.fromCharCode(t[key]); + } + + return str; +}; + +CharsetEncoder.prototype.s2uTable = { +0:0, +1:1, +2:2, +3:3, +4:4, +5:5, +6:6, +7:7, +8:8, +9:9, +10:10, +11:11, +12:12, +13:13, +14:14, +15:15, +16:16, +17:17, +18:18, +19:19, +20:20, +21:21, +22:22, +23:23, +24:24, +25:25, +26:26, +27:27, +28:28, +29:29, +30:30, +31:31, +32:32, +33:33, +34:34, +35:35, +36:36, +37:37, +38:38, +39:39, +40:40, +41:41, +42:42, +43:43, +44:44, +45:45, +46:46, +47:47, +48:48, +49:49, +50:50, +51:51, +52:52, +53:53, +54:54, +55:55, +56:56, +57:57, +58:58, +59:59, +60:60, +61:61, +62:62, +63:63, +64:64, +65:65, +66:66, +67:67, +68:68, +69:69, +70:70, +71:71, +72:72, +73:73, +74:74, +75:75, +76:76, +77:77, +78:78, +79:79, +80:80, +81:81, +82:82, +83:83, +84:84, +85:85, +86:86, +87:87, +88:88, +89:89, +90:90, +91:91, +92:92, +93:93, +94:94, +95:95, +96:96, +97:97, +98:98, +99:99, +100:100, +101:101, +102:102, +103:103, +104:104, +105:105, +106:106, +107:107, +108:108, +109:109, +110:110, +111:111, +112:112, +113:113, +114:114, +115:115, +116:116, +117:117, +118:118, +119:119, +120:120, +121:121, +122:122, +123:123, +124:124, +125:125, +126:126, +161:65377, +162:65378, +163:65379, +164:65380, +165:65381, +166:65382, +167:65383, +168:65384, +169:65385, +170:65386, +171:65387, +172:65388, +173:65389, +174:65390, +175:65391, +176:65392, +177:65393, +178:65394, +179:65395, +180:65396, +181:65397, +182:65398, +183:65399, +184:65400, +185:65401, +186:65402, +187:65403, +188:65404, +189:65405, +190:65406, +191:65407, +192:65408, +193:65409, +194:65410, +195:65411, +196:65412, +197:65413, +198:65414, +199:65415, +200:65416, +201:65417, +202:65418, +203:65419, +204:65420, +205:65421, +206:65422, +207:65423, +208:65424, +209:65425, +210:65426, +211:65427, +212:65428, +213:65429, +214:65430, +215:65431, +216:65432, +217:65433, +218:65434, +219:65435, +220:65436, +221:65437, +222:65438, +223:65439, +33088:12288, +33089:12289, +33090:12290, +33091:65292, +33092:65294, +33093:12539, +33094:65306, +33095:65307, +33096:65311, +33097:65281, +33098:12443, +33099:12444, +33100:180, +33101:65344, +33102:168, +33103:65342, +33104:65507, +33105:65343, +33106:12541, +33107:12542, +33108:12445, +33109:12446, +33110:12291, +33111:20189, +33112:12293, +33113:12294, +33114:12295, +33115:12540, +33116:8213, +33117:8208, +33118:65295, +33119:65340, +33120:65374, +33121:8741, +33122:65372, +33123:8230, +33124:8229, +33125:8216, +33126:8217, +33127:8220, +33128:8221, +33129:65288, +33130:65289, +33131:12308, +33132:12309, +33133:65339, +33134:65341, +33135:65371, +33136:65373, +33137:12296, +33138:12297, +33139:12298, +33140:12299, +33141:12300, +33142:12301, +33143:12302, +33144:12303, +33145:12304, +33146:12305, +33147:65291, +33148:65293, +33149:177, +33150:215, +33152:247, +33153:65309, +33154:8800, +33155:65308, +33156:65310, +33157:8806, +33158:8807, +33159:8734, +33160:8756, +33161:9794, +33162:9792, +33163:176, +33164:8242, +33165:8243, +33166:8451, +33167:65509, +33168:65284, +33169:65504, +33170:65505, +33171:65285, +33172:65283, +33173:65286, +33174:65290, +33175:65312, +33176:167, +33177:9734, +33178:9733, +33179:9675, +33180:9679, +33181:9678, +33182:9671, +33183:9670, +33184:9633, +33185:9632, +33186:9651, +33187:9650, +33188:9661, +33189:9660, +33190:8251, +33191:12306, +33192:8594, +33193:8592, +33194:8593, +33195:8595, +33196:12307, +33208:8712, +33209:8715, +33210:8838, +33211:8839, +33212:8834, +33213:8835, +33214:8746, +33215:8745, +33224:8743, +33225:8744, +33226:65506, +33227:8658, +33228:8660, +33229:8704, +33230:8707, +33242:8736, +33243:8869, +33244:8978, +33245:8706, +33246:8711, +33247:8801, +33248:8786, +33249:8810, +33250:8811, +33251:8730, +33252:8765, +33253:8733, +33254:8757, +33255:8747, +33256:8748, +33264:8491, +33265:8240, +33266:9839, +33267:9837, +33268:9834, +33269:8224, +33270:8225, +33271:182, +33276:9711, +33359:65296, +33360:65297, +33361:65298, +33362:65299, +33363:65300, +33364:65301, +33365:65302, +33366:65303, +33367:65304, +33368:65305, +33376:65313, +33377:65314, +33378:65315, +33379:65316, +33380:65317, +33381:65318, +33382:65319, +33383:65320, +33384:65321, +33385:65322, +33386:65323, +33387:65324, +33388:65325, +33389:65326, +33390:65327, +33391:65328, +33392:65329, +33393:65330, +33394:65331, +33395:65332, +33396:65333, +33397:65334, +33398:65335, +33399:65336, +33400:65337, +33401:65338, +33409:65345, +33410:65346, +33411:65347, +33412:65348, +33413:65349, +33414:65350, +33415:65351, +33416:65352, +33417:65353, +33418:65354, +33419:65355, +33420:65356, +33421:65357, +33422:65358, +33423:65359, +33424:65360, +33425:65361, +33426:65362, +33427:65363, +33428:65364, +33429:65365, +33430:65366, +33431:65367, +33432:65368, +33433:65369, +33434:65370, +33439:12353, +33440:12354, +33441:12355, +33442:12356, +33443:12357, +33444:12358, +33445:12359, +33446:12360, +33447:12361, +33448:12362, +33449:12363, +33450:12364, +33451:12365, +33452:12366, +33453:12367, +33454:12368, +33455:12369, +33456:12370, +33457:12371, +33458:12372, +33459:12373, +33460:12374, +33461:12375, +33462:12376, +33463:12377, +33464:12378, +33465:12379, +33466:12380, +33467:12381, +33468:12382, +33469:12383, +33470:12384, +33471:12385, +33472:12386, +33473:12387, +33474:12388, +33475:12389, +33476:12390, +33477:12391, +33478:12392, +33479:12393, +33480:12394, +33481:12395, +33482:12396, +33483:12397, +33484:12398, +33485:12399, +33486:12400, +33487:12401, +33488:12402, +33489:12403, +33490:12404, +33491:12405, +33492:12406, +33493:12407, +33494:12408, +33495:12409, +33496:12410, +33497:12411, +33498:12412, +33499:12413, +33500:12414, +33501:12415, +33502:12416, +33503:12417, +33504:12418, +33505:12419, +33506:12420, +33507:12421, +33508:12422, +33509:12423, +33510:12424, +33511:12425, +33512:12426, +33513:12427, +33514:12428, +33515:12429, +33516:12430, +33517:12431, +33518:12432, +33519:12433, +33520:12434, +33521:12435, +33600:12449, +33601:12450, +33602:12451, +33603:12452, +33604:12453, +33605:12454, +33606:12455, +33607:12456, +33608:12457, +33609:12458, +33610:12459, +33611:12460, +33612:12461, +33613:12462, +33614:12463, +33615:12464, +33616:12465, +33617:12466, +33618:12467, +33619:12468, +33620:12469, +33621:12470, +33622:12471, +33623:12472, +33624:12473, +33625:12474, +33626:12475, +33627:12476, +33628:12477, +33629:12478, +33630:12479, +33631:12480, +33632:12481, +33633:12482, +33634:12483, +33635:12484, +33636:12485, +33637:12486, +33638:12487, +33639:12488, +33640:12489, +33641:12490, +33642:12491, +33643:12492, +33644:12493, +33645:12494, +33646:12495, +33647:12496, +33648:12497, +33649:12498, +33650:12499, +33651:12500, +33652:12501, +33653:12502, +33654:12503, +33655:12504, +33656:12505, +33657:12506, +33658:12507, +33659:12508, +33660:12509, +33661:12510, +33662:12511, +33664:12512, +33665:12513, +33666:12514, +33667:12515, +33668:12516, +33669:12517, +33670:12518, +33671:12519, +33672:12520, +33673:12521, +33674:12522, +33675:12523, +33676:12524, +33677:12525, +33678:12526, +33679:12527, +33680:12528, +33681:12529, +33682:12530, +33683:12531, +33684:12532, +33685:12533, +33686:12534, +33695:913, +33696:914, +33697:915, +33698:916, +33699:917, +33700:918, +33701:919, +33702:920, +33703:921, +33704:922, +33705:923, +33706:924, +33707:925, +33708:926, +33709:927, +33710:928, +33711:929, +33712:931, +33713:932, +33714:933, +33715:934, +33716:935, +33717:936, +33718:937, +33727:945, +33728:946, +33729:947, +33730:948, +33731:949, +33732:950, +33733:951, +33734:952, +33735:953, +33736:954, +33737:955, +33738:956, +33739:957, +33740:958, +33741:959, +33742:960, +33743:961, +33744:963, +33745:964, +33746:965, +33747:966, +33748:967, +33749:968, +33750:969, +33856:1040, +33857:1041, +33858:1042, +33859:1043, +33860:1044, +33861:1045, +33862:1025, +33863:1046, +33864:1047, +33865:1048, +33866:1049, +33867:1050, +33868:1051, +33869:1052, +33870:1053, +33871:1054, +33872:1055, +33873:1056, +33874:1057, +33875:1058, +33876:1059, +33877:1060, +33878:1061, +33879:1062, +33880:1063, +33881:1064, +33882:1065, +33883:1066, +33884:1067, +33885:1068, +33886:1069, +33887:1070, +33888:1071, +33904:1072, +33905:1073, +33906:1074, +33907:1075, +33908:1076, +33909:1077, +33910:1105, +33911:1078, +33912:1079, +33913:1080, +33914:1081, +33915:1082, +33916:1083, +33917:1084, +33918:1085, +33920:1086, +33921:1087, +33922:1088, +33923:1089, +33924:1090, +33925:1091, +33926:1092, +33927:1093, +33928:1094, +33929:1095, +33930:1096, +33931:1097, +33932:1098, +33933:1099, +33934:1100, +33935:1101, +33936:1102, +33937:1103, +33951:9472, +33952:9474, +33953:9484, +33954:9488, +33955:9496, +33956:9492, +33957:9500, +33958:9516, +33959:9508, +33960:9524, +33961:9532, +33962:9473, +33963:9475, +33964:9487, +33965:9491, +33966:9499, +33967:9495, +33968:9507, +33969:9523, +33970:9515, +33971:9531, +33972:9547, +33973:9504, +33974:9519, +33975:9512, +33976:9527, +33977:9535, +33978:9501, +33979:9520, +33980:9509, +33981:9528, +33982:9538, +34624:9312, +34625:9313, +34626:9314, +34627:9315, +34628:9316, +34629:9317, +34630:9318, +34631:9319, +34632:9320, +34633:9321, +34634:9322, +34635:9323, +34636:9324, +34637:9325, +34638:9326, +34639:9327, +34640:9328, +34641:9329, +34642:9330, +34643:9331, +34644:8544, +34645:8545, +34646:8546, +34647:8547, +34648:8548, +34649:8549, +34650:8550, +34651:8551, +34652:8552, +34653:8553, +34655:13129, +34656:13076, +34657:13090, +34658:13133, +34659:13080, +34660:13095, +34661:13059, +34662:13110, +34663:13137, +34664:13143, +34665:13069, +34666:13094, +34667:13091, +34668:13099, +34669:13130, +34670:13115, +34671:13212, +34672:13213, +34673:13214, +34674:13198, +34675:13199, +34676:13252, +34677:13217, +34686:13179, +34688:12317, +34689:12319, +34690:8470, +34691:13261, +34692:8481, +34693:12964, +34694:12965, +34695:12966, +34696:12967, +34697:12968, +34698:12849, +34699:12850, +34700:12857, +34701:13182, +34702:13181, +34703:13180, +34704:8786, +34705:8801, +34706:8747, +34707:8750, +34708:8721, +34709:8730, +34710:8869, +34711:8736, +34712:8735, +34713:8895, +34714:8757, +34715:8745, +34716:8746, +34975:20124, +34976:21782, +34977:23043, +34978:38463, +34979:21696, +34980:24859, +34981:25384, +34982:23030, +34983:36898, +34984:33909, +34985:33564, +34986:31312, +34987:24746, +34988:25569, +34989:28197, +34990:26093, +34991:33894, +34992:33446, +34993:39925, +34994:26771, +34995:22311, +34996:26017, +34997:25201, +34998:23451, +34999:22992, +35000:34427, +35001:39156, +35002:32098, +35003:32190, +35004:39822, +35005:25110, +35006:31903, +35007:34999, +35008:23433, +35009:24245, +35010:25353, +35011:26263, +35012:26696, +35013:38343, +35014:38797, +35015:26447, +35016:20197, +35017:20234, +35018:20301, +35019:20381, +35020:20553, +35021:22258, +35022:22839, +35023:22996, +35024:23041, +35025:23561, +35026:24799, +35027:24847, +35028:24944, +35029:26131, +35030:26885, +35031:28858, +35032:30031, +35033:30064, +35034:31227, +35035:32173, +35036:32239, +35037:32963, +35038:33806, +35039:34915, +35040:35586, +35041:36949, +35042:36986, +35043:21307, +35044:20117, +35045:20133, +35046:22495, +35047:32946, +35048:37057, +35049:30959, +35050:19968, +35051:22769, +35052:28322, +35053:36920, +35054:31282, +35055:33576, +35056:33419, +35057:39983, +35058:20801, +35059:21360, +35060:21693, +35061:21729, +35062:22240, +35063:23035, +35064:24341, +35065:39154, +35066:28139, +35067:32996, +35068:34093, +35136:38498, +35137:38512, +35138:38560, +35139:38907, +35140:21515, +35141:21491, +35142:23431, +35143:28879, +35144:32701, +35145:36802, +35146:38632, +35147:21359, +35148:40284, +35149:31418, +35150:19985, +35151:30867, +35152:33276, +35153:28198, +35154:22040, +35155:21764, +35156:27421, +35157:34074, +35158:39995, +35159:23013, +35160:21417, +35161:28006, +35162:29916, +35163:38287, +35164:22082, +35165:20113, +35166:36939, +35167:38642, +35168:33615, +35169:39180, +35170:21473, +35171:21942, +35172:23344, +35173:24433, +35174:26144, +35175:26355, +35176:26628, +35177:27704, +35178:27891, +35179:27945, +35180:29787, +35181:30408, +35182:31310, +35183:38964, +35184:33521, +35185:34907, +35186:35424, +35187:37613, +35188:28082, +35189:30123, +35190:30410, +35191:39365, +35192:24742, +35193:35585, +35194:36234, +35195:38322, +35196:27022, +35197:21421, +35198:20870, +35200:22290, +35201:22576, +35202:22852, +35203:23476, +35204:24310, +35205:24616, +35206:25513, +35207:25588, +35208:27839, +35209:28436, +35210:28814, +35211:28948, +35212:29017, +35213:29141, +35214:29503, +35215:32257, +35216:33398, +35217:33489, +35218:34199, +35219:36960, +35220:37467, +35221:40219, +35222:22633, +35223:26044, +35224:27738, +35225:29989, +35226:20985, +35227:22830, +35228:22885, +35229:24448, +35230:24540, +35231:25276, +35232:26106, +35233:27178, +35234:27431, +35235:27572, +35236:29579, +35237:32705, +35238:35158, +35239:40236, +35240:40206, +35241:40644, +35242:23713, +35243:27798, +35244:33659, +35245:20740, +35246:23627, +35247:25014, +35248:33222, +35249:26742, +35250:29281, +35251:20057, +35252:20474, +35253:21368, +35254:24681, +35255:28201, +35256:31311, +35257:38899, +35258:19979, +35259:21270, +35260:20206, +35261:20309, +35262:20285, +35263:20385, +35264:20339, +35265:21152, +35266:21487, +35267:22025, +35268:22799, +35269:23233, +35270:23478, +35271:23521, +35272:31185, +35273:26247, +35274:26524, +35275:26550, +35276:27468, +35277:27827, +35278:28779, +35279:29634, +35280:31117, +35281:31166, +35282:31292, +35283:31623, +35284:33457, +35285:33499, +35286:33540, +35287:33655, +35288:33775, +35289:33747, +35290:34662, +35291:35506, +35292:22057, +35293:36008, +35294:36838, +35295:36942, +35296:38686, +35297:34442, +35298:20420, +35299:23784, +35300:25105, +35301:29273, +35302:30011, +35303:33253, +35304:33469, +35305:34558, +35306:36032, +35307:38597, +35308:39187, +35309:39381, +35310:20171, +35311:20250, +35312:35299, +35313:22238, +35314:22602, +35315:22730, +35316:24315, +35317:24555, +35318:24618, +35319:24724, +35320:24674, +35321:25040, +35322:25106, +35323:25296, +35324:25913, +35392:39745, +35393:26214, +35394:26800, +35395:28023, +35396:28784, +35397:30028, +35398:30342, +35399:32117, +35400:33445, +35401:34809, +35402:38283, +35403:38542, +35404:35997, +35405:20977, +35406:21182, +35407:22806, +35408:21683, +35409:23475, +35410:23830, +35411:24936, +35412:27010, +35413:28079, +35414:30861, +35415:33995, +35416:34903, +35417:35442, +35418:37799, +35419:39608, +35420:28012, +35421:39336, +35422:34521, +35423:22435, +35424:26623, +35425:34510, +35426:37390, +35427:21123, +35428:22151, +35429:21508, +35430:24275, +35431:25313, +35432:25785, +35433:26684, +35434:26680, +35435:27579, +35436:29554, +35437:30906, +35438:31339, +35439:35226, +35440:35282, +35441:36203, +35442:36611, +35443:37101, +35444:38307, +35445:38548, +35446:38761, +35447:23398, +35448:23731, +35449:27005, +35450:38989, +35451:38990, +35452:25499, +35453:31520, +35454:27179, +35456:27263, +35457:26806, +35458:39949, +35459:28511, +35460:21106, +35461:21917, +35462:24688, +35463:25324, +35464:27963, +35465:28167, +35466:28369, +35467:33883, +35468:35088, +35469:36676, +35470:19988, +35471:39993, +35472:21494, +35473:26907, +35474:27194, +35475:38788, +35476:26666, +35477:20828, +35478:31427, +35479:33970, +35480:37340, +35481:37772, +35482:22107, +35483:40232, +35484:26658, +35485:33541, +35486:33841, +35487:31909, +35488:21000, +35489:33477, +35490:29926, +35491:20094, +35492:20355, +35493:20896, +35494:23506, +35495:21002, +35496:21208, +35497:21223, +35498:24059, +35499:21914, +35500:22570, +35501:23014, +35502:23436, +35503:23448, +35504:23515, +35505:24178, +35506:24185, +35507:24739, +35508:24863, +35509:24931, +35510:25022, +35511:25563, +35512:25954, +35513:26577, +35514:26707, +35515:26874, +35516:27454, +35517:27475, +35518:27735, +35519:28450, +35520:28567, +35521:28485, +35522:29872, +35523:29976, +35524:30435, +35525:30475, +35526:31487, +35527:31649, +35528:31777, +35529:32233, +35530:32566, +35531:32752, +35532:32925, +35533:33382, +35534:33694, +35535:35251, +35536:35532, +35537:36011, +35538:36996, +35539:37969, +35540:38291, +35541:38289, +35542:38306, +35543:38501, +35544:38867, +35545:39208, +35546:33304, +35547:20024, +35548:21547, +35549:23736, +35550:24012, +35551:29609, +35552:30284, +35553:30524, +35554:23721, +35555:32747, +35556:36107, +35557:38593, +35558:38929, +35559:38996, +35560:39000, +35561:20225, +35562:20238, +35563:21361, +35564:21916, +35565:22120, +35566:22522, +35567:22855, +35568:23305, +35569:23492, +35570:23696, +35571:24076, +35572:24190, +35573:24524, +35574:25582, +35575:26426, +35576:26071, +35577:26082, +35578:26399, +35579:26827, +35580:26820, +35648:27231, +35649:24112, +35650:27589, +35651:27671, +35652:27773, +35653:30079, +35654:31048, +35655:23395, +35656:31232, +35657:32000, +35658:24509, +35659:35215, +35660:35352, +35661:36020, +35662:36215, +35663:36556, +35664:36637, +35665:39138, +35666:39438, +35667:39740, +35668:20096, +35669:20605, +35670:20736, +35671:22931, +35672:23452, +35673:25135, +35674:25216, +35675:25836, +35676:27450, +35677:29344, +35678:30097, +35679:31047, +35680:32681, +35681:34811, +35682:35516, +35683:35696, +35684:25516, +35685:33738, +35686:38816, +35687:21513, +35688:21507, +35689:21931, +35690:26708, +35691:27224, +35692:35440, +35693:30759, +35694:26485, +35695:40653, +35696:21364, +35697:23458, +35698:33050, +35699:34384, +35700:36870, +35701:19992, +35702:20037, +35703:20167, +35704:20241, +35705:21450, +35706:21560, +35707:23470, +35708:24339, +35709:24613, +35710:25937, +35712:26429, +35713:27714, +35714:27762, +35715:27875, +35716:28792, +35717:29699, +35718:31350, +35719:31406, +35720:31496, +35721:32026, +35722:31998, +35723:32102, +35724:26087, +35725:29275, +35726:21435, +35727:23621, +35728:24040, +35729:25298, +35730:25312, +35731:25369, +35732:28192, +35733:34394, +35734:35377, +35735:36317, +35736:37624, +35737:28417, +35738:31142, +35739:39770, +35740:20136, +35741:20139, +35742:20140, +35743:20379, +35744:20384, +35745:20689, +35746:20807, +35747:31478, +35748:20849, +35749:20982, +35750:21332, +35751:21281, +35752:21375, +35753:21483, +35754:21932, +35755:22659, +35756:23777, +35757:24375, +35758:24394, +35759:24623, +35760:24656, +35761:24685, +35762:25375, +35763:25945, +35764:27211, +35765:27841, +35766:29378, +35767:29421, +35768:30703, +35769:33016, +35770:33029, +35771:33288, +35772:34126, +35773:37111, +35774:37857, +35775:38911, +35776:39255, +35777:39514, +35778:20208, +35779:20957, +35780:23597, +35781:26241, +35782:26989, +35783:23616, +35784:26354, +35785:26997, +35786:29577, +35787:26704, +35788:31873, +35789:20677, +35790:21220, +35791:22343, +35792:24062, +35793:37670, +35794:26020, +35795:27427, +35796:27453, +35797:29748, +35798:31105, +35799:31165, +35800:31563, +35801:32202, +35802:33465, +35803:33740, +35804:34943, +35805:35167, +35806:35641, +35807:36817, +35808:37329, +35809:21535, +35810:37504, +35811:20061, +35812:20534, +35813:21477, +35814:21306, +35815:29399, +35816:29590, +35817:30697, +35818:33510, +35819:36527, +35820:39366, +35821:39368, +35822:39378, +35823:20855, +35824:24858, +35825:34398, +35826:21936, +35827:31354, +35828:20598, +35829:23507, +35830:36935, +35831:38533, +35832:20018, +35833:27355, +35834:37351, +35835:23633, +35836:23624, +35904:25496, +35905:31391, +35906:27795, +35907:38772, +35908:36705, +35909:31402, +35910:29066, +35911:38536, +35912:31874, +35913:26647, +35914:32368, +35915:26705, +35916:37740, +35917:21234, +35918:21531, +35919:34219, +35920:35347, +35921:32676, +35922:36557, +35923:37089, +35924:21350, +35925:34952, +35926:31041, +35927:20418, +35928:20670, +35929:21009, +35930:20804, +35931:21843, +35932:22317, +35933:29674, +35934:22411, +35935:22865, +35936:24418, +35937:24452, +35938:24693, +35939:24950, +35940:24935, +35941:25001, +35942:25522, +35943:25658, +35944:25964, +35945:26223, +35946:26690, +35947:28179, +35948:30054, +35949:31293, +35950:31995, +35951:32076, +35952:32153, +35953:32331, +35954:32619, +35955:33550, +35956:33610, +35957:34509, +35958:35336, +35959:35427, +35960:35686, +35961:36605, +35962:38938, +35963:40335, +35964:33464, +35965:36814, +35966:39912, +35968:21127, +35969:25119, +35970:25731, +35971:28608, +35972:38553, +35973:26689, +35974:20625, +35975:27424, +35976:27770, +35977:28500, +35978:31348, +35979:32080, +35980:34880, +35981:35363, +35982:26376, +35983:20214, +35984:20537, +35985:20518, +35986:20581, +35987:20860, +35988:21048, +35989:21091, +35990:21927, +35991:22287, +35992:22533, +35993:23244, +35994:24314, +35995:25010, +35996:25080, +35997:25331, +35998:25458, +35999:26908, +36000:27177, +36001:29309, +36002:29356, +36003:29486, +36004:30740, +36005:30831, +36006:32121, +36007:30476, +36008:32937, +36009:35211, +36010:35609, +36011:36066, +36012:36562, +36013:36963, +36014:37749, +36015:38522, +36016:38997, +36017:39443, +36018:40568, +36019:20803, +36020:21407, +36021:21427, +36022:24187, +36023:24358, +36024:28187, +36025:28304, +36026:29572, +36027:29694, +36028:32067, +36029:33335, +36030:35328, +36031:35578, +36032:38480, +36033:20046, +36034:20491, +36035:21476, +36036:21628, +36037:22266, +36038:22993, +36039:23396, +36040:24049, +36041:24235, +36042:24359, +36043:25144, +36044:25925, +36045:26543, +36046:28246, +36047:29392, +36048:31946, +36049:34996, +36050:32929, +36051:32993, +36052:33776, +36053:34382, +36054:35463, +36055:36328, +36056:37431, +36057:38599, +36058:39015, +36059:40723, +36060:20116, +36061:20114, +36062:20237, +36063:21320, +36064:21577, +36065:21566, +36066:23087, +36067:24460, +36068:24481, +36069:24735, +36070:26791, +36071:27278, +36072:29786, +36073:30849, +36074:35486, +36075:35492, +36076:35703, +36077:37264, +36078:20062, +36079:39881, +36080:20132, +36081:20348, +36082:20399, +36083:20505, +36084:20502, +36085:20809, +36086:20844, +36087:21151, +36088:21177, +36089:21246, +36090:21402, +36091:21475, +36092:21521, +36160:21518, +36161:21897, +36162:22353, +36163:22434, +36164:22909, +36165:23380, +36166:23389, +36167:23439, +36168:24037, +36169:24039, +36170:24055, +36171:24184, +36172:24195, +36173:24218, +36174:24247, +36175:24344, +36176:24658, +36177:24908, +36178:25239, +36179:25304, +36180:25511, +36181:25915, +36182:26114, +36183:26179, +36184:26356, +36185:26477, +36186:26657, +36187:26775, +36188:27083, +36189:27743, +36190:27946, +36191:28009, +36192:28207, +36193:28317, +36194:30002, +36195:30343, +36196:30828, +36197:31295, +36198:31968, +36199:32005, +36200:32024, +36201:32094, +36202:32177, +36203:32789, +36204:32771, +36205:32943, +36206:32945, +36207:33108, +36208:33167, +36209:33322, +36210:33618, +36211:34892, +36212:34913, +36213:35611, +36214:36002, +36215:36092, +36216:37066, +36217:37237, +36218:37489, +36219:30783, +36220:37628, +36221:38308, +36222:38477, +36224:38917, +36225:39321, +36226:39640, +36227:40251, +36228:21083, +36229:21163, +36230:21495, +36231:21512, +36232:22741, +36233:25335, +36234:28640, +36235:35946, +36236:36703, +36237:40633, +36238:20811, +36239:21051, +36240:21578, +36241:22269, +36242:31296, +36243:37239, +36244:40288, +36245:40658, +36246:29508, +36247:28425, +36248:33136, +36249:29969, +36250:24573, +36251:24794, +36252:39592, +36253:29403, +36254:36796, +36255:27492, +36256:38915, +36257:20170, +36258:22256, +36259:22372, +36260:22718, +36261:23130, +36262:24680, +36263:25031, +36264:26127, +36265:26118, +36266:26681, +36267:26801, +36268:28151, +36269:30165, +36270:32058, +36271:33390, +36272:39746, +36273:20123, +36274:20304, +36275:21449, +36276:21766, +36277:23919, +36278:24038, +36279:24046, +36280:26619, +36281:27801, +36282:29811, +36283:30722, +36284:35408, +36285:37782, +36286:35039, +36287:22352, +36288:24231, +36289:25387, +36290:20661, +36291:20652, +36292:20877, +36293:26368, +36294:21705, +36295:22622, +36296:22971, +36297:23472, +36298:24425, +36299:25165, +36300:25505, +36301:26685, +36302:27507, +36303:28168, +36304:28797, +36305:37319, +36306:29312, +36307:30741, +36308:30758, +36309:31085, +36310:25998, +36311:32048, +36312:33756, +36313:35009, +36314:36617, +36315:38555, +36316:21092, +36317:22312, +36318:26448, +36319:32618, +36320:36001, +36321:20916, +36322:22338, +36323:38442, +36324:22586, +36325:27018, +36326:32948, +36327:21682, +36328:23822, +36329:22524, +36330:30869, +36331:40442, +36332:20316, +36333:21066, +36334:21643, +36335:25662, +36336:26152, +36337:26388, +36338:26613, +36339:31364, +36340:31574, +36341:32034, +36342:37679, +36343:26716, +36344:39853, +36345:31545, +36346:21273, +36347:20874, +36348:21047, +36416:23519, +36417:25334, +36418:25774, +36419:25830, +36420:26413, +36421:27578, +36422:34217, +36423:38609, +36424:30352, +36425:39894, +36426:25420, +36427:37638, +36428:39851, +36429:30399, +36430:26194, +36431:19977, +36432:20632, +36433:21442, +36434:23665, +36435:24808, +36436:25746, +36437:25955, +36438:26719, +36439:29158, +36440:29642, +36441:29987, +36442:31639, +36443:32386, +36444:34453, +36445:35715, +36446:36059, +36447:37240, +36448:39184, +36449:26028, +36450:26283, +36451:27531, +36452:20181, +36453:20180, +36454:20282, +36455:20351, +36456:21050, +36457:21496, +36458:21490, +36459:21987, +36460:22235, +36461:22763, +36462:22987, +36463:22985, +36464:23039, +36465:23376, +36466:23629, +36467:24066, +36468:24107, +36469:24535, +36470:24605, +36471:25351, +36472:25903, +36473:23388, +36474:26031, +36475:26045, +36476:26088, +36477:26525, +36478:27490, +36480:27515, +36481:27663, +36482:29509, +36483:31049, +36484:31169, +36485:31992, +36486:32025, +36487:32043, +36488:32930, +36489:33026, +36490:33267, +36491:35222, +36492:35422, +36493:35433, +36494:35430, +36495:35468, +36496:35566, +36497:36039, +36498:36060, +36499:38604, +36500:39164, +36501:27503, +36502:20107, +36503:20284, +36504:20365, +36505:20816, +36506:23383, +36507:23546, +36508:24904, +36509:25345, +36510:26178, +36511:27425, +36512:28363, +36513:27835, +36514:29246, +36515:29885, +36516:30164, +36517:30913, +36518:31034, +36519:32780, +36520:32819, +36521:33258, +36522:33940, +36523:36766, +36524:27728, +36525:40575, +36526:24335, +36527:35672, +36528:40235, +36529:31482, +36530:36600, +36531:23437, +36532:38635, +36533:19971, +36534:21489, +36535:22519, +36536:22833, +36537:23241, +36538:23460, +36539:24713, +36540:28287, +36541:28422, +36542:30142, +36543:36074, +36544:23455, +36545:34048, +36546:31712, +36547:20594, +36548:26612, +36549:33437, +36550:23649, +36551:34122, +36552:32286, +36553:33294, +36554:20889, +36555:23556, +36556:25448, +36557:36198, +36558:26012, +36559:29038, +36560:31038, +36561:32023, +36562:32773, +36563:35613, +36564:36554, +36565:36974, +36566:34503, +36567:37034, +36568:20511, +36569:21242, +36570:23610, +36571:26451, +36572:28796, +36573:29237, +36574:37196, +36575:37320, +36576:37675, +36577:33509, +36578:23490, +36579:24369, +36580:24825, +36581:20027, +36582:21462, +36583:23432, +36584:25163, +36585:26417, +36586:27530, +36587:29417, +36588:29664, +36589:31278, +36590:33131, +36591:36259, +36592:37202, +36593:39318, +36594:20754, +36595:21463, +36596:21610, +36597:23551, +36598:25480, +36599:27193, +36600:32172, +36601:38656, +36602:22234, +36603:21454, +36604:21608, +36672:23447, +36673:23601, +36674:24030, +36675:20462, +36676:24833, +36677:25342, +36678:27954, +36679:31168, +36680:31179, +36681:32066, +36682:32333, +36683:32722, +36684:33261, +36685:33311, +36686:33936, +36687:34886, +36688:35186, +36689:35728, +36690:36468, +36691:36655, +36692:36913, +36693:37195, +36694:37228, +36695:38598, +36696:37276, +36697:20160, +36698:20303, +36699:20805, +36700:21313, +36701:24467, +36702:25102, +36703:26580, +36704:27713, +36705:28171, +36706:29539, +36707:32294, +36708:37325, +36709:37507, +36710:21460, +36711:22809, +36712:23487, +36713:28113, +36714:31069, +36715:32302, +36716:31899, +36717:22654, +36718:29087, +36719:20986, +36720:34899, +36721:36848, +36722:20426, +36723:23803, +36724:26149, +36725:30636, +36726:31459, +36727:33308, +36728:39423, +36729:20934, +36730:24490, +36731:26092, +36732:26991, +36733:27529, +36734:28147, +36736:28310, +36737:28516, +36738:30462, +36739:32020, +36740:24033, +36741:36981, +36742:37255, +36743:38918, +36744:20966, +36745:21021, +36746:25152, +36747:26257, +36748:26329, +36749:28186, +36750:24246, +36751:32210, +36752:32626, +36753:26360, +36754:34223, +36755:34295, +36756:35576, +36757:21161, +36758:21465, +36759:22899, +36760:24207, +36761:24464, +36762:24661, +36763:37604, +36764:38500, +36765:20663, +36766:20767, +36767:21213, +36768:21280, +36769:21319, +36770:21484, +36771:21736, +36772:21830, +36773:21809, +36774:22039, +36775:22888, +36776:22974, +36777:23100, +36778:23477, +36779:23558, +36780:23567, +36781:23569, +36782:23578, +36783:24196, +36784:24202, +36785:24288, +36786:24432, +36787:25215, +36788:25220, +36789:25307, +36790:25484, +36791:25463, +36792:26119, +36793:26124, +36794:26157, +36795:26230, +36796:26494, +36797:26786, +36798:27167, +36799:27189, +36800:27836, +36801:28040, +36802:28169, +36803:28248, +36804:28988, +36805:28966, +36806:29031, +36807:30151, +36808:30465, +36809:30813, +36810:30977, +36811:31077, +36812:31216, +36813:31456, +36814:31505, +36815:31911, +36816:32057, +36817:32918, +36818:33750, +36819:33931, +36820:34121, +36821:34909, +36822:35059, +36823:35359, +36824:35388, +36825:35412, +36826:35443, +36827:35937, +36828:36062, +36829:37284, +36830:37478, +36831:37758, +36832:37912, +36833:38556, +36834:38808, +36835:19978, +36836:19976, +36837:19998, +36838:20055, +36839:20887, +36840:21104, +36841:22478, +36842:22580, +36843:22732, +36844:23330, +36845:24120, +36846:24773, +36847:25854, +36848:26465, +36849:26454, +36850:27972, +36851:29366, +36852:30067, +36853:31331, +36854:33976, +36855:35698, +36856:37304, +36857:37664, +36858:22065, +36859:22516, +36860:39166, +36928:25325, +36929:26893, +36930:27542, +36931:29165, +36932:32340, +36933:32887, +36934:33394, +36935:35302, +36936:39135, +36937:34645, +36938:36785, +36939:23611, +36940:20280, +36941:20449, +36942:20405, +36943:21767, +36944:23072, +36945:23517, +36946:23529, +36947:24515, +36948:24910, +36949:25391, +36950:26032, +36951:26187, +36952:26862, +36953:27035, +36954:28024, +36955:28145, +36956:30003, +36957:30137, +36958:30495, +36959:31070, +36960:31206, +36961:32051, +36962:33251, +36963:33455, +36964:34218, +36965:35242, +36966:35386, +36967:36523, +36968:36763, +36969:36914, +36970:37341, +36971:38663, +36972:20154, +36973:20161, +36974:20995, +36975:22645, +36976:22764, +36977:23563, +36978:29978, +36979:23613, +36980:33102, +36981:35338, +36982:36805, +36983:38499, +36984:38765, +36985:31525, +36986:35535, +36987:38920, +36988:37218, +36989:22259, +36990:21416, +36992:36887, +36993:21561, +36994:22402, +36995:24101, +36996:25512, +36997:27700, +36998:28810, +36999:30561, +37000:31883, +37001:32736, +37002:34928, +37003:36930, +37004:37204, +37005:37648, +37006:37656, +37007:38543, +37008:29790, +37009:39620, +37010:23815, +37011:23913, +37012:25968, +37013:26530, +37014:36264, +37015:38619, +37016:25454, +37017:26441, +37018:26905, +37019:33733, +37020:38935, +37021:38592, +37022:35070, +37023:28548, +37024:25722, +37025:23544, +37026:19990, +37027:28716, +37028:30045, +37029:26159, +37030:20932, +37031:21046, +37032:21218, +37033:22995, +37034:24449, +37035:24615, +37036:25104, +37037:25919, +37038:25972, +37039:26143, +37040:26228, +37041:26866, +37042:26646, +37043:27491, +37044:28165, +37045:29298, +37046:29983, +37047:30427, +37048:31934, +37049:32854, +37050:22768, +37051:35069, +37052:35199, +37053:35488, +37054:35475, +37055:35531, +37056:36893, +37057:37266, +37058:38738, +37059:38745, +37060:25993, +37061:31246, +37062:33030, +37063:38587, +37064:24109, +37065:24796, +37066:25114, +37067:26021, +37068:26132, +37069:26512, +37070:30707, +37071:31309, +37072:31821, +37073:32318, +37074:33034, +37075:36012, +37076:36196, +37077:36321, +37078:36447, +37079:30889, +37080:20999, +37081:25305, +37082:25509, +37083:25666, +37084:25240, +37085:35373, +37086:31363, +37087:31680, +37088:35500, +37089:38634, +37090:32118, +37091:33292, +37092:34633, +37093:20185, +37094:20808, +37095:21315, +37096:21344, +37097:23459, +37098:23554, +37099:23574, +37100:24029, +37101:25126, +37102:25159, +37103:25776, +37104:26643, +37105:26676, +37106:27849, +37107:27973, +37108:27927, +37109:26579, +37110:28508, +37111:29006, +37112:29053, +37113:26059, +37114:31359, +37115:31661, +37116:32218, +37184:32330, +37185:32680, +37186:33146, +37187:33307, +37188:33337, +37189:34214, +37190:35438, +37191:36046, +37192:36341, +37193:36984, +37194:36983, +37195:37549, +37196:37521, +37197:38275, +37198:39854, +37199:21069, +37200:21892, +37201:28472, +37202:28982, +37203:20840, +37204:31109, +37205:32341, +37206:33203, +37207:31950, +37208:22092, +37209:22609, +37210:23720, +37211:25514, +37212:26366, +37213:26365, +37214:26970, +37215:29401, +37216:30095, +37217:30094, +37218:30990, +37219:31062, +37220:31199, +37221:31895, +37222:32032, +37223:32068, +37224:34311, +37225:35380, +37226:38459, +37227:36961, +37228:40736, +37229:20711, +37230:21109, +37231:21452, +37232:21474, +37233:20489, +37234:21930, +37235:22766, +37236:22863, +37237:29245, +37238:23435, +37239:23652, +37240:21277, +37241:24803, +37242:24819, +37243:25436, +37244:25475, +37245:25407, +37246:25531, +37248:25805, +37249:26089, +37250:26361, +37251:24035, +37252:27085, +37253:27133, +37254:28437, +37255:29157, +37256:20105, +37257:30185, +37258:30456, +37259:31379, +37260:31967, +37261:32207, +37262:32156, +37263:32865, +37264:33609, +37265:33624, +37266:33900, +37267:33980, +37268:34299, +37269:35013, +37270:36208, +37271:36865, +37272:36973, +37273:37783, +37274:38684, +37275:39442, +37276:20687, +37277:22679, +37278:24974, +37279:33235, +37280:34101, +37281:36104, +37282:36896, +37283:20419, +37284:20596, +37285:21063, +37286:21363, +37287:24687, +37288:25417, +37289:26463, +37290:28204, +37291:36275, +37292:36895, +37293:20439, +37294:23646, +37295:36042, +37296:26063, +37297:32154, +37298:21330, +37299:34966, +37300:20854, +37301:25539, +37302:23384, +37303:23403, +37304:23562, +37305:25613, +37306:26449, +37307:36956, +37308:20182, +37309:22810, +37310:22826, +37311:27760, +37312:35409, +37313:21822, +37314:22549, +37315:22949, +37316:24816, +37317:25171, +37318:26561, +37319:33333, +37320:26965, +37321:38464, +37322:39364, +37323:39464, +37324:20307, +37325:22534, +37326:23550, +37327:32784, +37328:23729, +37329:24111, +37330:24453, +37331:24608, +37332:24907, +37333:25140, +37334:26367, +37335:27888, +37336:28382, +37337:32974, +37338:33151, +37339:33492, +37340:34955, +37341:36024, +37342:36864, +37343:36910, +37344:38538, +37345:40667, +37346:39899, +37347:20195, +37348:21488, +37349:22823, +37350:31532, +37351:37261, +37352:38988, +37353:40441, +37354:28381, +37355:28711, +37356:21331, +37357:21828, +37358:23429, +37359:25176, +37360:25246, +37361:25299, +37362:27810, +37363:28655, +37364:29730, +37365:35351, +37366:37944, +37367:28609, +37368:35582, +37369:33592, +37370:20967, +37371:34552, +37372:21482, +37440:21481, +37441:20294, +37442:36948, +37443:36784, +37444:22890, +37445:33073, +37446:24061, +37447:31466, +37448:36799, +37449:26842, +37450:35895, +37451:29432, +37452:40008, +37453:27197, +37454:35504, +37455:20025, +37456:21336, +37457:22022, +37458:22374, +37459:25285, +37460:25506, +37461:26086, +37462:27470, +37463:28129, +37464:28251, +37465:28845, +37466:30701, +37467:31471, +37468:31658, +37469:32187, +37470:32829, +37471:32966, +37472:34507, +37473:35477, +37474:37723, +37475:22243, +37476:22727, +37477:24382, +37478:26029, +37479:26262, +37480:27264, +37481:27573, +37482:30007, +37483:35527, +37484:20516, +37485:30693, +37486:22320, +37487:24347, +37488:24677, +37489:26234, +37490:27744, +37491:30196, +37492:31258, +37493:32622, +37494:33268, +37495:34584, +37496:36933, +37497:39347, +37498:31689, +37499:30044, +37500:31481, +37501:31569, +37502:33988, +37504:36880, +37505:31209, +37506:31378, +37507:33590, +37508:23265, +37509:30528, +37510:20013, +37511:20210, +37512:23449, +37513:24544, +37514:25277, +37515:26172, +37516:26609, +37517:27880, +37518:34411, +37519:34935, +37520:35387, +37521:37198, +37522:37619, +37523:39376, +37524:27159, +37525:28710, +37526:29482, +37527:33511, +37528:33879, +37529:36015, +37530:19969, +37531:20806, +37532:20939, +37533:21899, +37534:23541, +37535:24086, +37536:24115, +37537:24193, +37538:24340, +37539:24373, +37540:24427, +37541:24500, +37542:25074, +37543:25361, +37544:26274, +37545:26397, +37546:28526, +37547:29266, +37548:30010, +37549:30522, +37550:32884, +37551:33081, +37552:33144, +37553:34678, +37554:35519, +37555:35548, +37556:36229, +37557:36339, +37558:37530, +37559:38263, +37560:38914, +37561:40165, +37562:21189, +37563:25431, +37564:30452, +37565:26389, +37566:27784, +37567:29645, +37568:36035, +37569:37806, +37570:38515, +37571:27941, +37572:22684, +37573:26894, +37574:27084, +37575:36861, +37576:37786, +37577:30171, +37578:36890, +37579:22618, +37580:26626, +37581:25524, +37582:27131, +37583:20291, +37584:28460, +37585:26584, +37586:36795, +37587:34086, +37588:32180, +37589:37716, +37590:26943, +37591:28528, +37592:22378, +37593:22775, +37594:23340, +37595:32044, +37596:29226, +37597:21514, +37598:37347, +37599:40372, +37600:20141, +37601:20302, +37602:20572, +37603:20597, +37604:21059, +37605:35998, +37606:21576, +37607:22564, +37608:23450, +37609:24093, +37610:24213, +37611:24237, +37612:24311, +37613:24351, +37614:24716, +37615:25269, +37616:25402, +37617:25552, +37618:26799, +37619:27712, +37620:30855, +37621:31118, +37622:31243, +37623:32224, +37624:33351, +37625:35330, +37626:35558, +37627:36420, +37628:36883, +37696:37048, +37697:37165, +37698:37336, +37699:40718, +37700:27877, +37701:25688, +37702:25826, +37703:25973, +37704:28404, +37705:30340, +37706:31515, +37707:36969, +37708:37841, +37709:28346, +37710:21746, +37711:24505, +37712:25764, +37713:36685, +37714:36845, +37715:37444, +37716:20856, +37717:22635, +37718:22825, +37719:23637, +37720:24215, +37721:28155, +37722:32399, +37723:29980, +37724:36028, +37725:36578, +37726:39003, +37727:28857, +37728:20253, +37729:27583, +37730:28593, +37731:30000, +37732:38651, +37733:20814, +37734:21520, +37735:22581, +37736:22615, +37737:22956, +37738:23648, +37739:24466, +37740:26007, +37741:26460, +37742:28193, +37743:30331, +37744:33759, +37745:36077, +37746:36884, +37747:37117, +37748:37709, +37749:30757, +37750:30778, +37751:21162, +37752:24230, +37753:22303, +37754:22900, +37755:24594, +37756:20498, +37757:20826, +37758:20908, +37760:20941, +37761:20992, +37762:21776, +37763:22612, +37764:22616, +37765:22871, +37766:23445, +37767:23798, +37768:23947, +37769:24764, +37770:25237, +37771:25645, +37772:26481, +37773:26691, +37774:26812, +37775:26847, +37776:30423, +37777:28120, +37778:28271, +37779:28059, +37780:28783, +37781:29128, +37782:24403, +37783:30168, +37784:31095, +37785:31561, +37786:31572, +37787:31570, +37788:31958, +37789:32113, +37790:21040, +37791:33891, +37792:34153, +37793:34276, +37794:35342, +37795:35588, +37796:35910, +37797:36367, +37798:36867, +37799:36879, +37800:37913, +37801:38518, +37802:38957, +37803:39472, +37804:38360, +37805:20685, +37806:21205, +37807:21516, +37808:22530, +37809:23566, +37810:24999, +37811:25758, +37812:27934, +37813:30643, +37814:31461, +37815:33012, +37816:33796, +37817:36947, +37818:37509, +37819:23776, +37820:40199, +37821:21311, +37822:24471, +37823:24499, +37824:28060, +37825:29305, +37826:30563, +37827:31167, +37828:31716, +37829:27602, +37830:29420, +37831:35501, +37832:26627, +37833:27233, +37834:20984, +37835:31361, +37836:26932, +37837:23626, +37838:40182, +37839:33515, +37840:23493, +37841:37193, +37842:28702, +37843:22136, +37844:23663, +37845:24775, +37846:25958, +37847:27788, +37848:35930, +37849:36929, +37850:38931, +37851:21585, +37852:26311, +37853:37389, +37854:22856, +37855:37027, +37856:20869, +37857:20045, +37858:20970, +37859:34201, +37860:35598, +37861:28760, +37862:25466, +37863:37707, +37864:26978, +37865:39348, +37866:32260, +37867:30071, +37868:21335, +37869:26976, +37870:36575, +37871:38627, +37872:27741, +37873:20108, +37874:23612, +37875:24336, +37876:36841, +37877:21250, +37878:36049, +37879:32905, +37880:34425, +37881:24319, +37882:26085, +37883:20083, +37884:20837, +37952:22914, +37953:23615, +37954:38894, +37955:20219, +37956:22922, +37957:24525, +37958:35469, +37959:28641, +37960:31152, +37961:31074, +37962:23527, +37963:33905, +37964:29483, +37965:29105, +37966:24180, +37967:24565, +37968:25467, +37969:25754, +37970:29123, +37971:31896, +37972:20035, +37973:24316, +37974:20043, +37975:22492, +37976:22178, +37977:24745, +37978:28611, +37979:32013, +37980:33021, +37981:33075, +37982:33215, +37983:36786, +37984:35223, +37985:34468, +37986:24052, +37987:25226, +37988:25773, +37989:35207, +37990:26487, +37991:27874, +37992:27966, +37993:29750, +37994:30772, +37995:23110, +37996:32629, +37997:33453, +37998:39340, +37999:20467, +38000:24259, +38001:25309, +38002:25490, +38003:25943, +38004:26479, +38005:30403, +38006:29260, +38007:32972, +38008:32954, +38009:36649, +38010:37197, +38011:20493, +38012:22521, +38013:23186, +38014:26757, +38016:26995, +38017:29028, +38018:29437, +38019:36023, +38020:22770, +38021:36064, +38022:38506, +38023:36889, +38024:34687, +38025:31204, +38026:30695, +38027:33833, +38028:20271, +38029:21093, +38030:21338, +38031:25293, +38032:26575, +38033:27850, +38034:30333, +38035:31636, +38036:31893, +38037:33334, +38038:34180, +38039:36843, +38040:26333, +38041:28448, +38042:29190, +38043:32283, +38044:33707, +38045:39361, +38046:40614, +38047:20989, +38048:31665, +38049:30834, +38050:31672, +38051:32903, +38052:31560, +38053:27368, +38054:24161, +38055:32908, +38056:30033, +38057:30048, +38058:20843, +38059:37474, +38060:28300, +38061:30330, +38062:37271, +38063:39658, +38064:20240, +38065:32624, +38066:25244, +38067:31567, +38068:38309, +38069:40169, +38070:22138, +38071:22617, +38072:34532, +38073:38588, +38074:20276, +38075:21028, +38076:21322, +38077:21453, +38078:21467, +38079:24070, +38080:25644, +38081:26001, +38082:26495, +38083:27710, +38084:27726, +38085:29256, +38086:29359, +38087:29677, +38088:30036, +38089:32321, +38090:33324, +38091:34281, +38092:36009, +38093:31684, +38094:37318, +38095:29033, +38096:38930, +38097:39151, +38098:25405, +38099:26217, +38100:30058, +38101:30436, +38102:30928, +38103:34115, +38104:34542, +38105:21290, +38106:21329, +38107:21542, +38108:22915, +38109:24199, +38110:24444, +38111:24754, +38112:25161, +38113:25209, +38114:25259, +38115:26000, +38116:27604, +38117:27852, +38118:30130, +38119:30382, +38120:30865, +38121:31192, +38122:32203, +38123:32631, +38124:32933, +38125:34987, +38126:35513, +38127:36027, +38128:36991, +38129:38750, +38130:39131, +38131:27147, +38132:31800, +38133:20633, +38134:23614, +38135:24494, +38136:26503, +38137:27608, +38138:29749, +38139:30473, +38140:32654, +38208:40763, +38209:26570, +38210:31255, +38211:21305, +38212:30091, +38213:39661, +38214:24422, +38215:33181, +38216:33777, +38217:32920, +38218:24380, +38219:24517, +38220:30050, +38221:31558, +38222:36924, +38223:26727, +38224:23019, +38225:23195, +38226:32016, +38227:30334, +38228:35628, +38229:20469, +38230:24426, +38231:27161, +38232:27703, +38233:28418, +38234:29922, +38235:31080, +38236:34920, +38237:35413, +38238:35961, +38239:24287, +38240:25551, +38241:30149, +38242:31186, +38243:33495, +38244:37672, +38245:37618, +38246:33948, +38247:34541, +38248:39981, +38249:21697, +38250:24428, +38251:25996, +38252:27996, +38253:28693, +38254:36007, +38255:36051, +38256:38971, +38257:25935, +38258:29942, +38259:19981, +38260:20184, +38261:22496, +38262:22827, +38263:23142, +38264:23500, +38265:20904, +38266:24067, +38267:24220, +38268:24598, +38269:25206, +38270:25975, +38272:26023, +38273:26222, +38274:28014, +38275:29238, +38276:31526, +38277:33104, +38278:33178, +38279:33433, +38280:35676, +38281:36000, +38282:36070, +38283:36212, +38284:38428, +38285:38468, +38286:20398, +38287:25771, +38288:27494, +38289:33310, +38290:33889, +38291:34154, +38292:37096, +38293:23553, +38294:26963, +38295:39080, +38296:33914, +38297:34135, +38298:20239, +38299:21103, +38300:24489, +38301:24133, +38302:26381, +38303:31119, +38304:33145, +38305:35079, +38306:35206, +38307:28149, +38308:24343, +38309:25173, +38310:27832, +38311:20175, +38312:29289, +38313:39826, +38314:20998, +38315:21563, +38316:22132, +38317:22707, +38318:24996, +38319:25198, +38320:28954, +38321:22894, +38322:31881, +38323:31966, +38324:32027, +38325:38640, +38326:25991, +38327:32862, +38328:19993, +38329:20341, +38330:20853, +38331:22592, +38332:24163, +38333:24179, +38334:24330, +38335:26564, +38336:20006, +38337:34109, +38338:38281, +38339:38491, +38340:31859, +38341:38913, +38342:20731, +38343:22721, +38344:30294, +38345:30887, +38346:21029, +38347:30629, +38348:34065, +38349:31622, +38350:20559, +38351:22793, +38352:29255, +38353:31687, +38354:32232, +38355:36794, +38356:36820, +38357:36941, +38358:20415, +38359:21193, +38360:23081, +38361:24321, +38362:38829, +38363:20445, +38364:33303, +38365:37610, +38366:22275, +38367:25429, +38368:27497, +38369:29995, +38370:35036, +38371:36628, +38372:31298, +38373:21215, +38374:22675, +38375:24917, +38376:25098, +38377:26286, +38378:27597, +38379:31807, +38380:33769, +38381:20515, +38382:20472, +38383:21253, +38384:21574, +38385:22577, +38386:22857, +38387:23453, +38388:23792, +38389:23791, +38390:23849, +38391:24214, +38392:25265, +38393:25447, +38394:25918, +38395:26041, +38396:26379, +38464:27861, +38465:27873, +38466:28921, +38467:30770, +38468:32299, +38469:32990, +38470:33459, +38471:33804, +38472:34028, +38473:34562, +38474:35090, +38475:35370, +38476:35914, +38477:37030, +38478:37586, +38479:39165, +38480:40179, +38481:40300, +38482:20047, +38483:20129, +38484:20621, +38485:21078, +38486:22346, +38487:22952, +38488:24125, +38489:24536, +38490:24537, +38491:25151, +38492:26292, +38493:26395, +38494:26576, +38495:26834, +38496:20882, +38497:32033, +38498:32938, +38499:33192, +38500:35584, +38501:35980, +38502:36031, +38503:37502, +38504:38450, +38505:21536, +38506:38956, +38507:21271, +38508:20693, +38509:21340, +38510:22696, +38511:25778, +38512:26420, +38513:29287, +38514:30566, +38515:31302, +38516:37350, +38517:21187, +38518:27809, +38519:27526, +38520:22528, +38521:24140, +38522:22868, +38523:26412, +38524:32763, +38525:20961, +38526:30406, +38528:25705, +38529:30952, +38530:39764, +38531:40635, +38532:22475, +38533:22969, +38534:26151, +38535:26522, +38536:27598, +38537:21737, +38538:27097, +38539:24149, +38540:33180, +38541:26517, +38542:39850, +38543:26622, +38544:40018, +38545:26717, +38546:20134, +38547:20451, +38548:21448, +38549:25273, +38550:26411, +38551:27819, +38552:36804, +38553:20397, +38554:32365, +38555:40639, +38556:19975, +38557:24930, +38558:28288, +38559:28459, +38560:34067, +38561:21619, +38562:26410, +38563:39749, +38564:24051, +38565:31637, +38566:23724, +38567:23494, +38568:34588, +38569:28234, +38570:34001, +38571:31252, +38572:33032, +38573:22937, +38574:31885, +38575:27665, +38576:30496, +38577:21209, +38578:22818, +38579:28961, +38580:29279, +38581:30683, +38582:38695, +38583:40289, +38584:26891, +38585:23167, +38586:23064, +38587:20901, +38588:21517, +38589:21629, +38590:26126, +38591:30431, +38592:36855, +38593:37528, +38594:40180, +38595:23018, +38596:29277, +38597:28357, +38598:20813, +38599:26825, +38600:32191, +38601:32236, +38602:38754, +38603:40634, +38604:25720, +38605:27169, +38606:33538, +38607:22916, +38608:23391, +38609:27611, +38610:29467, +38611:30450, +38612:32178, +38613:32791, +38614:33945, +38615:20786, +38616:26408, +38617:40665, +38618:30446, +38619:26466, +38620:21247, +38621:39173, +38622:23588, +38623:25147, +38624:31870, +38625:36016, +38626:21839, +38627:24758, +38628:32011, +38629:38272, +38630:21249, +38631:20063, +38632:20918, +38633:22812, +38634:29242, +38635:32822, +38636:37326, +38637:24357, +38638:30690, +38639:21380, +38640:24441, +38641:32004, +38642:34220, +38643:35379, +38644:36493, +38645:38742, +38646:26611, +38647:34222, +38648:37971, +38649:24841, +38650:24840, +38651:27833, +38652:30290, +38720:35565, +38721:36664, +38722:21807, +38723:20305, +38724:20778, +38725:21191, +38726:21451, +38727:23461, +38728:24189, +38729:24736, +38730:24962, +38731:25558, +38732:26377, +38733:26586, +38734:28263, +38735:28044, +38736:29494, +38737:29495, +38738:30001, +38739:31056, +38740:35029, +38741:35480, +38742:36938, +38743:37009, +38744:37109, +38745:38596, +38746:34701, +38747:22805, +38748:20104, +38749:20313, +38750:19982, +38751:35465, +38752:36671, +38753:38928, +38754:20653, +38755:24188, +38756:22934, +38757:23481, +38758:24248, +38759:25562, +38760:25594, +38761:25793, +38762:26332, +38763:26954, +38764:27096, +38765:27915, +38766:28342, +38767:29076, +38768:29992, +38769:31407, +38770:32650, +38771:32768, +38772:33865, +38773:33993, +38774:35201, +38775:35617, +38776:36362, +38777:36965, +38778:38525, +38779:39178, +38780:24958, +38781:25233, +38782:27442, +38784:27779, +38785:28020, +38786:32716, +38787:32764, +38788:28096, +38789:32645, +38790:34746, +38791:35064, +38792:26469, +38793:33713, +38794:38972, +38795:38647, +38796:27931, +38797:32097, +38798:33853, +38799:37226, +38800:20081, +38801:21365, +38802:23888, +38803:27396, +38804:28651, +38805:34253, +38806:34349, +38807:35239, +38808:21033, +38809:21519, +38810:23653, +38811:26446, +38812:26792, +38813:29702, +38814:29827, +38815:30178, +38816:35023, +38817:35041, +38818:37324, +38819:38626, +38820:38520, +38821:24459, +38822:29575, +38823:31435, +38824:33870, +38825:25504, +38826:30053, +38827:21129, +38828:27969, +38829:28316, +38830:29705, +38831:30041, +38832:30827, +38833:31890, +38834:38534, +38835:31452, +38836:40845, +38837:20406, +38838:24942, +38839:26053, +38840:34396, +38841:20102, +38842:20142, +38843:20698, +38844:20001, +38845:20940, +38846:23534, +38847:26009, +38848:26753, +38849:28092, +38850:29471, +38851:30274, +38852:30637, +38853:31260, +38854:31975, +38855:33391, +38856:35538, +38857:36988, +38858:37327, +38859:38517, +38860:38936, +38861:21147, +38862:32209, +38863:20523, +38864:21400, +38865:26519, +38866:28107, +38867:29136, +38868:29747, +38869:33256, +38870:36650, +38871:38563, +38872:40023, +38873:40607, +38874:29792, +38875:22593, +38876:28057, +38877:32047, +38878:39006, +38879:20196, +38880:20278, +38881:20363, +38882:20919, +38883:21169, +38884:23994, +38885:24604, +38886:29618, +38887:31036, +38888:33491, +38889:37428, +38890:38583, +38891:38646, +38892:38666, +38893:40599, +38894:40802, +38895:26278, +38896:27508, +38897:21015, +38898:21155, +38899:28872, +38900:35010, +38901:24265, +38902:24651, +38903:24976, +38904:28451, +38905:29001, +38906:31806, +38907:32244, +38908:32879, +38976:34030, +38977:36899, +38978:37676, +38979:21570, +38980:39791, +38981:27347, +38982:28809, +38983:36034, +38984:36335, +38985:38706, +38986:21172, +38987:23105, +38988:24266, +38989:24324, +38990:26391, +38991:27004, +38992:27028, +38993:28010, +38994:28431, +38995:29282, +38996:29436, +38997:31725, +38998:32769, +38999:32894, +39000:34635, +39001:37070, +39002:20845, +39003:40595, +39004:31108, +39005:32907, +39006:37682, +39007:35542, +39008:20525, +39009:21644, +39010:35441, +39011:27498, +39012:36036, +39013:33031, +39014:24785, +39015:26528, +39016:40434, +39017:20121, +39018:20120, +39019:39952, +39020:35435, +39021:34241, +39022:34152, +39023:26880, +39024:28286, +39025:30871, +39026:33109, +39071:24332, +39072:19984, +39073:19989, +39074:20010, +39075:20017, +39076:20022, +39077:20028, +39078:20031, +39079:20034, +39080:20054, +39081:20056, +39082:20098, +39083:20101, +39084:35947, +39085:20106, +39086:33298, +39087:24333, +39088:20110, +39089:20126, +39090:20127, +39091:20128, +39092:20130, +39093:20144, +39094:20147, +39095:20150, +39096:20174, +39097:20173, +39098:20164, +39099:20166, +39100:20162, +39101:20183, +39102:20190, +39103:20205, +39104:20191, +39105:20215, +39106:20233, +39107:20314, +39108:20272, +39109:20315, +39110:20317, +39111:20311, +39112:20295, +39113:20342, +39114:20360, +39115:20367, +39116:20376, +39117:20347, +39118:20329, +39119:20336, +39120:20369, +39121:20335, +39122:20358, +39123:20374, +39124:20760, +39125:20436, +39126:20447, +39127:20430, +39128:20440, +39129:20443, +39130:20433, +39131:20442, +39132:20432, +39133:20452, +39134:20453, +39135:20506, +39136:20520, +39137:20500, +39138:20522, +39139:20517, +39140:20485, +39141:20252, +39142:20470, +39143:20513, +39144:20521, +39145:20524, +39146:20478, +39147:20463, +39148:20497, +39149:20486, +39150:20547, +39151:20551, +39152:26371, +39153:20565, +39154:20560, +39155:20552, +39156:20570, +39157:20566, +39158:20588, +39159:20600, +39160:20608, +39161:20634, +39162:20613, +39163:20660, +39164:20658, +39232:20681, +39233:20682, +39234:20659, +39235:20674, +39236:20694, +39237:20702, +39238:20709, +39239:20717, +39240:20707, +39241:20718, +39242:20729, +39243:20725, +39244:20745, +39245:20737, +39246:20738, +39247:20758, +39248:20757, +39249:20756, +39250:20762, +39251:20769, +39252:20794, +39253:20791, +39254:20796, +39255:20795, +39256:20799, +39257:20800, +39258:20818, +39259:20812, +39260:20820, +39261:20834, +39262:31480, +39263:20841, +39264:20842, +39265:20846, +39266:20864, +39267:20866, +39268:22232, +39269:20876, +39270:20873, +39271:20879, +39272:20881, +39273:20883, +39274:20885, +39275:20886, +39276:20900, +39277:20902, +39278:20898, +39279:20905, +39280:20906, +39281:20907, +39282:20915, +39283:20913, +39284:20914, +39285:20912, +39286:20917, +39287:20925, +39288:20933, +39289:20937, +39290:20955, +39291:20960, +39292:34389, +39293:20969, +39294:20973, +39296:20976, +39297:20981, +39298:20990, +39299:20996, +39300:21003, +39301:21012, +39302:21006, +39303:21031, +39304:21034, +39305:21038, +39306:21043, +39307:21049, +39308:21071, +39309:21060, +39310:21067, +39311:21068, +39312:21086, +39313:21076, +39314:21098, +39315:21108, +39316:21097, +39317:21107, +39318:21119, +39319:21117, +39320:21133, +39321:21140, +39322:21138, +39323:21105, +39324:21128, +39325:21137, +39326:36776, +39327:36775, +39328:21164, +39329:21165, +39330:21180, +39331:21173, +39332:21185, +39333:21197, +39334:21207, +39335:21214, +39336:21219, +39337:21222, +39338:39149, +39339:21216, +39340:21235, +39341:21237, +39342:21240, +39343:21241, +39344:21254, +39345:21256, +39346:30008, +39347:21261, +39348:21264, +39349:21263, +39350:21269, +39351:21274, +39352:21283, +39353:21295, +39354:21297, +39355:21299, +39356:21304, +39357:21312, +39358:21318, +39359:21317, +39360:19991, +39361:21321, +39362:21325, +39363:20950, +39364:21342, +39365:21353, +39366:21358, +39367:22808, +39368:21371, +39369:21367, +39370:21378, +39371:21398, +39372:21408, +39373:21414, +39374:21413, +39375:21422, +39376:21424, +39377:21430, +39378:21443, +39379:31762, +39380:38617, +39381:21471, +39382:26364, +39383:29166, +39384:21486, +39385:21480, +39386:21485, +39387:21498, +39388:21505, +39389:21565, +39390:21568, +39391:21548, +39392:21549, +39393:21564, +39394:21550, +39395:21558, +39396:21545, +39397:21533, +39398:21582, +39399:21647, +39400:21621, +39401:21646, +39402:21599, +39403:21617, +39404:21623, +39405:21616, +39406:21650, +39407:21627, +39408:21632, +39409:21622, +39410:21636, +39411:21648, +39412:21638, +39413:21703, +39414:21666, +39415:21688, +39416:21669, +39417:21676, +39418:21700, +39419:21704, +39420:21672, +39488:21675, +39489:21698, +39490:21668, +39491:21694, +39492:21692, +39493:21720, +39494:21733, +39495:21734, +39496:21775, +39497:21780, +39498:21757, +39499:21742, +39500:21741, +39501:21754, +39502:21730, +39503:21817, +39504:21824, +39505:21859, +39506:21836, +39507:21806, +39508:21852, +39509:21829, +39510:21846, +39511:21847, +39512:21816, +39513:21811, +39514:21853, +39515:21913, +39516:21888, +39517:21679, +39518:21898, +39519:21919, +39520:21883, +39521:21886, +39522:21912, +39523:21918, +39524:21934, +39525:21884, +39526:21891, +39527:21929, +39528:21895, +39529:21928, +39530:21978, +39531:21957, +39532:21983, +39533:21956, +39534:21980, +39535:21988, +39536:21972, +39537:22036, +39538:22007, +39539:22038, +39540:22014, +39541:22013, +39542:22043, +39543:22009, +39544:22094, +39545:22096, +39546:29151, +39547:22068, +39548:22070, +39549:22066, +39550:22072, +39552:22123, +39553:22116, +39554:22063, +39555:22124, +39556:22122, +39557:22150, +39558:22144, +39559:22154, +39560:22176, +39561:22164, +39562:22159, +39563:22181, +39564:22190, +39565:22198, +39566:22196, +39567:22210, +39568:22204, +39569:22209, +39570:22211, +39571:22208, +39572:22216, +39573:22222, +39574:22225, +39575:22227, +39576:22231, +39577:22254, +39578:22265, +39579:22272, +39580:22271, +39581:22276, +39582:22281, +39583:22280, +39584:22283, +39585:22285, +39586:22291, +39587:22296, +39588:22294, +39589:21959, +39590:22300, +39591:22310, +39592:22327, +39593:22328, +39594:22350, +39595:22331, +39596:22336, +39597:22351, +39598:22377, +39599:22464, +39600:22408, +39601:22369, +39602:22399, +39603:22409, +39604:22419, +39605:22432, +39606:22451, +39607:22436, +39608:22442, +39609:22448, +39610:22467, +39611:22470, +39612:22484, +39613:22482, +39614:22483, +39615:22538, +39616:22486, +39617:22499, +39618:22539, +39619:22553, +39620:22557, +39621:22642, +39622:22561, +39623:22626, +39624:22603, +39625:22640, +39626:27584, +39627:22610, +39628:22589, +39629:22649, +39630:22661, +39631:22713, +39632:22687, +39633:22699, +39634:22714, +39635:22750, +39636:22715, +39637:22712, +39638:22702, +39639:22725, +39640:22739, +39641:22737, +39642:22743, +39643:22745, +39644:22744, +39645:22757, +39646:22748, +39647:22756, +39648:22751, +39649:22767, +39650:22778, +39651:22777, +39652:22779, +39653:22780, +39654:22781, +39655:22786, +39656:22794, +39657:22800, +39658:22811, +39659:26790, +39660:22821, +39661:22828, +39662:22829, +39663:22834, +39664:22840, +39665:22846, +39666:31442, +39667:22869, +39668:22864, +39669:22862, +39670:22874, +39671:22872, +39672:22882, +39673:22880, +39674:22887, +39675:22892, +39676:22889, +39744:22904, +39745:22913, +39746:22941, +39747:20318, +39748:20395, +39749:22947, +39750:22962, +39751:22982, +39752:23016, +39753:23004, +39754:22925, +39755:23001, +39756:23002, +39757:23077, +39758:23071, +39759:23057, +39760:23068, +39761:23049, +39762:23066, +39763:23104, +39764:23148, +39765:23113, +39766:23093, +39767:23094, +39768:23138, +39769:23146, +39770:23194, +39771:23228, +39772:23230, +39773:23243, +39774:23234, +39775:23229, +39776:23267, +39777:23255, +39778:23270, +39779:23273, +39780:23254, +39781:23290, +39782:23291, +39783:23308, +39784:23307, +39785:23318, +39786:23346, +39787:23248, +39788:23338, +39789:23350, +39790:23358, +39791:23363, +39792:23365, +39793:23360, +39794:23377, +39795:23381, +39796:23386, +39797:23387, +39798:23397, +39799:23401, +39800:23408, +39801:23411, +39802:23413, +39803:23416, +39804:25992, +39805:23418, +39806:23424, +39808:23427, +39809:23462, +39810:23480, +39811:23491, +39812:23495, +39813:23497, +39814:23508, +39815:23504, +39816:23524, +39817:23526, +39818:23522, +39819:23518, +39820:23525, +39821:23531, +39822:23536, +39823:23542, +39824:23539, +39825:23557, +39826:23559, +39827:23560, +39828:23565, +39829:23571, +39830:23584, +39831:23586, +39832:23592, +39833:23608, +39834:23609, +39835:23617, +39836:23622, +39837:23630, +39838:23635, +39839:23632, +39840:23631, +39841:23409, +39842:23660, +39843:23662, +39844:20066, +39845:23670, +39846:23673, +39847:23692, +39848:23697, +39849:23700, +39850:22939, +39851:23723, +39852:23739, +39853:23734, +39854:23740, +39855:23735, +39856:23749, +39857:23742, +39858:23751, +39859:23769, +39860:23785, +39861:23805, +39862:23802, +39863:23789, +39864:23948, +39865:23786, +39866:23819, +39867:23829, +39868:23831, +39869:23900, +39870:23839, +39871:23835, +39872:23825, +39873:23828, +39874:23842, +39875:23834, +39876:23833, +39877:23832, +39878:23884, +39879:23890, +39880:23886, +39881:23883, +39882:23916, +39883:23923, +39884:23926, +39885:23943, +39886:23940, +39887:23938, +39888:23970, +39889:23965, +39890:23980, +39891:23982, +39892:23997, +39893:23952, +39894:23991, +39895:23996, +39896:24009, +39897:24013, +39898:24019, +39899:24018, +39900:24022, +39901:24027, +39902:24043, +39903:24050, +39904:24053, +39905:24075, +39906:24090, +39907:24089, +39908:24081, +39909:24091, +39910:24118, +39911:24119, +39912:24132, +39913:24131, +39914:24128, +39915:24142, +39916:24151, +39917:24148, +39918:24159, +39919:24162, +39920:24164, +39921:24135, +39922:24181, +39923:24182, +39924:24186, +39925:40636, +39926:24191, +39927:24224, +39928:24257, +39929:24258, +39930:24264, +39931:24272, +39932:24271, +40000:24278, +40001:24291, +40002:24285, +40003:24282, +40004:24283, +40005:24290, +40006:24289, +40007:24296, +40008:24297, +40009:24300, +40010:24305, +40011:24307, +40012:24304, +40013:24308, +40014:24312, +40015:24318, +40016:24323, +40017:24329, +40018:24413, +40019:24412, +40020:24331, +40021:24337, +40022:24342, +40023:24361, +40024:24365, +40025:24376, +40026:24385, +40027:24392, +40028:24396, +40029:24398, +40030:24367, +40031:24401, +40032:24406, +40033:24407, +40034:24409, +40035:24417, +40036:24429, +40037:24435, +40038:24439, +40039:24451, +40040:24450, +40041:24447, +40042:24458, +40043:24456, +40044:24465, +40045:24455, +40046:24478, +40047:24473, +40048:24472, +40049:24480, +40050:24488, +40051:24493, +40052:24508, +40053:24534, +40054:24571, +40055:24548, +40056:24568, +40057:24561, +40058:24541, +40059:24755, +40060:24575, +40061:24609, +40062:24672, +40064:24601, +40065:24592, +40066:24617, +40067:24590, +40068:24625, +40069:24603, +40070:24597, +40071:24619, +40072:24614, +40073:24591, +40074:24634, +40075:24666, +40076:24641, +40077:24682, +40078:24695, +40079:24671, +40080:24650, +40081:24646, +40082:24653, +40083:24675, +40084:24643, +40085:24676, +40086:24642, +40087:24684, +40088:24683, +40089:24665, +40090:24705, +40091:24717, +40092:24807, +40093:24707, +40094:24730, +40095:24708, +40096:24731, +40097:24726, +40098:24727, +40099:24722, +40100:24743, +40101:24715, +40102:24801, +40103:24760, +40104:24800, +40105:24787, +40106:24756, +40107:24560, +40108:24765, +40109:24774, +40110:24757, +40111:24792, +40112:24909, +40113:24853, +40114:24838, +40115:24822, +40116:24823, +40117:24832, +40118:24820, +40119:24826, +40120:24835, +40121:24865, +40122:24827, +40123:24817, +40124:24845, +40125:24846, +40126:24903, +40127:24894, +40128:24872, +40129:24871, +40130:24906, +40131:24895, +40132:24892, +40133:24876, +40134:24884, +40135:24893, +40136:24898, +40137:24900, +40138:24947, +40139:24951, +40140:24920, +40141:24921, +40142:24922, +40143:24939, +40144:24948, +40145:24943, +40146:24933, +40147:24945, +40148:24927, +40149:24925, +40150:24915, +40151:24949, +40152:24985, +40153:24982, +40154:24967, +40155:25004, +40156:24980, +40157:24986, +40158:24970, +40159:24977, +40160:25003, +40161:25006, +40162:25036, +40163:25034, +40164:25033, +40165:25079, +40166:25032, +40167:25027, +40168:25030, +40169:25018, +40170:25035, +40171:32633, +40172:25037, +40173:25062, +40174:25059, +40175:25078, +40176:25082, +40177:25076, +40178:25087, +40179:25085, +40180:25084, +40181:25086, +40182:25088, +40183:25096, +40184:25097, +40185:25101, +40186:25100, +40187:25108, +40188:25115, +40256:25118, +40257:25121, +40258:25130, +40259:25134, +40260:25136, +40261:25138, +40262:25139, +40263:25153, +40264:25166, +40265:25182, +40266:25187, +40267:25179, +40268:25184, +40269:25192, +40270:25212, +40271:25218, +40272:25225, +40273:25214, +40274:25234, +40275:25235, +40276:25238, +40277:25300, +40278:25219, +40279:25236, +40280:25303, +40281:25297, +40282:25275, +40283:25295, +40284:25343, +40285:25286, +40286:25812, +40287:25288, +40288:25308, +40289:25292, +40290:25290, +40291:25282, +40292:25287, +40293:25243, +40294:25289, +40295:25356, +40296:25326, +40297:25329, +40298:25383, +40299:25346, +40300:25352, +40301:25327, +40302:25333, +40303:25424, +40304:25406, +40305:25421, +40306:25628, +40307:25423, +40308:25494, +40309:25486, +40310:25472, +40311:25515, +40312:25462, +40313:25507, +40314:25487, +40315:25481, +40316:25503, +40317:25525, +40318:25451, +40320:25449, +40321:25534, +40322:25577, +40323:25536, +40324:25542, +40325:25571, +40326:25545, +40327:25554, +40328:25590, +40329:25540, +40330:25622, +40331:25652, +40332:25606, +40333:25619, +40334:25638, +40335:25654, +40336:25885, +40337:25623, +40338:25640, +40339:25615, +40340:25703, +40341:25711, +40342:25718, +40343:25678, +40344:25898, +40345:25749, +40346:25747, +40347:25765, +40348:25769, +40349:25736, +40350:25788, +40351:25818, +40352:25810, +40353:25797, +40354:25799, +40355:25787, +40356:25816, +40357:25794, +40358:25841, +40359:25831, +40360:33289, +40361:25824, +40362:25825, +40363:25260, +40364:25827, +40365:25839, +40366:25900, +40367:25846, +40368:25844, +40369:25842, +40370:25850, +40371:25856, +40372:25853, +40373:25880, +40374:25884, +40375:25861, +40376:25892, +40377:25891, +40378:25899, +40379:25908, +40380:25909, +40381:25911, +40382:25910, +40383:25912, +40384:30027, +40385:25928, +40386:25942, +40387:25941, +40388:25933, +40389:25944, +40390:25950, +40391:25949, +40392:25970, +40393:25976, +40394:25986, +40395:25987, +40396:35722, +40397:26011, +40398:26015, +40399:26027, +40400:26039, +40401:26051, +40402:26054, +40403:26049, +40404:26052, +40405:26060, +40406:26066, +40407:26075, +40408:26073, +40409:26080, +40410:26081, +40411:26097, +40412:26482, +40413:26122, +40414:26115, +40415:26107, +40416:26483, +40417:26165, +40418:26166, +40419:26164, +40420:26140, +40421:26191, +40422:26180, +40423:26185, +40424:26177, +40425:26206, +40426:26205, +40427:26212, +40428:26215, +40429:26216, +40430:26207, +40431:26210, +40432:26224, +40433:26243, +40434:26248, +40435:26254, +40436:26249, +40437:26244, +40438:26264, +40439:26269, +40440:26305, +40441:26297, +40442:26313, +40443:26302, +40444:26300, +40512:26308, +40513:26296, +40514:26326, +40515:26330, +40516:26336, +40517:26175, +40518:26342, +40519:26345, +40520:26352, +40521:26357, +40522:26359, +40523:26383, +40524:26390, +40525:26398, +40526:26406, +40527:26407, +40528:38712, +40529:26414, +40530:26431, +40531:26422, +40532:26433, +40533:26424, +40534:26423, +40535:26438, +40536:26462, +40537:26464, +40538:26457, +40539:26467, +40540:26468, +40541:26505, +40542:26480, +40543:26537, +40544:26492, +40545:26474, +40546:26508, +40547:26507, +40548:26534, +40549:26529, +40550:26501, +40551:26551, +40552:26607, +40553:26548, +40554:26604, +40555:26547, +40556:26601, +40557:26552, +40558:26596, +40559:26590, +40560:26589, +40561:26594, +40562:26606, +40563:26553, +40564:26574, +40565:26566, +40566:26599, +40567:27292, +40568:26654, +40569:26694, +40570:26665, +40571:26688, +40572:26701, +40573:26674, +40574:26702, +40576:26803, +40577:26667, +40578:26713, +40579:26723, +40580:26743, +40581:26751, +40582:26783, +40583:26767, +40584:26797, +40585:26772, +40586:26781, +40587:26779, +40588:26755, +40589:27310, +40590:26809, +40591:26740, +40592:26805, +40593:26784, +40594:26810, +40595:26895, +40596:26765, +40597:26750, +40598:26881, +40599:26826, +40600:26888, +40601:26840, +40602:26914, +40603:26918, +40604:26849, +40605:26892, +40606:26829, +40607:26836, +40608:26855, +40609:26837, +40610:26934, +40611:26898, +40612:26884, +40613:26839, +40614:26851, +40615:26917, +40616:26873, +40617:26848, +40618:26863, +40619:26920, +40620:26922, +40621:26906, +40622:26915, +40623:26913, +40624:26822, +40625:27001, +40626:26999, +40627:26972, +40628:27000, +40629:26987, +40630:26964, +40631:27006, +40632:26990, +40633:26937, +40634:26996, +40635:26941, +40636:26969, +40637:26928, +40638:26977, +40639:26974, +40640:26973, +40641:27009, +40642:26986, +40643:27058, +40644:27054, +40645:27088, +40646:27071, +40647:27073, +40648:27091, +40649:27070, +40650:27086, +40651:23528, +40652:27082, +40653:27101, +40654:27067, +40655:27075, +40656:27047, +40657:27182, +40658:27025, +40659:27040, +40660:27036, +40661:27029, +40662:27060, +40663:27102, +40664:27112, +40665:27138, +40666:27163, +40667:27135, +40668:27402, +40669:27129, +40670:27122, +40671:27111, +40672:27141, +40673:27057, +40674:27166, +40675:27117, +40676:27156, +40677:27115, +40678:27146, +40679:27154, +40680:27329, +40681:27171, +40682:27155, +40683:27204, +40684:27148, +40685:27250, +40686:27190, +40687:27256, +40688:27207, +40689:27234, +40690:27225, +40691:27238, +40692:27208, +40693:27192, +40694:27170, +40695:27280, +40696:27277, +40697:27296, +40698:27268, +40699:27298, +40700:27299, +40768:27287, +40769:34327, +40770:27323, +40771:27331, +40772:27330, +40773:27320, +40774:27315, +40775:27308, +40776:27358, +40777:27345, +40778:27359, +40779:27306, +40780:27354, +40781:27370, +40782:27387, +40783:27397, +40784:34326, +40785:27386, +40786:27410, +40787:27414, +40788:39729, +40789:27423, +40790:27448, +40791:27447, +40792:30428, +40793:27449, +40794:39150, +40795:27463, +40796:27459, +40797:27465, +40798:27472, +40799:27481, +40800:27476, +40801:27483, +40802:27487, +40803:27489, +40804:27512, +40805:27513, +40806:27519, +40807:27520, +40808:27524, +40809:27523, +40810:27533, +40811:27544, +40812:27541, +40813:27550, +40814:27556, +40815:27562, +40816:27563, +40817:27567, +40818:27570, +40819:27569, +40820:27571, +40821:27575, +40822:27580, +40823:27590, +40824:27595, +40825:27603, +40826:27615, +40827:27628, +40828:27627, +40829:27635, +40830:27631, +40832:40638, +40833:27656, +40834:27667, +40835:27668, +40836:27675, +40837:27684, +40838:27683, +40839:27742, +40840:27733, +40841:27746, +40842:27754, +40843:27778, +40844:27789, +40845:27802, +40846:27777, +40847:27803, +40848:27774, +40849:27752, +40850:27763, +40851:27794, +40852:27792, +40853:27844, +40854:27889, +40855:27859, +40856:27837, +40857:27863, +40858:27845, +40859:27869, +40860:27822, +40861:27825, +40862:27838, +40863:27834, +40864:27867, +40865:27887, +40866:27865, +40867:27882, +40868:27935, +40869:34893, +40870:27958, +40871:27947, +40872:27965, +40873:27960, +40874:27929, +40875:27957, +40876:27955, +40877:27922, +40878:27916, +40879:28003, +40880:28051, +40881:28004, +40882:27994, +40883:28025, +40884:27993, +40885:28046, +40886:28053, +40887:28644, +40888:28037, +40889:28153, +40890:28181, +40891:28170, +40892:28085, +40893:28103, +40894:28134, +40895:28088, +40896:28102, +40897:28140, +40898:28126, +40899:28108, +40900:28136, +40901:28114, +40902:28101, +40903:28154, +40904:28121, +40905:28132, +40906:28117, +40907:28138, +40908:28142, +40909:28205, +40910:28270, +40911:28206, +40912:28185, +40913:28274, +40914:28255, +40915:28222, +40916:28195, +40917:28267, +40918:28203, +40919:28278, +40920:28237, +40921:28191, +40922:28227, +40923:28218, +40924:28238, +40925:28196, +40926:28415, +40927:28189, +40928:28216, +40929:28290, +40930:28330, +40931:28312, +40932:28361, +40933:28343, +40934:28371, +40935:28349, +40936:28335, +40937:28356, +40938:28338, +40939:28372, +40940:28373, +40941:28303, +40942:28325, +40943:28354, +40944:28319, +40945:28481, +40946:28433, +40947:28748, +40948:28396, +40949:28408, +40950:28414, +40951:28479, +40952:28402, +40953:28465, +40954:28399, +40955:28466, +40956:28364, +57408:28478, +57409:28435, +57410:28407, +57411:28550, +57412:28538, +57413:28536, +57414:28545, +57415:28544, +57416:28527, +57417:28507, +57418:28659, +57419:28525, +57420:28546, +57421:28540, +57422:28504, +57423:28558, +57424:28561, +57425:28610, +57426:28518, +57427:28595, +57428:28579, +57429:28577, +57430:28580, +57431:28601, +57432:28614, +57433:28586, +57434:28639, +57435:28629, +57436:28652, +57437:28628, +57438:28632, +57439:28657, +57440:28654, +57441:28635, +57442:28681, +57443:28683, +57444:28666, +57445:28689, +57446:28673, +57447:28687, +57448:28670, +57449:28699, +57450:28698, +57451:28532, +57452:28701, +57453:28696, +57454:28703, +57455:28720, +57456:28734, +57457:28722, +57458:28753, +57459:28771, +57460:28825, +57461:28818, +57462:28847, +57463:28913, +57464:28844, +57465:28856, +57466:28851, +57467:28846, +57468:28895, +57469:28875, +57470:28893, +57472:28889, +57473:28937, +57474:28925, +57475:28956, +57476:28953, +57477:29029, +57478:29013, +57479:29064, +57480:29030, +57481:29026, +57482:29004, +57483:29014, +57484:29036, +57485:29071, +57486:29179, +57487:29060, +57488:29077, +57489:29096, +57490:29100, +57491:29143, +57492:29113, +57493:29118, +57494:29138, +57495:29129, +57496:29140, +57497:29134, +57498:29152, +57499:29164, +57500:29159, +57501:29173, +57502:29180, +57503:29177, +57504:29183, +57505:29197, +57506:29200, +57507:29211, +57508:29224, +57509:29229, +57510:29228, +57511:29232, +57512:29234, +57513:29243, +57514:29244, +57515:29247, +57516:29248, +57517:29254, +57518:29259, +57519:29272, +57520:29300, +57521:29310, +57522:29314, +57523:29313, +57524:29319, +57525:29330, +57526:29334, +57527:29346, +57528:29351, +57529:29369, +57530:29362, +57531:29379, +57532:29382, +57533:29380, +57534:29390, +57535:29394, +57536:29410, +57537:29408, +57538:29409, +57539:29433, +57540:29431, +57541:20495, +57542:29463, +57543:29450, +57544:29468, +57545:29462, +57546:29469, +57547:29492, +57548:29487, +57549:29481, +57550:29477, +57551:29502, +57552:29518, +57553:29519, +57554:40664, +57555:29527, +57556:29546, +57557:29544, +57558:29552, +57559:29560, +57560:29557, +57561:29563, +57562:29562, +57563:29640, +57564:29619, +57565:29646, +57566:29627, +57567:29632, +57568:29669, +57569:29678, +57570:29662, +57571:29858, +57572:29701, +57573:29807, +57574:29733, +57575:29688, +57576:29746, +57577:29754, +57578:29781, +57579:29759, +57580:29791, +57581:29785, +57582:29761, +57583:29788, +57584:29801, +57585:29808, +57586:29795, +57587:29802, +57588:29814, +57589:29822, +57590:29835, +57591:29854, +57592:29863, +57593:29898, +57594:29903, +57595:29908, +57596:29681, +57664:29920, +57665:29923, +57666:29927, +57667:29929, +57668:29934, +57669:29938, +57670:29936, +57671:29937, +57672:29944, +57673:29943, +57674:29956, +57675:29955, +57676:29957, +57677:29964, +57678:29966, +57679:29965, +57680:29973, +57681:29971, +57682:29982, +57683:29990, +57684:29996, +57685:30012, +57686:30020, +57687:30029, +57688:30026, +57689:30025, +57690:30043, +57691:30022, +57692:30042, +57693:30057, +57694:30052, +57695:30055, +57696:30059, +57697:30061, +57698:30072, +57699:30070, +57700:30086, +57701:30087, +57702:30068, +57703:30090, +57704:30089, +57705:30082, +57706:30100, +57707:30106, +57708:30109, +57709:30117, +57710:30115, +57711:30146, +57712:30131, +57713:30147, +57714:30133, +57715:30141, +57716:30136, +57717:30140, +57718:30129, +57719:30157, +57720:30154, +57721:30162, +57722:30169, +57723:30179, +57724:30174, +57725:30206, +57726:30207, +57728:30204, +57729:30209, +57730:30192, +57731:30202, +57732:30194, +57733:30195, +57734:30219, +57735:30221, +57736:30217, +57737:30239, +57738:30247, +57739:30240, +57740:30241, +57741:30242, +57742:30244, +57743:30260, +57744:30256, +57745:30267, +57746:30279, +57747:30280, +57748:30278, +57749:30300, +57750:30296, +57751:30305, +57752:30306, +57753:30312, +57754:30313, +57755:30314, +57756:30311, +57757:30316, +57758:30320, +57759:30322, +57760:30326, +57761:30328, +57762:30332, +57763:30336, +57764:30339, +57765:30344, +57766:30347, +57767:30350, +57768:30358, +57769:30355, +57770:30361, +57771:30362, +57772:30384, +57773:30388, +57774:30392, +57775:30393, +57776:30394, +57777:30402, +57778:30413, +57779:30422, +57780:30418, +57781:30430, +57782:30433, +57783:30437, +57784:30439, +57785:30442, +57786:34351, +57787:30459, +57788:30472, +57789:30471, +57790:30468, +57791:30505, +57792:30500, +57793:30494, +57794:30501, +57795:30502, +57796:30491, +57797:30519, +57798:30520, +57799:30535, +57800:30554, +57801:30568, +57802:30571, +57803:30555, +57804:30565, +57805:30591, +57806:30590, +57807:30585, +57808:30606, +57809:30603, +57810:30609, +57811:30624, +57812:30622, +57813:30640, +57814:30646, +57815:30649, +57816:30655, +57817:30652, +57818:30653, +57819:30651, +57820:30663, +57821:30669, +57822:30679, +57823:30682, +57824:30684, +57825:30691, +57826:30702, +57827:30716, +57828:30732, +57829:30738, +57830:31014, +57831:30752, +57832:31018, +57833:30789, +57834:30862, +57835:30836, +57836:30854, +57837:30844, +57838:30874, +57839:30860, +57840:30883, +57841:30901, +57842:30890, +57843:30895, +57844:30929, +57845:30918, +57846:30923, +57847:30932, +57848:30910, +57849:30908, +57850:30917, +57851:30922, +57852:30956, +57920:30951, +57921:30938, +57922:30973, +57923:30964, +57924:30983, +57925:30994, +57926:30993, +57927:31001, +57928:31020, +57929:31019, +57930:31040, +57931:31072, +57932:31063, +57933:31071, +57934:31066, +57935:31061, +57936:31059, +57937:31098, +57938:31103, +57939:31114, +57940:31133, +57941:31143, +57942:40779, +57943:31146, +57944:31150, +57945:31155, +57946:31161, +57947:31162, +57948:31177, +57949:31189, +57950:31207, +57951:31212, +57952:31201, +57953:31203, +57954:31240, +57955:31245, +57956:31256, +57957:31257, +57958:31264, +57959:31263, +57960:31104, +57961:31281, +57962:31291, +57963:31294, +57964:31287, +57965:31299, +57966:31319, +57967:31305, +57968:31329, +57969:31330, +57970:31337, +57971:40861, +57972:31344, +57973:31353, +57974:31357, +57975:31368, +57976:31383, +57977:31381, +57978:31384, +57979:31382, +57980:31401, +57981:31432, +57982:31408, +57984:31414, +57985:31429, +57986:31428, +57987:31423, +57988:36995, +57989:31431, +57990:31434, +57991:31437, +57992:31439, +57993:31445, +57994:31443, +57995:31449, +57996:31450, +57997:31453, +57998:31457, +57999:31458, +58000:31462, +58001:31469, +58002:31472, +58003:31490, +58004:31503, +58005:31498, +58006:31494, +58007:31539, +58008:31512, +58009:31513, +58010:31518, +58011:31541, +58012:31528, +58013:31542, +58014:31568, +58015:31610, +58016:31492, +58017:31565, +58018:31499, +58019:31564, +58020:31557, +58021:31605, +58022:31589, +58023:31604, +58024:31591, +58025:31600, +58026:31601, +58027:31596, +58028:31598, +58029:31645, +58030:31640, +58031:31647, +58032:31629, +58033:31644, +58034:31642, +58035:31627, +58036:31634, +58037:31631, +58038:31581, +58039:31641, +58040:31691, +58041:31681, +58042:31692, +58043:31695, +58044:31668, +58045:31686, +58046:31709, +58047:31721, +58048:31761, +58049:31764, +58050:31718, +58051:31717, +58052:31840, +58053:31744, +58054:31751, +58055:31763, +58056:31731, +58057:31735, +58058:31767, +58059:31757, +58060:31734, +58061:31779, +58062:31783, +58063:31786, +58064:31775, +58065:31799, +58066:31787, +58067:31805, +58068:31820, +58069:31811, +58070:31828, +58071:31823, +58072:31808, +58073:31824, +58074:31832, +58075:31839, +58076:31844, +58077:31830, +58078:31845, +58079:31852, +58080:31861, +58081:31875, +58082:31888, +58083:31908, +58084:31917, +58085:31906, +58086:31915, +58087:31905, +58088:31912, +58089:31923, +58090:31922, +58091:31921, +58092:31918, +58093:31929, +58094:31933, +58095:31936, +58096:31941, +58097:31938, +58098:31960, +58099:31954, +58100:31964, +58101:31970, +58102:39739, +58103:31983, +58104:31986, +58105:31988, +58106:31990, +58107:31994, +58108:32006, +58176:32002, +58177:32028, +58178:32021, +58179:32010, +58180:32069, +58181:32075, +58182:32046, +58183:32050, +58184:32063, +58185:32053, +58186:32070, +58187:32115, +58188:32086, +58189:32078, +58190:32114, +58191:32104, +58192:32110, +58193:32079, +58194:32099, +58195:32147, +58196:32137, +58197:32091, +58198:32143, +58199:32125, +58200:32155, +58201:32186, +58202:32174, +58203:32163, +58204:32181, +58205:32199, +58206:32189, +58207:32171, +58208:32317, +58209:32162, +58210:32175, +58211:32220, +58212:32184, +58213:32159, +58214:32176, +58215:32216, +58216:32221, +58217:32228, +58218:32222, +58219:32251, +58220:32242, +58221:32225, +58222:32261, +58223:32266, +58224:32291, +58225:32289, +58226:32274, +58227:32305, +58228:32287, +58229:32265, +58230:32267, +58231:32290, +58232:32326, +58233:32358, +58234:32315, +58235:32309, +58236:32313, +58237:32323, +58238:32311, +58240:32306, +58241:32314, +58242:32359, +58243:32349, +58244:32342, +58245:32350, +58246:32345, +58247:32346, +58248:32377, +58249:32362, +58250:32361, +58251:32380, +58252:32379, +58253:32387, +58254:32213, +58255:32381, +58256:36782, +58257:32383, +58258:32392, +58259:32393, +58260:32396, +58261:32402, +58262:32400, +58263:32403, +58264:32404, +58265:32406, +58266:32398, +58267:32411, +58268:32412, +58269:32568, +58270:32570, +58271:32581, +58272:32588, +58273:32589, +58274:32590, +58275:32592, +58276:32593, +58277:32597, +58278:32596, +58279:32600, +58280:32607, +58281:32608, +58282:32616, +58283:32617, +58284:32615, +58285:32632, +58286:32642, +58287:32646, +58288:32643, +58289:32648, +58290:32647, +58291:32652, +58292:32660, +58293:32670, +58294:32669, +58295:32666, +58296:32675, +58297:32687, +58298:32690, +58299:32697, +58300:32686, +58301:32694, +58302:32696, +58303:35697, +58304:32709, +58305:32710, +58306:32714, +58307:32725, +58308:32724, +58309:32737, +58310:32742, +58311:32745, +58312:32755, +58313:32761, +58314:39132, +58315:32774, +58316:32772, +58317:32779, +58318:32786, +58319:32792, +58320:32793, +58321:32796, +58322:32801, +58323:32808, +58324:32831, +58325:32827, +58326:32842, +58327:32838, +58328:32850, +58329:32856, +58330:32858, +58331:32863, +58332:32866, +58333:32872, +58334:32883, +58335:32882, +58336:32880, +58337:32886, +58338:32889, +58339:32893, +58340:32895, +58341:32900, +58342:32902, +58343:32901, +58344:32923, +58345:32915, +58346:32922, +58347:32941, +58348:20880, +58349:32940, +58350:32987, +58351:32997, +58352:32985, +58353:32989, +58354:32964, +58355:32986, +58356:32982, +58357:33033, +58358:33007, +58359:33009, +58360:33051, +58361:33065, +58362:33059, +58363:33071, +58364:33099, +58432:38539, +58433:33094, +58434:33086, +58435:33107, +58436:33105, +58437:33020, +58438:33137, +58439:33134, +58440:33125, +58441:33126, +58442:33140, +58443:33155, +58444:33160, +58445:33162, +58446:33152, +58447:33154, +58448:33184, +58449:33173, +58450:33188, +58451:33187, +58452:33119, +58453:33171, +58454:33193, +58455:33200, +58456:33205, +58457:33214, +58458:33208, +58459:33213, +58460:33216, +58461:33218, +58462:33210, +58463:33225, +58464:33229, +58465:33233, +58466:33241, +58467:33240, +58468:33224, +58469:33242, +58470:33247, +58471:33248, +58472:33255, +58473:33274, +58474:33275, +58475:33278, +58476:33281, +58477:33282, +58478:33285, +58479:33287, +58480:33290, +58481:33293, +58482:33296, +58483:33302, +58484:33321, +58485:33323, +58486:33336, +58487:33331, +58488:33344, +58489:33369, +58490:33368, +58491:33373, +58492:33370, +58493:33375, +58494:33380, +58496:33378, +58497:33384, +58498:33386, +58499:33387, +58500:33326, +58501:33393, +58502:33399, +58503:33400, +58504:33406, +58505:33421, +58506:33426, +58507:33451, +58508:33439, +58509:33467, +58510:33452, +58511:33505, +58512:33507, +58513:33503, +58514:33490, +58515:33524, +58516:33523, +58517:33530, +58518:33683, +58519:33539, +58520:33531, +58521:33529, +58522:33502, +58523:33542, +58524:33500, +58525:33545, +58526:33497, +58527:33589, +58528:33588, +58529:33558, +58530:33586, +58531:33585, +58532:33600, +58533:33593, +58534:33616, +58535:33605, +58536:33583, +58537:33579, +58538:33559, +58539:33560, +58540:33669, +58541:33690, +58542:33706, +58543:33695, +58544:33698, +58545:33686, +58546:33571, +58547:33678, +58548:33671, +58549:33674, +58550:33660, +58551:33717, +58552:33651, +58553:33653, +58554:33696, +58555:33673, +58556:33704, +58557:33780, +58558:33811, +58559:33771, +58560:33742, +58561:33789, +58562:33795, +58563:33752, +58564:33803, +58565:33729, +58566:33783, +58567:33799, +58568:33760, +58569:33778, +58570:33805, +58571:33826, +58572:33824, +58573:33725, +58574:33848, +58575:34054, +58576:33787, +58577:33901, +58578:33834, +58579:33852, +58580:34138, +58581:33924, +58582:33911, +58583:33899, +58584:33965, +58585:33902, +58586:33922, +58587:33897, +58588:33862, +58589:33836, +58590:33903, +58591:33913, +58592:33845, +58593:33994, +58594:33890, +58595:33977, +58596:33983, +58597:33951, +58598:34009, +58599:33997, +58600:33979, +58601:34010, +58602:34000, +58603:33985, +58604:33990, +58605:34006, +58606:33953, +58607:34081, +58608:34047, +58609:34036, +58610:34071, +58611:34072, +58612:34092, +58613:34079, +58614:34069, +58615:34068, +58616:34044, +58617:34112, +58618:34147, +58619:34136, +58620:34120, +58688:34113, +58689:34306, +58690:34123, +58691:34133, +58692:34176, +58693:34212, +58694:34184, +58695:34193, +58696:34186, +58697:34216, +58698:34157, +58699:34196, +58700:34203, +58701:34282, +58702:34183, +58703:34204, +58704:34167, +58705:34174, +58706:34192, +58707:34249, +58708:34234, +58709:34255, +58710:34233, +58711:34256, +58712:34261, +58713:34269, +58714:34277, +58715:34268, +58716:34297, +58717:34314, +58718:34323, +58719:34315, +58720:34302, +58721:34298, +58722:34310, +58723:34338, +58724:34330, +58725:34352, +58726:34367, +58727:34381, +58728:20053, +58729:34388, +58730:34399, +58731:34407, +58732:34417, +58733:34451, +58734:34467, +58735:34473, +58736:34474, +58737:34443, +58738:34444, +58739:34486, +58740:34479, +58741:34500, +58742:34502, +58743:34480, +58744:34505, +58745:34851, +58746:34475, +58747:34516, +58748:34526, +58749:34537, +58750:34540, +58752:34527, +58753:34523, +58754:34543, +58755:34578, +58756:34566, +58757:34568, +58758:34560, +58759:34563, +58760:34555, +58761:34577, +58762:34569, +58763:34573, +58764:34553, +58765:34570, +58766:34612, +58767:34623, +58768:34615, +58769:34619, +58770:34597, +58771:34601, +58772:34586, +58773:34656, +58774:34655, +58775:34680, +58776:34636, +58777:34638, +58778:34676, +58779:34647, +58780:34664, +58781:34670, +58782:34649, +58783:34643, +58784:34659, +58785:34666, +58786:34821, +58787:34722, +58788:34719, +58789:34690, +58790:34735, +58791:34763, +58792:34749, +58793:34752, +58794:34768, +58795:38614, +58796:34731, +58797:34756, +58798:34739, +58799:34759, +58800:34758, +58801:34747, +58802:34799, +58803:34802, +58804:34784, +58805:34831, +58806:34829, +58807:34814, +58808:34806, +58809:34807, +58810:34830, +58811:34770, +58812:34833, +58813:34838, +58814:34837, +58815:34850, +58816:34849, +58817:34865, +58818:34870, +58819:34873, +58820:34855, +58821:34875, +58822:34884, +58823:34882, +58824:34898, +58825:34905, +58826:34910, +58827:34914, +58828:34923, +58829:34945, +58830:34942, +58831:34974, +58832:34933, +58833:34941, +58834:34997, +58835:34930, +58836:34946, +58837:34967, +58838:34962, +58839:34990, +58840:34969, +58841:34978, +58842:34957, +58843:34980, +58844:34992, +58845:35007, +58846:34993, +58847:35011, +58848:35012, +58849:35028, +58850:35032, +58851:35033, +58852:35037, +58853:35065, +58854:35074, +58855:35068, +58856:35060, +58857:35048, +58858:35058, +58859:35076, +58860:35084, +58861:35082, +58862:35091, +58863:35139, +58864:35102, +58865:35109, +58866:35114, +58867:35115, +58868:35137, +58869:35140, +58870:35131, +58871:35126, +58872:35128, +58873:35148, +58874:35101, +58875:35168, +58876:35166, +58944:35174, +58945:35172, +58946:35181, +58947:35178, +58948:35183, +58949:35188, +58950:35191, +58951:35198, +58952:35203, +58953:35208, +58954:35210, +58955:35219, +58956:35224, +58957:35233, +58958:35241, +58959:35238, +58960:35244, +58961:35247, +58962:35250, +58963:35258, +58964:35261, +58965:35263, +58966:35264, +58967:35290, +58968:35292, +58969:35293, +58970:35303, +58971:35316, +58972:35320, +58973:35331, +58974:35350, +58975:35344, +58976:35340, +58977:35355, +58978:35357, +58979:35365, +58980:35382, +58981:35393, +58982:35419, +58983:35410, +58984:35398, +58985:35400, +58986:35452, +58987:35437, +58988:35436, +58989:35426, +58990:35461, +58991:35458, +58992:35460, +58993:35496, +58994:35489, +58995:35473, +58996:35493, +58997:35494, +58998:35482, +58999:35491, +59000:35524, +59001:35533, +59002:35522, +59003:35546, +59004:35563, +59005:35571, +59006:35559, +59008:35556, +59009:35569, +59010:35604, +59011:35552, +59012:35554, +59013:35575, +59014:35550, +59015:35547, +59016:35596, +59017:35591, +59018:35610, +59019:35553, +59020:35606, +59021:35600, +59022:35607, +59023:35616, +59024:35635, +59025:38827, +59026:35622, +59027:35627, +59028:35646, +59029:35624, +59030:35649, +59031:35660, +59032:35663, +59033:35662, +59034:35657, +59035:35670, +59036:35675, +59037:35674, +59038:35691, +59039:35679, +59040:35692, +59041:35695, +59042:35700, +59043:35709, +59044:35712, +59045:35724, +59046:35726, +59047:35730, +59048:35731, +59049:35734, +59050:35737, +59051:35738, +59052:35898, +59053:35905, +59054:35903, +59055:35912, +59056:35916, +59057:35918, +59058:35920, +59059:35925, +59060:35938, +59061:35948, +59062:35960, +59063:35962, +59064:35970, +59065:35977, +59066:35973, +59067:35978, +59068:35981, +59069:35982, +59070:35988, +59071:35964, +59072:35992, +59073:25117, +59074:36013, +59075:36010, +59076:36029, +59077:36018, +59078:36019, +59079:36014, +59080:36022, +59081:36040, +59082:36033, +59083:36068, +59084:36067, +59085:36058, +59086:36093, +59087:36090, +59088:36091, +59089:36100, +59090:36101, +59091:36106, +59092:36103, +59093:36111, +59094:36109, +59095:36112, +59096:40782, +59097:36115, +59098:36045, +59099:36116, +59100:36118, +59101:36199, +59102:36205, +59103:36209, +59104:36211, +59105:36225, +59106:36249, +59107:36290, +59108:36286, +59109:36282, +59110:36303, +59111:36314, +59112:36310, +59113:36300, +59114:36315, +59115:36299, +59116:36330, +59117:36331, +59118:36319, +59119:36323, +59120:36348, +59121:36360, +59122:36361, +59123:36351, +59124:36381, +59125:36382, +59126:36368, +59127:36383, +59128:36418, +59129:36405, +59130:36400, +59131:36404, +59132:36426, +59200:36423, +59201:36425, +59202:36428, +59203:36432, +59204:36424, +59205:36441, +59206:36452, +59207:36448, +59208:36394, +59209:36451, +59210:36437, +59211:36470, +59212:36466, +59213:36476, +59214:36481, +59215:36487, +59216:36485, +59217:36484, +59218:36491, +59219:36490, +59220:36499, +59221:36497, +59222:36500, +59223:36505, +59224:36522, +59225:36513, +59226:36524, +59227:36528, +59228:36550, +59229:36529, +59230:36542, +59231:36549, +59232:36552, +59233:36555, +59234:36571, +59235:36579, +59236:36604, +59237:36603, +59238:36587, +59239:36606, +59240:36618, +59241:36613, +59242:36629, +59243:36626, +59244:36633, +59245:36627, +59246:36636, +59247:36639, +59248:36635, +59249:36620, +59250:36646, +59251:36659, +59252:36667, +59253:36665, +59254:36677, +59255:36674, +59256:36670, +59257:36684, +59258:36681, +59259:36678, +59260:36686, +59261:36695, +59262:36700, +59264:36706, +59265:36707, +59266:36708, +59267:36764, +59268:36767, +59269:36771, +59270:36781, +59271:36783, +59272:36791, +59273:36826, +59274:36837, +59275:36834, +59276:36842, +59277:36847, +59278:36999, +59279:36852, +59280:36869, +59281:36857, +59282:36858, +59283:36881, +59284:36885, +59285:36897, +59286:36877, +59287:36894, +59288:36886, +59289:36875, +59290:36903, +59291:36918, +59292:36917, +59293:36921, +59294:36856, +59295:36943, +59296:36944, +59297:36945, +59298:36946, +59299:36878, +59300:36937, +59301:36926, +59302:36950, +59303:36952, +59304:36958, +59305:36968, +59306:36975, +59307:36982, +59308:38568, +59309:36978, +59310:36994, +59311:36989, +59312:36993, +59313:36992, +59314:37002, +59315:37001, +59316:37007, +59317:37032, +59318:37039, +59319:37041, +59320:37045, +59321:37090, +59322:37092, +59323:25160, +59324:37083, +59325:37122, +59326:37138, +59327:37145, +59328:37170, +59329:37168, +59330:37194, +59331:37206, +59332:37208, +59333:37219, +59334:37221, +59335:37225, +59336:37235, +59337:37234, +59338:37259, +59339:37257, +59340:37250, +59341:37282, +59342:37291, +59343:37295, +59344:37290, +59345:37301, +59346:37300, +59347:37306, +59348:37312, +59349:37313, +59350:37321, +59351:37323, +59352:37328, +59353:37334, +59354:37343, +59355:37345, +59356:37339, +59357:37372, +59358:37365, +59359:37366, +59360:37406, +59361:37375, +59362:37396, +59363:37420, +59364:37397, +59365:37393, +59366:37470, +59367:37463, +59368:37445, +59369:37449, +59370:37476, +59371:37448, +59372:37525, +59373:37439, +59374:37451, +59375:37456, +59376:37532, +59377:37526, +59378:37523, +59379:37531, +59380:37466, +59381:37583, +59382:37561, +59383:37559, +59384:37609, +59385:37647, +59386:37626, +59387:37700, +59388:37678, +59456:37657, +59457:37666, +59458:37658, +59459:37667, +59460:37690, +59461:37685, +59462:37691, +59463:37724, +59464:37728, +59465:37756, +59466:37742, +59467:37718, +59468:37808, +59469:37804, +59470:37805, +59471:37780, +59472:37817, +59473:37846, +59474:37847, +59475:37864, +59476:37861, +59477:37848, +59478:37827, +59479:37853, +59480:37840, +59481:37832, +59482:37860, +59483:37914, +59484:37908, +59485:37907, +59486:37891, +59487:37895, +59488:37904, +59489:37942, +59490:37931, +59491:37941, +59492:37921, +59493:37946, +59494:37953, +59495:37970, +59496:37956, +59497:37979, +59498:37984, +59499:37986, +59500:37982, +59501:37994, +59502:37417, +59503:38000, +59504:38005, +59505:38007, +59506:38013, +59507:37978, +59508:38012, +59509:38014, +59510:38017, +59511:38015, +59512:38274, +59513:38279, +59514:38282, +59515:38292, +59516:38294, +59517:38296, +59518:38297, +59520:38304, +59521:38312, +59522:38311, +59523:38317, +59524:38332, +59525:38331, +59526:38329, +59527:38334, +59528:38346, +59529:28662, +59530:38339, +59531:38349, +59532:38348, +59533:38357, +59534:38356, +59535:38358, +59536:38364, +59537:38369, +59538:38373, +59539:38370, +59540:38433, +59541:38440, +59542:38446, +59543:38447, +59544:38466, +59545:38476, +59546:38479, +59547:38475, +59548:38519, +59549:38492, +59550:38494, +59551:38493, +59552:38495, +59553:38502, +59554:38514, +59555:38508, +59556:38541, +59557:38552, +59558:38549, +59559:38551, +59560:38570, +59561:38567, +59562:38577, +59563:38578, +59564:38576, +59565:38580, +59566:38582, +59567:38584, +59568:38585, +59569:38606, +59570:38603, +59571:38601, +59572:38605, +59573:35149, +59574:38620, +59575:38669, +59576:38613, +59577:38649, +59578:38660, +59579:38662, +59580:38664, +59581:38675, +59582:38670, +59583:38673, +59584:38671, +59585:38678, +59586:38681, +59587:38692, +59588:38698, +59589:38704, +59590:38713, +59591:38717, +59592:38718, +59593:38724, +59594:38726, +59595:38728, +59596:38722, +59597:38729, +59598:38748, +59599:38752, +59600:38756, +59601:38758, +59602:38760, +59603:21202, +59604:38763, +59605:38769, +59606:38777, +59607:38789, +59608:38780, +59609:38785, +59610:38778, +59611:38790, +59612:38795, +59613:38799, +59614:38800, +59615:38812, +59616:38824, +59617:38822, +59618:38819, +59619:38835, +59620:38836, +59621:38851, +59622:38854, +59623:38856, +59624:38859, +59625:38876, +59626:38893, +59627:40783, +59628:38898, +59629:31455, +59630:38902, +59631:38901, +59632:38927, +59633:38924, +59634:38968, +59635:38948, +59636:38945, +59637:38967, +59638:38973, +59639:38982, +59640:38991, +59641:38987, +59642:39019, +59643:39023, +59644:39024, +59712:39025, +59713:39028, +59714:39027, +59715:39082, +59716:39087, +59717:39089, +59718:39094, +59719:39108, +59720:39107, +59721:39110, +59722:39145, +59723:39147, +59724:39171, +59725:39177, +59726:39186, +59727:39188, +59728:39192, +59729:39201, +59730:39197, +59731:39198, +59732:39204, +59733:39200, +59734:39212, +59735:39214, +59736:39229, +59737:39230, +59738:39234, +59739:39241, +59740:39237, +59741:39248, +59742:39243, +59743:39249, +59744:39250, +59745:39244, +59746:39253, +59747:39319, +59748:39320, +59749:39333, +59750:39341, +59751:39342, +59752:39356, +59753:39391, +59754:39387, +59755:39389, +59756:39384, +59757:39377, +59758:39405, +59759:39406, +59760:39409, +59761:39410, +59762:39419, +59763:39416, +59764:39425, +59765:39439, +59766:39429, +59767:39394, +59768:39449, +59769:39467, +59770:39479, +59771:39493, +59772:39490, +59773:39488, +59774:39491, +59776:39486, +59777:39509, +59778:39501, +59779:39515, +59780:39511, +59781:39519, +59782:39522, +59783:39525, +59784:39524, +59785:39529, +59786:39531, +59787:39530, +59788:39597, +59789:39600, +59790:39612, +59791:39616, +59792:39631, +59793:39633, +59794:39635, +59795:39636, +59796:39646, +59797:39647, +59798:39650, +59799:39651, +59800:39654, +59801:39663, +59802:39659, +59803:39662, +59804:39668, +59805:39665, +59806:39671, +59807:39675, +59808:39686, +59809:39704, +59810:39706, +59811:39711, +59812:39714, +59813:39715, +59814:39717, +59815:39719, +59816:39720, +59817:39721, +59818:39722, +59819:39726, +59820:39727, +59821:39730, +59822:39748, +59823:39747, +59824:39759, +59825:39757, +59826:39758, +59827:39761, +59828:39768, +59829:39796, +59830:39827, +59831:39811, +59832:39825, +59833:39830, +59834:39831, +59835:39839, +59836:39840, +59837:39848, +59838:39860, +59839:39872, +59840:39882, +59841:39865, +59842:39878, +59843:39887, +59844:39889, +59845:39890, +59846:39907, +59847:39906, +59848:39908, +59849:39892, +59850:39905, +59851:39994, +59852:39922, +59853:39921, +59854:39920, +59855:39957, +59856:39956, +59857:39945, +59858:39955, +59859:39948, +59860:39942, +59861:39944, +59862:39954, +59863:39946, +59864:39940, +59865:39982, +59866:39963, +59867:39973, +59868:39972, +59869:39969, +59870:39984, +59871:40007, +59872:39986, +59873:40006, +59874:39998, +59875:40026, +59876:40032, +59877:40039, +59878:40054, +59879:40056, +59880:40167, +59881:40172, +59882:40176, +59883:40201, +59884:40200, +59885:40171, +59886:40195, +59887:40198, +59888:40234, +59889:40230, +59890:40367, +59891:40227, +59892:40223, +59893:40260, +59894:40213, +59895:40210, +59896:40257, +59897:40255, +59898:40254, +59899:40262, +59900:40264, +59968:40285, +59969:40286, +59970:40292, +59971:40273, +59972:40272, +59973:40281, +59974:40306, +59975:40329, +59976:40327, +59977:40363, +59978:40303, +59979:40314, +59980:40346, +59981:40356, +59982:40361, +59983:40370, +59984:40388, +59985:40385, +59986:40379, +59987:40376, +59988:40378, +59989:40390, +59990:40399, +59991:40386, +59992:40409, +59993:40403, +59994:40440, +59995:40422, +59996:40429, +59997:40431, +59998:40445, +59999:40474, +60000:40475, +60001:40478, +60002:40565, +60003:40569, +60004:40573, +60005:40577, +60006:40584, +60007:40587, +60008:40588, +60009:40594, +60010:40597, +60011:40593, +60012:40605, +60013:40613, +60014:40617, +60015:40632, +60016:40618, +60017:40621, +60018:38753, +60019:40652, +60020:40654, +60021:40655, +60022:40656, +60023:40660, +60024:40668, +60025:40670, +60026:40669, +60027:40672, +60028:40677, +60029:40680, +60030:40687, +60032:40692, +60033:40694, +60034:40695, +60035:40697, +60036:40699, +60037:40700, +60038:40701, +60039:40711, +60040:40712, +60041:30391, +60042:40725, +60043:40737, +60044:40748, +60045:40766, +60046:40778, +60047:40786, +60048:40788, +60049:40803, +60050:40799, +60051:40800, +60052:40801, +60053:40806, +60054:40807, +60055:40812, +60056:40810, +60057:40823, +60058:40818, +60059:40822, +60060:40853, +60061:40860, +60062:40864, +60063:22575, +60064:27079, +60065:36953, +60066:29796, +60067:20956, +60068:29081, +60736:32394, +60737:35100, +60738:37704, +60739:37512, +60740:34012, +60741:20425, +60742:28859, +60743:26161, +60744:26824, +60745:37625, +60746:26363, +60747:24389, +60748:20008, +60749:20193, +60750:20220, +60751:20224, +60752:20227, +60753:20281, +60754:20310, +60755:20370, +60756:20362, +60757:20378, +60758:20372, +60759:20429, +60760:20544, +60761:20514, +60762:20479, +60763:20510, +60764:20550, +60765:20592, +60766:20546, +60767:20628, +60768:20724, +60769:20696, +60770:20810, +60771:20836, +60772:20893, +60773:20926, +60774:20972, +60775:21013, +60776:21148, +60777:21158, +60778:21184, +60779:21211, +60780:21248, +60781:21255, +60782:21284, +60783:21362, +60784:21395, +60785:21426, +60786:21469, +60787:64014, +60788:21660, +60789:21642, +60790:21673, +60791:21759, +60792:21894, +60793:22361, +60794:22373, +60795:22444, +60796:22472, +60797:22471, +60798:64015, +60800:64016, +60801:22686, +60802:22706, +60803:22795, +60804:22867, +60805:22875, +60806:22877, +60807:22883, +60808:22948, +60809:22970, +60810:23382, +60811:23488, +60812:29999, +60813:23512, +60814:23532, +60815:23582, +60816:23718, +60817:23738, +60818:23797, +60819:23847, +60820:23891, +60821:64017, +60822:23874, +60823:23917, +60824:23992, +60825:23993, +60826:24016, +60827:24353, +60828:24372, +60829:24423, +60830:24503, +60831:24542, +60832:24669, +60833:24709, +60834:24714, +60835:24798, +60836:24789, +60837:24864, +60838:24818, +60839:24849, +60840:24887, +60841:24880, +60842:24984, +60843:25107, +60844:25254, +60845:25589, +60846:25696, +60847:25757, +60848:25806, +60849:25934, +60850:26112, +60851:26133, +60852:26171, +60853:26121, +60854:26158, +60855:26142, +60856:26148, +60857:26213, +60858:26199, +60859:26201, +60860:64018, +60861:26227, +60862:26265, +60863:26272, +60864:26290, +60865:26303, +60866:26362, +60867:26382, +60868:63785, +60869:26470, +60870:26555, +60871:26706, +60872:26560, +60873:26625, +60874:26692, +60875:26831, +60876:64019, +60877:26984, +60878:64020, +60879:27032, +60880:27106, +60881:27184, +60882:27243, +60883:27206, +60884:27251, +60885:27262, +60886:27362, +60887:27364, +60888:27606, +60889:27711, +60890:27740, +60891:27782, +60892:27759, +60893:27866, +60894:27908, +60895:28039, +60896:28015, +60897:28054, +60898:28076, +60899:28111, +60900:28152, +60901:28146, +60902:28156, +60903:28217, +60904:28252, +60905:28199, +60906:28220, +60907:28351, +60908:28552, +60909:28597, +60910:28661, +60911:28677, +60912:28679, +60913:28712, +60914:28805, +60915:28843, +60916:28943, +60917:28932, +60918:29020, +60919:28998, +60920:28999, +60921:64021, +60922:29121, +60923:29182, +60924:29361, +60992:29374, +60993:29476, +60994:64022, +60995:29559, +60996:29629, +60997:29641, +60998:29654, +60999:29667, +61000:29650, +61001:29703, +61002:29685, +61003:29734, +61004:29738, +61005:29737, +61006:29742, +61007:29794, +61008:29833, +61009:29855, +61010:29953, +61011:30063, +61012:30338, +61013:30364, +61014:30366, +61015:30363, +61016:30374, +61017:64023, +61018:30534, +61019:21167, +61020:30753, +61021:30798, +61022:30820, +61023:30842, +61024:31024, +61025:64024, +61026:64025, +61027:64026, +61028:31124, +61029:64027, +61030:31131, +61031:31441, +61032:31463, +61033:64028, +61034:31467, +61035:31646, +61036:64029, +61037:32072, +61038:32092, +61039:32183, +61040:32160, +61041:32214, +61042:32338, +61043:32583, +61044:32673, +61045:64030, +61046:33537, +61047:33634, +61048:33663, +61049:33735, +61050:33782, +61051:33864, +61052:33972, +61053:34131, +61054:34137, +61056:34155, +61057:64031, +61058:34224, +61059:64032, +61060:64033, +61061:34823, +61062:35061, +61063:35346, +61064:35383, +61065:35449, +61066:35495, +61067:35518, +61068:35551, +61069:64034, +61070:35574, +61071:35667, +61072:35711, +61073:36080, +61074:36084, +61075:36114, +61076:36214, +61077:64035, +61078:36559, +61079:64036, +61080:64037, +61081:36967, +61082:37086, +61083:64038, +61084:37141, +61085:37159, +61086:37338, +61087:37335, +61088:37342, +61089:37357, +61090:37358, +61091:37348, +61092:37349, +61093:37382, +61094:37392, +61095:37386, +61096:37434, +61097:37440, +61098:37436, +61099:37454, +61100:37465, +61101:37457, +61102:37433, +61103:37479, +61104:37543, +61105:37495, +61106:37496, +61107:37607, +61108:37591, +61109:37593, +61110:37584, +61111:64039, +61112:37589, +61113:37600, +61114:37587, +61115:37669, +61116:37665, +61117:37627, +61118:64040, +61119:37662, +61120:37631, +61121:37661, +61122:37634, +61123:37744, +61124:37719, +61125:37796, +61126:37830, +61127:37854, +61128:37880, +61129:37937, +61130:37957, +61131:37960, +61132:38290, +61133:63964, +61134:64041, +61135:38557, +61136:38575, +61137:38707, +61138:38715, +61139:38723, +61140:38733, +61141:38735, +61142:38737, +61143:38741, +61144:38999, +61145:39013, +61146:64042, +61147:64043, +61148:39207, +61149:64044, +61150:39326, +61151:39502, +61152:39641, +61153:39644, +61154:39797, +61155:39794, +61156:39823, +61157:39857, +61158:39867, +61159:39936, +61160:40304, +61161:40299, +61162:64045, +61163:40473, +61164:40657, +61167:8560, +61168:8561, +61169:8562, +61170:8563, +61171:8564, +61172:8565, +61173:8566, +61174:8567, +61175:8568, +61176:8569, +61177:65506, +61178:65508, +61179:65287, +61180:65282, +61504:57344, +61505:57345, +61506:57346, +61507:57347, +61508:57348, +61509:57349, +61510:57350, +61511:57351, +61512:57352, +61513:57353, +61514:57354, +61515:57355, +61516:57356, +61517:57357, +61518:57358, +61519:57359, +61520:57360, +61521:57361, +61522:57362, +61523:57363, +61524:57364, +61525:57365, +61526:57366, +61527:57367, +61528:57368, +61529:57369, +61530:57370, +61531:57371, +61532:57372, +61533:57373, +61534:57374, +61535:57375, +61536:57376, +61537:57377, +61538:57378, +61539:57379, +61540:57380, +61541:57381, +61542:57382, +61543:57383, +61544:57384, +61545:57385, +61546:57386, +61547:57387, +61548:57388, +61549:57389, +61550:57390, +61551:57391, +61552:57392, +61553:57393, +61554:57394, +61555:57395, +61556:57396, +61557:57397, +61558:57398, +61559:57399, +61560:57400, +61561:57401, +61562:57402, +61563:57403, +61564:57404, +61565:57405, +61566:57406, +61568:57407, +61569:57408, +61570:57409, +61571:57410, +61572:57411, +61573:57412, +61574:57413, +61575:57414, +61576:57415, +61577:57416, +61578:57417, +61579:57418, +61580:57419, +61581:57420, +61582:57421, +61583:57422, +61584:57423, +61585:57424, +61586:57425, +61587:57426, +61588:57427, +61589:57428, +61590:57429, +61591:57430, +61592:57431, +61593:57432, +61594:57433, +61595:57434, +61596:57435, +61597:57436, +61598:57437, +61599:57438, +61600:57439, +61601:57440, +61602:57441, +61603:57442, +61604:57443, +61605:57444, +61606:57445, +61607:57446, +61608:57447, +61609:57448, +61610:57449, +61611:57450, +61612:57451, +61613:57452, +61614:57453, +61615:57454, +61616:57455, +61617:57456, +61618:57457, +61619:57458, +61620:57459, +61621:57460, +61622:57461, +61623:57462, +61624:57463, +61625:57464, +61626:57465, +61627:57466, +61628:57467, +61629:57468, +61630:57469, +61631:57470, +61632:57471, +61633:57472, +61634:57473, +61635:57474, +61636:57475, +61637:57476, +61638:57477, +61639:57478, +61640:57479, +61641:57480, +61642:57481, +61643:57482, +61644:57483, +61645:57484, +61646:57485, +61647:57486, +61648:57487, +61649:57488, +61650:57489, +61651:57490, +61652:57491, +61653:57492, +61654:57493, +61655:57494, +61656:57495, +61657:57496, +61658:57497, +61659:57498, +61660:57499, +61661:57500, +61662:57501, +61663:57502, +61664:57503, +61665:57504, +61666:57505, +61667:57506, +61668:57507, +61669:57508, +61670:57509, +61671:57510, +61672:57511, +61673:57512, +61674:57513, +61675:57514, +61676:57515, +61677:57516, +61678:57517, +61679:57518, +61680:57519, +61681:57520, +61682:57521, +61683:57522, +61684:57523, +61685:57524, +61686:57525, +61687:57526, +61688:57527, +61689:57528, +61690:57529, +61691:57530, +61692:57531, +61760:57532, +61761:57533, +61762:57534, +61763:57535, +61764:57536, +61765:57537, +61766:57538, +61767:57539, +61768:57540, +61769:57541, +61770:57542, +61771:57543, +61772:57544, +61773:57545, +61774:57546, +61775:57547, +61776:57548, +61777:57549, +61778:57550, +61779:57551, +61780:57552, +61781:57553, +61782:57554, +61783:57555, +61784:57556, +61785:57557, +61786:57558, +61787:57559, +61788:57560, +61789:57561, +61790:57562, +61791:57563, +61792:57564, +61793:57565, +61794:57566, +61795:57567, +61796:57568, +61797:57569, +61798:57570, +61799:57571, +61800:57572, +61801:57573, +61802:57574, +61803:57575, +61804:57576, +61805:57577, +61806:57578, +61807:57579, +61808:57580, +61809:57581, +61810:57582, +61811:57583, +61812:57584, +61813:57585, +61814:57586, +61815:57587, +61816:57588, +61817:57589, +61818:57590, +61819:57591, +61820:57592, +61821:57593, +61822:57594, +61824:57595, +61825:57596, +61826:57597, +61827:57598, +61828:57599, +61829:57600, +61830:57601, +61831:57602, +61832:57603, +61833:57604, +61834:57605, +61835:57606, +61836:57607, +61837:57608, +61838:57609, +61839:57610, +61840:57611, +61841:57612, +61842:57613, +61843:57614, +61844:57615, +61845:57616, +61846:57617, +61847:57618, +61848:57619, +61849:57620, +61850:57621, +61851:57622, +61852:57623, +61853:57624, +61854:57625, +61855:57626, +61856:57627, +61857:57628, +61858:57629, +61859:57630, +61860:57631, +61861:57632, +61862:57633, +61863:57634, +61864:57635, +61865:57636, +61866:57637, +61867:57638, +61868:57639, +61869:57640, +61870:57641, +61871:57642, +61872:57643, +61873:57644, +61874:57645, +61875:57646, +61876:57647, +61877:57648, +61878:57649, +61879:57650, +61880:57651, +61881:57652, +61882:57653, +61883:57654, +61884:57655, +61885:57656, +61886:57657, +61887:57658, +61888:57659, +61889:57660, +61890:57661, +61891:57662, +61892:57663, +61893:57664, +61894:57665, +61895:57666, +61896:57667, +61897:57668, +61898:57669, +61899:57670, +61900:57671, +61901:57672, +61902:57673, +61903:57674, +61904:57675, +61905:57676, +61906:57677, +61907:57678, +61908:57679, +61909:57680, +61910:57681, +61911:57682, +61912:57683, +61913:57684, +61914:57685, +61915:57686, +61916:57687, +61917:57688, +61918:57689, +61919:57690, +61920:57691, +61921:57692, +61922:57693, +61923:57694, +61924:57695, +61925:57696, +61926:57697, +61927:57698, +61928:57699, +61929:57700, +61930:57701, +61931:57702, +61932:57703, +61933:57704, +61934:57705, +61935:57706, +61936:57707, +61937:57708, +61938:57709, +61939:57710, +61940:57711, +61941:57712, +61942:57713, +61943:57714, +61944:57715, +61945:57716, +61946:57717, +61947:57718, +61948:57719, +62016:57720, +62017:57721, +62018:57722, +62019:57723, +62020:57724, +62021:57725, +62022:57726, +62023:57727, +62024:57728, +62025:57729, +62026:57730, +62027:57731, +62028:57732, +62029:57733, +62030:57734, +62031:57735, +62032:57736, +62033:57737, +62034:57738, +62035:57739, +62036:57740, +62037:57741, +62038:57742, +62039:57743, +62040:57744, +62041:57745, +62042:57746, +62043:57747, +62044:57748, +62045:57749, +62046:57750, +62047:57751, +62048:57752, +62049:57753, +62050:57754, +62051:57755, +62052:57756, +62053:57757, +62054:57758, +62055:57759, +62056:57760, +62057:57761, +62058:57762, +62059:57763, +62060:57764, +62061:57765, +62062:57766, +62063:57767, +62064:57768, +62065:57769, +62066:57770, +62067:57771, +62068:57772, +62069:57773, +62070:57774, +62071:57775, +62072:57776, +62073:57777, +62074:57778, +62075:57779, +62076:57780, +62077:57781, +62078:57782, +62080:57783, +62081:57784, +62082:57785, +62083:57786, +62084:57787, +62085:57788, +62086:57789, +62087:57790, +62088:57791, +62089:57792, +62090:57793, +62091:57794, +62092:57795, +62093:57796, +62094:57797, +62095:57798, +62096:57799, +62097:57800, +62098:57801, +62099:57802, +62100:57803, +62101:57804, +62102:57805, +62103:57806, +62104:57807, +62105:57808, +62106:57809, +62107:57810, +62108:57811, +62109:57812, +62110:57813, +62111:57814, +62112:57815, +62113:57816, +62114:57817, +62115:57818, +62116:57819, +62117:57820, +62118:57821, +62119:57822, +62120:57823, +62121:57824, +62122:57825, +62123:57826, +62124:57827, +62125:57828, +62126:57829, +62127:57830, +62128:57831, +62129:57832, +62130:57833, +62131:57834, +62132:57835, +62133:57836, +62134:57837, +62135:57838, +62136:57839, +62137:57840, +62138:57841, +62139:57842, +62140:57843, +62141:57844, +62142:57845, +62143:57846, +62144:57847, +62145:57848, +62146:57849, +62147:57850, +62148:57851, +62149:57852, +62150:57853, +62151:57854, +62152:57855, +62153:57856, +62154:57857, +62155:57858, +62156:57859, +62157:57860, +62158:57861, +62159:57862, +62160:57863, +62161:57864, +62162:57865, +62163:57866, +62164:57867, +62165:57868, +62166:57869, +62167:57870, +62168:57871, +62169:57872, +62170:57873, +62171:57874, +62172:57875, +62173:57876, +62174:57877, +62175:57878, +62176:57879, +62177:57880, +62178:57881, +62179:57882, +62180:57883, +62181:57884, +62182:57885, +62183:57886, +62184:57887, +62185:57888, +62186:57889, +62187:57890, +62188:57891, +62189:57892, +62190:57893, +62191:57894, +62192:57895, +62193:57896, +62194:57897, +62195:57898, +62196:57899, +62197:57900, +62198:57901, +62199:57902, +62200:57903, +62201:57904, +62202:57905, +62203:57906, +62204:57907, +62272:57908, +62273:57909, +62274:57910, +62275:57911, +62276:57912, +62277:57913, +62278:57914, +62279:57915, +62280:57916, +62281:57917, +62282:57918, +62283:57919, +62284:57920, +62285:57921, +62286:57922, +62287:57923, +62288:57924, +62289:57925, +62290:57926, +62291:57927, +62292:57928, +62293:57929, +62294:57930, +62295:57931, +62296:57932, +62297:57933, +62298:57934, +62299:57935, +62300:57936, +62301:57937, +62302:57938, +62303:57939, +62304:57940, +62305:57941, +62306:57942, +62307:57943, +62308:57944, +62309:57945, +62310:57946, +62311:57947, +62312:57948, +62313:57949, +62314:57950, +62315:57951, +62316:57952, +62317:57953, +62318:57954, +62319:57955, +62320:57956, +62321:57957, +62322:57958, +62323:57959, +62324:57960, +62325:57961, +62326:57962, +62327:57963, +62328:57964, +62329:57965, +62330:57966, +62331:57967, +62332:57968, +62333:57969, +62334:57970, +62336:57971, +62337:57972, +62338:57973, +62339:57974, +62340:57975, +62341:57976, +62342:57977, +62343:57978, +62344:57979, +62345:57980, +62346:57981, +62347:57982, +62348:57983, +62349:57984, +62350:57985, +62351:57986, +62352:57987, +62353:57988, +62354:57989, +62355:57990, +62356:57991, +62357:57992, +62358:57993, +62359:57994, +62360:57995, +62361:57996, +62362:57997, +62363:57998, +62364:57999, +62365:58000, +62366:58001, +62367:58002, +62368:58003, +62369:58004, +62370:58005, +62371:58006, +62372:58007, +62373:58008, +62374:58009, +62375:58010, +62376:58011, +62377:58012, +62378:58013, +62379:58014, +62380:58015, +62381:58016, +62382:58017, +62383:58018, +62384:58019, +62385:58020, +62386:58021, +62387:58022, +62388:58023, +62389:58024, +62390:58025, +62391:58026, +62392:58027, +62393:58028, +62394:58029, +62395:58030, +62396:58031, +62397:58032, +62398:58033, +62399:58034, +62400:58035, +62401:58036, +62402:58037, +62403:58038, +62404:58039, +62405:58040, +62406:58041, +62407:58042, +62408:58043, +62409:58044, +62410:58045, +62411:58046, +62412:58047, +62413:58048, +62414:58049, +62415:58050, +62416:58051, +62417:58052, +62418:58053, +62419:58054, +62420:58055, +62421:58056, +62422:58057, +62423:58058, +62424:58059, +62425:58060, +62426:58061, +62427:58062, +62428:58063, +62429:58064, +62430:58065, +62431:58066, +62432:58067, +62433:58068, +62434:58069, +62435:58070, +62436:58071, +62437:58072, +62438:58073, +62439:58074, +62440:58075, +62441:58076, +62442:58077, +62443:58078, +62444:58079, +62445:58080, +62446:58081, +62447:58082, +62448:58083, +62449:58084, +62450:58085, +62451:58086, +62452:58087, +62453:58088, +62454:58089, +62455:58090, +62456:58091, +62457:58092, +62458:58093, +62459:58094, +62460:58095, +62528:58096, +62529:58097, +62530:58098, +62531:58099, +62532:58100, +62533:58101, +62534:58102, +62535:58103, +62536:58104, +62537:58105, +62538:58106, +62539:58107, +62540:58108, +62541:58109, +62542:58110, +62543:58111, +62544:58112, +62545:58113, +62546:58114, +62547:58115, +62548:58116, +62549:58117, +62550:58118, +62551:58119, +62552:58120, +62553:58121, +62554:58122, +62555:58123, +62556:58124, +62557:58125, +62558:58126, +62559:58127, +62560:58128, +62561:58129, +62562:58130, +62563:58131, +62564:58132, +62565:58133, +62566:58134, +62567:58135, +62568:58136, +62569:58137, +62570:58138, +62571:58139, +62572:58140, +62573:58141, +62574:58142, +62575:58143, +62576:58144, +62577:58145, +62578:58146, +62579:58147, +62580:58148, +62581:58149, +62582:58150, +62583:58151, +62584:58152, +62585:58153, +62586:58154, +62587:58155, +62588:58156, +62589:58157, +62590:58158, +62592:58159, +62593:58160, +62594:58161, +62595:58162, +62596:58163, +62597:58164, +62598:58165, +62599:58166, +62600:58167, +62601:58168, +62602:58169, +62603:58170, +62604:58171, +62605:58172, +62606:58173, +62607:58174, +62608:58175, +62609:58176, +62610:58177, +62611:58178, +62612:58179, +62613:58180, +62614:58181, +62615:58182, +62616:58183, +62617:58184, +62618:58185, +62619:58186, +62620:58187, +62621:58188, +62622:58189, +62623:58190, +62624:58191, +62625:58192, +62626:58193, +62627:58194, +62628:58195, +62629:58196, +62630:58197, +62631:58198, +62632:58199, +62633:58200, +62634:58201, +62635:58202, +62636:58203, +62637:58204, +62638:58205, +62639:58206, +62640:58207, +62641:58208, +62642:58209, +62643:58210, +62644:58211, +62645:58212, +62646:58213, +62647:58214, +62648:58215, +62649:58216, +62650:58217, +62651:58218, +62652:58219, +62653:58220, +62654:58221, +62655:58222, +62656:58223, +62657:58224, +62658:58225, +62659:58226, +62660:58227, +62661:58228, +62662:58229, +62663:58230, +62664:58231, +62665:58232, +62666:58233, +62667:58234, +62668:58235, +62669:58236, +62670:58237, +62671:58238, +62672:58239, +62673:58240, +62674:58241, +62675:58242, +62676:58243, +62677:58244, +62678:58245, +62679:58246, +62680:58247, +62681:58248, +62682:58249, +62683:58250, +62684:58251, +62685:58252, +62686:58253, +62687:58254, +62688:58255, +62689:58256, +62690:58257, +62691:58258, +62692:58259, +62693:58260, +62694:58261, +62695:58262, +62696:58263, +62697:58264, +62698:58265, +62699:58266, +62700:58267, +62701:58268, +62702:58269, +62703:58270, +62704:58271, +62705:58272, +62706:58273, +62707:58274, +62708:58275, +62709:58276, +62710:58277, +62711:58278, +62712:58279, +62713:58280, +62714:58281, +62715:58282, +62716:58283, +62784:58284, +62785:58285, +62786:58286, +62787:58287, +62788:58288, +62789:58289, +62790:58290, +62791:58291, +62792:58292, +62793:58293, +62794:58294, +62795:58295, +62796:58296, +62797:58297, +62798:58298, +62799:58299, +62800:58300, +62801:58301, +62802:58302, +62803:58303, +62804:58304, +62805:58305, +62806:58306, +62807:58307, +62808:58308, +62809:58309, +62810:58310, +62811:58311, +62812:58312, +62813:58313, +62814:58314, +62815:58315, +62816:58316, +62817:58317, +62818:58318, +62819:58319, +62820:58320, +62821:58321, +62822:58322, +62823:58323, +62824:58324, +62825:58325, +62826:58326, +62827:58327, +62828:58328, +62829:58329, +62830:58330, +62831:58331, +62832:58332, +62833:58333, +62834:58334, +62835:58335, +62836:58336, +62837:58337, +62838:58338, +62839:58339, +62840:58340, +62841:58341, +62842:58342, +62843:58343, +62844:58344, +62845:58345, +62846:58346, +62848:58347, +62849:58348, +62850:58349, +62851:58350, +62852:58351, +62853:58352, +62854:58353, +62855:58354, +62856:58355, +62857:58356, +62858:58357, +62859:58358, +62860:58359, +62861:58360, +62862:58361, +62863:58362, +62864:58363, +62865:58364, +62866:58365, +62867:58366, +62868:58367, +62869:58368, +62870:58369, +62871:58370, +62872:58371, +62873:58372, +62874:58373, +62875:58374, +62876:58375, +62877:58376, +62878:58377, +62879:58378, +62880:58379, +62881:58380, +62882:58381, +62883:58382, +62884:58383, +62885:58384, +62886:58385, +62887:58386, +62888:58387, +62889:58388, +62890:58389, +62891:58390, +62892:58391, +62893:58392, +62894:58393, +62895:58394, +62896:58395, +62897:58396, +62898:58397, +62899:58398, +62900:58399, +62901:58400, +62902:58401, +62903:58402, +62904:58403, +62905:58404, +62906:58405, +62907:58406, +62908:58407, +62909:58408, +62910:58409, +62911:58410, +62912:58411, +62913:58412, +62914:58413, +62915:58414, +62916:58415, +62917:58416, +62918:58417, +62919:58418, +62920:58419, +62921:58420, +62922:58421, +62923:58422, +62924:58423, +62925:58424, +62926:58425, +62927:58426, +62928:58427, +62929:58428, +62930:58429, +62931:58430, +62932:58431, +62933:58432, +62934:58433, +62935:58434, +62936:58435, +62937:58436, +62938:58437, +62939:58438, +62940:58439, +62941:58440, +62942:58441, +62943:58442, +62944:58443, +62945:58444, +62946:58445, +62947:58446, +62948:58447, +62949:58448, +62950:58449, +62951:58450, +62952:58451, +62953:58452, +62954:58453, +62955:58454, +62956:58455, +62957:58456, +62958:58457, +62959:58458, +62960:58459, +62961:58460, +62962:58461, +62963:58462, +62964:58463, +62965:58464, +62966:58465, +62967:58466, +62968:58467, +62969:58468, +62970:58469, +62971:58470, +62972:58471, +63040:58472, +63041:58473, +63042:58474, +63043:58475, +63044:58476, +63045:58477, +63046:58478, +63047:58479, +63048:58480, +63049:58481, +63050:58482, +63051:58483, +63052:58484, +63053:58485, +63054:58486, +63055:58487, +63056:58488, +63057:58489, +63058:58490, +63059:58491, +63060:58492, +63061:58493, +63062:58494, +63063:58495, +63064:58496, +63065:58497, +63066:58498, +63067:58499, +63068:58500, +63069:58501, +63070:58502, +63071:58503, +63072:58504, +63073:58505, +63074:58506, +63075:58507, +63076:58508, +63077:58509, +63078:58510, +63079:58511, +63080:58512, +63081:58513, +63082:58514, +63083:58515, +63084:58516, +63085:58517, +63086:58518, +63087:58519, +63088:58520, +63089:58521, +63090:58522, +63091:58523, +63092:58524, +63093:58525, +63094:58526, +63095:58527, +63096:58528, +63097:58529, +63098:58530, +63099:58531, +63100:58532, +63101:58533, +63102:58534, +63104:58535, +63105:58536, +63106:58537, +63107:58538, +63108:58539, +63109:58540, +63110:58541, +63111:58542, +63112:58543, +63113:58544, +63114:58545, +63115:58546, +63116:58547, +63117:58548, +63118:58549, +63119:58550, +63120:58551, +63121:58552, +63122:58553, +63123:58554, +63124:58555, +63125:58556, +63126:58557, +63127:58558, +63128:58559, +63129:58560, +63130:58561, +63131:58562, +63132:58563, +63133:58564, +63134:58565, +63135:58566, +63136:58567, +63137:58568, +63138:58569, +63139:58570, +63140:58571, +63141:58572, +63142:58573, +63143:58574, +63144:58575, +63145:58576, +63146:58577, +63147:58578, +63148:58579, +63149:58580, +63150:58581, +63151:58582, +63152:58583, +63153:58584, +63154:58585, +63155:58586, +63156:58587, +63157:58588, +63158:58589, +63159:58590, +63160:58591, +63161:58592, +63162:58593, +63163:58594, +63164:58595, +63165:58596, +63166:58597, +63167:58598, +63168:58599, +63169:58600, +63170:58601, +63171:58602, +63172:58603, +63173:58604, +63174:58605, +63175:58606, +63176:58607, +63177:58608, +63178:58609, +63179:58610, +63180:58611, +63181:58612, +63182:58613, +63183:58614, +63184:58615, +63185:58616, +63186:58617, +63187:58618, +63188:58619, +63189:58620, +63190:58621, +63191:58622, +63192:58623, +63193:58624, +63194:58625, +63195:58626, +63196:58627, +63197:58628, +63198:58629, +63199:58630, +63200:58631, +63201:58632, +63202:58633, +63203:58634, +63204:58635, +63205:58636, +63206:58637, +63207:58638, +63208:58639, +63209:58640, +63210:58641, +63211:58642, +63212:58643, +63213:58644, +63214:58645, +63215:58646, +63216:58647, +63217:58648, +63218:58649, +63219:58650, +63220:58651, +63221:58652, +63222:58653, +63223:58654, +63224:58655, +63225:58656, +63226:58657, +63227:58658, +63228:58659, +63296:58660, +63297:58661, +63298:58662, +63299:58663, +63300:58664, +63301:58665, +63302:58666, +63303:58667, +63304:58668, +63305:58669, +63306:58670, +63307:58671, +63308:58672, +63309:58673, +63310:58674, +63311:58675, +63312:58676, +63313:58677, +63314:58678, +63315:58679, +63316:58680, +63317:58681, +63318:58682, +63319:58683, +63320:58684, +63321:58685, +63322:58686, +63323:58687, +63324:58688, +63325:58689, +63326:58690, +63327:58691, +63328:58692, +63329:58693, +63330:58694, +63331:58695, +63332:58696, +63333:58697, +63334:58698, +63335:58699, +63336:58700, +63337:58701, +63338:58702, +63339:58703, +63340:58704, +63341:58705, +63342:58706, +63343:58707, +63344:58708, +63345:58709, +63346:58710, +63347:58711, +63348:58712, +63349:58713, +63350:58714, +63351:58715, +63352:58716, +63353:58717, +63354:58718, +63355:58719, +63356:58720, +63357:58721, +63358:58722, +63360:58723, +63361:58724, +63362:58725, +63363:58726, +63364:58727, +63365:58728, +63366:58729, +63367:58730, +63368:58731, +63369:58732, +63370:58733, +63371:58734, +63372:58735, +63373:58736, +63374:58737, +63375:58738, +63376:58739, +63377:58740, +63378:58741, +63379:58742, +63380:58743, +63381:58744, +63382:58745, +63383:58746, +63384:58747, +63385:58748, +63386:58749, +63387:58750, +63388:58751, +63389:58752, +63390:58753, +63391:58754, +63392:58755, +63393:58756, +63394:58757, +63395:58758, +63396:58759, +63397:58760, +63398:58761, +63399:58762, +63400:58763, +63401:58764, +63402:58765, +63403:58766, +63404:58767, +63405:58768, +63406:58769, +63407:58770, +63408:58771, +63409:58772, +63410:58773, +63411:58774, +63412:58775, +63413:58776, +63414:58777, +63415:58778, +63416:58779, +63417:58780, +63418:58781, +63419:58782, +63420:58783, +63421:58784, +63422:58785, +63423:58786, +63424:58787, +63425:58788, +63426:58789, +63427:58790, +63428:58791, +63429:58792, +63430:58793, +63431:58794, +63432:58795, +63433:58796, +63434:58797, +63435:58798, +63436:58799, +63437:58800, +63438:58801, +63439:58802, +63440:58803, +63441:58804, +63442:58805, +63443:58806, +63444:58807, +63445:58808, +63446:58809, +63447:58810, +63448:58811, +63449:58812, +63450:58813, +63451:58814, +63452:58815, +63453:58816, +63454:58817, +63455:58818, +63456:58819, +63457:58820, +63458:58821, +63459:58822, +63460:58823, +63461:58824, +63462:58825, +63463:58826, +63464:58827, +63465:58828, +63466:58829, +63467:58830, +63468:58831, +63469:58832, +63470:58833, +63471:58834, +63472:58835, +63473:58836, +63474:58837, +63475:58838, +63476:58839, +63477:58840, +63478:58841, +63479:58842, +63480:58843, +63481:58844, +63482:58845, +63483:58846, +63484:58847, +63552:58848, +63553:58849, +63554:58850, +63555:58851, +63556:58852, +63557:58853, +63558:58854, +63559:58855, +63560:58856, +63561:58857, +63562:58858, +63563:58859, +63564:58860, +63565:58861, +63566:58862, +63567:58863, +63568:58864, +63569:58865, +63570:58866, +63571:58867, +63572:58868, +63573:58869, +63574:58870, +63575:58871, +63576:58872, +63577:58873, +63578:58874, +63579:58875, +63580:58876, +63581:58877, +63582:58878, +63583:58879, +63584:58880, +63585:58881, +63586:58882, +63587:58883, +63588:58884, +63589:58885, +63590:58886, +63591:58887, +63592:58888, +63593:58889, +63594:58890, +63595:58891, +63596:58892, +63597:58893, +63598:58894, +63599:58895, +63600:58896, +63601:58897, +63602:58898, +63603:58899, +63604:58900, +63605:58901, +63606:58902, +63607:58903, +63608:58904, +63609:58905, +63610:58906, +63611:58907, +63612:58908, +63613:58909, +63614:58910, +63616:58911, +63617:58912, +63618:58913, +63619:58914, +63620:58915, +63621:58916, +63622:58917, +63623:58918, +63624:58919, +63625:58920, +63626:58921, +63627:58922, +63628:58923, +63629:58924, +63630:58925, +63631:58926, +63632:58927, +63633:58928, +63634:58929, +63635:58930, +63636:58931, +63637:58932, +63638:58933, +63639:58934, +63640:58935, +63641:58936, +63642:58937, +63643:58938, +63644:58939, +63645:58940, +63646:58941, +63647:58942, +63648:58943, +63649:58944, +63650:58945, +63651:58946, +63652:58947, +63653:58948, +63654:58949, +63655:58950, +63656:58951, +63657:58952, +63658:58953, +63659:58954, +63660:58955, +63661:58956, +63662:58957, +63663:58958, +63664:58959, +63665:58960, +63666:58961, +63667:58962, +63668:58963, +63669:58964, +63670:58965, +63671:58966, +63672:58967, +63673:58968, +63674:58969, +63675:58970, +63676:58971, +63677:58972, +63678:58973, +63679:58974, +63680:58975, +63681:58976, +63682:58977, +63683:58978, +63684:58979, +63685:58980, +63686:58981, +63687:58982, +63688:58983, +63689:58984, +63690:58985, +63691:58986, +63692:58987, +63693:58988, +63694:58989, +63695:58990, +63696:58991, +63697:58992, +63698:58993, +63699:58994, +63700:58995, +63701:58996, +63702:58997, +63703:58998, +63704:58999, +63705:59000, +63706:59001, +63707:59002, +63708:59003, +63709:59004, +63710:59005, +63711:59006, +63712:59007, +63713:59008, +63714:59009, +63715:59010, +63716:59011, +63717:59012, +63718:59013, +63719:59014, +63720:59015, +63721:59016, +63722:59017, +63723:59018, +63724:59019, +63725:59020, +63726:59021, +63727:59022, +63728:59023, +63729:59024, +63730:59025, +63731:59026, +63732:59027, +63733:59028, +63734:59029, +63735:59030, +63736:59031, +63737:59032, +63738:59033, +63739:59034, +63740:59035, +64064:8560, +64065:8561, +64066:8562, +64067:8563, +64068:8564, +64069:8565, +64070:8566, +64071:8567, +64072:8568, +64073:8569, +64074:8544, +64075:8545, +64076:8546, +64077:8547, +64078:8548, +64079:8549, +64080:8550, +64081:8551, +64082:8552, +64083:8553, +64084:65506, +64085:65508, +64086:65287, +64087:65282, +64088:12849, +64089:8470, +64090:8481, +64091:8757, +64092:32394, +64093:35100, +64094:37704, +64095:37512, +64096:34012, +64097:20425, +64098:28859, +64099:26161, +64100:26824, +64101:37625, +64102:26363, +64103:24389, +64104:20008, +64105:20193, +64106:20220, +64107:20224, +64108:20227, +64109:20281, +64110:20310, +64111:20370, +64112:20362, +64113:20378, +64114:20372, +64115:20429, +64116:20544, +64117:20514, +64118:20479, +64119:20510, +64120:20550, +64121:20592, +64122:20546, +64123:20628, +64124:20724, +64125:20696, +64126:20810, +64128:20836, +64129:20893, +64130:20926, +64131:20972, +64132:21013, +64133:21148, +64134:21158, +64135:21184, +64136:21211, +64137:21248, +64138:21255, +64139:21284, +64140:21362, +64141:21395, +64142:21426, +64143:21469, +64144:64014, +64145:21660, +64146:21642, +64147:21673, +64148:21759, +64149:21894, +64150:22361, +64151:22373, +64152:22444, +64153:22472, +64154:22471, +64155:64015, +64156:64016, +64157:22686, +64158:22706, +64159:22795, +64160:22867, +64161:22875, +64162:22877, +64163:22883, +64164:22948, +64165:22970, +64166:23382, +64167:23488, +64168:29999, +64169:23512, +64170:23532, +64171:23582, +64172:23718, +64173:23738, +64174:23797, +64175:23847, +64176:23891, +64177:64017, +64178:23874, +64179:23917, +64180:23992, +64181:23993, +64182:24016, +64183:24353, +64184:24372, +64185:24423, +64186:24503, +64187:24542, +64188:24669, +64189:24709, +64190:24714, +64191:24798, +64192:24789, +64193:24864, +64194:24818, +64195:24849, +64196:24887, +64197:24880, +64198:24984, +64199:25107, +64200:25254, +64201:25589, +64202:25696, +64203:25757, +64204:25806, +64205:25934, +64206:26112, +64207:26133, +64208:26171, +64209:26121, +64210:26158, +64211:26142, +64212:26148, +64213:26213, +64214:26199, +64215:26201, +64216:64018, +64217:26227, +64218:26265, +64219:26272, +64220:26290, +64221:26303, +64222:26362, +64223:26382, +64224:63785, +64225:26470, +64226:26555, +64227:26706, +64228:26560, +64229:26625, +64230:26692, +64231:26831, +64232:64019, +64233:26984, +64234:64020, +64235:27032, +64236:27106, +64237:27184, +64238:27243, +64239:27206, +64240:27251, +64241:27262, +64242:27362, +64243:27364, +64244:27606, +64245:27711, +64246:27740, +64247:27782, +64248:27759, +64249:27866, +64250:27908, +64251:28039, +64252:28015, +64320:28054, +64321:28076, +64322:28111, +64323:28152, +64324:28146, +64325:28156, +64326:28217, +64327:28252, +64328:28199, +64329:28220, +64330:28351, +64331:28552, +64332:28597, +64333:28661, +64334:28677, +64335:28679, +64336:28712, +64337:28805, +64338:28843, +64339:28943, +64340:28932, +64341:29020, +64342:28998, +64343:28999, +64344:64021, +64345:29121, +64346:29182, +64347:29361, +64348:29374, +64349:29476, +64350:64022, +64351:29559, +64352:29629, +64353:29641, +64354:29654, +64355:29667, +64356:29650, +64357:29703, +64358:29685, +64359:29734, +64360:29738, +64361:29737, +64362:29742, +64363:29794, +64364:29833, +64365:29855, +64366:29953, +64367:30063, +64368:30338, +64369:30364, +64370:30366, +64371:30363, +64372:30374, +64373:64023, +64374:30534, +64375:21167, +64376:30753, +64377:30798, +64378:30820, +64379:30842, +64380:31024, +64381:64024, +64382:64025, +64384:64026, +64385:31124, +64386:64027, +64387:31131, +64388:31441, +64389:31463, +64390:64028, +64391:31467, +64392:31646, +64393:64029, +64394:32072, +64395:32092, +64396:32183, +64397:32160, +64398:32214, +64399:32338, +64400:32583, +64401:32673, +64402:64030, +64403:33537, +64404:33634, +64405:33663, +64406:33735, +64407:33782, +64408:33864, +64409:33972, +64410:34131, +64411:34137, +64412:34155, +64413:64031, +64414:34224, +64415:64032, +64416:64033, +64417:34823, +64418:35061, +64419:35346, +64420:35383, +64421:35449, +64422:35495, +64423:35518, +64424:35551, +64425:64034, +64426:35574, +64427:35667, +64428:35711, +64429:36080, +64430:36084, +64431:36114, +64432:36214, +64433:64035, +64434:36559, +64435:64036, +64436:64037, +64437:36967, +64438:37086, +64439:64038, +64440:37141, +64441:37159, +64442:37338, +64443:37335, +64444:37342, +64445:37357, +64446:37358, +64447:37348, +64448:37349, +64449:37382, +64450:37392, +64451:37386, +64452:37434, +64453:37440, +64454:37436, +64455:37454, +64456:37465, +64457:37457, +64458:37433, +64459:37479, +64460:37543, +64461:37495, +64462:37496, +64463:37607, +64464:37591, +64465:37593, +64466:37584, +64467:64039, +64468:37589, +64469:37600, +64470:37587, +64471:37669, +64472:37665, +64473:37627, +64474:64040, +64475:37662, +64476:37631, +64477:37661, +64478:37634, +64479:37744, +64480:37719, +64481:37796, +64482:37830, +64483:37854, +64484:37880, +64485:37937, +64486:37957, +64487:37960, +64488:38290, +64489:63964, +64490:64041, +64491:38557, +64492:38575, +64493:38707, +64494:38715, +64495:38723, +64496:38733, +64497:38735, +64498:38737, +64499:38741, +64500:38999, +64501:39013, +64502:64042, +64503:64043, +64504:39207, +64505:64044, +64506:39326, +64507:39502, +64508:39641, +64576:39644, +64577:39797, +64578:39794, +64579:39823, +64580:39857, +64581:39867, +64582:39936, +64583:40304, +64584:40299, +64585:64045, +64586:40473, +64587:40657 +}; + +/** + * @author takahiro / https://github.com/takahirox + */ + +function DataViewEx ( buffer, littleEndian ) { + + this.dv = new DataView( buffer ); + this.offset = 0; + this.littleEndian = ( littleEndian !== undefined ) ? littleEndian : true; + this.encoder = new CharsetEncoder(); + +} + +DataViewEx.prototype = { + + constructor: DataViewEx, + + getInt8: function () { + + var value = this.dv.getInt8( this.offset ); + this.offset += 1; + return value; + + }, + + getInt8Array: function ( size ) { + + var a = []; + + for ( var i = 0; i < size; i++ ) { + + a.push( this.getInt8() ); + + } + + return a; + + }, + + getUint8: function () { + + var value = this.dv.getUint8( this.offset ); + this.offset += 1; + return value; + + }, + + getUint8Array: function ( size ) { + + var a = []; + + for ( var i = 0; i < size; i++ ) { + + a.push( this.getUint8() ); + + } + + return a; + + }, + + + getInt16: function () { + + var value = this.dv.getInt16( this.offset, this.littleEndian ); + this.offset += 2; + return value; + + }, + + getInt16Array: function ( size ) { + + var a = []; + + for ( var i = 0; i < size; i++ ) { + + a.push( this.getInt16() ); + + } + + return a; + + }, + + getUint16: function () { + + var value = this.dv.getUint16( this.offset, this.littleEndian ); + this.offset += 2; + return value; + + }, + + getUint16Array: function ( size ) { + + var a = []; + + for ( var i = 0; i < size; i++ ) { + + a.push( this.getUint16() ); + + } + + return a; + + }, + + getInt32: function () { + + var value = this.dv.getInt32( this.offset, this.littleEndian ); + this.offset += 4; + return value; + + }, + + getInt32Array: function ( size ) { + + var a = []; + + for ( var i = 0; i < size; i++ ) { + + a.push( this.getInt32() ); + + } + + return a; + + }, + + getUint32: function () { + + var value = this.dv.getUint32( this.offset, this.littleEndian ); + this.offset += 4; + return value; + + }, + + getUint32Array: function ( size ) { + + var a = []; + + for ( var i = 0; i < size; i++ ) { + + a.push( this.getUint32() ); + + } + + return a; + + }, + + getFloat32: function () { + + var value = this.dv.getFloat32( this.offset, this.littleEndian ); + this.offset += 4; + return value; + + }, + + getFloat32Array: function( size ) { + + var a = []; + + for ( var i = 0; i < size; i++ ) { + + a.push( this.getFloat32() ); + + } + + return a; + + }, + + getFloat64: function () { + + var value = this.dv.getFloat64( this.offset, this.littleEndian ); + this.offset += 8; + return value; + + }, + + getFloat64Array: function( size ) { + + var a = []; + + for ( var i = 0; i < size; i++ ) { + + a.push( this.getFloat64() ); + + } + + return a; + + }, + + getIndex: function ( type, isUnsigned ) { + + switch ( type ) { + + case 1: + return ( isUnsigned === true ) ? this.getUint8() : this.getInt8(); + + case 2: + return ( isUnsigned === true ) ? this.getUint16() : this.getInt16(); + + case 4: + return this.getInt32(); // No Uint32 + + default: + throw 'unknown number type ' + type + ' exception.'; + + } + + }, + + getIndexArray: function ( type, size, isUnsigned ) { + + var a = []; + + for ( var i = 0; i < size; i++ ) { + + a.push( this.getIndex( type, isUnsigned ) ); + + } + + return a; + + }, + + getChars: function ( size ) { + + var str = ''; + + while ( size > 0 ) { + + var value = this.getUint8(); + size--; + + if ( value === 0 ) { + + break; + + } + + str += String.fromCharCode( value ); + + } + + while ( size > 0 ) { + + this.getUint8(); + size--; + + } + + return str; + + }, + + getSjisStringsAsUnicode: function ( size ) { + + var a = []; + + while ( size > 0 ) { + + var value = this.getUint8(); + size--; + + if ( value === 0 ) { + + break; + + } + + a.push( value ); + + } + + while ( size > 0 ) { + + this.getUint8(); + size--; + + } + + return this.encoder.s2u( new Uint8Array( a ) ); + + }, + + getUnicodeStrings: function ( size ) { + + var str = ''; + + while ( size > 0 ) { + + var value = this.getUint16(); + size -= 2; + + if ( value === 0 ) { + + break; + + } + + str += String.fromCharCode( value ); + + } + + while ( size > 0 ) { + + this.getUint8(); + size--; + + } + + return str; + + }, + + getTextBuffer: function () { + + var size = this.getUint32(); + return this.getUnicodeStrings( size ); + + } + +}; + +/** + * @author takahiro / https://github.com/takahirox + */ + +function DataCreationHelper () { +} + +DataCreationHelper.prototype = { + + constructor: DataCreationHelper, + + leftToRightVector3: function ( v ) { + + v[ 2 ] = -v[ 2 ]; + + }, + + leftToRightQuaternion: function ( q ) { + + q[ 0 ] = -q[ 0 ]; + q[ 1 ] = -q[ 1 ]; + + }, + + leftToRightEuler: function ( r ) { + + r[ 0 ] = -r[ 0 ]; + r[ 1 ] = -r[ 1 ]; + + }, + + leftToRightIndexOrder: function ( p ) { + + var tmp = p[ 2 ]; + p[ 2 ] = p[ 0 ]; + p[ 0 ] = tmp; + + }, + + leftToRightVector3Range: function ( v1, v2 ) { + + var tmp = -v2[ 2 ]; + v2[ 2 ] = -v1[ 2 ]; + v1[ 2 ] = tmp; + + }, + + leftToRightEulerRange: function ( r1, r2 ) { + + var tmp1 = -r2[ 0 ]; + var tmp2 = -r2[ 1 ]; + r2[ 0 ] = -r1[ 0 ]; + r2[ 1 ] = -r1[ 1 ]; + r1[ 0 ] = tmp1; + r1[ 1 ] = tmp2; + + } + +}; + +/** + * @author takahiro / https://github.com/takahirox + */ + +function Parser() { +} + +Parser.prototype.parsePmd = function ( buffer, leftToRight ) { + + var pmd = {}; + var dv = new DataViewEx( buffer ); + + pmd.metadata = {}; + pmd.metadata.format = 'pmd'; + pmd.metadata.coordinateSystem = 'left'; + + var parseHeader = function () { + + var metadata = pmd.metadata; + metadata.magic = dv.getChars( 3 ); + + if ( metadata.magic !== 'Pmd' ) { + + throw 'PMD file magic is not Pmd, but ' + metadata.magic; + + } + + metadata.version = dv.getFloat32(); + metadata.modelName = dv.getSjisStringsAsUnicode( 20 ); + metadata.comment = dv.getSjisStringsAsUnicode( 256 ); + + }; + + var parseVertices = function () { + + var parseVertex = function () { + + var p = {}; + p.position = dv.getFloat32Array( 3 ); + p.normal = dv.getFloat32Array( 3 ); + p.uv = dv.getFloat32Array( 2 ); + p.skinIndices = dv.getUint16Array( 2 ); + p.skinWeights = [ dv.getUint8() / 100 ]; + p.skinWeights.push( 1.0 - p.skinWeights[ 0 ] ); + p.edgeFlag = dv.getUint8(); + return p; + + }; + + var metadata = pmd.metadata; + metadata.vertexCount = dv.getUint32(); + + pmd.vertices = []; + + for ( var i = 0; i < metadata.vertexCount; i++ ) { + + pmd.vertices.push( parseVertex() ); + + } + + }; + + var parseFaces = function () { + + var parseFace = function () { + + var p = {}; + p.indices = dv.getUint16Array( 3 ); + return p; + + }; + + var metadata = pmd.metadata; + metadata.faceCount = dv.getUint32() / 3; + + pmd.faces = []; + + for ( var i = 0; i < metadata.faceCount; i++ ) { + + pmd.faces.push( parseFace() ); + + } + + }; + + var parseMaterials = function () { + + var parseMaterial = function () { + + var p = {}; + p.diffuse = dv.getFloat32Array( 4 ); + p.shininess = dv.getFloat32(); + p.specular = dv.getFloat32Array( 3 ); + p.ambient = dv.getFloat32Array( 3 ); + p.toonIndex = dv.getInt8(); + p.edgeFlag = dv.getUint8(); + p.faceCount = dv.getUint32() / 3; + p.fileName = dv.getSjisStringsAsUnicode( 20 ); + return p; + + }; + + var metadata = pmd.metadata; + metadata.materialCount = dv.getUint32(); + + pmd.materials = []; + + for ( var i = 0; i < metadata.materialCount; i++ ) { + + pmd.materials.push( parseMaterial() ); + + } + + }; + + var parseBones = function () { + + var parseBone = function () { + + var p = {}; + p.name = dv.getSjisStringsAsUnicode( 20 ); + p.parentIndex = dv.getInt16(); + p.tailIndex = dv.getInt16(); + p.type = dv.getUint8(); + p.ikIndex = dv.getInt16(); + p.position = dv.getFloat32Array( 3 ); + return p; + + }; + + var metadata = pmd.metadata; + metadata.boneCount = dv.getUint16(); + + pmd.bones = []; + + for ( var i = 0; i < metadata.boneCount; i++ ) { + + pmd.bones.push( parseBone() ); + + } + + }; + + var parseIks = function () { + + var parseIk = function () { + + var p = {}; + p.target = dv.getUint16(); + p.effector = dv.getUint16(); + p.linkCount = dv.getUint8(); + p.iteration = dv.getUint16(); + p.maxAngle = dv.getFloat32(); + + p.links = []; + for ( var i = 0; i < p.linkCount; i++ ) { + + var link = {}; + link.index = dv.getUint16(); + p.links.push( link ); + + } + + return p; + + }; + + var metadata = pmd.metadata; + metadata.ikCount = dv.getUint16(); + + pmd.iks = []; + + for ( var i = 0; i < metadata.ikCount; i++ ) { + + pmd.iks.push( parseIk() ); + + } + + }; + + var parseMorphs = function () { + + var parseMorph = function () { + + var p = {}; + p.name = dv.getSjisStringsAsUnicode( 20 ); + p.elementCount = dv.getUint32(); + p.type = dv.getUint8(); + + p.elements = []; + for ( var i = 0; i < p.elementCount; i++ ) { + + p.elements.push( { + index: dv.getUint32(), + position: dv.getFloat32Array( 3 ) + } ) ; + + } + + return p; + + }; + + var metadata = pmd.metadata; + metadata.morphCount = dv.getUint16(); + + pmd.morphs = []; + + for ( var i = 0; i < metadata.morphCount; i++ ) { + + pmd.morphs.push( parseMorph() ); + + } + + + }; + + var parseMorphFrames = function () { + + var parseMorphFrame = function () { + + var p = {}; + p.index = dv.getUint16(); + return p; + + }; + + var metadata = pmd.metadata; + metadata.morphFrameCount = dv.getUint8(); + + pmd.morphFrames = []; + + for ( var i = 0; i < metadata.morphFrameCount; i++ ) { + + pmd.morphFrames.push( parseMorphFrame() ); + + } + + }; + + var parseBoneFrameNames = function () { + + var parseBoneFrameName = function () { + + var p = {}; + p.name = dv.getSjisStringsAsUnicode( 50 ); + return p; + + }; + + var metadata = pmd.metadata; + metadata.boneFrameNameCount = dv.getUint8(); + + pmd.boneFrameNames = []; + + for ( var i = 0; i < metadata.boneFrameNameCount; i++ ) { + + pmd.boneFrameNames.push( parseBoneFrameName() ); + + } + + }; + + var parseBoneFrames = function () { + + var parseBoneFrame = function () { + + var p = {}; + p.boneIndex = dv.getInt16(); + p.frameIndex = dv.getUint8(); + return p; + + }; + + var metadata = pmd.metadata; + metadata.boneFrameCount = dv.getUint32(); + + pmd.boneFrames = []; + + for ( var i = 0; i < metadata.boneFrameCount; i++ ) { + + pmd.boneFrames.push( parseBoneFrame() ); + + } + + }; + + var parseEnglishHeader = function () { + + var metadata = pmd.metadata; + metadata.englishCompatibility = dv.getUint8(); + + if ( metadata.englishCompatibility > 0 ) { + + metadata.englishModelName = dv.getSjisStringsAsUnicode( 20 ); + metadata.englishComment = dv.getSjisStringsAsUnicode( 256 ); + + } + + }; + + var parseEnglishBoneNames = function () { + + var parseEnglishBoneName = function () { + + var p = {}; + p.name = dv.getSjisStringsAsUnicode( 20 ); + return p; + + }; + + var metadata = pmd.metadata; + + if ( metadata.englishCompatibility === 0 ) { + + return; + + } + + pmd.englishBoneNames = []; + + for ( var i = 0; i < metadata.boneCount; i++ ) { + + pmd.englishBoneNames.push( parseEnglishBoneName() ); + + } + + }; + + var parseEnglishMorphNames = function () { + + var parseEnglishMorphName = function () { + + var p = {}; + p.name = dv.getSjisStringsAsUnicode( 20 ); + return p; + + }; + + var metadata = pmd.metadata; + + if ( metadata.englishCompatibility === 0 ) { + + return; + + } + + pmd.englishMorphNames = []; + + for ( var i = 0; i < metadata.morphCount - 1; i++ ) { + + pmd.englishMorphNames.push( parseEnglishMorphName() ); + + } + + }; + + var parseEnglishBoneFrameNames = function () { + + var parseEnglishBoneFrameName = function () { + + var p = {}; + p.name = dv.getSjisStringsAsUnicode( 50 ); + return p; + + }; + + var metadata = pmd.metadata; + + if ( metadata.englishCompatibility === 0 ) { + + return; + + } + + pmd.englishBoneFrameNames = []; + + for ( var i = 0; i < metadata.boneFrameNameCount; i++ ) { + + pmd.englishBoneFrameNames.push( parseEnglishBoneFrameName() ); + + } + + }; + + var parseToonTextures = function () { + + var parseToonTexture = function () { + + var p = {}; + p.fileName = dv.getSjisStringsAsUnicode( 100 ); + return p; + + }; + + pmd.toonTextures = []; + + for ( var i = 0; i < 10; i++ ) { + + pmd.toonTextures.push( parseToonTexture() ); + + } + + }; + + var parseRigidBodies = function () { + + var parseRigidBody = function () { + + var p = {}; + p.name = dv.getSjisStringsAsUnicode( 20 ); + p.boneIndex = dv.getInt16(); + p.groupIndex = dv.getUint8(); + p.groupTarget = dv.getUint16(); + p.shapeType = dv.getUint8(); + p.width = dv.getFloat32(); + p.height = dv.getFloat32(); + p.depth = dv.getFloat32(); + p.position = dv.getFloat32Array( 3 ); + p.rotation = dv.getFloat32Array( 3 ); + p.weight = dv.getFloat32(); + p.positionDamping = dv.getFloat32(); + p.rotationDamping = dv.getFloat32(); + p.restitution = dv.getFloat32(); + p.friction = dv.getFloat32(); + p.type = dv.getUint8(); + return p; + + }; + + var metadata = pmd.metadata; + metadata.rigidBodyCount = dv.getUint32(); + + pmd.rigidBodies = []; + + for ( var i = 0; i < metadata.rigidBodyCount; i++ ) { + + pmd.rigidBodies.push( parseRigidBody() ); + + } + + }; + + var parseConstraints = function () { + + var parseConstraint = function () { + + var p = {}; + p.name = dv.getSjisStringsAsUnicode( 20 ); + p.rigidBodyIndex1 = dv.getUint32(); + p.rigidBodyIndex2 = dv.getUint32(); + p.position = dv.getFloat32Array( 3 ); + p.rotation = dv.getFloat32Array( 3 ); + p.translationLimitation1 = dv.getFloat32Array( 3 ); + p.translationLimitation2 = dv.getFloat32Array( 3 ); + p.rotationLimitation1 = dv.getFloat32Array( 3 ); + p.rotationLimitation2 = dv.getFloat32Array( 3 ); + p.springPosition = dv.getFloat32Array( 3 ); + p.springRotation = dv.getFloat32Array( 3 ); + return p; + + }; + + var metadata = pmd.metadata; + metadata.constraintCount = dv.getUint32(); + + pmd.constraints = []; + + for ( var i = 0; i < metadata.constraintCount; i++ ) { + + pmd.constraints.push( parseConstraint() ); + + } + + }; + + parseHeader(); + parseVertices(); + parseFaces(); + parseMaterials(); + parseBones(); + parseIks(); + parseMorphs(); + parseMorphFrames(); + parseBoneFrameNames(); + parseBoneFrames(); + parseEnglishHeader(); + parseEnglishBoneNames(); + parseEnglishMorphNames(); + parseEnglishBoneFrameNames(); + parseToonTextures(); + parseRigidBodies(); + parseConstraints(); + + if ( leftToRight === true ) this.leftToRightModel( pmd ); + + // console.log( pmd ); // for console debug + + return pmd; + +}; + +Parser.prototype.parsePmx = function ( buffer, leftToRight ) { + + var pmx = {}; + var dv = new DataViewEx( buffer ); + + pmx.metadata = {}; + pmx.metadata.format = 'pmx'; + pmx.metadata.coordinateSystem = 'left'; + + var parseHeader = function () { + + var metadata = pmx.metadata; + metadata.magic = dv.getChars( 4 ); + + // Note: don't remove the last blank space. + if ( metadata.magic !== 'PMX ' ) { + + throw 'PMX file magic is not PMX , but ' + metadata.magic; + + } + + metadata.version = dv.getFloat32(); + + if ( metadata.version !== 2.0 && metadata.version !== 2.1 ) { + + throw 'PMX version ' + metadata.version + ' is not supported.'; + + } + + metadata.headerSize = dv.getUint8(); + metadata.encoding = dv.getUint8(); + metadata.additionalUvNum = dv.getUint8(); + metadata.vertexIndexSize = dv.getUint8(); + metadata.textureIndexSize = dv.getUint8(); + metadata.materialIndexSize = dv.getUint8(); + metadata.boneIndexSize = dv.getUint8(); + metadata.morphIndexSize = dv.getUint8(); + metadata.rigidBodyIndexSize = dv.getUint8(); + metadata.modelName = dv.getTextBuffer(); + metadata.englishModelName = dv.getTextBuffer(); + metadata.comment = dv.getTextBuffer(); + metadata.englishComment = dv.getTextBuffer(); + + }; + + var parseVertices = function () { + + var parseVertex = function () { + + var p = {}; + p.position = dv.getFloat32Array( 3 ); + p.normal = dv.getFloat32Array( 3 ); + p.uv = dv.getFloat32Array( 2 ); + + p.auvs = []; + + for ( var i = 0; i < pmx.metadata.additionalUvNum; i++ ) { + + p.auvs.push( dv.getFloat32Array( 4 ) ); + + } + + p.type = dv.getUint8(); + + var indexSize = metadata.boneIndexSize; + + if ( p.type === 0 ) { // BDEF1 + + p.skinIndices = dv.getIndexArray( indexSize, 1 ); + p.skinWeights = [ 1.0 ]; + + } else if ( p.type === 1 ) { // BDEF2 + + p.skinIndices = dv.getIndexArray( indexSize, 2 ); + p.skinWeights = dv.getFloat32Array( 1 ); + p.skinWeights.push( 1.0 - p.skinWeights[ 0 ] ); + + } else if ( p.type === 2 ) { // BDEF4 + + p.skinIndices = dv.getIndexArray( indexSize, 4 ); + p.skinWeights = dv.getFloat32Array( 4 ); + + } else if ( p.type === 3 ) { // SDEF + + p.skinIndices = dv.getIndexArray( indexSize, 2 ); + p.skinWeights = dv.getFloat32Array( 1 ); + p.skinWeights.push( 1.0 - p.skinWeights[ 0 ] ); + + p.skinC = dv.getFloat32Array( 3 ); + p.skinR0 = dv.getFloat32Array( 3 ); + p.skinR1 = dv.getFloat32Array( 3 ); + + // SDEF is not supported yet and is handled as BDEF2 so far. + // TODO: SDEF support + p.type = 1; + + } else { + + throw 'unsupport bone type ' + p.type + ' exception.'; + + } + + p.edgeRatio = dv.getFloat32(); + return p; + + }; + + var metadata = pmx.metadata; + metadata.vertexCount = dv.getUint32(); + + pmx.vertices = []; + + for ( var i = 0; i < metadata.vertexCount; i++ ) { + + pmx.vertices.push( parseVertex() ); + + } + + }; + + var parseFaces = function () { + + var parseFace = function () { + + var p = {}; + p.indices = dv.getIndexArray( metadata.vertexIndexSize, 3, true ); + return p; + + }; + + var metadata = pmx.metadata; + metadata.faceCount = dv.getUint32() / 3; + + pmx.faces = []; + + for ( var i = 0; i < metadata.faceCount; i++ ) { + + pmx.faces.push( parseFace() ); + + } + + }; + + var parseTextures = function () { + + var parseTexture = function () { + + return dv.getTextBuffer(); + + }; + + var metadata = pmx.metadata; + metadata.textureCount = dv.getUint32(); + + pmx.textures = []; + + for ( var i = 0; i < metadata.textureCount; i++ ) { + + pmx.textures.push( parseTexture() ); + + } + + }; + + var parseMaterials = function () { + + var parseMaterial = function () { + + var p = {}; + p.name = dv.getTextBuffer(); + p.englishName = dv.getTextBuffer(); + p.diffuse = dv.getFloat32Array( 4 ); + p.specular = dv.getFloat32Array( 3 ); + p.shininess = dv.getFloat32(); + p.ambient = dv.getFloat32Array( 3 ); + p.flag = dv.getUint8(); + p.edgeColor = dv.getFloat32Array( 4 ); + p.edgeSize = dv.getFloat32(); + p.textureIndex = dv.getIndex( pmx.metadata.textureIndexSize ); + p.envTextureIndex = dv.getIndex( pmx.metadata.textureIndexSize ); + p.envFlag = dv.getUint8(); + p.toonFlag = dv.getUint8(); + + if ( p.toonFlag === 0 ) { + + p.toonIndex = dv.getIndex( pmx.metadata.textureIndexSize ); + + } else if ( p.toonFlag === 1 ) { + + p.toonIndex = dv.getInt8(); + + } else { + + throw 'unknown toon flag ' + p.toonFlag + ' exception.'; + + } + + p.comment = dv.getTextBuffer(); + p.faceCount = dv.getUint32() / 3; + return p; + + }; + + var metadata = pmx.metadata; + metadata.materialCount = dv.getUint32(); + + pmx.materials = []; + + for ( var i = 0; i < metadata.materialCount; i++ ) { + + pmx.materials.push( parseMaterial() ); + + } + + }; + + var parseBones = function () { + + var parseBone = function () { + + var p = {}; + p.name = dv.getTextBuffer(); + p.englishName = dv.getTextBuffer(); + p.position = dv.getFloat32Array( 3 ); + p.parentIndex = dv.getIndex( pmx.metadata.boneIndexSize ); + p.transformationClass = dv.getUint32(); + p.flag = dv.getUint16(); + + if ( p.flag & 0x1 ) { + + p.connectIndex = dv.getIndex( pmx.metadata.boneIndexSize ); + + } else { + + p.offsetPosition = dv.getFloat32Array( 3 ); + + } + + if ( p.flag & 0x100 || p.flag & 0x200 ) { + + // Note: I don't think Grant is an appropriate name + // but I found that some English translated MMD tools use this term + // so I've named it Grant so far. + // I'd rename to more appropriate name from Grant later. + var grant = {}; + + grant.isLocal = ( p.flag & 0x80 ) !== 0 ? true : false; + grant.affectRotation = ( p.flag & 0x100 ) !== 0 ? true : false; + grant.affectPosition = ( p.flag & 0x200 ) !== 0 ? true : false; + grant.parentIndex = dv.getIndex( pmx.metadata.boneIndexSize ); + grant.ratio = dv.getFloat32(); + + p.grant = grant; + + } + + if ( p.flag & 0x400 ) { + + p.fixAxis = dv.getFloat32Array( 3 ); + + } + + if ( p.flag & 0x800 ) { + + p.localXVector = dv.getFloat32Array( 3 ); + p.localZVector = dv.getFloat32Array( 3 ); + + } + + if ( p.flag & 0x2000 ) { + + p.key = dv.getUint32(); + + } + + if ( p.flag & 0x20 ) { + + var ik = {}; + + ik.effector = dv.getIndex( pmx.metadata.boneIndexSize ); + ik.target = null; + ik.iteration = dv.getUint32(); + ik.maxAngle = dv.getFloat32(); + ik.linkCount = dv.getUint32(); + ik.links = []; + + for ( var i = 0; i < ik.linkCount; i++ ) { + + var link = {}; + link.index = dv.getIndex( pmx.metadata.boneIndexSize ); + link.angleLimitation = dv.getUint8(); + + if ( link.angleLimitation === 1 ) { + + link.lowerLimitationAngle = dv.getFloat32Array( 3 ); + link.upperLimitationAngle = dv.getFloat32Array( 3 ); + + } + + ik.links.push( link ); + + } + + p.ik = ik; + } + + return p; + + }; + + var metadata = pmx.metadata; + metadata.boneCount = dv.getUint32(); + + pmx.bones = []; + + for ( var i = 0; i < metadata.boneCount; i++ ) { + + pmx.bones.push( parseBone() ); + + } + + }; + + var parseMorphs = function () { + + var parseMorph = function () { + + var p = {}; + p.name = dv.getTextBuffer(); + p.englishName = dv.getTextBuffer(); + p.panel = dv.getUint8(); + p.type = dv.getUint8(); + p.elementCount = dv.getUint32(); + p.elements = []; + + for ( var i = 0; i < p.elementCount; i++ ) { + + if ( p.type === 0 ) { // group morph + + var m = {}; + m.index = dv.getIndex( pmx.metadata.morphIndexSize ); + m.ratio = dv.getFloat32(); + p.elements.push( m ); + + } else if ( p.type === 1 ) { // vertex morph + + var m = {}; + m.index = dv.getIndex( pmx.metadata.vertexIndexSize, true ); + m.position = dv.getFloat32Array( 3 ); + p.elements.push( m ); + + } else if ( p.type === 2 ) { // bone morph + + var m = {}; + m.index = dv.getIndex( pmx.metadata.boneIndexSize ); + m.position = dv.getFloat32Array( 3 ); + m.rotation = dv.getFloat32Array( 4 ); + p.elements.push( m ); + + } else if ( p.type === 3 ) { // uv morph + + var m = {}; + m.index = dv.getIndex( pmx.metadata.vertexIndexSize, true ); + m.uv = dv.getFloat32Array( 4 ); + p.elements.push( m ); + + } else if ( p.type === 4 ) { // additional uv1 + + // TODO: implement + + } else if ( p.type === 5 ) { // additional uv2 + + // TODO: implement + + } else if ( p.type === 6 ) { // additional uv3 + + // TODO: implement + + } else if ( p.type === 7 ) { // additional uv4 + + // TODO: implement + + } else if ( p.type === 8 ) { // material morph + + var m = {}; + m.index = dv.getIndex( pmx.metadata.materialIndexSize ); + m.type = dv.getUint8(); + m.diffuse = dv.getFloat32Array( 4 ); + m.specular = dv.getFloat32Array( 3 ); + m.shininess = dv.getFloat32(); + m.ambient = dv.getFloat32Array( 3 ); + m.edgeColor = dv.getFloat32Array( 4 ); + m.edgeSize = dv.getFloat32(); + m.textureColor = dv.getFloat32Array( 4 ); + m.sphereTextureColor = dv.getFloat32Array( 4 ); + m.toonColor = dv.getFloat32Array( 4 ); + p.elements.push( m ); + + } + + } + + return p; + + }; + + var metadata = pmx.metadata; + metadata.morphCount = dv.getUint32(); + + pmx.morphs = []; + + for ( var i = 0; i < metadata.morphCount; i++ ) { + + pmx.morphs.push( parseMorph() ); + + } + + }; + + var parseFrames = function () { + + var parseFrame = function () { + + var p = {}; + p.name = dv.getTextBuffer(); + p.englishName = dv.getTextBuffer(); + p.type = dv.getUint8(); + p.elementCount = dv.getUint32(); + p.elements = []; + + for ( var i = 0; i < p.elementCount; i++ ) { + + var e = {}; + e.target = dv.getUint8(); + e.index = ( e.target === 0 ) ? dv.getIndex( pmx.metadata.boneIndexSize ) : dv.getIndex( pmx.metadata.morphIndexSize ); + p.elements.push( e ); + + } + + return p; + + }; + + var metadata = pmx.metadata; + metadata.frameCount = dv.getUint32(); + + pmx.frames = []; + + for ( var i = 0; i < metadata.frameCount; i++ ) { + + pmx.frames.push( parseFrame() ); + + } + + }; + + var parseRigidBodies = function () { + + var parseRigidBody = function () { + + var p = {}; + p.name = dv.getTextBuffer(); + p.englishName = dv.getTextBuffer(); + p.boneIndex = dv.getIndex( pmx.metadata.boneIndexSize ); + p.groupIndex = dv.getUint8(); + p.groupTarget = dv.getUint16(); + p.shapeType = dv.getUint8(); + p.width = dv.getFloat32(); + p.height = dv.getFloat32(); + p.depth = dv.getFloat32(); + p.position = dv.getFloat32Array( 3 ); + p.rotation = dv.getFloat32Array( 3 ); + p.weight = dv.getFloat32(); + p.positionDamping = dv.getFloat32(); + p.rotationDamping = dv.getFloat32(); + p.restitution = dv.getFloat32(); + p.friction = dv.getFloat32(); + p.type = dv.getUint8(); + return p; + + }; + + var metadata = pmx.metadata; + metadata.rigidBodyCount = dv.getUint32(); + + pmx.rigidBodies = []; + + for ( var i = 0; i < metadata.rigidBodyCount; i++ ) { + + pmx.rigidBodies.push( parseRigidBody() ); + + } + + }; + + var parseConstraints = function () { + + var parseConstraint = function () { + + var p = {}; + p.name = dv.getTextBuffer(); + p.englishName = dv.getTextBuffer(); + p.type = dv.getUint8(); + p.rigidBodyIndex1 = dv.getIndex( pmx.metadata.rigidBodyIndexSize ); + p.rigidBodyIndex2 = dv.getIndex( pmx.metadata.rigidBodyIndexSize ); + p.position = dv.getFloat32Array( 3 ); + p.rotation = dv.getFloat32Array( 3 ); + p.translationLimitation1 = dv.getFloat32Array( 3 ); + p.translationLimitation2 = dv.getFloat32Array( 3 ); + p.rotationLimitation1 = dv.getFloat32Array( 3 ); + p.rotationLimitation2 = dv.getFloat32Array( 3 ); + p.springPosition = dv.getFloat32Array( 3 ); + p.springRotation = dv.getFloat32Array( 3 ); + return p; + + }; + + var metadata = pmx.metadata; + metadata.constraintCount = dv.getUint32(); + + pmx.constraints = []; + + for ( var i = 0; i < metadata.constraintCount; i++ ) { + + pmx.constraints.push( parseConstraint() ); + + } + + }; + + parseHeader(); + parseVertices(); + parseFaces(); + parseTextures(); + parseMaterials(); + parseBones(); + parseMorphs(); + parseFrames(); + parseRigidBodies(); + parseConstraints(); + + if ( leftToRight === true ) this.leftToRightModel( pmx ); + + // console.log( pmx ); // for console debug + + return pmx; + +}; + +Parser.prototype.parseVmd = function ( buffer, leftToRight ) { + + var vmd = {}; + var dv = new DataViewEx( buffer ); + + vmd.metadata = {}; + vmd.metadata.coordinateSystem = 'left'; + + var parseHeader = function () { + + var metadata = vmd.metadata; + metadata.magic = dv.getChars( 30 ); + + if ( metadata.magic !== 'Vocaloid Motion Data 0002' ) { + + throw 'VMD file magic is not Vocaloid Motion Data 0002, but ' + metadata.magic; + + } + + metadata.name = dv.getSjisStringsAsUnicode( 20 ); + + }; + + var parseMotions = function () { + + var parseMotion = function () { + + var p = {}; + p.boneName = dv.getSjisStringsAsUnicode( 15 ); + p.frameNum = dv.getUint32(); + p.position = dv.getFloat32Array( 3 ); + p.rotation = dv.getFloat32Array( 4 ); + p.interpolation = dv.getUint8Array( 64 ); + return p; + + }; + + var metadata = vmd.metadata; + metadata.motionCount = dv.getUint32(); + + vmd.motions = []; + for ( var i = 0; i < metadata.motionCount; i++ ) { + + vmd.motions.push( parseMotion() ); + + } + + }; + + var parseMorphs = function () { + + var parseMorph = function () { + + var p = {}; + p.morphName = dv.getSjisStringsAsUnicode( 15 ); + p.frameNum = dv.getUint32(); + p.weight = dv.getFloat32(); + return p; + + }; + + var metadata = vmd.metadata; + metadata.morphCount = dv.getUint32(); + + vmd.morphs = []; + for ( var i = 0; i < metadata.morphCount; i++ ) { + + vmd.morphs.push( parseMorph() ); + + } + + }; + + var parseCameras = function () { + + var parseCamera = function () { + + var p = {}; + p.frameNum = dv.getUint32(); + p.distance = dv.getFloat32(); + p.position = dv.getFloat32Array( 3 ); + p.rotation = dv.getFloat32Array( 3 ); + p.interpolation = dv.getUint8Array( 24 ); + p.fov = dv.getUint32(); + p.perspective = dv.getUint8(); + return p; + + }; + + var metadata = vmd.metadata; + metadata.cameraCount = dv.getUint32(); + + vmd.cameras = []; + for ( var i = 0; i < metadata.cameraCount; i++ ) { + + vmd.cameras.push( parseCamera() ); + + } + + }; + + parseHeader(); + parseMotions(); + parseMorphs(); + parseCameras(); + + if ( leftToRight === true ) this.leftToRightVmd( vmd ); + + // console.log( vmd ); // for console debug + + return vmd; + +}; + +Parser.prototype.parseVpd = function ( text, leftToRight ) { + + var vpd = {}; + + vpd.metadata = {}; + vpd.metadata.coordinateSystem = 'left'; + + vpd.bones = []; + + var commentPatternG = /\/\/\w*(\r|\n|\r\n)/g; + var newlinePattern = /\r|\n|\r\n/; + + var lines = text.replace( commentPatternG, '' ).split( newlinePattern ); + + function throwError () { + + throw 'the file seems not vpd file.'; + + } + + function checkMagic () { + + if ( lines[ 0 ] !== 'Vocaloid Pose Data file' ) { + + throwError(); + + } + + } + + function parseHeader () { + + if ( lines.length < 4 ) { + + throwError(); + + } + + vpd.metadata.parentFile = lines[ 2 ]; + vpd.metadata.boneCount = parseInt( lines[ 3 ] ); + + } + + function parseBones () { + + var boneHeaderPattern = /^\s*(Bone[0-9]+)\s*\{\s*(.*)$/; + var boneVectorPattern = /^\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*;/; + var boneQuaternionPattern = /^\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*;/; + var boneFooterPattern = /^\s*}/; + + var bones = vpd.bones; + var n = null; + var v = null; + var q = null; + + for ( var i = 4; i < lines.length; i++ ) { + + var line = lines[ i ]; + + var result; + + result = line.match( boneHeaderPattern ); + + if ( result !== null ) { + + if ( n !== null ) { + + throwError(); + + } + + n = result[ 2 ]; + + } + + result = line.match( boneVectorPattern ); + + if ( result !== null ) { + + if ( v !== null ) { + + throwError(); + + } + + v = [ + + parseFloat( result[ 1 ] ), + parseFloat( result[ 2 ] ), + parseFloat( result[ 3 ] ) + + ]; + + } + + result = line.match( boneQuaternionPattern ); + + if ( result !== null ) { + + if ( q !== null ) { + + throwError(); + + } + + q = [ + + parseFloat( result[ 1 ] ), + parseFloat( result[ 2 ] ), + parseFloat( result[ 3 ] ), + parseFloat( result[ 4 ] ) + + ]; + + + } + + result = line.match( boneFooterPattern ); + + if ( result !== null ) { + + if ( n === null || v === null || q === null ) { + + throwError(); + + } + + bones.push( { + + name: n, + translation: v, + quaternion: q + + } ); + + n = null; + v = null; + q = null; + + } + + } + + if ( n !== null || v !== null || q !== null ) { + + throwError(); + + } + + } + + checkMagic(); + parseHeader(); + parseBones(); + + if ( leftToRight === true ) this.leftToRightVpd( vpd ); + + // console.log( vpd ); // for console debug + + return vpd; + +}; + +Parser.prototype.mergeVmds = function ( vmds ) { + + var v = {}; + v.metadata = {}; + v.metadata.name = vmds[ 0 ].metadata.name; + v.metadata.coordinateSystem = vmds[ 0 ].metadata.coordinateSystem; + v.metadata.motionCount = 0; + v.metadata.morphCount = 0; + v.metadata.cameraCount = 0; + v.motions = []; + v.morphs = []; + v.cameras = []; + + for ( var i = 0; i < vmds.length; i++ ) { + + var v2 = vmds[ i ]; + + v.metadata.motionCount += v2.metadata.motionCount; + v.metadata.morphCount += v2.metadata.morphCount; + v.metadata.cameraCount += v2.metadata.cameraCount; + + for ( var j = 0; j < v2.metadata.motionCount; j++ ) { + + v.motions.push( v2.motions[ j ] ); + + } + + for ( var j = 0; j < v2.metadata.morphCount; j++ ) { + + v.morphs.push( v2.morphs[ j ] ); + + } + + for ( var j = 0; j < v2.metadata.cameraCount; j++ ) { + + v.cameras.push( v2.cameras[ j ] ); + + } + + } + + return v; + +}; + +Parser.prototype.leftToRightModel = function ( model ) { + + if ( model.metadata.coordinateSystem === 'right' ) { + + return; + + } + + model.metadata.coordinateSystem = 'right'; + + var helper = new DataCreationHelper(); + + for ( var i = 0; i < model.metadata.vertexCount; i++ ) { + + helper.leftToRightVector3( model.vertices[ i ].position ); + helper.leftToRightVector3( model.vertices[ i ].normal ); + + } + + for ( var i = 0; i < model.metadata.faceCount; i++ ) { + + helper.leftToRightIndexOrder( model.faces[ i ].indices ); + + } + + for ( var i = 0; i < model.metadata.boneCount; i++ ) { + + helper.leftToRightVector3( model.bones[ i ].position ); + + } + + // TODO: support other morph for PMX + for ( var i = 0; i < model.metadata.morphCount; i++ ) { + + var m = model.morphs[ i ]; + + if ( model.metadata.format === 'pmx' && m.type !== 1 ) { + + // TODO: implement + continue; + + } + + for ( var j = 0; j < m.elements.length; j++ ) { + + helper.leftToRightVector3( m.elements[ j ].position ); + + } + + } + + for ( var i = 0; i < model.metadata.rigidBodyCount; i++ ) { + + helper.leftToRightVector3( model.rigidBodies[ i ].position ); + helper.leftToRightEuler( model.rigidBodies[ i ].rotation ); + + } + + for ( var i = 0; i < model.metadata.constraintCount; i++ ) { + + helper.leftToRightVector3( model.constraints[ i ].position ); + helper.leftToRightEuler( model.constraints[ i ].rotation ); + helper.leftToRightVector3Range( model.constraints[ i ].translationLimitation1, model.constraints[ i ].translationLimitation2 ); + helper.leftToRightEulerRange( model.constraints[ i ].rotationLimitation1, model.constraints[ i ].rotationLimitation2 ); + + } + +}; + +Parser.prototype.leftToRightVmd = function ( vmd ) { + + if ( vmd.metadata.coordinateSystem === 'right' ) { + + return; + + } + + vmd.metadata.coordinateSystem = 'right'; + + var helper = new DataCreationHelper(); + + for ( var i = 0; i < vmd.metadata.motionCount; i++ ) { + + helper.leftToRightVector3( vmd.motions[ i ].position ); + helper.leftToRightQuaternion( vmd.motions[ i ].rotation ); + + } + + for ( var i = 0; i < vmd.metadata.cameraCount; i++ ) { + + helper.leftToRightVector3( vmd.cameras[ i ].position ); + helper.leftToRightEuler( vmd.cameras[ i ].rotation ); + + } + +}; + +Parser.prototype.leftToRightVpd = function ( vpd ) { + + if ( vpd.metadata.coordinateSystem === 'right' ) { + + return; + + } + + vpd.metadata.coordinateSystem = 'right'; + + var helper = new DataCreationHelper(); + + for ( var i = 0; i < vpd.bones.length; i++ ) { + + helper.leftToRightVector3( vpd.bones[ i ].translation ); + helper.leftToRightQuaternion( vpd.bones[ i ].quaternion ); + + } + +}; + +var MMDParser = { + CharsetEncoder: CharsetEncoder, + Parser: Parser +}; + +export { MMDParser, CharsetEncoder, Parser }; diff --git a/node_modules/three/examples/jsm/libs/motion-controllers.module.js b/node_modules/three/examples/jsm/libs/motion-controllers.module.js new file mode 100644 index 0000000..9b2caae --- /dev/null +++ b/node_modules/three/examples/jsm/libs/motion-controllers.module.js @@ -0,0 +1,397 @@ +/** + * @webxr-input-profiles/motion-controllers 1.0.0 https://github.com/immersive-web/webxr-input-profiles + */ + +const Constants = { + Handedness: Object.freeze({ + NONE: 'none', + LEFT: 'left', + RIGHT: 'right' + }), + + ComponentState: Object.freeze({ + DEFAULT: 'default', + TOUCHED: 'touched', + PRESSED: 'pressed' + }), + + ComponentProperty: Object.freeze({ + BUTTON: 'button', + X_AXIS: 'xAxis', + Y_AXIS: 'yAxis', + STATE: 'state' + }), + + ComponentType: Object.freeze({ + TRIGGER: 'trigger', + SQUEEZE: 'squeeze', + TOUCHPAD: 'touchpad', + THUMBSTICK: 'thumbstick', + BUTTON: 'button' + }), + + ButtonTouchThreshold: 0.05, + + AxisTouchThreshold: 0.1, + + VisualResponseProperty: Object.freeze({ + TRANSFORM: 'transform', + VISIBILITY: 'visibility' + }) +}; + +/** + * @description Static helper function to fetch a JSON file and turn it into a JS object + * @param {string} path - Path to JSON file to be fetched + */ +async function fetchJsonFile(path) { + const response = await fetch(path); + if (!response.ok) { + throw new Error(response.statusText); + } else { + return response.json(); + } +} + +async function fetchProfilesList(basePath) { + if (!basePath) { + throw new Error('No basePath supplied'); + } + + const profileListFileName = 'profilesList.json'; + const profilesList = await fetchJsonFile(`${basePath}/${profileListFileName}`); + return profilesList; +} + +async function fetchProfile(xrInputSource, basePath, defaultProfile = null, getAssetPath = true) { + if (!xrInputSource) { + throw new Error('No xrInputSource supplied'); + } + + if (!basePath) { + throw new Error('No basePath supplied'); + } + + // Get the list of profiles + const supportedProfilesList = await fetchProfilesList(basePath); + + // Find the relative path to the first requested profile that is recognized + let match; + xrInputSource.profiles.some((profileId) => { + const supportedProfile = supportedProfilesList[profileId]; + if (supportedProfile) { + match = { + profileId, + profilePath: `${basePath}/${supportedProfile.path}`, + deprecated: !!supportedProfile.deprecated + }; + } + return !!match; + }); + + if (!match) { + if (!defaultProfile) { + throw new Error('No matching profile name found'); + } + + const supportedProfile = supportedProfilesList[defaultProfile]; + if (!supportedProfile) { + throw new Error(`No matching profile name found and default profile "${defaultProfile}" missing.`); + } + + match = { + profileId: defaultProfile, + profilePath: `${basePath}/${supportedProfile.path}`, + deprecated: !!supportedProfile.deprecated + }; + } + + const profile = await fetchJsonFile(match.profilePath); + + let assetPath; + if (getAssetPath) { + let layout; + if (xrInputSource.handedness === 'any') { + layout = profile.layouts[Object.keys(profile.layouts)[0]]; + } else { + layout = profile.layouts[xrInputSource.handedness]; + } + if (!layout) { + throw new Error( + `No matching handedness, ${xrInputSource.handedness}, in profile ${match.profileId}` + ); + } + + if (layout.assetPath) { + assetPath = match.profilePath.replace('profile.json', layout.assetPath); + } + } + + return { profile, assetPath }; +} + +/** @constant {Object} */ +const defaultComponentValues = { + xAxis: 0, + yAxis: 0, + button: 0, + state: Constants.ComponentState.DEFAULT +}; + +/** + * @description Converts an X, Y coordinate from the range -1 to 1 (as reported by the Gamepad + * API) to the range 0 to 1 (for interpolation). Also caps the X, Y values to be bounded within + * a circle. This ensures that thumbsticks are not animated outside the bounds of their physical + * range of motion and touchpads do not report touch locations off their physical bounds. + * @param {number} x The original x coordinate in the range -1 to 1 + * @param {number} y The original y coordinate in the range -1 to 1 + */ +function normalizeAxes(x = 0, y = 0) { + let xAxis = x; + let yAxis = y; + + // Determine if the point is outside the bounds of the circle + // and, if so, place it on the edge of the circle + const hypotenuse = Math.sqrt((x * x) + (y * y)); + if (hypotenuse > 1) { + const theta = Math.atan2(y, x); + xAxis = Math.cos(theta); + yAxis = Math.sin(theta); + } + + // Scale and move the circle so values are in the interpolation range. The circle's origin moves + // from (0, 0) to (0.5, 0.5). The circle's radius scales from 1 to be 0.5. + const result = { + normalizedXAxis: (xAxis * 0.5) + 0.5, + normalizedYAxis: (yAxis * 0.5) + 0.5 + }; + return result; +} + +/** + * Contains the description of how the 3D model should visually respond to a specific user input. + * This is accomplished by initializing the object with the name of a node in the 3D model and + * property that need to be modified in response to user input, the name of the nodes representing + * the allowable range of motion, and the name of the input which triggers the change. In response + * to the named input changing, this object computes the appropriate weighting to use for + * interpolating between the range of motion nodes. + */ +class VisualResponse { + constructor(visualResponseDescription) { + this.componentProperty = visualResponseDescription.componentProperty; + this.states = visualResponseDescription.states; + this.valueNodeName = visualResponseDescription.valueNodeName; + this.valueNodeProperty = visualResponseDescription.valueNodeProperty; + + if (this.valueNodeProperty === Constants.VisualResponseProperty.TRANSFORM) { + this.minNodeName = visualResponseDescription.minNodeName; + this.maxNodeName = visualResponseDescription.maxNodeName; + } + + // Initializes the response's current value based on default data + this.value = 0; + this.updateFromComponent(defaultComponentValues); + } + + /** + * Computes the visual response's interpolation weight based on component state + * @param {Object} componentValues - The component from which to update + * @param {number} xAxis - The reported X axis value of the component + * @param {number} yAxis - The reported Y axis value of the component + * @param {number} button - The reported value of the component's button + * @param {string} state - The component's active state + */ + updateFromComponent({ + xAxis, yAxis, button, state + }) { + const { normalizedXAxis, normalizedYAxis } = normalizeAxes(xAxis, yAxis); + switch (this.componentProperty) { + case Constants.ComponentProperty.X_AXIS: + this.value = (this.states.includes(state)) ? normalizedXAxis : 0.5; + break; + case Constants.ComponentProperty.Y_AXIS: + this.value = (this.states.includes(state)) ? normalizedYAxis : 0.5; + break; + case Constants.ComponentProperty.BUTTON: + this.value = (this.states.includes(state)) ? button : 0; + break; + case Constants.ComponentProperty.STATE: + if (this.valueNodeProperty === Constants.VisualResponseProperty.VISIBILITY) { + this.value = (this.states.includes(state)); + } else { + this.value = this.states.includes(state) ? 1.0 : 0.0; + } + break; + default: + throw new Error(`Unexpected visualResponse componentProperty ${this.componentProperty}`); + } + } +} + +class Component { + /** + * @param {Object} componentId - Id of the component + * @param {Object} componentDescription - Description of the component to be created + */ + constructor(componentId, componentDescription) { + if (!componentId + || !componentDescription + || !componentDescription.visualResponses + || !componentDescription.gamepadIndices + || Object.keys(componentDescription.gamepadIndices).length === 0) { + throw new Error('Invalid arguments supplied'); + } + + this.id = componentId; + this.type = componentDescription.type; + this.rootNodeName = componentDescription.rootNodeName; + this.touchPointNodeName = componentDescription.touchPointNodeName; + + // Build all the visual responses for this component + this.visualResponses = {}; + Object.keys(componentDescription.visualResponses).forEach((responseName) => { + const visualResponse = new VisualResponse(componentDescription.visualResponses[responseName]); + this.visualResponses[responseName] = visualResponse; + }); + + // Set default values + this.gamepadIndices = Object.assign({}, componentDescription.gamepadIndices); + + this.values = { + state: Constants.ComponentState.DEFAULT, + button: (this.gamepadIndices.button !== undefined) ? 0 : undefined, + xAxis: (this.gamepadIndices.xAxis !== undefined) ? 0 : undefined, + yAxis: (this.gamepadIndices.yAxis !== undefined) ? 0 : undefined + }; + } + + get data() { + const data = { id: this.id, ...this.values }; + return data; + } + + /** + * @description Poll for updated data based on current gamepad state + * @param {Object} gamepad - The gamepad object from which the component data should be polled + */ + updateFromGamepad(gamepad) { + // Set the state to default before processing other data sources + this.values.state = Constants.ComponentState.DEFAULT; + + // Get and normalize button + if (this.gamepadIndices.button !== undefined + && gamepad.buttons.length > this.gamepadIndices.button) { + const gamepadButton = gamepad.buttons[this.gamepadIndices.button]; + this.values.button = gamepadButton.value; + this.values.button = (this.values.button < 0) ? 0 : this.values.button; + this.values.button = (this.values.button > 1) ? 1 : this.values.button; + + // Set the state based on the button + if (gamepadButton.pressed || this.values.button === 1) { + this.values.state = Constants.ComponentState.PRESSED; + } else if (gamepadButton.touched || this.values.button > Constants.ButtonTouchThreshold) { + this.values.state = Constants.ComponentState.TOUCHED; + } + } + + // Get and normalize x axis value + if (this.gamepadIndices.xAxis !== undefined + && gamepad.axes.length > this.gamepadIndices.xAxis) { + this.values.xAxis = gamepad.axes[this.gamepadIndices.xAxis]; + this.values.xAxis = (this.values.xAxis < -1) ? -1 : this.values.xAxis; + this.values.xAxis = (this.values.xAxis > 1) ? 1 : this.values.xAxis; + + // If the state is still default, check if the xAxis makes it touched + if (this.values.state === Constants.ComponentState.DEFAULT + && Math.abs(this.values.xAxis) > Constants.AxisTouchThreshold) { + this.values.state = Constants.ComponentState.TOUCHED; + } + } + + // Get and normalize Y axis value + if (this.gamepadIndices.yAxis !== undefined + && gamepad.axes.length > this.gamepadIndices.yAxis) { + this.values.yAxis = gamepad.axes[this.gamepadIndices.yAxis]; + this.values.yAxis = (this.values.yAxis < -1) ? -1 : this.values.yAxis; + this.values.yAxis = (this.values.yAxis > 1) ? 1 : this.values.yAxis; + + // If the state is still default, check if the yAxis makes it touched + if (this.values.state === Constants.ComponentState.DEFAULT + && Math.abs(this.values.yAxis) > Constants.AxisTouchThreshold) { + this.values.state = Constants.ComponentState.TOUCHED; + } + } + + // Update the visual response weights based on the current component data + Object.values(this.visualResponses).forEach((visualResponse) => { + visualResponse.updateFromComponent(this.values); + }); + } +} + +/** + * @description Builds a motion controller with components and visual responses based on the + * supplied profile description. Data is polled from the xrInputSource's gamepad. + * @author Nell Waliczek / https://github.com/NellWaliczek +*/ +class MotionController { + /** + * @param {Object} xrInputSource - The XRInputSource to build the MotionController around + * @param {Object} profile - The best matched profile description for the supplied xrInputSource + * @param {Object} assetUrl + */ + constructor(xrInputSource, profile, assetUrl) { + if (!xrInputSource) { + throw new Error('No xrInputSource supplied'); + } + + if (!profile) { + throw new Error('No profile supplied'); + } + + this.xrInputSource = xrInputSource; + this.assetUrl = assetUrl; + this.id = profile.profileId; + + // Build child components as described in the profile description + this.layoutDescription = profile.layouts[xrInputSource.handedness]; + this.components = {}; + Object.keys(this.layoutDescription.components).forEach((componentId) => { + const componentDescription = this.layoutDescription.components[componentId]; + this.components[componentId] = new Component(componentId, componentDescription); + }); + + // Initialize components based on current gamepad state + this.updateFromGamepad(); + } + + get gripSpace() { + return this.xrInputSource.gripSpace; + } + + get targetRaySpace() { + return this.xrInputSource.targetRaySpace; + } + + /** + * @description Returns a subset of component data for simplified debugging + */ + get data() { + const data = []; + Object.values(this.components).forEach((component) => { + data.push(component.data); + }); + return data; + } + + /** + * @description Poll for updated data based on current gamepad state + */ + updateFromGamepad() { + Object.values(this.components).forEach((component) => { + component.updateFromGamepad(this.xrInputSource.gamepad); + }); + } +} + +export { Constants, MotionController, fetchProfile, fetchProfilesList }; diff --git a/node_modules/three/examples/jsm/libs/opentype.module.js b/node_modules/three/examples/jsm/libs/opentype.module.js new file mode 100644 index 0000000..7b5d64e --- /dev/null +++ b/node_modules/three/examples/jsm/libs/opentype.module.js @@ -0,0 +1,14506 @@ +/** + * https://opentype.js.org v1.3.4 | (c) Frederik De Bleser and other contributors | MIT License | Uses tiny-inflate by Devon Govett and string.prototype.codepointat polyfill by Mathias Bynens + */ + +/*! https://mths.be/codepointat v0.2.0 by @mathias */ +if (!String.prototype.codePointAt) { + (function() { + var defineProperty = (function() { + // IE 8 only supports `Object.defineProperty` on DOM elements + try { + var object = {}; + var $defineProperty = Object.defineProperty; + var result = $defineProperty(object, object, object) && $defineProperty; + } catch(error) {} + return result; + }()); + var codePointAt = function(position) { + if (this == null) { + throw TypeError(); + } + var string = String(this); + var size = string.length; + // `ToInteger` + var index = position ? Number(position) : 0; + if (index != index) { // better `isNaN` + index = 0; + } + // Account for out-of-bounds indices: + if (index < 0 || index >= size) { + return undefined; + } + // Get the first code unit + var first = string.charCodeAt(index); + var second; + if ( // check if it’s the start of a surrogate pair + first >= 0xD800 && first <= 0xDBFF && // high surrogate + size > index + 1 // there is a next code unit + ) { + second = string.charCodeAt(index + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { // low surrogate + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + return first; + }; + if (defineProperty) { + defineProperty(String.prototype, 'codePointAt', { + 'value': codePointAt, + 'configurable': true, + 'writable': true + }); + } else { + String.prototype.codePointAt = codePointAt; + } + }()); +} + +var TINF_OK = 0; +var TINF_DATA_ERROR = -3; + +function Tree() { + this.table = new Uint16Array(16); /* table of code length counts */ + this.trans = new Uint16Array(288); /* code -> symbol translation table */ +} + +function Data(source, dest) { + this.source = source; + this.sourceIndex = 0; + this.tag = 0; + this.bitcount = 0; + + this.dest = dest; + this.destLen = 0; + + this.ltree = new Tree(); /* dynamic length/symbol tree */ + this.dtree = new Tree(); /* dynamic distance tree */ +} + +/* --------------------------------------------------- * + * -- uninitialized global data (static structures) -- * + * --------------------------------------------------- */ + +var sltree = new Tree(); +var sdtree = new Tree(); + +/* extra bits and base tables for length codes */ +var length_bits = new Uint8Array(30); +var length_base = new Uint16Array(30); + +/* extra bits and base tables for distance codes */ +var dist_bits = new Uint8Array(30); +var dist_base = new Uint16Array(30); + +/* special ordering of code length codes */ +var clcidx = new Uint8Array([ + 16, 17, 18, 0, 8, 7, 9, 6, + 10, 5, 11, 4, 12, 3, 13, 2, + 14, 1, 15 +]); + +/* used by tinf_decode_trees, avoids allocations every call */ +var code_tree = new Tree(); +var lengths = new Uint8Array(288 + 32); + +/* ----------------------- * + * -- utility functions -- * + * ----------------------- */ + +/* build extra bits and base tables */ +function tinf_build_bits_base(bits, base, delta, first) { + var i, sum; + + /* build bits table */ + for (i = 0; i < delta; ++i) { bits[i] = 0; } + for (i = 0; i < 30 - delta; ++i) { bits[i + delta] = i / delta | 0; } + + /* build base table */ + for (sum = first, i = 0; i < 30; ++i) { + base[i] = sum; + sum += 1 << bits[i]; + } +} + +/* build the fixed huffman trees */ +function tinf_build_fixed_trees(lt, dt) { + var i; + + /* build fixed length tree */ + for (i = 0; i < 7; ++i) { lt.table[i] = 0; } + + lt.table[7] = 24; + lt.table[8] = 152; + lt.table[9] = 112; + + for (i = 0; i < 24; ++i) { lt.trans[i] = 256 + i; } + for (i = 0; i < 144; ++i) { lt.trans[24 + i] = i; } + for (i = 0; i < 8; ++i) { lt.trans[24 + 144 + i] = 280 + i; } + for (i = 0; i < 112; ++i) { lt.trans[24 + 144 + 8 + i] = 144 + i; } + + /* build fixed distance tree */ + for (i = 0; i < 5; ++i) { dt.table[i] = 0; } + + dt.table[5] = 32; + + for (i = 0; i < 32; ++i) { dt.trans[i] = i; } +} + +/* given an array of code lengths, build a tree */ +var offs = new Uint16Array(16); + +function tinf_build_tree(t, lengths, off, num) { + var i, sum; + + /* clear code length count table */ + for (i = 0; i < 16; ++i) { t.table[i] = 0; } + + /* scan symbol lengths, and sum code length counts */ + for (i = 0; i < num; ++i) { t.table[lengths[off + i]]++; } + + t.table[0] = 0; + + /* compute offset table for distribution sort */ + for (sum = 0, i = 0; i < 16; ++i) { + offs[i] = sum; + sum += t.table[i]; + } + + /* create code->symbol translation table (symbols sorted by code) */ + for (i = 0; i < num; ++i) { + if (lengths[off + i]) { t.trans[offs[lengths[off + i]]++] = i; } + } +} + +/* ---------------------- * + * -- decode functions -- * + * ---------------------- */ + +/* get one bit from source stream */ +function tinf_getbit(d) { + /* check if tag is empty */ + if (!d.bitcount--) { + /* load next tag */ + d.tag = d.source[d.sourceIndex++]; + d.bitcount = 7; + } + + /* shift bit out of tag */ + var bit = d.tag & 1; + d.tag >>>= 1; + + return bit; +} + +/* read a num bit value from a stream and add base */ +function tinf_read_bits(d, num, base) { + if (!num) + { return base; } + + while (d.bitcount < 24) { + d.tag |= d.source[d.sourceIndex++] << d.bitcount; + d.bitcount += 8; + } + + var val = d.tag & (0xffff >>> (16 - num)); + d.tag >>>= num; + d.bitcount -= num; + return val + base; +} + +/* given a data stream and a tree, decode a symbol */ +function tinf_decode_symbol(d, t) { + while (d.bitcount < 24) { + d.tag |= d.source[d.sourceIndex++] << d.bitcount; + d.bitcount += 8; + } + + var sum = 0, cur = 0, len = 0; + var tag = d.tag; + + /* get more bits while code value is above sum */ + do { + cur = 2 * cur + (tag & 1); + tag >>>= 1; + ++len; + + sum += t.table[len]; + cur -= t.table[len]; + } while (cur >= 0); + + d.tag = tag; + d.bitcount -= len; + + return t.trans[sum + cur]; +} + +/* given a data stream, decode dynamic trees from it */ +function tinf_decode_trees(d, lt, dt) { + var hlit, hdist, hclen; + var i, num, length; + + /* get 5 bits HLIT (257-286) */ + hlit = tinf_read_bits(d, 5, 257); + + /* get 5 bits HDIST (1-32) */ + hdist = tinf_read_bits(d, 5, 1); + + /* get 4 bits HCLEN (4-19) */ + hclen = tinf_read_bits(d, 4, 4); + + for (i = 0; i < 19; ++i) { lengths[i] = 0; } + + /* read code lengths for code length alphabet */ + for (i = 0; i < hclen; ++i) { + /* get 3 bits code length (0-7) */ + var clen = tinf_read_bits(d, 3, 0); + lengths[clcidx[i]] = clen; + } + + /* build code length tree */ + tinf_build_tree(code_tree, lengths, 0, 19); + + /* decode code lengths for the dynamic trees */ + for (num = 0; num < hlit + hdist;) { + var sym = tinf_decode_symbol(d, code_tree); + + switch (sym) { + case 16: + /* copy previous code length 3-6 times (read 2 bits) */ + var prev = lengths[num - 1]; + for (length = tinf_read_bits(d, 2, 3); length; --length) { + lengths[num++] = prev; + } + break; + case 17: + /* repeat code length 0 for 3-10 times (read 3 bits) */ + for (length = tinf_read_bits(d, 3, 3); length; --length) { + lengths[num++] = 0; + } + break; + case 18: + /* repeat code length 0 for 11-138 times (read 7 bits) */ + for (length = tinf_read_bits(d, 7, 11); length; --length) { + lengths[num++] = 0; + } + break; + default: + /* values 0-15 represent the actual code lengths */ + lengths[num++] = sym; + break; + } + } + + /* build dynamic trees */ + tinf_build_tree(lt, lengths, 0, hlit); + tinf_build_tree(dt, lengths, hlit, hdist); +} + +/* ----------------------------- * + * -- block inflate functions -- * + * ----------------------------- */ + +/* given a stream and two trees, inflate a block of data */ +function tinf_inflate_block_data(d, lt, dt) { + while (1) { + var sym = tinf_decode_symbol(d, lt); + + /* check for end of block */ + if (sym === 256) { + return TINF_OK; + } + + if (sym < 256) { + d.dest[d.destLen++] = sym; + } else { + var length, dist, offs; + var i; + + sym -= 257; + + /* possibly get more bits from length code */ + length = tinf_read_bits(d, length_bits[sym], length_base[sym]); + + dist = tinf_decode_symbol(d, dt); + + /* possibly get more bits from distance code */ + offs = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]); + + /* copy match */ + for (i = offs; i < offs + length; ++i) { + d.dest[d.destLen++] = d.dest[i]; + } + } + } +} + +/* inflate an uncompressed block of data */ +function tinf_inflate_uncompressed_block(d) { + var length, invlength; + var i; + + /* unread from bitbuffer */ + while (d.bitcount > 8) { + d.sourceIndex--; + d.bitcount -= 8; + } + + /* get length */ + length = d.source[d.sourceIndex + 1]; + length = 256 * length + d.source[d.sourceIndex]; + + /* get one's complement of length */ + invlength = d.source[d.sourceIndex + 3]; + invlength = 256 * invlength + d.source[d.sourceIndex + 2]; + + /* check length */ + if (length !== (~invlength & 0x0000ffff)) + { return TINF_DATA_ERROR; } + + d.sourceIndex += 4; + + /* copy block */ + for (i = length; i; --i) + { d.dest[d.destLen++] = d.source[d.sourceIndex++]; } + + /* make sure we start next block on a byte boundary */ + d.bitcount = 0; + + return TINF_OK; +} + +/* inflate stream from source to dest */ +function tinf_uncompress(source, dest) { + var d = new Data(source, dest); + var bfinal, btype, res; + + do { + /* read final block flag */ + bfinal = tinf_getbit(d); + + /* read block type (2 bits) */ + btype = tinf_read_bits(d, 2, 0); + + /* decompress block */ + switch (btype) { + case 0: + /* decompress uncompressed block */ + res = tinf_inflate_uncompressed_block(d); + break; + case 1: + /* decompress block with fixed huffman trees */ + res = tinf_inflate_block_data(d, sltree, sdtree); + break; + case 2: + /* decompress block with dynamic huffman trees */ + tinf_decode_trees(d, d.ltree, d.dtree); + res = tinf_inflate_block_data(d, d.ltree, d.dtree); + break; + default: + res = TINF_DATA_ERROR; + } + + if (res !== TINF_OK) + { throw new Error('Data error'); } + + } while (!bfinal); + + if (d.destLen < d.dest.length) { + if (typeof d.dest.slice === 'function') + { return d.dest.slice(0, d.destLen); } + else + { return d.dest.subarray(0, d.destLen); } + } + + return d.dest; +} + +/* -------------------- * + * -- initialization -- * + * -------------------- */ + +/* build fixed huffman trees */ +tinf_build_fixed_trees(sltree, sdtree); + +/* build extra bits and base tables */ +tinf_build_bits_base(length_bits, length_base, 4, 3); +tinf_build_bits_base(dist_bits, dist_base, 2, 1); + +/* fix a special case */ +length_bits[28] = 0; +length_base[28] = 258; + +var tinyInflate = tinf_uncompress; + +// The Bounding Box object + +function derive(v0, v1, v2, v3, t) { + return Math.pow(1 - t, 3) * v0 + + 3 * Math.pow(1 - t, 2) * t * v1 + + 3 * (1 - t) * Math.pow(t, 2) * v2 + + Math.pow(t, 3) * v3; +} +/** + * A bounding box is an enclosing box that describes the smallest measure within which all the points lie. + * It is used to calculate the bounding box of a glyph or text path. + * + * On initialization, x1/y1/x2/y2 will be NaN. Check if the bounding box is empty using `isEmpty()`. + * + * @exports opentype.BoundingBox + * @class + * @constructor + */ +function BoundingBox() { + this.x1 = Number.NaN; + this.y1 = Number.NaN; + this.x2 = Number.NaN; + this.y2 = Number.NaN; +} + +/** + * Returns true if the bounding box is empty, that is, no points have been added to the box yet. + */ +BoundingBox.prototype.isEmpty = function() { + return isNaN(this.x1) || isNaN(this.y1) || isNaN(this.x2) || isNaN(this.y2); +}; + +/** + * Add the point to the bounding box. + * The x1/y1/x2/y2 coordinates of the bounding box will now encompass the given point. + * @param {number} x - The X coordinate of the point. + * @param {number} y - The Y coordinate of the point. + */ +BoundingBox.prototype.addPoint = function(x, y) { + if (typeof x === 'number') { + if (isNaN(this.x1) || isNaN(this.x2)) { + this.x1 = x; + this.x2 = x; + } + if (x < this.x1) { + this.x1 = x; + } + if (x > this.x2) { + this.x2 = x; + } + } + if (typeof y === 'number') { + if (isNaN(this.y1) || isNaN(this.y2)) { + this.y1 = y; + this.y2 = y; + } + if (y < this.y1) { + this.y1 = y; + } + if (y > this.y2) { + this.y2 = y; + } + } +}; + +/** + * Add a X coordinate to the bounding box. + * This extends the bounding box to include the X coordinate. + * This function is used internally inside of addBezier. + * @param {number} x - The X coordinate of the point. + */ +BoundingBox.prototype.addX = function(x) { + this.addPoint(x, null); +}; + +/** + * Add a Y coordinate to the bounding box. + * This extends the bounding box to include the Y coordinate. + * This function is used internally inside of addBezier. + * @param {number} y - The Y coordinate of the point. + */ +BoundingBox.prototype.addY = function(y) { + this.addPoint(null, y); +}; + +/** + * Add a Bézier curve to the bounding box. + * This extends the bounding box to include the entire Bézier. + * @param {number} x0 - The starting X coordinate. + * @param {number} y0 - The starting Y coordinate. + * @param {number} x1 - The X coordinate of the first control point. + * @param {number} y1 - The Y coordinate of the first control point. + * @param {number} x2 - The X coordinate of the second control point. + * @param {number} y2 - The Y coordinate of the second control point. + * @param {number} x - The ending X coordinate. + * @param {number} y - The ending Y coordinate. + */ +BoundingBox.prototype.addBezier = function(x0, y0, x1, y1, x2, y2, x, y) { + // This code is based on http://nishiohirokazu.blogspot.com/2009/06/how-to-calculate-bezier-curves-bounding.html + // and https://github.com/icons8/svg-path-bounding-box + + var p0 = [x0, y0]; + var p1 = [x1, y1]; + var p2 = [x2, y2]; + var p3 = [x, y]; + + this.addPoint(x0, y0); + this.addPoint(x, y); + + for (var i = 0; i <= 1; i++) { + var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i]; + var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i]; + var c = 3 * p1[i] - 3 * p0[i]; + + if (a === 0) { + if (b === 0) { continue; } + var t = -c / b; + if (0 < t && t < 1) { + if (i === 0) { this.addX(derive(p0[i], p1[i], p2[i], p3[i], t)); } + if (i === 1) { this.addY(derive(p0[i], p1[i], p2[i], p3[i], t)); } + } + continue; + } + + var b2ac = Math.pow(b, 2) - 4 * c * a; + if (b2ac < 0) { continue; } + var t1 = (-b + Math.sqrt(b2ac)) / (2 * a); + if (0 < t1 && t1 < 1) { + if (i === 0) { this.addX(derive(p0[i], p1[i], p2[i], p3[i], t1)); } + if (i === 1) { this.addY(derive(p0[i], p1[i], p2[i], p3[i], t1)); } + } + var t2 = (-b - Math.sqrt(b2ac)) / (2 * a); + if (0 < t2 && t2 < 1) { + if (i === 0) { this.addX(derive(p0[i], p1[i], p2[i], p3[i], t2)); } + if (i === 1) { this.addY(derive(p0[i], p1[i], p2[i], p3[i], t2)); } + } + } +}; + +/** + * Add a quadratic curve to the bounding box. + * This extends the bounding box to include the entire quadratic curve. + * @param {number} x0 - The starting X coordinate. + * @param {number} y0 - The starting Y coordinate. + * @param {number} x1 - The X coordinate of the control point. + * @param {number} y1 - The Y coordinate of the control point. + * @param {number} x - The ending X coordinate. + * @param {number} y - The ending Y coordinate. + */ +BoundingBox.prototype.addQuad = function(x0, y0, x1, y1, x, y) { + var cp1x = x0 + 2 / 3 * (x1 - x0); + var cp1y = y0 + 2 / 3 * (y1 - y0); + var cp2x = cp1x + 1 / 3 * (x - x0); + var cp2y = cp1y + 1 / 3 * (y - y0); + this.addBezier(x0, y0, cp1x, cp1y, cp2x, cp2y, x, y); +}; + +// Geometric objects + +/** + * A bézier path containing a set of path commands similar to a SVG path. + * Paths can be drawn on a context using `draw`. + * @exports opentype.Path + * @class + * @constructor + */ +function Path() { + this.commands = []; + this.fill = 'black'; + this.stroke = null; + this.strokeWidth = 1; +} + +/** + * @param {number} x + * @param {number} y + */ +Path.prototype.moveTo = function(x, y) { + this.commands.push({ + type: 'M', + x: x, + y: y + }); +}; + +/** + * @param {number} x + * @param {number} y + */ +Path.prototype.lineTo = function(x, y) { + this.commands.push({ + type: 'L', + x: x, + y: y + }); +}; + +/** + * Draws cubic curve + * @function + * curveTo + * @memberof opentype.Path.prototype + * @param {number} x1 - x of control 1 + * @param {number} y1 - y of control 1 + * @param {number} x2 - x of control 2 + * @param {number} y2 - y of control 2 + * @param {number} x - x of path point + * @param {number} y - y of path point + */ + +/** + * Draws cubic curve + * @function + * bezierCurveTo + * @memberof opentype.Path.prototype + * @param {number} x1 - x of control 1 + * @param {number} y1 - y of control 1 + * @param {number} x2 - x of control 2 + * @param {number} y2 - y of control 2 + * @param {number} x - x of path point + * @param {number} y - y of path point + * @see curveTo + */ +Path.prototype.curveTo = Path.prototype.bezierCurveTo = function(x1, y1, x2, y2, x, y) { + this.commands.push({ + type: 'C', + x1: x1, + y1: y1, + x2: x2, + y2: y2, + x: x, + y: y + }); +}; + +/** + * Draws quadratic curve + * @function + * quadraticCurveTo + * @memberof opentype.Path.prototype + * @param {number} x1 - x of control + * @param {number} y1 - y of control + * @param {number} x - x of path point + * @param {number} y - y of path point + */ + +/** + * Draws quadratic curve + * @function + * quadTo + * @memberof opentype.Path.prototype + * @param {number} x1 - x of control + * @param {number} y1 - y of control + * @param {number} x - x of path point + * @param {number} y - y of path point + */ +Path.prototype.quadTo = Path.prototype.quadraticCurveTo = function(x1, y1, x, y) { + this.commands.push({ + type: 'Q', + x1: x1, + y1: y1, + x: x, + y: y + }); +}; + +/** + * Closes the path + * @function closePath + * @memberof opentype.Path.prototype + */ + +/** + * Close the path + * @function close + * @memberof opentype.Path.prototype + */ +Path.prototype.close = Path.prototype.closePath = function() { + this.commands.push({ + type: 'Z' + }); +}; + +/** + * Add the given path or list of commands to the commands of this path. + * @param {Array} pathOrCommands - another opentype.Path, an opentype.BoundingBox, or an array of commands. + */ +Path.prototype.extend = function(pathOrCommands) { + if (pathOrCommands.commands) { + pathOrCommands = pathOrCommands.commands; + } else if (pathOrCommands instanceof BoundingBox) { + var box = pathOrCommands; + this.moveTo(box.x1, box.y1); + this.lineTo(box.x2, box.y1); + this.lineTo(box.x2, box.y2); + this.lineTo(box.x1, box.y2); + this.close(); + return; + } + + Array.prototype.push.apply(this.commands, pathOrCommands); +}; + +/** + * Calculate the bounding box of the path. + * @returns {opentype.BoundingBox} + */ +Path.prototype.getBoundingBox = function() { + var box = new BoundingBox(); + + var startX = 0; + var startY = 0; + var prevX = 0; + var prevY = 0; + for (var i = 0; i < this.commands.length; i++) { + var cmd = this.commands[i]; + switch (cmd.type) { + case 'M': + box.addPoint(cmd.x, cmd.y); + startX = prevX = cmd.x; + startY = prevY = cmd.y; + break; + case 'L': + box.addPoint(cmd.x, cmd.y); + prevX = cmd.x; + prevY = cmd.y; + break; + case 'Q': + box.addQuad(prevX, prevY, cmd.x1, cmd.y1, cmd.x, cmd.y); + prevX = cmd.x; + prevY = cmd.y; + break; + case 'C': + box.addBezier(prevX, prevY, cmd.x1, cmd.y1, cmd.x2, cmd.y2, cmd.x, cmd.y); + prevX = cmd.x; + prevY = cmd.y; + break; + case 'Z': + prevX = startX; + prevY = startY; + break; + default: + throw new Error('Unexpected path command ' + cmd.type); + } + } + if (box.isEmpty()) { + box.addPoint(0, 0); + } + return box; +}; + +/** + * Draw the path to a 2D context. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context. + */ +Path.prototype.draw = function(ctx) { + ctx.beginPath(); + for (var i = 0; i < this.commands.length; i += 1) { + var cmd = this.commands[i]; + if (cmd.type === 'M') { + ctx.moveTo(cmd.x, cmd.y); + } else if (cmd.type === 'L') { + ctx.lineTo(cmd.x, cmd.y); + } else if (cmd.type === 'C') { + ctx.bezierCurveTo(cmd.x1, cmd.y1, cmd.x2, cmd.y2, cmd.x, cmd.y); + } else if (cmd.type === 'Q') { + ctx.quadraticCurveTo(cmd.x1, cmd.y1, cmd.x, cmd.y); + } else if (cmd.type === 'Z') { + ctx.closePath(); + } + } + + if (this.fill) { + ctx.fillStyle = this.fill; + ctx.fill(); + } + + if (this.stroke) { + ctx.strokeStyle = this.stroke; + ctx.lineWidth = this.strokeWidth; + ctx.stroke(); + } +}; + +/** + * Convert the Path to a string of path data instructions + * See http://www.w3.org/TR/SVG/paths.html#PathData + * @param {number} [decimalPlaces=2] - The amount of decimal places for floating-point values + * @return {string} + */ +Path.prototype.toPathData = function(decimalPlaces) { + decimalPlaces = decimalPlaces !== undefined ? decimalPlaces : 2; + + function floatToString(v) { + if (Math.round(v) === v) { + return '' + Math.round(v); + } else { + return v.toFixed(decimalPlaces); + } + } + + function packValues() { + var arguments$1 = arguments; + + var s = ''; + for (var i = 0; i < arguments.length; i += 1) { + var v = arguments$1[i]; + if (v >= 0 && i > 0) { + s += ' '; + } + + s += floatToString(v); + } + + return s; + } + + var d = ''; + for (var i = 0; i < this.commands.length; i += 1) { + var cmd = this.commands[i]; + if (cmd.type === 'M') { + d += 'M' + packValues(cmd.x, cmd.y); + } else if (cmd.type === 'L') { + d += 'L' + packValues(cmd.x, cmd.y); + } else if (cmd.type === 'C') { + d += 'C' + packValues(cmd.x1, cmd.y1, cmd.x2, cmd.y2, cmd.x, cmd.y); + } else if (cmd.type === 'Q') { + d += 'Q' + packValues(cmd.x1, cmd.y1, cmd.x, cmd.y); + } else if (cmd.type === 'Z') { + d += 'Z'; + } + } + + return d; +}; + +/** + * Convert the path to an SVG element, as a string. + * @param {number} [decimalPlaces=2] - The amount of decimal places for floating-point values + * @return {string} + */ +Path.prototype.toSVG = function(decimalPlaces) { + var svg = '= 0 && v <= 255, 'Byte value should be between 0 and 255.'); + return [v]; +}; +/** + * @constant + * @type {number} + */ +sizeOf.BYTE = constant(1); + +/** + * Convert a 8-bit signed integer to a list of 1 byte. + * @param {string} + * @returns {Array} + */ +encode.CHAR = function(v) { + return [v.charCodeAt(0)]; +}; + +/** + * @constant + * @type {number} + */ +sizeOf.CHAR = constant(1); + +/** + * Convert an ASCII string to a list of bytes. + * @param {string} + * @returns {Array} + */ +encode.CHARARRAY = function(v) { + if (typeof v === 'undefined') { + v = ''; + console.warn('Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name.'); + } + var b = []; + for (var i = 0; i < v.length; i += 1) { + b[i] = v.charCodeAt(i); + } + + return b; +}; + +/** + * @param {Array} + * @returns {number} + */ +sizeOf.CHARARRAY = function(v) { + if (typeof v === 'undefined') { + return 0; + } + return v.length; +}; + +/** + * Convert a 16-bit unsigned integer to a list of 2 bytes. + * @param {number} + * @returns {Array} + */ +encode.USHORT = function(v) { + return [(v >> 8) & 0xFF, v & 0xFF]; +}; + +/** + * @constant + * @type {number} + */ +sizeOf.USHORT = constant(2); + +/** + * Convert a 16-bit signed integer to a list of 2 bytes. + * @param {number} + * @returns {Array} + */ +encode.SHORT = function(v) { + // Two's complement + if (v >= LIMIT16) { + v = -(2 * LIMIT16 - v); + } + + return [(v >> 8) & 0xFF, v & 0xFF]; +}; + +/** + * @constant + * @type {number} + */ +sizeOf.SHORT = constant(2); + +/** + * Convert a 24-bit unsigned integer to a list of 3 bytes. + * @param {number} + * @returns {Array} + */ +encode.UINT24 = function(v) { + return [(v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF]; +}; + +/** + * @constant + * @type {number} + */ +sizeOf.UINT24 = constant(3); + +/** + * Convert a 32-bit unsigned integer to a list of 4 bytes. + * @param {number} + * @returns {Array} + */ +encode.ULONG = function(v) { + return [(v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF]; +}; + +/** + * @constant + * @type {number} + */ +sizeOf.ULONG = constant(4); + +/** + * Convert a 32-bit unsigned integer to a list of 4 bytes. + * @param {number} + * @returns {Array} + */ +encode.LONG = function(v) { + // Two's complement + if (v >= LIMIT32) { + v = -(2 * LIMIT32 - v); + } + + return [(v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF]; +}; + +/** + * @constant + * @type {number} + */ +sizeOf.LONG = constant(4); + +encode.FIXED = encode.ULONG; +sizeOf.FIXED = sizeOf.ULONG; + +encode.FWORD = encode.SHORT; +sizeOf.FWORD = sizeOf.SHORT; + +encode.UFWORD = encode.USHORT; +sizeOf.UFWORD = sizeOf.USHORT; + +/** + * Convert a 32-bit Apple Mac timestamp integer to a list of 8 bytes, 64-bit timestamp. + * @param {number} + * @returns {Array} + */ +encode.LONGDATETIME = function(v) { + return [0, 0, 0, 0, (v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF]; +}; + +/** + * @constant + * @type {number} + */ +sizeOf.LONGDATETIME = constant(8); + +/** + * Convert a 4-char tag to a list of 4 bytes. + * @param {string} + * @returns {Array} + */ +encode.TAG = function(v) { + check.argument(v.length === 4, 'Tag should be exactly 4 ASCII characters.'); + return [v.charCodeAt(0), + v.charCodeAt(1), + v.charCodeAt(2), + v.charCodeAt(3)]; +}; + +/** + * @constant + * @type {number} + */ +sizeOf.TAG = constant(4); + +// CFF data types /////////////////////////////////////////////////////////// + +encode.Card8 = encode.BYTE; +sizeOf.Card8 = sizeOf.BYTE; + +encode.Card16 = encode.USHORT; +sizeOf.Card16 = sizeOf.USHORT; + +encode.OffSize = encode.BYTE; +sizeOf.OffSize = sizeOf.BYTE; + +encode.SID = encode.USHORT; +sizeOf.SID = sizeOf.USHORT; + +// Convert a numeric operand or charstring number to a variable-size list of bytes. +/** + * Convert a numeric operand or charstring number to a variable-size list of bytes. + * @param {number} + * @returns {Array} + */ +encode.NUMBER = function(v) { + if (v >= -107 && v <= 107) { + return [v + 139]; + } else if (v >= 108 && v <= 1131) { + v = v - 108; + return [(v >> 8) + 247, v & 0xFF]; + } else if (v >= -1131 && v <= -108) { + v = -v - 108; + return [(v >> 8) + 251, v & 0xFF]; + } else if (v >= -32768 && v <= 32767) { + return encode.NUMBER16(v); + } else { + return encode.NUMBER32(v); + } +}; + +/** + * @param {number} + * @returns {number} + */ +sizeOf.NUMBER = function(v) { + return encode.NUMBER(v).length; +}; + +/** + * Convert a signed number between -32768 and +32767 to a three-byte value. + * This ensures we always use three bytes, but is not the most compact format. + * @param {number} + * @returns {Array} + */ +encode.NUMBER16 = function(v) { + return [28, (v >> 8) & 0xFF, v & 0xFF]; +}; + +/** + * @constant + * @type {number} + */ +sizeOf.NUMBER16 = constant(3); + +/** + * Convert a signed number between -(2^31) and +(2^31-1) to a five-byte value. + * This is useful if you want to be sure you always use four bytes, + * at the expense of wasting a few bytes for smaller numbers. + * @param {number} + * @returns {Array} + */ +encode.NUMBER32 = function(v) { + return [29, (v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF]; +}; + +/** + * @constant + * @type {number} + */ +sizeOf.NUMBER32 = constant(5); + +/** + * @param {number} + * @returns {Array} + */ +encode.REAL = function(v) { + var value = v.toString(); + + // Some numbers use an epsilon to encode the value. (e.g. JavaScript will store 0.0000001 as 1e-7) + // This code converts it back to a number without the epsilon. + var m = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(value); + if (m) { + var epsilon = parseFloat('1e' + ((m[2] ? +m[2] : 0) + m[1].length)); + value = (Math.round(v * epsilon) / epsilon).toString(); + } + + var nibbles = ''; + for (var i = 0, ii = value.length; i < ii; i += 1) { + var c = value[i]; + if (c === 'e') { + nibbles += value[++i] === '-' ? 'c' : 'b'; + } else if (c === '.') { + nibbles += 'a'; + } else if (c === '-') { + nibbles += 'e'; + } else { + nibbles += c; + } + } + + nibbles += (nibbles.length & 1) ? 'f' : 'ff'; + var out = [30]; + for (var i$1 = 0, ii$1 = nibbles.length; i$1 < ii$1; i$1 += 2) { + out.push(parseInt(nibbles.substr(i$1, 2), 16)); + } + + return out; +}; + +/** + * @param {number} + * @returns {number} + */ +sizeOf.REAL = function(v) { + return encode.REAL(v).length; +}; + +encode.NAME = encode.CHARARRAY; +sizeOf.NAME = sizeOf.CHARARRAY; + +encode.STRING = encode.CHARARRAY; +sizeOf.STRING = sizeOf.CHARARRAY; + +/** + * @param {DataView} data + * @param {number} offset + * @param {number} numBytes + * @returns {string} + */ +decode.UTF8 = function(data, offset, numBytes) { + var codePoints = []; + var numChars = numBytes; + for (var j = 0; j < numChars; j++, offset += 1) { + codePoints[j] = data.getUint8(offset); + } + + return String.fromCharCode.apply(null, codePoints); +}; + +/** + * @param {DataView} data + * @param {number} offset + * @param {number} numBytes + * @returns {string} + */ +decode.UTF16 = function(data, offset, numBytes) { + var codePoints = []; + var numChars = numBytes / 2; + for (var j = 0; j < numChars; j++, offset += 2) { + codePoints[j] = data.getUint16(offset); + } + + return String.fromCharCode.apply(null, codePoints); +}; + +/** + * Convert a JavaScript string to UTF16-BE. + * @param {string} + * @returns {Array} + */ +encode.UTF16 = function(v) { + var b = []; + for (var i = 0; i < v.length; i += 1) { + var codepoint = v.charCodeAt(i); + b[b.length] = (codepoint >> 8) & 0xFF; + b[b.length] = codepoint & 0xFF; + } + + return b; +}; + +/** + * @param {string} + * @returns {number} + */ +sizeOf.UTF16 = function(v) { + return v.length * 2; +}; + +// Data for converting old eight-bit Macintosh encodings to Unicode. +// This representation is optimized for decoding; encoding is slower +// and needs more memory. The assumption is that all opentype.js users +// want to open fonts, but saving a font will be comparatively rare +// so it can be more expensive. Keyed by IANA character set name. +// +// Python script for generating these strings: +// +// s = u''.join([chr(c).decode('mac_greek') for c in range(128, 256)]) +// print(s.encode('utf-8')) +/** + * @private + */ +var eightBitMacEncodings = { + 'x-mac-croatian': // Python: 'mac_croatian' + 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø' + + '¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ', + 'x-mac-cyrillic': // Python: 'mac_cyrillic' + 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњ' + + 'јЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю', + 'x-mac-gaelic': // http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/GAELIC.TXT + 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæø' + + 'ṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ', + 'x-mac-greek': // Python: 'mac_greek' + 'Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩ' + + 'άΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ\u00AD', + 'x-mac-icelandic': // Python: 'mac_iceland' + 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' + + '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ', + 'x-mac-inuit': // http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/INUIT.TXT + 'ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗ' + + 'ᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł', + 'x-mac-ce': // Python: 'mac_latin2' + 'ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅ' + + 'ņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ', + macintosh: // Python: 'mac_roman' + 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' + + '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ', + 'x-mac-romanian': // Python: 'mac_romanian' + 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș' + + '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ', + 'x-mac-turkish': // Python: 'mac_turkish' + 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' + + '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ' +}; + +/** + * Decodes an old-style Macintosh string. Returns either a Unicode JavaScript + * string, or 'undefined' if the encoding is unsupported. For example, we do + * not support Chinese, Japanese or Korean because these would need large + * mapping tables. + * @param {DataView} dataView + * @param {number} offset + * @param {number} dataLength + * @param {string} encoding + * @returns {string} + */ +decode.MACSTRING = function(dataView, offset, dataLength, encoding) { + var table = eightBitMacEncodings[encoding]; + if (table === undefined) { + return undefined; + } + + var result = ''; + for (var i = 0; i < dataLength; i++) { + var c = dataView.getUint8(offset + i); + // In all eight-bit Mac encodings, the characters 0x00..0x7F are + // mapped to U+0000..U+007F; we only need to look up the others. + if (c <= 0x7F) { + result += String.fromCharCode(c); + } else { + result += table[c & 0x7F]; + } + } + + return result; +}; + +// Helper function for encode.MACSTRING. Returns a dictionary for mapping +// Unicode character codes to their 8-bit MacOS equivalent. This table +// is not exactly a super cheap data structure, but we do not care because +// encoding Macintosh strings is only rarely needed in typical applications. +var macEncodingTableCache = typeof WeakMap === 'function' && new WeakMap(); +var macEncodingCacheKeys; +var getMacEncodingTable = function (encoding) { + // Since we use encoding as a cache key for WeakMap, it has to be + // a String object and not a literal. And at least on NodeJS 2.10.1, + // WeakMap requires that the same String instance is passed for cache hits. + if (!macEncodingCacheKeys) { + macEncodingCacheKeys = {}; + for (var e in eightBitMacEncodings) { + /*jshint -W053 */ // Suppress "Do not use String as a constructor." + macEncodingCacheKeys[e] = new String(e); + } + } + + var cacheKey = macEncodingCacheKeys[encoding]; + if (cacheKey === undefined) { + return undefined; + } + + // We can't do "if (cache.has(key)) {return cache.get(key)}" here: + // since garbage collection may run at any time, it could also kick in + // between the calls to cache.has() and cache.get(). In that case, + // we would return 'undefined' even though we do support the encoding. + if (macEncodingTableCache) { + var cachedTable = macEncodingTableCache.get(cacheKey); + if (cachedTable !== undefined) { + return cachedTable; + } + } + + var decodingTable = eightBitMacEncodings[encoding]; + if (decodingTable === undefined) { + return undefined; + } + + var encodingTable = {}; + for (var i = 0; i < decodingTable.length; i++) { + encodingTable[decodingTable.charCodeAt(i)] = i + 0x80; + } + + if (macEncodingTableCache) { + macEncodingTableCache.set(cacheKey, encodingTable); + } + + return encodingTable; +}; + +/** + * Encodes an old-style Macintosh string. Returns a byte array upon success. + * If the requested encoding is unsupported, or if the input string contains + * a character that cannot be expressed in the encoding, the function returns + * 'undefined'. + * @param {string} str + * @param {string} encoding + * @returns {Array} + */ +encode.MACSTRING = function(str, encoding) { + var table = getMacEncodingTable(encoding); + if (table === undefined) { + return undefined; + } + + var result = []; + for (var i = 0; i < str.length; i++) { + var c = str.charCodeAt(i); + + // In all eight-bit Mac encodings, the characters 0x00..0x7F are + // mapped to U+0000..U+007F; we only need to look up the others. + if (c >= 0x80) { + c = table[c]; + if (c === undefined) { + // str contains a Unicode character that cannot be encoded + // in the requested encoding. + return undefined; + } + } + result[i] = c; + // result.push(c); + } + + return result; +}; + +/** + * @param {string} str + * @param {string} encoding + * @returns {number} + */ +sizeOf.MACSTRING = function(str, encoding) { + var b = encode.MACSTRING(str, encoding); + if (b !== undefined) { + return b.length; + } else { + return 0; + } +}; + +// Helper for encode.VARDELTAS +function isByteEncodable(value) { + return value >= -128 && value <= 127; +} + +// Helper for encode.VARDELTAS +function encodeVarDeltaRunAsZeroes(deltas, pos, result) { + var runLength = 0; + var numDeltas = deltas.length; + while (pos < numDeltas && runLength < 64 && deltas[pos] === 0) { + ++pos; + ++runLength; + } + result.push(0x80 | (runLength - 1)); + return pos; +} + +// Helper for encode.VARDELTAS +function encodeVarDeltaRunAsBytes(deltas, offset, result) { + var runLength = 0; + var numDeltas = deltas.length; + var pos = offset; + while (pos < numDeltas && runLength < 64) { + var value = deltas[pos]; + if (!isByteEncodable(value)) { + break; + } + + // Within a byte-encoded run of deltas, a single zero is best + // stored literally as 0x00 value. However, if we have two or + // more zeroes in a sequence, it is better to start a new run. + // Fore example, the sequence of deltas [15, 15, 0, 15, 15] + // becomes 6 bytes (04 0F 0F 00 0F 0F) when storing the zero + // within the current run, but 7 bytes (01 0F 0F 80 01 0F 0F) + // when starting a new run. + if (value === 0 && pos + 1 < numDeltas && deltas[pos + 1] === 0) { + break; + } + + ++pos; + ++runLength; + } + result.push(runLength - 1); + for (var i = offset; i < pos; ++i) { + result.push((deltas[i] + 256) & 0xff); + } + return pos; +} + +// Helper for encode.VARDELTAS +function encodeVarDeltaRunAsWords(deltas, offset, result) { + var runLength = 0; + var numDeltas = deltas.length; + var pos = offset; + while (pos < numDeltas && runLength < 64) { + var value = deltas[pos]; + + // Within a word-encoded run of deltas, it is easiest to start + // a new run (with a different encoding) whenever we encounter + // a zero value. For example, the sequence [0x6666, 0, 0x7777] + // needs 7 bytes when storing the zero inside the current run + // (42 66 66 00 00 77 77), and equally 7 bytes when starting a + // new run (40 66 66 80 40 77 77). + if (value === 0) { + break; + } + + // Within a word-encoded run of deltas, a single value in the + // range (-128..127) should be encoded within the current run + // because it is more compact. For example, the sequence + // [0x6666, 2, 0x7777] becomes 7 bytes when storing the value + // literally (42 66 66 00 02 77 77), but 8 bytes when starting + // a new run (40 66 66 00 02 40 77 77). + if (isByteEncodable(value) && pos + 1 < numDeltas && isByteEncodable(deltas[pos + 1])) { + break; + } + + ++pos; + ++runLength; + } + result.push(0x40 | (runLength - 1)); + for (var i = offset; i < pos; ++i) { + var val = deltas[i]; + result.push(((val + 0x10000) >> 8) & 0xff, (val + 0x100) & 0xff); + } + return pos; +} + +/** + * Encode a list of variation adjustment deltas. + * + * Variation adjustment deltas are used in ‘gvar’ and ‘cvar’ tables. + * They indicate how points (in ‘gvar’) or values (in ‘cvar’) get adjusted + * when generating instances of variation fonts. + * + * @see https://www.microsoft.com/typography/otspec/gvar.htm + * @see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6gvar.html + * @param {Array} + * @return {Array} + */ +encode.VARDELTAS = function(deltas) { + var pos = 0; + var result = []; + while (pos < deltas.length) { + var value = deltas[pos]; + if (value === 0) { + pos = encodeVarDeltaRunAsZeroes(deltas, pos, result); + } else if (value >= -128 && value <= 127) { + pos = encodeVarDeltaRunAsBytes(deltas, pos, result); + } else { + pos = encodeVarDeltaRunAsWords(deltas, pos, result); + } + } + return result; +}; + +// Convert a list of values to a CFF INDEX structure. +// The values should be objects containing name / type / value. +/** + * @param {Array} l + * @returns {Array} + */ +encode.INDEX = function(l) { + //var offset, offsets, offsetEncoder, encodedOffsets, encodedOffset, data, + // i, v; + // Because we have to know which data type to use to encode the offsets, + // we have to go through the values twice: once to encode the data and + // calculate the offsets, then again to encode the offsets using the fitting data type. + var offset = 1; // First offset is always 1. + var offsets = [offset]; + var data = []; + for (var i = 0; i < l.length; i += 1) { + var v = encode.OBJECT(l[i]); + Array.prototype.push.apply(data, v); + offset += v.length; + offsets.push(offset); + } + + if (data.length === 0) { + return [0, 0]; + } + + var encodedOffsets = []; + var offSize = (1 + Math.floor(Math.log(offset) / Math.log(2)) / 8) | 0; + var offsetEncoder = [undefined, encode.BYTE, encode.USHORT, encode.UINT24, encode.ULONG][offSize]; + for (var i$1 = 0; i$1 < offsets.length; i$1 += 1) { + var encodedOffset = offsetEncoder(offsets[i$1]); + Array.prototype.push.apply(encodedOffsets, encodedOffset); + } + + return Array.prototype.concat(encode.Card16(l.length), + encode.OffSize(offSize), + encodedOffsets, + data); +}; + +/** + * @param {Array} + * @returns {number} + */ +sizeOf.INDEX = function(v) { + return encode.INDEX(v).length; +}; + +/** + * Convert an object to a CFF DICT structure. + * The keys should be numeric. + * The values should be objects containing name / type / value. + * @param {Object} m + * @returns {Array} + */ +encode.DICT = function(m) { + var d = []; + var keys = Object.keys(m); + var length = keys.length; + + for (var i = 0; i < length; i += 1) { + // Object.keys() return string keys, but our keys are always numeric. + var k = parseInt(keys[i], 0); + var v = m[k]; + // Value comes before the key. + d = d.concat(encode.OPERAND(v.value, v.type)); + d = d.concat(encode.OPERATOR(k)); + } + + return d; +}; + +/** + * @param {Object} + * @returns {number} + */ +sizeOf.DICT = function(m) { + return encode.DICT(m).length; +}; + +/** + * @param {number} + * @returns {Array} + */ +encode.OPERATOR = function(v) { + if (v < 1200) { + return [v]; + } else { + return [12, v - 1200]; + } +}; + +/** + * @param {Array} v + * @param {string} + * @returns {Array} + */ +encode.OPERAND = function(v, type) { + var d = []; + if (Array.isArray(type)) { + for (var i = 0; i < type.length; i += 1) { + check.argument(v.length === type.length, 'Not enough arguments given for type' + type); + d = d.concat(encode.OPERAND(v[i], type[i])); + } + } else { + if (type === 'SID') { + d = d.concat(encode.NUMBER(v)); + } else if (type === 'offset') { + // We make it easy for ourselves and always encode offsets as + // 4 bytes. This makes offset calculation for the top dict easier. + d = d.concat(encode.NUMBER32(v)); + } else if (type === 'number') { + d = d.concat(encode.NUMBER(v)); + } else if (type === 'real') { + d = d.concat(encode.REAL(v)); + } else { + throw new Error('Unknown operand type ' + type); + // FIXME Add support for booleans + } + } + + return d; +}; + +encode.OP = encode.BYTE; +sizeOf.OP = sizeOf.BYTE; + +// memoize charstring encoding using WeakMap if available +var wmm = typeof WeakMap === 'function' && new WeakMap(); + +/** + * Convert a list of CharString operations to bytes. + * @param {Array} + * @returns {Array} + */ +encode.CHARSTRING = function(ops) { + // See encode.MACSTRING for why we don't do "if (wmm && wmm.has(ops))". + if (wmm) { + var cachedValue = wmm.get(ops); + if (cachedValue !== undefined) { + return cachedValue; + } + } + + var d = []; + var length = ops.length; + + for (var i = 0; i < length; i += 1) { + var op = ops[i]; + d = d.concat(encode[op.type](op.value)); + } + + if (wmm) { + wmm.set(ops, d); + } + + return d; +}; + +/** + * @param {Array} + * @returns {number} + */ +sizeOf.CHARSTRING = function(ops) { + return encode.CHARSTRING(ops).length; +}; + +// Utility functions //////////////////////////////////////////////////////// + +/** + * Convert an object containing name / type / value to bytes. + * @param {Object} + * @returns {Array} + */ +encode.OBJECT = function(v) { + var encodingFunction = encode[v.type]; + check.argument(encodingFunction !== undefined, 'No encoding function for type ' + v.type); + return encodingFunction(v.value); +}; + +/** + * @param {Object} + * @returns {number} + */ +sizeOf.OBJECT = function(v) { + var sizeOfFunction = sizeOf[v.type]; + check.argument(sizeOfFunction !== undefined, 'No sizeOf function for type ' + v.type); + return sizeOfFunction(v.value); +}; + +/** + * Convert a table object to bytes. + * A table contains a list of fields containing the metadata (name, type and default value). + * The table itself has the field values set as attributes. + * @param {opentype.Table} + * @returns {Array} + */ +encode.TABLE = function(table) { + var d = []; + var length = table.fields.length; + var subtables = []; + var subtableOffsets = []; + + for (var i = 0; i < length; i += 1) { + var field = table.fields[i]; + var encodingFunction = encode[field.type]; + check.argument(encodingFunction !== undefined, 'No encoding function for field type ' + field.type + ' (' + field.name + ')'); + var value = table[field.name]; + if (value === undefined) { + value = field.value; + } + + var bytes = encodingFunction(value); + + if (field.type === 'TABLE') { + subtableOffsets.push(d.length); + d = d.concat([0, 0]); + subtables.push(bytes); + } else { + d = d.concat(bytes); + } + } + + for (var i$1 = 0; i$1 < subtables.length; i$1 += 1) { + var o = subtableOffsets[i$1]; + var offset = d.length; + check.argument(offset < 65536, 'Table ' + table.tableName + ' too big.'); + d[o] = offset >> 8; + d[o + 1] = offset & 0xff; + d = d.concat(subtables[i$1]); + } + + return d; +}; + +/** + * @param {opentype.Table} + * @returns {number} + */ +sizeOf.TABLE = function(table) { + var numBytes = 0; + var length = table.fields.length; + + for (var i = 0; i < length; i += 1) { + var field = table.fields[i]; + var sizeOfFunction = sizeOf[field.type]; + check.argument(sizeOfFunction !== undefined, 'No sizeOf function for field type ' + field.type + ' (' + field.name + ')'); + var value = table[field.name]; + if (value === undefined) { + value = field.value; + } + + numBytes += sizeOfFunction(value); + + // Subtables take 2 more bytes for offsets. + if (field.type === 'TABLE') { + numBytes += 2; + } + } + + return numBytes; +}; + +encode.RECORD = encode.TABLE; +sizeOf.RECORD = sizeOf.TABLE; + +// Merge in a list of bytes. +encode.LITERAL = function(v) { + return v; +}; + +sizeOf.LITERAL = function(v) { + return v.length; +}; + +// Table metadata + +/** + * @exports opentype.Table + * @class + * @param {string} tableName + * @param {Array} fields + * @param {Object} options + * @constructor + */ +function Table(tableName, fields, options) { + // For coverage tables with coverage format 2, we do not want to add the coverage data directly to the table object, + // as this will result in wrong encoding order of the coverage data on serialization to bytes. + // The fallback of using the field values directly when not present on the table is handled in types.encode.TABLE() already. + if (fields.length && (fields[0].name !== 'coverageFormat' || fields[0].value === 1)) { + for (var i = 0; i < fields.length; i += 1) { + var field = fields[i]; + this[field.name] = field.value; + } + } + + this.tableName = tableName; + this.fields = fields; + if (options) { + var optionKeys = Object.keys(options); + for (var i$1 = 0; i$1 < optionKeys.length; i$1 += 1) { + var k = optionKeys[i$1]; + var v = options[k]; + if (this[k] !== undefined) { + this[k] = v; + } + } + } +} + +/** + * Encodes the table and returns an array of bytes + * @return {Array} + */ +Table.prototype.encode = function() { + return encode.TABLE(this); +}; + +/** + * Get the size of the table. + * @return {number} + */ +Table.prototype.sizeOf = function() { + return sizeOf.TABLE(this); +}; + +/** + * @private + */ +function ushortList(itemName, list, count) { + if (count === undefined) { + count = list.length; + } + var fields = new Array(list.length + 1); + fields[0] = {name: itemName + 'Count', type: 'USHORT', value: count}; + for (var i = 0; i < list.length; i++) { + fields[i + 1] = {name: itemName + i, type: 'USHORT', value: list[i]}; + } + return fields; +} + +/** + * @private + */ +function tableList(itemName, records, itemCallback) { + var count = records.length; + var fields = new Array(count + 1); + fields[0] = {name: itemName + 'Count', type: 'USHORT', value: count}; + for (var i = 0; i < count; i++) { + fields[i + 1] = {name: itemName + i, type: 'TABLE', value: itemCallback(records[i], i)}; + } + return fields; +} + +/** + * @private + */ +function recordList(itemName, records, itemCallback) { + var count = records.length; + var fields = []; + fields[0] = {name: itemName + 'Count', type: 'USHORT', value: count}; + for (var i = 0; i < count; i++) { + fields = fields.concat(itemCallback(records[i], i)); + } + return fields; +} + +// Common Layout Tables + +/** + * @exports opentype.Coverage + * @class + * @param {opentype.Table} + * @constructor + * @extends opentype.Table + */ +function Coverage(coverageTable) { + if (coverageTable.format === 1) { + Table.call(this, 'coverageTable', + [{name: 'coverageFormat', type: 'USHORT', value: 1}] + .concat(ushortList('glyph', coverageTable.glyphs)) + ); + } else if (coverageTable.format === 2) { + Table.call(this, 'coverageTable', + [{name: 'coverageFormat', type: 'USHORT', value: 2}] + .concat(recordList('rangeRecord', coverageTable.ranges, function(RangeRecord) { + return [ + {name: 'startGlyphID', type: 'USHORT', value: RangeRecord.start}, + {name: 'endGlyphID', type: 'USHORT', value: RangeRecord.end}, + {name: 'startCoverageIndex', type: 'USHORT', value: RangeRecord.index} ]; + })) + ); + } else { + check.assert(false, 'Coverage format must be 1 or 2.'); + } +} +Coverage.prototype = Object.create(Table.prototype); +Coverage.prototype.constructor = Coverage; + +function ScriptList(scriptListTable) { + Table.call(this, 'scriptListTable', + recordList('scriptRecord', scriptListTable, function(scriptRecord, i) { + var script = scriptRecord.script; + var defaultLangSys = script.defaultLangSys; + check.assert(!!defaultLangSys, 'Unable to write GSUB: script ' + scriptRecord.tag + ' has no default language system.'); + return [ + {name: 'scriptTag' + i, type: 'TAG', value: scriptRecord.tag}, + {name: 'script' + i, type: 'TABLE', value: new Table('scriptTable', [ + {name: 'defaultLangSys', type: 'TABLE', value: new Table('defaultLangSys', [ + {name: 'lookupOrder', type: 'USHORT', value: 0}, + {name: 'reqFeatureIndex', type: 'USHORT', value: defaultLangSys.reqFeatureIndex}] + .concat(ushortList('featureIndex', defaultLangSys.featureIndexes)))} + ].concat(recordList('langSys', script.langSysRecords, function(langSysRecord, i) { + var langSys = langSysRecord.langSys; + return [ + {name: 'langSysTag' + i, type: 'TAG', value: langSysRecord.tag}, + {name: 'langSys' + i, type: 'TABLE', value: new Table('langSys', [ + {name: 'lookupOrder', type: 'USHORT', value: 0}, + {name: 'reqFeatureIndex', type: 'USHORT', value: langSys.reqFeatureIndex} + ].concat(ushortList('featureIndex', langSys.featureIndexes)))} + ]; + })))} + ]; + }) + ); +} +ScriptList.prototype = Object.create(Table.prototype); +ScriptList.prototype.constructor = ScriptList; + +/** + * @exports opentype.FeatureList + * @class + * @param {opentype.Table} + * @constructor + * @extends opentype.Table + */ +function FeatureList(featureListTable) { + Table.call(this, 'featureListTable', + recordList('featureRecord', featureListTable, function(featureRecord, i) { + var feature = featureRecord.feature; + return [ + {name: 'featureTag' + i, type: 'TAG', value: featureRecord.tag}, + {name: 'feature' + i, type: 'TABLE', value: new Table('featureTable', [ + {name: 'featureParams', type: 'USHORT', value: feature.featureParams} ].concat(ushortList('lookupListIndex', feature.lookupListIndexes)))} + ]; + }) + ); +} +FeatureList.prototype = Object.create(Table.prototype); +FeatureList.prototype.constructor = FeatureList; + +/** + * @exports opentype.LookupList + * @class + * @param {opentype.Table} + * @param {Object} + * @constructor + * @extends opentype.Table + */ +function LookupList(lookupListTable, subtableMakers) { + Table.call(this, 'lookupListTable', tableList('lookup', lookupListTable, function(lookupTable) { + var subtableCallback = subtableMakers[lookupTable.lookupType]; + check.assert(!!subtableCallback, 'Unable to write GSUB lookup type ' + lookupTable.lookupType + ' tables.'); + return new Table('lookupTable', [ + {name: 'lookupType', type: 'USHORT', value: lookupTable.lookupType}, + {name: 'lookupFlag', type: 'USHORT', value: lookupTable.lookupFlag} + ].concat(tableList('subtable', lookupTable.subtables, subtableCallback))); + })); +} +LookupList.prototype = Object.create(Table.prototype); +LookupList.prototype.constructor = LookupList; + +// Record = same as Table, but inlined (a Table has an offset and its data is further in the stream) +// Don't use offsets inside Records (probable bug), only in Tables. +var table = { + Table: Table, + Record: Table, + Coverage: Coverage, + ScriptList: ScriptList, + FeatureList: FeatureList, + LookupList: LookupList, + ushortList: ushortList, + tableList: tableList, + recordList: recordList, +}; + +// Parsing utility functions + +// Retrieve an unsigned byte from the DataView. +function getByte(dataView, offset) { + return dataView.getUint8(offset); +} + +// Retrieve an unsigned 16-bit short from the DataView. +// The value is stored in big endian. +function getUShort(dataView, offset) { + return dataView.getUint16(offset, false); +} + +// Retrieve a signed 16-bit short from the DataView. +// The value is stored in big endian. +function getShort(dataView, offset) { + return dataView.getInt16(offset, false); +} + +// Retrieve an unsigned 32-bit long from the DataView. +// The value is stored in big endian. +function getULong(dataView, offset) { + return dataView.getUint32(offset, false); +} + +// Retrieve a 32-bit signed fixed-point number (16.16) from the DataView. +// The value is stored in big endian. +function getFixed(dataView, offset) { + var decimal = dataView.getInt16(offset, false); + var fraction = dataView.getUint16(offset + 2, false); + return decimal + fraction / 65535; +} + +// Retrieve a 4-character tag from the DataView. +// Tags are used to identify tables. +function getTag(dataView, offset) { + var tag = ''; + for (var i = offset; i < offset + 4; i += 1) { + tag += String.fromCharCode(dataView.getInt8(i)); + } + + return tag; +} + +// Retrieve an offset from the DataView. +// Offsets are 1 to 4 bytes in length, depending on the offSize argument. +function getOffset(dataView, offset, offSize) { + var v = 0; + for (var i = 0; i < offSize; i += 1) { + v <<= 8; + v += dataView.getUint8(offset + i); + } + + return v; +} + +// Retrieve a number of bytes from start offset to the end offset from the DataView. +function getBytes(dataView, startOffset, endOffset) { + var bytes = []; + for (var i = startOffset; i < endOffset; i += 1) { + bytes.push(dataView.getUint8(i)); + } + + return bytes; +} + +// Convert the list of bytes to a string. +function bytesToString(bytes) { + var s = ''; + for (var i = 0; i < bytes.length; i += 1) { + s += String.fromCharCode(bytes[i]); + } + + return s; +} + +var typeOffsets = { + byte: 1, + uShort: 2, + short: 2, + uLong: 4, + fixed: 4, + longDateTime: 8, + tag: 4 +}; + +// A stateful parser that changes the offset whenever a value is retrieved. +// The data is a DataView. +function Parser(data, offset) { + this.data = data; + this.offset = offset; + this.relativeOffset = 0; +} + +Parser.prototype.parseByte = function() { + var v = this.data.getUint8(this.offset + this.relativeOffset); + this.relativeOffset += 1; + return v; +}; + +Parser.prototype.parseChar = function() { + var v = this.data.getInt8(this.offset + this.relativeOffset); + this.relativeOffset += 1; + return v; +}; + +Parser.prototype.parseCard8 = Parser.prototype.parseByte; + +Parser.prototype.parseUShort = function() { + var v = this.data.getUint16(this.offset + this.relativeOffset); + this.relativeOffset += 2; + return v; +}; + +Parser.prototype.parseCard16 = Parser.prototype.parseUShort; +Parser.prototype.parseSID = Parser.prototype.parseUShort; +Parser.prototype.parseOffset16 = Parser.prototype.parseUShort; + +Parser.prototype.parseShort = function() { + var v = this.data.getInt16(this.offset + this.relativeOffset); + this.relativeOffset += 2; + return v; +}; + +Parser.prototype.parseF2Dot14 = function() { + var v = this.data.getInt16(this.offset + this.relativeOffset) / 16384; + this.relativeOffset += 2; + return v; +}; + +Parser.prototype.parseULong = function() { + var v = getULong(this.data, this.offset + this.relativeOffset); + this.relativeOffset += 4; + return v; +}; + +Parser.prototype.parseOffset32 = Parser.prototype.parseULong; + +Parser.prototype.parseFixed = function() { + var v = getFixed(this.data, this.offset + this.relativeOffset); + this.relativeOffset += 4; + return v; +}; + +Parser.prototype.parseString = function(length) { + var dataView = this.data; + var offset = this.offset + this.relativeOffset; + var string = ''; + this.relativeOffset += length; + for (var i = 0; i < length; i++) { + string += String.fromCharCode(dataView.getUint8(offset + i)); + } + + return string; +}; + +Parser.prototype.parseTag = function() { + return this.parseString(4); +}; + +// LONGDATETIME is a 64-bit integer. +// JavaScript and unix timestamps traditionally use 32 bits, so we +// only take the last 32 bits. +// + Since until 2038 those bits will be filled by zeros we can ignore them. +Parser.prototype.parseLongDateTime = function() { + var v = getULong(this.data, this.offset + this.relativeOffset + 4); + // Subtract seconds between 01/01/1904 and 01/01/1970 + // to convert Apple Mac timestamp to Standard Unix timestamp + v -= 2082844800; + this.relativeOffset += 8; + return v; +}; + +Parser.prototype.parseVersion = function(minorBase) { + var major = getUShort(this.data, this.offset + this.relativeOffset); + + // How to interpret the minor version is very vague in the spec. 0x5000 is 5, 0x1000 is 1 + // Default returns the correct number if minor = 0xN000 where N is 0-9 + // Set minorBase to 1 for tables that use minor = N where N is 0-9 + var minor = getUShort(this.data, this.offset + this.relativeOffset + 2); + this.relativeOffset += 4; + if (minorBase === undefined) { minorBase = 0x1000; } + return major + minor / minorBase / 10; +}; + +Parser.prototype.skip = function(type, amount) { + if (amount === undefined) { + amount = 1; + } + + this.relativeOffset += typeOffsets[type] * amount; +}; + +///// Parsing lists and records /////////////////////////////// + +// Parse a list of 32 bit unsigned integers. +Parser.prototype.parseULongList = function(count) { + if (count === undefined) { count = this.parseULong(); } + var offsets = new Array(count); + var dataView = this.data; + var offset = this.offset + this.relativeOffset; + for (var i = 0; i < count; i++) { + offsets[i] = dataView.getUint32(offset); + offset += 4; + } + + this.relativeOffset += count * 4; + return offsets; +}; + +// Parse a list of 16 bit unsigned integers. The length of the list can be read on the stream +// or provided as an argument. +Parser.prototype.parseOffset16List = +Parser.prototype.parseUShortList = function(count) { + if (count === undefined) { count = this.parseUShort(); } + var offsets = new Array(count); + var dataView = this.data; + var offset = this.offset + this.relativeOffset; + for (var i = 0; i < count; i++) { + offsets[i] = dataView.getUint16(offset); + offset += 2; + } + + this.relativeOffset += count * 2; + return offsets; +}; + +// Parses a list of 16 bit signed integers. +Parser.prototype.parseShortList = function(count) { + var list = new Array(count); + var dataView = this.data; + var offset = this.offset + this.relativeOffset; + for (var i = 0; i < count; i++) { + list[i] = dataView.getInt16(offset); + offset += 2; + } + + this.relativeOffset += count * 2; + return list; +}; + +// Parses a list of bytes. +Parser.prototype.parseByteList = function(count) { + var list = new Array(count); + var dataView = this.data; + var offset = this.offset + this.relativeOffset; + for (var i = 0; i < count; i++) { + list[i] = dataView.getUint8(offset++); + } + + this.relativeOffset += count; + return list; +}; + +/** + * Parse a list of items. + * Record count is optional, if omitted it is read from the stream. + * itemCallback is one of the Parser methods. + */ +Parser.prototype.parseList = function(count, itemCallback) { + if (!itemCallback) { + itemCallback = count; + count = this.parseUShort(); + } + var list = new Array(count); + for (var i = 0; i < count; i++) { + list[i] = itemCallback.call(this); + } + return list; +}; + +Parser.prototype.parseList32 = function(count, itemCallback) { + if (!itemCallback) { + itemCallback = count; + count = this.parseULong(); + } + var list = new Array(count); + for (var i = 0; i < count; i++) { + list[i] = itemCallback.call(this); + } + return list; +}; + +/** + * Parse a list of records. + * Record count is optional, if omitted it is read from the stream. + * Example of recordDescription: { sequenceIndex: Parser.uShort, lookupListIndex: Parser.uShort } + */ +Parser.prototype.parseRecordList = function(count, recordDescription) { + // If the count argument is absent, read it in the stream. + if (!recordDescription) { + recordDescription = count; + count = this.parseUShort(); + } + var records = new Array(count); + var fields = Object.keys(recordDescription); + for (var i = 0; i < count; i++) { + var rec = {}; + for (var j = 0; j < fields.length; j++) { + var fieldName = fields[j]; + var fieldType = recordDescription[fieldName]; + rec[fieldName] = fieldType.call(this); + } + records[i] = rec; + } + return records; +}; + +Parser.prototype.parseRecordList32 = function(count, recordDescription) { + // If the count argument is absent, read it in the stream. + if (!recordDescription) { + recordDescription = count; + count = this.parseULong(); + } + var records = new Array(count); + var fields = Object.keys(recordDescription); + for (var i = 0; i < count; i++) { + var rec = {}; + for (var j = 0; j < fields.length; j++) { + var fieldName = fields[j]; + var fieldType = recordDescription[fieldName]; + rec[fieldName] = fieldType.call(this); + } + records[i] = rec; + } + return records; +}; + +// Parse a data structure into an object +// Example of description: { sequenceIndex: Parser.uShort, lookupListIndex: Parser.uShort } +Parser.prototype.parseStruct = function(description) { + if (typeof description === 'function') { + return description.call(this); + } else { + var fields = Object.keys(description); + var struct = {}; + for (var j = 0; j < fields.length; j++) { + var fieldName = fields[j]; + var fieldType = description[fieldName]; + struct[fieldName] = fieldType.call(this); + } + return struct; + } +}; + +/** + * Parse a GPOS valueRecord + * https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#value-record + * valueFormat is optional, if omitted it is read from the stream. + */ +Parser.prototype.parseValueRecord = function(valueFormat) { + if (valueFormat === undefined) { + valueFormat = this.parseUShort(); + } + if (valueFormat === 0) { + // valueFormat2 in kerning pairs is most often 0 + // in this case return undefined instead of an empty object, to save space + return; + } + var valueRecord = {}; + + if (valueFormat & 0x0001) { valueRecord.xPlacement = this.parseShort(); } + if (valueFormat & 0x0002) { valueRecord.yPlacement = this.parseShort(); } + if (valueFormat & 0x0004) { valueRecord.xAdvance = this.parseShort(); } + if (valueFormat & 0x0008) { valueRecord.yAdvance = this.parseShort(); } + + // Device table (non-variable font) / VariationIndex table (variable font) not supported + // https://docs.microsoft.com/fr-fr/typography/opentype/spec/chapter2#devVarIdxTbls + if (valueFormat & 0x0010) { valueRecord.xPlaDevice = undefined; this.parseShort(); } + if (valueFormat & 0x0020) { valueRecord.yPlaDevice = undefined; this.parseShort(); } + if (valueFormat & 0x0040) { valueRecord.xAdvDevice = undefined; this.parseShort(); } + if (valueFormat & 0x0080) { valueRecord.yAdvDevice = undefined; this.parseShort(); } + + return valueRecord; +}; + +/** + * Parse a list of GPOS valueRecords + * https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#value-record + * valueFormat and valueCount are read from the stream. + */ +Parser.prototype.parseValueRecordList = function() { + var valueFormat = this.parseUShort(); + var valueCount = this.parseUShort(); + var values = new Array(valueCount); + for (var i = 0; i < valueCount; i++) { + values[i] = this.parseValueRecord(valueFormat); + } + return values; +}; + +Parser.prototype.parsePointer = function(description) { + var structOffset = this.parseOffset16(); + if (structOffset > 0) { + // NULL offset => return undefined + return new Parser(this.data, this.offset + structOffset).parseStruct(description); + } + return undefined; +}; + +Parser.prototype.parsePointer32 = function(description) { + var structOffset = this.parseOffset32(); + if (structOffset > 0) { + // NULL offset => return undefined + return new Parser(this.data, this.offset + structOffset).parseStruct(description); + } + return undefined; +}; + +/** + * Parse a list of offsets to lists of 16-bit integers, + * or a list of offsets to lists of offsets to any kind of items. + * If itemCallback is not provided, a list of list of UShort is assumed. + * If provided, itemCallback is called on each item and must parse the item. + * See examples in tables/gsub.js + */ +Parser.prototype.parseListOfLists = function(itemCallback) { + var offsets = this.parseOffset16List(); + var count = offsets.length; + var relativeOffset = this.relativeOffset; + var list = new Array(count); + for (var i = 0; i < count; i++) { + var start = offsets[i]; + if (start === 0) { + // NULL offset + // Add i as owned property to list. Convenient with assert. + list[i] = undefined; + continue; + } + this.relativeOffset = start; + if (itemCallback) { + var subOffsets = this.parseOffset16List(); + var subList = new Array(subOffsets.length); + for (var j = 0; j < subOffsets.length; j++) { + this.relativeOffset = start + subOffsets[j]; + subList[j] = itemCallback.call(this); + } + list[i] = subList; + } else { + list[i] = this.parseUShortList(); + } + } + this.relativeOffset = relativeOffset; + return list; +}; + +///// Complex tables parsing ////////////////////////////////// + +// Parse a coverage table in a GSUB, GPOS or GDEF table. +// https://www.microsoft.com/typography/OTSPEC/chapter2.htm +// parser.offset must point to the start of the table containing the coverage. +Parser.prototype.parseCoverage = function() { + var startOffset = this.offset + this.relativeOffset; + var format = this.parseUShort(); + var count = this.parseUShort(); + if (format === 1) { + return { + format: 1, + glyphs: this.parseUShortList(count) + }; + } else if (format === 2) { + var ranges = new Array(count); + for (var i = 0; i < count; i++) { + ranges[i] = { + start: this.parseUShort(), + end: this.parseUShort(), + index: this.parseUShort() + }; + } + return { + format: 2, + ranges: ranges + }; + } + throw new Error('0x' + startOffset.toString(16) + ': Coverage format must be 1 or 2.'); +}; + +// Parse a Class Definition Table in a GSUB, GPOS or GDEF table. +// https://www.microsoft.com/typography/OTSPEC/chapter2.htm +Parser.prototype.parseClassDef = function() { + var startOffset = this.offset + this.relativeOffset; + var format = this.parseUShort(); + if (format === 1) { + return { + format: 1, + startGlyph: this.parseUShort(), + classes: this.parseUShortList() + }; + } else if (format === 2) { + return { + format: 2, + ranges: this.parseRecordList({ + start: Parser.uShort, + end: Parser.uShort, + classId: Parser.uShort + }) + }; + } + throw new Error('0x' + startOffset.toString(16) + ': ClassDef format must be 1 or 2.'); +}; + +///// Static methods /////////////////////////////////// +// These convenience methods can be used as callbacks and should be called with "this" context set to a Parser instance. + +Parser.list = function(count, itemCallback) { + return function() { + return this.parseList(count, itemCallback); + }; +}; + +Parser.list32 = function(count, itemCallback) { + return function() { + return this.parseList32(count, itemCallback); + }; +}; + +Parser.recordList = function(count, recordDescription) { + return function() { + return this.parseRecordList(count, recordDescription); + }; +}; + +Parser.recordList32 = function(count, recordDescription) { + return function() { + return this.parseRecordList32(count, recordDescription); + }; +}; + +Parser.pointer = function(description) { + return function() { + return this.parsePointer(description); + }; +}; + +Parser.pointer32 = function(description) { + return function() { + return this.parsePointer32(description); + }; +}; + +Parser.tag = Parser.prototype.parseTag; +Parser.byte = Parser.prototype.parseByte; +Parser.uShort = Parser.offset16 = Parser.prototype.parseUShort; +Parser.uShortList = Parser.prototype.parseUShortList; +Parser.uLong = Parser.offset32 = Parser.prototype.parseULong; +Parser.uLongList = Parser.prototype.parseULongList; +Parser.struct = Parser.prototype.parseStruct; +Parser.coverage = Parser.prototype.parseCoverage; +Parser.classDef = Parser.prototype.parseClassDef; + +///// Script, Feature, Lookup lists /////////////////////////////////////////////// +// https://www.microsoft.com/typography/OTSPEC/chapter2.htm + +var langSysTable = { + reserved: Parser.uShort, + reqFeatureIndex: Parser.uShort, + featureIndexes: Parser.uShortList +}; + +Parser.prototype.parseScriptList = function() { + return this.parsePointer(Parser.recordList({ + tag: Parser.tag, + script: Parser.pointer({ + defaultLangSys: Parser.pointer(langSysTable), + langSysRecords: Parser.recordList({ + tag: Parser.tag, + langSys: Parser.pointer(langSysTable) + }) + }) + })) || []; +}; + +Parser.prototype.parseFeatureList = function() { + return this.parsePointer(Parser.recordList({ + tag: Parser.tag, + feature: Parser.pointer({ + featureParams: Parser.offset16, + lookupListIndexes: Parser.uShortList + }) + })) || []; +}; + +Parser.prototype.parseLookupList = function(lookupTableParsers) { + return this.parsePointer(Parser.list(Parser.pointer(function() { + var lookupType = this.parseUShort(); + check.argument(1 <= lookupType && lookupType <= 9, 'GPOS/GSUB lookup type ' + lookupType + ' unknown.'); + var lookupFlag = this.parseUShort(); + var useMarkFilteringSet = lookupFlag & 0x10; + return { + lookupType: lookupType, + lookupFlag: lookupFlag, + subtables: this.parseList(Parser.pointer(lookupTableParsers[lookupType])), + markFilteringSet: useMarkFilteringSet ? this.parseUShort() : undefined + }; + }))) || []; +}; + +Parser.prototype.parseFeatureVariationsList = function() { + return this.parsePointer32(function() { + var majorVersion = this.parseUShort(); + var minorVersion = this.parseUShort(); + check.argument(majorVersion === 1 && minorVersion < 1, 'GPOS/GSUB feature variations table unknown.'); + var featureVariations = this.parseRecordList32({ + conditionSetOffset: Parser.offset32, + featureTableSubstitutionOffset: Parser.offset32 + }); + return featureVariations; + }) || []; +}; + +var parse = { + getByte: getByte, + getCard8: getByte, + getUShort: getUShort, + getCard16: getUShort, + getShort: getShort, + getULong: getULong, + getFixed: getFixed, + getTag: getTag, + getOffset: getOffset, + getBytes: getBytes, + bytesToString: bytesToString, + Parser: Parser, +}; + +// The `cmap` table stores the mappings from characters to glyphs. + +function parseCmapTableFormat12(cmap, p) { + //Skip reserved. + p.parseUShort(); + + // Length in bytes of the sub-tables. + cmap.length = p.parseULong(); + cmap.language = p.parseULong(); + + var groupCount; + cmap.groupCount = groupCount = p.parseULong(); + cmap.glyphIndexMap = {}; + + for (var i = 0; i < groupCount; i += 1) { + var startCharCode = p.parseULong(); + var endCharCode = p.parseULong(); + var startGlyphId = p.parseULong(); + + for (var c = startCharCode; c <= endCharCode; c += 1) { + cmap.glyphIndexMap[c] = startGlyphId; + startGlyphId++; + } + } +} + +function parseCmapTableFormat4(cmap, p, data, start, offset) { + // Length in bytes of the sub-tables. + cmap.length = p.parseUShort(); + cmap.language = p.parseUShort(); + + // segCount is stored x 2. + var segCount; + cmap.segCount = segCount = p.parseUShort() >> 1; + + // Skip searchRange, entrySelector, rangeShift. + p.skip('uShort', 3); + + // The "unrolled" mapping from character codes to glyph indices. + cmap.glyphIndexMap = {}; + var endCountParser = new parse.Parser(data, start + offset + 14); + var startCountParser = new parse.Parser(data, start + offset + 16 + segCount * 2); + var idDeltaParser = new parse.Parser(data, start + offset + 16 + segCount * 4); + var idRangeOffsetParser = new parse.Parser(data, start + offset + 16 + segCount * 6); + var glyphIndexOffset = start + offset + 16 + segCount * 8; + for (var i = 0; i < segCount - 1; i += 1) { + var glyphIndex = (void 0); + var endCount = endCountParser.parseUShort(); + var startCount = startCountParser.parseUShort(); + var idDelta = idDeltaParser.parseShort(); + var idRangeOffset = idRangeOffsetParser.parseUShort(); + for (var c = startCount; c <= endCount; c += 1) { + if (idRangeOffset !== 0) { + // The idRangeOffset is relative to the current position in the idRangeOffset array. + // Take the current offset in the idRangeOffset array. + glyphIndexOffset = (idRangeOffsetParser.offset + idRangeOffsetParser.relativeOffset - 2); + + // Add the value of the idRangeOffset, which will move us into the glyphIndex array. + glyphIndexOffset += idRangeOffset; + + // Then add the character index of the current segment, multiplied by 2 for USHORTs. + glyphIndexOffset += (c - startCount) * 2; + glyphIndex = parse.getUShort(data, glyphIndexOffset); + if (glyphIndex !== 0) { + glyphIndex = (glyphIndex + idDelta) & 0xFFFF; + } + } else { + glyphIndex = (c + idDelta) & 0xFFFF; + } + + cmap.glyphIndexMap[c] = glyphIndex; + } + } +} + +// Parse the `cmap` table. This table stores the mappings from characters to glyphs. +// There are many available formats, but we only support the Windows format 4 and 12. +// This function returns a `CmapEncoding` object or null if no supported format could be found. +function parseCmapTable(data, start) { + var cmap = {}; + cmap.version = parse.getUShort(data, start); + check.argument(cmap.version === 0, 'cmap table version should be 0.'); + + // The cmap table can contain many sub-tables, each with their own format. + // We're only interested in a "platform 0" (Unicode format) and "platform 3" (Windows format) table. + cmap.numTables = parse.getUShort(data, start + 2); + var offset = -1; + for (var i = cmap.numTables - 1; i >= 0; i -= 1) { + var platformId = parse.getUShort(data, start + 4 + (i * 8)); + var encodingId = parse.getUShort(data, start + 4 + (i * 8) + 2); + if ((platformId === 3 && (encodingId === 0 || encodingId === 1 || encodingId === 10)) || + (platformId === 0 && (encodingId === 0 || encodingId === 1 || encodingId === 2 || encodingId === 3 || encodingId === 4))) { + offset = parse.getULong(data, start + 4 + (i * 8) + 4); + break; + } + } + + if (offset === -1) { + // There is no cmap table in the font that we support. + throw new Error('No valid cmap sub-tables found.'); + } + + var p = new parse.Parser(data, start + offset); + cmap.format = p.parseUShort(); + + if (cmap.format === 12) { + parseCmapTableFormat12(cmap, p); + } else if (cmap.format === 4) { + parseCmapTableFormat4(cmap, p, data, start, offset); + } else { + throw new Error('Only format 4 and 12 cmap tables are supported (found format ' + cmap.format + ').'); + } + + return cmap; +} + +function addSegment(t, code, glyphIndex) { + t.segments.push({ + end: code, + start: code, + delta: -(code - glyphIndex), + offset: 0, + glyphIndex: glyphIndex + }); +} + +function addTerminatorSegment(t) { + t.segments.push({ + end: 0xFFFF, + start: 0xFFFF, + delta: 1, + offset: 0 + }); +} + +// Make cmap table, format 4 by default, 12 if needed only +function makeCmapTable(glyphs) { + // Plan 0 is the base Unicode Plan but emojis, for example are on another plan, and needs cmap 12 format (with 32bit) + var isPlan0Only = true; + var i; + + // Check if we need to add cmap format 12 or if format 4 only is fine + for (i = glyphs.length - 1; i > 0; i -= 1) { + var g = glyphs.get(i); + if (g.unicode > 65535) { + console.log('Adding CMAP format 12 (needed!)'); + isPlan0Only = false; + break; + } + } + + var cmapTable = [ + {name: 'version', type: 'USHORT', value: 0}, + {name: 'numTables', type: 'USHORT', value: isPlan0Only ? 1 : 2}, + + // CMAP 4 header + {name: 'platformID', type: 'USHORT', value: 3}, + {name: 'encodingID', type: 'USHORT', value: 1}, + {name: 'offset', type: 'ULONG', value: isPlan0Only ? 12 : (12 + 8)} + ]; + + if (!isPlan0Only) + { cmapTable = cmapTable.concat([ + // CMAP 12 header + {name: 'cmap12PlatformID', type: 'USHORT', value: 3}, // We encode only for PlatformID = 3 (Windows) because it is supported everywhere + {name: 'cmap12EncodingID', type: 'USHORT', value: 10}, + {name: 'cmap12Offset', type: 'ULONG', value: 0} + ]); } + + cmapTable = cmapTable.concat([ + // CMAP 4 Subtable + {name: 'format', type: 'USHORT', value: 4}, + {name: 'cmap4Length', type: 'USHORT', value: 0}, + {name: 'language', type: 'USHORT', value: 0}, + {name: 'segCountX2', type: 'USHORT', value: 0}, + {name: 'searchRange', type: 'USHORT', value: 0}, + {name: 'entrySelector', type: 'USHORT', value: 0}, + {name: 'rangeShift', type: 'USHORT', value: 0} + ]); + + var t = new table.Table('cmap', cmapTable); + + t.segments = []; + for (i = 0; i < glyphs.length; i += 1) { + var glyph = glyphs.get(i); + for (var j = 0; j < glyph.unicodes.length; j += 1) { + addSegment(t, glyph.unicodes[j], i); + } + + t.segments = t.segments.sort(function (a, b) { + return a.start - b.start; + }); + } + + addTerminatorSegment(t); + + var segCount = t.segments.length; + var segCountToRemove = 0; + + // CMAP 4 + // Set up parallel segment arrays. + var endCounts = []; + var startCounts = []; + var idDeltas = []; + var idRangeOffsets = []; + var glyphIds = []; + + // CMAP 12 + var cmap12Groups = []; + + // Reminder this loop is not following the specification at 100% + // The specification -> find suites of characters and make a group + // Here we're doing one group for each letter + // Doing as the spec can save 8 times (or more) space + for (i = 0; i < segCount; i += 1) { + var segment = t.segments[i]; + + // CMAP 4 + if (segment.end <= 65535 && segment.start <= 65535) { + endCounts = endCounts.concat({name: 'end_' + i, type: 'USHORT', value: segment.end}); + startCounts = startCounts.concat({name: 'start_' + i, type: 'USHORT', value: segment.start}); + idDeltas = idDeltas.concat({name: 'idDelta_' + i, type: 'SHORT', value: segment.delta}); + idRangeOffsets = idRangeOffsets.concat({name: 'idRangeOffset_' + i, type: 'USHORT', value: segment.offset}); + if (segment.glyphId !== undefined) { + glyphIds = glyphIds.concat({name: 'glyph_' + i, type: 'USHORT', value: segment.glyphId}); + } + } else { + // Skip Unicode > 65535 (16bit unsigned max) for CMAP 4, will be added in CMAP 12 + segCountToRemove += 1; + } + + // CMAP 12 + // Skip Terminator Segment + if (!isPlan0Only && segment.glyphIndex !== undefined) { + cmap12Groups = cmap12Groups.concat({name: 'cmap12Start_' + i, type: 'ULONG', value: segment.start}); + cmap12Groups = cmap12Groups.concat({name: 'cmap12End_' + i, type: 'ULONG', value: segment.end}); + cmap12Groups = cmap12Groups.concat({name: 'cmap12Glyph_' + i, type: 'ULONG', value: segment.glyphIndex}); + } + } + + // CMAP 4 Subtable + t.segCountX2 = (segCount - segCountToRemove) * 2; + t.searchRange = Math.pow(2, Math.floor(Math.log((segCount - segCountToRemove)) / Math.log(2))) * 2; + t.entrySelector = Math.log(t.searchRange / 2) / Math.log(2); + t.rangeShift = t.segCountX2 - t.searchRange; + + t.fields = t.fields.concat(endCounts); + t.fields.push({name: 'reservedPad', type: 'USHORT', value: 0}); + t.fields = t.fields.concat(startCounts); + t.fields = t.fields.concat(idDeltas); + t.fields = t.fields.concat(idRangeOffsets); + t.fields = t.fields.concat(glyphIds); + + t.cmap4Length = 14 + // Subtable header + endCounts.length * 2 + + 2 + // reservedPad + startCounts.length * 2 + + idDeltas.length * 2 + + idRangeOffsets.length * 2 + + glyphIds.length * 2; + + if (!isPlan0Only) { + // CMAP 12 Subtable + var cmap12Length = 16 + // Subtable header + cmap12Groups.length * 4; + + t.cmap12Offset = 12 + (2 * 2) + 4 + t.cmap4Length; + t.fields = t.fields.concat([ + {name: 'cmap12Format', type: 'USHORT', value: 12}, + {name: 'cmap12Reserved', type: 'USHORT', value: 0}, + {name: 'cmap12Length', type: 'ULONG', value: cmap12Length}, + {name: 'cmap12Language', type: 'ULONG', value: 0}, + {name: 'cmap12nGroups', type: 'ULONG', value: cmap12Groups.length / 3} + ]); + + t.fields = t.fields.concat(cmap12Groups); + } + + return t; +} + +var cmap = { parse: parseCmapTable, make: makeCmapTable }; + +// Glyph encoding + +var cffStandardStrings = [ + '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', + 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', + 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', + 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', + 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', + 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent', 'sterling', + 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', + 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl', 'periodcentered', 'paragraph', + 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', + 'questiondown', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', + 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine', 'Lslash', 'Oslash', 'OE', + 'ordmasculine', 'ae', 'dotlessi', 'lslash', 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu', + 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter', 'divide', 'brokenbar', 'degree', 'thorn', + 'threequarters', 'twosuperior', 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright', + 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde', 'Ccedilla', 'Eacute', 'Ecircumflex', + 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex', + 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex', 'Udieresis', 'Ugrave', 'Yacute', + 'Ydieresis', 'Zcaron', 'aacute', 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla', 'eacute', + 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex', 'idieresis', 'igrave', 'ntilde', 'oacute', + 'ocircumflex', 'odieresis', 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis', 'ugrave', + 'yacute', 'ydieresis', 'zcaron', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle', 'dollarsuperior', + 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', '266 ff', 'onedotenleader', + 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', + 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'commasuperior', 'threequartersemdash', 'periodsuperior', + 'questionsmall', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', + 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'ffi', 'ffl', + 'parenleftinferior', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', + 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', + 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', + 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', + 'centoldstyle', 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', + 'Dotaccentsmall', 'Macronsmall', 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', + 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', + 'zerosuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', + 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', + 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', + 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', + 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', + 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', + 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', + 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall', '001.000', + '001.001', '001.002', '001.003', 'Black', 'Bold', 'Book', 'Light', 'Medium', 'Regular', 'Roman', 'Semibold']; + +var cffStandardEncoding = [ + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', + 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', + 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', + 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', + 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', + 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '', + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', + 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger', + 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', + 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde', + 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron', + 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '', + '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '', + 'lslash', 'oslash', 'oe', 'germandbls']; + +var cffExpertEncoding = [ + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior', + 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', + 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', + 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', + 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior', + 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior', + 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl', + 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', + 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', + 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', + 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '', + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', + 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior', + '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters', + 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '', + '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', + 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', + 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', + 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', + 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', + 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', + 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', + 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', + 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall']; + +var standardNames = [ + '.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', + 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', + 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', + 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', + 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', + 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave', + 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis', + 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis', + 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section', + 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal', + 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation', + 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown', + 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright', + 'ellipsis', 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft', + 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction', + 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase', + 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', + 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex', + 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', + 'ogonek', 'caron', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar', 'Eth', 'eth', + 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply', 'onesuperior', 'twosuperior', 'threesuperior', + 'onehalf', 'onequarter', 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla', 'scedilla', + 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat']; + +/** + * This is the encoding used for fonts created from scratch. + * It loops through all glyphs and finds the appropriate unicode value. + * Since it's linear time, other encodings will be faster. + * @exports opentype.DefaultEncoding + * @class + * @constructor + * @param {opentype.Font} + */ +function DefaultEncoding(font) { + this.font = font; +} + +DefaultEncoding.prototype.charToGlyphIndex = function(c) { + var code = c.codePointAt(0); + var glyphs = this.font.glyphs; + if (glyphs) { + for (var i = 0; i < glyphs.length; i += 1) { + var glyph = glyphs.get(i); + for (var j = 0; j < glyph.unicodes.length; j += 1) { + if (glyph.unicodes[j] === code) { + return i; + } + } + } + } + return null; +}; + +/** + * @exports opentype.CmapEncoding + * @class + * @constructor + * @param {Object} cmap - a object with the cmap encoded data + */ +function CmapEncoding(cmap) { + this.cmap = cmap; +} + +/** + * @param {string} c - the character + * @return {number} The glyph index. + */ +CmapEncoding.prototype.charToGlyphIndex = function(c) { + return this.cmap.glyphIndexMap[c.codePointAt(0)] || 0; +}; + +/** + * @exports opentype.CffEncoding + * @class + * @constructor + * @param {string} encoding - The encoding + * @param {Array} charset - The character set. + */ +function CffEncoding(encoding, charset) { + this.encoding = encoding; + this.charset = charset; +} + +/** + * @param {string} s - The character + * @return {number} The index. + */ +CffEncoding.prototype.charToGlyphIndex = function(s) { + var code = s.codePointAt(0); + var charName = this.encoding[code]; + return this.charset.indexOf(charName); +}; + +/** + * @exports opentype.GlyphNames + * @class + * @constructor + * @param {Object} post + */ +function GlyphNames(post) { + switch (post.version) { + case 1: + this.names = standardNames.slice(); + break; + case 2: + this.names = new Array(post.numberOfGlyphs); + for (var i = 0; i < post.numberOfGlyphs; i++) { + if (post.glyphNameIndex[i] < standardNames.length) { + this.names[i] = standardNames[post.glyphNameIndex[i]]; + } else { + this.names[i] = post.names[post.glyphNameIndex[i] - standardNames.length]; + } + } + + break; + case 2.5: + this.names = new Array(post.numberOfGlyphs); + for (var i$1 = 0; i$1 < post.numberOfGlyphs; i$1++) { + this.names[i$1] = standardNames[i$1 + post.glyphNameIndex[i$1]]; + } + + break; + case 3: + this.names = []; + break; + default: + this.names = []; + break; + } +} + +/** + * Gets the index of a glyph by name. + * @param {string} name - The glyph name + * @return {number} The index + */ +GlyphNames.prototype.nameToGlyphIndex = function(name) { + return this.names.indexOf(name); +}; + +/** + * @param {number} gid + * @return {string} + */ +GlyphNames.prototype.glyphIndexToName = function(gid) { + return this.names[gid]; +}; + +function addGlyphNamesAll(font) { + var glyph; + var glyphIndexMap = font.tables.cmap.glyphIndexMap; + var charCodes = Object.keys(glyphIndexMap); + + for (var i = 0; i < charCodes.length; i += 1) { + var c = charCodes[i]; + var glyphIndex = glyphIndexMap[c]; + glyph = font.glyphs.get(glyphIndex); + glyph.addUnicode(parseInt(c)); + } + + for (var i$1 = 0; i$1 < font.glyphs.length; i$1 += 1) { + glyph = font.glyphs.get(i$1); + if (font.cffEncoding) { + if (font.isCIDFont) { + glyph.name = 'gid' + i$1; + } else { + glyph.name = font.cffEncoding.charset[i$1]; + } + } else if (font.glyphNames.names) { + glyph.name = font.glyphNames.glyphIndexToName(i$1); + } + } +} + +function addGlyphNamesToUnicodeMap(font) { + font._IndexToUnicodeMap = {}; + + var glyphIndexMap = font.tables.cmap.glyphIndexMap; + var charCodes = Object.keys(glyphIndexMap); + + for (var i = 0; i < charCodes.length; i += 1) { + var c = charCodes[i]; + var glyphIndex = glyphIndexMap[c]; + if (font._IndexToUnicodeMap[glyphIndex] === undefined) { + font._IndexToUnicodeMap[glyphIndex] = { + unicodes: [parseInt(c)] + }; + } else { + font._IndexToUnicodeMap[glyphIndex].unicodes.push(parseInt(c)); + } + } +} + +/** + * @alias opentype.addGlyphNames + * @param {opentype.Font} + * @param {Object} + */ +function addGlyphNames(font, opt) { + if (opt.lowMemory) { + addGlyphNamesToUnicodeMap(font); + } else { + addGlyphNamesAll(font); + } +} + +// Drawing utility functions. + +// Draw a line on the given context from point `x1,y1` to point `x2,y2`. +function line(ctx, x1, y1, x2, y2) { + ctx.beginPath(); + ctx.moveTo(x1, y1); + ctx.lineTo(x2, y2); + ctx.stroke(); +} + +var draw = { line: line }; + +// The Glyph object +// import glyf from './tables/glyf' Can't be imported here, because it's a circular dependency + +function getPathDefinition(glyph, path) { + var _path = path || new Path(); + return { + configurable: true, + + get: function() { + if (typeof _path === 'function') { + _path = _path(); + } + + return _path; + }, + + set: function(p) { + _path = p; + } + }; +} +/** + * @typedef GlyphOptions + * @type Object + * @property {string} [name] - The glyph name + * @property {number} [unicode] + * @property {Array} [unicodes] + * @property {number} [xMin] + * @property {number} [yMin] + * @property {number} [xMax] + * @property {number} [yMax] + * @property {number} [advanceWidth] + */ + +// A Glyph is an individual mark that often corresponds to a character. +// Some glyphs, such as ligatures, are a combination of many characters. +// Glyphs are the basic building blocks of a font. +// +// The `Glyph` class contains utility methods for drawing the path and its points. +/** + * @exports opentype.Glyph + * @class + * @param {GlyphOptions} + * @constructor + */ +function Glyph(options) { + // By putting all the code on a prototype function (which is only declared once) + // we reduce the memory requirements for larger fonts by some 2% + this.bindConstructorValues(options); +} + +/** + * @param {GlyphOptions} + */ +Glyph.prototype.bindConstructorValues = function(options) { + this.index = options.index || 0; + + // These three values cannot be deferred for memory optimization: + this.name = options.name || null; + this.unicode = options.unicode || undefined; + this.unicodes = options.unicodes || options.unicode !== undefined ? [options.unicode] : []; + + // But by binding these values only when necessary, we reduce can + // the memory requirements by almost 3% for larger fonts. + if ('xMin' in options) { + this.xMin = options.xMin; + } + + if ('yMin' in options) { + this.yMin = options.yMin; + } + + if ('xMax' in options) { + this.xMax = options.xMax; + } + + if ('yMax' in options) { + this.yMax = options.yMax; + } + + if ('advanceWidth' in options) { + this.advanceWidth = options.advanceWidth; + } + + // The path for a glyph is the most memory intensive, and is bound as a value + // with a getter/setter to ensure we actually do path parsing only once the + // path is actually needed by anything. + Object.defineProperty(this, 'path', getPathDefinition(this, options.path)); +}; + +/** + * @param {number} + */ +Glyph.prototype.addUnicode = function(unicode) { + if (this.unicodes.length === 0) { + this.unicode = unicode; + } + + this.unicodes.push(unicode); +}; + +/** + * Calculate the minimum bounding box for this glyph. + * @return {opentype.BoundingBox} + */ +Glyph.prototype.getBoundingBox = function() { + return this.path.getBoundingBox(); +}; + +/** + * Convert the glyph to a Path we can draw on a drawing context. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {Object=} options - xScale, yScale to stretch the glyph. + * @param {opentype.Font} if hinting is to be used, the font + * @return {opentype.Path} + */ +Glyph.prototype.getPath = function(x, y, fontSize, options, font) { + x = x !== undefined ? x : 0; + y = y !== undefined ? y : 0; + fontSize = fontSize !== undefined ? fontSize : 72; + var commands; + var hPoints; + if (!options) { options = { }; } + var xScale = options.xScale; + var yScale = options.yScale; + + if (options.hinting && font && font.hinting) { + // in case of hinting, the hinting engine takes care + // of scaling the points (not the path) before hinting. + hPoints = this.path && font.hinting.exec(this, fontSize); + // in case the hinting engine failed hPoints is undefined + // and thus reverts to plain rending + } + + if (hPoints) { + // Call font.hinting.getCommands instead of `glyf.getPath(hPoints).commands` to avoid a circular dependency + commands = font.hinting.getCommands(hPoints); + x = Math.round(x); + y = Math.round(y); + // TODO in case of hinting xyScaling is not yet supported + xScale = yScale = 1; + } else { + commands = this.path.commands; + var scale = 1 / (this.path.unitsPerEm || 1000) * fontSize; + if (xScale === undefined) { xScale = scale; } + if (yScale === undefined) { yScale = scale; } + } + + var p = new Path(); + for (var i = 0; i < commands.length; i += 1) { + var cmd = commands[i]; + if (cmd.type === 'M') { + p.moveTo(x + (cmd.x * xScale), y + (-cmd.y * yScale)); + } else if (cmd.type === 'L') { + p.lineTo(x + (cmd.x * xScale), y + (-cmd.y * yScale)); + } else if (cmd.type === 'Q') { + p.quadraticCurveTo(x + (cmd.x1 * xScale), y + (-cmd.y1 * yScale), + x + (cmd.x * xScale), y + (-cmd.y * yScale)); + } else if (cmd.type === 'C') { + p.curveTo(x + (cmd.x1 * xScale), y + (-cmd.y1 * yScale), + x + (cmd.x2 * xScale), y + (-cmd.y2 * yScale), + x + (cmd.x * xScale), y + (-cmd.y * yScale)); + } else if (cmd.type === 'Z') { + p.closePath(); + } + } + + return p; +}; + +/** + * Split the glyph into contours. + * This function is here for backwards compatibility, and to + * provide raw access to the TrueType glyph outlines. + * @return {Array} + */ +Glyph.prototype.getContours = function() { + if (this.points === undefined) { + return []; + } + + var contours = []; + var currentContour = []; + for (var i = 0; i < this.points.length; i += 1) { + var pt = this.points[i]; + currentContour.push(pt); + if (pt.lastPointOfContour) { + contours.push(currentContour); + currentContour = []; + } + } + + check.argument(currentContour.length === 0, 'There are still points left in the current contour.'); + return contours; +}; + +/** + * Calculate the xMin/yMin/xMax/yMax/lsb/rsb for a Glyph. + * @return {Object} + */ +Glyph.prototype.getMetrics = function() { + var commands = this.path.commands; + var xCoords = []; + var yCoords = []; + for (var i = 0; i < commands.length; i += 1) { + var cmd = commands[i]; + if (cmd.type !== 'Z') { + xCoords.push(cmd.x); + yCoords.push(cmd.y); + } + + if (cmd.type === 'Q' || cmd.type === 'C') { + xCoords.push(cmd.x1); + yCoords.push(cmd.y1); + } + + if (cmd.type === 'C') { + xCoords.push(cmd.x2); + yCoords.push(cmd.y2); + } + } + + var metrics = { + xMin: Math.min.apply(null, xCoords), + yMin: Math.min.apply(null, yCoords), + xMax: Math.max.apply(null, xCoords), + yMax: Math.max.apply(null, yCoords), + leftSideBearing: this.leftSideBearing + }; + + if (!isFinite(metrics.xMin)) { + metrics.xMin = 0; + } + + if (!isFinite(metrics.xMax)) { + metrics.xMax = this.advanceWidth; + } + + if (!isFinite(metrics.yMin)) { + metrics.yMin = 0; + } + + if (!isFinite(metrics.yMax)) { + metrics.yMax = 0; + } + + metrics.rightSideBearing = this.advanceWidth - metrics.leftSideBearing - (metrics.xMax - metrics.xMin); + return metrics; +}; + +/** + * Draw the glyph on the given context. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {Object=} options - xScale, yScale to stretch the glyph. + */ +Glyph.prototype.draw = function(ctx, x, y, fontSize, options) { + this.getPath(x, y, fontSize, options).draw(ctx); +}; + +/** + * Draw the points of the glyph. + * On-curve points will be drawn in blue, off-curve points will be drawn in red. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + */ +Glyph.prototype.drawPoints = function(ctx, x, y, fontSize) { + function drawCircles(l, x, y, scale) { + ctx.beginPath(); + for (var j = 0; j < l.length; j += 1) { + ctx.moveTo(x + (l[j].x * scale), y + (l[j].y * scale)); + ctx.arc(x + (l[j].x * scale), y + (l[j].y * scale), 2, 0, Math.PI * 2, false); + } + + ctx.closePath(); + ctx.fill(); + } + + x = x !== undefined ? x : 0; + y = y !== undefined ? y : 0; + fontSize = fontSize !== undefined ? fontSize : 24; + var scale = 1 / this.path.unitsPerEm * fontSize; + + var blueCircles = []; + var redCircles = []; + var path = this.path; + for (var i = 0; i < path.commands.length; i += 1) { + var cmd = path.commands[i]; + if (cmd.x !== undefined) { + blueCircles.push({x: cmd.x, y: -cmd.y}); + } + + if (cmd.x1 !== undefined) { + redCircles.push({x: cmd.x1, y: -cmd.y1}); + } + + if (cmd.x2 !== undefined) { + redCircles.push({x: cmd.x2, y: -cmd.y2}); + } + } + + ctx.fillStyle = 'blue'; + drawCircles(blueCircles, x, y, scale); + ctx.fillStyle = 'red'; + drawCircles(redCircles, x, y, scale); +}; + +/** + * Draw lines indicating important font measurements. + * Black lines indicate the origin of the coordinate system (point 0,0). + * Blue lines indicate the glyph bounding box. + * Green line indicates the advance width of the glyph. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + */ +Glyph.prototype.drawMetrics = function(ctx, x, y, fontSize) { + var scale; + x = x !== undefined ? x : 0; + y = y !== undefined ? y : 0; + fontSize = fontSize !== undefined ? fontSize : 24; + scale = 1 / this.path.unitsPerEm * fontSize; + ctx.lineWidth = 1; + + // Draw the origin + ctx.strokeStyle = 'black'; + draw.line(ctx, x, -10000, x, 10000); + draw.line(ctx, -10000, y, 10000, y); + + // This code is here due to memory optimization: by not using + // defaults in the constructor, we save a notable amount of memory. + var xMin = this.xMin || 0; + var yMin = this.yMin || 0; + var xMax = this.xMax || 0; + var yMax = this.yMax || 0; + var advanceWidth = this.advanceWidth || 0; + + // Draw the glyph box + ctx.strokeStyle = 'blue'; + draw.line(ctx, x + (xMin * scale), -10000, x + (xMin * scale), 10000); + draw.line(ctx, x + (xMax * scale), -10000, x + (xMax * scale), 10000); + draw.line(ctx, -10000, y + (-yMin * scale), 10000, y + (-yMin * scale)); + draw.line(ctx, -10000, y + (-yMax * scale), 10000, y + (-yMax * scale)); + + // Draw the advance width + ctx.strokeStyle = 'green'; + draw.line(ctx, x + (advanceWidth * scale), -10000, x + (advanceWidth * scale), 10000); +}; + +// The GlyphSet object + +// Define a property on the glyph that depends on the path being loaded. +function defineDependentProperty(glyph, externalName, internalName) { + Object.defineProperty(glyph, externalName, { + get: function() { + // Request the path property to make sure the path is loaded. + glyph.path; // jshint ignore:line + return glyph[internalName]; + }, + set: function(newValue) { + glyph[internalName] = newValue; + }, + enumerable: true, + configurable: true + }); +} + +/** + * A GlyphSet represents all glyphs available in the font, but modelled using + * a deferred glyph loader, for retrieving glyphs only once they are absolutely + * necessary, to keep the memory footprint down. + * @exports opentype.GlyphSet + * @class + * @param {opentype.Font} + * @param {Array} + */ +function GlyphSet(font, glyphs) { + this.font = font; + this.glyphs = {}; + if (Array.isArray(glyphs)) { + for (var i = 0; i < glyphs.length; i++) { + var glyph = glyphs[i]; + glyph.path.unitsPerEm = font.unitsPerEm; + this.glyphs[i] = glyph; + } + } + + this.length = (glyphs && glyphs.length) || 0; +} + +/** + * @param {number} index + * @return {opentype.Glyph} + */ +GlyphSet.prototype.get = function(index) { + // this.glyphs[index] is 'undefined' when low memory mode is on. glyph is pushed on request only. + if (this.glyphs[index] === undefined) { + this.font._push(index); + if (typeof this.glyphs[index] === 'function') { + this.glyphs[index] = this.glyphs[index](); + } + + var glyph = this.glyphs[index]; + var unicodeObj = this.font._IndexToUnicodeMap[index]; + + if (unicodeObj) { + for (var j = 0; j < unicodeObj.unicodes.length; j++) + { glyph.addUnicode(unicodeObj.unicodes[j]); } + } + + if (this.font.cffEncoding) { + if (this.font.isCIDFont) { + glyph.name = 'gid' + index; + } else { + glyph.name = this.font.cffEncoding.charset[index]; + } + } else if (this.font.glyphNames.names) { + glyph.name = this.font.glyphNames.glyphIndexToName(index); + } + + this.glyphs[index].advanceWidth = this.font._hmtxTableData[index].advanceWidth; + this.glyphs[index].leftSideBearing = this.font._hmtxTableData[index].leftSideBearing; + } else { + if (typeof this.glyphs[index] === 'function') { + this.glyphs[index] = this.glyphs[index](); + } + } + + return this.glyphs[index]; +}; + +/** + * @param {number} index + * @param {Object} + */ +GlyphSet.prototype.push = function(index, loader) { + this.glyphs[index] = loader; + this.length++; +}; + +/** + * @alias opentype.glyphLoader + * @param {opentype.Font} font + * @param {number} index + * @return {opentype.Glyph} + */ +function glyphLoader(font, index) { + return new Glyph({index: index, font: font}); +} + +/** + * Generate a stub glyph that can be filled with all metadata *except* + * the "points" and "path" properties, which must be loaded only once + * the glyph's path is actually requested for text shaping. + * @alias opentype.ttfGlyphLoader + * @param {opentype.Font} font + * @param {number} index + * @param {Function} parseGlyph + * @param {Object} data + * @param {number} position + * @param {Function} buildPath + * @return {opentype.Glyph} + */ +function ttfGlyphLoader(font, index, parseGlyph, data, position, buildPath) { + return function() { + var glyph = new Glyph({index: index, font: font}); + + glyph.path = function() { + parseGlyph(glyph, data, position); + var path = buildPath(font.glyphs, glyph); + path.unitsPerEm = font.unitsPerEm; + return path; + }; + + defineDependentProperty(glyph, 'xMin', '_xMin'); + defineDependentProperty(glyph, 'xMax', '_xMax'); + defineDependentProperty(glyph, 'yMin', '_yMin'); + defineDependentProperty(glyph, 'yMax', '_yMax'); + + return glyph; + }; +} +/** + * @alias opentype.cffGlyphLoader + * @param {opentype.Font} font + * @param {number} index + * @param {Function} parseCFFCharstring + * @param {string} charstring + * @return {opentype.Glyph} + */ +function cffGlyphLoader(font, index, parseCFFCharstring, charstring) { + return function() { + var glyph = new Glyph({index: index, font: font}); + + glyph.path = function() { + var path = parseCFFCharstring(font, glyph, charstring); + path.unitsPerEm = font.unitsPerEm; + return path; + }; + + return glyph; + }; +} + +var glyphset = { GlyphSet: GlyphSet, glyphLoader: glyphLoader, ttfGlyphLoader: ttfGlyphLoader, cffGlyphLoader: cffGlyphLoader }; + +// The `CFF` table contains the glyph outlines in PostScript format. + +// Custom equals function that can also check lists. +function equals(a, b) { + if (a === b) { + return true; + } else if (Array.isArray(a) && Array.isArray(b)) { + if (a.length !== b.length) { + return false; + } + + for (var i = 0; i < a.length; i += 1) { + if (!equals(a[i], b[i])) { + return false; + } + } + + return true; + } else { + return false; + } +} + +// Subroutines are encoded using the negative half of the number space. +// See type 2 chapter 4.7 "Subroutine operators". +function calcCFFSubroutineBias(subrs) { + var bias; + if (subrs.length < 1240) { + bias = 107; + } else if (subrs.length < 33900) { + bias = 1131; + } else { + bias = 32768; + } + + return bias; +} + +// Parse a `CFF` INDEX array. +// An index array consists of a list of offsets, then a list of objects at those offsets. +function parseCFFIndex(data, start, conversionFn) { + var offsets = []; + var objects = []; + var count = parse.getCard16(data, start); + var objectOffset; + var endOffset; + if (count !== 0) { + var offsetSize = parse.getByte(data, start + 2); + objectOffset = start + ((count + 1) * offsetSize) + 2; + var pos = start + 3; + for (var i = 0; i < count + 1; i += 1) { + offsets.push(parse.getOffset(data, pos, offsetSize)); + pos += offsetSize; + } + + // The total size of the index array is 4 header bytes + the value of the last offset. + endOffset = objectOffset + offsets[count]; + } else { + endOffset = start + 2; + } + + for (var i$1 = 0; i$1 < offsets.length - 1; i$1 += 1) { + var value = parse.getBytes(data, objectOffset + offsets[i$1], objectOffset + offsets[i$1 + 1]); + if (conversionFn) { + value = conversionFn(value); + } + + objects.push(value); + } + + return {objects: objects, startOffset: start, endOffset: endOffset}; +} + +function parseCFFIndexLowMemory(data, start) { + var offsets = []; + var count = parse.getCard16(data, start); + var objectOffset; + var endOffset; + if (count !== 0) { + var offsetSize = parse.getByte(data, start + 2); + objectOffset = start + ((count + 1) * offsetSize) + 2; + var pos = start + 3; + for (var i = 0; i < count + 1; i += 1) { + offsets.push(parse.getOffset(data, pos, offsetSize)); + pos += offsetSize; + } + + // The total size of the index array is 4 header bytes + the value of the last offset. + endOffset = objectOffset + offsets[count]; + } else { + endOffset = start + 2; + } + + return {offsets: offsets, startOffset: start, endOffset: endOffset}; +} +function getCffIndexObject(i, offsets, data, start, conversionFn) { + var count = parse.getCard16(data, start); + var objectOffset = 0; + if (count !== 0) { + var offsetSize = parse.getByte(data, start + 2); + objectOffset = start + ((count + 1) * offsetSize) + 2; + } + + var value = parse.getBytes(data, objectOffset + offsets[i], objectOffset + offsets[i + 1]); + if (conversionFn) { + value = conversionFn(value); + } + return value; +} + +// Parse a `CFF` DICT real value. +function parseFloatOperand(parser) { + var s = ''; + var eof = 15; + var lookup = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', 'E', 'E-', null, '-']; + while (true) { + var b = parser.parseByte(); + var n1 = b >> 4; + var n2 = b & 15; + + if (n1 === eof) { + break; + } + + s += lookup[n1]; + + if (n2 === eof) { + break; + } + + s += lookup[n2]; + } + + return parseFloat(s); +} + +// Parse a `CFF` DICT operand. +function parseOperand(parser, b0) { + var b1; + var b2; + var b3; + var b4; + if (b0 === 28) { + b1 = parser.parseByte(); + b2 = parser.parseByte(); + return b1 << 8 | b2; + } + + if (b0 === 29) { + b1 = parser.parseByte(); + b2 = parser.parseByte(); + b3 = parser.parseByte(); + b4 = parser.parseByte(); + return b1 << 24 | b2 << 16 | b3 << 8 | b4; + } + + if (b0 === 30) { + return parseFloatOperand(parser); + } + + if (b0 >= 32 && b0 <= 246) { + return b0 - 139; + } + + if (b0 >= 247 && b0 <= 250) { + b1 = parser.parseByte(); + return (b0 - 247) * 256 + b1 + 108; + } + + if (b0 >= 251 && b0 <= 254) { + b1 = parser.parseByte(); + return -(b0 - 251) * 256 - b1 - 108; + } + + throw new Error('Invalid b0 ' + b0); +} + +// Convert the entries returned by `parseDict` to a proper dictionary. +// If a value is a list of one, it is unpacked. +function entriesToObject(entries) { + var o = {}; + for (var i = 0; i < entries.length; i += 1) { + var key = entries[i][0]; + var values = entries[i][1]; + var value = (void 0); + if (values.length === 1) { + value = values[0]; + } else { + value = values; + } + + if (o.hasOwnProperty(key) && !isNaN(o[key])) { + throw new Error('Object ' + o + ' already has key ' + key); + } + + o[key] = value; + } + + return o; +} + +// Parse a `CFF` DICT object. +// A dictionary contains key-value pairs in a compact tokenized format. +function parseCFFDict(data, start, size) { + start = start !== undefined ? start : 0; + var parser = new parse.Parser(data, start); + var entries = []; + var operands = []; + size = size !== undefined ? size : data.length; + + while (parser.relativeOffset < size) { + var op = parser.parseByte(); + + // The first byte for each dict item distinguishes between operator (key) and operand (value). + // Values <= 21 are operators. + if (op <= 21) { + // Two-byte operators have an initial escape byte of 12. + if (op === 12) { + op = 1200 + parser.parseByte(); + } + + entries.push([op, operands]); + operands = []; + } else { + // Since the operands (values) come before the operators (keys), we store all operands in a list + // until we encounter an operator. + operands.push(parseOperand(parser, op)); + } + } + + return entriesToObject(entries); +} + +// Given a String Index (SID), return the value of the string. +// Strings below index 392 are standard CFF strings and are not encoded in the font. +function getCFFString(strings, index) { + if (index <= 390) { + index = cffStandardStrings[index]; + } else { + index = strings[index - 391]; + } + + return index; +} + +// Interpret a dictionary and return a new dictionary with readable keys and values for missing entries. +// This function takes `meta` which is a list of objects containing `operand`, `name` and `default`. +function interpretDict(dict, meta, strings) { + var newDict = {}; + var value; + + // Because we also want to include missing values, we start out from the meta list + // and lookup values in the dict. + for (var i = 0; i < meta.length; i += 1) { + var m = meta[i]; + + if (Array.isArray(m.type)) { + var values = []; + values.length = m.type.length; + for (var j = 0; j < m.type.length; j++) { + value = dict[m.op] !== undefined ? dict[m.op][j] : undefined; + if (value === undefined) { + value = m.value !== undefined && m.value[j] !== undefined ? m.value[j] : null; + } + if (m.type[j] === 'SID') { + value = getCFFString(strings, value); + } + values[j] = value; + } + newDict[m.name] = values; + } else { + value = dict[m.op]; + if (value === undefined) { + value = m.value !== undefined ? m.value : null; + } + + if (m.type === 'SID') { + value = getCFFString(strings, value); + } + newDict[m.name] = value; + } + } + + return newDict; +} + +// Parse the CFF header. +function parseCFFHeader(data, start) { + var header = {}; + header.formatMajor = parse.getCard8(data, start); + header.formatMinor = parse.getCard8(data, start + 1); + header.size = parse.getCard8(data, start + 2); + header.offsetSize = parse.getCard8(data, start + 3); + header.startOffset = start; + header.endOffset = start + 4; + return header; +} + +var TOP_DICT_META = [ + {name: 'version', op: 0, type: 'SID'}, + {name: 'notice', op: 1, type: 'SID'}, + {name: 'copyright', op: 1200, type: 'SID'}, + {name: 'fullName', op: 2, type: 'SID'}, + {name: 'familyName', op: 3, type: 'SID'}, + {name: 'weight', op: 4, type: 'SID'}, + {name: 'isFixedPitch', op: 1201, type: 'number', value: 0}, + {name: 'italicAngle', op: 1202, type: 'number', value: 0}, + {name: 'underlinePosition', op: 1203, type: 'number', value: -100}, + {name: 'underlineThickness', op: 1204, type: 'number', value: 50}, + {name: 'paintType', op: 1205, type: 'number', value: 0}, + {name: 'charstringType', op: 1206, type: 'number', value: 2}, + { + name: 'fontMatrix', + op: 1207, + type: ['real', 'real', 'real', 'real', 'real', 'real'], + value: [0.001, 0, 0, 0.001, 0, 0] + }, + {name: 'uniqueId', op: 13, type: 'number'}, + {name: 'fontBBox', op: 5, type: ['number', 'number', 'number', 'number'], value: [0, 0, 0, 0]}, + {name: 'strokeWidth', op: 1208, type: 'number', value: 0}, + {name: 'xuid', op: 14, type: [], value: null}, + {name: 'charset', op: 15, type: 'offset', value: 0}, + {name: 'encoding', op: 16, type: 'offset', value: 0}, + {name: 'charStrings', op: 17, type: 'offset', value: 0}, + {name: 'private', op: 18, type: ['number', 'offset'], value: [0, 0]}, + {name: 'ros', op: 1230, type: ['SID', 'SID', 'number']}, + {name: 'cidFontVersion', op: 1231, type: 'number', value: 0}, + {name: 'cidFontRevision', op: 1232, type: 'number', value: 0}, + {name: 'cidFontType', op: 1233, type: 'number', value: 0}, + {name: 'cidCount', op: 1234, type: 'number', value: 8720}, + {name: 'uidBase', op: 1235, type: 'number'}, + {name: 'fdArray', op: 1236, type: 'offset'}, + {name: 'fdSelect', op: 1237, type: 'offset'}, + {name: 'fontName', op: 1238, type: 'SID'} +]; + +var PRIVATE_DICT_META = [ + {name: 'subrs', op: 19, type: 'offset', value: 0}, + {name: 'defaultWidthX', op: 20, type: 'number', value: 0}, + {name: 'nominalWidthX', op: 21, type: 'number', value: 0} +]; + +// Parse the CFF top dictionary. A CFF table can contain multiple fonts, each with their own top dictionary. +// The top dictionary contains the essential metadata for the font, together with the private dictionary. +function parseCFFTopDict(data, strings) { + var dict = parseCFFDict(data, 0, data.byteLength); + return interpretDict(dict, TOP_DICT_META, strings); +} + +// Parse the CFF private dictionary. We don't fully parse out all the values, only the ones we need. +function parseCFFPrivateDict(data, start, size, strings) { + var dict = parseCFFDict(data, start, size); + return interpretDict(dict, PRIVATE_DICT_META, strings); +} + +// Returns a list of "Top DICT"s found using an INDEX list. +// Used to read both the usual high-level Top DICTs and also the FDArray +// discovered inside CID-keyed fonts. When a Top DICT has a reference to +// a Private DICT that is read and saved into the Top DICT. +// +// In addition to the expected/optional values as outlined in TOP_DICT_META +// the following values might be saved into the Top DICT. +// +// _subrs [] array of local CFF subroutines from Private DICT +// _subrsBias bias value computed from number of subroutines +// (see calcCFFSubroutineBias() and parseCFFCharstring()) +// _defaultWidthX default widths for CFF characters +// _nominalWidthX bias added to width embedded within glyph description +// +// _privateDict saved copy of parsed Private DICT from Top DICT +function gatherCFFTopDicts(data, start, cffIndex, strings) { + var topDictArray = []; + for (var iTopDict = 0; iTopDict < cffIndex.length; iTopDict += 1) { + var topDictData = new DataView(new Uint8Array(cffIndex[iTopDict]).buffer); + var topDict = parseCFFTopDict(topDictData, strings); + topDict._subrs = []; + topDict._subrsBias = 0; + topDict._defaultWidthX = 0; + topDict._nominalWidthX = 0; + var privateSize = topDict.private[0]; + var privateOffset = topDict.private[1]; + if (privateSize !== 0 && privateOffset !== 0) { + var privateDict = parseCFFPrivateDict(data, privateOffset + start, privateSize, strings); + topDict._defaultWidthX = privateDict.defaultWidthX; + topDict._nominalWidthX = privateDict.nominalWidthX; + if (privateDict.subrs !== 0) { + var subrOffset = privateOffset + privateDict.subrs; + var subrIndex = parseCFFIndex(data, subrOffset + start); + topDict._subrs = subrIndex.objects; + topDict._subrsBias = calcCFFSubroutineBias(topDict._subrs); + } + topDict._privateDict = privateDict; + } + topDictArray.push(topDict); + } + return topDictArray; +} + +// Parse the CFF charset table, which contains internal names for all the glyphs. +// This function will return a list of glyph names. +// See Adobe TN #5176 chapter 13, "Charsets". +function parseCFFCharset(data, start, nGlyphs, strings) { + var sid; + var count; + var parser = new parse.Parser(data, start); + + // The .notdef glyph is not included, so subtract 1. + nGlyphs -= 1; + var charset = ['.notdef']; + + var format = parser.parseCard8(); + if (format === 0) { + for (var i = 0; i < nGlyphs; i += 1) { + sid = parser.parseSID(); + charset.push(getCFFString(strings, sid)); + } + } else if (format === 1) { + while (charset.length <= nGlyphs) { + sid = parser.parseSID(); + count = parser.parseCard8(); + for (var i$1 = 0; i$1 <= count; i$1 += 1) { + charset.push(getCFFString(strings, sid)); + sid += 1; + } + } + } else if (format === 2) { + while (charset.length <= nGlyphs) { + sid = parser.parseSID(); + count = parser.parseCard16(); + for (var i$2 = 0; i$2 <= count; i$2 += 1) { + charset.push(getCFFString(strings, sid)); + sid += 1; + } + } + } else { + throw new Error('Unknown charset format ' + format); + } + + return charset; +} + +// Parse the CFF encoding data. Only one encoding can be specified per font. +// See Adobe TN #5176 chapter 12, "Encodings". +function parseCFFEncoding(data, start, charset) { + var code; + var enc = {}; + var parser = new parse.Parser(data, start); + var format = parser.parseCard8(); + if (format === 0) { + var nCodes = parser.parseCard8(); + for (var i = 0; i < nCodes; i += 1) { + code = parser.parseCard8(); + enc[code] = i; + } + } else if (format === 1) { + var nRanges = parser.parseCard8(); + code = 1; + for (var i$1 = 0; i$1 < nRanges; i$1 += 1) { + var first = parser.parseCard8(); + var nLeft = parser.parseCard8(); + for (var j = first; j <= first + nLeft; j += 1) { + enc[j] = code; + code += 1; + } + } + } else { + throw new Error('Unknown encoding format ' + format); + } + + return new CffEncoding(enc, charset); +} + +// Take in charstring code and return a Glyph object. +// The encoding is described in the Type 2 Charstring Format +// https://www.microsoft.com/typography/OTSPEC/charstr2.htm +function parseCFFCharstring(font, glyph, code) { + var c1x; + var c1y; + var c2x; + var c2y; + var p = new Path(); + var stack = []; + var nStems = 0; + var haveWidth = false; + var open = false; + var x = 0; + var y = 0; + var subrs; + var subrsBias; + var defaultWidthX; + var nominalWidthX; + if (font.isCIDFont) { + var fdIndex = font.tables.cff.topDict._fdSelect[glyph.index]; + var fdDict = font.tables.cff.topDict._fdArray[fdIndex]; + subrs = fdDict._subrs; + subrsBias = fdDict._subrsBias; + defaultWidthX = fdDict._defaultWidthX; + nominalWidthX = fdDict._nominalWidthX; + } else { + subrs = font.tables.cff.topDict._subrs; + subrsBias = font.tables.cff.topDict._subrsBias; + defaultWidthX = font.tables.cff.topDict._defaultWidthX; + nominalWidthX = font.tables.cff.topDict._nominalWidthX; + } + var width = defaultWidthX; + + function newContour(x, y) { + if (open) { + p.closePath(); + } + + p.moveTo(x, y); + open = true; + } + + function parseStems() { + var hasWidthArg; + + // The number of stem operators on the stack is always even. + // If the value is uneven, that means a width is specified. + hasWidthArg = stack.length % 2 !== 0; + if (hasWidthArg && !haveWidth) { + width = stack.shift() + nominalWidthX; + } + + nStems += stack.length >> 1; + stack.length = 0; + haveWidth = true; + } + + function parse(code) { + var b1; + var b2; + var b3; + var b4; + var codeIndex; + var subrCode; + var jpx; + var jpy; + var c3x; + var c3y; + var c4x; + var c4y; + + var i = 0; + while (i < code.length) { + var v = code[i]; + i += 1; + switch (v) { + case 1: // hstem + parseStems(); + break; + case 3: // vstem + parseStems(); + break; + case 4: // vmoveto + if (stack.length > 1 && !haveWidth) { + width = stack.shift() + nominalWidthX; + haveWidth = true; + } + + y += stack.pop(); + newContour(x, y); + break; + case 5: // rlineto + while (stack.length > 0) { + x += stack.shift(); + y += stack.shift(); + p.lineTo(x, y); + } + + break; + case 6: // hlineto + while (stack.length > 0) { + x += stack.shift(); + p.lineTo(x, y); + if (stack.length === 0) { + break; + } + + y += stack.shift(); + p.lineTo(x, y); + } + + break; + case 7: // vlineto + while (stack.length > 0) { + y += stack.shift(); + p.lineTo(x, y); + if (stack.length === 0) { + break; + } + + x += stack.shift(); + p.lineTo(x, y); + } + + break; + case 8: // rrcurveto + while (stack.length > 0) { + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + p.curveTo(c1x, c1y, c2x, c2y, x, y); + } + + break; + case 10: // callsubr + codeIndex = stack.pop() + subrsBias; + subrCode = subrs[codeIndex]; + if (subrCode) { + parse(subrCode); + } + + break; + case 11: // return + return; + case 12: // flex operators + v = code[i]; + i += 1; + switch (v) { + case 35: // flex + // |- dx1 dy1 dx2 dy2 dx3 dy3 dx4 dy4 dx5 dy5 dx6 dy6 fd flex (12 35) |- + c1x = x + stack.shift(); // dx1 + c1y = y + stack.shift(); // dy1 + c2x = c1x + stack.shift(); // dx2 + c2y = c1y + stack.shift(); // dy2 + jpx = c2x + stack.shift(); // dx3 + jpy = c2y + stack.shift(); // dy3 + c3x = jpx + stack.shift(); // dx4 + c3y = jpy + stack.shift(); // dy4 + c4x = c3x + stack.shift(); // dx5 + c4y = c3y + stack.shift(); // dy5 + x = c4x + stack.shift(); // dx6 + y = c4y + stack.shift(); // dy6 + stack.shift(); // flex depth + p.curveTo(c1x, c1y, c2x, c2y, jpx, jpy); + p.curveTo(c3x, c3y, c4x, c4y, x, y); + break; + case 34: // hflex + // |- dx1 dx2 dy2 dx3 dx4 dx5 dx6 hflex (12 34) |- + c1x = x + stack.shift(); // dx1 + c1y = y; // dy1 + c2x = c1x + stack.shift(); // dx2 + c2y = c1y + stack.shift(); // dy2 + jpx = c2x + stack.shift(); // dx3 + jpy = c2y; // dy3 + c3x = jpx + stack.shift(); // dx4 + c3y = c2y; // dy4 + c4x = c3x + stack.shift(); // dx5 + c4y = y; // dy5 + x = c4x + stack.shift(); // dx6 + p.curveTo(c1x, c1y, c2x, c2y, jpx, jpy); + p.curveTo(c3x, c3y, c4x, c4y, x, y); + break; + case 36: // hflex1 + // |- dx1 dy1 dx2 dy2 dx3 dx4 dx5 dy5 dx6 hflex1 (12 36) |- + c1x = x + stack.shift(); // dx1 + c1y = y + stack.shift(); // dy1 + c2x = c1x + stack.shift(); // dx2 + c2y = c1y + stack.shift(); // dy2 + jpx = c2x + stack.shift(); // dx3 + jpy = c2y; // dy3 + c3x = jpx + stack.shift(); // dx4 + c3y = c2y; // dy4 + c4x = c3x + stack.shift(); // dx5 + c4y = c3y + stack.shift(); // dy5 + x = c4x + stack.shift(); // dx6 + p.curveTo(c1x, c1y, c2x, c2y, jpx, jpy); + p.curveTo(c3x, c3y, c4x, c4y, x, y); + break; + case 37: // flex1 + // |- dx1 dy1 dx2 dy2 dx3 dy3 dx4 dy4 dx5 dy5 d6 flex1 (12 37) |- + c1x = x + stack.shift(); // dx1 + c1y = y + stack.shift(); // dy1 + c2x = c1x + stack.shift(); // dx2 + c2y = c1y + stack.shift(); // dy2 + jpx = c2x + stack.shift(); // dx3 + jpy = c2y + stack.shift(); // dy3 + c3x = jpx + stack.shift(); // dx4 + c3y = jpy + stack.shift(); // dy4 + c4x = c3x + stack.shift(); // dx5 + c4y = c3y + stack.shift(); // dy5 + if (Math.abs(c4x - x) > Math.abs(c4y - y)) { + x = c4x + stack.shift(); + } else { + y = c4y + stack.shift(); + } + + p.curveTo(c1x, c1y, c2x, c2y, jpx, jpy); + p.curveTo(c3x, c3y, c4x, c4y, x, y); + break; + default: + console.log('Glyph ' + glyph.index + ': unknown operator ' + 1200 + v); + stack.length = 0; + } + break; + case 14: // endchar + if (stack.length > 0 && !haveWidth) { + width = stack.shift() + nominalWidthX; + haveWidth = true; + } + + if (open) { + p.closePath(); + open = false; + } + + break; + case 18: // hstemhm + parseStems(); + break; + case 19: // hintmask + case 20: // cntrmask + parseStems(); + i += (nStems + 7) >> 3; + break; + case 21: // rmoveto + if (stack.length > 2 && !haveWidth) { + width = stack.shift() + nominalWidthX; + haveWidth = true; + } + + y += stack.pop(); + x += stack.pop(); + newContour(x, y); + break; + case 22: // hmoveto + if (stack.length > 1 && !haveWidth) { + width = stack.shift() + nominalWidthX; + haveWidth = true; + } + + x += stack.pop(); + newContour(x, y); + break; + case 23: // vstemhm + parseStems(); + break; + case 24: // rcurveline + while (stack.length > 2) { + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + p.curveTo(c1x, c1y, c2x, c2y, x, y); + } + + x += stack.shift(); + y += stack.shift(); + p.lineTo(x, y); + break; + case 25: // rlinecurve + while (stack.length > 6) { + x += stack.shift(); + y += stack.shift(); + p.lineTo(x, y); + } + + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + p.curveTo(c1x, c1y, c2x, c2y, x, y); + break; + case 26: // vvcurveto + if (stack.length % 2) { + x += stack.shift(); + } + + while (stack.length > 0) { + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x; + y = c2y + stack.shift(); + p.curveTo(c1x, c1y, c2x, c2y, x, y); + } + + break; + case 27: // hhcurveto + if (stack.length % 2) { + y += stack.shift(); + } + + while (stack.length > 0) { + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y; + p.curveTo(c1x, c1y, c2x, c2y, x, y); + } + + break; + case 28: // shortint + b1 = code[i]; + b2 = code[i + 1]; + stack.push(((b1 << 24) | (b2 << 16)) >> 16); + i += 2; + break; + case 29: // callgsubr + codeIndex = stack.pop() + font.gsubrsBias; + subrCode = font.gsubrs[codeIndex]; + if (subrCode) { + parse(subrCode); + } + + break; + case 30: // vhcurveto + while (stack.length > 0) { + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + (stack.length === 1 ? stack.shift() : 0); + p.curveTo(c1x, c1y, c2x, c2y, x, y); + if (stack.length === 0) { + break; + } + + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + y = c2y + stack.shift(); + x = c2x + (stack.length === 1 ? stack.shift() : 0); + p.curveTo(c1x, c1y, c2x, c2y, x, y); + } + + break; + case 31: // hvcurveto + while (stack.length > 0) { + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + y = c2y + stack.shift(); + x = c2x + (stack.length === 1 ? stack.shift() : 0); + p.curveTo(c1x, c1y, c2x, c2y, x, y); + if (stack.length === 0) { + break; + } + + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + (stack.length === 1 ? stack.shift() : 0); + p.curveTo(c1x, c1y, c2x, c2y, x, y); + } + + break; + default: + if (v < 32) { + console.log('Glyph ' + glyph.index + ': unknown operator ' + v); + } else if (v < 247) { + stack.push(v - 139); + } else if (v < 251) { + b1 = code[i]; + i += 1; + stack.push((v - 247) * 256 + b1 + 108); + } else if (v < 255) { + b1 = code[i]; + i += 1; + stack.push(-(v - 251) * 256 - b1 - 108); + } else { + b1 = code[i]; + b2 = code[i + 1]; + b3 = code[i + 2]; + b4 = code[i + 3]; + i += 4; + stack.push(((b1 << 24) | (b2 << 16) | (b3 << 8) | b4) / 65536); + } + } + } + } + + parse(code); + + glyph.advanceWidth = width; + return p; +} + +function parseCFFFDSelect(data, start, nGlyphs, fdArrayCount) { + var fdSelect = []; + var fdIndex; + var parser = new parse.Parser(data, start); + var format = parser.parseCard8(); + if (format === 0) { + // Simple list of nGlyphs elements + for (var iGid = 0; iGid < nGlyphs; iGid++) { + fdIndex = parser.parseCard8(); + if (fdIndex >= fdArrayCount) { + throw new Error('CFF table CID Font FDSelect has bad FD index value ' + fdIndex + ' (FD count ' + fdArrayCount + ')'); + } + fdSelect.push(fdIndex); + } + } else if (format === 3) { + // Ranges + var nRanges = parser.parseCard16(); + var first = parser.parseCard16(); + if (first !== 0) { + throw new Error('CFF Table CID Font FDSelect format 3 range has bad initial GID ' + first); + } + var next; + for (var iRange = 0; iRange < nRanges; iRange++) { + fdIndex = parser.parseCard8(); + next = parser.parseCard16(); + if (fdIndex >= fdArrayCount) { + throw new Error('CFF table CID Font FDSelect has bad FD index value ' + fdIndex + ' (FD count ' + fdArrayCount + ')'); + } + if (next > nGlyphs) { + throw new Error('CFF Table CID Font FDSelect format 3 range has bad GID ' + next); + } + for (; first < next; first++) { + fdSelect.push(fdIndex); + } + first = next; + } + if (next !== nGlyphs) { + throw new Error('CFF Table CID Font FDSelect format 3 range has bad final GID ' + next); + } + } else { + throw new Error('CFF Table CID Font FDSelect table has unsupported format ' + format); + } + return fdSelect; +} + +// Parse the `CFF` table, which contains the glyph outlines in PostScript format. +function parseCFFTable(data, start, font, opt) { + font.tables.cff = {}; + var header = parseCFFHeader(data, start); + var nameIndex = parseCFFIndex(data, header.endOffset, parse.bytesToString); + var topDictIndex = parseCFFIndex(data, nameIndex.endOffset); + var stringIndex = parseCFFIndex(data, topDictIndex.endOffset, parse.bytesToString); + var globalSubrIndex = parseCFFIndex(data, stringIndex.endOffset); + font.gsubrs = globalSubrIndex.objects; + font.gsubrsBias = calcCFFSubroutineBias(font.gsubrs); + + var topDictArray = gatherCFFTopDicts(data, start, topDictIndex.objects, stringIndex.objects); + if (topDictArray.length !== 1) { + throw new Error('CFF table has too many fonts in \'FontSet\' - count of fonts NameIndex.length = ' + topDictArray.length); + } + + var topDict = topDictArray[0]; + font.tables.cff.topDict = topDict; + + if (topDict._privateDict) { + font.defaultWidthX = topDict._privateDict.defaultWidthX; + font.nominalWidthX = topDict._privateDict.nominalWidthX; + } + + if (topDict.ros[0] !== undefined && topDict.ros[1] !== undefined) { + font.isCIDFont = true; + } + + if (font.isCIDFont) { + var fdArrayOffset = topDict.fdArray; + var fdSelectOffset = topDict.fdSelect; + if (fdArrayOffset === 0 || fdSelectOffset === 0) { + throw new Error('Font is marked as a CID font, but FDArray and/or FDSelect information is missing'); + } + fdArrayOffset += start; + var fdArrayIndex = parseCFFIndex(data, fdArrayOffset); + var fdArray = gatherCFFTopDicts(data, start, fdArrayIndex.objects, stringIndex.objects); + topDict._fdArray = fdArray; + fdSelectOffset += start; + topDict._fdSelect = parseCFFFDSelect(data, fdSelectOffset, font.numGlyphs, fdArray.length); + } + + var privateDictOffset = start + topDict.private[1]; + var privateDict = parseCFFPrivateDict(data, privateDictOffset, topDict.private[0], stringIndex.objects); + font.defaultWidthX = privateDict.defaultWidthX; + font.nominalWidthX = privateDict.nominalWidthX; + + if (privateDict.subrs !== 0) { + var subrOffset = privateDictOffset + privateDict.subrs; + var subrIndex = parseCFFIndex(data, subrOffset); + font.subrs = subrIndex.objects; + font.subrsBias = calcCFFSubroutineBias(font.subrs); + } else { + font.subrs = []; + font.subrsBias = 0; + } + + // Offsets in the top dict are relative to the beginning of the CFF data, so add the CFF start offset. + var charStringsIndex; + if (opt.lowMemory) { + charStringsIndex = parseCFFIndexLowMemory(data, start + topDict.charStrings); + font.nGlyphs = charStringsIndex.offsets.length; + } else { + charStringsIndex = parseCFFIndex(data, start + topDict.charStrings); + font.nGlyphs = charStringsIndex.objects.length; + } + + var charset = parseCFFCharset(data, start + topDict.charset, font.nGlyphs, stringIndex.objects); + if (topDict.encoding === 0) { + // Standard encoding + font.cffEncoding = new CffEncoding(cffStandardEncoding, charset); + } else if (topDict.encoding === 1) { + // Expert encoding + font.cffEncoding = new CffEncoding(cffExpertEncoding, charset); + } else { + font.cffEncoding = parseCFFEncoding(data, start + topDict.encoding, charset); + } + + // Prefer the CMAP encoding to the CFF encoding. + font.encoding = font.encoding || font.cffEncoding; + + font.glyphs = new glyphset.GlyphSet(font); + if (opt.lowMemory) { + font._push = function(i) { + var charString = getCffIndexObject(i, charStringsIndex.offsets, data, start + topDict.charStrings); + font.glyphs.push(i, glyphset.cffGlyphLoader(font, i, parseCFFCharstring, charString)); + }; + } else { + for (var i = 0; i < font.nGlyphs; i += 1) { + var charString = charStringsIndex.objects[i]; + font.glyphs.push(i, glyphset.cffGlyphLoader(font, i, parseCFFCharstring, charString)); + } + } +} + +// Convert a string to a String ID (SID). +// The list of strings is modified in place. +function encodeString(s, strings) { + var sid; + + // Is the string in the CFF standard strings? + var i = cffStandardStrings.indexOf(s); + if (i >= 0) { + sid = i; + } + + // Is the string already in the string index? + i = strings.indexOf(s); + if (i >= 0) { + sid = i + cffStandardStrings.length; + } else { + sid = cffStandardStrings.length + strings.length; + strings.push(s); + } + + return sid; +} + +function makeHeader() { + return new table.Record('Header', [ + {name: 'major', type: 'Card8', value: 1}, + {name: 'minor', type: 'Card8', value: 0}, + {name: 'hdrSize', type: 'Card8', value: 4}, + {name: 'major', type: 'Card8', value: 1} + ]); +} + +function makeNameIndex(fontNames) { + var t = new table.Record('Name INDEX', [ + {name: 'names', type: 'INDEX', value: []} + ]); + t.names = []; + for (var i = 0; i < fontNames.length; i += 1) { + t.names.push({name: 'name_' + i, type: 'NAME', value: fontNames[i]}); + } + + return t; +} + +// Given a dictionary's metadata, create a DICT structure. +function makeDict(meta, attrs, strings) { + var m = {}; + for (var i = 0; i < meta.length; i += 1) { + var entry = meta[i]; + var value = attrs[entry.name]; + if (value !== undefined && !equals(value, entry.value)) { + if (entry.type === 'SID') { + value = encodeString(value, strings); + } + + m[entry.op] = {name: entry.name, type: entry.type, value: value}; + } + } + + return m; +} + +// The Top DICT houses the global font attributes. +function makeTopDict(attrs, strings) { + var t = new table.Record('Top DICT', [ + {name: 'dict', type: 'DICT', value: {}} + ]); + t.dict = makeDict(TOP_DICT_META, attrs, strings); + return t; +} + +function makeTopDictIndex(topDict) { + var t = new table.Record('Top DICT INDEX', [ + {name: 'topDicts', type: 'INDEX', value: []} + ]); + t.topDicts = [{name: 'topDict_0', type: 'TABLE', value: topDict}]; + return t; +} + +function makeStringIndex(strings) { + var t = new table.Record('String INDEX', [ + {name: 'strings', type: 'INDEX', value: []} + ]); + t.strings = []; + for (var i = 0; i < strings.length; i += 1) { + t.strings.push({name: 'string_' + i, type: 'STRING', value: strings[i]}); + } + + return t; +} + +function makeGlobalSubrIndex() { + // Currently we don't use subroutines. + return new table.Record('Global Subr INDEX', [ + {name: 'subrs', type: 'INDEX', value: []} + ]); +} + +function makeCharsets(glyphNames, strings) { + var t = new table.Record('Charsets', [ + {name: 'format', type: 'Card8', value: 0} + ]); + for (var i = 0; i < glyphNames.length; i += 1) { + var glyphName = glyphNames[i]; + var glyphSID = encodeString(glyphName, strings); + t.fields.push({name: 'glyph_' + i, type: 'SID', value: glyphSID}); + } + + return t; +} + +function glyphToOps(glyph) { + var ops = []; + var path = glyph.path; + ops.push({name: 'width', type: 'NUMBER', value: glyph.advanceWidth}); + var x = 0; + var y = 0; + for (var i = 0; i < path.commands.length; i += 1) { + var dx = (void 0); + var dy = (void 0); + var cmd = path.commands[i]; + if (cmd.type === 'Q') { + // CFF only supports bézier curves, so convert the quad to a bézier. + var _13 = 1 / 3; + var _23 = 2 / 3; + + // We're going to create a new command so we don't change the original path. + // Since all coordinates are relative, we round() them ASAP to avoid propagating errors. + cmd = { + type: 'C', + x: cmd.x, + y: cmd.y, + x1: Math.round(_13 * x + _23 * cmd.x1), + y1: Math.round(_13 * y + _23 * cmd.y1), + x2: Math.round(_13 * cmd.x + _23 * cmd.x1), + y2: Math.round(_13 * cmd.y + _23 * cmd.y1) + }; + } + + if (cmd.type === 'M') { + dx = Math.round(cmd.x - x); + dy = Math.round(cmd.y - y); + ops.push({name: 'dx', type: 'NUMBER', value: dx}); + ops.push({name: 'dy', type: 'NUMBER', value: dy}); + ops.push({name: 'rmoveto', type: 'OP', value: 21}); + x = Math.round(cmd.x); + y = Math.round(cmd.y); + } else if (cmd.type === 'L') { + dx = Math.round(cmd.x - x); + dy = Math.round(cmd.y - y); + ops.push({name: 'dx', type: 'NUMBER', value: dx}); + ops.push({name: 'dy', type: 'NUMBER', value: dy}); + ops.push({name: 'rlineto', type: 'OP', value: 5}); + x = Math.round(cmd.x); + y = Math.round(cmd.y); + } else if (cmd.type === 'C') { + var dx1 = Math.round(cmd.x1 - x); + var dy1 = Math.round(cmd.y1 - y); + var dx2 = Math.round(cmd.x2 - cmd.x1); + var dy2 = Math.round(cmd.y2 - cmd.y1); + dx = Math.round(cmd.x - cmd.x2); + dy = Math.round(cmd.y - cmd.y2); + ops.push({name: 'dx1', type: 'NUMBER', value: dx1}); + ops.push({name: 'dy1', type: 'NUMBER', value: dy1}); + ops.push({name: 'dx2', type: 'NUMBER', value: dx2}); + ops.push({name: 'dy2', type: 'NUMBER', value: dy2}); + ops.push({name: 'dx', type: 'NUMBER', value: dx}); + ops.push({name: 'dy', type: 'NUMBER', value: dy}); + ops.push({name: 'rrcurveto', type: 'OP', value: 8}); + x = Math.round(cmd.x); + y = Math.round(cmd.y); + } + + // Contours are closed automatically. + } + + ops.push({name: 'endchar', type: 'OP', value: 14}); + return ops; +} + +function makeCharStringsIndex(glyphs) { + var t = new table.Record('CharStrings INDEX', [ + {name: 'charStrings', type: 'INDEX', value: []} + ]); + + for (var i = 0; i < glyphs.length; i += 1) { + var glyph = glyphs.get(i); + var ops = glyphToOps(glyph); + t.charStrings.push({name: glyph.name, type: 'CHARSTRING', value: ops}); + } + + return t; +} + +function makePrivateDict(attrs, strings) { + var t = new table.Record('Private DICT', [ + {name: 'dict', type: 'DICT', value: {}} + ]); + t.dict = makeDict(PRIVATE_DICT_META, attrs, strings); + return t; +} + +function makeCFFTable(glyphs, options) { + var t = new table.Table('CFF ', [ + {name: 'header', type: 'RECORD'}, + {name: 'nameIndex', type: 'RECORD'}, + {name: 'topDictIndex', type: 'RECORD'}, + {name: 'stringIndex', type: 'RECORD'}, + {name: 'globalSubrIndex', type: 'RECORD'}, + {name: 'charsets', type: 'RECORD'}, + {name: 'charStringsIndex', type: 'RECORD'}, + {name: 'privateDict', type: 'RECORD'} + ]); + + var fontScale = 1 / options.unitsPerEm; + // We use non-zero values for the offsets so that the DICT encodes them. + // This is important because the size of the Top DICT plays a role in offset calculation, + // and the size shouldn't change after we've written correct offsets. + var attrs = { + version: options.version, + fullName: options.fullName, + familyName: options.familyName, + weight: options.weightName, + fontBBox: options.fontBBox || [0, 0, 0, 0], + fontMatrix: [fontScale, 0, 0, fontScale, 0, 0], + charset: 999, + encoding: 0, + charStrings: 999, + private: [0, 999] + }; + + var privateAttrs = {}; + + var glyphNames = []; + var glyph; + + // Skip first glyph (.notdef) + for (var i = 1; i < glyphs.length; i += 1) { + glyph = glyphs.get(i); + glyphNames.push(glyph.name); + } + + var strings = []; + + t.header = makeHeader(); + t.nameIndex = makeNameIndex([options.postScriptName]); + var topDict = makeTopDict(attrs, strings); + t.topDictIndex = makeTopDictIndex(topDict); + t.globalSubrIndex = makeGlobalSubrIndex(); + t.charsets = makeCharsets(glyphNames, strings); + t.charStringsIndex = makeCharStringsIndex(glyphs); + t.privateDict = makePrivateDict(privateAttrs, strings); + + // Needs to come at the end, to encode all custom strings used in the font. + t.stringIndex = makeStringIndex(strings); + + var startOffset = t.header.sizeOf() + + t.nameIndex.sizeOf() + + t.topDictIndex.sizeOf() + + t.stringIndex.sizeOf() + + t.globalSubrIndex.sizeOf(); + attrs.charset = startOffset; + + // We use the CFF standard encoding; proper encoding will be handled in cmap. + attrs.encoding = 0; + attrs.charStrings = attrs.charset + t.charsets.sizeOf(); + attrs.private[1] = attrs.charStrings + t.charStringsIndex.sizeOf(); + + // Recreate the Top DICT INDEX with the correct offsets. + topDict = makeTopDict(attrs, strings); + t.topDictIndex = makeTopDictIndex(topDict); + + return t; +} + +var cff = { parse: parseCFFTable, make: makeCFFTable }; + +// The `head` table contains global information about the font. + +// Parse the header `head` table +function parseHeadTable(data, start) { + var head = {}; + var p = new parse.Parser(data, start); + head.version = p.parseVersion(); + head.fontRevision = Math.round(p.parseFixed() * 1000) / 1000; + head.checkSumAdjustment = p.parseULong(); + head.magicNumber = p.parseULong(); + check.argument(head.magicNumber === 0x5F0F3CF5, 'Font header has wrong magic number.'); + head.flags = p.parseUShort(); + head.unitsPerEm = p.parseUShort(); + head.created = p.parseLongDateTime(); + head.modified = p.parseLongDateTime(); + head.xMin = p.parseShort(); + head.yMin = p.parseShort(); + head.xMax = p.parseShort(); + head.yMax = p.parseShort(); + head.macStyle = p.parseUShort(); + head.lowestRecPPEM = p.parseUShort(); + head.fontDirectionHint = p.parseShort(); + head.indexToLocFormat = p.parseShort(); + head.glyphDataFormat = p.parseShort(); + return head; +} + +function makeHeadTable(options) { + // Apple Mac timestamp epoch is 01/01/1904 not 01/01/1970 + var timestamp = Math.round(new Date().getTime() / 1000) + 2082844800; + var createdTimestamp = timestamp; + + if (options.createdTimestamp) { + createdTimestamp = options.createdTimestamp + 2082844800; + } + + return new table.Table('head', [ + {name: 'version', type: 'FIXED', value: 0x00010000}, + {name: 'fontRevision', type: 'FIXED', value: 0x00010000}, + {name: 'checkSumAdjustment', type: 'ULONG', value: 0}, + {name: 'magicNumber', type: 'ULONG', value: 0x5F0F3CF5}, + {name: 'flags', type: 'USHORT', value: 0}, + {name: 'unitsPerEm', type: 'USHORT', value: 1000}, + {name: 'created', type: 'LONGDATETIME', value: createdTimestamp}, + {name: 'modified', type: 'LONGDATETIME', value: timestamp}, + {name: 'xMin', type: 'SHORT', value: 0}, + {name: 'yMin', type: 'SHORT', value: 0}, + {name: 'xMax', type: 'SHORT', value: 0}, + {name: 'yMax', type: 'SHORT', value: 0}, + {name: 'macStyle', type: 'USHORT', value: 0}, + {name: 'lowestRecPPEM', type: 'USHORT', value: 0}, + {name: 'fontDirectionHint', type: 'SHORT', value: 2}, + {name: 'indexToLocFormat', type: 'SHORT', value: 0}, + {name: 'glyphDataFormat', type: 'SHORT', value: 0} + ], options); +} + +var head = { parse: parseHeadTable, make: makeHeadTable }; + +// The `hhea` table contains information for horizontal layout. + +// Parse the horizontal header `hhea` table +function parseHheaTable(data, start) { + var hhea = {}; + var p = new parse.Parser(data, start); + hhea.version = p.parseVersion(); + hhea.ascender = p.parseShort(); + hhea.descender = p.parseShort(); + hhea.lineGap = p.parseShort(); + hhea.advanceWidthMax = p.parseUShort(); + hhea.minLeftSideBearing = p.parseShort(); + hhea.minRightSideBearing = p.parseShort(); + hhea.xMaxExtent = p.parseShort(); + hhea.caretSlopeRise = p.parseShort(); + hhea.caretSlopeRun = p.parseShort(); + hhea.caretOffset = p.parseShort(); + p.relativeOffset += 8; + hhea.metricDataFormat = p.parseShort(); + hhea.numberOfHMetrics = p.parseUShort(); + return hhea; +} + +function makeHheaTable(options) { + return new table.Table('hhea', [ + {name: 'version', type: 'FIXED', value: 0x00010000}, + {name: 'ascender', type: 'FWORD', value: 0}, + {name: 'descender', type: 'FWORD', value: 0}, + {name: 'lineGap', type: 'FWORD', value: 0}, + {name: 'advanceWidthMax', type: 'UFWORD', value: 0}, + {name: 'minLeftSideBearing', type: 'FWORD', value: 0}, + {name: 'minRightSideBearing', type: 'FWORD', value: 0}, + {name: 'xMaxExtent', type: 'FWORD', value: 0}, + {name: 'caretSlopeRise', type: 'SHORT', value: 1}, + {name: 'caretSlopeRun', type: 'SHORT', value: 0}, + {name: 'caretOffset', type: 'SHORT', value: 0}, + {name: 'reserved1', type: 'SHORT', value: 0}, + {name: 'reserved2', type: 'SHORT', value: 0}, + {name: 'reserved3', type: 'SHORT', value: 0}, + {name: 'reserved4', type: 'SHORT', value: 0}, + {name: 'metricDataFormat', type: 'SHORT', value: 0}, + {name: 'numberOfHMetrics', type: 'USHORT', value: 0} + ], options); +} + +var hhea = { parse: parseHheaTable, make: makeHheaTable }; + +// The `hmtx` table contains the horizontal metrics for all glyphs. + +function parseHmtxTableAll(data, start, numMetrics, numGlyphs, glyphs) { + var advanceWidth; + var leftSideBearing; + var p = new parse.Parser(data, start); + for (var i = 0; i < numGlyphs; i += 1) { + // If the font is monospaced, only one entry is needed. This last entry applies to all subsequent glyphs. + if (i < numMetrics) { + advanceWidth = p.parseUShort(); + leftSideBearing = p.parseShort(); + } + + var glyph = glyphs.get(i); + glyph.advanceWidth = advanceWidth; + glyph.leftSideBearing = leftSideBearing; + } +} + +function parseHmtxTableOnLowMemory(font, data, start, numMetrics, numGlyphs) { + font._hmtxTableData = {}; + + var advanceWidth; + var leftSideBearing; + var p = new parse.Parser(data, start); + for (var i = 0; i < numGlyphs; i += 1) { + // If the font is monospaced, only one entry is needed. This last entry applies to all subsequent glyphs. + if (i < numMetrics) { + advanceWidth = p.parseUShort(); + leftSideBearing = p.parseShort(); + } + + font._hmtxTableData[i] = { + advanceWidth: advanceWidth, + leftSideBearing: leftSideBearing + }; + } +} + +// Parse the `hmtx` table, which contains the horizontal metrics for all glyphs. +// This function augments the glyph array, adding the advanceWidth and leftSideBearing to each glyph. +function parseHmtxTable(font, data, start, numMetrics, numGlyphs, glyphs, opt) { + if (opt.lowMemory) + { parseHmtxTableOnLowMemory(font, data, start, numMetrics, numGlyphs); } + else + { parseHmtxTableAll(data, start, numMetrics, numGlyphs, glyphs); } +} + +function makeHmtxTable(glyphs) { + var t = new table.Table('hmtx', []); + for (var i = 0; i < glyphs.length; i += 1) { + var glyph = glyphs.get(i); + var advanceWidth = glyph.advanceWidth || 0; + var leftSideBearing = glyph.leftSideBearing || 0; + t.fields.push({name: 'advanceWidth_' + i, type: 'USHORT', value: advanceWidth}); + t.fields.push({name: 'leftSideBearing_' + i, type: 'SHORT', value: leftSideBearing}); + } + + return t; +} + +var hmtx = { parse: parseHmtxTable, make: makeHmtxTable }; + +// The `ltag` table stores IETF BCP-47 language tags. It allows supporting + +function makeLtagTable(tags) { + var result = new table.Table('ltag', [ + {name: 'version', type: 'ULONG', value: 1}, + {name: 'flags', type: 'ULONG', value: 0}, + {name: 'numTags', type: 'ULONG', value: tags.length} + ]); + + var stringPool = ''; + var stringPoolOffset = 12 + tags.length * 4; + for (var i = 0; i < tags.length; ++i) { + var pos = stringPool.indexOf(tags[i]); + if (pos < 0) { + pos = stringPool.length; + stringPool += tags[i]; + } + + result.fields.push({name: 'offset ' + i, type: 'USHORT', value: stringPoolOffset + pos}); + result.fields.push({name: 'length ' + i, type: 'USHORT', value: tags[i].length}); + } + + result.fields.push({name: 'stringPool', type: 'CHARARRAY', value: stringPool}); + return result; +} + +function parseLtagTable(data, start) { + var p = new parse.Parser(data, start); + var tableVersion = p.parseULong(); + check.argument(tableVersion === 1, 'Unsupported ltag table version.'); + // The 'ltag' specification does not define any flags; skip the field. + p.skip('uLong', 1); + var numTags = p.parseULong(); + + var tags = []; + for (var i = 0; i < numTags; i++) { + var tag = ''; + var offset = start + p.parseUShort(); + var length = p.parseUShort(); + for (var j = offset; j < offset + length; ++j) { + tag += String.fromCharCode(data.getInt8(j)); + } + + tags.push(tag); + } + + return tags; +} + +var ltag = { make: makeLtagTable, parse: parseLtagTable }; + +// The `maxp` table establishes the memory requirements for the font. + +// Parse the maximum profile `maxp` table. +function parseMaxpTable(data, start) { + var maxp = {}; + var p = new parse.Parser(data, start); + maxp.version = p.parseVersion(); + maxp.numGlyphs = p.parseUShort(); + if (maxp.version === 1.0) { + maxp.maxPoints = p.parseUShort(); + maxp.maxContours = p.parseUShort(); + maxp.maxCompositePoints = p.parseUShort(); + maxp.maxCompositeContours = p.parseUShort(); + maxp.maxZones = p.parseUShort(); + maxp.maxTwilightPoints = p.parseUShort(); + maxp.maxStorage = p.parseUShort(); + maxp.maxFunctionDefs = p.parseUShort(); + maxp.maxInstructionDefs = p.parseUShort(); + maxp.maxStackElements = p.parseUShort(); + maxp.maxSizeOfInstructions = p.parseUShort(); + maxp.maxComponentElements = p.parseUShort(); + maxp.maxComponentDepth = p.parseUShort(); + } + + return maxp; +} + +function makeMaxpTable(numGlyphs) { + return new table.Table('maxp', [ + {name: 'version', type: 'FIXED', value: 0x00005000}, + {name: 'numGlyphs', type: 'USHORT', value: numGlyphs} + ]); +} + +var maxp = { parse: parseMaxpTable, make: makeMaxpTable }; + +// The `name` naming table. + +// NameIDs for the name table. +var nameTableNames = [ + 'copyright', // 0 + 'fontFamily', // 1 + 'fontSubfamily', // 2 + 'uniqueID', // 3 + 'fullName', // 4 + 'version', // 5 + 'postScriptName', // 6 + 'trademark', // 7 + 'manufacturer', // 8 + 'designer', // 9 + 'description', // 10 + 'manufacturerURL', // 11 + 'designerURL', // 12 + 'license', // 13 + 'licenseURL', // 14 + 'reserved', // 15 + 'preferredFamily', // 16 + 'preferredSubfamily', // 17 + 'compatibleFullName', // 18 + 'sampleText', // 19 + 'postScriptFindFontName', // 20 + 'wwsFamily', // 21 + 'wwsSubfamily' // 22 +]; + +var macLanguages = { + 0: 'en', + 1: 'fr', + 2: 'de', + 3: 'it', + 4: 'nl', + 5: 'sv', + 6: 'es', + 7: 'da', + 8: 'pt', + 9: 'no', + 10: 'he', + 11: 'ja', + 12: 'ar', + 13: 'fi', + 14: 'el', + 15: 'is', + 16: 'mt', + 17: 'tr', + 18: 'hr', + 19: 'zh-Hant', + 20: 'ur', + 21: 'hi', + 22: 'th', + 23: 'ko', + 24: 'lt', + 25: 'pl', + 26: 'hu', + 27: 'es', + 28: 'lv', + 29: 'se', + 30: 'fo', + 31: 'fa', + 32: 'ru', + 33: 'zh', + 34: 'nl-BE', + 35: 'ga', + 36: 'sq', + 37: 'ro', + 38: 'cz', + 39: 'sk', + 40: 'si', + 41: 'yi', + 42: 'sr', + 43: 'mk', + 44: 'bg', + 45: 'uk', + 46: 'be', + 47: 'uz', + 48: 'kk', + 49: 'az-Cyrl', + 50: 'az-Arab', + 51: 'hy', + 52: 'ka', + 53: 'mo', + 54: 'ky', + 55: 'tg', + 56: 'tk', + 57: 'mn-CN', + 58: 'mn', + 59: 'ps', + 60: 'ks', + 61: 'ku', + 62: 'sd', + 63: 'bo', + 64: 'ne', + 65: 'sa', + 66: 'mr', + 67: 'bn', + 68: 'as', + 69: 'gu', + 70: 'pa', + 71: 'or', + 72: 'ml', + 73: 'kn', + 74: 'ta', + 75: 'te', + 76: 'si', + 77: 'my', + 78: 'km', + 79: 'lo', + 80: 'vi', + 81: 'id', + 82: 'tl', + 83: 'ms', + 84: 'ms-Arab', + 85: 'am', + 86: 'ti', + 87: 'om', + 88: 'so', + 89: 'sw', + 90: 'rw', + 91: 'rn', + 92: 'ny', + 93: 'mg', + 94: 'eo', + 128: 'cy', + 129: 'eu', + 130: 'ca', + 131: 'la', + 132: 'qu', + 133: 'gn', + 134: 'ay', + 135: 'tt', + 136: 'ug', + 137: 'dz', + 138: 'jv', + 139: 'su', + 140: 'gl', + 141: 'af', + 142: 'br', + 143: 'iu', + 144: 'gd', + 145: 'gv', + 146: 'ga', + 147: 'to', + 148: 'el-polyton', + 149: 'kl', + 150: 'az', + 151: 'nn' +}; + +// MacOS language ID → MacOS script ID +// +// Note that the script ID is not sufficient to determine what encoding +// to use in TrueType files. For some languages, MacOS used a modification +// of a mainstream script. For example, an Icelandic name would be stored +// with smRoman in the TrueType naming table, but the actual encoding +// is a special Icelandic version of the normal Macintosh Roman encoding. +// As another example, Inuktitut uses an 8-bit encoding for Canadian Aboriginal +// Syllables but MacOS had run out of available script codes, so this was +// done as a (pretty radical) "modification" of Ethiopic. +// +// http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt +var macLanguageToScript = { + 0: 0, // langEnglish → smRoman + 1: 0, // langFrench → smRoman + 2: 0, // langGerman → smRoman + 3: 0, // langItalian → smRoman + 4: 0, // langDutch → smRoman + 5: 0, // langSwedish → smRoman + 6: 0, // langSpanish → smRoman + 7: 0, // langDanish → smRoman + 8: 0, // langPortuguese → smRoman + 9: 0, // langNorwegian → smRoman + 10: 5, // langHebrew → smHebrew + 11: 1, // langJapanese → smJapanese + 12: 4, // langArabic → smArabic + 13: 0, // langFinnish → smRoman + 14: 6, // langGreek → smGreek + 15: 0, // langIcelandic → smRoman (modified) + 16: 0, // langMaltese → smRoman + 17: 0, // langTurkish → smRoman (modified) + 18: 0, // langCroatian → smRoman (modified) + 19: 2, // langTradChinese → smTradChinese + 20: 4, // langUrdu → smArabic + 21: 9, // langHindi → smDevanagari + 22: 21, // langThai → smThai + 23: 3, // langKorean → smKorean + 24: 29, // langLithuanian → smCentralEuroRoman + 25: 29, // langPolish → smCentralEuroRoman + 26: 29, // langHungarian → smCentralEuroRoman + 27: 29, // langEstonian → smCentralEuroRoman + 28: 29, // langLatvian → smCentralEuroRoman + 29: 0, // langSami → smRoman + 30: 0, // langFaroese → smRoman (modified) + 31: 4, // langFarsi → smArabic (modified) + 32: 7, // langRussian → smCyrillic + 33: 25, // langSimpChinese → smSimpChinese + 34: 0, // langFlemish → smRoman + 35: 0, // langIrishGaelic → smRoman (modified) + 36: 0, // langAlbanian → smRoman + 37: 0, // langRomanian → smRoman (modified) + 38: 29, // langCzech → smCentralEuroRoman + 39: 29, // langSlovak → smCentralEuroRoman + 40: 0, // langSlovenian → smRoman (modified) + 41: 5, // langYiddish → smHebrew + 42: 7, // langSerbian → smCyrillic + 43: 7, // langMacedonian → smCyrillic + 44: 7, // langBulgarian → smCyrillic + 45: 7, // langUkrainian → smCyrillic (modified) + 46: 7, // langByelorussian → smCyrillic + 47: 7, // langUzbek → smCyrillic + 48: 7, // langKazakh → smCyrillic + 49: 7, // langAzerbaijani → smCyrillic + 50: 4, // langAzerbaijanAr → smArabic + 51: 24, // langArmenian → smArmenian + 52: 23, // langGeorgian → smGeorgian + 53: 7, // langMoldavian → smCyrillic + 54: 7, // langKirghiz → smCyrillic + 55: 7, // langTajiki → smCyrillic + 56: 7, // langTurkmen → smCyrillic + 57: 27, // langMongolian → smMongolian + 58: 7, // langMongolianCyr → smCyrillic + 59: 4, // langPashto → smArabic + 60: 4, // langKurdish → smArabic + 61: 4, // langKashmiri → smArabic + 62: 4, // langSindhi → smArabic + 63: 26, // langTibetan → smTibetan + 64: 9, // langNepali → smDevanagari + 65: 9, // langSanskrit → smDevanagari + 66: 9, // langMarathi → smDevanagari + 67: 13, // langBengali → smBengali + 68: 13, // langAssamese → smBengali + 69: 11, // langGujarati → smGujarati + 70: 10, // langPunjabi → smGurmukhi + 71: 12, // langOriya → smOriya + 72: 17, // langMalayalam → smMalayalam + 73: 16, // langKannada → smKannada + 74: 14, // langTamil → smTamil + 75: 15, // langTelugu → smTelugu + 76: 18, // langSinhalese → smSinhalese + 77: 19, // langBurmese → smBurmese + 78: 20, // langKhmer → smKhmer + 79: 22, // langLao → smLao + 80: 30, // langVietnamese → smVietnamese + 81: 0, // langIndonesian → smRoman + 82: 0, // langTagalog → smRoman + 83: 0, // langMalayRoman → smRoman + 84: 4, // langMalayArabic → smArabic + 85: 28, // langAmharic → smEthiopic + 86: 28, // langTigrinya → smEthiopic + 87: 28, // langOromo → smEthiopic + 88: 0, // langSomali → smRoman + 89: 0, // langSwahili → smRoman + 90: 0, // langKinyarwanda → smRoman + 91: 0, // langRundi → smRoman + 92: 0, // langNyanja → smRoman + 93: 0, // langMalagasy → smRoman + 94: 0, // langEsperanto → smRoman + 128: 0, // langWelsh → smRoman (modified) + 129: 0, // langBasque → smRoman + 130: 0, // langCatalan → smRoman + 131: 0, // langLatin → smRoman + 132: 0, // langQuechua → smRoman + 133: 0, // langGuarani → smRoman + 134: 0, // langAymara → smRoman + 135: 7, // langTatar → smCyrillic + 136: 4, // langUighur → smArabic + 137: 26, // langDzongkha → smTibetan + 138: 0, // langJavaneseRom → smRoman + 139: 0, // langSundaneseRom → smRoman + 140: 0, // langGalician → smRoman + 141: 0, // langAfrikaans → smRoman + 142: 0, // langBreton → smRoman (modified) + 143: 28, // langInuktitut → smEthiopic (modified) + 144: 0, // langScottishGaelic → smRoman (modified) + 145: 0, // langManxGaelic → smRoman (modified) + 146: 0, // langIrishGaelicScript → smRoman (modified) + 147: 0, // langTongan → smRoman + 148: 6, // langGreekAncient → smRoman + 149: 0, // langGreenlandic → smRoman + 150: 0, // langAzerbaijanRoman → smRoman + 151: 0 // langNynorsk → smRoman +}; + +// While Microsoft indicates a region/country for all its language +// IDs, we omit the region code if it's equal to the "most likely +// region subtag" according to Unicode CLDR. For scripts, we omit +// the subtag if it is equal to the Suppress-Script entry in the +// IANA language subtag registry for IETF BCP 47. +// +// For example, Microsoft states that its language code 0x041A is +// Croatian in Croatia. We transform this to the BCP 47 language code 'hr' +// and not 'hr-HR' because Croatia is the default country for Croatian, +// according to Unicode CLDR. As another example, Microsoft states +// that 0x101A is Croatian (Latin) in Bosnia-Herzegovina. We transform +// this to 'hr-BA' and not 'hr-Latn-BA' because Latin is the default script +// for the Croatian language, according to IANA. +// +// http://www.unicode.org/cldr/charts/latest/supplemental/likely_subtags.html +// http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry +var windowsLanguages = { + 0x0436: 'af', + 0x041C: 'sq', + 0x0484: 'gsw', + 0x045E: 'am', + 0x1401: 'ar-DZ', + 0x3C01: 'ar-BH', + 0x0C01: 'ar', + 0x0801: 'ar-IQ', + 0x2C01: 'ar-JO', + 0x3401: 'ar-KW', + 0x3001: 'ar-LB', + 0x1001: 'ar-LY', + 0x1801: 'ary', + 0x2001: 'ar-OM', + 0x4001: 'ar-QA', + 0x0401: 'ar-SA', + 0x2801: 'ar-SY', + 0x1C01: 'aeb', + 0x3801: 'ar-AE', + 0x2401: 'ar-YE', + 0x042B: 'hy', + 0x044D: 'as', + 0x082C: 'az-Cyrl', + 0x042C: 'az', + 0x046D: 'ba', + 0x042D: 'eu', + 0x0423: 'be', + 0x0845: 'bn', + 0x0445: 'bn-IN', + 0x201A: 'bs-Cyrl', + 0x141A: 'bs', + 0x047E: 'br', + 0x0402: 'bg', + 0x0403: 'ca', + 0x0C04: 'zh-HK', + 0x1404: 'zh-MO', + 0x0804: 'zh', + 0x1004: 'zh-SG', + 0x0404: 'zh-TW', + 0x0483: 'co', + 0x041A: 'hr', + 0x101A: 'hr-BA', + 0x0405: 'cs', + 0x0406: 'da', + 0x048C: 'prs', + 0x0465: 'dv', + 0x0813: 'nl-BE', + 0x0413: 'nl', + 0x0C09: 'en-AU', + 0x2809: 'en-BZ', + 0x1009: 'en-CA', + 0x2409: 'en-029', + 0x4009: 'en-IN', + 0x1809: 'en-IE', + 0x2009: 'en-JM', + 0x4409: 'en-MY', + 0x1409: 'en-NZ', + 0x3409: 'en-PH', + 0x4809: 'en-SG', + 0x1C09: 'en-ZA', + 0x2C09: 'en-TT', + 0x0809: 'en-GB', + 0x0409: 'en', + 0x3009: 'en-ZW', + 0x0425: 'et', + 0x0438: 'fo', + 0x0464: 'fil', + 0x040B: 'fi', + 0x080C: 'fr-BE', + 0x0C0C: 'fr-CA', + 0x040C: 'fr', + 0x140C: 'fr-LU', + 0x180C: 'fr-MC', + 0x100C: 'fr-CH', + 0x0462: 'fy', + 0x0456: 'gl', + 0x0437: 'ka', + 0x0C07: 'de-AT', + 0x0407: 'de', + 0x1407: 'de-LI', + 0x1007: 'de-LU', + 0x0807: 'de-CH', + 0x0408: 'el', + 0x046F: 'kl', + 0x0447: 'gu', + 0x0468: 'ha', + 0x040D: 'he', + 0x0439: 'hi', + 0x040E: 'hu', + 0x040F: 'is', + 0x0470: 'ig', + 0x0421: 'id', + 0x045D: 'iu', + 0x085D: 'iu-Latn', + 0x083C: 'ga', + 0x0434: 'xh', + 0x0435: 'zu', + 0x0410: 'it', + 0x0810: 'it-CH', + 0x0411: 'ja', + 0x044B: 'kn', + 0x043F: 'kk', + 0x0453: 'km', + 0x0486: 'quc', + 0x0487: 'rw', + 0x0441: 'sw', + 0x0457: 'kok', + 0x0412: 'ko', + 0x0440: 'ky', + 0x0454: 'lo', + 0x0426: 'lv', + 0x0427: 'lt', + 0x082E: 'dsb', + 0x046E: 'lb', + 0x042F: 'mk', + 0x083E: 'ms-BN', + 0x043E: 'ms', + 0x044C: 'ml', + 0x043A: 'mt', + 0x0481: 'mi', + 0x047A: 'arn', + 0x044E: 'mr', + 0x047C: 'moh', + 0x0450: 'mn', + 0x0850: 'mn-CN', + 0x0461: 'ne', + 0x0414: 'nb', + 0x0814: 'nn', + 0x0482: 'oc', + 0x0448: 'or', + 0x0463: 'ps', + 0x0415: 'pl', + 0x0416: 'pt', + 0x0816: 'pt-PT', + 0x0446: 'pa', + 0x046B: 'qu-BO', + 0x086B: 'qu-EC', + 0x0C6B: 'qu', + 0x0418: 'ro', + 0x0417: 'rm', + 0x0419: 'ru', + 0x243B: 'smn', + 0x103B: 'smj-NO', + 0x143B: 'smj', + 0x0C3B: 'se-FI', + 0x043B: 'se', + 0x083B: 'se-SE', + 0x203B: 'sms', + 0x183B: 'sma-NO', + 0x1C3B: 'sms', + 0x044F: 'sa', + 0x1C1A: 'sr-Cyrl-BA', + 0x0C1A: 'sr', + 0x181A: 'sr-Latn-BA', + 0x081A: 'sr-Latn', + 0x046C: 'nso', + 0x0432: 'tn', + 0x045B: 'si', + 0x041B: 'sk', + 0x0424: 'sl', + 0x2C0A: 'es-AR', + 0x400A: 'es-BO', + 0x340A: 'es-CL', + 0x240A: 'es-CO', + 0x140A: 'es-CR', + 0x1C0A: 'es-DO', + 0x300A: 'es-EC', + 0x440A: 'es-SV', + 0x100A: 'es-GT', + 0x480A: 'es-HN', + 0x080A: 'es-MX', + 0x4C0A: 'es-NI', + 0x180A: 'es-PA', + 0x3C0A: 'es-PY', + 0x280A: 'es-PE', + 0x500A: 'es-PR', + + // Microsoft has defined two different language codes for + // “Spanish with modern sorting” and “Spanish with traditional + // sorting”. This makes sense for collation APIs, and it would be + // possible to express this in BCP 47 language tags via Unicode + // extensions (eg., es-u-co-trad is Spanish with traditional + // sorting). However, for storing names in fonts, the distinction + // does not make sense, so we give “es” in both cases. + 0x0C0A: 'es', + 0x040A: 'es', + + 0x540A: 'es-US', + 0x380A: 'es-UY', + 0x200A: 'es-VE', + 0x081D: 'sv-FI', + 0x041D: 'sv', + 0x045A: 'syr', + 0x0428: 'tg', + 0x085F: 'tzm', + 0x0449: 'ta', + 0x0444: 'tt', + 0x044A: 'te', + 0x041E: 'th', + 0x0451: 'bo', + 0x041F: 'tr', + 0x0442: 'tk', + 0x0480: 'ug', + 0x0422: 'uk', + 0x042E: 'hsb', + 0x0420: 'ur', + 0x0843: 'uz-Cyrl', + 0x0443: 'uz', + 0x042A: 'vi', + 0x0452: 'cy', + 0x0488: 'wo', + 0x0485: 'sah', + 0x0478: 'ii', + 0x046A: 'yo' +}; + +// Returns a IETF BCP 47 language code, for example 'zh-Hant' +// for 'Chinese in the traditional script'. +function getLanguageCode(platformID, languageID, ltag) { + switch (platformID) { + case 0: // Unicode + if (languageID === 0xFFFF) { + return 'und'; + } else if (ltag) { + return ltag[languageID]; + } + + break; + + case 1: // Macintosh + return macLanguages[languageID]; + + case 3: // Windows + return windowsLanguages[languageID]; + } + + return undefined; +} + +var utf16 = 'utf-16'; + +// MacOS script ID → encoding. This table stores the default case, +// which can be overridden by macLanguageEncodings. +var macScriptEncodings = { + 0: 'macintosh', // smRoman + 1: 'x-mac-japanese', // smJapanese + 2: 'x-mac-chinesetrad', // smTradChinese + 3: 'x-mac-korean', // smKorean + 6: 'x-mac-greek', // smGreek + 7: 'x-mac-cyrillic', // smCyrillic + 9: 'x-mac-devanagai', // smDevanagari + 10: 'x-mac-gurmukhi', // smGurmukhi + 11: 'x-mac-gujarati', // smGujarati + 12: 'x-mac-oriya', // smOriya + 13: 'x-mac-bengali', // smBengali + 14: 'x-mac-tamil', // smTamil + 15: 'x-mac-telugu', // smTelugu + 16: 'x-mac-kannada', // smKannada + 17: 'x-mac-malayalam', // smMalayalam + 18: 'x-mac-sinhalese', // smSinhalese + 19: 'x-mac-burmese', // smBurmese + 20: 'x-mac-khmer', // smKhmer + 21: 'x-mac-thai', // smThai + 22: 'x-mac-lao', // smLao + 23: 'x-mac-georgian', // smGeorgian + 24: 'x-mac-armenian', // smArmenian + 25: 'x-mac-chinesesimp', // smSimpChinese + 26: 'x-mac-tibetan', // smTibetan + 27: 'x-mac-mongolian', // smMongolian + 28: 'x-mac-ethiopic', // smEthiopic + 29: 'x-mac-ce', // smCentralEuroRoman + 30: 'x-mac-vietnamese', // smVietnamese + 31: 'x-mac-extarabic' // smExtArabic +}; + +// MacOS language ID → encoding. This table stores the exceptional +// cases, which override macScriptEncodings. For writing MacOS naming +// tables, we need to emit a MacOS script ID. Therefore, we cannot +// merge macScriptEncodings into macLanguageEncodings. +// +// http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt +var macLanguageEncodings = { + 15: 'x-mac-icelandic', // langIcelandic + 17: 'x-mac-turkish', // langTurkish + 18: 'x-mac-croatian', // langCroatian + 24: 'x-mac-ce', // langLithuanian + 25: 'x-mac-ce', // langPolish + 26: 'x-mac-ce', // langHungarian + 27: 'x-mac-ce', // langEstonian + 28: 'x-mac-ce', // langLatvian + 30: 'x-mac-icelandic', // langFaroese + 37: 'x-mac-romanian', // langRomanian + 38: 'x-mac-ce', // langCzech + 39: 'x-mac-ce', // langSlovak + 40: 'x-mac-ce', // langSlovenian + 143: 'x-mac-inuit', // langInuktitut + 146: 'x-mac-gaelic' // langIrishGaelicScript +}; + +function getEncoding(platformID, encodingID, languageID) { + switch (platformID) { + case 0: // Unicode + return utf16; + + case 1: // Apple Macintosh + return macLanguageEncodings[languageID] || macScriptEncodings[encodingID]; + + case 3: // Microsoft Windows + if (encodingID === 1 || encodingID === 10) { + return utf16; + } + + break; + } + + return undefined; +} + +// Parse the naming `name` table. +// FIXME: Format 1 additional fields are not supported yet. +// ltag is the content of the `ltag' table, such as ['en', 'zh-Hans', 'de-CH-1904']. +function parseNameTable(data, start, ltag) { + var name = {}; + var p = new parse.Parser(data, start); + var format = p.parseUShort(); + var count = p.parseUShort(); + var stringOffset = p.offset + p.parseUShort(); + for (var i = 0; i < count; i++) { + var platformID = p.parseUShort(); + var encodingID = p.parseUShort(); + var languageID = p.parseUShort(); + var nameID = p.parseUShort(); + var property = nameTableNames[nameID] || nameID; + var byteLength = p.parseUShort(); + var offset = p.parseUShort(); + var language = getLanguageCode(platformID, languageID, ltag); + var encoding = getEncoding(platformID, encodingID, languageID); + if (encoding !== undefined && language !== undefined) { + var text = (void 0); + if (encoding === utf16) { + text = decode.UTF16(data, stringOffset + offset, byteLength); + } else { + text = decode.MACSTRING(data, stringOffset + offset, byteLength, encoding); + } + + if (text) { + var translations = name[property]; + if (translations === undefined) { + translations = name[property] = {}; + } + + translations[language] = text; + } + } + } + + var langTagCount = 0; + if (format === 1) { + // FIXME: Also handle Microsoft's 'name' table 1. + langTagCount = p.parseUShort(); + } + + return name; +} + +// {23: 'foo'} → {'foo': 23} +// ['bar', 'baz'] → {'bar': 0, 'baz': 1} +function reverseDict(dict) { + var result = {}; + for (var key in dict) { + result[dict[key]] = parseInt(key); + } + + return result; +} + +function makeNameRecord(platformID, encodingID, languageID, nameID, length, offset) { + return new table.Record('NameRecord', [ + {name: 'platformID', type: 'USHORT', value: platformID}, + {name: 'encodingID', type: 'USHORT', value: encodingID}, + {name: 'languageID', type: 'USHORT', value: languageID}, + {name: 'nameID', type: 'USHORT', value: nameID}, + {name: 'length', type: 'USHORT', value: length}, + {name: 'offset', type: 'USHORT', value: offset} + ]); +} + +// Finds the position of needle in haystack, or -1 if not there. +// Like String.indexOf(), but for arrays. +function findSubArray(needle, haystack) { + var needleLength = needle.length; + var limit = haystack.length - needleLength + 1; + + loop: + for (var pos = 0; pos < limit; pos++) { + for (; pos < limit; pos++) { + for (var k = 0; k < needleLength; k++) { + if (haystack[pos + k] !== needle[k]) { + continue loop; + } + } + + return pos; + } + } + + return -1; +} + +function addStringToPool(s, pool) { + var offset = findSubArray(s, pool); + if (offset < 0) { + offset = pool.length; + var i = 0; + var len = s.length; + for (; i < len; ++i) { + pool.push(s[i]); + } + + } + + return offset; +} + +function makeNameTable(names, ltag) { + var nameID; + var nameIDs = []; + + var namesWithNumericKeys = {}; + var nameTableIds = reverseDict(nameTableNames); + for (var key in names) { + var id = nameTableIds[key]; + if (id === undefined) { + id = key; + } + + nameID = parseInt(id); + + if (isNaN(nameID)) { + throw new Error('Name table entry "' + key + '" does not exist, see nameTableNames for complete list.'); + } + + namesWithNumericKeys[nameID] = names[key]; + nameIDs.push(nameID); + } + + var macLanguageIds = reverseDict(macLanguages); + var windowsLanguageIds = reverseDict(windowsLanguages); + + var nameRecords = []; + var stringPool = []; + + for (var i = 0; i < nameIDs.length; i++) { + nameID = nameIDs[i]; + var translations = namesWithNumericKeys[nameID]; + for (var lang in translations) { + var text = translations[lang]; + + // For MacOS, we try to emit the name in the form that was introduced + // in the initial version of the TrueType spec (in the late 1980s). + // However, this can fail for various reasons: the requested BCP 47 + // language code might not have an old-style Mac equivalent; + // we might not have a codec for the needed character encoding; + // or the name might contain characters that cannot be expressed + // in the old-style Macintosh encoding. In case of failure, we emit + // the name in a more modern fashion (Unicode encoding with BCP 47 + // language tags) that is recognized by MacOS 10.5, released in 2009. + // If fonts were only read by operating systems, we could simply + // emit all names in the modern form; this would be much easier. + // However, there are many applications and libraries that read + // 'name' tables directly, and these will usually only recognize + // the ancient form (silently skipping the unrecognized names). + var macPlatform = 1; // Macintosh + var macLanguage = macLanguageIds[lang]; + var macScript = macLanguageToScript[macLanguage]; + var macEncoding = getEncoding(macPlatform, macScript, macLanguage); + var macName = encode.MACSTRING(text, macEncoding); + if (macName === undefined) { + macPlatform = 0; // Unicode + macLanguage = ltag.indexOf(lang); + if (macLanguage < 0) { + macLanguage = ltag.length; + ltag.push(lang); + } + + macScript = 4; // Unicode 2.0 and later + macName = encode.UTF16(text); + } + + var macNameOffset = addStringToPool(macName, stringPool); + nameRecords.push(makeNameRecord(macPlatform, macScript, macLanguage, + nameID, macName.length, macNameOffset)); + + var winLanguage = windowsLanguageIds[lang]; + if (winLanguage !== undefined) { + var winName = encode.UTF16(text); + var winNameOffset = addStringToPool(winName, stringPool); + nameRecords.push(makeNameRecord(3, 1, winLanguage, + nameID, winName.length, winNameOffset)); + } + } + } + + nameRecords.sort(function(a, b) { + return ((a.platformID - b.platformID) || + (a.encodingID - b.encodingID) || + (a.languageID - b.languageID) || + (a.nameID - b.nameID)); + }); + + var t = new table.Table('name', [ + {name: 'format', type: 'USHORT', value: 0}, + {name: 'count', type: 'USHORT', value: nameRecords.length}, + {name: 'stringOffset', type: 'USHORT', value: 6 + nameRecords.length * 12} + ]); + + for (var r = 0; r < nameRecords.length; r++) { + t.fields.push({name: 'record_' + r, type: 'RECORD', value: nameRecords[r]}); + } + + t.fields.push({name: 'strings', type: 'LITERAL', value: stringPool}); + return t; +} + +var _name = { parse: parseNameTable, make: makeNameTable }; + +// The `OS/2` table contains metrics required in OpenType fonts. + +var unicodeRanges = [ + {begin: 0x0000, end: 0x007F}, // Basic Latin + {begin: 0x0080, end: 0x00FF}, // Latin-1 Supplement + {begin: 0x0100, end: 0x017F}, // Latin Extended-A + {begin: 0x0180, end: 0x024F}, // Latin Extended-B + {begin: 0x0250, end: 0x02AF}, // IPA Extensions + {begin: 0x02B0, end: 0x02FF}, // Spacing Modifier Letters + {begin: 0x0300, end: 0x036F}, // Combining Diacritical Marks + {begin: 0x0370, end: 0x03FF}, // Greek and Coptic + {begin: 0x2C80, end: 0x2CFF}, // Coptic + {begin: 0x0400, end: 0x04FF}, // Cyrillic + {begin: 0x0530, end: 0x058F}, // Armenian + {begin: 0x0590, end: 0x05FF}, // Hebrew + {begin: 0xA500, end: 0xA63F}, // Vai + {begin: 0x0600, end: 0x06FF}, // Arabic + {begin: 0x07C0, end: 0x07FF}, // NKo + {begin: 0x0900, end: 0x097F}, // Devanagari + {begin: 0x0980, end: 0x09FF}, // Bengali + {begin: 0x0A00, end: 0x0A7F}, // Gurmukhi + {begin: 0x0A80, end: 0x0AFF}, // Gujarati + {begin: 0x0B00, end: 0x0B7F}, // Oriya + {begin: 0x0B80, end: 0x0BFF}, // Tamil + {begin: 0x0C00, end: 0x0C7F}, // Telugu + {begin: 0x0C80, end: 0x0CFF}, // Kannada + {begin: 0x0D00, end: 0x0D7F}, // Malayalam + {begin: 0x0E00, end: 0x0E7F}, // Thai + {begin: 0x0E80, end: 0x0EFF}, // Lao + {begin: 0x10A0, end: 0x10FF}, // Georgian + {begin: 0x1B00, end: 0x1B7F}, // Balinese + {begin: 0x1100, end: 0x11FF}, // Hangul Jamo + {begin: 0x1E00, end: 0x1EFF}, // Latin Extended Additional + {begin: 0x1F00, end: 0x1FFF}, // Greek Extended + {begin: 0x2000, end: 0x206F}, // General Punctuation + {begin: 0x2070, end: 0x209F}, // Superscripts And Subscripts + {begin: 0x20A0, end: 0x20CF}, // Currency Symbol + {begin: 0x20D0, end: 0x20FF}, // Combining Diacritical Marks For Symbols + {begin: 0x2100, end: 0x214F}, // Letterlike Symbols + {begin: 0x2150, end: 0x218F}, // Number Forms + {begin: 0x2190, end: 0x21FF}, // Arrows + {begin: 0x2200, end: 0x22FF}, // Mathematical Operators + {begin: 0x2300, end: 0x23FF}, // Miscellaneous Technical + {begin: 0x2400, end: 0x243F}, // Control Pictures + {begin: 0x2440, end: 0x245F}, // Optical Character Recognition + {begin: 0x2460, end: 0x24FF}, // Enclosed Alphanumerics + {begin: 0x2500, end: 0x257F}, // Box Drawing + {begin: 0x2580, end: 0x259F}, // Block Elements + {begin: 0x25A0, end: 0x25FF}, // Geometric Shapes + {begin: 0x2600, end: 0x26FF}, // Miscellaneous Symbols + {begin: 0x2700, end: 0x27BF}, // Dingbats + {begin: 0x3000, end: 0x303F}, // CJK Symbols And Punctuation + {begin: 0x3040, end: 0x309F}, // Hiragana + {begin: 0x30A0, end: 0x30FF}, // Katakana + {begin: 0x3100, end: 0x312F}, // Bopomofo + {begin: 0x3130, end: 0x318F}, // Hangul Compatibility Jamo + {begin: 0xA840, end: 0xA87F}, // Phags-pa + {begin: 0x3200, end: 0x32FF}, // Enclosed CJK Letters And Months + {begin: 0x3300, end: 0x33FF}, // CJK Compatibility + {begin: 0xAC00, end: 0xD7AF}, // Hangul Syllables + {begin: 0xD800, end: 0xDFFF}, // Non-Plane 0 * + {begin: 0x10900, end: 0x1091F}, // Phoenicia + {begin: 0x4E00, end: 0x9FFF}, // CJK Unified Ideographs + {begin: 0xE000, end: 0xF8FF}, // Private Use Area (plane 0) + {begin: 0x31C0, end: 0x31EF}, // CJK Strokes + {begin: 0xFB00, end: 0xFB4F}, // Alphabetic Presentation Forms + {begin: 0xFB50, end: 0xFDFF}, // Arabic Presentation Forms-A + {begin: 0xFE20, end: 0xFE2F}, // Combining Half Marks + {begin: 0xFE10, end: 0xFE1F}, // Vertical Forms + {begin: 0xFE50, end: 0xFE6F}, // Small Form Variants + {begin: 0xFE70, end: 0xFEFF}, // Arabic Presentation Forms-B + {begin: 0xFF00, end: 0xFFEF}, // Halfwidth And Fullwidth Forms + {begin: 0xFFF0, end: 0xFFFF}, // Specials + {begin: 0x0F00, end: 0x0FFF}, // Tibetan + {begin: 0x0700, end: 0x074F}, // Syriac + {begin: 0x0780, end: 0x07BF}, // Thaana + {begin: 0x0D80, end: 0x0DFF}, // Sinhala + {begin: 0x1000, end: 0x109F}, // Myanmar + {begin: 0x1200, end: 0x137F}, // Ethiopic + {begin: 0x13A0, end: 0x13FF}, // Cherokee + {begin: 0x1400, end: 0x167F}, // Unified Canadian Aboriginal Syllabics + {begin: 0x1680, end: 0x169F}, // Ogham + {begin: 0x16A0, end: 0x16FF}, // Runic + {begin: 0x1780, end: 0x17FF}, // Khmer + {begin: 0x1800, end: 0x18AF}, // Mongolian + {begin: 0x2800, end: 0x28FF}, // Braille Patterns + {begin: 0xA000, end: 0xA48F}, // Yi Syllables + {begin: 0x1700, end: 0x171F}, // Tagalog + {begin: 0x10300, end: 0x1032F}, // Old Italic + {begin: 0x10330, end: 0x1034F}, // Gothic + {begin: 0x10400, end: 0x1044F}, // Deseret + {begin: 0x1D000, end: 0x1D0FF}, // Byzantine Musical Symbols + {begin: 0x1D400, end: 0x1D7FF}, // Mathematical Alphanumeric Symbols + {begin: 0xFF000, end: 0xFFFFD}, // Private Use (plane 15) + {begin: 0xFE00, end: 0xFE0F}, // Variation Selectors + {begin: 0xE0000, end: 0xE007F}, // Tags + {begin: 0x1900, end: 0x194F}, // Limbu + {begin: 0x1950, end: 0x197F}, // Tai Le + {begin: 0x1980, end: 0x19DF}, // New Tai Lue + {begin: 0x1A00, end: 0x1A1F}, // Buginese + {begin: 0x2C00, end: 0x2C5F}, // Glagolitic + {begin: 0x2D30, end: 0x2D7F}, // Tifinagh + {begin: 0x4DC0, end: 0x4DFF}, // Yijing Hexagram Symbols + {begin: 0xA800, end: 0xA82F}, // Syloti Nagri + {begin: 0x10000, end: 0x1007F}, // Linear B Syllabary + {begin: 0x10140, end: 0x1018F}, // Ancient Greek Numbers + {begin: 0x10380, end: 0x1039F}, // Ugaritic + {begin: 0x103A0, end: 0x103DF}, // Old Persian + {begin: 0x10450, end: 0x1047F}, // Shavian + {begin: 0x10480, end: 0x104AF}, // Osmanya + {begin: 0x10800, end: 0x1083F}, // Cypriot Syllabary + {begin: 0x10A00, end: 0x10A5F}, // Kharoshthi + {begin: 0x1D300, end: 0x1D35F}, // Tai Xuan Jing Symbols + {begin: 0x12000, end: 0x123FF}, // Cuneiform + {begin: 0x1D360, end: 0x1D37F}, // Counting Rod Numerals + {begin: 0x1B80, end: 0x1BBF}, // Sundanese + {begin: 0x1C00, end: 0x1C4F}, // Lepcha + {begin: 0x1C50, end: 0x1C7F}, // Ol Chiki + {begin: 0xA880, end: 0xA8DF}, // Saurashtra + {begin: 0xA900, end: 0xA92F}, // Kayah Li + {begin: 0xA930, end: 0xA95F}, // Rejang + {begin: 0xAA00, end: 0xAA5F}, // Cham + {begin: 0x10190, end: 0x101CF}, // Ancient Symbols + {begin: 0x101D0, end: 0x101FF}, // Phaistos Disc + {begin: 0x102A0, end: 0x102DF}, // Carian + {begin: 0x1F030, end: 0x1F09F} // Domino Tiles +]; + +function getUnicodeRange(unicode) { + for (var i = 0; i < unicodeRanges.length; i += 1) { + var range = unicodeRanges[i]; + if (unicode >= range.begin && unicode < range.end) { + return i; + } + } + + return -1; +} + +// Parse the OS/2 and Windows metrics `OS/2` table +function parseOS2Table(data, start) { + var os2 = {}; + var p = new parse.Parser(data, start); + os2.version = p.parseUShort(); + os2.xAvgCharWidth = p.parseShort(); + os2.usWeightClass = p.parseUShort(); + os2.usWidthClass = p.parseUShort(); + os2.fsType = p.parseUShort(); + os2.ySubscriptXSize = p.parseShort(); + os2.ySubscriptYSize = p.parseShort(); + os2.ySubscriptXOffset = p.parseShort(); + os2.ySubscriptYOffset = p.parseShort(); + os2.ySuperscriptXSize = p.parseShort(); + os2.ySuperscriptYSize = p.parseShort(); + os2.ySuperscriptXOffset = p.parseShort(); + os2.ySuperscriptYOffset = p.parseShort(); + os2.yStrikeoutSize = p.parseShort(); + os2.yStrikeoutPosition = p.parseShort(); + os2.sFamilyClass = p.parseShort(); + os2.panose = []; + for (var i = 0; i < 10; i++) { + os2.panose[i] = p.parseByte(); + } + + os2.ulUnicodeRange1 = p.parseULong(); + os2.ulUnicodeRange2 = p.parseULong(); + os2.ulUnicodeRange3 = p.parseULong(); + os2.ulUnicodeRange4 = p.parseULong(); + os2.achVendID = String.fromCharCode(p.parseByte(), p.parseByte(), p.parseByte(), p.parseByte()); + os2.fsSelection = p.parseUShort(); + os2.usFirstCharIndex = p.parseUShort(); + os2.usLastCharIndex = p.parseUShort(); + os2.sTypoAscender = p.parseShort(); + os2.sTypoDescender = p.parseShort(); + os2.sTypoLineGap = p.parseShort(); + os2.usWinAscent = p.parseUShort(); + os2.usWinDescent = p.parseUShort(); + if (os2.version >= 1) { + os2.ulCodePageRange1 = p.parseULong(); + os2.ulCodePageRange2 = p.parseULong(); + } + + if (os2.version >= 2) { + os2.sxHeight = p.parseShort(); + os2.sCapHeight = p.parseShort(); + os2.usDefaultChar = p.parseUShort(); + os2.usBreakChar = p.parseUShort(); + os2.usMaxContent = p.parseUShort(); + } + + return os2; +} + +function makeOS2Table(options) { + return new table.Table('OS/2', [ + {name: 'version', type: 'USHORT', value: 0x0003}, + {name: 'xAvgCharWidth', type: 'SHORT', value: 0}, + {name: 'usWeightClass', type: 'USHORT', value: 0}, + {name: 'usWidthClass', type: 'USHORT', value: 0}, + {name: 'fsType', type: 'USHORT', value: 0}, + {name: 'ySubscriptXSize', type: 'SHORT', value: 650}, + {name: 'ySubscriptYSize', type: 'SHORT', value: 699}, + {name: 'ySubscriptXOffset', type: 'SHORT', value: 0}, + {name: 'ySubscriptYOffset', type: 'SHORT', value: 140}, + {name: 'ySuperscriptXSize', type: 'SHORT', value: 650}, + {name: 'ySuperscriptYSize', type: 'SHORT', value: 699}, + {name: 'ySuperscriptXOffset', type: 'SHORT', value: 0}, + {name: 'ySuperscriptYOffset', type: 'SHORT', value: 479}, + {name: 'yStrikeoutSize', type: 'SHORT', value: 49}, + {name: 'yStrikeoutPosition', type: 'SHORT', value: 258}, + {name: 'sFamilyClass', type: 'SHORT', value: 0}, + {name: 'bFamilyType', type: 'BYTE', value: 0}, + {name: 'bSerifStyle', type: 'BYTE', value: 0}, + {name: 'bWeight', type: 'BYTE', value: 0}, + {name: 'bProportion', type: 'BYTE', value: 0}, + {name: 'bContrast', type: 'BYTE', value: 0}, + {name: 'bStrokeVariation', type: 'BYTE', value: 0}, + {name: 'bArmStyle', type: 'BYTE', value: 0}, + {name: 'bLetterform', type: 'BYTE', value: 0}, + {name: 'bMidline', type: 'BYTE', value: 0}, + {name: 'bXHeight', type: 'BYTE', value: 0}, + {name: 'ulUnicodeRange1', type: 'ULONG', value: 0}, + {name: 'ulUnicodeRange2', type: 'ULONG', value: 0}, + {name: 'ulUnicodeRange3', type: 'ULONG', value: 0}, + {name: 'ulUnicodeRange4', type: 'ULONG', value: 0}, + {name: 'achVendID', type: 'CHARARRAY', value: 'XXXX'}, + {name: 'fsSelection', type: 'USHORT', value: 0}, + {name: 'usFirstCharIndex', type: 'USHORT', value: 0}, + {name: 'usLastCharIndex', type: 'USHORT', value: 0}, + {name: 'sTypoAscender', type: 'SHORT', value: 0}, + {name: 'sTypoDescender', type: 'SHORT', value: 0}, + {name: 'sTypoLineGap', type: 'SHORT', value: 0}, + {name: 'usWinAscent', type: 'USHORT', value: 0}, + {name: 'usWinDescent', type: 'USHORT', value: 0}, + {name: 'ulCodePageRange1', type: 'ULONG', value: 0}, + {name: 'ulCodePageRange2', type: 'ULONG', value: 0}, + {name: 'sxHeight', type: 'SHORT', value: 0}, + {name: 'sCapHeight', type: 'SHORT', value: 0}, + {name: 'usDefaultChar', type: 'USHORT', value: 0}, + {name: 'usBreakChar', type: 'USHORT', value: 0}, + {name: 'usMaxContext', type: 'USHORT', value: 0} + ], options); +} + +var os2 = { parse: parseOS2Table, make: makeOS2Table, unicodeRanges: unicodeRanges, getUnicodeRange: getUnicodeRange }; + +// The `post` table stores additional PostScript information, such as glyph names. + +// Parse the PostScript `post` table +function parsePostTable(data, start) { + var post = {}; + var p = new parse.Parser(data, start); + post.version = p.parseVersion(); + post.italicAngle = p.parseFixed(); + post.underlinePosition = p.parseShort(); + post.underlineThickness = p.parseShort(); + post.isFixedPitch = p.parseULong(); + post.minMemType42 = p.parseULong(); + post.maxMemType42 = p.parseULong(); + post.minMemType1 = p.parseULong(); + post.maxMemType1 = p.parseULong(); + switch (post.version) { + case 1: + post.names = standardNames.slice(); + break; + case 2: + post.numberOfGlyphs = p.parseUShort(); + post.glyphNameIndex = new Array(post.numberOfGlyphs); + for (var i = 0; i < post.numberOfGlyphs; i++) { + post.glyphNameIndex[i] = p.parseUShort(); + } + + post.names = []; + for (var i$1 = 0; i$1 < post.numberOfGlyphs; i$1++) { + if (post.glyphNameIndex[i$1] >= standardNames.length) { + var nameLength = p.parseChar(); + post.names.push(p.parseString(nameLength)); + } + } + + break; + case 2.5: + post.numberOfGlyphs = p.parseUShort(); + post.offset = new Array(post.numberOfGlyphs); + for (var i$2 = 0; i$2 < post.numberOfGlyphs; i$2++) { + post.offset[i$2] = p.parseChar(); + } + + break; + } + return post; +} + +function makePostTable() { + return new table.Table('post', [ + {name: 'version', type: 'FIXED', value: 0x00030000}, + {name: 'italicAngle', type: 'FIXED', value: 0}, + {name: 'underlinePosition', type: 'FWORD', value: 0}, + {name: 'underlineThickness', type: 'FWORD', value: 0}, + {name: 'isFixedPitch', type: 'ULONG', value: 0}, + {name: 'minMemType42', type: 'ULONG', value: 0}, + {name: 'maxMemType42', type: 'ULONG', value: 0}, + {name: 'minMemType1', type: 'ULONG', value: 0}, + {name: 'maxMemType1', type: 'ULONG', value: 0} + ]); +} + +var post = { parse: parsePostTable, make: makePostTable }; + +// The `GSUB` table contains ligatures, among other things. + +var subtableParsers = new Array(9); // subtableParsers[0] is unused + +// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#SS +subtableParsers[1] = function parseLookup1() { + var start = this.offset + this.relativeOffset; + var substFormat = this.parseUShort(); + if (substFormat === 1) { + return { + substFormat: 1, + coverage: this.parsePointer(Parser.coverage), + deltaGlyphId: this.parseUShort() + }; + } else if (substFormat === 2) { + return { + substFormat: 2, + coverage: this.parsePointer(Parser.coverage), + substitute: this.parseOffset16List() + }; + } + check.assert(false, '0x' + start.toString(16) + ': lookup type 1 format must be 1 or 2.'); +}; + +// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#MS +subtableParsers[2] = function parseLookup2() { + var substFormat = this.parseUShort(); + check.argument(substFormat === 1, 'GSUB Multiple Substitution Subtable identifier-format must be 1'); + return { + substFormat: substFormat, + coverage: this.parsePointer(Parser.coverage), + sequences: this.parseListOfLists() + }; +}; + +// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#AS +subtableParsers[3] = function parseLookup3() { + var substFormat = this.parseUShort(); + check.argument(substFormat === 1, 'GSUB Alternate Substitution Subtable identifier-format must be 1'); + return { + substFormat: substFormat, + coverage: this.parsePointer(Parser.coverage), + alternateSets: this.parseListOfLists() + }; +}; + +// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#LS +subtableParsers[4] = function parseLookup4() { + var substFormat = this.parseUShort(); + check.argument(substFormat === 1, 'GSUB ligature table identifier-format must be 1'); + return { + substFormat: substFormat, + coverage: this.parsePointer(Parser.coverage), + ligatureSets: this.parseListOfLists(function() { + return { + ligGlyph: this.parseUShort(), + components: this.parseUShortList(this.parseUShort() - 1) + }; + }) + }; +}; + +var lookupRecordDesc = { + sequenceIndex: Parser.uShort, + lookupListIndex: Parser.uShort +}; + +// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#CSF +subtableParsers[5] = function parseLookup5() { + var start = this.offset + this.relativeOffset; + var substFormat = this.parseUShort(); + + if (substFormat === 1) { + return { + substFormat: substFormat, + coverage: this.parsePointer(Parser.coverage), + ruleSets: this.parseListOfLists(function() { + var glyphCount = this.parseUShort(); + var substCount = this.parseUShort(); + return { + input: this.parseUShortList(glyphCount - 1), + lookupRecords: this.parseRecordList(substCount, lookupRecordDesc) + }; + }) + }; + } else if (substFormat === 2) { + return { + substFormat: substFormat, + coverage: this.parsePointer(Parser.coverage), + classDef: this.parsePointer(Parser.classDef), + classSets: this.parseListOfLists(function() { + var glyphCount = this.parseUShort(); + var substCount = this.parseUShort(); + return { + classes: this.parseUShortList(glyphCount - 1), + lookupRecords: this.parseRecordList(substCount, lookupRecordDesc) + }; + }) + }; + } else if (substFormat === 3) { + var glyphCount = this.parseUShort(); + var substCount = this.parseUShort(); + return { + substFormat: substFormat, + coverages: this.parseList(glyphCount, Parser.pointer(Parser.coverage)), + lookupRecords: this.parseRecordList(substCount, lookupRecordDesc) + }; + } + check.assert(false, '0x' + start.toString(16) + ': lookup type 5 format must be 1, 2 or 3.'); +}; + +// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#CC +subtableParsers[6] = function parseLookup6() { + var start = this.offset + this.relativeOffset; + var substFormat = this.parseUShort(); + if (substFormat === 1) { + return { + substFormat: 1, + coverage: this.parsePointer(Parser.coverage), + chainRuleSets: this.parseListOfLists(function() { + return { + backtrack: this.parseUShortList(), + input: this.parseUShortList(this.parseShort() - 1), + lookahead: this.parseUShortList(), + lookupRecords: this.parseRecordList(lookupRecordDesc) + }; + }) + }; + } else if (substFormat === 2) { + return { + substFormat: 2, + coverage: this.parsePointer(Parser.coverage), + backtrackClassDef: this.parsePointer(Parser.classDef), + inputClassDef: this.parsePointer(Parser.classDef), + lookaheadClassDef: this.parsePointer(Parser.classDef), + chainClassSet: this.parseListOfLists(function() { + return { + backtrack: this.parseUShortList(), + input: this.parseUShortList(this.parseShort() - 1), + lookahead: this.parseUShortList(), + lookupRecords: this.parseRecordList(lookupRecordDesc) + }; + }) + }; + } else if (substFormat === 3) { + return { + substFormat: 3, + backtrackCoverage: this.parseList(Parser.pointer(Parser.coverage)), + inputCoverage: this.parseList(Parser.pointer(Parser.coverage)), + lookaheadCoverage: this.parseList(Parser.pointer(Parser.coverage)), + lookupRecords: this.parseRecordList(lookupRecordDesc) + }; + } + check.assert(false, '0x' + start.toString(16) + ': lookup type 6 format must be 1, 2 or 3.'); +}; + +// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#ES +subtableParsers[7] = function parseLookup7() { + // Extension Substitution subtable + var substFormat = this.parseUShort(); + check.argument(substFormat === 1, 'GSUB Extension Substitution subtable identifier-format must be 1'); + var extensionLookupType = this.parseUShort(); + var extensionParser = new Parser(this.data, this.offset + this.parseULong()); + return { + substFormat: 1, + lookupType: extensionLookupType, + extension: subtableParsers[extensionLookupType].call(extensionParser) + }; +}; + +// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#RCCS +subtableParsers[8] = function parseLookup8() { + var substFormat = this.parseUShort(); + check.argument(substFormat === 1, 'GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1'); + return { + substFormat: substFormat, + coverage: this.parsePointer(Parser.coverage), + backtrackCoverage: this.parseList(Parser.pointer(Parser.coverage)), + lookaheadCoverage: this.parseList(Parser.pointer(Parser.coverage)), + substitutes: this.parseUShortList() + }; +}; + +// https://www.microsoft.com/typography/OTSPEC/gsub.htm +function parseGsubTable(data, start) { + start = start || 0; + var p = new Parser(data, start); + var tableVersion = p.parseVersion(1); + check.argument(tableVersion === 1 || tableVersion === 1.1, 'Unsupported GSUB table version.'); + if (tableVersion === 1) { + return { + version: tableVersion, + scripts: p.parseScriptList(), + features: p.parseFeatureList(), + lookups: p.parseLookupList(subtableParsers) + }; + } else { + return { + version: tableVersion, + scripts: p.parseScriptList(), + features: p.parseFeatureList(), + lookups: p.parseLookupList(subtableParsers), + variations: p.parseFeatureVariationsList() + }; + } + +} + +// GSUB Writing ////////////////////////////////////////////// +var subtableMakers = new Array(9); + +subtableMakers[1] = function makeLookup1(subtable) { + if (subtable.substFormat === 1) { + return new table.Table('substitutionTable', [ + {name: 'substFormat', type: 'USHORT', value: 1}, + {name: 'coverage', type: 'TABLE', value: new table.Coverage(subtable.coverage)}, + {name: 'deltaGlyphID', type: 'USHORT', value: subtable.deltaGlyphId} + ]); + } else { + return new table.Table('substitutionTable', [ + {name: 'substFormat', type: 'USHORT', value: 2}, + {name: 'coverage', type: 'TABLE', value: new table.Coverage(subtable.coverage)} + ].concat(table.ushortList('substitute', subtable.substitute))); + } +}; + +subtableMakers[2] = function makeLookup2(subtable) { + check.assert(subtable.substFormat === 1, 'Lookup type 2 substFormat must be 1.'); + return new table.Table('substitutionTable', [ + {name: 'substFormat', type: 'USHORT', value: 1}, + {name: 'coverage', type: 'TABLE', value: new table.Coverage(subtable.coverage)} + ].concat(table.tableList('seqSet', subtable.sequences, function(sequenceSet) { + return new table.Table('sequenceSetTable', table.ushortList('sequence', sequenceSet)); + }))); +}; + +subtableMakers[3] = function makeLookup3(subtable) { + check.assert(subtable.substFormat === 1, 'Lookup type 3 substFormat must be 1.'); + return new table.Table('substitutionTable', [ + {name: 'substFormat', type: 'USHORT', value: 1}, + {name: 'coverage', type: 'TABLE', value: new table.Coverage(subtable.coverage)} + ].concat(table.tableList('altSet', subtable.alternateSets, function(alternateSet) { + return new table.Table('alternateSetTable', table.ushortList('alternate', alternateSet)); + }))); +}; + +subtableMakers[4] = function makeLookup4(subtable) { + check.assert(subtable.substFormat === 1, 'Lookup type 4 substFormat must be 1.'); + return new table.Table('substitutionTable', [ + {name: 'substFormat', type: 'USHORT', value: 1}, + {name: 'coverage', type: 'TABLE', value: new table.Coverage(subtable.coverage)} + ].concat(table.tableList('ligSet', subtable.ligatureSets, function(ligatureSet) { + return new table.Table('ligatureSetTable', table.tableList('ligature', ligatureSet, function(ligature) { + return new table.Table('ligatureTable', + [{name: 'ligGlyph', type: 'USHORT', value: ligature.ligGlyph}] + .concat(table.ushortList('component', ligature.components, ligature.components.length + 1)) + ); + })); + }))); +}; + +subtableMakers[6] = function makeLookup6(subtable) { + if (subtable.substFormat === 1) { + var returnTable = new table.Table('chainContextTable', [ + {name: 'substFormat', type: 'USHORT', value: subtable.substFormat}, + {name: 'coverage', type: 'TABLE', value: new table.Coverage(subtable.coverage)} + ].concat(table.tableList('chainRuleSet', subtable.chainRuleSets, function(chainRuleSet) { + return new table.Table('chainRuleSetTable', table.tableList('chainRule', chainRuleSet, function(chainRule) { + var tableData = table.ushortList('backtrackGlyph', chainRule.backtrack, chainRule.backtrack.length) + .concat(table.ushortList('inputGlyph', chainRule.input, chainRule.input.length + 1)) + .concat(table.ushortList('lookaheadGlyph', chainRule.lookahead, chainRule.lookahead.length)) + .concat(table.ushortList('substitution', [], chainRule.lookupRecords.length)); + + chainRule.lookupRecords.forEach(function (record, i) { + tableData = tableData + .concat({name: 'sequenceIndex' + i, type: 'USHORT', value: record.sequenceIndex}) + .concat({name: 'lookupListIndex' + i, type: 'USHORT', value: record.lookupListIndex}); + }); + return new table.Table('chainRuleTable', tableData); + })); + }))); + return returnTable; + } else if (subtable.substFormat === 2) { + check.assert(false, 'lookup type 6 format 2 is not yet supported.'); + } else if (subtable.substFormat === 3) { + var tableData = [ + {name: 'substFormat', type: 'USHORT', value: subtable.substFormat} ]; + + tableData.push({name: 'backtrackGlyphCount', type: 'USHORT', value: subtable.backtrackCoverage.length}); + subtable.backtrackCoverage.forEach(function (coverage, i) { + tableData.push({name: 'backtrackCoverage' + i, type: 'TABLE', value: new table.Coverage(coverage)}); + }); + tableData.push({name: 'inputGlyphCount', type: 'USHORT', value: subtable.inputCoverage.length}); + subtable.inputCoverage.forEach(function (coverage, i) { + tableData.push({name: 'inputCoverage' + i, type: 'TABLE', value: new table.Coverage(coverage)}); + }); + tableData.push({name: 'lookaheadGlyphCount', type: 'USHORT', value: subtable.lookaheadCoverage.length}); + subtable.lookaheadCoverage.forEach(function (coverage, i) { + tableData.push({name: 'lookaheadCoverage' + i, type: 'TABLE', value: new table.Coverage(coverage)}); + }); + + tableData.push({name: 'substitutionCount', type: 'USHORT', value: subtable.lookupRecords.length}); + subtable.lookupRecords.forEach(function (record, i) { + tableData = tableData + .concat({name: 'sequenceIndex' + i, type: 'USHORT', value: record.sequenceIndex}) + .concat({name: 'lookupListIndex' + i, type: 'USHORT', value: record.lookupListIndex}); + }); + + var returnTable$1 = new table.Table('chainContextTable', tableData); + + return returnTable$1; + } + + check.assert(false, 'lookup type 6 format must be 1, 2 or 3.'); +}; + +function makeGsubTable(gsub) { + return new table.Table('GSUB', [ + {name: 'version', type: 'ULONG', value: 0x10000}, + {name: 'scripts', type: 'TABLE', value: new table.ScriptList(gsub.scripts)}, + {name: 'features', type: 'TABLE', value: new table.FeatureList(gsub.features)}, + {name: 'lookups', type: 'TABLE', value: new table.LookupList(gsub.lookups, subtableMakers)} + ]); +} + +var gsub = { parse: parseGsubTable, make: makeGsubTable }; + +// The `GPOS` table contains kerning pairs, among other things. + +// Parse the metadata `meta` table. +// https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6meta.html +function parseMetaTable(data, start) { + var p = new parse.Parser(data, start); + var tableVersion = p.parseULong(); + check.argument(tableVersion === 1, 'Unsupported META table version.'); + p.parseULong(); // flags - currently unused and set to 0 + p.parseULong(); // tableOffset + var numDataMaps = p.parseULong(); + + var tags = {}; + for (var i = 0; i < numDataMaps; i++) { + var tag = p.parseTag(); + var dataOffset = p.parseULong(); + var dataLength = p.parseULong(); + var text = decode.UTF8(data, start + dataOffset, dataLength); + + tags[tag] = text; + } + return tags; +} + +function makeMetaTable(tags) { + var numTags = Object.keys(tags).length; + var stringPool = ''; + var stringPoolOffset = 16 + numTags * 12; + + var result = new table.Table('meta', [ + {name: 'version', type: 'ULONG', value: 1}, + {name: 'flags', type: 'ULONG', value: 0}, + {name: 'offset', type: 'ULONG', value: stringPoolOffset}, + {name: 'numTags', type: 'ULONG', value: numTags} + ]); + + for (var tag in tags) { + var pos = stringPool.length; + stringPool += tags[tag]; + + result.fields.push({name: 'tag ' + tag, type: 'TAG', value: tag}); + result.fields.push({name: 'offset ' + tag, type: 'ULONG', value: stringPoolOffset + pos}); + result.fields.push({name: 'length ' + tag, type: 'ULONG', value: tags[tag].length}); + } + + result.fields.push({name: 'stringPool', type: 'CHARARRAY', value: stringPool}); + + return result; +} + +var meta = { parse: parseMetaTable, make: makeMetaTable }; + +// The `COLR` table adds support for multi-colored glyphs + +function parseColrTable(data, start) { + var p = new Parser(data, start); + var version = p.parseUShort(); + check.argument(version === 0x0000, 'Only COLRv0 supported.'); + var numBaseGlyphRecords = p.parseUShort(); + var baseGlyphRecordsOffset = p.parseOffset32(); + var layerRecordsOffset = p.parseOffset32(); + var numLayerRecords = p.parseUShort(); + p.relativeOffset = baseGlyphRecordsOffset; + var baseGlyphRecords = p.parseRecordList(numBaseGlyphRecords, { + glyphID: Parser.uShort, + firstLayerIndex: Parser.uShort, + numLayers: Parser.uShort, + }); + p.relativeOffset = layerRecordsOffset; + var layerRecords = p.parseRecordList(numLayerRecords, { + glyphID: Parser.uShort, + paletteIndex: Parser.uShort + }); + + return { + version: version, + baseGlyphRecords: baseGlyphRecords, + layerRecords: layerRecords, + }; +} + +function makeColrTable(ref) { + var version = ref.version; if ( version === void 0 ) version = 0x0000; + var baseGlyphRecords = ref.baseGlyphRecords; if ( baseGlyphRecords === void 0 ) baseGlyphRecords = []; + var layerRecords = ref.layerRecords; if ( layerRecords === void 0 ) layerRecords = []; + + check.argument(version === 0x0000, 'Only COLRv0 supported.'); + var baseGlyphRecordsOffset = 14; + var layerRecordsOffset = baseGlyphRecordsOffset + (baseGlyphRecords.length * 6); + return new table.Table('COLR', [ + { name: 'version', type: 'USHORT', value: version }, + { name: 'numBaseGlyphRecords', type: 'USHORT', value: baseGlyphRecords.length }, + { name: 'baseGlyphRecordsOffset', type: 'ULONG', value: baseGlyphRecordsOffset }, + { name: 'layerRecordsOffset', type: 'ULONG', value: layerRecordsOffset }, + { name: 'numLayerRecords', type: 'USHORT', value: layerRecords.length } ].concat( baseGlyphRecords.map(function (glyph, i) { return [ + { name: 'glyphID_' + i, type: 'USHORT', value: glyph.glyphID }, + { name: 'firstLayerIndex_' + i, type: 'USHORT', value: glyph.firstLayerIndex }, + { name: 'numLayers_' + i, type: 'USHORT', value: glyph.numLayers } ]; }).flat(), + layerRecords.map(function (layer, i) { return [ + { name: 'LayerGlyphID_' + i, type: 'USHORT', value: layer.glyphID }, + { name: 'paletteIndex_' + i, type: 'USHORT', value: layer.paletteIndex } ]; }).flat() )); +} + +var colr = { parse: parseColrTable, make: makeColrTable }; + +// The `CPAL` define a contiguous list of colors (colorRecords) + +// Parse the header `head` table +function parseCpalTable(data, start) { + var p = new Parser(data, start); + var version = p.parseShort(); + var numPaletteEntries = p.parseShort(); + var numPalettes = p.parseShort(); + var numColorRecords = p.parseShort(); + var colorRecordsArrayOffset = p.parseOffset32(); + var colorRecordIndices = p.parseUShortList(numPalettes); + p.relativeOffset = colorRecordsArrayOffset; + var colorRecords = p.parseULongList(numColorRecords); + return { + version: version, + numPaletteEntries: numPaletteEntries, + colorRecords: colorRecords, + colorRecordIndices: colorRecordIndices, + }; +} + +function makeCpalTable(ref) { + var version = ref.version; if ( version === void 0 ) version = 0; + var numPaletteEntries = ref.numPaletteEntries; if ( numPaletteEntries === void 0 ) numPaletteEntries = 0; + var colorRecords = ref.colorRecords; if ( colorRecords === void 0 ) colorRecords = []; + var colorRecordIndices = ref.colorRecordIndices; if ( colorRecordIndices === void 0 ) colorRecordIndices = [0]; + + check.argument(version === 0, 'Only CPALv0 are supported.'); + check.argument(colorRecords.length, 'No colorRecords given.'); + check.argument(colorRecordIndices.length, 'No colorRecordIndices given.'); + check.argument(!numPaletteEntries && colorRecordIndices.length == 1, 'Can\'t infer numPaletteEntries on multiple colorRecordIndices'); + return new table.Table('CPAL', [ + { name: 'version', type: 'USHORT', value: version }, + { name: 'numPaletteEntries', type: 'USHORT', value: numPaletteEntries || colorRecords.length }, + { name: 'numPalettes', type: 'USHORT', value: colorRecordIndices.length }, + { name: 'numColorRecords', type: 'USHORT', value: colorRecords.length }, + { name: 'colorRecordsArrayOffset', type: 'ULONG', value: 12 + 2 * colorRecordIndices.length } ].concat( colorRecordIndices.map(function (palette, i) { return ({ name: 'colorRecordIndices_' + i, type: 'USHORT', value: palette }); }), + colorRecords.map(function (color, i) { return ({ name: 'colorRecords_' + i, type: 'ULONG', value: color }); }) )); +} + +var cpal = { parse: parseCpalTable, make: makeCpalTable }; + +// The `sfnt` wrapper provides organization for the tables in the font. + +function log2(v) { + return Math.log(v) / Math.log(2) | 0; +} + +function computeCheckSum(bytes) { + while (bytes.length % 4 !== 0) { + bytes.push(0); + } + + var sum = 0; + for (var i = 0; i < bytes.length; i += 4) { + sum += (bytes[i] << 24) + + (bytes[i + 1] << 16) + + (bytes[i + 2] << 8) + + (bytes[i + 3]); + } + + sum %= Math.pow(2, 32); + return sum; +} + +function makeTableRecord(tag, checkSum, offset, length) { + return new table.Record('Table Record', [ + {name: 'tag', type: 'TAG', value: tag !== undefined ? tag : ''}, + {name: 'checkSum', type: 'ULONG', value: checkSum !== undefined ? checkSum : 0}, + {name: 'offset', type: 'ULONG', value: offset !== undefined ? offset : 0}, + {name: 'length', type: 'ULONG', value: length !== undefined ? length : 0} + ]); +} + +function makeSfntTable(tables) { + var sfnt = new table.Table('sfnt', [ + {name: 'version', type: 'TAG', value: 'OTTO'}, + {name: 'numTables', type: 'USHORT', value: 0}, + {name: 'searchRange', type: 'USHORT', value: 0}, + {name: 'entrySelector', type: 'USHORT', value: 0}, + {name: 'rangeShift', type: 'USHORT', value: 0} + ]); + sfnt.tables = tables; + sfnt.numTables = tables.length; + var highestPowerOf2 = Math.pow(2, log2(sfnt.numTables)); + sfnt.searchRange = 16 * highestPowerOf2; + sfnt.entrySelector = log2(highestPowerOf2); + sfnt.rangeShift = sfnt.numTables * 16 - sfnt.searchRange; + + var recordFields = []; + var tableFields = []; + + var offset = sfnt.sizeOf() + (makeTableRecord().sizeOf() * sfnt.numTables); + while (offset % 4 !== 0) { + offset += 1; + tableFields.push({name: 'padding', type: 'BYTE', value: 0}); + } + + for (var i = 0; i < tables.length; i += 1) { + var t = tables[i]; + check.argument(t.tableName.length === 4, 'Table name' + t.tableName + ' is invalid.'); + var tableLength = t.sizeOf(); + var tableRecord = makeTableRecord(t.tableName, computeCheckSum(t.encode()), offset, tableLength); + recordFields.push({name: tableRecord.tag + ' Table Record', type: 'RECORD', value: tableRecord}); + tableFields.push({name: t.tableName + ' table', type: 'RECORD', value: t}); + offset += tableLength; + check.argument(!isNaN(offset), 'Something went wrong calculating the offset.'); + while (offset % 4 !== 0) { + offset += 1; + tableFields.push({name: 'padding', type: 'BYTE', value: 0}); + } + } + + // Table records need to be sorted alphabetically. + recordFields.sort(function(r1, r2) { + if (r1.value.tag > r2.value.tag) { + return 1; + } else { + return -1; + } + }); + + sfnt.fields = sfnt.fields.concat(recordFields); + sfnt.fields = sfnt.fields.concat(tableFields); + return sfnt; +} + +// Get the metrics for a character. If the string has more than one character +// this function returns metrics for the first available character. +// You can provide optional fallback metrics if no characters are available. +function metricsForChar(font, chars, notFoundMetrics) { + for (var i = 0; i < chars.length; i += 1) { + var glyphIndex = font.charToGlyphIndex(chars[i]); + if (glyphIndex > 0) { + var glyph = font.glyphs.get(glyphIndex); + return glyph.getMetrics(); + } + } + + return notFoundMetrics; +} + +function average(vs) { + var sum = 0; + for (var i = 0; i < vs.length; i += 1) { + sum += vs[i]; + } + + return sum / vs.length; +} + +// Convert the font object to a SFNT data structure. +// This structure contains all the necessary tables and metadata to create a binary OTF file. +function fontToSfntTable(font) { + var xMins = []; + var yMins = []; + var xMaxs = []; + var yMaxs = []; + var advanceWidths = []; + var leftSideBearings = []; + var rightSideBearings = []; + var firstCharIndex; + var lastCharIndex = 0; + var ulUnicodeRange1 = 0; + var ulUnicodeRange2 = 0; + var ulUnicodeRange3 = 0; + var ulUnicodeRange4 = 0; + + for (var i = 0; i < font.glyphs.length; i += 1) { + var glyph = font.glyphs.get(i); + var unicode = glyph.unicode | 0; + + if (isNaN(glyph.advanceWidth)) { + throw new Error('Glyph ' + glyph.name + ' (' + i + '): advanceWidth is not a number.'); + } + + if (firstCharIndex > unicode || firstCharIndex === undefined) { + // ignore .notdef char + if (unicode > 0) { + firstCharIndex = unicode; + } + } + + if (lastCharIndex < unicode) { + lastCharIndex = unicode; + } + + var position = os2.getUnicodeRange(unicode); + if (position < 32) { + ulUnicodeRange1 |= 1 << position; + } else if (position < 64) { + ulUnicodeRange2 |= 1 << position - 32; + } else if (position < 96) { + ulUnicodeRange3 |= 1 << position - 64; + } else if (position < 123) { + ulUnicodeRange4 |= 1 << position - 96; + } else { + throw new Error('Unicode ranges bits > 123 are reserved for internal usage'); + } + // Skip non-important characters. + if (glyph.name === '.notdef') { continue; } + var metrics = glyph.getMetrics(); + xMins.push(metrics.xMin); + yMins.push(metrics.yMin); + xMaxs.push(metrics.xMax); + yMaxs.push(metrics.yMax); + leftSideBearings.push(metrics.leftSideBearing); + rightSideBearings.push(metrics.rightSideBearing); + advanceWidths.push(glyph.advanceWidth); + } + + var globals = { + xMin: Math.min.apply(null, xMins), + yMin: Math.min.apply(null, yMins), + xMax: Math.max.apply(null, xMaxs), + yMax: Math.max.apply(null, yMaxs), + advanceWidthMax: Math.max.apply(null, advanceWidths), + advanceWidthAvg: average(advanceWidths), + minLeftSideBearing: Math.min.apply(null, leftSideBearings), + maxLeftSideBearing: Math.max.apply(null, leftSideBearings), + minRightSideBearing: Math.min.apply(null, rightSideBearings) + }; + globals.ascender = font.ascender; + globals.descender = font.descender; + + var headTable = head.make({ + flags: 3, // 00000011 (baseline for font at y=0; left sidebearing point at x=0) + unitsPerEm: font.unitsPerEm, + xMin: globals.xMin, + yMin: globals.yMin, + xMax: globals.xMax, + yMax: globals.yMax, + lowestRecPPEM: 3, + createdTimestamp: font.createdTimestamp + }); + + var hheaTable = hhea.make({ + ascender: globals.ascender, + descender: globals.descender, + advanceWidthMax: globals.advanceWidthMax, + minLeftSideBearing: globals.minLeftSideBearing, + minRightSideBearing: globals.minRightSideBearing, + xMaxExtent: globals.maxLeftSideBearing + (globals.xMax - globals.xMin), + numberOfHMetrics: font.glyphs.length + }); + + var maxpTable = maxp.make(font.glyphs.length); + + var os2Table = os2.make(Object.assign({ + xAvgCharWidth: Math.round(globals.advanceWidthAvg), + usFirstCharIndex: firstCharIndex, + usLastCharIndex: lastCharIndex, + ulUnicodeRange1: ulUnicodeRange1, + ulUnicodeRange2: ulUnicodeRange2, + ulUnicodeRange3: ulUnicodeRange3, + ulUnicodeRange4: ulUnicodeRange4, + // See http://typophile.com/node/13081 for more info on vertical metrics. + // We get metrics for typical characters (such as "x" for xHeight). + // We provide some fallback characters if characters are unavailable: their + // ordering was chosen experimentally. + sTypoAscender: globals.ascender, + sTypoDescender: globals.descender, + sTypoLineGap: 0, + usWinAscent: globals.yMax, + usWinDescent: Math.abs(globals.yMin), + ulCodePageRange1: 1, // FIXME: hard-code Latin 1 support for now + sxHeight: metricsForChar(font, 'xyvw', {yMax: Math.round(globals.ascender / 2)}).yMax, + sCapHeight: metricsForChar(font, 'HIKLEFJMNTZBDPRAGOQSUVWXY', globals).yMax, + usDefaultChar: font.hasChar(' ') ? 32 : 0, // Use space as the default character, if available. + usBreakChar: font.hasChar(' ') ? 32 : 0, // Use space as the break character, if available. + }, font.tables.os2)); + + var hmtxTable = hmtx.make(font.glyphs); + var cmapTable = cmap.make(font.glyphs); + + var englishFamilyName = font.getEnglishName('fontFamily'); + var englishStyleName = font.getEnglishName('fontSubfamily'); + var englishFullName = englishFamilyName + ' ' + englishStyleName; + var postScriptName = font.getEnglishName('postScriptName'); + if (!postScriptName) { + postScriptName = englishFamilyName.replace(/\s/g, '') + '-' + englishStyleName; + } + + var names = {}; + for (var n in font.names) { + names[n] = font.names[n]; + } + + if (!names.uniqueID) { + names.uniqueID = {en: font.getEnglishName('manufacturer') + ':' + englishFullName}; + } + + if (!names.postScriptName) { + names.postScriptName = {en: postScriptName}; + } + + if (!names.preferredFamily) { + names.preferredFamily = font.names.fontFamily; + } + + if (!names.preferredSubfamily) { + names.preferredSubfamily = font.names.fontSubfamily; + } + + var languageTags = []; + var nameTable = _name.make(names, languageTags); + var ltagTable = (languageTags.length > 0 ? ltag.make(languageTags) : undefined); + + var postTable = post.make(); + var cffTable = cff.make(font.glyphs, { + version: font.getEnglishName('version'), + fullName: englishFullName, + familyName: englishFamilyName, + weightName: englishStyleName, + postScriptName: postScriptName, + unitsPerEm: font.unitsPerEm, + fontBBox: [0, globals.yMin, globals.ascender, globals.advanceWidthMax] + }); + + var metaTable = (font.metas && Object.keys(font.metas).length > 0) ? meta.make(font.metas) : undefined; + + // The order does not matter because makeSfntTable() will sort them. + var tables = [headTable, hheaTable, maxpTable, os2Table, nameTable, cmapTable, postTable, cffTable, hmtxTable]; + if (ltagTable) { + tables.push(ltagTable); + } + // Optional tables + if (font.tables.gsub) { + tables.push(gsub.make(font.tables.gsub)); + } + if (font.tables.cpal) { + tables.push(cpal.make(font.tables.cpal)); + } + if (font.tables.colr) { + tables.push(colr.make(font.tables.colr)); + } + if (metaTable) { + tables.push(metaTable); + } + + var sfntTable = makeSfntTable(tables); + + // Compute the font's checkSum and store it in head.checkSumAdjustment. + var bytes = sfntTable.encode(); + var checkSum = computeCheckSum(bytes); + var tableFields = sfntTable.fields; + var checkSumAdjusted = false; + for (var i$1 = 0; i$1 < tableFields.length; i$1 += 1) { + if (tableFields[i$1].name === 'head table') { + tableFields[i$1].value.checkSumAdjustment = 0xB1B0AFBA - checkSum; + checkSumAdjusted = true; + break; + } + } + + if (!checkSumAdjusted) { + throw new Error('Could not find head table with checkSum to adjust.'); + } + + return sfntTable; +} + +var sfnt = { make: makeSfntTable, fontToTable: fontToSfntTable, computeCheckSum: computeCheckSum }; + +// The Layout object is the prototype of Substitution objects, and provides + +function searchTag(arr, tag) { + /* jshint bitwise: false */ + var imin = 0; + var imax = arr.length - 1; + while (imin <= imax) { + var imid = (imin + imax) >>> 1; + var val = arr[imid].tag; + if (val === tag) { + return imid; + } else if (val < tag) { + imin = imid + 1; + } else { imax = imid - 1; } + } + // Not found: return -1-insertion point + return -imin - 1; +} + +function binSearch(arr, value) { + /* jshint bitwise: false */ + var imin = 0; + var imax = arr.length - 1; + while (imin <= imax) { + var imid = (imin + imax) >>> 1; + var val = arr[imid]; + if (val === value) { + return imid; + } else if (val < value) { + imin = imid + 1; + } else { imax = imid - 1; } + } + // Not found: return -1-insertion point + return -imin - 1; +} + +// binary search in a list of ranges (coverage, class definition) +function searchRange(ranges, value) { + // jshint bitwise: false + var range; + var imin = 0; + var imax = ranges.length - 1; + while (imin <= imax) { + var imid = (imin + imax) >>> 1; + range = ranges[imid]; + var start = range.start; + if (start === value) { + return range; + } else if (start < value) { + imin = imid + 1; + } else { imax = imid - 1; } + } + if (imin > 0) { + range = ranges[imin - 1]; + if (value > range.end) { return 0; } + return range; + } +} + +/** + * @exports opentype.Layout + * @class + */ +function Layout(font, tableName) { + this.font = font; + this.tableName = tableName; +} + +Layout.prototype = { + + /** + * Binary search an object by "tag" property + * @instance + * @function searchTag + * @memberof opentype.Layout + * @param {Array} arr + * @param {string} tag + * @return {number} + */ + searchTag: searchTag, + + /** + * Binary search in a list of numbers + * @instance + * @function binSearch + * @memberof opentype.Layout + * @param {Array} arr + * @param {number} value + * @return {number} + */ + binSearch: binSearch, + + /** + * Get or create the Layout table (GSUB, GPOS etc). + * @param {boolean} create - Whether to create a new one. + * @return {Object} The GSUB or GPOS table. + */ + getTable: function(create) { + var layout = this.font.tables[this.tableName]; + if (!layout && create) { + layout = this.font.tables[this.tableName] = this.createDefaultTable(); + } + return layout; + }, + + /** + * Returns all scripts in the substitution table. + * @instance + * @return {Array} + */ + getScriptNames: function() { + var layout = this.getTable(); + if (!layout) { return []; } + return layout.scripts.map(function(script) { + return script.tag; + }); + }, + + /** + * Returns the best bet for a script name. + * Returns 'DFLT' if it exists. + * If not, returns 'latn' if it exists. + * If neither exist, returns undefined. + */ + getDefaultScriptName: function() { + var layout = this.getTable(); + if (!layout) { return; } + var hasLatn = false; + for (var i = 0; i < layout.scripts.length; i++) { + var name = layout.scripts[i].tag; + if (name === 'DFLT') { return name; } + if (name === 'latn') { hasLatn = true; } + } + if (hasLatn) { return 'latn'; } + }, + + /** + * Returns all LangSysRecords in the given script. + * @instance + * @param {string} [script='DFLT'] + * @param {boolean} create - forces the creation of this script table if it doesn't exist. + * @return {Object} An object with tag and script properties. + */ + getScriptTable: function(script, create) { + var layout = this.getTable(create); + if (layout) { + script = script || 'DFLT'; + var scripts = layout.scripts; + var pos = searchTag(layout.scripts, script); + if (pos >= 0) { + return scripts[pos].script; + } else if (create) { + var scr = { + tag: script, + script: { + defaultLangSys: {reserved: 0, reqFeatureIndex: 0xffff, featureIndexes: []}, + langSysRecords: [] + } + }; + scripts.splice(-1 - pos, 0, scr); + return scr.script; + } + } + }, + + /** + * Returns a language system table + * @instance + * @param {string} [script='DFLT'] + * @param {string} [language='dlft'] + * @param {boolean} create - forces the creation of this langSysTable if it doesn't exist. + * @return {Object} + */ + getLangSysTable: function(script, language, create) { + var scriptTable = this.getScriptTable(script, create); + if (scriptTable) { + if (!language || language === 'dflt' || language === 'DFLT') { + return scriptTable.defaultLangSys; + } + var pos = searchTag(scriptTable.langSysRecords, language); + if (pos >= 0) { + return scriptTable.langSysRecords[pos].langSys; + } else if (create) { + var langSysRecord = { + tag: language, + langSys: {reserved: 0, reqFeatureIndex: 0xffff, featureIndexes: []} + }; + scriptTable.langSysRecords.splice(-1 - pos, 0, langSysRecord); + return langSysRecord.langSys; + } + } + }, + + /** + * Get a specific feature table. + * @instance + * @param {string} [script='DFLT'] + * @param {string} [language='dlft'] + * @param {string} feature - One of the codes listed at https://www.microsoft.com/typography/OTSPEC/featurelist.htm + * @param {boolean} create - forces the creation of the feature table if it doesn't exist. + * @return {Object} + */ + getFeatureTable: function(script, language, feature, create) { + var langSysTable = this.getLangSysTable(script, language, create); + if (langSysTable) { + var featureRecord; + var featIndexes = langSysTable.featureIndexes; + var allFeatures = this.font.tables[this.tableName].features; + // The FeatureIndex array of indices is in arbitrary order, + // even if allFeatures is sorted alphabetically by feature tag. + for (var i = 0; i < featIndexes.length; i++) { + featureRecord = allFeatures[featIndexes[i]]; + if (featureRecord.tag === feature) { + return featureRecord.feature; + } + } + if (create) { + var index = allFeatures.length; + // Automatic ordering of features would require to shift feature indexes in the script list. + check.assert(index === 0 || feature >= allFeatures[index - 1].tag, 'Features must be added in alphabetical order.'); + featureRecord = { + tag: feature, + feature: { params: 0, lookupListIndexes: [] } + }; + allFeatures.push(featureRecord); + featIndexes.push(index); + return featureRecord.feature; + } + } + }, + + /** + * Get the lookup tables of a given type for a script/language/feature. + * @instance + * @param {string} [script='DFLT'] + * @param {string} [language='dlft'] + * @param {string} feature - 4-letter feature code + * @param {number} lookupType - 1 to 9 + * @param {boolean} create - forces the creation of the lookup table if it doesn't exist, with no subtables. + * @return {Object[]} + */ + getLookupTables: function(script, language, feature, lookupType, create) { + var featureTable = this.getFeatureTable(script, language, feature, create); + var tables = []; + if (featureTable) { + var lookupTable; + var lookupListIndexes = featureTable.lookupListIndexes; + var allLookups = this.font.tables[this.tableName].lookups; + // lookupListIndexes are in no particular order, so use naive search. + for (var i = 0; i < lookupListIndexes.length; i++) { + lookupTable = allLookups[lookupListIndexes[i]]; + if (lookupTable.lookupType === lookupType) { + tables.push(lookupTable); + } + } + if (tables.length === 0 && create) { + lookupTable = { + lookupType: lookupType, + lookupFlag: 0, + subtables: [], + markFilteringSet: undefined + }; + var index = allLookups.length; + allLookups.push(lookupTable); + lookupListIndexes.push(index); + return [lookupTable]; + } + } + return tables; + }, + + /** + * Find a glyph in a class definition table + * https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2#class-definition-table + * @param {object} classDefTable - an OpenType Layout class definition table + * @param {number} glyphIndex - the index of the glyph to find + * @returns {number} -1 if not found + */ + getGlyphClass: function(classDefTable, glyphIndex) { + switch (classDefTable.format) { + case 1: + if (classDefTable.startGlyph <= glyphIndex && glyphIndex < classDefTable.startGlyph + classDefTable.classes.length) { + return classDefTable.classes[glyphIndex - classDefTable.startGlyph]; + } + return 0; + case 2: + var range = searchRange(classDefTable.ranges, glyphIndex); + return range ? range.classId : 0; + } + }, + + /** + * Find a glyph in a coverage table + * https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2#coverage-table + * @param {object} coverageTable - an OpenType Layout coverage table + * @param {number} glyphIndex - the index of the glyph to find + * @returns {number} -1 if not found + */ + getCoverageIndex: function(coverageTable, glyphIndex) { + switch (coverageTable.format) { + case 1: + var index = binSearch(coverageTable.glyphs, glyphIndex); + return index >= 0 ? index : -1; + case 2: + var range = searchRange(coverageTable.ranges, glyphIndex); + return range ? range.index + glyphIndex - range.start : -1; + } + }, + + /** + * Returns the list of glyph indexes of a coverage table. + * Format 1: the list is stored raw + * Format 2: compact list as range records. + * @instance + * @param {Object} coverageTable + * @return {Array} + */ + expandCoverage: function(coverageTable) { + if (coverageTable.format === 1) { + return coverageTable.glyphs; + } else { + var glyphs = []; + var ranges = coverageTable.ranges; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + var start = range.start; + var end = range.end; + for (var j = start; j <= end; j++) { + glyphs.push(j); + } + } + return glyphs; + } + } + +}; + +// The Position object provides utility methods to manipulate + +/** + * @exports opentype.Position + * @class + * @extends opentype.Layout + * @param {opentype.Font} + * @constructor + */ +function Position(font) { + Layout.call(this, font, 'gpos'); +} + +Position.prototype = Layout.prototype; + +/** + * Init some data for faster and easier access later. + */ +Position.prototype.init = function() { + var script = this.getDefaultScriptName(); + this.defaultKerningTables = this.getKerningTables(script); +}; + +/** + * Find a glyph pair in a list of lookup tables of type 2 and retrieve the xAdvance kerning value. + * + * @param {integer} leftIndex - left glyph index + * @param {integer} rightIndex - right glyph index + * @returns {integer} + */ +Position.prototype.getKerningValue = function(kerningLookups, leftIndex, rightIndex) { + for (var i = 0; i < kerningLookups.length; i++) { + var subtables = kerningLookups[i].subtables; + for (var j = 0; j < subtables.length; j++) { + var subtable = subtables[j]; + var covIndex = this.getCoverageIndex(subtable.coverage, leftIndex); + if (covIndex < 0) { continue; } + switch (subtable.posFormat) { + case 1: + // Search Pair Adjustment Positioning Format 1 + var pairSet = subtable.pairSets[covIndex]; + for (var k = 0; k < pairSet.length; k++) { + var pair = pairSet[k]; + if (pair.secondGlyph === rightIndex) { + return pair.value1 && pair.value1.xAdvance || 0; + } + } + break; // left glyph found, not right glyph - try next subtable + case 2: + // Search Pair Adjustment Positioning Format 2 + var class1 = this.getGlyphClass(subtable.classDef1, leftIndex); + var class2 = this.getGlyphClass(subtable.classDef2, rightIndex); + var pair$1 = subtable.classRecords[class1][class2]; + return pair$1.value1 && pair$1.value1.xAdvance || 0; + } + } + } + return 0; +}; + +/** + * List all kerning lookup tables. + * + * @param {string} [script='DFLT'] - use font.position.getDefaultScriptName() for a better default value + * @param {string} [language='dflt'] + * @return {object[]} The list of kerning lookup tables (may be empty), or undefined if there is no GPOS table (and we should use the kern table) + */ +Position.prototype.getKerningTables = function(script, language) { + if (this.font.tables.gpos) { + return this.getLookupTables(script, language, 'kern', 2); + } +}; + +// The Substitution object provides utility methods to manipulate + +/** + * @exports opentype.Substitution + * @class + * @extends opentype.Layout + * @param {opentype.Font} + * @constructor + */ +function Substitution(font) { + Layout.call(this, font, 'gsub'); +} + +// Check if 2 arrays of primitives are equal. +function arraysEqual(ar1, ar2) { + var n = ar1.length; + if (n !== ar2.length) { return false; } + for (var i = 0; i < n; i++) { + if (ar1[i] !== ar2[i]) { return false; } + } + return true; +} + +// Find the first subtable of a lookup table in a particular format. +function getSubstFormat(lookupTable, format, defaultSubtable) { + var subtables = lookupTable.subtables; + for (var i = 0; i < subtables.length; i++) { + var subtable = subtables[i]; + if (subtable.substFormat === format) { + return subtable; + } + } + if (defaultSubtable) { + subtables.push(defaultSubtable); + return defaultSubtable; + } + return undefined; +} + +Substitution.prototype = Layout.prototype; + +/** + * Create a default GSUB table. + * @return {Object} gsub - The GSUB table. + */ +Substitution.prototype.createDefaultTable = function() { + // Generate a default empty GSUB table with just a DFLT script and dflt lang sys. + return { + version: 1, + scripts: [{ + tag: 'DFLT', + script: { + defaultLangSys: { reserved: 0, reqFeatureIndex: 0xffff, featureIndexes: [] }, + langSysRecords: [] + } + }], + features: [], + lookups: [] + }; +}; + +/** + * List all single substitutions (lookup type 1) for a given script, language, and feature. + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + * @param {string} feature - 4-character feature name ('aalt', 'salt', 'ss01'...) + * @return {Array} substitutions - The list of substitutions. + */ +Substitution.prototype.getSingle = function(feature, script, language) { + var substitutions = []; + var lookupTables = this.getLookupTables(script, language, feature, 1); + for (var idx = 0; idx < lookupTables.length; idx++) { + var subtables = lookupTables[idx].subtables; + for (var i = 0; i < subtables.length; i++) { + var subtable = subtables[i]; + var glyphs = this.expandCoverage(subtable.coverage); + var j = (void 0); + if (subtable.substFormat === 1) { + var delta = subtable.deltaGlyphId; + for (j = 0; j < glyphs.length; j++) { + var glyph = glyphs[j]; + substitutions.push({ sub: glyph, by: glyph + delta }); + } + } else { + var substitute = subtable.substitute; + for (j = 0; j < glyphs.length; j++) { + substitutions.push({ sub: glyphs[j], by: substitute[j] }); + } + } + } + } + return substitutions; +}; + +/** + * List all multiple substitutions (lookup type 2) for a given script, language, and feature. + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + * @param {string} feature - 4-character feature name ('ccmp', 'stch') + * @return {Array} substitutions - The list of substitutions. + */ +Substitution.prototype.getMultiple = function(feature, script, language) { + var substitutions = []; + var lookupTables = this.getLookupTables(script, language, feature, 2); + for (var idx = 0; idx < lookupTables.length; idx++) { + var subtables = lookupTables[idx].subtables; + for (var i = 0; i < subtables.length; i++) { + var subtable = subtables[i]; + var glyphs = this.expandCoverage(subtable.coverage); + var j = (void 0); + + for (j = 0; j < glyphs.length; j++) { + var glyph = glyphs[j]; + var replacements = subtable.sequences[j]; + substitutions.push({ sub: glyph, by: replacements }); + } + } + } + return substitutions; +}; + +/** + * List all alternates (lookup type 3) for a given script, language, and feature. + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + * @param {string} feature - 4-character feature name ('aalt', 'salt'...) + * @return {Array} alternates - The list of alternates + */ +Substitution.prototype.getAlternates = function(feature, script, language) { + var alternates = []; + var lookupTables = this.getLookupTables(script, language, feature, 3); + for (var idx = 0; idx < lookupTables.length; idx++) { + var subtables = lookupTables[idx].subtables; + for (var i = 0; i < subtables.length; i++) { + var subtable = subtables[i]; + var glyphs = this.expandCoverage(subtable.coverage); + var alternateSets = subtable.alternateSets; + for (var j = 0; j < glyphs.length; j++) { + alternates.push({ sub: glyphs[j], by: alternateSets[j] }); + } + } + } + return alternates; +}; + +/** + * List all ligatures (lookup type 4) for a given script, language, and feature. + * The result is an array of ligature objects like { sub: [ids], by: id } + * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...) + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + * @return {Array} ligatures - The list of ligatures. + */ +Substitution.prototype.getLigatures = function(feature, script, language) { + var ligatures = []; + var lookupTables = this.getLookupTables(script, language, feature, 4); + for (var idx = 0; idx < lookupTables.length; idx++) { + var subtables = lookupTables[idx].subtables; + for (var i = 0; i < subtables.length; i++) { + var subtable = subtables[i]; + var glyphs = this.expandCoverage(subtable.coverage); + var ligatureSets = subtable.ligatureSets; + for (var j = 0; j < glyphs.length; j++) { + var startGlyph = glyphs[j]; + var ligSet = ligatureSets[j]; + for (var k = 0; k < ligSet.length; k++) { + var lig = ligSet[k]; + ligatures.push({ + sub: [startGlyph].concat(lig.components), + by: lig.ligGlyph + }); + } + } + } + } + return ligatures; +}; + +/** + * Add or modify a single substitution (lookup type 1) + * Format 2, more flexible, is always used. + * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...) + * @param {Object} substitution - { sub: id, by: id } (format 1 is not supported) + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + */ +Substitution.prototype.addSingle = function(feature, substitution, script, language) { + var lookupTable = this.getLookupTables(script, language, feature, 1, true)[0]; + var subtable = getSubstFormat(lookupTable, 2, { // lookup type 1 subtable, format 2, coverage format 1 + substFormat: 2, + coverage: {format: 1, glyphs: []}, + substitute: [] + }); + check.assert(subtable.coverage.format === 1, 'Single: unable to modify coverage table format ' + subtable.coverage.format); + var coverageGlyph = substitution.sub; + var pos = this.binSearch(subtable.coverage.glyphs, coverageGlyph); + if (pos < 0) { + pos = -1 - pos; + subtable.coverage.glyphs.splice(pos, 0, coverageGlyph); + subtable.substitute.splice(pos, 0, 0); + } + subtable.substitute[pos] = substitution.by; +}; + +/** + * Add or modify a multiple substitution (lookup type 2) + * @param {string} feature - 4-letter feature name ('ccmp', 'stch') + * @param {Object} substitution - { sub: id, by: [id] } for format 2. + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + */ +Substitution.prototype.addMultiple = function(feature, substitution, script, language) { + check.assert(substitution.by instanceof Array && substitution.by.length > 1, 'Multiple: "by" must be an array of two or more ids'); + var lookupTable = this.getLookupTables(script, language, feature, 2, true)[0]; + var subtable = getSubstFormat(lookupTable, 1, { // lookup type 2 subtable, format 1, coverage format 1 + substFormat: 1, + coverage: {format: 1, glyphs: []}, + sequences: [] + }); + check.assert(subtable.coverage.format === 1, 'Multiple: unable to modify coverage table format ' + subtable.coverage.format); + var coverageGlyph = substitution.sub; + var pos = this.binSearch(subtable.coverage.glyphs, coverageGlyph); + if (pos < 0) { + pos = -1 - pos; + subtable.coverage.glyphs.splice(pos, 0, coverageGlyph); + subtable.sequences.splice(pos, 0, 0); + } + subtable.sequences[pos] = substitution.by; +}; + +/** + * Add or modify an alternate substitution (lookup type 3) + * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...) + * @param {Object} substitution - { sub: id, by: [ids] } + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + */ +Substitution.prototype.addAlternate = function(feature, substitution, script, language) { + var lookupTable = this.getLookupTables(script, language, feature, 3, true)[0]; + var subtable = getSubstFormat(lookupTable, 1, { // lookup type 3 subtable, format 1, coverage format 1 + substFormat: 1, + coverage: {format: 1, glyphs: []}, + alternateSets: [] + }); + check.assert(subtable.coverage.format === 1, 'Alternate: unable to modify coverage table format ' + subtable.coverage.format); + var coverageGlyph = substitution.sub; + var pos = this.binSearch(subtable.coverage.glyphs, coverageGlyph); + if (pos < 0) { + pos = -1 - pos; + subtable.coverage.glyphs.splice(pos, 0, coverageGlyph); + subtable.alternateSets.splice(pos, 0, 0); + } + subtable.alternateSets[pos] = substitution.by; +}; + +/** + * Add a ligature (lookup type 4) + * Ligatures with more components must be stored ahead of those with fewer components in order to be found + * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...) + * @param {Object} ligature - { sub: [ids], by: id } + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + */ +Substitution.prototype.addLigature = function(feature, ligature, script, language) { + var lookupTable = this.getLookupTables(script, language, feature, 4, true)[0]; + var subtable = lookupTable.subtables[0]; + if (!subtable) { + subtable = { // lookup type 4 subtable, format 1, coverage format 1 + substFormat: 1, + coverage: { format: 1, glyphs: [] }, + ligatureSets: [] + }; + lookupTable.subtables[0] = subtable; + } + check.assert(subtable.coverage.format === 1, 'Ligature: unable to modify coverage table format ' + subtable.coverage.format); + var coverageGlyph = ligature.sub[0]; + var ligComponents = ligature.sub.slice(1); + var ligatureTable = { + ligGlyph: ligature.by, + components: ligComponents + }; + var pos = this.binSearch(subtable.coverage.glyphs, coverageGlyph); + if (pos >= 0) { + // ligatureSet already exists + var ligatureSet = subtable.ligatureSets[pos]; + for (var i = 0; i < ligatureSet.length; i++) { + // If ligature already exists, return. + if (arraysEqual(ligatureSet[i].components, ligComponents)) { + return; + } + } + // ligature does not exist: add it. + ligatureSet.push(ligatureTable); + } else { + // Create a new ligatureSet and add coverage for the first glyph. + pos = -1 - pos; + subtable.coverage.glyphs.splice(pos, 0, coverageGlyph); + subtable.ligatureSets.splice(pos, 0, [ligatureTable]); + } +}; + +/** + * List all feature data for a given script and language. + * @param {string} feature - 4-letter feature name + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + * @return {Array} substitutions - The list of substitutions. + */ +Substitution.prototype.getFeature = function(feature, script, language) { + if (/ss\d\d/.test(feature)) { + // ss01 - ss20 + return this.getSingle(feature, script, language); + } + switch (feature) { + case 'aalt': + case 'salt': + return this.getSingle(feature, script, language) + .concat(this.getAlternates(feature, script, language)); + case 'dlig': + case 'liga': + case 'rlig': + return this.getLigatures(feature, script, language); + case 'ccmp': + return this.getMultiple(feature, script, language) + .concat(this.getLigatures(feature, script, language)); + case 'stch': + return this.getMultiple(feature, script, language); + } + return undefined; +}; + +/** + * Add a substitution to a feature for a given script and language. + * @param {string} feature - 4-letter feature name + * @param {Object} sub - the substitution to add (an object like { sub: id or [ids], by: id or [ids] }) + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + */ +Substitution.prototype.add = function(feature, sub, script, language) { + if (/ss\d\d/.test(feature)) { + // ss01 - ss20 + return this.addSingle(feature, sub, script, language); + } + switch (feature) { + case 'aalt': + case 'salt': + if (typeof sub.by === 'number') { + return this.addSingle(feature, sub, script, language); + } + return this.addAlternate(feature, sub, script, language); + case 'dlig': + case 'liga': + case 'rlig': + return this.addLigature(feature, sub, script, language); + case 'ccmp': + if (sub.by instanceof Array) { + return this.addMultiple(feature, sub, script, language); + } + return this.addLigature(feature, sub, script, language); + } + return undefined; +}; + +function checkArgument(expression, message) { + if (!expression) { + throw message; + } +} + +// The `glyf` table describes the glyphs in TrueType outline format. + +// Parse the coordinate data for a glyph. +function parseGlyphCoordinate(p, flag, previousValue, shortVectorBitMask, sameBitMask) { + var v; + if ((flag & shortVectorBitMask) > 0) { + // The coordinate is 1 byte long. + v = p.parseByte(); + // The `same` bit is re-used for short values to signify the sign of the value. + if ((flag & sameBitMask) === 0) { + v = -v; + } + + v = previousValue + v; + } else { + // The coordinate is 2 bytes long. + // If the `same` bit is set, the coordinate is the same as the previous coordinate. + if ((flag & sameBitMask) > 0) { + v = previousValue; + } else { + // Parse the coordinate as a signed 16-bit delta value. + v = previousValue + p.parseShort(); + } + } + + return v; +} + +// Parse a TrueType glyph. +function parseGlyph(glyph, data, start) { + var p = new parse.Parser(data, start); + glyph.numberOfContours = p.parseShort(); + glyph._xMin = p.parseShort(); + glyph._yMin = p.parseShort(); + glyph._xMax = p.parseShort(); + glyph._yMax = p.parseShort(); + var flags; + var flag; + + if (glyph.numberOfContours > 0) { + // This glyph is not a composite. + var endPointIndices = glyph.endPointIndices = []; + for (var i = 0; i < glyph.numberOfContours; i += 1) { + endPointIndices.push(p.parseUShort()); + } + + glyph.instructionLength = p.parseUShort(); + glyph.instructions = []; + for (var i$1 = 0; i$1 < glyph.instructionLength; i$1 += 1) { + glyph.instructions.push(p.parseByte()); + } + + var numberOfCoordinates = endPointIndices[endPointIndices.length - 1] + 1; + flags = []; + for (var i$2 = 0; i$2 < numberOfCoordinates; i$2 += 1) { + flag = p.parseByte(); + flags.push(flag); + // If bit 3 is set, we repeat this flag n times, where n is the next byte. + if ((flag & 8) > 0) { + var repeatCount = p.parseByte(); + for (var j = 0; j < repeatCount; j += 1) { + flags.push(flag); + i$2 += 1; + } + } + } + + check.argument(flags.length === numberOfCoordinates, 'Bad flags.'); + + if (endPointIndices.length > 0) { + var points = []; + var point; + // X/Y coordinates are relative to the previous point, except for the first point which is relative to 0,0. + if (numberOfCoordinates > 0) { + for (var i$3 = 0; i$3 < numberOfCoordinates; i$3 += 1) { + flag = flags[i$3]; + point = {}; + point.onCurve = !!(flag & 1); + point.lastPointOfContour = endPointIndices.indexOf(i$3) >= 0; + points.push(point); + } + + var px = 0; + for (var i$4 = 0; i$4 < numberOfCoordinates; i$4 += 1) { + flag = flags[i$4]; + point = points[i$4]; + point.x = parseGlyphCoordinate(p, flag, px, 2, 16); + px = point.x; + } + + var py = 0; + for (var i$5 = 0; i$5 < numberOfCoordinates; i$5 += 1) { + flag = flags[i$5]; + point = points[i$5]; + point.y = parseGlyphCoordinate(p, flag, py, 4, 32); + py = point.y; + } + } + + glyph.points = points; + } else { + glyph.points = []; + } + } else if (glyph.numberOfContours === 0) { + glyph.points = []; + } else { + glyph.isComposite = true; + glyph.points = []; + glyph.components = []; + var moreComponents = true; + while (moreComponents) { + flags = p.parseUShort(); + var component = { + glyphIndex: p.parseUShort(), + xScale: 1, + scale01: 0, + scale10: 0, + yScale: 1, + dx: 0, + dy: 0 + }; + if ((flags & 1) > 0) { + // The arguments are words + if ((flags & 2) > 0) { + // values are offset + component.dx = p.parseShort(); + component.dy = p.parseShort(); + } else { + // values are matched points + component.matchedPoints = [p.parseUShort(), p.parseUShort()]; + } + + } else { + // The arguments are bytes + if ((flags & 2) > 0) { + // values are offset + component.dx = p.parseChar(); + component.dy = p.parseChar(); + } else { + // values are matched points + component.matchedPoints = [p.parseByte(), p.parseByte()]; + } + } + + if ((flags & 8) > 0) { + // We have a scale + component.xScale = component.yScale = p.parseF2Dot14(); + } else if ((flags & 64) > 0) { + // We have an X / Y scale + component.xScale = p.parseF2Dot14(); + component.yScale = p.parseF2Dot14(); + } else if ((flags & 128) > 0) { + // We have a 2x2 transformation + component.xScale = p.parseF2Dot14(); + component.scale01 = p.parseF2Dot14(); + component.scale10 = p.parseF2Dot14(); + component.yScale = p.parseF2Dot14(); + } + + glyph.components.push(component); + moreComponents = !!(flags & 32); + } + if (flags & 0x100) { + // We have instructions + glyph.instructionLength = p.parseUShort(); + glyph.instructions = []; + for (var i$6 = 0; i$6 < glyph.instructionLength; i$6 += 1) { + glyph.instructions.push(p.parseByte()); + } + } + } +} + +// Transform an array of points and return a new array. +function transformPoints(points, transform) { + var newPoints = []; + for (var i = 0; i < points.length; i += 1) { + var pt = points[i]; + var newPt = { + x: transform.xScale * pt.x + transform.scale01 * pt.y + transform.dx, + y: transform.scale10 * pt.x + transform.yScale * pt.y + transform.dy, + onCurve: pt.onCurve, + lastPointOfContour: pt.lastPointOfContour + }; + newPoints.push(newPt); + } + + return newPoints; +} + +function getContours(points) { + var contours = []; + var currentContour = []; + for (var i = 0; i < points.length; i += 1) { + var pt = points[i]; + currentContour.push(pt); + if (pt.lastPointOfContour) { + contours.push(currentContour); + currentContour = []; + } + } + + check.argument(currentContour.length === 0, 'There are still points left in the current contour.'); + return contours; +} + +// Convert the TrueType glyph outline to a Path. +function getPath(points) { + var p = new Path(); + if (!points) { + return p; + } + + var contours = getContours(points); + + for (var contourIndex = 0; contourIndex < contours.length; ++contourIndex) { + var contour = contours[contourIndex]; + + var prev = null; + var curr = contour[contour.length - 1]; + var next = contour[0]; + + if (curr.onCurve) { + p.moveTo(curr.x, curr.y); + } else { + if (next.onCurve) { + p.moveTo(next.x, next.y); + } else { + // If both first and last points are off-curve, start at their middle. + var start = {x: (curr.x + next.x) * 0.5, y: (curr.y + next.y) * 0.5}; + p.moveTo(start.x, start.y); + } + } + + for (var i = 0; i < contour.length; ++i) { + prev = curr; + curr = next; + next = contour[(i + 1) % contour.length]; + + if (curr.onCurve) { + // This is a straight line. + p.lineTo(curr.x, curr.y); + } else { + var prev2 = prev; + var next2 = next; + + if (!prev.onCurve) { + prev2 = { x: (curr.x + prev.x) * 0.5, y: (curr.y + prev.y) * 0.5 }; + } + + if (!next.onCurve) { + next2 = { x: (curr.x + next.x) * 0.5, y: (curr.y + next.y) * 0.5 }; + } + + p.quadraticCurveTo(curr.x, curr.y, next2.x, next2.y); + } + } + + p.closePath(); + } + return p; +} + +function buildPath(glyphs, glyph) { + if (glyph.isComposite) { + for (var j = 0; j < glyph.components.length; j += 1) { + var component = glyph.components[j]; + var componentGlyph = glyphs.get(component.glyphIndex); + // Force the ttfGlyphLoader to parse the glyph. + componentGlyph.getPath(); + if (componentGlyph.points) { + var transformedPoints = (void 0); + if (component.matchedPoints === undefined) { + // component positioned by offset + transformedPoints = transformPoints(componentGlyph.points, component); + } else { + // component positioned by matched points + if ((component.matchedPoints[0] > glyph.points.length - 1) || + (component.matchedPoints[1] > componentGlyph.points.length - 1)) { + throw Error('Matched points out of range in ' + glyph.name); + } + var firstPt = glyph.points[component.matchedPoints[0]]; + var secondPt = componentGlyph.points[component.matchedPoints[1]]; + var transform = { + xScale: component.xScale, scale01: component.scale01, + scale10: component.scale10, yScale: component.yScale, + dx: 0, dy: 0 + }; + secondPt = transformPoints([secondPt], transform)[0]; + transform.dx = firstPt.x - secondPt.x; + transform.dy = firstPt.y - secondPt.y; + transformedPoints = transformPoints(componentGlyph.points, transform); + } + glyph.points = glyph.points.concat(transformedPoints); + } + } + } + + return getPath(glyph.points); +} + +function parseGlyfTableAll(data, start, loca, font) { + var glyphs = new glyphset.GlyphSet(font); + + // The last element of the loca table is invalid. + for (var i = 0; i < loca.length - 1; i += 1) { + var offset = loca[i]; + var nextOffset = loca[i + 1]; + if (offset !== nextOffset) { + glyphs.push(i, glyphset.ttfGlyphLoader(font, i, parseGlyph, data, start + offset, buildPath)); + } else { + glyphs.push(i, glyphset.glyphLoader(font, i)); + } + } + + return glyphs; +} + +function parseGlyfTableOnLowMemory(data, start, loca, font) { + var glyphs = new glyphset.GlyphSet(font); + + font._push = function(i) { + var offset = loca[i]; + var nextOffset = loca[i + 1]; + if (offset !== nextOffset) { + glyphs.push(i, glyphset.ttfGlyphLoader(font, i, parseGlyph, data, start + offset, buildPath)); + } else { + glyphs.push(i, glyphset.glyphLoader(font, i)); + } + }; + + return glyphs; +} + +// Parse all the glyphs according to the offsets from the `loca` table. +function parseGlyfTable(data, start, loca, font, opt) { + if (opt.lowMemory) + { return parseGlyfTableOnLowMemory(data, start, loca, font); } + else + { return parseGlyfTableAll(data, start, loca, font); } +} + +var glyf = { getPath: getPath, parse: parseGlyfTable}; + +/* A TrueType font hinting interpreter. +* +* (c) 2017 Axel Kittenberger +* +* This interpreter has been implemented according to this documentation: +* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM05/Chap5.html +* +* According to the documentation F24DOT6 values are used for pixels. +* That means calculation is 1/64 pixel accurate and uses integer operations. +* However, Javascript has floating point operations by default and only +* those are available. One could make a case to simulate the 1/64 accuracy +* exactly by truncating after every division operation +* (for example with << 0) to get pixel exactly results as other TrueType +* implementations. It may make sense since some fonts are pixel optimized +* by hand using DELTAP instructions. The current implementation doesn't +* and rather uses full floating point precision. +* +* xScale, yScale and rotation is currently ignored. +* +* A few non-trivial instructions are missing as I didn't encounter yet +* a font that used them to test a possible implementation. +* +* Some fonts seem to use undocumented features regarding the twilight zone. +* Only some of them are implemented as they were encountered. +* +* The exports.DEBUG statements are removed on the minified distribution file. +*/ + +var instructionTable; +var exec; +var execGlyph; +var execComponent; + +/* +* Creates a hinting object. +* +* There ought to be exactly one +* for each truetype font that is used for hinting. +*/ +function Hinting(font) { + // the font this hinting object is for + this.font = font; + + this.getCommands = function (hPoints) { + return glyf.getPath(hPoints).commands; + }; + + // cached states + this._fpgmState = + this._prepState = + undefined; + + // errorState + // 0 ... all okay + // 1 ... had an error in a glyf, + // continue working but stop spamming + // the console + // 2 ... error at prep, stop hinting at this ppem + // 3 ... error at fpeg, stop hinting for this font at all + this._errorState = 0; +} + +/* +* Not rounding. +*/ +function roundOff(v) { + return v; +} + +/* +* Rounding to grid. +*/ +function roundToGrid(v) { + //Rounding in TT is supposed to "symmetrical around zero" + return Math.sign(v) * Math.round(Math.abs(v)); +} + +/* +* Rounding to double grid. +*/ +function roundToDoubleGrid(v) { + return Math.sign(v) * Math.round(Math.abs(v * 2)) / 2; +} + +/* +* Rounding to half grid. +*/ +function roundToHalfGrid(v) { + return Math.sign(v) * (Math.round(Math.abs(v) + 0.5) - 0.5); +} + +/* +* Rounding to up to grid. +*/ +function roundUpToGrid(v) { + return Math.sign(v) * Math.ceil(Math.abs(v)); +} + +/* +* Rounding to down to grid. +*/ +function roundDownToGrid(v) { + return Math.sign(v) * Math.floor(Math.abs(v)); +} + +/* +* Super rounding. +*/ +var roundSuper = function (v) { + var period = this.srPeriod; + var phase = this.srPhase; + var threshold = this.srThreshold; + var sign = 1; + + if (v < 0) { + v = -v; + sign = -1; + } + + v += threshold - phase; + + v = Math.trunc(v / period) * period; + + v += phase; + + // according to http://xgridfit.sourceforge.net/round.html + if (v < 0) { return phase * sign; } + + return v * sign; +}; + +/* +* Unit vector of x-axis. +*/ +var xUnitVector = { + x: 1, + + y: 0, + + axis: 'x', + + // Gets the projected distance between two points. + // o1/o2 ... if true, respective original position is used. + distance: function (p1, p2, o1, o2) { + return (o1 ? p1.xo : p1.x) - (o2 ? p2.xo : p2.x); + }, + + // Moves point p so the moved position has the same relative + // position to the moved positions of rp1 and rp2 than the + // original positions had. + // + // See APPENDIX on INTERPOLATE at the bottom of this file. + interpolate: function (p, rp1, rp2, pv) { + var do1; + var do2; + var doa1; + var doa2; + var dm1; + var dm2; + var dt; + + if (!pv || pv === this) { + do1 = p.xo - rp1.xo; + do2 = p.xo - rp2.xo; + dm1 = rp1.x - rp1.xo; + dm2 = rp2.x - rp2.xo; + doa1 = Math.abs(do1); + doa2 = Math.abs(do2); + dt = doa1 + doa2; + + if (dt === 0) { + p.x = p.xo + (dm1 + dm2) / 2; + return; + } + + p.x = p.xo + (dm1 * doa2 + dm2 * doa1) / dt; + return; + } + + do1 = pv.distance(p, rp1, true, true); + do2 = pv.distance(p, rp2, true, true); + dm1 = pv.distance(rp1, rp1, false, true); + dm2 = pv.distance(rp2, rp2, false, true); + doa1 = Math.abs(do1); + doa2 = Math.abs(do2); + dt = doa1 + doa2; + + if (dt === 0) { + xUnitVector.setRelative(p, p, (dm1 + dm2) / 2, pv, true); + return; + } + + xUnitVector.setRelative(p, p, (dm1 * doa2 + dm2 * doa1) / dt, pv, true); + }, + + // Slope of line normal to this + normalSlope: Number.NEGATIVE_INFINITY, + + // Sets the point 'p' relative to point 'rp' + // by the distance 'd'. + // + // See APPENDIX on SETRELATIVE at the bottom of this file. + // + // p ... point to set + // rp ... reference point + // d ... distance on projection vector + // pv ... projection vector (undefined = this) + // org ... if true, uses the original position of rp as reference. + setRelative: function (p, rp, d, pv, org) { + if (!pv || pv === this) { + p.x = (org ? rp.xo : rp.x) + d; + return; + } + + var rpx = org ? rp.xo : rp.x; + var rpy = org ? rp.yo : rp.y; + var rpdx = rpx + d * pv.x; + var rpdy = rpy + d * pv.y; + + p.x = rpdx + (p.y - rpdy) / pv.normalSlope; + }, + + // Slope of vector line. + slope: 0, + + // Touches the point p. + touch: function (p) { + p.xTouched = true; + }, + + // Tests if a point p is touched. + touched: function (p) { + return p.xTouched; + }, + + // Untouches the point p. + untouch: function (p) { + p.xTouched = false; + } +}; + +/* +* Unit vector of y-axis. +*/ +var yUnitVector = { + x: 0, + + y: 1, + + axis: 'y', + + // Gets the projected distance between two points. + // o1/o2 ... if true, respective original position is used. + distance: function (p1, p2, o1, o2) { + return (o1 ? p1.yo : p1.y) - (o2 ? p2.yo : p2.y); + }, + + // Moves point p so the moved position has the same relative + // position to the moved positions of rp1 and rp2 than the + // original positions had. + // + // See APPENDIX on INTERPOLATE at the bottom of this file. + interpolate: function (p, rp1, rp2, pv) { + var do1; + var do2; + var doa1; + var doa2; + var dm1; + var dm2; + var dt; + + if (!pv || pv === this) { + do1 = p.yo - rp1.yo; + do2 = p.yo - rp2.yo; + dm1 = rp1.y - rp1.yo; + dm2 = rp2.y - rp2.yo; + doa1 = Math.abs(do1); + doa2 = Math.abs(do2); + dt = doa1 + doa2; + + if (dt === 0) { + p.y = p.yo + (dm1 + dm2) / 2; + return; + } + + p.y = p.yo + (dm1 * doa2 + dm2 * doa1) / dt; + return; + } + + do1 = pv.distance(p, rp1, true, true); + do2 = pv.distance(p, rp2, true, true); + dm1 = pv.distance(rp1, rp1, false, true); + dm2 = pv.distance(rp2, rp2, false, true); + doa1 = Math.abs(do1); + doa2 = Math.abs(do2); + dt = doa1 + doa2; + + if (dt === 0) { + yUnitVector.setRelative(p, p, (dm1 + dm2) / 2, pv, true); + return; + } + + yUnitVector.setRelative(p, p, (dm1 * doa2 + dm2 * doa1) / dt, pv, true); + }, + + // Slope of line normal to this. + normalSlope: 0, + + // Sets the point 'p' relative to point 'rp' + // by the distance 'd' + // + // See APPENDIX on SETRELATIVE at the bottom of this file. + // + // p ... point to set + // rp ... reference point + // d ... distance on projection vector + // pv ... projection vector (undefined = this) + // org ... if true, uses the original position of rp as reference. + setRelative: function (p, rp, d, pv, org) { + if (!pv || pv === this) { + p.y = (org ? rp.yo : rp.y) + d; + return; + } + + var rpx = org ? rp.xo : rp.x; + var rpy = org ? rp.yo : rp.y; + var rpdx = rpx + d * pv.x; + var rpdy = rpy + d * pv.y; + + p.y = rpdy + pv.normalSlope * (p.x - rpdx); + }, + + // Slope of vector line. + slope: Number.POSITIVE_INFINITY, + + // Touches the point p. + touch: function (p) { + p.yTouched = true; + }, + + // Tests if a point p is touched. + touched: function (p) { + return p.yTouched; + }, + + // Untouches the point p. + untouch: function (p) { + p.yTouched = false; + } +}; + +Object.freeze(xUnitVector); +Object.freeze(yUnitVector); + +/* +* Creates a unit vector that is not x- or y-axis. +*/ +function UnitVector(x, y) { + this.x = x; + this.y = y; + this.axis = undefined; + this.slope = y / x; + this.normalSlope = -x / y; + Object.freeze(this); +} + +/* +* Gets the projected distance between two points. +* o1/o2 ... if true, respective original position is used. +*/ +UnitVector.prototype.distance = function(p1, p2, o1, o2) { + return ( + this.x * xUnitVector.distance(p1, p2, o1, o2) + + this.y * yUnitVector.distance(p1, p2, o1, o2) + ); +}; + +/* +* Moves point p so the moved position has the same relative +* position to the moved positions of rp1 and rp2 than the +* original positions had. +* +* See APPENDIX on INTERPOLATE at the bottom of this file. +*/ +UnitVector.prototype.interpolate = function(p, rp1, rp2, pv) { + var dm1; + var dm2; + var do1; + var do2; + var doa1; + var doa2; + var dt; + + do1 = pv.distance(p, rp1, true, true); + do2 = pv.distance(p, rp2, true, true); + dm1 = pv.distance(rp1, rp1, false, true); + dm2 = pv.distance(rp2, rp2, false, true); + doa1 = Math.abs(do1); + doa2 = Math.abs(do2); + dt = doa1 + doa2; + + if (dt === 0) { + this.setRelative(p, p, (dm1 + dm2) / 2, pv, true); + return; + } + + this.setRelative(p, p, (dm1 * doa2 + dm2 * doa1) / dt, pv, true); +}; + +/* +* Sets the point 'p' relative to point 'rp' +* by the distance 'd' +* +* See APPENDIX on SETRELATIVE at the bottom of this file. +* +* p ... point to set +* rp ... reference point +* d ... distance on projection vector +* pv ... projection vector (undefined = this) +* org ... if true, uses the original position of rp as reference. +*/ +UnitVector.prototype.setRelative = function(p, rp, d, pv, org) { + pv = pv || this; + + var rpx = org ? rp.xo : rp.x; + var rpy = org ? rp.yo : rp.y; + var rpdx = rpx + d * pv.x; + var rpdy = rpy + d * pv.y; + + var pvns = pv.normalSlope; + var fvs = this.slope; + + var px = p.x; + var py = p.y; + + p.x = (fvs * px - pvns * rpdx + rpdy - py) / (fvs - pvns); + p.y = fvs * (p.x - px) + py; +}; + +/* +* Touches the point p. +*/ +UnitVector.prototype.touch = function(p) { + p.xTouched = true; + p.yTouched = true; +}; + +/* +* Returns a unit vector with x/y coordinates. +*/ +function getUnitVector(x, y) { + var d = Math.sqrt(x * x + y * y); + + x /= d; + y /= d; + + if (x === 1 && y === 0) { return xUnitVector; } + else if (x === 0 && y === 1) { return yUnitVector; } + else { return new UnitVector(x, y); } +} + +/* +* Creates a point in the hinting engine. +*/ +function HPoint( + x, + y, + lastPointOfContour, + onCurve +) { + this.x = this.xo = Math.round(x * 64) / 64; // hinted x value and original x-value + this.y = this.yo = Math.round(y * 64) / 64; // hinted y value and original y-value + + this.lastPointOfContour = lastPointOfContour; + this.onCurve = onCurve; + this.prevPointOnContour = undefined; + this.nextPointOnContour = undefined; + this.xTouched = false; + this.yTouched = false; + + Object.preventExtensions(this); +} + +/* +* Returns the next touched point on the contour. +* +* v ... unit vector to test touch axis. +*/ +HPoint.prototype.nextTouched = function(v) { + var p = this.nextPointOnContour; + + while (!v.touched(p) && p !== this) { p = p.nextPointOnContour; } + + return p; +}; + +/* +* Returns the previous touched point on the contour +* +* v ... unit vector to test touch axis. +*/ +HPoint.prototype.prevTouched = function(v) { + var p = this.prevPointOnContour; + + while (!v.touched(p) && p !== this) { p = p.prevPointOnContour; } + + return p; +}; + +/* +* The zero point. +*/ +var HPZero = Object.freeze(new HPoint(0, 0)); + +/* +* The default state of the interpreter. +* +* Note: Freezing the defaultState and then deriving from it +* makes the V8 Javascript engine going awkward, +* so this is avoided, albeit the defaultState shouldn't +* ever change. +*/ +var defaultState = { + cvCutIn: 17 / 16, // control value cut in + deltaBase: 9, + deltaShift: 0.125, + loop: 1, // loops some instructions + minDis: 1, // minimum distance + autoFlip: true +}; + +/* +* The current state of the interpreter. +* +* env ... 'fpgm' or 'prep' or 'glyf' +* prog ... the program +*/ +function State(env, prog) { + this.env = env; + this.stack = []; + this.prog = prog; + + switch (env) { + case 'glyf' : + this.zp0 = this.zp1 = this.zp2 = 1; + this.rp0 = this.rp1 = this.rp2 = 0; + /* fall through */ + case 'prep' : + this.fv = this.pv = this.dpv = xUnitVector; + this.round = roundToGrid; + } +} + +/* +* Executes a glyph program. +* +* This does the hinting for each glyph. +* +* Returns an array of moved points. +* +* glyph: the glyph to hint +* ppem: the size the glyph is rendered for +*/ +Hinting.prototype.exec = function(glyph, ppem) { + if (typeof ppem !== 'number') { + throw new Error('Point size is not a number!'); + } + + // Received a fatal error, don't do any hinting anymore. + if (this._errorState > 2) { return; } + + var font = this.font; + var prepState = this._prepState; + + if (!prepState || prepState.ppem !== ppem) { + var fpgmState = this._fpgmState; + + if (!fpgmState) { + // Executes the fpgm state. + // This is used by fonts to define functions. + State.prototype = defaultState; + + fpgmState = + this._fpgmState = + new State('fpgm', font.tables.fpgm); + + fpgmState.funcs = [ ]; + fpgmState.font = font; + + if (exports.DEBUG) { + console.log('---EXEC FPGM---'); + fpgmState.step = -1; + } + + try { + exec(fpgmState); + } catch (e) { + console.log('Hinting error in FPGM:' + e); + this._errorState = 3; + return; + } + } + + // Executes the prep program for this ppem setting. + // This is used by fonts to set cvt values + // depending on to be rendered font size. + + State.prototype = fpgmState; + prepState = + this._prepState = + new State('prep', font.tables.prep); + + prepState.ppem = ppem; + + // Creates a copy of the cvt table + // and scales it to the current ppem setting. + var oCvt = font.tables.cvt; + if (oCvt) { + var cvt = prepState.cvt = new Array(oCvt.length); + var scale = ppem / font.unitsPerEm; + for (var c = 0; c < oCvt.length; c++) { + cvt[c] = oCvt[c] * scale; + } + } else { + prepState.cvt = []; + } + + if (exports.DEBUG) { + console.log('---EXEC PREP---'); + prepState.step = -1; + } + + try { + exec(prepState); + } catch (e) { + if (this._errorState < 2) { + console.log('Hinting error in PREP:' + e); + } + this._errorState = 2; + } + } + + if (this._errorState > 1) { return; } + + try { + return execGlyph(glyph, prepState); + } catch (e) { + if (this._errorState < 1) { + console.log('Hinting error:' + e); + console.log('Note: further hinting errors are silenced'); + } + this._errorState = 1; + return undefined; + } +}; + +/* +* Executes the hinting program for a glyph. +*/ +execGlyph = function(glyph, prepState) { + // original point positions + var xScale = prepState.ppem / prepState.font.unitsPerEm; + var yScale = xScale; + var components = glyph.components; + var contours; + var gZone; + var state; + + State.prototype = prepState; + if (!components) { + state = new State('glyf', glyph.instructions); + if (exports.DEBUG) { + console.log('---EXEC GLYPH---'); + state.step = -1; + } + execComponent(glyph, state, xScale, yScale); + gZone = state.gZone; + } else { + var font = prepState.font; + gZone = []; + contours = []; + for (var i = 0; i < components.length; i++) { + var c = components[i]; + var cg = font.glyphs.get(c.glyphIndex); + + state = new State('glyf', cg.instructions); + + if (exports.DEBUG) { + console.log('---EXEC COMP ' + i + '---'); + state.step = -1; + } + + execComponent(cg, state, xScale, yScale); + // appends the computed points to the result array + // post processes the component points + var dx = Math.round(c.dx * xScale); + var dy = Math.round(c.dy * yScale); + var gz = state.gZone; + var cc = state.contours; + for (var pi = 0; pi < gz.length; pi++) { + var p = gz[pi]; + p.xTouched = p.yTouched = false; + p.xo = p.x = p.x + dx; + p.yo = p.y = p.y + dy; + } + + var gLen = gZone.length; + gZone.push.apply(gZone, gz); + for (var j = 0; j < cc.length; j++) { + contours.push(cc[j] + gLen); + } + } + + if (glyph.instructions && !state.inhibitGridFit) { + // the composite has instructions on its own + state = new State('glyf', glyph.instructions); + + state.gZone = state.z0 = state.z1 = state.z2 = gZone; + + state.contours = contours; + + // note: HPZero cannot be used here, since + // the point might be modified + gZone.push( + new HPoint(0, 0), + new HPoint(Math.round(glyph.advanceWidth * xScale), 0) + ); + + if (exports.DEBUG) { + console.log('---EXEC COMPOSITE---'); + state.step = -1; + } + + exec(state); + + gZone.length -= 2; + } + } + + return gZone; +}; + +/* +* Executes the hinting program for a component of a multi-component glyph +* or of the glyph itself for a non-component glyph. +*/ +execComponent = function(glyph, state, xScale, yScale) +{ + var points = glyph.points || []; + var pLen = points.length; + var gZone = state.gZone = state.z0 = state.z1 = state.z2 = []; + var contours = state.contours = []; + + // Scales the original points and + // makes copies for the hinted points. + var cp; // current point + for (var i = 0; i < pLen; i++) { + cp = points[i]; + + gZone[i] = new HPoint( + cp.x * xScale, + cp.y * yScale, + cp.lastPointOfContour, + cp.onCurve + ); + } + + // Chain links the contours. + var sp; // start point + var np; // next point + + for (var i$1 = 0; i$1 < pLen; i$1++) { + cp = gZone[i$1]; + + if (!sp) { + sp = cp; + contours.push(i$1); + } + + if (cp.lastPointOfContour) { + cp.nextPointOnContour = sp; + sp.prevPointOnContour = cp; + sp = undefined; + } else { + np = gZone[i$1 + 1]; + cp.nextPointOnContour = np; + np.prevPointOnContour = cp; + } + } + + if (state.inhibitGridFit) { return; } + + if (exports.DEBUG) { + console.log('PROCESSING GLYPH', state.stack); + for (var i$2 = 0; i$2 < pLen; i$2++) { + console.log(i$2, gZone[i$2].x, gZone[i$2].y); + } + } + + gZone.push( + new HPoint(0, 0), + new HPoint(Math.round(glyph.advanceWidth * xScale), 0) + ); + + exec(state); + + // Removes the extra points. + gZone.length -= 2; + + if (exports.DEBUG) { + console.log('FINISHED GLYPH', state.stack); + for (var i$3 = 0; i$3 < pLen; i$3++) { + console.log(i$3, gZone[i$3].x, gZone[i$3].y); + } + } +}; + +/* +* Executes the program loaded in state. +*/ +exec = function(state) { + var prog = state.prog; + + if (!prog) { return; } + + var pLen = prog.length; + var ins; + + for (state.ip = 0; state.ip < pLen; state.ip++) { + if (exports.DEBUG) { state.step++; } + ins = instructionTable[prog[state.ip]]; + + if (!ins) { + throw new Error( + 'unknown instruction: 0x' + + Number(prog[state.ip]).toString(16) + ); + } + + ins(state); + + // very extensive debugging for each step + /* + if (exports.DEBUG) { + var da; + if (state.gZone) { + da = []; + for (let i = 0; i < state.gZone.length; i++) + { + da.push(i + ' ' + + state.gZone[i].x * 64 + ' ' + + state.gZone[i].y * 64 + ' ' + + (state.gZone[i].xTouched ? 'x' : '') + + (state.gZone[i].yTouched ? 'y' : '') + ); + } + console.log('GZ', da); + } + + if (state.tZone) { + da = []; + for (let i = 0; i < state.tZone.length; i++) { + da.push(i + ' ' + + state.tZone[i].x * 64 + ' ' + + state.tZone[i].y * 64 + ' ' + + (state.tZone[i].xTouched ? 'x' : '') + + (state.tZone[i].yTouched ? 'y' : '') + ); + } + console.log('TZ', da); + } + + if (state.stack.length > 10) { + console.log( + state.stack.length, + '...', state.stack.slice(state.stack.length - 10) + ); + } else { + console.log(state.stack.length, state.stack); + } + } + */ + } +}; + +/* +* Initializes the twilight zone. +* +* This is only done if a SZPx instruction +* refers to the twilight zone. +*/ +function initTZone(state) +{ + var tZone = state.tZone = new Array(state.gZone.length); + + // no idea if this is actually correct... + for (var i = 0; i < tZone.length; i++) + { + tZone[i] = new HPoint(0, 0); + } +} + +/* +* Skips the instruction pointer ahead over an IF/ELSE block. +* handleElse .. if true breaks on matching ELSE +*/ +function skip(state, handleElse) +{ + var prog = state.prog; + var ip = state.ip; + var nesting = 1; + var ins; + + do { + ins = prog[++ip]; + if (ins === 0x58) // IF + { nesting++; } + else if (ins === 0x59) // EIF + { nesting--; } + else if (ins === 0x40) // NPUSHB + { ip += prog[ip + 1] + 1; } + else if (ins === 0x41) // NPUSHW + { ip += 2 * prog[ip + 1] + 1; } + else if (ins >= 0xB0 && ins <= 0xB7) // PUSHB + { ip += ins - 0xB0 + 1; } + else if (ins >= 0xB8 && ins <= 0xBF) // PUSHW + { ip += (ins - 0xB8 + 1) * 2; } + else if (handleElse && nesting === 1 && ins === 0x1B) // ELSE + { break; } + } while (nesting > 0); + + state.ip = ip; +} + +/*----------------------------------------------------------* +* And then a lot of instructions... * +*----------------------------------------------------------*/ + +// SVTCA[a] Set freedom and projection Vectors To Coordinate Axis +// 0x00-0x01 +function SVTCA(v, state) { + if (exports.DEBUG) { console.log(state.step, 'SVTCA[' + v.axis + ']'); } + + state.fv = state.pv = state.dpv = v; +} + +// SPVTCA[a] Set Projection Vector to Coordinate Axis +// 0x02-0x03 +function SPVTCA(v, state) { + if (exports.DEBUG) { console.log(state.step, 'SPVTCA[' + v.axis + ']'); } + + state.pv = state.dpv = v; +} + +// SFVTCA[a] Set Freedom Vector to Coordinate Axis +// 0x04-0x05 +function SFVTCA(v, state) { + if (exports.DEBUG) { console.log(state.step, 'SFVTCA[' + v.axis + ']'); } + + state.fv = v; +} + +// SPVTL[a] Set Projection Vector To Line +// 0x06-0x07 +function SPVTL(a, state) { + var stack = state.stack; + var p2i = stack.pop(); + var p1i = stack.pop(); + var p2 = state.z2[p2i]; + var p1 = state.z1[p1i]; + + if (exports.DEBUG) { console.log('SPVTL[' + a + ']', p2i, p1i); } + + var dx; + var dy; + + if (!a) { + dx = p1.x - p2.x; + dy = p1.y - p2.y; + } else { + dx = p2.y - p1.y; + dy = p1.x - p2.x; + } + + state.pv = state.dpv = getUnitVector(dx, dy); +} + +// SFVTL[a] Set Freedom Vector To Line +// 0x08-0x09 +function SFVTL(a, state) { + var stack = state.stack; + var p2i = stack.pop(); + var p1i = stack.pop(); + var p2 = state.z2[p2i]; + var p1 = state.z1[p1i]; + + if (exports.DEBUG) { console.log('SFVTL[' + a + ']', p2i, p1i); } + + var dx; + var dy; + + if (!a) { + dx = p1.x - p2.x; + dy = p1.y - p2.y; + } else { + dx = p2.y - p1.y; + dy = p1.x - p2.x; + } + + state.fv = getUnitVector(dx, dy); +} + +// SPVFS[] Set Projection Vector From Stack +// 0x0A +function SPVFS(state) { + var stack = state.stack; + var y = stack.pop(); + var x = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SPVFS[]', y, x); } + + state.pv = state.dpv = getUnitVector(x, y); +} + +// SFVFS[] Set Freedom Vector From Stack +// 0x0B +function SFVFS(state) { + var stack = state.stack; + var y = stack.pop(); + var x = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SPVFS[]', y, x); } + + state.fv = getUnitVector(x, y); +} + +// GPV[] Get Projection Vector +// 0x0C +function GPV(state) { + var stack = state.stack; + var pv = state.pv; + + if (exports.DEBUG) { console.log(state.step, 'GPV[]'); } + + stack.push(pv.x * 0x4000); + stack.push(pv.y * 0x4000); +} + +// GFV[] Get Freedom Vector +// 0x0C +function GFV(state) { + var stack = state.stack; + var fv = state.fv; + + if (exports.DEBUG) { console.log(state.step, 'GFV[]'); } + + stack.push(fv.x * 0x4000); + stack.push(fv.y * 0x4000); +} + +// SFVTPV[] Set Freedom Vector To Projection Vector +// 0x0E +function SFVTPV(state) { + state.fv = state.pv; + + if (exports.DEBUG) { console.log(state.step, 'SFVTPV[]'); } +} + +// ISECT[] moves point p to the InterSECTion of two lines +// 0x0F +function ISECT(state) +{ + var stack = state.stack; + var pa0i = stack.pop(); + var pa1i = stack.pop(); + var pb0i = stack.pop(); + var pb1i = stack.pop(); + var pi = stack.pop(); + var z0 = state.z0; + var z1 = state.z1; + var pa0 = z0[pa0i]; + var pa1 = z0[pa1i]; + var pb0 = z1[pb0i]; + var pb1 = z1[pb1i]; + var p = state.z2[pi]; + + if (exports.DEBUG) { console.log('ISECT[], ', pa0i, pa1i, pb0i, pb1i, pi); } + + // math from + // en.wikipedia.org/wiki/Line%E2%80%93line_intersection#Given_two_points_on_each_line + + var x1 = pa0.x; + var y1 = pa0.y; + var x2 = pa1.x; + var y2 = pa1.y; + var x3 = pb0.x; + var y3 = pb0.y; + var x4 = pb1.x; + var y4 = pb1.y; + + var div = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); + var f1 = x1 * y2 - y1 * x2; + var f2 = x3 * y4 - y3 * x4; + + p.x = (f1 * (x3 - x4) - f2 * (x1 - x2)) / div; + p.y = (f1 * (y3 - y4) - f2 * (y1 - y2)) / div; +} + +// SRP0[] Set Reference Point 0 +// 0x10 +function SRP0(state) { + state.rp0 = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SRP0[]', state.rp0); } +} + +// SRP1[] Set Reference Point 1 +// 0x11 +function SRP1(state) { + state.rp1 = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SRP1[]', state.rp1); } +} + +// SRP1[] Set Reference Point 2 +// 0x12 +function SRP2(state) { + state.rp2 = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SRP2[]', state.rp2); } +} + +// SZP0[] Set Zone Pointer 0 +// 0x13 +function SZP0(state) { + var n = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SZP0[]', n); } + + state.zp0 = n; + + switch (n) { + case 0: + if (!state.tZone) { initTZone(state); } + state.z0 = state.tZone; + break; + case 1 : + state.z0 = state.gZone; + break; + default : + throw new Error('Invalid zone pointer'); + } +} + +// SZP1[] Set Zone Pointer 1 +// 0x14 +function SZP1(state) { + var n = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SZP1[]', n); } + + state.zp1 = n; + + switch (n) { + case 0: + if (!state.tZone) { initTZone(state); } + state.z1 = state.tZone; + break; + case 1 : + state.z1 = state.gZone; + break; + default : + throw new Error('Invalid zone pointer'); + } +} + +// SZP2[] Set Zone Pointer 2 +// 0x15 +function SZP2(state) { + var n = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SZP2[]', n); } + + state.zp2 = n; + + switch (n) { + case 0: + if (!state.tZone) { initTZone(state); } + state.z2 = state.tZone; + break; + case 1 : + state.z2 = state.gZone; + break; + default : + throw new Error('Invalid zone pointer'); + } +} + +// SZPS[] Set Zone PointerS +// 0x16 +function SZPS(state) { + var n = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SZPS[]', n); } + + state.zp0 = state.zp1 = state.zp2 = n; + + switch (n) { + case 0: + if (!state.tZone) { initTZone(state); } + state.z0 = state.z1 = state.z2 = state.tZone; + break; + case 1 : + state.z0 = state.z1 = state.z2 = state.gZone; + break; + default : + throw new Error('Invalid zone pointer'); + } +} + +// SLOOP[] Set LOOP variable +// 0x17 +function SLOOP(state) { + state.loop = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SLOOP[]', state.loop); } +} + +// RTG[] Round To Grid +// 0x18 +function RTG(state) { + if (exports.DEBUG) { console.log(state.step, 'RTG[]'); } + + state.round = roundToGrid; +} + +// RTHG[] Round To Half Grid +// 0x19 +function RTHG(state) { + if (exports.DEBUG) { console.log(state.step, 'RTHG[]'); } + + state.round = roundToHalfGrid; +} + +// SMD[] Set Minimum Distance +// 0x1A +function SMD(state) { + var d = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SMD[]', d); } + + state.minDis = d / 0x40; +} + +// ELSE[] ELSE clause +// 0x1B +function ELSE(state) { + // This instruction has been reached by executing a then branch + // so it just skips ahead until matching EIF. + // + // In case the IF was negative the IF[] instruction already + // skipped forward over the ELSE[] + + if (exports.DEBUG) { console.log(state.step, 'ELSE[]'); } + + skip(state, false); +} + +// JMPR[] JuMP Relative +// 0x1C +function JMPR(state) { + var o = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'JMPR[]', o); } + + // A jump by 1 would do nothing. + state.ip += o - 1; +} + +// SCVTCI[] Set Control Value Table Cut-In +// 0x1D +function SCVTCI(state) { + var n = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SCVTCI[]', n); } + + state.cvCutIn = n / 0x40; +} + +// DUP[] DUPlicate top stack element +// 0x20 +function DUP(state) { + var stack = state.stack; + + if (exports.DEBUG) { console.log(state.step, 'DUP[]'); } + + stack.push(stack[stack.length - 1]); +} + +// POP[] POP top stack element +// 0x21 +function POP(state) { + if (exports.DEBUG) { console.log(state.step, 'POP[]'); } + + state.stack.pop(); +} + +// CLEAR[] CLEAR the stack +// 0x22 +function CLEAR(state) { + if (exports.DEBUG) { console.log(state.step, 'CLEAR[]'); } + + state.stack.length = 0; +} + +// SWAP[] SWAP the top two elements on the stack +// 0x23 +function SWAP(state) { + var stack = state.stack; + + var a = stack.pop(); + var b = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SWAP[]'); } + + stack.push(a); + stack.push(b); +} + +// DEPTH[] DEPTH of the stack +// 0x24 +function DEPTH(state) { + var stack = state.stack; + + if (exports.DEBUG) { console.log(state.step, 'DEPTH[]'); } + + stack.push(stack.length); +} + +// LOOPCALL[] LOOPCALL function +// 0x2A +function LOOPCALL(state) { + var stack = state.stack; + var fn = stack.pop(); + var c = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'LOOPCALL[]', fn, c); } + + // saves callers program + var cip = state.ip; + var cprog = state.prog; + + state.prog = state.funcs[fn]; + + // executes the function + for (var i = 0; i < c; i++) { + exec(state); + + if (exports.DEBUG) { console.log( + ++state.step, + i + 1 < c ? 'next loopcall' : 'done loopcall', + i + ); } + } + + // restores the callers program + state.ip = cip; + state.prog = cprog; +} + +// CALL[] CALL function +// 0x2B +function CALL(state) { + var fn = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'CALL[]', fn); } + + // saves callers program + var cip = state.ip; + var cprog = state.prog; + + state.prog = state.funcs[fn]; + + // executes the function + exec(state); + + // restores the callers program + state.ip = cip; + state.prog = cprog; + + if (exports.DEBUG) { console.log(++state.step, 'returning from', fn); } +} + +// CINDEX[] Copy the INDEXed element to the top of the stack +// 0x25 +function CINDEX(state) { + var stack = state.stack; + var k = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'CINDEX[]', k); } + + // In case of k == 1, it copies the last element after popping + // thus stack.length - k. + stack.push(stack[stack.length - k]); +} + +// MINDEX[] Move the INDEXed element to the top of the stack +// 0x26 +function MINDEX(state) { + var stack = state.stack; + var k = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'MINDEX[]', k); } + + stack.push(stack.splice(stack.length - k, 1)[0]); +} + +// FDEF[] Function DEFinition +// 0x2C +function FDEF(state) { + if (state.env !== 'fpgm') { throw new Error('FDEF not allowed here'); } + var stack = state.stack; + var prog = state.prog; + var ip = state.ip; + + var fn = stack.pop(); + var ipBegin = ip; + + if (exports.DEBUG) { console.log(state.step, 'FDEF[]', fn); } + + while (prog[++ip] !== 0x2D){ } + + state.ip = ip; + state.funcs[fn] = prog.slice(ipBegin + 1, ip); +} + +// MDAP[a] Move Direct Absolute Point +// 0x2E-0x2F +function MDAP(round, state) { + var pi = state.stack.pop(); + var p = state.z0[pi]; + var fv = state.fv; + var pv = state.pv; + + if (exports.DEBUG) { console.log(state.step, 'MDAP[' + round + ']', pi); } + + var d = pv.distance(p, HPZero); + + if (round) { d = state.round(d); } + + fv.setRelative(p, HPZero, d, pv); + fv.touch(p); + + state.rp0 = state.rp1 = pi; +} + +// IUP[a] Interpolate Untouched Points through the outline +// 0x30 +function IUP(v, state) { + var z2 = state.z2; + var pLen = z2.length - 2; + var cp; + var pp; + var np; + + if (exports.DEBUG) { console.log(state.step, 'IUP[' + v.axis + ']'); } + + for (var i = 0; i < pLen; i++) { + cp = z2[i]; // current point + + // if this point has been touched go on + if (v.touched(cp)) { continue; } + + pp = cp.prevTouched(v); + + // no point on the contour has been touched? + if (pp === cp) { continue; } + + np = cp.nextTouched(v); + + if (pp === np) { + // only one point on the contour has been touched + // so simply moves the point like that + + v.setRelative(cp, cp, v.distance(pp, pp, false, true), v, true); + } + + v.interpolate(cp, pp, np, v); + } +} + +// SHP[] SHift Point using reference point +// 0x32-0x33 +function SHP(a, state) { + var stack = state.stack; + var rpi = a ? state.rp1 : state.rp2; + var rp = (a ? state.z0 : state.z1)[rpi]; + var fv = state.fv; + var pv = state.pv; + var loop = state.loop; + var z2 = state.z2; + + while (loop--) + { + var pi = stack.pop(); + var p = z2[pi]; + + var d = pv.distance(rp, rp, false, true); + fv.setRelative(p, p, d, pv); + fv.touch(p); + + if (exports.DEBUG) { + console.log( + state.step, + (state.loop > 1 ? + 'loop ' + (state.loop - loop) + ': ' : + '' + ) + + 'SHP[' + (a ? 'rp1' : 'rp2') + ']', pi + ); + } + } + + state.loop = 1; +} + +// SHC[] SHift Contour using reference point +// 0x36-0x37 +function SHC(a, state) { + var stack = state.stack; + var rpi = a ? state.rp1 : state.rp2; + var rp = (a ? state.z0 : state.z1)[rpi]; + var fv = state.fv; + var pv = state.pv; + var ci = stack.pop(); + var sp = state.z2[state.contours[ci]]; + var p = sp; + + if (exports.DEBUG) { console.log(state.step, 'SHC[' + a + ']', ci); } + + var d = pv.distance(rp, rp, false, true); + + do { + if (p !== rp) { fv.setRelative(p, p, d, pv); } + p = p.nextPointOnContour; + } while (p !== sp); +} + +// SHZ[] SHift Zone using reference point +// 0x36-0x37 +function SHZ(a, state) { + var stack = state.stack; + var rpi = a ? state.rp1 : state.rp2; + var rp = (a ? state.z0 : state.z1)[rpi]; + var fv = state.fv; + var pv = state.pv; + + var e = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SHZ[' + a + ']', e); } + + var z; + switch (e) { + case 0 : z = state.tZone; break; + case 1 : z = state.gZone; break; + default : throw new Error('Invalid zone'); + } + + var p; + var d = pv.distance(rp, rp, false, true); + var pLen = z.length - 2; + for (var i = 0; i < pLen; i++) + { + p = z[i]; + fv.setRelative(p, p, d, pv); + //if (p !== rp) fv.setRelative(p, p, d, pv); + } +} + +// SHPIX[] SHift point by a PIXel amount +// 0x38 +function SHPIX(state) { + var stack = state.stack; + var loop = state.loop; + var fv = state.fv; + var d = stack.pop() / 0x40; + var z2 = state.z2; + + while (loop--) { + var pi = stack.pop(); + var p = z2[pi]; + + if (exports.DEBUG) { + console.log( + state.step, + (state.loop > 1 ? 'loop ' + (state.loop - loop) + ': ' : '') + + 'SHPIX[]', pi, d + ); + } + + fv.setRelative(p, p, d); + fv.touch(p); + } + + state.loop = 1; +} + +// IP[] Interpolate Point +// 0x39 +function IP(state) { + var stack = state.stack; + var rp1i = state.rp1; + var rp2i = state.rp2; + var loop = state.loop; + var rp1 = state.z0[rp1i]; + var rp2 = state.z1[rp2i]; + var fv = state.fv; + var pv = state.dpv; + var z2 = state.z2; + + while (loop--) { + var pi = stack.pop(); + var p = z2[pi]; + + if (exports.DEBUG) { + console.log( + state.step, + (state.loop > 1 ? 'loop ' + (state.loop - loop) + ': ' : '') + + 'IP[]', pi, rp1i, '<->', rp2i + ); + } + + fv.interpolate(p, rp1, rp2, pv); + + fv.touch(p); + } + + state.loop = 1; +} + +// MSIRP[a] Move Stack Indirect Relative Point +// 0x3A-0x3B +function MSIRP(a, state) { + var stack = state.stack; + var d = stack.pop() / 64; + var pi = stack.pop(); + var p = state.z1[pi]; + var rp0 = state.z0[state.rp0]; + var fv = state.fv; + var pv = state.pv; + + fv.setRelative(p, rp0, d, pv); + fv.touch(p); + + if (exports.DEBUG) { console.log(state.step, 'MSIRP[' + a + ']', d, pi); } + + state.rp1 = state.rp0; + state.rp2 = pi; + if (a) { state.rp0 = pi; } +} + +// ALIGNRP[] Align to reference point. +// 0x3C +function ALIGNRP(state) { + var stack = state.stack; + var rp0i = state.rp0; + var rp0 = state.z0[rp0i]; + var loop = state.loop; + var fv = state.fv; + var pv = state.pv; + var z1 = state.z1; + + while (loop--) { + var pi = stack.pop(); + var p = z1[pi]; + + if (exports.DEBUG) { + console.log( + state.step, + (state.loop > 1 ? 'loop ' + (state.loop - loop) + ': ' : '') + + 'ALIGNRP[]', pi + ); + } + + fv.setRelative(p, rp0, 0, pv); + fv.touch(p); + } + + state.loop = 1; +} + +// RTG[] Round To Double Grid +// 0x3D +function RTDG(state) { + if (exports.DEBUG) { console.log(state.step, 'RTDG[]'); } + + state.round = roundToDoubleGrid; +} + +// MIAP[a] Move Indirect Absolute Point +// 0x3E-0x3F +function MIAP(round, state) { + var stack = state.stack; + var n = stack.pop(); + var pi = stack.pop(); + var p = state.z0[pi]; + var fv = state.fv; + var pv = state.pv; + var cv = state.cvt[n]; + + if (exports.DEBUG) { + console.log( + state.step, + 'MIAP[' + round + ']', + n, '(', cv, ')', pi + ); + } + + var d = pv.distance(p, HPZero); + + if (round) { + if (Math.abs(d - cv) < state.cvCutIn) { d = cv; } + + d = state.round(d); + } + + fv.setRelative(p, HPZero, d, pv); + + if (state.zp0 === 0) { + p.xo = p.x; + p.yo = p.y; + } + + fv.touch(p); + + state.rp0 = state.rp1 = pi; +} + +// NPUSB[] PUSH N Bytes +// 0x40 +function NPUSHB(state) { + var prog = state.prog; + var ip = state.ip; + var stack = state.stack; + + var n = prog[++ip]; + + if (exports.DEBUG) { console.log(state.step, 'NPUSHB[]', n); } + + for (var i = 0; i < n; i++) { stack.push(prog[++ip]); } + + state.ip = ip; +} + +// NPUSHW[] PUSH N Words +// 0x41 +function NPUSHW(state) { + var ip = state.ip; + var prog = state.prog; + var stack = state.stack; + var n = prog[++ip]; + + if (exports.DEBUG) { console.log(state.step, 'NPUSHW[]', n); } + + for (var i = 0; i < n; i++) { + var w = (prog[++ip] << 8) | prog[++ip]; + if (w & 0x8000) { w = -((w ^ 0xffff) + 1); } + stack.push(w); + } + + state.ip = ip; +} + +// WS[] Write Store +// 0x42 +function WS(state) { + var stack = state.stack; + var store = state.store; + + if (!store) { store = state.store = []; } + + var v = stack.pop(); + var l = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'WS', v, l); } + + store[l] = v; +} + +// RS[] Read Store +// 0x43 +function RS(state) { + var stack = state.stack; + var store = state.store; + + var l = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'RS', l); } + + var v = (store && store[l]) || 0; + + stack.push(v); +} + +// WCVTP[] Write Control Value Table in Pixel units +// 0x44 +function WCVTP(state) { + var stack = state.stack; + + var v = stack.pop(); + var l = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'WCVTP', v, l); } + + state.cvt[l] = v / 0x40; +} + +// RCVT[] Read Control Value Table entry +// 0x45 +function RCVT(state) { + var stack = state.stack; + var cvte = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'RCVT', cvte); } + + stack.push(state.cvt[cvte] * 0x40); +} + +// GC[] Get Coordinate projected onto the projection vector +// 0x46-0x47 +function GC(a, state) { + var stack = state.stack; + var pi = stack.pop(); + var p = state.z2[pi]; + + if (exports.DEBUG) { console.log(state.step, 'GC[' + a + ']', pi); } + + stack.push(state.dpv.distance(p, HPZero, a, false) * 0x40); +} + +// MD[a] Measure Distance +// 0x49-0x4A +function MD(a, state) { + var stack = state.stack; + var pi2 = stack.pop(); + var pi1 = stack.pop(); + var p2 = state.z1[pi2]; + var p1 = state.z0[pi1]; + var d = state.dpv.distance(p1, p2, a, a); + + if (exports.DEBUG) { console.log(state.step, 'MD[' + a + ']', pi2, pi1, '->', d); } + + state.stack.push(Math.round(d * 64)); +} + +// MPPEM[] Measure Pixels Per EM +// 0x4B +function MPPEM(state) { + if (exports.DEBUG) { console.log(state.step, 'MPPEM[]'); } + state.stack.push(state.ppem); +} + +// FLIPON[] set the auto FLIP Boolean to ON +// 0x4D +function FLIPON(state) { + if (exports.DEBUG) { console.log(state.step, 'FLIPON[]'); } + state.autoFlip = true; +} + +// LT[] Less Than +// 0x50 +function LT(state) { + var stack = state.stack; + var e2 = stack.pop(); + var e1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'LT[]', e2, e1); } + + stack.push(e1 < e2 ? 1 : 0); +} + +// LTEQ[] Less Than or EQual +// 0x53 +function LTEQ(state) { + var stack = state.stack; + var e2 = stack.pop(); + var e1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'LTEQ[]', e2, e1); } + + stack.push(e1 <= e2 ? 1 : 0); +} + +// GTEQ[] Greater Than +// 0x52 +function GT(state) { + var stack = state.stack; + var e2 = stack.pop(); + var e1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'GT[]', e2, e1); } + + stack.push(e1 > e2 ? 1 : 0); +} + +// GTEQ[] Greater Than or EQual +// 0x53 +function GTEQ(state) { + var stack = state.stack; + var e2 = stack.pop(); + var e1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'GTEQ[]', e2, e1); } + + stack.push(e1 >= e2 ? 1 : 0); +} + +// EQ[] EQual +// 0x54 +function EQ(state) { + var stack = state.stack; + var e2 = stack.pop(); + var e1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'EQ[]', e2, e1); } + + stack.push(e2 === e1 ? 1 : 0); +} + +// NEQ[] Not EQual +// 0x55 +function NEQ(state) { + var stack = state.stack; + var e2 = stack.pop(); + var e1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'NEQ[]', e2, e1); } + + stack.push(e2 !== e1 ? 1 : 0); +} + +// ODD[] ODD +// 0x56 +function ODD(state) { + var stack = state.stack; + var n = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'ODD[]', n); } + + stack.push(Math.trunc(n) % 2 ? 1 : 0); +} + +// EVEN[] EVEN +// 0x57 +function EVEN(state) { + var stack = state.stack; + var n = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'EVEN[]', n); } + + stack.push(Math.trunc(n) % 2 ? 0 : 1); +} + +// IF[] IF test +// 0x58 +function IF(state) { + var test = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'IF[]', test); } + + // if test is true it just continues + // if not the ip is skipped until matching ELSE or EIF + if (!test) { + skip(state, true); + + if (exports.DEBUG) { console.log(state.step, 'EIF[]'); } + } +} + +// EIF[] End IF +// 0x59 +function EIF(state) { + // this can be reached normally when + // executing an else branch. + // -> just ignore it + + if (exports.DEBUG) { console.log(state.step, 'EIF[]'); } +} + +// AND[] logical AND +// 0x5A +function AND(state) { + var stack = state.stack; + var e2 = stack.pop(); + var e1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'AND[]', e2, e1); } + + stack.push(e2 && e1 ? 1 : 0); +} + +// OR[] logical OR +// 0x5B +function OR(state) { + var stack = state.stack; + var e2 = stack.pop(); + var e1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'OR[]', e2, e1); } + + stack.push(e2 || e1 ? 1 : 0); +} + +// NOT[] logical NOT +// 0x5C +function NOT(state) { + var stack = state.stack; + var e = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'NOT[]', e); } + + stack.push(e ? 0 : 1); +} + +// DELTAP1[] DELTA exception P1 +// DELTAP2[] DELTA exception P2 +// DELTAP3[] DELTA exception P3 +// 0x5D, 0x71, 0x72 +function DELTAP123(b, state) { + var stack = state.stack; + var n = stack.pop(); + var fv = state.fv; + var pv = state.pv; + var ppem = state.ppem; + var base = state.deltaBase + (b - 1) * 16; + var ds = state.deltaShift; + var z0 = state.z0; + + if (exports.DEBUG) { console.log(state.step, 'DELTAP[' + b + ']', n, stack); } + + for (var i = 0; i < n; i++) { + var pi = stack.pop(); + var arg = stack.pop(); + var appem = base + ((arg & 0xF0) >> 4); + if (appem !== ppem) { continue; } + + var mag = (arg & 0x0F) - 8; + if (mag >= 0) { mag++; } + if (exports.DEBUG) { console.log(state.step, 'DELTAPFIX', pi, 'by', mag * ds); } + + var p = z0[pi]; + fv.setRelative(p, p, mag * ds, pv); + } +} + +// SDB[] Set Delta Base in the graphics state +// 0x5E +function SDB(state) { + var stack = state.stack; + var n = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SDB[]', n); } + + state.deltaBase = n; +} + +// SDS[] Set Delta Shift in the graphics state +// 0x5F +function SDS(state) { + var stack = state.stack; + var n = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SDS[]', n); } + + state.deltaShift = Math.pow(0.5, n); +} + +// ADD[] ADD +// 0x60 +function ADD(state) { + var stack = state.stack; + var n2 = stack.pop(); + var n1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'ADD[]', n2, n1); } + + stack.push(n1 + n2); +} + +// SUB[] SUB +// 0x61 +function SUB(state) { + var stack = state.stack; + var n2 = stack.pop(); + var n1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SUB[]', n2, n1); } + + stack.push(n1 - n2); +} + +// DIV[] DIV +// 0x62 +function DIV(state) { + var stack = state.stack; + var n2 = stack.pop(); + var n1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'DIV[]', n2, n1); } + + stack.push(n1 * 64 / n2); +} + +// MUL[] MUL +// 0x63 +function MUL(state) { + var stack = state.stack; + var n2 = stack.pop(); + var n1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'MUL[]', n2, n1); } + + stack.push(n1 * n2 / 64); +} + +// ABS[] ABSolute value +// 0x64 +function ABS(state) { + var stack = state.stack; + var n = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'ABS[]', n); } + + stack.push(Math.abs(n)); +} + +// NEG[] NEGate +// 0x65 +function NEG(state) { + var stack = state.stack; + var n = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'NEG[]', n); } + + stack.push(-n); +} + +// FLOOR[] FLOOR +// 0x66 +function FLOOR(state) { + var stack = state.stack; + var n = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'FLOOR[]', n); } + + stack.push(Math.floor(n / 0x40) * 0x40); +} + +// CEILING[] CEILING +// 0x67 +function CEILING(state) { + var stack = state.stack; + var n = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'CEILING[]', n); } + + stack.push(Math.ceil(n / 0x40) * 0x40); +} + +// ROUND[ab] ROUND value +// 0x68-0x6B +function ROUND(dt, state) { + var stack = state.stack; + var n = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'ROUND[]'); } + + stack.push(state.round(n / 0x40) * 0x40); +} + +// WCVTF[] Write Control Value Table in Funits +// 0x70 +function WCVTF(state) { + var stack = state.stack; + var v = stack.pop(); + var l = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'WCVTF[]', v, l); } + + state.cvt[l] = v * state.ppem / state.font.unitsPerEm; +} + +// DELTAC1[] DELTA exception C1 +// DELTAC2[] DELTA exception C2 +// DELTAC3[] DELTA exception C3 +// 0x73, 0x74, 0x75 +function DELTAC123(b, state) { + var stack = state.stack; + var n = stack.pop(); + var ppem = state.ppem; + var base = state.deltaBase + (b - 1) * 16; + var ds = state.deltaShift; + + if (exports.DEBUG) { console.log(state.step, 'DELTAC[' + b + ']', n, stack); } + + for (var i = 0; i < n; i++) { + var c = stack.pop(); + var arg = stack.pop(); + var appem = base + ((arg & 0xF0) >> 4); + if (appem !== ppem) { continue; } + + var mag = (arg & 0x0F) - 8; + if (mag >= 0) { mag++; } + + var delta = mag * ds; + + if (exports.DEBUG) { console.log(state.step, 'DELTACFIX', c, 'by', delta); } + + state.cvt[c] += delta; + } +} + +// SROUND[] Super ROUND +// 0x76 +function SROUND(state) { + var n = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'SROUND[]', n); } + + state.round = roundSuper; + + var period; + + switch (n & 0xC0) { + case 0x00: + period = 0.5; + break; + case 0x40: + period = 1; + break; + case 0x80: + period = 2; + break; + default: + throw new Error('invalid SROUND value'); + } + + state.srPeriod = period; + + switch (n & 0x30) { + case 0x00: + state.srPhase = 0; + break; + case 0x10: + state.srPhase = 0.25 * period; + break; + case 0x20: + state.srPhase = 0.5 * period; + break; + case 0x30: + state.srPhase = 0.75 * period; + break; + default: throw new Error('invalid SROUND value'); + } + + n &= 0x0F; + + if (n === 0) { state.srThreshold = 0; } + else { state.srThreshold = (n / 8 - 0.5) * period; } +} + +// S45ROUND[] Super ROUND 45 degrees +// 0x77 +function S45ROUND(state) { + var n = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'S45ROUND[]', n); } + + state.round = roundSuper; + + var period; + + switch (n & 0xC0) { + case 0x00: + period = Math.sqrt(2) / 2; + break; + case 0x40: + period = Math.sqrt(2); + break; + case 0x80: + period = 2 * Math.sqrt(2); + break; + default: + throw new Error('invalid S45ROUND value'); + } + + state.srPeriod = period; + + switch (n & 0x30) { + case 0x00: + state.srPhase = 0; + break; + case 0x10: + state.srPhase = 0.25 * period; + break; + case 0x20: + state.srPhase = 0.5 * period; + break; + case 0x30: + state.srPhase = 0.75 * period; + break; + default: + throw new Error('invalid S45ROUND value'); + } + + n &= 0x0F; + + if (n === 0) { state.srThreshold = 0; } + else { state.srThreshold = (n / 8 - 0.5) * period; } +} + +// ROFF[] Round Off +// 0x7A +function ROFF(state) { + if (exports.DEBUG) { console.log(state.step, 'ROFF[]'); } + + state.round = roundOff; +} + +// RUTG[] Round Up To Grid +// 0x7C +function RUTG(state) { + if (exports.DEBUG) { console.log(state.step, 'RUTG[]'); } + + state.round = roundUpToGrid; +} + +// RDTG[] Round Down To Grid +// 0x7D +function RDTG(state) { + if (exports.DEBUG) { console.log(state.step, 'RDTG[]'); } + + state.round = roundDownToGrid; +} + +// SCANCTRL[] SCAN conversion ConTRoL +// 0x85 +function SCANCTRL(state) { + var n = state.stack.pop(); + + // ignored by opentype.js + + if (exports.DEBUG) { console.log(state.step, 'SCANCTRL[]', n); } +} + +// SDPVTL[a] Set Dual Projection Vector To Line +// 0x86-0x87 +function SDPVTL(a, state) { + var stack = state.stack; + var p2i = stack.pop(); + var p1i = stack.pop(); + var p2 = state.z2[p2i]; + var p1 = state.z1[p1i]; + + if (exports.DEBUG) { console.log(state.step, 'SDPVTL[' + a + ']', p2i, p1i); } + + var dx; + var dy; + + if (!a) { + dx = p1.x - p2.x; + dy = p1.y - p2.y; + } else { + dx = p2.y - p1.y; + dy = p1.x - p2.x; + } + + state.dpv = getUnitVector(dx, dy); +} + +// GETINFO[] GET INFOrmation +// 0x88 +function GETINFO(state) { + var stack = state.stack; + var sel = stack.pop(); + var r = 0; + + if (exports.DEBUG) { console.log(state.step, 'GETINFO[]', sel); } + + // v35 as in no subpixel hinting + if (sel & 0x01) { r = 35; } + + // TODO rotation and stretch currently not supported + // and thus those GETINFO are always 0. + + // opentype.js is always gray scaling + if (sel & 0x20) { r |= 0x1000; } + + stack.push(r); +} + +// ROLL[] ROLL the top three stack elements +// 0x8A +function ROLL(state) { + var stack = state.stack; + var a = stack.pop(); + var b = stack.pop(); + var c = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'ROLL[]'); } + + stack.push(b); + stack.push(a); + stack.push(c); +} + +// MAX[] MAXimum of top two stack elements +// 0x8B +function MAX(state) { + var stack = state.stack; + var e2 = stack.pop(); + var e1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'MAX[]', e2, e1); } + + stack.push(Math.max(e1, e2)); +} + +// MIN[] MINimum of top two stack elements +// 0x8C +function MIN(state) { + var stack = state.stack; + var e2 = stack.pop(); + var e1 = stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'MIN[]', e2, e1); } + + stack.push(Math.min(e1, e2)); +} + +// SCANTYPE[] SCANTYPE +// 0x8D +function SCANTYPE(state) { + var n = state.stack.pop(); + // ignored by opentype.js + if (exports.DEBUG) { console.log(state.step, 'SCANTYPE[]', n); } +} + +// INSTCTRL[] INSTCTRL +// 0x8D +function INSTCTRL(state) { + var s = state.stack.pop(); + var v = state.stack.pop(); + + if (exports.DEBUG) { console.log(state.step, 'INSTCTRL[]', s, v); } + + switch (s) { + case 1 : state.inhibitGridFit = !!v; return; + case 2 : state.ignoreCvt = !!v; return; + default: throw new Error('invalid INSTCTRL[] selector'); + } +} + +// PUSHB[abc] PUSH Bytes +// 0xB0-0xB7 +function PUSHB(n, state) { + var stack = state.stack; + var prog = state.prog; + var ip = state.ip; + + if (exports.DEBUG) { console.log(state.step, 'PUSHB[' + n + ']'); } + + for (var i = 0; i < n; i++) { stack.push(prog[++ip]); } + + state.ip = ip; +} + +// PUSHW[abc] PUSH Words +// 0xB8-0xBF +function PUSHW(n, state) { + var ip = state.ip; + var prog = state.prog; + var stack = state.stack; + + if (exports.DEBUG) { console.log(state.ip, 'PUSHW[' + n + ']'); } + + for (var i = 0; i < n; i++) { + var w = (prog[++ip] << 8) | prog[++ip]; + if (w & 0x8000) { w = -((w ^ 0xffff) + 1); } + stack.push(w); + } + + state.ip = ip; +} + +// MDRP[abcde] Move Direct Relative Point +// 0xD0-0xEF +// (if indirect is 0) +// +// and +// +// MIRP[abcde] Move Indirect Relative Point +// 0xE0-0xFF +// (if indirect is 1) + +function MDRP_MIRP(indirect, setRp0, keepD, ro, dt, state) { + var stack = state.stack; + var cvte = indirect && stack.pop(); + var pi = stack.pop(); + var rp0i = state.rp0; + var rp = state.z0[rp0i]; + var p = state.z1[pi]; + + var md = state.minDis; + var fv = state.fv; + var pv = state.dpv; + var od; // original distance + var d; // moving distance + var sign; // sign of distance + var cv; + + d = od = pv.distance(p, rp, true, true); + sign = d >= 0 ? 1 : -1; // Math.sign would be 0 in case of 0 + + // TODO consider autoFlip + d = Math.abs(d); + + if (indirect) { + cv = state.cvt[cvte]; + + if (ro && Math.abs(d - cv) < state.cvCutIn) { d = cv; } + } + + if (keepD && d < md) { d = md; } + + if (ro) { d = state.round(d); } + + fv.setRelative(p, rp, sign * d, pv); + fv.touch(p); + + if (exports.DEBUG) { + console.log( + state.step, + (indirect ? 'MIRP[' : 'MDRP[') + + (setRp0 ? 'M' : 'm') + + (keepD ? '>' : '_') + + (ro ? 'R' : '_') + + (dt === 0 ? 'Gr' : (dt === 1 ? 'Bl' : (dt === 2 ? 'Wh' : ''))) + + ']', + indirect ? + cvte + '(' + state.cvt[cvte] + ',' + cv + ')' : + '', + pi, + '(d =', od, '->', sign * d, ')' + ); + } + + state.rp1 = state.rp0; + state.rp2 = pi; + if (setRp0) { state.rp0 = pi; } +} + +/* +* The instruction table. +*/ +instructionTable = [ + /* 0x00 */ SVTCA.bind(undefined, yUnitVector), + /* 0x01 */ SVTCA.bind(undefined, xUnitVector), + /* 0x02 */ SPVTCA.bind(undefined, yUnitVector), + /* 0x03 */ SPVTCA.bind(undefined, xUnitVector), + /* 0x04 */ SFVTCA.bind(undefined, yUnitVector), + /* 0x05 */ SFVTCA.bind(undefined, xUnitVector), + /* 0x06 */ SPVTL.bind(undefined, 0), + /* 0x07 */ SPVTL.bind(undefined, 1), + /* 0x08 */ SFVTL.bind(undefined, 0), + /* 0x09 */ SFVTL.bind(undefined, 1), + /* 0x0A */ SPVFS, + /* 0x0B */ SFVFS, + /* 0x0C */ GPV, + /* 0x0D */ GFV, + /* 0x0E */ SFVTPV, + /* 0x0F */ ISECT, + /* 0x10 */ SRP0, + /* 0x11 */ SRP1, + /* 0x12 */ SRP2, + /* 0x13 */ SZP0, + /* 0x14 */ SZP1, + /* 0x15 */ SZP2, + /* 0x16 */ SZPS, + /* 0x17 */ SLOOP, + /* 0x18 */ RTG, + /* 0x19 */ RTHG, + /* 0x1A */ SMD, + /* 0x1B */ ELSE, + /* 0x1C */ JMPR, + /* 0x1D */ SCVTCI, + /* 0x1E */ undefined, // TODO SSWCI + /* 0x1F */ undefined, // TODO SSW + /* 0x20 */ DUP, + /* 0x21 */ POP, + /* 0x22 */ CLEAR, + /* 0x23 */ SWAP, + /* 0x24 */ DEPTH, + /* 0x25 */ CINDEX, + /* 0x26 */ MINDEX, + /* 0x27 */ undefined, // TODO ALIGNPTS + /* 0x28 */ undefined, + /* 0x29 */ undefined, // TODO UTP + /* 0x2A */ LOOPCALL, + /* 0x2B */ CALL, + /* 0x2C */ FDEF, + /* 0x2D */ undefined, // ENDF (eaten by FDEF) + /* 0x2E */ MDAP.bind(undefined, 0), + /* 0x2F */ MDAP.bind(undefined, 1), + /* 0x30 */ IUP.bind(undefined, yUnitVector), + /* 0x31 */ IUP.bind(undefined, xUnitVector), + /* 0x32 */ SHP.bind(undefined, 0), + /* 0x33 */ SHP.bind(undefined, 1), + /* 0x34 */ SHC.bind(undefined, 0), + /* 0x35 */ SHC.bind(undefined, 1), + /* 0x36 */ SHZ.bind(undefined, 0), + /* 0x37 */ SHZ.bind(undefined, 1), + /* 0x38 */ SHPIX, + /* 0x39 */ IP, + /* 0x3A */ MSIRP.bind(undefined, 0), + /* 0x3B */ MSIRP.bind(undefined, 1), + /* 0x3C */ ALIGNRP, + /* 0x3D */ RTDG, + /* 0x3E */ MIAP.bind(undefined, 0), + /* 0x3F */ MIAP.bind(undefined, 1), + /* 0x40 */ NPUSHB, + /* 0x41 */ NPUSHW, + /* 0x42 */ WS, + /* 0x43 */ RS, + /* 0x44 */ WCVTP, + /* 0x45 */ RCVT, + /* 0x46 */ GC.bind(undefined, 0), + /* 0x47 */ GC.bind(undefined, 1), + /* 0x48 */ undefined, // TODO SCFS + /* 0x49 */ MD.bind(undefined, 0), + /* 0x4A */ MD.bind(undefined, 1), + /* 0x4B */ MPPEM, + /* 0x4C */ undefined, // TODO MPS + /* 0x4D */ FLIPON, + /* 0x4E */ undefined, // TODO FLIPOFF + /* 0x4F */ undefined, // TODO DEBUG + /* 0x50 */ LT, + /* 0x51 */ LTEQ, + /* 0x52 */ GT, + /* 0x53 */ GTEQ, + /* 0x54 */ EQ, + /* 0x55 */ NEQ, + /* 0x56 */ ODD, + /* 0x57 */ EVEN, + /* 0x58 */ IF, + /* 0x59 */ EIF, + /* 0x5A */ AND, + /* 0x5B */ OR, + /* 0x5C */ NOT, + /* 0x5D */ DELTAP123.bind(undefined, 1), + /* 0x5E */ SDB, + /* 0x5F */ SDS, + /* 0x60 */ ADD, + /* 0x61 */ SUB, + /* 0x62 */ DIV, + /* 0x63 */ MUL, + /* 0x64 */ ABS, + /* 0x65 */ NEG, + /* 0x66 */ FLOOR, + /* 0x67 */ CEILING, + /* 0x68 */ ROUND.bind(undefined, 0), + /* 0x69 */ ROUND.bind(undefined, 1), + /* 0x6A */ ROUND.bind(undefined, 2), + /* 0x6B */ ROUND.bind(undefined, 3), + /* 0x6C */ undefined, // TODO NROUND[ab] + /* 0x6D */ undefined, // TODO NROUND[ab] + /* 0x6E */ undefined, // TODO NROUND[ab] + /* 0x6F */ undefined, // TODO NROUND[ab] + /* 0x70 */ WCVTF, + /* 0x71 */ DELTAP123.bind(undefined, 2), + /* 0x72 */ DELTAP123.bind(undefined, 3), + /* 0x73 */ DELTAC123.bind(undefined, 1), + /* 0x74 */ DELTAC123.bind(undefined, 2), + /* 0x75 */ DELTAC123.bind(undefined, 3), + /* 0x76 */ SROUND, + /* 0x77 */ S45ROUND, + /* 0x78 */ undefined, // TODO JROT[] + /* 0x79 */ undefined, // TODO JROF[] + /* 0x7A */ ROFF, + /* 0x7B */ undefined, + /* 0x7C */ RUTG, + /* 0x7D */ RDTG, + /* 0x7E */ POP, // actually SANGW, supposed to do only a pop though + /* 0x7F */ POP, // actually AA, supposed to do only a pop though + /* 0x80 */ undefined, // TODO FLIPPT + /* 0x81 */ undefined, // TODO FLIPRGON + /* 0x82 */ undefined, // TODO FLIPRGOFF + /* 0x83 */ undefined, + /* 0x84 */ undefined, + /* 0x85 */ SCANCTRL, + /* 0x86 */ SDPVTL.bind(undefined, 0), + /* 0x87 */ SDPVTL.bind(undefined, 1), + /* 0x88 */ GETINFO, + /* 0x89 */ undefined, // TODO IDEF + /* 0x8A */ ROLL, + /* 0x8B */ MAX, + /* 0x8C */ MIN, + /* 0x8D */ SCANTYPE, + /* 0x8E */ INSTCTRL, + /* 0x8F */ undefined, + /* 0x90 */ undefined, + /* 0x91 */ undefined, + /* 0x92 */ undefined, + /* 0x93 */ undefined, + /* 0x94 */ undefined, + /* 0x95 */ undefined, + /* 0x96 */ undefined, + /* 0x97 */ undefined, + /* 0x98 */ undefined, + /* 0x99 */ undefined, + /* 0x9A */ undefined, + /* 0x9B */ undefined, + /* 0x9C */ undefined, + /* 0x9D */ undefined, + /* 0x9E */ undefined, + /* 0x9F */ undefined, + /* 0xA0 */ undefined, + /* 0xA1 */ undefined, + /* 0xA2 */ undefined, + /* 0xA3 */ undefined, + /* 0xA4 */ undefined, + /* 0xA5 */ undefined, + /* 0xA6 */ undefined, + /* 0xA7 */ undefined, + /* 0xA8 */ undefined, + /* 0xA9 */ undefined, + /* 0xAA */ undefined, + /* 0xAB */ undefined, + /* 0xAC */ undefined, + /* 0xAD */ undefined, + /* 0xAE */ undefined, + /* 0xAF */ undefined, + /* 0xB0 */ PUSHB.bind(undefined, 1), + /* 0xB1 */ PUSHB.bind(undefined, 2), + /* 0xB2 */ PUSHB.bind(undefined, 3), + /* 0xB3 */ PUSHB.bind(undefined, 4), + /* 0xB4 */ PUSHB.bind(undefined, 5), + /* 0xB5 */ PUSHB.bind(undefined, 6), + /* 0xB6 */ PUSHB.bind(undefined, 7), + /* 0xB7 */ PUSHB.bind(undefined, 8), + /* 0xB8 */ PUSHW.bind(undefined, 1), + /* 0xB9 */ PUSHW.bind(undefined, 2), + /* 0xBA */ PUSHW.bind(undefined, 3), + /* 0xBB */ PUSHW.bind(undefined, 4), + /* 0xBC */ PUSHW.bind(undefined, 5), + /* 0xBD */ PUSHW.bind(undefined, 6), + /* 0xBE */ PUSHW.bind(undefined, 7), + /* 0xBF */ PUSHW.bind(undefined, 8), + /* 0xC0 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 0, 0), + /* 0xC1 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 0, 1), + /* 0xC2 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 0, 2), + /* 0xC3 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 0, 3), + /* 0xC4 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 1, 0), + /* 0xC5 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 1, 1), + /* 0xC6 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 1, 2), + /* 0xC7 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 1, 3), + /* 0xC8 */ MDRP_MIRP.bind(undefined, 0, 0, 1, 0, 0), + /* 0xC9 */ MDRP_MIRP.bind(undefined, 0, 0, 1, 0, 1), + /* 0xCA */ MDRP_MIRP.bind(undefined, 0, 0, 1, 0, 2), + /* 0xCB */ MDRP_MIRP.bind(undefined, 0, 0, 1, 0, 3), + /* 0xCC */ MDRP_MIRP.bind(undefined, 0, 0, 1, 1, 0), + /* 0xCD */ MDRP_MIRP.bind(undefined, 0, 0, 1, 1, 1), + /* 0xCE */ MDRP_MIRP.bind(undefined, 0, 0, 1, 1, 2), + /* 0xCF */ MDRP_MIRP.bind(undefined, 0, 0, 1, 1, 3), + /* 0xD0 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 0, 0), + /* 0xD1 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 0, 1), + /* 0xD2 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 0, 2), + /* 0xD3 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 0, 3), + /* 0xD4 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 1, 0), + /* 0xD5 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 1, 1), + /* 0xD6 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 1, 2), + /* 0xD7 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 1, 3), + /* 0xD8 */ MDRP_MIRP.bind(undefined, 0, 1, 1, 0, 0), + /* 0xD9 */ MDRP_MIRP.bind(undefined, 0, 1, 1, 0, 1), + /* 0xDA */ MDRP_MIRP.bind(undefined, 0, 1, 1, 0, 2), + /* 0xDB */ MDRP_MIRP.bind(undefined, 0, 1, 1, 0, 3), + /* 0xDC */ MDRP_MIRP.bind(undefined, 0, 1, 1, 1, 0), + /* 0xDD */ MDRP_MIRP.bind(undefined, 0, 1, 1, 1, 1), + /* 0xDE */ MDRP_MIRP.bind(undefined, 0, 1, 1, 1, 2), + /* 0xDF */ MDRP_MIRP.bind(undefined, 0, 1, 1, 1, 3), + /* 0xE0 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 0, 0), + /* 0xE1 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 0, 1), + /* 0xE2 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 0, 2), + /* 0xE3 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 0, 3), + /* 0xE4 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 1, 0), + /* 0xE5 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 1, 1), + /* 0xE6 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 1, 2), + /* 0xE7 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 1, 3), + /* 0xE8 */ MDRP_MIRP.bind(undefined, 1, 0, 1, 0, 0), + /* 0xE9 */ MDRP_MIRP.bind(undefined, 1, 0, 1, 0, 1), + /* 0xEA */ MDRP_MIRP.bind(undefined, 1, 0, 1, 0, 2), + /* 0xEB */ MDRP_MIRP.bind(undefined, 1, 0, 1, 0, 3), + /* 0xEC */ MDRP_MIRP.bind(undefined, 1, 0, 1, 1, 0), + /* 0xED */ MDRP_MIRP.bind(undefined, 1, 0, 1, 1, 1), + /* 0xEE */ MDRP_MIRP.bind(undefined, 1, 0, 1, 1, 2), + /* 0xEF */ MDRP_MIRP.bind(undefined, 1, 0, 1, 1, 3), + /* 0xF0 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 0, 0), + /* 0xF1 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 0, 1), + /* 0xF2 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 0, 2), + /* 0xF3 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 0, 3), + /* 0xF4 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 1, 0), + /* 0xF5 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 1, 1), + /* 0xF6 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 1, 2), + /* 0xF7 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 1, 3), + /* 0xF8 */ MDRP_MIRP.bind(undefined, 1, 1, 1, 0, 0), + /* 0xF9 */ MDRP_MIRP.bind(undefined, 1, 1, 1, 0, 1), + /* 0xFA */ MDRP_MIRP.bind(undefined, 1, 1, 1, 0, 2), + /* 0xFB */ MDRP_MIRP.bind(undefined, 1, 1, 1, 0, 3), + /* 0xFC */ MDRP_MIRP.bind(undefined, 1, 1, 1, 1, 0), + /* 0xFD */ MDRP_MIRP.bind(undefined, 1, 1, 1, 1, 1), + /* 0xFE */ MDRP_MIRP.bind(undefined, 1, 1, 1, 1, 2), + /* 0xFF */ MDRP_MIRP.bind(undefined, 1, 1, 1, 1, 3) +]; + +/***************************** + Mathematical Considerations +****************************** + +fv ... refers to freedom vector +pv ... refers to projection vector +rp ... refers to reference point +p ... refers to to point being operated on +d ... refers to distance + +SETRELATIVE: +============ + +case freedom vector == x-axis: +------------------------------ + + (pv) + .-' + rpd .-' + .-* + d .-'90°' + .-' ' + .-' ' + *-' ' b + rp ' + ' + ' + p *----------*-------------- (fv) + pm + + rpdx = rpx + d * pv.x + rpdy = rpy + d * pv.y + + equation of line b + + y - rpdy = pvns * (x- rpdx) + + y = p.y + + x = rpdx + ( p.y - rpdy ) / pvns + + +case freedom vector == y-axis: +------------------------------ + + * pm + |\ + | \ + | \ + | \ + | \ + | \ + | \ + | \ + | \ + | \ b + | \ + | \ + | \ .-' (pv) + | 90° \.-' + | .-'* rpd + | .-' + * *-' d + p rp + + rpdx = rpx + d * pv.x + rpdy = rpy + d * pv.y + + equation of line b: + pvns ... normal slope to pv + + y - rpdy = pvns * (x - rpdx) + + x = p.x + + y = rpdy + pvns * (p.x - rpdx) + + + +generic case: +------------- + + + .'(fv) + .' + .* pm + .' ! + .' . + .' ! + .' . b + .' ! + * . + p ! + 90° . ... (pv) + ...-*-''' + ...---''' rpd + ...---''' d + *--''' + rp + + rpdx = rpx + d * pv.x + rpdy = rpy + d * pv.y + + equation of line b: + pvns... normal slope to pv + + y - rpdy = pvns * (x - rpdx) + + equation of freedom vector line: + fvs ... slope of freedom vector (=fy/fx) + + y - py = fvs * (x - px) + + + on pm both equations are true for same x/y + + y - rpdy = pvns * (x - rpdx) + + y - py = fvs * (x - px) + + form to y and set equal: + + pvns * (x - rpdx) + rpdy = fvs * (x - px) + py + + expand: + + pvns * x - pvns * rpdx + rpdy = fvs * x - fvs * px + py + + switch: + + fvs * x - fvs * px + py = pvns * x - pvns * rpdx + rpdy + + solve for x: + + fvs * x - pvns * x = fvs * px - pvns * rpdx - py + rpdy + + + + fvs * px - pvns * rpdx + rpdy - py + x = ----------------------------------- + fvs - pvns + + and: + + y = fvs * (x - px) + py + + + +INTERPOLATE: +============ + +Examples of point interpolation. + +The weight of the movement of the reference point gets bigger +the further the other reference point is away, thus the safest +option (that is avoiding 0/0 divisions) is to weight the +original distance of the other point by the sum of both distances. + +If the sum of both distances is 0, then move the point by the +arithmetic average of the movement of both reference points. + + + + + (+6) + rp1o *---->*rp1 + . . (+12) + . . rp2o *---------->* rp2 + . . . . + . . . . + . 10 20 . . + |.........|...................| . + . . . + . . (+8) . + po *------>*p . + . . . + . 12 . 24 . + |...........|.......................| + 36 + + +------- + + + + (+10) + rp1o *-------->*rp1 + . . (-10) + . . rp2 *<---------* rpo2 + . . . . + . . . . + . 10 . 30 . . + |.........|.............................| + . . + . (+5) . + po *--->* p . + . . . + . . 20 . + |....|..............| + 5 15 + + +------- + + + (+10) + rp1o *-------->*rp1 + . . + . . + rp2o *-------->*rp2 + + + (+10) + po *-------->* p + +------- + + + (+10) + rp1o *-------->*rp1 + . . + . .(+30) + rp2o *---------------------------->*rp2 + + + (+25) + po *----------------------->* p + + + +vim: set ts=4 sw=4 expandtab: +*****/ + +/** + * Converts a string into a list of tokens. + */ + +/** + * Create a new token + * @param {string} char a single char + */ +function Token(char) { + this.char = char; + this.state = {}; + this.activeState = null; +} + +/** + * Create a new context range + * @param {number} startIndex range start index + * @param {number} endOffset range end index offset + * @param {string} contextName owner context name + */ +function ContextRange(startIndex, endOffset, contextName) { + this.contextName = contextName; + this.startIndex = startIndex; + this.endOffset = endOffset; +} + +/** + * Check context start and end + * @param {string} contextName a unique context name + * @param {function} checkStart a predicate function the indicates a context's start + * @param {function} checkEnd a predicate function the indicates a context's end + */ +function ContextChecker(contextName, checkStart, checkEnd) { + this.contextName = contextName; + this.openRange = null; + this.ranges = []; + this.checkStart = checkStart; + this.checkEnd = checkEnd; +} + +/** + * @typedef ContextParams + * @type Object + * @property {array} context context items + * @property {number} currentIndex current item index + */ + +/** + * Create a context params + * @param {array} context a list of items + * @param {number} currentIndex current item index + */ +function ContextParams(context, currentIndex) { + this.context = context; + this.index = currentIndex; + this.length = context.length; + this.current = context[currentIndex]; + this.backtrack = context.slice(0, currentIndex); + this.lookahead = context.slice(currentIndex + 1); +} + +/** + * Create an event instance + * @param {string} eventId event unique id + */ +function Event(eventId) { + this.eventId = eventId; + this.subscribers = []; +} + +/** + * Initialize a core events and auto subscribe required event handlers + * @param {any} events an object that enlists core events handlers + */ +function initializeCoreEvents(events) { + var this$1 = this; + + var coreEvents = [ + 'start', 'end', 'next', 'newToken', 'contextStart', + 'contextEnd', 'insertToken', 'removeToken', 'removeRange', + 'replaceToken', 'replaceRange', 'composeRUD', 'updateContextsRanges' + ]; + + coreEvents.forEach(function (eventId) { + Object.defineProperty(this$1.events, eventId, { + value: new Event(eventId) + }); + }); + + if (!!events) { + coreEvents.forEach(function (eventId) { + var event = events[eventId]; + if (typeof event === 'function') { + this$1.events[eventId].subscribe(event); + } + }); + } + var requiresContextUpdate = [ + 'insertToken', 'removeToken', 'removeRange', + 'replaceToken', 'replaceRange', 'composeRUD' + ]; + requiresContextUpdate.forEach(function (eventId) { + this$1.events[eventId].subscribe( + this$1.updateContextsRanges + ); + }); +} + +/** + * Converts a string into a list of tokens + * @param {any} events tokenizer core events + */ +function Tokenizer(events) { + this.tokens = []; + this.registeredContexts = {}; + this.contextCheckers = []; + this.events = {}; + this.registeredModifiers = []; + + initializeCoreEvents.call(this, events); +} + +/** + * Sets the state of a token, usually called by a state modifier. + * @param {string} key state item key + * @param {any} value state item value + */ +Token.prototype.setState = function(key, value) { + this.state[key] = value; + this.activeState = { key: key, value: this.state[key] }; + return this.activeState; +}; + +Token.prototype.getState = function (stateId) { + return this.state[stateId] || null; +}; + +/** + * Checks if an index exists in the tokens list. + * @param {number} index token index + */ +Tokenizer.prototype.inboundIndex = function(index) { + return index >= 0 && index < this.tokens.length; +}; + +/** + * Compose and apply a list of operations (replace, update, delete) + * @param {array} RUDs replace, update and delete operations + * TODO: Perf. Optimization (lengthBefore === lengthAfter ? dispatch once) + */ +Tokenizer.prototype.composeRUD = function (RUDs) { + var this$1 = this; + + var silent = true; + var state = RUDs.map(function (RUD) { return ( + this$1[RUD[0]].apply(this$1, RUD.slice(1).concat(silent)) + ); }); + var hasFAILObject = function (obj) { return ( + typeof obj === 'object' && + obj.hasOwnProperty('FAIL') + ); }; + if (state.every(hasFAILObject)) { + return { + FAIL: "composeRUD: one or more operations hasn't completed successfully", + report: state.filter(hasFAILObject) + }; + } + this.dispatch('composeRUD', [state.filter(function (op) { return !hasFAILObject(op); })]); +}; + +/** + * Replace a range of tokens with a list of tokens + * @param {number} startIndex range start index + * @param {number} offset range offset + * @param {token} tokens a list of tokens to replace + * @param {boolean} silent dispatch events and update context ranges + */ +Tokenizer.prototype.replaceRange = function (startIndex, offset, tokens, silent) { + offset = offset !== null ? offset : this.tokens.length; + var isTokenType = tokens.every(function (token) { return token instanceof Token; }); + if (!isNaN(startIndex) && this.inboundIndex(startIndex) && isTokenType) { + var replaced = this.tokens.splice.apply( + this.tokens, [startIndex, offset].concat(tokens) + ); + if (!silent) { this.dispatch('replaceToken', [startIndex, offset, tokens]); } + return [replaced, tokens]; + } else { + return { FAIL: 'replaceRange: invalid tokens or startIndex.' }; + } +}; + +/** + * Replace a token with another token + * @param {number} index token index + * @param {token} token a token to replace + * @param {boolean} silent dispatch events and update context ranges + */ +Tokenizer.prototype.replaceToken = function (index, token, silent) { + if (!isNaN(index) && this.inboundIndex(index) && token instanceof Token) { + var replaced = this.tokens.splice(index, 1, token); + if (!silent) { this.dispatch('replaceToken', [index, token]); } + return [replaced[0], token]; + } else { + return { FAIL: 'replaceToken: invalid token or index.' }; + } +}; + +/** + * Removes a range of tokens + * @param {number} startIndex range start index + * @param {number} offset range offset + * @param {boolean} silent dispatch events and update context ranges + */ +Tokenizer.prototype.removeRange = function(startIndex, offset, silent) { + offset = !isNaN(offset) ? offset : this.tokens.length; + var tokens = this.tokens.splice(startIndex, offset); + if (!silent) { this.dispatch('removeRange', [tokens, startIndex, offset]); } + return tokens; +}; + +/** + * Remove a token at a certain index + * @param {number} index token index + * @param {boolean} silent dispatch events and update context ranges + */ +Tokenizer.prototype.removeToken = function(index, silent) { + if (!isNaN(index) && this.inboundIndex(index)) { + var token = this.tokens.splice(index, 1); + if (!silent) { this.dispatch('removeToken', [token, index]); } + return token; + } else { + return { FAIL: 'removeToken: invalid token index.' }; + } +}; + +/** + * Insert a list of tokens at a certain index + * @param {array} tokens a list of tokens to insert + * @param {number} index insert the list of tokens at index + * @param {boolean} silent dispatch events and update context ranges + */ +Tokenizer.prototype.insertToken = function (tokens, index, silent) { + var tokenType = tokens.every( + function (token) { return token instanceof Token; } + ); + if (tokenType) { + this.tokens.splice.apply( + this.tokens, [index, 0].concat(tokens) + ); + if (!silent) { this.dispatch('insertToken', [tokens, index]); } + return tokens; + } else { + return { FAIL: 'insertToken: invalid token(s).' }; + } +}; + +/** + * A state modifier that is called on 'newToken' event + * @param {string} modifierId state modifier id + * @param {function} condition a predicate function that returns true or false + * @param {function} modifier a function to update token state + */ +Tokenizer.prototype.registerModifier = function(modifierId, condition, modifier) { + this.events.newToken.subscribe(function(token, contextParams) { + var conditionParams = [token, contextParams]; + var canApplyModifier = ( + condition === null || + condition.apply(this, conditionParams) === true + ); + var modifierParams = [token, contextParams]; + if (canApplyModifier) { + var newStateValue = modifier.apply(this, modifierParams); + token.setState(modifierId, newStateValue); + } + }); + this.registeredModifiers.push(modifierId); +}; + +/** + * Subscribe a handler to an event + * @param {function} eventHandler an event handler function + */ +Event.prototype.subscribe = function (eventHandler) { + if (typeof eventHandler === 'function') { + return ((this.subscribers.push(eventHandler)) - 1); + } else { + return { FAIL: ("invalid '" + (this.eventId) + "' event handler")}; + } +}; + +/** + * Unsubscribe an event handler + * @param {string} subsId subscription id + */ +Event.prototype.unsubscribe = function (subsId) { + this.subscribers.splice(subsId, 1); +}; + +/** + * Sets context params current value index + * @param {number} index context params current value index + */ +ContextParams.prototype.setCurrentIndex = function(index) { + this.index = index; + this.current = this.context[index]; + this.backtrack = this.context.slice(0, index); + this.lookahead = this.context.slice(index + 1); +}; + +/** + * Get an item at an offset from the current value + * example (current value is 3): + * 1 2 [3] 4 5 | items values + * -2 -1 0 1 2 | offset values + * @param {number} offset an offset from current value index + */ +ContextParams.prototype.get = function (offset) { + switch (true) { + case (offset === 0): + return this.current; + case (offset < 0 && Math.abs(offset) <= this.backtrack.length): + return this.backtrack.slice(offset)[0]; + case (offset > 0 && offset <= this.lookahead.length): + return this.lookahead[offset - 1]; + default: + return null; + } +}; + +/** + * Converts a context range into a string value + * @param {contextRange} range a context range + */ +Tokenizer.prototype.rangeToText = function (range) { + if (range instanceof ContextRange) { + return ( + this.getRangeTokens(range) + .map(function (token) { return token.char; }).join('') + ); + } +}; + +/** + * Converts all tokens into a string + */ +Tokenizer.prototype.getText = function () { + return this.tokens.map(function (token) { return token.char; }).join(''); +}; + +/** + * Get a context by name + * @param {string} contextName context name to get + */ +Tokenizer.prototype.getContext = function (contextName) { + var context = this.registeredContexts[contextName]; + return !!context ? context : null; +}; + +/** + * Subscribes a new event handler to an event + * @param {string} eventName event name to subscribe to + * @param {function} eventHandler a function to be invoked on event + */ +Tokenizer.prototype.on = function(eventName, eventHandler) { + var event = this.events[eventName]; + if (!!event) { + return event.subscribe(eventHandler); + } else { + return null; + } +}; + +/** + * Dispatches an event + * @param {string} eventName event name + * @param {any} args event handler arguments + */ +Tokenizer.prototype.dispatch = function(eventName, args) { + var this$1 = this; + + var event = this.events[eventName]; + if (event instanceof Event) { + event.subscribers.forEach(function (subscriber) { + subscriber.apply(this$1, args || []); + }); + } +}; + +/** + * Register a new context checker + * @param {string} contextName a unique context name + * @param {function} contextStartCheck a predicate function that returns true on context start + * @param {function} contextEndCheck a predicate function that returns true on context end + * TODO: call tokenize on registration to update context ranges with the new context. + */ +Tokenizer.prototype.registerContextChecker = function(contextName, contextStartCheck, contextEndCheck) { + if (!!this.getContext(contextName)) { return { + FAIL: + ("context name '" + contextName + "' is already registered.") + }; } + if (typeof contextStartCheck !== 'function') { return { + FAIL: + "missing context start check." + }; } + if (typeof contextEndCheck !== 'function') { return { + FAIL: + "missing context end check." + }; } + var contextCheckers = new ContextChecker( + contextName, contextStartCheck, contextEndCheck + ); + this.registeredContexts[contextName] = contextCheckers; + this.contextCheckers.push(contextCheckers); + return contextCheckers; +}; + +/** + * Gets a context range tokens + * @param {contextRange} range a context range + */ +Tokenizer.prototype.getRangeTokens = function(range) { + var endIndex = range.startIndex + range.endOffset; + return [].concat( + this.tokens + .slice(range.startIndex, endIndex) + ); +}; + +/** + * Gets the ranges of a context + * @param {string} contextName context name + */ +Tokenizer.prototype.getContextRanges = function(contextName) { + var context = this.getContext(contextName); + if (!!context) { + return context.ranges; + } else { + return { FAIL: ("context checker '" + contextName + "' is not registered.") }; + } +}; + +/** + * Resets context ranges to run context update + */ +Tokenizer.prototype.resetContextsRanges = function () { + var registeredContexts = this.registeredContexts; + for (var contextName in registeredContexts) { + if (registeredContexts.hasOwnProperty(contextName)) { + var context = registeredContexts[contextName]; + context.ranges = []; + } + } +}; + +/** + * Updates context ranges + */ +Tokenizer.prototype.updateContextsRanges = function () { + this.resetContextsRanges(); + var chars = this.tokens.map(function (token) { return token.char; }); + for (var i = 0; i < chars.length; i++) { + var contextParams = new ContextParams(chars, i); + this.runContextCheck(contextParams); + } + this.dispatch('updateContextsRanges', [this.registeredContexts]); +}; + +/** + * Sets the end offset of an open range + * @param {number} offset range end offset + * @param {string} contextName context name + */ +Tokenizer.prototype.setEndOffset = function (offset, contextName) { + var startIndex = this.getContext(contextName).openRange.startIndex; + var range = new ContextRange(startIndex, offset, contextName); + var ranges = this.getContext(contextName).ranges; + range.rangeId = contextName + "." + (ranges.length); + ranges.push(range); + this.getContext(contextName).openRange = null; + return range; +}; + +/** + * Runs a context check on the current context + * @param {contextParams} contextParams current context params + */ +Tokenizer.prototype.runContextCheck = function(contextParams) { + var this$1 = this; + + var index = contextParams.index; + this.contextCheckers.forEach(function (contextChecker) { + var contextName = contextChecker.contextName; + var openRange = this$1.getContext(contextName).openRange; + if (!openRange && contextChecker.checkStart(contextParams)) { + openRange = new ContextRange(index, null, contextName); + this$1.getContext(contextName).openRange = openRange; + this$1.dispatch('contextStart', [contextName, index]); + } + if (!!openRange && contextChecker.checkEnd(contextParams)) { + var offset = (index - openRange.startIndex) + 1; + var range = this$1.setEndOffset(offset, contextName); + this$1.dispatch('contextEnd', [contextName, range]); + } + }); +}; + +/** + * Converts a text into a list of tokens + * @param {string} text a text to tokenize + */ +Tokenizer.prototype.tokenize = function (text) { + this.tokens = []; + this.resetContextsRanges(); + var chars = Array.from(text); + this.dispatch('start'); + for (var i = 0; i < chars.length; i++) { + var char = chars[i]; + var contextParams = new ContextParams(chars, i); + this.dispatch('next', [contextParams]); + this.runContextCheck(contextParams); + var token = new Token(char); + this.tokens.push(token); + this.dispatch('newToken', [token, contextParams]); + } + this.dispatch('end', [this.tokens]); + return this.tokens; +}; + +// ╭─┄┄┄────────────────────────┄─────────────────────────────────────────────╮ +// ┊ Character Class Assertions ┊ Checks if a char belongs to a certain class ┊ +// ╰─╾──────────────────────────┄─────────────────────────────────────────────╯ +// jscs:disable maximumLineLength +/** + * Check if a char is Arabic + * @param {string} c a single char + */ +function isArabicChar(c) { + return /[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(c); +} + +/** + * Check if a char is an isolated arabic char + * @param {string} c a single char + */ +function isIsolatedArabicChar(char) { + return /[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(char); +} + +/** + * Check if a char is an Arabic Tashkeel char + * @param {string} c a single char + */ +function isTashkeelArabicChar(char) { + return /[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(char); +} + +/** + * Check if a char is Latin + * @param {string} c a single char + */ +function isLatinChar(c) { + return /[A-z]/.test(c); +} + +/** + * Check if a char is whitespace char + * @param {string} c a single char + */ +function isWhiteSpace(c) { + return /\s/.test(c); +} + +/** + * Query a feature by some of it's properties to lookup a glyph substitution. + */ + +/** + * Create feature query instance + * @param {Font} font opentype font instance + */ +function FeatureQuery(font) { + this.font = font; + this.features = {}; +} + +/** + * @typedef SubstitutionAction + * @type Object + * @property {number} id substitution type + * @property {string} tag feature tag + * @property {any} substitution substitution value(s) + */ + +/** + * Create a substitution action instance + * @param {SubstitutionAction} action + */ +function SubstitutionAction(action) { + this.id = action.id; + this.tag = action.tag; + this.substitution = action.substitution; +} + +/** + * Lookup a coverage table + * @param {number} glyphIndex glyph index + * @param {CoverageTable} coverage coverage table + */ +function lookupCoverage(glyphIndex, coverage) { + if (!glyphIndex) { return -1; } + switch (coverage.format) { + case 1: + return coverage.glyphs.indexOf(glyphIndex); + + case 2: + var ranges = coverage.ranges; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (glyphIndex >= range.start && glyphIndex <= range.end) { + var offset = glyphIndex - range.start; + return range.index + offset; + } + } + break; + default: + return -1; // not found + } + return -1; +} + +/** + * Handle a single substitution - format 1 + * @param {ContextParams} contextParams context params to lookup + */ +function singleSubstitutionFormat1(glyphIndex, subtable) { + var substituteIndex = lookupCoverage(glyphIndex, subtable.coverage); + if (substituteIndex === -1) { return null; } + return glyphIndex + subtable.deltaGlyphId; +} + +/** + * Handle a single substitution - format 2 + * @param {ContextParams} contextParams context params to lookup + */ +function singleSubstitutionFormat2(glyphIndex, subtable) { + var substituteIndex = lookupCoverage(glyphIndex, subtable.coverage); + if (substituteIndex === -1) { return null; } + return subtable.substitute[substituteIndex]; +} + +/** + * Lookup a list of coverage tables + * @param {any} coverageList a list of coverage tables + * @param {ContextParams} contextParams context params to lookup + */ +function lookupCoverageList(coverageList, contextParams) { + var lookupList = []; + for (var i = 0; i < coverageList.length; i++) { + var coverage = coverageList[i]; + var glyphIndex = contextParams.current; + glyphIndex = Array.isArray(glyphIndex) ? glyphIndex[0] : glyphIndex; + var lookupIndex = lookupCoverage(glyphIndex, coverage); + if (lookupIndex !== -1) { + lookupList.push(lookupIndex); + } + } + if (lookupList.length !== coverageList.length) { return -1; } + return lookupList; +} + +/** + * Handle chaining context substitution - format 3 + * @param {ContextParams} contextParams context params to lookup + */ +function chainingSubstitutionFormat3(contextParams, subtable) { + var lookupsCount = ( + subtable.inputCoverage.length + + subtable.lookaheadCoverage.length + + subtable.backtrackCoverage.length + ); + if (contextParams.context.length < lookupsCount) { return []; } + // INPUT LOOKUP // + var inputLookups = lookupCoverageList( + subtable.inputCoverage, contextParams + ); + if (inputLookups === -1) { return []; } + // LOOKAHEAD LOOKUP // + var lookaheadOffset = subtable.inputCoverage.length - 1; + if (contextParams.lookahead.length < subtable.lookaheadCoverage.length) { return []; } + var lookaheadContext = contextParams.lookahead.slice(lookaheadOffset); + while (lookaheadContext.length && isTashkeelArabicChar(lookaheadContext[0].char)) { + lookaheadContext.shift(); + } + var lookaheadParams = new ContextParams(lookaheadContext, 0); + var lookaheadLookups = lookupCoverageList( + subtable.lookaheadCoverage, lookaheadParams + ); + // BACKTRACK LOOKUP // + var backtrackContext = [].concat(contextParams.backtrack); + backtrackContext.reverse(); + while (backtrackContext.length && isTashkeelArabicChar(backtrackContext[0].char)) { + backtrackContext.shift(); + } + if (backtrackContext.length < subtable.backtrackCoverage.length) { return []; } + var backtrackParams = new ContextParams(backtrackContext, 0); + var backtrackLookups = lookupCoverageList( + subtable.backtrackCoverage, backtrackParams + ); + var contextRulesMatch = ( + inputLookups.length === subtable.inputCoverage.length && + lookaheadLookups.length === subtable.lookaheadCoverage.length && + backtrackLookups.length === subtable.backtrackCoverage.length + ); + var substitutions = []; + if (contextRulesMatch) { + for (var i = 0; i < subtable.lookupRecords.length; i++) { + var lookupRecord = subtable.lookupRecords[i]; + var lookupListIndex = lookupRecord.lookupListIndex; + var lookupTable = this.getLookupByIndex(lookupListIndex); + for (var s = 0; s < lookupTable.subtables.length; s++) { + var subtable$1 = lookupTable.subtables[s]; + var lookup = this.getLookupMethod(lookupTable, subtable$1); + var substitutionType = this.getSubstitutionType(lookupTable, subtable$1); + if (substitutionType === '12') { + for (var n = 0; n < inputLookups.length; n++) { + var glyphIndex = contextParams.get(n); + var substitution = lookup(glyphIndex); + if (substitution) { substitutions.push(substitution); } + } + } + } + } + } + return substitutions; +} + +/** + * Handle ligature substitution - format 1 + * @param {ContextParams} contextParams context params to lookup + */ +function ligatureSubstitutionFormat1(contextParams, subtable) { + // COVERAGE LOOKUP // + var glyphIndex = contextParams.current; + var ligSetIndex = lookupCoverage(glyphIndex, subtable.coverage); + if (ligSetIndex === -1) { return null; } + // COMPONENTS LOOKUP + // (!) note, components are ordered in the written direction. + var ligature; + var ligatureSet = subtable.ligatureSets[ligSetIndex]; + for (var s = 0; s < ligatureSet.length; s++) { + ligature = ligatureSet[s]; + for (var l = 0; l < ligature.components.length; l++) { + var lookaheadItem = contextParams.lookahead[l]; + var component = ligature.components[l]; + if (lookaheadItem !== component) { break; } + if (l === ligature.components.length - 1) { return ligature; } + } + } + return null; +} + +/** + * Handle decomposition substitution - format 1 + * @param {number} glyphIndex glyph index + * @param {any} subtable subtable + */ +function decompositionSubstitutionFormat1(glyphIndex, subtable) { + var substituteIndex = lookupCoverage(glyphIndex, subtable.coverage); + if (substituteIndex === -1) { return null; } + return subtable.sequences[substituteIndex]; +} + +/** + * Get default script features indexes + */ +FeatureQuery.prototype.getDefaultScriptFeaturesIndexes = function () { + var scripts = this.font.tables.gsub.scripts; + for (var s = 0; s < scripts.length; s++) { + var script = scripts[s]; + if (script.tag === 'DFLT') { return ( + script.script.defaultLangSys.featureIndexes + ); } + } + return []; +}; + +/** + * Get feature indexes of a specific script + * @param {string} scriptTag script tag + */ +FeatureQuery.prototype.getScriptFeaturesIndexes = function(scriptTag) { + var tables = this.font.tables; + if (!tables.gsub) { return []; } + if (!scriptTag) { return this.getDefaultScriptFeaturesIndexes(); } + var scripts = this.font.tables.gsub.scripts; + for (var i = 0; i < scripts.length; i++) { + var script = scripts[i]; + if (script.tag === scriptTag && script.script.defaultLangSys) { + return script.script.defaultLangSys.featureIndexes; + } else { + var langSysRecords = script.langSysRecords; + if (!!langSysRecords) { + for (var j = 0; j < langSysRecords.length; j++) { + var langSysRecord = langSysRecords[j]; + if (langSysRecord.tag === scriptTag) { + var langSys = langSysRecord.langSys; + return langSys.featureIndexes; + } + } + } + } + } + return this.getDefaultScriptFeaturesIndexes(); +}; + +/** + * Map a feature tag to a gsub feature + * @param {any} features gsub features + * @param {string} scriptTag script tag + */ +FeatureQuery.prototype.mapTagsToFeatures = function (features, scriptTag) { + var tags = {}; + for (var i = 0; i < features.length; i++) { + var tag = features[i].tag; + var feature = features[i].feature; + tags[tag] = feature; + } + this.features[scriptTag].tags = tags; +}; + +/** + * Get features of a specific script + * @param {string} scriptTag script tag + */ +FeatureQuery.prototype.getScriptFeatures = function (scriptTag) { + var features = this.features[scriptTag]; + if (this.features.hasOwnProperty(scriptTag)) { return features; } + var featuresIndexes = this.getScriptFeaturesIndexes(scriptTag); + if (!featuresIndexes) { return null; } + var gsub = this.font.tables.gsub; + features = featuresIndexes.map(function (index) { return gsub.features[index]; }); + this.features[scriptTag] = features; + this.mapTagsToFeatures(features, scriptTag); + return features; +}; + +/** + * Get substitution type + * @param {any} lookupTable lookup table + * @param {any} subtable subtable + */ +FeatureQuery.prototype.getSubstitutionType = function(lookupTable, subtable) { + var lookupType = lookupTable.lookupType.toString(); + var substFormat = subtable.substFormat.toString(); + return lookupType + substFormat; +}; + +/** + * Get lookup method + * @param {any} lookupTable lookup table + * @param {any} subtable subtable + */ +FeatureQuery.prototype.getLookupMethod = function(lookupTable, subtable) { + var this$1 = this; + + var substitutionType = this.getSubstitutionType(lookupTable, subtable); + switch (substitutionType) { + case '11': + return function (glyphIndex) { return singleSubstitutionFormat1.apply( + this$1, [glyphIndex, subtable] + ); }; + case '12': + return function (glyphIndex) { return singleSubstitutionFormat2.apply( + this$1, [glyphIndex, subtable] + ); }; + case '63': + return function (contextParams) { return chainingSubstitutionFormat3.apply( + this$1, [contextParams, subtable] + ); }; + case '41': + return function (contextParams) { return ligatureSubstitutionFormat1.apply( + this$1, [contextParams, subtable] + ); }; + case '21': + return function (glyphIndex) { return decompositionSubstitutionFormat1.apply( + this$1, [glyphIndex, subtable] + ); }; + default: + throw new Error( + "lookupType: " + (lookupTable.lookupType) + " - " + + "substFormat: " + (subtable.substFormat) + " " + + "is not yet supported" + ); + } +}; + +/** + * [ LOOKUP TYPES ] + * ------------------------------- + * Single 1; + * Multiple 2; + * Alternate 3; + * Ligature 4; + * Context 5; + * ChainingContext 6; + * ExtensionSubstitution 7; + * ReverseChainingContext 8; + * ------------------------------- + * + */ + +/** + * @typedef FQuery + * @type Object + * @param {string} tag feature tag + * @param {string} script feature script + * @param {ContextParams} contextParams context params + */ + +/** + * Lookup a feature using a query parameters + * @param {FQuery} query feature query + */ +FeatureQuery.prototype.lookupFeature = function (query) { + var contextParams = query.contextParams; + var currentIndex = contextParams.index; + var feature = this.getFeature({ + tag: query.tag, script: query.script + }); + if (!feature) { return new Error( + "font '" + (this.font.names.fullName.en) + "' " + + "doesn't support feature '" + (query.tag) + "' " + + "for script '" + (query.script) + "'." + ); } + var lookups = this.getFeatureLookups(feature); + var substitutions = [].concat(contextParams.context); + for (var l = 0; l < lookups.length; l++) { + var lookupTable = lookups[l]; + var subtables = this.getLookupSubtables(lookupTable); + for (var s = 0; s < subtables.length; s++) { + var subtable = subtables[s]; + var substType = this.getSubstitutionType(lookupTable, subtable); + var lookup = this.getLookupMethod(lookupTable, subtable); + var substitution = (void 0); + switch (substType) { + case '11': + substitution = lookup(contextParams.current); + if (substitution) { + substitutions.splice(currentIndex, 1, new SubstitutionAction({ + id: 11, tag: query.tag, substitution: substitution + })); + } + break; + case '12': + substitution = lookup(contextParams.current); + if (substitution) { + substitutions.splice(currentIndex, 1, new SubstitutionAction({ + id: 12, tag: query.tag, substitution: substitution + })); + } + break; + case '63': + substitution = lookup(contextParams); + if (Array.isArray(substitution) && substitution.length) { + substitutions.splice(currentIndex, 1, new SubstitutionAction({ + id: 63, tag: query.tag, substitution: substitution + })); + } + break; + case '41': + substitution = lookup(contextParams); + if (substitution) { + substitutions.splice(currentIndex, 1, new SubstitutionAction({ + id: 41, tag: query.tag, substitution: substitution + })); + } + break; + case '21': + substitution = lookup(contextParams.current); + if (substitution) { + substitutions.splice(currentIndex, 1, new SubstitutionAction({ + id: 21, tag: query.tag, substitution: substitution + })); + } + break; + } + contextParams = new ContextParams(substitutions, currentIndex); + if (Array.isArray(substitution) && !substitution.length) { continue; } + substitution = null; + } + } + return substitutions.length ? substitutions : null; +}; + +/** + * Checks if a font supports a specific features + * @param {FQuery} query feature query object + */ +FeatureQuery.prototype.supports = function (query) { + if (!query.script) { return false; } + this.getScriptFeatures(query.script); + var supportedScript = this.features.hasOwnProperty(query.script); + if (!query.tag) { return supportedScript; } + var supportedFeature = ( + this.features[query.script].some(function (feature) { return feature.tag === query.tag; }) + ); + return supportedScript && supportedFeature; +}; + +/** + * Get lookup table subtables + * @param {any} lookupTable lookup table + */ +FeatureQuery.prototype.getLookupSubtables = function (lookupTable) { + return lookupTable.subtables || null; +}; + +/** + * Get lookup table by index + * @param {number} index lookup table index + */ +FeatureQuery.prototype.getLookupByIndex = function (index) { + var lookups = this.font.tables.gsub.lookups; + return lookups[index] || null; +}; + +/** + * Get lookup tables for a feature + * @param {string} feature + */ +FeatureQuery.prototype.getFeatureLookups = function (feature) { + // TODO: memoize + return feature.lookupListIndexes.map(this.getLookupByIndex.bind(this)); +}; + +/** + * Query a feature by it's properties + * @param {any} query an object that describes the properties of a query + */ +FeatureQuery.prototype.getFeature = function getFeature(query) { + if (!this.font) { return { FAIL: "No font was found"}; } + if (!this.features.hasOwnProperty(query.script)) { + this.getScriptFeatures(query.script); + } + var scriptFeatures = this.features[query.script]; + if (!scriptFeatures) { return ( + { FAIL: ("No feature for script " + (query.script))} + ); } + if (!scriptFeatures.tags[query.tag]) { return null; } + return this.features[query.script].tags[query.tag]; +}; + +/** + * Arabic word context checkers + */ + +function arabicWordStartCheck(contextParams) { + var char = contextParams.current; + var prevChar = contextParams.get(-1); + return ( + // ? arabic first char + (prevChar === null && isArabicChar(char)) || + // ? arabic char preceded with a non arabic char + (!isArabicChar(prevChar) && isArabicChar(char)) + ); +} + +function arabicWordEndCheck(contextParams) { + var nextChar = contextParams.get(1); + return ( + // ? last arabic char + (nextChar === null) || + // ? next char is not arabic + (!isArabicChar(nextChar)) + ); +} + +var arabicWordCheck = { + startCheck: arabicWordStartCheck, + endCheck: arabicWordEndCheck +}; + +/** + * Arabic sentence context checkers + */ + +function arabicSentenceStartCheck(contextParams) { + var char = contextParams.current; + var prevChar = contextParams.get(-1); + return ( + // ? an arabic char preceded with a non arabic char + (isArabicChar(char) || isTashkeelArabicChar(char)) && + !isArabicChar(prevChar) + ); +} + +function arabicSentenceEndCheck(contextParams) { + var nextChar = contextParams.get(1); + switch (true) { + case nextChar === null: + return true; + case (!isArabicChar(nextChar) && !isTashkeelArabicChar(nextChar)): + var nextIsWhitespace = isWhiteSpace(nextChar); + if (!nextIsWhitespace) { return true; } + if (nextIsWhitespace) { + var arabicCharAhead = false; + arabicCharAhead = ( + contextParams.lookahead.some( + function (c) { return isArabicChar(c) || isTashkeelArabicChar(c); } + ) + ); + if (!arabicCharAhead) { return true; } + } + break; + default: + return false; + } +} + +var arabicSentenceCheck = { + startCheck: arabicSentenceStartCheck, + endCheck: arabicSentenceEndCheck +}; + +/** + * Apply single substitution format 1 + * @param {Array} substitutions substitutions + * @param {any} tokens a list of tokens + * @param {number} index token index + */ +function singleSubstitutionFormat1$1(action, tokens, index) { + tokens[index].setState(action.tag, action.substitution); +} + +/** + * Apply single substitution format 2 + * @param {Array} substitutions substitutions + * @param {any} tokens a list of tokens + * @param {number} index token index + */ +function singleSubstitutionFormat2$1(action, tokens, index) { + tokens[index].setState(action.tag, action.substitution); +} + +/** + * Apply chaining context substitution format 3 + * @param {Array} substitutions substitutions + * @param {any} tokens a list of tokens + * @param {number} index token index + */ +function chainingSubstitutionFormat3$1(action, tokens, index) { + action.substitution.forEach(function (subst, offset) { + var token = tokens[index + offset]; + token.setState(action.tag, subst); + }); +} + +/** + * Apply ligature substitution format 1 + * @param {Array} substitutions substitutions + * @param {any} tokens a list of tokens + * @param {number} index token index + */ +function ligatureSubstitutionFormat1$1(action, tokens, index) { + var token = tokens[index]; + token.setState(action.tag, action.substitution.ligGlyph); + var compsCount = action.substitution.components.length; + for (var i = 0; i < compsCount; i++) { + token = tokens[index + i + 1]; + token.setState('deleted', true); + } +} + +/** + * Supported substitutions + */ +var SUBSTITUTIONS = { + 11: singleSubstitutionFormat1$1, + 12: singleSubstitutionFormat2$1, + 63: chainingSubstitutionFormat3$1, + 41: ligatureSubstitutionFormat1$1 +}; + +/** + * Apply substitutions to a list of tokens + * @param {Array} substitutions substitutions + * @param {any} tokens a list of tokens + * @param {number} index token index + */ +function applySubstitution(action, tokens, index) { + if (action instanceof SubstitutionAction && SUBSTITUTIONS[action.id]) { + SUBSTITUTIONS[action.id](action, tokens, index); + } +} + +/** + * Apply Arabic presentation forms to a range of tokens + */ + +/** + * Check if a char can be connected to it's preceding char + * @param {ContextParams} charContextParams context params of a char + */ +function willConnectPrev(charContextParams) { + var backtrack = [].concat(charContextParams.backtrack); + for (var i = backtrack.length - 1; i >= 0; i--) { + var prevChar = backtrack[i]; + var isolated = isIsolatedArabicChar(prevChar); + var tashkeel = isTashkeelArabicChar(prevChar); + if (!isolated && !tashkeel) { return true; } + if (isolated) { return false; } + } + return false; +} + +/** + * Check if a char can be connected to it's proceeding char + * @param {ContextParams} charContextParams context params of a char + */ +function willConnectNext(charContextParams) { + if (isIsolatedArabicChar(charContextParams.current)) { return false; } + for (var i = 0; i < charContextParams.lookahead.length; i++) { + var nextChar = charContextParams.lookahead[i]; + var tashkeel = isTashkeelArabicChar(nextChar); + if (!tashkeel) { return true; } + } + return false; +} + +/** + * Apply arabic presentation forms to a list of tokens + * @param {ContextRange} range a range of tokens + */ +function arabicPresentationForms(range) { + var this$1 = this; + + var script = 'arab'; + var tags = this.featuresTags[script]; + var tokens = this.tokenizer.getRangeTokens(range); + if (tokens.length === 1) { return; } + var contextParams = new ContextParams( + tokens.map(function (token) { return token.getState('glyphIndex'); } + ), 0); + var charContextParams = new ContextParams( + tokens.map(function (token) { return token.char; } + ), 0); + tokens.forEach(function (token, index) { + if (isTashkeelArabicChar(token.char)) { return; } + contextParams.setCurrentIndex(index); + charContextParams.setCurrentIndex(index); + var CONNECT = 0; // 2 bits 00 (10: can connect next) (01: can connect prev) + if (willConnectPrev(charContextParams)) { CONNECT |= 1; } + if (willConnectNext(charContextParams)) { CONNECT |= 2; } + var tag; + switch (CONNECT) { + case 1: (tag = 'fina'); break; + case 2: (tag = 'init'); break; + case 3: (tag = 'medi'); break; + } + if (tags.indexOf(tag) === -1) { return; } + var substitutions = this$1.query.lookupFeature({ + tag: tag, script: script, contextParams: contextParams + }); + if (substitutions instanceof Error) { return console.info(substitutions.message); } + substitutions.forEach(function (action, index) { + if (action instanceof SubstitutionAction) { + applySubstitution(action, tokens, index); + contextParams.context[index] = action.substitution; + } + }); + }); +} + +/** + * Apply Arabic required ligatures feature to a range of tokens + */ + +/** + * Update context params + * @param {any} tokens a list of tokens + * @param {number} index current item index + */ +function getContextParams(tokens, index) { + var context = tokens.map(function (token) { return token.activeState.value; }); + return new ContextParams(context, index || 0); +} + +/** + * Apply Arabic required ligatures to a context range + * @param {ContextRange} range a range of tokens + */ +function arabicRequiredLigatures(range) { + var this$1 = this; + + var script = 'arab'; + var tokens = this.tokenizer.getRangeTokens(range); + var contextParams = getContextParams(tokens); + contextParams.context.forEach(function (glyphIndex, index) { + contextParams.setCurrentIndex(index); + var substitutions = this$1.query.lookupFeature({ + tag: 'rlig', script: script, contextParams: contextParams + }); + if (substitutions.length) { + substitutions.forEach( + function (action) { return applySubstitution(action, tokens, index); } + ); + contextParams = getContextParams(tokens); + } + }); +} + +/** + * Latin word context checkers + */ + +function latinWordStartCheck(contextParams) { + var char = contextParams.current; + var prevChar = contextParams.get(-1); + return ( + // ? latin first char + (prevChar === null && isLatinChar(char)) || + // ? latin char preceded with a non latin char + (!isLatinChar(prevChar) && isLatinChar(char)) + ); +} + +function latinWordEndCheck(contextParams) { + var nextChar = contextParams.get(1); + return ( + // ? last latin char + (nextChar === null) || + // ? next char is not latin + (!isLatinChar(nextChar)) + ); +} + +var latinWordCheck = { + startCheck: latinWordStartCheck, + endCheck: latinWordEndCheck +}; + +/** + * Apply Latin ligature feature to a range of tokens + */ + +/** + * Update context params + * @param {any} tokens a list of tokens + * @param {number} index current item index + */ +function getContextParams$1(tokens, index) { + var context = tokens.map(function (token) { return token.activeState.value; }); + return new ContextParams(context, index || 0); +} + +/** + * Apply Arabic required ligatures to a context range + * @param {ContextRange} range a range of tokens + */ +function latinLigature(range) { + var this$1 = this; + + var script = 'latn'; + var tokens = this.tokenizer.getRangeTokens(range); + var contextParams = getContextParams$1(tokens); + contextParams.context.forEach(function (glyphIndex, index) { + contextParams.setCurrentIndex(index); + var substitutions = this$1.query.lookupFeature({ + tag: 'liga', script: script, contextParams: contextParams + }); + if (substitutions.length) { + substitutions.forEach( + function (action) { return applySubstitution(action, tokens, index); } + ); + contextParams = getContextParams$1(tokens); + } + }); +} + +/** + * Infer bidirectional properties for a given text and apply + * the corresponding layout rules. + */ + +/** + * Create Bidi. features + * @param {string} baseDir text base direction. value either 'ltr' or 'rtl' + */ +function Bidi(baseDir) { + this.baseDir = baseDir || 'ltr'; + this.tokenizer = new Tokenizer(); + this.featuresTags = {}; +} + +/** + * Sets Bidi text + * @param {string} text a text input + */ +Bidi.prototype.setText = function (text) { + this.text = text; +}; + +/** + * Store essential context checks: + * arabic word check for applying gsub features + * arabic sentence check for adjusting arabic layout + */ +Bidi.prototype.contextChecks = ({ + latinWordCheck: latinWordCheck, + arabicWordCheck: arabicWordCheck, + arabicSentenceCheck: arabicSentenceCheck +}); + +/** + * Register arabic word check + */ +function registerContextChecker(checkId) { + var check = this.contextChecks[(checkId + "Check")]; + return this.tokenizer.registerContextChecker( + checkId, check.startCheck, check.endCheck + ); +} + +/** + * Perform pre tokenization procedure then + * tokenize text input + */ +function tokenizeText() { + registerContextChecker.call(this, 'latinWord'); + registerContextChecker.call(this, 'arabicWord'); + registerContextChecker.call(this, 'arabicSentence'); + return this.tokenizer.tokenize(this.text); +} + +/** + * Reverse arabic sentence layout + * TODO: check base dir before applying adjustments - priority low + */ +function reverseArabicSentences() { + var this$1 = this; + + var ranges = this.tokenizer.getContextRanges('arabicSentence'); + ranges.forEach(function (range) { + var rangeTokens = this$1.tokenizer.getRangeTokens(range); + this$1.tokenizer.replaceRange( + range.startIndex, + range.endOffset, + rangeTokens.reverse() + ); + }); +} + +/** + * Register supported features tags + * @param {script} script script tag + * @param {Array} tags features tags list + */ +Bidi.prototype.registerFeatures = function (script, tags) { + var this$1 = this; + + var supportedTags = tags.filter( + function (tag) { return this$1.query.supports({script: script, tag: tag}); } + ); + if (!this.featuresTags.hasOwnProperty(script)) { + this.featuresTags[script] = supportedTags; + } else { + this.featuresTags[script] = + this.featuresTags[script].concat(supportedTags); + } +}; + +/** + * Apply GSUB features + * @param {Array} tagsList a list of features tags + * @param {string} script a script tag + * @param {Font} font opentype font instance + */ +Bidi.prototype.applyFeatures = function (font, features) { + if (!font) { throw new Error( + 'No valid font was provided to apply features' + ); } + if (!this.query) { this.query = new FeatureQuery(font); } + for (var f = 0; f < features.length; f++) { + var feature = features[f]; + if (!this.query.supports({script: feature.script})) { continue; } + this.registerFeatures(feature.script, feature.tags); + } +}; + +/** + * Register a state modifier + * @param {string} modifierId state modifier id + * @param {function} condition a predicate function that returns true or false + * @param {function} modifier a modifier function to set token state + */ +Bidi.prototype.registerModifier = function (modifierId, condition, modifier) { + this.tokenizer.registerModifier(modifierId, condition, modifier); +}; + +/** + * Check if 'glyphIndex' is registered + */ +function checkGlyphIndexStatus() { + if (this.tokenizer.registeredModifiers.indexOf('glyphIndex') === -1) { + throw new Error( + 'glyphIndex modifier is required to apply ' + + 'arabic presentation features.' + ); + } +} + +/** + * Apply arabic presentation forms features + */ +function applyArabicPresentationForms() { + var this$1 = this; + + var script = 'arab'; + if (!this.featuresTags.hasOwnProperty(script)) { return; } + checkGlyphIndexStatus.call(this); + var ranges = this.tokenizer.getContextRanges('arabicWord'); + ranges.forEach(function (range) { + arabicPresentationForms.call(this$1, range); + }); +} + +/** + * Apply required arabic ligatures + */ +function applyArabicRequireLigatures() { + var this$1 = this; + + var script = 'arab'; + if (!this.featuresTags.hasOwnProperty(script)) { return; } + var tags = this.featuresTags[script]; + if (tags.indexOf('rlig') === -1) { return; } + checkGlyphIndexStatus.call(this); + var ranges = this.tokenizer.getContextRanges('arabicWord'); + ranges.forEach(function (range) { + arabicRequiredLigatures.call(this$1, range); + }); +} + +/** + * Apply required arabic ligatures + */ +function applyLatinLigatures() { + var this$1 = this; + + var script = 'latn'; + if (!this.featuresTags.hasOwnProperty(script)) { return; } + var tags = this.featuresTags[script]; + if (tags.indexOf('liga') === -1) { return; } + checkGlyphIndexStatus.call(this); + var ranges = this.tokenizer.getContextRanges('latinWord'); + ranges.forEach(function (range) { + latinLigature.call(this$1, range); + }); +} + +/** + * Check if a context is registered + * @param {string} contextId context id + */ +Bidi.prototype.checkContextReady = function (contextId) { + return !!this.tokenizer.getContext(contextId); +}; + +/** + * Apply features to registered contexts + */ +Bidi.prototype.applyFeaturesToContexts = function () { + if (this.checkContextReady('arabicWord')) { + applyArabicPresentationForms.call(this); + applyArabicRequireLigatures.call(this); + } + if (this.checkContextReady('latinWord')) { + applyLatinLigatures.call(this); + } + if (this.checkContextReady('arabicSentence')) { + reverseArabicSentences.call(this); + } +}; + +/** + * process text input + * @param {string} text an input text + */ +Bidi.prototype.processText = function(text) { + if (!this.text || this.text !== text) { + this.setText(text); + tokenizeText.call(this); + this.applyFeaturesToContexts(); + } +}; + +/** + * Process a string of text to identify and adjust + * bidirectional text entities. + * @param {string} text input text + */ +Bidi.prototype.getBidiText = function (text) { + this.processText(text); + return this.tokenizer.getText(); +}; + +/** + * Get the current state index of each token + * @param {text} text an input text + */ +Bidi.prototype.getTextGlyphs = function (text) { + this.processText(text); + var indexes = []; + for (var i = 0; i < this.tokenizer.tokens.length; i++) { + var token = this.tokenizer.tokens[i]; + if (token.state.deleted) { continue; } + var index = token.activeState.value; + indexes.push(Array.isArray(index) ? index[0] : index); + } + return indexes; +}; + +// The Font object + +/** + * @typedef FontOptions + * @type Object + * @property {Boolean} empty - whether to create a new empty font + * @property {string} familyName + * @property {string} styleName + * @property {string=} fullName + * @property {string=} postScriptName + * @property {string=} designer + * @property {string=} designerURL + * @property {string=} manufacturer + * @property {string=} manufacturerURL + * @property {string=} license + * @property {string=} licenseURL + * @property {string=} version + * @property {string=} description + * @property {string=} copyright + * @property {string=} trademark + * @property {Number} unitsPerEm + * @property {Number} ascender + * @property {Number} descender + * @property {Number} createdTimestamp + * @property {string=} weightClass + * @property {string=} widthClass + * @property {string=} fsSelection + */ + +/** + * A Font represents a loaded OpenType font file. + * It contains a set of glyphs and methods to draw text on a drawing context, + * or to get a path representing the text. + * @exports opentype.Font + * @class + * @param {FontOptions} + * @constructor + */ +function Font(options) { + options = options || {}; + options.tables = options.tables || {}; + + if (!options.empty) { + // Check that we've provided the minimum set of names. + checkArgument(options.familyName, 'When creating a new Font object, familyName is required.'); + checkArgument(options.styleName, 'When creating a new Font object, styleName is required.'); + checkArgument(options.unitsPerEm, 'When creating a new Font object, unitsPerEm is required.'); + checkArgument(options.ascender, 'When creating a new Font object, ascender is required.'); + checkArgument(options.descender <= 0, 'When creating a new Font object, negative descender value is required.'); + + // OS X will complain if the names are empty, so we put a single space everywhere by default. + this.names = { + fontFamily: {en: options.familyName || ' '}, + fontSubfamily: {en: options.styleName || ' '}, + fullName: {en: options.fullName || options.familyName + ' ' + options.styleName}, + // postScriptName may not contain any whitespace + postScriptName: {en: options.postScriptName || (options.familyName + options.styleName).replace(/\s/g, '')}, + designer: {en: options.designer || ' '}, + designerURL: {en: options.designerURL || ' '}, + manufacturer: {en: options.manufacturer || ' '}, + manufacturerURL: {en: options.manufacturerURL || ' '}, + license: {en: options.license || ' '}, + licenseURL: {en: options.licenseURL || ' '}, + version: {en: options.version || 'Version 0.1'}, + description: {en: options.description || ' '}, + copyright: {en: options.copyright || ' '}, + trademark: {en: options.trademark || ' '} + }; + this.unitsPerEm = options.unitsPerEm || 1000; + this.ascender = options.ascender; + this.descender = options.descender; + this.createdTimestamp = options.createdTimestamp; + this.tables = Object.assign(options.tables, { + os2: Object.assign({ + usWeightClass: options.weightClass || this.usWeightClasses.MEDIUM, + usWidthClass: options.widthClass || this.usWidthClasses.MEDIUM, + fsSelection: options.fsSelection || this.fsSelectionValues.REGULAR, + }, options.tables.os2) + }); + } + + this.supported = true; // Deprecated: parseBuffer will throw an error if font is not supported. + this.glyphs = new glyphset.GlyphSet(this, options.glyphs || []); + this.encoding = new DefaultEncoding(this); + this.position = new Position(this); + this.substitution = new Substitution(this); + this.tables = this.tables || {}; + + // needed for low memory mode only. + this._push = null; + this._hmtxTableData = {}; + + Object.defineProperty(this, 'hinting', { + get: function() { + if (this._hinting) { return this._hinting; } + if (this.outlinesFormat === 'truetype') { + return (this._hinting = new Hinting(this)); + } + } + }); +} + +/** + * Check if the font has a glyph for the given character. + * @param {string} + * @return {Boolean} + */ +Font.prototype.hasChar = function(c) { + return this.encoding.charToGlyphIndex(c) !== null; +}; + +/** + * Convert the given character to a single glyph index. + * Note that this function assumes that there is a one-to-one mapping between + * the given character and a glyph; for complex scripts this might not be the case. + * @param {string} + * @return {Number} + */ +Font.prototype.charToGlyphIndex = function(s) { + return this.encoding.charToGlyphIndex(s); +}; + +/** + * Convert the given character to a single Glyph object. + * Note that this function assumes that there is a one-to-one mapping between + * the given character and a glyph; for complex scripts this might not be the case. + * @param {string} + * @return {opentype.Glyph} + */ +Font.prototype.charToGlyph = function(c) { + var glyphIndex = this.charToGlyphIndex(c); + var glyph = this.glyphs.get(glyphIndex); + if (!glyph) { + // .notdef + glyph = this.glyphs.get(0); + } + + return glyph; +}; + +/** + * Update features + * @param {any} options features options + */ +Font.prototype.updateFeatures = function (options) { + // TODO: update all features options not only 'latn'. + return this.defaultRenderOptions.features.map(function (feature) { + if (feature.script === 'latn') { + return { + script: 'latn', + tags: feature.tags.filter(function (tag) { return options[tag]; }) + }; + } else { + return feature; + } + }); +}; + +/** + * Convert the given text to a list of Glyph objects. + * Note that there is no strict one-to-one mapping between characters and + * glyphs, so the list of returned glyphs can be larger or smaller than the + * length of the given string. + * @param {string} + * @param {GlyphRenderOptions} [options] + * @return {opentype.Glyph[]} + */ +Font.prototype.stringToGlyphs = function(s, options) { + var this$1 = this; + + + var bidi = new Bidi(); + + // Create and register 'glyphIndex' state modifier + var charToGlyphIndexMod = function (token) { return this$1.charToGlyphIndex(token.char); }; + bidi.registerModifier('glyphIndex', null, charToGlyphIndexMod); + + // roll-back to default features + var features = options ? + this.updateFeatures(options.features) : + this.defaultRenderOptions.features; + + bidi.applyFeatures(this, features); + + var indexes = bidi.getTextGlyphs(s); + + var length = indexes.length; + + // convert glyph indexes to glyph objects + var glyphs = new Array(length); + var notdef = this.glyphs.get(0); + for (var i = 0; i < length; i += 1) { + glyphs[i] = this.glyphs.get(indexes[i]) || notdef; + } + return glyphs; +}; + +/** + * @param {string} + * @return {Number} + */ +Font.prototype.nameToGlyphIndex = function(name) { + return this.glyphNames.nameToGlyphIndex(name); +}; + +/** + * @param {string} + * @return {opentype.Glyph} + */ +Font.prototype.nameToGlyph = function(name) { + var glyphIndex = this.nameToGlyphIndex(name); + var glyph = this.glyphs.get(glyphIndex); + if (!glyph) { + // .notdef + glyph = this.glyphs.get(0); + } + + return glyph; +}; + +/** + * @param {Number} + * @return {String} + */ +Font.prototype.glyphIndexToName = function(gid) { + if (!this.glyphNames.glyphIndexToName) { + return ''; + } + + return this.glyphNames.glyphIndexToName(gid); +}; + +/** + * Retrieve the value of the kerning pair between the left glyph (or its index) + * and the right glyph (or its index). If no kerning pair is found, return 0. + * The kerning value gets added to the advance width when calculating the spacing + * between glyphs. + * For GPOS kerning, this method uses the default script and language, which covers + * most use cases. To have greater control, use font.position.getKerningValue . + * @param {opentype.Glyph} leftGlyph + * @param {opentype.Glyph} rightGlyph + * @return {Number} + */ +Font.prototype.getKerningValue = function(leftGlyph, rightGlyph) { + leftGlyph = leftGlyph.index || leftGlyph; + rightGlyph = rightGlyph.index || rightGlyph; + var gposKerning = this.position.defaultKerningTables; + if (gposKerning) { + return this.position.getKerningValue(gposKerning, leftGlyph, rightGlyph); + } + // "kern" table + return this.kerningPairs[leftGlyph + ',' + rightGlyph] || 0; +}; + +/** + * @typedef GlyphRenderOptions + * @type Object + * @property {string} [script] - script used to determine which features to apply. By default, 'DFLT' or 'latn' is used. + * See https://www.microsoft.com/typography/otspec/scripttags.htm + * @property {string} [language='dflt'] - language system used to determine which features to apply. + * See https://www.microsoft.com/typography/developers/opentype/languagetags.aspx + * @property {boolean} [kerning=true] - whether to include kerning values + * @property {object} [features] - OpenType Layout feature tags. Used to enable or disable the features of the given script/language system. + * See https://www.microsoft.com/typography/otspec/featuretags.htm + */ +Font.prototype.defaultRenderOptions = { + kerning: true, + features: [ + /** + * these 4 features are required to render Arabic text properly + * and shouldn't be turned off when rendering arabic text. + */ + { script: 'arab', tags: ['init', 'medi', 'fina', 'rlig'] }, + { script: 'latn', tags: ['liga', 'rlig'] } + ] +}; + +/** + * Helper function that invokes the given callback for each glyph in the given text. + * The callback gets `(glyph, x, y, fontSize, options)`.* @param {string} text + * @param {string} text - The text to apply. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + * @param {Function} callback + */ +Font.prototype.forEachGlyph = function(text, x, y, fontSize, options, callback) { + x = x !== undefined ? x : 0; + y = y !== undefined ? y : 0; + fontSize = fontSize !== undefined ? fontSize : 72; + options = Object.assign({}, this.defaultRenderOptions, options); + var fontScale = 1 / this.unitsPerEm * fontSize; + var glyphs = this.stringToGlyphs(text, options); + var kerningLookups; + if (options.kerning) { + var script = options.script || this.position.getDefaultScriptName(); + kerningLookups = this.position.getKerningTables(script, options.language); + } + for (var i = 0; i < glyphs.length; i += 1) { + var glyph = glyphs[i]; + callback.call(this, glyph, x, y, fontSize, options); + if (glyph.advanceWidth) { + x += glyph.advanceWidth * fontScale; + } + + if (options.kerning && i < glyphs.length - 1) { + // We should apply position adjustment lookups in a more generic way. + // Here we only use the xAdvance value. + var kerningValue = kerningLookups ? + this.position.getKerningValue(kerningLookups, glyph.index, glyphs[i + 1].index) : + this.getKerningValue(glyph, glyphs[i + 1]); + x += kerningValue * fontScale; + } + + if (options.letterSpacing) { + x += options.letterSpacing * fontSize; + } else if (options.tracking) { + x += (options.tracking / 1000) * fontSize; + } + } + return x; +}; + +/** + * Create a Path object that represents the given text. + * @param {string} text - The text to create. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + * @return {opentype.Path} + */ +Font.prototype.getPath = function(text, x, y, fontSize, options) { + var fullPath = new Path(); + this.forEachGlyph(text, x, y, fontSize, options, function(glyph, gX, gY, gFontSize) { + var glyphPath = glyph.getPath(gX, gY, gFontSize, options, this); + fullPath.extend(glyphPath); + }); + return fullPath; +}; + +/** + * Create an array of Path objects that represent the glyphs of a given text. + * @param {string} text - The text to create. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + * @return {opentype.Path[]} + */ +Font.prototype.getPaths = function(text, x, y, fontSize, options) { + var glyphPaths = []; + this.forEachGlyph(text, x, y, fontSize, options, function(glyph, gX, gY, gFontSize) { + var glyphPath = glyph.getPath(gX, gY, gFontSize, options, this); + glyphPaths.push(glyphPath); + }); + + return glyphPaths; +}; + +/** + * Returns the advance width of a text. + * + * This is something different than Path.getBoundingBox() as for example a + * suffixed whitespace increases the advanceWidth but not the bounding box + * or an overhanging letter like a calligraphic 'f' might have a quite larger + * bounding box than its advance width. + * + * This corresponds to canvas2dContext.measureText(text).width + * + * @param {string} text - The text to create. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + * @return advance width + */ +Font.prototype.getAdvanceWidth = function(text, fontSize, options) { + return this.forEachGlyph(text, 0, 0, fontSize, options, function() {}); +}; + +/** + * Draw the text on the given drawing context. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. + * @param {string} text - The text to create. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + */ +Font.prototype.draw = function(ctx, text, x, y, fontSize, options) { + this.getPath(text, x, y, fontSize, options).draw(ctx); +}; + +/** + * Draw the points of all glyphs in the text. + * On-curve points will be drawn in blue, off-curve points will be drawn in red. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. + * @param {string} text - The text to create. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + */ +Font.prototype.drawPoints = function(ctx, text, x, y, fontSize, options) { + this.forEachGlyph(text, x, y, fontSize, options, function(glyph, gX, gY, gFontSize) { + glyph.drawPoints(ctx, gX, gY, gFontSize); + }); +}; + +/** + * Draw lines indicating important font measurements for all glyphs in the text. + * Black lines indicate the origin of the coordinate system (point 0,0). + * Blue lines indicate the glyph bounding box. + * Green line indicates the advance width of the glyph. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. + * @param {string} text - The text to create. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + */ +Font.prototype.drawMetrics = function(ctx, text, x, y, fontSize, options) { + this.forEachGlyph(text, x, y, fontSize, options, function(glyph, gX, gY, gFontSize) { + glyph.drawMetrics(ctx, gX, gY, gFontSize); + }); +}; + +/** + * @param {string} + * @return {string} + */ +Font.prototype.getEnglishName = function(name) { + var translations = this.names[name]; + if (translations) { + return translations.en; + } +}; + +/** + * Validate + */ +Font.prototype.validate = function() { + var _this = this; + + function assert(predicate, message) { + } + + function assertNamePresent(name) { + var englishName = _this.getEnglishName(name); + assert(englishName && englishName.trim().length > 0); + } + + // Identification information + assertNamePresent('fontFamily'); + assertNamePresent('weightName'); + assertNamePresent('manufacturer'); + assertNamePresent('copyright'); + assertNamePresent('version'); + + // Dimension information + assert(this.unitsPerEm > 0); +}; + +/** + * Convert the font object to a SFNT data structure. + * This structure contains all the necessary tables and metadata to create a binary OTF file. + * @return {opentype.Table} + */ +Font.prototype.toTables = function() { + return sfnt.fontToTable(this); +}; +/** + * @deprecated Font.toBuffer is deprecated. Use Font.toArrayBuffer instead. + */ +Font.prototype.toBuffer = function() { + console.warn('Font.toBuffer is deprecated. Use Font.toArrayBuffer instead.'); + return this.toArrayBuffer(); +}; +/** + * Converts a `opentype.Font` into an `ArrayBuffer` + * @return {ArrayBuffer} + */ +Font.prototype.toArrayBuffer = function() { + var sfntTable = this.toTables(); + var bytes = sfntTable.encode(); + var buffer = new ArrayBuffer(bytes.length); + var intArray = new Uint8Array(buffer); + for (var i = 0; i < bytes.length; i++) { + intArray[i] = bytes[i]; + } + + return buffer; +}; + +/** + * Initiate a download of the OpenType font. + */ +Font.prototype.download = function(fileName) { + var familyName = this.getEnglishName('fontFamily'); + var styleName = this.getEnglishName('fontSubfamily'); + fileName = fileName || familyName.replace(/\s/g, '') + '-' + styleName + '.otf'; + var arrayBuffer = this.toArrayBuffer(); + + window.URL = window.URL || window.webkitURL; + + if (window.URL) { + var dataView = new DataView(arrayBuffer); + var blob = new Blob([dataView], {type: 'font/opentype'}); + + var link = document.createElement('a'); + link.href = window.URL.createObjectURL(blob); + link.download = fileName; + + var event = document.createEvent('MouseEvents'); + event.initEvent('click', true, false); + link.dispatchEvent(event); + } else { + console.warn('Font file could not be downloaded. Try using a different browser.'); + } +}; +/** + * @private + */ +Font.prototype.fsSelectionValues = { + ITALIC: 0x001, //1 + UNDERSCORE: 0x002, //2 + NEGATIVE: 0x004, //4 + OUTLINED: 0x008, //8 + STRIKEOUT: 0x010, //16 + BOLD: 0x020, //32 + REGULAR: 0x040, //64 + USER_TYPO_METRICS: 0x080, //128 + WWS: 0x100, //256 + OBLIQUE: 0x200 //512 +}; + +/** + * @private + */ +Font.prototype.usWidthClasses = { + ULTRA_CONDENSED: 1, + EXTRA_CONDENSED: 2, + CONDENSED: 3, + SEMI_CONDENSED: 4, + MEDIUM: 5, + SEMI_EXPANDED: 6, + EXPANDED: 7, + EXTRA_EXPANDED: 8, + ULTRA_EXPANDED: 9 +}; + +/** + * @private + */ +Font.prototype.usWeightClasses = { + THIN: 100, + EXTRA_LIGHT: 200, + LIGHT: 300, + NORMAL: 400, + MEDIUM: 500, + SEMI_BOLD: 600, + BOLD: 700, + EXTRA_BOLD: 800, + BLACK: 900 +}; + +// The `fvar` table stores font variation axes and instances. + +function addName(name, names) { + var nameString = JSON.stringify(name); + var nameID = 256; + for (var nameKey in names) { + var n = parseInt(nameKey); + if (!n || n < 256) { + continue; + } + + if (JSON.stringify(names[nameKey]) === nameString) { + return n; + } + + if (nameID <= n) { + nameID = n + 1; + } + } + + names[nameID] = name; + return nameID; +} + +function makeFvarAxis(n, axis, names) { + var nameID = addName(axis.name, names); + return [ + {name: 'tag_' + n, type: 'TAG', value: axis.tag}, + {name: 'minValue_' + n, type: 'FIXED', value: axis.minValue << 16}, + {name: 'defaultValue_' + n, type: 'FIXED', value: axis.defaultValue << 16}, + {name: 'maxValue_' + n, type: 'FIXED', value: axis.maxValue << 16}, + {name: 'flags_' + n, type: 'USHORT', value: 0}, + {name: 'nameID_' + n, type: 'USHORT', value: nameID} + ]; +} + +function parseFvarAxis(data, start, names) { + var axis = {}; + var p = new parse.Parser(data, start); + axis.tag = p.parseTag(); + axis.minValue = p.parseFixed(); + axis.defaultValue = p.parseFixed(); + axis.maxValue = p.parseFixed(); + p.skip('uShort', 1); // reserved for flags; no values defined + axis.name = names[p.parseUShort()] || {}; + return axis; +} + +function makeFvarInstance(n, inst, axes, names) { + var nameID = addName(inst.name, names); + var fields = [ + {name: 'nameID_' + n, type: 'USHORT', value: nameID}, + {name: 'flags_' + n, type: 'USHORT', value: 0} + ]; + + for (var i = 0; i < axes.length; ++i) { + var axisTag = axes[i].tag; + fields.push({ + name: 'axis_' + n + ' ' + axisTag, + type: 'FIXED', + value: inst.coordinates[axisTag] << 16 + }); + } + + return fields; +} + +function parseFvarInstance(data, start, axes, names) { + var inst = {}; + var p = new parse.Parser(data, start); + inst.name = names[p.parseUShort()] || {}; + p.skip('uShort', 1); // reserved for flags; no values defined + + inst.coordinates = {}; + for (var i = 0; i < axes.length; ++i) { + inst.coordinates[axes[i].tag] = p.parseFixed(); + } + + return inst; +} + +function makeFvarTable(fvar, names) { + var result = new table.Table('fvar', [ + {name: 'version', type: 'ULONG', value: 0x10000}, + {name: 'offsetToData', type: 'USHORT', value: 0}, + {name: 'countSizePairs', type: 'USHORT', value: 2}, + {name: 'axisCount', type: 'USHORT', value: fvar.axes.length}, + {name: 'axisSize', type: 'USHORT', value: 20}, + {name: 'instanceCount', type: 'USHORT', value: fvar.instances.length}, + {name: 'instanceSize', type: 'USHORT', value: 4 + fvar.axes.length * 4} + ]); + result.offsetToData = result.sizeOf(); + + for (var i = 0; i < fvar.axes.length; i++) { + result.fields = result.fields.concat(makeFvarAxis(i, fvar.axes[i], names)); + } + + for (var j = 0; j < fvar.instances.length; j++) { + result.fields = result.fields.concat(makeFvarInstance(j, fvar.instances[j], fvar.axes, names)); + } + + return result; +} + +function parseFvarTable(data, start, names) { + var p = new parse.Parser(data, start); + var tableVersion = p.parseULong(); + check.argument(tableVersion === 0x00010000, 'Unsupported fvar table version.'); + var offsetToData = p.parseOffset16(); + // Skip countSizePairs. + p.skip('uShort', 1); + var axisCount = p.parseUShort(); + var axisSize = p.parseUShort(); + var instanceCount = p.parseUShort(); + var instanceSize = p.parseUShort(); + + var axes = []; + for (var i = 0; i < axisCount; i++) { + axes.push(parseFvarAxis(data, start + offsetToData + i * axisSize, names)); + } + + var instances = []; + var instanceStart = start + offsetToData + axisCount * axisSize; + for (var j = 0; j < instanceCount; j++) { + instances.push(parseFvarInstance(data, instanceStart + j * instanceSize, axes, names)); + } + + return {axes: axes, instances: instances}; +} + +var fvar = { make: makeFvarTable, parse: parseFvarTable }; + +// The `GDEF` table contains various glyph properties + +var attachList = function() { + return { + coverage: this.parsePointer(Parser.coverage), + attachPoints: this.parseList(Parser.pointer(Parser.uShortList)) + }; +}; + +var caretValue = function() { + var format = this.parseUShort(); + check.argument(format === 1 || format === 2 || format === 3, + 'Unsupported CaretValue table version.'); + if (format === 1) { + return { coordinate: this.parseShort() }; + } else if (format === 2) { + return { pointindex: this.parseShort() }; + } else if (format === 3) { + // Device / Variation Index tables unsupported + return { coordinate: this.parseShort() }; + } +}; + +var ligGlyph = function() { + return this.parseList(Parser.pointer(caretValue)); +}; + +var ligCaretList = function() { + return { + coverage: this.parsePointer(Parser.coverage), + ligGlyphs: this.parseList(Parser.pointer(ligGlyph)) + }; +}; + +var markGlyphSets = function() { + this.parseUShort(); // Version + return this.parseList(Parser.pointer(Parser.coverage)); +}; + +function parseGDEFTable(data, start) { + start = start || 0; + var p = new Parser(data, start); + var tableVersion = p.parseVersion(1); + check.argument(tableVersion === 1 || tableVersion === 1.2 || tableVersion === 1.3, + 'Unsupported GDEF table version.'); + var gdef = { + version: tableVersion, + classDef: p.parsePointer(Parser.classDef), + attachList: p.parsePointer(attachList), + ligCaretList: p.parsePointer(ligCaretList), + markAttachClassDef: p.parsePointer(Parser.classDef) + }; + if (tableVersion >= 1.2) { + gdef.markGlyphSets = p.parsePointer(markGlyphSets); + } + return gdef; +} +var gdef = { parse: parseGDEFTable }; + +// The `GPOS` table contains kerning pairs, among other things. + +var subtableParsers$1 = new Array(10); // subtableParsers[0] is unused + +// https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#lookup-type-1-single-adjustment-positioning-subtable +// this = Parser instance +subtableParsers$1[1] = function parseLookup1() { + var start = this.offset + this.relativeOffset; + var posformat = this.parseUShort(); + if (posformat === 1) { + return { + posFormat: 1, + coverage: this.parsePointer(Parser.coverage), + value: this.parseValueRecord() + }; + } else if (posformat === 2) { + return { + posFormat: 2, + coverage: this.parsePointer(Parser.coverage), + values: this.parseValueRecordList() + }; + } + check.assert(false, '0x' + start.toString(16) + ': GPOS lookup type 1 format must be 1 or 2.'); +}; + +// https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#lookup-type-2-pair-adjustment-positioning-subtable +subtableParsers$1[2] = function parseLookup2() { + var start = this.offset + this.relativeOffset; + var posFormat = this.parseUShort(); + check.assert(posFormat === 1 || posFormat === 2, '0x' + start.toString(16) + ': GPOS lookup type 2 format must be 1 or 2.'); + var coverage = this.parsePointer(Parser.coverage); + var valueFormat1 = this.parseUShort(); + var valueFormat2 = this.parseUShort(); + if (posFormat === 1) { + // Adjustments for Glyph Pairs + return { + posFormat: posFormat, + coverage: coverage, + valueFormat1: valueFormat1, + valueFormat2: valueFormat2, + pairSets: this.parseList(Parser.pointer(Parser.list(function() { + return { // pairValueRecord + secondGlyph: this.parseUShort(), + value1: this.parseValueRecord(valueFormat1), + value2: this.parseValueRecord(valueFormat2) + }; + }))) + }; + } else if (posFormat === 2) { + var classDef1 = this.parsePointer(Parser.classDef); + var classDef2 = this.parsePointer(Parser.classDef); + var class1Count = this.parseUShort(); + var class2Count = this.parseUShort(); + return { + // Class Pair Adjustment + posFormat: posFormat, + coverage: coverage, + valueFormat1: valueFormat1, + valueFormat2: valueFormat2, + classDef1: classDef1, + classDef2: classDef2, + class1Count: class1Count, + class2Count: class2Count, + classRecords: this.parseList(class1Count, Parser.list(class2Count, function() { + return { + value1: this.parseValueRecord(valueFormat1), + value2: this.parseValueRecord(valueFormat2) + }; + })) + }; + } +}; + +subtableParsers$1[3] = function parseLookup3() { return { error: 'GPOS Lookup 3 not supported' }; }; +subtableParsers$1[4] = function parseLookup4() { return { error: 'GPOS Lookup 4 not supported' }; }; +subtableParsers$1[5] = function parseLookup5() { return { error: 'GPOS Lookup 5 not supported' }; }; +subtableParsers$1[6] = function parseLookup6() { return { error: 'GPOS Lookup 6 not supported' }; }; +subtableParsers$1[7] = function parseLookup7() { return { error: 'GPOS Lookup 7 not supported' }; }; +subtableParsers$1[8] = function parseLookup8() { return { error: 'GPOS Lookup 8 not supported' }; }; +subtableParsers$1[9] = function parseLookup9() { return { error: 'GPOS Lookup 9 not supported' }; }; + +// https://docs.microsoft.com/en-us/typography/opentype/spec/gpos +function parseGposTable(data, start) { + start = start || 0; + var p = new Parser(data, start); + var tableVersion = p.parseVersion(1); + check.argument(tableVersion === 1 || tableVersion === 1.1, 'Unsupported GPOS table version ' + tableVersion); + + if (tableVersion === 1) { + return { + version: tableVersion, + scripts: p.parseScriptList(), + features: p.parseFeatureList(), + lookups: p.parseLookupList(subtableParsers$1) + }; + } else { + return { + version: tableVersion, + scripts: p.parseScriptList(), + features: p.parseFeatureList(), + lookups: p.parseLookupList(subtableParsers$1), + variations: p.parseFeatureVariationsList() + }; + } + +} + +// GPOS Writing ////////////////////////////////////////////// +// NOT SUPPORTED +var subtableMakers$1 = new Array(10); + +function makeGposTable(gpos) { + return new table.Table('GPOS', [ + {name: 'version', type: 'ULONG', value: 0x10000}, + {name: 'scripts', type: 'TABLE', value: new table.ScriptList(gpos.scripts)}, + {name: 'features', type: 'TABLE', value: new table.FeatureList(gpos.features)}, + {name: 'lookups', type: 'TABLE', value: new table.LookupList(gpos.lookups, subtableMakers$1)} + ]); +} + +var gpos = { parse: parseGposTable, make: makeGposTable }; + +// The `kern` table contains kerning pairs. + +function parseWindowsKernTable(p) { + var pairs = {}; + // Skip nTables. + p.skip('uShort'); + var subtableVersion = p.parseUShort(); + check.argument(subtableVersion === 0, 'Unsupported kern sub-table version.'); + // Skip subtableLength, subtableCoverage + p.skip('uShort', 2); + var nPairs = p.parseUShort(); + // Skip searchRange, entrySelector, rangeShift. + p.skip('uShort', 3); + for (var i = 0; i < nPairs; i += 1) { + var leftIndex = p.parseUShort(); + var rightIndex = p.parseUShort(); + var value = p.parseShort(); + pairs[leftIndex + ',' + rightIndex] = value; + } + return pairs; +} + +function parseMacKernTable(p) { + var pairs = {}; + // The Mac kern table stores the version as a fixed (32 bits) but we only loaded the first 16 bits. + // Skip the rest. + p.skip('uShort'); + var nTables = p.parseULong(); + //check.argument(nTables === 1, 'Only 1 subtable is supported (got ' + nTables + ').'); + if (nTables > 1) { + console.warn('Only the first kern subtable is supported.'); + } + p.skip('uLong'); + var coverage = p.parseUShort(); + var subtableVersion = coverage & 0xFF; + p.skip('uShort'); + if (subtableVersion === 0) { + var nPairs = p.parseUShort(); + // Skip searchRange, entrySelector, rangeShift. + p.skip('uShort', 3); + for (var i = 0; i < nPairs; i += 1) { + var leftIndex = p.parseUShort(); + var rightIndex = p.parseUShort(); + var value = p.parseShort(); + pairs[leftIndex + ',' + rightIndex] = value; + } + } + return pairs; +} + +// Parse the `kern` table which contains kerning pairs. +function parseKernTable(data, start) { + var p = new parse.Parser(data, start); + var tableVersion = p.parseUShort(); + if (tableVersion === 0) { + return parseWindowsKernTable(p); + } else if (tableVersion === 1) { + return parseMacKernTable(p); + } else { + throw new Error('Unsupported kern table version (' + tableVersion + ').'); + } +} + +var kern = { parse: parseKernTable }; + +// The `loca` table stores the offsets to the locations of the glyphs in the font. + +// Parse the `loca` table. This table stores the offsets to the locations of the glyphs in the font, +// relative to the beginning of the glyphData table. +// The number of glyphs stored in the `loca` table is specified in the `maxp` table (under numGlyphs) +// The loca table has two versions: a short version where offsets are stored as uShorts, and a long +// version where offsets are stored as uLongs. The `head` table specifies which version to use +// (under indexToLocFormat). +function parseLocaTable(data, start, numGlyphs, shortVersion) { + var p = new parse.Parser(data, start); + var parseFn = shortVersion ? p.parseUShort : p.parseULong; + // There is an extra entry after the last index element to compute the length of the last glyph. + // That's why we use numGlyphs + 1. + var glyphOffsets = []; + for (var i = 0; i < numGlyphs + 1; i += 1) { + var glyphOffset = parseFn.call(p); + if (shortVersion) { + // The short table version stores the actual offset divided by 2. + glyphOffset *= 2; + } + + glyphOffsets.push(glyphOffset); + } + + return glyphOffsets; +} + +var loca = { parse: parseLocaTable }; + +// opentype.js + +/** + * The opentype library. + * @namespace opentype + */ + +// File loaders ///////////////////////////////////////////////////////// + +/** + * Loads a font from a URL. The callback throws an error message as the first parameter if it fails + * and the font as an ArrayBuffer in the second parameter if it succeeds. + * @param {string} url - The URL of the font file. + * @param {Function} callback - The function to call when the font load completes + */ +function loadFromUrl(url, callback) { + var request = new XMLHttpRequest(); + request.open('get', url, true); + request.responseType = 'arraybuffer'; + request.onload = function() { + if (request.response) { + return callback(null, request.response); + } else { + return callback('Font could not be loaded: ' + request.statusText); + } + }; + + request.onerror = function () { + callback('Font could not be loaded'); + }; + + request.send(); +} + +// Table Directory Entries ////////////////////////////////////////////// +/** + * Parses OpenType table entries. + * @param {DataView} + * @param {Number} + * @return {Object[]} + */ +function parseOpenTypeTableEntries(data, numTables) { + var tableEntries = []; + var p = 12; + for (var i = 0; i < numTables; i += 1) { + var tag = parse.getTag(data, p); + var checksum = parse.getULong(data, p + 4); + var offset = parse.getULong(data, p + 8); + var length = parse.getULong(data, p + 12); + tableEntries.push({tag: tag, checksum: checksum, offset: offset, length: length, compression: false}); + p += 16; + } + + return tableEntries; +} + +/** + * Parses WOFF table entries. + * @param {DataView} + * @param {Number} + * @return {Object[]} + */ +function parseWOFFTableEntries(data, numTables) { + var tableEntries = []; + var p = 44; // offset to the first table directory entry. + for (var i = 0; i < numTables; i += 1) { + var tag = parse.getTag(data, p); + var offset = parse.getULong(data, p + 4); + var compLength = parse.getULong(data, p + 8); + var origLength = parse.getULong(data, p + 12); + var compression = (void 0); + if (compLength < origLength) { + compression = 'WOFF'; + } else { + compression = false; + } + + tableEntries.push({tag: tag, offset: offset, compression: compression, + compressedLength: compLength, length: origLength}); + p += 20; + } + + return tableEntries; +} + +/** + * @typedef TableData + * @type Object + * @property {DataView} data - The DataView + * @property {number} offset - The data offset. + */ + +/** + * @param {DataView} + * @param {Object} + * @return {TableData} + */ +function uncompressTable(data, tableEntry) { + if (tableEntry.compression === 'WOFF') { + var inBuffer = new Uint8Array(data.buffer, tableEntry.offset + 2, tableEntry.compressedLength - 2); + var outBuffer = new Uint8Array(tableEntry.length); + tinyInflate(inBuffer, outBuffer); + if (outBuffer.byteLength !== tableEntry.length) { + throw new Error('Decompression error: ' + tableEntry.tag + ' decompressed length doesn\'t match recorded length'); + } + + var view = new DataView(outBuffer.buffer, 0); + return {data: view, offset: 0}; + } else { + return {data: data, offset: tableEntry.offset}; + } +} + +// Public API /////////////////////////////////////////////////////////// + +/** + * Parse the OpenType file data (as an ArrayBuffer) and return a Font object. + * Throws an error if the font could not be parsed. + * @param {ArrayBuffer} + * @param {Object} opt - options for parsing + * @return {opentype.Font} + */ +function parseBuffer(buffer, opt) { + opt = (opt === undefined || opt === null) ? {} : opt; + + var indexToLocFormat; + var ltagTable; + + // Since the constructor can also be called to create new fonts from scratch, we indicate this + // should be an empty font that we'll fill with our own data. + var font = new Font({empty: true}); + + // OpenType fonts use big endian byte ordering. + // We can't rely on typed array view types, because they operate with the endianness of the host computer. + // Instead we use DataViews where we can specify endianness. + var data = new DataView(buffer, 0); + var numTables; + var tableEntries = []; + var signature = parse.getTag(data, 0); + if (signature === String.fromCharCode(0, 1, 0, 0) || signature === 'true' || signature === 'typ1') { + font.outlinesFormat = 'truetype'; + numTables = parse.getUShort(data, 4); + tableEntries = parseOpenTypeTableEntries(data, numTables); + } else if (signature === 'OTTO') { + font.outlinesFormat = 'cff'; + numTables = parse.getUShort(data, 4); + tableEntries = parseOpenTypeTableEntries(data, numTables); + } else if (signature === 'wOFF') { + var flavor = parse.getTag(data, 4); + if (flavor === String.fromCharCode(0, 1, 0, 0)) { + font.outlinesFormat = 'truetype'; + } else if (flavor === 'OTTO') { + font.outlinesFormat = 'cff'; + } else { + throw new Error('Unsupported OpenType flavor ' + signature); + } + + numTables = parse.getUShort(data, 12); + tableEntries = parseWOFFTableEntries(data, numTables); + } else { + throw new Error('Unsupported OpenType signature ' + signature); + } + + var cffTableEntry; + var fvarTableEntry; + var glyfTableEntry; + var gdefTableEntry; + var gposTableEntry; + var gsubTableEntry; + var hmtxTableEntry; + var kernTableEntry; + var locaTableEntry; + var nameTableEntry; + var metaTableEntry; + var p; + + for (var i = 0; i < numTables; i += 1) { + var tableEntry = tableEntries[i]; + var table = (void 0); + switch (tableEntry.tag) { + case 'cmap': + table = uncompressTable(data, tableEntry); + font.tables.cmap = cmap.parse(table.data, table.offset); + font.encoding = new CmapEncoding(font.tables.cmap); + break; + case 'cvt ' : + table = uncompressTable(data, tableEntry); + p = new parse.Parser(table.data, table.offset); + font.tables.cvt = p.parseShortList(tableEntry.length / 2); + break; + case 'fvar': + fvarTableEntry = tableEntry; + break; + case 'fpgm' : + table = uncompressTable(data, tableEntry); + p = new parse.Parser(table.data, table.offset); + font.tables.fpgm = p.parseByteList(tableEntry.length); + break; + case 'head': + table = uncompressTable(data, tableEntry); + font.tables.head = head.parse(table.data, table.offset); + font.unitsPerEm = font.tables.head.unitsPerEm; + indexToLocFormat = font.tables.head.indexToLocFormat; + break; + case 'hhea': + table = uncompressTable(data, tableEntry); + font.tables.hhea = hhea.parse(table.data, table.offset); + font.ascender = font.tables.hhea.ascender; + font.descender = font.tables.hhea.descender; + font.numberOfHMetrics = font.tables.hhea.numberOfHMetrics; + break; + case 'hmtx': + hmtxTableEntry = tableEntry; + break; + case 'ltag': + table = uncompressTable(data, tableEntry); + ltagTable = ltag.parse(table.data, table.offset); + break; + case 'COLR': + table = uncompressTable(data, tableEntry); + font.tables.colr = colr.parse(table.data, table.offset); + break; + case 'CPAL': + table = uncompressTable(data, tableEntry); + font.tables.cpal = cpal.parse(table.data, table.offset); + break; + case 'maxp': + table = uncompressTable(data, tableEntry); + font.tables.maxp = maxp.parse(table.data, table.offset); + font.numGlyphs = font.tables.maxp.numGlyphs; + break; + case 'name': + nameTableEntry = tableEntry; + break; + case 'OS/2': + table = uncompressTable(data, tableEntry); + font.tables.os2 = os2.parse(table.data, table.offset); + break; + case 'post': + table = uncompressTable(data, tableEntry); + font.tables.post = post.parse(table.data, table.offset); + font.glyphNames = new GlyphNames(font.tables.post); + break; + case 'prep' : + table = uncompressTable(data, tableEntry); + p = new parse.Parser(table.data, table.offset); + font.tables.prep = p.parseByteList(tableEntry.length); + break; + case 'glyf': + glyfTableEntry = tableEntry; + break; + case 'loca': + locaTableEntry = tableEntry; + break; + case 'CFF ': + cffTableEntry = tableEntry; + break; + case 'kern': + kernTableEntry = tableEntry; + break; + case 'GDEF': + gdefTableEntry = tableEntry; + break; + case 'GPOS': + gposTableEntry = tableEntry; + break; + case 'GSUB': + gsubTableEntry = tableEntry; + break; + case 'meta': + metaTableEntry = tableEntry; + break; + } + } + + var nameTable = uncompressTable(data, nameTableEntry); + font.tables.name = _name.parse(nameTable.data, nameTable.offset, ltagTable); + font.names = font.tables.name; + + if (glyfTableEntry && locaTableEntry) { + var shortVersion = indexToLocFormat === 0; + var locaTable = uncompressTable(data, locaTableEntry); + var locaOffsets = loca.parse(locaTable.data, locaTable.offset, font.numGlyphs, shortVersion); + var glyfTable = uncompressTable(data, glyfTableEntry); + font.glyphs = glyf.parse(glyfTable.data, glyfTable.offset, locaOffsets, font, opt); + } else if (cffTableEntry) { + var cffTable = uncompressTable(data, cffTableEntry); + cff.parse(cffTable.data, cffTable.offset, font, opt); + } else { + throw new Error('Font doesn\'t contain TrueType or CFF outlines.'); + } + + var hmtxTable = uncompressTable(data, hmtxTableEntry); + hmtx.parse(font, hmtxTable.data, hmtxTable.offset, font.numberOfHMetrics, font.numGlyphs, font.glyphs, opt); + addGlyphNames(font, opt); + + if (kernTableEntry) { + var kernTable = uncompressTable(data, kernTableEntry); + font.kerningPairs = kern.parse(kernTable.data, kernTable.offset); + } else { + font.kerningPairs = {}; + } + + if (gdefTableEntry) { + var gdefTable = uncompressTable(data, gdefTableEntry); + font.tables.gdef = gdef.parse(gdefTable.data, gdefTable.offset); + } + + if (gposTableEntry) { + var gposTable = uncompressTable(data, gposTableEntry); + font.tables.gpos = gpos.parse(gposTable.data, gposTable.offset); + font.position.init(); + } + + if (gsubTableEntry) { + var gsubTable = uncompressTable(data, gsubTableEntry); + font.tables.gsub = gsub.parse(gsubTable.data, gsubTable.offset); + } + + if (fvarTableEntry) { + var fvarTable = uncompressTable(data, fvarTableEntry); + font.tables.fvar = fvar.parse(fvarTable.data, fvarTable.offset, font.names); + } + + if (metaTableEntry) { + var metaTable = uncompressTable(data, metaTableEntry); + font.tables.meta = meta.parse(metaTable.data, metaTable.offset); + font.metas = font.tables.meta; + } + + return font; +} + +/** + * Asynchronously load the font from a URL or a filesystem. When done, call the callback + * with two arguments `(err, font)`. The `err` will be null on success, + * the `font` is a Font object. + * We use the node.js callback convention so that + * opentype.js can integrate with frameworks like async.js. + * @alias opentype.load + * @param {string} url - The URL of the font to load. + * @param {Function} callback - The callback. + */ +function load(url, callback, opt) { + opt = (opt === undefined || opt === null) ? {} : opt; + + return new Promise(function (resolve, reject) { + loadFromUrl(url, function(err, arrayBuffer) { + if (err) { + if (callback) { + return callback(err); + } else { + reject(err); + } + } + var font; + try { + font = parseBuffer(arrayBuffer, opt); + } catch (e) { + if (callback) { + return callback(e, null); + } else { + reject(e); + } + } + if (callback) { + return callback(null, font); + } else { + resolve(font); + } + }); + }); +} + +var opentype = /*#__PURE__*/Object.freeze({ + __proto__: null, + Font: Font, + Glyph: Glyph, + Path: Path, + BoundingBox: BoundingBox, + _parse: parse, + parse: parseBuffer, + load: load, +}); + +export default opentype; +export { BoundingBox, Font, Glyph, Path, parse as _parse, load, parseBuffer as parse }; diff --git a/node_modules/three/examples/jsm/libs/potpack.module.js b/node_modules/three/examples/jsm/libs/potpack.module.js new file mode 100644 index 0000000..efba9a4 --- /dev/null +++ b/node_modules/three/examples/jsm/libs/potpack.module.js @@ -0,0 +1,125 @@ +/** + * potpack - by [@mourner](https://github.com/mourner) + * + * A tiny JavaScript function for packing 2D rectangles into a near-square container, + * which is useful for generating CSS sprites and WebGL textures. Similar to + * [shelf-pack](https://github.com/mapbox/shelf-pack), but static (you can't add items + * once a layout is generated), and aims for maximal space utilization. + * + * A variation of algorithms used in [rectpack2D](https://github.com/TeamHypersomnia/rectpack2D) + * and [bin-pack](https://github.com/bryanburgers/bin-pack), which are in turn based + * on [this article by Blackpawn](http://blackpawn.com/texts/lightmaps/default.html). + * + * @license + * ISC License + * + * Copyright (c) 2018, Mapbox + * + * Permission to use, copy, modify, and/or distribute this software for any purpose + * with or without fee is hereby granted, provided that the above copyright notice + * and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF + * THIS SOFTWARE. + */ + +function potpack(boxes) { + + // calculate total box area and maximum box width + let area = 0; + let maxWidth = 0; + + for (const box of boxes) { + area += box.w * box.h; + maxWidth = Math.max(maxWidth, box.w); + } + + // sort the boxes for insertion by height, descending + boxes.sort((a, b) => b.h - a.h); + + // aim for a squarish resulting container, + // slightly adjusted for sub-100% space utilization + const startWidth = Math.max(Math.ceil(Math.sqrt(area / 0.95)), maxWidth); + + // start with a single empty space, unbounded at the bottom + const spaces = [{x: 0, y: 0, w: startWidth, h: Infinity}]; + + let width = 0; + let height = 0; + + for (const box of boxes) { + // look through spaces backwards so that we check smaller spaces first + for (let i = spaces.length - 1; i >= 0; i--) { + const space = spaces[i]; + + // look for empty spaces that can accommodate the current box + if (box.w > space.w || box.h > space.h) continue; + + // found the space; add the box to its top-left corner + // |-------|-------| + // | box | | + // |_______| | + // | space | + // |_______________| + box.x = space.x; + box.y = space.y; + + height = Math.max(height, box.y + box.h); + width = Math.max(width, box.x + box.w); + + if (box.w === space.w && box.h === space.h) { + // space matches the box exactly; remove it + const last = spaces.pop(); + if (i < spaces.length) spaces[i] = last; + + } else if (box.h === space.h) { + // space matches the box height; update it accordingly + // |-------|---------------| + // | box | updated space | + // |_______|_______________| + space.x += box.w; + space.w -= box.w; + + } else if (box.w === space.w) { + // space matches the box width; update it accordingly + // |---------------| + // | box | + // |_______________| + // | updated space | + // |_______________| + space.y += box.h; + space.h -= box.h; + + } else { + // otherwise the box splits the space into two spaces + // |-------|-----------| + // | box | new space | + // |_______|___________| + // | updated space | + // |___________________| + spaces.push({ + x: space.x + box.w, + y: space.y, + w: space.w - box.w, + h: box.h + }); + space.y += box.h; + space.h -= box.h; + } + break; + } + } + + return { + w: width, // container width + h: height, // container height + fill: (area / (width * height)) || 0 // space utilization + }; +} + +export { potpack }; \ No newline at end of file diff --git a/node_modules/three/examples/jsm/libs/rhino3dm/rhino3dm.js b/node_modules/three/examples/jsm/libs/rhino3dm/rhino3dm.js new file mode 100644 index 0000000..8b41705 --- /dev/null +++ b/node_modules/three/examples/jsm/libs/rhino3dm/rhino3dm.js @@ -0,0 +1,21 @@ + +var rhino3dm = (() => { + var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; + if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; + return ( +function(config) { + var rhino3dm = config || {}; + +var Module=typeof rhino3dm!="undefined"?rhino3dm:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;function logExceptionOnExit(e){if(e instanceof ExitStatus)return;let toLog=e;err("exiting due to exception: "+toLog)}if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=__dirname+"/"}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",function(reason){throw reason});quit_=(status,toThrow)=>{if(keepRuntimeAlive()){process["exitCode"]=status;throw toThrow}logExceptionOnExit(toThrow);process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var POINTER_SIZE=4;var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||16777216;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function keepRuntimeAlive(){return noExitRuntime}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;SOCKFS.root=FS.mount(SOCKFS,{},null);if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;wasmBinaryFile="rhino3dm.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(wasmBinaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["oa"];updateMemoryViews();wasmTable=Module["asm"]["qa"];addOnInit(Module["asm"]["pa"]);removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e)}}instantiateAsync().catch(readyPromiseReject);return{}}var tempDouble;var tempI64;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module)}}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;return prev===1};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw ptr}function getRandomDevice(){if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){var randomBuffer=new Uint8Array(1);return()=>{crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");return()=>crypto_module["randomBytes"](1)[0]}catch(e){}}return()=>abort("randomDevice")}var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"))},join2:(l,r)=>{return PATH.normalize(l+"/"+r)}};var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function(stream){stream.tty.ops.fsync(stream.tty)},fsync:function(stream){stream.tty.ops.fsync(stream.tty)},read:function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function mmapAlloc(size){abort()}var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray:function(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage:function(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr:function(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length{assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},event=>{if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)}var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(path,opts={})=>{path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:node=>{var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:(parentid,name)=>{var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:node=>{var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:node=>{var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:(parent,name)=>{var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:(parent,name,mode,rdev)=>{var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:node=>{FS.hashRemoveNode(node)},isRoot:node=>{return node===node.parent},isMountpoint:node=>{return!!node.mounted},isFile:mode=>{return(mode&61440)===32768},isDir:mode=>{return(mode&61440)===16384},isLink:mode=>{return(mode&61440)===40960},isChrdev:mode=>{return(mode&61440)===8192},isBlkdev:mode=>{return(mode&61440)===24576},isFIFO:mode=>{return(mode&61440)===4096},isSocket:mode=>{return(mode&49152)===49152},flagModes:{"r":0,"r+":2,"w":577,"w+":578,"a":1089,"a+":1090},modeStringToFlags:str=>{var flags=FS.flagModes[str];if(typeof flags=="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:flag=>{var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:(node,perms)=>{if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup:dir=>{var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:(dir,name)=>{try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:(dir,name,isdir)=>{var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen:(node,flags)=>{if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:(fd_start=0,fd_end=FS.MAX_OPEN_FDS)=>{for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:fd=>FS.streams[fd],createStream:(stream,fd_start,fd_end)=>{if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(val){this.shared.flags=val}},position:{get:function(){return this.shared.position},set:function(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:fd=>{FS.streams[fd]=null},chrdev_stream_ops:{open:stream=>{var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:()=>{throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice:(dev,ops)=>{FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts:mount=>{var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:(populate,callback)=>{if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:(type,opts,mountpoint)=>{var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:mountpoint=>{var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:(parent,name)=>{return parent.node_ops.lookup(parent,name)},mknod:(path,mode,dev)=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create:(path,mode)=>{mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:(path,mode)=>{mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:(path,mode)=>{var dirs=path.split("/");var d="";for(var i=0;i{if(typeof dev=="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:(oldpath,newpath)=>{if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:(old_path,new_path)=>{var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,"w");if(errCode){throw new FS.ErrnoError(errCode)}}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}},rmdir:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node)},readdir:path=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.unlink(parent,name);FS.destroyNode(node)},readlink:path=>{var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:(path,dontFollow)=>{var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:path=>{return FS.stat(path,true)},chmod:(path,mode,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:(path,mode)=>{FS.chmod(path,mode,true)},fchmod:(fd,mode)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chmod(stream.node,mode)},chown:(path,uid,gid,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:(path,uid,gid)=>{FS.chown(path,uid,gid,true)},fchown:(fd,uid,gid)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chown(stream.node,uid,gid)},truncate:(path,len)=>{if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,"w");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:(fd,len)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:(path,atime,mtime)=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:(path,flags,mode)=>{if(path===""){throw new FS.ErrnoError(44)}flags=typeof flags=="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode=="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path=="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512&&!created){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false});if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1}}return stream},close:stream=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:stream=>{return stream.fd===null},llseek:(stream,offset,whence)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:(stream,buffer,offset,length,position)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:(stream,buffer,offset,length,position,canOwn)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten},allocate:(stream,offset,length)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:(stream,length,position,prot,flags)=>{if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,length,position,prot,flags)},msync:(stream,buffer,offset,length,mmapFlags)=>{if(!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:stream=>0,ioctl:(stream,cmd,arg)=>{if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:(path,opts={})=>{opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile:(path,data,opts={})=>{opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.currentPath,chdir:path=>{var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories:()=>{FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices:()=>{FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var random_device=getRandomDevice();FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:()=>{var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup:(parent,name)=>{var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams:()=>{if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},ensureErrnoError:()=>{if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=function(errno){this.errno=errno};this.setErrno(errno);this.message="FS error"};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit:()=>{FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS}},init:(input,output,error)=>{FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit:()=>{FS.init.initialized=false;for(var i=0;i{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode},findObject:(path,dontResolveLastLink)=>{var ret=FS.analyzePath(path,dontResolveLastLink);if(!ret.exists){return null}return ret.object},analyzePath:(path,dontResolveLastLink)=>{try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path==="/"}catch(e){ret.error=e.errno}return ret},createPath:(parent,path,canRead,canWrite)=>{parent=typeof parent=="string"?parent:FS.getPath(parent);var parts=path.split("/").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:(parent,name,properties,canRead,canWrite)=>{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:(parent,name,data,canRead,canWrite,canOwn)=>{var path=name;if(parent){parent=typeof parent=="string"?parent:FS.getPath(parent);path=name?PATH.join2(parent,name):parent}var mode=FS.getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data=="string"){var arr=new Array(data.length);for(var i=0,len=data.length;i{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:stream=>{stream.seekable=false},close:stream=>{if(output&&output.buffer&&output.buffer.length){output(10)}},read:(stream,buffer,offset,length,pos)=>{var bytesRead=0;for(var i=0;i{for(var i=0;i{if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!="undefined"){throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}},createLazyFile:(parent,name,url,canRead,canWrite)=>{function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}};node.stream_ops=stream_ops;return node},createPreloadedFile:(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency("cp "+fullname);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(Browser.handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}},indexedDB:()=>{return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:()=>{return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(paths,onload,onerror)=>{onload=onload||(()=>{});onerror=onerror||(()=>{});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=()=>{out("creating db");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=()=>{var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],"readwrite");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=()=>{ok++;if(ok+fail==total)finish()};putRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},loadFilesFromDB:(paths,onload,onerror)=>{onload=onload||(()=>{});onerror=onerror||(()=>{});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=()=>{var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],"readonly")}catch(e){onerror(e);return}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var getRequest=files.get(path);getRequest.onsuccess=()=>{if(FS.analyzePath(path).exists){FS.unlink(path)}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish()};getRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror}};var SOCKFS={mount:function(mount){Module["websocket"]=Module["websocket"]&&"object"===typeof Module["websocket"]?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this};Module["websocket"].emit=function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}};return FS.createNode(null,"/",16384|511,0)},createSocket:function(family,type,protocol){type&=~526336;var streaming=type==1;if(streaming&&protocol&&protocol!=6){throw new FS.ErrnoError(66)}var sock={family:family,type:type,protocol:protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node:node,flags:2,seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock},getSocket:function(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock},stream_ops:{poll:function(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)},ioctl:function(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)},read:function(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length},write:function(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)},close:function(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)}},nextname:function(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(sock,addr,port){var ws;if(typeof addr=="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===typeof Module["websocket"];var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}var opts=undefined;if(subProtocols!=="null"){subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);opts=subProtocols}if(runtimeConfig&&null===Module["websocket"]["subprotocol"]){subProtocols="null";opts=undefined}var WebSocketConstructor;if(ENVIRONMENT_IS_NODE){WebSocketConstructor=require("ws")}else{WebSocketConstructor=WebSocket}ws=new WebSocketConstructor(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(23)}}var peer={addr:addr,port:port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer},getPeer:function(sock,addr,port){return sock.peers[addr+":"+port]},addPeer:function(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer},removePeer:function(sock,peer){delete sock.peers[peer.addr+":"+peer.port]},handlePeerEvents:function(sock,peer){var first=true;var handleOpen=function(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}};function handleMessage(data){if(typeof data=="string"){var encoder=new TextEncoder;data=encoder.encode(data)}else{assert(data.byteLength!==undefined);if(data.byteLength==0){return}data=new Uint8Array(data)}var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",function(data,isBinary){if(!isBinary){return}handleMessage(new Uint8Array(data).buffer)});peer.socket.on("close",function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.on("error",function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}else{peer.socket.onopen=handleOpen;peer.socket.onclose=function(){Module["websocket"].emit("close",sock.stream.fd)};peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}}},poll:function(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask},ioctl:function(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>2]=bytes;return 0;default:return 28}},close:function(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i>2]=value;return value}function inetNtop4(addr){return(addr&255)+"."+(addr>>8&255)+"."+(addr>>16&255)+"."+(addr>>24&255)}function inetNtop6(ints){var str="";var word=0;var longest=0;var lastzero=0;var zstart=0;var len=0;var i=0;var parts=[ints[0]&65535,ints[0]>>16,ints[1]&65535,ints[1]>>16,ints[2]&65535,ints[2]>>16,ints[3]&65535,ints[3]>>16];var hasipv4=true;var v4part="";for(i=0;i<5;i++){if(parts[i]!==0){hasipv4=false;break}}if(hasipv4){v4part=inetNtop4(parts[6]|parts[7]<<16);if(parts[5]===-1){str="::ffff:";str+=v4part;return str}if(parts[5]===0){str="::";if(v4part==="0.0.0.0")v4part="";if(v4part==="0.0.0.1")v4part="1";str+=v4part;return str}}for(word=0;word<8;word++){if(parts[word]===0){if(word-lastzero>1){len=0}lastzero=word;len++}if(len>longest){longest=len;zstart=word-longest+1}}for(word=0;word<8;word++){if(longest>1){if(parts[word]===0&&word>=zstart&&word>1];var port=_ntohs(HEAPU16[sa+2>>1]);var addr;switch(family){case 2:if(salen!==16){return{errno:28}}addr=HEAP32[sa+4>>2];addr=inetNtop4(addr);break;case 10:if(salen!==28){return{errno:28}}addr=[HEAP32[sa+8>>2],HEAP32[sa+12>>2],HEAP32[sa+16>>2],HEAP32[sa+20>>2]];addr=inetNtop6(addr);break;default:return{errno:5}}return{family:family,addr:addr,port:port}}function inetPton4(str){var b=str.split(".");for(var i=0;i<4;i++){var tmp=Number(b[i]);if(isNaN(tmp))return null;b[i]=tmp}return(b[0]|b[1]<<8|b[2]<<16|b[3]<<24)>>>0}function jstoi_q(str){return parseInt(str)}function inetPton6(str){var words;var w,offset,z;var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i;var parts=[];if(!valid6regx.test(str)){return null}if(str==="::"){return[0,0,0,0,0,0,0,0]}if(str.startsWith("::")){str=str.replace("::","Z:")}else{str=str.replace("::",":Z:")}if(str.indexOf(".")>0){str=str.replace(new RegExp("[.]","g"),":");words=str.split(":");words[words.length-4]=jstoi_q(words[words.length-4])+jstoi_q(words[words.length-3])*256;words[words.length-3]=jstoi_q(words[words.length-2])+jstoi_q(words[words.length-1])*256;words=words.slice(0,words.length-2)}else{words=str.split(":")}offset=0;z=0;for(w=0;w>2]=stat.dev;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAPU32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>2]=tempI64[0],HEAP32[buf+60>>2]=tempI64[1];HEAPU32[buf+64>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>2]=tempI64[0],HEAP32[buf+76>>2]=tempI64[1];HEAPU32[buf+80>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>2]=tempI64[0],HEAP32[buf+92>>2]=tempI64[1];HEAPU32[buf+96>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+104>>2]=tempI64[0],HEAP32[buf+108>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream}};function ___syscall_connect(fd,addr,addrlen){try{var sock=getSocketFromFD(fd);var info=getSocketAddress(addr,addrlen);sock.sock_ops.connect(sock,info.addr,info.port);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_faccessat(dirfd,path,amode,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(amode&~7){return-28}var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node){return-44}var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-2}return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.createStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 5:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_fstat64(fd,buf){try{var stream=SYSCALLS.getStreamFromFD(fd);return SYSCALLS.doStat(FS.stat,stream.path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function convertI32PairToI53Checked(lo,hi){return hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN}function ___syscall_ftruncate64(fd,length_low,length_high){try{var length=convertI32PairToI53Checked(length_low,length_high);if(isNaN(length))return-61;FS.ftruncate(fd,length);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:return-28}}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_lstat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.lstat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_newfstatat(dirfd,path,buf,flags){try{path=SYSCALLS.getStr(path);var nofollow=flags&256;var allowEmpty=flags&4096;flags=flags&~6400;path=SYSCALLS.calculateAt(dirfd,path,allowEmpty);return SYSCALLS.doStat(nofollow?FS.lstat:FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?SYSCALLS.get():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_socket(domain,type,protocol){try{var sock=SOCKFS.createSocket(domain,type,protocol);return sock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}var tupleRegistrations={};function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}}function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAP32[pointer>>2])}var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(undefined===name){return"_unknown"}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return"_"+name}return name}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function("body","return function "+name+"() {\n"+' "use strict";'+" return body.apply(this, arguments);\n"+"};\n")(body)}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return this.name+": "+this.message}};return errorClass}var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i{if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(()=>{typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}}function __embind_finalize_value_array(rawTupleType){var reg=tupleRegistrations[rawTupleType];delete tupleRegistrations[rawTupleType];var elements=reg.elements;var elementsLength=elements.length;var elementTypes=elements.map(function(elt){return elt.getterReturnType}).concat(elements.map(function(elt){return elt.setterArgumentType}));var rawConstructor=reg.rawConstructor;var rawDestructor=reg.rawDestructor;whenDependentTypesAreResolved([rawTupleType],elementTypes,function(elementTypes){elements.forEach((elt,i)=>{var getterReturnType=elementTypes[i];var getter=elt.getter;var getterContext=elt.getterContext;var setterArgumentType=elementTypes[i+elementsLength];var setter=elt.setter;var setterContext=elt.setterContext;elt.read=ptr=>{return getterReturnType["fromWireType"](getter(getterContext,ptr))};elt.write=(ptr,o)=>{var destructors=[];setter(setterContext,ptr,setterArgumentType["toWireType"](destructors,o));runDestructors(destructors)}});return[{name:reg.name,"fromWireType":function(ptr){var rv=new Array(elementsLength);for(var i=0;ifield.getterReturnType).concat(fieldRecords.map(field=>field.setterArgumentType));whenDependentTypesAreResolved([structType],fieldTypes,fieldTypes=>{var fields={};fieldRecords.forEach((field,i)=>{var fieldName=field.fieldName;var getterReturnType=fieldTypes[i];var getter=field.getter;var getterContext=field.getterContext;var setterArgumentType=fieldTypes[i+fieldRecords.length];var setter=field.setter;var setterContext=field.setterContext;fields[fieldName]={read:ptr=>{return getterReturnType["fromWireType"](getter(getterContext,ptr))},write:(ptr,o)=>{var destructors=[];setter(setterContext,ptr,setterArgumentType["toWireType"](destructors,o));runDestructors(destructors)}}});return[{name:reg.name,"fromWireType":function(ptr){var rv={};for(var i in fields){rv[i]=fields[i].read(ptr)}rawDestructor(ptr);return rv},"toWireType":function(destructors,o){for(var fieldName in fields){if(!(fieldName in o)){throw new TypeError('Missing field: "'+fieldName+'"')}}var ptr=rawConstructor();for(fieldName in fields){fields[fieldName].write(ptr,o[fieldName])}if(destructors!==null){destructors.push(rawDestructor,ptr)}return ptr},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:rawDestructor}]})}function __embind_register_bigint(primitiveType,name,size,minRange,maxRange){}function getShiftFromSize(size){switch(size){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+size)}}function embind_init_charCodes(){var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes}var embind_charCodes=undefined;function readLatin1String(ptr){var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret}var BindingError=undefined;function throwBindingError(message){throw new BindingError(message)}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}var name=registeredInstance.name;if(!rawType){throwBindingError('type "'+name+'" must have a positive integer typeid pointer')}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError("Cannot register type '"+name+"' twice")}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function __embind_register_bool(rawType,name,size,trueValue,falseValue){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":8,"readValueFromPointer":function(pointer){var heap;if(size===1){heap=HEAP8}else if(size===2){heap=HEAP16}else if(size===4){heap=HEAP32}else{throw new TypeError("Unknown boolean type size: "+name)}return this["fromWireType"](heap[pointer>>shift])},destructorFunction:null})}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType}}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")}var finalizationRegistry=false;function detachFinalizer(handle){}function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)}var registeredPointers={};function getInheritedInstanceCount(){return Object.keys(registeredInstances).length}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv}var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}}var delayFunction=undefined;function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}}function init_embind(){Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction}var registeredInstances={};function getBasestPointer(class_,ptr){if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}function attachFinalizer(handle){if("undefined"===typeof FinalizationRegistry){attachFinalizer=handle=>handle;return handle}finalizationRegistry=new FinalizationRegistry(info=>{releaseClassHandle(info.$$)});attachFinalizer=handle=>{var $$=handle.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$:$$};finalizationRegistry.register(handle,info,handle)}return handle};detachFinalizer=handle=>finalizationRegistry.unregister(handle);return attachFinalizer(handle)}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}}function ClassHandle_isDeleted(){return!this.$$.ptr}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}function init_ClassHandle(){ClassHandle.prototype["isAliasOf"]=ClassHandle_isAliasOf;ClassHandle.prototype["clone"]=ClassHandle_clone;ClassHandle.prototype["delete"]=ClassHandle_delete;ClassHandle.prototype["isDeleted"]=ClassHandle_isDeleted;ClassHandle.prototype["deleteLater"]=ClassHandle_deleteLater}function ClassHandle(){}function ensureOverloadTable(proto,methodName,humanName){if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError("Function '"+humanName+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+proto[methodName].overloadTable+")!")}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError("Cannot register public name '"+name+"' twice")}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError("Cannot register multiple overloads of a function with the same number of arguments ("+numArguments+")!")}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError("Expected null or instance of "+desiredClass.name+", got an instance of "+ptrClass.name)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(function(){clonedHandle["delete"]()}));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+handle.$$.ptrType.name+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle["delete"]()}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype["argPackAdvance"]=8;RegisteredPointer.prototype["readValueFromPointer"]=simpleReadValueFromPointer;RegisteredPointer.prototype["deleteObject"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype["fromWireType"]=RegisteredPointer_fromWireType}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}}function dynCallLegacy(sig,ptr,args){var f=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)}function getWasmTableEntry(funcPtr){return wasmTable.get(funcPtr)}function dynCall(sig,ptr,args){if(sig.includes("j")){return dynCallLegacy(sig,ptr,args)}var rtn=getWasmTableEntry(ptr).apply(null,args);return rtn}function getDynCaller(sig,ptr){var argCache=[];return function(){argCache.length=0;Object.assign(argCache,arguments);return dynCall(sig,ptr,argCache)}}function embind__requireFunction(signature,rawFunction){signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes("j")){return getDynCaller(signature,rawFunction)}return getWasmTableEntry(rawFunction)}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError("unknown function pointer with signature "+signature+": "+rawFunction)}return fp}var UnboundTypeError=undefined;function getTypeName(type){var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv}function throwUnboundTypeError(message,types){var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(message+": "+unboundTypes.map(getTypeName).join([", "]))}function __embind_register_class(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor){name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast)}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast)}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError("Cannot construct "+name+" due to unbound types",[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(legalFunctionName,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError("Use 'new' to construct "+name)}if(undefined===registeredClass.constructor_body){throw new BindingError(name+" has no accessible constructor")}var body=registeredClass.constructor_body[arguments.length];if(undefined===body){throw new BindingError("Tried to invoke ctor of "+name+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(registeredClass.constructor_body).toString()+") parameters instead!")}return body.apply(this,arguments)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})}function new_(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError("new_ called with constructor type "+typeof constructor+" which is not a function")}var dummy=createNamedFunction(constructor.name||"unknownFunctionName",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i0?", ":"")+argsListWired}invokerFnBody+=(returns?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i>2])}return array}function __embind_register_class_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,fn){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+"."+methodName;function unboundTypesHandler(){throwUnboundTypeError("Cannot call "+humanName+" due to unbound types",rawArgTypes)}if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}var proto=classType.registeredClass.constructor;if(undefined===proto[methodName]){unboundTypesHandler.argCount=argCount-1;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-1]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));var func=craftInvokerFunction(humanName,invokerArgsArray,null,rawInvoker,fn);if(undefined===proto[methodName].overloadTable){func.argCount=argCount-1;proto[methodName]=func}else{proto[methodName].overloadTable[argCount-1]=func}return[]});return[]})}function __embind_register_class_constructor(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor){assert(argCount>0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName="constructor "+classType.name;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError("Cannot register multiple constructors with identical number of parameters ("+(argCount-1)+") for class '"+classType.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!")}classType.registeredClass.constructor_body[argCount-1]=()=>{throwUnboundTypeError("Cannot construct "+classType.name+" due to unbound types",rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})}function __embind_register_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+"."+methodName;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError("Cannot call "+humanName+" due to unbound types",rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})}function validateThis(this_,classType,humanName){if(!(this_ instanceof Object)){throwBindingError(humanName+' with invalid "this": '+this_)}if(!(this_ instanceof classType.registeredClass.constructor)){throwBindingError(humanName+' incompatible with "this" of type '+this_.constructor.name)}if(!this_.$$.ptr){throwBindingError("cannot call emscripten binding method "+humanName+" on deleted object")}return upcastPointer(this_.$$.ptr,this_.$$.ptrType.registeredClass,classType.registeredClass)}function __embind_register_class_property(classType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){fieldName=readLatin1String(fieldName);getter=embind__requireFunction(getterSignature,getter);whenDependentTypesAreResolved([],[classType],function(classType){classType=classType[0];var humanName=classType.name+"."+fieldName;var desc={get:function(){throwUnboundTypeError("Cannot access "+humanName+" due to unbound types",[getterReturnType,setterArgumentType])},enumerable:true,configurable:true};if(setter){desc.set=()=>{throwUnboundTypeError("Cannot access "+humanName+" due to unbound types",[getterReturnType,setterArgumentType])}}else{desc.set=v=>{throwBindingError(humanName+" is a read-only property")}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);whenDependentTypesAreResolved([],setter?[getterReturnType,setterArgumentType]:[getterReturnType],function(types){var getterReturnType=types[0];var desc={get:function(){var ptr=validateThis(this,classType,humanName+" getter");return getterReturnType["fromWireType"](getter(getterContext,ptr))},enumerable:true};if(setter){setter=embind__requireFunction(setterSignature,setter);var setterArgumentType=types[1];desc.set=function(v){var ptr=validateThis(this,classType,humanName+" setter");var destructors=[];setter(setterContext,ptr,setterArgumentType["toWireType"](destructors,v));runDestructors(destructors)}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);return[]});return[]})}var emval_free_list=[];var emval_handle_array=[{},{value:undefined},{value:null},{value:true},{value:false}];function __emval_decref(handle){if(handle>4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function count_emval_handles(){var count=0;for(var i=5;i{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handle_array[handle].value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{var handle=emval_free_list.length?emval_free_list.pop():emval_handle_array.length;emval_handle_array[handle]={refcount:1,value:value};return handle}}}};function __embind_register_emval(rawType,name){name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(handle){var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":function(destructors,value){return Emval.toHandle(value)},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})}function enumReadValueFromPointer(name,shift,signed){switch(shift){case 0:return function(pointer){var heap=signed?HEAP8:HEAPU8;return this["fromWireType"](heap[pointer])};case 1:return function(pointer){var heap=signed?HEAP16:HEAPU16;return this["fromWireType"](heap[pointer>>1])};case 2:return function(pointer){var heap=signed?HEAP32:HEAPU32;return this["fromWireType"](heap[pointer>>2])};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_enum(rawType,name,size,isSigned){var shift=getShiftFromSize(size);name=readLatin1String(name);function ctor(){}ctor.values={};registerType(rawType,{name:name,constructor:ctor,"fromWireType":function(c){return this.constructor.values[c]},"toWireType":function(destructors,c){return c.value},"argPackAdvance":8,"readValueFromPointer":enumReadValueFromPointer(name,shift,isSigned),destructorFunction:null});exposePublicSymbol(name,ctor)}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl}function __embind_register_enum_value(rawEnumType,name,enumValue){var enumType=requireRegisteredType(rawEnumType,"enum");name=readLatin1String(name);var Enum=enumType.constructor;var Value=Object.create(enumType.constructor.prototype,{value:{value:enumValue},constructor:{value:createNamedFunction(enumType.name+"_"+name,function(){})}});Enum.values[enumValue]=Value;Enum[name]=Value}function embindRepr(v){if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 3:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError("Unknown float type: "+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(value){return value},"toWireType":function(destructors,value){return value},"argPackAdvance":8,"readValueFromPointer":floatReadValueFromPointer(name,shift),destructorFunction:null})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":8,"readValueFromPointer":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(heap.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":8,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str}function stringToUTF16(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}function lengthBytesUTF16(str){return str.length*2}function UTF32ToString(ptr,maxBytesToRead){var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str}function stringToUTF32(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}function lengthBytesUTF32(str){var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len}function __embind_register_std_wstring(rawType,charSize,name){name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":function(destructors,value){if(!(typeof value=="string")){throwBindingError("Cannot pass non-string to C++ string type "+name)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_value_array(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){tupleRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),elements:[]}}function __embind_register_value_array_element(rawTupleType,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){tupleRegistrations[rawTupleType].elements.push({getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext})}function __embind_register_value_object(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){structRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),fields:[]}}function __embind_register_value_object_field(structType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){structRegistrations[structType].fields.push({fieldName:readLatin1String(fieldName),getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext})}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":function(){return undefined},"toWireType":function(destructors,o){return undefined}})}function __emval_as(handle,returnType,destructorsRef){handle=Emval.toValue(handle);returnType=requireRegisteredType(returnType,"emval::as");var destructors=[];var rd=Emval.toHandle(destructors);HEAPU32[destructorsRef>>2]=rd;return returnType["toWireType"](destructors,handle)}function emval_allocateDestructors(destructorsRef){var destructors=[];HEAPU32[destructorsRef>>2]=Emval.toHandle(destructors);return destructors}var emval_symbols={};function getStringOrSymbol(address){var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}return symbol}var emval_methodCallers=[];function __emval_call_method(caller,handle,methodName,destructorsRef,args){caller=emval_methodCallers[caller];handle=Emval.toValue(handle);methodName=getStringOrSymbol(methodName);return caller(handle,methodName,emval_allocateDestructors(destructorsRef),args)}function __emval_call_void_method(caller,handle,methodName,args){caller=emval_methodCallers[caller];handle=Emval.toValue(handle);methodName=getStringOrSymbol(methodName);caller(handle,methodName,null,args)}function __emval_equals(first,second){first=Emval.toValue(first);second=Emval.toValue(second);return first==second}function emval_get_global(){if(typeof globalThis=="object"){return globalThis}return function(){return Function}()("return this")()}function __emval_get_global(name){if(name===0){return Emval.toHandle(emval_get_global())}else{name=getStringOrSymbol(name);return Emval.toHandle(emval_get_global()[name])}}function emval_addMethodCaller(caller){var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id}function emval_lookupTypes(argCount,argTypes){var a=new Array(argCount);for(var i=0;i>2],"parameter "+i)}return a}var emval_registeredMethods=[];function __emval_get_method_caller(argCount,argTypes){var types=emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+"_$"+types.slice(1).map(function(t){return t.name}).join("_")+"$";var returnId=emval_registeredMethods[signatureName];if(returnId!==undefined){return returnId}var params=["retType"];var args=[retType];var argsList="";for(var i=0;i4){emval_handle_array[handle].refcount+=1}}function __emval_instanceof(object,constructor){object=Emval.toValue(object);constructor=Emval.toValue(constructor);return object instanceof constructor}function __emval_is_number(handle){handle=Emval.toValue(handle);return typeof handle=="number"}function __emval_is_string(handle){handle=Emval.toValue(handle);return typeof handle=="string"}function craftEmvalAllocator(argCount){var argsList="";for(var i=0;iHEAPU32;var functionBody="return function emval_allocator_"+argCount+"(constructor, argTypes, args) {\n"+" var HEAPU32 = getMemory();\n";for(var i=0;i>2)], 'parameter "+i+"');\n"+"var arg"+i+" = argType"+i+".readValueFromPointer(args);\n"+"args += argType"+i+"['argPackAdvance'];\n"+"argTypes += 4;\n"}functionBody+="var obj = new constructor("+argsList+");\n"+"return valueToHandle(obj);\n"+"}\n";return new Function("requireRegisteredType","Module","valueToHandle","getMemory",functionBody)(requireRegisteredType,Module,Emval.toHandle,getMemory)}var emval_newers={};function __emval_new(handle,argCount,argTypes,args){handle=Emval.toValue(handle);var newer=emval_newers[argCount];if(!newer){newer=craftEmvalAllocator(argCount);emval_newers[argCount]=newer}return newer(handle,argTypes,args)}function __emval_new_array(){return Emval.toHandle([])}function __emval_new_cstring(v){return Emval.toHandle(getStringOrSymbol(v))}function __emval_new_object(){return Emval.toHandle({})}function __emval_run_destructors(handle){var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle)}function __emval_set_property(handle,key,value){handle=Emval.toValue(handle);key=Emval.toValue(key);value=Emval.toValue(value);handle[key]=value}function __emval_take_value(type,arg){type=requireRegisteredType(type,"_emval_take_value");var v=type["readValueFromPointer"](arg);return Emval.toHandle(v)}function readI53FromI64(ptr){return HEAPU32[ptr>>2]+HEAP32[ptr+4>>2]*4294967296}function __gmtime_js(time,tmPtr){var date=new Date(readI53FromI64(time)*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}var __MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var __MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];function __yday_from_date(date){var isLeapYear=__isLeapYear(date.getFullYear());var monthDaysCumulative=isLeapYear?__MONTH_DAYS_LEAP_CUMULATIVE:__MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday}function __localtime_js(time,tmPtr){var date=new Date(readI53FromI64(time)*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var yday=__yday_from_date(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst}function __mktime_js(tmPtr){var date=new Date(HEAP32[tmPtr+20>>2]+1900,HEAP32[tmPtr+16>>2],HEAP32[tmPtr+12>>2],HEAP32[tmPtr+8>>2],HEAP32[tmPtr+4>>2],HEAP32[tmPtr>>2],0);var dst=HEAP32[tmPtr+32>>2];var guessedOffset=date.getTimezoneOffset();var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dstOffset=Math.min(winterOffset,summerOffset);if(dst<0){HEAP32[tmPtr+32>>2]=Number(summerOffset!=winterOffset&&dstOffset==guessedOffset)}else if(dst>0!=(dstOffset==guessedOffset)){var nonDstOffset=Math.max(winterOffset,summerOffset);var trueOffset=dst>0?dstOffset:nonDstOffset;date.setTime(date.getTime()+(trueOffset-guessedOffset)*6e4)}HEAP32[tmPtr+24>>2]=date.getDay();var yday=__yday_from_date(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getYear();return date.getTime()/1e3|0}function allocateUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8Array(str,HEAP8,ret,size);return ret}function __tzset_js(timezone,daylight,tzname){var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocateUTF8(winterName);var summerNamePtr=allocateUTF8(summerName);if(summerOffset>2]=winterNamePtr;HEAPU32[tzname+4>>2]=summerNamePtr}else{HEAPU32[tzname>>2]=summerNamePtr;HEAPU32[tzname+4>>2]=winterNamePtr}}function _abort(){abort("")}function _emscripten_date_now(){return Date.now()}function getHeapMax(){return 2147483648}var _emscripten_get_now;if(ENVIRONMENT_IS_NODE){_emscripten_get_now=()=>{var t=process["hrtime"]();return t[0]*1e3+t[1]/1e6}}else _emscripten_get_now=()=>performance.now();function emscripten_realloc_buffer(size){var b=wasmMemory.buffer;try{wasmMemory.grow(size-b.byteLength+65535>>>16);updateMemoryViews();return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(x+"="+env[x])}getEnvStrings.strings=strings}return getEnvStrings.strings}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAPU32[penviron_buf_size>>2]=bufSize;return 0}function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function doReadv(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{var offset=convertI32PairToI53Checked(offset_low,offset_high);if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function doWritev(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr}}return ret}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.staticInit();InternalError=Module["InternalError"]=extendError(Error,"InternalError");embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");init_ClassHandle();init_embind();init_RegisteredPointer();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");init_emval();var asmLibraryArg={"v":___cxa_throw,"U":___syscall_connect,"ea":___syscall_faccessat,"o":___syscall_fcntl64,"Z":___syscall_fstat64,"S":___syscall_ftruncate64,"K":___syscall_ioctl,"W":___syscall_lstat64,"X":___syscall_newfstatat,"G":___syscall_openat,"F":___syscall_socket,"Y":___syscall_stat64,"r":__embind_finalize_value_array,"ka":__embind_finalize_value_object,"T":__embind_register_bigint,"ga":__embind_register_bool,"e":__embind_register_class,"f":__embind_register_class_class_function,"g":__embind_register_class_constructor,"b":__embind_register_class_function,"a":__embind_register_class_property,"fa":__embind_register_emval,"i":__embind_register_enum,"d":__embind_register_enum_value,"M":__embind_register_float,"p":__embind_register_integer,"l":__embind_register_memory_view,"L":__embind_register_std_string,"B":__embind_register_std_wstring,"q":__embind_register_value_array,"ia":__embind_register_value_array_element,"ja":__embind_register_value_object,"N":__embind_register_value_object_field,"ha":__embind_register_void,"t":__emval_as,"la":__emval_call_method,"P":__emval_call_void_method,"c":__emval_decref,"Q":__emval_equals,"y":__emval_get_global,"C":__emval_get_method_caller,"E":__emval_get_module_property,"w":__emval_get_property,"m":__emval_incref,"D":__emval_instanceof,"na":__emval_is_number,"ma":__emval_is_string,"O":__emval_new,"n":__emval_new_array,"u":__emval_new_cstring,"k":__emval_new_object,"s":__emval_run_destructors,"j":__emval_set_property,"h":__emval_take_value,"aa":__gmtime_js,"ba":__localtime_js,"ca":__mktime_js,"da":__tzset_js,"z":_abort,"I":_emscripten_date_now,"H":_emscripten_get_now,"V":_emscripten_resize_heap,"_":_environ_get,"$":_environ_sizes_get,"x":_fd_close,"J":_fd_read,"R":_fd_seek,"A":_fd_write};var asm=createWasm();var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["pa"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["ra"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["sa"]).apply(null,arguments)};var ___errno_location=Module["___errno_location"]=function(){return(___errno_location=Module["___errno_location"]=Module["asm"]["ta"]).apply(null,arguments)};var ___getTypeName=Module["___getTypeName"]=function(){return(___getTypeName=Module["___getTypeName"]=Module["asm"]["ua"]).apply(null,arguments)};var __embind_initialize_bindings=Module["__embind_initialize_bindings"]=function(){return(__embind_initialize_bindings=Module["__embind_initialize_bindings"]=Module["asm"]["va"]).apply(null,arguments)};var _htons=Module["_htons"]=function(){return(_htons=Module["_htons"]=Module["asm"]["wa"]).apply(null,arguments)};var _ntohs=Module["_ntohs"]=function(){return(_ntohs=Module["_ntohs"]=Module["asm"]["xa"]).apply(null,arguments)};var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=function(){return(___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=Module["asm"]["ya"]).apply(null,arguments)};var dynCall_ji=Module["dynCall_ji"]=function(){return(dynCall_ji=Module["dynCall_ji"]=Module["asm"]["za"]).apply(null,arguments)};var dynCall_vij=Module["dynCall_vij"]=function(){return(dynCall_vij=Module["dynCall_vij"]=Module["asm"]["Aa"]).apply(null,arguments)};var dynCall_jiji=Module["dynCall_jiji"]=function(){return(dynCall_jiji=Module["dynCall_jiji"]=Module["asm"]["Ba"]).apply(null,arguments)};var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); + + + return rhino3dm.ready +} +); +})(); +if (typeof exports === 'object' && typeof module === 'object') + module.exports = rhino3dm; +else if (typeof define === 'function' && define['amd']) + define([], function() { return rhino3dm; }); +else if (typeof exports === 'object') + exports["rhino3dm"] = rhino3dm; diff --git a/node_modules/three/examples/jsm/libs/rhino3dm/rhino3dm.module.js b/node_modules/three/examples/jsm/libs/rhino3dm/rhino3dm.module.js new file mode 100644 index 0000000..14ec133 --- /dev/null +++ b/node_modules/three/examples/jsm/libs/rhino3dm/rhino3dm.module.js @@ -0,0 +1,16 @@ + +var rhino3dm = (() => { + var _scriptDir = import.meta.url; + + return ( +async function(config) { + var rhino3dm = config || {}; + +var Module=typeof rhino3dm!="undefined"?rhino3dm:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;function logExceptionOnExit(e){if(e instanceof ExitStatus)return;let toLog=e;err("exiting due to exception: "+toLog)}if(ENVIRONMENT_IS_NODE){const{createRequire:createRequire}=await import("module");var require=createRequire(import.meta.url);var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=require("url").fileURLToPath(new URL("./",import.meta.url))}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,function(err,data){if(err)onerror(err);else onload(data.buffer)})};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",function(reason){throw reason});quit_=(status,toThrow)=>{if(keepRuntimeAlive()){process["exitCode"]=status;throw toThrow}logExceptionOnExit(toThrow);process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=title=>document.title=title}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var POINTER_SIZE=4;var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||16777216;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function keepRuntimeAlive(){return noExitRuntime}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;SOCKFS.root=FS.mount(SOCKFS,{},null);if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;if(Module["locateFile"]){wasmBinaryFile="rhino3dm.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}}else{wasmBinaryFile=new URL("rhino3dm.wasm",import.meta.url).href}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}catch(err){abort(err)}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(wasmBinaryFile)){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'"}return response["arrayBuffer"]()}).catch(function(){return getBinary(wasmBinaryFile)})}else{if(readAsync){return new Promise(function(resolve,reject){readAsync(wasmBinaryFile,function(response){resolve(new Uint8Array(response))},reject)})}}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile)})}function createWasm(){var info={"a":asmLibraryArg};function receiveInstance(instance,module){var exports=instance.exports;Module["asm"]=exports;wasmMemory=Module["asm"]["oa"];updateMemoryViews();wasmTable=Module["asm"]["qa"];addOnInit(Module["asm"]["pa"]);removeRunDependency("wasm-instantiate")}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info)}).then(function(instance){return instance}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason)})}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(wasmBinaryFile)&&!isFileURI(wasmBinaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult)})})}else{return instantiateArrayBuffer(receiveInstantiationResult)}}if(Module["instantiateWasm"]){try{var exports=Module["instantiateWasm"](info,receiveInstance);return exports}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e)}}instantiateAsync().catch(readyPromiseReject);return{}}var tempDouble;var tempI64;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status}function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module)}}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_refcount=function(refcount){HEAP32[this.ptr>>2]=refcount};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false)};this.add_ref=function(){var value=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=value+1};this.release_ref=function(){var prev=HEAP32[this.ptr>>2];HEAP32[this.ptr>>2]=prev-1;return prev===1};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw ptr}function getRandomDevice(){if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){var randomBuffer=new Uint8Array(1);return()=>{crypto.getRandomValues(randomBuffer);return randomBuffer[0]}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");return()=>crypto_module["randomBytes"](1)[0]}catch(e){}}return()=>abort("randomDevice")}var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"))},join2:(l,r)=>{return PATH.normalize(l+"/"+r)}};var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var TTY={ttys:[],init:function(){},shutdown:function(){},register:function(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function(stream){stream.tty.ops.fsync(stream.tty)},fsync:function(stream){stream.tty.ops.fsync(stream.tty)},read:function(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}tty.input=intArrayFromString(result,true)}return tty.input.shift()},put_char:function(tty,val){if(val===null||val===10){out(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}}},default_tty1_ops:{put_char:function(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};function mmapAlloc(size){abort()}var MEMFS={ops_table:null,mount:function(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray:function(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage:function(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage:function(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr:function(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function(parent,name){throw FS.genericErrors[44]},mknod:function(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink:function(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink:function(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length{assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},event=>{if(onerror){onerror()}else{throw'Loading data file "'+url+'" failed.'}});if(dep)addRunDependency(dep)}var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(path,opts={})=>{path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:node=>{var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path}path=path?node.name+"/"+path:node.name;node=node.parent}},hashName:(parentid,name)=>{var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:node=>{var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:node=>{var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:(parent,name)=>{var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:(parent,name,mode,rdev)=>{var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:node=>{FS.hashRemoveNode(node)},isRoot:node=>{return node===node.parent},isMountpoint:node=>{return!!node.mounted},isFile:mode=>{return(mode&61440)===32768},isDir:mode=>{return(mode&61440)===16384},isLink:mode=>{return(mode&61440)===40960},isChrdev:mode=>{return(mode&61440)===8192},isBlkdev:mode=>{return(mode&61440)===24576},isFIFO:mode=>{return(mode&61440)===4096},isSocket:mode=>{return(mode&49152)===49152},flagModes:{"r":0,"r+":2,"w":577,"w+":578,"a":1089,"a+":1090},modeStringToFlags:str=>{var flags=FS.flagModes[str];if(typeof flags=="undefined"){throw new Error("Unknown file open mode: "+str)}return flags},flagsToPermissionString:flag=>{var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:(node,perms)=>{if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup:dir=>{var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:(dir,name)=>{try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:(dir,name,isdir)=>{var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen:(node,flags)=>{if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:(fd_start=0,fd_end=FS.MAX_OPEN_FDS)=>{for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStream:fd=>FS.streams[fd],createStream:(stream,fd_start,fd_end)=>{if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(val){this.node=val}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(val){this.shared.flags=val}},position:{get:function(){return this.shared.position},set:function(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:fd=>{FS.streams[fd]=null},chrdev_stream_ops:{open:stream=>{var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek:()=>{throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice:(dev,ops)=>{FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts:mount=>{var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs:(populate,callback)=>{if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work")}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:(type,opts,mountpoint)=>{var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:mountpoint=>{var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:(parent,name)=>{return parent.node_ops.lookup(parent,name)},mknod:(path,mode,dev)=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create:(path,mode)=>{mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:(path,mode)=>{mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:(path,mode)=>{var dirs=path.split("/");var d="";for(var i=0;i{if(typeof dev=="undefined"){dev=mode;mode=438}mode|=8192;return FS.mknod(path,mode,dev)},symlink:(oldpath,newpath)=>{if(!PATH_FS.resolve(oldpath)){throw new FS.ErrnoError(44)}var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var newname=PATH.basename(newpath);var errCode=FS.mayCreate(parent,newname);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.symlink){throw new FS.ErrnoError(63)}return parent.node_ops.symlink(parent,newname,oldpath)},rename:(old_path,new_path)=>{var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);var lookup,old_dir,new_dir;lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;if(!old_dir||!new_dir)throw new FS.ErrnoError(44);if(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(75)}var old_node=FS.lookupNode(old_dir,old_name);var relative=PATH_FS.relative(old_path,new_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(28)}relative=PATH_FS.relative(new_path,old_dirname);if(relative.charAt(0)!=="."){throw new FS.ErrnoError(55)}var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(old_node===new_node){return}var isdir=FS.isDir(old_node.mode);var errCode=FS.mayDelete(old_dir,old_name,isdir);if(errCode){throw new FS.ErrnoError(errCode)}errCode=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(errCode){throw new FS.ErrnoError(errCode)}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(63)}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(10)}if(new_dir!==old_dir){errCode=FS.nodePermissions(old_dir,"w");if(errCode){throw new FS.ErrnoError(errCode)}}FS.hashRemoveNode(old_node);try{old_dir.node_ops.rename(old_node,new_dir,new_name)}catch(e){throw e}finally{FS.hashAddNode(old_node)}},rmdir:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,true);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.rmdir(parent,name);FS.destroyNode(node)},readdir:path=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(54)}return node.node_ops.readdir(node)},unlink:path=>{var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;if(!parent){throw new FS.ErrnoError(44)}var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var errCode=FS.mayDelete(parent,name,false);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.unlink){throw new FS.ErrnoError(63)}if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}parent.node_ops.unlink(parent,name);FS.destroyNode(node)},readlink:path=>{var lookup=FS.lookupPath(path);var link=lookup.node;if(!link){throw new FS.ErrnoError(44)}if(!link.node_ops.readlink){throw new FS.ErrnoError(28)}return PATH_FS.resolve(FS.getPath(link.parent),link.node_ops.readlink(link))},stat:(path,dontFollow)=>{var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node){throw new FS.ErrnoError(44)}if(!node.node_ops.getattr){throw new FS.ErrnoError(63)}return node.node_ops.getattr(node)},lstat:path=>{return FS.stat(path,true)},chmod:(path,mode,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()})},lchmod:(path,mode)=>{FS.chmod(path,mode,true)},fchmod:(fd,mode)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chmod(stream.node,mode)},chown:(path,uid,gid,dontFollow)=>{var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}node.node_ops.setattr(node,{timestamp:Date.now()})},lchown:(path,uid,gid)=>{FS.chown(path,uid,gid,true)},fchown:(fd,uid,gid)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}FS.chown(stream.node,uid,gid)},truncate:(path,len)=>{if(len<0){throw new FS.ErrnoError(28)}var node;if(typeof path=="string"){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node}else{node=path}if(!node.node_ops.setattr){throw new FS.ErrnoError(63)}if(FS.isDir(node.mode)){throw new FS.ErrnoError(31)}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(28)}var errCode=FS.nodePermissions(node,"w");if(errCode){throw new FS.ErrnoError(errCode)}node.node_ops.setattr(node,{size:len,timestamp:Date.now()})},ftruncate:(fd,len)=>{var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(28)}FS.truncate(stream.node,len)},utime:(path,atime,mtime)=>{var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)})},open:(path,flags,mode)=>{if(path===""){throw new FS.ErrnoError(44)}flags=typeof flags=="string"?FS.modeStringToFlags(flags):flags;mode=typeof mode=="undefined"?438:mode;if(flags&64){mode=mode&4095|32768}else{mode=0}var node;if(typeof path=="object"){node=path}else{path=PATH.normalize(path);try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node}catch(e){}}var created=false;if(flags&64){if(node){if(flags&128){throw new FS.ErrnoError(20)}}else{node=FS.mknod(path,mode,0);created=true}}if(!node){throw new FS.ErrnoError(44)}if(FS.isChrdev(node.mode)){flags&=~512}if(flags&65536&&!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}if(!created){var errCode=FS.mayOpen(node,flags);if(errCode){throw new FS.ErrnoError(errCode)}}if(flags&512&&!created){FS.truncate(node,0)}flags&=~(128|512|131072);var stream=FS.createStream({node:node,path:FS.getPath(node),flags:flags,seekable:true,position:0,stream_ops:node.stream_ops,ungotten:[],error:false});if(stream.stream_ops.open){stream.stream_ops.open(stream)}if(Module["logReadFiles"]&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1}}return stream},close:stream=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(stream.getdents)stream.getdents=null;try{if(stream.stream_ops.close){stream.stream_ops.close(stream)}}catch(e){throw e}finally{FS.closeStream(stream.fd)}stream.fd=null},isClosed:stream=>{return stream.fd===null},llseek:(stream,offset,whence)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(70)}if(whence!=0&&whence!=1&&whence!=2){throw new FS.ErrnoError(28)}stream.position=stream.stream_ops.llseek(stream,offset,whence);stream.ungotten=[];return stream.position},read:(stream,buffer,offset,length,position)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.read){throw new FS.ErrnoError(28)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead},write:(stream,buffer,offset,length,position,canOwn)=>{if(length<0||position<0){throw new FS.ErrnoError(28)}if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31)}if(!stream.stream_ops.write){throw new FS.ErrnoError(28)}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2)}var seeking=typeof position!="undefined";if(!seeking){position=stream.position}else if(!stream.seekable){throw new FS.ErrnoError(70)}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten},allocate:(stream,offset,length)=>{if(FS.isClosed(stream)){throw new FS.ErrnoError(8)}if(offset<0||length<=0){throw new FS.ErrnoError(28)}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8)}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43)}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138)}stream.stream_ops.allocate(stream,offset,length)},mmap:(stream,length,position,prot,flags)=>{if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2)}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2)}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43)}return stream.stream_ops.mmap(stream,length,position,prot,flags)},msync:(stream,buffer,offset,length,mmapFlags)=>{if(!stream.stream_ops.msync){return 0}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags)},munmap:stream=>0,ioctl:(stream,cmd,arg)=>{if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile:(path,opts={})=>{opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"')}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile:(path,data,opts={})=>{opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.currentPath,chdir:path=>{var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories:()=>{FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices:()=>{FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var random_device=getRandomDevice();FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:()=>{var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup:(parent,name)=>{var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams:()=>{if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},ensureErrnoError:()=>{if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=function(errno){this.errno=errno};this.setErrno(errno);this.message="FS error"};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit:()=>{FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS}},init:(input,output,error)=>{FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit:()=>{FS.init.initialized=false;for(var i=0;i{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode},findObject:(path,dontResolveLastLink)=>{var ret=FS.analyzePath(path,dontResolveLastLink);if(!ret.exists){return null}return ret.object},analyzePath:(path,dontResolveLastLink)=>{try{var lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});path=lookup.path}catch(e){}var ret={isRoot:false,exists:false,error:0,name:null,path:null,object:null,parentExists:false,parentPath:null,parentObject:null};try{var lookup=FS.lookupPath(path,{parent:true});ret.parentExists=true;ret.parentPath=lookup.path;ret.parentObject=lookup.node;ret.name=PATH.basename(path);lookup=FS.lookupPath(path,{follow:!dontResolveLastLink});ret.exists=true;ret.path=lookup.path;ret.object=lookup.node;ret.name=lookup.node.name;ret.isRoot=lookup.path==="/"}catch(e){ret.error=e.errno}return ret},createPath:(parent,path,canRead,canWrite)=>{parent=typeof parent=="string"?parent:FS.getPath(parent);var parts=path.split("/").reverse();while(parts.length){var part=parts.pop();if(!part)continue;var current=PATH.join2(parent,part);try{FS.mkdir(current)}catch(e){}parent=current}return current},createFile:(parent,name,properties,canRead,canWrite)=>{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode)},createDataFile:(parent,name,data,canRead,canWrite,canOwn)=>{var path=name;if(parent){parent=typeof parent=="string"?parent:FS.getPath(parent);path=name?PATH.join2(parent,name):parent}var mode=FS.getMode(canRead,canWrite);var node=FS.create(path,mode);if(data){if(typeof data=="string"){var arr=new Array(data.length);for(var i=0,len=data.length;i{var path=PATH.join2(typeof parent=="string"?parent:FS.getPath(parent),name);var mode=FS.getMode(!!input,!!output);if(!FS.createDevice.major)FS.createDevice.major=64;var dev=FS.makedev(FS.createDevice.major++,0);FS.registerDevice(dev,{open:stream=>{stream.seekable=false},close:stream=>{if(output&&output.buffer&&output.buffer.length){output(10)}},read:(stream,buffer,offset,length,pos)=>{var bytesRead=0;for(var i=0;i{for(var i=0;i{if(obj.isDevice||obj.isFolder||obj.link||obj.contents)return true;if(typeof XMLHttpRequest!="undefined"){throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.")}else if(read_){try{obj.contents=intArrayFromString(read_(obj.url),true);obj.usedBytes=obj.contents.length}catch(e){throw new FS.ErrnoError(29)}}else{throw new Error("Cannot load without read() or XMLHttpRequest.")}},createLazyFile:(parent,name,url,canRead,canWrite)=>{function LazyUint8Array(){this.lengthKnown=false;this.chunks=[]}LazyUint8Array.prototype.get=function LazyUint8Array_get(idx){if(idx>this.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}};node.stream_ops=stream_ops;return node},createPreloadedFile:(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency("cp "+fullname);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS.createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(Browser.handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}},indexedDB:()=>{return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:()=>{return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(paths,onload,onerror)=>{onload=onload||(()=>{});onerror=onerror||(()=>{});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=()=>{out("creating db");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME)};openRequest.onsuccess=()=>{var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],"readwrite");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=()=>{ok++;if(ok+fail==total)finish()};putRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror},loadFilesFromDB:(paths,onload,onerror)=>{onload=onload||(()=>{});onerror=onerror||(()=>{});var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION)}catch(e){return onerror(e)}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=()=>{var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],"readonly")}catch(e){onerror(e);return}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror()}paths.forEach(path=>{var getRequest=files.get(path);getRequest.onsuccess=()=>{if(FS.analyzePath(path).exists){FS.unlink(path)}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish()};getRequest.onerror=()=>{fail++;if(ok+fail==total)finish()}});transaction.onerror=onerror};openRequest.onerror=onerror}};var SOCKFS={mount:function(mount){Module["websocket"]=Module["websocket"]&&"object"===typeof Module["websocket"]?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this};Module["websocket"].emit=function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}};return FS.createNode(null,"/",16384|511,0)},createSocket:function(family,type,protocol){type&=~526336;var streaming=type==1;if(streaming&&protocol&&protocol!=6){throw new FS.ErrnoError(66)}var sock={family:family,type:type,protocol:protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node:node,flags:2,seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock},getSocket:function(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock},stream_ops:{poll:function(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)},ioctl:function(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)},read:function(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length},write:function(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)},close:function(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)}},nextname:function(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(sock,addr,port){var ws;if(typeof addr=="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===typeof Module["websocket"];var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}var opts=undefined;if(subProtocols!=="null"){subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);opts=subProtocols}if(runtimeConfig&&null===Module["websocket"]["subprotocol"]){subProtocols="null";opts=undefined}var WebSocketConstructor;if(ENVIRONMENT_IS_NODE){WebSocketConstructor=require("ws")}else{WebSocketConstructor=WebSocket}ws=new WebSocketConstructor(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(23)}}var peer={addr:addr,port:port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer},getPeer:function(sock,addr,port){return sock.peers[addr+":"+port]},addPeer:function(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer},removePeer:function(sock,peer){delete sock.peers[peer.addr+":"+peer.port]},handlePeerEvents:function(sock,peer){var first=true;var handleOpen=function(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}};function handleMessage(data){if(typeof data=="string"){var encoder=new TextEncoder;data=encoder.encode(data)}else{assert(data.byteLength!==undefined);if(data.byteLength==0){return}data=new Uint8Array(data)}var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",function(data,isBinary){if(!isBinary){return}handleMessage(new Uint8Array(data).buffer)});peer.socket.on("close",function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.on("error",function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}else{peer.socket.onopen=handleOpen;peer.socket.onclose=function(){Module["websocket"].emit("close",sock.stream.fd)};peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}}},poll:function(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask},ioctl:function(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>2]=bytes;return 0;default:return 28}},close:function(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i>2]=value;return value}function inetNtop4(addr){return(addr&255)+"."+(addr>>8&255)+"."+(addr>>16&255)+"."+(addr>>24&255)}function inetNtop6(ints){var str="";var word=0;var longest=0;var lastzero=0;var zstart=0;var len=0;var i=0;var parts=[ints[0]&65535,ints[0]>>16,ints[1]&65535,ints[1]>>16,ints[2]&65535,ints[2]>>16,ints[3]&65535,ints[3]>>16];var hasipv4=true;var v4part="";for(i=0;i<5;i++){if(parts[i]!==0){hasipv4=false;break}}if(hasipv4){v4part=inetNtop4(parts[6]|parts[7]<<16);if(parts[5]===-1){str="::ffff:";str+=v4part;return str}if(parts[5]===0){str="::";if(v4part==="0.0.0.0")v4part="";if(v4part==="0.0.0.1")v4part="1";str+=v4part;return str}}for(word=0;word<8;word++){if(parts[word]===0){if(word-lastzero>1){len=0}lastzero=word;len++}if(len>longest){longest=len;zstart=word-longest+1}}for(word=0;word<8;word++){if(longest>1){if(parts[word]===0&&word>=zstart&&word>1];var port=_ntohs(HEAPU16[sa+2>>1]);var addr;switch(family){case 2:if(salen!==16){return{errno:28}}addr=HEAP32[sa+4>>2];addr=inetNtop4(addr);break;case 10:if(salen!==28){return{errno:28}}addr=[HEAP32[sa+8>>2],HEAP32[sa+12>>2],HEAP32[sa+16>>2],HEAP32[sa+20>>2]];addr=inetNtop6(addr);break;default:return{errno:5}}return{family:family,addr:addr,port:port}}function inetPton4(str){var b=str.split(".");for(var i=0;i<4;i++){var tmp=Number(b[i]);if(isNaN(tmp))return null;b[i]=tmp}return(b[0]|b[1]<<8|b[2]<<16|b[3]<<24)>>>0}function jstoi_q(str){return parseInt(str)}function inetPton6(str){var words;var w,offset,z;var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i;var parts=[];if(!valid6regx.test(str)){return null}if(str==="::"){return[0,0,0,0,0,0,0,0]}if(str.startsWith("::")){str=str.replace("::","Z:")}else{str=str.replace("::",":Z:")}if(str.indexOf(".")>0){str=str.replace(new RegExp("[.]","g"),":");words=str.split(":");words[words.length-4]=jstoi_q(words[words.length-4])+jstoi_q(words[words.length-3])*256;words[words.length-3]=jstoi_q(words[words.length-2])+jstoi_q(words[words.length-1])*256;words=words.slice(0,words.length-2)}else{words=str.split(":")}offset=0;z=0;for(w=0;w>2]=stat.dev;HEAP32[buf+8>>2]=stat.ino;HEAP32[buf+12>>2]=stat.mode;HEAPU32[buf+16>>2]=stat.nlink;HEAP32[buf+20>>2]=stat.uid;HEAP32[buf+24>>2]=stat.gid;HEAP32[buf+28>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAP32[buf+48>>2]=4096;HEAP32[buf+52>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>2]=tempI64[0],HEAP32[buf+60>>2]=tempI64[1];HEAPU32[buf+64>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>2]=tempI64[0],HEAP32[buf+76>>2]=tempI64[1];HEAPU32[buf+80>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>2]=tempI64[0],HEAP32[buf+92>>2]=tempI64[1];HEAPU32[buf+96>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+104>>2]=tempI64[0],HEAP32[buf+108>>2]=tempI64[1];return 0},doMsync:function(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},varargs:undefined,get:function(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>2];return ret},getStr:function(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD:function(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream}};function ___syscall_connect(fd,addr,addrlen){try{var sock=getSocketFromFD(fd);var info=getSocketAddress(addr,addrlen);sock.sock_ops.connect(sock,info.addr,info.port);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_faccessat(dirfd,path,amode,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(amode&~7){return-28}var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node){return-44}var perms="";if(amode&4)perms+="r";if(amode&2)perms+="w";if(amode&1)perms+="x";if(perms&&FS.nodePermissions(node,perms)){return-2}return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}var newStream;newStream=FS.createStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 5:{var arg=SYSCALLS.get();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_fstat64(fd,buf){try{var stream=SYSCALLS.getStreamFromFD(fd);return SYSCALLS.doStat(FS.stat,stream.path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function convertI32PairToI53Checked(lo,hi){return hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN}function ___syscall_ftruncate64(fd,length_low,length_high){try{var length=convertI32PairToI53Checked(length_low,length_high);if(isNaN(length))return-61;FS.ftruncate(fd,length);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:case 21505:{if(!stream.tty)return-59;return 0}case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:{if(!stream.tty)return-59;return 0}case 21519:{if(!stream.tty)return-59;var argp=SYSCALLS.get();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=SYSCALLS.get();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;return 0}case 21524:{if(!stream.tty)return-59;return 0}default:return-28}}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_lstat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.lstat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_newfstatat(dirfd,path,buf,flags){try{path=SYSCALLS.getStr(path);var nofollow=flags&256;var allowEmpty=flags&4096;flags=flags&~6400;path=SYSCALLS.calculateAt(dirfd,path,allowEmpty);return SYSCALLS.doStat(nofollow?FS.lstat:FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?SYSCALLS.get():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_socket(domain,type,protocol){try{var sock=SOCKFS.createSocket(domain,type,protocol);return sock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}function ___syscall_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return-e.errno}}var tupleRegistrations={};function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}}function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAP32[pointer>>2])}var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(undefined===name){return"_unknown"}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return"_"+name}return name}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function("body","return function "+name+"() {\n"+' "use strict";'+" return body.apply(this, arguments);\n"+"};\n")(body)}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return this.name+": "+this.message}};return errorClass}var InternalError=undefined;function throwInternalError(message){throw new InternalError(message)}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i{if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(()=>{typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}}function __embind_finalize_value_array(rawTupleType){var reg=tupleRegistrations[rawTupleType];delete tupleRegistrations[rawTupleType];var elements=reg.elements;var elementsLength=elements.length;var elementTypes=elements.map(function(elt){return elt.getterReturnType}).concat(elements.map(function(elt){return elt.setterArgumentType}));var rawConstructor=reg.rawConstructor;var rawDestructor=reg.rawDestructor;whenDependentTypesAreResolved([rawTupleType],elementTypes,function(elementTypes){elements.forEach((elt,i)=>{var getterReturnType=elementTypes[i];var getter=elt.getter;var getterContext=elt.getterContext;var setterArgumentType=elementTypes[i+elementsLength];var setter=elt.setter;var setterContext=elt.setterContext;elt.read=ptr=>{return getterReturnType["fromWireType"](getter(getterContext,ptr))};elt.write=(ptr,o)=>{var destructors=[];setter(setterContext,ptr,setterArgumentType["toWireType"](destructors,o));runDestructors(destructors)}});return[{name:reg.name,"fromWireType":function(ptr){var rv=new Array(elementsLength);for(var i=0;ifield.getterReturnType).concat(fieldRecords.map(field=>field.setterArgumentType));whenDependentTypesAreResolved([structType],fieldTypes,fieldTypes=>{var fields={};fieldRecords.forEach((field,i)=>{var fieldName=field.fieldName;var getterReturnType=fieldTypes[i];var getter=field.getter;var getterContext=field.getterContext;var setterArgumentType=fieldTypes[i+fieldRecords.length];var setter=field.setter;var setterContext=field.setterContext;fields[fieldName]={read:ptr=>{return getterReturnType["fromWireType"](getter(getterContext,ptr))},write:(ptr,o)=>{var destructors=[];setter(setterContext,ptr,setterArgumentType["toWireType"](destructors,o));runDestructors(destructors)}}});return[{name:reg.name,"fromWireType":function(ptr){var rv={};for(var i in fields){rv[i]=fields[i].read(ptr)}rawDestructor(ptr);return rv},"toWireType":function(destructors,o){for(var fieldName in fields){if(!(fieldName in o)){throw new TypeError('Missing field: "'+fieldName+'"')}}var ptr=rawConstructor();for(fieldName in fields){fields[fieldName].write(ptr,o[fieldName])}if(destructors!==null){destructors.push(rawDestructor,ptr)}return ptr},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:rawDestructor}]})}function __embind_register_bigint(primitiveType,name,size,minRange,maxRange){}function getShiftFromSize(size){switch(size){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+size)}}function embind_init_charCodes(){var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes}var embind_charCodes=undefined;function readLatin1String(ptr){var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret}var BindingError=undefined;function throwBindingError(message){throw new BindingError(message)}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}var name=registeredInstance.name;if(!rawType){throwBindingError('type "'+name+'" must have a positive integer typeid pointer')}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError("Cannot register type '"+name+"' twice")}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function __embind_register_bool(rawType,name,size,trueValue,falseValue){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":8,"readValueFromPointer":function(pointer){var heap;if(size===1){heap=HEAP8}else if(size===2){heap=HEAP16}else if(size===4){heap=HEAP32}else{throw new TypeError("Unknown boolean type size: "+name)}return this["fromWireType"](heap[pointer>>shift])},destructorFunction:null})}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType}}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")}var finalizationRegistry=false;function detachFinalizer(handle){}function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)}var registeredPointers={};function getInheritedInstanceCount(){return Object.keys(registeredInstances).length}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv}var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}}var delayFunction=undefined;function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}}function init_embind(){Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction}var registeredInstances={};function getBasestPointer(class_,ptr){if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}function attachFinalizer(handle){if("undefined"===typeof FinalizationRegistry){attachFinalizer=handle=>handle;return handle}finalizationRegistry=new FinalizationRegistry(info=>{releaseClassHandle(info.$$)});attachFinalizer=handle=>{var $$=handle.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$:$$};finalizationRegistry.register(handle,info,handle)}return handle};detachFinalizer=handle=>finalizationRegistry.unregister(handle);return attachFinalizer(handle)}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}}function ClassHandle_isDeleted(){return!this.$$.ptr}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}function init_ClassHandle(){ClassHandle.prototype["isAliasOf"]=ClassHandle_isAliasOf;ClassHandle.prototype["clone"]=ClassHandle_clone;ClassHandle.prototype["delete"]=ClassHandle_delete;ClassHandle.prototype["isDeleted"]=ClassHandle_isDeleted;ClassHandle.prototype["deleteLater"]=ClassHandle_deleteLater}function ClassHandle(){}function ensureOverloadTable(proto,methodName,humanName){if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError("Function '"+humanName+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+proto[methodName].overloadTable+")!")}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError("Cannot register public name '"+name+"' twice")}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError("Cannot register multiple overloads of a function with the same number of arguments ("+numArguments+")!")}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError("Expected null or instance of "+desiredClass.name+", got an instance of "+ptrClass.name)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(function(){clonedHandle["delete"]()}));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name)}return 0}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name)}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name)}if(handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+handle.$$.ptrType.name+" to parameter type "+this.name)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle["delete"]()}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype["argPackAdvance"]=8;RegisteredPointer.prototype["readValueFromPointer"]=simpleReadValueFromPointer;RegisteredPointer.prototype["deleteObject"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype["fromWireType"]=RegisteredPointer_fromWireType}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}}function dynCallLegacy(sig,ptr,args){var f=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)}function getWasmTableEntry(funcPtr){return wasmTable.get(funcPtr)}function dynCall(sig,ptr,args){if(sig.includes("j")){return dynCallLegacy(sig,ptr,args)}var rtn=getWasmTableEntry(ptr).apply(null,args);return rtn}function getDynCaller(sig,ptr){var argCache=[];return function(){argCache.length=0;Object.assign(argCache,arguments);return dynCall(sig,ptr,argCache)}}function embind__requireFunction(signature,rawFunction){signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes("j")){return getDynCaller(signature,rawFunction)}return getWasmTableEntry(rawFunction)}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError("unknown function pointer with signature "+signature+": "+rawFunction)}return fp}var UnboundTypeError=undefined;function getTypeName(type){var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv}function throwUnboundTypeError(message,types){var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(message+": "+unboundTypes.map(getTypeName).join([", "]))}function __embind_register_class(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor){name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast)}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast)}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError("Cannot construct "+name+" due to unbound types",[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(legalFunctionName,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError("Use 'new' to construct "+name)}if(undefined===registeredClass.constructor_body){throw new BindingError(name+" has no accessible constructor")}var body=registeredClass.constructor_body[arguments.length];if(undefined===body){throw new BindingError("Tried to invoke ctor of "+name+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(registeredClass.constructor_body).toString()+") parameters instead!")}return body.apply(this,arguments)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})}function new_(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError("new_ called with constructor type "+typeof constructor+" which is not a function")}var dummy=createNamedFunction(constructor.name||"unknownFunctionName",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i0?", ":"")+argsListWired}invokerFnBody+=(returns?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i>2])}return array}function __embind_register_class_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,fn){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+"."+methodName;function unboundTypesHandler(){throwUnboundTypeError("Cannot call "+humanName+" due to unbound types",rawArgTypes)}if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}var proto=classType.registeredClass.constructor;if(undefined===proto[methodName]){unboundTypesHandler.argCount=argCount-1;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-1]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));var func=craftInvokerFunction(humanName,invokerArgsArray,null,rawInvoker,fn);if(undefined===proto[methodName].overloadTable){func.argCount=argCount-1;proto[methodName]=func}else{proto[methodName].overloadTable[argCount-1]=func}return[]});return[]})}function __embind_register_class_constructor(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor){assert(argCount>0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName="constructor "+classType.name;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError("Cannot register multiple constructors with identical number of parameters ("+(argCount-1)+") for class '"+classType.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!")}classType.registeredClass.constructor_body[argCount-1]=()=>{throwUnboundTypeError("Cannot construct "+classType.name+" due to unbound types",rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})}function __embind_register_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+"."+methodName;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError("Cannot call "+humanName+" due to unbound types",rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})}function validateThis(this_,classType,humanName){if(!(this_ instanceof Object)){throwBindingError(humanName+' with invalid "this": '+this_)}if(!(this_ instanceof classType.registeredClass.constructor)){throwBindingError(humanName+' incompatible with "this" of type '+this_.constructor.name)}if(!this_.$$.ptr){throwBindingError("cannot call emscripten binding method "+humanName+" on deleted object")}return upcastPointer(this_.$$.ptr,this_.$$.ptrType.registeredClass,classType.registeredClass)}function __embind_register_class_property(classType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){fieldName=readLatin1String(fieldName);getter=embind__requireFunction(getterSignature,getter);whenDependentTypesAreResolved([],[classType],function(classType){classType=classType[0];var humanName=classType.name+"."+fieldName;var desc={get:function(){throwUnboundTypeError("Cannot access "+humanName+" due to unbound types",[getterReturnType,setterArgumentType])},enumerable:true,configurable:true};if(setter){desc.set=()=>{throwUnboundTypeError("Cannot access "+humanName+" due to unbound types",[getterReturnType,setterArgumentType])}}else{desc.set=v=>{throwBindingError(humanName+" is a read-only property")}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);whenDependentTypesAreResolved([],setter?[getterReturnType,setterArgumentType]:[getterReturnType],function(types){var getterReturnType=types[0];var desc={get:function(){var ptr=validateThis(this,classType,humanName+" getter");return getterReturnType["fromWireType"](getter(getterContext,ptr))},enumerable:true};if(setter){setter=embind__requireFunction(setterSignature,setter);var setterArgumentType=types[1];desc.set=function(v){var ptr=validateThis(this,classType,humanName+" setter");var destructors=[];setter(setterContext,ptr,setterArgumentType["toWireType"](destructors,v));runDestructors(destructors)}}Object.defineProperty(classType.registeredClass.instancePrototype,fieldName,desc);return[]});return[]})}var emval_free_list=[];var emval_handle_array=[{},{value:undefined},{value:null},{value:true},{value:false}];function __emval_decref(handle){if(handle>4&&0===--emval_handle_array[handle].refcount){emval_handle_array[handle]=undefined;emval_free_list.push(handle)}}function count_emval_handles(){var count=0;for(var i=5;i{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handle_array[handle].value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{var handle=emval_free_list.length?emval_free_list.pop():emval_handle_array.length;emval_handle_array[handle]={refcount:1,value:value};return handle}}}};function __embind_register_emval(rawType,name){name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(handle){var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":function(destructors,value){return Emval.toHandle(value)},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})}function enumReadValueFromPointer(name,shift,signed){switch(shift){case 0:return function(pointer){var heap=signed?HEAP8:HEAPU8;return this["fromWireType"](heap[pointer])};case 1:return function(pointer){var heap=signed?HEAP16:HEAPU16;return this["fromWireType"](heap[pointer>>1])};case 2:return function(pointer){var heap=signed?HEAP32:HEAPU32;return this["fromWireType"](heap[pointer>>2])};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_enum(rawType,name,size,isSigned){var shift=getShiftFromSize(size);name=readLatin1String(name);function ctor(){}ctor.values={};registerType(rawType,{name:name,constructor:ctor,"fromWireType":function(c){return this.constructor.values[c]},"toWireType":function(destructors,c){return c.value},"argPackAdvance":8,"readValueFromPointer":enumReadValueFromPointer(name,shift,isSigned),destructorFunction:null});exposePublicSymbol(name,ctor)}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl}function __embind_register_enum_value(rawEnumType,name,enumValue){var enumType=requireRegisteredType(rawEnumType,"enum");name=readLatin1String(name);var Enum=enumType.constructor;var Value=Object.create(enumType.constructor.prototype,{value:{value:enumValue},constructor:{value:createNamedFunction(enumType.name+"_"+name,function(){})}});Enum.values[enumValue]=Value;Enum[name]=Value}function embindRepr(v){if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 3:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError("Unknown float type: "+name)}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(value){return value},"toWireType":function(destructors,value){return value},"argPackAdvance":8,"readValueFromPointer":floatReadValueFromPointer(name,shift),destructorFunction:null})}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer]}:function readU8FromPointer(pointer){return HEAPU8[pointer]};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>1]}:function readU16FromPointer(pointer){return HEAPU16[pointer>>1]};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>2]}:function readU32FromPointer(pointer){return HEAPU32[pointer>>2]};default:throw new TypeError("Unknown integer type: "+name)}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var shift=getShiftFromSize(size);var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":8,"readValueFromPointer":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null})}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle];var data=heap[handle+1];return new TA(heap.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":8,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str}function stringToUTF16(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr}function lengthBytesUTF16(str){return str.length*2}function UTF32ToString(ptr,maxBytesToRead){var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str}function stringToUTF32(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr}function lengthBytesUTF32(str){var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len}function __embind_register_std_wstring(rawType,charSize,name){name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,"fromWireType":function(value){var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":function(destructors,value){if(!(typeof value=="string")){throwBindingError("Cannot pass non-string to C++ string type "+name)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function(ptr){_free(ptr)}})}function __embind_register_value_array(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){tupleRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),elements:[]}}function __embind_register_value_array_element(rawTupleType,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){tupleRegistrations[rawTupleType].elements.push({getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext})}function __embind_register_value_object(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){structRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),fields:[]}}function __embind_register_value_object_field(structType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){structRegistrations[structType].fields.push({fieldName:readLatin1String(fieldName),getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext})}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":function(){return undefined},"toWireType":function(destructors,o){return undefined}})}function __emval_as(handle,returnType,destructorsRef){handle=Emval.toValue(handle);returnType=requireRegisteredType(returnType,"emval::as");var destructors=[];var rd=Emval.toHandle(destructors);HEAPU32[destructorsRef>>2]=rd;return returnType["toWireType"](destructors,handle)}function emval_allocateDestructors(destructorsRef){var destructors=[];HEAPU32[destructorsRef>>2]=Emval.toHandle(destructors);return destructors}var emval_symbols={};function getStringOrSymbol(address){var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}return symbol}var emval_methodCallers=[];function __emval_call_method(caller,handle,methodName,destructorsRef,args){caller=emval_methodCallers[caller];handle=Emval.toValue(handle);methodName=getStringOrSymbol(methodName);return caller(handle,methodName,emval_allocateDestructors(destructorsRef),args)}function __emval_call_void_method(caller,handle,methodName,args){caller=emval_methodCallers[caller];handle=Emval.toValue(handle);methodName=getStringOrSymbol(methodName);caller(handle,methodName,null,args)}function __emval_equals(first,second){first=Emval.toValue(first);second=Emval.toValue(second);return first==second}function emval_get_global(){if(typeof globalThis=="object"){return globalThis}return function(){return Function}()("return this")()}function __emval_get_global(name){if(name===0){return Emval.toHandle(emval_get_global())}else{name=getStringOrSymbol(name);return Emval.toHandle(emval_get_global()[name])}}function emval_addMethodCaller(caller){var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id}function emval_lookupTypes(argCount,argTypes){var a=new Array(argCount);for(var i=0;i>2],"parameter "+i)}return a}var emval_registeredMethods=[];function __emval_get_method_caller(argCount,argTypes){var types=emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+"_$"+types.slice(1).map(function(t){return t.name}).join("_")+"$";var returnId=emval_registeredMethods[signatureName];if(returnId!==undefined){return returnId}var params=["retType"];var args=[retType];var argsList="";for(var i=0;i4){emval_handle_array[handle].refcount+=1}}function __emval_instanceof(object,constructor){object=Emval.toValue(object);constructor=Emval.toValue(constructor);return object instanceof constructor}function __emval_is_number(handle){handle=Emval.toValue(handle);return typeof handle=="number"}function __emval_is_string(handle){handle=Emval.toValue(handle);return typeof handle=="string"}function craftEmvalAllocator(argCount){var argsList="";for(var i=0;iHEAPU32;var functionBody="return function emval_allocator_"+argCount+"(constructor, argTypes, args) {\n"+" var HEAPU32 = getMemory();\n";for(var i=0;i>2)], 'parameter "+i+"');\n"+"var arg"+i+" = argType"+i+".readValueFromPointer(args);\n"+"args += argType"+i+"['argPackAdvance'];\n"+"argTypes += 4;\n"}functionBody+="var obj = new constructor("+argsList+");\n"+"return valueToHandle(obj);\n"+"}\n";return new Function("requireRegisteredType","Module","valueToHandle","getMemory",functionBody)(requireRegisteredType,Module,Emval.toHandle,getMemory)}var emval_newers={};function __emval_new(handle,argCount,argTypes,args){handle=Emval.toValue(handle);var newer=emval_newers[argCount];if(!newer){newer=craftEmvalAllocator(argCount);emval_newers[argCount]=newer}return newer(handle,argTypes,args)}function __emval_new_array(){return Emval.toHandle([])}function __emval_new_cstring(v){return Emval.toHandle(getStringOrSymbol(v))}function __emval_new_object(){return Emval.toHandle({})}function __emval_run_destructors(handle){var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle)}function __emval_set_property(handle,key,value){handle=Emval.toValue(handle);key=Emval.toValue(key);value=Emval.toValue(value);handle[key]=value}function __emval_take_value(type,arg){type=requireRegisteredType(type,"_emval_take_value");var v=type["readValueFromPointer"](arg);return Emval.toHandle(v)}function readI53FromI64(ptr){return HEAPU32[ptr>>2]+HEAP32[ptr+4>>2]*4294967296}function __gmtime_js(time,tmPtr){var date=new Date(readI53FromI64(time)*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}var __MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var __MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];function __yday_from_date(date){var isLeapYear=__isLeapYear(date.getFullYear());var monthDaysCumulative=isLeapYear?__MONTH_DAYS_LEAP_CUMULATIVE:__MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday}function __localtime_js(time,tmPtr){var date=new Date(readI53FromI64(time)*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var yday=__yday_from_date(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst}function __mktime_js(tmPtr){var date=new Date(HEAP32[tmPtr+20>>2]+1900,HEAP32[tmPtr+16>>2],HEAP32[tmPtr+12>>2],HEAP32[tmPtr+8>>2],HEAP32[tmPtr+4>>2],HEAP32[tmPtr>>2],0);var dst=HEAP32[tmPtr+32>>2];var guessedOffset=date.getTimezoneOffset();var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dstOffset=Math.min(winterOffset,summerOffset);if(dst<0){HEAP32[tmPtr+32>>2]=Number(summerOffset!=winterOffset&&dstOffset==guessedOffset)}else if(dst>0!=(dstOffset==guessedOffset)){var nonDstOffset=Math.max(winterOffset,summerOffset);var trueOffset=dst>0?dstOffset:nonDstOffset;date.setTime(date.getTime()+(trueOffset-guessedOffset)*6e4)}HEAP32[tmPtr+24>>2]=date.getDay();var yday=__yday_from_date(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getYear();return date.getTime()/1e3|0}function allocateUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8Array(str,HEAP8,ret,size);return ret}function __tzset_js(timezone,daylight,tzname){var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=allocateUTF8(winterName);var summerNamePtr=allocateUTF8(summerName);if(summerOffset>2]=winterNamePtr;HEAPU32[tzname+4>>2]=summerNamePtr}else{HEAPU32[tzname>>2]=summerNamePtr;HEAPU32[tzname+4>>2]=winterNamePtr}}function _abort(){abort("")}function _emscripten_date_now(){return Date.now()}function getHeapMax(){return 2147483648}var _emscripten_get_now;if(ENVIRONMENT_IS_NODE){_emscripten_get_now=()=>{var t=process["hrtime"]();return t[0]*1e3+t[1]/1e6}}else _emscripten_get_now=()=>performance.now();function emscripten_realloc_buffer(size){var b=wasmMemory.buffer;try{wasmMemory.grow(size-b.byteLength+65535>>>16);updateMemoryViews();return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}let alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true}}return false}var ENV={};function getExecutableName(){return thisProgram||"./this.program"}function getEnvStrings(){if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(x+"="+env[x])}getEnvStrings.strings=strings}return getEnvStrings.strings}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1});return 0}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1});HEAPU32[penviron_buf_size>>2]=bufSize;return 0}function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function doReadv(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{var offset=convertI32PairToI53Checked(offset_low,offset_high);if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}function doWritev(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr}}return ret}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno}}var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.staticInit();InternalError=Module["InternalError"]=extendError(Error,"InternalError");embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");init_ClassHandle();init_embind();init_RegisteredPointer();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");init_emval();var asmLibraryArg={"v":___cxa_throw,"U":___syscall_connect,"ea":___syscall_faccessat,"o":___syscall_fcntl64,"Z":___syscall_fstat64,"S":___syscall_ftruncate64,"K":___syscall_ioctl,"W":___syscall_lstat64,"X":___syscall_newfstatat,"G":___syscall_openat,"F":___syscall_socket,"Y":___syscall_stat64,"r":__embind_finalize_value_array,"ka":__embind_finalize_value_object,"T":__embind_register_bigint,"ga":__embind_register_bool,"e":__embind_register_class,"f":__embind_register_class_class_function,"g":__embind_register_class_constructor,"b":__embind_register_class_function,"a":__embind_register_class_property,"fa":__embind_register_emval,"i":__embind_register_enum,"d":__embind_register_enum_value,"M":__embind_register_float,"p":__embind_register_integer,"l":__embind_register_memory_view,"L":__embind_register_std_string,"B":__embind_register_std_wstring,"q":__embind_register_value_array,"ia":__embind_register_value_array_element,"ja":__embind_register_value_object,"N":__embind_register_value_object_field,"ha":__embind_register_void,"t":__emval_as,"la":__emval_call_method,"P":__emval_call_void_method,"c":__emval_decref,"Q":__emval_equals,"y":__emval_get_global,"C":__emval_get_method_caller,"E":__emval_get_module_property,"w":__emval_get_property,"m":__emval_incref,"D":__emval_instanceof,"na":__emval_is_number,"ma":__emval_is_string,"O":__emval_new,"n":__emval_new_array,"u":__emval_new_cstring,"k":__emval_new_object,"s":__emval_run_destructors,"j":__emval_set_property,"h":__emval_take_value,"aa":__gmtime_js,"ba":__localtime_js,"ca":__mktime_js,"da":__tzset_js,"z":_abort,"I":_emscripten_date_now,"H":_emscripten_get_now,"V":_emscripten_resize_heap,"_":_environ_get,"$":_environ_sizes_get,"x":_fd_close,"J":_fd_read,"R":_fd_seek,"A":_fd_write};var asm=createWasm();var ___wasm_call_ctors=Module["___wasm_call_ctors"]=function(){return(___wasm_call_ctors=Module["___wasm_call_ctors"]=Module["asm"]["pa"]).apply(null,arguments)};var _malloc=Module["_malloc"]=function(){return(_malloc=Module["_malloc"]=Module["asm"]["ra"]).apply(null,arguments)};var _free=Module["_free"]=function(){return(_free=Module["_free"]=Module["asm"]["sa"]).apply(null,arguments)};var ___errno_location=Module["___errno_location"]=function(){return(___errno_location=Module["___errno_location"]=Module["asm"]["ta"]).apply(null,arguments)};var ___getTypeName=Module["___getTypeName"]=function(){return(___getTypeName=Module["___getTypeName"]=Module["asm"]["ua"]).apply(null,arguments)};var __embind_initialize_bindings=Module["__embind_initialize_bindings"]=function(){return(__embind_initialize_bindings=Module["__embind_initialize_bindings"]=Module["asm"]["va"]).apply(null,arguments)};var _htons=Module["_htons"]=function(){return(_htons=Module["_htons"]=Module["asm"]["wa"]).apply(null,arguments)};var _ntohs=Module["_ntohs"]=function(){return(_ntohs=Module["_ntohs"]=Module["asm"]["xa"]).apply(null,arguments)};var ___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=function(){return(___cxa_is_pointer_type=Module["___cxa_is_pointer_type"]=Module["asm"]["ya"]).apply(null,arguments)};var dynCall_ji=Module["dynCall_ji"]=function(){return(dynCall_ji=Module["dynCall_ji"]=Module["asm"]["za"]).apply(null,arguments)};var dynCall_vij=Module["dynCall_vij"]=function(){return(dynCall_vij=Module["dynCall_vij"]=Module["asm"]["Aa"]).apply(null,arguments)};var dynCall_jiji=Module["dynCall_jiji"]=function(){return(dynCall_jiji=Module["dynCall_jiji"]=Module["asm"]["Ba"]).apply(null,arguments)};var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); + + + return rhino3dm.ready +} +); +})(); +export default rhino3dm; \ No newline at end of file diff --git a/node_modules/three/examples/jsm/libs/rhino3dm/rhino3dm.wasm b/node_modules/three/examples/jsm/libs/rhino3dm/rhino3dm.wasm new file mode 100644 index 0000000..7b30579 Binary files /dev/null and b/node_modules/three/examples/jsm/libs/rhino3dm/rhino3dm.wasm differ diff --git a/node_modules/three/examples/jsm/libs/stats.module.js b/node_modules/three/examples/jsm/libs/stats.module.js new file mode 100644 index 0000000..0d372ba --- /dev/null +++ b/node_modules/three/examples/jsm/libs/stats.module.js @@ -0,0 +1,167 @@ +var Stats = function () { + + var mode = 0; + + var container = document.createElement( 'div' ); + container.style.cssText = 'position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000'; + container.addEventListener( 'click', function ( event ) { + + event.preventDefault(); + showPanel( ++ mode % container.children.length ); + + }, false ); + + // + + function addPanel( panel ) { + + container.appendChild( panel.dom ); + return panel; + + } + + function showPanel( id ) { + + for ( var i = 0; i < container.children.length; i ++ ) { + + container.children[ i ].style.display = i === id ? 'block' : 'none'; + + } + + mode = id; + + } + + // + + var beginTime = ( performance || Date ).now(), prevTime = beginTime, frames = 0; + + var fpsPanel = addPanel( new Stats.Panel( 'FPS', '#0ff', '#002' ) ); + var msPanel = addPanel( new Stats.Panel( 'MS', '#0f0', '#020' ) ); + + if ( self.performance && self.performance.memory ) { + + var memPanel = addPanel( new Stats.Panel( 'MB', '#f08', '#201' ) ); + + } + + showPanel( 0 ); + + return { + + REVISION: 16, + + dom: container, + + addPanel: addPanel, + showPanel: showPanel, + + begin: function () { + + beginTime = ( performance || Date ).now(); + + }, + + end: function () { + + frames ++; + + var time = ( performance || Date ).now(); + + msPanel.update( time - beginTime, 200 ); + + if ( time >= prevTime + 1000 ) { + + fpsPanel.update( ( frames * 1000 ) / ( time - prevTime ), 100 ); + + prevTime = time; + frames = 0; + + if ( memPanel ) { + + var memory = performance.memory; + memPanel.update( memory.usedJSHeapSize / 1048576, memory.jsHeapSizeLimit / 1048576 ); + + } + + } + + return time; + + }, + + update: function () { + + beginTime = this.end(); + + }, + + // Backwards Compatibility + + domElement: container, + setMode: showPanel + + }; + +}; + +Stats.Panel = function ( name, fg, bg ) { + + var min = Infinity, max = 0, round = Math.round; + var PR = round( window.devicePixelRatio || 1 ); + + var WIDTH = 80 * PR, HEIGHT = 48 * PR, + TEXT_X = 3 * PR, TEXT_Y = 2 * PR, + GRAPH_X = 3 * PR, GRAPH_Y = 15 * PR, + GRAPH_WIDTH = 74 * PR, GRAPH_HEIGHT = 30 * PR; + + var canvas = document.createElement( 'canvas' ); + canvas.width = WIDTH; + canvas.height = HEIGHT; + canvas.style.cssText = 'width:80px;height:48px'; + + var context = canvas.getContext( '2d' ); + context.font = 'bold ' + ( 9 * PR ) + 'px Helvetica,Arial,sans-serif'; + context.textBaseline = 'top'; + + context.fillStyle = bg; + context.fillRect( 0, 0, WIDTH, HEIGHT ); + + context.fillStyle = fg; + context.fillText( name, TEXT_X, TEXT_Y ); + context.fillRect( GRAPH_X, GRAPH_Y, GRAPH_WIDTH, GRAPH_HEIGHT ); + + context.fillStyle = bg; + context.globalAlpha = 0.9; + context.fillRect( GRAPH_X, GRAPH_Y, GRAPH_WIDTH, GRAPH_HEIGHT ); + + return { + + dom: canvas, + + update: function ( value, maxValue ) { + + min = Math.min( min, value ); + max = Math.max( max, value ); + + context.fillStyle = bg; + context.globalAlpha = 1; + context.fillRect( 0, 0, WIDTH, GRAPH_Y ); + context.fillStyle = fg; + context.fillText( round( value ) + ' ' + name + ' (' + round( min ) + '-' + round( max ) + ')', TEXT_X, TEXT_Y ); + + context.drawImage( canvas, GRAPH_X + PR, GRAPH_Y, GRAPH_WIDTH - PR, GRAPH_HEIGHT, GRAPH_X, GRAPH_Y, GRAPH_WIDTH - PR, GRAPH_HEIGHT ); + + context.fillRect( GRAPH_X + GRAPH_WIDTH - PR, GRAPH_Y, PR, GRAPH_HEIGHT ); + + context.fillStyle = bg; + context.globalAlpha = 0.9; + context.fillRect( GRAPH_X + GRAPH_WIDTH - PR, GRAPH_Y, PR, round( ( 1 - ( value / maxValue ) ) * GRAPH_HEIGHT ) ); + + } + + }; + +}; + +export default Stats; diff --git a/node_modules/three/examples/jsm/libs/surfaceNet.js b/node_modules/three/examples/jsm/libs/surfaceNet.js new file mode 100644 index 0000000..527c3ee --- /dev/null +++ b/node_modules/three/examples/jsm/libs/surfaceNet.js @@ -0,0 +1,201 @@ +/** + * SurfaceNets in JavaScript + * + * Written by Mikola Lysenko (C) 2012 + * + * MIT License + * + * Based on: S.F. Gibson, 'Constrained Elastic Surface Nets'. (1998) MERL Tech Report. + * from https://github.com/mikolalysenko/isosurface/tree/master + * + */ + +let surfaceNet = ( dims, potential, bounds ) => { + + + //Precompute edge table, like Paul Bourke does. + // This saves a bit of time when computing the centroid of each boundary cell + var cube_edges = new Int32Array(24) , edge_table = new Int32Array(256); + (function() { + + //Initialize the cube_edges table + // This is just the vertex number of each cube + var k = 0; + for(var i=0; i<8; ++i) { + for(var j=1; j<=4; j<<=1) { + var p = i^j; + if(i <= p) { + cube_edges[k++] = i; + cube_edges[k++] = p; + } + } + } + + //Initialize the intersection table. + // This is a 2^(cube configuration) -> 2^(edge configuration) map + // There is one entry for each possible cube configuration, and the output is a 12-bit vector enumerating all edges crossing the 0-level. + for(var i=0; i<256; ++i) { + var em = 0; + for(var j=0; j<24; j+=2) { + var a = !!(i & (1<> 1)) : 0; + } + edge_table[i] = em; + } + })(); + + //Internal buffer, this may get resized at run time + var buffer = new Array(4096); + (function() { + for(var i=0; i buffer.length) { + var ol = buffer.length; + buffer.length = R[2] * 2; + while(ol < buffer.length) { + buffer[ol++] = 0; + } + } + + //March over the voxel grid + for(x[2]=0; x[2] 1e-6) { + t = g0 / t; + } else { + continue; + } + + //Interpolate vertices and add up intersections (this can be done without multiplying) + for(var j=0, k=1; j<3; ++j, k<<=1) { + var a = e0 & k + , b = e1 & k; + if(a !== b) { + v[j] += a ? 1.0 - t : t; + } else { + v[j] += a ? 1.0 : 0; + } + } + } + + //Now we just average the edge intersections and add them to coordinate + var s = 1.0 / e_count; + for(var i=0; i<3; ++i) { + v[i] = scale[i] * (x[i] + s * v[i]) + shift[i]; + } + + //Add vertex to buffer, store pointer to vertex index in buffer + buffer[m] = vertices.length; + vertices.push(v); + + //Now we need to add faces together, to do this we just loop over 3 basis components + for(var i=0; i<3; ++i) { + //The first three entries of the edge_mask count the crossings along the edge + if(!(edge_mask & (1< 10000 ? 10000 : power; + return { + In: function (amount) { + return Math.pow(amount, power); + }, + Out: function (amount) { + return 1 - Math.pow((1 - amount), power); + }, + InOut: function (amount) { + if (amount < 0.5) { + return Math.pow((amount * 2), power) / 2; + } + return (1 - Math.pow((2 - amount * 2), power)) / 2 + 0.5; + }, + }; + }, +}); + +var now = function () { return performance.now(); }; + +/** + * Controlling groups of tweens + * + * Using the TWEEN singleton to manage your tweens can cause issues in large apps with many components. + * In these cases, you may want to create your own smaller groups of tween + */ +var Group = /** @class */ (function () { + function Group() { + this._tweens = {}; + this._tweensAddedDuringUpdate = {}; + } + Group.prototype.getAll = function () { + var _this = this; + return Object.keys(this._tweens).map(function (tweenId) { + return _this._tweens[tweenId]; + }); + }; + Group.prototype.removeAll = function () { + this._tweens = {}; + }; + Group.prototype.add = function (tween) { + this._tweens[tween.getId()] = tween; + this._tweensAddedDuringUpdate[tween.getId()] = tween; + }; + Group.prototype.remove = function (tween) { + delete this._tweens[tween.getId()]; + delete this._tweensAddedDuringUpdate[tween.getId()]; + }; + Group.prototype.update = function (time, preserve) { + if (time === void 0) { time = now(); } + if (preserve === void 0) { preserve = false; } + var tweenIds = Object.keys(this._tweens); + if (tweenIds.length === 0) { + return false; + } + // Tweens are updated in "batches". If you add a new tween during an + // update, then the new tween will be updated in the next batch. + // If you remove a tween during an update, it may or may not be updated. + // However, if the removed tween was added during the current batch, + // then it will not be updated. + while (tweenIds.length > 0) { + this._tweensAddedDuringUpdate = {}; + for (var i = 0; i < tweenIds.length; i++) { + var tween = this._tweens[tweenIds[i]]; + var autoStart = !preserve; + if (tween && tween.update(time, autoStart) === false && !preserve) { + delete this._tweens[tweenIds[i]]; + } + } + tweenIds = Object.keys(this._tweensAddedDuringUpdate); + } + return true; + }; + return Group; +}()); + +/** + * + */ +var Interpolation = { + Linear: function (v, k) { + var m = v.length - 1; + var f = m * k; + var i = Math.floor(f); + var fn = Interpolation.Utils.Linear; + if (k < 0) { + return fn(v[0], v[1], f); + } + if (k > 1) { + return fn(v[m], v[m - 1], m - f); + } + return fn(v[i], v[i + 1 > m ? m : i + 1], f - i); + }, + Bezier: function (v, k) { + var b = 0; + var n = v.length - 1; + var pw = Math.pow; + var bn = Interpolation.Utils.Bernstein; + for (var i = 0; i <= n; i++) { + b += pw(1 - k, n - i) * pw(k, i) * v[i] * bn(n, i); + } + return b; + }, + CatmullRom: function (v, k) { + var m = v.length - 1; + var f = m * k; + var i = Math.floor(f); + var fn = Interpolation.Utils.CatmullRom; + if (v[0] === v[m]) { + if (k < 0) { + i = Math.floor((f = m * (1 + k))); + } + return fn(v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m], f - i); + } + else { + if (k < 0) { + return v[0] - (fn(v[0], v[0], v[1], v[1], -f) - v[0]); + } + if (k > 1) { + return v[m] - (fn(v[m], v[m], v[m - 1], v[m - 1], f - m) - v[m]); + } + return fn(v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2], f - i); + } + }, + Utils: { + Linear: function (p0, p1, t) { + return (p1 - p0) * t + p0; + }, + Bernstein: function (n, i) { + var fc = Interpolation.Utils.Factorial; + return fc(n) / fc(i) / fc(n - i); + }, + Factorial: (function () { + var a = [1]; + return function (n) { + var s = 1; + if (a[n]) { + return a[n]; + } + for (var i = n; i > 1; i--) { + s *= i; + } + a[n] = s; + return s; + }; + })(), + CatmullRom: function (p0, p1, p2, p3, t) { + var v0 = (p2 - p0) * 0.5; + var v1 = (p3 - p1) * 0.5; + var t2 = t * t; + var t3 = t * t2; + return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1; + }, + }, +}; + +/** + * Utils + */ +var Sequence = /** @class */ (function () { + function Sequence() { + } + Sequence.nextId = function () { + return Sequence._nextId++; + }; + Sequence._nextId = 0; + return Sequence; +}()); + +var mainGroup = new Group(); + +/** + * Tween.js - Licensed under the MIT license + * https://github.com/tweenjs/tween.js + * ---------------------------------------------- + * + * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors. + * Thank you all, you're awesome! + */ +var Tween = /** @class */ (function () { + function Tween(_object, _group) { + if (_group === void 0) { _group = mainGroup; } + this._object = _object; + this._group = _group; + this._isPaused = false; + this._pauseStart = 0; + this._valuesStart = {}; + this._valuesEnd = {}; + this._valuesStartRepeat = {}; + this._duration = 1000; + this._isDynamic = false; + this._initialRepeat = 0; + this._repeat = 0; + this._yoyo = false; + this._isPlaying = false; + this._reversed = false; + this._delayTime = 0; + this._startTime = 0; + this._easingFunction = Easing.Linear.None; + this._interpolationFunction = Interpolation.Linear; + // eslint-disable-next-line + this._chainedTweens = []; + this._onStartCallbackFired = false; + this._onEveryStartCallbackFired = false; + this._id = Sequence.nextId(); + this._isChainStopped = false; + this._propertiesAreSetUp = false; + this._goToEnd = false; + } + Tween.prototype.getId = function () { + return this._id; + }; + Tween.prototype.isPlaying = function () { + return this._isPlaying; + }; + Tween.prototype.isPaused = function () { + return this._isPaused; + }; + Tween.prototype.getDuration = function () { + return this._duration; + }; + Tween.prototype.to = function (target, duration) { + if (duration === void 0) { duration = 1000; } + if (this._isPlaying) + throw new Error('Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.'); + this._valuesEnd = target; + this._propertiesAreSetUp = false; + this._duration = duration < 0 ? 0 : duration; + return this; + }; + Tween.prototype.duration = function (duration) { + if (duration === void 0) { duration = 1000; } + this._duration = duration < 0 ? 0 : duration; + return this; + }; + Tween.prototype.dynamic = function (dynamic) { + if (dynamic === void 0) { dynamic = false; } + this._isDynamic = dynamic; + return this; + }; + Tween.prototype.start = function (time, overrideStartingValues) { + if (time === void 0) { time = now(); } + if (overrideStartingValues === void 0) { overrideStartingValues = false; } + if (this._isPlaying) { + return this; + } + // eslint-disable-next-line + this._group && this._group.add(this); + this._repeat = this._initialRepeat; + if (this._reversed) { + // If we were reversed (f.e. using the yoyo feature) then we need to + // flip the tween direction back to forward. + this._reversed = false; + for (var property in this._valuesStartRepeat) { + this._swapEndStartRepeatValues(property); + this._valuesStart[property] = this._valuesStartRepeat[property]; + } + } + this._isPlaying = true; + this._isPaused = false; + this._onStartCallbackFired = false; + this._onEveryStartCallbackFired = false; + this._isChainStopped = false; + this._startTime = time; + this._startTime += this._delayTime; + if (!this._propertiesAreSetUp || overrideStartingValues) { + this._propertiesAreSetUp = true; + // If dynamic is not enabled, clone the end values instead of using the passed-in end values. + if (!this._isDynamic) { + var tmp = {}; + for (var prop in this._valuesEnd) + tmp[prop] = this._valuesEnd[prop]; + this._valuesEnd = tmp; + } + this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat, overrideStartingValues); + } + return this; + }; + Tween.prototype.startFromCurrentValues = function (time) { + return this.start(time, true); + }; + Tween.prototype._setupProperties = function (_object, _valuesStart, _valuesEnd, _valuesStartRepeat, overrideStartingValues) { + for (var property in _valuesEnd) { + var startValue = _object[property]; + var startValueIsArray = Array.isArray(startValue); + var propType = startValueIsArray ? 'array' : typeof startValue; + var isInterpolationList = !startValueIsArray && Array.isArray(_valuesEnd[property]); + // If `to()` specifies a property that doesn't exist in the source object, + // we should not set that property in the object + if (propType === 'undefined' || propType === 'function') { + continue; + } + // Check if an Array was provided as property value + if (isInterpolationList) { + var endValues = _valuesEnd[property]; + if (endValues.length === 0) { + continue; + } + // Handle an array of relative values. + // Creates a local copy of the Array with the start value at the front + var temp = [startValue]; + for (var i = 0, l = endValues.length; i < l; i += 1) { + var value = this._handleRelativeValue(startValue, endValues[i]); + if (isNaN(value)) { + isInterpolationList = false; + console.warn('Found invalid interpolation list. Skipping.'); + break; + } + temp.push(value); + } + if (isInterpolationList) { + // if (_valuesStart[property] === undefined) { // handle end values only the first time. NOT NEEDED? setupProperties is now guarded by _propertiesAreSetUp. + _valuesEnd[property] = temp; + // } + } + } + // handle the deepness of the values + if ((propType === 'object' || startValueIsArray) && startValue && !isInterpolationList) { + _valuesStart[property] = startValueIsArray ? [] : {}; + var nestedObject = startValue; + for (var prop in nestedObject) { + _valuesStart[property][prop] = nestedObject[prop]; + } + // TODO? repeat nested values? And yoyo? And array values? + _valuesStartRepeat[property] = startValueIsArray ? [] : {}; + var endValues = _valuesEnd[property]; + // If dynamic is not enabled, clone the end values instead of using the passed-in end values. + if (!this._isDynamic) { + var tmp = {}; + for (var prop in endValues) + tmp[prop] = endValues[prop]; + _valuesEnd[property] = endValues = tmp; + } + this._setupProperties(nestedObject, _valuesStart[property], endValues, _valuesStartRepeat[property], overrideStartingValues); + } + else { + // Save the starting value, but only once unless override is requested. + if (typeof _valuesStart[property] === 'undefined' || overrideStartingValues) { + _valuesStart[property] = startValue; + } + if (!startValueIsArray) { + // eslint-disable-next-line + // @ts-ignore FIXME? + _valuesStart[property] *= 1.0; // Ensures we're using numbers, not strings + } + if (isInterpolationList) { + // eslint-disable-next-line + // @ts-ignore FIXME? + _valuesStartRepeat[property] = _valuesEnd[property].slice().reverse(); + } + else { + _valuesStartRepeat[property] = _valuesStart[property] || 0; + } + } + } + }; + Tween.prototype.stop = function () { + if (!this._isChainStopped) { + this._isChainStopped = true; + this.stopChainedTweens(); + } + if (!this._isPlaying) { + return this; + } + // eslint-disable-next-line + this._group && this._group.remove(this); + this._isPlaying = false; + this._isPaused = false; + if (this._onStopCallback) { + this._onStopCallback(this._object); + } + return this; + }; + Tween.prototype.end = function () { + this._goToEnd = true; + this.update(Infinity); + return this; + }; + Tween.prototype.pause = function (time) { + if (time === void 0) { time = now(); } + if (this._isPaused || !this._isPlaying) { + return this; + } + this._isPaused = true; + this._pauseStart = time; + // eslint-disable-next-line + this._group && this._group.remove(this); + return this; + }; + Tween.prototype.resume = function (time) { + if (time === void 0) { time = now(); } + if (!this._isPaused || !this._isPlaying) { + return this; + } + this._isPaused = false; + this._startTime += time - this._pauseStart; + this._pauseStart = 0; + // eslint-disable-next-line + this._group && this._group.add(this); + return this; + }; + Tween.prototype.stopChainedTweens = function () { + for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) { + this._chainedTweens[i].stop(); + } + return this; + }; + Tween.prototype.group = function (group) { + if (group === void 0) { group = mainGroup; } + this._group = group; + return this; + }; + Tween.prototype.delay = function (amount) { + if (amount === void 0) { amount = 0; } + this._delayTime = amount; + return this; + }; + Tween.prototype.repeat = function (times) { + if (times === void 0) { times = 0; } + this._initialRepeat = times; + this._repeat = times; + return this; + }; + Tween.prototype.repeatDelay = function (amount) { + this._repeatDelayTime = amount; + return this; + }; + Tween.prototype.yoyo = function (yoyo) { + if (yoyo === void 0) { yoyo = false; } + this._yoyo = yoyo; + return this; + }; + Tween.prototype.easing = function (easingFunction) { + if (easingFunction === void 0) { easingFunction = Easing.Linear.None; } + this._easingFunction = easingFunction; + return this; + }; + Tween.prototype.interpolation = function (interpolationFunction) { + if (interpolationFunction === void 0) { interpolationFunction = Interpolation.Linear; } + this._interpolationFunction = interpolationFunction; + return this; + }; + // eslint-disable-next-line + Tween.prototype.chain = function () { + var tweens = []; + for (var _i = 0; _i < arguments.length; _i++) { + tweens[_i] = arguments[_i]; + } + this._chainedTweens = tweens; + return this; + }; + Tween.prototype.onStart = function (callback) { + this._onStartCallback = callback; + return this; + }; + Tween.prototype.onEveryStart = function (callback) { + this._onEveryStartCallback = callback; + return this; + }; + Tween.prototype.onUpdate = function (callback) { + this._onUpdateCallback = callback; + return this; + }; + Tween.prototype.onRepeat = function (callback) { + this._onRepeatCallback = callback; + return this; + }; + Tween.prototype.onComplete = function (callback) { + this._onCompleteCallback = callback; + return this; + }; + Tween.prototype.onStop = function (callback) { + this._onStopCallback = callback; + return this; + }; + /** + * @returns true if the tween is still playing after the update, false + * otherwise (calling update on a paused tween still returns true because + * it is still playing, just paused). + */ + Tween.prototype.update = function (time, autoStart) { + var _this = this; + var _a; + if (time === void 0) { time = now(); } + if (autoStart === void 0) { autoStart = true; } + if (this._isPaused) + return true; + var property; + var endTime = this._startTime + this._duration; + if (!this._goToEnd && !this._isPlaying) { + if (time > endTime) + return false; + if (autoStart) + this.start(time, true); + } + this._goToEnd = false; + if (time < this._startTime) { + return true; + } + if (this._onStartCallbackFired === false) { + if (this._onStartCallback) { + this._onStartCallback(this._object); + } + this._onStartCallbackFired = true; + } + if (this._onEveryStartCallbackFired === false) { + if (this._onEveryStartCallback) { + this._onEveryStartCallback(this._object); + } + this._onEveryStartCallbackFired = true; + } + var elapsedTime = time - this._startTime; + var durationAndDelay = this._duration + ((_a = this._repeatDelayTime) !== null && _a !== void 0 ? _a : this._delayTime); + var totalTime = this._duration + this._repeat * durationAndDelay; + var calculateElapsedPortion = function () { + if (_this._duration === 0) + return 1; + if (elapsedTime > totalTime) { + return 1; + } + var timesRepeated = Math.trunc(elapsedTime / durationAndDelay); + var timeIntoCurrentRepeat = elapsedTime - timesRepeated * durationAndDelay; + // TODO use %? + // const timeIntoCurrentRepeat = elapsedTime % durationAndDelay + var portion = Math.min(timeIntoCurrentRepeat / _this._duration, 1); + if (portion === 0 && elapsedTime === _this._duration) { + return 1; + } + return portion; + }; + var elapsed = calculateElapsedPortion(); + var value = this._easingFunction(elapsed); + // properties transformations + this._updateProperties(this._object, this._valuesStart, this._valuesEnd, value); + if (this._onUpdateCallback) { + this._onUpdateCallback(this._object, elapsed); + } + if (this._duration === 0 || elapsedTime >= this._duration) { + if (this._repeat > 0) { + var completeCount = Math.min(Math.trunc((elapsedTime - this._duration) / durationAndDelay) + 1, this._repeat); + if (isFinite(this._repeat)) { + this._repeat -= completeCount; + } + // Reassign starting values, restart by making startTime = now + for (property in this._valuesStartRepeat) { + if (!this._yoyo && typeof this._valuesEnd[property] === 'string') { + this._valuesStartRepeat[property] = + // eslint-disable-next-line + // @ts-ignore FIXME? + this._valuesStartRepeat[property] + parseFloat(this._valuesEnd[property]); + } + if (this._yoyo) { + this._swapEndStartRepeatValues(property); + } + this._valuesStart[property] = this._valuesStartRepeat[property]; + } + if (this._yoyo) { + this._reversed = !this._reversed; + } + this._startTime += durationAndDelay * completeCount; + if (this._onRepeatCallback) { + this._onRepeatCallback(this._object); + } + this._onEveryStartCallbackFired = false; + return true; + } + else { + if (this._onCompleteCallback) { + this._onCompleteCallback(this._object); + } + for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) { + // Make the chained tweens start exactly at the time they should, + // even if the `update()` method was called way past the duration of the tween + this._chainedTweens[i].start(this._startTime + this._duration, false); + } + this._isPlaying = false; + return false; + } + } + return true; + }; + Tween.prototype._updateProperties = function (_object, _valuesStart, _valuesEnd, value) { + for (var property in _valuesEnd) { + // Don't update properties that do not exist in the source object + if (_valuesStart[property] === undefined) { + continue; + } + var start = _valuesStart[property] || 0; + var end = _valuesEnd[property]; + var startIsArray = Array.isArray(_object[property]); + var endIsArray = Array.isArray(end); + var isInterpolationList = !startIsArray && endIsArray; + if (isInterpolationList) { + _object[property] = this._interpolationFunction(end, value); + } + else if (typeof end === 'object' && end) { + // eslint-disable-next-line + // @ts-ignore FIXME? + this._updateProperties(_object[property], start, end, value); + } + else { + // Parses relative end values with start as base (e.g.: +10, -3) + end = this._handleRelativeValue(start, end); + // Protect against non numeric properties. + if (typeof end === 'number') { + // eslint-disable-next-line + // @ts-ignore FIXME? + _object[property] = start + (end - start) * value; + } + } + } + }; + Tween.prototype._handleRelativeValue = function (start, end) { + if (typeof end !== 'string') { + return end; + } + if (end.charAt(0) === '+' || end.charAt(0) === '-') { + return start + parseFloat(end); + } + return parseFloat(end); + }; + Tween.prototype._swapEndStartRepeatValues = function (property) { + var tmp = this._valuesStartRepeat[property]; + var endValue = this._valuesEnd[property]; + if (typeof endValue === 'string') { + this._valuesStartRepeat[property] = this._valuesStartRepeat[property] + parseFloat(endValue); + } + else { + this._valuesStartRepeat[property] = this._valuesEnd[property]; + } + this._valuesEnd[property] = tmp; + }; + return Tween; +}()); + +var VERSION = '23.1.1'; + +/** + * Tween.js - Licensed under the MIT license + * https://github.com/tweenjs/tween.js + * ---------------------------------------------- + * + * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors. + * Thank you all, you're awesome! + */ +var nextId = Sequence.nextId; +/** + * Controlling groups of tweens + * + * Using the TWEEN singleton to manage your tweens can cause issues in large apps with many components. + * In these cases, you may want to create your own smaller groups of tweens. + */ +var TWEEN = mainGroup; +// This is the best way to export things in a way that's compatible with both ES +// Modules and CommonJS, without build hacks, and so as not to break the +// existing API. +// https://github.com/rollup/rollup/issues/1961#issuecomment-423037881 +var getAll = TWEEN.getAll.bind(TWEEN); +var removeAll = TWEEN.removeAll.bind(TWEEN); +var add = TWEEN.add.bind(TWEEN); +var remove = TWEEN.remove.bind(TWEEN); +var update = TWEEN.update.bind(TWEEN); +var exports = { + Easing: Easing, + Group: Group, + Interpolation: Interpolation, + now: now, + Sequence: Sequence, + nextId: nextId, + Tween: Tween, + VERSION: VERSION, + getAll: getAll, + removeAll: removeAll, + add: add, + remove: remove, + update: update, +}; + +export { Easing, Group, Interpolation, Sequence, Tween, VERSION, add, exports as default, getAll, nextId, now, remove, removeAll, update }; diff --git a/node_modules/three/examples/jsm/libs/utif.module.js b/node_modules/three/examples/jsm/libs/utif.module.js new file mode 100644 index 0000000..9a655bd --- /dev/null +++ b/node_modules/three/examples/jsm/libs/utif.module.js @@ -0,0 +1,1665 @@ +var UTIF = {}; + +// Following lines add a JPEG decoder to UTIF.JpegDecoder +(function(){"use strict";var W=function a1(){function W(p){this.message="JPEG error: "+p}W.prototype=new Error;W.prototype.name="JpegError";W.constructor=W;return W}(),ak=function ag(){var p=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,ac=799,ah=3406,ao=2276,ar=1567,ai=3784,s=5793,ad=2896;function ak(Q){if(Q==null)Q={};if(Q.w==null)Q.w=-1;this.V=Q.n;this.N=Q.w}function a5(Q,h){var f=0,G=[],n,E,a=16,F;while(a>0&&!Q[a-1]){a--}G.push({children:[],index:0});var C=G[0];for(n=0;n0){C=G.pop()}C.index++;G.push(C);while(G.length<=n){G.push(F={children:[],index:0});C.children[C.index]=F.children;C=F}f++}if(n+10){V--;return J>>V&1}J=Q[h++];if(J===255){var I=Q[h++];if(I){if(I===220&&d){h+=2;var l=Z(Q,h);h+=2;if(l>0&&l!==f.s){throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data",l)}}else if(I===217){if(d){var M=q*8; +if(M>0&&M>>7}function u(I){var l=I;while(!0){l=l[Y()];switch(typeof l){case"number":return l;case"object":continue}throw new W("invalid huffman sequence")}}function m(I){var e=0;while(I>0){e=e<<1|Y();I--}return e}function j(I){if(I===1){return Y()===1?1:-1}var e=m(I);if(e>=1<>4;if(i===0){if(A<15){break}N+=16;continue}N+=A;var o=p[N];X.D[I+o]=j(i);N++}}function $(X,I){var l=u(X.J),M=l===0?0:j(l)<0){r--;return}var N=E,l=a;while(N<=l){var M=u(X.i),S=M&15,i=M>>4;if(S===0){if(i<15){r=m(i)+(1<>4;if(S===0){if(M<15){r=m(M)+(1<0){for(O=0;O0?"unexpected":"excessive";h=k.offset}if(k.M>=65488&&k.M<=65495){h+=2}else{break}}return h-z}function al(Q,h,f){var G=Q.$,n=Q.D,E,a,C,F,d,T,U,z,J,V,Y,u,m,j,v,$,b;if(!G){throw new W("missing required Quantization Table.")}for(var r=0;r<64;r+=8){J=n[h+r];V=n[h+r+1];Y=n[h+r+2];u=n[h+r+3];m=n[h+r+4];j=n[h+r+5];v=n[h+r+6];$=n[h+r+7];J*=G[r];if((V|Y|u|m|j|v|$)===0){b=s*J+512>>10;f[r]=b;f[r+1]=b;f[r+2]=b;f[r+3]=b;f[r+4]=b;f[r+5]=b;f[r+6]=b;f[r+7]=b;continue}V*=G[r+1];Y*=G[r+2];u*=G[r+3];m*=G[r+4];j*=G[r+5];v*=G[r+6];$*=G[r+7];E=s*J+128>>8;a=s*m+128>>8;C=Y;F=v;d=ad*(V-$)+128>>8;z=ad*(V+$)+128>>8; +T=u<<4;U=j<<4;E=E+a+1>>1;a=E-a;b=C*ai+F*ar+128>>8;C=C*ar-F*ai+128>>8;F=b;d=d+U+1>>1;U=d-U;z=z+T+1>>1;T=z-T;E=E+F+1>>1;F=E-F;a=a+C+1>>1;C=a-C;b=d*ao+z*ah+2048>>12;d=d*ah-z*ao+2048>>12;z=b;b=T*ac+U*t+2048>>12;T=T*t-U*ac+2048>>12;U=b;f[r]=E+z;f[r+7]=E-z;f[r+1]=a+U;f[r+6]=a-U;f[r+2]=C+T;f[r+5]=C-T;f[r+3]=F+d;f[r+4]=F-d}for(var P=0;P<8;++P){J=f[P];V=f[P+8];Y=f[P+16];u=f[P+24];m=f[P+32];j=f[P+40];v=f[P+48];$=f[P+56];if((V|Y|u|m|j|v|$)===0){b=s*J+8192>>14;if(b<-2040){b=0}else if(b>=2024){b=255}else{b=b+2056>>4}n[h+P]=b;n[h+P+8]=b;n[h+P+16]=b;n[h+P+24]=b;n[h+P+32]=b;n[h+P+40]=b;n[h+P+48]=b;n[h+P+56]=b;continue}E=s*J+2048>>12;a=s*m+2048>>12;C=Y;F=v;d=ad*(V-$)+2048>>12;z=ad*(V+$)+2048>>12;T=u;U=j;E=(E+a+1>>1)+4112;a=E-a;b=C*ai+F*ar+2048>>12;C=C*ar-F*ai+2048>>12;F=b;d=d+U+1>>1;U=d-U;z=z+T+1>>1;T=z-T;E=E+F+1>>1;F=E-F;a=a+C+1>>1;C=a-C;b=d*ao+z*ah+2048>>12;d=d*ah-z*ao+2048>>12;z=b; +b=T*ac+U*t+2048>>12;T=T*t-U*ac+2048>>12;U=b;J=E+z;$=E-z;V=a+U;v=a-U;Y=C+T;j=C-T;u=F+d;m=F-d;if(J<16){J=0}else if(J>=4080){J=255}else{J>>=4}if(V<16){V=0}else if(V>=4080){V=255}else{V>>=4}if(Y<16){Y=0}else if(Y>=4080){Y=255}else{Y>>=4}if(u<16){u=0}else if(u>=4080){u=255}else{u>>=4}if(m<16){m=0}else if(m>=4080){m=255}else{m>>=4}if(j<16){j=0}else if(j>=4080){j=255}else{j>>=4}if(v<16){v=0}else if(v>=4080){v=255}else{v>>=4}if($<16){$=0}else if($>=4080){$=255}else{$>>=4}n[h+P]=J; +n[h+P+8]=V;n[h+P+16]=Y;n[h+P+24]=u;n[h+P+32]=m;n[h+P+40]=j;n[h+P+48]=v;n[h+P+56]=$}}function a0(Q,h){var f=h.P,G=h.c,n=new Int16Array(64);for(var E=0;E=G){return null}var E=Z(Q,h);if(E>=65472&&E<=65534){return{u:null,M:E,offset:h}}var a=Z(Q,n);while(!(a>=65472&&a<=65534)){if(++n>=G){return null}a=Z(Q,n)}return{u:E.toString(16),M:a,offset:n}}ak.prototype={parse(Q,h){if(h==null)h={}; +var f=h.F,E=0,a=null,C=null,F,d,T=0;function G(){var o=Z(Q,E);E+=2;var B=E+o-2,V=an(Q,B,E);if(V&&V.u){B=V.offset}var ab=Q.subarray(E,B);E+=ab.length;return ab}function n(F){var o=Math.ceil(F.o/8/F.X),B=Math.ceil(F.s/8/F.B);for(var Y=0;Y>4===0){for(u=0;u<64;u++){b=p[u];P[b]=Q[E++]}}else if(r>>4===1){for(u=0;u<64;u++){b=p[u];P[b]=Z(Q,E);E+=2}}else{throw new W("DQT - invalid table spec")}U[r&15]=P}break;case 65472:case 65473:case 65474:if(F){throw new W("Only single frame JPEGs supported")}E+=2;F={};F.G=V===65473;F.Z=V===65474;F.precision=Q[E++];var D=Z(Q,E),a4,q=0,H=0;E+=2;F.s=f||D;F.o=Z(Q,E);E+=2;F.W=[];F._={};var a8=Q[E++];for(Y=0;Y>4,y=Q[E+1]&15;if(q>4===0?J:z)[_&15]=a5(N,K)}break;case 65501:E+=2;d=Z(Q,E);E+=2;break;case 65498:var x=++T===1&&!f,R;E+=2;var k=Q[E++],g=[];for(Y=0;Y>4];R.i=z[a6&15];g.push(R)}var I=Q[E++],l=Q[E++],M=Q[E++];try{var S=a7(Q,E,F,g,d,I,l,M>>4,M&15,x);E+=S}catch(ex){if(ex instanceof DNLMarkerError){return this.parse(Q,{F:ex.s})}else if(ex instanceof EOIMarkerError){break markerLoop}throw ex}break;case 65500:E+=4;break;case 65535:if(Q[E]!==255){E--}break;default:var i=an(Q,E-2,E-3);if(i&&i.u){E=i.offset;break}if(E>=Q.length-1){break markerLoop}throw new W("JpegImage.parse - unknown marker: "+V.toString(16))}V=Z(Q,E);E+=2}this.width=F.o;this.height=F.s;this.g=a;this.b=C;this.W=[];for(Y=0;Y>8)+P[J+1]}}}return v},get f(){if(this.b){return!!this.b.a}if(this.p===3){if(this.N===0){return!1}else if(this.W[0].index===82&&this.W[1].index===71&&this.W[2].index===66){return!1}return!0}if(this.N===1){return!0}return!1},z:function aj(Q){var h,f,G; +for(var n=0,E=Q.length;n4){throw new W("Unsupported color mode")}var E=this.Y(h,f,n);if(this.p===1&&G){var a=E.length,C=new Uint8ClampedArray(a*3),F=0;for(var d=0;d>24}function Z(p,t){return p[t]<<8|p[t+1]}function am(p,t){return(p[t]<<24|p[t+1]<<16|p[t+2]<<8|p[t+3])>>>0}UTIF.JpegDecoder=ak}()); + +//UTIF.JpegDecoder = PDFJS.JpegImage; + + +UTIF.encodeImage = function(rgba, w, h, metadata) +{ + var idf = { "t256":[w], "t257":[h], "t258":[8,8,8,8], "t259":[1], "t262":[2], "t273":[1000], // strips offset + "t277":[4], "t278":[h], /* rows per strip */ "t279":[w*h*4], // strip byte counts + "t282":[[72,1]], "t283":[[72,1]], "t284":[1], "t286":[[0,1]], "t287":[[0,1]], "t296":[1], "t305": ["Photopea (UTIF.js)"], "t338":[1] + }; + if (metadata) for (var i in metadata) idf[i] = metadata[i]; + + var prfx = new Uint8Array(UTIF.encode([idf])); + var img = new Uint8Array(rgba); + var data = new Uint8Array(1000+w*h*4); + for(var i=0; i probably not an image + img.isLE = id=="II"; + img.width = img["t256"][0]; //delete img["t256"]; + img.height = img["t257"][0]; //delete img["t257"]; + + var cmpr = img["t259"] ? img["t259"][0] : 1; //delete img["t259"]; + var fo = img["t266"] ? img["t266"][0] : 1; //delete img["t266"]; + if(img["t284"] && img["t284"][0]==2) log("PlanarConfiguration 2 should not be used!"); + if(cmpr==7 && img["t258"] && img["t258"].length>3) img["t258"]=img["t258"].slice(0,3); + + var spp = img["t277"]?img["t277"][0]:1; + var bps = img["t258"]?img["t258"][0]:1; + var bipp = bps*spp; // bits per pixel + /* + var bipp; // bits per pixel + if(img["t258"]) bipp = Math.min(32,img["t258"][0])*img["t258"].length; + else bipp = (img["t277"]?img["t277"][0]:1); + */ + // Some .NEF files have t258==14, even though they use 16 bits per pixel + if(cmpr==1 && img["t279"]!=null && img["t278"] && img["t262"][0]==32803) { + bipp = Math.round((img["t279"][0]*8)/(img.width*img["t278"][0])); + } + if(img["t50885"] && img["t50885"][0]==4) bipp = img["t258"][0]*3; // RAW_CANON_40D_SRAW_V103.CR2 + var bipl = Math.ceil(img.width*bipp/8)*8; + var soff = img["t273"]; if(soff==null || img["t322"]) soff = img["t324"]; + var bcnt = img["t279"]; if(cmpr==1 && soff.length==1) bcnt = [img.height*(bipl>>>3)]; if(bcnt==null || img["t322"]) bcnt = img["t325"]; + //bcnt[0] = Math.min(bcnt[0], data.length); // Hasselblad, "RAW_HASSELBLAD_H3D39II.3FR" + var bytes = new Uint8Array(img.height*(bipl>>>3)), bilen = 0; + + if(img["t322"]!=null) // tiled + { + var tw = img["t322"][0], th = img["t323"][0]; + var tx = Math.floor((img.width + tw - 1) / tw); + var ty = Math.floor((img.height + th - 1) / th); + var tbuff = new Uint8Array(Math.ceil(tw*th*bipp/8)|0); + console.log("====", tx,ty); + for(var y=0; y>>3, bpl = Math.ceil(bps*noc*w/8); + + // convert to Little Endian /* + if(bps==16 && !img.isLE && img["t33422"]==null) // not DNG + for(var y=0; y>>8)&255; + } + else if(noc==3) for(var j= 3; j> 3 ^ 0x3ff0; + return (buffer[byte] | buffer[byte + 1] << 8) >> (vpos & 7) & ~((-1) << bits); + } + } + // Raw Format 6 + function getBufferDataRW6(i) { + return buffer[vpos + 15 - i]; + } + function readPageRW6() { + bytes[0] = (getBufferDataRW6(0) << 6) | (getBufferDataRW6(1) >> 2); // 14 bit + bytes[1] = (((getBufferDataRW6(1) & 0x3) << 12) | (getBufferDataRW6(2) << 4) | (getBufferDataRW6(3) >> 4)) & 0x3fff; + bytes[2] = (getBufferDataRW6(3) >> 2) & 0x3; + bytes[3] = ((getBufferDataRW6(3) & 0x3) << 8) | getBufferDataRW6(4); + bytes[4] = (getBufferDataRW6(5) << 2) | (getBufferDataRW6(6) >> 6); + bytes[5] = ((getBufferDataRW6(6) & 0x3f) << 4) | (getBufferDataRW6(7) >> 4); + bytes[6] = (getBufferDataRW6(7) >> 2) & 0x3; + bytes[7] = ((getBufferDataRW6(7) & 0x3) << 8) | getBufferDataRW6(8); + bytes[8] = ((getBufferDataRW6(9) << 2) & 0x3fc) | (getBufferDataRW6(10) >> 6); + bytes[9] = ((getBufferDataRW6(10) << 4) | (getBufferDataRW6(11) >> 4)) & 0x3ff; + bytes[10] = (getBufferDataRW6(11) >> 2) & 0x3; + bytes[11] = ((getBufferDataRW6(11) & 0x3) << 8) | getBufferDataRW6(12); + bytes[12] = (((getBufferDataRW6(13) << 2) & 0x3fc) | getBufferDataRW6(14) >> 6) & 0x3ff; + bytes[13] = ((getBufferDataRW6(14) << 4) | (getBufferDataRW6(15) >> 4)) & 0x3ff; + vpos += 16; + byte = 0; + } + function readPageRw6_bps12() { + bytes[0] = (getBufferDataRW6(0) << 4) | (getBufferDataRW6(1) >> 4); + bytes[1] = (((getBufferDataRW6(1) & 0xf) << 8) | (getBufferDataRW6(2))) & 0xfff; + bytes[2] = (getBufferDataRW6(3) >> 6) & 0x3; + bytes[3] = ((getBufferDataRW6(3) & 0x3f) << 2) | (getBufferDataRW6(4) >> 6); + bytes[4] = ((getBufferDataRW6(4) & 0x3f) << 2) | (getBufferDataRW6(5) >> 6); + bytes[5] = ((getBufferDataRW6(5) & 0x3f) << 2) | (getBufferDataRW6(6) >> 6); + bytes[6] = (getBufferDataRW6(6) >> 4) & 0x3; + bytes[7] = ((getBufferDataRW6(6) & 0xf) << 4) | (getBufferDataRW6(7) >> 4); + bytes[8] = ((getBufferDataRW6(7) & 0xf) << 4) | (getBufferDataRW6(8) >> 4); + bytes[9] = ((getBufferDataRW6(8) & 0xf) << 4) | (getBufferDataRW6(9) >> 4); + bytes[10] = (getBufferDataRW6(9) >> 2) & 0x3; + bytes[11] = ((getBufferDataRW6(9) & 0x3) << 6) | (getBufferDataRW6(10) >> 2); + bytes[12] = ((getBufferDataRW6(10) & 0x3) << 6) | (getBufferDataRW6(11) >> 2); + bytes[13] = ((getBufferDataRW6(11) & 0x3) << 6) | (getBufferDataRW6(12) >> 2); + bytes[14] = getBufferDataRW6(12) & 0x3; + bytes[15] = getBufferDataRW6(13); + bytes[16] = getBufferDataRW6(14); + bytes[17] = getBufferDataRW6(15); + + vpos += 16; + byte = 0; + } + // Main loop + function resetPredNonzeros(){ + pred[0]=0; pred[1]=0; + nonz[0]=0; nonz[1]=0; + } + if (RW2_Format == 7) { + throw RW2_Format; + + // Skatch of version 7 + /* + var pixels_per_block = bitsPerSample == 14 ? 9 : 10; + rowbytes = 0|(rawWidth / pixels_per_block * 16); + for (row = 0; row < rawHeight - 15; row += 16) { + var rowstoread = Math.min(16, rawHeight - row); + var readlen = rowbytes*rowstoread; + buffer = new Uint8Array(image.slice(bidx, bidx+readlen)); + vpos = 0; + bidx += readlen; + i = 0; + for (crow = 0; crow < rowstoread; crow++) { + idx = (row + crow) * rawWidth; + for (col = 0; col <= rawWidth - pixels_per_block; col += pixels_per_block) { + for(j=0; j < pixels_per_block; j++) bytes[j] = buffer[i++]; + if (bitsPerSample == 12) { + result[idx ] = ((bytes[1] & 0xF) << 8) + bytes[0]; + result[idx + 1] = 16 * bytes[2] + (bytes[1] >> 4); + result[idx + 2] = ((bytes[4] & 0xF) << 8) + bytes[3]; + result[idx + 3] = 16 * bytes[5] + (bytes[4] >> 4); + result[idx + 4] = ((bytes[7] & 0xF) << 8) + bytes[6]; + result[idx + 5] = 16 * bytes[8] + (bytes[7] >> 4); + result[idx + 6] = ((bytes[10] & 0xF) << 8) + bytes[9]; + result[idx + 7] = 16 * bytes[11] + (bytes[10] >> 4); + result[idx + 8] = ((bytes[13] & 0xF) << 8) + bytes[12]; + result[idx + 9] = 16 * bytes[14] + (bytes[13] >> 4); + } else if (bitsPerSample == 14) { + result[idx] = bytes[0] + ((bytes[1] & 0x3F) << 8); + result[idx + 1] = (bytes[1] >> 6) + 4 * (bytes[2]) + ((bytes[3] & 0xF) << 10); + result[idx + 2] = (bytes[3] >> 4) + 16 * (bytes[4]) + ((bytes[5] & 3) << 12); + result[idx + 3] = ((bytes[5] & 0xFC) >> 2) + (bytes[6] << 6); + result[idx + 4] = bytes[7] + ((bytes[8] & 0x3F) << 8); + result[idx + 5] = (bytes[8] >> 6) + 4 * bytes[9] + ((bytes[10] & 0xF) << 10); + result[idx + 6] = (bytes[10] >> 4) + 16 * bytes[11] + ((bytes[12] & 3) << 12); + result[idx + 7] = ((bytes[12] & 0xFC) >> 2) + (bytes[13] << 6); + result[idx + 8] = bytes[14] + ((bytes[15] & 0x3F) << 8); + } + } + } + } + */ + } + else if(RW2_Format == 6) { + var is12bit = bitsPerSample == 12, + readPageRw6Fn = is12bit ? readPageRw6_bps12 : readPageRW6, + pixelsPerBlock = is12bit ? 14 : 11, + pixelbase0 = is12bit ? 0x80 : 0x200, + pixelbase_compare = is12bit ? 0x800 : 0x2000, + spix_compare = is12bit ? 0x3fff : 0xffff, + pixel_mask = is12bit ? 0xfff : 0x3fff, + blocksperrow = rawWidth / pixelsPerBlock, + rowbytes = blocksperrow * 16, + bufferSize = is12bit ? 18 : 14; + + for (row = 0; row < rawHeight - 15; row += 16) { + var rowstoread = Math.min(16, rawHeight - row); + var readlen = rowbytes*rowstoread; + buffer = new Uint8Array(img_buffer, off+bidx, readlen);//new Uint8Array(image.slice(bidx, bidx+readlen)); + vpos = 0; + bidx += readlen; + for (crow = 0, col = 0; crow < rowstoread; crow++, col = 0) { + idx = (row + crow) * rawWidth; + for (var rblock = 0; rblock < blocksperrow; rblock++) { + readPageRw6Fn(); + resetPredNonzeros(); + sh=0; pixel_base=0; + for (i = 0; i < pixelsPerBlock; i++){ + isOdd = i & 1; + if (i % 3 == 2) { + var base = byte < bufferSize ? bytes[byte++] : 0; + if (base == 3) base = 4; + pixel_base = pixelbase0 << base; + sh = 1 << base; + } + var epixel = byte < bufferSize ? bytes[byte++] : 0; + if (pred[isOdd]) { + epixel *= sh; + if (pixel_base < pixelbase_compare && nonz[isOdd] > pixel_base) + epixel += nonz[isOdd] - pixel_base; + nonz[isOdd] = epixel; + } else { + pred[isOdd] = epixel; + if (epixel) + nonz[isOdd] = epixel; + else + epixel = nonz[isOdd]; + } + result[idx + col++] = (epixel - 0xf) <= spix_compare ? (epixel - 0xf) & spix_compare : ((epixel + 0x7ffffff1) >> 0x1f) & pixel_mask; + } + } + } + } + } + else if (RW2_Format == 5) { + var blockSize = bitsPerSample == 12 ? 10 : 9; + for (row = 0; row < rawHeight; row++) { + for (col = 0; col < rawWidth; col+=blockSize) { + getDataRaw(0); + // Tuhle podminku pouziva i RW2_Format 7 + if (bitsPerSample == 12) { + result[idx++] = ((bytes[1] & 0xF) << 8) + bytes[0]; + result[idx++] = 16 * bytes[2] + (bytes[1] >> 4); + result[idx++] = ((bytes[4] & 0xF) << 8) + bytes[3]; + result[idx++] = 16 * bytes[5] + (bytes[4] >> 4); + result[idx++] = ((bytes[7] & 0xF) << 8) + bytes[6]; + result[idx++] = 16 * bytes[8] + (bytes[7] >> 4); + result[idx++] = ((bytes[10] & 0xF) << 8) + bytes[9]; + result[idx++] = 16 * bytes[11] + (bytes[10] >> 4); + result[idx++] = ((bytes[13] & 0xF) << 8) + bytes[12]; + result[idx++] = 16 * bytes[14] + (bytes[13] >> 4); + } else if (bitsPerSample == 14) { + result[idx++] = bytes[0] + ((bytes[1] & 0x3F) << 8); + result[idx++] = (bytes[1] >> 6) + 4 * (bytes[2]) + ((bytes[3] & 0xF) << 10); + result[idx++] = (bytes[3] >> 4) + 16 * (bytes[4]) + ((bytes[5] & 3) << 12); + result[idx++] = ((bytes[5] & 0xFC) >> 2) + (bytes[6] << 6); + result[idx++] = bytes[7] + ((bytes[8] & 0x3F) << 8); + result[idx++] = (bytes[8] >> 6) + 4 * bytes[9] + ((bytes[10] & 0xF) << 10); + result[idx++] = (bytes[10] >> 4) + 16 * bytes[11] + ((bytes[12] & 3) << 12); + result[idx++] = ((bytes[12] & 0xFC) >> 2) + (bytes[13] << 6); + result[idx++] = bytes[14] + ((bytes[15] & 0x3F) << 8); + } + } + } + //console.log(result[1000000 - 1]) + } else if(RW2_Format == 4) { + for (row = 0; row < rawHeight; row++){ + for(col = 0; col < rawWidth; col++){ + i = col % 14; + isOdd = i & 1; + if (i==0) resetPredNonzeros(); + if (i%3 == 2) + sh = 4 >> (3 - getDataRaw(2)); + if (nonz[isOdd]) { + j = getDataRaw(8); + if(j != 0){ + pred[isOdd] -= 0x80 << sh; + if (pred[isOdd] < 0 || sh == 4) + pred[isOdd] &= ~((-1) << sh); + pred[isOdd] += j << sh; + } + } else { + nonz[isOdd] = getDataRaw(8); + if(nonz[isOdd] || i > 11) + pred[isOdd] = nonz[isOdd] << 4 | getDataRaw(4); + } + result[idx++] = pred[col & 1]; + } + } + } + else throw RW2_Format; + } + + +UTIF.decode._decodeVC5 = function(){var x=[1,0,1,0,2,2,1,1,3,7,1,2,5,25,1,3,6,48,1,4,6,54,1,5,7,111,1,8,7,99,1,6,7,105,12,0,7,107,1,7,8,209,20,0,8,212,1,9,8,220,1,10,9,393,1,11,9,394,32,0,9,416,1,12,9,427,1,13,10,887,1,18,10,784,1,14,10,790,1,15,10,835,60,0,10,852,1,16,10,885,1,17,11,1571,1,19,11,1668,1,20,11,1669,100,0,11,1707,1,21,11,1772,1,22,12,3547,1,29,12,3164,1,24,12,3166,1,25,12,3140,1,23,12,3413,1,26,12,3537,1,27,12,3539,1,28,13,7093,1,35,13,6283,1,30,13,6331,1,31,13,6335,180,0,13,6824,1,32,13,7072,1,33,13,7077,320,0,13,7076,1,34,14,12565,1,36,14,12661,1,37,14,12669,1,38,14,13651,1,39,14,14184,1,40,15,28295,1,46,15,28371,1,47,15,25320,1,42,15,25336,1,43,15,25128,1,41,15,27300,1,44,15,28293,1,45,16,50259,1,48,16,50643,1,49,16,50675,1,50,16,56740,1,53,16,56584,1,51,16,56588,1,52,17,113483,1,61,17,113482,1,60,17,101285,1,55,17,101349,1,56,17,109205,1,57,17,109207,1,58,17,100516,1,54,17,113171,1,59,18,202568,1,62,18,202696,1,63,18,218408,1,64,18,218412,1,65,18,226340,1,66,18,226356,1,67,18,226358,1,68,19,402068,1,69,19,405138,1,70,19,405394,1,71,19,436818,1,72,19,436826,1,73,19,452714,1,75,19,452718,1,76,19,452682,1,74,20,804138,1,77,20,810279,1,78,20,810790,1,79,20,873638,1,80,20,873654,1,81,20,905366,1,82,20,905430,1,83,20,905438,1,84,21,1608278,1,85,21,1620557,1,86,21,1621582,1,87,21,1621583,1,88,21,1747310,1,89,21,1810734,1,90,21,1810735,1,91,21,1810863,1,92,21,1810879,1,93,22,3621725,1,99,22,3621757,1,100,22,3241112,1,94,22,3494556,1,95,22,3494557,1,96,22,3494622,1,97,22,3494623,1,98,23,6482227,1,102,23,6433117,1,101,23,6989117,1,103,23,6989119,1,105,23,6989118,1,104,23,7243449,1,106,23,7243512,1,107,24,13978233,1,111,24,12964453,1,109,24,12866232,1,108,24,14486897,1,113,24,13978232,1,110,24,14486896,1,112,24,14487026,1,114,24,14487027,1,115,25,25732598,1,225,25,25732597,1,189,25,25732596,1,188,25,25732595,1,203,25,25732594,1,202,25,25732593,1,197,25,25732592,1,207,25,25732591,1,169,25,25732590,1,223,25,25732589,1,159,25,25732522,1,235,25,25732579,1,152,25,25732575,1,192,25,25732489,1,179,25,25732573,1,201,25,25732472,1,172,25,25732576,1,149,25,25732488,1,178,25,25732566,1,120,25,25732571,1,219,25,25732577,1,150,25,25732487,1,127,25,25732506,1,211,25,25732548,1,125,25,25732588,1,158,25,25732486,1,247,25,25732467,1,238,25,25732508,1,163,25,25732552,1,228,25,25732603,1,183,25,25732513,1,217,25,25732587,1,168,25,25732520,1,122,25,25732484,1,128,25,25732562,1,249,25,25732505,1,187,25,25732504,1,186,25,25732483,1,136,25,25928905,1,181,25,25732560,1,255,25,25732500,1,230,25,25732482,1,135,25,25732555,1,233,25,25732568,1,222,25,25732583,1,145,25,25732481,1,134,25,25732586,1,167,25,25732521,1,248,25,25732518,1,209,25,25732480,1,243,25,25732512,1,216,25,25732509,1,164,25,25732547,1,140,25,25732479,1,157,25,25732544,1,239,25,25732574,1,191,25,25732564,1,251,25,25732478,1,156,25,25732546,1,139,25,25732498,1,242,25,25732557,1,133,25,25732477,1,162,25,25732515,1,213,25,25732584,1,165,25,25732514,1,212,25,25732476,1,227,25,25732494,1,198,25,25732531,1,236,25,25732530,1,234,25,25732529,1,117,25,25732528,1,215,25,25732527,1,124,25,25732526,1,123,25,25732525,1,254,25,25732524,1,253,25,25732523,1,148,25,25732570,1,218,25,25732580,1,146,25,25732581,1,147,25,25732569,1,224,25,25732533,1,143,25,25732540,1,184,25,25732541,1,185,25,25732585,1,166,25,25732556,1,132,25,25732485,1,129,25,25732563,1,250,25,25732578,1,151,25,25732501,1,119,25,25732502,1,193,25,25732536,1,176,25,25732496,1,245,25,25732553,1,229,25,25732516,1,206,25,25732582,1,144,25,25732517,1,208,25,25732558,1,137,25,25732543,1,241,25,25732466,1,237,25,25732507,1,190,25,25732542,1,240,25,25732551,1,131,25,25732554,1,232,25,25732565,1,252,25,25732475,1,171,25,25732493,1,205,25,25732492,1,204,25,25732491,1,118,25,25732490,1,214,25,25928904,1,180,25,25732549,1,126,25,25732602,1,182,25,25732539,1,175,25,25732545,1,141,25,25732559,1,138,25,25732537,1,177,25,25732534,1,153,25,25732503,1,194,25,25732606,1,160,25,25732567,1,121,25,25732538,1,174,25,25732497,1,246,25,25732550,1,130,25,25732572,1,200,25,25732474,1,170,25,25732511,1,221,25,25732601,1,196,25,25732532,1,142,25,25732519,1,210,25,25732495,1,199,25,25732605,1,155,25,25732535,1,154,25,25732499,1,244,25,25732510,1,220,25,25732600,1,195,25,25732607,1,161,25,25732604,1,231,25,25732473,1,173,25,25732599,1,226,26,51465122,1,116,26,51465123,0,1],o,C,k,P=[3,3,3,3,2,2,2,1,1,1],V=24576,ar=16384,H=8192,az=ar|H; +function d(t){var E=t[1],h=t[0][E>>>3]>>>7-(E&7)&1;t[1]++;return h}function ag(t,E){if(o==null){o={}; +for(var h=0;h>>1}return t}function A(t,E){return t>>E}function O(t,E,h,L,g,n){E[h]=A(A(11*t[g]-4*t[g+n]+t[g+n+n]+4,3)+t[L],1); +E[h+n]=A(A(5*t[g]+4*t[g+n]-t[g+n+n]+4,3)-t[L],1)}function J(t,E,h,L,g,n){var W=t[g-n]-t[g+n],j=t[g],$=t[L]; +E[h]=A(A(W+4,3)+j+$,1);E[h+n]=A(A(-W+4,3)+j-$,1)}function y(t,E,h,L,g,n){E[h]=A(A(5*t[g]+4*t[g-n]-t[g-n-n]+4,3)+t[L],1); +E[h+n]=A(A(11*t[g]-4*t[g-n]+t[g-n-n]+4,3)-t[L],1)}function q(t){t=t<0?0:t>4095?4095:t;t=k[t]>>>2;return t}function av(t,E,h,L,g,n){L=new Uint16Array(L.buffer); +var W=Date.now(),j=UTIF._binBE,$=E+h,r,u,X,I,ax,a3,R,ai,aa,ap,ah,ae,aD,al,i,aE,T,B;E+=4;var a5=n[0]==1; +while(E<$){var S=j.readShort(t,E),s=j.readUshort(t,E+2);E+=4;if(S==12)r=s;else if(S==20)u=s;else if(S==21)X=s; +else if(S==48)I=s;else if(S==53)ax=s;else if(S==35)a3=s;else if(S==62)R=s;else if(S==101)ai=s;else if(S==109)aa=s; +else if(S==84)ap=s;else if(S==106)ah=s;else if(S==107)ae=s;else if(S==108)aD=s;else if(S==102)al=s;else if(S==104)i=s; +else if(S==105)aE=s;else{var F=S<0?-S:S,D=F&65280,_=0;if(F&az){if(F&H){_=s&65535;_+=(F&255)<<16}else{_=s&65535}}if((F&V)==V){if(T==null){T=[]; +for(var M=0;M<4;M++)T[M]=new Int16Array((u>>>1)*(X>>>1));B=new Int16Array((u>>>1)*(X>>>1));C=new Int16Array(1024); +for(var M=0;M<1024;M++){var aG=M-512,p=Math.abs(aG),r=Math.floor(768*p*p*p/(255*255*255))+p;C[M]=Math.sign(aG)*r}k=new Uint16Array(4096); +var aA=(1<<16)-1;for(var M=0;M<4096;M++){var at=M,a1=aA*(Math.pow(113,at/4095)-1)/112;k[M]=Math.min(a1,aA)}}var w=T[R],v=m(u,1+P[I]),N=m(X,1+P[I]); +if(I==0){for(var b=0;b>>1)+G]=t[c]<<8|t[c+1]}}else{var a7=[t,E*8],a4=[],ay=0,aw=v*N,f=[0,0],Q=0,s=0; +while(ay0){a4[ay++]=s;Q--}}var l=(I-1)%3,aF=l!=1?v:0,a2=l!=0?N:0; +for(var b=0;b>>1)+aF,au=b*v;for(var G=0;G>>1,an=v*2,a9=N*2; +for(var b=0;b>14-K*2&3;var a6=aC[aB];if(a6!=0)for(var b=0;b>>1)*(u>>>1)+(G>>>1),z=a8[c],ao=ab[c]-2048,ak=aq[c]-2048,ad=as[c]-2048,aj=(ao<<1)+z,a0=(ak<<1)+z,aH=z+ad,am=z-ad; +if(a5){L[U]=q(aH);L[U+1]=q(a0);L[U+u]=q(aj);L[U+u+1]=q(am)}else{L[U]=q(aj);L[U+1]=q(aH);L[U+u]=q(am); +L[U+u+1]=q(a0)}}}E+=_*4}else if(F==16388){E+=_*4}else if(D==8192||D==8448||D==9216){}else throw F.toString(16)}}console.log(Date.now()-W)}return av}() + + + +UTIF.decode._decodeLogLuv32 = function(img, data, off, len, tgt, toff) { + var w = img.width, qw=w*4; + var io = 0, out = new Uint8Array(qw); + + while(io>> (tab[i] >>> 8); + for(var c=0; c>>4); tgt[toff+i+1]=(b0<<4)|(b2>>>4); tgt[toff+i+2]=(b2<<4)|(b1>>>4); } + return; + } + + var pix = new Uint16Array(16); + var row, col, val, max, min, imax, imin, sh, bit, i, dp; + + var data = new Uint8Array(raw_width+1); + for (row=0; row < height; row++) { + //fread (data, 1, raw_width, ifp); + for(var j=0; j>> 11); + imax = 0x0f & (val >>> 22); + imin = 0x0f & (val >>> 26); + for (sh=0; sh < 4 && 0x80 << sh <= max-min; sh++); + for (bit=30, i=0; i < 16; i++) + if (i == imax) pix[i] = max; + else if (i == imin) pix[i] = min; + else { + pix[i] = ((bin.readUshort(data, dp+(bit >> 3)) >>> (bit & 7) & 0x7f) << sh) + min; + if (pix[i] > 0x7ff) pix[i] = 0x7ff; + bit += 7; + } + for (i=0; i < 16; i++, col+=2) { + //RAW(row,col) = curve[pix[i] << 1] >> 2; + var clr = pix[i]<<1; //clr = 0xffff; + UTIF.decode._putsF(tgt, (row*raw_width+col)*tiff_bps, clr<<(16-tiff_bps)); + } + col -= col & 1 ? 1:31; + } + } +} + +UTIF.decode._decodeNikon = function(img,imgs, data, off, src_length, tgt, toff) +{ + var nikon_tree = [ + [ 0, 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0, /* 12-bit lossy */ + 5,4,3,6,2,7,1,0,8,9,11,10,12 ], + [ 0, 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0, /* 12-bit lossy after split */ + 0x39,0x5a,0x38,0x27,0x16,5,4,3,2,1,0,11,12,12 ], + [ 0, 0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0, /* 12-bit lossless */ + 5,4,6,3,7,2,8,1,9,0,10,11,12 ], + [ 0, 0,1,4,3,1,1,1,1,1,2,0,0,0,0,0,0, /* 14-bit lossy */ + 5,6,4,7,8,3,9,2,1,0,10,11,12,13,14 ], + [ 0, 0,1,5,1,1,1,1,1,1,1,2,0,0,0,0,0, /* 14-bit lossy after split */ + 8,0x5c,0x4b,0x3a,0x29,7,6,5,4,3,2,1,0,13,14 ], + [ 0, 0,1,4,2,2,3,1,2,0,0,0,0,0,0,0,0, /* 14-bit lossless */ + 7,6,8,5,9,4,10,3,11,12,2,0,1,13,14 ] ]; + + var raw_width = img["t256"][0], height=img["t257"][0], tiff_bps=img["t258"][0]; + + var tree = 0, split = 0; + var make_decoder = UTIF.decode._make_decoder; + var getbithuff = UTIF.decode._getbithuff; + + var mn = imgs[0].exifIFD.makerNote, md = mn["t150"]?mn["t150"]:mn["t140"], mdo=0; //console.log(mn,md); + //console.log(md[0].toString(16), md[1].toString(16), tiff_bps); + var ver0 = md[mdo++], ver1 = md[mdo++]; + if (ver0 == 0x49 || ver1 == 0x58) mdo+=2110; + if (ver0 == 0x46) tree = 2; + if (tiff_bps == 14) tree += 3; + + var vpred = [[0,0],[0,0]], bin=(img.isLE ? UTIF._binLE : UTIF._binBE); + for(var i=0; i<2; i++) for(var j=0; j<2; j++) { vpred[i][j] = bin.readShort(md,mdo); mdo+=2; } // not sure here ... [i][j] or [j][i] + //console.log(vpred); + + + var max = 1 << tiff_bps & 0x7fff, step=0; + var csize = bin.readShort(md,mdo); mdo+=2; + if (csize > 1) step = Math.floor(max / (csize-1)); + if (ver0 == 0x44 && ver1 == 0x20 && step > 0) split = bin.readShort(md,562); + + + var i; + var row, col; + var len, shl, diff; + var min_v = 0; + var hpred = [0,0]; + var huff = make_decoder(nikon_tree[tree]); + + //var g_input_offset=0, bitbuf=0, vbits=0, reset=0; + var prm = [off,0,0,0]; + //console.log(split); split = 170; + + for (min_v=row=0; row < height; row++) { + if (split && row == split) { + //free (huff); + huff = make_decoder (nikon_tree[tree+1]); + //max_v += (min_v = 16) << 1; + } + for (col=0; col < raw_width; col++) { + i = getbithuff(data,prm,huff[0],huff); + len = i & 15; + shl = i >>> 4; + diff = (((getbithuff(data,prm,len-shl,0) << 1) + 1) << shl) >>> 1; + if ((diff & (1 << (len-1))) == 0) + diff -= (1 << len) - (shl==0?1:0); + if (col < 2) hpred[col] = vpred[row & 1][col] += diff; + else hpred[col & 1] += diff; + + var clr = Math.min(Math.max(hpred[col & 1],0),(1<>>3); dt[o]|=val>>>16; dt[o+1]|=val>>>8; dt[o+2]|=val; } + + +UTIF.decode._getbithuff = function(data,prm,nbits, huff) { + var zero_after_ff = 0; + var get_byte = UTIF.decode._get_byte; + var c; + + var off=prm[0], bitbuf=prm[1], vbits=prm[2], reset=prm[3]; + + //if (nbits > 25) return 0; + //if (nbits < 0) return bitbuf = vbits = reset = 0; + if (nbits == 0 || vbits < 0) return 0; + while (!reset && vbits < nbits && (c = data[off++]) != -1 && + !(reset = zero_after_ff && c == 0xff && data[off++])) { + //console.log("byte read into c"); + bitbuf = (bitbuf << 8) + c; + vbits += 8; + } + c = (bitbuf << (32-vbits)) >>> (32-nbits); + if (huff) { + vbits -= huff[c+1] >>> 8; //console.log(c, huff[c]>>8); + c = huff[c+1]&255; + } else + vbits -= nbits; + if (vbits < 0) throw "e"; + + prm[0]=off; prm[1]=bitbuf; prm[2]=vbits; prm[3]=reset; + + return c; +} + +UTIF.decode._make_decoder = function(source) { + var max, len, h, i, j; + var huff = []; + + for (max=16; max!=0 && !source[max]; max--); + var si=17; + + huff[0] = max; + for (h=len=1; len <= max; len++) + for (i=0; i < source[len]; i++, ++si) + for (j=0; j < 1 << (max-len); j++) + if (h <= 1 << max) + huff[h++] = (len << 8) | source[si]; + return huff; +} + +UTIF.decode._decodeNewJPEG = function(img, data, off, len, tgt, toff) +{ + len = Math.min(len, data.length-off); + var tables = img["t347"], tlen = tables ? tables.length : 0, buff = new Uint8Array(tlen + len); + + if (tables) { + var SOI = 216, EOI = 217, boff = 0; + for (var i=0; i<(tlen-1); i++) + { + // Skip EOI marker from JPEGTables + if (tables[i]==255 && tables[i+1]==EOI) break; + buff[boff++] = tables[i]; + } + + // Skip SOI marker from data + var byte1 = data[off], byte2 = data[off + 1]; + if (byte1!=255 || byte2!=SOI) + { + buff[boff++] = byte1; + buff[boff++] = byte2; + } + for (var i=2; i>>8); } + else for(var i=0; i>>8); tgt[toff+(i<<1)+1] = (out[i]&255); } + } + else if(bps==14 || bps==12 || bps==10) { // 4 * 14 == 56 == 7 * 8 + var rst = 16-bps; + for(var i=0; i 1); + } + + if(!isTiled) + { + if(data[off]==255 && data[off+1]==SOI) return { jpegOffset: off }; + if(jpgIchgFmt!=null) + { + if(data[off+jifoff]==255 && data[off+jifoff+1]==SOI) joff = off+jifoff; + else log("JPEGInterchangeFormat does not point to SOI"); + + if(jpgIchgFmtLen==null) log("JPEGInterchangeFormatLength field is missing"); + else if(jifoff >= soff || (jifoff+jiflen) <= soff) log("JPEGInterchangeFormatLength field value is invalid"); + + if(joff != null) return { jpegOffset: joff }; + } + } + + if(ycbcrss!=null) { ssx = ycbcrss[0]; ssy = ycbcrss[1]; } + + if(jpgIchgFmt!=null) + if(jpgIchgFmtLen!=null) + if(jiflen >= 2 && (jifoff+jiflen) <= soff) + { + if(data[off+jifoff+jiflen-2]==255 && data[off+jifoff+jiflen-1]==SOI) tables = new Uint8Array(jiflen-2); + else tables = new Uint8Array(jiflen); + + for(i=0; i offset to first strip or tile"); + + if(tables == null) + { + var ooff = 0, out = []; + out[ooff++] = 255; out[ooff++] = SOI; + + var qtables = img["t519"]; + if(qtables==null) throw new Error("JPEGQTables tag is missing"); + for(i=0; i>> 8); out[ooff++] = nc & 255; + out[ooff++] = (i | (k << 4)); + for(j=0; j<16; j++) out[ooff++] = data[off+htables[i]+j]; + for(j=0; j>> 8) & 255; out[ooff++] = img.height & 255; + out[ooff++] = (img.width >>> 8) & 255; out[ooff++] = img.width & 255; + out[ooff++] = spp; + if(spp==1) { out[ooff++] = 1; out[ooff++] = 17; out[ooff++] = 0; } + else for(i=0; i<3; i++) + { + out[ooff++] = i + 1; + out[ooff++] = (i != 0) ? 17 : (((ssx & 15) << 4) | (ssy & 15)); + out[ooff++] = i; + } + + if(jpgresint!=null && jpgresint[0]!=0) + { + out[ooff++] = 255; out[ooff++] = DRI; out[ooff++] = 0; out[ooff++] = 4; + out[ooff++] = (jpgresint[0] >>> 8) & 255; + out[ooff++] = jpgresint[0] & 255; + } + + tables = new Uint8Array(out); + } + + var sofpos = -1; + i = 0; + while(i < (tables.length - 1)) { + if(tables[i]==255 && tables[i+1]==SOF0) { sofpos = i; break; } + i++; + } + + if(sofpos == -1) + { + var tmptab = new Uint8Array(tables.length + 10 + 3*spp); + tmptab.set(tables); + var tmpoff = tables.length; + sofpos = tables.length; + tables = tmptab; + + tables[tmpoff++] = 255; tables[tmpoff++] = SOF0; + tables[tmpoff++] = 0; tables[tmpoff++] = 8 + 3*spp; tables[tmpoff++] = 8; + tables[tmpoff++] = (img.height >>> 8) & 255; tables[tmpoff++] = img.height & 255; + tables[tmpoff++] = (img.width >>> 8) & 255; tables[tmpoff++] = img.width & 255; + tables[tmpoff++] = spp; + if(spp==1) { tables[tmpoff++] = 1; tables[tmpoff++] = 17; tables[tmpoff++] = 0; } + else for(i=0; i<3; i++) + { + tables[tmpoff++] = i + 1; + tables[tmpoff++] = (i != 0) ? 17 : (((ssx & 15) << 4) | (ssy & 15)); + tables[tmpoff++] = i; + } + } + + if(data[soff]==255 && data[soff+1]==SOS) + { + var soslen = (data[soff+2]<<8) | data[soff+3]; + sosMarker = new Uint8Array(soslen+2); + sosMarker[0] = data[soff]; sosMarker[1] = data[soff+1]; sosMarker[2] = data[soff+2]; sosMarker[3] = data[soff+3]; + for(i=0; i<(soslen-2); i++) sosMarker[i+4] = data[soff+i+4]; + } + else + { + sosMarker = new Uint8Array(2 + 6 + 2*spp); + var sosoff = 0; + sosMarker[sosoff++] = 255; sosMarker[sosoff++] = SOS; + sosMarker[sosoff++] = 0; sosMarker[sosoff++] = 6 + 2*spp; sosMarker[sosoff++] = spp; + if(spp==1) { sosMarker[sosoff++] = 1; sosMarker[sosoff++] = 0; } + else for(i=0; i<3; i++) + { + sosMarker[sosoff++] = i+1; sosMarker[sosoff++] = (i << 4) | i; + } + sosMarker[sosoff++] = 0; sosMarker[sosoff++] = 63; sosMarker[sosoff++] = 0; + } + + return { jpegOffset: off, tables: tables, sosMarker: sosMarker, sofPosition: sofpos }; +} + +UTIF.decode._decodeOldJPEG = function(img, data, off, len, tgt, toff) +{ + var i, dlen, tlen, buff, buffoff; + var jpegData = UTIF.decode._decodeOldJPEGInit(img, data, off, len); + + if(jpegData.jpegOffset!=null) + { + dlen = off+len-jpegData.jpegOffset; + buff = new Uint8Array(dlen); + for(i=0; i>> 8) & 255; buff[jpegData.sofPosition+6] = img.height & 255; + buff[jpegData.sofPosition+7] = (img.width >>> 8) & 255; buff[jpegData.sofPosition+8] = img.width & 255; + + if(data[off]!=255 || data[off+1]!=SOS) + { + buff.set(jpegData.sosMarker, buffoff); + buffoff += sosMarker.length; + } + for(i=0; i=0 && n<128) for(var i=0; i< n+1; i++) { ta[toff]=sa[off]; toff++; off++; } + if(n>=-127 && n<0) { for(var i=0; i<-n+1; i++) { ta[toff]=sa[off]; toff++; } off++; } + } + return toff; +} + +UTIF.decode._decodeThunder = function(data, off, len, tgt, toff) +{ + var d2 = [ 0, 1, 0, -1 ], d3 = [ 0, 1, 2, 3, 0, -3, -2, -1 ]; + var lim = off+len, qoff = toff*2, px = 0; + while(off>>6), n = (b&63); off++; + if(msk==3) { px=(n&15); tgt[qoff>>>1] |= (px<<(4*(1-qoff&1))); qoff++; } + if(msk==0) for(var i=0; i>>1] |= (px<<(4*(1-qoff&1))); qoff++; } + if(msk==2) for(var i=0; i<2; i++) { var d=(n>>>(3*(1-i)))&7; if(d!=4) { px+=d3[d]; tgt[qoff>>>1] |= (px<<(4*(1-qoff&1))); qoff++; } } + if(msk==1) for(var i=0; i<3; i++) { var d=(n>>>(2*(2-i)))&3; if(d!=2) { px+=d2[d]; tgt[qoff>>>1] |= (px<<(4*(1-qoff&1))); qoff++; } } + } +} + +UTIF.decode._dmap = { "1":0,"011":1,"000011":2,"0000011":3, "010":-1,"000010":-2,"0000010":-3 }; +UTIF.decode._lens = ( function() +{ + var addKeys = function(lens, arr, i0, inc) { for(var i=0; i>>3)>>3]>>>(7-(boff&7)))&1; + if(fo==2) bit = (data[boff>>>3]>>>( (boff&7)))&1; + boff++; wrd+=bit; + if(mode=="H") + { + if(U._lens[clr][wrd]!=null) + { + var dl=U._lens[clr][wrd]; wrd=""; len+=dl; + if(dl<64) { U._addNtimes(line,len,clr); a0+=len; clr=1-clr; len=0; toRead--; if(toRead==0) mode=""; } + } + } + else + { + if(wrd=="0001") { wrd=""; U._addNtimes(line,b2-a0,clr); a0=b2; } + if(wrd=="001" ) { wrd=""; mode="H"; toRead=2; } + if(U._dmap[wrd]!=null) { a1 = b1+U._dmap[wrd]; U._addNtimes(line, a1-a0, clr); a0=a1; wrd=""; clr=1-clr; } + } + if(line.length==w && mode=="") + { + U._writeBits(line, tgt, toff*8+y*bipl); + clr=0; y++; a0=0; + pline=U._makeDiff(line); line=[]; + } + //if(wrd.length>150) { log(wrd); break; throw "e"; } + } +} + +UTIF.decode._findDiff = function(line, x, clr) { for(var i=0; i=x && line[i+1]==clr) return line[i]; } + +UTIF.decode._makeDiff = function(line) +{ + var out = []; if(line[0]==1) out.push(0,1); + for(var i=1; i>>3)>>3]>>>(7-(boff&7)))&1; + if(fo==2) bit = (data[boff>>>3]>>>( (boff&7)))&1; + boff++; wrd+=bit; + + len = U._lens[clr][wrd]; + if(len!=null) { + U._addNtimes(line,len,clr); wrd=""; + if(len<64) clr = 1-clr; + if(line.length==w) { U._writeBits(line, tgt, toff*8+y*bipl); line=[]; y++; clr=0; if((boff&7)!=0) boff+=8-(boff&7); if(len>=64) boff+=8; } + } + } +} + +UTIF.decode._decodeG3 = function(data, off, slen, tgt, toff, w, fo, twoDim) +{ + var U = UTIF.decode, boff=off<<3, len=0, wrd=""; + var line=[], pline=[]; for(var i=0; i>>3)>>3]>>>(7-(boff&7)))&1; + if(fo==2) bit = (data[boff>>>3]>>>( (boff&7)))&1; + boff++; wrd+=bit; + + if(is1D) + { + if(U._lens[clr][wrd]!=null) + { + var dl=U._lens[clr][wrd]; wrd=""; len+=dl; + if(dl<64) { U._addNtimes(line,len,clr); clr=1-clr; len=0; } + } + } + else + { + if(mode=="H") + { + if(U._lens[clr][wrd]!=null) + { + var dl=U._lens[clr][wrd]; wrd=""; len+=dl; + if(dl<64) { U._addNtimes(line,len,clr); a0+=len; clr=1-clr; len=0; toRead--; if(toRead==0) mode=""; } + } + } + else + { + if(wrd=="0001") { wrd=""; U._addNtimes(line,b2-a0,clr); a0=b2; } + if(wrd=="001" ) { wrd=""; mode="H"; toRead=2; } + if(U._dmap[wrd]!=null) { a1 = b1+U._dmap[wrd]; U._addNtimes(line, a1-a0, clr); a0=a1; wrd=""; clr=1-clr; } + } + } + if(wrd.endsWith("000000000001")) // needed for some files + { + if(y>=0) U._writeBits(line, tgt, toff*8+y*bipl); + if(twoDim) { + if(fo==1) is1D = ((data[boff>>>3]>>>(7-(boff&7)))&1)==1; + if(fo==2) is1D = ((data[boff>>>3]>>>( (boff&7)))&1)==1; + boff++; + } + //log("EOL",y, "next 1D:", is1D); + wrd=""; clr=0; y++; a0=0; + pline=U._makeDiff(line); line=[]; + } + } + if(line.length==w) U._writeBits(line, tgt, toff*8+y*bipl); +} + +UTIF.decode._addNtimes = function(arr, n, val) { for(var i=0; i>>3] |= (bits[i]<<(7-((boff+i)&7))); +} + +UTIF.decode._decodeLZW=UTIF.decode._decodeLZW=function(){var e,U,Z,u,K=0,V=0,g=0,N=0,O=function(){var S=e>>>3,A=U[S]<<16|U[S+1]<<8|U[S+2],j=A>>>24-(e&7)-V&(1<>>----------------"); + for(var i=0; idata.buffer.byteLength) num=data.buffer.byteLength-no; arr = new Uint8Array(data.buffer, no, num); } + if(type== 2) { var o0 = (num<5 ? offset-4 : voff), c=data[o0], len=Math.max(0, Math.min(num-1,data.length-o0)); + if(c<128 || len==0) arr.push( bin.readASCII(data, o0, len) ); + else arr = new Uint8Array(data.buffer, o0, len); } + if(type== 3) { for(var j=0; j4) { bin.writeUint(data, offset, eoff); toff=eoff; } + + if (type== 1 || type==7) { for(var i=0; i4) { dlen += (dlen&1); eoff += dlen; } + offset += 4; + } + return [offset, eoff]; +} + +UTIF.toRGBA8 = function(out, scl) +{ + function gamma(x) { return x < 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1.0 / 2.4) - 0.055; } + + + var w = out.width, h = out.height, area = w*h, qarea = area*4, data = out.data; + var img = new Uint8Array(area*4); + //console.log(out); + // 0: WhiteIsZero, 1: BlackIsZero, 2: RGB, 3: Palette color, 4: Transparency mask, 5: CMYK + var intp = (out["t262"] ? out["t262"][0]: 2), bps = (out["t258"]?Math.min(32,out["t258"][0]):1); + if(out["t262"]==null && bps==1) intp=0; + + var smpls = out["t277"]?out["t277"][0] : (out["t258"]?out["t258"].length : [1,1,3,1,1,4,3][intp]); + var sfmt = out["t339"]?out["t339"][0] : null; if(intp==1 && bps==32 && sfmt!=3) throw "e"; // sample format + var bpl = Math.ceil(smpls*bps*w/8); + + //log("interpretation: ", intp, "smpls", smpls, "bps", bps, "sample format",sfmt, out); + + if(false) {} + else if(intp==0) + { + scl = 1/256; // "Photopeatest.tif" + for(var y=0; y>3)])>>(7- (i&7)))& 1; img[qi]=img[qi+1]=img[qi+2]=( 1-px)*255; img[qi+3]=255; } + if(bps== 4) for(var i=0; i>1)])>>(4-4*(i&1)))&15; img[qi]=img[qi+1]=img[qi+2]=(15-px)* 17; img[qi+3]=255; } + if(bps== 8) for(var i=0; i>3)])>>(7- (i&7)))&1; img[qi]=img[qi+1]=img[qi+2]=(px)*255; img[qi+3]=255; } + if(bps== 2) for(var i=0; i>2)])>>(6-2*(i&3)))&3; img[qi]=img[qi+1]=img[qi+2]=(px)* 85; img[qi+3]=255; } + if(bps== 8) for(var i=0; i>>2)+i, px=f32[o]; img[qi]=img[qi+1]=img[qi+2]= ~~(0.5+255*px); img[qi+3]=255; } + } + } + else if(intp==2) + { + if(bps== 8) + { + if(smpls==1) for(var i=0; i=4) for(var i=0; i1 && out["t338"] && out["t338"][0]!=0; + + for(var y=0; y>>3)]>>>(7- (x&7)))& 1; + else if(bps==2) mi=(data[dof+(x>>>2)]>>>(6-2*(x&3)))& 3; + else if(bps==4) mi=(data[dof+(x>>>1)]>>>(4-4*(x&1)))&15; + else if(bps==8) mi= data[dof+x*smpls]; + else throw bps; + img[qi]=(map[mi]>>8); img[qi+1]=(map[cn+mi]>>8); img[qi+2]=(map[cn+cn+mi]>>8); img[qi+3]=nexta ? data[dof+x*smpls+1] : 255; + } + } + else if(intp==5) + { + var gotAlpha = smpls>4 ? 1 : 0; + for(var i=0; i>>1); + var Y = data[si+(j&1)], Cb=data[si+2]-128, Cr=data[si+3]-128; + + var r = Y + ( (Cr >> 2) + (Cr >> 3) + (Cr >> 5) ) ; + var g = Y - ( (Cb >> 2) + (Cb >> 4) + (Cb >> 5)) - ( (Cr >> 1) + (Cr >> 3) + (Cr >> 4) + (Cr >> 5)) ; + var b = Y + ( Cb + (Cb >> 1) + (Cb >> 2) + (Cb >> 6)) ; + + img[qi ]=Math.max(0,Math.min(255,r)); + img[qi+1]=Math.max(0,Math.min(255,g)); + img[qi+2]=Math.max(0,Math.min(255,b)); + img[qi+3]=255; + } + } + } + else if(intp==32845) { + + for(var y=0; yma) { ma=ar; page=img; } + } + UTIF.decodeImage(buff, page, ifds); + var rgba = UTIF.toRGBA8(page), w=page.width, h=page.height; + + var cnv = document.createElement("canvas"); cnv.width=w; cnv.height=h; + var ctx = cnv.getContext("2d"); + var imgd = new ImageData(new Uint8ClampedArray(rgba.buffer),w,h); + ctx.putImageData(imgd,0,0); + return cnv.toDataURL(); +} + + +UTIF._binBE = +{ + nextZero : function(data, o) { while(data[o]!=0) o++; return o; }, + readUshort : function(buff, p) { return (buff[p]<< 8) | buff[p+1]; }, + readShort : function(buff, p) { var a=UTIF._binBE.ui8; a[0]=buff[p+1]; a[1]=buff[p+0]; return UTIF._binBE. i16[0]; }, + readInt : function(buff, p) { var a=UTIF._binBE.ui8; a[0]=buff[p+3]; a[1]=buff[p+2]; a[2]=buff[p+1]; a[3]=buff[p+0]; return UTIF._binBE. i32[0]; }, + readUint : function(buff, p) { var a=UTIF._binBE.ui8; a[0]=buff[p+3]; a[1]=buff[p+2]; a[2]=buff[p+1]; a[3]=buff[p+0]; return UTIF._binBE.ui32[0]; }, + readASCII : function(buff, p, l) { var s = ""; for(var i=0; i> 8)&255; buff[p+1] = n&255; }, + writeInt : function(buff, p, n) { var a=UTIF._binBE.ui8; UTIF._binBE.i32[0]=n; buff[p+3]=a[0]; buff[p+2]=a[1]; buff[p+1]=a[2]; buff[p+0]=a[3]; }, + writeUint : function(buff, p, n) { buff[p] = (n>>24)&255; buff[p+1] = (n>>16)&255; buff[p+2] = (n>>8)&255; buff[p+3] = (n>>0)&255; }, + writeASCII : function(buff, p, s) { for(var i = 0; i < s.length; i++) buff[p+i] = s.charCodeAt(i); }, + writeDouble: function(buff, p, n) + { + UTIF._binBE.fl64[0] = n; + for (var i = 0; i < 8; i++) buff[p + i] = UTIF._binBE.ui8[7 - i]; + } +} +UTIF._binBE.ui8 = new Uint8Array (8); +UTIF._binBE.i16 = new Int16Array (UTIF._binBE.ui8.buffer); +UTIF._binBE.i32 = new Int32Array (UTIF._binBE.ui8.buffer); +UTIF._binBE.ui32 = new Uint32Array (UTIF._binBE.ui8.buffer); +UTIF._binBE.fl32 = new Float32Array(UTIF._binBE.ui8.buffer); +UTIF._binBE.fl64 = new Float64Array(UTIF._binBE.ui8.buffer); + +UTIF._binLE = +{ + nextZero : UTIF._binBE.nextZero, + readUshort : function(buff, p) { return (buff[p+1]<< 8) | buff[p]; }, + readShort : function(buff, p) { var a=UTIF._binBE.ui8; a[0]=buff[p+0]; a[1]=buff[p+1]; return UTIF._binBE. i16[0]; }, + readInt : function(buff, p) { var a=UTIF._binBE.ui8; a[0]=buff[p+0]; a[1]=buff[p+1]; a[2]=buff[p+2]; a[3]=buff[p+3]; return UTIF._binBE. i32[0]; }, + readUint : function(buff, p) { var a=UTIF._binBE.ui8; a[0]=buff[p+0]; a[1]=buff[p+1]; a[2]=buff[p+2]; a[3]=buff[p+3]; return UTIF._binBE.ui32[0]; }, + readASCII : UTIF._binBE.readASCII, + readFloat : function(buff, p) { var a=UTIF._binBE.ui8; for(var i=0;i<4;i++) a[i]=buff[p+ i]; return UTIF._binBE.fl32[0]; }, + readDouble : function(buff, p) { var a=UTIF._binBE.ui8; for(var i=0;i<8;i++) a[i]=buff[p+ i]; return UTIF._binBE.fl64[0]; }, + + writeUshort: function(buff, p, n) { buff[p] = (n)&255; buff[p+1] = (n>>8)&255; }, + writeInt : function(buff, p, n) { var a=UTIF._binBE.ui8; UTIF._binBE.i32[0]=n; buff[p+0]=a[0]; buff[p+1]=a[1]; buff[p+2]=a[2]; buff[p+3]=a[3]; }, + writeUint : function(buff, p, n) { buff[p] = (n>>>0)&255; buff[p+1] = (n>>>8)&255; buff[p+2] = (n>>>16)&255; buff[p+3] = (n>>>24)&255; }, + writeASCII : UTIF._binBE.writeASCII +} +UTIF._copyTile = function(tb, tw, th, b, w, h, xoff, yoff) +{ + //log("copyTile", tw, th, w, h, xoff, yoff); + var xlim = Math.min(tw, w-xoff); + var ylim = Math.min(th, h-yoff); + for(var y=0; y>>2<<5);while(i==0){i=n(N,d,1);m=n(N,d+1,2);d+=3;if(m==0){if((d&7)!=0)d+=8-(d&7); + var D=(d>>>3)+4,q=N[D-4]|N[D-3]<<8;if(Z)W=H.H.W(W,w+q);W.set(new R(N.buffer,N.byteOffset+D,q),w);d=D+q<<3; + w+=q;continue}if(Z)W=H.H.W(W,w+(1<<17));if(m==1){v=b.J;C=b.h;X=(1<<9)-1;u=(1<<5)-1}if(m==2){J=A(N,d,5)+257; + h=A(N,d+5,5)+1;Q=A(N,d+10,4)+4;d+=14;var E=d,j=1;for(var c=0;c<38;c+=2){b.Q[c]=0;b.Q[c+1]=0}for(var c=0; + cj)j=K}d+=3*Q;M(b.Q,j);I(b.Q,j,b.u);v=b.w;C=b.d; + d=l(b.u,(1<>>4;if(p>>>8==0){W[w++]=p}else if(p==256){break}else{var z=w+p-254; + if(p>264){var _=b.q[p-257];z=w+(_>>>3)+A(N,d,_&7);d+=_&7}var $=C[e(N,d)&u];d+=$&15;var s=$>>>4,Y=b.c[s],a=(Y>>>4)+n(N,d,Y&15); + d+=Y&15;while(w>>4; + if(b<=15){A[I]=b;I++}else{var Z=0,m=0;if(b==16){m=3+l(V,n,2);n+=2;Z=A[I-1]}else if(b==17){m=3+l(V,n,3); + n+=3}else if(b==18){m=11+l(V,n,7);n+=7}var J=I+m;while(I>>1; + while(An)n=M;A++}while(A>1,I=N[l+1],e=M<<4|I,b=W-I,Z=N[l]<>>15-W;R[J]=e;Z++}}};H.H.l=function(N,W){var R=H.H.m.r,V=15-W;for(var n=0;n>>V}};H.H.M=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8}; + H.H.I=function(N,W,R){R=R<<(W&7);var V=W>>>3;N[V]|=R;N[V+1]|=R>>>8;N[V+2]|=R>>>16};H.H.e=function(N,W,R){return(N[W>>>3]|N[(W>>>3)+1]<<8)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)&(1<>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16)>>>(W&7)}; + H.H.i=function(N,W){return(N[W>>>3]|N[(W>>>3)+1]<<8|N[(W>>>3)+2]<<16|N[(W>>>3)+3]<<24)>>>(W&7)};H.H.m=function(){var N=Uint16Array,W=Uint32Array; + return{K:new N(16),j:new N(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new N(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new W(32),J:new N(512),_:[],h:new N(32),$:[],w:new N(32768),C:[],v:[],d:new N(32768),D:[],u:new N(512),Q:[],r:new N(1<<15),s:new W(286),Y:new W(30),a:new W(19),t:new W(15e3),k:new N(1<<16),g:new N(1<<15)}}(); + (function(){var N=H.H.m,W=1<<15;for(var R=0;R>>1|(V&1431655765)<<1; + V=(V&3435973836)>>>2|(V&858993459)<<2;V=(V&4042322160)>>>4|(V&252645135)<<4;V=(V&4278255360)>>>8|(V&16711935)<<8; + N.r[R]=(V>>>16|V<<16)>>>17}function n(A,l,M){while(l--!=0)A.push(0,M)}for(var R=0;R<32;R++){N.q[R]=N.S[R]<<3|N.T[R]; + N.c[R]=N.p[R]<<4|N.z[R]}n(N._,144,8);n(N._,255-143,9);n(N._,279-255,7);n(N._,287-279,8);H.H.n(N._,9); + H.H.A(N._,9,N.J);H.H.l(N._,9);n(N.$,32,5);H.H.n(N.$,5);H.H.A(N.$,5,N.h);H.H.l(N.$,5);n(N.Q,19,0);n(N.C,286,0); + n(N.D,30,0);n(N.v,320,0)}());return H.H.N}(); + + + +UTIF.LosslessJpegDecode =function(){var b,O;function l(){return b[O++]}function m(){return b[O++]<<8|b[O++]}function a0(h){var V=l(),I=[0,0,0,255],f=[],G=8; +for(var w=0;w<16;w++)f[w]=l();for(var w=0;w<16;w++){for(var x=0;x>--s&1; +Y=I[Y+F]}E[w]=Y}}function z(h,V,I,f){if(h[V+3]!=255)return 0;if(I==0)return V;for(var w=0;w<2;w++){if(h[V+w]==0){h[V+w]=h.length; +h.push(0,0,f,255)}var x=z(h,h[V+w],I-1,f+1);if(x!=0)return x}return 0}function i(h){var V=h.b,I=h.f; +while(V<25&&h.a>(V.b-=h)&65535>>16-h}function g(h,V){var I=h[0],f=0,w=255,x=0;if(V.b<16)i(V);var T=V.f>>V.b-8&255; +f=h[1][T];w=I[f+3];V.b-=I[f+2];while(w==255){x=V.f>>--V.b&1;f=I[f+x];w=I[f+3]}return w}function P(h,V){if(h<32768>>16-V)h+=-(1<>4,J&15]}}else if(Y==65476){var a3=O+F-2;while(O>>4];x[v[0]]=v.slice(1)}I=l();O+=2;break}else if(Y==65501){w=m()}else{O+=F-2}}var a4=f>8?Uint16Array:Uint8Array,$=new a4(s*_*E),M={b:0,f:0,c:I==8,a:O,data:b,d:b.length,e:w}; +if(M.c)a1($,_*E,M,G[0],s);else{var c=[],p=0,D=0;for(var t=0;tp)p=S; +if(K>D)D=K;c.push(S*K)}if(p!=1||D!=1){if(E!=3||c[1]!=1||c[2]!=1)throw"e";if(p!=2||D!=1&&D!=2)throw"e"; +var u=[],Z=0;for(var t=0;t>>1)*B+(S>>>1))*Z,y=(K&1)*2+(S&1); +$[q]=n[k+y];$[q+1]=n[k+4];$[q+2]=n[k+5]}else for(var S=0;S<_;S++){var q=(K*_+S)*E,k=(K*B+(S>>>1))*Z,y=S&1; +$[q]=n[k+y];$[q+1]=n[k+2];$[q+2]=n[k+3]}}}else{X($,_*E,M,G,E,s);if(w==0)j($,I,_,s,0,E,E,f);else{var U=Math.floor(w/_); +for(var K=0;K>>1);else if(V==6)Q=h[J]+(r-h[J-G]>>>1);else if(V==7)Q=r+h[J]>>>1;else throw V; +h[a]+=Q}}}}return C}(); + + +(function(){var G=0,F=1,i=2,b=3,J=4,N=5,E=6,s=7,c=8,T=9,a3=10,f=11,q=12,M=13,m=14,x=15,L=16,$=17,p=18; +function a5(t){var Z=UTIF._binBE.readUshort,u={b:Z(t,0),i:t[2],C:t[3],u:t[4],q:Z(t,5),k:Z(t,7),e:Z(t,9),l:Z(t,11),s:t[13],d:Z(t,14)}; +if(u.b!=18771||u.i>1||u.q<6||u.q%6||u.e<768||u.e%24||u.l!=768||u.k=u.l||u.s>16||u.s!=u.k/u.l||u.s!=Math.ceil(u.e/u.l)||u.d!=u.q/6||u.u!=12&&u.u!=14&&u.u!=16||u.C!=16&&u.C!=0){throw"Invalid data"}if(u.i==0){throw"Not implemented. We need this file!"}u.h=u.C==16; +u.m=(u.h?u.l*2/3:u.l>>>1)|0;u.A=u.m+2;u.f=64;u.g=(1<>>6);for(var e=0;e<3;e++){for(var Q=0; +Q<41;Q++){Z[e][Q]=[u,1]}}return Z}function a4(t){for(var Z=-1,u=0;!u;Z++){u=t[t.j]>>>7-t.a&1;t.a++;t.a&=7; +if(!t.a)t.j++}return Z}function K(t,Z){var u=0,e=8-t.a,Q=t.j,V=t.a;if(Z){if(Z>=e){do{u<<=e;Z-=e;u|=t[t.j]&(1<=8)}if(Z){u<<=Z;e-=Z;u|=t[t.j]>>>e&(1<n&&C>>2;if(o){w[X]=h;return}l=Z.t*Z.c[t.g+Y-H]+Z.c[t.g+g-Y]}else{h=Y>g&&Y>P||Y>>2:A+v>>>1; +l=Z.t*Z.c[t.g+Y-g]+Z.c[t.g+g-A]}R=y(l);var W=a4(u);if(W>>1):a>>>1; +O[R][0]+=y(a);if(O[R][1]==t.f){O[R][0]>>>=1;O[R][1]>>>=1}O[R][1]++;h=l<0?h-a:h+a;if(t.i){if(h<0)h+=Z.w; +else if(h>t.g)h-=Z.w}w[X]=h>=0?Math.min(h,t.g):0}function U(t,Z,u){var e=t[0].length;for(var Q=Z;Q<=u; +Q++){t[Q][0]=t[Q-1][1];t[Q][e-1]=t[Q-1][e-2]}}function B(t){U(t,s,q);U(t,i,J);U(t,x,$)}function _(t,Z,u,e,Q,V,O,o,X,k,j,I,a){var l=0,R=1,w=QJ; +while(R8){r(t,Z,u,e,Q,R,o[X]);r(t,Z,u,e,V,R,o[X]);R+=2}}B(e)}function a8(t,Z,u,e,Q,V){_(t,Z,u,e,i,s,Q,V,0,0,1,0,8); +_(t,Z,u,e,c,x,Q,V,1,0,1,0,8);_(t,Z,u,e,b,T,Q,V,2,1,0,3,0);_(t,Z,u,e,a3,L,Q,V,0,0,0,3,2);_(t,Z,u,e,J,f,Q,V,1,0,0,3,2); +_(t,Z,u,e,q,$,Q,V,2,1,0,3,0)}function a9(t,Z,u,e,Q,V){var O=V.length,o=t.l;if(Q+1==t.s)o=t.e-Q*t.l;var X=6*t.e*e+Q*t.l; +for(var k=0;k<6;k++){for(var j=0;j>>1)}else if(I==2){a=x+(k>>>1)}else{a=s+k}var l=t.h?(j*2/3&2147483646|j%3&1)+(j%3>>>1):j>>>1; +Z[X+j]=u[a][l+1]}X+=t.e}}UTIF._decompressRAF=function(t,Z){var u=a5(t),e=a7(t,u),Q=a2(u),V=new Int16Array(u.e*u.q); +if(Z==null){Z=u.h?[[1,1,0,1,1,2],[1,1,2,1,1,0],[2,0,1,0,2,1],[1,1,2,1,1,0],[1,1,0,1,1,2],[0,2,1,2,0,1]]:[[0,1],[3,2]]}var O=[[G,b],[F,J],[N,f],[E,q],[M,L],[m,$]],o=[]; +for(var X=0;XA.arrayBuffer()).then(A=>WebAssembly.instantiate(A,g)).then(this._init):WebAssembly.instantiate(Buffer.from(C,"base64"),g).then(this._init),A)}_init(A){I=A.instance,g.env.emscripten_notify_memory_growth(0)}decode(A,g=0){if(!I)throw new Error("ZSTDDecoder: Await .init() before decoding.");const Q=A.byteLength,C=I.exports.malloc(Q);B.set(A,C),g=g||Number(I.exports.ZSTD_findDecompressedSize(C,Q));const E=I.exports.malloc(g),i=I.exports.ZSTD_decompress(E,g,C,Q),D=B.slice(E,E+i);return I.exports.free(C),I.exports.free(E),D}}const C="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0AACIDNgIAIAJBfmoiBEEBTQRAIARBAWtFBEAgACABLQACQRB0IANyIgM2AgALIAAgAS0AAUEIdCADajYCAAsgASACakF/ai0AACIBRQRAIABBADYCBEFsDwsgAEEoIAEQFCACQQN0ams2AgQgAgsWACAAIAEpAAA3AAAgACABKQAINwAICy8BAX8gAUECdEGgHWooAgAgACgCAEEgIAEgACgCBGprQR9xdnEhAiAAIAEQASACCyEAIAFCz9bTvtLHq9lCfiAAfEIfiUKHla+vmLbem55/fgsdAQF/IAAoAgggACgCDEYEfyAAKAIEQSBGBUEACwuCBAEDfyACQYDAAE8EQCAAIAEgAhBnIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAkEBSARAIAAhAgwBCyAAQQNxRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADTw0BIAJBA3ENAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0EIAVBAmohBQNAIAIgB0kEQCANIAJBAXRqQQA7AQAgAkEBaiECDAELCyAGIA5LQQAgBiAFQQN1aiIHIAxLG0UEQCAHKAAAIAVBB3EiBXYhBAwCCyAEQQJ2IQQLIAYhBwsCfyALQX9qIAQgAEF/anEiBiAAQQF0QX9qIgggCWsiEUkNABogBCAIcSIEQQAgESAEIABIG2shBiALCyEIIA0gAkEBdGogBkF/aiIEOwEAIAlBASAGayAEIAZBAUgbayEJA0AgCSAASARAIABBAXUhACALQX9qIQsMAQsLAn8gByAOS0EAIAcgBSAIaiIFQQN1aiIGIAxLG0UEQCAFQQdxDAELIAUgDCIGIAdrQQN0awshBSACQQFqIQIgBEUhCCAGKAAAIAVBH3F2IQQMAQsLQWwgCUEBRyAFQSBKcg0BGiABIAJBf2o2AgAgBiAFQQdqQQN1aiADawwBC0FQCyEAIApBEGokACAACwkAQQFBBSAAGwsMACAAIAEoAAA2AAALqgMBCn8jAEHwAGsiCiQAIAJBAWohDiAAQQhqIQtBgIAEIAVBf2p0QRB1IQxBACECQQEhBkEBIAV0IglBf2oiDyEIA0AgAiAORkUEQAJAIAEgAkEBdCINai8BACIHQf//A0YEQCALIAhBA3RqIAI2AgQgCEF/aiEIQQEhBwwBCyAGQQAgDCAHQRB0QRB1ShshBgsgCiANaiAHOwEAIAJBAWohAgwBCwsgACAFNgIEIAAgBjYCACAJQQN2IAlBAXZqQQNqIQxBACEAQQAhBkEAIQIDQCAGIA5GBEADQAJAIAAgCUYNACAKIAsgAEEDdGoiASgCBCIGQQF0aiICIAIvAQAiAkEBajsBACABIAUgAhAUayIIOgADIAEgAiAIQf8BcXQgCWs7AQAgASAEIAZBAnQiAmooAgA6AAIgASACIANqKAIANgIEIABBAWohAAwBCwsFIAEgBkEBdGouAQAhDUEAIQcDQCAHIA1ORQRAIAsgAkEDdGogBjYCBANAIAIgDGogD3EiAiAISw0ACyAHQQFqIQcMAQsLIAZBAWohBgwBCwsgCkHwAGokAAsjAEIAIAEQCSAAhUKHla+vmLbem55/fkLj3MqV/M7y9YV/fAsQACAAQn43AwggACABNgIACyQBAX8gAARAIAEoAgQiAgRAIAEoAgggACACEQEADwsgABAmCwsfACAAIAEgAi8BABAINgIAIAEQBBogACACQQRqNgIEC0oBAX9BoCAoAgAiASAAaiIAQX9MBEBBiCBBMDYCAEF/DwsCQCAAPwBBEHRNDQAgABBmDQBBiCBBMDYCAEF/DwtBoCAgADYCACABC9cBAQh/Qbp/IQoCQCACKAIEIgggAigCACIJaiIOIAEgAGtLDQBBbCEKIAkgBCADKAIAIgtrSw0AIAAgCWoiBCACKAIIIgxrIQ0gACABQWBqIg8gCyAJQQAQKSADIAkgC2o2AgACQAJAIAwgBCAFa00EQCANIQUMAQsgDCAEIAZrSw0CIAcgDSAFayIAaiIBIAhqIAdNBEAgBCABIAgQDxoMAgsgBCABQQAgAGsQDyEBIAIgACAIaiIINgIEIAEgAGshBAsgBCAPIAUgCEEBECkLIA4hCgsgCgubAgEBfyMAQYABayINJAAgDSADNgJ8AkAgAkEDSwRAQX8hCQwBCwJAAkACQAJAIAJBAWsOAwADAgELIAZFBEBBuH8hCQwEC0FsIQkgBS0AACICIANLDQMgACAHIAJBAnQiAmooAgAgAiAIaigCABA7IAEgADYCAEEBIQkMAwsgASAJNgIAQQAhCQwCCyAKRQRAQWwhCQwCC0EAIQkgC0UgDEEZSHINAUEIIAR0QQhqIQBBACECA0AgAiAATw0CIAJBQGshAgwAAAsAC0FsIQkgDSANQfwAaiANQfgAaiAFIAYQFSICEAMNACANKAJ4IgMgBEsNACAAIA0gDSgCfCAHIAggAxAYIAEgADYCACACIQkLIA1BgAFqJAAgCQsLACAAIAEgAhALGgsQACAALwAAIAAtAAJBEHRyCy8AAn9BuH8gAUEISQ0AGkFyIAAoAAQiAEF3Sw0AGkG4fyAAQQhqIgAgACABSxsLCwkAIAAgATsAAAsDAAELigYBBX8gACAAKAIAIgVBfnE2AgBBACAAIAVBAXZqQYQgKAIAIgQgAEYbIQECQAJAIAAoAgQiAkUNACACKAIAIgNBAXENACACQQhqIgUgA0EBdkF4aiIDQQggA0EISxtnQR9zQQJ0QYAfaiIDKAIARgRAIAMgAigCDDYCAAsgAigCCCIDBEAgAyACKAIMNgIECyACKAIMIgMEQCADIAIoAgg2AgALIAIgAigCACAAKAIAQX5xajYCAEGEICEAAkACQCABRQ0AIAEgAjYCBCABKAIAIgNBAXENASADQQF2QXhqIgNBCCADQQhLG2dBH3NBAnRBgB9qIgMoAgAgAUEIakYEQCADIAEoAgw2AgALIAEoAggiAwRAIAMgASgCDDYCBAsgASgCDCIDBEAgAyABKAIINgIAQYQgKAIAIQQLIAIgAigCACABKAIAQX5xajYCACABIARGDQAgASABKAIAQQF2akEEaiEACyAAIAI2AgALIAIoAgBBAXZBeGoiAEEIIABBCEsbZ0Efc0ECdEGAH2oiASgCACEAIAEgBTYCACACIAA2AgwgAkEANgIIIABFDQEgACAFNgIADwsCQCABRQ0AIAEoAgAiAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAigCACABQQhqRgRAIAIgASgCDDYCAAsgASgCCCICBEAgAiABKAIMNgIECyABKAIMIgIEQCACIAEoAgg2AgBBhCAoAgAhBAsgACAAKAIAIAEoAgBBfnFqIgI2AgACQCABIARHBEAgASABKAIAQQF2aiAANgIEIAAoAgAhAgwBC0GEICAANgIACyACQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgIoAgAhASACIABBCGoiAjYCACAAIAE2AgwgAEEANgIIIAFFDQEgASACNgIADwsgBUEBdkF4aiIBQQggAUEISxtnQR9zQQJ0QYAfaiICKAIAIQEgAiAAQQhqIgI2AgAgACABNgIMIABBADYCCCABRQ0AIAEgAjYCAAsLDgAgAARAIABBeGoQJQsLgAIBA38CQCAAQQ9qQXhxQYQgKAIAKAIAQQF2ayICEB1Bf0YNAAJAQYQgKAIAIgAoAgAiAUEBcQ0AIAFBAXZBeGoiAUEIIAFBCEsbZ0Efc0ECdEGAH2oiASgCACAAQQhqRgRAIAEgACgCDDYCAAsgACgCCCIBBEAgASAAKAIMNgIECyAAKAIMIgFFDQAgASAAKAIINgIAC0EBIQEgACAAKAIAIAJBAXRqIgI2AgAgAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAygCACECIAMgAEEIaiIDNgIAIAAgAjYCDCAAQQA2AgggAkUNACACIAM2AgALIAELtwIBA38CQAJAIABBASAAGyICEDgiAA0AAkACQEGEICgCACIARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAggBhsiBzcDCCAAIAdCgIAIIAdCgIAIVBs+AhALIAMLWwEBf0G4fyEDIAIQFiICIAFNBH8gACACakF/ai0AACIAQQNxQQJ0QaAeaigCACACaiAAQQZ2IgFBAnRBsB5qKAIAaiAAQSBxIgBFaiABRSAAQQV2cWoFQbh/CwsdACAAKAKQ4gEQWiAAQQA2AqDiASAAQgA3A5DiAQu1AwEFfyMAQZACayIKJABBuH8hBgJAIAVFDQAgBCwAACIIQf8BcSEHAkAgCEF/TARAIAdBgn9qQQF2IgggBU8NAkFsIQYgB0GBf2oiBUGAAk8NAiAEQQFqIQdBACEGA0AgBiAFTwRAIAUhBiAIIQcMAwUgACAGaiAHIAZBAXZqIgQtAABBBHY6AAAgACAGQQFyaiAELQAAQQ9xOgAAIAZBAmohBgwBCwAACwALIAcgBU8NASAAIARBAWogByAKEFMiBhADDQELIAYhBEEAIQYgAUEAQTQQECEJQQAhBQNAIAQgBkcEQCAAIAZqIggtAAAiAUELSwRAQWwhBgwDBSAJIAFBAnRqIgEgASgCAEEBajYCACAGQQFqIQZBASAILQAAdEEBdSAFaiEFDAILAAsLQWwhBiAFRQ0AIAUQFEEBaiIBQQxLDQAgAyABNgIAQQFBASABdCAFayIDEBQiAXQgA0cNACAAIARqIAFBAWoiADoAACAJIABBAnRqIgAgACgCAEEBajYCACAJKAIEIgBBAkkgAEEBcXINACACIARBAWo2AgAgB0EBaiEGCyAKQZACaiQAIAYLxhEBDH8jAEHwAGsiBSQAQWwhCwJAIANBCkkNACACLwAAIQogAi8AAiEJIAIvAAQhByAFQQhqIAQQDgJAIAMgByAJIApqakEGaiIMSQ0AIAUtAAohCCAFQdgAaiACQQZqIgIgChAGIgsQAw0BIAVBQGsgAiAKaiICIAkQBiILEAMNASAFQShqIAIgCWoiAiAHEAYiCxADDQEgBUEQaiACIAdqIAMgDGsQBiILEAMNASAAIAFqIg9BfWohECAEQQRqIQZBASELIAAgAUEDakECdiIDaiIMIANqIgIgA2oiDiEDIAIhBCAMIQcDQCALIAMgEElxBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgCS0AAyELIAcgBiAFQUBrIAgQAkECdGoiCS8BADsAACAFQUBrIAktAAIQASAJLQADIQogBCAGIAVBKGogCBACQQJ0aiIJLwEAOwAAIAVBKGogCS0AAhABIAktAAMhCSADIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgDS0AAyENIAAgC2oiCyAGIAVB2ABqIAgQAkECdGoiAC8BADsAACAFQdgAaiAALQACEAEgAC0AAyEAIAcgCmoiCiAGIAVBQGsgCBACQQJ0aiIHLwEAOwAAIAVBQGsgBy0AAhABIActAAMhByAEIAlqIgkgBiAFQShqIAgQAkECdGoiBC8BADsAACAFQShqIAQtAAIQASAELQADIQQgAyANaiIDIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgACALaiEAIAcgCmohByAEIAlqIQQgAyANLQADaiEDIAVB2ABqEA0gBUFAaxANciAFQShqEA1yIAVBEGoQDXJFIQsMAQsLIAQgDksgByACS3INAEFsIQsgACAMSw0BIAxBfWohCQNAQQAgACAJSSAFQdgAahAEGwRAIAAgBiAFQdgAaiAIEAJBAnRqIgovAQA7AAAgBUHYAGogCi0AAhABIAAgCi0AA2oiACAGIAVB2ABqIAgQAkECdGoiCi8BADsAACAFQdgAaiAKLQACEAEgACAKLQADaiEADAEFIAxBfmohCgNAIAVB2ABqEAQgACAKS3JFBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgACAJLQADaiEADAELCwNAIAAgCk0EQCAAIAYgBUHYAGogCBACQQJ0aiIJLwEAOwAAIAVB2ABqIAktAAIQASAAIAktAANqIQAMAQsLAkAgACAMTw0AIAAgBiAFQdgAaiAIEAIiAEECdGoiDC0AADoAACAMLQADQQFGBEAgBUHYAGogDC0AAhABDAELIAUoAlxBH0sNACAFQdgAaiAGIABBAnRqLQACEAEgBSgCXEEhSQ0AIAVBIDYCXAsgAkF9aiEMA0BBACAHIAxJIAVBQGsQBBsEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiIAIAYgBUFAayAIEAJBAnRqIgcvAQA7AAAgBUFAayAHLQACEAEgACAHLQADaiEHDAEFIAJBfmohDANAIAVBQGsQBCAHIAxLckUEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwNAIAcgDE0EQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwJAIAcgAk8NACAHIAYgBUFAayAIEAIiAEECdGoiAi0AADoAACACLQADQQFGBEAgBUFAayACLQACEAEMAQsgBSgCREEfSw0AIAVBQGsgBiAAQQJ0ai0AAhABIAUoAkRBIUkNACAFQSA2AkQLIA5BfWohAgNAQQAgBCACSSAFQShqEAQbBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2oiACAGIAVBKGogCBACQQJ0aiIELwEAOwAAIAVBKGogBC0AAhABIAAgBC0AA2ohBAwBBSAOQX5qIQIDQCAFQShqEAQgBCACS3JFBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsDQCAEIAJNBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsCQCAEIA5PDQAgBCAGIAVBKGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBKGogAi0AAhABDAELIAUoAixBH0sNACAFQShqIAYgAEECdGotAAIQASAFKAIsQSFJDQAgBUEgNgIsCwNAQQAgAyAQSSAFQRBqEAQbBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2oiACAGIAVBEGogCBACQQJ0aiICLwEAOwAAIAVBEGogAi0AAhABIAAgAi0AA2ohAwwBBSAPQX5qIQIDQCAFQRBqEAQgAyACS3JFBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsDQCADIAJNBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsCQCADIA9PDQAgAyAGIAVBEGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBEGogAi0AAhABDAELIAUoAhRBH0sNACAFQRBqIAYgAEECdGotAAIQASAFKAIUQSFJDQAgBUEgNgIUCyABQWwgBUHYAGoQCiAFQUBrEApxIAVBKGoQCnEgBUEQahAKcRshCwwJCwAACwALAAALAAsAAAsACwAACwALQWwhCwsgBUHwAGokACALC7UEAQ5/IwBBEGsiBiQAIAZBBGogABAOQVQhBQJAIARB3AtJDQAgBi0ABCEHIANB8ARqQQBB7AAQECEIIAdBDEsNACADQdwJaiIJIAggBkEIaiAGQQxqIAEgAhAxIhAQA0UEQCAGKAIMIgQgB0sNASADQdwFaiEPIANBpAVqIREgAEEEaiESIANBqAVqIQEgBCEFA0AgBSICQX9qIQUgCCACQQJ0aigCAEUNAAsgAkEBaiEOQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgASALaiAKNgIAIAVBAWohBSAKIAxqIQoMAQsLIAEgCjYCAEEAIQUgBigCCCELA0AgBSALRkUEQCABIAUgCWotAAAiDEECdGoiDSANKAIAIg1BAWo2AgAgDyANQQF0aiINIAw6AAEgDSAFOgAAIAVBAWohBQwBCwtBACEBIANBADYCqAUgBEF/cyAHaiEJQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgAyALaiABNgIAIAwgBSAJanQgAWohASAFQQFqIQUMAQsLIAcgBEEBaiIBIAJrIgRrQQFqIQgDQEEBIQUgBCAIT0UEQANAIAUgDk9FBEAgBUECdCIJIAMgBEE0bGpqIAMgCWooAgAgBHY2AgAgBUEBaiEFDAELCyAEQQFqIQQMAQsLIBIgByAPIAogESADIAIgARBkIAZBAToABSAGIAc6AAYgACAGKAIENgIACyAQIQULIAZBEGokACAFC8ENAQt/IwBB8ABrIgUkAEFsIQkCQCADQQpJDQAgAi8AACEKIAIvAAIhDCACLwAEIQYgBUEIaiAEEA4CQCADIAYgCiAMampBBmoiDUkNACAFLQAKIQcgBUHYAGogAkEGaiICIAoQBiIJEAMNASAFQUBrIAIgCmoiAiAMEAYiCRADDQEgBUEoaiACIAxqIgIgBhAGIgkQAw0BIAVBEGogAiAGaiADIA1rEAYiCRADDQEgACABaiIOQX1qIQ8gBEEEaiEGQQEhCSAAIAFBA2pBAnYiAmoiCiACaiIMIAJqIg0hAyAMIQQgCiECA0AgCSADIA9JcQRAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAACAGIAVBQGsgBxACQQF0aiIILQAAIQsgBUFAayAILQABEAEgAiALOgAAIAYgBUEoaiAHEAJBAXRqIggtAAAhCyAFQShqIAgtAAEQASAEIAs6AAAgBiAFQRBqIAcQAkEBdGoiCC0AACELIAVBEGogCC0AARABIAMgCzoAACAGIAVB2ABqIAcQAkEBdGoiCC0AACELIAVB2ABqIAgtAAEQASAAIAs6AAEgBiAFQUBrIAcQAkEBdGoiCC0AACELIAVBQGsgCC0AARABIAIgCzoAASAGIAVBKGogBxACQQF0aiIILQAAIQsgBUEoaiAILQABEAEgBCALOgABIAYgBUEQaiAHEAJBAXRqIggtAAAhCyAFQRBqIAgtAAEQASADIAs6AAEgA0ECaiEDIARBAmohBCACQQJqIQIgAEECaiEAIAkgBUHYAGoQDUVxIAVBQGsQDUVxIAVBKGoQDUVxIAVBEGoQDUVxIQkMAQsLIAQgDUsgAiAMS3INAEFsIQkgACAKSw0BIApBfWohCQNAIAVB2ABqEAQgACAJT3JFBEAgBiAFQdgAaiAHEAJBAXRqIggtAAAhCyAFQdgAaiAILQABEAEgACALOgAAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAASAAQQJqIQAMAQsLA0AgBUHYAGoQBCAAIApPckUEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCwNAIAAgCkkEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCyAMQX1qIQADQCAFQUBrEAQgAiAAT3JFBEAgBiAFQUBrIAcQAkEBdGoiCi0AACEJIAVBQGsgCi0AARABIAIgCToAACAGIAVBQGsgBxACQQF0aiIKLQAAIQkgBUFAayAKLQABEAEgAiAJOgABIAJBAmohAgwBCwsDQCAFQUBrEAQgAiAMT3JFBEAgBiAFQUBrIAcQAkEBdGoiAC0AACEKIAVBQGsgAC0AARABIAIgCjoAACACQQFqIQIMAQsLA0AgAiAMSQRAIAYgBUFAayAHEAJBAXRqIgAtAAAhCiAFQUBrIAAtAAEQASACIAo6AAAgAkEBaiECDAELCyANQX1qIQADQCAFQShqEAQgBCAAT3JFBEAgBiAFQShqIAcQAkEBdGoiAi0AACEKIAVBKGogAi0AARABIAQgCjoAACAGIAVBKGogBxACQQF0aiICLQAAIQogBUEoaiACLQABEAEgBCAKOgABIARBAmohBAwBCwsDQCAFQShqEAQgBCANT3JFBEAgBiAFQShqIAcQAkEBdGoiAC0AACECIAVBKGogAC0AARABIAQgAjoAACAEQQFqIQQMAQsLA0AgBCANSQRAIAYgBUEoaiAHEAJBAXRqIgAtAAAhAiAFQShqIAAtAAEQASAEIAI6AAAgBEEBaiEEDAELCwNAIAVBEGoQBCADIA9PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIAYgBUEQaiAHEAJBAXRqIgAtAAAhAiAFQRBqIAAtAAEQASADIAI6AAEgA0ECaiEDDAELCwNAIAVBEGoQBCADIA5PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIANBAWohAwwBCwsDQCADIA5JBEAgBiAFQRBqIAcQAkEBdGoiAC0AACECIAVBEGogAC0AARABIAMgAjoAACADQQFqIQMMAQsLIAFBbCAFQdgAahAKIAVBQGsQCnEgBUEoahAKcSAFQRBqEApxGyEJDAELQWwhCQsgBUHwAGokACAJC8oCAQR/IwBBIGsiBSQAIAUgBBAOIAUtAAIhByAFQQhqIAIgAxAGIgIQA0UEQCAEQQRqIQIgACABaiIDQX1qIQQDQCAFQQhqEAQgACAET3JFBEAgAiAFQQhqIAcQAkEBdGoiBi0AACEIIAVBCGogBi0AARABIAAgCDoAACACIAVBCGogBxACQQF0aiIGLQAAIQggBUEIaiAGLQABEAEgACAIOgABIABBAmohAAwBCwsDQCAFQQhqEAQgACADT3JFBEAgAiAFQQhqIAcQAkEBdGoiBC0AACEGIAVBCGogBC0AARABIAAgBjoAACAAQQFqIQAMAQsLA0AgACADT0UEQCACIAVBCGogBxACQQF0aiIELQAAIQYgBUEIaiAELQABEAEgACAGOgAAIABBAWohAAwBCwsgAUFsIAVBCGoQChshAgsgBUEgaiQAIAILtgMBCX8jAEEQayIGJAAgBkEANgIMIAZBADYCCEFUIQQCQAJAIANBQGsiDCADIAZBCGogBkEMaiABIAIQMSICEAMNACAGQQRqIAAQDiAGKAIMIgcgBi0ABEEBaksNASAAQQRqIQogBkEAOgAFIAYgBzoABiAAIAYoAgQ2AgAgB0EBaiEJQQEhBANAIAQgCUkEQCADIARBAnRqIgEoAgAhACABIAU2AgAgACAEQX9qdCAFaiEFIARBAWohBAwBCwsgB0EBaiEHQQAhBSAGKAIIIQkDQCAFIAlGDQEgAyAFIAxqLQAAIgRBAnRqIgBBASAEdEEBdSILIAAoAgAiAWoiADYCACAHIARrIQhBACEEAkAgC0EDTQRAA0AgBCALRg0CIAogASAEakEBdGoiACAIOgABIAAgBToAACAEQQFqIQQMAAALAAsDQCABIABPDQEgCiABQQF0aiIEIAg6AAEgBCAFOgAAIAQgCDoAAyAEIAU6AAIgBCAIOgAFIAQgBToABCAEIAg6AAcgBCAFOgAGIAFBBGohAQwAAAsACyAFQQFqIQUMAAALAAsgAiEECyAGQRBqJAAgBAutAQECfwJAQYQgKAIAIABHIAAoAgBBAXYiAyABa0F4aiICQXhxQQhHcgR/IAIFIAMQJ0UNASACQQhqC0EQSQ0AIAAgACgCACICQQFxIAAgAWpBD2pBeHEiASAAa0EBdHI2AgAgASAANgIEIAEgASgCAEEBcSAAIAJBAXZqIAFrIgJBAXRyNgIAQYQgIAEgAkH/////B3FqQQRqQYQgKAIAIABGGyABNgIAIAEQJQsLygIBBX8CQAJAAkAgAEEIIABBCEsbZ0EfcyAAaUEBR2oiAUEESSAAIAF2cg0AIAFBAnRB/B5qKAIAIgJFDQADQCACQXhqIgMoAgBBAXZBeGoiBSAATwRAIAIgBUEIIAVBCEsbZ0Efc0ECdEGAH2oiASgCAEYEQCABIAIoAgQ2AgALDAMLIARBHksNASAEQQFqIQQgAigCBCICDQALC0EAIQMgAUEgTw0BA0AgAUECdEGAH2ooAgAiAkUEQCABQR5LIQIgAUEBaiEBIAJFDQEMAwsLIAIgAkF4aiIDKAIAQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgBGBEAgASACKAIENgIACwsgAigCACIBBEAgASACKAIENgIECyACKAIEIgEEQCABIAIoAgA2AgALIAMgAygCAEEBcjYCACADIAAQNwsgAwvhCwINfwV+IwBB8ABrIgckACAHIAAoAvDhASIINgJcIAEgAmohDSAIIAAoAoDiAWohDwJAAkAgBUUEQCABIQQMAQsgACgCxOABIRAgACgCwOABIREgACgCvOABIQ4gAEEBNgKM4QFBACEIA0AgCEEDRwRAIAcgCEECdCICaiAAIAJqQazQAWooAgA2AkQgCEEBaiEIDAELC0FsIQwgB0EYaiADIAQQBhADDQEgB0EsaiAHQRhqIAAoAgAQEyAHQTRqIAdBGGogACgCCBATIAdBPGogB0EYaiAAKAIEEBMgDUFgaiESIAEhBEEAIQwDQCAHKAIwIAcoAixBA3RqKQIAIhRCEIinQf8BcSEIIAcoAkAgBygCPEEDdGopAgAiFUIQiKdB/wFxIQsgBygCOCAHKAI0QQN0aikCACIWQiCIpyEJIBVCIIghFyAUQiCIpyECAkAgFkIQiKdB/wFxIgNBAk8EQAJAIAZFIANBGUlyRQRAIAkgB0EYaiADQSAgBygCHGsiCiAKIANLGyIKEAUgAyAKayIDdGohCSAHQRhqEAQaIANFDQEgB0EYaiADEAUgCWohCQwBCyAHQRhqIAMQBSAJaiEJIAdBGGoQBBoLIAcpAkQhGCAHIAk2AkQgByAYNwNIDAELAkAgA0UEQCACBEAgBygCRCEJDAMLIAcoAkghCQwBCwJAAkAgB0EYakEBEAUgCSACRWpqIgNBA0YEQCAHKAJEQX9qIgMgA0VqIQkMAQsgA0ECdCAHaigCRCIJIAlFaiEJIANBAUYNAQsgByAHKAJINgJMCwsgByAHKAJENgJIIAcgCTYCRAsgF6chAyALBEAgB0EYaiALEAUgA2ohAwsgCCALakEUTwRAIAdBGGoQBBoLIAgEQCAHQRhqIAgQBSACaiECCyAHQRhqEAQaIAcgB0EYaiAUQhiIp0H/AXEQCCAUp0H//wNxajYCLCAHIAdBGGogFUIYiKdB/wFxEAggFadB//8DcWo2AjwgB0EYahAEGiAHIAdBGGogFkIYiKdB/wFxEAggFqdB//8DcWo2AjQgByACNgJgIAcoAlwhCiAHIAk2AmggByADNgJkAkACQAJAIAQgAiADaiILaiASSw0AIAIgCmoiEyAPSw0AIA0gBGsgC0Egak8NAQsgByAHKQNoNwMQIAcgBykDYDcDCCAEIA0gB0EIaiAHQdwAaiAPIA4gESAQEB4hCwwBCyACIARqIQggBCAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgCCAJSxsoAgAhDSAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogB0EoaiAfQhiIp0H/AXEQCCEOIAdB8ABqIARBBHRqIgsgCSANaiAIazYCDCALIAg2AgggCyADNgIEIAsgAjYCACAHIA4gH6dB//8DcWo2AkQgBEEBaiEEDAELCyAEIBdIDQEgEkFgaiEYIAdB4ABqIRogB0HkAGohGyABIQMDQCAHQShqEARBAksgBCAFTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEIIAcoAkggBygCREEDdGopAgAiH0IgiKchCSAeQiCIISAgHUIgiKchDAJAIB9CEIinQf8BcSICQQJPBEACQCAGRSACQRlJckUEQCAJIAdBKGogAkEgIAcoAixrIgogCiACSxsiChAFIAIgCmsiAnRqIQkgB0EoahAEGiACRQ0BIAdBKGogAhAFIAlqIQkMAQsgB0EoaiACEAUgCWohCSAHQShqEAQaCyAHKQJUISEgByAJNgJUIAcgITcDWAwBCwJAIAJFBEAgDARAIAcoAlQhCQwDCyAHKAJYIQkMAQsCQAJAIAdBKGpBARAFIAkgDEVqaiICQQNGBEAgBygCVEF/aiICIAJFaiEJDAELIAJBAnQgB2ooAlQiCSAJRWohCSACQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAk2AlQLICCnIRQgCARAIAdBKGogCBAFIBRqIRQLIAggC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgDGohDAsgB0EoahAEGiAHIAcoAmggDGoiGSAUajYCaCAbIBogCSAZSxsoAgAhHCAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogByAHQShqIB9CGIinQf8BcRAIIB+nQf//A3FqNgJEIAcgB0HwAGogBEEDcUEEdGoiDSkDCCIdNwPIASAHIA0pAwAiHjcDwAECQAJAAkAgBygCvAEiDiAepyICaiIWIBNLDQAgAyAHKALEASIKIAJqIgtqIBhLDQAgEiADayALQSBqTw0BCyAHIAcpA8gBNwMQIAcgBykDwAE3AwggAyASIAdBCGogB0G8AWogEyAPIBUgERAeIQsMAQsgAiADaiEIIAMgDhAHIAJBEU8EQCADQRBqIQIDQCACIA5BEGoiDhAHIAJBEGoiAiAISQ0ACwsgCCAdpyIOayECIAcgFjYCvAEgDiAIIA9rSwRAIA4gCCAVa0sEQEFsIQsMAgsgESACIA9rIgJqIhYgCmogEU0EQCAIIBYgChAPGgwCCyAIIBZBACACaxAPIQggByACIApqIgo2AsQBIAggAmshCCAPIQILIA5BEE8EQCAIIApqIQoDQCAIIAIQByACQRBqIQIgCEEQaiIIIApJDQALDAELAkAgDkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgDkECdCIKQcAeaigCAGoiAhAXIAIgCkHgHmooAgBrIQIgBygCxAEhCgwBCyAIIAIQDAsgCkEJSQ0AIAggCmohCiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAKSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAKSQ0ACwsgCxADBEAgCyEQDAQFIA0gDDYCACANIBkgHGogCWs2AgwgDSAJNgIIIA0gFDYCBCAEQQFqIQQgAyALaiEDDAILAAsLIAQgBUgNASAEIBdrIQtBACEEA0AgCyAFSARAIAcgB0HwAGogC0EDcUEEdGoiAikDCCIdNwPIASAHIAIpAwAiHjcDwAECQAJAAkAgBygCvAEiDCAepyICaiIKIBNLDQAgAyAHKALEASIJIAJqIhBqIBhLDQAgEiADayAQQSBqTw0BCyAHIAcpA8gBNwMgIAcgBykDwAE3AxggAyASIAdBGGogB0G8AWogEyAPIBUgERAeIRAMAQsgAiADaiEIIAMgDBAHIAJBEU8EQCADQRBqIQIDQCACIAxBEGoiDBAHIAJBEGoiAiAISQ0ACwsgCCAdpyIGayECIAcgCjYCvAEgBiAIIA9rSwRAIAYgCCAVa0sEQEFsIRAMAgsgESACIA9rIgJqIgwgCWogEU0EQCAIIAwgCRAPGgwCCyAIIAxBACACaxAPIQggByACIAlqIgk2AsQBIAggAmshCCAPIQILIAZBEE8EQCAIIAlqIQYDQCAIIAIQByACQRBqIQIgCEEQaiIIIAZJDQALDAELAkAgBkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgBkECdCIGQcAeaigCAGoiAhAXIAIgBkHgHmooAgBrIQIgBygCxAEhCQwBCyAIIAIQDAsgCUEJSQ0AIAggCWohBiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAGSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAGSQ0ACwsgEBADDQMgC0EBaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoiBCACIARrEBUiBRADDQAgAygCfCIGQSNLDQAgAygCeCIHQQpPDQAgACADIAZBwBBB0BEgBxAYIAQgBWoiBEEMaiIFIAJLDQAgAiAFayEFQQAhAgNAIAJBA0cEQCAEKAAAIgZBf2ogBU8NAiAAIAJBAnRqQZzQAWogBjYCACACQQFqIQIgBEEEaiEEDAELCyAEIAFrIQgLIANBgAFqJAAgCAtGAQN/IABBCGohAyAAKAIEIQJBACEAA0AgACACdkUEQCABIAMgAEEDdGotAAJBFktqIQEgAEEBaiEADAELCyABQQggAmt0C4YDAQV/Qbh/IQcCQCADRQ0AIAItAAAiBEUEQCABQQA2AgBBAUG4fyADQQFGGw8LAn8gAkEBaiIFIARBGHRBGHUiBkF/Sg0AGiAGQX9GBEAgA0EDSA0CIAUvAABBgP4BaiEEIAJBA2oMAQsgA0ECSA0BIAItAAEgBEEIdHJBgIB+aiEEIAJBAmoLIQUgASAENgIAIAVBAWoiASACIANqIgNLDQBBbCEHIABBEGogACAFLQAAIgVBBnZBI0EJIAEgAyABa0HAEEHQEUHwEiAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBmCBqIABBCGogBUEEdkEDcUEfQQggASABIAZqIAgbIgEgAyABa0GAC0GADEGAFyAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBoDBqIABBBGogBUECdkEDcUE0QQkgASABIAZqIAgbIgEgAyABa0GADUHgDkGQGSAAKAKM4QEgACgCnOIBIAQQHyIAEAMNACAAIAFqIAJrIQcLIAcLrQMBCn8jAEGABGsiCCQAAn9BUiACQf8BSw0AGkFUIANBDEsNABogAkEBaiELIABBBGohCUGAgAQgA0F/anRBEHUhCkEAIQJBASEEQQEgA3QiB0F/aiIMIQUDQCACIAtGRQRAAkAgASACQQF0Ig1qLwEAIgZB//8DRgRAIAkgBUECdGogAjoAAiAFQX9qIQVBASEGDAELIARBACAKIAZBEHRBEHVKGyEECyAIIA1qIAY7AQAgAkEBaiECDAELCyAAIAQ7AQIgACADOwEAIAdBA3YgB0EBdmpBA2ohBkEAIQRBACECA0AgBCALRkUEQCABIARBAXRqLgEAIQpBACEAA0AgACAKTkUEQCAJIAJBAnRqIAQ6AAIDQCACIAZqIAxxIgIgBUsNAAsgAEEBaiEADAELCyAEQQFqIQQMAQsLQX8gAg0AGkEAIQIDfyACIAdGBH9BAAUgCCAJIAJBAnRqIgAtAAJBAXRqIgEgAS8BACIBQQFqOwEAIAAgAyABEBRrIgU6AAMgACABIAVB/wFxdCAHazsBACACQQFqIQIMAQsLCyEFIAhBgARqJAAgBQvjBgEIf0FsIQcCQCACQQNJDQACQAJAAkACQCABLQAAIgNBA3EiCUEBaw4DAwEAAgsgACgCiOEBDQBBYg8LIAJBBUkNAkEDIQYgASgAACEFAn8CQAJAIANBAnZBA3EiCEF+aiIEQQFNBEAgBEEBaw0BDAILIAVBDnZB/wdxIQQgBUEEdkH/B3EhAyAIRQwCCyAFQRJ2IQRBBCEGIAVBBHZB//8AcSEDQQAMAQsgBUEEdkH//w9xIgNBgIAISw0DIAEtAARBCnQgBUEWdnIhBEEFIQZBAAshBSAEIAZqIgogAksNAgJAIANBgQZJDQAgACgCnOIBRQ0AQQAhAgNAIAJBg4ABSw0BIAJBQGshAgwAAAsACwJ/IAlBA0YEQCABIAZqIQEgAEHw4gFqIQIgACgCDCEGIAUEQCACIAMgASAEIAYQXwwCCyACIAMgASAEIAYQXQwBCyAAQbjQAWohAiABIAZqIQEgAEHw4gFqIQYgAEGo0ABqIQggBQRAIAggBiADIAEgBCACEF4MAQsgCCAGIAMgASAEIAIQXAsQAw0CIAAgAzYCgOIBIABBATYCiOEBIAAgAEHw4gFqNgLw4QEgCUECRgRAIAAgAEGo0ABqNgIMCyAAIANqIgBBiOMBakIANwAAIABBgOMBakIANwAAIABB+OIBakIANwAAIABB8OIBakIANwAAIAoPCwJ/AkACQAJAIANBAnZBA3FBf2oiBEECSw0AIARBAWsOAgACAQtBASEEIANBA3YMAgtBAiEEIAEvAABBBHYMAQtBAyEEIAEQIUEEdgsiAyAEaiIFQSBqIAJLBEAgBSACSw0CIABB8OIBaiABIARqIAMQCyEBIAAgAzYCgOIBIAAgATYC8OEBIAEgA2oiAEIANwAYIABCADcAECAAQgA3AAggAEIANwAAIAUPCyAAIAM2AoDiASAAIAEgBGo2AvDhASAFDwsCfwJAAkACQCADQQJ2QQNxQX9qIgRBAksNACAEQQFrDgIAAgELQQEhByADQQN2DAILQQIhByABLwAAQQR2DAELIAJBBEkgARAhIgJBj4CAAUtyDQFBAyEHIAJBBHYLIQIgAEHw4gFqIAEgB2otAAAgAkEgahAQIQEgACACNgKA4gEgACABNgLw4QEgB0EBaiEHCyAHC0sAIABC+erQ0OfJoeThADcDICAAQgA3AxggAELP1tO+0ser2UI3AxAgAELW64Lu6v2J9eAANwMIIABCADcDACAAQShqQQBBKBAQGgviAgICfwV+IABBKGoiASAAKAJIaiECAn4gACkDACIDQiBaBEAgACkDECIEQgeJIAApAwgiBUIBiXwgACkDGCIGQgyJfCAAKQMgIgdCEol8IAUQGSAEEBkgBhAZIAcQGQwBCyAAKQMYQsXP2bLx5brqJ3wLIAN8IQMDQCABQQhqIgAgAk0EQEIAIAEpAAAQCSADhUIbiUKHla+vmLbem55/fkLj3MqV/M7y9YV/fCEDIAAhAQwBCwsCQCABQQRqIgAgAksEQCABIQAMAQsgASgAAK1Ch5Wvr5i23puef34gA4VCF4lCz9bTvtLHq9lCfkL5893xmfaZqxZ8IQMLA0AgACACSQRAIAAxAABCxc/ZsvHluuonfiADhUILiUKHla+vmLbem55/fiEDIABBAWohAAwBCwsgA0IhiCADhULP1tO+0ser2UJ+IgNCHYggA4VC+fPd8Zn2masWfiIDQiCIIAOFC+8CAgJ/BH4gACAAKQMAIAKtfDcDAAJAAkAgACgCSCIDIAJqIgRBH00EQCABRQ0BIAAgA2pBKGogASACECAgACgCSCACaiEEDAELIAEgAmohAgJ/IAMEQCAAQShqIgQgA2ogAUEgIANrECAgACAAKQMIIAQpAAAQCTcDCCAAIAApAxAgACkAMBAJNwMQIAAgACkDGCAAKQA4EAk3AxggACAAKQMgIABBQGspAAAQCTcDICAAKAJIIQMgAEEANgJIIAEgA2tBIGohAQsgAUEgaiACTQsEQCACQWBqIQMgACkDICEFIAApAxghBiAAKQMQIQcgACkDCCEIA0AgCCABKQAAEAkhCCAHIAEpAAgQCSEHIAYgASkAEBAJIQYgBSABKQAYEAkhBSABQSBqIgEgA00NAAsgACAFNwMgIAAgBjcDGCAAIAc3AxAgACAINwMICyABIAJPDQEgAEEoaiABIAIgAWsiBBAgCyAAIAQ2AkgLCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQEBogAwVBun8LCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQCxogAwVBun8LC6gCAQZ/IwBBEGsiByQAIABB2OABaikDAEKAgIAQViEIQbh/IQUCQCAEQf//B0sNACAAIAMgBBBCIgUQAyIGDQAgACgCnOIBIQkgACAHQQxqIAMgAyAFaiAGGyIKIARBACAFIAYbayIGEEAiAxADBEAgAyEFDAELIAcoAgwhBCABRQRAQbp/IQUgBEEASg0BCyAGIANrIQUgAyAKaiEDAkAgCQRAIABBADYCnOIBDAELAkACQAJAIARBBUgNACAAQdjgAWopAwBCgICACFgNAAwBCyAAQQA2ApziAQwBCyAAKAIIED8hBiAAQQA2ApziASAGQRRPDQELIAAgASACIAMgBSAEIAgQOSEFDAELIAAgASACIAMgBSAEIAgQOiEFCyAHQRBqJAAgBQtnACAAQdDgAWogASACIAAoAuzhARAuIgEQAwRAIAEPC0G4fyECAkAgAQ0AIABB7OABaigCACIBBEBBYCECIAAoApjiASABRw0BC0EAIQIgAEHw4AFqKAIARQ0AIABBkOEBahBDCyACCycBAX8QVyIERQRAQUAPCyAEIAAgASACIAMgBBBLEE8hACAEEFYgAAs/AQF/AkACQAJAIAAoAqDiAUEBaiIBQQJLDQAgAUEBaw4CAAECCyAAEDBBAA8LIABBADYCoOIBCyAAKAKU4gELvAMCB38BfiMAQRBrIgkkAEG4fyEGAkAgBCgCACIIQQVBCSAAKALs4QEiBRtJDQAgAygCACIHQQFBBSAFGyAFEC8iBRADBEAgBSEGDAELIAggBUEDakkNACAAIAcgBRBJIgYQAw0AIAEgAmohCiAAQZDhAWohCyAIIAVrIQIgBSAHaiEHIAEhBQNAIAcgAiAJECwiBhADDQEgAkF9aiICIAZJBEBBuH8hBgwCCyAJKAIAIghBAksEQEFsIQYMAgsgB0EDaiEHAn8CQAJAAkAgCEEBaw4CAgABCyAAIAUgCiAFayAHIAYQSAwCCyAFIAogBWsgByAGEEcMAQsgBSAKIAVrIActAAAgCSgCCBBGCyIIEAMEQCAIIQYMAgsgACgC8OABBEAgCyAFIAgQRQsgAiAGayECIAYgB2ohByAFIAhqIQUgCSgCBEUNAAsgACkD0OABIgxCf1IEQEFsIQYgDCAFIAFrrFINAQsgACgC8OABBEBBaiEGIAJBBEkNASALEEQhDCAHKAAAIAynRw0BIAdBBGohByACQXxqIQILIAMgBzYCACAEIAI2AgAgBSABayEGCyAJQRBqJAAgBgsuACAAECsCf0EAQQAQAw0AGiABRSACRXJFBEBBYiAAIAEgAhA9EAMNARoLQQALCzcAIAEEQCAAIAAoAsTgASABKAIEIAEoAghqRzYCnOIBCyAAECtBABADIAFFckUEQCAAIAEQWwsL0QIBB38jAEEQayIGJAAgBiAENgIIIAYgAzYCDCAFBEAgBSgCBCEKIAUoAgghCQsgASEIAkACQANAIAAoAuzhARAWIQsCQANAIAQgC0kNASADKAAAQXBxQdDUtMIBRgRAIAMgBBAiIgcQAw0EIAQgB2shBCADIAdqIQMMAQsLIAYgAzYCDCAGIAQ2AggCQCAFBEAgACAFEE5BACEHQQAQA0UNAQwFCyAAIAogCRBNIgcQAw0ECyAAIAgQUCAMQQFHQQAgACAIIAIgBkEMaiAGQQhqEEwiByIDa0EAIAMQAxtBCkdyRQRAQbh/IQcMBAsgBxADDQMgAiAHayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQMgVBuH8LC78DAQN/IwBBIGsiBSQAIAVBCGogAiADEAYiAhADRQRAIAAgAWoiB0F9aiEGIAUgBBAOIARBBGohAiAFLQACIQMDQEEAIAAgBkkgBUEIahAEGwRAIAAgAiAFQQhqIAMQAkECdGoiBC8BADsAACAFQQhqIAQtAAIQASAAIAQtAANqIgQgAiAFQQhqIAMQAkECdGoiAC8BADsAACAFQQhqIAAtAAIQASAEIAAtAANqIQAMAQUgB0F+aiEEA0AgBUEIahAEIAAgBEtyRQRAIAAgAiAFQQhqIAMQAkECdGoiBi8BADsAACAFQQhqIAYtAAIQASAAIAYtAANqIQAMAQsLA0AgACAES0UEQCAAIAIgBUEIaiADEAJBAnRqIgYvAQA7AAAgBUEIaiAGLQACEAEgACAGLQADaiEADAELCwJAIAAgB08NACAAIAIgBUEIaiADEAIiA0ECdGoiAC0AADoAACAALQADQQFGBEAgBUEIaiAALQACEAEMAQsgBSgCDEEfSw0AIAVBCGogAiADQQJ0ai0AAhABIAUoAgxBIUkNACAFQSA2AgwLIAFBbCAFQQhqEAobIQILCwsgBUEgaiQAIAILkgIBBH8jAEFAaiIJJAAgCSADQTQQCyEDAkAgBEECSA0AIAMgBEECdGooAgAhCSADQTxqIAgQIyADQQE6AD8gAyACOgA+QQAhBCADKAI8IQoDQCAEIAlGDQEgACAEQQJ0aiAKNgEAIARBAWohBAwAAAsAC0EAIQkDQCAGIAlGRQRAIAMgBSAJQQF0aiIKLQABIgtBAnRqIgwoAgAhBCADQTxqIAotAABBCHQgCGpB//8DcRAjIANBAjoAPyADIAcgC2siCiACajoAPiAEQQEgASAKa3RqIQogAygCPCELA0AgACAEQQJ0aiALNgEAIARBAWoiBCAKSQ0ACyAMIAo2AgAgCUEBaiEJDAELCyADQUBrJAALowIBCX8jAEHQAGsiCSQAIAlBEGogBUE0EAsaIAcgBmshDyAHIAFrIRADQAJAIAMgCkcEQEEBIAEgByACIApBAXRqIgYtAAEiDGsiCGsiC3QhDSAGLQAAIQ4gCUEQaiAMQQJ0aiIMKAIAIQYgCyAPTwRAIAAgBkECdGogCyAIIAUgCEE0bGogCCAQaiIIQQEgCEEBShsiCCACIAQgCEECdGooAgAiCEEBdGogAyAIayAHIA4QYyAGIA1qIQgMAgsgCUEMaiAOECMgCUEBOgAPIAkgCDoADiAGIA1qIQggCSgCDCELA0AgBiAITw0CIAAgBkECdGogCzYBACAGQQFqIQYMAAALAAsgCUHQAGokAA8LIAwgCDYCACAKQQFqIQoMAAALAAs0ACAAIAMgBCAFEDYiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQNAVBuH8LCyMAIAA/AEEQdGtB//8DakEQdkAAQX9GBEBBAA8LQQAQAEEBCzsBAX8gAgRAA0AgACABIAJBgCAgAkGAIEkbIgMQCyEAIAFBgCBqIQEgAEGAIGohACACIANrIgINAAsLCwYAIAAQAwsLqBUJAEGICAsNAQAAAAEAAAACAAAAAgBBoAgLswYBAAAAAQAAAAIAAAACAAAAJgAAAIIAAAAhBQAASgAAAGcIAAAmAAAAwAEAAIAAAABJBQAASgAAAL4IAAApAAAALAIAAIAAAABJBQAASgAAAL4IAAAvAAAAygIAAIAAAACKBQAASgAAAIQJAAA1AAAAcwMAAIAAAACdBQAASgAAAKAJAAA9AAAAgQMAAIAAAADrBQAASwAAAD4KAABEAAAAngMAAIAAAABNBgAASwAAAKoKAABLAAAAswMAAIAAAADBBgAATQAAAB8NAABNAAAAUwQAAIAAAAAjCAAAUQAAAKYPAABUAAAAmQQAAIAAAABLCQAAVwAAALESAABYAAAA2gQAAIAAAABvCQAAXQAAACMUAABUAAAARQUAAIAAAABUCgAAagAAAIwUAABqAAAArwUAAIAAAAB2CQAAfAAAAE4QAAB8AAAA0gIAAIAAAABjBwAAkQAAAJAHAACSAAAAAAAAAAEAAAABAAAABQAAAA0AAAAdAAAAPQAAAH0AAAD9AAAA/QEAAP0DAAD9BwAA/Q8AAP0fAAD9PwAA/X8AAP3/AAD9/wEA/f8DAP3/BwD9/w8A/f8fAP3/PwD9/38A/f//AP3//wH9//8D/f//B/3//w/9//8f/f//P/3//38AAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACUAAAAnAAAAKQAAACsAAAAvAAAAMwAAADsAAABDAAAAUwAAAGMAAACDAAAAAwEAAAMCAAADBAAAAwgAAAMQAAADIAAAA0AAAAOAAAADAAEAQeAPC1EBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAQcQQC4sBAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABIAAAAUAAAAFgAAABgAAAAcAAAAIAAAACgAAAAwAAAAQAAAAIAAAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAQAAAAIAAAAAAAQBBkBIL5gQBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAAAEAAAAEAAAACAAAAAAAAAABAAEBBgAAAAAAAAQAAAAAEAAABAAAAAAgAAAFAQAAAAAAAAUDAAAAAAAABQQAAAAAAAAFBgAAAAAAAAUHAAAAAAAABQkAAAAAAAAFCgAAAAAAAAUMAAAAAAAABg4AAAAAAAEFEAAAAAAAAQUUAAAAAAABBRYAAAAAAAIFHAAAAAAAAwUgAAAAAAAEBTAAAAAgAAYFQAAAAAAABwWAAAAAAAAIBgABAAAAAAoGAAQAAAAADAYAEAAAIAAABAAAAAAAAAAEAQAAAAAAAAUCAAAAIAAABQQAAAAAAAAFBQAAACAAAAUHAAAAAAAABQgAAAAgAAAFCgAAAAAAAAULAAAAAAAABg0AAAAgAAEFEAAAAAAAAQUSAAAAIAABBRYAAAAAAAIFGAAAACAAAwUgAAAAAAADBSgAAAAAAAYEQAAAABAABgRAAAAAIAAHBYAAAAAAAAkGAAIAAAAACwYACAAAMAAABAAAAAAQAAAEAQAAACAAAAUCAAAAIAAABQMAAAAgAAAFBQAAACAAAAUGAAAAIAAABQgAAAAgAAAFCQAAACAAAAULAAAAIAAABQwAAAAAAAAGDwAAACAAAQUSAAAAIAABBRQAAAAgAAIFGAAAACAAAgUcAAAAIAADBSgAAAAgAAQFMAAAAAAAEAYAAAEAAAAPBgCAAAAAAA4GAEAAAAAADQYAIABBgBcLhwIBAAEBBQAAAAAAAAUAAAAAAAAGBD0AAAAAAAkF/QEAAAAADwX9fwAAAAAVBf3/HwAAAAMFBQAAAAAABwR9AAAAAAAMBf0PAAAAABIF/f8DAAAAFwX9/38AAAAFBR0AAAAAAAgE/QAAAAAADgX9PwAAAAAUBf3/DwAAAAIFAQAAABAABwR9AAAAAAALBf0HAAAAABEF/f8BAAAAFgX9/z8AAAAEBQ0AAAAQAAgE/QAAAAAADQX9HwAAAAATBf3/BwAAAAEFAQAAABAABgQ9AAAAAAAKBf0DAAAAABAF/f8AAAAAHAX9//8PAAAbBf3//wcAABoF/f//AwAAGQX9//8BAAAYBf3//wBBkBkLhgQBAAEBBgAAAAAAAAYDAAAAAAAABAQAAAAgAAAFBQAAAAAAAAUGAAAAAAAABQgAAAAAAAAFCQAAAAAAAAULAAAAAAAABg0AAAAAAAAGEAAAAAAAAAYTAAAAAAAABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ";export{Q as ZSTDDecoder}; diff --git a/node_modules/three/examples/jsm/lights/IESSpotLight.js b/node_modules/three/examples/jsm/lights/IESSpotLight.js new file mode 100644 index 0000000..817f378 --- /dev/null +++ b/node_modules/three/examples/jsm/lights/IESSpotLight.js @@ -0,0 +1,25 @@ +import { SpotLight } from 'three'; + +class IESSpotLight extends SpotLight { + + constructor( color, intensity, distance, angle, penumbra, decay ) { + + super( color, intensity, distance, angle, penumbra, decay ); + + this.iesMap = null; + + } + + copy( source, recursive ) { + + super.copy( source, recursive ); + + this.iesMap = source.iesMap; + + return this; + + } + +} + +export default IESSpotLight; diff --git a/node_modules/three/examples/jsm/lights/LightProbeGenerator.js b/node_modules/three/examples/jsm/lights/LightProbeGenerator.js new file mode 100644 index 0000000..4bd9896 --- /dev/null +++ b/node_modules/three/examples/jsm/lights/LightProbeGenerator.js @@ -0,0 +1,286 @@ +import { + Color, + LightProbe, + LinearSRGBColorSpace, + SphericalHarmonics3, + Vector3, + SRGBColorSpace, + NoColorSpace, + HalfFloatType, + DataUtils +} from 'three'; + +class LightProbeGenerator { + + // https://www.ppsloan.org/publications/StupidSH36.pdf + static fromCubeTexture( cubeTexture ) { + + let totalWeight = 0; + + const coord = new Vector3(); + + const dir = new Vector3(); + + const color = new Color(); + + const shBasis = [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; + + const sh = new SphericalHarmonics3(); + const shCoefficients = sh.coefficients; + + for ( let faceIndex = 0; faceIndex < 6; faceIndex ++ ) { + + const image = cubeTexture.image[ faceIndex ]; + + const width = image.width; + const height = image.height; + + const canvas = document.createElement( 'canvas' ); + + canvas.width = width; + canvas.height = height; + + const context = canvas.getContext( '2d' ); + + context.drawImage( image, 0, 0, width, height ); + + const imageData = context.getImageData( 0, 0, width, height ); + + const data = imageData.data; + + const imageWidth = imageData.width; // assumed to be square + + const pixelSize = 2 / imageWidth; + + for ( let i = 0, il = data.length; i < il; i += 4 ) { // RGBA assumed + + // pixel color + color.setRGB( data[ i ] / 255, data[ i + 1 ] / 255, data[ i + 2 ] / 255 ); + + // convert to linear color space + convertColorToLinear( color, cubeTexture.colorSpace ); + + // pixel coordinate on unit cube + + const pixelIndex = i / 4; + + const col = - 1 + ( pixelIndex % imageWidth + 0.5 ) * pixelSize; + + const row = 1 - ( Math.floor( pixelIndex / imageWidth ) + 0.5 ) * pixelSize; + + switch ( faceIndex ) { + + case 0: coord.set( - 1, row, - col ); break; + + case 1: coord.set( 1, row, col ); break; + + case 2: coord.set( - col, 1, - row ); break; + + case 3: coord.set( - col, - 1, row ); break; + + case 4: coord.set( - col, row, 1 ); break; + + case 5: coord.set( col, row, - 1 ); break; + + } + + // weight assigned to this pixel + + const lengthSq = coord.lengthSq(); + + const weight = 4 / ( Math.sqrt( lengthSq ) * lengthSq ); + + totalWeight += weight; + + // direction vector to this pixel + dir.copy( coord ).normalize(); + + // evaluate SH basis functions in direction dir + SphericalHarmonics3.getBasisAt( dir, shBasis ); + + // accummuulate + for ( let j = 0; j < 9; j ++ ) { + + shCoefficients[ j ].x += shBasis[ j ] * color.r * weight; + shCoefficients[ j ].y += shBasis[ j ] * color.g * weight; + shCoefficients[ j ].z += shBasis[ j ] * color.b * weight; + + } + + } + + } + + // normalize + const norm = ( 4 * Math.PI ) / totalWeight; + + for ( let j = 0; j < 9; j ++ ) { + + shCoefficients[ j ].x *= norm; + shCoefficients[ j ].y *= norm; + shCoefficients[ j ].z *= norm; + + } + + return new LightProbe( sh ); + + } + + static fromCubeRenderTarget( renderer, cubeRenderTarget ) { + + // The renderTarget must be set to RGBA in order to make readRenderTargetPixels works + let totalWeight = 0; + + const coord = new Vector3(); + + const dir = new Vector3(); + + const color = new Color(); + + const shBasis = [ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; + + const sh = new SphericalHarmonics3(); + const shCoefficients = sh.coefficients; + + const dataType = cubeRenderTarget.texture.type; + + for ( let faceIndex = 0; faceIndex < 6; faceIndex ++ ) { + + const imageWidth = cubeRenderTarget.width; // assumed to be square + + let data; + + if ( dataType === HalfFloatType ) { + + data = new Uint16Array( imageWidth * imageWidth * 4 ); + + } else { + + // assuming UnsignedByteType + + data = new Uint8Array( imageWidth * imageWidth * 4 ); + + } + + renderer.readRenderTargetPixels( cubeRenderTarget, 0, 0, imageWidth, imageWidth, data, faceIndex ); + + const pixelSize = 2 / imageWidth; + + for ( let i = 0, il = data.length; i < il; i += 4 ) { // RGBA assumed + + let r, g, b; + + if ( dataType === HalfFloatType ) { + + r = DataUtils.fromHalfFloat( data[ i ] ); + g = DataUtils.fromHalfFloat( data[ i + 1 ] ); + b = DataUtils.fromHalfFloat( data[ i + 2 ] ); + + } else { + + r = data[ i ] / 255; + g = data[ i + 1 ] / 255; + b = data[ i + 2 ] / 255; + + } + + // pixel color + color.setRGB( r, g, b ); + + // convert to linear color space + convertColorToLinear( color, cubeRenderTarget.texture.colorSpace ); + + // pixel coordinate on unit cube + + const pixelIndex = i / 4; + + const col = - 1 + ( pixelIndex % imageWidth + 0.5 ) * pixelSize; + + const row = 1 - ( Math.floor( pixelIndex / imageWidth ) + 0.5 ) * pixelSize; + + switch ( faceIndex ) { + + case 0: coord.set( 1, row, - col ); break; + + case 1: coord.set( - 1, row, col ); break; + + case 2: coord.set( col, 1, - row ); break; + + case 3: coord.set( col, - 1, row ); break; + + case 4: coord.set( col, row, 1 ); break; + + case 5: coord.set( - col, row, - 1 ); break; + + } + + // weight assigned to this pixel + + const lengthSq = coord.lengthSq(); + + const weight = 4 / ( Math.sqrt( lengthSq ) * lengthSq ); + + totalWeight += weight; + + // direction vector to this pixel + dir.copy( coord ).normalize(); + + // evaluate SH basis functions in direction dir + SphericalHarmonics3.getBasisAt( dir, shBasis ); + + // accummuulate + for ( let j = 0; j < 9; j ++ ) { + + shCoefficients[ j ].x += shBasis[ j ] * color.r * weight; + shCoefficients[ j ].y += shBasis[ j ] * color.g * weight; + shCoefficients[ j ].z += shBasis[ j ] * color.b * weight; + + } + + } + + } + + // normalize + const norm = ( 4 * Math.PI ) / totalWeight; + + for ( let j = 0; j < 9; j ++ ) { + + shCoefficients[ j ].x *= norm; + shCoefficients[ j ].y *= norm; + shCoefficients[ j ].z *= norm; + + } + + return new LightProbe( sh ); + + } + +} + +function convertColorToLinear( color, colorSpace ) { + + switch ( colorSpace ) { + + case SRGBColorSpace: + + color.convertSRGBToLinear(); + break; + + case LinearSRGBColorSpace: + case NoColorSpace: + + break; + + default: + + console.warn( 'WARNING: LightProbeGenerator convertColorToLinear() encountered an unsupported color space.' ); + break; + + } + + return color; + +} + +export { LightProbeGenerator }; diff --git a/node_modules/three/examples/jsm/lights/RectAreaLightUniformsLib.js b/node_modules/three/examples/jsm/lights/RectAreaLightUniformsLib.js new file mode 100644 index 0000000..cf916b3 --- /dev/null +++ b/node_modules/three/examples/jsm/lights/RectAreaLightUniformsLib.js @@ -0,0 +1,79 @@ +import { + ClampToEdgeWrapping, + DataTexture, + DataUtils, + FloatType, + HalfFloatType, + LinearFilter, + NearestFilter, + RGBAFormat, + UVMapping, + UniformsLib +} from 'three'; + +/** + * Uniforms library for RectAreaLight shared webgl shaders + * + * NOTE: This is a temporary location for the BRDF approximation texture data + * based off of Eric Heitz's work (see citation below). BRDF data for + * RectAreaLight is currently approximated using a precomputed texture + * of roughly 80kb in size. The hope is to find a better way to include + * the large texture data before including the full RectAreaLight implementation + * in the main build files. + * + * TODO: figure out a way to compress the LTC BRDF data + */ + +// Real-Time Polygonal-Light Shading with Linearly Transformed Cosines +// by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt +// code: https://github.com/selfshadow/ltc_code/ + +class RectAreaLightUniformsLib { + + static init() { + + // source: https://github.com/selfshadow/ltc_code/tree/master/fit/results/ltc.js + + const LTC_MAT_1 = [ 1, 0, 0, 2e-05, 1, 0, 0, 0.000503905, 1, 0, 0, 0.00201562, 1, 0, 0, 0.00453516, 1, 0, 0, 0.00806253, 1, 0, 0, 0.0125978, 1, 0, 0, 0.018141, 1, 0, 0, 0.0246924, 1, 0, 0, 0.0322525, 1, 0, 0, 0.0408213, 1, 0, 0, 0.0503999, 1, 0, 0, 0.0609894, 1, 0, 0, 0.0725906, 1, 0, 0, 0.0852058, 1, 0, 0, 0.0988363, 1, 0, 0, 0.113484, 1, 0, 0, 0.129153, 1, 0, 0, 0.145839, 1, 0, 0, 0.163548, 1, 0, 0, 0.182266, 1, 0, 0, 0.201942, 1, 0, 0, 0.222314, 1, 0, 0, 0.241906, 1, 0, 0, 0.262314, 1, 0, 0, 0.285754, 1, 0, 0, 0.310159, 1, 0, 0, 0.335426, 1, 0, 0, 0.361341, 1, 0, 0, 0.387445, 1, 0, 0, 0.412784, 1, 0, 0, 0.438197, 1, 0, 0, 0.466966, 1, 0, 0, 0.49559, 1, 0, 0, 0.523448, 1, 0, 0, 0.549938, 1, 0, 0, 0.57979, 1, 0, 0, 0.608746, 1, 0, 0, 0.636185, 1, 0, 0, 0.664748, 1, 0, 0, 0.69313, 1, 0, 0, 0.71966, 1, 0, 0, 0.747662, 1, 0, 0, 0.774023, 1, 0, 0, 0.799775, 1, 0, 0, 0.825274, 1, 0, 0, 0.849156, 1, 0, 0, 0.873248, 1, 0, 0, 0.89532, 1, 0, 0, 0.917565, 1, 0, 0, 0.937863, 1, 0, 0, 0.958139, 1, 0, 0, 0.976563, 1, 0, 0, 0.994658, 1, 0, 0, 1.0112, 1, 0, 0, 1.02712, 1, 0, 0, 1.04189, 1, 0, 0, 1.05568, 1, 0, 0, 1.06877, 1, 0, 0, 1.08058, 1, 0, 0, 1.09194, 1, 0, 0, 1.10191, 1, 0, 0, 1.11161, 1, 0, 0, 1.1199, 1, 0, 0, 1.12813, 0.999547, - 4.48815e-07, 0.0224417, 1.99902e-05, 0.999495, - 1.13079e-05, 0.0224406, 0.000503651, 0.999496, - 4.52317e-05, 0.0224406, 0.00201461, 0.999496, - 0.000101772, 0.0224406, 0.00453287, 0.999495, - 0.000180928, 0.0224406, 0.00805845, 0.999497, - 0.000282702, 0.0224406, 0.0125914, 0.999496, - 0.000407096, 0.0224406, 0.0181319, 0.999498, - 0.000554114, 0.0224406, 0.02468, 0.999499, - 0.000723768, 0.0224406, 0.0322363, 0.999495, - 0.000916058, 0.0224405, 0.0408009, 0.999499, - 0.00113101, 0.0224408, 0.050375, 0.999494, - 0.00136863, 0.0224405, 0.0609586, 0.999489, - 0.00162896, 0.0224401, 0.0725537, 0.999489, - 0.00191201, 0.0224414, 0.0851619, 0.999498, - 0.00221787, 0.0224413, 0.0987867, 0.999492, - 0.00254642, 0.0224409, 0.113426, 0.999507, - 0.00289779, 0.0224417, 0.129088, 0.999494, - 0.0032716, 0.0224386, 0.145767, 0.999546, - 0.0036673, 0.0224424, 0.163472, 0.999543, - 0.00408166, 0.0224387, 0.182182, 0.999499, - 0.00450056, 0.0224338, 0.201843, 0.999503, - 0.00483661, 0.0224203, 0.222198, 0.999546, - 0.00452928, 0.022315, 0.241714, 0.999508, - 0.00587403, 0.0224329, 0.262184, 0.999509, - 0.00638806, 0.0224271, 0.285609, 0.999501, - 0.00691028, 0.0224166, 0.309998, 0.999539, - 0.00741979, 0.0223989, 0.335262, 0.999454, - 0.00786282, 0.0223675, 0.361154, 0.999529, - 0.00811928, 0.0222828, 0.387224, 0.999503, - 0.00799941, 0.0221063, 0.41252, 0.999561, - 0.00952753, 0.0223057, 0.438006, 0.999557, - 0.0099134, 0.0222065, 0.466735, 0.999541, - 0.0100935, 0.0220402, 0.495332, 0.999562, - 0.00996821, 0.0218067, 0.523197, 0.999556, - 0.0105031, 0.0217096, 0.550223, 0.999561, - 0.0114191, 0.0217215, 0.579498, 0.999588, - 0.0111818, 0.0213357, 0.608416, 0.999633, - 0.0107725, 0.0208689, 0.635965, 0.999527, - 0.0121671, 0.0210149, 0.664476, 0.999508, - 0.0116005, 0.020431, 0.692786, 0.999568, - 0.0115604, 0.0199791, 0.719709, 0.999671, - 0.0121117, 0.0197415, 0.74737, 0.999688, - 0.0110769, 0.0188846, 0.773692, 0.99962, - 0.0122368, 0.0188452, 0.799534, 0.999823, - 0.0110325, 0.0178001, 0.825046, 0.999599, - 0.0114923, 0.0174221, 0.849075, 0.999619, - 0.0105923, 0.0164345, 0.872999, 0.999613, - 0.0105988, 0.0158227, 0.895371, 0.99964, - 0.00979861, 0.0148131, 0.917364, 0.99977, - 0.00967238, 0.0140721, 0.938002, 0.999726, - 0.00869175, 0.0129543, 0.957917, 0.99973, - 0.00866872, 0.0122329, 0.976557, 0.999773, - 0.00731956, 0.0108958, 0.994459, 0.999811, - 0.00756027, 0.0102715, 1.01118, 0.999862, - 0.00583732, 0.00878781, 1.02701, 0.999835, - 0.00631438, 0.00827529, 1.04186, 0.999871, - 0.00450785, 0.00674583, 1.05569, 0.999867, - 0.00486079, 0.00621041, 1.06861, 0.999939, - 0.00322072, 0.00478301, 1.08064, 0.999918, - 0.00318199, 0.00406395, 1.09181, 1.00003, - 0.00193348, 0.00280682, 1.10207, 0.999928, - 0.00153729, 0.00198741, 1.11152, 0.999933, - 0.000623666, 0.000917714, 1.12009, 1, - 1.02387e-06, 9.07581e-07, 1.12813, 0.997866, - 8.96716e-07, 0.0448334, 1.99584e-05, 0.997987, - 2.25945e-05, 0.0448389, 0.000502891, 0.997987, - 9.03781e-05, 0.0448388, 0.00201156, 0.997985, - 0.000203351, 0.0448388, 0.00452602, 0.997986, - 0.000361514, 0.0448388, 0.00804629, 0.997987, - 0.00056487, 0.0448389, 0.0125724, 0.997988, - 0.000813423, 0.0448389, 0.0181045, 0.997984, - 0.00110718, 0.0448387, 0.0246427, 0.997985, - 0.00144616, 0.0448388, 0.0321875, 0.997987, - 0.00183038, 0.044839, 0.0407392, 0.997983, - 0.00225987, 0.0448387, 0.0502986, 0.997991, - 0.00273467, 0.0448389, 0.0608667, 0.997984, - 0.00325481, 0.0448384, 0.0724444, 0.998002, - 0.00382043, 0.044839, 0.0850348, 0.997997, - 0.00443145, 0.0448396, 0.0986372, 0.998007, - 0.00508796, 0.0448397, 0.113255, 0.998008, - 0.00578985, 0.04484, 0.128891, 0.998003, - 0.00653683, 0.0448384, 0.145548, 0.997983, - 0.00732713, 0.0448358, 0.163221, 0.997985, - 0.00815454, 0.0448358, 0.181899, 0.998005, - 0.00898985, 0.0448286, 0.201533, 0.998026, - 0.00964404, 0.0447934, 0.221821, 0.998055, - 0.00922677, 0.044611, 0.241282, 0.99804, - 0.0117361, 0.0448245, 0.261791, 0.998048, - 0.0127628, 0.0448159, 0.285181, 0.998088, - 0.0138055, 0.0447996, 0.30954, 0.998058, - 0.0148206, 0.0447669, 0.334751, 0.998099, - 0.0156998, 0.044697, 0.36061, 0.998116, - 0.0161976, 0.0445122, 0.386603, 0.998195, - 0.015945, 0.0441711, 0.411844, 0.998168, - 0.0183947, 0.0444255, 0.43773, 0.998184, - 0.0197913, 0.0443809, 0.466009, 0.998251, - 0.0201426, 0.0440689, 0.494574, 0.998305, - 0.0198847, 0.0435632, 0.522405, 0.998273, - 0.0210577, 0.043414, 0.549967, 0.998254, - 0.0227901, 0.0433943, 0.578655, 0.998349, - 0.0223108, 0.0426529, 0.60758, 0.99843, - 0.0223088, 0.042, 0.635524, 0.998373, - 0.0241141, 0.0418987, 0.663621, 0.998425, - 0.0231446, 0.0408118, 0.691906, 0.998504, - 0.0233684, 0.0400565, 0.719339, 0.998443, - 0.0241652, 0.0394634, 0.74643, 0.99848, - 0.0228715, 0.0380002, 0.773086, 0.998569, - 0.023519, 0.0372322, 0.798988, 0.998619, - 0.0223108, 0.0356468, 0.824249, 0.998594, - 0.0223105, 0.034523, 0.848808, 0.998622, - 0.0213426, 0.0328887, 0.87227, 0.998669, - 0.0207912, 0.0314374, 0.895157, 0.998705, - 0.0198416, 0.0296925, 0.916769, 0.998786, - 0.0189168, 0.0279634, 0.937773, 0.998888, - 0.0178811, 0.0261597, 0.957431, 0.99906, - 0.0166845, 0.0242159, 0.976495, 0.999038, - 0.0155464, 0.0222638, 0.994169, 0.999237, - 0.0141349, 0.0201967, 1.01112, 0.999378, - 0.0129324, 0.0181744, 1.02692, 0.999433, - 0.0113192, 0.0159898, 1.04174, 0.999439, - 0.0101244, 0.0140385, 1.05559, 0.999614, - 0.00837456, 0.0117826, 1.06852, 0.999722, - 0.00721769, 0.00983745, 1.08069, 0.999817, - 0.00554067, 0.00769002, 1.09176, 0.99983, - 0.00426961, 0.005782, 1.10211, 0.999964, - 0.00273904, 0.00374503, 1.11152, 1.00001, - 0.00136739, 0.00187176, 1.12031, 0.999946, 3.93227e-05, - 2.8919e-05, 1.12804, 0.995847, - 1.3435e-06, 0.0671785, 1.9916e-05, 0.995464, - 3.38387e-05, 0.0671527, 0.000501622, 0.99547, - 0.000135355, 0.0671531, 0.00200649, 0.995471, - 0.00030455, 0.0671532, 0.00451461, 0.99547, - 0.000541423, 0.0671531, 0.008026, 0.995471, - 0.00084598, 0.0671531, 0.0125407, 0.99547, - 0.00121823, 0.0671531, 0.0180589, 0.99547, - 0.00165817, 0.0671531, 0.0245806, 0.995463, - 0.00216583, 0.0671526, 0.0321062, 0.995468, - 0.00274127, 0.0671527, 0.0406366, 0.995474, - 0.00338447, 0.0671534, 0.0501717, 0.995473, - 0.00409554, 0.0671533, 0.0607131, 0.995478, - 0.00487451, 0.0671531, 0.0722618, 0.995476, - 0.00572148, 0.0671532, 0.0848191, 0.995477, - 0.00663658, 0.0671539, 0.0983882, 0.995498, - 0.00761986, 0.0671541, 0.112972, 0.995509, - 0.00867094, 0.0671542, 0.128568, 0.995509, - 0.00978951, 0.0671531, 0.145183, 0.995503, - 0.0109725, 0.0671491, 0.162808, 0.995501, - 0.012211, 0.0671465, 0.181441, 0.99553, - 0.0134565, 0.0671371, 0.201015, 0.99555, - 0.014391, 0.0670831, 0.221206, 0.99558, - 0.014351, 0.0668883, 0.240813, 0.995577, - 0.0173997, 0.0671055, 0.261257, 0.995602, - 0.0191111, 0.0671178, 0.284467, 0.995623, - 0.0206705, 0.0670946, 0.308765, 0.995658, - 0.022184, 0.0670472, 0.333905, 0.995705, - 0.0234832, 0.0669417, 0.359677, 0.995719, - 0.0241933, 0.0666714, 0.385554, 0.995786, - 0.0243539, 0.066266, 0.410951, 0.995887, - 0.0271866, 0.0664367, 0.437163, 0.995944, - 0.0296012, 0.0664931, 0.464842, 0.996004, - 0.0301045, 0.0660105, 0.49332, 0.996128, - 0.0298311, 0.0652694, 0.521131, 0.996253, - 0.0316426, 0.0650739, 0.549167, 0.996244, - 0.0339043, 0.0649433, 0.57737, 0.996309, - 0.033329, 0.0638926, 0.606073, 0.996417, - 0.0338935, 0.0630849, 0.634527, 0.996372, - 0.0353104, 0.0625083, 0.66256, 0.996542, - 0.0348942, 0.0611986, 0.690516, 0.996568, - 0.0351614, 0.060069, 0.718317, 0.996711, - 0.0354317, 0.0588522, 0.74528, 0.996671, - 0.0349513, 0.0571902, 0.772061, 0.996865, - 0.0345622, 0.0555321, 0.798089, 0.996802, - 0.0342566, 0.0537816, 0.823178, 0.996992, - 0.0330862, 0.0516095, 0.847949, 0.996944, - 0.0324666, 0.0495537, 0.871431, 0.997146, - 0.0309544, 0.0470302, 0.894357, 0.997189, - 0.0299372, 0.0446043, 0.916142, 0.997471, - 0.0281389, 0.0418812, 0.937193, 0.997515, - 0.0268702, 0.0391823, 0.957, 0.997812, - 0.0247166, 0.0361338, 0.975936, 0.998027, - 0.0233525, 0.0333945, 0.99391, 0.998233, - 0.0209839, 0.0301917, 1.01075, 0.998481, - 0.0194309, 0.027271, 1.02669, 0.998859, - 0.0169728, 0.0240162, 1.04173, 0.99894, - 0.0152322, 0.0210517, 1.05551, 0.999132, - 0.0127497, 0.0178632, 1.06856, 0.999369, - 0.0108282, 0.014787, 1.08054, 0.999549, - 0.00845886, 0.0116185, 1.09185, 0.999805, - 0.0063937, 0.00867209, 1.10207, 0.99985, - 0.00414582, 0.00566823, 1.1117, 0.999912, - 0.00207443, 0.00277562, 1.12022, 1.00001, 8.70226e-05, - 5.3766e-05, 1.12832, 0.991943, - 1.78672e-06, 0.0893382, 1.98384e-05, 0.991952, - 4.50183e-05, 0.089339, 0.000499849, 0.991956, - 0.000180074, 0.0893394, 0.0019994, 0.991955, - 0.000405167, 0.0893393, 0.00449867, 0.991953, - 0.000720298, 0.0893391, 0.00799764, 0.991955, - 0.00112548, 0.0893393, 0.0124964, 0.991957, - 0.0016207, 0.0893395, 0.0179951, 0.991958, - 0.00220601, 0.0893396, 0.0244939, 0.991947, - 0.00288137, 0.0893385, 0.0319929, 0.991962, - 0.00364693, 0.0893399, 0.0404933, 0.991965, - 0.00450264, 0.0893399, 0.049995, 0.99198, - 0.00544862, 0.0893411, 0.0604995, 0.99197, - 0.00648491, 0.0893397, 0.0720074, 0.991976, - 0.00761164, 0.089341, 0.0845207, 0.99198, - 0.00882891, 0.0893405, 0.0980413, 0.991982, - 0.0101367, 0.0893396, 0.112571, 0.992008, - 0.011535, 0.0893415, 0.128115, 0.992026, - 0.0130228, 0.0893414, 0.144672, 0.992064, - 0.0145966, 0.0893418, 0.162241, 0.992041, - 0.0162421, 0.0893359, 0.180801, 0.992086, - 0.0178888, 0.0893214, 0.200302, 0.992157, - 0.0190368, 0.0892401, 0.220332, 0.992181, - 0.0195584, 0.0890525, 0.240144, 0.992175, - 0.0227257, 0.0892153, 0.260728, 0.99221, - 0.0254195, 0.089304, 0.283473, 0.99222, - 0.0274883, 0.0892703, 0.307673, 0.992317, - 0.0294905, 0.0892027, 0.332729, 0.992374, - 0.0311861, 0.0890577, 0.358387, 0.992505, - 0.0320656, 0.0886994, 0.384102, 0.992568, - 0.0329715, 0.0883198, 0.409767, 0.992675, - 0.036006, 0.0883602, 0.436145, 0.992746, - 0.0392897, 0.0884591, 0.463217, 0.992873, - 0.0399337, 0.0878287, 0.491557, 0.992934, - 0.040231, 0.0870108, 0.519516, 0.993091, - 0.0422013, 0.0865857, 0.547741, 0.993259, - 0.0443503, 0.0861937, 0.575792, 0.993455, - 0.0446368, 0.0851187, 0.604233, 0.993497, - 0.0454299, 0.0840576, 0.632925, 0.993694, - 0.0463296, 0.0829671, 0.660985, 0.993718, - 0.0470619, 0.0817185, 0.688714, 0.993973, - 0.0468838, 0.0800294, 0.716743, 0.994207, - 0.046705, 0.0781286, 0.74377, 0.994168, - 0.0469698, 0.0763337, 0.77042, 0.9945, - 0.0456816, 0.0738184, 0.796659, 0.994356, - 0.0455518, 0.0715545, 0.821868, 0.994747, - 0.0439488, 0.0686085, 0.846572, 0.994937, - 0.0430056, 0.065869, 0.870435, 0.995142, - 0.0413414, 0.0626446, 0.893272, 0.995451, - 0.0396521, 0.05929, 0.915376, 0.995445, - 0.0378453, 0.0558503, 0.936196, 0.995967, - 0.0355219, 0.0520949, 0.956376, 0.996094, - 0.0335146, 0.048377, 0.975327, 0.996622, - 0.030682, 0.0442575, 0.993471, 0.996938, - 0.0285504, 0.0404693, 1.01052, 0.997383, - 0.0253399, 0.0360903, 1.02637, 0.997714, - 0.0231651, 0.0322176, 1.04139, 0.998249, - 0.0198138, 0.0278433, 1.05542, 0.998596, - 0.0174337, 0.0238759, 1.06846, 0.998946, - 0.0141349, 0.0195944, 1.08056, 0.99928, - 0.0115603, 0.0156279, 1.09181, 0.999507, - 0.00839065, 0.0114607, 1.10213, 0.999697, - 0.005666, 0.00763325, 1.11169, 0.999869, - 0.00269902, 0.00364946, 1.12042, 1.00001, 6.23836e-05, - 3.19288e-05, 1.12832, 0.987221, - 2.22675e-06, 0.111332, 1.97456e-05, 0.98739, - 5.61116e-05, 0.111351, 0.000497563, 0.987448, - 0.000224453, 0.111357, 0.00199031, 0.987441, - 0.000505019, 0.111357, 0.0044782, 0.987442, - 0.000897816, 0.111357, 0.00796129, 0.987442, - 0.00140284, 0.111357, 0.0124396, 0.987444, - 0.00202012, 0.111357, 0.0179132, 0.987442, - 0.00274964, 0.111357, 0.0243824, 0.987446, - 0.00359147, 0.111357, 0.0318474, 0.987435, - 0.00454562, 0.111356, 0.0403086, 0.987461, - 0.00561225, 0.111358, 0.0497678, 0.987458, - 0.00679125, 0.111358, 0.0602239, 0.987443, - 0.0080828, 0.111356, 0.0716792, 0.987476, - 0.0094872, 0.111358, 0.0841364, 0.98749, - 0.0110044, 0.111361, 0.097597, 0.987508, - 0.0126344, 0.111362, 0.112062, 0.987494, - 0.0143767, 0.111357, 0.127533, 0.987526, - 0.0162307, 0.111359, 0.144015, 0.987558, - 0.0181912, 0.111361, 0.161502, 0.987602, - 0.0202393, 0.111355, 0.179979, 0.987692, - 0.022273, 0.111346, 0.199386, 0.987702, - 0.0235306, 0.111215, 0.219183, 0.987789, - 0.0247628, 0.111061, 0.239202, 0.987776, - 0.0280668, 0.111171, 0.259957, 0.987856, - 0.0316751, 0.111327, 0.282198, 0.987912, - 0.0342468, 0.111282, 0.306294, 0.988, - 0.0367205, 0.111198, 0.331219, 0.988055, - 0.0387766, 0.110994, 0.356708, 0.988241, - 0.0397722, 0.110547, 0.382234, 0.988399, - 0.0416076, 0.110198, 0.408227, 0.988539, - 0.0448192, 0.110137, 0.434662, 0.988661, - 0.0483793, 0.110143, 0.461442, 0.988967, - 0.0495895, 0.109453, 0.489318, 0.989073, - 0.0506797, 0.108628, 0.517516, 0.989274, - 0.0526953, 0.108003, 0.545844, 0.989528, - 0.054578, 0.107255, 0.573823, 0.989709, - 0.0561503, 0.106294, 0.601944, 0.989991, - 0.056866, 0.104896, 0.630855, 0.990392, - 0.0572914, 0.103336, 0.658925, 0.990374, - 0.0586224, 0.10189, 0.686661, 0.990747, - 0.0584764, 0.099783, 0.714548, 0.991041, - 0.0582662, 0.0974309, 0.74186, 0.991236, - 0.0584118, 0.0951678, 0.768422, 0.991585, - 0.0573055, 0.0921581, 0.794817, 0.991984, - 0.0564241, 0.0891167, 0.820336, 0.9921, - 0.0553608, 0.085805, 0.84493, 0.992749, - 0.0533816, 0.0820354, 0.868961, 0.99288, - 0.0518661, 0.0782181, 0.891931, 0.993511, - 0.0492492, 0.0738935, 0.914186, 0.993617, - 0.0471956, 0.0696402, 0.93532, 0.99411, - 0.044216, 0.0649659, 0.95543, 0.994595, - 0.0416654, 0.0603177, 0.974685, 0.994976, - 0.0384314, 0.0553493, 0.992807, 0.995579, - 0.0353491, 0.0503942, 1.00996, 0.996069, - 0.0319787, 0.0452123, 1.02606, 0.996718, - 0.028472, 0.0400112, 1.04114, 0.997173, - 0.0250789, 0.0349456, 1.05517, 0.997818, - 0.0213326, 0.029653, 1.0683, 0.998318, - 0.0178509, 0.024549, 1.0805, 0.998853, - 0.0141118, 0.0194197, 1.09177, 0.999218, - 0.0105914, 0.0143869, 1.1022, 0.999594, - 0.00693474, 0.00943517, 1.11175, 0.99975, - 0.00340478, 0.00464051, 1.12056, 1.00001, 0.000109172, - 0.000112821, 1.12853, 0.983383, - 2.66524e-06, 0.133358, 1.96534e-05, 0.981942, - 6.71009e-05, 0.133162, 0.000494804, 0.981946, - 0.000268405, 0.133163, 0.00197923, 0.981944, - 0.000603912, 0.133163, 0.00445326, 0.981941, - 0.00107362, 0.133162, 0.00791693, 0.981946, - 0.00167755, 0.133163, 0.0123703, 0.981944, - 0.00241569, 0.133162, 0.0178135, 0.981945, - 0.00328807, 0.133163, 0.0242466, 0.981945, - 0.00429472, 0.133162, 0.03167, 0.981955, - 0.00543573, 0.133164, 0.0400846, 0.981951, - 0.00671105, 0.133163, 0.0494901, 0.981968, - 0.00812092, 0.133165, 0.0598886, 0.981979, - 0.00966541, 0.133166, 0.0712811, 0.981996, - 0.0113446, 0.133168, 0.083669, 0.982014, - 0.0131585, 0.133169, 0.0970533, 0.982011, - 0.0151073, 0.133167, 0.111438, 0.982062, - 0.0171906, 0.133172, 0.126826, 0.9821, - 0.0194067, 0.133175, 0.143215, 0.982149, - 0.0217502, 0.133176, 0.160609, 0.982163, - 0.0241945, 0.133173, 0.178981, 0.982247, - 0.0265907, 0.133148, 0.198249, 0.982291, - 0.027916, 0.132974, 0.217795, 0.982396, - 0.0299663, 0.132868, 0.238042, 0.982456, - 0.0334544, 0.132934, 0.258901, 0.982499, - 0.0378636, 0.133137, 0.280639, 0.982617, - 0.0409274, 0.133085, 0.304604, 0.98274, - 0.0438523, 0.132985, 0.329376, 0.982944, - 0.0462288, 0.132728, 0.354697, 0.98308, - 0.0475995, 0.132228, 0.380102, 0.983391, - 0.0501901, 0.131924, 0.406256, 0.983514, - 0.0535899, 0.131737, 0.432735, 0.98373, - 0.0571858, 0.131567, 0.459359, 0.984056, - 0.0592353, 0.130932, 0.486637, 0.984234, - 0.0610488, 0.130092, 0.51509, 0.984748, - 0.0630758, 0.12923, 0.543461, 0.985073, - 0.0647398, 0.128174, 0.571376, 0.985195, - 0.0671941, 0.127133, 0.599414, 0.985734, - 0.0681345, 0.125576, 0.628134, 0.986241, - 0.0686089, 0.123639, 0.656399, 0.986356, - 0.0698511, 0.121834, 0.684258, 0.986894, - 0.0700931, 0.119454, 0.711818, 0.987382, - 0.0698321, 0.116718, 0.739511, 0.988109, - 0.0693975, 0.113699, 0.766267, 0.988363, - 0.0689584, 0.110454, 0.792456, 0.989112, - 0.0672353, 0.106602, 0.81813, 0.989241, - 0.0662034, 0.10267, 0.842889, 0.990333, - 0.0638938, 0.0981381, 0.867204, 0.990591, - 0.0618534, 0.0935388, 0.89038, 0.991106, - 0.0593117, 0.088553, 0.912576, 0.991919, - 0.0562676, 0.0832187, 0.934118, 0.992111, - 0.0534085, 0.0778302, 0.954254, 0.992997, - 0.0495459, 0.0720453, 0.973722, 0.993317, - 0.0463707, 0.0663458, 0.991949, 0.994133, - 0.0421245, 0.0601883, 1.00936, 0.994705, - 0.0384977, 0.0542501, 1.02559, 0.995495, - 0.0340956, 0.0479862, 1.04083, 0.996206, - 0.030105, 0.041887, 1.05497, 0.996971, - 0.0256095, 0.0355355, 1.06824, 0.997796, - 0.0213932, 0.0293655, 1.08056, 0.998272, - 0.0169612, 0.0232926, 1.09182, 0.998857, - 0.0126756, 0.0172786, 1.10219, 0.99939, - 0.00832486, 0.0113156, 1.11192, 0.999752, - 0.00410826, 0.00557892, 1.12075, 1, 0.000150957, - 0.000119101, 1.12885, 0.975169, - 3.09397e-06, 0.154669, 1.95073e-05, 0.975439, - 7.79608e-05, 0.154712, 0.000491534, 0.975464, - 0.000311847, 0.154716, 0.00196617, 0.975464, - 0.000701656, 0.154716, 0.00442387, 0.975462, - 0.0012474, 0.154715, 0.0078647, 0.975461, - 0.00194906, 0.154715, 0.0122886, 0.975464, - 0.00280667, 0.154715, 0.0176959, 0.975468, - 0.00382025, 0.154716, 0.0240867, 0.975471, - 0.00498985, 0.154716, 0.0314612, 0.975472, - 0.00631541, 0.154717, 0.0398199, 0.975486, - 0.00779719, 0.154718, 0.0491639, 0.975489, - 0.00943505, 0.154718, 0.0594932, 0.975509, - 0.0112295, 0.154721, 0.0708113, 0.97554, - 0.0131802, 0.154724, 0.0831176, 0.975557, - 0.0152876, 0.154726, 0.096415, 0.975585, - 0.0175512, 0.154728, 0.110705, 0.975605, - 0.0199713, 0.154729, 0.125992, 0.975645, - 0.0225447, 0.154729, 0.142272, 0.975711, - 0.0252649, 0.154735, 0.159549, 0.975788, - 0.0280986, 0.154736, 0.177805, 0.975872, - 0.0308232, 0.154704, 0.196911, 0.975968, - 0.0324841, 0.154525, 0.216324, 0.976063, - 0.0351281, 0.154432, 0.236628, 0.976157, - 0.0388618, 0.15446, 0.257539, 0.976204, - 0.0437704, 0.154665, 0.278975, 0.976358, - 0.047514, 0.154652, 0.302606, 0.976571, - 0.0508638, 0.154535, 0.327204, 0.976725, - 0.0534995, 0.154221, 0.352276, 0.977013, - 0.0555547, 0.153737, 0.377696, 0.977294, - 0.0586728, 0.153403, 0.403855, 0.977602, - 0.0622715, 0.15312, 0.430333, 0.977932, - 0.0658166, 0.152755, 0.456855, 0.978241, - 0.0689877, 0.152233, 0.483668, 0.978602, - 0.0712805, 0.15132, 0.512097, 0.979234, - 0.0732775, 0.150235, 0.540455, 0.97977, - 0.075163, 0.148978, 0.568486, 0.979995, - 0.0778026, 0.147755, 0.596524, 0.98078, - 0.0791854, 0.146019, 0.624825, 0.981628, - 0.0799666, 0.143906, 0.653403, 0.982067, - 0.0808532, 0.141561, 0.681445, 0.98271, - 0.0816024, 0.139025, 0.708918, 0.983734, - 0.0812511, 0.135764, 0.736594, 0.98431, - 0.0806201, 0.132152, 0.763576, 0.985071, - 0.0801605, 0.12846, 0.789797, 0.98618, - 0.0784208, 0.124084, 0.815804, 0.986886, - 0.0766643, 0.1193, 0.840869, 0.987485, - 0.0747744, 0.114236, 0.864952, 0.988431, - 0.0716701, 0.108654, 0.888431, 0.988886, - 0.0691609, 0.102994, 0.910963, 0.990024, - 0.0654048, 0.0967278, 0.932629, 0.990401, - 0.0619765, 0.090384, 0.95313, 0.991093, - 0.0579296, 0.0837885, 0.972587, 0.992018, - 0.0536576, 0.0770171, 0.991184, 0.992536, - 0.0493719, 0.0701486, 1.00863, 0.993421, - 0.0444813, 0.062953, 1.02494, 0.993928, - 0.040008, 0.0560455, 1.04017, 0.994994, - 0.0347982, 0.04856, 1.05463, 0.995866, - 0.0301017, 0.0416152, 1.06807, 0.996916, - 0.0248225, 0.0342597, 1.08039, 0.997766, - 0.0199229, 0.0271668, 1.09177, 0.998479, - 0.0147422, 0.0201387, 1.10235, 0.99921, - 0.00980173, 0.0131944, 1.11206, 0.999652, - 0.0047426, 0.00640712, 1.12104, 0.999998, 8.91673e-05, - 0.00010379, 1.12906, 0.967868, - 3.51885e-06, 0.175947, 1.93569e-05, 0.968001, - 8.86733e-05, 0.175972, 0.000487782, 0.96801, - 0.000354697, 0.175973, 0.00195115, 0.968012, - 0.000798063, 0.175974, 0.00439006, 0.968011, - 0.00141879, 0.175973, 0.00780461, 0.968011, - 0.00221686, 0.175973, 0.0121948, 0.968016, - 0.00319231, 0.175974, 0.0175607, 0.968019, - 0.00434515, 0.175974, 0.0239027, 0.968018, - 0.00567538, 0.175974, 0.0312208, 0.968033, - 0.00718308, 0.175977, 0.0395158, 0.968049, - 0.00886836, 0.175979, 0.0487885, 0.968047, - 0.0107312, 0.175978, 0.0590394, 0.968072, - 0.0127719, 0.175981, 0.0702705, 0.968108, - 0.0149905, 0.175986, 0.0824836, 0.968112, - 0.0173866, 0.175985, 0.0956783, 0.968173, - 0.0199611, 0.175993, 0.109862, 0.96827, - 0.0227128, 0.176008, 0.125033, 0.968292, - 0.025639, 0.17601, 0.141193, 0.968339, - 0.0287299, 0.176007, 0.158336, 0.968389, - 0.0319399, 0.176001, 0.176441, 0.968501, - 0.034941, 0.175962, 0.195359, 0.968646, - 0.0370812, 0.175793, 0.214686, 0.968789, - 0.0402329, 0.175708, 0.234973, 0.96886, - 0.0442601, 0.1757, 0.255871, 0.969013, - 0.049398, 0.175876, 0.277238, 0.969242, - 0.0539932, 0.17594, 0.300326, 0.969419, - 0.0577299, 0.175781, 0.324702, 0.969763, - 0.0605643, 0.175432, 0.349527, 0.970093, - 0.0634488, 0.174992, 0.374976, 0.970361, - 0.0670589, 0.174611, 0.401097, 0.970825, - 0.0708246, 0.174226, 0.427496, 0.971214, - 0.0742871, 0.173684, 0.453858, 0.971622, - 0.0782608, 0.173186, 0.480637, 0.972175, - 0.0813151, 0.172288, 0.508655, 0.972944, - 0.0832678, 0.170979, 0.536973, 0.973595, - 0.0855964, 0.169573, 0.565138, 0.974345, - 0.0882163, 0.168152, 0.593222, 0.975233, - 0.0901671, 0.166314, 0.621201, 0.976239, - 0.0912111, 0.163931, 0.649919, 0.977289, - 0.0916959, 0.161106, 0.678011, 0.978076, - 0.0927061, 0.158272, 0.705717, 0.979533, - 0.0925562, 0.15475, 0.733228, 0.980335, - 0.0918159, 0.150638, 0.760454, 0.981808, - 0.0908508, 0.146201, 0.786918, 0.983061, - 0.0896172, 0.141386, 0.812953, 0.984148, - 0.0871588, 0.135837, 0.838281, 0.985047, - 0.0850624, 0.130135, 0.862594, 0.986219, - 0.0818541, 0.123882, 0.88633, 0.987043, - 0.0784523, 0.117126, 0.908952, 0.988107, - 0.0749601, 0.110341, 0.930744, 0.988955, - 0.0703548, 0.102885, 0.951728, 0.989426, - 0.0662798, 0.0954167, 0.971166, 0.990421, - 0.0610834, 0.0876331, 0.989984, 0.991032, - 0.0562936, 0.0797785, 1.00765, 0.992041, - 0.0508154, 0.0718166, 1.02434, 0.992794, - 0.0454045, 0.0637125, 1.03976, 0.993691, - 0.0398194, 0.0555338, 1.05418, 0.994778, - 0.0341482, 0.0473388, 1.06772, 0.995915, - 0.028428, 0.0391016, 1.08028, 0.997109, - 0.022642, 0.0309953, 1.09185, 0.998095, - 0.0168738, 0.0230288, 1.10247, 0.998985, - 0.0111274, 0.0150722, 1.11229, 0.999581, - 0.00543881, 0.00740605, 1.12131, 1.00003, 0.000162239, - 0.000105549, 1.12946, 0.959505, - 3.93734e-06, 0.196876, 1.91893e-05, 0.959599, - 9.92157e-05, 0.196895, 0.000483544, 0.959641, - 0.000396868, 0.196903, 0.0019342, 0.959599, - 0.000892948, 0.196895, 0.00435193, 0.959603, - 0.00158747, 0.196896, 0.0077368, 0.959604, - 0.00248042, 0.196896, 0.0120888, 0.959605, - 0.00357184, 0.196896, 0.0174082, 0.959605, - 0.00486169, 0.196896, 0.0236949, 0.959613, - 0.00635008, 0.196897, 0.0309497, 0.959619, - 0.00803696, 0.196898, 0.0391725, 0.959636, - 0.00992255, 0.196901, 0.0483649, 0.959634, - 0.0120067, 0.1969, 0.0585266, 0.959675, - 0.0142898, 0.196906, 0.0696609, 0.959712, - 0.0167717, 0.196911, 0.0817678, 0.959752, - 0.0194524, 0.196918, 0.0948494, 0.959807, - 0.0223321, 0.196925, 0.10891, 0.959828, - 0.0254091, 0.196924, 0.123947, 0.959906, - 0.0286815, 0.196934, 0.139968, 0.960005, - 0.0321371, 0.196944, 0.156968, 0.960071, - 0.0357114, 0.196936, 0.17491, 0.960237, - 0.0389064, 0.196882, 0.193597, 0.960367, - 0.041623, 0.196731, 0.21285, 0.960562, - 0.0452655, 0.196654, 0.233075, 0.960735, - 0.0496207, 0.196643, 0.253941, 0.960913, - 0.0549379, 0.196774, 0.275278, 0.961121, - 0.0603414, 0.196893, 0.297733, 0.96139, - 0.0644244, 0.196717, 0.321877, 0.961818, - 0.067556, 0.196314, 0.346476, 0.962175, - 0.0712709, 0.195917, 0.371907, 0.96255, - 0.0752848, 0.1955, 0.397916, 0.963164, - 0.0792073, 0.195026, 0.424229, 0.963782, - 0.0828225, 0.194424, 0.450637, 0.964306, - 0.0873119, 0.193831, 0.477288, 0.964923, - 0.0911051, 0.192973, 0.504716, 0.966048, - 0.093251, 0.19151, 0.533053, 0.967024, - 0.0958983, 0.190013, 0.561366, 0.968038, - 0.09835, 0.188253, 0.589464, 0.969152, - 0.100754, 0.186257, 0.617433, 0.970557, - 0.102239, 0.183775, 0.645801, 0.972104, - 0.102767, 0.180645, 0.674278, 0.973203, - 0.103492, 0.177242, 0.702004, 0.975123, - 0.103793, 0.17345, 0.729529, 0.97641, - 0.102839, 0.168886, 0.756712, 0.978313, - 0.101687, 0.163892, 0.783801, 0.980036, - 0.100314, 0.158439, 0.809671, 0.981339, - 0.097836, 0.152211, 0.835402, 0.982794, - 0.0950006, 0.145679, 0.860081, 0.984123, - 0.0920994, 0.138949, 0.883757, 0.984918, - 0.0878641, 0.131283, 0.90685, 0.985999, - 0.083939, 0.123464, 0.928786, 0.987151, - 0.0791234, 0.115324, 0.94983, 0.987827, - 0.0739332, 0.106854, 0.96962, 0.988806, - 0.0688088, 0.0982691, 0.98861, 0.989588, - 0.0628962, 0.0893456, 1.00667, 0.990438, - 0.0573146, 0.0805392, 1.02344, 0.991506, - 0.0509433, 0.0713725, 1.03933, 0.992492, - 0.0448724, 0.0623732, 1.05378, 0.993663, - 0.0383497, 0.0530838, 1.06747, 0.994956, - 0.0319593, 0.0439512, 1.08007, 0.99634, - 0.025401, 0.0347803, 1.09182, 0.99761, - 0.0189687, 0.0257954, 1.1025, 0.99863, - 0.0124441, 0.0169893, 1.11247, 0.99947, - 0.00614003, 0.00829498, 1.12151, 1.00008, 0.000216624, - 0.000146107, 1.12993, 0.950129, - 4.34955e-06, 0.217413, 1.90081e-05, 0.950264, - 0.00010957, 0.217444, 0.00047884, 0.9503, - 0.000438299, 0.217451, 0.00191543, 0.950246, - 0.000986124, 0.21744, 0.00430951, 0.950246, - 0.00175311, 0.21744, 0.00766137, 0.950245, - 0.00273923, 0.21744, 0.011971, 0.950253, - 0.00394453, 0.217441, 0.0172385, 0.950258, - 0.00536897, 0.217442, 0.0234641, 0.950267, - 0.00701262, 0.217444, 0.030648, 0.950277, - 0.00887551, 0.217446, 0.038791, 0.950284, - 0.0109576, 0.217446, 0.0478931, 0.950312, - 0.0132591, 0.217451, 0.0579568, 0.950334, - 0.01578, 0.217454, 0.0689821, 0.950378, - 0.0185204, 0.217462, 0.0809714, 0.950417, - 0.0214803, 0.217467, 0.0939265, 0.950488, - 0.0246594, 0.217479, 0.10785, 0.950534, - 0.0280565, 0.217483, 0.122743, 0.950633, - 0.0316685, 0.217498, 0.138611, 0.950698, - 0.0354787, 0.217499, 0.155442, 0.950844, - 0.0394003, 0.217507, 0.173208, 0.950999, - 0.0426812, 0.217419, 0.191605, 0.951221, - 0.0461302, 0.217317, 0.21084, 0.951412, - 0.0502131, 0.217238, 0.230945, 0.951623, - 0.0549183, 0.21722, 0.251745, 0.951867, - 0.0604493, 0.217306, 0.273001, 0.952069, - 0.0665189, 0.217466, 0.294874, 0.952459, - 0.0709179, 0.217266, 0.318732, 0.952996, - 0.0746112, 0.216891, 0.34318, 0.953425, - 0.0789252, 0.216503, 0.36849, 0.953885, - 0.0833293, 0.216042, 0.394373, 0.954617, - 0.087371, 0.215469, 0.420505, 0.955429, - 0.0914054, 0.214802, 0.446907, 0.956068, - 0.0961671, 0.214146, 0.473522, 0.957094, - 0.10048, 0.213286, 0.50052, 0.958372, - 0.103248, 0.211796, 0.528715, 0.959654, - 0.106033, 0.21016, 0.557065, 0.961305, - 0.108384, 0.208149, 0.585286, 0.962785, - 0.111122, 0.206024, 0.613334, 0.964848, - 0.112981, 0.203442, 0.641334, 0.966498, - 0.113717, 0.19996, 0.669955, 0.968678, - 0.114121, 0.196105, 0.698094, 0.970489, - 0.114524, 0.191906, 0.725643, 0.972903, - 0.113792, 0.186963, 0.752856, 0.974701, - 0.112406, 0.181343, 0.780013, 0.976718, - 0.110685, 0.175185, 0.806268, 0.978905, - 0.108468, 0.168535, 0.832073, 0.980267, - 0.105061, 0.161106, 0.857149, 0.981967, - 0.101675, 0.153387, 0.881145, 0.983063, - 0.0974492, 0.145199, 0.904255, 0.984432, - 0.0925815, 0.136527, 0.926686, 0.985734, - 0.0877983, 0.127584, 0.947901, 0.986228, - 0.081884, 0.118125, 0.968111, 0.98719, - 0.0761208, 0.108594, 0.98719, 0.988228, - 0.0698196, 0.0989996, 1.00559, 0.989046, - 0.0632739, 0.0890074, 1.02246, 0.990242, - 0.056522, 0.0790832, 1.03841, 0.991252, - 0.0495272, 0.0689182, 1.05347, 0.992542, - 0.0425373, 0.0588592, 1.06724, 0.994096, - 0.0353198, 0.0486833, 1.08009, 0.995593, - 0.028235, 0.0385977, 1.09177, 0.99711, - 0.0209511, 0.0286457, 1.10274, 0.998263, - 0.0139289, 0.0188497, 1.11262, 0.999254, - 0.0067359, 0.009208, 1.12191, 0.999967, 0.000141846, - 6.57764e-05, 1.13024, 0.935608, - 4.74692e-06, 0.236466, 1.87817e-05, 0.93996, - 0.00011971, 0.237568, 0.000473646, 0.939959, - 0.000478845, 0.237567, 0.0018946, 0.939954, - 0.0010774, 0.237566, 0.00426284, 0.939956, - 0.00191538, 0.237566, 0.00757842, 0.939954, - 0.00299277, 0.237566, 0.0118413, 0.93996, - 0.00430961, 0.237567, 0.0170518, 0.939969, - 0.00586589, 0.237569, 0.02321, 0.939982, - 0.00766166, 0.237572, 0.0303164, 0.939987, - 0.00969686, 0.237572, 0.0383711, 0.939997, - 0.0119715, 0.237574, 0.0473751, 0.940031, - 0.0144858, 0.237581, 0.0573298, 0.940073, - 0.0172399, 0.237589, 0.0682366, 0.94012, - 0.0202335, 0.237598, 0.080097, 0.940162, - 0.0234663, 0.237604, 0.0929116, 0.940237, - 0.0269387, 0.237615, 0.106686, 0.940328, - 0.0306489, 0.237632, 0.121421, 0.940419, - 0.0345917, 0.237645, 0.137115, 0.940522, - 0.0387481, 0.237654, 0.153766, 0.940702, - 0.0429906, 0.237661, 0.17133, 0.940871, - 0.0465089, 0.237561, 0.189502, 0.941103, - 0.050531, 0.23748, 0.208616, 0.941369, - 0.0550657, 0.237423, 0.228595, 0.941641, - 0.0601337, 0.237399, 0.249287, 0.941903, - 0.0658804, 0.237443, 0.270467, 0.942224, - 0.0722674, 0.237597, 0.292024, 0.942633, - 0.0771788, 0.237419, 0.315272, 0.943172, - 0.0815623, 0.237068, 0.339579, 0.943691, - 0.0863973, 0.236682, 0.364717, 0.944382, - 0.0911536, 0.236213, 0.390435, 0.945392, - 0.0952967, 0.235562, 0.416425, 0.946185, - 0.0998948, 0.234832, 0.442772, 0.947212, - 0.104796, 0.234114, 0.469347, 0.948778, - 0.10928, 0.233222, 0.496162, 0.950149, - 0.113081, 0.231845, 0.523978, 0.951989, - 0.115893, 0.230005, 0.552295, 0.953921, - 0.11846, 0.227862, 0.580569, 0.955624, - 0.12115, 0.225439, 0.608698, 0.958234, - 0.123373, 0.222635, 0.636696, 0.960593, - 0.124519, 0.219093, 0.665208, 0.963201, - 0.124736, 0.214749, 0.693557, 0.965642, - 0.125012, 0.210059, 0.721334, 0.968765, - 0.124661, 0.204935, 0.748613, 0.971753, - 0.122996, 0.198661, 0.776224, 0.973751, - 0.120998, 0.191823, 0.802461, 0.976709, - 0.118583, 0.184359, 0.828399, 0.977956, - 0.115102, 0.176437, 0.853693, 0.979672, - 0.111077, 0.167681, 0.877962, 0.981816, - 0.10688, 0.158872, 0.901564, 0.98238, - 0.101469, 0.149398, 0.924057, 0.983964, - 0.0960013, 0.139436, 0.945751, 0.984933, - 0.0899626, 0.12943, 0.966272, 0.985694, - 0.0832973, 0.11894, 0.985741, 0.986822, - 0.0767082, 0.108349, 1.00407, 0.987725, - 0.0693614, 0.0976026, 1.02154, 0.98877, - 0.06211, 0.086652, 1.03757, 0.990129, - 0.0544143, 0.0756182, 1.05296, 0.991337, - 0.046744, 0.0645753, 1.06683, 0.992978, - 0.0387931, 0.0534683, 1.0798, 0.994676, - 0.030973, 0.0424137, 1.09181, 0.99645, - 0.0230311, 0.0314035, 1.10286, 0.997967, - 0.0152065, 0.0206869, 1.11291, 0.99922, - 0.00744837, 0.010155, 1.12237, 1.00002, 0.000240209, - 7.52767e-05, 1.13089, 0.922948, - 5.15351e-06, 0.255626, 1.86069e-05, 0.928785, - 0.000129623, 0.257244, 0.000468009, 0.928761, - 0.00051849, 0.257237, 0.00187202, 0.928751, - 0.0011666, 0.257235, 0.00421204, 0.928751, - 0.00207395, 0.257234, 0.0074881, 0.928754, - 0.00324055, 0.257235, 0.0117002, 0.92876, - 0.00466639, 0.257236, 0.0168486, 0.928763, - 0.00635149, 0.257237, 0.0229334, 0.928774, - 0.00829584, 0.257239, 0.029955, 0.928791, - 0.0104995, 0.257243, 0.0379139, 0.928804, - 0.0129623, 0.257245, 0.0468108, 0.928847, - 0.0156846, 0.257255, 0.0566473, 0.92889, - 0.0186661, 0.257263, 0.0674246, 0.928924, - 0.0219067, 0.257268, 0.0791433, 0.928989, - 0.0254066, 0.257282, 0.0918076, 0.92909, - 0.0291651, 0.257301, 0.105419, 0.92918, - 0.0331801, 0.257316, 0.119978, 0.92929, - 0.0374469, 0.257332, 0.135491, 0.929453, - 0.041939, 0.257357, 0.151948, 0.929586, - 0.0464612, 0.257347, 0.169275, 0.929858, - 0.0503426, 0.257269, 0.187257, 0.930125, - 0.0548409, 0.257199, 0.206204, 0.930403, - 0.0598063, 0.257149, 0.22601, 0.930726, - 0.0652437, 0.257122, 0.246561, 0.931098, - 0.0712376, 0.257153, 0.267618, 0.931396, - 0.0777506, 0.257237, 0.288993, 0.931947, - 0.0832374, 0.257124, 0.311527, 0.932579, - 0.0883955, 0.25683, 0.335697, 0.933194, - 0.0937037, 0.256444, 0.360634, 0.934013, - 0.0987292, 0.255939, 0.386126, 0.935307, - 0.103215, 0.255282, 0.412018, 0.936374, - 0.108234, 0.254538, 0.438292, 0.93776, - 0.113234, 0.253728, 0.464805, 0.939599, - 0.118013, 0.25275, 0.491464, 0.941036, - 0.122661, 0.251404, 0.518751, 0.94337, - 0.125477, 0.249435, 0.547133, 0.945318, - 0.128374, 0.247113, 0.575456, 0.947995, - 0.130996, 0.244441, 0.60372, 0.950818, - 0.133438, 0.241352, 0.63174, 0.954378, - 0.135004, 0.237849, 0.659971, 0.957151, - 0.135313, 0.233188, 0.688478, 0.960743, - 0.13521, 0.228001, 0.716767, 0.964352, - 0.135007, 0.222249, 0.744349, 0.967273, - 0.133523, 0.21542, 0.771786, 0.969767, - 0.131155, 0.208039, 0.798639, 0.973195, - 0.128492, 0.200076, 0.824774, 0.975557, - 0.125094, 0.191451, 0.850222, 0.977692, - 0.120578, 0.18184, 0.874761, 0.98026, - 0.115882, 0.172102, 0.898497, 0.981394, - 0.110372, 0.161859, 0.921636, 0.982386, - 0.10415, 0.15108, 0.943467, 0.983783, - 0.0978128, 0.140407, 0.964045, 0.98422, - 0.0906171, 0.129058, 0.98398, 0.985447, - 0.0832921, 0.117614, 1.00276, 0.986682, - 0.0754412, 0.10585, 1.02047, 0.987326, - 0.0673885, 0.0940943, 1.03678, 0.988707, - 0.0592565, 0.0822093, 1.05218, 0.990185, - 0.050717, 0.070192, 1.06652, 0.991866, - 0.0423486, 0.0582081, 1.07965, 0.993897, - 0.0336118, 0.0460985, 1.09188, 0.995841, - 0.0252178, 0.0342737, 1.10307, 0.997605, - 0.0164893, 0.0224829, 1.11324, 0.999037, - 0.00817112, 0.0110647, 1.12262, 1.00003, 0.000291686, - 0.000168673, 1.13139, 0.915304, - 5.52675e-06, 0.275999, 1.83285e-05, 0.91668, - 0.000139285, 0.276414, 0.000461914, 0.916664, - 0.00055713, 0.276409, 0.00184763, 0.916653, - 0.00125354, 0.276406, 0.00415715, 0.916651, - 0.00222851, 0.276405, 0.00739053, 0.916655, - 0.00348205, 0.276406, 0.0115478, 0.916653, - 0.00501414, 0.276405, 0.0166291, 0.916667, - 0.00682478, 0.276409, 0.0226346, 0.91668, - 0.00891398, 0.276412, 0.0295648, 0.91669, - 0.0112817, 0.276413, 0.0374199, 0.916727, - 0.013928, 0.276422, 0.0462016, 0.916759, - 0.0168528, 0.276429, 0.0559101, 0.916793, - 0.0200558, 0.276436, 0.0665466, 0.916849, - 0.0235373, 0.276448, 0.0781139, 0.916964, - 0.0272973, 0.276474, 0.0906156, 0.917047, - 0.0313344, 0.276491, 0.104051, 0.917152, - 0.0356465, 0.276511, 0.118424, 0.917286, - 0.0402271, 0.276533, 0.133736, 0.917469, - 0.0450408, 0.276564, 0.149978, 0.917686, - 0.0497872, 0.276563, 0.167057, 0.917953, - 0.0540937, 0.276493, 0.184846, 0.918228, - 0.0590709, 0.276437, 0.203614, 0.918572, - 0.0644277, 0.276398, 0.223212, 0.918918, - 0.0702326, 0.276362, 0.243584, 0.919356, - 0.076484, 0.276383, 0.264465, 0.919842, - 0.0830808, 0.276434, 0.285701, 0.920451, - 0.0892972, 0.276407, 0.307559, 0.921113, - 0.095016, 0.276128, 0.331501, 0.921881, - 0.100771, 0.275754, 0.356207, 0.923027, - 0.106029, 0.275254, 0.381477, 0.924364, - 0.111029, 0.274595, 0.40722, 0.925818, - 0.116345, 0.273841, 0.433385, 0.92746, - 0.121424, 0.272913, 0.459848, 0.929167, - 0.12657, 0.271837, 0.486493, 0.931426, - 0.131581, 0.270575, 0.513432, 0.934001, - 0.135038, 0.268512, 0.541502, 0.936296, - 0.138039, 0.266135, 0.569658, 0.939985, - 0.140687, 0.263271, 0.598375, 0.943516, - 0.143247, 0.260058, 0.626563, 0.94782, - 0.145135, 0.256138, 0.654711, 0.951023, - 0.145733, 0.251154, 0.683285, 0.955338, - 0.145554, 0.245562, 0.711831, 0.959629, - 0.145008, 0.239265, 0.739573, 0.963123, - 0.144003, 0.232064, 0.767027, 0.966742, - 0.141289, 0.224036, 0.794359, 0.969991, - 0.138247, 0.215305, 0.820361, 0.973403, - 0.134786, 0.206051, 0.846548, 0.975317, - 0.129966, 0.195914, 0.871541, 0.977647, - 0.12471, 0.185184, 0.895313, 0.980137, - 0.119086, 0.174161, 0.918398, 0.981031, - 0.112297, 0.162792, 0.940679, 0.982037, - 0.105372, 0.150952, 0.961991, 0.983164, - 0.097821, 0.138921, 0.981913, 0.983757, - 0.0897245, 0.126611, 1.00109, 0.985036, - 0.0815974, 0.114228, 1.01902, 0.986289, - 0.0727725, 0.101389, 1.03604, 0.987329, - 0.0639323, 0.0886476, 1.05149, 0.989193, - 0.0548109, 0.0756837, 1.06619, 0.990716, - 0.045687, 0.0627581, 1.07948, 0.992769, - 0.0364315, 0.0498337, 1.09172, 0.99524, - 0.0271761, 0.0370305, 1.1033, 0.997154, - 0.0179609, 0.0243959, 1.11353, 0.998845, - 0.00878063, 0.0119567, 1.12319, 1.00002, 0.000259038, - 0.000108146, 1.13177, 0.903945, - 5.91681e-06, 0.295126, 1.81226e-05, 0.903668, - 0.000148672, 0.295037, 0.000455367, 0.903677, - 0.000594683, 0.29504, 0.00182145, 0.903673, - 0.00133805, 0.295039, 0.00409831, 0.903666, - 0.00237872, 0.295036, 0.00728584, 0.903668, - 0.00371676, 0.295037, 0.0113842, 0.903679, - 0.00535212, 0.29504, 0.0163936, 0.903684, - 0.00728479, 0.295041, 0.0223141, 0.903698, - 0.00951473, 0.295044, 0.0291462, 0.903718, - 0.0120419, 0.295049, 0.0368904, 0.903754, - 0.0148664, 0.295058, 0.0455477, 0.903801, - 0.017988, 0.29507, 0.0551194, 0.903851, - 0.0214064, 0.295082, 0.0656058, 0.903921, - 0.0251219, 0.295097, 0.0770109, 0.904002, - 0.0291337, 0.295116, 0.0893354, 0.904111, - 0.033441, 0.29514, 0.102583, 0.904246, - 0.0380415, 0.295169, 0.116755, 0.904408, - 0.0429258, 0.295202, 0.131853, 0.904637, - 0.0480468, 0.295245, 0.147869, 0.904821, - 0.0529208, 0.295214, 0.164658, 0.905163, - 0.0577748, 0.295185, 0.182274, 0.905469, - 0.0631763, 0.295143, 0.200828, 0.905851, - 0.068917, 0.295112, 0.2202, 0.906322, - 0.0750861, 0.295104, 0.240372, 0.906761, - 0.0815855, 0.295086, 0.261082, 0.90735, - 0.0882138, 0.295095, 0.282123, 0.908087, - 0.095082, 0.295139, 0.303563, 0.908826, - 0.101488, 0.29492, 0.327028, 0.909832, - 0.107577, 0.294577, 0.351464, 0.911393, - 0.113033, 0.294115, 0.376497, 0.912804, - 0.118629, 0.293446, 0.402115, 0.914081, - 0.124232, 0.292581, 0.428111, 0.91637, - 0.129399, 0.29166, 0.454442, 0.91814, - 0.134892, 0.290422, 0.481024, 0.921179, - 0.140069, 0.289194, 0.507924, 0.924544, - 0.144431, 0.287421, 0.535557, 0.927995, - 0.147498, 0.284867, 0.563984, 0.931556, - 0.150197, 0.281722, 0.5923, 0.935777, - 0.152711, 0.278207, 0.620832, 0.940869, - 0.154836, 0.274148, 0.649069, 0.945994, - 0.155912, 0.269057, 0.677746, 0.949634, - 0.155641, 0.262799, 0.706293, 0.955032, - 0.154809, 0.256097, 0.734278, 0.95917, - 0.153678, 0.248618, 0.761751, 0.962931, - 0.151253, 0.239794, 0.789032, 0.966045, - 0.147625, 0.230281, 0.815422, 0.96971, - 0.143964, 0.220382, 0.841787, 0.972747, - 0.139464, 0.209846, 0.867446, 0.975545, - 0.133459, 0.198189, 0.892004, 0.978381, - 0.127424, 0.186362, 0.915458, 0.979935, - 0.120506, 0.173964, 0.937948, 0.980948, - 0.11282, 0.161429, 0.959732, 0.982234, - 0.104941, 0.148557, 0.980118, 0.982767, - 0.0962905, 0.135508, 0.999463, 0.983544, - 0.0873625, 0.122338, 1.01756, 0.984965, - 0.0783447, 0.108669, 1.03492, 0.986233, - 0.0684798, 0.0949911, 1.05087, 0.987796, - 0.0590867, 0.0811386, 1.0656, 0.989885, - 0.0489145, 0.0673099, 1.0794, 0.991821, - 0.0391, 0.0535665, 1.09174, 0.99448, - 0.029087, 0.0397529, 1.10341, 0.996769, - 0.019114, 0.0261463, 1.11383, 0.998641, - 0.00947007, 0.0128731, 1.1237, 0.999978, 0.000446316, - 0.000169093, 1.13253, 0.888362, - 6.27064e-06, 0.312578, 1.78215e-05, 0.889988, - 0.000157791, 0.313148, 0.000448451, 0.889825, - 0.000631076, 0.313092, 0.00179356, 0.88984, - 0.00141994, 0.313097, 0.00403554, 0.889828, - 0.0025243, 0.313092, 0.00717429, 0.889831, - 0.00394421, 0.313093, 0.0112099, 0.889831, - 0.00567962, 0.313093, 0.0161425, 0.889844, - 0.00773051, 0.313096, 0.0219724, 0.889858, - 0.0100968, 0.3131, 0.0286999, 0.889882, - 0.0127786, 0.313106, 0.0363256, 0.889918, - 0.0157757, 0.313116, 0.0448509, 0.889967, - 0.0190878, 0.313129, 0.0542758, 0.89003, - 0.022715, 0.313145, 0.0646032, 0.890108, - 0.0266566, 0.313165, 0.0758339, 0.890218, - 0.0309131, 0.313193, 0.0879729, 0.890351, - 0.0354819, 0.313226, 0.101019, 0.89051, - 0.0403613, 0.313263, 0.114979, 0.890672, - 0.0455385, 0.313294, 0.129848, 0.890882, - 0.0509444, 0.313333, 0.145616, 0.891189, - 0.0559657, 0.313324, 0.162122, 0.891457, - 0.0613123, 0.313281, 0.179524, 0.891856, - 0.0671488, 0.313281, 0.197855, 0.892312, - 0.0732732, 0.313268, 0.216991, 0.892819, - 0.0797865, 0.313263, 0.236924, 0.893369, - 0.0865269, 0.313247, 0.257433, 0.894045, - 0.0931592, 0.313205, 0.278215, 0.894884, - 0.100532, 0.313276, 0.299467, 0.895832, - 0.107716, 0.313205, 0.322276, 0.897043, - 0.114099, 0.312873, 0.34642, 0.898515, - 0.119941, 0.312331, 0.371187, 0.900191, - 0.126044, 0.311731, 0.396656, 0.90188, - 0.131808, 0.310859, 0.422488, 0.904359, - 0.137289, 0.309857, 0.448744, 0.906923, - 0.142991, 0.308714, 0.475239, 0.910634, - 0.148253, 0.307465, 0.501983, 0.914502, - 0.153332, 0.305774, 0.529254, 0.919046, - 0.156646, 0.303156, 0.557709, 0.923194, - 0.159612, 0.299928, 0.586267, 0.928858, - 0.162027, 0.296245, 0.614925, 0.934464, - 0.164203, 0.291832, 0.643187, 0.939824, - 0.165602, 0.286565, 0.671601, 0.944582, - 0.165383, 0.280073, 0.700213, 0.949257, - 0.164439, 0.272891, 0.728432, 0.954389, - 0.162953, 0.264771, 0.756082, 0.958595, - 0.161007, 0.255927, 0.78369, 0.962138, - 0.157243, 0.245769, 0.810769, 0.966979, - 0.152872, 0.235127, 0.836999, 0.969566, - 0.148209, 0.22347, 0.862684, 0.972372, - 0.142211, 0.211147, 0.887847, 0.975916, - 0.135458, 0.198606, 0.911843, 0.978026, - 0.128398, 0.185498, 0.934795, 0.979686, - 0.120313, 0.17171, 0.956787, 0.980748, - 0.11166, 0.158159, 0.978046, 0.981622, - 0.103035, 0.144399, 0.997693, 0.982356, - 0.0930328, 0.13001, 1.01642, 0.983308, - 0.0834627, 0.115778, 1.03366, 0.985037, - 0.0732249, 0.101327, 1.05014, 0.986493, - 0.0628145, 0.086554, 1.06507, 0.988484, - 0.0526556, 0.0720413, 1.07907, 0.991051, - 0.0415744, 0.0571151, 1.09189, 0.993523, - 0.0314275, 0.0426643, 1.10369, 0.99628, - 0.0203603, 0.0279325, 1.11423, 0.998344, - 0.0102446, 0.0138182, 1.12421, 0.999997, 0.00042612, - 0.000193628, 1.1333, 0.871555, - 6.60007e-06, 0.329176, 1.74749e-05, 0.875255, - 0.000166579, 0.330571, 0.000441051, 0.875644, - 0.000666394, 0.330718, 0.00176441, 0.875159, - 0.00149903, 0.330536, 0.00396899, 0.87516, - 0.00266493, 0.330536, 0.007056, 0.875158, - 0.00416393, 0.330535, 0.0110251, 0.87516, - 0.00599598, 0.330535, 0.0158764, 0.875163, - 0.00816108, 0.330536, 0.0216101, 0.875174, - 0.0106591, 0.330538, 0.0282266, 0.875199, - 0.0134899, 0.330545, 0.0357266, 0.875257, - 0.0166538, 0.330563, 0.0441117, 0.875304, - 0.0201501, 0.330575, 0.0533821, 0.875373, - 0.0239785, 0.330595, 0.0635395, 0.875464, - 0.0281389, 0.330619, 0.0745872, 0.875565, - 0.0326301, 0.330645, 0.0865255, 0.875691, - 0.0374516, 0.330676, 0.0993599, 0.875897, - 0.0425993, 0.330733, 0.113093, 0.876091, - 0.0480576, 0.330776, 0.127722, 0.876353, - 0.0537216, 0.330826, 0.143227, 0.876649, - 0.0589807, 0.330809, 0.159462, 0.877034, - 0.0647865, 0.330819, 0.176642, 0.877443, - 0.0709789, 0.330817, 0.194702, 0.877956, - 0.0774782, 0.330832, 0.213577, 0.878499, - 0.0843175, 0.330822, 0.233246, 0.879144, - 0.0912714, 0.330804, 0.253512, 0.879982, - 0.0980824, 0.330766, 0.274137, 0.88097, - 0.105823, 0.330864, 0.295209, 0.882051, - 0.113671, 0.330896, 0.317226, 0.883397, - 0.120303, 0.330545, 0.341068, 0.884987, - 0.12667, 0.330068, 0.365613, 0.886789, - 0.133118, 0.329418, 0.390807, 0.889311, - 0.139024, 0.328683, 0.416494, 0.891995, - 0.144971, 0.327729, 0.442618, 0.895106, - 0.150747, 0.326521, 0.469131, 0.899527, - 0.156283, 0.325229, 0.495921, 0.90504, - 0.161707, 0.32378, 0.523162, 0.909875, - 0.165661, 0.32122, 0.55092, 0.91561, - 0.168755, 0.317942, 0.579928, 0.921225, - 0.171193, 0.313983, 0.608539, 0.927308, - 0.17319, 0.309636, 0.636854, 0.933077, - 0.174819, 0.304262, 0.66523, 0.938766, - 0.175002, 0.297563, 0.693609, 0.943667, - 0.173946, 0.289613, 0.722157, 0.949033, - 0.172221, 0.281227, 0.750021, 0.953765, - 0.169869, 0.271545, 0.777466, 0.95804, - 0.166578, 0.261034, 0.804853, 0.962302, - 0.161761, 0.249434, 0.831569, 0.966544, - 0.156636, 0.237484, 0.857779, 0.969372, - 0.150784, 0.224395, 0.883051, 0.972486, - 0.143672, 0.210786, 0.907864, 0.975853, - 0.135772, 0.196556, 0.931223, 0.977975, - 0.127942, 0.182307, 0.954061, 0.979122, - 0.118347, 0.167607, 0.97531, 0.980719, - 0.109112, 0.152739, 0.995666, 0.981223, - 0.0991789, 0.137932, 1.01475, 0.98216, - 0.0883553, 0.122692, 1.03253, 0.983379, - 0.0780825, 0.107493, 1.04917, 0.985434, - 0.0665646, 0.0917791, 1.06464, 0.987332, - 0.0557714, 0.0764949, 1.07896, 0.990004, - 0.0442805, 0.060721, 1.09199, 0.992975, - 0.0331676, 0.0452284, 1.10393, 0.995811, - 0.0219547, 0.0297934, 1.11476, 0.9982, - 0.0107613, 0.0146415, 1.12484, 1.00002, 0.000248678, - 0.00014555, 1.13413, 0.859519, - 6.93595e-06, 0.347264, 1.71673e-05, 0.859843, - 0.00017503, 0.347394, 0.000433219, 0.859656, - 0.000700076, 0.347319, 0.00173277, 0.859671, - 0.00157517, 0.347325, 0.00389875, 0.859669, - 0.00280028, 0.347324, 0.00693112, 0.85967, - 0.0043754, 0.347324, 0.01083, 0.859665, - 0.00630049, 0.347321, 0.0155954, 0.859685, - 0.0085755, 0.347328, 0.0212278, 0.859694, - 0.0112003, 0.347329, 0.0277273, 0.859718, - 0.0141747, 0.347336, 0.0350946, 0.85976, - 0.0174988, 0.347348, 0.0433314, 0.85982, - 0.0211722, 0.347366, 0.0524384, 0.859892, - 0.0251941, 0.347387, 0.0624168, 0.860006, - 0.0295649, 0.347422, 0.0732708, 0.860122, - 0.0342825, 0.347453, 0.0849999, 0.860282, - 0.0393462, 0.347499, 0.0976102, 0.860482, - 0.0447513, 0.347554, 0.111104, 0.860719, - 0.0504775, 0.347614, 0.125479, 0.860998, - 0.0563577, 0.347666, 0.140703, 0.861322, - 0.0619473, 0.347662, 0.156681, 0.861724, - 0.0681277, 0.347684, 0.173597, 0.862198, - 0.0746567, 0.347709, 0.191371, 0.862733, - 0.0815234, 0.347727, 0.209976, 0.863371, - 0.0886643, 0.347744, 0.229351, 0.86414, - 0.0957908, 0.347734, 0.24934, 0.865138, - 0.102912, 0.34772, 0.269797, 0.866182, - 0.110924, 0.3478, 0.290654, 0.867436, - 0.119223, 0.347911, 0.312074, 0.869087, - 0.126197, 0.347649, 0.335438, 0.870859, - 0.133145, 0.347222, 0.359732, 0.872997, - 0.139869, 0.346645, 0.38467, 0.875939, - 0.146089, 0.345935, 0.41019, 0.879012, - 0.152334, 0.345012, 0.436218, 0.883353, - 0.15821, 0.343924, 0.462641, 0.888362, - 0.164097, 0.342636, 0.489449, 0.895026, - 0.169528, 0.341351, 0.516629, 0.900753, - 0.174408, 0.339115, 0.544109, 0.906814, - 0.17751, 0.335809, 0.572857, 0.912855, - 0.180101, 0.331597, 0.601554, 0.919438, - 0.182116, 0.32698, 0.630198, 0.925962, - 0.183494, 0.321449, 0.658404, 0.931734, - 0.184159, 0.314595, 0.686625, 0.93762, - 0.18304, 0.306462, 0.71531, 0.943858, - 0.181323, 0.297514, 0.744272, 0.948662, - 0.178683, 0.287447, 0.771462, 0.953299, - 0.175379, 0.276166, 0.798593, 0.957346, - 0.170395, 0.263758, 0.8256, 0.962565, - 0.165042, 0.251019, 0.852575, 0.966075, - 0.158655, 0.237011, 0.878316, 0.969048, - 0.151707, 0.222518, 0.90329, 0.972423, - 0.143271, 0.207848, 0.927745, 0.975833, - 0.134824, 0.192463, 0.950859, 0.977629, - 0.125444, 0.1768, 0.972947, 0.978995, - 0.114949, 0.161033, 0.993263, 0.980533, - 0.104936, 0.145523, 1.01337, 0.980745, - 0.0935577, 0.129799, 1.03128, 0.981814, - 0.0822956, 0.113486, 1.04825, 0.983943, - 0.0710082, 0.0972925, 1.06405, 0.986141, - 0.0587931, 0.0808138, 1.0785, 0.988878, - 0.0472755, 0.0644915, 1.09204, 0.992132, - 0.0349128, 0.0478128, 1.10413, 0.9953, - 0.0232407, 0.031621, 1.11527, 0.998117, - 0.0112713, 0.0154935, 1.12551, 1.00003, 0.000339743, - 0.000195763, 1.13504, 0.845441, - 7.29126e-06, 0.364305, 1.69208e-05, 0.843588, - 0.000183164, 0.363506, 0.000425067, 0.843412, - 0.00073253, 0.36343, 0.00169999, 0.843401, - 0.00164818, 0.363426, 0.00382495, 0.843399, - 0.00293008, 0.363425, 0.00679993, 0.843401, - 0.00457822, 0.363425, 0.010625, 0.843394, - 0.00659249, 0.363421, 0.0153002, 0.843398, - 0.00897282, 0.363421, 0.0208258, 0.843415, - 0.0117191, 0.363426, 0.0272024, 0.843438, - 0.0148312, 0.363432, 0.0344305, 0.843483, - 0.018309, 0.363447, 0.0425116, 0.84356, - 0.0221521, 0.363472, 0.0514471, 0.843646, - 0.0263597, 0.363499, 0.061238, 0.843743, - 0.0309315, 0.363527, 0.0718873, 0.84388, - 0.0358658, 0.363569, 0.0833969, 0.844079, - 0.0411624, 0.363631, 0.0957742, 0.844279, - 0.0468128, 0.363688, 0.109015, 0.844549, - 0.0527923, 0.363761, 0.123124, 0.844858, - 0.0588204, 0.363817, 0.138044, 0.84522, - 0.0647573, 0.36383, 0.153755, 0.845669, - 0.0713181, 0.363879, 0.170394, 0.846155, - 0.0781697, 0.363908, 0.187861, 0.846789, - 0.0853913, 0.363969, 0.206176, 0.847502, - 0.0928086, 0.363999, 0.225244, 0.8484, - 0.10005, 0.363997, 0.244926, 0.849461, - 0.107615, 0.364008, 0.265188, 0.850562, - 0.115814, 0.364055, 0.28587, 0.851962, - 0.124334, 0.364179, 0.306926, 0.854326, - 0.131995, 0.364233, 0.329605, 0.856295, - 0.139338, 0.363856, 0.35359, 0.858857, - 0.146346, 0.363347, 0.37831, 0.862428, - 0.152994, 0.362807, 0.403722, 0.866203, - 0.159463, 0.361963, 0.429537, 0.871629, - 0.165623, 0.36112, 0.456, 0.877365, - 0.171649, 0.359917, 0.482773, 0.883744, - 0.177151, 0.35848, 0.509705, 0.890693, - 0.182381, 0.356523, 0.537215, 0.897278, - 0.186076, 0.3533, 0.565493, 0.903958, - 0.188602, 0.349095, 0.594293, 0.910908, - 0.190755, 0.344215, 0.623165, 0.918117, - 0.192063, 0.338606, 0.651573, 0.924644, - 0.192758, 0.331544, 0.679869, 0.931054, - 0.192238, 0.323163, 0.708668, 0.937303, - 0.190035, 0.313529, 0.737201, 0.943387, - 0.187162, 0.303152, 0.764977, 0.948494, - 0.183876, 0.29146, 0.792683, 0.952546, - 0.178901, 0.277917, 0.819228, 0.958077, - 0.173173, 0.264753, 0.846559, 0.962462, - 0.16645, 0.25002, 0.872962, 0.966569, - 0.159452, 0.234873, 0.898729, 0.969108, - 0.15074, 0.218752, 0.923126, 0.973072, - 0.141523, 0.202673, 0.947278, 0.975452, - 0.132075, 0.186326, 0.969938, 0.977784, - 0.121257, 0.169396, 0.991325, 0.97899, - 0.110182, 0.153044, 1.01123, 0.979777, - 0.0989634, 0.136485, 1.0299, 0.980865, - 0.0865894, 0.119343, 1.04727, 0.982432, - 0.0746115, 0.102452, 1.06341, 0.984935, - 0.0621822, 0.0852423, 1.07834, 0.987776, - 0.0495694, 0.0678546, 1.092, 0.99103, - 0.0372386, 0.0506917, 1.1043, 0.99474, - 0.0244353, 0.0333316, 1.11576, 0.997768, - 0.0121448, 0.0164348, 1.12617, 1.00003, 0.00031774, - 0.000169504, 1.13598, 0.825551, - 7.56799e-06, 0.378425, 1.65099e-05, 0.82664, - 0.000190922, 0.378923, 0.000416504, 0.826323, - 0.000763495, 0.378779, 0.0016656, 0.826359, - 0.00171789, 0.378795, 0.00374768, 0.82636, - 0.00305402, 0.378795, 0.00666259, 0.826368, - 0.00477185, 0.378798, 0.0104104, 0.826364, - 0.00687131, 0.378795, 0.0149912, 0.826368, - 0.00935232, 0.378795, 0.0204054, 0.826376, - 0.0122146, 0.378797, 0.0266532, 0.826399, - 0.0154581, 0.378803, 0.0337355, 0.82646, - 0.0190825, 0.378824, 0.0416537, 0.826525, - 0.0230873, 0.378846, 0.0504091, 0.826614, - 0.0274719, 0.378876, 0.0600032, 0.82674, - 0.0322355, 0.378917, 0.0704393, 0.826888, - 0.0373766, 0.378964, 0.0817195, 0.827078, - 0.0428936, 0.379024, 0.0938492, 0.827318, - 0.0487778, 0.379099, 0.106828, 0.82764, - 0.0549935, 0.379199, 0.120659, 0.827926, - 0.0611058, 0.379227, 0.13526, 0.828325, - 0.0675054, 0.379275, 0.150713, 0.828801, - 0.0743455, 0.379332, 0.167034, 0.8294, - 0.0815523, 0.379415, 0.184209, 0.830094, - 0.0890779, 0.379495, 0.202203, 0.8309, - 0.096736, 0.379555, 0.220945, 0.831943, - 0.104135, 0.379577, 0.240306, 0.833037, - 0.112106, 0.379604, 0.260317, 0.834278, - 0.120554, 0.379668, 0.2808, 0.836192, - 0.129128, 0.3799, 0.301654, 0.838671, - 0.137541, 0.380109, 0.323502, 0.840939, - 0.14523, 0.379809, 0.347176, 0.844575, - 0.15248, 0.379593, 0.371706, 0.848379, - 0.159607, 0.37909, 0.39688, 0.853616, - 0.166267, 0.378617, 0.422702, 0.858921, - 0.172698, 0.377746, 0.448919, 0.865324, - 0.178823, 0.376749, 0.475661, 0.872207, - 0.184542, 0.375363, 0.502599, 0.880018, - 0.189836, 0.373657, 0.529914, 0.88694, - 0.194294, 0.370673, 0.557683, 0.894779, - 0.197022, 0.36662, 0.586848, 0.902242, - 0.199108, 0.36138, 0.615831, 0.909914, - 0.200398, 0.355434, 0.644478, 0.917088, - 0.20094, 0.348173, 0.672905, 0.923888, - 0.200671, 0.339482, 0.701327, 0.930495, - 0.198773, 0.32956, 0.730101, 0.937247, - 0.195394, 0.318363, 0.758383, 0.943108, - 0.191956, 0.306323, 0.786539, 0.948296, - 0.187227, 0.292576, 0.813637, 0.953472, - 0.181165, 0.278234, 0.840793, 0.958485, - 0.174119, 0.263054, 0.867712, 0.962714, - 0.166564, 0.246756, 0.893635, 0.966185, - 0.158181, 0.229945, 0.919028, 0.970146, - 0.148275, 0.212633, 0.943413, 0.973491, - 0.138157, 0.195229, 0.966627, 0.975741, - 0.127574, 0.178048, 0.988817, 0.977238, - 0.11554, 0.160312, 1.00924, 0.978411, - 0.10364, 0.142857, 1.02845, 0.979811, - 0.0913122, 0.125317, 1.04648, 0.98116, - 0.0782558, 0.107627, 1.06284, 0.983543, - 0.0655957, 0.0895862, 1.07798, 0.986789, - 0.0520411, 0.0713756, 1.092, 0.990292, - 0.0389727, 0.053228, 1.10484, 0.994187, - 0.025808, 0.0351945, 1.11642, 0.997499, - 0.0126071, 0.0173198, 1.12703, 0.999999, 0.000275604, - 0.000148602, 1.13674, 0.81075, - 7.8735e-06, 0.394456, 1.61829e-05, 0.808692, - 0.000198293, 0.393453, 0.000407564, 0.80846, - 0.000792877, 0.39334, 0.00162965, 0.808595, - 0.00178416, 0.393407, 0.00366711, 0.808597, - 0.00317182, 0.393408, 0.00651934, 0.808598, - 0.00495589, 0.393408, 0.0101866, 0.808591, - 0.00713627, 0.393403, 0.0146689, 0.808592, - 0.00971285, 0.393402, 0.0199667, 0.80861, - 0.0126855, 0.393407, 0.0260803, 0.808633, - 0.0160538, 0.393413, 0.0330107, 0.80868, - 0.0198175, 0.393429, 0.0407589, 0.808748, - 0.0239758, 0.393453, 0.0493264, 0.808854, - 0.0285286, 0.39349, 0.0587161, 0.808992, - 0.0334748, 0.39354, 0.0689304, 0.809141, - 0.0388116, 0.393588, 0.0799707, 0.809352, - 0.0445375, 0.39366, 0.0918432, 0.809608, - 0.0506427, 0.393742, 0.104549, 0.809915, - 0.0570708, 0.393834, 0.118085, 0.810253, - 0.0633526, 0.393885, 0.132377, 0.810687, - 0.0700966, 0.393953, 0.147537, 0.811233, - 0.0772274, 0.394047, 0.163543, 0.811865, - 0.0847629, 0.394148, 0.180394, 0.812648, - 0.0925663, 0.394265, 0.198051, 0.813583, - 0.100416, 0.394363, 0.216443, 0.814683, - 0.108119, 0.394402, 0.235502, 0.815948, - 0.11644, 0.394489, 0.255242, 0.817278, - 0.125036, 0.394542, 0.275441, 0.819605, - 0.133655, 0.39486, 0.296094, 0.822256, - 0.142682, 0.395248, 0.317309, 0.825349, - 0.150756, 0.395241, 0.340516, 0.829605, - 0.158392, 0.395285, 0.364819, 0.83391, - 0.165801, 0.394922, 0.389736, 0.839808, - 0.172677, 0.394691, 0.415409, 0.845708, - 0.179448, 0.394006, 0.441546, 0.853025, - 0.185746, 0.393279, 0.46832, 0.859666, - 0.191684, 0.391655, 0.495302, 0.86789, - 0.197146, 0.390068, 0.52262, 0.875845, - 0.201904, 0.38727, 0.550336, 0.882634, - 0.205023, 0.382688, 0.578825, 0.891076, - 0.207098, 0.377543, 0.608103, 0.900589, - 0.208474, 0.371752, 0.63723, 0.90791, - 0.209068, 0.364016, 0.665769, 0.915971, - 0.208655, 0.355593, 0.694428, 0.923455, - 0.20729, 0.345439, 0.723224, 0.931514, - 0.203821, 0.334099, 0.751925, 0.937885, - 0.19986, 0.321069, 0.780249, 0.943136, - 0.194993, 0.306571, 0.8077, 0.948818, - 0.189132, 0.291556, 0.83497, 0.954433, - 0.181617, 0.275745, 0.86188, 0.959078, - 0.173595, 0.258695, 0.888562, 0.962705, - 0.164855, 0.240825, 0.914008, 0.966753, - 0.155129, 0.22268, 0.939145, 0.970704, - 0.144241, 0.204542, 0.963393, 0.973367, - 0.133188, 0.185927, 0.985983, 0.975984, - 0.121146, 0.167743, 1.00704, 0.976994, - 0.108366, 0.149218, 1.02715, 0.978485, - 0.0956746, 0.13131, 1.0455, 0.980074, - 0.0820733, 0.112513, 1.06221, 0.98225, - 0.0684061, 0.0938323, 1.07782, 0.98553, - 0.0549503, 0.0749508, 1.09199, 0.989529, - 0.0407857, 0.055848, 1.10508, 0.993536, - 0.0271978, 0.0368581, 1.11684, 0.997247, - 0.0132716, 0.0181845, 1.12789, 1, 0.000431817, - 0.000198809, 1.13792, 0.785886, - 8.12608e-06, 0.405036, 1.57669e-05, 0.790388, - 0.000205278, 0.407355, 0.000398297, 0.790145, - 0.000820824, 0.407231, 0.00159263, 0.790135, - 0.00184681, 0.407226, 0.00358336, 0.790119, - 0.00328316, 0.407218, 0.00637039, 0.790126, - 0.00512988, 0.40722, 0.0099539, 0.79013, - 0.00738684, 0.407221, 0.0143339, 0.790135, - 0.0100538, 0.407221, 0.0195107, 0.790134, - 0.0131306, 0.407217, 0.0254848, 0.79016, - 0.0166169, 0.407224, 0.0322572, 0.790197, - 0.020512, 0.407236, 0.0398284, 0.790273, - 0.0248157, 0.407263, 0.0482014, 0.790381, - 0.029527, 0.407304, 0.0573777, 0.790521, - 0.0346446, 0.407355, 0.0673602, 0.790704, - 0.0401665, 0.40742, 0.0781522, 0.790925, - 0.0460896, 0.407499, 0.0897582, 0.791195, - 0.0524017, 0.407589, 0.10218, 0.791522, - 0.0590121, 0.407691, 0.11541, 0.791878, - 0.0654876, 0.407748, 0.12939, 0.792361, - 0.0725207, 0.407849, 0.144237, 0.792942, - 0.0799844, 0.407963, 0.159924, 0.79362, - 0.0877896, 0.408087, 0.176425, 0.794529, - 0.0958451, 0.408259, 0.193733, 0.795521, - 0.103827, 0.408362, 0.211756, 0.796778, - 0.111937, 0.408482, 0.230524, 0.798027, - 0.120521, 0.408547, 0.249967, 0.799813, - 0.129242, 0.408721, 0.269926, 0.802387, - 0.138048, 0.409148, 0.290338, 0.805279, - 0.147301, 0.409641, 0.311193, 0.809251, - 0.155895, 0.410154, 0.333611, 0.813733, - 0.163942, 0.410297, 0.357615, 0.819081, - 0.171666, 0.410373, 0.382339, 0.825427, - 0.178905, 0.410348, 0.407828, 0.83172, - 0.185812, 0.409486, 0.434034, 0.83877, - 0.192318, 0.408776, 0.460493, 0.845817, - 0.198249, 0.407176, 0.487346, 0.854664, - 0.204034, 0.405719, 0.514832, 0.863495, - 0.208908, 0.403282, 0.542401, 0.871883, - 0.212765, 0.399293, 0.570683, 0.88065, - 0.214911, 0.393803, 0.599947, 0.89004, - 0.216214, 0.387536, 0.62932, 0.898476, - 0.216745, 0.379846, 0.658319, 0.906738, - 0.216387, 0.370625, 0.687138, 0.914844, - 0.215053, 0.360139, 0.71601, 0.923877, - 0.212007, 0.348849, 0.745124, 0.931925, - 0.207481, 0.335639, 0.773366, 0.938054, - 0.202418, 0.320798, 0.801636, 0.943895, - 0.196507, 0.304772, 0.829055, 0.949468, - 0.189009, 0.288033, 0.856097, 0.955152, - 0.180539, 0.270532, 0.88301, 0.959403, - 0.171437, 0.251639, 0.909296, 0.963309, - 0.161661, 0.232563, 0.934868, 0.967399, - 0.150425, 0.213231, 0.959662, 0.972009, - 0.138659, 0.194247, 0.98302, 0.97433, - 0.126595, 0.174718, 1.00517, 0.975823, - 0.113205, 0.155518, 1.02566, 0.976371, - 0.0996096, 0.136709, 1.04418, 0.978705, - 0.0860754, 0.117571, 1.06146, 0.981477, - 0.0714438, 0.0980046, 1.07777, 0.984263, - 0.0572304, 0.0782181, 1.09214, 0.988423, - 0.0428875, 0.0584052, 1.10553, 0.993, - 0.0282442, 0.038522, 1.11758, 0.99704, - 0.0140183, 0.0190148, 1.12864, 0.999913, 0.000369494, - 0.000145203, 1.13901, 0.777662, - 8.4153e-06, 0.423844, 1.54403e-05, 0.770458, - 0.000211714, 0.419915, 0.00038845, 0.770716, - 0.000846888, 0.420055, 0.00155386, 0.770982, - 0.00190567, 0.420202, 0.00349653, 0.770981, - 0.00338782, 0.420201, 0.00621606, 0.77098, - 0.00529338, 0.4202, 0.00971274, 0.770983, - 0.00762223, 0.4202, 0.0139867, 0.770985, - 0.0103741, 0.420198, 0.0190381, 0.770996, - 0.0135489, 0.4202, 0.0248677, 0.771029, - 0.0171461, 0.420212, 0.0314764, 0.771052, - 0.0211647, 0.420215, 0.0388648, 0.771131, - 0.0256048, 0.420245, 0.047036, 0.771235, - 0.0304647, 0.420284, 0.0559911, 0.771383, - 0.0357436, 0.420341, 0.0657346, 0.771591, - 0.0414392, 0.420423, 0.0762694, 0.771819, - 0.0475462, 0.420506, 0.0875984, 0.772123, - 0.0540506, 0.420617, 0.099727, 0.772464, - 0.060797, 0.42072, 0.112637, 0.772855, - 0.0675393, 0.420799, 0.126313, 0.773317, - 0.0748323, 0.420893, 0.140824, 0.773981, - 0.0825681, 0.421058, 0.15617, 0.774746, - 0.0906307, 0.421226, 0.172322, 0.77566, - 0.0988982, 0.421397, 0.189253, 0.776837, - 0.106994, 0.421569, 0.206912, 0.778097, - 0.115528, 0.421704, 0.225359, 0.779588, - 0.124317, 0.421849, 0.24447, 0.781574, - 0.133139, 0.422097, 0.264156, 0.784451, - 0.142179, 0.422615, 0.284318, 0.787682, - 0.15165, 0.423269, 0.304902, 0.792433, - 0.160771, 0.424396, 0.3265, 0.797359, - 0.169166, 0.424772, 0.35014, 0.803986, - 0.177149, 0.425475, 0.374768, 0.809504, - 0.184745, 0.424996, 0.399928, 0.815885, - 0.19173, 0.424247, 0.425796, 0.823513, - 0.198525, 0.423515, 0.452287, 0.832549, - 0.204709, 0.422787, 0.479321, 0.841653, - 0.210447, 0.421187, 0.506718, 0.850401, - 0.215501, 0.418519, 0.53432, 0.859854, - 0.219752, 0.414715, 0.56242, 0.869364, - 0.222305, 0.409462, 0.591558, 0.878837, - 0.223744, 0.402926, 0.621074, 0.888636, - 0.224065, 0.395043, 0.650538, 0.898132, - 0.223742, 0.38564, 0.679538, 0.907181, - 0.222308, 0.375378, 0.708674, 0.915621, - 0.219837, 0.363212, 0.737714, 0.9239, - 0.215233, 0.349313, 0.767014, 0.931644, - 0.209592, 0.334162, 0.795133, 0.938887, - 0.203644, 0.317943, 0.823228, 0.945282, - 0.196349, 0.300581, 0.850822, 0.950758, - 0.18742, 0.282195, 0.877594, 0.956146, - 0.177879, 0.262481, 0.904564, 0.960355, - 0.167643, 0.242487, 0.930741, 0.965256, - 0.156671, 0.222668, 0.955868, 0.968029, - 0.144123, 0.201907, 0.979869, 0.97251, - 0.131305, 0.18202, 1.00291, 0.974925, - 0.118335, 0.161909, 1.02392, 0.975402, - 0.103714, 0.142129, 1.0433, 0.976987, - 0.089415, 0.122447, 1.06089, 0.979677, - 0.0748858, 0.102248, 1.07713, 0.983184, - 0.0596086, 0.0814851, 1.09218, 0.987466, - 0.0447671, 0.0609484, 1.10585, 0.992348, - 0.0295217, 0.0401835, 1.11829, 0.996674, - 0.0143917, 0.0198163, 1.12966, 1.00003, 0.000321364, - 0.000149983, 1.1402, 0.757901, - 8.69074e-06, 0.436176, 1.51011e-05, 0.751195, - 0.000217848, 0.432317, 0.000378533, 0.751178, - 0.000871373, 0.432307, 0.0015141, 0.751195, - 0.00196061, 0.432317, 0.0034068, 0.751198, - 0.00348552, 0.432318, 0.00605659, 0.751195, - 0.00544599, 0.432315, 0.00946353, 0.751207, - 0.00784203, 0.43232, 0.013628, 0.751213, - 0.0106732, 0.43232, 0.0185499, 0.751221, - 0.0139393, 0.432319, 0.0242302, 0.751244, - 0.0176398, 0.432325, 0.0306694, 0.7513, - 0.0217743, 0.432348, 0.0378698, 0.751358, - 0.0263412, 0.432367, 0.0458321, 0.751458, - 0.0313396, 0.432404, 0.0545587, 0.751608, - 0.0367682, 0.432464, 0.0640543, 0.7518, - 0.0426246, 0.43254, 0.0743222, 0.752065, - 0.0489031, 0.432645, 0.0853668, 0.752376, - 0.0555828, 0.432762, 0.0971911, 0.752715, - 0.0623861, 0.432859, 0.109768, 0.753137, - 0.069415, 0.432958, 0.123126, 0.753676, - 0.0770039, 0.433099, 0.137308, 0.754345, - 0.084971, 0.433272, 0.15229, 0.755235, - 0.0932681, 0.433504, 0.168075, 0.756186, - 0.10171, 0.433693, 0.184625, 0.757363, - 0.110019, 0.433857, 0.201897, 0.75884, - 0.11887, 0.434102, 0.220014, 0.760467, - 0.127881, 0.434306, 0.238778, 0.762969, - 0.136766, 0.434751, 0.258172, 0.765823, - 0.14612, 0.43529, 0.278062, 0.769676, - 0.15566, 0.436236, 0.298437, 0.774909, - 0.165177, 0.437754, 0.319532, 0.77994, - 0.17402, 0.438343, 0.342505, 0.785757, - 0.182201, 0.438609, 0.366693, 0.792487, - 0.190104, 0.438762, 0.391668, 0.80038, - 0.197438, 0.438795, 0.417494, 0.808494, - 0.204365, 0.438226, 0.443933, 0.817695, - 0.210714, 0.437283, 0.470929, 0.828111, - 0.216651, 0.436087, 0.498569, 0.837901, - 0.221804, 0.433717, 0.526165, 0.847813, - 0.226318, 0.430133, 0.554155, 0.858314, - 0.229297, 0.425213, 0.582822, 0.868891, - 0.230999, 0.418576, 0.612847, 0.878941, - 0.231155, 0.410405, 0.642445, 0.888809, - 0.230935, 0.400544, 0.672024, 0.898089, - 0.229343, 0.389613, 0.701366, 0.908081, - 0.226886, 0.377197, 0.730763, 0.916819, - 0.222676, 0.363397, 0.759642, 0.924968, - 0.216835, 0.347437, 0.788775, 0.932906, - 0.210245, 0.32995, 0.817135, 0.940025, - 0.202992, 0.312262, 0.844912, 0.946101, - 0.19436, 0.293313, 0.872164, 0.952835, - 0.184125, 0.273638, 0.899443, 0.957347, - 0.173657, 0.252385, 0.926389, 0.961434, - 0.162204, 0.231038, 0.951947, 0.965522, - 0.14979, 0.209834, 0.976751, 0.969412, - 0.136307, 0.188821, 1.00022, 0.973902, - 0.122527, 0.168013, 1.02229, 0.974045, - 0.108213, 0.147634, 1.04199, 0.975775, - 0.0927397, 0.12705, 1.06019, 0.978383, - 0.0778212, 0.106309, 1.07711, 0.98211, - 0.0621216, 0.0849279, 1.09245, 0.986517, - 0.0463847, 0.0633519, 1.10651, 0.991696, - 0.0309353, 0.0419698, 1.11903, 0.996349, - 0.0150914, 0.0206272, 1.13073, 1.00003, 0.000442449, - 0.000231396, 1.14146, 0.727498, - 8.85074e-06, 0.441528, 1.45832e-05, 0.730897, - 0.000223525, 0.443589, 0.000368298, 0.730796, - 0.000893996, 0.443528, 0.00147303, 0.730805, - 0.00201149, 0.443533, 0.00331433, 0.730814, - 0.00357596, 0.443538, 0.00589222, 0.730815, - 0.00558734, 0.443538, 0.00920678, 0.730822, - 0.00804544, 0.44354, 0.0132582, 0.730836, - 0.0109501, 0.443545, 0.0180468, 0.730848, - 0.0143008, 0.443546, 0.0235732, 0.730871, - 0.0180969, 0.443552, 0.0298382, 0.730915, - 0.022338, 0.443567, 0.0368438, 0.730982, - 0.0270225, 0.443591, 0.044591, 0.731076, - 0.0321491, 0.443627, 0.0530831, 0.731245, - 0.0377166, 0.443699, 0.0623243, 0.73144, - 0.0437216, 0.443777, 0.0723181, 0.7317, - 0.0501576, 0.443881, 0.0830691, 0.732034, - 0.0569942, 0.444014, 0.0945809, 0.732388, - 0.0638756, 0.444113, 0.106825, 0.732853, - 0.071203, 0.444247, 0.119859, 0.733473, - 0.0790076, 0.444442, 0.13369, 0.734195, - 0.0871937, 0.444645, 0.148304, 0.735069, - 0.095696, 0.444877, 0.163702, 0.736169, - 0.10426, 0.445133, 0.179861, 0.73747, - 0.112853, 0.44537, 0.196778, 0.738991, - 0.12199, 0.445651, 0.214496, 0.740865, - 0.131153, 0.445958, 0.232913, 0.743637, - 0.140245, 0.446548, 0.251977, 0.746797, - 0.149722, 0.447246, 0.271551, 0.751517, - 0.159341, 0.448656, 0.291774, 0.756156, - 0.169106, 0.449866, 0.312455, 0.761519, - 0.178436, 0.450919, 0.334552, 0.768295, - 0.186904, 0.451776, 0.358491, 0.776613, - 0.195117, 0.452832, 0.383446, 0.783966, - 0.202695, 0.45249, 0.408945, 0.793542, - 0.20985, 0.452587, 0.435364, 0.803192, - 0.216403, 0.451852, 0.462336, 0.813892, - 0.22251, 0.450708, 0.48987, 0.824968, - 0.227676, 0.4486, 0.517697, 0.835859, - 0.232443, 0.445156, 0.545975, 0.846825, - 0.235775, 0.440351, 0.574483, 0.858085, - 0.237897, 0.433641, 0.604246, 0.868825, - 0.238074, 0.425354, 0.634101, 0.879638, - 0.237661, 0.415383, 0.664201, 0.889966, - 0.236186, 0.404136, 0.693918, 0.899479, - 0.233599, 0.390917, 0.723481, 0.908769, - 0.229737, 0.376352, 0.75258, 0.917966, - 0.223836, 0.360372, 0.781764, 0.926304, - 0.217067, 0.342551, 0.811139, 0.934626, - 0.209309, 0.324238, 0.839585, 0.941841, - 0.20071, 0.304484, 0.867044, 0.94789, - 0.190602, 0.283607, 0.894579, 0.954196, - 0.179253, 0.262205, 0.921743, 0.958383, - 0.167646, 0.239847, 0.948026, 0.963119, - 0.155073, 0.218078, 0.973296, 0.966941, - 0.141426, 0.195899, 0.998135, 0.970836, - 0.126849, 0.174121, 1.02021, 0.973301, - 0.112296, 0.153052, 1.04085, 0.97448, - 0.0964965, 0.131733, 1.05946, 0.977045, - 0.080489, 0.10997, 1.07693, 0.980751, - 0.064844, 0.0881657, 1.09254, 0.985475, - 0.0481938, 0.0657987, 1.10697, 0.991089, - 0.0319185, 0.0435215, 1.12004, 0.996122, - 0.0158088, 0.0214779, 1.13173, 1.00001, 0.000372455, - 0.000200295, 1.14291, 0.708622, - 9.07597e-06, 0.45304, 1.41962e-05, 0.711162, - 0.000228911, 0.454662, 0.000358052, 0.709812, - 0.000914446, 0.453797, 0.00143034, 0.709865, - 0.00205819, 0.453834, 0.00321935, 0.709864, - 0.00365894, 0.453833, 0.00572331, 0.709855, - 0.00571692, 0.453826, 0.00894278, 0.709862, - 0.00823201, 0.453828, 0.012878, 0.709875, - 0.011204, 0.453832, 0.0175295, 0.709896, - 0.0146323, 0.453839, 0.0228978, 0.709925, - 0.0185163, 0.453847, 0.0289839, 0.709974, - 0.0228551, 0.453866, 0.0357894, 0.710045, - 0.0276473, 0.453892, 0.0433161, 0.710133, - 0.032891, 0.453924, 0.0515665, 0.710292, - 0.0385851, 0.453992, 0.0605458, 0.710485, - 0.0447254, 0.45407, 0.0702574, 0.710769, - 0.0513051, 0.454192, 0.0807077, 0.711106, - 0.0582733, 0.454329, 0.091896, 0.711516, - 0.0652866, 0.45446, 0.103814, 0.712071, - 0.0728426, 0.454653, 0.116508, 0.712676, - 0.0808307, 0.45484, 0.129968, 0.713476, - 0.0892216, 0.455096, 0.144206, 0.714377, - 0.0979047, 0.455346, 0.159212, 0.715579, - 0.106531, 0.455647, 0.174973, 0.716977, - 0.115492, 0.455961, 0.191504, 0.71862, - 0.124821, 0.456315, 0.208835, 0.72084, - 0.134079, 0.4568, 0.226869, 0.723786, - 0.143427, 0.457521, 0.245582, 0.727464, - 0.153061, 0.458475, 0.264957, 0.732771, - 0.162768, 0.460239, 0.284948, 0.736515, - 0.172627, 0.460899, 0.30522, 0.743519, - 0.182487, 0.463225, 0.326717, 0.750041, - 0.191295, 0.464027, 0.350113, 0.758589, - 0.199746, 0.465227, 0.374782, 0.767703, - 0.207584, 0.465877, 0.400226, 0.777484, - 0.214973, 0.465996, 0.426442, 0.788792, - 0.221796, 0.466019, 0.453688, 0.800194, - 0.228038, 0.465083, 0.481246, 0.811234, - 0.233346, 0.462506, 0.509086, 0.822859, - 0.238073, 0.459257, 0.537338, 0.835082, - 0.241764, 0.454863, 0.566108, 0.846332, - 0.244241, 0.448163, 0.595126, 0.858355, - 0.244736, 0.439709, 0.625574, 0.87034, - 0.244278, 0.429837, 0.65617, 0.881027, - 0.24255, 0.418002, 0.686029, 0.891007, - 0.239912, 0.404325, 0.716039, 0.900874, - 0.236133, 0.389222, 0.745518, 0.911072, - 0.230672, 0.373269, 0.775026, 0.920359, - 0.22356, 0.355083, 0.804521, 0.928604, - 0.215591, 0.335533, 0.834045, 0.937175, - 0.206503, 0.315278, 0.861612, 0.942825, - 0.196684, 0.293653, 0.889131, 0.949805, - 0.185116, 0.271503, 0.916853, 0.955535, - 0.172703, 0.248821, 0.943541, 0.959843, - 0.159978, 0.225591, 0.970132, 0.964393, - 0.146375, 0.202719, 0.994709, 0.968008, - 0.131269, 0.179928, 1.0186, 0.971013, - 0.11569, 0.158007, 1.03928, 0.973334, - 0.1003, 0.13624, 1.05887, 0.975775, - 0.0833352, 0.1138, 1.07652, 0.979579, - 0.0668981, 0.0913141, 1.09297, 0.984323, - 0.0500902, 0.0683051, 1.10734, 0.990351, - 0.0332377, 0.0451771, 1.12084, 0.995823, - 0.0161491, 0.0221705, 1.13296, 1.0001, 0.000234083, - 0.000108712, 1.14441, 0.683895, - 9.24677e-06, 0.46015, 1.37429e-05, 0.68833, - 0.000233383, 0.463134, 0.000346865, 0.688368, - 0.000933547, 0.463159, 0.00138748, 0.688367, - 0.00210049, 0.463159, 0.00312187, 0.688369, - 0.00373415, 0.463159, 0.00555004, 0.688377, - 0.00583449, 0.463163, 0.00867216, 0.688386, - 0.00840128, 0.463166, 0.0124884, 0.688398, - 0.0114343, 0.463169, 0.0169993, 0.688418, - 0.0149329, 0.463175, 0.0222054, 0.688453, - 0.0188964, 0.463188, 0.028108, 0.688515, - 0.0233239, 0.463214, 0.0347085, 0.68857, - 0.0282136, 0.463231, 0.0420091, 0.688679, - 0.033564, 0.463276, 0.0500132, 0.688854, - 0.0393733, 0.463356, 0.0587255, 0.689038, - 0.0456354, 0.46343, 0.0681476, 0.689321, - 0.0523433, 0.463553, 0.0782897, 0.689662, - 0.059412, 0.463693, 0.0891501, 0.690188, - 0.0665736, 0.4639, 0.100735, 0.690755, - 0.0743106, 0.464107, 0.113074, 0.691405, - 0.0824722, 0.464329, 0.126161, 0.692198, - 0.0910484, 0.464585, 0.140007, 0.693196, - 0.0998778, 0.464893, 0.154612, 0.69454, - 0.108651, 0.465285, 0.169984, 0.695921, - 0.117855, 0.465596, 0.186106, 0.697749, - 0.12734, 0.466056, 0.203034, 0.700375, - 0.136714, 0.466771, 0.220703, 0.703395, - 0.146386, 0.467579, 0.239062, 0.707904, - 0.156096, 0.469067, 0.258188, 0.711673, - 0.165904, 0.469851, 0.277759, 0.717489, - 0.175812, 0.471815, 0.297935, 0.724051, - 0.185931, 0.47389, 0.318916, 0.731965, - 0.195238, 0.47587, 0.341591, 0.741151, - 0.204021, 0.477523, 0.366062, 0.751416, - 0.212113, 0.478881, 0.391396, 0.761848, - 0.21979, 0.479226, 0.417599, 0.771886, - 0.2267, 0.478495, 0.444401, 0.783998, - 0.232991, 0.477622, 0.472084, 0.796523, - 0.238645, 0.475833, 0.500193, 0.808851, - 0.243396, 0.472568, 0.52865, 0.821191, - 0.247226, 0.467857, 0.557362, 0.834261, - 0.250102, 0.461871, 0.586768, 0.846762, - 0.251056, 0.453543, 0.617085, 0.859867, - 0.250604, 0.443494, 0.647659, 0.871948, - 0.248783, 0.431711, 0.678119, 0.882967, - 0.245855, 0.417911, 0.708399, 0.892826, - 0.242168, 0.401993, 0.738256, 0.90332, - 0.237062, 0.385371, 0.767999, 0.913633, - 0.22997, 0.366837, 0.798191, 0.922774, - 0.221687, 0.346372, 0.827756, 0.931371, - 0.212345, 0.325682, 0.856425, 0.938929, - 0.20206, 0.303665, 0.884299, 0.944821, - 0.190981, 0.280786, 0.912023, 0.951792, - 0.178065, 0.2573, 0.939669, 0.957712, - 0.164634, 0.233448, 0.96655, 0.961912, - 0.150863, 0.209504, 0.992366, 0.966382, - 0.13577, 0.18597, 1.01633, 0.969588, - 0.119593, 0.162905, 1.03843, 0.971777, - 0.103203, 0.14053, 1.05841, 0.97433, - 0.0865888, 0.117909, 1.07632, 0.978686, - 0.0690829, 0.0944101, 1.09326, 0.983281, - 0.0516568, 0.0705671, 1.10796, 0.989562, - 0.034558, 0.0468592, 1.12182, 0.995465, - 0.0167808, 0.0229846, 1.1342, 0.999991, 0.000373016, - 0.000235606, 1.1459, 0.662251, - 9.39016e-06, 0.468575, 1.32714e-05, 0.666634, - 0.000237624, 0.471675, 0.000335842, 0.666411, - 0.000950385, 0.471516, 0.00134321, 0.666399, - 0.00213833, 0.471509, 0.00302221, 0.666386, - 0.0038014, 0.471499, 0.00537283, 0.666405, - 0.00593958, 0.471511, 0.00839533, 0.666406, - 0.00855253, 0.471508, 0.0120898, 0.666428, - 0.0116401, 0.471519, 0.0164569, 0.666444, - 0.0152015, 0.471522, 0.0214971, 0.66649, - 0.0192362, 0.471543, 0.027212, 0.666537, - 0.0237428, 0.471558, 0.033603, 0.666617, - 0.0287198, 0.471591, 0.0406728, 0.666718, - 0.0341647, 0.471631, 0.0484238, 0.666889, - 0.0400759, 0.47171, 0.0568621, 0.667104, - 0.0464479, 0.471805, 0.0659915, 0.667374, - 0.0532677, 0.471923, 0.0758178, 0.667772, - 0.0603805, 0.472098, 0.0863425, 0.668371, - 0.0677392, 0.472363, 0.0975917, 0.668971, - 0.0756028, 0.472596, 0.109567, 0.669696, - 0.0839293, 0.472869, 0.122272, 0.670481, - 0.0926683, 0.473126, 0.135718, 0.6715, - 0.1016, 0.473442, 0.149914, 0.672911, - 0.110566, 0.47389, 0.164882, 0.674512, - 0.119984, 0.474354, 0.180602, 0.67651, - 0.129574, 0.474922, 0.19711, 0.679292, - 0.139106, 0.475764, 0.214371, 0.682798, - 0.148993, 0.476886, 0.232405, 0.686955, - 0.158737, 0.478179, 0.251153, 0.691406, - 0.168754, 0.479432, 0.270436, 0.697438, - 0.178703, 0.481481, 0.290374, 0.704761, - 0.188955, 0.484143, 0.311044, 0.713599, - 0.198814, 0.487007, 0.333003, 0.723194, - 0.207869, 0.488962, 0.357144, 0.732601, - 0.216189, 0.489815, 0.382169, 0.744193, - 0.22398, 0.490888, 0.408227, 0.754907, - 0.231156, 0.490355, 0.434928, 0.767403, - 0.23747, 0.489548, 0.462599, 0.78107, - 0.243503, 0.488274, 0.490908, 0.793893, - 0.248114, 0.484843, 0.519421, 0.807296, - 0.25222, 0.4803, 0.548561, 0.820529, - 0.255265, 0.474097, 0.577772, 0.833716, - 0.256741, 0.466041, 0.607782, 0.848403, - 0.25637, 0.456547, 0.638807, 0.860755, - 0.254804, 0.443946, 0.670058, 0.874012, - 0.251834, 0.430852, 0.700749, 0.885619, - 0.247867, 0.414903, 0.731446, 0.896069, - 0.242634, 0.397276, 0.761191, 0.906266, - 0.236093, 0.378535, 0.791053, 0.916759, - 0.227543, 0.358038, 0.821298, 0.92523, - 0.21783, 0.335705, 0.850747, 0.93436, - 0.207534, 0.313797, 0.879258, 0.941631, - 0.195983, 0.289671, 0.907734, 0.947564, - 0.183567, 0.265319, 0.935206, 0.953681, - 0.169345, 0.240815, 0.962739, 0.960008, - 0.154909, 0.216119, 0.989227, 0.964145, - 0.140161, 0.192096, 1.01465, 0.968171, - 0.123411, 0.167855, 1.03737, 0.969859, - 0.106525, 0.144817, 1.05767, 0.972666, - 0.0891023, 0.12149, 1.0761, 0.977055, - 0.0718094, 0.0975306, 1.09336, 0.982527, - 0.0534213, 0.0730217, 1.10878, 0.989001, - 0.0355579, 0.0483366, 1.12285, 0.99512, - 0.0176383, 0.023938, 1.13548, 1.00007, 0.000368831, - 0.000211581, 1.14744, 0.651047, - 9.60845e-06, 0.484101, 1.2922e-05, 0.644145, - 0.000241347, 0.478968, 0.000324578, 0.64396, - 0.000965142, 0.478831, 0.00129798, 0.64396, - 0.00217154, 0.47883, 0.00292046, 0.643968, - 0.00386049, 0.478835, 0.00519202, 0.643974, - 0.00603186, 0.478838, 0.0081128, 0.643977, - 0.0086854, 0.478836, 0.011683, 0.643982, - 0.0118207, 0.478834, 0.0159031, 0.644024, - 0.0154374, 0.478856, 0.0207743, 0.644059, - 0.0195343, 0.478868, 0.0262975, 0.644122, - 0.0241103, 0.478896, 0.0324747, 0.644207, - 0.0291638, 0.478933, 0.039309, 0.64432, - 0.0346919, 0.478981, 0.0468029, 0.644481, - 0.0406919, 0.479053, 0.0549614, 0.644722, - 0.047159, 0.479169, 0.0637909, 0.645013, - 0.0540748, 0.479302, 0.0732974, 0.645503, - 0.0612001, 0.479541, 0.0834898, 0.646117, - 0.0687303, 0.479829, 0.0943873, 0.646707, - 0.0767846, 0.480061, 0.105991, 0.647431, - 0.0852465, 0.480343, 0.11831, 0.64831, - 0.0940719, 0.48066, 0.131348, 0.649486, - 0.103056, 0.481083, 0.14514, 0.650864, - 0.112261, 0.481528, 0.159676, 0.652604, - 0.121852, 0.482102, 0.174979, 0.654825, - 0.131505, 0.482813, 0.191079, 0.657876, - 0.141189, 0.483876, 0.207927, 0.661339, - 0.151239, 0.48499, 0.225586, 0.665463, - 0.161091, 0.486279, 0.243947, 0.670542, - 0.171235, 0.487968, 0.262957, 0.677361, - 0.181347, 0.49053, 0.282781, 0.685672, - 0.191679, 0.493862, 0.303311, 0.694551, - 0.201781, 0.49699, 0.324607, 0.703753, - 0.211164, 0.498884, 0.347916, 0.713703, - 0.219675, 0.500086, 0.372628, 0.725911, - 0.227836, 0.501554, 0.398694, 0.73862, - 0.23533, 0.502193, 0.425529, 0.752118, - 0.241786, 0.501811, 0.453209, 0.76579, - 0.247865, 0.500185, 0.481381, 0.779568, - 0.252696, 0.497159, 0.51011, 0.793991, - 0.256802, 0.492765, 0.539322, 0.808182, - 0.259942, 0.486827, 0.569078, 0.821698, - 0.261703, 0.478386, 0.598818, 0.836009, - 0.262006, 0.468772, 0.629762, 0.849824, - 0.260333, 0.456352, 0.661366, 0.863888, - 0.257398, 0.442533, 0.69295, 0.876585, - 0.253264, 0.426573, 0.723608, 0.888665, - 0.248026, 0.408964, 0.754378, 0.899537, - 0.241487, 0.389677, 0.784761, 0.9094, - 0.233463, 0.368516, 0.814688, 0.920166, - 0.223397, 0.346624, 0.845009, 0.928899, - 0.21255, 0.322717, 0.874431, 0.937156, - 0.200869, 0.298698, 0.902922, 0.943861, - 0.188387, 0.273491, 0.931356, 0.949557, - 0.174341, 0.247866, 0.958854, 0.955862, - 0.158994, 0.222496, 0.986098, 0.961721, - 0.143664, 0.197522, 1.01229, 0.965976, - 0.127412, 0.17302, 1.03571, 0.968652, - 0.109798, 0.148954, 1.05699, 0.971084, - 0.0916787, 0.125044, 1.07587, 0.975584, - 0.0739634, 0.100577, 1.09372, 0.98122, - 0.055322, 0.0753666, 1.10948, 0.988253, - 0.0366825, 0.0498899, 1.12394, 0.99482, - 0.0180389, 0.024611, 1.13694, 1.00001, 0.000229839, - 0.000188283, 1.14919, 0.613867, - 9.64198e-06, 0.479449, 1.23452e-05, 0.621485, - 0.000244534, 0.485399, 0.000313091, 0.621429, - 0.000978202, 0.485353, 0.00125245, 0.62112, - 0.00220004, 0.485114, 0.00281687, 0.621119, - 0.0039111, 0.485112, 0.00500783, 0.621122, - 0.00611091, 0.485112, 0.00782498, 0.621133, - 0.00879922, 0.485117, 0.0112687, 0.621152, - 0.0119756, 0.485125, 0.0153394, 0.621183, - 0.0156396, 0.485139, 0.0200382, 0.621227, - 0.0197898, 0.485158, 0.0253663, 0.621298, - 0.0244253, 0.485192, 0.0313261, 0.621388, - 0.0295441, 0.485233, 0.0379204, 0.621507, - 0.0351432, 0.485286, 0.0451523, 0.621693, - 0.0412198, 0.485378, 0.0530277, 0.621933, - 0.0477673, 0.485495, 0.0615522, 0.622232, - 0.0547574, 0.485635, 0.0707316, 0.622809, - 0.0619417, 0.485943, 0.0805883, 0.623407, - 0.069625, 0.486232, 0.0911267, 0.62406, - 0.077796, 0.486516, 0.102354, 0.624835, - 0.0863731, 0.486838, 0.114279, 0.625758, - 0.095251, 0.487188, 0.126902, 0.627043, - 0.104299, 0.487695, 0.140285, 0.628438, - 0.113724, 0.488163, 0.154397, 0.630325, - 0.123417, 0.488858, 0.169267, 0.632801, - 0.133137, 0.489754, 0.184941, 0.635784, - 0.143052, 0.490815, 0.20136, 0.639406, - 0.153132, 0.492048, 0.218643, 0.643872, - 0.163143, 0.49363, 0.236615, 0.6499, - 0.17333, 0.496009, 0.255449, 0.657201, - 0.183622, 0.498994, 0.275006, 0.666221, - 0.194019, 0.502888, 0.295354, 0.674419, - 0.204192, 0.505459, 0.316244, 0.683729, - 0.21406, 0.507771, 0.33849, 0.695584, - 0.222854, 0.510245, 0.363166, 0.708583, - 0.231315, 0.512293, 0.389071, 0.721233, - 0.238911, 0.512747, 0.415737, 0.735134, - 0.245657, 0.512482, 0.443331, 0.750179, - 0.251879, 0.511526, 0.471891, 0.765073, - 0.256911, 0.508935, 0.500892, 0.779794, - 0.261144, 0.504341, 0.530294, 0.794801, - 0.264316, 0.498515, 0.560144, 0.810339, - 0.266276, 0.491015, 0.590213, 0.824818, - 0.266981, 0.481126, 0.620865, 0.839375, - 0.265778, 0.468685, 0.652687, 0.853043, - 0.262748, 0.453925, 0.684759, 0.867335, - 0.258474, 0.437912, 0.716209, 0.88037, - 0.253187, 0.419648, 0.747508, 0.891711, - 0.246476, 0.39982, 0.77797, 0.902896, - 0.238735, 0.37879, 0.808586, 0.913601, - 0.22885, 0.355891, 0.838843, 0.923019, - 0.217656, 0.331773, 0.869014, 0.933432, - 0.205539, 0.307356, 0.898512, 0.939691, - 0.192595, 0.281321, 0.9269, 0.946938, - 0.178945, 0.255441, 0.955297, 0.952372, - 0.163587, 0.229013, 0.983231, 0.95909, - 0.147214, 0.203179, 1.00971, 0.963675, - 0.13064, 0.17792, 1.03438, 0.968247, - 0.113121, 0.152898, 1.05625, 0.97001, - 0.0945824, 0.128712, 1.07598, 0.974458, - 0.0755648, 0.103349, 1.094, 0.980168, - 0.0571998, 0.0776731, 1.1104, 0.987295, - 0.0377994, 0.0514445, 1.12491, 0.994432, - 0.0186417, 0.025429, 1.13851, 0.999975, 0.000542714, - 0.000282356, 1.15108, 0.592656, - 9.80249e-06, 0.486018, 1.19532e-05, 0.598467, - 0.000247275, 0.490781, 0.000301531, 0.597934, - 0.000988317, 0.490343, 0.00120517, 0.597903, - 0.00222366, 0.490319, 0.0027116, 0.597913, - 0.00395315, 0.490327, 0.00482077, 0.597919, - 0.00617653, 0.490329, 0.00753264, 0.597936, - 0.00889375, 0.490339, 0.0108478, 0.597956, - 0.0121043, 0.490347, 0.0147668, 0.597992, - 0.0158073, 0.490365, 0.0192905, 0.598032, - 0.0200017, 0.490382, 0.0244204, 0.598109, - 0.0246865, 0.49042, 0.0301593, 0.598215, - 0.0298594, 0.490474, 0.03651, 0.59833, - 0.0355167, 0.490524, 0.0434757, 0.598525, - 0.0416559, 0.490624, 0.0510629, 0.598778, - 0.0482692, 0.490753, 0.0592781, 0.599135, - 0.0553114, 0.49094, 0.0681304, 0.599802, - 0.062542, 0.491328, 0.0776467, 0.600361, - 0.0703638, 0.491598, 0.0878184, 0.60101, - 0.0786256, 0.491882, 0.0986573, 0.601811, - 0.0872962, 0.492232, 0.11018, 0.602861, - 0.0962284, 0.492684, 0.1224, 0.604167, - 0.10538, 0.493213, 0.135354, 0.605693, - 0.114896, 0.493799, 0.149034, 0.607682, - 0.124654, 0.494576, 0.163469, 0.610672, - 0.13456, 0.4959, 0.178747, 0.613313, - 0.144581, 0.496713, 0.194723, 0.617603, - 0.154703, 0.498499, 0.211617, 0.622174, - 0.16489, 0.500188, 0.229183, 0.628855, - 0.175164, 0.503072, 0.247786, 0.636963, - 0.185565, 0.506798, 0.267116, 0.644866, - 0.195911, 0.509719, 0.28702, 0.653741, - 0.206104, 0.512776, 0.307763, 0.664942, - 0.216447, 0.516812, 0.329631, 0.67633, - 0.22552, 0.519181, 0.353515, 0.690012, - 0.234316, 0.521681, 0.379226, 0.704243, - 0.242032, 0.523129, 0.405901, 0.719396, - 0.249172, 0.523768, 0.433585, 0.734471, - 0.255543, 0.522541, 0.462085, 0.750539, - 0.260697, 0.520217, 0.491233, 0.766365, - 0.26501, 0.516293, 0.521094, 0.781677, - 0.268409, 0.509708, 0.551014, 0.797132, - 0.270399, 0.501944, 0.581463, 0.812655, - 0.271247, 0.492025, 0.612402, 0.828592, - 0.270708, 0.480424, 0.643798, 0.844044, - 0.268085, 0.465955, 0.67682, 0.857305, - 0.263459, 0.448425, 0.708496, 0.87114, - 0.258151, 0.430243, 0.74046, 0.884936, - 0.251171, 0.410578, 0.771583, 0.895772, - 0.243305, 0.38862, 0.802234, 0.906961, - 0.234037, 0.365214, 0.833179, 0.917775, - 0.222714, 0.34116, 0.86353, 0.927883, - 0.210175, 0.31572, 0.893557, 0.936617, - 0.196925, 0.289159, 0.922976, 0.943384, - 0.182788, 0.261996, 0.951606, 0.949713, - 0.167965, 0.235324, 0.979958, 0.955818, - 0.151109, 0.208408, 1.00765, 0.961344, - 0.133834, 0.182591, 1.03329, 0.965469, - 0.115987, 0.156958, 1.0557, 0.968693, - 0.09746, 0.132239, 1.07583, 0.973165, - 0.0778514, 0.106195, 1.09451, 0.979387, - 0.0585067, 0.0797669, 1.11137, 0.98671, - 0.0390409, 0.0530263, 1.12643, 0.994093, - 0.019408, 0.0263163, 1.14016, 1.00002, 0.000540029, - 0.000194487, 1.15299, 0.574483, - 9.89066e-06, 0.494533, 1.14896e-05, 0.574478, - 0.000249127, 0.494528, 0.000289403, 0.574607, - 0.000996811, 0.494637, 0.00115797, 0.574396, - 0.00224241, 0.494458, 0.00260498, 0.574377, - 0.00398632, 0.49444, 0.00463102, 0.574386, - 0.00622836, 0.494445, 0.00723623, 0.574401, - 0.0089683, 0.494453, 0.010421, 0.574419, - 0.0122056, 0.49446, 0.0141859, 0.574459, - 0.0159396, 0.494481, 0.0185322, 0.574525, - 0.0201692, 0.49452, 0.0234617, 0.574587, - 0.0248924, 0.494547, 0.0289762, 0.574697, - 0.0301074, 0.494604, 0.0350797, 0.574853, - 0.0358114, 0.494688, 0.0417767, 0.575027, - 0.041999, 0.494772, 0.0490718, 0.575294, - 0.0486618, 0.494915, 0.0569728, 0.575733, - 0.0557148, 0.495173, 0.0654955, 0.576356, - 0.0630489, 0.495537, 0.0746612, 0.576944, - 0.0709285, 0.495836, 0.0844615, 0.57765, - 0.0792723, 0.496177, 0.0949142, 0.578491, - 0.0880167, 0.496563, 0.10603, 0.579639, - 0.0969462, 0.497096, 0.117841, 0.580989, - 0.10622, 0.497684, 0.130367, 0.582587, - 0.115861, 0.498337, 0.143609, 0.584951, - 0.125605, 0.499414, 0.157625, 0.587602, - 0.135608, 0.500518, 0.172413, 0.59076, - 0.145742, 0.501767, 0.187999, 0.594992, - 0.155934, 0.503542, 0.20445, 0.600656, - 0.166303, 0.506135, 0.221764, 0.607816, - 0.176681, 0.509542, 0.24002, 0.61522, - 0.187071, 0.51263, 0.258992, 0.623702, - 0.197465, 0.516021, 0.278773, 0.634192, - 0.207816, 0.520422, 0.299377, 0.644936, - 0.218183, 0.524073, 0.320802, 0.657888, - 0.2278, 0.528049, 0.34384, 0.670666, - 0.236747, 0.52986, 0.36916, 0.685626, - 0.24484, 0.531892, 0.395867, 0.701304, - 0.252071, 0.532727, 0.423488, 0.717727, - 0.258714, 0.532146, 0.452201, 0.733914, - 0.264211, 0.529883, 0.481579, 0.750529, - 0.26859, 0.5259, 0.511558, 0.76747, - 0.272046, 0.51999, 0.542042, 0.785189, - 0.274225, 0.513083, 0.572799, 0.800954, - 0.275189, 0.502936, 0.603816, 0.816962, - 0.274946, 0.490921, 0.635461, 0.83336, - 0.272695, 0.47684, 0.6676, 0.848143, - 0.268223, 0.459405, 0.70051, 0.861818, - 0.262768, 0.440319, 0.732902, 0.876828, - 0.255872, 0.420123, 0.765084, 0.889312, - 0.247703, 0.398379, 0.796391, 0.900412, - 0.238381, 0.374496, 0.827333, 0.912251, - 0.227783, 0.349874, 0.858385, 0.921792, - 0.214832, 0.323181, 0.888652, 0.931273, - 0.200949, 0.296624, 0.917763, 0.940295, - 0.186537, 0.269211, 0.947878, 0.946812, - 0.171538, 0.241447, 0.977016, 0.953588, - 0.155254, 0.213829, 1.00501, 0.958841, - 0.137156, 0.186807, 1.03179, 0.963746, - 0.118699, 0.160706, 1.05502, 0.966468, - 0.0998358, 0.135504, 1.07568, 0.971178, - 0.0805186, 0.109131, 1.09479, 0.97831, - 0.0599348, 0.0818293, 1.1123, 0.985886, - 0.0399661, 0.0545872, 1.12771, 0.994021, - 0.0198682, 0.0269405, 1.14186, 1.00009, 0.000271022, - 0.00012989, 1.15514, 0.538716, - 9.90918e-06, 0.486732, 1.09675e-05, 0.550656, - 0.000250642, 0.497518, 0.000277412, 0.55057, - 0.00100265, 0.497441, 0.00110974, 0.550903, - 0.00225672, 0.497733, 0.00249779, 0.550568, - 0.00401046, 0.497438, 0.00443906, 0.550574, - 0.00626613, 0.49744, 0.00693637, 0.550591, - 0.0090226, 0.497449, 0.00998921, 0.550623, - 0.0122795, 0.497469, 0.0135984, 0.550667, - 0.0160361, 0.497495, 0.0177654, 0.550724, - 0.0202908, 0.497526, 0.0224915, 0.550792, - 0.0250421, 0.497557, 0.0277795, 0.550918, - 0.0302878, 0.49763, 0.0336334, 0.551058, - 0.0360241, 0.497701, 0.0400573, 0.551276, - 0.0422473, 0.497824, 0.0470585, 0.551551, - 0.0489441, 0.497977, 0.0546433, 0.552074, - 0.0559596, 0.498312, 0.0628367, 0.552681, - 0.0633978, 0.498679, 0.071646, 0.553324, - 0.0713176, 0.499031, 0.0810746, 0.554011, - 0.0797268, 0.499365, 0.091129, 0.55488, - 0.0885238, 0.499779, 0.101837, 0.556171, - 0.0974417, 0.500444, 0.113239, 0.557498, - 0.106841, 0.501025, 0.125316, 0.559299, - 0.116533, 0.501864, 0.138128, 0.561647, - 0.126298, 0.502967, 0.151695, 0.564347, - 0.136388, 0.504129, 0.16604, 0.567863, - 0.146576, 0.505713, 0.181207, 0.572569, - 0.156832, 0.507953, 0.197259, 0.578919, - 0.167323, 0.511186, 0.214258, 0.585387, - 0.177712, 0.514042, 0.232038, 0.593134, - 0.188184, 0.517484, 0.250733, 0.603295, - 0.198717, 0.522345, 0.270454, 0.613854, - 0.209177, 0.526751, 0.290807, 0.626092, - 0.219644, 0.531595, 0.312202, 0.637868, - 0.229494, 0.534721, 0.334435, 0.652458, - 0.238718, 0.538304, 0.359184, 0.666985, - 0.247061, 0.539875, 0.385637, 0.683301, - 0.254652, 0.541042, 0.41328, 0.69998, - 0.261376, 0.540735, 0.441903, 0.717824, - 0.267085, 0.539139, 0.471609, 0.734617, - 0.271465, 0.534958, 0.501446, 0.753663, - 0.27528, 0.53032, 0.532571, 0.770512, - 0.277617, 0.522134, 0.563641, 0.787356, - 0.278525, 0.51206, 0.595067, 0.806252, - 0.278512, 0.50119, 0.627226, 0.822061, - 0.277023, 0.486791, 0.659402, 0.838959, - 0.273175, 0.470467, 0.692874, 0.85379, - 0.267238, 0.450688, 0.725702, 0.868268, - 0.260327, 0.429741, 0.75832, 0.881994, - 0.251946, 0.407223, 0.790189, 0.893885, - 0.242432, 0.383214, 0.821625, 0.905118, - 0.231904, 0.357297, 0.853011, 0.916045, - 0.219545, 0.330733, 0.883773, 0.927614, - 0.205378, 0.303916, 0.914435, 0.936005, - 0.190388, 0.275941, 0.944502, 0.944533, - 0.1749, 0.247493, 0.974439, 0.950758, - 0.158588, 0.218996, 1.00286, 0.957078, - 0.141027, 0.191559, 1.0304, 0.962448, - 0.121507, 0.164457, 1.05466, 0.964993, - 0.102068, 0.138636, 1.0761, 0.970017, - 0.0822598, 0.111861, 1.09541, 0.97661, - 0.062033, 0.0843438, 1.11317, 0.985073, - 0.0409832, 0.0558496, 1.12911, 0.993515, - 0.020146, 0.0275331, 1.1438, 1.00006, 0.00027329, - 0.000107883, 1.15736, 0.525324, - 9.99341e-06, 0.498153, 1.05385e-05, 0.526513, - 0.000251605, 0.499277, 0.000265329, 0.526517, - 0.00100641, 0.499282, 0.0010613, 0.526588, - 0.00226466, 0.499337, 0.00238823, 0.526539, - 0.0040255, 0.499302, 0.00424535, 0.526547, - 0.00628954, 0.499306, 0.00663364, 0.526561, - 0.00905628, 0.499313, 0.00955337, 0.526593, - 0.0123253, 0.499334, 0.0130054, 0.526642, - 0.0160957, 0.499365, 0.0169911, 0.5267, - 0.0203661, 0.499396, 0.0215122, 0.526792, - 0.0251347, 0.499451, 0.0265718, 0.526904, - 0.0303985, 0.499511, 0.0321732, 0.527079, - 0.0361554, 0.499617, 0.0383231, 0.527285, - 0.0423982, 0.499731, 0.045026, 0.527602, - 0.0491121, 0.499924, 0.0522936, 0.528166, - 0.0561127, 0.500306, 0.0601528, 0.52879, - 0.0635988, 0.5007, 0.0686059, 0.529421, - 0.071581, 0.501048, 0.0776518, 0.530144, - 0.0799854, 0.501421, 0.0873148, 0.531062, - 0.0888032, 0.501884, 0.0976084, 0.532374, - 0.0977643, 0.50259, 0.108588, 0.533828, - 0.107197, 0.50329, 0.120234, 0.53581, - 0.116887, 0.504312, 0.132602, 0.538063, - 0.126755, 0.505365, 0.145721, 0.5409, - 0.136819, 0.506668, 0.159617, 0.544882, - 0.147117, 0.508731, 0.174369, 0.550238, - 0.157446, 0.511601, 0.190028, 0.556038, - 0.167988, 0.514431, 0.206587, 0.563031, - 0.178364, 0.517808, 0.224046, 0.571543, - 0.189007, 0.521937, 0.242503, 0.582255, - 0.199546, 0.527415, 0.261977, 0.59272, - 0.210084, 0.531682, 0.282162, 0.605648, - 0.220448, 0.537123, 0.303426, 0.61785, - 0.230593, 0.540664, 0.325323, 0.632223, - 0.240238, 0.544467, 0.348993, 0.648819, - 0.24887, 0.547594, 0.375462, 0.665825, - 0.256657, 0.54912, 0.403024, 0.683389, - 0.263711, 0.549294, 0.431773, 0.701495, - 0.269666, 0.547649, 0.461494, 0.719197, - 0.274169, 0.543786, 0.491623, 0.737906, - 0.278124, 0.538644, 0.522994, 0.756652, - 0.280632, 0.531057, 0.554775, 0.775279, - 0.281741, 0.521972, 0.586441, 0.792688, - 0.281652, 0.509613, 0.618596, 0.811894, - 0.280345, 0.496497, 0.651462, 0.827938, - 0.277128, 0.47968, 0.684023, 0.844837, - 0.271646, 0.460688, 0.718024, 0.859239, - 0.264397, 0.438872, 0.751207, 0.874088, - 0.256144, 0.41577, 0.784232, 0.887693, - 0.246311, 0.391369, 0.816191, 0.899402, - 0.235497, 0.365872, 0.847828, 0.910973, - 0.223631, 0.338618, 0.87934, 0.92204, - 0.209874, 0.310803, 0.910325, 0.930987, - 0.194265, 0.281802, 0.940695, 0.94, - 0.178125, 0.252836, 0.970958, 0.948018, - 0.161479, 0.224239, 1.00078, 0.955141, - 0.144038, 0.195857, 1.0288, 0.960513, - 0.124915, 0.168487, 1.05371, 0.963964, - 0.104284, 0.141495, 1.07596, 0.968713, - 0.0838732, 0.114437, 1.09628, 0.975524, - 0.0635579, 0.0863105, 1.11448, 0.98431, - 0.042291, 0.0574774, 1.13069, 0.992916, - 0.0209131, 0.0284343, 1.14568, 0.999926, 0.000743097, - 0.000379265, 1.15955, 0.501042, - 9.98428e-06, 0.498726, 1.00306e-05, 0.502992, - 0.000252112, 0.500665, 0.000253283, 0.502417, - 0.00100791, 0.500092, 0.00101259, 0.502965, - 0.00226919, 0.500621, 0.00227978, 0.502318, - 0.00403109, 0.499994, 0.00405011, 0.502333, - 0.00629832, 0.500005, 0.00632868, 0.502362, - 0.00906907, 0.500027, 0.00911446, 0.502369, - 0.0123423, 0.500023, 0.0124078, 0.50243, - 0.0161178, 0.500066, 0.016211, 0.502493, - 0.0203937, 0.500103, 0.0205256, 0.502592, - 0.0251684, 0.500166, 0.0253548, 0.502707, - 0.0304389, 0.50023, 0.0307029, 0.502881, - 0.0362015, 0.500335, 0.0365753, 0.503124, - 0.0424507, 0.500488, 0.0429798, 0.503443, - 0.0491582, 0.500686, 0.0499268, 0.504083, - 0.0561476, 0.501155, 0.0574541, 0.504668, - 0.0636846, 0.501524, 0.0655408, 0.505319, - 0.0716834, 0.501904, 0.0742072, 0.50609, - 0.0800925, 0.502321, 0.0834699, 0.507122, - 0.0888425, 0.502896, 0.0933603, 0.508414, - 0.097855, 0.503603, 0.10391, 0.509955, - 0.107304, 0.504416, 0.115113, 0.512061, - 0.116921, 0.505565, 0.127054, 0.514419, - 0.12689, 0.506732, 0.139709, 0.517529, - 0.136934, 0.508338, 0.153173, 0.522085, - 0.147327, 0.510987, 0.167528, 0.526986, - 0.157612, 0.513527, 0.182708, 0.533122, - 0.168213, 0.516717, 0.198881, 0.540807, - 0.178688, 0.520832, 0.215986, 0.550687, - 0.189511, 0.52632, 0.234335, 0.560567, - 0.199998, 0.531009, 0.253375, 0.571698, - 0.210652, 0.535839, 0.273499, 0.584364, - 0.220917, 0.541091, 0.294355, 0.599066, - 0.23137, 0.546875, 0.316525, 0.614148, - 0.241206, 0.551306, 0.339671, 0.631157, - 0.250379, 0.555187, 0.36531, 0.647919, - 0.258397, 0.556595, 0.392767, 0.666112, - 0.265528, 0.556949, 0.421397, 0.686158, - 0.271827, 0.556617, 0.451433, 0.704838, - 0.27674, 0.552975, 0.482131, 0.723957, - 0.280733, 0.547814, 0.513458, 0.74262, - 0.283359, 0.53997, 0.545446, 0.762009, - 0.284541, 0.530422, 0.57775, 0.781314, - 0.284507, 0.518546, 0.610434, 0.799116, - 0.283309, 0.504178, 0.643178, 0.817604, - 0.280378, 0.48843, 0.676248, 0.83459, - 0.275619, 0.469457, 0.709698, 0.850974, - 0.26856, 0.447698, 0.744245, 0.866747, - 0.260094, 0.424791, 0.777695, 0.881412, - 0.249929, 0.399913, 0.810392, 0.8936, - 0.239137, 0.37308, 0.842872, 0.905943, - 0.226818, 0.345705, 0.874677, 0.916408, - 0.213699, 0.31706, 0.906257, 0.927215, - 0.198428, 0.288444, 0.936881, 0.935625, - 0.181643, 0.258329, 0.96795, 0.944076, - 0.164386, 0.228488, 0.998216, 0.951229, - 0.146339, 0.199763, 1.02689, 0.958793, - 0.127709, 0.172153, 1.0535, 0.963219, - 0.107244, 0.144989, 1.07646, 0.967562, - 0.0857764, 0.11685, 1.09675, 0.974866, - 0.0645377, 0.0880571, 1.11576, 0.983353, - 0.0431732, 0.0587352, 1.13227, 0.992503, - 0.0218356, 0.0294181, 1.1478, 1.00003, 0.000605203, - 0.000231013, 1.16207, 0.482935, - 1.01177e-05, 0.504695, 9.68142e-06, 0.477554, - 0.000251521, 0.499071, 0.000240676, 0.477904, - 0.00100683, 0.499436, 0.00096342, 0.478368, - 0.00226636, 0.499899, 0.0021687, 0.477977, - 0.00402719, 0.499513, 0.00385384, 0.477993, - 0.00629226, 0.499525, 0.0060221, 0.478011, - 0.00906011, 0.499536, 0.00867289, 0.478051, - 0.0123305, 0.499566, 0.0118074, 0.478089, - 0.016102, 0.499587, 0.0154269, 0.478171, - 0.0203736, 0.499645, 0.0195341, 0.478254, - 0.025143, 0.499692, 0.0241318, 0.47839, - 0.0304071, 0.499779, 0.0292247, 0.478588, - 0.0361631, 0.499911, 0.0348196, 0.478812, - 0.0424023, 0.500046, 0.0409231, 0.479208, - 0.0490724, 0.500326, 0.047552, 0.479841, - 0.0560722, 0.500805, 0.0547377, 0.480392, - 0.0636125, 0.501152, 0.0624607, 0.481068, - 0.0716134, 0.501561, 0.0707473, 0.481898, - 0.0800062, 0.502054, 0.0796118, 0.483022, - 0.0886568, 0.502728, 0.0890974, 0.484332, - 0.0977553, 0.503479, 0.0992099, 0.486126, - 0.107173, 0.504546, 0.10999, 0.488066, - 0.11677, 0.50557, 0.121476, 0.490521, - 0.126725, 0.506849, 0.133672, 0.494232, - 0.136793, 0.50911, 0.146731, 0.498302, - 0.147116, 0.511345, 0.160577, 0.503565, - 0.157446, 0.514344, 0.175335, 0.510902, - 0.168121, 0.518824, 0.191207, 0.519263, - 0.178799, 0.523666, 0.208058, 0.528204, - 0.189407, 0.528296, 0.225875, 0.538854, - 0.200145, 0.533724, 0.244782, 0.551278, - 0.210701, 0.539833, 0.264753, 0.565222, - 0.221303, 0.546131, 0.285745, 0.579403, - 0.231688, 0.551496, 0.307592, 0.595469, - 0.241718, 0.556809, 0.330582, 0.610929, - 0.250992, 0.559641, 0.354995, 0.629433, - 0.259602, 0.562379, 0.382471, 0.648504, - 0.267038, 0.563676, 0.411126, 0.66756, - 0.273388, 0.562092, 0.440924, 0.689143, - 0.278788, 0.560807, 0.472118, 0.709056, - 0.282783, 0.555701, 0.503774, 0.729855, - 0.285836, 0.548698, 0.536364, 0.748954, - 0.287078, 0.538544, 0.56895, 0.768373, - 0.287133, 0.526711, 0.601991, 0.78827, - 0.285839, 0.512511, 0.635403, 0.807465, - 0.283238, 0.496323, 0.668797, 0.825194, - 0.27906, 0.477638, 0.702584, 0.842203, - 0.272286, 0.456253, 0.736393, 0.857749, - 0.263854, 0.432412, 0.77096, 0.874799, - 0.253943, 0.407806, 0.80489, 0.887497, - 0.24237, 0.38033, 0.83771, 0.89966, - 0.230278, 0.352446, 0.870376, 0.911753, - 0.21646, 0.323268, 0.902256, 0.923011, - 0.202071, 0.294314, 0.933306, 0.932375, - 0.185519, 0.264104, 0.965177, 0.940537, - 0.167604, 0.234035, 0.996303, 0.948904, - 0.149068, 0.20412, 1.0261, 0.955263, - 0.129539, 0.175431, 1.05304, 0.960303, - 0.109932, 0.148116, 1.07617, 0.965512, - 0.0880572, 0.119693, 1.09742, 0.973466, - 0.0660548, 0.0901619, 1.11721, 0.98284, - 0.0439228, 0.0599875, 1.13436, 0.992216, - 0.0219588, 0.0298975, 1.15006, 0.999946, 0.000119402, - 2.08547e-05, 1.16471, 0.447827, - 1.00414e-05, 0.491543, 9.14833e-06, 0.454778, - 0.000251257, 0.499172, 0.00022891, 0.453519, - 0.00100342, 0.497787, 0.000914184, 0.45357, - 0.00225776, 0.497847, 0.00205701, 0.453578, - 0.00401371, 0.497855, 0.00365705, 0.45357, - 0.00627107, 0.497841, 0.00571453, 0.453598, - 0.00902968, 0.497864, 0.00823019, 0.453627, - 0.0122888, 0.497882, 0.0112049, 0.453684, - 0.0160475, 0.497923, 0.0146405, 0.453764, - 0.0203044, 0.49798, 0.0185394, 0.453866, - 0.0250576, 0.498049, 0.0229054, 0.453996, - 0.0303028, 0.49813, 0.0277424, 0.454196, - 0.0360379, 0.498267, 0.0330587, 0.454457, - 0.0422521, 0.498445, 0.0388613, 0.454926, - 0.0488393, 0.498812, 0.0451767, 0.455525, - 0.0558653, 0.499272, 0.0520153, 0.456074, - 0.0633772, 0.499625, 0.0593754, 0.456752, - 0.0713606, 0.500049, 0.0672751, 0.457648, - 0.07971, 0.500615, 0.0757447, 0.458849, - 0.0883032, 0.501399, 0.0848231, 0.46029, - 0.0974095, 0.502293, 0.0945135, 0.462, - 0.106729, 0.503301, 0.104848, 0.464121, - 0.116354, 0.504533, 0.115884, 0.466889, - 0.126214, 0.506172, 0.127652, 0.470744, - 0.136324, 0.508667, 0.14024, 0.47488, - 0.146595, 0.510995, 0.153673, 0.480845, - 0.157027, 0.514832, 0.168053, 0.488262, - 0.167658, 0.519506, 0.183508, 0.496547, - 0.178343, 0.524347, 0.199948, 0.506254, - 0.188916, 0.52983, 0.217503, 0.517961, - 0.199975, 0.536357, 0.236272, 0.531484, - 0.210624, 0.543641, 0.256096, 0.545496, - 0.221227, 0.550048, 0.277085, 0.559497, - 0.231568, 0.555076, 0.298615, 0.575752, - 0.241698, 0.560541, 0.321547, 0.591999, - 0.251172, 0.564156, 0.345602, 0.610654, - 0.260178, 0.567607, 0.371851, 0.630484, - 0.268094, 0.56923, 0.40076, 0.651807, - 0.274661, 0.569779, 0.430801, 0.67239, - 0.280331, 0.566791, 0.461939, 0.693024, - 0.284501, 0.562007, 0.493854, 0.715473, - 0.287852, 0.555791, 0.526992, 0.736323, - 0.28929, 0.546345, 0.560102, 0.755771, - 0.289405, 0.534, 0.593543, 0.775424, - 0.2881, 0.519114, 0.627256, 0.795447, - 0.285562, 0.502543, 0.661464, 0.815319, - 0.281416, 0.484773, 0.695206, 0.831769, - 0.275523, 0.463445, 0.729044, 0.849464, - 0.267516, 0.440269, 0.764069, 0.866775, - 0.257584, 0.415049, 0.799089, 0.881252, - 0.245817, 0.388049, 0.831948, 0.894209, - 0.233127, 0.35889, 0.865526, 0.906922, - 0.219579, 0.329915, 0.89818, 0.919686, - 0.204491, 0.300441, 0.930013, 0.929044, - 0.188962, 0.269445, 0.962061, 0.938393, - 0.171079, 0.238402, 0.994214, 0.94661, - 0.15199, 0.208204, 1.02533, 0.953095, - 0.131953, 0.178653, 1.0529, 0.958644, - 0.111233, 0.150684, 1.0771, 0.963925, - 0.0903098, 0.122359, 1.09855, 0.971995, - 0.0680505, 0.0923342, 1.11874, 0.981658, - 0.0448512, 0.0614195, 1.13635, 0.991649, - 0.0221931, 0.0303582, 1.15238, 0.999985, 0.000393403, - 0.000111086, 1.16772, 0.396806, - 9.71563e-06, 0.457671, 8.42355e-06, 0.429186, - 0.000249421, 0.495017, 0.00021625, 0.429324, - 0.000998052, 0.495173, 0.000865322, 0.429175, - 0.00224487, 0.494999, 0.00194637, 0.429129, - 0.00399041, 0.494952, 0.00346004, 0.429153, - 0.00623476, 0.494974, 0.00540684, 0.429168, - 0.0089773, 0.494983, 0.00778714, 0.429207, - 0.0122175, 0.495012, 0.0106022, 0.429257, - 0.0159542, 0.495047, 0.0138535, 0.429338, - 0.0201864, 0.495106, 0.0175443, 0.429431, - 0.0249104, 0.495165, 0.0216774, 0.429587, - 0.0301252, 0.495279, 0.0262594, 0.429796, - 0.0358249, 0.495432, 0.0312968, 0.430065, - 0.0419972, 0.495621, 0.0367985, 0.430588, - 0.0485144, 0.496061, 0.042798, 0.43113, - 0.0555028, 0.496472, 0.0492914, 0.431743, - 0.0629852, 0.496904, 0.0562907, 0.432448, - 0.0709256, 0.497369, 0.0638056, 0.433414, - 0.0791942, 0.498032, 0.071885, 0.434638, - 0.0877346, 0.498854, 0.0805517, 0.43611, - 0.0968056, 0.499812, 0.0898047, 0.437859, - 0.106002, 0.500891, 0.0997142, 0.440017, - 0.115648, 0.502198, 0.110289, 0.443236, - 0.125427, 0.504389, 0.121644, 0.44697, - 0.135492, 0.506809, 0.133769, 0.451689, - 0.145746, 0.509858, 0.146787, 0.45811, - 0.156219, 0.514247, 0.160793, 0.465305, - 0.166834, 0.518816, 0.175791, 0.474085, - 0.177546, 0.524331, 0.191906, 0.484808, - 0.188262, 0.53104, 0.209199, 0.49732, - 0.199346, 0.538511, 0.227825, 0.509693, - 0.209951, 0.544554, 0.247269, 0.524367, - 0.220533, 0.551616, 0.267978, 0.539228, - 0.231082, 0.557368, 0.289672, 0.55644, - 0.241342, 0.563782, 0.31268, 0.574204, - 0.250964, 0.568851, 0.33651, 0.593388, - 0.260306, 0.57312, 0.362219, 0.613358, - 0.268667, 0.574916, 0.390322, 0.634512, - 0.275591, 0.575053, 0.420478, 0.65563, - 0.281328, 0.572404, 0.451614, 0.678265, - 0.285948, 0.568893, 0.484112, 0.70011, - 0.289408, 0.561878, 0.517348, 0.723005, - 0.291328, 0.55359, 0.551355, 0.743744, - 0.291418, 0.541099, 0.585109, 0.763949, - 0.290252, 0.526489, 0.619487, 0.784186, - 0.287648, 0.509496, 0.65404, 0.804304, - 0.283782, 0.491484, 0.688649, 0.823629, - 0.278067, 0.470517, 0.723133, 0.84094, - 0.270588, 0.44705, 0.757163, 0.857852, - 0.261188, 0.421252, 0.792816, 0.874934, - 0.249313, 0.394191, 0.827248, 0.888709, - 0.236492, 0.365359, 0.861074, 0.902589, - 0.222185, 0.336016, 0.894417, 0.914201, - 0.207314, 0.30527, 0.926825, 0.925978, - 0.191146, 0.274532, 0.9595, 0.93512, - 0.174135, 0.243393, 0.991583, 0.943656, - 0.155231, 0.212414, 1.02356, 0.951719, - 0.134403, 0.182005, 1.05239, 0.957164, - 0.113023, 0.153043, 1.07754, 0.962656, - 0.0914493, 0.124186, 1.09984, 0.970695, - 0.0694179, 0.0941654, 1.12, 0.980749, - 0.0466199, 0.0629671, 1.13849, 0.991205, - 0.0227032, 0.0311146, 1.15494, 0.999884, 0.000632388, - 0.000254483, 1.1706, 0.379821, - 9.57289e-06, 0.460637, 7.89337e-06, 0.405188, - 0.000247483, 0.491396, 0.000204064, 0.404796, - 0.000989434, 0.490914, 0.000815853, 0.40483, - 0.00222607, 0.490949, 0.00183559, 0.40473, - 0.00395723, 0.49084, 0.00326332, 0.404731, - 0.00618287, 0.490836, 0.00509945, 0.404768, - 0.00890258, 0.490871, 0.00734463, 0.404791, - 0.0121156, 0.490883, 0.00999992, 0.404857, - 0.0158214, 0.490938, 0.0130676, 0.404943, - 0.0200178, 0.491004, 0.0165503, 0.405059, - 0.0247027, 0.491093, 0.0204521, 0.405213, - 0.0298729, 0.491205, 0.0247788, 0.405399, - 0.0355226, 0.491333, 0.0295373, 0.405731, - 0.0416352, 0.491604, 0.034741, 0.406303, - 0.0480807, 0.492116, 0.0404255, 0.406814, - 0.0550458, 0.492506, 0.0465732, 0.407404, - 0.0624652, 0.492926, 0.0532058, 0.408149, - 0.0702958, 0.493442, 0.0603442, 0.409128, - 0.0784623, 0.494136, 0.0680297, 0.410408, - 0.087007, 0.495054, 0.0762786, 0.411813, - 0.0959639, 0.495962, 0.0851046, 0.413735, - 0.105075, 0.497257, 0.0945878, 0.416137, - 0.114646, 0.498882, 0.104725, 0.41934, - 0.124394, 0.501132, 0.11563, 0.423326, - 0.134328, 0.503883, 0.127325, 0.428419, - 0.14458, 0.50747, 0.139911, 0.43484, - 0.154979, 0.511964, 0.153481, 0.442641, - 0.165628, 0.517328, 0.168114, 0.452511, - 0.176365, 0.524258, 0.183995, 0.463473, - 0.187298, 0.531248, 0.200953, 0.475564, - 0.198244, 0.538367, 0.219176, 0.488664, - 0.208938, 0.545175, 0.238514, 0.504073, - 0.219599, 0.553227, 0.259129, 0.520832, - 0.230378, 0.560653, 0.280997, 0.538455, - 0.240703, 0.567523, 0.303821, 0.55709, - 0.250548, 0.573287, 0.327948, 0.576646, - 0.259964, 0.577795, 0.353362, 0.596705, - 0.268721, 0.580077, 0.380336, 0.618053, - 0.276054, 0.58018, 0.4101, 0.640303, - 0.282176, 0.578747, 0.44161, 0.662365, - 0.286931, 0.574294, 0.474106, 0.684542, - 0.290521, 0.567035, 0.507549, 0.707984, - 0.292672, 0.558687, 0.541853, 0.730913, - 0.293189, 0.547606, 0.576581, 0.752948, - 0.292199, 0.533471, 0.61172, 0.773452, - 0.289508, 0.516395, 0.646339, 0.794715, - 0.285716, 0.497873, 0.682131, 0.814251, - 0.280051, 0.476845, 0.716396, 0.833057, - 0.272873, 0.453449, 0.751503, 0.84959, - 0.263982, 0.427857, 0.786085, 0.867022, - 0.252745, 0.400335, 0.821355, 0.882277, - 0.239655, 0.371304, 0.85646, 0.895375, - 0.225386, 0.340397, 0.890828, 0.909347, - 0.209587, 0.310005, 0.923532, 0.921885, - 0.193433, 0.2796, 0.956419, 0.932127, - 0.176135, 0.247276, 0.989445, 0.941869, - 0.157872, 0.216186, 1.02221, 0.949735, - 0.137577, 0.185602, 1.05195, 0.956617, - 0.115285, 0.155767, 1.07822, 0.961974, - 0.0928418, 0.126103, 1.10149, 0.96972, - 0.0700592, 0.0956758, 1.12207, 0.98012, - 0.0474671, 0.0643269, 1.1408, 0.990825, - 0.0238113, 0.0320863, 1.1577, 0.999876, 0.000381574, - 8.12203e-05, 1.17403, 0.367636, - 9.61342e-06, 0.469176, 7.53287e-06, 0.380377, - 0.000244772, 0.485434, 0.000191797, 0.380416, - 0.000978857, 0.485475, 0.000767015, 0.380376, - 0.00220165, 0.485435, 0.00172522, 0.380419, - 0.00391408, 0.485487, 0.00306734, 0.380438, - 0.00611549, 0.485505, 0.00479332, 0.380462, - 0.00880558, 0.485525, 0.00690391, 0.380496, - 0.0119837, 0.485551, 0.00940039, 0.38056, - 0.0156487, 0.485605, 0.0122848, 0.38064, - 0.0197988, 0.485666, 0.0155601, 0.380767, - 0.0244324, 0.48577, 0.0192313, 0.380909, - 0.0295444, 0.485871, 0.0233032, 0.381142, - 0.0351321, 0.48606, 0.0277861, 0.381472, - 0.0411535, 0.486336, 0.0326939, 0.382015, - 0.0475408, 0.486833, 0.0380565, 0.382523, - 0.0544395, 0.487231, 0.0438615, 0.383129, - 0.061784, 0.487683, 0.0501332, 0.383952, - 0.0695085, 0.488313, 0.0568996, 0.38498, - 0.0775819, 0.489077, 0.0641952, 0.386331, - 0.0860443, 0.490113, 0.0720324, 0.387788, - 0.0948406, 0.491099, 0.0804379, 0.389808, - 0.103899, 0.492566, 0.0894899, 0.39252, - 0.113313, 0.494601, 0.0992098, 0.395493, - 0.123007, 0.496619, 0.109641, 0.399826, - 0.132859, 0.499912, 0.120919, 0.405341, - 0.143077, 0.504061, 0.133107, 0.411932, - 0.153465, 0.508905, 0.146263, 0.420591, - 0.164108, 0.515482, 0.160544, 0.43101, - 0.174893, 0.523191, 0.176123, 0.441881, - 0.185839, 0.53026, 0.192757, 0.453919, - 0.196633, 0.537295, 0.210535, 0.468715, - 0.207611, 0.546156, 0.229886, 0.485182, - 0.218517, 0.555173, 0.250543, 0.501926, - 0.229249, 0.562728, 0.27221, 0.51785, - 0.239481, 0.567494, 0.294892, 0.536947, - 0.249395, 0.573889, 0.318987, 0.557115, - 0.259, 0.578831, 0.344348, 0.577966, - 0.268075, 0.582055, 0.371223, 0.599489, - 0.276115, 0.583307, 0.399834, 0.62479, - 0.282523, 0.583902, 0.431415, 0.647504, - 0.287663, 0.57953, 0.464301, 0.670601, - 0.291538, 0.573103, 0.498123, 0.693539, - 0.293842, 0.563731, 0.532662, 0.717385, - 0.294681, 0.553169, 0.567925, 0.741533, - 0.293717, 0.539908, 0.603502, 0.762142, - 0.291156, 0.521902, 0.639074, 0.783014, - 0.28719, 0.502815, 0.674439, 0.805158, - 0.281773, 0.482598, 0.710497, 0.823646, - 0.274682, 0.458949, 0.7456, 0.841879, - 0.266184, 0.433129, 0.781085, 0.859515, - 0.255682, 0.406064, 0.816, 0.875335, - 0.242849, 0.376509, 0.851074, 0.890147, - 0.228329, 0.345502, 0.886473, 0.903144, - 0.212491, 0.31428, 0.920751, 0.916618, - 0.195695, 0.282994, 0.954606, 0.927953, - 0.178267, 0.251091, 0.988402, 0.937414, - 0.159549, 0.219107, 1.02141, 0.946823, - 0.140022, 0.18896, 1.05167, 0.954651, - 0.118154, 0.158667, 1.07819, 0.959955, - 0.0946636, 0.128808, 1.1025, 0.96858, - 0.0711792, 0.0973787, 1.12391, 0.97938, - 0.0475046, 0.0650965, 1.14322, 0.990498, - 0.024059, 0.0326267, 1.16077, 0.999844, - 5.12408e-05, 0.000112444, 1.17727, 0.316912, - 9.34977e-06, 0.425996, 6.95559e-06, 0.356423, - 0.000241372, 0.479108, 0.000179562, 0.356272, - 0.000965292, 0.478897, 0.00071811, 0.356262, - 0.00217182, 0.478894, 0.00161574, 0.356265, - 0.00386092, 0.478895, 0.00287261, 0.356278, - 0.0060324, 0.478905, 0.00448907, 0.356293, - 0.00868565, 0.478914, 0.00646572, 0.356346, - 0.0118207, 0.478965, 0.00880438, 0.356395, - 0.0154355, 0.479001, 0.0115066, 0.356484, - 0.019529, 0.479075, 0.0145762, 0.356609, - 0.0240991, 0.47918, 0.018018, 0.356766, - 0.0291413, 0.479305, 0.0218379, 0.357009, - 0.0346498, 0.479512, 0.0260454, 0.357424, - 0.0405462, 0.479909, 0.0306657, 0.357899, - 0.0468825, 0.480337, 0.0357054, 0.358424, - 0.0536887, 0.480771, 0.0411728, 0.359041, - 0.0609416, 0.481242, 0.0470841, 0.359903, - 0.0685239, 0.481943, 0.0534831, 0.360932, - 0.0764883, 0.482741, 0.0603795, 0.362196, - 0.0848364, 0.483688, 0.0678028, 0.363847, - 0.0935002, 0.484947, 0.0758086, 0.365972, - 0.102471, 0.486588, 0.0844173, 0.368741, - 0.111751, 0.488787, 0.0937199, 0.372146, - 0.121334, 0.491405, 0.103732, 0.377114, - 0.131147, 0.495604, 0.114608, 0.38226, - 0.141213, 0.499436, 0.126345, 0.389609, - 0.151632, 0.505334, 0.139116, 0.397925, - 0.162073, 0.51168, 0.152995, 0.407824, - 0.172819, 0.518876, 0.168071, 0.420014, - 0.183929, 0.527639, 0.184495, 0.434266, - 0.195032, 0.537588, 0.20232, 0.447352, - 0.205792, 0.544379, 0.221189, 0.463726, - 0.216704, 0.553422, 0.241616, 0.481406, - 0.227531, 0.562074, 0.263298, 0.498707, - 0.238017, 0.568227, 0.286116, 0.518039, - 0.247936, 0.574473, 0.3101, 0.538277, - 0.257437, 0.579191, 0.335401, 0.561166, - 0.266829, 0.584807, 0.362246, 0.583189, - 0.275329, 0.586476, 0.390609, 0.606024, - 0.28234, 0.585578, 0.420998, 0.632419, - 0.287924, 0.584496, 0.454357, 0.656128, - 0.291972, 0.577766, 0.488233, 0.679953, - 0.29456, 0.56875, 0.523248, 0.704654, - 0.295816, 0.558388, 0.559168, 0.729016, - 0.295157, 0.544826, 0.595326, 0.752062, - 0.292779, 0.528273, 0.631864, 0.773138, - 0.288681, 0.508482, 0.667793, 0.794869, - 0.283358, 0.487341, 0.704035, 0.815101, - 0.27608, 0.46354, 0.739925, 0.834212, - 0.26767, 0.438672, 0.775539, 0.852368, - 0.257397, 0.411239, 0.810895, 0.870207, - 0.245689, 0.3829, 0.846472, 0.884063, - 0.231452, 0.351496, 0.881788, 0.898284, - 0.215561, 0.31895, 0.917438, 0.912964, - 0.198208, 0.287367, 0.952422, 0.924666, - 0.180426, 0.254487, 0.987551, 0.934429, - 0.161525, 0.222226, 1.02142, 0.943485, - 0.141197, 0.191143, 1.05218, 0.9521, - 0.120085, 0.161112, 1.07937, 0.957876, - 0.0975881, 0.130982, 1.10403, 0.966943, - 0.0726842, 0.0990553, 1.12616, 0.978313, - 0.0483705, 0.0662818, 1.14619, 0.990048, - 0.0239072, 0.0329243, 1.16413, 0.999984, 0.000461885, - 7.72859e-05, 1.18099, 0.321287, - 9.35049e-06, 0.455413, 6.59662e-06, 0.332595, - 0.000237513, 0.471437, 0.000167562, 0.332729, - 0.000949964, 0.471618, 0.000670192, 0.332305, - 0.00213618, 0.471028, 0.00150712, 0.332326, - 0.00379765, 0.471055, 0.00267959, 0.332344, - 0.00593353, 0.471072, 0.00418751, 0.332356, - 0.00854349, 0.471077, 0.00603172, 0.332403, - 0.0116268, 0.471121, 0.00821362, 0.332461, - 0.0151824, 0.47117, 0.0107357, 0.332552, - 0.0192088, 0.471251, 0.0136014, 0.332657, - 0.0237024, 0.47133, 0.0168152, 0.332835, - 0.0286615, 0.471487, 0.0203853, 0.333083, - 0.0340765, 0.471708, 0.0243212, 0.333547, - 0.0398563, 0.47219, 0.0286518, 0.333989, - 0.0460916, 0.472587, 0.0333763, 0.334532, - 0.0527897, 0.473054, 0.0385084, 0.335167, - 0.0599284, 0.473568, 0.0440638, 0.33608, - 0.0673514, 0.474362, 0.0500962, 0.337146, - 0.0752237, 0.475231, 0.0566022, 0.338462, - 0.083418, 0.476282, 0.0636272, 0.34014, - 0.0919382, 0.477615, 0.0712153, 0.342341, - 0.100741, 0.479404, 0.079417, 0.345088, - 0.109905, 0.481618, 0.0882631, 0.349049, - 0.119369, 0.485081, 0.0978851, 0.353939, - 0.129033, 0.489317, 0.108336, 0.359893, - 0.139038, 0.494309, 0.119698, 0.366945, - 0.149411, 0.499983, 0.132024, 0.375814, - 0.159843, 0.507185, 0.145558, 0.387112, - 0.170664, 0.516392, 0.160433, 0.40023, - 0.181897, 0.526519, 0.176648, 0.412555, - 0.192785, 0.53423, 0.193922, 0.427023, - 0.203663, 0.542741, 0.212662, 0.443685, - 0.214695, 0.552066, 0.232944, 0.461499, - 0.225561, 0.560762, 0.254495, 0.480975, - 0.236257, 0.569421, 0.277531, 0.501, - 0.24639, 0.576101, 0.301724, 0.521691, - 0.256101, 0.581493, 0.327112, 0.543478, - 0.265289, 0.585221, 0.353917, 0.566094, - 0.273938, 0.587614, 0.381941, 0.589578, - 0.281679, 0.587991, 0.41172, 0.614583, - 0.287655, 0.585928, 0.444148, 0.641813, - 0.292228, 0.582092, 0.478617, 0.666189, - 0.295172, 0.57398, 0.51397, 0.690475, - 0.29648, 0.561676, 0.550118, 0.715543, - 0.296203, 0.548758, 0.586933, 0.740405, - 0.293999, 0.532792, 0.62384, 0.762183, - 0.28998, 0.512735, 0.660723, 0.786069, - 0.28478, 0.492402, 0.69807, 0.806812, - 0.277568, 0.469058, 0.734422, 0.826987, - 0.268951, 0.443017, 0.770946, 0.844588, - 0.259049, 0.415501, 0.80699, 0.863725, - 0.2471, 0.387328, 0.842107, 0.879137, - 0.234157, 0.356108, 0.878078, 0.894634, - 0.218719, 0.324315, 0.914058, 0.909162, - 0.201293, 0.291813, 0.949922, 0.92072, - 0.18267, 0.258474, 0.985337, 0.93158, - 0.163212, 0.225593, 1.0205, 0.941238, - 0.142771, 0.193986, 1.05273, 0.949293, - 0.120956, 0.163392, 1.08075, 0.956226, - 0.0985743, 0.132934, 1.10559, 0.96546, - 0.075118, 0.101255, 1.12823, 0.977403, - 0.0497921, 0.0675441, 1.149, 0.989648, - 0.0241574, 0.0334681, 1.16765, 1.00001, 0.0005762, - 0.000184807, 1.18519, 0.303474, - 9.16603e-06, 0.4542, 6.1243e-06, 0.308894, - 0.000232869, 0.462306, 0.000155592, 0.309426, - 0.000931661, 0.463093, 0.000622499, 0.308643, - 0.0020949, 0.461933, 0.00139979, 0.308651, - 0.0037242, 0.461941, 0.00248874, 0.308662, - 0.00581873, 0.46195, 0.00388933, 0.308687, - 0.00837818, 0.461974, 0.00560247, 0.308728, - 0.0114016, 0.462011, 0.00762948, 0.308789, - 0.0148884, 0.462067, 0.00997326, 0.308882, - 0.0188369, 0.462151, 0.0126375, 0.309007, - 0.0232436, 0.462263, 0.0156271, 0.30918, - 0.0281054, 0.462417, 0.0189498, 0.309442, - 0.0334065, 0.462667, 0.0226167, 0.309901, - 0.0390589, 0.463162, 0.0266614, 0.310331, - 0.0452042, 0.463555, 0.0310715, 0.310858, - 0.0517735, 0.464019, 0.0358698, 0.311576, - 0.0587359, 0.464669, 0.0410848, 0.312436, - 0.0660383, 0.465406, 0.0467453, 0.313526, - 0.0737266, 0.466339, 0.0528718, 0.314903, - 0.0817574, 0.467504, 0.0595039, 0.316814, - 0.090167, 0.469226, 0.0666888, 0.318965, - 0.0987555, 0.470981, 0.0744658, 0.322077, - 0.107792, 0.473814, 0.082912, 0.325947, - 0.117098, 0.477241, 0.0920846, 0.331008, - 0.126602, 0.48184, 0.102137, 0.337893, - 0.136619, 0.488334, 0.113135, 0.345106, - 0.146838, 0.494415, 0.12511, 0.355111, - 0.157357, 0.503275, 0.138356, 0.365095, - 0.167955, 0.510966, 0.152686, 0.378344, - 0.179157, 0.521508, 0.16856, 0.391599, - 0.190143, 0.530455, 0.18561, 0.407786, - 0.20123, 0.541275, 0.204308, 0.425294, - 0.212456, 0.551784, 0.224623, 0.444021, - 0.223568, 0.561493, 0.246172, 0.463418, - 0.234154, 0.569886, 0.268979, 0.484077, - 0.244546, 0.577116, 0.293411, 0.505513, - 0.254301, 0.582914, 0.318936, 0.527672, - 0.263564, 0.587208, 0.345856, 0.550565, - 0.272332, 0.589277, 0.374054, 0.573656, - 0.280011, 0.588426, 0.403276, 0.59827, - 0.286924, 0.587504, 0.43474, 0.624731, - 0.291994, 0.583401, 0.468767, 0.652396, - 0.295159, 0.576997, 0.504411, 0.67732, - 0.296954, 0.565863, 0.54114, 0.703147, - 0.296877, 0.552316, 0.57816, 0.728715, - 0.295147, 0.536773, 0.616124, 0.752448, - 0.291275, 0.51771, 0.653885, 0.775169, - 0.285905, 0.496087, 0.691537, 0.799307, - 0.279064, 0.474232, 0.729251, 0.819482, - 0.270294, 0.447676, 0.766267, 0.837659, - 0.260032, 0.419656, 0.802616, 0.856903, - 0.248497, 0.391328, 0.838583, 0.873325, - 0.235252, 0.360285, 0.874711, 0.889788, - 0.221126, 0.329215, 0.91077, 0.904486, - 0.204304, 0.296392, 0.94653, 0.917711, - 0.185562, 0.262159, 0.983828, 0.928969, - 0.165635, 0.229142, 1.01955, 0.939707, - 0.14442, 0.19673, 1.05317, 0.948167, - 0.122147, 0.165095, 1.0823, 0.955222, - 0.099098, 0.13451, 1.10791, 0.964401, - 0.0755332, 0.102476, 1.1312, 0.976605, - 0.0513817, 0.0689667, 1.15218, 0.989085, - 0.0258499, 0.034506, 1.17129, 0.999908, 0.000617773, - 0.000271268, 1.18961, 0.285803, - 9.05752e-06, 0.452348, 5.72272e-06, 0.284689, - 0.00022732, 0.450581, 0.000143626, 0.285263, - 0.000910214, 0.451482, 0.000575099, 0.285302, - 0.00204784, 0.451553, 0.00129395, 0.285318, - 0.00364057, 0.451574, 0.0023006, 0.28533, - 0.00568813, 0.451585, 0.00359547, 0.285361, - 0.00819001, 0.451618, 0.00517934, 0.285397, - 0.0111458, 0.45165, 0.007054, 0.285447, - 0.0145536, 0.451688, 0.00922167, 0.285527, - 0.0184127, 0.451758, 0.0116869, 0.285688, - 0.0227207, 0.451929, 0.0144555, 0.28584, - 0.0274712, 0.452055, 0.0175341, 0.286136, - 0.0326278, 0.452369, 0.0209406, 0.286574, - 0.0381792, 0.452853, 0.0246965, 0.287012, - 0.0441879, 0.453272, 0.0287996, 0.287542, - 0.0506096, 0.453752, 0.033268, 0.288299, - 0.0573634, 0.454488, 0.0381504, 0.289186, - 0.0645458, 0.455294, 0.0434447, 0.290302, - 0.0720405, 0.456301, 0.0491973, 0.291776, - 0.0799046, 0.457648, 0.0554453, 0.29372, - 0.088117, 0.459483, 0.0622311, 0.296052, - 0.0965328, 0.461571, 0.0695992, 0.299563, - 0.105409, 0.465085, 0.077658, 0.30335, - 0.114553, 0.468506, 0.0864176, 0.309167, - 0.123917, 0.474423, 0.0961078, 0.31529, - 0.13381, 0.47995, 0.106643, 0.324163, - 0.144021, 0.488592, 0.118322, 0.333272, - 0.154382, 0.496461, 0.131133, 0.344224, - 0.165015, 0.50562, 0.145208, 0.357733, - 0.176168, 0.516719, 0.16073, 0.373046, - 0.187468, 0.528513, 0.177807, 0.38788, - 0.198488, 0.537713, 0.196072, 0.405133, - 0.209545, 0.547999, 0.21605, 0.423845, - 0.220724, 0.55759, 0.237484, 0.443777, - 0.231518, 0.566246, 0.26039, 0.464824, - 0.242035, 0.574326, 0.284835, 0.486635, - 0.251898, 0.58037, 0.310518, 0.51012, - 0.261304, 0.58568, 0.337678, 0.535301, - 0.270384, 0.590197, 0.366242, 0.559193, - 0.27841, 0.590569, 0.395873, 0.583544, - 0.285325, 0.588161, 0.426857, 0.608834, - 0.291113, 0.584249, 0.459477, 0.635753, - 0.294882, 0.57763, 0.494734, 0.664367, - 0.297088, 0.569479, 0.532023, 0.689688, - 0.297364, 0.555064, 0.569629, 0.715732, - 0.295949, 0.539522, 0.608124, 0.741307, - 0.292259, 0.521613, 0.646231, 0.764949, - 0.287063, 0.49969, 0.684938, 0.788599, - 0.28012, 0.476747, 0.723548, 0.81048, - 0.27153, 0.45116, 0.761135, 0.831372, - 0.261289, 0.424101, 0.798916, 0.850092, - 0.249559, 0.39443, 0.835952, 0.867777, - 0.236348, 0.363849, 0.871606, 0.884632, - 0.221569, 0.332477, 0.907843, 0.90047, - 0.20618, 0.300667, 0.944187, 0.914524, - 0.188771, 0.266552, 0.981371, 0.926892, - 0.168362, 0.232349, 1.01841, 0.937951, - 0.146761, 0.199359, 1.05308, 0.947236, - 0.123813, 0.1675, 1.0839, 0.954367, - 0.099984, 0.136166, 1.11047, 0.963907, - 0.0759278, 0.103808, 1.13414, 0.976218, - 0.0511367, 0.0697061, 1.15575, 0.988772, - 0.0267415, 0.0352529, 1.17531, 0.999888, - 0.000520778, 0.000289926, 1.19389, 0.263546, - 8.83274e-06, 0.441896, 5.26783e-06, 0.262352, - 0.000221849, 0.439889, 0.000132311, 0.262325, - 0.000886683, 0.439848, 0.000528824, 0.26228, - 0.00199476, 0.439765, 0.00118975, 0.262372, - 0.00354671, 0.439922, 0.00211568, 0.26239, - 0.00554141, 0.439941, 0.00330652, 0.262412, - 0.00797888, 0.439961, 0.00476346, 0.262453, - 0.0108584, 0.440002, 0.00648818, 0.262528, - 0.0141788, 0.440085, 0.0084835, 0.262615, - 0.017938, 0.440166, 0.0107533, 0.262744, - 0.0221346, 0.440291, 0.0133044, 0.262939, - 0.026762, 0.440493, 0.0161445, 0.263277, - 0.0317573, 0.440889, 0.0192974, 0.26368, - 0.0371832, 0.441338, 0.0227699, 0.264106, - 0.0430371, 0.441753, 0.0265698, 0.264624, - 0.0493035, 0.442227, 0.0307178, 0.265378, - 0.0558669, 0.442985, 0.0352616, 0.266253, - 0.0628718, 0.443795, 0.0401968, 0.267478, - 0.0701569, 0.445008, 0.04559, 0.269062, - 0.077845, 0.446599, 0.0514539, 0.270926, - 0.0857941, 0.448349, 0.0578382, 0.273693, - 0.0940773, 0.451221, 0.0648363, 0.276746, - 0.102704, 0.454097, 0.0724389, 0.281693, - 0.111735, 0.459517, 0.0808744, 0.287335, - 0.121004, 0.46531, 0.0901551, 0.29448, - 0.130734, 0.472605, 0.100371, 0.30257, - 0.140777, 0.480251, 0.111644, 0.312465, - 0.15111, 0.489444, 0.124111, 0.324856, - 0.16189, 0.500919, 0.137979, 0.33774, - 0.172946, 0.511317, 0.153163, 0.35255, - 0.184152, 0.522684, 0.169817, 0.367786, - 0.19522, 0.53248, 0.187886, 0.385474, - 0.20632, 0.543326, 0.207634, 0.404976, - 0.217744, 0.554109, 0.229165, 0.425203, - 0.228691, 0.563395, 0.252068, 0.446704, - 0.239299, 0.571565, 0.276471, 0.468951, - 0.249348, 0.577935, 0.302323, 0.493487, - 0.258933, 0.584309, 0.329882, 0.517861, - 0.268009, 0.58773, 0.358525, 0.543309, - 0.276238, 0.589612, 0.388585, 0.569704, - 0.28356, 0.589294, 0.419787, 0.594871, - 0.289497, 0.585137, 0.452114, 0.622555, - 0.294452, 0.580356, 0.486466, 0.651167, - 0.296918, 0.57185, 0.523079, 0.677332, - 0.297647, 0.558428, 0.5611, 0.703718, - 0.296321, 0.542232, 0.599592, 0.730262, - 0.293339, 0.524541, 0.639138, 0.754304, - 0.288036, 0.502691, 0.677978, 0.778051, - 0.281018, 0.479212, 0.716537, 0.801557, - 0.272414, 0.454071, 0.75586, 0.822559, - 0.262419, 0.425952, 0.794477, 0.843051, - 0.250702, 0.397313, 0.832664, 0.86232, - 0.237264, 0.366534, 0.869876, 0.879044, - 0.222716, 0.334816, 0.906973, 0.896362, - 0.206827, 0.303143, 0.943558, 0.910342, - 0.189659, 0.269699, 0.979759, 0.924119, - 0.171108, 0.236411, 1.01718, 0.935374, - 0.149579, 0.202224, 1.05289, 0.944295, - 0.126295, 0.16989, 1.08496, 0.952227, - 0.101511, 0.138089, 1.11256, 0.962041, - 0.0766392, 0.105053, 1.1375, 0.97528, - 0.0511967, 0.070329, 1.15983, 0.988476, - 0.025463, 0.0351268, 1.17987, 0.999962, 2.86808e-05, 1.45564e-05, 1.19901, 0.227089, - 8.41413e-06, 0.404216, 4.72707e-06, 0.239725, - 0.000215083, 0.426708, 0.000120833, 0.239904, - 0.000860718, 0.427028, 0.000483555, 0.239911, - 0.00193661, 0.427039, 0.00108806, 0.239914, - 0.00344276, 0.42704, 0.00193457, 0.239933, - 0.00537907, 0.427064, 0.00302363, 0.239944, - 0.00774482, 0.427065, 0.00435604, 0.239993, - 0.01054, 0.427122, 0.00593398, 0.240052, - 0.0137626, 0.427179, 0.00775987, 0.240148, - 0.0174115, 0.427279, 0.00983854, 0.240278, - 0.021484, 0.42741, 0.0121763, 0.240472, - 0.0259729, 0.427618, 0.0147827, 0.240839, - 0.0308131, 0.428086, 0.0176837, 0.241201, - 0.0360893, 0.428482, 0.0208775, 0.241626, - 0.0417723, 0.428907, 0.0243821, 0.242207, - 0.0478337, 0.42952, 0.0282228, 0.24298, - 0.0542199, 0.430332, 0.0324333, 0.243881, - 0.0610015, 0.431222, 0.0370252, 0.245123, - 0.0680874, 0.432512, 0.0420535, 0.24667, - 0.0755482, 0.434088, 0.0475414, 0.248779, - 0.0832873, 0.436323, 0.0535542, 0.251665, - 0.0913546, 0.439509, 0.0601716, 0.255305, - 0.0998489, 0.443478, 0.0674282, 0.260049, - 0.108576, 0.448713, 0.0754673, 0.266192, - 0.117754, 0.455524, 0.084339, 0.273158, - 0.127294, 0.4627, 0.0941683, 0.282131, - 0.137311, 0.472068, 0.10515, 0.293332, - 0.147736, 0.483565, 0.117402, 0.304667, - 0.158357, 0.493702, 0.130824, 0.317785, - 0.169274, 0.504708, 0.145724, 0.333245, - 0.180595, 0.517107, 0.16215, 0.349843, - 0.191892, 0.528849, 0.180149, 0.367944, - 0.203168, 0.540301, 0.199746, 0.387579, - 0.214443, 0.551514, 0.221047, 0.408247, - 0.225624, 0.560906, 0.243981, 0.43014, - 0.236422, 0.56959, 0.268513, 0.452669, - 0.24654, 0.576098, 0.294409, 0.476196, - 0.256157, 0.580925, 0.322002, 0.501157, - 0.265289, 0.584839, 0.351052, 0.527632, - 0.273671, 0.587614, 0.3812, 0.555754, - 0.281254, 0.589119, 0.412994, 0.581682, - 0.287448, 0.585204, 0.445498, 0.608196, - 0.292614, 0.579006, 0.479505, 0.635661, - 0.296068, 0.571297, 0.514643, 0.664999, - 0.297395, 0.560855, 0.552213, 0.691039, - 0.296645, 0.544525, 0.591365, 0.7179, - 0.293785, 0.526535, 0.630883, 0.744059, - 0.289089, 0.50545, 0.670932, 0.76863, - 0.282239, 0.482514, 0.710904, 0.793273, - 0.273688, 0.457246, 0.750259, 0.814731, - 0.26328, 0.428872, 0.78948, 0.835603, - 0.251526, 0.399384, 0.828597, 0.85489, - 0.238339, 0.368811, 0.866892, 0.872828, - 0.223607, 0.336617, 0.90563, 0.889462, - 0.207538, 0.303997, 0.943538, 0.904929, - 0.190297, 0.270812, 0.980591, 0.919101, - 0.172034, 0.237453, 1.01935, 0.930536, - 0.152058, 0.204431, 1.05498, 0.941223, - 0.129515, 0.172495, 1.08717, 0.94982, - 0.104263, 0.140175, 1.11551, 0.960592, - 0.0781944, 0.106465, 1.14098, 0.974629, - 0.051688, 0.0711592, 1.16418, 0.98811, - 0.0253929, 0.0354432, 1.18465, 1.00004, 0.000804378, - 0.000330876, 1.20462, 0.214668, - 8.21282e-06, 0.406619, 4.33582e-06, 0.218053, - 0.000208144, 0.413025, 0.000109887, 0.217987, - 0.000832212, 0.412901, 0.000439362, 0.217971, - 0.00187246, 0.412876, 0.000988623, 0.217968, - 0.00332855, 0.41286, 0.00175772, 0.217985, - 0.00520055, 0.412882, 0.00274729, 0.218014, - 0.00748814, 0.412916, 0.00395842, 0.218054, - 0.0101901, 0.412957, 0.00539274, 0.218106, - 0.0133057, 0.413005, 0.00705348, 0.218217, - 0.0168342, 0.413139, 0.00894581, 0.218338, - 0.0207707, 0.413258, 0.0110754, 0.21855, - 0.0251001, 0.413509, 0.0134551, 0.218913, - 0.0297861, 0.413992, 0.0161081, 0.219265, - 0.0348956, 0.414383, 0.0190307, 0.219696, - 0.0403909, 0.414839, 0.0222458, 0.220329, - 0.0462003, 0.415567, 0.025792, 0.220989, - 0.0524208, 0.41621, 0.0296637, 0.222027, - 0.058948, 0.417385, 0.0339323, 0.223301, - 0.0658208, 0.418779, 0.0386055, 0.224988, - 0.0730347, 0.420665, 0.0437355, 0.227211, - 0.0805274, 0.423198, 0.0493844, 0.230131, - 0.088395, 0.426566, 0.0556135, 0.233908, - 0.0966208, 0.43091, 0.0624829, 0.239092, - 0.105223, 0.437148, 0.0701636, 0.245315, - 0.11424, 0.444302, 0.0786949, 0.253166, - 0.12368, 0.453262, 0.0882382, 0.262374, - 0.133569, 0.463211, 0.0988682, 0.273145, - 0.143836, 0.474271, 0.110727, 0.285512, - 0.154577, 0.4863, 0.123945, 0.299512, - 0.165501, 0.498817, 0.138581, 0.314287, - 0.176698, 0.510341, 0.154676, 0.331083, - 0.188066, 0.522583, 0.172459, 0.349615, - 0.199597, 0.534879, 0.191979, 0.369318, - 0.210843, 0.546083, 0.21309, 0.390377, - 0.222068, 0.5562, 0.235998, 0.412411, - 0.233059, 0.564704, 0.260518, 0.435715, - 0.24357, 0.572314, 0.286795, 0.461196, - 0.253356, 0.579395, 0.314559, 0.485587, - 0.262362, 0.581985, 0.343581, 0.511908, - 0.270895, 0.584347, 0.374367, 0.539798, - 0.278452, 0.58505, 0.406015, 0.567974, - 0.284877, 0.583344, 0.439168, 0.594303, - 0.290124, 0.577348, 0.473005, 0.622951, - 0.294183, 0.570751, 0.508534, 0.652404, - 0.296389, 0.561541, 0.544764, 0.679291, - 0.296605, 0.546426, 0.582927, 0.706437, - 0.294095, 0.528599, 0.622681, 0.734485, - 0.28978, 0.508676, 0.663567, 0.758841, - 0.283363, 0.484768, 0.704092, 0.78537, - 0.275015, 0.460434, 0.745101, 0.807315, - 0.264689, 0.432166, 0.784712, 0.8271, - 0.252597, 0.401807, 0.824241, 0.849191, - 0.239154, 0.371458, 0.863803, 0.867046, - 0.224451, 0.338873, 0.903063, 0.8852, - 0.208342, 0.306175, 0.942763, 0.901771, - 0.190684, 0.272759, 0.981559, 0.915958, - 0.172105, 0.239306, 1.02048, 0.928046, - 0.152214, 0.206071, 1.05765, 0.939961, - 0.130247, 0.17367, 1.08999, 0.948711, - 0.10672, 0.142201, 1.11829, 0.959305, - 0.0808688, 0.108454, 1.14467, 0.973009, - 0.0539145, 0.0728109, 1.16839, 0.987631, - 0.0262947, 0.0360625, 1.19004, 0.999978, 0.00132758, - 0.000559424, 1.21058, 0.193925, - 7.93421e-06, 0.391974, 3.92537e-06, 0.196746, - 0.000200315, 0.397675, 9.91033e-05, 0.19667, - 0.000801099, 0.397521, 0.000396342, 0.196633, - 0.00180246, 0.397445, 0.000891829, 0.196654, - 0.00320443, 0.397482, 0.00158582, 0.196659, - 0.00500647, 0.39748, 0.00247867, 0.196683, - 0.0072086, 0.397506, 0.00357167, 0.196728, - 0.00981001, 0.397562, 0.00486675, 0.196792, - 0.0128096, 0.397633, 0.00636707, 0.19689, - 0.0162055, 0.397746, 0.00807752, 0.197017, - 0.0199943, 0.397884, 0.0100052, 0.19729, - 0.024139, 0.39827, 0.0121691, 0.197583, - 0.0286671, 0.398639, 0.0145755, 0.197927, - 0.0335858, 0.399034, 0.0172355, 0.198383, - 0.0388806, 0.399554, 0.0201718, 0.199002, - 0.0444736, 0.400289, 0.0234194, 0.199739, - 0.0504583, 0.401111, 0.026984, 0.200784, - 0.056729, 0.402349, 0.0309217, 0.202075, - 0.0633643, 0.403841, 0.0352496, 0.203898, - 0.0703247, 0.406076, 0.0400313, 0.206199, - 0.0775565, 0.408841, 0.0453282, 0.209252, - 0.085184, 0.41259, 0.0511794, 0.213638, - 0.0931994, 0.418288, 0.0577459, 0.21881, - 0.101617, 0.424681, 0.0650508, 0.225642, - 0.11052, 0.433429, 0.0732759, 0.233717, - 0.119772, 0.442897, 0.0824683, 0.242823, - 0.129505, 0.452888, 0.0927484, 0.254772, - 0.139906, 0.466407, 0.104417, 0.266603, - 0.150402, 0.477413, 0.117211, 0.28073, - 0.161395, 0.490519, 0.131598, 0.295399, - 0.172465, 0.50201, 0.147407, 0.312705, - 0.183982, 0.515311, 0.165031, 0.331335, - 0.195532, 0.52786, 0.184336, 0.351037, - 0.206971, 0.5392, 0.205361, 0.372175, - 0.218117, 0.54941, 0.228043, 0.394548, - 0.229327, 0.558642, 0.25267, 0.419598, - 0.240052, 0.567861, 0.279071, 0.443922, - 0.249937, 0.573332, 0.306882, 0.471495, - 0.259407, 0.58013, 0.33661, 0.496769, - 0.267749, 0.580564, 0.367328, 0.524951, - 0.275524, 0.581696, 0.399753, 0.55318, - 0.282148, 0.579885, 0.433134, 0.581577, - 0.287533, 0.575471, 0.467534, 0.609231, - 0.291612, 0.567445, 0.502943, 0.637478, - 0.293911, 0.557657, 0.53871, 0.667795, - 0.295096, 0.546535, 0.576568, 0.694272, - 0.294073, 0.529561, 0.614929, 0.722937, - 0.290386, 0.510561, 0.655909, 0.749682, - 0.284481, 0.487846, 0.697663, 0.774754, - 0.276188, 0.462487, 0.738515, 0.799301, - 0.266215, 0.43481, 0.779802, 0.820762, - 0.254116, 0.404879, 0.820045, 0.843231, - 0.240393, 0.374559, 0.860294, 0.861857, - 0.225503, 0.341582, 0.900965, 0.880815, - 0.209382, 0.308778, 0.941727, 0.89766, - 0.19155, 0.275232, 0.980916, 0.912926, - 0.172346, 0.240938, 1.02162, 0.926391, - 0.151799, 0.207223, 1.0597, 0.938429, - 0.129968, 0.17484, 1.09291, 0.947834, - 0.10651, 0.142984, 1.12248, 0.958432, - 0.0824098, 0.109902, 1.149, 0.972402, - 0.0565242, 0.0744454, 1.1733, 0.987191, - 0.028427, 0.0373794, 1.19538, 0.999975, 3.85685e-05, - 4.203e-05, 1.21676, 0.178114, - 7.66075e-06, 0.385418, 3.54027e-06, 0.176074, - 0.000191966, 0.381002, 8.87135e-05, 0.17601, - 0.000767549, 0.380861, 0.000354715, 0.17598, - 0.00172696, 0.380798, 0.000798168, 0.175994, - 0.00307012, 0.380824, 0.00141928, 0.176017, - 0.00479684, 0.380858, 0.00221859, 0.176019, - 0.00690648, 0.380839, 0.00319714, 0.176072, - 0.00939888, 0.380913, 0.0043572, 0.176131, - 0.0122726, 0.380979, 0.005702, 0.176239, - 0.0155264, 0.38112, 0.00723689, 0.176371, - 0.0191551, 0.381272, 0.00896907, 0.176638, - 0.023117, 0.381669, 0.0109194, 0.176912, - 0.0274633, 0.382015, 0.0130903, 0.177279, - 0.032173, 0.382476, 0.0154949, 0.17774, - 0.0372219, 0.383041, 0.0181669, 0.178344, - 0.0426132, 0.38378, 0.0211209, 0.179153, - 0.0483309, 0.384773, 0.0243899, 0.180197, - 0.0543447, 0.386076, 0.0280062, 0.181581, - 0.0607122, 0.387809, 0.032004, 0.18344, - 0.0673855, 0.390205, 0.036453, 0.186139, - 0.0743989, 0.393944, 0.0414162, 0.189432, - 0.0817731, 0.39832, 0.0469394, 0.193795, - 0.0895464, 0.404188, 0.0531442, 0.199641, - 0.0978264, 0.4121, 0.0601374, 0.206679, - 0.106499, 0.421425, 0.0680078, 0.214865, - 0.115654, 0.431504, 0.076919, 0.224406, - 0.125268, 0.442526, 0.0868835, 0.235876, - 0.135475, 0.455465, 0.0981875, 0.248335, - 0.146023, 0.4681, 0.110759, 0.262868, - 0.157016, 0.482069, 0.124885, 0.278962, - 0.168245, 0.496182, 0.140645, 0.295082, - 0.17958, 0.507401, 0.157838, 0.313738, - 0.191227, 0.520252, 0.17695, 0.333573, - 0.202718, 0.531708, 0.197817, 0.356433, - 0.214424, 0.544509, 0.220785, 0.378853, - 0.225492, 0.55373, 0.245306, 0.402717, - 0.236236, 0.561348, 0.271593, 0.428375, - 0.246568, 0.568538, 0.299776, 0.454724, - 0.255941, 0.573462, 0.329433, 0.482291, - 0.264511, 0.576356, 0.360598, 0.509706, - 0.272129, 0.576446, 0.393204, 0.538805, - 0.278979, 0.575298, 0.427227, 0.568919, - 0.284528, 0.572154, 0.462157, 0.596804, - 0.288801, 0.564691, 0.497997, 0.625987, - 0.291334, 0.555134, 0.534467, 0.656414, - 0.292722, 0.545051, 0.571736, 0.683916, - 0.292185, 0.528813, 0.610158, 0.711809, - 0.290043, 0.51106, 0.649061, 0.739547, - 0.285246, 0.490103, 0.690081, 0.766914, - 0.277647, 0.465523, 0.732554, 0.791375, - 0.267603, 0.437718, 0.773982, 0.814772, - 0.256109, 0.40882, 0.81609, 0.836691, - 0.242281, 0.377823, 0.856849, 0.856984, - 0.227155, 0.34496, 0.898363, 0.876332, - 0.210395, 0.311335, 0.939471, 0.894988, - 0.192612, 0.277703, 0.980799, 0.911113, - 0.173236, 0.243019, 1.02215, 0.924092, - 0.152258, 0.209037, 1.06139, 0.936828, - 0.129575, 0.175909, 1.09635, 0.946869, - 0.10594, 0.143852, 1.12707, 0.958284, - 0.081318, 0.110289, 1.15419, 0.972325, - 0.0556133, 0.0747232, 1.17909, 0.986878, - 0.0297899, 0.0383149, 1.20163, 0.999936, - 0.00197169, 0.000912402, 1.22338, 0.151174, - 7.20365e-06, 0.351531, 3.09789e-06, 0.155594, - 0.00018279, 0.361806, 7.8608e-05, 0.156099, - 0.000731569, 0.362982, 0.000314615, 0.156053, - 0.00164578, 0.362869, 0.000707845, 0.156093, - 0.0029261, 0.362961, 0.00125884, 0.156099, - 0.00457155, 0.362959, 0.00196783, 0.15612, - 0.00658224, 0.362982, 0.00283622, 0.156168, - 0.00895774, 0.363048, 0.00386625, 0.156221, - 0.0116962, 0.363101, 0.00506109, 0.156324, - 0.0147973, 0.363241, 0.00642675, 0.156476, - 0.0182503, 0.363448, 0.00797175, 0.156731, - 0.0220266, 0.36384, 0.00971484, 0.156994, - 0.026176, 0.364179, 0.0116575, 0.157341, - 0.0306701, 0.36462, 0.0138207, 0.157867, - 0.0354591, 0.365364, 0.0162356, 0.15846, - 0.0406141, 0.366111, 0.0189092, 0.159308, - 0.0460519, 0.367248, 0.021885, 0.160426, - 0.0518096, 0.368767, 0.0252004, 0.161877, - 0.0578906, 0.370745, 0.0288825, 0.163995, - 0.0642812, 0.373831, 0.0330139, 0.16655, - 0.0710067, 0.377366, 0.0376283, 0.170237, - 0.0781522, 0.382799, 0.0428493, 0.175096, - 0.0857172, 0.389915, 0.0487324, 0.181069, - 0.0938025, 0.398487, 0.0554214, 0.188487, - 0.102363, 0.408799, 0.0630189, 0.197029, - 0.111343, 0.419991, 0.071634, 0.206684, - 0.120812, 0.431455, 0.0812797, 0.218698, - 0.131033, 0.445746, 0.0923651, 0.230726, - 0.141373, 0.457471, 0.104545, 0.245516, - 0.152387, 0.472388, 0.118449, 0.261551, - 0.163628, 0.486671, 0.133923, 0.277437, - 0.174814, 0.49762, 0.150849, 0.296662, - 0.186713, 0.51162, 0.169924, 0.31795, - 0.198513, 0.525435, 0.190848, 0.339422, - 0.210119, 0.536267, 0.213504, 0.362143, - 0.221354, 0.545982, 0.237947, 0.387198, - 0.23224, 0.555364, 0.264427, 0.412349, - 0.24257, 0.561489, 0.292519, 0.439274, - 0.252284, 0.566903, 0.322561, 0.466779, - 0.261023, 0.569614, 0.353952, 0.496011, - 0.26899, 0.571589, 0.387278, 0.524964, - 0.275498, 0.570325, 0.421356, 0.556518, - 0.281449, 0.568792, 0.457314, 0.584363, - 0.285526, 0.560268, 0.493199, 0.614214, - 0.28844, 0.55205, 0.530276, 0.645684, - 0.289777, 0.541906, 0.56855, 0.673446, - 0.289722, 0.526464, 0.606927, 0.701924, - 0.287792, 0.509872, 0.645945, 0.73037, - 0.284315, 0.490649, 0.685564, 0.757405, - 0.278804, 0.467964, 0.726511, 0.784025, - 0.269543, 0.441468, 0.768601, 0.808255, - 0.258117, 0.41216, 0.811321, 0.830739, - 0.244728, 0.380606, 0.853496, 0.851914, - 0.229428, 0.348111, 0.895374, 0.872586, - 0.212508, 0.314732, 0.937674, 0.891581, - 0.194025, 0.280338, 0.979869, 0.907641, - 0.174711, 0.245203, 1.02253, 0.922233, - 0.153509, 0.21077, 1.06371, 0.935878, - 0.130418, 0.177399, 1.09972, 0.946338, - 0.105558, 0.144507, 1.13124, 0.957265, - 0.080059, 0.110508, 1.15973, 0.971668, - 0.0539766, 0.0742311, 1.18515, 0.9866, - 0.0277101, 0.0375224, 1.20858, 1.00021, - 0.000515531, 0.000135226, 1.23135, 0.137468, - 6.86011e-06, 0.345041, 2.73315e-06, 0.13703, - 0.000173378, 0.343936, 6.90761e-05, 0.136986, - 0.000693048, 0.34383, 0.000276126, 0.136964, - 0.00155931, 0.343761, 0.000621337, 0.137003, - 0.00277211, 0.343863, 0.00110494, 0.137012, - 0.00433103, 0.343868, 0.00172744, 0.137043, - 0.00623606, 0.343916, 0.00249022, 0.13709, - 0.0084868, 0.343986, 0.00339559, 0.137145, - 0.0110814, 0.344045, 0.00444687, 0.137242, - 0.0140187, 0.344177, 0.00565007, 0.137431, - 0.0172713, 0.344491, 0.00701868, 0.137644, - 0.0208605, 0.344805, 0.00856042, 0.13791, - 0.024792, 0.345172, 0.0102863, 0.138295, - 0.0290461, 0.345734, 0.0122185, 0.138764, - 0.0335957, 0.346371, 0.0143771, 0.139415, - 0.038467, 0.347298, 0.0167894, 0.140272, - 0.0436176, 0.348527, 0.0194895, 0.141457, - 0.0491016, 0.350276, 0.0225043, 0.14303, - 0.0548764, 0.352646, 0.0258962, 0.145289, - 0.0610096, 0.356206, 0.0297168, 0.148502, - 0.0674777, 0.361488, 0.0340562, 0.152188, - 0.074345, 0.367103, 0.0389534, 0.157359, - 0.0817442, 0.375247, 0.0445541, 0.16379, - 0.0896334, 0.385064, 0.0509535, 0.171376, - 0.098005, 0.396082, 0.0582611, 0.179901, - 0.106817, 0.407418, 0.06654, 0.189892, - 0.116239, 0.420031, 0.075994, 0.201838, - 0.12627, 0.434321, 0.0867239, 0.214311, - 0.136701, 0.447631, 0.0987517, 0.228902, - 0.147616, 0.462046, 0.112353, 0.245107, - 0.158871, 0.476942, 0.127605, 0.262292, - 0.170261, 0.490285, 0.144469, 0.281215, - 0.182017, 0.503783, 0.163282, 0.301058, - 0.193729, 0.515505, 0.183873, 0.322752, - 0.205512, 0.52682, 0.206466, 0.347547, - 0.217214, 0.539473, 0.231194, 0.370969, - 0.227966, 0.546625, 0.257288, 0.397533, - 0.238555, 0.55472, 0.285789, 0.42398, - 0.248278, 0.559468, 0.315746, 0.452928, - 0.257422, 0.564095, 0.347724, 0.482121, - 0.265306, 0.565426, 0.380922, 0.510438, - 0.272043, 0.563205, 0.415639, 0.541188, - 0.277614, 0.561087, 0.451702, 0.571667, - 0.281927, 0.554922, 0.48845, 0.602432, - 0.285015, 0.546838, 0.526442, 0.634126, - 0.286512, 0.537415, 0.564896, 0.662816, - 0.286388, 0.522906, 0.604037, 0.692411, - 0.284734, 0.507003, 0.643795, 0.720946, - 0.281297, 0.488398, 0.68298, 0.748293, - 0.276262, 0.466353, 0.723466, 0.776931, - 0.269978, 0.443573, 0.764565, 0.801065, - 0.260305, 0.415279, 0.805838, 0.825843, - 0.247426, 0.384773, 0.849985, 0.84807, - 0.232437, 0.352555, 0.893174, 0.869122, - 0.215806, 0.318642, 0.936564, 0.888963, - 0.197307, 0.28381, 0.980253, 0.905547, - 0.177203, 0.247888, 1.02463, 0.918554, - 0.155542, 0.212904, 1.06714, 0.931395, - 0.131948, 0.1787, 1.10451, 0.941749, - 0.106723, 0.145902, 1.13694, 0.954551, - 0.0804939, 0.111193, 1.1666, 0.970279, - 0.0534239, 0.0744697, 1.19249, 0.986117, - 0.0257452, 0.0368788, 1.21665, 0.999938, 0.00190634, - 0.0010291, 1.23981, 0.118493, - 6.47439e-06, 0.32272, 2.3772e-06, 0.118765, - 0.000163023, 0.323456, 5.98573e-05, 0.118772, - 0.00065212, 0.323477, 0.000239447, 0.118843, - 0.00146741, 0.323657, 0.000538881, 0.118804, - 0.00260846, 0.323553, 0.00095826, 0.118826, - 0.00407576, 0.323595, 0.00149845, 0.118846, - 0.00586826, 0.323617, 0.00216047, 0.118886, - 0.00798578, 0.32367, 0.00294679, 0.118947, - 0.0104273, 0.323753, 0.00386124, 0.119055, - 0.0131909, 0.323922, 0.00490999, 0.119241, - 0.0162444, 0.324251, 0.00610804, 0.11944, - 0.0196339, 0.324544, 0.00745805, 0.119739, - 0.0233378, 0.325026, 0.00897805, 0.12011, - 0.0273179, 0.325586, 0.0106895, 0.120571, - 0.0316143, 0.326231, 0.0126073, 0.12124, - 0.0361939, 0.327264, 0.0147654, 0.122162, - 0.0410511, 0.328733, 0.0172001, 0.123378, - 0.0462233, 0.330659, 0.0199375, 0.125183, - 0.0517109, 0.333754, 0.0230498, 0.127832, - 0.0575652, 0.338507, 0.026597, 0.130909, - 0.0637441, 0.343666, 0.0306345, 0.135221, - 0.0704302, 0.351063, 0.035273, 0.14082, - 0.0776364, 0.360604, 0.0406137, 0.146781, - 0.0852293, 0.369638, 0.0466788, 0.155121, - 0.0935351, 0.3827, 0.0537628, 0.16398, - 0.102234, 0.39522, 0.0617985, 0.173926, - 0.111465, 0.40793, 0.07097, 0.185137, - 0.121296, 0.42105, 0.0813426, 0.19826, - 0.13169, 0.435735, 0.0931596, 0.212938, - 0.142614, 0.450932, 0.106547, 0.229046, - 0.153884, 0.465726, 0.121575, 0.246246, - 0.165382, 0.479461, 0.138286, 0.264637, - 0.176806, 0.492106, 0.15666, 0.284959, - 0.188793, 0.504774, 0.17728, 0.308157, - 0.200763, 0.518805, 0.19988, 0.330951, - 0.21239, 0.528231, 0.224293, 0.3549, - 0.223521, 0.536376, 0.250541, 0.381502, - 0.234169, 0.544846, 0.278902, 0.409529, - 0.244077, 0.551717, 0.309227, 0.437523, - 0.253363, 0.55517, 0.341426, 0.467624, - 0.261659, 0.557772, 0.37518, 0.497268, - 0.268498, 0.556442, 0.41007, 0.528294, - 0.274018, 0.553915, 0.446445, 0.559053, - 0.278169, 0.549153, 0.483779, 0.589329, - 0.281229, 0.539878, 0.522249, 0.622503, - 0.282902, 0.53162, 0.561754, 0.652382, - 0.282815, 0.518119, 0.601544, 0.681847, - 0.281247, 0.502187, 0.641574, 0.712285, - 0.277986, 0.484824, 0.682633, 0.740094, - 0.273017, 0.463483, 0.723426, 0.768478, - 0.266692, 0.441299, 0.763747, 0.794556, - 0.258358, 0.415238, 0.805565, 0.819408, - 0.248807, 0.386912, 0.847254, 0.843411, - 0.236214, 0.356165, 0.891091, 0.862397, - 0.219794, 0.320562, 0.936174, 0.883113, - 0.201768, 0.285322, 0.982562, 0.90023, - 0.181672, 0.249713, 1.02862, 0.915192, - 0.159279, 0.214546, 1.07163, 0.928458, - 0.134725, 0.180285, 1.10995, 0.94069, - 0.10913, 0.147119, 1.14354, 0.953409, - 0.0821315, 0.112492, 1.17372, 0.969537, - 0.0542677, 0.0752014, 1.20043, 0.985612, - 0.0259096, 0.0370361, 1.22528, 0.999835, 0.00298198, - 0.00151801, 1.24959, 0.10097, - 6.02574e-06, 0.300277, 2.02619e-06, 0.101577, - 0.000152164, 0.302077, 5.11662e-05, 0.101572, - 0.000608889, 0.302066, 0.000204751, 0.101566, - 0.00136997, 0.302047, 0.000460753, 0.101592, - 0.00243557, 0.302114, 0.000819497, 0.101608, - 0.0038053, 0.30214, 0.00128154, 0.101627, - 0.00547906, 0.30216, 0.0018483, 0.101669, - 0.00745647, 0.302224, 0.00252223, 0.101732, - 0.00973615, 0.302318, 0.00330716, 0.101844, - 0.0123097, 0.302513, 0.00421061, 0.102025, - 0.0151681, 0.30285, 0.00524481, 0.102224, - 0.0183334, 0.303166, 0.0064154, 0.102515, - 0.0217819, 0.303654, 0.00774063, 0.102886, - 0.0255067, 0.304243, 0.0092398, 0.103395, - 0.029514, 0.305089, 0.0109339, 0.104109, - 0.0337912, 0.306301, 0.0128561, 0.105074, - 0.0383565, 0.30798, 0.0150338, 0.10654, - 0.0432132, 0.310726, 0.0175228, 0.108478, - 0.0484244, 0.314351, 0.0203648, 0.111015, - 0.0539339, 0.319032, 0.0236325, 0.114682, - 0.0598885, 0.32605, 0.0274188, 0.11911, - 0.0663375, 0.334109, 0.0317905, 0.124736, - 0.0733011, 0.344013, 0.0368502, 0.131479, - 0.0807744, 0.355358, 0.0427104, 0.139283, - 0.0888204, 0.367614, 0.0494788, 0.148054, - 0.0973394, 0.380072, 0.0572367, 0.159037, - 0.10665, 0.395678, 0.0662704, 0.169794, - 0.116221, 0.40795, 0.0763192, 0.18314, - 0.126632, 0.423546, 0.087956, 0.197515, - 0.137383, 0.438213, 0.101042, 0.213514, - 0.148641, 0.453248, 0.115827, 0.23065, - 0.160117, 0.46688, 0.132283, 0.249148, - 0.171807, 0.479962, 0.150644, 0.270219, - 0.183695, 0.494618, 0.171073, 0.292338, - 0.195574, 0.506937, 0.193378, 0.314999, - 0.207205, 0.516463, 0.217585, 0.340991, - 0.218955, 0.528123, 0.24428, 0.367982, - 0.229917, 0.537025, 0.272784, 0.39432, - 0.239737, 0.541627, 0.302742, 0.423364, - 0.249048, 0.546466, 0.335112, 0.453751, - 0.257329, 0.549466, 0.369032, 0.48416, - 0.264623, 0.549503, 0.404577, 0.515262, - 0.270411, 0.547008, 0.441337, 0.547036, - 0.274581, 0.542249, 0.479162, 0.576614, - 0.277266, 0.533015, 0.517904, 0.611143, - 0.279144, 0.525512, 0.558508, 0.640989, - 0.279001, 0.51154, 0.598995, 0.671182, - 0.277324, 0.495641, 0.639935, 0.700848, - 0.273908, 0.477526, 0.681017, 0.729862, - 0.269063, 0.457955, 0.722764, 0.758273, - 0.262282, 0.434846, 0.764349, 0.784121, - 0.254281, 0.409203, 0.806206, 0.809798, - 0.24505, 0.382694, 0.848617, 0.834953, - 0.233861, 0.354034, 0.892445, 0.856817, - 0.221308, 0.321764, 0.936263, 0.877609, - 0.205996, 0.288118, 0.982401, 0.897489, - 0.186702, 0.253277, 1.02975, 0.913792, - 0.164618, 0.217963, 1.07488, 0.92785, - 0.140023, 0.183221, 1.11487, 0.940378, - 0.11328, 0.149385, 1.14947, 0.95273, - 0.0853958, 0.114152, 1.1807, 0.969059, - 0.0568698, 0.0769845, 1.20912, 0.985574, - 0.0276502, 0.0381186, 1.23498, 0.999943, 0.00239052, - 0.00126861, 1.25987, 0.0852715, - 5.60067e-06, 0.279021, 1.71162e-06, 0.0854143, - 0.000140871, 0.279483, 4.30516e-05, 0.0854191, - 0.000563385, 0.2795, 0.000172184, 0.0854188, - 0.00126753, 0.279493, 0.000387464, 0.0854229, - 0.00225337, 0.279501, 0.00068918, 0.0854443, - 0.00352086, 0.279549, 0.00107803, 0.0854697, - 0.00506962, 0.279591, 0.00155536, 0.0855093, - 0.00689873, 0.279652, 0.00212354, 0.0855724, - 0.00900821, 0.279752, 0.00278703, 0.0856991, - 0.0113799, 0.280011, 0.0035551, 0.085855, - 0.0140314, 0.280297, 0.00443449, 0.0860682, - 0.016963, 0.280682, 0.00543636, 0.086344, - 0.0201438, 0.281159, 0.0065788, 0.0867426, - 0.0235999, 0.281886, 0.00787977, 0.087239, - 0.0273069, 0.282745, 0.0093606, 0.0879815, - 0.031269, 0.284139, 0.011056, 0.0891258, - 0.035531, 0.28647, 0.0130065, 0.0906909, - 0.0400947, 0.289708, 0.0152495, 0.0927624, - 0.0449638, 0.293904, 0.0178454, 0.0958376, - 0.0502427, 0.300471, 0.0208915, 0.0995827, - 0.0559514, 0.30806, 0.0244247, 0.104526, - 0.0622152, 0.317874, 0.0285721, 0.110532, - 0.0690046, 0.329332, 0.0334227, 0.117385, - 0.0763068, 0.341217, 0.0390466, 0.12522, - 0.084184, 0.353968, 0.0455786, 0.134037, - 0.0925248, 0.366797, 0.0530773, 0.144014, - 0.101487, 0.380209, 0.0617424, 0.156013, - 0.111273, 0.395956, 0.071777, 0.168872, - 0.121431, 0.41053, 0.0830905, 0.183089, - 0.132105, 0.425073, 0.0959341, 0.198763, - 0.143286, 0.439833, 0.110448, 0.216159, - 0.154841, 0.454507, 0.126769, 0.234859, - 0.166588, 0.468368, 0.14495, 0.255879, - 0.178626, 0.482846, 0.165233, 0.27677, - 0.190218, 0.493489, 0.187217, 0.301184, - 0.202227, 0.506549, 0.211659, 0.325852, - 0.213764, 0.5158, 0.237922, 0.352824, - 0.22487, 0.525442, 0.26632, 0.380882, - 0.235246, 0.532487, 0.296691, 0.410137, - 0.244847, 0.537703, 0.329179, 0.439787, - 0.253122, 0.540361, 0.363135, 0.472291, - 0.260517, 0.542734, 0.399222, 0.501856, - 0.266519, 0.538826, 0.436352, 0.534816, - 0.270905, 0.535152, 0.474505, 0.565069, - 0.273826, 0.525979, 0.513988, 0.597154, - 0.275333, 0.516394, 0.554852, 0.630473, - 0.275314, 0.506206, 0.596592, 0.660574, - 0.273323, 0.489769, 0.638117, 0.692015, - 0.270008, 0.472578, 0.680457, 0.720647, - 0.265001, 0.452134, 0.723008, 0.750528, - 0.258311, 0.430344, 0.765954, 0.777568, - 0.250046, 0.405624, 0.809012, 0.80387, - 0.240114, 0.378339, 0.852425, 0.828439, - 0.228737, 0.349877, 0.895346, 0.851472, - 0.216632, 0.318968, 0.940695, 0.873906, - 0.202782, 0.287489, 0.987235, 0.89467, - 0.187059, 0.254394, 1.03348, 0.912281, - 0.168818, 0.221294, 1.07812, 0.927358, - 0.146494, 0.18675, 1.11928, 0.940385, - 0.120009, 0.152322, 1.15609, 0.952672, - 0.0917183, 0.117514, 1.18875, 0.968496, - 0.0620321, 0.0797405, 1.21821, 0.985236, - 0.0314945, 0.0402383, 1.24523, 0.99998, - 0.000575153, 0.000110644, 1.27133, 0.0702429, - 5.12222e-06, 0.255273, 1.40947e-06, 0.0702981, - 0.000128826, 0.255469, 3.54488e-05, 0.0703691, - 0.000515562, 0.255727, 0.000141874, 0.0703805, - 0.00116, 0.255754, 0.00031929, 0.0703961, - 0.00206224, 0.255813, 0.000567999, 0.0704102, - 0.00322223, 0.255839, 0.00088871, 0.0704298, - 0.00463928, 0.255863, 0.00128272, 0.0704759, - 0.00631375, 0.255953, 0.00175283, 0.0705434, - 0.00824317, 0.256079, 0.00230342, 0.0706693, - 0.010412, 0.25636, 0.0029443, 0.0708189, - 0.0128439, 0.256647, 0.00368031, 0.0710364, - 0.0155177, 0.257084, 0.00452614, 0.0713223, - 0.0184374, 0.257637, 0.00549706, 0.0717182, - 0.0216002, 0.258416, 0.00661246, 0.072321, - 0.0249966, 0.259699, 0.00790147, 0.0731446, - 0.0286566, 0.261475, 0.0093884, 0.0743352, - 0.0325888, 0.264132, 0.0111186, 0.0760676, - 0.036843, 0.26815, 0.013145, 0.078454, - 0.0414292, 0.273636, 0.0155251, 0.0818618, - 0.0464634, 0.281653, 0.0183525, 0.0857382, - 0.0519478, 0.289992, 0.0216642, 0.0908131, - 0.0579836, 0.30066, 0.0255956, 0.0967512, - 0.0645124, 0.312204, 0.0301954, 0.103717, - 0.0716505, 0.325001, 0.0356017, 0.111596, - 0.0793232, 0.338129, 0.041896, 0.120933, - 0.087645, 0.352853, 0.0492447, 0.130787, - 0.096492, 0.366192, 0.0576749, 0.142311, - 0.105973, 0.380864, 0.0673969, 0.155344, - 0.116182, 0.396575, 0.0785899, 0.169535, - 0.126815, 0.411443, 0.0912377, 0.185173, - 0.138015, 0.426256, 0.105607, 0.201755, - 0.149325, 0.439607, 0.121551, 0.221334, - 0.161207, 0.455467, 0.139608, 0.241461, - 0.173162, 0.469096, 0.159591, 0.26294, - 0.18504, 0.481014, 0.18156, 0.286776, - 0.196881, 0.493291, 0.205781, 0.311596, - 0.208311, 0.503556, 0.231819, 0.338667, - 0.219671, 0.513268, 0.260274, 0.366021, - 0.230451, 0.519414, 0.290862, 0.395875, - 0.240131, 0.526766, 0.323196, 0.425564, - 0.248566, 0.52905, 0.357071, 0.457094, - 0.256195, 0.530796, 0.393262, 0.488286, - 0.262331, 0.528703, 0.430797, 0.522291, - 0.267141, 0.52727, 0.470231, 0.554172, - 0.270411, 0.519848, 0.510477, 0.586427, - 0.271986, 0.510307, 0.551594, 0.619638, - 0.27192, 0.499158, 0.593849, 0.650656, - 0.269817, 0.483852, 0.636314, 0.68284, - 0.266267, 0.467515, 0.679679, 0.714356, - 0.26113, 0.44931, 0.723884, 0.742717, - 0.254067, 0.425789, 0.767245, 0.770894, - 0.245652, 0.401144, 0.811819, 0.797358, - 0.235554, 0.374224, 0.856315, 0.823377, - 0.223896, 0.346167, 0.901077, 0.847456, - 0.210865, 0.316056, 0.946502, 0.870697, - 0.196574, 0.284503, 0.993711, 0.891068, - 0.180814, 0.251628, 1.04134, 0.909267, - 0.163314, 0.219065, 1.08609, 0.925653, - 0.143304, 0.186446, 1.12702, 0.940017, - 0.121322, 0.153416, 1.16371, 0.952398, - 0.0973872, 0.120334, 1.19712, 0.967568, - 0.0698785, 0.08352, 1.22791, 0.984772, - 0.0390031, 0.0439209, 1.25672, 1.00026, - 0.0070087, 0.00315668, 1.28428, 0.0556653, - 4.59654e-06, 0.227325, 1.12556e-06, 0.0565238, - 0.000116382, 0.230826, 2.84985e-05, 0.0565717, - 0.000465666, 0.231026, 0.000114036, 0.0565859, - 0.00104773, 0.231079, 0.000256656, 0.0565761, - 0.00186255, 0.231025, 0.00045663, 0.0565913, - 0.00291002, 0.231058, 0.000714664, 0.0566108, - 0.00418998, 0.231085, 0.00103224, 0.0566532, - 0.00570206, 0.231169, 0.00141202, 0.0567473, - 0.00743666, 0.231417, 0.00186018, 0.0568567, - 0.00940298, 0.231661, 0.00238264, 0.0569859, - 0.0115991, 0.231895, 0.00298699, 0.0572221, - 0.0140096, 0.232456, 0.00368957, 0.057519, - 0.0166508, 0.233096, 0.00450303, 0.0579534, - 0.01951, 0.234094, 0.00544945, 0.0585922, - 0.0225991, 0.235629, 0.00655564, 0.0595647, - 0.0259416, 0.238106, 0.00785724, 0.0609109, - 0.0295661, 0.241557, 0.00939127, 0.0628751, - 0.0335126, 0.246652, 0.0112198, 0.0656908, - 0.0378604, 0.254091, 0.0134168, 0.0691347, - 0.0426543, 0.262666, 0.0160374, 0.0732165, - 0.0478967, 0.272029, 0.0191514, 0.0782863, - 0.0536716, 0.283007, 0.0228597, 0.0843973, - 0.0600683, 0.295732, 0.0272829, 0.0913598, - 0.0670095, 0.308779, 0.032484, 0.0994407, - 0.0745516, 0.322886, 0.0385886, 0.108189, - 0.082712, 0.336408, 0.0457133, 0.118574, - 0.0914927, 0.351692, 0.0539832, 0.129989, - 0.100854, 0.366502, 0.0635162, 0.142722, - 0.110837, 0.381675, 0.0744386, 0.156654, - 0.121353, 0.3963, 0.0868483, 0.172151, - 0.132414, 0.411477, 0.100963, 0.188712, - 0.143809, 0.42508, 0.116795, 0.208093, - 0.155765, 0.441328, 0.134715, 0.227936, - 0.167608, 0.454328, 0.154396, 0.249495, - 0.179579, 0.467235, 0.176179, 0.27362, - 0.191488, 0.480248, 0.200193, 0.296371, - 0.202618, 0.487886, 0.225775, 0.324234, - 0.214133, 0.499632, 0.25441, 0.353049, - 0.225212, 0.509532, 0.285077, 0.381785, - 0.234875, 0.514265, 0.317047, 0.414038, - 0.244205, 0.521282, 0.351874, 0.445251, - 0.252145, 0.522931, 0.388279, 0.476819, - 0.258433, 0.520947, 0.425825, 0.509209, - 0.263411, 0.517669, 0.465104, 0.542759, - 0.266732, 0.512841, 0.505741, 0.574822, - 0.268263, 0.503317, 0.547611, 0.609324, - 0.268489, 0.493035, 0.590953, 0.641772, - 0.266941, 0.478816, 0.63488, 0.674049, - 0.263297, 0.462863, 0.679072, 0.705071, - 0.257618, 0.442931, 0.723487, 0.734709, - 0.250625, 0.421299, 0.768708, 0.763704, - 0.24179, 0.397085, 0.814375, 0.791818, - 0.231115, 0.370577, 0.859907, 0.817439, - 0.21922, 0.34232, 0.906715, 0.843202, - 0.205658, 0.312627, 0.953943, 0.866639, - 0.190563, 0.280933, 1.00185, 0.888129, - 0.173978, 0.248393, 1.05105, 0.907239, - 0.155485, 0.216007, 1.09704, 0.923893, - 0.134782, 0.183233, 1.13857, 0.938882, - 0.11249, 0.150376, 1.17539, 0.952464, - 0.0890706, 0.117177, 1.20924, 0.968529, - 0.0646523, 0.0813095, 1.24055, 0.984763, - 0.038606, 0.0439378, 1.27018, 1.00053, - 0.01238, 0.00598668, 1.29873, 0.0437928, - 4.09594e-06, 0.204012, 8.79224e-07, 0.0440166, - 0.000103395, 0.205049, 2.21946e-05, 0.0440529, - 0.000413633, 0.205225, 8.87981e-05, 0.0440493, - 0.000930594, 0.2052, 0.000199858, 0.0439884, - 0.00165352, 0.204901, 0.000355495, 0.0440716, - 0.0025849, 0.205255, 0.000556983, 0.0440968, - 0.00372222, 0.205311, 0.000805326, 0.0441359, - 0.00506478, 0.205391, 0.00110333, 0.0442231, - 0.00660384, 0.205638, 0.00145768, 0.0443254, - 0.00835246, 0.205877, 0.00187275, 0.0444832, - 0.0102992, 0.20627, 0.00235938, 0.0447001, - 0.0124449, 0.206796, 0.0029299, 0.0450168, - 0.0147935, 0.207593, 0.0036005, 0.0454816, - 0.017336, 0.208819, 0.00439246, 0.0462446, - 0.0201156, 0.211036, 0.00533864, 0.0473694, - 0.0231568, 0.214388, 0.00646984, 0.0490191, - 0.0264941, 0.219357, 0.00783856, 0.0512776, - 0.030184, 0.226061, 0.00950182, 0.0541279, - 0.0342661, 0.234094, 0.0115156, 0.0578989, - 0.0388539, 0.244297, 0.0139687, 0.0620835, - 0.0438735, 0.254457, 0.0169015, 0.0673497, - 0.04951, 0.266706, 0.0204554, 0.0731759, - 0.0556263, 0.278753, 0.0246606, 0.0803937, - 0.0624585, 0.29309, 0.0297126, 0.0879287, - 0.0697556, 0.305856, 0.0355868, 0.0970669, - 0.0778795, 0.321059, 0.0425768, 0.106508, - 0.0863541, 0.333873, 0.05056, 0.11776, - 0.0955935, 0.349008, 0.0598972, 0.130081, - 0.105438, 0.363776, 0.0706314, 0.144454, - 0.115899, 0.380112, 0.0828822, 0.1596, - 0.126827, 0.394843, 0.0967611, 0.176097, - 0.138161, 0.409033, 0.112381, 0.194726, - 0.149904, 0.424257, 0.129952, 0.213944, - 0.161675, 0.436945, 0.149333, 0.235516, - 0.173659, 0.450176, 0.170892, 0.260564, - 0.185963, 0.466305, 0.194984, 0.285183, - 0.197582, 0.477328, 0.220805, 0.311095, - 0.208697, 0.486566, 0.248694, 0.338924, - 0.219519, 0.494811, 0.279015, 0.369757, - 0.229766, 0.504065, 0.311725, 0.3996, - 0.238879, 0.507909, 0.345844, 0.430484, - 0.246802, 0.509805, 0.381749, 0.46413, - 0.253924, 0.511436, 0.420251, 0.497077, - 0.259319, 0.508787, 0.459957, 0.530434, - 0.263297, 0.50394, 0.501356, 0.565725, - 0.265619, 0.49804, 0.544252, 0.599254, - 0.265842, 0.487346, 0.587856, 0.631251, - 0.263978, 0.472975, 0.631969, 0.663972, - 0.26043, 0.457135, 0.677471, 0.697724, - 0.255358, 0.439844, 0.723744, 0.727725, - 0.248308, 0.417872, 0.770653, 0.756417, - 0.239181, 0.39273, 0.817357, 0.785419, - 0.22814, 0.367839, 0.864221, 0.81266, - 0.215681, 0.339449, 0.912701, 0.839391, - 0.201623, 0.309279, 0.962419, 0.86366, - 0.185624, 0.278029, 1.0122, 0.885028, - 0.16797, 0.245294, 1.06186, 0.904639, - 0.148336, 0.212689, 1.10934, 0.922048, - 0.12637, 0.179616, 1.15063, 0.936952, - 0.102928, 0.146749, 1.18885, 0.951895, - 0.0785268, 0.112733, 1.22352, 0.967198, - 0.0530153, 0.0760056, 1.25681, 0.984405, - 0.02649, 0.0383183, 1.28762, 1.00021, 0.00070019, - 0.00020039, 1.31656, 0.0325964, - 3.55447e-06, 0.176706, 6.55682e-07, 0.0329333, - 8.99174e-05, 0.178527, 1.65869e-05, 0.0329181, - 0.000359637, 0.178453, 6.63498e-05, 0.0329085, - 0.000808991, 0.178383, 0.000149332, 0.0329181, - 0.00143826, 0.178394, 0.000265873, 0.0329425, - 0.00224678, 0.178517, 0.000416597, 0.0329511, - 0.00323575, 0.17849, 0.000603299, 0.033011, - 0.00439875, 0.178695, 0.000829422, 0.0330733, - 0.00574059, 0.178843, 0.00109908, 0.0331857, - 0.00725896, 0.179176, 0.00141933, 0.0333445, - 0.00895289, 0.179618, 0.0017999, 0.0335674, - 0.0108219, 0.180238, 0.00225316, 0.033939, - 0.0128687, 0.181417, 0.00279765, 0.0345239, - 0.015114, 0.183395, 0.0034564, 0.0354458, - 0.017596, 0.186616, 0.00425864, 0.0368313, - 0.0203524, 0.191547, 0.00524936, 0.0386115, - 0.0234105, 0.197508, 0.00647033, 0.0410303, - 0.0268509, 0.205395, 0.00798121, 0.0442245, - 0.0307481, 0.215365, 0.0098557, 0.0478659, - 0.0350863, 0.225595, 0.0121417, 0.0522416, - 0.0399506, 0.236946, 0.0149385, 0.0574513, - 0.045357, 0.249442, 0.0183189, 0.0631208, - 0.0512863, 0.261222, 0.0223644, 0.0701124, - 0.0579273, 0.275418, 0.0272418, 0.0777331, - 0.0650652, 0.288989, 0.0329458, 0.0862709, - 0.0728813, 0.302546, 0.0396819, 0.096103, - 0.081363, 0.317164, 0.04757, 0.106976, - 0.0904463, 0.331733, 0.0567012, 0.119175, - 0.100105, 0.34661, 0.067202, 0.132919, - 0.110375, 0.362249, 0.0792588, 0.147727, - 0.121115, 0.376978, 0.0928672, 0.163618, - 0.132299, 0.390681, 0.108228, 0.182234, - 0.143887, 0.406571, 0.125502, 0.201809, - 0.155827, 0.42042, 0.144836, 0.225041, - 0.168357, 0.438411, 0.166706, 0.247621, - 0.18004, 0.450368, 0.189909, 0.27097, - 0.191536, 0.460083, 0.215251, 0.296658, - 0.203024, 0.469765, 0.243164, 0.325892, - 0.214056, 0.481837, 0.273388, 0.35406, - 0.224104, 0.487474, 0.305344, 0.384372, - 0.233489, 0.492773, 0.339741, 0.41749, - 0.241874, 0.498451, 0.376287, 0.45013, - 0.248834, 0.499632, 0.414195, 0.481285, - 0.254658, 0.495233, 0.454077, 0.519183, - 0.259367, 0.496401, 0.496352, 0.551544, - 0.261818, 0.487686, 0.538798, 0.587349, - 0.262964, 0.479453, 0.583626, 0.621679, - 0.262128, 0.467709, 0.629451, 0.654991, - 0.258998, 0.452123, 0.67566, 0.686873, - 0.254119, 0.433495, 0.723248, 0.719801, - 0.246946, 0.413657, 0.771156, 0.750355, - 0.237709, 0.390366, 0.81989, 0.780033, - 0.226549, 0.364947, 0.868601, 0.809254, - 0.214186, 0.337256, 0.920034, 0.836576, - 0.199639, 0.307395, 0.971706, 0.861774, - 0.183169, 0.275431, 1.02479, 0.885707, - 0.165111, 0.243431, 1.07837, 0.904742, - 0.144363, 0.210921, 1.12783, 0.915604, - 0.121305, 0.17647, 1.17254, 0.930959, - 0.0962119, 0.143106, 1.21012, 0.948404, - 0.069969, 0.108112, 1.24474, 0.967012, - 0.0427586, 0.0708478, 1.27718, 0.984183, - 0.0147043, 0.032335, 1.3083, 0.999577, 0.0142165, - 0.00726867, 1.3382, 0.0229227, - 2.99799e-06, 0.148623, 4.62391e-07, 0.0232194, - 7.58796e-05, 0.15054, 1.17033e-05, 0.0232315, - 0.000303636, 0.15063, 4.68397e-05, 0.0232354, - 0.000683189, 0.150624, 0.000105472, 0.0232092, - 0.0012136, 0.150445, 0.000187744, 0.0232523, - 0.00189765, 0.150679, 0.000294847, 0.0232828, - 0.00273247, 0.150789, 0.000428013, 0.0233371, - 0.00371287, 0.150995, 0.000591134, 0.0234015, - 0.00484794, 0.15118, 0.000787642, 0.023514, - 0.00612877, 0.151562, 0.00102547, 0.023679, - 0.00756125, 0.152116, 0.00131351, 0.0239559, - 0.00914651, 0.153162, 0.00166594, 0.0244334, - 0.010904, 0.155133, 0.00210182, 0.025139, - 0.0128615, 0.158035, 0.00264406, 0.0262598, - 0.0150628, 0.162751, 0.00332923, 0.0277875, - 0.0175532, 0.168944, 0.00419773, 0.0298472, - 0.0203981, 0.176835, 0.00530034, 0.0325444, - 0.023655, 0.186686, 0.00669777, 0.0355581, - 0.0272982, 0.196248, 0.00842661, 0.0392841, - 0.0314457, 0.207352, 0.0105854, 0.0436815, - 0.0361157, 0.219279, 0.0132458, 0.0485272, - 0.0412932, 0.230728, 0.0164736, 0.0541574, - 0.0470337, 0.242994, 0.0203715, 0.0609479, - 0.0535002, 0.257042, 0.0250953, 0.0685228, - 0.0605409, 0.27102, 0.0306856, 0.0768042, - 0.0680553, 0.28406, 0.037193, 0.0864844, - 0.0765011, 0.299186, 0.0449795, 0.0969415, - 0.0852674, 0.3132, 0.0538316, 0.108478, - 0.0947333, 0.327138, 0.0641149, 0.121705, - 0.10481, 0.342345, 0.0759185, 0.136743, - 0.115474, 0.358472, 0.0894116, 0.152986, - 0.126536, 0.374067, 0.104562, 0.170397, - 0.138061, 0.388267, 0.121632, 0.191392, - 0.150203, 0.406467, 0.140996, 0.211566, - 0.161751, 0.418641, 0.161696, 0.233567, - 0.173407, 0.430418, 0.184557, 0.257769, - 0.185397, 0.44277, 0.210092, 0.28531, - 0.197048, 0.457191, 0.237827, 0.311726, - 0.20784, 0.464712, 0.267253, 0.340537, - 0.218345, 0.472539, 0.299332, 0.372921, - 0.228306, 0.482331, 0.333988, 0.402924, - 0.236665, 0.484378, 0.369722, 0.434475, - 0.244097, 0.484717, 0.407836, 0.469736, - 0.250547, 0.487093, 0.448465, 0.505045, - 0.25511, 0.485575, 0.490263, 0.540262, - 0.258444, 0.481225, 0.534495, 0.576347, - 0.259903, 0.473481, 0.579451, 0.608656, - 0.259572, 0.4603, 0.625604, 0.646679, - 0.257908, 0.450341, 0.674511, 0.679902, - 0.253663, 0.431561, 0.723269, 0.714159, - 0.247419, 0.412684, 0.773263, 0.745345, - 0.239122, 0.389388, 0.824182, 0.778248, - 0.228837, 0.365361, 0.876634, 0.807208, - 0.216197, 0.337667, 0.92945, 0.835019, - 0.201772, 0.307197, 0.985261, 0.860261, - 0.185291, 0.274205, 1.04299, 0.877601, - 0.165809, 0.240178, 1.09816, 0.898211, - 0.143897, 0.207571, 1.14694, 0.915789, - 0.119513, 0.174904, 1.19008, 0.931831, - 0.0932919, 0.141423, 1.2297, 0.949244, - 0.0656528, 0.105603, 1.26553, 0.967527, - 0.0370262, 0.0679551, 1.29986, 0.984139, - 0.00730117, 0.0283133, 1.33252, 0.999713, 0.0234648, - 0.0121785, 1.36397, 0.0152135, - 2.45447e-06, 0.122795, 3.04092e-07, 0.0151652, - 6.15778e-05, 0.122399, 7.6292e-06, 0.0151181, - 0.000245948, 0.122023, 3.04802e-05, 0.0151203, - 0.000553394, 0.12203, 6.86634e-05, 0.015125, - 0.000983841, 0.122037, 0.000122463, 0.0151427, - 0.00153774, 0.12214, 0.000192706, 0.0151708, - 0.0022103, 0.122237, 0.000281219, 0.0152115, - 0.00300741, 0.12238, 0.000390804, 0.0152877, - 0.00392494, 0.1227, 0.000526317, 0.015412, - 0.00496597, 0.123244, 0.00069443, 0.0156201, - 0.00613314, 0.124228, 0.00090547, 0.0159658, - 0.00744113, 0.125945, 0.0011732, 0.0165674, - 0.00892546, 0.129098, 0.00151888, 0.017487, - 0.010627, 0.133865, 0.00197007, 0.018839, - 0.0126043, 0.140682, 0.0025637, 0.020554, - 0.0148814, 0.148534, 0.00333637, 0.0226727, - 0.0175123, 0.157381, 0.00433738, 0.0251879, - 0.0205266, 0.166685, 0.00561664, 0.0283635, - 0.0240319, 0.177796, 0.00725563, 0.0318694, - 0.0279432, 0.188251, 0.00928811, 0.0361044, - 0.0324313, 0.200038, 0.011835, 0.0406656, - 0.0373527, 0.210685, 0.0149146, 0.0463846, - 0.0430132, 0.224182, 0.0187254, 0.0525696, - 0.0491013, 0.23634, 0.0232283, 0.0598083, - 0.0559175, 0.250013, 0.0286521, 0.0679437, - 0.0633657, 0.263981, 0.0350634, 0.0771181, - 0.0714602, 0.278072, 0.0425882, 0.0881273, - 0.0803502, 0.29511, 0.0514487, 0.0996628, - 0.0896903, 0.309976, 0.0615766, 0.112702, - 0.099644, 0.325611, 0.0732139, 0.126488, - 0.109829, 0.339321, 0.0862324, 0.142625, - 0.120859, 0.35574, 0.101275, 0.15953, - 0.131956, 0.369845, 0.117892, 0.176991, - 0.143145, 0.38146, 0.136205, 0.199715, - 0.155292, 0.40052, 0.157252, 0.220787, - 0.167066, 0.412055, 0.179966, 0.243697, - 0.178396, 0.423133, 0.204418, 0.272106, - 0.190433, 0.439524, 0.232141, 0.297637, - 0.201265, 0.447041, 0.261109, 0.325273, - 0.211834, 0.454488, 0.292627, 0.357219, - 0.221889, 0.465004, 0.326669, 0.387362, - 0.230729, 0.468527, 0.362426, 0.423131, - 0.23924, 0.475836, 0.401533, 0.45543, - 0.246067, 0.475017, 0.441902, 0.493393, - 0.251557, 0.478017, 0.484239, 0.526253, - 0.255571, 0.4709, 0.528586, 0.560554, - 0.257752, 0.463167, 0.574346, 0.599306, - 0.258076, 0.456452, 0.621655, 0.634541, - 0.256471, 0.443725, 0.670492, 0.668907, - 0.253283, 0.428719, 0.721943, 0.705619, - 0.247562, 0.411348, 0.772477, 0.739034, - 0.240626, 0.388939, 0.8264, 0.771408, - 0.231493, 0.36425, 0.881702, 0.803312, - 0.220125, 0.337321, 0.9385, 0.828457, - 0.206645, 0.305364, 0.997437, 0.854819, - 0.190664, 0.273715, 1.05693, 0.878666, - 0.171429, 0.242218, 1.11251, 0.898404, - 0.149235, 0.209556, 1.16398, 0.917416, - 0.12435, 0.176863, 1.21014, 0.933133, - 0.0972703, 0.142775, 1.25178, 0.95066, - 0.0683607, 0.106735, 1.29028, 0.968589, - 0.0378724, 0.0681609, 1.32703, 0.984776, - 0.00605712, 0.0273966, 1.36158, 0.99994, 0.0263276, - 0.0138124, 1.3943, 0.00867437, - 1.86005e-06, 0.0928979, 1.73682e-07, 0.00864003, - 4.66389e-05, 0.0925237, 4.35505e-06, 0.00864593, - 0.000186594, 0.0925806, 1.74322e-05, 0.00864095, - 0.000419639, 0.0924903, 3.92862e-05, 0.00863851, - 0.000746272, 0.0924589, 7.02598e-05, 0.00868531, - 0.00116456, 0.0929, 0.000111188, 0.00869667, - 0.00167711, 0.0928529, 0.000163867, 0.00874332, - 0.00228051, 0.0930914, 0.00023104, 0.00882709, - 0.00297864, 0.0935679, 0.00031741, 0.00898874, - 0.00377557, 0.0946165, 0.000430186, 0.00929346, - 0.00469247, 0.0967406, 0.000580383, 0.00978271, - 0.00575491, 0.100084, 0.000783529, 0.0105746, - 0.00701514, 0.105447, 0.00106304, 0.0116949, - 0.00851797, 0.112494, 0.00144685, 0.0130419, - 0.0102757, 0.119876, 0.00196439, 0.0148375, - 0.012381, 0.129034, 0.00266433, 0.0168725, - 0.01482, 0.137812, 0.00358364, 0.0193689, - 0.0176563, 0.147696, 0.00478132, 0.0222691, - 0.0209211, 0.157795, 0.00631721, 0.0256891, - 0.0246655, 0.168431, 0.00826346, 0.0294686, - 0.0288597, 0.178587, 0.0106714, 0.0340412, - 0.0336441, 0.190251, 0.0136629, 0.0393918, - 0.039033, 0.202999, 0.0173272, 0.0453947, - 0.0450087, 0.215655, 0.0217448, 0.0521936, - 0.0515461, 0.228686, 0.0269941, 0.0600279, - 0.058817, 0.242838, 0.033272, 0.0692398, - 0.0667228, 0.258145, 0.0406457, 0.0793832, - 0.0752401, 0.273565, 0.0492239, 0.0902297, - 0.0841851, 0.287735, 0.0590105, 0.102014, - 0.0936479, 0.301161, 0.0702021, 0.116054, - 0.103967, 0.317438, 0.0832001, 0.13191, - 0.114622, 0.334166, 0.0977951, 0.148239, - 0.125452, 0.348192, 0.113985, 0.165809, - 0.136453, 0.361094, 0.131928, 0.184616, - 0.147648, 0.373534, 0.151811, 0.207491, - 0.159607, 0.39101, 0.174476, 0.230106, - 0.171119, 0.402504, 0.198798, 0.257036, - 0.182906, 0.418032, 0.225796, 0.281172, - 0.193605, 0.425468, 0.254027, 0.312034, - 0.204771, 0.440379, 0.285713, 0.340402, - 0.214988, 0.445406, 0.319196, 0.370231, - 0.224711, 0.44968, 0.35537, 0.407105, - 0.233516, 0.460747, 0.393838, 0.439037, - 0.240801, 0.460624, 0.433747, 0.47781, - 0.24762, 0.465957, 0.477234, 0.510655, - 0.251823, 0.460054, 0.52044, 0.550584, - 0.255552, 0.459172, 0.567853, 0.585872, - 0.257036, 0.450311, 0.615943, 0.620466, - 0.257535, 0.437763, 0.667693, 0.660496, - 0.255248, 0.426639, 0.718988, 0.695578, - 0.251141, 0.409185, 0.772503, 0.732176, - 0.244718, 0.39015, 0.827023, 0.760782, - 0.236782, 0.362594, 0.885651, 0.79422, - 0.225923, 0.33711, 0.943756, 0.824521, - 0.213855, 0.308272, 1.00874, 0.854964, - 0.197723, 0.278529, 1.06764, 0.878065, - 0.179209, 0.246208, 1.12836, 0.899834, - 0.157569, 0.21329, 1.18318, 0.918815, - 0.133206, 0.181038, 1.23161, 0.934934, - 0.106545, 0.146993, 1.27644, 0.952115, - 0.0780574, 0.111175, 1.31842, 0.96906, - 0.0478279, 0.0728553, 1.35839, 0.985178, - 0.0160014, 0.032579, 1.39697, 1.00039, 0.0173126, - 0.0095256, 1.43312, 0.00384146, - 1.24311e-06, 0.0613583, 7.78271e-08, 0.00390023, - 3.14043e-05, 0.0622919, 1.96626e-06, 0.00389971, - 0.000125622, 0.0622632, 7.87379e-06, 0.00389491, - 0.000282352, 0.0620659, 1.778e-05, 0.00391618, - 0.000502512, 0.0624687, 3.20918e-05, 0.00392662, - 0.000784458, 0.0625113, 5.15573e-05, 0.00396053, - 0.00112907, 0.0628175, 7.78668e-05, 0.00401911, - 0.00153821, 0.0633286, 0.000113811, 0.00414994, - 0.0020208, 0.0646443, 0.00016445, 0.00441223, - 0.00260007, 0.0673886, 0.000237734, 0.00484427, - 0.0033097, 0.0716528, 0.000345929, 0.00549109, - 0.00418966, 0.0774998, 0.000505987, 0.00636293, - 0.00527331, 0.0844758, 0.000739208, 0.00746566, - 0.00660428, 0.0921325, 0.00107347, 0.00876625, - 0.00818826, 0.0997067, 0.00153691, 0.0103125, - 0.0100811, 0.107433, 0.00217153, 0.0123309, - 0.0123643, 0.117088, 0.00303427, 0.0146274, - 0.0150007, 0.126438, 0.00416018, 0.0172295, - 0.0180531, 0.135672, 0.00561513, 0.0204248, - 0.0215962, 0.146244, 0.007478, 0.0241597, - 0.0256234, 0.157481, 0.00981046, 0.0284693, - 0.0302209, 0.169125, 0.0127148, 0.033445, - 0.0353333, 0.181659, 0.0162453, 0.0391251, - 0.0410845, 0.1944, 0.0205417, 0.0454721, - 0.0473451, 0.207082, 0.0256333, 0.0530983, - 0.0542858, 0.221656, 0.0317036, 0.0615356, - 0.0618384, 0.236036, 0.0388319, 0.0703363, - 0.0697631, 0.248398, 0.046974, 0.0810391, - 0.0784757, 0.263611, 0.0565246, 0.0920144, - 0.0873488, 0.275857, 0.0671724, 0.105584, - 0.0973652, 0.292555, 0.0798105, 0.119506, - 0.107271, 0.306333, 0.0935945, 0.134434, - 0.117608, 0.318888, 0.109106, 0.153399, - 0.128938, 0.337552, 0.127074, 0.171258, - 0.139944, 0.349955, 0.14643, 0.191059, - 0.151288, 0.361545, 0.168, 0.215069, - 0.163018, 0.378421, 0.192082, 0.237838, - 0.174226, 0.38879, 0.217838, 0.266965, - 0.186063, 0.405857, 0.246931, 0.292827, - 0.196909, 0.414146, 0.277505, 0.324352, - 0.207473, 0.426955, 0.310711, 0.354427, - 0.217713, 0.433429, 0.346794, 0.389854, - 0.227183, 0.443966, 0.385237, 0.420749, - 0.235131, 0.44471, 0.424955, 0.459597, - 0.242786, 0.451729, 0.468446, 0.495316, - 0.248767, 0.45072, 0.513422, 0.534903, - 0.253351, 0.450924, 0.560618, 0.572369, - 0.256277, 0.445266, 0.609677, 0.612383, - 0.2576, 0.438798, 0.660995, 0.644037, - 0.256931, 0.421693, 0.713807, 0.686749, - 0.254036, 0.4109, 0.767616, 0.719814, - 0.249785, 0.390151, 0.82533, 0.754719, - 0.244283, 0.367847, 0.888311, 0.792022, - 0.235076, 0.345013, 0.948177, 0.822404, - 0.225061, 0.316193, 1.01661, 0.853084, - 0.211113, 0.287013, 1.08075, 0.879871, - 0.19449, 0.255424, 1.14501, 0.901655, - 0.174023, 0.222879, 1.20203, 0.919957, - 0.1509, 0.18989, 1.25698, 0.938412, - 0.124923, 0.15606, 1.30588, 0.953471, - 0.0968139, 0.120512, 1.3529, 0.970451, - 0.066734, 0.0828515, 1.3986, 0.985522, - 0.034734, 0.0424458, 1.44148, 1.00099, - 0.00102222, 0.000678929, 1.48398, 0.000965494, - 6.27338e-07, 0.0306409, 1.97672e-08, 0.00099168, - 1.58573e-05, 0.0314638, 4.99803e-07, 0.000991068, - 6.34012e-05, 0.031363, 2.00682e-06, 0.000974567, - 0.00014144, 0.03036, 4.57312e-06, 0.000998079, - 0.000252812, 0.031496, 8.60131e-06, 0.00102243, - 0.000396506, 0.0319955, 1.48288e-05, 0.00107877, - 0.000577593, 0.0331376, 2.49141e-05, 0.00121622, - 0.000816816, 0.0359396, 4.23011e-05, 0.0014455, - 0.00113761, 0.0399652, 7.24613e-05, 0.00178791, - 0.00156959, 0.0450556, 0.000123929, 0.00225668, - 0.00214064, 0.0508025, 0.000208531, 0.00285627, - 0.00287655, 0.0568443, 0.000341969, 0.0035991, - 0.00380271, 0.0630892, 0.000544158, 0.00455524, - 0.00496264, 0.0702204, 0.000842423, 0.00569143, - 0.0063793, 0.0773426, 0.00126704, 0.00716928, - 0.00813531, 0.0860839, 0.00186642, 0.00885307, - 0.0101946, 0.0944079, 0.00267014, 0.0109316, - 0.0126386, 0.103951, 0.00374033, 0.0133704, - 0.0154876, 0.113786, 0.0051304, 0.0161525, - 0.0187317, 0.123477, 0.00688858, 0.0194267, - 0.0224652, 0.133986, 0.00910557, 0.0230967, - 0.0265976, 0.143979, 0.0118074, 0.0273627, - 0.0312848, 0.154645, 0.0151266, 0.0323898, - 0.0365949, 0.166765, 0.0191791, 0.0379225, - 0.0422914, 0.177932, 0.0239236, 0.0447501, - 0.0487469, 0.19167, 0.0296568, 0.0519391, - 0.0556398, 0.203224, 0.0362924, 0.0599464, - 0.0631646, 0.215652, 0.0440585, 0.0702427, - 0.0714308, 0.232089, 0.0531619, 0.0806902, - 0.0800605, 0.245258, 0.0634564, 0.0923194, - 0.0892815, 0.258609, 0.0752481, 0.106938, - 0.09931, 0.276654, 0.0888914, 0.121238, - 0.109575, 0.289847, 0.104055, 0.138817, - 0.120461, 0.307566, 0.121266, 0.15595, - 0.131209, 0.320117, 0.139944, 0.178418, - 0.143049, 0.339677, 0.161591, 0.197875, - 0.154074, 0.349886, 0.184303, 0.224368, - 0.166307, 0.369352, 0.210669, 0.252213, - 0.178051, 0.386242, 0.238895, 0.277321, - 0.189335, 0.395294, 0.269182, 0.310332, - 0.200683, 0.412148, 0.302508, 0.338809, - 0.210856, 0.418266, 0.337264, 0.372678, - 0.220655, 0.428723, 0.374881, 0.405632, - 0.230053, 0.433887, 0.415656, 0.442293, - 0.237993, 0.439911, 0.457982, 0.477256, - 0.244897, 0.440175, 0.502831, 0.515592, - 0.250657, 0.441079, 0.550277, 0.550969, - 0.255459, 0.435219, 0.601102, 0.592883, - 0.257696, 0.432882, 0.651785, 0.629092, - 0.259894, 0.421054, 0.708961, 0.672033, - 0.258592, 0.41177, 0.763806, 0.709147, - 0.256525, 0.395267, 0.824249, 0.745367, - 0.254677, 0.375013, 0.8951, 0.784715, - 0.247892, 0.353906, 0.959317, 0.818107, - 0.240162, 0.327801, 1.03153, 0.847895, - 0.229741, 0.298821, 1.10601, 0.879603, - 0.213084, 0.269115, 1.164, 0.902605, - 0.195242, 0.236606, 1.22854, 0.922788, - 0.174505, 0.203442, 1.29017, 0.944831, - 0.150169, 0.169594, 1.34157, 0.959656, - 0.124099, 0.135909, 1.3956, 0.972399, - 0.0960626, 0.0990563, 1.45128, 0.986549, - 0.0657097, 0.0602348, 1.50312, 1.00013, - 0.0333558, 0.0186694, 1.55364, 6.19747e-06, - 1e-07, 0.00778326, 7.96756e-11, 2.37499e-08, - 9.99999e-08, 2.82592e-05, 1.14596e-10, 1.00292e-06, - 1.66369e-06, 0.000250354, 6.77492e-09, 3.50752e-06, - 6.37769e-06, 0.000357289, 6.31655e-08, 8.26445e-06, - 1.74689e-05, 0.000516179, 3.1851e-07, 2.42481e-05, - 4.50868e-05, 0.0010223, 1.30577e-06, 4.55631e-05, - 8.9044e-05, 0.00144302, 3.74587e-06, 9.71222e-05, - 0.000178311, 0.00241912, 1.02584e-05, 0.000171403, - 0.000313976, 0.00354938, 2.36481e-05, 0.000292747, - 0.000520026, 0.00513765, 4.96014e-05, 0.000789827, - 0.00118187, 0.0238621, 0.000139056, 0.00114093, - 0.00171827, 0.0286691, 0.000244093, 0.00176119, - 0.00249667, 0.0368565, 0.000420623, 0.0022233, - 0.00333742, 0.0400469, 0.00065673, 0.00343382, - 0.00481976, 0.0535751, 0.00109323, 0.00427602, - 0.00600755, 0.057099, 0.00155268, 0.00461435, - 0.00737637, 0.0551084, 0.00215031, 0.00695698, - 0.00971401, 0.0715767, 0.00316529, 0.00867619, - 0.0120943, 0.0793314, 0.00436995, 0.0106694, - 0.0148202, 0.0869391, 0.0058959, 0.0140351, - 0.0183501, 0.101572, 0.00798757, 0.0168939, - 0.022006, 0.11018, 0.0104233, 0.020197, - 0.0261568, 0.119041, 0.0134167, 0.0254702, - 0.0312778, 0.135404, 0.0173009, 0.0298384, - 0.0362469, 0.1437, 0.0215428, 0.035159, - 0.042237, 0.15512, 0.0268882, 0.0427685, - 0.0488711, 0.17128, 0.033235, 0.0494848, - 0.0557997, 0.181813, 0.0404443, 0.0592394, - 0.0635578, 0.198745, 0.0490043, 0.0681463, - 0.071838, 0.210497, 0.0588239, 0.0804753, - 0.0809297, 0.228864, 0.0702835, 0.0942205, - 0.0906488, 0.247008, 0.0834012, 0.106777, - 0.100216, 0.258812, 0.0975952, 0.124471, - 0.110827, 0.278617, 0.114162, 0.138389, - 0.121193, 0.287049, 0.131983, 0.159543, - 0.13253, 0.307151, 0.152541, 0.176432, - 0.143611, 0.31564, 0.174673, 0.201723, - 0.15548, 0.33538, 0.199842, 0.229721, - 0.167166, 0.355256, 0.227097, 0.250206, - 0.178238, 0.360047, 0.256014, 0.282118, - 0.189905, 0.378761, 0.28855, 0.312821, - 0.201033, 0.39181, 0.323348, 0.341482, - 0.211584, 0.397716, 0.360564, 0.377368, - 0.221314, 0.410141, 0.400004, 0.418229, - 0.230474, 0.423485, 0.442371, 0.444881, - 0.239443, 0.418874, 0.488796, 0.488899, - 0.245987, 0.427545, 0.535012, 0.520317, - 0.253948, 0.422147, 0.589678, 0.568566, - 0.256616, 0.42719, 0.637683, 0.599607, - 0.26376, 0.415114, 0.703363, 0.64222, - 0.268687, 0.408715, 0.771363, 0.685698, - 0.2694, 0.399722, 0.83574, 0.732327, - 0.266642, 0.388651, 0.897764, 0.769873, - 0.267712, 0.369198, 0.983312, 0.806733, - 0.263479, 0.346802, 1.06222, 0.843466, - 0.254575, 0.321368, 1.13477, 0.873008, - 0.242749, 0.29211, 1.20712, 0.908438, - 0.22725, 0.262143, 1.27465, 0.936321, - 0.207621, 0.228876, 1.33203, 0.950353, - 0.187932, 0.19484, 1.40439, 0.96442, - 0.165154, 0.163178, 1.4732, 0.979856, - 0.139302, 0.127531, 1.53574, 0.982561, - 0.11134, 0.0903457, 1.59982, 0.996389, - 0.0808124, 0.0489007, 1.6577 ]; + + const LTC_MAT_2 = [ 1, 0, 0, 0, 1, 7.91421e-31, 0, 0, 1, 1.04392e-24, 0, 0, 1, 3.49405e-21, 0, 0, 1, 1.09923e-18, 0, 0, 1, 9.47414e-17, 0, 0, 1, 3.59627e-15, 0, 0, 1, 7.72053e-14, 0, 0, 1, 1.08799e-12, 0, 0, 1, 1.10655e-11, 0, 0, 1, 8.65818e-11, 0, 0, 0.999998, 5.45037e-10, 0, 0, 0.999994, 2.85095e-09, 0, 0, 0.999989, 1.26931e-08, 0, 0, 0.999973, 4.89938e-08, 0, 0, 0.999947, 1.66347e-07, 0, 0, 0.999894, 5.02694e-07, 0, 0, 0.999798, 1.36532e-06, 0, 0, 0.999617, 3.35898e-06, 0, 0, 0.999234, 7.52126e-06, 0, 0, 0.998258, 1.52586e-05, 0, 0, 0.99504, 2.66207e-05, 0, 0, 0.980816, 2.36802e-05, 0, 0, 0.967553, 2.07684e-06, 0, 0, 0.966877, 4.03733e-06, 0, 0, 0.965752, 7.41174e-06, 0, 0, 0.96382, 1.27746e-05, 0, 0, 0.960306, 2.02792e-05, 0, 0, 0.953619, 2.80232e-05, 0, 0, 0.941103, 2.78816e-05, 0, 0, 0.926619, 1.60221e-05, 0, 0, 0.920983, 2.35164e-05, 0, 0, 0.912293, 3.11924e-05, 0, 0.0158731, 0.899277, 3.48118e-05, 0, 0.0476191, 0.880884, 2.6041e-05, 0, 0.0793651, 0.870399, 3.38726e-05, 0, 0.111111, 0.856138, 3.92906e-05, 0, 0.142857, 0.837436, 3.72874e-05, 0, 0.174603, 0.820973, 3.92558e-05, 0, 0.206349, 0.803583, 4.34658e-05, 0, 0.238095, 0.782168, 4.0256e-05, 0, 0.269841, 0.764107, 4.48159e-05, 0, 0.301587, 0.743092, 4.57627e-05, 0, 0.333333, 0.721626, 4.55314e-05, 0, 0.365079, 0.700375, 4.77335e-05, 0, 0.396825, 0.677334, 4.61072e-05, 0, 0.428571, 0.655702, 4.84393e-05, 0, 0.460317, 0.632059, 4.64583e-05, 0, 0.492064, 0.610125, 4.83923e-05, 0, 0.52381, 0.58653, 4.64342e-05, 0, 0.555556, 0.564508, 4.77033e-05, 0, 0.587302, 0.541405, 4.59263e-05, 0, 0.619048, 0.519556, 4.6412e-05, 0, 0.650794, 0.497292, 4.48913e-05, 0, 0.68254, 0.475898, 4.45789e-05, 0, 0.714286, 0.454722, 4.33496e-05, 0, 0.746032, 0.434042, 4.23054e-05, 0, 0.777778, 0.414126, 4.13737e-05, 0, 0.809524, 0.394387, 3.97265e-05, 0, 0.84127, 0.375841, 3.90709e-05, 0, 0.873016, 0.357219, 3.69938e-05, 0, 0.904762, 0.340084, 3.65618e-05, 0, 0.936508, 0.322714, 3.42533e-05, 0, 0.968254, 0.306974, 3.39596e-05, 0, 1, 1, 1.01524e-18, 0, 0, 1, 1.0292e-18, 0, 0, 1, 1.30908e-18, 0, 0, 1, 4.73331e-18, 0, 0, 1, 6.25319e-17, 0, 0, 1, 1.07932e-15, 0, 0, 1, 1.63779e-14, 0, 0, 1, 2.03198e-13, 0, 0, 1, 2.04717e-12, 0, 0, 0.999999, 1.68995e-11, 0, 0, 0.999998, 1.15855e-10, 0, 0, 0.999996, 6.6947e-10, 0, 0, 0.999991, 3.30863e-09, 0, 0, 0.999983, 1.41737e-08, 0, 0, 0.999968, 5.32626e-08, 0, 0, 0.99994, 1.77431e-07, 0, 0, 0.999891, 5.28835e-07, 0, 0, 0.999797, 1.42169e-06, 0, 0, 0.999617, 3.47057e-06, 0, 0, 0.999227, 7.7231e-06, 0, 0, 0.998239, 1.55753e-05, 0, 0, 0.994937, 2.68495e-05, 0, 0, 0.980225, 2.13742e-05, 0, 0, 0.967549, 2.1631e-06, 0, 0, 0.966865, 4.17989e-06, 0, 0, 0.965739, 7.63341e-06, 0, 0, 0.963794, 1.30892e-05, 0, 0, 0.960244, 2.06456e-05, 0, 0, 0.953495, 2.82016e-05, 0, 0.000148105, 0.940876, 2.71581e-05, 0, 0.002454, 0.926569, 1.64159e-05, 0, 0.00867491, 0.920905, 2.39521e-05, 0, 0.01956, 0.912169, 3.15127e-05, 0, 0.035433, 0.899095, 3.46626e-05, 0, 0.056294, 0.882209, 2.90223e-05, 0, 0.0818191, 0.870272, 3.42992e-05, 0, 0.111259, 0.855977, 3.94164e-05, 0, 0.142857, 0.837431, 3.72343e-05, 0, 0.174603, 0.820826, 3.96691e-05, 0, 0.206349, 0.803408, 4.35395e-05, 0, 0.238095, 0.782838, 4.19579e-05, 0, 0.269841, 0.763941, 4.50953e-05, 0, 0.301587, 0.742904, 4.55847e-05, 0, 0.333333, 0.721463, 4.58833e-05, 0, 0.365079, 0.700197, 4.77159e-05, 0, 0.396825, 0.677501, 4.70641e-05, 0, 0.428571, 0.655527, 4.84732e-05, 0, 0.460317, 0.6324, 4.76834e-05, 0, 0.492064, 0.609964, 4.84213e-05, 0, 0.52381, 0.586839, 4.75541e-05, 0, 0.555556, 0.564353, 4.76951e-05, 0, 0.587302, 0.541589, 4.67611e-05, 0, 0.619048, 0.519413, 4.63493e-05, 0, 0.650794, 0.497337, 4.53994e-05, 0, 0.68254, 0.475797, 4.45308e-05, 0, 0.714286, 0.454659, 4.35787e-05, 0, 0.746032, 0.434065, 4.24839e-05, 0, 0.777778, 0.414018, 4.1436e-05, 0, 0.809524, 0.39455, 4.01902e-05, 0, 0.84127, 0.375742, 3.90813e-05, 0, 0.873016, 0.357501, 3.77116e-05, 0, 0.904762, 0.339996, 3.6535e-05, 0, 0.936508, 0.323069, 3.51265e-05, 0, 0.968254, 0.306897, 3.39112e-05, 0, 1, 1, 1.0396e-15, 0, 0, 1, 1.04326e-15, 0, 0, 1, 1.10153e-15, 0, 0, 1, 1.44668e-15, 0, 0, 1, 3.4528e-15, 0, 0, 1, 1.75958e-14, 0, 0, 1, 1.2627e-13, 0, 0, 1, 9.36074e-13, 0, 0, 1, 6.45742e-12, 0, 0, 0.999998, 4.01228e-11, 0, 0, 0.999997, 2.22338e-10, 0, 0, 0.999995, 1.0967e-09, 0, 0, 0.999991, 4.82132e-09, 0, 0, 0.999981, 1.89434e-08, 0, 0, 0.999967, 6.67716e-08, 0, 0, 0.999938, 2.12066e-07, 0, 0, 0.999886, 6.0977e-07, 0, 0, 0.999792, 1.59504e-06, 0, 0, 0.999608, 3.81191e-06, 0, 0, 0.999209, 8.33727e-06, 0, 0, 0.998179, 1.65288e-05, 0, 0, 0.994605, 2.74387e-05, 0, 0, 0.979468, 1.67316e-05, 0, 0, 0.967529, 2.42877e-06, 0, 0, 0.966836, 4.61696e-06, 0, 0, 0.96569, 8.30977e-06, 0, 0, 0.963706, 1.40427e-05, 0, 2.44659e-06, 0.960063, 2.17353e-05, 0, 0.000760774, 0.953113, 2.86606e-05, 0, 0.00367261, 0.940192, 2.47691e-05, 0, 0.00940263, 0.927731, 1.95814e-05, 0, 0.018333, 0.920669, 2.52531e-05, 0, 0.0306825, 0.911799, 3.24277e-05, 0, 0.0465556, 0.89857, 3.40982e-05, 0, 0.0659521, 0.883283, 3.19622e-05, 0, 0.0887677, 0.86989, 3.5548e-05, 0, 0.114784, 0.855483, 3.97143e-05, 0, 0.143618, 0.837987, 3.91665e-05, 0, 0.174606, 0.820546, 4.11306e-05, 0, 0.206349, 0.802878, 4.36753e-05, 0, 0.238095, 0.783402, 4.44e-05, 0, 0.269841, 0.763439, 4.58726e-05, 0, 0.301587, 0.742925, 4.67097e-05, 0, 0.333333, 0.721633, 4.78887e-05, 0, 0.365079, 0.69985, 4.81251e-05, 0, 0.396825, 0.67783, 4.91811e-05, 0, 0.428571, 0.655126, 4.88199e-05, 0, 0.460318, 0.632697, 4.96025e-05, 0, 0.492064, 0.609613, 4.8829e-05, 0, 0.52381, 0.587098, 4.92754e-05, 0, 0.555556, 0.564119, 4.82625e-05, 0, 0.587302, 0.541813, 4.82807e-05, 0, 0.619048, 0.519342, 4.71552e-05, 0, 0.650794, 0.497514, 4.66765e-05, 0, 0.68254, 0.475879, 4.55582e-05, 0, 0.714286, 0.454789, 4.46007e-05, 0, 0.746032, 0.434217, 4.35382e-05, 0, 0.777778, 0.414086, 4.21753e-05, 0, 0.809524, 0.394744, 4.12093e-05, 0, 0.84127, 0.375782, 3.96634e-05, 0, 0.873016, 0.357707, 3.86419e-05, 0, 0.904762, 0.340038, 3.70345e-05, 0, 0.936508, 0.323284, 3.59725e-05, 0, 0.968254, 0.306954, 3.436e-05, 0, 1, 1, 5.99567e-14, 0, 0, 1, 6.00497e-14, 0, 0, 1, 6.14839e-14, 0, 0, 1, 6.86641e-14, 0, 0, 1, 9.72658e-14, 0, 0, 1, 2.21271e-13, 0, 0, 1, 8.33195e-13, 0, 0, 1, 4.03601e-12, 0, 0, 0.999999, 2.06001e-11, 0, 0, 0.999998, 1.01739e-10, 0, 0, 0.999997, 4.70132e-10, 0, 0, 0.999993, 2.00436e-09, 0, 0, 0.999988, 7.83682e-09, 0, 0, 0.999979, 2.80338e-08, 0, 0, 0.999962, 9.17033e-08, 0, 0, 0.999933, 2.74514e-07, 0, 0, 0.999881, 7.53201e-07, 0, 0, 0.999783, 1.89826e-06, 0, 0, 0.999594, 4.40279e-06, 0, 0, 0.999178, 9.3898e-06, 0, 0, 0.998073, 1.81265e-05, 0, 0, 0.993993, 2.80487e-05, 0, 0, 0.979982, 1.49422e-05, 0, 0, 0.968145, 3.78481e-06, 0, 0, 0.966786, 5.3771e-06, 0, 0, 0.965611, 9.47508e-06, 0, 3.88934e-05, 0.963557, 1.56616e-05, 0, 0.0009693, 0.959752, 2.35144e-05, 0, 0.00370329, 0.952461, 2.91568e-05, 0, 0.00868428, 0.940193, 2.40102e-05, 0, 0.0161889, 0.929042, 2.31235e-05, 0, 0.0263948, 0.920266, 2.73968e-05, 0, 0.0394088, 0.911178, 3.37915e-05, 0, 0.0552818, 0.897873, 3.33629e-05, 0, 0.0740138, 0.884053, 3.51405e-05, 0, 0.0955539, 0.869455, 3.78034e-05, 0, 0.119795, 0.854655, 3.99378e-05, 0, 0.14656, 0.838347, 4.19108e-05, 0, 0.175573, 0.820693, 4.40831e-05, 0, 0.206388, 0.802277, 4.45599e-05, 0, 0.238095, 0.783634, 4.72691e-05, 0, 0.269841, 0.763159, 4.76984e-05, 0, 0.301587, 0.742914, 4.91487e-05, 0, 0.333333, 0.721662, 5.02312e-05, 0, 0.365079, 0.699668, 5.02817e-05, 0, 0.396825, 0.677839, 5.1406e-05, 0, 0.428571, 0.655091, 5.11095e-05, 0, 0.460317, 0.632665, 5.16067e-05, 0, 0.492064, 0.609734, 5.12255e-05, 0, 0.52381, 0.587043, 5.10263e-05, 0, 0.555556, 0.564298, 5.0565e-05, 0, 0.587302, 0.541769, 4.97951e-05, 0, 0.619048, 0.519529, 4.92698e-05, 0, 0.650794, 0.497574, 4.82066e-05, 0, 0.68254, 0.476028, 4.73689e-05, 0, 0.714286, 0.454961, 4.61941e-05, 0, 0.746032, 0.434341, 4.50618e-05, 0, 0.777778, 0.414364, 4.38355e-05, 0, 0.809524, 0.394832, 4.24196e-05, 0, 0.84127, 0.376109, 4.12563e-05, 0, 0.873016, 0.35779, 3.96226e-05, 0, 0.904762, 0.340379, 3.84886e-05, 0, 0.936508, 0.323385, 3.68214e-05, 0, 0.968254, 0.307295, 3.56636e-05, 0, 1, 1, 1.06465e-12, 0, 0, 1, 1.06555e-12, 0, 0, 1, 1.07966e-12, 0, 0, 1, 1.14601e-12, 0, 0, 1, 1.37123e-12, 0, 0, 1, 2.1243e-12, 0, 0, 0.999999, 4.89653e-12, 0, 0, 0.999999, 1.60283e-11, 0, 0, 0.999998, 6.2269e-11, 0, 0, 0.999997, 2.51859e-10, 0, 0, 0.999996, 9.96192e-10, 0, 0, 0.999992, 3.74531e-09, 0, 0, 0.999986, 1.32022e-08, 0, 0, 0.999975, 4.33315e-08, 0, 0, 0.999959, 1.31956e-07, 0, 0, 0.999927, 3.72249e-07, 0, 0, 0.999871, 9.72461e-07, 0, 0, 0.999771, 2.35343e-06, 0, 0, 0.999572, 5.2768e-06, 0, 0, 0.999133, 1.09237e-05, 0, 0, 0.997912, 2.03675e-05, 0, 0, 0.993008, 2.79396e-05, 0, 0, 0.980645, 1.39604e-05, 0, 0, 0.970057, 6.46596e-06, 0, 0, 0.966717, 6.5089e-06, 0, 4.74145e-05, 0.965497, 1.11863e-05, 0, 0.00089544, 0.96334, 1.79857e-05, 0, 0.0032647, 0.959294, 2.59045e-05, 0, 0.0075144, 0.951519, 2.92327e-05, 0, 0.0138734, 0.940517, 2.49769e-05, 0, 0.0224952, 0.93014, 2.6803e-05, 0, 0.0334828, 0.91972, 3.03656e-05, 0, 0.0468973, 0.910294, 3.53323e-05, 0, 0.0627703, 0.897701, 3.51002e-05, 0, 0.0811019, 0.884522, 3.88104e-05, 0, 0.10186, 0.869489, 4.12932e-05, 0, 0.124985, 0.853983, 4.15781e-05, 0, 0.150372, 0.838425, 4.54066e-05, 0, 0.177868, 0.820656, 4.71624e-05, 0, 0.207245, 0.801875, 4.75243e-05, 0, 0.238143, 0.783521, 5.05621e-05, 0, 0.269841, 0.763131, 5.0721e-05, 0, 0.301587, 0.74261, 5.23293e-05, 0, 0.333333, 0.72148, 5.28699e-05, 0, 0.365079, 0.699696, 5.38677e-05, 0, 0.396825, 0.677592, 5.39255e-05, 0, 0.428571, 0.65525, 5.46367e-05, 0, 0.460317, 0.632452, 5.41348e-05, 0, 0.492064, 0.609903, 5.44976e-05, 0, 0.52381, 0.586928, 5.36201e-05, 0, 0.555556, 0.564464, 5.35185e-05, 0, 0.587302, 0.541801, 5.24949e-05, 0, 0.619048, 0.519681, 5.1812e-05, 0, 0.650794, 0.497685, 5.07687e-05, 0, 0.68254, 0.47622, 4.96243e-05, 0, 0.714286, 0.455135, 4.85714e-05, 0, 0.746032, 0.4346, 4.71847e-05, 0, 0.777778, 0.414564, 4.59294e-05, 0, 0.809524, 0.395165, 4.44705e-05, 0, 0.84127, 0.376333, 4.30772e-05, 0, 0.873016, 0.358197, 4.16229e-05, 0, 0.904762, 0.34064, 4.01019e-05, 0, 0.936508, 0.323816, 3.86623e-05, 0, 0.968254, 0.307581, 3.70933e-05, 0, 1, 1, 9.91541e-12, 0, 0, 1, 9.92077e-12, 0, 0, 1, 1.00041e-11, 0, 0, 1, 1.0385e-11, 0, 0, 1, 1.15777e-11, 0, 0, 1, 1.50215e-11, 0, 0, 0.999999, 2.54738e-11, 0, 0, 0.999999, 5.98822e-11, 0, 0, 0.999998, 1.79597e-10, 0, 0, 0.999997, 6.02367e-10, 0, 0, 0.999994, 2.06835e-09, 0, 0, 0.99999, 6.94952e-09, 0, 0, 0.999984, 2.23363e-08, 0, 0, 0.999972, 6.78578e-08, 0, 0, 0.999952, 1.93571e-07, 0, 0, 0.999919, 5.16594e-07, 0, 0, 0.99986, 1.28739e-06, 0, 0, 0.999753, 2.99298e-06, 0, 0, 0.999546, 6.48258e-06, 0, 0, 0.999074, 1.29985e-05, 0, 0, 0.997671, 2.32176e-05, 0, 0, 0.991504, 2.56701e-05, 0, 0, 0.981148, 1.31141e-05, 0, 0, 0.971965, 8.69048e-06, 0, 2.80182e-05, 0.966624, 8.08301e-06, 0, 0.000695475, 0.965344, 1.35235e-05, 0, 0.00265522, 0.963048, 2.10592e-05, 0, 0.00622975, 0.958673, 2.87473e-05, 0, 0.0116234, 0.950262, 2.81379e-05, 0, 0.018976, 0.940836, 2.71089e-05, 0, 0.0283844, 0.930996, 3.0926e-05, 0, 0.0399151, 0.919848, 3.48359e-05, 0, 0.0536063, 0.909136, 3.66092e-05, 0, 0.0694793, 0.897554, 3.84162e-05, 0, 0.0875342, 0.884691, 4.30971e-05, 0, 0.107749, 0.869414, 4.47803e-05, 0, 0.130087, 0.853462, 4.52858e-05, 0, 0.154481, 0.838187, 4.95769e-05, 0, 0.180833, 0.820381, 5.02709e-05, 0, 0.209005, 0.801844, 5.22713e-05, 0, 0.238791, 0.783061, 5.41505e-05, 0, 0.269869, 0.763205, 5.53712e-05, 0, 0.301587, 0.742362, 5.64909e-05, 0, 0.333333, 0.721393, 5.72646e-05, 0, 0.365079, 0.699676, 5.81012e-05, 0, 0.396825, 0.677395, 5.8096e-05, 0, 0.428571, 0.655208, 5.85766e-05, 0, 0.460317, 0.632451, 5.83602e-05, 0, 0.492064, 0.609839, 5.80234e-05, 0, 0.52381, 0.587093, 5.77161e-05, 0, 0.555556, 0.564467, 5.68447e-05, 0, 0.587302, 0.542043, 5.63166e-05, 0, 0.619048, 0.519826, 5.5156e-05, 0, 0.650794, 0.497952, 5.41682e-05, 0, 0.68254, 0.476477, 5.28971e-05, 0, 0.714286, 0.455412, 5.14952e-05, 0, 0.746032, 0.434926, 5.02222e-05, 0, 0.777778, 0.4149, 4.85779e-05, 0, 0.809524, 0.395552, 4.72242e-05, 0, 0.84127, 0.376712, 4.54891e-05, 0, 0.873016, 0.358622, 4.40924e-05, 0, 0.904762, 0.341048, 4.22984e-05, 0, 0.936508, 0.324262, 4.08582e-05, 0, 0.968254, 0.308013, 3.90839e-05, 0, 1, 1, 6.13913e-11, 0, 0, 1, 6.14145e-11, 0, 0, 1, 6.17708e-11, 0, 0, 1, 6.33717e-11, 0, 0, 1, 6.81648e-11, 0, 0, 1, 8.08291e-11, 0, 0, 1, 1.14608e-10, 0, 0, 0.999998, 2.10507e-10, 0, 0, 0.999997, 4.99595e-10, 0, 0, 0.999995, 1.39897e-09, 0, 0, 0.999994, 4.19818e-09, 0, 0, 0.999988, 1.27042e-08, 0, 0, 0.999979, 3.75153e-08, 0, 0, 0.999965, 1.06206e-07, 0, 0, 0.999945, 2.85381e-07, 0, 0, 0.999908, 7.23611e-07, 0, 0, 0.999846, 1.7255e-06, 0, 0, 0.999733, 3.86104e-06, 0, 0, 0.999511, 8.08493e-06, 0, 0, 0.998993, 1.56884e-05, 0, 0, 0.997326, 2.65538e-05, 0, 0, 0.989706, 2.06466e-05, 0, 0, 0.981713, 1.30756e-05, 0, 7.0005e-06, 0.973636, 1.06473e-05, 0, 0.000464797, 0.966509, 1.0194e-05, 0, 0.00201743, 0.965149, 1.65881e-05, 0, 0.00497549, 0.962669, 2.49147e-05, 0, 0.00953262, 0.95786, 3.17449e-05, 0, 0.0158211, 0.949334, 2.81045e-05, 0, 0.0239343, 0.941041, 3.03263e-05, 0, 0.0339372, 0.931575, 3.56754e-05, 0, 0.0458738, 0.920102, 3.97075e-05, 0, 0.059772, 0.908002, 3.84886e-05, 0, 0.075645, 0.897269, 4.3027e-05, 0, 0.0934929, 0.884559, 4.79925e-05, 0, 0.113302, 0.869161, 4.8246e-05, 0, 0.135045, 0.853342, 5.09505e-05, 0, 0.158678, 0.837633, 5.42846e-05, 0, 0.184136, 0.820252, 5.54139e-05, 0, 0.211325, 0.801872, 5.81412e-05, 0, 0.240113, 0.782418, 5.85535e-05, 0, 0.270306, 0.7631, 6.10923e-05, 0, 0.301594, 0.742183, 6.13678e-05, 0, 0.333333, 0.721098, 6.27275e-05, 0, 0.365079, 0.699512, 6.29413e-05, 0, 0.396825, 0.677372, 6.36351e-05, 0, 0.428571, 0.655059, 6.33555e-05, 0, 0.460317, 0.632567, 6.36513e-05, 0, 0.492064, 0.609784, 6.28965e-05, 0, 0.52381, 0.587237, 6.25546e-05, 0, 0.555556, 0.564525, 6.15825e-05, 0, 0.587302, 0.542181, 6.05048e-05, 0, 0.619048, 0.520017, 5.96329e-05, 0, 0.650794, 0.498204, 5.81516e-05, 0, 0.68254, 0.476742, 5.69186e-05, 0, 0.714286, 0.455803, 5.53833e-05, 0, 0.746032, 0.435251, 5.37807e-05, 0, 0.777778, 0.415374, 5.22025e-05, 0, 0.809524, 0.395921, 5.03421e-05, 0, 0.84127, 0.377253, 4.88211e-05, 0, 0.873016, 0.359021, 4.68234e-05, 0, 0.904762, 0.341637, 4.53269e-05, 0, 0.936508, 0.3247, 4.33014e-05, 0, 0.968254, 0.308625, 4.18007e-05, 0, 1, 1, 2.86798e-10, 0, 0, 1, 2.86877e-10, 0, 0, 1, 2.88094e-10, 0, 0, 1, 2.93506e-10, 0, 0, 1, 3.09262e-10, 0, 0, 0.999999, 3.48593e-10, 0, 0, 0.999999, 4.44582e-10, 0, 0, 0.999998, 6.88591e-10, 0, 0, 0.999996, 1.34391e-09, 0, 0, 0.999993, 3.17438e-09, 0, 0, 0.999989, 8.35609e-09, 0, 0, 0.999983, 2.28677e-08, 0, 0, 0.999974, 6.23361e-08, 0, 0, 0.999959, 1.65225e-07, 0, 0, 0.999936, 4.19983e-07, 0, 0, 0.999896, 1.01546e-06, 0, 0, 0.99983, 2.32376e-06, 0, 0, 0.999709, 5.0156e-06, 0, 0, 0.999469, 1.0167e-05, 0, 0, 0.998886, 1.90775e-05, 0, 0, 0.996819, 3.00511e-05, 0, 0, 0.988837, 1.85092e-05, 0, 1.68222e-07, 0.982178, 1.34622e-05, 0, 0.000259622, 0.975017, 1.25961e-05, 0, 0.00142595, 0.967101, 1.3507e-05, 0, 0.00382273, 0.964905, 2.05003e-05, 0, 0.00764164, 0.96218, 2.9546e-05, 0, 0.0130121, 0.956821, 3.43738e-05, 0, 0.0200253, 0.948829, 3.05063e-05, 0, 0.0287452, 0.941092, 3.46487e-05, 0, 0.039218, 0.931883, 4.12061e-05, 0, 0.0514748, 0.920211, 4.44651e-05, 0, 0.0655351, 0.907307, 4.31252e-05, 0, 0.0814082, 0.89684, 4.90382e-05, 0, 0.0990939, 0.884119, 5.3334e-05, 0, 0.118583, 0.869148, 5.4114e-05, 0, 0.139856, 0.853377, 5.78536e-05, 0, 0.162882, 0.836753, 5.92285e-05, 0, 0.187615, 0.820063, 6.22787e-05, 0, 0.213991, 0.801694, 6.45492e-05, 0, 0.241918, 0.782116, 6.5353e-05, 0, 0.271267, 0.762673, 6.74344e-05, 0, 0.301847, 0.742133, 6.82788e-05, 0, 0.333333, 0.720779, 6.91959e-05, 0, 0.365079, 0.699386, 6.96817e-05, 0, 0.396826, 0.67732, 6.99583e-05, 0, 0.428572, 0.654888, 6.98447e-05, 0, 0.460318, 0.632499, 6.94063e-05, 0, 0.492064, 0.609825, 6.91612e-05, 0, 0.52381, 0.587287, 6.81576e-05, 0, 0.555556, 0.564743, 6.74138e-05, 0, 0.587302, 0.542409, 6.61617e-05, 0, 0.619048, 0.520282, 6.47785e-05, 0, 0.650794, 0.498506, 6.33836e-05, 0, 0.68254, 0.477102, 6.15905e-05, 0, 0.714286, 0.456167, 6.01013e-05, 0, 0.746032, 0.435728, 5.81457e-05, 0, 0.777778, 0.415809, 5.64215e-05, 0, 0.809524, 0.396517, 5.44997e-05, 0, 0.84127, 0.377737, 5.25061e-05, 0, 0.873016, 0.359698, 5.06831e-05, 0, 0.904762, 0.342164, 4.8568e-05, 0, 0.936508, 0.325417, 4.67826e-05, 0, 0.968254, 0.309186, 4.46736e-05, 0, 1, 1, 1.09018e-09, 0, 0, 1, 1.0904e-09, 0, 0, 1, 1.09393e-09, 0, 0, 1, 1.1095e-09, 0, 0, 1, 1.154e-09, 0, 0, 1, 1.26089e-09, 0, 0, 0.999999, 1.5059e-09, 0, 0, 0.999997, 2.07899e-09, 0, 0, 0.999994, 3.48164e-09, 0, 0, 0.999993, 7.05728e-09, 0, 0, 0.999987, 1.63692e-08, 0, 0, 0.999981, 4.06033e-08, 0, 0, 0.999969, 1.0245e-07, 0, 0, 0.999953, 2.55023e-07, 0, 0, 0.999925, 6.1511e-07, 0, 0, 0.999881, 1.42218e-06, 0, 0, 0.99981, 3.13086e-06, 0, 0, 0.99968, 6.53119e-06, 0, 0, 0.999418, 1.2832e-05, 0, 0, 0.998748, 2.32497e-05, 0, 0, 0.996066, 3.29522e-05, 0, 0, 0.988379, 1.79613e-05, 0, 0.000108799, 0.982567, 1.43715e-05, 0, 0.000921302, 0.976097, 1.48096e-05, 0, 0.00280738, 0.968475, 1.78905e-05, 0, 0.00596622, 0.964606, 2.53921e-05, 0, 0.0105284, 0.961564, 3.48623e-05, 0, 0.0165848, 0.955517, 3.57612e-05, 0, 0.0242, 0.948381, 3.43493e-05, 0, 0.03342, 0.941095, 4.05849e-05, 0, 0.0442777, 0.931923, 4.75394e-05, 0, 0.0567958, 0.91996, 4.84328e-05, 0, 0.0709879, 0.907419, 5.02146e-05, 0, 0.086861, 0.89618, 5.61654e-05, 0, 0.104415, 0.88337, 5.87612e-05, 0, 0.123643, 0.869046, 6.18057e-05, 0, 0.144531, 0.853278, 6.57392e-05, 0, 0.167057, 0.836091, 6.6303e-05, 0, 0.191188, 0.819644, 7.04445e-05, 0, 0.216878, 0.801246, 7.14071e-05, 0, 0.244062, 0.782031, 7.40093e-05, 0, 0.272649, 0.762066, 7.4685e-05, 0, 0.302509, 0.741964, 7.66647e-05, 0, 0.333442, 0.720554, 7.66328e-05, 0, 0.365079, 0.699098, 7.77857e-05, 0, 0.396826, 0.677189, 7.74633e-05, 0, 0.428572, 0.65484, 7.76235e-05, 0, 0.460318, 0.632496, 7.70316e-05, 0, 0.492064, 0.609908, 7.62669e-05, 0, 0.52381, 0.587312, 7.53972e-05, 0, 0.555556, 0.564938, 7.39994e-05, 0, 0.587302, 0.542577, 7.28382e-05, 0, 0.619048, 0.52062, 7.1112e-05, 0, 0.650794, 0.498819, 6.94004e-05, 0, 0.68254, 0.477555, 6.75575e-05, 0, 0.714286, 0.456568, 6.53449e-05, 0, 0.746032, 0.436278, 6.36068e-05, 0, 0.777778, 0.41637, 6.13466e-05, 0, 0.809524, 0.397144, 5.94177e-05, 0, 0.84127, 0.378412, 5.70987e-05, 0, 0.873016, 0.360376, 5.50419e-05, 0, 0.904762, 0.342906, 5.27422e-05, 0, 0.936508, 0.326136, 5.06544e-05, 0, 0.968254, 0.30997, 4.84307e-05, 0, 1, 1, 3.54014e-09, 0, 0, 1, 3.54073e-09, 0, 0, 1, 3.54972e-09, 0, 0, 1, 3.58929e-09, 0, 0, 1, 3.70093e-09, 0, 0, 0.999999, 3.96194e-09, 0, 0, 0.999998, 4.53352e-09, 0, 0, 0.999997, 5.78828e-09, 0, 0, 0.999994, 8.63812e-09, 0, 0, 0.999991, 1.53622e-08, 0, 0, 0.999985, 3.16356e-08, 0, 0, 0.999977, 7.12781e-08, 0, 0, 0.999964, 1.66725e-07, 0, 0, 0.999945, 3.90501e-07, 0, 0, 0.999912, 8.95622e-07, 0, 0, 0.999866, 1.98428e-06, 0, 0, 0.999786, 4.21038e-06, 0, 0, 0.999647, 8.50239e-06, 0, 0, 0.999356, 1.62059e-05, 0, 0, 0.998563, 2.82652e-05, 0, 0, 0.994928, 3.36309e-05, 0, 2.44244e-05, 0.987999, 1.78458e-05, 0, 0.000523891, 0.982893, 1.59162e-05, 0, 0.00194729, 0.977044, 1.78056e-05, 0, 0.00451099, 0.969972, 2.30624e-05, 0, 0.00835132, 0.964237, 3.13922e-05, 0, 0.013561, 0.960791, 4.06145e-05, 0, 0.0202056, 0.954292, 3.72796e-05, 0, 0.0283321, 0.948052, 4.03199e-05, 0, 0.0379739, 0.940938, 4.79537e-05, 0, 0.0491551, 0.931689, 5.45292e-05, 0, 0.0618918, 0.91987, 5.4038e-05, 0, 0.0761941, 0.907665, 5.89909e-05, 0, 0.0920672, 0.895281, 6.42651e-05, 0, 0.109511, 0.882621, 6.59707e-05, 0, 0.12852, 0.86873, 7.09973e-05, 0, 0.149085, 0.853008, 7.42221e-05, 0, 0.171189, 0.835944, 7.61754e-05, 0, 0.194809, 0.818949, 7.97052e-05, 0, 0.21991, 0.800951, 8.12434e-05, 0, 0.246447, 0.781847, 8.38075e-05, 0, 0.274352, 0.761649, 8.4501e-05, 0, 0.303535, 0.74152, 8.60258e-05, 0, 0.333857, 0.720495, 8.66233e-05, 0, 0.365104, 0.698742, 8.68326e-05, 0, 0.396826, 0.677096, 8.7133e-05, 0, 0.428572, 0.654782, 8.63497e-05, 0, 0.460318, 0.632335, 8.60206e-05, 0, 0.492064, 0.610031, 8.49337e-05, 0, 0.52381, 0.587457, 8.38279e-05, 0, 0.555556, 0.56513, 8.2309e-05, 0, 0.587302, 0.542877, 8.03542e-05, 0, 0.619048, 0.5209, 7.86928e-05, 0, 0.650794, 0.499291, 7.65171e-05, 0, 0.68254, 0.477971, 7.44753e-05, 0, 0.714286, 0.457221, 7.2209e-05, 0, 0.746032, 0.436803, 6.97448e-05, 0, 0.777778, 0.417083, 6.75333e-05, 0, 0.809524, 0.397749, 6.48058e-05, 0, 0.84127, 0.379177, 6.25759e-05, 0, 0.873016, 0.361061, 5.98584e-05, 0, 0.904762, 0.343713, 5.75797e-05, 0, 0.936508, 0.326894, 5.49999e-05, 0, 0.968254, 0.310816, 5.27482e-05, 0, 1, 1, 1.0153e-08, 0, 0, 1, 1.01544e-08, 0, 0, 1, 1.01751e-08, 0, 0, 1, 1.02662e-08, 0, 0, 1, 1.0521e-08, 0, 0, 0.999999, 1.11049e-08, 0, 0, 0.999999, 1.23408e-08, 0, 0, 0.999996, 1.4924e-08, 0, 0, 0.999992, 2.04471e-08, 0, 0, 0.999989, 3.26539e-08, 0, 0, 0.99998, 6.03559e-08, 0, 0, 0.999971, 1.23936e-07, 0, 0, 0.999955, 2.69058e-07, 0, 0, 0.999933, 5.93604e-07, 0, 0, 0.999901, 1.29633e-06, 0, 0, 0.999847, 2.75621e-06, 0, 0, 0.999761, 5.64494e-06, 0, 0, 0.999607, 1.10485e-05, 0, 0, 0.999282, 2.04388e-05, 0, 0, 0.99831, 3.41084e-05, 0, 2.2038e-07, 0.993288, 2.94949e-05, 0, 0.000242388, 0.987855, 1.92736e-05, 0, 0.0012503, 0.983167, 1.82383e-05, 0, 0.0032745, 0.977908, 2.18633e-05, 0, 0.00646321, 0.971194, 2.90662e-05, 0, 0.0109133, 0.963867, 3.86401e-05, 0, 0.0166927, 0.95982, 4.62827e-05, 0, 0.0238494, 0.953497, 4.20705e-05, 0, 0.0324178, 0.947621, 4.77743e-05, 0, 0.0424225, 0.940611, 5.68258e-05, 0, 0.0538808, 0.931174, 6.18061e-05, 0, 0.0668047, 0.919919, 6.27098e-05, 0, 0.0812014, 0.907856, 6.94714e-05, 0, 0.0970745, 0.894509, 7.35008e-05, 0, 0.114424, 0.881954, 7.63369e-05, 0, 0.133246, 0.868309, 8.21896e-05, 0, 0.153534, 0.852511, 8.3769e-05, 0, 0.175275, 0.835821, 8.81615e-05, 0, 0.198453, 0.817981, 8.96368e-05, 0, 0.223042, 0.800504, 9.30906e-05, 0, 0.249009, 0.78141, 9.45056e-05, 0, 0.276304, 0.761427, 9.63605e-05, 0, 0.304862, 0.74094, 9.68088e-05, 0, 0.334584, 0.720233, 9.81481e-05, 0, 0.365322, 0.698592, 9.79122e-05, 0, 0.396826, 0.676763, 9.81057e-05, 0, 0.428571, 0.654808, 9.73956e-05, 0, 0.460318, 0.632326, 9.62619e-05, 0, 0.492064, 0.610049, 9.52996e-05, 0, 0.52381, 0.58763, 9.33334e-05, 0, 0.555556, 0.565261, 9.17573e-05, 0, 0.587302, 0.543244, 8.96636e-05, 0, 0.619048, 0.521273, 8.73304e-05, 0, 0.650794, 0.499818, 8.52648e-05, 0, 0.68254, 0.478536, 8.23961e-05, 0, 0.714286, 0.457826, 7.9939e-05, 0, 0.746032, 0.437549, 7.7126e-05, 0, 0.777778, 0.41776, 7.43043e-05, 0, 0.809524, 0.39863, 7.16426e-05, 0, 0.84127, 0.379954, 6.86456e-05, 0, 0.873016, 0.362025, 6.60514e-05, 0, 0.904762, 0.344581, 6.30755e-05, 0, 0.936508, 0.327909, 6.05439e-05, 0, 0.968254, 0.311736, 5.76345e-05, 0, 1, 1, 2.63344e-08, 0, 0, 1, 2.63373e-08, 0, 0, 1, 2.63815e-08, 0, 0, 1, 2.65753e-08, 0, 0, 1, 2.71132e-08, 0, 0, 0.999999, 2.83279e-08, 0, 0, 0.999997, 3.0833e-08, 0, 0, 0.999995, 3.58711e-08, 0, 0, 0.999992, 4.61266e-08, 0, 0, 0.999985, 6.7574e-08, 0, 0, 0.999977, 1.1358e-07, 0, 0, 0.999966, 2.13657e-07, 0, 0, 0.999948, 4.31151e-07, 0, 0, 0.999923, 8.96656e-07, 0, 0, 0.999884, 1.86603e-06, 0, 0, 0.999826, 3.81115e-06, 0, 0, 0.999732, 7.54184e-06, 0, 0, 0.999561, 1.43192e-05, 0, 0, 0.999191, 2.57061e-05, 0, 0, 0.997955, 4.05724e-05, 0, 7.44132e-05, 0.992228, 2.76537e-05, 0, 0.000716477, 0.987638, 2.08885e-05, 0, 0.0022524, 0.983395, 2.15226e-05, 0, 0.00484816, 0.978614, 2.70795e-05, 0, 0.00860962, 0.972389, 3.65282e-05, 0, 0.0136083, 0.964392, 4.74747e-05, 0, 0.0198941, 0.95861, 5.09141e-05, 0, 0.0275023, 0.952806, 4.8963e-05, 0, 0.0364584, 0.94712, 5.71119e-05, 0, 0.04678, 0.940104, 6.71704e-05, 0, 0.0584799, 0.930398, 6.87586e-05, 0, 0.0715665, 0.919866, 7.38161e-05, 0, 0.086045, 0.907853, 8.13235e-05, 0, 0.101918, 0.894078, 8.34582e-05, 0, 0.119186, 0.881177, 8.92093e-05, 0, 0.137845, 0.867575, 9.44548e-05, 0, 0.157891, 0.852107, 9.69607e-05, 0, 0.179316, 0.835502, 0.000101456, 0, 0.202106, 0.81756, 0.000103256, 0, 0.226243, 0.79984, 0.000106954, 0, 0.251704, 0.780998, 0.000108066, 0, 0.278451, 0.761132, 0.000110111, 0, 0.306436, 0.740429, 0.000110459, 0, 0.335586, 0.719836, 0.000111219, 0, 0.365796, 0.698467, 0.00011145, 0, 0.3969, 0.676446, 0.000110393, 0, 0.428571, 0.654635, 0.000110035, 0, 0.460318, 0.632411, 0.000108548, 0, 0.492064, 0.609986, 0.000106963, 0, 0.52381, 0.587872, 0.000105238, 0, 0.555556, 0.565528, 0.000102665, 0, 0.587302, 0.543563, 0.000100543, 0, 0.619048, 0.52176, 9.76182e-05, 0, 0.650794, 0.500188, 9.47099e-05, 0, 0.68254, 0.479204, 9.19929e-05, 0, 0.714286, 0.458413, 8.86139e-05, 0, 0.746032, 0.438314, 8.57839e-05, 0, 0.777778, 0.418573, 8.2411e-05, 0, 0.809524, 0.39947, 7.92211e-05, 0, 0.84127, 0.380892, 7.59546e-05, 0, 0.873016, 0.362953, 7.27571e-05, 0, 0.904762, 0.345601, 6.95738e-05, 0, 0.936508, 0.328895, 6.64907e-05, 0, 0.968254, 0.312808, 6.34277e-05, 0, 1, 1, 6.28647e-08, 0, 0, 1, 6.28705e-08, 0, 0, 1, 6.29587e-08, 0, 0, 1, 6.33441e-08, 0, 0, 0.999999, 6.44087e-08, 0, 0, 0.999998, 6.67856e-08, 0, 0, 0.999997, 7.15889e-08, 0, 0, 0.999995, 8.09577e-08, 0, 0, 0.999989, 9.92764e-08, 0, 0, 0.999983, 1.35834e-07, 0, 0, 0.999974, 2.10482e-07, 0, 0, 0.999959, 3.65215e-07, 0, 0, 0.999939, 6.86693e-07, 0, 0, 0.999911, 1.3472e-06, 0, 0, 0.999868, 2.6731e-06, 0, 0, 0.999804, 5.24756e-06, 0, 0, 0.9997, 1.00403e-05, 0, 0, 0.99951, 1.85019e-05, 0, 0, 0.999078, 3.22036e-05, 0, 6.20676e-06, 0.997428, 4.70002e-05, 0, 0.000341552, 0.99162, 2.87123e-05, 0, 0.00143727, 0.987479, 2.34706e-05, 0, 0.00349201, 0.983582, 2.60083e-05, 0, 0.0066242, 0.979186, 3.37927e-05, 0, 0.0109113, 0.97325, 4.54689e-05, 0, 0.0164064, 0.965221, 5.73759e-05, 0, 0.0231463, 0.957262, 5.44114e-05, 0, 0.0311571, 0.952211, 5.87006e-05, 0, 0.0404572, 0.946631, 6.92256e-05, 0, 0.0510592, 0.939391, 7.87819e-05, 0, 0.0629723, 0.929795, 7.92368e-05, 0, 0.0762025, 0.91965, 8.75075e-05, 0, 0.090753, 0.907737, 9.50903e-05, 0, 0.106626, 0.893899, 9.72963e-05, 0, 0.123822, 0.880239, 0.00010459, 0, 0.142337, 0.866562, 0.000107689, 0, 0.16217, 0.85164, 0.000113081, 0, 0.183314, 0.835021, 0.000116636, 0, 0.20576, 0.817311, 0.000120074, 0, 0.229496, 0.798845, 0.000121921, 0, 0.254502, 0.780479, 0.00012475, 0, 0.280753, 0.760694, 0.000125255, 0, 0.308212, 0.740142, 0.000126719, 0, 0.336825, 0.719248, 0.00012636, 0, 0.366517, 0.698209, 0.000126712, 0, 0.397167, 0.676398, 0.000125769, 0, 0.428578, 0.654378, 0.000124432, 0, 0.460318, 0.632484, 0.000123272, 0, 0.492064, 0.610113, 0.00012085, 0, 0.52381, 0.587931, 0.000118411, 0, 0.555556, 0.565872, 0.00011569, 0, 0.587302, 0.543814, 0.000112521, 0, 0.619048, 0.522265, 0.000109737, 0, 0.650794, 0.500835, 0.000106228, 0, 0.68254, 0.479818, 0.000102591, 0, 0.714286, 0.459258, 9.91288e-05, 0, 0.746032, 0.439061, 9.52325e-05, 0, 0.777778, 0.419552, 9.1895e-05, 0, 0.809524, 0.400399, 8.79051e-05, 0, 0.84127, 0.381976, 8.44775e-05, 0, 0.873016, 0.364009, 8.06316e-05, 0, 0.904762, 0.346761, 7.71848e-05, 0, 0.936508, 0.330049, 7.35429e-05, 0, 0.968254, 0.314018, 7.02103e-05, 0, 1, 1, 1.39968e-07, 0, 0, 1, 1.39979e-07, 0, 0, 1, 1.40145e-07, 0, 0, 1, 1.4087e-07, 0, 0, 0.999999, 1.42865e-07, 0, 0, 0.999998, 1.47279e-07, 0, 0, 0.999997, 1.56057e-07, 0, 0, 0.999992, 1.7276e-07, 0, 0, 0.999989, 2.04352e-07, 0, 0, 0.99998, 2.6494e-07, 0, 0, 0.999969, 3.83435e-07, 0, 0, 0.999953, 6.18641e-07, 0, 0, 0.999929, 1.08755e-06, 0, 0, 0.999898, 2.01497e-06, 0, 0, 0.999849, 3.81346e-06, 0, 0, 0.999778, 7.19815e-06, 0, 0, 0.999661, 1.33215e-05, 0, 0, 0.999451, 2.38313e-05, 0, 0, 0.998936, 4.01343e-05, 0, 0.000113724, 0.99662, 5.17346e-05, 0, 0.000820171, 0.991094, 3.04323e-05, 0, 0.00238143, 0.987487, 2.81757e-05, 0, 0.00493527, 0.983731, 3.20048e-05, 0, 0.00856859, 0.979647, 4.23905e-05, 0, 0.0133393, 0.973837, 5.62935e-05, 0, 0.0192863, 0.96584, 6.77442e-05, 0, 0.0264369, 0.956309, 6.23073e-05, 0, 0.03481, 0.951523, 7.04131e-05, 0, 0.0444184, 0.946003, 8.36594e-05, 0, 0.0552713, 0.938454, 9.11736e-05, 0, 0.0673749, 0.929279, 9.38264e-05, 0, 0.0807329, 0.919239, 0.000103754, 0, 0.0953479, 0.907293, 0.000109928, 0, 0.111221, 0.893936, 0.000115257, 0, 0.128352, 0.879674, 0.000122265, 0, 0.14674, 0.865668, 0.000125733, 0, 0.166382, 0.850998, 0.000132305, 0, 0.187276, 0.834498, 0.000134844, 0, 0.209413, 0.816903, 0.000139276, 0, 0.232786, 0.798235, 0.000140984, 0, 0.257382, 0.779724, 0.00014378, 0, 0.283181, 0.760251, 0.000144623, 0, 0.310156, 0.739808, 0.000145228, 0, 0.338269, 0.718762, 0.00014539, 0, 0.367461, 0.697815, 0.000144432, 0, 0.397646, 0.67631, 0.000143893, 0, 0.428685, 0.654278, 0.000141846, 0, 0.460318, 0.632347, 0.00013935, 0, 0.492064, 0.610296, 0.000137138, 0, 0.52381, 0.588039, 0.000133806, 0, 0.555556, 0.566218, 0.000130755, 0, 0.587302, 0.544346, 0.000127128, 0, 0.619048, 0.522701, 0.000123002, 0, 0.650794, 0.501542, 0.000119443, 0, 0.68254, 0.480508, 0.000115055, 0, 0.714286, 0.460092, 0.000111032, 0, 0.746032, 0.440021, 0.000106635, 0, 0.777778, 0.420446, 0.000102162, 0, 0.809524, 0.401512, 9.8184e-05, 0, 0.84127, 0.38299, 9.36497e-05, 0, 0.873016, 0.365232, 8.9813e-05, 0, 0.904762, 0.347865, 8.53073e-05, 0, 0.936508, 0.331342, 8.17068e-05, 0, 0.968254, 0.315202, 7.73818e-05, 0, 1, 1, 2.9368e-07, 0, 0, 1, 2.937e-07, 0, 0, 1, 2.93998e-07, 0, 0, 1, 2.95298e-07, 0, 0, 0.999999, 2.98865e-07, 0, 0, 0.999998, 3.067e-07, 0, 0, 0.999995, 3.22082e-07, 0, 0, 0.999992, 3.50767e-07, 0, 0, 0.999986, 4.03538e-07, 0, 0, 0.999976, 5.01372e-07, 0, 0, 0.999964, 6.8562e-07, 0, 0, 0.999945, 1.0374e-06, 0, 0, 0.999919, 1.71269e-06, 0, 0, 0.999882, 3.00175e-06, 0, 0, 0.999829, 5.42144e-06, 0, 0, 0.999749, 9.84182e-06, 0, 0, 0.99962, 1.76213e-05, 0, 0, 0.999382, 3.05995e-05, 0, 1.38418e-05, 0.998751, 4.96686e-05, 0, 0.000389844, 0.995344, 5.10733e-05, 0, 0.00150343, 0.990768, 3.45829e-05, 0, 0.00352451, 0.987464, 3.42841e-05, 0, 0.00655379, 0.983846, 3.99072e-05, 0, 0.0106554, 0.980007, 5.33219e-05, 0, 0.0158723, 0.974494, 6.96992e-05, 0, 0.0222333, 0.96622, 7.76754e-05, 0, 0.029758, 0.956273, 7.47718e-05, 0, 0.0384596, 0.950952, 8.64611e-05, 0, 0.0483473, 0.945215, 0.000100464, 0, 0.0594266, 0.937287, 0.000103729, 0, 0.0717019, 0.928649, 0.000111665, 0, 0.0851752, 0.918791, 0.00012353, 0, 0.0998479, 0.906685, 0.000127115, 0, 0.115721, 0.893706, 0.00013628, 0, 0.132794, 0.879248, 0.000142427, 0, 0.151067, 0.864685, 0.000148091, 0, 0.170538, 0.850032, 0.000153517, 0, 0.191204, 0.833853, 0.000157322, 0, 0.213063, 0.816353, 0.000161086, 0, 0.236107, 0.797834, 0.000164111, 0, 0.260329, 0.778831, 0.000165446, 0, 0.285714, 0.759756, 0.000167492, 0, 0.312243, 0.739419, 0.000166928, 0, 0.339887, 0.718491, 0.000167, 0, 0.368604, 0.697392, 0.000165674, 0, 0.398329, 0.676102, 0.000163815, 0, 0.428961, 0.654243, 0.000162003, 0, 0.460331, 0.632176, 0.000158831, 0, 0.492064, 0.610407, 0.000155463, 0, 0.52381, 0.588394, 0.000152062, 0, 0.555556, 0.56645, 0.000147665, 0, 0.587302, 0.5449, 0.00014375, 0, 0.619048, 0.523276, 0.000138905, 0, 0.650794, 0.502179, 0.000134189, 0, 0.68254, 0.481359, 0.000129392, 0, 0.714286, 0.46092, 0.000124556, 0, 0.746032, 0.441084, 0.00011957, 0, 0.777778, 0.421517, 0.000114652, 0, 0.809524, 0.402721, 0.000109688, 0, 0.84127, 0.384222, 0.000104667, 0, 0.873016, 0.366534, 9.99633e-05, 0, 0.904762, 0.349205, 9.50177e-05, 0, 0.936508, 0.332702, 9.07301e-05, 0, 0.968254, 0.316599, 8.59769e-05, 0, 1, 1, 5.85473e-07, 0, 0, 1, 5.85507e-07, 0, 0, 1, 5.8602e-07, 0, 0, 0.999999, 5.88259e-07, 0, 0, 0.999999, 5.94381e-07, 0, 0, 0.999998, 6.07754e-07, 0, 0, 0.999995, 6.33729e-07, 0, 0, 0.99999, 6.8137e-07, 0, 0, 0.999984, 7.67003e-07, 0, 0, 0.999973, 9.21212e-07, 0, 0, 0.999959, 1.20218e-06, 0, 0, 0.999936, 1.72024e-06, 0, 0, 0.999907, 2.68088e-06, 0, 0, 0.999866, 4.45512e-06, 0, 0, 0.999806, 7.68481e-06, 0, 0, 0.999716, 1.342e-05, 0, 0, 0.999576, 2.32473e-05, 0, 0, 0.9993, 3.91694e-05, 0, 0.000129917, 0.998498, 6.08429e-05, 0, 0.000845035, 0.994132, 4.89743e-05, 0, 0.00237616, 0.99031, 3.84644e-05, 0, 0.00484456, 0.987409, 4.21768e-05, 0, 0.00832472, 0.983981, 5.04854e-05, 0, 0.0128643, 0.980268, 6.71028e-05, 0, 0.0184947, 0.974875, 8.52749e-05, 0, 0.025237, 0.966063, 8.5531e-05, 0, 0.0331046, 0.956779, 9.00588e-05, 0, 0.0421067, 0.950259, 0.00010577, 0, 0.0522487, 0.944239, 0.000119458, 0, 0.0635343, 0.936341, 0.000122164, 0, 0.0759654, 0.928047, 0.000134929, 0, 0.0895434, 0.918065, 0.000145544, 0, 0.104269, 0.906267, 0.000150531, 0, 0.120142, 0.893419, 0.000161652, 0, 0.137163, 0.878758, 0.00016593, 0, 0.15533, 0.863699, 0.000174014, 0, 0.174645, 0.848876, 0.000177877, 0, 0.195106, 0.833032, 0.000184049, 0, 0.21671, 0.815557, 0.000186088, 0, 0.239454, 0.797323, 0.00019054, 0, 0.263332, 0.778124, 0.000191765, 0, 0.288336, 0.758929, 0.000192535, 0, 0.314451, 0.738979, 0.000192688, 0, 0.341658, 0.718213, 0.000191522, 0, 0.369924, 0.696947, 0.000190491, 0, 0.399202, 0.675807, 0.000187913, 0, 0.429416, 0.654147, 0.000184451, 0, 0.460447, 0.63229, 0.000181442, 0, 0.492064, 0.610499, 0.000177139, 0, 0.523809, 0.588747, 0.000172596, 0, 0.555555, 0.566783, 0.000167457, 0, 0.587301, 0.545359, 0.000162518, 0, 0.619048, 0.523984, 0.000156818, 0, 0.650794, 0.502917, 0.000151884, 0, 0.68254, 0.482294, 0.000145514, 0, 0.714286, 0.461945, 0.000140199, 0, 0.746032, 0.442133, 0.000134101, 0, 0.777778, 0.422705, 0.000128374, 0, 0.809524, 0.403916, 0.000122996, 0, 0.84127, 0.38554, 0.000116808, 0, 0.873016, 0.367909, 0.000111973, 0, 0.904762, 0.350651, 0.000105938, 0, 0.936508, 0.334208, 0.000101355, 0, 0.968254, 0.318123, 9.57629e-05, 0, 1, 1, 1.11633e-06, 0, 0, 1, 1.11639e-06, 0, 0, 1, 1.11725e-06, 0, 0, 1, 1.12096e-06, 0, 0, 0.999999, 1.1311e-06, 0, 0, 0.999997, 1.15315e-06, 0, 0, 0.999995, 1.1956e-06, 0, 0, 0.999989, 1.27239e-06, 0, 0, 0.999981, 1.40772e-06, 0, 0, 0.999969, 1.64541e-06, 0, 0, 0.999952, 2.06607e-06, 0, 0, 0.999928, 2.81783e-06, 0, 0, 0.999895, 4.16835e-06, 0, 0, 0.999848, 6.58728e-06, 0, 0, 0.999781, 1.08648e-05, 0, 0, 0.999682, 1.82579e-05, 0, 0, 0.999523, 3.06003e-05, 0, 1.59122e-05, 0.999205, 4.99862e-05, 0, 0.000391184, 0.998131, 7.3306e-05, 0, 0.00147534, 0.993334, 5.13229e-05, 0, 0.0034227, 0.99016, 4.67783e-05, 0, 0.00632232, 0.987321, 5.23413e-05, 0, 0.0102295, 0.984099, 6.4267e-05, 0, 0.0151794, 0.980432, 8.43042e-05, 0, 0.0211947, 0.974976, 0.000102819, 0, 0.0282899, 0.966429, 9.96234e-05, 0, 0.0364739, 0.957633, 0.000111074, 0, 0.0457522, 0.949422, 0.000128644, 0, 0.0561278, 0.943045, 0.000140076, 0, 0.0676023, 0.935448, 0.000146349, 0, 0.0801762, 0.927225, 0.000161854, 0, 0.0938499, 0.917033, 0.000169135, 0, 0.108623, 0.905762, 0.000179987, 0, 0.124496, 0.892879, 0.000189832, 0, 0.141469, 0.878435, 0.000195881, 0, 0.159541, 0.863114, 0.00020466, 0, 0.178713, 0.84776, 0.000209473, 0, 0.198985, 0.832084, 0.000214861, 0, 0.220355, 0.814915, 0.000217695, 0, 0.242823, 0.796711, 0.000220313, 0, 0.266385, 0.777603, 0.00022313, 0, 0.291036, 0.757991, 0.000222471, 0, 0.316767, 0.738371, 0.000222869, 0, 0.343563, 0.717872, 0.000221243, 0, 0.371402, 0.696619, 0.000218089, 0, 0.400248, 0.675379, 0.00021562, 0, 0.430047, 0.65411, 0.00021169, 0, 0.460709, 0.63241, 0.000206947, 0, 0.492079, 0.61046, 0.000201709, 0, 0.52381, 0.58903, 0.000196753, 0, 0.555556, 0.567267, 0.000189637, 0, 0.587302, 0.545886, 0.000184735, 0, 0.619048, 0.524714, 0.000177257, 0, 0.650794, 0.503789, 0.000171424, 0, 0.68254, 0.483204, 0.000164688, 0, 0.714286, 0.462976, 0.000157172, 0, 0.746032, 0.443294, 0.000151341, 0, 0.777778, 0.423988, 0.000143737, 0, 0.809524, 0.405325, 0.000138098, 0, 0.84127, 0.386981, 0.000130698, 0, 0.873016, 0.369436, 0.000125276, 0, 0.904762, 0.35219, 0.000118349, 0, 0.936508, 0.335804, 0.00011312, 0, 0.968254, 0.319749, 0.000106687, 0, 1, 1, 2.04685e-06, 0, 0, 1, 2.04694e-06, 0, 0, 1, 2.04831e-06, 0, 0, 0.999999, 2.05428e-06, 0, 0, 0.999999, 2.07056e-06, 0, 0, 0.999997, 2.10581e-06, 0, 0, 0.999993, 2.1732e-06, 0, 0, 0.999987, 2.29365e-06, 0, 0, 0.999979, 2.50243e-06, 0, 0, 0.999965, 2.86127e-06, 0, 0, 0.999947, 3.48028e-06, 0, 0, 0.999918, 4.55588e-06, 0, 0, 0.999881, 6.43303e-06, 0, 0, 0.999828, 9.70064e-06, 0, 0, 0.999753, 1.53233e-05, 0, 0, 0.999642, 2.4793e-05, 0, 0, 0.999464, 4.02032e-05, 0, 0.000122947, 0.999089, 6.35852e-05, 0, 0.000807414, 0.997567, 8.57026e-05, 0, 0.00227206, 0.992903, 5.94912e-05, 0, 0.00462812, 0.990011, 5.78515e-05, 0, 0.00794162, 0.987192, 6.5399e-05, 0, 0.0122534, 0.98418, 8.19675e-05, 0, 0.0175888, 0.980491, 0.000105514, 0, 0.0239635, 0.974779, 0.000121532, 0, 0.031387, 0.96675, 0.000119144, 0, 0.0398644, 0.958248, 0.000136125, 0, 0.0493982, 0.948884, 0.000155408, 0, 0.0599896, 0.941673, 0.000162281, 0, 0.0716382, 0.934521, 0.000176754, 0, 0.0843437, 0.926205, 0.000192873, 0, 0.0981056, 0.916089, 0.000200038, 0, 0.112923, 0.904963, 0.000213624, 0, 0.128796, 0.892089, 0.000221834, 0, 0.145725, 0.878028, 0.000232619, 0, 0.163709, 0.86249, 0.000238632, 0, 0.182749, 0.846587, 0.000247002, 0, 0.202847, 0.830988, 0.000250702, 0, 0.224001, 0.814165, 0.000255562, 0, 0.246214, 0.796135, 0.000257505, 0, 0.269482, 0.777052, 0.000258625, 0, 0.293805, 0.757201, 0.000258398, 0, 0.319176, 0.737655, 0.000256714, 0, 0.345587, 0.717477, 0.000255187, 0, 0.373021, 0.696433, 0.000251792, 0, 0.401454, 0.675084, 0.000247223, 0, 0.430844, 0.653907, 0.000242213, 0, 0.461125, 0.632561, 0.000237397, 0, 0.492187, 0.610658, 0.000229313, 0, 0.52381, 0.589322, 0.000224402, 0, 0.555556, 0.567857, 0.000216116, 0, 0.587302, 0.54652, 0.000209124, 0, 0.619048, 0.525433, 0.000201601, 0, 0.650794, 0.504679, 0.000192957, 0, 0.68254, 0.484203, 0.000186052, 0, 0.714286, 0.464203, 0.000177672, 0, 0.746032, 0.444549, 0.000170005, 0, 0.777778, 0.425346, 0.000162401, 0, 0.809524, 0.406706, 0.0001544, 0, 0.84127, 0.388576, 0.000147437, 0, 0.873016, 0.37094, 0.000139493, 0, 0.904762, 0.353996, 0.000133219, 0, 0.936508, 0.337391, 0.000125573, 0, 0.968254, 0.321648, 0.000119867, 0, 1, 1, 3.62511e-06, 0, 0, 1, 3.62525e-06, 0, 0, 1, 3.62739e-06, 0, 0, 0.999999, 3.63673e-06, 0, 0, 0.999998, 3.66214e-06, 0, 0, 0.999996, 3.71698e-06, 0, 0, 0.999992, 3.82116e-06, 0, 0, 0.999986, 4.00554e-06, 0, 0, 0.999976, 4.32058e-06, 0, 0, 0.999961, 4.85194e-06, 0, 0, 0.999938, 5.74808e-06, 0, 0, 0.999908, 7.26643e-06, 0, 0, 0.999865, 9.84707e-06, 0, 0, 0.999807, 1.42217e-05, 0, 0, 0.999723, 2.15581e-05, 0, 0, 0.999602, 3.36114e-05, 0, 1.19113e-05, 0.999398, 5.27353e-05, 0, 0.000355813, 0.998946, 8.05809e-05, 0, 0.00137768, 0.996647, 9.42908e-05, 0, 0.00322469, 0.992298, 6.68733e-05, 0, 0.00597897, 0.989802, 7.16564e-05, 0, 0.00968903, 0.987019, 8.21355e-05, 0, 0.0143845, 0.984219, 0.000104555, 0, 0.0200831, 0.980425, 0.000131245, 0, 0.0267948, 0.974241, 0.000139613, 0, 0.034525, 0.967006, 0.000145931, 0, 0.0432757, 0.95893, 0.000167153, 0, 0.0530471, 0.949157, 0.000188146, 0, 0.0638386, 0.94062, 0.000194625, 0, 0.0756487, 0.933509, 0.000213721, 0, 0.0884762, 0.925088, 0.000229616, 0, 0.10232, 0.915178, 0.000239638, 0, 0.117178, 0.904093, 0.000254814, 0, 0.133051, 0.891337, 0.000263685, 0, 0.149939, 0.877326, 0.000274789, 0, 0.167841, 0.861794, 0.000280534, 0, 0.18676, 0.845758, 0.000289534, 0, 0.206696, 0.829792, 0.000294446, 0, 0.22765, 0.813037, 0.000296877, 0, 0.249625, 0.795285, 0.000300217, 0, 0.27262, 0.776323, 0.000299826, 0, 0.296636, 0.756673, 0.000299787, 0, 0.321671, 0.736856, 0.000297867, 0, 0.347718, 0.716883, 0.000294052, 0, 0.374768, 0.696089, 0.000289462, 0, 0.402804, 0.67505, 0.000285212, 0, 0.431796, 0.653509, 0.00027653, 0, 0.461695, 0.63258, 0.000271759, 0, 0.49242, 0.61104, 0.000262811, 0, 0.523822, 0.589567, 0.000255151, 0, 0.555556, 0.568322, 0.000246434, 0, 0.587302, 0.547235, 0.000237061, 0, 0.619048, 0.52616, 0.000228343, 0, 0.650794, 0.505716, 0.000219236, 0, 0.68254, 0.485274, 0.000209595, 0, 0.714286, 0.465411, 0.000201011, 0, 0.746032, 0.445854, 0.00019109, 0, 0.777778, 0.426911, 0.000182897, 0, 0.809524, 0.408222, 0.000173569, 0, 0.84127, 0.390307, 0.000165496, 0, 0.873016, 0.372624, 0.000156799, 0, 0.904762, 0.355804, 0.00014917, 0, 0.936508, 0.33924, 0.000140907, 0, 0.968254, 0.323534, 0.000134062, 0, 1, 1, 6.22487e-06, 0, 0, 1, 6.2251e-06, 0, 0, 1, 6.22837e-06, 0, 0, 0.999999, 6.24259e-06, 0, 0, 0.999998, 6.28127e-06, 0, 0, 0.999996, 6.36451e-06, 0, 0, 0.999991, 6.5218e-06, 0, 0, 0.999984, 6.79782e-06, 0, 0, 0.999973, 7.26361e-06, 0, 0, 0.999955, 8.03644e-06, 0, 0, 0.999931, 9.31397e-06, 0, 0, 0.999896, 1.14299e-05, 0, 0, 0.999847, 1.49402e-05, 0, 0, 0.999784, 2.07461e-05, 0, 0, 0.999692, 3.02493e-05, 0, 0, 0.999554, 4.54957e-05, 0, 9.97275e-05, 0.999326, 6.90762e-05, 0, 0.000724813, 0.998757, 0.000101605, 0, 0.0020972, 0.995367, 9.58745e-05, 0, 0.00432324, 0.99209, 8.32808e-05, 0, 0.00746347, 0.989517, 8.87601e-05, 0, 0.0115534, 0.987008, 0.00010564, 0, 0.0166134, 0.98421, 0.000133179, 0, 0.0226552, 0.98021, 0.000161746, 0, 0.0296838, 0.973676, 0.000161821, 0, 0.0377016, 0.967052, 0.000178635, 0, 0.0467079, 0.959385, 0.000206765, 0, 0.0567013, 0.949461, 0.00022476, 0, 0.0676796, 0.939578, 0.00023574, 0, 0.0796403, 0.932416, 0.00025893, 0, 0.0925812, 0.923759, 0.000271228, 0, 0.106501, 0.914223, 0.000289165, 0, 0.121397, 0.902942, 0.000301156, 0, 0.13727, 0.890419, 0.000313852, 0, 0.15412, 0.876639, 0.000324408, 0, 0.171946, 0.861316, 0.00033249, 0, 0.190751, 0.84496, 0.000338497, 0, 0.210537, 0.828427, 0.000345861, 0, 0.231305, 0.811871, 0.000347863, 0, 0.253057, 0.794397, 0.000350225, 0, 0.275797, 0.775726, 0.000349915, 0, 0.299525, 0.75617, 0.000347297, 0, 0.324242, 0.736091, 0.000344232, 0, 0.349947, 0.716213, 0.000340835, 0, 0.376633, 0.695736, 0.000332369, 0, 0.404289, 0.674961, 0.000327943, 0, 0.432895, 0.653518, 0.000318533, 0, 0.462415, 0.632574, 0.000310391, 0, 0.492788, 0.61134, 0.000300755, 0, 0.523909, 0.590017, 0.000290506, 0, 0.555556, 0.568752, 0.000280446, 0, 0.587302, 0.548061, 0.000269902, 0, 0.619048, 0.52711, 0.000258815, 0, 0.650794, 0.506682, 0.000248481, 0, 0.68254, 0.486524, 0.000237141, 0, 0.714286, 0.466812, 0.000226872, 0, 0.746032, 0.44732, 0.000216037, 0, 0.777778, 0.428473, 0.000205629, 0, 0.809524, 0.409921, 0.000195691, 0, 0.84127, 0.392028, 0.000185457, 0, 0.873016, 0.374606, 0.000176436, 0, 0.904762, 0.357601, 0.000166508, 0, 0.936508, 0.341348, 0.000158385, 0, 0.968254, 0.32542, 0.000149203, 0, 1, 1, 1.03967e-05, 0, 0, 1, 1.0397e-05, 0, 0, 1, 1.04019e-05, 0, 0, 0.999999, 1.04231e-05, 0, 0, 0.999998, 1.04806e-05, 0, 0, 0.999995, 1.06042e-05, 0, 0, 0.999991, 1.08366e-05, 0, 0, 0.999982, 1.12415e-05, 0, 0, 0.999968, 1.19174e-05, 0, 0, 0.99995, 1.30227e-05, 0, 0, 0.999922, 1.48176e-05, 0, 0, 0.999884, 1.77303e-05, 0, 0, 0.99983, 2.24564e-05, 0, 0, 0.999758, 3.00966e-05, 0, 0, 0.999654, 4.23193e-05, 0, 5.49083e-06, 0.999503, 6.14848e-05, 0, 0.000296087, 0.999237, 9.03576e-05, 0, 0.00123144, 0.998491, 0.0001271, 0, 0.00295954, 0.994594, 0.000107754, 0, 0.00555829, 0.99178, 0.000103025, 0, 0.00907209, 0.989265, 0.00011154, 0, 0.0135257, 0.986998, 0.000136296, 0, 0.0189327, 0.984137, 0.000169154, 0, 0.0252993, 0.979798, 0.000196671, 0, 0.0326272, 0.97337, 0.000196678, 0, 0.0409157, 0.967239, 0.000223121, 0, 0.0501623, 0.959543, 0.000253809, 0, 0.0603638, 0.949466, 0.000265972, 0, 0.0715171, 0.939074, 0.000288372, 0, 0.0836187, 0.931118, 0.000310983, 0, 0.0966657, 0.922525, 0.000325561, 0, 0.110656, 0.912983, 0.000345725, 0, 0.125588, 0.901617, 0.0003556, 0, 0.141461, 0.889487, 0.000374012, 0, 0.158275, 0.875787, 0.000383445, 0, 0.176031, 0.860654, 0.000393972, 0, 0.19473, 0.844417, 0.000400311, 0, 0.214374, 0.82741, 0.000405004, 0, 0.234967, 0.810545, 0.000407378, 0, 0.256512, 0.793312, 0.000407351, 0, 0.279011, 0.774847, 0.000406563, 0, 0.302468, 0.755621, 0.000404903, 0, 0.326887, 0.735511, 0.000397486, 0, 0.352266, 0.715435, 0.00039357, 0, 0.378605, 0.695403, 0.000384739, 0, 0.405897, 0.674681, 0.000376108, 0, 0.43413, 0.65359, 0.000365997, 0, 0.463277, 0.632471, 0.000354957, 0, 0.493295, 0.61151, 0.000343593, 0, 0.524106, 0.59064, 0.000331841, 0, 0.555561, 0.569386, 0.000318891, 0, 0.587302, 0.548785, 0.0003072, 0, 0.619048, 0.528146, 0.00029361, 0, 0.650794, 0.507872, 0.000281709, 0, 0.68254, 0.487805, 0.000268627, 0, 0.714286, 0.468196, 0.000255887, 0, 0.746032, 0.448922, 0.000243997, 0, 0.777778, 0.430093, 0.000231662, 0, 0.809524, 0.411845, 0.000220339, 0, 0.84127, 0.393808, 0.000208694, 0, 0.873016, 0.376615, 0.000198045, 0, 0.904762, 0.359655, 0.000187375, 0, 0.936508, 0.343452, 0.000177371, 0, 0.968254, 0.32765, 0.000167525, 0, 1, 1, 1.69351e-05, 0, 0, 1, 1.69356e-05, 0, 0, 1, 1.69427e-05, 0, 0, 0.999999, 1.69736e-05, 0, 0, 0.999998, 1.70575e-05, 0, 0, 0.999995, 1.72372e-05, 0, 0, 0.99999, 1.75739e-05, 0, 0, 0.999979, 1.81568e-05, 0, 0, 0.999966, 1.91206e-05, 0, 0, 0.999944, 2.0677e-05, 0, 0, 0.999912, 2.31644e-05, 0, 0, 0.999869, 2.71268e-05, 0, 0, 0.999811, 3.34272e-05, 0, 0, 0.99973, 4.33979e-05, 0, 0, 0.999617, 5.90083e-05, 0, 6.80315e-05, 0.999445, 8.29497e-05, 0, 0.000612796, 0.999138, 0.000118019, 0, 0.00187408, 0.998095, 0.000156712, 0, 0.00395791, 0.993919, 0.000125054, 0, 0.00692144, 0.991333, 0.000126091, 0, 0.0107962, 0.989226, 0.000144912, 0, 0.0155986, 0.986954, 0.000175737, 0, 0.0213364, 0.983982, 0.000213883, 0, 0.0280114, 0.979128, 0.000234526, 0, 0.0356226, 0.973327, 0.000243725, 0, 0.0441668, 0.967416, 0.0002773, 0, 0.0536399, 0.959729, 0.000308799, 0, 0.0640376, 0.949758, 0.000322447, 0, 0.0753554, 0.939173, 0.000350021, 0, 0.0875893, 0.9296, 0.000370089, 0, 0.100736, 0.921181, 0.000391365, 0, 0.114793, 0.91164, 0.000413636, 0, 0.129759, 0.900435, 0.000427068, 0, 0.145632, 0.888183, 0.000441046, 0, 0.162412, 0.874772, 0.000454968, 0, 0.180101, 0.859566, 0.000461882, 0, 0.1987, 0.843579, 0.000471556, 0, 0.218213, 0.826453, 0.000474335, 0, 0.238641, 0.809164, 0.000477078, 0, 0.259989, 0.792179, 0.00047755, 0, 0.282262, 0.773866, 0.000472573, 0, 0.305464, 0.754944, 0.000469765, 0, 0.329599, 0.735133, 0.000462371, 0, 0.35467, 0.714858, 0.000453674, 0, 0.380678, 0.694829, 0.000443888, 0, 0.407622, 0.674453, 0.000432052, 0, 0.435493, 0.653685, 0.000420315, 0, 0.464275, 0.632666, 0.000406829, 0, 0.493938, 0.611676, 0.000392234, 0, 0.524422, 0.591193, 0.000379208, 0, 0.555624, 0.570145, 0.00036319, 0, 0.587302, 0.549566, 0.000349111, 0, 0.619048, 0.529278, 0.000334166, 0, 0.650794, 0.509026, 0.000318456, 0, 0.68254, 0.489186, 0.00030449, 0, 0.714286, 0.469662, 0.000289051, 0, 0.746032, 0.450691, 0.000275494, 0, 0.777778, 0.431841, 0.000261437, 0, 0.809524, 0.413752, 0.000247846, 0, 0.84127, 0.395951, 0.000235085, 0, 0.873016, 0.378633, 0.000222245, 0, 0.904762, 0.36194, 0.000210533, 0, 0.936508, 0.345599, 0.000198494, 0, 0.968254, 0.329999, 0.000188133, 0, 1, 1, 2.69663e-05, 0, 0, 1, 2.6967e-05, 0, 0, 1, 2.69772e-05, 0, 0, 0.999999, 2.70214e-05, 0, 0, 0.999998, 2.71415e-05, 0, 0, 0.999994, 2.7398e-05, 0, 0, 0.999988, 2.78771e-05, 0, 0, 0.999977, 2.87019e-05, 0, 0, 0.999961, 3.00544e-05, 0, 0, 0.999937, 3.22138e-05, 0, 0, 0.999904, 3.56163e-05, 0, 0, 0.999854, 4.09465e-05, 0, 0, 0.99979, 4.92651e-05, 0, 0, 0.999699, 6.21722e-05, 0, 8.8288e-07, 0.999572, 8.19715e-05, 0, 0.000223369, 0.999381, 0.000111689, 0, 0.00105414, 0.999016, 0.000153862, 0, 0.0026493, 0.997437, 0.000187667, 0, 0.00508608, 0.993545, 0.000155672, 0, 0.00840554, 0.991135, 0.000161455, 0, 0.012629, 0.989157, 0.000188241, 0, 0.0177661, 0.986874, 0.000226229, 0, 0.0238198, 0.983714, 0.000268668, 0, 0.0307887, 0.978301, 0.000277109, 0, 0.0386688, 0.973227, 0.000303446, 0, 0.0474554, 0.967317, 0.000341851, 0, 0.0571428, 0.959477, 0.000370885, 0, 0.0677256, 0.950012, 0.000392753, 0, 0.0791988, 0.939484, 0.00042781, 0, 0.0915576, 0.928135, 0.000443866, 0, 0.104798, 0.919819, 0.000472959, 0, 0.118918, 0.910049, 0.000491551, 0, 0.133915, 0.899181, 0.000512616, 0, 0.149788, 0.886881, 0.000523563, 0, 0.166537, 0.87359, 0.000540183, 0, 0.184164, 0.858613, 0.000547386, 0, 0.202669, 0.842809, 0.000554809, 0, 0.222056, 0.825727, 0.000558316, 0, 0.242329, 0.808086, 0.000557824, 0, 0.263492, 0.790728, 0.000556346, 0, 0.285551, 0.772987, 0.000552672, 0, 0.30851, 0.7541, 0.000543738, 0, 0.332376, 0.734669, 0.000536107, 0, 0.357153, 0.714411, 0.000523342, 0, 0.382845, 0.694196, 0.000512238, 0, 0.409454, 0.674252, 0.000497465, 0, 0.436977, 0.65357, 0.000481096, 0, 0.465404, 0.632999, 0.000467054, 0, 0.494713, 0.611994, 0.000448771, 0, 0.524864, 0.591604, 0.000431889, 0, 0.555779, 0.571134, 0.000415238, 0, 0.587302, 0.550528, 0.000396369, 0, 0.619048, 0.530292, 0.000379477, 0, 0.650794, 0.510364, 0.000361488, 0, 0.68254, 0.490749, 0.000343787, 0, 0.714286, 0.471266, 0.000327822, 0, 0.746032, 0.452462, 0.000310626, 0, 0.777778, 0.433907, 0.000295352, 0, 0.809524, 0.415659, 0.000279179, 0, 0.84127, 0.398138, 0.000264685, 0, 0.873016, 0.380833, 0.000249905, 0, 0.904762, 0.364247, 0.000236282, 0, 0.936508, 0.348041, 0.000222905, 0, 0.968254, 0.332389, 0.000210522, 0, 1, 1, 4.20604e-05, 0, 0, 1, 4.20614e-05, 0, 0, 1, 4.20757e-05, 0, 0, 0.999999, 4.2138e-05, 0, 0, 0.999997, 4.23067e-05, 0, 0, 0.999993, 4.26668e-05, 0, 0, 0.999986, 4.33372e-05, 0, 0, 0.999974, 4.44857e-05, 0, 0, 0.999956, 4.63554e-05, 0, 0, 0.99993, 4.93105e-05, 0, 0, 0.999892, 5.39077e-05, 0, 0, 0.999838, 6.10005e-05, 0, 0, 0.999767, 7.18822e-05, 0, 0, 0.999666, 8.84581e-05, 0, 3.65471e-05, 0.999525, 0.000113398, 0, 0.000485623, 0.999311, 0.000150043, 0, 0.00162096, 0.998865, 0.000200063, 0, 0.00355319, 0.996278, 0.000211014, 0, 0.00633818, 0.992956, 0.000189672, 0, 0.0100043, 0.991017, 0.000210262, 0, 0.0145648, 0.989055, 0.000244292, 0, 0.0200237, 0.986741, 0.000290481, 0, 0.0263798, 0.983288, 0.000334303, 0, 0.033629, 0.977784, 0.000340307, 0, 0.0417652, 0.973037, 0.000377864, 0, 0.0507821, 0.967181, 0.0004239, 0, 0.060673, 0.958971, 0.000443854, 0, 0.0714314, 0.950093, 0.000483039, 0, 0.0830518, 0.939552, 0.000517934, 0, 0.0955288, 0.927678, 0.000539449, 0, 0.108859, 0.918278, 0.000568604, 0, 0.123038, 0.908449, 0.000588505, 0, 0.138065, 0.897713, 0.000612473, 0, 0.153938, 0.885533, 0.000625575, 0, 0.170657, 0.872131, 0.00063854, 0, 0.188224, 0.857517, 0.000647034, 0, 0.20664, 0.841796, 0.00065209, 0, 0.225909, 0.824726, 0.0006544, 0, 0.246035, 0.807297, 0.000655744, 0, 0.267022, 0.789058, 0.000646716, 0, 0.288878, 0.77189, 0.000643898, 0, 0.311607, 0.753082, 0.000629973, 0, 0.335216, 0.7341, 0.000621564, 0, 0.359713, 0.714094, 0.000605171, 0, 0.385103, 0.693839, 0.000588752, 0, 0.41139, 0.673891, 0.000573294, 0, 0.438576, 0.653565, 0.000552682, 0, 0.466656, 0.633326, 0.000533446, 0, 0.495617, 0.612582, 0.000514635, 0, 0.525431, 0.59205, 0.00049303, 0, 0.556041, 0.571918, 0.000471842, 0, 0.587338, 0.551572, 0.000451713, 0, 0.619048, 0.531553, 0.000430049, 0, 0.650794, 0.51175, 0.000410445, 0, 0.68254, 0.49238, 0.000390098, 0, 0.714286, 0.473143, 0.000370033, 0, 0.746032, 0.45423, 0.000351205, 0, 0.777778, 0.435963, 0.000332049, 0, 0.809524, 0.41787, 0.000315021, 0, 0.84127, 0.400387, 0.000297315, 0, 0.873016, 0.383332, 0.000281385, 0, 0.904762, 0.366665, 0.000265397, 0, 0.936508, 0.350633, 0.000250601, 0, 0.968254, 0.334964, 0.00023589, 0, 1, 1, 6.43736e-05, 0, 0, 1, 6.4375e-05, 0, 0, 1, 6.43947e-05, 0, 0, 0.999999, 6.4481e-05, 0, 0, 0.999997, 6.47143e-05, 0, 0, 0.999994, 6.52119e-05, 0, 0, 0.999985, 6.61359e-05, 0, 0, 0.999972, 6.77116e-05, 0, 0, 0.999952, 7.02599e-05, 0, 0, 0.999922, 7.42517e-05, 0, 0, 0.99988, 8.03906e-05, 0, 0, 0.99982, 8.97315e-05, 0, 0, 0.999741, 0.000103838, 0, 0, 0.999629, 0.00012496, 0, 0.000149024, 0.999474, 0.000156161, 0, 0.000861027, 0.999229, 0.000201034, 0, 0.00231198, 0.998662, 0.000259069, 0, 0.00458147, 0.995299, 0.000245439, 0, 0.00770895, 0.992732, 0.00024498, 0, 0.0117126, 0.990847, 0.000273211, 0, 0.0165989, 0.988911, 0.000316492, 0, 0.0223674, 0.98654, 0.00037161, 0, 0.0290135, 0.982636, 0.000410352, 0, 0.0365309, 0.977346, 0.000421756, 0, 0.0449117, 0.972909, 0.000475578, 0, 0.0541481, 0.966821, 0.000522482, 0, 0.0642326, 0.958686, 0.000545008, 0, 0.075158, 0.949754, 0.000589286, 0, 0.0869181, 0.939184, 0.000619995, 0, 0.0995074, 0.927505, 0.000654266, 0, 0.112922, 0.916606, 0.000682362, 0, 0.127157, 0.906707, 0.000704286, 0, 0.142212, 0.895937, 0.000725909, 0, 0.158085, 0.883913, 0.000743939, 0, 0.174776, 0.870642, 0.000755157, 0, 0.192287, 0.856241, 0.000764387, 0, 0.210619, 0.84069, 0.000771032, 0, 0.229775, 0.823728, 0.000765906, 0, 0.249761, 0.806481, 0.000767604, 0, 0.270582, 0.787924, 0.000754385, 0, 0.292243, 0.770588, 0.000749668, 0, 0.314753, 0.751991, 0.000731613, 0, 0.338118, 0.733407, 0.000717655, 0, 0.362347, 0.713688, 0.000700604, 0, 0.387447, 0.693595, 0.000678765, 0, 0.413424, 0.673426, 0.000657042, 0, 0.440284, 0.65359, 0.000635892, 0, 0.468027, 0.633576, 0.000611569, 0, 0.496645, 0.613144, 0.000586011, 0, 0.526122, 0.592711, 0.000563111, 0, 0.556417, 0.572722, 0.000537699, 0, 0.587451, 0.552762, 0.000512556, 0, 0.619048, 0.532985, 0.000489757, 0, 0.650794, 0.513219, 0.000464139, 0, 0.68254, 0.493992, 0.000442193, 0, 0.714286, 0.47509, 0.000418629, 0, 0.746032, 0.456287, 0.000397045, 0, 0.777778, 0.438152, 0.000375504, 0, 0.809524, 0.420294, 0.00035492, 0, 0.84127, 0.402749, 0.000335327, 0, 0.873016, 0.385879, 0.000316422, 0, 0.904762, 0.369352, 0.000298333, 0, 0.936508, 0.353301, 0.000281417, 0, 0.968254, 0.337781, 0.000265203, 0, 1, 1, 9.68267e-05, 0, 0, 1, 9.68284e-05, 0, 0, 1, 9.68556e-05, 0, 0, 0.999999, 9.69733e-05, 0, 0, 0.999997, 9.72913e-05, 0, 0, 0.999993, 9.79688e-05, 0, 0, 0.999984, 9.92239e-05, 0, 0, 0.999969, 0.000101356, 0, 0, 0.999946, 0.000104784, 0, 0, 0.999913, 0.000110111, 0, 0, 0.999868, 0.000118217, 0, 0, 0.999801, 0.000130396, 0, 0, 0.999712, 0.000148523, 0, 1.24907e-05, 0.999589, 0.000175233, 0, 0.000355405, 0.999416, 0.000213999, 0, 0.0013528, 0.999136, 0.000268529, 0, 0.00312557, 0.998367, 0.000333088, 0, 0.00573045, 0.994701, 0.000304757, 0, 0.00919397, 0.992497, 0.000318031, 0, 0.0135261, 0.990608, 0.000353863, 0, 0.0187278, 0.988715, 0.000409044, 0, 0.0247947, 0.986241, 0.000472967, 0, 0.0317196, 0.981696, 0.000495104, 0, 0.039494, 0.977097, 0.000532873, 0, 0.0481087, 0.972583, 0.000594447, 0, 0.0575549, 0.966142, 0.000636867, 0, 0.0678242, 0.95823, 0.000669899, 0, 0.0789089, 0.949677, 0.000719499, 0, 0.0908023, 0.939226, 0.000750584, 0, 0.103499, 0.927501, 0.000793183, 0, 0.116993, 0.915199, 0.00081995, 0, 0.131282, 0.90498, 0.000847654, 0, 0.146364, 0.894243, 0.000868929, 0, 0.162237, 0.882154, 0.000884278, 0, 0.178902, 0.869161, 0.000898108, 0, 0.196358, 0.854751, 0.000901254, 0, 0.21461, 0.839368, 0.00090679, 0, 0.23366, 0.822874, 0.000901541, 0, 0.253512, 0.805514, 0.000897297, 0, 0.274174, 0.78716, 0.000881856, 0, 0.29565, 0.769061, 0.000870032, 0, 0.31795, 0.751, 0.000851719, 0, 0.341081, 0.732614, 0.000830671, 0, 0.365053, 0.713171, 0.000806569, 0, 0.389874, 0.693472, 0.00078338, 0, 0.415553, 0.673528, 0.000756404, 0, 0.442098, 0.653397, 0.000726872, 0, 0.469512, 0.633781, 0.000700494, 0, 0.497794, 0.613877, 0.00067105, 0, 0.526935, 0.593506, 0.000640361, 0, 0.556908, 0.573667, 0.000613502, 0, 0.587657, 0.553932, 0.000583177, 0, 0.61906, 0.534345, 0.000554375, 0, 0.650794, 0.515042, 0.000527811, 0, 0.68254, 0.495674, 0.000499367, 0, 0.714286, 0.477132, 0.00047429, 0, 0.746032, 0.458609, 0.000447726, 0, 0.777778, 0.440354, 0.000424205, 0, 0.809524, 0.422765, 0.000399549, 0, 0.84127, 0.405472, 0.000378315, 0, 0.873016, 0.388482, 0.000355327, 0, 0.904762, 0.372191, 0.000336122, 0, 0.936508, 0.356099, 0.000315247, 0, 0.968254, 0.340737, 0.00029794, 0, 1, 1, 0.000143327, 0, 0, 1, 0.00014333, 0, 0, 1, 0.000143366, 0, 0, 0.999999, 0.000143524, 0, 0, 0.999996, 0.000143952, 0, 0, 0.999991, 0.000144862, 0, 0, 0.999981, 0.000146544, 0, 0, 0.999966, 0.000149391, 0, 0, 0.999941, 0.000153946, 0, 0, 0.999905, 0.000160971, 0, 0, 0.999852, 0.000171562, 0, 0, 0.99978, 0.00018729, 0, 0, 0.999681, 0.000210386, 0, 8.26239e-05, 0.999546, 0.000243906, 0, 0.000664807, 0.999352, 0.000291739, 0, 0.00196192, 0.999027, 0.000357419, 0, 0.00405941, 0.997886, 0.000422349, 0, 0.00699664, 0.99419, 0.000385008, 0, 0.0107896, 0.99214, 0.000409775, 0, 0.0154415, 0.990274, 0.000456418, 0, 0.0209488, 0.988455, 0.000527008, 0, 0.0273037, 0.985804, 0.000597685, 0, 0.0344969, 0.98103, 0.000613124, 0, 0.0425183, 0.976674, 0.000668321, 0, 0.0513575, 0.972021, 0.000736985, 0, 0.0610046, 0.965274, 0.000773789, 0, 0.0714508, 0.958046, 0.000830852, 0, 0.0826877, 0.949333, 0.000875766, 0, 0.0947085, 0.939135, 0.000917088, 0, 0.107507, 0.927119, 0.000952244, 0, 0.121078, 0.91469, 0.000990626, 0, 0.135419, 0.903006, 0.00101304, 0, 0.150526, 0.892368, 0.00103834, 0, 0.166399, 0.880231, 0.00105002, 0, 0.183038, 0.867432, 0.00106331, 0, 0.200443, 0.853208, 0.00106783, 0, 0.218618, 0.837956, 0.00106458, 0, 0.237566, 0.821772, 0.00105945, 0, 0.257291, 0.804328, 0.00104685, 0, 0.2778, 0.786465, 0.00103178, 0, 0.2991, 0.768004, 0.00101077, 0, 0.321199, 0.74972, 0.000985504, 0, 0.344106, 0.731682, 0.000962893, 0, 0.36783, 0.712813, 0.000932146, 0, 0.392383, 0.693139, 0.00089871, 0, 0.417774, 0.673566, 0.000869678, 0, 0.444013, 0.653483, 0.000835525, 0, 0.471107, 0.633891, 0.000799853, 0, 0.49906, 0.614433, 0.000766838, 0, 0.527869, 0.594586, 0.000732227, 0, 0.557517, 0.574769, 0.000696442, 0, 0.587966, 0.555149, 0.000663935, 0, 0.61913, 0.535898, 0.000629826, 0, 0.650794, 0.516753, 0.000596486, 0, 0.68254, 0.497816, 0.000567078, 0, 0.714286, 0.479034, 0.000534399, 0, 0.746032, 0.460975, 0.000507013, 0, 0.777778, 0.442935, 0.000477421, 0, 0.809524, 0.425263, 0.000451101, 0, 0.84127, 0.408248, 0.000424964, 0, 0.873016, 0.391339, 0.00039993, 0, 0.904762, 0.37513, 0.000377619, 0, 0.936508, 0.359172, 0.000354418, 0, 0.968254, 0.343876, 0.000334823, 0, 1, 1, 0.000209042, 0, 0, 1, 0.000209045, 0, 0, 1, 0.000209093, 0, 0, 0.999999, 0.000209304, 0, 0, 0.999996, 0.000209871, 0, 0, 0.999991, 0.000211078, 0, 0, 0.999979, 0.000213304, 0, 0, 0.999963, 0.000217061, 0, 0, 0.999933, 0.000223042, 0, 0, 0.999894, 0.000232206, 0, 0, 0.999837, 0.000245901, 0, 0, 0.999756, 0.000266023, 0, 1.02927e-06, 0.999648, 0.000295204, 0, 0.000233468, 0.999499, 0.000336958, 0, 0.00108237, 0.999283, 0.000395563, 0, 0.00268832, 0.998896, 0.000473785, 0, 0.00511138, 0.997006, 0.000520008, 0, 0.00837705, 0.993819, 0.000497261, 0, 0.0124928, 0.991632, 0.000523722, 0, 0.0174561, 0.989875, 0.000587258, 0, 0.0232596, 0.988109, 0.000676329, 0, 0.0298932, 0.985155, 0.000747701, 0, 0.0373453, 0.980479, 0.000768803, 0, 0.0456045, 0.976271, 0.000841054, 0, 0.0546593, 0.971347, 0.000911469, 0, 0.0644994, 0.964528, 0.000953057, 0, 0.0751152, 0.957632, 0.00102221, 0, 0.0864981, 0.948681, 0.00106122, 0, 0.0986407, 0.938716, 0.00111857, 0, 0.111537, 0.926629, 0.00114762, 0, 0.125182, 0.914025, 0.00118995, 0, 0.139571, 0.901026, 0.00121228, 0, 0.154703, 0.890358, 0.00123946, 0, 0.170576, 0.878283, 0.0012527, 0, 0.18719, 0.865459, 0.00125536, 0, 0.204547, 0.851407, 0.00126134, 0, 0.222648, 0.836276, 0.00124759, 0, 0.241498, 0.820436, 0.00124443, 0, 0.261101, 0.803253, 0.00122071, 0, 0.281465, 0.785562, 0.00120107, 0, 0.302595, 0.76718, 0.00117762, 0, 0.324501, 0.748551, 0.00114289, 0, 0.347192, 0.730564, 0.00110872, 0, 0.370679, 0.712253, 0.00107636, 0, 0.394973, 0.692867, 0.00103646, 0, 0.420085, 0.673695, 0.000996793, 0, 0.446027, 0.653912, 0.00095675, 0, 0.47281, 0.634129, 0.000916739, 0, 0.500441, 0.615004, 0.000874401, 0, 0.528921, 0.595587, 0.000833411, 0, 0.558244, 0.575965, 0.000794556, 0, 0.588384, 0.5566, 0.00075196, 0, 0.619281, 0.537428, 0.000716381, 0, 0.650795, 0.518623, 0.000676558, 0, 0.68254, 0.499964, 0.00064074, 0, 0.714286, 0.481356, 0.000605984, 0, 0.746032, 0.463279, 0.000570256, 0, 0.777778, 0.445673, 0.000540138, 0, 0.809524, 0.428032, 0.000507299, 0, 0.84127, 0.411112, 0.000479553, 0, 0.873016, 0.394444, 0.000450737, 0, 0.904762, 0.378247, 0.000424269, 0, 0.936508, 0.362415, 0.000399111, 0, 0.968254, 0.347103, 0.000375274, 0, 1, 1, 0.000300729, 0, 0, 1, 0.000300733, 0, 0, 1, 0.000300797, 0, 0, 0.999998, 0.000301072, 0, 0, 0.999996, 0.000301817, 0, 0, 0.999989, 0.000303398, 0, 0, 0.999977, 0.000306309, 0, 0, 0.999958, 0.000311209, 0, 0, 0.999927, 0.000318975, 0, 0, 0.999884, 0.000330804, 0, 0, 0.99982, 0.00034834, 0, 0, 0.999733, 0.000373854, 0, 3.26995e-05, 0.999613, 0.000410424, 0, 0.000477174, 0.999447, 0.000462047, 0, 0.00161099, 0.999204, 0.000533322, 0, 0.00353153, 0.998725, 0.000624964, 0, 0.00627965, 0.995871, 0.000631786, 0, 0.0098693, 0.993194, 0.000632017, 0, 0.0143011, 0.991541, 0.00068923, 0, 0.019568, 0.989773, 0.000766892, 0, 0.0256593, 0.987647, 0.000863668, 0, 0.0325625, 0.984193, 0.000922089, 0, 0.0402647, 0.980016, 0.000970749, 0, 0.0487532, 0.975859, 0.00106027, 0, 0.058016, 0.970514, 0.00112239, 0, 0.0680419, 0.963625, 0.00117212, 0, 0.0788208, 0.956959, 0.00125211, 0, 0.0903439, 0.947956, 0.00129411, 0, 0.102604, 0.93809, 0.00135879, 0, 0.115594, 0.92659, 0.00139309, 0, 0.129309, 0.913829, 0.00143253, 0, 0.143745, 0.90005, 0.00145809, 0, 0.158901, 0.888129, 0.0014748, 0, 0.174774, 0.87607, 0.00148756, 0, 0.191365, 0.863461, 0.00148714, 0, 0.208674, 0.849594, 0.00148892, 0, 0.226705, 0.834531, 0.00146496, 0, 0.245461, 0.81903, 0.0014579, 0, 0.264947, 0.802122, 0.00143039, 0, 0.28517, 0.78445, 0.00139717, 0, 0.306137, 0.766434, 0.00136312, 0, 0.327857, 0.747816, 0.00132597, 0, 0.350341, 0.729519, 0.00128323, 0, 0.373598, 0.711454, 0.00123803, 0, 0.397642, 0.692699, 0.00119097, 0, 0.422485, 0.673723, 0.00114565, 0, 0.448139, 0.654386, 0.00109552, 0, 0.474619, 0.634673, 0.00104553, 0, 0.501933, 0.615554, 0.00099985, 0, 0.530089, 0.596462, 0.000948207, 0, 0.559087, 0.577385, 0.000902299, 0, 0.588913, 0.558257, 0.000856448, 0, 0.619525, 0.5392, 0.000810395, 0, 0.650826, 0.520543, 0.000768558, 0, 0.68254, 0.502206, 0.0007239, 0, 0.714286, 0.48402, 0.000685794, 0, 0.746032, 0.465779, 0.00064471, 0, 0.777778, 0.448455, 0.000609583, 0, 0.809524, 0.431091, 0.00057227, 0, 0.84127, 0.414147, 0.00054042, 0, 0.873016, 0.39765, 0.000506545, 0, 0.904762, 0.381576, 0.000477635, 0, 0.936508, 0.365881, 0.000448446, 0, 0.968254, 0.350582, 0.000421424, 0, 1, 1, 0.000427144, 0, 0, 1, 0.000427151, 0, 0, 1, 0.000427232, 0, 0, 0.999998, 0.00042759, 0, 0, 0.999995, 0.000428555, 0, 0, 0.999988, 0.000430603, 0, 0, 0.999976, 0.000434368, 0, 0, 0.999952, 0.000440688, 0, 0, 0.999919, 0.000450667, 0, 0, 0.999871, 0.00046578, 0, 0, 0.999801, 0.000488024, 0, 0, 0.999704, 0.000520092, 0, 0.000129791, 0.999572, 0.000565553, 0, 0.000821056, 0.999389, 0.000628906, 0, 0.00225241, 0.999114, 0.000714911, 0, 0.00449109, 0.998488, 0.000819218, 0, 0.00756249, 0.995234, 0.00080415, 0, 0.0114716, 0.993021, 0.000830181, 0, 0.0162131, 0.991407, 0.000902645, 0, 0.021776, 0.989625, 0.000996934, 0, 0.0281471, 0.987064, 0.00109707, 0, 0.0353118, 0.983265, 0.00114353, 0, 0.0432562, 0.979535, 0.0012272, 0, 0.0519665, 0.975224, 0.00132642, 0, 0.0614298, 0.969574, 0.00138092, 0, 0.0716348, 0.963021, 0.00145896, 0, 0.0825709, 0.956046, 0.00152834, 0, 0.094229, 0.947136, 0.00158217, 0, 0.106602, 0.937313, 0.0016347, 0, 0.119682, 0.926073, 0.00168383, 0, 0.133465, 0.913121, 0.00171627, 0, 0.147947, 0.899165, 0.00174229, 0, 0.163125, 0.885891, 0.00176137, 0, 0.178998, 0.873783, 0.00176406, 0, 0.195566, 0.861331, 0.00176156, 0, 0.21283, 0.847569, 0.00175346, 0, 0.230793, 0.832785, 0.00172753, 0, 0.249459, 0.817442, 0.00170204, 0, 0.268832, 0.800613, 0.00166576, 0, 0.28892, 0.783597, 0.00162909, 0, 0.30973, 0.76571, 0.0015826, 0, 0.331271, 0.747021, 0.00153106, 0, 0.353554, 0.728593, 0.00148036, 0, 0.37659, 0.710661, 0.00142808, 0, 0.400391, 0.692426, 0.00136906, 0, 0.424973, 0.673623, 0.00131066, 0, 0.450347, 0.65494, 0.00125569, 0, 0.476531, 0.635448, 0.00119517, 0, 0.503535, 0.616221, 0.00113828, 0, 0.531372, 0.597531, 0.0010816, 0, 0.560047, 0.578795, 0.00102673, 0, 0.589554, 0.559892, 0.000970985, 0, 0.619869, 0.541307, 0.000919773, 0, 0.650923, 0.522608, 0.000868479, 0, 0.68254, 0.504484, 0.00082137, 0, 0.714286, 0.486603, 0.000772916, 0, 0.746032, 0.468802, 0.000730353, 0, 0.777778, 0.451172, 0.000684955, 0, 0.809524, 0.434348, 0.000647565, 0, 0.84127, 0.417445, 0.000605863, 0, 0.873016, 0.401077, 0.000571885, 0, 0.904762, 0.385039, 0.000536034, 0, 0.936508, 0.369483, 0.000504227, 0, 0.968254, 0.354272, 0.000473165, 0, 1, 1, 0.000599525, 0, 0, 1, 0.000599533, 0, 0, 1, 0.000599639, 0, 0, 0.999998, 0.000600097, 0, 0, 0.999994, 0.000601336, 0, 0, 0.999987, 0.000603958, 0, 0, 0.999972, 0.000608775, 0, 0, 0.999949, 0.000616842, 0, 0, 0.999912, 0.000629534, 0, 0, 0.999857, 0.000648658, 0, 0, 0.999781, 0.000676615, 0, 5.38873e-06, 0.999674, 0.000716574, 0, 0.000308602, 0.999528, 0.000772641, 0, 0.00127003, 0.999326, 0.000849806, 0, 0.00300783, 0.999009, 0.000952682, 0, 0.00556637, 0.998112, 0.00106394, 0, 0.00895889, 0.994496, 0.00102228, 0, 0.0131827, 0.992806, 0.00108586, 0, 0.0182277, 0.991211, 0.0011759, 0, 0.0240795, 0.989415, 0.00128955, 0, 0.030723, 0.986499, 0.00139038, 0, 0.0381418, 0.982679, 0.00144539, 0, 0.046321, 0.978839, 0.00153954, 0, 0.0552459, 0.974295, 0.00164417, 0, 0.0649034, 0.968784, 0.00171517, 0, 0.0752814, 0.962324, 0.00180282, 0, 0.0863693, 0.954956, 0.00186387, 0, 0.0981578, 0.94624, 0.00193817, 0, 0.110639, 0.936517, 0.00198156, 0, 0.123806, 0.925186, 0.00203042, 0, 0.137655, 0.91252, 0.0020664, 0, 0.15218, 0.898441, 0.00207822, 0, 0.16738, 0.884394, 0.0020992, 0, 0.183253, 0.871273, 0.00208748, 0, 0.199799, 0.859057, 0.00208686, 0, 0.21702, 0.845243, 0.00205519, 0, 0.234918, 0.830723, 0.00202868, 0, 0.253496, 0.815801, 0.00199501, 0, 0.272761, 0.79914, 0.00194193, 0, 0.292719, 0.782372, 0.00188824, 0, 0.313377, 0.76482, 0.00183695, 0, 0.334745, 0.746586, 0.00177418, 0, 0.356833, 0.7281, 0.00170628, 0, 0.379654, 0.709842, 0.00164063, 0, 0.403221, 0.692019, 0.00157355, 0, 0.427548, 0.67364, 0.00150262, 0, 0.452651, 0.655277, 0.00143473, 0, 0.478545, 0.636438, 0.00136371, 0, 0.505246, 0.617364, 0.00129911, 0, 0.532768, 0.598603, 0.00123014, 0, 0.561122, 0.580195, 0.00116587, 0, 0.590309, 0.561786, 0.00110398, 0, 0.620318, 0.543377, 0.00104148, 0, 0.651102, 0.525093, 0.000983984, 0, 0.682545, 0.506791, 0.00092667, 0, 0.714286, 0.489291, 0.000874326, 0, 0.746032, 0.471811, 0.000821734, 0, 0.777778, 0.454435, 0.000774698, 0, 0.809524, 0.437493, 0.000727302, 0, 0.84127, 0.420977, 0.000684039, 0, 0.873016, 0.404729, 0.00064373, 0, 0.904762, 0.388756, 0.00060285, 0, 0.936508, 0.373344, 0.00056765, 0, 0.968254, 0.358191, 0.000531929, 0, 1, 1, 0.000832169, 0, 0, 1, 0.000832178, 0, 0, 1, 0.00083231, 0, 0, 0.999998, 0.000832893, 0, 0, 0.999995, 0.000834465, 0, 0, 0.999985, 0.000837791, 0, 0, 0.999969, 0.000843893, 0, 0, 0.999944, 0.000854086, 0, 0, 0.999903, 0.000870071, 0, 0, 0.999843, 0.000894042, 0, 0, 0.999759, 0.000928865, 0, 5.31805e-05, 0.999643, 0.000978242, 0, 0.000579365, 0.99948, 0.00104684, 0, 0.00182774, 0.999255, 0.00114012, 0, 0.00387804, 0.998885, 0.00126188, 0, 0.00675709, 0.997405, 0.00135888, 0, 0.010468, 0.99424, 0.00133626, 0, 0.0150018, 0.992458, 0.00140905, 0, 0.0203443, 0.990929, 0.00152305, 0, 0.0264786, 0.989116, 0.00165882, 0, 0.0333875, 0.985624, 0.00174128, 0, 0.0410536, 0.982003, 0.00182108, 0, 0.0494609, 0.978336, 0.00194498, 0, 0.0585941, 0.973184, 0.00202708, 0, 0.0684396, 0.9678, 0.00212166, 0, 0.0789851, 0.961348, 0.00221366, 0, 0.0902199, 0.953841, 0.00228219, 0, 0.102134, 0.94534, 0.00235662, 0, 0.114721, 0.935552, 0.00240572, 0, 0.127972, 0.924064, 0.00244405, 0, 0.141884, 0.911827, 0.00247557, 0, 0.156451, 0.897731, 0.00248374, 0, 0.171672, 0.883409, 0.00249863, 0, 0.187545, 0.868625, 0.00246688, 0, 0.20407, 0.856529, 0.00246523, 0, 0.221249, 0.842999, 0.00242368, 0, 0.239083, 0.828505, 0.00237354, 0, 0.257578, 0.813825, 0.00232588, 0, 0.276738, 0.797813, 0.00226731, 0, 0.296569, 0.781097, 0.00219704, 0, 0.31708, 0.764038, 0.00212394, 0, 0.338281, 0.746067, 0.00204786, 0, 0.360181, 0.727687, 0.00196728, 0, 0.382794, 0.709571, 0.00188779, 0, 0.406133, 0.691503, 0.00180532, 0, 0.430213, 0.673673, 0.00171849, 0, 0.45505, 0.655732, 0.00164147, 0, 0.480662, 0.637399, 0.00155858, 0, 0.507065, 0.618616, 0.00147641, 0, 0.534278, 0.60005, 0.00140125, 0, 0.562313, 0.581713, 0.00132441, 0, 0.59118, 0.563546, 0.00125014, 0, 0.620875, 0.545605, 0.00118249, 0, 0.651373, 0.527559, 0.0011116, 0, 0.682593, 0.509764, 0.00104979, 0, 0.714286, 0.49193, 0.000985977, 0, 0.746032, 0.475011, 0.000928592, 0, 0.777778, 0.457878, 0.000873466, 0, 0.809524, 0.440979, 0.000819585, 0, 0.84127, 0.424613, 0.000772365, 0, 0.873016, 0.408549, 0.000722195, 0, 0.904762, 0.392771, 0.000680014, 0, 0.936508, 0.377317, 0.000636797, 0, 0.968254, 0.362352, 0.000598318, 0, 1, 1, 0.00114313, 0, 0, 1, 0.00114314, 0, 0, 0.999999, 0.00114331, 0, 0, 0.999998, 0.00114404, 0, 0, 0.999994, 0.00114601, 0, 0, 0.999984, 0.00115019, 0, 0, 0.999967, 0.00115784, 0, 0, 0.999937, 0.0011706, 0, 0, 0.999894, 0.00119054, 0, 0, 0.999828, 0.00122031, 0, 0, 0.999735, 0.00126331, 0, 0.000169263, 0.999606, 0.00132382, 0, 0.000949167, 0.999426, 0.0014071, 0, 0.00249668, 0.999173, 0.00151895, 0, 0.00486392, 0.99873, 0.00166102, 0, 0.00806323, 0.996243, 0.0017023, 0, 0.0120895, 0.993779, 0.00172782, 0, 0.0169288, 0.9919, 0.0018108, 0, 0.0225633, 0.990524, 0.00196028, 0, 0.028974, 0.98868, 0.00212014, 0, 0.036142, 0.984663, 0.00217598, 0, 0.044049, 0.981457, 0.00230563, 0, 0.0526781, 0.977608, 0.00243966, 0, 0.0620137, 0.972215, 0.00251336, 0, 0.0720418, 0.966798, 0.0026285, 0, 0.0827499, 0.960241, 0.00271409, 0, 0.0941271, 0.952489, 0.00278381, 0, 0.106164, 0.944127, 0.00285399, 0, 0.118852, 0.934282, 0.00290994, 0, 0.132185, 0.923271, 0.00294558, 0, 0.146157, 0.910803, 0.00296269, 0, 0.160766, 0.896705, 0.00296803, 0, 0.176007, 0.88238, 0.00296637, 0, 0.19188, 0.867116, 0.00293163, 0, 0.208385, 0.853636, 0.00289418, 0, 0.225523, 0.840469, 0.00284663, 0, 0.243296, 0.82639, 0.00278594, 0, 0.261709, 0.811759, 0.00271618, 0, 0.280767, 0.796113, 0.00263187, 0, 0.300476, 0.779518, 0.00254589, 0, 0.320845, 0.763142, 0.00246003, 0, 0.341883, 0.745464, 0.00236529, 0, 0.363601, 0.727491, 0.00226536, 0, 0.386011, 0.709414, 0.00216375, 0, 0.409128, 0.691396, 0.00207127, 0, 0.432967, 0.67368, 0.00197106, 0, 0.457545, 0.656049, 0.00187022, 0, 0.482881, 0.638188, 0.00177605, 0, 0.508992, 0.620177, 0.00168482, 0, 0.535899, 0.601506, 0.00158909, 0, 0.563619, 0.58362, 0.00150583, 0, 0.592165, 0.565496, 0.00141791, 0, 0.621544, 0.54789, 0.00133693, 0, 0.651743, 0.530323, 0.00126038, 0, 0.682709, 0.512795, 0.00118556, 0, 0.714286, 0.495199, 0.00111527, 0, 0.746032, 0.478101, 0.0010489, 0, 0.777778, 0.461511, 0.000984264, 0, 0.809524, 0.444879, 0.00092591, 0, 0.84127, 0.428424, 0.000866582, 0, 0.873016, 0.412495, 0.000814463, 0, 0.904762, 0.396975, 0.000764498, 0, 0.936508, 0.381614, 0.000715967, 0, 0.968254, 0.366732, 0.000672483, 0, 1, 1, 0.00155501, 0, 0, 1, 0.00155503, 0, 0, 1, 0.00155524, 0, 0, 0.999998, 0.00155615, 0, 0, 0.999994, 0.0015586, 0, 0, 0.999983, 0.00156379, 0, 0, 0.999963, 0.0015733, 0, 0, 0.999932, 0.00158911, 0, 0, 0.999882, 0.00161376, 0, 0, 0.99981, 0.00165041, 0, 1.00875e-05, 0.999708, 0.00170304, 0, 0.000367658, 0.999565, 0.00177658, 0, 0.0014234, 0.999368, 0.00187688, 0, 0.00327939, 0.999081, 0.00200989, 0, 0.00596629, 0.99852, 0.00217177, 0, 0.0094852, 0.99549, 0.0021745, 0, 0.013824, 0.993252, 0.00222357, 0, 0.0189642, 0.991727, 0.00235022, 0, 0.0248856, 0.989951, 0.00250561, 0, 0.0315669, 0.988029, 0.00268829, 0, 0.0389882, 0.984029, 0.0027496, 0, 0.0471302, 0.980683, 0.00289793, 0, 0.0559754, 0.976554, 0.00303315, 0, 0.0655081, 0.97139, 0.00313257, 0, 0.0757138, 0.965544, 0.00323656, 0, 0.08658, 0.95912, 0.00333432, 0, 0.0980954, 0.951183, 0.0034039, 0, 0.110251, 0.942974, 0.00347515, 0, 0.123038, 0.932642, 0.00350381, 0, 0.13645, 0.922158, 0.00354519, 0, 0.150482, 0.909404, 0.00353851, 0, 0.165129, 0.896071, 0.0035435, 0, 0.18039, 0.881206, 0.00349936, 0, 0.196263, 0.866077, 0.00347256, 0, 0.212748, 0.85093, 0.003415, 0, 0.229847, 0.837703, 0.00333367, 0, 0.247561, 0.823878, 0.003249, 0, 0.265895, 0.809449, 0.00316347, 0, 0.284854, 0.794379, 0.00306351, 0, 0.304445, 0.778138, 0.0029499, 0, 0.324675, 0.761997, 0.00284099, 0, 0.345555, 0.744938, 0.00272104, 0, 0.367095, 0.727212, 0.00260715, 0, 0.389309, 0.709549, 0.00248855, 0, 0.41221, 0.691704, 0.00236783, 0, 0.435814, 0.673689, 0.00225178, 0, 0.460138, 0.656453, 0.00213765, 0, 0.485203, 0.639128, 0.00202178, 0, 0.511028, 0.621512, 0.00191443, 0, 0.537634, 0.603598, 0.00180977, 0, 0.565041, 0.58559, 0.00170456, 0, 0.593268, 0.567852, 0.00160927, 0, 0.622327, 0.5503, 0.00151395, 0, 0.652217, 0.533033, 0.00142499, 0, 0.682907, 0.515942, 0.00133955, 0, 0.714296, 0.498814, 0.0012602, 0, 0.746032, 0.481595, 0.00118188, 0, 0.777778, 0.465117, 0.00111171, 0, 0.809524, 0.448865, 0.00104091, 0, 0.84127, 0.432711, 0.000976618, 0, 0.873016, 0.416822, 0.00091859, 0, 0.904762, 0.401272, 0.000857704, 0, 0.936508, 0.386226, 0.000807172, 0, 0.968254, 0.371321, 0.00075464, 0, 1, 1, 0.00209596, 0, 0, 1, 0.00209598, 0, 0, 1, 0.00209624, 0, 0, 0.999997, 0.00209736, 0, 0, 0.999991, 0.00210039, 0, 0, 0.999979, 0.00210678, 0, 0, 0.999959, 0.00211847, 0, 0, 0.999925, 0.0021379, 0, 0, 0.99987, 0.00216809, 0, 0, 0.999791, 0.00221281, 0, 6.81487e-05, 0.999677, 0.00227669, 0, 0.000658161, 0.999521, 0.00236533, 0, 0.00200635, 0.999301, 0.00248514, 0, 0.0041779, 0.998977, 0.00264185, 0, 0.00718648, 0.998191, 0.00281695, 0, 0.0110239, 0.994801, 0.00278518, 0, 0.015672, 0.993091, 0.00288774, 0, 0.0211091, 0.991571, 0.00303931, 0, 0.0273123, 0.9897, 0.00321643, 0, 0.034259, 0.987023, 0.00337332, 0, 0.0419282, 0.983289, 0.00346146, 0, 0.0502998, 0.979892, 0.00363704, 0, 0.0593562, 0.975111, 0.00373601, 0, 0.069081, 0.970351, 0.0038842, 0, 0.0794598, 0.964131, 0.00397053, 0, 0.0904798, 0.957747, 0.00408078, 0, 0.10213, 0.949536, 0.00413533, 0, 0.1144, 0.941372, 0.00420305, 0, 0.127284, 0.931049, 0.00422815, 0, 0.140772, 0.920647, 0.00425048, 0, 0.154862, 0.908033, 0.0042281, 0, 0.169548, 0.895028, 0.00422026, 0, 0.184828, 0.879968, 0.00415042, 0, 0.200701, 0.864875, 0.00408821, 0, 0.217167, 0.84918, 0.00400909, 0, 0.234227, 0.834934, 0.00391178, 0, 0.251884, 0.821397, 0.00380066, 0, 0.270141, 0.807135, 0.00367974, 0, 0.289004, 0.792363, 0.00355172, 0, 0.308479, 0.776661, 0.003411, 0, 0.328575, 0.760705, 0.00328123, 0, 0.349301, 0.744408, 0.00314003, 0, 0.370668, 0.726994, 0.0029906, 0, 0.392689, 0.709598, 0.00285034, 0, 0.415379, 0.692112, 0.00271179, 0, 0.438754, 0.674435, 0.00257185, 0, 0.46283, 0.65676, 0.00243425, 0, 0.48763, 0.639982, 0.00230351, 0, 0.513173, 0.622983, 0.0021777, 0, 0.539482, 0.605471, 0.00204991, 0, 0.566579, 0.58796, 0.00193759, 0, 0.594488, 0.570463, 0.00181976, 0, 0.623226, 0.553058, 0.00171497, 0, 0.6528, 0.535894, 0.00161109, 0, 0.683198, 0.519089, 0.00151394, 0, 0.714354, 0.502454, 0.00142122, 0, 0.746032, 0.485681, 0.00133488, 0, 0.777778, 0.468935, 0.00124975, 0, 0.809524, 0.452951, 0.00117309, 0, 0.84127, 0.437139, 0.00110155, 0, 0.873016, 0.421446, 0.00103124, 0, 0.904762, 0.405951, 0.000966387, 0, 0.936508, 0.391003, 0.000908119, 0, 0.968254, 0.376198, 0.000848057, 0, 1, 1, 0.00280076, 0, 0, 1, 0.00280078, 0, 0, 0.999999, 0.00280109, 0, 0, 0.999997, 0.00280246, 0, 0, 0.999992, 0.00280616, 0, 0, 0.999979, 0.00281396, 0, 0, 0.999956, 0.00282822, 0, 0, 0.999916, 0.00285186, 0, 0, 0.999857, 0.0028885, 0, 0, 0.999768, 0.00294259, 0, 0.000196026, 0.999645, 0.00301946, 0, 0.00104842, 0.99947, 0.00312541, 0, 0.00270199, 0.999229, 0.00326733, 0, 0.00519449, 0.998852, 0.00344992, 0, 0.00852602, 0.997558, 0.00361052, 0, 0.0126804, 0.994417, 0.0035898, 0, 0.017635, 0.992824, 0.00372393, 0, 0.023365, 0.991344, 0.00390695, 0, 0.0298456, 0.989337, 0.00410392, 0, 0.0370529, 0.985811, 0.00420987, 0, 0.0449651, 0.982772, 0.00437488, 0, 0.0535615, 0.979001, 0.00455069, 0, 0.0628243, 0.974102, 0.00464462, 0, 0.0727368, 0.969197, 0.00480577, 0, 0.0832844, 0.962759, 0.00487818, 0, 0.0944545, 0.956207, 0.00498176, 0, 0.106236, 0.947909, 0.00503392, 0, 0.118619, 0.939596, 0.00507474, 0, 0.131595, 0.929642, 0.00509798, 0, 0.145159, 0.918807, 0.00508476, 0, 0.159305, 0.906921, 0.00505634, 0, 0.174028, 0.893312, 0.00498845, 0, 0.189327, 0.878933, 0.0049133, 0, 0.2052, 0.863986, 0.0048259, 0, 0.221647, 0.847936, 0.00470848, 0, 0.23867, 0.832253, 0.00456889, 0, 0.25627, 0.818619, 0.00442726, 0, 0.274453, 0.804788, 0.00427677, 0, 0.293222, 0.790241, 0.00411906, 0, 0.312585, 0.775162, 0.00394833, 0, 0.33255, 0.759463, 0.00377366, 0, 0.353126, 0.743598, 0.00361026, 0, 0.374324, 0.72697, 0.00343627, 0, 0.396158, 0.709646, 0.00326422, 0, 0.418641, 0.69277, 0.00309717, 0, 0.44179, 0.675371, 0.0029356, 0, 0.465624, 0.657863, 0.00277712, 0, 0.490163, 0.640772, 0.00261738, 0, 0.515429, 0.624441, 0.0024737, 0, 0.541445, 0.607497, 0.00233125, 0, 0.568236, 0.590438, 0.00218994, 0, 0.595828, 0.573224, 0.0020664, 0, 0.624242, 0.556168, 0.00193526, 0, 0.653496, 0.539232, 0.00182463, 0, 0.683588, 0.522352, 0.00170735, 0, 0.714482, 0.506172, 0.00160555, 0, 0.746032, 0.489842, 0.00150451, 0, 0.777778, 0.473463, 0.00140938, 0, 0.809524, 0.457266, 0.00132568, 0, 0.84127, 0.441609, 0.0012376, 0, 0.873016, 0.426348, 0.00116265, 0, 0.904762, 0.411002, 0.00108935, 0, 0.936508, 0.396045, 0.00101946, 0, 0.968254, 0.381448, 0.000955665, 0, 1, 1, 0.0037121, 0, 0, 1, 0.00371213, 0, 0, 1, 0.00371251, 0, 0, 0.999997, 0.00371417, 0, 0, 0.99999, 0.00371863, 0, 0, 0.999977, 0.00372807, 0, 0, 0.99995, 0.00374529, 0, 0, 0.999908, 0.0037738, 0, 0, 0.999843, 0.00381789, 0, 1.23596e-05, 0.999745, 0.00388273, 0, 0.000407442, 0.999608, 0.00397443, 0, 0.0015447, 0.999415, 0.00409998, 0, 0.00351385, 0.999143, 0.00426662, 0, 0.0063316, 0.9987, 0.00447625, 0, 0.00998679, 0.996363, 0.00455323, 0, 0.0144569, 0.994021, 0.00461052, 0, 0.0197151, 0.992372, 0.00476359, 0, 0.0257344, 0.991007, 0.00499101, 0, 0.0324882, 0.988767, 0.0051972, 0, 0.0399517, 0.984872, 0.00528407, 0, 0.0481022, 0.982004, 0.00548926, 0, 0.0569191, 0.977714, 0.00564385, 0, 0.0663839, 0.973076, 0.0057693, 0, 0.0764801, 0.967565, 0.0058924, 0, 0.0871928, 0.961384, 0.00599629, 0, 0.0985095, 0.954435, 0.00605998, 0, 0.110419, 0.946303, 0.0061133, 0, 0.122912, 0.937662, 0.00612028, 0, 0.13598, 0.927867, 0.00612209, 0, 0.149617, 0.916475, 0.00604813, 0, 0.163817, 0.90541, 0.00603088, 0, 0.178577, 0.891591, 0.00592218, 0, 0.193894, 0.877573, 0.00578854, 0, 0.209767, 0.862511, 0.00566648, 0, 0.226196, 0.846861, 0.00551481, 0, 0.243182, 0.83068, 0.00533754, 0, 0.260728, 0.815725, 0.00515487, 0, 0.278837, 0.802321, 0.0049655, 0, 0.297515, 0.787826, 0.00475421, 0, 0.316768, 0.773454, 0.00456002, 0, 0.336605, 0.758224, 0.00434727, 0, 0.357034, 0.74265, 0.00414444, 0, 0.378067, 0.726729, 0.00393738, 0, 0.399717, 0.710155, 0.00373575, 0, 0.421998, 0.693312, 0.00353736, 0, 0.444928, 0.67653, 0.00334368, 0, 0.468523, 0.659444, 0.00315981, 0, 0.492806, 0.642051, 0.00297809, 0, 0.517798, 0.625758, 0.00280592, 0, 0.543525, 0.609615, 0.00264254, 0, 0.570012, 0.592919, 0.00248459, 0, 0.597288, 0.576298, 0.00233327, 0, 0.625379, 0.559489, 0.00219519, 0, 0.654307, 0.542891, 0.00205441, 0, 0.684084, 0.526255, 0.00193385, 0, 0.714693, 0.509853, 0.00180745, 0, 0.746044, 0.494131, 0.00169817, 0, 0.777778, 0.478114, 0.0015913, 0, 0.809524, 0.462274, 0.00148981, 0, 0.84127, 0.446412, 0.00139537, 0, 0.873016, 0.431274, 0.00130984, 0, 0.904762, 0.41635, 0.00122403, 0, 0.936508, 0.401476, 0.00114809, 0, 0.968254, 0.386993, 0.00107563, 0, 1, 1, 0.00488216, 0, 0, 1, 0.0048822, 0, 0, 1, 0.00488265, 0, 0, 0.999997, 0.00488463, 0, 0, 0.999988, 0.00488999, 0, 0, 0.999974, 0.00490129, 0, 0, 0.999946, 0.00492191, 0, 0, 0.999897, 0.00495598, 0, 0, 0.999825, 0.00500855, 0, 7.44791e-05, 0.999718, 0.00508559, 0, 0.000712744, 0.999565, 0.005194, 0, 0.00215249, 0.999352, 0.00534147, 0, 0.00444576, 0.999046, 0.00553523, 0, 0.00759218, 0.998492, 0.00577016, 0, 0.0115714, 0.995564, 0.00578487, 0, 0.0163557, 0.993339, 0.00586414, 0, 0.021915, 0.991834, 0.00606002, 0, 0.0282201, 0.990496, 0.00633312, 0, 0.0352433, 0.987826, 0.00651941, 0, 0.042959, 0.98383, 0.00660842, 0, 0.0513439, 0.98109, 0.00685523, 0, 0.0603772, 0.976131, 0.00695778, 0, 0.0700402, 0.971922, 0.00714236, 0, 0.0803163, 0.965901, 0.00721437, 0, 0.0911908, 0.959606, 0.00732017, 0, 0.102651, 0.952504, 0.00735788, 0, 0.114686, 0.944365, 0.00738493, 0, 0.127286, 0.935652, 0.00737969, 0, 0.140443, 0.925813, 0.00733612, 0, 0.154151, 0.914397, 0.00723094, 0, 0.168405, 0.903257, 0.00714002, 0, 0.183201, 0.890015, 0.00700149, 0, 0.198536, 0.876014, 0.00682813, 0, 0.214409, 0.861436, 0.00665567, 0, 0.23082, 0.845752, 0.00644526, 0, 0.24777, 0.829169, 0.00621635, 0, 0.265263, 0.813435, 0.00597789, 0, 0.283301, 0.799701, 0.00575694, 0, 0.301889, 0.785726, 0.00549866, 0, 0.321035, 0.77152, 0.0052503, 0, 0.340746, 0.75683, 0.00499619, 0, 0.361032, 0.741951, 0.0047543, 0, 0.381904, 0.726367, 0.0045084, 0, 0.403374, 0.710537, 0.00426784, 0, 0.425457, 0.693965, 0.00403487, 0, 0.448169, 0.677724, 0.0038075, 0, 0.47153, 0.66117, 0.00359431, 0, 0.495561, 0.644274, 0.00338354, 0, 0.520284, 0.627449, 0.00318163, 0, 0.545725, 0.611645, 0.00299672, 0, 0.571911, 0.595614, 0.00281016, 0, 0.598873, 0.579426, 0.00264252, 0, 0.62664, 0.563016, 0.00247509, 0, 0.655239, 0.546728, 0.00232647, 0, 0.684692, 0.530539, 0.00217803, 0, 0.714999, 0.514164, 0.00204216, 0, 0.746106, 0.498344, 0.00191403, 0, 0.777778, 0.482957, 0.00179203, 0, 0.809524, 0.467336, 0.00167695, 0, 0.84127, 0.451994, 0.00157567, 0, 0.873016, 0.436514, 0.00147113, 0, 0.904762, 0.42178, 0.00138034, 0, 0.936508, 0.407271, 0.00129219, 0, 0.968254, 0.392822, 0.0012098, 0, 1, 1, 0.00637427, 0, 0, 1, 0.00637431, 0, 0, 0.999999, 0.00637485, 0, 0, 0.999996, 0.00637721, 0, 0, 0.999987, 0.00638357, 0, 0, 0.999971, 0.006397, 0, 0, 0.999939, 0.00642142, 0, 0, 0.999888, 0.00646177, 0, 0, 0.999807, 0.00652387, 0, 0.000207916, 0.999689, 0.00661454, 0, 0.00112051, 0.99952, 0.00674155, 0, 0.00287719, 0.999283, 0.00691313, 0, 0.00550145, 0.998936, 0.00713598, 0, 0.00897928, 0.998165, 0.00738501, 0, 0.0132829, 0.994847, 0.00734388, 0, 0.01838, 0.993182, 0.00749991, 0, 0.0242381, 0.991665, 0.0077246, 0, 0.030826, 0.989708, 0.00797579, 0, 0.0381152, 0.986663, 0.00813011, 0, 0.0460794, 0.983288, 0.00830365, 0, 0.0546951, 0.980104, 0.00853496, 0, 0.0639411, 0.974855, 0.00861045, 0, 0.0737988, 0.97045, 0.00879133, 0, 0.0842516, 0.964509, 0.00886377, 0, 0.0952848, 0.957594, 0.00890346, 0, 0.106886, 0.950546, 0.00893289, 0, 0.119044, 0.942225, 0.00890074, 0, 0.131749, 0.933365, 0.00886826, 0, 0.144994, 0.923202, 0.0087316, 0, 0.158772, 0.912605, 0.00863082, 0, 0.173078, 0.901099, 0.00847403, 0, 0.187908, 0.888177, 0.00825838, 0, 0.203261, 0.873955, 0.00801834, 0, 0.219134, 0.860091, 0.00779026, 0, 0.235527, 0.84434, 0.00752478, 0, 0.252443, 0.828517, 0.00724074, 0, 0.269883, 0.81239, 0.00693769, 0, 0.287851, 0.79721, 0.00664817, 0, 0.306352, 0.783489, 0.00634763, 0, 0.325393, 0.769514, 0.00604221, 0, 0.344981, 0.755419, 0.00573568, 0, 0.365126, 0.741083, 0.00544359, 0, 0.385839, 0.726059, 0.00515515, 0, 0.407132, 0.710809, 0.00487139, 0, 0.42902, 0.695052, 0.00459846, 0, 0.45152, 0.678886, 0.00433412, 0, 0.474651, 0.663042, 0.00407981, 0, 0.498433, 0.646634, 0.00384264, 0, 0.52289, 0.630117, 0.00360897, 0, 0.548048, 0.613804, 0.00338863, 0, 0.573936, 0.598338, 0.00318486, 0, 0.600584, 0.582687, 0.00298377, 0, 0.628027, 0.566809, 0.00280082, 0, 0.656295, 0.550817, 0.00262255, 0, 0.685417, 0.534937, 0.00245835, 0, 0.715406, 0.519151, 0.00230574, 0, 0.74624, 0.503118, 0.0021549, 0, 0.777778, 0.487723, 0.00202008, 0, 0.809524, 0.472725, 0.00189355, 0, 0.84127, 0.457599, 0.00177108, 0, 0.873016, 0.442558, 0.00165843, 0, 0.904762, 0.427624, 0.00155494, 0, 0.936508, 0.413171, 0.00145273, 0, 0.968254, 0.399122, 0.00136454, 0, 1, 1, 0.00826496, 0, 0, 1, 0.00826499, 0, 0, 1, 0.00826564, 0, 0, 0.999996, 0.00826842, 0, 0, 0.999987, 0.00827589, 0, 0, 0.999967, 0.00829167, 0, 0, 0.999933, 0.00832037, 0, 0, 0.999876, 0.00836768, 0, 1.09338e-05, 0.999786, 0.00844031, 0, 0.000427145, 0.999655, 0.00854603, 0, 0.0016384, 0.999468, 0.00869337, 0, 0.00372392, 0.999203, 0.008891, 0, 0.00668513, 0.998803, 0.00914387, 0, 0.0104968, 0.99748, 0.00935838, 0, 0.015125, 0.994446, 0.00933309, 0, 0.0205338, 0.99292, 0.00953084, 0, 0.0266884, 0.991414, 0.0097893, 0, 0.0335565, 0.989049, 0.0100228, 0, 0.0411086, 0.98582, 0.0101664, 0, 0.0493181, 0.982441, 0.0103582, 0, 0.0581613, 0.978595, 0.0105292, 0, 0.0676169, 0.973495, 0.0106274, 0, 0.0776661, 0.968405, 0.0107261, 0, 0.0882926, 0.962717, 0.0108234, 0, 0.0994817, 0.955478, 0.0108102, 0, 0.111221, 0.948275, 0.0107914, 0, 0.123499, 0.940006, 0.0107161, 0, 0.136308, 0.930831, 0.0106309, 0, 0.149639, 0.920648, 0.0104083, 0, 0.163485, 0.910205, 0.0102312, 0, 0.177843, 0.898445, 0.0100051, 0, 0.192707, 0.885986, 0.00971928, 0, 0.208077, 0.872204, 0.00940747, 0, 0.22395, 0.858436, 0.0091085, 0, 0.240326, 0.843454, 0.00876595, 0, 0.257208, 0.827437, 0.00839794, 0, 0.274596, 0.811488, 0.00803692, 0, 0.292496, 0.796039, 0.00767352, 0, 0.310911, 0.781083, 0.0073097, 0, 0.329849, 0.767642, 0.00694032, 0, 0.349316, 0.753901, 0.00657476, 0, 0.369323, 0.740131, 0.00622699, 0, 0.38988, 0.725845, 0.0058838, 0, 0.410999, 0.710991, 0.00555586, 0, 0.432696, 0.696002, 0.00523089, 0, 0.454987, 0.680461, 0.00492494, 0, 0.47789, 0.664875, 0.00463464, 0, 0.501426, 0.649273, 0.00435422, 0, 0.52562, 0.63302, 0.0040875, 0, 0.550498, 0.61705, 0.00384075, 0, 0.576089, 0.601154, 0.00359557, 0, 0.602427, 0.586008, 0.00337636, 0, 0.629544, 0.570699, 0.00316019, 0, 0.657479, 0.555166, 0.00296033, 0, 0.686264, 0.539645, 0.00277552, 0, 0.715924, 0.524159, 0.00259499, 0, 0.746459, 0.508682, 0.00243257, 0, 0.777789, 0.493163, 0.00227851, 0, 0.809524, 0.478004, 0.00213083, 0, 0.84127, 0.46347, 0.00199502, 0, 0.873016, 0.448778, 0.00186967, 0, 0.904762, 0.434105, 0.00174732, 0, 0.936508, 0.419576, 0.00163861, 0, 0.968254, 0.405541, 0.00153341, 0, 1, 1, 0.0106462, 0, 0, 1, 0.0106462, 0, 0, 0.999999, 0.010647, 0, 0, 0.999995, 0.0106502, 0, 0, 0.999985, 0.0106589, 0, 0, 0.999964, 0.0106773, 0, 0, 0.999925, 0.0107106, 0, 0, 0.999861, 0.0107655, 0, 7.12986e-05, 0.999763, 0.0108497, 0, 0.000743959, 0.999616, 0.0109716, 0, 0.00227361, 0.999408, 0.0111408, 0, 0.0046983, 0.999112, 0.0113659, 0, 0.00800158, 0.998637, 0.0116475, 0, 0.0121493, 0.996223, 0.0117231, 0, 0.0171023, 0.994006, 0.0118064, 0, 0.0228218, 0.992444, 0.0120254, 0, 0.0292711, 0.991028, 0.0123314, 0, 0.036417, 0.98803, 0.0124954, 0, 0.0442295, 0.984816, 0.0126538, 0, 0.0526815, 0.981399, 0.0128537, 0, 0.0617492, 0.977085, 0.0129694, 0, 0.0714114, 0.972154, 0.013091, 0, 0.0816495, 0.966617, 0.0131166, 0, 0.0924472, 0.960628, 0.0131583, 0, 0.10379, 0.953295, 0.0131094, 0, 0.115665, 0.94575, 0.0129966, 0, 0.128062, 0.937654, 0.0128796, 0, 0.140972, 0.927716, 0.0126477, 0, 0.154387, 0.917932, 0.0123889, 0, 0.168301, 0.907719, 0.012131, 0, 0.182709, 0.89584, 0.0118013, 0, 0.197608, 0.883526, 0.0114145, 0, 0.212994, 0.870301, 0.0110075, 0, 0.228867, 0.856272, 0.0106019, 0, 0.245227, 0.842251, 0.0101938, 0, 0.262074, 0.826466, 0.00973254, 0, 0.279412, 0.810859, 0.0092846, 0, 0.297244, 0.795051, 0.00883304, 0, 0.315575, 0.780053, 0.00840272, 0, 0.334412, 0.76575, 0.00796438, 0, 0.35376, 0.752298, 0.00752526, 0, 0.373631, 0.739153, 0.00711486, 0, 0.394034, 0.725514, 0.00670361, 0, 0.414983, 0.711473, 0.00632656, 0, 0.436491, 0.696936, 0.00595206, 0, 0.458575, 0.682126, 0.00559191, 0, 0.481253, 0.667027, 0.00525362, 0, 0.504547, 0.651875, 0.00493805, 0, 0.528481, 0.636463, 0.00462848, 0, 0.553081, 0.620641, 0.00433936, 0, 0.578377, 0.604931, 0.00407, 0, 0.604404, 0.589549, 0.00380864, 0, 0.631197, 0.574712, 0.00357049, 0, 0.658795, 0.559775, 0.00334466, 0, 0.687238, 0.544514, 0.00312505, 0, 0.716559, 0.529555, 0.00293199, 0, 0.746776, 0.514402, 0.00274204, 0, 0.777849, 0.499302, 0.00256647, 0, 0.809524, 0.484114, 0.00239901, 0, 0.84127, 0.469308, 0.00225148, 0, 0.873016, 0.455133, 0.00210178, 0, 0.904762, 0.440939, 0.0019727, 0, 0.936508, 0.426627, 0.00184382, 0, 0.968254, 0.412509, 0.00172548, 0, 1, 1, 0.013628, 0, 0, 1, 0.0136281, 0, 0, 0.999999, 0.0136289, 0, 0, 0.999995, 0.0136327, 0, 0, 0.999983, 0.0136427, 0, 0, 0.99996, 0.0136638, 0, 0, 0.999917, 0.0137022, 0, 0, 0.999846, 0.0137652, 0, 0.000204597, 0.999736, 0.0138615, 0, 0.00116837, 0.999573, 0.0140007, 0, 0.00303325, 0.99934, 0.0141927, 0, 0.00580613, 0.999004, 0.0144457, 0, 0.00945626, 0.998407, 0.0147489, 0, 0.0139421, 0.995464, 0.014731, 0, 0.0192202, 0.993328, 0.0148283, 0, 0.0252495, 0.991799, 0.0150797, 0, 0.0319921, 0.990397, 0.0154316, 0, 0.0394138, 0.986835, 0.0155005, 0, 0.0474843, 0.983938, 0.0157308, 0, 0.0561763, 0.980154, 0.0158753, 0, 0.0654661, 0.975659, 0.0159581, 0, 0.0753326, 0.970171, 0.0159832, 0, 0.0857571, 0.964803, 0.0160084, 0, 0.0967236, 0.958366, 0.0159484, 0, 0.108218, 0.950613, 0.0158001, 0, 0.120227, 0.942874, 0.0155845, 0, 0.132741, 0.935005, 0.0154292, 0, 0.145751, 0.924991, 0.0150742, 0, 0.159249, 0.914814, 0.0146757, 0, 0.17323, 0.904743, 0.0143097, 0, 0.187687, 0.893216, 0.0138695, 0, 0.202619, 0.880769, 0.0133706, 0, 0.218021, 0.868136, 0.0128606, 0, 0.233894, 0.85469, 0.0123403, 0, 0.250238, 0.840593, 0.0118091, 0, 0.267052, 0.825808, 0.011253, 0, 0.284341, 0.81009, 0.0107099, 0, 0.302106, 0.79504, 0.0101636, 0, 0.320354, 0.779757, 0.00964041, 0, 0.33909, 0.764697, 0.00911896, 0, 0.358322, 0.750913, 0.00859533, 0, 0.378059, 0.738175, 0.00811592, 0, 0.398311, 0.725242, 0.00764504, 0, 0.41909, 0.711864, 0.00718885, 0, 0.440412, 0.698009, 0.00675843, 0, 0.462292, 0.683841, 0.00634984, 0, 0.484748, 0.669391, 0.00595502, 0, 0.507802, 0.654731, 0.00558671, 0, 0.531477, 0.639805, 0.00523578, 0, 0.555802, 0.624789, 0.00490834, 0, 0.580805, 0.609325, 0.00459448, 0, 0.606522, 0.593975, 0.00430342, 0, 0.63299, 0.578983, 0.00403019, 0, 0.66025, 0.564442, 0.0037707, 0, 0.688346, 0.549835, 0.0035316, 0, 0.717319, 0.535039, 0.00330255, 0, 0.7472, 0.520403, 0.00308932, 0, 0.777982, 0.505687, 0.00289335, 0, 0.809524, 0.490939, 0.00270818, 0, 0.84127, 0.476233, 0.0025343, 0, 0.873016, 0.461624, 0.00237097, 0, 0.904762, 0.447833, 0.00222065, 0, 0.936508, 0.433992, 0.00207561, 0, 0.968254, 0.420147, 0.00194955, 0, 1, 1, 0.0173415, 0, 0, 1, 0.0173416, 0, 0, 0.999999, 0.0173426, 0, 0, 0.999995, 0.0173468, 0, 0, 0.999983, 0.0173582, 0, 0, 0.999954, 0.0173822, 0, 0, 0.999908, 0.0174258, 0, 6.69501e-06, 0.999828, 0.0174973, 0, 0.000427399, 0.999705, 0.0176063, 0, 0.00171019, 0.999524, 0.0177631, 0, 0.0039248, 0.999263, 0.0179781, 0, 0.00705382, 0.998878, 0.018258, 0, 0.0110552, 0.998012, 0.0185551, 0, 0.0158812, 0.994614, 0.0184264, 0, 0.0214852, 0.993132, 0.0186385, 0, 0.0278239, 0.991563, 0.0189067, 0, 0.0348585, 0.989298, 0.0191577, 0, 0.0425544, 0.986036, 0.0192522, 0, 0.050881, 0.982558, 0.0194063, 0, 0.059811, 0.978531, 0.019486, 0, 0.0693209, 0.974198, 0.0195847, 0, 0.0793895, 0.968148, 0.0194749, 0, 0.0899984, 0.962565, 0.0194277, 0, 0.101132, 0.956041, 0.0192991, 0, 0.112775, 0.947749, 0.0189893, 0, 0.124917, 0.94018, 0.018704, 0, 0.137547, 0.93165, 0.0183458, 0, 0.150655, 0.921798, 0.0178775, 0, 0.164236, 0.911573, 0.0173618, 0, 0.178281, 0.901569, 0.0168482, 0, 0.192788, 0.890341, 0.016265, 0, 0.207752, 0.877835, 0.0156199, 0, 0.223171, 0.865472, 0.0149516, 0, 0.239044, 0.852905, 0.0143274, 0, 0.255371, 0.838906, 0.0136643, 0, 0.272153, 0.824888, 0.0129903, 0, 0.289393, 0.809977, 0.0123218, 0, 0.307093, 0.794697, 0.0116572, 0, 0.325259, 0.780028, 0.0110307, 0, 0.343896, 0.765124, 0.0104236, 0, 0.363012, 0.750411, 0.0098219, 0, 0.382617, 0.737264, 0.00924397, 0, 0.402719, 0.724799, 0.00868719, 0, 0.423332, 0.712253, 0.00816476, 0, 0.444469, 0.699267, 0.00767262, 0, 0.466146, 0.685618, 0.00719746, 0, 0.488383, 0.671736, 0.00673916, 0, 0.511199, 0.657777, 0.00631937, 0, 0.534618, 0.643497, 0.00592411, 0, 0.558668, 0.62889, 0.00553928, 0, 0.58338, 0.614299, 0.0051934, 0, 0.608787, 0.599197, 0.00485985, 0, 0.634929, 0.584175, 0.00454357, 0, 0.661849, 0.569541, 0.00425787, 0, 0.689594, 0.555193, 0.00397905, 0, 0.718211, 0.540947, 0.00372364, 0, 0.747742, 0.526593, 0.00348599, 0, 0.778205, 0.512335, 0.00326103, 0, 0.80953, 0.498017, 0.00305137, 0, 0.84127, 0.483609, 0.00285485, 0, 0.873016, 0.469368, 0.00267472, 0, 0.904762, 0.455037, 0.00249945, 0, 0.936508, 0.441493, 0.00234792, 0, 0.968254, 0.428147, 0.00219936, 0, 1, 1, 0.0219422, 0, 0, 1, 0.0219423, 0, 0, 0.999998, 0.0219434, 0, 0, 0.999993, 0.0219481, 0, 0, 0.999981, 0.021961, 0, 0, 0.999949, 0.0219879, 0, 0, 0.999896, 0.0220367, 0, 5.93194e-05, 0.999808, 0.0221167, 0, 0.00075364, 0.99967, 0.0222383, 0, 0.00237884, 0.999466, 0.0224125, 0, 0.00495612, 0.999174, 0.0226495, 0, 0.00844887, 0.998725, 0.0229525, 0, 0.0128058, 0.996979, 0.0231123, 0, 0.0179742, 0.994317, 0.0230742, 0, 0.0239047, 0.992781, 0.0232895, 0, 0.0305526, 0.991191, 0.0235734, 0, 0.0378786, 0.987787, 0.0236152, 0, 0.0458475, 0.985092, 0.0237994, 0, 0.0544287, 0.981121, 0.0238553, 0, 0.0635952, 0.976924, 0.0238706, 0, 0.0733233, 0.97218, 0.0238704, 0, 0.0835922, 0.965956, 0.0236598, 0, 0.0943839, 0.959998, 0.0234735, 0, 0.105682, 0.953245, 0.0232277, 0, 0.117474, 0.944445, 0.0226973, 0, 0.129747, 0.937087, 0.0223527, 0, 0.142491, 0.928341, 0.0218144, 0, 0.155697, 0.9184, 0.0211516, 0, 0.169358, 0.907959, 0.0204553, 0, 0.183469, 0.89808, 0.0197673, 0, 0.198024, 0.887047, 0.0189915, 0, 0.21302, 0.875221, 0.0182082, 0, 0.228455, 0.86269, 0.0173584, 0, 0.244329, 0.850735, 0.0165718, 0, 0.260639, 0.837545, 0.0157524, 0, 0.277389, 0.823639, 0.0149482, 0, 0.29458, 0.809699, 0.0141431, 0, 0.312216, 0.794797, 0.0133527, 0, 0.3303, 0.780578, 0.0126193, 0, 0.34884, 0.766019, 0.0118914, 0, 0.367842, 0.751447, 0.0111839, 0, 0.387315, 0.737275, 0.010514, 0, 0.40727, 0.724545, 0.00987277, 0, 0.427717, 0.712644, 0.00926569, 0, 0.448671, 0.700432, 0.00869029, 0, 0.470149, 0.687664, 0.00814691, 0, 0.492167, 0.674288, 0.00763012, 0, 0.514746, 0.660966, 0.00714437, 0, 0.537911, 0.647264, 0.00668457, 0, 0.561688, 0.633431, 0.00626581, 0, 0.586108, 0.619133, 0.00585593, 0, 0.611206, 0.604935, 0.00548188, 0, 0.637022, 0.590236, 0.00513288, 0, 0.663599, 0.575473, 0.0047906, 0, 0.690989, 0.561228, 0.00448895, 0, 0.719242, 0.547054, 0.00420233, 0, 0.748411, 0.533175, 0.00392869, 0, 0.778531, 0.519163, 0.00367445, 0, 0.809583, 0.505328, 0.00344097, 0, 0.84127, 0.491446, 0.00322003, 0, 0.873016, 0.477356, 0.00301283, 0, 0.904762, 0.46356, 0.00282592, 0, 0.936508, 0.449623, 0.00264956, 0, 0.968254, 0.436068, 0.00246956, 0, 1, 1, 0.0276135, 0, 0, 1, 0.0276136, 0, 0, 0.999998, 0.0276148, 0, 0, 0.999993, 0.0276201, 0, 0, 0.999976, 0.0276342, 0, 0, 0.999945, 0.027664, 0, 0, 0.999884, 0.0277179, 0, 0.00018679, 0.999784, 0.027806, 0, 0.00119607, 0.99963, 0.0279394, 0, 0.00318407, 0.999401, 0.0281295, 0, 0.00613601, 0.999066, 0.0283858, 0, 0.00999963, 0.998524, 0.0287027, 0, 0.0147164, 0.995702, 0.0286256, 0, 0.0202295, 0.993593, 0.0286733, 0, 0.0264876, 0.992067, 0.0288989, 0, 0.0334452, 0.990548, 0.0292135, 0, 0.0410621, 0.986775, 0.0291296, 0, 0.0493032, 0.984054, 0.0293099, 0, 0.0581381, 0.979481, 0.0291881, 0, 0.0675397, 0.975297, 0.0291598, 0, 0.0774848, 0.96981, 0.028954, 0, 0.0879528, 0.963524, 0.028628, 0, 0.0989258, 0.957398, 0.0283135, 0, 0.110388, 0.950088, 0.0278469, 0, 0.122327, 0.941538, 0.0271798, 0, 0.134729, 0.933332, 0.0265388, 0, 0.147587, 0.924392, 0.0257776, 0, 0.160889, 0.914581, 0.024916, 0, 0.174631, 0.904347, 0.0240242, 0, 0.188806, 0.894324, 0.0231229, 0, 0.203409, 0.883724, 0.022153, 0, 0.218437, 0.872207, 0.0211355, 0, 0.233888, 0.859927, 0.0201048, 0, 0.249761, 0.848373, 0.0191263, 0, 0.266056, 0.836023, 0.0181306, 0, 0.282774, 0.82289, 0.0171718, 0, 0.299917, 0.809324, 0.0162196, 0, 0.317488, 0.795361, 0.0152622, 0, 0.335493, 0.781253, 0.01439, 0, 0.353936, 0.767338, 0.013533, 0, 0.372825, 0.753156, 0.0127244, 0, 0.392168, 0.739122, 0.0119454, 0, 0.411976, 0.725358, 0.0112054, 0, 0.432259, 0.712949, 0.010487, 0, 0.453032, 0.701621, 0.00984032, 0, 0.47431, 0.689703, 0.00921495, 0, 0.496111, 0.677216, 0.00862492, 0, 0.518456, 0.664217, 0.00806882, 0, 0.541367, 0.65137, 0.00755922, 0, 0.564872, 0.638, 0.00705705, 0, 0.589001, 0.62453, 0.00661266, 0, 0.613789, 0.610601, 0.00618432, 0, 0.639277, 0.59676, 0.00578033, 0, 0.66551, 0.582433, 0.00540927, 0, 0.692539, 0.568026, 0.00506104, 0, 0.720422, 0.55414, 0.0047353, 0, 0.749216, 0.540178, 0.00442889, 0, 0.778974, 0.526513, 0.00414363, 0, 0.809711, 0.512954, 0.00388237, 0, 0.84127, 0.499403, 0.00362875, 0, 0.873016, 0.486026, 0.00340827, 0, 0.904762, 0.472345, 0.00318598, 0, 0.936508, 0.458828, 0.00297635, 0, 0.968254, 0.445379, 0.00279447, 0, 1, 1, 0.0345716, 0, 0, 1, 0.0345717, 0, 0, 0.999999, 0.034573, 0, 0, 0.999991, 0.0345787, 0, 0, 0.999974, 0.0345941, 0, 0, 0.999937, 0.0346263, 0, 1.88589e-06, 0.999869, 0.0346847, 0, 0.000409238, 0.999757, 0.0347798, 0, 0.0017674, 0.999582, 0.0349233, 0, 0.00413658, 0.999322, 0.0351265, 0, 0.00747408, 0.998939, 0.0353967, 0, 0.0117157, 0.998219, 0.0357018, 0, 0.0167966, 0.994974, 0.0354726, 0, 0.0226572, 0.993201, 0.0355621, 0, 0.0292445, 0.991573, 0.0357641, 0, 0.0365123, 0.989301, 0.0359252, 0, 0.0444203, 0.985712, 0.0358017, 0, 0.0529334, 0.982411, 0.0358353, 0, 0.0620214, 0.977827, 0.035617, 0, 0.0716574, 0.973278, 0.0354398, 0, 0.0818186, 0.967397, 0.0350483, 0, 0.0924846, 0.960696, 0.0344795, 0, 0.103638, 0.954349, 0.0339861, 0, 0.115263, 0.946066, 0.0331323, 0, 0.127348, 0.938012, 0.032359, 0, 0.13988, 0.929413, 0.0314413, 0, 0.152849, 0.920355, 0.0304103, 0, 0.166248, 0.910586, 0.0292785, 0, 0.18007, 0.900609, 0.0281391, 0, 0.194308, 0.890093, 0.0269103, 0, 0.208958, 0.880013, 0.0257269, 0, 0.224018, 0.869001, 0.0244671, 0, 0.239485, 0.85751, 0.0232252, 0, 0.255359, 0.84582, 0.0220117, 0, 0.271638, 0.834383, 0.0208274, 0, 0.288324, 0.822158, 0.0196628, 0, 0.305419, 0.809056, 0.0185306, 0, 0.322927, 0.795832, 0.0174174, 0, 0.340851, 0.782547, 0.0163758, 0, 0.359199, 0.7689, 0.015391, 0, 0.377975, 0.755526, 0.0144488, 0, 0.397189, 0.741681, 0.0135372, 0, 0.416851, 0.728178, 0.0126957, 0, 0.436971, 0.714642, 0.0118812, 0, 0.457564, 0.702756, 0.0111165, 0, 0.478644, 0.69175, 0.0104145, 0, 0.500229, 0.680159, 0.00974439, 0, 0.522339, 0.668073, 0.00911926, 0, 0.544997, 0.655405, 0.00851393, 0, 0.56823, 0.642921, 0.00797637, 0, 0.592068, 0.629993, 0.00745119, 0, 0.616546, 0.616828, 0.00696972, 0, 0.641705, 0.603305, 0.00652425, 0, 0.66759, 0.589833, 0.00610188, 0, 0.694255, 0.575945, 0.00570834, 0, 0.72176, 0.561745, 0.00533384, 0, 0.750168, 0.548277, 0.00500001, 0, 0.779545, 0.534467, 0.00467582, 0, 0.809933, 0.521032, 0.00438092, 0, 0.841272, 0.507877, 0.00410348, 0, 0.873016, 0.494654, 0.00383618, 0, 0.904762, 0.481592, 0.00358699, 0, 0.936508, 0.468509, 0.00337281, 0, 0.968254, 0.455293, 0.00316196, 0, 1, 1, 0.0430698, 0, 0, 1, 0.0430699, 0, 0, 0.999998, 0.0430713, 0, 0, 0.999991, 0.0430773, 0, 0, 0.99997, 0.0430936, 0, 0, 0.999928, 0.0431277, 0, 4.06396e-05, 0.999852, 0.0431893, 0, 0.000744376, 0.999724, 0.0432895, 0, 0.0024806, 0.999527, 0.0434397, 0, 0.00524779, 0.99923, 0.0436507, 0, 0.00898164, 0.998783, 0.0439255, 0, 0.0136083, 0.997507, 0.0441104, 0, 0.0190582, 0.994418, 0.0438225, 0, 0.0252694, 0.992864, 0.0439396, 0, 0.0321879, 0.991127, 0.0440962, 0, 0.039767, 0.987331, 0.0438408, 0, 0.0479667, 0.984819, 0.0438991, 0, 0.056752, 0.980384, 0.0435906, 0, 0.0660929, 0.975846, 0.0432543, 0, 0.075963, 0.970748, 0.0428293, 0, 0.0863398, 0.964303, 0.042153, 0, 0.0972035, 0.95772, 0.0414111, 0, 0.108537, 0.950747, 0.0405893, 0, 0.120325, 0.942533, 0.0394887, 0, 0.132554, 0.934045, 0.0383544, 0, 0.145215, 0.924942, 0.037057, 0, 0.158296, 0.915811, 0.0356993, 0, 0.17179, 0.90612, 0.0342401, 0, 0.185691, 0.896434, 0.0328078, 0, 0.199993, 0.886021, 0.031288, 0, 0.214691, 0.876081, 0.0297776, 0, 0.229782, 0.865608, 0.0282334, 0, 0.245265, 0.854924, 0.026749, 0, 0.261138, 0.843607, 0.02526, 0, 0.277401, 0.832456, 0.0238214, 0, 0.294056, 0.821342, 0.0224682, 0, 0.311104, 0.809303, 0.0211297, 0, 0.328548, 0.796468, 0.0198387, 0, 0.346394, 0.784046, 0.0186227, 0, 0.364645, 0.771262, 0.0174561, 0, 0.38331, 0.758118, 0.0163806, 0, 0.402396, 0.745075, 0.0153287, 0, 0.421912, 0.731926, 0.0143647, 0, 0.44187, 0.71863, 0.0134363, 0, 0.462283, 0.705414, 0.0125603, 0, 0.483165, 0.693792, 0.0117508, 0, 0.504535, 0.683108, 0.0110016, 0, 0.52641, 0.67183, 0.0102757, 0, 0.548816, 0.66015, 0.00962044, 0, 0.571776, 0.647907, 0.00898031, 0, 0.595323, 0.635734, 0.00840811, 0, 0.619489, 0.623208, 0.00786211, 0, 0.644317, 0.610438, 0.00734953, 0, 0.669852, 0.597345, 0.00687688, 0, 0.696148, 0.584138, 0.00643469, 0, 0.723267, 0.5707, 0.00602236, 0, 0.75128, 0.556966, 0.0056324, 0, 0.780258, 0.543607, 0.00528277, 0, 0.810268, 0.530213, 0.00493999, 0, 0.841311, 0.516912, 0.00462265, 0, 0.873016, 0.503916, 0.0043307, 0, 0.904762, 0.491146, 0.00406858, 0, 0.936508, 0.478439, 0.00381436, 0, 0.968254, 0.465834, 0.00358003, 0, 1, 1, 0.0534039, 0, 0, 1, 0.053404, 0, 0, 0.999998, 0.0534055, 0, 0, 0.999989, 0.0534116, 0, 0, 0.999968, 0.0534283, 0, 0, 0.999918, 0.0534633, 0, 0.000155895, 0.99983, 0.0535262, 0, 0.00120914, 0.999685, 0.0536281, 0, 0.00334944, 0.999461, 0.0537799, 0, 0.00653077, 0.999119, 0.0539902, 0, 0.0106718, 0.998582, 0.0542524, 0, 0.0156907, 0.995919, 0.0540318, 0, 0.0215147, 0.993735, 0.0538914, 0, 0.0280801, 0.992126, 0.0539557, 0, 0.0353323, 0.990266, 0.0540401, 0, 0.0432247, 0.986317, 0.0536064, 0, 0.0517172, 0.983213, 0.0534425, 0, 0.0607754, 0.978303, 0.0528622, 0, 0.0703698, 0.973665, 0.0523363, 0, 0.0804742, 0.968091, 0.0516165, 0, 0.0910667, 0.961026, 0.0505434, 0, 0.102128, 0.954333, 0.049523, 0, 0.113641, 0.946372, 0.0481698, 0, 0.125591, 0.938254, 0.0467674, 0, 0.137965, 0.929516, 0.0452341, 0, 0.150754, 0.920106, 0.0435083, 0, 0.163947, 0.910899, 0.0417399, 0, 0.177537, 0.901532, 0.0399389, 0, 0.191516, 0.891919, 0.0380901, 0, 0.205881, 0.882006, 0.0362341, 0, 0.220626, 0.871965, 0.0343444, 0, 0.235749, 0.862145, 0.0324832, 0, 0.251248, 0.852058, 0.0306681, 0, 0.267121, 0.84161, 0.0289097, 0, 0.283368, 0.830806, 0.0272079, 0, 0.299992, 0.820476, 0.0256089, 0, 0.316992, 0.809514, 0.0240394, 0, 0.334374, 0.797865, 0.0225379, 0, 0.35214, 0.785621, 0.0211235, 0, 0.370296, 0.773765, 0.0197908, 0, 0.388849, 0.761629, 0.0185235, 0, 0.407807, 0.748891, 0.0173358, 0, 0.427178, 0.736437, 0.0162305, 0, 0.446974, 0.723707, 0.0151778, 0, 0.467207, 0.710606, 0.0141791, 0, 0.487892, 0.698019, 0.0132592, 0, 0.509046, 0.686203, 0.0123887, 0, 0.530687, 0.675692, 0.0115976, 0, 0.552839, 0.664826, 0.0108325, 0, 0.575527, 0.65349, 0.0101348, 0, 0.59878, 0.641774, 0.00947756, 0, 0.622634, 0.629794, 0.00886058, 0, 0.647128, 0.617647, 0.00828526, 0, 0.672308, 0.60534, 0.00775312, 0, 0.698231, 0.592718, 0.00726033, 0, 0.724958, 0.579746, 0.00679731, 0, 0.752563, 0.566763, 0.00636111, 0, 0.781127, 0.553515, 0.00595228, 0, 0.810733, 0.540118, 0.00556876, 0, 0.841426, 0.527325, 0.00523051, 0, 0.873016, 0.514265, 0.00490712, 0, 0.904762, 0.501406, 0.00460297, 0, 0.936508, 0.488922, 0.00431247, 0, 0.968254, 0.476541, 0.0040472, 0, 1, 1, 0.0659184, 0, 0, 1, 0.0659185, 0, 0, 0.999998, 0.06592, 0, 0, 0.999988, 0.0659259, 0, 0, 0.999963, 0.0659423, 0, 0, 0.999907, 0.0659764, 0, 0.000374198, 0.999806, 0.0660376, 0, 0.00182071, 0.999639, 0.0661361, 0, 0.0043894, 0.999378, 0.0662814, 0, 0.00800055, 0.998985, 0.0664779, 0, 0.0125594, 0.998285, 0.0666914, 0, 0.0179786, 0.995071, 0.0661989, 0, 0.0241822, 0.993172, 0.0660454, 0, 0.031106, 0.991438, 0.0660105, 0, 0.0386952, 0.988428, 0.0656875, 0, 0.0469032, 0.985218, 0.0652913, 0, 0.0556905, 0.981128, 0.0647107, 0, 0.065023, 0.976015, 0.0638491, 0, 0.0748717, 0.97097, 0.062993, 0, 0.0852112, 0.964582, 0.0617927, 0, 0.0960199, 0.957383, 0.0603626, 0, 0.107279, 0.949969, 0.0588128, 0, 0.118971, 0.941843, 0.0570274, 0, 0.131084, 0.933624, 0.0551885, 0, 0.143604, 0.924543, 0.053122, 0, 0.156521, 0.914919, 0.0508897, 0, 0.169825, 0.905773, 0.0486418, 0, 0.18351, 0.896434, 0.0463364, 0, 0.197569, 0.887195, 0.0440623, 0, 0.211997, 0.877706, 0.0417799, 0, 0.226789, 0.867719, 0.03945, 0, 0.241944, 0.858587, 0.037243, 0, 0.257458, 0.849317, 0.0350956, 0, 0.273331, 0.839585, 0.0329852, 0, 0.289563, 0.829856, 0.0310028, 0, 0.306154, 0.819589, 0.0290953, 0, 0.323108, 0.809714, 0.0272738, 0, 0.340426, 0.79934, 0.0255631, 0, 0.358113, 0.788224, 0.0239175, 0, 0.376175, 0.776619, 0.0223831, 0, 0.394616, 0.76521, 0.0209298, 0, 0.413445, 0.753716, 0.0195786, 0, 0.432671, 0.741564, 0.0183001, 0, 0.452305, 0.729413, 0.0171259, 0, 0.472358, 0.717146, 0.0159933, 0, 0.492845, 0.70436, 0.0149495, 0, 0.513783, 0.69219, 0.0139681, 0, 0.535189, 0.680289, 0.0130577, 0, 0.557087, 0.669611, 0.0122198, 0, 0.5795, 0.659113, 0.0114174, 0, 0.602459, 0.648148, 0.0106729, 0, 0.625997, 0.636905, 0.00998997, 0, 0.650154, 0.625154, 0.00934313, 0, 0.674976, 0.613481, 0.00874839, 0, 0.700518, 0.60154, 0.00818265, 0, 0.726845, 0.58943, 0.00766889, 0, 0.754032, 0.576828, 0.00717153, 0, 0.782167, 0.564194, 0.00672696, 0, 0.811344, 0.551501, 0.00630863, 0, 0.841644, 0.538635, 0.00592177, 0, 0.873016, 0.525724, 0.00554888, 0, 0.904762, 0.513209, 0.00520225, 0, 0.936508, 0.500457, 0.00488231, 0, 0.968254, 0.48799, 0.00457153, 0, 1, 1, 0.0810131, 0, 0, 1, 0.0810133, 0, 0, 0.999997, 0.0810145, 0, 0, 0.999985, 0.08102, 0, 0, 0.999956, 0.0810347, 0, 1.95026e-05, 0.999893, 0.0810656, 0, 0.000719316, 0.999777, 0.0811205, 0, 0.00259774, 0.999583, 0.081208, 0, 0.00561807, 0.999281, 0.0813343, 0, 0.00967472, 0.998813, 0.0814969, 0, 0.0146627, 0.997597, 0.0815217, 0, 0.0204902, 0.994379, 0.0808502, 0, 0.0270802, 0.992744, 0.0806792, 0, 0.0343674, 0.990745, 0.0804589, 0, 0.0422974, 0.986646, 0.0796107, 0, 0.0508242, 0.983611, 0.0790913, 0, 0.0599087, 0.978869, 0.0780746, 0, 0.0695175, 0.973475, 0.0768218, 0, 0.0796223, 0.967845, 0.0754926, 0, 0.0901983, 0.960778, 0.0737063, 0, 0.101224, 0.953333, 0.0718052, 0, 0.112682, 0.945274, 0.0695946, 0, 0.124555, 0.936955, 0.0672492, 0, 0.136831, 0.928319, 0.0647732, 0, 0.149496, 0.919075, 0.0620947, 0, 0.162542, 0.909114, 0.0591816, 0, 0.175958, 0.900137, 0.0563917, 0, 0.189739, 0.891069, 0.0535392, 0, 0.203877, 0.882262, 0.0507642, 0, 0.218368, 0.873232, 0.0479793, 0, 0.233208, 0.864042, 0.045226, 0, 0.248393, 0.855002, 0.0425413, 0, 0.263923, 0.846569, 0.0400126, 0, 0.279796, 0.837714, 0.0375269, 0, 0.296012, 0.828918, 0.0352027, 0, 0.312573, 0.819783, 0.0330011, 0, 0.329479, 0.810129, 0.0308908, 0, 0.346734, 0.800866, 0.0289112, 0, 0.364342, 0.79093, 0.0270255, 0, 0.382307, 0.780593, 0.0252758, 0, 0.400637, 0.769511, 0.0236178, 0, 0.419337, 0.758558, 0.0220652, 0, 0.438418, 0.747632, 0.0206289, 0, 0.457889, 0.736146, 0.0192873, 0, 0.477761, 0.724093, 0.0180333, 0, 0.49805, 0.71234, 0.0168264, 0, 0.51877, 0.700201, 0.015746, 0, 0.53994, 0.687949, 0.0147027, 0, 0.561581, 0.676163, 0.0137512, 0, 0.583718, 0.665001, 0.0128655, 0, 0.60638, 0.65472, 0.0120366, 0, 0.629599, 0.644213, 0.0112604, 0, 0.653415, 0.633382, 0.0105413, 0, 0.677874, 0.62212, 0.00986498, 0, 0.70303, 0.610631, 0.00923308, 0, 0.728948, 0.599078, 0.00864206, 0, 0.755706, 0.587519, 0.00811784, 0, 0.783396, 0.575505, 0.00761237, 0, 0.812121, 0.563148, 0.00713949, 0, 0.841989, 0.550828, 0.00668379, 0, 0.873035, 0.538458, 0.00627715, 0, 0.904762, 0.525905, 0.00588336, 0, 0.936508, 0.513517, 0.00552687, 0, 0.968254, 0.501395, 0.00519681, 0, 1, 1, 0.0991506, 0, 0, 1, 0.0991504, 0, 0, 0.999996, 0.0991515, 0, 0, 0.999984, 0.0991558, 0, 0, 0.999947, 0.0991672, 0, 0.000114389, 0.999874, 0.0991912, 0, 0.00121503, 0.999739, 0.0992331, 0, 0.00356108, 0.999514, 0.0992983, 0, 0.00705578, 0.999159, 0.0993877, 0, 0.011574, 0.998586, 0.0994837, 0, 0.017003, 0.995731, 0.0988425, 0, 0.0232484, 0.993384, 0.098276, 0, 0.0302318, 0.991615, 0.0979269, 0, 0.0378884, 0.989029, 0.0973432, 0, 0.0461641, 0.985373, 0.0963539, 0, 0.0550136, 0.981278, 0.0952306, 0, 0.0643988, 0.975777, 0.0936233, 0, 0.0742868, 0.970526, 0.0920219, 0, 0.0846501, 0.963755, 0.0898912, 0, 0.0954644, 0.956676, 0.0876064, 0, 0.106709, 0.948099, 0.0847751, 0, 0.118367, 0.939718, 0.0818638, 0, 0.130423, 0.931305, 0.078857, 0, 0.142862, 0.922342, 0.0756127, 0, 0.155674, 0.912842, 0.0721473, 0, 0.168849, 0.903304, 0.0686195, 0, 0.182378, 0.89411, 0.0650589, 0, 0.196255, 0.885512, 0.0616022, 0, 0.210473, 0.877193, 0.0582434, 0, 0.225027, 0.86877, 0.0548979, 0, 0.239915, 0.860267, 0.0516095, 0, 0.255132, 0.851915, 0.048468, 0, 0.270678, 0.843912, 0.0454447, 0, 0.286551, 0.83604, 0.0425612, 0, 0.302751, 0.828245, 0.0398752, 0, 0.31928, 0.820159, 0.0373198, 0, 0.336138, 0.81167, 0.034916, 0, 0.35333, 0.802659, 0.0326402, 0, 0.370858, 0.793921, 0.0304901, 0, 0.388728, 0.784713, 0.0284857, 0, 0.406944, 0.774946, 0.0266186, 0, 0.425515, 0.76448, 0.0248593, 0, 0.444449, 0.753793, 0.0232114, 0, 0.463756, 0.743506, 0.0217039, 0, 0.483447, 0.732555, 0.0202841, 0, 0.503535, 0.720965, 0.0189648, 0, 0.524036, 0.709422, 0.0177189, 0, 0.544968, 0.697756, 0.0165626, 0, 0.56635, 0.685565, 0.015483, 0, 0.588208, 0.673987, 0.0144892, 0, 0.610569, 0.66244, 0.0135607, 0, 0.633466, 0.651675, 0.0126956, 0, 0.656936, 0.641598, 0.0118788, 0, 0.681025, 0.63121, 0.0111261, 0, 0.705788, 0.620514, 0.010437, 0, 0.731289, 0.609366, 0.00978747, 0, 0.757606, 0.598137, 0.00917257, 0, 0.784834, 0.586966, 0.00859778, 0, 0.813085, 0.575549, 0.00806803, 0, 0.842485, 0.563797, 0.00757294, 0, 0.87313, 0.551758, 0.00710592, 0, 0.904762, 0.539894, 0.0066841, 0, 0.936508, 0.527901, 0.00627901, 0, 0.968254, 0.515819, 0.00590506, 0, 1, 1, 0.120864, 0, 0, 1, 0.120864, 0, 0, 0.999996, 0.120864, 0, 0, 0.99998, 0.120867, 0, 0, 0.99994, 0.120872, 0, 0.000323781, 0.999852, 0.120884, 0, 0.00188693, 0.999693, 0.120903, 0, 0.00473489, 0.999426, 0.120929, 0, 0.00872704, 0.999002, 0.120955, 0, 0.0137237, 0.998235, 0.120918, 0, 0.0196068, 0.994608, 0.119764, 0, 0.0262803, 0.992997, 0.119265, 0, 0.0336657, 0.990968, 0.11863, 0, 0.0416987, 0.987002, 0.117261, 0, 0.0503261, 0.983524, 0.116009, 0, 0.0595035, 0.97875, 0.114252, 0, 0.0691935, 0.972652, 0.11193, 0, 0.0793645, 0.966613, 0.109555, 0, 0.0899894, 0.959275, 0.106612, 0, 0.101045, 0.951272, 0.103375, 0, 0.112512, 0.942323, 0.0996594, 0, 0.124372, 0.933679, 0.0958841, 0, 0.136611, 0.924822, 0.0919265, 0, 0.149216, 0.915742, 0.0878061, 0, 0.162176, 0.906348, 0.0834894, 0, 0.175482, 0.896883, 0.079085, 0, 0.189125, 0.88774, 0.0746745, 0, 0.203098, 0.87986, 0.0705773, 0, 0.217396, 0.871998, 0.0665005, 0, 0.232015, 0.864325, 0.0625413, 0, 0.24695, 0.856685, 0.0586781, 0, 0.2622, 0.84925, 0.0550063, 0, 0.277761, 0.841719, 0.0514727, 0, 0.293634, 0.834755, 0.0481398, 0, 0.309819, 0.827853, 0.0450172, 0, 0.326315, 0.820888, 0.0420969, 0, 0.343126, 0.813616, 0.0393702, 0, 0.360254, 0.805767, 0.0367771, 0, 0.377701, 0.797338, 0.0343274, 0, 0.395474, 0.789122, 0.0320529, 0, 0.413577, 0.780601, 0.0299485, 0, 0.432018, 0.771424, 0.0279812, 0, 0.450804, 0.761502, 0.0261054, 0, 0.469944, 0.751166, 0.0243942, 0, 0.489451, 0.741276, 0.0228087, 0, 0.509337, 0.730898, 0.0213265, 0, 0.529617, 0.719878, 0.0199307, 0, 0.550307, 0.708379, 0.0186574, 0, 0.571428, 0.697165, 0.0174446, 0, 0.593003, 0.685554, 0.0163144, 0, 0.615059, 0.673631, 0.015276, 0, 0.637628, 0.662385, 0.0143003, 0, 0.660746, 0.651059, 0.0134112, 0, 0.68446, 0.640451, 0.0125794, 0, 0.70882, 0.630536, 0.011793, 0, 0.733893, 0.620316, 0.0110547, 0, 0.759756, 0.609722, 0.0103668, 0, 0.786505, 0.598804, 0.00973009, 0, 0.814259, 0.587871, 0.00912812, 0, 0.843157, 0.577121, 0.00858916, 0, 0.87334, 0.566019, 0.00807333, 0, 0.904762, 0.554664, 0.00759687, 0, 0.936508, 0.543101, 0.00714759, 0, 0.968254, 0.531558, 0.00673418, 0, 1, 1, 0.146767, 0, 0, 1, 0.146767, 0, 0, 0.999997, 0.146767, 0, 0, 0.999977, 0.146765, 0, 3.20658e-06, 0.999929, 0.146762, 0, 0.000682576, 0.999823, 0.146753, 0, 0.00276402, 0.999633, 0.146735, 0, 0.00614771, 0.999314, 0.146699, 0, 0.0106613, 0.998796, 0.14662, 0, 0.0161546, 0.997124, 0.146107, 0, 0.0225063, 0.994062, 0.144857, 0, 0.0296198, 0.992154, 0.144011, 0, 0.037417, 0.989186, 0.142712, 0, 0.0458348, 0.985279, 0.140926, 0, 0.0548211, 0.980826, 0.13885, 0, 0.0643326, 0.975056, 0.136168, 0, 0.074333, 0.969005, 0.133217, 0, 0.0847917, 0.961554, 0.12959, 0, 0.0956828, 0.954206, 0.125886, 0, 0.106984, 0.945046, 0.121335, 0, 0.118675, 0.935678, 0.116492, 0, 0.130741, 0.926748, 0.111635, 0, 0.143166, 0.917764, 0.106625, 0, 0.155939, 0.908358, 0.101325, 0, 0.169049, 0.899219, 0.0960249, 0, 0.182487, 0.890089, 0.0906527, 0, 0.196245, 0.881488, 0.0853905, 0, 0.210317, 0.874031, 0.0804177, 0, 0.224697, 0.866932, 0.0756005, 0, 0.23938, 0.859976, 0.0709019, 0, 0.254364, 0.853375, 0.0664391, 0, 0.269646, 0.846971, 0.0622012, 0, 0.285223, 0.840483, 0.058129, 0, 0.301096, 0.833969, 0.0542762, 0, 0.317265, 0.82806, 0.0507042, 0, 0.333729, 0.822128, 0.047368, 0, 0.350491, 0.815989, 0.044272, 0, 0.367554, 0.809336, 0.0413444, 0, 0.38492, 0.802177, 0.038601, 0, 0.402594, 0.79441, 0.0360227, 0, 0.420582, 0.786573, 0.0336383, 0, 0.438891, 0.778619, 0.0314321, 0, 0.457527, 0.77, 0.029362, 0, 0.476499, 0.760698, 0.0274102, 0, 0.49582, 0.750932, 0.0256146, 0, 0.5155, 0.740993, 0.023974, 0, 0.535555, 0.731159, 0.0224182, 0, 0.556, 0.720836, 0.0209889, 0, 0.576855, 0.709913, 0.0196411, 0, 0.598143, 0.698415, 0.0183824, 0, 0.619888, 0.68745, 0.0172222, 0, 0.642123, 0.676154, 0.0161509, 0, 0.664883, 0.664383, 0.0151397, 0, 0.688211, 0.6533, 0.0141873, 0, 0.71216, 0.642072, 0.0133105, 0, 0.736792, 0.631412, 0.0124932, 0, 0.762186, 0.621622, 0.0117408, 0, 0.788439, 0.611681, 0.0110358, 0, 0.815672, 0.60142, 0.0103775, 0, 0.844034, 0.59083, 0.00975623, 0, 0.873699, 0.580254, 0.00918084, 0, 0.904765, 0.569841, 0.00864721, 0, 0.936508, 0.559224, 0.00815731, 0, 0.968254, 0.548315, 0.00767924, 0, 1, 1, 0.177563, 0, 0, 1, 0.177563, 0, 0, 0.999994, 0.177562, 0, 0, 0.999972, 0.177555, 0, 6.64171e-05, 0.999914, 0.177536, 0, 0.0012276, 0.999787, 0.177496, 0, 0.00388025, 0.999556, 0.17742, 0, 0.00783463, 0.999165, 0.177285, 0, 0.0128953, 0.9985, 0.177037, 0, 0.0189053, 0.995388, 0.175634, 0, 0.025742, 0.993102, 0.174375, 0, 0.033309, 0.990992, 0.173121, 0, 0.0415298, 0.986932, 0.170896, 0, 0.0503425, 0.982786, 0.16847, 0, 0.0596964, 0.977592, 0.165455, 0, 0.0695498, 0.971075, 0.161676, 0, 0.0798676, 0.963967, 0.157458, 0, 0.0906201, 0.956397, 0.152836, 0, 0.101783, 0.947489, 0.147467, 0, 0.113333, 0.937564, 0.14145, 0, 0.125254, 0.928182, 0.135383, 0, 0.137529, 0.919027, 0.129212, 0, 0.150144, 0.909618, 0.12276, 0, 0.163088, 0.900492, 0.116273, 0, 0.176351, 0.891671, 0.1098, 0, 0.189924, 0.883146, 0.103362, 0, 0.203799, 0.875151, 0.0970799, 0, 0.21797, 0.868338, 0.0911732, 0, 0.232433, 0.862033, 0.0854966, 0, 0.247182, 0.856107, 0.0800691, 0, 0.262216, 0.850644, 0.0749618, 0, 0.27753, 0.845261, 0.070079, 0, 0.293124, 0.839885, 0.0654321, 0, 0.308997, 0.834609, 0.0610975, 0, 0.325149, 0.829083, 0.0569741, 0, 0.341581, 0.82404, 0.0531736, 0, 0.358294, 0.818968, 0.049665, 0, 0.37529, 0.813496, 0.0463856, 0, 0.392573, 0.807533, 0.0433217, 0, 0.410148, 0.80099, 0.0404402, 0, 0.428019, 0.793891, 0.0377578, 0, 0.446192, 0.786281, 0.0352616, 0, 0.464676, 0.778773, 0.0329577, 0, 0.483478, 0.770737, 0.030808, 0, 0.502608, 0.762094, 0.0287964, 0, 0.522079, 0.752898, 0.0269254, 0, 0.541905, 0.743306, 0.0251926, 0, 0.5621, 0.733416, 0.023595, 0, 0.582684, 0.723742, 0.0221155, 0, 0.603677, 0.713542, 0.0207435, 0, 0.625106, 0.702755, 0.019434, 0, 0.646998, 0.691484, 0.0182046, 0, 0.66939, 0.680531, 0.0170771, 0, 0.692324, 0.66953, 0.0160339, 0, 0.715849, 0.658126, 0.0150677, 0, 0.740028, 0.646933, 0.0141551, 0, 0.764937, 0.636107, 0.0133179, 0, 0.790673, 0.625271, 0.0125284, 0, 0.817358, 0.615225, 0.0117937, 0, 0.84515, 0.605678, 0.0111181, 0, 0.874244, 0.59583, 0.0104759, 0, 0.904828, 0.585704, 0.00986672, 0, 0.936508, 0.575413, 0.00929712, 0, 0.968254, 0.565373, 0.00876713, 0, 1, 1, 0.214058, 0, 0, 0.999999, 0.214058, 0, 0, 0.999994, 0.214055, 0, 0, 0.999966, 0.214039, 0, 0.000259642, 0.999893, 0.213998, 0, 0.00200075, 0.999737, 0.21391, 0, 0.00527775, 0.999449, 0.213745, 0, 0.00983959, 0.99896, 0.213458, 0, 0.0154755, 0.9979, 0.212855, 0, 0.0220249, 0.994278, 0.210779, 0, 0.0293654, 0.992254, 0.20926, 0, 0.0374021, 0.98881, 0.206908, 0, 0.0460604, 0.984715, 0.204009, 0, 0.0552802, 0.979738, 0.200471, 0, 0.0650127, 0.972884, 0.195813, 0, 0.0752175, 0.965996, 0.190856, 0, 0.0858612, 0.957974, 0.185077, 0, 0.0969155, 0.949155, 0.17868, 0, 0.108356, 0.939288, 0.171513, 0, 0.120163, 0.928996, 0.163838, 0, 0.132319, 0.919563, 0.156246, 0, 0.144808, 0.910004, 0.148359, 0, 0.157618, 0.900791, 0.140417, 0, 0.170737, 0.892135, 0.132569, 0, 0.184155, 0.883803, 0.124741, 0, 0.197866, 0.876034, 0.117091, 0, 0.211861, 0.869219, 0.109835, 0, 0.226134, 0.863062, 0.102859, 0, 0.240682, 0.857795, 0.0962928, 0, 0.255499, 0.853009, 0.0900725, 0, 0.270583, 0.848603, 0.0842101, 0, 0.285931, 0.844335, 0.0786527, 0, 0.301542, 0.840208, 0.0734397, 0, 0.317415, 0.836035, 0.0685334, 0, 0.33355, 0.83172, 0.0639275, 0, 0.349948, 0.827135, 0.0595909, 0, 0.36661, 0.822797, 0.0556204, 0, 0.383539, 0.818387, 0.0519394, 0, 0.400738, 0.813565, 0.0485317, 0, 0.41821, 0.808142, 0.0453138, 0, 0.435961, 0.802212, 0.0423354, 0, 0.453997, 0.79573, 0.0395553, 0, 0.472324, 0.788741, 0.036988, 0, 0.490951, 0.781093, 0.0345688, 0, 0.509887, 0.773597, 0.0323297, 0, 0.529144, 0.765622, 0.0302719, 0, 0.548735, 0.757083, 0.0283477, 0, 0.568674, 0.747992, 0.0265562, 0, 0.588979, 0.738591, 0.0248844, 0, 0.609671, 0.728719, 0.0233342, 0, 0.630773, 0.719146, 0.0219081, 0, 0.652314, 0.709165, 0.0205711, 0, 0.674328, 0.69875, 0.0193248, 0, 0.696854, 0.687884, 0.0181582, 0, 0.719942, 0.676818, 0.0170746, 0, 0.743651, 0.666247, 0.0160718, 0, 0.768057, 0.655284, 0.0151262, 0, 0.793253, 0.64401, 0.0142561, 0, 0.819363, 0.633353, 0.0134327, 0, 0.846547, 0.622674, 0.012653, 0, 0.875017, 0.612265, 0.0119354, 0, 0.905021, 0.602455, 0.0112533, 0, 0.936508, 0.593147, 0.0106234, 0, 0.968254, 0.583592, 0.0100213, 0, 1, 1, 0.25717, 0, 0, 1, 0.25717, 0, 0, 0.999992, 0.257164, 0, 0, 0.999958, 0.257135, 0, 0.000641715, 0.999864, 0.25706, 0, 0.00305314, 0.999666, 0.256897, 0, 0.00700975, 0.999302, 0.256596, 0, 0.0122194, 0.998663, 0.25607, 0, 0.0184622, 0.995607, 0.254123, 0, 0.0255773, 0.993094, 0.252081, 0, 0.0334439, 0.9907, 0.249867, 0, 0.0419696, 0.98594, 0.246118, 0, 0.0510823, 0.981214, 0.242049, 0, 0.0607242, 0.974966, 0.236869, 0, 0.0708486, 0.967589, 0.230724, 0, 0.081417, 0.95915, 0.223635, 0, 0.0923974, 0.950257, 0.21596, 0, 0.103763, 0.940165, 0.207296, 0, 0.115491, 0.929396, 0.197901, 0, 0.127562, 0.919288, 0.188437, 0, 0.13996, 0.909428, 0.178762, 0, 0.15267, 0.900105, 0.169072, 0, 0.165679, 0.891418, 0.159478, 0, 0.178979, 0.883347, 0.15002, 0, 0.192558, 0.875992, 0.140813, 0, 0.20641, 0.869466, 0.13196, 0, 0.220529, 0.863699, 0.123501, 0, 0.234907, 0.858553, 0.115436, 0, 0.249542, 0.854379, 0.107901, 0, 0.264428, 0.850894, 0.10088, 0, 0.279564, 0.847632, 0.0942296, 0, 0.294947, 0.844571, 0.0879861, 0, 0.310575, 0.84163, 0.0821534, 0, 0.326448, 0.838542, 0.0766409, 0, 0.342566, 0.835412, 0.0715322, 0, 0.358929, 0.831899, 0.0666883, 0, 0.37554, 0.828177, 0.0622175, 0, 0.392399, 0.82416, 0.0580452, 0, 0.409511, 0.820393, 0.054267, 0, 0.426878, 0.816068, 0.0507172, 0, 0.444506, 0.811201, 0.0474041, 0, 0.4624, 0.805785, 0.0443174, 0, 0.480566, 0.799878, 0.0414562, 0, 0.499013, 0.793469, 0.0388147, 0, 0.517749, 0.786473, 0.0363453, 0, 0.536785, 0.778874, 0.0340225, 0, 0.556134, 0.771277, 0.0318599, 0, 0.575809, 0.763426, 0.0298859, 0, 0.595827, 0.755044, 0.0280357, 0, 0.616207, 0.746161, 0.0262979, 0, 0.636973, 0.737124, 0.0247295, 0, 0.65815, 0.72761, 0.0232514, 0, 0.679772, 0.717822, 0.0218755, 0, 0.701876, 0.708279, 0.0205942, 0, 0.724509, 0.698333, 0.0193947, 0, 0.74773, 0.68802, 0.0182717, 0, 0.771609, 0.677321, 0.0172044, 0, 0.79624, 0.666504, 0.0162122, 0, 0.821743, 0.656184, 0.0152924, 0, 0.84828, 0.64556, 0.0144326, 0, 0.876069, 0.634636, 0.0136157, 0, 0.905404, 0.624124, 0.0128612, 0, 0.936508, 0.613914, 0.0121435, 0, 0.968254, 0.603589, 0.0114887, 0, 1, 1, 0.307946, 0, 0, 0.999999, 0.307945, 0, 0, 0.999988, 0.307934, 0, 2.04479e-05, 0.999944, 0.307886, 0, 0.00127833, 0.999824, 0.307756, 0, 0.00445047, 0.999565, 0.30748, 0, 0.00914673, 0.999085, 0.306966, 0, 0.0150498, 0.998103, 0.306004, 0, 0.0219367, 0.994249, 0.303028, 0, 0.0296485, 0.991807, 0.300435, 0, 0.038068, 0.987773, 0.296554, 0, 0.0471062, 0.982673, 0.2916, 0, 0.0566942, 0.976623, 0.285641, 0, 0.0667768, 0.968757, 0.27815, 0, 0.0773099, 0.959849, 0.269529, 0, 0.088257, 0.950663, 0.260248, 0, 0.0995879, 0.940129, 0.249704, 0, 0.111277, 0.92895, 0.238291, 0, 0.123304, 0.917996, 0.226501, 0, 0.13565, 0.907813, 0.214669, 0, 0.148299, 0.898305, 0.202835, 0, 0.161237, 0.889626, 0.191158, 0, 0.174455, 0.88175, 0.179695, 0, 0.187941, 0.874715, 0.168548, 0, 0.201687, 0.868746, 0.15792, 0, 0.215687, 0.863703, 0.147807, 0, 0.229933, 0.859315, 0.138149, 0, 0.24442, 0.855538, 0.128993, 0, 0.259145, 0.852428, 0.120414, 0, 0.274103, 0.850168, 0.112498, 0, 0.289293, 0.848132, 0.105054, 0, 0.304711, 0.846291, 0.0981087, 0, 0.320357, 0.844431, 0.0915942, 0, 0.33623, 0.842493, 0.0855056, 0, 0.35233, 0.840368, 0.0798204, 0, 0.368658, 0.83798, 0.0745097, 0, 0.385214, 0.83523, 0.0695424, 0, 0.402002, 0.832091, 0.0649092, 0, 0.419023, 0.828667, 0.0606291, 0, 0.436282, 0.824805, 0.0566523, 0, 0.453782, 0.820988, 0.0530229, 0, 0.471529, 0.816635, 0.0496364, 0, 0.489528, 0.811725, 0.0464658, 0, 0.507788, 0.806316, 0.0435082, 0, 0.526317, 0.800469, 0.0407873, 0, 0.545124, 0.794107, 0.038255, 0, 0.564221, 0.787218, 0.0358825, 0, 0.583621, 0.779872, 0.0336785, 0, 0.603341, 0.772097, 0.0316379, 0, 0.623397, 0.764484, 0.0297379, 0, 0.643812, 0.756428, 0.0279581, 0, 0.664611, 0.748022, 0.0263153, 0, 0.685824, 0.739268, 0.0247799, 0, 0.707488, 0.73024, 0.0233385, 0, 0.729646, 0.720893, 0.0220035, 0, 0.752354, 0.71119, 0.0207555, 0, 0.77568, 0.701791, 0.0195843, 0, 0.799715, 0.692184, 0.0184891, 0, 0.824574, 0.682258, 0.0174541, 0, 0.850417, 0.67206, 0.0164873, 0, 0.877466, 0.661717, 0.0155959, 0, 0.90604, 0.651462, 0.0147519, 0, 0.936528, 0.641467, 0.0139727, 0, 0.968254, 0.631229, 0.0132363, 0, 1, 1, 0.367573, 0, 0, 0.999999, 0.367571, 0, 0, 0.999984, 0.367553, 0, 0.000183382, 0.999925, 0.367473, 0, 0.00225254, 0.999759, 0.367259, 0, 0.00628165, 0.99941, 0.366801, 0, 0.0117858, 0.998739, 0.365946, 0, 0.0184359, 0.995529, 0.363191, 0, 0.0260114, 0.992875, 0.360171, 0, 0.0343581, 0.989135, 0.355981, 0, 0.0433637, 0.984166, 0.350401, 0, 0.0529438, 0.977871, 0.343348, 0, 0.0630334, 0.96951, 0.334341, 0, 0.0735805, 0.959964, 0.323862, 0, 0.0845437, 0.950162, 0.312521, 0, 0.095889, 0.938882, 0.299577, 0, 0.107588, 0.926992, 0.285573, 0, 0.119617, 0.915589, 0.271212, 0, 0.131957, 0.904791, 0.256611, 0, 0.144591, 0.895177, 0.242224, 0, 0.157503, 0.886403, 0.227952, 0, 0.170682, 0.878957, 0.214192, 0, 0.184117, 0.872418, 0.200795, 0, 0.197799, 0.867029, 0.188015, 0, 0.21172, 0.862835, 0.175975, 0, 0.225873, 0.859411, 0.164526, 0, 0.240253, 0.856655, 0.153693, 0, 0.254854, 0.854519, 0.14352, 0, 0.269673, 0.852828, 0.13397, 0, 0.284707, 0.851412, 0.124984, 0, 0.299953, 0.850609, 0.116748, 0, 0.315408, 0.849855, 0.10905, 0, 0.331073, 0.849017, 0.101839, 0, 0.346946, 0.848079, 0.0951359, 0, 0.363028, 0.846911, 0.0888774, 0, 0.379318, 0.845445, 0.0830375, 0, 0.395818, 0.84362, 0.0775844, 0, 0.41253, 0.841411, 0.0725054, 0, 0.429457, 0.838768, 0.0677691, 0, 0.446602, 0.835801, 0.0634016, 0, 0.463968, 0.832341, 0.0593095, 0, 0.481561, 0.828424, 0.0555121, 0, 0.499386, 0.824312, 0.052024, 0, 0.51745, 0.819918, 0.0487865, 0, 0.535761, 0.815072, 0.0457801, 0, 0.554328, 0.809863, 0.0430184, 0, 0.573162, 0.804164, 0.0404245, 0, 0.592275, 0.798034, 0.0380146, 0, 0.611681, 0.791436, 0.0357436, 0, 0.631398, 0.784498, 0.0336475, 0, 0.651445, 0.777125, 0.0316666, 0, 0.671845, 0.769365, 0.0298122, 0, 0.692628, 0.761579, 0.0281001, 0, 0.713827, 0.753746, 0.0265049, 0, 0.735484, 0.745573, 0.0250067, 0, 0.75765, 0.737083, 0.0236026, 0, 0.78039, 0.728545, 0.0223302, 0, 0.803789, 0.719691, 0.0211243, 0, 0.82796, 0.710569, 0.0199983, 0, 0.853056, 0.701216, 0.0189569, 0, 0.879298, 0.692094, 0.0179702, 0, 0.907014, 0.682909, 0.0170418, 0, 0.936691, 0.673509, 0.0161732, 0, 0.968254, 0.663863, 0.0153406, 0, 1, 1, 0.437395, 0, 0, 0.999998, 0.437394, 0, 0, 0.99998, 0.437363, 0, 0.000616704, 0.999891, 0.437232, 0, 0.00367925, 0.999656, 0.436877, 0, 0.00867446, 0.999148, 0.436121, 0, 0.0150679, 0.997959, 0.434564, 0, 0.022531, 0.993464, 0.430134, 0, 0.0308507, 0.990606, 0.426077, 0, 0.0398805, 0.985027, 0.419397, 0, 0.0495148, 0.978491, 0.41118, 0, 0.0596749, 0.969643, 0.40048, 0, 0.0703001, 0.959189, 0.38769, 0, 0.0813427, 0.948223, 0.373575, 0, 0.0927641, 0.935955, 0.357622, 0, 0.104533, 0.923237, 0.34043, 0, 0.116624, 0.911074, 0.322735, 0, 0.129015, 0.899724, 0.30479, 0, 0.141687, 0.890189, 0.287392, 0, 0.154626, 0.881796, 0.270248, 0, 0.167818, 0.874781, 0.253659, 0, 0.181252, 0.869166, 0.237786, 0, 0.194918, 0.864725, 0.222618, 0, 0.208807, 0.861565, 0.208356, 0, 0.222913, 0.859284, 0.194867, 0, 0.237229, 0.857677, 0.18212, 0, 0.25175, 0.856714, 0.17018, 0, 0.266473, 0.856155, 0.158969, 0, 0.281392, 0.8558, 0.148413, 0, 0.296505, 0.855672, 0.138578, 0, 0.311811, 0.855538, 0.129345, 0, 0.327306, 0.855689, 0.120861, 0, 0.342991, 0.855767, 0.112969, 0, 0.358864, 0.855618, 0.105593, 0, 0.374925, 0.85525, 0.0987451, 0, 0.391176, 0.854583, 0.0923727, 0, 0.407616, 0.853534, 0.0864143, 0, 0.424249, 0.852061, 0.0808338, 0, 0.441076, 0.850253, 0.0756771, 0, 0.4581, 0.848004, 0.0708612, 0, 0.475324, 0.845333, 0.0663784, 0, 0.492754, 0.842376, 0.0622631, 0, 0.510394, 0.838956, 0.0584112, 0, 0.528251, 0.835121, 0.0548328, 0, 0.546331, 0.830842, 0.0514838, 0, 0.564644, 0.826212, 0.048355, 0, 0.583198, 0.821522, 0.0454714, 0, 0.602005, 0.816551, 0.0428263, 0, 0.621078, 0.811211, 0.0403612, 0, 0.640434, 0.805479, 0.038039, 0, 0.660089, 0.799409, 0.0358739, 0, 0.680066, 0.79306, 0.0338727, 0, 0.70039, 0.786395, 0.0319985, 0, 0.721094, 0.779416, 0.030241, 0, 0.742215, 0.77214, 0.0285951, 0, 0.7638, 0.764636, 0.0270747, 0, 0.785912, 0.756836, 0.0256354, 0, 0.808628, 0.749315, 0.0243027, 0, 0.832055, 0.741561, 0.0230497, 0, 0.856338, 0.733589, 0.0218801, 0, 0.88169, 0.725479, 0.020784, 0, 0.908441, 0.717255, 0.0197702, 0, 0.937125, 0.708829, 0.0188168, 0, 0.968254, 0.700191, 0.0179113, 0, 1, 1, 0.518937, 0, 0, 0.999998, 0.518933, 0, 0, 0.999967, 0.518883, 0, 0.00147741, 0.999832, 0.51866, 0, 0.00573221, 0.999466, 0.518057, 0, 0.011826, 0.998644, 0.516752, 0, 0.0192116, 0.994458, 0.512347, 0, 0.027573, 0.991223, 0.507675, 0, 0.0367099, 0.985515, 0.500188, 0, 0.046487, 0.978308, 0.490408, 0, 0.0568071, 0.968359, 0.477357, 0, 0.0675984, 0.95682, 0.461752, 0, 0.0788059, 0.943929, 0.443796, 0, 0.090386, 0.930224, 0.423893, 0, 0.102304, 0.916514, 0.402682, 0, 0.114532, 0.903653, 0.380914, 0, 0.127047, 0.892315, 0.359212, 0, 0.139828, 0.882942, 0.338102, 0, 0.152861, 0.875438, 0.31773, 0, 0.16613, 0.869642, 0.298186, 0, 0.179624, 0.865304, 0.279491, 0, 0.193332, 0.862382, 0.261804, 0, 0.207247, 0.860666, 0.245146, 0, 0.22136, 0.859788, 0.229406, 0, 0.235666, 0.859608, 0.214605, 0, 0.250158, 0.859912, 0.200691, 0, 0.264832, 0.86053, 0.187623, 0, 0.279684, 0.861368, 0.17539, 0, 0.294711, 0.862237, 0.163901, 0, 0.309911, 0.863127, 0.153175, 0, 0.32528, 0.863923, 0.143147, 0, 0.340819, 0.864567, 0.133781, 0, 0.356524, 0.865013, 0.125042, 0, 0.372397, 0.86539, 0.116952, 0, 0.388438, 0.865591, 0.109476, 0, 0.404645, 0.865517, 0.102542, 0, 0.421022, 0.865084, 0.0960688, 0, 0.437569, 0.864309, 0.0900499, 0, 0.454287, 0.863151, 0.0844328, 0, 0.471181, 0.861649, 0.0792218, 0, 0.488253, 0.859742, 0.0743482, 0, 0.505507, 0.857446, 0.0697963, 0, 0.522947, 0.854757, 0.0655364, 0, 0.54058, 0.851783, 0.061608, 0, 0.558412, 0.848516, 0.0579701, 0, 0.576449, 0.844897, 0.0545742, 0, 0.594701, 0.840956, 0.0514167, 0, 0.613178, 0.836676, 0.0484598, 0, 0.631892, 0.832075, 0.0456934, 0, 0.650856, 0.827191, 0.0431178, 0, 0.670088, 0.822295, 0.0407718, 0, 0.689606, 0.817294, 0.0386032, 0, 0.709434, 0.812013, 0.0365675, 0, 0.7296, 0.806465, 0.0346547, 0, 0.750138, 0.800691, 0.0328717, 0, 0.771093, 0.794709, 0.031211, 0, 0.792519, 0.788493, 0.0296504, 0, 0.814488, 0.782049, 0.0281782, 0, 0.837097, 0.775403, 0.0267965, 0, 0.860481, 0.76857, 0.0255002, 0, 0.884842, 0.761536, 0.0242759, 0, 0.910494, 0.754303, 0.0231142, 0, 0.937985, 0.74692, 0.0220305, 0, 0.968254, 0.739745, 0.0210192, 0, 1, 1, 0.613914, 0, 0, 0.999996, 0.613907, 0, 9.63597e-05, 0.999942, 0.613814, 0, 0.00301247, 0.999704, 0.613407, 0, 0.00870385, 0.999046, 0.612302, 0, 0.0160714, 0.995516, 0.608266, 0, 0.0245899, 0.991726, 0.602863, 0, 0.0339681, 0.985157, 0.593956, 0, 0.0440254, 0.97642, 0.581748, 0, 0.0546409, 0.964404, 0.565183, 0, 0.0657284, 0.950601, 0.545273, 0, 0.0772246, 0.935158, 0.522129, 0, 0.0890812, 0.919364, 0.496782, 0, 0.10126, 0.904754, 0.470571, 0, 0.113731, 0.89176, 0.444037, 0, 0.126469, 0.881492, 0.418322, 0, 0.139454, 0.873656, 0.393522, 0, 0.15267, 0.868053, 0.369795, 0, 0.166101, 0.864336, 0.347171, 0, 0.179736, 0.862259, 0.325737, 0, 0.193565, 0.861556, 0.305532, 0, 0.207578, 0.861776, 0.286416, 0, 0.221769, 0.862661, 0.268355, 0, 0.23613, 0.864015, 0.251334, 0, 0.250656, 0.865711, 0.235352, 0, 0.265343, 0.867519, 0.220302, 0, 0.280187, 0.869351, 0.206161, 0, 0.295183, 0.871144, 0.192908, 0, 0.31033, 0.872839, 0.180505, 0, 0.325624, 0.874307, 0.168848, 0, 0.341065, 0.875667, 0.158021, 0, 0.35665, 0.876758, 0.147877, 0, 0.37238, 0.87764, 0.138441, 0, 0.388253, 0.878237, 0.129627, 0, 0.404269, 0.878563, 0.121415, 0, 0.42043, 0.878572, 0.113741, 0, 0.436735, 0.87842, 0.106652, 0, 0.453187, 0.878057, 0.100097, 0, 0.469786, 0.877413, 0.0940128, 0, 0.486536, 0.87646, 0.0883462, 0, 0.503439, 0.875233, 0.0830924, 0, 0.520498, 0.8737, 0.0781975, 0, 0.537717, 0.871873, 0.07364, 0, 0.555102, 0.86978, 0.0694103, 0, 0.572657, 0.867405, 0.0654696, 0, 0.59039, 0.864751, 0.0617914, 0, 0.608307, 0.861818, 0.0583491, 0, 0.626419, 0.858645, 0.0551443, 0, 0.644733, 0.855307, 0.0521894, 0, 0.663264, 0.851736, 0.0494334, 0, 0.682025, 0.847927, 0.0468504, 0, 0.701032, 0.843888, 0.0444261, 0, 0.720308, 0.839629, 0.0421497, 0, 0.739875, 0.835158, 0.0400082, 0, 0.759764, 0.830509, 0.0380076, 0, 0.780014, 0.825714, 0.0361488, 0, 0.800673, 0.820729, 0.0343956, 0, 0.821803, 0.815751, 0.0327781, 0, 0.843492, 0.810752, 0.031275, 0, 0.86586, 0.805587, 0.0298542, 0, 0.889087, 0.800317, 0.0285397, 0, 0.913466, 0.79489, 0.0272948, 0, 0.93952, 0.789314, 0.0261139, 0, 0.96835, 0.783593, 0.0249938, 0, 1, 1, 0.724258, 0, 0, 0.999992, 0.724243, 0, 0.000726889, 0.99987, 0.724044, 0, 0.00569574, 0.999336, 0.72317, 0, 0.0131702, 0.996271, 0.719432, 0, 0.0220738, 0.991159, 0.712576, 0, 0.0319405, 0.982465, 0.700927, 0, 0.0425202, 0.97049, 0.684297, 0, 0.0536599, 0.953973, 0.661244, 0, 0.065258, 0.935546, 0.633804, 0, 0.0772427, 0.916596, 0.603071, 0, 0.0895616, 0.899353, 0.57105, 0, 0.102175, 0.885216, 0.539206, 0, 0.11505, 0.875076, 0.508714, 0, 0.128164, 0.868334, 0.479571, 0, 0.141495, 0.864414, 0.451796, 0, 0.155026, 0.862678, 0.425328, 0, 0.168745, 0.862835, 0.400352, 0, 0.182639, 0.864067, 0.376532, 0, 0.196699, 0.866086, 0.35391, 0, 0.210915, 0.868557, 0.332424, 0, 0.225282, 0.871271, 0.312053, 0, 0.239792, 0.874058, 0.292764, 0, 0.25444, 0.8768, 0.27453, 0, 0.269223, 0.87939, 0.257297, 0, 0.284135, 0.8819, 0.24114, 0, 0.299174, 0.884187, 0.225934, 0, 0.314337, 0.886262, 0.211669, 0, 0.329622, 0.888119, 0.198311, 0, 0.345026, 0.889709, 0.185783, 0, 0.360549, 0.891054, 0.174063, 0, 0.376189, 0.892196, 0.163143, 0, 0.391946, 0.893101, 0.152952, 0, 0.407819, 0.893803, 0.143475, 0, 0.423808, 0.894277, 0.134647, 0, 0.439914, 0.894532, 0.126434, 0, 0.456137, 0.894576, 0.1188, 0, 0.472479, 0.894393, 0.111694, 0, 0.48894, 0.893976, 0.105069, 0, 0.505523, 0.893346, 0.0989077, 0, 0.52223, 0.892502, 0.0931724, 0, 0.539064, 0.891441, 0.0878276, 0, 0.556028, 0.890276, 0.082903, 0, 0.573125, 0.888972, 0.0783505, 0, 0.590361, 0.887469, 0.0741083, 0, 0.607741, 0.885785, 0.0701633, 0, 0.62527, 0.883914, 0.0664835, 0, 0.642957, 0.881872, 0.0630567, 0, 0.660809, 0.879651, 0.0598527, 0, 0.678836, 0.877267, 0.0568615, 0, 0.69705, 0.874717, 0.05406, 0, 0.715465, 0.872012, 0.0514378, 0, 0.734098, 0.869157, 0.0489805, 0, 0.752968, 0.866155, 0.0466727, 0, 0.772101, 0.863014, 0.0445056, 0, 0.791529, 0.859748, 0.0424733, 0, 0.81129, 0.856416, 0.0405957, 0, 0.831438, 0.852958, 0.0388273, 0, 0.852044, 0.849382, 0.0371619, 0, 0.87321, 0.845694, 0.0355959, 0, 0.89509, 0.841893, 0.0341155, 0, 0.917932, 0.837981, 0.0327141, 0, 0.942204, 0.833963, 0.0313856, 0, 0.968981, 0.829847, 0.0301275, 0, 1, 1, 0.85214, 0, 0, 0.999969, 0.852095, 0, 0.00279627, 0.999483, 0.851408, 0, 0.0107635, 0.994545, 0.84579, 0, 0.0206454, 0.986188, 0.835231, 0, 0.0315756, 0.969847, 0.814687, 0, 0.0432021, 0.945951, 0.783735, 0, 0.0553396, 0.91917, 0.746074, 0, 0.0678766, 0.895488, 0.706938, 0, 0.0807395, 0.878232, 0.669534, 0, 0.0938767, 0.868252, 0.635168, 0, 0.10725, 0.863873, 0.603069, 0, 0.120832, 0.863369, 0.572514, 0, 0.134598, 0.86545, 0.543169, 0, 0.148533, 0.868803, 0.514578, 0, 0.16262, 0.872794, 0.486762, 0, 0.176849, 0.87702, 0.459811, 0, 0.19121, 0.881054, 0.433654, 0, 0.205694, 0.884974, 0.408574, 0, 0.220294, 0.888587, 0.384525, 0, 0.235005, 0.891877, 0.36156, 0, 0.24982, 0.894793, 0.339661, 0, 0.264737, 0.89743, 0.318913, 0, 0.279751, 0.899796, 0.299302, 0, 0.294859, 0.901943, 0.280843, 0, 0.310058, 0.903858, 0.263481, 0, 0.325346, 0.905574, 0.247197, 0, 0.340721, 0.907069, 0.231915, 0, 0.356181, 0.908379, 0.217614, 0, 0.371725, 0.90952, 0.20425, 0, 0.387353, 0.910483, 0.191758, 0, 0.403063, 0.91128, 0.180092, 0, 0.418854, 0.911936, 0.169222, 0, 0.434727, 0.912454, 0.159098, 0, 0.450682, 0.912835, 0.149668, 0, 0.466718, 0.913078, 0.140884, 0, 0.482837, 0.913192, 0.132709, 0, 0.499038, 0.913175, 0.125095, 0, 0.515324, 0.91304, 0.118012, 0, 0.531695, 0.912781, 0.111417, 0, 0.548153, 0.91241, 0.105281, 0, 0.5647, 0.911924, 0.0995691, 0, 0.581338, 0.911331, 0.0942531, 0, 0.59807, 0.910637, 0.0893076, 0, 0.6149, 0.90984, 0.0846998, 0, 0.63183, 0.908941, 0.0804044, 0, 0.648865, 0.907944, 0.0763984, 0, 0.666011, 0.906857, 0.0726638, 0, 0.683273, 0.90568, 0.0691783, 0, 0.700659, 0.904416, 0.0659222, 0, 0.718176, 0.903067, 0.0628782, 0, 0.735834, 0.901637, 0.0600307, 0, 0.753646, 0.900128, 0.0573647, 0, 0.771625, 0.898544, 0.0548668, 0, 0.78979, 0.89689, 0.052527, 0, 0.808162, 0.895165, 0.0503306, 0, 0.826771, 0.893371, 0.0482668, 0, 0.845654, 0.891572, 0.0463605, 0, 0.864863, 0.889763, 0.0445998, 0, 0.884472, 0.887894, 0.0429451, 0, 0.904592, 0.885967, 0.0413884, 0, 0.925407, 0.883984, 0.0399225, 0, 0.947271, 0.881945, 0.0385405, 0, 0.97105, 0.879854, 0.0372362, 0, 1, 0.999804, 0.995833, 0, 0, 0.938155, 0.933611, 0, 0.0158731, 0.864755, 0.854311, 0, 0.0317461, 0.888594, 0.865264, 0, 0.0476191, 0.905575, 0.863922, 0, 0.0634921, 0.915125, 0.850558, 0, 0.0793651, 0.920665, 0.829254, 0, 0.0952381, 0.924073, 0.802578, 0, 0.111111, 0.926304, 0.772211, 0, 0.126984, 0.927829, 0.739366, 0, 0.142857, 0.928924, 0.705033, 0, 0.15873, 0.92973, 0.670019, 0, 0.174603, 0.930339, 0.634993, 0, 0.190476, 0.930811, 0.600485, 0, 0.206349, 0.931191, 0.566897, 0, 0.222222, 0.93149, 0.534485, 0, 0.238095, 0.931737, 0.503429, 0, 0.253968, 0.931939, 0.473811, 0, 0.269841, 0.932108, 0.445668, 0, 0.285714, 0.93225, 0.418993, 0, 0.301587, 0.932371, 0.393762, 0, 0.31746, 0.932474, 0.369939, 0, 0.333333, 0.932562, 0.347479, 0, 0.349206, 0.932638, 0.326336, 0, 0.365079, 0.932703, 0.306462, 0, 0.380952, 0.93276, 0.287805, 0, 0.396825, 0.932809, 0.270313, 0, 0.412698, 0.932851, 0.253933, 0, 0.428571, 0.932887, 0.23861, 0, 0.444444, 0.932917, 0.224289, 0, 0.460317, 0.932943, 0.210917, 0, 0.47619, 0.932965, 0.19844, 0, 0.492063, 0.932982, 0.186807, 0, 0.507937, 0.932995, 0.175966, 0, 0.52381, 0.933005, 0.165869, 0, 0.539683, 0.933011, 0.156468, 0, 0.555556, 0.933013, 0.147719, 0, 0.571429, 0.933013, 0.139579, 0, 0.587302, 0.93301, 0.132007, 0, 0.603175, 0.933004, 0.124965, 0, 0.619048, 0.932994, 0.118416, 0, 0.634921, 0.932982, 0.112326, 0, 0.650794, 0.932968, 0.106663, 0, 0.666667, 0.93295, 0.101397, 0, 0.68254, 0.932931, 0.0964993, 0, 0.698413, 0.932908, 0.0919438, 0, 0.714286, 0.932883, 0.0877057, 0, 0.730159, 0.932856, 0.0837623, 0, 0.746032, 0.932827, 0.0800921, 0, 0.761905, 0.932796, 0.0766754, 0, 0.777778, 0.932762, 0.0734936, 0, 0.793651, 0.932727, 0.0705296, 0, 0.809524, 0.932689, 0.0677676, 0, 0.825397, 0.93265, 0.0651929, 0, 0.84127, 0.932609, 0.0627917, 0, 0.857143, 0.932565, 0.0605515, 0, 0.873016, 0.932521, 0.0584606, 0, 0.888889, 0.932474, 0.0565082, 0, 0.904762, 0.932427, 0.0546841, 0, 0.920635, 0.932377, 0.0529793, 0, 0.936508, 0.932326, 0.0513851, 0, 0.952381, 0.932274, 0.0498936, 0, 0.968254, 0.93222, 0.0484975, 0, 0.984127, 0.932164, 0.0471899, 0, 1 ]; + + // data textures + + const ltc_float_1 = new Float32Array( LTC_MAT_1 ); + const ltc_float_2 = new Float32Array( LTC_MAT_2 ); + + UniformsLib.LTC_FLOAT_1 = new DataTexture( ltc_float_1, 64, 64, RGBAFormat, FloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 ); + UniformsLib.LTC_FLOAT_2 = new DataTexture( ltc_float_2, 64, 64, RGBAFormat, FloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 ); + + UniformsLib.LTC_FLOAT_1.needsUpdate = true; + UniformsLib.LTC_FLOAT_2.needsUpdate = true; + + const ltc_half_1 = new Uint16Array( LTC_MAT_1.length ); + + LTC_MAT_1.forEach( function ( x, index ) { + + ltc_half_1[ index ] = DataUtils.toHalfFloat( x ); + + } ); + + const ltc_half_2 = new Uint16Array( LTC_MAT_2.length ); + + LTC_MAT_2.forEach( function ( x, index ) { + + ltc_half_2[ index ] = DataUtils.toHalfFloat( x ); + + } ); + + UniformsLib.LTC_HALF_1 = new DataTexture( ltc_half_1, 64, 64, RGBAFormat, HalfFloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 ); + UniformsLib.LTC_HALF_2 = new DataTexture( ltc_half_2, 64, 64, RGBAFormat, HalfFloatType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, NearestFilter, 1 ); + + UniformsLib.LTC_HALF_1.needsUpdate = true; + UniformsLib.LTC_HALF_2.needsUpdate = true; + + + } + +} + +export { RectAreaLightUniformsLib }; diff --git a/node_modules/three/examples/jsm/lines/Line2.js b/node_modules/three/examples/jsm/lines/Line2.js new file mode 100644 index 0000000..cdd1ddf --- /dev/null +++ b/node_modules/three/examples/jsm/lines/Line2.js @@ -0,0 +1,19 @@ +import { LineSegments2 } from '../lines/LineSegments2.js'; +import { LineGeometry } from '../lines/LineGeometry.js'; +import { LineMaterial } from '../lines/LineMaterial.js'; + +class Line2 extends LineSegments2 { + + constructor( geometry = new LineGeometry(), material = new LineMaterial( { color: Math.random() * 0xffffff } ) ) { + + super( geometry, material ); + + this.isLine2 = true; + + this.type = 'Line2'; + + } + +} + +export { Line2 }; diff --git a/node_modules/three/examples/jsm/lines/LineGeometry.js b/node_modules/three/examples/jsm/lines/LineGeometry.js new file mode 100644 index 0000000..1314cf6 --- /dev/null +++ b/node_modules/three/examples/jsm/lines/LineGeometry.js @@ -0,0 +1,79 @@ +import { LineSegmentsGeometry } from '../lines/LineSegmentsGeometry.js'; + +class LineGeometry extends LineSegmentsGeometry { + + constructor() { + + super(); + + this.isLineGeometry = true; + + this.type = 'LineGeometry'; + + } + + setPositions( array ) { + + // converts [ x1, y1, z1, x2, y2, z2, ... ] to pairs format + + const length = array.length - 3; + const points = new Float32Array( 2 * length ); + + for ( let i = 0; i < length; i += 3 ) { + + points[ 2 * i ] = array[ i ]; + points[ 2 * i + 1 ] = array[ i + 1 ]; + points[ 2 * i + 2 ] = array[ i + 2 ]; + + points[ 2 * i + 3 ] = array[ i + 3 ]; + points[ 2 * i + 4 ] = array[ i + 4 ]; + points[ 2 * i + 5 ] = array[ i + 5 ]; + + } + + super.setPositions( points ); + + return this; + + } + + setColors( array ) { + + // converts [ r1, g1, b1, r2, g2, b2, ... ] to pairs format + + const length = array.length - 3; + const colors = new Float32Array( 2 * length ); + + for ( let i = 0; i < length; i += 3 ) { + + colors[ 2 * i ] = array[ i ]; + colors[ 2 * i + 1 ] = array[ i + 1 ]; + colors[ 2 * i + 2 ] = array[ i + 2 ]; + + colors[ 2 * i + 3 ] = array[ i + 3 ]; + colors[ 2 * i + 4 ] = array[ i + 4 ]; + colors[ 2 * i + 5 ] = array[ i + 5 ]; + + } + + super.setColors( colors ); + + return this; + + } + + fromLine( line ) { + + const geometry = line.geometry; + + this.setPositions( geometry.attributes.position.array ); // assumes non-indexed + + // set colors, maybe + + return this; + + } + +} + +export { LineGeometry }; diff --git a/node_modules/three/examples/jsm/lines/LineMaterial.js b/node_modules/three/examples/jsm/lines/LineMaterial.js new file mode 100644 index 0000000..6ca4227 --- /dev/null +++ b/node_modules/three/examples/jsm/lines/LineMaterial.js @@ -0,0 +1,617 @@ +/** + * parameters = { + * color: , + * linewidth: , + * dashed: , + * dashScale: , + * dashSize: , + * dashOffset: , + * gapSize: , + * resolution: , // to be set by renderer + * } + */ + +import { + ShaderLib, + ShaderMaterial, + UniformsLib, + UniformsUtils, + Vector2 +} from 'three'; + + +UniformsLib.line = { + + worldUnits: { value: 1 }, + linewidth: { value: 1 }, + resolution: { value: new Vector2( 1, 1 ) }, + dashOffset: { value: 0 }, + dashScale: { value: 1 }, + dashSize: { value: 1 }, + gapSize: { value: 1 } // todo FIX - maybe change to totalSize + +}; + +ShaderLib[ 'line' ] = { + + uniforms: UniformsUtils.merge( [ + UniformsLib.common, + UniformsLib.fog, + UniformsLib.line + ] ), + + vertexShader: + /* glsl */` + #include + #include + #include + #include + #include + + uniform float linewidth; + uniform vec2 resolution; + + attribute vec3 instanceStart; + attribute vec3 instanceEnd; + + attribute vec3 instanceColorStart; + attribute vec3 instanceColorEnd; + + #ifdef WORLD_UNITS + + varying vec4 worldPos; + varying vec3 worldStart; + varying vec3 worldEnd; + + #ifdef USE_DASH + + varying vec2 vUv; + + #endif + + #else + + varying vec2 vUv; + + #endif + + #ifdef USE_DASH + + uniform float dashScale; + attribute float instanceDistanceStart; + attribute float instanceDistanceEnd; + varying float vLineDistance; + + #endif + + void trimSegment( const in vec4 start, inout vec4 end ) { + + // trim end segment so it terminates between the camera plane and the near plane + + // conservative estimate of the near plane + float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column + float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column + float nearEstimate = - 0.5 * b / a; + + float alpha = ( nearEstimate - start.z ) / ( end.z - start.z ); + + end.xyz = mix( start.xyz, end.xyz, alpha ); + + } + + void main() { + + #ifdef USE_COLOR + + vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd; + + #endif + + #ifdef USE_DASH + + vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd; + vUv = uv; + + #endif + + float aspect = resolution.x / resolution.y; + + // camera space + vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 ); + vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 ); + + #ifdef WORLD_UNITS + + worldStart = start.xyz; + worldEnd = end.xyz; + + #else + + vUv = uv; + + #endif + + // special case for perspective projection, and segments that terminate either in, or behind, the camera plane + // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space + // but we need to perform ndc-space calculations in the shader, so we must address this issue directly + // perhaps there is a more elegant solution -- WestLangley + + bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column + + if ( perspective ) { + + if ( start.z < 0.0 && end.z >= 0.0 ) { + + trimSegment( start, end ); + + } else if ( end.z < 0.0 && start.z >= 0.0 ) { + + trimSegment( end, start ); + + } + + } + + // clip space + vec4 clipStart = projectionMatrix * start; + vec4 clipEnd = projectionMatrix * end; + + // ndc space + vec3 ndcStart = clipStart.xyz / clipStart.w; + vec3 ndcEnd = clipEnd.xyz / clipEnd.w; + + // direction + vec2 dir = ndcEnd.xy - ndcStart.xy; + + // account for clip-space aspect ratio + dir.x *= aspect; + dir = normalize( dir ); + + #ifdef WORLD_UNITS + + vec3 worldDir = normalize( end.xyz - start.xyz ); + vec3 tmpFwd = normalize( mix( start.xyz, end.xyz, 0.5 ) ); + vec3 worldUp = normalize( cross( worldDir, tmpFwd ) ); + vec3 worldFwd = cross( worldDir, worldUp ); + worldPos = position.y < 0.5 ? start: end; + + // height offset + float hw = linewidth * 0.5; + worldPos.xyz += position.x < 0.0 ? hw * worldUp : - hw * worldUp; + + // don't extend the line if we're rendering dashes because we + // won't be rendering the endcaps + #ifndef USE_DASH + + // cap extension + worldPos.xyz += position.y < 0.5 ? - hw * worldDir : hw * worldDir; + + // add width to the box + worldPos.xyz += worldFwd * hw; + + // endcaps + if ( position.y > 1.0 || position.y < 0.0 ) { + + worldPos.xyz -= worldFwd * 2.0 * hw; + + } + + #endif + + // project the worldpos + vec4 clip = projectionMatrix * worldPos; + + // shift the depth of the projected points so the line + // segments overlap neatly + vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd; + clip.z = clipPose.z * clip.w; + + #else + + vec2 offset = vec2( dir.y, - dir.x ); + // undo aspect ratio adjustment + dir.x /= aspect; + offset.x /= aspect; + + // sign flip + if ( position.x < 0.0 ) offset *= - 1.0; + + // endcaps + if ( position.y < 0.0 ) { + + offset += - dir; + + } else if ( position.y > 1.0 ) { + + offset += dir; + + } + + // adjust for linewidth + offset *= linewidth; + + // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... + offset /= resolution.y; + + // select end + vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd; + + // back to clip space + offset *= clip.w; + + clip.xy += offset; + + #endif + + gl_Position = clip; + + vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation + + #include + #include + #include + + } + `, + + fragmentShader: + /* glsl */` + uniform vec3 diffuse; + uniform float opacity; + uniform float linewidth; + + #ifdef USE_DASH + + uniform float dashOffset; + uniform float dashSize; + uniform float gapSize; + + #endif + + varying float vLineDistance; + + #ifdef WORLD_UNITS + + varying vec4 worldPos; + varying vec3 worldStart; + varying vec3 worldEnd; + + #ifdef USE_DASH + + varying vec2 vUv; + + #endif + + #else + + varying vec2 vUv; + + #endif + + #include + #include + #include + #include + #include + + vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) { + + float mua; + float mub; + + vec3 p13 = p1 - p3; + vec3 p43 = p4 - p3; + + vec3 p21 = p2 - p1; + + float d1343 = dot( p13, p43 ); + float d4321 = dot( p43, p21 ); + float d1321 = dot( p13, p21 ); + float d4343 = dot( p43, p43 ); + float d2121 = dot( p21, p21 ); + + float denom = d2121 * d4343 - d4321 * d4321; + + float numer = d1343 * d4321 - d1321 * d4343; + + mua = numer / denom; + mua = clamp( mua, 0.0, 1.0 ); + mub = ( d1343 + d4321 * ( mua ) ) / d4343; + mub = clamp( mub, 0.0, 1.0 ); + + return vec2( mua, mub ); + + } + + void main() { + + #include + + #ifdef USE_DASH + + if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps + + if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX + + #endif + + float alpha = opacity; + + #ifdef WORLD_UNITS + + // Find the closest points on the view ray and the line segment + vec3 rayEnd = normalize( worldPos.xyz ) * 1e5; + vec3 lineDir = worldEnd - worldStart; + vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd ); + + vec3 p1 = worldStart + lineDir * params.x; + vec3 p2 = rayEnd * params.y; + vec3 delta = p1 - p2; + float len = length( delta ); + float norm = len / linewidth; + + #ifndef USE_DASH + + #ifdef USE_ALPHA_TO_COVERAGE + + float dnorm = fwidth( norm ); + alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm ); + + #else + + if ( norm > 0.5 ) { + + discard; + + } + + #endif + + #endif + + #else + + #ifdef USE_ALPHA_TO_COVERAGE + + // artifacts appear on some hardware if a derivative is taken within a conditional + float a = vUv.x; + float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; + float len2 = a * a + b * b; + float dlen = fwidth( len2 ); + + if ( abs( vUv.y ) > 1.0 ) { + + alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 ); + + } + + #else + + if ( abs( vUv.y ) > 1.0 ) { + + float a = vUv.x; + float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; + float len2 = a * a + b * b; + + if ( len2 > 1.0 ) discard; + + } + + #endif + + #endif + + vec4 diffuseColor = vec4( diffuse, alpha ); + + #include + #include + + gl_FragColor = vec4( diffuseColor.rgb, alpha ); + + #include + #include + #include + #include + + } + ` +}; + +class LineMaterial extends ShaderMaterial { + + constructor( parameters ) { + + super( { + + type: 'LineMaterial', + + uniforms: UniformsUtils.clone( ShaderLib[ 'line' ].uniforms ), + + vertexShader: ShaderLib[ 'line' ].vertexShader, + fragmentShader: ShaderLib[ 'line' ].fragmentShader, + + clipping: true // required for clipping support + + } ); + + this.isLineMaterial = true; + + this.setValues( parameters ); + + } + + get color() { + + return this.uniforms.diffuse.value; + + } + + set color( value ) { + + this.uniforms.diffuse.value = value; + + } + + get worldUnits() { + + return 'WORLD_UNITS' in this.defines; + + } + + set worldUnits( value ) { + + if ( value === true ) { + + this.defines.WORLD_UNITS = ''; + + } else { + + delete this.defines.WORLD_UNITS; + + } + + } + + get linewidth() { + + return this.uniforms.linewidth.value; + + } + + set linewidth( value ) { + + if ( ! this.uniforms.linewidth ) return; + this.uniforms.linewidth.value = value; + + } + + get dashed() { + + return 'USE_DASH' in this.defines; + + } + + set dashed( value ) { + + if ( ( value === true ) !== this.dashed ) { + + this.needsUpdate = true; + + } + + if ( value === true ) { + + this.defines.USE_DASH = ''; + + } else { + + delete this.defines.USE_DASH; + + } + + } + + get dashScale() { + + return this.uniforms.dashScale.value; + + } + + set dashScale( value ) { + + this.uniforms.dashScale.value = value; + + } + + get dashSize() { + + return this.uniforms.dashSize.value; + + } + + set dashSize( value ) { + + this.uniforms.dashSize.value = value; + + } + + get dashOffset() { + + return this.uniforms.dashOffset.value; + + } + + set dashOffset( value ) { + + this.uniforms.dashOffset.value = value; + + } + + get gapSize() { + + return this.uniforms.gapSize.value; + + } + + set gapSize( value ) { + + this.uniforms.gapSize.value = value; + + } + + get opacity() { + + return this.uniforms.opacity.value; + + } + + set opacity( value ) { + + if ( ! this.uniforms ) return; + this.uniforms.opacity.value = value; + + } + + get resolution() { + + return this.uniforms.resolution.value; + + } + + set resolution( value ) { + + this.uniforms.resolution.value.copy( value ); + + } + + get alphaToCoverage() { + + return 'USE_ALPHA_TO_COVERAGE' in this.defines; + + } + + set alphaToCoverage( value ) { + + if ( ! this.defines ) return; + + if ( ( value === true ) !== this.alphaToCoverage ) { + + this.needsUpdate = true; + + } + + if ( value === true ) { + + this.defines.USE_ALPHA_TO_COVERAGE = ''; + + } else { + + delete this.defines.USE_ALPHA_TO_COVERAGE; + + } + + } + +} + +export { LineMaterial }; diff --git a/node_modules/three/examples/jsm/lines/LineSegments2.js b/node_modules/three/examples/jsm/lines/LineSegments2.js new file mode 100644 index 0000000..e2a3e2a --- /dev/null +++ b/node_modules/three/examples/jsm/lines/LineSegments2.js @@ -0,0 +1,361 @@ +import { + Box3, + InstancedInterleavedBuffer, + InterleavedBufferAttribute, + Line3, + MathUtils, + Matrix4, + Mesh, + Sphere, + Vector3, + Vector4 +} from 'three'; +import { LineSegmentsGeometry } from '../lines/LineSegmentsGeometry.js'; +import { LineMaterial } from '../lines/LineMaterial.js'; + +const _start = new Vector3(); +const _end = new Vector3(); + +const _start4 = new Vector4(); +const _end4 = new Vector4(); + +const _ssOrigin = new Vector4(); +const _ssOrigin3 = new Vector3(); +const _mvMatrix = new Matrix4(); +const _line = new Line3(); +const _closestPoint = new Vector3(); + +const _box = new Box3(); +const _sphere = new Sphere(); +const _clipToWorldVector = new Vector4(); + +let _ray, _lineWidth; + +// Returns the margin required to expand by in world space given the distance from the camera, +// line width, resolution, and camera projection +function getWorldSpaceHalfWidth( camera, distance, resolution ) { + + // transform into clip space, adjust the x and y values by the pixel width offset, then + // transform back into world space to get world offset. Note clip space is [-1, 1] so full + // width does not need to be halved. + _clipToWorldVector.set( 0, 0, - distance, 1.0 ).applyMatrix4( camera.projectionMatrix ); + _clipToWorldVector.multiplyScalar( 1.0 / _clipToWorldVector.w ); + _clipToWorldVector.x = _lineWidth / resolution.width; + _clipToWorldVector.y = _lineWidth / resolution.height; + _clipToWorldVector.applyMatrix4( camera.projectionMatrixInverse ); + _clipToWorldVector.multiplyScalar( 1.0 / _clipToWorldVector.w ); + + return Math.abs( Math.max( _clipToWorldVector.x, _clipToWorldVector.y ) ); + +} + +function raycastWorldUnits( lineSegments, intersects ) { + + const matrixWorld = lineSegments.matrixWorld; + const geometry = lineSegments.geometry; + const instanceStart = geometry.attributes.instanceStart; + const instanceEnd = geometry.attributes.instanceEnd; + const segmentCount = Math.min( geometry.instanceCount, instanceStart.count ); + + for ( let i = 0, l = segmentCount; i < l; i ++ ) { + + _line.start.fromBufferAttribute( instanceStart, i ); + _line.end.fromBufferAttribute( instanceEnd, i ); + + _line.applyMatrix4( matrixWorld ); + + const pointOnLine = new Vector3(); + const point = new Vector3(); + + _ray.distanceSqToSegment( _line.start, _line.end, point, pointOnLine ); + const isInside = point.distanceTo( pointOnLine ) < _lineWidth * 0.5; + + if ( isInside ) { + + intersects.push( { + point, + pointOnLine, + distance: _ray.origin.distanceTo( point ), + object: lineSegments, + face: null, + faceIndex: i, + uv: null, + uv1: null, + } ); + + } + + } + +} + +function raycastScreenSpace( lineSegments, camera, intersects ) { + + const projectionMatrix = camera.projectionMatrix; + const material = lineSegments.material; + const resolution = material.resolution; + const matrixWorld = lineSegments.matrixWorld; + + const geometry = lineSegments.geometry; + const instanceStart = geometry.attributes.instanceStart; + const instanceEnd = geometry.attributes.instanceEnd; + const segmentCount = Math.min( geometry.instanceCount, instanceStart.count ); + + const near = - camera.near; + + // + + // pick a point 1 unit out along the ray to avoid the ray origin + // sitting at the camera origin which will cause "w" to be 0 when + // applying the projection matrix. + _ray.at( 1, _ssOrigin ); + + // ndc space [ - 1.0, 1.0 ] + _ssOrigin.w = 1; + _ssOrigin.applyMatrix4( camera.matrixWorldInverse ); + _ssOrigin.applyMatrix4( projectionMatrix ); + _ssOrigin.multiplyScalar( 1 / _ssOrigin.w ); + + // screen space + _ssOrigin.x *= resolution.x / 2; + _ssOrigin.y *= resolution.y / 2; + _ssOrigin.z = 0; + + _ssOrigin3.copy( _ssOrigin ); + + _mvMatrix.multiplyMatrices( camera.matrixWorldInverse, matrixWorld ); + + for ( let i = 0, l = segmentCount; i < l; i ++ ) { + + _start4.fromBufferAttribute( instanceStart, i ); + _end4.fromBufferAttribute( instanceEnd, i ); + + _start4.w = 1; + _end4.w = 1; + + // camera space + _start4.applyMatrix4( _mvMatrix ); + _end4.applyMatrix4( _mvMatrix ); + + // skip the segment if it's entirely behind the camera + const isBehindCameraNear = _start4.z > near && _end4.z > near; + if ( isBehindCameraNear ) { + + continue; + + } + + // trim the segment if it extends behind camera near + if ( _start4.z > near ) { + + const deltaDist = _start4.z - _end4.z; + const t = ( _start4.z - near ) / deltaDist; + _start4.lerp( _end4, t ); + + } else if ( _end4.z > near ) { + + const deltaDist = _end4.z - _start4.z; + const t = ( _end4.z - near ) / deltaDist; + _end4.lerp( _start4, t ); + + } + + // clip space + _start4.applyMatrix4( projectionMatrix ); + _end4.applyMatrix4( projectionMatrix ); + + // ndc space [ - 1.0, 1.0 ] + _start4.multiplyScalar( 1 / _start4.w ); + _end4.multiplyScalar( 1 / _end4.w ); + + // screen space + _start4.x *= resolution.x / 2; + _start4.y *= resolution.y / 2; + + _end4.x *= resolution.x / 2; + _end4.y *= resolution.y / 2; + + // create 2d segment + _line.start.copy( _start4 ); + _line.start.z = 0; + + _line.end.copy( _end4 ); + _line.end.z = 0; + + // get closest point on ray to segment + const param = _line.closestPointToPointParameter( _ssOrigin3, true ); + _line.at( param, _closestPoint ); + + // check if the intersection point is within clip space + const zPos = MathUtils.lerp( _start4.z, _end4.z, param ); + const isInClipSpace = zPos >= - 1 && zPos <= 1; + + const isInside = _ssOrigin3.distanceTo( _closestPoint ) < _lineWidth * 0.5; + + if ( isInClipSpace && isInside ) { + + _line.start.fromBufferAttribute( instanceStart, i ); + _line.end.fromBufferAttribute( instanceEnd, i ); + + _line.start.applyMatrix4( matrixWorld ); + _line.end.applyMatrix4( matrixWorld ); + + const pointOnLine = new Vector3(); + const point = new Vector3(); + + _ray.distanceSqToSegment( _line.start, _line.end, point, pointOnLine ); + + intersects.push( { + point: point, + pointOnLine: pointOnLine, + distance: _ray.origin.distanceTo( point ), + object: lineSegments, + face: null, + faceIndex: i, + uv: null, + uv1: null, + } ); + + } + + } + +} + +class LineSegments2 extends Mesh { + + constructor( geometry = new LineSegmentsGeometry(), material = new LineMaterial( { color: Math.random() * 0xffffff } ) ) { + + super( geometry, material ); + + this.isLineSegments2 = true; + + this.type = 'LineSegments2'; + + } + + // for backwards-compatibility, but could be a method of LineSegmentsGeometry... + + computeLineDistances() { + + const geometry = this.geometry; + + const instanceStart = geometry.attributes.instanceStart; + const instanceEnd = geometry.attributes.instanceEnd; + const lineDistances = new Float32Array( 2 * instanceStart.count ); + + for ( let i = 0, j = 0, l = instanceStart.count; i < l; i ++, j += 2 ) { + + _start.fromBufferAttribute( instanceStart, i ); + _end.fromBufferAttribute( instanceEnd, i ); + + lineDistances[ j ] = ( j === 0 ) ? 0 : lineDistances[ j - 1 ]; + lineDistances[ j + 1 ] = lineDistances[ j ] + _start.distanceTo( _end ); + + } + + const instanceDistanceBuffer = new InstancedInterleavedBuffer( lineDistances, 2, 1 ); // d0, d1 + + geometry.setAttribute( 'instanceDistanceStart', new InterleavedBufferAttribute( instanceDistanceBuffer, 1, 0 ) ); // d0 + geometry.setAttribute( 'instanceDistanceEnd', new InterleavedBufferAttribute( instanceDistanceBuffer, 1, 1 ) ); // d1 + + return this; + + } + + raycast( raycaster, intersects ) { + + const worldUnits = this.material.worldUnits; + const camera = raycaster.camera; + + if ( camera === null && ! worldUnits ) { + + console.error( 'LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.' ); + + } + + const threshold = ( raycaster.params.Line2 !== undefined ) ? raycaster.params.Line2.threshold || 0 : 0; + + _ray = raycaster.ray; + + const matrixWorld = this.matrixWorld; + const geometry = this.geometry; + const material = this.material; + + _lineWidth = material.linewidth + threshold; + + // check if we intersect the sphere bounds + if ( geometry.boundingSphere === null ) { + + geometry.computeBoundingSphere(); + + } + + _sphere.copy( geometry.boundingSphere ).applyMatrix4( matrixWorld ); + + // increase the sphere bounds by the worst case line screen space width + let sphereMargin; + if ( worldUnits ) { + + sphereMargin = _lineWidth * 0.5; + + } else { + + const distanceToSphere = Math.max( camera.near, _sphere.distanceToPoint( _ray.origin ) ); + sphereMargin = getWorldSpaceHalfWidth( camera, distanceToSphere, material.resolution ); + + } + + _sphere.radius += sphereMargin; + + if ( _ray.intersectsSphere( _sphere ) === false ) { + + return; + + } + + // check if we intersect the box bounds + if ( geometry.boundingBox === null ) { + + geometry.computeBoundingBox(); + + } + + _box.copy( geometry.boundingBox ).applyMatrix4( matrixWorld ); + + // increase the box bounds by the worst case line width + let boxMargin; + if ( worldUnits ) { + + boxMargin = _lineWidth * 0.5; + + } else { + + const distanceToBox = Math.max( camera.near, _box.distanceToPoint( _ray.origin ) ); + boxMargin = getWorldSpaceHalfWidth( camera, distanceToBox, material.resolution ); + + } + + _box.expandByScalar( boxMargin ); + + if ( _ray.intersectsBox( _box ) === false ) { + + return; + + } + + if ( worldUnits ) { + + raycastWorldUnits( this, intersects ); + + } else { + + raycastScreenSpace( this, camera, intersects ); + + } + + } + +} + +export { LineSegments2 }; diff --git a/node_modules/three/examples/jsm/lines/LineSegmentsGeometry.js b/node_modules/three/examples/jsm/lines/LineSegmentsGeometry.js new file mode 100644 index 0000000..c7cf877 --- /dev/null +++ b/node_modules/three/examples/jsm/lines/LineSegmentsGeometry.js @@ -0,0 +1,241 @@ +import { + Box3, + Float32BufferAttribute, + InstancedBufferGeometry, + InstancedInterleavedBuffer, + InterleavedBufferAttribute, + Sphere, + Vector3, + WireframeGeometry +} from 'three'; + +const _box = new Box3(); +const _vector = new Vector3(); + +class LineSegmentsGeometry extends InstancedBufferGeometry { + + constructor() { + + super(); + + this.isLineSegmentsGeometry = true; + + this.type = 'LineSegmentsGeometry'; + + const positions = [ - 1, 2, 0, 1, 2, 0, - 1, 1, 0, 1, 1, 0, - 1, 0, 0, 1, 0, 0, - 1, - 1, 0, 1, - 1, 0 ]; + const uvs = [ - 1, 2, 1, 2, - 1, 1, 1, 1, - 1, - 1, 1, - 1, - 1, - 2, 1, - 2 ]; + const index = [ 0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5 ]; + + this.setIndex( index ); + this.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); + this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + } + + applyMatrix4( matrix ) { + + const start = this.attributes.instanceStart; + const end = this.attributes.instanceEnd; + + if ( start !== undefined ) { + + start.applyMatrix4( matrix ); + + end.applyMatrix4( matrix ); + + start.needsUpdate = true; + + } + + if ( this.boundingBox !== null ) { + + this.computeBoundingBox(); + + } + + if ( this.boundingSphere !== null ) { + + this.computeBoundingSphere(); + + } + + return this; + + } + + setPositions( array ) { + + let lineSegments; + + if ( array instanceof Float32Array ) { + + lineSegments = array; + + } else if ( Array.isArray( array ) ) { + + lineSegments = new Float32Array( array ); + + } + + const instanceBuffer = new InstancedInterleavedBuffer( lineSegments, 6, 1 ); // xyz, xyz + + this.setAttribute( 'instanceStart', new InterleavedBufferAttribute( instanceBuffer, 3, 0 ) ); // xyz + this.setAttribute( 'instanceEnd', new InterleavedBufferAttribute( instanceBuffer, 3, 3 ) ); // xyz + + // + + this.computeBoundingBox(); + this.computeBoundingSphere(); + + return this; + + } + + setColors( array ) { + + let colors; + + if ( array instanceof Float32Array ) { + + colors = array; + + } else if ( Array.isArray( array ) ) { + + colors = new Float32Array( array ); + + } + + const instanceColorBuffer = new InstancedInterleavedBuffer( colors, 6, 1 ); // rgb, rgb + + this.setAttribute( 'instanceColorStart', new InterleavedBufferAttribute( instanceColorBuffer, 3, 0 ) ); // rgb + this.setAttribute( 'instanceColorEnd', new InterleavedBufferAttribute( instanceColorBuffer, 3, 3 ) ); // rgb + + return this; + + } + + fromWireframeGeometry( geometry ) { + + this.setPositions( geometry.attributes.position.array ); + + return this; + + } + + fromEdgesGeometry( geometry ) { + + this.setPositions( geometry.attributes.position.array ); + + return this; + + } + + fromMesh( mesh ) { + + this.fromWireframeGeometry( new WireframeGeometry( mesh.geometry ) ); + + // set colors, maybe + + return this; + + } + + fromLineSegments( lineSegments ) { + + const geometry = lineSegments.geometry; + + this.setPositions( geometry.attributes.position.array ); // assumes non-indexed + + // set colors, maybe + + return this; + + } + + computeBoundingBox() { + + if ( this.boundingBox === null ) { + + this.boundingBox = new Box3(); + + } + + const start = this.attributes.instanceStart; + const end = this.attributes.instanceEnd; + + if ( start !== undefined && end !== undefined ) { + + this.boundingBox.setFromBufferAttribute( start ); + + _box.setFromBufferAttribute( end ); + + this.boundingBox.union( _box ); + + } + + } + + computeBoundingSphere() { + + if ( this.boundingSphere === null ) { + + this.boundingSphere = new Sphere(); + + } + + if ( this.boundingBox === null ) { + + this.computeBoundingBox(); + + } + + const start = this.attributes.instanceStart; + const end = this.attributes.instanceEnd; + + if ( start !== undefined && end !== undefined ) { + + const center = this.boundingSphere.center; + + this.boundingBox.getCenter( center ); + + let maxRadiusSq = 0; + + for ( let i = 0, il = start.count; i < il; i ++ ) { + + _vector.fromBufferAttribute( start, i ); + maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector ) ); + + _vector.fromBufferAttribute( end, i ); + maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector ) ); + + } + + this.boundingSphere.radius = Math.sqrt( maxRadiusSq ); + + if ( isNaN( this.boundingSphere.radius ) ) { + + console.error( 'THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.', this ); + + } + + } + + } + + toJSON() { + + // todo + + } + + applyMatrix( matrix ) { + + console.warn( 'THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4().' ); + + return this.applyMatrix4( matrix ); + + } + +} + +export { LineSegmentsGeometry }; diff --git a/node_modules/three/examples/jsm/lines/Wireframe.js b/node_modules/three/examples/jsm/lines/Wireframe.js new file mode 100644 index 0000000..cfa65aa --- /dev/null +++ b/node_modules/three/examples/jsm/lines/Wireframe.js @@ -0,0 +1,56 @@ +import { + InstancedInterleavedBuffer, + InterleavedBufferAttribute, + Mesh, + Vector3 +} from 'three'; +import { LineSegmentsGeometry } from '../lines/LineSegmentsGeometry.js'; +import { LineMaterial } from '../lines/LineMaterial.js'; + +const _start = new Vector3(); +const _end = new Vector3(); + +class Wireframe extends Mesh { + + constructor( geometry = new LineSegmentsGeometry(), material = new LineMaterial( { color: Math.random() * 0xffffff } ) ) { + + super( geometry, material ); + + this.isWireframe = true; + + this.type = 'Wireframe'; + + } + + // for backwards-compatibility, but could be a method of LineSegmentsGeometry... + + computeLineDistances() { + + const geometry = this.geometry; + + const instanceStart = geometry.attributes.instanceStart; + const instanceEnd = geometry.attributes.instanceEnd; + const lineDistances = new Float32Array( 2 * instanceStart.count ); + + for ( let i = 0, j = 0, l = instanceStart.count; i < l; i ++, j += 2 ) { + + _start.fromBufferAttribute( instanceStart, i ); + _end.fromBufferAttribute( instanceEnd, i ); + + lineDistances[ j ] = ( j === 0 ) ? 0 : lineDistances[ j - 1 ]; + lineDistances[ j + 1 ] = lineDistances[ j ] + _start.distanceTo( _end ); + + } + + const instanceDistanceBuffer = new InstancedInterleavedBuffer( lineDistances, 2, 1 ); // d0, d1 + + geometry.setAttribute( 'instanceDistanceStart', new InterleavedBufferAttribute( instanceDistanceBuffer, 1, 0 ) ); // d0 + geometry.setAttribute( 'instanceDistanceEnd', new InterleavedBufferAttribute( instanceDistanceBuffer, 1, 1 ) ); // d1 + + return this; + + } + +} + +export { Wireframe }; diff --git a/node_modules/three/examples/jsm/lines/WireframeGeometry2.js b/node_modules/three/examples/jsm/lines/WireframeGeometry2.js new file mode 100644 index 0000000..07940d3 --- /dev/null +++ b/node_modules/three/examples/jsm/lines/WireframeGeometry2.js @@ -0,0 +1,24 @@ +import { + WireframeGeometry +} from 'three'; +import { LineSegmentsGeometry } from '../lines/LineSegmentsGeometry.js'; + +class WireframeGeometry2 extends LineSegmentsGeometry { + + constructor( geometry ) { + + super(); + + this.isWireframeGeometry2 = true; + + this.type = 'WireframeGeometry2'; + + this.fromWireframeGeometry( new WireframeGeometry( geometry ) ); + + // set colors, maybe + + } + +} + +export { WireframeGeometry2 }; diff --git a/node_modules/three/examples/jsm/loaders/3DMLoader.js b/node_modules/three/examples/jsm/loaders/3DMLoader.js new file mode 100644 index 0000000..6b1fc39 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/3DMLoader.js @@ -0,0 +1,1764 @@ +import { + BufferGeometryLoader, + CanvasTexture, + ClampToEdgeWrapping, + Color, + DirectionalLight, + DoubleSide, + FileLoader, + LinearFilter, + Line, + LineBasicMaterial, + Loader, + Matrix4, + Mesh, + MeshPhysicalMaterial, + MeshStandardMaterial, + Object3D, + PointLight, + Points, + PointsMaterial, + RectAreaLight, + RepeatWrapping, + SpotLight, + Sprite, + SpriteMaterial, + TextureLoader +} from 'three'; + +import { EXRLoader } from '../loaders/EXRLoader.js'; + +const _taskCache = new WeakMap(); + +class Rhino3dmLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.libraryPath = ''; + this.libraryPending = null; + this.libraryBinary = null; + this.libraryConfig = {}; + + this.url = ''; + + this.workerLimit = 4; + this.workerPool = []; + this.workerNextTaskID = 1; + this.workerSourceURL = ''; + this.workerConfig = {}; + + this.materials = []; + this.warnings = []; + + } + + setLibraryPath( path ) { + + this.libraryPath = path; + + return this; + + } + + setWorkerLimit( workerLimit ) { + + this.workerLimit = workerLimit; + + return this; + + } + + load( url, onLoad, onProgress, onError ) { + + const loader = new FileLoader( this.manager ); + + loader.setPath( this.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( this.requestHeader ); + + this.url = url; + + loader.load( url, ( buffer ) => { + + // Check for an existing task using this buffer. A transferred buffer cannot be transferred + // again from this thread. + if ( _taskCache.has( buffer ) ) { + + const cachedTask = _taskCache.get( buffer ); + + return cachedTask.promise.then( onLoad ).catch( onError ); + + } + + this.decodeObjects( buffer, url ) + .then( result => { + + result.userData.warnings = this.warnings; + onLoad( result ); + + } ) + .catch( e => onError( e ) ); + + }, onProgress, onError ); + + } + + debug() { + + console.log( 'Task load: ', this.workerPool.map( ( worker ) => worker._taskLoad ) ); + + } + + decodeObjects( buffer, url ) { + + let worker; + let taskID; + + const taskCost = buffer.byteLength; + + const objectPending = this._getWorker( taskCost ) + .then( ( _worker ) => { + + worker = _worker; + taskID = this.workerNextTaskID ++; + + return new Promise( ( resolve, reject ) => { + + worker._callbacks[ taskID ] = { resolve, reject }; + + worker.postMessage( { type: 'decode', id: taskID, buffer }, [ buffer ] ); + + // this.debug(); + + } ); + + } ) + .then( ( message ) => this._createGeometry( message.data ) ) + .catch( e => { + + throw e; + + } ); + + // Remove task from the task list. + // Note: replaced '.finally()' with '.catch().then()' block - iOS 11 support (#19416) + objectPending + .catch( () => true ) + .then( () => { + + if ( worker && taskID ) { + + this._releaseTask( worker, taskID ); + + //this.debug(); + + } + + } ); + + // Cache the task result. + _taskCache.set( buffer, { + + url: url, + promise: objectPending + + } ); + + return objectPending; + + } + + parse( data, onLoad, onError ) { + + this.decodeObjects( data, '' ) + .then( result => { + + result.userData.warnings = this.warnings; + onLoad( result ); + + } ) + .catch( e => onError( e ) ); + + } + + _compareMaterials( material ) { + + const mat = {}; + mat.name = material.name; + mat.color = {}; + mat.color.r = material.color.r; + mat.color.g = material.color.g; + mat.color.b = material.color.b; + mat.type = material.type; + mat.vertexColors = material.vertexColors; + + const json = JSON.stringify( mat ); + + for ( let i = 0; i < this.materials.length; i ++ ) { + + const m = this.materials[ i ]; + const _mat = {}; + _mat.name = m.name; + _mat.color = {}; + _mat.color.r = m.color.r; + _mat.color.g = m.color.g; + _mat.color.b = m.color.b; + _mat.type = m.type; + _mat.vertexColors = m.vertexColors; + + if ( JSON.stringify( _mat ) === json ) { + + return m; + + } + + } + + this.materials.push( material ); + + return material; + + } + + _createMaterial( material, renderEnvironment ) { + + if ( material === undefined ) { + + return new MeshStandardMaterial( { + color: new Color( 1, 1, 1 ), + metalness: 0.8, + name: Loader.DEFAULT_MATERIAL_NAME, + side: DoubleSide + } ); + + } + + //console.log(material) + + const mat = new MeshPhysicalMaterial( { + + color: new Color( material.diffuseColor.r / 255.0, material.diffuseColor.g / 255.0, material.diffuseColor.b / 255.0 ), + emissive: new Color( material.emissionColor.r, material.emissionColor.g, material.emissionColor.b ), + flatShading: material.disableLighting, + ior: material.indexOfRefraction, + name: material.name, + reflectivity: material.reflectivity, + opacity: 1.0 - material.transparency, + side: DoubleSide, + specularColor: material.specularColor, + transparent: material.transparency > 0 ? true : false + + } ); + + mat.userData.id = material.id; + + if ( material.pbrSupported ) { + + const pbr = material.pbr; + + mat.anisotropy = pbr.anisotropic; + mat.anisotropyRotation = pbr.anisotropicRotation; + mat.color = new Color( pbr.baseColor.r, pbr.baseColor.g, pbr.baseColor.b ); + mat.clearcoat = pbr.clearcoat; + mat.clearcoatRoughness = pbr.clearcoatRoughness; + mat.metalness = pbr.metallic; + mat.transmission = 1 - pbr.opacity; + mat.roughness = pbr.roughness; + mat.sheen = pbr.sheen; + mat.specularIntensity = pbr.specular; + mat.thickness = pbr.subsurface; + + } + + if ( material.pbrSupported && material.pbr.opacity === 0 && material.transparency === 1 ) { + + //some compromises + + mat.opacity = 0.2; + mat.transmission = 1.00; + + } + + const textureLoader = new TextureLoader(); + + for ( let i = 0; i < material.textures.length; i ++ ) { + + const texture = material.textures[ i ]; + + if ( texture.image !== null ) { + + const map = textureLoader.load( texture.image ); + + //console.log(texture.type ) + + switch ( texture.type ) { + + case 'Bump': + + mat.bumpMap = map; + + break; + + case 'Diffuse': + + mat.map = map; + + break; + + case 'Emap': + + mat.envMap = map; + + break; + + case 'Opacity': + + mat.transmissionMap = map; + + break; + + case 'Transparency': + + mat.alphaMap = map; + mat.transparent = true; + + break; + + case 'PBR_Alpha': + + mat.alphaMap = map; + mat.transparent = true; + + break; + + case 'PBR_AmbientOcclusion': + + mat.aoMap = map; + + break; + + case 'PBR_Anisotropic': + + mat.anisotropyMap = map; + + break; + + case 'PBR_BaseColor': + + mat.map = map; + + break; + + case 'PBR_Clearcoat': + + mat.clearcoatMap = map; + + break; + + case 'PBR_ClearcoatBump': + + mat.clearcoatNormalMap = map; + + break; + + case 'PBR_ClearcoatRoughness': + + mat.clearcoatRoughnessMap = map; + + break; + + case 'PBR_Displacement': + + mat.displacementMap = map; + + break; + + case 'PBR_Emission': + + mat.emissiveMap = map; + + break; + + case 'PBR_Metallic': + + mat.metalnessMap = map; + + break; + + case 'PBR_Roughness': + + mat.roughnessMap = map; + + break; + + case 'PBR_Sheen': + + mat.sheenColorMap = map; + + break; + + case 'PBR_Specular': + + mat.specularColorMap = map; + + break; + + case 'PBR_Subsurface': + + mat.thicknessMap = map; + + break; + + default: + + this.warnings.push( { + message: `THREE.3DMLoader: No conversion exists for 3dm ${texture.type}.`, + type: 'no conversion' + } ); + + break; + + } + + map.wrapS = texture.wrapU === 0 ? RepeatWrapping : ClampToEdgeWrapping; + map.wrapT = texture.wrapV === 0 ? RepeatWrapping : ClampToEdgeWrapping; + + if ( texture.repeat ) { + + map.repeat.set( texture.repeat[ 0 ], texture.repeat[ 1 ] ); + + } + + } + + } + + if ( renderEnvironment ) { + + new EXRLoader().load( renderEnvironment.image, function ( texture ) { + + texture.mapping = THREE.EquirectangularReflectionMapping; + mat.envMap = texture; + + } ); + + } + + return mat; + + } + + _createGeometry( data ) { + + const object = new Object3D(); + const instanceDefinitionObjects = []; + const instanceDefinitions = []; + const instanceReferences = []; + + object.userData[ 'layers' ] = data.layers; + object.userData[ 'groups' ] = data.groups; + object.userData[ 'settings' ] = data.settings; + object.userData.settings[ 'renderSettings' ] = data.renderSettings; + object.userData[ 'objectType' ] = 'File3dm'; + object.userData[ 'materials' ] = null; + + object.name = this.url; + + let objects = data.objects; + const materials = data.materials; + + for ( let i = 0; i < objects.length; i ++ ) { + + const obj = objects[ i ]; + const attributes = obj.attributes; + + switch ( obj.objectType ) { + + case 'InstanceDefinition': + + instanceDefinitions.push( obj ); + + break; + + case 'InstanceReference': + + instanceReferences.push( obj ); + + break; + + default: + + let matId = null; + + switch ( attributes.materialSource.name ) { + + case 'ObjectMaterialSource_MaterialFromLayer': + //check layer index + if ( attributes.layerIndex >= 0 ) { + + matId = data.layers[ attributes.layerIndex ].renderMaterialIndex; + + } + + break; + + case 'ObjectMaterialSource_MaterialFromObject': + + if ( attributes.materialIndex >= 0 ) { + + matId = attributes.materialIndex; + + } + + break; + + } + + let material = null; + + if ( matId >= 0 ) { + + const rMaterial = materials[ matId ]; + material = this._createMaterial( rMaterial, data.renderEnvironment ); + + + } + + const _object = this._createObject( obj, material ); + + if ( _object === undefined ) { + + continue; + + } + + const layer = data.layers[ attributes.layerIndex ]; + + _object.visible = layer ? data.layers[ attributes.layerIndex ].visible : true; + + if ( attributes.isInstanceDefinitionObject ) { + + instanceDefinitionObjects.push( _object ); + + } else { + + object.add( _object ); + + } + + break; + + } + + } + + for ( let i = 0; i < instanceDefinitions.length; i ++ ) { + + const iDef = instanceDefinitions[ i ]; + + objects = []; + + for ( let j = 0; j < iDef.attributes.objectIds.length; j ++ ) { + + const objId = iDef.attributes.objectIds[ j ]; + + for ( let p = 0; p < instanceDefinitionObjects.length; p ++ ) { + + const idoId = instanceDefinitionObjects[ p ].userData.attributes.id; + + if ( objId === idoId ) { + + objects.push( instanceDefinitionObjects[ p ] ); + + } + + } + + } + + // Currently clones geometry and does not take advantage of instancing + + for ( let j = 0; j < instanceReferences.length; j ++ ) { + + const iRef = instanceReferences[ j ]; + + if ( iRef.geometry.parentIdefId === iDef.attributes.id ) { + + const iRefObject = new Object3D(); + const xf = iRef.geometry.xform.array; + + const matrix = new Matrix4(); + matrix.set( ...xf ); + + iRefObject.applyMatrix4( matrix ); + + for ( let p = 0; p < objects.length; p ++ ) { + + iRefObject.add( objects[ p ].clone( true ) ); + + } + + object.add( iRefObject ); + + } + + } + + } + + object.userData[ 'materials' ] = this.materials; + object.name = ''; + return object; + + } + + _createObject( obj, mat ) { + + const loader = new BufferGeometryLoader(); + + const attributes = obj.attributes; + + let geometry, material, _color, color; + + switch ( obj.objectType ) { + + case 'Point': + case 'PointSet': + + geometry = loader.parse( obj.geometry ); + + if ( geometry.attributes.hasOwnProperty( 'color' ) ) { + + material = new PointsMaterial( { vertexColors: true, sizeAttenuation: false, size: 2 } ); + + } else { + + _color = attributes.drawColor; + color = new Color( _color.r / 255.0, _color.g / 255.0, _color.b / 255.0 ); + material = new PointsMaterial( { color: color, sizeAttenuation: false, size: 2 } ); + + } + + material = this._compareMaterials( material ); + + const points = new Points( geometry, material ); + points.userData[ 'attributes' ] = attributes; + points.userData[ 'objectType' ] = obj.objectType; + + if ( attributes.name ) { + + points.name = attributes.name; + + } + + return points; + + case 'Mesh': + case 'Extrusion': + case 'SubD': + case 'Brep': + + if ( obj.geometry === null ) return; + + geometry = loader.parse( obj.geometry ); + + + if ( mat === null ) { + + mat = this._createMaterial(); + + } + + + if ( geometry.attributes.hasOwnProperty( 'color' ) ) { + + mat.vertexColors = true; + + } + + mat = this._compareMaterials( mat ); + + const mesh = new Mesh( geometry, mat ); + mesh.castShadow = attributes.castsShadows; + mesh.receiveShadow = attributes.receivesShadows; + mesh.userData[ 'attributes' ] = attributes; + mesh.userData[ 'objectType' ] = obj.objectType; + + if ( attributes.name ) { + + mesh.name = attributes.name; + + } + + return mesh; + + case 'Curve': + + geometry = loader.parse( obj.geometry ); + + _color = attributes.drawColor; + color = new Color( _color.r / 255.0, _color.g / 255.0, _color.b / 255.0 ); + + material = new LineBasicMaterial( { color: color } ); + material = this._compareMaterials( material ); + + const lines = new Line( geometry, material ); + lines.userData[ 'attributes' ] = attributes; + lines.userData[ 'objectType' ] = obj.objectType; + + if ( attributes.name ) { + + lines.name = attributes.name; + + } + + return lines; + + case 'TextDot': + + geometry = obj.geometry; + + const ctx = document.createElement( 'canvas' ).getContext( '2d' ); + const font = `${geometry.fontHeight}px ${geometry.fontFace}`; + ctx.font = font; + const width = ctx.measureText( geometry.text ).width + 10; + const height = geometry.fontHeight + 10; + + const r = window.devicePixelRatio; + + ctx.canvas.width = width * r; + ctx.canvas.height = height * r; + ctx.canvas.style.width = width + 'px'; + ctx.canvas.style.height = height + 'px'; + ctx.setTransform( r, 0, 0, r, 0, 0 ); + + ctx.font = font; + ctx.textBaseline = 'middle'; + ctx.textAlign = 'center'; + color = attributes.drawColor; + ctx.fillStyle = `rgba(${color.r},${color.g},${color.b},${color.a})`; + ctx.fillRect( 0, 0, width, height ); + ctx.fillStyle = 'white'; + ctx.fillText( geometry.text, width / 2, height / 2 ); + + const texture = new CanvasTexture( ctx.canvas ); + texture.minFilter = LinearFilter; + texture.wrapS = ClampToEdgeWrapping; + texture.wrapT = ClampToEdgeWrapping; + + material = new SpriteMaterial( { map: texture, depthTest: false } ); + const sprite = new Sprite( material ); + sprite.position.set( geometry.point[ 0 ], geometry.point[ 1 ], geometry.point[ 2 ] ); + sprite.scale.set( width / 10, height / 10, 1.0 ); + + sprite.userData[ 'attributes' ] = attributes; + sprite.userData[ 'objectType' ] = obj.objectType; + + if ( attributes.name ) { + + sprite.name = attributes.name; + + } + + return sprite; + + case 'Light': + + geometry = obj.geometry; + + let light; + + switch ( geometry.lightStyle.name ) { + + case 'LightStyle_WorldPoint': + + light = new PointLight(); + light.castShadow = attributes.castsShadows; + light.position.set( geometry.location[ 0 ], geometry.location[ 1 ], geometry.location[ 2 ] ); + light.shadow.normalBias = 0.1; + + break; + + case 'LightStyle_WorldSpot': + + light = new SpotLight(); + light.castShadow = attributes.castsShadows; + light.position.set( geometry.location[ 0 ], geometry.location[ 1 ], geometry.location[ 2 ] ); + light.target.position.set( geometry.direction[ 0 ], geometry.direction[ 1 ], geometry.direction[ 2 ] ); + light.angle = geometry.spotAngleRadians; + light.shadow.normalBias = 0.1; + + break; + + case 'LightStyle_WorldRectangular': + + light = new RectAreaLight(); + const width = Math.abs( geometry.width[ 2 ] ); + const height = Math.abs( geometry.length[ 0 ] ); + light.position.set( geometry.location[ 0 ] - ( height / 2 ), geometry.location[ 1 ], geometry.location[ 2 ] - ( width / 2 ) ); + light.height = height; + light.width = width; + light.lookAt( geometry.direction[ 0 ], geometry.direction[ 1 ], geometry.direction[ 2 ] ); + + break; + + case 'LightStyle_WorldDirectional': + + light = new DirectionalLight(); + light.castShadow = attributes.castsShadows; + light.position.set( geometry.location[ 0 ], geometry.location[ 1 ], geometry.location[ 2 ] ); + light.target.position.set( geometry.direction[ 0 ], geometry.direction[ 1 ], geometry.direction[ 2 ] ); + light.shadow.normalBias = 0.1; + + break; + + case 'LightStyle_WorldLinear': + // no conversion exists, warning has already been printed to the console + break; + + default: + break; + + } + + if ( light ) { + + light.intensity = geometry.intensity; + _color = geometry.diffuse; + color = new Color( _color.r / 255.0, _color.g / 255.0, _color.b / 255.0 ); + light.color = color; + light.userData[ 'attributes' ] = attributes; + light.userData[ 'objectType' ] = obj.objectType; + + } + + return light; + + } + + } + + _initLibrary() { + + if ( ! this.libraryPending ) { + + // Load rhino3dm wrapper. + const jsLoader = new FileLoader( this.manager ); + jsLoader.setPath( this.libraryPath ); + const jsContent = new Promise( ( resolve, reject ) => { + + jsLoader.load( 'rhino3dm.js', resolve, undefined, reject ); + + } ); + + // Load rhino3dm WASM binary. + const binaryLoader = new FileLoader( this.manager ); + binaryLoader.setPath( this.libraryPath ); + binaryLoader.setResponseType( 'arraybuffer' ); + const binaryContent = new Promise( ( resolve, reject ) => { + + binaryLoader.load( 'rhino3dm.wasm', resolve, undefined, reject ); + + } ); + + this.libraryPending = Promise.all( [ jsContent, binaryContent ] ) + .then( ( [ jsContent, binaryContent ] ) => { + + //this.libraryBinary = binaryContent; + this.libraryConfig.wasmBinary = binaryContent; + + const fn = Rhino3dmWorker.toString(); + + const body = [ + '/* rhino3dm.js */', + jsContent, + '/* worker */', + fn.substring( fn.indexOf( '{' ) + 1, fn.lastIndexOf( '}' ) ) + ].join( '\n' ); + + this.workerSourceURL = URL.createObjectURL( new Blob( [ body ] ) ); + + } ); + + } + + return this.libraryPending; + + } + + _getWorker( taskCost ) { + + return this._initLibrary().then( () => { + + if ( this.workerPool.length < this.workerLimit ) { + + const worker = new Worker( this.workerSourceURL ); + + worker._callbacks = {}; + worker._taskCosts = {}; + worker._taskLoad = 0; + + worker.postMessage( { + type: 'init', + libraryConfig: this.libraryConfig + } ); + + worker.onmessage = e => { + + const message = e.data; + + switch ( message.type ) { + + case 'warning': + this.warnings.push( message.data ); + console.warn( message.data ); + break; + + case 'decode': + worker._callbacks[ message.id ].resolve( message ); + break; + + case 'error': + worker._callbacks[ message.id ].reject( message ); + break; + + default: + console.error( 'THREE.Rhino3dmLoader: Unexpected message, "' + message.type + '"' ); + + } + + }; + + this.workerPool.push( worker ); + + } else { + + this.workerPool.sort( function ( a, b ) { + + return a._taskLoad > b._taskLoad ? - 1 : 1; + + } ); + + } + + const worker = this.workerPool[ this.workerPool.length - 1 ]; + + worker._taskLoad += taskCost; + + return worker; + + } ); + + } + + _releaseTask( worker, taskID ) { + + worker._taskLoad -= worker._taskCosts[ taskID ]; + delete worker._callbacks[ taskID ]; + delete worker._taskCosts[ taskID ]; + + } + + dispose() { + + for ( let i = 0; i < this.workerPool.length; ++ i ) { + + this.workerPool[ i ].terminate(); + + } + + this.workerPool.length = 0; + + return this; + + } + +} + +/* WEB WORKER */ + +function Rhino3dmWorker() { + + let libraryPending; + let libraryConfig; + let rhino; + let taskID; + + onmessage = function ( e ) { + + const message = e.data; + + switch ( message.type ) { + + case 'init': + + libraryConfig = message.libraryConfig; + const wasmBinary = libraryConfig.wasmBinary; + let RhinoModule; + libraryPending = new Promise( function ( resolve ) { + + /* Like Basis Loader */ + RhinoModule = { wasmBinary, onRuntimeInitialized: resolve }; + + rhino3dm( RhinoModule ); // eslint-disable-line no-undef + + } ).then( () => { + + rhino = RhinoModule; + + } ); + + break; + + case 'decode': + + taskID = message.id; + const buffer = message.buffer; + libraryPending.then( () => { + + try { + + const data = decodeObjects( rhino, buffer ); + self.postMessage( { type: 'decode', id: message.id, data } ); + + } catch ( error ) { + + self.postMessage( { type: 'error', id: message.id, error } ); + + } + + } ); + + break; + + } + + }; + + function decodeObjects( rhino, buffer ) { + + const arr = new Uint8Array( buffer ); + const doc = rhino.File3dm.fromByteArray( arr ); + + const objects = []; + const materials = []; + const layers = []; + const views = []; + const namedViews = []; + const groups = []; + const strings = []; + + //Handle objects + + const objs = doc.objects(); + const cnt = objs.count; + + for ( let i = 0; i < cnt; i ++ ) { + + const _object = objs.get( i ); + + const object = extractObjectData( _object, doc ); + + _object.delete(); + + if ( object ) { + + objects.push( object ); + + } + + } + + // Handle instance definitions + // console.log( `Instance Definitions Count: ${doc.instanceDefinitions().count()}` ); + + for ( let i = 0; i < doc.instanceDefinitions().count; i ++ ) { + + const idef = doc.instanceDefinitions().get( i ); + const idefAttributes = extractProperties( idef ); + idefAttributes.objectIds = idef.getObjectIds(); + + objects.push( { geometry: null, attributes: idefAttributes, objectType: 'InstanceDefinition' } ); + + } + + // Handle materials + + const textureTypes = [ + // rhino.TextureType.Bitmap, + rhino.TextureType.Diffuse, + rhino.TextureType.Bump, + rhino.TextureType.Transparency, + rhino.TextureType.Opacity, + rhino.TextureType.Emap + ]; + + const pbrTextureTypes = [ + rhino.TextureType.PBR_BaseColor, + rhino.TextureType.PBR_Subsurface, + rhino.TextureType.PBR_SubsurfaceScattering, + rhino.TextureType.PBR_SubsurfaceScatteringRadius, + rhino.TextureType.PBR_Metallic, + rhino.TextureType.PBR_Specular, + rhino.TextureType.PBR_SpecularTint, + rhino.TextureType.PBR_Roughness, + rhino.TextureType.PBR_Anisotropic, + rhino.TextureType.PBR_Anisotropic_Rotation, + rhino.TextureType.PBR_Sheen, + rhino.TextureType.PBR_SheenTint, + rhino.TextureType.PBR_Clearcoat, + rhino.TextureType.PBR_ClearcoatBump, + rhino.TextureType.PBR_ClearcoatRoughness, + rhino.TextureType.PBR_OpacityIor, + rhino.TextureType.PBR_OpacityRoughness, + rhino.TextureType.PBR_Emission, + rhino.TextureType.PBR_AmbientOcclusion, + rhino.TextureType.PBR_Displacement + ]; + + for ( let i = 0; i < doc.materials().count; i ++ ) { + + const _material = doc.materials().get( i ); + + const material = extractProperties( _material ); + + const textures = []; + + textures.push( ...extractTextures( _material, textureTypes, doc ) ); + + material.pbrSupported = _material.physicallyBased().supported; + + if ( material.pbrSupported ) { + + textures.push( ...extractTextures( _material, pbrTextureTypes, doc ) ); + material.pbr = extractProperties( _material.physicallyBased() ); + + } + + material.textures = textures; + + materials.push( material ); + + _material.delete(); + + } + + // Handle layers + + for ( let i = 0; i < doc.layers().count; i ++ ) { + + const _layer = doc.layers().get( i ); + const layer = extractProperties( _layer ); + + layers.push( layer ); + + _layer.delete(); + + } + + // Handle views + + for ( let i = 0; i < doc.views().count; i ++ ) { + + const _view = doc.views().get( i ); + const view = extractProperties( _view ); + + views.push( view ); + + _view.delete(); + + } + + // Handle named views + + for ( let i = 0; i < doc.namedViews().count; i ++ ) { + + const _namedView = doc.namedViews().get( i ); + const namedView = extractProperties( _namedView ); + + namedViews.push( namedView ); + + _namedView.delete(); + + } + + // Handle groups + + for ( let i = 0; i < doc.groups().count; i ++ ) { + + const _group = doc.groups().get( i ); + const group = extractProperties( _group ); + + groups.push( group ); + + _group.delete(); + + } + + // Handle settings + + const settings = extractProperties( doc.settings() ); + + //TODO: Handle other document stuff like dimstyles, instance definitions, bitmaps etc. + + // Handle dimstyles + // console.log( `Dimstyle Count: ${doc.dimstyles().count()}` ); + + // Handle bitmaps + // console.log( `Bitmap Count: ${doc.bitmaps().count()}` ); + + // Handle strings + // console.log( `Document Strings Count: ${doc.strings().count()}` ); + // Note: doc.strings().documentUserTextCount() counts any doc.strings defined in a section + // console.log( `Document User Text Count: ${doc.strings().documentUserTextCount()}` ); + + const strings_count = doc.strings().count; + + for ( let i = 0; i < strings_count; i ++ ) { + + strings.push( doc.strings().get( i ) ); + + } + + // Handle Render Environments for Material Environment + + // get the id of the active render environment skylight, which we'll use for environment texture + const reflectionId = doc.settings().renderSettings().renderEnvironments.reflectionId; + + const rc = doc.renderContent(); + + let renderEnvironment = null; + + for ( let i = 0; i < rc.count; i ++ ) { + + const content = rc.get( i ); + + switch ( content.kind ) { + + case 'environment': + + const id = content.id; + + // there could be multiple render environments in a 3dm file + if ( id !== reflectionId ) break; + + const renderTexture = content.findChild( 'texture' ); + const fileName = renderTexture.fileName; + + for ( let j = 0; j < doc.embeddedFiles().count; j ++ ) { + + const _fileName = doc.embeddedFiles().get( j ).fileName; + + if ( fileName === _fileName ) { + + const background = doc.getEmbeddedFileAsBase64( fileName ); + const backgroundImage = 'data:image/png;base64,' + background; + renderEnvironment = { type: 'renderEnvironment', image: backgroundImage, name: fileName }; + + } + + } + + break; + + } + + } + + // Handle Render Settings + + const renderSettings = { + ambientLight: doc.settings().renderSettings().ambientLight, + backgroundColorTop: doc.settings().renderSettings().backgroundColorTop, + backgroundColorBottom: doc.settings().renderSettings().backgroundColorBottom, + useHiddenLights: doc.settings().renderSettings().useHiddenLights, + depthCue: doc.settings().renderSettings().depthCue, + flatShade: doc.settings().renderSettings().flatShade, + renderBackFaces: doc.settings().renderSettings().renderBackFaces, + renderPoints: doc.settings().renderSettings().renderPoints, + renderCurves: doc.settings().renderSettings().renderCurves, + renderIsoParams: doc.settings().renderSettings().renderIsoParams, + renderMeshEdges: doc.settings().renderSettings().renderMeshEdges, + renderAnnotations: doc.settings().renderSettings().renderAnnotations, + useViewportSize: doc.settings().renderSettings().useViewportSize, + scaleBackgroundToFit: doc.settings().renderSettings().scaleBackgroundToFit, + transparentBackground: doc.settings().renderSettings().transparentBackground, + imageDpi: doc.settings().renderSettings().imageDpi, + shadowMapLevel: doc.settings().renderSettings().shadowMapLevel, + namedView: doc.settings().renderSettings().namedView, + snapShot: doc.settings().renderSettings().snapShot, + specificViewport: doc.settings().renderSettings().specificViewport, + groundPlane: extractProperties( doc.settings().renderSettings().groundPlane ), + safeFrame: extractProperties( doc.settings().renderSettings().safeFrame ), + dithering: extractProperties( doc.settings().renderSettings().dithering ), + skylight: extractProperties( doc.settings().renderSettings().skylight ), + linearWorkflow: extractProperties( doc.settings().renderSettings().linearWorkflow ), + renderChannels: extractProperties( doc.settings().renderSettings().renderChannels ), + sun: extractProperties( doc.settings().renderSettings().sun ), + renderEnvironments: extractProperties( doc.settings().renderSettings().renderEnvironments ), + postEffects: extractProperties( doc.settings().renderSettings().postEffects ), + + }; + + doc.delete(); + + return { objects, materials, layers, views, namedViews, groups, strings, settings, renderSettings, renderEnvironment }; + + } + + function extractTextures( m, tTypes, d ) { + + const textures = []; + + for ( let i = 0; i < tTypes.length; i ++ ) { + + const _texture = m.getTexture( tTypes[ i ] ); + if ( _texture ) { + + let textureType = tTypes[ i ].constructor.name; + textureType = textureType.substring( 12, textureType.length ); + const texture = extractTextureData( _texture, textureType, d ); + textures.push( texture ); + _texture.delete(); + + } + + } + + return textures; + + } + + function extractTextureData( t, tType, d ) { + + const texture = { type: tType }; + + const image = d.getEmbeddedFileAsBase64( t.fileName ); + + texture.wrapU = t.wrapU; + texture.wrapV = t.wrapV; + texture.wrapW = t.wrapW; + const uvw = t.uvwTransform.toFloatArray( true ); + + texture.repeat = [ uvw[ 0 ], uvw[ 5 ] ]; + + if ( image ) { + + texture.image = 'data:image/png;base64,' + image; + + } else { + + self.postMessage( { type: 'warning', id: taskID, data: { + message: `THREE.3DMLoader: Image for ${tType} texture not embedded in file.`, + type: 'missing resource' + } + + } ); + + texture.image = null; + + } + + return texture; + + } + + function extractObjectData( object, doc ) { + + const _geometry = object.geometry(); + const _attributes = object.attributes(); + let objectType = _geometry.objectType; + let geometry, attributes, position, data, mesh; + + // skip instance definition objects + //if( _attributes.isInstanceDefinitionObject ) { continue; } + + // TODO: handle other geometry types + switch ( objectType ) { + + case rhino.ObjectType.Curve: + + const pts = curveToPoints( _geometry, 100 ); + + position = {}; + attributes = {}; + data = {}; + + position.itemSize = 3; + position.type = 'Float32Array'; + position.array = []; + + for ( let j = 0; j < pts.length; j ++ ) { + + position.array.push( pts[ j ][ 0 ] ); + position.array.push( pts[ j ][ 1 ] ); + position.array.push( pts[ j ][ 2 ] ); + + } + + attributes.position = position; + data.attributes = attributes; + + geometry = { data }; + + break; + + case rhino.ObjectType.Point: + + const pt = _geometry.location; + + position = {}; + const color = {}; + attributes = {}; + data = {}; + + position.itemSize = 3; + position.type = 'Float32Array'; + position.array = [ pt[ 0 ], pt[ 1 ], pt[ 2 ] ]; + + const _color = _attributes.drawColor( doc ); + + color.itemSize = 3; + color.type = 'Float32Array'; + color.array = [ _color.r / 255.0, _color.g / 255.0, _color.b / 255.0 ]; + + attributes.position = position; + attributes.color = color; + data.attributes = attributes; + + geometry = { data }; + + break; + + case rhino.ObjectType.PointSet: + case rhino.ObjectType.Mesh: + + geometry = _geometry.toThreejsJSON(); + + break; + + case rhino.ObjectType.Brep: + + const faces = _geometry.faces(); + mesh = new rhino.Mesh(); + + for ( let faceIndex = 0; faceIndex < faces.count; faceIndex ++ ) { + + const face = faces.get( faceIndex ); + const _mesh = face.getMesh( rhino.MeshType.Any ); + + if ( _mesh ) { + + mesh.append( _mesh ); + _mesh.delete(); + + } + + face.delete(); + + } + + if ( mesh.faces().count > 0 ) { + + mesh.compact(); + geometry = mesh.toThreejsJSON(); + faces.delete(); + + } + + mesh.delete(); + + break; + + case rhino.ObjectType.Extrusion: + + mesh = _geometry.getMesh( rhino.MeshType.Any ); + + if ( mesh ) { + + geometry = mesh.toThreejsJSON(); + mesh.delete(); + + } + + break; + + case rhino.ObjectType.TextDot: + + geometry = extractProperties( _geometry ); + + break; + + case rhino.ObjectType.Light: + + geometry = extractProperties( _geometry ); + + if ( geometry.lightStyle.name === 'LightStyle_WorldLinear' ) { + + self.postMessage( { type: 'warning', id: taskID, data: { + message: `THREE.3DMLoader: No conversion exists for ${objectType.constructor.name} ${geometry.lightStyle.name}`, + type: 'no conversion', + guid: _attributes.id + } + + } ); + + } + + break; + + case rhino.ObjectType.InstanceReference: + + geometry = extractProperties( _geometry ); + geometry.xform = extractProperties( _geometry.xform ); + geometry.xform.array = _geometry.xform.toFloatArray( true ); + + break; + + case rhino.ObjectType.SubD: + + // TODO: precalculate resulting vertices and faces and warn on excessive results + _geometry.subdivide( 3 ); + mesh = rhino.Mesh.createFromSubDControlNet( _geometry, false ); + if ( mesh ) { + + geometry = mesh.toThreejsJSON(); + mesh.delete(); + + } + + break; + + /* + case rhino.ObjectType.Annotation: + case rhino.ObjectType.Hatch: + case rhino.ObjectType.ClipPlane: + */ + + default: + + self.postMessage( { type: 'warning', id: taskID, data: { + message: `THREE.3DMLoader: Conversion not implemented for ${objectType.constructor.name}`, + type: 'not implemented', + guid: _attributes.id + } + + } ); + + break; + + } + + if ( geometry ) { + + attributes = extractProperties( _attributes ); + attributes.geometry = extractProperties( _geometry ); + + if ( _attributes.groupCount > 0 ) { + + attributes.groupIds = _attributes.getGroupList(); + + } + + if ( _attributes.userStringCount > 0 ) { + + attributes.userStrings = _attributes.getUserStrings(); + + } + + if ( _geometry.userStringCount > 0 ) { + + attributes.geometry.userStrings = _geometry.getUserStrings(); + + } + + if ( _attributes.decals().count > 0 ) { + + self.postMessage( { type: 'warning', id: taskID, data: { + message: 'THREE.3DMLoader: No conversion exists for the decals associated with this object.', + type: 'no conversion', + guid: _attributes.id + } + + } ); + + } + + attributes.drawColor = _attributes.drawColor( doc ); + + objectType = objectType.constructor.name; + objectType = objectType.substring( 11, objectType.length ); + + return { geometry, attributes, objectType }; + + } else { + + self.postMessage( { type: 'warning', id: taskID, data: { + message: `THREE.3DMLoader: ${objectType.constructor.name} has no associated mesh geometry.`, + type: 'missing mesh', + guid: _attributes.id + } + + } ); + + } + + } + + function extractProperties( object ) { + + const result = {}; + + for ( const property in object ) { + + const value = object[ property ]; + + if ( typeof value !== 'function' ) { + + if ( typeof value === 'object' && value !== null && value.hasOwnProperty( 'constructor' ) ) { + + result[ property ] = { name: value.constructor.name, value: value.value }; + + } else if ( typeof value === 'object' && value !== null ) { + + result[ property ] = extractProperties( value ); + + } else { + + result[ property ] = value; + + } + + } else { + + // these are functions that could be called to extract more data. + //console.log( `${property}: ${object[ property ].constructor.name}` ); + + } + + } + + return result; + + } + + function curveToPoints( curve, pointLimit ) { + + let pointCount = pointLimit; + let rc = []; + const ts = []; + + if ( curve instanceof rhino.LineCurve ) { + + return [ curve.pointAtStart, curve.pointAtEnd ]; + + } + + if ( curve instanceof rhino.PolylineCurve ) { + + pointCount = curve.pointCount; + for ( let i = 0; i < pointCount; i ++ ) { + + rc.push( curve.point( i ) ); + + } + + return rc; + + } + + if ( curve instanceof rhino.PolyCurve ) { + + const segmentCount = curve.segmentCount; + + for ( let i = 0; i < segmentCount; i ++ ) { + + const segment = curve.segmentCurve( i ); + const segmentArray = curveToPoints( segment, pointCount ); + rc = rc.concat( segmentArray ); + segment.delete(); + + } + + return rc; + + } + + if ( curve instanceof rhino.ArcCurve ) { + + pointCount = Math.floor( curve.angleDegrees / 5 ); + pointCount = pointCount < 2 ? 2 : pointCount; + // alternative to this hardcoded version: https://stackoverflow.com/a/18499923/2179399 + + } + + if ( curve instanceof rhino.NurbsCurve && curve.degree === 1 ) { + + const pLine = curve.tryGetPolyline(); + + for ( let i = 0; i < pLine.count; i ++ ) { + + rc.push( pLine.get( i ) ); + + } + + pLine.delete(); + + return rc; + + } + + const domain = curve.domain; + const divisions = pointCount - 1.0; + + for ( let j = 0; j < pointCount; j ++ ) { + + const t = domain[ 0 ] + ( j / divisions ) * ( domain[ 1 ] - domain[ 0 ] ); + + if ( t === domain[ 0 ] || t === domain[ 1 ] ) { + + ts.push( t ); + continue; + + } + + const tan = curve.tangentAt( t ); + const prevTan = curve.tangentAt( ts.slice( - 1 )[ 0 ] ); + + // Duplicated from THREE.Vector3 + // How to pass imports to worker? + + const tS = tan[ 0 ] * tan[ 0 ] + tan[ 1 ] * tan[ 1 ] + tan[ 2 ] * tan[ 2 ]; + const ptS = prevTan[ 0 ] * prevTan[ 0 ] + prevTan[ 1 ] * prevTan[ 1 ] + prevTan[ 2 ] * prevTan[ 2 ]; + + const denominator = Math.sqrt( tS * ptS ); + + let angle; + + if ( denominator === 0 ) { + + angle = Math.PI / 2; + + } else { + + const theta = ( tan.x * prevTan.x + tan.y * prevTan.y + tan.z * prevTan.z ) / denominator; + angle = Math.acos( Math.max( - 1, Math.min( 1, theta ) ) ); + + } + + if ( angle < 0.1 ) continue; + + ts.push( t ); + + } + + rc = ts.map( t => curve.pointAt( t ) ); + return rc; + + } + +} + +export { Rhino3dmLoader }; diff --git a/node_modules/three/examples/jsm/loaders/3MFLoader.js b/node_modules/three/examples/jsm/loaders/3MFLoader.js new file mode 100644 index 0000000..f6833a2 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/3MFLoader.js @@ -0,0 +1,1480 @@ +import { + BufferAttribute, + BufferGeometry, + ClampToEdgeWrapping, + Color, + FileLoader, + Float32BufferAttribute, + Group, + LinearFilter, + LinearMipmapLinearFilter, + Loader, + Matrix4, + Mesh, + MeshPhongMaterial, + MeshStandardMaterial, + MirroredRepeatWrapping, + NearestFilter, + RepeatWrapping, + TextureLoader, + SRGBColorSpace +} from 'three'; +import * as fflate from '../libs/fflate.module.js'; + +const COLOR_SPACE_3MF = SRGBColorSpace; + +/** + * + * 3D Manufacturing Format (3MF) specification: https://3mf.io/specification/ + * + * The following features from the core specification are supported: + * + * - 3D Models + * - Object Resources (Meshes and Components) + * - Material Resources (Base Materials) + * + * 3MF Materials and Properties Extension are only partially supported. + * + * - Texture 2D + * - Texture 2D Groups + * - Color Groups (Vertex Colors) + * - Metallic Display Properties (PBR) + */ + +class ThreeMFLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.availableExtensions = []; + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( buffer ) { + + try { + + onLoad( scope.parse( buffer ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( data ) { + + const scope = this; + const textureLoader = new TextureLoader( this.manager ); + + function loadDocument( data ) { + + let zip = null; + let file = null; + + let relsName; + let modelRelsName; + const modelPartNames = []; + const texturesPartNames = []; + + let modelRels; + const modelParts = {}; + const printTicketParts = {}; + const texturesParts = {}; + + const textDecoder = new TextDecoder(); + + try { + + zip = fflate.unzipSync( new Uint8Array( data ) ); + + } catch ( e ) { + + if ( e instanceof ReferenceError ) { + + console.error( 'THREE.3MFLoader: fflate missing and file is compressed.' ); + return null; + + } + + } + + for ( file in zip ) { + + if ( file.match( /\_rels\/.rels$/ ) ) { + + relsName = file; + + } else if ( file.match( /3D\/_rels\/.*\.model\.rels$/ ) ) { + + modelRelsName = file; + + } else if ( file.match( /^3D\/.*\.model$/ ) ) { + + modelPartNames.push( file ); + + } else if ( file.match( /^3D\/Textures?\/.*/ ) ) { + + texturesPartNames.push( file ); + + } + + } + + if ( relsName === undefined ) throw new Error( 'THREE.ThreeMFLoader: Cannot find relationship file `rels` in 3MF archive.' ); + + // + + const relsView = zip[ relsName ]; + const relsFileText = textDecoder.decode( relsView ); + const rels = parseRelsXml( relsFileText ); + + // + + if ( modelRelsName ) { + + const relsView = zip[ modelRelsName ]; + const relsFileText = textDecoder.decode( relsView ); + modelRels = parseRelsXml( relsFileText ); + + } + + // + + for ( let i = 0; i < modelPartNames.length; i ++ ) { + + const modelPart = modelPartNames[ i ]; + const view = zip[ modelPart ]; + + const fileText = textDecoder.decode( view ); + const xmlData = new DOMParser().parseFromString( fileText, 'application/xml' ); + + if ( xmlData.documentElement.nodeName.toLowerCase() !== 'model' ) { + + console.error( 'THREE.3MFLoader: Error loading 3MF - no 3MF document found: ', modelPart ); + + } + + const modelNode = xmlData.querySelector( 'model' ); + const extensions = {}; + + for ( let i = 0; i < modelNode.attributes.length; i ++ ) { + + const attr = modelNode.attributes[ i ]; + if ( attr.name.match( /^xmlns:(.+)$/ ) ) { + + extensions[ attr.value ] = RegExp.$1; + + } + + } + + const modelData = parseModelNode( modelNode ); + modelData[ 'xml' ] = modelNode; + + if ( 0 < Object.keys( extensions ).length ) { + + modelData[ 'extensions' ] = extensions; + + } + + modelParts[ modelPart ] = modelData; + + } + + // + + for ( let i = 0; i < texturesPartNames.length; i ++ ) { + + const texturesPartName = texturesPartNames[ i ]; + texturesParts[ texturesPartName ] = zip[ texturesPartName ].buffer; + + } + + return { + rels: rels, + modelRels: modelRels, + model: modelParts, + printTicket: printTicketParts, + texture: texturesParts + }; + + } + + function parseRelsXml( relsFileText ) { + + const relationships = []; + + const relsXmlData = new DOMParser().parseFromString( relsFileText, 'application/xml' ); + + const relsNodes = relsXmlData.querySelectorAll( 'Relationship' ); + + for ( let i = 0; i < relsNodes.length; i ++ ) { + + const relsNode = relsNodes[ i ]; + + const relationship = { + target: relsNode.getAttribute( 'Target' ), //required + id: relsNode.getAttribute( 'Id' ), //required + type: relsNode.getAttribute( 'Type' ) //required + }; + + relationships.push( relationship ); + + } + + return relationships; + + } + + function parseMetadataNodes( metadataNodes ) { + + const metadataData = {}; + + for ( let i = 0; i < metadataNodes.length; i ++ ) { + + const metadataNode = metadataNodes[ i ]; + const name = metadataNode.getAttribute( 'name' ); + const validNames = [ + 'Title', + 'Designer', + 'Description', + 'Copyright', + 'LicenseTerms', + 'Rating', + 'CreationDate', + 'ModificationDate' + ]; + + if ( 0 <= validNames.indexOf( name ) ) { + + metadataData[ name ] = metadataNode.textContent; + + } + + } + + return metadataData; + + } + + function parseBasematerialsNode( basematerialsNode ) { + + const basematerialsData = { + id: basematerialsNode.getAttribute( 'id' ), // required + basematerials: [] + }; + + const basematerialNodes = basematerialsNode.querySelectorAll( 'base' ); + + for ( let i = 0; i < basematerialNodes.length; i ++ ) { + + const basematerialNode = basematerialNodes[ i ]; + const basematerialData = parseBasematerialNode( basematerialNode ); + basematerialData.index = i; // the order and count of the material nodes form an implicit 0-based index + basematerialsData.basematerials.push( basematerialData ); + + } + + return basematerialsData; + + } + + function parseTexture2DNode( texture2DNode ) { + + const texture2dData = { + id: texture2DNode.getAttribute( 'id' ), // required + path: texture2DNode.getAttribute( 'path' ), // required + contenttype: texture2DNode.getAttribute( 'contenttype' ), // required + tilestyleu: texture2DNode.getAttribute( 'tilestyleu' ), + tilestylev: texture2DNode.getAttribute( 'tilestylev' ), + filter: texture2DNode.getAttribute( 'filter' ), + }; + + return texture2dData; + + } + + function parseTextures2DGroupNode( texture2DGroupNode ) { + + const texture2DGroupData = { + id: texture2DGroupNode.getAttribute( 'id' ), // required + texid: texture2DGroupNode.getAttribute( 'texid' ), // required + displaypropertiesid: texture2DGroupNode.getAttribute( 'displaypropertiesid' ) + }; + + const tex2coordNodes = texture2DGroupNode.querySelectorAll( 'tex2coord' ); + + const uvs = []; + + for ( let i = 0; i < tex2coordNodes.length; i ++ ) { + + const tex2coordNode = tex2coordNodes[ i ]; + const u = tex2coordNode.getAttribute( 'u' ); + const v = tex2coordNode.getAttribute( 'v' ); + + uvs.push( parseFloat( u ), parseFloat( v ) ); + + } + + texture2DGroupData[ 'uvs' ] = new Float32Array( uvs ); + + return texture2DGroupData; + + } + + function parseColorGroupNode( colorGroupNode ) { + + const colorGroupData = { + id: colorGroupNode.getAttribute( 'id' ), // required + displaypropertiesid: colorGroupNode.getAttribute( 'displaypropertiesid' ) + }; + + const colorNodes = colorGroupNode.querySelectorAll( 'color' ); + + const colors = []; + const colorObject = new Color(); + + for ( let i = 0; i < colorNodes.length; i ++ ) { + + const colorNode = colorNodes[ i ]; + const color = colorNode.getAttribute( 'color' ); + + colorObject.setStyle( color.substring( 0, 7 ), COLOR_SPACE_3MF ); + + colors.push( colorObject.r, colorObject.g, colorObject.b ); + + } + + colorGroupData[ 'colors' ] = new Float32Array( colors ); + + return colorGroupData; + + } + + function parseMetallicDisplaypropertiesNode( metallicDisplaypropetiesNode ) { + + const metallicDisplaypropertiesData = { + id: metallicDisplaypropetiesNode.getAttribute( 'id' ) // required + }; + + const metallicNodes = metallicDisplaypropetiesNode.querySelectorAll( 'pbmetallic' ); + + const metallicData = []; + + for ( let i = 0; i < metallicNodes.length; i ++ ) { + + const metallicNode = metallicNodes[ i ]; + + metallicData.push( { + name: metallicNode.getAttribute( 'name' ), // required + metallicness: parseFloat( metallicNode.getAttribute( 'metallicness' ) ), // required + roughness: parseFloat( metallicNode.getAttribute( 'roughness' ) ) // required + } ); + + } + + metallicDisplaypropertiesData.data = metallicData; + + return metallicDisplaypropertiesData; + + } + + function parseBasematerialNode( basematerialNode ) { + + const basematerialData = {}; + + basematerialData[ 'name' ] = basematerialNode.getAttribute( 'name' ); // required + basematerialData[ 'displaycolor' ] = basematerialNode.getAttribute( 'displaycolor' ); // required + basematerialData[ 'displaypropertiesid' ] = basematerialNode.getAttribute( 'displaypropertiesid' ); + + return basematerialData; + + } + + function parseMeshNode( meshNode ) { + + const meshData = {}; + + const vertices = []; + const vertexNodes = meshNode.querySelectorAll( 'vertices vertex' ); + + for ( let i = 0; i < vertexNodes.length; i ++ ) { + + const vertexNode = vertexNodes[ i ]; + const x = vertexNode.getAttribute( 'x' ); + const y = vertexNode.getAttribute( 'y' ); + const z = vertexNode.getAttribute( 'z' ); + + vertices.push( parseFloat( x ), parseFloat( y ), parseFloat( z ) ); + + } + + meshData[ 'vertices' ] = new Float32Array( vertices ); + + const triangleProperties = []; + const triangles = []; + const triangleNodes = meshNode.querySelectorAll( 'triangles triangle' ); + + for ( let i = 0; i < triangleNodes.length; i ++ ) { + + const triangleNode = triangleNodes[ i ]; + const v1 = triangleNode.getAttribute( 'v1' ); + const v2 = triangleNode.getAttribute( 'v2' ); + const v3 = triangleNode.getAttribute( 'v3' ); + const p1 = triangleNode.getAttribute( 'p1' ); + const p2 = triangleNode.getAttribute( 'p2' ); + const p3 = triangleNode.getAttribute( 'p3' ); + const pid = triangleNode.getAttribute( 'pid' ); + + const triangleProperty = {}; + + triangleProperty[ 'v1' ] = parseInt( v1, 10 ); + triangleProperty[ 'v2' ] = parseInt( v2, 10 ); + triangleProperty[ 'v3' ] = parseInt( v3, 10 ); + + triangles.push( triangleProperty[ 'v1' ], triangleProperty[ 'v2' ], triangleProperty[ 'v3' ] ); + + // optional + + if ( p1 ) { + + triangleProperty[ 'p1' ] = parseInt( p1, 10 ); + + } + + if ( p2 ) { + + triangleProperty[ 'p2' ] = parseInt( p2, 10 ); + + } + + if ( p3 ) { + + triangleProperty[ 'p3' ] = parseInt( p3, 10 ); + + } + + if ( pid ) { + + triangleProperty[ 'pid' ] = pid; + + } + + if ( 0 < Object.keys( triangleProperty ).length ) { + + triangleProperties.push( triangleProperty ); + + } + + } + + meshData[ 'triangleProperties' ] = triangleProperties; + meshData[ 'triangles' ] = new Uint32Array( triangles ); + + return meshData; + + } + + function parseComponentsNode( componentsNode ) { + + const components = []; + + const componentNodes = componentsNode.querySelectorAll( 'component' ); + + for ( let i = 0; i < componentNodes.length; i ++ ) { + + const componentNode = componentNodes[ i ]; + const componentData = parseComponentNode( componentNode ); + components.push( componentData ); + + } + + return components; + + } + + function parseComponentNode( componentNode ) { + + const componentData = {}; + + componentData[ 'objectId' ] = componentNode.getAttribute( 'objectid' ); // required + + const transform = componentNode.getAttribute( 'transform' ); + + if ( transform ) { + + componentData[ 'transform' ] = parseTransform( transform ); + + } + + return componentData; + + } + + function parseTransform( transform ) { + + const t = []; + transform.split( ' ' ).forEach( function ( s ) { + + t.push( parseFloat( s ) ); + + } ); + + const matrix = new Matrix4(); + matrix.set( + t[ 0 ], t[ 3 ], t[ 6 ], t[ 9 ], + t[ 1 ], t[ 4 ], t[ 7 ], t[ 10 ], + t[ 2 ], t[ 5 ], t[ 8 ], t[ 11 ], + 0.0, 0.0, 0.0, 1.0 + ); + + return matrix; + + } + + function parseObjectNode( objectNode ) { + + const objectData = { + type: objectNode.getAttribute( 'type' ) + }; + + const id = objectNode.getAttribute( 'id' ); + + if ( id ) { + + objectData[ 'id' ] = id; + + } + + const pid = objectNode.getAttribute( 'pid' ); + + if ( pid ) { + + objectData[ 'pid' ] = pid; + + } + + const pindex = objectNode.getAttribute( 'pindex' ); + + if ( pindex ) { + + objectData[ 'pindex' ] = pindex; + + } + + const thumbnail = objectNode.getAttribute( 'thumbnail' ); + + if ( thumbnail ) { + + objectData[ 'thumbnail' ] = thumbnail; + + } + + const partnumber = objectNode.getAttribute( 'partnumber' ); + + if ( partnumber ) { + + objectData[ 'partnumber' ] = partnumber; + + } + + const name = objectNode.getAttribute( 'name' ); + + if ( name ) { + + objectData[ 'name' ] = name; + + } + + const meshNode = objectNode.querySelector( 'mesh' ); + + if ( meshNode ) { + + objectData[ 'mesh' ] = parseMeshNode( meshNode ); + + } + + const componentsNode = objectNode.querySelector( 'components' ); + + if ( componentsNode ) { + + objectData[ 'components' ] = parseComponentsNode( componentsNode ); + + } + + return objectData; + + } + + function parseResourcesNode( resourcesNode ) { + + const resourcesData = {}; + + resourcesData[ 'basematerials' ] = {}; + const basematerialsNodes = resourcesNode.querySelectorAll( 'basematerials' ); + + for ( let i = 0; i < basematerialsNodes.length; i ++ ) { + + const basematerialsNode = basematerialsNodes[ i ]; + const basematerialsData = parseBasematerialsNode( basematerialsNode ); + resourcesData[ 'basematerials' ][ basematerialsData[ 'id' ] ] = basematerialsData; + + } + + // + + resourcesData[ 'texture2d' ] = {}; + const textures2DNodes = resourcesNode.querySelectorAll( 'texture2d' ); + + for ( let i = 0; i < textures2DNodes.length; i ++ ) { + + const textures2DNode = textures2DNodes[ i ]; + const texture2DData = parseTexture2DNode( textures2DNode ); + resourcesData[ 'texture2d' ][ texture2DData[ 'id' ] ] = texture2DData; + + } + + // + + resourcesData[ 'colorgroup' ] = {}; + const colorGroupNodes = resourcesNode.querySelectorAll( 'colorgroup' ); + + for ( let i = 0; i < colorGroupNodes.length; i ++ ) { + + const colorGroupNode = colorGroupNodes[ i ]; + const colorGroupData = parseColorGroupNode( colorGroupNode ); + resourcesData[ 'colorgroup' ][ colorGroupData[ 'id' ] ] = colorGroupData; + + } + + // + + resourcesData[ 'pbmetallicdisplayproperties' ] = {}; + const pbmetallicdisplaypropertiesNodes = resourcesNode.querySelectorAll( 'pbmetallicdisplayproperties' ); + + for ( let i = 0; i < pbmetallicdisplaypropertiesNodes.length; i ++ ) { + + const pbmetallicdisplaypropertiesNode = pbmetallicdisplaypropertiesNodes[ i ]; + const pbmetallicdisplaypropertiesData = parseMetallicDisplaypropertiesNode( pbmetallicdisplaypropertiesNode ); + resourcesData[ 'pbmetallicdisplayproperties' ][ pbmetallicdisplaypropertiesData[ 'id' ] ] = pbmetallicdisplaypropertiesData; + + } + + // + + resourcesData[ 'texture2dgroup' ] = {}; + const textures2DGroupNodes = resourcesNode.querySelectorAll( 'texture2dgroup' ); + + for ( let i = 0; i < textures2DGroupNodes.length; i ++ ) { + + const textures2DGroupNode = textures2DGroupNodes[ i ]; + const textures2DGroupData = parseTextures2DGroupNode( textures2DGroupNode ); + resourcesData[ 'texture2dgroup' ][ textures2DGroupData[ 'id' ] ] = textures2DGroupData; + + } + + // + + resourcesData[ 'object' ] = {}; + const objectNodes = resourcesNode.querySelectorAll( 'object' ); + + for ( let i = 0; i < objectNodes.length; i ++ ) { + + const objectNode = objectNodes[ i ]; + const objectData = parseObjectNode( objectNode ); + resourcesData[ 'object' ][ objectData[ 'id' ] ] = objectData; + + } + + return resourcesData; + + } + + function parseBuildNode( buildNode ) { + + const buildData = []; + const itemNodes = buildNode.querySelectorAll( 'item' ); + + for ( let i = 0; i < itemNodes.length; i ++ ) { + + const itemNode = itemNodes[ i ]; + const buildItem = { + objectId: itemNode.getAttribute( 'objectid' ) + }; + const transform = itemNode.getAttribute( 'transform' ); + + if ( transform ) { + + buildItem[ 'transform' ] = parseTransform( transform ); + + } + + buildData.push( buildItem ); + + } + + return buildData; + + } + + function parseModelNode( modelNode ) { + + const modelData = { unit: modelNode.getAttribute( 'unit' ) || 'millimeter' }; + const metadataNodes = modelNode.querySelectorAll( 'metadata' ); + + if ( metadataNodes ) { + + modelData[ 'metadata' ] = parseMetadataNodes( metadataNodes ); + + } + + const resourcesNode = modelNode.querySelector( 'resources' ); + + if ( resourcesNode ) { + + modelData[ 'resources' ] = parseResourcesNode( resourcesNode ); + + } + + const buildNode = modelNode.querySelector( 'build' ); + + if ( buildNode ) { + + modelData[ 'build' ] = parseBuildNode( buildNode ); + + } + + return modelData; + + } + + function buildTexture( texture2dgroup, objects, modelData, textureData ) { + + const texid = texture2dgroup.texid; + const texture2ds = modelData.resources.texture2d; + const texture2d = texture2ds[ texid ]; + + if ( texture2d ) { + + const data = textureData[ texture2d.path ]; + const type = texture2d.contenttype; + + const blob = new Blob( [ data ], { type: type } ); + const sourceURI = URL.createObjectURL( blob ); + + const texture = textureLoader.load( sourceURI, function () { + + URL.revokeObjectURL( sourceURI ); + + } ); + + texture.colorSpace = COLOR_SPACE_3MF; + + // texture parameters + + switch ( texture2d.tilestyleu ) { + + case 'wrap': + texture.wrapS = RepeatWrapping; + break; + + case 'mirror': + texture.wrapS = MirroredRepeatWrapping; + break; + + case 'none': + case 'clamp': + texture.wrapS = ClampToEdgeWrapping; + break; + + default: + texture.wrapS = RepeatWrapping; + + } + + switch ( texture2d.tilestylev ) { + + case 'wrap': + texture.wrapT = RepeatWrapping; + break; + + case 'mirror': + texture.wrapT = MirroredRepeatWrapping; + break; + + case 'none': + case 'clamp': + texture.wrapT = ClampToEdgeWrapping; + break; + + default: + texture.wrapT = RepeatWrapping; + + } + + switch ( texture2d.filter ) { + + case 'auto': + texture.magFilter = LinearFilter; + texture.minFilter = LinearMipmapLinearFilter; + break; + + case 'linear': + texture.magFilter = LinearFilter; + texture.minFilter = LinearFilter; + break; + + case 'nearest': + texture.magFilter = NearestFilter; + texture.minFilter = NearestFilter; + break; + + default: + texture.magFilter = LinearFilter; + texture.minFilter = LinearMipmapLinearFilter; + + } + + return texture; + + } else { + + return null; + + } + + } + + function buildBasematerialsMeshes( basematerials, triangleProperties, meshData, objects, modelData, textureData, objectData ) { + + const objectPindex = objectData.pindex; + + const materialMap = {}; + + for ( let i = 0, l = triangleProperties.length; i < l; i ++ ) { + + const triangleProperty = triangleProperties[ i ]; + const pindex = ( triangleProperty.p1 !== undefined ) ? triangleProperty.p1 : objectPindex; + + if ( materialMap[ pindex ] === undefined ) materialMap[ pindex ] = []; + + materialMap[ pindex ].push( triangleProperty ); + + } + + // + + const keys = Object.keys( materialMap ); + const meshes = []; + + for ( let i = 0, l = keys.length; i < l; i ++ ) { + + const materialIndex = keys[ i ]; + const trianglePropertiesProps = materialMap[ materialIndex ]; + const basematerialData = basematerials.basematerials[ materialIndex ]; + const material = getBuild( basematerialData, objects, modelData, textureData, objectData, buildBasematerial ); + + // + + const geometry = new BufferGeometry(); + + const positionData = []; + + const vertices = meshData.vertices; + + for ( let j = 0, jl = trianglePropertiesProps.length; j < jl; j ++ ) { + + const triangleProperty = trianglePropertiesProps[ j ]; + + positionData.push( vertices[ ( triangleProperty.v1 * 3 ) + 0 ] ); + positionData.push( vertices[ ( triangleProperty.v1 * 3 ) + 1 ] ); + positionData.push( vertices[ ( triangleProperty.v1 * 3 ) + 2 ] ); + + positionData.push( vertices[ ( triangleProperty.v2 * 3 ) + 0 ] ); + positionData.push( vertices[ ( triangleProperty.v2 * 3 ) + 1 ] ); + positionData.push( vertices[ ( triangleProperty.v2 * 3 ) + 2 ] ); + + positionData.push( vertices[ ( triangleProperty.v3 * 3 ) + 0 ] ); + positionData.push( vertices[ ( triangleProperty.v3 * 3 ) + 1 ] ); + positionData.push( vertices[ ( triangleProperty.v3 * 3 ) + 2 ] ); + + + } + + geometry.setAttribute( 'position', new Float32BufferAttribute( positionData, 3 ) ); + + // + + const mesh = new Mesh( geometry, material ); + meshes.push( mesh ); + + } + + return meshes; + + } + + function buildTexturedMesh( texture2dgroup, triangleProperties, meshData, objects, modelData, textureData, objectData ) { + + // geometry + + const geometry = new BufferGeometry(); + + const positionData = []; + const uvData = []; + + const vertices = meshData.vertices; + const uvs = texture2dgroup.uvs; + + for ( let i = 0, l = triangleProperties.length; i < l; i ++ ) { + + const triangleProperty = triangleProperties[ i ]; + + positionData.push( vertices[ ( triangleProperty.v1 * 3 ) + 0 ] ); + positionData.push( vertices[ ( triangleProperty.v1 * 3 ) + 1 ] ); + positionData.push( vertices[ ( triangleProperty.v1 * 3 ) + 2 ] ); + + positionData.push( vertices[ ( triangleProperty.v2 * 3 ) + 0 ] ); + positionData.push( vertices[ ( triangleProperty.v2 * 3 ) + 1 ] ); + positionData.push( vertices[ ( triangleProperty.v2 * 3 ) + 2 ] ); + + positionData.push( vertices[ ( triangleProperty.v3 * 3 ) + 0 ] ); + positionData.push( vertices[ ( triangleProperty.v3 * 3 ) + 1 ] ); + positionData.push( vertices[ ( triangleProperty.v3 * 3 ) + 2 ] ); + + // + + uvData.push( uvs[ ( triangleProperty.p1 * 2 ) + 0 ] ); + uvData.push( uvs[ ( triangleProperty.p1 * 2 ) + 1 ] ); + + uvData.push( uvs[ ( triangleProperty.p2 * 2 ) + 0 ] ); + uvData.push( uvs[ ( triangleProperty.p2 * 2 ) + 1 ] ); + + uvData.push( uvs[ ( triangleProperty.p3 * 2 ) + 0 ] ); + uvData.push( uvs[ ( triangleProperty.p3 * 2 ) + 1 ] ); + + } + + geometry.setAttribute( 'position', new Float32BufferAttribute( positionData, 3 ) ); + geometry.setAttribute( 'uv', new Float32BufferAttribute( uvData, 2 ) ); + + // material + + const texture = getBuild( texture2dgroup, objects, modelData, textureData, objectData, buildTexture ); + + const material = new MeshPhongMaterial( { map: texture, flatShading: true } ); + + // mesh + + const mesh = new Mesh( geometry, material ); + + return mesh; + + } + + function buildVertexColorMesh( colorgroup, triangleProperties, meshData, objectData ) { + + // geometry + + const geometry = new BufferGeometry(); + + const positionData = []; + const colorData = []; + + const vertices = meshData.vertices; + const colors = colorgroup.colors; + + for ( let i = 0, l = triangleProperties.length; i < l; i ++ ) { + + const triangleProperty = triangleProperties[ i ]; + + const v1 = triangleProperty.v1; + const v2 = triangleProperty.v2; + const v3 = triangleProperty.v3; + + positionData.push( vertices[ ( v1 * 3 ) + 0 ] ); + positionData.push( vertices[ ( v1 * 3 ) + 1 ] ); + positionData.push( vertices[ ( v1 * 3 ) + 2 ] ); + + positionData.push( vertices[ ( v2 * 3 ) + 0 ] ); + positionData.push( vertices[ ( v2 * 3 ) + 1 ] ); + positionData.push( vertices[ ( v2 * 3 ) + 2 ] ); + + positionData.push( vertices[ ( v3 * 3 ) + 0 ] ); + positionData.push( vertices[ ( v3 * 3 ) + 1 ] ); + positionData.push( vertices[ ( v3 * 3 ) + 2 ] ); + + // + + const p1 = ( triangleProperty.p1 !== undefined ) ? triangleProperty.p1 : objectData.pindex; + const p2 = ( triangleProperty.p2 !== undefined ) ? triangleProperty.p2 : p1; + const p3 = ( triangleProperty.p3 !== undefined ) ? triangleProperty.p3 : p1; + + colorData.push( colors[ ( p1 * 3 ) + 0 ] ); + colorData.push( colors[ ( p1 * 3 ) + 1 ] ); + colorData.push( colors[ ( p1 * 3 ) + 2 ] ); + + colorData.push( colors[ ( p2 * 3 ) + 0 ] ); + colorData.push( colors[ ( p2 * 3 ) + 1 ] ); + colorData.push( colors[ ( p2 * 3 ) + 2 ] ); + + colorData.push( colors[ ( p3 * 3 ) + 0 ] ); + colorData.push( colors[ ( p3 * 3 ) + 1 ] ); + colorData.push( colors[ ( p3 * 3 ) + 2 ] ); + + } + + geometry.setAttribute( 'position', new Float32BufferAttribute( positionData, 3 ) ); + geometry.setAttribute( 'color', new Float32BufferAttribute( colorData, 3 ) ); + + // material + + const material = new MeshPhongMaterial( { vertexColors: true, flatShading: true } ); + + // mesh + + const mesh = new Mesh( geometry, material ); + + return mesh; + + } + + function buildDefaultMesh( meshData ) { + + const geometry = new BufferGeometry(); + geometry.setIndex( new BufferAttribute( meshData[ 'triangles' ], 1 ) ); + geometry.setAttribute( 'position', new BufferAttribute( meshData[ 'vertices' ], 3 ) ); + + const material = new MeshPhongMaterial( { + name: Loader.DEFAULT_MATERIAL_NAME, + color: 0xffffff, + flatShading: true + } ); + + const mesh = new Mesh( geometry, material ); + + return mesh; + + } + + function buildMeshes( resourceMap, meshData, objects, modelData, textureData, objectData ) { + + const keys = Object.keys( resourceMap ); + const meshes = []; + + for ( let i = 0, il = keys.length; i < il; i ++ ) { + + const resourceId = keys[ i ]; + const triangleProperties = resourceMap[ resourceId ]; + const resourceType = getResourceType( resourceId, modelData ); + + switch ( resourceType ) { + + case 'material': + const basematerials = modelData.resources.basematerials[ resourceId ]; + const newMeshes = buildBasematerialsMeshes( basematerials, triangleProperties, meshData, objects, modelData, textureData, objectData ); + + for ( let j = 0, jl = newMeshes.length; j < jl; j ++ ) { + + meshes.push( newMeshes[ j ] ); + + } + + break; + + case 'texture': + const texture2dgroup = modelData.resources.texture2dgroup[ resourceId ]; + meshes.push( buildTexturedMesh( texture2dgroup, triangleProperties, meshData, objects, modelData, textureData, objectData ) ); + break; + + case 'vertexColors': + const colorgroup = modelData.resources.colorgroup[ resourceId ]; + meshes.push( buildVertexColorMesh( colorgroup, triangleProperties, meshData, objectData ) ); + break; + + case 'default': + meshes.push( buildDefaultMesh( meshData ) ); + break; + + default: + console.error( 'THREE.3MFLoader: Unsupported resource type.' ); + + } + + } + + if ( objectData.name ) { + + for ( let i = 0; i < meshes.length; i ++ ) { + + meshes[ i ].name = objectData.name; + + } + + } + + return meshes; + + } + + function getResourceType( pid, modelData ) { + + if ( modelData.resources.texture2dgroup[ pid ] !== undefined ) { + + return 'texture'; + + } else if ( modelData.resources.basematerials[ pid ] !== undefined ) { + + return 'material'; + + } else if ( modelData.resources.colorgroup[ pid ] !== undefined ) { + + return 'vertexColors'; + + } else if ( pid === 'default' ) { + + return 'default'; + + } else { + + return undefined; + + } + + } + + function analyzeObject( meshData, objectData ) { + + const resourceMap = {}; + + const triangleProperties = meshData[ 'triangleProperties' ]; + + const objectPid = objectData.pid; + + for ( let i = 0, l = triangleProperties.length; i < l; i ++ ) { + + const triangleProperty = triangleProperties[ i ]; + let pid = ( triangleProperty.pid !== undefined ) ? triangleProperty.pid : objectPid; + + if ( pid === undefined ) pid = 'default'; + + if ( resourceMap[ pid ] === undefined ) resourceMap[ pid ] = []; + + resourceMap[ pid ].push( triangleProperty ); + + } + + return resourceMap; + + } + + function buildGroup( meshData, objects, modelData, textureData, objectData ) { + + const group = new Group(); + + const resourceMap = analyzeObject( meshData, objectData ); + const meshes = buildMeshes( resourceMap, meshData, objects, modelData, textureData, objectData ); + + for ( let i = 0, l = meshes.length; i < l; i ++ ) { + + group.add( meshes[ i ] ); + + } + + return group; + + } + + function applyExtensions( extensions, meshData, modelXml ) { + + if ( ! extensions ) { + + return; + + } + + const availableExtensions = []; + const keys = Object.keys( extensions ); + + for ( let i = 0; i < keys.length; i ++ ) { + + const ns = keys[ i ]; + + for ( let j = 0; j < scope.availableExtensions.length; j ++ ) { + + const extension = scope.availableExtensions[ j ]; + + if ( extension.ns === ns ) { + + availableExtensions.push( extension ); + + } + + } + + } + + for ( let i = 0; i < availableExtensions.length; i ++ ) { + + const extension = availableExtensions[ i ]; + extension.apply( modelXml, extensions[ extension[ 'ns' ] ], meshData ); + + } + + } + + function getBuild( data, objects, modelData, textureData, objectData, builder ) { + + if ( data.build !== undefined ) return data.build; + + data.build = builder( data, objects, modelData, textureData, objectData ); + + return data.build; + + } + + function buildBasematerial( materialData, objects, modelData ) { + + let material; + + const displaypropertiesid = materialData.displaypropertiesid; + const pbmetallicdisplayproperties = modelData.resources.pbmetallicdisplayproperties; + + if ( displaypropertiesid !== null && pbmetallicdisplayproperties[ displaypropertiesid ] !== undefined ) { + + // metallic display property, use StandardMaterial + + const pbmetallicdisplayproperty = pbmetallicdisplayproperties[ displaypropertiesid ]; + const metallicData = pbmetallicdisplayproperty.data[ materialData.index ]; + + material = new MeshStandardMaterial( { flatShading: true, roughness: metallicData.roughness, metalness: metallicData.metallicness } ); + + } else { + + // otherwise use PhongMaterial + + material = new MeshPhongMaterial( { flatShading: true } ); + + } + + material.name = materialData.name; + + // displaycolor MUST be specified with a value of a 6 or 8 digit hexadecimal number, e.g. "#RRGGBB" or "#RRGGBBAA" + + const displaycolor = materialData.displaycolor; + + const color = displaycolor.substring( 0, 7 ); + material.color.setStyle( color, COLOR_SPACE_3MF ); + + // process alpha if set + + if ( displaycolor.length === 9 ) { + + material.opacity = parseInt( displaycolor.charAt( 7 ) + displaycolor.charAt( 8 ), 16 ) / 255; + + } + + return material; + + } + + function buildComposite( compositeData, objects, modelData, textureData ) { + + const composite = new Group(); + + for ( let j = 0; j < compositeData.length; j ++ ) { + + const component = compositeData[ j ]; + let build = objects[ component.objectId ]; + + if ( build === undefined ) { + + buildObject( component.objectId, objects, modelData, textureData ); + build = objects[ component.objectId ]; + + } + + const object3D = build.clone(); + + // apply component transform + + const transform = component.transform; + + if ( transform ) { + + object3D.applyMatrix4( transform ); + + } + + composite.add( object3D ); + + } + + return composite; + + } + + function buildObject( objectId, objects, modelData, textureData ) { + + const objectData = modelData[ 'resources' ][ 'object' ][ objectId ]; + + if ( objectData[ 'mesh' ] ) { + + const meshData = objectData[ 'mesh' ]; + + const extensions = modelData[ 'extensions' ]; + const modelXml = modelData[ 'xml' ]; + + applyExtensions( extensions, meshData, modelXml ); + + objects[ objectData.id ] = getBuild( meshData, objects, modelData, textureData, objectData, buildGroup ); + + } else { + + const compositeData = objectData[ 'components' ]; + + objects[ objectData.id ] = getBuild( compositeData, objects, modelData, textureData, objectData, buildComposite ); + + } + + if ( objectData.name ) { + + objects[ objectData.id ].name = objectData.name; + + } + + } + + function buildObjects( data3mf ) { + + const modelsData = data3mf.model; + const modelRels = data3mf.modelRels; + const objects = {}; + const modelsKeys = Object.keys( modelsData ); + const textureData = {}; + + // evaluate model relationships to textures + + if ( modelRels ) { + + for ( let i = 0, l = modelRels.length; i < l; i ++ ) { + + const modelRel = modelRels[ i ]; + const textureKey = modelRel.target.substring( 1 ); + + if ( data3mf.texture[ textureKey ] ) { + + textureData[ modelRel.target ] = data3mf.texture[ textureKey ]; + + } + + } + + } + + // start build + + for ( let i = 0; i < modelsKeys.length; i ++ ) { + + const modelsKey = modelsKeys[ i ]; + const modelData = modelsData[ modelsKey ]; + + const objectIds = Object.keys( modelData[ 'resources' ][ 'object' ] ); + + for ( let j = 0; j < objectIds.length; j ++ ) { + + const objectId = objectIds[ j ]; + + buildObject( objectId, objects, modelData, textureData ); + + } + + } + + return objects; + + } + + function fetch3DModelPart( rels ) { + + for ( let i = 0; i < rels.length; i ++ ) { + + const rel = rels[ i ]; + const extension = rel.target.split( '.' ).pop(); + + if ( extension.toLowerCase() === 'model' ) return rel; + + } + + } + + function build( objects, data3mf ) { + + const group = new Group(); + + const relationship = fetch3DModelPart( data3mf[ 'rels' ] ); + const buildData = data3mf.model[ relationship[ 'target' ].substring( 1 ) ][ 'build' ]; + + for ( let i = 0; i < buildData.length; i ++ ) { + + const buildItem = buildData[ i ]; + const object3D = objects[ buildItem[ 'objectId' ] ].clone(); + + // apply transform + + const transform = buildItem[ 'transform' ]; + + if ( transform ) { + + object3D.applyMatrix4( transform ); + + } + + group.add( object3D ); + + } + + return group; + + } + + const data3mf = loadDocument( data ); + const objects = buildObjects( data3mf ); + + return build( objects, data3mf ); + + } + + addExtension( extension ) { + + this.availableExtensions.push( extension ); + + } + +} + +export { ThreeMFLoader }; diff --git a/node_modules/three/examples/jsm/loaders/AMFLoader.js b/node_modules/three/examples/jsm/loaders/AMFLoader.js new file mode 100644 index 0000000..6483f3b --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/AMFLoader.js @@ -0,0 +1,521 @@ +import { + BufferGeometry, + Color, + FileLoader, + Float32BufferAttribute, + Group, + Loader, + Mesh, + MeshPhongMaterial +} from 'three'; +import * as fflate from '../libs/fflate.module.js'; + +/** + * Description: Early release of an AMF Loader following the pattern of the + * example loaders in the three.js project. + * + * Usage: + * const loader = new AMFLoader(); + * loader.load('/path/to/project.amf', function(objecttree) { + * scene.add(objecttree); + * }); + * + * Materials now supported, material colors supported + * Zip support, requires fflate + * No constellation support (yet)! + * + */ + +class AMFLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( text ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( data ) { + + function loadDocument( data ) { + + let view = new DataView( data ); + const magic = String.fromCharCode( view.getUint8( 0 ), view.getUint8( 1 ) ); + + if ( magic === 'PK' ) { + + let zip = null; + let file = null; + + console.log( 'THREE.AMFLoader: Loading Zip' ); + + try { + + zip = fflate.unzipSync( new Uint8Array( data ) ); + + } catch ( e ) { + + if ( e instanceof ReferenceError ) { + + console.log( 'THREE.AMFLoader: fflate missing and file is compressed.' ); + return null; + + } + + } + + for ( file in zip ) { + + if ( file.toLowerCase().slice( - 4 ) === '.amf' ) { + + break; + + } + + } + + console.log( 'THREE.AMFLoader: Trying to load file asset: ' + file ); + view = new DataView( zip[ file ].buffer ); + + } + + const fileText = new TextDecoder().decode( view ); + const xmlData = new DOMParser().parseFromString( fileText, 'application/xml' ); + + if ( xmlData.documentElement.nodeName.toLowerCase() !== 'amf' ) { + + console.log( 'THREE.AMFLoader: Error loading AMF - no AMF document found.' ); + return null; + + } + + return xmlData; + + } + + function loadDocumentScale( node ) { + + let scale = 1.0; + let unit = 'millimeter'; + + if ( node.documentElement.attributes.unit !== undefined ) { + + unit = node.documentElement.attributes.unit.value.toLowerCase(); + + } + + const scaleUnits = { + millimeter: 1.0, + inch: 25.4, + feet: 304.8, + meter: 1000.0, + micron: 0.001 + }; + + if ( scaleUnits[ unit ] !== undefined ) { + + scale = scaleUnits[ unit ]; + + } + + console.log( 'THREE.AMFLoader: Unit scale: ' + scale ); + return scale; + + } + + function loadMaterials( node ) { + + let matName = 'AMF Material'; + const matId = node.attributes.id.textContent; + let color = { r: 1.0, g: 1.0, b: 1.0, a: 1.0 }; + + let loadedMaterial = null; + + for ( let i = 0; i < node.childNodes.length; i ++ ) { + + const matChildEl = node.childNodes[ i ]; + + if ( matChildEl.nodeName === 'metadata' && matChildEl.attributes.type !== undefined ) { + + if ( matChildEl.attributes.type.value === 'name' ) { + + matName = matChildEl.textContent; + + } + + } else if ( matChildEl.nodeName === 'color' ) { + + color = loadColor( matChildEl ); + + } + + } + + loadedMaterial = new MeshPhongMaterial( { + flatShading: true, + color: new Color( color.r, color.g, color.b ), + name: matName + } ); + + if ( color.a !== 1.0 ) { + + loadedMaterial.transparent = true; + loadedMaterial.opacity = color.a; + + } + + return { id: matId, material: loadedMaterial }; + + } + + function loadColor( node ) { + + const color = { r: 1.0, g: 1.0, b: 1.0, a: 1.0 }; + + for ( let i = 0; i < node.childNodes.length; i ++ ) { + + const matColor = node.childNodes[ i ]; + + if ( matColor.nodeName === 'r' ) { + + color.r = matColor.textContent; + + } else if ( matColor.nodeName === 'g' ) { + + color.g = matColor.textContent; + + } else if ( matColor.nodeName === 'b' ) { + + color.b = matColor.textContent; + + } else if ( matColor.nodeName === 'a' ) { + + color.a = matColor.textContent; + + } + + } + + return color; + + } + + function loadMeshVolume( node ) { + + const volume = { name: '', triangles: [], materialid: null }; + + let currVolumeNode = node.firstElementChild; + + if ( node.attributes.materialid !== undefined ) { + + volume.materialId = node.attributes.materialid.nodeValue; + + } + + while ( currVolumeNode ) { + + if ( currVolumeNode.nodeName === 'metadata' ) { + + if ( currVolumeNode.attributes.type !== undefined ) { + + if ( currVolumeNode.attributes.type.value === 'name' ) { + + volume.name = currVolumeNode.textContent; + + } + + } + + } else if ( currVolumeNode.nodeName === 'triangle' ) { + + const v1 = currVolumeNode.getElementsByTagName( 'v1' )[ 0 ].textContent; + const v2 = currVolumeNode.getElementsByTagName( 'v2' )[ 0 ].textContent; + const v3 = currVolumeNode.getElementsByTagName( 'v3' )[ 0 ].textContent; + + volume.triangles.push( v1, v2, v3 ); + + } + + currVolumeNode = currVolumeNode.nextElementSibling; + + } + + return volume; + + } + + function loadMeshVertices( node ) { + + const vertArray = []; + const normalArray = []; + let currVerticesNode = node.firstElementChild; + + while ( currVerticesNode ) { + + if ( currVerticesNode.nodeName === 'vertex' ) { + + let vNode = currVerticesNode.firstElementChild; + + while ( vNode ) { + + if ( vNode.nodeName === 'coordinates' ) { + + const x = vNode.getElementsByTagName( 'x' )[ 0 ].textContent; + const y = vNode.getElementsByTagName( 'y' )[ 0 ].textContent; + const z = vNode.getElementsByTagName( 'z' )[ 0 ].textContent; + + vertArray.push( x, y, z ); + + } else if ( vNode.nodeName === 'normal' ) { + + const nx = vNode.getElementsByTagName( 'nx' )[ 0 ].textContent; + const ny = vNode.getElementsByTagName( 'ny' )[ 0 ].textContent; + const nz = vNode.getElementsByTagName( 'nz' )[ 0 ].textContent; + + normalArray.push( nx, ny, nz ); + + } + + vNode = vNode.nextElementSibling; + + } + + } + + currVerticesNode = currVerticesNode.nextElementSibling; + + } + + return { 'vertices': vertArray, 'normals': normalArray }; + + } + + function loadObject( node ) { + + const objId = node.attributes.id.textContent; + const loadedObject = { name: 'amfobject', meshes: [] }; + let currColor = null; + let currObjNode = node.firstElementChild; + + while ( currObjNode ) { + + if ( currObjNode.nodeName === 'metadata' ) { + + if ( currObjNode.attributes.type !== undefined ) { + + if ( currObjNode.attributes.type.value === 'name' ) { + + loadedObject.name = currObjNode.textContent; + + } + + } + + } else if ( currObjNode.nodeName === 'color' ) { + + currColor = loadColor( currObjNode ); + + } else if ( currObjNode.nodeName === 'mesh' ) { + + let currMeshNode = currObjNode.firstElementChild; + const mesh = { vertices: [], normals: [], volumes: [], color: currColor }; + + while ( currMeshNode ) { + + if ( currMeshNode.nodeName === 'vertices' ) { + + const loadedVertices = loadMeshVertices( currMeshNode ); + + mesh.normals = mesh.normals.concat( loadedVertices.normals ); + mesh.vertices = mesh.vertices.concat( loadedVertices.vertices ); + + } else if ( currMeshNode.nodeName === 'volume' ) { + + mesh.volumes.push( loadMeshVolume( currMeshNode ) ); + + } + + currMeshNode = currMeshNode.nextElementSibling; + + } + + loadedObject.meshes.push( mesh ); + + } + + currObjNode = currObjNode.nextElementSibling; + + } + + return { 'id': objId, 'obj': loadedObject }; + + } + + const xmlData = loadDocument( data ); + let amfName = ''; + let amfAuthor = ''; + const amfScale = loadDocumentScale( xmlData ); + const amfMaterials = {}; + const amfObjects = {}; + const childNodes = xmlData.documentElement.childNodes; + + let i, j; + + for ( i = 0; i < childNodes.length; i ++ ) { + + const child = childNodes[ i ]; + + if ( child.nodeName === 'metadata' ) { + + if ( child.attributes.type !== undefined ) { + + if ( child.attributes.type.value === 'name' ) { + + amfName = child.textContent; + + } else if ( child.attributes.type.value === 'author' ) { + + amfAuthor = child.textContent; + + } + + } + + } else if ( child.nodeName === 'material' ) { + + const loadedMaterial = loadMaterials( child ); + + amfMaterials[ loadedMaterial.id ] = loadedMaterial.material; + + } else if ( child.nodeName === 'object' ) { + + const loadedObject = loadObject( child ); + + amfObjects[ loadedObject.id ] = loadedObject.obj; + + } + + } + + const sceneObject = new Group(); + const defaultMaterial = new MeshPhongMaterial( { + name: Loader.DEFAULT_MATERIAL_NAME, + color: 0xaaaaff, + flatShading: true + } ); + + sceneObject.name = amfName; + sceneObject.userData.author = amfAuthor; + sceneObject.userData.loader = 'AMF'; + + for ( const id in amfObjects ) { + + const part = amfObjects[ id ]; + const meshes = part.meshes; + const newObject = new Group(); + newObject.name = part.name || ''; + + for ( i = 0; i < meshes.length; i ++ ) { + + let objDefaultMaterial = defaultMaterial; + const mesh = meshes[ i ]; + const vertices = new Float32BufferAttribute( mesh.vertices, 3 ); + let normals = null; + + if ( mesh.normals.length ) { + + normals = new Float32BufferAttribute( mesh.normals, 3 ); + + } + + if ( mesh.color ) { + + const color = mesh.color; + + objDefaultMaterial = defaultMaterial.clone(); + objDefaultMaterial.color = new Color( color.r, color.g, color.b ); + + if ( color.a !== 1.0 ) { + + objDefaultMaterial.transparent = true; + objDefaultMaterial.opacity = color.a; + + } + + } + + const volumes = mesh.volumes; + + for ( j = 0; j < volumes.length; j ++ ) { + + const volume = volumes[ j ]; + const newGeometry = new BufferGeometry(); + let material = objDefaultMaterial; + + newGeometry.setIndex( volume.triangles ); + newGeometry.setAttribute( 'position', vertices.clone() ); + + if ( normals ) { + + newGeometry.setAttribute( 'normal', normals.clone() ); + + } + + if ( amfMaterials[ volume.materialId ] !== undefined ) { + + material = amfMaterials[ volume.materialId ]; + + } + + newGeometry.scale( amfScale, amfScale, amfScale ); + newObject.add( new Mesh( newGeometry, material.clone() ) ); + + } + + } + + sceneObject.add( newObject ); + + } + + return sceneObject; + + } + +} + +export { AMFLoader }; diff --git a/node_modules/three/examples/jsm/loaders/BVHLoader.js b/node_modules/three/examples/jsm/loaders/BVHLoader.js new file mode 100644 index 0000000..dde85a9 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/BVHLoader.js @@ -0,0 +1,437 @@ +import { + AnimationClip, + Bone, + FileLoader, + Loader, + Quaternion, + QuaternionKeyframeTrack, + Skeleton, + Vector3, + VectorKeyframeTrack +} from 'three'; + +/** + * Description: reads BVH files and outputs a single Skeleton and an AnimationClip + * + * Currently only supports bvh files containing a single root. + * + */ + +class BVHLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.animateBonePositions = true; + this.animateBoneRotations = true; + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( text ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( text ) { + + /* + reads a string array (lines) from a BVH file + and outputs a skeleton structure including motion data + + returns thee root node: + { name: '', channels: [], children: [] } + */ + function readBvh( lines ) { + + // read model structure + + if ( nextLine( lines ) !== 'HIERARCHY' ) { + + console.error( 'THREE.BVHLoader: HIERARCHY expected.' ); + + } + + const list = []; // collects flat array of all bones + const root = readNode( lines, nextLine( lines ), list ); + + // read motion data + + if ( nextLine( lines ) !== 'MOTION' ) { + + console.error( 'THREE.BVHLoader: MOTION expected.' ); + + } + + // number of frames + + let tokens = nextLine( lines ).split( /[\s]+/ ); + const numFrames = parseInt( tokens[ 1 ] ); + + if ( isNaN( numFrames ) ) { + + console.error( 'THREE.BVHLoader: Failed to read number of frames.' ); + + } + + // frame time + + tokens = nextLine( lines ).split( /[\s]+/ ); + const frameTime = parseFloat( tokens[ 2 ] ); + + if ( isNaN( frameTime ) ) { + + console.error( 'THREE.BVHLoader: Failed to read frame time.' ); + + } + + // read frame data line by line + + for ( let i = 0; i < numFrames; i ++ ) { + + tokens = nextLine( lines ).split( /[\s]+/ ); + readFrameData( tokens, i * frameTime, root ); + + } + + return list; + + } + + /* + Recursively reads data from a single frame into the bone hierarchy. + The passed bone hierarchy has to be structured in the same order as the BVH file. + keyframe data is stored in bone.frames. + + - data: splitted string array (frame values), values are shift()ed so + this should be empty after parsing the whole hierarchy. + - frameTime: playback time for this keyframe. + - bone: the bone to read frame data from. + */ + function readFrameData( data, frameTime, bone ) { + + // end sites have no motion data + + if ( bone.type === 'ENDSITE' ) return; + + // add keyframe + + const keyframe = { + time: frameTime, + position: new Vector3(), + rotation: new Quaternion() + }; + + bone.frames.push( keyframe ); + + const quat = new Quaternion(); + + const vx = new Vector3( 1, 0, 0 ); + const vy = new Vector3( 0, 1, 0 ); + const vz = new Vector3( 0, 0, 1 ); + + // parse values for each channel in node + + for ( let i = 0; i < bone.channels.length; i ++ ) { + + switch ( bone.channels[ i ] ) { + + case 'Xposition': + keyframe.position.x = parseFloat( data.shift().trim() ); + break; + case 'Yposition': + keyframe.position.y = parseFloat( data.shift().trim() ); + break; + case 'Zposition': + keyframe.position.z = parseFloat( data.shift().trim() ); + break; + case 'Xrotation': + quat.setFromAxisAngle( vx, parseFloat( data.shift().trim() ) * Math.PI / 180 ); + keyframe.rotation.multiply( quat ); + break; + case 'Yrotation': + quat.setFromAxisAngle( vy, parseFloat( data.shift().trim() ) * Math.PI / 180 ); + keyframe.rotation.multiply( quat ); + break; + case 'Zrotation': + quat.setFromAxisAngle( vz, parseFloat( data.shift().trim() ) * Math.PI / 180 ); + keyframe.rotation.multiply( quat ); + break; + default: + console.warn( 'THREE.BVHLoader: Invalid channel type.' ); + + } + + } + + // parse child nodes + + for ( let i = 0; i < bone.children.length; i ++ ) { + + readFrameData( data, frameTime, bone.children[ i ] ); + + } + + } + + /* + Recursively parses the HIERACHY section of the BVH file + + - lines: all lines of the file. lines are consumed as we go along. + - firstline: line containing the node type and name e.g. 'JOINT hip' + - list: collects a flat list of nodes + + returns: a BVH node including children + */ + function readNode( lines, firstline, list ) { + + const node = { name: '', type: '', frames: [] }; + list.push( node ); + + // parse node type and name + + let tokens = firstline.split( /[\s]+/ ); + + if ( tokens[ 0 ].toUpperCase() === 'END' && tokens[ 1 ].toUpperCase() === 'SITE' ) { + + node.type = 'ENDSITE'; + node.name = 'ENDSITE'; // bvh end sites have no name + + } else { + + node.name = tokens[ 1 ]; + node.type = tokens[ 0 ].toUpperCase(); + + } + + if ( nextLine( lines ) !== '{' ) { + + console.error( 'THREE.BVHLoader: Expected opening { after type & name' ); + + } + + // parse OFFSET + + tokens = nextLine( lines ).split( /[\s]+/ ); + + if ( tokens[ 0 ] !== 'OFFSET' ) { + + console.error( 'THREE.BVHLoader: Expected OFFSET but got: ' + tokens[ 0 ] ); + + } + + if ( tokens.length !== 4 ) { + + console.error( 'THREE.BVHLoader: Invalid number of values for OFFSET.' ); + + } + + const offset = new Vector3( + parseFloat( tokens[ 1 ] ), + parseFloat( tokens[ 2 ] ), + parseFloat( tokens[ 3 ] ) + ); + + if ( isNaN( offset.x ) || isNaN( offset.y ) || isNaN( offset.z ) ) { + + console.error( 'THREE.BVHLoader: Invalid values of OFFSET.' ); + + } + + node.offset = offset; + + // parse CHANNELS definitions + + if ( node.type !== 'ENDSITE' ) { + + tokens = nextLine( lines ).split( /[\s]+/ ); + + if ( tokens[ 0 ] !== 'CHANNELS' ) { + + console.error( 'THREE.BVHLoader: Expected CHANNELS definition.' ); + + } + + const numChannels = parseInt( tokens[ 1 ] ); + node.channels = tokens.splice( 2, numChannels ); + node.children = []; + + } + + // read children + + while ( true ) { + + const line = nextLine( lines ); + + if ( line === '}' ) { + + return node; + + } else { + + node.children.push( readNode( lines, line, list ) ); + + } + + } + + } + + /* + recursively converts the internal bvh node structure to a Bone hierarchy + + source: the bvh root node + list: pass an empty array, collects a flat list of all converted THREE.Bones + + returns the root Bone + */ + function toTHREEBone( source, list ) { + + const bone = new Bone(); + list.push( bone ); + + bone.position.add( source.offset ); + bone.name = source.name; + + if ( source.type !== 'ENDSITE' ) { + + for ( let i = 0; i < source.children.length; i ++ ) { + + bone.add( toTHREEBone( source.children[ i ], list ) ); + + } + + } + + return bone; + + } + + /* + builds a AnimationClip from the keyframe data saved in each bone. + + bone: bvh root node + + returns: a AnimationClip containing position and quaternion tracks + */ + function toTHREEAnimation( bones ) { + + const tracks = []; + + // create a position and quaternion animation track for each node + + for ( let i = 0; i < bones.length; i ++ ) { + + const bone = bones[ i ]; + + if ( bone.type === 'ENDSITE' ) + continue; + + // track data + + const times = []; + const positions = []; + const rotations = []; + + for ( let j = 0; j < bone.frames.length; j ++ ) { + + const frame = bone.frames[ j ]; + + times.push( frame.time ); + + // the animation system animates the position property, + // so we have to add the joint offset to all values + + positions.push( frame.position.x + bone.offset.x ); + positions.push( frame.position.y + bone.offset.y ); + positions.push( frame.position.z + bone.offset.z ); + + rotations.push( frame.rotation.x ); + rotations.push( frame.rotation.y ); + rotations.push( frame.rotation.z ); + rotations.push( frame.rotation.w ); + + } + + if ( scope.animateBonePositions ) { + + tracks.push( new VectorKeyframeTrack( bone.name + '.position', times, positions ) ); + + } + + if ( scope.animateBoneRotations ) { + + tracks.push( new QuaternionKeyframeTrack( bone.name + '.quaternion', times, rotations ) ); + + } + + } + + return new AnimationClip( 'animation', - 1, tracks ); + + } + + /* + returns the next non-empty line in lines + */ + function nextLine( lines ) { + + let line; + // skip empty lines + while ( ( line = lines.shift().trim() ).length === 0 ) { } + + return line; + + } + + const scope = this; + + const lines = text.split( /[\r\n]+/g ); + + const bones = readBvh( lines ); + + const threeBones = []; + toTHREEBone( bones[ 0 ], threeBones ); + + const threeClip = toTHREEAnimation( bones ); + + return { + skeleton: new Skeleton( threeBones ), + clip: threeClip + }; + + } + +} + +export { BVHLoader }; diff --git a/node_modules/three/examples/jsm/loaders/ColladaLoader.js b/node_modules/three/examples/jsm/loaders/ColladaLoader.js new file mode 100644 index 0000000..f3497f3 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/ColladaLoader.js @@ -0,0 +1,4116 @@ +import { + AmbientLight, + AnimationClip, + Bone, + BufferGeometry, + ClampToEdgeWrapping, + Color, + DirectionalLight, + DoubleSide, + FileLoader, + Float32BufferAttribute, + FrontSide, + Group, + Line, + LineBasicMaterial, + LineSegments, + Loader, + LoaderUtils, + MathUtils, + Matrix4, + Mesh, + MeshBasicMaterial, + MeshLambertMaterial, + MeshPhongMaterial, + OrthographicCamera, + PerspectiveCamera, + PointLight, + Quaternion, + QuaternionKeyframeTrack, + RepeatWrapping, + Scene, + Skeleton, + SkinnedMesh, + SpotLight, + TextureLoader, + Vector2, + Vector3, + VectorKeyframeTrack, + SRGBColorSpace +} from 'three'; +import { TGALoader } from '../loaders/TGALoader.js'; + +class ColladaLoader extends Loader { + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const path = ( scope.path === '' ) ? LoaderUtils.extractUrlBase( url ) : scope.path; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( text, path ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( text, path ) { + + function getElementsByTagName( xml, name ) { + + // Non recursive xml.getElementsByTagName() ... + + const array = []; + const childNodes = xml.childNodes; + + for ( let i = 0, l = childNodes.length; i < l; i ++ ) { + + const child = childNodes[ i ]; + + if ( child.nodeName === name ) { + + array.push( child ); + + } + + } + + return array; + + } + + function parseStrings( text ) { + + if ( text.length === 0 ) return []; + + const parts = text.trim().split( /\s+/ ); + const array = new Array( parts.length ); + + for ( let i = 0, l = parts.length; i < l; i ++ ) { + + array[ i ] = parts[ i ]; + + } + + return array; + + } + + function parseFloats( text ) { + + if ( text.length === 0 ) return []; + + const parts = text.trim().split( /\s+/ ); + const array = new Array( parts.length ); + + for ( let i = 0, l = parts.length; i < l; i ++ ) { + + array[ i ] = parseFloat( parts[ i ] ); + + } + + return array; + + } + + function parseInts( text ) { + + if ( text.length === 0 ) return []; + + const parts = text.trim().split( /\s+/ ); + const array = new Array( parts.length ); + + for ( let i = 0, l = parts.length; i < l; i ++ ) { + + array[ i ] = parseInt( parts[ i ] ); + + } + + return array; + + } + + function parseId( text ) { + + return text.substring( 1 ); + + } + + function generateId() { + + return 'three_default_' + ( count ++ ); + + } + + function isEmpty( object ) { + + return Object.keys( object ).length === 0; + + } + + // asset + + function parseAsset( xml ) { + + return { + unit: parseAssetUnit( getElementsByTagName( xml, 'unit' )[ 0 ] ), + upAxis: parseAssetUpAxis( getElementsByTagName( xml, 'up_axis' )[ 0 ] ) + }; + + } + + function parseAssetUnit( xml ) { + + if ( ( xml !== undefined ) && ( xml.hasAttribute( 'meter' ) === true ) ) { + + return parseFloat( xml.getAttribute( 'meter' ) ); + + } else { + + return 1; // default 1 meter + + } + + } + + function parseAssetUpAxis( xml ) { + + return xml !== undefined ? xml.textContent : 'Y_UP'; + + } + + // library + + function parseLibrary( xml, libraryName, nodeName, parser ) { + + const library = getElementsByTagName( xml, libraryName )[ 0 ]; + + if ( library !== undefined ) { + + const elements = getElementsByTagName( library, nodeName ); + + for ( let i = 0; i < elements.length; i ++ ) { + + parser( elements[ i ] ); + + } + + } + + } + + function buildLibrary( data, builder ) { + + for ( const name in data ) { + + const object = data[ name ]; + object.build = builder( data[ name ] ); + + } + + } + + // get + + function getBuild( data, builder ) { + + if ( data.build !== undefined ) return data.build; + + data.build = builder( data ); + + return data.build; + + } + + // animation + + function parseAnimation( xml ) { + + const data = { + sources: {}, + samplers: {}, + channels: {} + }; + + let hasChildren = false; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + let id; + + switch ( child.nodeName ) { + + case 'source': + id = child.getAttribute( 'id' ); + data.sources[ id ] = parseSource( child ); + break; + + case 'sampler': + id = child.getAttribute( 'id' ); + data.samplers[ id ] = parseAnimationSampler( child ); + break; + + case 'channel': + id = child.getAttribute( 'target' ); + data.channels[ id ] = parseAnimationChannel( child ); + break; + + case 'animation': + // hierarchy of related animations + parseAnimation( child ); + hasChildren = true; + break; + + default: + console.log( child ); + + } + + } + + if ( hasChildren === false ) { + + // since 'id' attributes can be optional, it's necessary to generate a UUID for unqiue assignment + + library.animations[ xml.getAttribute( 'id' ) || MathUtils.generateUUID() ] = data; + + } + + } + + function parseAnimationSampler( xml ) { + + const data = { + inputs: {}, + }; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'input': + const id = parseId( child.getAttribute( 'source' ) ); + const semantic = child.getAttribute( 'semantic' ); + data.inputs[ semantic ] = id; + break; + + } + + } + + return data; + + } + + function parseAnimationChannel( xml ) { + + const data = {}; + + const target = xml.getAttribute( 'target' ); + + // parsing SID Addressing Syntax + + let parts = target.split( '/' ); + + const id = parts.shift(); + let sid = parts.shift(); + + // check selection syntax + + const arraySyntax = ( sid.indexOf( '(' ) !== - 1 ); + const memberSyntax = ( sid.indexOf( '.' ) !== - 1 ); + + if ( memberSyntax ) { + + // member selection access + + parts = sid.split( '.' ); + sid = parts.shift(); + data.member = parts.shift(); + + } else if ( arraySyntax ) { + + // array-access syntax. can be used to express fields in one-dimensional vectors or two-dimensional matrices. + + const indices = sid.split( '(' ); + sid = indices.shift(); + + for ( let i = 0; i < indices.length; i ++ ) { + + indices[ i ] = parseInt( indices[ i ].replace( /\)/, '' ) ); + + } + + data.indices = indices; + + } + + data.id = id; + data.sid = sid; + + data.arraySyntax = arraySyntax; + data.memberSyntax = memberSyntax; + + data.sampler = parseId( xml.getAttribute( 'source' ) ); + + return data; + + } + + function buildAnimation( data ) { + + const tracks = []; + + const channels = data.channels; + const samplers = data.samplers; + const sources = data.sources; + + for ( const target in channels ) { + + if ( channels.hasOwnProperty( target ) ) { + + const channel = channels[ target ]; + const sampler = samplers[ channel.sampler ]; + + const inputId = sampler.inputs.INPUT; + const outputId = sampler.inputs.OUTPUT; + + const inputSource = sources[ inputId ]; + const outputSource = sources[ outputId ]; + + const animation = buildAnimationChannel( channel, inputSource, outputSource ); + + createKeyframeTracks( animation, tracks ); + + } + + } + + return tracks; + + } + + function getAnimation( id ) { + + return getBuild( library.animations[ id ], buildAnimation ); + + } + + function buildAnimationChannel( channel, inputSource, outputSource ) { + + const node = library.nodes[ channel.id ]; + const object3D = getNode( node.id ); + + const transform = node.transforms[ channel.sid ]; + const defaultMatrix = node.matrix.clone().transpose(); + + let time, stride; + let i, il, j, jl; + + const data = {}; + + // the collada spec allows the animation of data in various ways. + // depending on the transform type (matrix, translate, rotate, scale), we execute different logic + + switch ( transform ) { + + case 'matrix': + + for ( i = 0, il = inputSource.array.length; i < il; i ++ ) { + + time = inputSource.array[ i ]; + stride = i * outputSource.stride; + + if ( data[ time ] === undefined ) data[ time ] = {}; + + if ( channel.arraySyntax === true ) { + + const value = outputSource.array[ stride ]; + const index = channel.indices[ 0 ] + 4 * channel.indices[ 1 ]; + + data[ time ][ index ] = value; + + } else { + + for ( j = 0, jl = outputSource.stride; j < jl; j ++ ) { + + data[ time ][ j ] = outputSource.array[ stride + j ]; + + } + + } + + } + + break; + + case 'translate': + console.warn( 'THREE.ColladaLoader: Animation transform type "%s" not yet implemented.', transform ); + break; + + case 'rotate': + console.warn( 'THREE.ColladaLoader: Animation transform type "%s" not yet implemented.', transform ); + break; + + case 'scale': + console.warn( 'THREE.ColladaLoader: Animation transform type "%s" not yet implemented.', transform ); + break; + + } + + const keyframes = prepareAnimationData( data, defaultMatrix ); + + const animation = { + name: object3D.uuid, + keyframes: keyframes + }; + + return animation; + + } + + function prepareAnimationData( data, defaultMatrix ) { + + const keyframes = []; + + // transfer data into a sortable array + + for ( const time in data ) { + + keyframes.push( { time: parseFloat( time ), value: data[ time ] } ); + + } + + // ensure keyframes are sorted by time + + keyframes.sort( ascending ); + + // now we clean up all animation data, so we can use them for keyframe tracks + + for ( let i = 0; i < 16; i ++ ) { + + transformAnimationData( keyframes, i, defaultMatrix.elements[ i ] ); + + } + + return keyframes; + + // array sort function + + function ascending( a, b ) { + + return a.time - b.time; + + } + + } + + const position = new Vector3(); + const scale = new Vector3(); + const quaternion = new Quaternion(); + + function createKeyframeTracks( animation, tracks ) { + + const keyframes = animation.keyframes; + const name = animation.name; + + const times = []; + const positionData = []; + const quaternionData = []; + const scaleData = []; + + for ( let i = 0, l = keyframes.length; i < l; i ++ ) { + + const keyframe = keyframes[ i ]; + + const time = keyframe.time; + const value = keyframe.value; + + matrix.fromArray( value ).transpose(); + matrix.decompose( position, quaternion, scale ); + + times.push( time ); + positionData.push( position.x, position.y, position.z ); + quaternionData.push( quaternion.x, quaternion.y, quaternion.z, quaternion.w ); + scaleData.push( scale.x, scale.y, scale.z ); + + } + + if ( positionData.length > 0 ) tracks.push( new VectorKeyframeTrack( name + '.position', times, positionData ) ); + if ( quaternionData.length > 0 ) tracks.push( new QuaternionKeyframeTrack( name + '.quaternion', times, quaternionData ) ); + if ( scaleData.length > 0 ) tracks.push( new VectorKeyframeTrack( name + '.scale', times, scaleData ) ); + + return tracks; + + } + + function transformAnimationData( keyframes, property, defaultValue ) { + + let keyframe; + + let empty = true; + let i, l; + + // check, if values of a property are missing in our keyframes + + for ( i = 0, l = keyframes.length; i < l; i ++ ) { + + keyframe = keyframes[ i ]; + + if ( keyframe.value[ property ] === undefined ) { + + keyframe.value[ property ] = null; // mark as missing + + } else { + + empty = false; + + } + + } + + if ( empty === true ) { + + // no values at all, so we set a default value + + for ( i = 0, l = keyframes.length; i < l; i ++ ) { + + keyframe = keyframes[ i ]; + + keyframe.value[ property ] = defaultValue; + + } + + } else { + + // filling gaps + + createMissingKeyframes( keyframes, property ); + + } + + } + + function createMissingKeyframes( keyframes, property ) { + + let prev, next; + + for ( let i = 0, l = keyframes.length; i < l; i ++ ) { + + const keyframe = keyframes[ i ]; + + if ( keyframe.value[ property ] === null ) { + + prev = getPrev( keyframes, i, property ); + next = getNext( keyframes, i, property ); + + if ( prev === null ) { + + keyframe.value[ property ] = next.value[ property ]; + continue; + + } + + if ( next === null ) { + + keyframe.value[ property ] = prev.value[ property ]; + continue; + + } + + interpolate( keyframe, prev, next, property ); + + } + + } + + } + + function getPrev( keyframes, i, property ) { + + while ( i >= 0 ) { + + const keyframe = keyframes[ i ]; + + if ( keyframe.value[ property ] !== null ) return keyframe; + + i --; + + } + + return null; + + } + + function getNext( keyframes, i, property ) { + + while ( i < keyframes.length ) { + + const keyframe = keyframes[ i ]; + + if ( keyframe.value[ property ] !== null ) return keyframe; + + i ++; + + } + + return null; + + } + + function interpolate( key, prev, next, property ) { + + if ( ( next.time - prev.time ) === 0 ) { + + key.value[ property ] = prev.value[ property ]; + return; + + } + + key.value[ property ] = ( ( key.time - prev.time ) * ( next.value[ property ] - prev.value[ property ] ) / ( next.time - prev.time ) ) + prev.value[ property ]; + + } + + // animation clips + + function parseAnimationClip( xml ) { + + const data = { + name: xml.getAttribute( 'id' ) || 'default', + start: parseFloat( xml.getAttribute( 'start' ) || 0 ), + end: parseFloat( xml.getAttribute( 'end' ) || 0 ), + animations: [] + }; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'instance_animation': + data.animations.push( parseId( child.getAttribute( 'url' ) ) ); + break; + + } + + } + + library.clips[ xml.getAttribute( 'id' ) ] = data; + + } + + function buildAnimationClip( data ) { + + const tracks = []; + + const name = data.name; + const duration = ( data.end - data.start ) || - 1; + const animations = data.animations; + + for ( let i = 0, il = animations.length; i < il; i ++ ) { + + const animationTracks = getAnimation( animations[ i ] ); + + for ( let j = 0, jl = animationTracks.length; j < jl; j ++ ) { + + tracks.push( animationTracks[ j ] ); + + } + + } + + return new AnimationClip( name, duration, tracks ); + + } + + function getAnimationClip( id ) { + + return getBuild( library.clips[ id ], buildAnimationClip ); + + } + + // controller + + function parseController( xml ) { + + const data = {}; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'skin': + // there is exactly one skin per controller + data.id = parseId( child.getAttribute( 'source' ) ); + data.skin = parseSkin( child ); + break; + + case 'morph': + data.id = parseId( child.getAttribute( 'source' ) ); + console.warn( 'THREE.ColladaLoader: Morph target animation not supported yet.' ); + break; + + } + + } + + library.controllers[ xml.getAttribute( 'id' ) ] = data; + + } + + function parseSkin( xml ) { + + const data = { + sources: {} + }; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'bind_shape_matrix': + data.bindShapeMatrix = parseFloats( child.textContent ); + break; + + case 'source': + const id = child.getAttribute( 'id' ); + data.sources[ id ] = parseSource( child ); + break; + + case 'joints': + data.joints = parseJoints( child ); + break; + + case 'vertex_weights': + data.vertexWeights = parseVertexWeights( child ); + break; + + } + + } + + return data; + + } + + function parseJoints( xml ) { + + const data = { + inputs: {} + }; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'input': + const semantic = child.getAttribute( 'semantic' ); + const id = parseId( child.getAttribute( 'source' ) ); + data.inputs[ semantic ] = id; + break; + + } + + } + + return data; + + } + + function parseVertexWeights( xml ) { + + const data = { + inputs: {} + }; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'input': + const semantic = child.getAttribute( 'semantic' ); + const id = parseId( child.getAttribute( 'source' ) ); + const offset = parseInt( child.getAttribute( 'offset' ) ); + data.inputs[ semantic ] = { id: id, offset: offset }; + break; + + case 'vcount': + data.vcount = parseInts( child.textContent ); + break; + + case 'v': + data.v = parseInts( child.textContent ); + break; + + } + + } + + return data; + + } + + function buildController( data ) { + + const build = { + id: data.id + }; + + const geometry = library.geometries[ build.id ]; + + if ( data.skin !== undefined ) { + + build.skin = buildSkin( data.skin ); + + // we enhance the 'sources' property of the corresponding geometry with our skin data + + geometry.sources.skinIndices = build.skin.indices; + geometry.sources.skinWeights = build.skin.weights; + + } + + return build; + + } + + function buildSkin( data ) { + + const BONE_LIMIT = 4; + + const build = { + joints: [], // this must be an array to preserve the joint order + indices: { + array: [], + stride: BONE_LIMIT + }, + weights: { + array: [], + stride: BONE_LIMIT + } + }; + + const sources = data.sources; + const vertexWeights = data.vertexWeights; + + const vcount = vertexWeights.vcount; + const v = vertexWeights.v; + const jointOffset = vertexWeights.inputs.JOINT.offset; + const weightOffset = vertexWeights.inputs.WEIGHT.offset; + + const jointSource = data.sources[ data.joints.inputs.JOINT ]; + const inverseSource = data.sources[ data.joints.inputs.INV_BIND_MATRIX ]; + + const weights = sources[ vertexWeights.inputs.WEIGHT.id ].array; + let stride = 0; + + let i, j, l; + + // process skin data for each vertex + + for ( i = 0, l = vcount.length; i < l; i ++ ) { + + const jointCount = vcount[ i ]; // this is the amount of joints that affect a single vertex + const vertexSkinData = []; + + for ( j = 0; j < jointCount; j ++ ) { + + const skinIndex = v[ stride + jointOffset ]; + const weightId = v[ stride + weightOffset ]; + const skinWeight = weights[ weightId ]; + + vertexSkinData.push( { index: skinIndex, weight: skinWeight } ); + + stride += 2; + + } + + // we sort the joints in descending order based on the weights. + // this ensures, we only procced the most important joints of the vertex + + vertexSkinData.sort( descending ); + + // now we provide for each vertex a set of four index and weight values. + // the order of the skin data matches the order of vertices + + for ( j = 0; j < BONE_LIMIT; j ++ ) { + + const d = vertexSkinData[ j ]; + + if ( d !== undefined ) { + + build.indices.array.push( d.index ); + build.weights.array.push( d.weight ); + + } else { + + build.indices.array.push( 0 ); + build.weights.array.push( 0 ); + + } + + } + + } + + // setup bind matrix + + if ( data.bindShapeMatrix ) { + + build.bindMatrix = new Matrix4().fromArray( data.bindShapeMatrix ).transpose(); + + } else { + + build.bindMatrix = new Matrix4().identity(); + + } + + // process bones and inverse bind matrix data + + for ( i = 0, l = jointSource.array.length; i < l; i ++ ) { + + const name = jointSource.array[ i ]; + const boneInverse = new Matrix4().fromArray( inverseSource.array, i * inverseSource.stride ).transpose(); + + build.joints.push( { name: name, boneInverse: boneInverse } ); + + } + + return build; + + // array sort function + + function descending( a, b ) { + + return b.weight - a.weight; + + } + + } + + function getController( id ) { + + return getBuild( library.controllers[ id ], buildController ); + + } + + // image + + function parseImage( xml ) { + + const data = { + init_from: getElementsByTagName( xml, 'init_from' )[ 0 ].textContent + }; + + library.images[ xml.getAttribute( 'id' ) ] = data; + + } + + function buildImage( data ) { + + if ( data.build !== undefined ) return data.build; + + return data.init_from; + + } + + function getImage( id ) { + + const data = library.images[ id ]; + + if ( data !== undefined ) { + + return getBuild( data, buildImage ); + + } + + console.warn( 'THREE.ColladaLoader: Couldn\'t find image with ID:', id ); + + return null; + + } + + // effect + + function parseEffect( xml ) { + + const data = {}; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'profile_COMMON': + data.profile = parseEffectProfileCOMMON( child ); + break; + + } + + } + + library.effects[ xml.getAttribute( 'id' ) ] = data; + + } + + function parseEffectProfileCOMMON( xml ) { + + const data = { + surfaces: {}, + samplers: {} + }; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'newparam': + parseEffectNewparam( child, data ); + break; + + case 'technique': + data.technique = parseEffectTechnique( child ); + break; + + case 'extra': + data.extra = parseEffectExtra( child ); + break; + + } + + } + + return data; + + } + + function parseEffectNewparam( xml, data ) { + + const sid = xml.getAttribute( 'sid' ); + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'surface': + data.surfaces[ sid ] = parseEffectSurface( child ); + break; + + case 'sampler2D': + data.samplers[ sid ] = parseEffectSampler( child ); + break; + + } + + } + + } + + function parseEffectSurface( xml ) { + + const data = {}; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'init_from': + data.init_from = child.textContent; + break; + + } + + } + + return data; + + } + + function parseEffectSampler( xml ) { + + const data = {}; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'source': + data.source = child.textContent; + break; + + } + + } + + return data; + + } + + function parseEffectTechnique( xml ) { + + const data = {}; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'constant': + case 'lambert': + case 'blinn': + case 'phong': + data.type = child.nodeName; + data.parameters = parseEffectParameters( child ); + break; + + case 'extra': + data.extra = parseEffectExtra( child ); + break; + + } + + } + + return data; + + } + + function parseEffectParameters( xml ) { + + const data = {}; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'emission': + case 'diffuse': + case 'specular': + case 'bump': + case 'ambient': + case 'shininess': + case 'transparency': + data[ child.nodeName ] = parseEffectParameter( child ); + break; + case 'transparent': + data[ child.nodeName ] = { + opaque: child.hasAttribute( 'opaque' ) ? child.getAttribute( 'opaque' ) : 'A_ONE', + data: parseEffectParameter( child ) + }; + break; + + } + + } + + return data; + + } + + function parseEffectParameter( xml ) { + + const data = {}; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'color': + data[ child.nodeName ] = parseFloats( child.textContent ); + break; + + case 'float': + data[ child.nodeName ] = parseFloat( child.textContent ); + break; + + case 'texture': + data[ child.nodeName ] = { id: child.getAttribute( 'texture' ), extra: parseEffectParameterTexture( child ) }; + break; + + } + + } + + return data; + + } + + function parseEffectParameterTexture( xml ) { + + const data = { + technique: {} + }; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'extra': + parseEffectParameterTextureExtra( child, data ); + break; + + } + + } + + return data; + + } + + function parseEffectParameterTextureExtra( xml, data ) { + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'technique': + parseEffectParameterTextureExtraTechnique( child, data ); + break; + + } + + } + + } + + function parseEffectParameterTextureExtraTechnique( xml, data ) { + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'repeatU': + case 'repeatV': + case 'offsetU': + case 'offsetV': + data.technique[ child.nodeName ] = parseFloat( child.textContent ); + break; + + case 'wrapU': + case 'wrapV': + + // some files have values for wrapU/wrapV which become NaN via parseInt + + if ( child.textContent.toUpperCase() === 'TRUE' ) { + + data.technique[ child.nodeName ] = 1; + + } else if ( child.textContent.toUpperCase() === 'FALSE' ) { + + data.technique[ child.nodeName ] = 0; + + } else { + + data.technique[ child.nodeName ] = parseInt( child.textContent ); + + } + + break; + + case 'bump': + data[ child.nodeName ] = parseEffectExtraTechniqueBump( child ); + break; + + } + + } + + } + + function parseEffectExtra( xml ) { + + const data = {}; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'technique': + data.technique = parseEffectExtraTechnique( child ); + break; + + } + + } + + return data; + + } + + function parseEffectExtraTechnique( xml ) { + + const data = {}; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'double_sided': + data[ child.nodeName ] = parseInt( child.textContent ); + break; + + case 'bump': + data[ child.nodeName ] = parseEffectExtraTechniqueBump( child ); + break; + + } + + } + + return data; + + } + + function parseEffectExtraTechniqueBump( xml ) { + + const data = {}; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'texture': + data[ child.nodeName ] = { id: child.getAttribute( 'texture' ), texcoord: child.getAttribute( 'texcoord' ), extra: parseEffectParameterTexture( child ) }; + break; + + } + + } + + return data; + + } + + function buildEffect( data ) { + + return data; + + } + + function getEffect( id ) { + + return getBuild( library.effects[ id ], buildEffect ); + + } + + // material + + function parseMaterial( xml ) { + + const data = { + name: xml.getAttribute( 'name' ) + }; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'instance_effect': + data.url = parseId( child.getAttribute( 'url' ) ); + break; + + } + + } + + library.materials[ xml.getAttribute( 'id' ) ] = data; + + } + + function getTextureLoader( image ) { + + let loader; + + let extension = image.slice( ( image.lastIndexOf( '.' ) - 1 >>> 0 ) + 2 ); // http://www.jstips.co/en/javascript/get-file-extension/ + extension = extension.toLowerCase(); + + switch ( extension ) { + + case 'tga': + loader = tgaLoader; + break; + + default: + loader = textureLoader; + + } + + return loader; + + } + + function buildMaterial( data ) { + + const effect = getEffect( data.url ); + const technique = effect.profile.technique; + + let material; + + switch ( technique.type ) { + + case 'phong': + case 'blinn': + material = new MeshPhongMaterial(); + break; + + case 'lambert': + material = new MeshLambertMaterial(); + break; + + default: + material = new MeshBasicMaterial(); + break; + + } + + material.name = data.name || ''; + + function getTexture( textureObject, colorSpace = null ) { + + const sampler = effect.profile.samplers[ textureObject.id ]; + let image = null; + + // get image + + if ( sampler !== undefined ) { + + const surface = effect.profile.surfaces[ sampler.source ]; + image = getImage( surface.init_from ); + + } else { + + console.warn( 'THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530).' ); + image = getImage( textureObject.id ); + + } + + // create texture if image is avaiable + + if ( image !== null ) { + + const loader = getTextureLoader( image ); + + if ( loader !== undefined ) { + + const texture = loader.load( image ); + + const extra = textureObject.extra; + + if ( extra !== undefined && extra.technique !== undefined && isEmpty( extra.technique ) === false ) { + + const technique = extra.technique; + + texture.wrapS = technique.wrapU ? RepeatWrapping : ClampToEdgeWrapping; + texture.wrapT = technique.wrapV ? RepeatWrapping : ClampToEdgeWrapping; + + texture.offset.set( technique.offsetU || 0, technique.offsetV || 0 ); + texture.repeat.set( technique.repeatU || 1, technique.repeatV || 1 ); + + } else { + + texture.wrapS = RepeatWrapping; + texture.wrapT = RepeatWrapping; + + } + + if ( colorSpace !== null ) { + + texture.colorSpace = colorSpace; + + } + + return texture; + + } else { + + console.warn( 'THREE.ColladaLoader: Loader for texture %s not found.', image ); + + return null; + + } + + } else { + + console.warn( 'THREE.ColladaLoader: Couldn\'t create texture with ID:', textureObject.id ); + + return null; + + } + + } + + const parameters = technique.parameters; + + for ( const key in parameters ) { + + const parameter = parameters[ key ]; + + switch ( key ) { + + case 'diffuse': + if ( parameter.color ) material.color.fromArray( parameter.color ); + if ( parameter.texture ) material.map = getTexture( parameter.texture, SRGBColorSpace ); + break; + case 'specular': + if ( parameter.color && material.specular ) material.specular.fromArray( parameter.color ); + if ( parameter.texture ) material.specularMap = getTexture( parameter.texture ); + break; + case 'bump': + if ( parameter.texture ) material.normalMap = getTexture( parameter.texture ); + break; + case 'ambient': + if ( parameter.texture ) material.lightMap = getTexture( parameter.texture, SRGBColorSpace ); + break; + case 'shininess': + if ( parameter.float && material.shininess ) material.shininess = parameter.float; + break; + case 'emission': + if ( parameter.color && material.emissive ) material.emissive.fromArray( parameter.color ); + if ( parameter.texture ) material.emissiveMap = getTexture( parameter.texture, SRGBColorSpace ); + break; + + } + + } + + material.color.convertSRGBToLinear(); + if ( material.specular ) material.specular.convertSRGBToLinear(); + if ( material.emissive ) material.emissive.convertSRGBToLinear(); + + // + + let transparent = parameters[ 'transparent' ]; + let transparency = parameters[ 'transparency' ]; + + // does not exist but + + if ( transparency === undefined && transparent ) { + + transparency = { + float: 1 + }; + + } + + // does not exist but + + if ( transparent === undefined && transparency ) { + + transparent = { + opaque: 'A_ONE', + data: { + color: [ 1, 1, 1, 1 ] + } }; + + } + + if ( transparent && transparency ) { + + // handle case if a texture exists but no color + + if ( transparent.data.texture ) { + + // we do not set an alpha map (see #13792) + + material.transparent = true; + + } else { + + const color = transparent.data.color; + + switch ( transparent.opaque ) { + + case 'A_ONE': + material.opacity = color[ 3 ] * transparency.float; + break; + case 'RGB_ZERO': + material.opacity = 1 - ( color[ 0 ] * transparency.float ); + break; + case 'A_ZERO': + material.opacity = 1 - ( color[ 3 ] * transparency.float ); + break; + case 'RGB_ONE': + material.opacity = color[ 0 ] * transparency.float; + break; + default: + console.warn( 'THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.', transparent.opaque ); + + } + + if ( material.opacity < 1 ) material.transparent = true; + + } + + } + + // + + + if ( technique.extra !== undefined && technique.extra.technique !== undefined ) { + + const techniques = technique.extra.technique; + + for ( const k in techniques ) { + + const v = techniques[ k ]; + + switch ( k ) { + + case 'double_sided': + material.side = ( v === 1 ? DoubleSide : FrontSide ); + break; + + case 'bump': + material.normalMap = getTexture( v.texture ); + material.normalScale = new Vector2( 1, 1 ); + break; + + } + + } + + } + + return material; + + } + + function getMaterial( id ) { + + return getBuild( library.materials[ id ], buildMaterial ); + + } + + // camera + + function parseCamera( xml ) { + + const data = { + name: xml.getAttribute( 'name' ) + }; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'optics': + data.optics = parseCameraOptics( child ); + break; + + } + + } + + library.cameras[ xml.getAttribute( 'id' ) ] = data; + + } + + function parseCameraOptics( xml ) { + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + switch ( child.nodeName ) { + + case 'technique_common': + return parseCameraTechnique( child ); + + } + + } + + return {}; + + } + + function parseCameraTechnique( xml ) { + + const data = {}; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + switch ( child.nodeName ) { + + case 'perspective': + case 'orthographic': + + data.technique = child.nodeName; + data.parameters = parseCameraParameters( child ); + + break; + + } + + } + + return data; + + } + + function parseCameraParameters( xml ) { + + const data = {}; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + switch ( child.nodeName ) { + + case 'xfov': + case 'yfov': + case 'xmag': + case 'ymag': + case 'znear': + case 'zfar': + case 'aspect_ratio': + data[ child.nodeName ] = parseFloat( child.textContent ); + break; + + } + + } + + return data; + + } + + function buildCamera( data ) { + + let camera; + + switch ( data.optics.technique ) { + + case 'perspective': + camera = new PerspectiveCamera( + data.optics.parameters.yfov, + data.optics.parameters.aspect_ratio, + data.optics.parameters.znear, + data.optics.parameters.zfar + ); + break; + + case 'orthographic': + let ymag = data.optics.parameters.ymag; + let xmag = data.optics.parameters.xmag; + const aspectRatio = data.optics.parameters.aspect_ratio; + + xmag = ( xmag === undefined ) ? ( ymag * aspectRatio ) : xmag; + ymag = ( ymag === undefined ) ? ( xmag / aspectRatio ) : ymag; + + xmag *= 0.5; + ymag *= 0.5; + + camera = new OrthographicCamera( + - xmag, xmag, ymag, - ymag, // left, right, top, bottom + data.optics.parameters.znear, + data.optics.parameters.zfar + ); + break; + + default: + camera = new PerspectiveCamera(); + break; + + } + + camera.name = data.name || ''; + + return camera; + + } + + function getCamera( id ) { + + const data = library.cameras[ id ]; + + if ( data !== undefined ) { + + return getBuild( data, buildCamera ); + + } + + console.warn( 'THREE.ColladaLoader: Couldn\'t find camera with ID:', id ); + + return null; + + } + + // light + + function parseLight( xml ) { + + let data = {}; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'technique_common': + data = parseLightTechnique( child ); + break; + + } + + } + + library.lights[ xml.getAttribute( 'id' ) ] = data; + + } + + function parseLightTechnique( xml ) { + + const data = {}; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'directional': + case 'point': + case 'spot': + case 'ambient': + + data.technique = child.nodeName; + data.parameters = parseLightParameters( child ); + + } + + } + + return data; + + } + + function parseLightParameters( xml ) { + + const data = {}; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'color': + const array = parseFloats( child.textContent ); + data.color = new Color().fromArray( array ).convertSRGBToLinear(); + break; + + case 'falloff_angle': + data.falloffAngle = parseFloat( child.textContent ); + break; + + case 'quadratic_attenuation': + const f = parseFloat( child.textContent ); + data.distance = f ? Math.sqrt( 1 / f ) : 0; + break; + + } + + } + + return data; + + } + + function buildLight( data ) { + + let light; + + switch ( data.technique ) { + + case 'directional': + light = new DirectionalLight(); + break; + + case 'point': + light = new PointLight(); + break; + + case 'spot': + light = new SpotLight(); + break; + + case 'ambient': + light = new AmbientLight(); + break; + + } + + if ( data.parameters.color ) light.color.copy( data.parameters.color ); + if ( data.parameters.distance ) light.distance = data.parameters.distance; + + return light; + + } + + function getLight( id ) { + + const data = library.lights[ id ]; + + if ( data !== undefined ) { + + return getBuild( data, buildLight ); + + } + + console.warn( 'THREE.ColladaLoader: Couldn\'t find light with ID:', id ); + + return null; + + } + + // geometry + + function parseGeometry( xml ) { + + const data = { + name: xml.getAttribute( 'name' ), + sources: {}, + vertices: {}, + primitives: [] + }; + + const mesh = getElementsByTagName( xml, 'mesh' )[ 0 ]; + + // the following tags inside geometry are not supported yet (see https://github.com/mrdoob/three.js/pull/12606): convex_mesh, spline, brep + if ( mesh === undefined ) return; + + for ( let i = 0; i < mesh.childNodes.length; i ++ ) { + + const child = mesh.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + const id = child.getAttribute( 'id' ); + + switch ( child.nodeName ) { + + case 'source': + data.sources[ id ] = parseSource( child ); + break; + + case 'vertices': + // data.sources[ id ] = data.sources[ parseId( getElementsByTagName( child, 'input' )[ 0 ].getAttribute( 'source' ) ) ]; + data.vertices = parseGeometryVertices( child ); + break; + + case 'polygons': + console.warn( 'THREE.ColladaLoader: Unsupported primitive type: ', child.nodeName ); + break; + + case 'lines': + case 'linestrips': + case 'polylist': + case 'triangles': + data.primitives.push( parseGeometryPrimitive( child ) ); + break; + + default: + console.log( child ); + + } + + } + + library.geometries[ xml.getAttribute( 'id' ) ] = data; + + } + + function parseSource( xml ) { + + const data = { + array: [], + stride: 3 + }; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'float_array': + data.array = parseFloats( child.textContent ); + break; + + case 'Name_array': + data.array = parseStrings( child.textContent ); + break; + + case 'technique_common': + const accessor = getElementsByTagName( child, 'accessor' )[ 0 ]; + + if ( accessor !== undefined ) { + + data.stride = parseInt( accessor.getAttribute( 'stride' ) ); + + } + + break; + + } + + } + + return data; + + } + + function parseGeometryVertices( xml ) { + + const data = {}; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + data[ child.getAttribute( 'semantic' ) ] = parseId( child.getAttribute( 'source' ) ); + + } + + return data; + + } + + function parseGeometryPrimitive( xml ) { + + const primitive = { + type: xml.nodeName, + material: xml.getAttribute( 'material' ), + count: parseInt( xml.getAttribute( 'count' ) ), + inputs: {}, + stride: 0, + hasUV: false + }; + + for ( let i = 0, l = xml.childNodes.length; i < l; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'input': + const id = parseId( child.getAttribute( 'source' ) ); + const semantic = child.getAttribute( 'semantic' ); + const offset = parseInt( child.getAttribute( 'offset' ) ); + const set = parseInt( child.getAttribute( 'set' ) ); + const inputname = ( set > 0 ? semantic + set : semantic ); + primitive.inputs[ inputname ] = { id: id, offset: offset }; + primitive.stride = Math.max( primitive.stride, offset + 1 ); + if ( semantic === 'TEXCOORD' ) primitive.hasUV = true; + break; + + case 'vcount': + primitive.vcount = parseInts( child.textContent ); + break; + + case 'p': + primitive.p = parseInts( child.textContent ); + break; + + } + + } + + return primitive; + + } + + function groupPrimitives( primitives ) { + + const build = {}; + + for ( let i = 0; i < primitives.length; i ++ ) { + + const primitive = primitives[ i ]; + + if ( build[ primitive.type ] === undefined ) build[ primitive.type ] = []; + + build[ primitive.type ].push( primitive ); + + } + + return build; + + } + + function checkUVCoordinates( primitives ) { + + let count = 0; + + for ( let i = 0, l = primitives.length; i < l; i ++ ) { + + const primitive = primitives[ i ]; + + if ( primitive.hasUV === true ) { + + count ++; + + } + + } + + if ( count > 0 && count < primitives.length ) { + + primitives.uvsNeedsFix = true; + + } + + } + + function buildGeometry( data ) { + + const build = {}; + + const sources = data.sources; + const vertices = data.vertices; + const primitives = data.primitives; + + if ( primitives.length === 0 ) return {}; + + // our goal is to create one buffer geometry for a single type of primitives + // first, we group all primitives by their type + + const groupedPrimitives = groupPrimitives( primitives ); + + for ( const type in groupedPrimitives ) { + + const primitiveType = groupedPrimitives[ type ]; + + // second, ensure consistent uv coordinates for each type of primitives (polylist,triangles or lines) + + checkUVCoordinates( primitiveType ); + + // third, create a buffer geometry for each type of primitives + + build[ type ] = buildGeometryType( primitiveType, sources, vertices ); + + } + + return build; + + } + + function buildGeometryType( primitives, sources, vertices ) { + + const build = {}; + + const position = { array: [], stride: 0 }; + const normal = { array: [], stride: 0 }; + const uv = { array: [], stride: 0 }; + const uv1 = { array: [], stride: 0 }; + const color = { array: [], stride: 0 }; + + const skinIndex = { array: [], stride: 4 }; + const skinWeight = { array: [], stride: 4 }; + + const geometry = new BufferGeometry(); + + const materialKeys = []; + + let start = 0; + + for ( let p = 0; p < primitives.length; p ++ ) { + + const primitive = primitives[ p ]; + const inputs = primitive.inputs; + + // groups + + let count = 0; + + switch ( primitive.type ) { + + case 'lines': + case 'linestrips': + count = primitive.count * 2; + break; + + case 'triangles': + count = primitive.count * 3; + break; + + case 'polylist': + + for ( let g = 0; g < primitive.count; g ++ ) { + + const vc = primitive.vcount[ g ]; + + switch ( vc ) { + + case 3: + count += 3; // single triangle + break; + + case 4: + count += 6; // quad, subdivided into two triangles + break; + + default: + count += ( vc - 2 ) * 3; // polylist with more than four vertices + break; + + } + + } + + break; + + default: + console.warn( 'THREE.ColladaLoader: Unknow primitive type:', primitive.type ); + + } + + geometry.addGroup( start, count, p ); + start += count; + + // material + + if ( primitive.material ) { + + materialKeys.push( primitive.material ); + + } + + // geometry data + + for ( const name in inputs ) { + + const input = inputs[ name ]; + + switch ( name ) { + + case 'VERTEX': + for ( const key in vertices ) { + + const id = vertices[ key ]; + + switch ( key ) { + + case 'POSITION': + const prevLength = position.array.length; + buildGeometryData( primitive, sources[ id ], input.offset, position.array ); + position.stride = sources[ id ].stride; + + if ( sources.skinWeights && sources.skinIndices ) { + + buildGeometryData( primitive, sources.skinIndices, input.offset, skinIndex.array ); + buildGeometryData( primitive, sources.skinWeights, input.offset, skinWeight.array ); + + } + + // see #3803 + + if ( primitive.hasUV === false && primitives.uvsNeedsFix === true ) { + + const count = ( position.array.length - prevLength ) / position.stride; + + for ( let i = 0; i < count; i ++ ) { + + // fill missing uv coordinates + + uv.array.push( 0, 0 ); + + } + + } + + break; + + case 'NORMAL': + buildGeometryData( primitive, sources[ id ], input.offset, normal.array ); + normal.stride = sources[ id ].stride; + break; + + case 'COLOR': + buildGeometryData( primitive, sources[ id ], input.offset, color.array ); + color.stride = sources[ id ].stride; + break; + + case 'TEXCOORD': + buildGeometryData( primitive, sources[ id ], input.offset, uv.array ); + uv.stride = sources[ id ].stride; + break; + + case 'TEXCOORD1': + buildGeometryData( primitive, sources[ id ], input.offset, uv1.array ); + uv.stride = sources[ id ].stride; + break; + + default: + console.warn( 'THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.', key ); + + } + + } + + break; + + case 'NORMAL': + buildGeometryData( primitive, sources[ input.id ], input.offset, normal.array ); + normal.stride = sources[ input.id ].stride; + break; + + case 'COLOR': + buildGeometryData( primitive, sources[ input.id ], input.offset, color.array, true ); + color.stride = sources[ input.id ].stride; + break; + + case 'TEXCOORD': + buildGeometryData( primitive, sources[ input.id ], input.offset, uv.array ); + uv.stride = sources[ input.id ].stride; + break; + + case 'TEXCOORD1': + buildGeometryData( primitive, sources[ input.id ], input.offset, uv1.array ); + uv1.stride = sources[ input.id ].stride; + break; + + } + + } + + } + + // build geometry + + if ( position.array.length > 0 ) geometry.setAttribute( 'position', new Float32BufferAttribute( position.array, position.stride ) ); + if ( normal.array.length > 0 ) geometry.setAttribute( 'normal', new Float32BufferAttribute( normal.array, normal.stride ) ); + if ( color.array.length > 0 ) geometry.setAttribute( 'color', new Float32BufferAttribute( color.array, color.stride ) ); + if ( uv.array.length > 0 ) geometry.setAttribute( 'uv', new Float32BufferAttribute( uv.array, uv.stride ) ); + if ( uv1.array.length > 0 ) geometry.setAttribute( 'uv1', new Float32BufferAttribute( uv1.array, uv1.stride ) ); + + if ( skinIndex.array.length > 0 ) geometry.setAttribute( 'skinIndex', new Float32BufferAttribute( skinIndex.array, skinIndex.stride ) ); + if ( skinWeight.array.length > 0 ) geometry.setAttribute( 'skinWeight', new Float32BufferAttribute( skinWeight.array, skinWeight.stride ) ); + + build.data = geometry; + build.type = primitives[ 0 ].type; + build.materialKeys = materialKeys; + + return build; + + } + + function buildGeometryData( primitive, source, offset, array, isColor = false ) { + + const indices = primitive.p; + const stride = primitive.stride; + const vcount = primitive.vcount; + + function pushVector( i ) { + + let index = indices[ i + offset ] * sourceStride; + const length = index + sourceStride; + + for ( ; index < length; index ++ ) { + + array.push( sourceArray[ index ] ); + + } + + if ( isColor ) { + + // convert the vertex colors from srgb to linear if present + const startIndex = array.length - sourceStride - 1; + tempColor.setRGB( + array[ startIndex + 0 ], + array[ startIndex + 1 ], + array[ startIndex + 2 ] + ).convertSRGBToLinear(); + + array[ startIndex + 0 ] = tempColor.r; + array[ startIndex + 1 ] = tempColor.g; + array[ startIndex + 2 ] = tempColor.b; + + } + + } + + const sourceArray = source.array; + const sourceStride = source.stride; + + if ( primitive.vcount !== undefined ) { + + let index = 0; + + for ( let i = 0, l = vcount.length; i < l; i ++ ) { + + const count = vcount[ i ]; + + if ( count === 4 ) { + + const a = index + stride * 0; + const b = index + stride * 1; + const c = index + stride * 2; + const d = index + stride * 3; + + pushVector( a ); pushVector( b ); pushVector( d ); + pushVector( b ); pushVector( c ); pushVector( d ); + + } else if ( count === 3 ) { + + const a = index + stride * 0; + const b = index + stride * 1; + const c = index + stride * 2; + + pushVector( a ); pushVector( b ); pushVector( c ); + + } else if ( count > 4 ) { + + for ( let k = 1, kl = ( count - 2 ); k <= kl; k ++ ) { + + const a = index + stride * 0; + const b = index + stride * k; + const c = index + stride * ( k + 1 ); + + pushVector( a ); pushVector( b ); pushVector( c ); + + } + + } + + index += stride * count; + + } + + } else { + + for ( let i = 0, l = indices.length; i < l; i += stride ) { + + pushVector( i ); + + } + + } + + } + + function getGeometry( id ) { + + return getBuild( library.geometries[ id ], buildGeometry ); + + } + + // kinematics + + function parseKinematicsModel( xml ) { + + const data = { + name: xml.getAttribute( 'name' ) || '', + joints: {}, + links: [] + }; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'technique_common': + parseKinematicsTechniqueCommon( child, data ); + break; + + } + + } + + library.kinematicsModels[ xml.getAttribute( 'id' ) ] = data; + + } + + function buildKinematicsModel( data ) { + + if ( data.build !== undefined ) return data.build; + + return data; + + } + + function getKinematicsModel( id ) { + + return getBuild( library.kinematicsModels[ id ], buildKinematicsModel ); + + } + + function parseKinematicsTechniqueCommon( xml, data ) { + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'joint': + data.joints[ child.getAttribute( 'sid' ) ] = parseKinematicsJoint( child ); + break; + + case 'link': + data.links.push( parseKinematicsLink( child ) ); + break; + + } + + } + + } + + function parseKinematicsJoint( xml ) { + + let data; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'prismatic': + case 'revolute': + data = parseKinematicsJointParameter( child ); + break; + + } + + } + + return data; + + } + + function parseKinematicsJointParameter( xml ) { + + const data = { + sid: xml.getAttribute( 'sid' ), + name: xml.getAttribute( 'name' ) || '', + axis: new Vector3(), + limits: { + min: 0, + max: 0 + }, + type: xml.nodeName, + static: false, + zeroPosition: 0, + middlePosition: 0 + }; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'axis': + const array = parseFloats( child.textContent ); + data.axis.fromArray( array ); + break; + case 'limits': + const max = child.getElementsByTagName( 'max' )[ 0 ]; + const min = child.getElementsByTagName( 'min' )[ 0 ]; + + data.limits.max = parseFloat( max.textContent ); + data.limits.min = parseFloat( min.textContent ); + break; + + } + + } + + // if min is equal to or greater than max, consider the joint static + + if ( data.limits.min >= data.limits.max ) { + + data.static = true; + + } + + // calculate middle position + + data.middlePosition = ( data.limits.min + data.limits.max ) / 2.0; + + return data; + + } + + function parseKinematicsLink( xml ) { + + const data = { + sid: xml.getAttribute( 'sid' ), + name: xml.getAttribute( 'name' ) || '', + attachments: [], + transforms: [] + }; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'attachment_full': + data.attachments.push( parseKinematicsAttachment( child ) ); + break; + + case 'matrix': + case 'translate': + case 'rotate': + data.transforms.push( parseKinematicsTransform( child ) ); + break; + + } + + } + + return data; + + } + + function parseKinematicsAttachment( xml ) { + + const data = { + joint: xml.getAttribute( 'joint' ).split( '/' ).pop(), + transforms: [], + links: [] + }; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'link': + data.links.push( parseKinematicsLink( child ) ); + break; + + case 'matrix': + case 'translate': + case 'rotate': + data.transforms.push( parseKinematicsTransform( child ) ); + break; + + } + + } + + return data; + + } + + function parseKinematicsTransform( xml ) { + + const data = { + type: xml.nodeName + }; + + const array = parseFloats( xml.textContent ); + + switch ( data.type ) { + + case 'matrix': + data.obj = new Matrix4(); + data.obj.fromArray( array ).transpose(); + break; + + case 'translate': + data.obj = new Vector3(); + data.obj.fromArray( array ); + break; + + case 'rotate': + data.obj = new Vector3(); + data.obj.fromArray( array ); + data.angle = MathUtils.degToRad( array[ 3 ] ); + break; + + } + + return data; + + } + + // physics + + function parsePhysicsModel( xml ) { + + const data = { + name: xml.getAttribute( 'name' ) || '', + rigidBodies: {} + }; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'rigid_body': + data.rigidBodies[ child.getAttribute( 'name' ) ] = {}; + parsePhysicsRigidBody( child, data.rigidBodies[ child.getAttribute( 'name' ) ] ); + break; + + } + + } + + library.physicsModels[ xml.getAttribute( 'id' ) ] = data; + + } + + function parsePhysicsRigidBody( xml, data ) { + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'technique_common': + parsePhysicsTechniqueCommon( child, data ); + break; + + } + + } + + } + + function parsePhysicsTechniqueCommon( xml, data ) { + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'inertia': + data.inertia = parseFloats( child.textContent ); + break; + + case 'mass': + data.mass = parseFloats( child.textContent )[ 0 ]; + break; + + } + + } + + } + + // scene + + function parseKinematicsScene( xml ) { + + const data = { + bindJointAxis: [] + }; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'bind_joint_axis': + data.bindJointAxis.push( parseKinematicsBindJointAxis( child ) ); + break; + + } + + } + + library.kinematicsScenes[ parseId( xml.getAttribute( 'url' ) ) ] = data; + + } + + function parseKinematicsBindJointAxis( xml ) { + + const data = { + target: xml.getAttribute( 'target' ).split( '/' ).pop() + }; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + switch ( child.nodeName ) { + + case 'axis': + const param = child.getElementsByTagName( 'param' )[ 0 ]; + data.axis = param.textContent; + const tmpJointIndex = data.axis.split( 'inst_' ).pop().split( 'axis' )[ 0 ]; + data.jointIndex = tmpJointIndex.substring( 0, tmpJointIndex.length - 1 ); + break; + + } + + } + + return data; + + } + + function buildKinematicsScene( data ) { + + if ( data.build !== undefined ) return data.build; + + return data; + + } + + function getKinematicsScene( id ) { + + return getBuild( library.kinematicsScenes[ id ], buildKinematicsScene ); + + } + + function setupKinematics() { + + const kinematicsModelId = Object.keys( library.kinematicsModels )[ 0 ]; + const kinematicsSceneId = Object.keys( library.kinematicsScenes )[ 0 ]; + const visualSceneId = Object.keys( library.visualScenes )[ 0 ]; + + if ( kinematicsModelId === undefined || kinematicsSceneId === undefined ) return; + + const kinematicsModel = getKinematicsModel( kinematicsModelId ); + const kinematicsScene = getKinematicsScene( kinematicsSceneId ); + const visualScene = getVisualScene( visualSceneId ); + + const bindJointAxis = kinematicsScene.bindJointAxis; + const jointMap = {}; + + for ( let i = 0, l = bindJointAxis.length; i < l; i ++ ) { + + const axis = bindJointAxis[ i ]; + + // the result of the following query is an element of type 'translate', 'rotate','scale' or 'matrix' + + const targetElement = collada.querySelector( '[sid="' + axis.target + '"]' ); + + if ( targetElement ) { + + // get the parent of the transform element + + const parentVisualElement = targetElement.parentElement; + + // connect the joint of the kinematics model with the element in the visual scene + + connect( axis.jointIndex, parentVisualElement ); + + } + + } + + function connect( jointIndex, visualElement ) { + + const visualElementName = visualElement.getAttribute( 'name' ); + const joint = kinematicsModel.joints[ jointIndex ]; + + visualScene.traverse( function ( object ) { + + if ( object.name === visualElementName ) { + + jointMap[ jointIndex ] = { + object: object, + transforms: buildTransformList( visualElement ), + joint: joint, + position: joint.zeroPosition + }; + + } + + } ); + + } + + const m0 = new Matrix4(); + + kinematics = { + + joints: kinematicsModel && kinematicsModel.joints, + + getJointValue: function ( jointIndex ) { + + const jointData = jointMap[ jointIndex ]; + + if ( jointData ) { + + return jointData.position; + + } else { + + console.warn( 'THREE.ColladaLoader: Joint ' + jointIndex + ' doesn\'t exist.' ); + + } + + }, + + setJointValue: function ( jointIndex, value ) { + + const jointData = jointMap[ jointIndex ]; + + if ( jointData ) { + + const joint = jointData.joint; + + if ( value > joint.limits.max || value < joint.limits.min ) { + + console.warn( 'THREE.ColladaLoader: Joint ' + jointIndex + ' value ' + value + ' outside of limits (min: ' + joint.limits.min + ', max: ' + joint.limits.max + ').' ); + + } else if ( joint.static ) { + + console.warn( 'THREE.ColladaLoader: Joint ' + jointIndex + ' is static.' ); + + } else { + + const object = jointData.object; + const axis = joint.axis; + const transforms = jointData.transforms; + + matrix.identity(); + + // each update, we have to apply all transforms in the correct order + + for ( let i = 0; i < transforms.length; i ++ ) { + + const transform = transforms[ i ]; + + // if there is a connection of the transform node with a joint, apply the joint value + + if ( transform.sid && transform.sid.indexOf( jointIndex ) !== - 1 ) { + + switch ( joint.type ) { + + case 'revolute': + matrix.multiply( m0.makeRotationAxis( axis, MathUtils.degToRad( value ) ) ); + break; + + case 'prismatic': + matrix.multiply( m0.makeTranslation( axis.x * value, axis.y * value, axis.z * value ) ); + break; + + default: + console.warn( 'THREE.ColladaLoader: Unknown joint type: ' + joint.type ); + break; + + } + + } else { + + switch ( transform.type ) { + + case 'matrix': + matrix.multiply( transform.obj ); + break; + + case 'translate': + matrix.multiply( m0.makeTranslation( transform.obj.x, transform.obj.y, transform.obj.z ) ); + break; + + case 'scale': + matrix.scale( transform.obj ); + break; + + case 'rotate': + matrix.multiply( m0.makeRotationAxis( transform.obj, transform.angle ) ); + break; + + } + + } + + } + + object.matrix.copy( matrix ); + object.matrix.decompose( object.position, object.quaternion, object.scale ); + + jointMap[ jointIndex ].position = value; + + } + + } else { + + console.log( 'THREE.ColladaLoader: ' + jointIndex + ' does not exist.' ); + + } + + } + + }; + + } + + function buildTransformList( node ) { + + const transforms = []; + + const xml = collada.querySelector( '[id="' + node.id + '"]' ); + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + let array, vector; + + switch ( child.nodeName ) { + + case 'matrix': + array = parseFloats( child.textContent ); + const matrix = new Matrix4().fromArray( array ).transpose(); + transforms.push( { + sid: child.getAttribute( 'sid' ), + type: child.nodeName, + obj: matrix + } ); + break; + + case 'translate': + case 'scale': + array = parseFloats( child.textContent ); + vector = new Vector3().fromArray( array ); + transforms.push( { + sid: child.getAttribute( 'sid' ), + type: child.nodeName, + obj: vector + } ); + break; + + case 'rotate': + array = parseFloats( child.textContent ); + vector = new Vector3().fromArray( array ); + const angle = MathUtils.degToRad( array[ 3 ] ); + transforms.push( { + sid: child.getAttribute( 'sid' ), + type: child.nodeName, + obj: vector, + angle: angle + } ); + break; + + } + + } + + return transforms; + + } + + // nodes + + function prepareNodes( xml ) { + + const elements = xml.getElementsByTagName( 'node' ); + + // ensure all node elements have id attributes + + for ( let i = 0; i < elements.length; i ++ ) { + + const element = elements[ i ]; + + if ( element.hasAttribute( 'id' ) === false ) { + + element.setAttribute( 'id', generateId() ); + + } + + } + + } + + const matrix = new Matrix4(); + const vector = new Vector3(); + + function parseNode( xml ) { + + const data = { + name: xml.getAttribute( 'name' ) || '', + type: xml.getAttribute( 'type' ), + id: xml.getAttribute( 'id' ), + sid: xml.getAttribute( 'sid' ), + matrix: new Matrix4(), + nodes: [], + instanceCameras: [], + instanceControllers: [], + instanceLights: [], + instanceGeometries: [], + instanceNodes: [], + transforms: {} + }; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + if ( child.nodeType !== 1 ) continue; + + let array; + + switch ( child.nodeName ) { + + case 'node': + data.nodes.push( child.getAttribute( 'id' ) ); + parseNode( child ); + break; + + case 'instance_camera': + data.instanceCameras.push( parseId( child.getAttribute( 'url' ) ) ); + break; + + case 'instance_controller': + data.instanceControllers.push( parseNodeInstance( child ) ); + break; + + case 'instance_light': + data.instanceLights.push( parseId( child.getAttribute( 'url' ) ) ); + break; + + case 'instance_geometry': + data.instanceGeometries.push( parseNodeInstance( child ) ); + break; + + case 'instance_node': + data.instanceNodes.push( parseId( child.getAttribute( 'url' ) ) ); + break; + + case 'matrix': + array = parseFloats( child.textContent ); + data.matrix.multiply( matrix.fromArray( array ).transpose() ); + data.transforms[ child.getAttribute( 'sid' ) ] = child.nodeName; + break; + + case 'translate': + array = parseFloats( child.textContent ); + vector.fromArray( array ); + data.matrix.multiply( matrix.makeTranslation( vector.x, vector.y, vector.z ) ); + data.transforms[ child.getAttribute( 'sid' ) ] = child.nodeName; + break; + + case 'rotate': + array = parseFloats( child.textContent ); + const angle = MathUtils.degToRad( array[ 3 ] ); + data.matrix.multiply( matrix.makeRotationAxis( vector.fromArray( array ), angle ) ); + data.transforms[ child.getAttribute( 'sid' ) ] = child.nodeName; + break; + + case 'scale': + array = parseFloats( child.textContent ); + data.matrix.scale( vector.fromArray( array ) ); + data.transforms[ child.getAttribute( 'sid' ) ] = child.nodeName; + break; + + case 'extra': + break; + + default: + console.log( child ); + + } + + } + + if ( hasNode( data.id ) ) { + + console.warn( 'THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.', data.id ); + + } else { + + library.nodes[ data.id ] = data; + + } + + return data; + + } + + function parseNodeInstance( xml ) { + + const data = { + id: parseId( xml.getAttribute( 'url' ) ), + materials: {}, + skeletons: [] + }; + + for ( let i = 0; i < xml.childNodes.length; i ++ ) { + + const child = xml.childNodes[ i ]; + + switch ( child.nodeName ) { + + case 'bind_material': + const instances = child.getElementsByTagName( 'instance_material' ); + + for ( let j = 0; j < instances.length; j ++ ) { + + const instance = instances[ j ]; + const symbol = instance.getAttribute( 'symbol' ); + const target = instance.getAttribute( 'target' ); + + data.materials[ symbol ] = parseId( target ); + + } + + break; + + case 'skeleton': + data.skeletons.push( parseId( child.textContent ) ); + break; + + default: + break; + + } + + } + + return data; + + } + + function buildSkeleton( skeletons, joints ) { + + const boneData = []; + const sortedBoneData = []; + + let i, j, data; + + // a skeleton can have multiple root bones. collada expresses this + // situtation with multiple "skeleton" tags per controller instance + + for ( i = 0; i < skeletons.length; i ++ ) { + + const skeleton = skeletons[ i ]; + + let root; + + if ( hasNode( skeleton ) ) { + + root = getNode( skeleton ); + buildBoneHierarchy( root, joints, boneData ); + + } else if ( hasVisualScene( skeleton ) ) { + + // handle case where the skeleton refers to the visual scene (#13335) + + const visualScene = library.visualScenes[ skeleton ]; + const children = visualScene.children; + + for ( let j = 0; j < children.length; j ++ ) { + + const child = children[ j ]; + + if ( child.type === 'JOINT' ) { + + const root = getNode( child.id ); + buildBoneHierarchy( root, joints, boneData ); + + } + + } + + } else { + + console.error( 'THREE.ColladaLoader: Unable to find root bone of skeleton with ID:', skeleton ); + + } + + } + + // sort bone data (the order is defined in the corresponding controller) + + for ( i = 0; i < joints.length; i ++ ) { + + for ( j = 0; j < boneData.length; j ++ ) { + + data = boneData[ j ]; + + if ( data.bone.name === joints[ i ].name ) { + + sortedBoneData[ i ] = data; + data.processed = true; + break; + + } + + } + + } + + // add unprocessed bone data at the end of the list + + for ( i = 0; i < boneData.length; i ++ ) { + + data = boneData[ i ]; + + if ( data.processed === false ) { + + sortedBoneData.push( data ); + data.processed = true; + + } + + } + + // setup arrays for skeleton creation + + const bones = []; + const boneInverses = []; + + for ( i = 0; i < sortedBoneData.length; i ++ ) { + + data = sortedBoneData[ i ]; + + bones.push( data.bone ); + boneInverses.push( data.boneInverse ); + + } + + return new Skeleton( bones, boneInverses ); + + } + + function buildBoneHierarchy( root, joints, boneData ) { + + // setup bone data from visual scene + + root.traverse( function ( object ) { + + if ( object.isBone === true ) { + + let boneInverse; + + // retrieve the boneInverse from the controller data + + for ( let i = 0; i < joints.length; i ++ ) { + + const joint = joints[ i ]; + + if ( joint.name === object.name ) { + + boneInverse = joint.boneInverse; + break; + + } + + } + + if ( boneInverse === undefined ) { + + // Unfortunately, there can be joints in the visual scene that are not part of the + // corresponding controller. In this case, we have to create a dummy boneInverse matrix + // for the respective bone. This bone won't affect any vertices, because there are no skin indices + // and weights defined for it. But we still have to add the bone to the sorted bone list in order to + // ensure a correct animation of the model. + + boneInverse = new Matrix4(); + + } + + boneData.push( { bone: object, boneInverse: boneInverse, processed: false } ); + + } + + } ); + + } + + function buildNode( data ) { + + const objects = []; + + const matrix = data.matrix; + const nodes = data.nodes; + const type = data.type; + const instanceCameras = data.instanceCameras; + const instanceControllers = data.instanceControllers; + const instanceLights = data.instanceLights; + const instanceGeometries = data.instanceGeometries; + const instanceNodes = data.instanceNodes; + + // nodes + + for ( let i = 0, l = nodes.length; i < l; i ++ ) { + + objects.push( getNode( nodes[ i ] ) ); + + } + + // instance cameras + + for ( let i = 0, l = instanceCameras.length; i < l; i ++ ) { + + const instanceCamera = getCamera( instanceCameras[ i ] ); + + if ( instanceCamera !== null ) { + + objects.push( instanceCamera.clone() ); + + } + + } + + // instance controllers + + for ( let i = 0, l = instanceControllers.length; i < l; i ++ ) { + + const instance = instanceControllers[ i ]; + const controller = getController( instance.id ); + const geometries = getGeometry( controller.id ); + const newObjects = buildObjects( geometries, instance.materials ); + + const skeletons = instance.skeletons; + const joints = controller.skin.joints; + + const skeleton = buildSkeleton( skeletons, joints ); + + for ( let j = 0, jl = newObjects.length; j < jl; j ++ ) { + + const object = newObjects[ j ]; + + if ( object.isSkinnedMesh ) { + + object.bind( skeleton, controller.skin.bindMatrix ); + object.normalizeSkinWeights(); + + } + + objects.push( object ); + + } + + } + + // instance lights + + for ( let i = 0, l = instanceLights.length; i < l; i ++ ) { + + const instanceLight = getLight( instanceLights[ i ] ); + + if ( instanceLight !== null ) { + + objects.push( instanceLight.clone() ); + + } + + } + + // instance geometries + + for ( let i = 0, l = instanceGeometries.length; i < l; i ++ ) { + + const instance = instanceGeometries[ i ]; + + // a single geometry instance in collada can lead to multiple object3Ds. + // this is the case when primitives are combined like triangles and lines + + const geometries = getGeometry( instance.id ); + const newObjects = buildObjects( geometries, instance.materials ); + + for ( let j = 0, jl = newObjects.length; j < jl; j ++ ) { + + objects.push( newObjects[ j ] ); + + } + + } + + // instance nodes + + for ( let i = 0, l = instanceNodes.length; i < l; i ++ ) { + + objects.push( getNode( instanceNodes[ i ] ).clone() ); + + } + + let object; + + if ( nodes.length === 0 && objects.length === 1 ) { + + object = objects[ 0 ]; + + } else { + + object = ( type === 'JOINT' ) ? new Bone() : new Group(); + + for ( let i = 0; i < objects.length; i ++ ) { + + object.add( objects[ i ] ); + + } + + } + + object.name = ( type === 'JOINT' ) ? data.sid : data.name; + object.matrix.copy( matrix ); + object.matrix.decompose( object.position, object.quaternion, object.scale ); + + return object; + + } + + const fallbackMaterial = new MeshBasicMaterial( { + name: Loader.DEFAULT_MATERIAL_NAME, + color: 0xff00ff + } ); + + function resolveMaterialBinding( keys, instanceMaterials ) { + + const materials = []; + + for ( let i = 0, l = keys.length; i < l; i ++ ) { + + const id = instanceMaterials[ keys[ i ] ]; + + if ( id === undefined ) { + + console.warn( 'THREE.ColladaLoader: Material with key %s not found. Apply fallback material.', keys[ i ] ); + materials.push( fallbackMaterial ); + + } else { + + materials.push( getMaterial( id ) ); + + } + + } + + return materials; + + } + + function buildObjects( geometries, instanceMaterials ) { + + const objects = []; + + for ( const type in geometries ) { + + const geometry = geometries[ type ]; + + const materials = resolveMaterialBinding( geometry.materialKeys, instanceMaterials ); + + // handle case if no materials are defined + + if ( materials.length === 0 ) { + + if ( type === 'lines' || type === 'linestrips' ) { + + materials.push( new LineBasicMaterial() ); + + } else { + + materials.push( new MeshPhongMaterial() ); + + } + + } + + // Collada allows to use phong and lambert materials with lines. Replacing these cases with LineBasicMaterial. + + if ( type === 'lines' || type === 'linestrips' ) { + + for ( let i = 0, l = materials.length; i < l; i ++ ) { + + const material = materials[ i ]; + + if ( material.isMeshPhongMaterial === true || material.isMeshLambertMaterial === true ) { + + const lineMaterial = new LineBasicMaterial(); + + // copy compatible properties + + lineMaterial.color.copy( material.color ); + lineMaterial.opacity = material.opacity; + lineMaterial.transparent = material.transparent; + + // replace material + + materials[ i ] = lineMaterial; + + } + + } + + } + + // regard skinning + + const skinning = ( geometry.data.attributes.skinIndex !== undefined ); + + // choose between a single or multi materials (material array) + + const material = ( materials.length === 1 ) ? materials[ 0 ] : materials; + + // now create a specific 3D object + + let object; + + switch ( type ) { + + case 'lines': + object = new LineSegments( geometry.data, material ); + break; + + case 'linestrips': + object = new Line( geometry.data, material ); + break; + + case 'triangles': + case 'polylist': + if ( skinning ) { + + object = new SkinnedMesh( geometry.data, material ); + + } else { + + object = new Mesh( geometry.data, material ); + + } + + break; + + } + + objects.push( object ); + + } + + return objects; + + } + + function hasNode( id ) { + + return library.nodes[ id ] !== undefined; + + } + + function getNode( id ) { + + return getBuild( library.nodes[ id ], buildNode ); + + } + + // visual scenes + + function parseVisualScene( xml ) { + + const data = { + name: xml.getAttribute( 'name' ), + children: [] + }; + + prepareNodes( xml ); + + const elements = getElementsByTagName( xml, 'node' ); + + for ( let i = 0; i < elements.length; i ++ ) { + + data.children.push( parseNode( elements[ i ] ) ); + + } + + library.visualScenes[ xml.getAttribute( 'id' ) ] = data; + + } + + function buildVisualScene( data ) { + + const group = new Group(); + group.name = data.name; + + const children = data.children; + + for ( let i = 0; i < children.length; i ++ ) { + + const child = children[ i ]; + + group.add( getNode( child.id ) ); + + } + + return group; + + } + + function hasVisualScene( id ) { + + return library.visualScenes[ id ] !== undefined; + + } + + function getVisualScene( id ) { + + return getBuild( library.visualScenes[ id ], buildVisualScene ); + + } + + // scenes + + function parseScene( xml ) { + + const instance = getElementsByTagName( xml, 'instance_visual_scene' )[ 0 ]; + return getVisualScene( parseId( instance.getAttribute( 'url' ) ) ); + + } + + function setupAnimations() { + + const clips = library.clips; + + if ( isEmpty( clips ) === true ) { + + if ( isEmpty( library.animations ) === false ) { + + // if there are animations but no clips, we create a default clip for playback + + const tracks = []; + + for ( const id in library.animations ) { + + const animationTracks = getAnimation( id ); + + for ( let i = 0, l = animationTracks.length; i < l; i ++ ) { + + tracks.push( animationTracks[ i ] ); + + } + + } + + animations.push( new AnimationClip( 'default', - 1, tracks ) ); + + } + + } else { + + for ( const id in clips ) { + + animations.push( getAnimationClip( id ) ); + + } + + } + + } + + // convert the parser error element into text with each child elements text + // separated by new lines. + + function parserErrorToText( parserError ) { + + let result = ''; + const stack = [ parserError ]; + + while ( stack.length ) { + + const node = stack.shift(); + + if ( node.nodeType === Node.TEXT_NODE ) { + + result += node.textContent; + + } else { + + result += '\n'; + stack.push.apply( stack, node.childNodes ); + + } + + } + + return result.trim(); + + } + + if ( text.length === 0 ) { + + return { scene: new Scene() }; + + } + + const xml = new DOMParser().parseFromString( text, 'application/xml' ); + + const collada = getElementsByTagName( xml, 'COLLADA' )[ 0 ]; + + const parserError = xml.getElementsByTagName( 'parsererror' )[ 0 ]; + if ( parserError !== undefined ) { + + // Chrome will return parser error with a div in it + + const errorElement = getElementsByTagName( parserError, 'div' )[ 0 ]; + let errorText; + + if ( errorElement ) { + + errorText = errorElement.textContent; + + } else { + + errorText = parserErrorToText( parserError ); + + } + + console.error( 'THREE.ColladaLoader: Failed to parse collada file.\n', errorText ); + + return null; + + } + + // metadata + + const version = collada.getAttribute( 'version' ); + console.debug( 'THREE.ColladaLoader: File version', version ); + + const asset = parseAsset( getElementsByTagName( collada, 'asset' )[ 0 ] ); + const textureLoader = new TextureLoader( this.manager ); + textureLoader.setPath( this.resourcePath || path ).setCrossOrigin( this.crossOrigin ); + + let tgaLoader; + + if ( TGALoader ) { + + tgaLoader = new TGALoader( this.manager ); + tgaLoader.setPath( this.resourcePath || path ); + + } + + // + + const tempColor = new Color(); + const animations = []; + let kinematics = {}; + let count = 0; + + // + + const library = { + animations: {}, + clips: {}, + controllers: {}, + images: {}, + effects: {}, + materials: {}, + cameras: {}, + lights: {}, + geometries: {}, + nodes: {}, + visualScenes: {}, + kinematicsModels: {}, + physicsModels: {}, + kinematicsScenes: {} + }; + + parseLibrary( collada, 'library_animations', 'animation', parseAnimation ); + parseLibrary( collada, 'library_animation_clips', 'animation_clip', parseAnimationClip ); + parseLibrary( collada, 'library_controllers', 'controller', parseController ); + parseLibrary( collada, 'library_images', 'image', parseImage ); + parseLibrary( collada, 'library_effects', 'effect', parseEffect ); + parseLibrary( collada, 'library_materials', 'material', parseMaterial ); + parseLibrary( collada, 'library_cameras', 'camera', parseCamera ); + parseLibrary( collada, 'library_lights', 'light', parseLight ); + parseLibrary( collada, 'library_geometries', 'geometry', parseGeometry ); + parseLibrary( collada, 'library_nodes', 'node', parseNode ); + parseLibrary( collada, 'library_visual_scenes', 'visual_scene', parseVisualScene ); + parseLibrary( collada, 'library_kinematics_models', 'kinematics_model', parseKinematicsModel ); + parseLibrary( collada, 'library_physics_models', 'physics_model', parsePhysicsModel ); + parseLibrary( collada, 'scene', 'instance_kinematics_scene', parseKinematicsScene ); + + buildLibrary( library.animations, buildAnimation ); + buildLibrary( library.clips, buildAnimationClip ); + buildLibrary( library.controllers, buildController ); + buildLibrary( library.images, buildImage ); + buildLibrary( library.effects, buildEffect ); + buildLibrary( library.materials, buildMaterial ); + buildLibrary( library.cameras, buildCamera ); + buildLibrary( library.lights, buildLight ); + buildLibrary( library.geometries, buildGeometry ); + buildLibrary( library.visualScenes, buildVisualScene ); + + setupAnimations(); + setupKinematics(); + + const scene = parseScene( getElementsByTagName( collada, 'scene' )[ 0 ] ); + scene.animations = animations; + + if ( asset.upAxis === 'Z_UP' ) { + + console.warn( 'THREE.ColladaLoader: You are loading an asset with a Z-UP coordinate system. The loader just rotates the asset to transform it into Y-UP. The vertex data are not converted, see #24289.' ); + scene.rotation.set( - Math.PI / 2, 0, 0 ); + + } + + scene.scale.multiplyScalar( asset.unit ); + + return { + get animations() { + + console.warn( 'THREE.ColladaLoader: Please access animations over scene.animations now.' ); + return animations; + + }, + kinematics: kinematics, + library: library, + scene: scene + }; + + } + +} + +export { ColladaLoader }; diff --git a/node_modules/three/examples/jsm/loaders/DDSLoader.js b/node_modules/three/examples/jsm/loaders/DDSLoader.js new file mode 100644 index 0000000..f81537a --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/DDSLoader.js @@ -0,0 +1,318 @@ +import { + CompressedTextureLoader, + RGBAFormat, + RGBA_S3TC_DXT3_Format, + RGBA_S3TC_DXT5_Format, + RGB_ETC1_Format, + RGB_S3TC_DXT1_Format, + RGB_BPTC_SIGNED_Format, + RGB_BPTC_UNSIGNED_Format +} from 'three'; + +class DDSLoader extends CompressedTextureLoader { + + constructor( manager ) { + + super( manager ); + + } + + parse( buffer, loadMipmaps ) { + + const dds = { mipmaps: [], width: 0, height: 0, format: null, mipmapCount: 1 }; + + // Adapted from @toji's DDS utils + // https://github.com/toji/webgl-texture-utils/blob/master/texture-util/dds.js + + // All values and structures referenced from: + // http://msdn.microsoft.com/en-us/library/bb943991.aspx/ + + const DDS_MAGIC = 0x20534444; + + // const DDSD_CAPS = 0x1; + // const DDSD_HEIGHT = 0x2; + // const DDSD_WIDTH = 0x4; + // const DDSD_PITCH = 0x8; + // const DDSD_PIXELFORMAT = 0x1000; + const DDSD_MIPMAPCOUNT = 0x20000; + // const DDSD_LINEARSIZE = 0x80000; + // const DDSD_DEPTH = 0x800000; + + // const DDSCAPS_COMPLEX = 0x8; + // const DDSCAPS_MIPMAP = 0x400000; + // const DDSCAPS_TEXTURE = 0x1000; + + const DDSCAPS2_CUBEMAP = 0x200; + const DDSCAPS2_CUBEMAP_POSITIVEX = 0x400; + const DDSCAPS2_CUBEMAP_NEGATIVEX = 0x800; + const DDSCAPS2_CUBEMAP_POSITIVEY = 0x1000; + const DDSCAPS2_CUBEMAP_NEGATIVEY = 0x2000; + const DDSCAPS2_CUBEMAP_POSITIVEZ = 0x4000; + const DDSCAPS2_CUBEMAP_NEGATIVEZ = 0x8000; + // const DDSCAPS2_VOLUME = 0x200000; + + // const DDPF_ALPHAPIXELS = 0x1; + // const DDPF_ALPHA = 0x2; + // const DDPF_FOURCC = 0x4; + // const DDPF_RGB = 0x40; + // const DDPF_YUV = 0x200; + // const DDPF_LUMINANCE = 0x20000; + + const DXGI_FORMAT_BC6H_UF16 = 95; + const DXGI_FORMAT_BC6H_SF16 = 96; + + function fourCCToInt32( value ) { + + return value.charCodeAt( 0 ) + + ( value.charCodeAt( 1 ) << 8 ) + + ( value.charCodeAt( 2 ) << 16 ) + + ( value.charCodeAt( 3 ) << 24 ); + + } + + function int32ToFourCC( value ) { + + return String.fromCharCode( + value & 0xff, + ( value >> 8 ) & 0xff, + ( value >> 16 ) & 0xff, + ( value >> 24 ) & 0xff + ); + + } + + function loadARGBMip( buffer, dataOffset, width, height ) { + + const dataLength = width * height * 4; + const srcBuffer = new Uint8Array( buffer, dataOffset, dataLength ); + const byteArray = new Uint8Array( dataLength ); + let dst = 0; + let src = 0; + for ( let y = 0; y < height; y ++ ) { + + for ( let x = 0; x < width; x ++ ) { + + const b = srcBuffer[ src ]; src ++; + const g = srcBuffer[ src ]; src ++; + const r = srcBuffer[ src ]; src ++; + const a = srcBuffer[ src ]; src ++; + byteArray[ dst ] = r; dst ++; //r + byteArray[ dst ] = g; dst ++; //g + byteArray[ dst ] = b; dst ++; //b + byteArray[ dst ] = a; dst ++; //a + + } + + } + + return byteArray; + + } + + const FOURCC_DXT1 = fourCCToInt32( 'DXT1' ); + const FOURCC_DXT3 = fourCCToInt32( 'DXT3' ); + const FOURCC_DXT5 = fourCCToInt32( 'DXT5' ); + const FOURCC_ETC1 = fourCCToInt32( 'ETC1' ); + const FOURCC_DX10 = fourCCToInt32( 'DX10' ); + + const headerLengthInt = 31; // The header length in 32 bit ints + const extendedHeaderLengthInt = 5; // The extended header length in 32 bit ints + + // Offsets into the header array + + const off_magic = 0; + + const off_size = 1; + const off_flags = 2; + const off_height = 3; + const off_width = 4; + + const off_mipmapCount = 7; + + // const off_pfFlags = 20; + const off_pfFourCC = 21; + const off_RGBBitCount = 22; + const off_RBitMask = 23; + const off_GBitMask = 24; + const off_BBitMask = 25; + const off_ABitMask = 26; + + // const off_caps = 27; + const off_caps2 = 28; + // const off_caps3 = 29; + // const off_caps4 = 30; + + // If fourCC = DX10, the extended header starts after 32 + const off_dxgiFormat = 0; + + // Parse header + + const header = new Int32Array( buffer, 0, headerLengthInt ); + + if ( header[ off_magic ] !== DDS_MAGIC ) { + + console.error( 'THREE.DDSLoader.parse: Invalid magic number in DDS header.' ); + return dds; + + } + + let blockBytes; + + const fourCC = header[ off_pfFourCC ]; + + let isRGBAUncompressed = false; + + let dataOffset = header[ off_size ] + 4; + + switch ( fourCC ) { + + case FOURCC_DXT1: + + blockBytes = 8; + dds.format = RGB_S3TC_DXT1_Format; + break; + + case FOURCC_DXT3: + + blockBytes = 16; + dds.format = RGBA_S3TC_DXT3_Format; + break; + + case FOURCC_DXT5: + + blockBytes = 16; + dds.format = RGBA_S3TC_DXT5_Format; + break; + + case FOURCC_ETC1: + + blockBytes = 8; + dds.format = RGB_ETC1_Format; + break; + + case FOURCC_DX10: + + dataOffset += extendedHeaderLengthInt * 4; + const extendedHeader = new Int32Array( buffer, ( headerLengthInt + 1 ) * 4, extendedHeaderLengthInt ); + const dxgiFormat = extendedHeader[ off_dxgiFormat ]; + switch ( dxgiFormat ) { + + case DXGI_FORMAT_BC6H_SF16: { + + blockBytes = 16; + dds.format = RGB_BPTC_SIGNED_Format; + break; + + } + + case DXGI_FORMAT_BC6H_UF16: { + + blockBytes = 16; + dds.format = RGB_BPTC_UNSIGNED_Format; + break; + + } + + default: { + + console.error( 'THREE.DDSLoader.parse: Unsupported DXGI_FORMAT code ', dxgiFormat ); + return dds; + + } + + } + + break; + + default: + + if ( header[ off_RGBBitCount ] === 32 + && header[ off_RBitMask ] & 0xff0000 + && header[ off_GBitMask ] & 0xff00 + && header[ off_BBitMask ] & 0xff + && header[ off_ABitMask ] & 0xff000000 ) { + + isRGBAUncompressed = true; + blockBytes = 64; + dds.format = RGBAFormat; + + } else { + + console.error( 'THREE.DDSLoader.parse: Unsupported FourCC code ', int32ToFourCC( fourCC ) ); + return dds; + + } + + } + + dds.mipmapCount = 1; + + if ( header[ off_flags ] & DDSD_MIPMAPCOUNT && loadMipmaps !== false ) { + + dds.mipmapCount = Math.max( 1, header[ off_mipmapCount ] ); + + } + + const caps2 = header[ off_caps2 ]; + dds.isCubemap = caps2 & DDSCAPS2_CUBEMAP ? true : false; + if ( dds.isCubemap && ( + ! ( caps2 & DDSCAPS2_CUBEMAP_POSITIVEX ) || + ! ( caps2 & DDSCAPS2_CUBEMAP_NEGATIVEX ) || + ! ( caps2 & DDSCAPS2_CUBEMAP_POSITIVEY ) || + ! ( caps2 & DDSCAPS2_CUBEMAP_NEGATIVEY ) || + ! ( caps2 & DDSCAPS2_CUBEMAP_POSITIVEZ ) || + ! ( caps2 & DDSCAPS2_CUBEMAP_NEGATIVEZ ) + ) ) { + + console.error( 'THREE.DDSLoader.parse: Incomplete cubemap faces' ); + return dds; + + } + + dds.width = header[ off_width ]; + dds.height = header[ off_height ]; + + // Extract mipmaps buffers + + const faces = dds.isCubemap ? 6 : 1; + + for ( let face = 0; face < faces; face ++ ) { + + let width = dds.width; + let height = dds.height; + + for ( let i = 0; i < dds.mipmapCount; i ++ ) { + + let byteArray, dataLength; + + if ( isRGBAUncompressed ) { + + byteArray = loadARGBMip( buffer, dataOffset, width, height ); + dataLength = byteArray.length; + + } else { + + dataLength = Math.max( 4, width ) / 4 * Math.max( 4, height ) / 4 * blockBytes; + byteArray = new Uint8Array( buffer, dataOffset, dataLength ); + + } + + const mipmap = { 'data': byteArray, 'width': width, 'height': height }; + dds.mipmaps.push( mipmap ); + + dataOffset += dataLength; + + width = Math.max( width >> 1, 1 ); + height = Math.max( height >> 1, 1 ); + + } + + } + + return dds; + + } + +} + +export { DDSLoader }; diff --git a/node_modules/three/examples/jsm/loaders/DRACOLoader.js b/node_modules/three/examples/jsm/loaders/DRACOLoader.js new file mode 100644 index 0000000..b176ebf --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/DRACOLoader.js @@ -0,0 +1,613 @@ +import { + BufferAttribute, + BufferGeometry, + Color, + FileLoader, + Loader, + LinearSRGBColorSpace, + SRGBColorSpace +} from 'three'; + +const _taskCache = new WeakMap(); + +class DRACOLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.decoderPath = ''; + this.decoderConfig = {}; + this.decoderBinary = null; + this.decoderPending = null; + + this.workerLimit = 4; + this.workerPool = []; + this.workerNextTaskID = 1; + this.workerSourceURL = ''; + + this.defaultAttributeIDs = { + position: 'POSITION', + normal: 'NORMAL', + color: 'COLOR', + uv: 'TEX_COORD' + }; + this.defaultAttributeTypes = { + position: 'Float32Array', + normal: 'Float32Array', + color: 'Float32Array', + uv: 'Float32Array' + }; + + } + + setDecoderPath( path ) { + + this.decoderPath = path; + + return this; + + } + + setDecoderConfig( config ) { + + this.decoderConfig = config; + + return this; + + } + + setWorkerLimit( workerLimit ) { + + this.workerLimit = workerLimit; + + return this; + + } + + load( url, onLoad, onProgress, onError ) { + + const loader = new FileLoader( this.manager ); + + loader.setPath( this.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + + loader.load( url, ( buffer ) => { + + this.parse( buffer, onLoad, onError ); + + }, onProgress, onError ); + + } + + + parse( buffer, onLoad, onError = ()=>{} ) { + + this.decodeDracoFile( buffer, onLoad, null, null, SRGBColorSpace ).catch( onError ); + + } + + decodeDracoFile( buffer, callback, attributeIDs, attributeTypes, vertexColorSpace = LinearSRGBColorSpace, onError = () => {} ) { + + const taskConfig = { + attributeIDs: attributeIDs || this.defaultAttributeIDs, + attributeTypes: attributeTypes || this.defaultAttributeTypes, + useUniqueIDs: !! attributeIDs, + vertexColorSpace: vertexColorSpace, + }; + + return this.decodeGeometry( buffer, taskConfig ).then( callback ).catch( onError ); + + } + + decodeGeometry( buffer, taskConfig ) { + + const taskKey = JSON.stringify( taskConfig ); + + // Check for an existing task using this buffer. A transferred buffer cannot be transferred + // again from this thread. + if ( _taskCache.has( buffer ) ) { + + const cachedTask = _taskCache.get( buffer ); + + if ( cachedTask.key === taskKey ) { + + return cachedTask.promise; + + } else if ( buffer.byteLength === 0 ) { + + // Technically, it would be possible to wait for the previous task to complete, + // transfer the buffer back, and decode again with the second configuration. That + // is complex, and I don't know of any reason to decode a Draco buffer twice in + // different ways, so this is left unimplemented. + throw new Error( + + 'THREE.DRACOLoader: Unable to re-decode a buffer with different ' + + 'settings. Buffer has already been transferred.' + + ); + + } + + } + + // + + let worker; + const taskID = this.workerNextTaskID ++; + const taskCost = buffer.byteLength; + + // Obtain a worker and assign a task, and construct a geometry instance + // when the task completes. + const geometryPending = this._getWorker( taskID, taskCost ) + .then( ( _worker ) => { + + worker = _worker; + + return new Promise( ( resolve, reject ) => { + + worker._callbacks[ taskID ] = { resolve, reject }; + + worker.postMessage( { type: 'decode', id: taskID, taskConfig, buffer }, [ buffer ] ); + + // this.debug(); + + } ); + + } ) + .then( ( message ) => this._createGeometry( message.geometry ) ); + + // Remove task from the task list. + // Note: replaced '.finally()' with '.catch().then()' block - iOS 11 support (#19416) + geometryPending + .catch( () => true ) + .then( () => { + + if ( worker && taskID ) { + + this._releaseTask( worker, taskID ); + + // this.debug(); + + } + + } ); + + // Cache the task result. + _taskCache.set( buffer, { + + key: taskKey, + promise: geometryPending + + } ); + + return geometryPending; + + } + + _createGeometry( geometryData ) { + + const geometry = new BufferGeometry(); + + if ( geometryData.index ) { + + geometry.setIndex( new BufferAttribute( geometryData.index.array, 1 ) ); + + } + + for ( let i = 0; i < geometryData.attributes.length; i ++ ) { + + const result = geometryData.attributes[ i ]; + const name = result.name; + const array = result.array; + const itemSize = result.itemSize; + + const attribute = new BufferAttribute( array, itemSize ); + + if ( name === 'color' ) { + + this._assignVertexColorSpace( attribute, result.vertexColorSpace ); + + attribute.normalized = ( array instanceof Float32Array ) === false; + + } + + geometry.setAttribute( name, attribute ); + + } + + return geometry; + + } + + _assignVertexColorSpace( attribute, inputColorSpace ) { + + // While .drc files do not specify colorspace, the only 'official' tooling + // is PLY and OBJ converters, which use sRGB. We'll assume sRGB when a .drc + // file is passed into .load() or .parse(). GLTFLoader uses internal APIs + // to decode geometry, and vertex colors are already Linear-sRGB in there. + + if ( inputColorSpace !== SRGBColorSpace ) return; + + const _color = new Color(); + + for ( let i = 0, il = attribute.count; i < il; i ++ ) { + + _color.fromBufferAttribute( attribute, i ).convertSRGBToLinear(); + attribute.setXYZ( i, _color.r, _color.g, _color.b ); + + } + + } + + _loadLibrary( url, responseType ) { + + const loader = new FileLoader( this.manager ); + loader.setPath( this.decoderPath ); + loader.setResponseType( responseType ); + loader.setWithCredentials( this.withCredentials ); + + return new Promise( ( resolve, reject ) => { + + loader.load( url, resolve, undefined, reject ); + + } ); + + } + + preload() { + + this._initDecoder(); + + return this; + + } + + _initDecoder() { + + if ( this.decoderPending ) return this.decoderPending; + + const useJS = typeof WebAssembly !== 'object' || this.decoderConfig.type === 'js'; + const librariesPending = []; + + if ( useJS ) { + + librariesPending.push( this._loadLibrary( 'draco_decoder.js', 'text' ) ); + + } else { + + librariesPending.push( this._loadLibrary( 'draco_wasm_wrapper.js', 'text' ) ); + librariesPending.push( this._loadLibrary( 'draco_decoder.wasm', 'arraybuffer' ) ); + + } + + this.decoderPending = Promise.all( librariesPending ) + .then( ( libraries ) => { + + const jsContent = libraries[ 0 ]; + + if ( ! useJS ) { + + this.decoderConfig.wasmBinary = libraries[ 1 ]; + + } + + const fn = DRACOWorker.toString(); + + const body = [ + '/* draco decoder */', + jsContent, + '', + '/* worker */', + fn.substring( fn.indexOf( '{' ) + 1, fn.lastIndexOf( '}' ) ) + ].join( '\n' ); + + this.workerSourceURL = URL.createObjectURL( new Blob( [ body ] ) ); + + } ); + + return this.decoderPending; + + } + + _getWorker( taskID, taskCost ) { + + return this._initDecoder().then( () => { + + if ( this.workerPool.length < this.workerLimit ) { + + const worker = new Worker( this.workerSourceURL ); + + worker._callbacks = {}; + worker._taskCosts = {}; + worker._taskLoad = 0; + + worker.postMessage( { type: 'init', decoderConfig: this.decoderConfig } ); + + worker.onmessage = function ( e ) { + + const message = e.data; + + switch ( message.type ) { + + case 'decode': + worker._callbacks[ message.id ].resolve( message ); + break; + + case 'error': + worker._callbacks[ message.id ].reject( message ); + break; + + default: + console.error( 'THREE.DRACOLoader: Unexpected message, "' + message.type + '"' ); + + } + + }; + + this.workerPool.push( worker ); + + } else { + + this.workerPool.sort( function ( a, b ) { + + return a._taskLoad > b._taskLoad ? - 1 : 1; + + } ); + + } + + const worker = this.workerPool[ this.workerPool.length - 1 ]; + worker._taskCosts[ taskID ] = taskCost; + worker._taskLoad += taskCost; + return worker; + + } ); + + } + + _releaseTask( worker, taskID ) { + + worker._taskLoad -= worker._taskCosts[ taskID ]; + delete worker._callbacks[ taskID ]; + delete worker._taskCosts[ taskID ]; + + } + + debug() { + + console.log( 'Task load: ', this.workerPool.map( ( worker ) => worker._taskLoad ) ); + + } + + dispose() { + + for ( let i = 0; i < this.workerPool.length; ++ i ) { + + this.workerPool[ i ].terminate(); + + } + + this.workerPool.length = 0; + + if ( this.workerSourceURL !== '' ) { + + URL.revokeObjectURL( this.workerSourceURL ); + + } + + return this; + + } + +} + +/* WEB WORKER */ + +function DRACOWorker() { + + let decoderConfig; + let decoderPending; + + onmessage = function ( e ) { + + const message = e.data; + + switch ( message.type ) { + + case 'init': + decoderConfig = message.decoderConfig; + decoderPending = new Promise( function ( resolve/*, reject*/ ) { + + decoderConfig.onModuleLoaded = function ( draco ) { + + // Module is Promise-like. Wrap before resolving to avoid loop. + resolve( { draco: draco } ); + + }; + + DracoDecoderModule( decoderConfig ); // eslint-disable-line no-undef + + } ); + break; + + case 'decode': + const buffer = message.buffer; + const taskConfig = message.taskConfig; + decoderPending.then( ( module ) => { + + const draco = module.draco; + const decoder = new draco.Decoder(); + + try { + + const geometry = decodeGeometry( draco, decoder, new Int8Array( buffer ), taskConfig ); + + const buffers = geometry.attributes.map( ( attr ) => attr.array.buffer ); + + if ( geometry.index ) buffers.push( geometry.index.array.buffer ); + + self.postMessage( { type: 'decode', id: message.id, geometry }, buffers ); + + } catch ( error ) { + + console.error( error ); + + self.postMessage( { type: 'error', id: message.id, error: error.message } ); + + } finally { + + draco.destroy( decoder ); + + } + + } ); + break; + + } + + }; + + function decodeGeometry( draco, decoder, array, taskConfig ) { + + const attributeIDs = taskConfig.attributeIDs; + const attributeTypes = taskConfig.attributeTypes; + + let dracoGeometry; + let decodingStatus; + + const geometryType = decoder.GetEncodedGeometryType( array ); + + if ( geometryType === draco.TRIANGULAR_MESH ) { + + dracoGeometry = new draco.Mesh(); + decodingStatus = decoder.DecodeArrayToMesh( array, array.byteLength, dracoGeometry ); + + } else if ( geometryType === draco.POINT_CLOUD ) { + + dracoGeometry = new draco.PointCloud(); + decodingStatus = decoder.DecodeArrayToPointCloud( array, array.byteLength, dracoGeometry ); + + } else { + + throw new Error( 'THREE.DRACOLoader: Unexpected geometry type.' ); + + } + + if ( ! decodingStatus.ok() || dracoGeometry.ptr === 0 ) { + + throw new Error( 'THREE.DRACOLoader: Decoding failed: ' + decodingStatus.error_msg() ); + + } + + const geometry = { index: null, attributes: [] }; + + // Gather all vertex attributes. + for ( const attributeName in attributeIDs ) { + + const attributeType = self[ attributeTypes[ attributeName ] ]; + + let attribute; + let attributeID; + + // A Draco file may be created with default vertex attributes, whose attribute IDs + // are mapped 1:1 from their semantic name (POSITION, NORMAL, ...). Alternatively, + // a Draco file may contain a custom set of attributes, identified by known unique + // IDs. glTF files always do the latter, and `.drc` files typically do the former. + if ( taskConfig.useUniqueIDs ) { + + attributeID = attributeIDs[ attributeName ]; + attribute = decoder.GetAttributeByUniqueId( dracoGeometry, attributeID ); + + } else { + + attributeID = decoder.GetAttributeId( dracoGeometry, draco[ attributeIDs[ attributeName ] ] ); + + if ( attributeID === - 1 ) continue; + + attribute = decoder.GetAttribute( dracoGeometry, attributeID ); + + } + + const attributeResult = decodeAttribute( draco, decoder, dracoGeometry, attributeName, attributeType, attribute ); + + if ( attributeName === 'color' ) { + + attributeResult.vertexColorSpace = taskConfig.vertexColorSpace; + + } + + geometry.attributes.push( attributeResult ); + + } + + // Add index. + if ( geometryType === draco.TRIANGULAR_MESH ) { + + geometry.index = decodeIndex( draco, decoder, dracoGeometry ); + + } + + draco.destroy( dracoGeometry ); + + return geometry; + + } + + function decodeIndex( draco, decoder, dracoGeometry ) { + + const numFaces = dracoGeometry.num_faces(); + const numIndices = numFaces * 3; + const byteLength = numIndices * 4; + + const ptr = draco._malloc( byteLength ); + decoder.GetTrianglesUInt32Array( dracoGeometry, byteLength, ptr ); + const index = new Uint32Array( draco.HEAPF32.buffer, ptr, numIndices ).slice(); + draco._free( ptr ); + + return { array: index, itemSize: 1 }; + + } + + function decodeAttribute( draco, decoder, dracoGeometry, attributeName, attributeType, attribute ) { + + const numComponents = attribute.num_components(); + const numPoints = dracoGeometry.num_points(); + const numValues = numPoints * numComponents; + const byteLength = numValues * attributeType.BYTES_PER_ELEMENT; + const dataType = getDracoDataType( draco, attributeType ); + + const ptr = draco._malloc( byteLength ); + decoder.GetAttributeDataArrayForAllPoints( dracoGeometry, attribute, dataType, byteLength, ptr ); + const array = new attributeType( draco.HEAPF32.buffer, ptr, numValues ).slice(); + draco._free( ptr ); + + return { + name: attributeName, + array: array, + itemSize: numComponents + }; + + } + + function getDracoDataType( draco, attributeType ) { + + switch ( attributeType ) { + + case Float32Array: return draco.DT_FLOAT32; + case Int8Array: return draco.DT_INT8; + case Int16Array: return draco.DT_INT16; + case Int32Array: return draco.DT_INT32; + case Uint8Array: return draco.DT_UINT8; + case Uint16Array: return draco.DT_UINT16; + case Uint32Array: return draco.DT_UINT32; + + } + + } + +} + +export { DRACOLoader }; diff --git a/node_modules/three/examples/jsm/loaders/EXRLoader.js b/node_modules/three/examples/jsm/loaders/EXRLoader.js new file mode 100644 index 0000000..8ec2330 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/EXRLoader.js @@ -0,0 +1,2563 @@ +import { + DataTextureLoader, + DataUtils, + FloatType, + HalfFloatType, + NoColorSpace, + LinearFilter, + LinearSRGBColorSpace, + RedFormat, + RGBAFormat +} from 'three'; +import * as fflate from '../libs/fflate.module.js'; + +/** + * OpenEXR loader currently supports uncompressed, ZIP(S), RLE, PIZ and DWA/B compression. + * Supports reading as UnsignedByte, HalfFloat and Float type data texture. + * + * Referred to the original Industrial Light & Magic OpenEXR implementation and the TinyEXR / Syoyo Fujita + * implementation, so I have preserved their copyright notices. + */ + +// /* +// Copyright (c) 2014 - 2017, Syoyo Fujita +// All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of the Syoyo Fujita nor the +// names of its contributors may be used to endorse or promote products +// derived from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +// DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// */ + +// // TinyEXR contains some OpenEXR code, which is licensed under ------------ + +// /////////////////////////////////////////////////////////////////////////// +// // +// // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas +// // Digital Ltd. LLC +// // +// // All rights reserved. +// // +// // Redistribution and use in source and binary forms, with or without +// // modification, are permitted provided that the following conditions are +// // met: +// // * Redistributions of source code must retain the above copyright +// // notice, this list of conditions and the following disclaimer. +// // * Redistributions in binary form must reproduce the above +// // copyright notice, this list of conditions and the following disclaimer +// // in the documentation and/or other materials provided with the +// // distribution. +// // * Neither the name of Industrial Light & Magic nor the names of +// // its contributors may be used to endorse or promote products derived +// // from this software without specific prior written permission. +// // +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // +// /////////////////////////////////////////////////////////////////////////// + +// // End of OpenEXR license ------------------------------------------------- + +class EXRLoader extends DataTextureLoader { + + constructor( manager ) { + + super( manager ); + + this.type = HalfFloatType; + + } + + parse( buffer ) { + + const USHORT_RANGE = ( 1 << 16 ); + const BITMAP_SIZE = ( USHORT_RANGE >> 3 ); + + const HUF_ENCBITS = 16; // literal (value) bit length + const HUF_DECBITS = 14; // decoding bit size (>= 8) + + const HUF_ENCSIZE = ( 1 << HUF_ENCBITS ) + 1; // encoding table size + const HUF_DECSIZE = 1 << HUF_DECBITS; // decoding table size + const HUF_DECMASK = HUF_DECSIZE - 1; + + const NBITS = 16; + const A_OFFSET = 1 << ( NBITS - 1 ); + const MOD_MASK = ( 1 << NBITS ) - 1; + + const SHORT_ZEROCODE_RUN = 59; + const LONG_ZEROCODE_RUN = 63; + const SHORTEST_LONG_RUN = 2 + LONG_ZEROCODE_RUN - SHORT_ZEROCODE_RUN; + + const ULONG_SIZE = 8; + const FLOAT32_SIZE = 4; + const INT32_SIZE = 4; + const INT16_SIZE = 2; + const INT8_SIZE = 1; + + const STATIC_HUFFMAN = 0; + const DEFLATE = 1; + + const UNKNOWN = 0; + const LOSSY_DCT = 1; + const RLE = 2; + + const logBase = Math.pow( 2.7182818, 2.2 ); + + function reverseLutFromBitmap( bitmap, lut ) { + + let k = 0; + + for ( let i = 0; i < USHORT_RANGE; ++ i ) { + + if ( ( i == 0 ) || ( bitmap[ i >> 3 ] & ( 1 << ( i & 7 ) ) ) ) { + + lut[ k ++ ] = i; + + } + + } + + const n = k - 1; + + while ( k < USHORT_RANGE ) lut[ k ++ ] = 0; + + return n; + + } + + function hufClearDecTable( hdec ) { + + for ( let i = 0; i < HUF_DECSIZE; i ++ ) { + + hdec[ i ] = {}; + hdec[ i ].len = 0; + hdec[ i ].lit = 0; + hdec[ i ].p = null; + + } + + } + + const getBitsReturn = { l: 0, c: 0, lc: 0 }; + + function getBits( nBits, c, lc, uInt8Array, inOffset ) { + + while ( lc < nBits ) { + + c = ( c << 8 ) | parseUint8Array( uInt8Array, inOffset ); + lc += 8; + + } + + lc -= nBits; + + getBitsReturn.l = ( c >> lc ) & ( ( 1 << nBits ) - 1 ); + getBitsReturn.c = c; + getBitsReturn.lc = lc; + + } + + const hufTableBuffer = new Array( 59 ); + + function hufCanonicalCodeTable( hcode ) { + + for ( let i = 0; i <= 58; ++ i ) hufTableBuffer[ i ] = 0; + for ( let i = 0; i < HUF_ENCSIZE; ++ i ) hufTableBuffer[ hcode[ i ] ] += 1; + + let c = 0; + + for ( let i = 58; i > 0; -- i ) { + + const nc = ( ( c + hufTableBuffer[ i ] ) >> 1 ); + hufTableBuffer[ i ] = c; + c = nc; + + } + + for ( let i = 0; i < HUF_ENCSIZE; ++ i ) { + + const l = hcode[ i ]; + if ( l > 0 ) hcode[ i ] = l | ( hufTableBuffer[ l ] ++ << 6 ); + + } + + } + + function hufUnpackEncTable( uInt8Array, inOffset, ni, im, iM, hcode ) { + + const p = inOffset; + let c = 0; + let lc = 0; + + for ( ; im <= iM; im ++ ) { + + if ( p.value - inOffset.value > ni ) return false; + + getBits( 6, c, lc, uInt8Array, p ); + + const l = getBitsReturn.l; + c = getBitsReturn.c; + lc = getBitsReturn.lc; + + hcode[ im ] = l; + + if ( l == LONG_ZEROCODE_RUN ) { + + if ( p.value - inOffset.value > ni ) { + + throw new Error( 'Something wrong with hufUnpackEncTable' ); + + } + + getBits( 8, c, lc, uInt8Array, p ); + + let zerun = getBitsReturn.l + SHORTEST_LONG_RUN; + c = getBitsReturn.c; + lc = getBitsReturn.lc; + + if ( im + zerun > iM + 1 ) { + + throw new Error( 'Something wrong with hufUnpackEncTable' ); + + } + + while ( zerun -- ) hcode[ im ++ ] = 0; + + im --; + + } else if ( l >= SHORT_ZEROCODE_RUN ) { + + let zerun = l - SHORT_ZEROCODE_RUN + 2; + + if ( im + zerun > iM + 1 ) { + + throw new Error( 'Something wrong with hufUnpackEncTable' ); + + } + + while ( zerun -- ) hcode[ im ++ ] = 0; + + im --; + + } + + } + + hufCanonicalCodeTable( hcode ); + + } + + function hufLength( code ) { + + return code & 63; + + } + + function hufCode( code ) { + + return code >> 6; + + } + + function hufBuildDecTable( hcode, im, iM, hdecod ) { + + for ( ; im <= iM; im ++ ) { + + const c = hufCode( hcode[ im ] ); + const l = hufLength( hcode[ im ] ); + + if ( c >> l ) { + + throw new Error( 'Invalid table entry' ); + + } + + if ( l > HUF_DECBITS ) { + + const pl = hdecod[ ( c >> ( l - HUF_DECBITS ) ) ]; + + if ( pl.len ) { + + throw new Error( 'Invalid table entry' ); + + } + + pl.lit ++; + + if ( pl.p ) { + + const p = pl.p; + pl.p = new Array( pl.lit ); + + for ( let i = 0; i < pl.lit - 1; ++ i ) { + + pl.p[ i ] = p[ i ]; + + } + + } else { + + pl.p = new Array( 1 ); + + } + + pl.p[ pl.lit - 1 ] = im; + + } else if ( l ) { + + let plOffset = 0; + + for ( let i = 1 << ( HUF_DECBITS - l ); i > 0; i -- ) { + + const pl = hdecod[ ( c << ( HUF_DECBITS - l ) ) + plOffset ]; + + if ( pl.len || pl.p ) { + + throw new Error( 'Invalid table entry' ); + + } + + pl.len = l; + pl.lit = im; + + plOffset ++; + + } + + } + + } + + return true; + + } + + const getCharReturn = { c: 0, lc: 0 }; + + function getChar( c, lc, uInt8Array, inOffset ) { + + c = ( c << 8 ) | parseUint8Array( uInt8Array, inOffset ); + lc += 8; + + getCharReturn.c = c; + getCharReturn.lc = lc; + + } + + const getCodeReturn = { c: 0, lc: 0 }; + + function getCode( po, rlc, c, lc, uInt8Array, inOffset, outBuffer, outBufferOffset, outBufferEndOffset ) { + + if ( po == rlc ) { + + if ( lc < 8 ) { + + getChar( c, lc, uInt8Array, inOffset ); + c = getCharReturn.c; + lc = getCharReturn.lc; + + } + + lc -= 8; + + let cs = ( c >> lc ); + cs = new Uint8Array( [ cs ] )[ 0 ]; + + if ( outBufferOffset.value + cs > outBufferEndOffset ) { + + return false; + + } + + const s = outBuffer[ outBufferOffset.value - 1 ]; + + while ( cs -- > 0 ) { + + outBuffer[ outBufferOffset.value ++ ] = s; + + } + + } else if ( outBufferOffset.value < outBufferEndOffset ) { + + outBuffer[ outBufferOffset.value ++ ] = po; + + } else { + + return false; + + } + + getCodeReturn.c = c; + getCodeReturn.lc = lc; + + } + + function UInt16( value ) { + + return ( value & 0xFFFF ); + + } + + function Int16( value ) { + + const ref = UInt16( value ); + return ( ref > 0x7FFF ) ? ref - 0x10000 : ref; + + } + + const wdec14Return = { a: 0, b: 0 }; + + function wdec14( l, h ) { + + const ls = Int16( l ); + const hs = Int16( h ); + + const hi = hs; + const ai = ls + ( hi & 1 ) + ( hi >> 1 ); + + const as = ai; + const bs = ai - hi; + + wdec14Return.a = as; + wdec14Return.b = bs; + + } + + function wdec16( l, h ) { + + const m = UInt16( l ); + const d = UInt16( h ); + + const bb = ( m - ( d >> 1 ) ) & MOD_MASK; + const aa = ( d + bb - A_OFFSET ) & MOD_MASK; + + wdec14Return.a = aa; + wdec14Return.b = bb; + + } + + function wav2Decode( buffer, j, nx, ox, ny, oy, mx ) { + + const w14 = mx < ( 1 << 14 ); + const n = ( nx > ny ) ? ny : nx; + let p = 1; + let p2; + let py; + + while ( p <= n ) p <<= 1; + + p >>= 1; + p2 = p; + p >>= 1; + + while ( p >= 1 ) { + + py = 0; + const ey = py + oy * ( ny - p2 ); + const oy1 = oy * p; + const oy2 = oy * p2; + const ox1 = ox * p; + const ox2 = ox * p2; + let i00, i01, i10, i11; + + for ( ; py <= ey; py += oy2 ) { + + let px = py; + const ex = py + ox * ( nx - p2 ); + + for ( ; px <= ex; px += ox2 ) { + + const p01 = px + ox1; + const p10 = px + oy1; + const p11 = p10 + ox1; + + if ( w14 ) { + + wdec14( buffer[ px + j ], buffer[ p10 + j ] ); + + i00 = wdec14Return.a; + i10 = wdec14Return.b; + + wdec14( buffer[ p01 + j ], buffer[ p11 + j ] ); + + i01 = wdec14Return.a; + i11 = wdec14Return.b; + + wdec14( i00, i01 ); + + buffer[ px + j ] = wdec14Return.a; + buffer[ p01 + j ] = wdec14Return.b; + + wdec14( i10, i11 ); + + buffer[ p10 + j ] = wdec14Return.a; + buffer[ p11 + j ] = wdec14Return.b; + + } else { + + wdec16( buffer[ px + j ], buffer[ p10 + j ] ); + + i00 = wdec14Return.a; + i10 = wdec14Return.b; + + wdec16( buffer[ p01 + j ], buffer[ p11 + j ] ); + + i01 = wdec14Return.a; + i11 = wdec14Return.b; + + wdec16( i00, i01 ); + + buffer[ px + j ] = wdec14Return.a; + buffer[ p01 + j ] = wdec14Return.b; + + wdec16( i10, i11 ); + + buffer[ p10 + j ] = wdec14Return.a; + buffer[ p11 + j ] = wdec14Return.b; + + + } + + } + + if ( nx & p ) { + + const p10 = px + oy1; + + if ( w14 ) + wdec14( buffer[ px + j ], buffer[ p10 + j ] ); + else + wdec16( buffer[ px + j ], buffer[ p10 + j ] ); + + i00 = wdec14Return.a; + buffer[ p10 + j ] = wdec14Return.b; + + buffer[ px + j ] = i00; + + } + + } + + if ( ny & p ) { + + let px = py; + const ex = py + ox * ( nx - p2 ); + + for ( ; px <= ex; px += ox2 ) { + + const p01 = px + ox1; + + if ( w14 ) + wdec14( buffer[ px + j ], buffer[ p01 + j ] ); + else + wdec16( buffer[ px + j ], buffer[ p01 + j ] ); + + i00 = wdec14Return.a; + buffer[ p01 + j ] = wdec14Return.b; + + buffer[ px + j ] = i00; + + } + + } + + p2 = p; + p >>= 1; + + } + + return py; + + } + + function hufDecode( encodingTable, decodingTable, uInt8Array, inOffset, ni, rlc, no, outBuffer, outOffset ) { + + let c = 0; + let lc = 0; + const outBufferEndOffset = no; + const inOffsetEnd = Math.trunc( inOffset.value + ( ni + 7 ) / 8 ); + + while ( inOffset.value < inOffsetEnd ) { + + getChar( c, lc, uInt8Array, inOffset ); + + c = getCharReturn.c; + lc = getCharReturn.lc; + + while ( lc >= HUF_DECBITS ) { + + const index = ( c >> ( lc - HUF_DECBITS ) ) & HUF_DECMASK; + const pl = decodingTable[ index ]; + + if ( pl.len ) { + + lc -= pl.len; + + getCode( pl.lit, rlc, c, lc, uInt8Array, inOffset, outBuffer, outOffset, outBufferEndOffset ); + + c = getCodeReturn.c; + lc = getCodeReturn.lc; + + } else { + + if ( ! pl.p ) { + + throw new Error( 'hufDecode issues' ); + + } + + let j; + + for ( j = 0; j < pl.lit; j ++ ) { + + const l = hufLength( encodingTable[ pl.p[ j ] ] ); + + while ( lc < l && inOffset.value < inOffsetEnd ) { + + getChar( c, lc, uInt8Array, inOffset ); + + c = getCharReturn.c; + lc = getCharReturn.lc; + + } + + if ( lc >= l ) { + + if ( hufCode( encodingTable[ pl.p[ j ] ] ) == ( ( c >> ( lc - l ) ) & ( ( 1 << l ) - 1 ) ) ) { + + lc -= l; + + getCode( pl.p[ j ], rlc, c, lc, uInt8Array, inOffset, outBuffer, outOffset, outBufferEndOffset ); + + c = getCodeReturn.c; + lc = getCodeReturn.lc; + + break; + + } + + } + + } + + if ( j == pl.lit ) { + + throw new Error( 'hufDecode issues' ); + + } + + } + + } + + } + + const i = ( 8 - ni ) & 7; + + c >>= i; + lc -= i; + + while ( lc > 0 ) { + + const pl = decodingTable[ ( c << ( HUF_DECBITS - lc ) ) & HUF_DECMASK ]; + + if ( pl.len ) { + + lc -= pl.len; + + getCode( pl.lit, rlc, c, lc, uInt8Array, inOffset, outBuffer, outOffset, outBufferEndOffset ); + + c = getCodeReturn.c; + lc = getCodeReturn.lc; + + } else { + + throw new Error( 'hufDecode issues' ); + + } + + } + + return true; + + } + + function hufUncompress( uInt8Array, inDataView, inOffset, nCompressed, outBuffer, nRaw ) { + + const outOffset = { value: 0 }; + const initialInOffset = inOffset.value; + + const im = parseUint32( inDataView, inOffset ); + const iM = parseUint32( inDataView, inOffset ); + + inOffset.value += 4; + + const nBits = parseUint32( inDataView, inOffset ); + + inOffset.value += 4; + + if ( im < 0 || im >= HUF_ENCSIZE || iM < 0 || iM >= HUF_ENCSIZE ) { + + throw new Error( 'Something wrong with HUF_ENCSIZE' ); + + } + + const freq = new Array( HUF_ENCSIZE ); + const hdec = new Array( HUF_DECSIZE ); + + hufClearDecTable( hdec ); + + const ni = nCompressed - ( inOffset.value - initialInOffset ); + + hufUnpackEncTable( uInt8Array, inOffset, ni, im, iM, freq ); + + if ( nBits > 8 * ( nCompressed - ( inOffset.value - initialInOffset ) ) ) { + + throw new Error( 'Something wrong with hufUncompress' ); + + } + + hufBuildDecTable( freq, im, iM, hdec ); + + hufDecode( freq, hdec, uInt8Array, inOffset, nBits, iM, nRaw, outBuffer, outOffset ); + + } + + function applyLut( lut, data, nData ) { + + for ( let i = 0; i < nData; ++ i ) { + + data[ i ] = lut[ data[ i ] ]; + + } + + } + + function predictor( source ) { + + for ( let t = 1; t < source.length; t ++ ) { + + const d = source[ t - 1 ] + source[ t ] - 128; + source[ t ] = d; + + } + + } + + function interleaveScalar( source, out ) { + + let t1 = 0; + let t2 = Math.floor( ( source.length + 1 ) / 2 ); + let s = 0; + const stop = source.length - 1; + + while ( true ) { + + if ( s > stop ) break; + out[ s ++ ] = source[ t1 ++ ]; + + if ( s > stop ) break; + out[ s ++ ] = source[ t2 ++ ]; + + } + + } + + function decodeRunLength( source ) { + + let size = source.byteLength; + const out = new Array(); + let p = 0; + + const reader = new DataView( source ); + + while ( size > 0 ) { + + const l = reader.getInt8( p ++ ); + + if ( l < 0 ) { + + const count = - l; + size -= count + 1; + + for ( let i = 0; i < count; i ++ ) { + + out.push( reader.getUint8( p ++ ) ); + + } + + + } else { + + const count = l; + size -= 2; + + const value = reader.getUint8( p ++ ); + + for ( let i = 0; i < count + 1; i ++ ) { + + out.push( value ); + + } + + } + + } + + return out; + + } + + function lossyDctDecode( cscSet, rowPtrs, channelData, acBuffer, dcBuffer, outBuffer ) { + + let dataView = new DataView( outBuffer.buffer ); + + const width = channelData[ cscSet.idx[ 0 ] ].width; + const height = channelData[ cscSet.idx[ 0 ] ].height; + + const numComp = 3; + + const numFullBlocksX = Math.floor( width / 8.0 ); + const numBlocksX = Math.ceil( width / 8.0 ); + const numBlocksY = Math.ceil( height / 8.0 ); + const leftoverX = width - ( numBlocksX - 1 ) * 8; + const leftoverY = height - ( numBlocksY - 1 ) * 8; + + const currAcComp = { value: 0 }; + const currDcComp = new Array( numComp ); + const dctData = new Array( numComp ); + const halfZigBlock = new Array( numComp ); + const rowBlock = new Array( numComp ); + const rowOffsets = new Array( numComp ); + + for ( let comp = 0; comp < numComp; ++ comp ) { + + rowOffsets[ comp ] = rowPtrs[ cscSet.idx[ comp ] ]; + currDcComp[ comp ] = ( comp < 1 ) ? 0 : currDcComp[ comp - 1 ] + numBlocksX * numBlocksY; + dctData[ comp ] = new Float32Array( 64 ); + halfZigBlock[ comp ] = new Uint16Array( 64 ); + rowBlock[ comp ] = new Uint16Array( numBlocksX * 64 ); + + } + + for ( let blocky = 0; blocky < numBlocksY; ++ blocky ) { + + let maxY = 8; + + if ( blocky == numBlocksY - 1 ) + maxY = leftoverY; + + let maxX = 8; + + for ( let blockx = 0; blockx < numBlocksX; ++ blockx ) { + + if ( blockx == numBlocksX - 1 ) + maxX = leftoverX; + + for ( let comp = 0; comp < numComp; ++ comp ) { + + halfZigBlock[ comp ].fill( 0 ); + + // set block DC component + halfZigBlock[ comp ][ 0 ] = dcBuffer[ currDcComp[ comp ] ++ ]; + // set block AC components + unRleAC( currAcComp, acBuffer, halfZigBlock[ comp ] ); + + // UnZigZag block to float + unZigZag( halfZigBlock[ comp ], dctData[ comp ] ); + // decode float dct + dctInverse( dctData[ comp ] ); + + } + + if ( numComp == 3 ) { + + csc709Inverse( dctData ); + + } + + for ( let comp = 0; comp < numComp; ++ comp ) { + + convertToHalf( dctData[ comp ], rowBlock[ comp ], blockx * 64 ); + + } + + } // blockx + + let offset = 0; + + for ( let comp = 0; comp < numComp; ++ comp ) { + + const type = channelData[ cscSet.idx[ comp ] ].type; + + for ( let y = 8 * blocky; y < 8 * blocky + maxY; ++ y ) { + + offset = rowOffsets[ comp ][ y ]; + + for ( let blockx = 0; blockx < numFullBlocksX; ++ blockx ) { + + const src = blockx * 64 + ( ( y & 0x7 ) * 8 ); + + dataView.setUint16( offset + 0 * INT16_SIZE * type, rowBlock[ comp ][ src + 0 ], true ); + dataView.setUint16( offset + 1 * INT16_SIZE * type, rowBlock[ comp ][ src + 1 ], true ); + dataView.setUint16( offset + 2 * INT16_SIZE * type, rowBlock[ comp ][ src + 2 ], true ); + dataView.setUint16( offset + 3 * INT16_SIZE * type, rowBlock[ comp ][ src + 3 ], true ); + + dataView.setUint16( offset + 4 * INT16_SIZE * type, rowBlock[ comp ][ src + 4 ], true ); + dataView.setUint16( offset + 5 * INT16_SIZE * type, rowBlock[ comp ][ src + 5 ], true ); + dataView.setUint16( offset + 6 * INT16_SIZE * type, rowBlock[ comp ][ src + 6 ], true ); + dataView.setUint16( offset + 7 * INT16_SIZE * type, rowBlock[ comp ][ src + 7 ], true ); + + offset += 8 * INT16_SIZE * type; + + } + + } + + // handle partial X blocks + if ( numFullBlocksX != numBlocksX ) { + + for ( let y = 8 * blocky; y < 8 * blocky + maxY; ++ y ) { + + const offset = rowOffsets[ comp ][ y ] + 8 * numFullBlocksX * INT16_SIZE * type; + const src = numFullBlocksX * 64 + ( ( y & 0x7 ) * 8 ); + + for ( let x = 0; x < maxX; ++ x ) { + + dataView.setUint16( offset + x * INT16_SIZE * type, rowBlock[ comp ][ src + x ], true ); + + } + + } + + } + + } // comp + + } // blocky + + const halfRow = new Uint16Array( width ); + dataView = new DataView( outBuffer.buffer ); + + // convert channels back to float, if needed + for ( let comp = 0; comp < numComp; ++ comp ) { + + channelData[ cscSet.idx[ comp ] ].decoded = true; + const type = channelData[ cscSet.idx[ comp ] ].type; + + if ( channelData[ comp ].type != 2 ) continue; + + for ( let y = 0; y < height; ++ y ) { + + const offset = rowOffsets[ comp ][ y ]; + + for ( let x = 0; x < width; ++ x ) { + + halfRow[ x ] = dataView.getUint16( offset + x * INT16_SIZE * type, true ); + + } + + for ( let x = 0; x < width; ++ x ) { + + dataView.setFloat32( offset + x * INT16_SIZE * type, decodeFloat16( halfRow[ x ] ), true ); + + } + + } + + } + + } + + function unRleAC( currAcComp, acBuffer, halfZigBlock ) { + + let acValue; + let dctComp = 1; + + while ( dctComp < 64 ) { + + acValue = acBuffer[ currAcComp.value ]; + + if ( acValue == 0xff00 ) { + + dctComp = 64; + + } else if ( acValue >> 8 == 0xff ) { + + dctComp += acValue & 0xff; + + } else { + + halfZigBlock[ dctComp ] = acValue; + dctComp ++; + + } + + currAcComp.value ++; + + } + + } + + function unZigZag( src, dst ) { + + dst[ 0 ] = decodeFloat16( src[ 0 ] ); + dst[ 1 ] = decodeFloat16( src[ 1 ] ); + dst[ 2 ] = decodeFloat16( src[ 5 ] ); + dst[ 3 ] = decodeFloat16( src[ 6 ] ); + dst[ 4 ] = decodeFloat16( src[ 14 ] ); + dst[ 5 ] = decodeFloat16( src[ 15 ] ); + dst[ 6 ] = decodeFloat16( src[ 27 ] ); + dst[ 7 ] = decodeFloat16( src[ 28 ] ); + dst[ 8 ] = decodeFloat16( src[ 2 ] ); + dst[ 9 ] = decodeFloat16( src[ 4 ] ); + + dst[ 10 ] = decodeFloat16( src[ 7 ] ); + dst[ 11 ] = decodeFloat16( src[ 13 ] ); + dst[ 12 ] = decodeFloat16( src[ 16 ] ); + dst[ 13 ] = decodeFloat16( src[ 26 ] ); + dst[ 14 ] = decodeFloat16( src[ 29 ] ); + dst[ 15 ] = decodeFloat16( src[ 42 ] ); + dst[ 16 ] = decodeFloat16( src[ 3 ] ); + dst[ 17 ] = decodeFloat16( src[ 8 ] ); + dst[ 18 ] = decodeFloat16( src[ 12 ] ); + dst[ 19 ] = decodeFloat16( src[ 17 ] ); + + dst[ 20 ] = decodeFloat16( src[ 25 ] ); + dst[ 21 ] = decodeFloat16( src[ 30 ] ); + dst[ 22 ] = decodeFloat16( src[ 41 ] ); + dst[ 23 ] = decodeFloat16( src[ 43 ] ); + dst[ 24 ] = decodeFloat16( src[ 9 ] ); + dst[ 25 ] = decodeFloat16( src[ 11 ] ); + dst[ 26 ] = decodeFloat16( src[ 18 ] ); + dst[ 27 ] = decodeFloat16( src[ 24 ] ); + dst[ 28 ] = decodeFloat16( src[ 31 ] ); + dst[ 29 ] = decodeFloat16( src[ 40 ] ); + + dst[ 30 ] = decodeFloat16( src[ 44 ] ); + dst[ 31 ] = decodeFloat16( src[ 53 ] ); + dst[ 32 ] = decodeFloat16( src[ 10 ] ); + dst[ 33 ] = decodeFloat16( src[ 19 ] ); + dst[ 34 ] = decodeFloat16( src[ 23 ] ); + dst[ 35 ] = decodeFloat16( src[ 32 ] ); + dst[ 36 ] = decodeFloat16( src[ 39 ] ); + dst[ 37 ] = decodeFloat16( src[ 45 ] ); + dst[ 38 ] = decodeFloat16( src[ 52 ] ); + dst[ 39 ] = decodeFloat16( src[ 54 ] ); + + dst[ 40 ] = decodeFloat16( src[ 20 ] ); + dst[ 41 ] = decodeFloat16( src[ 22 ] ); + dst[ 42 ] = decodeFloat16( src[ 33 ] ); + dst[ 43 ] = decodeFloat16( src[ 38 ] ); + dst[ 44 ] = decodeFloat16( src[ 46 ] ); + dst[ 45 ] = decodeFloat16( src[ 51 ] ); + dst[ 46 ] = decodeFloat16( src[ 55 ] ); + dst[ 47 ] = decodeFloat16( src[ 60 ] ); + dst[ 48 ] = decodeFloat16( src[ 21 ] ); + dst[ 49 ] = decodeFloat16( src[ 34 ] ); + + dst[ 50 ] = decodeFloat16( src[ 37 ] ); + dst[ 51 ] = decodeFloat16( src[ 47 ] ); + dst[ 52 ] = decodeFloat16( src[ 50 ] ); + dst[ 53 ] = decodeFloat16( src[ 56 ] ); + dst[ 54 ] = decodeFloat16( src[ 59 ] ); + dst[ 55 ] = decodeFloat16( src[ 61 ] ); + dst[ 56 ] = decodeFloat16( src[ 35 ] ); + dst[ 57 ] = decodeFloat16( src[ 36 ] ); + dst[ 58 ] = decodeFloat16( src[ 48 ] ); + dst[ 59 ] = decodeFloat16( src[ 49 ] ); + + dst[ 60 ] = decodeFloat16( src[ 57 ] ); + dst[ 61 ] = decodeFloat16( src[ 58 ] ); + dst[ 62 ] = decodeFloat16( src[ 62 ] ); + dst[ 63 ] = decodeFloat16( src[ 63 ] ); + + } + + function dctInverse( data ) { + + const a = 0.5 * Math.cos( 3.14159 / 4.0 ); + const b = 0.5 * Math.cos( 3.14159 / 16.0 ); + const c = 0.5 * Math.cos( 3.14159 / 8.0 ); + const d = 0.5 * Math.cos( 3.0 * 3.14159 / 16.0 ); + const e = 0.5 * Math.cos( 5.0 * 3.14159 / 16.0 ); + const f = 0.5 * Math.cos( 3.0 * 3.14159 / 8.0 ); + const g = 0.5 * Math.cos( 7.0 * 3.14159 / 16.0 ); + + const alpha = new Array( 4 ); + const beta = new Array( 4 ); + const theta = new Array( 4 ); + const gamma = new Array( 4 ); + + for ( let row = 0; row < 8; ++ row ) { + + const rowPtr = row * 8; + + alpha[ 0 ] = c * data[ rowPtr + 2 ]; + alpha[ 1 ] = f * data[ rowPtr + 2 ]; + alpha[ 2 ] = c * data[ rowPtr + 6 ]; + alpha[ 3 ] = f * data[ rowPtr + 6 ]; + + beta[ 0 ] = b * data[ rowPtr + 1 ] + d * data[ rowPtr + 3 ] + e * data[ rowPtr + 5 ] + g * data[ rowPtr + 7 ]; + beta[ 1 ] = d * data[ rowPtr + 1 ] - g * data[ rowPtr + 3 ] - b * data[ rowPtr + 5 ] - e * data[ rowPtr + 7 ]; + beta[ 2 ] = e * data[ rowPtr + 1 ] - b * data[ rowPtr + 3 ] + g * data[ rowPtr + 5 ] + d * data[ rowPtr + 7 ]; + beta[ 3 ] = g * data[ rowPtr + 1 ] - e * data[ rowPtr + 3 ] + d * data[ rowPtr + 5 ] - b * data[ rowPtr + 7 ]; + + theta[ 0 ] = a * ( data[ rowPtr + 0 ] + data[ rowPtr + 4 ] ); + theta[ 3 ] = a * ( data[ rowPtr + 0 ] - data[ rowPtr + 4 ] ); + theta[ 1 ] = alpha[ 0 ] + alpha[ 3 ]; + theta[ 2 ] = alpha[ 1 ] - alpha[ 2 ]; + + gamma[ 0 ] = theta[ 0 ] + theta[ 1 ]; + gamma[ 1 ] = theta[ 3 ] + theta[ 2 ]; + gamma[ 2 ] = theta[ 3 ] - theta[ 2 ]; + gamma[ 3 ] = theta[ 0 ] - theta[ 1 ]; + + data[ rowPtr + 0 ] = gamma[ 0 ] + beta[ 0 ]; + data[ rowPtr + 1 ] = gamma[ 1 ] + beta[ 1 ]; + data[ rowPtr + 2 ] = gamma[ 2 ] + beta[ 2 ]; + data[ rowPtr + 3 ] = gamma[ 3 ] + beta[ 3 ]; + + data[ rowPtr + 4 ] = gamma[ 3 ] - beta[ 3 ]; + data[ rowPtr + 5 ] = gamma[ 2 ] - beta[ 2 ]; + data[ rowPtr + 6 ] = gamma[ 1 ] - beta[ 1 ]; + data[ rowPtr + 7 ] = gamma[ 0 ] - beta[ 0 ]; + + } + + for ( let column = 0; column < 8; ++ column ) { + + alpha[ 0 ] = c * data[ 16 + column ]; + alpha[ 1 ] = f * data[ 16 + column ]; + alpha[ 2 ] = c * data[ 48 + column ]; + alpha[ 3 ] = f * data[ 48 + column ]; + + beta[ 0 ] = b * data[ 8 + column ] + d * data[ 24 + column ] + e * data[ 40 + column ] + g * data[ 56 + column ]; + beta[ 1 ] = d * data[ 8 + column ] - g * data[ 24 + column ] - b * data[ 40 + column ] - e * data[ 56 + column ]; + beta[ 2 ] = e * data[ 8 + column ] - b * data[ 24 + column ] + g * data[ 40 + column ] + d * data[ 56 + column ]; + beta[ 3 ] = g * data[ 8 + column ] - e * data[ 24 + column ] + d * data[ 40 + column ] - b * data[ 56 + column ]; + + theta[ 0 ] = a * ( data[ column ] + data[ 32 + column ] ); + theta[ 3 ] = a * ( data[ column ] - data[ 32 + column ] ); + + theta[ 1 ] = alpha[ 0 ] + alpha[ 3 ]; + theta[ 2 ] = alpha[ 1 ] - alpha[ 2 ]; + + gamma[ 0 ] = theta[ 0 ] + theta[ 1 ]; + gamma[ 1 ] = theta[ 3 ] + theta[ 2 ]; + gamma[ 2 ] = theta[ 3 ] - theta[ 2 ]; + gamma[ 3 ] = theta[ 0 ] - theta[ 1 ]; + + data[ 0 + column ] = gamma[ 0 ] + beta[ 0 ]; + data[ 8 + column ] = gamma[ 1 ] + beta[ 1 ]; + data[ 16 + column ] = gamma[ 2 ] + beta[ 2 ]; + data[ 24 + column ] = gamma[ 3 ] + beta[ 3 ]; + + data[ 32 + column ] = gamma[ 3 ] - beta[ 3 ]; + data[ 40 + column ] = gamma[ 2 ] - beta[ 2 ]; + data[ 48 + column ] = gamma[ 1 ] - beta[ 1 ]; + data[ 56 + column ] = gamma[ 0 ] - beta[ 0 ]; + + } + + } + + function csc709Inverse( data ) { + + for ( let i = 0; i < 64; ++ i ) { + + const y = data[ 0 ][ i ]; + const cb = data[ 1 ][ i ]; + const cr = data[ 2 ][ i ]; + + data[ 0 ][ i ] = y + 1.5747 * cr; + data[ 1 ][ i ] = y - 0.1873 * cb - 0.4682 * cr; + data[ 2 ][ i ] = y + 1.8556 * cb; + + } + + } + + function convertToHalf( src, dst, idx ) { + + for ( let i = 0; i < 64; ++ i ) { + + dst[ idx + i ] = DataUtils.toHalfFloat( toLinear( src[ i ] ) ); + + } + + } + + function toLinear( float ) { + + if ( float <= 1 ) { + + return Math.sign( float ) * Math.pow( Math.abs( float ), 2.2 ); + + } else { + + return Math.sign( float ) * Math.pow( logBase, Math.abs( float ) - 1.0 ); + + } + + } + + function uncompressRAW( info ) { + + return new DataView( info.array.buffer, info.offset.value, info.size ); + + } + + function uncompressRLE( info ) { + + const compressed = info.viewer.buffer.slice( info.offset.value, info.offset.value + info.size ); + + const rawBuffer = new Uint8Array( decodeRunLength( compressed ) ); + const tmpBuffer = new Uint8Array( rawBuffer.length ); + + predictor( rawBuffer ); // revert predictor + + interleaveScalar( rawBuffer, tmpBuffer ); // interleave pixels + + return new DataView( tmpBuffer.buffer ); + + } + + function uncompressZIP( info ) { + + const compressed = info.array.slice( info.offset.value, info.offset.value + info.size ); + + const rawBuffer = fflate.unzlibSync( compressed ); + const tmpBuffer = new Uint8Array( rawBuffer.length ); + + predictor( rawBuffer ); // revert predictor + + interleaveScalar( rawBuffer, tmpBuffer ); // interleave pixels + + return new DataView( tmpBuffer.buffer ); + + } + + function uncompressPIZ( info ) { + + const inDataView = info.viewer; + const inOffset = { value: info.offset.value }; + + const outBuffer = new Uint16Array( info.columns * info.lines * ( info.inputChannels.length * info.type ) ); + const bitmap = new Uint8Array( BITMAP_SIZE ); + + // Setup channel info + let outBufferEnd = 0; + const pizChannelData = new Array( info.inputChannels.length ); + for ( let i = 0, il = info.inputChannels.length; i < il; i ++ ) { + + pizChannelData[ i ] = {}; + pizChannelData[ i ][ 'start' ] = outBufferEnd; + pizChannelData[ i ][ 'end' ] = pizChannelData[ i ][ 'start' ]; + pizChannelData[ i ][ 'nx' ] = info.columns; + pizChannelData[ i ][ 'ny' ] = info.lines; + pizChannelData[ i ][ 'size' ] = info.type; + + outBufferEnd += pizChannelData[ i ].nx * pizChannelData[ i ].ny * pizChannelData[ i ].size; + + } + + // Read range compression data + + const minNonZero = parseUint16( inDataView, inOffset ); + const maxNonZero = parseUint16( inDataView, inOffset ); + + if ( maxNonZero >= BITMAP_SIZE ) { + + throw new Error( 'Something is wrong with PIZ_COMPRESSION BITMAP_SIZE' ); + + } + + if ( minNonZero <= maxNonZero ) { + + for ( let i = 0; i < maxNonZero - minNonZero + 1; i ++ ) { + + bitmap[ i + minNonZero ] = parseUint8( inDataView, inOffset ); + + } + + } + + // Reverse LUT + const lut = new Uint16Array( USHORT_RANGE ); + const maxValue = reverseLutFromBitmap( bitmap, lut ); + + const length = parseUint32( inDataView, inOffset ); + + // Huffman decoding + hufUncompress( info.array, inDataView, inOffset, length, outBuffer, outBufferEnd ); + + // Wavelet decoding + for ( let i = 0; i < info.inputChannels.length; ++ i ) { + + const cd = pizChannelData[ i ]; + + for ( let j = 0; j < pizChannelData[ i ].size; ++ j ) { + + wav2Decode( + outBuffer, + cd.start + j, + cd.nx, + cd.size, + cd.ny, + cd.nx * cd.size, + maxValue + ); + + } + + } + + // Expand the pixel data to their original range + applyLut( lut, outBuffer, outBufferEnd ); + + // Rearrange the pixel data into the format expected by the caller. + let tmpOffset = 0; + const tmpBuffer = new Uint8Array( outBuffer.buffer.byteLength ); + for ( let y = 0; y < info.lines; y ++ ) { + + for ( let c = 0; c < info.inputChannels.length; c ++ ) { + + const cd = pizChannelData[ c ]; + + const n = cd.nx * cd.size; + const cp = new Uint8Array( outBuffer.buffer, cd.end * INT16_SIZE, n * INT16_SIZE ); + + tmpBuffer.set( cp, tmpOffset ); + tmpOffset += n * INT16_SIZE; + cd.end += n; + + } + + } + + return new DataView( tmpBuffer.buffer ); + + } + + function uncompressPXR( info ) { + + const compressed = info.array.slice( info.offset.value, info.offset.value + info.size ); + + const rawBuffer = fflate.unzlibSync( compressed ); + + const byteSize = info.inputChannels.length * info.lines * info.columns * info.totalBytes; + const tmpBuffer = new ArrayBuffer( byteSize ); + const viewer = new DataView( tmpBuffer ); + + let tmpBufferEnd = 0; + let writePtr = 0; + const ptr = new Array( 4 ); + + for ( let y = 0; y < info.lines; y ++ ) { + + for ( let c = 0; c < info.inputChannels.length; c ++ ) { + + let pixel = 0; + + const type = info.inputChannels[ c ].pixelType; + switch ( type ) { + + case 1: + + ptr[ 0 ] = tmpBufferEnd; + ptr[ 1 ] = ptr[ 0 ] + info.columns; + tmpBufferEnd = ptr[ 1 ] + info.columns; + + for ( let j = 0; j < info.columns; ++ j ) { + + const diff = ( rawBuffer[ ptr[ 0 ] ++ ] << 8 ) | rawBuffer[ ptr[ 1 ] ++ ]; + + pixel += diff; + + viewer.setUint16( writePtr, pixel, true ); + writePtr += 2; + + } + + break; + + case 2: + + ptr[ 0 ] = tmpBufferEnd; + ptr[ 1 ] = ptr[ 0 ] + info.columns; + ptr[ 2 ] = ptr[ 1 ] + info.columns; + tmpBufferEnd = ptr[ 2 ] + info.columns; + + for ( let j = 0; j < info.columns; ++ j ) { + + const diff = ( rawBuffer[ ptr[ 0 ] ++ ] << 24 ) | ( rawBuffer[ ptr[ 1 ] ++ ] << 16 ) | ( rawBuffer[ ptr[ 2 ] ++ ] << 8 ); + + pixel += diff; + + viewer.setUint32( writePtr, pixel, true ); + writePtr += 4; + + } + + break; + + } + + } + + } + + return viewer; + + } + + function uncompressDWA( info ) { + + const inDataView = info.viewer; + const inOffset = { value: info.offset.value }; + const outBuffer = new Uint8Array( info.columns * info.lines * ( info.inputChannels.length * info.type * INT16_SIZE ) ); + + // Read compression header information + const dwaHeader = { + + version: parseInt64( inDataView, inOffset ), + unknownUncompressedSize: parseInt64( inDataView, inOffset ), + unknownCompressedSize: parseInt64( inDataView, inOffset ), + acCompressedSize: parseInt64( inDataView, inOffset ), + dcCompressedSize: parseInt64( inDataView, inOffset ), + rleCompressedSize: parseInt64( inDataView, inOffset ), + rleUncompressedSize: parseInt64( inDataView, inOffset ), + rleRawSize: parseInt64( inDataView, inOffset ), + totalAcUncompressedCount: parseInt64( inDataView, inOffset ), + totalDcUncompressedCount: parseInt64( inDataView, inOffset ), + acCompression: parseInt64( inDataView, inOffset ) + + }; + + if ( dwaHeader.version < 2 ) + throw new Error( 'EXRLoader.parse: ' + EXRHeader.compression + ' version ' + dwaHeader.version + ' is unsupported' ); + + // Read channel ruleset information + const channelRules = new Array(); + let ruleSize = parseUint16( inDataView, inOffset ) - INT16_SIZE; + + while ( ruleSize > 0 ) { + + const name = parseNullTerminatedString( inDataView.buffer, inOffset ); + const value = parseUint8( inDataView, inOffset ); + const compression = ( value >> 2 ) & 3; + const csc = ( value >> 4 ) - 1; + const index = new Int8Array( [ csc ] )[ 0 ]; + const type = parseUint8( inDataView, inOffset ); + + channelRules.push( { + name: name, + index: index, + type: type, + compression: compression, + } ); + + ruleSize -= name.length + 3; + + } + + // Classify channels + const channels = EXRHeader.channels; + const channelData = new Array( info.inputChannels.length ); + + for ( let i = 0; i < info.inputChannels.length; ++ i ) { + + const cd = channelData[ i ] = {}; + const channel = channels[ i ]; + + cd.name = channel.name; + cd.compression = UNKNOWN; + cd.decoded = false; + cd.type = channel.pixelType; + cd.pLinear = channel.pLinear; + cd.width = info.columns; + cd.height = info.lines; + + } + + const cscSet = { + idx: new Array( 3 ) + }; + + for ( let offset = 0; offset < info.inputChannels.length; ++ offset ) { + + const cd = channelData[ offset ]; + + for ( let i = 0; i < channelRules.length; ++ i ) { + + const rule = channelRules[ i ]; + + if ( cd.name == rule.name ) { + + cd.compression = rule.compression; + + if ( rule.index >= 0 ) { + + cscSet.idx[ rule.index ] = offset; + + } + + cd.offset = offset; + + } + + } + + } + + let acBuffer, dcBuffer, rleBuffer; + + // Read DCT - AC component data + if ( dwaHeader.acCompressedSize > 0 ) { + + switch ( dwaHeader.acCompression ) { + + case STATIC_HUFFMAN: + + acBuffer = new Uint16Array( dwaHeader.totalAcUncompressedCount ); + hufUncompress( info.array, inDataView, inOffset, dwaHeader.acCompressedSize, acBuffer, dwaHeader.totalAcUncompressedCount ); + break; + + case DEFLATE: + + const compressed = info.array.slice( inOffset.value, inOffset.value + dwaHeader.totalAcUncompressedCount ); + const data = fflate.unzlibSync( compressed ); + acBuffer = new Uint16Array( data.buffer ); + inOffset.value += dwaHeader.totalAcUncompressedCount; + break; + + } + + + } + + // Read DCT - DC component data + if ( dwaHeader.dcCompressedSize > 0 ) { + + const zlibInfo = { + array: info.array, + offset: inOffset, + size: dwaHeader.dcCompressedSize + }; + dcBuffer = new Uint16Array( uncompressZIP( zlibInfo ).buffer ); + inOffset.value += dwaHeader.dcCompressedSize; + + } + + // Read RLE compressed data + if ( dwaHeader.rleRawSize > 0 ) { + + const compressed = info.array.slice( inOffset.value, inOffset.value + dwaHeader.rleCompressedSize ); + const data = fflate.unzlibSync( compressed ); + rleBuffer = decodeRunLength( data.buffer ); + + inOffset.value += dwaHeader.rleCompressedSize; + + } + + // Prepare outbuffer data offset + let outBufferEnd = 0; + const rowOffsets = new Array( channelData.length ); + for ( let i = 0; i < rowOffsets.length; ++ i ) { + + rowOffsets[ i ] = new Array(); + + } + + for ( let y = 0; y < info.lines; ++ y ) { + + for ( let chan = 0; chan < channelData.length; ++ chan ) { + + rowOffsets[ chan ].push( outBufferEnd ); + outBufferEnd += channelData[ chan ].width * info.type * INT16_SIZE; + + } + + } + + // Lossy DCT decode RGB channels + lossyDctDecode( cscSet, rowOffsets, channelData, acBuffer, dcBuffer, outBuffer ); + + // Decode other channels + for ( let i = 0; i < channelData.length; ++ i ) { + + const cd = channelData[ i ]; + + if ( cd.decoded ) continue; + + switch ( cd.compression ) { + + case RLE: + + let row = 0; + let rleOffset = 0; + + for ( let y = 0; y < info.lines; ++ y ) { + + let rowOffsetBytes = rowOffsets[ i ][ row ]; + + for ( let x = 0; x < cd.width; ++ x ) { + + for ( let byte = 0; byte < INT16_SIZE * cd.type; ++ byte ) { + + outBuffer[ rowOffsetBytes ++ ] = rleBuffer[ rleOffset + byte * cd.width * cd.height ]; + + } + + rleOffset ++; + + } + + row ++; + + } + + break; + + case LOSSY_DCT: // skip + + default: + throw new Error( 'EXRLoader.parse: unsupported channel compression' ); + + } + + } + + return new DataView( outBuffer.buffer ); + + } + + function parseNullTerminatedString( buffer, offset ) { + + const uintBuffer = new Uint8Array( buffer ); + let endOffset = 0; + + while ( uintBuffer[ offset.value + endOffset ] != 0 ) { + + endOffset += 1; + + } + + const stringValue = new TextDecoder().decode( + uintBuffer.slice( offset.value, offset.value + endOffset ) + ); + + offset.value = offset.value + endOffset + 1; + + return stringValue; + + } + + function parseFixedLengthString( buffer, offset, size ) { + + const stringValue = new TextDecoder().decode( + new Uint8Array( buffer ).slice( offset.value, offset.value + size ) + ); + + offset.value = offset.value + size; + + return stringValue; + + } + + function parseRational( dataView, offset ) { + + const x = parseInt32( dataView, offset ); + const y = parseUint32( dataView, offset ); + + return [ x, y ]; + + } + + function parseTimecode( dataView, offset ) { + + const x = parseUint32( dataView, offset ); + const y = parseUint32( dataView, offset ); + + return [ x, y ]; + + } + + function parseInt32( dataView, offset ) { + + const Int32 = dataView.getInt32( offset.value, true ); + + offset.value = offset.value + INT32_SIZE; + + return Int32; + + } + + function parseUint32( dataView, offset ) { + + const Uint32 = dataView.getUint32( offset.value, true ); + + offset.value = offset.value + INT32_SIZE; + + return Uint32; + + } + + function parseUint8Array( uInt8Array, offset ) { + + const Uint8 = uInt8Array[ offset.value ]; + + offset.value = offset.value + INT8_SIZE; + + return Uint8; + + } + + function parseUint8( dataView, offset ) { + + const Uint8 = dataView.getUint8( offset.value ); + + offset.value = offset.value + INT8_SIZE; + + return Uint8; + + } + + const parseInt64 = function ( dataView, offset ) { + + let int; + + if ( 'getBigInt64' in DataView.prototype ) { + + int = Number( dataView.getBigInt64( offset.value, true ) ); + + } else { + + int = dataView.getUint32( offset.value + 4, true ) + Number( dataView.getUint32( offset.value, true ) << 32 ); + + } + + offset.value += ULONG_SIZE; + + return int; + + }; + + function parseFloat32( dataView, offset ) { + + const float = dataView.getFloat32( offset.value, true ); + + offset.value += FLOAT32_SIZE; + + return float; + + } + + function decodeFloat32( dataView, offset ) { + + return DataUtils.toHalfFloat( parseFloat32( dataView, offset ) ); + + } + + // https://stackoverflow.com/questions/5678432/decompressing-half-precision-floats-in-javascript + function decodeFloat16( binary ) { + + const exponent = ( binary & 0x7C00 ) >> 10, + fraction = binary & 0x03FF; + + return ( binary >> 15 ? - 1 : 1 ) * ( + exponent ? + ( + exponent === 0x1F ? + fraction ? NaN : Infinity : + Math.pow( 2, exponent - 15 ) * ( 1 + fraction / 0x400 ) + ) : + 6.103515625e-5 * ( fraction / 0x400 ) + ); + + } + + function parseUint16( dataView, offset ) { + + const Uint16 = dataView.getUint16( offset.value, true ); + + offset.value += INT16_SIZE; + + return Uint16; + + } + + function parseFloat16( buffer, offset ) { + + return decodeFloat16( parseUint16( buffer, offset ) ); + + } + + function parseChlist( dataView, buffer, offset, size ) { + + const startOffset = offset.value; + const channels = []; + + while ( offset.value < ( startOffset + size - 1 ) ) { + + const name = parseNullTerminatedString( buffer, offset ); + const pixelType = parseInt32( dataView, offset ); + const pLinear = parseUint8( dataView, offset ); + offset.value += 3; // reserved, three chars + const xSampling = parseInt32( dataView, offset ); + const ySampling = parseInt32( dataView, offset ); + + channels.push( { + name: name, + pixelType: pixelType, + pLinear: pLinear, + xSampling: xSampling, + ySampling: ySampling + } ); + + } + + offset.value += 1; + + return channels; + + } + + function parseChromaticities( dataView, offset ) { + + const redX = parseFloat32( dataView, offset ); + const redY = parseFloat32( dataView, offset ); + const greenX = parseFloat32( dataView, offset ); + const greenY = parseFloat32( dataView, offset ); + const blueX = parseFloat32( dataView, offset ); + const blueY = parseFloat32( dataView, offset ); + const whiteX = parseFloat32( dataView, offset ); + const whiteY = parseFloat32( dataView, offset ); + + return { redX: redX, redY: redY, greenX: greenX, greenY: greenY, blueX: blueX, blueY: blueY, whiteX: whiteX, whiteY: whiteY }; + + } + + function parseCompression( dataView, offset ) { + + const compressionCodes = [ + 'NO_COMPRESSION', + 'RLE_COMPRESSION', + 'ZIPS_COMPRESSION', + 'ZIP_COMPRESSION', + 'PIZ_COMPRESSION', + 'PXR24_COMPRESSION', + 'B44_COMPRESSION', + 'B44A_COMPRESSION', + 'DWAA_COMPRESSION', + 'DWAB_COMPRESSION' + ]; + + const compression = parseUint8( dataView, offset ); + + return compressionCodes[ compression ]; + + } + + function parseBox2i( dataView, offset ) { + + const xMin = parseInt32( dataView, offset ); + const yMin = parseInt32( dataView, offset ); + const xMax = parseInt32( dataView, offset ); + const yMax = parseInt32( dataView, offset ); + + return { xMin: xMin, yMin: yMin, xMax: xMax, yMax: yMax }; + + } + + function parseLineOrder( dataView, offset ) { + + const lineOrders = [ + 'INCREASING_Y', + 'DECREASING_Y', + 'RANDOM_Y', + ]; + + const lineOrder = parseUint8( dataView, offset ); + + return lineOrders[ lineOrder ]; + + } + + function parseEnvmap( dataView, offset ) { + + const envmaps = [ + 'ENVMAP_LATLONG', + 'ENVMAP_CUBE' + ]; + + const envmap = parseUint8( dataView, offset ); + + return envmaps[ envmap ]; + + } + + function parseTiledesc( dataView, offset ) { + + const levelModes = [ + 'ONE_LEVEL', + 'MIPMAP_LEVELS', + 'RIPMAP_LEVELS', + ]; + + const roundingModes = [ + 'ROUND_DOWN', + 'ROUND_UP', + ]; + + const xSize = parseUint32( dataView, offset ); + const ySize = parseUint32( dataView, offset ); + const modes = parseUint8( dataView, offset ); + + return { + xSize: xSize, + ySize: ySize, + levelMode: levelModes[ modes & 0xf ], + roundingMode: roundingModes[ modes >> 4 ] + }; + + } + + function parseV2f( dataView, offset ) { + + const x = parseFloat32( dataView, offset ); + const y = parseFloat32( dataView, offset ); + + return [ x, y ]; + + } + + function parseV3f( dataView, offset ) { + + const x = parseFloat32( dataView, offset ); + const y = parseFloat32( dataView, offset ); + const z = parseFloat32( dataView, offset ); + + return [ x, y, z ]; + + } + + function parseValue( dataView, buffer, offset, type, size ) { + + if ( type === 'string' || type === 'stringvector' || type === 'iccProfile' ) { + + return parseFixedLengthString( buffer, offset, size ); + + } else if ( type === 'chlist' ) { + + return parseChlist( dataView, buffer, offset, size ); + + } else if ( type === 'chromaticities' ) { + + return parseChromaticities( dataView, offset ); + + } else if ( type === 'compression' ) { + + return parseCompression( dataView, offset ); + + } else if ( type === 'box2i' ) { + + return parseBox2i( dataView, offset ); + + } else if ( type === 'envmap' ) { + + return parseEnvmap( dataView, offset ); + + } else if ( type === 'tiledesc' ) { + + return parseTiledesc( dataView, offset ); + + } else if ( type === 'lineOrder' ) { + + return parseLineOrder( dataView, offset ); + + } else if ( type === 'float' ) { + + return parseFloat32( dataView, offset ); + + } else if ( type === 'v2f' ) { + + return parseV2f( dataView, offset ); + + } else if ( type === 'v3f' ) { + + return parseV3f( dataView, offset ); + + } else if ( type === 'int' ) { + + return parseInt32( dataView, offset ); + + } else if ( type === 'rational' ) { + + return parseRational( dataView, offset ); + + } else if ( type === 'timecode' ) { + + return parseTimecode( dataView, offset ); + + } else if ( type === 'preview' ) { + + offset.value += size; + return 'skipped'; + + } else { + + offset.value += size; + return undefined; + + } + + } + + function roundLog2( x, mode ) { + + const log2 = Math.log2( x ); + return mode == 'ROUND_DOWN' ? Math.floor( log2 ) : Math.ceil( log2 ); + + } + + function calculateTileLevels( tiledesc, w, h ) { + + let num = 0; + + switch ( tiledesc.levelMode ) { + + case 'ONE_LEVEL': + num = 1; + break; + + case 'MIPMAP_LEVELS': + num = roundLog2( Math.max( w, h ), tiledesc.roundingMode ) + 1; + break; + + case 'RIPMAP_LEVELS': + throw new Error( 'THREE.EXRLoader: RIPMAP_LEVELS tiles currently unsupported.' ); + + } + + return num; + + } + + function calculateTiles( count, dataSize, size, roundingMode ) { + + const tiles = new Array( count ); + + for ( let i = 0; i < count; i ++ ) { + + const b = ( 1 << i ); + let s = ( dataSize / b ) | 0; + + if ( roundingMode == 'ROUND_UP' && s * b < dataSize ) s += 1; + + const l = Math.max( s, 1 ); + + tiles[ i ] = ( ( l + size - 1 ) / size ) | 0; + + } + + return tiles; + + } + + function parseTiles() { + + const EXRDecoder = this; + const offset = EXRDecoder.offset; + const tmpOffset = { value: 0 }; + + for ( let tile = 0; tile < EXRDecoder.tileCount; tile ++ ) { + + const tileX = parseInt32( EXRDecoder.viewer, offset ); + const tileY = parseInt32( EXRDecoder.viewer, offset ); + offset.value += 8; // skip levels - only parsing top-level + EXRDecoder.size = parseUint32( EXRDecoder.viewer, offset ); + + const startX = tileX * EXRDecoder.blockWidth; + const startY = tileY * EXRDecoder.blockHeight; + EXRDecoder.columns = ( startX + EXRDecoder.blockWidth > EXRDecoder.width ) ? EXRDecoder.width - startX : EXRDecoder.blockWidth; + EXRDecoder.lines = ( startY + EXRDecoder.blockHeight > EXRDecoder.height ) ? EXRDecoder.height - startY : EXRDecoder.blockHeight; + + const bytesBlockLine = EXRDecoder.columns * EXRDecoder.totalBytes; + const isCompressed = EXRDecoder.size < EXRDecoder.lines * bytesBlockLine; + const viewer = isCompressed ? EXRDecoder.uncompress( EXRDecoder ) : uncompressRAW( EXRDecoder ); + + offset.value += EXRDecoder.size; + + for ( let line = 0; line < EXRDecoder.lines; line ++ ) { + + const lineOffset = line * EXRDecoder.columns * EXRDecoder.totalBytes; + + for ( let channelID = 0; channelID < EXRDecoder.inputChannels.length; channelID ++ ) { + + const name = EXRHeader.channels[ channelID ].name; + const lOff = EXRDecoder.channelByteOffsets[ name ] * EXRDecoder.columns; + const cOff = EXRDecoder.decodeChannels[ name ]; + + if ( cOff === undefined ) continue; + + tmpOffset.value = lineOffset + lOff; + const outLineOffset = ( EXRDecoder.height - ( 1 + startY + line ) ) * EXRDecoder.outLineWidth; + + for ( let x = 0; x < EXRDecoder.columns; x ++ ) { + + const outIndex = outLineOffset + ( x + startX ) * EXRDecoder.outputChannels + cOff; + EXRDecoder.byteArray[ outIndex ] = EXRDecoder.getter( viewer, tmpOffset ); + + } + + } + + } + + } + + } + + function parseScanline() { + + const EXRDecoder = this; + const offset = EXRDecoder.offset; + const tmpOffset = { value: 0 }; + + for ( let scanlineBlockIdx = 0; scanlineBlockIdx < EXRDecoder.height / EXRDecoder.blockHeight; scanlineBlockIdx ++ ) { + + const line = parseInt32( EXRDecoder.viewer, offset ) - EXRHeader.dataWindow.yMin; // line_no + EXRDecoder.size = parseUint32( EXRDecoder.viewer, offset ); // data_len + EXRDecoder.lines = ( ( line + EXRDecoder.blockHeight > EXRDecoder.height ) ? ( EXRDecoder.height - line ) : EXRDecoder.blockHeight ); + + const bytesPerLine = EXRDecoder.columns * EXRDecoder.totalBytes; + const isCompressed = EXRDecoder.size < EXRDecoder.lines * bytesPerLine; + const viewer = isCompressed ? EXRDecoder.uncompress( EXRDecoder ) : uncompressRAW( EXRDecoder ); + + offset.value += EXRDecoder.size; + + for ( let line_y = 0; line_y < EXRDecoder.blockHeight; line_y ++ ) { + + const scan_y = scanlineBlockIdx * EXRDecoder.blockHeight; + const true_y = line_y + EXRDecoder.scanOrder( scan_y ); + if ( true_y >= EXRDecoder.height ) continue; + + const lineOffset = line_y * bytesPerLine; + const outLineOffset = ( EXRDecoder.height - 1 - true_y ) * EXRDecoder.outLineWidth; + + for ( let channelID = 0; channelID < EXRDecoder.inputChannels.length; channelID ++ ) { + + const name = EXRHeader.channels[ channelID ].name; + const lOff = EXRDecoder.channelByteOffsets[ name ] * EXRDecoder.columns; + const cOff = EXRDecoder.decodeChannels[ name ]; + + if ( cOff === undefined ) continue; + + tmpOffset.value = lineOffset + lOff; + + for ( let x = 0; x < EXRDecoder.columns; x ++ ) { + + const outIndex = outLineOffset + x * EXRDecoder.outputChannels + cOff; + EXRDecoder.byteArray[ outIndex ] = EXRDecoder.getter( viewer, tmpOffset ); + + } + + } + + } + + } + + } + + function parseHeader( dataView, buffer, offset ) { + + const EXRHeader = {}; + + if ( dataView.getUint32( 0, true ) != 20000630 ) { // magic + + throw new Error( 'THREE.EXRLoader: Provided file doesn\'t appear to be in OpenEXR format.' ); + + } + + EXRHeader.version = dataView.getUint8( 4 ); + + const spec = dataView.getUint8( 5 ); // fullMask + + EXRHeader.spec = { + singleTile: !! ( spec & 2 ), + longName: !! ( spec & 4 ), + deepFormat: !! ( spec & 8 ), + multiPart: !! ( spec & 16 ), + }; + + // start of header + + offset.value = 8; // start at 8 - after pre-amble + + let keepReading = true; + + while ( keepReading ) { + + const attributeName = parseNullTerminatedString( buffer, offset ); + + if ( attributeName == 0 ) { + + keepReading = false; + + } else { + + const attributeType = parseNullTerminatedString( buffer, offset ); + const attributeSize = parseUint32( dataView, offset ); + const attributeValue = parseValue( dataView, buffer, offset, attributeType, attributeSize ); + + if ( attributeValue === undefined ) { + + console.warn( `THREE.EXRLoader: Skipped unknown header attribute type \'${attributeType}\'.` ); + + } else { + + EXRHeader[ attributeName ] = attributeValue; + + } + + } + + } + + if ( ( spec & ~ 0x06 ) != 0 ) { // unsupported deep-image, multi-part + + console.error( 'THREE.EXRHeader:', EXRHeader ); + throw new Error( 'THREE.EXRLoader: Provided file is currently unsupported.' ); + + } + + return EXRHeader; + + } + + function setupDecoder( EXRHeader, dataView, uInt8Array, offset, outputType ) { + + const EXRDecoder = { + size: 0, + viewer: dataView, + array: uInt8Array, + offset: offset, + width: EXRHeader.dataWindow.xMax - EXRHeader.dataWindow.xMin + 1, + height: EXRHeader.dataWindow.yMax - EXRHeader.dataWindow.yMin + 1, + inputChannels: EXRHeader.channels, + channelByteOffsets: {}, + scanOrder: null, + totalBytes: null, + columns: null, + lines: null, + type: null, + uncompress: null, + getter: null, + format: null, + colorSpace: LinearSRGBColorSpace, + }; + + switch ( EXRHeader.compression ) { + + case 'NO_COMPRESSION': + EXRDecoder.blockHeight = 1; + EXRDecoder.uncompress = uncompressRAW; + break; + + case 'RLE_COMPRESSION': + EXRDecoder.blockHeight = 1; + EXRDecoder.uncompress = uncompressRLE; + break; + + case 'ZIPS_COMPRESSION': + EXRDecoder.blockHeight = 1; + EXRDecoder.uncompress = uncompressZIP; + break; + + case 'ZIP_COMPRESSION': + EXRDecoder.blockHeight = 16; + EXRDecoder.uncompress = uncompressZIP; + break; + + case 'PIZ_COMPRESSION': + EXRDecoder.blockHeight = 32; + EXRDecoder.uncompress = uncompressPIZ; + break; + + case 'PXR24_COMPRESSION': + EXRDecoder.blockHeight = 16; + EXRDecoder.uncompress = uncompressPXR; + break; + + case 'DWAA_COMPRESSION': + EXRDecoder.blockHeight = 32; + EXRDecoder.uncompress = uncompressDWA; + break; + + case 'DWAB_COMPRESSION': + EXRDecoder.blockHeight = 256; + EXRDecoder.uncompress = uncompressDWA; + break; + + default: + throw new Error( 'EXRLoader.parse: ' + EXRHeader.compression + ' is unsupported' ); + + } + + const channels = {}; + for ( const channel of EXRHeader.channels ) { + + switch ( channel.name ) { + + case 'Y': + case 'R': + case 'G': + case 'B': + case 'A': + channels[ channel.name ] = true; + EXRDecoder.type = channel.pixelType; + + } + + } + + // RGB images will be converted to RGBA format, preventing software emulation in select devices. + let fillAlpha = false; + + if ( channels.R && channels.G && channels.B ) { + + fillAlpha = ! channels.A; + EXRDecoder.outputChannels = 4; + EXRDecoder.decodeChannels = { R: 0, G: 1, B: 2, A: 3 }; + + } else if ( channels.Y ) { + + EXRDecoder.outputChannels = 1; + EXRDecoder.decodeChannels = { Y: 0 }; + + } else { + + throw new Error( 'EXRLoader.parse: file contains unsupported data channels.' ); + + } + + if ( EXRDecoder.type == 1 ) { + + // half + switch ( outputType ) { + + case FloatType: + EXRDecoder.getter = parseFloat16; + break; + + case HalfFloatType: + EXRDecoder.getter = parseUint16; + break; + + } + + } else if ( EXRDecoder.type == 2 ) { + + // float + switch ( outputType ) { + + case FloatType: + EXRDecoder.getter = parseFloat32; + break; + + case HalfFloatType: + EXRDecoder.getter = decodeFloat32; + + } + + } else { + + throw new Error( 'EXRLoader.parse: unsupported pixelType ' + EXRDecoder.type + ' for ' + EXRHeader.compression + '.' ); + + } + + EXRDecoder.columns = EXRDecoder.width; + const size = EXRDecoder.width * EXRDecoder.height * EXRDecoder.outputChannels; + + switch ( outputType ) { + + case FloatType: + EXRDecoder.byteArray = new Float32Array( size ); + + // Fill initially with 1s for the alpha value if the texture is not RGBA, RGB values will be overwritten + if ( fillAlpha ) + EXRDecoder.byteArray.fill( 1, 0, size ); + + break; + + case HalfFloatType: + EXRDecoder.byteArray = new Uint16Array( size ); + + if ( fillAlpha ) + EXRDecoder.byteArray.fill( 0x3C00, 0, size ); // Uint16Array holds half float data, 0x3C00 is 1 + + break; + + default: + console.error( 'THREE.EXRLoader: unsupported type: ', outputType ); + break; + + } + + let byteOffset = 0; + for ( const channel of EXRHeader.channels ) { + + if ( EXRDecoder.decodeChannels[ channel.name ] !== undefined ) { + + EXRDecoder.channelByteOffsets[ channel.name ] = byteOffset; + + } + + byteOffset += channel.pixelType * 2; + + } + + EXRDecoder.totalBytes = byteOffset; + EXRDecoder.outLineWidth = EXRDecoder.width * EXRDecoder.outputChannels; + + if ( EXRHeader.lineOrder === 'INCREASING_Y' ) { + + EXRDecoder.scanOrder = ( y ) => y; + + } else { + + EXRDecoder.scanOrder = ( y ) => EXRDecoder.height - 1 - y; + + } + + if ( EXRDecoder.outputChannels == 4 ) { + + EXRDecoder.format = RGBAFormat; + EXRDecoder.colorSpace = LinearSRGBColorSpace; + + } else { + + EXRDecoder.format = RedFormat; + EXRDecoder.colorSpace = NoColorSpace; + + } + + if ( EXRHeader.spec.singleTile ) { + + EXRDecoder.blockHeight = EXRHeader.tiles.ySize; + EXRDecoder.blockWidth = EXRHeader.tiles.xSize; + + const numXLevels = calculateTileLevels( EXRHeader.tiles, EXRDecoder.width, EXRDecoder.height ); + // const numYLevels = calculateTileLevels( EXRHeader.tiles, EXRDecoder.width, EXRDecoder.height ); + + const numXTiles = calculateTiles( numXLevels, EXRDecoder.width, EXRHeader.tiles.xSize, EXRHeader.tiles.roundingMode ); + const numYTiles = calculateTiles( numXLevels, EXRDecoder.height, EXRHeader.tiles.ySize, EXRHeader.tiles.roundingMode ); + + EXRDecoder.tileCount = numXTiles[ 0 ] * numYTiles[ 0 ]; + + for ( let l = 0; l < numXLevels; l ++ ) + for ( let y = 0; y < numYTiles[ l ]; y ++ ) + for ( let x = 0; x < numXTiles[ l ]; x ++ ) + parseInt64( dataView, offset ); // tileOffset + + EXRDecoder.decode = parseTiles.bind( EXRDecoder ); + + } else { + + EXRDecoder.blockWidth = EXRDecoder.width; + const blockCount = Math.ceil( EXRDecoder.height / EXRDecoder.blockHeight ); + + for ( let i = 0; i < blockCount; i ++ ) + parseInt64( dataView, offset ); // scanlineOffset + + EXRDecoder.decode = parseScanline.bind( EXRDecoder ); + + } + + return EXRDecoder; + + } + + // start parsing file [START] + const offset = { value: 0 }; + const bufferDataView = new DataView( buffer ); + const uInt8Array = new Uint8Array( buffer ); + + // get header information and validate format. + const EXRHeader = parseHeader( bufferDataView, buffer, offset ); + + // get input compression information and prepare decoding. + const EXRDecoder = setupDecoder( EXRHeader, bufferDataView, uInt8Array, offset, this.type ); + + // parse input data + EXRDecoder.decode(); + + return { + header: EXRHeader, + width: EXRDecoder.width, + height: EXRDecoder.height, + data: EXRDecoder.byteArray, + format: EXRDecoder.format, + colorSpace: EXRDecoder.colorSpace, + type: this.type, + }; + + } + + setDataType( value ) { + + this.type = value; + return this; + + } + + load( url, onLoad, onProgress, onError ) { + + function onLoadCallback( texture, texData ) { + + texture.colorSpace = texData.colorSpace; + texture.minFilter = LinearFilter; + texture.magFilter = LinearFilter; + texture.generateMipmaps = false; + texture.flipY = false; + + if ( onLoad ) onLoad( texture, texData ); + + } + + return super.load( url, onLoadCallback, onProgress, onError ); + + } + +} + +export { EXRLoader }; diff --git a/node_modules/three/examples/jsm/loaders/FBXLoader.js b/node_modules/three/examples/jsm/loaders/FBXLoader.js new file mode 100644 index 0000000..0f23faf --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/FBXLoader.js @@ -0,0 +1,4314 @@ +import { + AmbientLight, + AnimationClip, + Bone, + BufferGeometry, + ClampToEdgeWrapping, + Color, + DirectionalLight, + EquirectangularReflectionMapping, + Euler, + FileLoader, + Float32BufferAttribute, + Group, + Line, + LineBasicMaterial, + Loader, + LoaderUtils, + MathUtils, + Matrix3, + Matrix4, + Mesh, + MeshLambertMaterial, + MeshPhongMaterial, + NumberKeyframeTrack, + Object3D, + OrthographicCamera, + PerspectiveCamera, + PointLight, + PropertyBinding, + Quaternion, + QuaternionKeyframeTrack, + RepeatWrapping, + Skeleton, + SkinnedMesh, + SpotLight, + Texture, + TextureLoader, + Uint16BufferAttribute, + Vector2, + Vector3, + Vector4, + VectorKeyframeTrack, + SRGBColorSpace, + ShapeUtils +} from 'three'; +import * as fflate from '../libs/fflate.module.js'; +import { NURBSCurve } from '../curves/NURBSCurve.js'; + +/** + * Loader loads FBX file and generates Group representing FBX scene. + * Requires FBX file to be >= 7.0 and in ASCII or >= 6400 in Binary format + * Versions lower than this may load but will probably have errors + * + * Needs Support: + * Morph normals / blend shape normals + * + * FBX format references: + * https://help.autodesk.com/view/FBX/2017/ENU/?guid=__cpp_ref_index_html (C++ SDK reference) + * + * Binary format specification: + * https://code.blender.org/2013/08/fbx-binary-file-format-specification/ + */ + + +let fbxTree; +let connections; +let sceneGraph; + +class FBXLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const path = ( scope.path === '' ) ? LoaderUtils.extractUrlBase( url ) : scope.path; + + const loader = new FileLoader( this.manager ); + loader.setPath( scope.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + + loader.load( url, function ( buffer ) { + + try { + + onLoad( scope.parse( buffer, path ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( FBXBuffer, path ) { + + if ( isFbxFormatBinary( FBXBuffer ) ) { + + fbxTree = new BinaryParser().parse( FBXBuffer ); + + } else { + + const FBXText = convertArrayBufferToString( FBXBuffer ); + + if ( ! isFbxFormatASCII( FBXText ) ) { + + throw new Error( 'THREE.FBXLoader: Unknown format.' ); + + } + + if ( getFbxVersion( FBXText ) < 7000 ) { + + throw new Error( 'THREE.FBXLoader: FBX version not supported, FileVersion: ' + getFbxVersion( FBXText ) ); + + } + + fbxTree = new TextParser().parse( FBXText ); + + } + + // console.log( fbxTree ); + + const textureLoader = new TextureLoader( this.manager ).setPath( this.resourcePath || path ).setCrossOrigin( this.crossOrigin ); + + return new FBXTreeParser( textureLoader, this.manager ).parse( fbxTree ); + + } + +} + +// Parse the FBXTree object returned by the BinaryParser or TextParser and return a Group +class FBXTreeParser { + + constructor( textureLoader, manager ) { + + this.textureLoader = textureLoader; + this.manager = manager; + + } + + parse() { + + connections = this.parseConnections(); + + const images = this.parseImages(); + const textures = this.parseTextures( images ); + const materials = this.parseMaterials( textures ); + const deformers = this.parseDeformers(); + const geometryMap = new GeometryParser().parse( deformers ); + + this.parseScene( deformers, geometryMap, materials ); + + return sceneGraph; + + } + + // Parses FBXTree.Connections which holds parent-child connections between objects (e.g. material -> texture, model->geometry ) + // and details the connection type + parseConnections() { + + const connectionMap = new Map(); + + if ( 'Connections' in fbxTree ) { + + const rawConnections = fbxTree.Connections.connections; + + rawConnections.forEach( function ( rawConnection ) { + + const fromID = rawConnection[ 0 ]; + const toID = rawConnection[ 1 ]; + const relationship = rawConnection[ 2 ]; + + if ( ! connectionMap.has( fromID ) ) { + + connectionMap.set( fromID, { + parents: [], + children: [] + } ); + + } + + const parentRelationship = { ID: toID, relationship: relationship }; + connectionMap.get( fromID ).parents.push( parentRelationship ); + + if ( ! connectionMap.has( toID ) ) { + + connectionMap.set( toID, { + parents: [], + children: [] + } ); + + } + + const childRelationship = { ID: fromID, relationship: relationship }; + connectionMap.get( toID ).children.push( childRelationship ); + + } ); + + } + + return connectionMap; + + } + + // Parse FBXTree.Objects.Video for embedded image data + // These images are connected to textures in FBXTree.Objects.Textures + // via FBXTree.Connections. + parseImages() { + + const images = {}; + const blobs = {}; + + if ( 'Video' in fbxTree.Objects ) { + + const videoNodes = fbxTree.Objects.Video; + + for ( const nodeID in videoNodes ) { + + const videoNode = videoNodes[ nodeID ]; + + const id = parseInt( nodeID ); + + images[ id ] = videoNode.RelativeFilename || videoNode.Filename; + + // raw image data is in videoNode.Content + if ( 'Content' in videoNode ) { + + const arrayBufferContent = ( videoNode.Content instanceof ArrayBuffer ) && ( videoNode.Content.byteLength > 0 ); + const base64Content = ( typeof videoNode.Content === 'string' ) && ( videoNode.Content !== '' ); + + if ( arrayBufferContent || base64Content ) { + + const image = this.parseImage( videoNodes[ nodeID ] ); + + blobs[ videoNode.RelativeFilename || videoNode.Filename ] = image; + + } + + } + + } + + } + + for ( const id in images ) { + + const filename = images[ id ]; + + if ( blobs[ filename ] !== undefined ) images[ id ] = blobs[ filename ]; + else images[ id ] = images[ id ].split( '\\' ).pop(); + + } + + return images; + + } + + // Parse embedded image data in FBXTree.Video.Content + parseImage( videoNode ) { + + const content = videoNode.Content; + const fileName = videoNode.RelativeFilename || videoNode.Filename; + const extension = fileName.slice( fileName.lastIndexOf( '.' ) + 1 ).toLowerCase(); + + let type; + + switch ( extension ) { + + case 'bmp': + + type = 'image/bmp'; + break; + + case 'jpg': + case 'jpeg': + + type = 'image/jpeg'; + break; + + case 'png': + + type = 'image/png'; + break; + + case 'tif': + + type = 'image/tiff'; + break; + + case 'tga': + + if ( this.manager.getHandler( '.tga' ) === null ) { + + console.warn( 'FBXLoader: TGA loader not found, skipping ', fileName ); + + } + + type = 'image/tga'; + break; + + default: + + console.warn( 'FBXLoader: Image type "' + extension + '" is not supported.' ); + return; + + } + + if ( typeof content === 'string' ) { // ASCII format + + return 'data:' + type + ';base64,' + content; + + } else { // Binary Format + + const array = new Uint8Array( content ); + return window.URL.createObjectURL( new Blob( [ array ], { type: type } ) ); + + } + + } + + // Parse nodes in FBXTree.Objects.Texture + // These contain details such as UV scaling, cropping, rotation etc and are connected + // to images in FBXTree.Objects.Video + parseTextures( images ) { + + const textureMap = new Map(); + + if ( 'Texture' in fbxTree.Objects ) { + + const textureNodes = fbxTree.Objects.Texture; + for ( const nodeID in textureNodes ) { + + const texture = this.parseTexture( textureNodes[ nodeID ], images ); + textureMap.set( parseInt( nodeID ), texture ); + + } + + } + + return textureMap; + + } + + // Parse individual node in FBXTree.Objects.Texture + parseTexture( textureNode, images ) { + + const texture = this.loadTexture( textureNode, images ); + + texture.ID = textureNode.id; + + texture.name = textureNode.attrName; + + const wrapModeU = textureNode.WrapModeU; + const wrapModeV = textureNode.WrapModeV; + + const valueU = wrapModeU !== undefined ? wrapModeU.value : 0; + const valueV = wrapModeV !== undefined ? wrapModeV.value : 0; + + // http://download.autodesk.com/us/fbx/SDKdocs/FBX_SDK_Help/files/fbxsdkref/class_k_fbx_texture.html#889640e63e2e681259ea81061b85143a + // 0: repeat(default), 1: clamp + + texture.wrapS = valueU === 0 ? RepeatWrapping : ClampToEdgeWrapping; + texture.wrapT = valueV === 0 ? RepeatWrapping : ClampToEdgeWrapping; + + if ( 'Scaling' in textureNode ) { + + const values = textureNode.Scaling.value; + + texture.repeat.x = values[ 0 ]; + texture.repeat.y = values[ 1 ]; + + } + + if ( 'Translation' in textureNode ) { + + const values = textureNode.Translation.value; + + texture.offset.x = values[ 0 ]; + texture.offset.y = values[ 1 ]; + + } + + return texture; + + } + + // load a texture specified as a blob or data URI, or via an external URL using TextureLoader + loadTexture( textureNode, images ) { + + let fileName; + + const currentPath = this.textureLoader.path; + + const children = connections.get( textureNode.id ).children; + + if ( children !== undefined && children.length > 0 && images[ children[ 0 ].ID ] !== undefined ) { + + fileName = images[ children[ 0 ].ID ]; + + if ( fileName.indexOf( 'blob:' ) === 0 || fileName.indexOf( 'data:' ) === 0 ) { + + this.textureLoader.setPath( undefined ); + + } + + } + + let texture; + + const extension = textureNode.FileName.slice( - 3 ).toLowerCase(); + + if ( extension === 'tga' ) { + + const loader = this.manager.getHandler( '.tga' ); + + if ( loader === null ) { + + console.warn( 'FBXLoader: TGA loader not found, creating placeholder texture for', textureNode.RelativeFilename ); + texture = new Texture(); + + } else { + + loader.setPath( this.textureLoader.path ); + texture = loader.load( fileName ); + + } + + } else if ( extension === 'dds' ) { + + const loader = this.manager.getHandler( '.dds' ); + + if ( loader === null ) { + + console.warn( 'FBXLoader: DDS loader not found, creating placeholder texture for', textureNode.RelativeFilename ); + texture = new Texture(); + + } else { + + loader.setPath( this.textureLoader.path ); + texture = loader.load( fileName ); + + } + + } else if ( extension === 'psd' ) { + + console.warn( 'FBXLoader: PSD textures are not supported, creating placeholder texture for', textureNode.RelativeFilename ); + texture = new Texture(); + + } else { + + texture = this.textureLoader.load( fileName ); + + } + + this.textureLoader.setPath( currentPath ); + + return texture; + + } + + // Parse nodes in FBXTree.Objects.Material + parseMaterials( textureMap ) { + + const materialMap = new Map(); + + if ( 'Material' in fbxTree.Objects ) { + + const materialNodes = fbxTree.Objects.Material; + + for ( const nodeID in materialNodes ) { + + const material = this.parseMaterial( materialNodes[ nodeID ], textureMap ); + + if ( material !== null ) materialMap.set( parseInt( nodeID ), material ); + + } + + } + + return materialMap; + + } + + // Parse single node in FBXTree.Objects.Material + // Materials are connected to texture maps in FBXTree.Objects.Textures + // FBX format currently only supports Lambert and Phong shading models + parseMaterial( materialNode, textureMap ) { + + const ID = materialNode.id; + const name = materialNode.attrName; + let type = materialNode.ShadingModel; + + // Case where FBX wraps shading model in property object. + if ( typeof type === 'object' ) { + + type = type.value; + + } + + // Ignore unused materials which don't have any connections. + if ( ! connections.has( ID ) ) return null; + + const parameters = this.parseParameters( materialNode, textureMap, ID ); + + let material; + + switch ( type.toLowerCase() ) { + + case 'phong': + material = new MeshPhongMaterial(); + break; + case 'lambert': + material = new MeshLambertMaterial(); + break; + default: + console.warn( 'THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.', type ); + material = new MeshPhongMaterial(); + break; + + } + + material.setValues( parameters ); + material.name = name; + + return material; + + } + + // Parse FBX material and return parameters suitable for a three.js material + // Also parse the texture map and return any textures associated with the material + parseParameters( materialNode, textureMap, ID ) { + + const parameters = {}; + + if ( materialNode.BumpFactor ) { + + parameters.bumpScale = materialNode.BumpFactor.value; + + } + + if ( materialNode.Diffuse ) { + + parameters.color = new Color().fromArray( materialNode.Diffuse.value ).convertSRGBToLinear(); + + } else if ( materialNode.DiffuseColor && ( materialNode.DiffuseColor.type === 'Color' || materialNode.DiffuseColor.type === 'ColorRGB' ) ) { + + // The blender exporter exports diffuse here instead of in materialNode.Diffuse + parameters.color = new Color().fromArray( materialNode.DiffuseColor.value ).convertSRGBToLinear(); + + } + + if ( materialNode.DisplacementFactor ) { + + parameters.displacementScale = materialNode.DisplacementFactor.value; + + } + + if ( materialNode.Emissive ) { + + parameters.emissive = new Color().fromArray( materialNode.Emissive.value ).convertSRGBToLinear(); + + } else if ( materialNode.EmissiveColor && ( materialNode.EmissiveColor.type === 'Color' || materialNode.EmissiveColor.type === 'ColorRGB' ) ) { + + // The blender exporter exports emissive color here instead of in materialNode.Emissive + parameters.emissive = new Color().fromArray( materialNode.EmissiveColor.value ).convertSRGBToLinear(); + + } + + if ( materialNode.EmissiveFactor ) { + + parameters.emissiveIntensity = parseFloat( materialNode.EmissiveFactor.value ); + + } + + if ( materialNode.Opacity ) { + + parameters.opacity = parseFloat( materialNode.Opacity.value ); + + } + + if ( parameters.opacity < 1.0 ) { + + parameters.transparent = true; + + } + + if ( materialNode.ReflectionFactor ) { + + parameters.reflectivity = materialNode.ReflectionFactor.value; + + } + + if ( materialNode.Shininess ) { + + parameters.shininess = materialNode.Shininess.value; + + } + + if ( materialNode.Specular ) { + + parameters.specular = new Color().fromArray( materialNode.Specular.value ).convertSRGBToLinear(); + + } else if ( materialNode.SpecularColor && materialNode.SpecularColor.type === 'Color' ) { + + // The blender exporter exports specular color here instead of in materialNode.Specular + parameters.specular = new Color().fromArray( materialNode.SpecularColor.value ).convertSRGBToLinear(); + + } + + const scope = this; + connections.get( ID ).children.forEach( function ( child ) { + + const type = child.relationship; + + switch ( type ) { + + case 'Bump': + parameters.bumpMap = scope.getTexture( textureMap, child.ID ); + break; + + case 'Maya|TEX_ao_map': + parameters.aoMap = scope.getTexture( textureMap, child.ID ); + break; + + case 'DiffuseColor': + case 'Maya|TEX_color_map': + parameters.map = scope.getTexture( textureMap, child.ID ); + if ( parameters.map !== undefined ) { + + parameters.map.colorSpace = SRGBColorSpace; + + } + + break; + + case 'DisplacementColor': + parameters.displacementMap = scope.getTexture( textureMap, child.ID ); + break; + + case 'EmissiveColor': + parameters.emissiveMap = scope.getTexture( textureMap, child.ID ); + if ( parameters.emissiveMap !== undefined ) { + + parameters.emissiveMap.colorSpace = SRGBColorSpace; + + } + + break; + + case 'NormalMap': + case 'Maya|TEX_normal_map': + parameters.normalMap = scope.getTexture( textureMap, child.ID ); + break; + + case 'ReflectionColor': + parameters.envMap = scope.getTexture( textureMap, child.ID ); + if ( parameters.envMap !== undefined ) { + + parameters.envMap.mapping = EquirectangularReflectionMapping; + parameters.envMap.colorSpace = SRGBColorSpace; + + } + + break; + + case 'SpecularColor': + parameters.specularMap = scope.getTexture( textureMap, child.ID ); + if ( parameters.specularMap !== undefined ) { + + parameters.specularMap.colorSpace = SRGBColorSpace; + + } + + break; + + case 'TransparentColor': + case 'TransparencyFactor': + parameters.alphaMap = scope.getTexture( textureMap, child.ID ); + parameters.transparent = true; + break; + + case 'AmbientColor': + case 'ShininessExponent': // AKA glossiness map + case 'SpecularFactor': // AKA specularLevel + case 'VectorDisplacementColor': // NOTE: Seems to be a copy of DisplacementColor + default: + console.warn( 'THREE.FBXLoader: %s map is not supported in three.js, skipping texture.', type ); + break; + + } + + } ); + + return parameters; + + } + + // get a texture from the textureMap for use by a material. + getTexture( textureMap, id ) { + + // if the texture is a layered texture, just use the first layer and issue a warning + if ( 'LayeredTexture' in fbxTree.Objects && id in fbxTree.Objects.LayeredTexture ) { + + console.warn( 'THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer.' ); + id = connections.get( id ).children[ 0 ].ID; + + } + + return textureMap.get( id ); + + } + + // Parse nodes in FBXTree.Objects.Deformer + // Deformer node can contain skinning or Vertex Cache animation data, however only skinning is supported here + // Generates map of Skeleton-like objects for use later when generating and binding skeletons. + parseDeformers() { + + const skeletons = {}; + const morphTargets = {}; + + if ( 'Deformer' in fbxTree.Objects ) { + + const DeformerNodes = fbxTree.Objects.Deformer; + + for ( const nodeID in DeformerNodes ) { + + const deformerNode = DeformerNodes[ nodeID ]; + + const relationships = connections.get( parseInt( nodeID ) ); + + if ( deformerNode.attrType === 'Skin' ) { + + const skeleton = this.parseSkeleton( relationships, DeformerNodes ); + skeleton.ID = nodeID; + + if ( relationships.parents.length > 1 ) console.warn( 'THREE.FBXLoader: skeleton attached to more than one geometry is not supported.' ); + skeleton.geometryID = relationships.parents[ 0 ].ID; + + skeletons[ nodeID ] = skeleton; + + } else if ( deformerNode.attrType === 'BlendShape' ) { + + const morphTarget = { + id: nodeID, + }; + + morphTarget.rawTargets = this.parseMorphTargets( relationships, DeformerNodes ); + morphTarget.id = nodeID; + + if ( relationships.parents.length > 1 ) console.warn( 'THREE.FBXLoader: morph target attached to more than one geometry is not supported.' ); + + morphTargets[ nodeID ] = morphTarget; + + } + + } + + } + + return { + + skeletons: skeletons, + morphTargets: morphTargets, + + }; + + } + + // Parse single nodes in FBXTree.Objects.Deformer + // The top level skeleton node has type 'Skin' and sub nodes have type 'Cluster' + // Each skin node represents a skeleton and each cluster node represents a bone + parseSkeleton( relationships, deformerNodes ) { + + const rawBones = []; + + relationships.children.forEach( function ( child ) { + + const boneNode = deformerNodes[ child.ID ]; + + if ( boneNode.attrType !== 'Cluster' ) return; + + const rawBone = { + + ID: child.ID, + indices: [], + weights: [], + transformLink: new Matrix4().fromArray( boneNode.TransformLink.a ), + // transform: new Matrix4().fromArray( boneNode.Transform.a ), + // linkMode: boneNode.Mode, + + }; + + if ( 'Indexes' in boneNode ) { + + rawBone.indices = boneNode.Indexes.a; + rawBone.weights = boneNode.Weights.a; + + } + + rawBones.push( rawBone ); + + } ); + + return { + + rawBones: rawBones, + bones: [] + + }; + + } + + // The top level morph deformer node has type "BlendShape" and sub nodes have type "BlendShapeChannel" + parseMorphTargets( relationships, deformerNodes ) { + + const rawMorphTargets = []; + + for ( let i = 0; i < relationships.children.length; i ++ ) { + + const child = relationships.children[ i ]; + + const morphTargetNode = deformerNodes[ child.ID ]; + + const rawMorphTarget = { + + name: morphTargetNode.attrName, + initialWeight: morphTargetNode.DeformPercent, + id: morphTargetNode.id, + fullWeights: morphTargetNode.FullWeights.a + + }; + + if ( morphTargetNode.attrType !== 'BlendShapeChannel' ) return; + + rawMorphTarget.geoID = connections.get( parseInt( child.ID ) ).children.filter( function ( child ) { + + return child.relationship === undefined; + + } )[ 0 ].ID; + + rawMorphTargets.push( rawMorphTarget ); + + } + + return rawMorphTargets; + + } + + // create the main Group() to be returned by the loader + parseScene( deformers, geometryMap, materialMap ) { + + sceneGraph = new Group(); + + const modelMap = this.parseModels( deformers.skeletons, geometryMap, materialMap ); + + const modelNodes = fbxTree.Objects.Model; + + const scope = this; + modelMap.forEach( function ( model ) { + + const modelNode = modelNodes[ model.ID ]; + scope.setLookAtProperties( model, modelNode ); + + const parentConnections = connections.get( model.ID ).parents; + + parentConnections.forEach( function ( connection ) { + + const parent = modelMap.get( connection.ID ); + if ( parent !== undefined ) parent.add( model ); + + } ); + + if ( model.parent === null ) { + + sceneGraph.add( model ); + + } + + + } ); + + this.bindSkeleton( deformers.skeletons, geometryMap, modelMap ); + + this.addGlobalSceneSettings(); + + sceneGraph.traverse( function ( node ) { + + if ( node.userData.transformData ) { + + if ( node.parent ) { + + node.userData.transformData.parentMatrix = node.parent.matrix; + node.userData.transformData.parentMatrixWorld = node.parent.matrixWorld; + + } + + const transform = generateTransform( node.userData.transformData ); + + node.applyMatrix4( transform ); + node.updateWorldMatrix(); + + } + + } ); + + const animations = new AnimationParser().parse(); + + // if all the models where already combined in a single group, just return that + if ( sceneGraph.children.length === 1 && sceneGraph.children[ 0 ].isGroup ) { + + sceneGraph.children[ 0 ].animations = animations; + sceneGraph = sceneGraph.children[ 0 ]; + + } + + sceneGraph.animations = animations; + + } + + // parse nodes in FBXTree.Objects.Model + parseModels( skeletons, geometryMap, materialMap ) { + + const modelMap = new Map(); + const modelNodes = fbxTree.Objects.Model; + + for ( const nodeID in modelNodes ) { + + const id = parseInt( nodeID ); + const node = modelNodes[ nodeID ]; + const relationships = connections.get( id ); + + let model = this.buildSkeleton( relationships, skeletons, id, node.attrName ); + + if ( ! model ) { + + switch ( node.attrType ) { + + case 'Camera': + model = this.createCamera( relationships ); + break; + case 'Light': + model = this.createLight( relationships ); + break; + case 'Mesh': + model = this.createMesh( relationships, geometryMap, materialMap ); + break; + case 'NurbsCurve': + model = this.createCurve( relationships, geometryMap ); + break; + case 'LimbNode': + case 'Root': + model = new Bone(); + break; + case 'Null': + default: + model = new Group(); + break; + + } + + model.name = node.attrName ? PropertyBinding.sanitizeNodeName( node.attrName ) : ''; + model.userData.originalName = node.attrName; + + model.ID = id; + + } + + this.getTransformData( model, node ); + modelMap.set( id, model ); + + } + + return modelMap; + + } + + buildSkeleton( relationships, skeletons, id, name ) { + + let bone = null; + + relationships.parents.forEach( function ( parent ) { + + for ( const ID in skeletons ) { + + const skeleton = skeletons[ ID ]; + + skeleton.rawBones.forEach( function ( rawBone, i ) { + + if ( rawBone.ID === parent.ID ) { + + const subBone = bone; + bone = new Bone(); + + bone.matrixWorld.copy( rawBone.transformLink ); + + // set name and id here - otherwise in cases where "subBone" is created it will not have a name / id + + bone.name = name ? PropertyBinding.sanitizeNodeName( name ) : ''; + bone.userData.originalName = name; + bone.ID = id; + + skeleton.bones[ i ] = bone; + + // In cases where a bone is shared between multiple meshes + // duplicate the bone here and and it as a child of the first bone + if ( subBone !== null ) { + + bone.add( subBone ); + + } + + } + + } ); + + } + + } ); + + return bone; + + } + + // create a PerspectiveCamera or OrthographicCamera + createCamera( relationships ) { + + let model; + let cameraAttribute; + + relationships.children.forEach( function ( child ) { + + const attr = fbxTree.Objects.NodeAttribute[ child.ID ]; + + if ( attr !== undefined ) { + + cameraAttribute = attr; + + } + + } ); + + if ( cameraAttribute === undefined ) { + + model = new Object3D(); + + } else { + + let type = 0; + if ( cameraAttribute.CameraProjectionType !== undefined && cameraAttribute.CameraProjectionType.value === 1 ) { + + type = 1; + + } + + let nearClippingPlane = 1; + if ( cameraAttribute.NearPlane !== undefined ) { + + nearClippingPlane = cameraAttribute.NearPlane.value / 1000; + + } + + let farClippingPlane = 1000; + if ( cameraAttribute.FarPlane !== undefined ) { + + farClippingPlane = cameraAttribute.FarPlane.value / 1000; + + } + + + let width = window.innerWidth; + let height = window.innerHeight; + + if ( cameraAttribute.AspectWidth !== undefined && cameraAttribute.AspectHeight !== undefined ) { + + width = cameraAttribute.AspectWidth.value; + height = cameraAttribute.AspectHeight.value; + + } + + const aspect = width / height; + + let fov = 45; + if ( cameraAttribute.FieldOfView !== undefined ) { + + fov = cameraAttribute.FieldOfView.value; + + } + + const focalLength = cameraAttribute.FocalLength ? cameraAttribute.FocalLength.value : null; + + switch ( type ) { + + case 0: // Perspective + model = new PerspectiveCamera( fov, aspect, nearClippingPlane, farClippingPlane ); + if ( focalLength !== null ) model.setFocalLength( focalLength ); + break; + + case 1: // Orthographic + model = new OrthographicCamera( - width / 2, width / 2, height / 2, - height / 2, nearClippingPlane, farClippingPlane ); + break; + + default: + console.warn( 'THREE.FBXLoader: Unknown camera type ' + type + '.' ); + model = new Object3D(); + break; + + } + + } + + return model; + + } + + // Create a DirectionalLight, PointLight or SpotLight + createLight( relationships ) { + + let model; + let lightAttribute; + + relationships.children.forEach( function ( child ) { + + const attr = fbxTree.Objects.NodeAttribute[ child.ID ]; + + if ( attr !== undefined ) { + + lightAttribute = attr; + + } + + } ); + + if ( lightAttribute === undefined ) { + + model = new Object3D(); + + } else { + + let type; + + // LightType can be undefined for Point lights + if ( lightAttribute.LightType === undefined ) { + + type = 0; + + } else { + + type = lightAttribute.LightType.value; + + } + + let color = 0xffffff; + + if ( lightAttribute.Color !== undefined ) { + + color = new Color().fromArray( lightAttribute.Color.value ).convertSRGBToLinear(); + + } + + let intensity = ( lightAttribute.Intensity === undefined ) ? 1 : lightAttribute.Intensity.value / 100; + + // light disabled + if ( lightAttribute.CastLightOnObject !== undefined && lightAttribute.CastLightOnObject.value === 0 ) { + + intensity = 0; + + } + + let distance = 0; + if ( lightAttribute.FarAttenuationEnd !== undefined ) { + + if ( lightAttribute.EnableFarAttenuation !== undefined && lightAttribute.EnableFarAttenuation.value === 0 ) { + + distance = 0; + + } else { + + distance = lightAttribute.FarAttenuationEnd.value; + + } + + } + + // TODO: could this be calculated linearly from FarAttenuationStart to FarAttenuationEnd? + const decay = 1; + + switch ( type ) { + + case 0: // Point + model = new PointLight( color, intensity, distance, decay ); + break; + + case 1: // Directional + model = new DirectionalLight( color, intensity ); + break; + + case 2: // Spot + let angle = Math.PI / 3; + + if ( lightAttribute.InnerAngle !== undefined ) { + + angle = MathUtils.degToRad( lightAttribute.InnerAngle.value ); + + } + + let penumbra = 0; + if ( lightAttribute.OuterAngle !== undefined ) { + + // TODO: this is not correct - FBX calculates outer and inner angle in degrees + // with OuterAngle > InnerAngle && OuterAngle <= Math.PI + // while three.js uses a penumbra between (0, 1) to attenuate the inner angle + penumbra = MathUtils.degToRad( lightAttribute.OuterAngle.value ); + penumbra = Math.max( penumbra, 1 ); + + } + + model = new SpotLight( color, intensity, distance, angle, penumbra, decay ); + break; + + default: + console.warn( 'THREE.FBXLoader: Unknown light type ' + lightAttribute.LightType.value + ', defaulting to a PointLight.' ); + model = new PointLight( color, intensity ); + break; + + } + + if ( lightAttribute.CastShadows !== undefined && lightAttribute.CastShadows.value === 1 ) { + + model.castShadow = true; + + } + + } + + return model; + + } + + createMesh( relationships, geometryMap, materialMap ) { + + let model; + let geometry = null; + let material = null; + const materials = []; + + // get geometry and materials(s) from connections + relationships.children.forEach( function ( child ) { + + if ( geometryMap.has( child.ID ) ) { + + geometry = geometryMap.get( child.ID ); + + } + + if ( materialMap.has( child.ID ) ) { + + materials.push( materialMap.get( child.ID ) ); + + } + + } ); + + if ( materials.length > 1 ) { + + material = materials; + + } else if ( materials.length > 0 ) { + + material = materials[ 0 ]; + + } else { + + material = new MeshPhongMaterial( { + name: Loader.DEFAULT_MATERIAL_NAME, + color: 0xcccccc + } ); + materials.push( material ); + + } + + if ( 'color' in geometry.attributes ) { + + materials.forEach( function ( material ) { + + material.vertexColors = true; + + } ); + + } + + if ( geometry.FBX_Deformer ) { + + model = new SkinnedMesh( geometry, material ); + model.normalizeSkinWeights(); + + } else { + + model = new Mesh( geometry, material ); + + } + + return model; + + } + + createCurve( relationships, geometryMap ) { + + const geometry = relationships.children.reduce( function ( geo, child ) { + + if ( geometryMap.has( child.ID ) ) geo = geometryMap.get( child.ID ); + + return geo; + + }, null ); + + // FBX does not list materials for Nurbs lines, so we'll just put our own in here. + const material = new LineBasicMaterial( { + name: Loader.DEFAULT_MATERIAL_NAME, + color: 0x3300ff, + linewidth: 1 + } ); + return new Line( geometry, material ); + + } + + // parse the model node for transform data + getTransformData( model, modelNode ) { + + const transformData = {}; + + if ( 'InheritType' in modelNode ) transformData.inheritType = parseInt( modelNode.InheritType.value ); + + if ( 'RotationOrder' in modelNode ) transformData.eulerOrder = getEulerOrder( modelNode.RotationOrder.value ); + else transformData.eulerOrder = 'ZYX'; + + if ( 'Lcl_Translation' in modelNode ) transformData.translation = modelNode.Lcl_Translation.value; + + if ( 'PreRotation' in modelNode ) transformData.preRotation = modelNode.PreRotation.value; + if ( 'Lcl_Rotation' in modelNode ) transformData.rotation = modelNode.Lcl_Rotation.value; + if ( 'PostRotation' in modelNode ) transformData.postRotation = modelNode.PostRotation.value; + + if ( 'Lcl_Scaling' in modelNode ) transformData.scale = modelNode.Lcl_Scaling.value; + + if ( 'ScalingOffset' in modelNode ) transformData.scalingOffset = modelNode.ScalingOffset.value; + if ( 'ScalingPivot' in modelNode ) transformData.scalingPivot = modelNode.ScalingPivot.value; + + if ( 'RotationOffset' in modelNode ) transformData.rotationOffset = modelNode.RotationOffset.value; + if ( 'RotationPivot' in modelNode ) transformData.rotationPivot = modelNode.RotationPivot.value; + + model.userData.transformData = transformData; + + } + + setLookAtProperties( model, modelNode ) { + + if ( 'LookAtProperty' in modelNode ) { + + const children = connections.get( model.ID ).children; + + children.forEach( function ( child ) { + + if ( child.relationship === 'LookAtProperty' ) { + + const lookAtTarget = fbxTree.Objects.Model[ child.ID ]; + + if ( 'Lcl_Translation' in lookAtTarget ) { + + const pos = lookAtTarget.Lcl_Translation.value; + + // DirectionalLight, SpotLight + if ( model.target !== undefined ) { + + model.target.position.fromArray( pos ); + sceneGraph.add( model.target ); + + } else { // Cameras and other Object3Ds + + model.lookAt( new Vector3().fromArray( pos ) ); + + } + + } + + } + + } ); + + } + + } + + bindSkeleton( skeletons, geometryMap, modelMap ) { + + const bindMatrices = this.parsePoseNodes(); + + for ( const ID in skeletons ) { + + const skeleton = skeletons[ ID ]; + + const parents = connections.get( parseInt( skeleton.ID ) ).parents; + + parents.forEach( function ( parent ) { + + if ( geometryMap.has( parent.ID ) ) { + + const geoID = parent.ID; + const geoRelationships = connections.get( geoID ); + + geoRelationships.parents.forEach( function ( geoConnParent ) { + + if ( modelMap.has( geoConnParent.ID ) ) { + + const model = modelMap.get( geoConnParent.ID ); + + model.bind( new Skeleton( skeleton.bones ), bindMatrices[ geoConnParent.ID ] ); + + } + + } ); + + } + + } ); + + } + + } + + parsePoseNodes() { + + const bindMatrices = {}; + + if ( 'Pose' in fbxTree.Objects ) { + + const BindPoseNode = fbxTree.Objects.Pose; + + for ( const nodeID in BindPoseNode ) { + + if ( BindPoseNode[ nodeID ].attrType === 'BindPose' && BindPoseNode[ nodeID ].NbPoseNodes > 0 ) { + + const poseNodes = BindPoseNode[ nodeID ].PoseNode; + + if ( Array.isArray( poseNodes ) ) { + + poseNodes.forEach( function ( poseNode ) { + + bindMatrices[ poseNode.Node ] = new Matrix4().fromArray( poseNode.Matrix.a ); + + } ); + + } else { + + bindMatrices[ poseNodes.Node ] = new Matrix4().fromArray( poseNodes.Matrix.a ); + + } + + } + + } + + } + + return bindMatrices; + + } + + addGlobalSceneSettings() { + + if ( 'GlobalSettings' in fbxTree ) { + + if ( 'AmbientColor' in fbxTree.GlobalSettings ) { + + // Parse ambient color - if it's not set to black (default), create an ambient light + + const ambientColor = fbxTree.GlobalSettings.AmbientColor.value; + const r = ambientColor[ 0 ]; + const g = ambientColor[ 1 ]; + const b = ambientColor[ 2 ]; + + if ( r !== 0 || g !== 0 || b !== 0 ) { + + const color = new Color( r, g, b ).convertSRGBToLinear(); + sceneGraph.add( new AmbientLight( color, 1 ) ); + + } + + } + + if ( 'UnitScaleFactor' in fbxTree.GlobalSettings ) { + + sceneGraph.userData.unitScaleFactor = fbxTree.GlobalSettings.UnitScaleFactor.value; + + } + + } + + } + +} + +// parse Geometry data from FBXTree and return map of BufferGeometries +class GeometryParser { + + constructor() { + + this.negativeMaterialIndices = false; + + } + + // Parse nodes in FBXTree.Objects.Geometry + parse( deformers ) { + + const geometryMap = new Map(); + + if ( 'Geometry' in fbxTree.Objects ) { + + const geoNodes = fbxTree.Objects.Geometry; + + for ( const nodeID in geoNodes ) { + + const relationships = connections.get( parseInt( nodeID ) ); + const geo = this.parseGeometry( relationships, geoNodes[ nodeID ], deformers ); + + geometryMap.set( parseInt( nodeID ), geo ); + + } + + } + + // report warnings + + if ( this.negativeMaterialIndices === true ) { + + console.warn( 'THREE.FBXLoader: The FBX file contains invalid (negative) material indices. The asset might not render as expected.' ); + + } + + return geometryMap; + + } + + // Parse single node in FBXTree.Objects.Geometry + parseGeometry( relationships, geoNode, deformers ) { + + switch ( geoNode.attrType ) { + + case 'Mesh': + return this.parseMeshGeometry( relationships, geoNode, deformers ); + break; + + case 'NurbsCurve': + return this.parseNurbsGeometry( geoNode ); + break; + + } + + } + + // Parse single node mesh geometry in FBXTree.Objects.Geometry + parseMeshGeometry( relationships, geoNode, deformers ) { + + const skeletons = deformers.skeletons; + const morphTargets = []; + + const modelNodes = relationships.parents.map( function ( parent ) { + + return fbxTree.Objects.Model[ parent.ID ]; + + } ); + + // don't create geometry if it is not associated with any models + if ( modelNodes.length === 0 ) return; + + const skeleton = relationships.children.reduce( function ( skeleton, child ) { + + if ( skeletons[ child.ID ] !== undefined ) skeleton = skeletons[ child.ID ]; + + return skeleton; + + }, null ); + + relationships.children.forEach( function ( child ) { + + if ( deformers.morphTargets[ child.ID ] !== undefined ) { + + morphTargets.push( deformers.morphTargets[ child.ID ] ); + + } + + } ); + + // Assume one model and get the preRotation from that + // if there is more than one model associated with the geometry this may cause problems + const modelNode = modelNodes[ 0 ]; + + const transformData = {}; + + if ( 'RotationOrder' in modelNode ) transformData.eulerOrder = getEulerOrder( modelNode.RotationOrder.value ); + if ( 'InheritType' in modelNode ) transformData.inheritType = parseInt( modelNode.InheritType.value ); + + if ( 'GeometricTranslation' in modelNode ) transformData.translation = modelNode.GeometricTranslation.value; + if ( 'GeometricRotation' in modelNode ) transformData.rotation = modelNode.GeometricRotation.value; + if ( 'GeometricScaling' in modelNode ) transformData.scale = modelNode.GeometricScaling.value; + + const transform = generateTransform( transformData ); + + return this.genGeometry( geoNode, skeleton, morphTargets, transform ); + + } + + // Generate a BufferGeometry from a node in FBXTree.Objects.Geometry + genGeometry( geoNode, skeleton, morphTargets, preTransform ) { + + const geo = new BufferGeometry(); + if ( geoNode.attrName ) geo.name = geoNode.attrName; + + const geoInfo = this.parseGeoNode( geoNode, skeleton ); + const buffers = this.genBuffers( geoInfo ); + + const positionAttribute = new Float32BufferAttribute( buffers.vertex, 3 ); + + positionAttribute.applyMatrix4( preTransform ); + + geo.setAttribute( 'position', positionAttribute ); + + if ( buffers.colors.length > 0 ) { + + geo.setAttribute( 'color', new Float32BufferAttribute( buffers.colors, 3 ) ); + + } + + if ( skeleton ) { + + geo.setAttribute( 'skinIndex', new Uint16BufferAttribute( buffers.weightsIndices, 4 ) ); + + geo.setAttribute( 'skinWeight', new Float32BufferAttribute( buffers.vertexWeights, 4 ) ); + + // used later to bind the skeleton to the model + geo.FBX_Deformer = skeleton; + + } + + if ( buffers.normal.length > 0 ) { + + const normalMatrix = new Matrix3().getNormalMatrix( preTransform ); + + const normalAttribute = new Float32BufferAttribute( buffers.normal, 3 ); + normalAttribute.applyNormalMatrix( normalMatrix ); + + geo.setAttribute( 'normal', normalAttribute ); + + } + + buffers.uvs.forEach( function ( uvBuffer, i ) { + + const name = i === 0 ? 'uv' : `uv${ i }`; + + geo.setAttribute( name, new Float32BufferAttribute( buffers.uvs[ i ], 2 ) ); + + } ); + + if ( geoInfo.material && geoInfo.material.mappingType !== 'AllSame' ) { + + // Convert the material indices of each vertex into rendering groups on the geometry. + let prevMaterialIndex = buffers.materialIndex[ 0 ]; + let startIndex = 0; + + buffers.materialIndex.forEach( function ( currentIndex, i ) { + + if ( currentIndex !== prevMaterialIndex ) { + + geo.addGroup( startIndex, i - startIndex, prevMaterialIndex ); + + prevMaterialIndex = currentIndex; + startIndex = i; + + } + + } ); + + // the loop above doesn't add the last group, do that here. + if ( geo.groups.length > 0 ) { + + const lastGroup = geo.groups[ geo.groups.length - 1 ]; + const lastIndex = lastGroup.start + lastGroup.count; + + if ( lastIndex !== buffers.materialIndex.length ) { + + geo.addGroup( lastIndex, buffers.materialIndex.length - lastIndex, prevMaterialIndex ); + + } + + } + + // case where there are multiple materials but the whole geometry is only + // using one of them + if ( geo.groups.length === 0 ) { + + geo.addGroup( 0, buffers.materialIndex.length, buffers.materialIndex[ 0 ] ); + + } + + } + + this.addMorphTargets( geo, geoNode, morphTargets, preTransform ); + + return geo; + + } + + parseGeoNode( geoNode, skeleton ) { + + const geoInfo = {}; + + geoInfo.vertexPositions = ( geoNode.Vertices !== undefined ) ? geoNode.Vertices.a : []; + geoInfo.vertexIndices = ( geoNode.PolygonVertexIndex !== undefined ) ? geoNode.PolygonVertexIndex.a : []; + + if ( geoNode.LayerElementColor ) { + + geoInfo.color = this.parseVertexColors( geoNode.LayerElementColor[ 0 ] ); + + } + + if ( geoNode.LayerElementMaterial ) { + + geoInfo.material = this.parseMaterialIndices( geoNode.LayerElementMaterial[ 0 ] ); + + } + + if ( geoNode.LayerElementNormal ) { + + geoInfo.normal = this.parseNormals( geoNode.LayerElementNormal[ 0 ] ); + + } + + if ( geoNode.LayerElementUV ) { + + geoInfo.uv = []; + + let i = 0; + while ( geoNode.LayerElementUV[ i ] ) { + + if ( geoNode.LayerElementUV[ i ].UV ) { + + geoInfo.uv.push( this.parseUVs( geoNode.LayerElementUV[ i ] ) ); + + } + + i ++; + + } + + } + + geoInfo.weightTable = {}; + + if ( skeleton !== null ) { + + geoInfo.skeleton = skeleton; + + skeleton.rawBones.forEach( function ( rawBone, i ) { + + // loop over the bone's vertex indices and weights + rawBone.indices.forEach( function ( index, j ) { + + if ( geoInfo.weightTable[ index ] === undefined ) geoInfo.weightTable[ index ] = []; + + geoInfo.weightTable[ index ].push( { + + id: i, + weight: rawBone.weights[ j ], + + } ); + + } ); + + } ); + + } + + return geoInfo; + + } + + genBuffers( geoInfo ) { + + const buffers = { + vertex: [], + normal: [], + colors: [], + uvs: [], + materialIndex: [], + vertexWeights: [], + weightsIndices: [], + }; + + let polygonIndex = 0; + let faceLength = 0; + let displayedWeightsWarning = false; + + // these will hold data for a single face + let facePositionIndexes = []; + let faceNormals = []; + let faceColors = []; + let faceUVs = []; + let faceWeights = []; + let faceWeightIndices = []; + + const scope = this; + geoInfo.vertexIndices.forEach( function ( vertexIndex, polygonVertexIndex ) { + + let materialIndex; + let endOfFace = false; + + // Face index and vertex index arrays are combined in a single array + // A cube with quad faces looks like this: + // PolygonVertexIndex: *24 { + // a: 0, 1, 3, -3, 2, 3, 5, -5, 4, 5, 7, -7, 6, 7, 1, -1, 1, 7, 5, -4, 6, 0, 2, -5 + // } + // Negative numbers mark the end of a face - first face here is 0, 1, 3, -3 + // to find index of last vertex bit shift the index: ^ - 1 + if ( vertexIndex < 0 ) { + + vertexIndex = vertexIndex ^ - 1; // equivalent to ( x * -1 ) - 1 + endOfFace = true; + + } + + let weightIndices = []; + let weights = []; + + facePositionIndexes.push( vertexIndex * 3, vertexIndex * 3 + 1, vertexIndex * 3 + 2 ); + + if ( geoInfo.color ) { + + const data = getData( polygonVertexIndex, polygonIndex, vertexIndex, geoInfo.color ); + + faceColors.push( data[ 0 ], data[ 1 ], data[ 2 ] ); + + } + + if ( geoInfo.skeleton ) { + + if ( geoInfo.weightTable[ vertexIndex ] !== undefined ) { + + geoInfo.weightTable[ vertexIndex ].forEach( function ( wt ) { + + weights.push( wt.weight ); + weightIndices.push( wt.id ); + + } ); + + + } + + if ( weights.length > 4 ) { + + if ( ! displayedWeightsWarning ) { + + console.warn( 'THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights.' ); + displayedWeightsWarning = true; + + } + + const wIndex = [ 0, 0, 0, 0 ]; + const Weight = [ 0, 0, 0, 0 ]; + + weights.forEach( function ( weight, weightIndex ) { + + let currentWeight = weight; + let currentIndex = weightIndices[ weightIndex ]; + + Weight.forEach( function ( comparedWeight, comparedWeightIndex, comparedWeightArray ) { + + if ( currentWeight > comparedWeight ) { + + comparedWeightArray[ comparedWeightIndex ] = currentWeight; + currentWeight = comparedWeight; + + const tmp = wIndex[ comparedWeightIndex ]; + wIndex[ comparedWeightIndex ] = currentIndex; + currentIndex = tmp; + + } + + } ); + + } ); + + weightIndices = wIndex; + weights = Weight; + + } + + // if the weight array is shorter than 4 pad with 0s + while ( weights.length < 4 ) { + + weights.push( 0 ); + weightIndices.push( 0 ); + + } + + for ( let i = 0; i < 4; ++ i ) { + + faceWeights.push( weights[ i ] ); + faceWeightIndices.push( weightIndices[ i ] ); + + } + + } + + if ( geoInfo.normal ) { + + const data = getData( polygonVertexIndex, polygonIndex, vertexIndex, geoInfo.normal ); + + faceNormals.push( data[ 0 ], data[ 1 ], data[ 2 ] ); + + } + + if ( geoInfo.material && geoInfo.material.mappingType !== 'AllSame' ) { + + materialIndex = getData( polygonVertexIndex, polygonIndex, vertexIndex, geoInfo.material )[ 0 ]; + + if ( materialIndex < 0 ) { + + scope.negativeMaterialIndices = true; + materialIndex = 0; // fallback + + } + + } + + if ( geoInfo.uv ) { + + geoInfo.uv.forEach( function ( uv, i ) { + + const data = getData( polygonVertexIndex, polygonIndex, vertexIndex, uv ); + + if ( faceUVs[ i ] === undefined ) { + + faceUVs[ i ] = []; + + } + + faceUVs[ i ].push( data[ 0 ] ); + faceUVs[ i ].push( data[ 1 ] ); + + } ); + + } + + faceLength ++; + + if ( endOfFace ) { + + scope.genFace( buffers, geoInfo, facePositionIndexes, materialIndex, faceNormals, faceColors, faceUVs, faceWeights, faceWeightIndices, faceLength ); + + polygonIndex ++; + faceLength = 0; + + // reset arrays for the next face + facePositionIndexes = []; + faceNormals = []; + faceColors = []; + faceUVs = []; + faceWeights = []; + faceWeightIndices = []; + + } + + } ); + + return buffers; + + } + + // See https://www.khronos.org/opengl/wiki/Calculating_a_Surface_Normal + getNormalNewell( vertices ) { + + const normal = new Vector3( 0.0, 0.0, 0.0 ); + + for ( let i = 0; i < vertices.length; i ++ ) { + + const current = vertices[ i ]; + const next = vertices[ ( i + 1 ) % vertices.length ]; + + normal.x += ( current.y - next.y ) * ( current.z + next.z ); + normal.y += ( current.z - next.z ) * ( current.x + next.x ); + normal.z += ( current.x - next.x ) * ( current.y + next.y ); + + } + + normal.normalize(); + + return normal; + + } + + getNormalTangentAndBitangent( vertices ) { + + const normalVector = this.getNormalNewell( vertices ); + // Avoid up being equal or almost equal to normalVector + const up = Math.abs( normalVector.z ) > 0.5 ? new Vector3( 0.0, 1.0, 0.0 ) : new Vector3( 0.0, 0.0, 1.0 ); + const tangent = up.cross( normalVector ).normalize(); + const bitangent = normalVector.clone().cross( tangent ).normalize(); + + return { + normal: normalVector, + tangent: tangent, + bitangent: bitangent + }; + + } + + flattenVertex( vertex, normalTangent, normalBitangent ) { + + return new Vector2( + vertex.dot( normalTangent ), + vertex.dot( normalBitangent ) + ); + + } + + // Generate data for a single face in a geometry. If the face is a quad then split it into 2 tris + genFace( buffers, geoInfo, facePositionIndexes, materialIndex, faceNormals, faceColors, faceUVs, faceWeights, faceWeightIndices, faceLength ) { + + let triangles; + + if ( faceLength > 3 ) { + + // Triangulate n-gon using earcut + + const vertices = []; + + for ( let i = 0; i < facePositionIndexes.length; i += 3 ) { + + vertices.push( new Vector3( + geoInfo.vertexPositions[ facePositionIndexes[ i ] ], + geoInfo.vertexPositions[ facePositionIndexes[ i + 1 ] ], + geoInfo.vertexPositions[ facePositionIndexes[ i + 2 ] ] + ) ); + + } + + const { tangent, bitangent } = this.getNormalTangentAndBitangent( vertices ); + const triangulationInput = []; + + for ( const vertex of vertices ) { + + triangulationInput.push( this.flattenVertex( vertex, tangent, bitangent ) ); + + } + + triangles = ShapeUtils.triangulateShape( triangulationInput, [] ); + + } else { + + // Regular triangle, skip earcut triangulation step + triangles = [[ 0, 1, 2 ]]; + + } + + for ( const [ i0, i1, i2 ] of triangles ) { + + buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i0 * 3 ] ] ); + buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i0 * 3 + 1 ] ] ); + buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i0 * 3 + 2 ] ] ); + + buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i1 * 3 ] ] ); + buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i1 * 3 + 1 ] ] ); + buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i1 * 3 + 2 ] ] ); + + buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i2 * 3 ] ] ); + buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i2 * 3 + 1 ] ] ); + buffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i2 * 3 + 2 ] ] ); + + if ( geoInfo.skeleton ) { + + buffers.vertexWeights.push( faceWeights[ i0 * 4 ] ); + buffers.vertexWeights.push( faceWeights[ i0 * 4 + 1 ] ); + buffers.vertexWeights.push( faceWeights[ i0 * 4 + 2 ] ); + buffers.vertexWeights.push( faceWeights[ i0 * 4 + 3 ] ); + + buffers.vertexWeights.push( faceWeights[ i1 * 4 ] ); + buffers.vertexWeights.push( faceWeights[ i1 * 4 + 1 ] ); + buffers.vertexWeights.push( faceWeights[ i1 * 4 + 2 ] ); + buffers.vertexWeights.push( faceWeights[ i1 * 4 + 3 ] ); + + buffers.vertexWeights.push( faceWeights[ i2 * 4 ] ); + buffers.vertexWeights.push( faceWeights[ i2 * 4 + 1 ] ); + buffers.vertexWeights.push( faceWeights[ i2 * 4 + 2 ] ); + buffers.vertexWeights.push( faceWeights[ i2 * 4 + 3 ] ); + + buffers.weightsIndices.push( faceWeightIndices[ i0 * 4 ] ); + buffers.weightsIndices.push( faceWeightIndices[ i0 * 4 + 1 ] ); + buffers.weightsIndices.push( faceWeightIndices[ i0 * 4 + 2 ] ); + buffers.weightsIndices.push( faceWeightIndices[ i0 * 4 + 3 ] ); + + buffers.weightsIndices.push( faceWeightIndices[ i1 * 4 ] ); + buffers.weightsIndices.push( faceWeightIndices[ i1 * 4 + 1 ] ); + buffers.weightsIndices.push( faceWeightIndices[ i1 * 4 + 2 ] ); + buffers.weightsIndices.push( faceWeightIndices[ i1 * 4 + 3 ] ); + + buffers.weightsIndices.push( faceWeightIndices[ i2 * 4 ] ); + buffers.weightsIndices.push( faceWeightIndices[ i2 * 4 + 1 ] ); + buffers.weightsIndices.push( faceWeightIndices[ i2 * 4 + 2 ] ); + buffers.weightsIndices.push( faceWeightIndices[ i2 * 4 + 3 ] ); + + } + + if ( geoInfo.color ) { + + buffers.colors.push( faceColors[ i0 * 3 ] ); + buffers.colors.push( faceColors[ i0 * 3 + 1 ] ); + buffers.colors.push( faceColors[ i0 * 3 + 2 ] ); + + buffers.colors.push( faceColors[ i1 * 3 ] ); + buffers.colors.push( faceColors[ i1 * 3 + 1 ] ); + buffers.colors.push( faceColors[ i1 * 3 + 2 ] ); + + buffers.colors.push( faceColors[ i2 * 3 ] ); + buffers.colors.push( faceColors[ i2 * 3 + 1 ] ); + buffers.colors.push( faceColors[ i2 * 3 + 2 ] ); + + } + + if ( geoInfo.material && geoInfo.material.mappingType !== 'AllSame' ) { + + buffers.materialIndex.push( materialIndex ); + buffers.materialIndex.push( materialIndex ); + buffers.materialIndex.push( materialIndex ); + + } + + if ( geoInfo.normal ) { + + buffers.normal.push( faceNormals[ i0 * 3 ] ); + buffers.normal.push( faceNormals[ i0 * 3 + 1 ] ); + buffers.normal.push( faceNormals[ i0 * 3 + 2 ] ); + + buffers.normal.push( faceNormals[ i1 * 3 ] ); + buffers.normal.push( faceNormals[ i1 * 3 + 1 ] ); + buffers.normal.push( faceNormals[ i1 * 3 + 2 ] ); + + buffers.normal.push( faceNormals[ i2 * 3 ] ); + buffers.normal.push( faceNormals[ i2 * 3 + 1 ] ); + buffers.normal.push( faceNormals[ i2 * 3 + 2 ] ); + + } + + if ( geoInfo.uv ) { + + geoInfo.uv.forEach( function ( uv, j ) { + + if ( buffers.uvs[ j ] === undefined ) buffers.uvs[ j ] = []; + + buffers.uvs[ j ].push( faceUVs[ j ][ i0 * 2 ] ); + buffers.uvs[ j ].push( faceUVs[ j ][ i0 * 2 + 1 ] ); + + buffers.uvs[ j ].push( faceUVs[ j ][ i1 * 2 ] ); + buffers.uvs[ j ].push( faceUVs[ j ][ i1 * 2 + 1 ] ); + + buffers.uvs[ j ].push( faceUVs[ j ][ i2 * 2 ] ); + buffers.uvs[ j ].push( faceUVs[ j ][ i2 * 2 + 1 ] ); + + } ); + + } + + } + + } + + addMorphTargets( parentGeo, parentGeoNode, morphTargets, preTransform ) { + + if ( morphTargets.length === 0 ) return; + + parentGeo.morphTargetsRelative = true; + + parentGeo.morphAttributes.position = []; + // parentGeo.morphAttributes.normal = []; // not implemented + + const scope = this; + morphTargets.forEach( function ( morphTarget ) { + + morphTarget.rawTargets.forEach( function ( rawTarget ) { + + const morphGeoNode = fbxTree.Objects.Geometry[ rawTarget.geoID ]; + + if ( morphGeoNode !== undefined ) { + + scope.genMorphGeometry( parentGeo, parentGeoNode, morphGeoNode, preTransform, rawTarget.name ); + + } + + } ); + + } ); + + } + + // a morph geometry node is similar to a standard node, and the node is also contained + // in FBXTree.Objects.Geometry, however it can only have attributes for position, normal + // and a special attribute Index defining which vertices of the original geometry are affected + // Normal and position attributes only have data for the vertices that are affected by the morph + genMorphGeometry( parentGeo, parentGeoNode, morphGeoNode, preTransform, name ) { + + const vertexIndices = ( parentGeoNode.PolygonVertexIndex !== undefined ) ? parentGeoNode.PolygonVertexIndex.a : []; + + const morphPositionsSparse = ( morphGeoNode.Vertices !== undefined ) ? morphGeoNode.Vertices.a : []; + const indices = ( morphGeoNode.Indexes !== undefined ) ? morphGeoNode.Indexes.a : []; + + const length = parentGeo.attributes.position.count * 3; + const morphPositions = new Float32Array( length ); + + for ( let i = 0; i < indices.length; i ++ ) { + + const morphIndex = indices[ i ] * 3; + + morphPositions[ morphIndex ] = morphPositionsSparse[ i * 3 ]; + morphPositions[ morphIndex + 1 ] = morphPositionsSparse[ i * 3 + 1 ]; + morphPositions[ morphIndex + 2 ] = morphPositionsSparse[ i * 3 + 2 ]; + + } + + // TODO: add morph normal support + const morphGeoInfo = { + vertexIndices: vertexIndices, + vertexPositions: morphPositions, + + }; + + const morphBuffers = this.genBuffers( morphGeoInfo ); + + const positionAttribute = new Float32BufferAttribute( morphBuffers.vertex, 3 ); + positionAttribute.name = name || morphGeoNode.attrName; + + positionAttribute.applyMatrix4( preTransform ); + + parentGeo.morphAttributes.position.push( positionAttribute ); + + } + + // Parse normal from FBXTree.Objects.Geometry.LayerElementNormal if it exists + parseNormals( NormalNode ) { + + const mappingType = NormalNode.MappingInformationType; + const referenceType = NormalNode.ReferenceInformationType; + const buffer = NormalNode.Normals.a; + let indexBuffer = []; + if ( referenceType === 'IndexToDirect' ) { + + if ( 'NormalIndex' in NormalNode ) { + + indexBuffer = NormalNode.NormalIndex.a; + + } else if ( 'NormalsIndex' in NormalNode ) { + + indexBuffer = NormalNode.NormalsIndex.a; + + } + + } + + return { + dataSize: 3, + buffer: buffer, + indices: indexBuffer, + mappingType: mappingType, + referenceType: referenceType + }; + + } + + // Parse UVs from FBXTree.Objects.Geometry.LayerElementUV if it exists + parseUVs( UVNode ) { + + const mappingType = UVNode.MappingInformationType; + const referenceType = UVNode.ReferenceInformationType; + const buffer = UVNode.UV.a; + let indexBuffer = []; + if ( referenceType === 'IndexToDirect' ) { + + indexBuffer = UVNode.UVIndex.a; + + } + + return { + dataSize: 2, + buffer: buffer, + indices: indexBuffer, + mappingType: mappingType, + referenceType: referenceType + }; + + } + + // Parse Vertex Colors from FBXTree.Objects.Geometry.LayerElementColor if it exists + parseVertexColors( ColorNode ) { + + const mappingType = ColorNode.MappingInformationType; + const referenceType = ColorNode.ReferenceInformationType; + const buffer = ColorNode.Colors.a; + let indexBuffer = []; + if ( referenceType === 'IndexToDirect' ) { + + indexBuffer = ColorNode.ColorIndex.a; + + } + + for ( let i = 0, c = new Color(); i < buffer.length; i += 4 ) { + + c.fromArray( buffer, i ).convertSRGBToLinear().toArray( buffer, i ); + + } + + return { + dataSize: 4, + buffer: buffer, + indices: indexBuffer, + mappingType: mappingType, + referenceType: referenceType + }; + + } + + // Parse mapping and material data in FBXTree.Objects.Geometry.LayerElementMaterial if it exists + parseMaterialIndices( MaterialNode ) { + + const mappingType = MaterialNode.MappingInformationType; + const referenceType = MaterialNode.ReferenceInformationType; + + if ( mappingType === 'NoMappingInformation' ) { + + return { + dataSize: 1, + buffer: [ 0 ], + indices: [ 0 ], + mappingType: 'AllSame', + referenceType: referenceType + }; + + } + + const materialIndexBuffer = MaterialNode.Materials.a; + + // Since materials are stored as indices, there's a bit of a mismatch between FBX and what + // we expect.So we create an intermediate buffer that points to the index in the buffer, + // for conforming with the other functions we've written for other data. + const materialIndices = []; + + for ( let i = 0; i < materialIndexBuffer.length; ++ i ) { + + materialIndices.push( i ); + + } + + return { + dataSize: 1, + buffer: materialIndexBuffer, + indices: materialIndices, + mappingType: mappingType, + referenceType: referenceType + }; + + } + + // Generate a NurbGeometry from a node in FBXTree.Objects.Geometry + parseNurbsGeometry( geoNode ) { + + const order = parseInt( geoNode.Order ); + + if ( isNaN( order ) ) { + + console.error( 'THREE.FBXLoader: Invalid Order %s given for geometry ID: %s', geoNode.Order, geoNode.id ); + return new BufferGeometry(); + + } + + const degree = order - 1; + + const knots = geoNode.KnotVector.a; + const controlPoints = []; + const pointsValues = geoNode.Points.a; + + for ( let i = 0, l = pointsValues.length; i < l; i += 4 ) { + + controlPoints.push( new Vector4().fromArray( pointsValues, i ) ); + + } + + let startKnot, endKnot; + + if ( geoNode.Form === 'Closed' ) { + + controlPoints.push( controlPoints[ 0 ] ); + + } else if ( geoNode.Form === 'Periodic' ) { + + startKnot = degree; + endKnot = knots.length - 1 - startKnot; + + for ( let i = 0; i < degree; ++ i ) { + + controlPoints.push( controlPoints[ i ] ); + + } + + } + + const curve = new NURBSCurve( degree, knots, controlPoints, startKnot, endKnot ); + const points = curve.getPoints( controlPoints.length * 12 ); + + return new BufferGeometry().setFromPoints( points ); + + } + +} + +// parse animation data from FBXTree +class AnimationParser { + + // take raw animation clips and turn them into three.js animation clips + parse() { + + const animationClips = []; + + const rawClips = this.parseClips(); + + if ( rawClips !== undefined ) { + + for ( const key in rawClips ) { + + const rawClip = rawClips[ key ]; + + const clip = this.addClip( rawClip ); + + animationClips.push( clip ); + + } + + } + + return animationClips; + + } + + parseClips() { + + // since the actual transformation data is stored in FBXTree.Objects.AnimationCurve, + // if this is undefined we can safely assume there are no animations + if ( fbxTree.Objects.AnimationCurve === undefined ) return undefined; + + const curveNodesMap = this.parseAnimationCurveNodes(); + + this.parseAnimationCurves( curveNodesMap ); + + const layersMap = this.parseAnimationLayers( curveNodesMap ); + const rawClips = this.parseAnimStacks( layersMap ); + + return rawClips; + + } + + // parse nodes in FBXTree.Objects.AnimationCurveNode + // each AnimationCurveNode holds data for an animation transform for a model (e.g. left arm rotation ) + // and is referenced by an AnimationLayer + parseAnimationCurveNodes() { + + const rawCurveNodes = fbxTree.Objects.AnimationCurveNode; + + const curveNodesMap = new Map(); + + for ( const nodeID in rawCurveNodes ) { + + const rawCurveNode = rawCurveNodes[ nodeID ]; + + if ( rawCurveNode.attrName.match( /S|R|T|DeformPercent/ ) !== null ) { + + const curveNode = { + + id: rawCurveNode.id, + attr: rawCurveNode.attrName, + curves: {}, + + }; + + curveNodesMap.set( curveNode.id, curveNode ); + + } + + } + + return curveNodesMap; + + } + + // parse nodes in FBXTree.Objects.AnimationCurve and connect them up to + // previously parsed AnimationCurveNodes. Each AnimationCurve holds data for a single animated + // axis ( e.g. times and values of x rotation) + parseAnimationCurves( curveNodesMap ) { + + const rawCurves = fbxTree.Objects.AnimationCurve; + + // TODO: Many values are identical up to roundoff error, but won't be optimised + // e.g. position times: [0, 0.4, 0. 8] + // position values: [7.23538335023477e-7, 93.67518615722656, -0.9982695579528809, 7.23538335023477e-7, 93.67518615722656, -0.9982695579528809, 7.235384487103147e-7, 93.67520904541016, -0.9982695579528809] + // clearly, this should be optimised to + // times: [0], positions [7.23538335023477e-7, 93.67518615722656, -0.9982695579528809] + // this shows up in nearly every FBX file, and generally time array is length > 100 + + for ( const nodeID in rawCurves ) { + + const animationCurve = { + + id: rawCurves[ nodeID ].id, + times: rawCurves[ nodeID ].KeyTime.a.map( convertFBXTimeToSeconds ), + values: rawCurves[ nodeID ].KeyValueFloat.a, + + }; + + const relationships = connections.get( animationCurve.id ); + + if ( relationships !== undefined ) { + + const animationCurveID = relationships.parents[ 0 ].ID; + const animationCurveRelationship = relationships.parents[ 0 ].relationship; + + if ( animationCurveRelationship.match( /X/ ) ) { + + curveNodesMap.get( animationCurveID ).curves[ 'x' ] = animationCurve; + + } else if ( animationCurveRelationship.match( /Y/ ) ) { + + curveNodesMap.get( animationCurveID ).curves[ 'y' ] = animationCurve; + + } else if ( animationCurveRelationship.match( /Z/ ) ) { + + curveNodesMap.get( animationCurveID ).curves[ 'z' ] = animationCurve; + + } else if ( animationCurveRelationship.match( /DeformPercent/ ) && curveNodesMap.has( animationCurveID ) ) { + + curveNodesMap.get( animationCurveID ).curves[ 'morph' ] = animationCurve; + + } + + } + + } + + } + + // parse nodes in FBXTree.Objects.AnimationLayer. Each layers holds references + // to various AnimationCurveNodes and is referenced by an AnimationStack node + // note: theoretically a stack can have multiple layers, however in practice there always seems to be one per stack + parseAnimationLayers( curveNodesMap ) { + + const rawLayers = fbxTree.Objects.AnimationLayer; + + const layersMap = new Map(); + + for ( const nodeID in rawLayers ) { + + const layerCurveNodes = []; + + const connection = connections.get( parseInt( nodeID ) ); + + if ( connection !== undefined ) { + + // all the animationCurveNodes used in the layer + const children = connection.children; + + children.forEach( function ( child, i ) { + + if ( curveNodesMap.has( child.ID ) ) { + + const curveNode = curveNodesMap.get( child.ID ); + + // check that the curves are defined for at least one axis, otherwise ignore the curveNode + if ( curveNode.curves.x !== undefined || curveNode.curves.y !== undefined || curveNode.curves.z !== undefined ) { + + if ( layerCurveNodes[ i ] === undefined ) { + + const modelID = connections.get( child.ID ).parents.filter( function ( parent ) { + + return parent.relationship !== undefined; + + } )[ 0 ].ID; + + if ( modelID !== undefined ) { + + const rawModel = fbxTree.Objects.Model[ modelID.toString() ]; + + if ( rawModel === undefined ) { + + console.warn( 'THREE.FBXLoader: Encountered a unused curve.', child ); + return; + + } + + const node = { + + modelName: rawModel.attrName ? PropertyBinding.sanitizeNodeName( rawModel.attrName ) : '', + ID: rawModel.id, + initialPosition: [ 0, 0, 0 ], + initialRotation: [ 0, 0, 0 ], + initialScale: [ 1, 1, 1 ], + + }; + + sceneGraph.traverse( function ( child ) { + + if ( child.ID === rawModel.id ) { + + node.transform = child.matrix; + + if ( child.userData.transformData ) node.eulerOrder = child.userData.transformData.eulerOrder; + + } + + } ); + + if ( ! node.transform ) node.transform = new Matrix4(); + + // if the animated model is pre rotated, we'll have to apply the pre rotations to every + // animation value as well + if ( 'PreRotation' in rawModel ) node.preRotation = rawModel.PreRotation.value; + if ( 'PostRotation' in rawModel ) node.postRotation = rawModel.PostRotation.value; + + layerCurveNodes[ i ] = node; + + } + + } + + if ( layerCurveNodes[ i ] ) layerCurveNodes[ i ][ curveNode.attr ] = curveNode; + + } else if ( curveNode.curves.morph !== undefined ) { + + if ( layerCurveNodes[ i ] === undefined ) { + + const deformerID = connections.get( child.ID ).parents.filter( function ( parent ) { + + return parent.relationship !== undefined; + + } )[ 0 ].ID; + + const morpherID = connections.get( deformerID ).parents[ 0 ].ID; + const geoID = connections.get( morpherID ).parents[ 0 ].ID; + + // assuming geometry is not used in more than one model + const modelID = connections.get( geoID ).parents[ 0 ].ID; + + const rawModel = fbxTree.Objects.Model[ modelID ]; + + const node = { + + modelName: rawModel.attrName ? PropertyBinding.sanitizeNodeName( rawModel.attrName ) : '', + morphName: fbxTree.Objects.Deformer[ deformerID ].attrName, + + }; + + layerCurveNodes[ i ] = node; + + } + + layerCurveNodes[ i ][ curveNode.attr ] = curveNode; + + } + + } + + } ); + + layersMap.set( parseInt( nodeID ), layerCurveNodes ); + + } + + } + + return layersMap; + + } + + // parse nodes in FBXTree.Objects.AnimationStack. These are the top level node in the animation + // hierarchy. Each Stack node will be used to create a AnimationClip + parseAnimStacks( layersMap ) { + + const rawStacks = fbxTree.Objects.AnimationStack; + + // connect the stacks (clips) up to the layers + const rawClips = {}; + + for ( const nodeID in rawStacks ) { + + const children = connections.get( parseInt( nodeID ) ).children; + + if ( children.length > 1 ) { + + // it seems like stacks will always be associated with a single layer. But just in case there are files + // where there are multiple layers per stack, we'll display a warning + console.warn( 'THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.' ); + + } + + const layer = layersMap.get( children[ 0 ].ID ); + + rawClips[ nodeID ] = { + + name: rawStacks[ nodeID ].attrName, + layer: layer, + + }; + + } + + return rawClips; + + } + + addClip( rawClip ) { + + let tracks = []; + + const scope = this; + rawClip.layer.forEach( function ( rawTracks ) { + + tracks = tracks.concat( scope.generateTracks( rawTracks ) ); + + } ); + + return new AnimationClip( rawClip.name, - 1, tracks ); + + } + + generateTracks( rawTracks ) { + + const tracks = []; + + let initialPosition = new Vector3(); + let initialScale = new Vector3(); + + if ( rawTracks.transform ) rawTracks.transform.decompose( initialPosition, new Quaternion(), initialScale ); + + initialPosition = initialPosition.toArray(); + initialScale = initialScale.toArray(); + + if ( rawTracks.T !== undefined && Object.keys( rawTracks.T.curves ).length > 0 ) { + + const positionTrack = this.generateVectorTrack( rawTracks.modelName, rawTracks.T.curves, initialPosition, 'position' ); + if ( positionTrack !== undefined ) tracks.push( positionTrack ); + + } + + if ( rawTracks.R !== undefined && Object.keys( rawTracks.R.curves ).length > 0 ) { + + const rotationTrack = this.generateRotationTrack( rawTracks.modelName, rawTracks.R.curves, rawTracks.preRotation, rawTracks.postRotation, rawTracks.eulerOrder ); + if ( rotationTrack !== undefined ) tracks.push( rotationTrack ); + + } + + if ( rawTracks.S !== undefined && Object.keys( rawTracks.S.curves ).length > 0 ) { + + const scaleTrack = this.generateVectorTrack( rawTracks.modelName, rawTracks.S.curves, initialScale, 'scale' ); + if ( scaleTrack !== undefined ) tracks.push( scaleTrack ); + + } + + if ( rawTracks.DeformPercent !== undefined ) { + + const morphTrack = this.generateMorphTrack( rawTracks ); + if ( morphTrack !== undefined ) tracks.push( morphTrack ); + + } + + return tracks; + + } + + generateVectorTrack( modelName, curves, initialValue, type ) { + + const times = this.getTimesForAllAxes( curves ); + const values = this.getKeyframeTrackValues( times, curves, initialValue ); + + return new VectorKeyframeTrack( modelName + '.' + type, times, values ); + + } + + generateRotationTrack( modelName, curves, preRotation, postRotation, eulerOrder ) { + + let times; + let values; + + if ( curves.x !== undefined && curves.y !== undefined && curves.z !== undefined ) { + + const result = this.interpolateRotations( curves.x, curves.y, curves.z, eulerOrder ); + + times = result[ 0 ]; + values = result[ 1 ]; + + } + + if ( preRotation !== undefined ) { + + preRotation = preRotation.map( MathUtils.degToRad ); + preRotation.push( eulerOrder ); + + preRotation = new Euler().fromArray( preRotation ); + preRotation = new Quaternion().setFromEuler( preRotation ); + + } + + if ( postRotation !== undefined ) { + + postRotation = postRotation.map( MathUtils.degToRad ); + postRotation.push( eulerOrder ); + + postRotation = new Euler().fromArray( postRotation ); + postRotation = new Quaternion().setFromEuler( postRotation ).invert(); + + } + + const quaternion = new Quaternion(); + const euler = new Euler(); + + const quaternionValues = []; + + if ( ! values || ! times ) return new QuaternionKeyframeTrack( modelName + '.quaternion', [ 0 ], [ 0 ] ); + + for ( let i = 0; i < values.length; i += 3 ) { + + euler.set( values[ i ], values[ i + 1 ], values[ i + 2 ], eulerOrder ); + quaternion.setFromEuler( euler ); + + if ( preRotation !== undefined ) quaternion.premultiply( preRotation ); + if ( postRotation !== undefined ) quaternion.multiply( postRotation ); + + // Check unroll + if ( i > 2 ) { + + const prevQuat = new Quaternion().fromArray( + quaternionValues, + ( ( i - 3 ) / 3 ) * 4 + ); + + if ( prevQuat.dot( quaternion ) < 0 ) { + + quaternion.set( - quaternion.x, - quaternion.y, - quaternion.z, - quaternion.w ); + + } + + } + + quaternion.toArray( quaternionValues, ( i / 3 ) * 4 ); + + } + + return new QuaternionKeyframeTrack( modelName + '.quaternion', times, quaternionValues ); + + } + + generateMorphTrack( rawTracks ) { + + const curves = rawTracks.DeformPercent.curves.morph; + const values = curves.values.map( function ( val ) { + + return val / 100; + + } ); + + const morphNum = sceneGraph.getObjectByName( rawTracks.modelName ).morphTargetDictionary[ rawTracks.morphName ]; + + return new NumberKeyframeTrack( rawTracks.modelName + '.morphTargetInfluences[' + morphNum + ']', curves.times, values ); + + } + + // For all animated objects, times are defined separately for each axis + // Here we'll combine the times into one sorted array without duplicates + getTimesForAllAxes( curves ) { + + let times = []; + + // first join together the times for each axis, if defined + if ( curves.x !== undefined ) times = times.concat( curves.x.times ); + if ( curves.y !== undefined ) times = times.concat( curves.y.times ); + if ( curves.z !== undefined ) times = times.concat( curves.z.times ); + + // then sort them + times = times.sort( function ( a, b ) { + + return a - b; + + } ); + + // and remove duplicates + if ( times.length > 1 ) { + + let targetIndex = 1; + let lastValue = times[ 0 ]; + for ( let i = 1; i < times.length; i ++ ) { + + const currentValue = times[ i ]; + if ( currentValue !== lastValue ) { + + times[ targetIndex ] = currentValue; + lastValue = currentValue; + targetIndex ++; + + } + + } + + times = times.slice( 0, targetIndex ); + + } + + return times; + + } + + getKeyframeTrackValues( times, curves, initialValue ) { + + const prevValue = initialValue; + + const values = []; + + let xIndex = - 1; + let yIndex = - 1; + let zIndex = - 1; + + times.forEach( function ( time ) { + + if ( curves.x ) xIndex = curves.x.times.indexOf( time ); + if ( curves.y ) yIndex = curves.y.times.indexOf( time ); + if ( curves.z ) zIndex = curves.z.times.indexOf( time ); + + // if there is an x value defined for this frame, use that + if ( xIndex !== - 1 ) { + + const xValue = curves.x.values[ xIndex ]; + values.push( xValue ); + prevValue[ 0 ] = xValue; + + } else { + + // otherwise use the x value from the previous frame + values.push( prevValue[ 0 ] ); + + } + + if ( yIndex !== - 1 ) { + + const yValue = curves.y.values[ yIndex ]; + values.push( yValue ); + prevValue[ 1 ] = yValue; + + } else { + + values.push( prevValue[ 1 ] ); + + } + + if ( zIndex !== - 1 ) { + + const zValue = curves.z.values[ zIndex ]; + values.push( zValue ); + prevValue[ 2 ] = zValue; + + } else { + + values.push( prevValue[ 2 ] ); + + } + + } ); + + return values; + + } + + // Rotations are defined as Euler angles which can have values of any size + // These will be converted to quaternions which don't support values greater than + // PI, so we'll interpolate large rotations + interpolateRotations( curvex, curvey, curvez, eulerOrder ) { + + const times = []; + const values = []; + + // Add first frame + times.push( curvex.times[ 0 ] ); + values.push( MathUtils.degToRad( curvex.values[ 0 ] ) ); + values.push( MathUtils.degToRad( curvey.values[ 0 ] ) ); + values.push( MathUtils.degToRad( curvez.values[ 0 ] ) ); + + for ( let i = 1; i < curvex.values.length; i ++ ) { + + const initialValue = [ + curvex.values[ i - 1 ], + curvey.values[ i - 1 ], + curvez.values[ i - 1 ], + ]; + + if ( isNaN( initialValue[ 0 ] ) || isNaN( initialValue[ 1 ] ) || isNaN( initialValue[ 2 ] ) ) { + + continue; + + } + + const initialValueRad = initialValue.map( MathUtils.degToRad ); + + const currentValue = [ + curvex.values[ i ], + curvey.values[ i ], + curvez.values[ i ], + ]; + + if ( isNaN( currentValue[ 0 ] ) || isNaN( currentValue[ 1 ] ) || isNaN( currentValue[ 2 ] ) ) { + + continue; + + } + + const currentValueRad = currentValue.map( MathUtils.degToRad ); + + const valuesSpan = [ + currentValue[ 0 ] - initialValue[ 0 ], + currentValue[ 1 ] - initialValue[ 1 ], + currentValue[ 2 ] - initialValue[ 2 ], + ]; + + const absoluteSpan = [ + Math.abs( valuesSpan[ 0 ] ), + Math.abs( valuesSpan[ 1 ] ), + Math.abs( valuesSpan[ 2 ] ), + ]; + + if ( absoluteSpan[ 0 ] >= 180 || absoluteSpan[ 1 ] >= 180 || absoluteSpan[ 2 ] >= 180 ) { + + const maxAbsSpan = Math.max( ...absoluteSpan ); + + const numSubIntervals = maxAbsSpan / 180; + + const E1 = new Euler( ...initialValueRad, eulerOrder ); + const E2 = new Euler( ...currentValueRad, eulerOrder ); + + const Q1 = new Quaternion().setFromEuler( E1 ); + const Q2 = new Quaternion().setFromEuler( E2 ); + + // Check unroll + if ( Q1.dot( Q2 ) ) { + + Q2.set( - Q2.x, - Q2.y, - Q2.z, - Q2.w ); + + } + + // Interpolate + const initialTime = curvex.times[ i - 1 ]; + const timeSpan = curvex.times[ i ] - initialTime; + + const Q = new Quaternion(); + const E = new Euler(); + for ( let t = 0; t < 1; t += 1 / numSubIntervals ) { + + Q.copy( Q1.clone().slerp( Q2.clone(), t ) ); + + times.push( initialTime + t * timeSpan ); + E.setFromQuaternion( Q, eulerOrder ); + + values.push( E.x ); + values.push( E.y ); + values.push( E.z ); + + } + + } else { + + times.push( curvex.times[ i ] ); + values.push( MathUtils.degToRad( curvex.values[ i ] ) ); + values.push( MathUtils.degToRad( curvey.values[ i ] ) ); + values.push( MathUtils.degToRad( curvez.values[ i ] ) ); + + } + + } + + return [ times, values ]; + + } + +} + +// parse an FBX file in ASCII format +class TextParser { + + getPrevNode() { + + return this.nodeStack[ this.currentIndent - 2 ]; + + } + + getCurrentNode() { + + return this.nodeStack[ this.currentIndent - 1 ]; + + } + + getCurrentProp() { + + return this.currentProp; + + } + + pushStack( node ) { + + this.nodeStack.push( node ); + this.currentIndent += 1; + + } + + popStack() { + + this.nodeStack.pop(); + this.currentIndent -= 1; + + } + + setCurrentProp( val, name ) { + + this.currentProp = val; + this.currentPropName = name; + + } + + parse( text ) { + + this.currentIndent = 0; + + this.allNodes = new FBXTree(); + this.nodeStack = []; + this.currentProp = []; + this.currentPropName = ''; + + const scope = this; + + const split = text.split( /[\r\n]+/ ); + + split.forEach( function ( line, i ) { + + const matchComment = line.match( /^[\s\t]*;/ ); + const matchEmpty = line.match( /^[\s\t]*$/ ); + + if ( matchComment || matchEmpty ) return; + + const matchBeginning = line.match( '^\\t{' + scope.currentIndent + '}(\\w+):(.*){', '' ); + const matchProperty = line.match( '^\\t{' + ( scope.currentIndent ) + '}(\\w+):[\\s\\t\\r\\n](.*)' ); + const matchEnd = line.match( '^\\t{' + ( scope.currentIndent - 1 ) + '}}' ); + + if ( matchBeginning ) { + + scope.parseNodeBegin( line, matchBeginning ); + + } else if ( matchProperty ) { + + scope.parseNodeProperty( line, matchProperty, split[ ++ i ] ); + + } else if ( matchEnd ) { + + scope.popStack(); + + } else if ( line.match( /^[^\s\t}]/ ) ) { + + // large arrays are split over multiple lines terminated with a ',' character + // if this is encountered the line needs to be joined to the previous line + scope.parseNodePropertyContinued( line ); + + } + + } ); + + return this.allNodes; + + } + + parseNodeBegin( line, property ) { + + const nodeName = property[ 1 ].trim().replace( /^"/, '' ).replace( /"$/, '' ); + + const nodeAttrs = property[ 2 ].split( ',' ).map( function ( attr ) { + + return attr.trim().replace( /^"/, '' ).replace( /"$/, '' ); + + } ); + + const node = { name: nodeName }; + const attrs = this.parseNodeAttr( nodeAttrs ); + + const currentNode = this.getCurrentNode(); + + // a top node + if ( this.currentIndent === 0 ) { + + this.allNodes.add( nodeName, node ); + + } else { // a subnode + + // if the subnode already exists, append it + if ( nodeName in currentNode ) { + + // special case Pose needs PoseNodes as an array + if ( nodeName === 'PoseNode' ) { + + currentNode.PoseNode.push( node ); + + } else if ( currentNode[ nodeName ].id !== undefined ) { + + currentNode[ nodeName ] = {}; + currentNode[ nodeName ][ currentNode[ nodeName ].id ] = currentNode[ nodeName ]; + + } + + if ( attrs.id !== '' ) currentNode[ nodeName ][ attrs.id ] = node; + + } else if ( typeof attrs.id === 'number' ) { + + currentNode[ nodeName ] = {}; + currentNode[ nodeName ][ attrs.id ] = node; + + } else if ( nodeName !== 'Properties70' ) { + + if ( nodeName === 'PoseNode' ) currentNode[ nodeName ] = [ node ]; + else currentNode[ nodeName ] = node; + + } + + } + + if ( typeof attrs.id === 'number' ) node.id = attrs.id; + if ( attrs.name !== '' ) node.attrName = attrs.name; + if ( attrs.type !== '' ) node.attrType = attrs.type; + + this.pushStack( node ); + + } + + parseNodeAttr( attrs ) { + + let id = attrs[ 0 ]; + + if ( attrs[ 0 ] !== '' ) { + + id = parseInt( attrs[ 0 ] ); + + if ( isNaN( id ) ) { + + id = attrs[ 0 ]; + + } + + } + + let name = '', type = ''; + + if ( attrs.length > 1 ) { + + name = attrs[ 1 ].replace( /^(\w+)::/, '' ); + type = attrs[ 2 ]; + + } + + return { id: id, name: name, type: type }; + + } + + parseNodeProperty( line, property, contentLine ) { + + let propName = property[ 1 ].replace( /^"/, '' ).replace( /"$/, '' ).trim(); + let propValue = property[ 2 ].replace( /^"/, '' ).replace( /"$/, '' ).trim(); + + // for special case: base64 image data follows "Content: ," line + // Content: , + // "/9j/4RDaRXhpZgAATU0A..." + if ( propName === 'Content' && propValue === ',' ) { + + propValue = contentLine.replace( /"/g, '' ).replace( /,$/, '' ).trim(); + + } + + const currentNode = this.getCurrentNode(); + const parentName = currentNode.name; + + if ( parentName === 'Properties70' ) { + + this.parseNodeSpecialProperty( line, propName, propValue ); + return; + + } + + // Connections + if ( propName === 'C' ) { + + const connProps = propValue.split( ',' ).slice( 1 ); + const from = parseInt( connProps[ 0 ] ); + const to = parseInt( connProps[ 1 ] ); + + let rest = propValue.split( ',' ).slice( 3 ); + + rest = rest.map( function ( elem ) { + + return elem.trim().replace( /^"/, '' ); + + } ); + + propName = 'connections'; + propValue = [ from, to ]; + append( propValue, rest ); + + if ( currentNode[ propName ] === undefined ) { + + currentNode[ propName ] = []; + + } + + } + + // Node + if ( propName === 'Node' ) currentNode.id = propValue; + + // connections + if ( propName in currentNode && Array.isArray( currentNode[ propName ] ) ) { + + currentNode[ propName ].push( propValue ); + + } else { + + if ( propName !== 'a' ) currentNode[ propName ] = propValue; + else currentNode.a = propValue; + + } + + this.setCurrentProp( currentNode, propName ); + + // convert string to array, unless it ends in ',' in which case more will be added to it + if ( propName === 'a' && propValue.slice( - 1 ) !== ',' ) { + + currentNode.a = parseNumberArray( propValue ); + + } + + } + + parseNodePropertyContinued( line ) { + + const currentNode = this.getCurrentNode(); + + currentNode.a += line; + + // if the line doesn't end in ',' we have reached the end of the property value + // so convert the string to an array + if ( line.slice( - 1 ) !== ',' ) { + + currentNode.a = parseNumberArray( currentNode.a ); + + } + + } + + // parse "Property70" + parseNodeSpecialProperty( line, propName, propValue ) { + + // split this + // P: "Lcl Scaling", "Lcl Scaling", "", "A",1,1,1 + // into array like below + // ["Lcl Scaling", "Lcl Scaling", "", "A", "1,1,1" ] + const props = propValue.split( '",' ).map( function ( prop ) { + + return prop.trim().replace( /^\"/, '' ).replace( /\s/, '_' ); + + } ); + + const innerPropName = props[ 0 ]; + const innerPropType1 = props[ 1 ]; + const innerPropType2 = props[ 2 ]; + const innerPropFlag = props[ 3 ]; + let innerPropValue = props[ 4 ]; + + // cast values where needed, otherwise leave as strings + switch ( innerPropType1 ) { + + case 'int': + case 'enum': + case 'bool': + case 'ULongLong': + case 'double': + case 'Number': + case 'FieldOfView': + innerPropValue = parseFloat( innerPropValue ); + break; + + case 'Color': + case 'ColorRGB': + case 'Vector3D': + case 'Lcl_Translation': + case 'Lcl_Rotation': + case 'Lcl_Scaling': + innerPropValue = parseNumberArray( innerPropValue ); + break; + + } + + // CAUTION: these props must append to parent's parent + this.getPrevNode()[ innerPropName ] = { + + 'type': innerPropType1, + 'type2': innerPropType2, + 'flag': innerPropFlag, + 'value': innerPropValue + + }; + + this.setCurrentProp( this.getPrevNode(), innerPropName ); + + } + +} + +// Parse an FBX file in Binary format +class BinaryParser { + + parse( buffer ) { + + const reader = new BinaryReader( buffer ); + reader.skip( 23 ); // skip magic 23 bytes + + const version = reader.getUint32(); + + if ( version < 6400 ) { + + throw new Error( 'THREE.FBXLoader: FBX version not supported, FileVersion: ' + version ); + + } + + const allNodes = new FBXTree(); + + while ( ! this.endOfContent( reader ) ) { + + const node = this.parseNode( reader, version ); + if ( node !== null ) allNodes.add( node.name, node ); + + } + + return allNodes; + + } + + // Check if reader has reached the end of content. + endOfContent( reader ) { + + // footer size: 160bytes + 16-byte alignment padding + // - 16bytes: magic + // - padding til 16-byte alignment (at least 1byte?) + // (seems like some exporters embed fixed 15 or 16bytes?) + // - 4bytes: magic + // - 4bytes: version + // - 120bytes: zero + // - 16bytes: magic + if ( reader.size() % 16 === 0 ) { + + return ( ( reader.getOffset() + 160 + 16 ) & ~ 0xf ) >= reader.size(); + + } else { + + return reader.getOffset() + 160 + 16 >= reader.size(); + + } + + } + + // recursively parse nodes until the end of the file is reached + parseNode( reader, version ) { + + const node = {}; + + // The first three data sizes depends on version. + const endOffset = ( version >= 7500 ) ? reader.getUint64() : reader.getUint32(); + const numProperties = ( version >= 7500 ) ? reader.getUint64() : reader.getUint32(); + + ( version >= 7500 ) ? reader.getUint64() : reader.getUint32(); // the returned propertyListLen is not used + + const nameLen = reader.getUint8(); + const name = reader.getString( nameLen ); + + // Regards this node as NULL-record if endOffset is zero + if ( endOffset === 0 ) return null; + + const propertyList = []; + + for ( let i = 0; i < numProperties; i ++ ) { + + propertyList.push( this.parseProperty( reader ) ); + + } + + // Regards the first three elements in propertyList as id, attrName, and attrType + const id = propertyList.length > 0 ? propertyList[ 0 ] : ''; + const attrName = propertyList.length > 1 ? propertyList[ 1 ] : ''; + const attrType = propertyList.length > 2 ? propertyList[ 2 ] : ''; + + // check if this node represents just a single property + // like (name, 0) set or (name2, [0, 1, 2]) set of {name: 0, name2: [0, 1, 2]} + node.singleProperty = ( numProperties === 1 && reader.getOffset() === endOffset ) ? true : false; + + while ( endOffset > reader.getOffset() ) { + + const subNode = this.parseNode( reader, version ); + + if ( subNode !== null ) this.parseSubNode( name, node, subNode ); + + } + + node.propertyList = propertyList; // raw property list used by parent + + if ( typeof id === 'number' ) node.id = id; + if ( attrName !== '' ) node.attrName = attrName; + if ( attrType !== '' ) node.attrType = attrType; + if ( name !== '' ) node.name = name; + + return node; + + } + + parseSubNode( name, node, subNode ) { + + // special case: child node is single property + if ( subNode.singleProperty === true ) { + + const value = subNode.propertyList[ 0 ]; + + if ( Array.isArray( value ) ) { + + node[ subNode.name ] = subNode; + + subNode.a = value; + + } else { + + node[ subNode.name ] = value; + + } + + } else if ( name === 'Connections' && subNode.name === 'C' ) { + + const array = []; + + subNode.propertyList.forEach( function ( property, i ) { + + // first Connection is FBX type (OO, OP, etc.). We'll discard these + if ( i !== 0 ) array.push( property ); + + } ); + + if ( node.connections === undefined ) { + + node.connections = []; + + } + + node.connections.push( array ); + + } else if ( subNode.name === 'Properties70' ) { + + const keys = Object.keys( subNode ); + + keys.forEach( function ( key ) { + + node[ key ] = subNode[ key ]; + + } ); + + } else if ( name === 'Properties70' && subNode.name === 'P' ) { + + let innerPropName = subNode.propertyList[ 0 ]; + let innerPropType1 = subNode.propertyList[ 1 ]; + const innerPropType2 = subNode.propertyList[ 2 ]; + const innerPropFlag = subNode.propertyList[ 3 ]; + let innerPropValue; + + if ( innerPropName.indexOf( 'Lcl ' ) === 0 ) innerPropName = innerPropName.replace( 'Lcl ', 'Lcl_' ); + if ( innerPropType1.indexOf( 'Lcl ' ) === 0 ) innerPropType1 = innerPropType1.replace( 'Lcl ', 'Lcl_' ); + + if ( innerPropType1 === 'Color' || innerPropType1 === 'ColorRGB' || innerPropType1 === 'Vector' || innerPropType1 === 'Vector3D' || innerPropType1.indexOf( 'Lcl_' ) === 0 ) { + + innerPropValue = [ + subNode.propertyList[ 4 ], + subNode.propertyList[ 5 ], + subNode.propertyList[ 6 ] + ]; + + } else { + + innerPropValue = subNode.propertyList[ 4 ]; + + } + + // this will be copied to parent, see above + node[ innerPropName ] = { + + 'type': innerPropType1, + 'type2': innerPropType2, + 'flag': innerPropFlag, + 'value': innerPropValue + + }; + + } else if ( node[ subNode.name ] === undefined ) { + + if ( typeof subNode.id === 'number' ) { + + node[ subNode.name ] = {}; + node[ subNode.name ][ subNode.id ] = subNode; + + } else { + + node[ subNode.name ] = subNode; + + } + + } else { + + if ( subNode.name === 'PoseNode' ) { + + if ( ! Array.isArray( node[ subNode.name ] ) ) { + + node[ subNode.name ] = [ node[ subNode.name ] ]; + + } + + node[ subNode.name ].push( subNode ); + + } else if ( node[ subNode.name ][ subNode.id ] === undefined ) { + + node[ subNode.name ][ subNode.id ] = subNode; + + } + + } + + } + + parseProperty( reader ) { + + const type = reader.getString( 1 ); + let length; + + switch ( type ) { + + case 'C': + return reader.getBoolean(); + + case 'D': + return reader.getFloat64(); + + case 'F': + return reader.getFloat32(); + + case 'I': + return reader.getInt32(); + + case 'L': + return reader.getInt64(); + + case 'R': + length = reader.getUint32(); + return reader.getArrayBuffer( length ); + + case 'S': + length = reader.getUint32(); + return reader.getString( length ); + + case 'Y': + return reader.getInt16(); + + case 'b': + case 'c': + case 'd': + case 'f': + case 'i': + case 'l': + + const arrayLength = reader.getUint32(); + const encoding = reader.getUint32(); // 0: non-compressed, 1: compressed + const compressedLength = reader.getUint32(); + + if ( encoding === 0 ) { + + switch ( type ) { + + case 'b': + case 'c': + return reader.getBooleanArray( arrayLength ); + + case 'd': + return reader.getFloat64Array( arrayLength ); + + case 'f': + return reader.getFloat32Array( arrayLength ); + + case 'i': + return reader.getInt32Array( arrayLength ); + + case 'l': + return reader.getInt64Array( arrayLength ); + + } + + } + + const data = fflate.unzlibSync( new Uint8Array( reader.getArrayBuffer( compressedLength ) ) ); + const reader2 = new BinaryReader( data.buffer ); + + switch ( type ) { + + case 'b': + case 'c': + return reader2.getBooleanArray( arrayLength ); + + case 'd': + return reader2.getFloat64Array( arrayLength ); + + case 'f': + return reader2.getFloat32Array( arrayLength ); + + case 'i': + return reader2.getInt32Array( arrayLength ); + + case 'l': + return reader2.getInt64Array( arrayLength ); + + } + + break; // cannot happen but is required by the DeepScan + + default: + throw new Error( 'THREE.FBXLoader: Unknown property type ' + type ); + + } + + } + +} + +class BinaryReader { + + constructor( buffer, littleEndian ) { + + this.dv = new DataView( buffer ); + this.offset = 0; + this.littleEndian = ( littleEndian !== undefined ) ? littleEndian : true; + this._textDecoder = new TextDecoder(); + + } + + getOffset() { + + return this.offset; + + } + + size() { + + return this.dv.buffer.byteLength; + + } + + skip( length ) { + + this.offset += length; + + } + + // seems like true/false representation depends on exporter. + // true: 1 or 'Y'(=0x59), false: 0 or 'T'(=0x54) + // then sees LSB. + getBoolean() { + + return ( this.getUint8() & 1 ) === 1; + + } + + getBooleanArray( size ) { + + const a = []; + + for ( let i = 0; i < size; i ++ ) { + + a.push( this.getBoolean() ); + + } + + return a; + + } + + getUint8() { + + const value = this.dv.getUint8( this.offset ); + this.offset += 1; + return value; + + } + + getInt16() { + + const value = this.dv.getInt16( this.offset, this.littleEndian ); + this.offset += 2; + return value; + + } + + getInt32() { + + const value = this.dv.getInt32( this.offset, this.littleEndian ); + this.offset += 4; + return value; + + } + + getInt32Array( size ) { + + const a = []; + + for ( let i = 0; i < size; i ++ ) { + + a.push( this.getInt32() ); + + } + + return a; + + } + + getUint32() { + + const value = this.dv.getUint32( this.offset, this.littleEndian ); + this.offset += 4; + return value; + + } + + // JavaScript doesn't support 64-bit integer so calculate this here + // 1 << 32 will return 1 so using multiply operation instead here. + // There's a possibility that this method returns wrong value if the value + // is out of the range between Number.MAX_SAFE_INTEGER and Number.MIN_SAFE_INTEGER. + // TODO: safely handle 64-bit integer + getInt64() { + + let low, high; + + if ( this.littleEndian ) { + + low = this.getUint32(); + high = this.getUint32(); + + } else { + + high = this.getUint32(); + low = this.getUint32(); + + } + + // calculate negative value + if ( high & 0x80000000 ) { + + high = ~ high & 0xFFFFFFFF; + low = ~ low & 0xFFFFFFFF; + + if ( low === 0xFFFFFFFF ) high = ( high + 1 ) & 0xFFFFFFFF; + + low = ( low + 1 ) & 0xFFFFFFFF; + + return - ( high * 0x100000000 + low ); + + } + + return high * 0x100000000 + low; + + } + + getInt64Array( size ) { + + const a = []; + + for ( let i = 0; i < size; i ++ ) { + + a.push( this.getInt64() ); + + } + + return a; + + } + + // Note: see getInt64() comment + getUint64() { + + let low, high; + + if ( this.littleEndian ) { + + low = this.getUint32(); + high = this.getUint32(); + + } else { + + high = this.getUint32(); + low = this.getUint32(); + + } + + return high * 0x100000000 + low; + + } + + getFloat32() { + + const value = this.dv.getFloat32( this.offset, this.littleEndian ); + this.offset += 4; + return value; + + } + + getFloat32Array( size ) { + + const a = []; + + for ( let i = 0; i < size; i ++ ) { + + a.push( this.getFloat32() ); + + } + + return a; + + } + + getFloat64() { + + const value = this.dv.getFloat64( this.offset, this.littleEndian ); + this.offset += 8; + return value; + + } + + getFloat64Array( size ) { + + const a = []; + + for ( let i = 0; i < size; i ++ ) { + + a.push( this.getFloat64() ); + + } + + return a; + + } + + getArrayBuffer( size ) { + + const value = this.dv.buffer.slice( this.offset, this.offset + size ); + this.offset += size; + return value; + + } + + getString( size ) { + + const start = this.offset; + let a = new Uint8Array( this.dv.buffer, start, size ); + + this.skip( size ); + + const nullByte = a.indexOf( 0 ); + if ( nullByte >= 0 ) a = new Uint8Array( this.dv.buffer, start, nullByte ); + + return this._textDecoder.decode( a ); + + } + +} + +// FBXTree holds a representation of the FBX data, returned by the TextParser ( FBX ASCII format) +// and BinaryParser( FBX Binary format) +class FBXTree { + + add( key, val ) { + + this[ key ] = val; + + } + +} + +// ************** UTILITY FUNCTIONS ************** + +function isFbxFormatBinary( buffer ) { + + const CORRECT = 'Kaydara\u0020FBX\u0020Binary\u0020\u0020\0'; + + return buffer.byteLength >= CORRECT.length && CORRECT === convertArrayBufferToString( buffer, 0, CORRECT.length ); + +} + +function isFbxFormatASCII( text ) { + + const CORRECT = [ 'K', 'a', 'y', 'd', 'a', 'r', 'a', '\\', 'F', 'B', 'X', '\\', 'B', 'i', 'n', 'a', 'r', 'y', '\\', '\\' ]; + + let cursor = 0; + + function read( offset ) { + + const result = text[ offset - 1 ]; + text = text.slice( cursor + offset ); + cursor ++; + return result; + + } + + for ( let i = 0; i < CORRECT.length; ++ i ) { + + const num = read( 1 ); + if ( num === CORRECT[ i ] ) { + + return false; + + } + + } + + return true; + +} + +function getFbxVersion( text ) { + + const versionRegExp = /FBXVersion: (\d+)/; + const match = text.match( versionRegExp ); + + if ( match ) { + + const version = parseInt( match[ 1 ] ); + return version; + + } + + throw new Error( 'THREE.FBXLoader: Cannot find the version number for the file given.' ); + +} + +// Converts FBX ticks into real time seconds. +function convertFBXTimeToSeconds( time ) { + + return time / 46186158000; + +} + +const dataArray = []; + +// extracts the data from the correct position in the FBX array based on indexing type +function getData( polygonVertexIndex, polygonIndex, vertexIndex, infoObject ) { + + let index; + + switch ( infoObject.mappingType ) { + + case 'ByPolygonVertex' : + index = polygonVertexIndex; + break; + case 'ByPolygon' : + index = polygonIndex; + break; + case 'ByVertice' : + index = vertexIndex; + break; + case 'AllSame' : + index = infoObject.indices[ 0 ]; + break; + default : + console.warn( 'THREE.FBXLoader: unknown attribute mapping type ' + infoObject.mappingType ); + + } + + if ( infoObject.referenceType === 'IndexToDirect' ) index = infoObject.indices[ index ]; + + const from = index * infoObject.dataSize; + const to = from + infoObject.dataSize; + + return slice( dataArray, infoObject.buffer, from, to ); + +} + +const tempEuler = new Euler(); +const tempVec = new Vector3(); + +// generate transformation from FBX transform data +// ref: https://help.autodesk.com/view/FBX/2017/ENU/?guid=__files_GUID_10CDD63C_79C1_4F2D_BB28_AD2BE65A02ED_htm +// ref: http://docs.autodesk.com/FBX/2014/ENU/FBX-SDK-Documentation/index.html?url=cpp_ref/_transformations_2main_8cxx-example.html,topicNumber=cpp_ref__transformations_2main_8cxx_example_htmlfc10a1e1-b18d-4e72-9dc0-70d0f1959f5e +function generateTransform( transformData ) { + + const lTranslationM = new Matrix4(); + const lPreRotationM = new Matrix4(); + const lRotationM = new Matrix4(); + const lPostRotationM = new Matrix4(); + + const lScalingM = new Matrix4(); + const lScalingPivotM = new Matrix4(); + const lScalingOffsetM = new Matrix4(); + const lRotationOffsetM = new Matrix4(); + const lRotationPivotM = new Matrix4(); + + const lParentGX = new Matrix4(); + const lParentLX = new Matrix4(); + const lGlobalT = new Matrix4(); + + const inheritType = ( transformData.inheritType ) ? transformData.inheritType : 0; + + if ( transformData.translation ) lTranslationM.setPosition( tempVec.fromArray( transformData.translation ) ); + + if ( transformData.preRotation ) { + + const array = transformData.preRotation.map( MathUtils.degToRad ); + array.push( transformData.eulerOrder || Euler.DEFAULT_ORDER ); + lPreRotationM.makeRotationFromEuler( tempEuler.fromArray( array ) ); + + } + + if ( transformData.rotation ) { + + const array = transformData.rotation.map( MathUtils.degToRad ); + array.push( transformData.eulerOrder || Euler.DEFAULT_ORDER ); + lRotationM.makeRotationFromEuler( tempEuler.fromArray( array ) ); + + } + + if ( transformData.postRotation ) { + + const array = transformData.postRotation.map( MathUtils.degToRad ); + array.push( transformData.eulerOrder || Euler.DEFAULT_ORDER ); + lPostRotationM.makeRotationFromEuler( tempEuler.fromArray( array ) ); + lPostRotationM.invert(); + + } + + if ( transformData.scale ) lScalingM.scale( tempVec.fromArray( transformData.scale ) ); + + // Pivots and offsets + if ( transformData.scalingOffset ) lScalingOffsetM.setPosition( tempVec.fromArray( transformData.scalingOffset ) ); + if ( transformData.scalingPivot ) lScalingPivotM.setPosition( tempVec.fromArray( transformData.scalingPivot ) ); + if ( transformData.rotationOffset ) lRotationOffsetM.setPosition( tempVec.fromArray( transformData.rotationOffset ) ); + if ( transformData.rotationPivot ) lRotationPivotM.setPosition( tempVec.fromArray( transformData.rotationPivot ) ); + + // parent transform + if ( transformData.parentMatrixWorld ) { + + lParentLX.copy( transformData.parentMatrix ); + lParentGX.copy( transformData.parentMatrixWorld ); + + } + + const lLRM = lPreRotationM.clone().multiply( lRotationM ).multiply( lPostRotationM ); + // Global Rotation + const lParentGRM = new Matrix4(); + lParentGRM.extractRotation( lParentGX ); + + // Global Shear*Scaling + const lParentTM = new Matrix4(); + lParentTM.copyPosition( lParentGX ); + + const lParentGRSM = lParentTM.clone().invert().multiply( lParentGX ); + const lParentGSM = lParentGRM.clone().invert().multiply( lParentGRSM ); + const lLSM = lScalingM; + + const lGlobalRS = new Matrix4(); + + if ( inheritType === 0 ) { + + lGlobalRS.copy( lParentGRM ).multiply( lLRM ).multiply( lParentGSM ).multiply( lLSM ); + + } else if ( inheritType === 1 ) { + + lGlobalRS.copy( lParentGRM ).multiply( lParentGSM ).multiply( lLRM ).multiply( lLSM ); + + } else { + + const lParentLSM = new Matrix4().scale( new Vector3().setFromMatrixScale( lParentLX ) ); + const lParentLSM_inv = lParentLSM.clone().invert(); + const lParentGSM_noLocal = lParentGSM.clone().multiply( lParentLSM_inv ); + + lGlobalRS.copy( lParentGRM ).multiply( lLRM ).multiply( lParentGSM_noLocal ).multiply( lLSM ); + + } + + const lRotationPivotM_inv = lRotationPivotM.clone().invert(); + const lScalingPivotM_inv = lScalingPivotM.clone().invert(); + // Calculate the local transform matrix + let lTransform = lTranslationM.clone().multiply( lRotationOffsetM ).multiply( lRotationPivotM ).multiply( lPreRotationM ).multiply( lRotationM ).multiply( lPostRotationM ).multiply( lRotationPivotM_inv ).multiply( lScalingOffsetM ).multiply( lScalingPivotM ).multiply( lScalingM ).multiply( lScalingPivotM_inv ); + + const lLocalTWithAllPivotAndOffsetInfo = new Matrix4().copyPosition( lTransform ); + + const lGlobalTranslation = lParentGX.clone().multiply( lLocalTWithAllPivotAndOffsetInfo ); + lGlobalT.copyPosition( lGlobalTranslation ); + + lTransform = lGlobalT.clone().multiply( lGlobalRS ); + + // from global to local + lTransform.premultiply( lParentGX.invert() ); + + return lTransform; + +} + +// Returns the three.js intrinsic Euler order corresponding to FBX extrinsic Euler order +// ref: http://help.autodesk.com/view/FBX/2017/ENU/?guid=__cpp_ref_class_fbx_euler_html +function getEulerOrder( order ) { + + order = order || 0; + + const enums = [ + 'ZYX', // -> XYZ extrinsic + 'YZX', // -> XZY extrinsic + 'XZY', // -> YZX extrinsic + 'ZXY', // -> YXZ extrinsic + 'YXZ', // -> ZXY extrinsic + 'XYZ', // -> ZYX extrinsic + //'SphericXYZ', // not possible to support + ]; + + if ( order === 6 ) { + + console.warn( 'THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.' ); + return enums[ 0 ]; + + } + + return enums[ order ]; + +} + +// Parses comma separated list of numbers and returns them an array. +// Used internally by the TextParser +function parseNumberArray( value ) { + + const array = value.split( ',' ).map( function ( val ) { + + return parseFloat( val ); + + } ); + + return array; + +} + +function convertArrayBufferToString( buffer, from, to ) { + + if ( from === undefined ) from = 0; + if ( to === undefined ) to = buffer.byteLength; + + return new TextDecoder().decode( new Uint8Array( buffer, from, to ) ); + +} + +function append( a, b ) { + + for ( let i = 0, j = a.length, l = b.length; i < l; i ++, j ++ ) { + + a[ j ] = b[ i ]; + + } + +} + +function slice( a, b, from, to ) { + + for ( let i = from, j = 0; i < to; i ++, j ++ ) { + + a[ j ] = b[ i ]; + + } + + return a; + +} + + +export { FBXLoader }; diff --git a/node_modules/three/examples/jsm/loaders/FontLoader.js b/node_modules/three/examples/jsm/loaders/FontLoader.js new file mode 100644 index 0000000..93caeb5 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/FontLoader.js @@ -0,0 +1,183 @@ +import { + FileLoader, + Loader, + ShapePath +} from 'three'; + +class FontLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + loader.load( url, function ( text ) { + + const font = scope.parse( JSON.parse( text ) ); + + if ( onLoad ) onLoad( font ); + + }, onProgress, onError ); + + } + + parse( json ) { + + return new Font( json ); + + } + +} + +// + +class Font { + + constructor( data ) { + + this.isFont = true; + + this.type = 'Font'; + + this.data = data; + + } + + generateShapes( text, size = 100 ) { + + const shapes = []; + const paths = createPaths( text, size, this.data ); + + for ( let p = 0, pl = paths.length; p < pl; p ++ ) { + + shapes.push( ...paths[ p ].toShapes() ); + + } + + return shapes; + + } + +} + +function createPaths( text, size, data ) { + + const chars = Array.from( text ); + const scale = size / data.resolution; + const line_height = ( data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness ) * scale; + + const paths = []; + + let offsetX = 0, offsetY = 0; + + for ( let i = 0; i < chars.length; i ++ ) { + + const char = chars[ i ]; + + if ( char === '\n' ) { + + offsetX = 0; + offsetY -= line_height; + + } else { + + const ret = createPath( char, scale, offsetX, offsetY, data ); + offsetX += ret.offsetX; + paths.push( ret.path ); + + } + + } + + return paths; + +} + +function createPath( char, scale, offsetX, offsetY, data ) { + + const glyph = data.glyphs[ char ] || data.glyphs[ '?' ]; + + if ( ! glyph ) { + + console.error( 'THREE.Font: character "' + char + '" does not exists in font family ' + data.familyName + '.' ); + + return; + + } + + const path = new ShapePath(); + + let x, y, cpx, cpy, cpx1, cpy1, cpx2, cpy2; + + if ( glyph.o ) { + + const outline = glyph._cachedOutline || ( glyph._cachedOutline = glyph.o.split( ' ' ) ); + + for ( let i = 0, l = outline.length; i < l; ) { + + const action = outline[ i ++ ]; + + switch ( action ) { + + case 'm': // moveTo + + x = outline[ i ++ ] * scale + offsetX; + y = outline[ i ++ ] * scale + offsetY; + + path.moveTo( x, y ); + + break; + + case 'l': // lineTo + + x = outline[ i ++ ] * scale + offsetX; + y = outline[ i ++ ] * scale + offsetY; + + path.lineTo( x, y ); + + break; + + case 'q': // quadraticCurveTo + + cpx = outline[ i ++ ] * scale + offsetX; + cpy = outline[ i ++ ] * scale + offsetY; + cpx1 = outline[ i ++ ] * scale + offsetX; + cpy1 = outline[ i ++ ] * scale + offsetY; + + path.quadraticCurveTo( cpx1, cpy1, cpx, cpy ); + + break; + + case 'b': // bezierCurveTo + + cpx = outline[ i ++ ] * scale + offsetX; + cpy = outline[ i ++ ] * scale + offsetY; + cpx1 = outline[ i ++ ] * scale + offsetX; + cpy1 = outline[ i ++ ] * scale + offsetY; + cpx2 = outline[ i ++ ] * scale + offsetX; + cpy2 = outline[ i ++ ] * scale + offsetY; + + path.bezierCurveTo( cpx1, cpy1, cpx2, cpy2, cpx, cpy ); + + break; + + } + + } + + } + + return { offsetX: glyph.ha * scale, path: path }; + +} + +export { FontLoader, Font }; diff --git a/node_modules/three/examples/jsm/loaders/GCodeLoader.js b/node_modules/three/examples/jsm/loaders/GCodeLoader.js new file mode 100644 index 0000000..c2f1280 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/GCodeLoader.js @@ -0,0 +1,261 @@ +import { + BufferGeometry, + FileLoader, + Float32BufferAttribute, + Group, + LineBasicMaterial, + LineSegments, + Loader +} from 'three'; + +/** + * GCodeLoader is used to load gcode files usually used for 3D printing or CNC applications. + * + * Gcode files are composed by commands used by machines to create objects. + * + * @class GCodeLoader + * @param {Manager} manager Loading manager. + */ + +class GCodeLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.splitLayer = false; + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( text ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( data ) { + + let state = { x: 0, y: 0, z: 0, e: 0, f: 0, extruding: false, relative: false }; + const layers = []; + + let currentLayer = undefined; + + const pathMaterial = new LineBasicMaterial( { color: 0xFF0000 } ); + pathMaterial.name = 'path'; + + const extrudingMaterial = new LineBasicMaterial( { color: 0x00FF00 } ); + extrudingMaterial.name = 'extruded'; + + function newLayer( line ) { + + currentLayer = { vertex: [], pathVertex: [], z: line.z }; + layers.push( currentLayer ); + + } + + //Create lie segment between p1 and p2 + function addSegment( p1, p2 ) { + + if ( currentLayer === undefined ) { + + newLayer( p1 ); + + } + + if ( state.extruding ) { + + currentLayer.vertex.push( p1.x, p1.y, p1.z ); + currentLayer.vertex.push( p2.x, p2.y, p2.z ); + + } else { + + currentLayer.pathVertex.push( p1.x, p1.y, p1.z ); + currentLayer.pathVertex.push( p2.x, p2.y, p2.z ); + + } + + } + + function delta( v1, v2 ) { + + return state.relative ? v2 : v2 - v1; + + } + + function absolute( v1, v2 ) { + + return state.relative ? v1 + v2 : v2; + + } + + const lines = data.replace( /;.+/g, '' ).split( '\n' ); + + for ( let i = 0; i < lines.length; i ++ ) { + + const tokens = lines[ i ].split( ' ' ); + const cmd = tokens[ 0 ].toUpperCase(); + + //Argumments + const args = {}; + tokens.splice( 1 ).forEach( function ( token ) { + + if ( token[ 0 ] !== undefined ) { + + const key = token[ 0 ].toLowerCase(); + const value = parseFloat( token.substring( 1 ) ); + args[ key ] = value; + + } + + } ); + + //Process commands + //G0/G1 – Linear Movement + if ( cmd === 'G0' || cmd === 'G1' ) { + + const line = { + x: args.x !== undefined ? absolute( state.x, args.x ) : state.x, + y: args.y !== undefined ? absolute( state.y, args.y ) : state.y, + z: args.z !== undefined ? absolute( state.z, args.z ) : state.z, + e: args.e !== undefined ? absolute( state.e, args.e ) : state.e, + f: args.f !== undefined ? absolute( state.f, args.f ) : state.f, + }; + + //Layer change detection is or made by watching Z, it's made by watching when we extrude at a new Z position + if ( delta( state.e, line.e ) > 0 ) { + + state.extruding = delta( state.e, line.e ) > 0; + + if ( currentLayer == undefined || line.z != currentLayer.z ) { + + newLayer( line ); + + } + + } + + addSegment( state, line ); + state = line; + + } else if ( cmd === 'G2' || cmd === 'G3' ) { + + //G2/G3 - Arc Movement ( G2 clock wise and G3 counter clock wise ) + //console.warn( 'THREE.GCodeLoader: Arc command not supported' ); + + } else if ( cmd === 'G90' ) { + + //G90: Set to Absolute Positioning + state.relative = false; + + } else if ( cmd === 'G91' ) { + + //G91: Set to state.relative Positioning + state.relative = true; + + } else if ( cmd === 'G92' ) { + + //G92: Set Position + const line = state; + line.x = args.x !== undefined ? args.x : line.x; + line.y = args.y !== undefined ? args.y : line.y; + line.z = args.z !== undefined ? args.z : line.z; + line.e = args.e !== undefined ? args.e : line.e; + + } else { + + //console.warn( 'THREE.GCodeLoader: Command not supported:' + cmd ); + + } + + } + + function addObject( vertex, extruding, i ) { + + const geometry = new BufferGeometry(); + geometry.setAttribute( 'position', new Float32BufferAttribute( vertex, 3 ) ); + const segments = new LineSegments( geometry, extruding ? extrudingMaterial : pathMaterial ); + segments.name = 'layer' + i; + object.add( segments ); + + } + + const object = new Group(); + object.name = 'gcode'; + + if ( this.splitLayer ) { + + for ( let i = 0; i < layers.length; i ++ ) { + + const layer = layers[ i ]; + addObject( layer.vertex, true, i ); + addObject( layer.pathVertex, false, i ); + + } + + } else { + + const vertex = [], + pathVertex = []; + + for ( let i = 0; i < layers.length; i ++ ) { + + const layer = layers[ i ]; + const layerVertex = layer.vertex; + const layerPathVertex = layer.pathVertex; + + for ( let j = 0; j < layerVertex.length; j ++ ) { + + vertex.push( layerVertex[ j ] ); + + } + + for ( let j = 0; j < layerPathVertex.length; j ++ ) { + + pathVertex.push( layerPathVertex[ j ] ); + + } + + } + + addObject( vertex, true, layers.length ); + addObject( pathVertex, false, layers.length ); + + } + + object.rotation.set( - Math.PI / 2, 0, 0 ); + + return object; + + } + +} + +export { GCodeLoader }; diff --git a/node_modules/three/examples/jsm/loaders/GLTFLoader.js b/node_modules/three/examples/jsm/loaders/GLTFLoader.js new file mode 100644 index 0000000..0679071 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/GLTFLoader.js @@ -0,0 +1,4722 @@ +import { + AnimationClip, + Bone, + Box3, + BufferAttribute, + BufferGeometry, + ClampToEdgeWrapping, + Color, + ColorManagement, + DirectionalLight, + DoubleSide, + FileLoader, + FrontSide, + Group, + ImageBitmapLoader, + InstancedMesh, + InterleavedBuffer, + InterleavedBufferAttribute, + Interpolant, + InterpolateDiscrete, + InterpolateLinear, + Line, + LineBasicMaterial, + LineLoop, + LineSegments, + LinearFilter, + LinearMipmapLinearFilter, + LinearMipmapNearestFilter, + LinearSRGBColorSpace, + Loader, + LoaderUtils, + Material, + MathUtils, + Matrix4, + Mesh, + MeshBasicMaterial, + MeshPhysicalMaterial, + MeshStandardMaterial, + MirroredRepeatWrapping, + NearestFilter, + NearestMipmapLinearFilter, + NearestMipmapNearestFilter, + NumberKeyframeTrack, + Object3D, + OrthographicCamera, + PerspectiveCamera, + PointLight, + Points, + PointsMaterial, + PropertyBinding, + Quaternion, + QuaternionKeyframeTrack, + RepeatWrapping, + Skeleton, + SkinnedMesh, + Sphere, + SpotLight, + Texture, + TextureLoader, + TriangleFanDrawMode, + TriangleStripDrawMode, + Vector2, + Vector3, + VectorKeyframeTrack, + SRGBColorSpace, + InstancedBufferAttribute +} from 'three'; +import { toTrianglesDrawMode } from '../utils/BufferGeometryUtils.js'; + +class GLTFLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.dracoLoader = null; + this.ktx2Loader = null; + this.meshoptDecoder = null; + + this.pluginCallbacks = []; + + this.register( function ( parser ) { + + return new GLTFMaterialsClearcoatExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFMaterialsDispersionExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFTextureBasisUExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFTextureWebPExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFTextureAVIFExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFMaterialsSheenExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFMaterialsTransmissionExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFMaterialsVolumeExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFMaterialsIorExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFMaterialsEmissiveStrengthExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFMaterialsSpecularExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFMaterialsIridescenceExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFMaterialsAnisotropyExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFMaterialsBumpExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFLightsExtension( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFMeshoptCompression( parser ); + + } ); + + this.register( function ( parser ) { + + return new GLTFMeshGpuInstancing( parser ); + + } ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + let resourcePath; + + if ( this.resourcePath !== '' ) { + + resourcePath = this.resourcePath; + + } else if ( this.path !== '' ) { + + // If a base path is set, resources will be relative paths from that plus the relative path of the gltf file + // Example path = 'https://my-cnd-server.com/', url = 'assets/models/model.gltf' + // resourcePath = 'https://my-cnd-server.com/assets/models/' + // referenced resource 'model.bin' will be loaded from 'https://my-cnd-server.com/assets/models/model.bin' + // referenced resource '../textures/texture.png' will be loaded from 'https://my-cnd-server.com/assets/textures/texture.png' + const relativeUrl = LoaderUtils.extractUrlBase( url ); + resourcePath = LoaderUtils.resolveURL( relativeUrl, this.path ); + + } else { + + resourcePath = LoaderUtils.extractUrlBase( url ); + + } + + // Tells the LoadingManager to track an extra item, which resolves after + // the model is fully loaded. This means the count of items loaded will + // be incorrect, but ensures manager.onLoad() does not fire early. + this.manager.itemStart( url ); + + const _onError = function ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + scope.manager.itemEnd( url ); + + }; + + const loader = new FileLoader( this.manager ); + + loader.setPath( this.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + + loader.load( url, function ( data ) { + + try { + + scope.parse( data, resourcePath, function ( gltf ) { + + onLoad( gltf ); + + scope.manager.itemEnd( url ); + + }, _onError ); + + } catch ( e ) { + + _onError( e ); + + } + + }, onProgress, _onError ); + + } + + setDRACOLoader( dracoLoader ) { + + this.dracoLoader = dracoLoader; + return this; + + } + + setDDSLoader() { + + throw new Error( + + 'THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".' + + ); + + } + + setKTX2Loader( ktx2Loader ) { + + this.ktx2Loader = ktx2Loader; + return this; + + } + + setMeshoptDecoder( meshoptDecoder ) { + + this.meshoptDecoder = meshoptDecoder; + return this; + + } + + register( callback ) { + + if ( this.pluginCallbacks.indexOf( callback ) === - 1 ) { + + this.pluginCallbacks.push( callback ); + + } + + return this; + + } + + unregister( callback ) { + + if ( this.pluginCallbacks.indexOf( callback ) !== - 1 ) { + + this.pluginCallbacks.splice( this.pluginCallbacks.indexOf( callback ), 1 ); + + } + + return this; + + } + + parse( data, path, onLoad, onError ) { + + let json; + const extensions = {}; + const plugins = {}; + const textDecoder = new TextDecoder(); + + if ( typeof data === 'string' ) { + + json = JSON.parse( data ); + + } else if ( data instanceof ArrayBuffer ) { + + const magic = textDecoder.decode( new Uint8Array( data, 0, 4 ) ); + + if ( magic === BINARY_EXTENSION_HEADER_MAGIC ) { + + try { + + extensions[ EXTENSIONS.KHR_BINARY_GLTF ] = new GLTFBinaryExtension( data ); + + } catch ( error ) { + + if ( onError ) onError( error ); + return; + + } + + json = JSON.parse( extensions[ EXTENSIONS.KHR_BINARY_GLTF ].content ); + + } else { + + json = JSON.parse( textDecoder.decode( data ) ); + + } + + } else { + + json = data; + + } + + if ( json.asset === undefined || json.asset.version[ 0 ] < 2 ) { + + if ( onError ) onError( new Error( 'THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.' ) ); + return; + + } + + const parser = new GLTFParser( json, { + + path: path || this.resourcePath || '', + crossOrigin: this.crossOrigin, + requestHeader: this.requestHeader, + manager: this.manager, + ktx2Loader: this.ktx2Loader, + meshoptDecoder: this.meshoptDecoder + + } ); + + parser.fileLoader.setRequestHeader( this.requestHeader ); + + for ( let i = 0; i < this.pluginCallbacks.length; i ++ ) { + + const plugin = this.pluginCallbacks[ i ]( parser ); + + if ( ! plugin.name ) console.error( 'THREE.GLTFLoader: Invalid plugin found: missing name' ); + + plugins[ plugin.name ] = plugin; + + // Workaround to avoid determining as unknown extension + // in addUnknownExtensionsToUserData(). + // Remove this workaround if we move all the existing + // extension handlers to plugin system + extensions[ plugin.name ] = true; + + } + + if ( json.extensionsUsed ) { + + for ( let i = 0; i < json.extensionsUsed.length; ++ i ) { + + const extensionName = json.extensionsUsed[ i ]; + const extensionsRequired = json.extensionsRequired || []; + + switch ( extensionName ) { + + case EXTENSIONS.KHR_MATERIALS_UNLIT: + extensions[ extensionName ] = new GLTFMaterialsUnlitExtension(); + break; + + case EXTENSIONS.KHR_DRACO_MESH_COMPRESSION: + extensions[ extensionName ] = new GLTFDracoMeshCompressionExtension( json, this.dracoLoader ); + break; + + case EXTENSIONS.KHR_TEXTURE_TRANSFORM: + extensions[ extensionName ] = new GLTFTextureTransformExtension(); + break; + + case EXTENSIONS.KHR_MESH_QUANTIZATION: + extensions[ extensionName ] = new GLTFMeshQuantizationExtension(); + break; + + default: + + if ( extensionsRequired.indexOf( extensionName ) >= 0 && plugins[ extensionName ] === undefined ) { + + console.warn( 'THREE.GLTFLoader: Unknown extension "' + extensionName + '".' ); + + } + + } + + } + + } + + parser.setExtensions( extensions ); + parser.setPlugins( plugins ); + parser.parse( onLoad, onError ); + + } + + parseAsync( data, path ) { + + const scope = this; + + return new Promise( function ( resolve, reject ) { + + scope.parse( data, path, resolve, reject ); + + } ); + + } + +} + +/* GLTFREGISTRY */ + +function GLTFRegistry() { + + let objects = {}; + + return { + + get: function ( key ) { + + return objects[ key ]; + + }, + + add: function ( key, object ) { + + objects[ key ] = object; + + }, + + remove: function ( key ) { + + delete objects[ key ]; + + }, + + removeAll: function () { + + objects = {}; + + } + + }; + +} + +/*********************************/ +/********** EXTENSIONS ***********/ +/*********************************/ + +const EXTENSIONS = { + KHR_BINARY_GLTF: 'KHR_binary_glTF', + KHR_DRACO_MESH_COMPRESSION: 'KHR_draco_mesh_compression', + KHR_LIGHTS_PUNCTUAL: 'KHR_lights_punctual', + KHR_MATERIALS_CLEARCOAT: 'KHR_materials_clearcoat', + KHR_MATERIALS_DISPERSION: 'KHR_materials_dispersion', + KHR_MATERIALS_IOR: 'KHR_materials_ior', + KHR_MATERIALS_SHEEN: 'KHR_materials_sheen', + KHR_MATERIALS_SPECULAR: 'KHR_materials_specular', + KHR_MATERIALS_TRANSMISSION: 'KHR_materials_transmission', + KHR_MATERIALS_IRIDESCENCE: 'KHR_materials_iridescence', + KHR_MATERIALS_ANISOTROPY: 'KHR_materials_anisotropy', + KHR_MATERIALS_UNLIT: 'KHR_materials_unlit', + KHR_MATERIALS_VOLUME: 'KHR_materials_volume', + KHR_TEXTURE_BASISU: 'KHR_texture_basisu', + KHR_TEXTURE_TRANSFORM: 'KHR_texture_transform', + KHR_MESH_QUANTIZATION: 'KHR_mesh_quantization', + KHR_MATERIALS_EMISSIVE_STRENGTH: 'KHR_materials_emissive_strength', + EXT_MATERIALS_BUMP: 'EXT_materials_bump', + EXT_TEXTURE_WEBP: 'EXT_texture_webp', + EXT_TEXTURE_AVIF: 'EXT_texture_avif', + EXT_MESHOPT_COMPRESSION: 'EXT_meshopt_compression', + EXT_MESH_GPU_INSTANCING: 'EXT_mesh_gpu_instancing' +}; + +/** + * Punctual Lights Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual + */ +class GLTFLightsExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.KHR_LIGHTS_PUNCTUAL; + + // Object3D instance caches + this.cache = { refs: {}, uses: {} }; + + } + + _markDefs() { + + const parser = this.parser; + const nodeDefs = this.parser.json.nodes || []; + + for ( let nodeIndex = 0, nodeLength = nodeDefs.length; nodeIndex < nodeLength; nodeIndex ++ ) { + + const nodeDef = nodeDefs[ nodeIndex ]; + + if ( nodeDef.extensions + && nodeDef.extensions[ this.name ] + && nodeDef.extensions[ this.name ].light !== undefined ) { + + parser._addNodeRef( this.cache, nodeDef.extensions[ this.name ].light ); + + } + + } + + } + + _loadLight( lightIndex ) { + + const parser = this.parser; + const cacheKey = 'light:' + lightIndex; + let dependency = parser.cache.get( cacheKey ); + + if ( dependency ) return dependency; + + const json = parser.json; + const extensions = ( json.extensions && json.extensions[ this.name ] ) || {}; + const lightDefs = extensions.lights || []; + const lightDef = lightDefs[ lightIndex ]; + let lightNode; + + const color = new Color( 0xffffff ); + + if ( lightDef.color !== undefined ) color.setRGB( lightDef.color[ 0 ], lightDef.color[ 1 ], lightDef.color[ 2 ], LinearSRGBColorSpace ); + + const range = lightDef.range !== undefined ? lightDef.range : 0; + + switch ( lightDef.type ) { + + case 'directional': + lightNode = new DirectionalLight( color ); + lightNode.target.position.set( 0, 0, - 1 ); + lightNode.add( lightNode.target ); + break; + + case 'point': + lightNode = new PointLight( color ); + lightNode.distance = range; + break; + + case 'spot': + lightNode = new SpotLight( color ); + lightNode.distance = range; + // Handle spotlight properties. + lightDef.spot = lightDef.spot || {}; + lightDef.spot.innerConeAngle = lightDef.spot.innerConeAngle !== undefined ? lightDef.spot.innerConeAngle : 0; + lightDef.spot.outerConeAngle = lightDef.spot.outerConeAngle !== undefined ? lightDef.spot.outerConeAngle : Math.PI / 4.0; + lightNode.angle = lightDef.spot.outerConeAngle; + lightNode.penumbra = 1.0 - lightDef.spot.innerConeAngle / lightDef.spot.outerConeAngle; + lightNode.target.position.set( 0, 0, - 1 ); + lightNode.add( lightNode.target ); + break; + + default: + throw new Error( 'THREE.GLTFLoader: Unexpected light type: ' + lightDef.type ); + + } + + // Some lights (e.g. spot) default to a position other than the origin. Reset the position + // here, because node-level parsing will only override position if explicitly specified. + lightNode.position.set( 0, 0, 0 ); + + lightNode.decay = 2; + + assignExtrasToUserData( lightNode, lightDef ); + + if ( lightDef.intensity !== undefined ) lightNode.intensity = lightDef.intensity; + + lightNode.name = parser.createUniqueName( lightDef.name || ( 'light_' + lightIndex ) ); + + dependency = Promise.resolve( lightNode ); + + parser.cache.add( cacheKey, dependency ); + + return dependency; + + } + + getDependency( type, index ) { + + if ( type !== 'light' ) return; + + return this._loadLight( index ); + + } + + createNodeAttachment( nodeIndex ) { + + const self = this; + const parser = this.parser; + const json = parser.json; + const nodeDef = json.nodes[ nodeIndex ]; + const lightDef = ( nodeDef.extensions && nodeDef.extensions[ this.name ] ) || {}; + const lightIndex = lightDef.light; + + if ( lightIndex === undefined ) return null; + + return this._loadLight( lightIndex ).then( function ( light ) { + + return parser._getNodeRef( self.cache, lightIndex, light ); + + } ); + + } + +} + +/** + * Unlit Materials Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit + */ +class GLTFMaterialsUnlitExtension { + + constructor() { + + this.name = EXTENSIONS.KHR_MATERIALS_UNLIT; + + } + + getMaterialType() { + + return MeshBasicMaterial; + + } + + extendParams( materialParams, materialDef, parser ) { + + const pending = []; + + materialParams.color = new Color( 1.0, 1.0, 1.0 ); + materialParams.opacity = 1.0; + + const metallicRoughness = materialDef.pbrMetallicRoughness; + + if ( metallicRoughness ) { + + if ( Array.isArray( metallicRoughness.baseColorFactor ) ) { + + const array = metallicRoughness.baseColorFactor; + + materialParams.color.setRGB( array[ 0 ], array[ 1 ], array[ 2 ], LinearSRGBColorSpace ); + materialParams.opacity = array[ 3 ]; + + } + + if ( metallicRoughness.baseColorTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'map', metallicRoughness.baseColorTexture, SRGBColorSpace ) ); + + } + + } + + return Promise.all( pending ); + + } + +} + +/** + * Materials Emissive Strength Extension + * + * Specification: https://github.com/KhronosGroup/glTF/blob/5768b3ce0ef32bc39cdf1bef10b948586635ead3/extensions/2.0/Khronos/KHR_materials_emissive_strength/README.md + */ +class GLTFMaterialsEmissiveStrengthExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.KHR_MATERIALS_EMISSIVE_STRENGTH; + + } + + extendMaterialParams( materialIndex, materialParams ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) { + + return Promise.resolve(); + + } + + const emissiveStrength = materialDef.extensions[ this.name ].emissiveStrength; + + if ( emissiveStrength !== undefined ) { + + materialParams.emissiveIntensity = emissiveStrength; + + } + + return Promise.resolve(); + + } + +} + +/** + * Clearcoat Materials Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_clearcoat + */ +class GLTFMaterialsClearcoatExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.KHR_MATERIALS_CLEARCOAT; + + } + + getMaterialType( materialIndex ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null; + + return MeshPhysicalMaterial; + + } + + extendMaterialParams( materialIndex, materialParams ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) { + + return Promise.resolve(); + + } + + const pending = []; + + const extension = materialDef.extensions[ this.name ]; + + if ( extension.clearcoatFactor !== undefined ) { + + materialParams.clearcoat = extension.clearcoatFactor; + + } + + if ( extension.clearcoatTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'clearcoatMap', extension.clearcoatTexture ) ); + + } + + if ( extension.clearcoatRoughnessFactor !== undefined ) { + + materialParams.clearcoatRoughness = extension.clearcoatRoughnessFactor; + + } + + if ( extension.clearcoatRoughnessTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'clearcoatRoughnessMap', extension.clearcoatRoughnessTexture ) ); + + } + + if ( extension.clearcoatNormalTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'clearcoatNormalMap', extension.clearcoatNormalTexture ) ); + + if ( extension.clearcoatNormalTexture.scale !== undefined ) { + + const scale = extension.clearcoatNormalTexture.scale; + + materialParams.clearcoatNormalScale = new Vector2( scale, scale ); + + } + + } + + return Promise.all( pending ); + + } + +} + +/** + * Materials dispersion Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_dispersion + */ +class GLTFMaterialsDispersionExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.KHR_MATERIALS_DISPERSION; + + } + + getMaterialType( materialIndex ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null; + + return MeshPhysicalMaterial; + + } + + extendMaterialParams( materialIndex, materialParams ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) { + + return Promise.resolve(); + + } + + const extension = materialDef.extensions[ this.name ]; + + materialParams.dispersion = extension.dispersion !== undefined ? extension.dispersion : 0; + + return Promise.resolve(); + + } + +} + +/** + * Iridescence Materials Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_iridescence + */ +class GLTFMaterialsIridescenceExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.KHR_MATERIALS_IRIDESCENCE; + + } + + getMaterialType( materialIndex ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null; + + return MeshPhysicalMaterial; + + } + + extendMaterialParams( materialIndex, materialParams ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) { + + return Promise.resolve(); + + } + + const pending = []; + + const extension = materialDef.extensions[ this.name ]; + + if ( extension.iridescenceFactor !== undefined ) { + + materialParams.iridescence = extension.iridescenceFactor; + + } + + if ( extension.iridescenceTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'iridescenceMap', extension.iridescenceTexture ) ); + + } + + if ( extension.iridescenceIor !== undefined ) { + + materialParams.iridescenceIOR = extension.iridescenceIor; + + } + + if ( materialParams.iridescenceThicknessRange === undefined ) { + + materialParams.iridescenceThicknessRange = [ 100, 400 ]; + + } + + if ( extension.iridescenceThicknessMinimum !== undefined ) { + + materialParams.iridescenceThicknessRange[ 0 ] = extension.iridescenceThicknessMinimum; + + } + + if ( extension.iridescenceThicknessMaximum !== undefined ) { + + materialParams.iridescenceThicknessRange[ 1 ] = extension.iridescenceThicknessMaximum; + + } + + if ( extension.iridescenceThicknessTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'iridescenceThicknessMap', extension.iridescenceThicknessTexture ) ); + + } + + return Promise.all( pending ); + + } + +} + +/** + * Sheen Materials Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_sheen + */ +class GLTFMaterialsSheenExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.KHR_MATERIALS_SHEEN; + + } + + getMaterialType( materialIndex ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null; + + return MeshPhysicalMaterial; + + } + + extendMaterialParams( materialIndex, materialParams ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) { + + return Promise.resolve(); + + } + + const pending = []; + + materialParams.sheenColor = new Color( 0, 0, 0 ); + materialParams.sheenRoughness = 0; + materialParams.sheen = 1; + + const extension = materialDef.extensions[ this.name ]; + + if ( extension.sheenColorFactor !== undefined ) { + + const colorFactor = extension.sheenColorFactor; + materialParams.sheenColor.setRGB( colorFactor[ 0 ], colorFactor[ 1 ], colorFactor[ 2 ], LinearSRGBColorSpace ); + + } + + if ( extension.sheenRoughnessFactor !== undefined ) { + + materialParams.sheenRoughness = extension.sheenRoughnessFactor; + + } + + if ( extension.sheenColorTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'sheenColorMap', extension.sheenColorTexture, SRGBColorSpace ) ); + + } + + if ( extension.sheenRoughnessTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'sheenRoughnessMap', extension.sheenRoughnessTexture ) ); + + } + + return Promise.all( pending ); + + } + +} + +/** + * Transmission Materials Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_transmission + * Draft: https://github.com/KhronosGroup/glTF/pull/1698 + */ +class GLTFMaterialsTransmissionExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.KHR_MATERIALS_TRANSMISSION; + + } + + getMaterialType( materialIndex ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null; + + return MeshPhysicalMaterial; + + } + + extendMaterialParams( materialIndex, materialParams ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) { + + return Promise.resolve(); + + } + + const pending = []; + + const extension = materialDef.extensions[ this.name ]; + + if ( extension.transmissionFactor !== undefined ) { + + materialParams.transmission = extension.transmissionFactor; + + } + + if ( extension.transmissionTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'transmissionMap', extension.transmissionTexture ) ); + + } + + return Promise.all( pending ); + + } + +} + +/** + * Materials Volume Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_volume + */ +class GLTFMaterialsVolumeExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.KHR_MATERIALS_VOLUME; + + } + + getMaterialType( materialIndex ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null; + + return MeshPhysicalMaterial; + + } + + extendMaterialParams( materialIndex, materialParams ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) { + + return Promise.resolve(); + + } + + const pending = []; + + const extension = materialDef.extensions[ this.name ]; + + materialParams.thickness = extension.thicknessFactor !== undefined ? extension.thicknessFactor : 0; + + if ( extension.thicknessTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'thicknessMap', extension.thicknessTexture ) ); + + } + + materialParams.attenuationDistance = extension.attenuationDistance || Infinity; + + const colorArray = extension.attenuationColor || [ 1, 1, 1 ]; + materialParams.attenuationColor = new Color().setRGB( colorArray[ 0 ], colorArray[ 1 ], colorArray[ 2 ], LinearSRGBColorSpace ); + + return Promise.all( pending ); + + } + +} + +/** + * Materials ior Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_ior + */ +class GLTFMaterialsIorExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.KHR_MATERIALS_IOR; + + } + + getMaterialType( materialIndex ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null; + + return MeshPhysicalMaterial; + + } + + extendMaterialParams( materialIndex, materialParams ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) { + + return Promise.resolve(); + + } + + const extension = materialDef.extensions[ this.name ]; + + materialParams.ior = extension.ior !== undefined ? extension.ior : 1.5; + + return Promise.resolve(); + + } + +} + +/** + * Materials specular Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_specular + */ +class GLTFMaterialsSpecularExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.KHR_MATERIALS_SPECULAR; + + } + + getMaterialType( materialIndex ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null; + + return MeshPhysicalMaterial; + + } + + extendMaterialParams( materialIndex, materialParams ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) { + + return Promise.resolve(); + + } + + const pending = []; + + const extension = materialDef.extensions[ this.name ]; + + materialParams.specularIntensity = extension.specularFactor !== undefined ? extension.specularFactor : 1.0; + + if ( extension.specularTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'specularIntensityMap', extension.specularTexture ) ); + + } + + const colorArray = extension.specularColorFactor || [ 1, 1, 1 ]; + materialParams.specularColor = new Color().setRGB( colorArray[ 0 ], colorArray[ 1 ], colorArray[ 2 ], LinearSRGBColorSpace ); + + if ( extension.specularColorTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'specularColorMap', extension.specularColorTexture, SRGBColorSpace ) ); + + } + + return Promise.all( pending ); + + } + +} + + +/** + * Materials bump Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/EXT_materials_bump + */ +class GLTFMaterialsBumpExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.EXT_MATERIALS_BUMP; + + } + + getMaterialType( materialIndex ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null; + + return MeshPhysicalMaterial; + + } + + extendMaterialParams( materialIndex, materialParams ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) { + + return Promise.resolve(); + + } + + const pending = []; + + const extension = materialDef.extensions[ this.name ]; + + materialParams.bumpScale = extension.bumpFactor !== undefined ? extension.bumpFactor : 1.0; + + if ( extension.bumpTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'bumpMap', extension.bumpTexture ) ); + + } + + return Promise.all( pending ); + + } + +} + +/** + * Materials anisotropy Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_anisotropy + */ +class GLTFMaterialsAnisotropyExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.KHR_MATERIALS_ANISOTROPY; + + } + + getMaterialType( materialIndex ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null; + + return MeshPhysicalMaterial; + + } + + extendMaterialParams( materialIndex, materialParams ) { + + const parser = this.parser; + const materialDef = parser.json.materials[ materialIndex ]; + + if ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) { + + return Promise.resolve(); + + } + + const pending = []; + + const extension = materialDef.extensions[ this.name ]; + + if ( extension.anisotropyStrength !== undefined ) { + + materialParams.anisotropy = extension.anisotropyStrength; + + } + + if ( extension.anisotropyRotation !== undefined ) { + + materialParams.anisotropyRotation = extension.anisotropyRotation; + + } + + if ( extension.anisotropyTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'anisotropyMap', extension.anisotropyTexture ) ); + + } + + return Promise.all( pending ); + + } + +} + +/** + * BasisU Texture Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_basisu + */ +class GLTFTextureBasisUExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.KHR_TEXTURE_BASISU; + + } + + loadTexture( textureIndex ) { + + const parser = this.parser; + const json = parser.json; + + const textureDef = json.textures[ textureIndex ]; + + if ( ! textureDef.extensions || ! textureDef.extensions[ this.name ] ) { + + return null; + + } + + const extension = textureDef.extensions[ this.name ]; + const loader = parser.options.ktx2Loader; + + if ( ! loader ) { + + if ( json.extensionsRequired && json.extensionsRequired.indexOf( this.name ) >= 0 ) { + + throw new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' ); + + } else { + + // Assumes that the extension is optional and that a fallback texture is present + return null; + + } + + } + + return parser.loadTextureImage( textureIndex, extension.source, loader ); + + } + +} + +/** + * WebP Texture Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_webp + */ +class GLTFTextureWebPExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.EXT_TEXTURE_WEBP; + this.isSupported = null; + + } + + loadTexture( textureIndex ) { + + const name = this.name; + const parser = this.parser; + const json = parser.json; + + const textureDef = json.textures[ textureIndex ]; + + if ( ! textureDef.extensions || ! textureDef.extensions[ name ] ) { + + return null; + + } + + const extension = textureDef.extensions[ name ]; + const source = json.images[ extension.source ]; + + let loader = parser.textureLoader; + if ( source.uri ) { + + const handler = parser.options.manager.getHandler( source.uri ); + if ( handler !== null ) loader = handler; + + } + + return this.detectSupport().then( function ( isSupported ) { + + if ( isSupported ) return parser.loadTextureImage( textureIndex, extension.source, loader ); + + if ( json.extensionsRequired && json.extensionsRequired.indexOf( name ) >= 0 ) { + + throw new Error( 'THREE.GLTFLoader: WebP required by asset but unsupported.' ); + + } + + // Fall back to PNG or JPEG. + return parser.loadTexture( textureIndex ); + + } ); + + } + + detectSupport() { + + if ( ! this.isSupported ) { + + this.isSupported = new Promise( function ( resolve ) { + + const image = new Image(); + + // Lossy test image. Support for lossy images doesn't guarantee support for all + // WebP images, unfortunately. + image.src = 'data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA'; + + image.onload = image.onerror = function () { + + resolve( image.height === 1 ); + + }; + + } ); + + } + + return this.isSupported; + + } + +} + +/** + * AVIF Texture Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_avif + */ +class GLTFTextureAVIFExtension { + + constructor( parser ) { + + this.parser = parser; + this.name = EXTENSIONS.EXT_TEXTURE_AVIF; + this.isSupported = null; + + } + + loadTexture( textureIndex ) { + + const name = this.name; + const parser = this.parser; + const json = parser.json; + + const textureDef = json.textures[ textureIndex ]; + + if ( ! textureDef.extensions || ! textureDef.extensions[ name ] ) { + + return null; + + } + + const extension = textureDef.extensions[ name ]; + const source = json.images[ extension.source ]; + + let loader = parser.textureLoader; + if ( source.uri ) { + + const handler = parser.options.manager.getHandler( source.uri ); + if ( handler !== null ) loader = handler; + + } + + return this.detectSupport().then( function ( isSupported ) { + + if ( isSupported ) return parser.loadTextureImage( textureIndex, extension.source, loader ); + + if ( json.extensionsRequired && json.extensionsRequired.indexOf( name ) >= 0 ) { + + throw new Error( 'THREE.GLTFLoader: AVIF required by asset but unsupported.' ); + + } + + // Fall back to PNG or JPEG. + return parser.loadTexture( textureIndex ); + + } ); + + } + + detectSupport() { + + if ( ! this.isSupported ) { + + this.isSupported = new Promise( function ( resolve ) { + + const image = new Image(); + + // Lossy test image. + image.src = 'data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI='; + image.onload = image.onerror = function () { + + resolve( image.height === 1 ); + + }; + + } ); + + } + + return this.isSupported; + + } + +} + +/** + * meshopt BufferView Compression Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_meshopt_compression + */ +class GLTFMeshoptCompression { + + constructor( parser ) { + + this.name = EXTENSIONS.EXT_MESHOPT_COMPRESSION; + this.parser = parser; + + } + + loadBufferView( index ) { + + const json = this.parser.json; + const bufferView = json.bufferViews[ index ]; + + if ( bufferView.extensions && bufferView.extensions[ this.name ] ) { + + const extensionDef = bufferView.extensions[ this.name ]; + + const buffer = this.parser.getDependency( 'buffer', extensionDef.buffer ); + const decoder = this.parser.options.meshoptDecoder; + + if ( ! decoder || ! decoder.supported ) { + + if ( json.extensionsRequired && json.extensionsRequired.indexOf( this.name ) >= 0 ) { + + throw new Error( 'THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files' ); + + } else { + + // Assumes that the extension is optional and that fallback buffer data is present + return null; + + } + + } + + return buffer.then( function ( res ) { + + const byteOffset = extensionDef.byteOffset || 0; + const byteLength = extensionDef.byteLength || 0; + + const count = extensionDef.count; + const stride = extensionDef.byteStride; + + const source = new Uint8Array( res, byteOffset, byteLength ); + + if ( decoder.decodeGltfBufferAsync ) { + + return decoder.decodeGltfBufferAsync( count, stride, source, extensionDef.mode, extensionDef.filter ).then( function ( res ) { + + return res.buffer; + + } ); + + } else { + + // Support for MeshoptDecoder 0.18 or earlier, without decodeGltfBufferAsync + return decoder.ready.then( function () { + + const result = new ArrayBuffer( count * stride ); + decoder.decodeGltfBuffer( new Uint8Array( result ), count, stride, source, extensionDef.mode, extensionDef.filter ); + return result; + + } ); + + } + + } ); + + } else { + + return null; + + } + + } + +} + +/** + * GPU Instancing Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_mesh_gpu_instancing + * + */ +class GLTFMeshGpuInstancing { + + constructor( parser ) { + + this.name = EXTENSIONS.EXT_MESH_GPU_INSTANCING; + this.parser = parser; + + } + + createNodeMesh( nodeIndex ) { + + const json = this.parser.json; + const nodeDef = json.nodes[ nodeIndex ]; + + if ( ! nodeDef.extensions || ! nodeDef.extensions[ this.name ] || + nodeDef.mesh === undefined ) { + + return null; + + } + + const meshDef = json.meshes[ nodeDef.mesh ]; + + // No Points or Lines + Instancing support yet + + for ( const primitive of meshDef.primitives ) { + + if ( primitive.mode !== WEBGL_CONSTANTS.TRIANGLES && + primitive.mode !== WEBGL_CONSTANTS.TRIANGLE_STRIP && + primitive.mode !== WEBGL_CONSTANTS.TRIANGLE_FAN && + primitive.mode !== undefined ) { + + return null; + + } + + } + + const extensionDef = nodeDef.extensions[ this.name ]; + const attributesDef = extensionDef.attributes; + + // @TODO: Can we support InstancedMesh + SkinnedMesh? + + const pending = []; + const attributes = {}; + + for ( const key in attributesDef ) { + + pending.push( this.parser.getDependency( 'accessor', attributesDef[ key ] ).then( accessor => { + + attributes[ key ] = accessor; + return attributes[ key ]; + + } ) ); + + } + + if ( pending.length < 1 ) { + + return null; + + } + + pending.push( this.parser.createNodeMesh( nodeIndex ) ); + + return Promise.all( pending ).then( results => { + + const nodeObject = results.pop(); + const meshes = nodeObject.isGroup ? nodeObject.children : [ nodeObject ]; + const count = results[ 0 ].count; // All attribute counts should be same + const instancedMeshes = []; + + for ( const mesh of meshes ) { + + // Temporal variables + const m = new Matrix4(); + const p = new Vector3(); + const q = new Quaternion(); + const s = new Vector3( 1, 1, 1 ); + + const instancedMesh = new InstancedMesh( mesh.geometry, mesh.material, count ); + + for ( let i = 0; i < count; i ++ ) { + + if ( attributes.TRANSLATION ) { + + p.fromBufferAttribute( attributes.TRANSLATION, i ); + + } + + if ( attributes.ROTATION ) { + + q.fromBufferAttribute( attributes.ROTATION, i ); + + } + + if ( attributes.SCALE ) { + + s.fromBufferAttribute( attributes.SCALE, i ); + + } + + instancedMesh.setMatrixAt( i, m.compose( p, q, s ) ); + + } + + // Add instance attributes to the geometry, excluding TRS. + for ( const attributeName in attributes ) { + + if ( attributeName === '_COLOR_0' ) { + + const attr = attributes[ attributeName ]; + instancedMesh.instanceColor = new InstancedBufferAttribute( attr.array, attr.itemSize, attr.normalized ); + + } else if ( attributeName !== 'TRANSLATION' && + attributeName !== 'ROTATION' && + attributeName !== 'SCALE' ) { + + mesh.geometry.setAttribute( attributeName, attributes[ attributeName ] ); + + } + + } + + // Just in case + Object3D.prototype.copy.call( instancedMesh, mesh ); + + this.parser.assignFinalMaterial( instancedMesh ); + + instancedMeshes.push( instancedMesh ); + + } + + if ( nodeObject.isGroup ) { + + nodeObject.clear(); + + nodeObject.add( ... instancedMeshes ); + + return nodeObject; + + } + + return instancedMeshes[ 0 ]; + + } ); + + } + +} + +/* BINARY EXTENSION */ +const BINARY_EXTENSION_HEADER_MAGIC = 'glTF'; +const BINARY_EXTENSION_HEADER_LENGTH = 12; +const BINARY_EXTENSION_CHUNK_TYPES = { JSON: 0x4E4F534A, BIN: 0x004E4942 }; + +class GLTFBinaryExtension { + + constructor( data ) { + + this.name = EXTENSIONS.KHR_BINARY_GLTF; + this.content = null; + this.body = null; + + const headerView = new DataView( data, 0, BINARY_EXTENSION_HEADER_LENGTH ); + const textDecoder = new TextDecoder(); + + this.header = { + magic: textDecoder.decode( new Uint8Array( data.slice( 0, 4 ) ) ), + version: headerView.getUint32( 4, true ), + length: headerView.getUint32( 8, true ) + }; + + if ( this.header.magic !== BINARY_EXTENSION_HEADER_MAGIC ) { + + throw new Error( 'THREE.GLTFLoader: Unsupported glTF-Binary header.' ); + + } else if ( this.header.version < 2.0 ) { + + throw new Error( 'THREE.GLTFLoader: Legacy binary file detected.' ); + + } + + const chunkContentsLength = this.header.length - BINARY_EXTENSION_HEADER_LENGTH; + const chunkView = new DataView( data, BINARY_EXTENSION_HEADER_LENGTH ); + let chunkIndex = 0; + + while ( chunkIndex < chunkContentsLength ) { + + const chunkLength = chunkView.getUint32( chunkIndex, true ); + chunkIndex += 4; + + const chunkType = chunkView.getUint32( chunkIndex, true ); + chunkIndex += 4; + + if ( chunkType === BINARY_EXTENSION_CHUNK_TYPES.JSON ) { + + const contentArray = new Uint8Array( data, BINARY_EXTENSION_HEADER_LENGTH + chunkIndex, chunkLength ); + this.content = textDecoder.decode( contentArray ); + + } else if ( chunkType === BINARY_EXTENSION_CHUNK_TYPES.BIN ) { + + const byteOffset = BINARY_EXTENSION_HEADER_LENGTH + chunkIndex; + this.body = data.slice( byteOffset, byteOffset + chunkLength ); + + } + + // Clients must ignore chunks with unknown types. + + chunkIndex += chunkLength; + + } + + if ( this.content === null ) { + + throw new Error( 'THREE.GLTFLoader: JSON content not found.' ); + + } + + } + +} + +/** + * DRACO Mesh Compression Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression + */ +class GLTFDracoMeshCompressionExtension { + + constructor( json, dracoLoader ) { + + if ( ! dracoLoader ) { + + throw new Error( 'THREE.GLTFLoader: No DRACOLoader instance provided.' ); + + } + + this.name = EXTENSIONS.KHR_DRACO_MESH_COMPRESSION; + this.json = json; + this.dracoLoader = dracoLoader; + this.dracoLoader.preload(); + + } + + decodePrimitive( primitive, parser ) { + + const json = this.json; + const dracoLoader = this.dracoLoader; + const bufferViewIndex = primitive.extensions[ this.name ].bufferView; + const gltfAttributeMap = primitive.extensions[ this.name ].attributes; + const threeAttributeMap = {}; + const attributeNormalizedMap = {}; + const attributeTypeMap = {}; + + for ( const attributeName in gltfAttributeMap ) { + + const threeAttributeName = ATTRIBUTES[ attributeName ] || attributeName.toLowerCase(); + + threeAttributeMap[ threeAttributeName ] = gltfAttributeMap[ attributeName ]; + + } + + for ( const attributeName in primitive.attributes ) { + + const threeAttributeName = ATTRIBUTES[ attributeName ] || attributeName.toLowerCase(); + + if ( gltfAttributeMap[ attributeName ] !== undefined ) { + + const accessorDef = json.accessors[ primitive.attributes[ attributeName ] ]; + const componentType = WEBGL_COMPONENT_TYPES[ accessorDef.componentType ]; + + attributeTypeMap[ threeAttributeName ] = componentType.name; + attributeNormalizedMap[ threeAttributeName ] = accessorDef.normalized === true; + + } + + } + + return parser.getDependency( 'bufferView', bufferViewIndex ).then( function ( bufferView ) { + + return new Promise( function ( resolve, reject ) { + + dracoLoader.decodeDracoFile( bufferView, function ( geometry ) { + + for ( const attributeName in geometry.attributes ) { + + const attribute = geometry.attributes[ attributeName ]; + const normalized = attributeNormalizedMap[ attributeName ]; + + if ( normalized !== undefined ) attribute.normalized = normalized; + + } + + resolve( geometry ); + + }, threeAttributeMap, attributeTypeMap, LinearSRGBColorSpace, reject ); + + } ); + + } ); + + } + +} + +/** + * Texture Transform Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_transform + */ +class GLTFTextureTransformExtension { + + constructor() { + + this.name = EXTENSIONS.KHR_TEXTURE_TRANSFORM; + + } + + extendTexture( texture, transform ) { + + if ( ( transform.texCoord === undefined || transform.texCoord === texture.channel ) + && transform.offset === undefined + && transform.rotation === undefined + && transform.scale === undefined ) { + + // See https://github.com/mrdoob/three.js/issues/21819. + return texture; + + } + + texture = texture.clone(); + + if ( transform.texCoord !== undefined ) { + + texture.channel = transform.texCoord; + + } + + if ( transform.offset !== undefined ) { + + texture.offset.fromArray( transform.offset ); + + } + + if ( transform.rotation !== undefined ) { + + texture.rotation = transform.rotation; + + } + + if ( transform.scale !== undefined ) { + + texture.repeat.fromArray( transform.scale ); + + } + + texture.needsUpdate = true; + + return texture; + + } + +} + +/** + * Mesh Quantization Extension + * + * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_mesh_quantization + */ +class GLTFMeshQuantizationExtension { + + constructor() { + + this.name = EXTENSIONS.KHR_MESH_QUANTIZATION; + + } + +} + +/*********************************/ +/********** INTERPOLATION ********/ +/*********************************/ + +// Spline Interpolation +// Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#appendix-c-spline-interpolation +class GLTFCubicSplineInterpolant extends Interpolant { + + constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { + + super( parameterPositions, sampleValues, sampleSize, resultBuffer ); + + } + + copySampleValue_( index ) { + + // Copies a sample value to the result buffer. See description of glTF + // CUBICSPLINE values layout in interpolate_() function below. + + const result = this.resultBuffer, + values = this.sampleValues, + valueSize = this.valueSize, + offset = index * valueSize * 3 + valueSize; + + for ( let i = 0; i !== valueSize; i ++ ) { + + result[ i ] = values[ offset + i ]; + + } + + return result; + + } + + interpolate_( i1, t0, t, t1 ) { + + const result = this.resultBuffer; + const values = this.sampleValues; + const stride = this.valueSize; + + const stride2 = stride * 2; + const stride3 = stride * 3; + + const td = t1 - t0; + + const p = ( t - t0 ) / td; + const pp = p * p; + const ppp = pp * p; + + const offset1 = i1 * stride3; + const offset0 = offset1 - stride3; + + const s2 = - 2 * ppp + 3 * pp; + const s3 = ppp - pp; + const s0 = 1 - s2; + const s1 = s3 - pp + p; + + // Layout of keyframe output values for CUBICSPLINE animations: + // [ inTangent_1, splineVertex_1, outTangent_1, inTangent_2, splineVertex_2, ... ] + for ( let i = 0; i !== stride; i ++ ) { + + const p0 = values[ offset0 + i + stride ]; // splineVertex_k + const m0 = values[ offset0 + i + stride2 ] * td; // outTangent_k * (t_k+1 - t_k) + const p1 = values[ offset1 + i + stride ]; // splineVertex_k+1 + const m1 = values[ offset1 + i ] * td; // inTangent_k+1 * (t_k+1 - t_k) + + result[ i ] = s0 * p0 + s1 * m0 + s2 * p1 + s3 * m1; + + } + + return result; + + } + +} + +const _q = new Quaternion(); + +class GLTFCubicSplineQuaternionInterpolant extends GLTFCubicSplineInterpolant { + + interpolate_( i1, t0, t, t1 ) { + + const result = super.interpolate_( i1, t0, t, t1 ); + + _q.fromArray( result ).normalize().toArray( result ); + + return result; + + } + +} + + +/*********************************/ +/********** INTERNALS ************/ +/*********************************/ + +/* CONSTANTS */ + +const WEBGL_CONSTANTS = { + FLOAT: 5126, + //FLOAT_MAT2: 35674, + FLOAT_MAT3: 35675, + FLOAT_MAT4: 35676, + FLOAT_VEC2: 35664, + FLOAT_VEC3: 35665, + FLOAT_VEC4: 35666, + LINEAR: 9729, + REPEAT: 10497, + SAMPLER_2D: 35678, + POINTS: 0, + LINES: 1, + LINE_LOOP: 2, + LINE_STRIP: 3, + TRIANGLES: 4, + TRIANGLE_STRIP: 5, + TRIANGLE_FAN: 6, + UNSIGNED_BYTE: 5121, + UNSIGNED_SHORT: 5123 +}; + +const WEBGL_COMPONENT_TYPES = { + 5120: Int8Array, + 5121: Uint8Array, + 5122: Int16Array, + 5123: Uint16Array, + 5125: Uint32Array, + 5126: Float32Array +}; + +const WEBGL_FILTERS = { + 9728: NearestFilter, + 9729: LinearFilter, + 9984: NearestMipmapNearestFilter, + 9985: LinearMipmapNearestFilter, + 9986: NearestMipmapLinearFilter, + 9987: LinearMipmapLinearFilter +}; + +const WEBGL_WRAPPINGS = { + 33071: ClampToEdgeWrapping, + 33648: MirroredRepeatWrapping, + 10497: RepeatWrapping +}; + +const WEBGL_TYPE_SIZES = { + 'SCALAR': 1, + 'VEC2': 2, + 'VEC3': 3, + 'VEC4': 4, + 'MAT2': 4, + 'MAT3': 9, + 'MAT4': 16 +}; + +const ATTRIBUTES = { + POSITION: 'position', + NORMAL: 'normal', + TANGENT: 'tangent', + TEXCOORD_0: 'uv', + TEXCOORD_1: 'uv1', + TEXCOORD_2: 'uv2', + TEXCOORD_3: 'uv3', + COLOR_0: 'color', + WEIGHTS_0: 'skinWeight', + JOINTS_0: 'skinIndex', +}; + +const PATH_PROPERTIES = { + scale: 'scale', + translation: 'position', + rotation: 'quaternion', + weights: 'morphTargetInfluences' +}; + +const INTERPOLATION = { + CUBICSPLINE: undefined, // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each + // keyframe track will be initialized with a default interpolation type, then modified. + LINEAR: InterpolateLinear, + STEP: InterpolateDiscrete +}; + +const ALPHA_MODES = { + OPAQUE: 'OPAQUE', + MASK: 'MASK', + BLEND: 'BLEND' +}; + +/** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#default-material + */ +function createDefaultMaterial( cache ) { + + if ( cache[ 'DefaultMaterial' ] === undefined ) { + + cache[ 'DefaultMaterial' ] = new MeshStandardMaterial( { + color: 0xFFFFFF, + emissive: 0x000000, + metalness: 1, + roughness: 1, + transparent: false, + depthTest: true, + side: FrontSide + } ); + + } + + return cache[ 'DefaultMaterial' ]; + +} + +function addUnknownExtensionsToUserData( knownExtensions, object, objectDef ) { + + // Add unknown glTF extensions to an object's userData. + + for ( const name in objectDef.extensions ) { + + if ( knownExtensions[ name ] === undefined ) { + + object.userData.gltfExtensions = object.userData.gltfExtensions || {}; + object.userData.gltfExtensions[ name ] = objectDef.extensions[ name ]; + + } + + } + +} + +/** + * @param {Object3D|Material|BufferGeometry} object + * @param {GLTF.definition} gltfDef + */ +function assignExtrasToUserData( object, gltfDef ) { + + if ( gltfDef.extras !== undefined ) { + + if ( typeof gltfDef.extras === 'object' ) { + + Object.assign( object.userData, gltfDef.extras ); + + } else { + + console.warn( 'THREE.GLTFLoader: Ignoring primitive type .extras, ' + gltfDef.extras ); + + } + + } + +} + +/** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#morph-targets + * + * @param {BufferGeometry} geometry + * @param {Array} targets + * @param {GLTFParser} parser + * @return {Promise} + */ +function addMorphTargets( geometry, targets, parser ) { + + let hasMorphPosition = false; + let hasMorphNormal = false; + let hasMorphColor = false; + + for ( let i = 0, il = targets.length; i < il; i ++ ) { + + const target = targets[ i ]; + + if ( target.POSITION !== undefined ) hasMorphPosition = true; + if ( target.NORMAL !== undefined ) hasMorphNormal = true; + if ( target.COLOR_0 !== undefined ) hasMorphColor = true; + + if ( hasMorphPosition && hasMorphNormal && hasMorphColor ) break; + + } + + if ( ! hasMorphPosition && ! hasMorphNormal && ! hasMorphColor ) return Promise.resolve( geometry ); + + const pendingPositionAccessors = []; + const pendingNormalAccessors = []; + const pendingColorAccessors = []; + + for ( let i = 0, il = targets.length; i < il; i ++ ) { + + const target = targets[ i ]; + + if ( hasMorphPosition ) { + + const pendingAccessor = target.POSITION !== undefined + ? parser.getDependency( 'accessor', target.POSITION ) + : geometry.attributes.position; + + pendingPositionAccessors.push( pendingAccessor ); + + } + + if ( hasMorphNormal ) { + + const pendingAccessor = target.NORMAL !== undefined + ? parser.getDependency( 'accessor', target.NORMAL ) + : geometry.attributes.normal; + + pendingNormalAccessors.push( pendingAccessor ); + + } + + if ( hasMorphColor ) { + + const pendingAccessor = target.COLOR_0 !== undefined + ? parser.getDependency( 'accessor', target.COLOR_0 ) + : geometry.attributes.color; + + pendingColorAccessors.push( pendingAccessor ); + + } + + } + + return Promise.all( [ + Promise.all( pendingPositionAccessors ), + Promise.all( pendingNormalAccessors ), + Promise.all( pendingColorAccessors ) + ] ).then( function ( accessors ) { + + const morphPositions = accessors[ 0 ]; + const morphNormals = accessors[ 1 ]; + const morphColors = accessors[ 2 ]; + + if ( hasMorphPosition ) geometry.morphAttributes.position = morphPositions; + if ( hasMorphNormal ) geometry.morphAttributes.normal = morphNormals; + if ( hasMorphColor ) geometry.morphAttributes.color = morphColors; + geometry.morphTargetsRelative = true; + + return geometry; + + } ); + +} + +/** + * @param {Mesh} mesh + * @param {GLTF.Mesh} meshDef + */ +function updateMorphTargets( mesh, meshDef ) { + + mesh.updateMorphTargets(); + + if ( meshDef.weights !== undefined ) { + + for ( let i = 0, il = meshDef.weights.length; i < il; i ++ ) { + + mesh.morphTargetInfluences[ i ] = meshDef.weights[ i ]; + + } + + } + + // .extras has user-defined data, so check that .extras.targetNames is an array. + if ( meshDef.extras && Array.isArray( meshDef.extras.targetNames ) ) { + + const targetNames = meshDef.extras.targetNames; + + if ( mesh.morphTargetInfluences.length === targetNames.length ) { + + mesh.morphTargetDictionary = {}; + + for ( let i = 0, il = targetNames.length; i < il; i ++ ) { + + mesh.morphTargetDictionary[ targetNames[ i ] ] = i; + + } + + } else { + + console.warn( 'THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.' ); + + } + + } + +} + +function createPrimitiveKey( primitiveDef ) { + + let geometryKey; + + const dracoExtension = primitiveDef.extensions && primitiveDef.extensions[ EXTENSIONS.KHR_DRACO_MESH_COMPRESSION ]; + + if ( dracoExtension ) { + + geometryKey = 'draco:' + dracoExtension.bufferView + + ':' + dracoExtension.indices + + ':' + createAttributesKey( dracoExtension.attributes ); + + } else { + + geometryKey = primitiveDef.indices + ':' + createAttributesKey( primitiveDef.attributes ) + ':' + primitiveDef.mode; + + } + + if ( primitiveDef.targets !== undefined ) { + + for ( let i = 0, il = primitiveDef.targets.length; i < il; i ++ ) { + + geometryKey += ':' + createAttributesKey( primitiveDef.targets[ i ] ); + + } + + } + + return geometryKey; + +} + +function createAttributesKey( attributes ) { + + let attributesKey = ''; + + const keys = Object.keys( attributes ).sort(); + + for ( let i = 0, il = keys.length; i < il; i ++ ) { + + attributesKey += keys[ i ] + ':' + attributes[ keys[ i ] ] + ';'; + + } + + return attributesKey; + +} + +function getNormalizedComponentScale( constructor ) { + + // Reference: + // https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_mesh_quantization#encoding-quantized-data + + switch ( constructor ) { + + case Int8Array: + return 1 / 127; + + case Uint8Array: + return 1 / 255; + + case Int16Array: + return 1 / 32767; + + case Uint16Array: + return 1 / 65535; + + default: + throw new Error( 'THREE.GLTFLoader: Unsupported normalized accessor component type.' ); + + } + +} + +function getImageURIMimeType( uri ) { + + if ( uri.search( /\.jpe?g($|\?)/i ) > 0 || uri.search( /^data\:image\/jpeg/ ) === 0 ) return 'image/jpeg'; + if ( uri.search( /\.webp($|\?)/i ) > 0 || uri.search( /^data\:image\/webp/ ) === 0 ) return 'image/webp'; + + return 'image/png'; + +} + +const _identityMatrix = new Matrix4(); + +/* GLTF PARSER */ + +class GLTFParser { + + constructor( json = {}, options = {} ) { + + this.json = json; + this.extensions = {}; + this.plugins = {}; + this.options = options; + + // loader object cache + this.cache = new GLTFRegistry(); + + // associations between Three.js objects and glTF elements + this.associations = new Map(); + + // BufferGeometry caching + this.primitiveCache = {}; + + // Node cache + this.nodeCache = {}; + + // Object3D instance caches + this.meshCache = { refs: {}, uses: {} }; + this.cameraCache = { refs: {}, uses: {} }; + this.lightCache = { refs: {}, uses: {} }; + + this.sourceCache = {}; + this.textureCache = {}; + + // Track node names, to ensure no duplicates + this.nodeNamesUsed = {}; + + // Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the + // expensive work of uploading a texture to the GPU off the main thread. + + let isSafari = false; + let isFirefox = false; + let firefoxVersion = - 1; + + if ( typeof navigator !== 'undefined' ) { + + isSafari = /^((?!chrome|android).)*safari/i.test( navigator.userAgent ) === true; + isFirefox = navigator.userAgent.indexOf( 'Firefox' ) > - 1; + firefoxVersion = isFirefox ? navigator.userAgent.match( /Firefox\/([0-9]+)\./ )[ 1 ] : - 1; + + } + + if ( typeof createImageBitmap === 'undefined' || isSafari || ( isFirefox && firefoxVersion < 98 ) ) { + + this.textureLoader = new TextureLoader( this.options.manager ); + + } else { + + this.textureLoader = new ImageBitmapLoader( this.options.manager ); + + } + + this.textureLoader.setCrossOrigin( this.options.crossOrigin ); + this.textureLoader.setRequestHeader( this.options.requestHeader ); + + this.fileLoader = new FileLoader( this.options.manager ); + this.fileLoader.setResponseType( 'arraybuffer' ); + + if ( this.options.crossOrigin === 'use-credentials' ) { + + this.fileLoader.setWithCredentials( true ); + + } + + } + + setExtensions( extensions ) { + + this.extensions = extensions; + + } + + setPlugins( plugins ) { + + this.plugins = plugins; + + } + + parse( onLoad, onError ) { + + const parser = this; + const json = this.json; + const extensions = this.extensions; + + // Clear the loader cache + this.cache.removeAll(); + this.nodeCache = {}; + + // Mark the special nodes/meshes in json for efficient parse + this._invokeAll( function ( ext ) { + + return ext._markDefs && ext._markDefs(); + + } ); + + Promise.all( this._invokeAll( function ( ext ) { + + return ext.beforeRoot && ext.beforeRoot(); + + } ) ).then( function () { + + return Promise.all( [ + + parser.getDependencies( 'scene' ), + parser.getDependencies( 'animation' ), + parser.getDependencies( 'camera' ), + + ] ); + + } ).then( function ( dependencies ) { + + const result = { + scene: dependencies[ 0 ][ json.scene || 0 ], + scenes: dependencies[ 0 ], + animations: dependencies[ 1 ], + cameras: dependencies[ 2 ], + asset: json.asset, + parser: parser, + userData: {} + }; + + addUnknownExtensionsToUserData( extensions, result, json ); + + assignExtrasToUserData( result, json ); + + return Promise.all( parser._invokeAll( function ( ext ) { + + return ext.afterRoot && ext.afterRoot( result ); + + } ) ).then( function () { + + for ( const scene of result.scenes ) { + + scene.updateMatrixWorld(); + + } + + onLoad( result ); + + } ); + + } ).catch( onError ); + + } + + /** + * Marks the special nodes/meshes in json for efficient parse. + */ + _markDefs() { + + const nodeDefs = this.json.nodes || []; + const skinDefs = this.json.skins || []; + const meshDefs = this.json.meshes || []; + + // Nothing in the node definition indicates whether it is a Bone or an + // Object3D. Use the skins' joint references to mark bones. + for ( let skinIndex = 0, skinLength = skinDefs.length; skinIndex < skinLength; skinIndex ++ ) { + + const joints = skinDefs[ skinIndex ].joints; + + for ( let i = 0, il = joints.length; i < il; i ++ ) { + + nodeDefs[ joints[ i ] ].isBone = true; + + } + + } + + // Iterate over all nodes, marking references to shared resources, + // as well as skeleton joints. + for ( let nodeIndex = 0, nodeLength = nodeDefs.length; nodeIndex < nodeLength; nodeIndex ++ ) { + + const nodeDef = nodeDefs[ nodeIndex ]; + + if ( nodeDef.mesh !== undefined ) { + + this._addNodeRef( this.meshCache, nodeDef.mesh ); + + // Nothing in the mesh definition indicates whether it is + // a SkinnedMesh or Mesh. Use the node's mesh reference + // to mark SkinnedMesh if node has skin. + if ( nodeDef.skin !== undefined ) { + + meshDefs[ nodeDef.mesh ].isSkinnedMesh = true; + + } + + } + + if ( nodeDef.camera !== undefined ) { + + this._addNodeRef( this.cameraCache, nodeDef.camera ); + + } + + } + + } + + /** + * Counts references to shared node / Object3D resources. These resources + * can be reused, or "instantiated", at multiple nodes in the scene + * hierarchy. Mesh, Camera, and Light instances are instantiated and must + * be marked. Non-scenegraph resources (like Materials, Geometries, and + * Textures) can be reused directly and are not marked here. + * + * Example: CesiumMilkTruck sample model reuses "Wheel" meshes. + */ + _addNodeRef( cache, index ) { + + if ( index === undefined ) return; + + if ( cache.refs[ index ] === undefined ) { + + cache.refs[ index ] = cache.uses[ index ] = 0; + + } + + cache.refs[ index ] ++; + + } + + /** Returns a reference to a shared resource, cloning it if necessary. */ + _getNodeRef( cache, index, object ) { + + if ( cache.refs[ index ] <= 1 ) return object; + + const ref = object.clone(); + + // Propagates mappings to the cloned object, prevents mappings on the + // original object from being lost. + const updateMappings = ( original, clone ) => { + + const mappings = this.associations.get( original ); + if ( mappings != null ) { + + this.associations.set( clone, mappings ); + + } + + for ( const [ i, child ] of original.children.entries() ) { + + updateMappings( child, clone.children[ i ] ); + + } + + }; + + updateMappings( object, ref ); + + ref.name += '_instance_' + ( cache.uses[ index ] ++ ); + + return ref; + + } + + _invokeOne( func ) { + + const extensions = Object.values( this.plugins ); + extensions.push( this ); + + for ( let i = 0; i < extensions.length; i ++ ) { + + const result = func( extensions[ i ] ); + + if ( result ) return result; + + } + + return null; + + } + + _invokeAll( func ) { + + const extensions = Object.values( this.plugins ); + extensions.unshift( this ); + + const pending = []; + + for ( let i = 0; i < extensions.length; i ++ ) { + + const result = func( extensions[ i ] ); + + if ( result ) pending.push( result ); + + } + + return pending; + + } + + /** + * Requests the specified dependency asynchronously, with caching. + * @param {string} type + * @param {number} index + * @return {Promise} + */ + getDependency( type, index ) { + + const cacheKey = type + ':' + index; + let dependency = this.cache.get( cacheKey ); + + if ( ! dependency ) { + + switch ( type ) { + + case 'scene': + dependency = this.loadScene( index ); + break; + + case 'node': + dependency = this._invokeOne( function ( ext ) { + + return ext.loadNode && ext.loadNode( index ); + + } ); + break; + + case 'mesh': + dependency = this._invokeOne( function ( ext ) { + + return ext.loadMesh && ext.loadMesh( index ); + + } ); + break; + + case 'accessor': + dependency = this.loadAccessor( index ); + break; + + case 'bufferView': + dependency = this._invokeOne( function ( ext ) { + + return ext.loadBufferView && ext.loadBufferView( index ); + + } ); + break; + + case 'buffer': + dependency = this.loadBuffer( index ); + break; + + case 'material': + dependency = this._invokeOne( function ( ext ) { + + return ext.loadMaterial && ext.loadMaterial( index ); + + } ); + break; + + case 'texture': + dependency = this._invokeOne( function ( ext ) { + + return ext.loadTexture && ext.loadTexture( index ); + + } ); + break; + + case 'skin': + dependency = this.loadSkin( index ); + break; + + case 'animation': + dependency = this._invokeOne( function ( ext ) { + + return ext.loadAnimation && ext.loadAnimation( index ); + + } ); + break; + + case 'camera': + dependency = this.loadCamera( index ); + break; + + default: + dependency = this._invokeOne( function ( ext ) { + + return ext != this && ext.getDependency && ext.getDependency( type, index ); + + } ); + + if ( ! dependency ) { + + throw new Error( 'Unknown type: ' + type ); + + } + + break; + + } + + this.cache.add( cacheKey, dependency ); + + } + + return dependency; + + } + + /** + * Requests all dependencies of the specified type asynchronously, with caching. + * @param {string} type + * @return {Promise>} + */ + getDependencies( type ) { + + let dependencies = this.cache.get( type ); + + if ( ! dependencies ) { + + const parser = this; + const defs = this.json[ type + ( type === 'mesh' ? 'es' : 's' ) ] || []; + + dependencies = Promise.all( defs.map( function ( def, index ) { + + return parser.getDependency( type, index ); + + } ) ); + + this.cache.add( type, dependencies ); + + } + + return dependencies; + + } + + /** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views + * @param {number} bufferIndex + * @return {Promise} + */ + loadBuffer( bufferIndex ) { + + const bufferDef = this.json.buffers[ bufferIndex ]; + const loader = this.fileLoader; + + if ( bufferDef.type && bufferDef.type !== 'arraybuffer' ) { + + throw new Error( 'THREE.GLTFLoader: ' + bufferDef.type + ' buffer type is not supported.' ); + + } + + // If present, GLB container is required to be the first buffer. + if ( bufferDef.uri === undefined && bufferIndex === 0 ) { + + return Promise.resolve( this.extensions[ EXTENSIONS.KHR_BINARY_GLTF ].body ); + + } + + const options = this.options; + + return new Promise( function ( resolve, reject ) { + + loader.load( LoaderUtils.resolveURL( bufferDef.uri, options.path ), resolve, undefined, function () { + + reject( new Error( 'THREE.GLTFLoader: Failed to load buffer "' + bufferDef.uri + '".' ) ); + + } ); + + } ); + + } + + /** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views + * @param {number} bufferViewIndex + * @return {Promise} + */ + loadBufferView( bufferViewIndex ) { + + const bufferViewDef = this.json.bufferViews[ bufferViewIndex ]; + + return this.getDependency( 'buffer', bufferViewDef.buffer ).then( function ( buffer ) { + + const byteLength = bufferViewDef.byteLength || 0; + const byteOffset = bufferViewDef.byteOffset || 0; + return buffer.slice( byteOffset, byteOffset + byteLength ); + + } ); + + } + + /** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#accessors + * @param {number} accessorIndex + * @return {Promise} + */ + loadAccessor( accessorIndex ) { + + const parser = this; + const json = this.json; + + const accessorDef = this.json.accessors[ accessorIndex ]; + + if ( accessorDef.bufferView === undefined && accessorDef.sparse === undefined ) { + + const itemSize = WEBGL_TYPE_SIZES[ accessorDef.type ]; + const TypedArray = WEBGL_COMPONENT_TYPES[ accessorDef.componentType ]; + const normalized = accessorDef.normalized === true; + + const array = new TypedArray( accessorDef.count * itemSize ); + return Promise.resolve( new BufferAttribute( array, itemSize, normalized ) ); + + } + + const pendingBufferViews = []; + + if ( accessorDef.bufferView !== undefined ) { + + pendingBufferViews.push( this.getDependency( 'bufferView', accessorDef.bufferView ) ); + + } else { + + pendingBufferViews.push( null ); + + } + + if ( accessorDef.sparse !== undefined ) { + + pendingBufferViews.push( this.getDependency( 'bufferView', accessorDef.sparse.indices.bufferView ) ); + pendingBufferViews.push( this.getDependency( 'bufferView', accessorDef.sparse.values.bufferView ) ); + + } + + return Promise.all( pendingBufferViews ).then( function ( bufferViews ) { + + const bufferView = bufferViews[ 0 ]; + + const itemSize = WEBGL_TYPE_SIZES[ accessorDef.type ]; + const TypedArray = WEBGL_COMPONENT_TYPES[ accessorDef.componentType ]; + + // For VEC3: itemSize is 3, elementBytes is 4, itemBytes is 12. + const elementBytes = TypedArray.BYTES_PER_ELEMENT; + const itemBytes = elementBytes * itemSize; + const byteOffset = accessorDef.byteOffset || 0; + const byteStride = accessorDef.bufferView !== undefined ? json.bufferViews[ accessorDef.bufferView ].byteStride : undefined; + const normalized = accessorDef.normalized === true; + let array, bufferAttribute; + + // The buffer is not interleaved if the stride is the item size in bytes. + if ( byteStride && byteStride !== itemBytes ) { + + // Each "slice" of the buffer, as defined by 'count' elements of 'byteStride' bytes, gets its own InterleavedBuffer + // This makes sure that IBA.count reflects accessor.count properly + const ibSlice = Math.floor( byteOffset / byteStride ); + const ibCacheKey = 'InterleavedBuffer:' + accessorDef.bufferView + ':' + accessorDef.componentType + ':' + ibSlice + ':' + accessorDef.count; + let ib = parser.cache.get( ibCacheKey ); + + if ( ! ib ) { + + array = new TypedArray( bufferView, ibSlice * byteStride, accessorDef.count * byteStride / elementBytes ); + + // Integer parameters to IB/IBA are in array elements, not bytes. + ib = new InterleavedBuffer( array, byteStride / elementBytes ); + + parser.cache.add( ibCacheKey, ib ); + + } + + bufferAttribute = new InterleavedBufferAttribute( ib, itemSize, ( byteOffset % byteStride ) / elementBytes, normalized ); + + } else { + + if ( bufferView === null ) { + + array = new TypedArray( accessorDef.count * itemSize ); + + } else { + + array = new TypedArray( bufferView, byteOffset, accessorDef.count * itemSize ); + + } + + bufferAttribute = new BufferAttribute( array, itemSize, normalized ); + + } + + // https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#sparse-accessors + if ( accessorDef.sparse !== undefined ) { + + const itemSizeIndices = WEBGL_TYPE_SIZES.SCALAR; + const TypedArrayIndices = WEBGL_COMPONENT_TYPES[ accessorDef.sparse.indices.componentType ]; + + const byteOffsetIndices = accessorDef.sparse.indices.byteOffset || 0; + const byteOffsetValues = accessorDef.sparse.values.byteOffset || 0; + + const sparseIndices = new TypedArrayIndices( bufferViews[ 1 ], byteOffsetIndices, accessorDef.sparse.count * itemSizeIndices ); + const sparseValues = new TypedArray( bufferViews[ 2 ], byteOffsetValues, accessorDef.sparse.count * itemSize ); + + if ( bufferView !== null ) { + + // Avoid modifying the original ArrayBuffer, if the bufferView wasn't initialized with zeroes. + bufferAttribute = new BufferAttribute( bufferAttribute.array.slice(), bufferAttribute.itemSize, bufferAttribute.normalized ); + + } + + for ( let i = 0, il = sparseIndices.length; i < il; i ++ ) { + + const index = sparseIndices[ i ]; + + bufferAttribute.setX( index, sparseValues[ i * itemSize ] ); + if ( itemSize >= 2 ) bufferAttribute.setY( index, sparseValues[ i * itemSize + 1 ] ); + if ( itemSize >= 3 ) bufferAttribute.setZ( index, sparseValues[ i * itemSize + 2 ] ); + if ( itemSize >= 4 ) bufferAttribute.setW( index, sparseValues[ i * itemSize + 3 ] ); + if ( itemSize >= 5 ) throw new Error( 'THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.' ); + + } + + } + + return bufferAttribute; + + } ); + + } + + /** + * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#textures + * @param {number} textureIndex + * @return {Promise} + */ + loadTexture( textureIndex ) { + + const json = this.json; + const options = this.options; + const textureDef = json.textures[ textureIndex ]; + const sourceIndex = textureDef.source; + const sourceDef = json.images[ sourceIndex ]; + + let loader = this.textureLoader; + + if ( sourceDef.uri ) { + + const handler = options.manager.getHandler( sourceDef.uri ); + if ( handler !== null ) loader = handler; + + } + + return this.loadTextureImage( textureIndex, sourceIndex, loader ); + + } + + loadTextureImage( textureIndex, sourceIndex, loader ) { + + const parser = this; + const json = this.json; + + const textureDef = json.textures[ textureIndex ]; + const sourceDef = json.images[ sourceIndex ]; + + const cacheKey = ( sourceDef.uri || sourceDef.bufferView ) + ':' + textureDef.sampler; + + if ( this.textureCache[ cacheKey ] ) { + + // See https://github.com/mrdoob/three.js/issues/21559. + return this.textureCache[ cacheKey ]; + + } + + const promise = this.loadImageSource( sourceIndex, loader ).then( function ( texture ) { + + texture.flipY = false; + + texture.name = textureDef.name || sourceDef.name || ''; + + if ( texture.name === '' && typeof sourceDef.uri === 'string' && sourceDef.uri.startsWith( 'data:image/' ) === false ) { + + texture.name = sourceDef.uri; + + } + + const samplers = json.samplers || {}; + const sampler = samplers[ textureDef.sampler ] || {}; + + texture.magFilter = WEBGL_FILTERS[ sampler.magFilter ] || LinearFilter; + texture.minFilter = WEBGL_FILTERS[ sampler.minFilter ] || LinearMipmapLinearFilter; + texture.wrapS = WEBGL_WRAPPINGS[ sampler.wrapS ] || RepeatWrapping; + texture.wrapT = WEBGL_WRAPPINGS[ sampler.wrapT ] || RepeatWrapping; + + parser.associations.set( texture, { textures: textureIndex } ); + + return texture; + + } ).catch( function () { + + return null; + + } ); + + this.textureCache[ cacheKey ] = promise; + + return promise; + + } + + loadImageSource( sourceIndex, loader ) { + + const parser = this; + const json = this.json; + const options = this.options; + + if ( this.sourceCache[ sourceIndex ] !== undefined ) { + + return this.sourceCache[ sourceIndex ].then( ( texture ) => texture.clone() ); + + } + + const sourceDef = json.images[ sourceIndex ]; + + const URL = self.URL || self.webkitURL; + + let sourceURI = sourceDef.uri || ''; + let isObjectURL = false; + + if ( sourceDef.bufferView !== undefined ) { + + // Load binary image data from bufferView, if provided. + + sourceURI = parser.getDependency( 'bufferView', sourceDef.bufferView ).then( function ( bufferView ) { + + isObjectURL = true; + const blob = new Blob( [ bufferView ], { type: sourceDef.mimeType } ); + sourceURI = URL.createObjectURL( blob ); + return sourceURI; + + } ); + + } else if ( sourceDef.uri === undefined ) { + + throw new Error( 'THREE.GLTFLoader: Image ' + sourceIndex + ' is missing URI and bufferView' ); + + } + + const promise = Promise.resolve( sourceURI ).then( function ( sourceURI ) { + + return new Promise( function ( resolve, reject ) { + + let onLoad = resolve; + + if ( loader.isImageBitmapLoader === true ) { + + onLoad = function ( imageBitmap ) { + + const texture = new Texture( imageBitmap ); + texture.needsUpdate = true; + + resolve( texture ); + + }; + + } + + loader.load( LoaderUtils.resolveURL( sourceURI, options.path ), onLoad, undefined, reject ); + + } ); + + } ).then( function ( texture ) { + + // Clean up resources and configure Texture. + + if ( isObjectURL === true ) { + + URL.revokeObjectURL( sourceURI ); + + } + + texture.userData.mimeType = sourceDef.mimeType || getImageURIMimeType( sourceDef.uri ); + + return texture; + + } ).catch( function ( error ) { + + console.error( 'THREE.GLTFLoader: Couldn\'t load texture', sourceURI ); + throw error; + + } ); + + this.sourceCache[ sourceIndex ] = promise; + return promise; + + } + + /** + * Asynchronously assigns a texture to the given material parameters. + * @param {Object} materialParams + * @param {string} mapName + * @param {Object} mapDef + * @return {Promise} + */ + assignTexture( materialParams, mapName, mapDef, colorSpace ) { + + const parser = this; + + return this.getDependency( 'texture', mapDef.index ).then( function ( texture ) { + + if ( ! texture ) return null; + + if ( mapDef.texCoord !== undefined && mapDef.texCoord > 0 ) { + + texture = texture.clone(); + texture.channel = mapDef.texCoord; + + } + + if ( parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] ) { + + const transform = mapDef.extensions !== undefined ? mapDef.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] : undefined; + + if ( transform ) { + + const gltfReference = parser.associations.get( texture ); + texture = parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ].extendTexture( texture, transform ); + parser.associations.set( texture, gltfReference ); + + } + + } + + if ( colorSpace !== undefined ) { + + texture.colorSpace = colorSpace; + + } + + materialParams[ mapName ] = texture; + + return texture; + + } ); + + } + + /** + * Assigns final material to a Mesh, Line, or Points instance. The instance + * already has a material (generated from the glTF material options alone) + * but reuse of the same glTF material may require multiple threejs materials + * to accommodate different primitive types, defines, etc. New materials will + * be created if necessary, and reused from a cache. + * @param {Object3D} mesh Mesh, Line, or Points instance. + */ + assignFinalMaterial( mesh ) { + + const geometry = mesh.geometry; + let material = mesh.material; + + const useDerivativeTangents = geometry.attributes.tangent === undefined; + const useVertexColors = geometry.attributes.color !== undefined; + const useFlatShading = geometry.attributes.normal === undefined; + + if ( mesh.isPoints ) { + + const cacheKey = 'PointsMaterial:' + material.uuid; + + let pointsMaterial = this.cache.get( cacheKey ); + + if ( ! pointsMaterial ) { + + pointsMaterial = new PointsMaterial(); + Material.prototype.copy.call( pointsMaterial, material ); + pointsMaterial.color.copy( material.color ); + pointsMaterial.map = material.map; + pointsMaterial.sizeAttenuation = false; // glTF spec says points should be 1px + + this.cache.add( cacheKey, pointsMaterial ); + + } + + material = pointsMaterial; + + } else if ( mesh.isLine ) { + + const cacheKey = 'LineBasicMaterial:' + material.uuid; + + let lineMaterial = this.cache.get( cacheKey ); + + if ( ! lineMaterial ) { + + lineMaterial = new LineBasicMaterial(); + Material.prototype.copy.call( lineMaterial, material ); + lineMaterial.color.copy( material.color ); + lineMaterial.map = material.map; + + this.cache.add( cacheKey, lineMaterial ); + + } + + material = lineMaterial; + + } + + // Clone the material if it will be modified + if ( useDerivativeTangents || useVertexColors || useFlatShading ) { + + let cacheKey = 'ClonedMaterial:' + material.uuid + ':'; + + if ( useDerivativeTangents ) cacheKey += 'derivative-tangents:'; + if ( useVertexColors ) cacheKey += 'vertex-colors:'; + if ( useFlatShading ) cacheKey += 'flat-shading:'; + + let cachedMaterial = this.cache.get( cacheKey ); + + if ( ! cachedMaterial ) { + + cachedMaterial = material.clone(); + + if ( useVertexColors ) cachedMaterial.vertexColors = true; + if ( useFlatShading ) cachedMaterial.flatShading = true; + + if ( useDerivativeTangents ) { + + // https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995 + if ( cachedMaterial.normalScale ) cachedMaterial.normalScale.y *= - 1; + if ( cachedMaterial.clearcoatNormalScale ) cachedMaterial.clearcoatNormalScale.y *= - 1; + + } + + this.cache.add( cacheKey, cachedMaterial ); + + this.associations.set( cachedMaterial, this.associations.get( material ) ); + + } + + material = cachedMaterial; + + } + + mesh.material = material; + + } + + getMaterialType( /* materialIndex */ ) { + + return MeshStandardMaterial; + + } + + /** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials + * @param {number} materialIndex + * @return {Promise} + */ + loadMaterial( materialIndex ) { + + const parser = this; + const json = this.json; + const extensions = this.extensions; + const materialDef = json.materials[ materialIndex ]; + + let materialType; + const materialParams = {}; + const materialExtensions = materialDef.extensions || {}; + + const pending = []; + + if ( materialExtensions[ EXTENSIONS.KHR_MATERIALS_UNLIT ] ) { + + const kmuExtension = extensions[ EXTENSIONS.KHR_MATERIALS_UNLIT ]; + materialType = kmuExtension.getMaterialType(); + pending.push( kmuExtension.extendParams( materialParams, materialDef, parser ) ); + + } else { + + // Specification: + // https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#metallic-roughness-material + + const metallicRoughness = materialDef.pbrMetallicRoughness || {}; + + materialParams.color = new Color( 1.0, 1.0, 1.0 ); + materialParams.opacity = 1.0; + + if ( Array.isArray( metallicRoughness.baseColorFactor ) ) { + + const array = metallicRoughness.baseColorFactor; + + materialParams.color.setRGB( array[ 0 ], array[ 1 ], array[ 2 ], LinearSRGBColorSpace ); + materialParams.opacity = array[ 3 ]; + + } + + if ( metallicRoughness.baseColorTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'map', metallicRoughness.baseColorTexture, SRGBColorSpace ) ); + + } + + materialParams.metalness = metallicRoughness.metallicFactor !== undefined ? metallicRoughness.metallicFactor : 1.0; + materialParams.roughness = metallicRoughness.roughnessFactor !== undefined ? metallicRoughness.roughnessFactor : 1.0; + + if ( metallicRoughness.metallicRoughnessTexture !== undefined ) { + + pending.push( parser.assignTexture( materialParams, 'metalnessMap', metallicRoughness.metallicRoughnessTexture ) ); + pending.push( parser.assignTexture( materialParams, 'roughnessMap', metallicRoughness.metallicRoughnessTexture ) ); + + } + + materialType = this._invokeOne( function ( ext ) { + + return ext.getMaterialType && ext.getMaterialType( materialIndex ); + + } ); + + pending.push( Promise.all( this._invokeAll( function ( ext ) { + + return ext.extendMaterialParams && ext.extendMaterialParams( materialIndex, materialParams ); + + } ) ) ); + + } + + if ( materialDef.doubleSided === true ) { + + materialParams.side = DoubleSide; + + } + + const alphaMode = materialDef.alphaMode || ALPHA_MODES.OPAQUE; + + if ( alphaMode === ALPHA_MODES.BLEND ) { + + materialParams.transparent = true; + + // See: https://github.com/mrdoob/three.js/issues/17706 + materialParams.depthWrite = false; + + } else { + + materialParams.transparent = false; + + if ( alphaMode === ALPHA_MODES.MASK ) { + + materialParams.alphaTest = materialDef.alphaCutoff !== undefined ? materialDef.alphaCutoff : 0.5; + + } + + } + + if ( materialDef.normalTexture !== undefined && materialType !== MeshBasicMaterial ) { + + pending.push( parser.assignTexture( materialParams, 'normalMap', materialDef.normalTexture ) ); + + materialParams.normalScale = new Vector2( 1, 1 ); + + if ( materialDef.normalTexture.scale !== undefined ) { + + const scale = materialDef.normalTexture.scale; + + materialParams.normalScale.set( scale, scale ); + + } + + } + + if ( materialDef.occlusionTexture !== undefined && materialType !== MeshBasicMaterial ) { + + pending.push( parser.assignTexture( materialParams, 'aoMap', materialDef.occlusionTexture ) ); + + if ( materialDef.occlusionTexture.strength !== undefined ) { + + materialParams.aoMapIntensity = materialDef.occlusionTexture.strength; + + } + + } + + if ( materialDef.emissiveFactor !== undefined && materialType !== MeshBasicMaterial ) { + + const emissiveFactor = materialDef.emissiveFactor; + materialParams.emissive = new Color().setRGB( emissiveFactor[ 0 ], emissiveFactor[ 1 ], emissiveFactor[ 2 ], LinearSRGBColorSpace ); + + } + + if ( materialDef.emissiveTexture !== undefined && materialType !== MeshBasicMaterial ) { + + pending.push( parser.assignTexture( materialParams, 'emissiveMap', materialDef.emissiveTexture, SRGBColorSpace ) ); + + } + + return Promise.all( pending ).then( function () { + + const material = new materialType( materialParams ); + + if ( materialDef.name ) material.name = materialDef.name; + + assignExtrasToUserData( material, materialDef ); + + parser.associations.set( material, { materials: materialIndex } ); + + if ( materialDef.extensions ) addUnknownExtensionsToUserData( extensions, material, materialDef ); + + return material; + + } ); + + } + + /** When Object3D instances are targeted by animation, they need unique names. */ + createUniqueName( originalName ) { + + const sanitizedName = PropertyBinding.sanitizeNodeName( originalName || '' ); + + if ( sanitizedName in this.nodeNamesUsed ) { + + return sanitizedName + '_' + ( ++ this.nodeNamesUsed[ sanitizedName ] ); + + } else { + + this.nodeNamesUsed[ sanitizedName ] = 0; + + return sanitizedName; + + } + + } + + /** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#geometry + * + * Creates BufferGeometries from primitives. + * + * @param {Array} primitives + * @return {Promise>} + */ + loadGeometries( primitives ) { + + const parser = this; + const extensions = this.extensions; + const cache = this.primitiveCache; + + function createDracoPrimitive( primitive ) { + + return extensions[ EXTENSIONS.KHR_DRACO_MESH_COMPRESSION ] + .decodePrimitive( primitive, parser ) + .then( function ( geometry ) { + + return addPrimitiveAttributes( geometry, primitive, parser ); + + } ); + + } + + const pending = []; + + for ( let i = 0, il = primitives.length; i < il; i ++ ) { + + const primitive = primitives[ i ]; + const cacheKey = createPrimitiveKey( primitive ); + + // See if we've already created this geometry + const cached = cache[ cacheKey ]; + + if ( cached ) { + + // Use the cached geometry if it exists + pending.push( cached.promise ); + + } else { + + let geometryPromise; + + if ( primitive.extensions && primitive.extensions[ EXTENSIONS.KHR_DRACO_MESH_COMPRESSION ] ) { + + // Use DRACO geometry if available + geometryPromise = createDracoPrimitive( primitive ); + + } else { + + // Otherwise create a new geometry + geometryPromise = addPrimitiveAttributes( new BufferGeometry(), primitive, parser ); + + } + + // Cache this geometry + cache[ cacheKey ] = { primitive: primitive, promise: geometryPromise }; + + pending.push( geometryPromise ); + + } + + } + + return Promise.all( pending ); + + } + + /** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#meshes + * @param {number} meshIndex + * @return {Promise} + */ + loadMesh( meshIndex ) { + + const parser = this; + const json = this.json; + const extensions = this.extensions; + + const meshDef = json.meshes[ meshIndex ]; + const primitives = meshDef.primitives; + + const pending = []; + + for ( let i = 0, il = primitives.length; i < il; i ++ ) { + + const material = primitives[ i ].material === undefined + ? createDefaultMaterial( this.cache ) + : this.getDependency( 'material', primitives[ i ].material ); + + pending.push( material ); + + } + + pending.push( parser.loadGeometries( primitives ) ); + + return Promise.all( pending ).then( function ( results ) { + + const materials = results.slice( 0, results.length - 1 ); + const geometries = results[ results.length - 1 ]; + + const meshes = []; + + for ( let i = 0, il = geometries.length; i < il; i ++ ) { + + const geometry = geometries[ i ]; + const primitive = primitives[ i ]; + + // 1. create Mesh + + let mesh; + + const material = materials[ i ]; + + if ( primitive.mode === WEBGL_CONSTANTS.TRIANGLES || + primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP || + primitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN || + primitive.mode === undefined ) { + + // .isSkinnedMesh isn't in glTF spec. See ._markDefs() + mesh = meshDef.isSkinnedMesh === true + ? new SkinnedMesh( geometry, material ) + : new Mesh( geometry, material ); + + if ( mesh.isSkinnedMesh === true ) { + + // normalize skin weights to fix malformed assets (see #15319) + mesh.normalizeSkinWeights(); + + } + + if ( primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP ) { + + mesh.geometry = toTrianglesDrawMode( mesh.geometry, TriangleStripDrawMode ); + + } else if ( primitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN ) { + + mesh.geometry = toTrianglesDrawMode( mesh.geometry, TriangleFanDrawMode ); + + } + + } else if ( primitive.mode === WEBGL_CONSTANTS.LINES ) { + + mesh = new LineSegments( geometry, material ); + + } else if ( primitive.mode === WEBGL_CONSTANTS.LINE_STRIP ) { + + mesh = new Line( geometry, material ); + + } else if ( primitive.mode === WEBGL_CONSTANTS.LINE_LOOP ) { + + mesh = new LineLoop( geometry, material ); + + } else if ( primitive.mode === WEBGL_CONSTANTS.POINTS ) { + + mesh = new Points( geometry, material ); + + } else { + + throw new Error( 'THREE.GLTFLoader: Primitive mode unsupported: ' + primitive.mode ); + + } + + if ( Object.keys( mesh.geometry.morphAttributes ).length > 0 ) { + + updateMorphTargets( mesh, meshDef ); + + } + + mesh.name = parser.createUniqueName( meshDef.name || ( 'mesh_' + meshIndex ) ); + + assignExtrasToUserData( mesh, meshDef ); + + if ( primitive.extensions ) addUnknownExtensionsToUserData( extensions, mesh, primitive ); + + parser.assignFinalMaterial( mesh ); + + meshes.push( mesh ); + + } + + for ( let i = 0, il = meshes.length; i < il; i ++ ) { + + parser.associations.set( meshes[ i ], { + meshes: meshIndex, + primitives: i + } ); + + } + + if ( meshes.length === 1 ) { + + if ( meshDef.extensions ) addUnknownExtensionsToUserData( extensions, meshes[ 0 ], meshDef ); + + return meshes[ 0 ]; + + } + + const group = new Group(); + + if ( meshDef.extensions ) addUnknownExtensionsToUserData( extensions, group, meshDef ); + + parser.associations.set( group, { meshes: meshIndex } ); + + for ( let i = 0, il = meshes.length; i < il; i ++ ) { + + group.add( meshes[ i ] ); + + } + + return group; + + } ); + + } + + /** + * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#cameras + * @param {number} cameraIndex + * @return {Promise} + */ + loadCamera( cameraIndex ) { + + let camera; + const cameraDef = this.json.cameras[ cameraIndex ]; + const params = cameraDef[ cameraDef.type ]; + + if ( ! params ) { + + console.warn( 'THREE.GLTFLoader: Missing camera parameters.' ); + return; + + } + + if ( cameraDef.type === 'perspective' ) { + + camera = new PerspectiveCamera( MathUtils.radToDeg( params.yfov ), params.aspectRatio || 1, params.znear || 1, params.zfar || 2e6 ); + + } else if ( cameraDef.type === 'orthographic' ) { + + camera = new OrthographicCamera( - params.xmag, params.xmag, params.ymag, - params.ymag, params.znear, params.zfar ); + + } + + if ( cameraDef.name ) camera.name = this.createUniqueName( cameraDef.name ); + + assignExtrasToUserData( camera, cameraDef ); + + return Promise.resolve( camera ); + + } + + /** + * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins + * @param {number} skinIndex + * @return {Promise} + */ + loadSkin( skinIndex ) { + + const skinDef = this.json.skins[ skinIndex ]; + + const pending = []; + + for ( let i = 0, il = skinDef.joints.length; i < il; i ++ ) { + + pending.push( this._loadNodeShallow( skinDef.joints[ i ] ) ); + + } + + if ( skinDef.inverseBindMatrices !== undefined ) { + + pending.push( this.getDependency( 'accessor', skinDef.inverseBindMatrices ) ); + + } else { + + pending.push( null ); + + } + + return Promise.all( pending ).then( function ( results ) { + + const inverseBindMatrices = results.pop(); + const jointNodes = results; + + // Note that bones (joint nodes) may or may not be in the + // scene graph at this time. + + const bones = []; + const boneInverses = []; + + for ( let i = 0, il = jointNodes.length; i < il; i ++ ) { + + const jointNode = jointNodes[ i ]; + + if ( jointNode ) { + + bones.push( jointNode ); + + const mat = new Matrix4(); + + if ( inverseBindMatrices !== null ) { + + mat.fromArray( inverseBindMatrices.array, i * 16 ); + + } + + boneInverses.push( mat ); + + } else { + + console.warn( 'THREE.GLTFLoader: Joint "%s" could not be found.', skinDef.joints[ i ] ); + + } + + } + + return new Skeleton( bones, boneInverses ); + + } ); + + } + + /** + * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#animations + * @param {number} animationIndex + * @return {Promise} + */ + loadAnimation( animationIndex ) { + + const json = this.json; + const parser = this; + + const animationDef = json.animations[ animationIndex ]; + const animationName = animationDef.name ? animationDef.name : 'animation_' + animationIndex; + + const pendingNodes = []; + const pendingInputAccessors = []; + const pendingOutputAccessors = []; + const pendingSamplers = []; + const pendingTargets = []; + + for ( let i = 0, il = animationDef.channels.length; i < il; i ++ ) { + + const channel = animationDef.channels[ i ]; + const sampler = animationDef.samplers[ channel.sampler ]; + const target = channel.target; + const name = target.node; + const input = animationDef.parameters !== undefined ? animationDef.parameters[ sampler.input ] : sampler.input; + const output = animationDef.parameters !== undefined ? animationDef.parameters[ sampler.output ] : sampler.output; + + if ( target.node === undefined ) continue; + + pendingNodes.push( this.getDependency( 'node', name ) ); + pendingInputAccessors.push( this.getDependency( 'accessor', input ) ); + pendingOutputAccessors.push( this.getDependency( 'accessor', output ) ); + pendingSamplers.push( sampler ); + pendingTargets.push( target ); + + } + + return Promise.all( [ + + Promise.all( pendingNodes ), + Promise.all( pendingInputAccessors ), + Promise.all( pendingOutputAccessors ), + Promise.all( pendingSamplers ), + Promise.all( pendingTargets ) + + ] ).then( function ( dependencies ) { + + const nodes = dependencies[ 0 ]; + const inputAccessors = dependencies[ 1 ]; + const outputAccessors = dependencies[ 2 ]; + const samplers = dependencies[ 3 ]; + const targets = dependencies[ 4 ]; + + const tracks = []; + + for ( let i = 0, il = nodes.length; i < il; i ++ ) { + + const node = nodes[ i ]; + const inputAccessor = inputAccessors[ i ]; + const outputAccessor = outputAccessors[ i ]; + const sampler = samplers[ i ]; + const target = targets[ i ]; + + if ( node === undefined ) continue; + + if ( node.updateMatrix ) { + + node.updateMatrix(); + + } + + const createdTracks = parser._createAnimationTracks( node, inputAccessor, outputAccessor, sampler, target ); + + if ( createdTracks ) { + + for ( let k = 0; k < createdTracks.length; k ++ ) { + + tracks.push( createdTracks[ k ] ); + + } + + } + + } + + return new AnimationClip( animationName, undefined, tracks ); + + } ); + + } + + createNodeMesh( nodeIndex ) { + + const json = this.json; + const parser = this; + const nodeDef = json.nodes[ nodeIndex ]; + + if ( nodeDef.mesh === undefined ) return null; + + return parser.getDependency( 'mesh', nodeDef.mesh ).then( function ( mesh ) { + + const node = parser._getNodeRef( parser.meshCache, nodeDef.mesh, mesh ); + + // if weights are provided on the node, override weights on the mesh. + if ( nodeDef.weights !== undefined ) { + + node.traverse( function ( o ) { + + if ( ! o.isMesh ) return; + + for ( let i = 0, il = nodeDef.weights.length; i < il; i ++ ) { + + o.morphTargetInfluences[ i ] = nodeDef.weights[ i ]; + + } + + } ); + + } + + return node; + + } ); + + } + + /** + * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#nodes-and-hierarchy + * @param {number} nodeIndex + * @return {Promise} + */ + loadNode( nodeIndex ) { + + const json = this.json; + const parser = this; + + const nodeDef = json.nodes[ nodeIndex ]; + + const nodePending = parser._loadNodeShallow( nodeIndex ); + + const childPending = []; + const childrenDef = nodeDef.children || []; + + for ( let i = 0, il = childrenDef.length; i < il; i ++ ) { + + childPending.push( parser.getDependency( 'node', childrenDef[ i ] ) ); + + } + + const skeletonPending = nodeDef.skin === undefined + ? Promise.resolve( null ) + : parser.getDependency( 'skin', nodeDef.skin ); + + return Promise.all( [ + nodePending, + Promise.all( childPending ), + skeletonPending + ] ).then( function ( results ) { + + const node = results[ 0 ]; + const children = results[ 1 ]; + const skeleton = results[ 2 ]; + + if ( skeleton !== null ) { + + // This full traverse should be fine because + // child glTF nodes have not been added to this node yet. + node.traverse( function ( mesh ) { + + if ( ! mesh.isSkinnedMesh ) return; + + mesh.bind( skeleton, _identityMatrix ); + + } ); + + } + + for ( let i = 0, il = children.length; i < il; i ++ ) { + + node.add( children[ i ] ); + + } + + return node; + + } ); + + } + + // ._loadNodeShallow() parses a single node. + // skin and child nodes are created and added in .loadNode() (no '_' prefix). + _loadNodeShallow( nodeIndex ) { + + const json = this.json; + const extensions = this.extensions; + const parser = this; + + // This method is called from .loadNode() and .loadSkin(). + // Cache a node to avoid duplication. + + if ( this.nodeCache[ nodeIndex ] !== undefined ) { + + return this.nodeCache[ nodeIndex ]; + + } + + const nodeDef = json.nodes[ nodeIndex ]; + + // reserve node's name before its dependencies, so the root has the intended name. + const nodeName = nodeDef.name ? parser.createUniqueName( nodeDef.name ) : ''; + + const pending = []; + + const meshPromise = parser._invokeOne( function ( ext ) { + + return ext.createNodeMesh && ext.createNodeMesh( nodeIndex ); + + } ); + + if ( meshPromise ) { + + pending.push( meshPromise ); + + } + + if ( nodeDef.camera !== undefined ) { + + pending.push( parser.getDependency( 'camera', nodeDef.camera ).then( function ( camera ) { + + return parser._getNodeRef( parser.cameraCache, nodeDef.camera, camera ); + + } ) ); + + } + + parser._invokeAll( function ( ext ) { + + return ext.createNodeAttachment && ext.createNodeAttachment( nodeIndex ); + + } ).forEach( function ( promise ) { + + pending.push( promise ); + + } ); + + this.nodeCache[ nodeIndex ] = Promise.all( pending ).then( function ( objects ) { + + let node; + + // .isBone isn't in glTF spec. See ._markDefs + if ( nodeDef.isBone === true ) { + + node = new Bone(); + + } else if ( objects.length > 1 ) { + + node = new Group(); + + } else if ( objects.length === 1 ) { + + node = objects[ 0 ]; + + } else { + + node = new Object3D(); + + } + + if ( node !== objects[ 0 ] ) { + + for ( let i = 0, il = objects.length; i < il; i ++ ) { + + node.add( objects[ i ] ); + + } + + } + + if ( nodeDef.name ) { + + node.userData.name = nodeDef.name; + node.name = nodeName; + + } + + assignExtrasToUserData( node, nodeDef ); + + if ( nodeDef.extensions ) addUnknownExtensionsToUserData( extensions, node, nodeDef ); + + if ( nodeDef.matrix !== undefined ) { + + const matrix = new Matrix4(); + matrix.fromArray( nodeDef.matrix ); + node.applyMatrix4( matrix ); + + } else { + + if ( nodeDef.translation !== undefined ) { + + node.position.fromArray( nodeDef.translation ); + + } + + if ( nodeDef.rotation !== undefined ) { + + node.quaternion.fromArray( nodeDef.rotation ); + + } + + if ( nodeDef.scale !== undefined ) { + + node.scale.fromArray( nodeDef.scale ); + + } + + } + + if ( ! parser.associations.has( node ) ) { + + parser.associations.set( node, {} ); + + } + + parser.associations.get( node ).nodes = nodeIndex; + + return node; + + } ); + + return this.nodeCache[ nodeIndex ]; + + } + + /** + * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#scenes + * @param {number} sceneIndex + * @return {Promise} + */ + loadScene( sceneIndex ) { + + const extensions = this.extensions; + const sceneDef = this.json.scenes[ sceneIndex ]; + const parser = this; + + // Loader returns Group, not Scene. + // See: https://github.com/mrdoob/three.js/issues/18342#issuecomment-578981172 + const scene = new Group(); + if ( sceneDef.name ) scene.name = parser.createUniqueName( sceneDef.name ); + + assignExtrasToUserData( scene, sceneDef ); + + if ( sceneDef.extensions ) addUnknownExtensionsToUserData( extensions, scene, sceneDef ); + + const nodeIds = sceneDef.nodes || []; + + const pending = []; + + for ( let i = 0, il = nodeIds.length; i < il; i ++ ) { + + pending.push( parser.getDependency( 'node', nodeIds[ i ] ) ); + + } + + return Promise.all( pending ).then( function ( nodes ) { + + for ( let i = 0, il = nodes.length; i < il; i ++ ) { + + scene.add( nodes[ i ] ); + + } + + // Removes dangling associations, associations that reference a node that + // didn't make it into the scene. + const reduceAssociations = ( node ) => { + + const reducedAssociations = new Map(); + + for ( const [ key, value ] of parser.associations ) { + + if ( key instanceof Material || key instanceof Texture ) { + + reducedAssociations.set( key, value ); + + } + + } + + node.traverse( ( node ) => { + + const mappings = parser.associations.get( node ); + + if ( mappings != null ) { + + reducedAssociations.set( node, mappings ); + + } + + } ); + + return reducedAssociations; + + }; + + parser.associations = reduceAssociations( scene ); + + return scene; + + } ); + + } + + _createAnimationTracks( node, inputAccessor, outputAccessor, sampler, target ) { + + const tracks = []; + + const targetName = node.name ? node.name : node.uuid; + const targetNames = []; + + if ( PATH_PROPERTIES[ target.path ] === PATH_PROPERTIES.weights ) { + + node.traverse( function ( object ) { + + if ( object.morphTargetInfluences ) { + + targetNames.push( object.name ? object.name : object.uuid ); + + } + + } ); + + } else { + + targetNames.push( targetName ); + + } + + let TypedKeyframeTrack; + + switch ( PATH_PROPERTIES[ target.path ] ) { + + case PATH_PROPERTIES.weights: + + TypedKeyframeTrack = NumberKeyframeTrack; + break; + + case PATH_PROPERTIES.rotation: + + TypedKeyframeTrack = QuaternionKeyframeTrack; + break; + + case PATH_PROPERTIES.position: + case PATH_PROPERTIES.scale: + + TypedKeyframeTrack = VectorKeyframeTrack; + break; + + default: + + switch ( outputAccessor.itemSize ) { + + case 1: + TypedKeyframeTrack = NumberKeyframeTrack; + break; + case 2: + case 3: + default: + TypedKeyframeTrack = VectorKeyframeTrack; + break; + + } + + break; + + } + + const interpolation = sampler.interpolation !== undefined ? INTERPOLATION[ sampler.interpolation ] : InterpolateLinear; + + + const outputArray = this._getArrayFromAccessor( outputAccessor ); + + for ( let j = 0, jl = targetNames.length; j < jl; j ++ ) { + + const track = new TypedKeyframeTrack( + targetNames[ j ] + '.' + PATH_PROPERTIES[ target.path ], + inputAccessor.array, + outputArray, + interpolation + ); + + // Override interpolation with custom factory method. + if ( sampler.interpolation === 'CUBICSPLINE' ) { + + this._createCubicSplineTrackInterpolant( track ); + + } + + tracks.push( track ); + + } + + return tracks; + + } + + _getArrayFromAccessor( accessor ) { + + let outputArray = accessor.array; + + if ( accessor.normalized ) { + + const scale = getNormalizedComponentScale( outputArray.constructor ); + const scaled = new Float32Array( outputArray.length ); + + for ( let j = 0, jl = outputArray.length; j < jl; j ++ ) { + + scaled[ j ] = outputArray[ j ] * scale; + + } + + outputArray = scaled; + + } + + return outputArray; + + } + + _createCubicSplineTrackInterpolant( track ) { + + track.createInterpolant = function InterpolantFactoryMethodGLTFCubicSpline( result ) { + + // A CUBICSPLINE keyframe in glTF has three output values for each input value, + // representing inTangent, splineVertex, and outTangent. As a result, track.getValueSize() + // must be divided by three to get the interpolant's sampleSize argument. + + const interpolantType = ( this instanceof QuaternionKeyframeTrack ) ? GLTFCubicSplineQuaternionInterpolant : GLTFCubicSplineInterpolant; + + return new interpolantType( this.times, this.values, this.getValueSize() / 3, result ); + + }; + + // Mark as CUBICSPLINE. `track.getInterpolation()` doesn't support custom interpolants. + track.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = true; + + } + +} + +/** + * @param {BufferGeometry} geometry + * @param {GLTF.Primitive} primitiveDef + * @param {GLTFParser} parser + */ +function computeBounds( geometry, primitiveDef, parser ) { + + const attributes = primitiveDef.attributes; + + const box = new Box3(); + + if ( attributes.POSITION !== undefined ) { + + const accessor = parser.json.accessors[ attributes.POSITION ]; + + const min = accessor.min; + const max = accessor.max; + + // glTF requires 'min' and 'max', but VRM (which extends glTF) currently ignores that requirement. + + if ( min !== undefined && max !== undefined ) { + + box.set( + new Vector3( min[ 0 ], min[ 1 ], min[ 2 ] ), + new Vector3( max[ 0 ], max[ 1 ], max[ 2 ] ) + ); + + if ( accessor.normalized ) { + + const boxScale = getNormalizedComponentScale( WEBGL_COMPONENT_TYPES[ accessor.componentType ] ); + box.min.multiplyScalar( boxScale ); + box.max.multiplyScalar( boxScale ); + + } + + } else { + + console.warn( 'THREE.GLTFLoader: Missing min/max properties for accessor POSITION.' ); + + return; + + } + + } else { + + return; + + } + + const targets = primitiveDef.targets; + + if ( targets !== undefined ) { + + const maxDisplacement = new Vector3(); + const vector = new Vector3(); + + for ( let i = 0, il = targets.length; i < il; i ++ ) { + + const target = targets[ i ]; + + if ( target.POSITION !== undefined ) { + + const accessor = parser.json.accessors[ target.POSITION ]; + const min = accessor.min; + const max = accessor.max; + + // glTF requires 'min' and 'max', but VRM (which extends glTF) currently ignores that requirement. + + if ( min !== undefined && max !== undefined ) { + + // we need to get max of absolute components because target weight is [-1,1] + vector.setX( Math.max( Math.abs( min[ 0 ] ), Math.abs( max[ 0 ] ) ) ); + vector.setY( Math.max( Math.abs( min[ 1 ] ), Math.abs( max[ 1 ] ) ) ); + vector.setZ( Math.max( Math.abs( min[ 2 ] ), Math.abs( max[ 2 ] ) ) ); + + + if ( accessor.normalized ) { + + const boxScale = getNormalizedComponentScale( WEBGL_COMPONENT_TYPES[ accessor.componentType ] ); + vector.multiplyScalar( boxScale ); + + } + + // Note: this assumes that the sum of all weights is at most 1. This isn't quite correct - it's more conservative + // to assume that each target can have a max weight of 1. However, for some use cases - notably, when morph targets + // are used to implement key-frame animations and as such only two are active at a time - this results in very large + // boxes. So for now we make a box that's sometimes a touch too small but is hopefully mostly of reasonable size. + maxDisplacement.max( vector ); + + } else { + + console.warn( 'THREE.GLTFLoader: Missing min/max properties for accessor POSITION.' ); + + } + + } + + } + + // As per comment above this box isn't conservative, but has a reasonable size for a very large number of morph targets. + box.expandByVector( maxDisplacement ); + + } + + geometry.boundingBox = box; + + const sphere = new Sphere(); + + box.getCenter( sphere.center ); + sphere.radius = box.min.distanceTo( box.max ) / 2; + + geometry.boundingSphere = sphere; + +} + +/** + * @param {BufferGeometry} geometry + * @param {GLTF.Primitive} primitiveDef + * @param {GLTFParser} parser + * @return {Promise} + */ +function addPrimitiveAttributes( geometry, primitiveDef, parser ) { + + const attributes = primitiveDef.attributes; + + const pending = []; + + function assignAttributeAccessor( accessorIndex, attributeName ) { + + return parser.getDependency( 'accessor', accessorIndex ) + .then( function ( accessor ) { + + geometry.setAttribute( attributeName, accessor ); + + } ); + + } + + for ( const gltfAttributeName in attributes ) { + + const threeAttributeName = ATTRIBUTES[ gltfAttributeName ] || gltfAttributeName.toLowerCase(); + + // Skip attributes already provided by e.g. Draco extension. + if ( threeAttributeName in geometry.attributes ) continue; + + pending.push( assignAttributeAccessor( attributes[ gltfAttributeName ], threeAttributeName ) ); + + } + + if ( primitiveDef.indices !== undefined && ! geometry.index ) { + + const accessor = parser.getDependency( 'accessor', primitiveDef.indices ).then( function ( accessor ) { + + geometry.setIndex( accessor ); + + } ); + + pending.push( accessor ); + + } + + if ( ColorManagement.workingColorSpace !== LinearSRGBColorSpace && 'COLOR_0' in attributes ) { + + console.warn( `THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ColorManagement.workingColorSpace}" not supported.` ); + + } + + assignExtrasToUserData( geometry, primitiveDef ); + + computeBounds( geometry, primitiveDef, parser ); + + return Promise.all( pending ).then( function () { + + return primitiveDef.targets !== undefined + ? addMorphTargets( geometry, primitiveDef.targets, parser ) + : geometry; + + } ); + +} + +export { GLTFLoader }; diff --git a/node_modules/three/examples/jsm/loaders/HDRCubeTextureLoader.js b/node_modules/three/examples/jsm/loaders/HDRCubeTextureLoader.js new file mode 100644 index 0000000..7719125 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/HDRCubeTextureLoader.js @@ -0,0 +1,115 @@ +import { + CubeTexture, + DataTexture, + FileLoader, + FloatType, + HalfFloatType, + LinearFilter, + LinearSRGBColorSpace, + Loader +} from 'three'; +import { RGBELoader } from '../loaders/RGBELoader.js'; + +class HDRCubeTextureLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.hdrLoader = new RGBELoader(); + this.type = HalfFloatType; + + } + + load( urls, onLoad, onProgress, onError ) { + + const texture = new CubeTexture(); + + texture.type = this.type; + + switch ( texture.type ) { + + case FloatType: + + texture.colorSpace = LinearSRGBColorSpace; + texture.minFilter = LinearFilter; + texture.magFilter = LinearFilter; + texture.generateMipmaps = false; + break; + + case HalfFloatType: + + texture.colorSpace = LinearSRGBColorSpace; + texture.minFilter = LinearFilter; + texture.magFilter = LinearFilter; + texture.generateMipmaps = false; + break; + + } + + const scope = this; + + let loaded = 0; + + function loadHDRData( i, onLoad, onProgress, onError ) { + + new FileLoader( scope.manager ) + .setPath( scope.path ) + .setResponseType( 'arraybuffer' ) + .setWithCredentials( scope.withCredentials ) + .load( urls[ i ], function ( buffer ) { + + loaded ++; + + const texData = scope.hdrLoader.parse( buffer ); + + if ( ! texData ) return; + + if ( texData.data !== undefined ) { + + const dataTexture = new DataTexture( texData.data, texData.width, texData.height ); + + dataTexture.type = texture.type; + dataTexture.colorSpace = texture.colorSpace; + dataTexture.format = texture.format; + dataTexture.minFilter = texture.minFilter; + dataTexture.magFilter = texture.magFilter; + dataTexture.generateMipmaps = texture.generateMipmaps; + + texture.images[ i ] = dataTexture; + + } + + if ( loaded === 6 ) { + + texture.needsUpdate = true; + if ( onLoad ) onLoad( texture ); + + } + + }, onProgress, onError ); + + } + + for ( let i = 0; i < urls.length; i ++ ) { + + loadHDRData( i, onLoad, onProgress, onError ); + + } + + return texture; + + } + + setDataType( value ) { + + this.type = value; + this.hdrLoader.setDataType( value ); + + return this; + + } + +} + +export { HDRCubeTextureLoader }; diff --git a/node_modules/three/examples/jsm/loaders/IESLoader.js b/node_modules/three/examples/jsm/loaders/IESLoader.js new file mode 100644 index 0000000..f33c625 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/IESLoader.js @@ -0,0 +1,337 @@ +import { + DataTexture, + FileLoader, + FloatType, + RedFormat, + MathUtils, + Loader, + UnsignedByteType, + LinearFilter, + HalfFloatType, + DataUtils +} from 'three'; + +class IESLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.type = HalfFloatType; + + } + + _getIESValues( iesLamp, type ) { + + const width = 360; + const height = 180; + const size = width * height; + + const data = new Array( size ); + + function interpolateCandelaValues( phi, theta ) { + + let phiIndex = 0, thetaIndex = 0; + let startTheta = 0, endTheta = 0, startPhi = 0, endPhi = 0; + + for ( let i = 0; i < iesLamp.numHorAngles - 1; ++ i ) { // numHorAngles = horAngles.length-1 because of extra padding, so this wont cause an out of bounds error + + if ( theta < iesLamp.horAngles[ i + 1 ] || i == iesLamp.numHorAngles - 2 ) { + + thetaIndex = i; + startTheta = iesLamp.horAngles[ i ]; + endTheta = iesLamp.horAngles[ i + 1 ]; + + break; + + } + + } + + for ( let i = 0; i < iesLamp.numVerAngles - 1; ++ i ) { + + if ( phi < iesLamp.verAngles[ i + 1 ] || i == iesLamp.numVerAngles - 2 ) { + + phiIndex = i; + startPhi = iesLamp.verAngles[ i ]; + endPhi = iesLamp.verAngles[ i + 1 ]; + + break; + + } + + } + + const deltaTheta = endTheta - startTheta; + const deltaPhi = endPhi - startPhi; + + if ( deltaPhi === 0 ) // Outside range + return 0; + + const t1 = deltaTheta === 0 ? 0 : ( theta - startTheta ) / deltaTheta; + const t2 = ( phi - startPhi ) / deltaPhi; + + const nextThetaIndex = deltaTheta === 0 ? thetaIndex : thetaIndex + 1; + + const v1 = MathUtils.lerp( iesLamp.candelaValues[ thetaIndex ][ phiIndex ], iesLamp.candelaValues[ nextThetaIndex ][ phiIndex ], t1 ); + const v2 = MathUtils.lerp( iesLamp.candelaValues[ thetaIndex ][ phiIndex + 1 ], iesLamp.candelaValues[ nextThetaIndex ][ phiIndex + 1 ], t1 ); + const v = MathUtils.lerp( v1, v2, t2 ); + + return v; + + } + + const startTheta = iesLamp.horAngles[ 0 ], endTheta = iesLamp.horAngles[ iesLamp.numHorAngles - 1 ]; + + for ( let i = 0; i < size; ++ i ) { + + let theta = i % width; + const phi = Math.floor( i / width ); + + if ( endTheta - startTheta !== 0 && ( theta < startTheta || theta >= endTheta ) ) { // Handle symmetry for hor angles + + theta %= endTheta * 2; + + if ( theta > endTheta ) + theta = endTheta * 2 - theta; + + } + + data[ phi + theta * height ] = interpolateCandelaValues( phi, theta ); + + } + + let result = null; + + if ( type === UnsignedByteType ) result = Uint8Array.from( data.map( v => Math.min( v * 0xFF, 0xFF ) ) ); + else if ( type === HalfFloatType ) result = Uint16Array.from( data.map( v => DataUtils.toHalfFloat( v ) ) ); + else if ( type === FloatType ) result = Float32Array.from( data ); + else console.error( 'IESLoader: Unsupported type:', type ); + + return result; + + } + + load( url, onLoad, onProgress, onError ) { + + const loader = new FileLoader( this.manager ); + loader.setResponseType( 'text' ); + loader.setCrossOrigin( this.crossOrigin ); + loader.setWithCredentials( this.withCredentials ); + loader.setPath( this.path ); + loader.setRequestHeader( this.requestHeader ); + + loader.load( url, text => { + + onLoad( this.parse( text ) ); + + }, onProgress, onError ); + + } + + parse( text ) { + + const type = this.type; + + const iesLamp = new IESLamp( text ); + const data = this._getIESValues( iesLamp, type ); + + const texture = new DataTexture( data, 180, 1, RedFormat, type ); + texture.minFilter = LinearFilter; + texture.magFilter = LinearFilter; + texture.needsUpdate = true; + + return texture; + + } + +} + + +function IESLamp( text ) { + + const _self = this; + + const textArray = text.split( '\n' ); + + let lineNumber = 0; + let line; + + _self.verAngles = [ ]; + _self.horAngles = [ ]; + + _self.candelaValues = [ ]; + + _self.tiltData = { }; + _self.tiltData.angles = [ ]; + _self.tiltData.mulFactors = [ ]; + + function textToArray( text ) { + + text = text.replace( /^\s+|\s+$/g, '' ); // remove leading or trailing spaces + text = text.replace( /,/g, ' ' ); // replace commas with spaces + text = text.replace( /\s\s+/g, ' ' ); // replace white space/tabs etc by single whitespace + + const array = text.split( ' ' ); + + return array; + + } + + function readArray( count, array ) { + + while ( true ) { + + const line = textArray[ lineNumber ++ ]; + const lineData = textToArray( line ); + + for ( let i = 0; i < lineData.length; ++ i ) { + + array.push( Number( lineData[ i ] ) ); + + } + + if ( array.length === count ) + break; + + } + + } + + function readTilt() { + + let line = textArray[ lineNumber ++ ]; + let lineData = textToArray( line ); + + _self.tiltData.lampToLumGeometry = Number( lineData[ 0 ] ); + + line = textArray[ lineNumber ++ ]; + lineData = textToArray( line ); + + _self.tiltData.numAngles = Number( lineData[ 0 ] ); + + readArray( _self.tiltData.numAngles, _self.tiltData.angles ); + readArray( _self.tiltData.numAngles, _self.tiltData.mulFactors ); + + } + + function readLampValues() { + + const values = [ ]; + readArray( 10, values ); + + _self.count = Number( values[ 0 ] ); + _self.lumens = Number( values[ 1 ] ); + _self.multiplier = Number( values[ 2 ] ); + _self.numVerAngles = Number( values[ 3 ] ); + _self.numHorAngles = Number( values[ 4 ] ); + _self.gonioType = Number( values[ 5 ] ); + _self.units = Number( values[ 6 ] ); + _self.width = Number( values[ 7 ] ); + _self.length = Number( values[ 8 ] ); + _self.height = Number( values[ 9 ] ); + + } + + function readLampFactors() { + + const values = [ ]; + readArray( 3, values ); + + _self.ballFactor = Number( values[ 0 ] ); + _self.blpFactor = Number( values[ 1 ] ); + _self.inputWatts = Number( values[ 2 ] ); + + } + + while ( true ) { + + line = textArray[ lineNumber ++ ]; + + if ( line.includes( 'TILT' ) ) { + + break; + + } + + } + + if ( ! line.includes( 'NONE' ) ) { + + if ( line.includes( 'INCLUDE' ) ) { + + readTilt(); + + } else { + + // TODO:: Read tilt data from a file + + } + + } + + readLampValues(); + + readLampFactors(); + + // Initialize candela value array + for ( let i = 0; i < _self.numHorAngles; ++ i ) { + + _self.candelaValues.push( [ ] ); + + } + + // Parse Angles + readArray( _self.numVerAngles, _self.verAngles ); + readArray( _self.numHorAngles, _self.horAngles ); + + // Parse Candela values + for ( let i = 0; i < _self.numHorAngles; ++ i ) { + + readArray( _self.numVerAngles, _self.candelaValues[ i ] ); + + } + + // Calculate actual candela values, and normalize. + for ( let i = 0; i < _self.numHorAngles; ++ i ) { + + for ( let j = 0; j < _self.numVerAngles; ++ j ) { + + _self.candelaValues[ i ][ j ] *= _self.candelaValues[ i ][ j ] * _self.multiplier + * _self.ballFactor * _self.blpFactor; + + } + + } + + let maxVal = - 1; + for ( let i = 0; i < _self.numHorAngles; ++ i ) { + + for ( let j = 0; j < _self.numVerAngles; ++ j ) { + + const value = _self.candelaValues[ i ][ j ]; + maxVal = maxVal < value ? value : maxVal; + + } + + } + + const bNormalize = true; + if ( bNormalize && maxVal > 0 ) { + + for ( let i = 0; i < _self.numHorAngles; ++ i ) { + + for ( let j = 0; j < _self.numVerAngles; ++ j ) { + + _self.candelaValues[ i ][ j ] /= maxVal; + + } + + } + + } + +} + + +export { IESLoader }; diff --git a/node_modules/three/examples/jsm/loaders/KMZLoader.js b/node_modules/three/examples/jsm/loaders/KMZLoader.js new file mode 100644 index 0000000..6f28f36 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/KMZLoader.js @@ -0,0 +1,130 @@ +import { + FileLoader, + Group, + Loader, + LoadingManager +} from 'three'; +import { ColladaLoader } from '../loaders/ColladaLoader.js'; +import * as fflate from '../libs/fflate.module.js'; + +class KMZLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( text ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( data ) { + + function findFile( url ) { + + for ( const path in zip ) { + + if ( path.slice( - url.length ) === url ) { + + return zip[ path ]; + + } + + } + + } + + const manager = new LoadingManager(); + manager.setURLModifier( function ( url ) { + + const image = findFile( url ); + + if ( image ) { + + console.log( 'Loading', url ); + + const blob = new Blob( [ image.buffer ], { type: 'application/octet-stream' } ); + return URL.createObjectURL( blob ); + + } + + return url; + + } ); + + // + + const zip = fflate.unzipSync( new Uint8Array( data ) ); + + if ( zip[ 'doc.kml' ] ) { + + const xml = new DOMParser().parseFromString( fflate.strFromU8( zip[ 'doc.kml' ] ), 'application/xml' ); + + const model = xml.querySelector( 'Placemark Model Link href' ); + + if ( model ) { + + const loader = new ColladaLoader( manager ); + return loader.parse( fflate.strFromU8( zip[ model.textContent ] ) ); + + } + + } else { + + console.warn( 'KMZLoader: Missing doc.kml file.' ); + + for ( const path in zip ) { + + const extension = path.split( '.' ).pop().toLowerCase(); + + if ( extension === 'dae' ) { + + const loader = new ColladaLoader( manager ); + return loader.parse( fflate.strFromU8( zip[ path ] ) ); + + } + + } + + } + + console.error( 'KMZLoader: Couldn\'t find .dae file.' ); + return { scene: new Group() }; + + } + +} + +export { KMZLoader }; diff --git a/node_modules/three/examples/jsm/loaders/KTX2Loader.js b/node_modules/three/examples/jsm/loaders/KTX2Loader.js new file mode 100644 index 0000000..0e60b2c --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/KTX2Loader.js @@ -0,0 +1,925 @@ +/** + * Loader for KTX 2.0 GPU Texture containers. + * + * KTX 2.0 is a container format for various GPU texture formats. The loader + * supports Basis Universal GPU textures, which can be quickly transcoded to + * a wide variety of GPU texture compression formats, as well as some + * uncompressed DataTexture and Data3DTexture formats. + * + * References: + * - KTX: http://github.khronos.org/KTX-Specification/ + * - DFD: https://www.khronos.org/registry/DataFormat/specs/1.3/dataformat.1.3.html#basicdescriptor + */ + +import { + CompressedTexture, + CompressedArrayTexture, + CompressedCubeTexture, + Data3DTexture, + DataTexture, + DisplayP3ColorSpace, + FileLoader, + FloatType, + HalfFloatType, + NoColorSpace, + LinearFilter, + LinearMipmapLinearFilter, + LinearDisplayP3ColorSpace, + LinearSRGBColorSpace, + Loader, + RedFormat, + RGB_ETC1_Format, + RGB_ETC2_Format, + RGB_PVRTC_4BPPV1_Format, + RGBA_ASTC_4x4_Format, + RGBA_ASTC_6x6_Format, + RGBA_BPTC_Format, + RGBA_ETC2_EAC_Format, + RGBA_PVRTC_4BPPV1_Format, + RGBA_S3TC_DXT5_Format, + RGBA_S3TC_DXT1_Format, + RGBAFormat, + RGFormat, + SRGBColorSpace, + UnsignedByteType, +} from 'three'; +import { WorkerPool } from '../utils/WorkerPool.js'; +import { + read, + KHR_DF_FLAG_ALPHA_PREMULTIPLIED, + KHR_DF_TRANSFER_SRGB, + KHR_SUPERCOMPRESSION_NONE, + KHR_SUPERCOMPRESSION_ZSTD, + VK_FORMAT_UNDEFINED, + VK_FORMAT_R16_SFLOAT, + VK_FORMAT_R16G16_SFLOAT, + VK_FORMAT_R16G16B16A16_SFLOAT, + VK_FORMAT_R32_SFLOAT, + VK_FORMAT_R32G32_SFLOAT, + VK_FORMAT_R32G32B32A32_SFLOAT, + VK_FORMAT_R8_SRGB, + VK_FORMAT_R8_UNORM, + VK_FORMAT_R8G8_SRGB, + VK_FORMAT_R8G8_UNORM, + VK_FORMAT_R8G8B8A8_SRGB, + VK_FORMAT_R8G8B8A8_UNORM, + VK_FORMAT_ASTC_6x6_SRGB_BLOCK, + VK_FORMAT_ASTC_6x6_UNORM_BLOCK, + KHR_DF_PRIMARIES_UNSPECIFIED, + KHR_DF_PRIMARIES_BT709, + KHR_DF_PRIMARIES_DISPLAYP3 +} from '../libs/ktx-parse.module.js'; +import { ZSTDDecoder } from '../libs/zstddec.module.js'; + +const _taskCache = new WeakMap(); + +let _activeLoaders = 0; + +let _zstd; + +class KTX2Loader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.transcoderPath = ''; + this.transcoderBinary = null; + this.transcoderPending = null; + + this.workerPool = new WorkerPool(); + this.workerSourceURL = ''; + this.workerConfig = null; + + if ( typeof MSC_TRANSCODER !== 'undefined' ) { + + console.warn( + + 'THREE.KTX2Loader: Please update to latest "basis_transcoder".' + + ' "msc_basis_transcoder" is no longer supported in three.js r125+.' + + ); + + } + + } + + setTranscoderPath( path ) { + + this.transcoderPath = path; + + return this; + + } + + setWorkerLimit( num ) { + + this.workerPool.setWorkerLimit( num ); + + return this; + + } + + async detectSupportAsync( renderer ) { + + this.workerConfig = { + astcSupported: await renderer.hasFeatureAsync( 'texture-compression-astc' ), + etc1Supported: await renderer.hasFeatureAsync( 'texture-compression-etc1' ), + etc2Supported: await renderer.hasFeatureAsync( 'texture-compression-etc2' ), + dxtSupported: await renderer.hasFeatureAsync( 'texture-compression-bc' ), + bptcSupported: await renderer.hasFeatureAsync( 'texture-compression-bptc' ), + pvrtcSupported: await renderer.hasFeatureAsync( 'texture-compression-pvrtc' ) + }; + + return this; + + } + + detectSupport( renderer ) { + + if ( renderer.isWebGPURenderer === true ) { + + this.workerConfig = { + astcSupported: renderer.hasFeature( 'texture-compression-astc' ), + etc1Supported: renderer.hasFeature( 'texture-compression-etc1' ), + etc2Supported: renderer.hasFeature( 'texture-compression-etc2' ), + dxtSupported: renderer.hasFeature( 'texture-compression-bc' ), + bptcSupported: renderer.hasFeature( 'texture-compression-bptc' ), + pvrtcSupported: renderer.hasFeature( 'texture-compression-pvrtc' ) + }; + + } else { + + this.workerConfig = { + astcSupported: renderer.extensions.has( 'WEBGL_compressed_texture_astc' ), + etc1Supported: renderer.extensions.has( 'WEBGL_compressed_texture_etc1' ), + etc2Supported: renderer.extensions.has( 'WEBGL_compressed_texture_etc' ), + dxtSupported: renderer.extensions.has( 'WEBGL_compressed_texture_s3tc' ), + bptcSupported: renderer.extensions.has( 'EXT_texture_compression_bptc' ), + pvrtcSupported: renderer.extensions.has( 'WEBGL_compressed_texture_pvrtc' ) + || renderer.extensions.has( 'WEBKIT_WEBGL_compressed_texture_pvrtc' ) + }; + + } + + return this; + + } + + init() { + + if ( ! this.transcoderPending ) { + + // Load transcoder wrapper. + const jsLoader = new FileLoader( this.manager ); + jsLoader.setPath( this.transcoderPath ); + jsLoader.setWithCredentials( this.withCredentials ); + const jsContent = jsLoader.loadAsync( 'basis_transcoder.js' ); + + // Load transcoder WASM binary. + const binaryLoader = new FileLoader( this.manager ); + binaryLoader.setPath( this.transcoderPath ); + binaryLoader.setResponseType( 'arraybuffer' ); + binaryLoader.setWithCredentials( this.withCredentials ); + const binaryContent = binaryLoader.loadAsync( 'basis_transcoder.wasm' ); + + this.transcoderPending = Promise.all( [ jsContent, binaryContent ] ) + .then( ( [ jsContent, binaryContent ] ) => { + + const fn = KTX2Loader.BasisWorker.toString(); + + const body = [ + '/* constants */', + 'let _EngineFormat = ' + JSON.stringify( KTX2Loader.EngineFormat ), + 'let _TranscoderFormat = ' + JSON.stringify( KTX2Loader.TranscoderFormat ), + 'let _BasisFormat = ' + JSON.stringify( KTX2Loader.BasisFormat ), + '/* basis_transcoder.js */', + jsContent, + '/* worker */', + fn.substring( fn.indexOf( '{' ) + 1, fn.lastIndexOf( '}' ) ) + ].join( '\n' ); + + this.workerSourceURL = URL.createObjectURL( new Blob( [ body ] ) ); + this.transcoderBinary = binaryContent; + + this.workerPool.setWorkerCreator( () => { + + const worker = new Worker( this.workerSourceURL ); + const transcoderBinary = this.transcoderBinary.slice( 0 ); + + worker.postMessage( { type: 'init', config: this.workerConfig, transcoderBinary }, [ transcoderBinary ] ); + + return worker; + + } ); + + } ); + + if ( _activeLoaders > 0 ) { + + // Each instance loads a transcoder and allocates workers, increasing network and memory cost. + + console.warn( + + 'THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues.' + + ' Use a single KTX2Loader instance, or call .dispose() on old instances.' + + ); + + } + + _activeLoaders ++; + + } + + return this.transcoderPending; + + } + + load( url, onLoad, onProgress, onError ) { + + if ( this.workerConfig === null ) { + + throw new Error( 'THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.' ); + + } + + const loader = new FileLoader( this.manager ); + + loader.setResponseType( 'arraybuffer' ); + loader.setWithCredentials( this.withCredentials ); + + loader.load( url, ( buffer ) => { + + // Check for an existing task using this buffer. A transferred buffer cannot be transferred + // again from this thread. + if ( _taskCache.has( buffer ) ) { + + const cachedTask = _taskCache.get( buffer ); + + return cachedTask.promise.then( onLoad ).catch( onError ); + + } + + this._createTexture( buffer ) + .then( ( texture ) => onLoad ? onLoad( texture ) : null ) + .catch( onError ); + + }, onProgress, onError ); + + } + + _createTextureFrom( transcodeResult, container ) { + + const { faces, width, height, format, type, error, dfdFlags } = transcodeResult; + + if ( type === 'error' ) return Promise.reject( error ); + + let texture; + + if ( container.faceCount === 6 ) { + + texture = new CompressedCubeTexture( faces, format, UnsignedByteType ); + + } else { + + const mipmaps = faces[ 0 ].mipmaps; + + texture = container.layerCount > 1 + ? new CompressedArrayTexture( mipmaps, width, height, container.layerCount, format, UnsignedByteType ) + : new CompressedTexture( mipmaps, width, height, format, UnsignedByteType ); + + } + + texture.minFilter = faces[ 0 ].mipmaps.length === 1 ? LinearFilter : LinearMipmapLinearFilter; + texture.magFilter = LinearFilter; + texture.generateMipmaps = false; + + texture.needsUpdate = true; + texture.colorSpace = parseColorSpace( container ); + texture.premultiplyAlpha = !! ( dfdFlags & KHR_DF_FLAG_ALPHA_PREMULTIPLIED ); + + return texture; + + } + + /** + * @param {ArrayBuffer} buffer + * @param {object?} config + * @return {Promise} + */ + async _createTexture( buffer, config = {} ) { + + const container = read( new Uint8Array( buffer ) ); + + if ( container.vkFormat !== VK_FORMAT_UNDEFINED ) { + + return createRawTexture( container ); + + } + + // + const taskConfig = config; + const texturePending = this.init().then( () => { + + return this.workerPool.postMessage( { type: 'transcode', buffer, taskConfig: taskConfig }, [ buffer ] ); + + } ).then( ( e ) => this._createTextureFrom( e.data, container ) ); + + // Cache the task result. + _taskCache.set( buffer, { promise: texturePending } ); + + return texturePending; + + } + + dispose() { + + this.workerPool.dispose(); + if ( this.workerSourceURL ) URL.revokeObjectURL( this.workerSourceURL ); + + _activeLoaders --; + + return this; + + } + +} + + +/* CONSTANTS */ + +KTX2Loader.BasisFormat = { + ETC1S: 0, + UASTC_4x4: 1, +}; + +KTX2Loader.TranscoderFormat = { + ETC1: 0, + ETC2: 1, + BC1: 2, + BC3: 3, + BC4: 4, + BC5: 5, + BC7_M6_OPAQUE_ONLY: 6, + BC7_M5: 7, + PVRTC1_4_RGB: 8, + PVRTC1_4_RGBA: 9, + ASTC_4x4: 10, + ATC_RGB: 11, + ATC_RGBA_INTERPOLATED_ALPHA: 12, + RGBA32: 13, + RGB565: 14, + BGR565: 15, + RGBA4444: 16, +}; + +KTX2Loader.EngineFormat = { + RGBAFormat: RGBAFormat, + RGBA_ASTC_4x4_Format: RGBA_ASTC_4x4_Format, + RGBA_BPTC_Format: RGBA_BPTC_Format, + RGBA_ETC2_EAC_Format: RGBA_ETC2_EAC_Format, + RGBA_PVRTC_4BPPV1_Format: RGBA_PVRTC_4BPPV1_Format, + RGBA_S3TC_DXT5_Format: RGBA_S3TC_DXT5_Format, + RGB_ETC1_Format: RGB_ETC1_Format, + RGB_ETC2_Format: RGB_ETC2_Format, + RGB_PVRTC_4BPPV1_Format: RGB_PVRTC_4BPPV1_Format, + RGBA_S3TC_DXT1_Format: RGBA_S3TC_DXT1_Format, +}; + + +/* WEB WORKER */ + +KTX2Loader.BasisWorker = function () { + + let config; + let transcoderPending; + let BasisModule; + + const EngineFormat = _EngineFormat; // eslint-disable-line no-undef + const TranscoderFormat = _TranscoderFormat; // eslint-disable-line no-undef + const BasisFormat = _BasisFormat; // eslint-disable-line no-undef + + self.addEventListener( 'message', function ( e ) { + + const message = e.data; + + switch ( message.type ) { + + case 'init': + config = message.config; + init( message.transcoderBinary ); + break; + + case 'transcode': + transcoderPending.then( () => { + + try { + + const { faces, buffers, width, height, hasAlpha, format, dfdFlags } = transcode( message.buffer ); + + self.postMessage( { type: 'transcode', id: message.id, faces, width, height, hasAlpha, format, dfdFlags }, buffers ); + + } catch ( error ) { + + console.error( error ); + + self.postMessage( { type: 'error', id: message.id, error: error.message } ); + + } + + } ); + break; + + } + + } ); + + function init( wasmBinary ) { + + transcoderPending = new Promise( ( resolve ) => { + + BasisModule = { wasmBinary, onRuntimeInitialized: resolve }; + BASIS( BasisModule ); // eslint-disable-line no-undef + + } ).then( () => { + + BasisModule.initializeBasis(); + + if ( BasisModule.KTX2File === undefined ) { + + console.warn( 'THREE.KTX2Loader: Please update Basis Universal transcoder.' ); + + } + + } ); + + } + + function transcode( buffer ) { + + const ktx2File = new BasisModule.KTX2File( new Uint8Array( buffer ) ); + + function cleanup() { + + ktx2File.close(); + ktx2File.delete(); + + } + + if ( ! ktx2File.isValid() ) { + + cleanup(); + throw new Error( 'THREE.KTX2Loader: Invalid or unsupported .ktx2 file' ); + + } + + const basisFormat = ktx2File.isUASTC() ? BasisFormat.UASTC_4x4 : BasisFormat.ETC1S; + const width = ktx2File.getWidth(); + const height = ktx2File.getHeight(); + const layerCount = ktx2File.getLayers() || 1; + const levelCount = ktx2File.getLevels(); + const faceCount = ktx2File.getFaces(); + const hasAlpha = ktx2File.getHasAlpha(); + const dfdFlags = ktx2File.getDFDFlags(); + + const { transcoderFormat, engineFormat } = getTranscoderFormat( basisFormat, width, height, hasAlpha ); + + if ( ! width || ! height || ! levelCount ) { + + cleanup(); + throw new Error( 'THREE.KTX2Loader: Invalid texture' ); + + } + + if ( ! ktx2File.startTranscoding() ) { + + cleanup(); + throw new Error( 'THREE.KTX2Loader: .startTranscoding failed' ); + + } + + const faces = []; + const buffers = []; + + for ( let face = 0; face < faceCount; face ++ ) { + + const mipmaps = []; + + for ( let mip = 0; mip < levelCount; mip ++ ) { + + const layerMips = []; + + let mipWidth, mipHeight; + + for ( let layer = 0; layer < layerCount; layer ++ ) { + + const levelInfo = ktx2File.getImageLevelInfo( mip, layer, face ); + + if ( face === 0 && mip === 0 && layer === 0 && ( levelInfo.origWidth % 4 !== 0 || levelInfo.origHeight % 4 !== 0 ) ) { + + console.warn( 'THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions.' ); + + } + + if ( levelCount > 1 ) { + + mipWidth = levelInfo.origWidth; + mipHeight = levelInfo.origHeight; + + } else { + + // Handles non-multiple-of-four dimensions in textures without mipmaps. Textures with + // mipmaps must use multiple-of-four dimensions, for some texture formats and APIs. + // See mrdoob/three.js#25908. + mipWidth = levelInfo.width; + mipHeight = levelInfo.height; + + } + + const dst = new Uint8Array( ktx2File.getImageTranscodedSizeInBytes( mip, layer, 0, transcoderFormat ) ); + const status = ktx2File.transcodeImage( dst, mip, layer, face, transcoderFormat, 0, - 1, - 1 ); + + if ( ! status ) { + + cleanup(); + throw new Error( 'THREE.KTX2Loader: .transcodeImage failed.' ); + + } + + layerMips.push( dst ); + + } + + const mipData = concat( layerMips ); + + mipmaps.push( { data: mipData, width: mipWidth, height: mipHeight } ); + buffers.push( mipData.buffer ); + + } + + faces.push( { mipmaps, width, height, format: engineFormat } ); + + } + + cleanup(); + + return { faces, buffers, width, height, hasAlpha, format: engineFormat, dfdFlags }; + + } + + // + + // Optimal choice of a transcoder target format depends on the Basis format (ETC1S or UASTC), + // device capabilities, and texture dimensions. The list below ranks the formats separately + // for ETC1S and UASTC. + // + // In some cases, transcoding UASTC to RGBA32 might be preferred for higher quality (at + // significant memory cost) compared to ETC1/2, BC1/3, and PVRTC. The transcoder currently + // chooses RGBA32 only as a last resort and does not expose that option to the caller. + const FORMAT_OPTIONS = [ + { + if: 'astcSupported', + basisFormat: [ BasisFormat.UASTC_4x4 ], + transcoderFormat: [ TranscoderFormat.ASTC_4x4, TranscoderFormat.ASTC_4x4 ], + engineFormat: [ EngineFormat.RGBA_ASTC_4x4_Format, EngineFormat.RGBA_ASTC_4x4_Format ], + priorityETC1S: Infinity, + priorityUASTC: 1, + needsPowerOfTwo: false, + }, + { + if: 'bptcSupported', + basisFormat: [ BasisFormat.ETC1S, BasisFormat.UASTC_4x4 ], + transcoderFormat: [ TranscoderFormat.BC7_M5, TranscoderFormat.BC7_M5 ], + engineFormat: [ EngineFormat.RGBA_BPTC_Format, EngineFormat.RGBA_BPTC_Format ], + priorityETC1S: 3, + priorityUASTC: 2, + needsPowerOfTwo: false, + }, + { + if: 'dxtSupported', + basisFormat: [ BasisFormat.ETC1S, BasisFormat.UASTC_4x4 ], + transcoderFormat: [ TranscoderFormat.BC1, TranscoderFormat.BC3 ], + engineFormat: [ EngineFormat.RGBA_S3TC_DXT1_Format, EngineFormat.RGBA_S3TC_DXT5_Format ], + priorityETC1S: 4, + priorityUASTC: 5, + needsPowerOfTwo: false, + }, + { + if: 'etc2Supported', + basisFormat: [ BasisFormat.ETC1S, BasisFormat.UASTC_4x4 ], + transcoderFormat: [ TranscoderFormat.ETC1, TranscoderFormat.ETC2 ], + engineFormat: [ EngineFormat.RGB_ETC2_Format, EngineFormat.RGBA_ETC2_EAC_Format ], + priorityETC1S: 1, + priorityUASTC: 3, + needsPowerOfTwo: false, + }, + { + if: 'etc1Supported', + basisFormat: [ BasisFormat.ETC1S, BasisFormat.UASTC_4x4 ], + transcoderFormat: [ TranscoderFormat.ETC1 ], + engineFormat: [ EngineFormat.RGB_ETC1_Format ], + priorityETC1S: 2, + priorityUASTC: 4, + needsPowerOfTwo: false, + }, + { + if: 'pvrtcSupported', + basisFormat: [ BasisFormat.ETC1S, BasisFormat.UASTC_4x4 ], + transcoderFormat: [ TranscoderFormat.PVRTC1_4_RGB, TranscoderFormat.PVRTC1_4_RGBA ], + engineFormat: [ EngineFormat.RGB_PVRTC_4BPPV1_Format, EngineFormat.RGBA_PVRTC_4BPPV1_Format ], + priorityETC1S: 5, + priorityUASTC: 6, + needsPowerOfTwo: true, + }, + ]; + + const ETC1S_OPTIONS = FORMAT_OPTIONS.sort( function ( a, b ) { + + return a.priorityETC1S - b.priorityETC1S; + + } ); + const UASTC_OPTIONS = FORMAT_OPTIONS.sort( function ( a, b ) { + + return a.priorityUASTC - b.priorityUASTC; + + } ); + + function getTranscoderFormat( basisFormat, width, height, hasAlpha ) { + + let transcoderFormat; + let engineFormat; + + const options = basisFormat === BasisFormat.ETC1S ? ETC1S_OPTIONS : UASTC_OPTIONS; + + for ( let i = 0; i < options.length; i ++ ) { + + const opt = options[ i ]; + + if ( ! config[ opt.if ] ) continue; + if ( ! opt.basisFormat.includes( basisFormat ) ) continue; + if ( hasAlpha && opt.transcoderFormat.length < 2 ) continue; + if ( opt.needsPowerOfTwo && ! ( isPowerOfTwo( width ) && isPowerOfTwo( height ) ) ) continue; + + transcoderFormat = opt.transcoderFormat[ hasAlpha ? 1 : 0 ]; + engineFormat = opt.engineFormat[ hasAlpha ? 1 : 0 ]; + + return { transcoderFormat, engineFormat }; + + } + + console.warn( 'THREE.KTX2Loader: No suitable compressed texture format found. Decoding to RGBA32.' ); + + transcoderFormat = TranscoderFormat.RGBA32; + engineFormat = EngineFormat.RGBAFormat; + + return { transcoderFormat, engineFormat }; + + } + + function isPowerOfTwo( value ) { + + if ( value <= 2 ) return true; + + return ( value & ( value - 1 ) ) === 0 && value !== 0; + + } + + /** Concatenates N byte arrays. */ + function concat( arrays ) { + + if ( arrays.length === 1 ) return arrays[ 0 ]; + + let totalByteLength = 0; + + for ( let i = 0; i < arrays.length; i ++ ) { + + const array = arrays[ i ]; + totalByteLength += array.byteLength; + + } + + const result = new Uint8Array( totalByteLength ); + + let byteOffset = 0; + + for ( let i = 0; i < arrays.length; i ++ ) { + + const array = arrays[ i ]; + result.set( array, byteOffset ); + + byteOffset += array.byteLength; + + } + + return result; + + } + +}; + +// +// Parsing for non-Basis textures. These textures are may have supercompression +// like Zstd, but they do not require transcoding. + +const UNCOMPRESSED_FORMATS = new Set( [ RGBAFormat, RGFormat, RedFormat ] ); + +const FORMAT_MAP = { + + [ VK_FORMAT_R32G32B32A32_SFLOAT ]: RGBAFormat, + [ VK_FORMAT_R16G16B16A16_SFLOAT ]: RGBAFormat, + [ VK_FORMAT_R8G8B8A8_UNORM ]: RGBAFormat, + [ VK_FORMAT_R8G8B8A8_SRGB ]: RGBAFormat, + + [ VK_FORMAT_R32G32_SFLOAT ]: RGFormat, + [ VK_FORMAT_R16G16_SFLOAT ]: RGFormat, + [ VK_FORMAT_R8G8_UNORM ]: RGFormat, + [ VK_FORMAT_R8G8_SRGB ]: RGFormat, + + [ VK_FORMAT_R32_SFLOAT ]: RedFormat, + [ VK_FORMAT_R16_SFLOAT ]: RedFormat, + [ VK_FORMAT_R8_SRGB ]: RedFormat, + [ VK_FORMAT_R8_UNORM ]: RedFormat, + + [ VK_FORMAT_ASTC_6x6_SRGB_BLOCK ]: RGBA_ASTC_6x6_Format, + [ VK_FORMAT_ASTC_6x6_UNORM_BLOCK ]: RGBA_ASTC_6x6_Format, + +}; + +const TYPE_MAP = { + + [ VK_FORMAT_R32G32B32A32_SFLOAT ]: FloatType, + [ VK_FORMAT_R16G16B16A16_SFLOAT ]: HalfFloatType, + [ VK_FORMAT_R8G8B8A8_UNORM ]: UnsignedByteType, + [ VK_FORMAT_R8G8B8A8_SRGB ]: UnsignedByteType, + + [ VK_FORMAT_R32G32_SFLOAT ]: FloatType, + [ VK_FORMAT_R16G16_SFLOAT ]: HalfFloatType, + [ VK_FORMAT_R8G8_UNORM ]: UnsignedByteType, + [ VK_FORMAT_R8G8_SRGB ]: UnsignedByteType, + + [ VK_FORMAT_R32_SFLOAT ]: FloatType, + [ VK_FORMAT_R16_SFLOAT ]: HalfFloatType, + [ VK_FORMAT_R8_SRGB ]: UnsignedByteType, + [ VK_FORMAT_R8_UNORM ]: UnsignedByteType, + + [ VK_FORMAT_ASTC_6x6_SRGB_BLOCK ]: UnsignedByteType, + [ VK_FORMAT_ASTC_6x6_UNORM_BLOCK ]: UnsignedByteType, + +}; + +async function createRawTexture( container ) { + + const { vkFormat } = container; + + if ( FORMAT_MAP[ vkFormat ] === undefined ) { + + throw new Error( 'THREE.KTX2Loader: Unsupported vkFormat.' ); + + } + + // + + let zstd; + + if ( container.supercompressionScheme === KHR_SUPERCOMPRESSION_ZSTD ) { + + if ( ! _zstd ) { + + _zstd = new Promise( async ( resolve ) => { + + const zstd = new ZSTDDecoder(); + await zstd.init(); + resolve( zstd ); + + } ); + + } + + zstd = await _zstd; + + } + + // + + const mipmaps = []; + + + for ( let levelIndex = 0; levelIndex < container.levels.length; levelIndex ++ ) { + + const levelWidth = Math.max( 1, container.pixelWidth >> levelIndex ); + const levelHeight = Math.max( 1, container.pixelHeight >> levelIndex ); + const levelDepth = container.pixelDepth ? Math.max( 1, container.pixelDepth >> levelIndex ) : 0; + + const level = container.levels[ levelIndex ]; + + let levelData; + + if ( container.supercompressionScheme === KHR_SUPERCOMPRESSION_NONE ) { + + levelData = level.levelData; + + } else if ( container.supercompressionScheme === KHR_SUPERCOMPRESSION_ZSTD ) { + + levelData = zstd.decode( level.levelData, level.uncompressedByteLength ); + + } else { + + throw new Error( 'THREE.KTX2Loader: Unsupported supercompressionScheme.' ); + + } + + let data; + + if ( TYPE_MAP[ vkFormat ] === FloatType ) { + + data = new Float32Array( + + levelData.buffer, + levelData.byteOffset, + levelData.byteLength / Float32Array.BYTES_PER_ELEMENT + + ); + + } else if ( TYPE_MAP[ vkFormat ] === HalfFloatType ) { + + data = new Uint16Array( + + levelData.buffer, + levelData.byteOffset, + levelData.byteLength / Uint16Array.BYTES_PER_ELEMENT + + ); + + } else { + + data = levelData; + + } + + mipmaps.push( { + + data: data, + width: levelWidth, + height: levelHeight, + depth: levelDepth, + + } ); + + } + + let texture; + + if ( UNCOMPRESSED_FORMATS.has( FORMAT_MAP[ vkFormat ] ) ) { + + texture = container.pixelDepth === 0 + ? new DataTexture( mipmaps[ 0 ].data, container.pixelWidth, container.pixelHeight ) + : new Data3DTexture( mipmaps[ 0 ].data, container.pixelWidth, container.pixelHeight, container.pixelDepth ); + + } else { + + if ( container.pixelDepth > 0 ) throw new Error( 'THREE.KTX2Loader: Unsupported pixelDepth.' ); + + texture = new CompressedTexture( mipmaps, container.pixelWidth, container.pixelHeight ); + + } + + texture.mipmaps = mipmaps; + + texture.type = TYPE_MAP[ vkFormat ]; + texture.format = FORMAT_MAP[ vkFormat ]; + texture.colorSpace = parseColorSpace( container ); + texture.needsUpdate = true; + + // + + return Promise.resolve( texture ); + +} + +function parseColorSpace( container ) { + + const dfd = container.dataFormatDescriptor[ 0 ]; + + if ( dfd.colorPrimaries === KHR_DF_PRIMARIES_BT709 ) { + + return dfd.transferFunction === KHR_DF_TRANSFER_SRGB ? SRGBColorSpace : LinearSRGBColorSpace; + + } else if ( dfd.colorPrimaries === KHR_DF_PRIMARIES_DISPLAYP3 ) { + + return dfd.transferFunction === KHR_DF_TRANSFER_SRGB ? DisplayP3ColorSpace : LinearDisplayP3ColorSpace; + + } else if ( dfd.colorPrimaries === KHR_DF_PRIMARIES_UNSPECIFIED ) { + + return NoColorSpace; + + } else { + + console.warn( `THREE.KTX2Loader: Unsupported color primaries, "${ dfd.colorPrimaries }"` ); + return NoColorSpace; + + } + +} + +export { KTX2Loader }; diff --git a/node_modules/three/examples/jsm/loaders/KTXLoader.js b/node_modules/three/examples/jsm/loaders/KTXLoader.js new file mode 100644 index 0000000..4e4e1c1 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/KTXLoader.js @@ -0,0 +1,176 @@ +import { + CompressedTextureLoader +} from 'three'; + +/** + * for description see https://www.khronos.org/opengles/sdk/tools/KTX/ + * for file layout see https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/ + * + * ported from https://github.com/BabylonJS/Babylon.js/blob/master/src/Misc/khronosTextureContainer.ts + */ + + +class KTXLoader extends CompressedTextureLoader { + + constructor( manager ) { + + super( manager ); + + } + + parse( buffer, loadMipmaps ) { + + const ktx = new KhronosTextureContainer( buffer, 1 ); + + return { + mipmaps: ktx.mipmaps( loadMipmaps ), + width: ktx.pixelWidth, + height: ktx.pixelHeight, + format: ktx.glInternalFormat, + isCubemap: ktx.numberOfFaces === 6, + mipmapCount: ktx.numberOfMipmapLevels + }; + + } + +} + + +const HEADER_LEN = 12 + ( 13 * 4 ); // identifier + header elements (not including key value meta-data pairs) +// load types +const COMPRESSED_2D = 0; // uses a gl.compressedTexImage2D() +//const COMPRESSED_3D = 1; // uses a gl.compressedTexImage3D() +//const TEX_2D = 2; // uses a gl.texImage2D() +//const TEX_3D = 3; // uses a gl.texImage3D() + +class KhronosTextureContainer { + + /** + * @param {ArrayBuffer} arrayBuffer- contents of the KTX container file + * @param {number} facesExpected- should be either 1 or 6, based whether a cube texture or or + * @param {boolean} threeDExpected- provision for indicating that data should be a 3D texture, not implemented + * @param {boolean} textureArrayExpected- provision for indicating that data should be a texture array, not implemented + */ + constructor( arrayBuffer, facesExpected /*, threeDExpected, textureArrayExpected */ ) { + + this.arrayBuffer = arrayBuffer; + + // Test that it is a ktx formatted file, based on the first 12 bytes, character representation is: + // '´', 'K', 'T', 'X', ' ', '1', '1', 'ª', '\r', '\n', '\x1A', '\n' + // 0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A + const identifier = new Uint8Array( this.arrayBuffer, 0, 12 ); + if ( identifier[ 0 ] !== 0xAB || + identifier[ 1 ] !== 0x4B || + identifier[ 2 ] !== 0x54 || + identifier[ 3 ] !== 0x58 || + identifier[ 4 ] !== 0x20 || + identifier[ 5 ] !== 0x31 || + identifier[ 6 ] !== 0x31 || + identifier[ 7 ] !== 0xBB || + identifier[ 8 ] !== 0x0D || + identifier[ 9 ] !== 0x0A || + identifier[ 10 ] !== 0x1A || + identifier[ 11 ] !== 0x0A ) { + + console.error( 'texture missing KTX identifier' ); + return; + + } + + // load the reset of the header in native 32 bit uint + const dataSize = Uint32Array.BYTES_PER_ELEMENT; + const headerDataView = new DataView( this.arrayBuffer, 12, 13 * dataSize ); + const endianness = headerDataView.getUint32( 0, true ); + const littleEndian = endianness === 0x04030201; + + this.glType = headerDataView.getUint32( 1 * dataSize, littleEndian ); // must be 0 for compressed textures + this.glTypeSize = headerDataView.getUint32( 2 * dataSize, littleEndian ); // must be 1 for compressed textures + this.glFormat = headerDataView.getUint32( 3 * dataSize, littleEndian ); // must be 0 for compressed textures + this.glInternalFormat = headerDataView.getUint32( 4 * dataSize, littleEndian ); // the value of arg passed to gl.compressedTexImage2D(,,x,,,,) + this.glBaseInternalFormat = headerDataView.getUint32( 5 * dataSize, littleEndian ); // specify GL_RGB, GL_RGBA, GL_ALPHA, etc (un-compressed only) + this.pixelWidth = headerDataView.getUint32( 6 * dataSize, littleEndian ); // level 0 value of arg passed to gl.compressedTexImage2D(,,,x,,,) + this.pixelHeight = headerDataView.getUint32( 7 * dataSize, littleEndian ); // level 0 value of arg passed to gl.compressedTexImage2D(,,,,x,,) + this.pixelDepth = headerDataView.getUint32( 8 * dataSize, littleEndian ); // level 0 value of arg passed to gl.compressedTexImage3D(,,,,,x,,) + this.numberOfArrayElements = headerDataView.getUint32( 9 * dataSize, littleEndian ); // used for texture arrays + this.numberOfFaces = headerDataView.getUint32( 10 * dataSize, littleEndian ); // used for cubemap textures, should either be 1 or 6 + this.numberOfMipmapLevels = headerDataView.getUint32( 11 * dataSize, littleEndian ); // number of levels; disregard possibility of 0 for compressed textures + this.bytesOfKeyValueData = headerDataView.getUint32( 12 * dataSize, littleEndian ); // the amount of space after the header for meta-data + + // Make sure we have a compressed type. Not only reduces work, but probably better to let dev know they are not compressing. + if ( this.glType !== 0 ) { + + console.warn( 'only compressed formats currently supported' ); + return; + + } else { + + // value of zero is an indication to generate mipmaps @ runtime. Not usually allowed for compressed, so disregard. + this.numberOfMipmapLevels = Math.max( 1, this.numberOfMipmapLevels ); + + } + + if ( this.pixelHeight === 0 || this.pixelDepth !== 0 ) { + + console.warn( 'only 2D textures currently supported' ); + return; + + } + + if ( this.numberOfArrayElements !== 0 ) { + + console.warn( 'texture arrays not currently supported' ); + return; + + } + + if ( this.numberOfFaces !== facesExpected ) { + + console.warn( 'number of faces expected' + facesExpected + ', but found ' + this.numberOfFaces ); + return; + + } + + // we now have a completely validated file, so could use existence of loadType as success + // would need to make this more elaborate & adjust checks above to support more than one load type + this.loadType = COMPRESSED_2D; + + } + + mipmaps( loadMipmaps ) { + + const mipmaps = []; + + // initialize width & height for level 1 + let dataOffset = HEADER_LEN + this.bytesOfKeyValueData; + let width = this.pixelWidth; + let height = this.pixelHeight; + const mipmapCount = loadMipmaps ? this.numberOfMipmapLevels : 1; + + for ( let level = 0; level < mipmapCount; level ++ ) { + + const imageSize = new Int32Array( this.arrayBuffer, dataOffset, 1 )[ 0 ]; // size per face, since not supporting array cubemaps + dataOffset += 4; // size of the image + 4 for the imageSize field + + for ( let face = 0; face < this.numberOfFaces; face ++ ) { + + const byteArray = new Uint8Array( this.arrayBuffer, dataOffset, imageSize ); + + mipmaps.push( { 'data': byteArray, 'width': width, 'height': height } ); + + dataOffset += imageSize; + dataOffset += 3 - ( ( imageSize + 3 ) % 4 ); // add padding for odd sized image + + } + + width = Math.max( 1.0, width * 0.5 ); + height = Math.max( 1.0, height * 0.5 ); + + } + + return mipmaps; + + } + +} + +export { KTXLoader }; diff --git a/node_modules/three/examples/jsm/loaders/LDrawLoader.js b/node_modules/three/examples/jsm/loaders/LDrawLoader.js new file mode 100644 index 0000000..14ca28d --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/LDrawLoader.js @@ -0,0 +1,2470 @@ +import { + BufferAttribute, + BufferGeometry, + Color, + FileLoader, + Group, + LineBasicMaterial, + LineSegments, + Loader, + Matrix4, + Mesh, + MeshStandardMaterial, + ShaderMaterial, + SRGBColorSpace, + UniformsLib, + UniformsUtils, + Vector3, + Ray +} from 'three'; + +// Special surface finish tag types. +// Note: "MATERIAL" tag (e.g. GLITTER, SPECKLE) is not implemented +const FINISH_TYPE_DEFAULT = 0; +const FINISH_TYPE_CHROME = 1; +const FINISH_TYPE_PEARLESCENT = 2; +const FINISH_TYPE_RUBBER = 3; +const FINISH_TYPE_MATTE_METALLIC = 4; +const FINISH_TYPE_METAL = 5; + +// State machine to search a subobject path. +// The LDraw standard establishes these various possible subfolders. +const FILE_LOCATION_TRY_PARTS = 0; +const FILE_LOCATION_TRY_P = 1; +const FILE_LOCATION_TRY_MODELS = 2; +const FILE_LOCATION_AS_IS = 3; +const FILE_LOCATION_TRY_RELATIVE = 4; +const FILE_LOCATION_TRY_ABSOLUTE = 5; +const FILE_LOCATION_NOT_FOUND = 6; + +const MAIN_COLOUR_CODE = '16'; +const MAIN_EDGE_COLOUR_CODE = '24'; + +const COLOR_SPACE_LDRAW = SRGBColorSpace; + +const _tempVec0 = new Vector3(); +const _tempVec1 = new Vector3(); + +class LDrawConditionalLineMaterial extends ShaderMaterial { + + constructor( parameters ) { + + super( { + + uniforms: UniformsUtils.merge( [ + UniformsLib.fog, + { + diffuse: { + value: new Color() + }, + opacity: { + value: 1.0 + } + } + ] ), + + vertexShader: /* glsl */` + attribute vec3 control0; + attribute vec3 control1; + attribute vec3 direction; + varying float discardFlag; + + #include + #include + #include + #include + #include + void main() { + #include + + vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); + gl_Position = projectionMatrix * mvPosition; + + // Transform the line segment ends and control points into camera clip space + vec4 c0 = projectionMatrix * modelViewMatrix * vec4( control0, 1.0 ); + vec4 c1 = projectionMatrix * modelViewMatrix * vec4( control1, 1.0 ); + vec4 p0 = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + vec4 p1 = projectionMatrix * modelViewMatrix * vec4( position + direction, 1.0 ); + + c0.xy /= c0.w; + c1.xy /= c1.w; + p0.xy /= p0.w; + p1.xy /= p1.w; + + // Get the direction of the segment and an orthogonal vector + vec2 dir = p1.xy - p0.xy; + vec2 norm = vec2( -dir.y, dir.x ); + + // Get control point directions from the line + vec2 c0dir = c0.xy - p1.xy; + vec2 c1dir = c1.xy - p1.xy; + + // If the vectors to the controls points are pointed in different directions away + // from the line segment then the line should not be drawn. + float d0 = dot( normalize( norm ), normalize( c0dir ) ); + float d1 = dot( normalize( norm ), normalize( c1dir ) ); + discardFlag = float( sign( d0 ) != sign( d1 ) ); + + #include + #include + #include + } + `, + + fragmentShader: /* glsl */` + uniform vec3 diffuse; + uniform float opacity; + varying float discardFlag; + + #include + #include + #include + #include + #include + void main() { + + if ( discardFlag > 0.5 ) discard; + + #include + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + outgoingLight = diffuseColor.rgb; // simple shader + gl_FragColor = vec4( outgoingLight, diffuseColor.a ); + #include + #include + #include + #include + } + `, + + } ); + + Object.defineProperties( this, { + + opacity: { + get: function () { + + return this.uniforms.opacity.value; + + }, + + set: function ( value ) { + + this.uniforms.opacity.value = value; + + } + }, + + color: { + get: function () { + + return this.uniforms.diffuse.value; + + } + } + + } ); + + this.setValues( parameters ); + this.isLDrawConditionalLineMaterial = true; + + } + +} + +class ConditionalLineSegments extends LineSegments { + + constructor( geometry, material ) { + + super( geometry, material ); + this.isConditionalLine = true; + + } + +} + +function generateFaceNormals( faces ) { + + for ( let i = 0, l = faces.length; i < l; i ++ ) { + + const face = faces[ i ]; + const vertices = face.vertices; + const v0 = vertices[ 0 ]; + const v1 = vertices[ 1 ]; + const v2 = vertices[ 2 ]; + + _tempVec0.subVectors( v1, v0 ); + _tempVec1.subVectors( v2, v1 ); + face.faceNormal = new Vector3() + .crossVectors( _tempVec0, _tempVec1 ) + .normalize(); + + } + +} + +const _ray = new Ray(); +function smoothNormals( faces, lineSegments, checkSubSegments = false ) { + + // NOTE: 1e2 is pretty coarse but was chosen to quantize the resulting value because + // it allows edges to be smoothed as expected (see minifig arms). + // -- + // And the vector values are initialize multiplied by 1 + 1e-10 to account for floating + // point errors on vertices along quantization boundaries. Ie after matrix multiplication + // vertices that should be merged might be set to "1.7" and "1.6999..." meaning they won't + // get merged. This added epsilon attempts to push these error values to the same quantized + // value for the sake of hashing. See "AT-ST mini" dishes. See mrdoob/three#23169. + + const hashMultiplier = ( 1 + 1e-10 ) * 1e2; + function hashVertex( v ) { + + const x = ~ ~ ( v.x * hashMultiplier ); + const y = ~ ~ ( v.y * hashMultiplier ); + const z = ~ ~ ( v.z * hashMultiplier ); + + return `${ x },${ y },${ z }`; + + } + + function hashEdge( v0, v1 ) { + + return `${ hashVertex( v0 ) }_${ hashVertex( v1 ) }`; + + } + + // converts the two vertices to a ray with a normalized direction and origin of 0, 0, 0 projected + // onto the original line. + function toNormalizedRay( v0, v1, targetRay ) { + + targetRay.direction.subVectors( v1, v0 ).normalize(); + + const scalar = v0.dot( targetRay.direction ); + targetRay.origin.copy( v0 ).addScaledVector( targetRay.direction, - scalar ); + + return targetRay; + + } + + function hashRay( ray ) { + + return hashEdge( ray.origin, ray.direction ); + + } + + const hardEdges = new Set(); + const hardEdgeRays = new Map(); + const halfEdgeList = {}; + const normals = []; + + // Save the list of hard edges by hash + for ( let i = 0, l = lineSegments.length; i < l; i ++ ) { + + const ls = lineSegments[ i ]; + const vertices = ls.vertices; + const v0 = vertices[ 0 ]; + const v1 = vertices[ 1 ]; + hardEdges.add( hashEdge( v0, v1 ) ); + hardEdges.add( hashEdge( v1, v0 ) ); + + // only generate the hard edge ray map if we're checking subsegments because it's more expensive to check + // and requires more memory. + if ( checkSubSegments ) { + + // add both ray directions to the map + const ray = toNormalizedRay( v0, v1, new Ray() ); + const rh1 = hashRay( ray ); + if ( ! hardEdgeRays.has( rh1 ) ) { + + toNormalizedRay( v1, v0, ray ); + const rh2 = hashRay( ray ); + + const info = { + ray, + distances: [], + }; + + hardEdgeRays.set( rh1, info ); + hardEdgeRays.set( rh2, info ); + + } + + // store both segments ends in min, max order in the distances array to check if a face edge is a + // subsegment later. + const info = hardEdgeRays.get( rh1 ); + let d0 = info.ray.direction.dot( v0 ); + let d1 = info.ray.direction.dot( v1 ); + if ( d0 > d1 ) { + + [ d0, d1 ] = [ d1, d0 ]; + + } + + info.distances.push( d0, d1 ); + + } + + } + + // track the half edges associated with each triangle + for ( let i = 0, l = faces.length; i < l; i ++ ) { + + const tri = faces[ i ]; + const vertices = tri.vertices; + const vertCount = vertices.length; + for ( let i2 = 0; i2 < vertCount; i2 ++ ) { + + const index = i2; + const next = ( i2 + 1 ) % vertCount; + const v0 = vertices[ index ]; + const v1 = vertices[ next ]; + const hash = hashEdge( v0, v1 ); + + // don't add the triangle if the edge is supposed to be hard + if ( hardEdges.has( hash ) ) { + + continue; + + } + + // if checking subsegments then check to see if this edge lies on a hard edge ray and whether its within any ray bounds + if ( checkSubSegments ) { + + toNormalizedRay( v0, v1, _ray ); + + const rayHash = hashRay( _ray ); + if ( hardEdgeRays.has( rayHash ) ) { + + const info = hardEdgeRays.get( rayHash ); + const { ray, distances } = info; + let d0 = ray.direction.dot( v0 ); + let d1 = ray.direction.dot( v1 ); + + if ( d0 > d1 ) { + + [ d0, d1 ] = [ d1, d0 ]; + + } + + // return early if the face edge is found to be a subsegment of a line edge meaning the edge will have "hard" normals + let found = false; + for ( let i = 0, l = distances.length; i < l; i += 2 ) { + + if ( d0 >= distances[ i ] && d1 <= distances[ i + 1 ] ) { + + found = true; + break; + + } + + } + + if ( found ) { + + continue; + + } + + } + + } + + const info = { + index: index, + tri: tri + }; + halfEdgeList[ hash ] = info; + + } + + } + + // Iterate until we've tried to connect all faces to share normals + while ( true ) { + + // Stop if there are no more faces left + let halfEdge = null; + for ( const key in halfEdgeList ) { + + halfEdge = halfEdgeList[ key ]; + break; + + } + + if ( halfEdge === null ) { + + break; + + } + + // Exhaustively find all connected faces + const queue = [ halfEdge ]; + while ( queue.length > 0 ) { + + // initialize all vertex normals in this triangle + const tri = queue.pop().tri; + const vertices = tri.vertices; + const vertNormals = tri.normals; + const faceNormal = tri.faceNormal; + + // Check if any edge is connected to another triangle edge + const vertCount = vertices.length; + for ( let i2 = 0; i2 < vertCount; i2 ++ ) { + + const index = i2; + const next = ( i2 + 1 ) % vertCount; + const v0 = vertices[ index ]; + const v1 = vertices[ next ]; + + // delete this triangle from the list so it won't be found again + const hash = hashEdge( v0, v1 ); + delete halfEdgeList[ hash ]; + + const reverseHash = hashEdge( v1, v0 ); + const otherInfo = halfEdgeList[ reverseHash ]; + if ( otherInfo ) { + + const otherTri = otherInfo.tri; + const otherIndex = otherInfo.index; + const otherNormals = otherTri.normals; + const otherVertCount = otherNormals.length; + const otherFaceNormal = otherTri.faceNormal; + + // NOTE: If the angle between faces is > 67.5 degrees then assume it's + // hard edge. There are some cases where the line segments do not line up exactly + // with or span multiple triangle edges (see Lunar Vehicle wheels). + if ( Math.abs( otherTri.faceNormal.dot( tri.faceNormal ) ) < 0.25 ) { + + continue; + + } + + // if this triangle has already been traversed then it won't be in + // the halfEdgeList. If it has not then add it to the queue and delete + // it so it won't be found again. + if ( reverseHash in halfEdgeList ) { + + queue.push( otherInfo ); + delete halfEdgeList[ reverseHash ]; + + } + + // share the first normal + const otherNext = ( otherIndex + 1 ) % otherVertCount; + if ( + vertNormals[ index ] && otherNormals[ otherNext ] && + vertNormals[ index ] !== otherNormals[ otherNext ] + ) { + + otherNormals[ otherNext ].norm.add( vertNormals[ index ].norm ); + vertNormals[ index ].norm = otherNormals[ otherNext ].norm; + + } + + let sharedNormal1 = vertNormals[ index ] || otherNormals[ otherNext ]; + if ( sharedNormal1 === null ) { + + // it's possible to encounter an edge of a triangle that has already been traversed meaning + // both edges already have different normals defined and shared. To work around this we create + // a wrapper object so when those edges are merged the normals can be updated everywhere. + sharedNormal1 = { norm: new Vector3() }; + normals.push( sharedNormal1.norm ); + + } + + if ( vertNormals[ index ] === null ) { + + vertNormals[ index ] = sharedNormal1; + sharedNormal1.norm.add( faceNormal ); + + } + + if ( otherNormals[ otherNext ] === null ) { + + otherNormals[ otherNext ] = sharedNormal1; + sharedNormal1.norm.add( otherFaceNormal ); + + } + + // share the second normal + if ( + vertNormals[ next ] && otherNormals[ otherIndex ] && + vertNormals[ next ] !== otherNormals[ otherIndex ] + ) { + + otherNormals[ otherIndex ].norm.add( vertNormals[ next ].norm ); + vertNormals[ next ].norm = otherNormals[ otherIndex ].norm; + + } + + let sharedNormal2 = vertNormals[ next ] || otherNormals[ otherIndex ]; + if ( sharedNormal2 === null ) { + + sharedNormal2 = { norm: new Vector3() }; + normals.push( sharedNormal2.norm ); + + } + + if ( vertNormals[ next ] === null ) { + + vertNormals[ next ] = sharedNormal2; + sharedNormal2.norm.add( faceNormal ); + + } + + if ( otherNormals[ otherIndex ] === null ) { + + otherNormals[ otherIndex ] = sharedNormal2; + sharedNormal2.norm.add( otherFaceNormal ); + + } + + } + + } + + } + + } + + // The normals of each face have been added up so now we average them by normalizing the vector. + for ( let i = 0, l = normals.length; i < l; i ++ ) { + + normals[ i ].normalize(); + + } + +} + +function isPartType( type ) { + + return type === 'Part' || type === 'Unofficial_Part'; + +} + +function isPrimitiveType( type ) { + + return /primitive/i.test( type ) || type === 'Subpart'; + +} + +class LineParser { + + constructor( line, lineNumber ) { + + this.line = line; + this.lineLength = line.length; + this.currentCharIndex = 0; + this.currentChar = ' '; + this.lineNumber = lineNumber; + + } + + seekNonSpace() { + + while ( this.currentCharIndex < this.lineLength ) { + + this.currentChar = this.line.charAt( this.currentCharIndex ); + + if ( this.currentChar !== ' ' && this.currentChar !== '\t' ) { + + return; + + } + + this.currentCharIndex ++; + + } + + } + + getToken() { + + const pos0 = this.currentCharIndex ++; + + // Seek space + while ( this.currentCharIndex < this.lineLength ) { + + this.currentChar = this.line.charAt( this.currentCharIndex ); + + if ( this.currentChar === ' ' || this.currentChar === '\t' ) { + + break; + + } + + this.currentCharIndex ++; + + } + + const pos1 = this.currentCharIndex; + + this.seekNonSpace(); + + return this.line.substring( pos0, pos1 ); + + } + + getVector() { + + return new Vector3( parseFloat( this.getToken() ), parseFloat( this.getToken() ), parseFloat( this.getToken() ) ); + + } + + getRemainingString() { + + return this.line.substring( this.currentCharIndex, this.lineLength ); + + } + + isAtTheEnd() { + + return this.currentCharIndex >= this.lineLength; + + } + + setToEnd() { + + this.currentCharIndex = this.lineLength; + + } + + getLineNumberString() { + + return this.lineNumber >= 0 ? ' at line ' + this.lineNumber : ''; + + } + +} + +// Fetches and parses an intermediate representation of LDraw parts files. +class LDrawParsedCache { + + constructor( loader ) { + + this.loader = loader; + this._cache = {}; + + } + + cloneResult( original ) { + + const result = {}; + + // vertices are transformed and normals computed before being converted to geometry + // so these pieces must be cloned. + result.faces = original.faces.map( face => { + + return { + colorCode: face.colorCode, + material: face.material, + vertices: face.vertices.map( v => v.clone() ), + normals: face.normals.map( () => null ), + faceNormal: null + }; + + } ); + + result.conditionalSegments = original.conditionalSegments.map( face => { + + return { + colorCode: face.colorCode, + material: face.material, + vertices: face.vertices.map( v => v.clone() ), + controlPoints: face.controlPoints.map( v => v.clone() ) + }; + + } ); + + result.lineSegments = original.lineSegments.map( face => { + + return { + colorCode: face.colorCode, + material: face.material, + vertices: face.vertices.map( v => v.clone() ) + }; + + } ); + + // none if this is subsequently modified + result.type = original.type; + result.category = original.category; + result.keywords = original.keywords; + result.author = original.author; + result.subobjects = original.subobjects; + result.fileName = original.fileName; + result.totalFaces = original.totalFaces; + result.startingBuildingStep = original.startingBuildingStep; + result.materials = original.materials; + result.group = null; + return result; + + } + + async fetchData( fileName ) { + + let triedLowerCase = false; + let locationState = FILE_LOCATION_TRY_PARTS; + while ( locationState !== FILE_LOCATION_NOT_FOUND ) { + + let subobjectURL = fileName; + switch ( locationState ) { + + case FILE_LOCATION_AS_IS: + locationState = locationState + 1; + break; + + case FILE_LOCATION_TRY_PARTS: + subobjectURL = 'parts/' + subobjectURL; + locationState = locationState + 1; + break; + + case FILE_LOCATION_TRY_P: + subobjectURL = 'p/' + subobjectURL; + locationState = locationState + 1; + break; + + case FILE_LOCATION_TRY_MODELS: + subobjectURL = 'models/' + subobjectURL; + locationState = locationState + 1; + break; + + case FILE_LOCATION_TRY_RELATIVE: + subobjectURL = fileName.substring( 0, fileName.lastIndexOf( '/' ) + 1 ) + subobjectURL; + locationState = locationState + 1; + break; + + case FILE_LOCATION_TRY_ABSOLUTE: + + if ( triedLowerCase ) { + + // Try absolute path + locationState = FILE_LOCATION_NOT_FOUND; + + } else { + + // Next attempt is lower case + fileName = fileName.toLowerCase(); + subobjectURL = fileName; + triedLowerCase = true; + locationState = FILE_LOCATION_TRY_PARTS; + + } + + break; + + } + + const loader = this.loader; + const fileLoader = new FileLoader( loader.manager ); + fileLoader.setPath( loader.partsLibraryPath ); + fileLoader.setRequestHeader( loader.requestHeader ); + fileLoader.setWithCredentials( loader.withCredentials ); + + try { + + const text = await fileLoader.loadAsync( subobjectURL ); + return text; + + } catch ( _ ) { + + continue; + + } + + } + + throw new Error( 'LDrawLoader: Subobject "' + fileName + '" could not be loaded.' ); + + } + + parse( text, fileName = null ) { + + const loader = this.loader; + + // final results + const faces = []; + const lineSegments = []; + const conditionalSegments = []; + const subobjects = []; + const materials = {}; + + const getLocalMaterial = colorCode => { + + return materials[ colorCode ] || null; + + }; + + let type = 'Model'; + let category = null; + let keywords = null; + let author = null; + let totalFaces = 0; + + // split into lines + if ( text.indexOf( '\r\n' ) !== - 1 ) { + + // This is faster than String.split with regex that splits on both + text = text.replace( /\r\n/g, '\n' ); + + } + + const lines = text.split( '\n' ); + const numLines = lines.length; + + let parsingEmbeddedFiles = false; + let currentEmbeddedFileName = null; + let currentEmbeddedText = null; + + let bfcCertified = false; + let bfcCCW = true; + let bfcInverted = false; + let bfcCull = true; + + let startingBuildingStep = false; + + // Parse all line commands + for ( let lineIndex = 0; lineIndex < numLines; lineIndex ++ ) { + + const line = lines[ lineIndex ]; + + if ( line.length === 0 ) continue; + + if ( parsingEmbeddedFiles ) { + + if ( line.startsWith( '0 FILE ' ) ) { + + // Save previous embedded file in the cache + this.setData( currentEmbeddedFileName, currentEmbeddedText ); + + // New embedded text file + currentEmbeddedFileName = line.substring( 7 ); + currentEmbeddedText = ''; + + } else { + + currentEmbeddedText += line + '\n'; + + } + + continue; + + } + + const lp = new LineParser( line, lineIndex + 1 ); + lp.seekNonSpace(); + + if ( lp.isAtTheEnd() ) { + + // Empty line + continue; + + } + + // Parse the line type + const lineType = lp.getToken(); + + let material; + let colorCode; + let segment; + let ccw; + let doubleSided; + let v0, v1, v2, v3, c0, c1; + + switch ( lineType ) { + + // Line type 0: Comment or META + case '0': + + // Parse meta directive + const meta = lp.getToken(); + + if ( meta ) { + + switch ( meta ) { + + case '!LDRAW_ORG': + + type = lp.getToken(); + break; + + case '!COLOUR': + + material = loader.parseColorMetaDirective( lp ); + if ( material ) { + + materials[ material.userData.code ] = material; + + } else { + + console.warn( 'LDrawLoader: Error parsing material' + lp.getLineNumberString() ); + + } + + break; + + case '!CATEGORY': + + category = lp.getToken(); + break; + + case '!KEYWORDS': + + const newKeywords = lp.getRemainingString().split( ',' ); + if ( newKeywords.length > 0 ) { + + if ( ! keywords ) { + + keywords = []; + + } + + newKeywords.forEach( function ( keyword ) { + + keywords.push( keyword.trim() ); + + } ); + + } + + break; + + case 'FILE': + + if ( lineIndex > 0 ) { + + // Start embedded text files parsing + parsingEmbeddedFiles = true; + currentEmbeddedFileName = lp.getRemainingString(); + currentEmbeddedText = ''; + + bfcCertified = false; + bfcCCW = true; + + } + + break; + + case 'BFC': + + // Changes to the backface culling state + while ( ! lp.isAtTheEnd() ) { + + const token = lp.getToken(); + + switch ( token ) { + + case 'CERTIFY': + case 'NOCERTIFY': + + bfcCertified = token === 'CERTIFY'; + bfcCCW = true; + + break; + + case 'CW': + case 'CCW': + + bfcCCW = token === 'CCW'; + + break; + + case 'INVERTNEXT': + + bfcInverted = true; + + break; + + case 'CLIP': + case 'NOCLIP': + + bfcCull = token === 'CLIP'; + + break; + + default: + + console.warn( 'THREE.LDrawLoader: BFC directive "' + token + '" is unknown.' ); + + break; + + } + + } + + break; + + case 'STEP': + + startingBuildingStep = true; + + break; + + case 'Author:': + + author = lp.getToken(); + + break; + + default: + // Other meta directives are not implemented + break; + + } + + } + + break; + + // Line type 1: Sub-object file + case '1': + + colorCode = lp.getToken(); + material = getLocalMaterial( colorCode ); + + const posX = parseFloat( lp.getToken() ); + const posY = parseFloat( lp.getToken() ); + const posZ = parseFloat( lp.getToken() ); + const m0 = parseFloat( lp.getToken() ); + const m1 = parseFloat( lp.getToken() ); + const m2 = parseFloat( lp.getToken() ); + const m3 = parseFloat( lp.getToken() ); + const m4 = parseFloat( lp.getToken() ); + const m5 = parseFloat( lp.getToken() ); + const m6 = parseFloat( lp.getToken() ); + const m7 = parseFloat( lp.getToken() ); + const m8 = parseFloat( lp.getToken() ); + + const matrix = new Matrix4().set( + m0, m1, m2, posX, + m3, m4, m5, posY, + m6, m7, m8, posZ, + 0, 0, 0, 1 + ); + + let fileName = lp.getRemainingString().trim().replace( /\\/g, '/' ); + + if ( loader.fileMap[ fileName ] ) { + + // Found the subobject path in the preloaded file path map + fileName = loader.fileMap[ fileName ]; + + } else { + + // Standardized subfolders + if ( fileName.startsWith( 's/' ) ) { + + fileName = 'parts/' + fileName; + + } else if ( fileName.startsWith( '48/' ) ) { + + fileName = 'p/' + fileName; + + } + + } + + subobjects.push( { + material: material, + colorCode: colorCode, + matrix: matrix, + fileName: fileName, + inverted: bfcInverted, + startingBuildingStep: startingBuildingStep + } ); + + startingBuildingStep = false; + bfcInverted = false; + + break; + + // Line type 2: Line segment + case '2': + + colorCode = lp.getToken(); + material = getLocalMaterial( colorCode ); + v0 = lp.getVector(); + v1 = lp.getVector(); + + segment = { + material: material, + colorCode: colorCode, + vertices: [ v0, v1 ], + }; + + lineSegments.push( segment ); + + break; + + // Line type 5: Conditional Line segment + case '5': + + colorCode = lp.getToken(); + material = getLocalMaterial( colorCode ); + v0 = lp.getVector(); + v1 = lp.getVector(); + c0 = lp.getVector(); + c1 = lp.getVector(); + + segment = { + material: material, + colorCode: colorCode, + vertices: [ v0, v1 ], + controlPoints: [ c0, c1 ], + }; + + conditionalSegments.push( segment ); + + break; + + // Line type 3: Triangle + case '3': + + colorCode = lp.getToken(); + material = getLocalMaterial( colorCode ); + ccw = bfcCCW; + doubleSided = ! bfcCertified || ! bfcCull; + + if ( ccw === true ) { + + v0 = lp.getVector(); + v1 = lp.getVector(); + v2 = lp.getVector(); + + } else { + + v2 = lp.getVector(); + v1 = lp.getVector(); + v0 = lp.getVector(); + + } + + faces.push( { + material: material, + colorCode: colorCode, + faceNormal: null, + vertices: [ v0, v1, v2 ], + normals: [ null, null, null ], + } ); + totalFaces ++; + + if ( doubleSided === true ) { + + faces.push( { + material: material, + colorCode: colorCode, + faceNormal: null, + vertices: [ v2, v1, v0 ], + normals: [ null, null, null ], + } ); + totalFaces ++; + + } + + break; + + // Line type 4: Quadrilateral + case '4': + + colorCode = lp.getToken(); + material = getLocalMaterial( colorCode ); + ccw = bfcCCW; + doubleSided = ! bfcCertified || ! bfcCull; + + if ( ccw === true ) { + + v0 = lp.getVector(); + v1 = lp.getVector(); + v2 = lp.getVector(); + v3 = lp.getVector(); + + } else { + + v3 = lp.getVector(); + v2 = lp.getVector(); + v1 = lp.getVector(); + v0 = lp.getVector(); + + } + + // specifically place the triangle diagonal in the v0 and v1 slots so we can + // account for the doubling of vertices later when smoothing normals. + faces.push( { + material: material, + colorCode: colorCode, + faceNormal: null, + vertices: [ v0, v1, v2, v3 ], + normals: [ null, null, null, null ], + } ); + totalFaces += 2; + + if ( doubleSided === true ) { + + faces.push( { + material: material, + colorCode: colorCode, + faceNormal: null, + vertices: [ v3, v2, v1, v0 ], + normals: [ null, null, null, null ], + } ); + totalFaces += 2; + + } + + break; + + default: + throw new Error( 'LDrawLoader: Unknown line type "' + lineType + '"' + lp.getLineNumberString() + '.' ); + + } + + } + + if ( parsingEmbeddedFiles ) { + + this.setData( currentEmbeddedFileName, currentEmbeddedText ); + + } + + return { + faces, + conditionalSegments, + lineSegments, + type, + category, + keywords, + author, + subobjects, + totalFaces, + startingBuildingStep, + materials, + fileName, + group: null + }; + + } + + // returns an (optionally cloned) instance of the data + getData( fileName, clone = true ) { + + const key = fileName.toLowerCase(); + const result = this._cache[ key ]; + if ( result === null || result instanceof Promise ) { + + return null; + + } + + if ( clone ) { + + return this.cloneResult( result ); + + } else { + + return result; + + } + + } + + // kicks off a fetch and parse of the requested data if it hasn't already been loaded. Returns when + // the data is ready to use and can be retrieved synchronously with "getData". + async ensureDataLoaded( fileName ) { + + const key = fileName.toLowerCase(); + if ( ! ( key in this._cache ) ) { + + // replace the promise with a copy of the parsed data for immediate processing + this._cache[ key ] = this.fetchData( fileName ).then( text => { + + const info = this.parse( text, fileName ); + this._cache[ key ] = info; + return info; + + } ); + + } + + await this._cache[ key ]; + + } + + // sets the data in the cache from parsed data + setData( fileName, text ) { + + const key = fileName.toLowerCase(); + this._cache[ key ] = this.parse( text, fileName ); + + } + +} + +// returns the material for an associated color code. If the color code is 16 for a face or 24 for +// an edge then the passthroughColorCode is used. +function getMaterialFromCode( colorCode, parentColorCode, materialHierarchy, forEdge ) { + + const isPassthrough = ! forEdge && colorCode === MAIN_COLOUR_CODE || forEdge && colorCode === MAIN_EDGE_COLOUR_CODE; + if ( isPassthrough ) { + + colorCode = parentColorCode; + + } + + return materialHierarchy[ colorCode ] || null; + +} + +// Class used to parse and build LDraw parts as three.js objects and cache them if they're a "Part" type. +class LDrawPartsGeometryCache { + + constructor( loader ) { + + this.loader = loader; + this.parseCache = new LDrawParsedCache( loader ); + this._cache = {}; + + } + + // Convert the given file information into a mesh by processing subobjects. + async processIntoMesh( info ) { + + const loader = this.loader; + const parseCache = this.parseCache; + const faceMaterials = new Set(); + + // Processes the part subobject information to load child parts and merge geometry onto part + // piece object. + const processInfoSubobjects = async ( info, subobject = null ) => { + + const subobjects = info.subobjects; + const promises = []; + + // Trigger load of all subobjects. If a subobject isn't a primitive then load it as a separate + // group which lets instruction steps apply correctly. + for ( let i = 0, l = subobjects.length; i < l; i ++ ) { + + const subobject = subobjects[ i ]; + const promise = parseCache.ensureDataLoaded( subobject.fileName ).then( () => { + + const subobjectInfo = parseCache.getData( subobject.fileName, false ); + if ( ! isPrimitiveType( subobjectInfo.type ) ) { + + return this.loadModel( subobject.fileName ).catch( error => { + + console.warn( error ); + return null; + + } ); + + } + + return processInfoSubobjects( parseCache.getData( subobject.fileName ), subobject ); + + } ); + + promises.push( promise ); + + } + + const group = new Group(); + group.userData.category = info.category; + group.userData.keywords = info.keywords; + group.userData.author = info.author; + group.userData.type = info.type; + group.userData.fileName = info.fileName; + info.group = group; + + const subobjectInfos = await Promise.all( promises ); + for ( let i = 0, l = subobjectInfos.length; i < l; i ++ ) { + + const subobject = info.subobjects[ i ]; + const subobjectInfo = subobjectInfos[ i ]; + + if ( subobjectInfo === null ) { + + // the subobject failed to load + continue; + + } + + // if the subobject was loaded as a separate group then apply the parent scopes materials + if ( subobjectInfo.isGroup ) { + + const subobjectGroup = subobjectInfo; + subobject.matrix.decompose( subobjectGroup.position, subobjectGroup.quaternion, subobjectGroup.scale ); + subobjectGroup.userData.startingBuildingStep = subobject.startingBuildingStep; + subobjectGroup.name = subobject.fileName; + + loader.applyMaterialsToMesh( subobjectGroup, subobject.colorCode, info.materials ); + subobjectGroup.userData.colorCode = subobject.colorCode; + + group.add( subobjectGroup ); + continue; + + } + + // add the subobject group if it has children in case it has both children and primitives + if ( subobjectInfo.group.children.length ) { + + group.add( subobjectInfo.group ); + + } + + // transform the primitives into the local space of the parent piece and append them to + // to the parent primitives list. + const parentLineSegments = info.lineSegments; + const parentConditionalSegments = info.conditionalSegments; + const parentFaces = info.faces; + + const lineSegments = subobjectInfo.lineSegments; + const conditionalSegments = subobjectInfo.conditionalSegments; + + const faces = subobjectInfo.faces; + const matrix = subobject.matrix; + const inverted = subobject.inverted; + const matrixScaleInverted = matrix.determinant() < 0; + const colorCode = subobject.colorCode; + + const lineColorCode = colorCode === MAIN_COLOUR_CODE ? MAIN_EDGE_COLOUR_CODE : colorCode; + for ( let i = 0, l = lineSegments.length; i < l; i ++ ) { + + const ls = lineSegments[ i ]; + const vertices = ls.vertices; + vertices[ 0 ].applyMatrix4( matrix ); + vertices[ 1 ].applyMatrix4( matrix ); + ls.colorCode = ls.colorCode === MAIN_EDGE_COLOUR_CODE ? lineColorCode : ls.colorCode; + ls.material = ls.material || getMaterialFromCode( ls.colorCode, ls.colorCode, info.materials, true ); + + parentLineSegments.push( ls ); + + } + + for ( let i = 0, l = conditionalSegments.length; i < l; i ++ ) { + + const os = conditionalSegments[ i ]; + const vertices = os.vertices; + const controlPoints = os.controlPoints; + vertices[ 0 ].applyMatrix4( matrix ); + vertices[ 1 ].applyMatrix4( matrix ); + controlPoints[ 0 ].applyMatrix4( matrix ); + controlPoints[ 1 ].applyMatrix4( matrix ); + os.colorCode = os.colorCode === MAIN_EDGE_COLOUR_CODE ? lineColorCode : os.colorCode; + os.material = os.material || getMaterialFromCode( os.colorCode, os.colorCode, info.materials, true ); + + parentConditionalSegments.push( os ); + + } + + for ( let i = 0, l = faces.length; i < l; i ++ ) { + + const tri = faces[ i ]; + const vertices = tri.vertices; + for ( let i = 0, l = vertices.length; i < l; i ++ ) { + + vertices[ i ].applyMatrix4( matrix ); + + } + + tri.colorCode = tri.colorCode === MAIN_COLOUR_CODE ? colorCode : tri.colorCode; + tri.material = tri.material || getMaterialFromCode( tri.colorCode, colorCode, info.materials, false ); + faceMaterials.add( tri.colorCode ); + + // If the scale of the object is negated then the triangle winding order + // needs to be flipped. + if ( matrixScaleInverted !== inverted ) { + + vertices.reverse(); + + } + + parentFaces.push( tri ); + + } + + info.totalFaces += subobjectInfo.totalFaces; + + } + + // Apply the parent subobjects pass through material code to this object. This is done several times due + // to material scoping. + if ( subobject ) { + + loader.applyMaterialsToMesh( group, subobject.colorCode, info.materials ); + group.userData.colorCode = subobject.colorCode; + + } + + return info; + + }; + + // Track material use to see if we need to use the normal smooth slow path for hard edges. + for ( let i = 0, l = info.faces; i < l; i ++ ) { + + faceMaterials.add( info.faces[ i ].colorCode ); + + } + + await processInfoSubobjects( info ); + + if ( loader.smoothNormals ) { + + const checkSubSegments = faceMaterials.size > 1; + generateFaceNormals( info.faces ); + smoothNormals( info.faces, info.lineSegments, checkSubSegments ); + + } + + // Add the primitive objects and metadata. + const group = info.group; + if ( info.faces.length > 0 ) { + + group.add( createObject( this.loader, info.faces, 3, false, info.totalFaces ) ); + + } + + if ( info.lineSegments.length > 0 ) { + + group.add( createObject( this.loader, info.lineSegments, 2 ) ); + + } + + if ( info.conditionalSegments.length > 0 ) { + + group.add( createObject( this.loader, info.conditionalSegments, 2, true ) ); + + } + + return group; + + } + + hasCachedModel( fileName ) { + + return fileName !== null && fileName.toLowerCase() in this._cache; + + } + + async getCachedModel( fileName ) { + + if ( fileName !== null && this.hasCachedModel( fileName ) ) { + + const key = fileName.toLowerCase(); + const group = await this._cache[ key ]; + return group.clone(); + + } else { + + return null; + + } + + } + + // Loads and parses the model with the given file name. Returns a cached copy if available. + async loadModel( fileName ) { + + const parseCache = this.parseCache; + const key = fileName.toLowerCase(); + if ( this.hasCachedModel( fileName ) ) { + + // Return cached model if available. + return this.getCachedModel( fileName ); + + } else { + + // Otherwise parse a new model. + // Ensure the file data is loaded and pre parsed. + await parseCache.ensureDataLoaded( fileName ); + + const info = parseCache.getData( fileName ); + const promise = this.processIntoMesh( info ); + + // Now that the file has loaded it's possible that another part parse has been waiting in parallel + // so check the cache again to see if it's been added since the last async operation so we don't + // do unnecessary work. + if ( this.hasCachedModel( fileName ) ) { + + return this.getCachedModel( fileName ); + + } + + // Cache object if it's a part so it can be reused later. + if ( isPartType( info.type ) ) { + + this._cache[ key ] = promise; + + } + + // return a copy + const group = await promise; + return group.clone(); + + } + + } + + // parses the given model text into a renderable object. Returns cached copy if available. + async parseModel( text ) { + + const parseCache = this.parseCache; + const info = parseCache.parse( text ); + if ( isPartType( info.type ) && this.hasCachedModel( info.fileName ) ) { + + return this.getCachedModel( info.fileName ); + + } + + return this.processIntoMesh( info ); + + } + +} + +function sortByMaterial( a, b ) { + + if ( a.colorCode === b.colorCode ) { + + return 0; + + } + + if ( a.colorCode < b.colorCode ) { + + return - 1; + + } + + return 1; + +} + +function createObject( loader, elements, elementSize, isConditionalSegments = false, totalElements = null ) { + + // Creates a LineSegments (elementSize = 2) or a Mesh (elementSize = 3 ) + // With per face / segment material, implemented with mesh groups and materials array + + // Sort the faces or line segments by color code to make later the mesh groups + elements.sort( sortByMaterial ); + + if ( totalElements === null ) { + + totalElements = elements.length; + + } + + const positions = new Float32Array( elementSize * totalElements * 3 ); + const normals = elementSize === 3 ? new Float32Array( elementSize * totalElements * 3 ) : null; + const materials = []; + + const quadArray = new Array( 6 ); + const bufferGeometry = new BufferGeometry(); + let prevMaterial = null; + let index0 = 0; + let numGroupVerts = 0; + let offset = 0; + + for ( let iElem = 0, nElem = elements.length; iElem < nElem; iElem ++ ) { + + const elem = elements[ iElem ]; + let vertices = elem.vertices; + if ( vertices.length === 4 ) { + + quadArray[ 0 ] = vertices[ 0 ]; + quadArray[ 1 ] = vertices[ 1 ]; + quadArray[ 2 ] = vertices[ 2 ]; + quadArray[ 3 ] = vertices[ 0 ]; + quadArray[ 4 ] = vertices[ 2 ]; + quadArray[ 5 ] = vertices[ 3 ]; + vertices = quadArray; + + } + + for ( let j = 0, l = vertices.length; j < l; j ++ ) { + + const v = vertices[ j ]; + const index = offset + j * 3; + positions[ index + 0 ] = v.x; + positions[ index + 1 ] = v.y; + positions[ index + 2 ] = v.z; + + } + + // create the normals array if this is a set of faces + if ( elementSize === 3 ) { + + if ( ! elem.faceNormal ) { + + const v0 = vertices[ 0 ]; + const v1 = vertices[ 1 ]; + const v2 = vertices[ 2 ]; + _tempVec0.subVectors( v1, v0 ); + _tempVec1.subVectors( v2, v1 ); + elem.faceNormal = new Vector3() + .crossVectors( _tempVec0, _tempVec1 ) + .normalize(); + + } + + let elemNormals = elem.normals; + if ( elemNormals.length === 4 ) { + + quadArray[ 0 ] = elemNormals[ 0 ]; + quadArray[ 1 ] = elemNormals[ 1 ]; + quadArray[ 2 ] = elemNormals[ 2 ]; + quadArray[ 3 ] = elemNormals[ 0 ]; + quadArray[ 4 ] = elemNormals[ 2 ]; + quadArray[ 5 ] = elemNormals[ 3 ]; + elemNormals = quadArray; + + } + + for ( let j = 0, l = elemNormals.length; j < l; j ++ ) { + + // use face normal if a vertex normal is not provided + let n = elem.faceNormal; + if ( elemNormals[ j ] ) { + + n = elemNormals[ j ].norm; + + } + + const index = offset + j * 3; + normals[ index + 0 ] = n.x; + normals[ index + 1 ] = n.y; + normals[ index + 2 ] = n.z; + + } + + } + + if ( prevMaterial !== elem.colorCode ) { + + if ( prevMaterial !== null ) { + + bufferGeometry.addGroup( index0, numGroupVerts, materials.length - 1 ); + + } + + const material = elem.material; + + if ( material !== null ) { + + if ( elementSize === 3 ) { + + materials.push( material ); + + } else if ( elementSize === 2 ) { + + if ( isConditionalSegments ) { + + const edgeMaterial = loader.edgeMaterialCache.get( material ); + + materials.push( loader.conditionalEdgeMaterialCache.get( edgeMaterial ) ); + + } else { + + materials.push( loader.edgeMaterialCache.get( material ) ); + + } + + } + + } else { + + // If a material has not been made available yet then keep the color code string in the material array + // to save the spot for the material once a parent scopes materials are being applied to the object. + materials.push( elem.colorCode ); + + } + + prevMaterial = elem.colorCode; + index0 = offset / 3; + numGroupVerts = vertices.length; + + } else { + + numGroupVerts += vertices.length; + + } + + offset += 3 * vertices.length; + + } + + if ( numGroupVerts > 0 ) { + + bufferGeometry.addGroup( index0, Infinity, materials.length - 1 ); + + } + + bufferGeometry.setAttribute( 'position', new BufferAttribute( positions, 3 ) ); + + if ( normals !== null ) { + + bufferGeometry.setAttribute( 'normal', new BufferAttribute( normals, 3 ) ); + + } + + let object3d = null; + + if ( elementSize === 2 ) { + + if ( isConditionalSegments ) { + + object3d = new ConditionalLineSegments( bufferGeometry, materials.length === 1 ? materials[ 0 ] : materials ); + + } else { + + object3d = new LineSegments( bufferGeometry, materials.length === 1 ? materials[ 0 ] : materials ); + + } + + } else if ( elementSize === 3 ) { + + object3d = new Mesh( bufferGeometry, materials.length === 1 ? materials[ 0 ] : materials ); + + } + + if ( isConditionalSegments ) { + + object3d.isConditionalLine = true; + + const controlArray0 = new Float32Array( elements.length * 3 * 2 ); + const controlArray1 = new Float32Array( elements.length * 3 * 2 ); + const directionArray = new Float32Array( elements.length * 3 * 2 ); + for ( let i = 0, l = elements.length; i < l; i ++ ) { + + const os = elements[ i ]; + const vertices = os.vertices; + const controlPoints = os.controlPoints; + const c0 = controlPoints[ 0 ]; + const c1 = controlPoints[ 1 ]; + const v0 = vertices[ 0 ]; + const v1 = vertices[ 1 ]; + const index = i * 3 * 2; + controlArray0[ index + 0 ] = c0.x; + controlArray0[ index + 1 ] = c0.y; + controlArray0[ index + 2 ] = c0.z; + controlArray0[ index + 3 ] = c0.x; + controlArray0[ index + 4 ] = c0.y; + controlArray0[ index + 5 ] = c0.z; + + controlArray1[ index + 0 ] = c1.x; + controlArray1[ index + 1 ] = c1.y; + controlArray1[ index + 2 ] = c1.z; + controlArray1[ index + 3 ] = c1.x; + controlArray1[ index + 4 ] = c1.y; + controlArray1[ index + 5 ] = c1.z; + + directionArray[ index + 0 ] = v1.x - v0.x; + directionArray[ index + 1 ] = v1.y - v0.y; + directionArray[ index + 2 ] = v1.z - v0.z; + directionArray[ index + 3 ] = v1.x - v0.x; + directionArray[ index + 4 ] = v1.y - v0.y; + directionArray[ index + 5 ] = v1.z - v0.z; + + } + + bufferGeometry.setAttribute( 'control0', new BufferAttribute( controlArray0, 3, false ) ); + bufferGeometry.setAttribute( 'control1', new BufferAttribute( controlArray1, 3, false ) ); + bufferGeometry.setAttribute( 'direction', new BufferAttribute( directionArray, 3, false ) ); + + } + + return object3d; + +} + +// + +class LDrawLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + // Array of THREE.Material + this.materials = []; + this.materialLibrary = {}; + this.edgeMaterialCache = new WeakMap(); + this.conditionalEdgeMaterialCache = new WeakMap(); + + // This also allows to handle the embedded text files ("0 FILE" lines) + this.partsCache = new LDrawPartsGeometryCache( this ); + + // This object is a map from file names to paths. It agilizes the paths search. If it is not set then files will be searched by trial and error. + this.fileMap = {}; + + // Initializes the materials library with default materials + this.setMaterials( [] ); + + // If this flag is set to true the vertex normals will be smoothed. + this.smoothNormals = true; + + // The path to load parts from the LDraw parts library from. + this.partsLibraryPath = ''; + + // Material assigned to not available colors for meshes and edges + this.missingColorMaterial = new MeshStandardMaterial( { name: Loader.DEFAULT_MATERIAL_NAME, color: 0xFF00FF, roughness: 0.3, metalness: 0 } ); + this.missingEdgeColorMaterial = new LineBasicMaterial( { name: Loader.DEFAULT_MATERIAL_NAME, color: 0xFF00FF } ); + this.missingConditionalEdgeColorMaterial = new LDrawConditionalLineMaterial( { name: Loader.DEFAULT_MATERIAL_NAME, fog: true, color: 0xFF00FF } ); + this.edgeMaterialCache.set( this.missingColorMaterial, this.missingEdgeColorMaterial ); + this.conditionalEdgeMaterialCache.set( this.missingEdgeColorMaterial, this.missingConditionalEdgeColorMaterial ); + + } + + setPartsLibraryPath( path ) { + + this.partsLibraryPath = path; + return this; + + } + + async preloadMaterials( url ) { + + const fileLoader = new FileLoader( this.manager ); + fileLoader.setPath( this.path ); + fileLoader.setRequestHeader( this.requestHeader ); + fileLoader.setWithCredentials( this.withCredentials ); + + const text = await fileLoader.loadAsync( url ); + const colorLineRegex = /^0 !COLOUR/; + const lines = text.split( /[\n\r]/g ); + const materials = []; + for ( let i = 0, l = lines.length; i < l; i ++ ) { + + const line = lines[ i ]; + if ( colorLineRegex.test( line ) ) { + + const directive = line.replace( colorLineRegex, '' ); + const material = this.parseColorMetaDirective( new LineParser( directive ) ); + materials.push( material ); + + } + + } + + this.setMaterials( materials ); + + } + + load( url, onLoad, onProgress, onError ) { + + const fileLoader = new FileLoader( this.manager ); + fileLoader.setPath( this.path ); + fileLoader.setRequestHeader( this.requestHeader ); + fileLoader.setWithCredentials( this.withCredentials ); + fileLoader.load( url, text => { + + this.partsCache + .parseModel( text, this.materialLibrary ) + .then( group => { + + this.applyMaterialsToMesh( group, MAIN_COLOUR_CODE, this.materialLibrary, true ); + this.computeBuildingSteps( group ); + group.userData.fileName = url; + onLoad( group ); + + } ) + .catch( onError ); + + }, onProgress, onError ); + + } + + parse( text, onLoad ) { + + this.partsCache + .parseModel( text, this.materialLibrary ) + .then( group => { + + this.applyMaterialsToMesh( group, MAIN_COLOUR_CODE, this.materialLibrary, true ); + this.computeBuildingSteps( group ); + group.userData.fileName = ''; + onLoad( group ); + + } ); + + } + + setMaterials( materials ) { + + this.materialLibrary = {}; + this.materials = []; + for ( let i = 0, l = materials.length; i < l; i ++ ) { + + this.addMaterial( materials[ i ] ); + + } + + // Add default main triangle and line edge materials (used in pieces that can be colored with a main color) + this.addMaterial( this.parseColorMetaDirective( new LineParser( 'Main_Colour CODE 16 VALUE #FF8080 EDGE #333333' ) ) ); + this.addMaterial( this.parseColorMetaDirective( new LineParser( 'Edge_Colour CODE 24 VALUE #A0A0A0 EDGE #333333' ) ) ); + + return this; + + } + + setFileMap( fileMap ) { + + this.fileMap = fileMap; + + return this; + + } + + addMaterial( material ) { + + // Adds a material to the material library which is on top of the parse scopes stack. And also to the materials array + + const matLib = this.materialLibrary; + if ( ! matLib[ material.userData.code ] ) { + + this.materials.push( material ); + matLib[ material.userData.code ] = material; + + } + + return this; + + } + + getMaterial( colorCode ) { + + if ( colorCode.startsWith( '0x2' ) ) { + + // Special 'direct' material value (RGB color) + const color = colorCode.substring( 3 ); + + return this.parseColorMetaDirective( new LineParser( 'Direct_Color_' + color + ' CODE -1 VALUE #' + color + ' EDGE #' + color + '' ) ); + + } + + return this.materialLibrary[ colorCode ] || null; + + } + + // Applies the appropriate materials to a prebuilt hierarchy of geometry. Assumes that color codes are present + // in the material array if they need to be filled in. + applyMaterialsToMesh( group, parentColorCode, materialHierarchy, finalMaterialPass = false ) { + + // find any missing materials as indicated by a color code string and replace it with a material from the current material lib + const loader = this; + const parentIsPassthrough = parentColorCode === MAIN_COLOUR_CODE; + group.traverse( c => { + + if ( c.isMesh || c.isLineSegments ) { + + if ( Array.isArray( c.material ) ) { + + for ( let i = 0, l = c.material.length; i < l; i ++ ) { + + if ( ! c.material[ i ].isMaterial ) { + + c.material[ i ] = getMaterial( c, c.material[ i ] ); + + } + + } + + } else if ( ! c.material.isMaterial ) { + + c.material = getMaterial( c, c.material ); + + } + + } + + } ); + + + // Returns the appropriate material for the object (line or face) given color code. If the code is "pass through" + // (24 for lines, 16 for edges) then the pass through color code is used. If that is also pass through then it's + // simply returned for the subsequent material application. + function getMaterial( c, colorCode ) { + + // if our parent is a passthrough color code and we don't have the current material color available then + // return early. + if ( parentIsPassthrough && ! ( colorCode in materialHierarchy ) && ! finalMaterialPass ) { + + return colorCode; + + } + + const forEdge = c.isLineSegments || c.isConditionalLine; + const isPassthrough = ! forEdge && colorCode === MAIN_COLOUR_CODE || forEdge && colorCode === MAIN_EDGE_COLOUR_CODE; + if ( isPassthrough ) { + + colorCode = parentColorCode; + + } + + let material = null; + if ( colorCode in materialHierarchy ) { + + material = materialHierarchy[ colorCode ]; + + } else if ( finalMaterialPass ) { + + // see if we can get the final material from from the "getMaterial" function which will attempt to + // parse the "direct" colors + material = loader.getMaterial( colorCode ); + if ( material === null ) { + + // otherwise throw a warning if this is final opportunity to set the material + console.warn( `LDrawLoader: Material properties for code ${ colorCode } not available.` ); + + // And return the 'missing color' material + material = loader.missingColorMaterial; + + } + + + } else { + + return colorCode; + + } + + if ( c.isLineSegments ) { + + material = loader.edgeMaterialCache.get( material ); + + if ( c.isConditionalLine ) { + + material = loader.conditionalEdgeMaterialCache.get( material ); + + } + + } + + return material; + + } + + } + + getMainMaterial() { + + return this.getMaterial( MAIN_COLOUR_CODE ); + + } + + getMainEdgeMaterial() { + + const mat = this.getMaterial( MAIN_EDGE_COLOUR_CODE ); + return mat ? this.edgeMaterialCache.get( mat ) : null; + + } + + parseColorMetaDirective( lineParser ) { + + // Parses a color definition and returns a THREE.Material + + let code = null; + + // Triangle and line colors + let fillColor = '#FF00FF'; + let edgeColor = '#FF00FF'; + + // Transparency + let alpha = 1; + let isTransparent = false; + // Self-illumination: + let luminance = 0; + + let finishType = FINISH_TYPE_DEFAULT; + + let edgeMaterial = null; + + const name = lineParser.getToken(); + if ( ! name ) { + + throw new Error( 'LDrawLoader: Material name was expected after "!COLOUR tag' + lineParser.getLineNumberString() + '.' ); + + } + + // Parse tag tokens and their parameters + let token = null; + while ( true ) { + + token = lineParser.getToken(); + + if ( ! token ) { + + break; + + } + + if ( ! parseLuminance( token ) ) { + + switch ( token.toUpperCase() ) { + + case 'CODE': + + code = lineParser.getToken(); + break; + + case 'VALUE': + + fillColor = lineParser.getToken(); + if ( fillColor.startsWith( '0x' ) ) { + + fillColor = '#' + fillColor.substring( 2 ); + + } else if ( ! fillColor.startsWith( '#' ) ) { + + throw new Error( 'LDrawLoader: Invalid color while parsing material' + lineParser.getLineNumberString() + '.' ); + + } + + break; + + case 'EDGE': + + edgeColor = lineParser.getToken(); + if ( edgeColor.startsWith( '0x' ) ) { + + edgeColor = '#' + edgeColor.substring( 2 ); + + } else if ( ! edgeColor.startsWith( '#' ) ) { + + // Try to see if edge color is a color code + edgeMaterial = this.getMaterial( edgeColor ); + if ( ! edgeMaterial ) { + + throw new Error( 'LDrawLoader: Invalid edge color while parsing material' + lineParser.getLineNumberString() + '.' ); + + } + + // Get the edge material for this triangle material + edgeMaterial = this.edgeMaterialCache.get( edgeMaterial ); + + } + + break; + + case 'ALPHA': + + alpha = parseInt( lineParser.getToken() ); + + if ( isNaN( alpha ) ) { + + throw new Error( 'LDrawLoader: Invalid alpha value in material definition' + lineParser.getLineNumberString() + '.' ); + + } + + alpha = Math.max( 0, Math.min( 1, alpha / 255 ) ); + + if ( alpha < 1 ) { + + isTransparent = true; + + } + + break; + + case 'LUMINANCE': + + if ( ! parseLuminance( lineParser.getToken() ) ) { + + throw new Error( 'LDrawLoader: Invalid luminance value in material definition' + LineParser.getLineNumberString() + '.' ); + + } + + break; + + case 'CHROME': + finishType = FINISH_TYPE_CHROME; + break; + + case 'PEARLESCENT': + finishType = FINISH_TYPE_PEARLESCENT; + break; + + case 'RUBBER': + finishType = FINISH_TYPE_RUBBER; + break; + + case 'MATTE_METALLIC': + finishType = FINISH_TYPE_MATTE_METALLIC; + break; + + case 'METAL': + finishType = FINISH_TYPE_METAL; + break; + + case 'MATERIAL': + // Not implemented + lineParser.setToEnd(); + break; + + default: + throw new Error( 'LDrawLoader: Unknown token "' + token + '" while parsing material' + lineParser.getLineNumberString() + '.' ); + + } + + } + + } + + let material = null; + + switch ( finishType ) { + + case FINISH_TYPE_DEFAULT: + + material = new MeshStandardMaterial( { roughness: 0.3, metalness: 0 } ); + break; + + case FINISH_TYPE_PEARLESCENT: + + // Try to imitate pearlescency by making the surface glossy + material = new MeshStandardMaterial( { roughness: 0.3, metalness: 0.25 } ); + break; + + case FINISH_TYPE_CHROME: + + // Mirror finish surface + material = new MeshStandardMaterial( { roughness: 0, metalness: 1 } ); + break; + + case FINISH_TYPE_RUBBER: + + // Rubber finish + material = new MeshStandardMaterial( { roughness: 0.9, metalness: 0 } ); + break; + + case FINISH_TYPE_MATTE_METALLIC: + + // Brushed metal finish + material = new MeshStandardMaterial( { roughness: 0.8, metalness: 0.4 } ); + break; + + case FINISH_TYPE_METAL: + + // Average metal finish + material = new MeshStandardMaterial( { roughness: 0.2, metalness: 0.85 } ); + break; + + default: + // Should not happen + break; + + } + + material.color.setStyle( fillColor, COLOR_SPACE_LDRAW ); + material.transparent = isTransparent; + material.premultipliedAlpha = true; + material.opacity = alpha; + material.depthWrite = ! isTransparent; + + material.polygonOffset = true; + material.polygonOffsetFactor = 1; + + if ( luminance !== 0 ) { + + material.emissive.setStyle( fillColor, COLOR_SPACE_LDRAW ).multiplyScalar( luminance ); + + } + + if ( ! edgeMaterial ) { + + // This is the material used for edges + edgeMaterial = new LineBasicMaterial( { + color: new Color().setStyle( edgeColor, COLOR_SPACE_LDRAW ), + transparent: isTransparent, + opacity: alpha, + depthWrite: ! isTransparent + } ); + edgeMaterial.color; + edgeMaterial.userData.code = code; + edgeMaterial.name = name + ' - Edge'; + + // This is the material used for conditional edges + const conditionalEdgeMaterial = new LDrawConditionalLineMaterial( { + + fog: true, + transparent: isTransparent, + depthWrite: ! isTransparent, + color: new Color().setStyle( edgeColor, COLOR_SPACE_LDRAW ), + opacity: alpha, + + } ); + conditionalEdgeMaterial.userData.code = code; + conditionalEdgeMaterial.name = name + ' - Conditional Edge'; + + this.conditionalEdgeMaterialCache.set( edgeMaterial, conditionalEdgeMaterial ); + + } + + material.userData.code = code; + material.name = name; + + this.edgeMaterialCache.set( material, edgeMaterial ); + + this.addMaterial( material ); + + return material; + + function parseLuminance( token ) { + + // Returns success + + let lum; + + if ( token.startsWith( 'LUMINANCE' ) ) { + + lum = parseInt( token.substring( 9 ) ); + + } else { + + lum = parseInt( token ); + + } + + if ( isNaN( lum ) ) { + + return false; + + } + + luminance = Math.max( 0, Math.min( 1, lum / 255 ) ); + + return true; + + } + + } + + computeBuildingSteps( model ) { + + // Sets userdata.buildingStep number in Group objects and userData.numBuildingSteps number in the root Group object. + + let stepNumber = 0; + + model.traverse( c => { + + if ( c.isGroup ) { + + if ( c.userData.startingBuildingStep ) { + + stepNumber ++; + + } + + c.userData.buildingStep = stepNumber; + + } + + } ); + + model.userData.numBuildingSteps = stepNumber + 1; + + } + +} + +export { LDrawLoader }; diff --git a/node_modules/three/examples/jsm/loaders/LUT3dlLoader.js b/node_modules/three/examples/jsm/loaders/LUT3dlLoader.js new file mode 100644 index 0000000..0c3fa4a --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/LUT3dlLoader.js @@ -0,0 +1,168 @@ +// http://download.autodesk.com/us/systemdocs/help/2011/lustre/index.html?url=./files/WSc4e151a45a3b785a24c3d9a411df9298473-7ffd.htm,topicNumber=d0e9492 +// https://community.foundry.com/discuss/topic/103636/format-spec-for-3dl?mode=Post&postID=895258 + +import { + ClampToEdgeWrapping, + Data3DTexture, + FileLoader, + FloatType, + LinearFilter, + Loader, + RGBAFormat, + UnsignedByteType, +} from 'three'; + +export class LUT3dlLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.type = UnsignedByteType; + + } + + setType( type ) { + + if ( type !== UnsignedByteType && type !== FloatType ) { + + throw new Error( 'LUT3dlLoader: Unsupported type' ); + + } + + this.type = type; + + return this; + + } + + load( url, onLoad, onProgress, onError ) { + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setResponseType( 'text' ); + loader.load( url, text => { + + try { + + onLoad( this.parse( text ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + this.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( input ) { + + const regExpGridInfo = /^[\d ]+$/m; + const regExpDataPoints = /^([\d.e+-]+) +([\d.e+-]+) +([\d.e+-]+) *$/gm; + + // The first line describes the positions of values on the LUT grid. + let result = regExpGridInfo.exec( input ); + + if ( result === null ) { + + throw new Error( 'LUT3dlLoader: Missing grid information' ); + + } + + const gridLines = result[ 0 ].trim().split( /\s+/g ).map( Number ); + const gridStep = gridLines[ 1 ] - gridLines[ 0 ]; + const size = gridLines.length; + const sizeSq = size ** 2; + + for ( let i = 1, l = gridLines.length; i < l; ++ i ) { + + if ( gridStep !== ( gridLines[ i ] - gridLines[ i - 1 ] ) ) { + + throw new Error( 'LUT3dlLoader: Inconsistent grid size' ); + + } + + } + + const dataFloat = new Float32Array( size ** 3 * 4 ); + let maxValue = 0.0; + let index = 0; + + while ( ( result = regExpDataPoints.exec( input ) ) !== null ) { + + const r = Number( result[ 1 ] ); + const g = Number( result[ 2 ] ); + const b = Number( result[ 3 ] ); + + maxValue = Math.max( maxValue, r, g, b ); + + const bLayer = index % size; + const gLayer = Math.floor( index / size ) % size; + const rLayer = Math.floor( index / ( sizeSq ) ) % size; + + // b grows first, then g, then r. + const d4 = ( bLayer * sizeSq + gLayer * size + rLayer ) * 4; + dataFloat[ d4 + 0 ] = r; + dataFloat[ d4 + 1 ] = g; + dataFloat[ d4 + 2 ] = b; + + ++ index; + + } + + // Determine the bit depth to scale the values to [0.0, 1.0]. + const bits = Math.ceil( Math.log2( maxValue ) ); + const maxBitValue = Math.pow( 2, bits ); + + const data = this.type === UnsignedByteType ? new Uint8Array( dataFloat.length ) : dataFloat; + const scale = this.type === UnsignedByteType ? 255 : 1; + + for ( let i = 0, l = data.length; i < l; i += 4 ) { + + const i1 = i + 1; + const i2 = i + 2; + const i3 = i + 3; + + // Note: data is dataFloat when type is FloatType. + data[ i ] = dataFloat[ i ] / maxBitValue * scale; + data[ i1 ] = dataFloat[ i1 ] / maxBitValue * scale; + data[ i2 ] = dataFloat[ i2 ] / maxBitValue * scale; + data[ i3 ] = scale; + + } + + const texture3D = new Data3DTexture(); + texture3D.image.data = data; + texture3D.image.width = size; + texture3D.image.height = size; + texture3D.image.depth = size; + texture3D.format = RGBAFormat; + texture3D.type = this.type; + texture3D.magFilter = LinearFilter; + texture3D.minFilter = LinearFilter; + texture3D.wrapS = ClampToEdgeWrapping; + texture3D.wrapT = ClampToEdgeWrapping; + texture3D.wrapR = ClampToEdgeWrapping; + texture3D.generateMipmaps = false; + texture3D.needsUpdate = true; + + return { + size, + texture3D, + }; + + } + +} diff --git a/node_modules/three/examples/jsm/loaders/LUTCubeLoader.js b/node_modules/three/examples/jsm/loaders/LUTCubeLoader.js new file mode 100644 index 0000000..8b67ce8 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/LUTCubeLoader.js @@ -0,0 +1,153 @@ +// https://wwwimages2.adobe.com/content/dam/acom/en/products/speedgrade/cc/pdfs/cube-lut-specification-1.0.pdf + +import { + ClampToEdgeWrapping, + Data3DTexture, + FileLoader, + FloatType, + LinearFilter, + Loader, + UnsignedByteType, + Vector3, +} from 'three'; + +export class LUTCubeLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.type = UnsignedByteType; + + } + + setType( type ) { + + if ( type !== UnsignedByteType && type !== FloatType ) { + + throw new Error( 'LUTCubeLoader: Unsupported type' ); + + } + + this.type = type; + + return this; + + } + + load( url, onLoad, onProgress, onError ) { + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setResponseType( 'text' ); + loader.load( url, text => { + + try { + + onLoad( this.parse( text ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + this.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( input ) { + + const regExpTitle = /TITLE +"([^"]*)"/; + const regExpSize = /LUT_3D_SIZE +(\d+)/; + const regExpDomainMin = /DOMAIN_MIN +([\d.]+) +([\d.]+) +([\d.]+)/; + const regExpDomainMax = /DOMAIN_MAX +([\d.]+) +([\d.]+) +([\d.]+)/; + const regExpDataPoints = /^([\d.e+-]+) +([\d.e+-]+) +([\d.e+-]+) *$/gm; + + let result = regExpTitle.exec( input ); + const title = ( result !== null ) ? result[ 1 ] : null; + + result = regExpSize.exec( input ); + + if ( result === null ) { + + throw new Error( 'LUTCubeLoader: Missing LUT_3D_SIZE information' ); + + } + + const size = Number( result[ 1 ] ); + const length = size ** 3 * 4; + const data = this.type === UnsignedByteType ? new Uint8Array( length ) : new Float32Array( length ); + + const domainMin = new Vector3( 0, 0, 0 ); + const domainMax = new Vector3( 1, 1, 1 ); + + result = regExpDomainMin.exec( input ); + + if ( result !== null ) { + + domainMin.set( Number( result[ 1 ] ), Number( result[ 2 ] ), Number( result[ 3 ] ) ); + + } + + result = regExpDomainMax.exec( input ); + + if ( result !== null ) { + + domainMax.set( Number( result[ 1 ] ), Number( result[ 2 ] ), Number( result[ 3 ] ) ); + + } + + if ( domainMin.x > domainMax.x || domainMin.y > domainMax.y || domainMin.z > domainMax.z ) { + + throw new Error( 'LUTCubeLoader: Invalid input domain' ); + + } + + const scale = this.type === UnsignedByteType ? 255 : 1; + let i = 0; + + while ( ( result = regExpDataPoints.exec( input ) ) !== null ) { + + data[ i ++ ] = Number( result[ 1 ] ) * scale; + data[ i ++ ] = Number( result[ 2 ] ) * scale; + data[ i ++ ] = Number( result[ 3 ] ) * scale; + data[ i ++ ] = scale; + + } + + const texture3D = new Data3DTexture(); + texture3D.image.data = data; + texture3D.image.width = size; + texture3D.image.height = size; + texture3D.image.depth = size; + texture3D.type = this.type; + texture3D.magFilter = LinearFilter; + texture3D.minFilter = LinearFilter; + texture3D.wrapS = ClampToEdgeWrapping; + texture3D.wrapT = ClampToEdgeWrapping; + texture3D.wrapR = ClampToEdgeWrapping; + texture3D.generateMipmaps = false; + texture3D.needsUpdate = true; + + return { + title, + size, + domainMin, + domainMax, + texture3D, + }; + + } + +} diff --git a/node_modules/three/examples/jsm/loaders/LUTImageLoader.js b/node_modules/three/examples/jsm/loaders/LUTImageLoader.js new file mode 100644 index 0000000..258ff0e --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/LUTImageLoader.js @@ -0,0 +1,149 @@ +import { + Loader, + TextureLoader, + Data3DTexture, + RGBAFormat, + UnsignedByteType, + ClampToEdgeWrapping, + LinearFilter, +} from 'three'; + +export class LUTImageLoader extends Loader { + + constructor( flipVertical = false ) { + + //The NeutralLUT.png has green at the bottom for Unreal ang green at the top for Unity URP Color Lookup + //post-processing. If you're using lut image strips from a Unity pipeline then pass true to the constructor + + super(); + + this.flip = flipVertical; + + } + + load( url, onLoad, onProgress, onError ) { + + const loader = new TextureLoader( this.manager ); + + loader.setCrossOrigin( this.crossOrigin ); + + loader.setPath( this.path ); + loader.load( url, texture => { + + try { + + let imageData; + + if ( texture.image.width < texture.image.height ) { + + imageData = this.getImageData( texture ); + + } else { + + imageData = this.horz2Vert( texture ); + + } + + onLoad( this.parse( imageData.data, Math.min( texture.image.width, texture.image.height ) ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + this.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + getImageData( texture ) { + + const width = texture.image.width; + const height = texture.image.height; + + const canvas = document.createElement( 'canvas' ); + canvas.width = width; + canvas.height = height; + + const context = canvas.getContext( '2d' ); + + if ( this.flip === true ) { + + context.scale( 1, - 1 ); + context.translate( 0, - height ); + + } + + context.drawImage( texture.image, 0, 0 ); + + return context.getImageData( 0, 0, width, height ); + + } + + horz2Vert( texture ) { + + const width = texture.image.height; + const height = texture.image.width; + + const canvas = document.createElement( 'canvas' ); + canvas.width = width; + canvas.height = height; + + const context = canvas.getContext( '2d' ); + + if ( this.flip === true ) { + + context.scale( 1, - 1 ); + context.translate( 0, - height ); + + } + + for ( let i = 0; i < width; i ++ ) { + + const sy = i * width; + const dy = ( this.flip ) ? height - i * width : i * width; + context.drawImage( texture.image, sy, 0, width, width, 0, dy, width, width ); + + } + + return context.getImageData( 0, 0, width, height ); + + } + + parse( dataArray, size ) { + + const data = new Uint8Array( dataArray ); + + const texture3D = new Data3DTexture(); + texture3D.image.data = data; + texture3D.image.width = size; + texture3D.image.height = size; + texture3D.image.depth = size; + texture3D.format = RGBAFormat; + texture3D.type = UnsignedByteType; + texture3D.magFilter = LinearFilter; + texture3D.minFilter = LinearFilter; + texture3D.wrapS = ClampToEdgeWrapping; + texture3D.wrapT = ClampToEdgeWrapping; + texture3D.wrapR = ClampToEdgeWrapping; + texture3D.generateMipmaps = false; + texture3D.needsUpdate = true; + + return { + size, + texture3D, + }; + + } + +} diff --git a/node_modules/three/examples/jsm/loaders/LWOLoader.js b/node_modules/three/examples/jsm/loaders/LWOLoader.js new file mode 100644 index 0000000..80c3dc3 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/LWOLoader.js @@ -0,0 +1,1052 @@ +/** + * @version 1.1.1 + * + * @desc Load files in LWO3 and LWO2 format on Three.js + * + * LWO3 format specification: + * https://static.lightwave3d.com/sdk/2019/html/filefmts/lwo3.html + * + * LWO2 format specification: + * https://static.lightwave3d.com/sdk/2019/html/filefmts/lwo2.html + * + **/ + +import { + AddOperation, + BackSide, + BufferGeometry, + ClampToEdgeWrapping, + Color, + DoubleSide, + EquirectangularReflectionMapping, + EquirectangularRefractionMapping, + FileLoader, + Float32BufferAttribute, + FrontSide, + LineBasicMaterial, + LineSegments, + Loader, + Mesh, + MeshPhongMaterial, + MeshPhysicalMaterial, + MeshStandardMaterial, + MirroredRepeatWrapping, + Points, + PointsMaterial, + RepeatWrapping, + SRGBColorSpace, + TextureLoader, + Vector2 +} from 'three'; + +import { IFFParser } from './lwo/IFFParser.js'; + +let _lwoTree; + +class LWOLoader extends Loader { + + constructor( manager, parameters = {} ) { + + super( manager ); + + this.resourcePath = ( parameters.resourcePath !== undefined ) ? parameters.resourcePath : ''; + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const path = ( scope.path === '' ) ? extractParentUrl( url, 'Objects' ) : scope.path; + + // give the mesh a default name based on the filename + const modelName = url.split( path ).pop().split( '.' )[ 0 ]; + + const loader = new FileLoader( this.manager ); + loader.setPath( scope.path ); + loader.setResponseType( 'arraybuffer' ); + + loader.load( url, function ( buffer ) { + + // console.time( 'Total parsing: ' ); + + try { + + onLoad( scope.parse( buffer, path, modelName ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + // console.timeEnd( 'Total parsing: ' ); + + }, onProgress, onError ); + + } + + parse( iffBuffer, path, modelName ) { + + _lwoTree = new IFFParser().parse( iffBuffer ); + + // console.log( 'lwoTree', lwoTree ); + + const textureLoader = new TextureLoader( this.manager ).setPath( this.resourcePath || path ).setCrossOrigin( this.crossOrigin ); + + return new LWOTreeParser( textureLoader ).parse( modelName ); + + } + +} + +// Parse the lwoTree object +class LWOTreeParser { + + constructor( textureLoader ) { + + this.textureLoader = textureLoader; + + } + + parse( modelName ) { + + this.materials = new MaterialParser( this.textureLoader ).parse(); + this.defaultLayerName = modelName; + + this.meshes = this.parseLayers(); + + return { + materials: this.materials, + meshes: this.meshes, + }; + + } + + parseLayers() { + + // array of all meshes for building hierarchy + const meshes = []; + + // final array containing meshes with scene graph hierarchy set up + const finalMeshes = []; + + const geometryParser = new GeometryParser(); + + const scope = this; + _lwoTree.layers.forEach( function ( layer ) { + + const geometry = geometryParser.parse( layer.geometry, layer ); + + const mesh = scope.parseMesh( geometry, layer ); + + meshes[ layer.number ] = mesh; + + if ( layer.parent === - 1 ) finalMeshes.push( mesh ); + else meshes[ layer.parent ].add( mesh ); + + + } ); + + this.applyPivots( finalMeshes ); + + return finalMeshes; + + } + + parseMesh( geometry, layer ) { + + let mesh; + + const materials = this.getMaterials( geometry.userData.matNames, layer.geometry.type ); + + if ( layer.geometry.type === 'points' ) mesh = new Points( geometry, materials ); + else if ( layer.geometry.type === 'lines' ) mesh = new LineSegments( geometry, materials ); + else mesh = new Mesh( geometry, materials ); + + if ( layer.name ) mesh.name = layer.name; + else mesh.name = this.defaultLayerName + '_layer_' + layer.number; + + mesh.userData.pivot = layer.pivot; + + return mesh; + + } + + // TODO: may need to be reversed in z to convert LWO to three.js coordinates + applyPivots( meshes ) { + + meshes.forEach( function ( mesh ) { + + mesh.traverse( function ( child ) { + + const pivot = child.userData.pivot; + + child.position.x += pivot[ 0 ]; + child.position.y += pivot[ 1 ]; + child.position.z += pivot[ 2 ]; + + if ( child.parent ) { + + const parentPivot = child.parent.userData.pivot; + + child.position.x -= parentPivot[ 0 ]; + child.position.y -= parentPivot[ 1 ]; + child.position.z -= parentPivot[ 2 ]; + + } + + } ); + + } ); + + } + + getMaterials( namesArray, type ) { + + const materials = []; + + const scope = this; + + namesArray.forEach( function ( name, i ) { + + materials[ i ] = scope.getMaterialByName( name ); + + } ); + + // convert materials to line or point mats if required + if ( type === 'points' || type === 'lines' ) { + + materials.forEach( function ( mat, i ) { + + const spec = { + color: mat.color, + }; + + if ( type === 'points' ) { + + spec.size = 0.1; + spec.map = mat.map; + materials[ i ] = new PointsMaterial( spec ); + + } else if ( type === 'lines' ) { + + materials[ i ] = new LineBasicMaterial( spec ); + + } + + } ); + + } + + // if there is only one material, return that directly instead of array + const filtered = materials.filter( Boolean ); + if ( filtered.length === 1 ) return filtered[ 0 ]; + + return materials; + + } + + getMaterialByName( name ) { + + return this.materials.filter( function ( m ) { + + return m.name === name; + + } )[ 0 ]; + + } + +} + +class MaterialParser { + + constructor( textureLoader ) { + + this.textureLoader = textureLoader; + + } + + parse() { + + const materials = []; + this.textures = {}; + + for ( const name in _lwoTree.materials ) { + + if ( _lwoTree.format === 'LWO3' ) { + + materials.push( this.parseMaterial( _lwoTree.materials[ name ], name, _lwoTree.textures ) ); + + } else if ( _lwoTree.format === 'LWO2' ) { + + materials.push( this.parseMaterialLwo2( _lwoTree.materials[ name ], name, _lwoTree.textures ) ); + + } + + } + + return materials; + + } + + parseMaterial( materialData, name, textures ) { + + let params = { + name: name, + side: this.getSide( materialData.attributes ), + flatShading: this.getSmooth( materialData.attributes ), + }; + + const connections = this.parseConnections( materialData.connections, materialData.nodes ); + + const maps = this.parseTextureNodes( connections.maps ); + + this.parseAttributeImageMaps( connections.attributes, textures, maps, materialData.maps ); + + const attributes = this.parseAttributes( connections.attributes, maps ); + + this.parseEnvMap( connections, maps, attributes ); + + params = Object.assign( maps, params ); + params = Object.assign( params, attributes ); + + const materialType = this.getMaterialType( connections.attributes ); + + if ( materialType !== MeshPhongMaterial ) delete params.refractionRatio; // PBR materials do not support "refractionRatio" + + return new materialType( params ); + + } + + parseMaterialLwo2( materialData, name/*, textures*/ ) { + + let params = { + name: name, + side: this.getSide( materialData.attributes ), + flatShading: this.getSmooth( materialData.attributes ), + }; + + const attributes = this.parseAttributes( materialData.attributes, {} ); + params = Object.assign( params, attributes ); + return new MeshPhongMaterial( params ); + + } + + // Note: converting from left to right handed coords by switching x -> -x in vertices, and + // then switching mat FrontSide -> BackSide + // NB: this means that FrontSide and BackSide have been switched! + getSide( attributes ) { + + if ( ! attributes.side ) return BackSide; + + switch ( attributes.side ) { + + case 0: + case 1: + return BackSide; + case 2: return FrontSide; + case 3: return DoubleSide; + + } + + } + + getSmooth( attributes ) { + + if ( ! attributes.smooth ) return true; + return ! attributes.smooth; + + } + + parseConnections( connections, nodes ) { + + const materialConnections = { + maps: {} + }; + + const inputName = connections.inputName; + const inputNodeName = connections.inputNodeName; + const nodeName = connections.nodeName; + + const scope = this; + inputName.forEach( function ( name, index ) { + + if ( name === 'Material' ) { + + const matNode = scope.getNodeByRefName( inputNodeName[ index ], nodes ); + materialConnections.attributes = matNode.attributes; + materialConnections.envMap = matNode.fileName; + materialConnections.name = inputNodeName[ index ]; + + } + + } ); + + nodeName.forEach( function ( name, index ) { + + if ( name === materialConnections.name ) { + + materialConnections.maps[ inputName[ index ] ] = scope.getNodeByRefName( inputNodeName[ index ], nodes ); + + } + + } ); + + return materialConnections; + + } + + getNodeByRefName( refName, nodes ) { + + for ( const name in nodes ) { + + if ( nodes[ name ].refName === refName ) return nodes[ name ]; + + } + + } + + parseTextureNodes( textureNodes ) { + + const maps = {}; + + for ( const name in textureNodes ) { + + const node = textureNodes[ name ]; + const path = node.fileName; + + if ( ! path ) return; + + const texture = this.loadTexture( path ); + + if ( node.widthWrappingMode !== undefined ) texture.wrapS = this.getWrappingType( node.widthWrappingMode ); + if ( node.heightWrappingMode !== undefined ) texture.wrapT = this.getWrappingType( node.heightWrappingMode ); + + switch ( name ) { + + case 'Color': + maps.map = texture; + maps.map.colorSpace = SRGBColorSpace; + break; + case 'Roughness': + maps.roughnessMap = texture; + maps.roughness = 1; + break; + case 'Specular': + maps.specularMap = texture; + maps.specularMap.colorSpace = SRGBColorSpace; + maps.specular = 0xffffff; + break; + case 'Luminous': + maps.emissiveMap = texture; + maps.emissiveMap.colorSpace = SRGBColorSpace; + maps.emissive = 0x808080; + break; + case 'Luminous Color': + maps.emissive = 0x808080; + break; + case 'Metallic': + maps.metalnessMap = texture; + maps.metalness = 1; + break; + case 'Transparency': + case 'Alpha': + maps.alphaMap = texture; + maps.transparent = true; + break; + case 'Normal': + maps.normalMap = texture; + if ( node.amplitude !== undefined ) maps.normalScale = new Vector2( node.amplitude, node.amplitude ); + break; + case 'Bump': + maps.bumpMap = texture; + break; + + } + + } + + // LWO BSDF materials can have both spec and rough, but this is not valid in three + if ( maps.roughnessMap && maps.specularMap ) delete maps.specularMap; + + return maps; + + } + + // maps can also be defined on individual material attributes, parse those here + // This occurs on Standard (Phong) surfaces + parseAttributeImageMaps( attributes, textures, maps ) { + + for ( const name in attributes ) { + + const attribute = attributes[ name ]; + + if ( attribute.maps ) { + + const mapData = attribute.maps[ 0 ]; + + const path = this.getTexturePathByIndex( mapData.imageIndex, textures ); + if ( ! path ) return; + + const texture = this.loadTexture( path ); + + if ( mapData.wrap !== undefined ) texture.wrapS = this.getWrappingType( mapData.wrap.w ); + if ( mapData.wrap !== undefined ) texture.wrapT = this.getWrappingType( mapData.wrap.h ); + + switch ( name ) { + + case 'Color': + maps.map = texture; + maps.map.colorSpace = SRGBColorSpace; + break; + case 'Diffuse': + maps.aoMap = texture; + break; + case 'Roughness': + maps.roughnessMap = texture; + maps.roughness = 1; + break; + case 'Specular': + maps.specularMap = texture; + maps.specularMap.colorSpace = SRGBColorSpace; + maps.specular = 0xffffff; + break; + case 'Luminosity': + maps.emissiveMap = texture; + maps.emissiveMap.colorSpace = SRGBColorSpace; + maps.emissive = 0x808080; + break; + case 'Metallic': + maps.metalnessMap = texture; + maps.metalness = 1; + break; + case 'Transparency': + case 'Alpha': + maps.alphaMap = texture; + maps.transparent = true; + break; + case 'Normal': + maps.normalMap = texture; + break; + case 'Bump': + maps.bumpMap = texture; + break; + + } + + } + + } + + } + + parseAttributes( attributes, maps ) { + + const params = {}; + + // don't use color data if color map is present + if ( attributes.Color && ! maps.map ) { + + params.color = new Color().fromArray( attributes.Color.value ); + + } else { + + params.color = new Color(); + + } + + + if ( attributes.Transparency && attributes.Transparency.value !== 0 ) { + + params.opacity = 1 - attributes.Transparency.value; + params.transparent = true; + + } + + if ( attributes[ 'Bump Height' ] ) params.bumpScale = attributes[ 'Bump Height' ].value * 0.1; + + this.parsePhysicalAttributes( params, attributes, maps ); + this.parseStandardAttributes( params, attributes, maps ); + this.parsePhongAttributes( params, attributes, maps ); + + return params; + + } + + parsePhysicalAttributes( params, attributes/*, maps*/ ) { + + if ( attributes.Clearcoat && attributes.Clearcoat.value > 0 ) { + + params.clearcoat = attributes.Clearcoat.value; + + if ( attributes[ 'Clearcoat Gloss' ] ) { + + params.clearcoatRoughness = 0.5 * ( 1 - attributes[ 'Clearcoat Gloss' ].value ); + + } + + } + + } + + parseStandardAttributes( params, attributes, maps ) { + + + if ( attributes.Luminous ) { + + params.emissiveIntensity = attributes.Luminous.value; + + if ( attributes[ 'Luminous Color' ] && ! maps.emissive ) { + + params.emissive = new Color().fromArray( attributes[ 'Luminous Color' ].value ); + + } else { + + params.emissive = new Color( 0x808080 ); + + } + + } + + if ( attributes.Roughness && ! maps.roughnessMap ) params.roughness = attributes.Roughness.value; + if ( attributes.Metallic && ! maps.metalnessMap ) params.metalness = attributes.Metallic.value; + + } + + parsePhongAttributes( params, attributes, maps ) { + + if ( attributes[ 'Refraction Index' ] ) params.refractionRatio = 0.98 / attributes[ 'Refraction Index' ].value; + + if ( attributes.Diffuse ) params.color.multiplyScalar( attributes.Diffuse.value ); + + if ( attributes.Reflection ) { + + params.reflectivity = attributes.Reflection.value; + params.combine = AddOperation; + + } + + if ( attributes.Luminosity ) { + + params.emissiveIntensity = attributes.Luminosity.value; + + if ( ! maps.emissiveMap && ! maps.map ) { + + params.emissive = params.color; + + } else { + + params.emissive = new Color( 0x808080 ); + + } + + } + + // parse specular if there is no roughness - we will interpret the material as 'Phong' in this case + if ( ! attributes.Roughness && attributes.Specular && ! maps.specularMap ) { + + if ( attributes[ 'Color Highlight' ] ) { + + params.specular = new Color().setScalar( attributes.Specular.value ).lerp( params.color.clone().multiplyScalar( attributes.Specular.value ), attributes[ 'Color Highlight' ].value ); + + } else { + + params.specular = new Color().setScalar( attributes.Specular.value ); + + } + + } + + if ( params.specular && attributes.Glossiness ) params.shininess = 7 + Math.pow( 2, attributes.Glossiness.value * 12 + 2 ); + + } + + parseEnvMap( connections, maps, attributes ) { + + if ( connections.envMap ) { + + const envMap = this.loadTexture( connections.envMap ); + + if ( attributes.transparent && attributes.opacity < 0.999 ) { + + envMap.mapping = EquirectangularRefractionMapping; + + // Reflectivity and refraction mapping don't work well together in Phong materials + if ( attributes.reflectivity !== undefined ) { + + delete attributes.reflectivity; + delete attributes.combine; + + } + + if ( attributes.metalness !== undefined ) { + + attributes.metalness = 1; // For most transparent materials metalness should be set to 1 if not otherwise defined. If set to 0 no refraction will be visible + + } + + attributes.opacity = 1; // transparency fades out refraction, forcing opacity to 1 ensures a closer visual match to the material in Lightwave. + + } else envMap.mapping = EquirectangularReflectionMapping; + + maps.envMap = envMap; + + } + + } + + // get texture defined at top level by its index + getTexturePathByIndex( index ) { + + let fileName = ''; + + if ( ! _lwoTree.textures ) return fileName; + + _lwoTree.textures.forEach( function ( texture ) { + + if ( texture.index === index ) fileName = texture.fileName; + + } ); + + return fileName; + + } + + loadTexture( path ) { + + if ( ! path ) return null; + + const texture = this.textureLoader.load( + path, + undefined, + undefined, + function () { + + console.warn( 'LWOLoader: non-standard resource hierarchy. Use \`resourcePath\` parameter to specify root content directory.' ); + + } + ); + + return texture; + + } + + // 0 = Reset, 1 = Repeat, 2 = Mirror, 3 = Edge + getWrappingType( num ) { + + switch ( num ) { + + case 0: + console.warn( 'LWOLoader: "Reset" texture wrapping type is not supported in three.js' ); + return ClampToEdgeWrapping; + case 1: return RepeatWrapping; + case 2: return MirroredRepeatWrapping; + case 3: return ClampToEdgeWrapping; + + } + + } + + getMaterialType( nodeData ) { + + if ( nodeData.Clearcoat && nodeData.Clearcoat.value > 0 ) return MeshPhysicalMaterial; + if ( nodeData.Roughness ) return MeshStandardMaterial; + return MeshPhongMaterial; + + } + +} + +class GeometryParser { + + parse( geoData, layer ) { + + const geometry = new BufferGeometry(); + + geometry.setAttribute( 'position', new Float32BufferAttribute( geoData.points, 3 ) ); + + const indices = this.splitIndices( geoData.vertexIndices, geoData.polygonDimensions ); + geometry.setIndex( indices ); + + this.parseGroups( geometry, geoData ); + + geometry.computeVertexNormals(); + + this.parseUVs( geometry, layer, indices ); + this.parseMorphTargets( geometry, layer, indices ); + + // TODO: z may need to be reversed to account for coordinate system change + geometry.translate( - layer.pivot[ 0 ], - layer.pivot[ 1 ], - layer.pivot[ 2 ] ); + + // let userData = geometry.userData; + // geometry = geometry.toNonIndexed() + // geometry.userData = userData; + + return geometry; + + } + + // split quads into tris + splitIndices( indices, polygonDimensions ) { + + const remappedIndices = []; + + let i = 0; + polygonDimensions.forEach( function ( dim ) { + + if ( dim < 4 ) { + + for ( let k = 0; k < dim; k ++ ) remappedIndices.push( indices[ i + k ] ); + + } else if ( dim === 4 ) { + + remappedIndices.push( + indices[ i ], + indices[ i + 1 ], + indices[ i + 2 ], + + indices[ i ], + indices[ i + 2 ], + indices[ i + 3 ] + + ); + + } else if ( dim > 4 ) { + + for ( let k = 1; k < dim - 1; k ++ ) { + + remappedIndices.push( indices[ i ], indices[ i + k ], indices[ i + k + 1 ] ); + + } + + console.warn( 'LWOLoader: polygons with greater than 4 sides are not supported' ); + + } + + i += dim; + + } ); + + return remappedIndices; + + } + + // NOTE: currently ignoring poly indices and assuming that they are intelligently ordered + parseGroups( geometry, geoData ) { + + const tags = _lwoTree.tags; + const matNames = []; + + let elemSize = 3; + if ( geoData.type === 'lines' ) elemSize = 2; + if ( geoData.type === 'points' ) elemSize = 1; + + const remappedIndices = this.splitMaterialIndices( geoData.polygonDimensions, geoData.materialIndices ); + + let indexNum = 0; // create new indices in numerical order + const indexPairs = {}; // original indices mapped to numerical indices + + let prevMaterialIndex; + let materialIndex; + + let prevStart = 0; + let currentCount = 0; + + for ( let i = 0; i < remappedIndices.length; i += 2 ) { + + materialIndex = remappedIndices[ i + 1 ]; + + if ( i === 0 ) matNames[ indexNum ] = tags[ materialIndex ]; + + if ( prevMaterialIndex === undefined ) prevMaterialIndex = materialIndex; + + if ( materialIndex !== prevMaterialIndex ) { + + let currentIndex; + if ( indexPairs[ tags[ prevMaterialIndex ] ] ) { + + currentIndex = indexPairs[ tags[ prevMaterialIndex ] ]; + + } else { + + currentIndex = indexNum; + indexPairs[ tags[ prevMaterialIndex ] ] = indexNum; + matNames[ indexNum ] = tags[ prevMaterialIndex ]; + indexNum ++; + + } + + geometry.addGroup( prevStart, currentCount, currentIndex ); + + prevStart += currentCount; + + prevMaterialIndex = materialIndex; + currentCount = 0; + + } + + currentCount += elemSize; + + } + + // the loop above doesn't add the last group, do that here. + if ( geometry.groups.length > 0 ) { + + let currentIndex; + if ( indexPairs[ tags[ materialIndex ] ] ) { + + currentIndex = indexPairs[ tags[ materialIndex ] ]; + + } else { + + currentIndex = indexNum; + indexPairs[ tags[ materialIndex ] ] = indexNum; + matNames[ indexNum ] = tags[ materialIndex ]; + + } + + geometry.addGroup( prevStart, currentCount, currentIndex ); + + } + + // Mat names from TAGS chunk, used to build up an array of materials for this geometry + geometry.userData.matNames = matNames; + + } + + splitMaterialIndices( polygonDimensions, indices ) { + + const remappedIndices = []; + + polygonDimensions.forEach( function ( dim, i ) { + + if ( dim <= 3 ) { + + remappedIndices.push( indices[ i * 2 ], indices[ i * 2 + 1 ] ); + + } else if ( dim === 4 ) { + + remappedIndices.push( indices[ i * 2 ], indices[ i * 2 + 1 ], indices[ i * 2 ], indices[ i * 2 + 1 ] ); + + } else { + + // ignore > 4 for now + for ( let k = 0; k < dim - 2; k ++ ) { + + remappedIndices.push( indices[ i * 2 ], indices[ i * 2 + 1 ] ); + + } + + } + + } ); + + return remappedIndices; + + } + + // UV maps: + // 1: are defined via index into an array of points, not into a geometry + // - the geometry is also defined by an index into this array, but the indexes may not match + // 2: there can be any number of UV maps for a single geometry. Here these are combined, + // with preference given to the first map encountered + // 3: UV maps can be partial - that is, defined for only a part of the geometry + // 4: UV maps can be VMAP or VMAD (discontinuous, to allow for seams). In practice, most + // UV maps are defined as partially VMAP and partially VMAD + // VMADs are currently not supported + parseUVs( geometry, layer ) { + + // start by creating a UV map set to zero for the whole geometry + const remappedUVs = Array.from( Array( geometry.attributes.position.count * 2 ), function () { + + return 0; + + } ); + + for ( const name in layer.uvs ) { + + const uvs = layer.uvs[ name ].uvs; + const uvIndices = layer.uvs[ name ].uvIndices; + + uvIndices.forEach( function ( i, j ) { + + remappedUVs[ i * 2 ] = uvs[ j * 2 ]; + remappedUVs[ i * 2 + 1 ] = uvs[ j * 2 + 1 ]; + + } ); + + } + + geometry.setAttribute( 'uv', new Float32BufferAttribute( remappedUVs, 2 ) ); + + } + + parseMorphTargets( geometry, layer ) { + + let num = 0; + for ( const name in layer.morphTargets ) { + + const remappedPoints = geometry.attributes.position.array.slice(); + + if ( ! geometry.morphAttributes.position ) geometry.morphAttributes.position = []; + + const morphPoints = layer.morphTargets[ name ].points; + const morphIndices = layer.morphTargets[ name ].indices; + const type = layer.morphTargets[ name ].type; + + morphIndices.forEach( function ( i, j ) { + + if ( type === 'relative' ) { + + remappedPoints[ i * 3 ] += morphPoints[ j * 3 ]; + remappedPoints[ i * 3 + 1 ] += morphPoints[ j * 3 + 1 ]; + remappedPoints[ i * 3 + 2 ] += morphPoints[ j * 3 + 2 ]; + + } else { + + remappedPoints[ i * 3 ] = morphPoints[ j * 3 ]; + remappedPoints[ i * 3 + 1 ] = morphPoints[ j * 3 + 1 ]; + remappedPoints[ i * 3 + 2 ] = morphPoints[ j * 3 + 2 ]; + + } + + } ); + + geometry.morphAttributes.position[ num ] = new Float32BufferAttribute( remappedPoints, 3 ); + geometry.morphAttributes.position[ num ].name = name; + + num ++; + + } + + geometry.morphTargetsRelative = false; + + } + +} + + +// ************** UTILITY FUNCTIONS ************** + +function extractParentUrl( url, dir ) { + + const index = url.indexOf( dir ); + + if ( index === - 1 ) return './'; + + return url.slice( 0, index ); + +} + +export { LWOLoader }; diff --git a/node_modules/three/examples/jsm/loaders/LogLuvLoader.js b/node_modules/three/examples/jsm/loaders/LogLuvLoader.js new file mode 100644 index 0000000..310cdd6 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/LogLuvLoader.js @@ -0,0 +1,606 @@ +import { + DataUtils, + DataTextureLoader, + FloatType, + HalfFloatType, + RGBAFormat +} from 'three'; + +class LogLuvLoader extends DataTextureLoader { + + constructor( manager ) { + + super( manager ); + + this.type = HalfFloatType; + + } + + parse( buffer ) { + + const ifds = UTIF.decode( buffer ); + UTIF.decodeImage( buffer, ifds[ 0 ] ); + const rgba = UTIF.toRGBA( ifds[ 0 ], this.type ); + + return { + width: ifds[ 0 ].width, + height: ifds[ 0 ].height, + data: rgba, + format: RGBAFormat, + type: this.type, + flipY: true + }; + + } + + setDataType( value ) { + + this.type = value; + return this; + + } + +} + +// from https://github.com/photopea/UTIF.js (MIT License) + +const UTIF = {}; + +UTIF.decode = function ( buff, prm ) { + + if ( prm == null ) prm = { parseMN: true, debug: false }; // read MakerNote, debug + var data = new Uint8Array( buff ), offset = 0; + + var id = UTIF._binBE.readASCII( data, offset, 2 ); offset += 2; + var bin = id == 'II' ? UTIF._binLE : UTIF._binBE; + bin.readUshort( data, offset ); offset += 2; + + var ifdo = bin.readUint( data, offset ); + var ifds = []; + while ( true ) { + + var cnt = bin.readUshort( data, ifdo ), typ = bin.readUshort( data, ifdo + 4 ); if ( cnt != 0 ) if ( typ < 1 || 13 < typ ) { + + console.log( 'error in TIFF' ); break; + + } + + + UTIF._readIFD( bin, data, ifdo, ifds, 0, prm ); + + ifdo = bin.readUint( data, ifdo + 2 + cnt * 12 ); + if ( ifdo == 0 ) break; + + } + + return ifds; + +}; + +UTIF.decodeImage = function ( buff, img, ifds ) { + + if ( img.data ) return; + var data = new Uint8Array( buff ); + var id = UTIF._binBE.readASCII( data, 0, 2 ); + + if ( img[ 't256' ] == null ) return; // No width => probably not an image + img.isLE = id == 'II'; + img.width = img[ 't256' ][ 0 ]; //delete img["t256"]; + img.height = img[ 't257' ][ 0 ]; //delete img["t257"]; + + var cmpr = img[ 't259' ] ? img[ 't259' ][ 0 ] : 1; //delete img["t259"]; + var fo = img[ 't266' ] ? img[ 't266' ][ 0 ] : 1; //delete img["t266"]; + if ( img[ 't284' ] && img[ 't284' ][ 0 ] == 2 ) console.log( 'PlanarConfiguration 2 should not be used!' ); + if ( cmpr == 7 && img[ 't258' ] && img[ 't258' ].length > 3 ) img[ 't258' ] = img[ 't258' ].slice( 0, 3 ); + + var bipp; // bits per pixel + if ( img[ 't258' ] ) bipp = Math.min( 32, img[ 't258' ][ 0 ] ) * img[ 't258' ].length; + else bipp = ( img[ 't277' ] ? img[ 't277' ][ 0 ] : 1 ); + // Some .NEF files have t258==14, even though they use 16 bits per pixel + if ( cmpr == 1 && img[ 't279' ] != null && img[ 't278' ] && img[ 't262' ][ 0 ] == 32803 ) { + + bipp = Math.round( ( img[ 't279' ][ 0 ] * 8 ) / ( img.width * img[ 't278' ][ 0 ] ) ); + + } + + var bipl = Math.ceil( img.width * bipp / 8 ) * 8; + var soff = img[ 't273' ]; if ( soff == null ) soff = img[ 't324' ]; + var bcnt = img[ 't279' ]; if ( cmpr == 1 && soff.length == 1 ) bcnt = [ img.height * ( bipl >>> 3 ) ]; if ( bcnt == null ) bcnt = img[ 't325' ]; + //bcnt[0] = Math.min(bcnt[0], data.length); // Hasselblad, "RAW_HASSELBLAD_H3D39II.3FR" + var bytes = new Uint8Array( img.height * ( bipl >>> 3 ) ), bilen = 0; + + if ( img[ 't322' ] != null ) { + + var tw = img[ 't322' ][ 0 ], th = img[ 't323' ][ 0 ]; + var tx = Math.floor( ( img.width + tw - 1 ) / tw ); + var ty = Math.floor( ( img.height + th - 1 ) / th ); + var tbuff = new Uint8Array( Math.ceil( tw * th * bipp / 8 ) | 0 ); + for ( var y = 0; y < ty; y ++ ) + for ( var x = 0; x < tx; x ++ ) { + + var i = y * tx + x; for ( var j = 0; j < tbuff.length; j ++ ) tbuff[ j ] = 0; + UTIF.decode._decompress( img, ifds, data, soff[ i ], bcnt[ i ], cmpr, tbuff, 0, fo ); + // Might be required for 7 too. Need to check + if ( cmpr == 6 ) bytes = tbuff; + else UTIF._copyTile( tbuff, Math.ceil( tw * bipp / 8 ) | 0, th, bytes, Math.ceil( img.width * bipp / 8 ) | 0, img.height, Math.ceil( x * tw * bipp / 8 ) | 0, y * th ); + + } + + bilen = bytes.length * 8; + + } else { + + var rps = img[ 't278' ] ? img[ 't278' ][ 0 ] : img.height; rps = Math.min( rps, img.height ); + for ( var i = 0; i < soff.length; i ++ ) { + + UTIF.decode._decompress( img, ifds, data, soff[ i ], bcnt[ i ], cmpr, bytes, Math.ceil( bilen / 8 ) | 0, fo ); + bilen += bipl * rps; + + } + + bilen = Math.min( bilen, bytes.length * 8 ); + + } + + img.data = new Uint8Array( bytes.buffer, 0, Math.ceil( bilen / 8 ) | 0 ); + +}; + +UTIF.decode._decompress = function ( img, ifds, data, off, len, cmpr, tgt, toff ) { + + //console.log("compression", cmpr); + //var time = Date.now(); + if ( cmpr == 34676 ) UTIF.decode._decodeLogLuv32( img, data, off, len, tgt, toff ); + else console.log( 'Unsupported compression', cmpr ); + + //console.log(Date.now()-time); + + var bps = ( img[ 't258' ] ? Math.min( 32, img[ 't258' ][ 0 ] ) : 1 ); + var noc = ( img[ 't277' ] ? img[ 't277' ][ 0 ] : 1 ), bpp = ( bps * noc ) >>> 3, h = ( img[ 't278' ] ? img[ 't278' ][ 0 ] : img.height ), bpl = Math.ceil( bps * noc * img.width / 8 ); + + // convert to Little Endian /* + if ( bps == 16 && ! img.isLE && img[ 't33422' ] == null ) // not DNG + for ( var y = 0; y < h; y ++ ) { + + //console.log("fixing endianity"); + var roff = toff + y * bpl; + for ( var x = 1; x < bpl; x += 2 ) { + + var t = tgt[ roff + x ]; tgt[ roff + x ] = tgt[ roff + x - 1 ]; tgt[ roff + x - 1 ] = t; + + } + + } //*/ + + if ( img[ 't317' ] && img[ 't317' ][ 0 ] == 2 ) { + + for ( var y = 0; y < h; y ++ ) { + + var ntoff = toff + y * bpl; + if ( bps == 16 ) for ( var j = bpp; j < bpl; j += 2 ) { + + var nv = ( ( tgt[ ntoff + j + 1 ] << 8 ) | tgt[ ntoff + j ] ) + ( ( tgt[ ntoff + j - bpp + 1 ] << 8 ) | tgt[ ntoff + j - bpp ] ); + tgt[ ntoff + j ] = nv & 255; tgt[ ntoff + j + 1 ] = ( nv >>> 8 ) & 255; + + } + else if ( noc == 3 ) for ( var j = 3; j < bpl; j += 3 ) { + + tgt[ ntoff + j ] = ( tgt[ ntoff + j ] + tgt[ ntoff + j - 3 ] ) & 255; + tgt[ ntoff + j + 1 ] = ( tgt[ ntoff + j + 1 ] + tgt[ ntoff + j - 2 ] ) & 255; + tgt[ ntoff + j + 2 ] = ( tgt[ ntoff + j + 2 ] + tgt[ ntoff + j - 1 ] ) & 255; + + } + else for ( var j = bpp; j < bpl; j ++ ) tgt[ ntoff + j ] = ( tgt[ ntoff + j ] + tgt[ ntoff + j - bpp ] ) & 255; + + } + + } + +}; + +UTIF.decode._decodeLogLuv32 = function ( img, data, off, len, tgt, toff ) { + + var w = img.width, qw = w * 4; + var io = 0, out = new Uint8Array( qw ); + + while ( io < len ) { + + var oo = 0; + while ( oo < qw ) { + + var c = data[ off + io ]; io ++; + if ( c < 128 ) { + + for ( var j = 0; j < c; j ++ ) out[ oo + j ] = data[ off + io + j ]; oo += c; io += c; + + } else { + + c = c - 126; for ( var j = 0; j < c; j ++ ) out[ oo + j ] = data[ off + io ]; oo += c; io ++; + + } + + } + + for ( var x = 0; x < w; x ++ ) { + + tgt[ toff + 0 ] = out[ x ]; + tgt[ toff + 1 ] = out[ x + w ]; + tgt[ toff + 2 ] = out[ x + w * 2 ]; + tgt[ toff + 4 ] = out[ x + w * 3 ]; + toff += 6; + + } + + } + +}; + +UTIF.tags = {}; +//UTIF.ttypes = { 256:3,257:3,258:3, 259:3, 262:3, 273:4, 274:3, 277:3,278:4,279:4, 282:5, 283:5, 284:3, 286:5,287:5, 296:3, 305:2, 306:2, 338:3, 513:4, 514:4, 34665:4 }; +// start at tag 250 +UTIF._types = function () { + + var main = new Array( 250 ); main.fill( 0 ); + main = main.concat( [ 0, 0, 0, 0, 4, 3, 3, 3, 3, 3, 0, 0, 3, 0, 0, 0, 3, 0, 0, 2, 2, 2, 2, 4, 3, 0, 0, 3, 4, 4, 3, 3, 5, 5, 3, 2, 5, 5, 0, 0, 0, 0, 4, 4, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 3, 5, 5, 3, 0, 3, 3, 4, 4, 4, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ); + var rest = { 33432: 2, 33434: 5, 33437: 5, 34665: 4, 34850: 3, 34853: 4, 34855: 3, 34864: 3, 34866: 4, 36864: 7, 36867: 2, 36868: 2, 37121: 7, 37377: 10, 37378: 5, 37380: 10, 37381: 5, 37383: 3, 37384: 3, 37385: 3, 37386: 5, 37510: 7, 37520: 2, 37521: 2, 37522: 2, 40960: 7, 40961: 3, 40962: 4, 40963: 4, 40965: 4, 41486: 5, 41487: 5, 41488: 3, 41985: 3, 41986: 3, 41987: 3, 41988: 5, 41989: 3, 41990: 3, 41993: 3, 41994: 3, 41995: 7, 41996: 3, 42032: 2, 42033: 2, 42034: 5, 42036: 2, 42037: 2, 59932: 7 }; + return { + basic: { + main: main, + rest: rest + }, + gps: { + main: [ 1, 2, 5, 2, 5, 1, 5, 5, 0, 9 ], + rest: { 18: 2, 29: 2 } + } + }; + +}(); + +UTIF._readIFD = function ( bin, data, offset, ifds, depth, prm ) { + + var cnt = bin.readUshort( data, offset ); offset += 2; + var ifd = {}; + + if ( prm.debug ) console.log( ' '.repeat( depth ), ifds.length - 1, '>>>----------------' ); + for ( var i = 0; i < cnt; i ++ ) { + + var tag = bin.readUshort( data, offset ); offset += 2; + var type = bin.readUshort( data, offset ); offset += 2; + var num = bin.readUint( data, offset ); offset += 4; + var voff = bin.readUint( data, offset ); offset += 4; + + var arr = []; + //ifd["t"+tag+"-"+UTIF.tags[tag]] = arr; + if ( type == 1 || type == 7 ) { + + arr = new Uint8Array( data.buffer, ( num < 5 ? offset - 4 : voff ), num ); + + } + + if ( type == 2 ) { + + var o0 = ( num < 5 ? offset - 4 : voff ), c = data[ o0 ], len = Math.max( 0, Math.min( num - 1, data.length - o0 ) ); + if ( c < 128 || len == 0 ) arr.push( bin.readASCII( data, o0, len ) ); + else arr = new Uint8Array( data.buffer, o0, len ); + + } + + if ( type == 3 ) { + + for ( var j = 0; j < num; j ++ ) arr.push( bin.readUshort( data, ( num < 3 ? offset - 4 : voff ) + 2 * j ) ); + + } + + if ( type == 4 + || type == 13 ) { + + for ( var j = 0; j < num; j ++ ) arr.push( bin.readUint( data, ( num < 2 ? offset - 4 : voff ) + 4 * j ) ); + + } + + if ( type == 5 || type == 10 ) { + + var ri = type == 5 ? bin.readUint : bin.readInt; + for ( var j = 0; j < num; j ++ ) arr.push( [ ri( data, voff + j * 8 ), ri( data, voff + j * 8 + 4 ) ] ); + + } + + if ( type == 8 ) { + + for ( var j = 0; j < num; j ++ ) arr.push( bin.readShort( data, ( num < 3 ? offset - 4 : voff ) + 2 * j ) ); + + } + + if ( type == 9 ) { + + for ( var j = 0; j < num; j ++ ) arr.push( bin.readInt( data, ( num < 2 ? offset - 4 : voff ) + 4 * j ) ); + + } + + if ( type == 11 ) { + + for ( var j = 0; j < num; j ++ ) arr.push( bin.readFloat( data, voff + j * 4 ) ); + + } + + if ( type == 12 ) { + + for ( var j = 0; j < num; j ++ ) arr.push( bin.readDouble( data, voff + j * 8 ) ); + + } + + if ( num != 0 && arr.length == 0 ) { + + console.log( tag, 'unknown TIFF tag type: ', type, 'num:', num ); if ( i == 0 ) return; continue; + + } + + if ( prm.debug ) console.log( ' '.repeat( depth ), tag, type, UTIF.tags[ tag ], arr ); + + ifd[ 't' + tag ] = arr; + + if ( tag == 330 || tag == 34665 || tag == 34853 || ( tag == 50740 && bin.readUshort( data, bin.readUint( arr, 0 ) ) < 300 ) || tag == 61440 ) { + + var oarr = tag == 50740 ? [ bin.readUint( arr, 0 ) ] : arr; + var subfd = []; + for ( var j = 0; j < oarr.length; j ++ ) UTIF._readIFD( bin, data, oarr[ j ], subfd, depth + 1, prm ); + if ( tag == 330 ) ifd.subIFD = subfd; + if ( tag == 34665 ) ifd.exifIFD = subfd[ 0 ]; + if ( tag == 34853 ) ifd.gpsiIFD = subfd[ 0 ]; //console.log("gps", subfd[0]); } + if ( tag == 50740 ) ifd.dngPrvt = subfd[ 0 ]; + if ( tag == 61440 ) ifd.fujiIFD = subfd[ 0 ]; + + } + + if ( tag == 37500 && prm.parseMN ) { + + var mn = arr; + //console.log(bin.readASCII(mn,0,mn.length), mn); + if ( bin.readASCII( mn, 0, 5 ) == 'Nikon' ) ifd.makerNote = UTIF[ 'decode' ]( mn.slice( 10 ).buffer )[ 0 ]; + else if ( bin.readUshort( data, voff ) < 300 && bin.readUshort( data, voff + 4 ) <= 12 ) { + + var subsub = []; UTIF._readIFD( bin, data, voff, subsub, depth + 1, prm ); + ifd.makerNote = subsub[ 0 ]; + + } + + } + + } + + ifds.push( ifd ); + if ( prm.debug ) console.log( ' '.repeat( depth ), '<<<---------------' ); + return offset; + +}; + +UTIF.toRGBA = function ( out, type ) { + + const w = out.width, h = out.height, area = w * h, data = out.data; + + let img; + + switch ( type ) { + + case HalfFloatType: + + img = new Uint16Array( area * 4 ); + break; + + case FloatType: + + img = new Float32Array( area * 4 ); + break; + + default: + throw new Error( 'THREE.LogLuvLoader: Unsupported texture data type: ' + type ); + + } + + let intp = out[ 't262' ] ? out[ 't262' ][ 0 ] : 2; + const bps = out[ 't258' ] ? Math.min( 32, out[ 't258' ][ 0 ] ) : 1; + + if ( out[ 't262' ] == null && bps == 1 ) intp = 0; + + if ( intp == 32845 ) { + + for ( let y = 0; y < h; y ++ ) { + + for ( let x = 0; x < w; x ++ ) { + + const si = ( y * w + x ) * 6, qi = ( y * w + x ) * 4; + let L = ( data[ si + 1 ] << 8 ) | data[ si ]; + + L = Math.pow( 2, ( L + 0.5 ) / 256 - 64 ); + const u = ( data[ si + 3 ] + 0.5 ) / 410; + const v = ( data[ si + 5 ] + 0.5 ) / 410; + + // Luv to xyY + const sX = ( 9 * u ) / ( 6 * u - 16 * v + 12 ); + const sY = ( 4 * v ) / ( 6 * u - 16 * v + 12 ); + const bY = L; + + // xyY to XYZ + const X = ( sX * bY ) / sY, Y = bY, Z = ( 1 - sX - sY ) * bY / sY; + + // XYZ to linear RGB + const r = 2.690 * X - 1.276 * Y - 0.414 * Z; + const g = - 1.022 * X + 1.978 * Y + 0.044 * Z; + const b = 0.061 * X - 0.224 * Y + 1.163 * Z; + + if ( type === HalfFloatType ) { + + img[ qi ] = DataUtils.toHalfFloat( Math.min( r, 65504 ) ); + img[ qi + 1 ] = DataUtils.toHalfFloat( Math.min( g, 65504 ) ); + img[ qi + 2 ] = DataUtils.toHalfFloat( Math.min( b, 65504 ) ); + img[ qi + 3 ] = DataUtils.toHalfFloat( 1 ); + + + } else { + + img[ qi ] = r; + img[ qi + 1 ] = g; + img[ qi + 2 ] = b; + img[ qi + 3 ] = 1; + + } + + } + + } + + } else { + + throw new Error( 'THREE.LogLuvLoader: Unsupported Photometric interpretation: ' + intp ); + + } + + return img; + +}; + +UTIF._binBE = +{ + nextZero: function ( data, o ) { + + while ( data[ o ] != 0 ) o ++; return o; + + }, + readUshort: function ( buff, p ) { + + return ( buff[ p ] << 8 ) | buff[ p + 1 ]; + + }, + readShort: function ( buff, p ) { + + var a = UTIF._binBE.ui8; a[ 0 ] = buff[ p + 1 ]; a[ 1 ] = buff[ p + 0 ]; return UTIF._binBE.i16[ 0 ]; + + }, + readInt: function ( buff, p ) { + + var a = UTIF._binBE.ui8; a[ 0 ] = buff[ p + 3 ]; a[ 1 ] = buff[ p + 2 ]; a[ 2 ] = buff[ p + 1 ]; a[ 3 ] = buff[ p + 0 ]; return UTIF._binBE.i32[ 0 ]; + + }, + readUint: function ( buff, p ) { + + var a = UTIF._binBE.ui8; a[ 0 ] = buff[ p + 3 ]; a[ 1 ] = buff[ p + 2 ]; a[ 2 ] = buff[ p + 1 ]; a[ 3 ] = buff[ p + 0 ]; return UTIF._binBE.ui32[ 0 ]; + + }, + readASCII: function ( buff, p, l ) { + + var s = ''; for ( var i = 0; i < l; i ++ ) s += String.fromCharCode( buff[ p + i ] ); return s; + + }, + readFloat: function ( buff, p ) { + + var a = UTIF._binBE.ui8; for ( var i = 0; i < 4; i ++ ) a[ i ] = buff[ p + 3 - i ]; return UTIF._binBE.fl32[ 0 ]; + + }, + readDouble: function ( buff, p ) { + + var a = UTIF._binBE.ui8; for ( var i = 0; i < 8; i ++ ) a[ i ] = buff[ p + 7 - i ]; return UTIF._binBE.fl64[ 0 ]; + + }, + + writeUshort: function ( buff, p, n ) { + + buff[ p ] = ( n >> 8 ) & 255; buff[ p + 1 ] = n & 255; + + }, + writeInt: function ( buff, p, n ) { + + var a = UTIF._binBE.ui8; UTIF._binBE.i32[ 0 ] = n; buff[ p + 3 ] = a[ 0 ]; buff[ p + 2 ] = a[ 1 ]; buff[ p + 1 ] = a[ 2 ]; buff[ p + 0 ] = a[ 3 ]; + + }, + writeUint: function ( buff, p, n ) { + + buff[ p ] = ( n >> 24 ) & 255; buff[ p + 1 ] = ( n >> 16 ) & 255; buff[ p + 2 ] = ( n >> 8 ) & 255; buff[ p + 3 ] = ( n >> 0 ) & 255; + + }, + writeASCII: function ( buff, p, s ) { + + for ( var i = 0; i < s.length; i ++ ) buff[ p + i ] = s.charCodeAt( i ); + + }, + writeDouble: function ( buff, p, n ) { + + UTIF._binBE.fl64[ 0 ] = n; + for ( var i = 0; i < 8; i ++ ) buff[ p + i ] = UTIF._binBE.ui8[ 7 - i ]; + + } +}; +UTIF._binBE.ui8 = new Uint8Array( 8 ); +UTIF._binBE.i16 = new Int16Array( UTIF._binBE.ui8.buffer ); +UTIF._binBE.i32 = new Int32Array( UTIF._binBE.ui8.buffer ); +UTIF._binBE.ui32 = new Uint32Array( UTIF._binBE.ui8.buffer ); +UTIF._binBE.fl32 = new Float32Array( UTIF._binBE.ui8.buffer ); +UTIF._binBE.fl64 = new Float64Array( UTIF._binBE.ui8.buffer ); + +UTIF._binLE = +{ + nextZero: UTIF._binBE.nextZero, + readUshort: function ( buff, p ) { + + return ( buff[ p + 1 ] << 8 ) | buff[ p ]; + + }, + readShort: function ( buff, p ) { + + var a = UTIF._binBE.ui8; a[ 0 ] = buff[ p + 0 ]; a[ 1 ] = buff[ p + 1 ]; return UTIF._binBE.i16[ 0 ]; + + }, + readInt: function ( buff, p ) { + + var a = UTIF._binBE.ui8; a[ 0 ] = buff[ p + 0 ]; a[ 1 ] = buff[ p + 1 ]; a[ 2 ] = buff[ p + 2 ]; a[ 3 ] = buff[ p + 3 ]; return UTIF._binBE.i32[ 0 ]; + + }, + readUint: function ( buff, p ) { + + var a = UTIF._binBE.ui8; a[ 0 ] = buff[ p + 0 ]; a[ 1 ] = buff[ p + 1 ]; a[ 2 ] = buff[ p + 2 ]; a[ 3 ] = buff[ p + 3 ]; return UTIF._binBE.ui32[ 0 ]; + + }, + readASCII: UTIF._binBE.readASCII, + readFloat: function ( buff, p ) { + + var a = UTIF._binBE.ui8; for ( var i = 0; i < 4; i ++ ) a[ i ] = buff[ p + i ]; return UTIF._binBE.fl32[ 0 ]; + + }, + readDouble: function ( buff, p ) { + + var a = UTIF._binBE.ui8; for ( var i = 0; i < 8; i ++ ) a[ i ] = buff[ p + i ]; return UTIF._binBE.fl64[ 0 ]; + + }, + + writeUshort: function ( buff, p, n ) { + + buff[ p ] = ( n ) & 255; buff[ p + 1 ] = ( n >> 8 ) & 255; + + }, + writeInt: function ( buff, p, n ) { + + var a = UTIF._binBE.ui8; UTIF._binBE.i32[ 0 ] = n; buff[ p + 0 ] = a[ 0 ]; buff[ p + 1 ] = a[ 1 ]; buff[ p + 2 ] = a[ 2 ]; buff[ p + 3 ] = a[ 3 ]; + + }, + writeUint: function ( buff, p, n ) { + + buff[ p ] = ( n >>> 0 ) & 255; buff[ p + 1 ] = ( n >>> 8 ) & 255; buff[ p + 2 ] = ( n >>> 16 ) & 255; buff[ p + 3 ] = ( n >>> 24 ) & 255; + + }, + writeASCII: UTIF._binBE.writeASCII +}; +UTIF._copyTile = function ( tb, tw, th, b, w, h, xoff, yoff ) { + + //log("copyTile", tw, th, w, h, xoff, yoff); + var xlim = Math.min( tw, w - xoff ); + var ylim = Math.min( th, h - yoff ); + for ( var y = 0; y < ylim; y ++ ) { + + var tof = ( yoff + y ) * w + xoff; + var sof = y * tw; + for ( var x = 0; x < xlim; x ++ ) b[ tof + x ] = tb[ sof + x ]; + + } + +}; + +export { LogLuvLoader }; diff --git a/node_modules/three/examples/jsm/loaders/LottieLoader.js b/node_modules/three/examples/jsm/loaders/LottieLoader.js new file mode 100644 index 0000000..4ef0401 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/LottieLoader.js @@ -0,0 +1,77 @@ +import { + FileLoader, + Loader, + CanvasTexture, + NearestFilter, + SRGBColorSpace +} from 'three'; + +import lottie from '../libs/lottie_canvas.module.js'; + +class LottieLoader extends Loader { + + setQuality( value ) { + + this._quality = value; + + } + + load( url, onLoad, onProgress, onError ) { + + const quality = this._quality || 1; + + const texture = new CanvasTexture(); + texture.minFilter = NearestFilter; + texture.colorSpace = SRGBColorSpace; + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setWithCredentials( this.withCredentials ); + + loader.load( url, function ( text ) { + + const data = JSON.parse( text ); + + // lottie uses container.offetWidth and offsetHeight + // to define width/height + + const container = document.createElement( 'div' ); + container.style.width = data.w + 'px'; + container.style.height = data.h + 'px'; + document.body.appendChild( container ); + + const animation = lottie.loadAnimation( { + container: container, + animType: 'canvas', + loop: true, + autoplay: true, + animationData: data, + rendererSettings: { dpr: quality } + } ); + + texture.animation = animation; + texture.image = animation.container; + + animation.addEventListener( 'enterFrame', function () { + + texture.needsUpdate = true; + + } ); + + container.style.display = 'none'; + + if ( onLoad !== undefined ) { + + onLoad( texture ); + + } + + }, onProgress, onError ); + + return texture; + + } + +} + +export { LottieLoader }; diff --git a/node_modules/three/examples/jsm/loaders/MD2Loader.js b/node_modules/three/examples/jsm/loaders/MD2Loader.js new file mode 100644 index 0000000..2d88be4 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/MD2Loader.js @@ -0,0 +1,399 @@ +import { + AnimationClip, + BufferGeometry, + FileLoader, + Float32BufferAttribute, + Loader, + Vector3 +} from 'three'; + +const _normalData = [ + [ - 0.525731, 0.000000, 0.850651 ], [ - 0.442863, 0.238856, 0.864188 ], + [ - 0.295242, 0.000000, 0.955423 ], [ - 0.309017, 0.500000, 0.809017 ], + [ - 0.162460, 0.262866, 0.951056 ], [ 0.000000, 0.000000, 1.000000 ], + [ 0.000000, 0.850651, 0.525731 ], [ - 0.147621, 0.716567, 0.681718 ], + [ 0.147621, 0.716567, 0.681718 ], [ 0.000000, 0.525731, 0.850651 ], + [ 0.309017, 0.500000, 0.809017 ], [ 0.525731, 0.000000, 0.850651 ], + [ 0.295242, 0.000000, 0.955423 ], [ 0.442863, 0.238856, 0.864188 ], + [ 0.162460, 0.262866, 0.951056 ], [ - 0.681718, 0.147621, 0.716567 ], + [ - 0.809017, 0.309017, 0.500000 ], [ - 0.587785, 0.425325, 0.688191 ], + [ - 0.850651, 0.525731, 0.000000 ], [ - 0.864188, 0.442863, 0.238856 ], + [ - 0.716567, 0.681718, 0.147621 ], [ - 0.688191, 0.587785, 0.425325 ], + [ - 0.500000, 0.809017, 0.309017 ], [ - 0.238856, 0.864188, 0.442863 ], + [ - 0.425325, 0.688191, 0.587785 ], [ - 0.716567, 0.681718, - 0.147621 ], + [ - 0.500000, 0.809017, - 0.309017 ], [ - 0.525731, 0.850651, 0.000000 ], + [ 0.000000, 0.850651, - 0.525731 ], [ - 0.238856, 0.864188, - 0.442863 ], + [ 0.000000, 0.955423, - 0.295242 ], [ - 0.262866, 0.951056, - 0.162460 ], + [ 0.000000, 1.000000, 0.000000 ], [ 0.000000, 0.955423, 0.295242 ], + [ - 0.262866, 0.951056, 0.162460 ], [ 0.238856, 0.864188, 0.442863 ], + [ 0.262866, 0.951056, 0.162460 ], [ 0.500000, 0.809017, 0.309017 ], + [ 0.238856, 0.864188, - 0.442863 ], [ 0.262866, 0.951056, - 0.162460 ], + [ 0.500000, 0.809017, - 0.309017 ], [ 0.850651, 0.525731, 0.000000 ], + [ 0.716567, 0.681718, 0.147621 ], [ 0.716567, 0.681718, - 0.147621 ], + [ 0.525731, 0.850651, 0.000000 ], [ 0.425325, 0.688191, 0.587785 ], + [ 0.864188, 0.442863, 0.238856 ], [ 0.688191, 0.587785, 0.425325 ], + [ 0.809017, 0.309017, 0.500000 ], [ 0.681718, 0.147621, 0.716567 ], + [ 0.587785, 0.425325, 0.688191 ], [ 0.955423, 0.295242, 0.000000 ], + [ 1.000000, 0.000000, 0.000000 ], [ 0.951056, 0.162460, 0.262866 ], + [ 0.850651, - 0.525731, 0.000000 ], [ 0.955423, - 0.295242, 0.000000 ], + [ 0.864188, - 0.442863, 0.238856 ], [ 0.951056, - 0.162460, 0.262866 ], + [ 0.809017, - 0.309017, 0.500000 ], [ 0.681718, - 0.147621, 0.716567 ], + [ 0.850651, 0.000000, 0.525731 ], [ 0.864188, 0.442863, - 0.238856 ], + [ 0.809017, 0.309017, - 0.500000 ], [ 0.951056, 0.162460, - 0.262866 ], + [ 0.525731, 0.000000, - 0.850651 ], [ 0.681718, 0.147621, - 0.716567 ], + [ 0.681718, - 0.147621, - 0.716567 ], [ 0.850651, 0.000000, - 0.525731 ], + [ 0.809017, - 0.309017, - 0.500000 ], [ 0.864188, - 0.442863, - 0.238856 ], + [ 0.951056, - 0.162460, - 0.262866 ], [ 0.147621, 0.716567, - 0.681718 ], + [ 0.309017, 0.500000, - 0.809017 ], [ 0.425325, 0.688191, - 0.587785 ], + [ 0.442863, 0.238856, - 0.864188 ], [ 0.587785, 0.425325, - 0.688191 ], + [ 0.688191, 0.587785, - 0.425325 ], [ - 0.147621, 0.716567, - 0.681718 ], + [ - 0.309017, 0.500000, - 0.809017 ], [ 0.000000, 0.525731, - 0.850651 ], + [ - 0.525731, 0.000000, - 0.850651 ], [ - 0.442863, 0.238856, - 0.864188 ], + [ - 0.295242, 0.000000, - 0.955423 ], [ - 0.162460, 0.262866, - 0.951056 ], + [ 0.000000, 0.000000, - 1.000000 ], [ 0.295242, 0.000000, - 0.955423 ], + [ 0.162460, 0.262866, - 0.951056 ], [ - 0.442863, - 0.238856, - 0.864188 ], + [ - 0.309017, - 0.500000, - 0.809017 ], [ - 0.162460, - 0.262866, - 0.951056 ], + [ 0.000000, - 0.850651, - 0.525731 ], [ - 0.147621, - 0.716567, - 0.681718 ], + [ 0.147621, - 0.716567, - 0.681718 ], [ 0.000000, - 0.525731, - 0.850651 ], + [ 0.309017, - 0.500000, - 0.809017 ], [ 0.442863, - 0.238856, - 0.864188 ], + [ 0.162460, - 0.262866, - 0.951056 ], [ 0.238856, - 0.864188, - 0.442863 ], + [ 0.500000, - 0.809017, - 0.309017 ], [ 0.425325, - 0.688191, - 0.587785 ], + [ 0.716567, - 0.681718, - 0.147621 ], [ 0.688191, - 0.587785, - 0.425325 ], + [ 0.587785, - 0.425325, - 0.688191 ], [ 0.000000, - 0.955423, - 0.295242 ], + [ 0.000000, - 1.000000, 0.000000 ], [ 0.262866, - 0.951056, - 0.162460 ], + [ 0.000000, - 0.850651, 0.525731 ], [ 0.000000, - 0.955423, 0.295242 ], + [ 0.238856, - 0.864188, 0.442863 ], [ 0.262866, - 0.951056, 0.162460 ], + [ 0.500000, - 0.809017, 0.309017 ], [ 0.716567, - 0.681718, 0.147621 ], + [ 0.525731, - 0.850651, 0.000000 ], [ - 0.238856, - 0.864188, - 0.442863 ], + [ - 0.500000, - 0.809017, - 0.309017 ], [ - 0.262866, - 0.951056, - 0.162460 ], + [ - 0.850651, - 0.525731, 0.000000 ], [ - 0.716567, - 0.681718, - 0.147621 ], + [ - 0.716567, - 0.681718, 0.147621 ], [ - 0.525731, - 0.850651, 0.000000 ], + [ - 0.500000, - 0.809017, 0.309017 ], [ - 0.238856, - 0.864188, 0.442863 ], + [ - 0.262866, - 0.951056, 0.162460 ], [ - 0.864188, - 0.442863, 0.238856 ], + [ - 0.809017, - 0.309017, 0.500000 ], [ - 0.688191, - 0.587785, 0.425325 ], + [ - 0.681718, - 0.147621, 0.716567 ], [ - 0.442863, - 0.238856, 0.864188 ], + [ - 0.587785, - 0.425325, 0.688191 ], [ - 0.309017, - 0.500000, 0.809017 ], + [ - 0.147621, - 0.716567, 0.681718 ], [ - 0.425325, - 0.688191, 0.587785 ], + [ - 0.162460, - 0.262866, 0.951056 ], [ 0.442863, - 0.238856, 0.864188 ], + [ 0.162460, - 0.262866, 0.951056 ], [ 0.309017, - 0.500000, 0.809017 ], + [ 0.147621, - 0.716567, 0.681718 ], [ 0.000000, - 0.525731, 0.850651 ], + [ 0.425325, - 0.688191, 0.587785 ], [ 0.587785, - 0.425325, 0.688191 ], + [ 0.688191, - 0.587785, 0.425325 ], [ - 0.955423, 0.295242, 0.000000 ], + [ - 0.951056, 0.162460, 0.262866 ], [ - 1.000000, 0.000000, 0.000000 ], + [ - 0.850651, 0.000000, 0.525731 ], [ - 0.955423, - 0.295242, 0.000000 ], + [ - 0.951056, - 0.162460, 0.262866 ], [ - 0.864188, 0.442863, - 0.238856 ], + [ - 0.951056, 0.162460, - 0.262866 ], [ - 0.809017, 0.309017, - 0.500000 ], + [ - 0.864188, - 0.442863, - 0.238856 ], [ - 0.951056, - 0.162460, - 0.262866 ], + [ - 0.809017, - 0.309017, - 0.500000 ], [ - 0.681718, 0.147621, - 0.716567 ], + [ - 0.681718, - 0.147621, - 0.716567 ], [ - 0.850651, 0.000000, - 0.525731 ], + [ - 0.688191, 0.587785, - 0.425325 ], [ - 0.587785, 0.425325, - 0.688191 ], + [ - 0.425325, 0.688191, - 0.587785 ], [ - 0.425325, - 0.688191, - 0.587785 ], + [ - 0.587785, - 0.425325, - 0.688191 ], [ - 0.688191, - 0.587785, - 0.425325 ] +]; + +class MD2Loader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( buffer ) { + + try { + + onLoad( scope.parse( buffer ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( buffer ) { + + const data = new DataView( buffer ); + + // http://tfc.duke.free.fr/coding/md2-specs-en.html + + const header = {}; + const headerNames = [ + 'ident', 'version', + 'skinwidth', 'skinheight', + 'framesize', + 'num_skins', 'num_vertices', 'num_st', 'num_tris', 'num_glcmds', 'num_frames', + 'offset_skins', 'offset_st', 'offset_tris', 'offset_frames', 'offset_glcmds', 'offset_end' + ]; + + for ( let i = 0; i < headerNames.length; i ++ ) { + + header[ headerNames[ i ] ] = data.getInt32( i * 4, true ); + + } + + if ( header.ident !== 844121161 || header.version !== 8 ) { + + console.error( 'Not a valid MD2 file' ); + return; + + } + + if ( header.offset_end !== data.byteLength ) { + + console.error( 'Corrupted MD2 file' ); + return; + + } + + // + + const geometry = new BufferGeometry(); + + // uvs + + const uvsTemp = []; + let offset = header.offset_st; + + for ( let i = 0, l = header.num_st; i < l; i ++ ) { + + const u = data.getInt16( offset + 0, true ); + const v = data.getInt16( offset + 2, true ); + + uvsTemp.push( u / header.skinwidth, 1 - ( v / header.skinheight ) ); + + offset += 4; + + } + + // triangles + + offset = header.offset_tris; + + const vertexIndices = []; + const uvIndices = []; + + for ( let i = 0, l = header.num_tris; i < l; i ++ ) { + + vertexIndices.push( + data.getUint16( offset + 0, true ), + data.getUint16( offset + 2, true ), + data.getUint16( offset + 4, true ) + ); + + uvIndices.push( + data.getUint16( offset + 6, true ), + data.getUint16( offset + 8, true ), + data.getUint16( offset + 10, true ) + ); + + offset += 12; + + } + + // frames + + const translation = new Vector3(); + const scale = new Vector3(); + + const frames = []; + + offset = header.offset_frames; + + for ( let i = 0, l = header.num_frames; i < l; i ++ ) { + + scale.set( + data.getFloat32( offset + 0, true ), + data.getFloat32( offset + 4, true ), + data.getFloat32( offset + 8, true ) + ); + + translation.set( + data.getFloat32( offset + 12, true ), + data.getFloat32( offset + 16, true ), + data.getFloat32( offset + 20, true ) + ); + + offset += 24; + + const string = []; + + for ( let j = 0; j < 16; j ++ ) { + + const character = data.getUint8( offset + j ); + if ( character === 0 ) break; + + string[ j ] = character; + + } + + const frame = { + name: String.fromCharCode.apply( null, string ), + vertices: [], + normals: [] + }; + + offset += 16; + + for ( let j = 0; j < header.num_vertices; j ++ ) { + + let x = data.getUint8( offset ++ ); + let y = data.getUint8( offset ++ ); + let z = data.getUint8( offset ++ ); + const n = _normalData[ data.getUint8( offset ++ ) ]; + + x = x * scale.x + translation.x; + y = y * scale.y + translation.y; + z = z * scale.z + translation.z; + + frame.vertices.push( x, z, y ); // convert to Y-up + frame.normals.push( n[ 0 ], n[ 2 ], n[ 1 ] ); // convert to Y-up + + } + + frames.push( frame ); + + } + + // static + + const positions = []; + const normals = []; + const uvs = []; + + const verticesTemp = frames[ 0 ].vertices; + const normalsTemp = frames[ 0 ].normals; + + for ( let i = 0, l = vertexIndices.length; i < l; i ++ ) { + + const vertexIndex = vertexIndices[ i ]; + let stride = vertexIndex * 3; + + // + + const x = verticesTemp[ stride ]; + const y = verticesTemp[ stride + 1 ]; + const z = verticesTemp[ stride + 2 ]; + + positions.push( x, y, z ); + + // + + const nx = normalsTemp[ stride ]; + const ny = normalsTemp[ stride + 1 ]; + const nz = normalsTemp[ stride + 2 ]; + + normals.push( nx, ny, nz ); + + // + + const uvIndex = uvIndices[ i ]; + stride = uvIndex * 2; + + const u = uvsTemp[ stride ]; + const v = uvsTemp[ stride + 1 ]; + + uvs.push( u, v ); + + } + + geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); + geometry.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + geometry.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + + // animation + + const morphPositions = []; + const morphNormals = []; + + for ( let i = 0, l = frames.length; i < l; i ++ ) { + + const frame = frames[ i ]; + const attributeName = frame.name; + + if ( frame.vertices.length > 0 ) { + + const positions = []; + + for ( let j = 0, jl = vertexIndices.length; j < jl; j ++ ) { + + const vertexIndex = vertexIndices[ j ]; + const stride = vertexIndex * 3; + + const x = frame.vertices[ stride ]; + const y = frame.vertices[ stride + 1 ]; + const z = frame.vertices[ stride + 2 ]; + + positions.push( x, y, z ); + + } + + const positionAttribute = new Float32BufferAttribute( positions, 3 ); + positionAttribute.name = attributeName; + + morphPositions.push( positionAttribute ); + + } + + if ( frame.normals.length > 0 ) { + + const normals = []; + + for ( let j = 0, jl = vertexIndices.length; j < jl; j ++ ) { + + const vertexIndex = vertexIndices[ j ]; + const stride = vertexIndex * 3; + + const nx = frame.normals[ stride ]; + const ny = frame.normals[ stride + 1 ]; + const nz = frame.normals[ stride + 2 ]; + + normals.push( nx, ny, nz ); + + } + + const normalAttribute = new Float32BufferAttribute( normals, 3 ); + normalAttribute.name = attributeName; + + morphNormals.push( normalAttribute ); + + } + + } + + geometry.morphAttributes.position = morphPositions; + geometry.morphAttributes.normal = morphNormals; + geometry.morphTargetsRelative = false; + + geometry.animations = AnimationClip.CreateClipsFromMorphTargetSequences( frames, 10 ); + + return geometry; + + } + +} + +export { MD2Loader }; diff --git a/node_modules/three/examples/jsm/loaders/MDDLoader.js b/node_modules/three/examples/jsm/loaders/MDDLoader.js new file mode 100644 index 0000000..e70f8b0 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/MDDLoader.js @@ -0,0 +1,102 @@ +/** + * MDD is a special format that stores a position for every vertex in a model for every frame in an animation. + * Similar to BVH, it can be used to transfer animation data between different 3D applications or engines. + * + * MDD stores its data in binary format (big endian) in the following way: + * + * number of frames (a single uint32) + * number of vertices (a single uint32) + * time values for each frame (sequence of float32) + * vertex data for each frame (sequence of float32) + */ + +import { + AnimationClip, + BufferAttribute, + FileLoader, + Loader, + NumberKeyframeTrack +} from 'three'; + +class MDDLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setResponseType( 'arraybuffer' ); + loader.load( url, function ( data ) { + + onLoad( scope.parse( data ) ); + + }, onProgress, onError ); + + } + + parse( data ) { + + const view = new DataView( data ); + + const totalFrames = view.getUint32( 0 ); + const totalPoints = view.getUint32( 4 ); + + let offset = 8; + + // animation clip + + const times = new Float32Array( totalFrames ); + const values = new Float32Array( totalFrames * totalFrames ).fill( 0 ); + + for ( let i = 0; i < totalFrames; i ++ ) { + + times[ i ] = view.getFloat32( offset ); offset += 4; + values[ ( totalFrames * i ) + i ] = 1; + + } + + const track = new NumberKeyframeTrack( '.morphTargetInfluences', times, values ); + const clip = new AnimationClip( 'default', times[ times.length - 1 ], [ track ] ); + + // morph targets + + const morphTargets = []; + + for ( let i = 0; i < totalFrames; i ++ ) { + + const morphTarget = new Float32Array( totalPoints * 3 ); + + for ( let j = 0; j < totalPoints; j ++ ) { + + const stride = ( j * 3 ); + + morphTarget[ stride + 0 ] = view.getFloat32( offset ); offset += 4; // x + morphTarget[ stride + 1 ] = view.getFloat32( offset ); offset += 4; // y + morphTarget[ stride + 2 ] = view.getFloat32( offset ); offset += 4; // z + + } + + const attribute = new BufferAttribute( morphTarget, 3 ); + attribute.name = 'morph_' + i; + + morphTargets.push( attribute ); + + } + + return { + morphTargets: morphTargets, + clip: clip + }; + + } + +} + +export { MDDLoader }; diff --git a/node_modules/three/examples/jsm/loaders/MMDLoader.js b/node_modules/three/examples/jsm/loaders/MMDLoader.js new file mode 100644 index 0000000..1b0c2da --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/MMDLoader.js @@ -0,0 +1,2276 @@ +import { + AddOperation, + AnimationClip, + Bone, + BufferGeometry, + Color, + CustomBlending, + TangentSpaceNormalMap, + DoubleSide, + DstAlphaFactor, + Euler, + FileLoader, + Float32BufferAttribute, + FrontSide, + Interpolant, + Loader, + LoaderUtils, + UniformsUtils, + ShaderMaterial, + MultiplyOperation, + NearestFilter, + NumberKeyframeTrack, + OneMinusSrcAlphaFactor, + Quaternion, + QuaternionKeyframeTrack, + RepeatWrapping, + Skeleton, + SkinnedMesh, + SrcAlphaFactor, + SRGBColorSpace, + TextureLoader, + Uint16BufferAttribute, + Vector3, + VectorKeyframeTrack, + RGB_S3TC_DXT1_Format, + RGB_PVRTC_4BPPV1_Format, + RGB_PVRTC_2BPPV1_Format, + RGB_ETC1_Format, + RGB_ETC2_Format +} from 'three'; +import { MMDToonShader } from '../shaders/MMDToonShader.js'; +import { TGALoader } from '../loaders/TGALoader.js'; +import { MMDParser } from '../libs/mmdparser.module.js'; + +/** + * Dependencies + * - mmd-parser https://github.com/takahirox/mmd-parser + * - TGALoader + * - OutlineEffect + * + * MMDLoader creates Three.js Objects from MMD resources as + * PMD, PMX, VMD, and VPD files. + * + * PMD/PMX is a model data format, VMD is a motion data format + * VPD is a posing data format used in MMD(Miku Miku Dance). + * + * MMD official site + * - https://sites.google.com/view/evpvp/ + * + * PMD, VMD format (in Japanese) + * - http://blog.goo.ne.jp/torisu_tetosuki/e/209ad341d3ece2b1b4df24abf619d6e4 + * + * PMX format + * - https://gist.github.com/felixjones/f8a06bd48f9da9a4539f + * + * TODO + * - light motion in vmd support. + * - SDEF support. + * - uv/material/bone morphing support. + * - more precise grant skinning support. + * - shadow support. + */ + +/** + * @param {THREE.LoadingManager} manager + */ +class MMDLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.loader = new FileLoader( this.manager ); + + this.parser = null; // lazy generation + this.meshBuilder = new MeshBuilder( this.manager ); + this.animationBuilder = new AnimationBuilder(); + + } + + /** + * @param {string} animationPath + * @return {MMDLoader} + */ + setAnimationPath( animationPath ) { + + this.animationPath = animationPath; + return this; + + } + + // Load MMD assets as Three.js Object + + /** + * Loads Model file (.pmd or .pmx) as a SkinnedMesh. + * + * @param {string} url - url to Model(.pmd or .pmx) file + * @param {function} onLoad + * @param {function} onProgress + * @param {function} onError + */ + load( url, onLoad, onProgress, onError ) { + + const builder = this.meshBuilder.setCrossOrigin( this.crossOrigin ); + + // resource path + + let resourcePath; + + if ( this.resourcePath !== '' ) { + + resourcePath = this.resourcePath; + + } else if ( this.path !== '' ) { + + resourcePath = this.path; + + } else { + + resourcePath = LoaderUtils.extractUrlBase( url ); + + } + + const modelExtension = this._extractExtension( url ).toLowerCase(); + + // Should I detect by seeing header? + if ( modelExtension !== 'pmd' && modelExtension !== 'pmx' ) { + + if ( onError ) onError( new Error( 'THREE.MMDLoader: Unknown model file extension .' + modelExtension + '.' ) ); + + return; + + } + + this[ modelExtension === 'pmd' ? 'loadPMD' : 'loadPMX' ]( url, function ( data ) { + + onLoad( builder.build( data, resourcePath, onProgress, onError ) ); + + }, onProgress, onError ); + + } + + /** + * Loads Motion file(s) (.vmd) as a AnimationClip. + * If two or more files are specified, they'll be merged. + * + * @param {string|Array} url - url(s) to animation(.vmd) file(s) + * @param {SkinnedMesh|THREE.Camera} object - tracks will be fitting to this object + * @param {function} onLoad + * @param {function} onProgress + * @param {function} onError + */ + loadAnimation( url, object, onLoad, onProgress, onError ) { + + const builder = this.animationBuilder; + + this.loadVMD( url, function ( vmd ) { + + onLoad( object.isCamera + ? builder.buildCameraAnimation( vmd ) + : builder.build( vmd, object ) ); + + }, onProgress, onError ); + + } + + /** + * Loads mode file and motion file(s) as an object containing + * a SkinnedMesh and a AnimationClip. + * Tracks of AnimationClip are fitting to the model. + * + * @param {string} modelUrl - url to Model(.pmd or .pmx) file + * @param {string|Array{string}} vmdUrl - url(s) to animation(.vmd) file + * @param {function} onLoad + * @param {function} onProgress + * @param {function} onError + */ + loadWithAnimation( modelUrl, vmdUrl, onLoad, onProgress, onError ) { + + const scope = this; + + this.load( modelUrl, function ( mesh ) { + + scope.loadAnimation( vmdUrl, mesh, function ( animation ) { + + onLoad( { + mesh: mesh, + animation: animation + } ); + + }, onProgress, onError ); + + }, onProgress, onError ); + + } + + // Load MMD assets as Object data parsed by MMDParser + + /** + * Loads .pmd file as an Object. + * + * @param {string} url - url to .pmd file + * @param {function} onLoad + * @param {function} onProgress + * @param {function} onError + */ + loadPMD( url, onLoad, onProgress, onError ) { + + const parser = this._getParser(); + + this.loader + .setMimeType( undefined ) + .setPath( this.path ) + .setResponseType( 'arraybuffer' ) + .setRequestHeader( this.requestHeader ) + .setWithCredentials( this.withCredentials ) + .load( url, function ( buffer ) { + + try { + + onLoad( parser.parsePmd( buffer, true ) ); + + } catch ( e ) { + + if ( onError ) onError( e ); + + } + + }, onProgress, onError ); + + } + + /** + * Loads .pmx file as an Object. + * + * @param {string} url - url to .pmx file + * @param {function} onLoad + * @param {function} onProgress + * @param {function} onError + */ + loadPMX( url, onLoad, onProgress, onError ) { + + const parser = this._getParser(); + + this.loader + .setMimeType( undefined ) + .setPath( this.path ) + .setResponseType( 'arraybuffer' ) + .setRequestHeader( this.requestHeader ) + .setWithCredentials( this.withCredentials ) + .load( url, function ( buffer ) { + + try { + + onLoad( parser.parsePmx( buffer, true ) ); + + } catch ( e ) { + + if ( onError ) onError( e ); + + } + + }, onProgress, onError ); + + } + + /** + * Loads .vmd file as an Object. If two or more files are specified + * they'll be merged. + * + * @param {string|Array} url - url(s) to .vmd file(s) + * @param {function} onLoad + * @param {function} onProgress + * @param {function} onError + */ + loadVMD( url, onLoad, onProgress, onError ) { + + const urls = Array.isArray( url ) ? url : [ url ]; + + const vmds = []; + const vmdNum = urls.length; + + const parser = this._getParser(); + + this.loader + .setMimeType( undefined ) + .setPath( this.animationPath ) + .setResponseType( 'arraybuffer' ) + .setRequestHeader( this.requestHeader ) + .setWithCredentials( this.withCredentials ); + + for ( let i = 0, il = urls.length; i < il; i ++ ) { + + this.loader.load( urls[ i ], function ( buffer ) { + + try { + + vmds.push( parser.parseVmd( buffer, true ) ); + + if ( vmds.length === vmdNum ) onLoad( parser.mergeVmds( vmds ) ); + + } catch ( e ) { + + if ( onError ) onError( e ); + + } + + }, onProgress, onError ); + + } + + } + + /** + * Loads .vpd file as an Object. + * + * @param {string} url - url to .vpd file + * @param {boolean} isUnicode + * @param {function} onLoad + * @param {function} onProgress + * @param {function} onError + */ + loadVPD( url, isUnicode, onLoad, onProgress, onError ) { + + const parser = this._getParser(); + + this.loader + .setMimeType( isUnicode ? undefined : 'text/plain; charset=shift_jis' ) + .setPath( this.animationPath ) + .setResponseType( 'text' ) + .setRequestHeader( this.requestHeader ) + .setWithCredentials( this.withCredentials ) + .load( url, function ( text ) { + + try { + + onLoad( parser.parseVpd( text, true ) ); + + } catch ( e ) { + + if ( onError ) onError( e ); + + } + + }, onProgress, onError ); + + } + + // private methods + + _extractExtension( url ) { + + const index = url.lastIndexOf( '.' ); + return index < 0 ? '' : url.slice( index + 1 ); + + } + + _getParser() { + + if ( this.parser === null ) { + + this.parser = new MMDParser.Parser(); + + } + + return this.parser; + + } + +} + +// Utilities + +/* + * base64 encoded defalut toon textures toon00.bmp - toon10.bmp. + * We don't need to request external toon image files. + */ +const DEFAULT_TOON_TEXTURES = [ + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAL0lEQVRYR+3QQREAAAzCsOFfNJPBJ1XQS9r2hsUAAQIECBAgQIAAAQIECBAgsBZ4MUx/ofm2I/kAAAAASUVORK5CYII=', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAN0lEQVRYR+3WQREAMBACsZ5/bWiiMvgEBTt5cW37hjsBBAgQIECAwFwgyfYPCCBAgAABAgTWAh8aBHZBl14e8wAAAABJRU5ErkJggg==', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAOUlEQVRYR+3WMREAMAwDsYY/yoDI7MLwIiP40+RJklfcCCBAgAABAgTqArfb/QMCCBAgQIAAgbbAB3z/e0F3js2cAAAAAElFTkSuQmCC', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAN0lEQVRYR+3WQREAMBACsZ5/B5ilMvgEBTt5cW37hjsBBAgQIECAwFwgyfYPCCBAgAABAgTWAh81dWyx0gFwKAAAAABJRU5ErkJggg==', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAOklEQVRYR+3WoREAMAwDsWb/UQtCy9wxTOQJ/oQ8SXKKGwEECBAgQIBAXeDt7f4BAQQIECBAgEBb4AOz8Hzx7WLY4wAAAABJRU5ErkJggg==', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYR+1XwW7CMAy1+f9fZOMysSEOEweEOPRNdm3HbdOyIhAcklPrOs/PLy9RygBALxzcCDQFmgJNgaZAU6Ap0BR4PwX8gsRMVLssMRH5HcpzJEaWL7EVg9F1IHRlyqQohgVr4FGUlUcMJSjcUlDw0zvjeun70cLWmneoyf7NgBTQSniBTQQSuJAZsOnnaczjIMb5hCiuHKxokCrJfVnrctyZL0PkJAJe1HMil4nxeyi3Ypfn1kX51jpPvo/JeCNC4PhVdHdJw2XjBR8brF8PEIhNVn12AgP7uHsTBguBn53MUZCqv7Lp07Pn5k1Ro+uWmUNn7D+M57rtk7aG0Vo73xyF/fbFf0bPJjDXngnGocDTdFhygZjwUQrMNrDcmZlQT50VJ/g/UwNyHpu778+yW+/ksOz/BFo54P4AsUXMfRq7XWsAAAAASUVORK5CYII=', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACMElEQVRYR+2Xv4pTQRTGf2dubhLdICiii2KnYKHVolhauKWPoGAnNr6BD6CvIVaihYuI2i1ia0BY0MZGRHQXjZj/mSPnnskfNWiWZUlzJ5k7M2cm833nO5Mziej2DWWJRUoCpQKlAntSQCqgw39/iUWAGmh37jrRnVsKlgpiqmkoGVABA7E57fvY+pJDdgKqF6HzFCSADkDq+F6AHABtQ+UMVE5D7zXod7fFNhTEckTbj5XQgHzNN+5tQvc5NG7C6BNkp6D3EmpXHDR+dQAjFLchW3VS9rlw3JBh+B7ys5Cf9z0GW1C/7P32AyBAOAz1q4jGliIH3YPuBnSfQX4OGreTIgEYQb/pBDtPnEQ4CivXYPAWBk13oHrB54yA9QuSn2H4AcKRpEILDt0BUzj+RLR1V5EqjD66NPRBVpLcQwjHoHYJOhsQv6U4mnzmrIXJCFr4LDwm/xBUoboG9XX4cc9VKdYoSA2yk5NQLJaKDUjTBoveG3Z2TElTxwjNK4M3LEZgUdDdruvcXzKBpStgp2NPiWi3ks9ZXxIoFVi+AvHLdc9TqtjL3/aYjpPlrzOcEnK62Szhimdd7xX232zFDTgtxezOu3WNMRLjiKgjtOhHVMd1loynVHvOgjuIIJMaELEqhJAV/RCSLbWTcfPFakFgFlALTRRvx+ok6Hlp/Q+v3fmx90bMyUzaEAhmM3KvHlXTL5DxnbGf/1M8RNNACLL5MNtPxP/mypJAqcDSFfgFhpYqWUzhTEAAAAAASUVORK5CYII=', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAL0lEQVRYR+3QQREAAAzCsOFfNJPBJ1XQS9r2hsUAAQIECBAgQIAAAQIECBAgsBZ4MUx/ofm2I/kAAAAASUVORK5CYII=', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAL0lEQVRYR+3QQREAAAzCsOFfNJPBJ1XQS9r2hsUAAQIECBAgQIAAAQIECBAgsBZ4MUx/ofm2I/kAAAAASUVORK5CYII=', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAL0lEQVRYR+3QQREAAAzCsOFfNJPBJ1XQS9r2hsUAAQIECBAgQIAAAQIECBAgsBZ4MUx/ofm2I/kAAAAASUVORK5CYII=', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAL0lEQVRYR+3QQREAAAzCsOFfNJPBJ1XQS9r2hsUAAQIECBAgQIAAAQIECBAgsBZ4MUx/ofm2I/kAAAAASUVORK5CYII=' +]; + +const NON_ALPHA_CHANNEL_FORMATS = [ + RGB_S3TC_DXT1_Format, + RGB_PVRTC_4BPPV1_Format, + RGB_PVRTC_2BPPV1_Format, + RGB_ETC1_Format, + RGB_ETC2_Format +]; + +// Builders. They build Three.js object from Object data parsed by MMDParser. + +/** + * @param {THREE.LoadingManager} manager + */ +class MeshBuilder { + + constructor( manager ) { + + this.crossOrigin = 'anonymous'; + this.geometryBuilder = new GeometryBuilder(); + this.materialBuilder = new MaterialBuilder( manager ); + + } + + /** + * @param {string} crossOrigin + * @return {MeshBuilder} + */ + setCrossOrigin( crossOrigin ) { + + this.crossOrigin = crossOrigin; + return this; + + } + + /** + * @param {Object} data - parsed PMD/PMX data + * @param {string} resourcePath + * @param {function} onProgress + * @param {function} onError + * @return {SkinnedMesh} + */ + build( data, resourcePath, onProgress, onError ) { + + const geometry = this.geometryBuilder.build( data ); + const material = this.materialBuilder + .setCrossOrigin( this.crossOrigin ) + .setResourcePath( resourcePath ) + .build( data, geometry, onProgress, onError ); + + const mesh = new SkinnedMesh( geometry, material ); + + const skeleton = new Skeleton( initBones( mesh ) ); + mesh.bind( skeleton ); + + // console.log( mesh ); // for console debug + + return mesh; + + } + +} + +// TODO: Try to remove this function + +function initBones( mesh ) { + + const geometry = mesh.geometry; + + const bones = []; + + if ( geometry && geometry.bones !== undefined ) { + + // first, create array of 'Bone' objects from geometry data + + for ( let i = 0, il = geometry.bones.length; i < il; i ++ ) { + + const gbone = geometry.bones[ i ]; + + // create new 'Bone' object + + const bone = new Bone(); + bones.push( bone ); + + // apply values + + bone.name = gbone.name; + bone.position.fromArray( gbone.pos ); + bone.quaternion.fromArray( gbone.rotq ); + if ( gbone.scl !== undefined ) bone.scale.fromArray( gbone.scl ); + + } + + // second, create bone hierarchy + + for ( let i = 0, il = geometry.bones.length; i < il; i ++ ) { + + const gbone = geometry.bones[ i ]; + + if ( ( gbone.parent !== - 1 ) && ( gbone.parent !== null ) && ( bones[ gbone.parent ] !== undefined ) ) { + + // subsequent bones in the hierarchy + + bones[ gbone.parent ].add( bones[ i ] ); + + } else { + + // topmost bone, immediate child of the skinned mesh + + mesh.add( bones[ i ] ); + + } + + } + + } + + // now the bones are part of the scene graph and children of the skinned mesh. + // let's update the corresponding matrices + + mesh.updateMatrixWorld( true ); + + return bones; + +} + +// + +class GeometryBuilder { + + /** + * @param {Object} data - parsed PMD/PMX data + * @return {BufferGeometry} + */ + build( data ) { + + // for geometry + const positions = []; + const uvs = []; + const normals = []; + + const indices = []; + + const groups = []; + + const bones = []; + const skinIndices = []; + const skinWeights = []; + + const morphTargets = []; + const morphPositions = []; + + const iks = []; + const grants = []; + + const rigidBodies = []; + const constraints = []; + + // for work + let offset = 0; + const boneTypeTable = {}; + + // positions, normals, uvs, skinIndices, skinWeights + + for ( let i = 0; i < data.metadata.vertexCount; i ++ ) { + + const v = data.vertices[ i ]; + + for ( let j = 0, jl = v.position.length; j < jl; j ++ ) { + + positions.push( v.position[ j ] ); + + } + + for ( let j = 0, jl = v.normal.length; j < jl; j ++ ) { + + normals.push( v.normal[ j ] ); + + } + + for ( let j = 0, jl = v.uv.length; j < jl; j ++ ) { + + uvs.push( v.uv[ j ] ); + + } + + for ( let j = 0; j < 4; j ++ ) { + + skinIndices.push( v.skinIndices.length - 1 >= j ? v.skinIndices[ j ] : 0.0 ); + + } + + for ( let j = 0; j < 4; j ++ ) { + + skinWeights.push( v.skinWeights.length - 1 >= j ? v.skinWeights[ j ] : 0.0 ); + + } + + } + + // indices + + for ( let i = 0; i < data.metadata.faceCount; i ++ ) { + + const face = data.faces[ i ]; + + for ( let j = 0, jl = face.indices.length; j < jl; j ++ ) { + + indices.push( face.indices[ j ] ); + + } + + } + + // groups + + for ( let i = 0; i < data.metadata.materialCount; i ++ ) { + + const material = data.materials[ i ]; + + groups.push( { + offset: offset * 3, + count: material.faceCount * 3 + } ); + + offset += material.faceCount; + + } + + // bones + + for ( let i = 0; i < data.metadata.rigidBodyCount; i ++ ) { + + const body = data.rigidBodies[ i ]; + let value = boneTypeTable[ body.boneIndex ]; + + // keeps greater number if already value is set without any special reasons + value = value === undefined ? body.type : Math.max( body.type, value ); + + boneTypeTable[ body.boneIndex ] = value; + + } + + for ( let i = 0; i < data.metadata.boneCount; i ++ ) { + + const boneData = data.bones[ i ]; + + const bone = { + index: i, + transformationClass: boneData.transformationClass, + parent: boneData.parentIndex, + name: boneData.name, + pos: boneData.position.slice( 0, 3 ), + rotq: [ 0, 0, 0, 1 ], + scl: [ 1, 1, 1 ], + rigidBodyType: boneTypeTable[ i ] !== undefined ? boneTypeTable[ i ] : - 1 + }; + + if ( bone.parent !== - 1 ) { + + bone.pos[ 0 ] -= data.bones[ bone.parent ].position[ 0 ]; + bone.pos[ 1 ] -= data.bones[ bone.parent ].position[ 1 ]; + bone.pos[ 2 ] -= data.bones[ bone.parent ].position[ 2 ]; + + } + + bones.push( bone ); + + } + + // iks + + // TODO: remove duplicated codes between PMD and PMX + if ( data.metadata.format === 'pmd' ) { + + for ( let i = 0; i < data.metadata.ikCount; i ++ ) { + + const ik = data.iks[ i ]; + + const param = { + target: ik.target, + effector: ik.effector, + iteration: ik.iteration, + maxAngle: ik.maxAngle * 4, + links: [] + }; + + for ( let j = 0, jl = ik.links.length; j < jl; j ++ ) { + + const link = {}; + link.index = ik.links[ j ].index; + link.enabled = true; + + if ( data.bones[ link.index ].name.indexOf( 'ひざ' ) >= 0 ) { + + link.limitation = new Vector3( 1.0, 0.0, 0.0 ); + + } + + param.links.push( link ); + + } + + iks.push( param ); + + } + + } else { + + for ( let i = 0; i < data.metadata.boneCount; i ++ ) { + + const ik = data.bones[ i ].ik; + + if ( ik === undefined ) continue; + + const param = { + target: i, + effector: ik.effector, + iteration: ik.iteration, + maxAngle: ik.maxAngle, + links: [] + }; + + for ( let j = 0, jl = ik.links.length; j < jl; j ++ ) { + + const link = {}; + link.index = ik.links[ j ].index; + link.enabled = true; + + if ( ik.links[ j ].angleLimitation === 1 ) { + + // Revert if rotationMin/Max doesn't work well + // link.limitation = new Vector3( 1.0, 0.0, 0.0 ); + + const rotationMin = ik.links[ j ].lowerLimitationAngle; + const rotationMax = ik.links[ j ].upperLimitationAngle; + + // Convert Left to Right coordinate by myself because + // MMDParser doesn't convert. It's a MMDParser's bug + + const tmp1 = - rotationMax[ 0 ]; + const tmp2 = - rotationMax[ 1 ]; + rotationMax[ 0 ] = - rotationMin[ 0 ]; + rotationMax[ 1 ] = - rotationMin[ 1 ]; + rotationMin[ 0 ] = tmp1; + rotationMin[ 1 ] = tmp2; + + link.rotationMin = new Vector3().fromArray( rotationMin ); + link.rotationMax = new Vector3().fromArray( rotationMax ); + + } + + param.links.push( link ); + + } + + iks.push( param ); + + // Save the reference even from bone data for efficiently + // simulating PMX animation system + bones[ i ].ik = param; + + } + + } + + // grants + + if ( data.metadata.format === 'pmx' ) { + + // bone index -> grant entry map + const grantEntryMap = {}; + + for ( let i = 0; i < data.metadata.boneCount; i ++ ) { + + const boneData = data.bones[ i ]; + const grant = boneData.grant; + + if ( grant === undefined ) continue; + + const param = { + index: i, + parentIndex: grant.parentIndex, + ratio: grant.ratio, + isLocal: grant.isLocal, + affectRotation: grant.affectRotation, + affectPosition: grant.affectPosition, + transformationClass: boneData.transformationClass + }; + + grantEntryMap[ i ] = { parent: null, children: [], param: param, visited: false }; + + } + + const rootEntry = { parent: null, children: [], param: null, visited: false }; + + // Build a tree representing grant hierarchy + + for ( const boneIndex in grantEntryMap ) { + + const grantEntry = grantEntryMap[ boneIndex ]; + const parentGrantEntry = grantEntryMap[ grantEntry.parentIndex ] || rootEntry; + + grantEntry.parent = parentGrantEntry; + parentGrantEntry.children.push( grantEntry ); + + } + + // Sort grant parameters from parents to children because + // grant uses parent's transform that parent's grant is already applied + // so grant should be applied in order from parents to children + + function traverse( entry ) { + + if ( entry.param ) { + + grants.push( entry.param ); + + // Save the reference even from bone data for efficiently + // simulating PMX animation system + bones[ entry.param.index ].grant = entry.param; + + } + + entry.visited = true; + + for ( let i = 0, il = entry.children.length; i < il; i ++ ) { + + const child = entry.children[ i ]; + + // Cut off a loop if exists. (Is a grant loop invalid?) + if ( ! child.visited ) traverse( child ); + + } + + } + + traverse( rootEntry ); + + } + + // morph + + function updateAttributes( attribute, morph, ratio ) { + + for ( let i = 0; i < morph.elementCount; i ++ ) { + + const element = morph.elements[ i ]; + + let index; + + if ( data.metadata.format === 'pmd' ) { + + index = data.morphs[ 0 ].elements[ element.index ].index; + + } else { + + index = element.index; + + } + + attribute.array[ index * 3 + 0 ] += element.position[ 0 ] * ratio; + attribute.array[ index * 3 + 1 ] += element.position[ 1 ] * ratio; + attribute.array[ index * 3 + 2 ] += element.position[ 2 ] * ratio; + + } + + } + + for ( let i = 0; i < data.metadata.morphCount; i ++ ) { + + const morph = data.morphs[ i ]; + const params = { name: morph.name }; + + const attribute = new Float32BufferAttribute( data.metadata.vertexCount * 3, 3 ); + attribute.name = morph.name; + + for ( let j = 0; j < data.metadata.vertexCount * 3; j ++ ) { + + attribute.array[ j ] = positions[ j ]; + + } + + if ( data.metadata.format === 'pmd' ) { + + if ( i !== 0 ) { + + updateAttributes( attribute, morph, 1.0 ); + + } + + } else { + + if ( morph.type === 0 ) { // group + + for ( let j = 0; j < morph.elementCount; j ++ ) { + + const morph2 = data.morphs[ morph.elements[ j ].index ]; + const ratio = morph.elements[ j ].ratio; + + if ( morph2.type === 1 ) { + + updateAttributes( attribute, morph2, ratio ); + + } else { + + // TODO: implement + + } + + } + + } else if ( morph.type === 1 ) { // vertex + + updateAttributes( attribute, morph, 1.0 ); + + } else if ( morph.type === 2 ) { // bone + + // TODO: implement + + } else if ( morph.type === 3 ) { // uv + + // TODO: implement + + } else if ( morph.type === 4 ) { // additional uv1 + + // TODO: implement + + } else if ( morph.type === 5 ) { // additional uv2 + + // TODO: implement + + } else if ( morph.type === 6 ) { // additional uv3 + + // TODO: implement + + } else if ( morph.type === 7 ) { // additional uv4 + + // TODO: implement + + } else if ( morph.type === 8 ) { // material + + // TODO: implement + + } + + } + + morphTargets.push( params ); + morphPositions.push( attribute ); + + } + + // rigid bodies from rigidBodies field. + + for ( let i = 0; i < data.metadata.rigidBodyCount; i ++ ) { + + const rigidBody = data.rigidBodies[ i ]; + const params = {}; + + for ( const key in rigidBody ) { + + params[ key ] = rigidBody[ key ]; + + } + + /* + * RigidBody position parameter in PMX seems global position + * while the one in PMD seems offset from corresponding bone. + * So unify being offset. + */ + if ( data.metadata.format === 'pmx' ) { + + if ( params.boneIndex !== - 1 ) { + + const bone = data.bones[ params.boneIndex ]; + params.position[ 0 ] -= bone.position[ 0 ]; + params.position[ 1 ] -= bone.position[ 1 ]; + params.position[ 2 ] -= bone.position[ 2 ]; + + } + + } + + rigidBodies.push( params ); + + } + + // constraints from constraints field. + + for ( let i = 0; i < data.metadata.constraintCount; i ++ ) { + + const constraint = data.constraints[ i ]; + const params = {}; + + for ( const key in constraint ) { + + params[ key ] = constraint[ key ]; + + } + + const bodyA = rigidBodies[ params.rigidBodyIndex1 ]; + const bodyB = rigidBodies[ params.rigidBodyIndex2 ]; + + // Refer to http://www20.atpages.jp/katwat/wp/?p=4135 + if ( bodyA.type !== 0 && bodyB.type === 2 ) { + + if ( bodyA.boneIndex !== - 1 && bodyB.boneIndex !== - 1 && + data.bones[ bodyB.boneIndex ].parentIndex === bodyA.boneIndex ) { + + bodyB.type = 1; + + } + + } + + constraints.push( params ); + + } + + // build BufferGeometry. + + const geometry = new BufferGeometry(); + + geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); + geometry.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + geometry.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); + geometry.setAttribute( 'skinIndex', new Uint16BufferAttribute( skinIndices, 4 ) ); + geometry.setAttribute( 'skinWeight', new Float32BufferAttribute( skinWeights, 4 ) ); + geometry.setIndex( indices ); + + for ( let i = 0, il = groups.length; i < il; i ++ ) { + + geometry.addGroup( groups[ i ].offset, groups[ i ].count, i ); + + } + + geometry.bones = bones; + + geometry.morphTargets = morphTargets; + geometry.morphAttributes.position = morphPositions; + geometry.morphTargetsRelative = false; + + geometry.userData.MMD = { + bones: bones, + iks: iks, + grants: grants, + rigidBodies: rigidBodies, + constraints: constraints, + format: data.metadata.format + }; + + geometry.computeBoundingSphere(); + + return geometry; + + } + +} + +// + +/** + * @param {THREE.LoadingManager} manager + */ +class MaterialBuilder { + + constructor( manager ) { + + this.manager = manager; + + this.textureLoader = new TextureLoader( this.manager ); + this.tgaLoader = null; // lazy generation + + this.crossOrigin = 'anonymous'; + this.resourcePath = undefined; + + } + + /** + * @param {string} crossOrigin + * @return {MaterialBuilder} + */ + setCrossOrigin( crossOrigin ) { + + this.crossOrigin = crossOrigin; + return this; + + } + + /** + * @param {string} resourcePath + * @return {MaterialBuilder} + */ + setResourcePath( resourcePath ) { + + this.resourcePath = resourcePath; + return this; + + } + + /** + * @param {Object} data - parsed PMD/PMX data + * @param {BufferGeometry} geometry - some properties are dependend on geometry + * @param {function} onProgress + * @param {function} onError + * @return {Array} + */ + build( data, geometry /*, onProgress, onError */ ) { + + const materials = []; + + const textures = {}; + + this.textureLoader.setCrossOrigin( this.crossOrigin ); + + // materials + + for ( let i = 0; i < data.metadata.materialCount; i ++ ) { + + const material = data.materials[ i ]; + + const params = { userData: { MMD: {} } }; + + if ( material.name !== undefined ) params.name = material.name; + + /* + * Color + * + * MMD MMDToonMaterial + * ambient - emissive * a + * (a = 1.0 without map texture or 0.2 with map texture) + * + * MMDToonMaterial doesn't have ambient. Set it to emissive instead. + * It'll be too bright if material has map texture so using coef 0.2. + */ + params.diffuse = new Color().setRGB( + material.diffuse[ 0 ], + material.diffuse[ 1 ], + material.diffuse[ 2 ], + SRGBColorSpace + ); + params.opacity = material.diffuse[ 3 ]; + params.specular = new Color().setRGB( ...material.specular, SRGBColorSpace ); + params.shininess = material.shininess; + params.emissive = new Color().setRGB( ...material.ambient, SRGBColorSpace ); + params.transparent = params.opacity !== 1.0; + + // + + params.fog = true; + + // blend + + params.blending = CustomBlending; + params.blendSrc = SrcAlphaFactor; + params.blendDst = OneMinusSrcAlphaFactor; + params.blendSrcAlpha = SrcAlphaFactor; + params.blendDstAlpha = DstAlphaFactor; + + // side + + if ( data.metadata.format === 'pmx' && ( material.flag & 0x1 ) === 1 ) { + + params.side = DoubleSide; + + } else { + + params.side = params.opacity === 1.0 ? FrontSide : DoubleSide; + + } + + if ( data.metadata.format === 'pmd' ) { + + // map, matcap + + if ( material.fileName ) { + + const fileName = material.fileName; + const fileNames = fileName.split( '*' ); + + // fileNames[ 0 ]: mapFileName + // fileNames[ 1 ]: matcapFileName( optional ) + + params.map = this._loadTexture( fileNames[ 0 ], textures ); + + if ( fileNames.length > 1 ) { + + const extension = fileNames[ 1 ].slice( - 4 ).toLowerCase(); + + params.matcap = this._loadTexture( + fileNames[ 1 ], + textures + ); + + params.matcapCombine = extension === '.sph' + ? MultiplyOperation + : AddOperation; + + } + + } + + // gradientMap + + const toonFileName = ( material.toonIndex === - 1 ) + ? 'toon00.bmp' + : data.toonTextures[ material.toonIndex ].fileName; + + params.gradientMap = this._loadTexture( + toonFileName, + textures, + { + isToonTexture: true, + isDefaultToonTexture: this._isDefaultToonTexture( toonFileName ) + } + ); + + // parameters for OutlineEffect + + params.userData.outlineParameters = { + thickness: material.edgeFlag === 1 ? 0.003 : 0.0, + color: [ 0, 0, 0 ], + alpha: 1.0, + visible: material.edgeFlag === 1 + }; + + } else { + + // map + + if ( material.textureIndex !== - 1 ) { + + params.map = this._loadTexture( data.textures[ material.textureIndex ], textures ); + + // Since PMX spec don't have standard to list map files except color map and env map, + // we need to save file name for further mapping, like matching normal map file names after model loaded. + // ref: https://gist.github.com/felixjones/f8a06bd48f9da9a4539f#texture + params.userData.MMD.mapFileName = data.textures[ material.textureIndex ]; + + } + + // matcap TODO: support m.envFlag === 3 + + if ( material.envTextureIndex !== - 1 && ( material.envFlag === 1 || material.envFlag == 2 ) ) { + + params.matcap = this._loadTexture( + data.textures[ material.envTextureIndex ], + textures + ); + + // Same as color map above, keep file name in userData for further usage. + params.userData.MMD.matcapFileName = data.textures[ material.envTextureIndex ]; + + params.matcapCombine = material.envFlag === 1 + ? MultiplyOperation + : AddOperation; + + } + + // gradientMap + + let toonFileName, isDefaultToon; + + if ( material.toonIndex === - 1 || material.toonFlag !== 0 ) { + + toonFileName = 'toon' + ( '0' + ( material.toonIndex + 1 ) ).slice( - 2 ) + '.bmp'; + isDefaultToon = true; + + } else { + + toonFileName = data.textures[ material.toonIndex ]; + isDefaultToon = false; + + } + + params.gradientMap = this._loadTexture( + toonFileName, + textures, + { + isToonTexture: true, + isDefaultToonTexture: isDefaultToon + } + ); + + // parameters for OutlineEffect + params.userData.outlineParameters = { + thickness: material.edgeSize / 300, // TODO: better calculation? + color: material.edgeColor.slice( 0, 3 ), + alpha: material.edgeColor[ 3 ], + visible: ( material.flag & 0x10 ) !== 0 && material.edgeSize > 0.0 + }; + + } + + if ( params.map !== undefined ) { + + if ( ! params.transparent ) { + + this._checkImageTransparency( params.map, geometry, i ); + + } + + params.emissive.multiplyScalar( 0.2 ); + + } + + materials.push( new MMDToonMaterial( params ) ); + + } + + if ( data.metadata.format === 'pmx' ) { + + // set transparent true if alpha morph is defined. + + function checkAlphaMorph( elements, materials ) { + + for ( let i = 0, il = elements.length; i < il; i ++ ) { + + const element = elements[ i ]; + + if ( element.index === - 1 ) continue; + + const material = materials[ element.index ]; + + if ( material.opacity !== element.diffuse[ 3 ] ) { + + material.transparent = true; + + } + + } + + } + + for ( let i = 0, il = data.morphs.length; i < il; i ++ ) { + + const morph = data.morphs[ i ]; + const elements = morph.elements; + + if ( morph.type === 0 ) { + + for ( let j = 0, jl = elements.length; j < jl; j ++ ) { + + const morph2 = data.morphs[ elements[ j ].index ]; + + if ( morph2.type !== 8 ) continue; + + checkAlphaMorph( morph2.elements, materials ); + + } + + } else if ( morph.type === 8 ) { + + checkAlphaMorph( elements, materials ); + + } + + } + + } + + return materials; + + } + + // private methods + + _getTGALoader() { + + if ( this.tgaLoader === null ) { + + if ( TGALoader === undefined ) { + + throw new Error( 'THREE.MMDLoader: Import TGALoader' ); + + } + + this.tgaLoader = new TGALoader( this.manager ); + + } + + return this.tgaLoader; + + } + + _isDefaultToonTexture( name ) { + + if ( name.length !== 10 ) return false; + + return /toon(10|0[0-9])\.bmp/.test( name ); + + } + + _loadTexture( filePath, textures, params, onProgress, onError ) { + + params = params || {}; + + const scope = this; + + let fullPath; + + if ( params.isDefaultToonTexture === true ) { + + let index; + + try { + + index = parseInt( filePath.match( /toon([0-9]{2})\.bmp$/ )[ 1 ] ); + + } catch ( e ) { + + console.warn( 'THREE.MMDLoader: ' + filePath + ' seems like a ' + + 'not right default texture path. Using toon00.bmp instead.' ); + + index = 0; + + } + + fullPath = DEFAULT_TOON_TEXTURES[ index ]; + + } else { + + fullPath = this.resourcePath + filePath; + + } + + if ( textures[ fullPath ] !== undefined ) return textures[ fullPath ]; + + let loader = this.manager.getHandler( fullPath ); + + if ( loader === null ) { + + loader = ( filePath.slice( - 4 ).toLowerCase() === '.tga' ) + ? this._getTGALoader() + : this.textureLoader; + + } + + const texture = loader.load( fullPath, function ( t ) { + + // MMD toon texture is Axis-Y oriented + // but Three.js gradient map is Axis-X oriented. + // So here replaces the toon texture image with the rotated one. + if ( params.isToonTexture === true ) { + + t.image = scope._getRotatedImage( t.image ); + + t.magFilter = NearestFilter; + t.minFilter = NearestFilter; + + } + + t.flipY = false; + t.wrapS = RepeatWrapping; + t.wrapT = RepeatWrapping; + t.colorSpace = SRGBColorSpace; + + for ( let i = 0; i < texture.readyCallbacks.length; i ++ ) { + + texture.readyCallbacks[ i ]( texture ); + + } + + delete texture.readyCallbacks; + + }, onProgress, onError ); + + texture.readyCallbacks = []; + + textures[ fullPath ] = texture; + + return texture; + + } + + _getRotatedImage( image ) { + + const canvas = document.createElement( 'canvas' ); + const context = canvas.getContext( '2d' ); + + const width = image.width; + const height = image.height; + + canvas.width = width; + canvas.height = height; + + context.clearRect( 0, 0, width, height ); + context.translate( width / 2.0, height / 2.0 ); + context.rotate( 0.5 * Math.PI ); // 90.0 * Math.PI / 180.0 + context.translate( - width / 2.0, - height / 2.0 ); + context.drawImage( image, 0, 0 ); + + return context.getImageData( 0, 0, width, height ); + + } + + // Check if the partial image area used by the texture is transparent. + _checkImageTransparency( map, geometry, groupIndex ) { + + map.readyCallbacks.push( function ( texture ) { + + // Is there any efficient ways? + function createImageData( image ) { + + const canvas = document.createElement( 'canvas' ); + canvas.width = image.width; + canvas.height = image.height; + + const context = canvas.getContext( '2d' ); + context.drawImage( image, 0, 0 ); + + return context.getImageData( 0, 0, canvas.width, canvas.height ); + + } + + function detectImageTransparency( image, uvs, indices ) { + + const width = image.width; + const height = image.height; + const data = image.data; + const threshold = 253; + + if ( data.length / ( width * height ) !== 4 ) return false; + + for ( let i = 0; i < indices.length; i += 3 ) { + + const centerUV = { x: 0.0, y: 0.0 }; + + for ( let j = 0; j < 3; j ++ ) { + + const index = indices[ i * 3 + j ]; + const uv = { x: uvs[ index * 2 + 0 ], y: uvs[ index * 2 + 1 ] }; + + if ( getAlphaByUv( image, uv ) < threshold ) return true; + + centerUV.x += uv.x; + centerUV.y += uv.y; + + } + + centerUV.x /= 3; + centerUV.y /= 3; + + if ( getAlphaByUv( image, centerUV ) < threshold ) return true; + + } + + return false; + + } + + /* + * This method expects + * texture.flipY = false + * texture.wrapS = RepeatWrapping + * texture.wrapT = RepeatWrapping + * TODO: more precise + */ + function getAlphaByUv( image, uv ) { + + const width = image.width; + const height = image.height; + + let x = Math.round( uv.x * width ) % width; + let y = Math.round( uv.y * height ) % height; + + if ( x < 0 ) x += width; + if ( y < 0 ) y += height; + + const index = y * width + x; + + return image.data[ index * 4 + 3 ]; + + } + + if ( texture.isCompressedTexture === true ) { + + if ( NON_ALPHA_CHANNEL_FORMATS.includes( texture.format ) ) { + + map.transparent = false; + + } else { + + // any other way to check transparency of CompressedTexture? + map.transparent = true; + + } + + return; + + } + + const imageData = texture.image.data !== undefined + ? texture.image + : createImageData( texture.image ); + + const group = geometry.groups[ groupIndex ]; + + if ( detectImageTransparency( + imageData, + geometry.attributes.uv.array, + geometry.index.array.slice( group.start, group.start + group.count ) ) ) { + + map.transparent = true; + + } + + } ); + + } + +} + +// + +class AnimationBuilder { + + /** + * @param {Object} vmd - parsed VMD data + * @param {SkinnedMesh} mesh - tracks will be fitting to mesh + * @return {AnimationClip} + */ + build( vmd, mesh ) { + + // combine skeletal and morph animations + + const tracks = this.buildSkeletalAnimation( vmd, mesh ).tracks; + const tracks2 = this.buildMorphAnimation( vmd, mesh ).tracks; + + for ( let i = 0, il = tracks2.length; i < il; i ++ ) { + + tracks.push( tracks2[ i ] ); + + } + + return new AnimationClip( '', - 1, tracks ); + + } + + /** + * @param {Object} vmd - parsed VMD data + * @param {SkinnedMesh} mesh - tracks will be fitting to mesh + * @return {AnimationClip} + */ + buildSkeletalAnimation( vmd, mesh ) { + + function pushInterpolation( array, interpolation, index ) { + + array.push( interpolation[ index + 0 ] / 127 ); // x1 + array.push( interpolation[ index + 8 ] / 127 ); // x2 + array.push( interpolation[ index + 4 ] / 127 ); // y1 + array.push( interpolation[ index + 12 ] / 127 ); // y2 + + } + + const tracks = []; + + const motions = {}; + const bones = mesh.skeleton.bones; + const boneNameDictionary = {}; + + for ( let i = 0, il = bones.length; i < il; i ++ ) { + + boneNameDictionary[ bones[ i ].name ] = true; + + } + + for ( let i = 0; i < vmd.metadata.motionCount; i ++ ) { + + const motion = vmd.motions[ i ]; + const boneName = motion.boneName; + + if ( boneNameDictionary[ boneName ] === undefined ) continue; + + motions[ boneName ] = motions[ boneName ] || []; + motions[ boneName ].push( motion ); + + } + + for ( const key in motions ) { + + const array = motions[ key ]; + + array.sort( function ( a, b ) { + + return a.frameNum - b.frameNum; + + } ); + + const times = []; + const positions = []; + const rotations = []; + const pInterpolations = []; + const rInterpolations = []; + + const basePosition = mesh.skeleton.getBoneByName( key ).position.toArray(); + + for ( let i = 0, il = array.length; i < il; i ++ ) { + + const time = array[ i ].frameNum / 30; + const position = array[ i ].position; + const rotation = array[ i ].rotation; + const interpolation = array[ i ].interpolation; + + times.push( time ); + + for ( let j = 0; j < 3; j ++ ) positions.push( basePosition[ j ] + position[ j ] ); + for ( let j = 0; j < 4; j ++ ) rotations.push( rotation[ j ] ); + for ( let j = 0; j < 3; j ++ ) pushInterpolation( pInterpolations, interpolation, j ); + + pushInterpolation( rInterpolations, interpolation, 3 ); + + } + + const targetName = '.bones[' + key + ']'; + + tracks.push( this._createTrack( targetName + '.position', VectorKeyframeTrack, times, positions, pInterpolations ) ); + tracks.push( this._createTrack( targetName + '.quaternion', QuaternionKeyframeTrack, times, rotations, rInterpolations ) ); + + } + + return new AnimationClip( '', - 1, tracks ); + + } + + /** + * @param {Object} vmd - parsed VMD data + * @param {SkinnedMesh} mesh - tracks will be fitting to mesh + * @return {AnimationClip} + */ + buildMorphAnimation( vmd, mesh ) { + + const tracks = []; + + const morphs = {}; + const morphTargetDictionary = mesh.morphTargetDictionary; + + for ( let i = 0; i < vmd.metadata.morphCount; i ++ ) { + + const morph = vmd.morphs[ i ]; + const morphName = morph.morphName; + + if ( morphTargetDictionary[ morphName ] === undefined ) continue; + + morphs[ morphName ] = morphs[ morphName ] || []; + morphs[ morphName ].push( morph ); + + } + + for ( const key in morphs ) { + + const array = morphs[ key ]; + + array.sort( function ( a, b ) { + + return a.frameNum - b.frameNum; + + } ); + + const times = []; + const values = []; + + for ( let i = 0, il = array.length; i < il; i ++ ) { + + times.push( array[ i ].frameNum / 30 ); + values.push( array[ i ].weight ); + + } + + tracks.push( new NumberKeyframeTrack( '.morphTargetInfluences[' + morphTargetDictionary[ key ] + ']', times, values ) ); + + } + + return new AnimationClip( '', - 1, tracks ); + + } + + /** + * @param {Object} vmd - parsed VMD data + * @return {AnimationClip} + */ + buildCameraAnimation( vmd ) { + + function pushVector3( array, vec ) { + + array.push( vec.x ); + array.push( vec.y ); + array.push( vec.z ); + + } + + function pushQuaternion( array, q ) { + + array.push( q.x ); + array.push( q.y ); + array.push( q.z ); + array.push( q.w ); + + } + + function pushInterpolation( array, interpolation, index ) { + + array.push( interpolation[ index * 4 + 0 ] / 127 ); // x1 + array.push( interpolation[ index * 4 + 1 ] / 127 ); // x2 + array.push( interpolation[ index * 4 + 2 ] / 127 ); // y1 + array.push( interpolation[ index * 4 + 3 ] / 127 ); // y2 + + } + + const cameras = vmd.cameras === undefined ? [] : vmd.cameras.slice(); + + cameras.sort( function ( a, b ) { + + return a.frameNum - b.frameNum; + + } ); + + const times = []; + const centers = []; + const quaternions = []; + const positions = []; + const fovs = []; + + const cInterpolations = []; + const qInterpolations = []; + const pInterpolations = []; + const fInterpolations = []; + + const quaternion = new Quaternion(); + const euler = new Euler(); + const position = new Vector3(); + const center = new Vector3(); + + for ( let i = 0, il = cameras.length; i < il; i ++ ) { + + const motion = cameras[ i ]; + + const time = motion.frameNum / 30; + const pos = motion.position; + const rot = motion.rotation; + const distance = motion.distance; + const fov = motion.fov; + const interpolation = motion.interpolation; + + times.push( time ); + + position.set( 0, 0, - distance ); + center.set( pos[ 0 ], pos[ 1 ], pos[ 2 ] ); + + euler.set( - rot[ 0 ], - rot[ 1 ], - rot[ 2 ] ); + quaternion.setFromEuler( euler ); + + position.add( center ); + position.applyQuaternion( quaternion ); + + pushVector3( centers, center ); + pushQuaternion( quaternions, quaternion ); + pushVector3( positions, position ); + + fovs.push( fov ); + + for ( let j = 0; j < 3; j ++ ) { + + pushInterpolation( cInterpolations, interpolation, j ); + + } + + pushInterpolation( qInterpolations, interpolation, 3 ); + + // use the same parameter for x, y, z axis. + for ( let j = 0; j < 3; j ++ ) { + + pushInterpolation( pInterpolations, interpolation, 4 ); + + } + + pushInterpolation( fInterpolations, interpolation, 5 ); + + } + + const tracks = []; + + // I expect an object whose name 'target' exists under THREE.Camera + tracks.push( this._createTrack( 'target.position', VectorKeyframeTrack, times, centers, cInterpolations ) ); + + tracks.push( this._createTrack( '.quaternion', QuaternionKeyframeTrack, times, quaternions, qInterpolations ) ); + tracks.push( this._createTrack( '.position', VectorKeyframeTrack, times, positions, pInterpolations ) ); + tracks.push( this._createTrack( '.fov', NumberKeyframeTrack, times, fovs, fInterpolations ) ); + + return new AnimationClip( '', - 1, tracks ); + + } + + // private method + + _createTrack( node, typedKeyframeTrack, times, values, interpolations ) { + + /* + * optimizes here not to let KeyframeTrackPrototype optimize + * because KeyframeTrackPrototype optimizes times and values but + * doesn't optimize interpolations. + */ + if ( times.length > 2 ) { + + times = times.slice(); + values = values.slice(); + interpolations = interpolations.slice(); + + const stride = values.length / times.length; + const interpolateStride = interpolations.length / times.length; + + let index = 1; + + for ( let aheadIndex = 2, endIndex = times.length; aheadIndex < endIndex; aheadIndex ++ ) { + + for ( let i = 0; i < stride; i ++ ) { + + if ( values[ index * stride + i ] !== values[ ( index - 1 ) * stride + i ] || + values[ index * stride + i ] !== values[ aheadIndex * stride + i ] ) { + + index ++; + break; + + } + + } + + if ( aheadIndex > index ) { + + times[ index ] = times[ aheadIndex ]; + + for ( let i = 0; i < stride; i ++ ) { + + values[ index * stride + i ] = values[ aheadIndex * stride + i ]; + + } + + for ( let i = 0; i < interpolateStride; i ++ ) { + + interpolations[ index * interpolateStride + i ] = interpolations[ aheadIndex * interpolateStride + i ]; + + } + + } + + } + + times.length = index + 1; + values.length = ( index + 1 ) * stride; + interpolations.length = ( index + 1 ) * interpolateStride; + + } + + const track = new typedKeyframeTrack( node, times, values ); + + track.createInterpolant = function InterpolantFactoryMethodCubicBezier( result ) { + + return new CubicBezierInterpolation( this.times, this.values, this.getValueSize(), result, new Float32Array( interpolations ) ); + + }; + + return track; + + } + +} + +// interpolation + +class CubicBezierInterpolation extends Interpolant { + + constructor( parameterPositions, sampleValues, sampleSize, resultBuffer, params ) { + + super( parameterPositions, sampleValues, sampleSize, resultBuffer ); + + this.interpolationParams = params; + + } + + interpolate_( i1, t0, t, t1 ) { + + const result = this.resultBuffer; + const values = this.sampleValues; + const stride = this.valueSize; + const params = this.interpolationParams; + + const offset1 = i1 * stride; + const offset0 = offset1 - stride; + + // No interpolation if next key frame is in one frame in 30fps. + // This is from MMD animation spec. + // '1.5' is for precision loss. times are Float32 in Three.js Animation system. + const weight1 = ( ( t1 - t0 ) < 1 / 30 * 1.5 ) ? 0.0 : ( t - t0 ) / ( t1 - t0 ); + + if ( stride === 4 ) { // Quaternion + + const x1 = params[ i1 * 4 + 0 ]; + const x2 = params[ i1 * 4 + 1 ]; + const y1 = params[ i1 * 4 + 2 ]; + const y2 = params[ i1 * 4 + 3 ]; + + const ratio = this._calculate( x1, x2, y1, y2, weight1 ); + + Quaternion.slerpFlat( result, 0, values, offset0, values, offset1, ratio ); + + } else if ( stride === 3 ) { // Vector3 + + for ( let i = 0; i !== stride; ++ i ) { + + const x1 = params[ i1 * 12 + i * 4 + 0 ]; + const x2 = params[ i1 * 12 + i * 4 + 1 ]; + const y1 = params[ i1 * 12 + i * 4 + 2 ]; + const y2 = params[ i1 * 12 + i * 4 + 3 ]; + + const ratio = this._calculate( x1, x2, y1, y2, weight1 ); + + result[ i ] = values[ offset0 + i ] * ( 1 - ratio ) + values[ offset1 + i ] * ratio; + + } + + } else { // Number + + const x1 = params[ i1 * 4 + 0 ]; + const x2 = params[ i1 * 4 + 1 ]; + const y1 = params[ i1 * 4 + 2 ]; + const y2 = params[ i1 * 4 + 3 ]; + + const ratio = this._calculate( x1, x2, y1, y2, weight1 ); + + result[ 0 ] = values[ offset0 ] * ( 1 - ratio ) + values[ offset1 ] * ratio; + + } + + return result; + + } + + _calculate( x1, x2, y1, y2, x ) { + + /* + * Cubic Bezier curves + * https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Cubic_B.C3.A9zier_curves + * + * B(t) = ( 1 - t ) ^ 3 * P0 + * + 3 * ( 1 - t ) ^ 2 * t * P1 + * + 3 * ( 1 - t ) * t^2 * P2 + * + t ^ 3 * P3 + * ( 0 <= t <= 1 ) + * + * MMD uses Cubic Bezier curves for bone and camera animation interpolation. + * http://d.hatena.ne.jp/edvakf/20111016/1318716097 + * + * x = ( 1 - t ) ^ 3 * x0 + * + 3 * ( 1 - t ) ^ 2 * t * x1 + * + 3 * ( 1 - t ) * t^2 * x2 + * + t ^ 3 * x3 + * y = ( 1 - t ) ^ 3 * y0 + * + 3 * ( 1 - t ) ^ 2 * t * y1 + * + 3 * ( 1 - t ) * t^2 * y2 + * + t ^ 3 * y3 + * ( x0 = 0, y0 = 0 ) + * ( x3 = 1, y3 = 1 ) + * ( 0 <= t, x1, x2, y1, y2 <= 1 ) + * + * Here solves this equation with Bisection method, + * https://en.wikipedia.org/wiki/Bisection_method + * gets t, and then calculate y. + * + * f(t) = 3 * ( 1 - t ) ^ 2 * t * x1 + * + 3 * ( 1 - t ) * t^2 * x2 + * + t ^ 3 - x = 0 + * + * (Another option: Newton's method + * https://en.wikipedia.org/wiki/Newton%27s_method) + */ + + let c = 0.5; + let t = c; + let s = 1.0 - t; + const loop = 15; + const eps = 1e-5; + const math = Math; + + let sst3, stt3, ttt; + + for ( let i = 0; i < loop; i ++ ) { + + sst3 = 3.0 * s * s * t; + stt3 = 3.0 * s * t * t; + ttt = t * t * t; + + const ft = ( sst3 * x1 ) + ( stt3 * x2 ) + ( ttt ) - x; + + if ( math.abs( ft ) < eps ) break; + + c /= 2.0; + + t += ( ft < 0 ) ? c : - c; + s = 1.0 - t; + + } + + return ( sst3 * y1 ) + ( stt3 * y2 ) + ttt; + + } + +} + +class MMDToonMaterial extends ShaderMaterial { + + constructor( parameters ) { + + super(); + + this.isMMDToonMaterial = true; + + this.type = 'MMDToonMaterial'; + + this._matcapCombine = AddOperation; + this.emissiveIntensity = 1.0; + this.normalMapType = TangentSpaceNormalMap; + + this.combine = MultiplyOperation; + + this.wireframeLinecap = 'round'; + this.wireframeLinejoin = 'round'; + + this.flatShading = false; + + this.lights = true; + + this.vertexShader = MMDToonShader.vertexShader; + this.fragmentShader = MMDToonShader.fragmentShader; + + this.defines = Object.assign( {}, MMDToonShader.defines ); + Object.defineProperty( this, 'matcapCombine', { + + get: function () { + + return this._matcapCombine; + + }, + + set: function ( value ) { + + this._matcapCombine = value; + + switch ( value ) { + + case MultiplyOperation: + this.defines.MATCAP_BLENDING_MULTIPLY = true; + delete this.defines.MATCAP_BLENDING_ADD; + break; + + default: + case AddOperation: + this.defines.MATCAP_BLENDING_ADD = true; + delete this.defines.MATCAP_BLENDING_MULTIPLY; + break; + + } + + }, + + } ); + + this.uniforms = UniformsUtils.clone( MMDToonShader.uniforms ); + + // merged from MeshToon/Phong/MatcapMaterial + const exposePropertyNames = [ + 'specular', + 'opacity', + 'diffuse', + + 'map', + 'matcap', + 'gradientMap', + + 'lightMap', + 'lightMapIntensity', + + 'aoMap', + 'aoMapIntensity', + + 'emissive', + 'emissiveMap', + + 'bumpMap', + 'bumpScale', + + 'normalMap', + 'normalScale', + + 'displacemantBias', + 'displacemantMap', + 'displacemantScale', + + 'specularMap', + + 'alphaMap', + + 'reflectivity', + 'refractionRatio', + ]; + for ( const propertyName of exposePropertyNames ) { + + Object.defineProperty( this, propertyName, { + + get: function () { + + return this.uniforms[ propertyName ].value; + + }, + + set: function ( value ) { + + this.uniforms[ propertyName ].value = value; + + }, + + } ); + + } + + // Special path for shininess to handle zero shininess properly + this._shininess = 30; + Object.defineProperty( this, 'shininess', { + + get: function () { + + return this._shininess; + + }, + + set: function ( value ) { + + this._shininess = value; + this.uniforms.shininess.value = Math.max( this._shininess, 1e-4 ); // To prevent pow( 0.0, 0.0 ) + + }, + + } ); + + Object.defineProperty( + this, + 'color', + Object.getOwnPropertyDescriptor( this, 'diffuse' ) + ); + + this.setValues( parameters ); + + } + + copy( source ) { + + super.copy( source ); + + this.matcapCombine = source.matcapCombine; + this.emissiveIntensity = source.emissiveIntensity; + this.normalMapType = source.normalMapType; + + this.combine = source.combine; + + this.wireframeLinecap = source.wireframeLinecap; + this.wireframeLinejoin = source.wireframeLinejoin; + + this.flatShading = source.flatShading; + + return this; + + } + +} + +export { MMDLoader }; diff --git a/node_modules/three/examples/jsm/loaders/MTLLoader.js b/node_modules/three/examples/jsm/loaders/MTLLoader.js new file mode 100644 index 0000000..f277c97 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/MTLLoader.js @@ -0,0 +1,567 @@ +import { + Color, + DefaultLoadingManager, + FileLoader, + FrontSide, + Loader, + LoaderUtils, + MeshPhongMaterial, + RepeatWrapping, + TextureLoader, + Vector2, + SRGBColorSpace +} from 'three'; + +/** + * Loads a Wavefront .mtl file specifying materials + */ + +class MTLLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + /** + * Loads and parses a MTL asset from a URL. + * + * @param {String} url - URL to the MTL file. + * @param {Function} [onLoad] - Callback invoked with the loaded object. + * @param {Function} [onProgress] - Callback for download progress. + * @param {Function} [onError] - Callback for download errors. + * + * @see setPath setResourcePath + * + * @note In order for relative texture references to resolve correctly + * you must call setResourcePath() explicitly prior to load. + */ + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path; + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( text, path ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + setMaterialOptions( value ) { + + this.materialOptions = value; + return this; + + } + + /** + * Parses a MTL file. + * + * @param {String} text - Content of MTL file + * @return {MaterialCreator} + * + * @see setPath setResourcePath + * + * @note In order for relative texture references to resolve correctly + * you must call setResourcePath() explicitly prior to parse. + */ + parse( text, path ) { + + const lines = text.split( '\n' ); + let info = {}; + const delimiter_pattern = /\s+/; + const materialsInfo = {}; + + for ( let i = 0; i < lines.length; i ++ ) { + + let line = lines[ i ]; + line = line.trim(); + + if ( line.length === 0 || line.charAt( 0 ) === '#' ) { + + // Blank line or comment ignore + continue; + + } + + const pos = line.indexOf( ' ' ); + + let key = ( pos >= 0 ) ? line.substring( 0, pos ) : line; + key = key.toLowerCase(); + + let value = ( pos >= 0 ) ? line.substring( pos + 1 ) : ''; + value = value.trim(); + + if ( key === 'newmtl' ) { + + // New material + + info = { name: value }; + materialsInfo[ value ] = info; + + } else { + + if ( key === 'ka' || key === 'kd' || key === 'ks' || key === 'ke' ) { + + const ss = value.split( delimiter_pattern, 3 ); + info[ key ] = [ parseFloat( ss[ 0 ] ), parseFloat( ss[ 1 ] ), parseFloat( ss[ 2 ] ) ]; + + } else { + + info[ key ] = value; + + } + + } + + } + + const materialCreator = new MaterialCreator( this.resourcePath || path, this.materialOptions ); + materialCreator.setCrossOrigin( this.crossOrigin ); + materialCreator.setManager( this.manager ); + materialCreator.setMaterials( materialsInfo ); + return materialCreator; + + } + +} + +/** + * Create a new MTLLoader.MaterialCreator + * @param baseUrl - Url relative to which textures are loaded + * @param options - Set of options on how to construct the materials + * side: Which side to apply the material + * FrontSide (default), THREE.BackSide, THREE.DoubleSide + * wrap: What type of wrapping to apply for textures + * RepeatWrapping (default), THREE.ClampToEdgeWrapping, THREE.MirroredRepeatWrapping + * normalizeRGB: RGBs need to be normalized to 0-1 from 0-255 + * Default: false, assumed to be already normalized + * ignoreZeroRGBs: Ignore values of RGBs (Ka,Kd,Ks) that are all 0's + * Default: false + * @constructor + */ + +class MaterialCreator { + + constructor( baseUrl = '', options = {} ) { + + this.baseUrl = baseUrl; + this.options = options; + this.materialsInfo = {}; + this.materials = {}; + this.materialsArray = []; + this.nameLookup = {}; + + this.crossOrigin = 'anonymous'; + + this.side = ( this.options.side !== undefined ) ? this.options.side : FrontSide; + this.wrap = ( this.options.wrap !== undefined ) ? this.options.wrap : RepeatWrapping; + + } + + setCrossOrigin( value ) { + + this.crossOrigin = value; + return this; + + } + + setManager( value ) { + + this.manager = value; + + } + + setMaterials( materialsInfo ) { + + this.materialsInfo = this.convert( materialsInfo ); + this.materials = {}; + this.materialsArray = []; + this.nameLookup = {}; + + } + + convert( materialsInfo ) { + + if ( ! this.options ) return materialsInfo; + + const converted = {}; + + for ( const mn in materialsInfo ) { + + // Convert materials info into normalized form based on options + + const mat = materialsInfo[ mn ]; + + const covmat = {}; + + converted[ mn ] = covmat; + + for ( const prop in mat ) { + + let save = true; + let value = mat[ prop ]; + const lprop = prop.toLowerCase(); + + switch ( lprop ) { + + case 'kd': + case 'ka': + case 'ks': + + // Diffuse color (color under white light) using RGB values + + if ( this.options && this.options.normalizeRGB ) { + + value = [ value[ 0 ] / 255, value[ 1 ] / 255, value[ 2 ] / 255 ]; + + } + + if ( this.options && this.options.ignoreZeroRGBs ) { + + if ( value[ 0 ] === 0 && value[ 1 ] === 0 && value[ 2 ] === 0 ) { + + // ignore + + save = false; + + } + + } + + break; + + default: + + break; + + } + + if ( save ) { + + covmat[ lprop ] = value; + + } + + } + + } + + return converted; + + } + + preload() { + + for ( const mn in this.materialsInfo ) { + + this.create( mn ); + + } + + } + + getIndex( materialName ) { + + return this.nameLookup[ materialName ]; + + } + + getAsArray() { + + let index = 0; + + for ( const mn in this.materialsInfo ) { + + this.materialsArray[ index ] = this.create( mn ); + this.nameLookup[ mn ] = index; + index ++; + + } + + return this.materialsArray; + + } + + create( materialName ) { + + if ( this.materials[ materialName ] === undefined ) { + + this.createMaterial_( materialName ); + + } + + return this.materials[ materialName ]; + + } + + createMaterial_( materialName ) { + + // Create material + + const scope = this; + const mat = this.materialsInfo[ materialName ]; + const params = { + + name: materialName, + side: this.side + + }; + + function resolveURL( baseUrl, url ) { + + if ( typeof url !== 'string' || url === '' ) + return ''; + + // Absolute URL + if ( /^https?:\/\//i.test( url ) ) return url; + + return baseUrl + url; + + } + + function setMapForType( mapType, value ) { + + if ( params[ mapType ] ) return; // Keep the first encountered texture + + const texParams = scope.getTextureParams( value, params ); + const map = scope.loadTexture( resolveURL( scope.baseUrl, texParams.url ) ); + + map.repeat.copy( texParams.scale ); + map.offset.copy( texParams.offset ); + + map.wrapS = scope.wrap; + map.wrapT = scope.wrap; + + if ( mapType === 'map' || mapType === 'emissiveMap' ) { + + map.colorSpace = SRGBColorSpace; + + } + + params[ mapType ] = map; + + } + + for ( const prop in mat ) { + + const value = mat[ prop ]; + let n; + + if ( value === '' ) continue; + + switch ( prop.toLowerCase() ) { + + // Ns is material specular exponent + + case 'kd': + + // Diffuse color (color under white light) using RGB values + + params.color = new Color().fromArray( value ).convertSRGBToLinear(); + + break; + + case 'ks': + + // Specular color (color when light is reflected from shiny surface) using RGB values + params.specular = new Color().fromArray( value ).convertSRGBToLinear(); + + break; + + case 'ke': + + // Emissive using RGB values + params.emissive = new Color().fromArray( value ).convertSRGBToLinear(); + + break; + + case 'map_kd': + + // Diffuse texture map + + setMapForType( 'map', value ); + + break; + + case 'map_ks': + + // Specular map + + setMapForType( 'specularMap', value ); + + break; + + case 'map_ke': + + // Emissive map + + setMapForType( 'emissiveMap', value ); + + break; + + case 'norm': + + setMapForType( 'normalMap', value ); + + break; + + case 'map_bump': + case 'bump': + + // Bump texture map + + setMapForType( 'bumpMap', value ); + + break; + + case 'map_d': + + // Alpha map + + setMapForType( 'alphaMap', value ); + params.transparent = true; + + break; + + case 'ns': + + // The specular exponent (defines the focus of the specular highlight) + // A high exponent results in a tight, concentrated highlight. Ns values normally range from 0 to 1000. + + params.shininess = parseFloat( value ); + + break; + + case 'd': + n = parseFloat( value ); + + if ( n < 1 ) { + + params.opacity = n; + params.transparent = true; + + } + + break; + + case 'tr': + n = parseFloat( value ); + + if ( this.options && this.options.invertTrProperty ) n = 1 - n; + + if ( n > 0 ) { + + params.opacity = 1 - n; + params.transparent = true; + + } + + break; + + default: + break; + + } + + } + + this.materials[ materialName ] = new MeshPhongMaterial( params ); + return this.materials[ materialName ]; + + } + + getTextureParams( value, matParams ) { + + const texParams = { + + scale: new Vector2( 1, 1 ), + offset: new Vector2( 0, 0 ) + + }; + + const items = value.split( /\s+/ ); + let pos; + + pos = items.indexOf( '-bm' ); + + if ( pos >= 0 ) { + + matParams.bumpScale = parseFloat( items[ pos + 1 ] ); + items.splice( pos, 2 ); + + } + + pos = items.indexOf( '-s' ); + + if ( pos >= 0 ) { + + texParams.scale.set( parseFloat( items[ pos + 1 ] ), parseFloat( items[ pos + 2 ] ) ); + items.splice( pos, 4 ); // we expect 3 parameters here! + + } + + pos = items.indexOf( '-o' ); + + if ( pos >= 0 ) { + + texParams.offset.set( parseFloat( items[ pos + 1 ] ), parseFloat( items[ pos + 2 ] ) ); + items.splice( pos, 4 ); // we expect 3 parameters here! + + } + + texParams.url = items.join( ' ' ).trim(); + return texParams; + + } + + loadTexture( url, mapping, onLoad, onProgress, onError ) { + + const manager = ( this.manager !== undefined ) ? this.manager : DefaultLoadingManager; + let loader = manager.getHandler( url ); + + if ( loader === null ) { + + loader = new TextureLoader( manager ); + + } + + if ( loader.setCrossOrigin ) loader.setCrossOrigin( this.crossOrigin ); + + const texture = loader.load( url, onLoad, onProgress, onError ); + + if ( mapping !== undefined ) texture.mapping = mapping; + + return texture; + + } + +} + +export { MTLLoader }; diff --git a/node_modules/three/examples/jsm/loaders/MaterialXLoader.js b/node_modules/three/examples/jsm/loaders/MaterialXLoader.js new file mode 100644 index 0000000..3536d49 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/MaterialXLoader.js @@ -0,0 +1,852 @@ +import { + FileLoader, + Loader, + TextureLoader, + RepeatWrapping +} from 'three'; + +import { + MeshBasicNodeMaterial, MeshPhysicalNodeMaterial, + float, bool, int, vec2, vec3, vec4, color, texture, + positionLocal, positionWorld, uv, vertexColor, + normalLocal, normalWorld, tangentLocal, tangentWorld, + add, sub, mul, div, mod, abs, sign, floor, ceil, round, pow, sin, cos, tan, + asin, acos, atan2, sqrt, exp, clamp, min, max, normalize, length, dot, cross, normalMap, + remap, smoothstep, luminance, mx_rgbtohsv, mx_hsvtorgb, + mix, + mx_ramplr, mx_ramptb, mx_splitlr, mx_splittb, + mx_fractal_noise_float, mx_noise_float, mx_cell_noise_float, mx_worley_noise_float, + mx_transform_uv, + mx_safepower, mx_contrast, + mx_srgb_texture_to_lin_rec709, + saturation +} from '../nodes/Nodes.js'; + +const colorSpaceLib = { + mx_srgb_texture_to_lin_rec709 +}; + +class MXElement { + + constructor( name, nodeFunc, params = null ) { + + this.name = name; + this.nodeFunc = nodeFunc; + this.params = params; + + } + +} + +// Ref: https://github.com/mrdoob/three.js/issues/24674 + +const mx_add = ( in1, in2 = float( 0 ) ) => add( in1, in2 ); +const mx_subtract = ( in1, in2 = float( 0 ) ) => sub( in1, in2 ); +const mx_multiply = ( in1, in2 = float( 1 ) ) => mul( in1, in2 ); +const mx_divide = ( in1, in2 = float( 1 ) ) => div( in1, in2 ); +const mx_modulo = ( in1, in2 = float( 1 ) ) => mod( in1, in2 ); +const mx_power = ( in1, in2 = float( 1 ) ) => pow( in1, in2 ); +const mx_atan2 = ( in1 = float( 0 ), in2 = float( 1 ) ) => atan2( in1, in2 ); + +const MXElements = [ + + // << Math >> + new MXElement( 'add', mx_add, [ 'in1', 'in2' ] ), + new MXElement( 'subtract', mx_subtract, [ 'in1', 'in2' ] ), + new MXElement( 'multiply', mx_multiply, [ 'in1', 'in2' ] ), + new MXElement( 'divide', mx_divide, [ 'in1', 'in2' ] ), + new MXElement( 'modulo', mx_modulo, [ 'in1', 'in2' ] ), + new MXElement( 'absval', abs, [ 'in1', 'in2' ] ), + new MXElement( 'sign', sign, [ 'in1', 'in2' ] ), + new MXElement( 'floor', floor, [ 'in1', 'in2' ] ), + new MXElement( 'ceil', ceil, [ 'in1', 'in2' ] ), + new MXElement( 'round', round, [ 'in1', 'in2' ] ), + new MXElement( 'power', mx_power, [ 'in1', 'in2' ] ), + new MXElement( 'sin', sin, [ 'in' ] ), + new MXElement( 'cos', cos, [ 'in' ] ), + new MXElement( 'tan', tan, [ 'in' ] ), + new MXElement( 'asin', asin, [ 'in' ] ), + new MXElement( 'acos', acos, [ 'in' ] ), + new MXElement( 'atan2', mx_atan2, [ 'in1', 'in2' ] ), + new MXElement( 'sqrt', sqrt, [ 'in' ] ), + //new MtlXElement( 'ln', ... ), + new MXElement( 'exp', exp, [ 'in' ] ), + new MXElement( 'clamp', clamp, [ 'in', 'low', 'high' ] ), + new MXElement( 'min', min, [ 'in1', 'in2' ] ), + new MXElement( 'max', max, [ 'in1', 'in2' ] ), + new MXElement( 'normalize', normalize, [ 'in' ] ), + new MXElement( 'magnitude', length, [ 'in1', 'in2' ] ), + new MXElement( 'dotproduct', dot, [ 'in1', 'in2' ] ), + new MXElement( 'crossproduct', cross, [ 'in' ] ), + //new MtlXElement( 'transformpoint', ... ), + //new MtlXElement( 'transformvector', ... ), + //new MtlXElement( 'transformnormal', ... ), + //new MtlXElement( 'transformmatrix', ... ), + new MXElement( 'normalmap', normalMap, [ 'in', 'scale' ] ), + //new MtlXElement( 'transpose', ... ), + //new MtlXElement( 'determinant', ... ), + //new MtlXElement( 'invertmatrix', ... ), + //new MtlXElement( 'rotate2d', rotateUV, [ 'in', radians( 'amount' )** ] ), + //new MtlXElement( 'rotate3d', ... ), + //new MtlXElement( 'arrayappend', ... ), + //new MtlXElement( 'dot', ... ), + + // << Adjustment >> + new MXElement( 'remap', remap, [ 'in', 'inlow', 'inhigh', 'outlow', 'outhigh' ] ), + new MXElement( 'smoothstep', smoothstep, [ 'in', 'low', 'high' ] ), + //new MtlXElement( 'curveadjust', ... ), + //new MtlXElement( 'curvelookup', ... ), + new MXElement( 'luminance', luminance, [ 'in', 'lumacoeffs' ] ), + new MXElement( 'rgbtohsv', mx_rgbtohsv, [ 'in' ] ), + new MXElement( 'hsvtorgb', mx_hsvtorgb, [ 'in' ] ), + + // << Mix >> + new MXElement( 'mix', mix, [ 'bg', 'fg', 'mix' ] ), + + // << Channel >> + new MXElement( 'combine2', vec2, [ 'in1', 'in2' ] ), + new MXElement( 'combine3', vec3, [ 'in1', 'in2', 'in3' ] ), + new MXElement( 'combine4', vec4, [ 'in1', 'in2', 'in3', 'in4' ] ), + + // << Procedural >> + new MXElement( 'ramplr', mx_ramplr, [ 'valuel', 'valuer', 'texcoord' ] ), + new MXElement( 'ramptb', mx_ramptb, [ 'valuet', 'valueb', 'texcoord' ] ), + new MXElement( 'splitlr', mx_splitlr, [ 'valuel', 'valuer', 'texcoord' ] ), + new MXElement( 'splittb', mx_splittb, [ 'valuet', 'valueb', 'texcoord' ] ), + new MXElement( 'noise2d', mx_noise_float, [ 'texcoord', 'amplitude', 'pivot' ] ), + new MXElement( 'noise3d', mx_noise_float, [ 'texcoord', 'amplitude', 'pivot' ] ), + new MXElement( 'fractal3d', mx_fractal_noise_float, [ 'position', 'octaves', 'lacunarity', 'diminish', 'amplitude' ] ), + new MXElement( 'cellnoise2d', mx_cell_noise_float, [ 'texcoord' ] ), + new MXElement( 'cellnoise3d', mx_cell_noise_float, [ 'texcoord' ] ), + new MXElement( 'worleynoise2d', mx_worley_noise_float, [ 'texcoord', 'jitter' ] ), + new MXElement( 'worleynoise3d', mx_worley_noise_float, [ 'texcoord', 'jitter' ] ), + + // << Supplemental >> + //new MtlXElement( 'tiledimage', ... ), + //new MtlXElement( 'triplanarprojection', triplanarTextures, [ 'filex', 'filey', 'filez' ] ), + //new MtlXElement( 'ramp4', ... ), + //new MtlXElement( 'place2d', mx_place2d, [ 'texcoord', 'pivot', 'scale', 'rotate', 'offset' ] ), + new MXElement( 'safepower', mx_safepower, [ 'in1', 'in2' ] ), + new MXElement( 'contrast', mx_contrast, [ 'in', 'amount', 'pivot' ] ), + //new MtlXElement( 'hsvadjust', ... ), + new MXElement( 'saturate', saturation, [ 'in', 'amount' ] ), + //new MtlXElement( 'extract', ... ), + //new MtlXElement( 'separate2', ... ), + //new MtlXElement( 'separate3', ... ), + //new MtlXElement( 'separate4', ... ) + +]; + +const MtlXLibrary = {}; +MXElements.forEach( element => MtlXLibrary[ element.name ] = element ); + +class MaterialXLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const _onError = function ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + }; + + new FileLoader( this.manager ) + .setPath( this.path ) + .load( url, async ( text ) => { + + try { + + onLoad( this.parse( text ) ); + + } catch ( e ) { + + _onError( e ); + + } + + }, onProgress, _onError ); + + return this; + + } + + parse( text ) { + + return new MaterialX( this.manager, this.path ).parse( text ); + + } + +} + +class MaterialXNode { + + constructor( materialX, nodeXML, nodePath = '' ) { + + this.materialX = materialX; + this.nodeXML = nodeXML; + this.nodePath = nodePath ? nodePath + '/' + this.name : this.name; + + this.parent = null; + + this.node = null; + + this.children = []; + + } + + get element() { + + return this.nodeXML.nodeName; + + } + + get nodeGraph() { + + return this.getAttribute( 'nodegraph' ); + + } + + get nodeName() { + + return this.getAttribute( 'nodename' ); + + } + + get interfaceName() { + + return this.getAttribute( 'interfacename' ); + + } + + get output() { + + return this.getAttribute( 'output' ); + + } + + get name() { + + return this.getAttribute( 'name' ); + + } + + get type() { + + return this.getAttribute( 'type' ); + + } + + get value() { + + return this.getAttribute( 'value' ); + + } + + getNodeGraph() { + + let nodeX = this; + + while ( nodeX !== null ) { + + if ( nodeX.element === 'nodegraph' ) { + + break; + + } + + nodeX = nodeX.parent; + + } + + return nodeX; + + } + + getRoot() { + + let nodeX = this; + + while ( nodeX.parent !== null ) { + + nodeX = nodeX.parent; + + } + + return nodeX; + + } + + get referencePath() { + + let referencePath = null; + + if ( this.nodeGraph !== null && this.output !== null ) { + + referencePath = this.nodeGraph + '/' + this.output; + + } else if ( this.nodeName !== null || this.interfaceName !== null ) { + + referencePath = this.getNodeGraph().nodePath + '/' + ( this.nodeName || this.interfaceName ); + + } + + return referencePath; + + } + + get hasReference() { + + return this.referencePath !== null; + + } + + get isConst() { + + return this.element === 'input' && this.value !== null && this.type !== 'filename'; + + } + + getColorSpaceNode() { + + const csSource = this.getAttribute( 'colorspace' ); + const csTarget = this.getRoot().getAttribute( 'colorspace' ); + + const nodeName = `mx_${ csSource }_to_${ csTarget }`; + + return colorSpaceLib[ nodeName ]; + + } + + getTexture() { + + const filePrefix = this.getRecursiveAttribute( 'fileprefix' ) || ''; + + let loader = this.materialX.textureLoader; + const uri = filePrefix + this.value; + + if ( uri ) { + + const handler = this.materialX.manager.getHandler( uri ); + if ( handler !== null ) loader = handler; + + } + + const texture = loader.load( uri ); + texture.wrapS = texture.wrapT = RepeatWrapping; + texture.flipY = false; + + return texture; + + } + + getClassFromType( type ) { + + let nodeClass = null; + + if ( type === 'integer' ) nodeClass = int; + else if ( type === 'float' ) nodeClass = float; + else if ( type === 'vector2' ) nodeClass = vec2; + else if ( type === 'vector3' ) nodeClass = vec3; + else if ( type === 'vector4' || type === 'color4' ) nodeClass = vec4; + else if ( type === 'color3' ) nodeClass = color; + else if ( type === 'boolean' ) nodeClass = bool; + + return nodeClass; + + } + + getNode() { + + let node = this.node; + + if ( node !== null ) { + + return node; + + } + + // + + const type = this.type; + + if ( this.isConst ) { + + const nodeClass = this.getClassFromType( type ); + + node = nodeClass( ...this.getVector() ); + + } else if ( this.hasReference ) { + + node = this.materialX.getMaterialXNode( this.referencePath ).getNode(); + + } else { + + const element = this.element; + + if ( element === 'convert' ) { + + const nodeClass = this.getClassFromType( type ); + + node = nodeClass( this.getNodeByName( 'in' ) ); + + } else if ( element === 'constant' ) { + + node = this.getNodeByName( 'value' ); + + } else if ( element === 'position' ) { + + const space = this.getAttribute( 'space' ); + node = space === 'world' ? positionWorld : positionLocal; + + } else if ( element === 'normal' ) { + + const space = this.getAttribute( 'space' ); + node = space === 'world' ? normalWorld : normalLocal; + + } else if ( element === 'tangent' ) { + + const space = this.getAttribute( 'space' ); + node = space === 'world' ? tangentWorld : tangentLocal; + + } else if ( element === 'texcoord' ) { + + const indexNode = this.getChildByName( 'index' ); + const index = indexNode ? parseInt( indexNode.value ) : 0; + + node = uv( index ); + + } else if ( element === 'geomcolor' ) { + + const indexNode = this.getChildByName( 'index' ); + const index = indexNode ? parseInt( indexNode.value ) : 0; + + node = vertexColor( index ); + + } else if ( element === 'tiledimage' ) { + + const file = this.getChildByName( 'file' ); + + const textureFile = file.getTexture(); + const uvTiling = mx_transform_uv( ...this.getNodesByNames( [ 'uvtiling', 'uvoffset' ] ) ); + + node = texture( textureFile, uvTiling ); + + const colorSpaceNode = file.getColorSpaceNode(); + + if ( colorSpaceNode ) { + + node = colorSpaceNode( node ); + + } + + } else if ( element === 'image' ) { + + const file = this.getChildByName( 'file' ); + const uvNode = this.getNodeByName( 'texcoord' ); + + const textureFile = file.getTexture(); + + node = texture( textureFile, uvNode ); + + const colorSpaceNode = file.getColorSpaceNode(); + + if ( colorSpaceNode ) { + + node = colorSpaceNode( node ); + + } + + } else if ( MtlXLibrary[ element ] !== undefined ) { + + const nodeElement = MtlXLibrary[ element ]; + + node = nodeElement.nodeFunc( ...this.getNodesByNames( ...nodeElement.params ) ); + + } + + } + + // + + if ( node === null ) { + + console.warn( `THREE.MaterialXLoader: Unexpected node ${ new XMLSerializer().serializeToString( this.nodeXML ) }.` ); + + node = float( 0 ); + + } + + // + + const nodeToTypeClass = this.getClassFromType( type ); + + if ( nodeToTypeClass !== null ) { + + node = nodeToTypeClass( node ); + + } + + node.name = this.name; + + this.node = node; + + return node; + + } + + getChildByName( name ) { + + for ( const input of this.children ) { + + if ( input.name === name ) { + + return input; + + } + + } + + } + + getNodes() { + + const nodes = {}; + + for ( const input of this.children ) { + + const node = input.getNode(); + + nodes[ node.name ] = node; + + } + + return nodes; + + } + + getNodeByName( name ) { + + const child = this.getChildByName( name ); + + return child ? child.getNode() : undefined; + + } + + getNodesByNames( ...names ) { + + const nodes = []; + + for ( const name of names ) { + + const node = this.getNodeByName( name ); + + if ( node ) nodes.push( node ); + + } + + return nodes; + + } + + getValue() { + + return this.value.trim(); + + } + + getVector() { + + const vector = []; + + for ( const val of this.getValue().split( /[,|\s]/ ) ) { + + if ( val !== '' ) { + + vector.push( Number( val.trim() ) ); + + } + + } + + return vector; + + } + + getAttribute( name ) { + + return this.nodeXML.getAttribute( name ); + + } + + getRecursiveAttribute( name ) { + + let attribute = this.nodeXML.getAttribute( name ); + + if ( attribute === null && this.parent !== null ) { + + attribute = this.parent.getRecursiveAttribute( name ); + + } + + return attribute; + + } + + setStandardSurfaceToGltfPBR( material ) { + + const inputs = this.getNodes(); + + // + + let colorNode = null; + + if ( inputs.base && inputs.base_color ) colorNode = mul( inputs.base, inputs.base_color ); + else if ( inputs.base ) colorNode = inputs.base; + else if ( inputs.base_color ) colorNode = inputs.base_color; + + // + + let roughnessNode = null; + + if ( inputs.specular_roughness ) roughnessNode = inputs.specular_roughness; + + // + + let metalnessNode = null; + + if ( inputs.metalness ) metalnessNode = inputs.metalness; + + // + + let clearcoatNode = null; + let clearcoatRoughnessNode = null; + + if ( inputs.coat ) clearcoatNode = inputs.coat; + if ( inputs.coat_roughness ) clearcoatRoughnessNode = inputs.coat_roughness; + + if ( inputs.coat_color ) { + + colorNode = colorNode ? mul( colorNode, inputs.coat_color ) : colorNode; + + } + + // + + let normalNode = null; + + if ( inputs.normal ) normalNode = inputs.normal; + + // + + let emissiveNode = null; + + if ( inputs.emission ) emissiveNode = inputs.emission; + if ( inputs.emissionColor ) { + + emissiveNode = emissiveNode ? mul( emissiveNode, inputs.emissionColor ) : emissiveNode; + + } + + // + + material.colorNode = colorNode || color( 0.8, 0.8, 0.8 ); + material.roughnessNode = roughnessNode || float( 0.2 ); + material.metalnessNode = metalnessNode || float( 0 ); + material.clearcoatNode = clearcoatNode || float( 0 ); + material.clearcoatRoughnessNode = clearcoatRoughnessNode || float( 0 ); + if ( normalNode ) material.normalNode = normalNode; + if ( emissiveNode ) material.emissiveNode = emissiveNode; + + } + + /*setGltfPBR( material ) { + + const inputs = this.getNodes(); + + console.log( inputs ); + + }*/ + + setMaterial( material ) { + + const element = this.element; + + if ( element === 'gltf_pbr' ) { + + //this.setGltfPBR( material ); + + } else if ( element === 'standard_surface' ) { + + this.setStandardSurfaceToGltfPBR( material ); + + } + + } + + toBasicMaterial() { + + const material = new MeshBasicNodeMaterial(); + material.name = this.name; + + for ( const nodeX of this.children.toReversed() ) { + + if ( nodeX.name === 'out' ) { + + material.colorNode = nodeX.getNode(); + + break; + + } + + } + + return material; + + } + + toPhysicalMaterial() { + + const material = new MeshPhysicalNodeMaterial(); + material.name = this.name; + + for ( const nodeX of this.children ) { + + const shaderProperties = this.materialX.getMaterialXNode( nodeX.nodeName ); + shaderProperties.setMaterial( material ); + + } + + return material; + + } + + toMaterials() { + + const materials = {}; + + let isUnlit = true; + + for ( const nodeX of this.children ) { + + if ( nodeX.element === 'surfacematerial' ) { + + const material = nodeX.toPhysicalMaterial(); + + materials[ material.name ] = material; + + isUnlit = false; + + } + + } + + if ( isUnlit ) { + + for ( const nodeX of this.children ) { + + if ( nodeX.element === 'nodegraph' ) { + + const material = nodeX.toBasicMaterial(); + + materials[ material.name ] = material; + + } + + } + + } + + return materials; + + } + + add( materialXNode ) { + + materialXNode.parent = this; + + this.children.push( materialXNode ); + + } + +} + +class MaterialX { + + constructor( manager, path ) { + + this.manager = manager; + this.path = path; + this.resourcePath = ''; + + this.nodesXLib = new Map(); + //this.nodesXRefLib = new WeakMap(); + + this.textureLoader = new TextureLoader( manager ); + + } + + addMaterialXNode( materialXNode ) { + + this.nodesXLib.set( materialXNode.nodePath, materialXNode ); + + } + + /*getMaterialXNodeFromXML( xmlNode ) { + + return this.nodesXRefLib.get( xmlNode ); + + }*/ + + getMaterialXNode( ...names ) { + + return this.nodesXLib.get( names.join( '/' ) ); + + } + + parseNode( nodeXML, nodePath = '' ) { + + const materialXNode = new MaterialXNode( this, nodeXML, nodePath ); + if ( materialXNode.nodePath ) this.addMaterialXNode( materialXNode ); + + for ( const childNodeXML of nodeXML.children ) { + + const childMXNode = this.parseNode( childNodeXML, materialXNode.nodePath ); + materialXNode.add( childMXNode ); + + } + + return materialXNode; + + } + + parse( text ) { + + const rootXML = new DOMParser().parseFromString( text, 'application/xml' ).documentElement; + + this.textureLoader.setPath( this.path ); + + // + + const materials = this.parseNode( rootXML ).toMaterials(); + + return { materials }; + + } + +} + +export { MaterialXLoader }; diff --git a/node_modules/three/examples/jsm/loaders/NRRDLoader.js b/node_modules/three/examples/jsm/loaders/NRRDLoader.js new file mode 100644 index 0000000..c6c77ff --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/NRRDLoader.js @@ -0,0 +1,686 @@ +import { + FileLoader, + Loader, + Matrix4, + Vector3 +} from 'three'; +import * as fflate from '../libs/fflate.module.js'; +import { Volume } from '../misc/Volume.js'; + +class NRRDLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( data ) { + + try { + + onLoad( scope.parse( data ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + /** + * + * @param {boolean} segmentation is a option for user to choose + */ + setSegmentation( segmentation ) { + + this.segmentation = segmentation; + + } + + parse( data ) { + + // this parser is largely inspired from the XTK NRRD parser : https://github.com/xtk/X + + let _data = data; + + let _dataPointer = 0; + + const _nativeLittleEndian = new Int8Array( new Int16Array( [ 1 ] ).buffer )[ 0 ] > 0; + + const _littleEndian = true; + + const headerObject = {}; + + function scan( type, chunks ) { + + let _chunkSize = 1; + let _array_type = Uint8Array; + + switch ( type ) { + + // 1 byte data types + case 'uchar': + break; + case 'schar': + _array_type = Int8Array; + break; + // 2 byte data types + case 'ushort': + _array_type = Uint16Array; + _chunkSize = 2; + break; + case 'sshort': + _array_type = Int16Array; + _chunkSize = 2; + break; + // 4 byte data types + case 'uint': + _array_type = Uint32Array; + _chunkSize = 4; + break; + case 'sint': + _array_type = Int32Array; + _chunkSize = 4; + break; + case 'float': + _array_type = Float32Array; + _chunkSize = 4; + break; + case 'complex': + _array_type = Float64Array; + _chunkSize = 8; + break; + case 'double': + _array_type = Float64Array; + _chunkSize = 8; + break; + + } + + // increase the data pointer in-place + let _bytes = new _array_type( _data.slice( _dataPointer, + _dataPointer += chunks * _chunkSize ) ); + + // if required, flip the endianness of the bytes + if ( _nativeLittleEndian != _littleEndian ) { + + // we need to flip here since the format doesn't match the native endianness + _bytes = flipEndianness( _bytes, _chunkSize ); + + } + + // return the byte array + return _bytes; + + } + + //Flips typed array endianness in-place. Based on https://github.com/kig/DataStream.js/blob/master/DataStream.js. + + function flipEndianness( array, chunkSize ) { + + const u8 = new Uint8Array( array.buffer, array.byteOffset, array.byteLength ); + for ( let i = 0; i < array.byteLength; i += chunkSize ) { + + for ( let j = i + chunkSize - 1, k = i; j > k; j --, k ++ ) { + + const tmp = u8[ k ]; + u8[ k ] = u8[ j ]; + u8[ j ] = tmp; + + } + + } + + return array; + + } + + //parse the header + function parseHeader( header ) { + + let data, field, fn, i, l, m, _i, _len; + const lines = header.split( /\r?\n/ ); + for ( _i = 0, _len = lines.length; _i < _len; _i ++ ) { + + l = lines[ _i ]; + if ( l.match( /NRRD\d+/ ) ) { + + headerObject.isNrrd = true; + + } else if ( ! l.match( /^#/ ) && ( m = l.match( /(.*):(.*)/ ) ) ) { + + field = m[ 1 ].trim(); + data = m[ 2 ].trim(); + fn = _fieldFunctions[ field ]; + if ( fn ) { + + fn.call( headerObject, data ); + + } else { + + headerObject[ field ] = data; + + } + + } + + } + + if ( ! headerObject.isNrrd ) { + + throw new Error( 'Not an NRRD file' ); + + } + + if ( headerObject.encoding === 'bz2' || headerObject.encoding === 'bzip2' ) { + + throw new Error( 'Bzip is not supported' ); + + } + + if ( ! headerObject.vectors ) { + + //if no space direction is set, let's use the identity + headerObject.vectors = [ ]; + headerObject.vectors.push( [ 1, 0, 0 ] ); + headerObject.vectors.push( [ 0, 1, 0 ] ); + headerObject.vectors.push( [ 0, 0, 1 ] ); + + //apply spacing if defined + if ( headerObject.spacings ) { + + for ( i = 0; i <= 2; i ++ ) { + + if ( ! isNaN( headerObject.spacings[ i ] ) ) { + + for ( let j = 0; j <= 2; j ++ ) { + + headerObject.vectors[ i ][ j ] *= headerObject.spacings[ i ]; + + } + + } + + } + + } + + } + + } + + //parse the data when registred as one of this type : 'text', 'ascii', 'txt' + function parseDataAsText( data, start, end ) { + + let number = ''; + start = start || 0; + end = end || data.length; + let value; + //length of the result is the product of the sizes + const lengthOfTheResult = headerObject.sizes.reduce( function ( previous, current ) { + + return previous * current; + + }, 1 ); + + let base = 10; + if ( headerObject.encoding === 'hex' ) { + + base = 16; + + } + + const result = new headerObject.__array( lengthOfTheResult ); + let resultIndex = 0; + let parsingFunction = parseInt; + if ( headerObject.__array === Float32Array || headerObject.__array === Float64Array ) { + + parsingFunction = parseFloat; + + } + + for ( let i = start; i < end; i ++ ) { + + value = data[ i ]; + //if value is not a space + if ( ( value < 9 || value > 13 ) && value !== 32 ) { + + number += String.fromCharCode( value ); + + } else { + + if ( number !== '' ) { + + result[ resultIndex ] = parsingFunction( number, base ); + resultIndex ++; + + } + + number = ''; + + } + + } + + if ( number !== '' ) { + + result[ resultIndex ] = parsingFunction( number, base ); + resultIndex ++; + + } + + return result; + + } + + const _bytes = scan( 'uchar', data.byteLength ); + const _length = _bytes.length; + let _header = null; + let _data_start = 0; + let i; + for ( i = 1; i < _length; i ++ ) { + + if ( _bytes[ i - 1 ] == 10 && _bytes[ i ] == 10 ) { + + // we found two line breaks in a row + // now we know what the header is + _header = this.parseChars( _bytes, 0, i - 2 ); + // this is were the data starts + _data_start = i + 1; + break; + + } + + } + + // parse the header + parseHeader( _header ); + + _data = _bytes.subarray( _data_start ); // the data without header + if ( headerObject.encoding.substring( 0, 2 ) === 'gz' ) { + + // we need to decompress the datastream + // here we start the unzipping and get a typed Uint8Array back + _data = fflate.gunzipSync( new Uint8Array( _data ) ); + + } else if ( headerObject.encoding === 'ascii' || headerObject.encoding === 'text' || headerObject.encoding === 'txt' || headerObject.encoding === 'hex' ) { + + _data = parseDataAsText( _data ); + + } else if ( headerObject.encoding === 'raw' ) { + + //we need to copy the array to create a new array buffer, else we retrieve the original arraybuffer with the header + const _copy = new Uint8Array( _data.length ); + + for ( let i = 0; i < _data.length; i ++ ) { + + _copy[ i ] = _data[ i ]; + + } + + _data = _copy; + + } + + // .. let's use the underlying array buffer + _data = _data.buffer; + + const volume = new Volume(); + volume.header = headerObject; + volume.segmentation = this.segmentation; + // + // parse the (unzipped) data to a datastream of the correct type + // + volume.data = new headerObject.__array( _data ); + // get the min and max intensities + const min_max = volume.computeMinMax(); + const min = min_max[ 0 ]; + const max = min_max[ 1 ]; + // attach the scalar range to the volume + volume.windowLow = min; + volume.windowHigh = max; + + // get the image dimensions + volume.dimensions = [ headerObject.sizes[ 0 ], headerObject.sizes[ 1 ], headerObject.sizes[ 2 ] ]; + volume.xLength = volume.dimensions[ 0 ]; + volume.yLength = volume.dimensions[ 1 ]; + volume.zLength = volume.dimensions[ 2 ]; + + // Identify axis order in the space-directions matrix from the header if possible. + if ( headerObject.vectors ) { + + const xIndex = headerObject.vectors.findIndex( vector => vector[ 0 ] !== 0 ); + const yIndex = headerObject.vectors.findIndex( vector => vector[ 1 ] !== 0 ); + const zIndex = headerObject.vectors.findIndex( vector => vector[ 2 ] !== 0 ); + + const axisOrder = []; + + if ( xIndex !== yIndex && xIndex !== zIndex && yIndex !== zIndex ) { + + axisOrder[ xIndex ] = 'x'; + axisOrder[ yIndex ] = 'y'; + axisOrder[ zIndex ] = 'z'; + + } else { + + axisOrder[ 0 ] = 'x'; + axisOrder[ 1 ] = 'y'; + axisOrder[ 2 ] = 'z'; + + } + + volume.axisOrder = axisOrder; + + } else { + + volume.axisOrder = [ 'x', 'y', 'z' ]; + + } + + // spacing + const spacingX = new Vector3().fromArray( headerObject.vectors[ 0 ] ).length(); + const spacingY = new Vector3().fromArray( headerObject.vectors[ 1 ] ).length(); + const spacingZ = new Vector3().fromArray( headerObject.vectors[ 2 ] ).length(); + volume.spacing = [ spacingX, spacingY, spacingZ ]; + + + // Create IJKtoRAS matrix + volume.matrix = new Matrix4(); + + const transitionMatrix = new Matrix4(); + + if ( headerObject.space === 'left-posterior-superior' ) { + + transitionMatrix.set( + - 1, 0, 0, 0, + 0, - 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 + ); + + } else if ( headerObject.space === 'left-anterior-superior' ) { + + transitionMatrix.set( + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, - 1, 0, + 0, 0, 0, 1 + ); + + } + + + if ( ! headerObject.vectors ) { + + volume.matrix.set( + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1 ); + + } else { + + const v = headerObject.vectors; + + const ijk_to_transition = new Matrix4().set( + v[ 0 ][ 0 ], v[ 1 ][ 0 ], v[ 2 ][ 0 ], 0, + v[ 0 ][ 1 ], v[ 1 ][ 1 ], v[ 2 ][ 1 ], 0, + v[ 0 ][ 2 ], v[ 1 ][ 2 ], v[ 2 ][ 2 ], 0, + 0, 0, 0, 1 + ); + + const transition_to_ras = new Matrix4().multiplyMatrices( ijk_to_transition, transitionMatrix ); + + volume.matrix = transition_to_ras; + + } + + volume.inverseMatrix = new Matrix4(); + volume.inverseMatrix.copy( volume.matrix ).invert(); + + volume.RASDimensions = [ + Math.floor( volume.xLength * spacingX ), + Math.floor( volume.yLength * spacingY ), + Math.floor( volume.zLength * spacingZ ) + ]; + + // .. and set the default threshold + // only if the threshold was not already set + if ( volume.lowerThreshold === - Infinity ) { + + volume.lowerThreshold = min; + + } + + if ( volume.upperThreshold === Infinity ) { + + volume.upperThreshold = max; + + } + + return volume; + + } + + parseChars( array, start, end ) { + + // without borders, use the whole array + if ( start === undefined ) { + + start = 0; + + } + + if ( end === undefined ) { + + end = array.length; + + } + + let output = ''; + // create and append the chars + let i = 0; + for ( i = start; i < end; ++ i ) { + + output += String.fromCharCode( array[ i ] ); + + } + + return output; + + } + +} + +const _fieldFunctions = { + + type: function ( data ) { + + switch ( data ) { + + case 'uchar': + case 'unsigned char': + case 'uint8': + case 'uint8_t': + this.__array = Uint8Array; + break; + case 'signed char': + case 'int8': + case 'int8_t': + this.__array = Int8Array; + break; + case 'short': + case 'short int': + case 'signed short': + case 'signed short int': + case 'int16': + case 'int16_t': + this.__array = Int16Array; + break; + case 'ushort': + case 'unsigned short': + case 'unsigned short int': + case 'uint16': + case 'uint16_t': + this.__array = Uint16Array; + break; + case 'int': + case 'signed int': + case 'int32': + case 'int32_t': + this.__array = Int32Array; + break; + case 'uint': + case 'unsigned int': + case 'uint32': + case 'uint32_t': + this.__array = Uint32Array; + break; + case 'float': + this.__array = Float32Array; + break; + case 'double': + this.__array = Float64Array; + break; + default: + throw new Error( 'Unsupported NRRD data type: ' + data ); + + } + + return this.type = data; + + }, + + endian: function ( data ) { + + return this.endian = data; + + }, + + encoding: function ( data ) { + + return this.encoding = data; + + }, + + dimension: function ( data ) { + + return this.dim = parseInt( data, 10 ); + + }, + + sizes: function ( data ) { + + let i; + return this.sizes = ( function () { + + const _ref = data.split( /\s+/ ); + const _results = []; + + for ( let _i = 0, _len = _ref.length; _i < _len; _i ++ ) { + + i = _ref[ _i ]; + _results.push( parseInt( i, 10 ) ); + + } + + return _results; + + } )(); + + }, + + space: function ( data ) { + + return this.space = data; + + }, + + 'space origin': function ( data ) { + + return this.space_origin = data.split( '(' )[ 1 ].split( ')' )[ 0 ].split( ',' ); + + }, + + 'space directions': function ( data ) { + + let f, v; + const parts = data.match( /\(.*?\)/g ); + return this.vectors = ( function () { + + const _results = []; + + for ( let _i = 0, _len = parts.length; _i < _len; _i ++ ) { + + v = parts[ _i ]; + _results.push( ( function () { + + const _ref = v.slice( 1, - 1 ).split( /,/ ); + const _results2 = []; + + for ( let _j = 0, _len2 = _ref.length; _j < _len2; _j ++ ) { + + f = _ref[ _j ]; + _results2.push( parseFloat( f ) ); + + } + + return _results2; + + } )() ); + + } + + return _results; + + } )(); + + }, + + spacings: function ( data ) { + + let f; + const parts = data.split( /\s+/ ); + return this.spacings = ( function () { + + const _results = []; + + for ( let _i = 0, _len = parts.length; _i < _len; _i ++ ) { + + f = parts[ _i ]; + _results.push( parseFloat( f ) ); + + } + + return _results; + + } )(); + + } + +}; + +export { NRRDLoader }; diff --git a/node_modules/three/examples/jsm/loaders/OBJLoader.js b/node_modules/three/examples/jsm/loaders/OBJLoader.js new file mode 100644 index 0000000..7792458 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/OBJLoader.js @@ -0,0 +1,905 @@ +import { + BufferGeometry, + FileLoader, + Float32BufferAttribute, + Group, + LineBasicMaterial, + LineSegments, + Loader, + Material, + Mesh, + MeshPhongMaterial, + Points, + PointsMaterial, + Vector3, + Color +} from 'three'; + +// o object_name | g group_name +const _object_pattern = /^[og]\s*(.+)?/; +// mtllib file_reference +const _material_library_pattern = /^mtllib /; +// usemtl material_name +const _material_use_pattern = /^usemtl /; +// usemap map_name +const _map_use_pattern = /^usemap /; +const _face_vertex_data_separator_pattern = /\s+/; + +const _vA = new Vector3(); +const _vB = new Vector3(); +const _vC = new Vector3(); + +const _ab = new Vector3(); +const _cb = new Vector3(); + +const _color = new Color(); + +function ParserState() { + + const state = { + objects: [], + object: {}, + + vertices: [], + normals: [], + colors: [], + uvs: [], + + materials: {}, + materialLibraries: [], + + startObject: function ( name, fromDeclaration ) { + + // If the current object (initial from reset) is not from a g/o declaration in the parsed + // file. We need to use it for the first parsed g/o to keep things in sync. + if ( this.object && this.object.fromDeclaration === false ) { + + this.object.name = name; + this.object.fromDeclaration = ( fromDeclaration !== false ); + return; + + } + + const previousMaterial = ( this.object && typeof this.object.currentMaterial === 'function' ? this.object.currentMaterial() : undefined ); + + if ( this.object && typeof this.object._finalize === 'function' ) { + + this.object._finalize( true ); + + } + + this.object = { + name: name || '', + fromDeclaration: ( fromDeclaration !== false ), + + geometry: { + vertices: [], + normals: [], + colors: [], + uvs: [], + hasUVIndices: false + }, + materials: [], + smooth: true, + + startMaterial: function ( name, libraries ) { + + const previous = this._finalize( false ); + + // New usemtl declaration overwrites an inherited material, except if faces were declared + // after the material, then it must be preserved for proper MultiMaterial continuation. + if ( previous && ( previous.inherited || previous.groupCount <= 0 ) ) { + + this.materials.splice( previous.index, 1 ); + + } + + const material = { + index: this.materials.length, + name: name || '', + mtllib: ( Array.isArray( libraries ) && libraries.length > 0 ? libraries[ libraries.length - 1 ] : '' ), + smooth: ( previous !== undefined ? previous.smooth : this.smooth ), + groupStart: ( previous !== undefined ? previous.groupEnd : 0 ), + groupEnd: - 1, + groupCount: - 1, + inherited: false, + + clone: function ( index ) { + + const cloned = { + index: ( typeof index === 'number' ? index : this.index ), + name: this.name, + mtllib: this.mtllib, + smooth: this.smooth, + groupStart: 0, + groupEnd: - 1, + groupCount: - 1, + inherited: false + }; + cloned.clone = this.clone.bind( cloned ); + return cloned; + + } + }; + + this.materials.push( material ); + + return material; + + }, + + currentMaterial: function () { + + if ( this.materials.length > 0 ) { + + return this.materials[ this.materials.length - 1 ]; + + } + + return undefined; + + }, + + _finalize: function ( end ) { + + const lastMultiMaterial = this.currentMaterial(); + if ( lastMultiMaterial && lastMultiMaterial.groupEnd === - 1 ) { + + lastMultiMaterial.groupEnd = this.geometry.vertices.length / 3; + lastMultiMaterial.groupCount = lastMultiMaterial.groupEnd - lastMultiMaterial.groupStart; + lastMultiMaterial.inherited = false; + + } + + // Ignore objects tail materials if no face declarations followed them before a new o/g started. + if ( end && this.materials.length > 1 ) { + + for ( let mi = this.materials.length - 1; mi >= 0; mi -- ) { + + if ( this.materials[ mi ].groupCount <= 0 ) { + + this.materials.splice( mi, 1 ); + + } + + } + + } + + // Guarantee at least one empty material, this makes the creation later more straight forward. + if ( end && this.materials.length === 0 ) { + + this.materials.push( { + name: '', + smooth: this.smooth + } ); + + } + + return lastMultiMaterial; + + } + }; + + // Inherit previous objects material. + // Spec tells us that a declared material must be set to all objects until a new material is declared. + // If a usemtl declaration is encountered while this new object is being parsed, it will + // overwrite the inherited material. Exception being that there was already face declarations + // to the inherited material, then it will be preserved for proper MultiMaterial continuation. + + if ( previousMaterial && previousMaterial.name && typeof previousMaterial.clone === 'function' ) { + + const declared = previousMaterial.clone( 0 ); + declared.inherited = true; + this.object.materials.push( declared ); + + } + + this.objects.push( this.object ); + + }, + + finalize: function () { + + if ( this.object && typeof this.object._finalize === 'function' ) { + + this.object._finalize( true ); + + } + + }, + + parseVertexIndex: function ( value, len ) { + + const index = parseInt( value, 10 ); + return ( index >= 0 ? index - 1 : index + len / 3 ) * 3; + + }, + + parseNormalIndex: function ( value, len ) { + + const index = parseInt( value, 10 ); + return ( index >= 0 ? index - 1 : index + len / 3 ) * 3; + + }, + + parseUVIndex: function ( value, len ) { + + const index = parseInt( value, 10 ); + return ( index >= 0 ? index - 1 : index + len / 2 ) * 2; + + }, + + addVertex: function ( a, b, c ) { + + const src = this.vertices; + const dst = this.object.geometry.vertices; + + dst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] ); + dst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] ); + dst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] ); + + }, + + addVertexPoint: function ( a ) { + + const src = this.vertices; + const dst = this.object.geometry.vertices; + + dst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] ); + + }, + + addVertexLine: function ( a ) { + + const src = this.vertices; + const dst = this.object.geometry.vertices; + + dst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] ); + + }, + + addNormal: function ( a, b, c ) { + + const src = this.normals; + const dst = this.object.geometry.normals; + + dst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] ); + dst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] ); + dst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] ); + + }, + + addFaceNormal: function ( a, b, c ) { + + const src = this.vertices; + const dst = this.object.geometry.normals; + + _vA.fromArray( src, a ); + _vB.fromArray( src, b ); + _vC.fromArray( src, c ); + + _cb.subVectors( _vC, _vB ); + _ab.subVectors( _vA, _vB ); + _cb.cross( _ab ); + + _cb.normalize(); + + dst.push( _cb.x, _cb.y, _cb.z ); + dst.push( _cb.x, _cb.y, _cb.z ); + dst.push( _cb.x, _cb.y, _cb.z ); + + }, + + addColor: function ( a, b, c ) { + + const src = this.colors; + const dst = this.object.geometry.colors; + + if ( src[ a ] !== undefined ) dst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] ); + if ( src[ b ] !== undefined ) dst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] ); + if ( src[ c ] !== undefined ) dst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] ); + + }, + + addUV: function ( a, b, c ) { + + const src = this.uvs; + const dst = this.object.geometry.uvs; + + dst.push( src[ a + 0 ], src[ a + 1 ] ); + dst.push( src[ b + 0 ], src[ b + 1 ] ); + dst.push( src[ c + 0 ], src[ c + 1 ] ); + + }, + + addDefaultUV: function () { + + const dst = this.object.geometry.uvs; + + dst.push( 0, 0 ); + dst.push( 0, 0 ); + dst.push( 0, 0 ); + + }, + + addUVLine: function ( a ) { + + const src = this.uvs; + const dst = this.object.geometry.uvs; + + dst.push( src[ a + 0 ], src[ a + 1 ] ); + + }, + + addFace: function ( a, b, c, ua, ub, uc, na, nb, nc ) { + + const vLen = this.vertices.length; + + let ia = this.parseVertexIndex( a, vLen ); + let ib = this.parseVertexIndex( b, vLen ); + let ic = this.parseVertexIndex( c, vLen ); + + this.addVertex( ia, ib, ic ); + this.addColor( ia, ib, ic ); + + // normals + + if ( na !== undefined && na !== '' ) { + + const nLen = this.normals.length; + + ia = this.parseNormalIndex( na, nLen ); + ib = this.parseNormalIndex( nb, nLen ); + ic = this.parseNormalIndex( nc, nLen ); + + this.addNormal( ia, ib, ic ); + + } else { + + this.addFaceNormal( ia, ib, ic ); + + } + + // uvs + + if ( ua !== undefined && ua !== '' ) { + + const uvLen = this.uvs.length; + + ia = this.parseUVIndex( ua, uvLen ); + ib = this.parseUVIndex( ub, uvLen ); + ic = this.parseUVIndex( uc, uvLen ); + + this.addUV( ia, ib, ic ); + + this.object.geometry.hasUVIndices = true; + + } else { + + // add placeholder values (for inconsistent face definitions) + + this.addDefaultUV(); + + } + + }, + + addPointGeometry: function ( vertices ) { + + this.object.geometry.type = 'Points'; + + const vLen = this.vertices.length; + + for ( let vi = 0, l = vertices.length; vi < l; vi ++ ) { + + const index = this.parseVertexIndex( vertices[ vi ], vLen ); + + this.addVertexPoint( index ); + this.addColor( index ); + + } + + }, + + addLineGeometry: function ( vertices, uvs ) { + + this.object.geometry.type = 'Line'; + + const vLen = this.vertices.length; + const uvLen = this.uvs.length; + + for ( let vi = 0, l = vertices.length; vi < l; vi ++ ) { + + this.addVertexLine( this.parseVertexIndex( vertices[ vi ], vLen ) ); + + } + + for ( let uvi = 0, l = uvs.length; uvi < l; uvi ++ ) { + + this.addUVLine( this.parseUVIndex( uvs[ uvi ], uvLen ) ); + + } + + } + + }; + + state.startObject( '', false ); + + return state; + +} + +// + +class OBJLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.materials = null; + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( text ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + setMaterials( materials ) { + + this.materials = materials; + + return this; + + } + + parse( text ) { + + const state = new ParserState(); + + if ( text.indexOf( '\r\n' ) !== - 1 ) { + + // This is faster than String.split with regex that splits on both + text = text.replace( /\r\n/g, '\n' ); + + } + + if ( text.indexOf( '\\\n' ) !== - 1 ) { + + // join lines separated by a line continuation character (\) + text = text.replace( /\\\n/g, '' ); + + } + + const lines = text.split( '\n' ); + let result = []; + + for ( let i = 0, l = lines.length; i < l; i ++ ) { + + const line = lines[ i ].trimStart(); + + if ( line.length === 0 ) continue; + + const lineFirstChar = line.charAt( 0 ); + + // @todo invoke passed in handler if any + if ( lineFirstChar === '#' ) continue; // skip comments + + if ( lineFirstChar === 'v' ) { + + const data = line.split( _face_vertex_data_separator_pattern ); + + switch ( data[ 0 ] ) { + + case 'v': + state.vertices.push( + parseFloat( data[ 1 ] ), + parseFloat( data[ 2 ] ), + parseFloat( data[ 3 ] ) + ); + if ( data.length >= 7 ) { + + _color.setRGB( + parseFloat( data[ 4 ] ), + parseFloat( data[ 5 ] ), + parseFloat( data[ 6 ] ) + ).convertSRGBToLinear(); + + state.colors.push( _color.r, _color.g, _color.b ); + + } else { + + // if no colors are defined, add placeholders so color and vertex indices match + + state.colors.push( undefined, undefined, undefined ); + + } + + break; + case 'vn': + state.normals.push( + parseFloat( data[ 1 ] ), + parseFloat( data[ 2 ] ), + parseFloat( data[ 3 ] ) + ); + break; + case 'vt': + state.uvs.push( + parseFloat( data[ 1 ] ), + parseFloat( data[ 2 ] ) + ); + break; + + } + + } else if ( lineFirstChar === 'f' ) { + + const lineData = line.slice( 1 ).trim(); + const vertexData = lineData.split( _face_vertex_data_separator_pattern ); + const faceVertices = []; + + // Parse the face vertex data into an easy to work with format + + for ( let j = 0, jl = vertexData.length; j < jl; j ++ ) { + + const vertex = vertexData[ j ]; + + if ( vertex.length > 0 ) { + + const vertexParts = vertex.split( '/' ); + faceVertices.push( vertexParts ); + + } + + } + + // Draw an edge between the first vertex and all subsequent vertices to form an n-gon + + const v1 = faceVertices[ 0 ]; + + for ( let j = 1, jl = faceVertices.length - 1; j < jl; j ++ ) { + + const v2 = faceVertices[ j ]; + const v3 = faceVertices[ j + 1 ]; + + state.addFace( + v1[ 0 ], v2[ 0 ], v3[ 0 ], + v1[ 1 ], v2[ 1 ], v3[ 1 ], + v1[ 2 ], v2[ 2 ], v3[ 2 ] + ); + + } + + } else if ( lineFirstChar === 'l' ) { + + const lineParts = line.substring( 1 ).trim().split( ' ' ); + let lineVertices = []; + const lineUVs = []; + + if ( line.indexOf( '/' ) === - 1 ) { + + lineVertices = lineParts; + + } else { + + for ( let li = 0, llen = lineParts.length; li < llen; li ++ ) { + + const parts = lineParts[ li ].split( '/' ); + + if ( parts[ 0 ] !== '' ) lineVertices.push( parts[ 0 ] ); + if ( parts[ 1 ] !== '' ) lineUVs.push( parts[ 1 ] ); + + } + + } + + state.addLineGeometry( lineVertices, lineUVs ); + + } else if ( lineFirstChar === 'p' ) { + + const lineData = line.slice( 1 ).trim(); + const pointData = lineData.split( ' ' ); + + state.addPointGeometry( pointData ); + + } else if ( ( result = _object_pattern.exec( line ) ) !== null ) { + + // o object_name + // or + // g group_name + + // WORKAROUND: https://bugs.chromium.org/p/v8/issues/detail?id=2869 + // let name = result[ 0 ].slice( 1 ).trim(); + const name = ( ' ' + result[ 0 ].slice( 1 ).trim() ).slice( 1 ); + + state.startObject( name ); + + } else if ( _material_use_pattern.test( line ) ) { + + // material + + state.object.startMaterial( line.substring( 7 ).trim(), state.materialLibraries ); + + } else if ( _material_library_pattern.test( line ) ) { + + // mtl file + + state.materialLibraries.push( line.substring( 7 ).trim() ); + + } else if ( _map_use_pattern.test( line ) ) { + + // the line is parsed but ignored since the loader assumes textures are defined MTL files + // (according to https://www.okino.com/conv/imp_wave.htm, 'usemap' is the old-style Wavefront texture reference method) + + console.warn( 'THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.' ); + + } else if ( lineFirstChar === 's' ) { + + result = line.split( ' ' ); + + // smooth shading + + // @todo Handle files that have varying smooth values for a set of faces inside one geometry, + // but does not define a usemtl for each face set. + // This should be detected and a dummy material created (later MultiMaterial and geometry groups). + // This requires some care to not create extra material on each smooth value for "normal" obj files. + // where explicit usemtl defines geometry groups. + // Example asset: examples/models/obj/cerberus/Cerberus.obj + + /* + * http://paulbourke.net/dataformats/obj/ + * + * From chapter "Grouping" Syntax explanation "s group_number": + * "group_number is the smoothing group number. To turn off smoothing groups, use a value of 0 or off. + * Polygonal elements use group numbers to put elements in different smoothing groups. For free-form + * surfaces, smoothing groups are either turned on or off; there is no difference between values greater + * than 0." + */ + if ( result.length > 1 ) { + + const value = result[ 1 ].trim().toLowerCase(); + state.object.smooth = ( value !== '0' && value !== 'off' ); + + } else { + + // ZBrush can produce "s" lines #11707 + state.object.smooth = true; + + } + + const material = state.object.currentMaterial(); + if ( material ) material.smooth = state.object.smooth; + + } else { + + // Handle null terminated files without exception + if ( line === '\0' ) continue; + + console.warn( 'THREE.OBJLoader: Unexpected line: "' + line + '"' ); + + } + + } + + state.finalize(); + + const container = new Group(); + container.materialLibraries = [].concat( state.materialLibraries ); + + const hasPrimitives = ! ( state.objects.length === 1 && state.objects[ 0 ].geometry.vertices.length === 0 ); + + if ( hasPrimitives === true ) { + + for ( let i = 0, l = state.objects.length; i < l; i ++ ) { + + const object = state.objects[ i ]; + const geometry = object.geometry; + const materials = object.materials; + const isLine = ( geometry.type === 'Line' ); + const isPoints = ( geometry.type === 'Points' ); + let hasVertexColors = false; + + // Skip o/g line declarations that did not follow with any faces + if ( geometry.vertices.length === 0 ) continue; + + const buffergeometry = new BufferGeometry(); + + buffergeometry.setAttribute( 'position', new Float32BufferAttribute( geometry.vertices, 3 ) ); + + if ( geometry.normals.length > 0 ) { + + buffergeometry.setAttribute( 'normal', new Float32BufferAttribute( geometry.normals, 3 ) ); + + } + + if ( geometry.colors.length > 0 ) { + + hasVertexColors = true; + buffergeometry.setAttribute( 'color', new Float32BufferAttribute( geometry.colors, 3 ) ); + + } + + if ( geometry.hasUVIndices === true ) { + + buffergeometry.setAttribute( 'uv', new Float32BufferAttribute( geometry.uvs, 2 ) ); + + } + + // Create materials + + const createdMaterials = []; + + for ( let mi = 0, miLen = materials.length; mi < miLen; mi ++ ) { + + const sourceMaterial = materials[ mi ]; + const materialHash = sourceMaterial.name + '_' + sourceMaterial.smooth + '_' + hasVertexColors; + let material = state.materials[ materialHash ]; + + if ( this.materials !== null ) { + + material = this.materials.create( sourceMaterial.name ); + + // mtl etc. loaders probably can't create line materials correctly, copy properties to a line material. + if ( isLine && material && ! ( material instanceof LineBasicMaterial ) ) { + + const materialLine = new LineBasicMaterial(); + Material.prototype.copy.call( materialLine, material ); + materialLine.color.copy( material.color ); + material = materialLine; + + } else if ( isPoints && material && ! ( material instanceof PointsMaterial ) ) { + + const materialPoints = new PointsMaterial( { size: 10, sizeAttenuation: false } ); + Material.prototype.copy.call( materialPoints, material ); + materialPoints.color.copy( material.color ); + materialPoints.map = material.map; + material = materialPoints; + + } + + } + + if ( material === undefined ) { + + if ( isLine ) { + + material = new LineBasicMaterial(); + + } else if ( isPoints ) { + + material = new PointsMaterial( { size: 1, sizeAttenuation: false } ); + + } else { + + material = new MeshPhongMaterial(); + + } + + material.name = sourceMaterial.name; + material.flatShading = sourceMaterial.smooth ? false : true; + material.vertexColors = hasVertexColors; + + state.materials[ materialHash ] = material; + + } + + createdMaterials.push( material ); + + } + + // Create mesh + + let mesh; + + if ( createdMaterials.length > 1 ) { + + for ( let mi = 0, miLen = materials.length; mi < miLen; mi ++ ) { + + const sourceMaterial = materials[ mi ]; + buffergeometry.addGroup( sourceMaterial.groupStart, sourceMaterial.groupCount, mi ); + + } + + if ( isLine ) { + + mesh = new LineSegments( buffergeometry, createdMaterials ); + + } else if ( isPoints ) { + + mesh = new Points( buffergeometry, createdMaterials ); + + } else { + + mesh = new Mesh( buffergeometry, createdMaterials ); + + } + + } else { + + if ( isLine ) { + + mesh = new LineSegments( buffergeometry, createdMaterials[ 0 ] ); + + } else if ( isPoints ) { + + mesh = new Points( buffergeometry, createdMaterials[ 0 ] ); + + } else { + + mesh = new Mesh( buffergeometry, createdMaterials[ 0 ] ); + + } + + } + + mesh.name = object.name; + + container.add( mesh ); + + } + + } else { + + // if there is only the default parser state object with no geometry data, interpret data as point cloud + + if ( state.vertices.length > 0 ) { + + const material = new PointsMaterial( { size: 1, sizeAttenuation: false } ); + + const buffergeometry = new BufferGeometry(); + + buffergeometry.setAttribute( 'position', new Float32BufferAttribute( state.vertices, 3 ) ); + + if ( state.colors.length > 0 && state.colors[ 0 ] !== undefined ) { + + buffergeometry.setAttribute( 'color', new Float32BufferAttribute( state.colors, 3 ) ); + material.vertexColors = true; + + } + + const points = new Points( buffergeometry, material ); + container.add( points ); + + } + + } + + return container; + + } + +} + +export { OBJLoader }; diff --git a/node_modules/three/examples/jsm/loaders/PCDLoader.js b/node_modules/three/examples/jsm/loaders/PCDLoader.js new file mode 100644 index 0000000..6560550 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/PCDLoader.js @@ -0,0 +1,467 @@ +import { + BufferGeometry, + Color, + FileLoader, + Float32BufferAttribute, + Int32BufferAttribute, + Loader, + Points, + PointsMaterial +} from 'three'; + +class PCDLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.littleEndian = true; + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( data ) { + + try { + + onLoad( scope.parse( data ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( data ) { + + // from https://gitlab.com/taketwo/three-pcd-loader/blob/master/decompress-lzf.js + + function decompressLZF( inData, outLength ) { + + const inLength = inData.length; + const outData = new Uint8Array( outLength ); + let inPtr = 0; + let outPtr = 0; + let ctrl; + let len; + let ref; + do { + + ctrl = inData[ inPtr ++ ]; + if ( ctrl < ( 1 << 5 ) ) { + + ctrl ++; + if ( outPtr + ctrl > outLength ) throw new Error( 'Output buffer is not large enough' ); + if ( inPtr + ctrl > inLength ) throw new Error( 'Invalid compressed data' ); + do { + + outData[ outPtr ++ ] = inData[ inPtr ++ ]; + + } while ( -- ctrl ); + + } else { + + len = ctrl >> 5; + ref = outPtr - ( ( ctrl & 0x1f ) << 8 ) - 1; + if ( inPtr >= inLength ) throw new Error( 'Invalid compressed data' ); + if ( len === 7 ) { + + len += inData[ inPtr ++ ]; + if ( inPtr >= inLength ) throw new Error( 'Invalid compressed data' ); + + } + + ref -= inData[ inPtr ++ ]; + if ( outPtr + len + 2 > outLength ) throw new Error( 'Output buffer is not large enough' ); + if ( ref < 0 ) throw new Error( 'Invalid compressed data' ); + if ( ref >= outPtr ) throw new Error( 'Invalid compressed data' ); + do { + + outData[ outPtr ++ ] = outData[ ref ++ ]; + + } while ( -- len + 2 ); + + } + + } while ( inPtr < inLength ); + + return outData; + + } + + function parseHeader( data ) { + + const PCDheader = {}; + const result1 = data.search( /[\r\n]DATA\s(\S*)\s/i ); + const result2 = /[\r\n]DATA\s(\S*)\s/i.exec( data.slice( result1 - 1 ) ); + + PCDheader.data = result2[ 1 ]; + PCDheader.headerLen = result2[ 0 ].length + result1; + PCDheader.str = data.slice( 0, PCDheader.headerLen ); + + // remove comments + + PCDheader.str = PCDheader.str.replace( /#.*/gi, '' ); + + // parse + + PCDheader.version = /VERSION (.*)/i.exec( PCDheader.str ); + PCDheader.fields = /FIELDS (.*)/i.exec( PCDheader.str ); + PCDheader.size = /SIZE (.*)/i.exec( PCDheader.str ); + PCDheader.type = /TYPE (.*)/i.exec( PCDheader.str ); + PCDheader.count = /COUNT (.*)/i.exec( PCDheader.str ); + PCDheader.width = /WIDTH (.*)/i.exec( PCDheader.str ); + PCDheader.height = /HEIGHT (.*)/i.exec( PCDheader.str ); + PCDheader.viewpoint = /VIEWPOINT (.*)/i.exec( PCDheader.str ); + PCDheader.points = /POINTS (.*)/i.exec( PCDheader.str ); + + // evaluate + + if ( PCDheader.version !== null ) + PCDheader.version = parseFloat( PCDheader.version[ 1 ] ); + + PCDheader.fields = ( PCDheader.fields !== null ) ? PCDheader.fields[ 1 ].split( ' ' ) : []; + + if ( PCDheader.type !== null ) + PCDheader.type = PCDheader.type[ 1 ].split( ' ' ); + + if ( PCDheader.width !== null ) + PCDheader.width = parseInt( PCDheader.width[ 1 ] ); + + if ( PCDheader.height !== null ) + PCDheader.height = parseInt( PCDheader.height[ 1 ] ); + + if ( PCDheader.viewpoint !== null ) + PCDheader.viewpoint = PCDheader.viewpoint[ 1 ]; + + if ( PCDheader.points !== null ) + PCDheader.points = parseInt( PCDheader.points[ 1 ], 10 ); + + if ( PCDheader.points === null ) + PCDheader.points = PCDheader.width * PCDheader.height; + + if ( PCDheader.size !== null ) { + + PCDheader.size = PCDheader.size[ 1 ].split( ' ' ).map( function ( x ) { + + return parseInt( x, 10 ); + + } ); + + } + + if ( PCDheader.count !== null ) { + + PCDheader.count = PCDheader.count[ 1 ].split( ' ' ).map( function ( x ) { + + return parseInt( x, 10 ); + + } ); + + } else { + + PCDheader.count = []; + + for ( let i = 0, l = PCDheader.fields.length; i < l; i ++ ) { + + PCDheader.count.push( 1 ); + + } + + } + + PCDheader.offset = {}; + + let sizeSum = 0; + + for ( let i = 0, l = PCDheader.fields.length; i < l; i ++ ) { + + if ( PCDheader.data === 'ascii' ) { + + PCDheader.offset[ PCDheader.fields[ i ] ] = i; + + } else { + + PCDheader.offset[ PCDheader.fields[ i ] ] = sizeSum; + sizeSum += PCDheader.size[ i ] * PCDheader.count[ i ]; + + } + + } + + // for binary only + + PCDheader.rowSize = sizeSum; + + return PCDheader; + + } + + const textData = new TextDecoder().decode( data ); + + // parse header (always ascii format) + + const PCDheader = parseHeader( textData ); + + // parse data + + const position = []; + const normal = []; + const color = []; + const intensity = []; + const label = []; + + const c = new Color(); + + // ascii + + if ( PCDheader.data === 'ascii' ) { + + const offset = PCDheader.offset; + const pcdData = textData.slice( PCDheader.headerLen ); + const lines = pcdData.split( '\n' ); + + for ( let i = 0, l = lines.length; i < l; i ++ ) { + + if ( lines[ i ] === '' ) continue; + + const line = lines[ i ].split( ' ' ); + + if ( offset.x !== undefined ) { + + position.push( parseFloat( line[ offset.x ] ) ); + position.push( parseFloat( line[ offset.y ] ) ); + position.push( parseFloat( line[ offset.z ] ) ); + + } + + if ( offset.rgb !== undefined ) { + + const rgb_field_index = PCDheader.fields.findIndex( ( field ) => field === 'rgb' ); + const rgb_type = PCDheader.type[ rgb_field_index ]; + + const float = parseFloat( line[ offset.rgb ] ); + let rgb = float; + + if ( rgb_type === 'F' ) { + + // treat float values as int + // https://github.com/daavoo/pyntcloud/pull/204/commits/7b4205e64d5ed09abe708b2e91b615690c24d518 + const farr = new Float32Array( 1 ); + farr[ 0 ] = float; + rgb = new Int32Array( farr.buffer )[ 0 ]; + + } + + const r = ( ( rgb >> 16 ) & 0x0000ff ) / 255; + const g = ( ( rgb >> 8 ) & 0x0000ff ) / 255; + const b = ( ( rgb >> 0 ) & 0x0000ff ) / 255; + + c.set( r, g, b ).convertSRGBToLinear(); + + color.push( c.r, c.g, c.b ); + + } + + if ( offset.normal_x !== undefined ) { + + normal.push( parseFloat( line[ offset.normal_x ] ) ); + normal.push( parseFloat( line[ offset.normal_y ] ) ); + normal.push( parseFloat( line[ offset.normal_z ] ) ); + + } + + if ( offset.intensity !== undefined ) { + + intensity.push( parseFloat( line[ offset.intensity ] ) ); + + } + + if ( offset.label !== undefined ) { + + label.push( parseInt( line[ offset.label ] ) ); + + } + + } + + } + + // binary-compressed + + // normally data in PCD files are organized as array of structures: XYZRGBXYZRGB + // binary compressed PCD files organize their data as structure of arrays: XXYYZZRGBRGB + // that requires a totally different parsing approach compared to non-compressed data + + if ( PCDheader.data === 'binary_compressed' ) { + + const sizes = new Uint32Array( data.slice( PCDheader.headerLen, PCDheader.headerLen + 8 ) ); + const compressedSize = sizes[ 0 ]; + const decompressedSize = sizes[ 1 ]; + const decompressed = decompressLZF( new Uint8Array( data, PCDheader.headerLen + 8, compressedSize ), decompressedSize ); + const dataview = new DataView( decompressed.buffer ); + + const offset = PCDheader.offset; + + for ( let i = 0; i < PCDheader.points; i ++ ) { + + if ( offset.x !== undefined ) { + + const xIndex = PCDheader.fields.indexOf( 'x' ); + const yIndex = PCDheader.fields.indexOf( 'y' ); + const zIndex = PCDheader.fields.indexOf( 'z' ); + position.push( dataview.getFloat32( ( PCDheader.points * offset.x ) + PCDheader.size[ xIndex ] * i, this.littleEndian ) ); + position.push( dataview.getFloat32( ( PCDheader.points * offset.y ) + PCDheader.size[ yIndex ] * i, this.littleEndian ) ); + position.push( dataview.getFloat32( ( PCDheader.points * offset.z ) + PCDheader.size[ zIndex ] * i, this.littleEndian ) ); + + } + + if ( offset.rgb !== undefined ) { + + const rgbIndex = PCDheader.fields.indexOf( 'rgb' ); + + const r = dataview.getUint8( ( PCDheader.points * offset.rgb ) + PCDheader.size[ rgbIndex ] * i + 2 ) / 255.0; + const g = dataview.getUint8( ( PCDheader.points * offset.rgb ) + PCDheader.size[ rgbIndex ] * i + 1 ) / 255.0; + const b = dataview.getUint8( ( PCDheader.points * offset.rgb ) + PCDheader.size[ rgbIndex ] * i + 0 ) / 255.0; + + c.set( r, g, b ).convertSRGBToLinear(); + + color.push( c.r, c.g, c.b ); + + } + + if ( offset.normal_x !== undefined ) { + + const xIndex = PCDheader.fields.indexOf( 'normal_x' ); + const yIndex = PCDheader.fields.indexOf( 'normal_y' ); + const zIndex = PCDheader.fields.indexOf( 'normal_z' ); + normal.push( dataview.getFloat32( ( PCDheader.points * offset.normal_x ) + PCDheader.size[ xIndex ] * i, this.littleEndian ) ); + normal.push( dataview.getFloat32( ( PCDheader.points * offset.normal_y ) + PCDheader.size[ yIndex ] * i, this.littleEndian ) ); + normal.push( dataview.getFloat32( ( PCDheader.points * offset.normal_z ) + PCDheader.size[ zIndex ] * i, this.littleEndian ) ); + + } + + if ( offset.intensity !== undefined ) { + + const intensityIndex = PCDheader.fields.indexOf( 'intensity' ); + intensity.push( dataview.getFloat32( ( PCDheader.points * offset.intensity ) + PCDheader.size[ intensityIndex ] * i, this.littleEndian ) ); + + } + + if ( offset.label !== undefined ) { + + const labelIndex = PCDheader.fields.indexOf( 'label' ); + label.push( dataview.getInt32( ( PCDheader.points * offset.label ) + PCDheader.size[ labelIndex ] * i, this.littleEndian ) ); + + } + + } + + } + + // binary + + if ( PCDheader.data === 'binary' ) { + + const dataview = new DataView( data, PCDheader.headerLen ); + const offset = PCDheader.offset; + + for ( let i = 0, row = 0; i < PCDheader.points; i ++, row += PCDheader.rowSize ) { + + if ( offset.x !== undefined ) { + + position.push( dataview.getFloat32( row + offset.x, this.littleEndian ) ); + position.push( dataview.getFloat32( row + offset.y, this.littleEndian ) ); + position.push( dataview.getFloat32( row + offset.z, this.littleEndian ) ); + + } + + if ( offset.rgb !== undefined ) { + + const r = dataview.getUint8( row + offset.rgb + 2 ) / 255.0; + const g = dataview.getUint8( row + offset.rgb + 1 ) / 255.0; + const b = dataview.getUint8( row + offset.rgb + 0 ) / 255.0; + + c.set( r, g, b ).convertSRGBToLinear(); + + color.push( c.r, c.g, c.b ); + + } + + if ( offset.normal_x !== undefined ) { + + normal.push( dataview.getFloat32( row + offset.normal_x, this.littleEndian ) ); + normal.push( dataview.getFloat32( row + offset.normal_y, this.littleEndian ) ); + normal.push( dataview.getFloat32( row + offset.normal_z, this.littleEndian ) ); + + } + + if ( offset.intensity !== undefined ) { + + intensity.push( dataview.getFloat32( row + offset.intensity, this.littleEndian ) ); + + } + + if ( offset.label !== undefined ) { + + label.push( dataview.getInt32( row + offset.label, this.littleEndian ) ); + + } + + } + + } + + // build geometry + + const geometry = new BufferGeometry(); + + if ( position.length > 0 ) geometry.setAttribute( 'position', new Float32BufferAttribute( position, 3 ) ); + if ( normal.length > 0 ) geometry.setAttribute( 'normal', new Float32BufferAttribute( normal, 3 ) ); + if ( color.length > 0 ) geometry.setAttribute( 'color', new Float32BufferAttribute( color, 3 ) ); + if ( intensity.length > 0 ) geometry.setAttribute( 'intensity', new Float32BufferAttribute( intensity, 1 ) ); + if ( label.length > 0 ) geometry.setAttribute( 'label', new Int32BufferAttribute( label, 1 ) ); + + geometry.computeBoundingSphere(); + + // build material + + const material = new PointsMaterial( { size: 0.005 } ); + + if ( color.length > 0 ) { + + material.vertexColors = true; + + } + + // build point cloud + + return new Points( geometry, material ); + + } + +} + +export { PCDLoader }; diff --git a/node_modules/three/examples/jsm/loaders/PDBLoader.js b/node_modules/three/examples/jsm/loaders/PDBLoader.js new file mode 100644 index 0000000..bb24a55 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/PDBLoader.js @@ -0,0 +1,232 @@ +import { + BufferGeometry, + FileLoader, + Float32BufferAttribute, + Loader, + Color +} from 'three'; + +class PDBLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( text ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + // Based on CanvasMol PDB parser + + parse( text ) { + + function trim( text ) { + + return text.replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' ); + + } + + function capitalize( text ) { + + return text.charAt( 0 ).toUpperCase() + text.slice( 1 ).toLowerCase(); + + } + + function hash( s, e ) { + + return 's' + Math.min( s, e ) + 'e' + Math.max( s, e ); + + } + + function parseBond( start, length, satom, i ) { + + const eatom = parseInt( lines[ i ].slice( start, start + length ) ); + + if ( eatom ) { + + const h = hash( satom, eatom ); + + if ( _bhash[ h ] === undefined ) { + + _bonds.push( [ satom - 1, eatom - 1, 1 ] ); + _bhash[ h ] = _bonds.length - 1; + + } else { + + // doesn't really work as almost all PDBs + // have just normal bonds appearing multiple + // times instead of being double/triple bonds + // bonds[bhash[h]][2] += 1; + + } + + } + + } + + function buildGeometry() { + + const build = { + geometryAtoms: new BufferGeometry(), + geometryBonds: new BufferGeometry(), + json: { + atoms: atoms + } + }; + + const geometryAtoms = build.geometryAtoms; + const geometryBonds = build.geometryBonds; + + const verticesAtoms = []; + const colorsAtoms = []; + const verticesBonds = []; + + // atoms + + const c = new Color(); + + for ( let i = 0, l = atoms.length; i < l; i ++ ) { + + const atom = atoms[ i ]; + + const x = atom[ 0 ]; + const y = atom[ 1 ]; + const z = atom[ 2 ]; + + verticesAtoms.push( x, y, z ); + + const r = atom[ 3 ][ 0 ] / 255; + const g = atom[ 3 ][ 1 ] / 255; + const b = atom[ 3 ][ 2 ] / 255; + + c.set( r, g, b ).convertSRGBToLinear(); + + colorsAtoms.push( c.r, c.g, c.b ); + + } + + // bonds + + for ( let i = 0, l = _bonds.length; i < l; i ++ ) { + + const bond = _bonds[ i ]; + + const start = bond[ 0 ]; + const end = bond[ 1 ]; + + const startAtom = _atomMap[ start ]; + const endAtom = _atomMap[ end ]; + + let x = startAtom[ 0 ]; + let y = startAtom[ 1 ]; + let z = startAtom[ 2 ]; + + verticesBonds.push( x, y, z ); + + x = endAtom[ 0 ]; + y = endAtom[ 1 ]; + z = endAtom[ 2 ]; + + verticesBonds.push( x, y, z ); + + } + + // build geometry + + geometryAtoms.setAttribute( 'position', new Float32BufferAttribute( verticesAtoms, 3 ) ); + geometryAtoms.setAttribute( 'color', new Float32BufferAttribute( colorsAtoms, 3 ) ); + + geometryBonds.setAttribute( 'position', new Float32BufferAttribute( verticesBonds, 3 ) ); + + return build; + + } + + const CPK = { h: [ 255, 255, 255 ], he: [ 217, 255, 255 ], li: [ 204, 128, 255 ], be: [ 194, 255, 0 ], b: [ 255, 181, 181 ], c: [ 144, 144, 144 ], n: [ 48, 80, 248 ], o: [ 255, 13, 13 ], f: [ 144, 224, 80 ], ne: [ 179, 227, 245 ], na: [ 171, 92, 242 ], mg: [ 138, 255, 0 ], al: [ 191, 166, 166 ], si: [ 240, 200, 160 ], p: [ 255, 128, 0 ], s: [ 255, 255, 48 ], cl: [ 31, 240, 31 ], ar: [ 128, 209, 227 ], k: [ 143, 64, 212 ], ca: [ 61, 255, 0 ], sc: [ 230, 230, 230 ], ti: [ 191, 194, 199 ], v: [ 166, 166, 171 ], cr: [ 138, 153, 199 ], mn: [ 156, 122, 199 ], fe: [ 224, 102, 51 ], co: [ 240, 144, 160 ], ni: [ 80, 208, 80 ], cu: [ 200, 128, 51 ], zn: [ 125, 128, 176 ], ga: [ 194, 143, 143 ], ge: [ 102, 143, 143 ], as: [ 189, 128, 227 ], se: [ 255, 161, 0 ], br: [ 166, 41, 41 ], kr: [ 92, 184, 209 ], rb: [ 112, 46, 176 ], sr: [ 0, 255, 0 ], y: [ 148, 255, 255 ], zr: [ 148, 224, 224 ], nb: [ 115, 194, 201 ], mo: [ 84, 181, 181 ], tc: [ 59, 158, 158 ], ru: [ 36, 143, 143 ], rh: [ 10, 125, 140 ], pd: [ 0, 105, 133 ], ag: [ 192, 192, 192 ], cd: [ 255, 217, 143 ], in: [ 166, 117, 115 ], sn: [ 102, 128, 128 ], sb: [ 158, 99, 181 ], te: [ 212, 122, 0 ], i: [ 148, 0, 148 ], xe: [ 66, 158, 176 ], cs: [ 87, 23, 143 ], ba: [ 0, 201, 0 ], la: [ 112, 212, 255 ], ce: [ 255, 255, 199 ], pr: [ 217, 255, 199 ], nd: [ 199, 255, 199 ], pm: [ 163, 255, 199 ], sm: [ 143, 255, 199 ], eu: [ 97, 255, 199 ], gd: [ 69, 255, 199 ], tb: [ 48, 255, 199 ], dy: [ 31, 255, 199 ], ho: [ 0, 255, 156 ], er: [ 0, 230, 117 ], tm: [ 0, 212, 82 ], yb: [ 0, 191, 56 ], lu: [ 0, 171, 36 ], hf: [ 77, 194, 255 ], ta: [ 77, 166, 255 ], w: [ 33, 148, 214 ], re: [ 38, 125, 171 ], os: [ 38, 102, 150 ], ir: [ 23, 84, 135 ], pt: [ 208, 208, 224 ], au: [ 255, 209, 35 ], hg: [ 184, 184, 208 ], tl: [ 166, 84, 77 ], pb: [ 87, 89, 97 ], bi: [ 158, 79, 181 ], po: [ 171, 92, 0 ], at: [ 117, 79, 69 ], rn: [ 66, 130, 150 ], fr: [ 66, 0, 102 ], ra: [ 0, 125, 0 ], ac: [ 112, 171, 250 ], th: [ 0, 186, 255 ], pa: [ 0, 161, 255 ], u: [ 0, 143, 255 ], np: [ 0, 128, 255 ], pu: [ 0, 107, 255 ], am: [ 84, 92, 242 ], cm: [ 120, 92, 227 ], bk: [ 138, 79, 227 ], cf: [ 161, 54, 212 ], es: [ 179, 31, 212 ], fm: [ 179, 31, 186 ], md: [ 179, 13, 166 ], no: [ 189, 13, 135 ], lr: [ 199, 0, 102 ], rf: [ 204, 0, 89 ], db: [ 209, 0, 79 ], sg: [ 217, 0, 69 ], bh: [ 224, 0, 56 ], hs: [ 230, 0, 46 ], mt: [ 235, 0, 38 ], ds: [ 235, 0, 38 ], rg: [ 235, 0, 38 ], cn: [ 235, 0, 38 ], uut: [ 235, 0, 38 ], uuq: [ 235, 0, 38 ], uup: [ 235, 0, 38 ], uuh: [ 235, 0, 38 ], uus: [ 235, 0, 38 ], uuo: [ 235, 0, 38 ] }; + + const atoms = []; + + const _bonds = []; + const _bhash = {}; + const _atomMap = {}; + + // parse + + const lines = text.split( '\n' ); + + for ( let i = 0, l = lines.length; i < l; i ++ ) { + + if ( lines[ i ].slice( 0, 4 ) === 'ATOM' || lines[ i ].slice( 0, 6 ) === 'HETATM' ) { + + const x = parseFloat( lines[ i ].slice( 30, 37 ) ); + const y = parseFloat( lines[ i ].slice( 38, 45 ) ); + const z = parseFloat( lines[ i ].slice( 46, 53 ) ); + const index = parseInt( lines[ i ].slice( 6, 11 ) ) - 1; + + let e = trim( lines[ i ].slice( 76, 78 ) ).toLowerCase(); + + if ( e === '' ) { + + e = trim( lines[ i ].slice( 12, 14 ) ).toLowerCase(); + + } + + const atomData = [ x, y, z, CPK[ e ], capitalize( e ) ]; + + atoms.push( atomData ); + _atomMap[ index ] = atomData; + + } else if ( lines[ i ].slice( 0, 6 ) === 'CONECT' ) { + + const satom = parseInt( lines[ i ].slice( 6, 11 ) ); + + parseBond( 11, 5, satom, i ); + parseBond( 16, 5, satom, i ); + parseBond( 21, 5, satom, i ); + parseBond( 26, 5, satom, i ); + + } + + } + + // build and return geometry + + return buildGeometry(); + + } + +} + +export { PDBLoader }; diff --git a/node_modules/three/examples/jsm/loaders/PLYLoader.js b/node_modules/three/examples/jsm/loaders/PLYLoader.js new file mode 100644 index 0000000..3834bfb --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/PLYLoader.js @@ -0,0 +1,771 @@ +import { + BufferGeometry, + FileLoader, + Float32BufferAttribute, + Loader, + Color +} from 'three'; + +/** + * Description: A THREE loader for PLY ASCII files (known as the Polygon + * File Format or the Stanford Triangle Format). + * + * Limitations: ASCII decoding assumes file is UTF-8. + * + * Usage: + * const loader = new PLYLoader(); + * loader.load('./models/ply/ascii/dolphins.ply', function (geometry) { + * + * scene.add( new THREE.Mesh( geometry ) ); + * + * } ); + * + * If the PLY file uses non standard property names, they can be mapped while + * loading. For example, the following maps the properties + * “diffuse_(red|green|blue)” in the file to standard color names. + * + * loader.setPropertyNameMapping( { + * diffuse_red: 'red', + * diffuse_green: 'green', + * diffuse_blue: 'blue' + * } ); + * + * Custom properties outside of the defaults for position, uv, normal + * and color attributes can be added using the setCustomPropertyNameMapping method. + * For example, the following maps the element properties “custom_property_a” + * and “custom_property_b” to an attribute “customAttribute” with an item size of 2. + * Attribute item sizes are set from the number of element properties in the property array. + * + * loader.setCustomPropertyNameMapping( { + * customAttribute: ['custom_property_a', 'custom_property_b'], + * } ); + * + */ + +const _color = new Color(); + +class PLYLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + this.propertyNameMapping = {}; + this.customPropertyMapping = {}; + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( text ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + setPropertyNameMapping( mapping ) { + + this.propertyNameMapping = mapping; + + } + + setCustomPropertyNameMapping( mapping ) { + + this.customPropertyMapping = mapping; + + } + + parse( data ) { + + function parseHeader( data, headerLength = 0 ) { + + const patternHeader = /^ply([\s\S]*)end_header(\r\n|\r|\n)/; + let headerText = ''; + const result = patternHeader.exec( data ); + + if ( result !== null ) { + + headerText = result[ 1 ]; + + } + + const header = { + comments: [], + elements: [], + headerLength: headerLength, + objInfo: '' + }; + + const lines = headerText.split( /\r\n|\r|\n/ ); + let currentElement; + + function make_ply_element_property( propertValues, propertyNameMapping ) { + + const property = { type: propertValues[ 0 ] }; + + if ( property.type === 'list' ) { + + property.name = propertValues[ 3 ]; + property.countType = propertValues[ 1 ]; + property.itemType = propertValues[ 2 ]; + + } else { + + property.name = propertValues[ 1 ]; + + } + + if ( property.name in propertyNameMapping ) { + + property.name = propertyNameMapping[ property.name ]; + + } + + return property; + + } + + for ( let i = 0; i < lines.length; i ++ ) { + + let line = lines[ i ]; + line = line.trim(); + + if ( line === '' ) continue; + + const lineValues = line.split( /\s+/ ); + const lineType = lineValues.shift(); + line = lineValues.join( ' ' ); + + switch ( lineType ) { + + case 'format': + + header.format = lineValues[ 0 ]; + header.version = lineValues[ 1 ]; + + break; + + case 'comment': + + header.comments.push( line ); + + break; + + case 'element': + + if ( currentElement !== undefined ) { + + header.elements.push( currentElement ); + + } + + currentElement = {}; + currentElement.name = lineValues[ 0 ]; + currentElement.count = parseInt( lineValues[ 1 ] ); + currentElement.properties = []; + + break; + + case 'property': + + currentElement.properties.push( make_ply_element_property( lineValues, scope.propertyNameMapping ) ); + + break; + + case 'obj_info': + + header.objInfo = line; + + break; + + + default: + + console.log( 'unhandled', lineType, lineValues ); + + } + + } + + if ( currentElement !== undefined ) { + + header.elements.push( currentElement ); + + } + + return header; + + } + + function parseASCIINumber( n, type ) { + + switch ( type ) { + + case 'char': case 'uchar': case 'short': case 'ushort': case 'int': case 'uint': + case 'int8': case 'uint8': case 'int16': case 'uint16': case 'int32': case 'uint32': + + return parseInt( n ); + + case 'float': case 'double': case 'float32': case 'float64': + + return parseFloat( n ); + + } + + } + + function parseASCIIElement( properties, tokens ) { + + const element = {}; + + for ( let i = 0; i < properties.length; i ++ ) { + + if ( tokens.empty() ) return null; + + if ( properties[ i ].type === 'list' ) { + + const list = []; + const n = parseASCIINumber( tokens.next(), properties[ i ].countType ); + + for ( let j = 0; j < n; j ++ ) { + + if ( tokens.empty() ) return null; + + list.push( parseASCIINumber( tokens.next(), properties[ i ].itemType ) ); + + } + + element[ properties[ i ].name ] = list; + + } else { + + element[ properties[ i ].name ] = parseASCIINumber( tokens.next(), properties[ i ].type ); + + } + + } + + return element; + + } + + function createBuffer() { + + const buffer = { + indices: [], + vertices: [], + normals: [], + uvs: [], + faceVertexUvs: [], + colors: [], + faceVertexColors: [] + }; + + for ( const customProperty of Object.keys( scope.customPropertyMapping ) ) { + + buffer[ customProperty ] = []; + + } + + return buffer; + + } + + function mapElementAttributes( properties ) { + + const elementNames = properties.map( property => { + + return property.name; + + } ); + + function findAttrName( names ) { + + for ( let i = 0, l = names.length; i < l; i ++ ) { + + const name = names[ i ]; + + if ( elementNames.includes( name ) ) return name; + + } + + return null; + + } + + return { + attrX: findAttrName( [ 'x', 'px', 'posx' ] ) || 'x', + attrY: findAttrName( [ 'y', 'py', 'posy' ] ) || 'y', + attrZ: findAttrName( [ 'z', 'pz', 'posz' ] ) || 'z', + attrNX: findAttrName( [ 'nx', 'normalx' ] ), + attrNY: findAttrName( [ 'ny', 'normaly' ] ), + attrNZ: findAttrName( [ 'nz', 'normalz' ] ), + attrS: findAttrName( [ 's', 'u', 'texture_u', 'tx' ] ), + attrT: findAttrName( [ 't', 'v', 'texture_v', 'ty' ] ), + attrR: findAttrName( [ 'red', 'diffuse_red', 'r', 'diffuse_r' ] ), + attrG: findAttrName( [ 'green', 'diffuse_green', 'g', 'diffuse_g' ] ), + attrB: findAttrName( [ 'blue', 'diffuse_blue', 'b', 'diffuse_b' ] ), + }; + + } + + function parseASCII( data, header ) { + + // PLY ascii format specification, as per http://en.wikipedia.org/wiki/PLY_(file_format) + + const buffer = createBuffer(); + + const patternBody = /end_header\s+(\S[\s\S]*\S|\S)\s*$/; + let body, matches; + + if ( ( matches = patternBody.exec( data ) ) !== null ) { + + body = matches[ 1 ].split( /\s+/ ); + + } else { + + body = [ ]; + + } + + const tokens = new ArrayStream( body ); + + loop: for ( let i = 0; i < header.elements.length; i ++ ) { + + const elementDesc = header.elements[ i ]; + const attributeMap = mapElementAttributes( elementDesc.properties ); + + for ( let j = 0; j < elementDesc.count; j ++ ) { + + const element = parseASCIIElement( elementDesc.properties, tokens ); + + if ( ! element ) break loop; + + handleElement( buffer, elementDesc.name, element, attributeMap ); + + } + + } + + return postProcess( buffer ); + + } + + function postProcess( buffer ) { + + let geometry = new BufferGeometry(); + + // mandatory buffer data + + if ( buffer.indices.length > 0 ) { + + geometry.setIndex( buffer.indices ); + + } + + geometry.setAttribute( 'position', new Float32BufferAttribute( buffer.vertices, 3 ) ); + + // optional buffer data + + if ( buffer.normals.length > 0 ) { + + geometry.setAttribute( 'normal', new Float32BufferAttribute( buffer.normals, 3 ) ); + + } + + if ( buffer.uvs.length > 0 ) { + + geometry.setAttribute( 'uv', new Float32BufferAttribute( buffer.uvs, 2 ) ); + + } + + if ( buffer.colors.length > 0 ) { + + geometry.setAttribute( 'color', new Float32BufferAttribute( buffer.colors, 3 ) ); + + } + + if ( buffer.faceVertexUvs.length > 0 || buffer.faceVertexColors.length > 0 ) { + + geometry = geometry.toNonIndexed(); + + if ( buffer.faceVertexUvs.length > 0 ) geometry.setAttribute( 'uv', new Float32BufferAttribute( buffer.faceVertexUvs, 2 ) ); + if ( buffer.faceVertexColors.length > 0 ) geometry.setAttribute( 'color', new Float32BufferAttribute( buffer.faceVertexColors, 3 ) ); + + } + + // custom buffer data + + for ( const customProperty of Object.keys( scope.customPropertyMapping ) ) { + + if ( buffer[ customProperty ].length > 0 ) { + + geometry.setAttribute( + customProperty, + new Float32BufferAttribute( + buffer[ customProperty ], + scope.customPropertyMapping[ customProperty ].length + ) + ); + + } + + } + + geometry.computeBoundingSphere(); + + return geometry; + + } + + function handleElement( buffer, elementName, element, cacheEntry ) { + + if ( elementName === 'vertex' ) { + + buffer.vertices.push( element[ cacheEntry.attrX ], element[ cacheEntry.attrY ], element[ cacheEntry.attrZ ] ); + + if ( cacheEntry.attrNX !== null && cacheEntry.attrNY !== null && cacheEntry.attrNZ !== null ) { + + buffer.normals.push( element[ cacheEntry.attrNX ], element[ cacheEntry.attrNY ], element[ cacheEntry.attrNZ ] ); + + } + + if ( cacheEntry.attrS !== null && cacheEntry.attrT !== null ) { + + buffer.uvs.push( element[ cacheEntry.attrS ], element[ cacheEntry.attrT ] ); + + } + + if ( cacheEntry.attrR !== null && cacheEntry.attrG !== null && cacheEntry.attrB !== null ) { + + _color.setRGB( + element[ cacheEntry.attrR ] / 255.0, + element[ cacheEntry.attrG ] / 255.0, + element[ cacheEntry.attrB ] / 255.0 + ).convertSRGBToLinear(); + + buffer.colors.push( _color.r, _color.g, _color.b ); + + } + + for ( const customProperty of Object.keys( scope.customPropertyMapping ) ) { + + for ( const elementProperty of scope.customPropertyMapping[ customProperty ] ) { + + buffer[ customProperty ].push( element[ elementProperty ] ); + + } + + } + + } else if ( elementName === 'face' ) { + + const vertex_indices = element.vertex_indices || element.vertex_index; // issue #9338 + const texcoord = element.texcoord; + + if ( vertex_indices.length === 3 ) { + + buffer.indices.push( vertex_indices[ 0 ], vertex_indices[ 1 ], vertex_indices[ 2 ] ); + + if ( texcoord && texcoord.length === 6 ) { + + buffer.faceVertexUvs.push( texcoord[ 0 ], texcoord[ 1 ] ); + buffer.faceVertexUvs.push( texcoord[ 2 ], texcoord[ 3 ] ); + buffer.faceVertexUvs.push( texcoord[ 4 ], texcoord[ 5 ] ); + + } + + } else if ( vertex_indices.length === 4 ) { + + buffer.indices.push( vertex_indices[ 0 ], vertex_indices[ 1 ], vertex_indices[ 3 ] ); + buffer.indices.push( vertex_indices[ 1 ], vertex_indices[ 2 ], vertex_indices[ 3 ] ); + + } + + // face colors + + if ( cacheEntry.attrR !== null && cacheEntry.attrG !== null && cacheEntry.attrB !== null ) { + + _color.setRGB( + element[ cacheEntry.attrR ] / 255.0, + element[ cacheEntry.attrG ] / 255.0, + element[ cacheEntry.attrB ] / 255.0 + ).convertSRGBToLinear(); + buffer.faceVertexColors.push( _color.r, _color.g, _color.b ); + buffer.faceVertexColors.push( _color.r, _color.g, _color.b ); + buffer.faceVertexColors.push( _color.r, _color.g, _color.b ); + + } + + } + + } + + function binaryReadElement( at, properties ) { + + const element = {}; + let read = 0; + + for ( let i = 0; i < properties.length; i ++ ) { + + const property = properties[ i ]; + const valueReader = property.valueReader; + + if ( property.type === 'list' ) { + + const list = []; + + const n = property.countReader.read( at + read ); + read += property.countReader.size; + + for ( let j = 0; j < n; j ++ ) { + + list.push( valueReader.read( at + read ) ); + read += valueReader.size; + + } + + element[ property.name ] = list; + + } else { + + element[ property.name ] = valueReader.read( at + read ); + read += valueReader.size; + + } + + } + + return [ element, read ]; + + } + + function setPropertyBinaryReaders( properties, body, little_endian ) { + + function getBinaryReader( dataview, type, little_endian ) { + + switch ( type ) { + + // corespondences for non-specific length types here match rply: + case 'int8': case 'char': return { read: ( at ) => { + + return dataview.getInt8( at ); + + }, size: 1 }; + case 'uint8': case 'uchar': return { read: ( at ) => { + + return dataview.getUint8( at ); + + }, size: 1 }; + case 'int16': case 'short': return { read: ( at ) => { + + return dataview.getInt16( at, little_endian ); + + }, size: 2 }; + case 'uint16': case 'ushort': return { read: ( at ) => { + + return dataview.getUint16( at, little_endian ); + + }, size: 2 }; + case 'int32': case 'int': return { read: ( at ) => { + + return dataview.getInt32( at, little_endian ); + + }, size: 4 }; + case 'uint32': case 'uint': return { read: ( at ) => { + + return dataview.getUint32( at, little_endian ); + + }, size: 4 }; + case 'float32': case 'float': return { read: ( at ) => { + + return dataview.getFloat32( at, little_endian ); + + }, size: 4 }; + case 'float64': case 'double': return { read: ( at ) => { + + return dataview.getFloat64( at, little_endian ); + + }, size: 8 }; + + } + + } + + for ( let i = 0, l = properties.length; i < l; i ++ ) { + + const property = properties[ i ]; + + if ( property.type === 'list' ) { + + property.countReader = getBinaryReader( body, property.countType, little_endian ); + property.valueReader = getBinaryReader( body, property.itemType, little_endian ); + + } else { + + property.valueReader = getBinaryReader( body, property.type, little_endian ); + + } + + } + + } + + function parseBinary( data, header ) { + + const buffer = createBuffer(); + + const little_endian = ( header.format === 'binary_little_endian' ); + const body = new DataView( data, header.headerLength ); + let result, loc = 0; + + for ( let currentElement = 0; currentElement < header.elements.length; currentElement ++ ) { + + const elementDesc = header.elements[ currentElement ]; + const properties = elementDesc.properties; + const attributeMap = mapElementAttributes( properties ); + + setPropertyBinaryReaders( properties, body, little_endian ); + + for ( let currentElementCount = 0; currentElementCount < elementDesc.count; currentElementCount ++ ) { + + result = binaryReadElement( loc, properties ); + loc += result[ 1 ]; + const element = result[ 0 ]; + + handleElement( buffer, elementDesc.name, element, attributeMap ); + + } + + } + + return postProcess( buffer ); + + } + + function extractHeaderText( bytes ) { + + let i = 0; + let cont = true; + + let line = ''; + const lines = []; + + const startLine = new TextDecoder().decode( bytes.subarray( 0, 5 ) ); + const hasCRNL = /^ply\r\n/.test( startLine ); + + do { + + const c = String.fromCharCode( bytes[ i ++ ] ); + + if ( c !== '\n' && c !== '\r' ) { + + line += c; + + } else { + + if ( line === 'end_header' ) cont = false; + if ( line !== '' ) { + + lines.push( line ); + line = ''; + + } + + } + + } while ( cont && i < bytes.length ); + + // ascii section using \r\n as line endings + if ( hasCRNL === true ) i ++; + + return { headerText: lines.join( '\r' ) + '\r', headerLength: i }; + + } + + // + + let geometry; + const scope = this; + + if ( data instanceof ArrayBuffer ) { + + const bytes = new Uint8Array( data ); + const { headerText, headerLength } = extractHeaderText( bytes ); + const header = parseHeader( headerText, headerLength ); + + if ( header.format === 'ascii' ) { + + const text = new TextDecoder().decode( bytes ); + + geometry = parseASCII( text, header ); + + } else { + + geometry = parseBinary( data, header ); + + } + + } else { + + geometry = parseASCII( data, parseHeader( data ) ); + + } + + return geometry; + + } + +} + +class ArrayStream { + + constructor( arr ) { + + this.arr = arr; + this.i = 0; + + } + + empty() { + + return this.i >= this.arr.length; + + } + + next() { + + return this.arr[ this.i ++ ]; + + } + +} + +export { PLYLoader }; diff --git a/node_modules/three/examples/jsm/loaders/PVRLoader.js b/node_modules/three/examples/jsm/loaders/PVRLoader.js new file mode 100644 index 0000000..f39f8e7 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/PVRLoader.js @@ -0,0 +1,251 @@ +import { + CompressedTextureLoader, + RGBA_PVRTC_2BPPV1_Format, + RGBA_PVRTC_4BPPV1_Format, + RGB_PVRTC_2BPPV1_Format, + RGB_PVRTC_4BPPV1_Format +} from 'three'; + +/* + * PVR v2 (legacy) parser + * TODO : Add Support for PVR v3 format + * TODO : implement loadMipmaps option + */ + +class PVRLoader extends CompressedTextureLoader { + + constructor( manager ) { + + super( manager ); + + } + + parse( buffer, loadMipmaps ) { + + const headerLengthInt = 13; + const header = new Uint32Array( buffer, 0, headerLengthInt ); + + const pvrDatas = { + buffer: buffer, + header: header, + loadMipmaps: loadMipmaps + }; + + if ( header[ 0 ] === 0x03525650 ) { + + // PVR v3 + + return _parseV3( pvrDatas ); + + } else if ( header[ 11 ] === 0x21525650 ) { + + // PVR v2 + + return _parseV2( pvrDatas ); + + } else { + + console.error( 'THREE.PVRLoader: Unknown PVR format.' ); + + } + + } + +} + +function _parseV3( pvrDatas ) { + + const header = pvrDatas.header; + let bpp, format; + + + const metaLen = header[ 12 ], + pixelFormat = header[ 2 ], + height = header[ 6 ], + width = header[ 7 ], + // numSurfs = header[ 9 ], + numFaces = header[ 10 ], + numMipmaps = header[ 11 ]; + + switch ( pixelFormat ) { + + case 0 : // PVRTC 2bpp RGB + bpp = 2; + format = RGB_PVRTC_2BPPV1_Format; + break; + + case 1 : // PVRTC 2bpp RGBA + bpp = 2; + format = RGBA_PVRTC_2BPPV1_Format; + break; + + case 2 : // PVRTC 4bpp RGB + bpp = 4; + format = RGB_PVRTC_4BPPV1_Format; + break; + + case 3 : // PVRTC 4bpp RGBA + bpp = 4; + format = RGBA_PVRTC_4BPPV1_Format; + break; + + default : + console.error( 'THREE.PVRLoader: Unsupported PVR format:', pixelFormat ); + + } + + pvrDatas.dataPtr = 52 + metaLen; + pvrDatas.bpp = bpp; + pvrDatas.format = format; + pvrDatas.width = width; + pvrDatas.height = height; + pvrDatas.numSurfaces = numFaces; + pvrDatas.numMipmaps = numMipmaps; + pvrDatas.isCubemap = ( numFaces === 6 ); + + return _extract( pvrDatas ); + +} + +function _parseV2( pvrDatas ) { + + const header = pvrDatas.header; + + const headerLength = header[ 0 ], + height = header[ 1 ], + width = header[ 2 ], + numMipmaps = header[ 3 ], + flags = header[ 4 ], + // dataLength = header[ 5 ], + // bpp = header[ 6 ], + // bitmaskRed = header[ 7 ], + // bitmaskGreen = header[ 8 ], + // bitmaskBlue = header[ 9 ], + bitmaskAlpha = header[ 10 ], + // pvrTag = header[ 11 ], + numSurfs = header[ 12 ]; + + + const TYPE_MASK = 0xff; + const PVRTC_2 = 24, + PVRTC_4 = 25; + + const formatFlags = flags & TYPE_MASK; + + let bpp, format; + const _hasAlpha = bitmaskAlpha > 0; + + if ( formatFlags === PVRTC_4 ) { + + format = _hasAlpha ? RGBA_PVRTC_4BPPV1_Format : RGB_PVRTC_4BPPV1_Format; + bpp = 4; + + } else if ( formatFlags === PVRTC_2 ) { + + format = _hasAlpha ? RGBA_PVRTC_2BPPV1_Format : RGB_PVRTC_2BPPV1_Format; + bpp = 2; + + } else { + + console.error( 'THREE.PVRLoader: Unknown PVR format:', formatFlags ); + + } + + pvrDatas.dataPtr = headerLength; + pvrDatas.bpp = bpp; + pvrDatas.format = format; + pvrDatas.width = width; + pvrDatas.height = height; + pvrDatas.numSurfaces = numSurfs; + pvrDatas.numMipmaps = numMipmaps + 1; + + // guess cubemap type seems tricky in v2 + // it juste a pvr containing 6 surface (no explicit cubemap type) + pvrDatas.isCubemap = ( numSurfs === 6 ); + + return _extract( pvrDatas ); + +} + + +function _extract( pvrDatas ) { + + const pvr = { + mipmaps: [], + width: pvrDatas.width, + height: pvrDatas.height, + format: pvrDatas.format, + mipmapCount: pvrDatas.numMipmaps, + isCubemap: pvrDatas.isCubemap + }; + + const buffer = pvrDatas.buffer; + + let dataOffset = pvrDatas.dataPtr, + dataSize = 0, + blockSize = 0, + blockWidth = 0, + blockHeight = 0, + widthBlocks = 0, + heightBlocks = 0; + + const bpp = pvrDatas.bpp, + numSurfs = pvrDatas.numSurfaces; + + if ( bpp === 2 ) { + + blockWidth = 8; + blockHeight = 4; + + } else { + + blockWidth = 4; + blockHeight = 4; + + } + + blockSize = ( blockWidth * blockHeight ) * bpp / 8; + + pvr.mipmaps.length = pvrDatas.numMipmaps * numSurfs; + + let mipLevel = 0; + + while ( mipLevel < pvrDatas.numMipmaps ) { + + const sWidth = pvrDatas.width >> mipLevel, + sHeight = pvrDatas.height >> mipLevel; + + widthBlocks = sWidth / blockWidth; + heightBlocks = sHeight / blockHeight; + + // Clamp to minimum number of blocks + if ( widthBlocks < 2 ) widthBlocks = 2; + if ( heightBlocks < 2 ) heightBlocks = 2; + + dataSize = widthBlocks * heightBlocks * blockSize; + + for ( let surfIndex = 0; surfIndex < numSurfs; surfIndex ++ ) { + + const byteArray = new Uint8Array( buffer, dataOffset, dataSize ); + + const mipmap = { + data: byteArray, + width: sWidth, + height: sHeight + }; + + pvr.mipmaps[ surfIndex * pvrDatas.numMipmaps + mipLevel ] = mipmap; + + dataOffset += dataSize; + + } + + mipLevel ++; + + } + + return pvr; + +} + +export { PVRLoader }; diff --git a/node_modules/three/examples/jsm/loaders/RGBELoader.js b/node_modules/three/examples/jsm/loaders/RGBELoader.js new file mode 100644 index 0000000..f2ac6e1 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/RGBELoader.js @@ -0,0 +1,450 @@ +import { + DataTextureLoader, + DataUtils, + FloatType, + HalfFloatType, + LinearFilter, + LinearSRGBColorSpace +} from 'three'; + +// https://github.com/mrdoob/three.js/issues/5552 +// http://en.wikipedia.org/wiki/RGBE_image_format + +class RGBELoader extends DataTextureLoader { + + constructor( manager ) { + + super( manager ); + + this.type = HalfFloatType; + + } + + // adapted from http://www.graphics.cornell.edu/~bjw/rgbe.html + + parse( buffer ) { + + const + /* default error routine. change this to change error handling */ + rgbe_read_error = 1, + rgbe_write_error = 2, + rgbe_format_error = 3, + rgbe_memory_error = 4, + rgbe_error = function ( rgbe_error_code, msg ) { + + switch ( rgbe_error_code ) { + + case rgbe_read_error: throw new Error( 'THREE.RGBELoader: Read Error: ' + ( msg || '' ) ); + case rgbe_write_error: throw new Error( 'THREE.RGBELoader: Write Error: ' + ( msg || '' ) ); + case rgbe_format_error: throw new Error( 'THREE.RGBELoader: Bad File Format: ' + ( msg || '' ) ); + default: + case rgbe_memory_error: throw new Error( 'THREE.RGBELoader: Memory Error: ' + ( msg || '' ) ); + + } + + }, + + /* offsets to red, green, and blue components in a data (float) pixel */ + //RGBE_DATA_RED = 0, + //RGBE_DATA_GREEN = 1, + //RGBE_DATA_BLUE = 2, + + /* number of floats per pixel, use 4 since stored in rgba image format */ + //RGBE_DATA_SIZE = 4, + + /* flags indicating which fields in an rgbe_header_info are valid */ + RGBE_VALID_PROGRAMTYPE = 1, + RGBE_VALID_FORMAT = 2, + RGBE_VALID_DIMENSIONS = 4, + + NEWLINE = '\n', + + fgets = function ( buffer, lineLimit, consume ) { + + const chunkSize = 128; + + lineLimit = ! lineLimit ? 1024 : lineLimit; + let p = buffer.pos, + i = - 1, len = 0, s = '', + chunk = String.fromCharCode.apply( null, new Uint16Array( buffer.subarray( p, p + chunkSize ) ) ); + + while ( ( 0 > ( i = chunk.indexOf( NEWLINE ) ) ) && ( len < lineLimit ) && ( p < buffer.byteLength ) ) { + + s += chunk; len += chunk.length; + p += chunkSize; + chunk += String.fromCharCode.apply( null, new Uint16Array( buffer.subarray( p, p + chunkSize ) ) ); + + } + + if ( - 1 < i ) { + + /*for (i=l-1; i>=0; i--) { + byteCode = m.charCodeAt(i); + if (byteCode > 0x7f && byteCode <= 0x7ff) byteLen++; + else if (byteCode > 0x7ff && byteCode <= 0xffff) byteLen += 2; + if (byteCode >= 0xDC00 && byteCode <= 0xDFFF) i--; //trail surrogate + }*/ + if ( false !== consume ) buffer.pos += len + i + 1; + return s + chunk.slice( 0, i ); + + } + + return false; + + }, + + /* minimal header reading. modify if you want to parse more information */ + RGBE_ReadHeader = function ( buffer ) { + + + // regexes to parse header info fields + const magic_token_re = /^#\?(\S+)/, + gamma_re = /^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/, + exposure_re = /^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/, + format_re = /^\s*FORMAT=(\S+)\s*$/, + dimensions_re = /^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/, + + // RGBE format header struct + header = { + + valid: 0, /* indicate which fields are valid */ + + string: '', /* the actual header string */ + + comments: '', /* comments found in header */ + + programtype: 'RGBE', /* listed at beginning of file to identify it after "#?". defaults to "RGBE" */ + + format: '', /* RGBE format, default 32-bit_rle_rgbe */ + + gamma: 1.0, /* image has already been gamma corrected with given gamma. defaults to 1.0 (no correction) */ + + exposure: 1.0, /* a value of 1.0 in an image corresponds to watts/steradian/m^2. defaults to 1.0 */ + + width: 0, height: 0 /* image dimensions, width/height */ + + }; + + let line, match; + + if ( buffer.pos >= buffer.byteLength || ! ( line = fgets( buffer ) ) ) { + + rgbe_error( rgbe_read_error, 'no header found' ); + + } + + /* if you want to require the magic token then uncomment the next line */ + if ( ! ( match = line.match( magic_token_re ) ) ) { + + rgbe_error( rgbe_format_error, 'bad initial token' ); + + } + + header.valid |= RGBE_VALID_PROGRAMTYPE; + header.programtype = match[ 1 ]; + header.string += line + '\n'; + + while ( true ) { + + line = fgets( buffer ); + if ( false === line ) break; + header.string += line + '\n'; + + if ( '#' === line.charAt( 0 ) ) { + + header.comments += line + '\n'; + continue; // comment line + + } + + if ( match = line.match( gamma_re ) ) { + + header.gamma = parseFloat( match[ 1 ] ); + + } + + if ( match = line.match( exposure_re ) ) { + + header.exposure = parseFloat( match[ 1 ] ); + + } + + if ( match = line.match( format_re ) ) { + + header.valid |= RGBE_VALID_FORMAT; + header.format = match[ 1 ];//'32-bit_rle_rgbe'; + + } + + if ( match = line.match( dimensions_re ) ) { + + header.valid |= RGBE_VALID_DIMENSIONS; + header.height = parseInt( match[ 1 ], 10 ); + header.width = parseInt( match[ 2 ], 10 ); + + } + + if ( ( header.valid & RGBE_VALID_FORMAT ) && ( header.valid & RGBE_VALID_DIMENSIONS ) ) break; + + } + + if ( ! ( header.valid & RGBE_VALID_FORMAT ) ) { + + rgbe_error( rgbe_format_error, 'missing format specifier' ); + + } + + if ( ! ( header.valid & RGBE_VALID_DIMENSIONS ) ) { + + rgbe_error( rgbe_format_error, 'missing image size specifier' ); + + } + + return header; + + }, + + RGBE_ReadPixels_RLE = function ( buffer, w, h ) { + + const scanline_width = w; + + if ( + // run length encoding is not allowed so read flat + ( ( scanline_width < 8 ) || ( scanline_width > 0x7fff ) ) || + // this file is not run length encoded + ( ( 2 !== buffer[ 0 ] ) || ( 2 !== buffer[ 1 ] ) || ( buffer[ 2 ] & 0x80 ) ) + ) { + + // return the flat buffer + return new Uint8Array( buffer ); + + } + + if ( scanline_width !== ( ( buffer[ 2 ] << 8 ) | buffer[ 3 ] ) ) { + + rgbe_error( rgbe_format_error, 'wrong scanline width' ); + + } + + const data_rgba = new Uint8Array( 4 * w * h ); + + if ( ! data_rgba.length ) { + + rgbe_error( rgbe_memory_error, 'unable to allocate buffer space' ); + + } + + let offset = 0, pos = 0; + + const ptr_end = 4 * scanline_width; + const rgbeStart = new Uint8Array( 4 ); + const scanline_buffer = new Uint8Array( ptr_end ); + let num_scanlines = h; + + // read in each successive scanline + while ( ( num_scanlines > 0 ) && ( pos < buffer.byteLength ) ) { + + if ( pos + 4 > buffer.byteLength ) { + + rgbe_error( rgbe_read_error ); + + } + + rgbeStart[ 0 ] = buffer[ pos ++ ]; + rgbeStart[ 1 ] = buffer[ pos ++ ]; + rgbeStart[ 2 ] = buffer[ pos ++ ]; + rgbeStart[ 3 ] = buffer[ pos ++ ]; + + if ( ( 2 != rgbeStart[ 0 ] ) || ( 2 != rgbeStart[ 1 ] ) || ( ( ( rgbeStart[ 2 ] << 8 ) | rgbeStart[ 3 ] ) != scanline_width ) ) { + + rgbe_error( rgbe_format_error, 'bad rgbe scanline format' ); + + } + + // read each of the four channels for the scanline into the buffer + // first red, then green, then blue, then exponent + let ptr = 0, count; + + while ( ( ptr < ptr_end ) && ( pos < buffer.byteLength ) ) { + + count = buffer[ pos ++ ]; + const isEncodedRun = count > 128; + if ( isEncodedRun ) count -= 128; + + if ( ( 0 === count ) || ( ptr + count > ptr_end ) ) { + + rgbe_error( rgbe_format_error, 'bad scanline data' ); + + } + + if ( isEncodedRun ) { + + // a (encoded) run of the same value + const byteValue = buffer[ pos ++ ]; + for ( let i = 0; i < count; i ++ ) { + + scanline_buffer[ ptr ++ ] = byteValue; + + } + //ptr += count; + + } else { + + // a literal-run + scanline_buffer.set( buffer.subarray( pos, pos + count ), ptr ); + ptr += count; pos += count; + + } + + } + + + // now convert data from buffer into rgba + // first red, then green, then blue, then exponent (alpha) + const l = scanline_width; //scanline_buffer.byteLength; + for ( let i = 0; i < l; i ++ ) { + + let off = 0; + data_rgba[ offset ] = scanline_buffer[ i + off ]; + off += scanline_width; //1; + data_rgba[ offset + 1 ] = scanline_buffer[ i + off ]; + off += scanline_width; //1; + data_rgba[ offset + 2 ] = scanline_buffer[ i + off ]; + off += scanline_width; //1; + data_rgba[ offset + 3 ] = scanline_buffer[ i + off ]; + offset += 4; + + } + + num_scanlines --; + + } + + return data_rgba; + + }; + + const RGBEByteToRGBFloat = function ( sourceArray, sourceOffset, destArray, destOffset ) { + + const e = sourceArray[ sourceOffset + 3 ]; + const scale = Math.pow( 2.0, e - 128.0 ) / 255.0; + + destArray[ destOffset + 0 ] = sourceArray[ sourceOffset + 0 ] * scale; + destArray[ destOffset + 1 ] = sourceArray[ sourceOffset + 1 ] * scale; + destArray[ destOffset + 2 ] = sourceArray[ sourceOffset + 2 ] * scale; + destArray[ destOffset + 3 ] = 1; + + }; + + const RGBEByteToRGBHalf = function ( sourceArray, sourceOffset, destArray, destOffset ) { + + const e = sourceArray[ sourceOffset + 3 ]; + const scale = Math.pow( 2.0, e - 128.0 ) / 255.0; + + // clamping to 65504, the maximum representable value in float16 + destArray[ destOffset + 0 ] = DataUtils.toHalfFloat( Math.min( sourceArray[ sourceOffset + 0 ] * scale, 65504 ) ); + destArray[ destOffset + 1 ] = DataUtils.toHalfFloat( Math.min( sourceArray[ sourceOffset + 1 ] * scale, 65504 ) ); + destArray[ destOffset + 2 ] = DataUtils.toHalfFloat( Math.min( sourceArray[ sourceOffset + 2 ] * scale, 65504 ) ); + destArray[ destOffset + 3 ] = DataUtils.toHalfFloat( 1 ); + + }; + + const byteArray = new Uint8Array( buffer ); + byteArray.pos = 0; + const rgbe_header_info = RGBE_ReadHeader( byteArray ); + + const w = rgbe_header_info.width, + h = rgbe_header_info.height, + image_rgba_data = RGBE_ReadPixels_RLE( byteArray.subarray( byteArray.pos ), w, h ); + + + let data, type; + let numElements; + + switch ( this.type ) { + + case FloatType: + + numElements = image_rgba_data.length / 4; + const floatArray = new Float32Array( numElements * 4 ); + + for ( let j = 0; j < numElements; j ++ ) { + + RGBEByteToRGBFloat( image_rgba_data, j * 4, floatArray, j * 4 ); + + } + + data = floatArray; + type = FloatType; + break; + + case HalfFloatType: + + numElements = image_rgba_data.length / 4; + const halfArray = new Uint16Array( numElements * 4 ); + + for ( let j = 0; j < numElements; j ++ ) { + + RGBEByteToRGBHalf( image_rgba_data, j * 4, halfArray, j * 4 ); + + } + + data = halfArray; + type = HalfFloatType; + break; + + default: + + throw new Error( 'THREE.RGBELoader: Unsupported type: ' + this.type ); + break; + + } + + return { + width: w, height: h, + data: data, + header: rgbe_header_info.string, + gamma: rgbe_header_info.gamma, + exposure: rgbe_header_info.exposure, + type: type + }; + + } + + setDataType( value ) { + + this.type = value; + return this; + + } + + load( url, onLoad, onProgress, onError ) { + + function onLoadCallback( texture, texData ) { + + switch ( texture.type ) { + + case FloatType: + case HalfFloatType: + + texture.colorSpace = LinearSRGBColorSpace; + texture.minFilter = LinearFilter; + texture.magFilter = LinearFilter; + texture.generateMipmaps = false; + texture.flipY = true; + + break; + + } + + if ( onLoad ) onLoad( texture, texData ); + + } + + return super.load( url, onLoadCallback, onProgress, onError ); + + } + +} + +export { RGBELoader }; diff --git a/node_modules/three/examples/jsm/loaders/RGBMLoader.js b/node_modules/three/examples/jsm/loaders/RGBMLoader.js new file mode 100644 index 0000000..a78e655 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/RGBMLoader.js @@ -0,0 +1,1081 @@ +import { + DataTextureLoader, + RGBAFormat, + LinearFilter, + CubeTexture, + HalfFloatType, + DataUtils +} from 'three'; + +class RGBMLoader extends DataTextureLoader { + + constructor( manager ) { + + super( manager ); + + this.type = HalfFloatType; + this.maxRange = 7; // more information about this property at https://iwasbeingirony.blogspot.com/2010/06/difference-between-rgbm-and-rgbd.html + + } + + setDataType( value ) { + + this.type = value; + return this; + + } + + setMaxRange( value ) { + + this.maxRange = value; + return this; + + } + + loadCubemap( urls, onLoad, onProgress, onError ) { + + const texture = new CubeTexture(); + + for ( let i = 0; i < 6; i ++ ) { + + texture.images[ i ] = undefined; + + } + + let loaded = 0; + + const scope = this; + + function loadTexture( i ) { + + scope.load( urls[ i ], function ( image ) { + + texture.images[ i ] = image; + + loaded ++; + + if ( loaded === 6 ) { + + texture.needsUpdate = true; + + if ( onLoad ) onLoad( texture ); + + } + + }, undefined, onError ); + + } + + for ( let i = 0; i < urls.length; ++ i ) { + + loadTexture( i ); + + } + + texture.type = this.type; + texture.format = RGBAFormat; + texture.minFilter = LinearFilter; + texture.generateMipmaps = false; + + return texture; + + } + + loadCubemapAsync( urls, onProgress ) { + + return new Promise( ( resolve, reject ) => { + + this.loadCubemap( urls, resolve, onProgress, reject ); + + } ); + + } + + parse( buffer ) { + + const img = UPNG.decode( buffer ); + const rgba = UPNG.toRGBA8( img )[ 0 ]; + + const data = new Uint8Array( rgba ); + const size = img.width * img.height * 4; + + const output = ( this.type === HalfFloatType ) ? new Uint16Array( size ) : new Float32Array( size ); + + // decode RGBM + + for ( let i = 0; i < data.length; i += 4 ) { + + const r = data[ i + 0 ] / 255; + const g = data[ i + 1 ] / 255; + const b = data[ i + 2 ] / 255; + const a = data[ i + 3 ] / 255; + + if ( this.type === HalfFloatType ) { + + output[ i + 0 ] = DataUtils.toHalfFloat( Math.min( r * a * this.maxRange, 65504 ) ); + output[ i + 1 ] = DataUtils.toHalfFloat( Math.min( g * a * this.maxRange, 65504 ) ); + output[ i + 2 ] = DataUtils.toHalfFloat( Math.min( b * a * this.maxRange, 65504 ) ); + output[ i + 3 ] = DataUtils.toHalfFloat( 1 ); + + } else { + + output[ i + 0 ] = r * a * this.maxRange; + output[ i + 1 ] = g * a * this.maxRange; + output[ i + 2 ] = b * a * this.maxRange; + output[ i + 3 ] = 1; + + } + + } + + return { + width: img.width, + height: img.height, + data: output, + format: RGBAFormat, + type: this.type, + flipY: true + }; + + } + +} + +// from https://github.com/photopea/UPNG.js (MIT License) + +var UPNG = {}; + +UPNG.toRGBA8 = function ( out ) { + + var w = out.width, h = out.height; + if ( out.tabs.acTL == null ) return [ UPNG.toRGBA8.decodeImage( out.data, w, h, out ).buffer ]; + + var frms = []; + if ( out.frames[ 0 ].data == null ) out.frames[ 0 ].data = out.data; + + var len = w * h * 4, img = new Uint8Array( len ), empty = new Uint8Array( len ), prev = new Uint8Array( len ); + for ( var i = 0; i < out.frames.length; i ++ ) { + + var frm = out.frames[ i ]; + var fx = frm.rect.x, fy = frm.rect.y, fw = frm.rect.width, fh = frm.rect.height; + var fdata = UPNG.toRGBA8.decodeImage( frm.data, fw, fh, out ); + + if ( i != 0 ) for ( var j = 0; j < len; j ++ ) prev[ j ] = img[ j ]; + + if ( frm.blend == 0 ) UPNG._copyTile( fdata, fw, fh, img, w, h, fx, fy, 0 ); + else if ( frm.blend == 1 ) UPNG._copyTile( fdata, fw, fh, img, w, h, fx, fy, 1 ); + + frms.push( img.buffer.slice( 0 ) ); + + if ( frm.dispose == 1 ) UPNG._copyTile( empty, fw, fh, img, w, h, fx, fy, 0 ); + else if ( frm.dispose == 2 ) for ( var j = 0; j < len; j ++ ) img[ j ] = prev[ j ]; + + } + + return frms; + +}; + +UPNG.toRGBA8.decodeImage = function ( data, w, h, out ) { + + var area = w * h, bpp = UPNG.decode._getBPP( out ); + var bpl = Math.ceil( w * bpp / 8 ); // bytes per line + + var bf = new Uint8Array( area * 4 ), bf32 = new Uint32Array( bf.buffer ); + var ctype = out.ctype, depth = out.depth; + var rs = UPNG._bin.readUshort; + + if ( ctype == 6 ) { // RGB + alpha + + var qarea = area << 2; + if ( depth == 8 ) for ( var i = 0; i < qarea; i += 4 ) { + + bf[ i ] = data[ i ]; bf[ i + 1 ] = data[ i + 1 ]; bf[ i + 2 ] = data[ i + 2 ]; bf[ i + 3 ] = data[ i + 3 ]; + + } + + if ( depth == 16 ) for ( var i = 0; i < qarea; i ++ ) { + + bf[ i ] = data[ i << 1 ]; + + } + + } else if ( ctype == 2 ) { // RGB + + var ts = out.tabs[ 'tRNS' ]; + if ( ts == null ) { + + if ( depth == 8 ) for ( var i = 0; i < area; i ++ ) { + + var ti = i * 3; bf32[ i ] = ( 255 << 24 ) | ( data[ ti + 2 ] << 16 ) | ( data[ ti + 1 ] << 8 ) | data[ ti ]; + + } + + if ( depth == 16 ) for ( var i = 0; i < area; i ++ ) { + + var ti = i * 6; bf32[ i ] = ( 255 << 24 ) | ( data[ ti + 4 ] << 16 ) | ( data[ ti + 2 ] << 8 ) | data[ ti ]; + + } + + } else { + + var tr = ts[ 0 ], tg = ts[ 1 ], tb = ts[ 2 ]; + if ( depth == 8 ) for ( var i = 0; i < area; i ++ ) { + + var qi = i << 2, ti = i * 3; bf32[ i ] = ( 255 << 24 ) | ( data[ ti + 2 ] << 16 ) | ( data[ ti + 1 ] << 8 ) | data[ ti ]; + if ( data[ ti ] == tr && data[ ti + 1 ] == tg && data[ ti + 2 ] == tb ) bf[ qi + 3 ] = 0; + + } + + if ( depth == 16 ) for ( var i = 0; i < area; i ++ ) { + + var qi = i << 2, ti = i * 6; bf32[ i ] = ( 255 << 24 ) | ( data[ ti + 4 ] << 16 ) | ( data[ ti + 2 ] << 8 ) | data[ ti ]; + if ( rs( data, ti ) == tr && rs( data, ti + 2 ) == tg && rs( data, ti + 4 ) == tb ) bf[ qi + 3 ] = 0; + + } + + } + + } else if ( ctype == 3 ) { // palette + + var p = out.tabs[ 'PLTE' ], ap = out.tabs[ 'tRNS' ], tl = ap ? ap.length : 0; + //console.log(p, ap); + if ( depth == 1 ) for ( var y = 0; y < h; y ++ ) { + + var s0 = y * bpl, t0 = y * w; + for ( var i = 0; i < w; i ++ ) { + + var qi = ( t0 + i ) << 2, j = ( ( data[ s0 + ( i >> 3 ) ] >> ( 7 - ( ( i & 7 ) << 0 ) ) ) & 1 ), cj = 3 * j; bf[ qi ] = p[ cj ]; bf[ qi + 1 ] = p[ cj + 1 ]; bf[ qi + 2 ] = p[ cj + 2 ]; bf[ qi + 3 ] = ( j < tl ) ? ap[ j ] : 255; + + } + + } + + if ( depth == 2 ) for ( var y = 0; y < h; y ++ ) { + + var s0 = y * bpl, t0 = y * w; + for ( var i = 0; i < w; i ++ ) { + + var qi = ( t0 + i ) << 2, j = ( ( data[ s0 + ( i >> 2 ) ] >> ( 6 - ( ( i & 3 ) << 1 ) ) ) & 3 ), cj = 3 * j; bf[ qi ] = p[ cj ]; bf[ qi + 1 ] = p[ cj + 1 ]; bf[ qi + 2 ] = p[ cj + 2 ]; bf[ qi + 3 ] = ( j < tl ) ? ap[ j ] : 255; + + } + + } + + if ( depth == 4 ) for ( var y = 0; y < h; y ++ ) { + + var s0 = y * bpl, t0 = y * w; + for ( var i = 0; i < w; i ++ ) { + + var qi = ( t0 + i ) << 2, j = ( ( data[ s0 + ( i >> 1 ) ] >> ( 4 - ( ( i & 1 ) << 2 ) ) ) & 15 ), cj = 3 * j; bf[ qi ] = p[ cj ]; bf[ qi + 1 ] = p[ cj + 1 ]; bf[ qi + 2 ] = p[ cj + 2 ]; bf[ qi + 3 ] = ( j < tl ) ? ap[ j ] : 255; + + } + + } + + if ( depth == 8 ) for ( var i = 0; i < area; i ++ ) { + + var qi = i << 2, j = data[ i ], cj = 3 * j; bf[ qi ] = p[ cj ]; bf[ qi + 1 ] = p[ cj + 1 ]; bf[ qi + 2 ] = p[ cj + 2 ]; bf[ qi + 3 ] = ( j < tl ) ? ap[ j ] : 255; + + } + + } else if ( ctype == 4 ) { // gray + alpha + + if ( depth == 8 ) for ( var i = 0; i < area; i ++ ) { + + var qi = i << 2, di = i << 1, gr = data[ di ]; bf[ qi ] = gr; bf[ qi + 1 ] = gr; bf[ qi + 2 ] = gr; bf[ qi + 3 ] = data[ di + 1 ]; + + } + + if ( depth == 16 ) for ( var i = 0; i < area; i ++ ) { + + var qi = i << 2, di = i << 2, gr = data[ di ]; bf[ qi ] = gr; bf[ qi + 1 ] = gr; bf[ qi + 2 ] = gr; bf[ qi + 3 ] = data[ di + 2 ]; + + } + + } else if ( ctype == 0 ) { // gray + + var tr = out.tabs[ 'tRNS' ] ? out.tabs[ 'tRNS' ] : - 1; + for ( var y = 0; y < h; y ++ ) { + + var off = y * bpl, to = y * w; + if ( depth == 1 ) for ( var x = 0; x < w; x ++ ) { + + var gr = 255 * ( ( data[ off + ( x >>> 3 ) ] >>> ( 7 - ( x & 7 ) ) ) & 1 ), al = ( gr == tr * 255 ) ? 0 : 255; bf32[ to + x ] = ( al << 24 ) | ( gr << 16 ) | ( gr << 8 ) | gr; + + } + else if ( depth == 2 ) for ( var x = 0; x < w; x ++ ) { + + var gr = 85 * ( ( data[ off + ( x >>> 2 ) ] >>> ( 6 - ( ( x & 3 ) << 1 ) ) ) & 3 ), al = ( gr == tr * 85 ) ? 0 : 255; bf32[ to + x ] = ( al << 24 ) | ( gr << 16 ) | ( gr << 8 ) | gr; + + } + else if ( depth == 4 ) for ( var x = 0; x < w; x ++ ) { + + var gr = 17 * ( ( data[ off + ( x >>> 1 ) ] >>> ( 4 - ( ( x & 1 ) << 2 ) ) ) & 15 ), al = ( gr == tr * 17 ) ? 0 : 255; bf32[ to + x ] = ( al << 24 ) | ( gr << 16 ) | ( gr << 8 ) | gr; + + } + else if ( depth == 8 ) for ( var x = 0; x < w; x ++ ) { + + var gr = data[ off + x ], al = ( gr == tr ) ? 0 : 255; bf32[ to + x ] = ( al << 24 ) | ( gr << 16 ) | ( gr << 8 ) | gr; + + } + else if ( depth == 16 ) for ( var x = 0; x < w; x ++ ) { + + var gr = data[ off + ( x << 1 ) ], al = ( rs( data, off + ( x << 1 ) ) == tr ) ? 0 : 255; bf32[ to + x ] = ( al << 24 ) | ( gr << 16 ) | ( gr << 8 ) | gr; + + } + + } + + } + + //console.log(Date.now()-time); + return bf; + +}; + + + +UPNG.decode = function ( buff ) { + + var data = new Uint8Array( buff ), offset = 8, bin = UPNG._bin, rUs = bin.readUshort, rUi = bin.readUint; + var out = { tabs: {}, frames: [] }; + var dd = new Uint8Array( data.length ), doff = 0; // put all IDAT data into it + var fd, foff = 0; // frames + var text, keyw, bfr; + + var mgck = [ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a ]; + for ( var i = 0; i < 8; i ++ ) if ( data[ i ] != mgck[ i ] ) throw new Error( 'The input is not a PNG file!' ); + + while ( offset < data.length ) { + + var len = bin.readUint( data, offset ); offset += 4; + var type = bin.readASCII( data, offset, 4 ); offset += 4; + //console.log(type,len); + + if ( type == 'IHDR' ) { + + UPNG.decode._IHDR( data, offset, out ); + + } else if ( type == 'CgBI' ) { + + out.tabs[ type ] = data.slice( offset, offset + 4 ); + + } else if ( type == 'IDAT' ) { + + for ( var i = 0; i < len; i ++ ) dd[ doff + i ] = data[ offset + i ]; + doff += len; + + } else if ( type == 'acTL' ) { + + out.tabs[ type ] = { num_frames: rUi( data, offset ), num_plays: rUi( data, offset + 4 ) }; + fd = new Uint8Array( data.length ); + + } else if ( type == 'fcTL' ) { + + if ( foff != 0 ) { + + var fr = out.frames[ out.frames.length - 1 ]; + fr.data = UPNG.decode._decompress( out, fd.slice( 0, foff ), fr.rect.width, fr.rect.height ); foff = 0; + + } + + var rct = { x: rUi( data, offset + 12 ), y: rUi( data, offset + 16 ), width: rUi( data, offset + 4 ), height: rUi( data, offset + 8 ) }; + var del = rUs( data, offset + 22 ); del = rUs( data, offset + 20 ) / ( del == 0 ? 100 : del ); + var frm = { rect: rct, delay: Math.round( del * 1000 ), dispose: data[ offset + 24 ], blend: data[ offset + 25 ] }; + //console.log(frm); + out.frames.push( frm ); + + } else if ( type == 'fdAT' ) { + + for ( var i = 0; i < len - 4; i ++ ) fd[ foff + i ] = data[ offset + i + 4 ]; + foff += len - 4; + + } else if ( type == 'pHYs' ) { + + out.tabs[ type ] = [ bin.readUint( data, offset ), bin.readUint( data, offset + 4 ), data[ offset + 8 ] ]; + + } else if ( type == 'cHRM' ) { + + out.tabs[ type ] = []; + for ( var i = 0; i < 8; i ++ ) out.tabs[ type ].push( bin.readUint( data, offset + i * 4 ) ); + + } else if ( type == 'tEXt' || type == 'zTXt' ) { + + if ( out.tabs[ type ] == null ) out.tabs[ type ] = {}; + var nz = bin.nextZero( data, offset ); + keyw = bin.readASCII( data, offset, nz - offset ); + var tl = offset + len - nz - 1; + if ( type == 'tEXt' ) text = bin.readASCII( data, nz + 1, tl ); + else { + + bfr = UPNG.decode._inflate( data.slice( nz + 2, nz + 2 + tl ) ); + text = bin.readUTF8( bfr, 0, bfr.length ); + + } + + out.tabs[ type ][ keyw ] = text; + + } else if ( type == 'iTXt' ) { + + if ( out.tabs[ type ] == null ) out.tabs[ type ] = {}; + var nz = 0, off = offset; + nz = bin.nextZero( data, off ); + keyw = bin.readASCII( data, off, nz - off ); off = nz + 1; + var cflag = data[ off ]; off += 2; + nz = bin.nextZero( data, off ); + bin.readASCII( data, off, nz - off ); off = nz + 1; + nz = bin.nextZero( data, off ); + bin.readUTF8( data, off, nz - off ); off = nz + 1; + var tl = len - ( off - offset ); + if ( cflag == 0 ) text = bin.readUTF8( data, off, tl ); + else { + + bfr = UPNG.decode._inflate( data.slice( off, off + tl ) ); + text = bin.readUTF8( bfr, 0, bfr.length ); + + } + + out.tabs[ type ][ keyw ] = text; + + } else if ( type == 'PLTE' ) { + + out.tabs[ type ] = bin.readBytes( data, offset, len ); + + } else if ( type == 'hIST' ) { + + var pl = out.tabs[ 'PLTE' ].length / 3; + out.tabs[ type ] = []; for ( var i = 0; i < pl; i ++ ) out.tabs[ type ].push( rUs( data, offset + i * 2 ) ); + + } else if ( type == 'tRNS' ) { + + if ( out.ctype == 3 ) out.tabs[ type ] = bin.readBytes( data, offset, len ); + else if ( out.ctype == 0 ) out.tabs[ type ] = rUs( data, offset ); + else if ( out.ctype == 2 ) out.tabs[ type ] = [ rUs( data, offset ), rUs( data, offset + 2 ), rUs( data, offset + 4 ) ]; + //else console.log("tRNS for unsupported color type",out.ctype, len); + + } else if ( type == 'gAMA' ) out.tabs[ type ] = bin.readUint( data, offset ) / 100000; + else if ( type == 'sRGB' ) out.tabs[ type ] = data[ offset ]; + else if ( type == 'bKGD' ) { + + if ( out.ctype == 0 || out.ctype == 4 ) out.tabs[ type ] = [ rUs( data, offset ) ]; + else if ( out.ctype == 2 || out.ctype == 6 ) out.tabs[ type ] = [ rUs( data, offset ), rUs( data, offset + 2 ), rUs( data, offset + 4 ) ]; + else if ( out.ctype == 3 ) out.tabs[ type ] = data[ offset ]; + + } else if ( type == 'IEND' ) { + + break; + + } + + //else { console.log("unknown chunk type", type, len); out.tabs[type]=data.slice(offset,offset+len); } + offset += len; + bin.readUint( data, offset ); offset += 4; + + } + + if ( foff != 0 ) { + + var fr = out.frames[ out.frames.length - 1 ]; + fr.data = UPNG.decode._decompress( out, fd.slice( 0, foff ), fr.rect.width, fr.rect.height ); + + } + + out.data = UPNG.decode._decompress( out, dd, out.width, out.height ); + + delete out.compress; delete out.interlace; delete out.filter; + return out; + +}; + +UPNG.decode._decompress = function ( out, dd, w, h ) { + + var bpp = UPNG.decode._getBPP( out ), bpl = Math.ceil( w * bpp / 8 ), buff = new Uint8Array( ( bpl + 1 + out.interlace ) * h ); + if ( out.tabs[ 'CgBI' ] ) dd = UPNG.inflateRaw( dd, buff ); + else dd = UPNG.decode._inflate( dd, buff ); + + if ( out.interlace == 0 ) dd = UPNG.decode._filterZero( dd, out, 0, w, h ); + else if ( out.interlace == 1 ) dd = UPNG.decode._readInterlace( dd, out ); + + return dd; + +}; + +UPNG.decode._inflate = function ( data, buff ) { + + var out = UPNG[ 'inflateRaw' ]( new Uint8Array( data.buffer, 2, data.length - 6 ), buff ); return out; + +}; + +UPNG.inflateRaw = function () { + + var H = {}; H.H = {}; H.H.N = function ( N, W ) { + + var R = Uint8Array, i = 0, m = 0, J = 0, h = 0, Q = 0, X = 0, u = 0, w = 0, d = 0, v, C; + if ( N[ 0 ] == 3 && N[ 1 ] == 0 ) return W ? W : new R( 0 ); var V = H.H, n = V.b, A = V.e, l = V.R, M = V.n, I = V.A, e = V.Z, b = V.m, Z = W == null; + if ( Z )W = new R( N.length >>> 2 << 5 ); while ( i == 0 ) { + + i = n( N, d, 1 ); m = n( N, d + 1, 2 ); d += 3; if ( m == 0 ) { + + if ( ( d & 7 ) != 0 )d += 8 - ( d & 7 ); + var D = ( d >>> 3 ) + 4, q = N[ D - 4 ] | N[ D - 3 ] << 8; if ( Z )W = H.H.W( W, w + q ); W.set( new R( N.buffer, N.byteOffset + D, q ), w ); d = D + q << 3; + w += q; continue + ; + + } + + if ( Z )W = H.H.W( W, w + ( 1 << 17 ) ); if ( m == 1 ) { + + v = b.J; C = b.h; X = ( 1 << 9 ) - 1; u = ( 1 << 5 ) - 1; + + } + + if ( m == 2 ) { + + J = A( N, d, 5 ) + 257; + h = A( N, d + 5, 5 ) + 1; Q = A( N, d + 10, 4 ) + 4; d += 14; var j = 1; for ( var c = 0; c < 38; c += 2 ) { + + b.Q[ c ] = 0; b.Q[ c + 1 ] = 0; + + } + + for ( var c = 0; + c < Q; c ++ ) { + + var K = A( N, d + c * 3, 3 ); b.Q[ ( b.X[ c ] << 1 ) + 1 ] = K; if ( K > j )j = K + ; + + } + + d += 3 * Q; M( b.Q, j ); I( b.Q, j, b.u ); v = b.w; C = b.d; + d = l( b.u, ( 1 << j ) - 1, J + h, N, d, b.v ); var r = V.V( b.v, 0, J, b.C ); X = ( 1 << r ) - 1; var S = V.V( b.v, J, h, b.D ); u = ( 1 << S ) - 1; M( b.C, r ); + I( b.C, r, v ); M( b.D, S ); I( b.D, S, C ) + ; + + } + + while ( ! 0 ) { + + var T = v[ e( N, d ) & X ]; d += T & 15; var p = T >>> 4; if ( p >>> 8 == 0 ) { + + W[ w ++ ] = p; + + } else if ( p == 256 ) { + + break; + + } else { + + var z = w + p - 254; + if ( p > 264 ) { + + var _ = b.q[ p - 257 ]; z = w + ( _ >>> 3 ) + A( N, d, _ & 7 ); d += _ & 7; + + } + + var $ = C[ e( N, d ) & u ]; d += $ & 15; var s = $ >>> 4, Y = b.c[ s ], a = ( Y >>> 4 ) + n( N, d, Y & 15 ); + d += Y & 15; while ( w < z ) { + + W[ w ] = W[ w ++ - a ]; W[ w ] = W[ w ++ - a ]; W[ w ] = W[ w ++ - a ]; W[ w ] = W[ w ++ - a ]; + + } + + w = z + ; + + } + + } + + } + + return W.length == w ? W : W.slice( 0, w ) + ; + + }; + + H.H.W = function ( N, W ) { + + var R = N.length; if ( W <= R ) return N; var V = new Uint8Array( R << 1 ); V.set( N, 0 ); return V; + + }; + + H.H.R = function ( N, W, R, V, n, A ) { + + var l = H.H.e, M = H.H.Z, I = 0; while ( I < R ) { + + var e = N[ M( V, n ) & W ]; n += e & 15; var b = e >>> 4; + if ( b <= 15 ) { + + A[ I ] = b; I ++; + + } else { + + var Z = 0, m = 0; if ( b == 16 ) { + + m = 3 + l( V, n, 2 ); n += 2; Z = A[ I - 1 ]; + + } else if ( b == 17 ) { + + m = 3 + l( V, n, 3 ); + n += 3 + ; + + } else if ( b == 18 ) { + + m = 11 + l( V, n, 7 ); n += 7; + + } + + var J = I + m; while ( I < J ) { + + A[ I ] = Z; I ++; + + } + + } + + } + + return n + ; + + }; + + H.H.V = function ( N, W, R, V ) { + + var n = 0, A = 0, l = V.length >>> 1; + while ( A < R ) { + + var M = N[ A + W ]; V[ A << 1 ] = 0; V[ ( A << 1 ) + 1 ] = M; if ( M > n )n = M; A ++; + + } + + while ( A < l ) { + + V[ A << 1 ] = 0; V[ ( A << 1 ) + 1 ] = 0; A ++; + + } + + return n + ; + + }; + + H.H.n = function ( N, W ) { + + var R = H.H.m, V = N.length, n, A, l, M, I, e = R.j; for ( var M = 0; M <= W; M ++ )e[ M ] = 0; for ( M = 1; M < V; M += 2 )e[ N[ M ] ] ++; + var b = R.K; n = 0; e[ 0 ] = 0; for ( A = 1; A <= W; A ++ ) { + + n = n + e[ A - 1 ] << 1; b[ A ] = n; + + } + + for ( l = 0; l < V; l += 2 ) { + + I = N[ l + 1 ]; if ( I != 0 ) { + + N[ l ] = b[ I ]; + b[ I ] ++ + ; + + } + + } + + }; + + H.H.A = function ( N, W, R ) { + + var V = N.length, n = H.H.m, A = n.r; for ( var l = 0; l < V; l += 2 ) if ( N[ l + 1 ] != 0 ) { + + var M = l >> 1, I = N[ l + 1 ], e = M << 4 | I, b = W - I, Z = N[ l ] << b, m = Z + ( 1 << b ); + while ( Z != m ) { + + var J = A[ Z ] >>> 15 - W; R[ J ] = e; Z ++; + + } + + } + + }; + + H.H.l = function ( N, W ) { + + var R = H.H.m.r, V = 15 - W; for ( var n = 0; n < N.length; + n += 2 ) { + + var A = N[ n ] << W - N[ n + 1 ]; N[ n ] = R[ A ] >>> V; + + } + + }; + + H.H.M = function ( N, W, R ) { + + R = R << ( W & 7 ); var V = W >>> 3; N[ V ] |= R; N[ V + 1 ] |= R >>> 8; + + }; + + H.H.I = function ( N, W, R ) { + + R = R << ( W & 7 ); var V = W >>> 3; N[ V ] |= R; N[ V + 1 ] |= R >>> 8; N[ V + 2 ] |= R >>> 16; + + }; + + H.H.e = function ( N, W, R ) { + + return ( N[ W >>> 3 ] | N[ ( W >>> 3 ) + 1 ] << 8 ) >>> ( W & 7 ) & ( 1 << R ) - 1; + + }; + + H.H.b = function ( N, W, R ) { + + return ( N[ W >>> 3 ] | N[ ( W >>> 3 ) + 1 ] << 8 | N[ ( W >>> 3 ) + 2 ] << 16 ) >>> ( W & 7 ) & ( 1 << R ) - 1; + + }; + + H.H.Z = function ( N, W ) { + + return ( N[ W >>> 3 ] | N[ ( W >>> 3 ) + 1 ] << 8 | N[ ( W >>> 3 ) + 2 ] << 16 ) >>> ( W & 7 ); + + }; + + H.H.i = function ( N, W ) { + + return ( N[ W >>> 3 ] | N[ ( W >>> 3 ) + 1 ] << 8 | N[ ( W >>> 3 ) + 2 ] << 16 | N[ ( W >>> 3 ) + 3 ] << 24 ) >>> ( W & 7 ); + + }; + + H.H.m = function () { + + var N = Uint16Array, W = Uint32Array; + return { K: new N( 16 ), j: new N( 16 ), X: [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ], S: [ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999 ], T: [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0 ], q: new N( 32 ), p: [ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535 ], z: [ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0 ], c: new W( 32 ), J: new N( 512 ), _: [], h: new N( 32 ), $: [], w: new N( 32768 ), C: [], v: [], d: new N( 32768 ), D: [], u: new N( 512 ), Q: [], r: new N( 1 << 15 ), s: new W( 286 ), Y: new W( 30 ), a: new W( 19 ), t: new W( 15e3 ), k: new N( 1 << 16 ), g: new N( 1 << 15 ) } + ; + + }(); + ( function () { + + var N = H.H.m, W = 1 << 15; for ( var R = 0; R < W; R ++ ) { + + var V = R; V = ( V & 2863311530 ) >>> 1 | ( V & 1431655765 ) << 1; + V = ( V & 3435973836 ) >>> 2 | ( V & 858993459 ) << 2; V = ( V & 4042322160 ) >>> 4 | ( V & 252645135 ) << 4; V = ( V & 4278255360 ) >>> 8 | ( V & 16711935 ) << 8; + N.r[ R ] = ( V >>> 16 | V << 16 ) >>> 17 + ; + + } + + function n( A, l, M ) { + + while ( l -- != 0 )A.push( 0, M ) + ; + + } + + for ( var R = 0; R < 32; R ++ ) { + + N.q[ R ] = N.S[ R ] << 3 | N.T[ R ]; + N.c[ R ] = N.p[ R ] << 4 | N.z[ R ] + ; + + } + + n( N._, 144, 8 ); n( N._, 255 - 143, 9 ); n( N._, 279 - 255, 7 ); n( N._, 287 - 279, 8 ); H.H.n( N._, 9 ); + H.H.A( N._, 9, N.J ); H.H.l( N._, 9 ); n( N.$, 32, 5 ); H.H.n( N.$, 5 ); H.H.A( N.$, 5, N.h ); H.H.l( N.$, 5 ); n( N.Q, 19, 0 ); n( N.C, 286, 0 ); + n( N.D, 30, 0 ); n( N.v, 320, 0 ) + ; + + }() ); + + return H.H.N + ; + +}(); + + +UPNG.decode._readInterlace = function ( data, out ) { + + var w = out.width, h = out.height; + var bpp = UPNG.decode._getBPP( out ), cbpp = bpp >> 3, bpl = Math.ceil( w * bpp / 8 ); + var img = new Uint8Array( h * bpl ); + var di = 0; + + var starting_row = [ 0, 0, 4, 0, 2, 0, 1 ]; + var starting_col = [ 0, 4, 0, 2, 0, 1, 0 ]; + var row_increment = [ 8, 8, 8, 4, 4, 2, 2 ]; + var col_increment = [ 8, 8, 4, 4, 2, 2, 1 ]; + + var pass = 0; + while ( pass < 7 ) { + + var ri = row_increment[ pass ], ci = col_increment[ pass ]; + var sw = 0, sh = 0; + var cr = starting_row[ pass ]; while ( cr < h ) { + + cr += ri; sh ++; + + } + + var cc = starting_col[ pass ]; while ( cc < w ) { + + cc += ci; sw ++; + + } + + var bpll = Math.ceil( sw * bpp / 8 ); + UPNG.decode._filterZero( data, out, di, sw, sh ); + + var y = 0, row = starting_row[ pass ]; + var val; + + while ( row < h ) { + + var col = starting_col[ pass ]; + var cdi = ( di + y * bpll ) << 3; + + while ( col < w ) { + + if ( bpp == 1 ) { + + val = data[ cdi >> 3 ]; val = ( val >> ( 7 - ( cdi & 7 ) ) ) & 1; + img[ row * bpl + ( col >> 3 ) ] |= ( val << ( 7 - ( ( col & 7 ) << 0 ) ) ); + + } + + if ( bpp == 2 ) { + + val = data[ cdi >> 3 ]; val = ( val >> ( 6 - ( cdi & 7 ) ) ) & 3; + img[ row * bpl + ( col >> 2 ) ] |= ( val << ( 6 - ( ( col & 3 ) << 1 ) ) ); + + } + + if ( bpp == 4 ) { + + val = data[ cdi >> 3 ]; val = ( val >> ( 4 - ( cdi & 7 ) ) ) & 15; + img[ row * bpl + ( col >> 1 ) ] |= ( val << ( 4 - ( ( col & 1 ) << 2 ) ) ); + + } + + if ( bpp >= 8 ) { + + var ii = row * bpl + col * cbpp; + for ( var j = 0; j < cbpp; j ++ ) img[ ii + j ] = data[ ( cdi >> 3 ) + j ]; + + } + + cdi += bpp; col += ci; + + } + + y ++; row += ri; + + } + + if ( sw * sh != 0 ) di += sh * ( 1 + bpll ); + pass = pass + 1; + + } + + return img; + +}; + +UPNG.decode._getBPP = function ( out ) { + + var noc = [ 1, null, 3, 1, 2, null, 4 ][ out.ctype ]; + return noc * out.depth; + +}; + +UPNG.decode._filterZero = function ( data, out, off, w, h ) { + + var bpp = UPNG.decode._getBPP( out ), bpl = Math.ceil( w * bpp / 8 ), paeth = UPNG.decode._paeth; + bpp = Math.ceil( bpp / 8 ); + + var i, di, type = data[ off ], x = 0; + + if ( type > 1 ) data[ off ] = [ 0, 0, 1 ][ type - 2 ]; + if ( type == 3 ) for ( x = bpp; x < bpl; x ++ ) data[ x + 1 ] = ( data[ x + 1 ] + ( data[ x + 1 - bpp ] >>> 1 ) ) & 255; + + for ( var y = 0; y < h; y ++ ) { + + i = off + y * bpl; di = i + y + 1; + type = data[ di - 1 ]; x = 0; + + if ( type == 0 ) for ( ; x < bpl; x ++ ) data[ i + x ] = data[ di + x ]; + else if ( type == 1 ) { + + for ( ; x < bpp; x ++ ) data[ i + x ] = data[ di + x ]; + for ( ; x < bpl; x ++ ) data[ i + x ] = ( data[ di + x ] + data[ i + x - bpp ] ); + + } else if ( type == 2 ) { + + for ( ; x < bpl; x ++ ) data[ i + x ] = ( data[ di + x ] + data[ i + x - bpl ] ); + + } else if ( type == 3 ) { + + for ( ; x < bpp; x ++ ) data[ i + x ] = ( data[ di + x ] + ( data[ i + x - bpl ] >>> 1 ) ); + for ( ; x < bpl; x ++ ) data[ i + x ] = ( data[ di + x ] + ( ( data[ i + x - bpl ] + data[ i + x - bpp ] ) >>> 1 ) ); + + } else { + + for ( ; x < bpp; x ++ ) data[ i + x ] = ( data[ di + x ] + paeth( 0, data[ i + x - bpl ], 0 ) ); + for ( ; x < bpl; x ++ ) data[ i + x ] = ( data[ di + x ] + paeth( data[ i + x - bpp ], data[ i + x - bpl ], data[ i + x - bpp - bpl ] ) ); + + } + + } + + return data; + +}; + +UPNG.decode._paeth = function ( a, b, c ) { + + var p = a + b - c, pa = ( p - a ), pb = ( p - b ), pc = ( p - c ); + if ( pa * pa <= pb * pb && pa * pa <= pc * pc ) return a; + else if ( pb * pb <= pc * pc ) return b; + return c; + +}; + +UPNG.decode._IHDR = function ( data, offset, out ) { + + var bin = UPNG._bin; + out.width = bin.readUint( data, offset ); offset += 4; + out.height = bin.readUint( data, offset ); offset += 4; + out.depth = data[ offset ]; offset ++; + out.ctype = data[ offset ]; offset ++; + out.compress = data[ offset ]; offset ++; + out.filter = data[ offset ]; offset ++; + out.interlace = data[ offset ]; offset ++; + +}; + +UPNG._bin = { + nextZero: function ( data, p ) { + + while ( data[ p ] != 0 ) p ++; return p; + + }, + readUshort: function ( buff, p ) { + + return ( buff[ p ] << 8 ) | buff[ p + 1 ]; + + }, + writeUshort: function ( buff, p, n ) { + + buff[ p ] = ( n >> 8 ) & 255; buff[ p + 1 ] = n & 255; + + }, + readUint: function ( buff, p ) { + + return ( buff[ p ] * ( 256 * 256 * 256 ) ) + ( ( buff[ p + 1 ] << 16 ) | ( buff[ p + 2 ] << 8 ) | buff[ p + 3 ] ); + + }, + writeUint: function ( buff, p, n ) { + + buff[ p ] = ( n >> 24 ) & 255; buff[ p + 1 ] = ( n >> 16 ) & 255; buff[ p + 2 ] = ( n >> 8 ) & 255; buff[ p + 3 ] = n & 255; + + }, + readASCII: function ( buff, p, l ) { + + var s = ''; for ( var i = 0; i < l; i ++ ) s += String.fromCharCode( buff[ p + i ] ); return s; + + }, + writeASCII: function ( data, p, s ) { + + for ( var i = 0; i < s.length; i ++ ) data[ p + i ] = s.charCodeAt( i ); + + }, + readBytes: function ( buff, p, l ) { + + var arr = []; for ( var i = 0; i < l; i ++ ) arr.push( buff[ p + i ] ); return arr; + + }, + pad: function ( n ) { + + return n.length < 2 ? '0' + n : n; + + }, + readUTF8: function ( buff, p, l ) { + + var s = '', ns; + for ( var i = 0; i < l; i ++ ) s += '%' + UPNG._bin.pad( buff[ p + i ].toString( 16 ) ); + try { + + ns = decodeURIComponent( s ); + + } catch ( e ) { + + return UPNG._bin.readASCII( buff, p, l ); + + } + + return ns; + + } +}; +UPNG._copyTile = function ( sb, sw, sh, tb, tw, th, xoff, yoff, mode ) { + + var w = Math.min( sw, tw ), h = Math.min( sh, th ); + var si = 0, ti = 0; + for ( var y = 0; y < h; y ++ ) + for ( var x = 0; x < w; x ++ ) { + + if ( xoff >= 0 && yoff >= 0 ) { + + si = ( y * sw + x ) << 2; ti = ( ( yoff + y ) * tw + xoff + x ) << 2; + + } else { + + si = ( ( - yoff + y ) * sw - xoff + x ) << 2; ti = ( y * tw + x ) << 2; + + } + + if ( mode == 0 ) { + + tb[ ti ] = sb[ si ]; tb[ ti + 1 ] = sb[ si + 1 ]; tb[ ti + 2 ] = sb[ si + 2 ]; tb[ ti + 3 ] = sb[ si + 3 ]; + + } else if ( mode == 1 ) { + + var fa = sb[ si + 3 ] * ( 1 / 255 ), fr = sb[ si ] * fa, fg = sb[ si + 1 ] * fa, fb = sb[ si + 2 ] * fa; + var ba = tb[ ti + 3 ] * ( 1 / 255 ), br = tb[ ti ] * ba, bg = tb[ ti + 1 ] * ba, bb = tb[ ti + 2 ] * ba; + + var ifa = 1 - fa, oa = fa + ba * ifa, ioa = ( oa == 0 ? 0 : 1 / oa ); + tb[ ti + 3 ] = 255 * oa; + tb[ ti + 0 ] = ( fr + br * ifa ) * ioa; + tb[ ti + 1 ] = ( fg + bg * ifa ) * ioa; + tb[ ti + 2 ] = ( fb + bb * ifa ) * ioa; + + } else if ( mode == 2 ) { // copy only differences, otherwise zero + + var fa = sb[ si + 3 ], fr = sb[ si ], fg = sb[ si + 1 ], fb = sb[ si + 2 ]; + var ba = tb[ ti + 3 ], br = tb[ ti ], bg = tb[ ti + 1 ], bb = tb[ ti + 2 ]; + if ( fa == ba && fr == br && fg == bg && fb == bb ) { + + tb[ ti ] = 0; tb[ ti + 1 ] = 0; tb[ ti + 2 ] = 0; tb[ ti + 3 ] = 0; + + } else { + + tb[ ti ] = fr; tb[ ti + 1 ] = fg; tb[ ti + 2 ] = fb; tb[ ti + 3 ] = fa; + + } + + } else if ( mode == 3 ) { // check if can be blended + + var fa = sb[ si + 3 ], fr = sb[ si ], fg = sb[ si + 1 ], fb = sb[ si + 2 ]; + var ba = tb[ ti + 3 ], br = tb[ ti ], bg = tb[ ti + 1 ], bb = tb[ ti + 2 ]; + if ( fa == ba && fr == br && fg == bg && fb == bb ) continue; + //if(fa!=255 && ba!=0) return false; + if ( fa < 220 && ba > 20 ) return false; + + } + + } + + return true; + +}; + +export { RGBMLoader }; diff --git a/node_modules/three/examples/jsm/loaders/STLLoader.js b/node_modules/three/examples/jsm/loaders/STLLoader.js new file mode 100644 index 0000000..75d4f84 --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/STLLoader.js @@ -0,0 +1,410 @@ +import { + BufferAttribute, + BufferGeometry, + Color, + FileLoader, + Float32BufferAttribute, + Loader, + Vector3 +} from 'three'; + +/** + * Description: A THREE loader for STL ASCII files, as created by Solidworks and other CAD programs. + * + * Supports both binary and ASCII encoded files, with automatic detection of type. + * + * The loader returns a non-indexed buffer geometry. + * + * Limitations: + * Binary decoding supports "Magics" color format (http://en.wikipedia.org/wiki/STL_(file_format)#Color_in_binary_STL). + * There is perhaps some question as to how valid it is to always assume little-endian-ness. + * ASCII decoding assumes file is UTF-8. + * + * Usage: + * const loader = new STLLoader(); + * loader.load( './models/stl/slotted_disk.stl', function ( geometry ) { + * scene.add( new THREE.Mesh( geometry ) ); + * }); + * + * For binary STLs geometry might contain colors for vertices. To use it: + * // use the same code to load STL as above + * if (geometry.hasColors) { + * material = new THREE.MeshPhongMaterial({ opacity: geometry.alpha, vertexColors: true }); + * } else { .... } + * const mesh = new THREE.Mesh( geometry, material ); + * + * For ASCII STLs containing multiple solids, each solid is assigned to a different group. + * Groups can be used to assign a different color by defining an array of materials with the same length of + * geometry.groups and passing it to the Mesh constructor: + * + * const mesh = new THREE.Mesh( geometry, material ); + * + * For example: + * + * const materials = []; + * const nGeometryGroups = geometry.groups.length; + * + * const colorMap = ...; // Some logic to index colors. + * + * for (let i = 0; i < nGeometryGroups; i++) { + * + * const material = new THREE.MeshPhongMaterial({ + * color: colorMap[i], + * wireframe: false + * }); + * + * } + * + * materials.push(material); + * const mesh = new THREE.Mesh(geometry, materials); + */ + + +class STLLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( this.manager ); + loader.setPath( this.path ); + loader.setResponseType( 'arraybuffer' ); + loader.setRequestHeader( this.requestHeader ); + loader.setWithCredentials( this.withCredentials ); + + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( text ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( data ) { + + function isBinary( data ) { + + const reader = new DataView( data ); + const face_size = ( 32 / 8 * 3 ) + ( ( 32 / 8 * 3 ) * 3 ) + ( 16 / 8 ); + const n_faces = reader.getUint32( 80, true ); + const expect = 80 + ( 32 / 8 ) + ( n_faces * face_size ); + + if ( expect === reader.byteLength ) { + + return true; + + } + + // An ASCII STL data must begin with 'solid ' as the first six bytes. + // However, ASCII STLs lacking the SPACE after the 'd' are known to be + // plentiful. So, check the first 5 bytes for 'solid'. + + // Several encodings, such as UTF-8, precede the text with up to 5 bytes: + // https://en.wikipedia.org/wiki/Byte_order_mark#Byte_order_marks_by_encoding + // Search for "solid" to start anywhere after those prefixes. + + // US-ASCII ordinal values for 's', 'o', 'l', 'i', 'd' + + const solid = [ 115, 111, 108, 105, 100 ]; + + for ( let off = 0; off < 5; off ++ ) { + + // If "solid" text is matched to the current offset, declare it to be an ASCII STL. + + if ( matchDataViewAt( solid, reader, off ) ) return false; + + } + + // Couldn't find "solid" text at the beginning; it is binary STL. + + return true; + + } + + function matchDataViewAt( query, reader, offset ) { + + // Check if each byte in query matches the corresponding byte from the current offset + + for ( let i = 0, il = query.length; i < il; i ++ ) { + + if ( query[ i ] !== reader.getUint8( offset + i ) ) return false; + + } + + return true; + + } + + function parseBinary( data ) { + + const reader = new DataView( data ); + const faces = reader.getUint32( 80, true ); + + let r, g, b, hasColors = false, colors; + let defaultR, defaultG, defaultB, alpha; + + // process STL header + // check for default color in header ("COLOR=rgba" sequence). + + for ( let index = 0; index < 80 - 10; index ++ ) { + + if ( ( reader.getUint32( index, false ) == 0x434F4C4F /*COLO*/ ) && + ( reader.getUint8( index + 4 ) == 0x52 /*'R'*/ ) && + ( reader.getUint8( index + 5 ) == 0x3D /*'='*/ ) ) { + + hasColors = true; + colors = new Float32Array( faces * 3 * 3 ); + + defaultR = reader.getUint8( index + 6 ) / 255; + defaultG = reader.getUint8( index + 7 ) / 255; + defaultB = reader.getUint8( index + 8 ) / 255; + alpha = reader.getUint8( index + 9 ) / 255; + + } + + } + + const dataOffset = 84; + const faceLength = 12 * 4 + 2; + + const geometry = new BufferGeometry(); + + const vertices = new Float32Array( faces * 3 * 3 ); + const normals = new Float32Array( faces * 3 * 3 ); + + const color = new Color(); + + for ( let face = 0; face < faces; face ++ ) { + + const start = dataOffset + face * faceLength; + const normalX = reader.getFloat32( start, true ); + const normalY = reader.getFloat32( start + 4, true ); + const normalZ = reader.getFloat32( start + 8, true ); + + if ( hasColors ) { + + const packedColor = reader.getUint16( start + 48, true ); + + if ( ( packedColor & 0x8000 ) === 0 ) { + + // facet has its own unique color + + r = ( packedColor & 0x1F ) / 31; + g = ( ( packedColor >> 5 ) & 0x1F ) / 31; + b = ( ( packedColor >> 10 ) & 0x1F ) / 31; + + } else { + + r = defaultR; + g = defaultG; + b = defaultB; + + } + + } + + for ( let i = 1; i <= 3; i ++ ) { + + const vertexstart = start + i * 12; + const componentIdx = ( face * 3 * 3 ) + ( ( i - 1 ) * 3 ); + + vertices[ componentIdx ] = reader.getFloat32( vertexstart, true ); + vertices[ componentIdx + 1 ] = reader.getFloat32( vertexstart + 4, true ); + vertices[ componentIdx + 2 ] = reader.getFloat32( vertexstart + 8, true ); + + normals[ componentIdx ] = normalX; + normals[ componentIdx + 1 ] = normalY; + normals[ componentIdx + 2 ] = normalZ; + + if ( hasColors ) { + + color.set( r, g, b ).convertSRGBToLinear(); + + colors[ componentIdx ] = color.r; + colors[ componentIdx + 1 ] = color.g; + colors[ componentIdx + 2 ] = color.b; + + } + + } + + } + + geometry.setAttribute( 'position', new BufferAttribute( vertices, 3 ) ); + geometry.setAttribute( 'normal', new BufferAttribute( normals, 3 ) ); + + if ( hasColors ) { + + geometry.setAttribute( 'color', new BufferAttribute( colors, 3 ) ); + geometry.hasColors = true; + geometry.alpha = alpha; + + } + + return geometry; + + } + + function parseASCII( data ) { + + const geometry = new BufferGeometry(); + const patternSolid = /solid([\s\S]*?)endsolid/g; + const patternFace = /facet([\s\S]*?)endfacet/g; + const patternName = /solid\s(.+)/; + let faceCounter = 0; + + const patternFloat = /[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source; + const patternVertex = new RegExp( 'vertex' + patternFloat + patternFloat + patternFloat, 'g' ); + const patternNormal = new RegExp( 'normal' + patternFloat + patternFloat + patternFloat, 'g' ); + + const vertices = []; + const normals = []; + const groupNames = []; + + const normal = new Vector3(); + + let result; + + let groupCount = 0; + let startVertex = 0; + let endVertex = 0; + + while ( ( result = patternSolid.exec( data ) ) !== null ) { + + startVertex = endVertex; + + const solid = result[ 0 ]; + + const name = ( result = patternName.exec( solid ) ) !== null ? result[ 1 ] : ''; + groupNames.push( name ); + + while ( ( result = patternFace.exec( solid ) ) !== null ) { + + let vertexCountPerFace = 0; + let normalCountPerFace = 0; + + const text = result[ 0 ]; + + while ( ( result = patternNormal.exec( text ) ) !== null ) { + + normal.x = parseFloat( result[ 1 ] ); + normal.y = parseFloat( result[ 2 ] ); + normal.z = parseFloat( result[ 3 ] ); + normalCountPerFace ++; + + } + + while ( ( result = patternVertex.exec( text ) ) !== null ) { + + vertices.push( parseFloat( result[ 1 ] ), parseFloat( result[ 2 ] ), parseFloat( result[ 3 ] ) ); + normals.push( normal.x, normal.y, normal.z ); + vertexCountPerFace ++; + endVertex ++; + + } + + // every face have to own ONE valid normal + + if ( normalCountPerFace !== 1 ) { + + console.error( 'THREE.STLLoader: Something isn\'t right with the normal of face number ' + faceCounter ); + + } + + // each face have to own THREE valid vertices + + if ( vertexCountPerFace !== 3 ) { + + console.error( 'THREE.STLLoader: Something isn\'t right with the vertices of face number ' + faceCounter ); + + } + + faceCounter ++; + + } + + const start = startVertex; + const count = endVertex - startVertex; + + geometry.userData.groupNames = groupNames; + + geometry.addGroup( start, count, groupCount ); + groupCount ++; + + } + + geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); + geometry.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); + + return geometry; + + } + + function ensureString( buffer ) { + + if ( typeof buffer !== 'string' ) { + + return new TextDecoder().decode( buffer ); + + } + + return buffer; + + } + + function ensureBinary( buffer ) { + + if ( typeof buffer === 'string' ) { + + const array_buffer = new Uint8Array( buffer.length ); + for ( let i = 0; i < buffer.length; i ++ ) { + + array_buffer[ i ] = buffer.charCodeAt( i ) & 0xff; // implicitly assumes little-endian + + } + + return array_buffer.buffer || array_buffer; + + } else { + + return buffer; + + } + + } + + // start + + const binData = ensureBinary( data ); + + return isBinary( binData ) ? parseBinary( binData ) : parseASCII( ensureString( data ) ); + + } + +} + +export { STLLoader }; diff --git a/node_modules/three/examples/jsm/loaders/SVGLoader.js b/node_modules/three/examples/jsm/loaders/SVGLoader.js new file mode 100644 index 0000000..196e42b --- /dev/null +++ b/node_modules/three/examples/jsm/loaders/SVGLoader.js @@ -0,0 +1,3173 @@ +import { + Box2, + BufferGeometry, + FileLoader, + Float32BufferAttribute, + Loader, + Matrix3, + Path, + Shape, + ShapePath, + ShapeUtils, + SRGBColorSpace, + Vector2, + Vector3 +} from 'three'; + +const COLOR_SPACE_SVG = SRGBColorSpace; + +class SVGLoader extends Loader { + + constructor( manager ) { + + super( manager ); + + // Default dots per inch + this.defaultDPI = 90; + + // Accepted units: 'mm', 'cm', 'in', 'pt', 'pc', 'px' + this.defaultUnit = 'px'; + + } + + load( url, onLoad, onProgress, onError ) { + + const scope = this; + + const loader = new FileLoader( scope.manager ); + loader.setPath( scope.path ); + loader.setRequestHeader( scope.requestHeader ); + loader.setWithCredentials( scope.withCredentials ); + loader.load( url, function ( text ) { + + try { + + onLoad( scope.parse( text ) ); + + } catch ( e ) { + + if ( onError ) { + + onError( e ); + + } else { + + console.error( e ); + + } + + scope.manager.itemError( url ); + + } + + }, onProgress, onError ); + + } + + parse( text ) { + + const scope = this; + + function parseNode( node, style ) { + + if ( node.nodeType !== 1 ) return; + + const transform = getNodeTransform( node ); + + let isDefsNode = false; + + let path = null; + + switch ( node.nodeName ) { + + case 'svg': + style = parseStyle( node, style ); + break; + + case 'style': + parseCSSStylesheet( node ); + break; + + case 'g': + style = parseStyle( node, style ); + break; + + case 'path': + style = parseStyle( node, style ); + if ( node.hasAttribute( 'd' ) ) path = parsePathNode( node ); + break; + + case 'rect': + style = parseStyle( node, style ); + path = parseRectNode( node ); + break; + + case 'polygon': + style = parseStyle( node, style ); + path = parsePolygonNode( node ); + break; + + case 'polyline': + style = parseStyle( node, style ); + path = parsePolylineNode( node ); + break; + + case 'circle': + style = parseStyle( node, style ); + path = parseCircleNode( node ); + break; + + case 'ellipse': + style = parseStyle( node, style ); + path = parseEllipseNode( node ); + break; + + case 'line': + style = parseStyle( node, style ); + path = parseLineNode( node ); + break; + + case 'defs': + isDefsNode = true; + break; + + case 'use': + style = parseStyle( node, style ); + + const href = node.getAttributeNS( 'http://www.w3.org/1999/xlink', 'href' ) || ''; + const usedNodeId = href.substring( 1 ); + const usedNode = node.viewportElement.getElementById( usedNodeId ); + if ( usedNode ) { + + parseNode( usedNode, style ); + + } else { + + console.warn( 'SVGLoader: \'use node\' references non-existent node id: ' + usedNodeId ); + + } + + break; + + default: + // console.log( node ); + + } + + if ( path ) { + + if ( style.fill !== undefined && style.fill !== 'none' ) { + + path.color.setStyle( style.fill, COLOR_SPACE_SVG ); + + } + + transformPath( path, currentTransform ); + + paths.push( path ); + + path.userData = { node: node, style: style }; + + } + + const childNodes = node.childNodes; + + for ( let i = 0; i < childNodes.length; i ++ ) { + + const node = childNodes[ i ]; + + if ( isDefsNode && node.nodeName !== 'style' && node.nodeName !== 'defs' ) { + + // Ignore everything in defs except CSS style definitions + // and nested defs, because it is OK by the standard to have + //